commit 4701f33a10702d5fc577c32434eb62adde0a1ae1 Author: Linus Torvalds Date: Sun Mar 16 12:55:17 2025 -1000 Linux 6.14-rc7 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1275e99d1c4f2e70452558b8da9d0d7bdcc9e16 Merge: 0990528befe8 d9e7c172a7f2 Author: Linus Torvalds Date: Sun Mar 16 09:18:46 2025 -1000 Merge tag 'media/v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fix from Mauro Carvalho Chehab: "rtl2832 driver regression fix" * tag 'media/v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: rtl2832_sdr: assign vb2 lock before vb2_queue_init commit 0990528befe86e538e51d89824c2c091999d191c Merge: ad87a8d0c435 3ef18b236690 Author: Linus Torvalds Date: Sun Mar 16 09:09:44 2025 -1000 Merge tag 'i2c-for-6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: - omap: fix irq ACKS to avoid irq storming and system hang - ali1535, ali15x3, sis630: fix error path at probe exit * tag 'i2c-for-6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: sis630: Fix an error handling path in sis630_probe() i2c: ali15x3: Fix an error handling path in ali15x3_probe() i2c: ali1535: Fix an error handling path in ali1535_probe() i2c: omap: fix IRQ storms commit ad87a8d0c435a97e2bdcf714d7e1a84ab5fda1ad Merge: cb82ca153949 0b4ffbe4888a Author: Linus Torvalds Date: Sun Mar 16 09:05:00 2025 -1000 Merge tag 'trace-v6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fix from Steven Rostedt: "Fix ref count of trace_array in error path of histogram file open Tracing instances have a ref count to keep them around while files within their directories are open. This prevents them from being deleted while they are used. The histogram code had some files that needed to take the ref count and that was added, but the error paths did not decrement the ref counts. This caused the instances from ever being removed if a histogram file failed to open due to some error" * tag 'trace-v6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Correct the refcount if the hist/hist_debug file fails to open commit cb82ca153949c6204af793de24b18a04236e79fd Merge: 31d7109a19f6 f2865c6300d7 Author: Linus Torvalds Date: Sat Mar 15 20:39:55 2025 -1000 Merge tag 'usb-6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB and Thunderbolt driver fixes and new usb-serial device ids. Included in here are: - new usb-serial device ids - typec driver bugfix - thunderbolt driver resume bugfix All of these have been in linux-next with no reported issues" * tag 'usb-6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: typec: tcpm: fix state transition for SNK_WAIT_CAPABILITIES state in run_state_machine() USB: serial: ftdi_sio: add support for Altera USB Blaster 3 thunderbolt: Prevent use-after-free in resume from hibernate USB: serial: option: fix Telit Cinterion FE990A name USB: serial: option: add Telit Cinterion FE990B compositions USB: serial: option: match on interface class for Telit FN990B commit 31d7109a19f66dbce2ad3dc377343d734cdfa346 Merge: cd3a56ac2d13 fd10709e28d2 Author: Linus Torvalds Date: Sat Mar 15 15:46:29 2025 -1000 Merge tag 'input-for-v6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - several new device IDs added to xpad game controller driver - support for imagis IST3038H variant of chip added to imagis touch controller driver - a fix for GPIO allocation for ads7846 touch controller driver - a fix for iqs7222 driver to properly support status register - a fix for goodix-berlin touch controller driver to use the right name for the regulator - more i8042 quirks to better handle several old Clevo devices. * tag 'input-for-v6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: MAINTAINERS: Remove myself from the goodix touchscreen maintainers Input: iqs7222 - preserve system status register Input: i8042 - swap old quirk combination with new quirk for more devices Input: i8042 - swap old quirk combination with new quirk for several devices Input: i8042 - add required quirks for missing old boardnames Input: i8042 - swap old quirk combination with new quirk for NHxxRZQ Input: xpad - rename QH controller to Legion Go S Input: xpad - add support for TECNO Pocket Go Input: xpad - add support for ZOTAC Gaming Zone Input: goodix-berlin - fix vddio regulator references Input: goodix-berlin - fix comment referencing wrong regulator Input: imagis - add support for imagis IST3038H dt-bindings: input/touchscreen: imagis: add compatible for ist3038h Input: xpad - add multiple supported devices Input: xpad - add 8BitDo SN30 Pro, Hyperkin X91 and Gamesir G7 SE controllers Input: ads7846 - fix gpiod allocation Input: wdt87xx_i2c - fix compiler warning commit cd3a56ac2d132beea747f7b41cc085c82fe2eac0 Merge: eb88e6bfbc0a a1eb95d6b5f4 Author: Linus Torvalds Date: Sat Mar 15 15:40:42 2025 -1000 Merge tag 'rust-fixes-6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux Pull rust fixes from Miguel Ojeda: "Toolchain and infrastructure: - Disallow BTF generation with Rust + LTO - Improve rust-analyzer support 'kernel' crate: - 'init' module: remove 'Zeroable' implementation for a couple types that should not have it - 'alloc' module: fix macOS failure in host test by satisfying POSIX alignment requirement - Add missing '\n's to 'pr_*!()' calls And a couple other minor cleanups" * tag 'rust-fixes-6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux: scripts: generate_rust_analyzer: add uapi crate scripts: generate_rust_analyzer: add missing include_dirs scripts: generate_rust_analyzer: add missing macros deps rust: Disallow BTF generation with Rust + LTO rust: task: fix `SAFETY` comment in `Task::wake_up` rust: workqueue: add missing newline to pr_info! examples rust: sync: add missing newline in locked_by log example rust: init: add missing newline to pr_info! calls rust: error: add missing newline to pr_warn! calls rust: docs: add missing newline to printing macro examples rust: alloc: satisfy POSIX alignment requirement rust: init: fix `Zeroable` implementation for `Option>` and `Option>` rust: remove leftover mentions of the `alloc` crate commit eb88e6bfbc0a975e08a18c39d1138d3e6cdc00a5 Merge: 3571e8b091f4 252256e416de Author: Linus Torvalds Date: Sat Mar 15 08:32:16 2025 -1000 Merge tag 'fsnotify_for_v6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify reverts from Jan Kara: "Syzbot has found out that fsnotify HSM events generated on page fault can be generated while we already hold freeze protection for the filesystem (when you do buffered write from a buffer which is mmapped file on the same filesystem) which violates expectations for HSM events and could lead to deadlocks of HSM clients with filesystem freezing. Since it's quite late in the cycle we've decided to revert changes implementing HSM events on page fault for now and instead just generate one event for the whole range on mmap(2) so that HSM client can fetch the data at that moment" * tag 'fsnotify_for_v6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: Revert "fanotify: disable readahead if we have pre-content watches" Revert "mm: don't allow huge faults for files with pre content watches" Revert "fsnotify: generate pre-content permission event on page fault" Revert "xfs: add pre-content fsnotify hook for DAX faults" Revert "ext4: add pre-content fsnotify hook for DAX faults" fsnotify: add pre-content hooks on mmap() commit 3ef18b236690af5f6427c5b6d8636881116aa73a Merge: 7eb172143d55 2b22459792fc Author: Wolfram Sang Date: Sat Mar 15 09:28:41 2025 +0100 Merge tag 'i2c-host-fixes-6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current i2c-host-fixes for v6.14-rc7 - omap: fixed irq ACKS to avoid irq storming and system hang. - ali1535, ali15x3, sis630: fixed error path at probe exit. commit 3571e8b091f4270d869dda7a6cc43616c6ad6897 Merge: a29967be967e 3aa660c05924 Author: Linus Torvalds Date: Fri Mar 14 18:43:37 2025 -1000 Merge tag 'v6.14-rc6-smb3-server-fixes' of git://git.samba.org/ksmbd Pull smb server fixes from Steve French: - Two fixes for oplock break/lease races * tag 'v6.14-rc6-smb3-server-fixes' of git://git.samba.org/ksmbd: ksmbd: prevent connection release during oplock break notification ksmbd: fix use-after-free in ksmbd_free_work_struct commit a29967be967eebf049e89edb14c4edf9991bc929 Merge: 85ac31fecb37 605b249ea967 Author: Linus Torvalds Date: Fri Mar 14 14:24:05 2025 -1000 Merge tag 'v6.14-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: "Six smb3 client fixes, all also for stable" * tag 'v6.14-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: smb: client: Fix match_session bug preventing session reuse cifs: Fix integer overflow while processing closetimeo mount option cifs: Fix integer overflow while processing actimeo mount option cifs: Fix integer overflow while processing acdirmax mount option cifs: Fix integer overflow while processing acregmax mount option smb: client: fix regression with guest option commit 85ac31fecb37f94bb667e9cda86153f03d5fd3bd Merge: 2bda981bd5dd 1a2b74d0a2a4 Author: Linus Torvalds Date: Fri Mar 14 14:17:37 2025 -1000 Merge tag 'bcachefs-2025-03-14.2' of git://evilpiepirate.org/bcachefs Pull another bcachefs hotfix from Kent Overstreet: - fix 32 bit build breakage * tag 'bcachefs-2025-03-14.2' of git://evilpiepirate.org/bcachefs: bcachefs: fix build on 32 bit in get_random_u64_below() commit 1a2b74d0a2a46c219b25fdb0efcf9cd7f55cfe5e Author: Kent Overstreet Date: Fri Mar 14 18:20:20 2025 -0400 bcachefs: fix build on 32 bit in get_random_u64_below() bare 64 bit divides not allowed, whoops arm-linux-gnueabi-ld: drivers/char/random.o: in function `__get_random_u64_below': drivers/char/random.c:602:(.text+0xc70): undefined reference to `__aeabi_uldivmod' Signed-off-by: Kent Overstreet fs/bcachefs/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2bda981bd5dddf9fc42c0cbcff6549230bbb520b Merge: 912ad8b317fa ca3ac4bf4dc3 Author: Linus Torvalds Date: Fri Mar 14 13:21:31 2025 -1000 Merge tag 'xfs-fixes-6.14-rc7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs cleanup from Carlos Maiolino: "Use abs_diff instead of XFS_ABSDIFF" * tag 'xfs-fixes-6.14-rc7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: Use abs_diff instead of XFS_ABSDIFF commit 912ad8b317fafbb5a08fc0d9c23cf46af39ec2a7 Merge: b35233e7bfa0 90fd9ad5b0c9 Author: Linus Torvalds Date: Fri Mar 14 12:14:32 2025 -1000 Merge tag 'bcachefs-2025-03-14' of git://evilpiepirate.org/bcachefs Pull bcachefs hotfix from Kent Overstreet: "This one is high priority: a user hit an assertion in the upgrade to 6.14, and we don't have a reproducer, so this changes the assertion to an emergency read-only with more info so we can debug it" * tag 'bcachefs-2025-03-14' of git://evilpiepirate.org/bcachefs: bcachefs: Change btree wb assert to runtime error commit b35233e7bfa04045388967d3dc219e80cc88bc74 Merge: 580b2032359d 57e9417f6983 Author: Linus Torvalds Date: Fri Mar 14 11:31:57 2025 -1000 Merge tag 'for-6.14/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-flakey: fix memory corruption in optional corrupt_bio_byte feature * tag 'for-6.14/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm-flakey: Fix memory corruption in optional corrupt_bio_byte feature commit 580b2032359d978418e5f7178511aef512229345 Merge: 83158b21ae9a a9381351dd6c Author: Linus Torvalds Date: Fri Mar 14 11:22:05 2025 -1000 Merge tag 'block-6.14-20250313' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - NVMe pull request via Keith: - Concurrent pci error and hotplug handling fix (Keith) - Endpoint function fixes (Damien) - Fix for a regression introduced in this cycle with error checking for batched request completions (Shin'ichiro) * tag 'block-6.14-20250313' of git://git.kernel.dk/linux: block: change blk_mq_add_to_batch() third argument type to bool nvme: move error logging from nvme_end_req() to __nvme_end_req() nvmet: pci-epf: Do not add an IRQ vector if not needed nvmet: pci-epf: Set NVMET_PCI_EPF_Q_LIVE when a queue is fully created nvme-pci: fix stuck reset on concurrent DPC and HP commit 83158b21ae9a1a5c8285c3d542981bae914e26b6 Merge: 6efcfe105c7a 03fc0a2dc9f8 Author: Linus Torvalds Date: Fri Mar 14 10:57:28 2025 -1000 Merge tag 'platform-drivers-x86-v6.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Ilpo Järvinen: "Fixes and new HW support. The diff is a bit larger than I'd prefer at this point due to unwinding the amd/pmf driver's error handling properly instead of calling a deinit function that was a can full of worms. Summary: - amd/pmf: - Fix error handling in amd_pmf_init_smart_pc() - Fix missing hidden options for Smart PC - surface: aggregator_registry: Add Support for Surface Pro 11" * tag 'platform-drivers-x86-v6.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: MAINTAINERS: Update Ike Panhc's email address platform/x86/amd: pmf: Fix missing hidden options for Smart PC platform/surface: aggregator_registry: Add Support for Surface Pro 11 platform/x86/amd/pmf: fix cleanup in amd_pmf_init_smart_pc() commit 6efcfe105c7ace776e011bd82e4f781876fdb38e Merge: b1144bc7cbb9 dcb73cbaaeb3 Author: Linus Torvalds Date: Fri Mar 14 10:39:41 2025 -1000 Merge tag 'gpio-fixes-for-v6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: "The first fix is a backport from my v6.15-rc1 queue that turned out to be needed in v6.14 as well but as the former diverged from my fixes branch I had to adjust the patch a bit. The second one fixes a regression observed in user-space where closing a file descriptor associated with a GPIO device results in a ~10ms delay due to the atomic notifier calling rcu_synchronize() when unregistering. Summary: - don't check the return value of gpio_chip::get_direction() when registering a GPIO chip - use raw notifier for line state events" * tag 'gpio-fixes-for-v6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: cdev: use raw notifier for line state events gpiolib: don't check the retval of get_direction() when registering a chip commit b1144bc7cbb91f688a216fdf02ae25050b839c4a Merge: ef9248676f81 de69d56daac6 Author: Linus Torvalds Date: Fri Mar 14 10:35:39 2025 -1000 Merge tag 'sound-6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of last-minute fixes. Most of them are for ASoC, and the only one core fix is for reverting the previous change, while the rest are all device-specific quirks and fixes, which should be relatively safe to apply" * tag 'sound-6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: cs42l43: convert to SYSTEM_SLEEP_PM_OPS ALSA: hda/realtek: Add mute LED quirk for HP Pavilion x360 14-dy1xxx ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe() ASoC: rt722-sdca: add missing readable registers ASoC: amd: yc: Support mic on another Lenovo ThinkPad E16 Gen 2 model ASoC: cs42l43: Fix maximum ADC Volume ASoC: ops: Consistently treat platform_max as control value ASoC: rt1320: set wake_capable = 0 explicitly ASoC: cs42l43: Add jack delay debounce after suspend ASoC: tegra: Fix ADX S24_LE audio format ASoC: codecs: wsa884x: report temps to hwmon in millidegree of Celsius ASoC: Intel: sof_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks() commit ef9248676f81c0342d6e8f90a380a9e0b8c25280 Merge: 2eaca8a09e55 f7edb07ad7c6 Author: Linus Torvalds Date: Fri Mar 14 10:24:57 2025 -1000 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "The main one is a horrible macro fix for our TLB flushing code which resulted in over-invalidation on the MMU notifier path. Summary: - Fix population of the vmemmap for regions of memory that are smaller than a section (128 MiB) - Fix range-based TLB over-invalidation when invoked via a MMU notifier" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: Fix mmu notifiers for range-based invalidates arm64: mm: Populate vmemmap at the page level if not section aligned commit 2eaca8a09e55a30e8f2df8d13d4071f8f856b716 Merge: a22ea738f453 a2ab25529bbc Author: Linus Torvalds Date: Fri Mar 14 10:07:16 2025 -1000 Merge tag 'x86-urgent-2025-03-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Ingo Molnar: "Fix the bootup of SEV-SNP enabled guests under VMware hypervisors" * tag 'x86-urgent-2025-03-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vmware: Parse MP tables for SEV-SNP enabled guests under VMware hypervisors commit a22ea738f4539afc13aa34a34a631e5aae96bcf8 Merge: 28c50999c977 f3fa0e40df17 Author: Linus Torvalds Date: Fri Mar 14 09:56:46 2025 -1000 Merge tag 'sched-urgent-2025-03-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "Fix a sleeping-while-atomic bug caused by a recent optimization utilizing static keys that didn't consider that the static_key_disable() call could be triggered in atomic context. Revert the optimization" * tag 'sched-urgent-2025-03-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/clock: Don't define sched_clock_irqtime as static key commit 28c50999c977fc60ecbadfee4359a93116163d4f Merge: 70e23dda3817 85b2b9c16d05 Author: Linus Torvalds Date: Fri Mar 14 09:41:36 2025 -1000 Merge tag 'locking-urgent-2025-03-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc locking fixes from Ingo Molnar: - Restrict the Rust runtime from unintended access to dynamically allocated LockClassKeys - KernelDoc annotation fix - Fix a lock ordering bug in semaphore::up(), related to trying to printk() and wake up the console within critical sections * tag 'locking-urgent-2025-03-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/semaphore: Use wake_q to wake up processes outside lock critical section locking/rtmutex: Use the 'struct' keyword in kernel-doc comment rust: lockdep: Remove support for dynamically allocated LockClassKeys commit 70e23dda3817f8e74f71385e4c24dc891780deca Merge: 695caca9345a 366fef794bd2 Author: Linus Torvalds Date: Fri Mar 14 09:12:28 2025 -1000 Merge tag 'core-urgent-2025-03-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core fix from Ingo Molnar: "Fix a Sparse false positive warning triggered by no_free_ptr()" * tag 'core-urgent-2025-03-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: : Allow the passing of both iomem and non-iomem pointers to no_free_ptr() commit 90fd9ad5b0c981693c8512d9da01f14fb6596e9d Author: Kent Overstreet Date: Fri Mar 14 09:54:43 2025 -0400 bcachefs: Change btree wb assert to runtime error We just had a report of the assert for "btree in write buffer for non-write buffer btree" popping during the 6.14 upgrade. - 150TB filesystem, after a reboot the upgrade was able to continue from where it left off, so no major damage. But with 6.14 about to come out we want to get this tracked down asap, and need more data if other users hit this. Convert the BUG_ON() to an emergency read-only, and print out btree, the key itself, and stack trace from the original write buffer update (which did not have this check before). Reported-by: Stijn Tintel Signed-off-by: Kent Overstreet fs/bcachefs/btree_update.h | 8 ++++++++ fs/bcachefs/btree_write_buffer.c | 21 ++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) commit 03fc0a2dc9f8c292fad8a1bcfb6d1f0dec1824be Author: Ike Panhc Date: Fri Mar 14 12:57:32 2025 +0800 MAINTAINERS: Update Ike Panhc's email address I am no longer at Canonical and update with my personal email address. Signed-off-by: Ike Panhc Link: https://lore.kernel.org/r/20250314045732.389973-1-ike.pan@canonical.com Signed-off-by: Ilpo Järvinen .mailmap | 1 + MAINTAINERS | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit ca3ac4bf4dc307cea5781dccccf41c1d14c2f82f Author: Matthew Wilcox (Oracle) Date: Mon Mar 3 18:02:32 2025 +0000 xfs: Use abs_diff instead of XFS_ABSDIFF We have a central definition for this function since 2023, used by a number of different parts of the kernel. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Carlos Maiolino Reviewed-by: Eric Sandeen Signed-off-by: Carlos Maiolino fs/xfs/libxfs/xfs_alloc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 0b4ffbe4888a2c71185eaf5c1a02dd3586a9bc04 Author: Tengda Wu Date: Fri Mar 14 06:53:35 2025 +0000 tracing: Correct the refcount if the hist/hist_debug file fails to open The function event_{hist,hist_debug}_open() maintains the refcount of 'file->tr' and 'file' through tracing_open_file_tr(). However, it does not roll back these counts on subsequent failure paths, resulting in a refcount leak. A very obvious case is that if the hist/hist_debug file belongs to a specific instance, the refcount leak will prevent the deletion of that instance, as it relies on the condition 'tr->ref == 1' within __remove_instance(). Fix this by calling tracing_release_file_tr() on all failure paths in event_{hist,hist_debug}_open() to correct the refcount. Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Zheng Yejian Link: https://lore.kernel.org/20250314065335.1202817-1-wutengda@huaweicloud.com Fixes: 1cc111b9cddc ("tracing: Fix uaf issue when open the hist or hist_debug file") Signed-off-by: Tengda Wu Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events_hist.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 695caca9345a160ecd9645abab8e70cfe849e9ff Merge: 00ddc3f951e2 c72e455b89f2 Author: Linus Torvalds Date: Thu Mar 13 22:52:52 2025 -1000 Merge tag 'leds-fixes-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds Pull LED fix from Lee Jones: - Fix NULL pointer in STMicroelectronics LED1202 LED support * tag 'leds-fixes-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: leds: leds-st1202: Fix NULL pointer access on race condition commit 00ddc3f951e266a7df5fead1cfec69b251ca7d41 Merge: e3a854b577cb d1d77326f585 Author: Linus Torvalds Date: Thu Mar 13 22:45:25 2025 -1000 Merge tag 'drm-fixes-2025-03-14' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Regular weekly fixes pull, the usual leaders in amdgpu/xe, a couple of i915, and some scattered misc fixes. panic: - two clippy fixes dp_mst - locking fix atomic: - fix redundant DPMS calls i915: - Do cdclk post plane programming later - Bump MMAP_GTT_VERSION: missing indication of partial mmaps support xe: - Release guc ids before cancelling work - Fix new warnings around userptr - Temporaritly disable D3Cold on BMG - Retry and wait longer for GuC PC to start - Remove redundant check in xe_vm_create_ioctl amdgpu: - GC 12.x DCC fix - DC DCE 6.x fix - Hibernation fix - HPD fix - Backlight fixes - Color depth fix - UAF fix in hdcp_work - VCE 2.x fix - GC 12.x PTE fix amdkfd: - Queue eviction fix gma500: - fix NULL pointer check" * tag 'drm-fixes-2025-03-14' of https://gitlab.freedesktop.org/drm/kernel: (23 commits) drm/amdgpu: NULL-check BO's backing store when determining GFX12 PTE flags drm/amd/amdkfd: Evict all queues even HWS remove queue failed drm/i915: Increase I915_PARAM_MMAP_GTT_VERSION version to indicate support for partial mmaps drm/dp_mst: Fix locking when skipping CSN before topology probing drm/amdgpu/vce2: fix ip block reference drm/amd/display: Fix slab-use-after-free on hdcp_work drm/amd/display: Assign normalized_pix_clk when color depth = 14 drm/amd/display: Restore correct backlight brightness after a GPU reset drm/amd/display: fix default brightness drm/amd/display: Disable unneeded hpd interrupts during dm_init drm/amd: Keep display off while going into S4 drm/amd/display: fix missing .is_two_pixels_per_container drm/amdgpu/display: Allow DCC for video formats on GFX12 drm/xe: remove redundant check in xe_vm_create_ioctl() drm/atomic: Filter out redundant DPMS calls drm/xe/guc_pc: Retry and wait longer for GuC PC start drm/xe/pm: Temporarily disable D3Cold on BMG drm/i915/cdclk: Do cdclk post plane programming later drm/xe/userptr: Fix an incorrect assert drm/xe: Release guc ids before cancelling work ... commit f2865c6300d75a9f187dd7918d248e010970fd44 Author: Amit Sunil Dhamne Date: Mon Mar 10 19:19:07 2025 -0700 usb: typec: tcpm: fix state transition for SNK_WAIT_CAPABILITIES state in run_state_machine() A subtle error got introduced while manually fixing merge conflict in tcpm.c for commit 85c4efbe6088 ("Merge v6.12-rc6 into usb-next"). As a result of this error, the next state is unconditionally set to SNK_WAIT_CAPABILITIES_TIMEOUT while handling SNK_WAIT_CAPABILITIES state in run_state_machine(...). Fix this by setting new state of TCPM state machine to `upcoming_state` (that is set to different values based on conditions). Cc: stable@vger.kernel.org Fixes: 85c4efbe60888 ("Merge v6.12-rc6 into usb-next") Signed-off-by: Amit Sunil Dhamne Reviewed-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250310-fix-snk-wait-timeout-v6-14-rc6-v1-1-5db14475798f@google.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c44e3d3cdb74c066ece370d66021b9ebff315c9a Merge: ac00bc2aeeac 18e0885bd2ca Author: Greg Kroah-Hartman Date: Fri Mar 14 08:43:39 2025 +0100 Merge tag 'usb-serial-6.14-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.14-rc7 Here are some new modem device ids and a couple of related fixes, and support for Altera USB Blaster 3. All have been in linux-next with no reported issues. * tag 'usb-serial-6.14-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: ftdi_sio: add support for Altera USB Blaster 3 USB: serial: option: fix Telit Cinterion FE990A name USB: serial: option: add Telit Cinterion FE990B compositions USB: serial: option: match on interface class for Telit FN990B commit d1d77326f585ccf1fb388e1bcc18a630e044577f Merge: c8a74954cde6 f5d4e81774c4 Author: Dave Airlie Date: Fri Mar 14 13:42:13 2025 +1000 Merge tag 'drm-xe-fixes-2025-03-13' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes - Release guc ids before cancelling work (Tejas) - Fix new warnings around userptr (Thomas) - Temporaritly disable D3Cold on BMG (Rodrigo) - Retry and wait longer for GuC PC to start (Rodrigo) - Remove redundant check in xe_vm_create_ioctl (Xin) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Z9MJWeIlZPuvXZ_G@intel.com commit c8a74954cde651726e0a2380de3907d0e903f809 Merge: d703575aded2 a8045e46c508 Author: Dave Airlie Date: Fri Mar 14 12:30:43 2025 +1000 Merge tag 'drm-intel-fixes-2025-03-13' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - Do cdclk post plane programming later (Ville) - Bump MMAP_GTT_VERSION: missing indication of partial mmaps support (Jose) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Z9MG4fH-6Q8dTHE1@intel.com commit e3a854b577cb05ceb77c0eba54bfef98a03278fa Merge: 131c040bbb0f 54493279312f Author: Linus Torvalds Date: Thu Mar 13 15:34:26 2025 -1000 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 clk driver fixes for Samsung and Qualcomm clk drivers: - Suspend on Google GS101 crashes when trying to save some clk registers that we shouldn't be saving so we don't do that anymore - The PLL lock time was wrong on the Tesla FSD which could lead to the PLL never locking - Qualcomm's display clk controller on SM8750 was trying to change the frequency of a parent clk for the DSI device when it should have stopped and adjusted the divider. The failure is that the clk frequency was half what was expected, leading to broken display" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: samsung: update PLL locktime for PLL142XX used on FSD platform clk: samsung: gs101: fix synchronous external abort in samsung_clk_save() clk: qcom: dispcc-sm8750: Drop incorrect CLK_SET_RATE_PARENT on byte intf parent commit 131c040bbb0f561ef68ad2ba6fcd28c97fa6d4cf Merge: 4003c9e78778 9c18ea7ffee0 Author: Linus Torvalds Date: Thu Mar 13 15:10:59 2025 -1000 Merge tag 'bcachefs-2025-03-13' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: "Roxana caught an unitialized value that might explain some of the rebalance weirdness we're still tracking down - cool. Otherwise pretty minor" * tag 'bcachefs-2025-03-13' of git://evilpiepirate.org/bcachefs: bcachefs: bch2_get_random_u64_below() bcachefs: target_congested -> get_random_u32_below() bcachefs: fix tiny leak in bch2_dev_add() bcachefs: Make sure trans is unlocked when submitting read IO bcachefs: Initialize from_inode members for bch_io_opts bcachefs: Fix b->written overflow commit d703575aded2cc371bac6e6fa34f3ac8509c75e4 Merge: 385b64321c4e 12d8f318347b Author: Dave Airlie Date: Fri Mar 14 11:09:31 2025 +1000 Merge tag 'drm-misc-fixes-2025-03-13' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes A null pointer check for gma500, two clippy fixes for panic, a fix for an interaction between DPMS and atomic leading to dropped frames, and a locking fix for dp_mst Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20250313-holistic-clay-moose-fead28@houat commit 385b64321c4e6a6313f494a25398f940d0ddca32 Merge: 80e54e84911a 6cc30748e17e Author: Dave Airlie Date: Fri Mar 14 09:17:28 2025 +1000 Merge tag 'amd-drm-fixes-6.14-2025-03-12' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.14-2025-03-12: amdgpu: - GC 12.x DCC fix - DC DCE 6.x fix - Hibernation fix - HPD fix - Backlight fixes - Color depth fix - UAF fix in hdcp_work - VCE 2.x fix - GC 12.x PTE fix amdkfd: - Queue eviction fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20250312190931.216506-1-alexander.deucher@amd.com commit a2ab25529bbcea51b5e01dded79f45aeb94f644a Author: Ajay Kaher Date: Thu Mar 13 17:31:11 2025 +0000 x86/vmware: Parse MP tables for SEV-SNP enabled guests under VMware hypervisors Under VMware hypervisors, SEV-SNP enabled VMs are fundamentally able to boot without UEFI, but this regressed a year ago due to: 0f4a1e80989a ("x86/sev: Skip ROM range scans and validation for SEV-SNP guests") In this case, mpparse_find_mptable() has to be called to parse MP tables which contains the necessary boot information. [ mingo: Updated the changelog. ] Fixes: 0f4a1e80989a ("x86/sev: Skip ROM range scans and validation for SEV-SNP guests") Co-developed-by: Ye Li Signed-off-by: Ye Li Signed-off-by: Ajay Kaher Signed-off-by: Ingo Molnar Tested-by: Ye Li Reviewed-by: Kevin Loughlin Acked-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20250313173111.10918-1-ajay.kaher@broadcom.com arch/x86/kernel/cpu/vmware.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4003c9e78778e93188a09d6043a74f7154449d43 Merge: 8f7617f45009 2409fa66e29a Author: Linus Torvalds Date: Thu Mar 13 07:58:48 2025 -1000 Merge tag 'net-6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from netfilter, bluetooth and wireless. No known regressions outstanding. Current release - regressions: - wifi: nl80211: fix assoc link handling - eth: lan78xx: sanitize return values of register read/write functions Current release - new code bugs: - ethtool: tsinfo: fix dump command - bluetooth: btusb: configure altsetting for HCI_USER_CHANNEL - eth: mlx5: DR, use the right action structs for STEv3 Previous releases - regressions: - netfilter: nf_tables: make destruction work queue pernet - gre: fix IPv6 link-local address generation. - wifi: iwlwifi: fix TSO preparation - bluetooth: revert "bluetooth: hci_core: fix sleeping function called from invalid context" - ovs: revert "openvswitch: switch to per-action label counting in conntrack" - eth: - ice: fix switchdev slow-path in LAG - bonding: fix incorrect MAC address setting to receive NS messages Previous releases - always broken: - core: prevent TX of unreadable skbs - sched: prevent creation of classes with TC_H_ROOT - netfilter: nft_exthdr: fix offset with ipv4_find_option() - wifi: cfg80211: cancel wiphy_work before freeing wiphy - mctp: copy headers if cloned - phy: nxp-c45-tja11xx: add errata for TJA112XA/B - eth: - bnxt: fix kernel panic in the bnxt_get_queue_stats{rx | tx} - mlx5: bridge, fix the crash caused by LAG state check" * tag 'net-6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (65 commits) net: mana: cleanup mana struct after debugfs_remove() net/mlx5e: Prevent bridge link show failure for non-eswitch-allowed devices net/mlx5: Bridge, fix the crash caused by LAG state check net/mlx5: Lag, Check shared fdb before creating MultiPort E-Switch net/mlx5: Fix incorrect IRQ pool usage when releasing IRQs net/mlx5: HWS, Rightsize bwc matcher priority net/mlx5: DR, use the right action structs for STEv3 Revert "openvswitch: switch to per-action label counting in conntrack" net: openvswitch: remove misbehaving actions length check selftests: Add IPv6 link-local address generation tests for GRE devices. gre: Fix IPv6 link-local address generation. netfilter: nft_exthdr: fix offset with ipv4_find_option() selftests/tc-testing: Add a test case for DRR class with TC_H_ROOT net_sched: Prevent creation of classes with TC_H_ROOT ipvs: prevent integer overflow in do_ip_vs_get_ctl() selftests: netfilter: skip br_netfilter queue tests if kernel is tainted netfilter: nf_conncount: Fully initialize struct nf_conncount_tuple in insert_tree() wifi: mac80211: fix MPDU length parsing for EHT 5/6 GHz qlcnic: fix memory leak issues in qlcnic_sriov_common.c rtase: Fix improper release of ring list entries in rtase_sw_reset ... commit 57e9417f69839cb10f7ffca684c38acd28ceb57b Author: Kent Overstreet Date: Sat Mar 8 10:50:08 2025 -0500 dm-flakey: Fix memory corruption in optional corrupt_bio_byte feature Fix memory corruption due to incorrect parameter being passed to bio_init Signed-off-by: Kent Overstreet Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org # v6.5+ Fixes: 1d9a94389853 ("dm flakey: clone pages on write bio before corrupting them") drivers/md/dm-flakey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f7617f4500900f39b604ca724a34a9cfd1fa63a Merge: b7f94fcf5546 986a6f5eacb9 Author: Linus Torvalds Date: Thu Mar 13 07:53:25 2025 -1000 Merge tag 'vfs-6.14-rc7.fixes' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: - Bring in an RCU pathwalk fix for afs. This is brought in as a merge from the vfs-6.15.shared.afs branch that needs this commit and other trees already depend on it. - Fix vboxfs unterminated string handling. * tag 'vfs-6.14-rc7.fixes' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs: vboxsf: Add __nonstring annotations for unterminated strings afs: Fix afs_atcell_get_link() to handle RCU pathwalk commit 9c18ea7ffee090b47afaa7dc41903fb1b436d7bd Author: Kent Overstreet Date: Thu Mar 13 11:16:28 2025 -0400 bcachefs: bch2_get_random_u64_below() steal the (clever) algorithm from get_random_u32_below() this fixes a bug where we were passing roundup_pow_of_two() a 64 bit number - we're squaring device latencies now: [ +1.681698] ------------[ cut here ]------------ [ +0.000010] UBSAN: shift-out-of-bounds in ./include/linux/log2.h:57:13 [ +0.000011] shift exponent 64 is too large for 64-bit type 'long unsigned int' [ +0.000011] CPU: 1 UID: 0 PID: 196 Comm: kworker/u32:13 Not tainted 6.14.0-rc6-dave+ #10 [ +0.000012] Hardware name: ASUS System Product Name/PRIME B460I-PLUS, BIOS 1301 07/13/2021 [ +0.000005] Workqueue: events_unbound __bch2_read_endio [bcachefs] [ +0.000354] Call Trace: [ +0.000005] [ +0.000007] dump_stack_lvl+0x5d/0x80 [ +0.000018] ubsan_epilogue+0x5/0x30 [ +0.000008] __ubsan_handle_shift_out_of_bounds.cold+0x61/0xe6 [ +0.000011] bch2_rand_range.cold+0x17/0x20 [bcachefs] [ +0.000231] bch2_bkey_pick_read_device+0x547/0x920 [bcachefs] [ +0.000229] __bch2_read_extent+0x1e4/0x18e0 [bcachefs] [ +0.000241] ? bch2_btree_iter_peek_slot+0x3df/0x800 [bcachefs] [ +0.000180] ? bch2_read_retry_nodecode+0x270/0x330 [bcachefs] [ +0.000230] bch2_read_retry_nodecode+0x270/0x330 [bcachefs] [ +0.000230] bch2_rbio_retry+0x1fa/0x600 [bcachefs] [ +0.000224] ? bch2_printbuf_make_room+0x71/0xb0 [bcachefs] [ +0.000243] ? bch2_read_csum_err+0x4a4/0x610 [bcachefs] [ +0.000278] bch2_read_csum_err+0x4a4/0x610 [bcachefs] [ +0.000227] ? __bch2_read_endio+0x58b/0x870 [bcachefs] [ +0.000220] __bch2_read_endio+0x58b/0x870 [bcachefs] [ +0.000268] ? try_to_wake_up+0x31c/0x7f0 [ +0.000011] ? process_one_work+0x176/0x330 [ +0.000008] process_one_work+0x176/0x330 [ +0.000008] worker_thread+0x252/0x390 [ +0.000008] ? __pfx_worker_thread+0x10/0x10 [ +0.000006] kthread+0xec/0x230 [ +0.000011] ? __pfx_kthread+0x10/0x10 [ +0.000009] ret_from_fork+0x31/0x50 [ +0.000009] ? __pfx_kthread+0x10/0x10 [ +0.000008] ret_from_fork_asm+0x1a/0x30 [ +0.000012] [ +0.000046] ---[ end trace ]--- Reported-by: Roland Vet Signed-off-by: Kent Overstreet fs/bcachefs/extents.c | 2 +- fs/bcachefs/util.c | 23 ++++++++++++++--------- fs/bcachefs/util.h | 2 +- 3 files changed, 16 insertions(+), 11 deletions(-) commit 69a5a13a22b1def29dce62b5b7c86e6098c20c68 Author: Kent Overstreet Date: Thu Mar 13 09:56:07 2025 -0400 bcachefs: target_congested -> get_random_u32_below() get_random_u32_below() has a better algorithm than bch2_rand_range(), it just didn't exist at the time. Signed-off-by: Kent Overstreet fs/bcachefs/io_read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9381351dd6c52bf465233cae5f50da227834607 Merge: 9bce6b5f8987 39393f5c5c79 Author: Jens Axboe Date: Thu Mar 13 09:41:57 2025 -0600 Merge tag 'nvme-6.14-2025-03-13' of git://git.infradead.org/nvme into block-6.14 Pull NVMe fixes from Keith: "nvme fixes for Linux 6.14 - Concurrent pci error and hotplug handling fix (Keith) - Endpoint function fixes (Damien)" * tag 'nvme-6.14-2025-03-13' of git://git.infradead.org/nvme: nvmet: pci-epf: Do not add an IRQ vector if not needed nvmet: pci-epf: Set NVMET_PCI_EPF_Q_LIVE when a queue is fully created nvme-pci: fix stuck reset on concurrent DPC and HP commit 252256e416deb255607f0c4a69e7cfec079e5d61 Author: Amir Goldstein Date: Wed Mar 12 08:38:52 2025 +0100 Revert "fanotify: disable readahead if we have pre-content watches" This reverts commit fac84846a28c0950d4433118b3dffd44306df62d. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara Link: https://patch.msgid.link/20250312073852.2123409-7-amir73il@gmail.com mm/filemap.c | 12 ------------ mm/readahead.c | 14 -------------- 2 files changed, 26 deletions(-) commit 4f4dc3a9378bc2e6bcf331ee9e65a21abf67e7e0 Author: Amir Goldstein Date: Wed Mar 12 08:38:51 2025 +0100 Revert "mm: don't allow huge faults for files with pre content watches" This reverts commit 20bf82a898b65c129af76deb96a1b415d3098a28. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara Link: https://patch.msgid.link/20250312073852.2123409-6-amir73il@gmail.com mm/memory.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 955fbe0ef19df4197595a98d0906c94025c4beef Author: Amir Goldstein Date: Wed Mar 12 08:38:50 2025 +0100 Revert "fsnotify: generate pre-content permission event on page fault" This reverts commit 8392bc2ff8c8bf7c4c5e6dfa71ccd893a3c046f6. In the use case of buffered write whose input buffer is mmapped file on a filesystem with a pre-content mark, the prefaulting of the buffer can happen under the filesystem freeze protection (obtained in vfs_write()) which breaks assumptions of pre-content hook and introduces potential deadlock of HSM handler in userspace with filesystem freezing. Now that we have pre-content hooks at file mmap() time, disable the pre-content event hooks on page fault to avoid the potential deadlock. Reported-by: syzbot+7229071b47908b19d5b7@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-fsdevel/7ehxrhbvehlrjwvrduoxsao5k3x4aw275patsb3krkwuq573yv@o2hskrfawbnc/ Fixes: 8392bc2ff8c8 ("fsnotify: generate pre-content permission event on page fault") Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara Link: https://patch.msgid.link/20250312073852.2123409-5-amir73il@gmail.com include/linux/mm.h | 1 - mm/filemap.c | 74 ------------------------------------------------------ mm/nommu.c | 7 ------ 3 files changed, 82 deletions(-) commit 27773ce1776279ed3220a34d2e6bfcecaee7fc66 Author: Amir Goldstein Date: Wed Mar 12 08:38:49 2025 +0100 Revert "xfs: add pre-content fsnotify hook for DAX faults" This reverts commit 7f4796a46571ced5d3d5b0942e1bfea1eedaaecd. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara Link: https://patch.msgid.link/20250312073852.2123409-4-amir73il@gmail.com fs/xfs/xfs_file.c | 13 ------------- 1 file changed, 13 deletions(-) commit bc71aab4513f7fecd23c051703ef5adea2230a54 Author: Amir Goldstein Date: Wed Mar 12 08:38:48 2025 +0100 Revert "ext4: add pre-content fsnotify hook for DAX faults" This reverts commit bb480760ffc7018e21ee6f60241c2b99ff26ee0e. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara Link: https://patch.msgid.link/20250312073852.2123409-3-amir73il@gmail.com fs/ext4/file.c | 3 --- 1 file changed, 3 deletions(-) commit 2409fa66e29a2c09f26ad320735fbdfbb74420da Merge: 3e64bb2ae7d9 6edd78af9506 Author: Paolo Abeni Date: Thu Mar 13 15:04:26 2025 +0100 Merge tag 'nf-25-03-13' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS fixes for net The following patchset contains Netfilter/IPVS fixes for net: 1) Missing initialization of cpu and jiffies32 fields in conncount, from Kohei Enju. 2) Skip several tests in case kernel is tainted, otherwise tests bogusly report failure too as they also check for tainted kernel, from Florian Westphal. 3) Fix a hyphothetical integer overflow in do_ip_vs_get_ctl() leading to bogus error logs, from Dan Carpenter. 4) Fix incorrect offset in ipv4 option match in nft_exthdr, from Alexey Kashavkin. netfilter pull request 25-03-13 * tag 'nf-25-03-13' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nft_exthdr: fix offset with ipv4_find_option() ipvs: prevent integer overflow in do_ip_vs_get_ctl() selftests: netfilter: skip br_netfilter queue tests if kernel is tainted netfilter: nf_conncount: Fully initialize struct nf_conncount_tuple in insert_tree() ==================== Link: https://patch.msgid.link/20250313095636.2186-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 605b249ea96770ac4fac4b8510a99e0f8442be5e Author: Henrique Carvalho Date: Tue Mar 11 15:23:59 2025 -0300 smb: client: Fix match_session bug preventing session reuse Fix a bug in match_session() that can causes the session to not be reused in some cases. Reproduction steps: mount.cifs //server/share /mnt/a -o credentials=creds mount.cifs //server/share /mnt/b -o credentials=creds,sec=ntlmssp cat /proc/fs/cifs/DebugData | grep SessionId | wc -l mount.cifs //server/share /mnt/b -o credentials=creds,sec=ntlmssp mount.cifs //server/share /mnt/a -o credentials=creds cat /proc/fs/cifs/DebugData | grep SessionId | wc -l Cc: stable@vger.kernel.org Reviewed-by: Enzo Matsumiya Signed-off-by: Henrique Carvalho Signed-off-by: Steve French fs/smb/client/connect.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit d5a30fddfe2f2e540f6c43b59cf701809995faef Author: Murad Masimov Date: Tue Mar 11 17:22:06 2025 +0300 cifs: Fix integer overflow while processing closetimeo mount option User-provided mount parameter closetimeo of type u32 is intended to have an upper limit, but before it is validated, the value is converted from seconds to jiffies which can lead to an integer overflow. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 5efdd9122eff ("smb3: allow deferred close timeout to be configurable") Signed-off-by: Murad Masimov Signed-off-by: Steve French fs/smb/client/fs_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 64f690ee22c99e16084e0e45181b2a1eed2fa149 Author: Murad Masimov Date: Tue Mar 11 17:22:05 2025 +0300 cifs: Fix integer overflow while processing actimeo mount option User-provided mount parameter actimeo of type u32 is intended to have an upper limit, but before it is validated, the value is converted from seconds to jiffies which can lead to an integer overflow. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 6d20e8406f09 ("cifs: add attribute cache timeout (actimeo) tunable") Signed-off-by: Murad Masimov Signed-off-by: Steve French fs/smb/client/fs_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b29891f91dfb8758baf1e2217bef4b16b2b165b Author: Murad Masimov Date: Tue Mar 11 17:22:04 2025 +0300 cifs: Fix integer overflow while processing acdirmax mount option User-provided mount parameter acdirmax of type u32 is intended to have an upper limit, but before it is validated, the value is converted from seconds to jiffies which can lead to an integer overflow. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 4c9f948142a5 ("cifs: Add new mount parameter "acdirmax" to allow caching directory metadata") Signed-off-by: Murad Masimov Signed-off-by: Steve French fs/smb/client/fs_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7489161b1852390b4413d57f2457cd40b34da6cc Author: Murad Masimov Date: Tue Mar 11 17:22:03 2025 +0300 cifs: Fix integer overflow while processing acregmax mount option User-provided mount parameter acregmax of type u32 is intended to have an upper limit, but before it is validated, the value is converted from seconds to jiffies which can lead to an integer overflow. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 5780464614f6 ("cifs: Add new parameter "acregmax" for distinct file and directory metadata timeout") Signed-off-by: Murad Masimov Signed-off-by: Steve French fs/smb/client/fs_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fc99045effa81fdf509c2a97cbb7e6e8f2fd4443 Author: Paulo Alcantara Date: Wed Mar 12 10:51:31 2025 -0300 smb: client: fix regression with guest option When mounting a CIFS share with 'guest' mount option, mount.cifs(8) will set empty password= and password2= options. Currently we only handle empty strings from user= and password= options, so the mount will fail with cifs: Bad value for 'password2' Fix this by handling empty string from password2= option as well. Link: https://bbs.archlinux.org/viewtopic.php?id=303927 Reported-by: Adam Williamson Closes: https://lore.kernel.org/r/83c00b5fea81c07f6897a5dd3ef50fd3b290f56c.camel@redhat.com Fixes: 35f834265e0d ("smb3: fix broken reconnect when password changing on the server by allowing password rotation") Cc: stable@vger.kernel.org Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/fs_context.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4490fe973669360efaef7350aeb9706f70164176 Author: Mario Limonciello Date: Wed Mar 5 21:44:02 2025 -0600 platform/x86/amd: pmf: Fix missing hidden options for Smart PC amd_pmf_get_slider_info() checks the current profile to report correct value to the TA inputs. If hidden options are in use then the wrong values will be reported to TA. Add the two compat options PLATFORM_PROFILE_BALANCED_PERFORMANCE and PLATFORM_PROFILE_QUIET for this use. Reported-by: Yijun Shen Fixes: 9a43102daf64d ("platform/x86/amd: pmf: Add balanced-performance to hidden choices") Fixes: 44e94fece5170 ("platform/x86/amd: pmf: Add 'quiet' to hidden choices") Signed-off-by: Mario Limonciello Acked-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20250306034402.50478-1-superm1@kernel.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/amd/pmf/spc.c | 2 ++ 1 file changed, 2 insertions(+) commit 3e64bb2ae7d9f2b3a8259d4d6b86ed1984d5460a Author: Shradha Gupta Date: Tue Mar 11 03:17:40 2025 -0700 net: mana: cleanup mana struct after debugfs_remove() When on a MANA VM hibernation is triggered, as part of hibernate_snapshot(), mana_gd_suspend() and mana_gd_resume() are called. If during this mana_gd_resume(), a failure occurs with HWC creation, mana_port_debugfs pointer does not get reinitialized and ends up pointing to older, cleaned-up dentry. Further in the hibernation path, as part of power_down(), mana_gd_shutdown() is triggered. This call, unaware of the failures in resume, tries to cleanup the already cleaned up mana_port_debugfs value and hits the following bug: [ 191.359296] mana 7870:00:00.0: Shutdown was called [ 191.359918] BUG: kernel NULL pointer dereference, address: 0000000000000098 [ 191.360584] #PF: supervisor write access in kernel mode [ 191.361125] #PF: error_code(0x0002) - not-present page [ 191.361727] PGD 1080ea067 P4D 0 [ 191.362172] Oops: Oops: 0002 [#1] SMP NOPTI [ 191.362606] CPU: 11 UID: 0 PID: 1674 Comm: bash Not tainted 6.14.0-rc5+ #2 [ 191.363292] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.1 11/21/2024 [ 191.364124] RIP: 0010:down_write+0x19/0x50 [ 191.364537] Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 55 48 89 e5 53 48 89 fb e8 de cd ff ff 31 c0 ba 01 00 00 00 48 0f b1 13 75 16 65 48 8b 05 88 24 4c 6a 48 89 43 08 48 8b 5d [ 191.365867] RSP: 0000:ff45fbe0c1c037b8 EFLAGS: 00010246 [ 191.366350] RAX: 0000000000000000 RBX: 0000000000000098 RCX: ffffff8100000000 [ 191.366951] RDX: 0000000000000001 RSI: 0000000000000064 RDI: 0000000000000098 [ 191.367600] RBP: ff45fbe0c1c037c0 R08: 0000000000000000 R09: 0000000000000001 [ 191.368225] R10: ff45fbe0d2b01000 R11: 0000000000000008 R12: 0000000000000000 [ 191.368874] R13: 000000000000000b R14: ff43dc27509d67c0 R15: 0000000000000020 [ 191.369549] FS: 00007dbc5001e740(0000) GS:ff43dc663f380000(0000) knlGS:0000000000000000 [ 191.370213] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 191.370830] CR2: 0000000000000098 CR3: 0000000168e8e002 CR4: 0000000000b73ef0 [ 191.371557] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 191.372192] DR3: 0000000000000000 DR6: 00000000fffe07f0 DR7: 0000000000000400 [ 191.372906] Call Trace: [ 191.373262] [ 191.373621] ? show_regs+0x64/0x70 [ 191.374040] ? __die+0x24/0x70 [ 191.374468] ? page_fault_oops+0x290/0x5b0 [ 191.374875] ? do_user_addr_fault+0x448/0x800 [ 191.375357] ? exc_page_fault+0x7a/0x160 [ 191.375971] ? asm_exc_page_fault+0x27/0x30 [ 191.376416] ? down_write+0x19/0x50 [ 191.376832] ? down_write+0x12/0x50 [ 191.377232] simple_recursive_removal+0x4a/0x2a0 [ 191.377679] ? __pfx_remove_one+0x10/0x10 [ 191.378088] debugfs_remove+0x44/0x70 [ 191.378530] mana_detach+0x17c/0x4f0 [ 191.378950] ? __flush_work+0x1e2/0x3b0 [ 191.379362] ? __cond_resched+0x1a/0x50 [ 191.379787] mana_remove+0xf2/0x1a0 [ 191.380193] mana_gd_shutdown+0x3b/0x70 [ 191.380642] pci_device_shutdown+0x3a/0x80 [ 191.381063] device_shutdown+0x13e/0x230 [ 191.381480] kernel_power_off+0x35/0x80 [ 191.381890] hibernate+0x3c6/0x470 [ 191.382312] state_store+0xcb/0xd0 [ 191.382734] kobj_attr_store+0x12/0x30 [ 191.383211] sysfs_kf_write+0x3e/0x50 [ 191.383640] kernfs_fop_write_iter+0x140/0x1d0 [ 191.384106] vfs_write+0x271/0x440 [ 191.384521] ksys_write+0x72/0xf0 [ 191.384924] __x64_sys_write+0x19/0x20 [ 191.385313] x64_sys_call+0x2b0/0x20b0 [ 191.385736] do_syscall_64+0x79/0x150 [ 191.386146] ? __mod_memcg_lruvec_state+0xe7/0x240 [ 191.386676] ? __lruvec_stat_mod_folio+0x79/0xb0 [ 191.387124] ? __pfx_lru_add+0x10/0x10 [ 191.387515] ? queued_spin_unlock+0x9/0x10 [ 191.387937] ? do_anonymous_page+0x33c/0xa00 [ 191.388374] ? __handle_mm_fault+0xcf3/0x1210 [ 191.388805] ? __count_memcg_events+0xbe/0x180 [ 191.389235] ? handle_mm_fault+0xae/0x300 [ 191.389588] ? do_user_addr_fault+0x559/0x800 [ 191.390027] ? irqentry_exit_to_user_mode+0x43/0x230 [ 191.390525] ? irqentry_exit+0x1d/0x30 [ 191.390879] ? exc_page_fault+0x86/0x160 [ 191.391235] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 191.391745] RIP: 0033:0x7dbc4ff1c574 [ 191.392111] Code: c7 00 16 00 00 00 b8 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 80 3d d5 ea 0e 00 00 74 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 55 48 89 e5 48 83 ec 20 48 89 [ 191.393412] RSP: 002b:00007ffd95a23ab8 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 [ 191.393990] RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007dbc4ff1c574 [ 191.394594] RDX: 0000000000000005 RSI: 00005a6eeadb0ce0 RDI: 0000000000000001 [ 191.395215] RBP: 00007ffd95a23ae0 R08: 00007dbc50003b20 R09: 0000000000000000 [ 191.395805] R10: 0000000000000001 R11: 0000000000000202 R12: 0000000000000005 [ 191.396404] R13: 00005a6eeadb0ce0 R14: 00007dbc500045c0 R15: 00007dbc50001ee0 [ 191.396987] To fix this, we explicitly set such mana debugfs variables to NULL after debugfs_remove() is called. Fixes: 6607c17c6c5e ("net: mana: Enable debugfs files for MANA device") Cc: stable@vger.kernel.org Signed-off-by: Shradha Gupta Reviewed-by: Haiyang Zhang Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/1741688260-28922-1-git-send-email-shradhagupta@linux.microsoft.com Signed-off-by: Paolo Abeni drivers/net/ethernet/microsoft/mana/gdma_main.c | 11 ++++++++++- drivers/net/ethernet/microsoft/mana/mana_en.c | 10 ++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) commit e1af35d666170f2f855afee1dc3f4966d566dff8 Merge: 1063ae07383c e92df790d07a Author: Paolo Abeni Date: Thu Mar 13 13:11:18 2025 +0100 Merge branch 'mlx5-misc-fixes-2025-03-10' Tariq Toukan says: ==================== mlx5 misc fixes 2025-03-10 This patchset provides misc bug fixes from the team to the mlx5 core and Eth drivers. ==================== Link: https://patch.msgid.link/1741644104-97767-1-git-send-email-tariqt@nvidia.com Signed-off-by: Paolo Abeni commit e92df790d07a8eea873efcb84776e7b71f81c7d5 Author: Carolina Jubran Date: Tue Mar 11 00:01:44 2025 +0200 net/mlx5e: Prevent bridge link show failure for non-eswitch-allowed devices mlx5_eswitch_get_vepa returns -EPERM if the device lacks eswitch_manager capability, blocking mlx5e_bridge_getlink from retrieving VEPA mode. Since mlx5e_bridge_getlink implements ndo_bridge_getlink, returning -EPERM causes bridge link show to fail instead of skipping devices without this capability. To avoid this, return -EOPNOTSUPP from mlx5e_bridge_getlink when mlx5_eswitch_get_vepa fails, ensuring the command continues processing other devices while ignoring those without the necessary capability. Fixes: 4b89251de024 ("net/mlx5: Support ndo bridge_setlink and getlink") Signed-off-by: Carolina Jubran Reviewed-by: Jianbo Liu Signed-off-by: Tariq Toukan Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/1741644104-97767-7-git-send-email-tariqt@nvidia.com Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4b8eeed4fb105770ce6dc84a2c6ef953c7b71cbb Author: Jianbo Liu Date: Tue Mar 11 00:01:43 2025 +0200 net/mlx5: Bridge, fix the crash caused by LAG state check When removing LAG device from bridge, NETDEV_CHANGEUPPER event is triggered. Driver finds the lower devices (PFs) to flush all the offloaded entries. And mlx5_lag_is_shared_fdb is checked, it returns false if one of PF is unloaded. In such case, mlx5_esw_bridge_lag_rep_get() and its caller return NULL, instead of the alive PF, and the flush is skipped. Besides, the bridge fdb entry's lastuse is updated in mlx5 bridge event handler. But this SWITCHDEV_FDB_ADD_TO_BRIDGE event can be ignored in this case because the upper interface for bond is deleted, and the entry will never be aged because lastuse is never updated. To make things worse, as the entry is alive, mlx5 bridge workqueue keeps sending that event, which is then handled by kernel bridge notifier. It causes the following crash when accessing the passed bond netdev which is already destroyed. To fix this issue, remove such checks. LAG state is already checked in commit 15f8f168952f ("net/mlx5: Bridge, verify LAG state when adding bond to bridge"), driver still need to skip offload if LAG becomes invalid state after initialization. Oops: stack segment: 0000 [#1] SMP CPU: 3 UID: 0 PID: 23695 Comm: kworker/u40:3 Tainted: G OE 6.11.0_mlnx #1 Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Workqueue: mlx5_bridge_wq mlx5_esw_bridge_update_work [mlx5_core] RIP: 0010:br_switchdev_event+0x2c/0x110 [bridge] Code: 44 00 00 48 8b 02 48 f7 00 00 02 00 00 74 69 41 54 55 53 48 83 ec 08 48 8b a8 08 01 00 00 48 85 ed 74 4a 48 83 fe 02 48 89 d3 <4c> 8b 65 00 74 23 76 49 48 83 fe 05 74 7e 48 83 fe 06 75 2f 0f b7 RSP: 0018:ffffc900092cfda0 EFLAGS: 00010297 RAX: ffff888123bfe000 RBX: ffffc900092cfe08 RCX: 00000000ffffffff RDX: ffffc900092cfe08 RSI: 0000000000000001 RDI: ffffffffa0c585f0 RBP: 6669746f6e690a30 R08: 0000000000000000 R09: ffff888123ae92c8 R10: 0000000000000000 R11: fefefefefefefeff R12: ffff888123ae9c60 R13: 0000000000000001 R14: ffffc900092cfe08 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88852c980000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f15914c8734 CR3: 0000000002830005 CR4: 0000000000770ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: ? __die_body+0x1a/0x60 ? die+0x38/0x60 ? do_trap+0x10b/0x120 ? do_error_trap+0x64/0xa0 ? exc_stack_segment+0x33/0x50 ? asm_exc_stack_segment+0x22/0x30 ? br_switchdev_event+0x2c/0x110 [bridge] ? sched_balance_newidle.isra.149+0x248/0x390 notifier_call_chain+0x4b/0xa0 atomic_notifier_call_chain+0x16/0x20 mlx5_esw_bridge_update+0xec/0x170 [mlx5_core] mlx5_esw_bridge_update_work+0x19/0x40 [mlx5_core] process_scheduled_works+0x81/0x390 worker_thread+0x106/0x250 ? bh_worker+0x110/0x110 kthread+0xb7/0xe0 ? kthread_park+0x80/0x80 ret_from_fork+0x2d/0x50 ? kthread_park+0x80/0x80 ret_from_fork_asm+0x11/0x20 Fixes: ff9b7521468b ("net/mlx5: Bridge, support LAG") Signed-off-by: Jianbo Liu Reviewed-by: Vlad Buslov Signed-off-by: Tariq Toukan Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/1741644104-97767-6-git-send-email-tariqt@nvidia.com Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 32966984bee1defd9f5a8f9be274d7c32f911ba1 Author: Shay Drory Date: Tue Mar 11 00:01:42 2025 +0200 net/mlx5: Lag, Check shared fdb before creating MultiPort E-Switch Currently, MultiPort E-Switch is requesting to create a LAG with shared FDB without checking the LAG is supporting shared FDB. Add the check. Fixes: a32327a3a02c ("net/mlx5: Lag, Control MultiPort E-Switch single FDB mode") Signed-off-by: Shay Drory Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/1741644104-97767-5-git-send-email-tariqt@nvidia.com Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) commit 32d2724db5b2361ab293427ccd5c24f4f2bcca14 Author: Shay Drory Date: Tue Mar 11 00:01:41 2025 +0200 net/mlx5: Fix incorrect IRQ pool usage when releasing IRQs mlx5_irq_pool_get() is a getter for completion IRQ pool only. However, after the cited commit, mlx5_irq_pool_get() is called during ctrl IRQ release flow to retrieve the pool, resulting in the use of an incorrect IRQ pool. Hence, use the newly introduced mlx5_irq_get_pool() getter to retrieve the correct IRQ pool based on the IRQ itself. While at it, rename mlx5_irq_pool_get() to mlx5_irq_table_get_comp_irq_pool() which accurately reflects its purpose and improves code readability. Fixes: 0477d5168bbb ("net/mlx5: Expose SFs IRQs") Signed-off-by: Shay Drory Reviewed-by: Maher Sanalla Signed-off-by: Tariq Toukan Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/1741644104-97767-4-git-send-email-tariqt@nvidia.com Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlx5/core/eq.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/mlx5_irq.h | 4 +++- drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c | 13 ++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/pci_irq.h | 2 +- 5 files changed, 16 insertions(+), 7 deletions(-) commit 521992337f67f71ce4436b98bc32563ddb1a5ce3 Author: Vlad Dogaru Date: Tue Mar 11 00:01:40 2025 +0200 net/mlx5: HWS, Rightsize bwc matcher priority The bwc layer was clamping the matcher priority from 32 bits to 16 bits. This didn't show up until a matcher was resized, since the initial native matcher was created using the correct 32 bit value. The fix also reorders fields to avoid some padding. 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 Link: https://patch.msgid.link/1741644104-97767-3-git-send-email-tariqt@nvidia.com Signed-off-by: Paolo Abeni drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03ebae19925519cca5b314443c6082e0aeaa6321 Author: Yevgeny Kliteynik Date: Tue Mar 11 00:01:39 2025 +0200 net/mlx5: DR, use the right action structs for STEv3 Some actions in ConnectX-8 (STEv3) have different structure, and they are handled separately in ste_ctx_v3. This separate handling was missing two actions: INSERT_HDR and REMOVE_HDR, which broke SWS for Linux Bridge. This patch resolves the issue by introducing dedicated callbacks for the insert and remove header functions, with version-specific implementations for each STE variant. Fixes: 4d617b57574f ("net/mlx5: DR, add support for ConnectX-8 steering") Signed-off-by: Yevgeny Kliteynik Reviewed-by: Itamar Gozlan Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/1741644104-97767-2-git-send-email-tariqt@nvidia.com Signed-off-by: Paolo Abeni .../mellanox/mlx5/core/steering/sws/dr_ste.h | 4 ++ .../mellanox/mlx5/core/steering/sws/dr_ste_v1.c | 52 +++++++++++----------- .../mellanox/mlx5/core/steering/sws/dr_ste_v1.h | 4 ++ .../mellanox/mlx5/core/steering/sws/dr_ste_v2.c | 2 + .../mellanox/mlx5/core/steering/sws/dr_ste_v3.c | 42 +++++++++++++++++ 5 files changed, 79 insertions(+), 25 deletions(-) commit 1063ae07383c0ddc5bcce170260c143825846b03 Author: Xin Long Date: Sat Mar 8 13:05:43 2025 -0500 Revert "openvswitch: switch to per-action label counting in conntrack" Currently, ovs_ct_set_labels() is only called for confirmed conntrack entries (ct) within ovs_ct_commit(). However, if the conntrack entry does not have the labels_ext extension, attempting to allocate it in ovs_ct_get_conn_labels() for a confirmed entry triggers a warning in nf_ct_ext_add(): WARN_ON(nf_ct_is_confirmed(ct)); This happens when the conntrack entry is created externally before OVS increments net->ct.labels_used. The issue has become more likely since commit fcb1aa5163b1 ("openvswitch: switch to per-action label counting in conntrack"), which changed to use per-action label counting and increment net->ct.labels_used when a flow with ct action is added. Since there’s no straightforward way to fully resolve this issue at the moment, this reverts the commit to avoid breaking existing use cases. Fixes: fcb1aa5163b1 ("openvswitch: switch to per-action label counting in conntrack") Reported-by: Jianbo Liu Signed-off-by: Xin Long Acked-by: Aaron Conole Link: https://patch.msgid.link/1bdeb2f3a812bca016a225d3de714427b2cd4772.1741457143.git.lucien.xin@gmail.com Signed-off-by: Paolo Abeni net/openvswitch/conntrack.c | 30 ++++++++++++++++++------------ net/openvswitch/datapath.h | 3 +++ 2 files changed, 21 insertions(+), 12 deletions(-) commit a1e64addf3ff9257b45b78bc7d743781c3f41340 Author: Ilya Maximets Date: Sat Mar 8 01:45:59 2025 +0100 net: openvswitch: remove misbehaving actions length check The actions length check is unreliable and produces different results depending on the initial length of the provided netlink attribute and the composition of the actual actions inside of it. For example, a user can add 4088 empty clone() actions without triggering -EMSGSIZE, on attempt to add 4089 such actions the operation will fail with the -EMSGSIZE verdict. However, if another 16 KB of other actions will be *appended* to the previous 4089 clone() actions, the check passes and the flow is successfully installed into the openvswitch datapath. The reason for a such a weird behavior is the way memory is allocated. When ovs_flow_cmd_new() is invoked, it calls ovs_nla_copy_actions(), that in turn calls nla_alloc_flow_actions() with either the actual length of the user-provided actions or the MAX_ACTIONS_BUFSIZE. The function adds the size of the sw_flow_actions structure and then the actually allocated memory is rounded up to the closest power of two. So, if the user-provided actions are larger than MAX_ACTIONS_BUFSIZE, then MAX_ACTIONS_BUFSIZE + sizeof(*sfa) rounded up is 32K + 24 -> 64K. Later, while copying individual actions, we look at ksize(), which is 64K, so this way the MAX_ACTIONS_BUFSIZE check is not actually triggered and the user can easily allocate almost 64 KB of actions. However, when the initial size is less than MAX_ACTIONS_BUFSIZE, but the actions contain ones that require size increase while copying (such as clone() or sample()), then the limit check will be performed during the reserve_sfa_size() and the user will not be allowed to create actions that yield more than 32 KB internally. This is one part of the problem. The other part is that it's not actually possible for the userspace application to know beforehand if the particular set of actions will be rejected or not. Certain actions require more space in the internal representation, e.g. an empty clone() takes 4 bytes in the action list passed in by the user, but it takes 12 bytes in the internal representation due to an extra nested attribute, and some actions require less space in the internal representations, e.g. set(tunnel(..)) normally takes 64+ bytes in the action list provided by the user, but only needs to store a single pointer in the internal implementation, since all the data is stored in the tunnel_info structure instead. And the action size limit is applied to the internal representation, not to the action list passed by the user. So, it's not possible for the userpsace application to predict if the certain combination of actions will be rejected or not, because it is not possible for it to calculate how much space these actions will take in the internal representation without knowing kernel internals. All that is causing random failures in ovs-vswitchd in userspace and inability to handle certain traffic patterns as a result. For example, it is reported that adding a bit more than a 1100 VMs in an OpenStack setup breaks the network due to OVS not being able to handle ARP traffic anymore in some cases (it tries to install a proper datapath flow, but the kernel rejects it with -EMSGSIZE, even though the action list isn't actually that large.) Kernel behavior must be consistent and predictable in order for the userspace application to use it in a reasonable way. ovs-vswitchd has a mechanism to re-direct parts of the traffic and partially handle it in userspace if the required action list is oversized, but that doesn't work properly if we can't actually tell if the action list is oversized or not. Solution for this is to check the size of the user-provided actions instead of the internal representation. This commit just removes the check from the internal part because there is already an implicit size check imposed by the netlink protocol. The attribute can't be larger than 64 KB. Realistically, we could reduce the limit to 32 KB, but we'll be risking to break some existing setups that rely on the fact that it's possible to create nearly 64 KB action lists today. Vast majority of flows in real setups are below 100-ish bytes. So removal of the limit will not change real memory consumption on the system. The absolutely worst case scenario is if someone adds a flow with 64 KB of empty clone() actions. That will yield a 192 KB in the internal representation consuming 256 KB block of memory. However, that list of actions is not meaningful and also a no-op. Real world very large action lists (that can occur for a rare cases of BUM traffic handling) are unlikely to contain a large number of clones and will likely have a lot of tunnel attributes making the internal representation comparable in size to the original action list. So, it should be fine to just remove the limit. Commit in the 'Fixes' tag is the first one that introduced the difference between internal representation and the user-provided action lists, but there were many more afterwards that lead to the situation we have today. Fixes: 7d5437c709de ("openvswitch: Add tunneling interface.") Signed-off-by: Ilya Maximets Reviewed-by: Aaron Conole Link: https://patch.msgid.link/20250308004609.2881861-1-i.maximets@ovn.org Signed-off-by: Paolo Abeni net/openvswitch/flow_netlink.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit b3fc5927de4b24c3c0f3206dd1e26f9fa0eecdc6 Merge: 83d2fe6b193c 6f50175ccad4 Author: Paolo Abeni Date: Thu Mar 13 10:17:46 2025 +0100 Merge branch 'gre-fix-regressions-in-ipv6-link-local-address-generation' Guillaume Nault says: ==================== gre: Fix regressions in IPv6 link-local address generation. IPv6 link-local address generation has some special cases for GRE devices. This has led to several regressions in the past, and some of them are still not fixed. This series fixes the remaining problems, like the ipv6.conf..addr_gen_mode sysctl being ignored and the router discovery process not being started (see details in patch 1). To avoid any further regressions, patch 2 adds selftests covering IPv4 and IPv6 gre/gretap devices with all combinations of currently supported addr_gen_mode values. ==================== Link: https://patch.msgid.link/cover.1741375285.git.gnault@redhat.com Signed-off-by: Paolo Abeni commit 6f50175ccad4278ed3a9394c00b797b75441bd6e Author: Guillaume Nault Date: Fri Mar 7 20:28:58 2025 +0100 selftests: Add IPv6 link-local address generation tests for GRE devices. GRE devices have their special code for IPv6 link-local address generation that has been the source of several regressions in the past. Add selftest to check that all gre, ip6gre, gretap and ip6gretap get an IPv6 link-link local address in accordance with the net.ipv6.conf..addr_gen_mode sysctl. Signed-off-by: Guillaume Nault Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Reviewed-by: Petr Machata Link: https://patch.msgid.link/2d6772af8e1da9016b2180ec3f8d9ee99f470c77.1741375285.git.gnault@redhat.com Signed-off-by: Paolo Abeni tools/testing/selftests/net/Makefile | 1 + tools/testing/selftests/net/gre_ipv6_lladdr.sh | 177 +++++++++++++++++++++++++ 2 files changed, 178 insertions(+) commit 183185a18ff96751db52a46ccf93fff3a1f42815 Author: Guillaume Nault Date: Fri Mar 7 20:28:53 2025 +0100 gre: Fix IPv6 link-local address generation. Use addrconf_addr_gen() to generate IPv6 link-local addresses on GRE devices in most cases and fall back to using add_v4_addrs() only in case the GRE configuration is incompatible with addrconf_addr_gen(). GRE used to use addrconf_addr_gen() until commit e5dd729460ca ("ip/ip6_gre: use the same logic as SIT interfaces when computing v6LL address") restricted this use to gretap and ip6gretap devices, and created add_v4_addrs() (borrowed from SIT) for non-Ethernet GRE ones. The original problem came when commit 9af28511be10 ("addrconf: refuse isatap eui64 for INADDR_ANY") made __ipv6_isatap_ifid() fail when its addr parameter was 0. The commit says that this would create an invalid address, however, I couldn't find any RFC saying that the generated interface identifier would be wrong. Anyway, since gre over IPv4 devices pass their local tunnel address to __ipv6_isatap_ifid(), that commit broke their IPv6 link-local address generation when the local address was unspecified. Then commit e5dd729460ca ("ip/ip6_gre: use the same logic as SIT interfaces when computing v6LL address") tried to fix that case by defining add_v4_addrs() and calling it to generate the IPv6 link-local address instead of using addrconf_addr_gen() (apart for gretap and ip6gretap devices, which would still use the regular addrconf_addr_gen(), since they have a MAC address). That broke several use cases because add_v4_addrs() isn't properly integrated into the rest of IPv6 Neighbor Discovery code. Several of these shortcomings have been fixed over time, but add_v4_addrs() remains broken on several aspects. In particular, it doesn't send any Router Sollicitations, so the SLAAC process doesn't start until the interface receives a Router Advertisement. Also, add_v4_addrs() mostly ignores the address generation mode of the interface (/proc/sys/net/ipv6/conf/*/addr_gen_mode), thus breaking the IN6_ADDR_GEN_MODE_RANDOM and IN6_ADDR_GEN_MODE_STABLE_PRIVACY cases. Fix the situation by using add_v4_addrs() only in the specific scenario where the normal method would fail. That is, for interfaces that have all of the following characteristics: * run over IPv4, * transport IP packets directly, not Ethernet (that is, not gretap interfaces), * tunnel endpoint is INADDR_ANY (that is, 0), * device address generation mode is EUI64. In all other cases, revert back to the regular addrconf_addr_gen(). Also, remove the special case for ip6gre interfaces in add_v4_addrs(), since ip6gre devices now always use addrconf_addr_gen() instead. Fixes: e5dd729460ca ("ip/ip6_gre: use the same logic as SIT interfaces when computing v6LL address") Signed-off-by: Guillaume Nault Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/559c32ce5c9976b269e6337ac9abb6a96abe5096.1741375285.git.gnault@redhat.com Signed-off-by: Paolo Abeni net/ipv6/addrconf.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 6edd78af9506bb182518da7f6feebd75655d9a0e Author: Alexey Kashavkin Date: Sun Mar 2 00:14:36 2025 +0300 netfilter: nft_exthdr: fix offset with ipv4_find_option() There is an incorrect calculation in the offset variable which causes the nft_skb_copy_to_reg() function to always return -EFAULT. Adding the start variable is redundant. In the __ip_options_compile() function the correct offset is specified when finding the function. There is no need to add the size of the iphdr structure to the offset. Fixes: dbb5281a1f84 ("netfilter: nf_tables: add support for matching IPv4 options") Signed-off-by: Alexey Kashavkin Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_exthdr.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit dcb73cbaaeb39c9fd00bf2e019f911725945e2fe Author: Bartosz Golaszewski Date: Tue Mar 11 15:31:43 2025 +0100 gpio: cdev: use raw notifier for line state events We use a notifier to implement the mechanism of informing the user-space about changes in GPIO line status. We register with the notifier when the GPIO character device file is opened and unregister when the last reference to the associated file descriptor is dropped. Since commit fcc8b637c542 ("gpiolib: switch the line state notifier to atomic") we use the atomic notifier variant. Atomic notifiers call rcu_synchronize in atomic_notifier_chain_unregister() which caused a significant performance regression in some circumstances, observed by user-space when calling close() on the GPIO device file descriptor. Replace the atomic notifier with the raw variant and provide synchronization with a read-write spinlock. Fixes: fcc8b637c542 ("gpiolib: switch the line state notifier to atomic") Reported-by: David Jander Closes: https://lore.kernel.org/all/20250311110034.53959031@erd003.prtnl/ Tested-by: David Jander Tested-by: Kent Gibson Link: https://lore.kernel.org/r/20250311-gpiolib-line-state-raw-notifier-v2-1-138374581e1e@linaro.org Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-cdev.c | 15 +++++++++------ drivers/gpio/gpiolib.c | 8 +++++--- drivers/gpio/gpiolib.h | 5 ++++- 3 files changed, 18 insertions(+), 10 deletions(-) commit 0102fbf52b93e609fec0dab53b1fb4fe69113f5e Author: Bartosz Golaszewski Date: Tue Mar 11 18:56:31 2025 +0100 gpiolib: don't check the retval of get_direction() when registering a chip During chip registration we should neither check the return value of gc->get_direction() nor hold the SRCU lock when calling it. The former is because pin controllers may have pins set to alternate functions and return errors from their get_direction() callbacks. That's alright - we should default to the safe INPUT state and not bail-out. The latter is not needed because we haven't registered the chip yet so there's nothing to protect against dynamic removal. In fact: we currently hit a lockdep splat. Revert to calling the gc->get_direction() callback directly and *not* checking its value. Fixes: 9d846b1aebbe ("gpiolib: check the return value of gpio_chip::get_direction()") Reported-by: Marek Szyprowski Closes: https://lore.kernel.org/all/81f890fc-6688-42f0-9756-567efc8bb97a@samsung.com/ Reviewed-by: Andy Shevchenko Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20250226-retval-fixes-v2-1-c8dc57182441@linaro.org Tested-by: Gene C Link: https://lore.kernel.org/r/20250311175631.83779-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit de69d56daac6d9b98fa384184078751db1288144 Merge: b11a74ac4f54 658fb7fe8e7f Author: Takashi Iwai Date: Thu Mar 13 07:33:48 2025 +0100 Merge tag 'asoc-fix-v6.14-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.14 The bulk of this is driver specific fixes, mostly unremarkable. There's also one core fix from Charles, fixing up confusion around the limiting of maximum control values. commit 3bcde88d381a336ff252d67867c186ee602e6656 Author: Kent Overstreet Date: Wed Mar 12 17:21:31 2025 -0400 bcachefs: fix tiny leak in bch2_dev_add() Signed-off-by: Kent Overstreet fs/bcachefs/super.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit b7f94fcf55469ad3ef8a74c35b488dbfa314d1bb Merge: 6e8e2f82bc26 9360dfe4cbd6 Author: Linus Torvalds Date: Wed Mar 12 11:52:04 2025 -1000 Merge tag 'sched_ext-for-6.14-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext Pull sched_ext fix from Tejun Heo: "BPF schedulers could trigger a crash by passing in an invalid CPU to the scx_bpf_select_cpu_dfl() helper. Fix it by verifying input validity" * tag 'sched_ext-for-6.14-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext: sched_ext: Validate prev_cpu in scx_bpf_select_cpu_dfl() commit 6e8e2f82bc26d4b4ac9bc4f3abe99a5661a04009 Merge: 0fed89a961ea 91cf42c63f2d Author: Linus Torvalds Date: Wed Mar 12 11:47:24 2025 -1000 Merge tag 'spi-fix-v6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A couple of driver specific fixes, an error handling fix for the Atmel QuadSPI driver and a fix for a nasty synchronisation issue in the data path for the Microchip driver which affects larger transfers. There's also a MAINTAINERS update for the Samsung driver" * tag 'spi-fix-v6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: microchip-core: prevent RX overflows when transmit size > FIFO size MAINTAINERS: add tambarus as R for Samsung SPI spi: atmel-quadspi: remove references to runtime PM on error path commit 83d2fe6b193c46088a78f1fbb134f5f8f752fffd Merge: 081b575617e6 bb7737de5f59 Author: Jakub Kicinski Date: Wed Mar 12 12:51:30 2025 -0700 Merge branch 'net_sched-prevent-creation-of-classes-with-tc_h_root' Cong Wang says: ==================== net_sched: Prevent creation of classes with TC_H_ROOT This patchset contains a bug fix and its TDC test case. ==================== Link: https://patch.msgid.link/20250306232355.93864-1-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski commit bb7737de5f593155aabbca283f4822176f4e7d6b Author: Cong Wang Date: Thu Mar 6 15:23:55 2025 -0800 selftests/tc-testing: Add a test case for DRR class with TC_H_ROOT Integrate the reproduer from Mingi to TDC. All test results: 1..4 ok 1 0385 - Create DRR with default setting ok 2 2375 - Delete DRR with handle ok 3 3092 - Show DRR class ok 4 4009 - Reject creation of DRR class with classid TC_H_ROOT Cc: Mingi Cho Signed-off-by: Cong Wang Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250306232355.93864-3-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski .../selftests/tc-testing/tc-tests/qdiscs/drr.json | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 0c3057a5a04d07120b3d0ec9c79568fceb9c921e Author: Cong Wang Date: Thu Mar 6 15:23:54 2025 -0800 net_sched: Prevent creation of classes with TC_H_ROOT The function qdisc_tree_reduce_backlog() uses TC_H_ROOT as a termination condition when traversing up the qdisc tree to update parent backlog counters. However, if a class is created with classid TC_H_ROOT, the traversal terminates prematurely at this class instead of reaching the actual root qdisc, causing parent statistics to be incorrectly maintained. In case of DRR, this could lead to a crash as reported by Mingi Cho. Prevent the creation of any Qdisc class with classid TC_H_ROOT (0xFFFFFFFF) across all qdisc types, as suggested by Jamal. Reported-by: Mingi Cho Signed-off-by: Cong Wang Reviewed-by: Simon Horman Fixes: 066a3b5b2346 ("[NET_SCHED] sch_api: fix qdisc_tree_decrease_qlen() loop") Link: https://patch.msgid.link/20250306232355.93864-2-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski net/sched/sch_api.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6cc30748e17ea2a64051ceaf83a8372484e597f1 Author: Natalie Vock Date: Mon Mar 10 18:08:05 2025 +0100 drm/amdgpu: NULL-check BO's backing store when determining GFX12 PTE flags PRT BOs may not have any backing store, so bo->tbo.resource will be NULL. Check for that before dereferencing. Fixes: 0cce5f285d9a ("drm/amdkfd: Check correct memory types for is_system variable") Reviewed-by: Christian König Signed-off-by: Natalie Vock Signed-off-by: Alex Deucher (cherry picked from commit 3e3fcd29b505cebed659311337ea03b7698767fc) Cc: stable@vger.kernel.org # 6.12.x drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0882ca4eecfe8b0013f339144acf886a0a0de41f Author: Yifan Zha Date: Wed Mar 5 13:14:55 2025 +0800 drm/amd/amdkfd: Evict all queues even HWS remove queue failed [Why] If reset is detected and kfd need to evict working queues, HWS moving queue will be failed. Then remaining queues are not evicted and in active state. After reset done, kfd uses HWS to termination remaining activated queues but HWS is resetted. So remove queue will be failed again. [How] Keep removing all queues even if HWS returns failed. It will not affect cpsch as it checks reset_domain->sem. v2: If any queue failed, evict queue returns error. v3: Declare err inside the if-block. Reviewed-by: Felix Kuehling Signed-off-by: Yifan Zha Signed-off-by: Alex Deucher (cherry picked from commit 42c854b8fb0cce512534aa2b7141948e80c6ebb0) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 066e053fe208a3b83ee89dc5a192146add688861 Author: Amir Goldstein Date: Wed Mar 12 08:38:47 2025 +0100 fsnotify: add pre-content hooks on mmap() Pre-content hooks in page faults introduces potential deadlock of HSM handler in userspace with filesystem freezing. The requirement with pre-content event is that for every accessed file range an event covering at least this range will be generated at least once before the file data is accesses. In preparation to disabling pre-content event hooks on page faults, add pre-content hooks at mmap() variants for the entire mmaped range, so HSM can fill content when user requests to map a portion of the file. Note that exec() variant also calls vm_mmap_pgoff() internally to map code sections, so pre-content hooks are also generated in this case. Link: https://lore.kernel.org/linux-fsdevel/7ehxrhbvehlrjwvrduoxsao5k3x4aw275patsb3krkwuq573yv@o2hskrfawbnc/ Suggested-by: Josef Bacik Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara Link: https://patch.msgid.link/20250312073852.2123409-2-amir73il@gmail.com include/linux/fsnotify.h | 21 +++++++++++++++++++++ mm/util.c | 3 +++ 2 files changed, 24 insertions(+) commit 18e0885bd2ca738407036434418a26a58394a60e Author: Boon Khai Ng Date: Wed Mar 12 11:05:44 2025 +0800 USB: serial: ftdi_sio: add support for Altera USB Blaster 3 The Altera USB Blaster 3, available as both a cable and an on-board solution, is primarily used for programming and debugging FPGAs. It interfaces with host software such as Quartus Programmer, System Console, SignalTap, and Nios Debugger. The device utilizes either an FT2232 or FT4232 chip. Enabling the support for various configurations of the on-board USB Blaster 3 by including the appropriate VID/PID pairs, allowing it to function as a serial device via ftdi_sio. Note that this check-in does not include support for the cable solution, as it does not support UART functionality. The supported configurations are determined by the hardware design and include: 1) PID 0x6022, FT2232, 1 JTAG port (Port A) + Port B as UART 2) PID 0x6025, FT4232, 1 JTAG port (Port A) + Port C as UART 3) PID 0x6026, FT4232, 1 JTAG port (Port A) + Port C, D as UART 4) PID 0x6029, FT4232, 1 JTAG port (Port B) + Port C as UART 5) PID 0x602a, FT4232, 1 JTAG port (Port B) + Port C, D as UART 6) PID 0x602c, FT4232, 1 JTAG port (Port A) + Port B as UART 7) PID 0x602d, FT4232, 1 JTAG port (Port A) + Port B, C as UART 8) PID 0x602e, FT4232, 1 JTAG port (Port A) + Port B, C, D as UART These configurations allow for flexibility in how the USB Blaster 3 is used, depending on the specific needs of the hardware design. Signed-off-by: Boon Khai Ng Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 14 ++++++++++++++ drivers/usb/serial/ftdi_sio_ids.h | 13 +++++++++++++ 2 files changed, 27 insertions(+) commit 658fb7fe8e7f4014ea17a4da0e0c1d9bc319fa35 Author: Arnd Bergmann Date: Wed Mar 5 18:27:32 2025 +0100 ASoC: cs42l43: convert to SYSTEM_SLEEP_PM_OPS The custom suspend function causes a build warning when CONFIG_PM_SLEEP is disabled: sound/soc/codecs/cs42l43.c:2405:12: error: unused function 'cs42l43_codec_runtime_force_suspend' [-Werror,-Wunused-function] Change SET_SYSTEM_SLEEP_PM_OPS() to the newer SYSTEM_SLEEP_PM_OPS(), to avoid this. Fixes: 164b7dd4546b ("ASoC: cs42l43: Add jack delay debounce after suspend") Signed-off-by: Arnd Bergmann Reviewed-by: Maciej Strozek Reviewed-by: Charles Keepax Link: https://patch.msgid.link/20250305172738.3437513-1-arnd@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/cs42l43.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9e7c172a7f247f7ef0b151fa8c8f044b6a2a070 Author: Hans Verkuil Date: Mon Feb 24 15:40:58 2025 +0100 media: rtl2832_sdr: assign vb2 lock before vb2_queue_init Commit c780d01cf1a6 ("media: vb2: vb2_core_queue_init(): sanity check lock and wait_prepare/finish") added a sanity check to ensure that if there are no wait_prepare/finish callbacks set by the driver, then the vb2_queue lock must be set, since otherwise the vb2 core cannot do correct locking. The rtl2832_sdr.c triggered this warning: it turns out that while the driver does set this lock, it sets it too late. So move it up to before the vb2_queue_init() call. Reported-by: Arthur Marsh Closes: https://lore.kernel.org/linux-media/20241211042355.8479-1-user@am64/ Fixes: 8fcd2795d22a ("media: rtl2832_sdr: drop vb2_ops_wait_prepare/finish") Cc: stable@vger.kernel.org Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Hans Verkuil drivers/media/dvb-frontends/rtl2832_sdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b11a74ac4f545626d0dc95a8ca8c41df90532bf3 Author: Navon John Lukose Date: Sat Mar 8 03:03:19 2025 +0530 ALSA: hda/realtek: Add mute LED quirk for HP Pavilion x360 14-dy1xxx Add a fixup to enable the mute LED on HP Pavilion x360 Convertible 14-dy1xxx with ALC295 codec. The appropriate coefficient index and bits were identified through a brute-force method, as detailed in https://bbs.archlinux.org/viewtopic.php?pid=2079504#p2079504. Signed-off-by: Navon John Lukose Link: https://patch.msgid.link/20250307213319.35507-1-navonjohnlukose@gmail.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 80b78c39eb86e6b55f56363b709eb817527da5aa Author: Dan Carpenter Date: Mon Mar 10 10:45:53 2025 +0300 ipvs: prevent integer overflow in do_ip_vs_get_ctl() The get->num_services variable is an unsigned int which is controlled by the user. The struct_size() function ensures that the size calculation does not overflow an unsigned long, however, we are saving the result to an int so the calculation can overflow. Both "len" and "get->num_services" come from the user. This check is just a sanity check to help the user and ensure they are using the API correctly. An integer overflow here is not a big deal. This has no security impact. Save the result from struct_size() type size_t to fix this integer overflow bug. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Dan Carpenter Acked-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_ctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c21b02fd9cbf15aed6e32c89e0fd70070281e3d1 Author: Florian Westphal Date: Tue Mar 11 12:52:45 2025 +0100 selftests: netfilter: skip br_netfilter queue tests if kernel is tainted These scripts fail if the kernel is tainted which leads to wrong test failure reports in CI environments when an unrelated test triggers some splat. Check taint state at start of script and SKIP if its already dodgy. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso tools/testing/selftests/net/netfilter/br_netfilter.sh | 7 +++++++ tools/testing/selftests/net/netfilter/br_netfilter_queue.sh | 7 +++++++ tools/testing/selftests/net/netfilter/nft_queue.sh | 1 + 3 files changed, 15 insertions(+) commit d653bfeb07ebb3499c403404c21ac58a16531607 Author: Kohei Enju Date: Sun Mar 9 17:07:38 2025 +0900 netfilter: nf_conncount: Fully initialize struct nf_conncount_tuple in insert_tree() Since commit b36e4523d4d5 ("netfilter: nf_conncount: fix garbage collection confirm race"), `cpu` and `jiffies32` were introduced to the struct nf_conncount_tuple. The commit made nf_conncount_add() initialize `conn->cpu` and `conn->jiffies32` when allocating the struct. In contrast, count_tree() was not changed to initialize them. By commit 34848d5c896e ("netfilter: nf_conncount: Split insert and traversal"), count_tree() was split and the relevant allocation code now resides in insert_tree(). Initialize `conn->cpu` and `conn->jiffies32` in insert_tree(). BUG: KMSAN: uninit-value in find_or_evict net/netfilter/nf_conncount.c:117 [inline] BUG: KMSAN: uninit-value in __nf_conncount_add+0xd9c/0x2850 net/netfilter/nf_conncount.c:143 find_or_evict net/netfilter/nf_conncount.c:117 [inline] __nf_conncount_add+0xd9c/0x2850 net/netfilter/nf_conncount.c:143 count_tree net/netfilter/nf_conncount.c:438 [inline] nf_conncount_count+0x82f/0x1e80 net/netfilter/nf_conncount.c:521 connlimit_mt+0x7f6/0xbd0 net/netfilter/xt_connlimit.c:72 __nft_match_eval net/netfilter/nft_compat.c:403 [inline] nft_match_eval+0x1a5/0x300 net/netfilter/nft_compat.c:433 expr_call_ops_eval net/netfilter/nf_tables_core.c:240 [inline] nft_do_chain+0x426/0x2290 net/netfilter/nf_tables_core.c:288 nft_do_chain_ipv4+0x1a5/0x230 net/netfilter/nft_chain_filter.c:23 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_slow+0xf4/0x400 net/netfilter/core.c:626 nf_hook_slow_list+0x24d/0x860 net/netfilter/core.c:663 NF_HOOK_LIST include/linux/netfilter.h:350 [inline] ip_sublist_rcv+0x17b7/0x17f0 net/ipv4/ip_input.c:633 ip_list_rcv+0x9ef/0xa40 net/ipv4/ip_input.c:669 __netif_receive_skb_list_ptype net/core/dev.c:5936 [inline] __netif_receive_skb_list_core+0x15c5/0x1670 net/core/dev.c:5983 __netif_receive_skb_list net/core/dev.c:6035 [inline] netif_receive_skb_list_internal+0x1085/0x1700 net/core/dev.c:6126 netif_receive_skb_list+0x5a/0x460 net/core/dev.c:6178 xdp_recv_frames net/bpf/test_run.c:280 [inline] xdp_test_run_batch net/bpf/test_run.c:361 [inline] bpf_test_run_xdp_live+0x2e86/0x3480 net/bpf/test_run.c:390 bpf_prog_test_run_xdp+0xf1d/0x1ae0 net/bpf/test_run.c:1316 bpf_prog_test_run+0x5e5/0xa30 kernel/bpf/syscall.c:4407 __sys_bpf+0x6aa/0xd90 kernel/bpf/syscall.c:5813 __do_sys_bpf kernel/bpf/syscall.c:5902 [inline] __se_sys_bpf kernel/bpf/syscall.c:5900 [inline] __ia32_sys_bpf+0xa0/0xe0 kernel/bpf/syscall.c:5900 ia32_sys_call+0x394d/0x4180 arch/x86/include/generated/asm/syscalls_32.h:358 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0xb0/0x110 arch/x86/entry/common.c:387 do_fast_syscall_32+0x38/0x80 arch/x86/entry/common.c:412 do_SYSENTER_32+0x1f/0x30 arch/x86/entry/common.c:450 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Uninit was created at: slab_post_alloc_hook mm/slub.c:4121 [inline] slab_alloc_node mm/slub.c:4164 [inline] kmem_cache_alloc_noprof+0x915/0xe10 mm/slub.c:4171 insert_tree net/netfilter/nf_conncount.c:372 [inline] count_tree net/netfilter/nf_conncount.c:450 [inline] nf_conncount_count+0x1415/0x1e80 net/netfilter/nf_conncount.c:521 connlimit_mt+0x7f6/0xbd0 net/netfilter/xt_connlimit.c:72 __nft_match_eval net/netfilter/nft_compat.c:403 [inline] nft_match_eval+0x1a5/0x300 net/netfilter/nft_compat.c:433 expr_call_ops_eval net/netfilter/nf_tables_core.c:240 [inline] nft_do_chain+0x426/0x2290 net/netfilter/nf_tables_core.c:288 nft_do_chain_ipv4+0x1a5/0x230 net/netfilter/nft_chain_filter.c:23 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_slow+0xf4/0x400 net/netfilter/core.c:626 nf_hook_slow_list+0x24d/0x860 net/netfilter/core.c:663 NF_HOOK_LIST include/linux/netfilter.h:350 [inline] ip_sublist_rcv+0x17b7/0x17f0 net/ipv4/ip_input.c:633 ip_list_rcv+0x9ef/0xa40 net/ipv4/ip_input.c:669 __netif_receive_skb_list_ptype net/core/dev.c:5936 [inline] __netif_receive_skb_list_core+0x15c5/0x1670 net/core/dev.c:5983 __netif_receive_skb_list net/core/dev.c:6035 [inline] netif_receive_skb_list_internal+0x1085/0x1700 net/core/dev.c:6126 netif_receive_skb_list+0x5a/0x460 net/core/dev.c:6178 xdp_recv_frames net/bpf/test_run.c:280 [inline] xdp_test_run_batch net/bpf/test_run.c:361 [inline] bpf_test_run_xdp_live+0x2e86/0x3480 net/bpf/test_run.c:390 bpf_prog_test_run_xdp+0xf1d/0x1ae0 net/bpf/test_run.c:1316 bpf_prog_test_run+0x5e5/0xa30 kernel/bpf/syscall.c:4407 __sys_bpf+0x6aa/0xd90 kernel/bpf/syscall.c:5813 __do_sys_bpf kernel/bpf/syscall.c:5902 [inline] __se_sys_bpf kernel/bpf/syscall.c:5900 [inline] __ia32_sys_bpf+0xa0/0xe0 kernel/bpf/syscall.c:5900 ia32_sys_call+0x394d/0x4180 arch/x86/include/generated/asm/syscalls_32.h:358 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0xb0/0x110 arch/x86/entry/common.c:387 do_fast_syscall_32+0x38/0x80 arch/x86/entry/common.c:412 do_SYSENTER_32+0x1f/0x30 arch/x86/entry/common.c:450 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Reported-by: syzbot+83fed965338b573115f7@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=83fed965338b573115f7 Fixes: b36e4523d4d5 ("netfilter: nf_conncount: fix garbage collection confirm race") Signed-off-by: Kohei Enju Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conncount.c | 2 ++ 1 file changed, 2 insertions(+) commit 9bce6b5f8987678b9c6c1fe433af6b5fe41feadc Author: Shin'ichiro Kawasaki Date: Tue Mar 11 19:43:59 2025 +0900 block: change blk_mq_add_to_batch() third argument type to bool Commit 1f47ed294a2b ("block: cleanup and fix batch completion adding conditions") modified the evaluation criteria for the third argument, 'ioerror', in the blk_mq_add_to_batch() function. Initially, the function had checked if 'ioerror' equals zero. Following the commit, it started checking for negative error values, with the presumption that such values, for instance -EIO, would be passed in. However, blk_mq_add_to_batch() callers do not pass negative error values. Instead, they pass status codes defined in various ways: - NVMe PCI and Apple drivers pass NVMe status code - virtio_blk driver passes the virtblk request header status byte - null_blk driver passes blk_status_t These codes are either zero or positive, therefore the revised check fails to function as intended. Specifically, with the NVMe PCI driver, this modification led to the failure of the blktests test case nvme/039. In this test scenario, errors are artificially injected to the NVMe driver, resulting in positive NVMe status codes passed to blk_mq_add_to_batch(), which unexpectedly processes the failed I/O in a batch. Hence the failure. To correct the ioerror check within blk_mq_add_to_batch(), make all callers to uniformly pass the argument as boolean. Modify the callers to check their specific status codes and pass the boolean value 'is_error'. Also describe the arguments of blK_mq_add_to_batch as kerneldoc. Fixes: 1f47ed294a2b ("block: cleanup and fix batch completion adding conditions") Signed-off-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20250311104359.1767728-3-shinichiro.kawasaki@wdc.com [axboe: fold in documentation update] Signed-off-by: Jens Axboe drivers/block/null_blk/main.c | 4 ++-- drivers/block/virtio_blk.c | 5 +++-- drivers/nvme/host/apple.c | 3 ++- drivers/nvme/host/pci.c | 5 +++-- include/linux/blk-mq.h | 16 ++++++++++++---- 5 files changed, 22 insertions(+), 11 deletions(-) commit 081b575617e6f9355edf054cb907bdb8af7ed149 Merge: d2b9d97e89c7 8ae227f8a774 Author: David S. Miller Date: Wed Mar 12 13:56:58 2025 +0000 Merge tag 'wireless-2025-03-12' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes berg says: ==================== Few more fixes: - cfg80211/mac80211 - stop possible runaway wiphy worker - EHT should not use reserved MPDU size bits - don't run worker for stopped interfaces - fix SA Query processing with MLO - fix lookup of assoc link BSS entries - correct station flush on unauthorize - iwlwifi: - TSO fixes - fix non-MSI-X platforms - stop possible runaway restart worker - rejigger maintainers so I'm not CC'ed on everything ==================== Signed-off-by: David S. Miller commit 2b22459792fcb4def9f0936d64575ac11a95a58d Author: Christophe JAILLET Date: Mon Mar 3 21:26:54 2025 +0100 i2c: sis630: Fix an error handling path in sis630_probe() If i2c_add_adapter() fails, the request_region() call in sis630_setup() must be undone by a corresponding release_region() call, as done in the remove function. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/3d607601f2c38e896b10207963c6ab499ca5c307.1741033587.git.christophe.jaillet@wanadoo.fr Signed-off-by: Andi Shyti drivers/i2c/busses/i2c-sis630.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 6e55caaf30c88209d097e575a169b1dface1ab69 Author: Christophe JAILLET Date: Mon Mar 3 20:58:06 2025 +0100 i2c: ali15x3: Fix an error handling path in ali15x3_probe() If i2c_add_adapter() fails, the request_region() call in ali15x3_setup() must be undone by a corresponding release_region() call, as done in the remove function. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/9b2090cbcc02659f425188ea05f2e02745c4e67b.1741031878.git.christophe.jaillet@wanadoo.fr drivers/i2c/busses/i2c-ali15x3.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 9b5463f349d019a261f1e80803447efca3126151 Author: Christophe JAILLET Date: Mon Mar 3 20:53:08 2025 +0100 i2c: ali1535: Fix an error handling path in ali1535_probe() If i2c_add_adapter() fails, the request_region() call in ali1535_setup() must be undone by a corresponding release_region() call, as done in the remove function. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/0daf63d7a2ce74c02e2664ba805bbfadab7d25e5.1741031571.git.christophe.jaillet@wanadoo.fr drivers/i2c/busses/i2c-ali1535.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 285df995f90e3d61d97f327d34b9659d92313314 Author: Andreas Kemnade Date: Fri Feb 28 15:04:20 2025 +0100 i2c: omap: fix IRQ storms On the GTA04A5 writing a reset command to the gyroscope causes IRQ storms because NACK IRQs are enabled and therefore triggered but not acked. Sending a reset command to the gyroscope by i2cset 1 0x69 0x14 0xb6 with an additional debug print in the ISR (not the thread) itself causes [ 363.353515] i2c i2c-1: ioctl, cmd=0x720, arg=0xbe801b00 [ 363.359039] omap_i2c 48072000.i2c: addr: 0x0069, len: 2, flags: 0x0, stop: 1 [ 363.366180] omap_i2c 48072000.i2c: IRQ LL (ISR = 0x1110) [ 363.371673] omap_i2c 48072000.i2c: IRQ (ISR = 0x0010) [ 363.376892] omap_i2c 48072000.i2c: IRQ LL (ISR = 0x0102) [ 363.382263] omap_i2c 48072000.i2c: IRQ LL (ISR = 0x0102) [ 363.387664] omap_i2c 48072000.i2c: IRQ LL (ISR = 0x0102) repeating till infinity [...] (0x2 = NACK, 0x100 = Bus free, which is not enabled) Apparently no other IRQ bit gets set, so this stalls. Do not ignore enabled interrupts and make sure they are acked. If the NACK IRQ is not needed, it should simply not enabled, but according to the above log, caring about it is necessary unless the Bus free IRQ is enabled and handled. The assumption that is will always come with a ARDY IRQ, which was the idea behind ignoring it, proves wrong. It is true for simple reads from an unused address. To still avoid the i2cdetect trouble which is the reason for commit c770657bd261 ("i2c: omap: Fix standard mode false ACK readings"), avoid doing much about NACK in omap_i2c_xfer_data() which is used by both IRQ mode and polling mode, so also the false detection fix is extended to polling usage and IRQ storms are avoided. By changing this, the hardirq handler is not needed anymore to filter stuff. The mentioned gyro reset now just causes a -ETIMEDOUT instead of hanging the system. Fixes: c770657bd261 ("i2c: omap: Fix standard mode false ACK readings"). CC: stable@kernel.org Signed-off-by: Andreas Kemnade Tested-by: Nishanth Menon Reviewed-by: Aniket Limaye Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250228140420.379498-1-andreas@kemnade.info drivers/i2c/busses/i2c-omap.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) commit 8ae227f8a7749eec92fc381dfbe213429c852278 Author: Benjamin Berg Date: Tue Mar 11 12:17:04 2025 +0100 wifi: mac80211: fix MPDU length parsing for EHT 5/6 GHz The MPDU length is only configured using the EHT capabilities element on 2.4 GHz. On 5/6 GHz it is configured using the VHT or HE capabilities respectively. Fixes: cf0079279727 ("wifi: mac80211: parse A-MSDU len from EHT capabilities") Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250311121704.0634d31f0883.I28063e4d3ef7d296b7e8a1c303460346a30bf09c@changeid Signed-off-by: Johannes Berg net/mac80211/eht.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit a1eb95d6b5f4cf5cc7b081e85e374d1dd98a213b Author: Tamir Duberstein Date: Mon Feb 10 13:04:17 2025 -0500 scripts: generate_rust_analyzer: add uapi crate Commit 4e1746656839 ("rust: uapi: Add UAPI crate") did not update rust-analyzer to include the new crate. Add the missing definition to improve the developer experience. Fixes: 4e1746656839 ("rust: uapi: Add UAPI crate") Signed-off-by: Tamir Duberstein Tested-by: Andreas Hindborg Link: https://lore.kernel.org/r/20250210-rust-analyzer-bindings-include-v2-2-23dff845edc3@gmail.com [ Slightly reworded title. - Miguel ] Signed-off-by: Miguel Ojeda scripts/generate_rust_analyzer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d1f928052439cad028438a8b8b34c1f01bc06068 Author: Tamir Duberstein Date: Mon Feb 10 13:04:16 2025 -0500 scripts: generate_rust_analyzer: add missing include_dirs Commit 8c4555ccc55c ("scripts: add `generate_rust_analyzer.py`") specified OBJTREE for the bindings crate, and `source.include_dirs` for the kernel crate, likely in an attempt to support out-of-source builds for those crates where the generated files reside in `objtree` rather than `srctree`. This was insufficient because both bits of configuration are required for each crate; the result is that rust-analyzer is unable to resolve generated files for either crate in an out-of-source build. [ Originally we were not using `OBJTREE` in the `kernel` crate, but we did pass the variable anyway, so conceptually it could have been there since then. Regarding `include_dirs`, it started in `kernel` before being in mainline because we included the bindings directly there (i.e. there was no `bindings` crate). However, when that crate got created, we moved the `OBJTREE` there but not the `include_dirs`. Nowadays, though, we happen to need the `include_dirs` also in the `kernel` crate for `generated_arch_static_branch_asm.rs` which was not there back then -- Tamir confirms it is indeed required for that reason. - Miguel ] Add the missing bits to improve the developer experience. Fixes: 8c4555ccc55c ("scripts: add `generate_rust_analyzer.py`") Signed-off-by: Tamir Duberstein Tested-by: Andreas Hindborg Link: https://lore.kernel.org/r/20250210-rust-analyzer-bindings-include-v2-1-23dff845edc3@gmail.com [ Slightly reworded title. - Miguel ] Signed-off-by: Miguel Ojeda scripts/generate_rust_analyzer.py | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 0fed89a961ea851945d23cc35beb59d6e56c0964 Merge: 0b46b049d6ec 73fe9073c0cc Author: Linus Torvalds Date: Tue Mar 11 12:49:51 2025 -1000 Merge tag 'hyperv-fixes-signed-20250311' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv fixes from Wei Liu: - Patches to fix Hyper-v framebuffer code (Michael Kelley and Saurabh Sengar) - Fix for Hyper-V output argument to hypercall that changes page visibility (Michael Kelley) - Fix for Hyper-V VTL mode (Naman Jain) * tag 'hyperv-fixes-signed-20250311' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: Drivers: hv: vmbus: Don't release fb_mmio resource in vmbus_free_mmio() x86/hyperv: Fix output argument to hypercall that changes page visibility fbdev: hyperv_fb: Allow graceful removal of framebuffer fbdev: hyperv_fb: Simplify hvfb_putmem fbdev: hyperv_fb: Fix hang in kdump kernel when on Hyper-V Gen 2 VMs drm/hyperv: Fix address space leak when Hyper-V DRM device is removed fbdev: hyperv_fb: iounmap() the correct memory when removing a device x86/hyperv/vtl: Stop kernel from probing VTL0 low memory commit 2e0f91aba507a3cb59f7a12fc3ea2b7d4d6675b7 Author: Tamir Duberstein Date: Mon Feb 10 12:03:24 2025 -0500 scripts: generate_rust_analyzer: add missing macros deps The macros crate has depended on std and proc_macro since its introduction in commit 1fbde52bde73 ("rust: add `macros` crate"). These dependencies were omitted from commit 8c4555ccc55c ("scripts: add `generate_rust_analyzer.py`") resulting in missing go-to-definition and autocomplete, and false-positive warnings emitted from rust-analyzer such as: [{ "resource": "/Users/tamird/src/linux/rust/macros/module.rs", "owner": "_generated_diagnostic_collection_name_#1", "code": { "value": "non_snake_case", "target": { "$mid": 1, "path": "/rustc/", "scheme": "https", "authority": "doc.rust-lang.org", "query": "search=non_snake_case" } }, "severity": 4, "message": "Variable `None` should have snake_case name, e.g. `none`", "source": "rust-analyzer", "startLineNumber": 123, "startColumn": 17, "endLineNumber": 123, "endColumn": 21 }] Add the missing dependencies to improve the developer experience. [ Fiona had a different approach (thanks!) at: https://lore.kernel.org/rust-for-linux/20241205115438.234221-1-me@kloenk.dev/ But Tamir and Fiona agreed to this one. - Miguel ] Fixes: 8c4555ccc55c ("scripts: add `generate_rust_analyzer.py`") Reviewed-by: Fiona Behrens Diagnosed-by: Chayim Refael Friedman Link: https://github.com/rust-lang/rust-analyzer/issues/17759#issuecomment-2646328275 Signed-off-by: Tamir Duberstein Tested-by: Andreas Hindborg Link: https://lore.kernel.org/r/20250210-rust-analyzer-macros-core-dep-v3-1-45eb4836f218@gmail.com [ Removed `return`. Changed tag name. Added Link. Slightly reworded. - Miguel ] Signed-off-by: Miguel Ojeda scripts/generate_rust_analyzer.py | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit 5daa0c35a1f0e7a6c3b8ba9cb721e7d1ace6e619 Author: Matthew Maurer Date: Wed Jan 8 23:35:08 2025 +0000 rust: Disallow BTF generation with Rust + LTO The kernel cannot currently self-parse BTF containing Rust debug information. pahole uses the language of the CU to determine whether to filter out debug information when generating the BTF. When LTO is enabled, Rust code can cross CU boundaries, resulting in Rust debug information in CUs labeled as C. This results in a system which cannot parse its own BTF. Signed-off-by: Matthew Maurer Cc: stable@vger.kernel.org Fixes: c1177979af9c ("btf, scripts: Exclude Rust CUs with pahole") Link: https://lore.kernel.org/r/20250108-rust-btf-lto-incompat-v1-1-60243ff6d820@google.com Signed-off-by: Miguel Ojeda init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8045e46c508b70fe4b30cc020fd0a2b0709b2e5 Author: José Roberto de Souza Date: Thu Mar 6 13:08:27 2025 -0800 drm/i915: Increase I915_PARAM_MMAP_GTT_VERSION version to indicate support for partial mmaps Commit 255fc1703e42 ("drm/i915/gem: Calculate object page offset for partial memory mapping") was the last patch of several patches fixing multiple partial mmaps. But without a bump in I915_PARAM_MMAP_GTT_VERSION there is no clean way for UMD to know if it can do multiple partial mmaps. Fixes: 255fc1703e42 ("drm/i915/gem: Calculate object page offset for partial memory mapping") Cc: Andi Shyti Cc: Nirmoy Das Cc: Lionel Landwerlin Signed-off-by: José Roberto de Souza Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20250306210827.171147-1-jose.souza@intel.com (cherry picked from commit bfef148f3680e6b9d28e7fca46d9520f80c5e50e) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gem/i915_gem_mman.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 54493279312f9e6edf64173681cb18d1df4297c1 Merge: b8501febdc51 53517a70873c Author: Stephen Boyd Date: Tue Mar 11 10:51:13 2025 -0700 Merge tag 'samsung-clk-fixes-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into clk-fixes Pull Samsung clk driver fixes from Krzysztof Kozlowski: - Google GS101: Fix synchronous external abort during system suspend. The driver access registers not available for OS, although issue would not be visible in earlier kernels due to missing suspend support. - Tesla FSD: Correct PLL142XX lock time * tag 'samsung-clk-fixes-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: clk: samsung: update PLL locktime for PLL142XX used on FSD platform clk: samsung: gs101: fix synchronous external abort in samsung_clk_save() commit 0b46b049d6eccd947c361018439fcb596e741d7a Merge: 4d872d51bc9d 7ff4faba6357 Author: Linus Torvalds Date: Tue Mar 11 07:29:02 2025 -1000 Merge tag 'pinctrl-v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - Fix the regmap settings for bcm281xx, this was missing the stride - NULL check for the Nuvoton npcm8xx devm_kasprintf() - Enable the Spacemit pin controller by default in the SoC config. The SoC will not boot without it so this one is pretty much required * tag 'pinctrl-v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: spacemit: enable config option pinctrl: nuvoton: npcm8xx: Add NULL check in npcm8xx_gpio_fw pinctrl: bcm281xx: Fix incorrect regmap max_registers value commit a05507cef0ee6a0af402c0d7e994115033ff746b Author: Lukas Hetzenecker Date: Tue Mar 11 00:28:03 2025 +0100 platform/surface: aggregator_registry: Add Support for Surface Pro 11 Add SAM client device nodes for the Surface Pro 11 (Intel). Like with the Surface Pro 10 already, the node group is compatible, so it can be reused. Signed-off-by: Lukas Hetzenecker Link: https://lore.kernel.org/r/20250310232803.23691-1-lukas@hetzenecker.me Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/surface/surface_aggregator_registry.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5b1122fc4995f308b21d7cfc64ef9880ac834d20 Author: Dan Carpenter Date: Mon Mar 10 22:48:29 2025 +0300 platform/x86/amd/pmf: fix cleanup in amd_pmf_init_smart_pc() There are a few problems in this code: First, if amd_pmf_tee_init() fails then the function returns directly instead of cleaning up. We cannot simply do a "goto error;" because the amd_pmf_tee_init() cleanup calls tee_shm_free(dev->fw_shm_pool); and amd_pmf_tee_deinit() calls it as well leading to a double free. I have re-written this code to use an unwind ladder to free the allocations. Second, if amd_pmf_start_policy_engine() fails on every iteration though the loop then the code calls amd_pmf_tee_deinit() twice which is also a double free. Call amd_pmf_tee_deinit() inside the loop for each failed iteration. Also on that path the error codes are not necessarily negative kernel error codes. Set the error code to -EINVAL. There is a very subtle third bug which is that if the call to input_register_device() in amd_pmf_register_input_device() fails then we call input_unregister_device() on an input device that wasn't registered. This will lead to a reference counting underflow because of the device_del(&dev->dev) in __input_unregister_device(). It's unlikely that anyone would ever hit this bug in real life. Fixes: 376a8c2a1443 ("platform/x86/amd/pmf: Update PMF Driver for Compatibility with new PMF-TA") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/232231fc-6a71-495e-971b-be2a76f6db4c@stanley.mountain Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/amd/pmf/tee-if.c | 36 ++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit dbac8feb23382af1efa2e1a86049e079b6e42e12 Author: Kent Overstreet Date: Tue Mar 11 10:39:36 2025 -0400 bcachefs: Make sure trans is unlocked when submitting read IO We were still using the trans after the unlock, leading to this bug in the retry path: 00255 ------------[ cut here ]------------ 00255 kernel BUG at fs/bcachefs/btree_iter.c:3348! 00255 Internal error: Oops - BUG: 00000000f2000800 [#1] SMP 00255 bcachefs (0ca38fe8-0a26-41f9-9b5d-6a27796c7803): /fiotest offset 86048768: no device to read from: 00255 u64s 8 type extent 4098:168192:U32_MAX len 128 ver 0: durability: 0 crc: c_size 128 size 128 offset 0 nonce 0 csum crc32c 0:8040a368 compress none ec: idx 83 block 1 ptr: 0:302:128 gen 0 00255 bcachefs (0ca38fe8-0a26-41f9-9b5d-6a27796c7803): /fiotest offset 85983232: no device to read from: 00255 u64s 8 type extent 4098:168064:U32_MAX len 128 ver 0: durability: 0 crc: c_size 128 size 128 offset 0 nonce 0 csum crc32c 0:43311336 compress none ec: idx 83 block 1 ptr: 0:302:0 gen 0 00255 Modules linked in: 00255 CPU: 5 UID: 0 PID: 304 Comm: kworker/u70:2 Not tainted 6.14.0-rc6-ktest-g526aae23d67d #16040 00255 Hardware name: linux,dummy-virt (DT) 00255 Workqueue: events_unbound bch2_rbio_retry 00255 pstate: 60001005 (nZCv daif -PAN -UAO -TCO -DIT +SSBS BTYPE=--) 00255 pc : __bch2_trans_get+0x100/0x378 00255 lr : __bch2_trans_get+0xa0/0x378 00255 sp : ffffff80c865b760 00255 x29: ffffff80c865b760 x28: 0000000000000000 x27: ffffff80d76ed880 00255 x26: 0000000000000018 x25: 0000000000000000 x24: ffffff80f4ec3760 00255 x23: ffffff80f4010140 x22: 0000000000000056 x21: ffffff80f4ec0000 00255 x20: ffffff80f4ec3788 x19: ffffff80d75f8000 x18: 00000000ffffffff 00255 x17: 2065707974203820 x16: 7334367520200a3a x15: 0000000000000008 00255 x14: 0000000000000001 x13: 0000000000000100 x12: 0000000000000006 00255 x11: ffffffc080b47a40 x10: 0000000000000000 x9 : ffffffc08038dea8 00255 x8 : ffffff80d75fc018 x7 : 0000000000000000 x6 : 0000000000003788 00255 x5 : 0000000000003760 x4 : ffffff80c922de80 x3 : ffffff80f18f0000 00255 x2 : ffffff80c922de80 x1 : 0000000000000130 x0 : 0000000000000006 00255 Call trace: 00255 __bch2_trans_get+0x100/0x378 (P) 00255 bch2_read_io_err+0x98/0x260 00255 bch2_read_endio+0xb8/0x2d0 00255 __bch2_read_extent+0xce8/0xfe0 00255 __bch2_read+0x2a8/0x978 00255 bch2_rbio_retry+0x188/0x318 00255 process_one_work+0x154/0x390 00255 worker_thread+0x20c/0x3b8 00255 kthread+0xf0/0x1b0 00255 ret_from_fork+0x10/0x20 00255 Code: 6b01001f 54ffff01 79408460 3617fec0 (d4210000) 00255 ---[ end trace 0000000000000000 ]--- 00255 Kernel panic - not syncing: Oops - BUG: Fatal exception 00255 SMP: stopping secondary CPUs 00255 Kernel Offset: disabled 00255 CPU features: 0x000,00000070,00000010,8240500b 00255 Memory Limit: none 00255 ---[ end Kernel panic - not syncing: Oops - BUG: Fatal exception ]--- Signed-off-by: Kent Overstreet fs/bcachefs/io_read.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 58517f4df8424ec28dfe7290ccc61908eda57aae Author: Roxana Nicolescu Date: Tue Mar 11 15:06:10 2025 +0000 bcachefs: Initialize from_inode members for bch_io_opts When there is no inode source, all "from_inode" members in the structure bhc_io_opts should be set false. Fixes: 7a7c43a0c1ecf ("bcachefs: Add bch_io_opts fields for indicating whether the opts came from the inode") Reported-by: syzbot+c17ad4b4367b72a853cb@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=c17ad4b4367b72a853cb Signed-off-by: Roxana Nicolescu Signed-off-by: Kent Overstreet fs/bcachefs/inode.c | 1 + 1 file changed, 1 insertion(+) commit d2b9d97e89c79c95f8b517e4fa43fd100f936acc Author: Haoxiang Li Date: Fri Mar 7 17:49:52 2025 +0800 qlcnic: fix memory leak issues in qlcnic_sriov_common.c Add qlcnic_sriov_free_vlans() in qlcnic_sriov_alloc_vlans() if any sriov_vlans fails to be allocated. Add qlcnic_sriov_free_vlans() to free the memory allocated by qlcnic_sriov_alloc_vlans() if "sriov->allowed_vlans" fails to be allocated. Fixes: 91b7282b613d ("qlcnic: Support VLAN id config.") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li Link: https://patch.msgid.link/20250307094952.14874-1-haoxiang_li2024@163.com Signed-off-by: Paolo Abeni drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ed92bc5264c4357d4fca292c769ea9967cd3d3b6 Author: Christophe JAILLET Date: Mon Mar 10 18:45:36 2025 +0100 ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe() Free some resources in the error handling path of the probe, as already done in the remove function. Fixes: e3523e01869d ("ASoC: wm0010: Add initial wm0010 DSP driver") Fixes: fd8b96574456 ("ASoC: wm0010: Clear IRQ as wake source and include missing header") Signed-off-by: Christophe JAILLET Reviewed-by: Charles Keepax Link: https://patch.msgid.link/5139ba1ab8c4c157ce04e56096a0f54a1683195c.1741549792.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown sound/soc/codecs/wm0010.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit e5c2bcc0cd47321d78bb4e865d7857304139f95d Author: Shin'ichiro Kawasaki Date: Tue Mar 11 19:43:58 2025 +0900 nvme: move error logging from nvme_end_req() to __nvme_end_req() Before the Commit 1f47ed294a2b ("block: cleanup and fix batch completion adding conditions"), blk_mq_add_to_batch() did not add failed passthrough requests to batch, and returned false. After the commit, blk_mq_add_to_batch() always adds passthrough requests to batch regardless of whether the request failed or not, and returns true. This affected error logging feature in the NVME driver. Before the commit, the call chain of failed passthrough request was as follows: nvme_handle_cqe() blk_mq_add_to_batch() .. false is returned, then call nvme_pci_complete_rq() nvme_pci_complete_rq() nvme_complete_rq() nvme_end_req() nvme_log_err_passthru() .. error logging __nvme_end_req() .. end of the rqeuest After the commit, the call chain is as follows: nvme_handle_cqe() blk_mq_add_to_batch() .. true is returned, then set nvme_pci_complete_batch() .. nvme_pci_complete_batch() nvme_complete_batch() nvme_complete_batch_req() __nvme_end_req() .. end of the request, without error logging To make the error logging feature work again for passthrough requests, move the nvme_log_err_passthru() call from nvme_end_req() to __nvme_end_req(). While at it, move nvme_log_error() call for non-passthrough requests together with nvme_log_err_passthru(). Even though the trigger commit does not affect non-passthrough requests, move it together for code simplicity. Fixes: 1f47ed294a2b ("block: cleanup and fix batch completion adding conditions") Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250311104359.1767728-2-shinichiro.kawasaki@wdc.com Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3a04334d6282d08fbdd6201e374db17d31927ba3 Author: Alan Huang Date: Sat Mar 8 00:58:27 2025 +0800 bcachefs: Fix b->written overflow When bset past end of btree node, we should not add sectors to b->written, which will overflow b->written. Reported-by: syzbot+3cb3d9e8c3f197754825@syzkaller.appspotmail.com Tested-by: syzbot+3cb3d9e8c3f197754825@syzkaller.appspotmail.com Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet fs/bcachefs/btree_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 415f135ace7fd824cde083184a922e39156055b5 Author: Justin Lai Date: Thu Mar 6 15:05:10 2025 +0800 rtase: Fix improper release of ring list entries in rtase_sw_reset Since rtase_init_ring, which is called within rtase_sw_reset, adds ring entries already present in the ring list back into the list, it causes the ring list to form a cycle. This results in list_for_each_entry_safe failing to find an endpoint during traversal, leading to an error. Therefore, it is necessary to remove the previously added ring_list nodes before calling rtase_init_ring. Fixes: 079600489960 ("rtase: Implement net_device_ops") Signed-off-by: Justin Lai Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250306070510.18129-1-justinlai0215@realtek.com Signed-off-by: Paolo Abeni drivers/net/ethernet/realtek/rtase/rtase_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3121a1ef966e1eabcccf3960929b50d625bda78c Merge: f5d83cf0eeb9 9318dc2357b6 Author: Paolo Abeni Date: Tue Mar 11 13:19:29 2025 +0100 Merge branch 'bonding-fix-incorrect-mac-address-setting' Hangbin Liu says: ==================== bonding: fix incorrect mac address setting The mac address on backup slave should be convert from Solicited-Node Multicast address, not from bonding unicast target address. ==================== Link: https://patch.msgid.link/20250306023923.38777-1-liuhangbin@gmail.com Signed-off-by: Paolo Abeni commit 9318dc2357b6b8b2ea1200ab7f2d5877851b7382 Author: Hangbin Liu Date: Thu Mar 6 02:39:23 2025 +0000 selftests: bonding: fix incorrect mac address The correct mac address for NS target 2001:db8::254 is 33:33:ff:00:02:54, not 33:33:00:00:02:54. The same with client maddress. Fixes: 86fb6173d11e ("selftests: bonding: add ns multicast group testing") Acked-by: Jay Vosburgh Reviewed-by: Nikolay Aleksandrov Signed-off-by: Hangbin Liu Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250306023923.38777-3-liuhangbin@gmail.com Signed-off-by: Paolo Abeni tools/testing/selftests/drivers/net/bonding/bond_options.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0c5e145a350de3b38cd5ae77a401b12c46fb7c1d Author: Hangbin Liu Date: Thu Mar 6 02:39:22 2025 +0000 bonding: fix incorrect MAC address setting to receive NS messages When validation on the backup slave is enabled, we need to validate the Neighbor Solicitation (NS) messages received on the backup slave. To receive these messages, the correct destination MAC address must be added to the slave. However, the target in bonding is a unicast address, which we cannot use directly. Instead, we should first convert it to a Solicited-Node Multicast Address and then derive the corresponding MAC address. Fix the incorrect MAC address setting on both slave_set_ns_maddr() and slave_set_ns_maddrs(). Since the two function names are similar. Add some description for the functions. Also only use one mac_addr variable in slave_set_ns_maddr() to save some code and logic. Fixes: 8eb36164d1a6 ("bonding: add ns target multicast address to slave device") Acked-by: Jay Vosburgh Reviewed-by: Nikolay Aleksandrov Signed-off-by: Hangbin Liu Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250306023923.38777-2-liuhangbin@gmail.com Signed-off-by: Paolo Abeni drivers/net/bonding/bond_options.c | 55 ++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 8 deletions(-) commit f5d83cf0eeb90fade4d5c4d17d24b8bee9ceeecc Author: Matt Johnston Date: Thu Mar 6 10:32:45 2025 +0800 net: mctp: unshare packets when reassembling Ensure that the frag_list used for reassembly isn't shared with other packets. This avoids incorrect reassembly when packets are cloned, and prevents a memory leak due to circular references between fragments and their skb_shared_info. The upcoming MCTP-over-USB driver uses skb_clone which can trigger the problem - other MCTP drivers don't share SKBs. A kunit test is added to reproduce the issue. Signed-off-by: Matt Johnston Fixes: 4a992bbd3650 ("mctp: Implement message fragmentation & reassembly") Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250306-matt-mctp-usb-v1-1-085502b3dd28@codeconstruct.com.au Signed-off-by: Paolo Abeni net/mctp/route.c | 10 ++++- net/mctp/test/route-test.c | 109 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 2 deletions(-) commit 986a6f5eacb900ea0f6036ef724b26e76be40f65 Author: Kees Cook Date: Mon Mar 10 15:25:31 2025 -0700 vboxsf: 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. This effectively reverts the change in 4e7487245abc ("vboxsf: fix building with GCC 15"), to add the annotation that has other uses (i.e. warning if the string is ever used with C string APIs). Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178 [1] Cc: Hans de Goede Cc: Brahmajit Das Cc: Christian Brauner Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20250310222530.work.374-kees@kernel.org Reviewed-by: Hans de Goede Signed-off-by: Christian Brauner fs/vboxsf/super.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f7edb07ad7c66eab3dce57384f33b9799d579133 Author: Piotr Jaroszynski Date: Tue Mar 4 00:51:27 2025 -0800 Fix mmu notifiers for range-based invalidates Update the __flush_tlb_range_op macro not to modify its parameters as these are unexepcted semantics. In practice, this fixes the call to mmu_notifier_arch_invalidate_secondary_tlbs() in __flush_tlb_range_nosync() to use the correct range instead of an empty range with start=end. The empty range was (un)lucky as it results in taking the invalidate-all path that doesn't cause correctness issues, but can certainly result in suboptimal perf. This has been broken since commit 6bbd42e2df8f ("mmu_notifiers: call invalidate_range() when invalidating TLBs") when the call to the notifiers was added to __flush_tlb_range(). It predates the addition of the __flush_tlb_range_op() macro from commit 360839027a6e ("arm64: tlb: Refactor the core flush algorithm of __flush_tlb_range") that made the bug hard to spot. Fixes: 6bbd42e2df8f ("mmu_notifiers: call invalidate_range() when invalidating TLBs") Signed-off-by: Piotr Jaroszynski Cc: Catalin Marinas Cc: Will Deacon Cc: Robin Murphy Cc: Alistair Popple Cc: Raghavendra Rao Ananta Cc: SeongJae Park Cc: Jason Gunthorpe Cc: John Hubbard Cc: Nicolin Chen Cc: linux-arm-kernel@lists.infradead.org Cc: iommu@lists.linux.dev Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org Reviewed-by: Catalin Marinas Reviewed-by: Alistair Popple Link: https://lore.kernel.org/r/20250304085127.2238030-1-pjaroszynski@nvidia.com Signed-off-by: Will Deacon arch/arm64/include/asm/tlbflush.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit d4234d131b0a3f9e65973f1cdc71bb3560f5d14b Author: Zhenhua Huang Date: Tue Mar 4 15:27:00 2025 +0800 arm64: mm: Populate vmemmap at the page level if not section aligned On the arm64 platform with 4K base page config, SECTION_SIZE_BITS is set to 27, making one section 128M. The related page struct which vmemmap points to is 2M then. Commit c1cc1552616d ("arm64: MMU initialisation") optimizes the vmemmap to populate at the PMD section level which was suitable initially since hot plug granule is always one section(128M). However, commit ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug") introduced a 2M(SUBSECTION_SIZE) hot plug granule, which disrupted the existing arm64 assumptions. The first problem is that if start or end is not aligned to a section boundary, such as when a subsection is hot added, populating the entire section is wasteful. The next problem is if we hotplug something that spans part of 128 MiB section (subsections, let's call it memblock1), and then hotplug something that spans another part of a 128 MiB section(subsections, let's call it memblock2), and subsequently unplug memblock1, vmemmap_free() will clear the entire PMD entry which also supports memblock2 even though memblock2 is still active. Assuming hotplug/unplug sizes are guaranteed to be symmetric. Do the fix similar to x86-64: populate to pages levels if start/end is not aligned with section boundary. Cc: stable@vger.kernel.org # v5.4+ Fixes: ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug") Acked-by: David Hildenbrand Signed-off-by: Zhenhua Huang Reviewed-by: Oscar Salvador Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20250304072700.3405036-1-quic_zhenhuah@quicinc.com Signed-off-by: Will Deacon arch/arm64/mm/mmu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 62531a1effa87bdab12d5104015af72e60d926ff Author: Amit Cohen Date: Wed Mar 5 14:15:09 2025 +0200 net: switchdev: Convert blocking notification chain to a raw one A blocking notification chain uses a read-write semaphore to protect the integrity of the chain. The semaphore is acquired for writing when adding / removing notifiers to / from the chain and acquired for reading when traversing the chain and informing notifiers about an event. In case of the blocking switchdev notification chain, recursive notifications are possible which leads to the semaphore being acquired twice for reading and to lockdep warnings being generated [1]. Specifically, this can happen when the bridge driver processes a SWITCHDEV_BRPORT_UNOFFLOADED event which causes it to emit notifications about deferred events when calling switchdev_deferred_process(). Fix this by converting the notification chain to a raw notification chain in a similar fashion to the netdev notification chain. Protect the chain using the RTNL mutex by acquiring it when modifying the chain. Events are always informed under the RTNL mutex, but add an assertion in call_switchdev_blocking_notifiers() to make sure this is not violated in the future. Maintain the "blocking" prefix as events are always emitted from process context and listeners are allowed to block. [1]: WARNING: possible recursive locking detected 6.14.0-rc4-custom-g079270089484 #1 Not tainted -------------------------------------------- ip/52731 is trying to acquire lock: ffffffff850918d8 ((switchdev_blocking_notif_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x58/0xa0 but task is already holding lock: ffffffff850918d8 ((switchdev_blocking_notif_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x58/0xa0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock((switchdev_blocking_notif_chain).rwsem); lock((switchdev_blocking_notif_chain).rwsem); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ip/52731: #0: ffffffff84f795b0 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0x727/0x1dc0 #1: ffffffff8731f628 (&net->rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0x790/0x1dc0 #2: ffffffff850918d8 ((switchdev_blocking_notif_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x58/0xa0 stack backtrace: ... ? __pfx_down_read+0x10/0x10 ? __pfx_mark_lock+0x10/0x10 ? __pfx_switchdev_port_attr_set_deferred+0x10/0x10 blocking_notifier_call_chain+0x58/0xa0 switchdev_port_attr_notify.constprop.0+0xb3/0x1b0 ? __pfx_switchdev_port_attr_notify.constprop.0+0x10/0x10 ? mark_held_locks+0x94/0xe0 ? switchdev_deferred_process+0x11a/0x340 switchdev_port_attr_set_deferred+0x27/0xd0 switchdev_deferred_process+0x164/0x340 br_switchdev_port_unoffload+0xc8/0x100 [bridge] br_switchdev_blocking_event+0x29f/0x580 [bridge] notifier_call_chain+0xa2/0x440 blocking_notifier_call_chain+0x6e/0xa0 switchdev_bridge_port_unoffload+0xde/0x1a0 ... Fixes: f7a70d650b0b6 ("net: bridge: switchdev: Ensure deferred event delivery on unoffload") Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Reviewed-by: Simon Horman Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Link: https://patch.msgid.link/20250305121509.631207-1-amcohen@nvidia.com Signed-off-by: Paolo Abeni net/switchdev/switchdev.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 12d8f318347b1d4feac48e8ac351d3786af39599 Author: Imre Deak Date: Fri Mar 7 20:31:52 2025 +0200 drm/dp_mst: Fix locking when skipping CSN before topology probing The handling of the MST Connection Status Notify message is skipped if the probing of the topology is still pending. Acquiring the drm_dp_mst_topology_mgr::probe_lock for this in drm_dp_mst_handle_up_req() is problematic: the task/work this function is called from is also responsible for handling MST down-request replies (in drm_dp_mst_handle_down_rep()). Thus drm_dp_mst_link_probe_work() - holding already probe_lock - could be blocked waiting for an MST down-request reply while drm_dp_mst_handle_up_req() is waiting for probe_lock while processing a CSN message. This leads to the probe work's down-request message timing out. A scenario similar to the above leading to a down-request timeout is handling a CSN message in drm_dp_mst_handle_conn_stat(), holding the probe_lock and sending down-request messages while a second CSN message sent by the sink subsequently is handled by drm_dp_mst_handle_up_req(). Fix the above by moving the logic to skip the CSN handling to drm_dp_mst_process_up_req(). This function is called from a work (separate from the task/work handling new up/down messages), already holding probe_lock. This solves the above timeout issue, since handling of down-request replies won't be blocked by probe_lock. Fixes: ddf983488c3e ("drm/dp_mst: Skip CSN if topology probing is not done yet") Cc: Wayne Lin Cc: Lyude Paul Cc: stable@vger.kernel.org # v6.6+ Reviewed-by: Wayne Lin Reviewed-by: Lyude Paul Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20250307183152.3822170-1-imre.deak@intel.com drivers/gpu/drm/display/drm_dp_mst_topology.c | 40 ++++++++++++++++----------- 1 file changed, 24 insertions(+), 16 deletions(-) commit 77b2ab31fc65c595ca0a339f6c5b8ef3adfae5c6 Author: Edward Cree Date: Fri Mar 7 15:47:31 2025 +0000 MAINTAINERS: sfc: remove Martin Habets Martin has left AMD and no longer works on the sfc driver. Signed-off-by: Edward Cree Link: https://patch.msgid.link/20250307154731.211368-1-edward.cree@amd.com Signed-off-by: Jakub Kicinski MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 547d2db056f779bbaab67f5cec64fcda5bea819c Merge: cfa693bf9d53 75cc19c8ff89 Author: Jakub Kicinski Date: Mon Mar 10 13:31:15 2025 -0700 Merge branch 'eth-bnxt-fix-several-bugs-in-the-bnxt-module' Taehee Yoo says: ==================== eth: bnxt: fix several bugs in the bnxt module The first fixes setting incorrect skb->truesize. When xdp-mb prog returns XDP_PASS, skb is allocated and initialized. Currently, The truesize is calculated as BNXT_RX_PAGE_SIZE * sinfo->nr_frags, but sinfo->nr_frags is flushed by napi_build_skb(). So, it stores sinfo before calling napi_build_skb() and then use it for calculate truesize. The second fixes kernel panic in the bnxt_queue_mem_alloc(). The bnxt_queue_mem_alloc() accesses rx ring descriptor. rx ring descriptors are allocated when the interface is up and it's freed when the interface is down. So, if bnxt_queue_mem_alloc() is called when the interface is down, kernel panic occurs. This patch makes the bnxt_queue_mem_alloc() return -ENETDOWN if rx ring descriptors are not allocated. The third patch fixes kernel panic in the bnxt_queue_{start | stop}(). When a queue is restarted bnxt_queue_{start | stop}() are called. These functions set MRU to 0 to stop packet flow and then to set up the remaining things. MRU variable is a member of vnic_info[] the first vnic_info is for default and the second is for ntuple. The first vnic_info is always allocated when interface is up, but the second is allocated only when ntuple is enabled. (ethtool -K eth0 ntuple ). Currently, the bnxt_queue_{start | stop}() access vnic_info[BNXT_VNIC_NTUPLE] regardless of whether ntuple is enabled or not. So kernel panic occurs. This patch make the bnxt_queue_{start | stop}() use bp->nr_vnics instead of BNXT_VNIC_NTUPLE. The fourth patch fixes a warning due to checksum state. The bnxt_rx_pkt() checks whether skb->ip_summed is not CHECKSUM_NONE before updating ip_summed. if ip_summed is not CHECKSUM_NONE, it WARNS about it. However, the bnxt_xdp_build_skb() is called in XDP-MB-PASS path and it updates ip_summed earlier than bnxt_rx_pkt(). So, in the XDP-MB-PASS path, the bnxt_rx_pkt() always warns about checksum. Updating ip_summed at the bnxt_xdp_build_skb() is unnecessary and duplicate, so it is removed. The fifth patch fixes a kernel panic in the bnxt_get_queue_stats{rx | tx}(). The bnxt_get_queue_stats{rx | tx}() callback functions are called when a queue is resetting. These internally access rx and tx rings without null check, but rings are allocated and initialized when the interface is up. So, these functions are called when the interface is down, it occurs a kernel panic. The sixth patch fixes memory leak in queue reset logic. When a queue is resetting, tpa_info is allocated for the new queue and tpa_info for an old queue is not used anymore. So it should be freed, but not. The seventh patch makes net_devmem_unbind_dmabuf() ignore -ENETDOWN. When devmem socket is closed, net_devmem_unbind_dmabuf() is called to unbind/release resources. If interface is down, the driver returns -ENETDOWN. The -ENETDOWN return value is not an actual error, because the interface will release resources when the interface is down. So, net_devmem_unbind_dmabuf() needs to ignore -ENETDOWN. The last patch adds XDP testcases to tools/testing/selftests/drivers/net/ping.py. ==================== Link: https://patch.msgid.link/20250309134219.91670-1-ap420073@gmail.com Signed-off-by: Jakub Kicinski commit 75cc19c8ff8932d7da23480a49d1f9a050289c37 Author: Taehee Yoo Date: Sun Mar 9 13:42:19 2025 +0000 selftests: drv-net: add xdp cases for ping.py ping.py has 3 cases, test_v4, test_v6 and test_tcp. But these cases are not executed on the XDP environment. So, it adds XDP environment, existing tests(test_v4, test_v6, and test_tcp) are executed too on the below XDP environment. So, it adds XDP cases. 1. xdp-generic + single-buffer 2. xdp-generic + multi-buffer 3. xdp-native + single-buffer 4. xdp-native + multi-buffer 5. xdp-offload It also makes test_{v4 | v6 | tcp} sending large size packets. this may help to check whether multi-buffer is working or not. Note that the physical interface may be down and then up when xdp is attached or detached. This takes some period to activate traffic. So sleep(10) is added if the test interface is the physical interface. netdevsim and veth type interfaces skip sleep. Signed-off-by: Taehee Yoo Link: https://patch.msgid.link/20250309134219.91670-9-ap420073@gmail.com Signed-off-by: Jakub Kicinski tools/testing/selftests/drivers/net/ping.py | 200 ++++++++++++++++++++++-- tools/testing/selftests/net/lib/xdp_dummy.bpf.c | 6 + 2 files changed, 191 insertions(+), 15 deletions(-) commit a70f891e0fa0435379ad4950e156a15a4ef88b4d Author: Taehee Yoo Date: Sun Mar 9 13:42:18 2025 +0000 net: devmem: do not WARN conditionally after netdev_rx_queue_restart() When devmem socket is closed, netdev_rx_queue_restart() is called to reset queue by the net_devmem_unbind_dmabuf(). But callback may return -ENETDOWN if the interface is down because queues are already freed when the interface is down so queue reset is not needed. So, it should not warn if the return value is -ENETDOWN. Signed-off-by: Taehee Yoo Reviewed-by: Mina Almasry Link: https://patch.msgid.link/20250309134219.91670-8-ap420073@gmail.com Signed-off-by: Jakub Kicinski net/core/devmem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 87dd2850835dd7886726b428a8ef7d73a60520c7 Author: Taehee Yoo Date: Sun Mar 9 13:42:17 2025 +0000 eth: bnxt: fix memory leak in queue reset When the queue is reset, the bnxt_alloc_one_tpa_info() is called to allocate tpa_info for the new queue. And then the old queue's tpa_info should be removed by the bnxt_free_one_tpa_info(), but it is not called. So memory leak occurs. It adds the bnxt_free_one_tpa_info() in the bnxt_queue_mem_free(). unreferenced object 0xffff888293cc0000 (size 16384): comm "ncdevmem", pid 2076, jiffies 4296604081 hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 40 75 78 93 82 88 ff ff ........@ux..... 40 75 78 93 02 00 00 00 00 00 00 00 00 00 00 00 @ux............. backtrace (crc 5d7d4798): ___kmalloc_large_node+0x10d/0x1b0 __kmalloc_large_node_noprof+0x17/0x60 __kmalloc_noprof+0x3f6/0x520 bnxt_alloc_one_tpa_info+0x5f/0x300 [bnxt_en] bnxt_queue_mem_alloc+0x8e8/0x14f0 [bnxt_en] netdev_rx_queue_restart+0x233/0x620 net_devmem_bind_dmabuf_to_queue+0x2a3/0x600 netdev_nl_bind_rx_doit+0xc00/0x10a0 genl_family_rcv_msg_doit+0x1d4/0x2b0 genl_rcv_msg+0x3fb/0x6c0 netlink_rcv_skb+0x12c/0x360 genl_rcv+0x24/0x40 netlink_unicast+0x447/0x710 netlink_sendmsg+0x712/0xbc0 __sys_sendto+0x3fd/0x4d0 __x64_sys_sendto+0xdc/0x1b0 Fixes: 2d694c27d32e ("bnxt_en: implement netdev_queue_mgmt_ops") Signed-off-by: Taehee Yoo Link: https://patch.msgid.link/20250309134219.91670-7-ap420073@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + 1 file changed, 1 insertion(+) commit f09af5fdfbd9b0fcee73aab1116904c53b199e97 Author: Taehee Yoo Date: Sun Mar 9 13:42:16 2025 +0000 eth: bnxt: fix kernel panic in the bnxt_get_queue_stats{rx | tx} When qstats-get operation is executed, callbacks of netdev_stats_ops are called. The bnxt_get_queue_stats{rx | tx} collect per-queue stats from sw_stats in the rings. But {rx | tx | cp}_ring are allocated when the interface is up. So, these rings are not allocated when the interface is down. The qstats-get is allowed even if the interface is down. However, the bnxt_get_queue_stats{rx | tx}() accesses cp_ring and tx_ring without null check. So, it needs to avoid accessing rings if the interface is down. Reproducer: ip link set $interface down ./cli.py --spec netdev.yaml --dump qstats-get OR ip link set $interface down python ./stats.py Splat looks like: BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 1680fa067 P4D 1680fa067 PUD 16be3b067 PMD 0 Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 0 UID: 0 PID: 1495 Comm: python3 Not tainted 6.14.0-rc4+ #32 5cd0f999d5a15c574ac72b3e4b907341 Hardware name: ASUS System Product Name/PRIME Z690-P D4, BIOS 0603 11/01/2021 RIP: 0010:bnxt_get_queue_stats_rx+0xf/0x70 [bnxt_en] Code: c6 87 b5 18 00 00 02 eb a2 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 01 RSP: 0018:ffffabef43cdb7e0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffffffffc04c8710 RCX: 0000000000000000 RDX: ffffabef43cdb858 RSI: 0000000000000000 RDI: ffff8d504e850000 RBP: ffff8d506c9f9c00 R08: 0000000000000004 R09: ffff8d506bcd901c R10: 0000000000000015 R11: ffff8d506bcd9000 R12: 0000000000000000 R13: ffffabef43cdb8c0 R14: ffff8d504e850000 R15: 0000000000000000 FS: 00007f2c5462b080(0000) GS:ffff8d575f600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000167fd0000 CR4: 00000000007506f0 PKRU: 55555554 Call Trace: ? __die+0x20/0x70 ? page_fault_oops+0x15a/0x460 ? sched_balance_find_src_group+0x58d/0xd10 ? exc_page_fault+0x6e/0x180 ? asm_exc_page_fault+0x22/0x30 ? bnxt_get_queue_stats_rx+0xf/0x70 [bnxt_en cdd546fd48563c280cfd30e9647efa420db07bf1] netdev_nl_stats_by_netdev+0x2b1/0x4e0 ? xas_load+0x9/0xb0 ? xas_find+0x183/0x1d0 ? xa_find+0x8b/0xe0 netdev_nl_qstats_get_dumpit+0xbf/0x1e0 genl_dumpit+0x31/0x90 netlink_dump+0x1a8/0x360 Fixes: af7b3b4adda5 ("eth: bnxt: support per-queue statistics") Signed-off-by: Taehee Yoo Reviewed-by: Somnath Kotur Link: https://patch.msgid.link/20250309134219.91670-6-ap420073@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c03e7d05aa0e2f7e9a9ce5ad8a12471a53f941dc Author: Taehee Yoo Date: Sun Mar 9 13:42:15 2025 +0000 eth: bnxt: do not update checksum in bnxt_xdp_build_skb() The bnxt_rx_pkt() updates ip_summed value at the end if checksum offload is enabled. When the XDP-MB program is attached and it returns XDP_PASS, the bnxt_xdp_build_skb() is called to update skb_shared_info. The main purpose of bnxt_xdp_build_skb() is to update skb_shared_info, but it updates ip_summed value too if checksum offload is enabled. This is actually duplicate work. When the bnxt_rx_pkt() updates ip_summed value, it checks if ip_summed is CHECKSUM_NONE or not. It means that ip_summed should be CHECKSUM_NONE at this moment. But ip_summed may already be updated to CHECKSUM_UNNECESSARY in the XDP-MB-PASS path. So the by skb_checksum_none_assert() WARNS about it. This is duplicate work and updating ip_summed in the bnxt_xdp_build_skb() is not needed. Splat looks like: WARNING: CPU: 3 PID: 5782 at ./include/linux/skbuff.h:5155 bnxt_rx_pkt+0x479b/0x7610 [bnxt_en] Modules linked in: bnxt_re bnxt_en rdma_ucm rdma_cm iw_cm ib_cm ib_uverbs veth xt_nat xt_tcpudp xt_conntrack nft_chain_nat xt_MASQUERADE nf_] CPU: 3 UID: 0 PID: 5782 Comm: socat Tainted: G W 6.14.0-rc4+ #27 Tainted: [W]=WARN Hardware name: ASUS System Product Name/PRIME Z690-P D4, BIOS 0603 11/01/2021 RIP: 0010:bnxt_rx_pkt+0x479b/0x7610 [bnxt_en] Code: 54 24 0c 4c 89 f1 4c 89 ff c1 ea 1f ff d3 0f 1f 00 49 89 c6 48 85 c0 0f 84 4c e5 ff ff 48 89 c7 e8 ca 3d a0 c8 e9 8f f4 ff ff <0f> 0b f RSP: 0018:ffff88881ba09928 EFLAGS: 00010202 RAX: 0000000000000000 RBX: 00000000c7590303 RCX: 0000000000000000 RDX: 1ffff1104e7d1610 RSI: 0000000000000001 RDI: ffff8881c91300b8 RBP: ffff88881ba09b28 R08: ffff888273e8b0d0 R09: ffff888273e8b070 R10: ffff888273e8b010 R11: ffff888278b0f000 R12: ffff888273e8b080 R13: ffff8881c9130e00 R14: ffff8881505d3800 R15: ffff888273e8b000 FS: 00007f5a2e7be080(0000) GS:ffff88881ba00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fff2e708ff8 CR3: 000000013e3b0000 CR4: 00000000007506f0 PKRU: 55555554 Call Trace: ? __warn+0xcd/0x2f0 ? bnxt_rx_pkt+0x479b/0x7610 ? report_bug+0x326/0x3c0 ? handle_bug+0x53/0xa0 ? exc_invalid_op+0x14/0x50 ? asm_exc_invalid_op+0x16/0x20 ? bnxt_rx_pkt+0x479b/0x7610 ? bnxt_rx_pkt+0x3e41/0x7610 ? __pfx_bnxt_rx_pkt+0x10/0x10 ? napi_complete_done+0x2cf/0x7d0 __bnxt_poll_work+0x4e8/0x1220 ? __pfx___bnxt_poll_work+0x10/0x10 ? __pfx_mark_lock.part.0+0x10/0x10 bnxt_poll_p5+0x36a/0xfa0 ? __pfx_bnxt_poll_p5+0x10/0x10 __napi_poll.constprop.0+0xa0/0x440 net_rx_action+0x899/0xd00 ... Following ping.py patch adds xdp-mb-pass case. so ping.py is going to be able to reproduce this issue. Fixes: 1dc4c557bfed ("bnxt: adding bnxt_xdp_build_skb to build skb from multibuffer xdp_buff") Signed-off-by: Taehee Yoo Reviewed-by: Somnath Kotur Link: https://patch.msgid.link/20250309134219.91670-5-ap420073@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 11 ++--------- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 3 +-- 3 files changed, 5 insertions(+), 12 deletions(-) commit 661958552eda5bf64bfafb4821cbdded935f1f68 Author: Taehee Yoo Date: Sun Mar 9 13:42:14 2025 +0000 eth: bnxt: do not use BNXT_VNIC_NTUPLE unconditionally in queue restart logic When a queue is restarted, it sets MRU to 0 for stopping packet flow. MRU variable is a member of vnic_info[], the first vnic_info is default and the second is ntuple. Only when ntuple is enabled(ethtool -K eth0 ntuple on), vnic_info for ntuple is allocated in init logic. The bp->nr_vnics indicates how many vnic_info are allocated. However bnxt_queue_{start | stop}() accesses vnic_info[BNXT_VNIC_NTUPLE] regardless of ntuple state. Reviewed-by: Somnath Kotur Fixes: b9d2956e869c ("bnxt_en: stop packet flow during bnxt_queue_stop/start") Signed-off-by: Taehee Yoo Link: https://patch.msgid.link/20250309134219.91670-4-ap420073@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ca2456e073957781e1184de68551c65161b2bd30 Author: Taehee Yoo Date: Sun Mar 9 13:42:13 2025 +0000 eth: bnxt: return fail if interface is down in bnxt_queue_mem_alloc() The bnxt_queue_mem_alloc() is called to allocate new queue memory when a queue is restarted. It internally accesses rx buffer descriptor corresponding to the index. The rx buffer descriptor is allocated and set when the interface is up and it's freed when the interface is down. So, if queue is restarted if interface is down, kernel panic occurs. Splat looks like: BUG: unable to handle page fault for address: 000000000000b240 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 3 UID: 0 PID: 1563 Comm: ncdevmem2 Not tainted 6.14.0-rc2+ #9 844ddba6e7c459cafd0bf4db9a3198e Hardware name: ASUS System Product Name/PRIME Z690-P D4, BIOS 0603 11/01/2021 RIP: 0010:bnxt_queue_mem_alloc+0x3f/0x4e0 [bnxt_en] Code: 41 54 4d 89 c4 4d 69 c0 c0 05 00 00 55 48 89 f5 53 48 89 fb 4c 8d b5 40 05 00 00 48 83 ec 15 RSP: 0018:ffff9dcc83fef9e8 EFLAGS: 00010202 RAX: ffffffffc0457720 RBX: ffff934ed8d40000 RCX: 0000000000000000 RDX: 000000000000001f RSI: ffff934ea508f800 RDI: ffff934ea508f808 RBP: ffff934ea508f800 R08: 000000000000b240 R09: ffff934e84f4b000 R10: ffff9dcc83fefa30 R11: ffff934e84f4b000 R12: 000000000000001f R13: ffff934ed8d40ac0 R14: ffff934ea508fd40 R15: ffff934e84f4b000 FS: 00007fa73888c740(0000) GS:ffff93559f780000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000b240 CR3: 0000000145a2e000 CR4: 00000000007506f0 PKRU: 55555554 Call Trace: ? __die+0x20/0x70 ? page_fault_oops+0x15a/0x460 ? exc_page_fault+0x6e/0x180 ? asm_exc_page_fault+0x22/0x30 ? __pfx_bnxt_queue_mem_alloc+0x10/0x10 [bnxt_en 7f85e76f4d724ba07471d7e39d9e773aea6597b7] ? bnxt_queue_mem_alloc+0x3f/0x4e0 [bnxt_en 7f85e76f4d724ba07471d7e39d9e773aea6597b7] netdev_rx_queue_restart+0xc5/0x240 net_devmem_bind_dmabuf_to_queue+0xf8/0x200 netdev_nl_bind_rx_doit+0x3a7/0x450 genl_family_rcv_msg_doit+0xd9/0x130 genl_rcv_msg+0x184/0x2b0 ? __pfx_netdev_nl_bind_rx_doit+0x10/0x10 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x54/0x100 genl_rcv+0x24/0x40 ... Reviewed-by: Somnath Kotur Reviewed-by: Jakub Kicinski Fixes: 2d694c27d32e ("bnxt_en: implement netdev_queue_mgmt_ops") Signed-off-by: Taehee Yoo Reviewed-by: Mina Almasry Link: https://patch.msgid.link/20250309134219.91670-3-ap420073@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++ 1 file changed, 3 insertions(+) commit 9f7b2aa5034e24d3c49db73d5f760c0435fe31c2 Author: Taehee Yoo Date: Sun Mar 9 13:42:12 2025 +0000 eth: bnxt: fix truesize for mb-xdp-pass case When mb-xdp is set and return is XDP_PASS, packet is converted from xdp_buff to sk_buff with xdp_update_skb_shared_info() in bnxt_xdp_build_skb(). bnxt_xdp_build_skb() passes incorrect truesize argument to xdp_update_skb_shared_info(). The truesize is calculated as BNXT_RX_PAGE_SIZE * sinfo->nr_frags but the skb_shared_info was wiped by napi_build_skb() before. So it stores sinfo->nr_frags before bnxt_xdp_build_skb() and use it instead of getting skb_shared_info from xdp_get_shared_info_from_buff(). Splat looks like: ------------[ cut here ]------------ WARNING: CPU: 2 PID: 0 at net/core/skbuff.c:6072 skb_try_coalesce+0x504/0x590 Modules linked in: xt_nat xt_tcpudp veth af_packet xt_conntrack nft_chain_nat xt_MASQUERADE nf_conntrack_netlink xfrm_user xt_addrtype nft_coms CPU: 2 UID: 0 PID: 0 Comm: swapper/2 Not tainted 6.14.0-rc2+ #3 RIP: 0010:skb_try_coalesce+0x504/0x590 Code: 4b fd ff ff 49 8b 34 24 40 80 e6 40 0f 84 3d fd ff ff 49 8b 74 24 48 40 f6 c6 01 0f 84 2e fd ff ff 48 8d 4e ff e9 25 fd ff ff <0f> 0b e99 RSP: 0018:ffffb62c4120caa8 EFLAGS: 00010287 RAX: 0000000000000003 RBX: ffffb62c4120cb14 RCX: 0000000000000ec0 RDX: 0000000000001000 RSI: ffffa06e5d7dc000 RDI: 0000000000000003 RBP: ffffa06e5d7ddec0 R08: ffffa06e6120a800 R09: ffffa06e7a119900 R10: 0000000000002310 R11: ffffa06e5d7dcec0 R12: ffffe4360575f740 R13: ffffe43600000000 R14: 0000000000000002 R15: 0000000000000002 FS: 0000000000000000(0000) GS:ffffa0755f700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f147b76b0f8 CR3: 00000001615d4000 CR4: 00000000007506f0 PKRU: 55555554 Call Trace: ? __warn+0x84/0x130 ? skb_try_coalesce+0x504/0x590 ? report_bug+0x18a/0x1a0 ? handle_bug+0x53/0x90 ? exc_invalid_op+0x14/0x70 ? asm_exc_invalid_op+0x16/0x20 ? skb_try_coalesce+0x504/0x590 inet_frag_reasm_finish+0x11f/0x2e0 ip_defrag+0x37a/0x900 ip_local_deliver+0x51/0x120 ip_sublist_rcv_finish+0x64/0x70 ip_sublist_rcv+0x179/0x210 ip_list_rcv+0xf9/0x130 How to reproduce: ip link set $interface1 xdp obj xdp_pass.o ip link set $interface1 mtu 9000 up ip a a 10.0.0.1/24 dev $interface1 ip link set $interfac2 mtu 9000 up ip a a 10.0.0.2/24 dev $interface2 ping 10.0.0.1 -s 65000 Following ping.py patch adds xdp-mb-pass case. so ping.py is going to be able to reproduce this issue. Fixes: 1dc4c557bfed ("bnxt: adding bnxt_xdp_build_skb to build skb from multibuffer xdp_buff") Signed-off-by: Taehee Yoo Link: https://patch.msgid.link/20250309134219.91670-2-ap420073@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 ++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) commit cfa693bf9d5361608e2963f5dae053b3695af8eb Author: Oleksij Rempel Date: Fri Mar 7 11:12:23 2025 +0100 net: usb: lan78xx: Sanitize return values of register read/write functions usb_control_msg() returns the number of transferred bytes or a negative error code. The current implementation propagates the transferred byte count, which is unintended. This affects code paths that assume a boolean success/failure check, such as the EEPROM detection logic. Fix this by ensuring lan78xx_read_reg() and lan78xx_write_reg() return only 0 on success and preserve negative error codes. This approach is consistent with existing usage, as the transferred byte count is not explicitly checked elsewhere. Fixes: 8b1b2ca83b20 ("net: usb: lan78xx: Improve error handling in EEPROM and OTP operations") Reported-by: Mark Brown Closes: https://lore.kernel.org/all/ac965de8-f320-430f-80f6-b16f4e1ba06d@sirena.org.uk Signed-off-by: Oleksij Rempel Tested-by: Mark Brown Link: https://patch.msgid.link/20250307101223.3025632-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski drivers/net/usb/lan78xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4d872d51bc9d7b899c1f61534e3dbde72613f627 Merge: 80e54e84911a e3e89178a9f4 Author: Linus Torvalds Date: Mon Mar 10 10:14:56 2025 -1000 Merge tag 'x86-urgent-2025-03-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: - Fix out-of-bounds access on CPU-less AMD NUMA systems by the microcode code - Make the kernel SGX CPU init code less passive-aggressive about non-working SGX features, instead of silently keeping the driver disabled, this is something people are running into. This doesn't affect functionality, it's a sysadmin QoL fix * tag 'x86-urgent-2025-03-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode/AMD: Fix out-of-bounds on systems with CPU-less NUMA nodes x86/sgx: Warn explicitly if X86_FEATURE_SGX_LC is not enabled commit d0a4a1b36d7a71b45972ef33762c3fc082bec1db Author: Kory Maincent Date: Fri Mar 7 10:12:55 2025 +0100 net: ethtool: tsinfo: Fix dump command Fix missing initialization of ts_info->phc_index in the dump command, which could cause a netdev interface to incorrectly display a PTP provider at index 0 instead of "none". Fix it by initializing the phc_index to -1. In the same time, restore missing initialization of ts_info.cmd for the IOCTL case, as it was before the transition from ethnl_default_dumpit to custom ethnl_tsinfo_dumpit. Also, remove unnecessary zeroing of ts_info, as it is embedded within reply_data, which is fully zeroed two lines earlier. Fixes: b9e3f7dc9ed95 ("net: ethtool: tsinfo: Enhance tsinfo to support several hwtstamp by net topology") Signed-off-by: Kory Maincent Reviewed-by: Vadim Fedorenko Link: https://patch.msgid.link/20250307091255.463559-1-kory.maincent@bootlin.com Signed-off-by: Jakub Kicinski net/ethtool/tsinfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eab0396353be1c778eba1c0b5180176f04dd21ce Author: Wentao Liang Date: Fri Mar 7 10:18:20 2025 +0800 net/mlx5: handle errors in mlx5_chains_create_table() In mlx5_chains_create_table(), the return value of mlx5_get_fdb_sub_ns() and mlx5_get_flow_namespace() must be checked to prevent NULL pointer dereferences. If either function fails, the function should log error message with mlx5_core_warn() and return error pointer. Fixes: 39ac237ce009 ("net/mlx5: E-Switch, Refactor chains and priorities") Signed-off-by: Wentao Liang Reviewed-by: Tariq Toukan Link: https://patch.msgid.link/20250307021820.2646-1-vulab@iscas.ac.cn Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c | 5 +++++ 1 file changed, 5 insertions(+) commit 366fef794bd2b7c2e9df933f6828dd9739bfba84 Author: Ilpo Järvinen Date: Mon Mar 10 14:21:58 2025 +0200 : Allow the passing of both iomem and non-iomem pointers to no_free_ptr() Calling no_free_ptr() for an __iomem pointer results in Sparse complaining about the types: warning: incorrect type in argument 1 (different address spaces) expected void const volatile *val got void [noderef] __iomem *__val [ The example is from drivers/platform/x86/intel/pmc/core_ssram.c:283 ] The problem is caused by the signature of __must_check_fn() added in: 85be6d842447 ("cleanup: Make no_free_ptr() __must_check") ... to enforce that the return value is always used. Use __force to allow both iomem and non-iomem pointers to be given for no_free_ptr(). Reported-by: kernel test robot Signed-off-by: Ilpo Järvinen Signed-off-by: Ingo Molnar Reviewed-by: Andy Shevchenko Reviewed-by: Dan Williams Cc: "H. Peter Anvin" Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250310122158.20966-1-ilpo.jarvinen@linux.intel.com Closes: https://lore.kernel.org/oe-kbuild-all/202403050547.qnZtuNlN-lkp@intel.com/ include/linux/cleanup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ded6ad4c6e2005e959ea09abba16c451433dd34b Author: Alex Deucher Date: Sun Mar 9 12:26:50 2025 -0400 drm/amdgpu/vce2: fix ip block reference Need to use the correct IP block type. VCE vs VCN. Fixes mclk issues on Hawaii. Suggested by selendym. Fixes: 82ae6619a450 ("drm/amdgpu: update the handle ptr in wait_for_idle") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3997 Reviewed-by: Boyuan Zhang Cc: Sunil Khatri Signed-off-by: Alex Deucher (cherry picked from commit 02438acd252395628d74cfac692efbb676d21521) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e65e7bea220c3ce8c4c793b4ba35557f4994ab2b Author: Mario Limonciello Date: Fri Feb 28 13:18:14 2025 -0600 drm/amd/display: Fix slab-use-after-free on hdcp_work [Why] A slab-use-after-free is reported when HDCP is destroyed but the property_validate_dwork queue is still running. [How] Cancel the delayed work when destroying workqueue. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4006 Fixes: da3fd7ac0bcf ("drm/amd/display: Update CP property based on HW query") Cc: Alex Deucher Reviewed-by: Alex Hung Signed-off-by: Mario Limonciello Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 725a04ba5a95e89c89633d4322430cfbca7ce128) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 1 + 1 file changed, 1 insertion(+) commit 79e31396fdd7037c503e6add15af7cb00633ea92 Author: Alex Hung Date: Thu Feb 27 16:36:25 2025 -0700 drm/amd/display: Assign normalized_pix_clk when color depth = 14 [WHY & HOW] A warning message "WARNING: CPU: 4 PID: 459 at ... /dc_resource.c:3397 calculate_phy_pix_clks+0xef/0x100 [amdgpu]" occurs because the display_color_depth == COLOR_DEPTH_141414 is not handled. This is observed in Radeon RX 6600 XT. It is fixed by assigning pix_clk * (14 * 3) / 24 - same as the rests. Also fixes the indentation in get_norm_pix_clk. Reviewed-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 274a87eb389f58eddcbc5659ab0b180b37e92775) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 5760388d9681ac743038b846b9082b9023969551 Author: Mario Limonciello Date: Sun Feb 23 00:04:35 2025 -0600 drm/amd/display: Restore correct backlight brightness after a GPU reset [Why] GPU reset will attempt to restore cached state, but brightness doesn't get restored. It will come back at 100% brightness, but userspace thinks it's the previous value. [How] When running resume sequence if GPU is in reset restore brightness to previous value. Acked-by: Wayne Lin Signed-off-by: Mario Limonciello Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 5e19e2b57b6bb640d68dfc7991e1e182922cf867) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b5a981e1b34e44f94a5967f730fff4166f2101e8 Author: Mario Limonciello Date: Sat Feb 22 23:37:32 2025 -0600 drm/amd/display: fix default brightness [Why] To avoid flickering during boot default brightness level set by BIOS should be maintained for as much of the boot as feasible. commit 2fe87f54abdc ("drm/amd/display: Set default brightness according to ACPI") attempted to set the right levels for AC vs DC, but brightness still got reset to maximum level in initialization code for setup_backlight_device(). [How] Remove the hardcoded initialization in setup_backlight_device() and instead program brightness value to match BIOS (AC or DC). This avoids a brightness flicker from kernel changing the value. Userspace may however still change it during boot. Fixes: 2fe87f54abdc ("drm/amd/display: Set default brightness according to ACPI") Acked-by: Wayne Lin Signed-off-by: Mario Limonciello Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 0747acf3311229e22009bec4a9e7fc30c879e842) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40b8c14936bd2726354c856251f6baed9869e760 Author: Leo Li Date: Thu Feb 20 16:20:26 2025 -0500 drm/amd/display: Disable unneeded hpd interrupts during dm_init [Why] It seems HPD interrupts are enabled by default for all connectors, even if the hpd source isn't valid. An eDP for example, does not have a valid hpd source (but does have a valid hpdrx source; see construct_phy()). Thus, eDPs should have their hpd interrupt disabled. In the past, this wasn't really an issue. Although the driver gets interrupted, then acks by writing to hw registers, there weren't any subscribed handlers that did anything meaningful (see register_hpd_handlers()). But things changed with the introduction of IPS. s2idle requires that the driver allows IPS for DMUB fw to put hw to sleep. Since register access requires hw to be awake, the driver will block IPS entry to do so. And no IPS means no hw sleep during s2idle. This was the observation on DCN35 systems with an eDP. During suspend, the eDP toggled its hpd pin as part of the panel power down sequence. The driver was then interrupted, and acked by writing to registers, blocking IPS entry. [How] Since DC marks eDP connections as having invalid hpd sources (see construct_phy()), DM should disable them at the hw level. Do so in amdgpu_dm_hpd_init() by disabling all hpd ints first, then selectively enabling ones for connectors that have valid hpd sources. Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Leo Li Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 7b1ba19eb15f88e70782642ce2d934211269337b) Cc: stable@vger.kernel.org .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 64 +++++++++++++++------- 1 file changed, 45 insertions(+), 19 deletions(-) commit 4afacc9948e1f8fdbca401d259ae65ad93d298c0 Author: Mario Limonciello Date: Thu Mar 6 12:51:24 2025 -0600 drm/amd: Keep display off while going into S4 When userspace invokes S4 the flow is: 1) amdgpu_pmops_prepare() 2) amdgpu_pmops_freeze() 3) Create hibernation image 4) amdgpu_pmops_thaw() 5) Write out image to disk 6) Turn off system Then on resume amdgpu_pmops_restore() is called. This flow has a problem that because amdgpu_pmops_thaw() is called it will call amdgpu_device_resume() which will resume all of the GPU. This includes turning the display hardware back on and discovering connectors again. This is an unexpected experience for the display to turn back on. Adjust the flow so that during the S4 sequence display hardware is not turned back on. Reported-by: Xaver Hugl Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2038 Cc: Muhammad Usama Anjum Tested-by: Muhammad Usama Anjum Acked-by: Alex Deucher Acked-by: Harry Wentland Link: https://lore.kernel.org/r/20250306185124.44780-1-mario.limonciello@amd.com Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher (cherry picked from commit 68bfdc8dc0a1a7fdd9ab61e69907ae71a6fd3d91) drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 +++++++++-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++ 2 files changed, 14 insertions(+), 2 deletions(-) commit e204aab79e01bc8ff750645666993ed8b719de57 Author: Aliaksei Urbanski Date: Thu Mar 6 13:36:03 2025 +0300 drm/amd/display: fix missing .is_two_pixels_per_container Starting from 6.11, AMDGPU driver, while being loaded with amdgpu.dc=1, due to lack of .is_two_pixels_per_container function in dce60_tg_funcs, causes a NULL pointer dereference on PCs with old GPUs, such as R9 280X. So this fix adds missing .is_two_pixels_per_container to dce60_tg_funcs. Reported-by: Rosen Penev Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3942 Fixes: e6a901a00822 ("drm/amd/display: use even ODM slice width for two pixels per container") Signed-off-by: Aliaksei Urbanski Signed-off-by: Alex Deucher (cherry picked from commit bd4b125eb949785c6f8a53b0494e32795421209d) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/dc/dce60/dce60_timing_generator.c | 1 + 1 file changed, 1 insertion(+) commit df1e82e7acd3c50b65ca0e2e09089b78382d14ab Author: David Rosca Date: Thu Feb 13 15:30:37 2025 +0100 drm/amdgpu/display: Allow DCC for video formats on GFX12 We advertise DCC as supported for NV12/P010 formats on GFX12, but it would fail on this check on atomic commit. Signed-off-by: David Rosca Reviewed-by: Ruijing Dong Signed-off-by: Alex Deucher (cherry picked from commit ba795235a2b99ba9bbef647ab003b2f3145d9bbb) Cc: stable@vger.kernel.org # 6.12.x drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f5d4e81774c42d9c2ea3980e570f3330ff2ed5d2 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 (cherry picked from commit 8da8aecf1f2d89c2b8188bcf7aa252ec146ddd12) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_vm.c | 3 --- 1 file changed, 3 deletions(-) commit fd10709e28d2fa9015667aee56d92099fc97aa0d Author: Bastien Nocera Date: Fri Mar 7 15:37:32 2025 +0100 MAINTAINERS: Remove myself from the goodix touchscreen maintainers Haven't authored any commits to that driver in 10 years, and haven't had supported hardware for nearly as long. Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20250307143740.960328-1-hadess@hadess.net Signed-off-by: Dmitry Torokhov MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 3aa660c059240e0c795217182cf7df32909dd917 Author: Namjae Jeon Date: Thu Mar 6 14:14:58 2025 +0900 ksmbd: prevent connection release during oplock break notification ksmbd_work could be freed when after connection release. Increment r_count of ksmbd_conn to indicate that requests are not finished yet and to not release the connection. Cc: stable@vger.kernel.org Reported-by: Norbert Szetei Tested-by: Norbert Szetei Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/smb/server/connection.c | 20 ++++++++++++++++++++ fs/smb/server/connection.h | 2 ++ fs/smb/server/oplock.c | 6 ++++++ fs/smb/server/server.c | 14 ++------------ 4 files changed, 30 insertions(+), 12 deletions(-) commit bb39ed47065455604729404729d9116868638d31 Author: Namjae Jeon Date: Wed Mar 5 21:21:43 2025 +0900 ksmbd: fix use-after-free in ksmbd_free_work_struct ->interim_entry of ksmbd_work could be deleted after oplock is freed. We don't need to manage it with linked list. The interim request could be immediately sent whenever a oplock break wait is needed. Cc: stable@vger.kernel.org Reported-by: Norbert Szetei Tested-by: Norbert Szetei Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/smb/server/ksmbd_work.c | 3 --- fs/smb/server/ksmbd_work.h | 1 - fs/smb/server/oplock.c | 37 +++++++++++++++---------------------- fs/smb/server/oplock.h | 1 - 4 files changed, 15 insertions(+), 27 deletions(-) commit 39393f5c5c795992507aa5005a9d58396a5b07f1 Author: Damien Le Moal Date: Thu Mar 6 17:55:49 2025 +0900 nvmet: pci-epf: Do not add an IRQ vector if not needed The function nvmet_pci_epf_create_cq() always unconditionally calls nvmet_pci_epf_add_irq_vector() to add an IRQ vector for a completion queue. But this is not correct if the host requested the creation of a completion queue for polling, without an IRQ vector specified (i.e. the flag NVME_CQ_IRQ_ENABLED is not set). Fix this by calling nvmet_pci_epf_add_irq_vector() and setting the queue flag NVMET_PCI_EPF_Q_IRQ_ENABLED for the cq only if NVME_CQ_IRQ_ENABLED is set. While at it, also fix the error path to add the missing removal of the added IRQ vector if nvmet_cq_create() fails. Fixes: 0faa0fe6f90e ("nvmet: New NVMe PCI endpoint function target driver") Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch drivers/nvme/target/pci-epf.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit bf9b8020a80d32f6aa80591297a087d0519dc931 Author: Damien Le Moal Date: Thu Mar 6 17:55:48 2025 +0900 nvmet: pci-epf: Set NVMET_PCI_EPF_Q_LIVE when a queue is fully created The function nvmet_pci_epf_create_sq() use test_and_set_bit() to check that a submission queue is not already live and if not, set the NVMET_PCI_EPF_Q_LIVE queue flag to declare the sq live (ready to use). However, this is done on entry to the function, before the submission queue is actually fully initialized and ready to use. This creates a race situation with the function nvmet_pci_epf_poll_sqs_work() which looks at the NVMET_PCI_EPF_Q_LIVE queue flag to poll the submission queue when it is live. This race can lead to invalid DMA transfers if nvmet_pci_epf_poll_sqs_work() runs after the NVMET_PCI_EPF_Q_LIVE flag is set but before setting the sq pci address and doorbell ofset. Avoid this race by only testing the NVMET_PCI_EPF_Q_LIVE flag on entry to nvmet_pci_epf_create_sq() and setting it after the submission queue is fully setup before nvmet_pci_epf_create_sq() returns success. Since the function nvmet_pci_epf_create_cq() also has the same racy flag setting pattern, also make a similar change in that function. Fixes: 0faa0fe6f90e ("nvmet: New NVMe PCI endpoint function target driver") Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch drivers/nvme/target/pci-epf.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 6fbafe1cbed10e53b3cf236a8a1987425206dd8e Author: Panagiotis Foliadis Date: Sat Mar 8 16:49:05 2025 +0000 rust: task: fix `SAFETY` comment in `Task::wake_up` The `SAFETY` comment inside the `wake_up` method references erroneously the `signal_pending` C function instead of the `wake_up_process` which is actually called. Fix the comment to reference the correct C function. Fixes: fe95f58320e6 ("rust: task: adjust safety comments in Task methods") Signed-off-by: Panagiotis Foliadis Reviewed-by: Charalampos Mitrodimas Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250308-comment-fix-v1-1-4bba709fd36d@posteo.net [ Slightly reworded. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/task.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73fe9073c0cc28056cb9de0c8a516dac070f1d1f Author: Michael Kelley Date: Sun Mar 9 20:52:08 2025 -0700 Drivers: hv: vmbus: Don't release fb_mmio resource in vmbus_free_mmio() The VMBus driver manages the MMIO space it owns via the hyperv_mmio resource tree. Because the synthetic video framebuffer portion of the MMIO space is initially setup by the Hyper-V host for each guest, the VMBus driver does an early reserve of that portion of MMIO space in the hyperv_mmio resource tree. It saves a pointer to that resource in fb_mmio. When a VMBus driver requests MMIO space and passes "true" for the "fb_overlap_ok" argument, the reserved framebuffer space is used if possible. In that case it's not necessary to do another request against the "shadow" hyperv_mmio resource tree because that resource was already requested in the early reserve steps. However, the vmbus_free_mmio() function currently does no special handling for the fb_mmio resource. When a framebuffer device is removed, or the driver is unbound, the current code for vmbus_free_mmio() releases the reserved resource, leaving fb_mmio pointing to memory that has been freed. If the same or another driver is subsequently bound to the device, vmbus_allocate_mmio() checks against fb_mmio, and potentially gets garbage. Furthermore a second unbind operation produces this "nonexistent resource" error because of the unbalanced behavior between vmbus_allocate_mmio() and vmbus_free_mmio(): [ 55.499643] resource: Trying to free nonexistent resource <0x00000000f0000000-0x00000000f07fffff> Fix this by adding logic to vmbus_free_mmio() to recognize when MMIO space in the fb_mmio reserved area would be released, and don't release it. This filtering ensures the fb_mmio resource always exists, and makes vmbus_free_mmio() more parallel with vmbus_allocate_mmio(). Fixes: be000f93e5d7 ("drivers:hv: Track allocations of children of hv_vmbus in private resource tree") Signed-off-by: Michael Kelley Tested-by: Saurabh Sengar Reviewed-by: Saurabh Sengar Link: https://lore.kernel.org/r/20250310035208.275764-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20250310035208.275764-1-mhklinux@outlook.com> drivers/hv/vmbus_drv.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit de93ddf88088f7624b589d0ff3af9effb87e8f3b Author: Ville Syrjälä Date: Wed Feb 19 18:02:39 2025 +0200 drm/atomic: Filter out redundant DPMS calls Video players (eg. mpv) do periodic XResetScreenSaver() calls to keep the screen on while the video playing. The modesetting ddx plumbs these straight through into the kernel as DPMS setproperty ioctls, without any filtering whatsoever. When implemented via atomic these end up as empty commits on the crtc (which will nonetheless take one full frame), which leads to a dropped frame every time XResetScreenSaver() is called. Let's just filter out redundant DPMS property changes in the kernel to avoid this issue. v2: Explain the resulting commits a bit better (Sima) Document the behaviour in uapi docs (Sima) Cc: stable@vger.kernel.org Testcase: igt/kms_flip/flip-vs-dpms-on-nop Reviewed-by: Simona Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250219160239.17502-1-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_atomic_uapi.c | 4 ++++ drivers/gpu/drm/drm_connector.c | 4 ++++ 2 files changed, 8 insertions(+) commit 3f674e7b670b7b7d9261935820e4eba3c059f835 Author: Keith Busch Date: Thu Mar 6 14:25:57 2025 -0800 nvme-pci: fix stuck reset on concurrent DPC and HP The PCIe error handling has the nvme driver quiesce the device, attempt to restart it, then wait for that restart to complete. A PCIe DPC event also toggles the PCIe link. If the slot doesn't have out-of-band presence detection, this will trigger a pciehp re-enumeration. The error handling that calls nvme_error_resume is holding the device lock while this happens. This lock blocks pciehp's request to disconnect the driver from proceeding. Meanwhile the nvme's reset can't make forward progress because its device isn't there anymore with outstanding IO, and the timeout handler won't do anything to fix it because the device is undergoing error handling. End result: deadlocked. Fix this by having the timeout handler short cut the disabling for a disconnected PCIe device. The downside is that we're relying on an IO timeout to clean up this mess, which could be a minute by default. Tested-by: Nilay Shroff Reviewed-by: Nilay Shroff Signed-off-by: Keith Busch drivers/nvme/host/pci.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit c605acb53f449f6289f042790307d7dc9e62d03d 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 (cherry picked from commit b4b05e53b550a886b4754b87fd0dd2b304579e85) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_guc_pc.c | 53 +++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 13 deletions(-) commit 3e331a6715ee26f2fabc59dad6bb36d810707028 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 (cherry picked from commit d945cc876277851053c0cf37927c8d7bd9d0e880) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_pm.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 6266f4a78131c795631440ea9c7b66cdfd399484 Author: Ville Syrjälä Date: Tue Feb 18 23:18:55 2025 +0200 drm/i915/cdclk: Do cdclk post plane programming later We currently call intel_set_cdclk_post_plane_update() far too early. When pipes are active during the reprogramming the current spot only works for the cd2x divider update case, as that is synchronize to the pipe's vblank. Squashing and crawling are not synchronized in any way, so doing the programming while the pipes/planes are potentially still using the old hardware state could lead to underruns. Move the post plane reprgramming to a spot where we know that the pipes/planes have switched over the new hardware state. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250218211913.27867-2-ville.syrjala@linux.intel.com Reviewed-by: Vinod Govindapillai (cherry picked from commit fb64f5568c0e0b5730733d70a012ae26b1a55815) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_display.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9106713bd2ab0cacd380cda0d3f0219f2e488086 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: 0a98219bcc96 ("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 (cherry picked from commit 70e5043ba85eae199b232e39921abd706b5c1fa4) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_hmm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 10c7988418d8f759ba70c4a558961e0bfa74647f 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: 12c2f962fe71 ("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 (cherry picked from commit 8e8d76f62329127b31c64a034b052fb9e30e92af) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_guc_submit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3e89178a9f4a80092578af3ff3c8478f9187d59 Author: Florent Revest Date: Mon Mar 10 15:42:43 2025 +0100 x86/microcode/AMD: Fix out-of-bounds on systems with CPU-less NUMA nodes Currently, load_microcode_amd() iterates over all NUMA nodes, retrieves their CPU masks and unconditionally accesses per-CPU data for the first CPU of each mask. According to Documentation/admin-guide/mm/numaperf.rst: "Some memory may share the same node as a CPU, and others are provided as memory only nodes." Therefore, some node CPU masks may be empty and wouldn't have a "first CPU". On a machine with far memory (and therefore CPU-less NUMA nodes): - cpumask_of_node(nid) is 0 - cpumask_first(0) is CONFIG_NR_CPUS - cpu_data(CONFIG_NR_CPUS) accesses the cpu_info per-CPU array at an index that is 1 out of bounds This does not have any security implications since flashing microcode is a privileged operation but I believe this has reliability implications by potentially corrupting memory while flashing a microcode update. When booting with CONFIG_UBSAN_BOUNDS=y on an AMD machine that flashes a microcode update. I get the following splat: UBSAN: array-index-out-of-bounds in arch/x86/kernel/cpu/microcode/amd.c:X:Y index 512 is out of range for type 'unsigned long[512]' [...] Call Trace: dump_stack __ubsan_handle_out_of_bounds load_microcode_amd request_microcode_amd reload_store kernfs_fop_write_iter vfs_write ksys_write do_syscall_64 entry_SYSCALL_64_after_hwframe Change the loop to go over only NUMA nodes which have CPUs before determining whether the first CPU on the respective node needs microcode update. [ bp: Massage commit message, fix typo. ] Fixes: 7ff6edf4fef3 ("x86/microcode/AMD: Fix mixed steppings support") Signed-off-by: Florent Revest Signed-off-by: Borislav Petkov (AMD) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250310144243.861978-1-revest@chromium.org arch/x86/kernel/cpu/microcode/amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3fa0e40df175acd60b71036b9a1fd62310aec03 Author: Yafang Shao Date: Wed Feb 5 11:24:38 2025 +0800 sched/clock: Don't define sched_clock_irqtime as static key The sched_clock_irqtime was defined as a static key in: 8722903cbb8f ("sched: Define sched_clock_irqtime as static key") However, this change introduces a 'sleeping in atomic context' warning: arch/x86/kernel/tsc.c:1214 mark_tsc_unstable() warn: sleeping in atomic context As analyzed by Dan, the affected code path is as follows: vcpu_load() <- disables preempt -> kvm_arch_vcpu_load() -> mark_tsc_unstable() <- sleeps virt/kvm/kvm_main.c 166 void vcpu_load(struct kvm_vcpu *vcpu) 167 { 168 int cpu = get_cpu(); ^^^^^^^^^^ This get_cpu() disables preemption. 169 170 __this_cpu_write(kvm_running_vcpu, vcpu); 171 preempt_notifier_register(&vcpu->preempt_notifier); 172 kvm_arch_vcpu_load(vcpu, cpu); 173 put_cpu(); 174 } arch/x86/kvm/x86.c 4979 if (unlikely(vcpu->cpu != cpu) || kvm_check_tsc_unstable()) { 4980 s64 tsc_delta = !vcpu->arch.last_host_tsc ? 0 : 4981 rdtsc() - vcpu->arch.last_host_tsc; 4982 if (tsc_delta < 0) 4983 mark_tsc_unstable("KVM discovered backwards TSC"); arch/x86/kernel/tsc.c 1206 void mark_tsc_unstable(char *reason) 1207 { 1208 if (tsc_unstable) 1209 return; 1210 1211 tsc_unstable = 1; 1212 if (using_native_sched_clock()) 1213 clear_sched_clock_stable(); --> 1214 disable_sched_clock_irqtime(); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ kernel/jump_label.c 245 void static_key_disable(struct static_key *key) 246 { 247 cpus_read_lock(); ^^^^^^^^^^^^^^^^ This lock has a might_sleep() in it which triggers the static checker warning. 248 static_key_disable_cpuslocked(key); 249 cpus_read_unlock(); 250 } Let revert this change for now as {disable,enable}_sched_clock_irqtime are used in many places, as pointed out by Sean, including the following: The code path in clocksource_watchdog(): clocksource_watchdog() | -> spin_lock(&watchdog_lock); | -> __clocksource_unstable() | -> clocksource.mark_unstable() == tsc_cs_mark_unstable() | -> disable_sched_clock_irqtime() And the code path in sched_clock_register(): /* Cannot register a sched_clock with interrupts on */ local_irq_save(flags); ... /* Enable IRQ time accounting if we have a fast enough sched_clock() */ if (irqtime > 0 || (irqtime == -1 && rate >= 1000000)) enable_sched_clock_irqtime(); local_irq_restore(flags); [ lkp@intel.com: reported a build error in the prev version ] [ mingo: cherry-picked it over into sched/urgent ] Closes: https://lore.kernel.org/kvm/37a79ba3-9ce0-479c-a5b0-2bd75d573ed3@stanley.mountain/ Fixes: 8722903cbb8f ("sched: Define sched_clock_irqtime as static key") Reported-by: Dan Carpenter Debugged-by: Dan Carpenter Debugged-by: Sean Christopherson Debugged-by: Michal Koutný Signed-off-by: Yafang Shao Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20250205032438.14668-1-laoar.shao@gmail.com kernel/sched/cputime.c | 8 ++++---- kernel/sched/sched.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 247fba13416af65b155949bae582d55c310f58b6 Author: Bard Liao Date: Mon Mar 10 16:04:40 2025 +0800 ASoC: rt722-sdca: add missing readable registers SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_FU15, RT722_SDCA_CTL_FU_CH_GAIN, CH_01) ... SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_FU15, RT722_SDCA_CTL_FU_CH_GAIN, CH_04) are used by the "FU15 Boost Volume" control, but not marked as readable. And the mbq size are 2 for those registers. Fixes: 7f5d6036ca005 ("ASoC: rt722-sdca: Add RT722 SDCA driver") Signed-off-by: Bard Liao Reviewed-by: Ranjani Sridharan Reviewed-by: Shuming Fan Link: https://patch.msgid.link/20250310080440.58797-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt722-sdca-sdw.c | 4 ++++ 1 file changed, 4 insertions(+) commit ac00bc2aeeacaa6e899d570e0c442cfc64978362 Merge: 80e54e84911a 502843396ec2 Author: Greg Kroah-Hartman Date: Mon Mar 10 12:35:18 2025 +0100 Merge tag 'thunderbolt-for-v6.14-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fix for v6.14-rc7 This includes single USB4/Thunderbolt fix for v6.14-rc7: - Fix use-after-free in resume from hibernate. This has been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.14-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Prevent use-after-free in resume from hibernate commit 65be5c95d08eedda570a6c888a12384c77fe7614 Author: Vladis Dronov Date: Sun Mar 9 18:22:16 2025 +0100 x86/sgx: Warn explicitly if X86_FEATURE_SGX_LC is not enabled The kernel requires X86_FEATURE_SGX_LC to be able to create SGX enclaves, not just X86_FEATURE_SGX. There is quite a number of hardware which has X86_FEATURE_SGX but not X86_FEATURE_SGX_LC. A kernel running on such hardware does not create the /dev/sgx_enclave file and does so silently. Explicitly warn if X86_FEATURE_SGX_LC is not enabled to properly notify users that the kernel disabled the SGX driver. The X86_FEATURE_SGX_LC, a.k.a. SGX Launch Control, is a CPU feature that enables LE (Launch Enclave) hash MSRs to be writable (with additional opt-in required in the 'feature control' MSR) when running enclaves, i.e. using a custom root key rather than the Intel proprietary key for enclave signing. I've hit this issue myself and have spent some time researching where my /dev/sgx_enclave file went on SGX-enabled hardware. Related links: https://github.com/intel/linux-sgx/issues/837 https://patchwork.kernel.org/project/platform-driver-x86/patch/20180827185507.17087-3-jarkko.sakkinen@linux.intel.com/ [ mingo: Made the error message a bit more verbose, and added other cases where the kernel fails to create the /dev/sgx_enclave device node. ] Signed-off-by: Vladis Dronov Signed-off-by: Ingo Molnar Acked-by: Kai Huang Cc: Jarkko Sakkinen Cc: Andy Lutomirski Cc: Sean Christopherson Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250309172215.21777-2-vdronov@redhat.com arch/x86/kernel/cpu/sgx/driver.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit accdd1198eaafd82d03390def709c9865ea5859b Merge: 00a7d39898c8 823869e1e616 Author: Christian Brauner Date: Mon Mar 10 11:09:25 2025 +0100 Merge afs RCU pathwalk fix Bring in the fix for afs_atcell_get_link() to handle RCU pathwalk from the afs branch for this cycle. This fix has to go upstream now. Signed-off-by: Christian Brauner commit 823869e1e61607ab0d433de3c8abed221dc80a5e Author: David Howells Date: Thu Mar 6 08:46:57 2025 +0000 afs: Fix afs_atcell_get_link() to handle RCU pathwalk The ->get_link() method may be entered under RCU pathwalk conditions (in which case, the dentry pointer is NULL). This is not taken account of by afs_atcell_get_link() and lockdep will complain when it tries to lock an rwsem. Fix this by marking net->ws_cell as __rcu and using RCU access macros on it and by making afs_atcell_get_link() just return a pointer to the name in RCU pathwalk without taking net->cells_lock or a ref on the cell as RCU will protect the name storage (the cell is already freed via call_rcu()). Fixes: 30bca65bbbae ("afs: Make /afs/@cell and /afs/.@cell symlinks") Reported-by: Alexander Viro Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20250310094206.801057-2-dhowells@redhat.com/ # v4 fs/afs/cell.c | 11 ++++++----- fs/afs/dynroot.c | 15 +++++++++++++-- fs/afs/internal.h | 2 +- fs/afs/proc.c | 4 ++-- 4 files changed, 22 insertions(+), 10 deletions(-) commit a2add513311b48cc924a699a8174db2c61ed5e8a Author: Jeff LaBundy Date: Sun Mar 9 20:29:59 2025 -0500 Input: iqs7222 - preserve system status register Some register groups reserve a byte at the end of their continuous address space. Depending on the variant of silicon, this field may share the same memory space as the lower byte of the system status register (0x10). In these cases, caching the reserved byte and writing it later may effectively reset the device depending on what happened in between the read and write operations. Solve this problem by avoiding any access to this last byte within offending register groups. This method replaces a workaround which attempted to write the reserved byte with up-to-date contents, but left a small window in which updates by the device could have been clobbered. Now that the driver does not touch these reserved bytes, the order in which the device's registers are written no longer matters, and they can be written in their natural order. The new method is also much more generic, and can be more easily extended to new variants of silicon with different register maps. As part of this change, the register read and write functions must be gently updated to support byte access instead of word access. Fixes: 2e70ef525b73 ("Input: iqs7222 - acknowledge reset before writing registers") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/Z85Alw+d9EHKXx2e@nixie71 Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/misc/iqs7222.c | 50 +++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) commit 09beefefb57bbc3a06d98f319d85db4d719d7bcb Author: Michael Kelley Date: Wed Feb 26 12:06:06 2025 -0800 x86/hyperv: Fix output argument to hypercall that changes page visibility The hypercall in hv_mark_gpa_visibility() is invoked with an input argument and an output argument. The output argument ostensibly returns the number of pages that were processed. But in fact, the hypercall does not provide any output, so the output argument is spurious. The spurious argument is harmless because Hyper-V ignores it, but in the interest of correctness and to avoid the potential for future problems, remove it. Signed-off-by: Michael Kelley Reviewed-by: Nuno Das Neves Link: https://lore.kernel.org/r/20250226200612.2062-2-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20250226200612.2062-2-mhklinux@outlook.com> arch/x86/hyperv/ivm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ea2f45ab0e53b255f72c85ccd99e2b394fc5fceb Author: Saurabh Sengar Date: Sat Mar 1 08:16:31 2025 -0800 fbdev: hyperv_fb: Allow graceful removal of framebuffer When a Hyper-V framebuffer device is unbind, hyperv_fb driver tries to release the framebuffer forcefully. If this framebuffer is in use it produce the following WARN and hence this framebuffer is never released. [ 44.111220] WARNING: CPU: 35 PID: 1882 at drivers/video/fbdev/core/fb_info.c:70 framebuffer_release+0x2c/0x40 < snip > [ 44.111289] Call Trace: [ 44.111290] [ 44.111291] ? show_regs+0x6c/0x80 [ 44.111295] ? __warn+0x8d/0x150 [ 44.111298] ? framebuffer_release+0x2c/0x40 [ 44.111300] ? report_bug+0x182/0x1b0 [ 44.111303] ? handle_bug+0x6e/0xb0 [ 44.111306] ? exc_invalid_op+0x18/0x80 [ 44.111308] ? asm_exc_invalid_op+0x1b/0x20 [ 44.111311] ? framebuffer_release+0x2c/0x40 [ 44.111313] ? hvfb_remove+0x86/0xa0 [hyperv_fb] [ 44.111315] vmbus_remove+0x24/0x40 [hv_vmbus] [ 44.111323] device_remove+0x40/0x80 [ 44.111325] device_release_driver_internal+0x20b/0x270 [ 44.111327] ? bus_find_device+0xb3/0xf0 Fix this by moving the release of framebuffer and assosiated memory to fb_ops.fb_destroy function, so that framebuffer framework handles it gracefully. While we fix this, also replace manual registrations/unregistration of framebuffer with devm_register_framebuffer. Fixes: 68a2d20b79b1 ("drivers/video: add Hyper-V Synthetic Video Frame Buffer Driver") Signed-off-by: Saurabh Sengar Reviewed-by: Michael Kelley Tested-by: Michael Kelley Link: https://lore.kernel.org/r/1740845791-19977-3-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <1740845791-19977-3-git-send-email-ssengar@linux.microsoft.com> drivers/video/fbdev/hyperv_fb.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit f5e728a50bb17336a20803dde488515b833ecd1d Author: Saurabh Sengar Date: Sat Mar 1 08:16:30 2025 -0800 fbdev: hyperv_fb: Simplify hvfb_putmem The device object required in 'hvfb_release_phymem' function for 'dma_free_coherent' can also be obtained from the 'info' pointer, making 'hdev' parameter in 'hvfb_putmem' redundant. Remove the unnecessary 'hdev' argument from 'hvfb_putmem'. Signed-off-by: Saurabh Sengar Reviewed-by: Michael Kelley Tested-by: Michael Kelley Link: https://lore.kernel.org/r/1740845791-19977-2-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <1740845791-19977-2-git-send-email-ssengar@linux.microsoft.com> drivers/video/fbdev/hyperv_fb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 304386373007aaca9236a3f36afac0bbedcd2bf0 Author: Michael Kelley Date: Tue Feb 18 15:01:30 2025 -0800 fbdev: hyperv_fb: Fix hang in kdump kernel when on Hyper-V Gen 2 VMs Gen 2 Hyper-V VMs boot via EFI and have a standard EFI framebuffer device. When the kdump kernel runs in such a VM, loading the efifb driver may hang because of accessing the framebuffer at the wrong memory address. The scenario occurs when the hyperv_fb driver in the original kernel moves the framebuffer to a different MMIO address because of conflicts with an already-running efifb or simplefb driver. The hyperv_fb driver then informs Hyper-V of the change, which is allowed by the Hyper-V FB VMBus device protocol. However, when the kexec command loads the kdump kernel into crash memory via the kexec_file_load() system call, the system call doesn't know the framebuffer has moved, and it sets up the kdump screen_info using the original framebuffer address. The transition to the kdump kernel does not go through the Hyper-V host, so Hyper-V does not reset the framebuffer address like it would do on a reboot. When efifb tries to run, it accesses a non-existent framebuffer address, which traps to the Hyper-V host. After many such accesses, the Hyper-V host thinks the guest is being malicious, and throttles the guest to the point that it runs very slowly or appears to have hung. When the kdump kernel is loaded into crash memory via the kexec_load() system call, the problem does not occur. In this case, the kexec command builds the screen_info table itself in user space from data returned by the FBIOGET_FSCREENINFO ioctl against /dev/fb0, which gives it the new framebuffer location. This problem was originally reported in 2020 [1], resulting in commit 3cb73bc3fa2a ("hyperv_fb: Update screen_info after removing old framebuffer"). This commit solved the problem by setting orig_video_isVGA to 0, so the kdump kernel was unaware of the EFI framebuffer. The efifb driver did not try to load, and no hang occurred. But in 2024, commit c25a19afb81c ("fbdev/hyperv_fb: Do not clear global screen_info") effectively reverted 3cb73bc3fa2a. Commit c25a19afb81c has no reference to 3cb73bc3fa2a, so perhaps it was done without knowing the implications that were reported with 3cb73bc3fa2a. In any case, as of commit c25a19afb81c, the original problem came back again. Interestingly, the hyperv_drm driver does not have this problem because it never moves the framebuffer. The difference is that the hyperv_drm driver removes any conflicting framebuffers *before* allocating an MMIO address, while the hyperv_fb drivers removes conflicting framebuffers *after* allocating an MMIO address. With the "after" ordering, hyperv_fb may encounter a conflict and move the framebuffer to a different MMIO address. But the conflict is essentially bogus because it is removed a few lines of code later. Rather than fix the problem with the approach from 2020 in commit 3cb73bc3fa2a, instead slightly reorder the steps in hyperv_fb so conflicting framebuffers are removed before allocating an MMIO address. Then the default framebuffer MMIO address should always be available, and there's never any confusion about which framebuffer address the kdump kernel should use -- it's always the original address provided by the Hyper-V host. This approach is already used by the hyperv_drm driver, and is consistent with the usage guidelines at the head of the module with the function aperture_remove_conflicting_devices(). This approach also solves a related minor problem when kexec_load() is used to load the kdump kernel. With current code, unbinding and rebinding the hyperv_fb driver could result in the framebuffer moving back to the default framebuffer address, because on the rebind there are no conflicts. If such a move is done after the kdump kernel is loaded with the new framebuffer address, at kdump time it could again have the wrong address. This problem and fix are described in terms of the kdump kernel, but it can also occur with any kernel started via kexec. See extensive discussion of the problem and solution at [2]. [1] https://lore.kernel.org/linux-hyperv/20201014092429.1415040-1-kasong@redhat.com/ [2] https://lore.kernel.org/linux-hyperv/BLAPR10MB521793485093FDB448F7B2E5FDE92@BLAPR10MB5217.namprd10.prod.outlook.com/ Reported-by: Thomas Tai Fixes: c25a19afb81c ("fbdev/hyperv_fb: Do not clear global screen_info") Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/20250218230130.3207-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20250218230130.3207-1-mhklinux@outlook.com> drivers/video/fbdev/hyperv_fb.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit aed709355fd05ef747e1af24a1d5d78cd7feb81e Author: Michael Kelley Date: Mon Feb 10 11:34:41 2025 -0800 drm/hyperv: Fix address space leak when Hyper-V DRM device is removed When a Hyper-V DRM device is probed, the driver allocates MMIO space for the vram, and maps it cacheable. If the device removed, or in the error path for device probing, the MMIO space is released but no unmap is done. Consequently the kernel address space for the mapping is leaked. Fix this by adding iounmap() calls in the device removal path, and in the error path during device probing. Fixes: f1f63cbb705d ("drm/hyperv: Fix an error handling path in hyperv_vmbus_probe()") Fixes: a0ab5abced55 ("drm/hyperv : Removing the restruction of VRAM allocation with PCI bar size") Signed-off-by: Michael Kelley Reviewed-by: Saurabh Sengar Tested-by: Saurabh Sengar Link: https://lore.kernel.org/r/20250210193441.2414-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20250210193441.2414-1-mhklinux@outlook.com> drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 80e54e84911a923c40d7bee33a34c1b4be148d7a Author: Linus Torvalds Date: Sun Mar 9 13:45:25 2025 -1000 Linux 6.14-rc6 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9712d38c87087ae34f8cede6583092c272507c52 Merge: 0dc1f314f854 b5e395653546 Author: Linus Torvalds Date: Sun Mar 9 09:23:14 2025 -1000 Merge tag 'kbuild-fixes-v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Use the specified $(LD) when building userprogs with Clang - Pass the correct target triple when compile-testing UAPI headers with Clang - Fix pacman-pkg build error with KBUILD_OUTPUT * tag 'kbuild-fixes-v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: install-extmod-build: Fix build when specifying KBUILD_OUTPUT docs: Kconfig: fix defconfig description kbuild: hdrcheck: fix cross build with clang kbuild: userprogs: use correct lld when linking through clang commit 0dc1f314f854257eb64dcea604a42a55225453a9 Merge: 51b38f3c5fe2 b13abcb7ddd8 Author: Linus Torvalds Date: Sun Mar 9 09:14:07 2025 -1000 Merge tag 'usb-6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB driver fixes for some reported issues. These contain: - typec driver fixes - dwc3 driver fixes - xhci driver fixes - renesas controller fixes - gadget driver fixes - a new USB quirk added All of these have been in linux-next with no reported issues" * tag 'usb-6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: typec: ucsi: Fix NULL pointer access usb: quirks: Add DELAY_INIT and NO_LPM for Prolific Mass Storage Card Reader usb: xhci: Fix host controllers "dying" after suspend and resume usb: dwc3: Set SUSPENDENABLE soon after phy init usb: hub: lack of clearing xHC resources usb: renesas_usbhs: Flush the notify_hotplug_work usb: renesas_usbhs: Use devm_usb_get_phy() usb: renesas_usbhs: Call clk_put() usb: dwc3: gadget: Prevent irq storm when TH re-executes usb: gadget: Check bmAttributes only if configuration is valid xhci: Restrict USB4 tunnel detection for USB3 devices to Intel hosts usb: xhci: Enable the TRB overfetch quirk on VIA VL805 usb: gadget: Fix setting self-powered state on suspend usb: typec: ucsi: increase timeout for PPM reset operations acpi: typec: ucsi: Introduce a ->poll_cci method usb: typec: tcpci_rt1711h: Unmask alert interrupts to fix functionality usb: gadget: Set self-powered based on MaxPower and bmAttributes usb: gadget: u_ether: Set is_suspend flag if remote wakeup fails usb: atm: cxacru: fix a flaw in existing endpoint checks commit 51b38f3c5fe23deb24e6e9bf98a105095c1fd147 Merge: 2cc699b3c2fe 78eb41f518f4 Author: Linus Torvalds Date: Sun Mar 9 09:11:42 2025 -1000 Merge tag 'driver-core-6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fix from Greg KH: "Here is a single driver core fix that resolves a reported memory leak. It's been in linux-next for 2 weeks now with no reported problems" * tag 'driver-core-6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: drivers: core: fix device leak in __fw_devlink_relax_cycles() commit 2cc699b3c2fe5ea84081059c88c46373cbebe630 Merge: a382b06d297e 2397d61ee45c Author: Linus Torvalds Date: Sun Mar 9 09:07:54 2025 -1000 Merge tag 'char-misc-6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc/IIO driver fixes from Greg KH: "Here are a number of misc and char and iio driver fixes that have been sitting in my tree for way too long. They contain: - iio driver fixes for reported issues - regression fix for rtsx_usb card reader - mei and mhi driver fixes - small virt driver fixes - ntsync permissions fix - other tiny driver fixes for reported problems. All of these have been in linux-next for quite a while with no reported issues" * tag 'char-misc-6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (30 commits) Revert "drivers/card_reader/rtsx_usb: Restore interrupt based detection" ntsync: Check wait count based on byte size. bus: simple-pm-bus: fix forced runtime PM use char: misc: deallocate static minor in error path eeprom: digsy_mtc: Make GPIO lookup table match the device drivers: virt: acrn: hsm: Use kzalloc to avoid info leak in pmcmd_ioctl binderfs: fix use-after-free in binder_devices slimbus: messaging: Free transaction ID in delayed interrupt scenario vbox: add HAS_IOPORT dependency cdx: Fix possible UAF error in driver_override_show() intel_th: pci: Add Panther Lake-P/U support intel_th: pci: Add Panther Lake-H support intel_th: pci: Add Arrow Lake support intel_th: msu: Fix less trivial kernel-doc warnings intel_th: msu: Fix kernel-doc warnings MAINTAINERS: change maintainer for FSI ntsync: Set the permissions to be 0666 bus: mhi: host: pci_generic: Use pci_try_reset_function() to avoid deadlock mei: vsc: Use "wakeuphostint" when getting the host wakeup GPIO mei: me: add panther lake P DID ... commit a382b06d297e78ed7ac67afd0d8e8690406ac4ca Merge: 1110ce6a1e34 ea9bd29a9c0d Author: Linus Torvalds Date: Sun Mar 9 09:04:08 2025 -1000 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "arm64: - Fix a couple of bugs affecting pKVM's PSCI relay implementation when running in the hVHE mode, resulting in the host being entered with the MMU in an unknown state, and EL2 being in the wrong mode x86: - Set RFLAGS.IF in C code on SVM to get VMRUN out of the STI shadow - Ensure DEBUGCTL is context switched on AMD to avoid running the guest with the host's value, which can lead to unexpected bus lock #DBs - Suppress DEBUGCTL.BTF on AMD (to match Intel), as KVM doesn't properly emulate BTF. KVM's lack of context switching has meant BTF has always been broken to some extent - Always save DR masks for SNP vCPUs if DebugSwap is *supported*, as the guest can enable DebugSwap without KVM's knowledge - Fix a bug in mmu_stress_tests where a vCPU could finish the "writes to RO memory" phase without actually generating a write-protection fault - Fix a printf() goof in the SEV smoke test that causes build failures with -Werror - Explicitly zero EAX and EBX in CPUID.0x8000_0022 output when PERFMON_V2 isn't supported by KVM" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: Explicitly zero EAX and EBX when PERFMON_V2 isn't supported by KVM KVM: selftests: Fix printf() format goof in SEV smoke test KVM: selftests: Ensure all vCPUs hit -EFAULT during initial RO stage KVM: SVM: Don't rely on DebugSwap to restore host DR0..DR3 KVM: SVM: Save host DR masks on CPUs with DebugSwap KVM: arm64: Initialize SCTLR_EL1 in __kvm_hyp_init_cpu() KVM: arm64: Initialize HCR_EL2.E2H early KVM: x86: Snapshot the host's DEBUGCTL after disabling IRQs KVM: SVM: Manually context switch DEBUGCTL if LBR virtualization is disabled KVM: x86: Snapshot the host's DEBUGCTL in common x86 KVM: SVM: Suppress DEBUGCTL.BTF on AMD KVM: SVM: Drop DEBUGCTL[5:2] from guest's effective value KVM: selftests: Assert that STI blocking isn't set after event injection KVM: SVM: Set RFLAGS.IF=1 in C code, to get VMRUN out of the STI shadow commit ea9bd29a9c0d757b3384ae3e633e6bbaddf00725 Merge: 1cdad678154c f9dc8fb3afc9 Author: Paolo Bonzini Date: Sun Mar 9 03:44:06 2025 -0400 Merge tag 'kvm-x86-fixes-6.14-rcN.2' of https://github.com/kvm-x86/linux into HEAD KVM x86 fixes for 6.14-rcN #2 - Set RFLAGS.IF in C code on SVM to get VMRUN out of the STI shadow. - Ensure DEBUGCTL is context switched on AMD to avoid running the guest with the host's value, which can lead to unexpected bus lock #DBs. - Suppress DEBUGCTL.BTF on AMD (to match Intel), as KVM doesn't properly emulate BTF. KVM's lack of context switching has meant BTF has always been broken to some extent. - Always save DR masks for SNP vCPUs if DebugSwap is *supported*, as the guest can enable DebugSwap without KVM's knowledge. - Fix a bug in mmu_stress_tests where a vCPU could finish the "writes to RO memory" phase without actually generating a write-protection fault. - Fix a printf() goof in the SEV smoke test that causes build failures with -Werror. - Explicitly zero EAX and EBX in CPUID.0x8000_0022 output when PERFMON_V2 isn't supported by KVM. commit 1cdad678154c627937bbbde28386c58a1fb07536 Merge: 916b7f42b3b3 3855a7b91d42 Author: Paolo Bonzini Date: Sun Mar 9 03:43:56 2025 -0400 Merge tag 'kvmarm-fixes-6.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.14, take #4 - Fix a couple of bugs affecting pKVM's PSCI relay implementation when running in the hVHE mode, resulting in the host being entered with the MMU in an unknown state, and EL2 being in the wrong mode. commit 1110ce6a1e34fe1fdc1bfe4ad52405f327d5083b Merge: b7c90e3e717a 8fe9ed44dc29 Author: Linus Torvalds Date: Sat Mar 8 14:34:06 2025 -1000 Merge tag 'mm-hotfixes-stable-2025-03-08-16-27' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "33 hotfixes. 24 are cc:stable and the remainder address post-6.13 issues or aren't considered necessary for -stable kernels. 26 are for MM and 7 are for non-MM. - "mm: memory_failure: unmap poisoned folio during migrate properly" from Ma Wupeng fixes a couple of two year old bugs involving the migration of hwpoisoned folios. - "selftests/damon: three fixes for false results" from SeongJae Park fixes three one year old bugs in the SAMON selftest code. The remainder are singletons and doubletons. Please see the individual changelogs for details" * tag 'mm-hotfixes-stable-2025-03-08-16-27' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (33 commits) mm/page_alloc: fix uninitialized variable rapidio: add check for rio_add_net() in rio_scan_alloc_net() rapidio: fix an API misues when rio_add_net() fails MAINTAINERS: .mailmap: update Sumit Garg's email address Revert "mm/page_alloc.c: don't show protection in zone's ->lowmem_reserve[] for empty zone" mm: fix finish_fault() handling for large folios mm: don't skip arch_sync_kernel_mappings() in error paths mm: shmem: remove unnecessary warning in shmem_writepage() userfaultfd: fix PTE unmapping stack-allocated PTE copies userfaultfd: do not block on locking a large folio with raised refcount mm: zswap: use ATOMIC_LONG_INIT to initialize zswap_stored_pages mm: shmem: fix potential data corruption during shmem swapin mm: fix kernel BUG when userfaultfd_move encounters swapcache selftests/damon/damon_nr_regions: sort collected regiosn before checking with min/max boundaries selftests/damon/damon_nr_regions: set ops update for merge results check to 100ms selftests/damon/damos_quota: make real expectation of quota exceeds include/linux/log2.h: mark is_power_of_2() with __always_inline NFS: fix nfs_release_folio() to not deadlock via kcompactd writeback mm, swap: avoid BUG_ON in relocate_cluster() mm: swap: use correct step in loop to wait all clusters in wait_for_allocation() ... commit b7c90e3e717abff6fe06445b98be306b732bbd2b Merge: 2e51e0ac575c 058a6bec37c6 Author: Linus Torvalds Date: Sat Mar 8 09:29:54 2025 -1000 Merge tag 'x86-urgent-2025-03-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull more x86 fixes from Ingo Molnar: - Add more model IDs to the AMD microcode version check, more people are hitting these checks - Fix a Xen guest boot warning related to AMD northbridge setup - Fix SEV guest bugs related to a recent changes in its locking logic - Fix a missing definition of PTRS_PER_PMD that assembly builds can hit * tag 'x86-urgent-2025-03-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode/AMD: Add some forgotten models to the SHA check x86/mm: Define PTRS_PER_PMD for assembly code too virt: sev-guest: Move SNP Guest Request data pages handling under snp_cmd_mutex virt: sev-guest: Allocate request data dynamically x86/amd_nb: Use rdmsr_safe() in amd_get_mmconfig_range() commit 058a6bec37c6c3b826158f6d26b75de43816a880 Author: Borislav Petkov (AMD) Date: Fri Mar 7 23:02:56 2025 +0100 x86/microcode/AMD: Add some forgotten models to the SHA check Add some more forgotten models to the SHA check. Fixes: 50cef76d5cb0 ("x86/microcode/AMD: Load only SHA256-checksummed patches") Reported-by: Toralf Förster Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Ingo Molnar Tested-by: Toralf Förster Link: https://lore.kernel.org/r/20250307220256.11816-1-bp@kernel.org arch/x86/kernel/cpu/microcode/amd.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 14296d0e85d45695ad2dc65b653b29e5a3514cdb Merge: 6914f7e2e25f 21e4543a2e2f Author: Ingo Molnar Date: Sat Mar 8 20:09:27 2025 +0100 Merge branch 'linus' into x86/urgent, to pick up dependent patches Signed-off-by: Ingo Molnar commit 2e51e0ac575c2095da869ea62d406f617550e6ed Merge: 2a520073e74f 6bdbb73dc8d9 Author: Linus Torvalds Date: Sat Mar 8 07:21:41 2025 -1000 Merge tag 'loongarch-fixes-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch fixes from Huacai Chen: "Fix bugs in kernel build, hibernation, memory management and KVM" * tag 'loongarch-fixes-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: KVM: Fix GPA size issue about VM LoongArch: KVM: Reload guest CSR registers after sleep LoongArch: KVM: Add interrupt checking for AVEC LoongArch: Set hugetlb mmap base address aligned with pmd size LoongArch: Set max_pfn with the PFN of the last page LoongArch: Use polling play_dead() when resuming from hibernation LoongArch: Eliminate superfluous get_numa_distances_cnt() LoongArch: Convert unreachable() to BUG() commit 0704a15b930cf97073ce091a0cd7ad32f2304329 Author: Thomas Mizrahi Date: Sat Mar 8 01:06:28 2025 -0300 ASoC: amd: yc: Support mic on another Lenovo ThinkPad E16 Gen 2 model The internal microphone on the Lenovo ThinkPad E16 model requires a quirk entry to work properly. This was fixed in a previous patch (linked below), but depending on the specific variant of the model, the product name may be "21M5" or "21M6". The following patch fixed this issue for the 21M5 variant: https://lore.kernel.org/all/20240725065442.9293-1-tiwai@suse.de/ This patch adds support for the microphone on the 21M6 variant. Link: https://github.com/ramaureirac/thinkpad-e14-linux/issues/31 Cc: stable@vger.kernel.org Signed-off-by: Thomas Mizrahi Link: https://patch.msgid.link/20250308041303.198765-1-thomasmizra@gmail.com Signed-off-by: Mark Brown sound/soc/amd/yc/acp6x-mach.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6bdbb73dc8d99fbb77f5db79dbb6f108708090b4 Author: Bibo Mao Date: Sat Mar 8 13:52:04 2025 +0800 LoongArch: KVM: Fix GPA size issue about VM Physical address space is 48 bit on Loongson-3A5000 physical machine, however it is 47 bit for VM on Loongson-3A5000 system. Size of physical address space of VM is the same with the size of virtual user space (a half) of physical machine. Variable cpu_vabits represents user address space, kernel address space is not included (user space and kernel space are both a half of total). Here cpu_vabits, rather than cpu_vabits - 1, is to represent the size of guest physical address space. Also there is strict checking about page fault GPA address, inject error if it is larger than maximum GPA address of VM. Cc: stable@vger.kernel.org Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen arch/loongarch/kvm/exit.c | 6 ++++++ arch/loongarch/kvm/vm.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) commit 78d7bc5a02e1468df53896df354fa80727f35b7d Author: Bibo Mao Date: Sat Mar 8 13:52:01 2025 +0800 LoongArch: KVM: Reload guest CSR registers after sleep On host, the HW guest CSR registers are lost after suspend and resume operation. Since last_vcpu of boot CPU still records latest vCPU pointer so that the guest CSR register skips to reload when boot CPU resumes and vCPU is scheduled. Here last_vcpu is cleared so that guest CSR registers will reload from scheduled vCPU context after suspend and resume. Cc: stable@vger.kernel.org Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen arch/loongarch/kvm/main.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6fb1867d5a44b0a061cf39d2492d23d314bcb8ce Author: Bibo Mao Date: Sat Mar 8 13:51:59 2025 +0800 LoongArch: KVM: Add interrupt checking for AVEC There is a newly added macro INT_AVEC with CSR ESTAT register, which is bit 14 used for LoongArch AVEC support. AVEC interrupt status bit 14 is supported with macro CSR_ESTAT_IS, so here replace the hard-coded value 0x1fff with macro CSR_ESTAT_IS so that the AVEC interrupt status is also supported by KVM. Cc: stable@vger.kernel.org Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen arch/loongarch/kvm/vcpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3109d5ff484b7bc7b955f166974c6776d91f247b Author: Bibo Mao Date: Sat Mar 8 13:51:32 2025 +0800 LoongArch: Set hugetlb mmap base address aligned with pmd size With ltp test case "testcases/bin/hugefork02", there is a dmesg error report message such as: kernel BUG at mm/hugetlb.c:5550! Oops - BUG[#1]: CPU: 0 UID: 0 PID: 1517 Comm: hugefork02 Not tainted 6.14.0-rc2+ #241 Hardware name: QEMU QEMU Virtual Machine, BIOS unknown 2/2/2022 pc 90000000004eaf1c ra 9000000000485538 tp 900000010edbc000 sp 900000010edbf940 a0 900000010edbfb00 a1 9000000108d20280 a2 00007fffe9474000 a3 00007ffff3474000 a4 0000000000000000 a5 0000000000000003 a6 00000000003cadd3 a7 0000000000000000 t0 0000000001ffffff t1 0000000001474000 t2 900000010ecd7900 t3 00007fffe9474000 t4 00007fffe9474000 t5 0000000000000040 t6 900000010edbfb00 t7 0000000000000001 t8 0000000000000005 u0 90000000004849d0 s9 900000010edbfa00 s0 9000000108d20280 s1 00007fffe9474000 s2 0000000002000000 s3 9000000108d20280 s4 9000000002b38b10 s5 900000010edbfb00 s6 00007ffff3474000 s7 0000000000000406 s8 900000010edbfa08 ra: 9000000000485538 unmap_vmas+0x130/0x218 ERA: 90000000004eaf1c __unmap_hugepage_range+0x6f4/0x7d0 PRMD: 00000004 (PPLV0 +PIE -PWE) EUEN: 00000007 (+FPE +SXE +ASXE -BTE) ECFG: 00071c1d (LIE=0,2-4,10-12 VS=7) ESTAT: 000c0000 [BRK] (IS= ECode=12 EsubCode=0) PRID: 0014c010 (Loongson-64bit, Loongson-3A5000) Process hugefork02 (pid: 1517, threadinfo=00000000a670eaf4, task=000000007a95fc64) Call Trace: [<90000000004eaf1c>] __unmap_hugepage_range+0x6f4/0x7d0 [<9000000000485534>] unmap_vmas+0x12c/0x218 [<9000000000494068>] exit_mmap+0xe0/0x308 [<900000000025fdc4>] mmput+0x74/0x180 [<900000000026a284>] do_exit+0x294/0x898 [<900000000026aa30>] do_group_exit+0x30/0x98 [<900000000027bed4>] get_signal+0x83c/0x868 [<90000000002457b4>] arch_do_signal_or_restart+0x54/0xfa0 [<90000000015795e8>] irqentry_exit_to_user_mode+0xb8/0x138 [<90000000002572d0>] tlb_do_page_fault_1+0x114/0x1b4 The problem is that base address allocated from hugetlbfs is not aligned with pmd size. Here add a checking for hugetlbfs and align base address with pmd size. After this patch the test case "testcases/bin/hugefork02" passes to run. This is similar to the commit 7f24cbc9c4d42db8a3c8484d1 ("mm/mmap: teach generic_get_unmapped_area{_topdown} to handle hugetlb mappings"). Cc: stable@vger.kernel.org # 6.13+ Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen arch/loongarch/mm/mmap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c8477bb0a8e7f6b2e47952b403c5cb67a6929e55 Author: Bibo Mao Date: Sat Mar 8 13:51:32 2025 +0800 LoongArch: Set max_pfn with the PFN of the last page The current max_pfn equals to zero. In this case, it causes user cannot get some page information through /proc filesystem such as kpagecount. The following message is displayed by stress-ng test suite with command "stress-ng --verbose --physpage 1 -t 1". # stress-ng --verbose --physpage 1 -t 1 stress-ng: error: [1691] physpage: cannot read page count for address 0x134ac000 in /proc/kpagecount, errno=22 (Invalid argument) stress-ng: error: [1691] physpage: cannot read page count for address 0x7ffff207c3a8 in /proc/kpagecount, errno=22 (Invalid argument) stress-ng: error: [1691] physpage: cannot read page count for address 0x134b0000 in /proc/kpagecount, errno=22 (Invalid argument) ... After applying this patch, the kernel can pass the test. # stress-ng --verbose --physpage 1 -t 1 stress-ng: debug: [1701] physpage: [1701] started (instance 0 on CPU 3) stress-ng: debug: [1701] physpage: [1701] exited (instance 0 on CPU 3) stress-ng: debug: [1700] physpage: [1701] terminated (success) Cc: stable@vger.kernel.org # 6.8+ Fixes: ff6c3d81f2e8 ("NUMA: optimize detection of memory with no node id assigned by firmware") Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen arch/loongarch/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) commit c9117434c8f7523f0b77db4c5766f5011cc94677 Author: Huacai Chen Date: Sat Mar 8 13:51:32 2025 +0800 LoongArch: Use polling play_dead() when resuming from hibernation When CONFIG_RANDOM_KMALLOC_CACHES or other randomization infrastructrue enabled, the idle_task's stack may different between the booting kernel and target kernel. So when resuming from hibernation, an ACTION_BOOT_CPU IPI wakeup the idle instruction in arch_cpu_idle_dead() and jump to the interrupt handler. But since the stack pointer is changed, the interrupt handler cannot restore correct context. So rename the current arch_cpu_idle_dead() to idle_play_dead(), make it as the default version of play_dead(), and the new arch_cpu_idle_dead() call play_dead() directly. For hibernation, implement an arch-specific hibernate_resume_nonboot_cpu_disable() to use the polling version (idle instruction is replace by nop, and irq is disabled) of play_dead(), i.e. poll_play_dead(), to avoid IPI handler corrupting the idle_task's stack when resuming from hibernation. This solution is a little similar to commit 406f992e4a372dafbe3c ("x86 / hibernate: Use hlt_play_dead() when resuming from hibernation"). Cc: stable@vger.kernel.org Tested-by: Erpeng Xu Tested-by: Yuli Wang Signed-off-by: Huacai Chen arch/loongarch/kernel/smp.c | 47 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) commit a0d3c8bcb9206ac207c7ad3182027c6b0a1319bb Author: Yuli Wang Date: Sat Mar 8 13:51:32 2025 +0800 LoongArch: Eliminate superfluous get_numa_distances_cnt() In LoongArch, get_numa_distances_cnt() isn't in use, resulting in a compiler warning. Fix follow errors with clang-18 when W=1e: arch/loongarch/kernel/acpi.c:259:28: error: unused function 'get_numa_distances_cnt' [-Werror,-Wunused-function] 259 | static inline unsigned int get_numa_distances_cnt(struct acpi_table_slit *slit) | ^~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Link: https://lore.kernel.org/all/Z7bHPVUH4lAezk0E@kernel.org/ Signed-off-by: Yuli Wang Signed-off-by: Huacai Chen arch/loongarch/kernel/acpi.c | 12 ------------ 1 file changed, 12 deletions(-) commit da64a2359092ceec4f9dea5b329d0aef20104217 Author: Tiezhu Yang Date: Sat Mar 8 13:50:45 2025 +0800 LoongArch: Convert unreachable() to BUG() When compiling on LoongArch, there exists the following objtool warning in arch/loongarch/kernel/machine_kexec.o: kexec_reboot() falls through to next function crash_shutdown_secondary() Avoid using unreachable() as it can (and will in the absence of UBSAN) generate fall-through code. Use BUG() so we get a "break BRK_BUG" trap (with unreachable annotation). Cc: stable@vger.kernel.org # 6.12+ Acked-by: Josh Poimboeuf Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen arch/loongarch/kernel/machine_kexec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 505ead7ab77f289f12d8a68ac83da068e4d4408b Author: Breno Leitao Date: Thu Mar 6 05:16:18 2025 -0800 netpoll: hold rcu read lock in __netpoll_send_skb() The function __netpoll_send_skb() is being invoked without holding the RCU read lock. This oversight triggers a warning message when CONFIG_PROVE_RCU_LIST is enabled: net/core/netpoll.c:330 suspicious rcu_dereference_check() usage! netpoll_send_skb netpoll_send_udp write_ext_msg console_flush_all console_unlock vprintk_emit To prevent npinfo from disappearing unexpectedly, ensure that __netpoll_send_skb() is protected with the RCU read lock. Fixes: 2899656b494dcd1 ("netpoll: take rcu_read_lock_bh() in netpoll_send_skb_on_dev()") Signed-off-by: Breno Leitao Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250306-netpoll_rcu_v2-v2-1-bc4f5c51742a@debian.org Signed-off-by: Jakub Kicinski net/core/netpoll.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit e6360f0dc52b93a723c748e281fb99b430297da4 Merge: df8ce77ba8b7 48939523843e Author: Jakub Kicinski Date: Fri Mar 7 19:53:26 2025 -0800 Merge branch 'net-phy-nxp-c45-tja11xx-add-errata-for-tja112xa-b' Andrei Botila says: ==================== net: phy: nxp-c45-tja11xx: add errata for TJA112XA/B This patch series implements two errata for TJA1120 and TJA1121. The first errata applicable to both RGMII and SGMII version of TJA1120 and TJA1121 deals with achieving full silicon performance. The workaround in this case is putting the PHY in managed mode and applying a series of PHY writes before the link gest established. The second errata applicable only to SGMII version of TJA1120 and TJA1121 deals with achieving a stable operation of SGMII after a startup event. The workaround puts the SGMII PCS into power down mode and back up after restart or wakeup from sleep. ==================== Link: https://patch.msgid.link/20250304160619.181046-1-andrei.botila@oss.nxp.com Signed-off-by: Jakub Kicinski commit 48939523843e4813e78920f54937944a8787134b Author: Andrei Botila Date: Tue Mar 4 18:06:14 2025 +0200 net: phy: nxp-c45-tja11xx: add TJA112XB SGMII PCS restart errata TJA1120B/TJA1121B can achieve a stable operation of SGMII after a startup event by putting the SGMII PCS into power down mode and restart afterwards. It is necessary to put the SGMII PCS into power down mode and back up. Cc: stable@vger.kernel.org Fixes: f1fe5dff2b8a ("net: phy: nxp-c45-tja11xx: add TJA1120 support") Signed-off-by: Andrei Botila Link: https://patch.msgid.link/20250304160619.181046-3-andrei.botila@oss.nxp.com Signed-off-by: Jakub Kicinski drivers/net/phy/nxp-c45-tja11xx.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit a07364b394697d2e0baffeb517f41385259aa484 Author: Andrei Botila Date: Tue Mar 4 18:06:13 2025 +0200 net: phy: nxp-c45-tja11xx: add TJA112X PHY configuration errata The most recent sillicon versions of TJA1120 and TJA1121 can achieve full silicon performance by putting the PHY in managed mode. It is necessary to apply these PHY writes before link gets established. Application of this fix is required after restart of device and wakeup from sleep. Cc: stable@vger.kernel.org Fixes: f1fe5dff2b8a ("net: phy: nxp-c45-tja11xx: add TJA1120 support") Signed-off-by: Andrei Botila Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250304160619.181046-2-andrei.botila@oss.nxp.com Signed-off-by: Jakub Kicinski drivers/net/phy/nxp-c45-tja11xx.c | 52 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit df8ce77ba8b7c012a3edd1ca7368b46831341466 Author: Matt Johnston Date: Thu Mar 6 10:33:20 2025 +0800 net: mctp i2c: Copy headers if cloned Use skb_cow_head() prior to modifying the TX SKB. This is necessary when the SKB has been cloned, to avoid modifying other shared clones. Signed-off-by: Matt Johnston Fixes: f5b8abf9fc3d ("mctp i2c: MCTP I2C binding driver") Link: https://patch.msgid.link/20250306-matt-mctp-i2c-cow-v1-1-293827212681@codeconstruct.com.au Signed-off-by: Jakub Kicinski drivers/net/mctp/mctp-i2c.c | 5 +++++ 1 file changed, 5 insertions(+) commit 26db9c9ee19c36a97dbb1cfef007a3c189c4c874 Author: Matt Johnston Date: Thu Mar 6 18:24:18 2025 +0800 net: mctp i3c: Copy headers if cloned Use skb_cow_head() prior to modifying the tx skb. This is necessary when the skb has been cloned, to avoid modifying other shared clones. Signed-off-by: Matt Johnston Fixes: c8755b29b58e ("mctp i3c: MCTP I3C driver") Link: https://patch.msgid.link/20250306-matt-i3c-cow-head-v1-1-d5e6a5495227@codeconstruct.com.au Signed-off-by: Jakub Kicinski drivers/net/mctp/mctp-i3c.c | 5 +++++ 1 file changed, 5 insertions(+) commit dc5340c3133a3ebe54853fd299116149e528cfaa Author: Joseph Huang Date: Thu Mar 6 12:23:05 2025 -0500 net: dsa: mv88e6xxx: Verify after ATU Load ops ATU Load operations could fail silently if there's not enough space on the device to hold the new entry. When this happens, the symptom depends on the unknown flood settings. If unknown multicast flood is disabled, the multicast packets are dropped when the ATU table is full. If unknown multicast flood is enabled, the multicast packets will be flooded to all ports. Either way, IGMP snooping is broken when the ATU Load operation fails silently. Do a Read-After-Write verification after each fdb/mdb add operation to make sure that the operation was really successful, and return -ENOSPC otherwise. Fixes: defb05b9b9b4 ("net: dsa: mv88e6xxx: Add support for fdb_add, fdb_del, and fdb_getnext") Signed-off-by: Joseph Huang Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250306172306.3859214-1-Joseph.Huang@garmin.com Signed-off-by: Jakub Kicinski drivers/net/dsa/mv88e6xxx/chip.c | 59 ++++++++++++++++++++++++++++++++-------- 1 file changed, 48 insertions(+), 11 deletions(-) commit d749d901b2168389f060b654fdaa08acf6b367d2 Author: Jiri Pirko Date: Thu Mar 6 23:25:29 2025 +0200 net/mlx5: Fill out devlink dev info only for PFs Firmware version query is supported on the PFs. Due to this following kernel warning log is observed: [ 188.590344] mlx5_core 0000:08:00.2: mlx5_fw_version_query:816:(pid 1453): fw query isn't supported by the FW Fix it by restricting the query and devlink info to the PF. Fixes: 8338d9378895 ("net/mlx5: Added devlink info callback") Signed-off-by: Jiri Pirko Reviewed-by: Kalesh AP Signed-off-by: Tariq Toukan Reviewed-by: Parav Pandit Link: https://patch.msgid.link/20250306212529.429329-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 3 +++ 1 file changed, 3 insertions(+) commit f3600c867c99a2cc8038680ecf211089c50e7971 Author: Mina Almasry Date: Thu Mar 6 21:55:20 2025 +0000 netmem: prevent TX of unreadable skbs Currently on stable trees we have support for netmem/devmem RX but not TX. It is not safe to forward/redirect an RX unreadable netmem packet into the device's TX path, as the device may call dma-mapping APIs on dma addrs that should not be passed to it. Fix this by preventing the xmit of unreadable skbs. Tested by configuring tc redirect: sudo tc qdisc add dev eth1 ingress sudo tc filter add dev eth1 ingress protocol ip prio 1 flower ip_proto \ tcp src_ip 192.168.1.12 action mirred egress redirect dev eth1 Before, I see unreadable skbs in the driver's TX path passed to dma mapping APIs. After, I don't see unreadable skbs in the driver's TX path passed to dma mapping APIs. Fixes: 65249feb6b3d ("net: add support for skbs with unreadable frags") Suggested-by: Jakub Kicinski Cc: stable@vger.kernel.org Signed-off-by: Mina Almasry Link: https://patch.msgid.link/20250306215520.1415465-1-almasrymina@google.com Signed-off-by: Jakub Kicinski net/core/dev.c | 3 +++ 1 file changed, 3 insertions(+) commit 8ef0f2c01898559eede2c51cb89dbf07acdc6c7a Merge: fc14f9c02639 ab6ab707a4d0 Author: Jakub Kicinski Date: Fri Mar 7 19:23:51 2025 -0800 Merge tag 'for-net-2025-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - btusb: Configure altsetting for HCI_USER_CHANNEL - hci_event: Fix enabling passive scanning - revert: "hci_core: Fix sleeping function called from invalid context" - SCO: fix sco_conn refcounting on sco_conn_ready * tag 'for-net-2025-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Revert "Bluetooth: hci_core: Fix sleeping function called from invalid context" Bluetooth: hci_event: Fix enabling passive scanning Bluetooth: SCO: fix sco_conn refcounting on sco_conn_ready Bluetooth: btusb: Configure altsetting for HCI_USER_CHANNEL ==================== Link: https://patch.msgid.link/20250307181854.99433-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 2a520073e74fbb956b5564818fc5529dcc7e9f0e Merge: 21e4543a2e2f b4a1dec11793 Author: Linus Torvalds Date: Fri Mar 7 16:21:02 2025 -1000 Merge tag 's390-6.14-6' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix return address recovery of traced function in ftrace to ensure reliable stack unwinding - Fix compiler warnings and runtime crashes of vDSO selftests on s390 by introducing a dedicated GNU hash bucket pointer with correct 32-bit entry size - Fix test_monitor_call() inline asm, which misses CC clobber, by switching to an instruction that doesn't modify CC * tag 's390-6.14-6' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/ftrace: Fix return address recovery of traced function selftests/vDSO: Fix GNU hash table entry size for s390x s390/traps: Fix test_monitor_call() inline assembly commit 85b2b9c16d053364e2004883140538e73b333cdb Author: Waiman Long Date: Fri Mar 7 15:26:52 2025 -0800 locking/semaphore: Use wake_q to wake up processes outside lock critical section A circular lock dependency splat has been seen involving down_trylock(): ====================================================== WARNING: possible circular locking dependency detected 6.12.0-41.el10.s390x+debug ------------------------------------------------------ dd/32479 is trying to acquire lock: 0015a20accd0d4f8 ((console_sem).lock){-.-.}-{2:2}, at: down_trylock+0x26/0x90 but task is already holding lock: 000000017e461698 (&zone->lock){-.-.}-{2:2}, at: rmqueue_bulk+0xac/0x8f0 the existing dependency chain (in reverse order) is: -> #4 (&zone->lock){-.-.}-{2:2}: -> #3 (hrtimer_bases.lock){-.-.}-{2:2}: -> #2 (&rq->__lock){-.-.}-{2:2}: -> #1 (&p->pi_lock){-.-.}-{2:2}: -> #0 ((console_sem).lock){-.-.}-{2:2}: The console_sem -> pi_lock dependency is due to calling try_to_wake_up() while holding the console_sem raw_spinlock. This dependency can be broken by using wake_q to do the wakeup instead of calling try_to_wake_up() under the console_sem lock. This will also make the semaphore's raw_spinlock become a terminal lock without taking any further locks underneath it. The hrtimer_bases.lock is a raw_spinlock while zone->lock is a spinlock. The hrtimer_bases.lock -> zone->lock dependency happens via the debug_objects_fill_pool() helper function in the debugobjects code. -> #4 (&zone->lock){-.-.}-{2:2}: __lock_acquire+0xe86/0x1cc0 lock_acquire.part.0+0x258/0x630 lock_acquire+0xb8/0xe0 _raw_spin_lock_irqsave+0xb4/0x120 rmqueue_bulk+0xac/0x8f0 __rmqueue_pcplist+0x580/0x830 rmqueue_pcplist+0xfc/0x470 rmqueue.isra.0+0xdec/0x11b0 get_page_from_freelist+0x2ee/0xeb0 __alloc_pages_noprof+0x2c2/0x520 alloc_pages_mpol_noprof+0x1fc/0x4d0 alloc_pages_noprof+0x8c/0xe0 allocate_slab+0x320/0x460 ___slab_alloc+0xa58/0x12b0 __slab_alloc.isra.0+0x42/0x60 kmem_cache_alloc_noprof+0x304/0x350 fill_pool+0xf6/0x450 debug_object_activate+0xfe/0x360 enqueue_hrtimer+0x34/0x190 __run_hrtimer+0x3c8/0x4c0 __hrtimer_run_queues+0x1b2/0x260 hrtimer_interrupt+0x316/0x760 do_IRQ+0x9a/0xe0 do_irq_async+0xf6/0x160 Normally a raw_spinlock to spinlock dependency is not legitimate and will be warned if CONFIG_PROVE_RAW_LOCK_NESTING is enabled, but debug_objects_fill_pool() is an exception as it explicitly allows this dependency for non-PREEMPT_RT kernel without causing PROVE_RAW_LOCK_NESTING lockdep splat. As a result, this dependency is legitimate and not a bug. Anyway, semaphore is the only locking primitive left that is still using try_to_wake_up() to do wakeup inside critical section, all the other locking primitives had been migrated to use wake_q to do wakeup outside of the critical section. It is also possible that there are other circular locking dependencies involving printk/console_sem or other existing/new semaphores lurking somewhere which may show up in the future. Let just do the migration now to wake_q to avoid headache like this. Reported-by: yzbot+ed801a886dfdbfe7136d@syzkaller.appspotmail.com Signed-off-by: Waiman Long Signed-off-by: Boqun Feng Signed-off-by: Ingo Molnar Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250307232717.1759087-3-boqun.feng@gmail.com kernel/locking/semaphore.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit b3c5ec8b79bf6bc49cc4850d0949d712830283d7 Author: Randy Dunlap Date: Fri Mar 7 15:26:51 2025 -0800 locking/rtmutex: Use the 'struct' keyword in kernel-doc comment Add the "struct" keyword to prevent a kernel-doc warning: rtmutex_common.h:67: warning: cannot understand function prototype: 'struct rt_wake_q_head ' Signed-off-by: Randy Dunlap Signed-off-by: Boqun Feng Signed-off-by: Ingo Molnar Acked-by: Waiman Long Link: https://lore.kernel.org/r/20250307232717.1759087-2-boqun.feng@gmail.com kernel/locking/rtmutex_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 966944f3711665db13e214fef6d02982c49bb972 Author: Mitchell Levy Date: Fri Mar 7 15:27:00 2025 -0800 rust: lockdep: Remove support for dynamically allocated LockClassKeys Currently, dynamically allocated LockCLassKeys can be used from the Rust side without having them registered. This is a soundness issue, so remove them. Fixes: 6ea5aa08857a ("rust: sync: introduce `LockClassKey`") Suggested-by: Alice Ryhl Signed-off-by: Mitchell Levy Signed-off-by: Boqun Feng Signed-off-by: Ingo Molnar Reviewed-by: Benno Lossin Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250307232717.1759087-11-boqun.feng@gmail.com rust/kernel/sync.rs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 6914f7e2e25fac9d1d2b62c208eaa5f2bf810fe9 Author: Ingo Molnar Date: Thu Mar 6 23:00:16 2025 +0100 x86/mm: Define PTRS_PER_PMD for assembly code too Andy reported the following build warning from head_32.S: In file included from arch/x86/kernel/head_32.S:29: arch/x86/include/asm/pgtable_32.h:59:5: error: "PTRS_PER_PMD" is not defined, evaluates to 0 [-Werror=undef] 59 | #if PTRS_PER_PMD > 1 The reason is that on 2-level i386 paging the folded in PMD's PTRS_PER_PMD constant is not defined in assembly headers, only in generic MM C headers. Instead of trying to fish out the definition from the generic headers, just define it - it even has a comment for it already... Reported-by: Andy Shevchenko Tested-by: Andy Shevchenko Signed-off-by: Ingo Molnar Cc: Linus Torvalds Link: https://lore.kernel.org/r/Z8oa8AUVyi2HWfo9@gmail.com arch/x86/include/asm/pgtable-2level_types.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 21e4543a2e2f8538373d1d19264c4bae6f13e798 Merge: d4fd25b6f883 dfd3df31c9db Author: Linus Torvalds Date: Fri Mar 7 12:22:41 2025 -1000 Merge tag 'slab-for-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab Pull slab fix from Vlastimil Babka: - Stable fix for kmem_cache_destroy() called from a WQ_MEM_RECLAIM workqueue causing a warning due to the new kvfree_rcu_barrier() (Uladzislau Rezki) * tag 'slab-for-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: mm/slab/kvfree_rcu: Switch to WQ_MEM_RECLAIM wq commit d4fd25b6f883db41194e1760041560779d412d98 Merge: dd047efbe0e0 9a43102daf64 Author: Linus Torvalds Date: Fri Mar 7 12:17:42 2025 -1000 Merge tag 'acpi-6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Restore the previous behavior of the ACPI platform_profile sysfs interface that has been changed recently in a way incompatible with the existing user space (Mario Limonciello)" * tag 'acpi-6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: platform/x86/amd: pmf: Add balanced-performance to hidden choices platform/x86/amd: pmf: Add 'quiet' to hidden choices ACPI: platform_profile: Add support for hidden choices commit dd047efbe0e086f6ea82774cb239ec4c64a86d76 Merge: 6ceb6346b043 39ec9eaaa165 Author: Linus Torvalds Date: Fri Mar 7 11:49:33 2025 -1000 Merge tag 'execve-v6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull core dumping fix from Kees Cook: - Only sort VMAs when core_sort_vma sysctl is set * tag 'execve-v6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: coredump: Only sort VMAs when core_sort_vma sysctl is set commit 6ceb6346b0436ea6591c33ab6ab22e5077ed17e7 Merge: 381af8d9f484 35d99c68af40 Author: Linus Torvalds Date: Fri Mar 7 11:17:30 2025 -1000 Merge tag 'for-6.14-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - fix leaked extent map after error when reading chunks - replace use of deprecated strncpy - in zoned mode, fixed range when ulocking extent range, causing a hang * tag 'for-6.14-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix a leaked chunk map issue in read_one_chunk() btrfs: replace deprecated strncpy() with strscpy() btrfs: zoned: fix extent range end unlock in cow_file_range() commit 381af8d9f484c06d93e4a0b8459526e779b35a65 Merge: d53276d29283 e7112524e5e8 Author: Linus Torvalds Date: Fri Mar 7 11:12:33 2025 -1000 Merge tag 'block-6.14-20250306' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - NVMe pull request via Keith: - TCP use after free fix on polling (Sagi) - Controller memory buffer cleanup fixes (Icenowy) - Free leaking requests on bad user passthrough commands (Keith) - TCP error message fix (Maurizio) - TCP corruption fix on partial PDU (Maurizio) - TCP memory ordering fix for weakly ordered archs (Meir) - Type coercion fix on message error for TCP (Dan) - Name the RQF flags enum, fixing issues with anon enums and BPF import of it - ublk parameter setting fix - GPT partition 7-bit conversion fix * tag 'block-6.14-20250306' of git://git.kernel.dk/linux: block: Name the RQF flags enum nvme-tcp: fix signedness bug in nvme_tcp_init_connection() block: fix conversion of GPT partition name to 7-bit ublk: set_params: properly check if parameters can be applied nvmet-tcp: Fix a possible sporadic response drops in weakly ordered arch nvme-tcp: fix potential memory corruption in nvme_tcp_recv_pdu() nvme-tcp: Fix a C2HTermReq error message nvmet: remove old function prototype nvme-ioctl: fix leaked requests on mapping error nvme-pci: skip CMB blocks incompatible with PCI P2P DMA nvme-pci: clean up CMBMSC when registering CMB fails nvme-tcp: fix possible UAF in nvme_tcp_poll commit d53276d2928345f68a3eb7722a849fb4a0aa2ad0 Merge: 1c5183aa6e74 bcb0fda3c2da Author: Linus Torvalds Date: Fri Mar 7 11:09:33 2025 -1000 Merge tag 'io_uring-6.14-20250306' of git://git.kernel.dk/linux Pull io_uring fix from Jens Axboe: "A single fix for a regression introduced in the 6.14 merge window, causing stalls/hangs with IOPOLL reads or writes" * tag 'io_uring-6.14-20250306' of git://git.kernel.dk/linux: io_uring/rw: ensure reissue path is correctly handled for IOPOLL commit 1c5183aa6e74a0817c3a370e6a94e460dbb00098 Merge: ab60bd57319c b1536481c81f Author: Linus Torvalds Date: Fri Mar 7 10:58:54 2025 -1000 Merge tag 'sched-urgent-2025-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc scheduler fixes from Ingo Molnar: - Fix deadline scheduler sysctl parameter setting bug - Fix RT scheduler sysctl parameter setting bug - Fix possible memory corruption in child_cfs_rq_on_list() * tag 'sched-urgent-2025-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/rt: Update limit of sched_rt sysctl in documentation sched/deadline: Use online cpus for validating runtime sched/fair: Fix potential memory corruption in child_cfs_rq_on_list commit ab60bd57319cbfeeb4cff2337016c9fd72b51412 Merge: 042751d35326 003659fec9f6 Author: Linus Torvalds Date: Fri Mar 7 10:38:33 2025 -1000 Merge tag 'perf-urgent-2025-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf event fixes from Ingo Molnar: "Fix a race between PMU registration and event creation, and fix pmus_lock vs. pmus_srcu lock ordering" * tag 'perf-urgent-2025-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Fix perf_pmu_register() vs. perf_init_event() perf/core: Fix pmus_lock vs. pmus_srcu ordering commit 042751d35326d4401d843ac3ee25957815aecd10 Merge: 8287dfc29153 c00b413a9626 Author: Linus Torvalds Date: Fri Mar 7 10:05:32 2025 -1000 Merge tag 'x86-urgent-2025-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 fixes from Ingo Molnar: - Fix CPUID leaf 0x2 parsing bugs - Sanitize very early boot parameters to avoid crash - Fix size overflows in the SGX code - Make CALL_NOSPEC use consistent * tag 'x86-urgent-2025-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Sanitize boot params before parsing command line x86/sgx: Fix size overflows in sgx_encl_create() x86/cpu: Properly parse CPUID leaf 0x2 TLB descriptor 0x63 x86/cpu: Validate CPUID leaf 0x2 EDX output x86/cacheinfo: Validate CPUID leaf 0x2 EDX output x86/speculation: Add a conditional CS prefix to CALL_NOSPEC x86/speculation: Simplify and make CALL_NOSPEC consistent commit ab6ab707a4d060a51c45fc13e3b2228d5f7c0b87 Author: Luiz Augusto von Dentz Date: Tue Mar 4 10:06:10 2025 -0500 Revert "Bluetooth: hci_core: Fix sleeping function called from invalid context" This reverts commit 4d94f05558271654670d18c26c912da0c1c15549 which has problems (see [1]) and is no longer needed since 581dd2dc168f ("Bluetooth: hci_event: Fix using rcu_read_(un)lock while iterating") has reworked the code where the original bug has been found. [1] Link: https://lore.kernel.org/linux-bluetooth/877c55ci1r.wl-tiwai@suse.de/T/#t Fixes: 4d94f0555827 ("Bluetooth: hci_core: Fix sleeping function called from invalid context") Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci_core.h | 108 ++++++++++++++------------------------- net/bluetooth/hci_core.c | 10 ++-- net/bluetooth/iso.c | 6 --- net/bluetooth/l2cap_core.c | 12 ++--- net/bluetooth/rfcomm/core.c | 6 --- net/bluetooth/sco.c | 12 ++--- 6 files changed, 57 insertions(+), 97 deletions(-) commit 8287dfc2915368092e98ef0caef9c03e8e0f7aa9 Merge: 1222390d138d 10fce7ebe888 Author: Linus Torvalds Date: Fri Mar 7 07:51:27 2025 -1000 Merge tag 'hwmon-for-v6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - xgene-hwmon: Fix a NULL vs IS_ERR_OR_NULL() check - ad7314: Return error if leading zero bits are non-zero - ntc_thermistor: Update/fix the ncpXXxh103 sensor table - pmbus: Initialise page count in pmbus_identify() - peci/dimmtemp: Do not provide fake threshold data * tag 'hwmon-for-v6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: fix a NULL vs IS_ERR_OR_NULL() check in xgene_hwmon_probe() hwmon: (ad7314) Validate leading zero bits and return error hwmon: (ntc_thermistor) Fix the ncpXXxh103 sensor table hwmon: (pmbus) Initialise page count in pmbus_identify() hwmon: (peci/dimmtemp) Do not provide fake thresholds data commit 1222390d138d1f375fe28a9a052780009d2ce6ef Merge: 8aed61b8334e 391b41f983bf Author: Linus Torvalds Date: Fri Mar 7 07:49:23 2025 -1000 Merge tag 'gpio-fixes-for-v6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - protect gpio-aggregator against module unload - use raw spinlock in gpio-rcar to fix a lockdep splat - fix OF node leak in gpio-rcar * tag 'gpio-fixes-for-v6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: rcar: Fix missing of_node_put() call gpio: rcar: Use raw_spinlock to protect register access gpio: aggregator: protect driver attr handlers against module unload commit 0bdd88971519cfa8a76d1a4dde182e74cfbd5d5c Author: Luiz Augusto von Dentz Date: Fri Feb 28 13:12:54 2025 -0500 Bluetooth: hci_event: Fix enabling passive scanning Passive scanning shall only be enabled when disconnecting LE links, otherwise it may start result in triggering scanning when e.g. an ISO link disconnects: > HCI Event: LE Meta Event (0x3e) plen 29 LE Connected Isochronous Stream Established (0x19) Status: Success (0x00) Connection Handle: 257 CIG Synchronization Delay: 0 us (0x000000) CIS Synchronization Delay: 0 us (0x000000) Central to Peripheral Latency: 10000 us (0x002710) Peripheral to Central Latency: 10000 us (0x002710) Central to Peripheral PHY: LE 2M (0x02) Peripheral to Central PHY: LE 2M (0x02) Number of Subevents: 1 Central to Peripheral Burst Number: 1 Peripheral to Central Burst Number: 1 Central to Peripheral Flush Timeout: 2 Peripheral to Central Flush Timeout: 2 Central to Peripheral MTU: 320 Peripheral to Central MTU: 160 ISO Interval: 10.00 msec (0x0008) ... > HCI Event: Disconnect Complete (0x05) plen 4 Status: Success (0x00) Handle: 257 Reason: Remote User Terminated Connection (0x13) < HCI Command: LE Set Extended Scan Enable (0x08|0x0042) plen 6 Extended scan: Enabled (0x01) Filter duplicates: Enabled (0x01) Duration: 0 msec (0x0000) Period: 0.00 sec (0x0000) Fixes: 9fcb18ef3acb ("Bluetooth: Introduce LE auto connect options") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_event.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit 8d74c9106be8da051b22f0cd81e665f17d51ba5d Author: Pauli Virtanen Date: Thu Feb 27 23:28:15 2025 +0200 Bluetooth: SCO: fix sco_conn refcounting on sco_conn_ready sco_conn refcount shall not be incremented a second time if the sk already owns the refcount, so hold only when adding new chan. Add sco_conn_hold() for clarity, as refcnt is never zero here due to the sco_conn_add(). Fixes SCO socket shutdown not actually closing the SCO connection. Fixes: ed9588554943 ("Bluetooth: SCO: remove the redundant sco_conn_put") Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz net/bluetooth/sco.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 75ddcd5ad40ecd9fbc9f5a7a2ed0e1e74921db3c Author: Hsin-chen Chuang Date: Fri Feb 28 01:14:10 2025 +0800 Bluetooth: btusb: Configure altsetting for HCI_USER_CHANNEL Automatically configure the altsetting for HCI_USER_CHANNEL when a SCO is connected. The motivation is to enable the HCI_USER_CHANNEL user to send out SCO data through USB Bluetooth chips, which is mainly used for bidirectional audio transfer (voice call). This was not capable because: - Per Bluetooth Core Spec v5, Vol 4, Part B, 2.1, the corresponding alternate setting should be set based on the air mode in order to transfer SCO data, but - The Linux Bluetooth HCI_USER_CHANNEL exposes the Bluetooth Host Controller Interface to the user space, which is something above the USB layer. The user space is not able to configure the USB alt while keeping the channel open. This patch intercepts the HCI_EV_SYNC_CONN_COMPLETE packets in btusb, extracts the air mode, and configures the alt setting in btusb. This patch is tested on ChromeOS devices. The USB Bluetooth models (CVSD, TRANS alt3 and alt6) could work without a customized kernel. 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 drivers/bluetooth/Kconfig | 12 ++++++++++++ drivers/bluetooth/btusb.c | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) commit 8aed61b8334e00f4fe5de9f2df1cd183dc328a9d Merge: 2a405b36a641 376a8c2a1443 Author: Linus Torvalds Date: Fri Mar 7 07:29:13 2025 -1000 Merge tag 'platform-drivers-x86-v6.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Ilpo Järvinen: - amd/pmf: - Initialize 'cb_mutex' - Support for new version of PMF-TA - intel-hid: Fix volume buttons on Microsoft Surface Go 4 tablet - intel/vsec: Add Diamond Rapids support - thinkpad_acpi: Add battery quirk for ThinkPad X131e * tag 'platform-drivers-x86-v6.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86/amd/pmf: Update PMF Driver for Compatibility with new PMF-TA platform/x86/amd/pmf: Propagate PMF-TA return codes platform/x86/intel/vsec: Add Diamond Rapids support platform/x86: thinkpad_acpi: Add battery quirk for ThinkPad X131e platform/x86: intel-hid: fix volume buttons on Microsoft Surface Go 4 tablet platform/x86/amd/pmf: Initialize and clean up `cb_mutex` commit 2a405b36a6418e9a9e07314c90c14ebe370ed79b Merge: 00a7d39898c8 8463d2adbe19 Author: Linus Torvalds Date: Fri Mar 7 07:24:41 2025 -1000 Merge tag 'sound-6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "There is a single change in ALSA core (for sequencer code for the module auto-loading in a wrong timing) while the all rest are various HD- and USB-audio fixes. Many of them are boring device-specific quirks, and should be safe to take" * tag 'sound-6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Add support for ASUS Zenbook UM3406KA Laptops using CS35L41 HDA ALSA: hda/realtek: Add support for ASUS B5405 and B5605 Laptops using CS35L41 HDA ALSA: hda/realtek: Add support for ASUS B3405 and B3605 Laptops using CS35L41 HDA ALSA: hda/realtek: Add support for various ASUS Laptops using CS35L41 HDA ALSA: hda/realtek: Add support for ASUS ROG Strix G614 Laptops using CS35L41 HDA ALSA: hda/realtek: Add support for ASUS ROG Strix GA603 Laptops using CS35L41 HDA ALSA: hda/realtek: Add support for ASUS ROG Strix G814 Laptop using CS35L41 HDA ALSA: hda: intel: Add Dell ALC3271 to power_save denylist ALSA: hda/realtek: update ALC222 depop optimize ALSA: hda: realtek: fix incorrect IS_REACHABLE() usage ALSA: usx2y: validate nrpacks module parameter on probe ALSA: hda/realtek - add supported Mic Mute LED for Lenovo platform ALSA: seq: Avoid module auto-load handling at event delivery ALSA: hda: Fix speakers on ASUS EXPERTBOOK P5405CSA 1.0 ALSA: hda/realtek: Fix Asus Z13 2025 audio ALSA: hda/realtek: Remove (revert) duplicate Ally X config commit cba3b86974a3388b12130654809e50cd19294849 Author: Miguel Ojeda Date: Sun Mar 2 00:16:02 2025 +0100 drm/panic: fix overindented list items in documentation Starting with the upcoming Rust 1.86.0 (to be released 2025-04-03), Clippy warns: error: doc list item overindented --> drivers/gpu/drm/drm_panic_qr.rs:914:5 | 914 | /// will be encoded as binary segment, otherwise it will be encoded | ^^^ help: try using ` ` (2 spaces) | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items The overindentation is slightly hard to notice, since all the items start with a backquote that makes it look OK, but it is there. Thus fix it. Signed-off-by: Miguel Ojeda Fixes: cb5164ac43d0 ("drm/panic: Add a QR code panic screen") Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Reviewed-by: Jocelyn Falempe Reviewed-by: Alice Ryhl Signed-off-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20250301231602.917580-2-ojeda@kernel.org drivers/gpu/drm/drm_panic_qr.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 986c2e9ca818b0b74cfc737517549fd0b80ff15d Author: Miguel Ojeda Date: Sun Mar 2 00:16:01 2025 +0100 drm/panic: use `div_ceil` to clean Clippy warning Starting with the upcoming Rust 1.86.0 (to be released 2025-04-03), Clippy warns: error: manually reimplementing `div_ceil` --> drivers/gpu/drm/drm_panic_qr.rs:548:26 | 548 | let pad_offset = (offset + 7) / 8; | ^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `offset.div_ceil(8)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil And similarly for `stride`. Thus apply the suggestion to both. The behavior (and thus codegen) is not exactly equivalent [1][2], since `div_ceil()` returns the right value for the values that currently would overflow. Link: https://github.com/rust-lang/rust-clippy/issues/14333 [1] Link: https://godbolt.org/z/dPq6nGnv3 [2] Signed-off-by: Miguel Ojeda Fixes: cb5164ac43d0 ("drm/panic: Add a QR code panic screen") Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Reviewed-by: Alice Ryhl Reviewed-by: Jocelyn Falempe Signed-off-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20250301231602.917580-1-ojeda@kernel.org drivers/gpu/drm/drm_panic_qr.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3e385c0d6ce88ac9916dcf84267bd5855d830748 Author: Alexey Kardashevskiy Date: Fri Mar 7 12:37:00 2025 +1100 virt: sev-guest: Move SNP Guest Request data pages handling under snp_cmd_mutex Compared to the SNP Guest Request, the "Extended" version adds data pages for receiving certificates. If not enough pages provided, the HV can report to the VM how much is needed so the VM can reallocate and repeat. Commit ae596615d93d ("virt: sev-guest: Reduce the scope of SNP command mutex") moved handling of the allocated/desired pages number out of scope of said mutex and create a possibility for a race (multiple instances trying to trigger Extended request in a VM) as there is just one instance of snp_msg_desc per /dev/sev-guest and no locking other than snp_cmd_mutex. Fix the issue by moving the data blob/size and the GHCB input struct (snp_req_data) into snp_guest_req which is allocated on stack now and accessed by the GHCB caller under that mutex. Stop allocating SEV_FW_BLOB_MAX_SIZE in snp_msg_alloc() as only one of four callers needs it. Free the received blob in get_ext_report() right after it is copied to the userspace. Possible future users of snp_send_guest_request() are likely to have different ideas about the buffer size anyways. Fixes: ae596615d93d ("virt: sev-guest: Reduce the scope of SNP command mutex") Signed-off-by: Alexey Kardashevskiy Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikunj A Dadhania Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250307013700.437505-3-aik@amd.com arch/x86/coco/sev/core.c | 23 ++++++++-------------- arch/x86/include/asm/sev.h | 6 +++--- drivers/virt/coco/sev-guest/sev-guest.c | 34 +++++++++++++++++++++++++++------ 3 files changed, 39 insertions(+), 24 deletions(-) commit ac7c06acaa3738b38e83815ac0f07140ad320f13 Author: Nikunj A Dadhania Date: Thu Mar 6 19:17:21 2025 +1100 virt: sev-guest: Allocate request data dynamically Commit ae596615d93d ("virt: sev-guest: Reduce the scope of SNP command mutex") narrowed the command mutex scope to snp_send_guest_request(). However, GET_REPORT, GET_DERIVED_KEY, and GET_EXT_REPORT share the req structure in snp_guest_dev. Without the mutex protection, concurrent requests can overwrite each other's data. Fix it by dynamically allocating the request structure. Fixes: ae596615d93d ("virt: sev-guest: Reduce the scope of SNP command mutex") Closes: https://github.com/AMDESE/AMDSEV/issues/265 Reported-by: andreas.stuehrk@yaxi.tech Signed-off-by: Nikunj A Dadhania Signed-off-by: Alexey Kardashevskiy Signed-off-by: Borislav Petkov (AMD) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250307013700.437505-2-aik@amd.com drivers/virt/coco/sev-guest/sev-guest.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 14cb5d83068ecf15d2da6f7d0e9ea9edbcbc0457 Author: Andrew Cooper Date: Fri Mar 7 00:28:46 2025 +0000 x86/amd_nb: Use rdmsr_safe() in amd_get_mmconfig_range() Xen doesn't offer MSR_FAM10H_MMIO_CONF_BASE to all guests. This results in the following warning: unchecked MSR access error: RDMSR from 0xc0010058 at rIP: 0xffffffff8101d19f (xen_do_read_msr+0x7f/0xa0) Call Trace: xen_read_msr+0x1e/0x30 amd_get_mmconfig_range+0x2b/0x80 quirk_amd_mmconfig_area+0x28/0x100 pnp_fixup_device+0x39/0x50 __pnp_add_device+0xf/0x150 pnp_add_device+0x3d/0x100 pnpacpi_add_device_handler+0x1f9/0x280 acpi_ns_get_device_callback+0x104/0x1c0 acpi_ns_walk_namespace+0x1d0/0x260 acpi_get_devices+0x8a/0xb0 pnpacpi_init+0x50/0x80 do_one_initcall+0x46/0x2e0 kernel_init_freeable+0x1da/0x2f0 kernel_init+0x16/0x1b0 ret_from_fork+0x30/0x50 ret_from_fork_asm+0x1b/0x30 based on quirks for a "PNP0c01" device. Treating MMCFG as disabled is the right course of action, so no change is needed there. This was most likely exposed by fixing the Xen MSR accessors to not be silently-safe. Fixes: 3fac3734c43a ("xen/pv: support selecting safe/unsafe msr accesses") Signed-off-by: Andrew Cooper Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250307002846.3026685-1-andrew.cooper3@citrix.com arch/x86/kernel/amd_nb.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 502843396ec2a3eb4f58a2e4618a4a85fc5e0f46 Author: Mika Westerberg Date: Mon Mar 3 19:40:29 2025 +0200 thunderbolt: Prevent use-after-free in resume from hibernate Kenneth noticed that his laptop crashes randomly when resuming from hibernate if there is device connected and display tunneled. I was able to reproduce this as well with the following steps: 1. Boot the system up, nothing connected. 2. Connect Thunderbolt 4 dock to the host. 3. Connect monitor to the Thunderbolt 4 dock. 4. Verify that there is picture on the screen. 5. Enter hibernate. 6. Exit hibernate. 7. Wait for the system to resume. Expectation: System resumes just fine, the connected monitor still shows screen. Actual result: There is crash during resume, screen is blank. What happens is that during resume from hibernate we tear down any existing tunnels created by the boot kernel and this ends up calling tb_dp_dprx_stop() which calls tb_tunnel_put() dropping the reference count to zero even though we never called tb_dp_dprx_start() for it (we never do that for discovery). This makes the discovered DP tunnel memory to be released and any access after that causes use-after-free and possible crash. Fix this so that we only stop DPRX flow if it has been started in the first place. Reported-by: Kenneth Crudup Closes: https://lore.kernel.org/linux-usb/8e175721-806f-45d6-892a-bd3356af80c9@panix.com/ Cc: stable@vger.kernel.org Fixes: d6d458d42e1e ("thunderbolt: Handle DisplayPort tunnel activation asynchronously") Reviewed-by: Yehezkel Bernat Signed-off-by: Mika Westerberg drivers/thunderbolt/tunnel.c | 11 ++++++++--- drivers/thunderbolt/tunnel.h | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) commit 72d520476a2fab6f3489e8388ab524985d6c4b90 Author: Miri Korenblit Date: Thu Mar 6 12:37:59 2025 +0200 wifi: cfg80211: cancel wiphy_work before freeing wiphy A wiphy_work can be queued from the moment the wiphy is allocated and initialized (i.e. wiphy_new_nm). When a wiphy_work is queued, the rdev::wiphy_work is getting queued. If wiphy_free is called before the rdev::wiphy_work had a chance to run, the wiphy memory will be freed, and then when it eventally gets to run it'll use invalid memory. Fix this by canceling the work before freeing the wiphy. Fixes: a3ee4dc84c4e ("wifi: cfg80211: add a work abstraction with special semantics") Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250306123626.efd1d19f6e07.I48229f96f4067ef73f5b87302335e2fd750136c9@changeid Signed-off-by: Johannes Berg net/wireless/core.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 9a267ce4a3fca93a34a8881046f97bcf472228c8 Author: Johannes Berg Date: Thu Mar 6 12:37:58 2025 +0200 wifi: mac80211: fix SA Query processing in MLO When MLO is used and SA Query processing isn't done by userspace (e.g. wpa_supplicant w/o CONFIG_OCV), then the mac80211 code kicks in but uses the wrong addresses. Fix them. Signed-off-by: Johannes Berg Reviewed-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250306123626.bab48bb49061.I9391b22f1360d20ac8c4e92604de23f27696ba8f@changeid Signed-off-by: Johannes Berg net/mac80211/rx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2e85829ac7fbbd57b93f6cd334b6d448c9ce9db3 Author: Johannes Berg Date: Thu Mar 6 12:37:57 2025 +0200 wifi: nl80211: fix assoc link handling The refactoring of the assoc link handling in order to support multi-link reconfiguration broke the setting of the assoc link ID, and thus resulted in the wrong BSS "use_for" value being selected. Fix that for both association and ML reconfiguration. Fixes: 720fa448f5a7 ("wifi: nl80211: Split the links handling of an association request") Signed-off-by: Johannes Berg Reviewed-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250306123626.7b233d769c32.I62fd04a8667dd55cedb9a1c0414cc92dd098da75@changeid Signed-off-by: Johannes Berg net/wireless/nl80211.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 20d5a0b9cd0ccb32e886cf6baecf14936325bf10 Author: Miri Korenblit Date: Thu Mar 6 12:37:56 2025 +0200 wifi: mac80211: don't queue sdata::work for a non-running sdata The worker really shouldn't be queued for a non-running interface. Also, if ieee80211_setup_sdata is called between queueing and executing the wk, it will be initialized, which will corrupt wiphy_work_list. Fixes: f8891461a277 ("mac80211: do not start any work during reconfigure flow") Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250306123626.1e02caf82640.I4949e71ed56e7186ed4968fa9ddff477473fa2f4@changeid Signed-off-by: Johannes Berg net/mac80211/util.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 43e04077170799d0e6289f3e928f727e401b3d79 Author: Emmanuel Grumbach Date: Thu Mar 6 12:37:55 2025 +0200 wifi: mac80211: flush the station before moving it to UN-AUTHORIZED state We first want to flush the station to make sure we no longer have any frames being Tx by the station before the station is moved to un-authorized state. Failing to do that will lead to races: a frame may be sent after the station's state has been changed. Since the API clearly states that the driver can't fail the sta_state() transition down the list of state, we can easily flush the station first, and only then call the driver's sta_state(). Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250306123626.450bc40e8b04.I636ba96843c77f13309c15c9fd6eb0c5a52a7976@changeid Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 1801a94299a5c7fc1a6825e92e1ce0dc7099faa9 Author: Miri Korenblit Date: Thu Mar 6 12:25:48 2025 +0200 wifi: iwlwifi: trans: cancel restart work on op mode leave If the restart work happens to run after the opmode left (i.e. called iwl_trans_op_mode_leave), then the opmode memory (including its mutex) is likely to be freed already, and trans->opmode is NULL. Although the hw is stopped in that stage, which means that this restart got aborted (i.e. STATUS_RESET_PENDING will be cleared), it still can access trans->opmode (NULL pointer dereference) or the opmodes memory (which is freed). Fix this by canceling the restart wk in iwl_trans_op_mode_leave. Also make sure that the restart wk is really aborted. Fixes: 7391b2a4f7db ("wifi: iwlwifi: rework firmware error handling") Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250306122425.801301ba1b8b.I6f6143f550b6335b699920c5d4b2b78449607a96@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 2 ++ 1 file changed, 2 insertions(+) commit b8c8a03e9b7bfc06f366b75daf3d0812400e7123 Author: Emmanuel Grumbach Date: Thu Mar 6 12:25:47 2025 +0200 wifi: iwlwifi: mvm: fix PNVM timeout for non-MSI-X platforms When MSI-X is not enabled, we mask all the interrupts in the interrupt handler and re-enable them when the interrupt thread runs. If STATUS_INT_ENABLED is not set, we won't re-enable in the thread. In order to get the ALIVE interrupt, we allow the ALIVE interrupt itself, and RX as well in order to receive the ALIVE notification (which is received as an RX from the firmware. The problem is that STATUS_INT_ENABLED is clear until the op_mode calls trans_fw_alive which means that until trans_fw_alive is called, any notification from the firmware will not be received. This became a problem when we inserted the pnvm_load exactly between the ALIVE and trans_fw_alive. Fix that by calling trans_fw_alive before loading the PNVM. This will allow to get the notification from the firmware about PNVM load being complete and continue the flow normally. This didn't happen on MSI-X because we don't disable the interrupts in the ISR when MSI-X is available. The error in the log looks like this: iwlwifi 0000:00:03.0: Timeout waiting for PNVM load! iwlwifi 0000:00:03.0: Failed to start RT ucode: -110 iwlwifi 0000:00:03.0: WRT: Collecting data: ini trigger 13 fired (delay=0ms). Fixes: 70d3ca86b025 ("iwlwifi: mvm: ring the doorbell and wait for PNVM load completion") Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250306122425.0f2cf207aae1.I025d8f724b44f52eadf6c19069352eb9275613a8@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bbb18f7e23a3f5f56d5c8b4ee0f78f00edb3b1b2 Author: Ilan Peer Date: Thu Mar 6 12:25:46 2025 +0200 wifi: iwlwifi: pcie: Fix TSO preparation The allocation of the scatter gather data structure should be done based on the number of memory chunks that need to be mapped, and it is not dependent on the overall payload length. Fix it. In addition, as the skb_to_sgvec() function returns an 'int' do not assign it to an 'unsigned int' as otherwise the error check would be useless. Fixes: 7f5e3038f029 ("wifi: iwlwifi: map entire SKB when sending AMSDUs") Signed-off-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250306122425.8c0e23a3d583.I3cb4d6768c9d28ce3da6cd0a6c65466176cfc1ee@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit d048c84bc1d6b831ca4e3381a16fb616ad96d8db Author: Johannes Berg Date: Thu Mar 6 09:28:26 2025 +0100 wifi: rework MAINTAINERS entries a bit Since I really don't want to be CC'ed on every patch add X: entries for all the drivers that are otherwise covered. In some cases, add a bit more to drivers that have other entries, mostly for the vendor directories, but for libertas also add libertas_tf. While at it, also add all nl80211-related (vendor) UAPI header files to the nl80211 entry. Link: https://patch.msgid.link/20250306092831.f7fdfe7df7b2.I7c86da443038af32e9bcbaa5f53b1e4128a0d1f9@changeid Signed-off-by: Johannes Berg MAINTAINERS | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) commit 00a7d39898c8010bfd5ff62af31ca5db34421b38 Author: Linus Torvalds Date: Thu Mar 6 18:25:35 2025 -1000 fs/pipe: add simpler helpers for common cases The fix to atomically read the pipe head and tail state when not holding the pipe mutex has caused a number of headaches due to the size change of the involved types. It turns out that we don't have _that_ many places that access these fields directly and were affected, but we have more than we strictly should have, because our low-level helper functions have been designed to have intimate knowledge of how the pipes work. And as a result, that random noise of direct 'pipe->head' and 'pipe->tail' accesses makes it harder to pinpoint any actual potential problem spots remaining. For example, we didn't have a "is the pipe full" helper function, but instead had a "given these pipe buffer indexes and this pipe size, is the pipe full". That's because some low-level pipe code does actually want that much more complicated interface. But most other places literally just want a "is the pipe full" helper, and not having it meant that those places ended up being unnecessarily much too aware of this all. It would have been much better if only the very core pipe code that cared had been the one aware of this all. So let's fix it - better late than never. This just introduces the trivial wrappers for "is this pipe full or empty" and to get how many pipe buffers are used, so that instead of writing if (pipe_full(pipe->head, pipe->tail, pipe->max_usage)) the places that literally just want to know if a pipe is full can just say if (pipe_is_full(pipe)) instead. The existing trivial cases were converted with a 'sed' script. This cuts down on the places that access pipe->head and pipe->tail directly outside of the pipe code (and core splice code) quite a lot. The splice code in particular still revels in doing the direct low-level accesses, and the fuse fuse_dev_splice_write() code also seems a bit unnecessarily eager to go very low-level, but it's at least a bit better than it used to be. Signed-off-by: Linus Torvalds drivers/char/virtio_console.c | 4 ++-- fs/fuse/dev.c | 2 +- fs/pipe.c | 6 +++--- fs/splice.c | 20 ++++++++++---------- include/linux/pipe_fs_i.h | 27 +++++++++++++++++++++++++++ mm/filemap.c | 7 +++---- mm/shmem.c | 6 +++--- 7 files changed, 49 insertions(+), 23 deletions(-) commit 28f587adb69957125241a8df359b68b134f3c4a1 Merge: 0f52fd4f67c6 c8bc66206a44 Author: Linus Torvalds Date: Thu Mar 6 17:04:25 2025 -1000 Merge tag 'drm-fixes-2025-03-07' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Fixes across the board, mostly xe and imagination with some amd and misc others. The xe fixes are mostly hmm related, though there are some others in there as well, nothing really stands out otherwise. The nouveau Kconfig to select FW_CACHE is in this, which we discussed a while back. nouveau: - rely on fw caching Kconfig fix imagination: - avoid deadlock on fence release - fix fence initialisation - fix timestamps firmware traces scheduler: - fix include guard bochs: - dpms fix i915: - bump max stream count to match pipes xe: - Remove double page flip on initial plane - Properly setup userptr pfn_flags_mask - Fix GT "for each engine" workarounds - Fix userptr races and missed validations - Userptr invalid page access fixes - Cleanup some style nits amdgpu: - Fix NULL check in DC code - SMU 14 fix amdkfd: - Fix NULL check in queue validation radeon: - RS400 HyperZ fix" * tag 'drm-fixes-2025-03-07' of https://gitlab.freedesktop.org/drm/kernel: (22 commits) drm/bochs: Fix DPMS regression drm/xe/userptr: Unmap userptrs in the mmu notifier drm/xe/hmm: Don't dereference struct page pointers without notifier lock drm/xe/hmm: Style- and include fixes drm/xe: Add staging tree for VM binds drm/xe: Fix fault mode invalidation with unbind drm/xe/vm: Fix a misplaced #endif drm/xe/vm: Validate userptr during gpu vma prefetching drm/amd/pm: always allow ih interrupt from fw drm/radeon: Fix rs400_gpu_init for ATI mobility radeon Xpress 200M drm/amdkfd: Fix NULL Pointer Dereference in KFD queue drm/amd/display: Fix null check for pipe_ctx->plane_state in resource_build_scaling_params drm/xe: Fix GT "for each engine" workarounds drm/xe/userptr: properly setup pfn_flags_mask drm/i915/mst: update max stream count to match number of pipes drm/xe: Remove double pageflip drm/sched: Fix preprocessor guard drm/imagination: Fix timestamps in firmware traces drm/imagination: only init job done fences once drm/imagination: Hold drm_gem_gpuva lock for unmap ... commit fc14f9c02639dfbfe3529850eae23aef077939a6 Merge: 115ef44a9822 fb8286562ecf Author: Jakub Kicinski Date: Thu Mar 6 17:58:49 2025 -0800 Merge tag 'nf-25-03-06' 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) Fix racy non-atomic read-then-increment operation with PREEMPT_RT in nft_ct, from Sebastian Andrzej Siewior. 2) GC is not skipped when jiffies wrap around in nf_conncount, from Nicklas Bo Jensen. 3) flush_work() on nf_tables_destroy_work waits for the last queued instance, this could be an instance that is different from the one that we must wait for, then make destruction work queue. * tag 'nf-25-03-06' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_tables: make destruction work queue pernet netfilter: nf_conncount: garbage collection is not skipped when jiffies wrap around netfilter: nft_ct: Use __refcount_inc() for per-CPU nft_ct_pcpu_template. ==================== Link: https://patch.msgid.link/20250306153446.46712-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit e7112524e5e885181cc5ae4d258f33b9dbe0b907 Author: Breno Leitao Date: Thu Mar 6 08:27:51 2025 -0800 block: Name the RQF flags enum Commit 5f89154e8e9e3445f9b59 ("block: Use enum to define RQF_x bit indexes") converted the RQF flags to an anonymous enum, which was a beneficial change. This patch goes one step further by naming the enum as "rqf_flags". This naming enables exporting these flags to BPF clients, eliminating the need to duplicate these flags in BPF code. Instead, BPF clients can now access the same kernel-side values through CO:RE (Compile Once, Run Everywhere), as shown in this example: rqf_stats = bpf_core_enum_value(enum rqf_flags, __RQF_STATS) Suggested-by: Yonghong Song Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20250306-rqf_flags-v1-1-bbd64918b406@debian.org Signed-off-by: Jens Axboe include/linux/blk-mq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 115ef44a98220fddfab37a39a19370497cd718b9 Author: Jun Yang Date: Wed Mar 5 23:44:10 2025 +0800 sched: address a potential NULL pointer dereference in the GRED scheduler. If kzalloc in gred_init returns a NULL pointer, the code follows the error handling path, invoking gred_destroy. This, in turn, calls gred_offload, where memset could receive a NULL pointer as input, potentially leading to a kernel crash. When table->opt is NULL in gred_init(), gred_change_table_def() is not called yet, so it is not necessary to call ->ndo_setup_tc() in gred_offload(). Signed-off-by: Jun Yang Reviewed-by: Cong Wang Fixes: f25c0515c521 ("net: sched: gred: dynamically allocate tc_gred_qopt_offload") Link: https://patch.msgid.link/20250305154410.3505642-1-juny24602@gmail.com Signed-off-by: Jakub Kicinski net/sched/sch_gred.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e4e832d2b9e84d1a290f0279b10593cf465e6fb1 Merge: f315296c92fd 2a3e89a14864 Author: Jakub Kicinski Date: Thu Mar 6 16:32:11 2025 -0800 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-03-05 (ice) This series contains updates to ice driver. Larysa removes modification of destination override that caused LLDP packets to be blocked. Grzegorz fixes a memory leak in aRFS. Marcin resolves an issue with operation of switchdev and LAG. Przemek adjusts order of calls for registering devlink in relation to health reporters. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: register devlink prior to creating health reporters ice: Fix switchdev slow-path in LAG ice: fix memory leak in aRFS after reset ice: do not configure destination override for switchdev ==================== Link: https://patch.msgid.link/20250305213549.1514274-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit c8bc66206a44f389649af374f5301b2c3a71fff4 Merge: eea6520c225a da552bda9874 Author: Dave Airlie Date: Fri Mar 7 09:41:45 2025 +1000 Merge tag 'amd-drm-fixes-6.14-2025-03-06' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.14-2025-03-06: amdgpu: - Fix NULL check in DC code - SMU 14 fix amdkfd: - Fix NULL check in queue validation radeon: - RS400 HyperZ fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20250306193424.27413-1-alexander.deucher@amd.com commit 0f52fd4f67c67f7f2ea3063c627e466255f027fd Merge: f315296c92fd 8ba73f53dc5b Author: Linus Torvalds Date: Thu Mar 6 13:52:15 2025 -1000 Merge tag 'bcachefs-2025-03-06' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: - Fix a compatibility issue: we shouldn't be setting incompat feature bits unless explicitly requested - Fix another bug where the journal alloc/resize path could spuriously fail with -BCH_ERR_open_buckets_empty - Copygc shouldn't run on read-only devices: fragmentation isn't an issue if we're not currently writing to a given device, and it may not have anywhere to move the data to * tag 'bcachefs-2025-03-06' of git://evilpiepirate.org/bcachefs: bcachefs: copygc now skips non-rw devices bcachefs: Fix bch2_dev_journal_alloc() spuriously failing bcachefs: Don't set BCH_FEATURE_incompat_version_field unless requested commit 8ba73f53dc5b7545776e09e6982115dcbcbabec4 Author: Kent Overstreet Date: Fri Feb 28 11:34:41 2025 -0500 bcachefs: copygc now skips non-rw devices There's no point in doing copygc on non-rw devices: the fragmentation doesn't matter if we're not writing to them, and we may not have anywhere to put the data on our other devices. Signed-off-by: Kent Overstreet fs/bcachefs/movinggc.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 33255c161ac4be003ac87c434ebc49645d18a929 Author: Kent Overstreet Date: Fri Feb 28 20:07:58 2025 -0500 bcachefs: Fix bch2_dev_journal_alloc() spuriously failing Previously, we fixed journal resize spuriousl failing with -BCH_ERR_open_buckets_empty, but initial journal allocation was missed because it didn't invoke the "block on allocator" loop at all. Factor out the "loop on allocator" code to fix that. Signed-off-by: Kent Overstreet fs/bcachefs/journal.c | 59 ++++++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 27 deletions(-) commit eea6520c225adb75cae59cae712f463686aba5a9 Merge: 019899b551a1 333b89063361 Author: Dave Airlie Date: Fri Mar 7 09:03:14 2025 +1000 Merge tag 'drm-xe-fixes-2025-03-06' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes - Remove double page flip on initial plane (Maarten) - Properly setup userptr pfn_flags_mask (Auld) - Fix GT "for each engine" workarounds (Tvrtko) - Fix userptr races and missed validations (Thomas, Brost) - Userptr invalid page access fixes (Thomas) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Z8ni6w3tskCFL11O@intel.com commit 019899b551a107d8d081a38dec7335e9d4ff7f76 Merge: ac3a75bd4205 d1039a3c12ff Author: Dave Airlie Date: Fri Mar 7 08:25:06 2025 +1000 Merge tag 'drm-intel-fixes-2025-03-06' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - DP MST fix (Jani) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Z8ng8NjmRGiVcb5t@intel.com commit ac3a75bd4205b8856631f57001ebd304e072124e Merge: 7eb172143d55 80da96d73509 Author: Dave Airlie Date: Fri Mar 7 07:03:56 2025 +1000 Merge tag 'drm-misc-fixes-2025-03-06' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes A Kconfig fix for nouveau, locking and timestamp fixes for imagination, a header guard fix for sched and a DPMS regression fix for bochs. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20250306-antelope-of-imminent-anger-bca19e@houat commit c00b413a96261faef4ce22329153c6abd4acef25 Author: Ard Biesheuvel Date: Thu Mar 6 16:59:16 2025 +0100 x86/boot: Sanitize boot params before parsing command line The 5-level paging code parses the command line to look for the 'no5lvl' string, and does so very early, before sanitize_boot_params() has been called and has been given the opportunity to wipe bogus data from the fields in boot_params that are not covered by struct setup_header, and are therefore supposed to be initialized to zero by the bootloader. This triggers an early boot crash when using syslinux-efi to boot a recent kernel built with CONFIG_X86_5LEVEL=y and CONFIG_EFI_STUB=n, as the 0xff padding that now fills the unused PE/COFF header is copied into boot_params by the bootloader, and interpreted as the top half of the command line pointer. Fix this by sanitizing the boot_params before use. Note that there is no harm in calling this more than once; subsequent invocations are able to spot that the boot_params have already been cleaned up. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: "H. Peter Anvin" Cc: Linus Torvalds Cc: # v6.1+ Link: https://lore.kernel.org/r/20250306155915.342465-2-ardb+git@google.com Closes: https://lore.kernel.org/all/202503041549.35913.ulrich.gemkow@ikr.uni-stuttgart.de arch/x86/boot/compressed/pgtable_64.c | 2 ++ 1 file changed, 2 insertions(+) commit 0ea4c3906416cefd6ae7ae5e93af9f2ef1b8c39b Author: Alban Kurti Date: Thu Feb 6 21:07:56 2025 +0000 rust: workqueue: add missing newline to pr_info! examples The documentation examples in rust/kernel/workqueue.rs use pr_info! calls that lack a trailing newline. To maintain consistency with kernel logging practices, this patch adds the newline to all affected examples. Fixes: 15b286d1fd05 ("rust: workqueue: add examples") Reported-by: Miguel Ojeda Link: https://github.com/Rust-for-Linux/linux/issues/1139 Signed-off-by: Alban Kurti Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250206-printing_fix-v3-5-a85273b501ae@invicto.ai [ Replaced Closes with Link since it fixes part of the issue. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/workqueue.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 50c3e77eb3712a039760345999709ee0fad83447 Author: Alban Kurti Date: Thu Feb 6 21:07:55 2025 +0000 rust: sync: add missing newline in locked_by log example The pr_info! example in rust/kernel/sync/locked_by.rs was missing a newline. This patch appends the missing newline to ensure that log messages for locked resources display correctly. Fixes: 7b1f55e3a984 ("rust: sync: introduce `LockedBy`") Reported-by: Miguel Ojeda Link: https://github.com/Rust-for-Linux/linux/issues/1139 Signed-off-by: Alban Kurti Link: https://lore.kernel.org/r/20250206-printing_fix-v3-4-a85273b501ae@invicto.ai [ Replaced Closes with Link since it fixes part of the issue. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/sync/locked_by.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6933c1067fe6df8ddb34dd68bdb2aa172cbd08c8 Author: Alban Kurti Date: Thu Feb 6 21:07:54 2025 +0000 rust: init: add missing newline to pr_info! calls Several pr_info! calls in rust/kernel/init.rs (both in code examples and macro documentation) were missing a newline, causing logs to run together. This commit updates these calls to include a trailing newline, improving readability and consistency with the C side. Fixes: 6841d45a3030 ("rust: init: add `stack_pin_init!` macro") Fixes: 7f8977a7fe6d ("rust: init: add `{pin_}chain` functions to `{Pin}Init`") Fixes: d0fdc3961270 ("rust: init: add `PinnedDrop` trait and macros") Fixes: 4af84c6a85c6 ("rust: init: update expanded macro explanation") Reported-by: Miguel Ojeda Link: https://github.com/Rust-for-Linux/linux/issues/1139 Signed-off-by: Alban Kurti Link: https://lore.kernel.org/r/20250206-printing_fix-v3-3-a85273b501ae@invicto.ai [ Replaced Closes with Link since it fixes part of the issue. Added one more Fixes tag (still same set of stable kernels). - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/init.rs | 12 ++++++------ rust/kernel/init/macros.rs | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) commit f315296c92fd4b7716bdea17f727ab431891dc3b Merge: 1238f0af1349 5da15a9c11c1 Author: Linus Torvalds Date: Thu Mar 6 09:34:54 2025 -1000 Merge tag 'net-6.14-rc6' 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 - new code bugs: - wifi: nl80211: disable multi-link reconfiguration Previous releases - regressions: - gso: fix ownership in __udp_gso_segment - wifi: iwlwifi: - fix A-MSDU TSO preparation - free pages allocated when failing to build A-MSDU - ipv6: fix dst ref loop in ila lwtunnel - mptcp: fix 'scheduling while atomic' in mptcp_pm_nl_append_new_local_addr - bluetooth: add check for mgmt_alloc_skb() in mgmt_device_connected() - ethtool: allow NULL nlattrs when getting a phy_device - eth: be2net: fix sleeping while atomic bugs in be_ndo_bridge_getlink Previous releases - always broken: - core: support TCP GSO case for a few missing flags - wifi: mac80211: - fix vendor-specific inheritance - cleanup sta TXQs on flush - llc: do not use skb_get() before dev_queue_xmit() - eth: ipa: nable checksum for IPA_ENDPOINT_AP_MODEM_{RX,TX} for v4.7" * tag 'net-6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (41 commits) net: ipv6: fix missing dst ref drop in ila lwtunnel net: ipv6: fix dst ref loop in ila lwtunnel mctp i3c: handle NULL header address net: dsa: mt7530: Fix traffic flooding for MMIO devices net-timestamp: support TCP GSO case for a few missing flags vlan: enforce underlying device type mptcp: fix 'scheduling while atomic' in mptcp_pm_nl_append_new_local_addr net: ethtool: netlink: Allow NULL nlattrs when getting a phy_device ppp: Fix KMSAN uninit-value warning with bpf net: ipa: Enable checksum for IPA_ENDPOINT_AP_MODEM_{RX,TX} for v4.7 net: ipa: Fix QSB data for v4.7 net: ipa: Fix v4.7 resource group names net: hns3: make sure ptp clock is unregister and freed if hclge_ptp_get_cycle returns an error wifi: nl80211: disable multi-link reconfiguration net: dsa: rtl8366rb: don't prompt users for LED control be2net: fix sleeping while atomic bugs in be_ndo_bridge_getlink llc: do not use skb_get() before dev_queue_xmit() wifi: cfg80211: regulatory: improve invalid hints checking caif_virtio: fix wrong pointer check in cfv_probe() net: gso: fix ownership in __udp_gso_segment ... commit 1238f0af13495e14e1f40d011b9b7b414bf387fe Merge: 5872cca23a01 aa2a739a75ab Author: Linus Torvalds Date: Thu Mar 6 09:19:15 2025 -1000 Merge tag 'v6.14-rc5-smb3-fixes' of git://git.samba.org/ksmbd Pull smb fixes from Steve French: "Five SMB server fixes, two related client fixes, and minor MAINTAINERS update: - Two SMB3 lock fixes fixes (including use after free and bug on fix) - Fix to race condition that can happen in processing IPC responses - Four ACL related fixes: one related to endianness of num_aces, and two related fixes to the checks for num_aces (for both client and server), and one fixing missing check for num_subauths which can cause memory corruption - And minor update to email addresses in MAINTAINERS file" * tag 'v6.14-rc5-smb3-fixes' of git://git.samba.org/ksmbd: cifs: fix incorrect validation for num_aces field of smb_acl ksmbd: fix incorrect validation for num_aces field of smb_acl smb: common: change the data type of num_aces to le16 ksmbd: fix bug on trap in smb2_lock ksmbd: fix use-after-free in smb2_lock ksmbd: fix type confusion via race condition when using ipc_msg_send_request ksmbd: fix out-of-bounds in parse_sec_desc() MAINTAINERS: update email address in cifs and ksmbd entry commit 5872cca23a017aae01d0b2f82346907169f7aa01 Merge: 7f0e9ee5e448 13940cef9549 Author: Linus Torvalds Date: Thu Mar 6 08:18:48 2025 -1000 Merge tag 'exfat-for-6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat fixes from Namjae Jeon: - Optimize new cluster allocation by correctly find empty entry slot - Add a check to prevent excessive bitmap clearing due to invalid data size of file/dir entry - Fix incorrect error return for zero-byte writes * tag 'exfat-for-6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: add a check for invalid data size exfat: short-circuit zero-byte writes in exfat_file_write_iter exfat: fix soft lockup in exfat_clear_bitmap exfat: fix just enough dentries but allocate a new cluster to dir commit 7f0e9ee5e44887272627d0fcde0b19a675daf597 Merge: ebb0f38bb47f d385c8bceb14 Author: Linus Torvalds Date: Thu Mar 6 08:04:49 2025 -1000 Merge tag 'vfs-6.14-rc6.fixes' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: - Fix spelling mistakes in idmappings.rst - Fix RCU warnings in override_creds()/revert_creds() - Create new pid namespaces with default limit now that pid_max is namespaced * tag 'vfs-6.14-rc6.fixes' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs: pid: Do not set pid_max in new pid namespaces doc: correcting two prefix errors in idmappings.rst cred: Fix RCU warnings in override/revert_creds commit ebb0f38bb47f74b29e267babdbcd2c47d5292aa8 Author: Linus Torvalds Date: Thu Mar 6 07:53:25 2025 -1000 fs/pipe: fix pipe buffer index use in FUSE This was another case that Rasmus pointed out where the direct access to the pipe head and tail pointers broke on 32-bit configurations due to the type changes. As with the pipe FIONREAD case, fix it by using the appropriate helper functions that deal with the right pipe index sizing. Reported-by: Rasmus Villemoes Link: https://lore.kernel.org/all/878qpi5wz4.fsf@prevas.dk/ Fixes: 3d252160b818 ("fs/pipe: Read pipe->{head,tail} atomically outside pipe->mutex")Cc: Oleg > Cc: Mateusz Guzik Cc: K Prateek Nayak Cc: Swapnil Sapkal Signed-off-by: Linus Torvalds fs/fuse/dev.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit d810d4c27bf34c719243bab9feb0d843edc09fd7 Author: Linus Torvalds Date: Thu Mar 6 07:33:58 2025 -1000 fs/pipe: do not open-code pipe head/tail logic in FIONREAD Rasmus points out that we do indeed have other cases of breakage from the type changes that were introduced on 32-bit targets in order to read the pipe head and tail values atomically (commit 3d252160b818: "fs/pipe: Read pipe->{head,tail} atomically outside pipe->mutex"). Fix it up by using the proper helper functions that now deal with the pipe buffer index types properly. This makes the code simpler and more obvious. The compiler does the CSE and loop hoisting of the pipe ring size masking that we used to do manually, so open-coding this was never a good idea. Reported-by: Rasmus Villemoes Link: https://lore.kernel.org/all/87cyeu5zgk.fsf@prevas.dk/ Fixes: 3d252160b818 ("fs/pipe: Read pipe->{head,tail} atomically outside pipe->mutex")Cc: Oleg Nesterov Cc: Mateusz Guzik Cc: K Prateek Nayak Cc: Swapnil Sapkal Signed-off-by: Linus Torvalds fs/pipe.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 74d42bdb3a4673b1c10d1f457184e4d3c9cb0196 Author: Linus Torvalds Date: Thu Mar 6 07:30:42 2025 -1000 fs/pipe: express 'pipe_empty()' in terms of 'pipe_occupancy()' That's what 'pipe_full()' does, so it's more consistent. But more importantly it gets the type limits right when the pipe head and tail are no longer necessarily 'unsigned int'. Signed-off-by: Linus Torvalds include/linux/pipe_fs_i.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b13abcb7ddd8d38de769486db5bd917537b32ab1 Author: Andrei Kuchynski Date: Wed Mar 5 11:17:39 2025 +0000 usb: typec: ucsi: Fix NULL pointer access Resources should be released only after all threads that utilize them have been destroyed. This commit ensures that resources are not released prematurely by waiting for the associated workqueue to complete before deallocating them. Cc: stable Fixes: b9aa02ca39a4 ("usb: typec: ucsi: Add polling mechanism for partner tasks like alt mode checking") Signed-off-by: Andrei Kuchynski Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250305111739.1489003-2-akuchynski@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit ff712188daa3fe3ce7e11e530b4dca3826dae14a Author: Miao Li Date: Tue Mar 4 15:07:57 2025 +0800 usb: quirks: Add DELAY_INIT and NO_LPM for Prolific Mass Storage Card Reader When used on Huawei hisi platforms, Prolific Mass Storage Card Reader which the VID:PID is in 067b:2731 might fail to enumerate at boot time and doesn't work well with LPM enabled, combination quirks: USB_QUIRK_DELAY_INIT + USB_QUIRK_NO_LPM fixed the problems. Signed-off-by: Miao Li Cc: stable Link: https://lore.kernel.org/r/20250304070757.139473-1-limiao870622@163.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 4 ++++ 1 file changed, 4 insertions(+) commit 391b41f983bf7ff853de44704d8e14e7cc648a9b Author: Fabrizio Castro Date: Wed Mar 5 16:37:50 2025 +0000 gpio: rcar: Fix missing of_node_put() call of_parse_phandle_with_fixed_args() requires its caller to call into of_node_put() on the node pointer from the output structure, but such a call is currently missing. Call into of_node_put() to rectify that. Fixes: 159f8a0209af ("gpio-rcar: Add DT support") Signed-off-by: Fabrizio Castro Reviewed-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20250305163753.34913-2-fabrizio.castro.jz@renesas.com Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-rcar.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 35d99c68af40a8ca175babc5a89ef7e2226fb3ca Author: Haoxiang Li Date: Mon Mar 3 10:42:33 2025 +0800 btrfs: fix a leaked chunk map issue in read_one_chunk() Add btrfs_free_chunk_map() to free the memory allocated by btrfs_alloc_chunk_map() if btrfs_add_chunk_map() fails. Fixes: 7dc66abb5a47 ("btrfs: use a dedicated data structure for chunk maps") CC: stable@vger.kernel.org Reviewed-by: Qu Wenruo Reviewed-by: Filipe Manana Signed-off-by: Haoxiang Li Signed-off-by: David Sterba fs/btrfs/volumes.c | 1 + 1 file changed, 1 insertion(+) commit e26f1cfeac6712516bfeed80890da664f4f2e88a Author: Charles Keepax Date: Thu Mar 6 13:32:54 2025 +0000 ASoC: cs42l43: Fix maximum ADC Volume The range of ADC volume is -1 -> 3 (-6 to 18dB) so the number of levels should actually be 4. Fixes: fc918cbe874e ("ASoC: cs42l43: Add support for the cs42l43") Signed-off-by: Charles Keepax Link: https://patch.msgid.link/20250306133254.1861046-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs42l43.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb8286562ecfb585e26b033c5e32e6fb85efb0b3 Author: Florian Westphal Date: Thu Mar 6 04:05:26 2025 +0100 netfilter: nf_tables: make destruction work queue pernet The call to flush_work before tearing down a table from the netlink notifier was supposed to make sure that all earlier updates (e.g. rule add) that might reference that table have been processed. Unfortunately, flush_work() waits for the last queued instance. This could be an instance that is different from the one that we must wait for. This is because transactions are protected with a pernet mutex, but the work item is global, so holding the transaction mutex doesn't prevent another netns from queueing more work. Make the work item pernet so that flush_work() will wait for all transactions queued from this netns. A welcome side effect is that we no longer need to wait for transaction objects from foreign netns. The gc work queue is still global. This seems to be ok because nft_set structures are reference counted and each container structure owns a reference on the net namespace. The destroy_list is still protected by a global spinlock rather than pernet one but the hold time is very short anyway. v2: call cancel_work_sync before reaping the remaining tables (Pablo). Fixes: 9f6958ba2e90 ("netfilter: nf_tables: unconditionally flush pending work before notifier") Reported-by: syzbot+5d8c5789c8cb076b2c25@syzkaller.appspotmail.com Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 4 +++- net/netfilter/nf_tables_api.c | 24 ++++++++++++++---------- net/netfilter/nft_compat.c | 8 ++++---- 3 files changed, 21 insertions(+), 15 deletions(-) commit ca57b5bfa214063a109ae9bc85862ce3ed155027 Merge: e06472bab2a5 528361c49962 Author: Jens Axboe Date: Thu Mar 6 04:32:46 2025 -0700 Merge tag 'nvme-6.14-2025-03-05' of git://git.infradead.org/nvme into block-6.14 Pull NVMe fixe from Keith: "nvme fixes for Linux 6.14 - TCP use after free fix on polling (Sagi) - Controller memory buffer cleanup fixes (Icenowy) - Free leaking requests on bad user passthrough commands (Keith) - TCP error message fix (Maurizio) - TCP corruption fix on partial PDU (Maurizio) - TCP memory ordering fix for weakly ordered archs (Meir) - Type coercion fix on message error for TCP (Dan)" * tag 'nvme-6.14-2025-03-05' of git://git.infradead.org/nvme: nvme-tcp: fix signedness bug in nvme_tcp_init_connection() nvmet-tcp: Fix a possible sporadic response drops in weakly ordered arch nvme-tcp: fix potential memory corruption in nvme_tcp_recv_pdu() nvme-tcp: Fix a C2HTermReq error message nvmet: remove old function prototype nvme-ioctl: fix leaked requests on mapping error nvme-pci: skip CMB blocks incompatible with PCI P2P DMA nvme-pci: clean up CMBMSC when registering CMB fails nvme-tcp: fix possible UAF in nvme_tcp_poll commit b5e3956535466187657563b754ba0f1da8626c7f Author: Inochi Amaoto Date: Thu Mar 6 14:39:51 2025 +0800 kbuild: install-extmod-build: Fix build when specifying KBUILD_OUTPUT Since commit 5f73e7d0386d ("kbuild: refactor cross-compiling linux-headers package"), the linux-headers pacman package fails to build when "O=" is set. The build system complains: /mnt/chroot/linux/scripts/Makefile.build:41: mnt/chroots/linux-mainline/pacman/linux-upstream/pkg/linux-upstream-headers/usr//lib/modules/6.14.0-rc3-00350-g771dba31fffc/build/scripts/Makefile: No such file or directory This is because the "srcroot" variable is set to "." and the "build" variable is set to the absolute path. This makes the "src" variables point to wrong directory. Change the "build" variable to a relative path to "." to fix build. Fixes: 5f73e7d0386d ("kbuild: refactor cross-compiling linux-headers package") Signed-off-by: Inochi Amaoto Signed-off-by: Masahiro Yamada scripts/package/install-extmod-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9af152dcf1a06f589f44a74da4ad67e365d4db9a Author: Ivan Abramov Date: Thu Mar 6 14:20:45 2025 +0300 drm/gma500: Add NULL check for pci_gfx_root in mid_get_vbt_data() Since pci_get_domain_bus_and_slot() can return NULL, add NULL check for pci_gfx_root in the mid_get_vbt_data(). This change is similar to the checks implemented in mid_get_fuse_settings() and mid_get_pci_revID(), which were introduced by commit 0cecdd818cd7 ("gma500: Final enables for Oaktrail") as "additional minor bulletproofing". Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: f910b411053f ("gma500: Add the glue to the various BIOS and firmware interfaces") Signed-off-by: Ivan Abramov Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20250306112046.17144-1-i.abramov@mt-integration.ru drivers/gpu/drm/gma500/mid_bios.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6232f0d8e100a26275bbd773fc56a60af2c95322 Author: Fabio Porcedda Date: Tue Mar 4 10:19:39 2025 +0100 USB: serial: option: fix Telit Cinterion FE990A name The correct name for FE990 is FE990A so use it in order to avoid confusion with FE990B. Cc: stable@vger.kernel.org Signed-off-by: Fabio Porcedda Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4981bb50392b7515b765da28cf8768ce624c2670 Author: Fabio Porcedda Date: Tue Mar 4 10:19:38 2025 +0100 USB: serial: option: add Telit Cinterion FE990B compositions Add the following Telit Cinterion FE990B40 compositions: 0x10b0: rmnet + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) + tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 7 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1bc7 ProdID=10b0 Rev=05.15 S: Manufacturer=Telit Cinterion S: Product=FE990 S: SerialNumber=28c2595e C: #Ifs= 9 Cfg#= 1 Atr=e0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 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#= 2 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#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=88(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8a(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=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms 0x10b1: MBIM + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) + tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 8 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1bc7 ProdID=10b1 Rev=05.15 S: Manufacturer=Telit Cinterion S: Product=FE990 S: SerialNumber=28c2595e C: #Ifs=10 Cfg#= 1 Atr=e0 MxPwr=500mA 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= 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=60 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= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=88(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8a(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 8 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms 0x10b2: RNDIS + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) + tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 9 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1bc7 ProdID=10b2 Rev=05.15 S: Manufacturer=Telit Cinterion S: Product=FE990 S: SerialNumber=28c2595e C: #Ifs=10 Cfg#= 1 Atr=e0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 1 Cls=ef(misc ) Sub=04 Prot=01 Driver=rndis_host E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host 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=60 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= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=88(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8a(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 8 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms 0x10b3: ECM + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) + tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 11 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1bc7 ProdID=10b3 Rev=05.15 S: Manufacturer=Telit Cinterion S: Product=FE990 S: SerialNumber=28c2595e C: #Ifs=10 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=60 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= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=88(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8a(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 8 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms Cc: stable@vger.kernel.org Signed-off-by: Fabio Porcedda Reviewed-by: Daniele Palmas [ johan: use USB_DEVICE_AND_INTERFACE_INFO() and sort by protocol ] Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 9a665fe3d967fe46edb4fd2497c7a5cc2dac2f55 Author: Johan Hovold Date: Thu Mar 6 11:44:41 2025 +0100 USB: serial: option: match on interface class for Telit FN990B The device id entries for Telit FN990B ended up matching only on the interface protocol. While this works, the protocol is qualified by the interface class (and subclass) which should have been included. Switch to matching using USB_DEVICE_AND_INTERFACE_INFO() while keeping the entries sorted also by protocol for consistency. Link: https://lore.kernel.org/20250227110655.3647028-2-fabio.porcedda@gmail.com/ Cc: Fabio Porcedda Cc: Daniele Palmas Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 5da15a9c11c1c47ef573e6805b60a7d8a1687a2a Author: Justin Iurman Date: Wed Mar 5 09:16:55 2025 +0100 net: ipv6: fix missing dst ref drop in ila lwtunnel Add missing skb_dst_drop() to drop reference to the old dst before adding the new dst to the skb. Fixes: 79ff2fc31e0f ("ila: Cache a route to translated address") Cc: Tom Herbert Signed-off-by: Justin Iurman Link: https://patch.msgid.link/20250305081655.19032-1-justin.iurman@uliege.be Signed-off-by: Paolo Abeni net/ipv6/ila/ila_lwt.c | 1 + 1 file changed, 1 insertion(+) commit 0e7633d7b95b67f1758aea19f8e85621c5f506a3 Author: Justin Iurman Date: Tue Mar 4 19:10:39 2025 +0100 net: ipv6: fix dst ref loop in ila lwtunnel This patch follows commit 92191dd10730 ("net: ipv6: fix dst ref loops in rpl, seg6 and ioam6 lwtunnels") and, on a second thought, the same patch is also needed for ila (even though the config that triggered the issue was pathological, but still, we don't want that to happen). Fixes: 79ff2fc31e0f ("ila: Cache a route to translated address") Cc: Tom Herbert Signed-off-by: Justin Iurman Link: https://patch.msgid.link/20250304181039.35951-1-justin.iurman@uliege.be Signed-off-by: Paolo Abeni net/ipv6/ila/ila_lwt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cf7ee25e70c6edfac4553d6b671e8b19db1d9573 Author: Matt Johnston Date: Tue Mar 4 13:59:51 2025 +0800 mctp i3c: handle NULL header address daddr can be NULL if there is no neighbour table entry present, in that case the tx packet should be dropped. saddr will usually be set by MCTP core, but check for NULL in case a packet is transmitted by a different protocol. Signed-off-by: Matt Johnston Fixes: c8755b29b58e ("mctp i3c: MCTP I3C driver") Link: https://patch.msgid.link/20250304-mctp-i3c-null-v1-1-4416bbd56540@codeconstruct.com.au Signed-off-by: Paolo Abeni drivers/net/mctp/mctp-i3c.c | 3 +++ 1 file changed, 3 insertions(+) commit b1536481c81fb604074da799e4f2d2038a1663f7 Author: Shrikanth Hegde Date: Thu Mar 6 10:59:54 2025 +0530 sched/rt: Update limit of sched_rt sysctl in documentation By default fair_server dl_server allocates 5% of the bandwidth to the root domain. Due to this writing any value less than 5% fails due to -EBUSY: $ cat /proc/sys/kernel/sched_rt_period_us 1000000 $ echo 49999 > /proc/sys/kernel/sched_rt_runtime_us -bash: echo: write error: Device or resource busy $ echo 50000 > /proc/sys/kernel/sched_rt_runtime_us $ Since the sched_rt_runtime_us allows -1 as the minimum, put this restriction in the documentation. One should check average of runtime/period in /sys/kernel/debug/sched/fair_server/cpuX/* for exact value. Signed-off-by: Shrikanth Hegde Signed-off-by: Ingo Molnar Reviewed-by: Juri Lelli Link: https://lore.kernel.org/r/20250306052954.452005-3-sshegde@linux.ibm.com Documentation/scheduler/sched-rt-group.rst | 3 +++ 1 file changed, 3 insertions(+) commit 14672f059d83f591afb2ee1fff56858efe055e5a Author: Shrikanth Hegde Date: Thu Mar 6 10:59:53 2025 +0530 sched/deadline: Use online cpus for validating runtime The ftrace selftest reported a failure because writing -1 to sched_rt_runtime_us returns -EBUSY. This happens when the possible CPUs are different from active CPUs. Active CPUs are part of one root domain, while remaining CPUs are part of def_root_domain. Since active cpumask is being used, this results in cpus=0 when a non active CPUs is used in the loop. Fix it by looping over the online CPUs instead for validating the bandwidth calculations. Signed-off-by: Shrikanth Hegde Signed-off-by: Ingo Molnar Reviewed-by: Juri Lelli Link: https://lore.kernel.org/r/20250306052954.452005-2-sshegde@linux.ibm.com kernel/sched/deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d385c8bceb14665e935419334aa3d3fac2f10456 Author: Michal Koutný Date: Wed Mar 5 15:58:49 2025 +0100 pid: Do not set pid_max in new pid namespaces It is already difficult for users to troubleshoot which of multiple pid limits restricts their workload. The per-(hierarchical-)NS pid_max would contribute to the confusion. Also, the implementation copies the limit upon creation from parent, this pattern showed cumbersome with some attributes in legacy cgroup controllers -- it's subject to race condition between parent's limit modification and children creation and once copied it must be changed in the descendant. Let's do what other places do (ucounts or cgroup limits) -- create new pid namespaces without any limit at all. The global limit (actually any ancestor's limit) is still effectively in place, we avoid the set/unshare race and bumps of global (ancestral) limit have the desired effect on pid namespace that do not care. Link: https://lore.kernel.org/r/20240408145819.8787-1-mkoutny@suse.com/ Link: https://lore.kernel.org/r/20250221170249.890014-1-mkoutny@suse.com/ Fixes: 7863dcc72d0f4 ("pid: allow pid_max to be set per pid namespace") Signed-off-by: Michal Koutný Link: https://lore.kernel.org/r/20250305145849.55491-1-mkoutny@suse.com Signed-off-by: Christian Brauner kernel/pid_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80da96d735094ea22985ced98bc57fe3a4422921 Author: Takashi Iwai Date: Tue Mar 4 14:41:57 2025 +0100 drm/bochs: Fix DPMS regression The recent rewrite with the use of regular atomic helpers broke the DPMS unblanking on X11. Fix it by moving the call of bochs_hw_blank(false) from CRTC mode_set_nofb() to atomic_enable(). Fixes: 2037174993c8 ("drm/bochs: Use regular atomic helpers") Link: https://bugzilla.suse.com/show_bug.cgi?id=1238209 Signed-off-by: Takashi Iwai Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20250304134203.20534-1-tiwai@suse.de drivers/gpu/drm/tiny/bochs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8fe9ed44dc29fba0786b7e956d2e87179e407582 Author: Hao Zhang Date: Thu Feb 27 11:41:29 2025 +0800 mm/page_alloc: fix uninitialized variable The variable "compact_result" is not initialized in function __alloc_pages_slowpath(). It causes should_compact_retry() to use an uninitialized value. Initialize variable "compact_result" with the value COMPACT_SKIPPED. BUG: KMSAN: uninit-value in __alloc_pages_slowpath+0xee8/0x16c0 mm/page_alloc.c:4416 __alloc_pages_slowpath+0xee8/0x16c0 mm/page_alloc.c:4416 __alloc_frozen_pages_noprof+0xa4c/0xe00 mm/page_alloc.c:4752 alloc_pages_mpol+0x4cd/0x890 mm/mempolicy.c:2270 alloc_frozen_pages_noprof mm/mempolicy.c:2341 [inline] alloc_pages_noprof mm/mempolicy.c:2361 [inline] folio_alloc_noprof+0x1dc/0x350 mm/mempolicy.c:2371 filemap_alloc_folio_noprof+0xa6/0x440 mm/filemap.c:1019 __filemap_get_folio+0xb9a/0x1840 mm/filemap.c:1970 grow_dev_folio fs/buffer.c:1039 [inline] grow_buffers fs/buffer.c:1105 [inline] __getblk_slow fs/buffer.c:1131 [inline] bdev_getblk+0x2c9/0xab0 fs/buffer.c:1431 getblk_unmovable include/linux/buffer_head.h:369 [inline] ext4_getblk+0x3b7/0xe50 fs/ext4/inode.c:864 ext4_bread_batch+0x9f/0x7d0 fs/ext4/inode.c:933 __ext4_find_entry+0x1ebb/0x36c0 fs/ext4/namei.c:1627 ext4_lookup_entry fs/ext4/namei.c:1729 [inline] ext4_lookup+0x189/0xb40 fs/ext4/namei.c:1797 __lookup_slow+0x538/0x710 fs/namei.c:1793 lookup_slow+0x6a/0xd0 fs/namei.c:1810 walk_component fs/namei.c:2114 [inline] link_path_walk+0xf29/0x1420 fs/namei.c:2479 path_openat+0x30f/0x6250 fs/namei.c:3985 do_filp_open+0x268/0x600 fs/namei.c:4016 do_sys_openat2+0x1bf/0x2f0 fs/open.c:1428 do_sys_open fs/open.c:1443 [inline] __do_sys_openat fs/open.c:1459 [inline] __se_sys_openat fs/open.c:1454 [inline] __x64_sys_openat+0x2a1/0x310 fs/open.c:1454 x64_sys_call+0x36f5/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:258 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Local variable compact_result created at: __alloc_pages_slowpath+0x66/0x16c0 mm/page_alloc.c:4218 __alloc_frozen_pages_noprof+0xa4c/0xe00 mm/page_alloc.c:4752 Link: https://lkml.kernel.org/r/tencent_ED1032321D6510B145CDBA8CBA0093178E09@qq.com Reported-by: syzbot+0cfd5e38e96a5596f2b6@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=0cfd5e38e96a5596f2b6 Signed-off-by: Hao Zhang Reviewed-by: Vlastimil Babka Cc: Michal Hocko Cc: Mel Gorman Cc: Signed-off-by: Andrew Morton mm/page_alloc.c | 1 + 1 file changed, 1 insertion(+) commit e842f9a1edf306bf36fe2a4d847a0b0d458770de Author: Haoxiang Li Date: Thu Feb 27 12:11:31 2025 +0800 rapidio: add check for rio_add_net() in rio_scan_alloc_net() The return value of rio_add_net() should be checked. If it fails, put_device() should be called to free the memory and give up the reference initialized in rio_add_net(). Link: https://lkml.kernel.org/r/20250227041131.3680761-1-haoxiang_li2024@163.com Fixes: e6b585ca6e81 ("rapidio: move net allocation into core code") Signed-off-by: Yang Yingliang Signed-off-by: Haoxiang Li Cc: Alexandre Bounine Cc: Matt Porter Cc: Dan Carpenter Cc: Signed-off-by: Andrew Morton drivers/rapidio/rio-scan.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b2ef51c74b0171fde7eb69b6152d3d2f743ef269 Author: Haoxiang Li Date: Thu Feb 27 15:34:09 2025 +0800 rapidio: fix an API misues when rio_add_net() fails rio_add_net() calls device_register() and fails when device_register() fails. Thus, put_device() should be used rather than kfree(). Add "mport->net = NULL;" to avoid a use after free issue. Link: https://lkml.kernel.org/r/20250227073409.3696854-1-haoxiang_li2024@163.com Fixes: e8de370188d0 ("rapidio: add mport char device driver") Signed-off-by: Haoxiang Li Reviewed-by: Dan Carpenter Cc: Alexandre Bounine Cc: Matt Porter Cc: Yang Yingliang Cc: Signed-off-by: Andrew Morton drivers/rapidio/devices/rio_mport_cdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 88f5a9a945bf25df1f90032baf95457370c2206e Author: Sumit Garg Date: Thu Feb 27 17:02:28 2025 +0530 MAINTAINERS: .mailmap: update Sumit Garg's email address Update Sumit Garg's email address to @kernel.org. Link: https://lkml.kernel.org/r/20250227113228.1809449-1-sumit.garg@linaro.org Signed-off-by: Sumit Garg Cc: Herbert Xu Cc: Jarkko Sakkinen Cc: Jens Wiklander Signed-off-by: Andrew Morton .mailmap | 1 + MAINTAINERS | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) commit eae116d1f0449ade3269ca47a67432622f5c6438 Author: Gabriel Krisman Bertazi Date: Tue Feb 25 22:22:58 2025 -0500 Revert "mm/page_alloc.c: don't show protection in zone's ->lowmem_reserve[] for empty zone" Commit 96a5c186efff ("mm/page_alloc.c: don't show protection in zone's ->lowmem_reserve[] for empty zone") removes the protection of lower zones from allocations targeting memory-less high zones. This had an unintended impact on the pattern of reclaims because it makes the high-zone-targeted allocation more likely to succeed in lower zones, which adds pressure to said zones. I.e, the following corresponding checks in zone_watermark_ok/zone_watermark_fast are less likely to trigger: if (free_pages <= min + z->lowmem_reserve[highest_zoneidx]) return false; As a result, we are observing an increase in reclaim and kswapd scans, due to the increased pressure. This was initially observed as increased latency in filesystem operations when benchmarking with fio on a machine with some memory-less zones, but it has since been associated with increased contention in locks related to memory reclaim. By reverting this patch, the original performance was recovered on that machine. The original commit was introduced as a clarification of the /proc/zoneinfo output, so it doesn't seem there are usecases depending on it, making the revert a simple solution. For reference, I collected vmstat with and without this patch on a freshly booted system running intensive randread io from an nvme for 5 minutes. I got: rpm-6.12.0-slfo.1.2 -> pgscan_kswapd 5629543865 Patched -> pgscan_kswapd 33580844 33M scans is similar to what we had in kernels predating this patch. These numbers is fairly representative of the workload on this machine, as measured in several runs. So we are talking about a 2-order of magnitude increase. Link: https://lkml.kernel.org/r/20250226032258.234099-1-krisman@suse.de Fixes: 96a5c186efff ("mm/page_alloc.c: don't show protection in zone's ->lowmem_reserve[] for empty zone") Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Vlastimil Babka Acked-by: Michal Hocko Acked-by: Mel Gorman Cc: Baoquan He Cc: Signed-off-by: Andrew Morton mm/page_alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 34b82f33cf3f03bc39e9a205a913d790e1520ade Author: Brian Geffon Date: Wed Feb 26 11:23:41 2025 -0500 mm: fix finish_fault() handling for large folios When handling faults for anon shmem finish_fault() will attempt to install ptes for the entire folio. Unfortunately if it encounters a single non-pte_none entry in that range it will bail, even if the pte that triggered the fault is still pte_none. When this situation happens the fault will be retried endlessly never making forward progress. This patch fixes this behavior and if it detects that a pte in the range is not pte_none it will fall back to setting a single pte. [bgeffon@google.com: tweak whitespace] Link: https://lkml.kernel.org/r/20250227133236.1296853-1-bgeffon@google.com Link: https://lkml.kernel.org/r/20250226162341.915535-1-bgeffon@google.com Fixes: 43e027e41423 ("mm: memory: extend finish_fault() to support large folio") Signed-off-by: Brian Geffon Suggested-by: Baolin Wang Reported-by: Marek Maslanka Cc: Hugh Dickins Cc: David Hildenbrand Cc: Hugh Dickens Cc: Kefeng Wang Cc: Matthew Wilcow (Oracle) Cc: Suren Baghdasaryan Cc: Zi Yan Cc: Signed-off-by: Andrew Morton mm/memory.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 3685024edd270f7c791f993157d65d3c928f3d6e Author: Ryan Roberts Date: Wed Feb 26 12:16:09 2025 +0000 mm: don't skip arch_sync_kernel_mappings() in error paths Fix callers that previously skipped calling arch_sync_kernel_mappings() if an error occurred during a pgtable update. The call is still required to sync any pgtable updates that may have occurred prior to hitting the error condition. These are theoretical bugs discovered during code review. Link: https://lkml.kernel.org/r/20250226121610.2401743-1-ryan.roberts@arm.com Fixes: 2ba3e6947aed ("mm/vmalloc: track which page-table levels were modified") Fixes: 0c95cba49255 ("mm: apply_to_pte_range warn and fail if a large pte is encountered") Signed-off-by: Ryan Roberts Reviewed-by: Anshuman Khandual Reviewed-by: Catalin Marinas Cc: Christop Hellwig Cc: "Uladzislau Rezki (Sony)" Cc: Signed-off-by: Andrew Morton mm/memory.c | 6 ++++-- mm/vmalloc.c | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit adae46ac1e38a288b14f0298e27412adcba83f8e Author: Ricardo Cañuelo Navarro Date: Wed Feb 26 13:26:27 2025 +0100 mm: shmem: remove unnecessary warning in shmem_writepage() Although the scenario where shmem_writepage() is called with info->flags & VM_LOCKED is unlikely to happen, it's still possible, as evidenced by syzbot [1]. However, the warning in this case isn't necessary because the situation is already handled correctly [2]. [2] https://lore.kernel.org/lkml/8afe1f7f-31a2-4fc0-1fbd-f9ba8a116fe3@google.com/ Link: https://lkml.kernel.org/r/20250226-20250221-warning-in-shmem_writepage-v1-1-5ad19420e17e@igalia.com Fixes: 9a976f0c847b ("shmem: skip page split if we're not reclaiming") Signed-off-by: Ricardo Cañuelo Navarro Reported-by: Pengfei Xu Closes: https://lore.kernel.org/lkml/ZZ9PShXjKJkVelNm@xpf.sh.intel.com/ [1] Suggested-by: Hugh Dickins Reviewed-by: Baolin Wang Cc: Florent Revest Cc: Christian Brauner Cc: David Hildenbrand Cc: Davidlohr Bueso Cc: Florent Revest Cc: Luis Chamberalin Signed-off-by: Andrew Morton mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 927e926d72d9155fde3264459fe9bfd7b5e40d28 Author: Suren Baghdasaryan Date: Wed Feb 26 10:55:09 2025 -0800 userfaultfd: fix PTE unmapping stack-allocated PTE copies Current implementation of move_pages_pte() copies source and destination PTEs in order to detect concurrent changes to PTEs involved in the move. However these copies are also used to unmap the PTEs, which will fail if CONFIG_HIGHPTE is enabled because the copies are allocated on the stack. Fix this by using the actual PTEs which were kmap()ed. Link: https://lkml.kernel.org/r/20250226185510.2732648-3-surenb@google.com Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI") Signed-off-by: Suren Baghdasaryan Reported-by: Peter Xu Reviewed-by: Peter Xu Cc: Andrea Arcangeli Cc: Barry Song <21cnbao@gmail.com> Cc: Barry Song Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jann Horn Cc: Kalesh Singh Cc: Liam R. Howlett Cc: Lokesh Gidra Cc: Lorenzo Stoakes Cc: Matthew Wilcow (Oracle) Cc: Signed-off-by: Andrew Morton mm/userfaultfd.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 37b338eed10581784e854d4262da05c8d960c748 Author: Suren Baghdasaryan Date: Wed Feb 26 10:55:08 2025 -0800 userfaultfd: do not block on locking a large folio with raised refcount Lokesh recently raised an issue about UFFDIO_MOVE getting into a deadlock state when it goes into split_folio() with raised folio refcount. split_folio() expects the reference count to be exactly mapcount + num_pages_in_folio + 1 (see can_split_folio()) and fails with EAGAIN otherwise. If multiple processes are trying to move the same large folio, they raise the refcount (all tasks succeed in that) then one of them succeeds in locking the folio, while others will block in folio_lock() while keeping the refcount raised. The winner of this race will proceed with calling split_folio() and will fail returning EAGAIN to the caller and unlocking the folio. The next competing process will get the folio locked and will go through the same flow. In the meantime the original winner will be retried and will block in folio_lock(), getting into the queue of waiting processes only to repeat the same path. All this results in a livelock. An easy fix would be to avoid waiting for the folio lock while holding folio refcount, similar to madvise_free_huge_pmd() where folio lock is acquired before raising the folio refcount. Since we lock and take a refcount of the folio while holding the PTE lock, changing the order of these operations should not break anything. Modify move_pages_pte() to try locking the folio first and if that fails and the folio is large then return EAGAIN without touching the folio refcount. If the folio is single-page then split_folio() is not called, so we don't have this issue. Lokesh has a reproducer [1] and I verified that this change fixes the issue. [1] https://github.com/lokeshgidra/uffd_move_ioctl_deadlock [akpm@linux-foundation.org: reflow comment to 80 cols, s/end/end up/] Link: https://lkml.kernel.org/r/20250226185510.2732648-2-surenb@google.com Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI") Signed-off-by: Suren Baghdasaryan Reported-by: Lokesh Gidra Reviewed-by: Peter Xu Acked-by: Liam R. Howlett Cc: Andrea Arcangeli Cc: Barry Song <21cnbao@gmail.com> Cc: Barry Song Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jann Horn Cc: Kalesh Singh Cc: Lorenzo Stoakes Cc: Matthew Wilcow (Oracle) Cc: Signed-off-by: Andrew Morton mm/userfaultfd.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit ea6de4f8f8f32e54662118a97c441a6ad7b24345 Author: Sun YangKai Date: Wed Feb 26 23:32:43 2025 +0800 mm: zswap: use ATOMIC_LONG_INIT to initialize zswap_stored_pages This is currently the only atomic_long_t variable initialized by ATOMIC_INIT macro found in the kernel by using `grep -r atomic_long_t | grep ATOMIC_INIT` This was introduced in 6e1fa555ec77, in which we modified the type of zswap_stored_pages to atomic_long_t, but didn't change the initialization. Link: https://lkml.kernel.org/r/20250226153253.19179-1-sunk67188@gmail.com Fixes: 6e1fa555ec77 ("mm: zswap: modify zswap_stored_pages to be atomic_long_t") Signed-off-by: Sun YangKai Acked-by: Yosry Ahmed Acked-by: David Hildenbrand Cc: Chengming Zhou Cc: Johannes Weiner Cc: Kanchana P Sridhar Cc: Nhat Pham Signed-off-by: Andrew Morton mm/zswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 058313515d5aab10d0a01dd634f92ed4a4e71d4c Author: Baolin Wang Date: Tue Feb 25 17:52:55 2025 +0800 mm: shmem: fix potential data corruption during shmem swapin Alex and Kairui reported some issues (system hang or data corruption) when swapping out or swapping in large shmem folios. This is especially easy to reproduce when the tmpfs is mount with the 'huge=within_size' parameter. Thanks to Kairui's reproducer, the issue can be easily replicated. The root cause of the problem is that swap readahead may asynchronously swap in order 0 folios into the swap cache, while the shmem mapping can still store large swap entries. Then an order 0 folio is inserted into the shmem mapping without splitting the large swap entry, which overwrites the original large swap entry, leading to data corruption. When getting a folio from the swap cache, we should split the large swap entry stored in the shmem mapping if the orders do not match, to fix this issue. Link: https://lkml.kernel.org/r/2fe47c557e74e9df5fe2437ccdc6c9115fa1bf70.1740476943.git.baolin.wang@linux.alibaba.com Fixes: 809bc86517cc ("mm: shmem: support large folio swap out") Signed-off-by: Baolin Wang Reported-by: Alex Xu (Hello71) Reported-by: Kairui Song Closes: https://lore.kernel.org/all/1738717785.im3r5g2vxc.none@localhost/ Tested-by: Kairui Song Cc: David Hildenbrand Cc: Lance Yang Cc: Matthew Wilcow Cc: Hugh Dickins Cc: Signed-off-by: Andrew Morton mm/shmem.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit c50f8e6053b0503375c2975bf47f182445aebb4c Author: Barry Song Date: Wed Feb 26 13:14:00 2025 +1300 mm: fix kernel BUG when userfaultfd_move encounters swapcache userfaultfd_move() checks whether the PTE entry is present or a swap entry. - If the PTE entry is present, move_present_pte() handles folio migration by setting: src_folio->index = linear_page_index(dst_vma, dst_addr); - If the PTE entry is a swap entry, move_swap_pte() simply copies the PTE to the new dst_addr. This approach is incorrect because, even if the PTE is a swap entry, it can still reference a folio that remains in the swap cache. This creates a race window between steps 2 and 4. 1. add_to_swap: The folio is added to the swapcache. 2. try_to_unmap: PTEs are converted to swap entries. 3. pageout: The folio is written back. 4. Swapcache is cleared. If userfaultfd_move() occurs in the window between steps 2 and 4, after the swap PTE has been moved to the destination, accessing the destination triggers do_swap_page(), which may locate the folio in the swapcache. However, since the folio's index has not been updated to match the destination VMA, do_swap_page() will detect a mismatch. This can result in two critical issues depending on the system configuration. If KSM is disabled, both small and large folios can trigger a BUG during the add_rmap operation due to: page_pgoff(folio, page) != linear_page_index(vma, address) [ 13.336953] page: refcount:6 mapcount:1 mapping:00000000f43db19c index:0xffffaf150 pfn:0x4667c [ 13.337520] head: order:2 mapcount:1 entire_mapcount:0 nr_pages_mapped:1 pincount:0 [ 13.337716] memcg:ffff00000405f000 [ 13.337849] anon flags: 0x3fffc0000020459(locked|uptodate|dirty|owner_priv_1|head|swapbacked|node=0|zone=0|lastcpupid=0xffff) [ 13.338630] raw: 03fffc0000020459 ffff80008507b538 ffff80008507b538 ffff000006260361 [ 13.338831] raw: 0000000ffffaf150 0000000000004000 0000000600000000 ffff00000405f000 [ 13.339031] head: 03fffc0000020459 ffff80008507b538 ffff80008507b538 ffff000006260361 [ 13.339204] head: 0000000ffffaf150 0000000000004000 0000000600000000 ffff00000405f000 [ 13.339375] head: 03fffc0000000202 fffffdffc0199f01 ffffffff00000000 0000000000000001 [ 13.339546] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000 [ 13.339736] page dumped because: VM_BUG_ON_PAGE(page_pgoff(folio, page) != linear_page_index(vma, address)) [ 13.340190] ------------[ cut here ]------------ [ 13.340316] kernel BUG at mm/rmap.c:1380! [ 13.340683] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP [ 13.340969] Modules linked in: [ 13.341257] CPU: 1 UID: 0 PID: 107 Comm: a.out Not tainted 6.14.0-rc3-gcf42737e247a-dirty #299 [ 13.341470] Hardware name: linux,dummy-virt (DT) [ 13.341671] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 13.341815] pc : __page_check_anon_rmap+0xa0/0xb0 [ 13.341920] lr : __page_check_anon_rmap+0xa0/0xb0 [ 13.342018] sp : ffff80008752bb20 [ 13.342093] x29: ffff80008752bb20 x28: fffffdffc0199f00 x27: 0000000000000001 [ 13.342404] x26: 0000000000000000 x25: 0000000000000001 x24: 0000000000000001 [ 13.342575] x23: 0000ffffaf0d0000 x22: 0000ffffaf0d0000 x21: fffffdffc0199f00 [ 13.342731] x20: fffffdffc0199f00 x19: ffff000006210700 x18: 00000000ffffffff [ 13.342881] x17: 6c203d2120296567 x16: 6170202c6f696c6f x15: 662866666f67705f [ 13.343033] x14: 6567617028454741 x13: 2929737365726464 x12: ffff800083728ab0 [ 13.343183] x11: ffff800082996bf8 x10: 0000000000000fd7 x9 : ffff80008011bc40 [ 13.343351] x8 : 0000000000017fe8 x7 : 00000000fffff000 x6 : ffff8000829eebf8 [ 13.343498] x5 : c0000000fffff000 x4 : 0000000000000000 x3 : 0000000000000000 [ 13.343645] x2 : 0000000000000000 x1 : ffff0000062db980 x0 : 000000000000005f [ 13.343876] Call trace: [ 13.344045] __page_check_anon_rmap+0xa0/0xb0 (P) [ 13.344234] folio_add_anon_rmap_ptes+0x22c/0x320 [ 13.344333] do_swap_page+0x1060/0x1400 [ 13.344417] __handle_mm_fault+0x61c/0xbc8 [ 13.344504] handle_mm_fault+0xd8/0x2e8 [ 13.344586] do_page_fault+0x20c/0x770 [ 13.344673] do_translation_fault+0xb4/0xf0 [ 13.344759] do_mem_abort+0x48/0xa0 [ 13.344842] el0_da+0x58/0x130 [ 13.344914] el0t_64_sync_handler+0xc4/0x138 [ 13.345002] el0t_64_sync+0x1ac/0x1b0 [ 13.345208] Code: aa1503e0 f000f801 910f6021 97ff5779 (d4210000) [ 13.345504] ---[ end trace 0000000000000000 ]--- [ 13.345715] note: a.out[107] exited with irqs disabled [ 13.345954] note: a.out[107] exited with preempt_count 2 If KSM is enabled, Peter Xu also discovered that do_swap_page() may trigger an unexpected CoW operation for small folios because ksm_might_need_to_copy() allocates a new folio when the folio index does not match linear_page_index(vma, addr). This patch also checks the swapcache when handling swap entries. If a match is found in the swapcache, it processes it similarly to a present PTE. However, there are some differences. For example, the folio is no longer exclusive because folio_try_share_anon_rmap_pte() is performed during unmapping. Furthermore, in the case of swapcache, the folio has already been unmapped, eliminating the risk of concurrent rmap walks and removing the need to acquire src_folio's anon_vma or lock. Note that for large folios, in the swapcache handling path, we directly return -EBUSY since split_folio() will return -EBUSY regardless if the folio is under writeback or unmapped. This is not an urgent issue, so a follow-up patch may address it separately. [v-songbaohua@oppo.com: minor cleanup according to Peter Xu] Link: https://lkml.kernel.org/r/20250226024411.47092-1-21cnbao@gmail.com Link: https://lkml.kernel.org/r/20250226001400.9129-1-21cnbao@gmail.com Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI") Signed-off-by: Barry Song Acked-by: Peter Xu Reviewed-by: Suren Baghdasaryan Cc: Andrea Arcangeli Cc: Al Viro Cc: Axel Rasmussen Cc: Brian Geffon Cc: Christian Brauner Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jann Horn Cc: Kalesh Singh Cc: Liam R. Howlett Cc: Lokesh Gidra Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Mike Rapoport (IBM) Cc: Nicolas Geoffray Cc: Ryan Roberts Cc: Shuah Khan Cc: ZhangPeng Cc: Tangquan Zheng Cc: Signed-off-by: Andrew Morton mm/userfaultfd.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 66 insertions(+), 8 deletions(-) commit 582ccf78f6090d88b1c7066b1e90b3d9ec952d08 Author: SeongJae Park Date: Tue Feb 25 14:23:33 2025 -0800 selftests/damon/damon_nr_regions: sort collected regiosn before checking with min/max boundaries damon_nr_regions.py starts DAMON, periodically collect number of regions in snapshots, and see if it is in the requested range. The check code assumes the numbers are sorted on the collection list, but there is no such guarantee. Hence this can result in false positive test success. Sort the list before doing the check. Link: https://lkml.kernel.org/r/20250225222333.505646-4-sj@kernel.org Fixes: 781497347d1b ("selftests/damon: implement test for min/max_nr_regions") Signed-off-by: SeongJae Park Cc: Shuah Khan Cc: Signed-off-by: Andrew Morton tools/testing/selftests/damon/damon_nr_regions.py | 1 + 1 file changed, 1 insertion(+) commit 695469c07a65547acb6e229b3fdf6aaa881817e3 Author: SeongJae Park Date: Tue Feb 25 14:23:32 2025 -0800 selftests/damon/damon_nr_regions: set ops update for merge results check to 100ms damon_nr_regions.py updates max_nr_regions to a number smaller than expected number of real regions and confirms DAMON respect the harsh limit. To give time for DAMON to make changes for the regions, 3 aggregation intervals (300 milliseconds) are given. The internal mechanism works with not only the max_nr_regions, but also sz_limit, though. It avoids merging region if that casn make region of size larger than sz_limit. In the test, sz_limit is set too small to achive the new max_nr_regions, unless it is updated for the new min_nr_regions. But the update is done only once per operations set update interval, which is one second by default. Hence, the test randomly incurs false positive failures. Fix it by setting the ops interval same to aggregation interval, to make sure sz_limit is updated by the time of the check. Link: https://lkml.kernel.org/r/20250225222333.505646-3-sj@kernel.org Fixes: 8bf890c81612 ("selftests/damon/damon_nr_regions: test online-tuned max_nr_regions") Signed-off-by: SeongJae Park Cc: Shuah Khan Cc: Signed-off-by: Andrew Morton tools/testing/selftests/damon/damon_nr_regions.py | 1 + 1 file changed, 1 insertion(+) commit 1c684d77dfbcf926e0dd28f6d260e8fdd8a58e85 Author: SeongJae Park Date: Tue Feb 25 14:23:31 2025 -0800 selftests/damon/damos_quota: make real expectation of quota exceeds Patch series "selftests/damon: three fixes for false results". Fix three DAMON selftest bugs that cause two and one false positive failures and successes. This patch (of 3): damos_quota.py assumes the quota will always exceeded. But whether quota will be exceeded or not depend on the monitoring results. Actually the monitored workload has chaning access pattern and hence sometimes the quota may not really be exceeded. As a result, false positive test failures happen. Expect how much time the quota will be exceeded by checking the monitoring results, and use it instead of the naive assumption. Link: https://lkml.kernel.org/r/20250225222333.505646-1-sj@kernel.org Link: https://lkml.kernel.org/r/20250225222333.505646-2-sj@kernel.org Fixes: 51f58c9da14b ("selftests/damon: add a test for DAMOS quota") Signed-off-by: SeongJae Park Cc: Shuah Khan Cc: Signed-off-by: Andrew Morton tools/testing/selftests/damon/damos_quota.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit c29564d8b46f64f5e6e6f1c9c02f7761b7b90963 Author: Su Hui Date: Fri Feb 21 15:16:25 2025 +0800 include/linux/log2.h: mark is_power_of_2() with __always_inline When building kernel with randconfig, there is an error: In function `kvm_is_cr4_bit_set',inlined from `kvm_update_cpuid_runtime' at arch/x86/kvm/cpuid.c:310:9: include/linux/compiler_types.h:542:38: error: call to `__compiletime_assert_380' declared with attribute error: BUILD_BUG_ON failed: !is_power_of_2(cr4_bit). '!is_power_of_2(X86_CR4_OSXSAVE)' is False, but gcc treats is_power_of_2() as non-inline function and a compilation error happens. Fix this by marking is_power_of_2() with __always_inline. Link: https://lkml.kernel.org/r/20250221071624.1356899-1-suhui@nfschina.com Signed-off-by: Su Hui Cc: Binbin Wu Cc: Paolo Bonzini Cc: Sean Christopherson Signed-off-by: Andrew Morton include/linux/log2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce6d9c1c2b5cc785016faa11b48b6cd317eb367e Author: Mike Snitzer Date: Mon Feb 24 21:20:02 2025 -0500 NFS: fix nfs_release_folio() to not deadlock via kcompactd writeback Add PF_KCOMPACTD flag and current_is_kcompactd() helper to check for it so nfs_release_folio() can skip calling nfs_wb_folio() from kcompactd. Otherwise NFS can deadlock waiting for kcompactd enduced writeback which recurses back to NFS (which triggers writeback to NFSD via NFS loopback mount on the same host, NFSD blocks waiting for XFS's call to __filemap_get_folio): 6070.550357] INFO: task kcompactd0:58 blocked for more than 4435 seconds. {--- [58] "kcompactd0" [<0>] folio_wait_bit+0xe8/0x200 [<0>] folio_wait_writeback+0x2b/0x80 [<0>] nfs_wb_folio+0x80/0x1b0 [nfs] [<0>] nfs_release_folio+0x68/0x130 [nfs] [<0>] split_huge_page_to_list_to_order+0x362/0x840 [<0>] migrate_pages_batch+0x43d/0xb90 [<0>] migrate_pages_sync+0x9a/0x240 [<0>] migrate_pages+0x93c/0x9f0 [<0>] compact_zone+0x8e2/0x1030 [<0>] compact_node+0xdb/0x120 [<0>] kcompactd+0x121/0x2e0 [<0>] kthread+0xcf/0x100 [<0>] ret_from_fork+0x31/0x40 [<0>] ret_from_fork_asm+0x1a/0x30 ---} [akpm@linux-foundation.org: fix build] Link: https://lkml.kernel.org/r/20250225022002.26141-1-snitzer@kernel.org Fixes: 96780ca55e3c ("NFS: fix up nfs_release_folio() to try to release the page") Signed-off-by: Mike Snitzer Cc: Anna Schumaker Cc: Trond Myklebust Cc: Signed-off-by: Andrew Morton fs/nfs/file.c | 3 ++- include/linux/compaction.h | 5 +++++ include/linux/sched.h | 2 +- mm/compaction.c | 3 +++ 4 files changed, 11 insertions(+), 2 deletions(-) commit 57d910cffaa0be981f558ff603e2d896b36b8241 Author: Kemeng Shi Date: Sun Feb 23 00:08:47 2025 +0800 mm, swap: avoid BUG_ON in relocate_cluster() If allocation is racy with swapoff, we may call free_cluster for cluster already in free list and trigger BUG_ON() as following: Allocation Swapoff cluster_alloc_swap_entry ... /* may get a free cluster with offset */ offset = xxx; if (offset) ci = lock_cluster(si, offset); ... del_from_avail_list(p, true); si->flags &= ~SWP_WRITEOK; alloc_swap_scan_cluster(si, ci, ...) ... /* failed to alloc entry from free entry */ if (!cluster_alloc_range(...)) break; ... /* add back a free cluster */ relocate_cluster(si, ci); if (!ci->count) free_cluster(si, ci); VM_BUG_ON(ci->flags == CLUSTER_FLAG_FREE); To prevent the BUG_ON(), call free_cluster() for free cluster to move the cluster to tail of list. Check cluster is not free before calling free_cluster() in relocate_cluster() to avoid BUG_ON(). Link: https://lkml.kernel.org/r/20250222160850.505274-4-shikemeng@huaweicloud.com Fixes: 3b644773eefd ("mm, swap: reduce contention on device lock") Signed-off-by: Kemeng Shi Reviewed-by: Kairui Song Signed-off-by: Andrew Morton mm/swapfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7a2e7ae5d13658ada38898e5a3a8a40a7910db06 Author: Kemeng Shi Date: Sun Feb 23 00:08:46 2025 +0800 mm: swap: use correct step in loop to wait all clusters in wait_for_allocation() Use correct step in loop to wait all clusters in wait_for_allocation(). If we miss some cluster in wait_for_allocation(), use after free may occur as follows: shmem_writepage swapoff folio_alloc_swap get_swap_pages scan_swap_map_slots cluster_alloc_swap_entry alloc_swap_scan_cluster cluster_alloc_range /* SWP_WRITEOK is valid */ if (!(si->flags & SWP_WRITEOK)) ... del_from_avail_list(p, true); ... /* miss the cluster in shmem_writepage */ wait_for_allocation() ... try_to_unuse() memset(si->swap_map + start, usage, nr_pages); swap_range_alloc(si, nr_pages); ci->count += nr_pages; /* return a valid entry */ ... exit_swap_address_space(p->type); ... ... add_to_swap_cache /* dereference swap_address_space(entry) which is NULL */ xas_lock_irq(&xas); Link: https://lkml.kernel.org/r/20250222160850.505274-3-shikemeng@huaweicloud.com Fixes: 9a0ddeb79880 ("mm, swap: hold a reference during scan and cleanup flag usage") Signed-off-by: Kemeng Shi Reviewed-by: Kairui Song Signed-off-by: Andrew Morton mm/swapfile.c | 1 - 1 file changed, 1 deletion(-) commit 51f271c1940fc9a5f77931ec603b457ea293bd56 Author: Kemeng Shi Date: Mon Feb 24 19:39:10 2025 +0800 mm: swap: add back full cluster when no entry is reclaimed If no swap cache is reclaimed, cluster taken off from full_clusters list will not be put in any list and we can't reclaime HAS_CACHE slots efficiently. Do relocate_cluster for such cluster to avoid inefficiency. Link: https://lkml.kernel.org/r/20250224113910.522439-1-shikemeng@huaweicloud.com Fixes: 3b644773eefd ("mm, swap: reduce contention on device lock") Signed-off-by: Kemeng Shi Reviewed-by: Kairui Song Signed-off-by: Andrew Morton mm/swapfile.c | 4 ++++ 1 file changed, 4 insertions(+) commit 47b16d0462a460000b8f05dfb1292377ac48f3ca Author: Lorenzo Stoakes Date: Sat Feb 22 16:19:52 2025 +0000 mm: abort vma_modify() on merge out of memory failure The remainder of vma_modify() relies upon the vmg state remaining pristine after a merge attempt. Usually this is the case, however in the one edge case scenario of a merge attempt failing not due to the specified range being unmergeable, but rather due to an out of memory error arising when attempting to commit the merge, this assumption becomes untrue. This results in vmg->start, end being modified, and thus the proceeding attempts to split the VMA will be done with invalid start/end values. Thankfully, it is likely practically impossible for us to hit this in reality, as it would require a maple tree node pre-allocation failure that would likely never happen due to it being 'too small to fail', i.e. the kernel would simply keep retrying reclaim until it succeeded. However, this scenario remains theoretically possible, and what we are doing here is wrong so we must correct it. The safest option is, when this scenario occurs, to simply give up the operation. If we cannot allocate memory to merge, then we cannot allocate memory to split either (perhaps moreso!). Any scenario where this would be happening would be under very extreme (likely fatal) memory pressure, so it's best we give up early. So there is no doubt it is appropriate to simply bail out in this scenario. However, in general we must if at all possible never assume VMG state is stable after a merge attempt, since merge operations update VMG fields. As a result, additionally also make this clear by storing start, end in local variables. The issue was reported originally by syzkaller, and by Brad Spengler (via an off-list discussion), and in both instances it manifested as a triggering of the assert: VM_WARN_ON_VMG(start >= end, vmg); In vma_merge_existing_range(). It seems at least one scenario in which this is occurring is one in which the merge being attempted is due to an madvise() across multiple VMAs which looks like this: start end |<------>| |----------|------| | vma | next | |----------|------| When madvise_walk_vmas() is invoked, we first find vma in the above (determining prev to be equal to vma as we are offset into vma), and then enter the loop. We determine the end of vma that forms part of the range we are madvise()'ing by setting 'tmp' to this value: /* Here vma->vm_start <= start < (end|vma->vm_end) */ tmp = vma->vm_end; We then invoke the madvise() operation via visit(), letting prev get updated to point to vma as part of the operation: /* Here vma->vm_start <= start < tmp <= (end|vma->vm_end). */ error = visit(vma, &prev, start, tmp, arg); Where the visit() function pointer in this instance is madvise_vma_behavior(). As observed in syzkaller reports, it is ultimately madvise_update_vma() that is invoked, calling vma_modify_flags_name() and vma_modify() in turn. Then, in vma_modify(), we attempt the merge: merged = vma_merge_existing_range(vmg); if (merged) return merged; We invoke this with vmg->start, end set to start, tmp as such: start tmp |<--->| |----------|------| | vma | next | |----------|------| We find ourselves in the merge right scenario, but the one in which we cannot remove the middle (we are offset into vma). Here we have a special case where vmg->start, end get set to perhaps unintuitive values - we intended to shrink the middle VMA and expand the next. This means vmg->start, end are set to... vma->vm_start, start. Now the commit_merge() fails, and vmg->start, end are left like this. This means we return to the rest of vma_modify() with vmg->start, end (here denoted as start', end') set as: start' end' |<-->| |----------|------| | vma | next | |----------|------| So we now erroneously try to split accordingly. This is where the unfortunate stuff begins. We start with: /* Split any preceding portion of the VMA. */ if (vma->vm_start < vmg->start) { ... } This doesn't trigger as we are no longer offset into vma at the start. But then we invoke: /* Split any trailing portion of the VMA. */ if (vma->vm_end > vmg->end) { ... } Which does get invoked. This leaves us with: start' end' |<-->| |----|-----|------| | vma| new | next | |----|-----|------| We then return ultimately to madvise_walk_vmas(). Here 'new' is unknown, and putting back the values known in this function we are faced with: start tmp end | | | |----|-----|------| | vma| new | next | |----|-----|------| prev Then: start = tmp; So: start end | | |----|-----|------| | vma| new | next | |----|-----|------| prev The following code does not cause anything to happen: if (prev && start < prev->vm_end) start = prev->vm_end; if (start >= end) break; And then we invoke: if (prev) vma = find_vma(mm, prev->vm_end); Which is where a problem occurs - we don't know about 'new' so we essentially look for the vma after prev, which is new, whereas we actually intended to discover next! So we end up with: start end | | |----|-----|------| |prev| vma | next | |----|-----|------| And we have successfully bypassed all of the checks madvise_walk_vmas() has to ensure early exit should we end up moving out of range. We loop around, and hit: /* Here vma->vm_start <= start < (end|vma->vm_end) */ tmp = vma->vm_end; Oh dear. Now we have: tmp start end | | |----|-----|------| |prev| vma | next | |----|-----|------| We then invoke: /* Here vma->vm_start <= start < tmp <= (end|vma->vm_end). */ error = visit(vma, &prev, start, tmp, arg); Where start == tmp. That is, a zero range. This is not good. We invoke visit() which is madvise_vma_behavior() which does not check the range (for good reason, it assumes all checks have been done before it was called), which in turn finally calls madvise_update_vma(). The madvise_update_vma() function calls vma_modify_flags_name() in turn, which ultimately invokes vma_modify() with... start == end. vma_modify() calls vma_merge_existing_range() and finally we hit: VM_WARN_ON_VMG(start >= end, vmg); Which triggers, as start == end. While it might be useful to add some CONFIG_DEBUG_VM asserts in these instances to catch this kind of error, since we have just eliminated any possibility of that happening, we will add such asserts separately as to reduce churn and aid backporting. Link: https://lkml.kernel.org/r/20250222161952.41957-1-lorenzo.stoakes@oracle.com Fixes: 2f1c6611b0a8 ("mm: introduce vma_merge_struct and abstract vma_merge(),vma_modify()") Signed-off-by: Lorenzo Stoakes Tested-by: Brad Spengler Reported-by: Brad Spengler Reported-by: syzbot+46423ed8fa1f1148c6e4@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-mm/6774c98f.050a0220.25abdd.0991.GAE@google.com/ Cc: Jann Horn Cc: Liam Howlett Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton mm/vma.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 67bab13307c83fb742c2556b06cdc39dbad27f07 Author: Ge Yang Date: Wed Feb 19 11:46:44 2025 +0800 mm/hugetlb: wait for hugetlb folios to be freed Since the introduction of commit c77c0a8ac4c52 ("mm/hugetlb: defer freeing of huge pages if in non-task context"), which supports deferring the freeing of hugetlb pages, the allocation of contiguous memory through cma_alloc() may fail probabilistically. In the CMA allocation process, if it is found that the CMA area is occupied by in-use hugetlb folios, these in-use hugetlb folios need to be migrated to another location. When there are no available hugetlb folios in the free hugetlb pool during the migration of in-use hugetlb folios, new folios are allocated from the buddy system. A temporary state is set on the newly allocated folio. Upon completion of the hugetlb folio migration, the temporary state is transferred from the new folios to the old folios. Normally, when the old folios with the temporary state are freed, it is directly released back to the buddy system. However, due to the deferred freeing of hugetlb pages, the PageBuddy() check fails, ultimately leading to the failure of cma_alloc(). Here is a simplified call trace illustrating the process: cma_alloc() ->__alloc_contig_migrate_range() // Migrate in-use hugetlb folios ->unmap_and_move_huge_page() ->folio_putback_hugetlb() // Free old folios ->test_pages_isolated() ->__test_page_isolated_in_pageblock() ->PageBuddy(page) // Check if the page is in buddy To resolve this issue, we have implemented a function named wait_for_freed_hugetlb_folios(). This function ensures that the hugetlb folios are properly released back to the buddy system after their migration is completed. By invoking wait_for_freed_hugetlb_folios() before calling PageBuddy(), we ensure that PageBuddy() will succeed. Link: https://lkml.kernel.org/r/1739936804-18199-1-git-send-email-yangge1116@126.com Fixes: c77c0a8ac4c5 ("mm/hugetlb: defer freeing of huge pages if in non-task context") Signed-off-by: Ge Yang Reviewed-by: Muchun Song Acked-by: David Hildenbrand Cc: Baolin Wang Cc: Barry Song <21cnbao@gmail.com> Cc: Oscar Salvador Cc: Signed-off-by: Andrew Morton include/linux/hugetlb.h | 5 +++++ mm/hugetlb.c | 8 ++++++++ mm/page_isolation.c | 10 ++++++++++ 3 files changed, 23 insertions(+) commit c3e998398de48a7528842f05858a3a6bb21002e6 Author: gao xu Date: Wed Feb 19 01:56:28 2025 +0000 mm: fix possible NULL pointer dereference in __swap_duplicate Add a NULL check on the return value of swp_swap_info in __swap_duplicate to prevent crashes caused by NULL pointer dereference. The reason why swp_swap_info() returns NULL is unclear; it may be due to CPU cache issues or DDR bit flips. The probability of this issue is very small - it has been observed to occur approximately 1 in 500,000 times per week. The stack info we encountered is as follows: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000058 [RB/E]rb_sreason_str_set: sreason_str set null_pointer Mem abort info: ESR = 0x0000000096000005 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x05: level 1 translation fault Data abort info: ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 user pgtable: 4k pages, 39-bit VAs, pgdp=00000008a80e5000 [0000000000000058] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP Skip md ftrace buffer dump for: 0x1609e0 ... pc : swap_duplicate+0x44/0x164 lr : copy_page_range+0x508/0x1e78 sp : ffffffc0f2a699e0 x29: ffffffc0f2a699e0 x28: ffffff8a5b28d388 x27: ffffff8b06603388 x26: ffffffdf7291fe70 x25: 0000000000000006 x24: 0000000000100073 x23: 00000000002d2d2f x22: 0000000000000008 x21: 0000000000000000 x20: 00000000002d2d2f x19: 18000000002d2d2f x18: ffffffdf726faec0 x17: 0000000000000000 x16: 0010000000000001 x15: 0040000000000001 x14: 0400000000000001 x13: ff7ffffffffffb7f x12: ffeffffffffffbff x11: ffffff8a5c7e1898 x10: 0000000000000018 x9 : 0000000000000006 x8 : 1800000000000000 x7 : 0000000000000000 x6 : ffffff8057c01f10 x5 : 000000000000a318 x4 : 0000000000000000 x3 : 0000000000000000 x2 : 0000006daf200000 x1 : 0000000000000001 x0 : 18000000002d2d2f Call trace: swap_duplicate+0x44/0x164 copy_page_range+0x508/0x1e78 copy_process+0x1278/0x21cc kernel_clone+0x90/0x438 __arm64_sys_clone+0x5c/0x8c invoke_syscall+0x58/0x110 do_el0_svc+0x8c/0xe0 el0_svc+0x38/0x9c el0t_64_sync_handler+0x44/0xec el0t_64_sync+0x1a8/0x1ac Code: 9139c35a 71006f3f 54000568 f8797b55 (f9402ea8) ---[ end trace 0000000000000000 ]--- Kernel panic - not syncing: Oops: Fatal exception SMP: stopping secondary CPUs The patch seems to only provide a workaround, but there are no more effective software solutions to handle the bit flips problem. This path will change the issue from a system crash to a process exception, thereby reducing the impact on the entire machine. akpm: this is probably a kernel bug, but this patch keeps the system running and doesn't reduce that bug's debuggability. Link: https://lkml.kernel.org/r/e223b0e6ba2f4924984b1917cc717bd5@honor.com Signed-off-by: gao xu Reviewed-by: Barry Song Cc: Suren Baghdasaryan Cc: Yosry Ahmed Signed-off-by: Andrew Morton mm/swapfile.c | 4 ++++ 1 file changed, 4 insertions(+) commit 19fac3c93991502a22c5132824c40b6a2e64b136 Author: Sebastian Andrzej Siewior Date: Tue Feb 18 10:14:11 2025 +0100 dma: kmsan: export kmsan_handle_dma() for modules kmsan_handle_dma() is used by virtio_ring() which can be built as a module. kmsan_handle_dma() needs to be exported otherwise building the virtio_ring fails. Export kmsan_handle_dma for modules. Link: https://lkml.kernel.org/r/20250218091411.MMS3wBN9@linutronix.de Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202502150634.qjxwSeJR-lkp@intel.com/ Fixes: 7ade4f10779c ("dma: kmsan: unpoison DMA mappings") Signed-off-by: Sebastian Andrzej Siewior Cc: Alexander Potapenko Cc: Dmitriy Vyukov Cc: Macro Elver Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc: Signed-off-by: Andrew Morton mm/kmsan/hooks.c | 1 + 1 file changed, 1 insertion(+) commit 04ec365e3fdf136ba5f9053b02fb6c3368a22e83 Author: Ujwal Kundur Date: Sat Feb 15 16:21:07 2025 +0530 Documentation: fix doc link to fault-injection.rst Fix incorrect reference to fault-injection docs Link: https://lkml.kernel.org/r/20250215105106.734-1-ujwal.kundur@gmail.com Signed-off-by: Ujwal Kundur Signed-off-by: Andrew Morton lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af288a426c3e3552b62595c6138ec6371a17dbba Author: Ma Wupeng Date: Mon Feb 17 09:43:29 2025 +0800 hwpoison, memory_hotplug: lock folio before unmap hwpoisoned folio Commit b15c87263a69 ("hwpoison, memory_hotplug: allow hwpoisoned pages to be offlined) add page poison checks in do_migrate_range in order to make offline hwpoisoned page possible by introducing isolate_lru_page and try_to_unmap for hwpoisoned page. However folio lock must be held before calling try_to_unmap. Add it to fix this problem. Warning will be produced if folio is not locked during unmap: ------------[ cut here ]------------ kernel BUG at ./include/linux/swapops.h:400! Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP Modules linked in: CPU: 4 UID: 0 PID: 411 Comm: bash Tainted: G W 6.13.0-rc1-00016-g3c434c7ee82a-dirty #41 Tainted: [W]=WARN Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015 pstate: 40400005 (nZcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : try_to_unmap_one+0xb08/0xd3c lr : try_to_unmap_one+0x3dc/0xd3c Call trace: try_to_unmap_one+0xb08/0xd3c (P) try_to_unmap_one+0x3dc/0xd3c (L) rmap_walk_anon+0xdc/0x1f8 rmap_walk+0x3c/0x58 try_to_unmap+0x88/0x90 unmap_poisoned_folio+0x30/0xa8 do_migrate_range+0x4a0/0x568 offline_pages+0x5a4/0x670 memory_block_action+0x17c/0x374 memory_subsys_offline+0x3c/0x78 device_offline+0xa4/0xd0 state_store+0x8c/0xf0 dev_attr_store+0x18/0x2c sysfs_kf_write+0x44/0x54 kernfs_fop_write_iter+0x118/0x1a8 vfs_write+0x3a8/0x4bc ksys_write+0x6c/0xf8 __arm64_sys_write+0x1c/0x28 invoke_syscall+0x44/0x100 el0_svc_common.constprop.0+0x40/0xe0 do_el0_svc+0x1c/0x28 el0_svc+0x30/0xd0 el0t_64_sync_handler+0xc8/0xcc el0t_64_sync+0x198/0x19c Code: f9407be0 b5fff320 d4210000 17ffff97 (d4210000) ---[ end trace 0000000000000000 ]--- Link: https://lkml.kernel.org/r/20250217014329.3610326-4-mawupeng1@huawei.com Fixes: b15c87263a69 ("hwpoison, memory_hotplug: allow hwpoisoned pages to be offlined") Signed-off-by: Ma Wupeng Acked-by: David Hildenbrand Acked-by: Miaohe Lin Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Signed-off-by: Andrew Morton mm/memory_hotplug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 773b9a6aa6d38894b95088e3ed6f8a701d9f50fd Author: Ma Wupeng Date: Mon Feb 17 09:43:28 2025 +0800 mm: memory-hotplug: check folio ref count first in do_migrate_range If a folio has an increased reference count, folio_try_get() will acquire it, perform necessary operations, and then release it. In the case of a poisoned folio without an elevated reference count (which is unlikely for memory-failure), folio_try_get() will simply bypass it. Therefore, relocate the folio_try_get() function, responsible for checking and acquiring this reference count at first. Link: https://lkml.kernel.org/r/20250217014329.3610326-3-mawupeng1@huawei.com Signed-off-by: Ma Wupeng Acked-by: David Hildenbrand Acked-by: Miaohe Lin Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Signed-off-by: Andrew Morton mm/memory_hotplug.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit b81679b1633aa43c0d973adfa816d78c1ed0d032 Author: Ma Wupeng Date: Mon Feb 17 09:43:27 2025 +0800 mm: memory-failure: update ttu flag inside unmap_poisoned_folio Patch series "mm: memory_failure: unmap poisoned folio during migrate properly", v3. Fix two bugs during folio migration if the folio is poisoned. This patch (of 3): Commit 6da6b1d4a7df ("mm/hwpoison: convert TTU_IGNORE_HWPOISON to TTU_HWPOISON") introduce TTU_HWPOISON to replace TTU_IGNORE_HWPOISON in order to stop send SIGBUS signal when accessing an error page after a memory error on a clean folio. However during page migration, anon folio must be set with TTU_HWPOISON during unmap_*(). For pagecache we need some policy just like the one in hwpoison_user_mappings to set this flag. So move this policy from hwpoison_user_mappings to unmap_poisoned_folio to handle this warning properly. Warning will be produced during unamp poison folio with the following log: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 365 at mm/rmap.c:1847 try_to_unmap_one+0x8fc/0xd3c Modules linked in: CPU: 1 UID: 0 PID: 365 Comm: bash Tainted: G W 6.13.0-rc1-00018-gacdb4bbda7ab #42 Tainted: [W]=WARN Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015 pstate: 20400005 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : try_to_unmap_one+0x8fc/0xd3c lr : try_to_unmap_one+0x3dc/0xd3c Call trace: try_to_unmap_one+0x8fc/0xd3c (P) try_to_unmap_one+0x3dc/0xd3c (L) rmap_walk_anon+0xdc/0x1f8 rmap_walk+0x3c/0x58 try_to_unmap+0x88/0x90 unmap_poisoned_folio+0x30/0xa8 do_migrate_range+0x4a0/0x568 offline_pages+0x5a4/0x670 memory_block_action+0x17c/0x374 memory_subsys_offline+0x3c/0x78 device_offline+0xa4/0xd0 state_store+0x8c/0xf0 dev_attr_store+0x18/0x2c sysfs_kf_write+0x44/0x54 kernfs_fop_write_iter+0x118/0x1a8 vfs_write+0x3a8/0x4bc ksys_write+0x6c/0xf8 __arm64_sys_write+0x1c/0x28 invoke_syscall+0x44/0x100 el0_svc_common.constprop.0+0x40/0xe0 do_el0_svc+0x1c/0x28 el0_svc+0x30/0xd0 el0t_64_sync_handler+0xc8/0xcc el0t_64_sync+0x198/0x19c ---[ end trace 0000000000000000 ]--- [mawupeng1@huawei.com: unmap_poisoned_folio(): remove shadowed local `mapping', per Miaohe] Link: https://lkml.kernel.org/r/20250219060653.3849083-1-mawupeng1@huawei.com Link: https://lkml.kernel.org/r/20250217014329.3610326-1-mawupeng1@huawei.com Link: https://lkml.kernel.org/r/20250217014329.3610326-2-mawupeng1@huawei.com Fixes: 6da6b1d4a7df ("mm/hwpoison: convert TTU_IGNORE_HWPOISON to TTU_HWPOISON") Signed-off-by: Ma Wupeng Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Acked-by: Miaohe Lin Cc: Ma Wupeng Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Signed-off-by: Andrew Morton mm/internal.h | 5 +++-- mm/memory-failure.c | 63 ++++++++++++++++++++++++++--------------------------- mm/memory_hotplug.c | 3 ++- 3 files changed, 36 insertions(+), 35 deletions(-) commit a564ccfe300fa6a065beda06ab7f3c140d6b4d63 Author: Qi Zheng Date: Mon Feb 17 10:49:24 2025 +0800 arm: pgtable: fix NULL pointer dereference issue When update_mmu_cache_range() is called by update_mmu_cache(), the vmf parameter is NULL, which will cause a NULL pointer dereference issue in adjust_pte(): Unable to handle kernel NULL pointer dereference at virtual address 00000030 when read Hardware name: Atmel AT91SAM9 PC is at update_mmu_cache_range+0x1e0/0x278 LR is at pte_offset_map_rw_nolock+0x18/0x2c Call trace: update_mmu_cache_range from remove_migration_pte+0x29c/0x2ec remove_migration_pte from rmap_walk_file+0xcc/0x130 rmap_walk_file from remove_migration_ptes+0x90/0xa4 remove_migration_ptes from migrate_pages_batch+0x6d4/0x858 migrate_pages_batch from migrate_pages+0x188/0x488 migrate_pages from compact_zone+0x56c/0x954 compact_zone from compact_node+0x90/0xf0 compact_node from kcompactd+0x1d4/0x204 kcompactd from kthread+0x120/0x12c kthread from ret_from_fork+0x14/0x38 Exception stack(0xc0d8bfb0 to 0xc0d8bff8) To fix it, do not rely on whether 'ptl' is equal to decide whether to hold the pte lock, but decide it by whether CONFIG_SPLIT_PTE_PTLOCKS is enabled. In addition, if two vmas map to the same PTE page, there is no need to hold the pte lock again, otherwise a deadlock will occur. Just add the need_lock parameter to let adjust_pte() know this information. Link: https://lkml.kernel.org/r/20250217024924.57996-1-zhengqi.arch@bytedance.com Fixes: fc9c45b71f43 ("arm: adjust_pte() use pte_offset_map_rw_nolock()") Signed-off-by: Qi Zheng Reported-by: Ezra Buehler Closes: https://lore.kernel.org/lkml/CAM1KZSmZ2T_riHvay+7cKEFxoPgeVpHkVFTzVVEQ1BO0cLkHEQ@mail.gmail.com/ Acked-by: David Hildenbrand Tested-by: Ezra Buehler Cc: Hugh Dickins Cc: Muchun Song Cc: Qi Zheng Cc: Russel King Cc: Ryan Roberts Cc: Signed-off-by: Andrew Morton arch/arm/mm/fault-armv.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) commit 7277dd0a0ba4f8259f7abe37c4b7280fbfc2a182 Author: Haoxiang Li Date: Tue Feb 18 00:00:17 2025 +0800 m68k: sun3: add check for __pgd_alloc() Add check for the return value of __pgd_alloc() in pgd_alloc() to prevent null pointer dereference. Link: https://lkml.kernel.org/r/20250217160017.2375536-1-haoxiang_li2024@163.com Fixes: a9b3c355c2e6 ("asm-generic: pgalloc: provide generic __pgd_{alloc,free}") Signed-off-by: Haoxiang Li Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Cc: Dave Hansen Cc: Kevin Brodsky Cc: Qi Zheng Cc: Sam Creasey Cc: Signed-off-by: Andrew Morton arch/m68k/include/asm/sun3_pgalloc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 349db086a66051bc6114b64b4446787c20ac3f00 Author: SeongJae Park Date: Mon Feb 17 10:23:04 2025 -0800 selftests/damon/damos_quota_goal: handle minimum quota that cannot be further reduced damos_quota_goal.py selftest see if DAMOS quota goals tuning feature increases or reduces the effective size quota for given score as expected. The tuning feature sets the minimum quota size as one byte, so if the effective size quota is already one, we cannot expect it further be reduced. However the test is not aware of the edge case, and fails since it shown no expected change of the effective quota. Handle the case by updating the failure logic for no change to see if it was the case, and simply skips to next test input. Link: https://lkml.kernel.org/r/20250217182304.45215-1-sj@kernel.org Fixes: f1c07c0a1662 ("selftests/damon: add a test for DAMOS quota goal") Signed-off-by: SeongJae Park Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202502171423.b28a918d-lkp@intel.com Cc: Shuah Khan Cc: [6.10.x] Signed-off-by: Andrew Morton tools/testing/selftests/damon/damos_quota_goal.py | 3 +++ 1 file changed, 3 insertions(+) commit 0a7565ee6ec31eb16c0476adbfc1af3f2271cb6b Author: John Hubbard Date: Thu Feb 13 19:38:50 2025 -0800 Revert "selftests/mm: remove local __NR_* definitions" This reverts commit a5c6bc590094a1a73cf6fa3f505e1945d2bf2461. The general approach described in commit e076eaca5906 ("selftests: break the dependency upon local header files") was taken one step too far here: it should not have been extended to include the syscall numbers. This is because doing so would require per-arch support in tools/include/uapi, and no such support exists. This revert fixes two separate reports of test failures, from Dave Hansen[1], and Li Wang[2]. An excerpt of Dave's report: Before this commit (a5c6bc590094a1a73cf6fa3f505e1945d2bf2461) things are fine. But after, I get: running PKEY tests for unsupported CPU/OS An excerpt of Li's report: I just found that mlock2_() return a wrong value in mlock2-test [1] https://lore.kernel.org/dc585017-6740-4cab-a536-b12b37a7582d@intel.com [2] https://lore.kernel.org/CAEemH2eW=UMu9+turT2jRie7+6ewUazXmA6kL+VBo3cGDGU6RA@mail.gmail.com Link: https://lkml.kernel.org/r/20250214033850.235171-1-jhubbard@nvidia.com Fixes: a5c6bc590094 ("selftests/mm: remove local __NR_* definitions") Signed-off-by: John Hubbard Cc: Dave Hansen Cc: Li Wang Cc: David Hildenbrand Cc: Jeff Xu Cc: Andrei Vagin Cc: Axel Rasmussen Cc: Christian Brauner Cc: Kees Cook Cc: Kent Overstreet Cc: Liam R. Howlett Cc: Muhammad Usama Anjum Cc: Peter Xu Cc: Rich Felker Cc: Shuah Khan Cc: Signed-off-by: Andrew Morton tools/testing/selftests/mm/hugepage-mremap.c | 2 +- tools/testing/selftests/mm/ksm_functional_tests.c | 8 +++++++- tools/testing/selftests/mm/memfd_secret.c | 14 +++++++++++++- tools/testing/selftests/mm/mkdirty.c | 8 +++++++- tools/testing/selftests/mm/mlock2.h | 1 - tools/testing/selftests/mm/protection_keys.c | 2 +- tools/testing/selftests/mm/uffd-common.c | 4 ++++ tools/testing/selftests/mm/uffd-stress.c | 15 ++++++++++++++- tools/testing/selftests/mm/uffd-unit-tests.c | 14 +++++++++++++- 9 files changed, 60 insertions(+), 8 deletions(-) commit ccc2f5a436fbb0ae1fb598932a9b8e48423c1959 Author: Lorenzo Bianconi Date: Tue Mar 4 09:50:23 2025 +0100 net: dsa: mt7530: Fix traffic flooding for MMIO devices On MMIO devices (e.g. MT7988 or EN7581) unicast traffic received on lanX port is flooded on all other user ports if the DSA switch is configured without VLAN support since PORT_MATRIX in PCR regs contains all user ports. Similar to MDIO devices (e.g. MT7530 and MT7531) fix the issue defining default VLAN-ID 0 for MT7530 MMIO devices. Fixes: 110c18bfed414 ("net: dsa: mt7530: introduce driver for MT7988 built-in switch") Signed-off-by: Lorenzo Bianconi Reviewed-by: Chester A. Unal Link: https://patch.msgid.link/20250304-mt7988-flooding-fix-v1-1-905523ae83e9@kernel.org Signed-off-by: Jakub Kicinski drivers/net/dsa/mt7530.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 6f5c36f56d475732981dcf624e0ac0cc7c8984c8 Author: Alban Kurti Date: Thu Feb 6 21:07:53 2025 +0000 rust: error: add missing newline to pr_warn! calls Added missing newline at the end of pr_warn! usage so the log is not missed. Fixes: 6551a7fe0acb ("rust: error: Add Error::from_errno{_unchecked}()") Reported-by: Miguel Ojeda Link: https://github.com/Rust-for-Linux/linux/issues/1139 Signed-off-by: Alban Kurti Link: https://lore.kernel.org/r/20250206-printing_fix-v3-2-a85273b501ae@invicto.ai [ Replaced Closes with Link since it fixes part of the issue. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2e413f00ebec10a8725b1b75b1b523c561bd403 Author: Alban Kurti Date: Thu Feb 6 21:07:52 2025 +0000 rust: docs: add missing newline to printing macro examples Fix adding a newline at the end of the usage of pr_info! in the documentation Fixes: e3c3d34507c7 ("docs: rust: Add description of Rust documentation test as KUnit ones") Reported-by: Miguel Ojeda Link: https://github.com/Rust-for-Linux/linux/issues/1139 Signed-off-by: Alban Kurti Reviewed-by: David Gow Link: https://lore.kernel.org/r/20250206-printing_fix-v3-1-a85273b501ae@invicto.ai [ Replaced Closes with Link since it fixes part of the issue. - Miguel ] Signed-off-by: Miguel Ojeda Documentation/rust/testing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff64846bee0e7e3e7bc9363ebad3bab42dd27e24 Author: Tamir Duberstein Date: Thu Feb 13 06:34:18 2025 -0500 rust: alloc: satisfy POSIX alignment requirement ISO C's `aligned_alloc` is partially implementation-defined; on some systems it inherits stricter requirements from POSIX's `posix_memalign`. This causes the call added in commit dd09538fb409 ("rust: alloc: implement `Cmalloc` in module allocator_test") to fail on macOS because it doesn't meet the requirements of `posix_memalign`. Adjust the call to meet the POSIX requirement and add a comment. This fixes failures in `make rusttest` on macOS. Acked-by: Danilo Krummrich Cc: stable@vger.kernel.org Fixes: dd09538fb409 ("rust: alloc: implement `Cmalloc` in module allocator_test") Signed-off-by: Tamir Duberstein Reviewed-by: Gary Guo Link: https://lore.kernel.org/r/20250213-aligned-alloc-v7-1-d2a2d0be164b@gmail.com [ Added Cc: stable. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/alloc/allocator_test.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit df27cef153603b18a7d094b53cc3d5264ff32797 Author: Benno Lossin Date: Wed Mar 5 13:29:01 2025 +0000 rust: init: fix `Zeroable` implementation for `Option>` and `Option>` According to [1], `NonNull` and `#[repr(transparent)]` wrapper types such as our custom `KBox` have the null pointer optimization only if `T: Sized`. Thus remove the `Zeroable` implementation for the unsized case. Link: https://doc.rust-lang.org/stable/std/option/index.html#representation [1] Reported-by: Alice Ryhl Closes: https://lore.kernel.org/rust-for-linux/CAH5fLghL+qzrD8KiCF1V3vf2YcC6aWySzkmaE2Zzrnh1gKj-hw@mail.gmail.com/ Cc: stable@vger.kernel.org # v6.12+ (a custom patch will be needed for 6.6.y) Fixes: 38cde0bd7b67 ("rust: init: add `Zeroable` trait and `init::zeroed` function") Signed-off-by: Benno Lossin Reviewed-by: Alice Ryhl Reviewed-by: Andreas Hindborg Link: https://lore.kernel.org/r/20250305132836.2145476-1-benno.lossin@proton.me [ Added Closes tag and moved up the Reported-by one. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/init.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 374908a15af4cd60862ebc51a6e012ace2212c76 Author: Miguel Ojeda Date: Mon Mar 3 18:10:30 2025 +0100 rust: remove leftover mentions of the `alloc` crate In commit 392e34b6bc22 ("kbuild: rust: remove the `alloc` crate and `GlobalAlloc`") we stopped using the upstream `alloc` crate. Thus remove a few leftover mentions treewide. Cc: stable@vger.kernel.org # Also to 6.12.y after the `alloc` backport lands Fixes: 392e34b6bc22 ("kbuild: rust: remove the `alloc` crate and `GlobalAlloc`") Reviewed-by: Danilo Krummrich Reviewed-by: Andreas Hindborg Link: https://lore.kernel.org/r/20250303171030.1081134-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda Documentation/rust/quick-start.rst | 2 +- rust/kernel/lib.rs | 2 +- scripts/rustdoc_test_gen.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit df08c94baafb001de6cf44bb7098bb557f36c335 Author: Nicklas Bo Jensen Date: Thu Feb 27 13:32:34 2025 +0000 netfilter: nf_conncount: garbage collection is not skipped when jiffies wrap around nf_conncount is supposed to skip garbage collection if it has already run garbage collection in the same jiffy. Unfortunately, this is broken when jiffies wrap around which this patch fixes. The problem is that last_gc in the nf_conncount_list struct is an u32, but jiffies is an unsigned long which is 8 bytes on my systems. When those two are compared it only works until last_gc wraps around. See bug report: https://bugzilla.netfilter.org/show_bug.cgi?id=1778 for more details. Fixes: d265929930e2 ("netfilter: nf_conncount: reduce unnecessary GC") Signed-off-by: Nicklas Bo Jensen Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conncount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bcb0fda3c2da9fe4721d3e73d80e778c038e7d27 Author: Jens Axboe Date: Wed Mar 5 14:03:34 2025 -0700 io_uring/rw: ensure reissue path is correctly handled for IOPOLL The IOPOLL path posts CQEs when the io_kiocb is marked as completed, so it cannot rely on the usual retry that non-IOPOLL requests do for read/write requests. If -EAGAIN is received and the request should be retried, go through the normal completion path and let the normal flush logic catch it and reissue it, like what is done for !IOPOLL reads or writes. Fixes: d803d123948f ("io_uring/rw: handle -EAGAIN retry at IO completion time") Reported-by: John Garry Link: https://lore.kernel.org/io-uring/2b43ccfa-644d-4a09-8f8f-39ad71810f41@oracle.com/ Signed-off-by: Jens Axboe io_uring/rw.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 333b8906336174478efbbfc1e24a89e3397ffe65 Author: Thomas Hellström Date: Tue Mar 4 18:33:42 2025 +0100 drm/xe/userptr: Unmap userptrs in the mmu notifier If userptr pages are freed after a call to the xe mmu notifier, the device will not be blocked out from theoretically accessing these pages unless they are also unmapped from the iommu, and this violates some aspects of the iommu-imposed security. Ensure that userptrs are unmapped in the mmu notifier to mitigate this. A naive attempt would try to free the sg table, but the sg table itself may be accessed by a concurrent bind operation, so settle for only unmapping. v3: - Update lockdep asserts. - Fix a typo (Matthew Auld) Fixes: 81e058a3e7fd ("drm/xe: Introduce helper to populate userptr") Cc: Oak Zeng Cc: Matthew Auld Cc: # v6.10+ Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Acked-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20250304173342.22009-4-thomas.hellstrom@linux.intel.com (cherry picked from commit ba767b9d01a2c552d76cf6f46b125d50ec4147a6) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_hmm.c | 51 +++++++++++++++++++++++++++++++++------- drivers/gpu/drm/xe/xe_hmm.h | 2 ++ drivers/gpu/drm/xe/xe_vm.c | 4 ++++ drivers/gpu/drm/xe/xe_vm_types.h | 4 ++++ 4 files changed, 52 insertions(+), 9 deletions(-) commit 0a98219bcc961edd3388960576e4353e123b4a51 Author: Thomas Hellström Date: Tue Mar 4 18:33:41 2025 +0100 drm/xe/hmm: Don't dereference struct page pointers without notifier lock The pnfs that we obtain from hmm_range_fault() point to pages that we don't have a reference on, and the guarantee that they are still in the cpu page-tables is that the notifier lock must be held and the notifier seqno is still valid. So while building the sg table and marking the pages accesses / dirty we need to hold this lock with a validated seqno. However, the lock is reclaim tainted which makes sg_alloc_table_from_pages_segment() unusable, since it internally allocates memory. Instead build the sg-table manually. For the non-iommu case this might lead to fewer coalesces, but if that's a problem it can be fixed up later in the resource cursor code. For the iommu case, the whole sg-table may still be coalesced to a single contigous device va region. This avoids marking pages that we don't own dirty and accessed, and it also avoid dereferencing struct pages that we don't own. v2: - Use assert to check whether hmm pfns are valid (Matthew Auld) - Take into account that large pages may cross range boundaries (Matthew Auld) v3: - Don't unnecessarily check for a non-freed sg-table. (Matthew Auld) - Add a missing up_read() in an error path. (Matthew Auld) Fixes: 81e058a3e7fd ("drm/xe: Introduce helper to populate userptr") Cc: Oak Zeng Cc: # v6.10+ Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Acked-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20250304173342.22009-3-thomas.hellstrom@linux.intel.com (cherry picked from commit ea3e66d280ce2576664a862693d1da8fd324c317) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_hmm.c | 112 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 86 insertions(+), 26 deletions(-) commit e3e2e7fc4cd8414c9a966ef1b344db543f8614f4 Author: Thomas Hellström Date: Tue Mar 4 18:33:40 2025 +0100 drm/xe/hmm: Style- and include fixes Add proper #ifndef around the xe_hmm.h header, proper spacing and since the documentation mostly follows kerneldoc format, make it kerneldoc. Also prepare for upcoming -stable fixes. Fixes: 81e058a3e7fd ("drm/xe: Introduce helper to populate userptr") Cc: Oak Zeng Cc: # v6.10+ Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Acked-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20250304173342.22009-2-thomas.hellstrom@linux.intel.com (cherry picked from commit bbe2b06b55bc061c8fcec034ed26e88287f39143) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_hmm.c | 9 +++------ drivers/gpu/drm/xe/xe_hmm.h | 5 +++++ 2 files changed, 8 insertions(+), 6 deletions(-) commit ae482ec8cd1a85bde3307f71921a7780086fbec0 Author: Matthew Brost Date: Fri Feb 28 08:30:58 2025 +0100 drm/xe: Add staging tree for VM binds Concurrent VM bind staging and zapping of PTEs from a userptr notifier do not work because the view of PTEs is not stable. VM binds cannot acquire the notifier lock during staging, as memory allocations are required. To resolve this race condition, use a staging tree for VM binds that is committed only under the userptr notifier lock during the final step of the bind. This ensures a consistent view of the PTEs in the userptr notifier. A follow up may only use staging for VM in fault mode as this is the only mode in which the above race exists. v3: - Drop zap PTE change (Thomas) - s/xe_pt_entry/xe_pt_entry_staging (Thomas) Suggested-by: Thomas Hellström Cc: Fixes: e8babb280b5e ("drm/xe: Convert multiple bind ops into single job") Fixes: a708f6501c69 ("drm/xe: Update PT layer with better error handling") Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20250228073058.59510-5-thomas.hellstrom@linux.intel.com Signed-off-by: Thomas Hellström (cherry picked from commit 6f39b0c5ef0385eae586760d10b9767168037aa5) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_pt.c | 58 ++++++++++++++++++++++++++++------------- drivers/gpu/drm/xe/xe_pt_walk.c | 3 ++- drivers/gpu/drm/xe/xe_pt_walk.h | 4 +++ 3 files changed, 46 insertions(+), 19 deletions(-) commit 84211b1c0db6b9dbe0020fa97192fb9661617f24 Author: Thomas Hellström Date: Fri Feb 28 08:30:57 2025 +0100 drm/xe: Fix fault mode invalidation with unbind Fix fault mode invalidation racing with unbind leading to the PTE zapping potentially traversing an invalid page-table tree. Do this by holding the notifier lock across PTE zapping. This might transfer any contention waiting on the notifier seqlock read side to the notifier lock read side, but that shouldn't be a major problem. At the same time get rid of the open-coded invalidation in the bind code by relying on the notifier even when the vma bind is not yet committed. Finally let userptr invalidation call a dedicated xe_vm function performing a full invalidation. Fixes: e8babb280b5e ("drm/xe: Convert multiple bind ops into single job") Cc: Thomas Hellström Cc: Matthew Brost Cc: Matthew Auld Cc: # v6.12+ Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20250228073058.59510-4-thomas.hellstrom@linux.intel.com (cherry picked from commit 100a5b8dadfca50d91d9a4c9fc01431b42a25cab) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_pt.c | 38 +++++------------- drivers/gpu/drm/xe/xe_vm.c | 85 ++++++++++++++++++++++++++-------------- drivers/gpu/drm/xe/xe_vm.h | 8 ++++ drivers/gpu/drm/xe/xe_vm_types.h | 4 +- 4 files changed, 75 insertions(+), 60 deletions(-) commit 1414d95d5805b1dc221d22db9b8dc5287ef083bc Author: Thomas Hellström Date: Fri Feb 28 08:30:56 2025 +0100 drm/xe/vm: Fix a misplaced #endif Fix a (harmless) misplaced #endif leading to declarations appearing multiple times. Fixes: 0eb2a18a8fad ("drm/xe: Implement VM snapshot support for BO's and userptr") Cc: Maarten Lankhorst Cc: José Roberto de Souza Cc: # v6.12+ Signed-off-by: Thomas Hellström Reviewed-by: Lucas De Marchi Reviewed-by: Tejas Upadhyay Link: https://patchwork.freedesktop.org/patch/msgid/20250228073058.59510-3-thomas.hellstrom@linux.intel.com (cherry picked from commit fcc20a4c752214b3e25632021c57d7d1d71ee1dd) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_vm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e775e2a060d99180edc5366fb9f4299d0f07b66c Author: Thomas Hellström Date: Fri Feb 28 08:30:55 2025 +0100 drm/xe/vm: Validate userptr during gpu vma prefetching If a userptr vma subject to prefetching was already invalidated or invalidated during the prefetch operation, the operation would repeatedly return -EAGAIN which would typically cause an infinite loop. Validate the userptr to ensure this doesn't happen. v2: - Don't fallthrough from UNMAP to PREFETCH (Matthew Brost) Fixes: 5bd24e78829a ("drm/xe/vm: Subclass userptr vmas") Fixes: 617eebb9c480 ("drm/xe: Fix array of binds") Cc: Matthew Brost Cc: # v6.9+ Suggested-by: Matthew Brost Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20250228073058.59510-2-thomas.hellstrom@linux.intel.com (cherry picked from commit 03c346d4d0d85d210d549d43c8cfb3dfb7f20e0a) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_vm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 53517a70873c7a91675f7244768aad5006cc45de Author: Varada Pavani Date: Tue Feb 25 18:49:18 2025 +0530 clk: samsung: update PLL locktime for PLL142XX used on FSD platform Currently PLL142XX locktime is 270. As per spec, it should be 150. Hence update PLL142XX controller locktime to 150. Cc: stable@vger.kernel.org Fixes: 4f346005aaed ("clk: samsung: fsd: Add initial clock support") Signed-off-by: Varada Pavani Link: https://lore.kernel.org/r/20250225131918.50925-3-v.pavani@samsung.com Signed-off-by: Krzysztof Kozlowski drivers/clk/samsung/clk-pll.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit f2052a4a62465c0037aef7ea7426bffdb3531e41 Author: Peter Griffin Date: Mon Mar 3 13:11:21 2025 +0000 clk: samsung: gs101: fix synchronous external abort in samsung_clk_save() EARLY_WAKEUP_SW_TRIG_*_SET and EARLY_WAKEUP_SW_TRIG_*_CLEAR registers are only writeable. Attempting to read these registers during samsung_clk_save() causes a synchronous external abort. Remove these 8 registers from cmu_top_clk_regs[] array so that system suspend gets further. Note: the code path can be exercised using the following command: echo mem > /sys/power/state Fixes: 2c597bb7d66a ("clk: samsung: clk-gs101: Add cmu_top, cmu_misc and cmu_apm support") Signed-off-by: Peter Griffin Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250303-clk-suspend-fix-v1-1-c2edaf66260f@linaro.org Signed-off-by: Krzysztof Kozlowski drivers/clk/samsung/clk-gs101.c | 8 -------- 1 file changed, 8 deletions(-) commit 8463d2adbe1901247937fcdfe4b525130f6db10b Author: Stefan Binding Date: Wed Mar 5 17:06:51 2025 +0000 ALSA: hda/realtek: Add support for ASUS Zenbook UM3406KA Laptops using CS35L41 HDA Laptop uses 2 CS35L41 Amps with HDA, using External boost with I2C Signed-off-by: Stefan Binding Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250305170714.755794-8-sbinding@opensource.cirrus.com sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit c86dd79a7c338fff9bebb9503857e07db9845eca Author: Stefan Binding Date: Wed Mar 5 17:06:50 2025 +0000 ALSA: hda/realtek: Add support for ASUS B5405 and B5605 Laptops using CS35L41 HDA Add support for ASUS B5605CCA and B5405CCA. Laptops use 2 CS35L41 Amps with HDA, using Internal boost, with SPI Signed-off-by: Stefan Binding Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250305170714.755794-7-sbinding@opensource.cirrus.com sound/pci/hda/patch_realtek.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7ab61d0a9a35e32497bcf2233310fec79ee3338f Author: Stefan Binding Date: Wed Mar 5 17:06:49 2025 +0000 ALSA: hda/realtek: Add support for ASUS B3405 and B3605 Laptops using CS35L41 HDA Add support for ASUS B3405CCA / P3405CCA, B3605CCA / P3605CCA, B3405CCA, B3605CCA. Laptops use 2 CS35L41 Amps with HDA, using Internal boost, with SPI Signed-off-by: Stefan Binding Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250305170714.755794-6-sbinding@opensource.cirrus.com sound/pci/hda/patch_realtek.c | 4 ++++ 1 file changed, 4 insertions(+) commit 859a11917001424776e1cca02b762efcabb4044e Author: Stefan Binding Date: Wed Mar 5 17:06:48 2025 +0000 ALSA: hda/realtek: Add support for various ASUS Laptops using CS35L41 HDA Add support for ASUS B3405CVA, B5405CVA, B5605CVA, B3605CVA. Laptops use 2 CS35L41 Amps with HDA, using Internal boost, with SPI Signed-off-by: Stefan Binding Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250305170714.755794-5-sbinding@opensource.cirrus.com sound/pci/hda/patch_realtek.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9120b2b4ad0dad2f6bbb6bcacd0456f806fda62d Author: Stefan Binding Date: Wed Mar 5 17:06:47 2025 +0000 ALSA: hda/realtek: Add support for ASUS ROG Strix G614 Laptops using CS35L41 HDA Add support for ASUS G614PH/PM/PP and G614FH/FM/FP. Laptops use 2 CS35L41 Amps with HDA, using Internal boost, with I2C Signed-off-by: Stefan Binding Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250305170714.755794-4-sbinding@opensource.cirrus.com sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit 16dc157346dd4404b02b42e73b88604be3652039 Author: Stefan Binding Date: Wed Mar 5 17:06:46 2025 +0000 ALSA: hda/realtek: Add support for ASUS ROG Strix GA603 Laptops using CS35L41 HDA Add support for ASUS GA603KP, GA603KM and GA603KH. Laptops use 2 CS35L41 Amps with HDA, using Internal boost, with I2C Signed-off-by: Stefan Binding Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250305170714.755794-3-sbinding@opensource.cirrus.com sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit f2c11231b57b5163bf16cdfd65271d53d61dd996 Author: Stefan Binding Date: Wed Mar 5 17:06:45 2025 +0000 ALSA: hda/realtek: Add support for ASUS ROG Strix G814 Laptop using CS35L41 HDA Add support for ASUS G814PH/PM/PP and G814FH/FM/FP. Laptops use 2 CS35L41 Amps with HDA, using Internal boost, with I2C. Signed-off-by: Stefan Binding Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250305170714.755794-2-sbinding@opensource.cirrus.com sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit 528361c49962708a60f51a1afafeb00987cebedf Author: Dan Carpenter Date: Wed Mar 5 18:52:59 2025 +0300 nvme-tcp: fix signedness bug in nvme_tcp_init_connection() The kernel_recvmsg() function returns an int which could be either negative error codes or the number of bytes received. The problem is that the condition: if (ret < sizeof(*icresp)) { is type promoted to type unsigned long and negative values are treated as high positive values which is success, when they should be treated as failure. Handle invalid positive returns separately from negative error codes to avoid this problem. Fixes: 578539e09690 ("nvme-tcp: fix connect failure on receiving partial ICResp PDU") Signed-off-by: Dan Carpenter Reviewed-by: Caleb Sander Mateos Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Keith Busch drivers/nvme/host/tcp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 848e076317446f9c663771ddec142d7c2eb4cb43 Merge: 0d2d0f3d93dd db52926fb0be Author: Linus Torvalds Date: Wed Mar 5 07:46:59 2025 -1000 Merge tag 'hid-for-linus-2025030501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - power management fix in intel-thc-hid (Even Xu) - nintendo gencon mapping fix (Ryan McClelland) - fix for UAF on device diconnect path in hid-steam (Vicki Pfau) - two fixes for UAF on device disconnect path in intel-ish-hid (Zhang Lixu) - fix for potential NULL dereference in hid-appleir (Daniil Dulov) - few other small cosmetic fixes (e.g. typos) * tag 'hid-for-linus-2025030501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: Intel-thc-hid: Intel-quickspi: Correct device state after S4 HID: intel-thc-hid: Fix spelling mistake "intput" -> "input" HID: hid-steam: Fix use-after-free when detaching device HID: debug: Fix spelling mistake "Messanger" -> "Messenger" HID: appleir: Fix potential NULL dereference at raw event handle HID: apple: disable Fn key handling on the Omoton KB066 HID: i2c-hid: improve i2c_hid_get_report error message HID: intel-ish-hid: Fix use-after-free issue in ishtp_hid_remove() HID: intel-ish-hid: Fix use-after-free issue in hid_ishtp_cl_remove() HID: google: fix unused variable warning under !CONFIG_ACPI HID: nintendo: fix gencon button events map HID: corsair-void: Update power supply values with a unified work handler commit 0d2d0f3d93ddd6556f23c917d910becd9925ddeb Author: Linus Torvalds Date: Wed Mar 5 07:35:40 2025 -1000 fs/pipe: remove buggy and unused 'helper' function While looking for incorrect users of the pipe head/tail fields (see commit c27c66afc449: "fs/pipe: Fix pipe_occupancy() with 16-bit indexes"), I found a bug in pipe_discard_from() that looked entirely broken. However, the fix is trivial: this buggy function isn't actually called by anything, so let's just remove it ASAP. Signed-off-by: Linus Torvalds include/linux/pipe_fs_i.h | 9 --------- 1 file changed, 9 deletions(-) commit da552bda987420e877500fdd90bd0172e3bf412b Author: Kenneth Feng Date: Fri Feb 28 17:02:11 2025 +0800 drm/amd/pm: always allow ih interrupt from fw always allow ih interrupt from fw on smu v14 based on the interface requirement Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher (cherry picked from commit a3199eba46c54324193607d9114a1e321292d7a1) Cc: stable@vger.kernel.org # 6.12.x drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 29ffeb73b216ce3eff10229eb077cf9b7812119d Author: Richard Thier Date: Mon Jun 17 23:46:27 2019 +0200 drm/radeon: Fix rs400_gpu_init for ATI mobility radeon Xpress 200M num_gb_pipes was set to a wrong value using r420_pipe_config This have lead to HyperZ glitches on fast Z clearing. Closes: https://bugs.freedesktop.org/show_bug.cgi?id=110897 Reviewed-by: Marek Olšák Signed-off-by: Richard Thier Signed-off-by: Alex Deucher (cherry picked from commit 044e59a85c4d84e3c8d004c486e5c479640563a6) Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/r300.c | 3 ++- drivers/gpu/drm/radeon/radeon_asic.h | 1 + drivers/gpu/drm/radeon/rs400.c | 18 ++++++++++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) commit 0eba2a7e858907a746ba69cd002eb9eb4dbd7bf3 Author: Charles Keepax Date: Fri Feb 28 15:14:56 2025 +0000 ASoC: ops: Consistently treat platform_max as control value This reverts commit 9bdd10d57a88 ("ASoC: ops: Shift tested values in snd_soc_put_volsw() by +min"), and makes some additional related updates. There are two ways the platform_max could be interpreted; the maximum register value, or the maximum value the control can be set to. The patch moved from treating the value as a control value to a register one. When the patch was applied it was technically correct as snd_soc_limit_volume() also used the register interpretation. However, even then most of the other usages treated platform_max as a control value, and snd_soc_limit_volume() has since been updated to also do so in commit fb9ad24485087 ("ASoC: ops: add correct range check for limiting volume"). That patch however, missed updating snd_soc_put_volsw() back to the control interpretation, and fixing snd_soc_info_volsw_range(). The control interpretation makes more sense as limiting is typically done from the machine driver, so it is appropriate to use the customer facing representation rather than the internal codec representation. Update all the code to consistently use this interpretation of platform_max. Finally, also add some comments to the soc_mixer_control struct to hopefully avoid further patches switching between the two approaches. Fixes: fb9ad24485087 ("ASoC: ops: add correct range check for limiting volume") Signed-off-by: Charles Keepax Link: https://patch.msgid.link/20250228151456.3703342-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown include/sound/soc.h | 5 ++++- sound/soc/soc-ops.c | 15 +++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) commit cfced12f5100e50d56bc587299393fd33c1169a9 Author: K Prateek Nayak Date: Wed Mar 5 11:23:01 2025 +0000 include/linux/pipe_fs_i: Add htmldoc annotation for "head_tail" member Add htmldoc annotation for the newly introduced "head_tail" member describing it to be a union of the pipe_inode_info's @head and @tail members. Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/lkml/20250305204609.5e64768e@canb.auug.org.au/ Fixes: 3d252160b818 ("fs/pipe: Read pipe->{head,tail} atomically outside pipe->mutex") Signed-off-by: K Prateek Nayak Signed-off-by: Linus Torvalds include/linux/pipe_fs_i.h | 1 + 1 file changed, 1 insertion(+) commit c27c66afc449b80f3b4b84d123358c0248f2cf63 Author: Linus Torvalds Date: Wed Mar 5 07:08:09 2025 -1000 fs/pipe: Fix pipe_occupancy() with 16-bit indexes The pipe_occupancy() logic implicitly relied on the natural unsigned modulo arithmetic in C, but that doesn't work for the new 'pipe_index_t' case, since any arithmetic will be done in 'int' (and here we had also made it 'unsigned int' due to the function call boundary). So make the modulo arithmetic explicit by casting the result to the proper type. Cc: Oleg Nesterov Cc: Mateusz Guzik Cc: Manfred Spraul Cc: Christian Brauner Cc: Swapnil Sapkal Cc: Alexey Gladkov Cc: K Prateek Nayak Link: https://lore.kernel.org/all/CAHk-=wjyHsGLx=rxg6PKYBNkPYAejgo7=CbyL3=HGLZLsAaJFQ@mail.gmail.com/ Fixes: 3d252160b818 ("fs/pipe: Read pipe->{head,tail} atomically outside pipe->mutex") Signed-off-by: Linus Torvalds include/linux/pipe_fs_i.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd617ea3b79d2116d53f76cdb5a3601c0ba6e42f Author: Andrew Martin Date: Fri Feb 28 11:26:48 2025 -0500 drm/amdkfd: Fix NULL Pointer Dereference in KFD queue Through KFD IOCTL Fuzzing we encountered a NULL pointer derefrence when calling kfd_queue_acquire_buffers. Fixes: 629568d25fea ("drm/amdkfd: Validate queue cwsr area and eop buffer size") Signed-off-by: Andrew Martin Reviewed-by: Philip Yang Signed-off-by: Andrew Martin Signed-off-by: Alex Deucher (cherry picked from commit 049e5bf3c8406f87c3d8e1958e0a16804fa1d530) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2a3e89a14864090ee4804fcec655ffc15fabf45c Author: Przemek Kitszel Date: Wed Feb 19 14:30:39 2025 +0100 ice: register devlink prior to creating health reporters ice_health_init() was introduced in the commit 2a82874a3b7b ("ice: add Tx hang devlink health reporter"). The call to it should have been put after ice_devlink_register(). It went unnoticed until next reporter by Konrad, which receives events from FW. FW is reporting all events, also from prior driver load, and thus it is not unlikely to have something at the very beginning. And that results in a splat: [ 24.455950] ? devlink_recover_notify.constprop.0+0x198/0x1b0 [ 24.455973] devlink_health_report+0x5d/0x2a0 [ 24.455976] ? __pfx_ice_health_status_lookup_compare+0x10/0x10 [ice] [ 24.456044] ice_process_health_status_event+0x1b7/0x200 [ice] Do the analogous thing for deinit patch. Fixes: 85d6164ec56d ("ice: add fw and port health reporters") Reviewed-by: Aleksandr Loktionov Reviewed-by: Michal Swiatkowski Reviewed-by: Konrad Knitter Signed-off-by: Przemek Kitszel Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 374c9faac5a763a05bc3f68ad9f73dab3c6aec90 Author: Ma Ke Date: Wed Feb 26 16:37:31 2025 +0800 drm/amd/display: Fix null check for pipe_ctx->plane_state in resource_build_scaling_params Null pointer dereference issue could occur when pipe_ctx->plane_state is null. The fix adds a check to ensure 'pipe_ctx->plane_state' is not null before accessing. This prevents a null pointer dereference. Found by code review. Fixes: 3be5262e353b ("drm/amd/display: Rename more dc_surface stuff to plane_state") Reviewed-by: Alex Hung Signed-off-by: Ma Ke Signed-off-by: Alex Deucher (cherry picked from commit 63e6a77ccf239337baa9b1e7787cde9fa0462092) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dce97cb0a3e34204c0b99345418a714eac85953f Author: Marcin Szycik Date: Thu Jan 2 20:07:52 2025 +0100 ice: Fix switchdev slow-path in LAG Ever since removing switchdev control VSI and using PF for port representor Tx/Rx, switchdev slow-path has been working improperly after failover in SR-IOV LAG. LAG assumes that the first uplink to be added to the aggregate will own VFs and have switchdev configured. After failing-over to the other uplink, representors are still configured to Tx through the uplink they are set up on, which fails because that uplink is now down. On failover, update all PRs on primary uplink to use the currently active uplink for Tx. Call netif_keep_dst(), as the secondary uplink might not be in switchdev mode. Also make sure to call ice_eswitch_set_target_vsi() if uplink is in LAG. On the Rx path, representors are already working properly, because default Tx from VFs is set to PF owning the eswitch. After failover the same PF is receiving traffic from VFs, even though link is down. Fixes: defd52455aee ("ice: do Tx through PF netdev in slow-path") Reviewed-by: Michal Swiatkowski Signed-off-by: Marcin Szycik Reviewed-by: Simon Horman Tested-by: Rafal Romanowski Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_lag.c | 27 +++++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_txrx.c | 4 +++- 2 files changed, 30 insertions(+), 1 deletion(-) commit 23d97f18901ef5e4e264e3b1777fe65c760186b5 Author: Grzegorz Nitka Date: Thu Jan 23 09:15:39 2025 +0100 ice: fix memory leak in aRFS after reset Fix aRFS (accelerated Receive Flow Steering) structures memory leak by adding a checker to verify if aRFS memory is already allocated while configuring VSI. aRFS objects are allocated in two cases: - as part of VSI initialization (at probe), and - as part of reset handling However, VSI reconfiguration executed during reset involves memory allocation one more time, without prior releasing already allocated resources. This led to the memory leak with the following signature: [root@os-delivery ~]# cat /sys/kernel/debug/kmemleak unreferenced object 0xff3c1ca7252e6000 (size 8192): comm "kworker/0:0", pid 8, jiffies 4296833052 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): [] __kmalloc_cache_noprof+0x275/0x340 [] ice_init_arfs+0x3a/0xe0 [ice] [] ice_vsi_cfg_def+0x607/0x850 [ice] [] ice_vsi_setup+0x5b/0x130 [ice] [] ice_init+0x1c1/0x460 [ice] [] ice_probe+0x2af/0x520 [ice] [] local_pci_probe+0x43/0xa0 [] work_for_cpu_fn+0x13/0x20 [] process_one_work+0x179/0x390 [] worker_thread+0x239/0x340 [] kthread+0xcc/0x100 [] ret_from_fork+0x2d/0x50 [] ret_from_fork_asm+0x1a/0x30 ... Fixes: 28bf26724fdb ("ice: Implement aRFS") Reviewed-by: Michal Swiatkowski Signed-off-by: Grzegorz Nitka Reviewed-by: Simon Horman Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_arfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b4035ddbfc8e4521f85569998a7569668cccf51 Author: Zecheng Li Date: Tue Mar 4 21:40:31 2025 +0000 sched/fair: Fix potential memory corruption in child_cfs_rq_on_list child_cfs_rq_on_list attempts to convert a 'prev' pointer to a cfs_rq. This 'prev' pointer can originate from struct rq's leaf_cfs_rq_list, making the conversion invalid and potentially leading to memory corruption. Depending on the relative positions of leaf_cfs_rq_list and the task group (tg) pointer within the struct, this can cause a memory fault or access garbage data. The issue arises in list_add_leaf_cfs_rq, where both cfs_rq->leaf_cfs_rq_list and rq->leaf_cfs_rq_list are added to the same leaf list. Also, rq->tmp_alone_branch can be set to rq->leaf_cfs_rq_list. This adds a check `if (prev == &rq->leaf_cfs_rq_list)` after the main conditional in child_cfs_rq_on_list. This ensures that the container_of operation will convert a correct cfs_rq struct. This check is sufficient because only cfs_rqs on the same CPU are added to the list, so verifying the 'prev' pointer against the current rq's list head is enough. Fixes a potential memory corruption issue that due to current struct layout might not be manifesting as a crash but could lead to unpredictable behavior when the layout changes. Fixes: fdaba61ef8a2 ("sched/fair: Ensure that the CFS parent is added after unthrottling") Signed-off-by: Zecheng Li Reviewed-and-tested-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20250304214031.2882646-1-zecheng@google.com kernel/sched/fair.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3be83ee9de0298f8321aa0b148d8f9995102e40f Author: Larysa Zaremba Date: Mon Dec 9 15:08:53 2024 +0100 ice: do not configure destination override for switchdev After switchdev is enabled and disabled later, LLDP packets sending stops, despite working perfectly fine before and during switchdev state. To reproduce (creating/destroying VF is what triggers the reconfiguration): devlink dev eswitch set pci/
mode switchdev echo '2' > /sys/class/net//device/sriov_numvfs echo '0' > /sys/class/net//device/sriov_numvfs This happens because LLDP relies on the destination override functionality. It needs to 1) set a flag in the descriptor, 2) set the VSI permission to make it valid. The permissions are set when the PF VSI is first configured, but switchdev then enables it for the uplink VSI (which is always the PF) once more when configured and disables when deconfigured, which leads to software-generated LLDP packets being blocked. Do not modify the destination override permissions when configuring switchdev, as the enabled state is the default configuration that is never modified. Fixes: 1a1c40df2e80 ("ice: set and release switchdev environment") Reviewed-by: Michal Swiatkowski Signed-off-by: Larysa Zaremba Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_eswitch.c | 6 ------ drivers/net/ethernet/intel/ice/ice_lib.c | 18 ------------------ drivers/net/ethernet/intel/ice/ice_lib.h | 4 ---- 3 files changed, 28 deletions(-) commit e06472bab2a5393430cc2fbc3211cd3602422c1e Author: Olivier Gayot Date: Wed Mar 5 10:21:54 2025 +0800 block: fix conversion of GPT partition name to 7-bit The utf16_le_to_7bit function claims to, naively, convert a UTF-16 string to a 7-bit ASCII string. By naively, we mean that it: * drops the first byte of every character in the original UTF-16 string * checks if all characters are printable, and otherwise replaces them by exclamation mark "!". This means that theoretically, all characters outside the 7-bit ASCII range should be replaced by another character. Examples: * lower-case alpha (ɒ) 0x0252 becomes 0x52 (R) * ligature OE (œ) 0x0153 becomes 0x53 (S) * hangul letter pieup (ㅂ) 0x3142 becomes 0x42 (B) * upper-case gamma (Ɣ) 0x0194 becomes 0x94 (not printable) so gets replaced by "!" The result of this conversion for the GPT partition name is passed to user-space as PARTNAME via udev, which is confusing and feels questionable. However, there is a flaw in the conversion function itself. By dropping one byte of each character and using isprint() to check if the remaining byte corresponds to a printable character, we do not actually guarantee that the resulting character is 7-bit ASCII. This happens because we pass 8-bit characters to isprint(), which in the kernel returns 1 for many values > 0x7f - as defined in ctype.c. This results in many values which should be replaced by "!" to be kept as-is, despite not being valid 7-bit ASCII. Examples: * e with acute accent (é) 0x00E9 becomes 0xE9 - kept as-is because isprint(0xE9) returns 1. * euro sign (€) 0x20AC becomes 0xAC - kept as-is because isprint(0xAC) returns 1. This way has broken pyudev utility[1], fixes it by using a mask of 7 bits instead of 8 bits before calling isprint. Link: https://github.com/pyudev/pyudev/issues/490#issuecomment-2685794648 [1] Link: https://lore.kernel.org/linux-block/4cac90c2-e414-4ebb-ae62-2a4589d9dc6e@canonical.com/ Cc: Mulhern Cc: Davidlohr Bueso Cc: stable@vger.kernel.org Signed-off-by: Olivier Gayot Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250305022154.3903128-1-ming.lei@redhat.com Signed-off-by: Jens Axboe block/partitions/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ac60242b0173be83709603ebaf27a473f16c4e4 Author: Uday Shankar Date: Tue Mar 4 14:34:26 2025 -0700 ublk: set_params: properly check if parameters can be applied The parameters set by the set_params call are only applied to the block device in the start_dev call. So if a device has already been started, a subsequently issued set_params on that device will not have the desired effect, and should return an error. There is an existing check for this - set_params fails on devices in the LIVE state. But this check is not sufficient to cover the recovery case. In this case, the device will be in the QUIESCED or FAIL_IO states, so set_params will succeed. But this success is misleading, because the parameters will not be applied, since the device has already been started (by a previous ublk server). The bit UB_STATE_USED is set on completion of the start_dev; use it to detect and fail set_params commands which arrive too late to be applied (after start_dev). Signed-off-by: Uday Shankar Fixes: 0aa73170eba5 ("ublk_drv: add SET_PARAMS/GET_PARAMS control command") Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20250304-set_params-v1-1-17b5e0887606@purestorage.com Signed-off-by: Jens Axboe drivers/block/ublk_drv.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 927e6bec5cf3624665b0a2e9f64a1d32f3d22cdd Author: Bard Liao Date: Wed Mar 5 21:41:13 2025 +0800 ASoC: rt1320: set wake_capable = 0 explicitly "generic_new_peripheral_assigned: invalid dev_num 1, wake supported 1" is reported by our internal CI test. Rt1320's wake feature is not used in Linux and that's why it is not in the wake_capable_list[] list in intel_auxdevice.c. However, BIOS may set it as wake-capable. Overwrite wake_capable to 0 in the codec driver to align with wake_capable_list[]. Signed-off-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Acked-by: Shuming Fan Link: https://patch.msgid.link/20250305134113.201326-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/rt1320-sdw.c | 3 +++ 1 file changed, 3 insertions(+) commit 3c9231ea6497dfc50ac0ef69fff484da27d0df66 Author: Jason Xing Date: Tue Mar 4 08:44:29 2025 +0800 net-timestamp: support TCP GSO case for a few missing flags When I read through the TSO codes, I found out that we probably miss initializing the tx_flags of last seg when TSO is turned off, which means at the following points no more timestamp (for this last one) will be generated. There are three flags to be handled in this patch: 1. SKBTX_HW_TSTAMP 2. SKBTX_BPF 3. SKBTX_SCHED_TSTAMP Note that SKBTX_BPF[1] was added in 6.14.0-rc2 by commit 6b98ec7e882af ("bpf: Add BPF_SOCK_OPS_TSTAMP_SCHED_CB callback") and only belongs to net-next branch material for now. The common issue of the above three flags can be fixed by this single patch. This patch initializes the tx_flags to SKBTX_ANY_TSTAMP like what the UDP GSO does to make the newly segmented last skb inherit the tx_flags so that requested timestamp will be generated in each certain layer, or else that last one has zero value of tx_flags which leads to no timestamp at all. Fixes: 4ed2d765dfacc ("net-timestamp: TCP timestamping") Signed-off-by: Jason Xing Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller net/ipv4/tcp_offload.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 13940cef95491472760ca261b6713692ece9b946 Author: Yuezhang Mo Date: Sat Feb 8 17:16:58 2025 +0800 exfat: add a check for invalid data size Add a check for invalid data size to avoid corrupted filesystem from being further corrupted. Signed-off-by: Yuezhang Mo Signed-off-by: Namjae Jeon fs/exfat/namei.c | 5 +++++ 1 file changed, 5 insertions(+) commit fda94a9919fd632033979ad7765a99ae3cab9289 Author: Eric Sandeen Date: Tue Feb 11 14:14:21 2025 -0600 exfat: short-circuit zero-byte writes in exfat_file_write_iter When generic_write_checks() returns zero, it means that iov_iter_count() is zero, and there is no work to do. Simply return success like all other filesystems do, rather than proceeding down the write path, which today yields an -EFAULT in generic_perform_write() via the (fault_in_iov_iter_readable(i, bytes) == bytes) check when bytes == 0. Fixes: 11a347fb6cef ("exfat: change to get file size from DataLength") Reported-by: Noah Signed-off-by: Eric Sandeen Reviewed-by: Yuezhang Mo Signed-off-by: Namjae Jeon fs/exfat/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9da33619e0ca53627641bc97d1b93ec741299111 Author: Namjae Jeon Date: Fri Jan 31 12:55:55 2025 +0900 exfat: fix soft lockup in exfat_clear_bitmap bitmap clear loop will take long time in __exfat_free_cluster() if data size of file/dir enty is invalid. If cluster bit in bitmap is already clear, stop clearing bitmap go to out of loop. Fixes: 31023864e67a ("exfat: add fat entry operations") Reported-by: Kun Hu , Jiaji Qin Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon fs/exfat/balloc.c | 10 ++++++++-- fs/exfat/exfat_fs.h | 2 +- fs/exfat/fatent.c | 11 +++++++---- 3 files changed, 16 insertions(+), 7 deletions(-) commit 6697f819a10b238ccf01998c3f203d65d8374696 Author: Yuezhang Mo Date: Fri Nov 22 10:50:55 2024 +0800 exfat: fix just enough dentries but allocate a new cluster to dir This commit fixes the condition for allocating cluster to parent directory to avoid allocating new cluster to parent directory when there are just enough empty directory entries at the end of the parent directory. Fixes: af02c72d0b62 ("exfat: convert exfat_find_empty_entry() to use dentry cache") Signed-off-by: Yuezhang Mo Signed-off-by: Namjae Jeon fs/exfat/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f02c41f87cfe61440c18bf77d1ef0a884b9ee2b5 Author: Niklas Söderlund Date: Tue Jan 21 14:58:33 2025 +0100 gpio: rcar: Use raw_spinlock to protect register access Use raw_spinlock in order to fix spurious messages about invalid context when spinlock debugging is enabled. The lock is only used to serialize register access. [ 4.239592] ============================= [ 4.239595] [ BUG: Invalid wait context ] [ 4.239599] 6.13.0-rc7-arm64-renesas-05496-gd088502a519f #35 Not tainted [ 4.239603] ----------------------------- [ 4.239606] kworker/u8:5/76 is trying to lock: [ 4.239609] ffff0000091898a0 (&p->lock){....}-{3:3}, at: gpio_rcar_config_interrupt_input_mode+0x34/0x164 [ 4.239641] other info that might help us debug this: [ 4.239643] context-{5:5} [ 4.239646] 5 locks held by kworker/u8:5/76: [ 4.239651] #0: ffff0000080fb148 ((wq_completion)async){+.+.}-{0:0}, at: process_one_work+0x190/0x62c [ 4.250180] OF: /soc/sound@ec500000/ports/port@0/endpoint: Read of boolean property 'frame-master' with a value. [ 4.254094] #1: ffff80008299bd80 ((work_completion)(&entry->work)){+.+.}-{0:0}, at: process_one_work+0x1b8/0x62c [ 4.254109] #2: ffff00000920c8f8 [ 4.258345] OF: /soc/sound@ec500000/ports/port@1/endpoint: Read of boolean property 'bitclock-master' with a value. [ 4.264803] (&dev->mutex){....}-{4:4}, at: __device_attach_async_helper+0x3c/0xdc [ 4.264820] #3: ffff00000a50ca40 (request_class#2){+.+.}-{4:4}, at: __setup_irq+0xa0/0x690 [ 4.264840] #4: [ 4.268872] OF: /soc/sound@ec500000/ports/port@1/endpoint: Read of boolean property 'frame-master' with a value. [ 4.273275] ffff00000a50c8c8 (lock_class){....}-{2:2}, at: __setup_irq+0xc4/0x690 [ 4.296130] renesas_sdhi_internal_dmac ee100000.mmc: mmc1 base at 0x00000000ee100000, max clock rate 200 MHz [ 4.304082] stack backtrace: [ 4.304086] CPU: 1 UID: 0 PID: 76 Comm: kworker/u8:5 Not tainted 6.13.0-rc7-arm64-renesas-05496-gd088502a519f #35 [ 4.304092] Hardware name: Renesas Salvator-X 2nd version board based on r8a77965 (DT) [ 4.304097] Workqueue: async async_run_entry_fn [ 4.304106] Call trace: [ 4.304110] show_stack+0x14/0x20 (C) [ 4.304122] dump_stack_lvl+0x6c/0x90 [ 4.304131] dump_stack+0x14/0x1c [ 4.304138] __lock_acquire+0xdfc/0x1584 [ 4.426274] lock_acquire+0x1c4/0x33c [ 4.429942] _raw_spin_lock_irqsave+0x5c/0x80 [ 4.434307] gpio_rcar_config_interrupt_input_mode+0x34/0x164 [ 4.440061] gpio_rcar_irq_set_type+0xd4/0xd8 [ 4.444422] __irq_set_trigger+0x5c/0x178 [ 4.448435] __setup_irq+0x2e4/0x690 [ 4.452012] request_threaded_irq+0xc4/0x190 [ 4.456285] devm_request_threaded_irq+0x7c/0xf4 [ 4.459398] ata1: link resume succeeded after 1 retries [ 4.460902] mmc_gpiod_request_cd_irq+0x68/0xe0 [ 4.470660] mmc_start_host+0x50/0xac [ 4.474327] mmc_add_host+0x80/0xe4 [ 4.477817] tmio_mmc_host_probe+0x2b0/0x440 [ 4.482094] renesas_sdhi_probe+0x488/0x6f4 [ 4.486281] renesas_sdhi_internal_dmac_probe+0x60/0x78 [ 4.491509] platform_probe+0x64/0xd8 [ 4.495178] really_probe+0xb8/0x2a8 [ 4.498756] __driver_probe_device+0x74/0x118 [ 4.503116] driver_probe_device+0x3c/0x154 [ 4.507303] __device_attach_driver+0xd4/0x160 [ 4.511750] bus_for_each_drv+0x84/0xe0 [ 4.515588] __device_attach_async_helper+0xb0/0xdc [ 4.520470] async_run_entry_fn+0x30/0xd8 [ 4.524481] process_one_work+0x210/0x62c [ 4.528494] worker_thread+0x1ac/0x340 [ 4.532245] kthread+0x10c/0x110 [ 4.535476] ret_from_fork+0x10/0x20 Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250121135833.3769310-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-rcar.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 12f65d1203507f7db3ba59930fe29a3b8eee9945 Author: Koichiro Den Date: Mon Feb 24 23:31:26 2025 +0900 gpio: aggregator: protect driver attr handlers against module unload Both new_device_store and delete_device_store touch module global resources (e.g. gpio_aggregator_lock). To prevent race conditions with module unload, a reference needs to be held. Add try_module_get() in these handlers. For new_device_store, this eliminates what appears to be the most dangerous scenario: if an id is allocated from gpio_aggregator_idr but platform_device_register has not yet been called or completed, a concurrent module unload could fail to unregister/delete the device, leaving behind a dangling platform device/GPIO forwarder. This can result in various issues. The following simple reproducer demonstrates these problems: #!/bin/bash while :; do # note: whether 'gpiochip0 0' exists or not does not matter. echo 'gpiochip0 0' > /sys/bus/platform/drivers/gpio-aggregator/new_device done & while :; do modprobe gpio-aggregator modprobe -r gpio-aggregator done & wait Starting with the following warning, several kinds of warnings will appear and the system may become unstable: ------------[ cut here ]------------ list_del corruption, ffff888103e2e980->next is LIST_POISON1 (dead000000000100) WARNING: CPU: 1 PID: 1327 at lib/list_debug.c:56 __list_del_entry_valid_or_report+0xa3/0x120 [...] RIP: 0010:__list_del_entry_valid_or_report+0xa3/0x120 [...] Call Trace: ? __list_del_entry_valid_or_report+0xa3/0x120 ? __warn.cold+0x93/0xf2 ? __list_del_entry_valid_or_report+0xa3/0x120 ? report_bug+0xe6/0x170 ? __irq_work_queue_local+0x39/0xe0 ? handle_bug+0x58/0x90 ? exc_invalid_op+0x13/0x60 ? asm_exc_invalid_op+0x16/0x20 ? __list_del_entry_valid_or_report+0xa3/0x120 gpiod_remove_lookup_table+0x22/0x60 new_device_store+0x315/0x350 [gpio_aggregator] kernfs_fop_write_iter+0x137/0x1f0 vfs_write+0x262/0x430 ksys_write+0x60/0xd0 do_syscall_64+0x6c/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e [...] ---[ end trace 0000000000000000 ]--- Fixes: 828546e24280 ("gpio: Add GPIO Aggregator") Cc: stable@vger.kernel.org Signed-off-by: Koichiro Den Link: https://lore.kernel.org/r/20250224143134.3024598-2-koichiro.den@canonical.com Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-aggregator.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 376a8c2a144397d9cf2a67d403dd64f4a7ff9104 Author: Shyam Sundar S K Date: Wed Mar 5 10:28:42 2025 +0530 platform/x86/amd/pmf: Update PMF Driver for Compatibility with new PMF-TA The PMF driver allocates a shared memory buffer using tee_shm_alloc_kernel_buf() for communication with the PMF-TA. The latest PMF-TA version introduces new structures with OEM debug information and additional policy input conditions for evaluating the policy binary. Consequently, the shared memory size must be increased to ensure compatibility between the PMF driver and the updated PMF-TA. To do so, introduce the new PMF-TA UUID and update the PMF shared memory configuration to ensure compatibility with the latest PMF-TA version. Additionally, export the TA UUID. These updates will result in modifications to the prototypes of amd_pmf_tee_init() and amd_pmf_ta_open_session(). Link: https://lore.kernel.org/all/55ac865f-b1c7-fa81-51c4-d211c7963e7e@linux.intel.com/ Reviewed-by: Mario Limonciello Co-developed-by: Patil Rajesh Reddy Signed-off-by: Patil Rajesh Reddy Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20250305045842.4117767-2-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/amd/pmf/pmf.h | 5 +++- drivers/platform/x86/amd/pmf/tee-if.c | 50 +++++++++++++++++++++++++---------- 2 files changed, 40 insertions(+), 15 deletions(-) commit 9ba93cb8212d62bccd8b41b8adb6656abf37280a Author: Shyam Sundar S K Date: Wed Mar 5 10:28:41 2025 +0530 platform/x86/amd/pmf: Propagate PMF-TA return codes In the amd_pmf_invoke_cmd_init() function within the PMF driver ensure that the actual result from the PMF-TA is returned rather than a generic EIO. This change allows for proper handling of errors originating from the PMF-TA. Reviewed-by: Mario Limonciello Co-developed-by: Patil Rajesh Reddy Signed-off-by: Patil Rajesh Reddy Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20250305045842.4117767-1-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/amd/pmf/tee-if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50dc696c3a482ea35bd0691f728d47e40b668483 Author: Aiden Ma Date: Tue Mar 4 19:54:01 2025 +0800 doc: correcting two prefix errors in idmappings.rst Add the 'k' prefix to id 21000. And id `u1000` in the third idmapping should be mapped to `k31000`, not `u31000`. Signed-off-by: Aiden Ma Link: https://lore.kernel.org/r/tencent_4E7B1F143E8051530C21FCADF4E014DCBB06@qq.com Signed-off-by: Christian Brauner Documentation/filesystems/idmappings.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1ee5aa765c22a0577ec552d460bf2035300b4b51 Author: Hoku Ishibe Date: Sun Feb 23 21:05:17 2025 -0500 ALSA: hda: intel: Add Dell ALC3271 to power_save denylist Dell XPS 13 7390 with the Realtek ALC3271 codec experiences persistent humming noise when the power_save mode is enabled. This issue occurs when the codec enters power saving mode, leading to unwanted noise from the speakers. This patch adds the affected model (PCI ID 0x1028:0x0962) to the power_save denylist to ensure power_save is disabled by default, preventing power-off related noise issues. Steps to Reproduce 1. Boot the system with `snd_hda_intel` loaded. 2. Verify that `power_save` mode is enabled: ```sh cat /sys/module/snd_hda_intel/parameters/power_save ```` output: 10 (default power save timeout) 3. Wait for the power save timeout 4. Observe a persistent humming noise from the speakers 5. Disable `power_save` manually: ```sh echo 0 | sudo tee /sys/module/snd_hda_intel/parameters/power_save ```` 6. Confirm that the noise disappears immediately. This issue has been observed on my system, and this patch successfully eliminates the unwanted noise. If other users experience similar issues, additional reports would be helpful. Signed-off-by: Hoku Ishibe Cc: Link: https://patch.msgid.link/20250224020517.51035-1-me@hokuishi.be Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 2 ++ 1 file changed, 2 insertions(+) commit ca0dedaff92307591f66c9206933fbdfe87add10 Author: Kailang Yang Date: Wed Mar 5 13:54:34 2025 +0800 ALSA: hda/realtek: update ALC222 depop optimize Add ALC222 its own depop functions for alc_init and alc_shutup. [note: this fixes pop noise issues on the models with two headphone jacks -- tiwai ] Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 76 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 0d3e0dfd68fb9e6b0ec865be9f3377cc3ff55733 Author: Jarkko Sakkinen Date: Wed Mar 5 07:00:05 2025 +0200 x86/sgx: Fix size overflows in sgx_encl_create() The total size calculated for EPC can overflow u64 given the added up page for SECS. Further, the total size calculated for shmem can overflow even when the EPC size stays within limits of u64, given that it adds the extra space for 128 byte PCMD structures (one for each page). Address this by pre-evaluating the micro-architectural requirement of SGX: the address space size must be power of two. This is eventually checked up by ECREATE but the pre-check has the additional benefit of making sure that there is some space for additional data. Fixes: 888d24911787 ("x86/sgx: Add SGX_IOC_ENCLAVE_CREATE") Reported-by: Dan Carpenter Signed-off-by: Jarkko Sakkinen Signed-off-by: Ingo Molnar Acked-by: Dave Hansen Cc: Peter Zijlstra Cc: "H. Peter Anvin" Link: https://lore.kernel.org/r/20250305050006.43896-1-jarkko@kernel.org Closes: https://lore.kernel.org/linux-sgx/c87e01a0-e7dd-4749-a348-0980d3444f04@stanley.mountain/ arch/x86/kernel/cpu/sgx/ioctl.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bb2281fb05e50108ce95c43ab7e701ee564565c8 Merge: 48a5eed9ad58 50cef76d5cb0 Author: Linus Torvalds Date: Tue Mar 4 19:05:53 2025 -1000 Merge tag 'x86_microcode_for_v6.14_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull AMD microcode loading fixes from Borislav Petkov: - Load only sha256-signed microcode patch blobs - Other good cleanups * tag 'x86_microcode_for_v6.14_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode/AMD: Load only SHA256-checksummed patches x86/microcode/AMD: Add get_patch_level() x86/microcode/AMD: Get rid of the _load_microcode_amd() forward declaration x86/microcode/AMD: Merge early_apply_microcode() into its single callsite x86/microcode/AMD: Remove unused save_microcode_in_initrd_amd() declarations x86/microcode/AMD: Remove ugly linebreak in __verify_patch_section() signature commit b33a534610067ade2bdaf2052900aaad99701353 Author: Oscar Maes Date: Mon Mar 3 16:56:19 2025 +0100 vlan: enforce underlying device type Currently, VLAN devices can be created on top of non-ethernet devices. Besides the fact that it doesn't make much sense, this also causes a bug which leaks the address of a kernel function to usermode. When creating a VLAN device, we initialize GARP (garp_init_applicant) and MRP (mrp_init_applicant) for the underlying device. As part of the initialization process, we add the multicast address of each applicant to the underlying device, by calling dev_mc_add. __dev_mc_add uses dev->addr_len to determine the length of the new multicast address. This causes an out-of-bounds read if dev->addr_len is greater than 6, since the multicast addresses provided by GARP and MRP are only 6 bytes long. This behaviour can be reproduced using the following commands: ip tunnel add gretest mode ip6gre local ::1 remote ::2 dev lo ip l set up dev gretest ip link add link gretest name vlantest type vlan id 100 Then, the following command will display the address of garp_pdu_rcv: ip maddr show | grep 01:80:c2:00:00:21 Fix the bug by enforcing the type of the underlying device during VLAN device initialization. Fixes: 22bedad3ce11 ("net: convert multicast list to list_head") Reported-by: syzbot+91161fe81857b396c8a0@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/000000000000ca9a81061a01ec20@google.com/ Signed-off-by: Oscar Maes Reviewed-by: Jiri Pirko Link: https://patch.msgid.link/20250303155619.8918-1-oscmaes92@gmail.com Signed-off-by: Jakub Kicinski net/8021q/vlan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 022bfe24aad8937705704ff2e414b100cf0f2e1a Author: Krister Johansen Date: Mon Mar 3 18:10:13 2025 +0100 mptcp: fix 'scheduling while atomic' in mptcp_pm_nl_append_new_local_addr If multiple connection requests attempt to create an implicit mptcp endpoint in parallel, more than one caller may end up in mptcp_pm_nl_append_new_local_addr because none found the address in local_addr_list during their call to mptcp_pm_nl_get_local_id. In this case, the concurrent new_local_addr calls may delete the address entry created by the previous caller. These deletes use synchronize_rcu, but this is not permitted in some of the contexts where this function may be called. During packet recv, the caller may be in a rcu read critical section and have preemption disabled. An example stack: BUG: scheduling while atomic: swapper/2/0/0x00000302 Call Trace: dump_stack_lvl (lib/dump_stack.c:117 (discriminator 1)) dump_stack (lib/dump_stack.c:124) __schedule_bug (kernel/sched/core.c:5943) schedule_debug.constprop.0 (arch/x86/include/asm/preempt.h:33 kernel/sched/core.c:5970) __schedule (arch/x86/include/asm/jump_label.h:27 include/linux/jump_label.h:207 kernel/sched/features.h:29 kernel/sched/core.c:6621) schedule (arch/x86/include/asm/preempt.h:84 kernel/sched/core.c:6804 kernel/sched/core.c:6818) schedule_timeout (kernel/time/timer.c:2160) wait_for_completion (kernel/sched/completion.c:96 kernel/sched/completion.c:116 kernel/sched/completion.c:127 kernel/sched/completion.c:148) __wait_rcu_gp (include/linux/rcupdate.h:311 kernel/rcu/update.c:444) synchronize_rcu (kernel/rcu/tree.c:3609) mptcp_pm_nl_append_new_local_addr (net/mptcp/pm_netlink.c:966 net/mptcp/pm_netlink.c:1061) mptcp_pm_nl_get_local_id (net/mptcp/pm_netlink.c:1164) mptcp_pm_get_local_id (net/mptcp/pm.c:420) subflow_check_req (net/mptcp/subflow.c:98 net/mptcp/subflow.c:213) subflow_v4_route_req (net/mptcp/subflow.c:305) tcp_conn_request (net/ipv4/tcp_input.c:7216) subflow_v4_conn_request (net/mptcp/subflow.c:651) tcp_rcv_state_process (net/ipv4/tcp_input.c:6709) tcp_v4_do_rcv (net/ipv4/tcp_ipv4.c:1934) tcp_v4_rcv (net/ipv4/tcp_ipv4.c:2334) ip_protocol_deliver_rcu (net/ipv4/ip_input.c:205 (discriminator 1)) ip_local_deliver_finish (include/linux/rcupdate.h:813 net/ipv4/ip_input.c:234) ip_local_deliver (include/linux/netfilter.h:314 include/linux/netfilter.h:308 net/ipv4/ip_input.c:254) ip_sublist_rcv_finish (include/net/dst.h:461 net/ipv4/ip_input.c:580) ip_sublist_rcv (net/ipv4/ip_input.c:640) ip_list_rcv (net/ipv4/ip_input.c:675) __netif_receive_skb_list_core (net/core/dev.c:5583 net/core/dev.c:5631) netif_receive_skb_list_internal (net/core/dev.c:5685 net/core/dev.c:5774) napi_complete_done (include/linux/list.h:37 include/net/gro.h:449 include/net/gro.h:444 net/core/dev.c:6114) igb_poll (drivers/net/ethernet/intel/igb/igb_main.c:8244) igb __napi_poll (net/core/dev.c:6582) net_rx_action (net/core/dev.c:6653 net/core/dev.c:6787) handle_softirqs (kernel/softirq.c:553) __irq_exit_rcu (kernel/softirq.c:588 kernel/softirq.c:427 kernel/softirq.c:636) irq_exit_rcu (kernel/softirq.c:651) common_interrupt (arch/x86/kernel/irq.c:247 (discriminator 14)) This problem seems particularly prevalent if the user advertises an endpoint that has a different external vs internal address. In the case where the external address is advertised and multiple connections already exist, multiple subflow SYNs arrive in parallel which tends to trigger the race during creation of the first local_addr_list entries which have the internal address instead. Fix by skipping the replacement of an existing implicit local address if called via mptcp_pm_nl_get_local_id. Fixes: d045b9eb95a9 ("mptcp: introduce implicit endpoints") Cc: stable@vger.kernel.org Suggested-by: Paolo Abeni Signed-off-by: Krister Johansen Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250303-net-mptcp-fix-sched-while-atomic-v1-1-f6a216c5a74c@kernel.org Signed-off-by: Jakub Kicinski net/mptcp/pm_netlink.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 637399bf7e77797811adf340090b561a8f9d1213 Author: Maxime Chevallier Date: Sat Mar 1 15:11:13 2025 +0100 net: ethtool: netlink: Allow NULL nlattrs when getting a phy_device ethnl_req_get_phydev() is used to lookup a phy_device, in the case an ethtool netlink command targets a specific phydev within a netdev's topology. It takes as a parameter a const struct nlattr *header that's used for error handling : if (!phydev) { NL_SET_ERR_MSG_ATTR(extack, header, "no phy matching phyindex"); return ERR_PTR(-ENODEV); } In the notify path after a ->set operation however, there's no request attributes available. The typical callsite for the above function looks like: phydev = ethnl_req_get_phydev(req_base, tb[ETHTOOL_A_XXX_HEADER], info->extack); So, when tb is NULL (such as in the ethnl notify path), we have a nice crash. It turns out that there's only the PLCA command that is in that case, as the other phydev-specific commands don't have a notification. This commit fixes the crash by passing the cmd index and the nlattr array separately, allowing NULL-checking it directly inside the helper. Fixes: c15e065b46dc ("net: ethtool: Allow passing a phy index for some commands") Signed-off-by: Maxime Chevallier Reviewed-by: Kory Maincent Reported-by: Parthiban Veerasooran Link: https://patch.msgid.link/20250301141114.97204-1-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski net/ethtool/cabletest.c | 8 ++++---- net/ethtool/linkstate.c | 2 +- net/ethtool/netlink.c | 6 +++--- net/ethtool/netlink.h | 5 +++-- net/ethtool/phy.c | 2 +- net/ethtool/plca.c | 6 +++--- net/ethtool/pse-pd.c | 4 ++-- net/ethtool/stats.c | 2 +- net/ethtool/strset.c | 2 +- 9 files changed, 19 insertions(+), 18 deletions(-) commit 4c2d14c40a68678d885eab4008a0129646805bae Author: Jiayuan Chen Date: Fri Feb 28 22:14:08 2025 +0800 ppp: Fix KMSAN uninit-value warning with bpf Syzbot caught an "KMSAN: uninit-value" warning [1], which is caused by the ppp driver not initializing a 2-byte header when using socket filter. The following code can generate a PPP filter BPF program: ''' struct bpf_program fp; pcap_t *handle; handle = pcap_open_dead(DLT_PPP_PPPD, 65535); pcap_compile(handle, &fp, "ip and outbound", 0, 0); bpf_dump(&fp, 1); ''' Its output is: ''' (000) ldh [2] (001) jeq #0x21 jt 2 jf 5 (002) ldb [0] (003) jeq #0x1 jt 4 jf 5 (004) ret #65535 (005) ret #0 ''' Wen can find similar code at the following link: https://github.com/ppp-project/ppp/blob/master/pppd/options.c#L1680 The maintainer of this code repository is also the original maintainer of the ppp driver. As you can see the BPF program skips 2 bytes of data and then reads the 'Protocol' field to determine if it's an IP packet. Then it read the first byte of the first 2 bytes to determine the direction. The issue is that only the first byte indicating direction is initialized in current ppp driver code while the second byte is not initialized. For normal BPF programs generated by libpcap, uninitialized data won't be used, so it's not a problem. However, for carefully crafted BPF programs, such as those generated by syzkaller [2], which start reading from offset 0, the uninitialized data will be used and caught by KMSAN. [1] https://syzkaller.appspot.com/bug?extid=853242d9c9917165d791 [2] https://syzkaller.appspot.com/text?tag=ReproC&x=11994913980000 Cc: Paul Mackerras Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+853242d9c9917165d791@syzkaller.appspotmail.com Closes: https://lore.kernel.org/bpf/000000000000dea025060d6bc3bc@google.com/ Signed-off-by: Jiayuan Chen Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250228141408.393864-1-jiayuan.chen@linux.dev Signed-off-by: Jakub Kicinski drivers/net/ppp/ppp_generic.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 78da8ab86e798c7533bf49cdccb39e5cfedcb77f Merge: 3c6a041b317a 934e69669e32 Author: Jakub Kicinski Date: Tue Mar 4 16:19:24 2025 -0800 Merge branch 'fixes-for-ipa-v4-7' Luca Weiss says: ==================== Fixes for IPA v4.7 During bringup of IPA v4.7 unfortunately some bits were missed, and it couldn't be tested much back then due to missing features in tqftpserv which caused the modem to not enable correctly. Especially the last commit is important since it makes mobile data actually functional on SoCs with IPA v4.7 like SM6350 - used on the Fairphone 4. Before that, you'd get an IP address on the interface but then e.g. ping never got any response back. ==================== Link: https://patch.msgid.link/20250227-ipa-v4-7-fixes-v1-0-a88dd8249d8a@fairphone.com Signed-off-by: Jakub Kicinski commit 934e69669e32eb653234898424ae007bae2f636e Author: Luca Weiss Date: Thu Feb 27 11:33:42 2025 +0100 net: ipa: Enable checksum for IPA_ENDPOINT_AP_MODEM_{RX,TX} for v4.7 Enable the checksum option for these two endpoints in order to allow mobile data to actually work. Without this, no packets seem to make it through the IPA. Fixes: b310de784bac ("net: ipa: add IPA v4.7 support") Signed-off-by: Luca Weiss Reviewed-by: Alex Elder Link: https://patch.msgid.link/20250227-ipa-v4-7-fixes-v1-3-a88dd8249d8a@fairphone.com Signed-off-by: Jakub Kicinski drivers/net/ipa/data/ipa_data-v4.7.c | 2 ++ 1 file changed, 2 insertions(+) commit 6a2843aaf551d87beb92d774f7d5b8ae007fe774 Author: Luca Weiss Date: Thu Feb 27 11:33:41 2025 +0100 net: ipa: Fix QSB data for v4.7 As per downstream reference, max_writes should be 12 and max_reads should be 13. Fixes: b310de784bac ("net: ipa: add IPA v4.7 support") Signed-off-by: Luca Weiss Reviewed-by: Alex Elder Link: https://patch.msgid.link/20250227-ipa-v4-7-fixes-v1-2-a88dd8249d8a@fairphone.com Signed-off-by: Jakub Kicinski drivers/net/ipa/data/ipa_data-v4.7.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5eb3dc1396aa7e315486b24df80df782912334b7 Author: Luca Weiss Date: Thu Feb 27 11:33:40 2025 +0100 net: ipa: Fix v4.7 resource group names In the downstream IPA driver there's only one group defined for source and destination, and the destination group doesn't have a _DPL suffix. Fixes: b310de784bac ("net: ipa: add IPA v4.7 support") Signed-off-by: Luca Weiss Reviewed-by: Alex Elder Link: https://patch.msgid.link/20250227-ipa-v4-7-fixes-v1-1-a88dd8249d8a@fairphone.com Signed-off-by: Jakub Kicinski drivers/net/ipa/data/ipa_data-v4.7.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit db52926fb0be40e1d588a346df73f5ea3a34a4c6 Author: Even Xu Date: Tue Mar 4 11:22:55 2025 +0800 HID: Intel-thc-hid: Intel-quickspi: Correct device state after S4 During S4 retore flow, quickspi device was resetted by driver and state was changed to RESETTED. It is needed to be change to ENABLED state after S4 re-initialization finished, otherwise, device will run in wrong state and HID input data will be dropped. Signed-off-by: Even Xu Fixes: 6912aaf3fd24 ("HID: intel-thc-hid: intel-quickspi: Add PM implementation") Signed-off-by: Jiri Kosina drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c | 2 ++ 1 file changed, 2 insertions(+) commit 0132c406705a466b95854ce1058f3d8354f90a42 Author: Colin Ian King Date: Fri Feb 28 08:41:39 2025 +0000 HID: intel-thc-hid: Fix spelling mistake "intput" -> "input" There is a spelling mistake in a dev_err_once message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Even Xu Signed-off-by: Jiri Kosina drivers/hid/intel-thc-hid/intel-quickspi/quickspi-protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e53fc232a65f7488ab75d03a5b95f06aaada7262 Author: Vicki Pfau Date: Thu Feb 27 15:41:33 2025 -0800 HID: hid-steam: Fix use-after-free when detaching device When a hid-steam device is removed it must clean up the client_hdev used for intercepting hidraw access. This can lead to scheduling deferred work to reattach the input device. Though the cleanup cancels the deferred work, this was done before the client_hdev itself is cleaned up, so it gets rescheduled. This patch fixes the ordering to make sure the deferred work is properly canceled. Reported-by: syzbot+0154da2d403396b2bd59@syzkaller.appspotmail.com Fixes: 79504249d7e2 ("HID: hid-steam: Move hidraw input (un)registering to work") Signed-off-by: Vicki Pfau Signed-off-by: Jiri Kosina drivers/hid/hid-steam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6a4f4e9b8018806cca30049b59a1c3c8b513701 Author: Colin Ian King Date: Thu Feb 27 22:33:57 2025 +0000 HID: debug: Fix spelling mistake "Messanger" -> "Messenger" There is a spelling mistake in a literal string. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Jiri Kosina drivers/hid/hid-debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ff5baa9b5275e3acafdf7f2089f74cccb2f38d1 Author: Daniil Dulov Date: Mon Feb 24 20:30:30 2025 +0300 HID: appleir: Fix potential NULL dereference at raw event handle Syzkaller reports a NULL pointer dereference issue in input_event(). BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: null-ptr-deref in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] BUG: KASAN: null-ptr-deref in is_event_supported drivers/input/input.c:67 [inline] BUG: KASAN: null-ptr-deref in input_event+0x42/0xa0 drivers/input/input.c:395 Read of size 8 at addr 0000000000000028 by task syz-executor199/2949 CPU: 0 UID: 0 PID: 2949 Comm: syz-executor199 Not tainted 6.13.0-rc4-syzkaller-00076-gf097a36ef88d #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+0x116/0x1f0 lib/dump_stack.c:120 kasan_report+0xd9/0x110 mm/kasan/report.c:602 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:68 [inline] _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] is_event_supported drivers/input/input.c:67 [inline] input_event+0x42/0xa0 drivers/input/input.c:395 input_report_key include/linux/input.h:439 [inline] key_down drivers/hid/hid-appleir.c:159 [inline] appleir_raw_event+0x3e5/0x5e0 drivers/hid/hid-appleir.c:232 __hid_input_report.constprop.0+0x312/0x440 drivers/hid/hid-core.c:2111 hid_ctrl+0x49f/0x550 drivers/hid/usbhid/hid-core.c:484 __usb_hcd_giveback_urb+0x389/0x6e0 drivers/usb/core/hcd.c:1650 usb_hcd_giveback_urb+0x396/0x450 drivers/usb/core/hcd.c:1734 dummy_timer+0x17f7/0x3960 drivers/usb/gadget/udc/dummy_hcd.c:1993 __run_hrtimer kernel/time/hrtimer.c:1739 [inline] __hrtimer_run_queues+0x20a/0xae0 kernel/time/hrtimer.c:1803 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1820 handle_softirqs+0x206/0x8d0 kernel/softirq.c:561 __do_softirq kernel/softirq.c:595 [inline] invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0xfa/0x160 kernel/softirq.c:662 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 __mod_timer+0x8f6/0xdc0 kernel/time/timer.c:1185 add_timer+0x62/0x90 kernel/time/timer.c:1295 schedule_timeout+0x11f/0x280 kernel/time/sleep_timeout.c:98 usbhid_wait_io+0x1c7/0x380 drivers/hid/usbhid/hid-core.c:645 usbhid_init_reports+0x19f/0x390 drivers/hid/usbhid/hid-core.c:784 hiddev_ioctl+0x1133/0x15b0 drivers/hid/usbhid/hiddev.c:794 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+0x190/0x200 fs/ioctl.c:892 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 This happens due to the malformed report items sent by the emulated device which results in a report, that has no fields, being added to the report list. Due to this appleir_input_configured() is never called, hidinput_connect() fails which results in the HID_CLAIMED_INPUT flag is not being set. However, it does not make appleir_probe() fail and lets the event callback to be called without the associated input device. Thus, add a check for the HID_CLAIMED_INPUT flag and leave the event hook early if the driver didn't claim any input_dev for some reason. Moreover, some other hid drivers accessing input_dev in their event callbacks do have similar checks, too. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 9a4a5574ce42 ("HID: appleir: add support for Apple ir devices") Cc: stable@vger.kernel.org Signed-off-by: Daniil Dulov Signed-off-by: Jiri Kosina drivers/hid/hid-appleir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 221cea1003d8a412e5ec64a58df7ab19b654f490 Author: Alex Henrie Date: Sun Feb 23 22:36:30 2025 -0700 HID: apple: disable Fn key handling on the Omoton KB066 Remove the fixup to make the Omoton KB066's F6 key F6 when not holding Fn. That was really just a hack to allow typing F6 in fnmode>0, and it didn't fix any of the other F keys that were likewise untypable in fnmode>0. Instead, because the Omoton's Fn key is entirely internal to the keyboard, completely disable Fn key translation when an Omoton is detected, which will prevent the hid-apple driver from interfering with the keyboard's built-in Fn key handling. All of the F keys, including F6, are then typable when Fn is held. The Omoton KB066 and the Apple A1255 both have HID product code 05ac:022c. The self-reported name of every original A1255 when they left the factory was "Apple Wireless Keyboard". By default, Mac OS changes the name to "'s keyboard" when pairing with the keyboard, but Mac OS allows the user to set the internal name of Apple keyboards to anything they like. The Omoton KB066's name, on the other hand, is not configurable: It is always "Bluetooth Keyboard". Because that name is so generic that a user might conceivably use the same name for a real Apple keyboard, detect Omoton keyboards based on both having that exact name and having HID product code 022c. Fixes: 819083cb6eed ("HID: apple: fix up the F6 key on the Omoton KB066 keyboard") Signed-off-by: Alex Henrie Reviewed-by: Aditya Garg Signed-off-by: Jiri Kosina drivers/hid/hid-apple.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 723aa55c08c9d1e0734e39a815fd41272eac8269 Author: Wentao Guan Date: Fri Feb 14 19:04:18 2025 +0800 HID: i2c-hid: improve i2c_hid_get_report error message We have two places to print "failed to set a report to ...", use "get a report from" instead of "set a report to", it makes people who knows less about the module to know where the error happened. Before: i2c_hid_acpi i2c-FTSC1000:00: failed to set a report to device: -11 After: i2c_hid_acpi i2c-FTSC1000:00: failed to get a report from device: -11 Signed-off-by: Wentao Guan Signed-off-by: Jiri Kosina drivers/hid/i2c-hid/i2c-hid-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a43102daf64dd0d172d8b39836dbc1dba4da1ea Author: Mario Limonciello Date: Fri Feb 28 11:01:55 2025 -0600 platform/x86/amd: pmf: Add balanced-performance to hidden choices Acer's WMI driver uses balanced-performance but AMD-PMF doesn't. In case a machine binds with both drivers let amd-pmf use balanced-performance as well. Fixes: 688834743d67 ("ACPI: platform_profile: Allow multiple handlers") Suggested-by: Antheas Kapenekakis Signed-off-by: Mario Limonciello Tested-by: Antheas Kapenekakis Tested-by: Derek J. Clark Acked-by: Ilpo Järvinen Link: https://patch.msgid.link/20250228170155.2623386-4-superm1@kernel.org Signed-off-by: Rafael J. Wysocki drivers/platform/x86/amd/pmf/sps.c | 2 ++ 1 file changed, 2 insertions(+) commit 44e94fece5170ed9110564efec592d0e88830a28 Author: Mario Limonciello Date: Fri Feb 28 11:01:54 2025 -0600 platform/x86/amd: pmf: Add 'quiet' to hidden choices When amd-pmf and asus-wmi are both bound no low power option shows up in sysfs. Add a hidden choice for amd-pmf to support 'quiet' mode to let both bind. Fixes: 688834743d67 ("ACPI: platform_profile: Allow multiple handlers") Suggested-by: Antheas Kapenekakis Signed-off-by: Mario Limonciello Tested-by: Antheas Kapenekakis Tested-by: Derek J. Clark Acked-by: Ilpo Järvinen Link: https://patch.msgid.link/20250228170155.2623386-3-superm1@kernel.org Signed-off-by: Rafael J. Wysocki drivers/platform/x86/amd/pmf/sps.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 778b94d7ac17b5800aa857222911f09cc986b509 Author: Mario Limonciello Date: Fri Feb 28 11:01:53 2025 -0600 ACPI: platform_profile: Add support for hidden choices When two drivers don't support all the same profiles the legacy interface only exports the common profiles. This causes problems for cases where one driver uses low-power but another uses quiet because the result is that neither is exported to sysfs. To allow two drivers to disagree, add support for "hidden choices". Hidden choices are platform profiles that a driver supports to be compatible with the platform profile of another driver. Fixes: 688834743d67 ("ACPI: platform_profile: Allow multiple handlers") Reported-by: Antheas Kapenekakis Closes: https://lore.kernel.org/platform-driver-x86/e64b771e-3255-42ad-9257-5b8fc6c24ac9@gmx.de/T/#mc068042dd29df36c16c8af92664860fc4763974b Signed-off-by: Mario Limonciello Tested-by: Antheas Kapenekakis Tested-by: Derek J. Clark Acked-by: Ilpo Järvinen Link: https://patch.msgid.link/20250228170155.2623386-2-superm1@kernel.org Signed-off-by: Rafael J. Wysocki drivers/acpi/platform_profile.c | 94 +++++++++++++++++++++++++++++++--------- include/linux/platform_profile.h | 3 ++ 2 files changed, 76 insertions(+), 21 deletions(-) commit 54f94dc7f6b4db45dbc23b4db3d20c7194e2c54f Author: Tvrtko Ursulin Date: Thu Feb 27 10:13:00 2025 +0000 drm/xe: Fix GT "for each engine" workarounds Any rules using engine matching are currently broken due RTP processing happening too in early init, before the list of hardware engines has been initialised. Fix this by moving workaround processing to later in the driver probe sequence, to just before the processed list is used for the first time. Looking at the debugfs gt0/workarounds on ADL-P we notice 14011060649 should be present while we see, before: GT Workarounds 14011059788 14015795083 And with the patch: GT Workarounds 14011060649 14011059788 14015795083 Signed-off-by: Tvrtko Ursulin Cc: Lucas De Marchi Cc: Matt Roper Cc: stable@vger.kernel.org # v6.11+ Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20250227101304.46660-2-tvrtko.ursulin@igalia.com Signed-off-by: Lucas De Marchi (cherry picked from commit 25d434cef791e03cf40680f5441b576c639bfa84) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_gt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 475d06e00b7496c7915d87f7ae67af26738e4649 Author: Matthew Auld Date: Wed Feb 26 17:47:49 2025 +0000 drm/xe/userptr: properly setup pfn_flags_mask Currently we just leave it uninitialised, which at first looks harmless, however we also don't zero out the pfn array, and with pfn_flags_mask the idea is to be able set individual flags for a given range of pfn or completely ignore them, outside of default_flags. So here we end up with pfn[i] & pfn_flags_mask, and if both are uninitialised we might get back an unexpected flags value, like asking for read only with default_flags, but getting back write on top, leading to potentially bogus behaviour. To fix this ensure we zero the pfn_flags_mask, such that hmm only considers the default_flags and not also the initial pfn[i] value. v2 (Thomas): - Prefer proper initializer. Fixes: 81e058a3e7fd ("drm/xe: Introduce helper to populate userptr") Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: Thomas Hellström Cc: # v6.10+ Reviewed-by: Thomas Hellström Reviewed-by: Tejas Upadhyay Link: https://patchwork.freedesktop.org/patch/msgid/20250226174748.294285-2-matthew.auld@intel.com (cherry picked from commit dd8c01e42f4c5c1eaf02f003d7d588ba6706aa71) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_hmm.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit d1039a3c12fffe501c5379c7eb1372eaab318e0a Author: Jani Nikula Date: Wed Feb 26 15:56:26 2025 +0200 drm/i915/mst: update max stream count to match number of pipes We create the stream encoders and attach connectors for each pipe we have. As the number of pipes has increased, we've failed to update the topology manager maximum number of payloads to match that. Bump up the max stream count to match number of pipes, enabling the fourth stream on platforms that support four pipes. Cc: stable@vger.kernel.org Cc: Imre Deak Cc: Ville Syrjala Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250226135626.1956012-1-jani.nikula@intel.com Signed-off-by: Jani Nikula (cherry picked from commit 15bccbfb78d63a2a621b30caff8b9424160c6c89) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 30bfc151f0c1ec80c27a80a7651b2c15c648ad16 Author: Maarten Lankhorst Date: Tue Dec 10 09:31:02 2024 +0100 drm/xe: Remove double pageflip This is already handled below in the code by fixup_initial_plane_config. Fixes: a8153627520a ("drm/i915: Try to relocate the BIOS fb to the start of ggtt") Cc: Ville Syrjälä Reviewed-by: Vinod Govindapillai Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20241210083111.230484-3-dev@lankhorst.se Signed-off-by: Maarten Lankhorst (cherry picked from commit 2218704997979fbf11765281ef752f07c5cf25bb) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/display/xe_plane_initial.c | 10 ---------- 1 file changed, 10 deletions(-) commit dd0b7d4a56e3349de65bf9752734510fb55baf29 Author: Satoru Takeuchi Date: Fri Feb 28 20:37:08 2025 +0900 docs: Kconfig: fix defconfig description Commit 2a86f6612164 ("kbuild: use KBUILD_DEFCONFIG as the fallback for DEFCONFIG_LIST") removed arch/$ARCH/defconfig; however, the document has not been updated to reflect this change yet. Signed-off-by: Satoru Takeuchi Signed-off-by: Masahiro Yamada Documentation/admin-guide/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02e9a22ceef0227175e391902d8760425fa072c6 Author: Arnd Bergmann Date: Tue Feb 25 11:00:31 2025 +0100 kbuild: hdrcheck: fix cross build with clang The headercheck tries to call clang with a mix of compiler arguments that don't include the target architecture. When building e.g. x86 headers on arm64, this produces a warning like clang: warning: unknown platform, assuming -mfloat-abi=soft Add in the KBUILD_CPPFLAGS, which contain the target, in order to make it build properly. See also 1b71c2fb04e7 ("kbuild: userprogs: fix bitsize and target detection on clang"). Reviewed-by: Nathan Chancellor Fixes: feb843a469fb ("kbuild: add $(CLANG_FLAGS) to KBUILD_CPPFLAGS") Signed-off-by: Arnd Bergmann usr/include/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48a5eed9ad584315c30ed35204510536235ce402 Merge: 3d252160b818 75f1f311d883 Author: Linus Torvalds Date: Tue Mar 4 09:04:29 2025 -1000 Merge tag 'devicetree-fixes-for-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fix from Rob Herring: - Revert reserved-memory 'alignment' property to use '#address-cells' instead of '#size-cells'. What's in use trumps the spec. * tag 'devicetree-fixes-for-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: Revert "of: reserved-memory: Fix using wrong number of cells to get property 'alignment'" commit dfc1b168a8c4b376fa222b27b97c2c4ad4b786e1 Author: Thomas Weißschuh Date: Mon Feb 17 08:27:54 2025 +0100 kbuild: userprogs: use correct lld when linking through clang The userprog infrastructure links objects files through $(CC). Either explicitly by manually calling $(CC) on multiple object files or implicitly by directly compiling a source file to an executable. The documentation at Documentation/kbuild/llvm.rst indicates that ld.lld would be used for linking if LLVM=1 is specified. However clang instead will use either a globally installed cross linker from $PATH called ${target}-ld or fall back to the system linker, which probably does not support crosslinking. For the normal kernel build this is not an issue because the linker is always executed directly, without the compiler being involved. Explicitly pass --ld-path to clang so $(LD) is respected. As clang 13.0.1 is required to build the kernel, this option is available. Fixes: 7f3a59db274c ("kbuild: add infrastructure to build userspace programs") Cc: stable@vger.kernel.org # needs wrapping in $(cc-option) for < 6.9 Signed-off-by: Thomas Weißschuh Reviewed-by: Nathan Chancellor Signed-off-by: Masahiro Yamada Makefile | 5 +++++ 1 file changed, 5 insertions(+) commit 3d252160b818045f3a152b13756f6f37ca34639d Author: Linus Torvalds Date: Tue Mar 4 13:51:38 2025 +0000 fs/pipe: Read pipe->{head,tail} atomically outside pipe->mutex pipe_readable(), pipe_writable(), and pipe_poll() can read "pipe->head" and "pipe->tail" outside of "pipe->mutex" critical section. When the head and the tail are read individually in that order, there is a window for interruption between the two reads in which both the head and the tail can be updated by concurrent readers and writers. One of the problematic scenarios observed with hackbench running multiple groups on a large server on a particular pipe inode is as follows: pipe->head = 36 pipe->tail = 36 hackbench-118762 [057] ..... 1029.550548: pipe_write: *wakes up: pipe not full* hackbench-118762 [057] ..... 1029.550548: pipe_write: head: 36 -> 37 [tail: 36] hackbench-118762 [057] ..... 1029.550548: pipe_write: *wake up next reader 118740* hackbench-118762 [057] ..... 1029.550548: pipe_write: *wake up next writer 118768* hackbench-118768 [206] ..... 1029.55055X: pipe_write: *writer wakes up* hackbench-118768 [206] ..... 1029.55055X: pipe_write: head = READ_ONCE(pipe->head) [37] ... CPU 206 interrupted (exact wakeup was not traced but 118768 did read head at 37 in traces) hackbench-118740 [057] ..... 1029.550558: pipe_read: *reader wakes up: pipe is not empty* hackbench-118740 [057] ..... 1029.550558: pipe_read: tail: 36 -> 37 [head = 37] hackbench-118740 [057] ..... 1029.550559: pipe_read: *pipe is empty; wakeup writer 118768* hackbench-118740 [057] ..... 1029.550559: pipe_read: *sleeps* hackbench-118766 [185] ..... 1029.550592: pipe_write: *New writer comes in* hackbench-118766 [185] ..... 1029.550592: pipe_write: head: 37 -> 38 [tail: 37] hackbench-118766 [185] ..... 1029.550592: pipe_write: *wakes up reader 118766* hackbench-118740 [185] ..... 1029.550598: pipe_read: *reader wakes up; pipe not empty* hackbench-118740 [185] ..... 1029.550599: pipe_read: tail: 37 -> 38 [head: 38] hackbench-118740 [185] ..... 1029.550599: pipe_read: *pipe is empty* hackbench-118740 [185] ..... 1029.550599: pipe_read: *reader sleeps; wakeup writer 118768* ... CPU 206 switches back to writer hackbench-118768 [206] ..... 1029.550601: pipe_write: tail = READ_ONCE(pipe->tail) [38] hackbench-118768 [206] ..... 1029.550601: pipe_write: pipe_full()? (u32)(37 - 38) >= 16? Yes hackbench-118768 [206] ..... 1029.550601: pipe_write: *writer goes back to sleep* [ Tasks 118740 and 118768 can then indefinitely wait on each other. ] The unsigned arithmetic in pipe_occupancy() wraps around when "pipe->tail > pipe->head" leading to pipe_full() returning true despite the pipe being empty. The case of genuine wraparound of "pipe->head" is handled since pipe buffer has data allowing readers to make progress until the pipe->tail wraps too after which the reader will wakeup a sleeping writer, however, mistaking the pipe to be full when it is in fact empty can lead to readers and writers waiting on each other indefinitely. This issue became more problematic and surfaced as a hang in hackbench after the optimization in commit aaec5a95d596 ("pipe_read: don't wake up the writer if the pipe is still full") significantly reduced the number of spurious wakeups of writers that had previously helped mask the issue. To avoid missing any updates between the reads of "pipe->head" and "pipe->write", unionize the two with a single unsigned long "pipe->head_tail" member that can be loaded atomically. Using "pipe->head_tail" to read the head and the tail ensures the lockless checks do not miss any updates to the head or the tail and since those two are only updated under "pipe->mutex", it ensures that the head is always ahead of, or equal to the tail resulting in correct calculations. [ prateek: commit log, testing on x86 platforms. ] Reported-and-debugged-by: Swapnil Sapkal Closes: https://lore.kernel.org/lkml/e813814e-7094-4673-bc69-731af065a0eb@amd.com/ Reported-by: Alexey Gladkov Closes: https://lore.kernel.org/all/Z8Wn0nTvevLRG_4m@example.org/ Fixes: 8cefc107ca54 ("pipe: Use head and tail pointers for the ring, not cursor and length") Tested-by: Swapnil Sapkal Reviewed-by: Oleg Nesterov Tested-by: Alexey Gladkov Signed-off-by: K Prateek Nayak Signed-off-by: Linus Torvalds fs/pipe.c | 19 ++++++++----------- include/linux/pipe_fs_i.h | 39 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 13 deletions(-) commit f9dc8fb3afc968042bdaf4b6e445a9272071c9f3 Author: Xiaoyao Li Date: Tue Mar 4 03:23:14 2025 -0500 KVM: x86: Explicitly zero EAX and EBX when PERFMON_V2 isn't supported by KVM Fix a goof where KVM sets CPUID.0x80000022.EAX to CPUID.0x80000022.EBX instead of zeroing both when PERFMON_V2 isn't supported by KVM. In practice, barring a buggy CPU (or vCPU model when running nested) only the !enable_pmu case is affected, as KVM always supports PERFMON_V2 if it's available in hardware, i.e. CPUID.0x80000022.EBX will be '0' if PERFMON_V2 is unsupported. For the !enable_pmu case, the bug is relatively benign as KVM will refuse to enable PMU capabilities, but a VMM that reflects KVM's supported CPUID into the guest could inadvertently induce #GPs in the guest due to advertising support for MSRs that KVM refuses to emulate. Fixes: 94cdeebd8211 ("KVM: x86/cpuid: Add AMD CPUID ExtPerfMonAndDbg leaf 0x80000022") Signed-off-by: Xiaoyao Li Link: https://lore.kernel.org/r/20250304082314.472202-3-xiaoyao.li@intel.com [sean: massage shortlog and changelog, tag for stable] Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c6a041b317a9bb0c707343c0b99d2a29d523390 Merge: b7365eab3983 1f860eb4cdda Author: Jakub Kicinski Date: Tue Mar 4 08:48:32 2025 -0800 Merge tag 'wireless-2025-03-04' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== bugfixes for 6.14: * regressions from this cycle: - mac80211: fix sparse warning for monitor - nl80211: disable multi-link reconfiguration (needs fixing) * older issues: - cfg80211: reject badly combined cooked monitor, fix regulatory hint validity checks - mac80211: handle TXQ flush w/o driver per-sta flush, fix debugfs for monitor, fix element inheritance - iwlwifi: fix rfkill, dead firmware handling, rate API version, free A-MSDU handling, avoid large allocations, fix string format - brcmfmac: fix power handling on some boards * tag 'wireless-2025-03-04' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: nl80211: disable multi-link reconfiguration wifi: cfg80211: regulatory: improve invalid hints checking wifi: brcmfmac: keep power during suspend if board requires it wifi: mac80211: Fix sparse warning for monitor_sdata wifi: mac80211: fix vendor-specific inheritance wifi: mac80211: fix MLE non-inheritance parsing wifi: iwlwifi: Fix A-MSDU TSO preparation wifi: iwlwifi: Free pages allocated when failing to build A-MSDU wifi: iwlwifi: limit printed string from FW file wifi: iwlwifi: mvm: use the right version of the rate API wifi: iwlwifi: mvm: don't try to talk to a dead firmware wifi: iwlwifi: mvm: don't dump the firmware state upon RFKILL while suspend wifi: iwlwifi: mvm: clean up ROC on failure wifi: iwlwifi: fw: avoid using an uninitialized variable wifi: iwlwifi: fw: allocate chained SG tables for dump wifi: mac80211: remove debugfs dir for virtual monitor wifi: mac80211: Cleanup sta TXQs on flush wifi: nl80211: reject cooked mode if it is set along with other flags ==================== Link: https://patch.msgid.link/20250304124435.126272-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit b4a1dec11793936ffe1a9fb811724532ff3b1174 Author: Sumanth Korikkar Date: Mon Feb 24 12:27:04 2025 +0100 s390/ftrace: Fix return address recovery of traced function When fgraph is enabled the traced function return address is replaced with trampoline return_to_handler(). The original return address of the traced function is saved in per task return stack along with a stack pointer for reliable stack unwinding via function_graph_enter_regs(). During stack unwinding e.g. for livepatching, ftrace_graph_ret_addr() identifies the original return address of the traced function with the saved stack pointer. With a recent change, the stack pointers passed to ftrace_graph_ret_addr() and function_graph_enter_regs() do not match anymore, and therefore the original return address is not found. Pass the correct stack pointer to function_graph_enter_regs() to fix this. Fixes: 7495e179b478 ("s390/tracing: Enable HAVE_FTRACE_GRAPH_FUNC") Reviewed-by: Heiko Carstens Signed-off-by: Sumanth Korikkar Signed-off-by: Vasily Gorbik arch/s390/kernel/ftrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a22ee38d2efe18edc53791fd1036396c23b43ad0 Author: Thomas Weißschuh Date: Mon Feb 17 14:04:18 2025 +0100 selftests/vDSO: Fix GNU hash table entry size for s390x Commit 14be4e6f3522 ("selftests: vDSO: fix ELF hash table entry size for s390x") changed the type of the ELF hash table entries to 64bit on s390x. However the *GNU* hash tables entries are always 32bit. The "bucket" pointer is shared between both hash algorithms. On s390, this caused the GNU hash algorithm to access its 32-bit entries as if they were 64-bit, triggering compiler warnings (assignment between "Elf64_Xword *" and "Elf64_Word *") and runtime crashes. Introduce a new dedicated "gnu_bucket" pointer which is used by the GNU hash. Fixes: e0746bde6f82 ("selftests/vDSO: support DT_GNU_HASH") Reviewed-by: Jens Remus Signed-off-by: Thomas Weißschuh Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20250217-selftests-vdso-s390-gnu-hash-v2-1-f6c2532ffe2a@linutronix.de Signed-off-by: Vasily Gorbik tools/testing/selftests/vDSO/parse_vdso.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5623bc23a1cb9f9a9470fa73b3a20321dc4c4870 Author: Heiko Carstens Date: Tue Feb 25 10:53:10 2025 +0100 s390/traps: Fix test_monitor_call() inline assembly The test_monitor_call() inline assembly uses the xgr instruction, which also modifies the condition code, to clear a register. However the clobber list of the inline assembly does not specify that the condition code is modified, which may lead to incorrect code generation. Use the lhi instruction instead to clear the register without that the condition code is modified. Furthermore this limits clearing to the lower 32 bits of val, since its type is int. Fixes: 17248ea03674 ("s390: fix __EMIT_BUG() macro") Cc: stable@vger.kernel.org Reviewed-by: Juergen Christ Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik arch/s390/kernel/traps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d0bbe332669c5db32c8c92bc967f8e7f8d460ddf Author: Arnd Bergmann Date: Tue Mar 4 15:25:55 2025 +0100 ALSA: hda: realtek: fix incorrect IS_REACHABLE() usage The alternative path leads to a build error after a recent change: sound/pci/hda/patch_realtek.c: In function 'alc233_fixup_lenovo_low_en_micmute_led': include/linux/stddef.h:9:14: error: called object is not a function or function pointer 9 | #define NULL ((void *)0) | ^ sound/pci/hda/patch_realtek.c:5041:49: note: in expansion of macro 'NULL' 5041 | #define alc233_fixup_lenovo_line2_mic_hotkey NULL | ^~~~ sound/pci/hda/patch_realtek.c:5063:9: note: in expansion of macro 'alc233_fixup_lenovo_line2_mic_hotkey' 5063 | alc233_fixup_lenovo_line2_mic_hotkey(codec, fix, action); Using IS_REACHABLE() is somewhat questionable here anyway since it leads to the input code not working when the HDA driver is builtin but input is in a loadable module. Replace this with a hard compile-time dependency on CONFIG_INPUT. In practice this won't chance much other than solve the compiler error because it is rare to require sound output but no input support. Fixes: f603b159231b ("ALSA: hda/realtek - add supported Mic Mute LED for Lenovo platform") Signed-off-by: Arnd Bergmann Link: https://patch.msgid.link/20250304142620.582191-1-arnd@kernel.org Signed-off-by: Takashi Iwai sound/pci/hda/Kconfig | 1 + sound/pci/hda/patch_realtek.c | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) commit 164b7dd4546b57c08b373e9e3cf315ff98cb032d Author: Maciej Strozek Date: Tue Mar 4 14:05:04 2025 +0000 ASoC: cs42l43: Add jack delay debounce after suspend Hardware reports jack absent after reset/suspension regardless of jack state, so introduce an additional delay only in suspension case to allow proper detection to take place after a short delay. Signed-off-by: Maciej Strozek Reviewed-by: Charles Keepax Link: https://patch.msgid.link/20250304140504.139245-1-mstrozek@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs42l43-jack.c | 13 ++++++++++--- sound/soc/codecs/cs42l43.c | 15 ++++++++++++++- sound/soc/codecs/cs42l43.h | 3 +++ 3 files changed, 27 insertions(+), 4 deletions(-) commit c7c1f3b05c67173f462d73d301d572b3f9e57e3b Author: Michal Pecio Date: Tue Mar 4 13:31:47 2025 +0200 usb: xhci: Fix host controllers "dying" after suspend and resume A recent cleanup went a bit too far and dropped clearing the cycle bit of link TRBs, so it stays different from the rest of the ring half of the time. Then a race occurs: if the xHC reaches such link TRB before more commands are queued, the link's cycle bit unintentionally matches the xHC's cycle so it follows the link and waits for further commands. If more commands are queued before the xHC gets there, inc_enq() flips the bit so the xHC later sees a mismatch and stops executing commands. This function is called before suspend and 50% of times after resuming the xHC is doomed to get stuck sooner or later. Then some Stop Endpoint command fails to complete in 5 seconds and this shows up xhci_hcd 0000:00:10.0: xHCI host not responding to stop endpoint command xhci_hcd 0000:00:10.0: xHCI host controller not responding, assume dead xhci_hcd 0000:00:10.0: HC died; cleaning up followed by loss of all USB decives on the affected bus. That's if you are lucky, because if Set Deq gets stuck instead, the failure is silent. Likely responsible for kernel bug 219824. I found this while searching for possible causes of that regression and reproduced it locally before hearing back from the reporter. To repro, simply wait for link cycle to become set (debugfs), then suspend, resume and wait. To accelerate the failure I used a script which repeatedly starts and stops a UVC camera. Some HCs get fully reinitialized on resume and they are not affected. Link: https://bugzilla.kernel.org/show_bug.cgi?id=219824 Fixes: 36b972d4b7ce ("usb: xhci: improve xhci_clear_command_ring()") Cc: stable@vger.kernel.org Signed-off-by: Michal Pecio Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250304113147.3322584-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b7365eab39831487a84e63a9638209b68dc54008 Author: Peiyang Wang Date: Fri Feb 28 18:52:58 2025 +0800 net: hns3: make sure ptp clock is unregister and freed if hclge_ptp_get_cycle returns an error During the initialization of ptp, hclge_ptp_get_cycle might return an error and returned directly without unregister clock and free it. To avoid that, call hclge_ptp_destroy_clock to unregist and free clock if hclge_ptp_get_cycle failed. Fixes: 8373cd38a888 ("net: hns3: change the method of obtaining default ptp cycle") Signed-off-by: Peiyang Wang Signed-off-by: Jijie Shao Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250228105258.1243461-1-shaojijie@huawei.com Signed-off-by: Paolo Abeni drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f860eb4cdda634589d75e78ff586d5dff20b8af Author: Johannes Berg Date: Mon Mar 3 11:05:36 2025 +0100 wifi: nl80211: disable multi-link reconfiguration Both the APIs in cfg80211 and the implementation in mac80211 aren't really ready yet, we have a large number of fixes. In addition, it's not possible right now to discover support for this feature from userspace. Disable it for now, there's no rush. Link: https://patch.msgid.link/20250303110538.fbeef42a5687.Iab122c22137e5675ebd99f5c031e30c0e5c7af2e@changeid Signed-off-by: Johannes Berg net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c34424eb3be4c01db831428c0d7d483701ae820f Author: Jakub Kicinski Date: Thu Feb 27 16:45:34 2025 -0800 net: dsa: rtl8366rb: don't prompt users for LED control Make NET_DSA_REALTEK_RTL8366RB_LEDS a hidden symbol. It seems very unlikely user would want to intentionally disable it. Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250228004534.3428681-1-kuba@kernel.org Signed-off-by: Paolo Abeni drivers/net/dsa/realtek/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a82d19ca2d6835904ee71e2d40fd331098f94a0 Author: Nikolay Aleksandrov Date: Thu Feb 27 18:41:29 2025 +0200 be2net: fix sleeping while atomic bugs in be_ndo_bridge_getlink Partially revert commit b71724147e73 ("be2net: replace polling with sleeping in the FW completion path") w.r.t mcc mutex it introduces and the use of usleep_range. The be2net be_ndo_bridge_getlink() callback is called with rcu_read_lock, so this code has been broken for a long time. Both the mutex_lock and the usleep_range can cause the issue Ian Kumlien reported[1]. The call path is: be_ndo_bridge_getlink -> be_cmd_get_hsw_config -> be_mcc_notify_wait -> be_mcc_wait_compl -> usleep_range() [1] https://lore.kernel.org/netdev/CAA85sZveppNgEVa_FD+qhOMtG_AavK9_mFiU+jWrMtXmwqefGA@mail.gmail.com/ Tested-by: Ian Kumlien Fixes: b71724147e73 ("be2net: replace polling with sleeping in the FW completion path") Signed-off-by: Nikolay Aleksandrov Link: https://patch.msgid.link/20250227164129.1201164-1-razor@blackwall.org Signed-off-by: Paolo Abeni drivers/net/ethernet/emulex/benet/be.h | 2 +- drivers/net/ethernet/emulex/benet/be_cmds.c | 197 ++++++++++++++-------------- drivers/net/ethernet/emulex/benet/be_main.c | 2 +- 3 files changed, 100 insertions(+), 101 deletions(-) commit f6bdaab79ee4228a143ee1b4cb80416d6ffc0c63 Author: Ahmed S. Darwish Date: Tue Mar 4 09:51:14 2025 +0100 x86/cpu: Properly parse CPUID leaf 0x2 TLB descriptor 0x63 CPUID leaf 0x2's one-byte TLB descriptors report the number of entries for specific TLB types, among other properties. Typically, each emitted descriptor implies the same number of entries for its respective TLB type(s). An emitted 0x63 descriptor is an exception: it implies 4 data TLB entries for 1GB pages and 32 data TLB entries for 2MB or 4MB pages. For the TLB descriptors parsing code, the entry count for 1GB pages is encoded at the intel_tlb_table[] mapping, but the 2MB/4MB entry count is totally ignored. Update leaf 0x2's parsing logic 0x2 to account for 32 data TLB entries for 2MB/4MB pages implied by the 0x63 descriptor. Fixes: e0ba94f14f74 ("x86/tlb_info: get last level TLB entry number of CPU") Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: stable@kernel.org Cc: "H. Peter Anvin" Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250304085152.51092-4-darwi@linutronix.de arch/x86/kernel/cpu/intel.c | 50 ++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 16 deletions(-) commit 1881148215c67151b146450fb89ec22fd92337a7 Author: Ahmed S. Darwish Date: Tue Mar 4 09:51:13 2025 +0100 x86/cpu: Validate CPUID leaf 0x2 EDX output CPUID leaf 0x2 emits one-byte descriptors in its four output registers EAX, EBX, ECX, and EDX. For these descriptors to be valid, the most significant bit (MSB) of each register must be clear. Leaf 0x2 parsing at intel.c only validated the MSBs of EAX, EBX, and ECX, but left EDX unchecked. Validate EDX's most-significant bit as well. Fixes: e0ba94f14f74 ("x86/tlb_info: get last level TLB entry number of CPU") Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: stable@kernel.org Cc: "H. Peter Anvin" Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250304085152.51092-3-darwi@linutronix.de arch/x86/kernel/cpu/intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8177c6bedb7013cf736137da586cf783922309dd Author: Ahmed S. Darwish Date: Tue Mar 4 09:51:12 2025 +0100 x86/cacheinfo: Validate CPUID leaf 0x2 EDX output CPUID leaf 0x2 emits one-byte descriptors in its four output registers EAX, EBX, ECX, and EDX. For these descriptors to be valid, the most significant bit (MSB) of each register must be clear. The historical Git commit: 019361a20f016 ("- pre6: Intel: start to add Pentium IV specific stuff (128-byte cacheline etc)...") introduced leaf 0x2 output parsing. It only validated the MSBs of EAX, EBX, and ECX, but left EDX unchecked. Validate EDX's most-significant bit. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: stable@vger.kernel.org Cc: "H. Peter Anvin" Cc: Linus Torvalds Link: https://lore.kernel.org/r/20250304085152.51092-2-darwi@linutronix.de arch/x86/kernel/cpu/cacheinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfd3df31c9db752234d7d2e09bef2aeabb643ce4 Author: Uladzislau Rezki (Sony) Date: Fri Feb 28 13:13:56 2025 +0100 mm/slab/kvfree_rcu: Switch to WQ_MEM_RECLAIM wq Currently kvfree_rcu() APIs use a system workqueue which is "system_unbound_wq" to driver RCU machinery to reclaim a memory. Recently, it has been noted that the following kernel warning can be observed: workqueue: WQ_MEM_RECLAIM nvme-wq:nvme_scan_work is flushing !WQ_MEM_RECLAIM events_unbound:kfree_rcu_work WARNING: CPU: 21 PID: 330 at kernel/workqueue.c:3719 check_flush_dependency+0x112/0x120 Modules linked in: intel_uncore_frequency(E) intel_uncore_frequency_common(E) skx_edac(E) ... CPU: 21 UID: 0 PID: 330 Comm: kworker/u144:6 Tainted: G E 6.13.2-0_g925d379822da #1 Hardware name: Wiwynn Twin Lakes MP/Twin Lakes Passive MP, BIOS YMM20 02/01/2023 Workqueue: nvme-wq nvme_scan_work RIP: 0010:check_flush_dependency+0x112/0x120 Code: 05 9a 40 14 02 01 48 81 c6 c0 00 00 00 48 8b 50 18 48 81 c7 c0 00 00 00 48 89 f9 48 ... RSP: 0018:ffffc90000df7bd8 EFLAGS: 00010082 RAX: 000000000000006a RBX: ffffffff81622390 RCX: 0000000000000027 RDX: 00000000fffeffff RSI: 000000000057ffa8 RDI: ffff88907f960c88 RBP: 0000000000000000 R08: ffffffff83068e50 R09: 000000000002fffd R10: 0000000000000004 R11: 0000000000000000 R12: ffff8881001a4400 R13: 0000000000000000 R14: ffff88907f420fb8 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88907f940000(0000) knlGS:0000000000000000 CR2: 00007f60c3001000 CR3: 000000107d010005 CR4: 00000000007726f0 PKRU: 55555554 Call Trace: ? __warn+0xa4/0x140 ? check_flush_dependency+0x112/0x120 ? report_bug+0xe1/0x140 ? check_flush_dependency+0x112/0x120 ? handle_bug+0x5e/0x90 ? exc_invalid_op+0x16/0x40 ? asm_exc_invalid_op+0x16/0x20 ? timer_recalc_next_expiry+0x190/0x190 ? check_flush_dependency+0x112/0x120 ? check_flush_dependency+0x112/0x120 __flush_work.llvm.1643880146586177030+0x174/0x2c0 flush_rcu_work+0x28/0x30 kvfree_rcu_barrier+0x12f/0x160 kmem_cache_destroy+0x18/0x120 bioset_exit+0x10c/0x150 disk_release.llvm.6740012984264378178+0x61/0xd0 device_release+0x4f/0x90 kobject_put+0x95/0x180 nvme_put_ns+0x23/0xc0 nvme_remove_invalid_namespaces+0xb3/0xd0 nvme_scan_work+0x342/0x490 process_scheduled_works+0x1a2/0x370 worker_thread+0x2ff/0x390 ? pwq_release_workfn+0x1e0/0x1e0 kthread+0xb1/0xe0 ? __kthread_parkme+0x70/0x70 ret_from_fork+0x30/0x40 ? __kthread_parkme+0x70/0x70 ret_from_fork_asm+0x11/0x20 ---[ end trace 0000000000000000 ]--- To address this switch to use of independent WQ_MEM_RECLAIM workqueue, so the rules are not violated from workqueue framework point of view. Apart of that, since kvfree_rcu() does reclaim memory it is worth to go with WQ_MEM_RECLAIM type of wq because it is designed for this purpose. Fixes: 6c6c47b063b5 ("mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()"), Reported-by: Keith Busch Closes: https://lore.kernel.org/all/Z7iqJtCjHKfo8Kho@kbusch-mbp/ Cc: stable@vger.kernel.org Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Joel Fernandes Signed-off-by: Vlastimil Babka mm/slab_common.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit cc5bfc4e16fc1d1c520cd7bb28646e82b6e69217 Author: Thinh Nguyen Date: Thu Jan 30 23:49:31 2025 +0000 usb: dwc3: Set SUSPENDENABLE soon after phy init After phy initialization, some phy operations can only be executed while in lower P states. Ensure GUSB3PIPECTL.SUSPENDENABLE and GUSB2PHYCFG.SUSPHY are set soon after initialization to avoid blocking phy ops. Previously the SUSPENDENABLE bits are only set after the controller initialization, which may not happen right away if there's no gadget driver or xhci driver bound. Revise this to clear SUSPENDENABLE bits only when there's mode switching (change in GCTL.PRTCAPDIR). Fixes: 6d735722063a ("usb: dwc3: core: Prevent phy suspend during init") Cc: stable Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/633aef0afee7d56d2316f7cc3e1b2a6d518a8cc9.1738280911.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 69 ++++++++++++++++++++++++++++++------------------- drivers/usb/dwc3/core.h | 2 +- drivers/usb/dwc3/drd.c | 4 +-- 3 files changed, 45 insertions(+), 30 deletions(-) commit 9360dfe4cbd62ff1eb8217b815964931523b75b3 Author: Andrea Righi Date: Mon Mar 3 18:51:59 2025 +0100 sched_ext: Validate prev_cpu in scx_bpf_select_cpu_dfl() If a BPF scheduler provides an invalid CPU (outside the nr_cpu_ids range) as prev_cpu to scx_bpf_select_cpu_dfl() it can cause a kernel crash. To prevent this, validate prev_cpu in scx_bpf_select_cpu_dfl() and trigger an scx error if an invalid CPU is specified. Fixes: f0e1a0643a59b ("sched_ext: Implement BPF extensible scheduler class") Cc: stable@vger.kernel.org # v6.12+ Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo kernel/sched/ext.c | 3 +++ 1 file changed, 3 insertions(+) commit 99fa936e8e4f117d62f229003c9799686f74cebc Merge: d9a9c94dbc8b 011ea742a25a Author: Linus Torvalds Date: Mon Mar 3 07:51:33 2025 -1000 Merge tag 'affs-6.14-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull affs fixes from David Sterba: "Two fixes from Simon Tatham. They're real bugfixes for problems with OFS floppy disks created on linux and then read in the emulated Workbench environment" * tag 'affs-6.14-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: affs: don't write overlarge OFS data block size fields affs: generate OFS sequence numbers starting at 1 commit d9a9c94dbc8bfeab2b29f860d38e5056894813ec Merge: 26edad06d5c3 9b47d37496e2 Author: Linus Torvalds Date: Mon Mar 3 07:38:02 2025 -1000 Merge tag 'xfs-fixes-6.14-rc6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs cleanups from Carlos Maiolino: "Just a few cleanups" * tag 'xfs-fixes-6.14-rc6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: remove the XBF_STALE check from xfs_buf_rele_cached xfs: remove most in-flight buffer accounting xfs: decouple buffer readahead from the normal buffer read path xfs: reduce context switches for synchronous buffered I/O commit 26edad06d5c34038c5d15ee082c80a62dcbd74bc Merge: 7eb172143d55 fd5ba38390c5 Author: Linus Torvalds Date: Mon Mar 3 07:28:15 2025 -1000 Merge tag 'probes-fixes-v6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull probe events fixes from Masami Hiramatsu: - probe-events: Remove unused MAX_ARG_BUF_LEN macro - it is not used - fprobe-events: Log error for exceeding the number of entry args. Since the max number of entry args is limited, it should be checked and rejected when the parser detects it. - tprobe-events: Reject invalid tracepoint name If a user specifies an invalid tracepoint name (e.g. including '/') then the new event is not defined correctly in the eventfs. - tprobe-events: Fix a memory leak when tprobe defined with $retval There is a memory leak if tprobe is defined with $retval. * tag 'probes-fixes-v6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: probe-events: Remove unused MAX_ARG_BUF_LEN macro tracing: fprobe-events: Log error for exceeding the number of entry args tracing: tprobe-events: Reject invalid tracepoint name tracing: tprobe-events: Fix a memory leak when tprobe with $retval commit 3b2d3db368013729fd2167a0d91fec821dba807c Author: Sean Christopherson Date: Fri Feb 28 15:38:52 2025 -0800 KVM: selftests: Fix printf() format goof in SEV smoke test Print out the index of mismatching XSAVE bytes using unsigned decimal format. Some versions of clang complain about trying to print an integer as an unsigned char. x86/sev_smoke_test.c:55:51: error: format specifies type 'unsigned char' but the argument has type 'int' [-Werror,-Wformat] Fixes: 8c53183dbaa2 ("selftests: kvm: add test for transferring FPU state into VMSA") Link: https://lore.kernel.org/r/20250228233852.3855676-1-seanjc@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/x86/sev_smoke_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d88ed5fb7c88f404e57fe2b2a6d19fefc35b4dc7 Author: Sean Christopherson Date: Fri Feb 28 15:08:04 2025 -0800 KVM: selftests: Ensure all vCPUs hit -EFAULT during initial RO stage During the initial mprotect(RO) stage of mmu_stress_test, keep vCPUs spinning until all vCPUs have hit -EFAULT, i.e. until all vCPUs have tried to write to a read-only page. If a vCPU manages to complete an entire iteration of the loop without hitting a read-only page, *and* the vCPU observes mprotect_ro_done before starting a second iteration, then the vCPU will prematurely fall through to GUEST_SYNC(3) (on x86 and arm64) and get out of sequence. Replace the "do-while (!r)" loop around the associated _vcpu_run() with a single invocation, as barring a KVM bug, the vCPU is guaranteed to hit -EFAULT, and retrying on success is super confusion, hides KVM bugs, and complicates this fix. The do-while loop was semi-unintentionally added specifically to fudge around a KVM x86 bug, and said bug is unhittable without modifying the test to force x86 down the !(x86||arm64) path. On x86, if forced emulation is enabled, vcpu_arch_put_guest() may trigger emulation of the store to memory. Due a (very, very) longstanding bug in KVM x86's emulator, emulate writes to guest memory that fail during __kvm_write_guest_page() unconditionally return KVM_EXIT_MMIO. While that is desirable in the !memslot case, it's wrong in this case as the failure happens due to __copy_to_user() hitting a read-only page, not an emulated MMIO region. But as above, x86 only uses vcpu_arch_put_guest() if the __x86_64__ guards are clobbered to force x86 down the common path, and of course the unexpected MMIO is a KVM bug, i.e. *should* cause a test failure. Fixes: b6c304aec648 ("KVM: selftests: Verify KVM correctly handles mprotect(PROT_READ)") Reported-by: Yan Zhao Closes: https://lore.kernel.org/all/20250208105318.16861-1-yan.y.zhao@intel.com Debugged-by: Yan Zhao Reviewed-by: Yan Zhao Tested-by: Yan Zhao Link: https://lore.kernel.org/r/20250228230804.3845860-1-seanjc@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/mmu_stress_test.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 807cb9ce2ed9a1b6e79e70fb2cdb7860f1517dcc Author: Sean Christopherson Date: Wed Feb 26 17:25:33 2025 -0800 KVM: SVM: Don't rely on DebugSwap to restore host DR0..DR3 Never rely on the CPU to restore/load host DR0..DR3 values, even if the CPU supports DebugSwap, as there are no guarantees that SNP guests will actually enable DebugSwap on APs. E.g. if KVM were to rely on the CPU to load DR0..DR3 and skipped them during hw_breakpoint_restore(), KVM would run with clobbered-to-zero DRs if an SNP guest created APs without DebugSwap enabled. Update the comment to explain the dangers, and hopefully prevent breaking KVM in the future. Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/20250227012541.3234589-3-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/svm/sev.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit b2653cd3b75f62f29b72df4070e20357acb52bc4 Author: Sean Christopherson Date: Wed Feb 26 17:25:32 2025 -0800 KVM: SVM: Save host DR masks on CPUs with DebugSwap When running SEV-SNP guests on a CPU that supports DebugSwap, always save the host's DR0..DR3 mask MSR values irrespective of whether or not DebugSwap is enabled, to ensure the host values aren't clobbered by the CPU. And for now, also save DR0..DR3, even though doing so isn't necessary (see below). SVM_VMGEXIT_AP_CREATE is deeply flawed in that it allows the *guest* to create a VMSA with guest-controlled SEV_FEATURES. A well behaved guest can inform the hypervisor, i.e. KVM, of its "requested" features, but on CPUs without ALLOWED_SEV_FEATURES support, nothing prevents the guest from lying about which SEV features are being enabled (or not!). If a misbehaving guest enables DebugSwap in a secondary vCPU's VMSA, the CPU will load the DR0..DR3 mask MSRs on #VMEXIT, i.e. will clobber the MSRs with '0' if KVM doesn't save its desired value. Note, DR0..DR3 themselves are "ok", as DR7 is reset on #VMEXIT, and KVM restores all DRs in common x86 code as needed via hw_breakpoint_restore(). I.e. there is no risk of host DR0..DR3 being clobbered (when it matters). However, there is a flaw in the opposite direction; because the guest can lie about enabling DebugSwap, i.e. can *disable* DebugSwap without KVM's knowledge, KVM must not rely on the CPU to restore DRs. Defer fixing that wart, as it's more of a documentation issue than a bug in the code. Note, KVM added support for DebugSwap on commit d1f85fbe836e ("KVM: SEV: Enable data breakpoints in SEV-ES"), but that is not an appropriate Fixes, as the underlying flaw exists in hardware, not in KVM. I.e. all kernels that support SEV-SNP need to be patched, not just kernels with KVM's full support for DebugSwap (ignoring that DebugSwap support landed first). Opportunistically fix an incorrect statement in the comment; on CPUs without DebugSwap, the CPU does NOT save or load debug registers, i.e. Fixes: e366f92ea99e ("KVM: SEV: Support SEV-SNP AP Creation NAE event") Cc: stable@vger.kernel.org Cc: Naveen N Rao Cc: Kim Phillips Cc: Tom Lendacky Cc: Alexey Kardashevskiy Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/20250227012541.3234589-2-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/svm/sev.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 23e0832d6d7be2d3c713f9390c060b6f1c48bf36 Author: Philipp Stanner Date: Tue Feb 18 13:41:50 2025 +0100 drm/sched: Fix preprocessor guard When writing the header guard for gpu_scheduler_trace.h, a typo, apparently, occurred. Fix the typo and document the scope of the guard. Fixes: 353da3c520b4 ("drm/amdgpu: add tracepoint for scheduler (v2)") Reviewed-by: Tvrtko Ursulin Signed-off-by: Philipp Stanner Link: https://patchwork.freedesktop.org/patch/msgid/20250218124149.118002-2-phasta@kernel.org drivers/gpu/drm/scheduler/gpu_scheduler_trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 10fce7ebe888fa8c97eee7e317a47e7603e5e78d Author: Xinghuo Chen Date: Mon Mar 3 07:57:33 2025 -0500 hwmon: fix a NULL vs IS_ERR_OR_NULL() check in xgene_hwmon_probe() The devm_memremap() function returns error pointers on error, it doesn't return NULL. Fixes: c7cefce03e69 ("hwmon: (xgene) access mailbox as RAM") Signed-off-by: Xinghuo Chen Link: https://lore.kernel.org/r/tencent_9AD8E7683EC29CAC97496B44F3F865BA070A@qq.com Signed-off-by: Guenter Roeck drivers/hwmon/xgene-hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64e6a754d33d31aa844b3ee66fb93ac84ca1565e Author: Eric Dumazet Date: Thu Feb 27 08:26:42 2025 +0000 llc: do not use skb_get() before dev_queue_xmit() syzbot is able to crash hosts [1], using llc and devices not supporting IFF_TX_SKB_SHARING. In this case, e1000 driver calls eth_skb_pad(), while the skb is shared. Simply replace skb_get() by skb_clone() in net/llc/llc_s_ac.c Note that e1000 driver might have an issue with pktgen, because it does not clear IFF_TX_SKB_SHARING, this is an orthogonal change. We need to audit other skb_get() uses in net/llc. [1] kernel BUG at net/core/skbuff.c:2178 ! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 16371 Comm: syz.2.2764 Not tainted 6.14.0-rc4-syzkaller-00052-gac9c34d1e45a #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:pskb_expand_head+0x6ce/0x1240 net/core/skbuff.c:2178 Call Trace: __skb_pad+0x18a/0x610 net/core/skbuff.c:2466 __skb_put_padto include/linux/skbuff.h:3843 [inline] skb_put_padto include/linux/skbuff.h:3862 [inline] eth_skb_pad include/linux/etherdevice.h:656 [inline] e1000_xmit_frame+0x2d99/0x5800 drivers/net/ethernet/intel/e1000/e1000_main.c:3128 __netdev_start_xmit include/linux/netdevice.h:5151 [inline] netdev_start_xmit include/linux/netdevice.h:5160 [inline] xmit_one net/core/dev.c:3806 [inline] dev_hard_start_xmit+0x9a/0x7b0 net/core/dev.c:3822 sch_direct_xmit+0x1ae/0xc30 net/sched/sch_generic.c:343 __dev_xmit_skb net/core/dev.c:4045 [inline] __dev_queue_xmit+0x13d4/0x43e0 net/core/dev.c:4621 dev_queue_xmit include/linux/netdevice.h:3313 [inline] llc_sap_action_send_test_c+0x268/0x320 net/llc/llc_s_ac.c:144 llc_exec_sap_trans_actions net/llc/llc_sap.c:153 [inline] llc_sap_next_state net/llc/llc_sap.c:182 [inline] llc_sap_state_process+0x239/0x510 net/llc/llc_sap.c:209 llc_ui_sendmsg+0xd0d/0x14e0 net/llc/af_llc.c:993 sock_sendmsg_nosec net/socket.c:718 [inline] Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+da65c993ae113742a25f@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/67c020c0.050a0220.222324.0011.GAE@google.com/T/#u Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: David S. Miller net/llc/llc_s_ac.c | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) commit 3d6c9dd4cb3013fe83524949b914f1497855e3de Author: Thorsten Blum Date: Sat Feb 22 23:56:59 2025 +0100 ASoC: tegra: Fix ADX S24_LE audio format Commit 4204eccc7b2a ("ASoC: tegra: Add support for S24_LE audio format") added support for the S24_LE audio format, but duplicated S16_LE in OUT_DAI() for ADX instead. Fix this by adding support for the S24_LE audio format. Compile-tested only. Cc: stable@vger.kernel.org Fixes: 4204eccc7b2a ("ASoC: tegra: Add support for S24_LE audio format") Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250222225700.539673-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown sound/soc/tegra/tegra210_adx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d776f016d24816f15033169dcd081f077b6c10f4 Author: Alexey Klimov Date: Fri Feb 21 04:40:24 2025 +0000 ASoC: codecs: wsa884x: report temps to hwmon in millidegree of Celsius Temperatures are reported in units of Celsius however hwmon expects values to be in millidegree of Celsius. Userspace tools observe values close to zero and report it as "Not available" or incorrect values like 0C or 1C. Add a simple conversion to fix that. Before the change: wsa884x-virtual-0 Adapter: Virtual device temp1: +0.0°C -- wsa884x-virtual-0 Adapter: Virtual device temp1: +0.0°C Also reported as N/A before first amplifier power on. After this change and initial wsa884x power on: wsa884x-virtual-0 Adapter: Virtual device temp1: +39.0°C -- wsa884x-virtual-0 Adapter: Virtual device temp1: +37.0°C Tested on sm8550 only. Cc: Krzysztof Kozlowski Cc: Srinivas Kandagatla Signed-off-by: Alexey Klimov Link: https://patch.msgid.link/20250221044024.1207921-1-alexey.klimov@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/wsa884x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4363f02a39e25e80e68039b4323c570b0848ec66 Author: Peter Ujfalusi Date: Mon Mar 3 14:55:52 2025 +0800 ASoC: Intel: sof_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks() Initialize current_be_id to 0 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 Fixes: 59bf457d8055 ("ASoC: intel: sof_sdw: Factor out SoundWire DAI creation") Signed-off-by: Peter Ujfalusi Cc: stable@vger.kernel.org Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://patch.msgid.link/20250303065552.78328-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cfe5612ca9590db69b9be29dc83041dbf001108 Author: Sebastian Andrzej Siewior Date: Mon Feb 17 17:02:42 2025 +0100 netfilter: nft_ct: Use __refcount_inc() for per-CPU nft_ct_pcpu_template. nft_ct_pcpu_template is a per-CPU variable and relies on disabled BH for its locking. The refcounter is read and if its value is set to one then the refcounter is incremented and variable is used - otherwise it is already in use and left untouched. Without per-CPU locking in local_bh_disable() on PREEMPT_RT the read-then-increment operation is not atomic and therefore racy. This can be avoided by using unconditionally __refcount_inc() which will increment counter and return the old value as an atomic operation. In case the returned counter is not one, the variable is in use and we need to decrement counter. Otherwise we can use it. Use __refcount_inc() instead of read and a conditional increment. Fixes: edee4f1e9245 ("netfilter: nft_ct: add zone id set support") Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_ct.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 172a0f509723fe4741d4b8e9190cf434b18320d8 Author: Murad Masimov Date: Mon Mar 3 13:04:13 2025 +0300 ALSA: usx2y: validate nrpacks module parameter on probe The module parameter defines number of iso packets per one URB. User is allowed to set any value to the parameter of type int, which can lead to various kinds of weird and incorrect behavior like integer overflows, truncations, etc. Number of packets should be a small non-negative number. Since this parameter is read-only, its value can be validated on driver probe. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Murad Masimov Link: https://patch.msgid.link/20250303100413.835-1-m.masimov@mt-integration.ru Signed-off-by: Takashi Iwai sound/usb/usx2y/usbusx2y.c | 11 +++++++++++ sound/usb/usx2y/usbusx2y.h | 26 ++++++++++++++++++++++++++ sound/usb/usx2y/usbusx2yaudio.c | 27 --------------------------- 3 files changed, 37 insertions(+), 27 deletions(-) commit f317f38e7fbb15a0d8329289fef8cf034938fb4f Author: David E. Box Date: Wed Feb 26 13:47:27 2025 -0800 platform/x86/intel/vsec: Add Diamond Rapids support Add PCI ID for the Diamond Rapids Platforms Signed-off-by: David E. Box Link: https://lore.kernel.org/r/20250226214728.1256747-1-david.e.box@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/intel/vsec.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d0d10eaedcb53740883d7e5d53c5e15c879b48fb Author: Mingcong Bai Date: Sat Feb 22 00:48:24 2025 +0800 platform/x86: thinkpad_acpi: Add battery quirk for ThinkPad X131e Based on the dmesg messages from the original reporter: [ 4.964073] ACPI: \_SB_.PCI0.LPCB.EC__.HKEY: BCTG evaluated but flagged as error [ 4.964083] thinkpad_acpi: Error probing battery 2 Lenovo ThinkPad X131e also needs this battery quirk. Reported-by: Fan Yang <804284660@qq.com> Tested-by: Fan Yang <804284660@qq.com> Co-developed-by: Xi Ruoyao Signed-off-by: Xi Ruoyao Signed-off-by: Mingcong Bai Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250221164825.77315-1-jeffbai@aosc.io Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/thinkpad_acpi.c | 1 + 1 file changed, 1 insertion(+) commit 2738d06fb4f01145b24c542fb06de538ffc56430 Author: Dmitry Panchenko Date: Thu Feb 20 17:39:31 2025 +0200 platform/x86: intel-hid: fix volume buttons on Microsoft Surface Go 4 tablet Volume buttons on Microsoft Surface Go 4 tablet didn't send any events. Add Surface Go 4 DMI match to button_array_table to fix this. Signed-off-by: Dmitry Panchenko Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250220154016.3620917-1-dmitry@d-systems.ee Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/intel/hid.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1d2eabb6616433ccaa13927811bdfa205e91ba60 Author: Alessio Belle Date: Fri Feb 21 10:49:35 2025 +0000 drm/imagination: Fix timestamps in firmware traces When firmware traces are enabled, the firmware dumps 48-bit timestamps for each trace as two 32-bit values, highest 32 bits (of which only 16 useful) first. The driver was reassembling them the other way round i.e. interpreting the first value in memory as the lowest 32 bits, and the second value as the highest 32 bits (then truncated to 16 bits). Due to this, firmware trace dumps showed very large timestamps even for traces recorded shortly after GPU boot. The timestamps in these dumps would also sometimes jump backwards because of the truncation. Example trace dumped after loading the powervr module and enabling firmware traces, where each line is commented with the timestamp value in hexadecimal to better show both issues: [93540092739584] : Host Sync Partition marker: 1 // 0x551300000000 [28419798597632] : GPU units deinit // 0x19d900000000 [28548647616512] : GPU deinit // 0x19f700000000 Update logic to reassemble the timestamps halves in the correct order. Fixes: cb56cd610866 ("drm/imagination: Add firmware trace to debugfs") Signed-off-by: Alessio Belle Reviewed-by: Matt Coster Link: https://patchwork.freedesktop.org/patch/msgid/20250221-fix-fw-trace-timestamps-v1-1-dba4aeb030ca@imgtec.com Signed-off-by: Matt Coster drivers/gpu/drm/imagination/pvr_fw_trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 68c3de7f707e8a70e0a6d8087cf0fe4a3d5dbfb0 Author: Brendan King Date: Wed Feb 26 15:43:54 2025 +0000 drm/imagination: only init job done fences once Ensure job done fences are only initialised once. This fixes a memory manager not clean warning from drm_mm_takedown on module unload. Cc: stable@vger.kernel.org Fixes: eaf01ee5ba28 ("drm/imagination: Implement job submission and scheduling") Signed-off-by: Brendan King Reviewed-by: Matt Coster Link: https://patchwork.freedesktop.org/patch/msgid/20250226-init-done-fences-once-v2-1-c1b2f556b329@imgtec.com Signed-off-by: Matt Coster drivers/gpu/drm/imagination/pvr_queue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 91cf42c63f2d8a9c1bcdfe923218e079b32e1a69 Author: Conor Dooley Date: Mon Mar 3 10:47:40 2025 +0000 spi: microchip-core: prevent RX overflows when transmit size > FIFO size When the size of a transfer exceeds the size of the FIFO (32 bytes), RX overflows will be generated and receive data will be corrupted and warnings will be produced. For example, here's an error generated by a transfer of 36 bytes: spi_master spi0: mchp_corespi_interrupt: RX OVERFLOW: rxlen: 4, txlen: 0 The driver is currently split between handling receiving in the interrupt handler, and sending outside of it. Move all handling out of the interrupt handling, and explicitly link the number of bytes read of of the RX FIFO to the number written into the TX one. This both resolves the overflow problems as well as simplifying the flow of the driver. CC: stable@vger.kernel.org Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers") Signed-off-by: Conor Dooley Link: https://patch.msgid.link/20250303-veal-snooper-712c1dfad336@wendy Signed-off-by: Mark Brown drivers/spi/spi-microchip-core.c | 41 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 23 deletions(-) commit a5c4c3ba95a52d66315acdfbaba9bd82ed39c250 Author: Brendan King Date: Wed Feb 26 15:43:06 2025 +0000 drm/imagination: Hold drm_gem_gpuva lock for unmap Avoid a warning from drm_gem_gpuva_assert_lock_held in drm_gpuva_unlink. The Imagination driver uses the GEM object reservation lock to protect the gpuva list, but the GEM object was not always known in the code paths that ended up calling drm_gpuva_unlink. When the GEM object isn't known, it is found by calling drm_gpuva_find to lookup the object associated with a given virtual address range, or by calling drm_gpuva_find_first when removing all mappings. Cc: stable@vger.kernel.org Fixes: 4bc736f890ce ("drm/imagination: vm: make use of GPUVM's drm_exec helper") Signed-off-by: Brendan King Reviewed-by: Matt Coster Link: https://patchwork.freedesktop.org/patch/msgid/20250226-hold-drm_gem_gpuva-lock-for-unmap-v2-1-3fdacded227f@imgtec.com Signed-off-by: Matt Coster drivers/gpu/drm/imagination/pvr_fw_meta.c | 6 +- drivers/gpu/drm/imagination/pvr_vm.c | 134 ++++++++++++++++++++++++------ drivers/gpu/drm/imagination/pvr_vm.h | 3 + 3 files changed, 115 insertions(+), 28 deletions(-) commit df1a1ed5e1bdd9cc13148e0e5549f5ebcf76cf13 Author: Brendan King Date: Wed Feb 26 15:42:19 2025 +0000 drm/imagination: avoid deadlock on fence release Do scheduler queue fence release processing on a workqueue, rather than in the release function itself. Fixes deadlock issues such as the following: [ 607.400437] ============================================ [ 607.405755] WARNING: possible recursive locking detected [ 607.415500] -------------------------------------------- [ 607.420817] weston:zfq0/24149 is trying to acquire lock: [ 607.426131] ffff000017d041a0 (reservation_ww_class_mutex){+.+.}-{3:3}, at: pvr_gem_object_vunmap+0x40/0xc0 [powervr] [ 607.436728] but task is already holding lock: [ 607.442554] ffff000017d105a0 (reservation_ww_class_mutex){+.+.}-{3:3}, at: dma_buf_ioctl+0x250/0x554 [ 607.451727] other info that might help us debug this: [ 607.458245] Possible unsafe locking scenario: [ 607.464155] CPU0 [ 607.466601] ---- [ 607.469044] lock(reservation_ww_class_mutex); [ 607.473584] lock(reservation_ww_class_mutex); [ 607.478114] *** DEADLOCK *** Cc: stable@vger.kernel.org Fixes: eaf01ee5ba28 ("drm/imagination: Implement job submission and scheduling") Signed-off-by: Brendan King Reviewed-by: Matt Coster Link: https://patchwork.freedesktop.org/patch/msgid/20250226-fence-release-deadlock-v2-1-6fed2fc1fe88@imgtec.com Signed-off-by: Matt Coster drivers/gpu/drm/imagination/pvr_queue.c | 13 +++++++++++-- drivers/gpu/drm/imagination/pvr_queue.h | 4 ++++ 2 files changed, 15 insertions(+), 2 deletions(-) commit 9af9ad85ac44cb754e526d468c3006b48db5dfd8 Author: Pawan Gupta Date: Fri Feb 28 18:35:58 2025 -0800 x86/speculation: Add a conditional CS prefix to CALL_NOSPEC Retpoline mitigation for spectre-v2 uses thunks for indirect branches. To support this mitigation compilers add a CS prefix with -mindirect-branch-cs-prefix. For an indirect branch in asm, this needs to be added manually. CS prefix is already being added to indirect branches in asm files, but not in inline asm. Add CS prefix to CALL_NOSPEC for inline asm as well. There is no JMP_NOSPEC for inline asm. Reported-by: Josh Poimboeuf Signed-off-by: Pawan Gupta Signed-off-by: Ingo Molnar Cc: Andrew Cooper Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250228-call-nospec-v3-2-96599fed0f33@linux.intel.com arch/x86/include/asm/nospec-branch.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 010c4a461c1dbf3fa75ddea8df018a6128b700c6 Author: Pawan Gupta Date: Fri Feb 28 18:35:43 2025 -0800 x86/speculation: Simplify and make CALL_NOSPEC consistent CALL_NOSPEC macro is used to generate Spectre-v2 mitigation friendly indirect branches. At compile time the macro defaults to indirect branch, and at runtime those can be patched to thunk based mitigations. This approach is opposite of what is done for the rest of the kernel, where the compile time default is to replace indirect calls with retpoline thunk calls. Make CALL_NOSPEC consistent with the rest of the kernel, default to retpoline thunk at compile time when CONFIG_MITIGATION_RETPOLINE is enabled. Signed-off-by: Pawan Gupta Signed-off-by: Ingo Molnar Cc: Andrew Cooper Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250228-call-nospec-v3-1-96599fed0f33@linux.intel.com arch/x86/include/asm/nospec-branch.h | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 1be4e29e94a6be77de3bc210820b74f40814f17a Author: Mario Limonciello Date: Thu Feb 27 11:03:06 2025 -0600 platform/x86/amd/pmf: Initialize and clean up `cb_mutex` `cb_mutex` was introduced in commit 9e0894d07072e ("platform/x86/amd/pmf: Enable Custom BIOS Inputs for PMF-TA") to prevent conccurrent access for BIOS inputs. It however isn't initialized and so on use it may lead to a NULL pointer dereference. Add code to initialize on probe and clean up on destroy. Reported-by: Yijun Shen Cc: Richard Gong Fixes: 9e0894d07072e ("platform/x86/amd/pmf: Enable Custom BIOS Inputs for PMF-TA") Signed-off-by: Mario Limonciello Tested-By: Yijun Shen Acked-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20250227170308.435862-1-superm1@kernel.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/amd/pmf/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 2b66ef84d0d2a0ea955b40bd306f5e3abbc5cf9c Author: Pawel Laszczak Date: Fri Feb 28 07:50:25 2025 +0000 usb: hub: lack of clearing xHC resources The xHC resources allocated for USB devices are not released in correct order after resuming in case when while suspend device was reconnected. This issue has been detected during the fallowing scenario: - connect hub HS to root port - connect LS/FS device to hub port - wait for enumeration to finish - force host to suspend - reconnect hub attached to root port - wake host For this scenario during enumeration of USB LS/FS device the Cadence xHC reports completion error code for xHC commands because the xHC resources used for devices has not been properly released. XHCI specification doesn't mention that device can be reset in any order so, we should not treat this issue as Cadence xHC controller bug. Similar as during disconnecting in this case the device resources should be cleared starting form the last usb device in tree toward the root hub. To fix this issue usbcore driver should call hcd->driver->reset_device for all USB devices connected to hub which was reconnected while suspending. Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Cc: stable Signed-off-by: Pawel Laszczak Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/PH7PR07MB953841E38C088678ACDCF6EEDDCC2@PH7PR07MB9538.namprd07.prod.outlook.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 552ca6b87e3778f3dd5b87842f95138162e16c82 Author: Claudiu Beznea Date: Tue Feb 25 13:02:48 2025 +0200 usb: renesas_usbhs: Flush the notify_hotplug_work When performing continuous unbind/bind operations on the USB drivers available on the Renesas RZ/G2L SoC, a kernel crash with the message "Unable to handle kernel NULL pointer dereference at virtual address" may occur. This issue points to the usbhsc_notify_hotplug() function. Flush the delayed work to avoid its execution when driver resources are unavailable. Fixes: bc57381e6347 ("usb: renesas_usbhs: use delayed_work instead of work_struct") Cc: stable Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20250225110248.870417-4-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 2 ++ 1 file changed, 2 insertions(+) commit e0c92440938930e7fa7aa6362780d39cdea34449 Author: Claudiu Beznea Date: Tue Feb 25 13:02:47 2025 +0200 usb: renesas_usbhs: Use devm_usb_get_phy() The gpriv->transceiver is retrieved in probe() through usb_get_phy() but never released. Use devm_usb_get_phy() to handle this scenario. This issue was identified through code investigation. No issue was found without this change. Fixes: b5a2875605ca ("usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS") Cc: stable Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20250225110248.870417-3-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/mod_gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5ea08aa883da05106fcc683d12489a4292d1122 Author: Claudiu Beznea Date: Tue Feb 25 13:02:46 2025 +0200 usb: renesas_usbhs: Call clk_put() Clocks acquired with of_clk_get() need to be freed with clk_put(). Call clk_put() on priv->clks[0] on error path. Fixes: 3df0e240caba ("usb: renesas_usbhs: Add multiple clocks management") Cc: stable Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20250225110248.870417-2-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 69c58deec19628c8a686030102176484eb94fed4 Author: Badhri Jagan Sridharan Date: Sun Feb 16 22:30:02 2025 +0000 usb: dwc3: gadget: Prevent irq storm when TH re-executes While commit d325a1de49d6 ("usb: dwc3: gadget: Prevent losing events in event cache") makes sure that top half(TH) does not end up overwriting the cached events before processing them when the TH gets invoked more than one time, returning IRQ_HANDLED results in occasional irq storm where the TH hogs the CPU. The irq storm can be prevented by the flag before event handler busy is cleared. Default enable interrupt moderation in all versions which support them. ftrace event stub during dwc3 irq storm: irq/504_dwc3-1111 ( 1111) [000] .... 70.000866: irq_handler_exit: irq=14 ret=handled irq/504_dwc3-1111 ( 1111) [000] .... 70.000872: irq_handler_entry: irq=504 name=dwc3 irq/504_dwc3-1111 ( 1111) [000] .... 70.000874: irq_handler_exit: irq=504 ret=handled irq/504_dwc3-1111 ( 1111) [000] .... 70.000881: irq_handler_entry: irq=504 name=dwc3 irq/504_dwc3-1111 ( 1111) [000] .... 70.000883: irq_handler_exit: irq=504 ret=handled irq/504_dwc3-1111 ( 1111) [000] .... 70.000889: irq_handler_entry: irq=504 name=dwc3 irq/504_dwc3-1111 ( 1111) [000] .... 70.000892: irq_handler_exit: irq=504 ret=handled irq/504_dwc3-1111 ( 1111) [000] .... 70.000898: irq_handler_entry: irq=504 name=dwc3 irq/504_dwc3-1111 ( 1111) [000] .... 70.000901: irq_handler_exit: irq=504 ret=handled irq/504_dwc3-1111 ( 1111) [000] .... 70.000907: irq_handler_entry: irq=504 name=dwc3 irq/504_dwc3-1111 ( 1111) [000] .... 70.000909: irq_handler_exit: irq=504 ret=handled irq/504_dwc3-1111 ( 1111) [000] .... 70.000915: irq_handler_entry: irq=504 name=dwc3 irq/504_dwc3-1111 ( 1111) [000] .... 70.000918: irq_handler_exit: irq=504 ret=handled irq/504_dwc3-1111 ( 1111) [000] .... 70.000924: irq_handler_entry: irq=504 name=dwc3 irq/504_dwc3-1111 ( 1111) [000] .... 70.000927: irq_handler_exit: irq=504 ret=handled irq/504_dwc3-1111 ( 1111) [000] .... 70.000933: irq_handler_entry: irq=504 name=dwc3 irq/504_dwc3-1111 ( 1111) [000] .... 70.000935: irq_handler_exit: irq=504 ret=handled .... Cc: stable Suggested-by: Thinh Nguyen Fixes: d325a1de49d6 ("usb: dwc3: gadget: Prevent losing events in event cache") Signed-off-by: Badhri Jagan Sridharan Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20250216223003.3568039-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 16 ++++++---------- drivers/usb/dwc3/gadget.c | 10 +++++++--- 2 files changed, 13 insertions(+), 13 deletions(-) commit 8e812e9355a6f14dffd54a33d951ca403b9732f5 Author: Prashanth K Date: Mon Feb 24 14:26:04 2025 +0530 usb: gadget: Check bmAttributes only if configuration is valid If the USB configuration is not valid, then avoid checking for bmAttributes to prevent null pointer deference. Cc: stable Fixes: 40e89ff5750f ("usb: gadget: Set self-powered based on MaxPower and bmAttributes") Signed-off-by: Prashanth K Link: https://lore.kernel.org/r/20250224085604.417327-1-prashanth.k@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/composite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 487cfd4a8e3dc42d34a759017978a4edaf85fce0 Author: Marc Zyngier Date: Thu Feb 27 19:45:29 2025 +0000 xhci: Restrict USB4 tunnel detection for USB3 devices to Intel hosts When adding support for USB3-over-USB4 tunnelling detection, a check for an Intel-specific capability was added. This capability, which goes by ID 206, is used without any check that we are actually dealing with an Intel host. As it turns out, the Cadence XHCI controller *also* exposes an extended capability numbered 206 (for unknown purposes), but of course doesn't have the Intel-specific registers that the tunnelling code is trying to access. Fun follows. The core of the problems is that the tunnelling code blindly uses vendor-specific capabilities without any check (the Intel-provided documentation I have at hand indicates that 192-255 are indeed vendor-specific). Restrict the detection code to Intel HW for real, preventing any further explosion on my (non-Intel) HW. Cc: stable Fixes: 948ce83fbb7df ("xhci: Add USB4 tunnel detection for USB3 devices on Intel hosts") Signed-off-by: Marc Zyngier Acked-by: Mathias Nyman Link: https://lore.kernel.org/r/20250227194529.2288718-1-maz@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 59b348be7597c4a9903cb003c69e37df20c04a30 Author: Nikita Zhandarovich Date: Fri Feb 28 16:46:57 2025 +0300 wifi: cfg80211: regulatory: improve invalid hints checking Syzbot keeps reporting an issue [1] that occurs when erroneous symbols sent from userspace get through into user_alpha2[] via regulatory_hint_user() call. Such invalid regulatory hints should be rejected. While a sanity check from commit 47caf685a685 ("cfg80211: regulatory: reject invalid hints") looks to be enough to deter these very cases, there is a way to get around it due to 2 reasons. 1) The way isalpha() works, symbols other than latin lower and upper letters may be used to determine a country/domain. For instance, greek letters will also be considered upper/lower letters and for such characters isalpha() will return true as well. However, ISO-3166-1 alpha2 codes should only hold latin characters. 2) While processing a user regulatory request, between reg_process_hint_user() and regulatory_hint_user() there happens to be a call to queue_regulatory_request() which modifies letters in request->alpha2[] with toupper(). This works fine for latin symbols, less so for weird letter characters from the second part of _ctype[]. Syzbot triggers a warning in is_user_regdom_saved() by first sending over an unexpected non-latin letter that gets malformed by toupper() into a character that ends up failing isalpha() check. Prevent this by enhancing is_an_alpha2() to ensure that incoming symbols are latin letters and nothing else. [1] Syzbot report: ------------[ cut here ]------------ Unexpected user alpha2: A� WARNING: CPU: 1 PID: 964 at net/wireless/reg.c:442 is_user_regdom_saved net/wireless/reg.c:440 [inline] WARNING: CPU: 1 PID: 964 at net/wireless/reg.c:442 restore_alpha2 net/wireless/reg.c:3424 [inline] WARNING: CPU: 1 PID: 964 at net/wireless/reg.c:442 restore_regulatory_settings+0x3c0/0x1e50 net/wireless/reg.c:3516 Modules linked in: CPU: 1 UID: 0 PID: 964 Comm: kworker/1:2 Not tainted 6.12.0-rc5-syzkaller-00044-gc1e939a21eb1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: events_power_efficient crda_timeout_work RIP: 0010:is_user_regdom_saved net/wireless/reg.c:440 [inline] RIP: 0010:restore_alpha2 net/wireless/reg.c:3424 [inline] RIP: 0010:restore_regulatory_settings+0x3c0/0x1e50 net/wireless/reg.c:3516 ... Call Trace: crda_timeout_work+0x27/0x50 net/wireless/reg.c:542 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa65/0x1850 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Reported-by: syzbot+e10709ac3c44f3d4e800@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=e10709ac3c44f3d4e800 Fixes: 09d989d179d0 ("cfg80211: add regulatory hint disconnect support") Cc: stable@kernel.org Signed-off-by: Nikita Zhandarovich Link: https://patch.msgid.link/20250228134659.1577656-1-n.zhandarovich@fintech.ru Signed-off-by: Johannes Berg net/wireless/reg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f603b159231b0c58f0c27ab39348534063d38223 Author: Kailang Yang Date: Mon Mar 3 14:56:10 2025 +0800 ALSA: hda/realtek - add supported Mic Mute LED for Lenovo platform Support Mic Mute LED for ThinkCentre M series. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/c211a2702f1f411e86bd7420d7eebc03@realtek.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit aa2a739a75ab6f24ef72fb3fdb9192c081eacf06 Author: Namjae Jeon Date: Wed Feb 12 09:37:57 2025 +0900 cifs: fix incorrect validation for num_aces field of smb_acl parse_dcal() validate num_aces to allocate ace array. f (num_aces > ULONG_MAX / sizeof(struct smb_ace *)) It is an incorrect validation that we can create an array of size ULONG_MAX. smb_acl has ->size field to calculate actual number of aces in response buffer size. Use this to check invalid num_aces. Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/smb/client/cifsacl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1b8b67f3c5e5169535e26efedd3e422172e2db64 Author: Namjae Jeon Date: Wed Feb 12 09:32:11 2025 +0900 ksmbd: fix incorrect validation for num_aces field of smb_acl parse_dcal() validate num_aces to allocate posix_ace_state_array. if (num_aces > ULONG_MAX / sizeof(struct smb_ace *)) It is an incorrect validation that we can create an array of size ULONG_MAX. smb_acl has ->size field to calculate actual number of aces in request buffer size. Use this to check invalid num_aces. Reported-by: Igor Leite Ladessa Tested-by: Igor Leite Ladessa Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/smb/server/smbacl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 62e7dd0a39c2d0d7ff03274c36df971f1b3d2d0d Author: Namjae Jeon Date: Wed Feb 12 23:26:09 2025 +0900 smb: common: change the data type of num_aces to le16 2.4.5 in [MS-DTYP].pdf describe the data type of num_aces as le16. AceCount (2 bytes): An unsigned 16-bit integer that specifies the count of the number of ACE records in the ACL. Change it to le16 and add reserved field to smb_acl struct. Reported-by: Igor Leite Ladessa Tested-by: Igor Leite Ladessa Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/smb/client/cifsacl.c | 26 +++++++++++++------------- fs/smb/common/smbacl.h | 3 ++- fs/smb/server/smbacl.c | 31 ++++++++++++++++--------------- fs/smb/server/smbacl.h | 2 +- 4 files changed, 32 insertions(+), 30 deletions(-) commit e26e2d2e15daf1ab33e0135caf2304a0cfa2744b Author: Namjae Jeon Date: Thu Feb 27 15:49:10 2025 +0900 ksmbd: fix bug on trap in smb2_lock If lock count is greater than 1, flags could be old value. It should be checked with flags of smb_lock, not flags. It will cause bug-on trap from locks_free_lock in error handling routine. Cc: stable@vger.kernel.org Reported-by: Norbert Szetei Tested-by: Norbert Szetei Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/smb/server/smb2pdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84d2d1641b71dec326e8736a749b7ee76a9599fc Author: Namjae Jeon Date: Wed Feb 26 15:44:02 2025 +0900 ksmbd: fix use-after-free in smb2_lock If smb_lock->zero_len has value, ->llist of smb_lock is not delete and flock is old one. It will cause use-after-free on error handling routine. Cc: stable@vger.kernel.org Reported-by: Norbert Szetei Tested-by: Norbert Szetei Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/smb/server/smb2pdu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e2ff19f0b7a30e03516e6eb73b948e27a55bc9d2 Author: Namjae Jeon Date: Fri Feb 21 14:16:23 2025 +0900 ksmbd: fix type confusion via race condition when using ipc_msg_send_request req->handle is allocated using ksmbd_acquire_id(&ipc_ida), based on ida_alloc. req->handle from ksmbd_ipc_login_request and FSCTL_PIPE_TRANSCEIVE ioctl can be same and it could lead to type confusion between messages, resulting in access to unexpected parts of memory after an incorrect delivery. ksmbd check type of ipc response but missing add continue to check next ipc reponse. Cc: stable@vger.kernel.org Reported-by: Norbert Szetei Tested-by: Norbert Szetei Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/smb/server/transport_ipc.c | 1 + 1 file changed, 1 insertion(+) commit d6e13e19063db24f94b690159d0633aaf72a0f03 Author: Namjae Jeon Date: Tue Feb 18 22:49:50 2025 +0900 ksmbd: fix out-of-bounds in parse_sec_desc() If osidoffset, gsidoffset and dacloffset could be greater than smb_ntsd struct size. If it is smaller, It could cause slab-out-of-bounds. And when validating sid, It need to check it included subauth array size. Cc: stable@vger.kernel.org Reported-by: Norbert Szetei Tested-by: Norbert Szetei Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/smb/server/smbacl.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 4dd541f9d9e4d8cdfa9797e68d893b0c27e4c46c Author: Namjae Jeon Date: Sat Feb 15 11:01:49 2025 +0900 MAINTAINERS: update email address in cifs and ksmbd entry Steve mainly checks his email through his gmail address. I also check issues through another email address. Signed-off-by: Namjae Jeon Signed-off-by: Steve French MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) commit fd5ba38390c59e1c147480ae49b6133c4ac24001 Author: Masami Hiramatsu (Google) Date: Wed Feb 26 15:19:18 2025 +0900 tracing: probe-events: Remove unused MAX_ARG_BUF_LEN macro Commit 18b1e870a496 ("tracing/probes: Add $arg* meta argument for all function args") introduced MAX_ARG_BUF_LEN but it is not used. Remove it. Link: https://lore.kernel.org/all/174055075876.4079315.8805416872155957588.stgit@mhiramat.tok.corp.google.com/ Fixes: 18b1e870a496 ("tracing/probes: Add $arg* meta argument for all function args") Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) kernel/trace/trace_probe.h | 1 - 1 file changed, 1 deletion(-) commit 7eb172143d5508b4da468ed59ee857c6e5e01da6 Author: Linus Torvalds Date: Sun Mar 2 11:48:20 2025 -0800 Linux 6.14-rc5 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b91872c56940950a6a0852e499d249c3091d4284 Merge: a760b10147d9 e521f516716d Author: Linus Torvalds Date: Sun Mar 2 10:08:45 2025 -0800 Merge tag 'dmaengine-fix-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: - tegra210 div_u64 divison and max page fixes - revert Qualcomm unavailable register workaround which is causing regression, fixes have been proposed but still gaps are present so revert this for now * tag 'dmaengine-fix-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine: Revert "dmaengine: qcom: bam_dma: Avoid writing unavailable register" dmaengine: tegra210-adma: check for adma max page dmaengine: tegra210-adma: Use div_u64 for 64 bit division commit a760b10147d96c642ff152eef85db0c3799c9f74 Merge: 1973160c90d7 55f1a5f7c97c Author: Linus Torvalds Date: Sun Mar 2 09:54:25 2025 -0800 Merge tag 'phy-fixes-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy fixes from Vinod Koul: - rockchip phy kconfig dependency fix with USB_COMMON and regression fix for old DT - stm32 phy overflow assertion fix - exonysfs phy refclk masks fix and power gate on exit fix - freescale fix for clock dividor valid range - TI regmap syscon register fix - tegra reset registers on init fix * tag 'phy-fixes-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: tegra: xusb: reset VBUS & ID OVERRIDE phy: ti: gmii-sel: Do not use syscon helper to build regmap phy: exynos5-usbdrd: gs101: ensure power is gated to SS phy in phy_exit() phy: freescale: fsl-samsung-hdmi: Limit PLL lock detection clock divider to valid range phy: exynos5-usbdrd: fix MPLL_MULTIPLIER and SSC_REFCLKSEL masks in refclk phy: stm32: Fix constant-value overflow assertion phy: rockchip: naneng-combphy: compatible reset with old DT phy: rockchip: fix Kconfig dependency more commit e278d5e8aef4c0a1d9a9fa8b8910d713a89aa800 Author: Erik Schumacher Date: Mon Feb 24 09:19:04 2025 +0000 hwmon: (ad7314) Validate leading zero bits and return error Leading zero bits are sent on the bus before the temperature value is transmitted. If any of these bits are high, the connection might be unstable or there could be no AD7314 / ADT730x (or compatible) at all. Return -EIO in that case. Signed-off-by: Erik Schumacher Fixes: 4f3a659581cab ("hwmon: AD7314 driver (ported from IIO)") Link: https://lore.kernel.org/r/24a50c2981a318580aca8f50d23be7987b69ea00.camel@iris-sensing.com Signed-off-by: Guenter Roeck drivers/hwmon/ad7314.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1c7932d5ae0f5c22fa52ac811b4c427bbca5aff5 Author: Maud Spierings Date: Thu Feb 27 13:57:53 2025 +0100 hwmon: (ntc_thermistor) Fix the ncpXXxh103 sensor table I could not find a single table that has the values currently present in the table, change it to the actual values that can be found in [1]/[2] and [3] (page 15 column 2) [1]: https://www.murata.com/products/productdetail?partno=NCP15XH103F03RC [2]: https://www.murata.com/products/productdata/8796836626462/NTHCG83.txt?1437969843000 [3]: https://nl.mouser.com/datasheet/2/281/r44e-522712.pdf Fixes: 54ce3a0d8011 ("hwmon: (ntc_thermistor) Add support for ncpXXxh103") Signed-off-by: Maud Spierings Link: https://lore.kernel.org/r/20250227-ntc_thermistor_fixes-v1-3-70fa73200b52@gocontroll.com Reviewed-by: Linus Walleij Signed-off-by: Guenter Roeck drivers/hwmon/ntc_thermistor.c | 66 +++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 33 deletions(-) commit 6b6e2e8fd0de3fa7c6f4f8fe6841b01770b2e7bc Author: Titus Rwantare Date: Thu Feb 27 22:24:55 2025 +0000 hwmon: (pmbus) Initialise page count in pmbus_identify() The `pmbus_identify()` function fails to correctly determine the number of supported pages on PMBus devices. This occurs because `info->pages` is implicitly zero-initialised, and `pmbus_set_page()` does not perform writes to the page register if `info->pages` is not yet initialised. Without this patch, `info->pages` is always set to the maximum after scanning. This patch initialises `info->pages` to `PMBUS_PAGES` before the probing loop, enabling `pmbus_set_page()` writes to make it out onto the bus correctly identifying the number of pages. `PMBUS_PAGES` seemed like a reasonable non-zero number because that's the current result of the identification process. Testing was done with a PMBus device in QEMU. Signed-off-by: Titus Rwantare Fixes: 442aba78728e7 ("hwmon: PMBus device driver") Link: https://lore.kernel.org/r/20250227222455.2583468-1-titusr@google.com Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/pmbus.c | 2 ++ 1 file changed, 2 insertions(+) commit 1973160c90d7886c523e52e1f56164e6a74f0474 Merge: ebb7d37abf67 64407f4b5807 Author: Linus Torvalds Date: Sun Mar 2 04:35:39 2025 -0800 Merge tag 'gpio-fixes-for-v6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fix from Bartosz Golaszewski: - fix a buggy get_direction() retval check * tag 'gpio-fixes-for-v6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpiolib: Fix Oops in gpiod_direction_input_nonotify() commit ebb7d37abf675dd67f40efba1f9eb6ad2d2d71c5 Merge: ece144f151ac 6d48ad040757 Author: Linus Torvalds Date: Sun Mar 2 04:33:15 2025 -0800 Merge tag 'mips-fixes_6.14_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fix from Thomas Bogendoerfer: "Fix fallout of /scripts/sorttable cleanup" * tag 'mips-fixes_6.14_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: Ignore relocs against __ex_table for relocatable kernel commit e04918dc594669068f5d59d567d08db531167188 Author: Herbert Xu Date: Sun Mar 2 15:18:24 2025 +0800 cred: Fix RCU warnings in override/revert_creds Fix RCU warnings in override_creds and revert_creds by turning the RCU pointer into a normal pointer using rcu_replace_pointer. These warnings were previously private to the cred code, but due to the move into the header file they are now polluting unrelated subsystems. Fixes: 49dffdfde462 ("cred: Add a light version of override/revert_creds()") Signed-off-by: Herbert Xu Link: https://lore.kernel.org/r/Z8QGQGW0IaSklKG7@gondor.apana.org.au Signed-off-by: Christian Brauner include/linux/cred.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 3855a7b91d42ebf3513b7ccffc44807274978b3d Author: Ahmed Genidi Date: Thu Feb 27 18:05:26 2025 +0000 KVM: arm64: Initialize SCTLR_EL1 in __kvm_hyp_init_cpu() When KVM is in protected mode, host calls to PSCI are proxied via EL2, and cold entries from CPU_ON, CPU_SUSPEND, and SYSTEM_SUSPEND bounce through __kvm_hyp_init_cpu() at EL2 before entering the host kernel's entry point at EL1. While __kvm_hyp_init_cpu() initializes SPSR_EL2 for the exception return to EL1, it does not initialize SCTLR_EL1. Due to this, it's possible to enter EL1 with SCTLR_EL1 in an UNKNOWN state. In practice this has been seen to result in kernel crashes after CPU_ON as a result of SCTLR_EL1.M being 1 in violation of the initial core configuration specified by PSCI. Fix this by initializing SCTLR_EL1 for cold entry to the host kernel. As it's necessary to write to SCTLR_EL12 in VHE mode, this initialization is moved into __kvm_host_psci_cpu_entry() where we can use write_sysreg_el1(). The remnants of the '__init_el2_nvhe_prepare_eret' macro are folded into its only caller, as this is clearer than having the macro. Fixes: cdf367192766ad11 ("KVM: arm64: Intercept host's CPU_ON SMCs") Reported-by: Leo Yan Signed-off-by: Ahmed Genidi [ Mark: clarify commit message, handle E2H, move to C, remove macro ] Signed-off-by: Mark Rutland Cc: Ahmed Genidi Cc: Ben Horgan Cc: Catalin Marinas Cc: Leo Yan Cc: Marc Zyngier Cc: Oliver Upton Cc: Will Deacon Reviewed-by: Leo Yan Link: https://lore.kernel.org/r/20250227180526.1204723-3-mark.rutland@arm.com Signed-off-by: Marc Zyngier arch/arm64/include/asm/el2_setup.h | 5 ----- arch/arm64/kernel/head.S | 3 ++- arch/arm64/kvm/hyp/nvhe/hyp-init.S | 2 -- arch/arm64/kvm/hyp/nvhe/psci-relay.c | 3 +++ 4 files changed, 5 insertions(+), 8 deletions(-) commit 7a68b55ff39b0a1638acb1694c185d49f6077a0d Author: Mark Rutland Date: Thu Feb 27 18:05:25 2025 +0000 KVM: arm64: Initialize HCR_EL2.E2H early On CPUs without FEAT_E2H0, HCR_EL2.E2H is RES1, but may reset to an UNKNOWN value out of reset and consequently may not read as 1 unless it has been explicitly initialized. We handled this for the head.S boot code in commits: 3944382fa6f22b54 ("arm64: Treat HCR_EL2.E2H as RES1 when ID_AA64MMFR4_EL1.E2H0 is negative") b3320142f3db9b3f ("arm64: Fix early handling of FEAT_E2H0 not being implemented") Unfortunately, we forgot to apply a similar fix to the KVM PSCI entry points used when relaying CPU_ON, CPU_SUSPEND, and SYSTEM SUSPEND. When KVM is entered via these entry points, the value of HCR_EL2.E2H may be consumed before it has been initialized (e.g. by the 'init_el2_state' macro). Initialize HCR_EL2.E2H early in these paths such that it can be consumed reliably. The existing code in head.S is factored out into a new 'init_el2_hcr' macro, and this is used in the __kvm_hyp_init_cpu() function common to all the relevant PSCI entry points. For clarity, I've tweaked the assembly used to check whether ID_AA64MMFR4_EL1.E2H0 is negative. The bitfield is extracted as a signed value, and this is checked with a signed-greater-or-equal (GE) comparison. As the hyp code will reconfigure HCR_EL2 later in ___kvm_hyp_init(), all bits other than E2H are initialized to zero in __kvm_hyp_init_cpu(). Fixes: 3944382fa6f22b54 ("arm64: Treat HCR_EL2.E2H as RES1 when ID_AA64MMFR4_EL1.E2H0 is negative") Fixes: b3320142f3db9b3f ("arm64: Fix early handling of FEAT_E2H0 not being implemented") Signed-off-by: Mark Rutland Cc: Ahmed Genidi Cc: Ben Horgan Cc: Catalin Marinas Cc: Leo Yan Cc: Marc Zyngier Cc: Oliver Upton Cc: Will Deacon Link: https://lore.kernel.org/r/20250227180526.1204723-2-mark.rutland@arm.com [maz: fixed LT->GE thinko] Signed-off-by: Marc Zyngier arch/arm64/include/asm/el2_setup.h | 26 ++++++++++++++++++++++++++ arch/arm64/kernel/head.S | 19 +------------------ arch/arm64/kvm/hyp/nvhe/hyp-init.S | 8 +++++++- 3 files changed, 34 insertions(+), 19 deletions(-) commit c9ce148ea753bef66686460fa3cec6641cdfbb9f Author: Takashi Iwai Date: Sat Mar 1 12:45:29 2025 +0100 ALSA: seq: Avoid module auto-load handling at event delivery snd_seq_client_use_ptr() is supposed to return the snd_seq_client object for the given client ID, and it tries to handle the module auto-loading when no matching object is found. Although the module handling is performed only conditionally with "!in_interrupt()", this condition may be fragile, e.g. when the code is called from the ALSA timer callback where the spinlock is temporarily disabled while the irq is disabled. Then his doesn't fit well and spews the error about sleep from invalid context, as complained recently by syzbot. Also, in general, handling the module-loading at each time if no matching object is found is really an overkill. It can be still useful when performed at the top-level ioctl or proc reads, but it shouldn't be done at event delivery at all. For addressing the issues above, this patch disables the module handling in snd_seq_client_use_ptr() in normal cases like event deliveries, but allow only in limited and safe situations. A new function client_load_and_use_ptr() is used for the cases where the module loading can be done safely, instead. Reported-by: syzbot+4cb9fad083898f54c517@syzkaller.appspotmail.com Closes: https://lore.kernel.org/67c272e5.050a0220.dc10f.0159.GAE@google.com Cc: Link: https://patch.msgid.link/20250301114530.8975-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 46 +++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 16 deletions(-) commit ece144f151ac7bf8bb5b98f7d4aeeda7a2eed02a Merge: 9d20040d71ed 66cb85c441cd Author: Linus Torvalds Date: Sat Mar 1 16:10:31 2025 -0800 Merge tag 'v6.14-rc4-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fix from Steve French: "Fix SMB1 netfs client regression" * tag 'v6.14-rc4-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6: cifs: Fix the smb1 readv callback to correctly call netfs commit 9d20040d71ede4c0e5fc6ae7aaa92788de1e713a Merge: b4b215cf3333 eed6bfa8b282 Author: Linus Torvalds Date: Sat Mar 1 13:44:51 2025 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Ryan's been hard at work finding and fixing mm bugs in the arm64 code, so here's a small crop of fixes for -rc5. The main changes are to fix our zapping of non-present PTEs for hugetlb entries created using the contiguous bit in the page-table rather than a block entry at the level above. Prior to these fixes, we were pulling the contiguous bit back out of the PTE in order to determine the size of the hugetlb page but this is clearly bogus if the thing isn't present and consequently both the clearing of the PTE(s) and the TLB invalidation were unreliable. Although the problem was found by code inspection, we really don't want this sitting around waiting to trigger and the changes are CC'd to stable accordingly. Note that the diffstat looks a lot worse than it really is; huge_ptep_get_and_clear() now takes a size argument from the core code and so all the arch implementations of that have been updated in a pretty mechanical fashion. - Fix a sporadic boot failure due to incorrect randomization of the linear map on systems that support it - Fix the zapping (both clearing the entries *and* invalidating the TLB) of hugetlb PTEs constructed using the contiguous bit" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: hugetlb: Fix flush_hugetlb_tlb_range() invalidation level arm64: hugetlb: Fix huge_ptep_get_and_clear() for non-present ptes mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear() arm64/mm: Fix Boot panic on Ampere Altra commit b4b215cf3333bef6a95c84efb38580217e86a2d2 Merge: df87d843c6eb 911c288f9e66 Author: Linus Torvalds Date: Sat Mar 1 12:43:11 2025 -0800 Merge tag 'i2c-for-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "All driver fixes this time: - fix interrupt initialization sequence (npcm) - fix frequency setting (ls2x) - re-enable interrupts properly at irq handler's exit (amd-asf)" * tag 'i2c-for-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: amd-asf: Fix EOI register write to enable successive interrupts i2c: ls2x: Fix frequency division register access i2c: npcm: disable interrupt enable bit before devm_request_irq commit 003659fec9f6d8c04738cb74b5384398ae8a7e88 Author: Peter Zijlstra Date: Mon Nov 4 14:39:12 2024 +0100 perf/core: Fix perf_pmu_register() vs. perf_init_event() There is a fairly obvious race between perf_init_event() doing idr_find() and perf_pmu_register() doing idr_alloc() with an incompletely initialized PMU pointer. Avoid by doing idr_alloc() on a NULL pointer to register the id, and swizzling the real struct pmu pointer at the end using idr_replace(). Also making sure to not set struct pmu members after publishing the struct pmu, duh. [ introduce idr_cmpxchg() in order to better handle the idr_replace() error case -- if it were to return an unexpected pointer, it will already have replaced the value and there is no going back. ] Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20241104135517.858805880@infradead.org kernel/events/core.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 2565e42539b120b81a68a58da961ce5d1e34eac8 Author: Peter Zijlstra Date: Mon Nov 4 14:39:11 2024 +0100 perf/core: Fix pmus_lock vs. pmus_srcu ordering Commit a63fbed776c7 ("perf/tracing/cpuhotplug: Fix locking order") placed pmus_lock inside pmus_srcu, this makes perf_pmu_unregister() trip lockdep. Move the locking about such that only pmu_idr and pmus (list) are modified while holding pmus_lock. This avoids doing synchronize_srcu() while holding pmus_lock and all is well again. Fixes: a63fbed776c7 ("perf/tracing/cpuhotplug: Fix locking order") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20241104135517.679556858@infradead.org kernel/events/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit df87d843c6eb4dad31b7bf63614549dd3521fe71 Merge: 209cd6f2ca94 a2f925a2f622 Author: Linus Torvalds Date: Sat Mar 1 08:59:29 2025 -0800 Merge tag 'ata-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata fixes from Niklas Cassel: - Fix a regression where the enablement of the PHYs would be skipped for device trees without any port child nodes (me) - Revert ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives, as it stops systems from entering lower package states. LPM works on newer firmware versions. We will need a more refined quirk that only targets the older firmware versions (me) * tag 'ata-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: Revert "ata: libata-core: Add ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives" ata: ahci: Make ahci_ignore_port() handle empty mask_port_map commit 209cd6f2ca94fab1331b9aa58dc9a17c7fc1f550 Merge: 03d38806a902 916b7f42b3b3 Author: Linus Torvalds Date: Sat Mar 1 08:48:53 2025 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM: - Fix TCR_EL2 configuration to not use the ASID in TTBR1_EL2 and not mess-up T1SZ/PS by using the HCR_EL2.E2H==0 layout. - Bring back the VMID allocation to the vcpu_load phase, ensuring that we only setup VTTBR_EL2 once on VHE. This cures an ugly race that would lead to running with an unallocated VMID. RISC-V: - Fix hart status check in SBI HSM extension - Fix hart suspend_type usage in SBI HSM extension - Fix error returned by SBI IPI and TIME extensions for unsupported function IDs - Fix suspend_type usage in SBI SUSP extension - Remove unnecessary vcpu kick after injecting interrupt via IMSIC guest file x86: - Fix an nVMX bug where KVM fails to detect that, after nested VM-Exit, L1 has a pending IRQ (or NMI). - To avoid freeing the PIC while vCPUs are still around, which would cause a NULL pointer access with the previous patch, destroy vCPUs before any VM-level destruction. - Handle failures to create vhost_tasks" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm: retry nx_huge_page_recovery_thread creation vhost: return task creation error instead of NULL KVM: nVMX: Process events on nested VM-Exit if injectable IRQ or NMI is pending KVM: x86: Free vCPUs before freeing VM state riscv: KVM: Remove unnecessary vcpu kick KVM: arm64: Ensure a VMID is allocated before programming VTTBR_EL2 KVM: arm64: Fix tcr_el2 initialisation in hVHE mode riscv: KVM: Fix SBI sleep_type use riscv: KVM: Fix SBI TIME error generation riscv: KVM: Fix SBI IPI error generation riscv: KVM: Fix hart suspend_type use riscv: KVM: Fix hart suspend status check commit a2f925a2f62254119cdaa360cfc9c0424bccd531 Author: Niklas Cassel Date: Fri Feb 28 13:26:04 2025 +0100 Revert "ata: libata-core: Add ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives" This reverts commit cc77e2ce187d26cc66af3577bf896d7410eb25ab. It was reported that adding ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives breaks entering lower package states for certain systems. It turns out that Samsung SSD 870 QVO actually has working LPM when using a recent SSD firmware version. The author of commit cc77e2ce187d ("ata: libata-core: Add ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives") reported himself that only older SSD firmware versions have broken LPM: https://lore.kernel.org/stable/93c10d38-718c-459d-84a5-4d87680b4da7@debian.org/ Unfortunately, he did not specify which older firmware version he was using which had broken LPM. Let's revert this quirk, which has FW version field specified as NULL (which means that it applies for all Samsung SSD 870 QVO firmware versions) for now. Once the author reports which older firmware version(s) that are broken, we can create a more fine grained quirk, which populates the FW version field accordingly. Fixes: cc77e2ce187d ("ata: libata-core: Add ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives") Reported-by: Dieter Mummenschanz Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219747 Link: https://lore.kernel.org/r/20250228122603.91814-2-cassel@kernel.org Signed-off-by: Niklas Cassel drivers/ata/libata-core.c | 4 ---- 1 file changed, 4 deletions(-) commit 916b7f42b3b3b539a71c204a9b49fdc4ca92cd82 Author: Keith Busch Date: Thu Feb 27 15:06:31 2025 -0800 kvm: retry nx_huge_page_recovery_thread creation A VMM may send a non-fatal signal to its threads, including vCPU tasks, at any time, and thus may signal vCPU tasks during KVM_RUN. If a vCPU task receives the signal while its trying to spawn the huge page recovery vhost task, then KVM_RUN will fail due to copy_process() returning -ERESTARTNOINTR. Rework call_once() to mark the call complete if and only if the called function succeeds, and plumb the function's true error code back to the call_once() invoker. This provides userspace with the correct, non-fatal error code so that the VMM doesn't terminate the VM on -ENOMEM, and allows subsequent KVM_RUN a succeed by virtue of retrying creation of the NX huge page task. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson [implemented the kvm user side] Signed-off-by: Keith Busch Message-ID: <20250227230631.303431-3-kbusch@meta.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 10 ++++------ include/linux/call_once.h | 47 ++++++++++++++++++++++++++++++++++------------- 2 files changed, 38 insertions(+), 19 deletions(-) commit cb380909ae3b1ebf14d6a455a4f92d7916d790cb Author: Keith Busch Date: Thu Feb 27 15:06:30 2025 -0800 vhost: return task creation error instead of NULL Lets callers distinguish why the vhost task creation failed. No one currently cares why it failed, so no real runtime change from this patch, but that will not be the case for long. Signed-off-by: Keith Busch Message-ID: <20250227230631.303431-2-kbusch@meta.com> Reviewed-by: Mike Christie Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 2 +- drivers/vhost/vhost.c | 2 +- kernel/vhost_task.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit a466fd7e9fafd975949e5945e2f70c33a94b1a70 Author: Vitaliy Shevtsov Date: Thu Feb 27 23:46:27 2025 +0500 caif_virtio: fix wrong pointer check in cfv_probe() del_vqs() frees virtqueues, therefore cfv->vq_tx pointer should be checked for NULL before calling it, not cfv->vdev. Also the current implementation is redundant because the pointer cfv->vdev is dereferenced before it is checked for NULL. Fix this by checking cfv->vq_tx for NULL instead of cfv->vdev before calling del_vqs(). Fixes: 0d2e1a2926b1 ("caif_virtio: Introduce caif over virtio") Signed-off-by: Vitaliy Shevtsov Reviewed-by: Gerhard Engleder Link: https://patch.msgid.link/20250227184716.4715-1-v.shevtsov@mt-integration.ru Signed-off-by: Jakub Kicinski drivers/net/caif/caif_virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03d38806a902b36bf364cae8de6f1183c0a35a67 Merge: 14ebe6909193 0cde378a10c1 Author: Linus Torvalds Date: Fri Feb 28 18:02:23 2025 -0800 Merge tag 'thermal-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fixes from Rafael Wysocki: "These fix the processing of DT thermal properties and the Power Allocator thermal governor: - Fix parsing cooling-maps in DT for trip points with more than one cooling device (Rafael Wysocki) - Fix granted_power computation in the Power Allocator thermal governor and make it update total_weight on configuration changes after the thermal zone has been registered (Yu-Che Cheng)" * tag 'thermal-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: gov_power_allocator: Update total_weight on bind and cdev updates thermal/of: Fix cdev lookup in thermal_of_should_bind() thermal: gov_power_allocator: Fix incorrect calculation in divvy_up_power() commit 14ebe69091935d65d9dc452c1bad8fed20d06c29 Merge: 7a5668899f54 c157d351460b Author: Linus Torvalds Date: Fri Feb 28 17:40:27 2025 -0800 Merge tag 'pm-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Fix the handling of processors that stop the TSC in deeper C-states in the intel_idle driver (Thomas Gleixner)" * tag 'pm-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: intel_idle: Handle older CPUs, which stop the TSC in deeper C states, correctly commit 7a5668899f54f6c9fe8619ecec23fb682d463f4a Merge: d203484f2556 0f6750b15ffd Author: Linus Torvalds Date: Fri Feb 28 17:05:22 2025 -0800 Merge tag 'x86-urgent-2025-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: - Fix conflicts between devicetree and ACPI SMP discovery & setup - Fix a warm-boot lockup on AMD SC1100 SoC systems - Fix a W=1 build warning related to x86 IRQ trace event setup - Fix a kernel-doc warning * tag 'x86-urgent-2025-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/entry: Fix kernel-doc warning x86/irq: Define trace events conditionally x86/CPU: Fix warm boot hang regression on AMD SC1100 SoC systems x86/of: Don't use DTB for SMP setup if ACPI is enabled commit d203484f2556f47a435cda36ceb9dd83adc9056e Merge: 766331f2860b 82c387ef7568 Author: Linus Torvalds Date: Fri Feb 28 17:00:16 2025 -0800 Merge tag 'sched-urgent-2025-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "Prevent cond_resched() based preemption when interrupts are disabled, on PREEMPT_NONE and PREEMPT_VOLUNTARY kernels" * tag 'sched-urgent-2025-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Prevent rescheduling when interrupts are disabled commit 766331f2860b08695418109582c94e98cc3528fe Merge: ad69e021288d f8c857238a39 Author: Linus Torvalds Date: Fri Feb 28 16:52:10 2025 -0800 Merge tag 'perf-urgent-2025-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf event fixes from Ingo Molnar: "Miscellaneous perf events fixes and a minor HW enablement change: - Fix missing RCU protection in perf_iterate_ctx() - Fix pmu_ctx_list ordering bug - Reject the zero page in uprobes - Fix a family of bugs related to low frequency sampling - Add Intel Arrow Lake U CPUs to the generic Arrow Lake RAPL support table - Fix a lockdep-assert false positive in uretprobes" * tag 'perf-urgent-2025-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: uprobes: Remove too strict lockdep_assert() condition in hprobe_expire() perf/x86/rapl: Add support for Intel Arrow Lake U perf/x86/intel: Use better start period for frequency mode perf/core: Fix low freq setting via IOC_PERIOD perf/x86: Fix low freqency setting issue uprobes: Reject the shared zeropage in uprobe_write_opcode() perf/core: Order the PMU list to fix warning about unordered pmu_ctx_list perf/core: Add RCU read lock protection to perf_iterate_ctx() commit ad69e021288d04f297c097985513306cbd304be3 Merge: 405a41d7599b b4ae43b05353 Author: Linus Torvalds Date: Fri Feb 28 16:45:36 2025 -0800 Merge tag 'objtool-urgent-2025-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fixes from Ingo Molnar: "Fix an objtool false positive, and objtool related build warnings that happens on PIE-enabled architectures such as LoongArch" * tag 'objtool-urgent-2025-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Add bch2_trans_unlocked_or_in_restart_error() to bcachefs noreturns objtool: Fix C jump table annotations for Clang vmlinux.lds: Ensure that const vars with relocations are mapped R/O commit ee01b2f2d7d0010787c2343463965bbc283a497f Author: Antoine Tenart Date: Wed Feb 26 18:13:42 2025 +0100 net: gso: fix ownership in __udp_gso_segment In __udp_gso_segment the skb destructor is removed before segmenting the skb but the socket reference is kept as-is. This is an issue if the original skb is later orphaned as we can hit the following bug: kernel BUG at ./include/linux/skbuff.h:3312! (skb_orphan) RIP: 0010:ip_rcv_core+0x8b2/0xca0 Call Trace: ip_rcv+0xab/0x6e0 __netif_receive_skb_one_core+0x168/0x1b0 process_backlog+0x384/0x1100 __napi_poll.constprop.0+0xa1/0x370 net_rx_action+0x925/0xe50 The above can happen following a sequence of events when using OpenVSwitch, when an OVS_ACTION_ATTR_USERSPACE action precedes an OVS_ACTION_ATTR_OUTPUT action: 1. OVS_ACTION_ATTR_USERSPACE is handled (in do_execute_actions): the skb goes through queue_gso_packets and then __udp_gso_segment, where its destructor is removed. 2. The segments' data are copied and sent to userspace. 3. OVS_ACTION_ATTR_OUTPUT is handled (in do_execute_actions) and the same original skb is sent to its path. 4. If it later hits skb_orphan, we hit the bug. Fix this by also removing the reference to the socket in __udp_gso_segment. Fixes: ad405857b174 ("udp: better wmem accounting on gso") Signed-off-by: Antoine Tenart Link: https://patch.msgid.link/20250226171352.258045-1-atenart@kernel.org Signed-off-by: Jakub Kicinski net/ipv4/udp_offload.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4a4f9b5c7c13601c4f1b3d8c607d7439e39f40d2 Author: Kent Overstreet Date: Fri Feb 28 15:58:30 2025 -0500 bcachefs: Don't set BCH_FEATURE_incompat_version_field unless requested We shouldn't be setting incompatible bits or the incompatible version field unless explicitly request or allowed - otherwise we break mounting with old kernels or userspace. Reported-by: Dave Hansen Signed-off-by: Kent Overstreet fs/bcachefs/super-io.c | 24 ++++++++++++++++-------- fs/bcachefs/super-io.h | 11 ++++------- 2 files changed, 20 insertions(+), 15 deletions(-) commit 405a41d7599be266ae6880e73252ca41770760fe Merge: 5c44ddaf7df3 b9a49520679e Author: Linus Torvalds Date: Fri Feb 28 16:07:18 2025 -0800 Merge tag 'locking-urgent-2025-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Ingo Molnar: "Fix an rcuref_put() slowpath race" * tag 'locking-urgent-2025-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: rcuref: Plug slowpath race in rcuref_put() commit 5c44ddaf7df3a06391684dde65083a092e06052b Merge: 3d7dc8658105 a1a7eb89ca0b Author: Linus Torvalds Date: Fri Feb 28 15:43:32 2025 -0800 Merge tag 'trace-v6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: - Fix crash from bad histogram entry An error path in the histogram creation could leave an entry in a link list that gets freed. Then when a new entry is added it can cause a u-a-f bug. This is fixed by restructuring the code so that the histogram is consistent on failure and everything is cleaned up appropriately. - Fix fprobe self test The fprobe self test relies on no function being attached by ftrace. BPF programs can attach to functions via ftrace and systemd now does so. This causes those functions to appear in the enabled_functions list which holds all functions attached by ftrace. The selftest also uses that file to see if functions are being connected correctly. It counts the functions in the file, but if there's already functions in the file, it fails. Instead, add the number of functions in the file at the start of the test to all the calculations during the test. - Fix potential division by zero of the function profiler stddev The calculated divisor that calculates the standard deviation of the function times can overflow. If the overflow happens to land on zero, that can cause a division by zero. Check for zero from the calculation before doing the division. TODO: Catch when it ever overflows and report it accordingly. For now, just prevent the system from crashing. * tag 'trace-v6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: ftrace: Avoid potential division by zero in function_stat_show() selftests/ftrace: Let fprobe test consider already enabled functions tracing: Fix bad hist from corrupting named_triggers list commit 3d7dc8658105f0408f53f5df13f5f2b4610bb4ca Merge: 276f98efb64a b150654f74bf Author: Linus Torvalds Date: Fri Feb 28 15:39:17 2025 -0800 Merge tag 'iommu-fixes-v6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux Pull iommu fixes from Joerg Roedel: - Intel VT-d fixes: - Fix suspicious RCU usage splat - Fix passthrough for devices under PCIe-PCI bridge - AMD-Vi fix: - Fix to preserve bits when updating device table entries * tag 'iommu-fixes-v6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux: iommu/vt-d: Fix suspicious RCU usage iommu/vt-d: Remove device comparison in context_setup_pass_through_cb iommu/amd: Preserve default DTE fields when updating Host Page Table Root commit 0fd7b2a432601997ad9f734e93125bc53ba20920 Merge: 00371a3f4877 d8df010f72b8 Author: Jakub Kicinski Date: Fri Feb 28 14:35:15 2025 -0800 Merge tag 'for-net-2025-02-27' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - mgmt: Check return of mgmt_alloc_skb - btusb: Initialize .owner field of force_poll_sync_fops * tag 'for-net-2025-02-27' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: Add check for mgmt_alloc_skb() in mgmt_device_connected() Bluetooth: Add check for mgmt_alloc_skb() in mgmt_remote_name() bluetooth: btusb: Initialize .owner field of force_poll_sync_fops ==================== Link: https://patch.msgid.link/20250227223802.3299088-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit c157d351460bcf202970e97e611cb6b54a3dd4a4 Author: Thomas Gleixner Date: Tue Feb 25 23:37:08 2025 +0100 intel_idle: Handle older CPUs, which stop the TSC in deeper C states, correctly The Intel idle driver is preferred over the ACPI processor idle driver, but fails to implement the work around for Core2 generation CPUs, where the TSC stops in C2 and deeper C-states. This causes stalls and boot delays, when the clocksource watchdog does not catch the unstable TSC before the CPU goes deep idle for the first time. The ACPI driver marks the TSC unstable when it detects that the CPU supports C2 or deeper and the CPU does not have a non-stop TSC. Add the equivivalent work around to the Intel idle driver to cure that. Fixes: 18734958e9bf ("intel_idle: Use ACPI _CST for processor models without C-state tables") Reported-by: Fab Stz Signed-off-by: Thomas Gleixner Tested-by: Fab Stz Cc: All applicable Closes: https://lore.kernel.org/all/10cf96aa-1276-4bd4-8966-c890377030c3@yahoo.fr Link: https://patch.msgid.link/87bjupfy7f.ffs@tglx Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 4 ++++ 1 file changed, 4 insertions(+) commit 276f98efb64a2c31c099465ace78d3054c662a0f Merge: 3e5d15dd83e1 b654f7a51ffb Author: Linus Torvalds Date: Fri Feb 28 09:43:46 2025 -0800 Merge tag 'block-6.14-20250228' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - Fix plugging for native zone writes - Fix segment limit settings for != 4K page size archs - Fix for slab names overflowing * tag 'block-6.14-20250228' of git://git.kernel.dk/linux: block: fix 'kmem_cache of name 'bio-108' already exists' block: Remove zone write plugs when handling native zone append writes block: make segment size limit workable for > 4K PAGE_SIZE commit 189ecdb3e112da703ac0699f4ec76aa78122f911 Author: Sean Christopherson Date: Thu Feb 27 14:24:10 2025 -0800 KVM: x86: Snapshot the host's DEBUGCTL after disabling IRQs Snapshot the host's DEBUGCTL after disabling IRQs, as perf can toggle debugctl bits from IRQ context, e.g. when enabling/disabling events via smp_call_function_single(). Taking the snapshot (long) before IRQs are disabled could result in KVM effectively clobbering DEBUGCTL due to using a stale snapshot. Cc: stable@vger.kernel.org Reviewed-and-tested-by: Ravi Bangoria Link: https://lore.kernel.org/r/20250227222411.3490595-6-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 433265870ab3455b418885bff48fa5fd02f7e448 Author: Sean Christopherson Date: Thu Feb 27 14:24:09 2025 -0800 KVM: SVM: Manually context switch DEBUGCTL if LBR virtualization is disabled Manually load the guest's DEBUGCTL prior to VMRUN (and restore the host's value on #VMEXIT) if it diverges from the host's value and LBR virtualization is disabled, as hardware only context switches DEBUGCTL if LBR virtualization is fully enabled. Running the guest with the host's value has likely been mildly problematic for quite some time, e.g. it will result in undesirable behavior if BTF diverges (with the caveat that KVM now suppresses guest BTF due to lack of support). But the bug became fatal with the introduction of Bus Lock Trap ("Detect" in kernel paralance) support for AMD (commit 408eb7417a92 ("x86/bus_lock: Add support for AMD")), as a bus lock in the guest will trigger an unexpected #DB. Note, suppressing the bus lock #DB, i.e. simply resuming the guest without injecting a #DB, is not an option. It wouldn't address the general issue with DEBUGCTL, e.g. for things like BTF, and there are other guest-visible side effects if BusLockTrap is left enabled. If BusLockTrap is disabled, then DR6.BLD is reserved-to-1; any attempts to clear it by software are ignored. But if BusLockTrap is enabled, software can clear DR6.BLD: Software enables bus lock trap by setting DebugCtl MSR[BLCKDB] (bit 2) to 1. When bus lock trap is enabled, ... The processor indicates that this #DB was caused by a bus lock by clearing DR6[BLD] (bit 11). DR6[11] previously had been defined to be always 1. and clearing DR6.BLD is "sticky" in that it's not set (i.e. lowered) by other #DBs: All other #DB exceptions leave DR6[BLD] unmodified E.g. leaving BusLockTrap enable can confuse a legacy guest that writes '0' to reset DR6. Reported-by: rangemachine@gmail.com Reported-by: whanos@sergal.fun Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219787 Closes: https://lore.kernel.org/all/bug-219787-28872@https.bugzilla.kernel.org%2F Cc: Ravi Bangoria Cc: stable@vger.kernel.org Reviewed-and-tested-by: Ravi Bangoria Link: https://lore.kernel.org/r/20250227222411.3490595-5-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/svm/svm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit fb71c795935652fa20eaf9517ca9547f5af99a76 Author: Sean Christopherson Date: Thu Feb 27 14:24:08 2025 -0800 KVM: x86: Snapshot the host's DEBUGCTL in common x86 Move KVM's snapshot of DEBUGCTL to kvm_vcpu_arch and take the snapshot in common x86, so that SVM can also use the snapshot. Opportunistically change the field to a u64. While bits 63:32 are reserved on AMD, not mentioned at all in Intel's SDM, and managed as an "unsigned long" by the kernel, DEBUGCTL is an MSR and therefore a 64-bit value. Reviewed-by: Xiaoyao Li Cc: stable@vger.kernel.org Reviewed-and-tested-by: Ravi Bangoria Link: https://lore.kernel.org/r/20250227222411.3490595-4-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/vmx/vmx.c | 8 ++------ arch/x86/kvm/vmx/vmx.h | 2 -- arch/x86/kvm/x86.c | 1 + 4 files changed, 4 insertions(+), 8 deletions(-) commit d0eac42f5cecce009d315655bee341304fbe075e Author: Sean Christopherson Date: Thu Feb 27 14:24:07 2025 -0800 KVM: SVM: Suppress DEBUGCTL.BTF on AMD Mark BTF as reserved in DEBUGCTL on AMD, as KVM doesn't actually support BTF, and fully enabling BTF virtualization is non-trivial due to interactions with the emulator, guest_debug, #DB interception, nested SVM, etc. Don't inject #GP if the guest attempts to set BTF, as there's no way to communicate lack of support to the guest, and instead suppress the flag and treat the WRMSR as (partially) unsupported. In short, make KVM behave the same on AMD and Intel (VMX already squashes BTF). Note, due to other bugs in KVM's handling of DEBUGCTL, the only way BTF has "worked" in any capacity is if the guest simultaneously enables LBRs. Reported-by: Ravi Bangoria Cc: stable@vger.kernel.org Reviewed-and-tested-by: Ravi Bangoria Link: https://lore.kernel.org/r/20250227222411.3490595-3-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/svm/svm.c | 9 +++++++++ arch/x86/kvm/svm/svm.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) commit ee89e8013383d50a27ea9bf3c8a69eed6799856f Author: Sean Christopherson Date: Thu Feb 27 14:24:06 2025 -0800 KVM: SVM: Drop DEBUGCTL[5:2] from guest's effective value Drop bits 5:2 from the guest's effective DEBUGCTL value, as AMD changed the architectural behavior of the bits and broke backwards compatibility. On CPUs without BusLockTrap (or at least, in APMs from before ~2023), bits 5:2 controlled the behavior of external pins: Performance-Monitoring/Breakpoint Pin-Control (PBi)—Bits 5:2, read/write. Software uses thesebits to control the type of information reported by the four external performance-monitoring/breakpoint pins on the processor. When a PBi bit is cleared to 0, the corresponding external pin (BPi) reports performance-monitor information. When a PBi bit is set to 1, the corresponding external pin (BPi) reports breakpoint information. With the introduction of BusLockTrap, presumably to be compatible with Intel CPUs, AMD redefined bit 2 to be BLCKDB: Bus Lock #DB Trap (BLCKDB)—Bit 2, read/write. Software sets this bit to enable generation of a #DB trap following successful execution of a bus lock when CPL is > 0. and redefined bits 5:3 (and bit 6) as "6:3 Reserved MBZ". Ideally, KVM would treat bits 5:2 as reserved. Defer that change to a feature cleanup to avoid breaking existing guest in LTS kernels. For now, drop the bits to retain backwards compatibility (of a sort). Note, dropping bits 5:2 is still a guest-visible change, e.g. if the guest is enabling LBRs *and* the legacy PBi bits, then the state of the PBi bits is visible to the guest, whereas now the guest will always see '0'. Reported-by: Ravi Bangoria Cc: stable@vger.kernel.org Reviewed-and-tested-by: Ravi Bangoria Link: https://lore.kernel.org/r/20250227222411.3490595-2-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/svm/svm.c | 12 ++++++++++++ arch/x86/kvm/svm/svm.h | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) commit f3513a335e71296a1851167b4e3b0e2bf09fc5f1 Author: Sean Christopherson Date: Mon Feb 24 08:54:42 2025 -0800 KVM: selftests: Assert that STI blocking isn't set after event injection Add an L1 (guest) assert to the nested exceptions test to verify that KVM doesn't put VMRUN in an STI shadow (AMD CPUs bleed the shadow into the guest's int_state if a #VMEXIT occurs before VMRUN fully completes). Add a similar assert to the VMX side as well, because why not. Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20250224165442.2338294-3-seanjc@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/x86/nested_exceptions_test.c | 2 ++ 1 file changed, 2 insertions(+) commit be45bc4eff33d9a7dae84a2150f242a91a617402 Author: Sean Christopherson Date: Mon Feb 24 08:54:41 2025 -0800 KVM: SVM: Set RFLAGS.IF=1 in C code, to get VMRUN out of the STI shadow Enable/disable local IRQs, i.e. set/clear RFLAGS.IF, in the common svm_vcpu_enter_exit() just after/before guest_state_{enter,exit}_irqoff() so that VMRUN is not executed in an STI shadow. AMD CPUs have a quirk (some would say "bug"), where the STI shadow bleeds into the guest's intr_state field if a #VMEXIT occurs during injection of an event, i.e. if the VMRUN doesn't complete before the subsequent #VMEXIT. The spurious "interrupts masked" state is relatively benign, as it only occurs during event injection and is transient. Because KVM is already injecting an event, the guest can't be in HLT, and if KVM is querying IRQ blocking for injection, then KVM would need to force an immediate exit anyways since injecting multiple events is impossible. However, because KVM copies int_state verbatim from vmcb02 to vmcb12, the spurious STI shadow is visible to L1 when running a nested VM, which can trip sanity checks, e.g. in VMware's VMM. Hoist the STI+CLI all the way to C code, as the aforementioned calls to guest_state_{enter,exit}_irqoff() already inform lockdep that IRQs are enabled/disabled, and taking a fault on VMRUN with RFLAGS.IF=1 is already possible. I.e. if there's kernel code that is confused by running with RFLAGS.IF=1, then it's already a problem. In practice, since GIF=0 also blocks NMIs, the only change in exposure to non-KVM code (relative to surrounding VMRUN with STI+CLI) is exception handling code, and except for the kvm_rebooting=1 case, all exception in the core VM-Enter/VM-Exit path are fatal. Use the "raw" variants to enable/disable IRQs to avoid tracing in the "no instrumentation" code; the guest state helpers also take care of tracing IRQ state. Oppurtunstically document why KVM needs to do STI in the first place. Reported-by: Doug Covelli Closes: https://lore.kernel.org/all/CADH9ctBs1YPmE4aCfGPNBwA10cA8RuAk2gO7542DjMZgs4uzJQ@mail.gmail.com Fixes: f14eec0a3203 ("KVM: SVM: move more vmentry code to assembly") Cc: stable@vger.kernel.org Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20250224165442.2338294-2-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/svm/svm.c | 14 ++++++++++++++ arch/x86/kvm/svm/vmenter.S | 10 +--------- 2 files changed, 15 insertions(+), 9 deletions(-) commit 3e5d15dd83e110da062d825be985529aa1d44029 Merge: ea185bdedb73 6ebf05189dfc Author: Linus Torvalds Date: Fri Feb 28 09:11:15 2025 -0800 Merge tag 'io_uring-6.14-20250228' of git://git.kernel.dk/linux Pull io_uring fix from Jens Axboe: "Just a single fix headed for stable, ensuring that msg_control is properly saved in compat mode as well" * tag 'io_uring-6.14-20250228' of git://git.kernel.dk/linux: io_uring/net: save msg_control for compat commit ea185bdedb738b9ace114dd6806e95ccd53c6c52 Merge: 76544811c850 e3cf2d91d058 Author: Linus Torvalds Date: Fri Feb 28 08:47:21 2025 -0800 Merge tag 'efi-fixes-for-v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI fixes from Ard Biesheuvel: "Another couple of EFI fixes for v6.14. Only James's patch stands out, as it implements a workaround for odd behavior in fwupd in user space, which creates EFI variables by touching a file in efivarfs, clearing the immutable bit (which gets set automatically for $reasons) and then opening it again for writing, none of which is really necessary. The fwupd author and LVFS maintainer is already rolling out a fix for this on the fwupd side, and suggested that the workaround in this PR could be backed out again during the next cycle. (There is a semantic mismatch in efivarfs where some essential variable attributes are stored in the first 4 bytes of the file, and so zero length files cannot exist, as they cannot be written back to the underlying variable store. So now, they are dropped once the last reference is released.) Summary: - Fix CPER error record parsing bugs - Fix a couple of efivarfs issues that were introduced in the merge window - Fix an issue in the early remapping code of the MOKvar table" * tag 'efi-fixes-for-v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi/mokvar-table: Avoid repeated map/unmap of the same page efi: Don't map the entire mokvar table to determine its size efivarfs: allow creation of zero length files efivarfs: Defer PM notifier registration until .fill_super efi/cper: Fix cper_arm_ctx_info alignment efi/cper: Fix cper_ia_proc_ctx alignment commit 911c288f9e662458fad969ea64ed1a206ca7229f Merge: d082ecbc71e9 9f3c507cb444 Author: Wolfram Sang Date: Fri Feb 28 17:27:44 2025 +0100 Merge tag 'i2c-host-fixes-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current i2c-host-fixes for v6.14-rc5 - npcm fixes interrupt initialization sequence. - ls2x fixes frequency setting. - amd-asf re-enables interrupts properly at irq handler's exit. commit 64407f4b5807dc9dec8135e1bfd45d2cb11b4ea0 Author: Dan Carpenter Date: Fri Feb 28 16:03:47 2025 +0300 gpiolib: Fix Oops in gpiod_direction_input_nonotify() The gpiod_direction_input_nonotify() function is supposed to return zero if the direction for the pin is input. But instead it accidentally returns GPIO_LINE_DIRECTION_IN (1) which will be cast into an ERR_PTR() in gpiochip_request_own_desc(). The callers dereference it and it leads to a crash. I changed gpiod_direction_output_raw_commit() just for consistency but returning GPIO_LINE_DIRECTION_OUT (0) is fine. Cc: stable@vger.kernel.org Fixes: 9d846b1aebbe ("gpiolib: check the return value of gpio_chip::get_direction()") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/254f3925-3015-4c9d-aac5-bb9b4b2cd2c5@stanley.mountain [Bartosz: moved the variable declarations to the top of the functions] Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit b654f7a51ffb386131de42aa98ed831f8c126546 Author: Ming Lei Date: Fri Feb 28 21:26:56 2025 +0800 block: fix 'kmem_cache of name 'bio-108' already exists' Device mapper bioset often has big bio_slab size, which can be more than 1000, then 8byte can't hold the slab name any more, cause the kmem_cache allocation warning of 'kmem_cache of name 'bio-108' already exists'. Fix the warning by extending bio_slab->name to 12 bytes, but fix output of /proc/slabinfo Reported-by: Guangwu Zhang Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250228132656.2838008-1-ming.lei@redhat.com Signed-off-by: Jens Axboe block/bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b150654f74bf0df8e6a7936d5ec51400d9ec06d8 Author: Lu Baolu Date: Fri Feb 28 18:27:26 2025 +0800 iommu/vt-d: Fix suspicious RCU usage Commit ("iommu/vt-d: Allocate DMAR fault interrupts locally") moved the call to enable_drhd_fault_handling() to a code path that does not hold any lock while traversing the drhd list. Fix it by ensuring the dmar_global_lock lock is held when traversing the drhd list. Without this fix, the following warning is triggered: ============================= WARNING: suspicious RCU usage 6.14.0-rc3 #55 Not tainted ----------------------------- drivers/iommu/intel/dmar.c:2046 RCU-list traversed in non-reader section!! other info that might help us debug this: rcu_scheduler_active = 1, debug_locks = 1 2 locks held by cpuhp/1/23: #0: ffffffff84a67c50 (cpu_hotplug_lock){++++}-{0:0}, at: cpuhp_thread_fun+0x87/0x2c0 #1: ffffffff84a6a380 (cpuhp_state-up){+.+.}-{0:0}, at: cpuhp_thread_fun+0x87/0x2c0 stack backtrace: CPU: 1 UID: 0 PID: 23 Comm: cpuhp/1 Not tainted 6.14.0-rc3 #55 Call Trace: dump_stack_lvl+0xb7/0xd0 lockdep_rcu_suspicious+0x159/0x1f0 ? __pfx_enable_drhd_fault_handling+0x10/0x10 enable_drhd_fault_handling+0x151/0x180 cpuhp_invoke_callback+0x1df/0x990 cpuhp_thread_fun+0x1ea/0x2c0 smpboot_thread_fn+0x1f5/0x2e0 ? __pfx_smpboot_thread_fn+0x10/0x10 kthread+0x12a/0x2d0 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x4a/0x60 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 Holding the lock in enable_drhd_fault_handling() triggers a lockdep splat about a possible deadlock between dmar_global_lock and cpu_hotplug_lock. This is avoided by not holding dmar_global_lock when calling iommu_device_register(), which initiates the device probe process. Fixes: d74169ceb0d2 ("iommu/vt-d: Allocate DMAR fault interrupts locally") Reported-and-tested-by: Ido Schimmel Closes: https://lore.kernel.org/linux-iommu/Zx9OwdLIc_VoQ0-a@shredder.mtl.com/ Tested-by: Breno Leitao Cc: stable@vger.kernel.org Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20250218022422.2315082-1-baolu.lu@linux.intel.com Tested-by: Ido Schimmel Signed-off-by: Joerg Roedel drivers/iommu/intel/dmar.c | 1 + drivers/iommu/intel/iommu.c | 7 +++++++ 2 files changed, 8 insertions(+) commit 64f792981e35e191eb619f6f2fefab76cc7d6112 Author: Jerry Snitselaar Date: Fri Feb 28 18:27:25 2025 +0800 iommu/vt-d: Remove device comparison in context_setup_pass_through_cb Remove the device comparison check in context_setup_pass_through_cb. pci_for_each_dma_alias already makes a decision on whether the callback function should be called for a device. With the check in place it will fail to create context entries for aliases as it walks up to the root bus. Fixes: 2031c469f816 ("iommu/vt-d: Add support for static identity domain") Closes: https://lore.kernel.org/linux-iommu/82499eb6-00b7-4f83-879a-e97b4144f576@linux.intel.com/ Cc: stable@vger.kernel.org Signed-off-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20250224180316.140123-1-jsnitsel@redhat.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel/iommu.c | 3 --- 1 file changed, 3 deletions(-) commit c5b0320bbf79548fbf058a3925a07c8f281beeab Author: Alejandro Jimenez Date: Mon Jan 6 19:14:13 2025 +0000 iommu/amd: Preserve default DTE fields when updating Host Page Table Root When updating the page table root field on the DTE, avoid overwriting any bits that are already set. The earlier call to make_clear_dte() writes default values that all DTEs must have set (currently DTE[V]), and those must be preserved. Currently this doesn't cause problems since the page table root update is the first field that is set after make_clear_dte() is called, and DTE_FLAG_V is set again later along with the permission bits (IR/IW). Remove this redundant assignment too. Fixes: fd5dff9de4be ("iommu/amd: Modify set_dte_entry() to use 256-bit DTE helpers") Signed-off-by: Alejandro Jimenez Reviewed-by: Dheeraj Kumar Srivastava Reviewed-by: Vasant Hegde Link: https://lore.kernel.org/r/20250106191413.3107140-1-alejandro.j.jimenez@oracle.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f479ecc5ef15ed8d774968c1a8726a49420f11a0 Author: Daniel Bárta Date: Thu Feb 27 17:12:55 2025 +0100 ALSA: hda: Fix speakers on ASUS EXPERTBOOK P5405CSA 1.0 After some digging around I have found that this laptop has Cirrus's smart aplifiers connected to SPI bus (spi1-CSC3551:00-cs35l41-hda). To get them correctly detected and working I had to modify patch_realtek.c with ASUS EXPERTBOOK P5405CSA 1.0 SystemID (0x1043, 0x1f63) and add corresponding hda_quirk (ALC245_FIXUP_CS35L41_SPI_2). Signed-off-by: Daniel Bárta Link: https://patch.msgid.link/20250227161256.18061-2-daniel.barta@trustlab.cz Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 12784ca33b62fd327631749e6a0cd2a10110a56c Author: Antheas Kapenekakis Date: Thu Feb 27 18:51:07 2025 +0100 ALSA: hda/realtek: Fix Asus Z13 2025 audio Use the basic quirk for this type of amplifier. Sound works in speakers, headphones, and microphone. Whereas none worked before. Tested-by: Kyle Gospodnetich Signed-off-by: Antheas Kapenekakis Link: https://patch.msgid.link/20250227175107.33432-3-lkml@antheas.dev Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 3414cda9d41f41703832d0abd01063dd8de82b89 Author: Antheas Kapenekakis Date: Thu Feb 27 18:51:06 2025 +0100 ALSA: hda/realtek: Remove (revert) duplicate Ally X config In commit 1e9c708dc3ae ("ALSA: hda/tas2781: Add new quirk for Lenovo, ASUS, Dell projects") Baojun adds a bunch of projects to the file, including for the Ally X. Turns out the initial Ally X was not sorted properly, so the kernel had 2 quirks for it. The previous quirk overrode the new one due to being earlier and they are different. When AB testing, the normal pin fixup seems to work ok but causes a bit of a minor popping. Given the other config is more complicated and may cause undefined behavior, revert it. Fixes: 1e9c708dc3ae ("ALSA: hda/tas2781: Add new quirk for Lenovo, ASUS, Dell projects") Signed-off-by: Antheas Kapenekakis Link: https://patch.msgid.link/20250227175107.33432-2-lkml@antheas.dev Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 8 -------- 1 file changed, 8 deletions(-) commit c72e455b89f216b43cd0dbb518036ec4c98f5c46 Author: Manuel Fombuena Date: Tue Feb 25 22:01:02 2025 +0000 leds: leds-st1202: Fix NULL pointer access on race condition st1202_dt_init() calls devm_led_classdev_register_ext() before the internal data structures are properly set up, so the LEDs become visible to user space while being partially initialized, leading to a window where trying to access them causes a NULL pointer access. Move devm_led_classdev_register_ext() from DT initialization to the end of the probe function when DT and hardware are fully initialized and ready to interact with user space. Fixes: 259230378c65 ("leds: Add LED1202 I2C driver") Signed-off-by: Manuel Fombuena Link: https://lore.kernel.org/r/CWLP123MB54732771AC0CE5491B3C84DCC5C32@CWLP123MB5473.GBRP123.PROD.OUTLOOK.COM Signed-off-by: Lee Jones drivers/leds/leds-st1202.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 76544811c850a1f4c055aa182b513b7a843868ea Merge: 1e15510b71c9 6a5884f20069 Author: Linus Torvalds Date: Thu Feb 27 21:17:58 2025 -0800 Merge tag 'drm-fixes-2025-02-28' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "This week's fixes pull, amdgpu mostly, with some xe and a few misc others, the fb defio fix is bit of a change, but it avoids some nasty NULL pointer crashes due to defio assuming page backing in places it didn't have pages. amdgpu: - Legacy dpm suspend/resume fix - Runtime PM fix for DELL G5 SE - MAINTAINERS updates - Enforce Isolation fixes - mailmap update - EDID reading i2c fix - PSR fix - eDP fix - HPD interrupt handling fix - Clear memory fix amdkfd: - MQD handling fix vkms: - fix rounding error imagination: - header fix nouveau: - connector status fix fb/defio: - NULL ptr fix for defio drivers i915: - Fix encoder HW state readout for DP UHBR MST xe: - OA uapi fix (Umesh) - Userptr related fixes - Remove a duplicated register entry - Scheduler related fix to prevent exec races when freeing it" * tag 'drm-fixes-2025-02-28' of https://gitlab.freedesktop.org/drm/kernel: (25 commits) drm/fbdev-dma: Add shadow buffering for deferred I/O drm/nouveau: Do not override forced connector status drm/i915/dp_mst: Fix encoder HW state readout for UHBR MST drm/xe: cancel pending job timer before freeing scheduler drm/xe/regs: remove a duplicate definition for RING_CTL_SIZE(size) drm/imagination: remove unnecessary header include path drm/amdgpu: init return value in amdgpu_ttm_clear_buffer drm/amd/display: Fix HPD after gpu reset drm/amd/display: add a quirk to enable eDP0 on DP1 drm/amd/display: Disable PSR-SU on eDP panels MAINTAINERS: Update AMDGPU DML maintainers info drm/amd/display: restore edid reading from a given i2c adapter mailmap: Add entry for Rodrigo Siqueira MAINTAINERS: Change my role from Maintainer to Reviewer drm/amdgpu/mes: keep enforce isolation up to date drm/amdgpu/gfx: only call mes for enforce isolation if supported MAINTAINERS: update amdgpu maintainers list drm/amdgpu: disable BAR resize on Dell G5 SE drm/amdkfd: Preserve cp_hqd_pq_control on update_mqd amdgpu/pm/legacy: fix suspend/resume issues ... commit 00371a3f48775967950c2fe3ec97b7c786ca956d Author: Philipp Stanner Date: Wed Feb 26 09:52:05 2025 +0100 stmmac: loongson: Pass correct arg to PCI function pcim_iomap_regions() should receive the driver's name as its third parameter, not the PCI device's name. Define the driver name with a macro and use it at the appropriate places, including pcim_iomap_regions(). Cc: stable@vger.kernel.org # v5.14+ Fixes: 30bba69d7db4 ("stmmac: pci: Add dwmac support for Loongson") Signed-off-by: Philipp Stanner Reviewed-by: Andrew Lunn Reviewed-by: Yanteng Si Tested-by: Henry Chen Link: https://patch.msgid.link/20250226085208.97891-2-phasta@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a16f88964c647103dad7743a484b216d488a6352 Author: Meir Elisha Date: Wed Feb 26 09:28:12 2025 +0200 nvmet-tcp: Fix a possible sporadic response drops in weakly ordered arch The order in which queue->cmd and rcv_state are updated is crucial. If these assignments are reordered by the compiler, the worker might not get queued in nvmet_tcp_queue_response(), hanging the IO. to enforce the the correct reordering, set rcv_state using smp_store_release(). Fixes: bdaf13279192 ("nvmet-tcp: fix a segmentation fault during io parsing error") Signed-off-by: Meir Elisha Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch drivers/nvme/target/tcp.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit ad95bab0cd28ed77c2c0d0b6e76e03e031391064 Author: Maurizio Lombardi Date: Wed Feb 26 14:42:18 2025 +0100 nvme-tcp: fix potential memory corruption in nvme_tcp_recv_pdu() nvme_tcp_recv_pdu() doesn't check the validity of the header length. When header digests are enabled, a target might send a packet with an invalid header length (e.g. 255), causing nvme_tcp_verify_hdgst() to access memory outside the allocated area and cause memory corruptions by overwriting it with the calculated digest. Fix this by rejecting packets with an unexpected header length. Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver") Signed-off-by: Maurizio Lombardi Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch drivers/nvme/host/tcp.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) commit a1a7eb89ca0b89dc1c326eeee2596f263291aca3 Author: Nikolay Kuratov Date: Thu Feb 6 12:01:56 2025 +0300 ftrace: Avoid potential division by zero in function_stat_show() Check whether denominator expression x * (x - 1) * 1000 mod {2^32, 2^64} produce zero and skip stddev computation in that case. For now don't care about rec->counter * rec->counter overflow because rec->time * rec->time overflow will likely happen earlier. Cc: stable@vger.kernel.org Cc: Wen Yang Cc: Mark Rutland Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250206090156.1561783-1-kniv@yandex-team.ru Fixes: e31f7939c1c27 ("ftrace: Avoid potential division by zero in function profiler") Signed-off-by: Nikolay Kuratov Signed-off-by: Steven Rostedt (Google) kernel/trace/ftrace.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit 3908b6baf2ac20138915b5ca98338b4f063954d8 Author: Heiko Carstens Date: Wed Feb 26 15:27:03 2025 +0100 selftests/ftrace: Let fprobe test consider already enabled functions The fprobe test fails on Fedora 41 since the fprobe test assumption that the number of enabled_functions is zero before the test starts is not necessarily true. Some user space tools, like systemd, add BPF programs that attach to functions. Those will show up in the enabled_functions table and must be taken into account by the fprobe test. Therefore count the number of lines of enabled_functions before tests start, and use that as base when comparing expected results. Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Alexander Gordeev Link: https://lore.kernel.org/20250226142703.910860-1-hca@linux.ibm.com Fixes: e85c5e9792b9 ("selftests/ftrace: Update fprobe test to check enabled_functions file") Signed-off-by: Heiko Carstens Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) .../ftrace/test.d/dynevent/add_remove_fprobe.tc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 6f86bdeab633a56d5c6dccf1a2c5989b6a5e323e Author: Steven Rostedt Date: Thu Feb 27 16:39:44 2025 -0500 tracing: Fix bad hist from corrupting named_triggers list The following commands causes a crash: ~# cd /sys/kernel/tracing/events/rcu/rcu_callback ~# echo 'hist:name=bad:keys=common_pid:onmax(bogus).save(common_pid)' > trigger bash: echo: write error: Invalid argument ~# echo 'hist:name=bad:keys=common_pid' > trigger Because the following occurs: event_trigger_write() { trigger_process_regex() { event_hist_trigger_parse() { data = event_trigger_alloc(..); event_trigger_register(.., data) { cmd_ops->reg(.., data, ..) [hist_register_trigger()] { data->ops->init() [event_hist_trigger_init()] { save_named_trigger(name, data) { list_add(&data->named_list, &named_triggers); } } } } ret = create_actions(); (return -EINVAL) if (ret) goto out_unreg; [..] ret = hist_trigger_enable(data, ...) { list_add_tail_rcu(&data->list, &file->triggers); <<<---- SKIPPED!!! (this is important!) [..] out_unreg: event_hist_unregister(.., data) { cmd_ops->unreg(.., data, ..) [hist_unregister_trigger()] { list_for_each_entry(iter, &file->triggers, list) { if (!hist_trigger_match(data, iter, named_data, false)) <- never matches continue; [..] test = iter; } if (test && test->ops->free) <<<-- test is NULL test->ops->free(test) [event_hist_trigger_free()] { [..] if (data->name) del_named_trigger(data) { list_del(&data->named_list); <<<<-- NEVER gets removed! } } } } [..] kfree(data); <<<-- frees item but it is still on list The next time a hist with name is registered, it causes an u-a-f bug and the kernel can crash. Move the code around such that if event_trigger_register() succeeds, the next thing called is hist_trigger_enable() which adds it to the list. A bunch of actions is called if get_named_trigger_data() returns false. But that doesn't need to be called after event_trigger_register(), so it can be moved up, allowing event_trigger_register() to be called just before hist_trigger_enable() keeping them together and allowing the file->triggers to be properly populated. Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250227163944.1c37f85f@gandalf.local.home Fixes: 067fe038e70f6 ("tracing: Add variable reference handling to hist triggers") Reported-by: Tomas Glozar Tested-by: Tomas Glozar Reviewed-by: Tom Zanussi Closes: https://lore.kernel.org/all/CAP4=nvTsxjckSBTz=Oe_UYh8keD9_sZC4i++4h72mJLic4_W4A@mail.gmail.com/ Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events_hist.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit ada9ce437a4da8e27243251bd7a9ecec32ebd72a Author: Antonio Quartulli Date: Thu Feb 27 02:21:26 2025 +0100 mailmap: remove unwanted entry for Antonio Quartulli antonio@openvpn.net is still used for sending patches under the OpenVPN Inc. umbrella, therefore this address should not be re-mapped. Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250227-b4-ovpn-v20-1-93f363310834@openvpn.net Signed-off-by: Jakub Kicinski .mailmap | 1 - 1 file changed, 1 deletion(-) commit 6a5884f200693eeffac4b008faf1e8bdf1c92af5 Merge: c98c94dbadc2 12c2f962fe71 Author: Dave Airlie Date: Fri Feb 28 10:45:58 2025 +1000 Merge tag 'drm-xe-fixes-2025-02-27' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes uAPI: - OA uapi fix (Umesh) Driver: - Userptr related fixes (Auld) - Remove a duplicated register entry (Mingong) - Scheduler related fix to prevent exec races when freeing it (Tejas) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Z8CSqJre1VCjPXt2@intel.com commit c98c94dbadc2a5ad204d2cc630695958eb100ba3 Merge: debda50ad512 16fef33fdb1e Author: Dave Airlie Date: Fri Feb 28 10:34:06 2025 +1000 Merge tag 'drm-intel-fixes-2025-02-27' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - Fix encoder HW state readout for DP UHBR MST (Imre) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Z8CRM7XzlerbWSJy@intel.com commit afb41b08c44e5386f2f52fa859010ac4afd2b66f Author: Maurizio Lombardi Date: Mon Feb 24 15:40:58 2025 +0100 nvme-tcp: Fix a C2HTermReq error message In H2CTermReq, a FES with value 0x05 means "R2T Limit Exceeded"; but in C2HTermReq the same value has a different meaning (Data Transfer Limit Exceeded). Fixes: 84e009042d0f ("nvme-tcp: add basic support for the C2HTermReq PDU") Signed-off-by: Maurizio Lombardi Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch drivers/nvme/host/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0979ff3676b1b4e6a20970bc265491d23c2da42b Author: Maurizio Lombardi Date: Thu Feb 27 20:00:05 2025 +0100 nvmet: remove old function prototype nvmet_subsys_nsid_exists() doesn't exist anymore Fixes: 74d16965d7ac ("nvmet-loop: avoid using mutex in IO hotpath") Signed-off-by: Maurizio Lombardi Signed-off-by: Keith Busch drivers/nvme/target/nvmet.h | 1 - 1 file changed, 1 deletion(-) commit debda50ad512b22264e7779a54c9033bf81b419e Merge: b06a731cbc1b 360399643299 Author: Dave Airlie Date: Fri Feb 28 07:50:47 2025 +1000 Merge tag 'drm-misc-fixes-2025-02-27' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes Fix a rounding error in vkms, a header fix for img, a connector status fix for nouveau, and a NULL pointer dereference fix for deferred IO drivers. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20250227-antique-robust-earthworm-09dfd1@houat commit d8df010f72b8a32aaea393e36121738bb53ed905 Author: Haoxiang Li Date: Fri Feb 21 16:58:01 2025 +0800 Bluetooth: Add check for mgmt_alloc_skb() in mgmt_device_connected() Add check for the return value of mgmt_alloc_skb() in mgmt_device_connected() to prevent null pointer dereference. Fixes: e96741437ef0 ("Bluetooth: mgmt: Make use of mgmt_send_event_skb in MGMT_EV_DEVICE_CONNECTED") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li Signed-off-by: Luiz Augusto von Dentz net/bluetooth/mgmt.c | 3 +++ 1 file changed, 3 insertions(+) commit f2176a07e7b19f73e05c805cf3d130a2999154cb Author: Haoxiang Li Date: Fri Feb 21 16:49:47 2025 +0800 Bluetooth: Add check for mgmt_alloc_skb() in mgmt_remote_name() Add check for the return value of mgmt_alloc_skb() in mgmt_remote_name() to prevent null pointer dereference. Fixes: ba17bb62ce41 ("Bluetooth: Fix skb allocation in mgmt_remote_name() & mgmt_device_connected()") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li Signed-off-by: Luiz Augusto von Dentz net/bluetooth/mgmt.c | 2 ++ 1 file changed, 2 insertions(+) commit cbf85b9cb80bec6345ffe0368dfff98386f4714f Author: Salah Triki Date: Fri Feb 21 22:32:59 2025 +0100 bluetooth: btusb: Initialize .owner field of force_poll_sync_fops Initialize .owner field of force_poll_sync_fops to THIS_MODULE in order to prevent btusb from being unloaded while its operations are in use. Fixes: 800fe5ec302e ("Bluetooth: btusb: Add support for queuing during polling interval") Signed-off-by: Salah Triki Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 1 + 1 file changed, 1 insertion(+) commit b06a731cbc1b9371874221c2caa8f490f6942f33 Merge: d082ecbc71e9 d3c7059b6a86 Author: Dave Airlie Date: Fri Feb 28 06:18:26 2025 +1000 Merge tag 'amd-drm-fixes-6.14-2025-02-26' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.14-2025-02-26: amdgpu: - Legacy dpm suspend/resume fix - Runtime PM fix for DELL G5 SE - MAINTAINERS updates - Enforce Isolation fixes - mailmap update - EDID reading i2c fix - PSR fix - eDP fix - HPD interrupt handling fix - Clear memory fix amdkfd: - MQD handling fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20250226200342.3685347-1-alexander.deucher@amd.com commit 2397d61ee45cddb8f3bd3a3a9840ef0f0b5aa843 Author: Christian Heusel Date: Mon Feb 24 09:32:59 2025 +0100 Revert "drivers/card_reader/rtsx_usb: Restore interrupt based detection" This reverts commit 235b630eda072d7e7b102ab346d6b8a2c028a772. This commit was found responsible for issues with SD card recognition, as users had to re-insert their cards in the readers and wait for a while. As for some people the SD card was involved in the boot process it also caused boot failures. Cc: stable@vger.kernel.org Link: https://bbs.archlinux.org/viewtopic.php?id=303321 Fixes: 235b630eda07 ("drivers/card_reader/rtsx_usb: Restore interrupt based detection") Reported-by: qf Closes: https://lore.kernel.org/all/1de87dfa-1e81-45b7-8dcb-ad86c21d5352@heusel.eu Signed-off-by: Christian Heusel Link: https://lore.kernel.org/r/20250224-revert-sdcard-patch-v1-1-d1a457fbb796@heusel.eu Signed-off-by: Greg Kroah-Hartman drivers/misc/cardreader/rtsx_usb.c | 15 --------------- 1 file changed, 15 deletions(-) commit c133ec0e5717868c9967fa3df92a55e537b1aead Author: Michal Pecio Date: Tue Feb 25 11:59:27 2025 +0200 usb: xhci: Enable the TRB overfetch quirk on VIA VL805 Raspberry Pi is a major user of those chips and they discovered a bug - when the end of a transfer ring segment is reached, up to four TRBs can be prefetched from the next page even if the segment ends with link TRB and on page boundary (the chip claims to support standard 4KB pages). It also appears that if the prefetched TRBs belong to a different ring whose doorbell is later rung, they may be used without refreshing from system RAM and the endpoint will stay idle if their cycle bit is stale. Other users complain about IOMMU faults on x86 systems, unsurprisingly. Deal with it by using existing quirk which allocates a dummy page after each transfer ring segment. This was seen to resolve both problems. RPi came up with a more efficient solution, shortening each segment by four TRBs, but it complicated the driver and they ditched it for this quirk. Also rename the quirk and add VL805 device ID macro. Signed-off-by: Michal Pecio Link: https://github.com/raspberrypi/linux/issues/4685 Closes: https://bugzilla.kernel.org/show_bug.cgi?id=215906 CC: stable@vger.kernel.org Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250225095927.2512358-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 3 ++- drivers/usb/host/xhci-pci.c | 10 +++++++--- drivers/usb/host/xhci.h | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) commit 82c387ef7568c0d96a918a5a78d9cad6256cfa15 Author: Thomas Gleixner Date: Mon Dec 16 14:20:56 2024 +0100 sched/core: Prevent rescheduling when interrupts are disabled David reported a warning observed while loop testing kexec jump: Interrupts enabled after irqrouter_resume+0x0/0x50 WARNING: CPU: 0 PID: 560 at drivers/base/syscore.c:103 syscore_resume+0x18a/0x220 kernel_kexec+0xf6/0x180 __do_sys_reboot+0x206/0x250 do_syscall_64+0x95/0x180 The corresponding interrupt flag trace: hardirqs last enabled at (15573): [] __up_console_sem+0x7e/0x90 hardirqs last disabled at (15580): [] __up_console_sem+0x63/0x90 That means __up_console_sem() was invoked with interrupts enabled. Further instrumentation revealed that in the interrupt disabled section of kexec jump one of the syscore_suspend() callbacks woke up a task, which set the NEED_RESCHED flag. A later callback in the resume path invoked cond_resched() which in turn led to the invocation of the scheduler: __cond_resched+0x21/0x60 down_timeout+0x18/0x60 acpi_os_wait_semaphore+0x4c/0x80 acpi_ut_acquire_mutex+0x3d/0x100 acpi_ns_get_node+0x27/0x60 acpi_ns_evaluate+0x1cb/0x2d0 acpi_rs_set_srs_method_data+0x156/0x190 acpi_pci_link_set+0x11c/0x290 irqrouter_resume+0x54/0x60 syscore_resume+0x6a/0x200 kernel_kexec+0x145/0x1c0 __do_sys_reboot+0xeb/0x240 do_syscall_64+0x95/0x180 This is a long standing problem, which probably got more visible with the recent printk changes. Something does a task wakeup and the scheduler sets the NEED_RESCHED flag. cond_resched() sees it set and invokes schedule() from a completely bogus context. The scheduler enables interrupts after context switching, which causes the above warning at the end. Quite some of the code paths in syscore_suspend()/resume() can result in triggering a wakeup with the exactly same consequences. They might not have done so yet, but as they share a lot of code with normal operations it's just a question of time. The problem only affects the PREEMPT_NONE and PREEMPT_VOLUNTARY scheduling models. Full preemption is not affected as cond_resched() is disabled and the preemption check preemptible() takes the interrupt disabled flag into account. Cure the problem by adding a corresponding check into cond_resched(). Reported-by: David Woodhouse Suggested-by: Peter Zijlstra Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Tested-by: David Woodhouse Cc: Linus Torvalds Cc: stable@vger.kernel.org Closes: https://lore.kernel.org/all/7717fe2ac0ce5f0a2c43fdab8b11f4483d54a2a4.camel@infradead.org kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b481ab0e6855fb30e2923c51f62f1662d1cda7e Author: Dave Airlie Date: Fri Feb 7 11:25:31 2025 +1000 drm/nouveau: select FW caching nouveau tries to load some firmware during suspend that it loaded earlier, but with fw caching disabled it hangs suspend, so just rely on FW cache enabling instead of working around it in the driver. Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM") Signed-off-by: Dave Airlie Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20250207012531.621369-1-airlied@gmail.com drivers/gpu/drm/nouveau/Kconfig | 1 + 1 file changed, 1 insertion(+) commit eed6bfa8b28230382b797a88569f2c7569a1a419 Author: Ryan Roberts Date: Wed Feb 26 12:06:53 2025 +0000 arm64: hugetlb: Fix flush_hugetlb_tlb_range() invalidation level commit c910f2b65518 ("arm64/mm: Update tlb invalidation routines for FEAT_LPA2") changed the "invalidation level unknown" hint from 0 to TLBI_TTL_UNKNOWN (INT_MAX). But the fallback "unknown level" path in flush_hugetlb_tlb_range() was not updated. So as it stands, when trying to invalidate CONT_PMD_SIZE or CONT_PTE_SIZE hugetlb mappings, we will spuriously try to invalidate at level 0 on LPA2-enabled systems. Fix this so that the fallback passes TLBI_TTL_UNKNOWN, and while we are at it, explicitly use the correct stride and level for CONT_PMD_SIZE and CONT_PTE_SIZE, which should provide a minor optimization. Cc: stable@vger.kernel.org Fixes: c910f2b65518 ("arm64/mm: Update tlb invalidation routines for FEAT_LPA2") Reviewed-by: Anshuman Khandual Reviewed-by: Catalin Marinas Signed-off-by: Ryan Roberts Link: https://lore.kernel.org/r/20250226120656.2400136-4-ryan.roberts@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/hugetlb.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 49c87f7677746f3c5bd16c81b23700bb6b88bfd4 Author: Ryan Roberts Date: Wed Feb 26 12:06:52 2025 +0000 arm64: hugetlb: Fix huge_ptep_get_and_clear() for non-present ptes arm64 supports multiple huge_pte sizes. Some of the sizes are covered by a single pte entry at a particular level (PMD_SIZE, PUD_SIZE), and some are covered by multiple ptes at a particular level (CONT_PTE_SIZE, CONT_PMD_SIZE). So the function has to figure out the size from the huge_pte pointer. This was previously done by walking the pgtable to determine the level and by using the PTE_CONT bit to determine the number of ptes at the level. But the PTE_CONT bit is only valid when the pte is present. For non-present pte values (e.g. markers, migration entries), the previous implementation was therefore erroneously determining the size. There is at least one known caller in core-mm, move_huge_pte(), which may call huge_ptep_get_and_clear() for a non-present pte. So we must be robust to this case. Additionally the "regular" ptep_get_and_clear() is robust to being called for non-present ptes so it makes sense to follow the behavior. Fix this by using the new sz parameter which is now provided to the function. Additionally when clearing each pte in a contig range, don't gather the access and dirty bits if the pte is not present. An alternative approach that would not require API changes would be to store the PTE_CONT bit in a spare bit in the swap entry pte for the non-present case. But it felt cleaner to follow other APIs' lead and just pass in the size. As an aside, PTE_CONT is bit 52, which corresponds to bit 40 in the swap entry offset field (layout of non-present pte). Since hugetlb is never swapped to disk, this field will only be populated for markers, which always set this bit to 0 and hwpoison swap entries, which set the offset field to a PFN; So it would only ever be 1 for a 52-bit PVA system where memory in that high half was poisoned (I think!). So in practice, this bit would almost always be zero for non-present ptes and we would only clear the first entry if it was actually a contiguous block. That's probably a less severe symptom than if it was always interpreted as 1 and cleared out potentially-present neighboring PTEs. Cc: stable@vger.kernel.org Fixes: 66b3923a1a0f ("arm64: hugetlb: add support for PTE contiguous bit") Reviewed-by: Catalin Marinas Signed-off-by: Ryan Roberts Link: https://lore.kernel.org/r/20250226120656.2400136-3-ryan.roberts@arm.com Signed-off-by: Will Deacon arch/arm64/mm/hugetlbpage.c | 53 +++++++++++++++++---------------------------- 1 file changed, 20 insertions(+), 33 deletions(-) commit 02410ac72ac3707936c07ede66e94360d0d65319 Author: Ryan Roberts Date: Wed Feb 26 12:06:51 2025 +0000 mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear() In order to fix a bug, arm64 needs to be told the size of the huge page for which the huge_pte is being cleared in huge_ptep_get_and_clear(). Provide for this by adding an `unsigned long sz` parameter to the function. This follows the same pattern as huge_pte_clear() and set_huge_pte_at(). This commit makes the required interface modifications to the core mm as well as all arches that implement this function (arm64, loongarch, mips, parisc, powerpc, riscv, s390, sparc). The actual arm64 bug will be fixed in a separate commit. Cc: stable@vger.kernel.org Fixes: 66b3923a1a0f ("arm64: hugetlb: add support for PTE contiguous bit") Acked-by: David Hildenbrand Reviewed-by: Alexandre Ghiti # riscv Reviewed-by: Christophe Leroy Reviewed-by: Catalin Marinas Reviewed-by: Anshuman Khandual Signed-off-by: Ryan Roberts Acked-by: Alexander Gordeev # s390 Link: https://lore.kernel.org/r/20250226120656.2400136-2-ryan.roberts@arm.com Signed-off-by: Will Deacon arch/arm64/include/asm/hugetlb.h | 4 ++-- arch/arm64/mm/hugetlbpage.c | 8 +++++--- arch/loongarch/include/asm/hugetlb.h | 6 ++++-- arch/mips/include/asm/hugetlb.h | 6 ++++-- arch/parisc/include/asm/hugetlb.h | 2 +- arch/parisc/mm/hugetlbpage.c | 2 +- arch/powerpc/include/asm/hugetlb.h | 6 ++++-- arch/riscv/include/asm/hugetlb.h | 3 ++- arch/riscv/mm/hugetlbpage.c | 2 +- arch/s390/include/asm/hugetlb.h | 16 ++++++++++++---- arch/s390/mm/hugetlbpage.c | 4 ++-- arch/sparc/include/asm/hugetlb.h | 2 +- arch/sparc/mm/hugetlbpage.c | 2 +- include/asm-generic/hugetlb.h | 2 +- include/linux/hugetlb.h | 4 +++- mm/hugetlb.c | 4 ++-- 16 files changed, 46 insertions(+), 27 deletions(-) commit 1e15510b71c99c6e49134d756df91069f7d18141 Merge: f09d694cf799 54e1b4becf5e Author: Linus Torvalds Date: Thu Feb 27 09:32:42 2025 -0800 Merge tag 'net-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from bluetooth. We didn't get netfilter or wireless PRs this week, so next week's PR is probably going to be bigger. A healthy dose of fixes for bugs introduced in the current release nonetheless. Current release - regressions: - Bluetooth: always allow SCO packets for user channel - af_unix: fix memory leak in unix_dgram_sendmsg() - rxrpc: - remove redundant peer->mtu_lock causing lockdep splats - fix spinlock flavor issues with the peer record hash - eth: iavf: fix circular lock dependency with netdev_lock - net: use rtnl_net_dev_lock() in register_netdevice_notifier_dev_net() RDMA driver register notifier after the device Current release - new code bugs: - ethtool: fix ioctl confusing drivers about desired HDS user config - eth: ixgbe: fix media cage present detection for E610 device Previous releases - regressions: - loopback: avoid sending IP packets without an Ethernet header - mptcp: reset connection when MPTCP opts are dropped after join Previous releases - always broken: - net: better track kernel sockets lifetime - ipv6: fix dst ref loop on input in seg6 and rpl lw tunnels - phy: qca807x: use right value from DTS for DAC_DSP_BIAS_CURRENT - eth: enetc: number of error handling fixes - dsa: rtl8366rb: reshuffle the code to fix config / build issue with LED support" * tag 'net-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (53 commits) net: ti: icss-iep: Reject perout generation request idpf: fix checksums set in idpf_rx_rsc() selftests: drv-net: Check if combined-count exists net: ipv6: fix dst ref loop on input in rpl lwt net: ipv6: fix dst ref loop on input in seg6 lwt usbnet: gl620a: fix endpoint checking in genelink_bind() net/mlx5: IRQ, Fix null string in debug print net/mlx5: Restore missing trace event when enabling vport QoS net/mlx5: Fix vport QoS cleanup on error net: mvpp2: cls: Fixed Non IP flow, with vlan tag flow defination. af_unix: Fix memory leak in unix_dgram_sendmsg() net: Handle napi_schedule() calls from non-interrupt net: Clear old fragment checksum value in napi_reuse_skb gve: unlink old napi when stopping a queue using queue API net: Use rtnl_net_dev_lock() in register_netdevice_notifier_dev_net(). tcp: Defer ts_recent changes until req is owned net: enetc: fix the off-by-one issue in enetc_map_tx_tso_buffs() net: enetc: remove the mm_lock from the ENETC v4 driver net: enetc: add missing enetc4_link_deinit() net: enetc: update UDP checksum when updating originTimestamp field ... commit e3cf2d91d0583cae70aeb512da87e3ade25ea912 Author: Ard Biesheuvel Date: Thu Feb 27 14:30:22 2025 +0100 efi/mokvar-table: Avoid repeated map/unmap of the same page Tweak the logic that traverses the MOKVAR UEFI configuration table to only unmap the entry header and map the next one if they don't live in the same physical page. Link: https://lore.kernel.org/all/8f085931-3e9d-4386-9209-1d6c95616327@uncooperative.org/ Tested-By: Peter Jones Signed-off-by: Ard Biesheuvel drivers/firmware/efi/mokvar-table.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 2b90e7ace79774a3540ce569e000388f8d22c9e0 Author: Peter Jones Date: Wed Feb 26 15:18:39 2025 -0500 efi: Don't map the entire mokvar table to determine its size Currently, when validating the mokvar table, we (re)map the entire table on each iteration of the loop, adding space as we discover new entries. If the table grows over a certain size, this fails due to limitations of early_memmap(), and we get a failure and traceback: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at mm/early_ioremap.c:139 __early_ioremap+0xef/0x220 ... Call Trace: ? __early_ioremap+0xef/0x220 ? __warn.cold+0x93/0xfa ? __early_ioremap+0xef/0x220 ? report_bug+0xff/0x140 ? early_fixup_exception+0x5d/0xb0 ? early_idt_handler_common+0x2f/0x3a ? __early_ioremap+0xef/0x220 ? efi_mokvar_table_init+0xce/0x1d0 ? setup_arch+0x864/0xc10 ? start_kernel+0x6b/0xa10 ? x86_64_start_reservations+0x24/0x30 ? x86_64_start_kernel+0xed/0xf0 ? common_startup_64+0x13e/0x141 ---[ end trace 0000000000000000 ]--- mokvar: Failed to map EFI MOKvar config table pa=0x7c4c3000, size=265187. Mapping the entire structure isn't actually necessary, as we don't ever need more than one entry header mapped at once. Changes efi_mokvar_table_init() to only map each entry header, not the entire table, when determining the table size. Since we're not mapping any data past the variable name, it also changes the code to enforce that each variable name is NUL terminated, rather than attempting to verify it in place. Cc: Signed-off-by: Peter Jones Signed-off-by: Ard Biesheuvel drivers/firmware/efi/mokvar-table.c | 41 ++++++++++++------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) commit f09d694cf799d27d6de25f04f3fd5ba9190631e1 Merge: dd83757f6e68 fe1544deda60 Author: Linus Torvalds Date: Thu Feb 27 08:41:19 2025 -0800 Merge tag 'sound-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of fixes. The only slightly large change is for ASoC Cirrus codec, but that's still in a normal range. All the rest are small device-specific fixes and should be fairly safe to take" * tag 'sound-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Fix microphone regression on ASUS N705UD ALSA: hda/realtek: Fix wrong mic setup for ASUS VivoBook 15 ASoC: cs35l56: Prevent races when soft-resetting using SPI control firmware: cs_dsp: Remove async regmap writes ASoC: Intel: sof_sdw: warn both sdw and pch dmic are used ASoC: SOF: Intel: don't check number of sdw links when set dmic_fixup ASoC: dapm-graph: set fill colour of turned on nodes ASoC: fsl: Rename stream name of SAI DAI driver ASoC: es8328: fix route from DAC to output ALSA: usb-audio: Re-add sample rate quirk for Pioneer DJM-900NXS2 ASoC: tas2764: Set the SDOUT polarity correctly ASoC: tas2764: Fix power control mask ALSA: usb-audio: Avoid dropping MIDI events at closing multiple ports ASoC: tas2770: Fix volume scale commit 54e1b4becf5e220be03db4e1be773c1310e8cbbd Author: Meghana Malladi Date: Thu Feb 27 14:54:41 2025 +0530 net: ti: icss-iep: Reject perout generation request IEP driver supports both perout and pps signal generation but perout feature is faulty with half-cooked support due to some missing configuration. Remove perout support from the driver and reject perout requests with "not supported" error code. Fixes: c1e0230eeaab2 ("net: ti: icss-iep: Add IEP driver") Signed-off-by: Meghana Malladi Reviewed-by: Vadim Fedorenko Link: https://patch.msgid.link/20250227092441.1848419-1-m-malladi@ti.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/icssg/icss_iep.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit 674fcb4f4a7e3e277417a01788cc6daae47c3804 Author: Eric Dumazet Date: Wed Feb 26 22:12:52 2025 +0000 idpf: fix checksums set in idpf_rx_rsc() idpf_rx_rsc() uses skb_transport_offset(skb) while the transport header is not set yet. This triggers the following warning for CONFIG_DEBUG_NET=y builds. DEBUG_NET_WARN_ON_ONCE(!skb_transport_header_was_set(skb)) [ 69.261620] WARNING: CPU: 7 PID: 0 at ./include/linux/skbuff.h:3020 idpf_vport_splitq_napi_poll (include/linux/skbuff.h:3020) idpf [ 69.261629] Modules linked in: vfat fat dummy bridge intel_uncore_frequency_tpmi intel_uncore_frequency_common intel_vsec_tpmi idpf intel_vsec cdc_ncm cdc_eem cdc_ether usbnet mii xhci_pci xhci_hcd ehci_pci ehci_hcd libeth [ 69.261644] CPU: 7 UID: 0 PID: 0 Comm: swapper/7 Tainted: G S W 6.14.0-smp-DEV #1697 [ 69.261648] Tainted: [S]=CPU_OUT_OF_SPEC, [W]=WARN [ 69.261650] RIP: 0010:idpf_vport_splitq_napi_poll (include/linux/skbuff.h:3020) idpf [ 69.261677] ? __warn (kernel/panic.c:242 kernel/panic.c:748) [ 69.261682] ? idpf_vport_splitq_napi_poll (include/linux/skbuff.h:3020) idpf [ 69.261687] ? report_bug (lib/bug.c:?) [ 69.261690] ? handle_bug (arch/x86/kernel/traps.c:285) [ 69.261694] ? exc_invalid_op (arch/x86/kernel/traps.c:309) [ 69.261697] ? asm_exc_invalid_op (arch/x86/include/asm/idtentry.h:621) [ 69.261700] ? __pfx_idpf_vport_splitq_napi_poll (drivers/net/ethernet/intel/idpf/idpf_txrx.c:4011) idpf [ 69.261704] ? idpf_vport_splitq_napi_poll (include/linux/skbuff.h:3020) idpf [ 69.261708] ? idpf_vport_splitq_napi_poll (drivers/net/ethernet/intel/idpf/idpf_txrx.c:3072) idpf [ 69.261712] __napi_poll (net/core/dev.c:7194) [ 69.261716] net_rx_action (net/core/dev.c:7265) [ 69.261718] ? __qdisc_run (net/sched/sch_generic.c:293) [ 69.261721] ? sched_clock (arch/x86/include/asm/preempt.h:84 arch/x86/kernel/tsc.c:288) [ 69.261726] handle_softirqs (kernel/softirq.c:561) Fixes: 3a8845af66edb ("idpf: add RX splitq napi poll support") Signed-off-by: Eric Dumazet Cc: Alan Brady Cc: Joshua Hay Cc: Willem de Bruijn Acked-by: Przemek Kitszel Link: https://patch.msgid.link/20250226221253.1927782-1-edumazet@google.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/idpf/idpf_txrx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1cbddbddee68d17feb6467fc556c144777af91ef Author: Joe Damato Date: Wed Feb 26 18:19:57 2025 +0000 selftests: drv-net: Check if combined-count exists Some drivers, like tg3, do not set combined-count: $ ethtool -l enp4s0f1 Channel parameters for enp4s0f1: Pre-set maximums: RX: 4 TX: 4 Other: n/a Combined: n/a Current hardware settings: RX: 4 TX: 1 Other: n/a Combined: n/a In the case where combined-count is not set, the ethtool netlink code in the kernel elides the value and the code in the test: netnl.channels_get(...) With a tg3 device, the returned dictionary looks like: {'header': {'dev-index': 3, 'dev-name': 'enp4s0f1'}, 'rx-max': 4, 'rx-count': 4, 'tx-max': 4, 'tx-count': 1} Note that the key 'combined-count' is missing. As a result of this missing key the test raises an exception: # Exception| if channels['combined-count'] == 0: # Exception| ~~~~~~~~^^^^^^^^^^^^^^^^^^ # Exception| KeyError: 'combined-count' Change the test to check if 'combined-count' is a key in the dictionary first and if not assume that this means the driver has separate RX and TX queues. With this change, the test now passes successfully on tg3 and mlx5 (which does have a 'combined-count'). Fixes: 1cf270424218 ("net: selftest: add test for netdev netlink queue-get API") Signed-off-by: Joe Damato Reviewed-by: David Wei Link: https://patch.msgid.link/20250226181957.212189-1-jdamato@fastly.com Signed-off-by: Jakub Kicinski tools/testing/selftests/drivers/net/queues.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit c907db8d447b48454a2026740d2636370641053f Merge: 1cf9631d836b 13e55fbaec17 Author: Paolo Abeni Date: Thu Feb 27 14:18:24 2025 +0100 Merge branch 'fixes-for-seg6-and-rpl-lwtunnels-on-input' Justin Iurman says: ==================== fixes for seg6 and rpl lwtunnels on input As a follow up to commit 92191dd10730 ("net: ipv6: fix dst ref loops in rpl, seg6 and ioam6 lwtunnels"), we also need a conditional dst cache on input for seg6_iptunnel and rpl_iptunnel to prevent dst ref loops (i.e., if the packet destination did not change, we may end up recording a reference to the lwtunnel in its own cache, and the lwtunnel state will never be freed). This series provides a fix to respectively prevent a dst ref loop on input in seg6_iptunnel and rpl_iptunnel. v2: - https://lore.kernel.org/netdev/20250211221624.18435-1-justin.iurman@uliege.be/ v1: - https://lore.kernel.org/netdev/20250209193840.20509-1-justin.iurman@uliege.be/ ==================== Link: https://patch.msgid.link/20250225175139.25239-1-justin.iurman@uliege.be Signed-off-by: Paolo Abeni commit 13e55fbaec176119cff68a7e1693b251c8883c5f Author: Justin Iurman Date: Tue Feb 25 18:51:39 2025 +0100 net: ipv6: fix dst ref loop on input in rpl lwt Prevent a dst ref loop on input in rpl_iptunnel. Fixes: a7a29f9c361f ("net: ipv6: add rpl sr tunnel") Cc: Alexander Aring Cc: Ido Schimmel Reviewed-by: Ido Schimmel Signed-off-by: Justin Iurman Signed-off-by: Paolo Abeni net/ipv6/rpl_iptunnel.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit c64a0727f9b1cbc63a5538c8c0014e9a175ad864 Author: Justin Iurman Date: Tue Feb 25 18:51:38 2025 +0100 net: ipv6: fix dst ref loop on input in seg6 lwt Prevent a dst ref loop on input in seg6_iptunnel. Fixes: af4a2209b134 ("ipv6: sr: use dst_cache in seg6_input") Cc: David Lebrun Cc: Ido Schimmel Reviewed-by: Ido Schimmel Signed-off-by: Justin Iurman Signed-off-by: Paolo Abeni net/ipv6/seg6_iptunnel.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 1cf9631d836b289bd5490776551961c883ae8a4f Author: Nikita Zhandarovich Date: Mon Feb 24 20:29:17 2025 +0300 usbnet: gl620a: fix endpoint checking in genelink_bind() Syzbot reports [1] a warning in usb_submit_urb() triggered by inconsistencies between expected and actually present endpoints in gl620a driver. Since genelink_bind() does not properly verify whether specified eps are in fact provided by the device, in this case, an artificially manufactured one, one may get a mismatch. Fix the issue by resorting to a usbnet utility function usbnet_get_endpoints(), usually reserved for this very problem. Check for endpoints and return early before proceeding further if any are missing. [1] Syzbot report: usb 5-1: Manufacturer: syz usb 5-1: SerialNumber: syz usb 5-1: config 0 descriptor?? gl620a 5-1:0.23 usb0: register 'gl620a' at usb-dummy_hcd.0-1, ... ------------[ cut here ]------------ usb 5-1: BOGUS urb xfer, pipe 3 != type 1 WARNING: CPU: 2 PID: 1841 at drivers/usb/core/urb.c:503 usb_submit_urb+0xe4b/0x1730 drivers/usb/core/urb.c:503 Modules linked in: CPU: 2 UID: 0 PID: 1841 Comm: kworker/2:2 Not tainted 6.12.0-syzkaller-07834-g06afb0f36106 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: mld mld_ifc_work RIP: 0010:usb_submit_urb+0xe4b/0x1730 drivers/usb/core/urb.c:503 ... Call Trace: usbnet_start_xmit+0x6be/0x2780 drivers/net/usb/usbnet.c:1467 __netdev_start_xmit include/linux/netdevice.h:5002 [inline] netdev_start_xmit include/linux/netdevice.h:5011 [inline] xmit_one net/core/dev.c:3590 [inline] dev_hard_start_xmit+0x9a/0x7b0 net/core/dev.c:3606 sch_direct_xmit+0x1ae/0xc30 net/sched/sch_generic.c:343 __dev_xmit_skb net/core/dev.c:3827 [inline] __dev_queue_xmit+0x13d4/0x43e0 net/core/dev.c:4400 dev_queue_xmit include/linux/netdevice.h:3168 [inline] neigh_resolve_output net/core/neighbour.c:1514 [inline] neigh_resolve_output+0x5bc/0x950 net/core/neighbour.c:1494 neigh_output include/net/neighbour.h:539 [inline] ip6_finish_output2+0xb1b/0x2070 net/ipv6/ip6_output.c:141 __ip6_finish_output net/ipv6/ip6_output.c:215 [inline] ip6_finish_output+0x3f9/0x1360 net/ipv6/ip6_output.c:226 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip6_output+0x1f8/0x540 net/ipv6/ip6_output.c:247 dst_output include/net/dst.h:450 [inline] NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] mld_sendpack+0x9f0/0x11d0 net/ipv6/mcast.c:1819 mld_send_cr net/ipv6/mcast.c:2120 [inline] mld_ifc_work+0x740/0xca0 net/ipv6/mcast.c:2651 process_one_work+0x9c5/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Reported-by: syzbot+d693c07c6f647e0388d3@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=d693c07c6f647e0388d3 Fixes: 47ee3051c856 ("[PATCH] USB: usbnet (5/9) module for genesys gl620a cables") Cc: stable@vger.kernel.org Signed-off-by: Nikita Zhandarovich Link: https://patch.msgid.link/20250224172919.1220522-1-n.zhandarovich@fintech.ru Signed-off-by: Paolo Abeni drivers/net/usb/gl620a.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit fc20737d8b85691ecabab3739ed7d06c9b7bc00f Author: James Bottomley Date: Wed Feb 26 16:48:26 2025 -0500 efivarfs: allow creation of zero length files Temporarily allow the creation of zero length files in efivarfs so the 'fwupd' user space firmware update tool can continue to operate. This hack should be reverted as soon as the fwupd mechanisms for updating firmware have been fixed. fwupd has been coded to open a firmware file, close it, remove the immutable bit and write to it. Since commit 908af31f4896 ("efivarfs: fix error on write to new variable leaving remnants") this behaviour results in the first close removing the file which causes the second write to fail. To allow fwupd to keep working code up an indicator of size 1 if a write fails and only remove the file on that condition (so create at zero size is allowed). Tested-by: Richard Hughes Signed-off-by: James Bottomley [ardb: replace LVFS with fwupd, as suggested by Richard] Signed-off-by: Ard Biesheuvel fs/efivarfs/file.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 6d48ad04075729519f6baaa1dc9e5a3a39d05f53 Author: Xi Ruoyao Date: Wed Feb 26 21:28:41 2025 +0800 MIPS: Ignore relocs against __ex_table for relocatable kernel Since commit 6f2c2f93a190 ("scripts/sorttable: Remove unneeded Elf_Rel"), sorttable no longer clears relocs against __ex_table, claiming "it was never used." But in fact MIPS relocatable kernel had been implicitly depending on this behavior, so after this commit the MIPS relocatable kernel has started to spit oops like: CPU 1 Unable to handle kernel paging request at virtual address 000000fffbbdbff8, epc == ffffffff818f9a6c, ra == ffffffff813ad7d0 ... ... Call Trace: [] __raw_copy_from_user+0x48/0x2fc [] cp_statx+0x1a0/0x1e0 [] do_statx_fd+0xa8/0x118 [] sys_statx+0xd8/0xf8 [] syscall_common+0x34/0x58 So ignore those relocs on our own to fix the issue. Fixes: 6f2c2f93a190 ("scripts/sorttable: Remove unneeded Elf_Rel") Signed-off-by: Xi Ruoyao Signed-off-by: Thomas Bogendoerfer arch/mips/boot/tools/relocs.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3603996432997f7c88da37a97062a46cda01ac9d Author: Thomas Zimmermann Date: Wed Dec 11 10:06:28 2024 +0100 drm/fbdev-dma: Add shadow buffering for deferred I/O DMA areas are not necessarily backed by struct page, so we cannot rely on it for deferred I/O. Allocate a shadow buffer for drivers that require deferred I/O and use it as framebuffer memory. Fixes driver errors about being "Unable to handle kernel NULL pointer dereference at virtual address" or "Unable to handle kernel paging request at virtual address". The patch splits drm_fbdev_dma_driver_fbdev_probe() in an initial allocation, which creates the DMA-backed buffer object, and a tail that sets up the fbdev data structures. There is a tail function for direct memory mappings and a tail function for deferred I/O with the shadow buffer. It is no longer possible to use deferred I/O without shadow buffer. It can be re-added if there exists a reliably test for usable struct page in the allocated DMA-backed buffer object. Signed-off-by: Thomas Zimmermann Reported-by: Nuno Gonçalves CLoses: https://lore.kernel.org/dri-devel/CAEXMXLR55DziAMbv_+2hmLeH-jP96pmit6nhs6siB22cpQFr9w@mail.gmail.com/ Tested-by: Nuno Gonçalves Fixes: 5ab91447aa13 ("drm/tiny/ili9225: Use fbdev-dma") Cc: Thomas Zimmermann Cc: # v6.11+ Reviewed-by: Simona Vetter Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20241211090643.74250-1-tzimmermann@suse.de drivers/gpu/drm/drm_fbdev_dma.c | 217 ++++++++++++++++++++++++++++------------ 1 file changed, 155 insertions(+), 62 deletions(-) commit e521f516716de7895acd1b5b7fac788214a390b9 Author: Caleb Connolly Date: Sat Feb 8 22:30:54 2025 +0000 dmaengine: Revert "dmaengine: qcom: bam_dma: Avoid writing unavailable register" This commit causes a hard crash on sdm845 and likely other platforms. Revert it until a proper fix is found. This reverts commit 57a7138d0627: ("dmaengine: qcom: bam_dma: Avoid writing unavailable register") Signed-off-by: Caleb Connolly Fixes: 57a7138d0627 ("dmaengine: qcom: bam_dma: Avoid writing unavailable register") Tested-by: Neil Armstrong # on sdm845-DB845c Tested-by: David Heidelberg Link: https://lore.kernel.org/r/20250208223112.142567-1-caleb.connolly@linaro.org Signed-off-by: Vinod Koul drivers/dma/qcom/bam_dma.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit 61944723258ae48ccd659d45f4e7e37c8166fdf0 Merge: 2d253726ff71 2f5a6014eb16 Author: Jakub Kicinski Date: Wed Feb 26 19:29:48 2025 -0800 Merge branch 'mlx5-misc-fixes-2025-02-25' Tariq Toukan says: ==================== mlx5 misc fixes 2025-02-25 This small patchset provides misc bug fixes from the team to the mlx5 core driver. ==================== Link: https://patch.msgid.link/20250225072608.526866-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 2f5a6014eb168a97b24153adccfa663d3b282767 Author: Shay Drory Date: Tue Feb 25 09:26:08 2025 +0200 net/mlx5: IRQ, Fix null string in debug print irq_pool_alloc() debug print can print a null string. Fix it by providing a default string to print. Fixes: 71e084e26414 ("net/mlx5: Allocating a pool of MSI-X vectors for SFs") Signed-off-by: Shay Drory Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501141055.SwfIphN0-lkp@intel.com/ Reviewed-by: Moshe Shemesh Signed-off-by: Tariq Toukan Reviewed-by: Kalesh AP Link: https://patch.msgid.link/20250225072608.526866-4-tariqt@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47bcd9bf3d231bfd4698d7d3013597490fd5e2d6 Author: Carolina Jubran Date: Tue Feb 25 09:26:07 2025 +0200 net/mlx5: Restore missing trace event when enabling vport QoS Restore the `trace_mlx5_esw_vport_qos_create` event when creating the vport scheduling element. This trace event was lost during refactoring. Fixes: be034baba83e ("net/mlx5: Make vport QoS enablement more flexible for future extensions") Signed-off-by: Carolina Jubran Reviewed-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250225072608.526866-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c | 3 +++ 1 file changed, 3 insertions(+) commit 7f3528f7d2f98b70e19a6bb7b130fc82c079ac54 Author: Carolina Jubran Date: Tue Feb 25 09:26:06 2025 +0200 net/mlx5: Fix vport QoS cleanup on error When enabling vport QoS fails, the scheduling node was never freed, causing a leak. Add the missing free and reset the vport scheduling node pointer to NULL. Fixes: be034baba83e ("net/mlx5: Make vport QoS enablement more flexible for future extensions") Signed-off-by: Carolina Jubran Reviewed-by: Cosmin Ratiu Reviewed-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250225072608.526866-2-tariqt@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2d253726ff7106b39a44483b6864398bba8a2f74 Author: Harshal Chaudhari Date: Mon Feb 24 20:20:58 2025 -0800 net: mvpp2: cls: Fixed Non IP flow, with vlan tag flow defination. Non IP flow, with vlan tag not working as expected while running below command for vlan-priority. fixed that. ethtool -N eth1 flow-type ether vlan 0x8000 vlan-mask 0x1fff action 0 loc 0 Fixes: 1274daede3ef ("net: mvpp2: cls: Add steering based on vlan Id and priority.") Signed-off-by: Harshal Chaudhari Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/20250225042058.2643838-1-hchaudhari@marvell.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc23d4e30866011700787bab8563de45d5bf8431 Author: Adrian Huang Date: Tue Feb 25 10:14:57 2025 +0800 af_unix: Fix memory leak in unix_dgram_sendmsg() After running the 'sendmsg02' program of Linux Test Project (LTP), kmemleak reports the following memory leak: # cat /sys/kernel/debug/kmemleak unreferenced object 0xffff888243866800 (size 2048): comm "sendmsg02", pid 67, jiffies 4294903166 hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 5e 00 00 00 00 00 00 00 ........^....... 01 00 07 40 00 00 00 00 00 00 00 00 00 00 00 00 ...@............ backtrace (crc 7e96a3f2): kmemleak_alloc+0x56/0x90 kmem_cache_alloc_noprof+0x209/0x450 sk_prot_alloc.constprop.0+0x60/0x160 sk_alloc+0x32/0xc0 unix_create1+0x67/0x2b0 unix_create+0x47/0xa0 __sock_create+0x12e/0x200 __sys_socket+0x6d/0x100 __x64_sys_socket+0x1b/0x30 x64_sys_call+0x7e1/0x2140 do_syscall_64+0x54/0x110 entry_SYSCALL_64_after_hwframe+0x76/0x7e Commit 689c398885cc ("af_unix: Defer sock_put() to clean up path in unix_dgram_sendmsg().") defers sock_put() in the error handling path. However, it fails to account for the condition 'msg->msg_namelen != 0', resulting in a memory leak when the code jumps to the 'lookup' label. Fix issue by calling sock_put() if 'msg->msg_namelen != 0' is met. Fixes: 689c398885cc ("af_unix: Defer sock_put() to clean up path in unix_dgram_sendmsg().") Signed-off-by: Adrian Huang Acked-by: Joe Damato Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250225021457.1824-1-ahuang12@lenovo.com Signed-off-by: Jakub Kicinski net/unix/af_unix.c | 1 + 1 file changed, 1 insertion(+) commit 77e45145e3039a0fb212556ab3f8c87f54771757 Author: Frederic Weisbecker Date: Sun Feb 23 23:17:08 2025 +0100 net: Handle napi_schedule() calls from non-interrupt napi_schedule() is expected to be called either: * From an interrupt, where raised softirqs are handled on IRQ exit * From a softirq disabled section, where raised softirqs are handled on the next call to local_bh_enable(). * From a softirq handler, where raised softirqs are handled on the next round in do_softirq(), or further deferred to a dedicated kthread. Other bare tasks context may end up ignoring the raised NET_RX vector until the next random softirq handling opportunity, which may not happen before a while if the CPU goes idle afterwards with the tick stopped. Such "misuses" have been detected on several places thanks to messages of the kind: "NOHZ tick-stop error: local softirq work is pending, handler #08!!!" For example: __raise_softirq_irqoff __napi_schedule rtl8152_runtime_resume.isra.0 rtl8152_resume usb_resume_interface.isra.0 usb_resume_both __rpm_callback rpm_callback rpm_resume __pm_runtime_resume usb_autoresume_device usb_remote_wakeup hub_event process_one_work worker_thread kthread ret_from_fork ret_from_fork_asm And also: * drivers/net/usb/r8152.c::rtl_work_func_t * drivers/net/netdevsim/netdev.c::nsim_start_xmit There is a long history of issues of this kind: 019edd01d174 ("ath10k: sdio: Add missing BH locking around napi_schdule()") 330068589389 ("idpf: disable local BH when scheduling napi for marker packets") e3d5d70cb483 ("net: lan78xx: fix "softirq work is pending" error") e55c27ed9ccf ("mt76: mt7615: add missing bh-disable around rx napi schedule") c0182aa98570 ("mt76: mt7915: add missing bh-disable around tx napi enable/schedule") 970be1dff26d ("mt76: disable BH around napi_schedule() calls") 019edd01d174 ("ath10k: sdio: Add missing BH locking around napi_schdule()") 30bfec4fec59 ("can: rx-offload: can_rx_offload_threaded_irq_finish(): add new function to be called from threaded interrupt") e63052a5dd3c ("mlx5e: add add missing BH locking around napi_schdule()") 83a0c6e58901 ("i40e: Invoke softirqs after napi_reschedule") bd4ce941c8d5 ("mlx4: Invoke softirqs after napi_reschedule") 8cf699ec849f ("mlx4: do not call napi_schedule() without care") ec13ee80145c ("virtio_net: invoke softirqs after __napi_schedule") This shows that relying on the caller to arrange a proper context for the softirqs to be handled while calling napi_schedule() is very fragile and error prone. Also fixing them can also prove challenging if the caller may be called from different kinds of contexts. Therefore fix this from napi_schedule() itself with waking up ksoftirqd when softirqs are raised from task contexts. Reported-by: Paul Menzel Reported-by: Jakub Kicinski Reported-by: Francois Romieu Closes: https://lore.kernel.org/lkml/354a2690-9bbf-4ccb-8769-fa94707a9340@molgen.mpg.de/ Cc: Breno Leitao Signed-off-by: Frederic Weisbecker Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250223221708.27130-1-frederic@kernel.org Signed-off-by: Jakub Kicinski net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49806fe6e61b045b5be8610e08b5a3083c109aa0 Author: Mohammad Heib Date: Tue Feb 25 13:28:52 2025 +0200 net: Clear old fragment checksum value in napi_reuse_skb In certain cases, napi_get_frags() returns an skb that points to an old received fragment, This skb may have its skb->ip_summed, csum, and other fields set from previous fragment handling. Some network drivers set skb->ip_summed to either CHECKSUM_COMPLETE or CHECKSUM_UNNECESSARY when getting skb from napi_get_frags(), while others only set skb->ip_summed when RX checksum offload is enabled on the device, and do not set any value for skb->ip_summed when hardware checksum offload is disabled, assuming that the skb->ip_summed initiated to zero by napi_reuse_skb, ionic driver for example will ignore/unset any value for the ip_summed filed if HW checksum offload is disabled, and if we have a situation where the user disables the checksum offload during a traffic that could lead to the following errors shown in the kernel logs: dump_stack_lvl+0x34/0x48 __skb_gro_checksum_complete+0x7e/0x90 tcp6_gro_receive+0xc6/0x190 ipv6_gro_receive+0x1ec/0x430 dev_gro_receive+0x188/0x360 ? ionic_rx_clean+0x25a/0x460 [ionic] napi_gro_frags+0x13c/0x300 ? __pfx_ionic_rx_service+0x10/0x10 [ionic] ionic_rx_service+0x67/0x80 [ionic] ionic_cq_service+0x58/0x90 [ionic] ionic_txrx_napi+0x64/0x1b0 [ionic] __napi_poll+0x27/0x170 net_rx_action+0x29c/0x370 handle_softirqs+0xce/0x270 __irq_exit_rcu+0xa3/0xc0 common_interrupt+0x80/0xa0 This inconsistency sometimes leads to checksum validation issues in the upper layers of the network stack. To resolve this, this patch clears the skb->ip_summed value for each reused skb in by napi_reuse_skb(), ensuring that the caller is responsible for setting the correct checksum status. This eliminates potential checksum validation issues caused by improper handling of skb->ip_summed. Fixes: 76620aafd66f ("gro: New frags interface to avoid copying shinfo") Signed-off-by: Mohammad Heib Reviewed-by: Shannon Nelson Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250225112852.2507709-1-mheib@redhat.com Signed-off-by: Jakub Kicinski net/core/gro.c | 1 + 1 file changed, 1 insertion(+) commit de70981f295e7eab86325db3bf349fa676f16c42 Author: Harshitha Ramamurthy Date: Wed Feb 26 00:35:26 2025 +0000 gve: unlink old napi when stopping a queue using queue API When a queue is stopped using the ndo queue API, before destroying its page pool, the associated NAPI instance needs to be unlinked to avoid warnings. Handle this by calling page_pool_disable_direct_recycling() when stopping a queue. Cc: stable@vger.kernel.org Fixes: ebdfae0d377b ("gve: adopt page pool for DQ RDA mode") Reviewed-by: Praveen Kaligineedi Signed-off-by: Harshitha Ramamurthy Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250226003526.1546854-1-hramamurthy@google.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/google/gve/gve_rx_dqo.c | 2 ++ 1 file changed, 2 insertions(+) commit 01c9c123db76357d4373b2e97b760a856d6fe822 Author: Kuniyuki Iwashima Date: Tue Feb 25 13:10:23 2025 -0800 net: Use rtnl_net_dev_lock() in register_netdevice_notifier_dev_net(). Breno Leitao reported the splat below. [0] Commit 65161fb544aa ("net: Fix dev_net(dev) race in unregister_netdevice_notifier_dev_net().") added the DEBUG_NET_WARN_ON_ONCE(), assuming that the netdev is not registered before register_netdevice_notifier_dev_net(). But the assumption was simply wrong. Let's use rtnl_net_dev_lock() in register_netdevice_notifier_dev_net(). [0]: WARNING: CPU: 25 PID: 849 at net/core/dev.c:2150 register_netdevice_notifier_dev_net (net/core/dev.c:2150) ? __warn (kernel/panic.c:242 kernel/panic.c:748) ? register_netdevice_notifier_dev_net (net/core/dev.c:2150) ? register_netdevice_notifier_dev_net (net/core/dev.c:2150) ? report_bug (lib/bug.c:? lib/bug.c:219) ? handle_bug (arch/x86/kernel/traps.c:285) ? exc_invalid_op (arch/x86/kernel/traps.c:309) ? asm_exc_invalid_op (./arch/x86/include/asm/idtentry.h:621) ? register_netdevice_notifier_dev_net (net/core/dev.c:2150) ? register_netdevice_notifier_dev_net (./include/net/net_namespace.h:406 ./include/linux/netdevice.h:2663 net/core/dev.c:2144) mlx5e_mdev_notifier_event+0x9f/0xf0 mlx5_ib notifier_call_chain.llvm.12241336988804114627 (kernel/notifier.c:85) blocking_notifier_call_chain (kernel/notifier.c:380) mlx5_core_uplink_netdev_event_replay (drivers/net/ethernet/mellanox/mlx5/core/main.c:352) mlx5_ib_roce_init.llvm.12447516292400117075+0x1c6/0x550 mlx5_ib mlx5r_probe+0x375/0x6a0 mlx5_ib ? kernfs_put (./include/linux/instrumented.h:96 ./include/linux/atomic/atomic-arch-fallback.h:2278 ./include/linux/atomic/atomic-instrumented.h:1384 fs/kernfs/dir.c:557) ? auxiliary_match_id (drivers/base/auxiliary.c:174) ? mlx5r_mp_remove+0x160/0x160 mlx5_ib really_probe (drivers/base/dd.c:? drivers/base/dd.c:658) driver_probe_device (drivers/base/dd.c:830) __driver_attach (drivers/base/dd.c:1217) bus_for_each_dev (drivers/base/bus.c:369) ? driver_attach (drivers/base/dd.c:1157) bus_add_driver (drivers/base/bus.c:679) driver_register (drivers/base/driver.c:249) Fixes: 7fb1073300a2 ("net: Hold rtnl_net_lock() in (un)?register_netdevice_notifier_dev_net().") Reported-by: Breno Leitao Closes: https://lore.kernel.org/netdev/20250224-noisy-cordial-roadrunner-fad40c@leitao/ Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Tested-by: Breno Leitao Link: https://patch.msgid.link/20250225211023.96448-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/core/dev.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit dd83757f6e686a2188997cb58b5975f744bb7786 Merge: 102c16a1f9a9 eb54d2695b57 Author: Linus Torvalds Date: Wed Feb 26 16:55:30 2025 -0800 Merge tag 'bcachefs-2025-02-26' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: "A couple small ones, the main user visible changes/fixes are: - Fix a bug where truncate would rarely fail and return 1 - Revert the directory i_size code: this turned out to have a number of issues that weren't noticed because the fsck code wasn't correctly reporting errors (ouch), and we're late enough in the cycle that it can just wait until 6.15" * tag 'bcachefs-2025-02-26' of git://evilpiepirate.org/bcachefs: bcachefs: Fix truncate sometimes failing and returning 1 bcachefs: Fix deadlock bcachefs: Check for -BCH_ERR_open_buckets_empty in journal resize bcachefs: Revert directory i_size bcachefs: fix bch2_extent_ptr_eq() bcachefs: Fix memmove when move keys down bcachefs: print op->nonce on data update inconsistency commit eb54d2695b57426638fed0ec066ae17a18c4426c Author: Kent Overstreet Date: Wed Feb 26 10:57:26 2025 -0500 bcachefs: Fix truncate sometimes failing and returning 1 __bch_truncate_folio() may return 1 to indicate dirtyness of the folio being truncated, needed for fpunch to get the i_size writes correct. But truncate was forgetting to clear ret, and sometimes returning it as an error. Signed-off-by: Kent Overstreet fs/bcachefs/fs-io.c | 1 + 1 file changed, 1 insertion(+) commit 677bdb7346b6fd806ea45b11cbfe36de0b0cd644 Author: Alan Huang Date: Wed Feb 26 17:33:22 2025 +0800 bcachefs: Fix deadlock This fixes two deadlocks: 1.pcpu_alloc_mutex involved one as pointed by syzbot[1] 2.recursion deadlock. The root cause is that we hold the bc lock during alloc_percpu, fix it by following the pattern used by __btree_node_mem_alloc(). [1] https://lore.kernel.org/all/66f97d9a.050a0220.6bad9.001d.GAE@google.com/T/ Reported-by: syzbot+fe63f377148a6371a9db@syzkaller.appspotmail.com Tested-by: syzbot+fe63f377148a6371a9db@syzkaller.appspotmail.com Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet fs/bcachefs/btree_cache.c | 9 +++++---- fs/bcachefs/btree_key_cache.c | 2 +- fs/bcachefs/btree_locking.c | 5 +++-- fs/bcachefs/btree_locking.h | 2 +- fs/bcachefs/six.c | 5 +++-- fs/bcachefs/six.h | 7 ++++--- 6 files changed, 17 insertions(+), 13 deletions(-) commit 7909d1fb90e290ffd7b8570f4e2f97fe2fb381d0 Author: Kent Overstreet Date: Tue Feb 25 22:35:28 2025 -0500 bcachefs: Check for -BCH_ERR_open_buckets_empty in journal resize This fixes occasional failures from journal resize. Signed-off-by: Kent Overstreet fs/bcachefs/journal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4804f3ac2649475509b1836a4d252c04de143249 Author: Kent Overstreet Date: Wed Feb 26 19:30:38 2025 -0500 bcachefs: Revert directory i_size This turned out to have several bugs, which were missed because the fsck code wasn't properly reporting errors - whoops. Kicking it out for now, hopefully it can make 6.15. Cc: Hongbo Li Signed-off-by: Kent Overstreet fs/bcachefs/dirent.h | 5 ----- fs/bcachefs/fs-common.c | 11 ----------- fs/bcachefs/fsck.c | 21 --------------------- fs/bcachefs/sb-downgrade.c | 5 +---- 4 files changed, 1 insertion(+), 41 deletions(-) commit 2b1283e1ea9b5e0b06f075f79391a51d9f70749b Author: Ryan Roberts Date: Tue Feb 25 11:46:36 2025 +0000 arm64/mm: Fix Boot panic on Ampere Altra When the range of present physical memory is sufficiently small enough and the reserved address space for the linear map is sufficiently large enough, The linear map base address is randomized in arm64_memblock_init(). Prior to commit 62cffa496aac ("arm64/mm: Override PARange for !LPA2 and use it consistently"), we decided if the sizes were suitable with the help of the raw mmfr0.parange. But the commit changed this to use the sanitized version instead. But the function runs before the register has been sanitized so this returns 0, interpreted as a parange of 32 bits. Some fun wrapping occurs and the logic concludes that there is enough room to randomize the linear map base address, when really there isn't. So the top of the linear map ends up outside the reserved address space. Since the PA range cannot be overridden in the first place, restore the mmfr0 reading logic to its state prior to 62cffa496aac, where the raw register value is used. Reported-by: Luiz Capitulino Suggested-by: Ard Biesheuvel Closes: https://lore.kernel.org/all/a3d9acbe-07c2-43b6-9ba9-a7585f770e83@redhat.com/ Fixes: 62cffa496aac ("arm64/mm: Override PARange for !LPA2 and use it consistently") Signed-off-by: Ryan Roberts Link: https://lore.kernel.org/r/20250225114638.2038006-1-ryan.roberts@arm.com Cc: stable@vger.kernel.org Signed-off-by: Will Deacon arch/arm64/mm/init.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit db5e228611b118cf7b1f8084063feda5c037f4a7 Author: Masami Hiramatsu (Google) Date: Wed Feb 26 15:19:02 2025 +0900 tracing: fprobe-events: Log error for exceeding the number of entry args Add error message when the number of entry argument exceeds the maximum size of entry data. This is currently checked when registering fprobe, but in this case no error message is shown in the error_log file. Link: https://lore.kernel.org/all/174055074269.4079315.17809232650360988538.stgit@mhiramat.tok.corp.google.com/ Fixes: 25f00e40ce79 ("tracing/probes: Support $argN in return probe (kprobe and fprobe)") Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) kernel/trace/trace_fprobe.c | 5 +++++ kernel/trace/trace_probe.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) commit d0453655b6ddc685a4837f3cc0776ae8eef62d01 Author: Masami Hiramatsu (Google) Date: Wed Feb 26 15:18:54 2025 +0900 tracing: tprobe-events: Reject invalid tracepoint name Commit 57a7e6de9e30 ("tracing/fprobe: Support raw tracepoints on future loaded modules") allows user to set a tprobe on non-exist tracepoint but it does not check the tracepoint name is acceptable. So it leads tprobe has a wrong character for events (e.g. with subsystem prefix). In this case, the event is not shown in the events directory. Reject such invalid tracepoint name. The tracepoint name must consist of alphabet or digit or '_'. Link: https://lore.kernel.org/all/174055073461.4079315.15875502830565214255.stgit@mhiramat.tok.corp.google.com/ Fixes: 57a7e6de9e30 ("tracing/fprobe: Support raw tracepoints on future loaded modules") Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) Cc: stable@vger.kernel.org kernel/trace/trace_fprobe.c | 13 +++++++++++++ kernel/trace/trace_probe.h | 1 + 2 files changed, 14 insertions(+) commit ac965d7d88fc36fb42e3d50225c0a44dd8326da4 Author: Masami Hiramatsu (Google) Date: Wed Feb 26 15:18:46 2025 +0900 tracing: tprobe-events: Fix a memory leak when tprobe with $retval Fix a memory leak when a tprobe is defined with $retval. This combination is not allowed, but the parse_symbol_and_return() does not free the *symbol which should not be used if it returns the error. Thus, it leaks the *symbol memory in that error path. Link: https://lore.kernel.org/all/174055072650.4079315.3063014346697447838.stgit@mhiramat.tok.corp.google.com/ Fixes: ce51e6153f77 ("tracing: fprobe-event: Fix to check tracepoint event and return") Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) Cc: stable@vger.kernel.org kernel/trace/trace_fprobe.c | 2 ++ 1 file changed, 2 insertions(+) commit b8501febdc513541afc5663d063bfac7ea575b71 Author: Krzysztof Kozlowski Date: Wed Jan 29 16:45:19 2025 +0100 clk: qcom: dispcc-sm8750: Drop incorrect CLK_SET_RATE_PARENT on byte intf parent The parent of disp_cc_mdss_byte0_intf_clk clock should not propagate up the rates, because this messes up entire clock hierarchy when setting clock rates in MSM DSI driver. The dsi_link_clk_set_rate_6g() first sets entire clock hierarchy rates via dev_pm_opp_set_rate() on byte clock and then sets individual clock rates, like pixel and byte_intf clocks, to proper frequencies. Having CLK_SET_RATE_PARENT caused that entire tree was re-calced and the byte clock received halved frequency. Drop CLK_SET_RATE_PARENT to fix this and align with SM8550 and SM8650. Fixes: f1080d8dab0f ("clk: qcom: dispcc-sm8750: Add SM8750 Display clock controller") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250129154519.209791-1-krzysztof.kozlowski@linaro.org Reviewed-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Signed-off-by: Stephen Boyd drivers/clk/qcom/dispcc-sm8750.c | 2 -- 1 file changed, 2 deletions(-) commit 102c16a1f9a9d0ba3b166bf5ca399adf832b65a1 Merge: f4ce1f3318ad f27a95845b01 Author: Linus Torvalds Date: Wed Feb 26 15:13:10 2025 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Small ufs fixes and a core change to clear the command private area on every retry (which fixes a reported bug in virtio_scsi)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: core: bsg: Fix crash when arpmb command fails scsi: ufs: core: Set default runtime/system PM levels before ufshcd_hba_init() scsi: core: Clear driver private data when retrying request scsi: ufs: core: Fix ufshcd_is_ufs_dev_busy() and ufshcd_eh_timed_out() commit 9f3c507cb44498067c980674139bcad56e582ee6 Author: Shyam Sundar S K Date: Wed Feb 19 19:27:47 2025 +0530 i2c: amd-asf: Fix EOI register write to enable successive interrupts The commit b1f8921dfbaa ("i2c: amd-asf: Clear remote IRR bit to get successive interrupt") introduced a method to enable successive interrupts but inadvertently omitted the necessary write to the EOI register, resulting in a failure to receive successive interrupts. Fix this by adding the required write to the EOI register. Fixes: b1f8921dfbaa ("i2c: amd-asf: Clear remote IRR bit to get successive interrupt") Cc: stable@vger.kernel.org # v6.13+ Co-developed-by: Sanket Goswami Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K Fixes: 9b25419ad397 ("i2c: amd-asf: Add routine to handle the ASF slave process") Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250219135747.3251182-1-Shyam-sundar.S-k@amd.com drivers/i2c/busses/i2c-amd-asf-plat.c | 1 + 1 file changed, 1 insertion(+) commit 71c49ee9bb41e1709abac7e2eb05f9193222e580 Author: Binbin Zhou Date: Thu Feb 20 20:56:12 2025 +0800 i2c: ls2x: Fix frequency division register access According to the chip manual, the I2C register access type of Loongson-2K2000/LS7A is "B", so we can only access registers in byte form (readb()/writeb()). Although Loongson-2K0500/Loongson-2K1000 do not have similar constraints, register accesses in byte form also behave correctly. Also, in hardware, the frequency division registers are defined as two separate registers (high 8-bit and low 8-bit), so we just access them directly as bytes. Fixes: 015e61f0bffd ("i2c: ls2x: Add driver for Loongson-2K/LS7A I2C controller") Co-developed-by: Hongliang Wang Signed-off-by: Hongliang Wang Signed-off-by: Binbin Zhou Cc: stable@vger.kernel.org # v6.3+ Reviewed-by: Andy Shevchenko Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250220125612.1910990-1-zhoubinbin@loongson.cn drivers/i2c/busses/i2c-ls2x.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit f4ce1f3318ad4bc12463698696ebc36b145a6aa3 Merge: e6d3c4e535df 8221fd1a7304 Author: Linus Torvalds Date: Wed Feb 26 14:22:47 2025 -0800 Merge tag 'wq-for-6.14-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue update from Tejun Heo: "This contains a patch improve debug visibility. While it isn't a fix, the change carries virtually no risk and makes it substantially easier to chase down a class of problems" * tag 'wq-for-6.14-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Log additional details when rejecting work commit dd1998e243f5fa25d348a384ba0b6c84d980f2b2 Author: Tyrone Ting Date: Thu Feb 20 12:00:29 2025 +0800 i2c: npcm: disable interrupt enable bit before devm_request_irq The customer reports that there is a soft lockup issue related to the i2c driver. After checking, the i2c module was doing a tx transfer and the bmc machine reboots in the middle of the i2c transaction, the i2c module keeps the status without being reset. Due to such an i2c module status, the i2c irq handler keeps getting triggered since the i2c irq handler is registered in the kernel booting process after the bmc machine is doing a warm rebooting. The continuous triggering is stopped by the soft lockup watchdog timer. Disable the interrupt enable bit in the i2c module before calling devm_request_irq to fix this issue since the i2c relative status bit is read-only. Here is the soft lockup log. [ 28.176395] watchdog: BUG: soft lockup - CPU#0 stuck for 26s! [swapper/0:1] [ 28.183351] Modules linked in: [ 28.186407] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.15.120-yocto-s-dirty-bbebc78 #1 [ 28.201174] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 28.208128] pc : __do_softirq+0xb0/0x368 [ 28.212055] lr : __do_softirq+0x70/0x368 [ 28.215972] sp : ffffff8035ebca00 [ 28.219278] x29: ffffff8035ebca00 x28: 0000000000000002 x27: ffffff80071a3780 [ 28.226412] x26: ffffffc008bdc000 x25: ffffffc008bcc640 x24: ffffffc008be50c0 [ 28.233546] x23: ffffffc00800200c x22: 0000000000000000 x21: 000000000000001b [ 28.240679] x20: 0000000000000000 x19: ffffff80001c3200 x18: ffffffffffffffff [ 28.247812] x17: ffffffc02d2e0000 x16: ffffff8035eb8b40 x15: 00001e8480000000 [ 28.254945] x14: 02c3647e37dbfcb6 x13: 02c364f2ab14200c x12: 0000000002c364f2 [ 28.262078] x11: 00000000fa83b2da x10: 000000000000b67e x9 : ffffffc008010250 [ 28.269211] x8 : 000000009d983d00 x7 : 7fffffffffffffff x6 : 0000036d74732434 [ 28.276344] x5 : 00ffffffffffffff x4 : 0000000000000015 x3 : 0000000000000198 [ 28.283476] x2 : ffffffc02d2e0000 x1 : 00000000000000e0 x0 : ffffffc008bdcb40 [ 28.290611] Call trace: [ 28.293052] __do_softirq+0xb0/0x368 [ 28.296625] __irq_exit_rcu+0xe0/0x100 [ 28.300374] irq_exit+0x14/0x20 [ 28.303513] handle_domain_irq+0x68/0x90 [ 28.307440] gic_handle_irq+0x78/0xb0 [ 28.311098] call_on_irq_stack+0x20/0x38 [ 28.315019] do_interrupt_handler+0x54/0x5c [ 28.319199] el1_interrupt+0x2c/0x4c [ 28.322777] el1h_64_irq_handler+0x14/0x20 [ 28.326872] el1h_64_irq+0x74/0x78 [ 28.330269] __setup_irq+0x454/0x780 [ 28.333841] request_threaded_irq+0xd0/0x1b4 [ 28.338107] devm_request_threaded_irq+0x84/0x100 [ 28.342809] npcm_i2c_probe_bus+0x188/0x3d0 [ 28.346990] platform_probe+0x6c/0xc4 [ 28.350653] really_probe+0xcc/0x45c [ 28.354227] __driver_probe_device+0x8c/0x160 [ 28.358578] driver_probe_device+0x44/0xe0 [ 28.362670] __driver_attach+0x124/0x1d0 [ 28.366589] bus_for_each_dev+0x7c/0xe0 [ 28.370426] driver_attach+0x28/0x30 [ 28.373997] bus_add_driver+0x124/0x240 [ 28.377830] driver_register+0x7c/0x124 [ 28.381662] __platform_driver_register+0x2c/0x34 [ 28.386362] npcm_i2c_init+0x3c/0x5c [ 28.389937] do_one_initcall+0x74/0x230 [ 28.393768] kernel_init_freeable+0x24c/0x2b4 [ 28.398126] kernel_init+0x28/0x130 [ 28.401614] ret_from_fork+0x10/0x20 [ 28.405189] Kernel panic - not syncing: softlockup: hung tasks [ 28.411011] SMP: stopping secondary CPUs [ 28.414933] Kernel Offset: disabled [ 28.418412] CPU features: 0x00000000,00000802 [ 28.427644] Rebooting in 20 seconds.. Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver") Signed-off-by: Tyrone Ting Cc: # v5.8+ Reviewed-by: Tali Perry Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250220040029.27596-2-kfting@nuvoton.com drivers/i2c/busses/i2c-npcm7xx.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e6d3c4e535dfffc69cdbad0c12003a8a1e75f88f Merge: 5394eea10651 8fef0a3b17bb Author: Linus Torvalds Date: Wed Feb 26 14:13:11 2025 -0800 Merge tag 'sched_ext-for-6.14-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext Pull sched_ext fix from Tejun Heo: "pick_task_scx() has a workaround to avoid stalling when the fair class's balance() says yes but pick_task() says no. The workaround was incorrectly deciding to keep the prev taks running if the task is on SCX even when the task is in a sleeping state, which can lead to several confusing failure modes. Fix it by testing the prev task is currently queued on SCX instead" * tag 'sched_ext-for-6.14-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext: sched_ext: Fix pick_task_scx() picking non-queued tasks when it's called without balance() commit 5394eea106517d5b0d4a372f00e63d5db8cb0370 Merge: c0d35086a21b 9084ed79ddaa Author: Linus Torvalds Date: Wed Feb 26 12:57:31 2025 -0800 Merge tag 'nfs-for-6.14-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: "Stable Fixes: - O_DIRECT writes should adjust file length Other Bugfixes: - Adjust delegated timestamps for O_DIRECT reads and writes - Prevent looping due to rpc_signal_task() races - Fix a deadlock when recovering state on a sillyrenamed file - Properly handle -ETIMEDOUT errors from tlshd - Suppress build warnings for unused procfs functions - Fix memory leak of lsm_contexts" * tag 'nfs-for-6.14-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: lsm,nfs: fix memory leak of lsm_context sunrpc: suppress warnings for unused procfs functions SUNRPC: Handle -ETIMEDOUT return from tlshd NFSv4: Fix a deadlock when recovering state on a sillyrenamed file SUNRPC: Prevent looping due to rpc_signal_task() races NFS: Adjust delegated timestamps for O_DIRECT reads and writes NFS: O_DIRECT writes must check and adjust the file length commit c0d35086a21b8d5536da5029fd76b9aeecf3217d Merge: d62fdaf51b11 78332fdb956f Author: Linus Torvalds Date: Wed Feb 26 11:55:44 2025 -0800 Merge tag 'landlock-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux Pull landlock fixes from Mickaël Salaün: "Fixes to TCP socket identification, documentation, and tests" * tag 'landlock-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: selftests/landlock: Add binaries to .gitignore selftests/landlock: Test that MPTCP actions are not restricted selftests/landlock: Test TCP accesses with protocol=IPPROTO_TCP landlock: Fix non-TCP sockets restriction landlock: Minor typo and grammar fixes in IPC scoping documentation landlock: Fix grammar error selftests/landlock: Enable the new CONFIG_AF_UNIX_OOB commit d62fdaf51b115f851dd151f7af054535890b5a0d Merge: 5c76a2e4baae 57a0ef02fefa Author: Linus Torvalds Date: Wed Feb 26 11:47:19 2025 -0800 Merge tag 'integrity-v6.14-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity fixes from Mimi Zohar: "One bugfix and one spelling cleanup. The bug fix restores a performance improvement" * tag 'integrity-v6.14-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: ima: Reset IMA_NONACTION_RULE_FLAGS after post_setattr integrity: fix typos and spelling errors commit 75f1f311d883dfaffb98be3c1da208d6ed5d4df9 Author: Rob Herring (Arm) Date: Wed Feb 26 13:38:19 2025 -0600 Revert "of: reserved-memory: Fix using wrong number of cells to get property 'alignment'" This reverts commit 267b21d0bef8e67dbe6c591c9991444e58237ec9. Turns out some DTs do depend on this behavior. Specifically, a downstream Pixel 6 DT. Revert the change at least until we can decide if the DT spec can be changed instead. Cc: stable@vger.kernel.org Signed-off-by: Rob Herring (Arm) drivers/of/of_reserved_mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 01f1d77a2630e774ce33233c4e6723bca3ae9daa Author: Thomas Zimmermann Date: Tue Jan 14 10:57:25 2025 +0100 drm/nouveau: Do not override forced connector status Keep user-forced connector status even if it cannot be programmed. Same behavior as for the rest of the drivers. Signed-off-by: Thomas Zimmermann Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20250114100214.195386-1-tzimmermann@suse.de drivers/gpu/drm/nouveau/nouveau_connector.c | 1 - 1 file changed, 1 deletion(-) commit 011ea742a25a77bac3d995f457886a67d178c6f0 Author: Simon Tatham Date: Thu Feb 20 08:14:44 2025 +0000 affs: don't write overlarge OFS data block size fields If a data sector on an OFS floppy contains a value > 0x1e8 (the largest amount of data that fits in the sector after its header), then an Amiga reading the file can return corrupt data, by taking the overlarge size at its word and reading past the end of the buffer it read the disk sector into! The cause: when affs_write_end_ofs() writes data to an OFS filesystem, the new size field for a data block was computed by adding the amount of data currently being written (into the block) to the existing value of the size field. This is correct if you're extending the file at the end, but if you seek backwards in the file and overwrite _existing_ data, it can lead to the size field being larger than the maximum legal value. This commit changes the calculation so that it sets the size field to the max of its previous size and the position within the block that we just wrote up to. Signed-off-by: Simon Tatham Signed-off-by: David Sterba fs/affs/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e4cf8ec4de4e13f156c1d61977d282d90c221085 Author: Simon Tatham Date: Thu Feb 20 08:14:43 2025 +0000 affs: generate OFS sequence numbers starting at 1 If I write a file to an OFS floppy image, and try to read it back on an emulated Amiga running Workbench 1.3, the Amiga reports a disk error trying to read the file. (That is, it's unable to read it _at all_, even to copy it to the NIL: device. It isn't a matter of getting the wrong data and being unable to parse the file format.) This is because the 'sequence number' field in the OFS data block header is supposed to be based at 1, but affs writes it based at 0. All three locations changed by this patch were setting the sequence number to a variable 'bidx' which was previously obtained by dividing a file position by bsize, so bidx will naturally use 0 for the first block. Therefore all three should add 1 to that value before writing it into the sequence number field. With this change, the Amiga successfully reads the file. For data block reference: https://wiki.osdev.org/FFS_(Amiga) Signed-off-by: Simon Tatham Signed-off-by: David Sterba fs/affs/file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8c3170628a9ce24a59647bd24f897e666af919b8 Author: Matthias Proske Date: Wed Feb 12 19:59:35 2025 +0100 wifi: brcmfmac: keep power during suspend if board requires it After commit 92cadedd9d5f ("brcmfmac: Avoid keeping power to SDIO card unless WOWL is used"), the wifi adapter by default is turned off on suspend and then re-probed on resume. This conflicts with some embedded boards that require to remain powered. They will fail on resume with: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout ieee80211 phy1: brcmf_bus_started: failed: -110 ieee80211 phy1: brcmf_attach: dongle is not responding: err=-110 brcmfmac: brcmf_sdio_firmware_callback: brcmf_attach failed This commit checks for the Device Tree property 'cap-power-off-cards'. If this property is not set, it means that we do not have the capability to power off and should therefore remain powered. Signed-off-by: Matthias Proske Acked-by: Arend van Spriel Link: https://patch.msgid.link/20250212185941.146958-2-email@matthias-proske.de Signed-off-by: Johannes Berg .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 861d0445e72e9e33797f2ceef882c74decb16a87 Author: Alexander Wetzel Date: Thu Feb 13 22:43:30 2025 +0100 wifi: mac80211: Fix sparse warning for monitor_sdata Use rcu_access_pointer() to avoid sparse warning in drv_remove_interface(). Signed-off-by: Alexander Wetzel Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202502130534.bVrZZBK0-lkp@intel.com/ Fixes: 646262c71aca ("wifi: mac80211: remove debugfs dir for virtual monitor") Link: https://patch.msgid.link/20250213214330.6113-1-Alexander@wetzel-home.de Signed-off-by: Johannes Berg net/mac80211/driver-ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 130067e9c13bdc4820748ef16076a6972364745f Author: Johannes Berg Date: Fri Feb 21 11:24:51 2025 +0100 wifi: mac80211: fix vendor-specific inheritance If there's any vendor-specific element in the subelements then the outer element parsing must not parse any vendor element at all. This isn't implemented correctly now due to parsing into the pointers and then overriding them, so explicitly skip vendor elements if any exist in the sub- elements (non-transmitted profile or per-STA profile). Fixes: 671042a4fb77 ("mac80211: support non-inheritance element") Reviewed-by: Ilan Peer Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20250221112451.fd71e5268840.I9db3e6a3367e6ff38d052d07dc07005f0dd3bd5c@changeid Signed-off-by: Johannes Berg net/mac80211/parse.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 99ca2c28e6b68084a0fb65585df09b9e28c3ec16 Author: Johannes Berg Date: Fri Feb 21 11:24:50 2025 +0100 wifi: mac80211: fix MLE non-inheritance parsing The code is erroneously applying the non-inheritance element to the inner elements rather than the outer, which is clearly completely wrong. Fix it by finding the MLE basic element at the beginning, and then applying the non-inheritance for the outer parsing. While at it, do some general cleanups such as not allowing callers to try looking for a specific non-transmitted BSS and link at the same time. Fixes: 45ebac4f059b ("wifi: mac80211: Parse station profile from association response") Reviewed-by: Ilan Peer Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20250221112451.b46d42f45b66.If5b95dc3c80208e0c62d8895fb6152aa54b6620b@changeid Signed-off-by: Johannes Berg net/mac80211/mlme.c | 1 + net/mac80211/parse.c | 127 +++++++++++++++++++++++++++++++++------------------ 2 files changed, 83 insertions(+), 45 deletions(-) commit fe1544deda605f6100cbff1d5aeb179c3aa1515c Merge: c6557ccf8094 9da0ed4a8502 Author: Takashi Iwai Date: Wed Feb 26 15:00:25 2025 +0100 Merge tag 'asoc-fix-v6.14-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.14 More driver specific fixes, the firmware change is part of fixing the race conditions in the Cirrus driver. commit c6557ccf8094ce2e1142c6e49cd47f5d5e2933a8 Author: Adrien Vergé Date: Wed Feb 26 14:55:15 2025 +0100 ALSA: hda/realtek: Fix microphone regression on ASUS N705UD This fixes a regression introduced a few weeks ago in stable kernels 6.12.14 and 6.13.3. The internal microphone on ASUS Vivobook N705UD / X705UD laptops is broken: the microphone appears in userspace (e.g. Gnome settings) but no sound is detected. I bisected it to commit 3b4309546b48 ("ALSA: hda: Fix headset detection failure due to unstable sort"). I figured out the cause: 1. The initial pins enabled for the ALC256 driver are: cfg->inputs == { { pin=0x19, type=AUTO_PIN_MIC, is_headset_mic=1, is_headphone_mic=0, has_boost_on_pin=1 }, { pin=0x1a, type=AUTO_PIN_MIC, is_headset_mic=0, is_headphone_mic=0, has_boost_on_pin=1 } } 2. Since 2017 and commits c1732ede5e8 ("ALSA: hda/realtek - Fix headset and mic on several ASUS laptops with ALC256") and 28e8af8a163 ("ALSA: hda/realtek: Fix mic and headset jack sense on ASUS X705UD"), the quirk ALC256_FIXUP_ASUS_MIC is also applied to ASUS X705UD / N705UD laptops. This added another internal microphone on pin 0x13: cfg->inputs == { { pin=0x13, type=AUTO_PIN_MIC, is_headset_mic=0, is_headphone_mic=0, has_boost_on_pin=1 }, { pin=0x19, type=AUTO_PIN_MIC, is_headset_mic=1, is_headphone_mic=0, has_boost_on_pin=1 }, { pin=0x1a, type=AUTO_PIN_MIC, is_headset_mic=0, is_headphone_mic=0, has_boost_on_pin=1 } } I don't know what this pin 0x13 corresponds to. To the best of my knowledge, these laptops have only one internal microphone. 3. Before 2025 and commit 3b4309546b48 ("ALSA: hda: Fix headset detection failure due to unstable sort"), the sort function would let the microphone of pin 0x1a (the working one) *before* the microphone of pin 0x13 (the phantom one). 4. After this commit 3b4309546b48, the fixed sort function puts the working microphone (pin 0x1a) *after* the phantom one (pin 0x13). As a result, no sound is detected anymore. It looks like the quirk ALC256_FIXUP_ASUS_MIC is not needed anymore for ASUS Vivobook X705UD / N705UD laptops. Without it, everything works fine: - the internal microphone is detected and records actual sound, - plugging in a jack headset is detected and can record actual sound with it, - unplugging the jack headset makes the system go back to internal microphone and can record actual sound. Cc: stable@vger.kernel.org Cc: Kuan-Wei Chiu Cc: Chris Chiu Fixes: 3b4309546b48 ("ALSA: hda: Fix headset detection failure due to unstable sort") Tested-by: Adrien Vergé Signed-off-by: Adrien Vergé Link: https://patch.msgid.link/20250226135515.24219-1-adrienverge@gmail.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 - 1 file changed, 1 deletion(-) commit 16fef33fdb1e2269c20697d9b61ae8022bc92665 Author: Imre Deak Date: Mon Feb 24 11:32:42 2025 +0200 drm/i915/dp_mst: Fix encoder HW state readout for UHBR MST The encoder HW/SW state verification should use a SW state which stays unchanged while the encoder/output is active. The intel_dp::is_mst flag used during state computation to choose between the DP SST/MST modes can change while the output is active, if the sink gets disconnected or the MST topology is removed for another reason. A subsequent state verification using intel_dp::is_mst leads then to a mismatch if the output is disabled/re-enabled without recomputing its state. Use the encoder's active MST link count instead, which will be always non-zero for an active MST output and will be zero for SST. Fixes: 35d2e4b75649 ("drm/i915/ddi: start distinguishing 128b/132b SST and MST at state readout") Fixes: 40d489fac0e8 ("drm/i915/ddi: handle 128b/132b SST in intel_ddi_read_func_ctl()") Cc: Jani Nikula Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20250224093242.1859583-1-imre.deak@intel.com (cherry picked from commit 0159e311772af9d6598aafe072c020687720f1d7) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_ddi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 12c2f962fe71f390951d9242725bc7e608f55927 Author: Tejas Upadhyay Date: Tue Feb 25 10:27:54 2025 +0530 drm/xe: cancel pending job timer before freeing scheduler The async call to __guc_exec_queue_fini_async frees the scheduler while a submission may time out and restart. To prevent this race condition, the pending job timer should be canceled before freeing the scheduler. V3(MattB): - Adjust position of cancel pending job - Remove gitlab issue# from commit message V2(MattB): - Cancel pending jobs before scheduler finish Fixes: a20c75dba192 ("drm/xe: Call __guc_exec_queue_fini_async direct for KERNEL exec_queues") Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20250225045754.600905-1-tejas.upadhyay@intel.com Signed-off-by: Tejas Upadhyay (cherry picked from commit 18fbd567e75f9b97b699b2ab4f1fa76b7cf268f6) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_guc_submit.c | 2 ++ 1 file changed, 2 insertions(+) commit f2ba0cf1ca32e075617813de98c826ab55d57f11 Author: Mingcong Bai Date: Tue Feb 25 15:31:01 2025 +0800 drm/xe/regs: remove a duplicate definition for RING_CTL_SIZE(size) Commit b79e8fd954c4 ("drm/xe: Remove dependency on intel_engine_regs.h") introduced an internal set of engine registers, however, as part of this change, it has also introduced two duplicate `define' lines for `RING_CTL_SIZE(size)'. This commit was introduced to the tree in v6.8-rc1. While this is harmless as the definitions did not change, so no compiler warning was observed. Drop this line anyway for the sake of correctness. Cc: stable@vger.kernel.org # v6.8-rc1+ Fixes: b79e8fd954c4 ("drm/xe: Remove dependency on intel_engine_regs.h") Signed-off-by: Mingcong Bai Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20250225073104.865230-1-jeffbai@aosc.io Signed-off-by: Rodrigo Vivi (cherry picked from commit 6b68c4542ffecc36087a9e14db8fc990c88bb01b) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/regs/xe_engine_regs.h | 1 - 1 file changed, 1 deletion(-) commit 130ff5c8b78e6fd05270a04985c50bce6a3de6c1 Author: Niklas Cassel Date: Tue Feb 25 15:16:12 2025 +0100 ata: ahci: Make ahci_ignore_port() handle empty mask_port_map Commit 8c87215dd3a2 ("ata: libahci_platform: support non-consecutive port numbers") added a skip to ahci_platform_enable_phys() for ports that are not in mask_port_map. The code in ahci_platform_get_resources(), will currently set mask_port_map for each child "port" node it finds in the device tree. However, device trees that do not have any child "port" nodes will not have mask_port_map set, and for non-device tree platforms mask_port_map will only exist as a quirk for specific PCI device + vendor IDs, or as a kernel module parameter, but will not be set by default. Therefore, the common thing is that mask_port_map is only set if you do not want to use all ports (as defined by Offset 0Ch: PI – Ports Implemented register), but instead only want to use the ports in mask_port_map. If mask_port_map is not set, all ports are available. Thus, ahci_ignore_port() must be able to handle an empty mask_port_map. Fixes: 8c87215dd3a2 ("ata: libahci_platform: support non-consecutive port numbers") Fixes: 2c202e6c4f4d ("ata: libahci_platform: Do not set mask_port_map when not needed") Fixes: c9b5be909e65 ("ahci: Introduce ahci_ignore_port() helper") Reported-by: Marek Szyprowski Closes: https://lore.kernel.org/linux-ide/10b31dd0-d0bb-4f76-9305-2195c3e17670@samsung.com/ Tested-by: Marek Szyprowski Co-developed-by: Damien Le Moal Signed-off-by: Damien Le Moal Link: https://lore.kernel.org/r/20250225141612.942170-2-cassel@kernel.org Signed-off-by: Niklas Cassel drivers/ata/ahci.h | 8 ++++++-- drivers/ata/libahci.c | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) commit 2e064e3f3282ec016d80cb7b1fadff0d8e2014ca Author: Masahiro Yamada Date: Mon Feb 10 19:23:50 2025 +0900 drm/imagination: remove unnecessary header include path drivers/gpu/drm/imagination/ includes local headers with the double-quote form (#include "..."). Hence, the header search path addition is unneeded. Signed-off-by: Masahiro Yamada Reviewed-by: Matt Coster Link: https://patchwork.freedesktop.org/patch/msgid/20250210102352.1517115-1-masahiroy@kernel.org Signed-off-by: Matt Coster drivers/gpu/drm/imagination/Makefile | 2 -- 1 file changed, 2 deletions(-) commit 982caaa1150479f022003390cd72a1941663d211 Author: Sean Christopherson Date: Mon Feb 24 15:55:37 2025 -0800 KVM: nVMX: Process events on nested VM-Exit if injectable IRQ or NMI is pending Process pending events on nested VM-Exit if the vCPU has an injectable IRQ or NMI, as the event may have become pending while L2 was active, i.e. may not be tracked in the context of vmcs01. E.g. if L1 has passed its APIC through to L2 and an IRQ arrives while L2 is active, then KVM needs to request an IRQ window prior to running L1, otherwise delivery of the IRQ will be delayed until KVM happens to process events for some other reason. The missed failure is detected by vmx_apic_passthrough_tpr_threshold_test in KVM-Unit-Tests, but has effectively been masked due to a flaw in KVM's PIC emulation that causes KVM to make spurious KVM_REQ_EVENT requests (and apparently no one ever ran the test with split IRQ chips). Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-ID: <20250224235542.2562848-3-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 17bcd714426386fda741a4bccd96a2870179344b Author: Sean Christopherson Date: Mon Feb 24 15:55:36 2025 -0800 KVM: x86: Free vCPUs before freeing VM state Free vCPUs before freeing any VM state, as both SVM and VMX may access VM state when "freeing" a vCPU that is currently "in" L2, i.e. that needs to be kicked out of nested guest mode. Commit 6fcee03df6a1 ("KVM: x86: avoid loading a vCPU after .vm_destroy was called") partially fixed the issue, but for unknown reasons only moved the MMU unloading before VM destruction. Complete the change, and free all vCPU state prior to destroying VM state, as nVMX accesses even more state than nSVM. In addition to the AVIC, KVM can hit a use-after-free on MSR filters: kvm_msr_allowed+0x4c/0xd0 __kvm_set_msr+0x12d/0x1e0 kvm_set_msr+0x19/0x40 load_vmcs12_host_state+0x2d8/0x6e0 [kvm_intel] nested_vmx_vmexit+0x715/0xbd0 [kvm_intel] nested_vmx_free_vcpu+0x33/0x50 [kvm_intel] vmx_free_vcpu+0x54/0xc0 [kvm_intel] kvm_arch_vcpu_destroy+0x28/0xf0 kvm_vcpu_destroy+0x12/0x50 kvm_arch_destroy_vm+0x12c/0x1c0 kvm_put_kvm+0x263/0x3c0 kvm_vm_release+0x21/0x30 and an upcoming fix to process injectable interrupts on nested VM-Exit will access the PIC: BUG: kernel NULL pointer dereference, address: 0000000000000090 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page CPU: 23 UID: 1000 PID: 2658 Comm: kvm-nx-lpage-re RIP: 0010:kvm_cpu_has_extint+0x2f/0x60 [kvm] Call Trace: kvm_cpu_has_injectable_intr+0xe/0x60 [kvm] nested_vmx_vmexit+0x2d7/0xdf0 [kvm_intel] nested_vmx_free_vcpu+0x40/0x50 [kvm_intel] vmx_vcpu_free+0x2d/0x80 [kvm_intel] kvm_arch_vcpu_destroy+0x2d/0x130 [kvm] kvm_destroy_vcpus+0x8a/0x100 [kvm] kvm_arch_destroy_vm+0xa7/0x1d0 [kvm] kvm_destroy_vm+0x172/0x300 [kvm] kvm_vcpu_release+0x31/0x50 [kvm] Inarguably, both nSVM and nVMX need to be fixed, but punt on those cleanups for the moment. Conceptually, vCPUs should be freed before VM state. Assets like the I/O APIC and PIC _must_ be allocated before vCPUs are created, so it stands to reason that they must be freed _after_ vCPUs are destroyed. Reported-by: Aaron Lewis Closes: https://lore.kernel.org/all/20240703175618.2304869-2-aaronlewis@google.com Cc: Jim Mattson Cc: Yan Zhao Cc: Rick P Edgecombe Cc: Kai Huang Cc: Isaku Yamahata Signed-off-by: Sean Christopherson Message-ID: <20250224235542.2562848-2-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d52da23b6c68a0f6bad83959ebb61a2cf623c4e Author: Wang Hai Date: Mon Feb 24 17:00:47 2025 +0800 tcp: Defer ts_recent changes until req is owned Recently a bug was discovered where the server had entered TCP_ESTABLISHED state, but the upper layers were not notified. The same 5-tuple packet may be processed by different CPUSs, so two CPUs may receive different ack packets at the same time when the state is TCP_NEW_SYN_RECV. In that case, req->ts_recent in tcp_check_req may be changed concurrently, which will probably cause the newsk's ts_recent to be incorrectly large. So that tcp_validate_incoming will fail. At this point, newsk will not be able to enter the TCP_ESTABLISHED. cpu1 cpu2 tcp_check_req tcp_check_req req->ts_recent = rcv_tsval = t1 req->ts_recent = rcv_tsval = t2 syn_recv_sock tcp_sk(child)->rx_opt.ts_recent = req->ts_recent = t2 // t1 < t2 tcp_child_process tcp_rcv_state_process tcp_validate_incoming tcp_paws_check if ((s32)(rx_opt->ts_recent - rx_opt->rcv_tsval) <= paws_win) // t2 - t1 > paws_win, failed tcp_v4_do_rcv tcp_rcv_state_process // TCP_ESTABLISHED The cpu2's skb or a newly received skb will call tcp_v4_do_rcv to get the newsk into the TCP_ESTABLISHED state, but at this point it is no longer possible to notify the upper layer application. A notification mechanism could be added here, but the fix is more complex, so the current fix is used. In tcp_check_req, req->ts_recent is used to assign a value to tcp_sk(child)->rx_opt.ts_recent, so removing the change in req->ts_recent and changing tcp_sk(child)->rx_opt.ts_recent directly after owning the req fixes this bug. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Wang Hai Reviewed-by: Jason Xing Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Signed-off-by: David S. Miller net/ipv4/tcp_minisocks.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 2df2c6ed89600a02e1c7a581a6a55e53c38ce0f5 Author: Thorsten Blum Date: Tue Feb 25 20:26:14 2025 +0100 btrfs: replace deprecated strncpy() with strscpy() strncpy() is deprecated for NUL-terminated destination buffers. Use strscpy() instead and don't zero-initialize the param array. Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Thorsten Blum Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5a4041f2c47247575a6c2e53ce14f7b0ac946c33 Author: Naohiro Aota Date: Wed Feb 19 16:02:11 2025 +0900 btrfs: zoned: fix extent range end unlock in cow_file_range() Running generic/751 on the for-next branch often results in a hang like below. They are both stack by locking an extent. This suggests someone forget to unlock an extent. INFO: task kworker/u128:1:12 blocked for more than 323 seconds. Not tainted 6.13.0-BTRFS-ZNS+ #503 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u128:1 state:D stack:0 pid:12 tgid:12 ppid:2 flags:0x00004000 Workqueue: btrfs-fixup btrfs_work_helper [btrfs] Call Trace: __schedule+0x534/0xdd0 schedule+0x39/0x140 __lock_extent+0x31b/0x380 [btrfs] ? __pfx_autoremove_wake_function+0x10/0x10 btrfs_writepage_fixup_worker+0xf1/0x3a0 [btrfs] btrfs_work_helper+0xff/0x480 [btrfs] ? lock_release+0x178/0x2c0 process_one_work+0x1ee/0x570 ? srso_return_thunk+0x5/0x5f worker_thread+0x1d1/0x3b0 ? __pfx_worker_thread+0x10/0x10 kthread+0x10b/0x230 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x30/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 INFO: task kworker/u134:0:184 blocked for more than 323 seconds. Not tainted 6.13.0-BTRFS-ZNS+ #503 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u134:0 state:D stack:0 pid:184 tgid:184 ppid:2 flags:0x00004000 Workqueue: writeback wb_workfn (flush-btrfs-4) Call Trace: __schedule+0x534/0xdd0 schedule+0x39/0x140 __lock_extent+0x31b/0x380 [btrfs] ? __pfx_autoremove_wake_function+0x10/0x10 find_lock_delalloc_range+0xdb/0x260 [btrfs] writepage_delalloc+0x12f/0x500 [btrfs] ? srso_return_thunk+0x5/0x5f extent_write_cache_pages+0x232/0x840 [btrfs] btrfs_writepages+0x72/0x130 [btrfs] do_writepages+0xe7/0x260 ? srso_return_thunk+0x5/0x5f ? lock_acquire+0xd2/0x300 ? srso_return_thunk+0x5/0x5f ? find_held_lock+0x2b/0x80 ? wbc_attach_and_unlock_inode.part.0+0x102/0x250 ? wbc_attach_and_unlock_inode.part.0+0x102/0x250 __writeback_single_inode+0x5c/0x4b0 writeback_sb_inodes+0x22d/0x550 __writeback_inodes_wb+0x4c/0xe0 wb_writeback+0x2f6/0x3f0 wb_workfn+0x32a/0x510 process_one_work+0x1ee/0x570 ? srso_return_thunk+0x5/0x5f worker_thread+0x1d1/0x3b0 ? __pfx_worker_thread+0x10/0x10 kthread+0x10b/0x230 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x30/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 This happens because we have another success path for the zoned mode. When there is no active zone available, btrfs_reserve_extent() returns -EAGAIN. In this case, we have two reactions. (1) If the given range is never allocated, we can only wait for someone to finish a zone, so wait on BTRFS_FS_NEED_ZONE_FINISH bit and retry afterward. (2) Or, if some allocations are already done, we must bail out and let the caller to send IOs for the allocation. This is because these IOs may be necessary to finish a zone. The commit 06f364284794 ("btrfs: do proper folio cleanup when cow_file_range() failed") moved the unlock code from the inside of the loop to the outside. So, previously, the allocated extents are unlocked just after the allocation and so before returning from the function. However, they are no longer unlocked on the case (2) above. That caused the hang issue. Fix the issue by modifying the 'end' to the end of the allocated range. Then, we can exit the loop and the same unlock code can properly handle the case. Reported-by: Shin'ichiro Kawasaki Tested-by: Johannes Thumshirn Fixes: 06f364284794 ("btrfs: do proper folio cleanup when cow_file_range() failed") CC: stable@vger.kernel.org Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/inode.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5c76a2e4baae7a3f76ad2cdaef5c59871bcfb2b6 Merge: ac9c34d1e45a eff2eb592efd Author: Linus Torvalds Date: Tue Feb 25 20:06:15 2025 -0800 Merge tag 'powerpc-6.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fix from Madhavan Srinivasan: - Fix for cross-reference in documentation and deprecation warning Thanks to Andrew Donnellan and Bagas Sanjaya. * tag 'powerpc-6.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: cxl: Fix cross-reference in documentation and add deprecation warning commit 310a110cb69b8f077f79d71193f638247c5a3730 Merge: 85c7ca916fc4 249df695c3ff Author: Jakub Kicinski Date: Tue Feb 25 19:11:01 2025 -0800 Merge branch 'net-enetc-fix-some-known-issues' Wei Fang says: ==================== net: enetc: fix some known issues There are some issues with the enetc driver, some of which are specific to the LS1028A platform, and some of which were introduced recently when i.MX95 ENETC support was added, so this patch set aims to clean up those issues. v1: https://lore.kernel.org/20250217093906.506214-1-wei.fang@nxp.com v2: https://lore.kernel.org/20250219054247.733243-1-wei.fang@nxp.com ==================== Link: https://patch.msgid.link/20250224111251.1061098-1-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit 249df695c3ffe8c8d36d46c2580ce72410976f96 Author: Wei Fang Date: Mon Feb 24 19:12:51 2025 +0800 net: enetc: fix the off-by-one issue in enetc_map_tx_tso_buffs() There is an off-by-one issue for the err_chained_bd path, it will free one more tx_swbd than expected. But there is no such issue for the err_map_data path. To fix this off-by-one issue and make the two error handling consistent, the increment of 'i' and 'count' remain in sync and enetc_unwind_tx_frame() is called for error handling. Fixes: fb8629e2cbfc ("net: enetc: add support for software TSO") Cc: stable@vger.kernel.org Suggested-by: Vladimir Oltean Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Reviewed-by: Claudiu Manoil Link: https://patch.msgid.link/20250224111251.1061098-9-wei.fang@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/enetc/enetc.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 119049b66b883c7e7e575a0b69dc6e3d211662cc Author: Wei Fang Date: Mon Feb 24 19:12:50 2025 +0800 net: enetc: remove the mm_lock from the ENETC v4 driver Currently, the ENETC v4 driver has not added the MAC merge layer support in the upstream, so the mm_lock is not initialized and used, so remove the mm_lock from the driver. Fixes: 99100d0d9922 ("net: enetc: add preliminary support for i.MX95 ENETC PF") Cc: stable@vger.kernel.org Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250224111251.1061098-8-wei.fang@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/enetc/enetc4_pf.c | 1 - 1 file changed, 1 deletion(-) commit 8e43decdfbb477dd7800e3902d2d2f105d22ef5f Author: Wei Fang Date: Mon Feb 24 19:12:49 2025 +0800 net: enetc: add missing enetc4_link_deinit() The enetc4_link_init() is called when the PF driver probes to create phylink and MDIO bus, but we forgot to call enetc4_link_deinit() to free the phylink and MDIO bus when the driver was unbound. so add missing enetc4_link_deinit() to enetc4_pf_netdev_destroy(). Fixes: 99100d0d9922 ("net: enetc: add preliminary support for i.MX95 ENETC PF") Cc: stable@vger.kernel.org Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250224111251.1061098-7-wei.fang@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/enetc/enetc4_pf.c | 1 + 1 file changed, 1 insertion(+) commit bbcbc906ab7b5834c1219cd17a38d78dba904aa0 Author: Wei Fang Date: Mon Feb 24 19:12:48 2025 +0800 net: enetc: update UDP checksum when updating originTimestamp field There is an issue with one-step timestamp based on UDP/IP. The peer will discard the sync packet because of the wrong UDP checksum. For ENETC v1, the software needs to update the UDP checksum when updating the originTimestamp field, so that the hardware can correctly update the UDP checksum when updating the correction field. Otherwise, the UDP checksum in the sync packet will be wrong. Fixes: 7294380c5211 ("enetc: support PTP Sync packet one-step timestamping") Cc: stable@vger.kernel.org Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Link: https://patch.msgid.link/20250224111251.1061098-6-wei.fang@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/enetc/enetc.c | 41 +++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 7 deletions(-) commit a562d0c4a893eae3ea51d512c4d90ab858a6b7ec Author: Wei Fang Date: Mon Feb 24 19:12:47 2025 +0800 net: enetc: VFs do not support HWTSTAMP_TX_ONESTEP_SYNC Actually ENETC VFs do not support HWTSTAMP_TX_ONESTEP_SYNC because only ENETC PF can access PMa_SINGLE_STEP registers. And there will be a crash if VFs are used to test one-step timestamp, the crash log as follows. [ 129.110909] Unable to handle kernel paging request at virtual address 00000000000080c0 [ 129.287769] Call trace: [ 129.290219] enetc_port_mac_wr+0x30/0xec (P) [ 129.294504] enetc_start_xmit+0xda4/0xe74 [ 129.298525] enetc_xmit+0x70/0xec [ 129.301848] dev_hard_start_xmit+0x98/0x118 Fixes: 41514737ecaa ("enetc: add get_ts_info interface for ethtool") Cc: stable@vger.kernel.org Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Link: https://patch.msgid.link/20250224111251.1061098-5-wei.fang@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/enetc/enetc.c | 3 +++ drivers/net/ethernet/freescale/enetc/enetc_ethtool.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 432a2cb3ee97a7c6ea578888fe81baad035b9307 Author: Wei Fang Date: Mon Feb 24 19:12:46 2025 +0800 net: enetc: correct the xdp_tx statistics The 'xdp_tx' is used to count the number of XDP_TX frames sent, not the number of Tx BDs. Fixes: 7ed2bc80074e ("net: enetc: add support for XDP_TX") Cc: stable@vger.kernel.org Signed-off-by: Wei Fang Reviewed-by: Ioana Ciornei Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20250224111251.1061098-4-wei.fang@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da291996b16ebd10626d4b20288327b743aff110 Author: Wei Fang Date: Mon Feb 24 19:12:45 2025 +0800 net: enetc: keep track of correct Tx BD count in enetc_map_tx_tso_buffs() When creating a TSO header, if the skb is VLAN tagged, the extended BD will be used and the 'count' should be increased by 2 instead of 1. Otherwise, when an error occurs, less tx_swbd will be freed than the actual number. Fixes: fb8629e2cbfc ("net: enetc: add support for software TSO") Cc: stable@vger.kernel.org Suggested-by: Vladimir Oltean Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Reviewed-by: Claudiu Manoil Link: https://patch.msgid.link/20250224111251.1061098-3-wei.fang@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/enetc/enetc.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 39ab773e4c120f7f98d759415ccc2aca706bbc10 Author: Wei Fang Date: Mon Feb 24 19:12:44 2025 +0800 net: enetc: fix the off-by-one issue in enetc_map_tx_buffs() When a DMA mapping error occurs while processing skb frags, it will free one more tx_swbd than expected, so fix this off-by-one issue. Fixes: d4fd0404c1c9 ("enetc: Introduce basic PF and VF ENETC ethernet drivers") Cc: stable@vger.kernel.org Suggested-by: Vladimir Oltean Suggested-by: Michal Swiatkowski Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Reviewed-by: Claudiu Manoil Link: https://patch.msgid.link/20250224111251.1061098-2-wei.fang@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/enetc/enetc.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 85c7ca916fc416c5bbc7b98b256d4b444413e6f7 Merge: 5568e4ca9aed b1e44b4aecb5 Author: Jakub Kicinski Date: Tue Feb 25 19:09:40 2025 -0800 Merge branch 'intel-wired-lan-driver-updates-2025-02-24-ice-idpf-iavf-ixgbe' Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2025-02-24 (ice, idpf, iavf, ixgbe) For ice: Marcin moves incorrect call placement to clean up VF mailbox tracking and changes call for configuring default VSI to allow for existing rule. For iavf: Jake fixes a circular locking dependency. For ixgbe: Piotr corrects condition for determining media cage presence. ==================== Link: https://patch.msgid.link/20250224190647.3601930-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit b1e44b4aecb551727a368df5b85c535f2ce932ea Author: Piotr Kwapulinski Date: Mon Feb 24 11:06:45 2025 -0800 ixgbe: fix media cage present detection for E610 device The commit 23c0e5a16bcc ("ixgbe: Add link management support for E610 device") introduced incorrect checking of media cage presence for E610 device. Fix it. Fixes: 23c0e5a16bcc ("ixgbe: Add link management support for E610 device") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/e7d73b32-f12a-49d1-8b60-1ef83359ec13@stanley.mountain/ Reviewed-by: Michal Swiatkowski Reviewed-by: Przemek Kitszel Signed-off-by: Piotr Kwapulinski Reviewed-by: Simon Horman Tested-by: Bharath R Signed-off-by: Tony Nguyen Link: https://patch.msgid.link/20250224190647.3601930-6-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6124f6fd3ca37d53ec5cbf62f9d9130ef439eca Author: Jacob Keller Date: Mon Feb 24 11:06:44 2025 -0800 iavf: fix circular lock dependency with netdev_lock We have recently seen reports of lockdep circular lock dependency warnings when loading the iAVF driver: [ 1504.790308] ====================================================== [ 1504.790309] WARNING: possible circular locking dependency detected [ 1504.790310] 6.13.0 #net_next_rt.c2933b2befe2.el9 Not tainted [ 1504.790311] ------------------------------------------------------ [ 1504.790312] kworker/u128:0/13566 is trying to acquire lock: [ 1504.790313] ffff97d0e4738f18 (&dev->lock){+.+.}-{4:4}, at: register_netdevice+0x52c/0x710 [ 1504.790320] [ 1504.790320] but task is already holding lock: [ 1504.790321] ffff97d0e47392e8 (&adapter->crit_lock){+.+.}-{4:4}, at: iavf_finish_config+0x37/0x240 [iavf] [ 1504.790330] [ 1504.790330] which lock already depends on the new lock. [ 1504.790330] [ 1504.790330] [ 1504.790330] the existing dependency chain (in reverse order) is: [ 1504.790331] [ 1504.790331] -> #1 (&adapter->crit_lock){+.+.}-{4:4}: [ 1504.790333] __lock_acquire+0x52d/0xbb0 [ 1504.790337] lock_acquire+0xd9/0x330 [ 1504.790338] mutex_lock_nested+0x4b/0xb0 [ 1504.790341] iavf_finish_config+0x37/0x240 [iavf] [ 1504.790347] process_one_work+0x248/0x6d0 [ 1504.790350] worker_thread+0x18d/0x330 [ 1504.790352] kthread+0x10e/0x250 [ 1504.790354] ret_from_fork+0x30/0x50 [ 1504.790357] ret_from_fork_asm+0x1a/0x30 [ 1504.790361] [ 1504.790361] -> #0 (&dev->lock){+.+.}-{4:4}: [ 1504.790364] check_prev_add+0xf1/0xce0 [ 1504.790366] validate_chain+0x46a/0x570 [ 1504.790368] __lock_acquire+0x52d/0xbb0 [ 1504.790370] lock_acquire+0xd9/0x330 [ 1504.790371] mutex_lock_nested+0x4b/0xb0 [ 1504.790372] register_netdevice+0x52c/0x710 [ 1504.790374] iavf_finish_config+0xfa/0x240 [iavf] [ 1504.790379] process_one_work+0x248/0x6d0 [ 1504.790381] worker_thread+0x18d/0x330 [ 1504.790383] kthread+0x10e/0x250 [ 1504.790385] ret_from_fork+0x30/0x50 [ 1504.790387] ret_from_fork_asm+0x1a/0x30 [ 1504.790389] [ 1504.790389] other info that might help us debug this: [ 1504.790389] [ 1504.790389] Possible unsafe locking scenario: [ 1504.790389] [ 1504.790390] CPU0 CPU1 [ 1504.790391] ---- ---- [ 1504.790391] lock(&adapter->crit_lock); [ 1504.790393] lock(&dev->lock); [ 1504.790394] lock(&adapter->crit_lock); [ 1504.790395] lock(&dev->lock); [ 1504.790397] [ 1504.790397] *** DEADLOCK *** This appears to be caused by the change in commit 5fda3f35349b ("net: make netdev_lock() protect netdev->reg_state"), which added a netdev_lock() in register_netdevice. The iAVF driver calls register_netdevice() from iavf_finish_config(), as a final stage of its state machine post-probe. It currently takes the RTNL lock, then the netdev lock, and then the device critical lock. This pattern is used throughout the driver. Thus there is a strong dependency that the crit_lock should not be acquired before the net device lock. The change to register_netdevice creates an ABBA lock order violation because the iAVF driver is holding the crit_lock while calling register_netdevice, which then takes the netdev_lock. It seems likely that future refactors could result in netdev APIs which hold the netdev_lock while calling into the driver. This means that we should not re-order the locks so that netdev_lock is acquired after the device private crit_lock. Instead, notice that we already release the netdev_lock prior to calling the register_netdevice. This flow only happens during the early driver initialization as we transition through the __IAVF_STARTUP, __IAVF_INIT_VERSION_CHECK, __IAVF_INIT_GET_RESOURCES, etc. Analyzing the places where we take crit_lock in the driver there are two sources: a) several of the work queue tasks including adminq_task, watchdog_task, reset_task, and the finish_config task. b) various callbacks which ultimately stem back to .ndo operations or ethtool operations. The latter cannot be triggered until after the netdevice registration is completed successfully. The iAVF driver uses alloc_ordered_workqueue, which is an unbound workqueue that has a max limit of 1, and thus guarantees that only a single work item on the queue is executing at any given time, so none of the other work threads could be executing due to the ordered workqueue guarantees. The iavf_finish_config() function also does not do anything else after register_netdevice, unless it fails. It seems unlikely that the driver private crit_lock is protecting anything that register_netdevice() itself touches. Thus, to fix this ABBA lock violation, lets simply release the adapter->crit_lock as well as netdev_lock prior to calling register_netdevice(). We do still keep holding the RTNL lock as required by the function. If we do fail to register the netdevice, then we re-acquire the adapter critical lock to finish the transition back to __IAVF_INIT_CONFIG_ADAPTER. This ensures every call where both netdev_lock and the adapter->crit_lock are acquired under the same ordering. Fixes: afc664987ab3 ("eth: iavf: extend the netdev_lock usage") Signed-off-by: Jacob Keller Tested-by: Przemek Kitszel Reviewed-by: Przemek Kitszel Reviewed-by: Jakub Kicinski Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen Link: https://patch.msgid.link/20250224190647.3601930-5-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/iavf/iavf_main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 5c07be96d8b3f8447e980f29b967bf2e1d7ac732 Author: Marcin Szycik Date: Mon Feb 24 11:06:42 2025 -0800 ice: Avoid setting default Rx VSI twice in switchdev setup As part of switchdev environment setup, uplink VSI is configured as default for both Tx and Rx. Default Rx VSI is also used by promiscuous mode. If promisc mode is enabled and an attempt to enter switchdev mode is made, the setup will fail because Rx VSI is already configured as default (rule exists). Reproducer: devlink dev eswitch set $PF1_PCI mode switchdev ip l s $PF1 up ip l s $PF1 promisc on echo 1 > /sys/class/net/$PF1/device/sriov_numvfs In switchdev setup, use ice_set_dflt_vsi() instead of plain ice_cfg_dflt_vsi(), which avoids repeating setting default VSI for Rx if it's already configured. Fixes: 50d62022f455 ("ice: default Tx rule instead of to queue") Reported-by: Sujai Buvaneswaran Closes: https://lore.kernel.org/intel-wired-lan/PH0PR11MB50138B635F2E5CEB7075325D961F2@PH0PR11MB5013.namprd11.prod.outlook.com Reviewed-by: Martyna Szapar-Mudlaw Signed-off-by: Marcin Szycik Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen Link: https://patch.msgid.link/20250224190647.3601930-3-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/ice/ice_eswitch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 79990cf5e7aded76d0c092c9f5ed31eb1c75e02c Author: Marcin Szycik Date: Mon Feb 24 11:06:41 2025 -0800 ice: Fix deinitializing VF in error path If ice_ena_vfs() fails after calling ice_create_vf_entries(), it frees all VFs without removing them from snapshot PF-VF mailbox list, leading to list corruption. Reproducer: devlink dev eswitch set $PF1_PCI mode switchdev ip l s $PF1 up ip l s $PF1 promisc on sleep 1 echo 1 > /sys/class/net/$PF1/device/sriov_numvfs sleep 1 echo 1 > /sys/class/net/$PF1/device/sriov_numvfs Trace (minimized): list_add corruption. next->prev should be prev (ffff8882e241c6f0), but was 0000000000000000. (next=ffff888455da1330). kernel BUG at lib/list_debug.c:29! RIP: 0010:__list_add_valid_or_report+0xa6/0x100 ice_mbx_init_vf_info+0xa7/0x180 [ice] ice_initialize_vf_entry+0x1fa/0x250 [ice] ice_sriov_configure+0x8d7/0x1520 [ice] ? __percpu_ref_switch_mode+0x1b1/0x5d0 ? __pfx_ice_sriov_configure+0x10/0x10 [ice] Sometimes a KASAN report can be seen instead with a similar stack trace: BUG: KASAN: use-after-free in __list_add_valid_or_report+0xf1/0x100 VFs are added to this list in ice_mbx_init_vf_info(), but only removed in ice_free_vfs(). Move the removing to ice_free_vf_entries(), which is also being called in other places where VFs are being removed (including ice_free_vfs() itself). Fixes: 8cd8a6b17d27 ("ice: move VF overflow message count into struct ice_mbx_vf_info") Reported-by: Sujai Buvaneswaran Closes: https://lore.kernel.org/intel-wired-lan/PH0PR11MB50138B635F2E5CEB7075325D961F2@PH0PR11MB5013.namprd11.prod.outlook.com Reviewed-by: Martyna Szapar-Mudlaw Signed-off-by: Marcin Szycik Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen Link: https://patch.msgid.link/20250224190647.3601930-2-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/ice/ice_sriov.c | 5 +---- drivers/net/ethernet/intel/ice/ice_vf_lib.c | 8 ++++++++ drivers/net/ethernet/intel/ice/ice_vf_lib_private.h | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) commit a6aa36e957a1bfb5341986dec32d013d23228fe1 Author: Damien Le Moal Date: Fri Feb 14 13:14:34 2025 +0900 block: Remove zone write plugs when handling native zone append writes For devices that natively support zone append operations, REQ_OP_ZONE_APPEND BIOs are not processed through zone write plugging and are immediately issued to the zoned device. This means that there is no write pointer offset tracking done for these operations and that a zone write plug is not necessary. However, when receiving a zone append BIO, we may already have a zone write plug for the target zone if that zone was previously partially written using regular write operations. In such case, since the write pointer offset of the zone write plug is not incremented by the amount of sectors appended to the zone, 2 issues arise: 1) we risk leaving the plug in the disk hash table if the zone is fully written using zone append or regular write operations, because the write pointer offset will never reach the "zone full" state. 2) Regular write operations that are issued after zone append operations will always be failed by blk_zone_wplug_prepare_bio() as the write pointer alignment check will fail, even if the user correctly accounted for the zone append operations and issued the regular writes with a correct sector. Avoid these issues by immediately removing the zone write plug of zones that are the target of zone append operations when blk_zone_plug_bio() is called. The new function blk_zone_wplug_handle_native_zone_append() implements this for devices that natively support zone append. The removal of the zone write plug using disk_remove_zone_wplug() requires aborting all plugged regular write using disk_zone_wplug_abort() as otherwise the plugged write BIOs would never be executed (with the plug removed, the completion path will never see again the zone write plug as disk_get_zone_wplug() will return NULL). Rate-limited warnings are added to blk_zone_wplug_handle_native_zone_append() and to disk_zone_wplug_abort() to signal this. Since blk_zone_wplug_handle_native_zone_append() is called in the hot path for operations that will not be plugged, disk_get_zone_wplug() is optimized under the assumption that a user issuing zone append operations is not at the same time issuing regular writes and that there are no hashed zone write plugs. The struct gendisk atomic counter nr_zone_wplugs is added to check this, with this counter incremented in disk_insert_zone_wplug() and decremented in disk_remove_zone_wplug(). To be consistent with this fix, we do not need to fill the zone write plug hash table with zone write plugs for zones that are partially written for a device that supports native zone append operations. So modify blk_revalidate_seq_zone() to return early to avoid allocating and inserting a zone write plug for partially written sequential zones if the device natively supports zone append. Reported-by: Jorgen Hansen Fixes: 9b1ce7f0c6f8 ("block: Implement zone append emulation") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Tested-by: Jorgen Hansen Link: https://lore.kernel.org/r/20250214041434.82564-1-dlemoal@kernel.org Signed-off-by: Jens Axboe block/blk-zoned.c | 76 +++++++++++++++++++++++++++++++++++++++++++++----- include/linux/blkdev.h | 7 +++-- 2 files changed, 73 insertions(+), 10 deletions(-) commit 5568e4ca9aedf0aa2a84c6c8c74c240db09aa89d Merge: 18912c520674 db75a16813aa Author: Jakub Kicinski Date: Tue Feb 25 18:34:42 2025 -0800 Merge branch 'mptcp-misc-fixes' Matthieu Baerts says: ==================== mptcp: misc. fixes Here are two unrelated fixes, plus an extra patch: - Patch 1: prevent a warning by removing an unneeded and incorrect small optimisation in the path-manager. A fix for v5.10. - Patch 2: reset a subflow when MPTCP opts have been dropped after having correctly added a new path. A fix for v5.19. - Patch 3: add a safety check to prevent issues like the one fixed by the second patch. ==================== Link: https://patch.msgid.link/20250224-net-mptcp-misc-fixes-v1-0-f550f636b435@kernel.org Signed-off-by: Jakub Kicinski commit db75a16813aabae3b78c06b1b99f5e314c1f55d3 Author: Matthieu Baerts (NGI0) Date: Mon Feb 24 19:11:52 2025 +0100 mptcp: safety check before fallback Recently, some fallback have been initiated, while the connection was not supposed to fallback. Add a safety check with a warning to detect when an wrong attempt to fallback is being done. This should help detecting any future issues quicker. Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250224-net-mptcp-misc-fixes-v1-3-f550f636b435@kernel.org Signed-off-by: Jakub Kicinski net/mptcp/protocol.h | 2 ++ 1 file changed, 2 insertions(+) commit 8668860b0ad32a13fcd6c94a0995b7aa7638c9ef Author: Matthieu Baerts (NGI0) Date: Mon Feb 24 19:11:51 2025 +0100 mptcp: reset when MPTCP opts are dropped after join Before this patch, if the checksum was not used, the subflow was only reset if map_data_len was != 0. If there were no MPTCP options or an invalid mapping, map_data_len was not set to the data len, and then the subflow was not reset as it should have been, leaving the MPTCP connection in a wrong fallback mode. This map_data_len condition has been introduced to handle the reception of the infinite mapping. Instead, a new dedicated mapping error could have been returned and treated as a special case. However, the commit 31bf11de146c ("mptcp: introduce MAPPING_BAD_CSUM") has been introduced by Paolo Abeni soon after, and backported later on to stable. It better handle the csum case, and it means the exception for valid_csum_seen in subflow_can_fallback(), plus this one for the infinite mapping in subflow_check_data_avail(), are no longer needed. In other words, the code can be simplified there: a fallback should only be done if msk->allow_infinite_fallback is set. This boolean is set to false once MPTCP-specific operations acting on the whole MPTCP connection vs the initial path have been done, e.g. a second path has been created, or an MPTCP re-injection -- yes, possible even with a single subflow. The subflow_can_fallback() helper can then be dropped, and replaced by this single condition. This also makes the code clearer: a fallback should only be done if it is possible to do so. While at it, no need to set map_data_len to 0 in get_mapping_status() for the infinite mapping case: it will be set to skb->len just after, at the end of subflow_check_data_avail(), and not read in between. Fixes: f8d4bcacff3b ("mptcp: infinite mapping receiving") Cc: stable@vger.kernel.org Reported-by: Chester A. Unal Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/544 Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts (NGI0) Tested-by: Chester A. Unal Link: https://patch.msgid.link/20250224-net-mptcp-misc-fixes-v1-2-f550f636b435@kernel.org Signed-off-by: Jakub Kicinski net/mptcp/subflow.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit f865c24bc55158313d5779fc81116023a6940ca3 Author: Paolo Abeni Date: Mon Feb 24 19:11:50 2025 +0100 mptcp: always handle address removal under msk socket lock Syzkaller reported a lockdep splat in the PM control path: WARNING: CPU: 0 PID: 6693 at ./include/net/sock.h:1711 sock_owned_by_me include/net/sock.h:1711 [inline] WARNING: CPU: 0 PID: 6693 at ./include/net/sock.h:1711 msk_owned_by_me net/mptcp/protocol.h:363 [inline] WARNING: CPU: 0 PID: 6693 at ./include/net/sock.h:1711 mptcp_pm_nl_addr_send_ack+0x57c/0x610 net/mptcp/pm_netlink.c:788 Modules linked in: CPU: 0 UID: 0 PID: 6693 Comm: syz.0.205 Not tainted 6.14.0-rc2-syzkaller-00303-gad1b832bf1cf #0 Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 RIP: 0010:sock_owned_by_me include/net/sock.h:1711 [inline] RIP: 0010:msk_owned_by_me net/mptcp/protocol.h:363 [inline] RIP: 0010:mptcp_pm_nl_addr_send_ack+0x57c/0x610 net/mptcp/pm_netlink.c:788 Code: 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc e8 ca 7b d3 f5 eb b9 e8 c3 7b d3 f5 90 0f 0b 90 e9 dd fb ff ff e8 b5 7b d3 f5 90 <0f> 0b 90 e9 3e fb ff ff 44 89 f1 80 e1 07 38 c1 0f 8c eb fb ff ff RSP: 0000:ffffc900034f6f60 EFLAGS: 00010283 RAX: ffffffff8bee3c2b RBX: 0000000000000001 RCX: 0000000000080000 RDX: ffffc90004d42000 RSI: 000000000000a407 RDI: 000000000000a408 RBP: ffffc900034f7030 R08: ffffffff8bee37f6 R09: 0100000000000000 R10: dffffc0000000000 R11: ffffed100bcc62e4 R12: ffff88805e6316e0 R13: ffff88805e630c00 R14: dffffc0000000000 R15: ffff88805e630c00 FS: 00007f7e9a7e96c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2fd18ff8 CR3: 0000000032c24000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: mptcp_pm_remove_addr+0x103/0x1d0 net/mptcp/pm.c:59 mptcp_pm_remove_anno_addr+0x1f4/0x2f0 net/mptcp/pm_netlink.c:1486 mptcp_nl_remove_subflow_and_signal_addr net/mptcp/pm_netlink.c:1518 [inline] mptcp_pm_nl_del_addr_doit+0x118d/0x1af0 net/mptcp/pm_netlink.c:1629 genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline] genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0xb1f/0xec0 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x206/0x480 net/netlink/af_netlink.c:2543 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x8de/0xcb0 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:733 ____sys_sendmsg+0x53a/0x860 net/socket.c:2573 ___sys_sendmsg net/socket.c:2627 [inline] __sys_sendmsg+0x269/0x350 net/socket.c:2659 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 RIP: 0033:0x7f7e9998cde9 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:00007f7e9a7e9038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f7e99ba5fa0 RCX: 00007f7e9998cde9 RDX: 000000002000c094 RSI: 0000400000000000 RDI: 0000000000000007 RBP: 00007f7e99a0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f7e99ba5fa0 R15: 00007fff49231088 Indeed the PM can try to send a RM_ADDR over a msk without acquiring first the msk socket lock. The bugged code-path comes from an early optimization: when there are no subflows, the PM should (usually) not send RM_ADDR notifications. The above statement is incorrect, as without locks another process could concurrent create a new subflow and cause the RM_ADDR generation. Additionally the supposed optimization is not very effective even performance-wise, as most mptcp sockets should have at least one subflow: the MPC one. Address the issue removing the buggy code path, the existing "slow-path" will handle correctly even the edge case. Fixes: b6c08380860b ("mptcp: remove addr and subflow in PM netlink") Cc: stable@vger.kernel.org Reported-by: syzbot+cd3ce3d03a3393ae9700@syzkaller.appspotmail.com Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/546 Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250224-net-mptcp-misc-fixes-v1-1-f550f636b435@kernel.org Signed-off-by: Jakub Kicinski net/mptcp/pm_netlink.c | 5 ----- 1 file changed, 5 deletions(-) commit 18912c520674ec4d920fe3826e7e4fefeecdf5ae Author: Stanislav Fomichev Date: Mon Feb 24 09:44:01 2025 -0800 tcp: devmem: don't write truncated dmabuf CMSGs to userspace Currently, we report -ETOOSMALL (err) only on the first iteration (!sent). When we get put_cmsg error after a bunch of successful put_cmsg calls, we don't signal the error at all. This might be confusing on the userspace side which will see truncated CMSGs but no MSG_CTRUNC signal. Consider the following case: - sizeof(struct cmsghdr) = 16 - sizeof(struct dmabuf_cmsg) = 24 - total cmsg size (CMSG_LEN) = 40 (16+24) When calling recvmsg with msg_controllen=60, the userspace will receive two(!) dmabuf_cmsg(s), the first one will be a valid one and the second one will be silently truncated. There is no easy way to discover the truncation besides doing something like "cm->cmsg_len != CMSG_LEN(sizeof(dmabuf_cmsg))". Introduce new put_devmem_cmsg wrapper that reports an error instead of doing the truncation. Mina suggests that it's the intended way this API should work. Note that we might now report MSG_CTRUNC when the users (incorrectly) call us with msg_control == NULL. Fixes: 8f0b3cc9a4c1 ("tcp: RX path for devmem TCP") Reviewed-by: Mina Almasry Signed-off-by: Stanislav Fomichev Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250224174401.3582695-1-sdf@fomichev.me Signed-off-by: Jakub Kicinski include/linux/socket.h | 2 ++ net/core/scm.c | 10 ++++++++++ net/ipv4/tcp.c | 26 ++++++++++---------------- 3 files changed, 22 insertions(+), 16 deletions(-) commit bab3a6e9ffd600f9db0ebaf8f45e1c6111cf314c Author: Sascha Hauer Date: Mon Feb 24 06:17:16 2025 +0100 net: ethernet: ti: am65-cpsw: select PAGE_POOL am65-cpsw uses page_pool_dev_alloc_pages(), thus needs PAGE_POOL selected to avoid linker errors. This is missing since the driver started to use page_pool helpers in 8acacc40f733 ("net: ethernet: ti: am65-cpsw: Add minimal XDP support") Fixes: 8acacc40f733 ("net: ethernet: ti: am65-cpsw: Add minimal XDP support") Signed-off-by: Sascha Hauer Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/20250224-net-am654-nuss-kconfig-v2-1-c124f4915c92@pengutronix.de Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 66cb85c441cd9c44b193ff75b4d0358fccdc6b9c Author: David Howells Date: Tue Feb 25 22:25:00 2025 +0000 cifs: Fix the smb1 readv callback to correctly call netfs Fix cifs_readv_callback() to call netfs_read_subreq_terminated() rather than queuing the subrequest work item (which is unset). Also call the I/O progress tracepoint. cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Fixes: e2d46f2ec332 ("netfs: Change the read result collector to only use one work item") Reported-by: Jean-Christophe Guillain Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219793 Tested-by: Jean-Christophe Guillain Tested-by: Pali Rohár Reviewed-by: Paulo Alcantara (Red Hat) Signed-off-by: David Howells Signed-off-by: Steve French fs/smb/client/cifssmb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f8c857238a392f21d5726d07966f6061007c8d4f Author: Andrii Nakryiko Date: Tue Feb 25 14:32:14 2025 -0800 uprobes: Remove too strict lockdep_assert() condition in hprobe_expire() hprobe_expire() is used to atomically switch pending uretprobe instance (struct return_instance) from being SRCU protected to be refcounted. This can be done from background timer thread, or synchronously within current thread when task is forked. In the former case, return_instance has to be protected through RCU read lock, and that's what hprobe_expire() used to check with lockdep_assert(rcu_read_lock_held()). But in the latter case (hprobe_expire() called from dup_utask()) there is no RCU lock being held, and it's both unnecessary and incovenient. Inconvenient due to the intervening memory allocations inside dup_return_instance()'s loop. Unnecessary because dup_utask() is called synchronously in current thread, and no uretprobe can run at that point, so return_instance can't be freed either. So drop rcu_read_lock_held() condition, and expand corresponding comment to explain necessary lifetime guarantees. lockdep_assert()-detected issue is a false positive. Fixes: dd1a7567784e ("uprobes: SRCU-protect uretprobe lifetime (with timeout)") Reported-by: Breno Leitao Signed-off-by: Andrii Nakryiko Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250225223214.2970740-1-andrii@kernel.org kernel/events/uprobes.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 0f6750b15ffdf274668b12824b09bd49ea854e18 Author: Daniel Sneddon Date: Thu Dec 19 08:52:27 2024 -0700 x86/entry: Fix kernel-doc warning The do_int80_emulation() function is missing a kernel-doc formatted description of its argument. This is causing a warning when building with W=1. Add a brief description of the argument to satisfy kernel-doc. Reported-by: kernel test robot Signed-off-by: Daniel Sneddon Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20241219155227.685692-1-daniel.sneddon@linux.intel.com Closes: https://lore.kernel.org/oe-kbuild-all/202412131236.a5HhOqXo-lkp@intel.com/ arch/x86/entry/common.c | 1 + 1 file changed, 1 insertion(+) commit 68a9b0e313302451468c0b0eda53c383fa51a8f4 Author: Aaron Ma Date: Tue Dec 24 22:55:16 2024 +0800 perf/x86/rapl: Add support for Intel Arrow Lake U Add Arrow Lake U model for RAPL: $ ls -1 /sys/devices/power/events/ energy-cores energy-cores.scale energy-cores.unit energy-gpu energy-gpu.scale energy-gpu.unit energy-pkg energy-pkg.scale energy-pkg.unit energy-psys energy-psys.scale energy-psys.unit The same output as ArrowLake: $ perf stat -a -I 1000 --per-socket -e power/energy-pkg/ Signed-off-by: Aaron Ma Signed-off-by: Ingo Molnar Acked-by: Zhang Rui Link: https://lore.kernel.org/r/20241224145516.349028-1-aaron.ma@canonical.com arch/x86/events/rapl.c | 1 + 1 file changed, 1 insertion(+) commit 9de7695925d5d2d2085681ba935857246eb2817d Author: Arnd Bergmann Date: Tue Feb 25 22:32:33 2025 +0100 x86/irq: Define trace events conditionally When both of X86_LOCAL_APIC and X86_THERMAL_VECTOR are disabled, the irq tracing produces a W=1 build warning for the tracing definitions: In file included from include/trace/trace_events.h:27, from include/trace/define_trace.h:113, from arch/x86/include/asm/trace/irq_vectors.h:383, from arch/x86/kernel/irq.c:29: include/trace/stages/init.h:2:23: error: 'str__irq_vectors__trace_system_name' defined but not used [-Werror=unused-const-variable=] Make the tracepoints conditional on the same symbosl that guard their usage. Signed-off-by: Arnd Bergmann Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250225213236.3141752-1-arnd@kernel.org arch/x86/kernel/irq.c | 2 ++ 1 file changed, 2 insertions(+) commit bebe35bb738b573c32a5033499cd59f20293f2a3 Author: Russell Senior Date: Tue Feb 25 22:31:20 2025 +0100 x86/CPU: Fix warm boot hang regression on AMD SC1100 SoC systems I still have some Soekris net4826 in a Community Wireless Network I volunteer with. These devices use an AMD SC1100 SoC. I am running OpenWrt on them, which uses a patched kernel, that naturally has evolved over time. I haven't updated the ones in the field in a number of years (circa 2017), but have one in a test bed, where I have intermittently tried out test builds. A few years ago, I noticed some trouble, particularly when "warm booting", that is, doing a reboot without removing power, and noticed the device was hanging after the kernel message: [ 0.081615] Working around Cyrix MediaGX virtual DMA bugs. If I removed power and then restarted, it would boot fine, continuing through the message above, thusly: [ 0.081615] Working around Cyrix MediaGX virtual DMA bugs. [ 0.090076] Enable Memory-Write-back mode on Cyrix/NSC processor. [ 0.100000] Enable Memory access reorder on Cyrix/NSC processor. [ 0.100070] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0 [ 0.110058] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0 [ 0.120037] CPU: NSC Geode(TM) Integrated Processor by National Semi (family: 0x5, model: 0x9, stepping: 0x1) [...] In order to continue using modern tools, like ssh, to interact with the software on these old devices, I need modern builds of the OpenWrt firmware on the devices. I confirmed that the warm boot hang was still an issue in modern OpenWrt builds (currently using a patched linux v6.6.65). Last night, I decided it was time to get to the bottom of the warm boot hang, and began bisecting. From preserved builds, I narrowed down the bisection window from late February to late May 2019. During this period, the OpenWrt builds were using 4.14.x. I was able to build using period-correct Ubuntu 18.04.6. After a number of bisection iterations, I identified a kernel bump from 4.14.112 to 4.14.113 as the commit that introduced the warm boot hang. https://github.com/openwrt/openwrt/commit/07aaa7e3d62ad32767d7067107db64b6ade81537 Looking at the upstream changes in the stable kernel between 4.14.112 and 4.14.113 (tig v4.14.112..v4.14.113), I spotted a likely suspect: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=20afb90f730982882e65b01fb8bdfe83914339c5 So, I tried reverting just that kernel change on top of the breaking OpenWrt commit, and my warm boot hang went away. Presumably, the warm boot hang is due to some register not getting cleared in the same way that a loss of power does. That is approximately as much as I understand about the problem. More poking/prodding and coaching from Jonas Gorski, it looks like this test patch fixes the problem on my board: Tested against v6.6.67 and v4.14.113. Fixes: 18fb053f9b82 ("x86/cpu/cyrix: Use correct macros for Cyrix calls on Geode processors") Debugged-by: Jonas Gorski Signed-off-by: Russell Senior Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/CAHP3WfOgs3Ms4Z+L9i0-iBOE21sdMk5erAiJurPjnrL9LSsgRA@mail.gmail.com Cc: Matthew Whitehead Cc: Thomas Gleixner arch/x86/kernel/cpu/cyrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ac9c34d1e45a4c25174ced4fc0cfc33ff3ed08c7 Merge: 9f5270d758d9 b66535356a48 Author: Linus Torvalds Date: Tue Feb 25 13:43:03 2025 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: - Fix a mlx5 malfunction if the UMR QP gets an error - Return the correct port number to userspace for a mlx5 DCT - Don't cause a UMR QP error if DMABUF teardown races with invalidation - Fix a WARN splat when unregisering so mlx5 device memory MR types - Use the correct alignment for the mana doorbell so that two processes do not share the same physical page on non-4k page systems - MAINTAINERS updates for MANA - Retry failed HNS FW commands because some can take a long time - Cast void * handle to the correct type in bnxt to fix corruption - Avoid a NULL pointer crash in bnxt_re - Fix skipped ib_device_unregsiter() for bnxt_re due to some earlier rework - Correctly detect if the bnxt supports extended statistics - Fix refcount leak in mlx5 odp introduced by a previous fix - Map the FW result for the port rate to the userspace values properly in mlx5, returns correct values for newer 800G ports - Don't wrongly destroy counters objects that were not automatically created during mlx5 bind qp - Set page size/shift members of kernel owned SRQs to fix a crash in nvme target * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/bnxt_re: Fix the page details for the srq created by kernel consumers RDMA/mlx5: Fix bind QP error cleanup flow RDMA/mlx5: Fix AH static rate parsing RDMA/mlx5: Fix implicit ODP hang on parent deregistration RDMA/bnxt_re: Fix the statistics for Gen P7 VF RDMA/bnxt_re: Fix issue in the unload path RDMA/bnxt_re: Add sanity checks on rdev validity RDMA/bnxt_re: Fix an issue in bnxt_re_async_notifier RDMA/hns: Fix mbox timing out by adding retry mechanism MAINTAINERS: update maintainer for Microsoft MANA RDMA driver RDMA/mana_ib: Allocate PAGE aligned doorbell index RDMA/mlx5: Fix a WARN during dereg_mr for DM type RDMA/mlx5: Fix a race for DMABUF MR which can lead to CQE with error IB/mlx5: Set and get correct qp_num for a DCT QP RDMA/mlx5: Fix the recovery flow of the UMR QP commit 9f5270d758d955506dcb114cb863a86b30a4c783 Merge: cc8a0934d099 42367eca7604 Author: Linus Torvalds Date: Tue Feb 25 13:32:32 2025 -0800 Merge tag 'perf-tools-fixes-for-v6.14-2-2025-02-25' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix tools/ quiet build Makefile infrastructure that was broken when working on tools/perf/ without testing on other tools/ living utilities. * tag 'perf-tools-fixes-for-v6.14-2-2025-02-25' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: tools: Remove redundant quiet setup tools: Unify top-level quiet infrastructure commit 96f41f644c4885761b0d117fc36dc5dcf92e15ec Author: Dmytro Maluka Date: Sun Jan 5 17:27:40 2025 +0000 x86/of: Don't use DTB for SMP setup if ACPI is enabled There are cases when it is useful to use both ACPI and DTB provided by the bootloader, however in such cases we should make sure to prevent conflicts between the two. Namely, don't try to use DTB for SMP setup if ACPI is enabled. Precisely, this prevents at least: - incorrectly calling register_lapic_address(APIC_DEFAULT_PHYS_BASE) after the LAPIC was already successfully enumerated via ACPI, causing noisy kernel warnings and probably potential real issues as well - failed IOAPIC setup in the case when IOAPIC is enumerated via mptable instead of ACPI (e.g. with acpi=noirq), due to mpparse_parse_smp_config() overridden by x86_dtb_parse_smp_config() Signed-off-by: Dmytro Maluka Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250105172741.3476758-2-dmaluka@chromium.org arch/x86/kernel/devicetree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d85862ccca452eeb19329e9f4f9a6ce1d1e53561 Author: Werner Sembach Date: Sat Feb 22 00:01:25 2025 +0100 Input: i8042 - swap old quirk combination with new quirk for more devices Some older Clevo barebones have problems like no or laggy keyboard after resume or boot which can be fixed with the SERIO_QUIRK_FORCENORESTORE quirk. We could not activly retest these devices because we no longer have them in our archive, but based on the other old Clevo barebones we tested where the new quirk had the same or a better behaviour I think it would be good to apply it on these too. Cc: stable@vger.kernel.org Signed-off-by: Werner Sembach Link: https://lore.kernel.org/r/20250221230137.70292-4-wse@tuxedocomputers.com Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-acpipnpio.h | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) commit 75ee4ebebbbe8dc4b55ba37f388924fa96bf1564 Author: Werner Sembach Date: Sat Feb 22 00:01:24 2025 +0100 Input: i8042 - swap old quirk combination with new quirk for several devices Some older Clevo barebones have problems like no or laggy keyboard after resume or boot which can be fixed with the SERIO_QUIRK_FORCENORESTORE quirk. While the old quirk combination did not show negative effects on these devices specifically, the new quirk works just as well and seems more stable in general. Cc: stable@vger.kernel.org Signed-off-by: Werner Sembach Link: https://lore.kernel.org/r/20250221230137.70292-3-wse@tuxedocomputers.com Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-acpipnpio.h | 40 ++++++++++++----------------------- 1 file changed, 14 insertions(+), 26 deletions(-) commit 9ed468e17d5b80e7116fd35842df3648e808ae47 Author: Werner Sembach Date: Sat Feb 22 00:01:23 2025 +0100 Input: i8042 - add required quirks for missing old boardnames Some older Clevo barebones have problems like no or laggy keyboard after resume or boot which can be fixed with the SERIO_QUIRK_FORCENORESTORE quirk. The PB71RD keyboard is sometimes laggy after resume and the PC70DR, PB51RF, P640RE, and PCX0DX_GN20 keyboard is sometimes unresponsive after resume. This quirk fixes that. Cc: stable@vger.kernel.org Signed-off-by: Werner Sembach Link: https://lore.kernel.org/r/20250221230137.70292-2-wse@tuxedocomputers.com Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-acpipnpio.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 729d163232971672d0f41b93c02092fb91f0e758 Author: Werner Sembach Date: Sat Feb 22 00:01:22 2025 +0100 Input: i8042 - swap old quirk combination with new quirk for NHxxRZQ Some older Clevo barebones have problems like no or laggy keyboard after resume or boot which can be fixed with the SERIO_QUIRK_FORCENORESTORE quirk. With the old i8042 quirks this devices keyboard is sometimes laggy after resume. With the new quirk this issue doesn't happen. Cc: stable@vger.kernel.org Signed-off-by: Werner Sembach Link: https://lore.kernel.org/r/20250221230137.70292-1-wse@tuxedocomputers.com Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-acpipnpio.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 9084ed79ddaaaa1ec01cd304af9fb532c26252db Author: Stephen Smalley Date: Thu Feb 20 14:29:36 2025 -0500 lsm,nfs: fix memory leak of lsm_context commit b530104f50e8 ("lsm: lsm_context in security_dentry_init_security") did not preserve the lsm id for subsequent release calls, which results in a memory leak. Fix it by saving the lsm id in the nfs4_label and providing it on the subsequent release call. Fixes: b530104f50e8 ("lsm: lsm_context in security_dentry_init_security") Signed-off-by: Stephen Smalley Acked-by: Paul Moore Acked-by: Casey Schaufler Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 7 ++++--- include/linux/nfs4.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) commit 1f7a4f98c11fbeb18ed21f3b3a497e90a50ad2e0 Author: Arnd Bergmann Date: Tue Feb 25 15:52:21 2025 +0100 sunrpc: suppress warnings for unused procfs functions There is a warning about unused variables when building with W=1 and no procfs: net/sunrpc/cache.c:1660:30: error: 'cache_flush_proc_ops' defined but not used [-Werror=unused-const-variable=] 1660 | static const struct proc_ops cache_flush_proc_ops = { | ^~~~~~~~~~~~~~~~~~~~ net/sunrpc/cache.c:1622:30: error: 'content_proc_ops' defined but not used [-Werror=unused-const-variable=] 1622 | static const struct proc_ops content_proc_ops = { | ^~~~~~~~~~~~~~~~ net/sunrpc/cache.c:1598:30: error: 'cache_channel_proc_ops' defined but not used [-Werror=unused-const-variable=] 1598 | static const struct proc_ops cache_channel_proc_ops = { | ^~~~~~~~~~~~~~~~~~~~~~ These are used inside of an #ifdef, so replacing that with an IS_ENABLED() check lets the compiler see how they are used while still dropping them during dead code elimination. Fixes: dbf847ecb631 ("knfsd: allow cache_register to return error on failure") Reviewed-by: Jeff Layton Acked-by: Chuck Lever Signed-off-by: Arnd Bergmann Signed-off-by: Anna Schumaker net/sunrpc/cache.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit a26b24b2e21f6222635a95426b9ef9eec63d69b1 Author: Kan Liang Date: Fri Jan 17 07:19:13 2025 -0800 perf/x86/intel: Use better start period for frequency mode Freqency mode is the current default mode of Linux perf. A period of 1 is used as a starting period. The period is auto-adjusted on each tick or an overflow, to meet the frequency target. The start period of 1 is too low and may trigger some issues: - Many HWs do not support period 1 well. https://lore.kernel.org/lkml/875xs2oh69.ffs@tglx/ - For an event that occurs frequently, period 1 is too far away from the real period. Lots of samples are generated at the beginning. The distribution of samples may not be even. - A low starting period for frequently occurring events also challenges virtualization, which has a longer path to handle a PMI. The limit_period value only checks the minimum acceptable value for HW. It cannot be used to set the start period, because some events may need a very low period. The limit_period cannot be set too high. It doesn't help with the events that occur frequently. It's hard to find a universal starting period for all events. The idea implemented by this patch is to only give an estimate for the popular HW and HW cache events. For the rest of the events, start from the lowest possible recommended value. Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250117151913.3043942-3-kan.liang@linux.intel.com arch/x86/events/intel/core.c | 85 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) commit 8fef0a3b17bb258130a4fcbcb5addf94b25e9ec5 Author: Tejun Heo Date: Tue Feb 25 06:02:23 2025 -1000 sched_ext: Fix pick_task_scx() picking non-queued tasks when it's called without balance() a6250aa251ea ("sched_ext: Handle cases where pick_task_scx() is called without preceding balance_scx()") added a workaround to handle the cases where pick_task_scx() is called without prececing balance_scx() which is due to a fair class bug where pick_taks_fair() may return NULL after a true return from balance_fair(). The workaround detects when pick_task_scx() is called without preceding balance_scx() and emulates SCX_RQ_BAL_KEEP and triggers kicking to avoid stalling. Unfortunately, the workaround code was testing whether @prev was on SCX to decide whether to keep the task running. This is incorrect as the task may be on SCX but no longer runnable. This could lead to a non-runnable task to be returned from pick_task_scx() which cause interesting confusions and failures. e.g. A common failure mode is the task ending up with (!on_rq && on_cpu) state which can cause potential wakers to busy loop, which can easily lead to deadlocks. Fix it by testing whether @prev has SCX_TASK_QUEUED set. This makes @prev_on_scx only used in one place. Open code the usage and improve the comment while at it. Signed-off-by: Tejun Heo Reported-by: Pat Cody Fixes: a6250aa251ea ("sched_ext: Handle cases where pick_task_scx() is called without preceding balance_scx()") Cc: stable@vger.kernel.org # v6.12+ Acked-by: Andrea Righi kernel/sched/ext.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit b4ae43b053537ec28f430c0ddb9b916ab296dbe5 Author: Youling Tang Date: Tue Feb 18 14:42:30 2025 +0800 objtool: Add bch2_trans_unlocked_or_in_restart_error() to bcachefs noreturns Fix the following objtool warning during build time: fs/bcachefs/btree_cache.o: warning: objtool: btree_node_lock.constprop.0() falls through to next function bch2_recalc_btree_reserve() fs/bcachefs/btree_update.o: warning: objtool: bch2_trans_update_get_key_cache() falls through to next function need_whiteout_for_snapshot() bch2_trans_unlocked_or_in_restart_error() is an Obviously Correct (tm) panic() wrapper, add it to the list of known noreturns. Fixes: b318882022a8 ("bcachefs: bch2_trans_verify_not_unlocked_or_in_restart()") Reported-by: k2ci Signed-off-by: Youling Tang Reviewed-by: Kent Overstreet Link: https://lore.kernel.org/r/20250218064230.219997-1-youling.tang@linux.dev Signed-off-by: Josh Poimboeuf tools/objtool/noreturns.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9da0ed4a85027063441fa1c73967cafc38f0677c Merge: 769c1b79295c 4bcef04ca67f Author: Mark Brown Date: Tue Feb 25 17:47:04 2025 +0000 ASoC: Intel: don't check number of sdw links when set Merge series from Bard Liao : Currently, we assume that the PCH DMIC pins are pin-muxed with SoundWire links. However, we do see a HW design that use PCH DMIC along with 3 SoundWire links. Remove the check and add warning to let users know that SoundWire MIC and PCH DMIC are both present and they could overwrite it with kernel params. commit 73cfc53cc3b6380eccf013049574485f64cb83ca Author: Ard Biesheuvel Date: Fri Feb 21 14:57:07 2025 +0100 objtool: Fix C jump table annotations for Clang A C jump table (such as the one used by the BPF interpreter) is a const global array of absolute code addresses, and this means that the actual values in the table may not be known until the kernel is booted (e.g., when using KASLR or when the kernel VA space is sized dynamically). When using PIE codegen, the compiler will default to placing such const global objects in .data.rel.ro (which is annotated as writable), rather than .rodata (which is annotated as read-only). As C jump tables are explicitly emitted into .rodata, this used to result in warnings for LoongArch builds (which uses PIE codegen for the entire kernel) like Warning: setting incorrect section attributes for .rodata..c_jump_table due to the fact that the explicitly specified .rodata section inherited the read-write annotation that the compiler uses for such objects when using PIE codegen. This warning was suppressed by explicitly adding the read-only annotation to the __attribute__((section(""))) string, by commit c5b1184decc8 ("compiler.h: specify correct attribute for .rodata..c_jump_table") Unfortunately, this hack does not work on Clang's integrated assembler, which happily interprets the appended section type and permission specifiers as part of the section name, which therefore no longer matches the hard-coded pattern '.rodata..c_jump_table' that objtool expects, causing it to emit a warning kernel/bpf/core.o: warning: objtool: ___bpf_prog_run+0x20: sibling call from callable instruction with modified stack frame Work around this, by emitting C jump tables into .data.rel.ro instead, which is treated as .rodata by the linker script for all builds, not just PIE based ones. Fixes: c5b1184decc8 ("compiler.h: specify correct attribute for .rodata..c_jump_table") Tested-by: Tiezhu Yang # on LoongArch Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250221135704.431269-6-ardb+git@google.com Signed-off-by: Josh Poimboeuf include/linux/compiler.h | 2 +- tools/objtool/check.c | 7 ++++--- tools/objtool/include/objtool/special.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) commit 68f3ea7ee199ef77551e090dfef5a49046ea8443 Author: Ard Biesheuvel Date: Fri Feb 21 14:57:06 2025 +0100 vmlinux.lds: Ensure that const vars with relocations are mapped R/O In the kernel, there are architectures (x86, arm64) that perform boot-time relocation (for KASLR) without relying on PIE codegen. In this case, all const global objects are emitted into .rodata, including const objects with fields that will be fixed up by the boot-time relocation code. This implies that .rodata (and .text in some cases) need to be writable at boot, but they will usually be mapped read-only as soon as the boot completes. When using PIE codegen, the compiler will emit const global objects into .data.rel.ro rather than .rodata if the object contains fields that need such fixups at boot-time. This permits the linker to annotate such regions as requiring read-write access only at load time, but not at execution time (in user space), while keeping .rodata truly const (in user space, this is important for reducing the CoW footprint of dynamic executables). This distinction does not matter for the kernel, but it does imply that const data will end up in writable memory if the .data.rel.ro sections are not treated in a special way, as they will end up in the writable .data segment by default. So emit .data.rel.ro into the .rodata segment. Cc: stable@vger.kernel.org Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250221135704.431269-5-ardb+git@google.com Signed-off-by: Josh Poimboeuf include/asm-generic/vmlinux.lds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc8a0934d099b8153fc880a3588eec4791a7bccb Merge: 3d85d6c85399 efa11fd269c1 Author: Linus Torvalds Date: Tue Feb 25 09:42:15 2025 -0800 Merge tag 'for-6.14-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - extent map shrinker fixes: - fix potential use after free accessing an inode to reach fs_info, the shrinker could do iput() in the meantime - skip unnecessary scanning of inodes without extent maps - do direct iput(), no need for indirection via workqueue - in block < page mode, fix race when extending i_size in buffered mode - fix minor memory leak in selftests - print descriptive error message when seeding device is not found * tag 'for-6.14-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix data overwriting bug during buffered write when block size < page size btrfs: output an error message if btrfs failed to find the seed fsid btrfs: do regular iput instead of delayed iput during extent map shrinking btrfs: skip inodes without loaded extent maps when shrinking extent maps btrfs: fix use-after-free on inode when scanning root during em shrinking btrfs: selftests: fix btrfs_test_delayed_refs() leak of transaction commit d3c7059b6a8600fc62cd863f1ea203b8675e63e1 Author: Pierre-Eric Pelloux-Prayer Date: Thu Feb 20 14:41:59 2025 +0100 drm/amdgpu: init return value in amdgpu_ttm_clear_buffer Otherwise an uninitialized value can be returned if amdgpu_res_cleared returns true for all regions. Possibly closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3812 Fixes: a68c7eaa7a8f ("drm/amdgpu: Enable clear page functionality") Signed-off-by: Pierre-Eric Pelloux-Prayer Acked-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher (cherry picked from commit 7c62aacc3b452f73a1284198c81551035fac6d71) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4de141b8b1b7991b607f77e5f4580e1c67c24717 Author: Roman Li Date: Wed Feb 12 14:49:36 2025 -0500 drm/amd/display: Fix HPD after gpu reset [Why] DC is not using amdgpu_irq_get/put to manage the HPD interrupt refcounts. So when amdgpu_irq_gpu_reset_resume_helper() reprograms all of the IRQs, HPD gets disabled. [How] Use amdgpu_irq_get/put() for HPD init/fini in DM in order to sync refcounts Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Mario Limonciello Reviewed-by: Aurabindo Pillai Signed-off-by: Roman Li Signed-off-by: Zaeem Mohamed Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit f3dde2ff7fcaacd77884502e8f572f2328e9c745) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit b5f7242e49b927cfe488b369fa552f2eff579ef1 Author: Yilin Chen Date: Fri Feb 7 15:26:19 2025 -0500 drm/amd/display: add a quirk to enable eDP0 on DP1 [why] some board designs have eDP0 connected to DP1, need a way to enable support_edp0_on_dp1 flag, otherwise edp related features cannot work [how] do a dmi check during dm initialization to identify systems that require support_edp0_on_dp1. Optimize quirk table with callback functions to set quirk entries, retrieve_dmi_info can set quirks according to quirk entries Cc: Mario Limonciello Reviewed-by: Mario Limonciello Reviewed-by: Nicholas Kazlauskas Signed-off-by: Yilin Chen Signed-off-by: Zaeem Mohamed Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit f6d17270d18a6a6753fff046330483d43f8405e4) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 69 ++++++++++++++++++++--- 1 file changed, 62 insertions(+), 7 deletions(-) commit e8863f8b0316d8ee1e7e5291e8f2f72c91ac967d Author: Tom Chung Date: Thu Feb 6 11:31:23 2025 +0800 drm/amd/display: Disable PSR-SU on eDP panels [Why] PSR-SU may cause some glitching randomly on several panels. [How] Temporarily disable the PSR-SU and fallback to PSR1 for all eDP panels. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3388 Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Sun peng Li Signed-off-by: Tom Chung Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 6deeefb820d0efb0b36753622fb982d03b37b3ad) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a04bf34e0829f2c5d5f1ea7317daae2efa560fd1 Author: Aurabindo Pillai Date: Fri Feb 21 14:19:12 2025 -0500 MAINTAINERS: Update AMDGPU DML maintainers info Chaitanya is no longer with AMD, and the responsibility has been taken over by Austin. Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher (cherry picked from commit a101fa705d016d46463dd4ce488671369c922bc2) Cc: stable@vger.kernel.org MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12f3b92d1cfa5526715fff93a6d6fe29300d5e2a Author: Melissa Wen Date: Sat Feb 15 18:15:47 2025 -0300 drm/amd/display: restore edid reading from a given i2c adapter When switching to drm_edid, we slightly changed how to get edid by removing the possibility of getting them from dc_link when in aux transaction mode. As MST doesn't initialize the connector with `drm_connector_init_with_ddc()`, restore the original behavior to avoid functional changes. v2: - Fix build warning of unchecked dereference (kernel test bot) CC: Alex Hung CC: Mario Limonciello CC: Roman Li CC: Aurabindo Pillai Fixes: 48edb2a4256e ("drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid") Reviewed-by: Alex Hung Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher (cherry picked from commit 81262b1656feb3813e3d917ab78824df6831e69e) drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 96989f3dca6f51f202b6dbc92c37e17df6ca12f4 Author: Rodrigo Siqueira Date: Wed Feb 19 11:46:20 2025 -0700 mailmap: Add entry for Rodrigo Siqueira Map all of my previously used email addresses to my @igalia.com address. Acked-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher (cherry picked from commit 289387d0dbf806bd59063ab93d94f48cd4c75c7c) Cc: stable@vger.kernel.org .mailmap | 2 ++ 1 file changed, 2 insertions(+) commit 733d675c2a436b416107893db87eb182585c1b39 Author: Rodrigo Siqueira Date: Wed Feb 19 11:46:19 2025 -0700 MAINTAINERS: Change my role from Maintainer to Reviewer Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher (cherry picked from commit 9b3ef540397cfc356f10f504841b2e9d16e31286) Cc: stable@vger.kernel.org MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 748a1f51bb74453f1fe22d3ca68a717cb31f02e5 Author: Alex Deucher Date: Fri Feb 14 12:32:30 2025 -0500 drm/amdgpu/mes: keep enforce isolation up to date Re-send the mes message on resume to make sure the mes state is up to date. Fixes: 8521e3c5f058 ("drm/amd/amdgpu: limit single process inside MES") Acked-by: Srinivasan Shanmugam Signed-off-by: Alex Deucher Cc: Shaoyun Liu Cc: Srinivasan Shanmugam Signed-off-by: Alex Deucher (cherry picked from commit 27b791514789844e80da990c456c2465325e0851) drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 13 ++++--------- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 20 +++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 2 +- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 4 ++++ 5 files changed, 32 insertions(+), 11 deletions(-) commit e7ea88207cef513514e706aacc534527ac88b9b8 Author: Alex Deucher Date: Thu Feb 13 13:37:01 2025 -0500 drm/amdgpu/gfx: only call mes for enforce isolation if supported This should not be called on chips without MES so check if MES is enabled and if the cleaner shader is supported. Fixes: 8521e3c5f058 ("drm/amd/amdgpu: limit single process inside MES") Reviewed-by: Srinivasan Shanmugam Signed-off-by: Alex Deucher Cc: Shaoyun Liu Cc: Srinivasan Shanmugam (cherry picked from commit 80513e389765c8f9543b26d8fa4bbdf0e59ff8bc) drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8005351c7d53c31fb7eb5a423da7ab4bc3ad7639 Author: Alex Deucher Date: Tue Feb 11 15:38:20 2025 -0500 MAINTAINERS: update amdgpu maintainers list Xinhui's email is no longer valid. Reviewed-by: Christian König Signed-off-by: Alex Deucher (cherry picked from commit c19390ca9094dfcbc16d96b233a409c01e21d85b) Cc: stable@vger.kernel.org MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 099bffc7cadff40bfab1517c3461c53a7a38a0d7 Author: Alex Deucher Date: Mon Feb 17 10:55:05 2025 -0500 drm/amdgpu: disable BAR resize on Dell G5 SE There was a quirk added to add a workaround for a Sapphire RX 5600 XT Pulse that didn't allow BAR resizing. However, the quirk caused a regression with runtime pm on Dell laptops using those chips, rather than narrowing the scope of the resizing quirk, add a quirk to prevent amdgpu from resizing the BAR on those Dell platforms unless runtime pm is disabled. v2: update commit message, add runpm check Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/1707 Fixes: 907830b0fc9e ("PCI: Add a REBAR size quirk for Sapphire RX 5600 XT Pulse") Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher (cherry picked from commit 5235053f443cef4210606e5fb71f99b915a9723d) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3502ab5022bb5ef1edd063bdb6465a8bf3b46e66 Author: David Yat Sin Date: Wed Feb 19 17:34:38 2025 -0500 drm/amdkfd: Preserve cp_hqd_pq_control on update_mqd When userspace applications call AMDKFD_IOC_UPDATE_QUEUE. Preserve bitfields that do not need to be modified as they contain flags to track queue states that are used by CP FW. Signed-off-by: David Yat Sin Reviewed-by: Jay Cornwall Signed-off-by: Alex Deucher (cherry picked from commit 8150827990b709ab5a40c46c30d21b7f7b9e9440) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 6 ++++-- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c | 5 +++-- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12.c | 5 +++-- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 5 ++++- 4 files changed, 14 insertions(+), 7 deletions(-) commit 91dcc66b34beb72dde8412421bdc1b4cd40e4fb8 Author: chr[] Date: Wed Feb 12 16:51:38 2025 +0100 amdgpu/pm/legacy: fix suspend/resume issues resume and irq handler happily races in set_power_state() * amdgpu_legacy_dpm_compute_clocks() needs lock * protect irq work handler * fix dpm_enabled usage v2: fix clang build, integrate Lijo's comments (Alex) Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2524 Fixes: 3712e7a49459 ("drm/amd/pm: unified lock protections in amdgpu_dpm.c") Reviewed-by: Lijo Lazar Tested-by: Maciej S. Szmigiero # on Oland PRO Signed-off-by: chr[] Signed-off-by: Alex Deucher (cherry picked from commit ee3dc9e204d271c9c7a8d4d38a0bce4745d33e71) Cc: stable@vger.kernel.org drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 25 +++++++++++++++++++------ drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c | 8 ++++++-- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 26 ++++++++++++++++++++------ 3 files changed, 45 insertions(+), 14 deletions(-) commit 3d85d6c8539950dfcf4339f9ea865fb5d8f7ce03 Merge: 2a1944bff549 b5799106b44e Author: Linus Torvalds Date: Tue Feb 25 09:13:13 2025 -0800 Merge tag 'vfs-6.14-rc5.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: - Use __readahead_folio() in fuse again to fix a UAF issue when using splice - Remove d_op->d_delete method from pidfs - Remove d_op->d_delete method from nsfs - Simplify iomap_dio_bio_iter() - Fix a UAF in ovl_dentry_update_reval - Fix a miscalulated file range for filemap_fdatawrite_range_kick() - Don't skip skip dirty page in folio_unmap_invalidate() * tag 'vfs-6.14-rc5.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: iomap: Minor code simplification in iomap_dio_bio_iter() nsfs: remove d_op->d_delete pidfs: remove d_op->d_delete mm/truncate: don't skip dirty page in folio_unmap_invalidate() mm/filemap: fix miscalculated file range for filemap_fdatawrite_range_kick() fuse: don't truncate cached, mutated symlink ovl: fix UAF in ovl_dentry_update_reval by moving dput() in ovl_link_up fuse: revert back to __readahead_folio() for readahead commit 00817f0f1c45b007965f5676b9a2013bb39c7228 Author: Keith Busch Date: Mon Feb 24 17:13:30 2025 -0800 nvme-ioctl: fix leaked requests on mapping error All the callers assume nvme_map_user_request() frees the request on a failure. This wasn't happening on invalid metadata or io_uring command flags, so we've been leaking those requests. Fixes: 23fd22e55b767b ("nvme: wire up fixed buffer support for nvme passthrough") Fixes: 7c2fd76048e95d ("nvme: fix metadata handling in nvme-passthrough") Reviewed-by: Damien Le Moal Reviewed-by: Kanchan Joshi Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch drivers/nvme/host/ioctl.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 7ff4faba63571c51004280f7eb5d6362b15ec61f Author: Yixun Lan Date: Tue Feb 18 08:31:44 2025 +0800 pinctrl: spacemit: enable config option Pinctrl is an essential driver for SpacemiT's SoC, The uart driver requires it, same as sd card driver, so let's enable it by default for this SoC. The CONFIG_PINCTRL_SPACEMIT_K1 isn't enabled when using 'make defconfig' to select kernel configuration options. This result in a broken uart driver where fail at probe() stage due to no pins found. Fixes: a83c29e1d145 ("pinctrl: spacemit: add support for SpacemiT K1 SoC") Reported-by: Alex Elder Acked-by: Conor Dooley Tested-by: Alex Elder Signed-off-by: Yixun Lan Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Link: https://lore.kernel.org/20250218-k1-pinctrl-option-v3-1-36e031e0da1b@gentoo.org Signed-off-by: Linus Walleij arch/riscv/Kconfig.socs | 1 + drivers/pinctrl/spacemit/Kconfig | 3 ++- drivers/pinctrl/spacemit/pinctrl-k1.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) commit acf40ab42799e4ae1397ee6f5c5941092d66f999 Author: Charles Han Date: Wed Feb 12 18:05:32 2025 +0800 pinctrl: nuvoton: npcm8xx: Add NULL check in npcm8xx_gpio_fw devm_kasprintf() calls can return null pointers on failure. But the return values were not checked in npcm8xx_gpio_fw(). Add NULL check in npcm8xx_gpio_fw(), to handle kernel NULL pointer dereference error. Fixes: acf4884a5717 ("pinctrl: nuvoton: add NPCM8XX pinctrl and GPIO driver") Signed-off-by: Charles Han Link: https://lore.kernel.org/20250212100532.4317-1-hanchunchao@inspur.com Signed-off-by: Linus Walleij drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 3 +++ 1 file changed, 3 insertions(+) commit 68283c1cb573143c0b7515e93206f3503616bc10 Author: Artur Weber Date: Fri Feb 7 21:02:41 2025 +0100 pinctrl: bcm281xx: Fix incorrect regmap max_registers value The max_registers value does not take into consideration the stride; currently, it's set to the number of the last pin, but this does not accurately represent the final register. Fix this by multiplying the current value by 4. Fixes: 54b1aa5a5b16 ("ARM: pinctrl: Add Broadcom Capri pinctrl driver") Signed-off-by: Artur Weber Link: https://lore.kernel.org/20250207-bcm21664-pinctrl-v1-2-e7cfac9b2d3b@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 659a7614dd72e2835ac0b220c2fa68fabd8d1df9 Author: Antheas Kapenekakis Date: Mon Feb 24 23:01:55 2025 -0800 Input: xpad - rename QH controller to Legion Go S The QH controller is actually the controller of the Legion Go S, with the manufacturer string wch.cn and product name Legion Go S in its USB descriptor. A cursory lookup of the VID reveals the same. Therefore, rename the xpad entries to match. Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250222170010.188761-4-lkml@antheas.dev Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 95a54a96f657fd069d2a9922b6c2d293a72a001f Author: Antheas Kapenekakis Date: Mon Feb 24 23:00:29 2025 -0800 Input: xpad - add support for TECNO Pocket Go TECNO Pocket Go is a kickstarter handheld by manufacturer TECNO Mobile. It poses a unique feature: it does not have a display. Instead, the handheld is essentially a pc in a controller. As customary, it has an xpad endpoint, a keyboard endpoint, and a vendor endpoint for its vendor software. Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250222170010.188761-3-lkml@antheas.dev Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 2 ++ 1 file changed, 2 insertions(+) commit 709329c48214ad2acf12eed1b5c0eb798e40a64c Author: Antheas Kapenekakis Date: Mon Feb 24 22:59:34 2025 -0800 Input: xpad - add support for ZOTAC Gaming Zone ZOTAC Gaming Zone is ZOTAC's 2024 handheld release. As it is common with these handhelds, it uses a hybrid USB device with an xpad endpoint, a keyboard endpoint, and a vendor-specific endpoint for RGB control et al. Signed-off-by: Antheas Kapenekakis Link: https://lore.kernel.org/r/20250222170010.188761-2-lkml@antheas.dev Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 2 ++ 1 file changed, 2 insertions(+) commit 6ebf05189dfc6d0d597c99a6448a4d1064439a18 Author: Pavel Begunkov Date: Tue Feb 25 15:59:02 2025 +0000 io_uring/net: save msg_control for compat Match the compat part of io_sendmsg_copy_hdr() with its counterpart and save msg_control. Fixes: c55978024d123 ("io_uring/net: move receive multishot out of the generic msghdr path") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/2a8418821fe83d3b64350ad2b3c0303e9b732bbd.1740498502.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9e7c6779e3530bbdd465214afcd13f19c33e51a2 Author: Takashi Iwai Date: Tue Feb 25 16:45:32 2025 +0100 ALSA: hda/realtek: Fix wrong mic setup for ASUS VivoBook 15 ASUS VivoBook 15 with SSID 1043:1460 took an incorrect quirk via the pin pattern matching for ASUS (ALC256_FIXUP_ASUS_MIC), resulting in the two built-in mic pins (0x13 and 0x1b). This had worked without problems casually in the past because the right pin (0x1b) was picked up as the primary device. But since we fixed the pin enumeration for other bugs, the bogus one (0x13) is picked up as the primary device, hence the bug surfaced now. For addressing the regression, this patch explicitly specifies the quirk entry with ALC256_FIXUP_ASUS_MIC_NO_PRESENCE, which sets up only the headset mic pin. Fixes: 3b4309546b48 ("ALSA: hda: Fix headset detection failure due to unstable sort") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219807 Link: https://patch.msgid.link/20250225154540.13543-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 889c57066ceee5e9172232da0608a8ac053bb6e5 Author: Ming Lei Date: Tue Feb 25 10:21:41 2025 +0800 block: make segment size limit workable for > 4K PAGE_SIZE Using PAGE_SIZE as a minimum expected DMA segment size in consideration of devices which have a max DMA segment size of < 64k when used on 64k PAGE_SIZE systems leads to devices not being able to probe such as eMMC and Exynos UFS controller [0] [1] you can end up with a probe failure as follows: WARNING: CPU: 2 PID: 397 at block/blk-settings.c:339 blk_validate_limits+0x364/0x3c0 Ensure we use min(max_seg_size, seg_boundary_mask + 1) as the new min segment size when max segment size is < PAGE_SIZE for 16k and 64k base page size systems. If anyone need to backport this patch, the following commits are depended: commit 6aeb4f836480 ("block: remove bio_add_pc_page") commit 02ee5d69e3ba ("block: remove blk_rq_bio_prep") commit b7175e24d6ac ("block: add a dma mapping iterator") Link: https://lore.kernel.org/linux-block/20230612203314.17820-1-bvanassche@acm.org/ # [0] Link: https://lore.kernel.org/linux-block/1d55e942-5150-de4c-3a02-c3d066f87028@acm.org/ # [1] Cc: Yi Zhang Cc: John Garry Cc: Keith Busch Tested-by: Paul Bunyan Reviewed-by: Daniel Gomez Reviewed-by: Luis Chamberlain Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250225022141.2154581-1-ming.lei@redhat.com Signed-off-by: Jens Axboe block/blk-merge.c | 2 +- block/blk-settings.c | 14 +++++++++++--- block/blk.h | 9 +++++++-- include/linux/blkdev.h | 1 + 4 files changed, 20 insertions(+), 6 deletions(-) commit 8ec43c58d3be615a71548bc09148212013fb7e5f Author: Harry Wentland Date: Thu Dec 19 21:33:08 2024 -0700 drm/vkms: Round fixp2int conversion in lerp_u16 fixp2int always rounds down, fixp2int_ceil rounds up. We need the new fixp2int_round. Signed-off-by: Alex Hung Signed-off-by: Harry Wentland Reviewed-by: Louis Chauvet Link: https://patchwork.freedesktop.org/patch/msgid/20241220043410.416867-3-alex.hung@amd.com Signed-off-by: Louis Chauvet drivers/gpu/drm/vkms/vkms_composer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 769c1b79295c38d60fde4c0a8f5f31e01360c54f Author: Richard Fitzgerald Date: Tue Feb 25 13:18:43 2025 +0000 ASoC: cs35l56: Prevent races when soft-resetting using SPI control When SPI is used for control, the driver must hold the SPI bus lock while issuing the sequence of writes to perform a soft reset. >From the time the driver writes the SYSTEM_RESET command until the driver does a write to terminate the reset, there must not be any activity on the SPI bus lines. If there is any SPI activity during the soft-reset, another soft-reset will be triggered. The state of the SPI chip select is irrelevant. A repeated soft-reset does not in itself cause any problems, and it is not an infinite loop. The problem is a race between these resets and the driver polling for boot completion. There is a time window between soft resets where the driver could read HALO_STATE as 2 (fully booted) while the chip is actually soft-resetting. Although this window is small, it is long enough that it is possible to hit it in normal operation. To prevent this race and ensure the chip really is fully booted, the driver calls spi_bus_lock() to prevent other activity while resetting. It then issues the SYSTEM_RESET mailbox command. After allowing sufficient time for reset to take effect, the driver issues a PING mailbox command, which will force completion of the full soft-reset sequence. The SPI bus lock can then be released. The mailbox is checked for any boot or wakeup response from the firmware, before the value in HALO_STATE will be trusted. This does not affect SoundWire or I2C control. Fixes: 8a731fd37f8b ("ASoC: cs35l56: Move utility functions to shared file") Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250225131843.113752-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown include/sound/cs35l56.h | 31 +++++++++++++++ sound/pci/hda/cs35l56_hda_spi.c | 3 ++ sound/soc/codecs/cs35l56-shared.c | 80 +++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/cs35l56-spi.c | 3 ++ 4 files changed, 117 insertions(+) commit fe08b7d5085a9774abc30c26d5aebc5b9cdd6091 Author: Richard Fitzgerald Date: Tue Feb 25 13:18:42 2025 +0000 firmware: cs_dsp: Remove async regmap writes Change calls to async regmap write functions to use the normal blocking writes so that the cs35l56 driver can use spi_bus_lock() to gain exclusive access to the SPI bus. As this is part of a fix, it makes only the minimal change to swap the functions to the blocking equivalents. There's no need to risk reworking the buffer allocation logic that is now partially redundant. The async writes are a 12-year-old workaround for inefficiency of synchronous writes in the SPI subsystem. The SPI subsystem has since been changed to avoid the overheads, so this workaround should not be necessary. The cs35l56 driver needs to use spi_bus_lock() prevent bus activity while it is soft-resetting the cs35l56. But spi_bus_lock() is incompatible with spi_async() calls, which will fail with -EBUSY. Fixes: 8a731fd37f8b ("ASoC: cs35l56: Move utility functions to shared file") Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20250225131843.113752-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown drivers/firmware/cirrus/cs_dsp.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit 5bd566703e16b17d17f4fb648440d54f8967462c Author: Umesh Nerlige Ramappa Date: Fri Feb 21 13:33:52 2025 -0800 drm/xe/oa: Allow oa_exponent value of 0 OA exponent value of 0 is a valid value for periodic reports. Allow user to pass 0 for the OA sampling interval since it gets converted to 2 gt clock ticks. v2: Update the check in xe_oa_stream_init as well (Ashutosh) v3: Fix mi-rpc failure by setting default exponent to -1 (CI) v4: Add the Fixes tag Fixes: b6fd51c62119 ("drm/xe/oa/uapi: Define and parse OA stream properties") Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20250221213352.1712932-1-umesh.nerlige.ramappa@intel.com (cherry picked from commit 30341f0b8ea71725cc4ab2c43e3a3b749892fc92) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_oa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0d39844150546fa1415127c5fbae26db64070dd3 Author: Kan Liang Date: Fri Jan 17 07:19:12 2025 -0800 perf/core: Fix low freq setting via IOC_PERIOD A low attr::freq value cannot be set via IOC_PERIOD on some platforms. The perf_event_check_period() introduced in: 81ec3f3c4c4d ("perf/x86: Add check_period PMU callback") was intended to check the period, rather than the frequency. A low frequency may be mistakenly rejected by limit_period(). Fix it. Fixes: 81ec3f3c4c4d ("perf/x86: Add check_period PMU callback") Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Reviewed-by: Ravi Bangoria Cc: Peter Zijlstra Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250117151913.3043942-2-kan.liang@linux.intel.com Closes: https://lore.kernel.org/lkml/20250115154949.3147-1-ravi.bangoria@amd.com/ kernel/events/core.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 88ec7eedbbd21cad38707620ad6c48a4e9a87c18 Author: Kan Liang Date: Fri Jan 17 07:19:11 2025 -0800 perf/x86: Fix low freqency setting issue Perf doesn't work at low frequencies: $ perf record -e cpu_core/instructions/ppp -F 120 Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (cpu_core/instructions/ppp). "dmesg | grep -i perf" may provide additional information. The limit_period() check avoids a low sampling period on a counter. It doesn't intend to limit the frequency. The check in the x86_pmu_hw_config() should be limited to non-freq mode. The attr.sample_period and attr.sample_freq are union. The attr.sample_period should not be used to indicate the frequency mode. Fixes: c46e665f0377 ("perf/x86: Add INST_RETIRED.ALL workarounds") Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Reviewed-by: Ravi Bangoria Cc: Peter Zijlstra Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250117151913.3043942-1-kan.liang@linux.intel.com Closes: https://lore.kernel.org/lkml/20250115154949.3147-1-ravi.bangoria@amd.com/ arch/x86/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bcef04ca67fa8c46591a211885bb9c37f25dbbd Author: Bard Liao Date: Tue Feb 25 17:37:16 2025 +0800 ASoC: Intel: sof_sdw: warn both sdw and pch dmic are used Typically, SoundWire MIC and PCH DMIC will not coexist. However, we may want to use both of them in some special cases. Add a warning to let users know that SoundWire MIC and PCH DMIC are both present and they could overwrite it with kernel params. Signed-off-by: Bard Liao Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://patch.msgid.link/20250225093716.67240-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 56a677293509b2a0d39ac8d02b583c1ab1fe4d94 Author: Bard Liao Date: Tue Feb 25 17:37:15 2025 +0800 ASoC: SOF: Intel: don't check number of sdw links when set dmic_fixup Currently, we assume that the PCH DMIC pins are pin-muxed with SoundWire links. However, we do see a HW design that use PCH DMIC along with 3 SoundWire links. Remove the check now. With this change the PCM DMIC will be presented if it is reported by the BIOS irrespective of whether there are SDW links present or not. Signed-off-by: Bard Liao Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://patch.msgid.link/20250225093716.67240-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit bc50682128bde778a1ddc457a02d92a637c20c6f Author: Willem de Bruijn Date: Sat Feb 22 12:28:04 2025 -0500 MAINTAINERS: socket timestamping: add Jason Xing as reviewer Jason has been helping as reviewer for this area already, and has contributed various features directly, notably BPF timestamping. Also extend coverage to all timestamping tests, including those new with BPF timestamping. Link: https://lore.kernel.org/netdev/20250220072940.99994-1-kerneljasonxing@gmail.com/ Signed-off-by: Willem de Bruijn Reviewed-by: Jason Xing Link: https://patch.msgid.link/20250222172839.642079-1-willemdebruijn.kernel@gmail.com Signed-off-by: Paolo Abeni MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) commit de2c211868b9424f9aa9b3432c4430825bafb41b Author: Philo Lu Date: Sat Feb 22 11:35:18 2025 +0800 ipvs: Always clear ipvs_property flag in skb_scrub_packet() We found an issue when using bpf_redirect with ipvs NAT mode after commit ff70202b2d1a ("dev_forward_skb: do not scrub skb mark within the same name space"). Particularly, we use bpf_redirect to return the skb directly back to the netif it comes from, i.e., xnet is false in skb_scrub_packet(), and then ipvs_property is preserved and SNAT is skipped in the rx path. ipvs_property has been already cleared when netns is changed in commit 2b5ec1a5f973 ("netfilter/ipvs: clear ipvs_property flag when SKB net namespace changed"). This patch just clears it in spite of netns. Fixes: 2b5ec1a5f973 ("netfilter/ipvs: clear ipvs_property flag when SKB net namespace changed") Signed-off-by: Philo Lu Acked-by: Julian Anastasov Link: https://patch.msgid.link/20250222033518.126087-1-lulie@linux.alibaba.com Signed-off-by: Paolo Abeni net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b47d37496e2669078c8616334e5a7200f91681a Author: Christoph Hellwig Date: Mon Feb 24 15:48:55 2025 -0800 xfs: remove the XBF_STALE check from xfs_buf_rele_cached xfs_buf_stale already set b_lru_ref to 0, and thus prevents the buffer from moving to the LRU. Remove the duplicate check. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 0d1120b9bbe48a2d119afe0dc64f9c0666745bc8 Author: Christoph Hellwig Date: Mon Feb 24 15:48:54 2025 -0800 xfs: remove most in-flight buffer accounting The buffer cache keeps a bt_io_count per-CPU counter to track all in-flight I/O, which is used to ensure no I/O is in flight when unmounting the file system. For most I/O we already keep track of inflight I/O at higher levels: - for synchronous I/O (xfs_buf_read/xfs_bwrite/xfs_buf_delwri_submit), the caller has a reference and waits for I/O completions using xfs_buf_iowait - for xfs_buf_delwri_submit_nowait the only caller (AIL writeback) tracks the log items that the buffer attached to This only leaves only xfs_buf_readahead_map as a submitter of asynchronous I/O that is not tracked by anything else. Replace the bt_io_count per-cpu counter with a more specific bt_readahead_count counter only tracking readahead I/O. This allows to simply increment it when submitting readahead I/O and decrementing it when it completed, and thus simplify xfs_buf_rele and remove the needed for the XBF_NO_IOACCT flags and the XFS_BSTATE_IN_FLIGHT buffer state. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 90 +++++++++------------------------------------------- fs/xfs/xfs_buf.h | 5 +-- fs/xfs/xfs_buf_mem.c | 2 +- fs/xfs/xfs_mount.c | 7 ++-- fs/xfs/xfs_rtalloc.c | 2 +- 5 files changed, 20 insertions(+), 86 deletions(-) commit efc5f7a9f3d887ce44b7610bc39388094b6f97d5 Author: Christoph Hellwig Date: Mon Feb 24 15:48:53 2025 -0800 xfs: decouple buffer readahead from the normal buffer read path xfs_buf_readahead_map is the only caller of xfs_buf_read_map and thus _xfs_buf_read that is not synchronous. Split it from xfs_buf_read_map so that the asynchronous path is self-contained and the now purely synchronous xfs_buf_read_map / _xfs_buf_read implementation can be simplified. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 41 ++++++++++++++++++++--------------------- fs/xfs/xfs_buf.h | 2 +- fs/xfs/xfs_log_recover.c | 2 +- fs/xfs/xfs_trace.h | 1 + 4 files changed, 23 insertions(+), 23 deletions(-) commit 4b90de5bc0f5a6d1151acd74c838275f9b7be3a5 Author: Christoph Hellwig Date: Mon Feb 24 15:48:52 2025 -0800 xfs: reduce context switches for synchronous buffered I/O Currently all metadata I/O completions happen in the m_buf_workqueue workqueue. But for synchronous I/O (i.e. all buffer reads) there is no need for that, as there always is a called in process context that is waiting for the I/O. Factor out the guts of xfs_buf_ioend into a separate helper and call it from xfs_buf_iowait to avoid a double an extra context switch to the workqueue. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) commit 0cde378a10c1cbfaa8dd2b89672d42f36c2809c3 Author: Yu-Che Cheng Date: Sat Feb 22 11:20:34 2025 +0800 thermal: gov_power_allocator: Update total_weight on bind and cdev updates params->total_weight is not initialized during bind and not updated when the bound cdev changes. The cooling device weight will not be used due to the uninitialized total_weight, until an update via sysfs is triggered. The bound cdevs are updated during thermal zone registration, where each cooling device will be bound to the thermal zone one by one, but power_allocator_bind() can be called without an additional cdev update when manually changing the policy of a thermal zone via sysfs. Add a new function to handle weight update logic, including updating total_weight, and call it when bind, weight changes, and cdev updates to ensure total_weight is always correct. Fixes: a3cd6db4cc2e ("thermal: gov_power_allocator: Support new update callback of weights") Signed-off-by: Yu-Che Cheng Link: https://patch.msgid.link/20250222-fix-power-allocator-weight-v2-1-a94de86b685a@chromium.org [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki drivers/thermal/gov_power_allocator.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 423de5b5bc5b267586b449abd1c4fde562aa0cf9 Author: Rafael J. Wysocki Date: Fri Feb 21 17:57:11 2025 +0100 thermal/of: Fix cdev lookup in thermal_of_should_bind() Since thermal_of_should_bind() terminates the loop after processing the first child found in cooling-maps, it will never match more than one cdev to a given trip point which is incorrect, as there may be cooling-maps associating one trip point with multiple cooling devices. Address this by letting the loop continue until either all children have been processed or a matching one has been found. To avoid adding conditionals or goto statements, put the loop in question into a separate function and make that function return right away after finding a matching cooling-maps entry. Fixes: 94c6110b0b13 ("thermal/of: Use the .should_bind() thermal zone callback") Link: https://lore.kernel.org/linux-pm/20250219-fix-thermal-of-v1-1-de36e7a590c4@chromium.org/ Reported-by: Yu-Che Cheng Signed-off-by: Rafael J. Wysocki Reviewed-by: Yu-Che Cheng Tested-by: Yu-Che Cheng Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Link: https://patch.msgid.link/2788228.mvXUDI8C0e@rjwysocki.net drivers/thermal/thermal_of.c | 50 +++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 21 deletions(-) commit b5799106b44e1df594f4696500dbbc3b326bba18 Author: John Garry Date: Mon Feb 24 15:45:38 2025 +0000 iomap: Minor code simplification in iomap_dio_bio_iter() Combine 'else' and 'if' conditional statements onto a single line and drop unrequired braces, as is standard coding style. The code had been like this since commit c3b0e880bbfa ("iomap: support REQ_OP_ZONE_APPEND"). Signed-off-by: John Garry Link: https://lore.kernel.org/r/20250224154538.548028-1-john.g.garry@oracle.com Reviewed-by: "Darrick J. Wong" Signed-off-by: Christian Brauner fs/iomap/direct-io.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 3b0011059334a1cf554c2c1f67d7a7b822d8238a Author: Luca Weiss Date: Fri Jan 3 10:21:36 2025 +0100 Input: goodix-berlin - fix vddio regulator references As per dt-bindings the property is called vddio-supply, so use the correct name in the driver instead of iovdd. The datasheet also calls the supply 'VDDIO'. Fixes: 44362279bdd4 ("Input: add core support for Goodix Berlin Touchscreen IC") Cc: stable@vger.kernel.org Signed-off-by: Luca Weiss Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250103-goodix-berlin-fixes-v1-2-b014737b08b2@fairphone.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/goodix_berlin_core.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 5bab1ae5a375ccde25ac9a142ea933a5d3bdf38d Author: Luca Weiss Date: Fri Jan 3 10:21:35 2025 +0100 Input: goodix-berlin - fix comment referencing wrong regulator In the statement above AVDD gets enabled, and not IOVDD, so fix this copy-paste mistake. Fixes: 44362279bdd4 ("Input: add core support for Goodix Berlin Touchscreen IC") Reported-by: Jens Reidel Signed-off-by: Luca Weiss Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20250103-goodix-berlin-fixes-v1-1-b014737b08b2@fairphone.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/goodix_berlin_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83a4a5a82a154277dfe61d135a445901cd6d0e6f Author: Andras Sebok Date: Mon Feb 24 10:03:54 2025 +0100 Input: imagis - add support for imagis IST3038H Add support for imagis IST3038H, which seems mostly compatible with IST3038C except that it reports a different chip ID value. Tested on samsung,j5y17lte. Signed-off-by: Andras Sebok Link: https://lore.kernel.org/r/20250224090354.102903-2-sebokandris2009@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/imagis.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5797c04400ee117bfe459ff1e468d0ea38054ab4 Author: Paul Fertser Date: Thu Jan 23 15:20:02 2025 +0300 hwmon: (peci/dimmtemp) Do not provide fake thresholds data When an Icelake or Sapphire Rapids CPU isn't providing the maximum and critical thresholds for particular DIMM the driver should return an error to the userspace instead of giving it stale (best case) or wrong (the structure contains all zeros after kzalloc() call) data. The issue can be reproduced by binding the peci driver while the host is fully booted and idle, this makes PECI interaction unreliable enough. Fixes: 73bc1b885dae ("hwmon: peci: Add dimmtemp driver") Fixes: 621995b6d795 ("hwmon: (peci/dimmtemp) Add Sapphire Rapids support") Cc: stable@vger.kernel.org Signed-off-by: Paul Fertser Reviewed-by: Iwona Winiarska Link: https://lore.kernel.org/r/20250123122003.6010-1-fercerpav@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/peci/dimmtemp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit f5be37ca2c99fc764408ceeeaf941bea062cdc9b Author: Andras Sebok Date: Mon Feb 24 10:03:56 2025 +0100 dt-bindings: input/touchscreen: imagis: add compatible for ist3038h IST3038H is a touchscreen IC which seems mostly compatible with IST3038C except that it reports a different chip ID value. Signed-off-by: Andras Sebok Link: https://lore.kernel.org/r/20250224090354.102903-4-sebokandris2009@gmail.com Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml | 1 + 1 file changed, 1 insertion(+) commit 2a1944bff54907a4e68f167dcdf772b1e4c3ce6d Merge: 2c24478e5f6e 245aece3750d Author: Linus Torvalds Date: Mon Feb 24 16:40:32 2025 -0800 Merge tag 'riscv-for-linus-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A fix for cacheinfo DT probing to avoid reading non-boolean properties as booleans. - A fix for cpufeature to use bitmap_equal() instead of memcmp(), so unused bits are ignored. - Fixes for cmpxchg and futex cmpxchg that properly encode the sign extension requirements on inline asm, which results in spurious successes. This manifests in at least inode_set_ctime_current, but is likely just a disaster waiting to happen. - A fix for the rseq selftests, which was using an invalid constraint. - A pair of fixes for signal frame size handling: - We were reserving space for an extra empty extension context header on systems with extended signal context, thus resulting in unnecessarily large allocations. - We weren't properly checking for available extensions before calculating the signal stack size, which resulted in undersized stack allocations on some systems (at least those with T-Head custom vectors). Also, we've added Alex as a reviewer. He's been helping out a ton lately, thanks! * tag 'riscv-for-linus-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: MAINTAINERS: Add myself as a riscv reviewer riscv: signal: fix signal_minsigstksz riscv: signal: fix signal frame size rseq/selftests: Fix riscv rseq_offset_deref_addv inline asm riscv/futex: sign extend compare value in atomic cmpxchg riscv/atomic: Do proper sign extension also for unsigned in arch_cmpxchg riscv: cpufeature: use bitmap_equal() instead of memcmp() riscv: cacheinfo: Use of_property_present() for non-boolean properties commit 2c24478e5f6e8a1060f5ad2f52210549a4819204 Merge: f7d5db965f3e 36e1b81f599a Author: Linus Torvalds Date: Mon Feb 24 16:29:48 2025 -0800 Merge tag 'for-6.14/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mikulas Patocka: - dm-vdo: add missing spin_lock_init - dm-integrity: divide-by-zero fix - dm-integrity: do not report unused entries in the table line * tag 'for-6.14/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm vdo: add missing spin_lock_init dm-integrity: Do not emit journal configuration in DM table for Inline mode dm-integrity: Avoid divide by zero in table status in Inline mode commit 56cf7ef0d490b28fad8f8629fc135c5ab7c9f54e Author: Icenowy Zheng Date: Thu Feb 13 01:04:44 2025 +0800 nvme-pci: skip CMB blocks incompatible with PCI P2P DMA The PCI P2PDMA code will register the CMB block to the memory hot-plugging subsystem, which have an alignment requirement. Memory blocks that do not satisfy this alignment requirement (usually 2MB) will lead to a WARNING from memory hotplugging. Verify the CMB block's address and size against the alignment and only try to send CMB blocks compatible with it to prevent this warning. Tested on Intel DC D4502 SSD, which has a 512K CMB block that is too small for memory hotplugging (thus PCI P2PDMA). Signed-off-by: Icenowy Zheng Signed-off-by: Keith Busch drivers/nvme/host/pci.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 6a3572e10f740acd48e2713ef37e92186a3ce5e8 Author: Icenowy Zheng Date: Thu Feb 13 01:04:43 2025 +0800 nvme-pci: clean up CMBMSC when registering CMB fails CMB decoding should get disabled when the CMB block isn't successfully registered to P2P DMA subsystem. Clean up the CMBMSC register in this error handling codepath to disable CMB decoding (and CMBLOC/CMBSZ registers). Signed-off-by: Icenowy Zheng Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch drivers/nvme/host/pci.c | 1 + 1 file changed, 1 insertion(+) commit 8c1624b63a7d24142a2bbc3a5ee7e95f004ea36e Author: Sagi Grimberg Date: Thu Feb 20 13:18:30 2025 +0200 nvme-tcp: fix possible UAF in nvme_tcp_poll nvme_tcp_poll() may race with the send path error handler because it may complete the request while it is actively being polled for completion, resulting in a UAF panic [1]: We should make sure to stop polling when we see an error when trying to read from the socket. Hence make sure to propagate the error so that the block layer breaks the polling cycle. [1]: -- [35665.692310] nvme nvme2: failed to send request -13 [35665.702265] nvme nvme2: unsupported pdu type (3) [35665.702272] BUG: kernel NULL pointer dereference, address: 0000000000000000 [35665.702542] nvme nvme2: queue 1 receive failed: -22 [35665.703209] #PF: supervisor write access in kernel mode [35665.703213] #PF: error_code(0x0002) - not-present page [35665.703214] PGD 8000003801cce067 P4D 8000003801cce067 PUD 37e6f79067 PMD 0 [35665.703220] Oops: 0002 [#1] SMP PTI [35665.703658] nvme nvme2: starting error recovery [35665.705809] Hardware name: Inspur aaabbb/YZMB-00882-104, BIOS 4.1.26 09/22/2022 [35665.705812] Workqueue: kblockd blk_mq_requeue_work [35665.709172] RIP: 0010:_raw_spin_lock+0xc/0x30 [35665.715788] Call Trace: [35665.716201] [35665.716613] ? show_trace_log_lvl+0x1c1/0x2d9 [35665.717049] ? show_trace_log_lvl+0x1c1/0x2d9 [35665.717457] ? blk_mq_request_bypass_insert+0x2c/0xb0 [35665.717950] ? __die_body.cold+0x8/0xd [35665.718361] ? page_fault_oops+0xac/0x140 [35665.718749] ? blk_mq_start_request+0x30/0xf0 [35665.719144] ? nvme_tcp_queue_rq+0xc7/0x170 [nvme_tcp] [35665.719547] ? exc_page_fault+0x62/0x130 [35665.719938] ? asm_exc_page_fault+0x22/0x30 [35665.720333] ? _raw_spin_lock+0xc/0x30 [35665.720723] blk_mq_request_bypass_insert+0x2c/0xb0 [35665.721101] blk_mq_requeue_work+0xa5/0x180 [35665.721451] process_one_work+0x1e8/0x390 [35665.721809] worker_thread+0x53/0x3d0 [35665.722159] ? process_one_work+0x390/0x390 [35665.722501] kthread+0x124/0x150 [35665.722849] ? set_kthread_struct+0x50/0x50 [35665.723182] ret_from_fork+0x1f/0x30 Reported-by: Zhang Guanghui Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Keith Busch drivers/nvme/host/tcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 29b036be1b0bfcfc958380d5931325997fddf08a Author: Jakub Kicinski Date: Thu Feb 20 18:51:41 2025 -0800 selftests: drv-net: test XDP, HDS auto and the ioctl path Test XDP and HDS interaction. While at it add a test for using the IOCTL, as that turned out to be the real culprit. Testing bnxt: # NETIF=eth0 ./ksft-net-drv/drivers/net/hds.py KTAP version 1 1..12 ok 1 hds.get_hds ok 2 hds.get_hds_thresh ok 3 hds.set_hds_disable # SKIP disabling of HDS not supported by the device ok 4 hds.set_hds_enable ok 5 hds.set_hds_thresh_zero ok 6 hds.set_hds_thresh_max ok 7 hds.set_hds_thresh_gt ok 8 hds.set_xdp ok 9 hds.enabled_set_xdp ok 10 hds.ioctl ok 11 hds.ioctl_set_xdp ok 12 hds.ioctl_enabled_set_xdp # Totals: pass:11 fail:0 xfail:0 xpass:0 skip:1 error:0 and netdevsim: # ./ksft-net-drv/drivers/net/hds.py KTAP version 1 1..12 ok 1 hds.get_hds ok 2 hds.get_hds_thresh ok 3 hds.set_hds_disable ok 4 hds.set_hds_enable ok 5 hds.set_hds_thresh_zero ok 6 hds.set_hds_thresh_max ok 7 hds.set_hds_thresh_gt ok 8 hds.set_xdp ok 9 hds.enabled_set_xdp ok 10 hds.ioctl ok 11 hds.ioctl_set_xdp ok 12 hds.ioctl_enabled_set_xdp # Totals: pass:12 fail:0 xfail:0 xpass:0 skip:0 error:0 Netdevsim needs a sane default for tx/rx ring size. ethtool 6.11 is needed for the --disable-netlink option. Acked-by: Stanislav Fomichev Tested-by: Taehee Yoo Link: https://patch.msgid.link/20250221025141.1132944-2-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/netdevsim/ethtool.c | 2 + tools/testing/selftests/drivers/net/hds.py | 145 +++++++++++++++++++++++- tools/testing/selftests/net/lib/Makefile | 3 + tools/testing/selftests/net/lib/xdp_dummy.bpf.c | 13 +++ 4 files changed, 160 insertions(+), 3 deletions(-) commit db10fde5c4f96231e1d2bbfd01feb5f2f59b96d1 Author: Jakub Kicinski Date: Thu Feb 20 18:51:40 2025 -0800 net: ethtool: fix ioctl confusing drivers about desired HDS user config The legacy ioctl path does not have support for extended attributes. So we issue a GET to fetch the current settings from the driver, in an attempt to keep them unchanged. HDS is a bit "special" as the GET only returns on/off while the SET takes a "ternary" argument (on/off/default). If the driver was in the "default" setting - executing the ioctl path binds it to on or off, even tho the user did not intend to change HDS config. Factor the relevant logic out of the netlink code and reuse it. Fixes: 87c8f8496a05 ("bnxt_en: add support for tcp-data-split ethtool command") Acked-by: Stanislav Fomichev Tested-by: Daniel Xu Tested-by: Taehee Yoo Link: https://patch.msgid.link/20250221025141.1132944-1-kuba@kernel.org Signed-off-by: Jakub Kicinski net/ethtool/common.c | 16 ++++++++++++++++ net/ethtool/common.h | 6 ++++++ net/ethtool/ioctl.c | 4 ++-- net/ethtool/rings.c | 9 ++++----- 4 files changed, 28 insertions(+), 7 deletions(-) commit a9f4fa3a7efa65615ff7db13023ac84516e99e21 Author: Matthew Auld Date: Fri Feb 21 14:38:42 2025 +0000 drm/xe/userptr: fix EFAULT handling Currently we treat EFAULT from hmm_range_fault() as a non-fatal error when called from xe_vm_userptr_pin() with the idea that we want to avoid killing the entire vm and chucking an error, under the assumption that the user just did an unmap or something, and has no intention of actually touching that memory from the GPU. At this point we have already zapped the PTEs so any access should generate a page fault, and if the pin fails there also it will then become fatal. However it looks like it's possible for the userptr vma to still be on the rebind list in preempt_rebind_work_func(), if we had to retry the pin again due to something happening in the caller before we did the rebind step, but in the meantime needing to re-validate the userptr and this time hitting the EFAULT. This explains an internal user report of hitting: [ 191.738349] WARNING: CPU: 1 PID: 157 at drivers/gpu/drm/xe/xe_res_cursor.h:158 xe_pt_stage_bind.constprop.0+0x60a/0x6b0 [xe] [ 191.738551] Workqueue: xe-ordered-wq preempt_rebind_work_func [xe] [ 191.738616] RIP: 0010:xe_pt_stage_bind.constprop.0+0x60a/0x6b0 [xe] [ 191.738690] Call Trace: [ 191.738692] [ 191.738694] ? show_regs+0x69/0x80 [ 191.738698] ? __warn+0x93/0x1a0 [ 191.738703] ? xe_pt_stage_bind.constprop.0+0x60a/0x6b0 [xe] [ 191.738759] ? report_bug+0x18f/0x1a0 [ 191.738764] ? handle_bug+0x63/0xa0 [ 191.738767] ? exc_invalid_op+0x19/0x70 [ 191.738770] ? asm_exc_invalid_op+0x1b/0x20 [ 191.738777] ? xe_pt_stage_bind.constprop.0+0x60a/0x6b0 [xe] [ 191.738834] ? ret_from_fork_asm+0x1a/0x30 [ 191.738849] bind_op_prepare+0x105/0x7b0 [xe] [ 191.738906] ? dma_resv_reserve_fences+0x301/0x380 [ 191.738912] xe_pt_update_ops_prepare+0x28c/0x4b0 [xe] [ 191.738966] ? kmemleak_alloc+0x4b/0x80 [ 191.738973] ops_execute+0x188/0x9d0 [xe] [ 191.739036] xe_vm_rebind+0x4ce/0x5a0 [xe] [ 191.739098] ? trace_hardirqs_on+0x4d/0x60 [ 191.739112] preempt_rebind_work_func+0x76f/0xd00 [xe] Followed by NPD, when running some workload, since the sg was never actually populated but the vma is still marked for rebind when it should be skipped for this special EFAULT case. This is confirmed to fix the user report. v2 (MattB): - Move earlier. v3 (MattB): - Update the commit message to make it clear that this indeed fixes the issue. Fixes: 521db22a1d70 ("drm/xe: Invalidate userptr VMA on page pin fault") Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: Thomas Hellström Cc: # v6.10+ Reviewed-by: Matthew Brost Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20250221143840.167150-5-matthew.auld@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 6b93cb98910c826c2e2004942f8b060311e43618) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_vm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit e043dc16c28c8446e66c55adfe7c6e862a6a7bb7 Author: Matthew Auld Date: Fri Feb 21 14:38:41 2025 +0000 drm/xe/userptr: restore invalidation list on error On error restore anything still on the pin_list back to the invalidation list on error. For the actual pin, so long as the vma is tracked on either list it should get picked up on the next pin, however it looks possible for the vma to get nuked but still be present on this per vm pin_list leading to corruption. An alternative might be then to instead just remove the link when destroying the vma. v2: - Also add some asserts. - Keep the overzealous locking so that we are consistent with the docs; updating the docs and related bits will be done as a follow up. Fixes: ed2bdf3b264d ("drm/xe/vm: Subclass userptr vmas") Suggested-by: Matthew Brost Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: # v6.8+ Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20250221143840.167150-4-matthew.auld@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 4e37e928928b730de9aa9a2f5dc853feeebc1742) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_vm.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit f7d5db965f3e132887779c6b449452db2b807caa Author: Christoph Hellwig Date: Mon Feb 24 08:27:21 2025 -0800 dma-mapping: update MAINTAINERS Marek has graciously offered to maintain the dma-mapping tree. Signed-off-by: Christoph Hellwig Signed-off-by: Linus Torvalds MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 815291c11acda54515f1af5ce6fe307490de9127 Author: Christoph Hellwig Date: Mon Feb 24 08:28:59 2025 -0800 configfs: update MAINTAINERS Joel will go back to maintain configfs alone on a time permitting basis. Signed-off-by: Christoph Hellwig Acked-by: Joel Becker Signed-off-by: Linus Torvalds MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit bddf10d26e6e5114e7415a0e442ec6f51a559468 Author: Tong Tiangen Date: Mon Feb 24 11:11:49 2025 +0800 uprobes: Reject the shared zeropage in uprobe_write_opcode() We triggered the following crash in syzkaller tests: BUG: Bad page state in process syz.7.38 pfn:1eff3 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1eff3 flags: 0x3fffff00004004(referenced|reserved|node=0|zone=1|lastcpupid=0x1fffff) raw: 003fffff00004004 ffffe6c6c07bfcc8 ffffe6c6c07bfcc8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000fffffffe 0000000000000000 page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: dump_stack_lvl+0x32/0x50 bad_page+0x69/0xf0 free_unref_page_prepare+0x401/0x500 free_unref_page+0x6d/0x1b0 uprobe_write_opcode+0x460/0x8e0 install_breakpoint.part.0+0x51/0x80 register_for_each_vma+0x1d9/0x2b0 __uprobe_register+0x245/0x300 bpf_uprobe_multi_link_attach+0x29b/0x4f0 link_create+0x1e2/0x280 __sys_bpf+0x75f/0xac0 __x64_sys_bpf+0x1a/0x30 do_syscall_64+0x56/0x100 entry_SYSCALL_64_after_hwframe+0x78/0xe2 BUG: Bad rss-counter state mm:00000000452453e0 type:MM_FILEPAGES val:-1 The following syzkaller test case can be used to reproduce: r2 = creat(&(0x7f0000000000)='./file0\x00', 0x8) write$nbd(r2, &(0x7f0000000580)=ANY=[], 0x10) r4 = openat(0xffffffffffffff9c, &(0x7f0000000040)='./file0\x00', 0x42, 0x0) mmap$IORING_OFF_SQ_RING(&(0x7f0000ffd000/0x3000)=nil, 0x3000, 0x0, 0x12, r4, 0x0) r5 = userfaultfd(0x80801) ioctl$UFFDIO_API(r5, 0xc018aa3f, &(0x7f0000000040)={0xaa, 0x20}) r6 = userfaultfd(0x80801) ioctl$UFFDIO_API(r6, 0xc018aa3f, &(0x7f0000000140)) ioctl$UFFDIO_REGISTER(r6, 0xc020aa00, &(0x7f0000000100)={{&(0x7f0000ffc000/0x4000)=nil, 0x4000}, 0x2}) ioctl$UFFDIO_ZEROPAGE(r5, 0xc020aa04, &(0x7f0000000000)={{&(0x7f0000ffd000/0x1000)=nil, 0x1000}}) r7 = bpf$PROG_LOAD(0x5, &(0x7f0000000140)={0x2, 0x3, &(0x7f0000000200)=ANY=[@ANYBLOB="1800000000120000000000000000000095"], &(0x7f0000000000)='GPL\x00', 0x7, 0x0, 0x0, 0x0, 0x0, '\x00', 0x0, @fallback=0x30, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, @void, @value}, 0x94) bpf$BPF_LINK_CREATE_XDP(0x1c, &(0x7f0000000040)={r7, 0x0, 0x30, 0x1e, @val=@uprobe_multi={&(0x7f0000000080)='./file0\x00', &(0x7f0000000100)=[0x2], 0x0, 0x0, 0x1}}, 0x40) The cause is that zero pfn is set to the PTE without increasing the RSS count in mfill_atomic_pte_zeropage() and the refcount of zero folio does not increase accordingly. Then, the operation on the same pfn is performed in uprobe_write_opcode()->__replace_page() to unconditional decrease the RSS count and old_folio's refcount. Therefore, two bugs are introduced: 1. The RSS count is incorrect, when process exit, the check_mm() report error "Bad rss-count". 2. The reserved folio (zero folio) is freed when folio->refcount is zero, then free_pages_prepare->free_page_is_bad() report error "Bad page state". There is more, the following warning could also theoretically be triggered: __replace_page() -> ... -> folio_remove_rmap_pte() -> VM_WARN_ON_FOLIO(is_zero_folio(folio), folio) Considering that uprobe hit on the zero folio is a very rare case, just reject zero old folio immediately after get_user_page_vma_remote(). [ mingo: Cleaned up the changelog ] Fixes: 7396fa818d62 ("uprobes/core: Make background page replacement logic account for rss_stat counters") Fixes: 2b1444983508 ("uprobes, mm, x86: Add the ability to install and remove uprobes breakpoints") Signed-off-by: Tong Tiangen Signed-off-by: Ingo Molnar Reviewed-by: David Hildenbrand Reviewed-by: Oleg Nesterov Cc: Peter Zijlstra Cc: Masami Hiramatsu Link: https://lore.kernel.org/r/20250224031149.1598949-1-tongtiangen@huawei.com kernel/events/uprobes.c | 5 +++++ 1 file changed, 5 insertions(+) commit 39ec9eaaa165d297d008d1fa385748430bd18e4d Author: Kees Cook Date: Wed Feb 19 11:53:16 2025 -0800 coredump: Only sort VMAs when core_sort_vma sysctl is set The sorting of VMAs by size in commit 7d442a33bfe8 ("binfmt_elf: Dump smaller VMAs first in ELF cores") breaks elfutils[1]. Instead, sort based on the setting of the new sysctl, core_sort_vma, which defaults to 0, no sorting. Reported-by: Michael Stapelberg Closes: https://lore.kernel.org/all/20250218085407.61126-1-michael@stapelberg.de/ [1] Fixes: 7d442a33bfe8 ("binfmt_elf: Dump smaller VMAs first in ELF cores") Signed-off-by: Kees Cook Documentation/admin-guide/sysctl/kernel.rst | 11 +++++++++++ fs/coredump.c | 15 +++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) commit d31babd7e304d3b800d36ff74be6739405b985f2 Author: Nicolas Frattaroli Date: Fri Feb 21 21:39:32 2025 +0100 ASoC: dapm-graph: set fill colour of turned on nodes Some tools like KGraphViewer interpret the "ON" nodes not having an explicitly set fill colour as them being entirely black, which obscures the text on them and looks funny. In fact, I thought they were off for the longest time. Comparing to the output of the `dot` tool, I assume they are supposed to be white. Instead of speclawyering over who's in the wrong and must immediately atone for their wickedness at the altar of RFC2119, just be explicit about it, set the fillcolor to white, and nobody gets confused. Signed-off-by: Nicolas Frattaroli Tested-by: Luca Ceresoli Reviewed-by: Luca Ceresoli Link: https://patch.msgid.link/20250221-dapm-graph-node-colour-v1-1-514ed0aa7069@collabora.com Signed-off-by: Mark Brown tools/sound/dapm-graph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0da83ab025bc45e9742e87c2cce19bff423377c8 Author: Chancel Liu Date: Mon Feb 17 10:04:37 2025 +0900 ASoC: fsl: Rename stream name of SAI DAI driver If stream names of DAI driver are duplicated there'll be warnings when machine driver tries to add widgets on a route: [ 8.831335] fsl-asoc-card sound-wm8960: ASoC: sink widget CPU-Playback overwritten [ 8.839917] fsl-asoc-card sound-wm8960: ASoC: source widget CPU-Capture overwritten Use different stream names to avoid such warnings. DAI names in AUDMIX are also updated accordingly. Fixes: 15c958390460 ("ASoC: fsl_sai: Add separate DAI for transmitter and receiver") Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Link: https://patch.msgid.link/20250217010437.258621-1-chancel.liu@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 6 +++--- sound/soc/fsl/imx-audmix.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 2016066c66192a99d9e0ebf433789c490a6785a2 Author: Luo Gengkun Date: Wed Jan 22 07:33:56 2025 +0000 perf/core: Order the PMU list to fix warning about unordered pmu_ctx_list Syskaller triggers a warning due to prev_epc->pmu != next_epc->pmu in perf_event_swap_task_ctx_data(). vmcore shows that two lists have the same perf_event_pmu_context, but not in the same order. The problem is that the order of pmu_ctx_list for the parent is impacted by the time when an event/PMU is added. While the order for a child is impacted by the event order in the pinned_groups and flexible_groups. So the order of pmu_ctx_list in the parent and child may be different. To fix this problem, insert the perf_event_pmu_context to its proper place after iteration of the pmu_ctx_list. The follow testcase can trigger above warning: # perf record -e cycles --call-graph lbr -- taskset -c 3 ./a.out & # perf stat -e cpu-clock,cs -p xxx // xxx is the pid of a.out test.c void main() { int count = 0; pid_t pid; printf("%d running\n", getpid()); sleep(30); printf("running\n"); pid = fork(); if (pid == -1) { printf("fork error\n"); return; } if (pid == 0) { while (1) { count++; } } else { while (1) { count++; } } } The testcase first opens an LBR event, so it will allocate task_ctx_data, and then open tracepoint and software events, so the parent context will have 3 different perf_event_pmu_contexts. On inheritance, child ctx will insert the perf_event_pmu_context in another order and the warning will trigger. [ mingo: Tidied up the changelog. ] Fixes: bd2756811766 ("perf: Rewrite core context handling") Signed-off-by: Luo Gengkun Signed-off-by: Ingo Molnar Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20250122073356.1824736-1-luogengkun@huaweicloud.com kernel/events/core.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit e93d78e05abb0da1f8a8409ba93c1a836536bffc Merge: 4647c822764d d252435aca44 Author: Paolo Bonzini Date: Mon Feb 24 13:20:30 2025 -0500 Merge tag 'kvm-riscv-fixes-6.14-1' of https://github.com/kvm-riscv/linux into HEAD KVM/riscv fixes for 6.14, take #1 - Fix hart status check in SBI HSM extension - Fix hart suspend_type usage in SBI HSM extension - Fix error returned by SBI IPI and TIME extensions for unsupported function IDs - Fix suspend_type usage in SBI SUSP extension - Remove unnecessary vcpu kick after injecting interrupt via IMSIC guest file commit 4647c822764d7baaa064cf97c43cfad64e953763 Merge: 0ad2507d5d93 fa808ed4e199 Author: Paolo Bonzini Date: Mon Feb 24 13:20:00 2025 -0500 Merge tag 'kvmarm-fixes-6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.14, take #3 - Fix TCR_EL2 configuration to not use the ASID in TTBR1_EL2 and not mess-up T1SZ/PS by using the HCR_EL2.E2H==0 layout. - Bring back the VMID allocation to the vcpu_load phase, ensuring that we only setup VTTBR_EL2 once on VHE. This cures an ugly race that would lead to running with an unallocated VMID. commit 0fe8813baf4b2e865d3b2c735ce1a15b86002c74 Author: Breno Leitao Date: Fri Jan 17 06:41:07 2025 -0800 perf/core: Add RCU read lock protection to perf_iterate_ctx() The perf_iterate_ctx() function performs RCU list traversal but currently lacks RCU read lock protection. This causes lockdep warnings when running perf probe with unshare(1) under CONFIG_PROVE_RCU_LIST=y: WARNING: suspicious RCU usage kernel/events/core.c:8168 RCU-list traversed in non-reader section!! Call Trace: lockdep_rcu_suspicious ? perf_event_addr_filters_apply perf_iterate_ctx perf_event_exec begin_new_exec ? load_elf_phdrs load_elf_binary ? lock_acquire ? find_held_lock ? bprm_execve bprm_execve do_execveat_common.isra.0 __x64_sys_execve do_syscall_64 entry_SYSCALL_64_after_hwframe This protection was previously present but was removed in commit bd2756811766 ("perf: Rewrite core context handling"). Add back the necessary rcu_read_lock()/rcu_read_unlock() pair around perf_iterate_ctx() call in perf_event_exec(). [ mingo: Use scoped_guard() as suggested by Peter ] Fixes: bd2756811766 ("perf: Rewrite core context handling") Signed-off-by: Breno Leitao Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250117-fix_perf_rcu-v1-1-13cb9210fc6a@debian.org kernel/events/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5b0c02f9b8acf2a791e531bbc09acae2d51f4f9b Author: Nicolas Frattaroli Date: Sat Feb 22 20:39:57 2025 +0100 ASoC: es8328: fix route from DAC to output The ES8328 codec driver, which is also used for the ES8388 chip that appears to have an identical register map, claims that the output can either take the route from DAC->Mixer->Output or through DAC->Output directly. To the best of what I could find, this is not true, and creates problems. Without DACCONTROL17 bit index 7 set for the left channel, as well as DACCONTROL20 bit index 7 set for the right channel, I cannot get any analog audio out on Left Out 2 and Right Out 2 respectively, despite the DAPM routes claiming that this should be possible. Furthermore, the same is the case for Left Out 1 and Right Out 1, showing that those two don't have a direct route from DAC to output bypassing the mixer either. Those control bits toggle whether the DACs are fed (stale bread?) into their respective mixers. If one "unmutes" the mixer controls in alsamixer, then sure, the audio output works, but if it doesn't work without the mixer being fed the DAC input then evidently it's not a direct output from the DAC. ES8328/ES8388 are seemingly not alone in this. ES8323, which uses a separate driver for what appears to be a very similar register map, simply flips those two bits on in its probe function, and then pretends there is no power management whatsoever for the individual controls. Fair enough. My theory as to why nobody has noticed this up to this point is that everyone just assumes it's their fault when they had to unmute an additional control in ALSA. Fix this in the es8328 driver by removing the erroneous direct route, then get rid of the playback switch controls and have those bits tied to the mixer's widget instead, which until now had no register to play with. Fixes: 567e4f98922c ("ASoC: add es8328 codec driver") Signed-off-by: Nicolas Frattaroli Link: https://patch.msgid.link/20250222-es8328-route-bludgeoning-v1-1-99bfb7fb22d9@collabora.com Signed-off-by: Mark Brown sound/soc/codecs/es8328.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 36e1b81f599a093ec7477e4593e110104adcfb96 Author: Ken Raeburn Date: Wed Feb 19 17:56:00 2025 -0500 dm vdo: add missing spin_lock_init Signed-off-by: Ken Raeburn Signed-off-by: Matthew Sakai Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org drivers/md/dm-vdo/dedupe.c | 1 + 1 file changed, 1 insertion(+) commit 425e3e3bd62c568a4365af0923d6ebad71a7dcfc Author: Christian Brauner Date: Mon Feb 24 11:30:35 2025 +0100 nsfs: remove d_op->d_delete Nsfs only deals with unhashed dentries and there's currently no way for them to become hashed. So remove d_op->d_delete. Signed-off-by: Christian Brauner fs/nsfs.c | 1 - 1 file changed, 1 deletion(-) commit 02cfe2b6529c6c5fcf39d52a826927f4f93392af Author: Christian Brauner Date: Mon Feb 24 11:27:02 2025 +0100 pidfs: remove d_op->d_delete Pidfs only deals with unhashed dentries and there's currently no way for them to become hashed. So remove d_op->d_delete. Signed-off-by: Christian Brauner fs/pidfs.c | 1 - 1 file changed, 1 deletion(-) commit f15176b8b6e72ac30e14fd273282d2b72562d26b Author: Linus Walleij Date: Thu Feb 20 19:48:15 2025 +0100 net: dsa: rtl8366rb: Fix compilation problem When the kernel is compiled without LED framework support the rtl8366rb fails to build like this: rtl8366rb.o: in function `rtl8366rb_setup_led': rtl8366rb.c:953:(.text.unlikely.rtl8366rb_setup_led+0xe8): undefined reference to `led_init_default_state_get' rtl8366rb.c:980:(.text.unlikely.rtl8366rb_setup_led+0x240): undefined reference to `devm_led_classdev_register_ext' As this is constantly coming up in different randconfig builds, bite the bullet and create a separate file for the offending code, split out a header with all stuff needed both in the core driver and the leds code. Add a new bool Kconfig option for the LED compile target, such that it depends on LEDS_CLASS=y || LEDS_CLASS=RTL8366RB which make LED support always available when LEDS_CLASS is compiled into the kernel and enforce that if the LEDS_CLASS is a module, then the RTL8366RB driver needs to be a module as well so that modprobe can resolve the dependencies. Fixes: 32d617005475 ("net: dsa: realtek: add LED drivers for rtl8366rb") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202502070525.xMUImayb-lkp@intel.com/ Signed-off-by: Linus Walleij Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/realtek/Kconfig | 6 + drivers/net/dsa/realtek/Makefile | 3 + drivers/net/dsa/realtek/rtl8366rb-leds.c | 177 +++++++++++++++++++++ drivers/net/dsa/realtek/rtl8366rb.c | 258 +------------------------------ drivers/net/dsa/realtek/rtl8366rb.h | 107 +++++++++++++ 5 files changed, 299 insertions(+), 252 deletions(-) commit cf3e6960263a2ecdf5528056b321e41557e9b03d Author: Kent Overstreet Date: Sat Feb 22 09:05:36 2025 -0500 bcachefs: fix bch2_extent_ptr_eq() Reviewed-by: Thorsten Blum Signed-off-by: Kent Overstreet fs/bcachefs/extents.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d082ecbc71e9e0bf49883ee4afd435a77a5101b6 Author: Linus Torvalds Date: Sun Feb 23 12:32:57 2025 -0800 Linux 6.14-rc4 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d68911233472dc2b336f2cf99521bd684ba6092 Merge: ad328a3785a2 781813db7909 Author: Linus Torvalds Date: Sun Feb 23 10:37:18 2025 -0800 Merge tag 'i2c-for-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fix from Wolfram Sang: "Revert one cleanup which turned out to eat too much stack space" * tag 'i2c-for-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: core: Allocate temporary client dynamically commit ad328a3785a24a7e7a8053b06139a6bfb42d0280 Merge: 27102b38b8ca c158647c1073 Author: Linus Torvalds Date: Sun Feb 23 09:50:57 2025 -0800 Merge tag 'edac_urgent_for_v6.14_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC fix from Borislav Petkov: - Have qcom_edac use the correct interrupt enable register to configure the RAS interrupt lines * tag 'edac_urgent_for_v6.14_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/qcom: Correct interrupt enable register configuration commit cb6ae457bc6af58c84a7854df5e7e32ba1c6a715 Author: Ard Biesheuvel Date: Sun Feb 23 16:48:54 2025 +0100 efivarfs: Defer PM notifier registration until .fill_super syzbot reports an issue that turns out to be caused by the fact that the efivarfs PM notifier may be invoked before the efivarfs_fs_info::sb field is populated, resulting in a NULL deference. So defer the registration until efivarfs_fill_super() is invoked. Reported-by: syzbot+00d13e505ef530a45100@syzkaller.appspotmail.com Tested-by: syzbot+00d13e505ef530a45100@syzkaller.appspotmail.com Signed-off-by: Ard Biesheuvel fs/efivarfs/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d6a2d02aa060531607f4a8411ec384470faa2761 Author: Patrick Rudolph Date: Fri Feb 21 12:15:16 2025 +0100 efi/cper: Fix cper_arm_ctx_info alignment According to the UEFI Common Platform Error Record appendix, the processor context information structure is a variable length structure, but "is padded with zeros if the size is not a multiple of 16 bytes". Currently this isn't honoured, causing all but the first structure to be garbage when printed. Thus align the size to be a multiple of 16. Signed-off-by: Patrick Rudolph Signed-off-by: Ard Biesheuvel drivers/firmware/efi/cper-arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 174e5e9da4f5946de3d09c32ee56cbbc9d70505b Author: Patrick Rudolph Date: Fri Feb 21 09:12:42 2025 +0100 efi/cper: Fix cper_ia_proc_ctx alignment According to the UEFI Common Platform Error Record appendix, the IA32/X64 Processor Context Information Structure is a variable length structure, but "is padded with zeros if the size is not a multiple of 16 bytes". Currently this isn't honoured, causing all but the first structure to be garbage when printed. Thus align the size to be a multiple of 16. Signed-off-by: Patrick Rudolph Signed-off-by: Ard Biesheuvel drivers/firmware/efi/cper-x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b66535356a4834a234f99e16a97eb51f2c6c5a7d Author: Kashyap Desai Date: Sat Feb 22 07:20:21 2025 -0800 RDMA/bnxt_re: Fix the page details for the srq created by kernel consumers While using nvme target with use_srq on, below kernel panic is noticed. [ 549.698111] bnxt_en 0000:41:00.0 enp65s0np0: FEC autoneg off encoding: Clause 91 RS(544,514) [ 566.393619] Oops: divide error: 0000 [#1] PREEMPT SMP NOPTI .. [ 566.393799] [ 566.393807] ? __die_body+0x1a/0x60 [ 566.393823] ? die+0x38/0x60 [ 566.393835] ? do_trap+0xe4/0x110 [ 566.393847] ? bnxt_qplib_alloc_init_hwq+0x1d4/0x580 [bnxt_re] [ 566.393867] ? bnxt_qplib_alloc_init_hwq+0x1d4/0x580 [bnxt_re] [ 566.393881] ? do_error_trap+0x7c/0x120 [ 566.393890] ? bnxt_qplib_alloc_init_hwq+0x1d4/0x580 [bnxt_re] [ 566.393911] ? exc_divide_error+0x34/0x50 [ 566.393923] ? bnxt_qplib_alloc_init_hwq+0x1d4/0x580 [bnxt_re] [ 566.393939] ? asm_exc_divide_error+0x16/0x20 [ 566.393966] ? bnxt_qplib_alloc_init_hwq+0x1d4/0x580 [bnxt_re] [ 566.393997] bnxt_qplib_create_srq+0xc9/0x340 [bnxt_re] [ 566.394040] bnxt_re_create_srq+0x335/0x3b0 [bnxt_re] [ 566.394057] ? srso_return_thunk+0x5/0x5f [ 566.394068] ? __init_swait_queue_head+0x4a/0x60 [ 566.394090] ib_create_srq_user+0xa7/0x150 [ib_core] [ 566.394147] nvmet_rdma_queue_connect+0x7d0/0xbe0 [nvmet_rdma] [ 566.394174] ? lock_release+0x22c/0x3f0 [ 566.394187] ? srso_return_thunk+0x5/0x5f Page size and shift info is set only for the user space SRQs. Set page size and page shift for kernel space SRQs also. Fixes: 0c4dcd602817 ("RDMA/bnxt_re: Refactor hardware queue memory allocation") Signed-off-by: Kashyap Desai Signed-off-by: Selvin Xavier Link: https://patch.msgid.link/1740237621-29291-1-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 ++ 1 file changed, 2 insertions(+) commit e1a0bdbdfdf08428f0ede5ae49c7f4139ac73ef5 Author: Patrisious Haddad Date: Thu Feb 20 08:47:10 2025 +0200 RDMA/mlx5: Fix bind QP error cleanup flow When there is a failure during bind QP, the cleanup flow destroys the counter regardless if it is the one that created it or not, which is problematic since if it isn't the one that created it, that counter could still be in use. Fix that by destroying the counter only if it was created during this call. Fixes: 45842fc627c7 ("IB/mlx5: Support statistic q counter configuration") Signed-off-by: Patrisious Haddad Reviewed-by: Mark Zhang Link: https://patch.msgid.link/25dfefddb0ebefa668c32e06a94d84e3216257cf.1740033937.git.leon@kernel.org Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/counters.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 27102b38b8ca7ffb1622f27bcb41475d121fb67f Merge: 5cf80612d3f7 860ca5e50f73 Author: Linus Torvalds Date: Sat Feb 22 17:32:00 2025 -0800 Merge tag 'v6.14-rc3-smb3-client-fix-part2' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fix from Steve French: - Fix potential null pointer dereference * tag 'v6.14-rc3-smb3-client-fix-part2' of git://git.samba.org/sfrench/cifs-2.6: smb: client: Add check for next_buffer in receive_encrypted_standard() commit 5cf80612d3f72c46ad53ef5042b4c609c393122f Merge: 8b82c18bf98f c9876cdb3ac4 Author: Linus Torvalds Date: Sat Feb 22 10:45:02 2025 -0800 Merge tag 'x86-urgent-2025-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: - Fix AVX-VNNI CPU feature dependency bug triggered via the 'noxsave' boot option - Fix typos in the SVA documentation - Add Tony Luck as RDT co-maintainer and remove Fenghua Yu * tag 'x86-urgent-2025-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: docs: arch/x86/sva: Fix two grammar errors under Background and FAQ x86/cpufeatures: Make AVX-VNNI depend on AVX MAINTAINERS: Change maintainer for RDT commit 8b82c18bf98ff4b5e01a6c36649eafa2c7a4e476 Merge: 1ceffff65f12 dc0a241ceaf3 Author: Linus Torvalds Date: Sat Feb 22 09:30:04 2025 -0800 Merge tag 'sched-urgent-2025-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull rseq fixes from Ingo Molnar: - Fix overly spread-out RSEQ concurrency ID allocation pattern that regressed certain workloads - Fix RSEQ registration syscall behavior on -EFAULT errors when CONFIG_DEBUG_RSEQ=y (This debug option is disabled on most distributions) * tag 'sched-urgent-2025-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: rseq: Fix rseq registration with CONFIG_DEBUG_RSEQ sched: Compact RSEQ concurrency IDs with reduced threads and affinity commit 1ceffff65f12d5f7e57e627555521a205f477ef5 Merge: f112eea3ccef 782cffeec9ad Author: Linus Torvalds Date: Sat Feb 22 09:26:12 2025 -0800 Merge tag 'perf-urgent-2025-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf event fixes from Ingo Molnar: "Fix x86 Intel Lion Cove CPU event constraints, and fix uprobes debug/error printk output pointer-value verbosity" * tag 'perf-urgent-2025-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Fix event constraints for LNC uprobes: Don't use %pK through printk commit f112eea3ccefc8a267fff592059f128b3166ca9e Merge: cd59f1d80a6d e9a48ea4d90b Author: Linus Torvalds Date: Sat Feb 22 09:20:43 2025 -0800 Merge tag 'irq-urgent-2025-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Ingo Molnar: "Fix miscellaneous irqchip bugs" * tag 'irq-urgent-2025-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/qcom-pdc: Workaround hardware register bug on X1E80100 irqchip/jcore-aic, clocksource/drivers/jcore: Fix jcore-pit interrupt request irqchip/gic-v3: Fix rk3399 workaround when secure interrupts are enabled commit cd59f1d80a6d01326e37318218a072a46899d237 Merge: b8c8c1414f6d c3a589fd9fcb Author: Linus Torvalds Date: Sat Feb 22 09:09:33 2025 -0800 Merge tag 's390-6.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix inline asm constraint in cmma_test_essa() to avoid potential ESSA detection miscompilation - Fix build failure with CONFIG_GENDWARFKSYMS by disabling purgatory symbol exports with -D__DISABLE_EXPORTS - Update defconfigs * tag 's390-6.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/boot: Fix ESSA detection s390/purgatory: Use -D__DISABLE_EXPORTS s390: Update defconfigs commit b8c8c1414f6d585d40f5432f36a75509737c8a07 Merge: ff202c5028a1 2fa6a01345b5 Author: Linus Torvalds Date: Sat Feb 22 09:03:54 2025 -0800 Merge tag 'ftrace-v6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: "Function graph accounting fixes: - Fix the manage ops hashes The function graph registers a "manager ops" and "sub-ops" to ftrace. The manager ops does not have any callback but calls the sub-ops callbacks. The manage ops hashes (what is used to tell ftrace what functions to attach to) is built on the sub-ops it manages. There was an error in the way it built the hash. An empty hash means to attach to all functions. When the manager ops had one sub-ops it properly copied its hash. But when the manager ops had more than one sub-ops, it went into a loop to make a set of all functions it needed to add to the hash. If any of the subops hashes was empty, that would mean to attach to all functions. The error was that the first iteration of the loop passed in an empty hash to start with in order to add the other hashes. That starting hash was mistaken as to attach to all functions. This made the manage ops attach to all functions whenever it had two or more sub-ops, even if each sub-op was attached to only a single function. - Do not add duplicate entries to the manager ops hash If two or more subops hashes trace the same function, an entry for that function will be added to the manager ops for each subops. This causes waste and extra overhead. Fprobe accounting fixes: - Remove last function from fprobe hash Fprobes has a ftrace hash to manage which functions an fprobe is attached to. It also has a counter of how many fprobes are attached. When the last fprobe is removed, it unregisters the fprobe from ftrace but does not remove the functions the last fprobe was attached to from the hash. This leaves the old functions attached. When a new fprobe is added, the fprobe infrastructure attaches to not only the functions of the new fprobe, but also to the functions of the last fprobe. - Fix accounting of the fprobe counter When a fprobe is added, it updates a counter. If the counter goes from zero to one, it attaches its ops to ftrace. When an fprobe is removed, the counter is decremented. If the counter goes from 1 to zero, it removes the fprobes ops from ftrace. There was an issue where if two fprobes trace the same function, the addition of each fprobe would increment the counter. But when removing the first of the fprobes, it would notice that another fprobe is still attached to one of its functions no it does not remove the functions from the ftrace ops. But it also did not decrement the counter, so when the last fprobe is removed, the counter is still one. This leaves the fprobes callback still registered with ftrace and it being called by the functions defined by the fprobes ops hash. Worse yet, because all the functions from the fprobe ops hash have been removed, that tells ftrace that it wants to trace all functions. Thus, this puts the state of the system where every function is calling the fprobe callback handler (which does nothing as there are no registered fprobes), but this causes a good 13% slow down of the entire system. Other updates: - Add a selftest to test the above issues to prevent regressions. - Fix preempt count accounting in function tracing Better recursion protection was added to function tracing which added another layer of preempt disable. As the preempt_count gets traced in the event, it needs to subtract the amount of preempt disabling the tracer does to record what the preempt_count was when the trace was triggered. - Fix memory leak in output of set_event A variable is passed by the seq_file functions in the location that is set by the return of the next() function. The start() function allocates it and the stop() function frees it. But when the last item is found, the next() returns NULL which leaks the data that was allocated in start(). The m->private is used for something else, so have next() free the data when it returns NULL, as stop() will then just receive NULL in that case" * tag 'ftrace-v6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Fix memory leak when reading set_event file ftrace: Correct preemption accounting for function tracing. selftests/ftrace: Update fprobe test to check enabled_functions file fprobe: Fix accounting of when to unregister from function graph fprobe: Always unregister fgraph function from ops ftrace: Do not add duplicate entries in subops manager ops ftrace: Fix accounting of adding subops to a manager ops commit 50cef76d5cb0e199cda19f026842560f6eedc4f7 Author: Borislav Petkov (AMD) Date: Thu Jan 23 14:44:53 2025 +0100 x86/microcode/AMD: Load only SHA256-checksummed patches Load patches for which the driver carries a SHA256 checksum of the patch blob. This can be disabled by adding "microcode.amd_sha_check=off" on the kernel cmdline. But it is highly NOT recommended. Signed-off-by: Borislav Petkov (AMD) arch/x86/Kconfig | 1 + arch/x86/kernel/cpu/microcode/amd.c | 111 +++++++- arch/x86/kernel/cpu/microcode/amd_shas.c | 444 +++++++++++++++++++++++++++++++ 3 files changed, 554 insertions(+), 2 deletions(-) commit 781813db7909d945c33d3b035822225f3598774d Author: Geert Uytterhoeven Date: Thu Feb 20 16:12:12 2025 +0100 i2c: core: Allocate temporary client dynamically drivers/i2c/i2c-core-base.c: In function ‘i2c_detect.isra’: drivers/i2c/i2c-core-base.c:2544:1: warning: the frame size of 1312 bytes is larger than 1024 bytes [-Wframe-larger-than=] 2544 | } | ^ Fix this by allocating the temporary client structure dynamically, as it is a rather large structure (1216 bytes, depending on kernel config). This is basically a revert of the to-be-fixed commit with some checkpatch improvements. Fixes: 735668f8e5c9 ("i2c: core: Allocate temp client on the stack in i2c_detect") Signed-off-by: Geert Uytterhoeven Reviewed-by: Su Hui Reviewed-by: Guenter Roeck [wsa: updated commit message, merged tags from similar patch] Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 28b04731a38c80092f47437af6c2770765e0b99f Author: Jakub Kicinski Date: Thu Feb 20 16:50:12 2025 -0800 MAINTAINERS: fix DWMAC S32 entry Using L: with more than a bare email address causes getmaintainer.pl to be unable to parse the entry. Fix this by doing as other entries that use this email address and convert it to an R: entry. Link: https://patch.msgid.link/20250221005012.1051897-1-kuba@kernel.org Signed-off-by: Jakub Kicinski MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa52f15c745ce55261b92873676f64f7348cfe82 Author: Sean Anderson Date: Thu Feb 20 11:29:50 2025 -0500 net: cadence: macb: Synchronize stats calculations Stats calculations involve a RMW to add the stat update to the existing value. This is currently not protected by any synchronization mechanism, so data races are possible. Add a spinlock to protect the update. The reader side could be protected using u64_stats, but we would still need a spinlock for the update side anyway. And we always do an update immediately before reading the stats anyway. Fixes: 89e5785fc8a6 ("[PATCH] Atmel MACB ethernet driver") Signed-off-by: Sean Anderson Link: https://patch.msgid.link/20250220162950.95941-1-sean.anderson@linux.dev Signed-off-by: Jakub Kicinski drivers/net/ethernet/cadence/macb.h | 2 ++ drivers/net/ethernet/cadence/macb_main.c | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) commit 27843ce6ba3d3122b65066550fe33fb8839f8aef Author: Eric Dumazet Date: Thu Feb 20 15:53:36 2025 +0000 ipvlan: ensure network headers are in skb linear part syzbot found that ipvlan_process_v6_outbound() was assuming the IPv6 network header isis present in skb->head [1] Add the needed pskb_network_may_pull() calls for both IPv4 and IPv6 handlers. [1] BUG: KMSAN: uninit-value in __ipv6_addr_type+0xa2/0x490 net/ipv6/addrconf_core.c:47 __ipv6_addr_type+0xa2/0x490 net/ipv6/addrconf_core.c:47 ipv6_addr_type include/net/ipv6.h:555 [inline] ip6_route_output_flags_noref net/ipv6/route.c:2616 [inline] ip6_route_output_flags+0x51/0x720 net/ipv6/route.c:2651 ip6_route_output include/net/ip6_route.h:93 [inline] ipvlan_route_v6_outbound+0x24e/0x520 drivers/net/ipvlan/ipvlan_core.c:476 ipvlan_process_v6_outbound drivers/net/ipvlan/ipvlan_core.c:491 [inline] ipvlan_process_outbound drivers/net/ipvlan/ipvlan_core.c:541 [inline] ipvlan_xmit_mode_l3 drivers/net/ipvlan/ipvlan_core.c:605 [inline] ipvlan_queue_xmit+0xd72/0x1780 drivers/net/ipvlan/ipvlan_core.c:671 ipvlan_start_xmit+0x5b/0x210 drivers/net/ipvlan/ipvlan_main.c:223 __netdev_start_xmit include/linux/netdevice.h:5150 [inline] netdev_start_xmit include/linux/netdevice.h:5159 [inline] xmit_one net/core/dev.c:3735 [inline] dev_hard_start_xmit+0x247/0xa20 net/core/dev.c:3751 sch_direct_xmit+0x399/0xd40 net/sched/sch_generic.c:343 qdisc_restart net/sched/sch_generic.c:408 [inline] __qdisc_run+0x14da/0x35d0 net/sched/sch_generic.c:416 qdisc_run+0x141/0x4d0 include/net/pkt_sched.h:127 net_tx_action+0x78b/0x940 net/core/dev.c:5484 handle_softirqs+0x1a0/0x7c0 kernel/softirq.c:561 __do_softirq+0x14/0x1a kernel/softirq.c:595 do_softirq+0x9a/0x100 kernel/softirq.c:462 __local_bh_enable_ip+0x9f/0xb0 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+0x2758/0x57d0 net/core/dev.c:4611 dev_queue_xmit include/linux/netdevice.h:3311 [inline] packet_xmit+0x9c/0x6c0 net/packet/af_packet.c:276 packet_snd net/packet/af_packet.c:3132 [inline] packet_sendmsg+0x93e0/0xa7e0 net/packet/af_packet.c:3164 sock_sendmsg_nosec net/socket.c:718 [inline] Fixes: 2ad7bf363841 ("ipvlan: Initial check-in of the IPVLAN driver.") Reported-by: syzbot+93ab4a777bafb9d9f960@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/67b74f01.050a0220.14d86d.02d8.GAE@google.com/T/#u Signed-off-by: Eric Dumazet Cc: Mahesh Bandewar Link: https://patch.msgid.link/20250220155336.61884-1-edumazet@google.com Signed-off-by: Jakub Kicinski drivers/net/ipvlan/ipvlan_core.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit c180188ec02281126045414e90d08422a80f75b4 Author: Jiri Slaby (SUSE) Date: Thu Feb 20 12:07:52 2025 +0100 net: set the minimum for net_hotdata.netdev_budget_usecs Commit 7acf8a1e8a28 ("Replace 2 jiffies with sysctl netdev_budget_usecs to enable softirq tuning") added a possibility to set net_hotdata.netdev_budget_usecs, but added no lower bound checking. Commit a4837980fd9f ("net: revert default NAPI poll timeout to 2 jiffies") made the *initial* value HZ-dependent, so the initial value is at least 2 jiffies even for lower HZ values (2 ms for 1000 Hz, 8ms for 250 Hz, 20 ms for 100 Hz). But a user still can set improper values by a sysctl. Set .extra1 (the lower bound) for net_hotdata.netdev_budget_usecs to the same value as in the latter commit. That is to 2 jiffies. Fixes: a4837980fd9f ("net: revert default NAPI poll timeout to 2 jiffies") Fixes: 7acf8a1e8a28 ("Replace 2 jiffies with sysctl netdev_budget_usecs to enable softirq tuning") Signed-off-by: Jiri Slaby (SUSE) Cc: Dmitry Yakunin Cc: Konstantin Khlebnikov Link: https://patch.msgid.link/20250220110752.137639-1-jirislaby@kernel.org Signed-off-by: Jakub Kicinski net/core/sysctl_net_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0e4427f8f587c4b603475468bb3aee9418574893 Author: Ido Schimmel Date: Thu Feb 20 09:25:59 2025 +0200 net: loopback: Avoid sending IP packets without an Ethernet header After commit 22600596b675 ("ipv4: give an IPv4 dev to blackhole_netdev") IPv4 neighbors can be constructed on the blackhole net device, but they are constructed with an output function (neigh_direct_output()) that simply calls dev_queue_xmit(). The latter will transmit packets via 'skb->dev' which might not be the blackhole net device if dst_dev_put() switched 'dst->dev' to the blackhole net device while another CPU was using the dst entry in ip_output(), but after it already initialized 'skb->dev' from 'dst->dev'. Specifically, the following can happen: CPU1 CPU2 udp_sendmsg(sk1) udp_sendmsg(sk2) udp_send_skb() [...] ip_output() skb->dev = skb_dst(skb)->dev dst_dev_put() dst->dev = blackhole_netdev ip_finish_output2() resolves neigh on dst->dev neigh_output() neigh_direct_output() dev_queue_xmit() This will result in IPv4 packets being sent without an Ethernet header via a valid net device: tcpdump: verbose output suppressed, use -v[v]... for full protocol decode listening on enp9s0, link-type EN10MB (Ethernet), snapshot length 262144 bytes 22:07:02.329668 20:00:40:11:18:fb > 45:00:00:44:f4:94, ethertype Unknown (0x58c6), length 68: 0x0000: 8dda 74ca f1ae ca6c ca6c 0098 969c 0400 ..t....l.l...... 0x0010: 0000 4730 3f18 6800 0000 0000 0000 9971 ..G0?.h........q 0x0020: c4c9 9055 a157 0a70 9ead bf83 38ca ab38 ...U.W.p....8..8 0x0030: 8add ab96 e052 .....R Fix by making sure that neighbors are constructed on top of the blackhole net device with an output function that simply consumes the packets, in a similar fashion to dst_discard_out() and blackhole_netdev_xmit(). Fixes: 8d7017fd621d ("blackhole_netdev: use blackhole_netdev to invalidate dst entries") Fixes: 22600596b675 ("ipv4: give an IPv4 dev to blackhole_netdev") Reported-by: Florian Meister Closes: https://lore.kernel.org/netdev/20250210084931.23a5c2e4@hermes.local/ Signed-off-by: Ido Schimmel Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250220072559.782296-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/loopback.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 5c70eb5c593d64d93b178905da215a9fd288a4b5 Author: Eric Dumazet Date: Thu Feb 20 13:18:54 2025 +0000 net: better track kernel sockets lifetime While kernel sockets are dismantled during pernet_operations->exit(), their freeing can be delayed by any tx packets still held in qdisc or device queues, due to skb_set_owner_w() prior calls. This then trigger the following warning from ref_tracker_dir_exit() [1] To fix this, make sure that kernel sockets own a reference on net->passive. Add sk_net_refcnt_upgrade() helper, used whenever a kernel socket is converted to a refcounted one. [1] [ 136.263918][ T35] ref_tracker: net notrefcnt@ffff8880638f01e0 has 1/2 users at [ 136.263918][ T35] sk_alloc+0x2b3/0x370 [ 136.263918][ T35] inet6_create+0x6ce/0x10f0 [ 136.263918][ T35] __sock_create+0x4c0/0xa30 [ 136.263918][ T35] inet_ctl_sock_create+0xc2/0x250 [ 136.263918][ T35] igmp6_net_init+0x39/0x390 [ 136.263918][ T35] ops_init+0x31e/0x590 [ 136.263918][ T35] setup_net+0x287/0x9e0 [ 136.263918][ T35] copy_net_ns+0x33f/0x570 [ 136.263918][ T35] create_new_namespaces+0x425/0x7b0 [ 136.263918][ T35] unshare_nsproxy_namespaces+0x124/0x180 [ 136.263918][ T35] ksys_unshare+0x57d/0xa70 [ 136.263918][ T35] __x64_sys_unshare+0x38/0x40 [ 136.263918][ T35] do_syscall_64+0xf3/0x230 [ 136.263918][ T35] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 136.263918][ T35] [ 136.343488][ T35] ref_tracker: net notrefcnt@ffff8880638f01e0 has 1/2 users at [ 136.343488][ T35] sk_alloc+0x2b3/0x370 [ 136.343488][ T35] inet6_create+0x6ce/0x10f0 [ 136.343488][ T35] __sock_create+0x4c0/0xa30 [ 136.343488][ T35] inet_ctl_sock_create+0xc2/0x250 [ 136.343488][ T35] ndisc_net_init+0xa7/0x2b0 [ 136.343488][ T35] ops_init+0x31e/0x590 [ 136.343488][ T35] setup_net+0x287/0x9e0 [ 136.343488][ T35] copy_net_ns+0x33f/0x570 [ 136.343488][ T35] create_new_namespaces+0x425/0x7b0 [ 136.343488][ T35] unshare_nsproxy_namespaces+0x124/0x180 [ 136.343488][ T35] ksys_unshare+0x57d/0xa70 [ 136.343488][ T35] __x64_sys_unshare+0x38/0x40 [ 136.343488][ T35] do_syscall_64+0xf3/0x230 [ 136.343488][ T35] entry_SYSCALL_64_after_hwframe+0x77/0x7f Fixes: 0cafd77dcd03 ("net: add a refcount tracker for kernel sockets") Reported-by: syzbot+30a19e01a97420719891@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/67b72aeb.050a0220.14d86d.0283.GAE@google.com/T/#u Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250220131854.4048077-1-edumazet@google.com Signed-off-by: Jakub Kicinski include/net/sock.h | 1 + net/core/sock.c | 27 ++++++++++++++++++++++----- net/mptcp/subflow.c | 5 +---- net/netlink/af_netlink.c | 10 ---------- net/rds/tcp.c | 8 ++------ net/smc/af_smc.c | 5 +---- net/sunrpc/svcsock.c | 5 +---- net/sunrpc/xprtsock.c | 8 ++------ 8 files changed, 30 insertions(+), 39 deletions(-) commit fde9836c40d0bd66edf915f654b408eb350b240c Merge: b282c5482310 b25120e1d5f2 Author: Jakub Kicinski Date: Fri Feb 21 15:56:42 2025 -0800 Merge tag 'for-net-2025-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - btusb: Always allow SCO packets for user channel - L2CAP: Fix L2CAP_ECRED_CONN_RSP response * tag 'for-net-2025-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: L2CAP: Fix L2CAP_ECRED_CONN_RSP response Bluetooth: Always allow SCO packets for user channel ==================== Link: https://patch.msgid.link/20250221154941.2139043-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit b282c5482310cabba56bd972437a89bdd6754b06 Merge: f06e4bfd010f 1f0fc3374f33 Author: Jakub Kicinski Date: Fri Feb 21 15:06:32 2025 -0800 Merge branch 'rxrpc-afs-miscellaneous-fixes' David Howells says: ==================== rxrpc, afs: Miscellaneous fixes Here are some miscellaneous fixes for rxrpc and afs: (1) In the rxperf test server, make it correctly receive and decode the terminal magic cookie. (2) In rxrpc, get rid of the peer->mtu_lock as it is not only redundant, it now causes a lockdep complaint. (3) In rxrpc, fix a lockdep-detected instance where a spinlock is being bh-locked whilst irqs are disabled. (4) In afs, fix the ref of a server displaced from an afs_server_list struct. (5) In afs, make afs_server records belonging to a cell take refs on the afs_cell record so that the latter doesn't get deleted first when that cell is being destroyed. ==================== Link: https://patch.msgid.link/20250218192250.296870-1-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit 1f0fc3374f3345ff1d150c5c56ac5016e5d3826a Author: David Howells Date: Tue Feb 18 19:22:48 2025 +0000 afs: Give an afs_server object a ref on the afs_cell object it points to Give an afs_server object a ref on the afs_cell object it points to so that the cell doesn't get deleted before the server record. Whilst this is circular (cell -> vol -> server_list -> server -> cell), the ref only pins the memory, not the lifetime as that's controlled by the activity counter. When the volume's activity counter reaches 0, it detaches from the cell and discards its server list; when a cell's activity counter reaches 0, it discards its root volume. At that point, the circularity is cut. Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250218192250.296870-6-dhowells@redhat.com Signed-off-by: Jakub Kicinski fs/afs/server.c | 3 +++ include/trace/events/afs.h | 2 ++ 2 files changed, 5 insertions(+) commit add117e48df4788a86a21bd0515833c0a6db1ad1 Author: David Howells Date: Tue Feb 18 19:22:47 2025 +0000 afs: Fix the server_list to unuse a displaced server rather than putting it When allocating and building an afs_server_list struct object from a VLDB record, we look up each server address to get the server record for it - but a server may have more than one entry in the record and we discard the duplicate pointers. Currently, however, when we discard, we only put a server record, not unuse it - but the lookup got as an active-user count. The active-user count on an afs_server_list object determines its lifetime whereas the refcount keeps the memory backing it around. Failing to reduce the active-user counter prevents the record from being cleaned up and can lead to multiple copied being seen - and pointing to deleted afs_cell objects and other such things. Fix this by switching the incorrect 'put' to an 'unuse' instead. Without this, occasionally, a dead server record can be seen in /proc/net/afs/servers and list corruption may be observed: list_del corruption. prev->next should be ffff888102423e40, but was 0000000000000000. (prev=ffff88810140cd38) Fixes: 977e5f8ed0ab ("afs: Split the usage count on struct afs_server") Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250218192250.296870-5-dhowells@redhat.com Signed-off-by: Jakub Kicinski fs/afs/server_list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 71f5409176f4ffd460689eb5423a20332d00e342 Author: David Howells Date: Tue Feb 18 19:22:46 2025 +0000 rxrpc: Fix locking issues with the peer record hash rxrpc_new_incoming_peer() can't use spin_lock_bh() whilst its caller has interrupts disabled. WARNING: CPU: 0 PID: 1550 at kernel/softirq.c:369 __local_bh_enable_ip+0x46/0xd0 ... Call Trace: rxrpc_alloc_incoming_call+0x1b0/0x400 rxrpc_new_incoming_call+0x1dd/0x5e0 rxrpc_input_packet+0x84a/0x920 rxrpc_io_thread+0x40d/0xb40 kthread+0x2ec/0x300 ret_from_fork+0x24/0x40 ret_from_fork_asm+0x1a/0x30 irq event stamp: 1811 hardirqs last enabled at (1809): _raw_spin_unlock_irq+0x24/0x50 hardirqs last disabled at (1810): _raw_read_lock_irq+0x17/0x70 softirqs last enabled at (1182): handle_softirqs+0x3ee/0x430 softirqs last disabled at (1811): rxrpc_new_incoming_peer+0x56/0x120 Fix this by using a plain spin_lock() instead. IRQs are held, so softirqs can't happen. Fixes: a2ea9a907260 ("rxrpc: Use irq-disabling spinlocks between app and I/O thread") Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250218192250.296870-4-dhowells@redhat.com Signed-off-by: Jakub Kicinski net/rxrpc/peer_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 833fefa074444b1e7f7e834cbdce59ce02562ed0 Author: David Howells Date: Tue Feb 18 19:22:45 2025 +0000 rxrpc: peer->mtu_lock is redundant The peer->mtu_lock is only used to lock around writes to peer->max_data - and nothing else; further, all such writes take place in the I/O thread and the lock is only ever write-locked and never read-locked. In a couple of places, the write_seqcount_begin() is wrapped in preempt_disable/enable(), but not in all places. This can cause lockdep to complain: WARNING: CPU: 0 PID: 1549 at include/linux/seqlock.h:221 rxrpc_input_ack_trailer+0x305/0x430 ... RIP: 0010:rxrpc_input_ack_trailer+0x305/0x430 Fix this by just getting rid of the lock. Fixes: eeaedc5449d9 ("rxrpc: Implement path-MTU probing using padded PING ACKs (RFC8899)") Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250218192250.296870-3-dhowells@redhat.com Signed-off-by: Jakub Kicinski net/rxrpc/ar-internal.h | 1 - net/rxrpc/input.c | 2 -- net/rxrpc/peer_event.c | 9 +-------- net/rxrpc/peer_object.c | 1 - 4 files changed, 1 insertion(+), 12 deletions(-) commit c34d999ca3145d9fe858258cc3342ec493f47d2e Author: David Howells Date: Tue Feb 18 19:22:44 2025 +0000 rxrpc: rxperf: Fix missing decoding of terminal magic cookie The rxperf RPCs seem to have a magic cookie at the end of the request that was failing to be taken account of by the unmarshalling of the request. Fix the rxperf code to expect this. Fixes: 75bfdbf2fca3 ("rxrpc: Implement an in-kernel rxperf server for testing purposes") Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250218192250.296870-2-dhowells@redhat.com Signed-off-by: Jakub Kicinski net/rxrpc/rxperf.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit ff202c5028a195c07b16e1a2fbb8ca6b7ba11a1c Merge: 3ef7acec975b e31e3f6c0ce4 Author: Linus Torvalds Date: Fri Feb 21 13:16:01 2025 -0800 Merge tag 'soc-fixes-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC fixes from Arnd Bergmann: "Two people stepped up as platform co-maintainers: Andrew Jeffery for ASpeed and Janne Grunau for Apple. The rockchip platform gets 9 small fixes for devicetree files, addressing both compile-time warnings and board specific bugs. One bugfix for the optee firmware driver addresses a reboot-time hang. Two drivers need improved Kconfig dependencies to allow wider compile- testing while hiding the drivers on platforms that can't use them. ARM SCMI and loongson-guts drivers get minor bugfixes" * tag 'soc-fixes-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: soc: loongson: loongson2_guts: Add check for devm_kstrdup() tee: optee: Fix supplicant wait loop platform: cznic: CZNIC_PLATFORMS should depend on ARCH_MVEBU firmware: imx: IMX_SCMI_MISC_DRV should depend on ARCH_MXC MAINTAINERS: arm: apple: Add Janne as maintainer MAINTAINERS: Mark Andrew as M: for ASPEED MACHINE SUPPORT firmware: arm_scmi: imx: Correct tx size of scmi_imx_misc_ctrl_set arm64: dts: rockchip: adjust SMMU interrupt type on rk3588 arm64: dts: rockchip: disable IOMMU when running rk3588 in PCIe endpoint mode dt-bindings: rockchip: pmu: Ensure all properties are defined arm64: defconfig: Enable TISCI Interrupt Router and Aggregator arm64: dts: rockchip: Fix lcdpwr_en pin for Cool Pi GenBook arm64: dts: rockchip: fix fixed-regulator renames on rk3399-gru devices arm64: dts: rockchip: Disable DMA for uart5 on px30-ringneck arm64: dts: rockchip: Move uart5 pin configuration to px30 ringneck SoM arm64: dts: rockchip: change eth phy mode to rgmii-id for orangepi r1 plus lts arm64: dts: rockchip: Fix broken tsadc pinctrl names for rk3588 commit 3ef7acec975bde28ab9cef92af76be8fc2ce684d Merge: 8a61cb6e150e 9a1cd7d6df5d Author: Linus Torvalds Date: Fri Feb 21 13:10:22 2025 -0800 Merge tag 'drm-fixes-2025-02-22' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Weekly drm fixes pull request, lots of small things all over, msm has a bunch of things but all very small, xe, i915, a fix for the cgroup dmem controller. core: - remove MAINTAINERS entry cgroup/dmem: - use correct function for pool descendants panel: - fix signal polarity issue jd9365da-h3 nouveau: - folio handling fix - config fix amdxdna: - fix missing header xe: - Fix error handling in xe_irq_install - Fix devcoredump format i915: - Use spin_lock_irqsave() in interruptible context on guc submission - Fixes on DDI and TRANS programming - Make sure all planes in use by the joiner have their crtc included - Fix 128b/132b modeset issues msm: - More catalog fixes: - to skip watchdog programming through top block if its not present - fix the setting of WB mask to ensure the WB input control is programmed correctly through ping-pong - drop lm_pair for sm6150 as that chipset does not have any 3dmerge block - Fix the mode validation logic for DP/eDP to account for widebus (2ppc) to allow high clock resolutions - Fix to disable dither during encoder disable as otherwise this was causing kms_writeback failure due to resource sharing between WB and DSI paths as DSI uses dither but WB does not - Fixes for virtual planes, namely to drop extraneous return and fix uninitialized variables - Fix to avoid spill-over of DSC encoder block bits when programming the bits-per-component - Fixes in the DSI PHY to protect against concurrent access of PHY_CMN_CLK_CFG regs between clock and display drivers - Core/GPU: - Fix non-blocking fence wait incorrectly rounding up to 1 jiffy timeout - Only print GMU fw version once, instead of each time the GPU resumes" * tag 'drm-fixes-2025-02-22' of https://gitlab.freedesktop.org/drm/kernel: (28 commits) drm/i915/dp: Fix disabling the transcoder function in 128b/132b mode drm/i915/dp: Fix error handling during 128b/132b link training accel/amdxdna: Add missing include linux/slab.h MAINTAINERS: Remove myself drm/nouveau/pmu: Fix gp10b firmware guard cgroup/dmem: Don't open-code css_for_each_descendant_pre drm/xe/guc: Fix size_t print format drm/xe: Make GUC binaries dump consistent with other binaries in devcoredump drm/i915: Make sure all planes in use by the joiner have their crtc included drm/i915/ddi: Fix HDMI port width programming in DDI_BUF_CTL drm/i915/dsi: Use TRANS_DDI_FUNC_CTL's own port width macro drm/xe: Fix error handling in xe_irq_install() drm/i915/gt: Use spin_lock_irqsave() in interruptible context drm/msm/dsi/phy: Do not overwite PHY_CMN_CLK_CFG1 when choosing bitclk source drm/msm/dsi/phy: Protect PHY_CMN_CLK_CFG1 against clock driver drm/msm/dsi/phy: Protect PHY_CMN_CLK_CFG0 updated from driver side drm/msm/dpu: Drop extraneous return in dpu_crtc_reassign_planes() drm/msm/dpu: Don't leak bits_per_component into random DSC_ENC fields drm/msm/dpu: Disable dither in phys encoder cleanup drm/msm/dpu: Fix uninitialized variable ... commit 7241c886a71797cc51efc6fadec7076fcf6435c2 Author: Michael Kelley Date: Sun Feb 9 15:52:52 2025 -0800 fbdev: hyperv_fb: iounmap() the correct memory when removing a device When a Hyper-V framebuffer device is removed, or the driver is unbound from a device, any allocated and/or mapped memory must be released. In particular, MMIO address space that was mapped to the framebuffer must be unmapped. Current code unmaps the wrong address, resulting in an error like: [ 4093.980597] iounmap: bad address 00000000c936c05c followed by a stack dump. Commit d21987d709e8 ("video: hyperv: hyperv_fb: Support deferred IO for Hyper-V frame buffer driver") changed the kind of address stored in info->screen_base, and the iounmap() call in hvfb_putmem() was not updated accordingly. Fix this by updating hvfb_putmem() to unmap the correct address. Fixes: d21987d709e8 ("video: hyperv: hyperv_fb: Support deferred IO for Hyper-V frame buffer driver") Signed-off-by: Michael Kelley Reviewed-by: Saurabh Sengar Link: https://lore.kernel.org/r/20250209235252.2987-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20250209235252.2987-1-mhklinux@outlook.com> drivers/video/fbdev/hyperv_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a61cb6e150ea907b580a1b5e705decb0a3ffc86 Merge: f679ebf6aa9b 70550442f28e Author: Linus Torvalds Date: Fri Feb 21 09:36:28 2025 -0800 Merge tag 'block-6.14-20250221' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - NVMe pull request via Keith: - FC controller state check fixes (Daniel) - PCI Endpoint fixes (Damien) - TCP connection failure fixe (Caleb) - TCP handling C2HTermReq PDU (Maurizio) - RDMA queue state check (Ruozhu) - Apple controller fixes (Hector) - Target crash on disbaled namespace (Hannes) - MD pull request via Yu: - Fix queue limits error handling for raid0, raid1 and raid10 - Fix for a NULL pointer deref in request data mapping - Code cleanup for request merging * tag 'block-6.14-20250221' of git://git.kernel.dk/linux: nvme: only allow entering LIVE from CONNECTING state nvme-fc: rely on state transitions to handle connectivity loss apple-nvme: Support coprocessors left idle apple-nvme: Release power domains when probe fails nvmet: Use enum definitions instead of hardcoded values nvme: Cleanup the definition of the controller config register fields nvme/ioctl: add missing space in err message nvme-tcp: fix connect failure on receiving partial ICResp PDU nvme: tcp: Fix compilation warning with W=1 nvmet: pci-epf: Avoid RCU stalls under heavy workload nvmet: pci-epf: Do not uselessly write the CSTS register nvmet: pci-epf: Correctly initialize CSTS when enabling the controller nvmet-rdma: recheck queue state is LIVE in state lock in recv done nvmet: Fix crash when a namespace is disabled nvme-tcp: add basic support for the C2HTermReq PDU nvme-pci: quirk Acer FA100 for non-uniqueue identifiers block: fix NULL pointer dereferenced within __blk_rq_map_sg block/merge: remove unnecessary min() with UINT_MAX md/raid*: Fix the set_queue_limits implementations commit f679ebf6aa9b42d0edb5b261e16dc7b1e3c3550e Merge: 7108b48e9666 4614de748e78 Author: Linus Torvalds Date: Fri Feb 21 09:17:56 2025 -0800 Merge tag 'io_uring-6.14-20250221' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - Series fixing an issue with multishot read on pollable files that may return -EIOCBQUEUED from ->read_iter(). Four small patches for that, the first one deliberately done in such a way that it'd be easy to backport - Remove some dead constant definitions - Use array_index_nospec() for opcode indexing - Work-around for worker creation retries in the presence of signals * tag 'io_uring-6.14-20250221' of git://git.kernel.dk/linux: io_uring/rw: clean up mshot forced sync mode io_uring/rw: move ki_complete init into prep io_uring/rw: don't directly use ki_complete io_uring/rw: forbid multishot async reads io_uring/rsrc: remove unused constants io_uring: fix spelling error in uapi io_uring.h io_uring: prevent opcode speculation io-wq: backoff when retrying worker creation commit 4ecaa75771a75f2b78a431bf67dea165d19d72a6 Author: Yu-Che Cheng Date: Wed Feb 19 15:07:48 2025 +0800 thermal: gov_power_allocator: Fix incorrect calculation in divvy_up_power() divvy_up_power() should use weighted_req_power instead of req_power to calculate granted_power. Otherwise, granted_power may be unexpected as the denominator total_req_power is a weighted sum. This is a mistake made during the previous refactor. Replace req_power with weighted_req_power in divvy_up_power() calculation. Fixes: 912e97c67cc3 ("thermal: gov_power_allocator: Move memory allocation out of throttle()") Signed-off-by: Yu-Che Cheng Reviewed-by: Lukasz Luba Link: https://patch.msgid.link/20250219-fix-power-allocator-calc-v1-1-48b860291919@chromium.org [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki drivers/thermal/gov_power_allocator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7108b48e9666a1cf010f83d65546666e17496f8b Merge: a3daad821514 d403120cb9d4 Author: Linus Torvalds Date: Fri Feb 21 09:11:25 2025 -0800 Merge tag 'acpi-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Fix a memory leak in the ACPI platform_profile driver (Kurt Borja)" * tag 'acpi-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: platform_profile: Fix memory leak in profile_class_is_visible() commit a3daad8215143340c0870c5489e599fd059037e9 Merge: 534a2c6217f2 1dbf60277e9b Author: Linus Torvalds Date: Fri Feb 21 09:07:04 2025 -0800 Merge tag 'mtd/fixes-for-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd fixes from Miquel Raynal: "The two most important fixes in this list are probably the SST write failure and the Qcom raw NAND controller probe failure which are due to some refactoring, otherwise there has been a series of misc fixes on the Cadence raw NAND controller driver and especially on the DMA side" * tag 'mtd/fixes-for-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: rawnand: cadence: fix unchecked dereference mtd: spi-nor: sst: Fix SST write failure dt-bindings: mtd: cadence: document required clock-names mtd: rawnand: qcom: fix broken config in qcom_param_page_type_exec mtd: rawnand: cadence: fix incorrect device in dma_unmap_single mtd: rawnand: cadence: use dma_map_resource for sdma address mtd: rawnand: cadence: fix error code in cadence_nand_init() commit 534a2c6217f21a66e72d246417e0cae25c5a3d62 Merge: 334426094588 96fa9ec477ff Author: Linus Torvalds Date: Fri Feb 21 08:59:27 2025 -0800 Merge tag 'gpio-fixes-for-v6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: "There are two fixes for GPIO core: one adds missing retval checks to older code, while the second adds SRCU synchronization to legs in code that were missed during the big rework a few cycles back. There's also one small driver fix: - check the return value of the get_direction() callback in struct gpio_chip - protect the multi-line get/set legs in GPIO core with SRCU - fix a race condition in gpio-vf610" * tag 'gpio-fixes-for-v6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpiolib: don't bail out if get_direction() fails in gpiochip_add_data() gpiolib: protect gpio_chip with SRCU in array_info paths in multi get/set gpio: vf610: add locking to gpio direction functions gpiolib: check the return value of gpio_chip::get_direction() commit 2fa6a01345b538faa7b0fae8f723bb6977312428 Author: Adrian Huang Date: Thu Feb 20 11:15:28 2025 +0800 tracing: Fix memory leak when reading set_event file kmemleak reports the following memory leak after reading set_event file: # cat /sys/kernel/tracing/set_event # cat /sys/kernel/debug/kmemleak unreferenced object 0xff110001234449e0 (size 16): comm "cat", pid 13645, jiffies 4294981880 hex dump (first 16 bytes): 01 00 00 00 00 00 00 00 a8 71 e7 84 ff ff ff ff .........q...... backtrace (crc c43abbc): __kmalloc_cache_noprof+0x3ca/0x4b0 s_start+0x72/0x2d0 seq_read_iter+0x265/0x1080 seq_read+0x2c9/0x420 vfs_read+0x166/0xc30 ksys_read+0xf4/0x1d0 do_syscall_64+0x79/0x150 entry_SYSCALL_64_after_hwframe+0x76/0x7e The issue can be reproduced regardless of whether set_event is empty or not. Here is an example about the valid content of set_event. # cat /sys/kernel/tracing/set_event sched:sched_process_fork sched:sched_switch sched:sched_wakeup *:*:mod:trace_events_sample The root cause is that s_next() returns NULL when nothing is found. This results in s_stop() attempting to free a NULL pointer because its parameter is NULL. Fix the issue by freeing the memory appropriately when s_next() fails to find anything. Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250220031528.7373-1-ahuang12@lenovo.com Fixes: b355247df104 ("tracing: Cache ":mod:" events for modules not loaded yet") Signed-off-by: Adrian Huang Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 57b76bedc5c52c66968183b5ef57234894c25ce7 Author: Sebastian Andrzej Siewior Date: Thu Feb 20 15:07:49 2025 +0100 ftrace: Correct preemption accounting for function tracing. The function tracer should record the preemption level at the point when the function is invoked. If the tracing subsystem decrement the preemption counter it needs to correct this before feeding the data into the trace buffer. This was broken in the commit cited below while shifting the preempt-disabled section. Use tracing_gen_ctx_dec() which properly subtracts one from the preemption counter on a preemptible kernel. Cc: stable@vger.kernel.org Cc: Wander Lairson Costa Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Thomas Gleixner Link: https://lore.kernel.org/20250220140749.pfw8qoNZ@linutronix.de Fixes: ce5e48036c9e7 ("ftrace: disable preemption when recursion locked") Signed-off-by: Sebastian Andrzej Siewior Tested-by: Wander Lairson Costa Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_functions.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e85c5e9792b942381ad92ccd0ff745b6d408a91f Author: Steven Rostedt Date: Thu Feb 20 15:20:14 2025 -0500 selftests/ftrace: Update fprobe test to check enabled_functions file A few bugs were found in the fprobe accounting logic along with it using the function graph infrastructure. Update the fprobe selftest to catch those bugs in case they or something similar shows up in the future. The test now checks the enabled_functions file which shows all the functions attached to ftrace or fgraph. When enabling a fprobe, make sure that its corresponding function is also added to that file. Also add two more fprobes to enable to make sure that the fprobe logic works properly with multiple probes. Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Alexander Gordeev Link: https://lore.kernel.org/20250220202055.733001756@goodmis.org Acked-by: Masami Hiramatsu (Google) Tested-by: Heiko Carstens Signed-off-by: Steven Rostedt (Google) .../ftrace/test.d/dynevent/add_remove_fprobe.tc | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit ca26554a1498bc905c4a39fb42d55d93f3ae8df2 Author: Steven Rostedt Date: Thu Feb 20 15:20:13 2025 -0500 fprobe: Fix accounting of when to unregister from function graph When adding a new fprobe, it will update the function hash to the functions the fprobe is attached to and register with function graph to have it call the registered functions. The fprobe_graph_active variable keeps track of the number of fprobes that are using function graph. If two fprobes attach to the same function, it increments the fprobe_graph_active for each of them. But when they are removed, the first fprobe to be removed will see that the function it is attached to is also used by another fprobe and it will not remove that function from function_graph. The logic will skip decrementing the fprobe_graph_active variable. This causes the fprobe_graph_active variable to not go to zero when all fprobes are removed, and in doing so it does not unregister from function graph. As the fgraph ops hash will now be empty, and an empty filter hash means all functions are enabled, this triggers function graph to add a callback to the fprobe infrastructure for every function! # echo "f:myevent1 kernel_clone" >> /sys/kernel/tracing/dynamic_events # echo "f:myevent2 kernel_clone%return" >> /sys/kernel/tracing/dynamic_events # cat /sys/kernel/tracing/enabled_functions kernel_clone (1) tramp: 0xffffffffc0024000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 # > /sys/kernel/tracing/dynamic_events # cat /sys/kernel/tracing/enabled_functions trace_initcall_start_cb (1) tramp: 0xffffffffc0026000 (function_trace_call+0x0/0x170) ->function_trace_call+0x0/0x170 run_init_process (1) tramp: 0xffffffffc0026000 (function_trace_call+0x0/0x170) ->function_trace_call+0x0/0x170 try_to_run_init_process (1) tramp: 0xffffffffc0026000 (function_trace_call+0x0/0x170) ->function_trace_call+0x0/0x170 x86_pmu_show_pmu_cap (1) tramp: 0xffffffffc0026000 (function_trace_call+0x0/0x170) ->function_trace_call+0x0/0x170 cleanup_rapl_pmus (1) tramp: 0xffffffffc0026000 (function_trace_call+0x0/0x170) ->function_trace_call+0x0/0x170 uncore_free_pcibus_map (1) tramp: 0xffffffffc0026000 (function_trace_call+0x0/0x170) ->function_trace_call+0x0/0x170 uncore_types_exit (1) tramp: 0xffffffffc0026000 (function_trace_call+0x0/0x170) ->function_trace_call+0x0/0x170 uncore_pci_exit.part.0 (1) tramp: 0xffffffffc0026000 (function_trace_call+0x0/0x170) ->function_trace_call+0x0/0x170 kvm_shutdown (1) tramp: 0xffffffffc0026000 (function_trace_call+0x0/0x170) ->function_trace_call+0x0/0x170 vmx_dump_msrs (1) tramp: 0xffffffffc0026000 (function_trace_call+0x0/0x170) ->function_trace_call+0x0/0x170 [..] # cat /sys/kernel/tracing/enabled_functions | wc -l 54702 If a fprobe is being removed and all its functions are also traced by other fprobes, still decrement the fprobe_graph_active counter. Cc: stable@vger.kernel.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Alexander Gordeev Link: https://lore.kernel.org/20250220202055.565129766@goodmis.org Fixes: 4346ba1604093 ("fprobe: Rewrite fprobe on function-graph tracer") Closes: https://lore.kernel.org/all/20250217114918.10397-A-hca@linux.ibm.com/ Reported-by: Heiko Carstens Tested-by: Heiko Carstens Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/fprobe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ded9140622358a154efb3a777025fa7f7ae2c2d9 Author: Steven Rostedt Date: Thu Feb 20 15:20:12 2025 -0500 fprobe: Always unregister fgraph function from ops When the last fprobe is removed, it calls unregister_ftrace_graph() to remove the graph_ops from function graph. The issue is when it does so, it calls return before removing the function from its graph ops via ftrace_set_filter_ips(). This leaves the last function lingering in the fprobe's fgraph ops and if a probe is added it also enables that last function (even though the callback will just drop it, it does add unneeded overhead to make that call). # echo "f:myevent1 kernel_clone" >> /sys/kernel/tracing/dynamic_events # cat /sys/kernel/tracing/enabled_functions kernel_clone (1) tramp: 0xffffffffc02f3000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 # echo "f:myevent2 schedule_timeout" >> /sys/kernel/tracing/dynamic_events # cat /sys/kernel/tracing/enabled_functions kernel_clone (1) tramp: 0xffffffffc02f3000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 schedule_timeout (1) tramp: 0xffffffffc02f3000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 # > /sys/kernel/tracing/dynamic_events # cat /sys/kernel/tracing/enabled_functions # echo "f:myevent3 kmem_cache_free" >> /sys/kernel/tracing/dynamic_events # cat /sys/kernel/tracing/enabled_functions kmem_cache_free (1) tramp: 0xffffffffc0219000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 schedule_timeout (1) tramp: 0xffffffffc0219000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 The above enabled a fprobe on kernel_clone, and then on schedule_timeout. The content of the enabled_functions shows the functions that have a callback attached to them. The fprobe attached to those functions properly. Then the fprobes were cleared, and enabled_functions was empty after that. But after adding a fprobe on kmem_cache_free, the enabled_functions shows that the schedule_timeout was attached again. This is because it was still left in the fprobe ops that is used to tell function graph what functions it wants callbacks from. Cc: stable@vger.kernel.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Alexander Gordeev Link: https://lore.kernel.org/20250220202055.393254452@goodmis.org Fixes: 4346ba1604093 ("fprobe: Rewrite fprobe on function-graph tracer") Tested-by: Heiko Carstens Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/fprobe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8eb4b09e0bbd30981305643229fe7640ad41b667 Author: Steven Rostedt Date: Thu Feb 20 15:20:11 2025 -0500 ftrace: Do not add duplicate entries in subops manager ops Check if a function is already in the manager ops of a subops. A manager ops contains multiple subops, and if two or more subops are tracing the same function, the manager ops only needs a single entry in its hash. Cc: stable@vger.kernel.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Alexander Gordeev Link: https://lore.kernel.org/20250220202055.226762894@goodmis.org Fixes: 4f554e955614f ("ftrace: Add ftrace_set_filter_ips function") Tested-by: Heiko Carstens Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/ftrace.c | 3 +++ 1 file changed, 3 insertions(+) commit 38b14061947fa546491656e3f5e388d4fedf8dba Author: Steven Rostedt Date: Thu Feb 20 15:20:10 2025 -0500 ftrace: Fix accounting of adding subops to a manager ops Function graph uses a subops and manager ops mechanism to attach to ftrace. The manager ops connects to ftrace and the functions it connects to is defined by a list of subops that it manages. The function hash that defines what the above ops attaches to limits the functions to attach if the hash has any content. If the hash is empty, it means to trace all functions. The creation of the manager ops hash is done by iterating over all the subops hashes. If any of the subops hashes is empty, it means that the manager ops hash must trace all functions as well. The issue is in the creation of the manager ops. When a second subops is attached, a new hash is created by starting it as NULL and adding the subops one at a time. But the NULL ops is mistaken as an empty hash, and once an empty hash is found, it stops the loop of subops and just enables all functions. # echo "f:myevent1 kernel_clone" >> /sys/kernel/tracing/dynamic_events # cat /sys/kernel/tracing/enabled_functions kernel_clone (1) tramp: 0xffffffffc0309000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 # echo "f:myevent2 schedule_timeout" >> /sys/kernel/tracing/dynamic_events # cat /sys/kernel/tracing/enabled_functions trace_initcall_start_cb (1) tramp: 0xffffffffc0309000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 run_init_process (1) tramp: 0xffffffffc0309000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 try_to_run_init_process (1) tramp: 0xffffffffc0309000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 x86_pmu_show_pmu_cap (1) tramp: 0xffffffffc0309000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 cleanup_rapl_pmus (1) tramp: 0xffffffffc0309000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 uncore_free_pcibus_map (1) tramp: 0xffffffffc0309000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 uncore_types_exit (1) tramp: 0xffffffffc0309000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 uncore_pci_exit.part.0 (1) tramp: 0xffffffffc0309000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 kvm_shutdown (1) tramp: 0xffffffffc0309000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 vmx_dump_msrs (1) tramp: 0xffffffffc0309000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 vmx_cleanup_l1d_flush (1) tramp: 0xffffffffc0309000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60 [..] Fix this by initializing the new hash to NULL and if the hash is NULL do not treat it as an empty hash but instead allocate by copying the content of the first sub ops. Then on subsequent iterations, the new hash will not be NULL, but the content of the previous subops. If that first subops attached to all functions, then new hash may assume that the manager ops also needs to attach to all functions. Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Heiko Carstens Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Alexander Gordeev Link: https://lore.kernel.org/20250220202055.060300046@goodmis.org Fixes: 5fccc7552ccbc ("ftrace: Add subops logic to allow one ops to manage many") Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/ftrace.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit c9ca8a4f89884eb352e4c58204d39842cc73db9c Merge: 9af3b4f2d879 f5468beeab1b Author: Takashi Iwai Date: Fri Feb 21 14:35:09 2025 +0100 Merge tag 'asoc-fix-v6.14-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.14 A few fixes I and James Calligero picked out of the Asahi tree. commit c9876cdb3ac4dcdf3c710ff02094165982e2a557 Author: Brian Ochoa Date: Wed Feb 19 10:09:20 2025 -0500 docs: arch/x86/sva: Fix two grammar errors under Background and FAQ - Correct "in order" to "in order to" - Append missing quantifier Signed-off-by: Brian Ochoa Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250219150920.445802-1-brianeochoa@gmail.com Documentation/arch/x86/sva.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dc0a241ceaf3b7df6f1a7658b020c92682b75bfc Author: Michael Jeanson Date: Wed Feb 19 15:53:26 2025 -0500 rseq: Fix rseq registration with CONFIG_DEBUG_RSEQ With CONFIG_DEBUG_RSEQ=y, at rseq registration the read-only fields are copied from user-space, if this copy fails the syscall returns -EFAULT and the registration should not be activated - but it erroneously is. Move the activation of the registration after the copy of the fields to fix this bug. Fixes: 7d5265ffcd8b ("rseq: Validate read-only fields under DEBUG_RSEQ config") Signed-off-by: Michael Jeanson Signed-off-by: Ingo Molnar Reviewed-by: Mathieu Desnoyers Link: https://lore.kernel.org/r/20250219205330.324770-1-mjeanson@efficios.com kernel/rseq.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 517120728484df1ab8b71cba8d2cad19f52f18a1 Author: Eric Biggers Date: Wed Feb 19 22:01:24 2025 -0800 x86/cpufeatures: Make AVX-VNNI depend on AVX The 'noxsave' boot option disables support for AVX, but support for the AVX-VNNI feature was still declared on CPUs that support it. Fix this. Signed-off-by: Eric Biggers Signed-off-by: Ingo Molnar Cc: Dave Hansen Link: https://lore.kernel.org/r/20250220060124.89622-1-ebiggers@kernel.org arch/x86/kernel/cpu/cpuid-deps.c | 1 + 1 file changed, 1 insertion(+) commit 4c7a22bda684f586910e2fadac70c65964a9a486 Merge: b4c173dfbb6c 927289988068 Author: Christian Brauner Date: Fri Feb 21 14:09:53 2025 +0100 Merge patch series "fixes for uncached IO" Two fixes for uncached IO. * patches from https://lore.kernel.org/r/20250218120209.88093-1-jefflexu@linux.alibaba.com: mm/truncate: don't skip dirty page in folio_unmap_invalidate() mm/filemap: fix miscalculated file range for filemap_fdatawrite_range_kick() Link: https://lore.kernel.org/r/20250218120209.88093-1-jefflexu@linux.alibaba.com Signed-off-by: Christian Brauner commit 927289988068a65ccc168eda881ce60f8712707b Author: Jingbo Xu Date: Tue Feb 18 20:02:09 2025 +0800 mm/truncate: don't skip dirty page in folio_unmap_invalidate() ... otherwise this is a behavior change for the previous callers of invalidate_complete_folio2(), e.g. the page invalidation routine. Fixes: 4a9e23159fd3 ("mm/truncate: add folio_unmap_invalidate() helper") Signed-off-by: Jingbo Xu Link: https://lore.kernel.org/r/20250218120209.88093-3-jefflexu@linux.alibaba.com Signed-off-by: Christian Brauner mm/truncate.c | 2 -- 1 file changed, 2 deletions(-) commit 8510edf191d2df0822ea22d6226e4eef87562271 Author: Jingbo Xu Date: Tue Feb 18 20:02:08 2025 +0800 mm/filemap: fix miscalculated file range for filemap_fdatawrite_range_kick() iocb->ki_pos has been updated with the number of written bytes since generic_perform_write(). Besides __filemap_fdatawrite_range() accepts the inclusive end of the data range. Fixes: 1d4457576570 ("mm: call filemap_fdatawrite_range_kick() after IOCB_DONTCACHE issue") Signed-off-by: Jingbo Xu Link: https://lore.kernel.org/r/20250218120209.88093-2-jefflexu@linux.alibaba.com Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner include/linux/fs.h | 4 ++-- mm/filemap.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit d252435aca44d647d57b84de5108556f9c97614a Author: BillXiang Date: Fri Feb 21 18:45:38 2025 +0800 riscv: KVM: Remove unnecessary vcpu kick Remove the unnecessary kick to the vCPU after writing to the vs_file of IMSIC in kvm_riscv_vcpu_aia_imsic_inject. For vCPUs that are running, writing to the vs_file directly forwards the interrupt as an MSI to them and does not need an extra kick. For vCPUs that are descheduled after emulating WFI, KVM will enable the guest external interrupt for that vCPU in kvm_riscv_aia_wakeon_hgei. This means that writing to the vs_file will cause a guest external interrupt, which will cause KVM to wake up the vCPU in hgei_interrupt to handle the interrupt properly. Signed-off-by: BillXiang Reviewed-by: Andrew Jones Reviewed-by: Radim Krčmář Link: https://lore.kernel.org/r/20250221104538.2147-1-xiangwencheng@lanxincomputing.com Signed-off-by: Anup Patel arch/riscv/kvm/aia_imsic.c | 1 - 1 file changed, 1 deletion(-) commit 92527e473911b835c2c18b0c55c337c33e85ff00 Author: Elizabeth Figura Date: Thu Feb 20 13:23:34 2025 -0600 ntsync: Check wait count based on byte size. GCC versions below 13 incorrectly detect the copy size as being static and too small to fit in the "fds" array. Work around this by explicitly calculating the size and returning EINVAL based on that, instead of based on the object count. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202502072019.LYoCR9bF-lkp@intel.com/ Suggested-by: Arnd Bergmann Signed-off-by: Elizabeth Figura -- Suggested-by as per Arnd's request, but the only thing I changed was preserving array_size() [as noted by Geert in the linked thread]. I tested and found no regressions. v2: Add missing sign-off Link: https://lore.kernel.org/r/20250220192334.549167-1-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman drivers/misc/ntsync.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e9a48ea4d90be251e0d057d41665745caccb0351 Author: Stephan Gerhold Date: Tue Feb 18 16:59:18 2025 +0100 irqchip/qcom-pdc: Workaround hardware register bug on X1E80100 On X1E80100, there is a hardware bug in the register logic of the IRQ_ENABLE_BANK register: While read accesses work on the normal address, all write accesses must be made to a shifted address. Without a workaround for this, the wrong interrupt gets enabled in the PDC and it is impossible to wakeup from deep suspend (CX collapse). This has not caused problems so far, because the deep suspend state was not enabled. A workaround is required now since work is ongoing to fix this. The PDC has multiple "DRV" regions, each one has a size of 0x10000 and provides the same set of registers for a particular client in the system. Linux is one the clients and uses DRV region 2 on X1E. Each "bank" inside the DRV region consists of 32 interrupt pins that can be enabled using the IRQ_ENABLE_BANK register: IRQ_ENABLE_BANK[bank] = base + IRQ_ENABLE_BANK + bank * sizeof(u32) On X1E, this works as intended for read access. However, write access to most banks is shifted by 2: IRQ_ENABLE_BANK_X1E[0] = IRQ_ENABLE_BANK[-2] IRQ_ENABLE_BANK_X1E[1] = IRQ_ENABLE_BANK[-1] IRQ_ENABLE_BANK_X1E[2] = IRQ_ENABLE_BANK[0] = IRQ_ENABLE_BANK[2 - 2] IRQ_ENABLE_BANK_X1E[3] = IRQ_ENABLE_BANK[1] = IRQ_ENABLE_BANK[3 - 2] IRQ_ENABLE_BANK_X1E[4] = IRQ_ENABLE_BANK[2] = IRQ_ENABLE_BANK[4 - 2] IRQ_ENABLE_BANK_X1E[5] = IRQ_ENABLE_BANK[5] (this one works as intended) The negative indexes underflow to banks of the previous DRV/client region: IRQ_ENABLE_BANK_X1E[drv 2][bank 0] = IRQ_ENABLE_BANK[drv 2][bank -2] = IRQ_ENABLE_BANK[drv 1][bank 5-2] = IRQ_ENABLE_BANK[drv 1][bank 3] = IRQ_ENABLE_BANK[drv 1][bank 0 + 3] IRQ_ENABLE_BANK_X1E[drv 2][bank 1] = IRQ_ENABLE_BANK[drv 2][bank -1] = IRQ_ENABLE_BANK[drv 1][bank 5-1] = IRQ_ENABLE_BANK[drv 1][bank 4] = IRQ_ENABLE_BANK[drv 1][bank 1 + 3] Introduce a workaround for the bug by matching the qcom,x1e80100-pdc compatible and apply the offsets as shown above: - Bank 0...1: previous DRV region, bank += 3 - Bank 1...4: our DRV region, bank -= 2 - Bank 5: our DRV region, no fixup required The PDC node in the device tree only describes the DRV region for the Linux client, but the workaround also requires to map parts of the previous DRV region to issue writes there. To maintain compatibility with old device trees, obtain the base address of the preceeding region by applying the -0x10000 offset. Note that this is also more correct from a conceptual point of view: It does not really make use of the other region; it just issues shifted writes that end up in the registers of the Linux associated DRV region 2. Signed-off-by: Stephan Gerhold Signed-off-by: Thomas Gleixner Tested-by: Johan Hovold Link: https://lore.kernel.org/all/20250218-x1e80100-pdc-hw-wa-v2-1-29be4c98e355@linaro.org drivers/irqchip/qcom-pdc.c | 67 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 3 deletions(-) commit efa11fd269c139e29b71ec21bc9c9c0063fde40d Author: Qu Wenruo Date: Wed Feb 19 09:06:33 2025 +1030 btrfs: fix data overwriting bug during buffered write when block size < page size [BUG] When running generic/418 with a btrfs whose block size < page size (subpage cases), it always fails. And the following minimal reproducer is more than enough to trigger it reliably: workload() { mkfs.btrfs -s 4k -f $dev > /dev/null dmesg -C mount $dev $mnt $fsstree_dir/src/dio-invalidate-cache -r -b 4096 -n 3 -i 1 -f $mnt/diotest ret=$? umount $mnt stop_trace if [ $ret -ne 0 ]; then fail fi } for (( i = 0; i < 1024; i++)); do echo "=== $i/$runtime ===" workload done [CAUSE] With extra trace printk added to the following functions: - btrfs_buffered_write() * Which folio is touched * The file offset (start) where the buffered write is at * How many bytes are copied * The content of the write (the first 2 bytes) - submit_one_sector() * Which folio is touched * The position inside the folio * The content of the page cache (the first 2 bytes) - pagecache_isize_extended() * The parameters of the function itself * The parameters of the folio_zero_range() Which are enough to show the problem: 22.158114: btrfs_buffered_write: folio pos=0 start=0 copied=4096 content=0x0101 22.158161: submit_one_sector: r/i=5/257 folio=0 pos=0 content=0x0101 22.158609: btrfs_buffered_write: folio pos=0 start=4096 copied=4096 content=0x0101 22.158634: btrfs_buffered_write: folio pos=0 start=8192 copied=4096 content=0x0101 22.158650: pagecache_isize_extended: folio=0 from=4096 to=8192 bsize=4096 zero off=4096 len=8192 22.158682: submit_one_sector: r/i=5/257 folio=0 pos=4096 content=0x0000 22.158686: submit_one_sector: r/i=5/257 folio=0 pos=8192 content=0x0101 The tool dio-invalidate-cache will start 3 threads, each doing a buffered write with 0x01 at offset 0, 4096 and 8192, do a fsync, then do a direct read, and compare the read buffer with the write buffer. Note that all 3 btrfs_buffered_write() are writing the correct 0x01 into the page cache. But at submit_one_sector(), at file offset 4096, the content is zeroed out, by pagecache_isize_extended(). The race happens like this: Thread A is writing into range [4K, 8K). Thread B is writing into range [8K, 12k). Thread A | Thread B -------------------------------------+------------------------------------ btrfs_buffered_write() | btrfs_buffered_write() |- old_isize = 4K; | |- old_isize = 4096; |- btrfs_inode_lock() | | |- write into folio range [4K, 8K) | | |- pagecache_isize_extended() | | | extend isize from 4096 to 8192 | | | no folio_zero_range() called | | |- btrfs_inode_lock() | | | |- btrfs_inode_lock() | |- write into folio range [8K, 12K) | |- pagecache_isize_extended() | | calling folio_zero_range(4K, 8K) | | This is caused by the old_isize is | | grabbed too early, without any | | inode lock. | |- btrfs_inode_unlock() The @old_isize is grabbed without inode lock, causing race between two buffered write threads and making pagecache_isize_extended() to zero range which is still containing cached data. And this is only affecting subpage btrfs, because for regular blocksize == page size case, the function pagecache_isize_extended() will do nothing if the block size >= page size. [FIX] Grab the old i_size while holding the inode lock. This means each buffered write thread will have a stable view of the old inode size, thus avoid the above race. CC: stable@vger.kernel.org # 5.15+ Fixes: 5e8b9ef30392 ("btrfs: move pos increment and pagecache extension to btrfs_buffered_write") Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/file.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit b1bf18223a8340cf5d52162d320badcfe07b905d Author: Qu Wenruo Date: Mon Feb 17 20:16:39 2025 +1030 btrfs: output an error message if btrfs failed to find the seed fsid [BUG] If btrfs failed to locate the seed device for whatever reason, mounting the sprouted device will fail without any meaning error message: # mkfs.btrfs -f /dev/test/scratch1 # btrfstune -S1 /dev/test/scratch1 # mount /dev/test/scratch1 /mnt/btrfs # btrfs dev add -f /dev/test/scratch2 /mnt/btrfs # umount /mnt/btrfs # btrfs dev scan -u # btrfs mount /dev/test/scratch2 /mnt/btrfs mount: /mnt/btrfs: fsconfig system call failed: No such file or directory. dmesg(1) may have more information after failed mount system call. # dmesg -t | tail -n6 BTRFS info (device dm-5): first mount of filesystem 64252ded-5953-4868-b962-cea48f7ac4ea BTRFS info (device dm-5): using crc32c (crc32c-generic) checksum algorithm BTRFS info (device dm-5): using free-space-tree BTRFS error (device dm-5): failed to read chunk tree: -2 BTRFS error (device dm-5): open_ctree failed: -2 [CAUSE] The failure to mount is pretty straight forward, just unable to find the seed device and its fsid, caused by `btrfs dev scan -u`. But the lack of any useful info is a problem. [FIX] Just add an extra error message in open_seed_devices() to indicate the error. Now the error message would look like this: BTRFS info (device dm-4): first mount of filesystem 7769223d-4db1-4e4c-ac29-0a96f53576ab BTRFS info (device dm-4): using crc32c (crc32c-generic) checksum algorithm BTRFS info (device dm-4): using free-space-tree BTRFS error (device dm-4): failed to find fsid e87c12e6-584b-4e98-8b88-962c33a619ff when attempting to open seed devices BTRFS error (device dm-4): failed to read chunk tree: -2 BTRFS error (device dm-4): open_ctree failed: -2 Link: https://github.com/kdave/btrfs-progs/issues/959 Reviewed-by: Anand Jain Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 15b3b3254d1453a8db038b7d44b311a2d6c71f98 Author: Filipe Manana Date: Sat Feb 15 11:11:29 2025 +0000 btrfs: do regular iput instead of delayed iput during extent map shrinking The extent map shrinker now runs in the system unbound workqueue and no longer in kswapd context so it can directly do an iput() on inodes even if that blocks or needs to acquire any lock (we aren't holding any locks when requesting the delayed iput from the shrinker). So we don't need to add a delayed iput, wake up the cleaner and delegate the iput() to the cleaner, which also adds extra contention on the spinlock that protects the delayed iputs list. Reported-by: Ivan Shapovalov Tested-by: Ivan Shapovalov Link: https://lore.kernel.org/linux-btrfs/0414d690ac5680d0d77dfc930606cdc36e42e12f.camel@intelfx.name/ CC: stable@vger.kernel.org # 6.12+ Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6c9c4d56483d941f567eb921434c25fc6086dfa Author: Filipe Manana Date: Sat Feb 15 11:04:15 2025 +0000 btrfs: skip inodes without loaded extent maps when shrinking extent maps If there are inodes that don't have any loaded extent maps, we end up grabbing a reference on them and later adding a delayed iput, which wakes up the cleaner and makes it do unnecessary work. This is common when for example the inodes were open only to run stat(2) or all their extent maps were already released through the folio release callback (btrfs_release_folio()) or released by a previous run of the shrinker, or directories which never have extent maps. Reported-by: Ivan Shapovalov Tested-by: Ivan Shapovalov Link: https://lore.kernel.org/linux-btrfs/0414d690ac5680d0d77dfc930606cdc36e42e12f.camel@intelfx.name/ CC: stable@vger.kernel.org # 6.13+ Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent_map.c | 78 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 21 deletions(-) commit 59f37036bb7ab3d554c24abc856aabca01126414 Author: Filipe Manana Date: Sat Feb 15 11:36:15 2025 +0000 btrfs: fix use-after-free on inode when scanning root during em shrinking At btrfs_scan_root() we are accessing the inode's root (and fs_info) in a call to btrfs_fs_closing() after we have scheduled the inode for a delayed iput, and that can result in a use-after-free on the inode in case the cleaner kthread does the iput before we dereference the inode in the call to btrfs_fs_closing(). Fix this by using the fs_info stored already in a local variable instead of doing inode->root->fs_info. Fixes: 102044384056 ("btrfs: make the extent map shrinker run asynchronously as a work queue job") CC: stable@vger.kernel.org # 6.13+ Tested-by: Ivan Shapovalov Link: https://lore.kernel.org/linux-btrfs/0414d690ac5680d0d77dfc930606cdc36e42e12f.camel@intelfx.name/ Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent_map.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f27a95845b01e86d67c8b014b4f41bd3327daa63 Author: Arthur Simchaev Date: Thu Feb 20 16:20:39 2025 +0200 scsi: ufs: core: bsg: Fix crash when arpmb command fails If the device doesn't support arpmb we'll crash due to copying user data in bsg_transport_sg_io_fn(). In the case where ufs_bsg_exec_advanced_rpmb_req() returns an error, do not set the job's reply_len. Memory crash backtrace: 3,1290,531166405,-;ufshcd 0000:00:12.5: ARPMB OP failed: error code -22 4,1308,531166555,-;Call Trace: 4,1309,531166559,-; 4,1310,531166565,-; ? show_regs+0x6d/0x80 4,1311,531166575,-; ? die+0x37/0xa0 4,1312,531166583,-; ? do_trap+0xd4/0xf0 4,1313,531166593,-; ? do_error_trap+0x71/0xb0 4,1314,531166601,-; ? usercopy_abort+0x6c/0x80 4,1315,531166610,-; ? exc_invalid_op+0x52/0x80 4,1316,531166622,-; ? usercopy_abort+0x6c/0x80 4,1317,531166630,-; ? asm_exc_invalid_op+0x1b/0x20 4,1318,531166643,-; ? usercopy_abort+0x6c/0x80 4,1319,531166652,-; __check_heap_object+0xe3/0x120 4,1320,531166661,-; check_heap_object+0x185/0x1d0 4,1321,531166670,-; __check_object_size.part.0+0x72/0x150 4,1322,531166679,-; __check_object_size+0x23/0x30 4,1323,531166688,-; bsg_transport_sg_io_fn+0x314/0x3b0 Fixes: 6ff265fc5ef6 ("scsi: ufs: core: bsg: Add advanced RPMB support in ufs_bsg") Cc: stable@vger.kernel.org Reviewed-by: Bean Huo Signed-off-by: Arthur Simchaev Link: https://lore.kernel.org/r/20250220142039.250992-1-arthur.simchaev@sandisk.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/ufs/core/ufs_bsg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fe06b7c07f3fbcce2a2ca6f7b0d543b5699ea00f Author: Manivannan Sadhasivam Date: Wed Feb 19 16:20:47 2025 +0530 scsi: ufs: core: Set default runtime/system PM levels before ufshcd_hba_init() Commit bb9850704c04 ("scsi: ufs: core: Honor runtime/system PM levels if set by host controller drivers") introduced the check for setting default PM levels only if the levels are uninitialized by the host controller drivers. But it missed the fact that the levels could be initialized to 0 (UFS_PM_LVL_0) on purpose by the controller drivers. Even though none of the drivers are doing so now, the logic should be fixed irrespectively. So set the default levels unconditionally before calling ufshcd_hba_init() API which initializes the controller drivers. It ensures that the controller drivers could override the default levels if required. Fixes: bb9850704c04 ("scsi: ufs: core: Honor runtime/system PM levels if set by host controller drivers") Reported-by: Bao D. Nguyen Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20250219105047.49932-1-manivannan.sadhasivam@linaro.org Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit dce5c4afd035e8090a26e5d776b1682c0e649683 Author: Ye Bin Date: Mon Feb 17 10:16:28 2025 +0800 scsi: core: Clear driver private data when retrying request After commit 1bad6c4a57ef ("scsi: zero per-cmd private driver data for each MQ I/O"), the xen-scsifront/virtio_scsi/snic drivers all removed code that explicitly zeroed driver-private command data. In combination with commit 464a00c9e0ad ("scsi: core: Kill DRIVER_SENSE"), after virtio_scsi performs a capacity expansion, the first request will return a unit attention to indicate that the capacity has changed. And then the original command is retried. As driver-private command data was not cleared, the request would return UA again and eventually time out and fail. Zero driver-private command data when a request is retried. Fixes: f7de50da1479 ("scsi: xen-scsifront: Remove code that zeroes driver-private command data") Fixes: c2bb87318baa ("scsi: virtio_scsi: Remove code that zeroes driver-private command data") Fixes: c3006a926468 ("scsi: snic: Remove code that zeroes driver-private command data") Signed-off-by: Ye Bin Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20250217021628.2929248-1-yebin@huaweicloud.com Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 334426094588f8179fe175a09ecc887ff0c75758 Merge: 74ee48a2b4af 98380110bd48 Author: Linus Torvalds Date: Thu Feb 20 18:07:32 2025 -0800 Merge tag 'for-v6.14-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply fixes from Sebastian Reichel: - core: Fix extension related lockdep warning for LED triggers - axp20x-battery: Fix fault handling for AXP717 - da9150-fg: fix potential overflow * tag 'for-v6.14-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: supply: axp20x_battery: Fix fault handling for AXP717 power: supply: core: Fix extension related lockdep warning power: supply: da9150-fg: fix potential overflow commit 74ee48a2b4afa152b2d7f741677f6ada3c11be51 Merge: 319fc77f8f45 2c202e6c4f4d Author: Linus Torvalds Date: Thu Feb 20 18:05:24 2025 -0800 Merge tag 'ata-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata fix from Niklas Cassel: - Fix an unintentional masking of AHCI ports when the device tree does not define port child nodes (Damien) * tag 'ata-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: ata: libahci_platform: Do not set mask_port_map when not needed commit f06e4bfd010faefa637689d2df2c727dbf6e1d27 Author: Qunqin Zhao Date: Wed Feb 19 10:07:01 2025 +0800 net: stmmac: dwmac-loongson: Add fix_soc_reset() callback Loongson's DWMAC device may take nearly two seconds to complete DMA reset, however, the default waiting time for reset is 200 milliseconds. Therefore, the following error message may appear: [14.427169] dwmac-loongson-pci 0000:00:03.2: Failed to reset the dma Fixes: 803fc61df261 ("net: stmmac: dwmac-loongson: Add Loongson Multi-channels GMAC support") Cc: stable@vger.kernel.org Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen Reviewed-by: Jacob Keller Acked-by: Yanteng Si Link: https://patch.msgid.link/20250219020701.15139-1-zhaoqunqin@loongson.cn Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 9a1cd7d6df5d708ef244f93715855c8e54d79448 Merge: 930293b70e46 73f69c6be2a9 Author: Dave Airlie Date: Fri Feb 21 10:50:28 2025 +1000 Merge tag 'drm-msm-fixes-2025-02-20' of https://gitlab.freedesktop.org/drm/msm into drm-fixes Fixes for v6.14-rc4 Display: * More catalog fixes: - to skip watchdog programming through top block if its not present - fix the setting of WB mask to ensure the WB input control is programmed correctly through ping-pong - drop lm_pair for sm6150 as that chipset does not have any 3dmerge block * Fix the mode validation logic for DP/eDP to account for widebus (2ppc) to allow high clock resolutions * Fix to disable dither during encoder disable as otherwise this was causing kms_writeback failure due to resource sharing between * WB and DSI paths as DSI uses dither but WB does not * Fixes for virtual planes, namely to drop extraneous return and fix uninitialized variables * Fix to avoid spill-over of DSC encoder block bits when programming the bits-per-component * Fixes in the DSI PHY to protect against concurrent access of PHY_CMN_CLK_CFG regs between clock and display drivers Core/GPU: * Fix non-blocking fence wait incorrectly rounding up to 1 jiffy timeout * Only print GMU fw version once, instead of each time the GPU resumes Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGtt2AODBXdod8ULXcAygf_qYvwRDVeUVtODx=2jErp6cA@mail.gmail.com commit 930293b70e46dc8a3734ed4c990e4e814549e021 Merge: 619a1148c6d6 8058b49bf6ff Author: Dave Airlie Date: Fri Feb 21 10:44:53 2025 +1000 Merge tag 'drm-intel-fixes-2025-02-20' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - Use spin_lock_irqsave() in interruptible context on guc submission (Krzysztof) - Fixes on DDI and TRANS programming (Imre) - Make sure all planes in use by the joiner have their crtc included (Ville) - Fix 128b/132b modeset issues (Imre) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Z7dgcUG_hvityvHn@intel.com commit 70550442f28eba83b3e659618bba2b64eb91575f Merge: 7543095ce0f3 d2fe192348f9 Author: Jens Axboe Date: Thu Feb 20 17:43:59 2025 -0700 Merge tag 'nvme-6.14-2025-02-20' of git://git.infradead.org/nvme into block-6.14 Pull NVMe fixes from Keith: "nvme fixes for Linux 6.14 - FC controller state check fixes (Daniel) - PCI Endpoint fixes (Damien) - TCP connection failure fixe (Caleb) - TCP handling C2HTermReq PDU (Maurizio) - RDMA queue state check (Ruozhu) - Apple controller fixes (Hector) - Target crash on disbaled namespace (Hannes)" * tag 'nvme-6.14-2025-02-20' of git://git.infradead.org/nvme: nvme: only allow entering LIVE from CONNECTING state nvme-fc: rely on state transitions to handle connectivity loss apple-nvme: Support coprocessors left idle apple-nvme: Release power domains when probe fails nvmet: Use enum definitions instead of hardcoded values nvme: Cleanup the definition of the controller config register fields nvme/ioctl: add missing space in err message nvme-tcp: fix connect failure on receiving partial ICResp PDU nvme: tcp: Fix compilation warning with W=1 nvmet: pci-epf: Avoid RCU stalls under heavy workload nvmet: pci-epf: Do not uselessly write the CSTS register nvmet: pci-epf: Correctly initialize CSTS when enabling the controller nvmet-rdma: recheck queue state is LIVE in state lock in recv done nvmet: Fix crash when a namespace is disabled nvme-tcp: add basic support for the C2HTermReq PDU nvme-pci: quirk Acer FA100 for non-uniqueue identifiers commit 619a1148c6d614aee29685269408a881657b0942 Merge: 395436f3bd0c 213e24250fee Author: Dave Airlie Date: Fri Feb 21 10:42:31 2025 +1000 Merge tag 'drm-xe-fixes-2025-02-20' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes - Fix error handling in xe_irq_install (Lucas) - Fix devcoredump format (Jose, Lucas) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Z7dePS3a9POnjrVL@intel.com commit 319fc77f8f45a1b3dba15b0cc1a869778fd222f7 Merge: 27eddbf34490 dbf7cc560007 Author: Linus Torvalds Date: Thu Feb 20 15:37:17 2025 -0800 Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Pull BPF fixes from Daniel Borkmann: - Fix a soft-lockup in BPF arena_map_free on 64k page size kernels (Alan Maguire) - Fix a missing allocation failure check in BPF verifier's acquire_lock_state (Kumar Kartikeya Dwivedi) - Fix a NULL-pointer dereference in trace_kfree_skb by adding kfree_skb to the raw_tp_null_args set (Kuniyuki Iwashima) - Fix a deadlock when freeing BPF cgroup storage (Abel Wu) - Fix a syzbot-reported deadlock when holding BPF map's freeze_mutex (Andrii Nakryiko) - Fix a use-after-free issue in bpf_test_init when eth_skb_pkt_type is accessing skb data not containing an Ethernet header (Shigeru Yoshida) - Fix skipping non-existing keys in generic_map_lookup_batch (Yan Zhai) - Several BPF sockmap fixes to address incorrect TCP copied_seq calculations, which prevented correct data reads from recv(2) in user space (Jiayuan Chen) - Two fixes for BPF map lookup nullness elision (Daniel Xu) - Fix a NULL-pointer dereference from vmlinux BTF lookup in bpf_sk_storage_tracing_allowed (Jared Kangas) * tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: selftests: bpf: test batch lookup on array of maps with holes bpf: skip non exist keys in generic_map_lookup_batch bpf: Handle allocation failure in acquire_lock_state bpf: verifier: Disambiguate get_constant_map_key() errors bpf: selftests: Test constant key extraction on irrelevant maps bpf: verifier: Do not extract constant map keys for irrelevant maps bpf: Fix softlockup in arena_map_free on 64k page kernel net: Add rx_skb of kfree_skb to raw_tp_null_args[]. bpf: Fix deadlock when freeing cgroup storage selftests/bpf: Add strparser test for bpf selftests/bpf: Fix invalid flag of recv() bpf: Disable non stream socket for strparser bpf: Fix wrong copied_seq calculation strparser: Add read_sock callback bpf: avoid holding freeze_mutex during mmap operation bpf: unify VM_WRITE vs VM_MAYWRITE use in BPF map mmaping logic selftests/bpf: Adjust data size to have ETH_HLEN bpf, test_run: Fix use-after-free issue in eth_skb_pkt_type() bpf: Remove unnecessary BTF lookups in bpf_sk_storage_tracing_allowed commit b522f180ee2b264b771fcbd0ab67d84cdd9e580d Author: Fenghua Yu Date: Fri Jan 31 11:07:31 2025 -0800 MAINTAINERS: Change maintainer for RDT Due to job transition, I am stepping down as RDT maintainer. Add Tony as a co-maintainer. Signed-off-by: Fenghua Yu Signed-off-by: Dave Hansen Acked-by: Reinette Chatre Acked-by: Tony Luck Link: https://lore.kernel.org/all/20250131190731.3981085-1-fenghua.yu%40intel.com MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 395436f3bd0c12701c565e23b8b23ee44b969d7f Merge: 0ad2507d5d93 838c17fd077e Author: Dave Airlie Date: Fri Feb 21 09:16:18 2025 +1000 Merge tag 'drm-misc-fixes-2025-02-20' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes An reset signal polarity fix for the jd9365da-h3 panel, a folio handling fix and config fix in nouveau, a dmem cgroup descendant pool handling fix, and a missing header for amdxdna. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20250220-glorious-cockle-of-might-5b35f7@houat commit c522093b02835f2e897b83e9764e7919edac5d08 Author: Alan Huang Date: Thu Feb 20 18:56:08 2025 +0800 bcachefs: Fix memmove when move keys down The fix alone doesn't fix [1], but should be applied before debugging that. [1] https://syzkaller.appspot.com/bug?extid=38a0cbd267eff2d286ff Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet fs/bcachefs/btree_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68aaa637162787dc3374080efe03366f70b344f1 Author: Kent Overstreet Date: Thu Feb 20 09:17:17 2025 -0500 bcachefs: print op->nonce on data update inconsistency "nonce inconstancy" is popping up again, causing us to go emergency read-only. This one looks less serious, i.e. specific to the encryption path and not indicative of a data corruption bug. But we'll need more info to track it down. Signed-off-by: Kent Overstreet fs/bcachefs/data_update.c | 1 + 1 file changed, 1 insertion(+) commit e31e3f6c0ce473f7ce1e70d54ac8e3ed190509f8 Author: Haoxiang Li Date: Thu Feb 20 16:17:14 2025 +0800 soc: loongson: loongson2_guts: Add check for devm_kstrdup() Add check for the return value of devm_kstrdup() in loongson2_guts_probe() to catch potential exception. Fixes: b82621ac8450 ("soc: loongson: add GUTS driver for loongson-2 platforms") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li Link: https://lore.kernel.org/r/20250220081714.2676828-1-haoxiang_li2024@163.com Signed-off-by: Arnd Bergmann drivers/soc/loongson/loongson2_guts.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e1fc41045c71819ae0fe44486fc965a48ea88f4f Merge: 70b0d6b0a199 ab027c488fc4 Author: Arnd Bergmann Date: Thu Feb 20 22:28:28 2025 +0100 Merge tag 'scmi-fix-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes Arm SCMI fix for v6.14 Just a single fix to address the incorrect size of the Tx buffer in the function scmi_imx_misc_ctrl_set() which is part of NXP/i.MX SCMI vendor extensions. * tag 'scmi-fix-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: imx: Correct tx size of scmi_imx_misc_ctrl_set Link: https://lore.kernel.org/r/20250217155246.1668182-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 992ee3ed6e9fdd0be83a7daa5ff738e3cf86047f Author: George Moussalem Date: Wed Feb 19 14:09:21 2025 +0100 net: phy: qcom: qca807x fix condition for DAC_DSP_BIAS_CURRENT While setting the DAC value, the wrong boolean value is evaluated to set the DSP bias current. So let's correct the conditional statement and use the right boolean value read from the DTS set in the priv. Cc: stable@vger.kernel.org Fixes: d1cb613efbd3 ("net: phy: qcom: add support for QCA807x PHY Family") Signed-off-by: George Moussalem Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250219130923.7216-1-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski drivers/net/phy/qcom/qca807x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 511a3444f72efdc51fa923c4b1f5f0abd545fb20 Author: Maarten Lankhorst Date: Thu Feb 20 15:07:57 2025 +0100 MAINTAINERS: Add entry for DMEM cgroup controller The cgroups controller is currently maintained through the drm-misc tree, so lets add Maxime Ripard, Natalie Vock and me as specific maintainers for dmem. We keep the cgroup mailing list CC'd on all cgroup specific patches. Acked-by: Maxime Ripard Acked-by: Natalie Vock Acked-by: Tejun Heo Acked-by: Johannes Weiner Acked-by: Michal Koutný Link: https://patchwork.freedesktop.org/patch/msgid/20250220140757.16823-1-dev@lankhorst.se Signed-off-by: Maarten Lankhorst .mailmap | 1 + MAINTAINERS | 11 +++++++++++ 2 files changed, 12 insertions(+) commit b25120e1d5f2ebb3db00af557709041f47f7f3d0 Author: Luiz Augusto von Dentz Date: Fri Feb 14 10:30:25 2025 -0500 Bluetooth: L2CAP: Fix L2CAP_ECRED_CONN_RSP response L2CAP_ECRED_CONN_RSP needs to respond DCID in the same order received as SCID but the order is reversed due to use of list_add which actually prepend channels to the list so the response is reversed: > ACL Data RX: Handle 16 flags 0x02 dlen 26 LE L2CAP: Enhanced Credit Connection Request (0x17) ident 2 len 18 PSM: 39 (0x0027) MTU: 256 MPS: 251 Credits: 65535 Source CID: 116 Source CID: 117 Source CID: 118 Source CID: 119 Source CID: 120 < ACL Data TX: Handle 16 flags 0x00 dlen 26 LE L2CAP: Enhanced Credit Connection Response (0x18) ident 2 len 18 MTU: 517 MPS: 247 Credits: 3 Result: Connection successful (0x0000) Destination CID: 68 Destination CID: 67 Destination CID: 66 Destination CID: 65 Destination CID: 64 Also make sure the response don't include channels that are not on BT_CONNECT2 since the chan->ident can be set to the same value as in the following trace: < ACL Data TX: Handle 16 flags 0x00 dlen 12 LE L2CAP: LE Flow Control Credit (0x16) ident 6 len 4 Source CID: 64 Credits: 1 ... > ACL Data RX: Handle 16 flags 0x02 dlen 18 LE L2CAP: Enhanced Credit Connection Request (0x17) ident 6 len 10 PSM: 39 (0x0027) MTU: 517 MPS: 251 Credits: 255 Source CID: 70 < ACL Data TX: Handle 16 flags 0x00 dlen 20 LE L2CAP: Enhanced Credit Connection Response (0x18) ident 6 len 12 MTU: 517 MPS: 247 Credits: 3 Result: Connection successful (0x0000) Destination CID: 64 Destination CID: 68 Closes: https://github.com/bluez/bluez/issues/1094 Fixes: 9aa9d9473f15 ("Bluetooth: L2CAP: Fix responding with wrong PDU type") Signed-off-by: Luiz Augusto von Dentz net/bluetooth/l2cap_core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit bd30e8d7bfa6e528f9e746c940e6f7246c7899d6 Author: Hsin-chen Chuang Date: Fri Feb 14 19:17:09 2025 +0800 Bluetooth: Always allow SCO packets for user channel The SCO packets from Bluetooth raw socket are now rejected because hci_conn_num is left 0. This patch allows such the usecase to enable the userspace SCO support. 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 drivers/bluetooth/btusb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 27eddbf3449026a73d6ed52d55b192bfcf526a03 Merge: e9a8cac0bf89 dd3188ddc4c4 Author: Linus Torvalds Date: Thu Feb 20 10:19:54 2025 -0800 Merge tag 'net-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Smaller than usual with no fixes from any subtree. Current release - regressions: - core: fix race of rtnl_net_lock(dev_net(dev)) Previous releases - regressions: - core: remove the single page frag cache for good - flow_dissector: fix handling of mixed port and port-range keys - sched: cls_api: fix error handling causing NULL dereference - tcp: - adjust rcvq_space after updating scaling ratio - drop secpath at the same time as we currently drop dst - eth: gtp: suppress list corruption splat in gtp_net_exit_batch_rtnl(). Previous releases - always broken: - vsock: - fix variables initialization during resuming - for connectible sockets allow only connected - eth: - geneve: fix use-after-free in geneve_find_dev() - ibmvnic: don't reference skb after sending to VIOS" * tag 'net-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (34 commits) Revert "net: skb: introduce and use a single page frag cache" net: allow small head cache usage with large MAX_SKB_FRAGS values nfp: bpf: Add check for nfp_app_ctrl_msg_alloc() tcp: drop secpath at the same time as we currently drop dst net: axienet: Set mac_managed_pm arp: switch to dev_getbyhwaddr() in arp_req_set_public() net: Add non-RCU dev_getbyhwaddr() helper sctp: Fix undefined behavior in left shift operation selftests/bpf: Add a specific dst port matching flow_dissector: Fix port range key handling in BPF conversion selftests/net/forwarding: Add a test case for tc-flower of mixed port and port-range flow_dissector: Fix handling of mixed port and port-range keys geneve: Suppress list corruption splat in geneve_destroy_tunnels(). gtp: Suppress list corruption splat in gtp_net_exit_batch_rtnl(). dev: Use rtnl_net_dev_lock() in unregister_netdev(). net: Fix dev_net(dev) race in unregister_netdevice_notifier_dev_net(). net: Add net_passive_inc() and net_passive_dec(). net: pse-pd: pd692x0: Fix power limit retrieval MAINTAINERS: trim the GVE entry gve: set xdp redirect target only when it is available ... commit 860ca5e50f73c2a1cef7eefc9d39d04e275417f7 Author: Haoxiang Li Date: Mon Feb 17 15:20:38 2025 +0800 smb: client: Add check for next_buffer in receive_encrypted_standard() Add check for the return value of cifs_buf_get() and cifs_small_buf_get() in receive_encrypted_standard() to prevent null pointer dereference. Fixes: eec04ea11969 ("smb: client: fix OOB in receive_encrypted_standard()") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li Signed-off-by: Steve French fs/smb/client/smb2ops.c | 4 ++++ 1 file changed, 4 insertions(+) commit d2fe192348f93fe3a0cb1e33e4aba58e646397f4 Author: Daniel Wagner Date: Fri Feb 14 09:02:03 2025 +0100 nvme: only allow entering LIVE from CONNECTING state The fabric transports and also the PCI transport are not entering the LIVE state from NEW or RESETTING. This makes the state machine more restrictive and allows to catch not supported state transitions, e.g. directly switching from RESETTING to LIVE. Reviewed-by: Sagi Grimberg Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch drivers/nvme/host/core.c | 2 -- 1 file changed, 2 deletions(-) commit f13409bb3f9140dad7256febcb478f0c9600312c Author: Daniel Wagner Date: Fri Feb 14 09:02:04 2025 +0100 nvme-fc: rely on state transitions to handle connectivity loss It's not possible to call nvme_state_ctrl_state with holding a spin lock, because nvme_state_ctrl_state calls cancel_delayed_work_sync when fastfail is enabled. Instead syncing the ASSOC_FLAG and state transitions using a lock, it's possible to only rely on the state machine transitions. That means nvme_fc_ctrl_connectivity_loss should unconditionally call nvme_reset_ctrl which avoids the read race on the ctrl state variable. Actually, it's not necessary to test in which state the ctrl is, the reset work will only scheduled when the state machine is in LIVE state. In nvme_fc_create_association, the LIVE state can only be entered if it was previously CONNECTING. If this is not possible then the reset handler got triggered. Thus just error out here. Fixes: ee59e3820ca9 ("nvme-fc: do not ignore connectivity loss during connecting") Closes: https://lore.kernel.org/all/denqwui6sl5erqmz2gvrwueyxakl5txzbbiu3fgebryzrfxunm@iwxuthct377m/ Reported-by: Shinichiro Kawasaki Tested-by: Shin'ichiro Kawasaki Reviewed-by: Sagi Grimberg Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch drivers/nvme/host/fc.c | 67 +++++--------------------------------------------- 1 file changed, 6 insertions(+), 61 deletions(-) commit 9af3b4f2d879da01192d6168e6c651e7fb5b652d Author: Dmitry Panchenko Date: Thu Feb 20 18:15:37 2025 +0200 ALSA: usb-audio: Re-add sample rate quirk for Pioneer DJM-900NXS2 Re-add the sample-rate quirk for the Pioneer DJM-900NXS2. This device does not work without setting sample-rate. Signed-off-by: Dmitry Panchenko Cc: Link: https://patch.msgid.link/20250220161540.3624660-1-dmitry@d-systems.ee Signed-off-by: Takashi Iwai sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) commit e9a8cac0bf895efe0bc7b11d174e8dae9b195da8 Merge: bf0e5ed0082e b587fd128660 Author: Linus Torvalds Date: Thu Feb 20 08:59:00 2025 -0800 Merge tag 'v6.14-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: - Fix for chmod regression - Two reparse point related fixes - One minor cleanup (for GCC 14 compiles) - Fix for SMB3.1.1 POSIX Extensions reporting incorrect file type * tag 'v6.14-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: Treat unhandled directory name surrogate reparse points as mount directory nodes cifs: Throw -EOPNOTSUPP error on unsupported reparse point type from parse_reparse_point() smb311: failure to open files of length 1040 when mounting with SMB3.1.1 POSIX extensions smb: client, common: Avoid multiple -Wflex-array-member-not-at-end warnings smb: client: fix chmod(2) regression with ATTR_READONLY commit bf0e5ed0082ef0dbaa43c0296b045d6d9832082e Merge: 770b7eec04c9 b04974f759ac Author: Linus Torvalds Date: Thu Feb 20 08:51:57 2025 -0800 Merge tag 'bcachefs-2025-02-20' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: "Small stuff: - The fsck code for Hongbo's directory i_size patch was wrong, caught by transaction restart injection: we now have the CI running another test variant with restart injection enabled - Another fixup for reflink pointers to missing indirect extents: previous fix was for fsck code, this fixes the normal runtime paths - Another small srcu lock hold time fix, reported by jpsollie" * tag 'bcachefs-2025-02-20' of git://evilpiepirate.org/bcachefs: bcachefs: Fix srcu lock warning in btree_update_nodes_written() bcachefs: Fix bch2_indirect_extent_missing_error() bcachefs: Fix fsck directory i_size checking commit 770b7eec04c986ace0e632527ee7e1fafc2e5964 Merge: 87a132e73910 2d873efd174b Author: Linus Torvalds Date: Thu Feb 20 08:48:55 2025 -0800 Merge tag 'xfs-fixes-6.14-rc4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Carlos Maiolino: "Just a collection of bug fixes, nothing really stands out" * tag 'xfs-fixes-6.14-rc4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: flush inodegc before swapon xfs: rename xfs_iomap_swapfile_activate to xfs_vm_swap_activate xfs: Do not allow norecovery mount with quotacheck xfs: do not check NEEDSREPAIR if ro,norecovery mount. xfs: fix data fork format filtering during inode repair xfs: fix online repair probing when CONFIG_XFS_ONLINE_REPAIR=n commit fa808ed4e199ed17d878eb75b110bda30dd52434 Author: Oliver Upton Date: Wed Feb 19 14:07:37 2025 -0800 KVM: arm64: Ensure a VMID is allocated before programming VTTBR_EL2 Vladimir reports that a race condition to attach a VMID to a stage-2 MMU sometimes results in a vCPU entering the guest with a VMID of 0: | CPU1 | CPU2 | | | | kvm_arch_vcpu_ioctl_run | | vcpu_load <= load VTTBR_EL2 | | kvm_vmid->id = 0 | | | kvm_arch_vcpu_ioctl_run | | vcpu_load <= load VTTBR_EL2 | | with kvm_vmid->id = 0| | kvm_arm_vmid_update <= allocates fresh | | kvm_vmid->id and | | reload VTTBR_EL2 | | | | | kvm_arm_vmid_update <= observes that kvm_vmid->id | | already allocated, | | skips reload VTTBR_EL2 Oh yeah, it's as bad as it looks. Remember that VHE loads the stage-2 MMU eagerly but a VMID only gets attached to the MMU later on in the KVM_RUN loop. Even in the "best case" where VTTBR_EL2 correctly gets reprogrammed before entering the EL1&0 regime, there is a period of time where hardware is configured with VMID 0. That's completely insane. So, rather than decorating the 'late' binding with another hack, just allocate the damn thing up front. Attaching a VMID from vcpu_load() is still rollover safe since (surprise!) it'll always get called after a vCPU was preempted. Excuse me while I go find a brown paper bag. Cc: stable@vger.kernel.org Fixes: 934bf871f011 ("KVM: arm64: Load the stage-2 MMU context in kvm_vcpu_load_vhe()") Reported-by: Vladimir Murzin Signed-off-by: Oliver Upton Link: https://lore.kernel.org/r/20250219220737.130842-1-oliver.upton@linux.dev Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 2 +- arch/arm64/kvm/arm.c | 22 ++++++++++------------ arch/arm64/kvm/vmid.c | 11 +++-------- 3 files changed, 14 insertions(+), 21 deletions(-) commit 782cffeec9ad96daa64ffb2d527b2a052fb02552 Author: Kan Liang Date: Wed Feb 19 06:10:05 2025 -0800 perf/x86/intel: Fix event constraints for LNC According to the latest event list, update the event constraint tables for Lion Cove core. The general rule (the event codes < 0x90 are restricted to counters 0-3.) has been removed. There is no restriction for most of the performance monitoring events. Fixes: a932aa0e868f ("perf/x86: Add Lunar Lake and Arrow Lake support") Reported-by: Amiri Khalil Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20250219141005.2446823-1-kan.liang@linux.intel.com arch/x86/events/intel/core.c | 20 +++++++------------- arch/x86/events/intel/ds.c | 2 +- 2 files changed, 8 insertions(+), 14 deletions(-) commit 7543095ce0f313a7060d2b017acd6ccc1a709ad7 Merge: dd8b0582e25e fbe8f2fa971c Author: Jens Axboe Date: Thu Feb 20 07:51:56 2025 -0700 Merge tag 'md-6.14-20250218' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux into block-6.14 Pull MD fix from Yu: "This patch, by Bart Van Assche, fixes queue limits error handling for raid0, raid1 and raid10." * tag 'md-6.14-20250218' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux: md/raid*: Fix the set_queue_limits implementations commit b4c173dfbb6c78568578ff18f9e8822d7bd0e31b Author: Miklos Szeredi Date: Thu Feb 20 11:02:58 2025 +0100 fuse: don't truncate cached, mutated symlink Fuse allows the value of a symlink to change and this property is exploited by some filesystems (e.g. CVMFS). It has been observed, that sometimes after changing the symlink contents, the value is truncated to the old size. This is caused by fuse_getattr() racing with fuse_reverse_inval_inode(). fuse_reverse_inval_inode() updates the fuse_inode's attr_version, which results in fuse_change_attributes() exiting before updating the cached attributes This is okay, as the cached attributes remain invalid and the next call to fuse_change_attributes() will likely update the inode with the correct values. The reason this causes problems is that cached symlinks will be returned through page_get_link(), which truncates the symlink to inode->i_size. This is correct for filesystems that don't mutate symlinks, but in this case it causes bad behavior. The solution is to just remove this truncation. This can cause a regression in a filesystem that relies on supplying a symlink larger than the file size, but this is unlikely. If that happens we'd need to make this behavior conditional. Reported-by: Laura Promberger Tested-by: Sam Lewis Signed-off-by: Miklos Szeredi Link: https://lore.kernel.org/r/20250220100258.793363-1-mszeredi@redhat.com Reviewed-by: Bernd Schubert Signed-off-by: Christian Brauner fs/fuse/dir.c | 2 +- fs/namei.c | 24 +++++++++++++++++++----- include/linux/fs.h | 2 ++ 3 files changed, 22 insertions(+), 6 deletions(-) commit 32ce5d87d52213a50a513750f01a56f4d01f50cb Author: Johan Hovold Date: Fri Feb 14 11:21:30 2025 +0100 bus: simple-pm-bus: fix forced runtime PM use The simple-pm-bus driver only enables runtime PM for some buses ('simple-pm-bus') yet has started calling pm_runtime_force_suspend() and pm_runtime_force_resume() during system suspend unconditionally. This currently works, but that is not obvious and depends on implementation details which may change at some point. Add dedicated system sleep ops and only call pm_runtime_force_suspend() and pm_runtime_force_resume() for buses that use runtime PM to avoid any future surprises. Fixes: c45839309c3d ("drivers: bus: simple-pm-bus: Use clocks") Cc: Liu Ying Signed-off-by: Johan Hovold Reviewed-by: Ulf Hansson Acked-by: Liu Ying Acked-by: Rafael J. Wysocki Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20250214102130.3000-1-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/bus/simple-pm-bus.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 6d991f569c5ef6eaeadf1238df2c36e3975233ad Author: Thadeu Lima de Souza Cascardo Date: Thu Jan 23 09:32:49 2025 -0300 char: misc: deallocate static minor in error path When creating sysfs files fail, the allocated minor must be freed such that it can be later reused. That is specially harmful for static minor numbers, since those would always fail to register later on. Fixes: 6d04d2b554b1 ("misc: misc_minor_alloc to use ida for all dynamic/misc dynamic minors") Cc: stable Signed-off-by: Thadeu Lima de Souza Cascardo Link: https://lore.kernel.org/r/20250123123249.4081674-5-cascardo@igalia.com Signed-off-by: Greg Kroah-Hartman drivers/char/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 038ef0754aae76f79b147b8867f9250e6a976872 Author: Andy Shevchenko Date: Fri Feb 7 00:03:11 2025 +0200 eeprom: digsy_mtc: Make GPIO lookup table match the device The dev_id value in the GPIO lookup table must match to the device instance name, which in this case is combined of name and platform device ID, i.e. "spi_gpio.1". But the table assumed that there was no platform device ID defined, which is wrong. Fix the dev_id value accordingly. Fixes: 9b00bc7b901f ("spi: spi-gpio: Rewrite to use GPIO descriptors") Cc: stable Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250206220311.1554075-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/digsy_mtc_eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 819cec1dc47cdeac8f5dd6ba81c1dbee2a68c3bb Author: Haoyu Li Date: Thu Jan 30 19:58:11 2025 +0800 drivers: virt: acrn: hsm: Use kzalloc to avoid info leak in pmcmd_ioctl In the "pmcmd_ioctl" function, three memory objects allocated by kmalloc are initialized by "hcall_get_cpu_state", which are then copied to user space. The initializer is indeed implemented in "acrn_hypercall2" (arch/x86/include/asm/acrn.h). There is a risk of information leakage due to uninitialized bytes. Fixes: 3d679d5aec64 ("virt: acrn: Introduce interfaces to query C-states and P-states allowed by hypervisor") Signed-off-by: Haoyu Li Cc: stable Acked-by: Fei Li Link: https://lore.kernel.org/r/20250130115811.92424-1-lihaoyu499@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/virt/acrn/hsm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e77aff5528a183462714f750e45add6cc71e276a Author: Carlos Llamas Date: Thu Jan 30 21:58:22 2025 +0000 binderfs: fix use-after-free in binder_devices Devices created through binderfs are added to the global binder_devices list but are not removed before being destroyed. This leads to dangling pointers in the list and subsequent use-after-free errors: ================================================================== BUG: KASAN: slab-use-after-free in binder_add_device+0x5c/0x9c Write of size 8 at addr ffff0000c258d708 by task mount/653 CPU: 7 UID: 0 PID: 653 Comm: mount Not tainted 6.13.0-09030-g6d61a53dd6f5 #1 Hardware name: linux,dummy-virt (DT) Call trace: binder_add_device+0x5c/0x9c binderfs_binder_device_create+0x690/0x84c [...] __arm64_sys_mount+0x324/0x3bc Allocated by task 632: binderfs_binder_device_create+0x168/0x84c binder_ctl_ioctl+0xfc/0x184 [...] __arm64_sys_ioctl+0x110/0x150 Freed by task 649: kfree+0xe0/0x338 binderfs_evict_inode+0x138/0x1dc [...] ================================================================== Remove devices from binder_devices before destroying them. Cc: Li Li Reported-by: syzbot+7015dcf45953112c8b45@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=7015dcf45953112c8b45 Fixes: 12d909cac1e1 ("binderfs: add new binder devices to binder_devices") Signed-off-by: Carlos Llamas Tested-by: syzbot+7015dcf45953112c8b45@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20250130215823.1518990-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman drivers/android/binderfs.c | 1 + 1 file changed, 1 insertion(+) commit dcb0d43ba8eb9517e70b1a0e4b0ae0ab657a0e5a Author: Visweswara Tanuku Date: Fri Jan 24 04:57:40 2025 -0800 slimbus: messaging: Free transaction ID in delayed interrupt scenario In case of interrupt delay for any reason, slim_do_transfer() returns timeout error but the transaction ID (TID) is not freed. This results into invalid memory access inside qcom_slim_ngd_rx_msgq_cb() due to invalid TID. Fix the issue by freeing the TID in slim_do_transfer() before returning timeout error to avoid invalid memory access. Call trace: __memcpy_fromio+0x20/0x190 qcom_slim_ngd_rx_msgq_cb+0x130/0x290 [slim_qcom_ngd_ctrl] vchan_complete+0x2a0/0x4a0 tasklet_action_common+0x274/0x700 tasklet_action+0x28/0x3c _stext+0x188/0x620 run_ksoftirqd+0x34/0x74 smpboot_thread_fn+0x1d8/0x464 kthread+0x178/0x238 ret_from_fork+0x10/0x20 Code: aa0003e8 91000429 f100044a 3940002b (3800150b) ---[ end trace 0fe00bec2b975c99 ]--- Kernel panic - not syncing: Oops: Fatal exception in interrupt. Fixes: afbdcc7c384b ("slimbus: Add messaging APIs to slimbus framework") Cc: stable Signed-off-by: Visweswara Tanuku Link: https://lore.kernel.org/r/20250124125740.16897-1-quic_vtanuku@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/slimbus/messaging.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c99e1e1d0850ff157f1bc16871acd2dff5a9bcc3 Author: Arnd Bergmann Date: Wed Jan 22 07:54:33 2025 +0100 vbox: add HAS_IOPORT dependency The vboxguest driver depends on port I/O for debug output: include/asm-generic/io.h:626:15: error: call to '_outl' declared with attribute error: outl() requires CONFIG_HAS_IOPORT 626 | #define _outl _outl include/asm-generic/io.h:663:14: note: in expansion of macro '_outl' 663 | #define outl _outl | ^~~~~ drivers/virt/vboxguest/vboxguest_utils.c:102:9: note: in expansion of macro 'outl' 102 | outl(phys_req, gdev->io_port + VMMDEV_PORT_OFF_REQUEST); | ^~~~ Most arm64 platforms don't actually support port I/O, though it is currently enabled unconditionally. Refine the vbox dependency to allow turning HAS_IOPORT off in the future when building for platforms without port I/O and allow compile-testing on all architectures. Fixes: 5cf8f938bf5c ("vbox: Enable VBOXGUEST and VBOXSF_FS on ARM64") Signed-off-by: Arnd Bergmann Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250122065445.1469218-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/virt/vboxguest/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 91d44c1afc61a2fec37a9c7a3485368309391e0b Author: Qiu-ji Chen Date: Sat Jan 18 15:08:33 2025 +0800 cdx: Fix possible UAF error in driver_override_show() Fixed a possible UAF problem in driver_override_show() in drivers/cdx/cdx.c This function driver_override_show() is part of DEVICE_ATTR_RW, which includes both driver_override_show() and driver_override_store(). These functions can be executed concurrently in sysfs. The driver_override_store() function uses driver_set_override() to update the driver_override value, and driver_set_override() internally locks the device (device_lock(dev)). If driver_override_show() reads cdx_dev->driver_override without locking, it could potentially access a freed pointer if driver_override_store() frees the string concurrently. This could lead to printing a kernel address, which is a security risk since DEVICE_ATTR can be read by all users. Additionally, a similar pattern is used in drivers/amba/bus.c, as well as many other bus drivers, where device_lock() is taken in the show function, and it has been working without issues. This potential bug was detected by our experimental static analysis tool, which analyzes locking APIs and paired functions to identify data races and atomicity violations. Fixes: 1f86a00c1159 ("bus/fsl-mc: add support for 'driver_override' in the mc-bus") Cc: stable Signed-off-by: Qiu-ji Chen Link: https://lore.kernel.org/r/20250118070833.27201-1-chenqiuji666@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/cdx/cdx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 96fa9ec477ff60bed87e1441fd43e003179f3253 Author: Bartosz Golaszewski Date: Wed Feb 19 15:43:56 2025 +0100 gpiolib: don't bail out if get_direction() fails in gpiochip_add_data() Since commit 9d846b1aebbe ("gpiolib: check the return value of gpio_chip::get_direction()") we check the return value of the get_direction() callback as per its API contract. Some drivers have been observed to fail to register now as they may call get_direction() in gpiochip_add_data() in contexts where it has always silently failed. Until we audit all drivers, replace the bail-out to a kernel log warning. Fixes: 9d846b1aebbe ("gpiolib: check the return value of gpio_chip::get_direction()") Reported-by: Mark Brown Closes: https://lore.kernel.org/all/Z7VFB1nST6lbmBIo@finisterre.sirena.org.uk/ Reported-by: Marek Szyprowski Closes: https://lore.kernel.org/all/dfe03f88-407e-4ef1-ad30-42db53bbd4e4@samsung.com/ Tested-by: Mark Brown Reviewed-by: Mark Brown Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20250219144356.258635-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit c783e1258f29c5caac9eea0aea6b172870f1baf8 Author: Marek Szyprowski Date: Thu Feb 20 13:03:14 2025 +0100 usb: gadget: Fix setting self-powered state on suspend cdev->config might be NULL, so check it before dereferencing. CC: stable Fixes: 40e89ff5750f ("usb: gadget: Set self-powered based on MaxPower and bmAttributes") Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20250220120314.3614330-1-m.szyprowski@samsung.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/composite.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 78eb41f518f414378643ab022241df2a9dcd008b Author: Luca Ceresoli Date: Thu Feb 13 15:05:13 2025 +0100 drivers: core: fix device leak in __fw_devlink_relax_cycles() Commit bac3b10b78e5 ("driver core: fw_devlink: Stop trying to optimize cycle detection logic") introduced a new struct device *con_dev and a get_dev_from_fwnode() call to get it, but without adding a corresponding put_device(). Closes: https://lore.kernel.org/all/20241204124826.2e055091@booty/ Fixes: bac3b10b78e5 ("driver core: fw_devlink: Stop trying to optimize cycle detection logic") Cc: stable@vger.kernel.org Reviewed-by: Saravana Kannan Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20250213-fix__fw_devlink_relax_cycles_missing_device_put-v2-1-8cd3b03e6a3f@bootlin.com Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 1 + 1 file changed, 1 insertion(+) commit dd3188ddc4c49cb234b82439693121d2c1c69c38 Merge: 878e7b11736e 6bc7e4eb0499 Author: Paolo Abeni Date: Thu Feb 20 10:53:31 2025 +0100 Merge branch 'net-remove-the-single-page-frag-cache-for-good' Paolo Abeni says: ==================== net: remove the single page frag cache for good This is another attempt at reverting commit dbae2b062824 ("net: skb: introduce and use a single page frag cache"), as it causes regressions in specific use-cases. Reverting such commit uncovers an allocation issue for build with CONFIG_MAX_SKB_FRAGS=45, as reported by Sabrina. This series handle the latter in patch 1 and brings the revert in patch 2. Note that there is a little chicken-egg problem, as I included into the patch 1's changelog the splat that would be visible only applying first the revert: I think current patch order is better for bisectability, still the splat is useful for correct attribution. ==================== Link: https://patch.msgid.link/cover.1739899357.git.pabeni@redhat.com Signed-off-by: Paolo Abeni commit 6bc7e4eb0499562ccd291712fd7be0d1a5aad00a Author: Paolo Abeni Date: Tue Feb 18 19:29:40 2025 +0100 Revert "net: skb: introduce and use a single page frag cache" After the previous commit is finally safe to revert commit dbae2b062824 ("net: skb: introduce and use a single page frag cache"): do it here. The intended goal of such change was to counter a performance regression introduced by commit 3226b158e67c ("net: avoid 32 x truesize under-estimation for tiny skbs"). Unfortunately, the blamed commit introduces another regression for the virtio_net driver. Such a driver calls napi_alloc_skb() with a tiny size, so that the whole head frag could fit a 512-byte block. The single page frag cache uses a 1K fragment for such allocation, and the additional overhead, under small UDP packets flood, makes the page allocator a bottleneck. Thanks to commit bf9f1baa279f ("net: add dedicated kmem_cache for typical/small skb->head"), this revert does not re-introduce the original regression. Actually, in the relevant test on top of this revert, I measure a small but noticeable positive delta, just above noise level. The revert itself required some additional mangling due to recent updates in the affected code. Suggested-by: Eric Dumazet Fixes: dbae2b062824 ("net: skb: introduce and use a single page frag cache") Reviewed-by: Eric Dumazet Signed-off-by: Paolo Abeni include/linux/netdevice.h | 1 - net/core/dev.c | 17 ++++++++ net/core/skbuff.c | 104 +++------------------------------------------- 3 files changed, 22 insertions(+), 100 deletions(-) commit 14ad6ed30a10afbe91b0749d6378285f4225d482 Author: Paolo Abeni Date: Tue Feb 18 19:29:39 2025 +0100 net: allow small head cache usage with large MAX_SKB_FRAGS values Sabrina reported the following splat: WARNING: CPU: 0 PID: 1 at net/core/dev.c:6935 netif_napi_add_weight_locked+0x8f2/0xba0 Modules linked in: CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.14.0-rc1-net-00092-g011b03359038 #996 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014 RIP: 0010:netif_napi_add_weight_locked+0x8f2/0xba0 Code: e8 c3 e6 6a fe 48 83 c4 28 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc c7 44 24 10 ff ff ff ff e9 8f fb ff ff e8 9e e6 6a fe <0f> 0b e9 d3 fe ff ff e8 92 e6 6a fe 48 8b 04 24 be ff ff ff ff 48 RSP: 0000:ffffc9000001fc60 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff88806ce48128 RCX: 1ffff11001664b9e RDX: ffff888008f00040 RSI: ffffffff8317ca42 RDI: ffff88800b325cb6 RBP: ffff88800b325c40 R08: 0000000000000001 R09: ffffed100167502c R10: ffff88800b3a8163 R11: 0000000000000000 R12: ffff88800ac1c168 R13: ffff88800ac1c168 R14: ffff88800ac1c168 R15: 0000000000000007 FS: 0000000000000000(0000) GS:ffff88806ce00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff888008201000 CR3: 0000000004c94001 CR4: 0000000000370ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: gro_cells_init+0x1ba/0x270 xfrm_input_init+0x4b/0x2a0 xfrm_init+0x38/0x50 ip_rt_init+0x2d7/0x350 ip_init+0xf/0x20 inet_init+0x406/0x590 do_one_initcall+0x9d/0x2e0 do_initcalls+0x23b/0x280 kernel_init_freeable+0x445/0x490 kernel_init+0x20/0x1d0 ret_from_fork+0x46/0x80 ret_from_fork_asm+0x1a/0x30 irq event stamp: 584330 hardirqs last enabled at (584338): [] __up_console_sem+0x77/0xb0 hardirqs last disabled at (584345): [] __up_console_sem+0x5c/0xb0 softirqs last enabled at (583242): [] netlink_insert+0x14d/0x470 softirqs last disabled at (583754): [] netif_napi_add_weight_locked+0x77d/0xba0 on kernel built with MAX_SKB_FRAGS=45, where SKB_WITH_OVERHEAD(1024) is smaller than GRO_MAX_HEAD. Such built additionally contains the revert of the single page frag cache so that napi_get_frags() ends up using the page frag allocator, triggering the splat. Note that the underlying issue is independent from the mentioned revert; address it ensuring that the small head cache will fit either TCP and GRO allocation and updating napi_alloc_skb() and __netdev_alloc_skb() to select kmalloc() usage for any allocation fitting such cache. Reported-by: Sabrina Dubroca Suggested-by: Eric Dumazet Fixes: 3948b05950fd ("net: introduce a config option to tweak MAX_SKB_FRAGS") Reviewed-by: Eric Dumazet Signed-off-by: Paolo Abeni include/net/gro.h | 3 +++ net/core/gro.c | 3 --- net/core/skbuff.c | 10 +++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) commit 49114ff05770264ae233f50023fc64a719a9dcf9 Author: Alexander Shishkin Date: Tue Feb 11 20:50:17 2025 +0200 intel_th: pci: Add Panther Lake-P/U support Add support for the Trace Hub in Panther Lake-P/U. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: stable@kernel.org Link: https://lore.kernel.org/r/20250211185017.1759193-6-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit a70034d6c0d5f3cdee40bb00a578e17fd2ebe426 Author: Alexander Shishkin Date: Tue Feb 11 20:50:16 2025 +0200 intel_th: pci: Add Panther Lake-H support Add support for the Trace Hub in Panther Lake-H. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: stable@kernel.org Link: https://lore.kernel.org/r/20250211185017.1759193-5-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit b5edccae9f447a92d475267d94c33f4926963eec Author: Pawel Chmielewski Date: Tue Feb 11 20:50:15 2025 +0200 intel_th: pci: Add Arrow Lake support Add support for the Trace Hub in Arrow Lake. Signed-off-by: Pawel Chmielewski Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: stable@kernel.org Link: https://lore.kernel.org/r/20250211185017.1759193-4-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit 04190ec6d02aa8fee0f03189bb7762b44739c253 Author: Alexander Shishkin Date: Tue Feb 11 20:50:14 2025 +0200 intel_th: msu: Fix less trivial kernel-doc warnings Correct function comments to prevent kernel-doc warnings found when using "W=1" that the drive-by fixers had trouble documenting and skipped over. msu.c:168: warning: Function parameter or struct member 'msu_base' not described in 'msc' msu.c:168: warning: Function parameter or struct member 'work' not described in 'msc' msu.c:168: warning: Function parameter or struct member 'switch_on_unlock' not described in 'msc' msu.c:168: warning: Function parameter or struct member 'iter_list' not described in 'msc' msu.c:168: warning: Function parameter or struct member 'stop_on_full' not described in 'msc' msu.c:168: warning: Function parameter or struct member 'do_irq' not described in 'msc' msu.c:168: warning: Function parameter or struct member 'multi_is_broken' not described in 'msc' Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250211185017.1759193-3-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/msu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 4738d3d3e12d70a5067baba147daf57e57b77548 Author: Andy Shevchenko Date: Tue Feb 11 20:50:13 2025 +0200 intel_th: msu: Fix kernel-doc warnings Correct function comments to prevent kernel-doc warnings found when using "W=1". msu.c:162: warning: Function parameter or struct member 'mbuf_priv' not described in 'msc' msu.c:164: warning: Function parameter or struct member 'orig_addr' not described in 'msc' msu.c:164: warning: Function parameter or struct member 'orig_sz' not described in 'msc' Signed-off-by: Andy Shevchenko Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20250211185017.1759193-2-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/msu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 878e7b11736e062514e58f3b445ff343e6705537 Author: Haoxiang Li Date: Tue Feb 18 11:04:09 2025 +0800 nfp: bpf: Add check for nfp_app_ctrl_msg_alloc() Add check for the return value of nfp_app_ctrl_msg_alloc() in nfp_bpf_cmsg_alloc() to prevent null pointer dereference. Fixes: ff3d43f7568c ("nfp: bpf: implement helpers for FW map ops") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li Link: https://patch.msgid.link/20250218030409.2425798-1-haoxiang_li2024@163.com Signed-off-by: Paolo Abeni drivers/net/ethernet/netronome/nfp/bpf/cmsg.c | 2 ++ 1 file changed, 2 insertions(+) commit 9b6412e6979f6f9e0632075f8f008937b5cd4efd Author: Sabrina Dubroca Date: Mon Feb 17 11:23:35 2025 +0100 tcp: drop secpath at the same time as we currently drop dst Xiumei reported hitting the WARN in xfrm6_tunnel_net_exit while running tests that boil down to: - create a pair of netns - run a basic TCP test over ipcomp6 - delete the pair of netns The xfrm_state found on spi_byaddr was not deleted at the time we delete the netns, because we still have a reference on it. This lingering reference comes from a secpath (which holds a ref on the xfrm_state), which is still attached to an skb. This skb is not leaked, it ends up on sk_receive_queue and then gets defer-free'd by skb_attempt_defer_free. The problem happens when we defer freeing an skb (push it on one CPU's defer_list), and don't flush that list before the netns is deleted. In that case, we still have a reference on the xfrm_state that we don't expect at this point. We already drop the skb's dst in the TCP receive path when it's no longer needed, so let's also drop the secpath. At this point, tcp_filter has already called into the LSM hooks that may require the secpath, so it should not be needed anymore. However, in some of those places, the MPTCP extension has just been attached to the skb, so we cannot simply drop all extensions. Fixes: 68822bdf76f1 ("net: generalize skb freeing deferral to per-cpu lists") Reported-by: Xiumei Mu Signed-off-by: Sabrina Dubroca Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/5055ba8f8f72bdcb602faa299faca73c280b7735.1739743613.git.sd@queasysnail.net Signed-off-by: Paolo Abeni include/net/tcp.h | 14 ++++++++++++++ net/ipv4/tcp_fastopen.c | 4 ++-- net/ipv4/tcp_input.c | 8 ++++---- net/ipv4/tcp_ipv4.c | 2 +- 4 files changed, 21 insertions(+), 7 deletions(-) commit a370295367b55662a32a4be92565fe72a5aa79bb Author: Nick Hu Date: Mon Feb 17 13:58:42 2025 +0800 net: axienet: Set mac_managed_pm The external PHY will undergo a soft reset twice during the resume process when it wake up from suspend. The first reset occurs when the axienet driver calls phylink_of_phy_connect(), and the second occurs when mdio_bus_phy_resume() invokes phy_init_hw(). The second soft reset of the external PHY does not reinitialize the internal PHY, which causes issues with the internal PHY, resulting in the PHY link being down. To prevent this, setting the mac_managed_pm flag skips the mdio_bus_phy_resume() function. Fixes: a129b41fe0a8 ("Revert "net: phy: dp83867: perform soft reset and retain established link"") Signed-off-by: Nick Hu Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250217055843.19799-1-nick.hu@sifive.com Signed-off-by: Paolo Abeni drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 + 1 file changed, 1 insertion(+) commit 6d306090ea23d94783b0e77ecb63bea566fb8da3 Merge: 954b8915ff86 a321d163de3d Author: Greg Kroah-Hartman Date: Thu Feb 20 09:00:05 2025 +0100 Merge tag 'mhi-fixes-for-v6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-linus Manivannan writes: MHI Host ======== - Use pci_try_reset_function() to reset the MHI function during recovery process to avoid the deadlock reported on the X1E80100 CRD device. The deadlock can happen if the caller has already acquired the 'device_lock()' while calling the recovery function. So using pci_try_reset_function() avoids the deadlock by returning -EAGAIN if the lock was already acquired. * tag 'mhi-fixes-for-v6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: host: pci_generic: Use pci_try_reset_function() to avoid deadlock commit c534ffda781f44a1c6ac25ef6e0e444da38ca8af Author: Patrisious Haddad Date: Mon Feb 10 13:32:39 2025 +0200 RDMA/mlx5: Fix AH static rate parsing Previously static rate wasn't translated according to our PRM but simply used the 4 lower bytes. Correctly translate static rate value passed in AH creation attribute according to our PRM expected values. In addition change 800GB mapping to zero, which is the PRM specified value. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Patrisious Haddad Reviewed-by: Maor Gottlieb Link: https://patch.msgid.link/18ef4cc5396caf80728341eb74738cd777596f60.1739187089.git.leon@kernel.org Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/ah.c | 3 ++- drivers/infiniband/hw/mlx5/qp.c | 6 +++--- drivers/infiniband/hw/mlx5/qp.h | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) commit 3d8c6f26893d55fab218ad086719de1fc9bb86ba Author: Yishai Hadas Date: Mon Feb 10 13:31:11 2025 +0200 RDMA/mlx5: Fix implicit ODP hang on parent deregistration Fix the destroy_unused_implicit_child_mr() to prevent hanging during parent deregistration as of below [1]. Upon entering destroy_unused_implicit_child_mr(), the reference count for the implicit MR parent is incremented using: refcount_inc_not_zero(). A corresponding decrement must be performed if free_implicit_child_mr_work() is not called. The code has been updated to properly manage the reference count that was incremented. [1] INFO: task python3:2157 blocked for more than 120 seconds. Not tainted 6.12.0-rc7+ #1633 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:python3 state:D stack:0 pid:2157 tgid:2157 ppid:1685 flags:0x00000000 Call Trace: __schedule+0x420/0xd30 schedule+0x47/0x130 __mlx5_ib_dereg_mr+0x379/0x5d0 [mlx5_ib] ? __pfx_autoremove_wake_function+0x10/0x10 ib_dereg_mr_user+0x5f/0x120 [ib_core] ? lock_release+0xc6/0x280 destroy_hw_idr_uobject+0x1d/0x60 [ib_uverbs] uverbs_destroy_uobject+0x58/0x1d0 [ib_uverbs] uobj_destroy+0x3f/0x70 [ib_uverbs] ib_uverbs_cmd_verbs+0x3e4/0xbb0 [ib_uverbs] ? __pfx_uverbs_destroy_def_handler+0x10/0x10 [ib_uverbs] ? lock_acquire+0xc1/0x2f0 ? ib_uverbs_ioctl+0xcb/0x170 [ib_uverbs] ? ib_uverbs_ioctl+0x116/0x170 [ib_uverbs] ? lock_release+0xc6/0x280 ib_uverbs_ioctl+0xe7/0x170 [ib_uverbs] ? ib_uverbs_ioctl+0xcb/0x170 [ib_uverbs] __x64_sys_ioctl+0x1b0/0xa70 ? kmem_cache_free+0x221/0x400 do_syscall_64+0x6b/0x140 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f20f21f017b RSP: 002b:00007ffcfc4a77c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ffcfc4a78d8 RCX: 00007f20f21f017b RDX: 00007ffcfc4a78c0 RSI: 00000000c0181b01 RDI: 0000000000000003 RBP: 00007ffcfc4a78a0 R08: 000056147d125190 R09: 00007f20f1f14c60 R10: 0000000000000001 R11: 0000000000000246 R12: 00007ffcfc4a7890 R13: 000000000000001c R14: 000056147d100fc0 R15: 00007f20e365c9d0 Fixes: d3d930411ce3 ("RDMA/mlx5: Fix implicit ODP use after free") Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Link: https://patch.msgid.link/80f2fcd19952dfa7d9981d93fd6359b4471f8278.1739186929.git.leon@kernel.org Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/odp.c | 1 + 1 file changed, 1 insertion(+) commit 62520094e98c197c5ae34af9a17b67381678cb9d Merge: 606572eb22c1 4eae0ee0f1e6 Author: Jakub Kicinski Date: Wed Feb 19 19:01:00 2025 -0800 Merge branch 'net-core-improvements-to-device-lookup-by-hardware-address' Breno Leitao says: ==================== net: core: improvements to device lookup by hardware address. The first patch adds a new dev_getbyhwaddr() helper function for finding devices by hardware address when the rtnl lock is held. This prevents PROVE_LOCKING warnings that occurred when rtnl lock was held but the RCU read lock wasn't. The common address comparison logic is extracted into dev_comp_addr() to avoid code duplication. The second coverts arp_req_set_public() to the new helper. ==================== Link: https://patch.msgid.link/20250218-arm_fix_selftest-v5-0-d3d6892db9e1@debian.org Signed-off-by: Jakub Kicinski commit 4eae0ee0f1e6256d0b0b9dd6e72f1d9cf8f72e08 Author: Breno Leitao Date: Tue Feb 18 05:49:31 2025 -0800 arp: switch to dev_getbyhwaddr() in arp_req_set_public() The arp_req_set_public() function is called with the rtnl lock held, which provides enough synchronization protection. This makes the RCU variant of dev_getbyhwaddr() unnecessary. Switch to using the simpler dev_getbyhwaddr() function since we already have the required rtnl locking. This change helps maintain consistency in the networking code by using the appropriate helper function for the existing locking context. Since we're not holding the RCU read lock in arp_req_set_public() existing code could trigger false positive locking warnings. Fixes: 941666c2e3e0 ("net: RCU conversion of dev_getbyhwaddr() and arp_ioctl()") Suggested-by: Kuniyuki Iwashima Reviewed-by: Kuniyuki Iwashima Signed-off-by: Breno Leitao Link: https://patch.msgid.link/20250218-arm_fix_selftest-v5-2-d3d6892db9e1@debian.org Signed-off-by: Jakub Kicinski net/ipv4/arp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b5a28b38c4a0106c64416a1b2042405166b26ce Author: Breno Leitao Date: Tue Feb 18 05:49:30 2025 -0800 net: Add non-RCU dev_getbyhwaddr() helper Add dedicated helper for finding devices by hardware address when holding rtnl_lock, similar to existing dev_getbyhwaddr_rcu(). This prevents PROVE_LOCKING warnings when rtnl_lock is held but RCU read lock is not. Extract common address comparison logic into dev_addr_cmp(). The context about this change could be found in the following discussion: Link: https://lore.kernel.org/all/20250206-scarlet-ermine-of-improvement-1fcac5@leitao/ Cc: kuniyu@amazon.com Cc: ushankar@purestorage.com Suggested-by: Eric Dumazet Signed-off-by: Breno Leitao Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250218-arm_fix_selftest-v5-1-d3d6892db9e1@debian.org Signed-off-by: Jakub Kicinski include/linux/netdevice.h | 2 ++ net/core/dev.c | 37 ++++++++++++++++++++++++++++++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) commit 606572eb22c1786a3957d24307f5760bb058ca19 Author: Yu-Chun Lin Date: Tue Feb 18 16:12:16 2025 +0800 sctp: Fix undefined behavior in left shift operation According to the C11 standard (ISO/IEC 9899:2011, 6.5.7): "If E1 has a signed type and E1 x 2^E2 is not representable in the result type, the behavior is undefined." Shifting 1 << 31 causes signed integer overflow, which leads to undefined behavior. Fix this by explicitly using '1U << 31' to ensure the shift operates on an unsigned type, avoiding undefined behavior. Signed-off-by: Yu-Chun Lin Link: https://patch.msgid.link/20250218081217.3468369-1-eleanor15x@gmail.com Signed-off-by: Jakub Kicinski net/sctp/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5bcd3d15ca13671fa7e221be38c8aed725630602 Merge: 346b3416fd12 15de6ba95dbe Author: Jakub Kicinski Date: Wed Feb 19 18:55:32 2025 -0800 Merge branch 'flow_dissector-fix-handling-of-mixed-port-and-port-range-keys' Cong Wang says: ==================== flow_dissector: Fix handling of mixed port and port-range keys This patchset contains two fixes for flow_dissector handling of mixed port and port-range keys, for both tc-flower case and bpf case. Each of them also comes with a selftest. ==================== Link: https://patch.msgid.link/20250218043210.732959-1-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski commit 15de6ba95dbe98af7eb71e644205a37c2f1a9aea Author: Cong Wang Date: Mon Feb 17 20:32:10 2025 -0800 selftests/bpf: Add a specific dst port matching After this patch: #102/1 flow_dissector_classification/ipv4:OK #102/2 flow_dissector_classification/ipv4_continue_dissect:OK #102/3 flow_dissector_classification/ipip:OK #102/4 flow_dissector_classification/gre:OK #102/5 flow_dissector_classification/port_range:OK #102/6 flow_dissector_classification/ipv6:OK #102 flow_dissector_classification:OK Summary: 1/6 PASSED, 0 SKIPPED, 0 FAILED Cc: Daniel Borkmann Cc: Andrii Nakryiko Signed-off-by: Cong Wang Link: https://patch.msgid.link/20250218043210.732959-5-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski .../selftests/bpf/prog_tests/flow_dissector_classification.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 69ab34f705fbfabcace64b5d53bb7a4450fac875 Author: Cong Wang Date: Mon Feb 17 20:32:09 2025 -0800 flow_dissector: Fix port range key handling in BPF conversion Fix how port range keys are handled in __skb_flow_bpf_to_target() by: - Separating PORTS and PORTS_RANGE key handling - Using correct key_ports_range structure for range keys - Properly initializing both key types independently This ensures port range information is correctly stored in its dedicated structure rather than incorrectly using the regular ports key structure. Fixes: 59fb9b62fb6c ("flow_dissector: Fix to use new variables for port ranges in bpf hook") Reported-by: Qiang Zhang Closes: https://lore.kernel.org/netdev/CAPx+-5uvFxkhkz4=j_Xuwkezjn9U6kzKTD5jz4tZ9msSJ0fOJA@mail.gmail.com/ Cc: Yoshiki Komachi Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Link: https://patch.msgid.link/20250218043210.732959-4-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski net/core/flow_dissector.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit dfc1580f960bf70bdaacda8f3d644e3e58160f9d Author: Cong Wang Date: Mon Feb 17 20:32:08 2025 -0800 selftests/net/forwarding: Add a test case for tc-flower of mixed port and port-range After this patch: # ./tc_flower_port_range.sh TEST: Port range matching - IPv4 UDP [ OK ] TEST: Port range matching - IPv4 TCP [ OK ] TEST: Port range matching - IPv6 UDP [ OK ] TEST: Port range matching - IPv6 TCP [ OK ] TEST: Port range matching - IPv4 UDP Drop [ OK ] Cc: Qiang Zhang Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Link: https://patch.msgid.link/20250218043210.732959-3-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski .../net/forwarding/tc_flower_port_range.sh | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 3e5796862c692ea608d96f0a1437f9290f44953a Author: Cong Wang Date: Mon Feb 17 20:32:07 2025 -0800 flow_dissector: Fix handling of mixed port and port-range keys This patch fixes a bug in TC flower filter where rules combining a specific destination port with a source port range weren't working correctly. The specific case was when users tried to configure rules like: tc filter add dev ens38 ingress protocol ip flower ip_proto udp \ dst_port 5000 src_port 2000-3000 action drop The root cause was in the flow dissector code. While both FLOW_DISSECTOR_KEY_PORTS and FLOW_DISSECTOR_KEY_PORTS_RANGE flags were being set correctly in the classifier, the __skb_flow_dissect_ports() function was only populating one of them: whichever came first in the enum check. This meant that when the code needed both a specific port and a port range, one of them would be left as 0, causing the filter to not match packets as expected. Fix it by removing the either/or logic and instead checking and populating both key types independently when they're in use. Fixes: 8ffb055beae5 ("cls_flower: Fix the behavior using port ranges with hw-offload") Reported-by: Qiang Zhang Closes: https://lore.kernel.org/netdev/CAPx+-5uvFxkhkz4=j_Xuwkezjn9U6kzKTD5jz4tZ9msSJ0fOJA@mail.gmail.com/ Cc: Yoshiki Komachi Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20250218043210.732959-2-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski net/core/flow_dissector.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) commit 346b3416fd129025bdfe5a27a2d1224b99932227 Merge: a92c32287664 62fab6eef61f Author: Jakub Kicinski Date: Wed Feb 19 18:49:30 2025 -0800 Merge branch 'gtp-geneve-suppress-list_del-splat-during-exit_batch_rtnl' Kuniyuki Iwashima says: ==================== gtp/geneve: Suppress list_del() splat during ->exit_batch_rtnl(). The common pattern in tunnel device's ->exit_batch_rtnl() is iterating two netdev lists for each netns: (i) for_each_netdev() to clean up devices in the netns, and (ii) the device type specific list to clean up devices in other netns. list_for_each_entry(net, net_list, exit_list) { for_each_netdev_safe(net, dev, next) { /* (i) call unregister_netdevice_queue(dev, list) */ } list_for_each_entry_safe(xxx, xxx_next, &net->yyy, zzz) { /* (ii) call unregister_netdevice_queue(xxx->dev, list) */ } } Then, ->exit_batch_rtnl() could touch the same device twice. Say we have two netns A & B and device B that is created in netns A and moved to netns B. 1. cleanup_net() processes netns A and then B. 2. ->exit_batch_rtnl() finds the device B while iterating netns A's (ii) [ device B is not yet unlinked from netns B as unregister_netdevice_many() has not been called. ] 3. ->exit_batch_rtnl() finds the device B while iterating netns B's (i) gtp and geneve calls ->dellink() at 2. and 3. that calls list_del() for (ii) and unregister_netdevice_queue(). Calling unregister_netdevice_queue() twice is fine because it uses list_move_tail(), but the 2nd list_del() triggers a splat when CONFIG_DEBUG_LIST is enabled. Possible solution is either of (a) Use list_del_init() in ->dellink() (b) Iterate dev with empty ->unreg_list for (i) like #define for_each_netdev_alive(net, d) \ list_for_each_entry(d, &(net)->dev_base_head, dev_list) \ if (list_empty(&d->unreg_list)) (c) Remove (i) and delegate it to default_device_exit_batch(). This series avoids the 2nd ->dellink() by (c) to suppress the splat for gtp and geneve. Note that IPv4/IPv6 tunnels calls just unregister_netdevice() during ->exit_batch_rtnl() and dev is unlinked from (ii) later in ->ndo_uninit(), so they are safe. Also, pfcp has the same pattern but is safe because unregister_netdevice_many() is called for each netns. ==================== Link: https://patch.msgid.link/20250217203705.40342-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 62fab6eef61f245dc8797e3a6a5b890ef40e8628 Author: Kuniyuki Iwashima Date: Mon Feb 17 12:37:05 2025 -0800 geneve: Suppress list corruption splat in geneve_destroy_tunnels(). As explained in the previous patch, iterating for_each_netdev() and gn->geneve_list during ->exit_batch_rtnl() could trigger ->dellink() twice for the same device. If CONFIG_DEBUG_LIST is enabled, we will see a list_del() corruption splat in the 2nd call of geneve_dellink(). Let's remove for_each_netdev() in geneve_destroy_tunnels() and delegate that part to default_device_exit_batch(). Fixes: 9593172d93b9 ("geneve: Fix use-after-free in geneve_find_dev().") Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250217203705.40342-3-kuniyu@amazon.com Signed-off-by: Jakub Kicinski drivers/net/geneve.c | 7 ------- 1 file changed, 7 deletions(-) commit 4ccacf86491d33d2486b62d4d44864d7101b299d Author: Kuniyuki Iwashima Date: Mon Feb 17 12:37:04 2025 -0800 gtp: Suppress list corruption splat in gtp_net_exit_batch_rtnl(). Brad Spengler reported the list_del() corruption splat in gtp_net_exit_batch_rtnl(). [0] Commit eb28fd76c0a0 ("gtp: Destroy device along with udp socket's netns dismantle.") added the for_each_netdev() loop in gtp_net_exit_batch_rtnl() to destroy devices in each netns as done in geneve and ip tunnels. However, this could trigger ->dellink() twice for the same device during ->exit_batch_rtnl(). Say we have two netns A & B and gtp device B that resides in netns B but whose UDP socket is in netns A. 1. cleanup_net() processes netns A and then B. 2. gtp_net_exit_batch_rtnl() finds the device B while iterating netns A's gn->gtp_dev_list and calls ->dellink(). [ device B is not yet unlinked from netns B as unregister_netdevice_many() has not been called. ] 3. gtp_net_exit_batch_rtnl() finds the device B while iterating netns B's for_each_netdev() and calls ->dellink(). gtp_dellink() cleans up the device's hash table, unlinks the dev from gn->gtp_dev_list, and calls unregister_netdevice_queue(). Basically, calling gtp_dellink() multiple times is fine unless CONFIG_DEBUG_LIST is enabled. Let's remove for_each_netdev() in gtp_net_exit_batch_rtnl() and delegate the destruction to default_device_exit_batch() as done in bareudp. [0]: list_del corruption, ffff8880aaa62c00->next (autoslab_size_M_dev_P_net_core_dev_11127_8_1328_8_S_4096_A_64_n_139+0xc00/0x1000 [slab object]) is LIST_POISON1 (ffffffffffffff02) (prev is 0xffffffffffffff04) kernel BUG at lib/list_debug.c:58! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 UID: 0 PID: 1804 Comm: kworker/u8:7 Tainted: G T 6.12.13-grsec-full-20250211091339 #1 Tainted: [T]=RANDSTRUCT Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 Workqueue: netns cleanup_net RIP: 0010:[] __list_del_entry_valid_or_report+0x141/0x200 lib/list_debug.c:58 Code: c2 76 91 31 c0 e8 9f b1 f7 fc 0f 0b 4d 89 f0 48 c7 c1 02 ff ff ff 48 89 ea 48 89 ee 48 c7 c7 e0 c2 76 91 31 c0 e8 7f b1 f7 fc <0f> 0b 4d 89 e8 48 c7 c1 04 ff ff ff 48 89 ea 48 89 ee 48 c7 c7 60 RSP: 0018:fffffe8040b4fbd0 EFLAGS: 00010283 RAX: 00000000000000cc RBX: dffffc0000000000 RCX: ffffffff818c4054 RDX: ffffffff84947381 RSI: ffffffff818d1512 RDI: 0000000000000000 RBP: ffff8880aaa62c00 R08: 0000000000000001 R09: fffffbd008169f32 R10: fffffe8040b4f997 R11: 0000000000000001 R12: a1988d84f24943e4 R13: ffffffffffffff02 R14: ffffffffffffff04 R15: ffff8880aaa62c08 RBX: kasan shadow of 0x0 RCX: __wake_up_klogd.part.0+0x74/0xe0 kernel/printk/printk.c:4554 RDX: __list_del_entry_valid_or_report+0x141/0x200 lib/list_debug.c:58 RSI: vprintk+0x72/0x100 kernel/printk/printk_safe.c:71 RBP: autoslab_size_M_dev_P_net_core_dev_11127_8_1328_8_S_4096_A_64_n_139+0xc00/0x1000 [slab object] RSP: process kstack fffffe8040b4fbd0+0x7bd0/0x8000 [kworker/u8:7+netns 1804 ] R09: kasan shadow of process kstack fffffe8040b4f990+0x7990/0x8000 [kworker/u8:7+netns 1804 ] R10: process kstack fffffe8040b4f997+0x7997/0x8000 [kworker/u8:7+netns 1804 ] R15: autoslab_size_M_dev_P_net_core_dev_11127_8_1328_8_S_4096_A_64_n_139+0xc08/0x1000 [slab object] FS: 0000000000000000(0000) GS:ffff888116000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000748f5372c000 CR3: 0000000015408000 CR4: 00000000003406f0 shadow CR4: 00000000003406f0 Stack: 0000000000000000 ffffffff8a0c35e7 ffffffff8a0c3603 ffff8880aaa62c00 ffff8880aaa62c00 0000000000000004 ffff88811145311c 0000000000000005 0000000000000001 ffff8880aaa62000 fffffe8040b4fd40 ffffffff8a0c360d Call Trace: [] __list_del_entry_valid include/linux/list.h:131 [inline] fffffe8040b4fc28 [] __list_del_entry include/linux/list.h:248 [inline] fffffe8040b4fc28 [] list_del include/linux/list.h:262 [inline] fffffe8040b4fc28 [] gtp_dellink+0x16d/0x360 drivers/net/gtp.c:1557 fffffe8040b4fc28 [] gtp_net_exit_batch_rtnl+0x124/0x2c0 drivers/net/gtp.c:2495 fffffe8040b4fc88 [] cleanup_net+0x5a4/0xbe0 net/core/net_namespace.c:635 fffffe8040b4fcd0 [] process_one_work+0xbd7/0x2160 kernel/workqueue.c:3326 fffffe8040b4fd88 [] process_scheduled_works kernel/workqueue.c:3407 [inline] fffffe8040b4fec0 [] worker_thread+0x6b5/0xfa0 kernel/workqueue.c:3488 fffffe8040b4fec0 [] kthread+0x360/0x4c0 kernel/kthread.c:397 fffffe8040b4ff78 [] ret_from_fork+0x74/0xe0 arch/x86/kernel/process.c:172 fffffe8040b4ffb8 [] ret_from_fork_asm+0x29/0xc0 arch/x86/entry/entry_64.S:399 fffffe8040b4ffe8 Modules linked in: Fixes: eb28fd76c0a0 ("gtp: Destroy device along with udp socket's netns dismantle.") Reported-by: Brad Spengler Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250217203705.40342-2-kuniyu@amazon.com Signed-off-by: Jakub Kicinski drivers/net/gtp.c | 5 ----- 1 file changed, 5 deletions(-) commit 87a132e73910e8689902aed7f2fc229d6908383b Merge: 6537cfb395f3 8344017aaf32 Author: Linus Torvalds Date: Wed Feb 19 18:11:28 2025 -0800 Merge tag 'mm-hotfixes-stable-2025-02-19-17-49' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "18 hotfixes. 5 are cc:stable and the remainder address post-6.13 issues or aren't considered necessary for -stable kernels. 10 are for MM and 8 are for non-MM. All are singletons, please see the changelogs for details" * tag 'mm-hotfixes-stable-2025-02-19-17-49' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: test_xarray: fix failure in check_pause when CONFIG_XARRAY_MULTI is not defined kasan: don't call find_vm_area() in a PREEMPT_RT kernel MAINTAINERS: update Nick's contact info selftests/mm: fix check for running THP tests mm: hugetlb: avoid fallback for specific node allocation of 1G pages memcg: avoid dead loop when setting memory.max mailmap: update Nick's entry mm: pgtable: fix incorrect reclaim of non-empty PTE pages taskstats: modify taskstats version getdelays: fix error format characters mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize() tools/mm: fix build warnings with musl-libc mailmap: add entry for Feng Tang .mailmap: add entries for Jeff Johnson mm,madvise,hugetlb: check for 0-length range after end address adjustment mm/zswap: fix inconsistency when zswap_store_page() fails lib/iov_iter: fix import_iovec_ubuf iovec management procfs: fix a locking bug in a vmcore_add_device_dump() error path commit b04974f759ac7574d8556deb7c602a8d01a0dcc6 Author: Kent Overstreet Date: Wed Feb 19 15:40:03 2025 -0500 bcachefs: Fix srcu lock warning in btree_update_nodes_written() We don't want to be holding the srcu lock while waiting on btree write completions - easily fixed. Reported-by: Janpieter Sollie Signed-off-by: Kent Overstreet fs/bcachefs/btree_update_interior.c | 2 ++ 1 file changed, 2 insertions(+) commit 4fd509c10f9687f54752fbcaf83f520c93fc1f18 Author: Kent Overstreet Date: Wed Feb 19 13:45:02 2025 -0500 bcachefs: Fix bch2_indirect_extent_missing_error() We had some error handling confusion here; -BCH_ERR_missing_indirect_extent is thrown by trans_trigger_reflink_p_segment(); at this point we haven't decide whether we're generating an error. Signed-off-by: Kent Overstreet fs/bcachefs/reflink.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 102c51c50db88aedd00a318b7708ad60dbec2e95 Author: Will Deacon Date: Fri Feb 14 13:37:24 2025 +0000 KVM: arm64: Fix tcr_el2 initialisation in hVHE mode When not running in VHE mode, cpu_prepare_hyp_mode() computes the value of TCR_EL2 using the host's TCR_EL1 settings as a starting point. For nVHE, this amounts to masking out everything apart from the TG0, SH0, ORGN0, IRGN0 and T0SZ fields before setting the RES1 bits, shifting the IPS field down to the PS field and setting DS if LPA2 is enabled. Unfortunately, for hVHE, things go slightly wonky: EPD1 is correctly set to disable walks via TTBR1_EL2 but then the T1SZ and IPS fields are corrupted when we mistakenly attempt to initialise the PS and DS fields in their E2H=0 positions. Furthermore, many fields are retained from TCR_EL1 which should not be propagated to TCR_EL2. Notably, this means we can end up with A1 set despite not initialising TTBR1_EL2 at all. This has been shown to cause unexpected translation faults at EL2 with pKVM due to TLB invalidation not taking effect when running with a non-zero ASID. Fix the TCR_EL2 initialisation code to set PS and DS only when E2H=0, masking out HD, HA and A1 when E2H=1. Cc: Marc Zyngier Cc: Oliver Upton Fixes: ad744e8cb346 ("arm64: Allow arm64_sw.hvhe on command line") Signed-off-by: Will Deacon Link: https://lore.kernel.org/r/20250214133724.13179-1-will@kernel.org Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_arm.h | 2 +- arch/arm64/kvm/arm.c | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) commit 7a2f6f7687c5f7083a35317cddec5ad9fa491443 Author: Benjamin Coddington Date: Tue Feb 11 12:31:57 2025 -0500 SUNRPC: Handle -ETIMEDOUT return from tlshd If the TLS handshake attempt returns -ETIMEDOUT, we currently translate that error into -EACCES. This becomes problematic for cases where the RPC layer is attempting to re-connect in paths that don't resonably handle -EACCES, for example: writeback. The RPC layer can handle -ETIMEDOUT quite well, however - so if the handshake returns this error let's just pass it along. Fixes: 75eb6af7acdf ("SUNRPC: Add a TCP-with-TLS RPC transport class") Signed-off-by: Benjamin Coddington Signed-off-by: Anna Schumaker net/sunrpc/xprtsock.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 8f8df955f078e1a023ee55161935000a67651f38 Author: Trond Myklebust Date: Sat Feb 1 15:00:09 2025 -0500 NFSv4: Fix a deadlock when recovering state on a sillyrenamed file If the file is sillyrenamed, and slated for delete on close, it is possible for a server reboot to triggeer an open reclaim, with can again race with the application call to close(). When that happens, the call to put_nfs_open_context() can trigger a synchronous delegreturn call which deadlocks because it is not marked as privileged. Instead, ensure that the call to nfs4_inode_return_delegation_on_close() catches the delegreturn, and schedules it asynchronously. Reported-by: Li Lingfeng Fixes: adb4b42d19ae ("Return the delegation when deleting sillyrenamed files") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/delegation.c | 37 +++++++++++++++++++++++++++++++++++++ fs/nfs/delegation.h | 1 + fs/nfs/nfs4proc.c | 3 +++ 3 files changed, 41 insertions(+) commit 5bbd6e863b15a85221e49b9bdb2d5d8f0bb91f3d Author: Trond Myklebust Date: Sat Feb 1 15:00:02 2025 -0500 SUNRPC: Prevent looping due to rpc_signal_task() races If rpc_signal_task() is called while a task is in an rpc_call_done() callback function, and the latter calls rpc_restart_call(), the task can end up looping due to the RPC_TASK_SIGNALLED flag being set without the tk_rpc_status being set. Removing the redundant mechanism for signalling the task fixes the looping behaviour. Reported-by: Li Lingfeng Fixes: 39494194f93b ("SUNRPC: Fix races with rpc_killall_tasks()") Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker include/linux/sunrpc/sched.h | 3 +-- include/trace/events/sunrpc.h | 3 +-- net/sunrpc/sched.c | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) commit 88025c67fe3c025a0123bc7af50535b97f7af89a Author: Trond Myklebust Date: Sat Feb 1 14:59:03 2025 -0500 NFS: Adjust delegated timestamps for O_DIRECT reads and writes Adjust the timestamps if O_DIRECT is being combined with attribute delegations. Fixes: e12912d94137 ("NFSv4: Add support for delegated atime and mtime attributes") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/direct.c | 4 ++++ 1 file changed, 4 insertions(+) commit fcf857ee1958e9247298251f7615d0c76f1e9b38 Author: Trond Myklebust Date: Sat Feb 1 14:59:02 2025 -0500 NFS: O_DIRECT writes must check and adjust the file length While it is uncommon for delegations to be held while O_DIRECT writes are in progress, it is possible. The xfstests generic/647 and generic/729 both end up triggering that state, and end up failing due to the fact that the file size is not adjusted. Reported-by: Chuck Lever Link: https://bugzilla.kernel.org/show_bug.cgi?id=219738 Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/direct.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 4614de748e78a295ee9b1f54ca87280b101fbdf0 Author: Pavel Begunkov Date: Wed Feb 19 01:33:40 2025 +0000 io_uring/rw: clean up mshot forced sync mode Move code forcing synchronous execution of multishot read requests out a more generic __io_read(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4ad7b928c776d1ad59addb9fff64ef2d1fc474d5.1739919038.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/rw.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 74f3e875268f1ce2dd01029c29560263212077df Author: Pavel Begunkov Date: Wed Feb 19 01:33:39 2025 +0000 io_uring/rw: move ki_complete init into prep Initialise ki_complete during request prep stage, we'll depend on it not being reset during issue in the following patch. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/817624086bd5f0448b08c80623399919fda82f34.1739919038.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/rw.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 4e43133c6f2319d3e205ea986c507b25d9b41e64 Author: Pavel Begunkov Date: Wed Feb 19 01:33:38 2025 +0000 io_uring/rw: don't directly use ki_complete We want to avoid checking ->ki_complete directly in the io_uring completion path. Fortunately we have only two callback the selection of which depend on the ring constant flags, i.e. IOPOLL, so use that to infer the function. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4eb4bdab8cbcf5bc87083f7047edc81e920ab83c.1739919038.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/rw.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 67b0025d19f99fb9fbb8b62e6975553c183f3a16 Author: Pavel Begunkov Date: Wed Feb 19 01:33:37 2025 +0000 io_uring/rw: forbid multishot async reads At the moment we can't sanely handle queuing an async request from a multishot context, so disable them. It shouldn't matter as pollable files / socekts don't normally do async. Patching it in __io_read() is not the cleanest way, but it's simpler than other options, so let's fix it there and clean up on top. Cc: stable@vger.kernel.org Reported-by: chase xd Fixes: fc68fcda04910 ("io_uring/rw: add support for IORING_OP_READ_MULTISHOT") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/7d51732c125159d17db4fe16f51ec41b936973f8.1739919038.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/rw.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 8058b49bf6fff777bf3f47309c7b15dbef2191af Author: Imre Deak Date: Tue Feb 18 00:38:28 2025 +0200 drm/i915/dp: Fix disabling the transcoder function in 128b/132b mode During disabling the transcoder in DP 128b/132b mode (both in case of an MST master transcoder and in case of SST) the transcoder function must be first disabled without changing any other field in the register (in particular leaving the DDI port and mode select fields unchanged) and clearing the DDI port and mode select fields separately, later during the disabling sequences. Fix the sequence accordingly. Bspec: 54128, 65448, 68849 Cc: Jani Nikula Fixes: 79a6734cd56e ("drm/i915/ddi: disable trancoder port select for 128b/132b SST") Signed-off-by: Imre Deak Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20250217223828.1166093-3-imre.deak@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit 2ed653c7b843db0670136330480842d76cb65cd8) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_ddi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b9275eabe31e6679ae12c46a4a0a18d622db4570 Author: Imre Deak Date: Tue Feb 18 00:38:27 2025 +0200 drm/i915/dp: Fix error handling during 128b/132b link training At the end of a 128b/132b link training sequence, the HW expects the transcoder training pattern to be set to TPS2 and from that to normal mode (disabling the training pattern). Transitioning from TPS1 directly to normal mode leaves the transcoder in a stuck state, resulting in page-flip timeouts later in the modeset sequence. Atm, in case of a failure during link training, the transcoder may be still set to output the TPS1 pattern. Later the transcoder is then set from TPS1 directly to normal mode in intel_dp_stop_link_train(), leading to modeset failures later as described above. Fix this by setting the training patter to TPS2, if the link training failed at any point. The clue in the specification about the above HW behavior is the explicit mention that TPS2 must be set after the link training sequence (and there isn't a similar requirement specified for the 8b/10b link training), see the Bspec links below. v2: Add bspec aspect/link to the commit log. (Jani) Bspec: 54128, 65448, 68849 Cc: stable@vger.kernel.org # v5.18+ Cc: Jani Nikula Signed-off-by: Imre Deak Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20250217223828.1166093-2-imre.deak@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit 8b4bbaf8ddc1f68f3ee96a706f65fdb1bcd9d355) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_dp_link_training.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit b9ddb3e1a8aa86c61c4a93e27cf66414f5fa7b6e Author: Kent Overstreet Date: Thu Feb 13 12:43:42 2025 -0500 bcachefs: Fix fsck directory i_size checking Error handling was wrong, causing unhandled transaction restart errors. check_directory_size() was also inefficient, since keys in multiple snapshots would be iterated over once for every snapshot. Convert it to the same scheme used for i_sectors and subdir count checking. Cc: Hongbo Li Signed-off-by: Kent Overstreet fs/bcachefs/fsck.c | 78 ++++++++++++++++++---------------------------- fs/bcachefs/sb-downgrade.c | 2 +- 2 files changed, 32 insertions(+), 48 deletions(-) commit 838c17fd077e611b12c78feb0feee1b30ed09b63 Author: Su Hui Date: Tue Feb 11 09:53:55 2025 +0800 accel/amdxdna: Add missing include linux/slab.h When compiling without CONFIG_IA32_EMULATION, there can be some errors: drivers/accel/amdxdna/amdxdna_mailbox.c: In function ‘mailbox_release_msg’: drivers/accel/amdxdna/amdxdna_mailbox.c:197:2: error: implicit declaration of function ‘kfree’. 197 | kfree(mb_msg); | ^~~~~ drivers/accel/amdxdna/amdxdna_mailbox.c: In function ‘xdna_mailbox_send_msg’: drivers/accel/amdxdna/amdxdna_mailbox.c:418:11: error:implicit declaration of function ‘kzalloc’. 418 | mb_msg = kzalloc(sizeof(*mb_msg) + pkg_size, GFP_KERNEL); | ^~~~~~~ Add the missing include. Fixes: b87f920b9344 ("accel/amdxdna: Support hardware mailbox") Signed-off-by: Su Hui Reviewed-by: Lizhi Hou Reviewed-by: Jeffrey Hugo Signed-off-by: Lizhi Hou Link: https://patchwork.freedesktop.org/patch/msgid/20250211015354.3388171-1-suhui@nfschina.com drivers/accel/amdxdna/amdxdna_mailbox.c | 1 + 1 file changed, 1 insertion(+) commit c84e125fff2615b4d9c259e762596134eddd2f27 Author: Vasiliy Kovalev Date: Sat Feb 15 00:51:48 2025 +0300 ovl: fix UAF in ovl_dentry_update_reval by moving dput() in ovl_link_up The issue was caused by dput(upper) being called before ovl_dentry_update_reval(), while upper->d_flags was still accessed in ovl_dentry_remote(). Move dput(upper) after its last use to prevent use-after-free. BUG: KASAN: slab-use-after-free in ovl_dentry_remote fs/overlayfs/util.c:162 [inline] BUG: KASAN: slab-use-after-free in ovl_dentry_update_reval+0xd2/0xf0 fs/overlayfs/util.c:167 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 ovl_dentry_remote fs/overlayfs/util.c:162 [inline] ovl_dentry_update_reval+0xd2/0xf0 fs/overlayfs/util.c:167 ovl_link_up fs/overlayfs/copy_up.c:610 [inline] ovl_copy_up_one+0x2105/0x3490 fs/overlayfs/copy_up.c:1170 ovl_copy_up_flags+0x18d/0x200 fs/overlayfs/copy_up.c:1223 ovl_rename+0x39e/0x18c0 fs/overlayfs/dir.c:1136 vfs_rename+0xf84/0x20a0 fs/namei.c:4893 ... Fixes: b07d5cc93e1b ("ovl: update of dentry revalidate flags after copy up") Reported-by: syzbot+316db8a1191938280eb6@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=316db8a1191938280eb6 Signed-off-by: Vasiliy Kovalev Link: https://lore.kernel.org/r/20250214215148.761147-1-kovalev@altlinux.org Reviewed-by: Amir Goldstein Signed-off-by: Christian Brauner fs/overlayfs/copy_up.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b587fd128660d48cd2122f870f720ff8e2b4abb3 Author: Pali Rohár Date: Wed Sep 18 00:28:25 2024 +0200 cifs: Treat unhandled directory name surrogate reparse points as mount directory nodes If the reparse point was not handled (indicated by the -EOPNOTSUPP from ops->parse_reparse_point() call) but reparse tag is of type name surrogate directory type, then treat is as a new mount point. Name surrogate reparse point represents another named entity in the system. From SMB client point of view, this another entity is resolved on the SMB server, and server serves its content automatically. Therefore from Linux client point of view, this name surrogate reparse point of directory type crosses mount point. Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/inode.c | 13 +++++++++++++ fs/smb/common/smbfsctl.h | 3 +++ 2 files changed, 16 insertions(+) commit cad3fc0a4c8cef07b07ceddc137f582267577250 Author: Pali Rohár Date: Wed Sep 18 00:16:05 2024 +0200 cifs: Throw -EOPNOTSUPP error on unsupported reparse point type from parse_reparse_point() This would help to track and detect by caller if the reparse point type was processed or not. Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/reparse.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9df23801c83d3e12b4c09be39d37d2be385e52f9 Author: Steve French Date: Sun Feb 16 22:17:54 2025 -0600 smb311: failure to open files of length 1040 when mounting with SMB3.1.1 POSIX extensions If a file size has bits 0x410 = ATTR_DIRECTORY | ATTR_REPARSE set then during queryinfo (stat) the file is regarded as a directory and subsequent opens can fail. A simple test example is trying to open any file 1040 bytes long when mounting with "posix" (SMB3.1.1 POSIX/Linux Extensions). The cause of this bug is that Attributes field in smb2_file_all_info struct occupies the same place that EndOfFile field in smb311_posix_qinfo, and sometimes the latter struct is incorrectly processed as if it was the first one. Reported-by: Oleh Nykyforchyn Tested-by: Oleh Nykyforchyn Acked-by: Paulo Alcantara (Red Hat) Cc: stable@vger.kernel.org Signed-off-by: Steve French fs/smb/client/cifsglob.h | 1 + fs/smb/client/reparse.h | 28 ++++++++++++++++++++++------ fs/smb/client/smb2inode.c | 4 ++++ fs/smb/client/smb2ops.c | 3 ++- 4 files changed, 29 insertions(+), 7 deletions(-) commit 7330195e6018ece3e886177ffbc9349a0b6585e6 Author: Gustavo A. R. Silva Date: Tue Feb 11 20:51:25 2025 +1030 smb: client, common: Avoid multiple -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. So, in order to avoid ending up with flexible-array members in the middle of other structs, we use the `__struct_group()` helper to separate the flexible arrays from the rest of the members in the flexible structures. We then use the newly created tagged `struct smb2_file_link_info_hdr` and `struct smb2_file_rename_info_hdr` to replace the type of the objects causing trouble: `rename_info` and `link_info` in `struct smb2_compound_vars`. We also want to ensure that when new members need to be added to the flexible structures, they are always included within the newly created tagged structs. For this, we use `static_assert()`. This ensures that the memory layout for both the flexible structure and the new tagged struct is the same after any changes. So, with these changes, fix 86 of the following warnings: fs/smb/client/cifsglob.h:2335:36: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] fs/smb/client/cifsglob.h:2334: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 Acked-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/cifsglob.h | 4 ++-- fs/smb/common/smb2pdu.h | 30 ++++++++++++++++++++---------- 2 files changed, 22 insertions(+), 12 deletions(-) commit 954b8915ff86353037d4246c7129d807a75f898b Author: Eddie James Date: Thu Feb 13 16:57:46 2025 -0600 MAINTAINERS: change maintainer for FSI Due to job transitions, both Joel and Jeremy can no longer maintain the FSI subsystem. I will take over. I also replaced Alistair with Ninad as a reviewer, as Alistair doesn't have access to hardware and hasn't been active. I also removed the link to Joel's FSI tree as he won't be maintaining it. Signed-off-by: Eddie James Acked-by: Jeremy Kerr Link: https://lore.kernel.org/r/20250213225746.2159118-1-eajames@linux.ibm.com Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit fb3331f53e3cb1f1505f918f4f33bb0a3a231e4f Author: Caleb Sander Mateos Date: Tue Feb 18 20:34:43 2025 -0700 io_uring/rsrc: remove unused constants IO_NODE_ALLOC_CACHE_MAX has been unused since commit fbbb8e991d86 ("io_uring/rsrc: get rid of io_rsrc_node allocation cache") removed the rsrc_node_cache. IO_RSRC_TAG_TABLE_SHIFT and IO_RSRC_TAG_TABLE_MASK have been unused since commit 7029acd8a950 ("io_uring/rsrc: get rid of per-ring io_rsrc_node list") removed the separate tag table for registered nodes. Signed-off-by: Caleb Sander Mateos Reviewed-by: Li Zetao Link: https://lore.kernel.org/r/20250219033444.2020136-1-csander@purestorage.com Signed-off-by: Jens Axboe io_uring/rsrc.h | 6 ------ 1 file changed, 6 deletions(-) commit fa2e55811ae25020a5e9b23a8932e67e6d6261a4 Author: Mike Lothian Date: Fri Feb 14 12:28:00 2025 +0000 ntsync: Set the permissions to be 0666 This allows ntsync to be usuable by non-root processes out of the box Signed-off-by: Mike Lothian Reviewed-by: Elizabeth Figura Link: https://lore.kernel.org/r/20250214122759.2629-2-mike@fireburn.co.uk Signed-off-by: Greg Kroah-Hartman drivers/misc/ntsync.c | 1 + 1 file changed, 1 insertion(+) commit a321d163de3d8aa38a6449ab2becf4b1581aed96 Author: Manivannan Sadhasivam Date: Wed Jan 8 19:09:27 2025 +0530 bus: mhi: host: pci_generic: Use pci_try_reset_function() to avoid deadlock There are multiple places from where the recovery work gets scheduled asynchronously. Also, there are multiple places where the caller waits synchronously for the recovery to be completed. One such place is during the PM shutdown() callback. If the device is not alive during recovery_work, it will try to reset the device using pci_reset_function(). This function internally will take the device_lock() first before resetting the device. By this time, if the lock has already been acquired, then recovery_work will get stalled while waiting for the lock. And if the lock was already acquired by the caller which waits for the recovery_work to be completed, it will lead to deadlock. This is what happened on the X1E80100 CRD device when the device died before shutdown() callback. Driver core calls the driver's shutdown() callback while holding the device_lock() leading to deadlock. And this deadlock scenario can occur on other paths as well, like during the PM suspend() callback, where the driver core would hold the device_lock() before calling driver's suspend() callback. And if the recovery_work was already started, it could lead to deadlock. This is also observed on the X1E80100 CRD. So to fix both issues, use pci_try_reset_function() in recovery_work. This function first checks for the availability of the device_lock() before trying to reset the device. If the lock is available, it will acquire it and reset the device. Otherwise, it will return -EAGAIN. If that happens, recovery_work will fail with the error message "Recovery failed" as not much could be done. Cc: stable@vger.kernel.org # 5.12 Reported-by: Johan Hovold Closes: https://lore.kernel.org/mhi/Z1me8iaK7cwgjL92@hovoldconsulting.com Fixes: 7389337f0a78 ("mhi: pci_generic: Add suspend/resume/recovery procedure") Reviewed-by: Johan Hovold Tested-by: Johan Hovold Analyzed-by: Johan Hovold Link: https://lore.kernel.org/mhi/Z2KKjWY2mPen6GPL@hovoldconsulting.com/ Reviewed-by: Loic Poulain Link: https://lore.kernel.org/r/20250108-mhi_recovery_fix-v1-1-a0a00a17da46@linaro.org Signed-off-by: Manivannan Sadhasivam drivers/bus/mhi/host/pci_generic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bf4f9ae1cb08ccaafbe6874be6c46f59b83ae778 Author: Fedor Pchelkin Date: Mon Feb 17 13:54:40 2025 +0300 usb: typec: ucsi: increase timeout for PPM reset operations It is observed that on some systems an initial PPM reset during the boot phase can trigger a timeout: [ 6.482546] ucsi_acpi USBC000:00: failed to reset PPM! [ 6.482551] ucsi_acpi USBC000:00: error -ETIMEDOUT: PPM init failed Still, increasing the timeout value, albeit being the most straightforward solution, eliminates the problem: the initial PPM reset may take up to ~8000-10000ms on some Lenovo laptops. When it is reset after the above period of time (or even if ucsi_reset_ppm() is not called overall), UCSI works as expected. Moreover, if the ucsi_acpi module is loaded/unloaded manually after the system has booted, reading the CCI values and resetting the PPM works perfectly, without any timeout. Thus it's only a boot-time issue. The reason for this behavior is not clear but it may be the consequence of some tricks that the firmware performs or be an actual firmware bug. As a workaround, increase the timeout to avoid failing the UCSI initialization prematurely. Fixes: b1b59e16075f ("usb: typec: ucsi: Increase command completion timeout value") Cc: stable Signed-off-by: Fedor Pchelkin Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250217105442.113486-3-boddah8794@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 976e7e9bdc7719a023a4ecccd2e3daec9ab20a40 Author: Christian A. Ehrhardt Date: Mon Feb 17 13:54:39 2025 +0300 acpi: typec: ucsi: Introduce a ->poll_cci method For the ACPI backend of UCSI the UCSI "registers" are just a memory copy of the register values in an opregion. The ACPI implementation in the BIOS ensures that the opregion contents are synced to the embedded controller and it ensures that the registers (in particular CCI) are synced back to the opregion on notifications. While there is an ACPI call that syncs the actual registers to the opregion there is rarely a need to do this and on some ACPI implementations it actually breaks in various interesting ways. The only reason to force a sync from the embedded controller is to poll CCI while notifications are disabled. Only the ucsi core knows if this is the case and guessing based on the current command is suboptimal, i.e. leading to the following spurious assertion splat: WARNING: CPU: 3 PID: 76 at drivers/usb/typec/ucsi/ucsi.c:1388 ucsi_reset_ppm+0x1b4/0x1c0 [typec_ucsi] CPU: 3 UID: 0 PID: 76 Comm: kworker/3:0 Not tainted 6.12.11-200.fc41.x86_64 #1 Hardware name: LENOVO 21D0/LNVNB161216, BIOS J6CN45WW 03/17/2023 Workqueue: events_long ucsi_init_work [typec_ucsi] RIP: 0010:ucsi_reset_ppm+0x1b4/0x1c0 [typec_ucsi] Call Trace: ucsi_init_work+0x3c/0xac0 [typec_ucsi] process_one_work+0x179/0x330 worker_thread+0x252/0x390 kthread+0xd2/0x100 ret_from_fork+0x34/0x50 ret_from_fork_asm+0x1a/0x30 Thus introduce a ->poll_cci() method that works like ->read_cci() with an additional forced sync and document that this should be used when polling with notifications disabled. For all other backends that presumably don't have this issue use the same implementation for both methods. Fixes: fa48d7e81624 ("usb: typec: ucsi: Do not call ACPI _DSM method for UCSI read operations") Cc: stable Signed-off-by: Christian A. Ehrhardt Tested-by: Fedor Pchelkin Signed-off-by: Fedor Pchelkin Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250217105442.113486-2-boddah8794@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi.c | 10 +++++----- drivers/usb/typec/ucsi/ucsi.h | 2 ++ drivers/usb/typec/ucsi/ucsi_acpi.c | 21 ++++++++++++++------- drivers/usb/typec/ucsi/ucsi_ccg.c | 1 + drivers/usb/typec/ucsi/ucsi_glink.c | 1 + drivers/usb/typec/ucsi/ucsi_stm32g0.c | 1 + drivers/usb/typec/ucsi/ucsi_yoga_c630.c | 1 + 7 files changed, 25 insertions(+), 12 deletions(-) commit d6b82dafd17db0658f089b9cdec573982ca82bc5 Author: AngeloGioacchino Del Regno Date: Wed Feb 19 12:47:00 2025 +0100 usb: typec: tcpci_rt1711h: Unmask alert interrupts to fix functionality During probe, the TCPC alert interrupts are getting masked to avoid unwanted interrupts during chip setup: this is ok to do but there is no unmasking happening at any later time, which means that the chip will not raise any interrupt, essentially making it not functional as, while internally it does perform all of the intended functions, it won't signal anything to the outside. Unmask the alert interrupts to fix functionality. Fixes: ce08eaeb6388 ("staging: typec: rt1711h typec chip driver") Cc: stable Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250219114700.41700-1-angelogioacchino.delregno@collabora.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpci_rt1711h.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 40e89ff5750fca2c1d6da93f98a2038716bba86c Author: Prashanth K Date: Mon Feb 17 17:33:28 2025 +0530 usb: gadget: Set self-powered based on MaxPower and bmAttributes Currently the USB gadget will be set as bus-powered based solely on whether its bMaxPower is greater than 100mA, but this may miss devices that may legitimately draw less than 100mA but still want to report as bus-powered. Similarly during suspend & resume, USB gadget is incorrectly marked as bus/self powered without checking the bmAttributes field. Fix these by configuring the USB gadget as self or bus powered based on bmAttributes, and explicitly set it as bus-powered if it draws more than 100mA. Cc: stable Fixes: 5e5caf4fa8d3 ("usb: gadget: composite: Inform controller driver of self-powered") Signed-off-by: Prashanth K Link: https://lore.kernel.org/r/20250217120328.2446639-1-prashanth.k@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/composite.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 17c2c87c37862c3e95b55f660681cc6e8d66660e Author: Prashanth K Date: Wed Feb 12 15:38:40 2025 +0530 usb: gadget: u_ether: Set is_suspend flag if remote wakeup fails Currently while UDC suspends, u_ether attempts to remote wakeup the host if there are any pending transfers. However, if remote wakeup fails, the UDC remains suspended but the is_suspend flag is not set. And since is_suspend flag isn't set, the subsequent eth_start_xmit() would queue USB requests to suspended UDC. To fix this, bail out from gether_suspend() only if remote wakeup operation is successful. Cc: stable Fixes: 0a1af6dfa077 ("usb: gadget: f_ecm: Add suspend/resume and remote wakeup support") Signed-off-by: Prashanth K Link: https://lore.kernel.org/r/20250212100840.3812153-1-prashanth.k@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/u_ether.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c90aad369899a607cfbc002bebeafd51e31900cd Author: Nikita Zhandarovich Date: Thu Feb 13 15:22:57 2025 +0300 usb: atm: cxacru: fix a flaw in existing endpoint checks Syzbot once again identified a flaw in usb endpoint checking, see [1]. This time the issue stems from a commit authored by me (2eabb655a968 ("usb: atm: cxacru: fix endpoint checking in cxacru_bind()")). While using usb_find_common_endpoints() may usually be enough to discard devices with wrong endpoints, in this case one needs more than just finding and identifying the sufficient number of endpoints of correct types - one needs to check the endpoint's address as well. Since cxacru_bind() fills URBs with CXACRU_EP_CMD address in mind, switch the endpoint verification approach to usb_check_XXX_endpoints() instead to fix incomplete ep testing. [1] Syzbot report: usb 5-1: BOGUS urb xfer, pipe 3 != type 1 WARNING: CPU: 0 PID: 1378 at drivers/usb/core/urb.c:504 usb_submit_urb+0xc4e/0x18c0 drivers/usb/core/urb.c:503 ... RIP: 0010:usb_submit_urb+0xc4e/0x18c0 drivers/usb/core/urb.c:503 ... Call Trace: cxacru_cm+0x3c8/0xe50 drivers/usb/atm/cxacru.c:649 cxacru_card_status drivers/usb/atm/cxacru.c:760 [inline] cxacru_bind+0xcf9/0x1150 drivers/usb/atm/cxacru.c:1223 usbatm_usb_probe+0x314/0x1d30 drivers/usb/atm/usbatm.c:1058 cxacru_usb_probe+0x184/0x220 drivers/usb/atm/cxacru.c:1377 usb_probe_interface+0x641/0xbb0 drivers/usb/core/driver.c:396 really_probe+0x2b9/0xad0 drivers/base/dd.c:658 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:800 driver_probe_device+0x50/0x430 drivers/base/dd.c:830 ... Reported-and-tested-by: syzbot+ccbbc229a024fa3e13b5@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=ccbbc229a024fa3e13b5 Fixes: 2eabb655a968 ("usb: atm: cxacru: fix endpoint checking in cxacru_bind()") Cc: stable@kernel.org Signed-off-by: Nikita Zhandarovich Link: https://lore.kernel.org/r/20250213122259.730772-1-n.zhandarovich@fintech.ru Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/cxacru.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit fdb1ada57cf8b8752cdf54f08709d76d74999544 Author: Hans de Goede Date: Fri Feb 14 22:24:25 2025 +0100 mei: vsc: Use "wakeuphostint" when getting the host wakeup GPIO The _CRS ACPI resources table has 2 entries for the host wakeup GPIO, the first one being a regular GpioIo () resource while the second one is a GpioInt () resource for the same pin. The acpi_gpio_mapping table used by vsc-tp.c maps the first Gpio () resource to "wakeuphost-gpios" where as the second GpioInt () entry is mapped to "wakeuphostint-gpios". Using "wakeuphost" to request the GPIO as was done until now, means that the gpiolib-acpi code does not know that the GPIO is active-low as that info is only available in the GpioInt () entry. Things were still working before due to the following happening: 1. Since the 2 entries point to the same pin they share a struct gpio_desc 2. The SPI core creates the SPI device vsc-tp.c binds to and calls acpi_dev_gpio_irq_get(). This does use the second entry and sets FLAG_ACTIVE_LOW in gpio_desc.flags . 3. vsc_tp_probe() requests the "wakeuphost" GPIO and inherits the active-low flag set by acpi_dev_gpio_irq_get() But there is a possible scenario where things do not work: 1. - 3. happen as above 4. After requesting the "wakeuphost" GPIO, the "resetfw" GPIO is requested next, but its USB GPIO controller is not available yet, so this call returns -EPROBE_DEFER. 5. The gpio_desc for "wakeuphost" is put() and during this the active-low flag is cleared from gpio_desc.flags . 6. Later on vsc_tp_probe() requests the "wakeuphost" GPIO again, but now it is not marked active-low. The difference can also be seen in /sys/kernel/debug/gpio, which contains the following line for this GPIO: gpio-535 ( |wakeuphost ) in hi IRQ ACTIVE LOW If the second scenario is hit the "ACTIVE LOW" at the end disappears and things do not work. Fix this by requesting the GPIO through the "wakeuphostint" mapping instead which provides active-low info without relying on acpi_dev_gpio_irq_get() pre-populating this info in the gpio_desc. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2316918 Signed-off-by: Hans de Goede Reviewed-by: Stanislaw Gruszka Tested-by: Sakari Ailus Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device") Cc: stable Link: https://lore.kernel.org/r/20250214212425.84021-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/vsc-tp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8e8ffcc3afce2ee5fb70162aeaef3f03573ee1e Author: Alexander Usyskin Date: Sun Feb 9 13:05:50 2025 +0200 mei: me: add panther lake P DID Add Panther Lake P device id. Cc: stable Co-developed-by: Tomas Winkler Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Link: https://lore.kernel.org/r/20250209110550.1582982-1-alexander.usyskin@intel.com Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/hw-me-regs.h | 2 ++ drivers/misc/mei/pci-me.c | 2 ++ 2 files changed, 4 insertions(+) commit 1dbf60277e9b6181d2366a94c974728106cdd551 Merge: 60255f3704fd 539bd2035283 Author: Miquel Raynal Date: Wed Feb 19 14:38:47 2025 +0100 Merge tag 'spi-nor/fixes-for-6.14-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/fixes Fix writes on SST flashes Commit 18bcb4aa54ea ("mtd: spi-nor: sst: Factor out common write operation to `sst_nor_write_data()`") introduced a bug where only one byte of data is written, regardless of the number of bytes requested. This causes the driver to use the incorrect write size for flashes using the SST byte programming, and to spit out a warning. # -----BEGIN PGP SIGNATURE----- # # iIoEABYIADIWIQQTlUWNzXGEo3bFmyIR4drqP028CQUCZ7NEiBQccHJhdHl1c2hA # a2VybmVsLm9yZwAKCRAR4drqP028CTVnAP9krBOLfmlYO94PntaDscgjcehnxbuF # PEQby8/KlEnX0gEA5K73/0oQIZUnHQ98E6ntAtKoYD5zGNAJaYDpw+66CAU= # =5xea # -----END PGP SIGNATURE----- # gpg: Signature made Mon 17 Feb 2025 03:15:36 PM CET # gpg: using EDDSA key 1395458DCD7184A376C59B2211E1DAEA3F4DBC09 # gpg: issuer "pratyush@kernel.org" # gpg: Good signature from "Pratyush Yadav " [expired] # gpg: aka "Pratyush Yadav " [expired] # gpg: issuer "pratyush@kernel.org" does not match any User ID # gpg: WARNING: The key's User ID is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 805C 3923 2FBE 108C 49E1 663C F650 3556 C11B 1CCD # Subkey fingerprint: 1395 458D CD71 84A3 76C5 9B22 11E1 DAEA 3F4D BC09 commit 60255f3704fde70ed3c4d62f919aa4b46f841f70 Author: Niravkumar L Rabara Date: Sun Feb 16 11:15:36 2025 +0800 mtd: rawnand: cadence: fix unchecked dereference Add NULL check before variable dereference to fix static checker warning. Fixes: d76d22b5096c ("mtd: rawnand: cadence: use dma_map_resource for sdma address") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/e448a22c-bada-448d-9167-7af71305130d@stanley.mountain/ Signed-off-by: Niravkumar L Rabara Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/cadence-nand-controller.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6586788f0a8d0f3b33b1383885575f5b5f7b9dad Author: Karol Herbst Date: Sat Feb 15 08:37:53 2025 +0100 MAINTAINERS: Remove myself I was pondering with myself for a while if I should just make it official that I'm not really involved in the kernel community anymore, neither as a reviewer, nor as a maintainer. Most of the time I simply excused myself with "if something urgent comes up, I can chime in and help out". Lyude and Danilo are doing a wonderful job and I've put all my trust into them. However, there is one thing I can't stand and it's hurting me the most. I'm convinced, no, my core believe is, that inclusivity and respect, working with others as equals, no power plays involved, is how we should work together within the Free and Open Source community. I can understand maintainers needing to learn, being concerned on technical points. Everybody deserves the time to understand and learn. It is my true belief that most people are capable of change eventually. I truly believe this community can change from within, however this doesn't mean it's going to be a smooth process. The moment I made up my mind about this was reading the following words written by a maintainer within the kernel community: "we are the thin blue line" This isn't okay. This isn't creating an inclusive environment. This isn't okay with the current political situation especially in the US. A maintainer speaking those words can't be kept. No matter how important or critical or relevant they are. They need to be removed until they learn. Learn what those words mean for a lot of marginalized people. Learn about what horrors it evokes in their minds. I can't in good faith remain to be part of a project and its community where those words are tolerated. Those words are not technical, they are a political statement. Even if unintentionally, such words carry power, they carry meanings one needs to be aware of. They do cause an immense amount of harm. I wish the best of luck for everybody to continue to try to work from within. You got my full support and I won't hold it against anybody trying to improve the community, it's a thankless job, it's a lot of work. People will continue to burn out. I got burned out enough by myself caring about the bits I maintained, but eventually I had to realize my limits. The obligation I felt was eating me from inside. It stopped being fun at some point and I reached a point where I simply couldn't continue the work I was so motivated doing as I've did in the early days. Please respect my wishes and put this statement as is into the tree. Leaving anything out destroys its entire meaning. Respectfully Karol Signed-off-by: Karol Herbst Acked-by: Masami Hiramatsu (Google) Acked-by: Steven Rostedt (Google) Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20250215073753.1217002-2-kherbst@redhat.com MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) commit 3dbc0215e3c502a9f3221576da0fdc9847fb9721 Author: Aaron Kling Date: Tue Feb 18 03:28:03 2025 -0600 drm/nouveau/pmu: Fix gp10b firmware guard Most kernel configs enable multiple Tegra SoC generations, causing this typo to go unnoticed. But in the case where a kernel config is strictly for Tegra186, this is a problem. Fixes: 989863d7cbe5 ("drm/nouveau/pmu: select implementation based on available firmware") Signed-off-by: Aaron Kling Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20250218-nouveau-gm10b-guard-v2-1-a4de71500d48@gmail.com drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07583a0010696a17fb0942e0b499a62785c5fc9f Author: Zhang Lixu Date: Tue Feb 18 14:37:30 2025 +0800 HID: intel-ish-hid: Fix use-after-free issue in ishtp_hid_remove() The system can experience a random crash a few minutes after the driver is removed. This issue occurs due to improper handling of memory freeing in the ishtp_hid_remove() function. The function currently frees the `driver_data` directly within the loop that destroys the HID devices, which can lead to accessing freed memory. Specifically, `hid_destroy_device()` uses `driver_data` when it calls `hid_ishtp_set_feature()` to power off the sensor, so freeing `driver_data` beforehand can result in accessing invalid memory. This patch resolves the issue by storing the `driver_data` in a temporary variable before calling `hid_destroy_device()`, and then freeing the `driver_data` after the device is destroyed. Fixes: 0b28cb4bcb17 ("HID: intel-ish-hid: ISH HID client driver") Signed-off-by: Zhang Lixu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp-hid.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 823987841424289339fdb4ba90e6d2c3792836db Author: Zhang Lixu Date: Tue Feb 18 14:37:29 2025 +0800 HID: intel-ish-hid: Fix use-after-free issue in hid_ishtp_cl_remove() During the `rmmod` operation for the `intel_ishtp_hid` driver, a use-after-free issue can occur in the hid_ishtp_cl_remove() function. The function hid_ishtp_cl_deinit() is called before ishtp_hid_remove(), which can lead to accessing freed memory or resources during the removal process. Call Trace: ? ishtp_cl_send+0x168/0x220 [intel_ishtp] ? hid_output_report+0xe3/0x150 [hid] hid_ishtp_set_feature+0xb5/0x120 [intel_ishtp_hid] ishtp_hid_request+0x7b/0xb0 [intel_ishtp_hid] hid_hw_request+0x1f/0x40 [hid] sensor_hub_set_feature+0x11f/0x190 [hid_sensor_hub] _hid_sensor_power_state+0x147/0x1e0 [hid_sensor_trigger] hid_sensor_runtime_resume+0x22/0x30 [hid_sensor_trigger] sensor_hub_remove+0xa8/0xe0 [hid_sensor_hub] hid_device_remove+0x49/0xb0 [hid] hid_destroy_device+0x6f/0x90 [hid] ishtp_hid_remove+0x42/0x70 [intel_ishtp_hid] hid_ishtp_cl_remove+0x6b/0xb0 [intel_ishtp_hid] ishtp_cl_device_remove+0x4a/0x60 [intel_ishtp] ... Additionally, ishtp_hid_remove() is a HID level power off, which should occur before the ISHTP level disconnect. This patch resolves the issue by reordering the calls in hid_ishtp_cl_remove(). The function ishtp_hid_remove() is now called before hid_ishtp_cl_deinit(). Fixes: f645a90e8ff7 ("HID: intel-ish-hid: ishtp-hid-client: use helper functions for connection") Signed-off-by: Zhang Lixu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ishtp-hid-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bd0725c09f377ffaf22b834241f6c050742e4fc Author: Yu-Chun Lin Date: Tue Feb 18 00:50:13 2025 +0800 HID: google: fix unused variable warning under !CONFIG_ACPI As reported by the kernel test robot, the following warning occurs: >> drivers/hid/hid-google-hammer.c:261:36: warning: 'cbas_ec_acpi_ids' defined but not used [-Wunused-const-variable=] 261 | static const struct acpi_device_id cbas_ec_acpi_ids[] = { | ^~~~~~~~~~~~~~~~ The 'cbas_ec_acpi_ids' array is only used when CONFIG_ACPI is enabled. Wrapping its definition and 'MODULE_DEVICE_TABLE' in '#ifdef CONFIG_ACPI' prevents a compiler warning when ACPI is disabled. Fixes: eb1aac4c8744f75 ("HID: google: add support tablet mode switch for Whiskers") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501201141.jctFH5eB-lkp@intel.com/ Signed-off-by: Yu-Chun Lin Signed-off-by: Jiri Kosina drivers/hid/hid-google-hammer.c | 2 ++ 1 file changed, 2 insertions(+) commit 44afc10d4678d5a3a4ab8c25750be00f037298cf Author: Ryan McClelland Date: Thu Jan 16 22:49:24 2025 -0800 HID: nintendo: fix gencon button events map This fixes the button event map to match the 3-button recommendation as well as the redundant 'z' in the button map events for the Sega MD/Gen 6 Button. Signed-off-by: Ryan McClelland Reviewed-by: Daniel J. Ogorchock Signed-off-by: Jiri Kosina drivers/hid/hid-nintendo.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 8821f36333e27c8355d4a730649923f938e1e4b9 Author: Natalie Vock Date: Mon Jan 27 16:27:52 2025 +0100 cgroup/dmem: Don't open-code css_for_each_descendant_pre The current implementation has a bug: If the current css doesn't contain any pool that is a descendant of the "pool" (i.e. when found_descendant == false), then "pool" will point to some unrelated pool. If the current css has a child, we'll overwrite parent_pool with this unrelated pool on the next iteration. Since we can just check whether a pool refers to the same region to determine whether or not it's related, all the additional pool tracking is unnecessary, so just switch to using css_for_each_descendant_pre for traversal. Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") Signed-off-by: Friedrich Vock Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20250127152754.21325-1-friedrich.vock@gmx.de Signed-off-by: Maarten Lankhorst kernel/cgroup/dmem.c | 50 +++++++++++--------------------------------------- 1 file changed, 11 insertions(+), 39 deletions(-) commit eff2eb592efd73f00590d578c3d6021f604df62c Author: Andrew Donnellan Date: Wed Feb 19 17:48:07 2025 +1100 cxl: Fix cross-reference in documentation and add deprecation warning commit 5731d41af924 ("cxl: Deprecate driver") labelled the cxl driver as deprecated and moved the ABI documentation to the obsolete/ subdirectory, but didn't update cxl.rst, causing a warning once ff7ff6eb4f809 ("docs: media: Allow creating cross-references for RC ABI") was merged. Fix the cross-reference, and also add a deprecation warning. Fixes: 5731d41af924 ("cxl: Deprecate driver") Reported-by: Bagas Sanjaya Signed-off-by: Andrew Donnellan Acked-by: Bagas Sanjaya Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250219064807.175107-1-ajd@linux.ibm.com Documentation/arch/powerpc/cxl.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a92c3228766429fe175ecc815f895043ea505587 Merge: f6093c5ec74d d4c6bfc83936 Author: Jakub Kicinski Date: Tue Feb 18 18:33:31 2025 -0800 Merge branch 'net-fix-race-of-rtnl_net_lock-dev_net-dev' Kuniyuki Iwashima says: ==================== net: Fix race of rtnl_net_lock(dev_net(dev)). Yael Chemla reported that commit 7fb1073300a2 ("net: Hold rtnl_net_lock() in (un)?register_netdevice_notifier_dev_net().") started to trigger KASAN's use-after-free splat. The problem is that dev_net(dev) fetched before rtnl_net_lock() might be different after rtnl_net_lock(). The patch 2 fixes the issue by checking dev_net(dev) after rtnl_net_lock(), and the patch 3 fixes the same potential issue that would emerge once RTNL is removed. v4: https://lore.kernel.org/20250212064206.18159-1-kuniyu@amazon.com v3: https://lore.kernel.org/20250211051217.12613-1-kuniyu@amazon.com v2: https://lore.kernel.org/20250207044251.65421-1-kuniyu@amazon.com v1: https://lore.kernel.org/20250130232435.43622-1-kuniyu@amazon.com ==================== Link: https://patch.msgid.link/20250217191129.19967-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit d4c6bfc83936cb61fac99e9891c406fbdd40f964 Author: Kuniyuki Iwashima Date: Mon Feb 17 11:11:29 2025 -0800 dev: Use rtnl_net_dev_lock() in unregister_netdev(). The following sequence is basically illegal when dev was fetched without lookup because dev_net(dev) might be different after holding rtnl_net_lock(): net = dev_net(dev); rtnl_net_lock(net); Let's use rtnl_net_dev_lock() in unregister_netdev(). Note that there is no real bug in unregister_netdev() for now because RTNL protects the scope even if dev_net(dev) is changed before/after RTNL. Fixes: 00fb9823939e ("dev: Hold per-netns RTNL in (un)?register_netdev().") Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250217191129.19967-4-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/core/dev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 65161fb544aada499c912b6010a8f7d8e04f6130 Author: Kuniyuki Iwashima Date: Mon Feb 17 11:11:28 2025 -0800 net: Fix dev_net(dev) race in unregister_netdevice_notifier_dev_net(). After the cited commit, dev_net(dev) is fetched before holding RTNL and passed to __unregister_netdevice_notifier_net(). However, dev_net(dev) might be different after holding RTNL. In the reported case [0], while removing a VF device, its netns was being dismantled and the VF was moved to init_net. So the following sequence is basically illegal when dev was fetched without lookup: net = dev_net(dev); rtnl_net_lock(net); Let's use a new helper rtnl_net_dev_lock() to fix the race. It fetches dev_net_rcu(dev), bumps its net->passive, and checks if dev_net_rcu(dev) is changed after rtnl_net_lock(). [0]: BUG: KASAN: slab-use-after-free in notifier_call_chain (kernel/notifier.c:75 (discriminator 2)) Read of size 8 at addr ffff88810cefb4c8 by task test-bridge-lag/21127 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl (lib/dump_stack.c:123) print_report (mm/kasan/report.c:379 mm/kasan/report.c:489) kasan_report (mm/kasan/report.c:604) notifier_call_chain (kernel/notifier.c:75 (discriminator 2)) call_netdevice_notifiers_info (net/core/dev.c:2011) unregister_netdevice_many_notify (net/core/dev.c:11551) unregister_netdevice_queue (net/core/dev.c:11487) unregister_netdev (net/core/dev.c:11635) mlx5e_remove (drivers/net/ethernet/mellanox/mlx5/core/en_main.c:6552 drivers/net/ethernet/mellanox/mlx5/core/en_main.c:6579) mlx5_core auxiliary_bus_remove (drivers/base/auxiliary.c:230) device_release_driver_internal (drivers/base/dd.c:1275 drivers/base/dd.c:1296) bus_remove_device (./include/linux/kobject.h:193 drivers/base/base.h:73 drivers/base/bus.c:583) device_del (drivers/base/power/power.h:142 drivers/base/core.c:3855) mlx5_rescan_drivers_locked (./include/linux/auxiliary_bus.h:241 drivers/net/ethernet/mellanox/mlx5/core/dev.c:333 drivers/net/ethernet/mellanox/mlx5/core/dev.c:535 drivers/net/ethernet/mellanox/mlx5/core/dev.c:549) mlx5_core mlx5_unregister_device (drivers/net/ethernet/mellanox/mlx5/core/dev.c:468) mlx5_core mlx5_uninit_one (./include/linux/instrumented.h:68 ./include/asm-generic/bitops/instrumented-non-atomic.h:141 drivers/net/ethernet/mellanox/mlx5/core/main.c:1563) mlx5_core remove_one (drivers/net/ethernet/mellanox/mlx5/core/main.c:965 drivers/net/ethernet/mellanox/mlx5/core/main.c:2019) mlx5_core pci_device_remove (./include/linux/pm_runtime.h:129 drivers/pci/pci-driver.c:475) device_release_driver_internal (drivers/base/dd.c:1275 drivers/base/dd.c:1296) unbind_store (drivers/base/bus.c:245) kernfs_fop_write_iter (fs/kernfs/file.c:338) vfs_write (fs/read_write.c:587 (discriminator 1) fs/read_write.c:679 (discriminator 1)) ksys_write (fs/read_write.c:732) do_syscall_64 (arch/x86/entry/common.c:52 (discriminator 1) arch/x86/entry/common.c:83 (discriminator 1)) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) RIP: 0033:0x7f6a4d5018b7 Fixes: 7fb1073300a2 ("net: Hold rtnl_net_lock() in (un)?register_netdevice_notifier_dev_net().") Reported-by: Yael Chemla Closes: https://lore.kernel.org/netdev/146eabfe-123c-4970-901e-e961b4c09bc3@nvidia.com/ Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250217191129.19967-3-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/core/dev.c | 48 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) commit e57a6320215c3967f51ab0edeff87db2095440e4 Author: Kuniyuki Iwashima Date: Mon Feb 17 11:11:27 2025 -0800 net: Add net_passive_inc() and net_passive_dec(). net_drop_ns() is NULL when CONFIG_NET_NS is disabled. The next patch introduces a function that increments and decrements net->passive. As a prep, let's rename and export net_free() to net_passive_dec() and add net_passive_inc(). Suggested-by: Eric Dumazet Link: https://lore.kernel.org/netdev/CANn89i+oUCt2VGvrbrweniTendZFEh+nwS=uonc004-aPkWy-Q@mail.gmail.com/ Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250217191129.19967-2-kuniyu@amazon.com Signed-off-by: Jakub Kicinski include/net/net_namespace.h | 11 +++++++++++ net/core/net_namespace.c | 8 ++++---- 2 files changed, 15 insertions(+), 4 deletions(-) commit f6093c5ec74d5cc495f89bd359253d9c738d04d9 Author: Kory Maincent Date: Mon Feb 17 14:48:11 2025 +0100 net: pse-pd: pd692x0: Fix power limit retrieval Fix incorrect data offset read in the pd692x0_pi_get_pw_limit callback. The issue was previously unnoticed as it was only used by the regulator API and not thoroughly tested, since the PSE is mainly controlled via ethtool. The function became actively used by ethtool after commit 3e9dbfec4998 ("net: pse-pd: Split ethtool_get_status into multiple callbacks"), which led to the discovery of this issue. Fix it by using the correct data offset. Fixes: a87e699c9d33 ("net: pse-pd: pd692x0: Enhance with new current limit and voltage read callbacks") Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20250217134812.1925345-1-kory.maincent@bootlin.com Signed-off-by: Jakub Kicinski drivers/net/pse-pd/pd692x0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f56be7f52ece7fc8c16a58ca9683f0a73e288e1 Author: Jakub Kicinski Date: Sat Feb 15 08:26:46 2025 -0800 MAINTAINERS: trim the GVE entry We requested in the past that GVE patches coming out of Google should be submitted only by GVE maintainers. There were too many patches posted which didn't follow the subsystem guidance. Recently Joshua was added to maintainers, but even tho he was asked to follow the netdev "FAQ" in the past [1] he does not follow the local customs. It is not reasonable for a person who hasn't read the maintainer entry for the subsystem to be a driver maintainer. We can re-add once Joshua does some on-list reviews to prove the fluency with the upstream process. Link: https://lore.kernel.org/20240610172720.073d5912@kernel.org # [1] Link: https://patch.msgid.link/20250215162646.2446559-1-kuba@kernel.org Signed-off-by: Jakub Kicinski MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 415cadd505464d9a11ff5e0f6e0329c127849da5 Author: Joshua Washington Date: Fri Feb 14 14:43:59 2025 -0800 gve: set xdp redirect target only when it is available Before this patch the NETDEV_XDP_ACT_NDO_XMIT XDP feature flag is set by default as part of driver initialization, and is never cleared. However, this flag differs from others in that it is used as an indicator for whether the driver is ready to perform the ndo_xdp_xmit operation as part of an XDP_REDIRECT. Kernel helpers xdp_features_(set|clear)_redirect_target exist to convey this meaning. This patch ensures that the netdev is only reported as a redirect target when XDP queues exist to forward traffic. Fixes: 39a7f4aa3e4a ("gve: Add XDP REDIRECT support for GQI-QPL format") Cc: stable@vger.kernel.org Reviewed-by: Praveen Kaligineedi Reviewed-by: Jeroen de Borst Signed-off-by: Joshua Washington Link: https://patch.msgid.link/20250214224417.1237818-1-joshwash@google.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/google/gve/gve.h | 10 ++++++++++ drivers/net/ethernet/google/gve/gve_main.c | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) commit 4fa382be430421e1445f9c95c4dc9b7e0949ae8a Author: Bart Van Assche Date: Fri Feb 14 14:43:44 2025 -0800 scsi: ufs: core: Fix ufshcd_is_ufs_dev_busy() and ufshcd_eh_timed_out() ufshcd_is_ufs_dev_busy(), ufshcd_print_host_state() and ufshcd_eh_timed_out() are used in both modes (legacy mode and MCQ mode). hba->outstanding_reqs only represents the outstanding requests in legacy mode. Hence, change hba->outstanding_reqs into scsi_host_busy(hba->host) in these functions. Fixes: eacb139b77ff ("scsi: ufs: core: mcq: Enable multi-circular queue") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20250214224352.3025151-1-bvanassche@acm.org Reviewed-by: Peter Wang Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dbf7cc560007c8624ba42bbda369eca2973fc2da Merge: 8784714d7f27 d66b7739176d Author: Alexei Starovoitov Date: Tue Feb 18 17:27:37 2025 -0800 Merge branch 'bpf-skip-non-exist-keys-in-generic_map_lookup_batch' Yan Zhai says: ==================== bpf: skip non exist keys in generic_map_lookup_batch The generic_map_lookup_batch currently returns EINTR if it fails with ENOENT and retries several times on bpf_map_copy_value. The next batch would start from the same location, presuming it's a transient issue. This is incorrect if a map can actually have "holes", i.e. "get_next_key" can return a key that does not point to a valid value. At least the array of maps type may contain such holes legitly. Right now these holes show up, generic batch lookup cannot proceed any more. It will always fail with EINTR errors. This patch fixes this behavior by skipping the non-existing key, and does not return EINTR any more. V2->V3: deleted a unused macro V1->V2: split the fix and selftests; fixed a few selftests issues. V2: https://lore.kernel.org/bpf/cover.1738905497.git.yan@cloudflare.com/ V1: https://lore.kernel.org/bpf/Z6OYbS4WqQnmzi2z@debian.debian/ ==================== Link: https://patch.msgid.link/cover.1739171594.git.yan@cloudflare.com Signed-off-by: Alexei Starovoitov commit d66b7739176d513b81db8b18e8677e30f1b67574 Author: Yan Zhai Date: Sun Feb 9 23:22:39 2025 -0800 selftests: bpf: test batch lookup on array of maps with holes Iterating through array of maps may encounter non existing keys. The batch operation should not fail on when this happens. Signed-off-by: Yan Zhai Acked-by: Hou Tao Link: https://lore.kernel.org/r/9007237b9606dc2ee44465a4447fe46e13f3bea6.1739171594.git.yan@cloudflare.com Signed-off-by: Alexei Starovoitov .../selftests/bpf/map_tests/map_in_map_batch_ops.c | 62 +++++++++++++++------- 1 file changed, 44 insertions(+), 18 deletions(-) commit 5644c6b50ffee0a56c1e01430a8c88e34decb120 Author: Yan Zhai Date: Sun Feb 9 23:22:35 2025 -0800 bpf: skip non exist keys in generic_map_lookup_batch The generic_map_lookup_batch currently returns EINTR if it fails with ENOENT and retries several times on bpf_map_copy_value. The next batch would start from the same location, presuming it's a transient issue. This is incorrect if a map can actually have "holes", i.e. "get_next_key" can return a key that does not point to a valid value. At least the array of maps type may contain such holes legitly. Right now these holes show up, generic batch lookup cannot proceed any more. It will always fail with EINTR errors. Rather, do not retry in generic_map_lookup_batch. If it finds a non existing element, skip to the next key. This simple solution comes with a price that transient errors may not be recovered, and the iteration might cycle back to the first key under parallel deletion. For example, Hou Tao pointed out a following scenario: For LPM trie map: (1) ->map_get_next_key(map, prev_key, key) returns a valid key (2) bpf_map_copy_value() return -ENOMENT It means the key must be deleted concurrently. (3) goto next_key It swaps the prev_key and key (4) ->map_get_next_key(map, prev_key, key) again prev_key points to a non-existing key, for LPM trie it will treat just like prev_key=NULL case, the returned key will be duplicated. With the retry logic, the iteration can continue to the key next to the deleted one. But if we directly skip to the next key, the iteration loop would restart from the first key for the lpm_trie type. However, not all races may be recovered. For example, if current key is deleted after instead of before bpf_map_copy_value, or if the prev_key also gets deleted, then the loop will still restart from the first key for lpm_tire anyway. For generic lookup it might be better to stay simple, i.e. just skip to the next key. To guarantee that the output keys are not duplicated, it is better to implement map type specific batch operations, which can properly lock the trie and synchronize with concurrent mutators. Fixes: cb4d03ab499d ("bpf: Add generic support for lookup batch op") Closes: https://lore.kernel.org/bpf/Z6JXtA1M5jAZx8xD@debian.debian/ Signed-off-by: Yan Zhai Acked-by: Hou Tao Link: https://lore.kernel.org/r/85618439eea75930630685c467ccefeac0942e2b.1739171594.git.yan@cloudflare.com Signed-off-by: Alexei Starovoitov kernel/bpf/syscall.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit f5da7c45188eea71394bf445655cae2df88a7788 Author: Jakub Kicinski Date: Mon Feb 17 15:29:05 2025 -0800 tcp: adjust rcvq_space after updating scaling ratio Since commit under Fixes we set the window clamp in accordance to newly measured rcvbuf scaling_ratio. If the scaling_ratio decreased significantly we may put ourselves in a situation where windows become smaller than rcvq_space, preventing tcp_rcv_space_adjust() from increasing rcvbuf. The significant decrease of scaling_ratio is far more likely since commit 697a6c8cec03 ("tcp: increase the default TCP scaling ratio"), which increased the "default" scaling ratio from ~30% to 50%. Hitting the bad condition depends a lot on TCP tuning, and drivers at play. One of Meta's workloads hits it reliably under following conditions: - default rcvbuf of 125k - sender MTU 1500, receiver MTU 5000 - driver settles on scaling_ratio of 78 for the config above. Initial rcvq_space gets calculated as TCP_INIT_CWND * tp->advmss (10 * 5k = 50k). Once we find out the true scaling ratio and MSS we clamp the windows to 38k. Triggering the condition also depends on the message sequence of this workload. I can't repro the problem with simple iperf or TCP_RR-style tests. Fixes: a2cbb1603943 ("tcp: Update window clamping condition") Reviewed-by: Eric Dumazet Reviewed-by: Neal Cardwell Link: https://patch.msgid.link/20250217232905.3162187-1-kuba@kernel.org Signed-off-by: Jakub Kicinski net/ipv4/tcp_input.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 1fc61eeefe10d9996d2b875214d89f0909d03417 Author: Jens Axboe Date: Tue Feb 18 16:47:40 2025 -0700 io_uring: fix spelling error in uapi io_uring.h This is obviously not that important, but when changes are synced back from the kernel to liburing, the codespell CI ends up erroring because of this misspelling. Let's just correct it and avoid this biting us again on an import. Signed-off-by: Jens Axboe include/uapi/linux/io_uring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 213e24250feed3bcf58d7594298df2d7e78a88ab Author: Lucas De Marchi Date: Tue Jan 28 07:42:42 2025 -0800 drm/xe/guc: Fix size_t print format Use %zx format to print size_t to remove the following warning when building for i386: >> drivers/gpu/drm/xe/xe_guc_ct.c:1727:43: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] 1727 | drm_printf(p, "[CTB].length: 0x%lx\n", snapshot->ctb_size); | ~~~ ^~~~~~~~~~~~~~~~~~ | %zx Cc: José Roberto de Souza Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501281627.H6nj184e-lkp@intel.com/ Fixes: 643f209ba3fd ("drm/xe: Make GUC binaries dump consistent with other binaries in devcoredump") Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20250128154242.3371687-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 7748289df510638ba61fed86b59ce7d2fb4a194c) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_guc_ct.c | 2 +- drivers/gpu/drm/xe/xe_guc_log.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0c28e4d1e10d2aae608094620bb386e6fd73d55e Author: Stuart Hayhurst Date: Thu Feb 13 13:38:49 2025 +0000 HID: corsair-void: Update power supply values with a unified work handler corsair_void_process_receiver can be called from an interrupt context, locking battery_mutex in it was causing a kernel panic. Fix it by moving the critical section into its own work, sharing this work with battery_add_work and battery_remove_work to remove the need for any locking Closes: https://bugzilla.suse.com/show_bug.cgi?id=1236843 Fixes: 6ea2a6fd3872 ("HID: corsair-void: Add Corsair Void headset family driver") Cc: stable@vger.kernel.org Signed-off-by: Stuart Hayhurst Reviewed-by: Jiri Slaby Signed-off-by: Jiri Kosina drivers/hid/hid-corsair-void.c | 83 ++++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 40 deletions(-) commit f5468beeab1b1adfc63c2717b1f29ef3f49a5fab Author: Hector Martin Date: Tue Feb 18 18:36:02 2025 +1000 ASoC: tas2764: Set the SDOUT polarity correctly TX launch polarity needs to be the opposite of RX capture polarity, to generate the right bit slot alignment. Reviewed-by: Neal Gompa Signed-off-by: Hector Martin Signed-off-by: James Calligeros Link: https://patch.msgid.link/20250218-apple-codec-changes-v2-28-932760fd7e07@gmail.com Signed-off-by: Mark Brown sound/soc/codecs/tas2764.c | 10 +++++++++- sound/soc/codecs/tas2764.h | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) commit a3f172359e22b2c11b750d23560481a55bf86af1 Author: Hector Martin Date: Tue Feb 18 18:35:35 2025 +1000 ASoC: tas2764: Fix power control mask Reviewed-by: Neal Gompa Signed-off-by: Hector Martin Signed-off-by: James Calligeros Link: https://patch.msgid.link/20250218-apple-codec-changes-v2-1-932760fd7e07@gmail.com Signed-off-by: Mark Brown sound/soc/codecs/tas2764.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42367eca7604e16e170bd6bd94ef61ffdd335f4a Author: Charlie Jenkins Date: Thu Feb 13 13:06:22 2025 -0800 tools: Remove redundant quiet setup Q is exported from Makefile.include so it is not necessary to manually set it. Reviewed-by: Jiri Olsa Signed-off-by: Charlie Jenkins Acked-by: Andrii Nakryiko Acked-by: Quentin Monnet Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Benjamin Tissoires Cc: Daniel Borkmann Cc: Daniel Lezcano Cc: Eduard Zingerman Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Kosina Cc: John Fastabend Cc: Josh Poimboeuf Cc: KP Singh Cc: Lukasz Luba Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Mykola Lysenko Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Shuah Khan Cc: Song Liu Cc: Stanislav Fomichev Cc: Steven Rostedt (VMware) Cc: Yonghong Song Cc: Zhang Rui Link: https://lore.kernel.org/r/20250213-quiet_tools-v3-2-07de4482a581@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo tools/arch/arm64/tools/Makefile | 6 ------ tools/bpf/Makefile | 6 ------ tools/bpf/bpftool/Documentation/Makefile | 6 ------ tools/bpf/bpftool/Makefile | 6 ------ tools/bpf/resolve_btfids/Makefile | 2 -- tools/bpf/runqslower/Makefile | 5 +---- tools/lib/bpf/Makefile | 13 ------------- tools/lib/perf/Makefile | 13 ------------- tools/lib/thermal/Makefile | 13 ------------- tools/objtool/Makefile | 6 ------ tools/testing/selftests/bpf/Makefile.docs | 6 ------ tools/testing/selftests/hid/Makefile | 2 -- tools/thermal/lib/Makefile | 13 ------------- tools/tracing/latency/Makefile | 6 ------ tools/tracing/rtla/Makefile | 6 ------ tools/verification/rv/Makefile | 6 ------ 16 files changed, 1 insertion(+), 114 deletions(-) commit 643f209ba3fdd4099416aaf9efa8266f7366d6fb Author: José Roberto de Souza Date: Thu Jan 23 12:22:04 2025 -0800 drm/xe: Make GUC binaries dump consistent with other binaries in devcoredump All other(hwsp, hwctx and vmas) binaries follow this format: [name].length: 0x1000 [name].data: xxxxxxx [name].error: errno The error one is just in case by some reason it was not able to capture the binary. So this GuC binaries should follow the same patern. v2: - renamed GUC binary to LOG Cc: John Harrison Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20250123202307.95103-3-jose.souza@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit cb1f868ca13756c0c18ba54d1591332476760d07) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_guc_ct.c | 6 ++++-- drivers/gpu/drm/xe/xe_guc_log.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) commit d403120cb9d4787b283ea202b2162f459d18fe9d Author: Kurt Borja Date: Wed Feb 12 14:30:58 2025 -0500 ACPI: platform_profile: Fix memory leak in profile_class_is_visible() If class_find_device() finds a device, it's reference count is incremented. Call put_device() to drop this reference before returning. Fixes: 77be5cacb2c2 ("ACPI: platform_profile: Create class for ACPI platform profile") Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Link: https://patch.msgid.link/20250212193058.32110-1-kuurtb@gmail.com Signed-off-by: Rafael J. Wysocki drivers/acpi/platform_profile.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 293f324ce96d700112c726682b14094d1b54e09c Author: Charlie Jenkins Date: Thu Feb 13 13:06:21 2025 -0800 tools: Unify top-level quiet infrastructure Commit f2868b1a66d4f40f ("perf tools: Expose quiet/verbose variables in Makefile.perf") moved the quiet infrastructure out of tools/build/Makefile.build and into the top-level Makefile.perf file so that the quiet infrastructure could be used throughout perf and not just in Makefile.build. Extract out the quiet infrastructure into Makefile.include so that it can be leveraged outside of perf. Fixes: f2868b1a66d4f40f ("perf tools: Expose quiet/verbose variables in Makefile.perf") Reviewed-by: Jiri Olsa Signed-off-by: Charlie Jenkins Acked-by: Andrii Nakryiko Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Benjamin Tissoires Cc: Daniel Borkmann Cc: Daniel Lezcano Cc: Eduard Zingerman Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Kosina Cc: John Fastabend Cc: Josh Poimboeuf Cc: KP Singh Cc: Lukasz Luba Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Mykola Lysenko Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Rafael J. Wysocki Cc: Shuah Khan Cc: Song Liu Cc: Stanislav Fomichev Cc: Steven Rostedt (VMware) Cc: Yonghong Song Cc: Zhang Rui Link: https://lore.kernel.org/r/20250213-quiet_tools-v3-1-07de4482a581@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile | 8 +------- tools/perf/Makefile.perf | 41 ----------------------------------------- tools/scripts/Makefile.include | 30 ++++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 48 deletions(-) commit c3a589fd9fcbf295a7402a4b188dc9277d505f4f Author: Heiko Carstens Date: Tue Feb 18 12:11:34 2025 +0100 s390/boot: Fix ESSA detection The cmma_test_essa() inline assembly uses tmp as input and output, however tmp is specified as output only, which allows the compiler to optimize the initialization of tmp away. Therefore the ESSA detection may or may not work depending on previous contents of the register that the compiler selected for tmp. Fix this by using the correct constraint modifier. Fixes: 468a3bc2b7b9 ("s390/cmma: move parsing of cmma kernel parameter to early boot code") Cc: stable@vger.kernel.org Signed-off-by: Heiko Carstens Reviewed-by: Vasily Gorbik Signed-off-by: Vasily Gorbik arch/s390/boot/startup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 173767c218cc1da74704e7863f165ac8a9796f3e Author: Sami Tolvanen Date: Thu Feb 13 21:16:14 2025 +0000 s390/purgatory: Use -D__DISABLE_EXPORTS The object files in purgatory do not export symbols, so disable exports for all the object files, not only sha256.o, with -D__DISABLE_EXPORTS. This fixes a build failure with CONFIG_GENDWARFKSYMS, where we would otherwise attempt to calculate symbol versions for purgatory objects and fail because they're not built with debugging information: error: gendwarfksyms: process_module: dwarf_get_units failed: no debugging information? make[5]: *** [../scripts/Makefile.build:207: arch/s390/purgatory/string.o] Error 1 make[5]: *** Deleting file 'arch/s390/purgatory/string.o' Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202502120752.U3fOKScQ-lkp@intel.com/ Signed-off-by: Sami Tolvanen Link: https://lore.kernel.org/r/20250213211614.3537605-2-samitolvanen@google.com Acked-by: Vasily Gorbik Signed-off-by: Vasily Gorbik arch/s390/purgatory/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ed83aff5a94e1d623c007159a6a7f1c3ef202c6c Author: Heiko Carstens Date: Wed Feb 12 12:01:15 2025 +0100 s390: Update defconfigs Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik arch/s390/configs/debug_defconfig | 2 ++ arch/s390/configs/defconfig | 2 ++ 2 files changed, 4 insertions(+) commit 6537cfb395f352782918d8ee7b7f10ba2cc3cbf2 Merge: 2408a807bfc3 e77aa4b2eaa7 Author: Linus Torvalds Date: Tue Feb 18 09:00:31 2025 -0800 Merge tag 'sound-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A slightly large collection of fixes, spread over various drivers. Almost all are small and device-specific fixes and quirks in ASoC SOF Intel and AMD, Renesas, Cirrus, HD-audio, in addition to a small fix for MIDI 2.0" * tag 'sound-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (41 commits) ALSA: seq: Drop UMP events when no UMP-conversion is set ALSA: hda/conexant: Add quirk for HP ProBook 450 G4 mute LED ALSA: hda/cirrus: Reduce codec resume time ALSA: hda/cirrus: Correct the full scale volume set logic virtio_snd.h: clarify that `controls` depends on VIRTIO_SND_F_CTLS ALSA: hda: Add error check for snd_ctl_rename_id() in snd_hda_create_dig_out_ctls() ALSA: hda/tas2781: Fix index issue in tas2781 hda SPI driver ASoC: imx-audmix: remove cpu_mclk which is from cpu dai device ALSA: hda/realtek: Fixup ALC225 depop procedure ALSA: hda/tas2781: Update tas2781 hda SPI driver ASoC: cs35l41: Fix acpi_device_hid() not found ASoC: SOF: amd: Add branch prediction hint in ACP IRQ handler ASoC: SOF: amd: Handle IPC replies before FW_BOOT_COMPLETE ASoC: SOF: amd: Drop unused includes from Vangogh driver ASoC: SOF: amd: Add post_fw_run_delay ACP quirk ASoC: Intel: soc-acpi-intel-ptl-match: revise typo of rt713_vb_l2_rt1320_l13 ASoC: Intel: soc-acpi-intel-ptl-match: revise typo of rt712_vb + rt1320 support ALSA: Switch to use hrtimer_setup() ALSA: hda: hda-intel: add Panther Lake-H support ASoC: SOF: Intel: pci-ptl: Add support for PTL-H ... commit 3f22421f6a240b33ab8ffbf662bf0a8f336f405b Author: Hector Martin Date: Thu Feb 13 11:12:58 2025 -0500 apple-nvme: Support coprocessors left idle iBoot on at least some firmwares/machines leaves ANS2 running, requiring a wake command instead of a CPU boot (and if we reset ANS2 in that state, everything breaks). Only stop the CPU if RTKit was running, and only do the reset dance if the CPU is stopped. Normal shutdown handoff: - RTKit not yet running - CPU detected not running - Reset - CPU powerup - RTKit boot wait ANS2 left running/idle: - RTKit not yet running - CPU detected running - RTKit wake message Sleep/resume cycle: - RTKit shutdown - CPU stopped - (sleep here) - CPU detected not running - Reset - CPU powerup - RTKit boot wait Shutdown or device removal: - RTKit shutdown - CPU stopped Therefore, the CPU running bit serves as a consistent flag of whether the coprocessor is fully stopped or just idle. Signed-off-by: Hector Martin Reviewed-by: Neal Gompa Reviewed-by: Sven Peter Signed-off-by: Alyssa Rosenzweig Signed-off-by: Keith Busch drivers/nvme/host/apple.c | 53 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 17 deletions(-) commit eefa72a15ea03fd009333aaa9f0e360b2578e434 Author: Hector Martin Date: Thu Feb 13 11:12:59 2025 -0500 apple-nvme: Release power domains when probe fails Signed-off-by: Hector Martin Reviewed-by: Neal Gompa Reviewed-by: Sven Peter Signed-off-by: Alyssa Rosenzweig Signed-off-by: Keith Busch drivers/nvme/host/apple.c | 2 ++ 1 file changed, 2 insertions(+) commit 2ba8cf918f0d1873cd5430ae2cc3c41711a144d7 Author: Damien Le Moal Date: Thu Feb 13 15:50:00 2025 +0900 nvmet: Use enum definitions instead of hardcoded values Change the definition of the inline functions nvmet_cc_en(), nvmet_cc_css(), nvmet_cc_mps(), nvmet_cc_ams(), nvmet_cc_shn(), nvmet_cc_iosqes(), and nvmet_cc_iocqes() to use the enum difinitions in include/linux/nvme.h instead of hardcoded values. Signed-off-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch drivers/nvme/target/nvmet.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit d422247d14a53fe825b1778edf104167d8fd8f3f Author: Damien Le Moal Date: Thu Feb 13 15:49:59 2025 +0900 nvme: Cleanup the definition of the controller config register fields Reorganized the enum used to define the fields of the contrller configuration (CC) register in include/linux/nvme.h to: 1) Group together all the values defined for each field. 2) Add the missing field masks definitions. 3) Add comments to describe the enum and each field. Signed-off-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch include/linux/nvme.h | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) commit 487a3ea7b1b8ba2ca7d2c2bb3c3594dc360d6261 Author: Caleb Sander Mateos Date: Thu Feb 13 10:05:14 2025 -0700 nvme/ioctl: add missing space in err message nvme_validate_passthru_nsid() logs an err message whose format string is split over 2 lines. There is a missing space between the two pieces, resulting in log lines like "... does not match nsid (1)of namespace". Add the missing space between ")" and "of". Also combine the format string pieces onto a single line to make the err message easier to grep. Fixes: e7d4b5493a2d ("nvme: factor out a nvme_validate_passthru_nsid helper") Signed-off-by: Caleb Sander Mateos Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch drivers/nvme/host/ioctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 578539e0969028f711c34d9a4565931edfe1d730 Author: Caleb Sander Mateos Date: Fri Jan 24 11:43:10 2025 -0700 nvme-tcp: fix connect failure on receiving partial ICResp PDU nvme_tcp_init_connection() attempts to receive an ICResp PDU but only checks that the return value from recvmsg() is non-negative. If the sender closes the TCP connection or sends fewer than 128 bytes, this check will pass even though the full PDU wasn't received. Ensure the full ICResp PDU is received by checking that recvmsg() returns the expected 128 bytes. Additionally set the MSG_WAITALL flag for recvmsg(), as a sender could split the ICResp over multiple TCP frames. Without MSG_WAITALL, recvmsg() could return prematurely with only part of the PDU. Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver") Signed-off-by: Caleb Sander Mateos Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Keith Busch drivers/nvme/host/tcp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cd513e0434c3e736c549bc99bf7982658b25114d Author: Damien Le Moal Date: Thu Feb 13 15:52:31 2025 +0900 nvme: tcp: Fix compilation warning with W=1 When compiling with W=1, a warning result for the function nvme_tcp_set_queue_io_cpu(): host/tcp.c:1578: warning: Function parameter or struct member 'queue' not described in 'nvme_tcp_set_queue_io_cpu' host/tcp.c:1578: warning: expecting prototype for Track the number of queues assigned to each cpu using a global per(). Prototype was for nvme_tcp_set_queue_io_cpu() instead Avoid this warning by using the regular comment format for the function nvme_tcp_set_queue_io_cpu() instead of the kdoc comment format. Fixes: 32193789878c ("nvme-tcp: Fix I/O queue cpu spreading for multiple controllers") Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch drivers/nvme/host/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01ef7ff7dd3cd8cc71af8d1d1496be853281a948 Author: Damien Le Moal Date: Thu Feb 13 15:52:30 2025 +0900 nvmet: pci-epf: Avoid RCU stalls under heavy workload The delayed work item function nvmet_pci_epf_poll_sqs_work() polls all submission queues and keeps running in a loop as long as commands are being submitted by the host. Depending on the preemption configuration of the kernel, under heavy command workload, this function can thus run for more than RCU_CPU_STALL_TIMEOUT seconds, leading to a RCU stall: rcu: INFO: rcu_sched self-detected stall on CPU rcu: 5-....: (20998 ticks this GP) idle=4244/1/0x4000000000000000 softirq=301/301 fqs=5132 rcu: (t=21000 jiffies g=-443 q=12 ncpus=8) CPU: 5 UID: 0 PID: 82 Comm: kworker/5:1 Not tainted 6.14.0-rc2 #1 Hardware name: Radxa ROCK 5B (DT) Workqueue: events nvmet_pci_epf_poll_sqs_work [nvmet_pci_epf] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : dw_edma_device_tx_status+0xb8/0x130 lr : dw_edma_device_tx_status+0x9c/0x130 sp : ffff800080b5bbb0 x29: ffff800080b5bbb0 x28: ffff0331c5c78400 x27: ffff0331c1cd1960 x26: ffff0331c0e39010 x25: ffff0331c20e4000 x24: ffff0331c20e4a90 x23: 0000000000000000 x22: 0000000000000001 x21: 00000000005aca33 x20: ffff800080b5bc30 x19: ffff0331c123e370 x18: 000000000ab29e62 x17: ffffb2a878c9c118 x16: ffff0335bde82040 x15: 0000000000000000 x14: 000000000000017b x13: 00000000ee601780 x12: 0000000000000018 x11: 0000000000000000 x10: 0000000000000001 x9 : 0000000000000040 x8 : 00000000ee601780 x7 : 0000000105c785c0 x6 : ffff0331c1027d80 x5 : 0000000001ee7ad6 x4 : ffff0335bdea16c0 x3 : ffff0331c123e438 x2 : 00000000005aca33 x1 : 0000000000000000 x0 : ffff0331c123e410 Call trace: dw_edma_device_tx_status+0xb8/0x130 (P) dma_sync_wait+0x60/0xbc nvmet_pci_epf_dma_transfer+0x128/0x264 [nvmet_pci_epf] nvmet_pci_epf_poll_sqs_work+0x2a0/0x2e0 [nvmet_pci_epf] process_one_work+0x144/0x390 worker_thread+0x27c/0x458 kthread+0xe8/0x19c ret_from_fork+0x10/0x20 The solution for this is simply to explicitly allow rescheduling using cond_resched(). However, since doing so for every loop of nvmet_pci_epf_poll_sqs_work() significantly degrades performance (for 4K random reads using 4 I/O queues, the maximum IOPS goes down from 137 KIOPS to 110 KIOPS), call cond_resched() every second to avoid the RCU stalls. Fixes: 0faa0fe6f90e ("nvmet: New NVMe PCI endpoint function target driver") Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch drivers/nvme/target/pci-epf.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit ffa35567632c0059e7f380ed155e26a07ec4153f Author: Damien Le Moal Date: Thu Feb 13 15:52:29 2025 +0900 nvmet: pci-epf: Do not uselessly write the CSTS register The function nvmet_pci_epf_poll_cc_work() will do nothing if there are no changes to the controller configuration (CC) register. However, even for such case, this function still calls nvmet_update_cc() and uselessly writes the CSTS register. Avoid this by simply rescheduling the poll_cc work if the CC register has not changed. Also reschedule the poll_cc work if the function nvmet_pci_epf_enable_ctrl() fails to allow the host the chance to try again enabling the controller. While at it, since there is no point in trying to handle the CC register as quickly as possible, change the poll_cc work scheduling interval to 10 ms (from 5ms), to avoid excessive read accesses to that register. Fixes: 0faa0fe6f90e ("nvmet: New NVMe PCI endpoint function target driver") Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch drivers/nvme/target/pci-epf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 68a5c91f01fc9f086567b260cced003ed9fdff3f Author: Damien Le Moal Date: Thu Feb 13 15:52:28 2025 +0900 nvmet: pci-epf: Correctly initialize CSTS when enabling the controller The function nvmet_pci_epf_poll_cc_work() sets the NVME_CSTS_RDY bit of the controller status register (CSTS) when nvmet_pci_epf_enable_ctrl() returns success. However, since this function can be called several times (e.g. if the host reboots), instead of setting the bit in ctrl->csts, initialize this field to only have NVME_CSTS_RDY set. Conversely, if nvmet_pci_epf_enable_ctrl() fails, make sure to clear all bits from ctrl->csts. To simplify nvmet_pci_epf_poll_cc_work(), initialize ctrl->csts to NVME_CSTS_RDY directly inside nvmet_pci_epf_enable_ctrl() and clear this field in that function as well in case of a failure. To be consistent, move clearing the NVME_CSTS_RDY bit from ctrl->csts when the controller is being disabled from nvmet_pci_epf_poll_cc_work() into nvmet_pci_epf_disable_ctrl(). Fixes: 0faa0fe6f90e ("nvmet: New NVMe PCI endpoint function target driver") Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch drivers/nvme/target/pci-epf.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 3988ac1c67e6e84d2feb987d7b36d5791174b3da Author: Ruozhu Li Date: Sun Feb 16 20:49:56 2025 +0800 nvmet-rdma: recheck queue state is LIVE in state lock in recv done The queue state checking in nvmet_rdma_recv_done is not in queue state lock.Queue state can transfer to LIVE in cm establish handler between state checking and state lock here, cause a silent drop of nvme connect cmd. Recheck queue state whether in LIVE state in state lock to prevent this issue. Signed-off-by: Ruozhu Li Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch drivers/nvme/target/rdma.c | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) commit 4082326807072b71496501b6a0c55ffe8d5092a5 Author: Hannes Reinecke Date: Fri Feb 7 13:41:34 2025 +0100 nvmet: Fix crash when a namespace is disabled The namespace percpu counter protects pending I/O, and we can only safely diable the namespace once the counter drop to zero. Otherwise we end up with a crash when running blktests/nvme/058 (eg for loop transport): [ 2352.930426] [ T53909] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN PTI [ 2352.930431] [ T53909] KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f] [ 2352.930434] [ T53909] CPU: 3 UID: 0 PID: 53909 Comm: kworker/u16:5 Tainted: G W 6.13.0-rc6 #232 [ 2352.930438] [ T53909] Tainted: [W]=WARN [ 2352.930440] [ T53909] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-3.fc41 04/01/2014 [ 2352.930443] [ T53909] Workqueue: nvmet-wq nvme_loop_execute_work [nvme_loop] [ 2352.930449] [ T53909] RIP: 0010:blkcg_set_ioprio+0x44/0x180 as the queue is already torn down when calling submit_bio(); So we need to init the percpu counter in nvmet_ns_enable(), and wait for it to drop to zero in nvmet_ns_disable() to avoid having I/O pending after the namespace has been disabled. Fixes: 74d16965d7ac ("nvmet-loop: avoid using mutex in IO hotpath") Signed-off-by: Hannes Reinecke Reviewed-by: Nilay Shroff Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Tested-by: Shin'ichiro Kawasaki Signed-off-by: Keith Busch drivers/nvme/target/core.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit 84e009042d0f3dfe91bec60bcd208ee3f866cbcd Author: Maurizio Lombardi Date: Mon Feb 17 17:08:27 2025 +0100 nvme-tcp: add basic support for the C2HTermReq PDU Previously, the NVMe/TCP host driver did not handle the C2HTermReq PDU, instead printing "unsupported pdu type (3)" when received. This patch adds support for processing the C2HTermReq PDU, allowing the driver to print the Fatal Error Status field. Example of output: nvme nvme4: Received C2HTermReq (FES = Invalid PDU Header Field) Signed-off-by: Maurizio Lombardi Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch drivers/nvme/host/tcp.c | 43 +++++++++++++++++++++++++++++++++++++++++++ include/linux/nvme-tcp.h | 2 ++ 2 files changed, 45 insertions(+) commit fcd875445866a5219cf2be3101e276b21fc843f3 Author: Christopher Lentocha Date: Tue Feb 18 08:59:29 2025 -0500 nvme-pci: quirk Acer FA100 for non-uniqueue identifiers In order for two Acer FA100 SSDs to work in one PC (in the case of myself, a Lenovo Legion T5 28IMB05), and not show one drive and not the other, and sometimes mix up what drive shows up (randomly), these two lines of code need to be added, and then both of the SSDs will show up and not conflict when booting off of one of them. If you boot up your computer with both SSDs installed without this patch, you may also randomly get into a kernel panic (if the initrd is not set up) or stuck in the initrd "/init" process, it is set up, however, if you do apply this patch, there should not be problems with booting or seeing both contents of the drive. Tested with the btrfs filesystem with a RAID configuration of having the root drive '/' combined to make two 256GB Acer FA100 SSDs become 512GB in total storage. Kernel Logs with patch applied (`dmesg -t | grep -i nvm`): ``` ... nvme 0000:04:00.0: platform quirk: setting simple suspend nvme nvme0: pci function 0000:04:00.0 nvme 0000:05:00.0: platform quirk: setting simple suspend nvme nvme1: pci function 0000:05:00.0 nvme nvme1: missing or invalid SUBNQN field. nvme nvme1: allocated 64 MiB host memory buffer. nvme nvme0: missing or invalid SUBNQN field. nvme nvme0: allocated 64 MiB host memory buffer. nvme nvme1: 8/0/0 default/read/poll queues nvme nvme1: Ignoring bogus Namespace Identifiers nvme nvme0: 8/0/0 default/read/poll queues nvme nvme0: Ignoring bogus Namespace Identifiers nvme0n1: p1 p2 ... ``` Kernel Logs with patch not applied (`dmesg -t | grep -i nvm`): ``` ... nvme 0000:04:00.0: platform quirk: setting simple suspend nvme nvme0: pci function 0000:04:00.0 nvme 0000:05:00.0: platform quirk: setting simple suspend nvme nvme1: pci function 0000:05:00.0 nvme nvme0: missing or invalid SUBNQN field. nvme nvme1: missing or invalid SUBNQN field. nvme nvme0: allocated 64 MiB host memory buffer. nvme nvme1: allocated 64 MiB host memory buffer. nvme nvme0: 8/0/0 default/read/poll queues nvme nvme1: 8/0/0 default/read/poll queues nvme nvme1: globally duplicate IDs for nsid 1 nvme nvme1: VID:DID 1dbe:5216 model:Acer SSD FA100 256GB firmware:1.Z.J.2X nvme0n1: p1 p2 ... ``` Signed-off-by: Christopher Lentocha Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch drivers/nvme/host/pci.c | 2 ++ 1 file changed, 2 insertions(+) commit a3bdd8f5c2217e1cb35db02c2eed36ea20fb50f5 Author: Takashi Iwai Date: Tue Feb 18 12:40:24 2025 +0100 ALSA: usb-audio: Avoid dropping MIDI events at closing multiple ports We fixed the UAF issue in USB MIDI code by canceling the pending work at closing each MIDI output device in the commit below. However, this assumed that it's the only one that is tied with the endpoint, and it resulted in unexpected data truncations when multiple devices are assigned to a single endpoint and opened simultaneously. For addressing the unexpected MIDI message drops, simply replace cancel_work_sync() with flush_work(). The drain callback should have been already invoked before the close callback, hence the port->active flag must be already cleared. So this just assures that the pending work is finished before freeing the resources. Fixes: 0125de38122f ("ALSA: usb-audio: Cancel pending work at closing a MIDI substream") Reported-and-tested-by: John Keeping Closes: https://lore.kernel.org/20250217111647.3368132-1-jkeeping@inmusicbrands.com Link: https://patch.msgid.link/20250218114024.23125-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/midi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7b5279b67e76978ad7b3800030680774bfba4cb Merge: 0a4f598c84fc 85928e9c4363 Author: Paolo Abeni Date: Tue Feb 18 12:00:16 2025 +0100 Merge branch 'sockmap-vsock-for-connectible-sockets-allow-only-connected' Michal Luczaj says: ==================== sockmap, vsock: For connectible sockets allow only connected Series deals with one more case of vsock surprising BPF/sockmap by being inconsistency about (having an) assigned transport. KASAN: null-ptr-deref in range [0x0000000000000120-0x0000000000000127] CPU: 7 UID: 0 PID: 56 Comm: kworker/7:0 Not tainted 6.14.0-rc1+ Workqueue: vsock-loopback vsock_loopback_work RIP: 0010:vsock_read_skb+0x4b/0x90 Call Trace: sk_psock_verdict_data_ready+0xa4/0x2e0 virtio_transport_recv_pkt+0x1ca8/0x2acc vsock_loopback_work+0x27d/0x3f0 process_one_work+0x846/0x1420 worker_thread+0x5b3/0xf80 kthread+0x35a/0x700 ret_from_fork+0x2d/0x70 ret_from_fork_asm+0x1a/0x30 This bug, similarly to commit f6abafcd32f9 ("vsock/bpf: return early if transport is not assigned"), could be fixed with a single NULL check. But instead, let's explore another approach: take a hint from vsock_bpf_update_proto() and teach sockmap to accept only vsocks that are already connected (no risk of transport being dropped or reassigned). At the same time straight reject the listeners (vsock listening sockets do not carry any transport anyway). This way BPF does not have to worry about vsk->transport becoming NULL. Signed-off-by: Michal Luczaj ==================== Link: https://patch.msgid.link/20250213-vsock-listen-sockmap-nullptr-v1-0-994b7cd2f16b@rbox.co Signed-off-by: Paolo Abeni commit 85928e9c436398abcac32a9afa2f591895dd497d Author: Michal Luczaj Date: Thu Feb 13 12:58:52 2025 +0100 selftest/bpf: Add vsock test for sockmap rejecting unconnected Verify that for a connectible AF_VSOCK socket, merely having a transport assigned is insufficient; socket must be connected for the sockmap to accept. This does not test datagram vsocks. Even though it hardly matters. VMCI is the only transport that features VSOCK_TRANSPORT_F_DGRAM, but it has an unimplemented vsock_transport::readskb() callback, making it unsupported by BPF/sockmap. Signed-off-by: Michal Luczaj Acked-by: Stefano Garzarella Signed-off-by: Paolo Abeni .../selftests/bpf/prog_tests/sockmap_basic.c | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 8350695bfb169b1924626a68f76b369ad01f18f2 Author: Michal Luczaj Date: Thu Feb 13 12:58:51 2025 +0100 selftest/bpf: Adapt vsock_delete_on_close to sockmap rejecting unconnected Commit 515745445e92 ("selftest/bpf: Add test for vsock removal from sockmap on close()") added test that checked if proto::close() callback was invoked on AF_VSOCK socket release. I.e. it verified that a close()d vsock does indeed get removed from the sockmap. It was done simply by creating a socket pair and attempting to replace a close()d one with its peer. Since, due to a recent change, sockmap does not allow updating index with a non-established connectible vsock, redo it with a freshly established one. Signed-off-by: Michal Luczaj Acked-by: Stefano Garzarella Signed-off-by: Paolo Abeni .../selftests/bpf/prog_tests/sockmap_basic.c | 40 ++++++++++++---------- 1 file changed, 22 insertions(+), 18 deletions(-) commit 857ae05549ee2542317e7084ecaa5f8536634dd9 Author: Michal Luczaj Date: Thu Feb 13 12:58:50 2025 +0100 vsock/bpf: Warn on socket without transport In the spirit of commit 91751e248256 ("vsock: prevent null-ptr-deref in vsock_*[has_data|has_space]"), armorize the "impossible" cases with a warning. Fixes: 634f1a7110b4 ("vsock: support sockmap") Signed-off-by: Michal Luczaj Reviewed-by: Stefano Garzarella Signed-off-by: Paolo Abeni net/vmw_vsock/af_vsock.c | 3 +++ net/vmw_vsock/vsock_bpf.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit 8fb5bb169d17cdd12c2dcc2e96830ed487d77a0f Author: Michal Luczaj Date: Thu Feb 13 12:58:49 2025 +0100 sockmap, vsock: For connectible sockets allow only connected sockmap expects all vsocks to have a transport assigned, which is expressed in vsock_proto::psock_update_sk_prot(). However, there is an edge case where an unconnected (connectible) socket may lose its previously assigned transport. This is handled with a NULL check in the vsock/BPF recv path. Another design detail is that listening vsocks are not supposed to have any transport assigned at all. Which implies they are not supported by the sockmap. But this is complicated by the fact that a socket, before switching to TCP_LISTEN, may have had some transport assigned during a failed connect() attempt. Hence, we may end up with a listening vsock in a sockmap, which blows up quickly: KASAN: null-ptr-deref in range [0x0000000000000120-0x0000000000000127] CPU: 7 UID: 0 PID: 56 Comm: kworker/7:0 Not tainted 6.14.0-rc1+ Workqueue: vsock-loopback vsock_loopback_work RIP: 0010:vsock_read_skb+0x4b/0x90 Call Trace: sk_psock_verdict_data_ready+0xa4/0x2e0 virtio_transport_recv_pkt+0x1ca8/0x2acc vsock_loopback_work+0x27d/0x3f0 process_one_work+0x846/0x1420 worker_thread+0x5b3/0xf80 kthread+0x35a/0x700 ret_from_fork+0x2d/0x70 ret_from_fork_asm+0x1a/0x30 For connectible sockets, instead of relying solely on the state of vsk->transport, tell sockmap to only allow those representing established connections. This aligns with the behaviour for AF_INET and AF_UNIX. Fixes: 634f1a7110b4 ("vsock: support sockmap") Signed-off-by: Michal Luczaj Acked-by: Stefano Garzarella Signed-off-by: Paolo Abeni net/core/sock_map.c | 3 +++ 1 file changed, 3 insertions(+) commit 81570d6a7ad37033c7895811551a5a9023706eda Author: Bartosz Golaszewski Date: Sat Feb 15 10:56:55 2025 +0100 gpiolib: protect gpio_chip with SRCU in array_info paths in multi get/set During the locking rework in GPIOLIB, we omitted one important use-case, namely: setting and getting values for GPIO descriptor arrays with array_info present. This patch does two things: first it makes struct gpio_array store the address of the underlying GPIO device and not chip. Next: it protects the chip with SRCU from removal in gpiod_get_array_value_complex() and gpiod_set_array_value_complex(). Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250215095655.23152-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib.c | 48 +++++++++++++++++++++++++++++++++--------------- drivers/gpio/gpiolib.h | 4 ++-- 2 files changed, 35 insertions(+), 17 deletions(-) commit ec5fd50aeff9c9156304853c6d75eda852d4a2c8 Author: Thomas Weißschuh Date: Mon Feb 17 08:43:35 2025 +0100 uprobes: Don't use %pK through printk Restricted pointers ("%pK") are not meant to be used through printk(). It can unintentionally expose security sensitive, raw pointer values. Use regular pointer formatting instead. For more background, see: https://lore.kernel.org/lkml/20250113171731-dc10e3c1-da64-4af0-b767-7c7070468023@linutronix.de/ Signed-off-by: Thomas Weißschuh Signed-off-by: Ingo Molnar Cc: Masami Hiramatsu Cc: Oleg Nesterov Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250217-restricted-pointers-uprobes-v1-1-e8cbe5bb22a7@linutronix.de kernel/events/uprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02d954c0fdf91845169cdacc7405b120f90afe01 Author: Mathieu Desnoyers Date: Mon Feb 10 16:32:50 2025 +0100 sched: Compact RSEQ concurrency IDs with reduced threads and affinity When a process reduces its number of threads or clears bits in its CPU affinity mask, the mm_cid allocation should eventually converge towards smaller values. However, the change introduced by: commit 7e019dcc470f ("sched: Improve cache locality of RSEQ concurrency IDs for intermittent workloads") adds a per-mm/CPU recent_cid which is never unset unless a thread migrates. This is a tradeoff between: A) Preserving cache locality after a transition from many threads to few threads, or after reducing the hamming weight of the allowed CPU mask. B) Making the mm_cid upper bounds wrt nr threads and allowed CPU mask easy to document and understand. C) Allowing applications to eventually react to mm_cid compaction after reduction of the nr threads or allowed CPU mask, making the tracking of mm_cid compaction easier by shrinking it back towards 0 or not. D) Making sure applications that periodically reduce and then increase again the nr threads or allowed CPU mask still benefit from good cache locality with mm_cid. Introduce the following changes: * After shrinking the number of threads or reducing the number of allowed CPUs, reduce the value of max_nr_cid so expansion of CID allocation will preserve cache locality if the number of threads or allowed CPUs increase again. * Only re-use a recent_cid if it is within the max_nr_cid upper bound, else find the first available CID. Fixes: 7e019dcc470f ("sched: Improve cache locality of RSEQ concurrency IDs for intermittent workloads") Signed-off-by: Mathieu Desnoyers Signed-off-by: Gabriele Monaco Signed-off-by: Peter Zijlstra (Intel) Tested-by: Gabriele Monaco Link: https://lkml.kernel.org/r/20250210153253.460471-2-gmonaco@redhat.com include/linux/mm_types.h | 7 ++++--- kernel/sched/sched.h | 25 ++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) commit b8d975e7cccfe0e12b869a23b350e5851a116583 Merge: 2408a807bfc3 0c67c37e1710 Author: Christian Brauner Date: Tue Feb 18 08:46:49 2025 +0100 Merge tag 'fuse-fixes-6.14-rc4' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse fixes from Miklos Szeredi: This contains a fix for fuse readahead. * tag 'fuse-fixes-6.14-rc4' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: revert back to __readahead_folio() for readahead Link: https://lore.kernel.org/r/CAJfpegv=+M4hy=hfBKEgBN8vfWULWT9ApbQzCnPopnMqyjpkzA@mail.gmail.com Signed-off-by: Christian Brauner commit 8344017aaf32a7532cff293eb3df7fd2265ebafd Author: Kemeng Shi Date: Fri Feb 14 00:36:59 2025 +0800 test_xarray: fix failure in check_pause when CONFIG_XARRAY_MULTI is not defined In case CONFIG_XARRAY_MULTI is not defined, xa_store_order can store a multi-index entry but xas_for_each can't tell sbiling entry from valid entry. So the check_pause failed when we store a multi-index entry and wish xas_for_each can handle it normally. Avoid to store multi-index entry when CONFIG_XARRAY_MULTI is disabled to fix the failure. Link: https://lkml.kernel.org/r/20250213163659.414309-1-shikemeng@huaweicloud.com Fixes: c9ba5249ef8b ("Xarray: move forward index correctly in xas_pause()") Signed-off-by: Kemeng Shi Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/r/CAMuHMdU_bfadUO=0OZ=AoQ9EAmQPA4wsLCBqohXR+QCeCKRn4A@mail.gmail.com Tested-by: Geert Uytterhoeven Cc: Matthew Wilcox Signed-off-by: Andrew Morton lib/test_xarray.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit ac7af1f57acd1e1d112b36e036584ca4bc4c284a Author: Waiman Long Date: Mon Feb 17 15:44:02 2025 -0500 kasan: don't call find_vm_area() in a PREEMPT_RT kernel The following bug report was found when running a PREEMPT_RT debug kernel. BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 140605, name: kunit_try_catch preempt_count: 1, expected: 0 Call trace: rt_spin_lock+0x70/0x140 find_vmap_area+0x84/0x168 find_vm_area+0x1c/0x50 print_address_description.constprop.0+0x2a0/0x320 print_report+0x108/0x1f8 kasan_report+0x90/0xc8 Since commit e30a0361b851 ("kasan: make report_lock a raw spinlock"), report_lock was changed to raw_spinlock_t to fix another similar PREEMPT_RT problem. That alone isn't enough to cover other corner cases. print_address_description() is always invoked under the report_lock. The context under this lock is always atomic even on PREEMPT_RT. find_vm_area() acquires vmap_node::busy.lock which is a spinlock_t, becoming a sleeping lock on PREEMPT_RT and must not be acquired in atomic context. Don't invoke find_vm_area() on PREEMPT_RT and just print the address. Non-PREEMPT_RT builds remain unchanged. Add a DEFINE_WAIT_OVERRIDE_MAP() macro to tell lockdep that this lock nesting is allowed because the PREEMPT_RT part (which is invalid) has been taken care of. This macro was first introduced in commit 0cce06ba859a ("debugobjects,locking: Annotate debug_object_fill_pool() wait type violation"). Link: https://lkml.kernel.org/r/20250217204402.60533-1-longman@redhat.com Fixes: e30a0361b851 ("kasan: make report_lock a raw spinlock") Signed-off-by: Waiman Long Suggested-by: Andrey Konovalov Reviewed-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitriy Vyukov Cc: Steven Rostedt Cc: Mariano Pache Cc: Sebastian Andrzej Siewior Cc: Vincenzo Frascino Signed-off-by: Andrew Morton mm/kasan/report.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit 4998a6fa2a31176d0882bdfa27d5d03b665ba19b Author: Nick Desaulniers Date: Wed Feb 12 09:35:20 2025 -0800 MAINTAINERS: update Nick's contact info Updated .mailmap, but forgot these other places. Link: https://lkml.kernel.org/r/20250212173523.3979840-1-ndesaulniers@google.com Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton Documentation/process/embargoed-hardware-issues.rst | 2 +- Documentation/translations/sp_SP/process/embargoed-hardware-issues.rst | 2 +- MAINTAINERS | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 5dcf52e2ce0fe3c4516b1e494c1af6d3a69e30e7 Author: Mark Brown Date: Wed Feb 12 17:44:25 2025 +0000 selftests/mm: fix check for running THP tests When testing if we should try to compact memory or drop caches before we run the THP or HugeTLB tests we use | as an or operator. This doesn't work since run_vmtests.sh is written in shell where this is used to pipe the output of the first argument into the second. Instead use the shell's -o operator. Link: https://lkml.kernel.org/r/20250212-kselftest-mm-no-hugepages-v1-1-44702f538522@kernel.org Fixes: b433ffa8dbac ("selftests: mm: perform some system cleanup before using hugepages") Signed-off-by: Mark Brown Reviewed-by: Nico Pache Cc: Mariano Pache Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/run_vmtests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d7bc938adca9024a6b51cf55d9b0542b653b69c Author: Luiz Capitulino Date: Mon Feb 10 22:48:56 2025 -0500 mm: hugetlb: avoid fallback for specific node allocation of 1G pages When using the HugeTLB kernel command-line to allocate 1G pages from a specific node, such as: default_hugepagesz=1G hugepages=1:1 If node 1 happens to not have enough memory for the requested number of 1G pages, the allocation falls back to other nodes. A quick way to reproduce this is by creating a KVM guest with a memory-less node and trying to allocate 1 1G page from it. Instead of failing, the allocation will fallback to other nodes. This defeats the purpose of node specific allocation. Also, specific node allocation for 2M pages don't have this behavior: the allocation will just fail for the pages it can't satisfy. This issue happens because HugeTLB calls memblock_alloc_try_nid_raw() for 1G boot-time allocation as this function falls back to other nodes if the allocation can't be satisfied. Use memblock_alloc_exact_nid_raw() instead, which ensures that the allocation will only be satisfied from the specified node. Link: https://lkml.kernel.org/r/20250211034856.629371-1-luizcap@redhat.com Fixes: b5389086ad7b ("hugetlbfs: extend the definition of hugepages parameter to support node allocation") Signed-off-by: Luiz Capitulino Acked-by: Oscar Salvador Acked-by: David Hildenbrand Cc: "Mike Rapoport (IBM)" Cc: Muchun Song Cc: Zhenguo Yao Cc: Frank van der Linden Signed-off-by: Andrew Morton mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99333229dee41b992f3b0493f6aa2e3528138384 Author: Chen Ridong Date: Tue Feb 11 08:18:19 2025 +0000 memcg: avoid dead loop when setting memory.max A softlockup issue was found with stress test: watchdog: BUG: soft lockup - CPU#27 stuck for 26s! [migration/27:181] CPU: 27 UID: 0 PID: 181 Comm: migration/27 6.14.0-rc2-next-20250210 #1 Stopper: multi_cpu_stop <- stop_machine_from_inactive_cpu RIP: 0010:stop_machine_yield+0x2/0x10 RSP: 0000:ff4a0dcecd19be48 EFLAGS: 00000246 RAX: ffffffff89c0108f RBX: ff4a0dcec03afe44 RCX: 0000000000000000 RDX: ff1cdaaf6eba5808 RSI: 0000000000000282 RDI: ff1cda80c1775a40 RBP: 0000000000000001 R08: 00000011620096c6 R09: 7fffffffffffffff R10: 0000000000000001 R11: 0000000000000100 R12: ff1cda80c1775a40 R13: 0000000000000000 R14: 0000000000000001 R15: ff4a0dcec03afe20 FS: 0000000000000000(0000) GS:ff1cdaaf6eb80000(0000) CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000025e2c2a001 CR4: 0000000000773ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: multi_cpu_stop+0x8f/0x100 cpu_stopper_thread+0x90/0x140 smpboot_thread_fn+0xad/0x150 kthread+0xc2/0x100 ret_from_fork+0x2d/0x50 The stress test involves CPU hotplug operations and memory control group (memcg) operations. The scenario can be described as follows: echo xx > memory.max cache_ap_online oom_reaper (CPU23) (CPU50) xx < usage stop_machine_from_inactive_cpu for(;;) // all active cpus trigger OOM queue_stop_cpus_work // waiting oom_reaper multi_cpu_stop(migration/xx) // sync all active cpus ack // waiting cpu23 ack // CPU50 loops in multi_cpu_stop waiting cpu50 Detailed explanation: 1. When the usage is larger than xx, an OOM may be triggered. If the process does not handle with ths kill signal immediately, it will loop in the memory_max_write. 2. When cache_ap_online is triggered, the multi_cpu_stop is queued to the active cpus. Within the multi_cpu_stop function, it attempts to synchronize the CPU states. However, the CPU23 didn't acknowledge because it is stuck in a loop within the for(;;). 3. The oom_reaper process is blocked because CPU50 is in a loop, waiting for CPU23 to acknowledge the synchronization request. 4. Finally, it formed cyclic dependency and lead to softlockup and dead loop. To fix this issue, add cond_resched() in the memory_max_write, so that it will not block migration task. Link: https://lkml.kernel.org/r/20250211081819.33307-1-chenridong@huaweicloud.com Fixes: b6e6edcfa405 ("mm: memcontrol: reclaim and OOM kill when shrinking memory.max below usage") Signed-off-by: Chen Ridong Acked-by: Michal Hocko Cc: Roman Gushchin Cc: Johannes Weiner Cc: Shakeel Butt Cc: Muchun Song Cc: Wang Weiyang Signed-off-by: Andrew Morton mm/memcontrol.c | 1 + 1 file changed, 1 insertion(+) commit 8648ee2622aefa5b567ebea71609822373995f37 Author: Nick Desaulniers Date: Tue Feb 11 13:21:17 2025 -0800 mailmap: update Nick's entry Link: https://lkml.kernel.org/r/20250211212117.3195265-1-ndesaulniers@google.com Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton .mailmap | 1 + 1 file changed, 1 insertion(+) commit f39edcf6349abb2ca2df96acc8645f4d2631d0a7 Author: Qi Zheng Date: Tue Feb 11 15:26:25 2025 +0800 mm: pgtable: fix incorrect reclaim of non-empty PTE pages In zap_pte_range(), if the pte lock was released midway, the pte entries may be refilled with physical pages by another thread, which may cause a non-empty PTE page to be reclaimed and eventually cause the system to crash. To fix it, fall back to the slow path in this case to recheck if all pte entries are still none. Link: https://lkml.kernel.org/r/20250211072625.89188-1-zhengqi.arch@bytedance.com Fixes: 6375e95f381e ("mm: pgtable: reclaim empty PTE page in madvise(MADV_DONTNEED)") Signed-off-by: Qi Zheng Reported-by: Christian Brauner Closes: https://lore.kernel.org/all/20250207-anbot-bankfilialen-acce9d79a2c7@brauner/ Reported-by: Qu Wenruo Closes: https://lore.kernel.org/all/152296f3-5c81-4a94-97f3-004108fba7be@gmx.com/ Tested-by: Zi Yan Cc: Cc: "Darrick J. Wong" Cc: Dave Chinner Cc: David Hildenbrand Cc: Jann Horn Cc: Matthew Wilcox Cc: Muchun Song Cc: Zi Yan Signed-off-by: Andrew Morton mm/memory.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit b016d0873777462e55af4c615104cc684fce086d Author: Wang Yaxin Date: Sat Feb 8 14:49:01 2025 +0800 taskstats: modify taskstats version After adding "delay max" and "delay min" to the taskstats structure, the taskstats version needs to be updated. Link: https://lkml.kernel.org/r/20250208144901218Q5ptVpqsQkb2MOEmW4Ujn@zte.com.cn Fixes: f65c64f311ee ("delayacct: add delay min to record delay peak") Signed-off-by: Wang Yaxin Signed-off-by: Kun Jiang Reviewed-by: xu xin Signed-off-by: Andrew Morton include/uapi/linux/taskstats.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2272dbc471037b78f308b44351ab1b9f88d32628 Author: Wang Yaxin Date: Sat Feb 8 14:44:00 2025 +0800 getdelays: fix error format characters getdelays had a compilation issue because the format string was not updated when the "delay min" was added. For example, after adding the "delay min" in printf, there were 7 strings but only 6 "%s" format specifiers. Similarly, after adding the 't->cpu_delay_total', there were 7 variables but only 6 format characters specifiers, causing compilation issues as follows. This commit fixes these issues to ensure that getdelays compiles correctly. root@xx:~/linux-next/tools/accounting$ make getdelays.c:199:9: warning: format `%llu' expects argument of type `long long unsigned int', but argument 8 has type `char *' [-Wformat=] 199 | printf("\n\nCPU %15s%15s%15s%15s%15s%15s\n" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ..... 216 | "delay total", "delay average", "delay max", "delay min", | ~~~~~~~~~~~ | | | char * getdelays.c:200:21: note: format string is defined here 200 | " %15llu%15llu%15llu%15llu%15.3fms%13.6fms\n" | ~~~~~^ | | | long long unsigned int | %15s getdelays.c:199:9: warning: format `%f' expects argument of type `double', but argument 12 has type `long long unsigned int' [-Wformat=] 199 | printf("\n\nCPU %15s%15s%15s%15s%15s%15s\n" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ..... 220 | (unsigned long long)t->cpu_delay_total, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | long long unsigned int ..... Link: https://lkml.kernel.org/r/20250208144400544RduNRhwIpT3m2JyRBqskZ@zte.com.cn Fixes: f65c64f311ee ("delayacct: add delay min to record delay peak") Reviewed-by: xu xin Signed-off-by: Wang Yaxin Signed-off-by: Kun Jiang Cc: Balbir Singh Cc: David Hildenbrand Cc: Fan Yu Cc: Peilin He Cc: Qiang Tu Cc: wangyong Cc: ye xingchen Cc: Yunkai Zhang Signed-off-by: Andrew Morton tools/accounting/getdelays.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 41cddf83d8b00f29fd105e7a0777366edc69a5cf Author: David Hildenbrand Date: Mon Feb 10 17:13:17 2025 +0100 mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize() If migration succeeded, we called folio_migrate_flags()->mem_cgroup_migrate() to migrate the memcg from the old to the new folio. This will set memcg_data of the old folio to 0. Similarly, if migration failed, memcg_data of the dst folio is left unset. If we call folio_putback_lru() on such folios (memcg_data == 0), we will add the folio to be freed to the LRU, making memcg code unhappy. Running the hmm selftests: # ./hmm-tests ... # RUN hmm.hmm_device_private.migrate ... [ 102.078007][T14893] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x7ff27d200 pfn:0x13cc00 [ 102.079974][T14893] anon flags: 0x17ff00000020018(uptodate|dirty|swapbacked|node=0|zone=2|lastcpupid=0x7ff) [ 102.082037][T14893] raw: 017ff00000020018 dead000000000100 dead000000000122 ffff8881353896c9 [ 102.083687][T14893] raw: 00000007ff27d200 0000000000000000 00000001ffffffff 0000000000000000 [ 102.085331][T14893] page dumped because: VM_WARN_ON_ONCE_FOLIO(!memcg && !mem_cgroup_disabled()) [ 102.087230][T14893] ------------[ cut here ]------------ [ 102.088279][T14893] WARNING: CPU: 0 PID: 14893 at ./include/linux/memcontrol.h:726 folio_lruvec_lock_irqsave+0x10e/0x170 [ 102.090478][T14893] Modules linked in: [ 102.091244][T14893] CPU: 0 UID: 0 PID: 14893 Comm: hmm-tests Not tainted 6.13.0-09623-g6c216bc522fd #151 [ 102.093089][T14893] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-2.fc40 04/01/2014 [ 102.094848][T14893] RIP: 0010:folio_lruvec_lock_irqsave+0x10e/0x170 [ 102.096104][T14893] Code: ... [ 102.099908][T14893] RSP: 0018:ffffc900236c37b0 EFLAGS: 00010293 [ 102.101152][T14893] RAX: 0000000000000000 RBX: ffffea0004f30000 RCX: ffffffff8183f426 [ 102.102684][T14893] RDX: ffff8881063cb880 RSI: ffffffff81b8117f RDI: ffff8881063cb880 [ 102.104227][T14893] RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000 [ 102.105757][T14893] R10: 0000000000000001 R11: 0000000000000002 R12: ffffc900236c37d8 [ 102.107296][T14893] R13: ffff888277a2bcb0 R14: 000000000000001f R15: 0000000000000000 [ 102.108830][T14893] FS: 00007ff27dbdd740(0000) GS:ffff888277a00000(0000) knlGS:0000000000000000 [ 102.110643][T14893] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 102.111924][T14893] CR2: 00007ff27d400000 CR3: 000000010866e000 CR4: 0000000000750ef0 [ 102.113478][T14893] PKRU: 55555554 [ 102.114172][T14893] Call Trace: [ 102.114805][T14893] [ 102.115397][T14893] ? folio_lruvec_lock_irqsave+0x10e/0x170 [ 102.116547][T14893] ? __warn.cold+0x110/0x210 [ 102.117461][T14893] ? folio_lruvec_lock_irqsave+0x10e/0x170 [ 102.118667][T14893] ? report_bug+0x1b9/0x320 [ 102.119571][T14893] ? handle_bug+0x54/0x90 [ 102.120494][T14893] ? exc_invalid_op+0x17/0x50 [ 102.121433][T14893] ? asm_exc_invalid_op+0x1a/0x20 [ 102.122435][T14893] ? __wake_up_klogd.part.0+0x76/0xd0 [ 102.123506][T14893] ? dump_page+0x4f/0x60 [ 102.124352][T14893] ? folio_lruvec_lock_irqsave+0x10e/0x170 [ 102.125500][T14893] folio_batch_move_lru+0xd4/0x200 [ 102.126577][T14893] ? __pfx_lru_add+0x10/0x10 [ 102.127505][T14893] __folio_batch_add_and_move+0x391/0x720 [ 102.128633][T14893] ? __pfx_lru_add+0x10/0x10 [ 102.129550][T14893] folio_putback_lru+0x16/0x80 [ 102.130564][T14893] migrate_device_finalize+0x9b/0x530 [ 102.131640][T14893] dmirror_migrate_to_device.constprop.0+0x7c5/0xad0 [ 102.133047][T14893] dmirror_fops_unlocked_ioctl+0x89b/0xc80 Likely, nothing else goes wrong: putting the last folio reference will remove the folio from the LRU again. So besides memcg complaining, adding the folio to be freed to the LRU is just an unnecessary step. The new flow resembles what we have in migrate_folio_move(): add the dst to the lru, remove migration ptes, unlock and unref dst. Link: https://lkml.kernel.org/r/20250210161317.717936-1-david@redhat.com Fixes: 8763cb45ab96 ("mm/migrate: new memory migration helper for use with device memory") Signed-off-by: David Hildenbrand Cc: Jérôme Glisse Cc: John Hubbard Cc: Alistair Popple Cc: Signed-off-by: Andrew Morton mm/migrate_device.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 035d3c778709680288b3954ee896043132bc3f8d Author: Florian Fainelli Date: Mon Feb 10 12:05:18 2025 -0800 tools/mm: fix build warnings with musl-libc musl-libc warns about the following: /home/florian/dev/buildroot/output/arm64/rpi4-b/host/aarch64-buildroot-linux-musl/sysroot/usr/include/sys/errno.h:1:2: attention: #warning redirecting incorrect #include to [-Wcpp] 1 | #warning redirecting incorrect #include to | ^~~~~~~ /home/florian/dev/buildroot/output/arm64/rpi4-b/host/aarch64-buildroot-linux-musl/sysroot/usr/include/sys/fcntl.h:1:2: attention: #warning redirecting incorrect #include to [-Wcpp] 1 | #warning redirecting incorrect #include to | ^~~~~~~ include errno.h and fcntl.h directly. Link: https://lkml.kernel.org/r/20250210200518.1137295-1-florian.fainelli@broadcom.com Signed-off-by: Florian Fainelli Signed-off-by: Andrew Morton tools/mm/page-types.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3219585e894c12cbffd4ac93d3e6783d236f146e Author: Feng Tang Date: Wed Feb 5 14:04:57 2025 +0800 mailmap: add entry for Feng Tang Map my old business email to personal email. Link: https://lkml.kernel.org/r/20250205060457.53667-1-feng.tang@linux.alibaba.com Signed-off-by: Feng Tang Signed-off-by: Andrew Morton .mailmap | 1 + 1 file changed, 1 insertion(+) commit 639375b0aa4323fe59b5fe2a6ebc68b022c36f50 Author: Jeff Johnson Date: Wed Feb 5 12:01:00 2025 -0800 .mailmap: add entries for Jeff Johnson Map past iterations of my e-mail addresses to the current one. Link: https://lkml.kernel.org/r/20250205-jjohnson-mailmap-v1-1-269cb7b1710d@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Andrew Morton .mailmap | 2 ++ 1 file changed, 2 insertions(+) commit 2ede647a6fde3e54a6bfda7cf01c716649655900 Author: Ricardo Cañuelo Navarro Date: Mon Feb 3 08:52:06 2025 +0100 mm,madvise,hugetlb: check for 0-length range after end address adjustment Add a sanity check to madvise_dontneed_free() to address a corner case in madvise where a race condition causes the current vma being processed to be backed by a different page size. During a madvise(MADV_DONTNEED) call on a memory region registered with a userfaultfd, there's a period of time where the process mm lock is temporarily released in order to send a UFFD_EVENT_REMOVE and let userspace handle the event. During this time, the vma covering the current address range may change due to an explicit mmap done concurrently by another thread. If, after that change, the memory region, which was originally backed by 4KB pages, is now backed by hugepages, the end address is rounded down to a hugepage boundary to avoid data loss (see "Fixes" below). This rounding may cause the end address to be truncated to the same address as the start. Make this corner case follow the same semantics as in other similar cases where the requested region has zero length (ie. return 0). This will make madvise_walk_vmas() continue to the next vma in the range (this time holding the process mm lock) which, due to the prev pointer becoming stale because of the vma change, will be the same hugepage-backed vma that was just checked before. The next time madvise_dontneed_free() runs for this vma, if the start address isn't aligned to a hugepage boundary, it'll return -EINVAL, which is also in line with the madvise api. From userspace perspective, madvise() will return EINVAL because the start address isn't aligned according to the new vma alignment requirements (hugepage), even though it was correctly page-aligned when the call was issued. Link: https://lkml.kernel.org/r/20250203075206.1452208-1-rcn@igalia.com Fixes: 8ebe0a5eaaeb ("mm,madvise,hugetlb: fix unexpected data loss with MADV_DONTNEED on hugetlbfs") Signed-off-by: Ricardo Cañuelo Navarro Reviewed-by: Oscar Salvador Cc: Florent Revest Cc: Rik van Riel Cc: Signed-off-by: Andrew Morton mm/madvise.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 63895d20d63b446f5049a963983489319c2ea3e2 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Wed Jan 29 19:08:44 2025 +0900 mm/zswap: fix inconsistency when zswap_store_page() fails Commit b7c0ccdfbafd ("mm: zswap: support large folios in zswap_store()") skips charging any zswap entries when it failed to zswap the entire folio. However, when some base pages are zswapped but it failed to zswap the entire folio, the zswap operation is rolled back. When freeing zswap entries for those pages, zswap_entry_free() uncharges the zswap entries that were not previously charged, causing zswap charging to become inconsistent. This inconsistency triggers two warnings with following steps: # On a machine with 64GiB of RAM and 36GiB of zswap $ stress-ng --bigheap 2 # wait until the OOM-killer kills stress-ng $ sudo reboot The two warnings are: in mm/memcontrol.c:163, function obj_cgroup_release(): WARN_ON_ONCE(nr_bytes & (PAGE_SIZE - 1)); in mm/page_counter.c:60, function page_counter_cancel(): if (WARN_ONCE(new < 0, "page_counter underflow: %ld nr_pages=%lu\n", new, nr_pages)) zswap_stored_pages also becomes inconsistent in the same way. As suggested by Kanchana, increment zswap_stored_pages and charge zswap entries within zswap_store_page() when it succeeds. This way, zswap_entry_free() will decrement the counter and uncharge the entries when it failed to zswap the entire folio. While this could potentially be optimized by batching objcg charging and incrementing the counter, let's focus on fixing the bug this time and leave the optimization for later after some evaluation. After resolving the inconsistency, the warnings disappear. [42.hyeyoo@gmail.com: refactor zswap_store_page()] Link: https://lkml.kernel.org/r/20250131082037.2426-1-42.hyeyoo@gmail.com Link: https://lkml.kernel.org/r/20250129100844.2935-1-42.hyeyoo@gmail.com Fixes: b7c0ccdfbafd ("mm: zswap: support large folios in zswap_store()") Co-developed-by: Kanchana P Sridhar Signed-off-by: Kanchana P Sridhar Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Yosry Ahmed Acked-by: Nhat Pham Cc: Chengming Zhou Cc: Johannes Weiner Cc: Signed-off-by: Andrew Morton mm/zswap.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) commit f4b78260fc678ccd7169f32dc9f3bfa3b93931c7 Author: Pavel Begunkov Date: Fri Jan 31 14:13:15 2025 +0000 lib/iov_iter: fix import_iovec_ubuf iovec management import_iovec() says that it should always be fine to kfree the iovec returned in @iovp regardless of the error code. __import_iovec_ubuf() never reallocates it and thus should clear the pointer even in cases when copy_iovec_*() fail. Link: https://lkml.kernel.org/r/378ae26923ffc20fd5e41b4360d673bf47b1775b.1738332461.git.asml.silence@gmail.com Fixes: 3b2deb0e46da ("iov_iter: import single vector iovecs as ITER_UBUF") Signed-off-by: Pavel Begunkov Reviewed-by: Jens Axboe Cc: Al Viro Cc: Christian Brauner Cc: Signed-off-by: Andrew Morton lib/iov_iter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c8a3e63ff9d75b9f3f031c90d218876051dea0ba Author: Bart Van Assche Date: Wed Jan 29 14:20:03 2025 -0800 procfs: fix a locking bug in a vmcore_add_device_dump() error path Unlock vmcore_mutex when returning -EBUSY. Link: https://lkml.kernel.org/r/20250129222003.1495713-1-bvanassche@acm.org Fixes: 0f3b1c40c652 ("fs/proc/vmcore: disallow vmcore modifications while the vmcore is open") Signed-off-by: Bart Van Assche Acked-by: Michael S. Tsirkin Acked-by: David Hildenbrand Cc: Baoquan he Signed-off-by: Andrew Morton fs/proc/vmcore.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0a4f598c84fc0eeb143ba03cdd3fc3d857061c3c Author: Jakub Kicinski Date: Sat Feb 15 14:52:00 2025 -0800 MAINTAINERS: create entry for ethtool MAC merge Vladimir implemented the MAC merge support and reviews all the new driver implementations. Acked-by: Vladimir Oltean Link: https://patch.msgid.link/20250215225200.2652212-1-kuba@kernel.org Signed-off-by: Jakub Kicinski MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit bdf5d13aa05ec314d4385b31ac974d6c7e0997c9 Author: Nick Child Date: Fri Feb 14 09:52:33 2025 -0600 ibmvnic: Don't reference skb after sending to VIOS Previously, after successfully flushing the xmit buffer to VIOS, the tx_bytes stat was incremented by the length of the skb. It is invalid to access the skb memory after sending the buffer to the VIOS because, at any point after sending, the VIOS can trigger an interrupt to free this memory. A race between reading skb->len and freeing the skb is possible (especially during LPM) and will result in use-after-free: ================================================================== BUG: KASAN: slab-use-after-free in ibmvnic_xmit+0x75c/0x1808 [ibmvnic] Read of size 4 at addr c00000024eb48a70 by task hxecom/14495 <...> Call Trace: [c000000118f66cf0] [c0000000018cba6c] dump_stack_lvl+0x84/0xe8 (unreliable) [c000000118f66d20] [c0000000006f0080] print_report+0x1a8/0x7f0 [c000000118f66df0] [c0000000006f08f0] kasan_report+0x128/0x1f8 [c000000118f66f00] [c0000000006f2868] __asan_load4+0xac/0xe0 [c000000118f66f20] [c0080000046eac84] ibmvnic_xmit+0x75c/0x1808 [ibmvnic] [c000000118f67340] [c0000000014be168] dev_hard_start_xmit+0x150/0x358 <...> Freed by task 0: kasan_save_stack+0x34/0x68 kasan_save_track+0x2c/0x50 kasan_save_free_info+0x64/0x108 __kasan_mempool_poison_object+0x148/0x2d4 napi_skb_cache_put+0x5c/0x194 net_tx_action+0x154/0x5b8 handle_softirqs+0x20c/0x60c do_softirq_own_stack+0x6c/0x88 <...> The buggy address belongs to the object at c00000024eb48a00 which belongs to the cache skbuff_head_cache of size 224 ================================================================== Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Nick Child Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250214155233.235559-1-nnac123@linux.ibm.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/ibm/ibmvnic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 915e34d5ad35a6a9e56113f852ade4a730fb88f0 Author: Julian Ruess Date: Fri Feb 14 13:01:37 2025 +0100 s390/ism: add release function for struct device According to device_release() in /drivers/base/core.c, a device without a release function is a broken device and must be fixed. The current code directly frees the device after calling device_add() without waiting for other kernel parts to release their references. Thus, a reference could still be held to a struct device, e.g., by sysfs, leading to potential use-after-free issues if a proper release function is not set. Fixes: 8c81ba20349d ("net/smc: De-tangle ism and smc device initialization") Reviewed-by: Alexandra Winter Reviewed-by: Wenjia Zhang Signed-off-by: Julian Ruess Signed-off-by: Alexandra Winter Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250214120137.563409-1-wintera@linux.ibm.com Signed-off-by: Jakub Kicinski drivers/s390/net/ism_drv.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 07b598c0e6f06a0f254c88dafb4ad50f8a8c6eea Author: Gavrilov Ilia Date: Thu Feb 13 15:20:55 2025 +0000 drop_monitor: fix incorrect initialization order Syzkaller reports the following bug: BUG: spinlock bad magic on CPU#1, syz-executor.0/7995 lock: 0xffff88805303f3e0, .magic: 00000000, .owner: /-1, .owner_cpu: 0 CPU: 1 PID: 7995 Comm: syz-executor.0 Tainted: G E 5.10.209+ #1 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x119/0x179 lib/dump_stack.c:118 debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] do_raw_spin_lock+0x1f6/0x270 kernel/locking/spinlock_debug.c:112 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:117 [inline] _raw_spin_lock_irqsave+0x50/0x70 kernel/locking/spinlock.c:159 reset_per_cpu_data+0xe6/0x240 [drop_monitor] net_dm_cmd_trace+0x43d/0x17a0 [drop_monitor] genl_family_rcv_msg_doit+0x22f/0x330 net/netlink/genetlink.c:739 genl_family_rcv_msg net/netlink/genetlink.c:783 [inline] genl_rcv_msg+0x341/0x5a0 net/netlink/genetlink.c:800 netlink_rcv_skb+0x14d/0x440 net/netlink/af_netlink.c:2497 genl_rcv+0x29/0x40 net/netlink/genetlink.c:811 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x54b/0x800 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x914/0xe00 net/netlink/af_netlink.c:1916 sock_sendmsg_nosec net/socket.c:651 [inline] __sock_sendmsg+0x157/0x190 net/socket.c:663 ____sys_sendmsg+0x712/0x870 net/socket.c:2378 ___sys_sendmsg+0xf8/0x170 net/socket.c:2432 __sys_sendmsg+0xea/0x1b0 net/socket.c:2461 do_syscall_64+0x30/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x62/0xc7 RIP: 0033:0x7f3f9815aee9 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3f972bf0c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f3f9826d050 RCX: 00007f3f9815aee9 RDX: 0000000020000000 RSI: 0000000020001300 RDI: 0000000000000007 RBP: 00007f3f981b63bd R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f3f9826d050 R15: 00007ffe01ee6768 If drop_monitor is built as a kernel module, syzkaller may have time to send a netlink NET_DM_CMD_START message during the module loading. This will call the net_dm_monitor_start() function that uses a spinlock that has not yet been initialized. To fix this, let's place resource initialization above the registration of a generic netlink family. Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 9a8afc8d3962 ("Network Drop Monitor: Adding drop monitor implementation & Netlink protocol") Cc: stable@vger.kernel.org Signed-off-by: Ilia Gavrilov Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20250213152054.2785669-1-Ilia.Gavrilov@infotecs.ru Signed-off-by: Jakub Kicinski net/core/drop_monitor.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit d7e3fd658248f257006227285095d190e70ee73a Author: Artur Rojek Date: Sun Feb 16 18:55:45 2025 +0100 irqchip/jcore-aic, clocksource/drivers/jcore: Fix jcore-pit interrupt request The jcore-aic irqchip does not have separate interrupt numbers reserved for cpu-local vs global interrupts. Therefore the device drivers need to request the given interrupt as per CPU interrupt. 69a9dcbd2d65 ("clocksource/drivers/jcore: Use request_percpu_irq()") converted the clocksource driver over to request_percpu_irq(), but failed to do add all the required changes, resulting in a failure to register PIT interrupts. Fix this by: 1) Explicitly mark the interrupt via irq_set_percpu_devid() in jcore_pit_init(). 2) Enable and disable the per CPU interrupt in the CPU hotplug callbacks. 3) Pass the correct per-cpu cookie to the irq handler by using handle_percpu_devid_irq() instead of handle_percpu_irq() in handle_jcore_irq(). [ tglx: Massage change log ] Fixes: 69a9dcbd2d65 ("clocksource/drivers/jcore: Use request_percpu_irq()") Signed-off-by: Artur Rojek Signed-off-by: Thomas Gleixner Acked-by: Uros Bizjak Link: https://lore.kernel.org/all/20250216175545.35079-3-contact@artur-rojek.eu drivers/clocksource/jcore-pit.c | 15 ++++++++++++++- drivers/irqchip/irq-jcore-aic.c | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) commit 4cb77793842a351b39a030f77caebace3524840e Author: Marc Zyngier Date: Sat Feb 15 18:52:41 2025 +0000 irqchip/gic-v3: Fix rk3399 workaround when secure interrupts are enabled Christoph reports that their rk3399 system dies since commit 773c05f417fa1 ("irqchip/gic-v3: Work around insecure GIC integrations"). It appears that some rk3399 have secure payloads, and that the firmware sets SCR_EL3.FIQ==1. Obivously, disabling security in that configuration leads to even more problems. Revisit the workaround by: - making it rk3399 specific - checking whether Group-0 is available, which is a good proxy for SCR_EL3.FIQ being 0 - either apply the workaround if Group-0 is available, or disable pseudo-NMIs if not Note that this doesn't mean that the secure side is able to receive interrupts, as all interrupts are made non-secure anyway. Clearly, nobody ever tested secure interrupts on this platform. Fixes: 773c05f417fa1 ("irqchip/gic-v3: Work around insecure GIC integrations") Reported-by: Christoph Fritz Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Tested-by: Christoph Fritz Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20250215185241.3768218-1-maz@kernel.org Closes: https://lore.kernel.org/r/b1266652fb64857246e8babdf268d0df8f0c36d9.camel@googlemail.com drivers/irqchip/irq-gic-v3.c | 53 +++++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 13 deletions(-) commit 2408a807bfc3f738850ef5ad5e3fd59d66168996 Merge: 6186bdd120ec a33f72554adf Author: Linus Torvalds Date: Mon Feb 17 10:38:25 2025 -0800 Merge tag 'vfs-6.14-rc4.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: "It was reported that the acct(2) system call can be used to trigger a NULL deref in cases where it is set to write to a file that triggers an internal lookup. This can e.g., happen when pointing acct(2) to /sys/power/resume. At the point the where the write to this file happens the calling task has already exited and called exit_fs() but an internal lookup might be triggered through lookup_bdev(). This may trigger a NULL-deref when accessing current->fs. Reorganize the code so that the the final write happens from the workqueue but with the caller's credentials. This preserves the (strange) permission model and has almost no regression risk. Also block access to kernel internal filesystems as well as procfs and sysfs in the first place. Various fixes for netfslib: - Fix a number of read-retry hangs, including: - Incorrect getting/putting of references on subreqs as we retry them - Failure to track whether a last old subrequest in a retried set is superfluous - Inconsistency in the usage of wait queues used for subrequests (ie. using clear_and_wake_up_bit() whilst waiting on a private waitqueue) - Add stats counters for retries and publish in /proc/fs/netfs/stats. This is not a fix per se, but is useful in debugging and shouldn't otherwise change the operation of the code - Fix the ordering of queuing subrequests with respect to setting the request flag that says we've now queued them all" * tag 'vfs-6.14-rc4.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: netfs: Fix setting NETFS_RREQ_ALL_QUEUED to be after all subreqs queued netfs: Add retry stat counters netfs: Fix a number of read-retry hangs acct: block access to kernel internal filesystems acct: perform last write from workqueue commit 6186bdd120eccf4ca44fcba8967fc59ea50b11b8 Merge: 0ad2507d5d93 d262a192d38e Author: Linus Torvalds Date: Mon Feb 17 10:32:19 2025 -0800 Merge tag 'powerpc-6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Madhavan Srinivasan: - Couple of patches to fix KASAN failduring boot - Fix to avoid warnings/errors when building with 4k page size Thanks to Christophe Leroy, Ritesh Harjani (IBM), and Erhard Furtner * tag 'powerpc-6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/code-patching: Fix KASAN hit by not flagging text patching area as VM_ALLOC powerpc/64s: Rewrite __real_pte() and __rpte_to_hidx() as static inline powerpc/code-patching: Disable KASAN report during patching via temporary mm commit e77aa4b2eaa7fb31b2a7a50214ecb946b2a8b0f6 Author: Takashi Iwai Date: Mon Feb 17 18:00:30 2025 +0100 ALSA: seq: Drop UMP events when no UMP-conversion is set When a destination client is a user client in the legacy MIDI mode and it sets the no-UMP-conversion flag, currently the all UMP events are still passed as-is. But this may confuse the user-space, because the event packet size is different from the legacy mode. Since we cannot handle UMP events in user clients unless it's running in the UMP client mode, we should filter out those events instead of accepting blindly. This patch addresses it by slightly adjusting the conditions for UMP event handling at the event delivery time. Fixes: 329ffe11a014 ("ALSA: seq: Allow suppressing UMP conversions") Link: https://lore.kernel.org/b77a2cd6-7b59-4eb0-a8db-22d507d3af5f@gmail.com Link: https://patch.msgid.link/20250217170034.21930-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 290237fde9491ca26cf4020bbf5a2b330452e7db Author: David Disseldorp Date: Mon Feb 10 22:17:29 2025 +1100 btrfs: selftests: fix btrfs_test_delayed_refs() leak of transaction The btrfs_transaction struct leaks, which can cause sporadic fstests failures when kmemleak checking is enabled: kmemleak: 5 new suspected memory leaks (see /sys/kernel/debug/kmemleak) > cat /sys/kernel/debug/kmemleak unreferenced object 0xffff88810fdc6c00 (size 512): comm "modprobe", pid 203, jiffies 4294892552 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 6736050f): __kmalloc_cache_noprof+0x133/0x2c0 btrfs_test_delayed_refs+0x6f/0xbb0 [btrfs] btrfs_run_sanity_tests.cold+0x91/0xf9 [btrfs] 0xffffffffa02fd055 do_one_initcall+0x49/0x1c0 do_init_module+0x5b/0x1f0 init_module_from_file+0x70/0x90 idempotent_init_module+0xe8/0x2c0 __x64_sys_finit_module+0x6b/0xd0 do_syscall_64+0x54/0x110 entry_SYSCALL_64_after_hwframe+0x76/0x7e The transaction struct was initially stack-allocated but switched to heap following frame size compiler warnings. Fixes: 2b34879d97e27 ("btrfs: selftests: add delayed ref self test cases") Signed-off-by: David Disseldorp Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/tests/delayed-refs-tests.c | 1 + 1 file changed, 1 insertion(+) commit dd8b0582e25e36bba483c60338741c0ba5bc426c Author: Ming Lei Date: Mon Feb 17 11:16:26 2025 +0800 block: fix NULL pointer dereferenced within __blk_rq_map_sg The block layer internal flush request may not have bio attached, so the request iterator has to be initialized from valid req->bio, otherwise NULL pointer dereferenced is triggered. Cc: Christoph Hellwig Reported-and-tested-by: Cheyenne Wills Fixes: b7175e24d6ac ("block: add a dma mapping iterator") Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250217031626.461977-1-ming.lei@redhat.com Signed-off-by: Jens Axboe block/blk-merge.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 07fb70d82e0df085980246bf17bc12537588795f Author: Ville Syrjälä Date: Wed Feb 12 18:43:21 2025 +0200 drm/i915: Make sure all planes in use by the joiner have their crtc included Any active plane needs to have its crtc included in the atomic state. For planes enabled via uapi that is all handler in the core. But when we use a plane for joiner the uapi code things the plane is disabled and therefore doesn't have a crtc. So we need to pull those in by hand. We do it first thing in intel_joiner_add_affected_crtcs() so that any newly added crtc will subsequently pull in all of its joined crtcs as well. The symptoms from failing to do this are: - duct tape in the form of commit 1d5b09f8daf8 ("drm/i915: Fix NULL ptr deref by checking new_crtc_state") - the plane's hw state will get overwritten by the disabled uapi state if it can't find the uapi counterpart plane in the atomic state from where it should copy the correct state Cc: stable@vger.kernel.org Reviewed-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250212164330.16891-2-ville.syrjala@linux.intel.com (cherry picked from commit 91077d1deb5374eb8be00fb391710f00e751dc4b) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_display.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 166ce267ae3f96e439d8ccc838e8ec4d8b4dab73 Author: Imre Deak Date: Fri Feb 14 16:19:52 2025 +0200 drm/i915/ddi: Fix HDMI port width programming in DDI_BUF_CTL Fix the port width programming in the DDI_BUF_CTL register on MTLP+, where this had an off-by-one error. Cc: # v6.5+ Fixes: b66a8abaa48a ("drm/i915/display/mtl: Fill port width in DDI_BUF_/TRANS_DDI_FUNC_/PORT_BUF_CTL for HDMI") Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20250214142001.552916-3-imre.deak@intel.com (cherry picked from commit b2ecdabe46d23db275f94cd7c46ca414a144818b) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_ddi.c | 2 +- drivers/gpu/drm/i915/i915_reg.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 879f70382ff3e92fc854589ada3453e3f5f5b601 Author: Imre Deak Date: Fri Feb 14 16:19:51 2025 +0200 drm/i915/dsi: Use TRANS_DDI_FUNC_CTL's own port width macro The format of the port width field in the DDI_BUF_CTL and the TRANS_DDI_FUNC_CTL registers are different starting with MTL, where the x3 lane mode for HDMI FRL has a different encoding in the two registers. To account for this use the TRANS_DDI_FUNC_CTL's own port width macro. Cc: # v6.5+ Fixes: b66a8abaa48a ("drm/i915/display/mtl: Fill port width in DDI_BUF_/TRANS_DDI_FUNC_/PORT_BUF_CTL for HDMI") Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20250214142001.552916-2-imre.deak@intel.com (cherry picked from commit 76120b3a304aec28fef4910204b81a12db8974da) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/icl_dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0c455f3a12298e9c89a78d2f3327e15e52c0adc5 Author: Lucas De Marchi Date: Thu Feb 13 11:28:59 2025 -0800 drm/xe: Fix error handling in xe_irq_install() When devm_add_action_or_reset() fails, it already calls the function passed as parameter and that function is already free'ing the irqs. Drop the goto and just return. The caller, xe_device_probe(), should also do the same thing instead of wrongly doing `goto err` and calling the unrelated xe_display_fini() function. Fixes: 14d25d8d684d ("drm/xe: change old msi irq api to a new one") Reviewed-by: Rodrigo Vivi Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20250213192909.996148-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 121b214cdf10d4129b64f2b1f31807154c74ae55) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_irq.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit e49477f7f78598295551d486ecc7f020d796432e Author: Krzysztof Karas Date: Thu Jan 16 10:40:46 2025 +0000 drm/i915/gt: Use spin_lock_irqsave() in interruptible context spin_lock/unlock() functions used in interrupt contexts could result in a deadlock, as seen in GitLab issue #13399, which occurs when interrupt comes in while holding a lock. Try to remedy the problem by saving irq state before spin lock acquisition. v2: add irqs' state save/restore calls to all locks/unlocks in signal_irq_work() execution (Maciej) v3: use with spin_lock_irqsave() in guc_lrc_desc_unpin() instead of other lock/unlock calls and add Fixes and Cc tags (Tvrtko); change title and commit message Fixes: 2f2cc53b5fe7 ("drm/i915/guc: Close deregister-context race against CT-loss") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13399 Signed-off-by: Krzysztof Karas Cc: # v6.9+ Reviewed-by: Maciej Patelczyk Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/pusppq5ybyszau2oocboj3mtj5x574gwij323jlclm5zxvimmu@mnfg6odxbpsv (cherry picked from commit c088387ddd6482b40f21ccf23db1125e8fa4af7e) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 539bd20352832b9244238a055eb169ccf1c41ff6 Author: Amit Kumar Mahapatra Date: Thu Feb 13 11:15:46 2025 +0530 mtd: spi-nor: sst: Fix SST write failure 'commit 18bcb4aa54ea ("mtd: spi-nor: sst: Factor out common write operation to `sst_nor_write_data()`")' introduced a bug where only one byte of data is written, regardless of the number of bytes passed to sst_nor_write_data(), causing a kernel crash during the write operation. Ensure the correct number of bytes are written as passed to sst_nor_write_data(). Call trace: [ 57.400180] ------------[ cut here ]------------ [ 57.404842] While writing 2 byte written 1 bytes [ 57.409493] WARNING: CPU: 0 PID: 737 at drivers/mtd/spi-nor/sst.c:187 sst_nor_write_data+0x6c/0x74 [ 57.418464] Modules linked in: [ 57.421517] CPU: 0 UID: 0 PID: 737 Comm: mtd_debug Not tainted 6.12.0-g5ad04afd91f9 #30 [ 57.429517] Hardware name: Xilinx Versal A2197 Processor board revA - x-prc-02 revA (DT) [ 57.437600] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 57.444557] pc : sst_nor_write_data+0x6c/0x74 [ 57.448911] lr : sst_nor_write_data+0x6c/0x74 [ 57.453264] sp : ffff80008232bb40 [ 57.456570] x29: ffff80008232bb40 x28: 0000000000010000 x27: 0000000000000001 [ 57.463708] x26: 000000000000ffff x25: 0000000000000000 x24: 0000000000000000 [ 57.470843] x23: 0000000000010000 x22: ffff80008232bbf0 x21: ffff000816230000 [ 57.477978] x20: ffff0008056c0080 x19: 0000000000000002 x18: 0000000000000006 [ 57.485112] x17: 0000000000000000 x16: 0000000000000000 x15: ffff80008232b580 [ 57.492246] x14: 0000000000000000 x13: ffff8000816d1530 x12: 00000000000004a4 [ 57.499380] x11: 000000000000018c x10: ffff8000816fd530 x9 : ffff8000816d1530 [ 57.506515] x8 : 00000000fffff7ff x7 : ffff8000816fd530 x6 : 0000000000000001 [ 57.513649] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000 [ 57.520782] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0008049b0000 [ 57.527916] Call trace: [ 57.530354] sst_nor_write_data+0x6c/0x74 [ 57.534361] sst_nor_write+0xb4/0x18c [ 57.538019] mtd_write_oob_std+0x7c/0x88 [ 57.541941] mtd_write_oob+0x70/0xbc [ 57.545511] mtd_write+0x68/0xa8 [ 57.548733] mtdchar_write+0x10c/0x290 [ 57.552477] vfs_write+0xb4/0x3a8 [ 57.555791] ksys_write+0x74/0x10c [ 57.559189] __arm64_sys_write+0x1c/0x28 [ 57.563109] invoke_syscall+0x54/0x11c [ 57.566856] el0_svc_common.constprop.0+0xc0/0xe0 [ 57.571557] do_el0_svc+0x1c/0x28 [ 57.574868] el0_svc+0x30/0xcc [ 57.577921] el0t_64_sync_handler+0x120/0x12c [ 57.582276] el0t_64_sync+0x190/0x194 [ 57.585933] ---[ end trace 0000000000000000 ]--- Cc: stable@vger.kernel.org Fixes: 18bcb4aa54ea ("mtd: spi-nor: sst: Factor out common write operation to `sst_nor_write_data()`") Signed-off-by: Amit Kumar Mahapatra Reviewed-by: Pratyush Yadav Reviewed-by: Tudor Ambarus Reviewed-by: Bence Csókás [pratyush@kernel.org: add Cc stable tag] Signed-off-by: Pratyush Yadav Link: https://lore.kernel.org/r/20250213054546.2078121-1-amit.kumar-mahapatra@amd.com drivers/mtd/spi-nor/sst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d1f86610f23b0bc334d6506a186f21a98f51392 Author: John Veness Date: Mon Feb 17 12:15:50 2025 +0000 ALSA: hda/conexant: Add quirk for HP ProBook 450 G4 mute LED Allows the LED on the dedicated mute button on the HP ProBook 450 G4 laptop to change colour correctly. Signed-off-by: John Veness Cc: Link: https://patch.msgid.link/2fb55d48-6991-4a42-b591-4c78f2fad8d7@pelago.org.uk Signed-off-by: Takashi Iwai sound/pci/hda/patch_conexant.c | 1 + 1 file changed, 1 insertion(+) commit 351e02b1733b057e33fe13fc03ca93ec799e4f78 Author: Andrew Jones Date: Mon Feb 17 09:45:12 2025 +0100 riscv: KVM: Fix SBI sleep_type use The spec says sleep_type is 32 bits wide and "In case the data is defined as 32bit wide, higher privilege software must ensure that it only uses 32 bit data." Mask off upper bits of sleep_type before using it. Fixes: 023c15151fbb ("RISC-V: KVM: Add SBI system suspend support") Signed-off-by: Andrew Jones Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20250217084506.18763-12-ajones@ventanamicro.com Signed-off-by: Anup Patel arch/riscv/kvm/vcpu_sbi_system.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b901484852992cf3d162a5eab72251cc813ca624 Author: Andrew Jones Date: Mon Feb 17 09:45:11 2025 +0100 riscv: KVM: Fix SBI TIME error generation When an invalid function ID of an SBI extension is used we should return not-supported, not invalid-param. Fixes: 5f862df5585c ("RISC-V: KVM: Add v0.1 replacement SBI extensions defined in v0.2") Signed-off-by: Andrew Jones Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20250217084506.18763-11-ajones@ventanamicro.com Signed-off-by: Anup Patel arch/riscv/kvm/vcpu_sbi_replace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0611f78f83c93c000029ab01daa28166d03590ed Author: Andrew Jones Date: Mon Feb 17 09:45:10 2025 +0100 riscv: KVM: Fix SBI IPI error generation When an invalid function ID of an SBI extension is used we should return not-supported, not invalid-param. Also, when we see that at least one hartid constructed from the base and mask parameters is invalid, then we should return invalid-param. Finally, rather than relying on overflowing a left shift to result in zero and then using that zero in a condition which [correctly] skips sending an IPI (but loops unnecessarily), explicitly check for overflow and exit the loop immediately. Fixes: 5f862df5585c ("RISC-V: KVM: Add v0.1 replacement SBI extensions defined in v0.2") Signed-off-by: Andrew Jones Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20250217084506.18763-10-ajones@ventanamicro.com Signed-off-by: Anup Patel arch/riscv/kvm/vcpu_sbi_replace.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit e3219b0c491f2aa0e0b200a39d3352ab05cdda96 Author: Andrew Jones Date: Mon Feb 17 09:45:09 2025 +0100 riscv: KVM: Fix hart suspend_type use The spec says suspend_type is 32 bits wide and "In case the data is defined as 32bit wide, higher privilege software must ensure that it only uses 32 bit data." Mask off upper bits of suspend_type before using it. Fixes: 763c8bed8c05 ("RISC-V: KVM: Implement SBI HSM suspend call") Signed-off-by: Andrew Jones Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20250217084506.18763-9-ajones@ventanamicro.com Signed-off-by: Anup Patel arch/riscv/kvm/vcpu_sbi_hsm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c7db342e3b4744688be1e27e31254c1d31a35274 Author: Andrew Jones Date: Mon Feb 17 09:45:08 2025 +0100 riscv: KVM: Fix hart suspend status check "Not stopped" means started or suspended so we need to check for a single state in order to have a chance to check for each state. Also, we need to use target_vcpu when checking for the suspend state. Fixes: 763c8bed8c05 ("RISC-V: KVM: Implement SBI HSM suspend call") Signed-off-by: Andrew Jones Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20250217084506.18763-8-ajones@ventanamicro.com Signed-off-by: Anup Patel arch/riscv/kvm/vcpu_sbi_hsm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4e667a1968099c6deadee2313ecd648f8f0a8956 Author: Johan Korsnes Date: Mon Feb 17 10:16:43 2025 +0100 gpio: vf610: add locking to gpio direction functions Add locking to `vf610_gpio_direction_input|output()` functions. Without this locking, a race condition exists between concurrent calls to these functions, potentially leading to incorrect GPIO direction settings. To verify the correctness of this fix, a `trylock` patch was applied, where after a couple of reboots the race was confirmed. I.e., one user had to wait before acquiring the lock. With this patch the race has not been encountered. It's worth mentioning that any type of debugging (printing, tracing, etc.) would "resolve"/hide the issue. Fixes: 659d8a62311f ("gpio: vf610: add imx7ulp support") Signed-off-by: Johan Korsnes Reviewed-by: Linus Walleij Reviewed-by: Haibo Chen Cc: Bartosz Golaszewski Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250217091643.679644-1-johan.korsnes@remarkable.no Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-vf610.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9d846b1aebbe488f245f1aa463802ff9c34cc078 Author: Bartosz Golaszewski Date: Mon Feb 10 11:51:55 2025 +0100 gpiolib: check the return value of gpio_chip::get_direction() As per the API contract - gpio_chip::get_direction() may fail and return a negative error number. However, we treat it as if it always returned 0 or 1. Check the return value of the callback and propagate the error number up the stack. Cc: stable@vger.kernel.org Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250210-gpio-sanitize-retvals-v1-1-12ea88506cb2@linaro.org Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib.c | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) commit c19525b5fb71a355079063bb14adcddae60cf922 Author: Milan Broz Date: Sun Feb 16 11:42:10 2025 +0100 dm-integrity: Do not emit journal configuration in DM table for Inline mode The Inline mode does not use a journal; it makes no sense to print journal information in DM table. Print it only if the journal is used. The same applies to interleave_sectors (unused for Inline mode). Also, add comments for arg_count, as the current calculation is quite obscure. Signed-off-by: Milan Broz Signed-off-by: Mikulas Patocka drivers/md/dm-integrity.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 7fb39882b20c98a9a393c244c86b56ef6933cff8 Author: Milan Broz Date: Sun Feb 16 11:42:09 2025 +0100 dm-integrity: Avoid divide by zero in table status in Inline mode In Inline mode, the journal is unused, and journal_sectors is zero. Calculating the journal watermark requires dividing by journal_sectors, which should be done only if the journal is configured. Otherwise, a simple table query (dmsetup table) can cause OOPS. This bug did not show on some systems, perhaps only due to compiler optimization. On my 32-bit testing machine, this reliably crashes with the following: : Oops: divide error: 0000 [#1] PREEMPT SMP : CPU: 0 UID: 0 PID: 2450 Comm: dmsetup Not tainted 6.14.0-rc2+ #959 : EIP: dm_integrity_status+0x2f8/0xab0 [dm_integrity] ... Signed-off-by: Milan Broz Signed-off-by: Mikulas Patocka Fixes: fb0987682c62 ("dm-integrity: introduce the Inline mode") Cc: stable@vger.kernel.org # 6.11+ drivers/md/dm-integrity.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 037e81fb9d2dfe7b31fd97e5f578854e38f09887 Author: Borislav Petkov (AMD) Date: Thu Jan 23 13:02:32 2025 +0100 x86/microcode/AMD: Add get_patch_level() Put the MSR_AMD64_PATCH_LEVEL reading of the current microcode revision the hw has, into a separate function. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20250211163648.30531-6-bp@kernel.org arch/x86/kernel/cpu/microcode/amd.c | 46 +++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 22 deletions(-) commit b39c387164879eef71886fc93cee5ca7dd7bf500 Author: Borislav Petkov (AMD) Date: Thu Jan 23 12:51:37 2025 +0100 x86/microcode/AMD: Get rid of the _load_microcode_amd() forward declaration Simply move save_microcode_in_initrd() down. No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20250211163648.30531-5-bp@kernel.org arch/x86/kernel/cpu/microcode/amd.c | 54 ++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 28 deletions(-) commit dc15675074dcfd79a2f10a6e39f96b0244961a01 Author: Borislav Petkov (AMD) Date: Thu Jan 23 12:46:45 2025 +0100 x86/microcode/AMD: Merge early_apply_microcode() into its single callsite No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20250211163648.30531-4-bp@kernel.org arch/x86/kernel/cpu/microcode/amd.c | 60 ++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 34 deletions(-) commit 3ef0740d10b005a45e8ae5b4b7b5d37bfddf63c0 Author: Borislav Petkov (AMD) Date: Thu Jan 23 12:23:47 2025 +0100 x86/microcode/AMD: Remove unused save_microcode_in_initrd_amd() declarations Commit a7939f016720 ("x86/microcode/amd: Cache builtin/initrd microcode early") renamed it to save_microcode_in_initrd() and made it static. Zap the forgotten declarations. No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20250211163648.30531-3-bp@kernel.org arch/x86/kernel/cpu/microcode/amd.c | 2 +- arch/x86/kernel/cpu/microcode/internal.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit 7103f0589ac220eac3d2b1e8411494b31b883d06 Author: Borislav Petkov (AMD) Date: Thu Jan 23 13:14:34 2025 +0100 x86/microcode/AMD: Remove ugly linebreak in __verify_patch_section() signature No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20250211163648.30531-2-bp@kernel.org arch/x86/kernel/cpu/microcode/amd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3d7a20f9ba7b09a35df4bdb5f0ddb2a0c8a4f39e Author: Tudor Ambarus Date: Thu Feb 13 08:03:41 2025 +0000 MAINTAINERS: add tambarus as R for Samsung SPI I'm currently working on a Samsung SoC which includes SPI. I'd like to be Cc'ed to further contributions and help on reviewing them. Add me as reviewer. Signed-off-by: Tudor Ambarus Acked-by: Andi Shyti Reviewed-by: Sam Protsenko Link: https://patch.msgid.link/20250213-gs101-spi-r-v1-1-1e3ab8096873@linaro.org Signed-off-by: Mark Brown MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 99e6ea912340d6a262a60d5dd0c87c5e7b2d6ff2 Author: Claudiu Beznea Date: Fri Feb 7 13:21:45 2025 +0100 spi: atmel-quadspi: remove references to runtime PM on error path There is no need to call runtime PM put APIs on error path of `atmel_qspi_sama7g5_transfer()` as the caller (`atmel_qspi_exec_op()`) of it will take care of this if needed. Fixes: 5af42209a4d2 ("spi: atmel-quadspi: Add support for sama7g5 QSPI") Signed-off-by: Claudiu Beznea Signed-off-by: Durai Manickam KR Reported-by: Alexander Dahl Closes: https://lore.kernel.org/linux-spi/20250109-carat-festivity-5f088e1add3c@thorsis.com/ [ csokas.bence: Rebase and clarify msg, fix/add tags ] Signed-off-by: Bence Csókás Link: https://patch.msgid.link/20250207122145.162183-2-csokas.bence@prolan.hu Signed-off-by: Mark Brown drivers/spi/atmel-quadspi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 579cd64b9df8a60284ec3422be919c362de40e41 Author: Hector Martin Date: Sat Feb 8 00:54:35 2025 +0000 ASoC: tas2770: Fix volume scale The scale starts at -100dB, not -128dB. Signed-off-by: Hector Martin Signed-off-by: Mark Brown Link: https://patch.msgid.link/20250208-asoc-tas2770-v1-1-cf50ff1d59a3@kernel.org Signed-off-by: Mark Brown sound/soc/codecs/tas2770.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 654292a0b264e9b8c51b98394146218a21612aa1 Author: Paulo Alcantara Date: Sun Feb 16 18:02:47 2025 -0300 smb: client: fix chmod(2) regression with ATTR_READONLY When the user sets a file or directory as read-only (e.g. ~S_IWUGO), the client will set the ATTR_READONLY attribute by sending an SMB2_SET_INFO request to the server in cifs_setattr_{,nounix}(), but cifsInodeInfo::cifsAttrs will be left unchanged as the client will only update the new file attributes in the next call to {smb311_posix,cifs}_get_inode_info() with the new metadata filled in @data parameter. Commit a18280e7fdea ("smb: cilent: set reparse mount points as automounts") mistakenly removed the @data NULL check when calling is_inode_cache_good(), which broke the above case as the new ATTR_READONLY attribute would end up not being updated on files with a read lease. Fix this by updating the inode whenever we have cached metadata in @data parameter. Reported-by: Horst Reiterer Closes: https://lore.kernel.org/r/85a16504e09147a195ac0aac1c801280@fabasoft.com Fixes: a18280e7fdea ("smb: cilent: set reparse mount points as automounts") Cc: stable@vger.kernel.org Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ad2507d5d93f39619fc42372c347d6006b64319 Author: Linus Torvalds Date: Sun Feb 16 14:02:44 2025 -0800 Linux 6.14-rc3 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 224e74511041c2d33dcf24adf54d447eb72399c8 Merge: ae5fa8ce7ef2 b28fb1f2ef45 Author: Linus Torvalds Date: Sun Feb 16 12:58:51 2025 -0800 Merge tag 'kbuild-fixes-v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Fix annoying logs when building tools in parallel - Fix the Debian linux-headers package build again - Fix the target triple detection for userspace programs on Clang * tag 'kbuild-fixes-v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: modpost: Fix a few typos in a comment kbuild: userprogs: fix bitsize and target detection on clang kbuild: fix linux-headers package build when $(CC) cannot link userspace tools: fix annoying "mkdir -p ..." logs when building tools in parallel commit ae5fa8ce7ef230be50ed63d16883bada29990293 Merge: 56400391b1d3 78418f300d39 Author: Linus Torvalds Date: Sun Feb 16 12:54:42 2025 -0800 Merge tag 'driver-core-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core api addition from Greg KH: "Here is a driver core new api for 6.14-rc3 that is being added to allow platform devices from stop being abused. It adds a new 'faux_device' structure and bus and api to allow almost a straight or simpler conversion from platform devices that were not really a platform device. It also comes with a binding for rust, with an example driver in rust showing how it's used. I'm adding this now so that the patches that convert the different drivers and subsystems can all start flowing into linux-next now through their different development trees, in time for 6.15-rc1. We have a number that are already reviewed and tested, but adding those conversions now doesn't seem right. For now, no one is using this, and it passes all build tests from 0-day and linux-next, so all should be good" * tag 'driver-core-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: rust/kernel: Add faux device bindings driver core: add a faux bus for use when a simple device/bus is needed commit 56400391b1d312a14f912f36d2f04b0dba0d4a2f Merge: 6bfcc5fb2fce 9e512eaaf8f4 Author: Linus Torvalds Date: Sun Feb 16 12:50:44 2025 -0800 Merge tag 'tty-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull serial driver fixes from Greg KH: "Here are some small serial driver fixes for some reported problems. Nothing major, just: - sc16is7xx irq check fix - 8250 fifo underflow fix - serial_port and 8250 iotype fixes Most of these have been in linux-next already, and all have passed 0-day testing" * tag 'tty-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: 8250: Fix fifo underflow on flush serial: 8250_pnp: Remove unneeded ->iotype assignment serial: 8250_platform: Remove unneeded ->iotype assignment serial: 8250_of: Remove unneeded ->iotype assignment serial: port: Make ->iotype validation global in __uart_read_properties() serial: port: Always update ->iotype in __uart_read_properties() serial: port: Assign ->iotype correctly when ->iobase is set serial: sc16is7xx: Fix IRQ number check behavior commit 6bfcc5fb2fcee1e914708ce55b70e707d03d8097 Merge: ba643b6d8440 659f5d55feb7 Author: Linus Torvalds Date: Sun Feb 16 11:15:50 2025 -0800 Merge tag 'usb-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB driver fixes, and new device ids, for 6.14-rc3. Lots of tiny stuff for reported problems, including: - new device ids and quirks - usb hub crash fix found by syzbot - dwc2 driver fix - dwc3 driver fixes - uvc gadget driver fix - cdc-acm driver fixes for a variety of different issues - other tiny bugfixes Almost all of these have been in linux-next this week, and all have passed 0-day testing" * tag 'usb-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (25 commits) usb: typec: tcpm: PSSourceOffTimer timeout in PR_Swap enters ERROR_RECOVERY usb: roles: set switch registered flag early on usb: gadget: uvc: Fix unstarted kthread worker USB: quirks: add USB_QUIRK_NO_LPM quirk for Teclast dist usb: gadget: core: flush gadget workqueue after device removal USB: gadget: f_midi: f_midi_complete to call queue_work usb: core: fix pipe creation for get_bMaxPacketSize0 usb: dwc3: Fix timeout issue during controller enter/exit from halt state USB: Add USB_QUIRK_NO_LPM quirk for sony xperia xz1 smartphone USB: cdc-acm: Fill in Renesas R-Car D3 USB Download mode quirk usb: cdc-acm: Fix handling of oversized fragments usb: cdc-acm: Check control transfer buffer size before access usb: xhci: Restore xhci_pci support for Renesas HCs USB: pci-quirks: Fix HCCPARAMS register error for LS7A EHCI USB: serial: option: drop MeiG Smart defines USB: serial: option: fix Telit Cinterion FN990A name USB: serial: option: add Telit Cinterion FN990B compositions USB: serial: option: add MeiG Smart SLM828 usb: gadget: f_midi: fix MIDI Streaming descriptor lengths usb: dwc2: gadget: remove of_node reference upon udc_stop ... commit ba643b6d84409e8a9057d5bdd6dd99255b1a88fe Merge: ff1848d81ca6 4cf7d58620bf Author: Linus Torvalds Date: Sun Feb 16 10:55:17 2025 -0800 Merge tag 'irq_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq Kconfig cleanup from Borislav Petkov: - Remove an unused config item GENERIC_PENDING_IRQ_CHIPFLAGS * tag 'irq_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Remove unused CONFIG_GENERIC_PENDING_IRQ_CHIPFLAGS commit ff1848d81ca63e49bce57c29ffb12c6539333ac4 Merge: ff3b373ecc88 c631a2de7ae4 Author: Linus Torvalds Date: Sun Feb 16 10:41:50 2025 -0800 Merge tag 'perf_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 perf fixes from Borislav Petkov: - Explicitly clear DEBUGCTL.LBR to prevent LBRs continuing being enabled after handoff to the OS - Check CPUID(0x23) leaf and subleafs presence properly - Remove the PEBS-via-PT feature from being supported on hybrid systems - Fix perf record/top default commands on systems without a raw PMU registered * tag 'perf_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Ensure LBRs are disabled when a CPU is starting perf/x86/intel: Fix ARCH_PERFMON_NUM_COUNTER_LEAF perf/x86/intel: Clean up PEBS-via-PT on hybrid perf/x86/rapl: Fix the error checking order commit ff3b373ecc88098103b6ae80d96d6527210b2e64 Merge: 592c358ea963 bcc6244e13b4 Author: Linus Torvalds Date: Sun Feb 16 10:38:24 2025 -0800 Merge tag 'sched_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Borislav Petkov: - Clarify what happens when a task is woken up from the wake queue and make clear its removal from that queue is atomic * tag 'sched_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched: Clarify wake_up_q()'s write to task->wake_q.next commit 592c358ea963d7227e3e7b8ace91b2b5dd81f6cb Merge: 82ff31645685 7e501637bd5b Author: Linus Torvalds Date: Sun Feb 16 10:30:58 2025 -0800 Merge tag 'objtool_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fixes from Borislav Petkov: - Move a warning about a lld.ld breakage into the verbose setting as said breakage has been fixed in the meantime - Teach objtool to ignore dangling jump table entries added by Clang * tag 'objtool_urgent_for_v6.14_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Move dodgy linker warn to verbose objtool: Ignore dangling jump table entries commit 82ff31645685559e3732f7143538c9fe88221453 Merge: b878a1c072a4 d3d0b8dfe060 Author: Linus Torvalds Date: Sun Feb 16 10:25:12 2025 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM: - Large set of fixes for vector handling, especially in the interactions between host and guest state. This fixes a number of bugs affecting actual deployments, and greatly simplifies the FP/SIMD/SVE handling. Thanks to Mark Rutland for dealing with this thankless task. - Fix an ugly race between vcpu and vgic creation/init, resulting in unexpected behaviours - Fix use of kernel VAs at EL2 when emulating timers with nVHE - Small set of pKVM improvements and cleanups x86: - Fix broken SNP support with KVM module built-in, ensuring the PSP module is initialized before KVM even when the module infrastructure cannot be used to order initcalls - Reject Hyper-V SEND_IPI hypercalls if the local APIC isn't being emulated by KVM to fix a NULL pointer dereference - Enter guest mode (L2) from KVM's perspective before initializing the vCPU's nested NPT MMU so that the MMU is properly tagged for L2, not L1 - Load the guest's DR6 outside of the innermost .vcpu_run() loop, as the guest's value may be stale if a VM-Exit is handled in the fastpath" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (25 commits) x86/sev: Fix broken SNP support with KVM module built-in KVM: SVM: Ensure PSP module is initialized if KVM module is built-in crypto: ccp: Add external API interface for PSP module initialization KVM: arm64: vgic: Hoist SGI/PPI alloc from vgic_init() to kvm_create_vgic() KVM: arm64: timer: Drop warning on failed interrupt signalling KVM: arm64: Fix alignment of kvm_hyp_memcache allocations KVM: arm64: Convert timer offset VA when accessed in HYP code KVM: arm64: Simplify warning in kvm_arch_vcpu_load_fp() KVM: arm64: Eagerly switch ZCR_EL{1,2} KVM: arm64: Mark some header functions as inline KVM: arm64: Refactor exit handlers KVM: arm64: Refactor CPTR trap deactivation KVM: arm64: Remove VHE host restore of CPACR_EL1.SMEN KVM: arm64: Remove VHE host restore of CPACR_EL1.ZEN KVM: arm64: Remove host FPSIMD saving for non-protected KVM KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state KVM: x86: Load DR6 with guest value only before entering .vcpu_run() loop KVM: nSVM: Enter guest mode before initializing nested NPT MMU KVM: selftests: Add CPUID tests for Hyper-V features that need in-kernel APIC KVM: selftests: Manage CPUID array in Hyper-V CPUID test's core helper ... commit b878a1c072a4912e14a38e90a8b1883d4c513d9d Merge: ad1b832bf1cf 733a90561ad0 Author: Linus Torvalds Date: Sun Feb 16 10:19:41 2025 -0800 Merge tag 'mips-fixes_6.14_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: "Fix for o32 ptrace/get_syscall_info" * tag 'mips-fixes_6.14_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: fix mips_get_syscall_arg() for o32 MIPS: Export syscall stack arguments properly for remote use commit ad1b832bf1cf2df9304f8eb72943111625c7e5a7 Merge: ad73b9a17d66 038e33fcd40e Author: Linus Torvalds Date: Sat Feb 15 17:20:39 2025 -0800 Merge tag 'devicetree-fixes-for-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Add bindings for QCom QCS8300 clocks, QCom SAR2130P qfprom, and powertip,{st7272|hx8238a} displays - Fix compatible for TI am62a7 dss - Add a kunit test for __of_address_resource_bounds() * tag 'devicetree-fixes-for-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: display: Add powertip,{st7272|hx8238a} as DT Schema description dt-bindings: nvmem: qcom,qfprom: Add SAR2130P compatible dt-bindings: display: ti: Fix compatible for am62a7 dss of: address: Add kunit test for __of_address_resource_bounds() dt-bindings: clock: qcom: Add QCS8300 video clock controller dt-bindings: clock: qcom: Add CAMCC clocks for QCS8300 dt-bindings: clock: qcom: Add GPU clocks for QCS8300 commit ad73b9a17d66366d8c9198bc90f1ea99f24a912c Merge: 5784d8c93eb0 96178631c3f5 Author: Linus Torvalds Date: Sat Feb 15 17:14:53 2025 -0800 Merge tag 'uml-for-linus-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux Pull UML fixes from Richard Weinberger: - Align signal stack correctly - Convert to raw spinlocks where needed (irq and virtio) - FPU related fixes * tag 'uml-for-linus-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: um: convert irq_lock to raw spinlock um: virtio_uml: use raw spinlock um: virt-pci: don't use kmalloc() um: fix execve stub execution on old host OSs um: properly align signal stack on x86_64 um: avoid copying FP state from init_task um: add back support for FXSAVE registers commit 5784d8c93eb0c3b26cbaa86237c3b106657fc0c1 Merge: 496659003dac 97937834ae87 Author: Linus Torvalds Date: Sat Feb 15 16:34:41 2025 -0800 Merge tag 'trace-ring-buffer-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull trace ring buffer fixes from Steven Rostedt: - Enable resize on mmap() error When a process mmaps a ring buffer, its size is locked and resizing is disabled. But if the user passes in a wrong parameter, the mmap() can fail after the resize was disabled and the mmap() exits with error without reenabling the ring buffer resize. This prevents the ring buffer from ever being resized after that. Reenable resizing of the ring buffer on mmap() error. - Have resizing return proper error and not always -ENOMEM If the ring buffer is mmapped by one task and another task tries to resize the buffer it will error with -ENOMEM. This is confusing to the user as there may be plenty of memory available. Have it return the error that actually happens (in this case -EBUSY) where the user can understand why the resize failed. - Test the sub-buffer array to validate persistent memory buffer On boot up, the initialization of the persistent memory buffer will do a validation check to see if the content of the data is valid, and if so, it will use the memory as is, otherwise it re-initializes it. There's meta data in this persistent memory that keeps track of which sub-buffer is the reader page and an array that states the order of the sub-buffers. The values in this array are indexes into the sub-buffers. The validator checks to make sure that all the entries in the array are within the sub-buffer list index, but it does not check for duplications. While working on this code, the array got corrupted and had duplicates, where not all the sub-buffers were accounted for. This passed the validator as all entries were valid, but the link list was incorrect and could have caused a crash. The corruption only produced incorrect data, but it could have been more severe. To fix this, create a bitmask that covers all the sub-buffer indexes and set it to all zeros. While iterating the array checking the values of the array content, have it set a bit corresponding to the index in the array. If the bit was already set, then it is a duplicate and mark the buffer as invalid and reset it. - Prevent mmap()ing persistent ring buffer The persistent ring buffer uses vmap() to map the persistent memory. Currently, the mmap() logic only uses virt_to_page() to get the page from the ring buffer memory and use that to map to user space. This works because a normal ring buffer uses alloc_page() to allocate its memory. But because the persistent ring buffer use vmap() it causes a kernel crash. Fixing this to work with vmap() is not hard, but since mmap() on persistent memory buffers never worked, just have the mmap() return -ENODEV (what was returned before mmap() for persistent memory ring buffers, as they never supported mmap. Normal buffers will still allow mmap(). Implementing mmap() for persistent memory ring buffers can wait till the next merge window. - Fix polling on persistent ring buffers There's a "buffer_percent" option (default set to 50), that is used to have reads of the ring buffer binary data block until the buffer fills to that percentage. The field "pages_touched" is incremented every time a new sub-buffer has content added to it. This field is used in the calculations to determine the amount of content is in the buffer and if it exceeds the "buffer_percent" then it will wake the task polling on the buffer. As persistent ring buffers can be created by the content from a previous boot, the "pages_touched" field was not updated. This means that if a task were to poll on the persistent buffer, it would block even if the buffer was completely full. It would block even if the "buffer_percent" was zero, because with "pages_touched" as zero, it would be calculated as the buffer having no content. Update pages_touched when initializing the persistent ring buffer from a previous boot. * tag 'trace-ring-buffer-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: ring-buffer: Update pages_touched to reflect persistent buffer content tracing: Do not allow mmap() of persistent ring buffer ring-buffer: Validate the persistent meta data subbuf array tracing: Have the error of __tracing_resize_ring_buffer() passed to user ring-buffer: Unlock resize on mmap error commit 73f69c6be2a9f22c31c775ec03c6c286bfe12cfa Author: Krzysztof Kozlowski Date: Fri Feb 14 16:08:43 2025 +0100 drm/msm/dsi/phy: Do not overwite PHY_CMN_CLK_CFG1 when choosing bitclk source PHY_CMN_CLK_CFG1 register has four fields being used in the driver: DSI clock divider, source of bitclk and two for enabling the DSI PHY PLL clocks. dsi_7nm_set_usecase() sets only the source of bitclk, so should leave all other bits untouched. Use newly introduced dsi_pll_cmn_clk_cfg1_update() to update respective bits without overwriting the rest. While shuffling the code, define and use PHY_CMN_CLK_CFG1 bitfields to make the code more readable and obvious. Fixes: 1ef7c99d145c ("drm/msm/dsi: add support for 7nm DSI PHY/PLL") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/637380/ Link: https://lore.kernel.org/r/20250214-drm-msm-phy-pll-cfg-reg-v3-3-0943b850722c@linaro.org Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 4 ++-- drivers/gpu/drm/msm/registers/display/dsi_phy_7nm.xml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) commit 5a97bc924ae0804b8dbf627e357acaa5ef761483 Author: Krzysztof Kozlowski Date: Fri Feb 14 16:08:42 2025 +0100 drm/msm/dsi/phy: Protect PHY_CMN_CLK_CFG1 against clock driver PHY_CMN_CLK_CFG1 register is updated by the PHY driver and by a mux clock from Common Clock Framework: devm_clk_hw_register_mux_parent_hws(). There could be a path leading to concurrent and conflicting updates between PHY driver and clock framework, e.g. changing the mux and enabling PLL clocks. Add dedicated spinlock to be sure all PHY_CMN_CLK_CFG1 updates are synchronized. While shuffling the code, define and use PHY_CMN_CLK_CFG1 bitfields to make the code more readable and obvious. Fixes: 1ef7c99d145c ("drm/msm/dsi: add support for 7nm DSI PHY/PLL") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/637378/ Link: https://lore.kernel.org/r/20250214-drm-msm-phy-pll-cfg-reg-v3-2-0943b850722c@linaro.org Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 35 ++++++++++++++-------- .../gpu/drm/msm/registers/display/dsi_phy_7nm.xml | 5 +++- 2 files changed, 26 insertions(+), 14 deletions(-) commit 588257897058a0b1aa47912db4fe93c6ff5e3887 Author: Krzysztof Kozlowski Date: Fri Feb 14 16:08:41 2025 +0100 drm/msm/dsi/phy: Protect PHY_CMN_CLK_CFG0 updated from driver side PHY_CMN_CLK_CFG0 register is updated by the PHY driver and by two divider clocks from Common Clock Framework: devm_clk_hw_register_divider_parent_hw(). Concurrent access by the clocks side is protected with spinlock, however driver's side in restoring state is not. Restoring state is called from msm_dsi_phy_enable(), so there could be a path leading to concurrent and conflicting updates with clock framework. Add missing lock usage on the PHY driver side, encapsulated in its own function so the code will be still readable. While shuffling the code, define and use PHY_CMN_CLK_CFG0 bitfields to make the code more readable and obvious. Fixes: 1ef7c99d145c ("drm/msm/dsi: add support for 7nm DSI PHY/PLL") Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Signed-off-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/637376/ Link: https://lore.kernel.org/r/20250214-drm-msm-phy-pll-cfg-reg-v3-1-0943b850722c@linaro.org Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 14 ++++++++++++-- drivers/gpu/drm/msm/registers/display/dsi_phy_7nm.xml | 5 ++++- 2 files changed, 16 insertions(+), 3 deletions(-) commit 5e192eefebaab5bdcf716add8910d7f8a2e30e3c Author: Jessica Zhang Date: Wed Jan 8 14:40:48 2025 -0800 drm/msm/dpu: Drop extraneous return in dpu_crtc_reassign_planes() Drop extra return at the end of dpu_crtc_reassign_planes() Fixes: 774bcfb73176 ("drm/msm/dpu: add support for virtual planes") Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/631565/ Link: https://lore.kernel.org/r/20250108-virtual-planes-fixes-v1-2-420cb36df94a@quicinc.com Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 -- 1 file changed, 2 deletions(-) commit 144429831f447223253a0e4376489f84ff37d1a7 Author: Marijn Suijten Date: Tue Feb 11 00:19:32 2025 +0100 drm/msm/dpu: Don't leak bits_per_component into random DSC_ENC fields What used to be the input_10_bits boolean - feeding into the lowest bit of DSC_ENC - on MSM downstream turned into an accidental OR with the full bits_per_component number when it was ported to the upstream kernel. On typical bpc=8 setups we don't notice this because line_buf_depth is always an odd value (it contains bpc+1) and will also set the 4th bit after left-shifting by 3 (hence this |= bits_per_component is a no-op). Now that guards are being removed to allow more bits_per_component values besides 8 (possible since commit 49fd30a7153b ("drm/msm/dsi: use DRM DSC helpers for DSC setup")), a bpc of 10 will instead clash with the 5th bit which is convert_rgb. This is "fortunately" also always set to true by MSM's dsi_populate_dsc_params() already, but once a bpc of 12 starts being used it'll write into simple_422 which is normally false. To solve all these overlaps, simply replicate downstream code and only set this lowest bit if bits_per_component is equal to 10. It is unclear why DSC requires this only for bpc=10 but not bpc=12, and also notice that this lowest bit wasn't set previously despite having a panel and patch on the list using it without any mentioned issues. Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Marijn Suijten Reviewed-by: Abhinav Kumar Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/636311/ Link: https://lore.kernel.org/r/20250211-dsc-10-bit-v1-1-1c85a9430d9a@somainline.org Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f063ac6b55df03ed25996bdc84d9e1c50147cfa1 Author: Jessica Zhang Date: Tue Feb 11 19:59:19 2025 -0800 drm/msm/dpu: Disable dither in phys encoder cleanup Disable pingpong dither in dpu_encoder_helper_phys_cleanup(). This avoids the issue where an encoder unknowingly uses dither after reserving a pingpong block that was previously bound to an encoder that had enabled dither. Cc: stable@vger.kernel.org Reported-by: Dmitry Baryshkov Closes: https://lore.kernel.org/all/jr7zbj5w7iq4apg3gofuvcwf4r2swzqjk7sshwcdjll4mn6ctt@l2n3qfpujg3q/ Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Fixes: 3c128638a07d ("drm/msm/dpu: add support for dither block in display") Patchwork: https://patchwork.freedesktop.org/patch/636517/ Link: https://lore.kernel.org/r/20250211-dither-disable-v1-1-ac2cb455f6b9@quicinc.com Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 +++ 1 file changed, 3 insertions(+) commit 978ca99d6bd87b84ff7788eea4d2c328a70530f6 Author: Ethan Carter Edwards Date: Sun Feb 9 22:51:54 2025 -0500 drm/msm/dpu: Fix uninitialized variable There is a possibility for an uninitialized *ret* variable to be returned in some code paths. Fix this by initializing *ret* to 0. Addresses-Coverity-ID: 1642546 ("Uninitialized scalar variable") Fixes: 774bcfb73176 ("drm/msm/dpu: add support for virtual planes") Signed-off-by: Ethan Carter Edwards Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/636201/ Link: https://lore.kernel.org/r/20250209-dpu-v2-1-114dfd4ebefd@ethancedwards.com Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit df9cf852ca3099feb8fed781bdd5d3863af001c8 Author: Abhinav Kumar Date: Thu Feb 6 11:46:36 2025 -0800 drm/msm/dp: account for widebus and yuv420 during mode validation Widebus allows the DP controller to operate in 2 pixel per clock mode. The mode validation logic validates the mode->clock against the max DP pixel clock. However the max DP pixel clock limit assumes widebus is already enabled. Adjust the mode validation logic to only compare the adjusted pixel clock which accounts for widebus against the max DP pixel clock. Also fix the mode validation logic for YUV420 modes as in that case as well, only half the pixel clock is needed. Cc: stable@vger.kernel.org Fixes: 757a2f36ab09 ("drm/msm/dp: enable widebus feature for display port") Fixes: 6db6e5606576 ("drm/msm/dp: change clock related programming for YUV420 over DP") Reviewed-by: Dmitry Baryshkov Tested-by: Dale Whinham Patchwork: https://patchwork.freedesktop.org/patch/635789/ Link: https://lore.kernel.org/r/20250206-dp-widebus-fix-v2-1-cb89a0313286@quicinc.com Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/dp/dp_display.c | 11 ++++++----- drivers/gpu/drm/msm/dp/dp_drm.c | 5 ++++- 2 files changed, 10 insertions(+), 6 deletions(-) commit 24b50b7340ab7e7b004ee6db43d625caa68498b0 Author: Dmitry Baryshkov Date: Tue Dec 17 14:35:40 2024 +0200 drm/msm/dpu: correct LM pairing for SM6150 The SM6150 platform doesn't have 3DMux (MERGE_3D) block, so it can not split the screen between two LMs. Drop lm_pair fields as they don't make sense for this platform. Suggested-by: Abhinav Kumar Fixes: cb2f9144693b ("drm/msm/dpu: Add SM6150 support") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/629377/ Link: https://lore.kernel.org/r/20241217-dpu-fix-sm6150-v2-1-9acc8f5addf3@linaro.org Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_3_sm6150.h | 2 -- 1 file changed, 2 deletions(-) commit af0a4a2090cce732c70ad6c5f4145b43f39e3fe9 Author: Dmitry Baryshkov Date: Sat Dec 14 00:14:18 2024 +0200 drm/msm/dpu: enable DPU_WB_INPUT_CTRL for DPU 5.x Several DPU 5.x platforms are supposed to be using DPU_WB_INPUT_CTRL, to bind WB and PINGPONG blocks, but they do not. Change those platforms to use WB_SM8250_MASK, which includes that bit. Fixes: 1f5bcc4316b3 ("drm/msm/dpu: enable writeback on SC8108X") Fixes: ab2b03d73a66 ("drm/msm/dpu: enable writeback on SM6125") Fixes: 47cebb740a83 ("drm/msm/dpu: enable writeback on SM8150") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/628876/ Link: https://lore.kernel.org/r/20241214-dpu-drop-features-v1-2-988f0662cb7e@linaro.org Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 2 +- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 2 +- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 2f69e54584475ac85ea0e3407c9198ac7c6ea8ad Author: Dmitry Baryshkov Date: Sat Dec 14 00:14:17 2024 +0200 drm/msm/dpu: skip watchdog timer programming through TOP on >= SM8450 The SM8450 and later chips have DPU_MDP_PERIPH_0_REMOVED feature bit set, which means that those platforms have dropped some of the registers, including the WD TIMER-related ones. Stop providing the callback to program WD timer on those platforms. Fixes: 100d7ef6995d ("drm/msm/dpu: add support for SM8450") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/628874/ Link: https://lore.kernel.org/r/20241214-dpu-drop-features-v1-1-988f0662cb7e@linaro.org Signed-off-by: Abhinav Kumar drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97937834ae876f29565415ab15f1284666dc6be3 Author: Steven Rostedt Date: Fri Feb 14 12:35:12 2025 -0500 ring-buffer: Update pages_touched to reflect persistent buffer content The pages_touched field represents the number of subbuffers in the ring buffer that have content that can be read. This is used in accounting of "dirty_pages" and "buffer_percent" to allow the user to wait for the buffer to be filled to a certain amount before it reads the buffer in blocking mode. The persistent buffer never updated this value so it was set to zero, and this accounting would take it as it had no content. This would cause user space to wait for content even though there's enough content in the ring buffer that satisfies the buffer_percent. Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Vincent Donnefort Link: https://lore.kernel.org/20250214123512.0631436e@gandalf.local.home Fixes: 5f3b6e839f3ce ("ring-buffer: Validate boot range memory events") Signed-off-by: Steven Rostedt (Google) kernel/trace/ring_buffer.c | 5 +++++ 1 file changed, 5 insertions(+) commit 129fe718819cc5e24ea2f489db9ccd4371f0c6f6 Author: Steven Rostedt Date: Fri Feb 14 11:55:47 2025 -0500 tracing: Do not allow mmap() of persistent ring buffer When trying to mmap a trace instance buffer that is attached to reserve_mem, it would crash: BUG: unable to handle page fault for address: ffffe97bd00025c8 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 2862f3067 P4D 2862f3067 PUD 0 Oops: Oops: 0000 [#1] PREEMPT_RT SMP PTI CPU: 4 UID: 0 PID: 981 Comm: mmap-rb Not tainted 6.14.0-rc2-test-00003-g7f1a5e3fbf9e-dirty #233 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:validate_page_before_insert+0x5/0xb0 Code: e2 01 89 d0 c3 cc cc cc cc 66 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 90 0f 1f 44 00 00 <48> 8b 46 08 a8 01 75 67 66 90 48 89 f0 8b 50 34 85 d2 74 76 48 89 RSP: 0018:ffffb148c2f3f968 EFLAGS: 00010246 RAX: ffff9fa5d3322000 RBX: ffff9fa5ccff9c08 RCX: 00000000b879ed29 RDX: ffffe97bd00025c0 RSI: ffffe97bd00025c0 RDI: ffff9fa5ccff9c08 RBP: ffffb148c2f3f9f0 R08: 0000000000000004 R09: 0000000000000004 R10: 0000000000000000 R11: 0000000000000200 R12: 0000000000000000 R13: 00007f16a18d5000 R14: ffff9fa5c48db6a8 R15: 0000000000000000 FS: 00007f16a1b54740(0000) GS:ffff9fa73df00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffe97bd00025c8 CR3: 00000001048c6006 CR4: 0000000000172ef0 Call Trace: ? __die_body.cold+0x19/0x1f ? __die+0x2e/0x40 ? page_fault_oops+0x157/0x2b0 ? search_module_extables+0x53/0x80 ? validate_page_before_insert+0x5/0xb0 ? kernelmode_fixup_or_oops.isra.0+0x5f/0x70 ? __bad_area_nosemaphore+0x16e/0x1b0 ? bad_area_nosemaphore+0x16/0x20 ? do_kern_addr_fault+0x77/0x90 ? exc_page_fault+0x22b/0x230 ? asm_exc_page_fault+0x2b/0x30 ? validate_page_before_insert+0x5/0xb0 ? vm_insert_pages+0x151/0x400 __rb_map_vma+0x21f/0x3f0 ring_buffer_map+0x21b/0x2f0 tracing_buffers_mmap+0x70/0xd0 __mmap_region+0x6f0/0xbd0 mmap_region+0x7f/0x130 do_mmap+0x475/0x610 vm_mmap_pgoff+0xf2/0x1d0 ksys_mmap_pgoff+0x166/0x200 __x64_sys_mmap+0x37/0x50 x64_sys_call+0x1670/0x1d70 do_syscall_64+0xbb/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f The reason was that the code that maps the ring buffer pages to user space has: page = virt_to_page((void *)cpu_buffer->subbuf_ids[s]); And uses that in: vm_insert_pages(vma, vma->vm_start, pages, &nr_pages); But virt_to_page() does not work with vmap()'d memory which is what the persistent ring buffer has. It is rather trivial to allow this, but for now just disable mmap() of instances that have their ring buffer from the reserve_mem option. If an mmap() is performed on a persistent buffer it will return -ENODEV just like it would if the .mmap field wasn't defined in the file_operations structure. Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Vincent Donnefort Link: https://lore.kernel.org/20250214115547.0d7287d3@gandalf.local.home Fixes: 9b7bdf6f6ece6 ("tracing: Have trace_printk not use binary prints if boot buffer") Signed-off-by: Steven Rostedt (Google) kernel/trace/trace.c | 4 ++++ 1 file changed, 4 insertions(+) commit 496659003dac5d08ea292c44fce9dfb36fa34691 Merge: f3d8b0ebaec4 f85478fb3fec Author: Linus Torvalds Date: Sat Feb 15 10:20:47 2025 -0800 Merge tag 'i2c-for-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "MAINTAINERS maintenance. Changed email, added entry, deleted entry falling back to a generic one" * tag 'i2c-for-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: MAINTAINERS: Add maintainer for Qualcomm's I2C GENI driver MAINTAINERS: delete entry for AXXIA I2C MAINTAINERS: Use my kernel.org address for I2C ACPI work commit f3d8b0ebaec4e755317e2e8b863a4004d6505288 Merge: 243899076c3e 2844ddbd540f Author: Linus Torvalds Date: Sat Feb 15 10:15:24 2025 -0800 Merge tag 's390-6.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix isolated VFs handling by verifying that a VF’s parent PF is locally owned before registering it in an existing PCI domain - Disable arch_test_bit() optimization for PROFILE_ALL_BRANCHES to workaround gcc failure in handling __builtin_constant_p() in this case - Fix CHPID "configure" attribute caching in CIO by not updating the cache when SCLP returns no data, ensuring consistent sysfs output - Remove CONFIG_LSM from default configs and rely on defaults, which enables BPF LSM hook * tag 's390-6.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/pci: Fix handling of isolated VFs s390/pci: Pull search for parent PF out of zpci_iov_setup_virtfn() s390/bitops: Disable arch_test_bit() optimization for PROFILE_ALL_BRANCHES s390/cio: Fix CHPID "configure" attribute caching s390/configs: Remove CONFIG_LSM commit b28fb1f2ef45eeef1cd2c23149b50d184d545a3e Author: Uwe Kleine-König Date: Thu Feb 13 17:04:29 2025 +0100 modpost: Fix a few typos in a comment Namely: s/becasue/because/ and s/wiht/with/ plus an added article. Signed-off-by: Uwe Kleine-König Signed-off-by: Masahiro Yamada scripts/mod/modpost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b71c2fb04e7a713abc6edde4a412416ff3158f2 Author: Thomas Weißschuh Date: Thu Feb 13 15:55:17 2025 +0100 kbuild: userprogs: fix bitsize and target detection on clang scripts/Makefile.clang was changed in the linked commit to move --target from KBUILD_CFLAGS to KBUILD_CPPFLAGS, as that generally has a broader scope. However that variable is not inspected by the userprogs logic, breaking cross compilation on clang. Use both variables to detect bitsize and target arguments for userprogs. Fixes: feb843a469fb ("kbuild: add $(CLANG_FLAGS) to KBUILD_CPPFLAGS") Cc: stable@vger.kernel.org Signed-off-by: Thomas Weißschuh Reviewed-by: Nathan Chancellor Signed-off-by: Masahiro Yamada Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 243899076c3efdf98d8e922a802896424a597580 Merge: d440148418f4 2e4f982cf392 Author: Linus Torvalds Date: Sat Feb 15 09:54:46 2025 -0800 Merge tag 'rust-fixes-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux Pull rust fixes from Miguel Ojeda: - Fix objtool warning due to future Rust 1.85.0 (to be released in a few days) - Clean future Rust 1.86.0 (to be released 2025-04-03) Clippy warning * tag 'rust-fixes-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux: rust: rbtree: fix overindented list item objtool/rust: add one more `noreturn` Rust function commit d440148418f4816b4973ec6723bf63821793a0a7 Author: Linus Torvalds Date: Sat Feb 15 09:28:55 2025 -0800 tegra210-adma: fix 32-bit x86 build The Tegra210 Audio DMA controller driver did a plain divide: page_no = (res_page->start - res_base->start) / cdata->ch_base_offset; which causes problems on 32-bit x86 configurations that have 64-bit resource sizes: x86_64-linux-ld: drivers/dma/tegra210-adma.o: in function `tegra_adma_probe': tegra210-adma.c:(.text+0x1322): undefined reference to `__udivdi3' because gcc doesn't generate the trivial code for a 64-by-32 divide, turning it into a function call to do a full 64-by-64 divide. And the kernel intentionally doesn't provide that helper function, because 99% of the time all you want is the narrower version. Of course, tegra210 is a 64-bit architecture and the 32-bit x86 build is purely for build testing, so this really is just about build coverage failure. But build coverage is good. Side note: div_u64() would be suboptimal if you actually have a 32-bit resource_t, so our "helper" for divides are admittedly making it harder than it should be to generate good code for all the possible cases. At some point, I'll consider 32-bit x86 so entirely legacy that I can't find it in myself to care any more, and we'll just add the __udivdi3 library function. But for now, the right thing to do is to use "div_u64()" to show that you know that you are doing the simpler divide with a 32-bit number. And the build error enforces that. While fixing the build issue, also check for division-by-zero, and for overflow. Which hopefully cannot happen on real production hardware, but the value of 'ch_base_offset' can definitely be zero in other places. Reported-by: Guenter Roeck Signed-off-by: Linus Torvalds drivers/dma/tegra210-adma.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 669c285620231786fffe9d87ab432e08a6ed922b Author: Rob Clark Date: Mon Jan 13 07:48:41 2025 -0800 drm/msm: Avoid rounding up to one jiffy If userspace is trying to achieve a timeout of zero, let 'em have it. Only round up if the timeout is greater than zero. Fixes: 4969bccd5f4e ("drm/msm: Avoid rounding down to zero jiffies") Signed-off-by: Rob Clark Reviewed-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/632264/ drivers/gpu/drm/msm/msm_drv.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit ef24989a62eefa6293a6c1c59dbb8b7e646e76dd Author: Konrad Dybcio Date: Thu Feb 13 17:44:43 2025 +0100 drm/msm/a6xx: Only print the GMU firmware version once We only fetch it once from userland, so let's also only notify the user once and not on every runtime resume. As you can notice by the tags chain, more than one user found this annoying. Reported-by: Jens Glathe Suggested-by: Abel Vesa Suggested-by: Rob Clark Signed-off-by: Konrad Dybcio Reviewed-by: Neil Armstrong Patchwork: https://patchwork.freedesktop.org/patch/637062/ Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 071ed42cff4fcdd89025d966d48eabef59913bf2 Author: Pierre Riteau Date: Thu Feb 13 23:36:10 2025 +0100 net/sched: cls_api: fix error handling causing NULL dereference tcf_exts_miss_cookie_base_alloc() calls xa_alloc_cyclic() which can return 1 if the allocation succeeded after wrapping. This was treated as an error, with value 1 returned to caller tcf_exts_init_ex() which sets exts->actions to NULL and returns 1 to caller fl_change(). fl_change() treats err == 1 as success, calling tcf_exts_validate_ex() which calls tcf_action_init() with exts->actions as argument, where it is dereferenced. Example trace: BUG: kernel NULL pointer dereference, address: 0000000000000000 CPU: 114 PID: 16151 Comm: handler114 Kdump: loaded Not tainted 5.14.0-503.16.1.el9_5.x86_64 #1 RIP: 0010:tcf_action_init+0x1f8/0x2c0 Call Trace: tcf_action_init+0x1f8/0x2c0 tcf_exts_validate_ex+0x175/0x190 fl_change+0x537/0x1120 [cls_flower] Fixes: 80cd22c35c90 ("net/sched: cls_api: Support hardware miss to tc action") Signed-off-by: Pierre Riteau Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/20250213223610.320278-1-pierre@stackhpc.com Signed-off-by: Jakub Kicinski net/sched/cls_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6452feaf29a6a1cc1c904520c4b1b4cd90133fac Merge: 7ff71e6d9239 7b4aebeecbbd Author: Linus Torvalds Date: Sat Feb 15 08:13:45 2025 -0800 Merge tag 'gpio-fixes-for-v6.14-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix interrupt handling issues in gpio-bcm-kona - add an ACPI quirk for Acer Nitro ANV14 fixing an issue with spurious wake up events - add missing return value checks to gpio-stmpe - fix a crash in error path in gpiochip_get_ngpios() * tag 'gpio-fixes-for-v6.14-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpiolib: Fix crash on error in gpiochip_get_ngpios() gpio: stmpe: Check return value of stmpe_reg_read in stmpe_gpio_irq_sync_unlock gpiolib: acpi: Add a quirk for Acer Nitro ANV14 gpio: bcm-kona: Add missing newline to dev_err format string gpio: bcm-kona: Make sure GPIO bits are unlocked when requesting IRQ gpio: bcm-kona: Fix GPIO lock/unlock for banks above bank 0 commit 1e988c3fe1264708f4f92109203ac5b1d65de50b Author: Pavel Begunkov Date: Fri Feb 14 22:48:15 2025 +0000 io_uring: prevent opcode speculation sqe->opcode is used for different tables, make sure we santitise it against speculations. Cc: stable@vger.kernel.org Fixes: d3656344fea03 ("io_uring: add lookup table for various opcode needs") Signed-off-by: Pavel Begunkov Reviewed-by: Li Zetao Link: https://lore.kernel.org/r/7eddbf31c8ca0a3947f8ed98271acc2b4349c016.1739568408.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 2 ++ 1 file changed, 2 insertions(+) commit 140332b6ed727a4ec2e5722a1ccda28b52d45771 Author: Masahiro Yamada Date: Thu Feb 13 15:26:44 2025 +0900 kbuild: fix linux-headers package build when $(CC) cannot link userspace Since commit 5f73e7d0386d ("kbuild: refactor cross-compiling linux-headers package"), the linux-headers Debian package fails to build when $(CC) cannot build userspace applications, for example, when using toolchains installed by the 0day bot. The host programs in the linux-headers package should be rebuilt using the disto's cross-compiler, ${DEB_HOST_GNU_TYPE}-gcc instead of $(CC). Hence, the variable 'CC' must be expanded in this shell script instead of in the top-level Makefile. Commit f354fc88a72a ("kbuild: install-extmod-build: add missing quotation marks for CC variable") was not a correct fix because CC="ccache gcc" should be unrelated when rebuilding userspace tools. Fixes: 5f73e7d0386d ("kbuild: refactor cross-compiling linux-headers package") Reported-by: Jeff Johnson Closes: https://lore.kernel.org/linux-kbuild/CAK7LNARb3xO3ptBWOMpwKcyf3=zkfhMey5H2KnB1dOmUwM79dA@mail.gmail.com/T/#t Signed-off-by: Masahiro Yamada Tested-by: Jeff Johnson scripts/package/install-extmod-build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d1d0963121769d8d16150b913fe886e48efefa51 Author: Masahiro Yamada Date: Tue Feb 11 09:29:06 2025 +0900 tools: fix annoying "mkdir -p ..." logs when building tools in parallel When CONFIG_OBJTOOL=y or CONFIG_DEBUG_INFO_BTF=y, parallel builds show awkward "mkdir -p ..." logs. $ make -j16 [ snip ] mkdir -p /home/masahiro/ref/linux/tools/objtool && make O=/home/masahiro/ref/linux subdir=tools/objtool --no-print-directory -C objtool mkdir -p /home/masahiro/ref/linux/tools/bpf/resolve_btfids && make O=/home/masahiro/ref/linux subdir=tools/bpf/resolve_btfids --no-print-directory -C bpf/resolve_btfids Defining MAKEFLAGS= on the command line wipes out command line switches from the resultant MAKEFLAGS definition, even though the command line switches are active. [1] MAKEFLAGS puts all single-letter options into the first word, and that word will be empty if no single-letter options were given. [2] However, this breaks if MAKEFLAGS= is given on the command line. The tools/ and tools/% targets set MAKEFLAGS= on the command line, which breaks the following code in tools/scripts/Makefile.include: short-opts := $(firstword -$(MAKEFLAGS)) If MAKEFLAGS really needs modification, it should be done through the environment variable, as follows: MAKEFLAGS= $(MAKE) ... That said, I question whether modifying MAKEFLAGS is necessary here. The only flag we might want to exclude is --no-print-directory, as the tools build system changes the working directory. However, people might find the "Entering/Leaving directory" logs annoying. I simply removed the offending MAKEFLAGS=. [1]: https://savannah.gnu.org/bugs/?62469 [2]: https://www.gnu.org/software/make/manual/make.html#Testing-Flags Fixes: ea01fa9f63ae ("tools: Connect to the kernel build system") Fixes: a50e43332756 ("perf tools: Honor parallel jobs") Signed-off-by: Masahiro Yamada Tested-by: Daniel Xu Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 6a7ed7ee16a963f0ca028861eca8f8b365861dd1 Author: Vitaly Rodionov Date: Fri Feb 14 16:23:26 2025 +0000 ALSA: hda/cirrus: Reduce codec resume time This patch reduces the resume time by half and introduces an option to include a delay after a single write operation before continuing. Signed-off-by: Vitaly Rodionov Link: https://patch.msgid.link/20250214162354.2675652-2-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_cs8409-tables.c | 6 +++--- sound/pci/hda/patch_cs8409.c | 6 +++++- sound/pci/hda/patch_cs8409.h | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) commit 08b613b9e2ba431db3bd15cb68ca72472a50ef5c Author: Vitaly Rodionov Date: Fri Feb 14 21:07:28 2025 +0000 ALSA: hda/cirrus: Correct the full scale volume set logic This patch corrects the full-scale volume setting logic. On certain platforms, the full-scale volume bit is required. The current logic mistakenly sets this bit and incorrectly clears reserved bit 0, causing the headphone output to be muted. Fixes: 342b6b610ae2 ("ALSA: hda/cs8409: Fix Full Scale Volume setting for all variants") Signed-off-by: Vitaly Rodionov Link: https://patch.msgid.link/20250214210736.30814-1-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_cs8409-tables.c | 6 +++--- sound/pci/hda/patch_cs8409.c | 20 +++++++++++--------- sound/pci/hda/patch_cs8409.h | 5 +++-- 3 files changed, 17 insertions(+), 14 deletions(-) commit 7ff71e6d923969d933e1ba7e0db857782d36cd19 Merge: 78a632a2086c 1523226edda5 Author: Linus Torvalds Date: Fri Feb 14 19:56:12 2025 -0800 Merge tag 'alpha-fixes-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha Pull alpha fixes from Matt Turner: "A few changes for alpha, including some important fixes for kernel stack alignment" * tag 'alpha-fixes-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha: alpha: Use str_yes_no() helper in pci_dac_dma_supported() alpha: Replace one-element array with flexible array member alpha: align stack for page fault and user unaligned trap handlers alpha: make stack 16-byte aligned (most cases) alpha: replace hardcoded stack offsets with autogenerated ones commit 9593172d93b9f91c362baec4643003dc29802929 Author: Kuniyuki Iwashima Date: Thu Feb 13 13:33:54 2025 +0900 geneve: Fix use-after-free in geneve_find_dev(). syzkaller reported a use-after-free in geneve_find_dev() [0] without repro. geneve_configure() links struct geneve_dev.next to net_generic(net, geneve_net_id)->geneve_list. The net here could differ from dev_net(dev) if IFLA_NET_NS_PID, IFLA_NET_NS_FD, or IFLA_TARGET_NETNSID is set. When dev_net(dev) is dismantled, geneve_exit_batch_rtnl() finally calls unregister_netdevice_queue() for each dev in the netns, and later the dev is freed. However, its geneve_dev.next is still linked to the backend UDP socket netns. Then, use-after-free will occur when another geneve dev is created in the netns. Let's call geneve_dellink() instead in geneve_destroy_tunnels(). [0]: BUG: KASAN: slab-use-after-free in geneve_find_dev drivers/net/geneve.c:1295 [inline] BUG: KASAN: slab-use-after-free in geneve_configure+0x234/0x858 drivers/net/geneve.c:1343 Read of size 2 at addr ffff000054d6ee24 by task syz.1.4029/13441 CPU: 1 UID: 0 PID: 13441 Comm: syz.1.4029 Not tainted 6.13.0-g0ad9617c78ac #24 dc35ca22c79fb82e8e7bc5c9c9adafea898b1e3d Hardware name: linux,dummy-virt (DT) Call trace: show_stack+0x38/0x50 arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xbc/0x108 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x16c/0x6f0 mm/kasan/report.c:489 kasan_report+0xc0/0x120 mm/kasan/report.c:602 __asan_report_load2_noabort+0x20/0x30 mm/kasan/report_generic.c:379 geneve_find_dev drivers/net/geneve.c:1295 [inline] geneve_configure+0x234/0x858 drivers/net/geneve.c:1343 geneve_newlink+0xb8/0x128 drivers/net/geneve.c:1634 rtnl_newlink_create+0x23c/0x868 net/core/rtnetlink.c:3795 __rtnl_newlink net/core/rtnetlink.c:3906 [inline] rtnl_newlink+0x1054/0x1630 net/core/rtnetlink.c:4021 rtnetlink_rcv_msg+0x61c/0x918 net/core/rtnetlink.c:6911 netlink_rcv_skb+0x1dc/0x398 net/netlink/af_netlink.c:2543 rtnetlink_rcv+0x34/0x50 net/core/rtnetlink.c:6938 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x618/0x838 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x5fc/0x8b0 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:713 [inline] __sock_sendmsg net/socket.c:728 [inline] ____sys_sendmsg+0x410/0x6f8 net/socket.c:2568 ___sys_sendmsg+0x178/0x1d8 net/socket.c:2622 __sys_sendmsg net/socket.c:2654 [inline] __do_sys_sendmsg net/socket.c:2659 [inline] __se_sys_sendmsg net/socket.c:2657 [inline] __arm64_sys_sendmsg+0x12c/0x1c8 net/socket.c:2657 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x90/0x278 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x13c/0x250 arch/arm64/kernel/syscall.c:132 do_el0_svc+0x54/0x70 arch/arm64/kernel/syscall.c:151 el0_svc+0x4c/0xa8 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x1a0 arch/arm64/kernel/entry.S:600 Allocated by task 13247: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x30/0x68 mm/kasan/common.c:68 kasan_save_alloc_info+0x44/0x58 mm/kasan/generic.c:568 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x84/0xa0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4298 [inline] __kmalloc_node_noprof+0x2a0/0x560 mm/slub.c:4304 __kvmalloc_node_noprof+0x9c/0x230 mm/util.c:645 alloc_netdev_mqs+0xb8/0x11a0 net/core/dev.c:11470 rtnl_create_link+0x2b8/0xb50 net/core/rtnetlink.c:3604 rtnl_newlink_create+0x19c/0x868 net/core/rtnetlink.c:3780 __rtnl_newlink net/core/rtnetlink.c:3906 [inline] rtnl_newlink+0x1054/0x1630 net/core/rtnetlink.c:4021 rtnetlink_rcv_msg+0x61c/0x918 net/core/rtnetlink.c:6911 netlink_rcv_skb+0x1dc/0x398 net/netlink/af_netlink.c:2543 rtnetlink_rcv+0x34/0x50 net/core/rtnetlink.c:6938 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x618/0x838 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x5fc/0x8b0 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:713 [inline] __sock_sendmsg net/socket.c:728 [inline] ____sys_sendmsg+0x410/0x6f8 net/socket.c:2568 ___sys_sendmsg+0x178/0x1d8 net/socket.c:2622 __sys_sendmsg net/socket.c:2654 [inline] __do_sys_sendmsg net/socket.c:2659 [inline] __se_sys_sendmsg net/socket.c:2657 [inline] __arm64_sys_sendmsg+0x12c/0x1c8 net/socket.c:2657 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x90/0x278 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x13c/0x250 arch/arm64/kernel/syscall.c:132 do_el0_svc+0x54/0x70 arch/arm64/kernel/syscall.c:151 el0_svc+0x4c/0xa8 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x1a0 arch/arm64/kernel/entry.S:600 Freed by task 45: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x30/0x68 mm/kasan/common.c:68 kasan_save_free_info+0x58/0x70 mm/kasan/generic.c:582 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x48/0x68 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:4613 [inline] kfree+0x140/0x420 mm/slub.c:4761 kvfree+0x4c/0x68 mm/util.c:688 netdev_release+0x94/0xc8 net/core/net-sysfs.c:2065 device_release+0x98/0x1c0 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x2b0/0x438 lib/kobject.c:737 netdev_run_todo+0xe5c/0xfc8 net/core/dev.c:11185 rtnl_unlock+0x20/0x38 net/core/rtnetlink.c:151 cleanup_net+0x4fc/0x8c0 net/core/net_namespace.c:648 process_one_work+0x700/0x1398 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3317 [inline] worker_thread+0x8c4/0xe10 kernel/workqueue.c:3398 kthread+0x4bc/0x608 kernel/kthread.c:464 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 The buggy address belongs to the object at ffff000054d6e000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 3620 bytes inside of freed 4096-byte region [ffff000054d6e000, ffff000054d6f000) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x94d68 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff000016276181 flags: 0x3fffe0000000040(head|node=0|zone=0|lastcpupid=0x1ffff) page_type: f5(slab) raw: 03fffe0000000040 ffff0000c000f500 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000040004 00000001f5000000 ffff000016276181 head: 03fffe0000000040 ffff0000c000f500 dead000000000122 0000000000000000 head: 0000000000000000 0000000000040004 00000001f5000000 ffff000016276181 head: 03fffe0000000003 fffffdffc1535a01 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff000054d6ed00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff000054d6ed80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff000054d6ee00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff000054d6ee80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff000054d6ef00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: 2d07dc79fe04 ("geneve: add initial netdev driver for GENEVE tunnels") Reported-by: syzkaller Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250213043354.91368-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski drivers/net/geneve.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 55eff109e76a14e5ed10c8c3c3978d20a35e2a4d Author: Junnan Wu Date: Fri Feb 14 09:22:00 2025 +0800 vsock/virtio: fix variables initialization during resuming When executing suspend to ram twice in a row, the `rx_buf_nr` and `rx_buf_max_nr` increase to three times vq->num_free. Then after virtqueue_get_buf and `rx_buf_nr` decreased in function virtio_transport_rx_work, the condition to fill rx buffer (rx_buf_nr < rx_buf_max_nr / 2) will never be met. It is because that `rx_buf_nr` and `rx_buf_max_nr` are initialized only in virtio_vsock_probe(), but they should be reset whenever virtqueues are recreated, like after a suspend/resume. Move the `rx_buf_nr` and `rx_buf_max_nr` initialization in virtio_vsock_vqs_init(), so we are sure that they are properly initialized, every time we initialize the virtqueues, either when we load the driver or after a suspend/resume. To prevent erroneous atomic load operations on the `queued_replies` in the virtio_transport_send_pkt_work() function which may disrupt the scheduling of vsock->rx_work when transmitting reply-required socket packets, this atomic variable must undergo synchronized initialization alongside the preceding two variables after a suspend/resume. Fixes: bd50c5dc182b ("vsock/virtio: add support for device suspend/resume") Link: https://lore.kernel.org/virtualization/20250207052033.2222629-1-junnan01.wu@samsung.com/ Co-developed-by: Ying Gao Signed-off-by: Ying Gao Signed-off-by: Junnan Wu Reviewed-by: Luigi Leonardi Acked-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella Link: https://patch.msgid.link/20250214012200.1883896-1-junnan01.wu@samsung.com Signed-off-by: Jakub Kicinski net/vmw_vsock/virtio_transport.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 78a632a2086c5d5468b0e088a97b26e47c569567 Merge: 3f2ca7b8b33d 81f64e925c29 Author: Linus Torvalds Date: Fri Feb 14 16:49:07 2025 -0800 Merge tag 'pci-v6.14-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci fixes from Bjorn Helgaas: - Update a BUILD_BUG_ON() usage that works on current compilers, but breaks compilation on gcc 5.3.1 (Alex Williamson) - Avoid use of FLR for Mediatek MT7922 WiFi; the device previously worked after a long timeout and fallback to SBR, but after a recent RRS change it doesn't work at all after FLR (Bjorn Helgaas) * tag 'pci-v6.14-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI: Avoid FLR for Mediatek MT7922 WiFi PCI: Fix BUILD_BUG_ON usage for old gcc commit d3d0b8dfe06098d6d584266c35e9a0947f5b7132 Merge: 409f45387c93 c2fee09fc167 Author: Paolo Bonzini Date: Fri Feb 14 19:08:35 2025 -0500 Merge tag 'kvm-x86-fixes-6.14-rcN' of https://github.com/kvm-x86/linux into HEAD KVM fixes for 6.14 part 1 - Reject Hyper-V SEND_IPI hypercalls if the local APIC isn't being emulated by KVM to fix a NULL pointer dereference. - Enter guest mode (L2) from KVM's perspective before initializing the vCPU's nested NPT MMU so that the MMU is properly tagged for L2, not L1. - Load the guest's DR6 outside of the innermost .vcpu_run() loop, as the guest's value may be stale if a VM-Exit is handled in the fastpath. commit 409f45387c937145adeeeebc6d6032c2ec232b35 Author: Ashish Kalra Date: Mon Feb 10 22:54:18 2025 +0000 x86/sev: Fix broken SNP support with KVM module built-in Fix issues with enabling SNP host support and effectively SNP support which is broken with respect to the KVM module being built-in. SNP host support is enabled in snp_rmptable_init() which is invoked as device_initcall(). SNP check on IOMMU is done during IOMMU PCI init (IOMMU_PCI_INIT stage). And for that reason snp_rmptable_init() is currently invoked via device_initcall() and cannot be invoked via subsys_initcall() as core IOMMU subsystem gets initialized via subsys_initcall(). Now, if kvm_amd module is built-in, it gets initialized before SNP host support is enabled in snp_rmptable_init() : [ 10.131811] kvm_amd: TSC scaling supported [ 10.136384] kvm_amd: Nested Virtualization enabled [ 10.141734] kvm_amd: Nested Paging enabled [ 10.146304] kvm_amd: LBR virtualization supported [ 10.151557] kvm_amd: SEV enabled (ASIDs 100 - 509) [ 10.156905] kvm_amd: SEV-ES enabled (ASIDs 1 - 99) [ 10.162256] kvm_amd: SEV-SNP enabled (ASIDs 1 - 99) [ 10.171508] kvm_amd: Virtual VMLOAD VMSAVE supported [ 10.177052] kvm_amd: Virtual GIF supported ... ... [ 10.201648] kvm_amd: in svm_enable_virtualization_cpu And then svm_x86_ops->enable_virtualization_cpu() (svm_enable_virtualization_cpu) programs MSR_VM_HSAVE_PA as following: wrmsrl(MSR_VM_HSAVE_PA, sd->save_area_pa); So VM_HSAVE_PA is non-zero before SNP support is enabled on all CPUs. snp_rmptable_init() gets invoked after svm_enable_virtualization_cpu() as following : ... [ 11.256138] kvm_amd: in svm_enable_virtualization_cpu ... [ 11.264918] SEV-SNP: in snp_rmptable_init This triggers a #GP exception in snp_rmptable_init() when snp_enable() is invoked to set SNP_EN in SYSCFG MSR: [ 11.294289] unchecked MSR access error: WRMSR to 0xc0010010 (tried to write 0x0000000003fc0000) at rIP: 0xffffffffaf5d5c28 (native_write_msr+0x8/0x30) ... [ 11.294404] Call Trace: [ 11.294482] [ 11.294513] ? show_stack_regs+0x26/0x30 [ 11.294522] ? ex_handler_msr+0x10f/0x180 [ 11.294529] ? search_extable+0x2b/0x40 [ 11.294538] ? fixup_exception+0x2dd/0x340 [ 11.294542] ? exc_general_protection+0x14f/0x440 [ 11.294550] ? asm_exc_general_protection+0x2b/0x30 [ 11.294557] ? __pfx_snp_enable+0x10/0x10 [ 11.294567] ? native_write_msr+0x8/0x30 [ 11.294570] ? __snp_enable+0x5d/0x70 [ 11.294575] snp_enable+0x19/0x20 [ 11.294578] __flush_smp_call_function_queue+0x9c/0x3a0 [ 11.294586] generic_smp_call_function_single_interrupt+0x17/0x20 [ 11.294589] __sysvec_call_function+0x20/0x90 [ 11.294596] sysvec_call_function+0x80/0xb0 [ 11.294601] [ 11.294603] [ 11.294605] asm_sysvec_call_function+0x1f/0x30 ... [ 11.294631] arch_cpu_idle+0xd/0x20 [ 11.294633] default_idle_call+0x34/0xd0 [ 11.294636] do_idle+0x1f1/0x230 [ 11.294643] ? complete+0x71/0x80 [ 11.294649] cpu_startup_entry+0x30/0x40 [ 11.294652] start_secondary+0x12d/0x160 [ 11.294655] common_startup_64+0x13e/0x141 [ 11.294662] This #GP exception is getting triggered due to the following errata for AMD family 19h Models 10h-1Fh Processors: Processor may generate spurious #GP(0) Exception on WRMSR instruction: Description: The Processor will generate a spurious #GP(0) Exception on a WRMSR instruction if the following conditions are all met: - the target of the WRMSR is a SYSCFG register. - the write changes the value of SYSCFG.SNPEn from 0 to 1. - One of the threads that share the physical core has a non-zero value in the VM_HSAVE_PA MSR. The document being referred to above: https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/revision-guides/57095-PUB_1_01.pdf To summarize, with kvm_amd module being built-in, KVM/SVM initialization happens before host SNP is enabled and this SVM initialization sets VM_HSAVE_PA to non-zero, which then triggers a #GP when SYSCFG.SNPEn is being set and this will subsequently cause SNP_INIT(_EX) to fail with INVALID_CONFIG error as SYSCFG[SnpEn] is not set on all CPUs. Essentially SNP host enabling code should be invoked before KVM initialization, which is currently not the case when KVM is built-in. Add fix to call snp_rmptable_init() early from iommu_snp_enable() directly and not invoked via device_initcall() which enables SNP host support before KVM initialization with kvm_amd module built-in. Add additional handling for `iommu=off` or `amd_iommu=off` options. Note that IOMMUs need to be enabled for SNP initialization, therefore, if host SNP support is enabled but late IOMMU initialization fails then that will cause PSP driver's SNP_INIT to fail as IOMMU SNP sanity checks in SNP firmware will fail with invalid configuration error as below: [ 9.723114] ccp 0000:23:00.1: sev enabled [ 9.727602] ccp 0000:23:00.1: psp enabled [ 9.732527] ccp 0000:a2:00.1: enabling device (0000 -> 0002) [ 9.739098] ccp 0000:a2:00.1: no command queues available [ 9.745167] ccp 0000:a2:00.1: psp enabled [ 9.805337] ccp 0000:23:00.1: SEV-SNP: failed to INIT rc -5, error 0x3 [ 9.866426] ccp 0000:23:00.1: SEV API:1.53 build:5 Fixes: c3b86e61b756 ("x86/cpufeatures: Enable/unmask SEV-SNP CPU feature") Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Co-developed-by: Vasant Hegde Signed-off-by: Vasant Hegde Cc: Signed-off-by: Ashish Kalra Acked-by: Joerg Roedel Message-ID: <138b520fb83964782303b43ade4369cd181fdd9c.1739226950.git.ashish.kalra@amd.com> Signed-off-by: Paolo Bonzini arch/x86/include/asm/sev.h | 2 ++ arch/x86/virt/svm/sev.c | 23 +++++++---------------- drivers/iommu/amd/init.c | 34 ++++++++++++++++++++++++++++++---- 3 files changed, 39 insertions(+), 20 deletions(-) commit 44e70718df4fc2fadf1665eb9374df71aeda1f03 Author: Sean Christopherson Date: Mon Feb 10 22:54:02 2025 +0000 KVM: SVM: Ensure PSP module is initialized if KVM module is built-in The kernel's initcall infrastructure lacks the ability to express dependencies between initcalls, whereas the modules infrastructure automatically handles dependencies via symbol loading. Ensure the PSP SEV driver is initialized before proceeding in sev_hardware_setup() if KVM is built-in as the dependency isn't handled by the initcall infrastructure. Signed-off-by: Sean Christopherson Reviewed-by: Tom Lendacky Signed-off-by: Ashish Kalra Message-ID: Signed-off-by: Paolo Bonzini arch/x86/kvm/svm/sev.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 435b344a7042e91fb4719d589f18310e8919e39f Author: Sean Christopherson Date: Mon Feb 10 22:53:47 2025 +0000 crypto: ccp: Add external API interface for PSP module initialization KVM is dependent on the PSP SEV driver and PSP SEV driver needs to be loaded before KVM module. In case of module loading any dependent modules are automatically loaded but in case of built-in modules there is no inherent mechanism available to specify dependencies between modules and ensure that any dependent modules are loaded implicitly. Add a new external API interface for PSP module initialization which allows PSP SEV driver to be loaded explicitly if KVM is built-in. Signed-off-by: Sean Christopherson Co-developed-by: Ashish Kalra Signed-off-by: Ashish Kalra Reviewed-by: Tom Lendacky Message-ID: <15279ca0cad56a07cf12834ec544310f85ff5edc.1739226950.git.ashish.kalra@amd.com> Signed-off-by: Paolo Bonzini drivers/crypto/ccp/sp-dev.c | 14 ++++++++++++++ include/linux/psp-sev.h | 9 +++++++++ 2 files changed, 23 insertions(+) commit 3bb7dcebd022fea8a696185592d21bceed7b426c Merge: 43fb96ae7855 b3aa9283c0c5 Author: Paolo Bonzini Date: Fri Feb 14 18:32:47 2025 -0500 Merge tag 'kvmarm-fixes-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.14, take #2 - Large set of fixes for vector handling, specially in the interactions between host and guest state. This fixes a number of bugs affecting actual deployments, and greatly simplifies the FP/SIMD/SVE handling. Thanks to Mark Rutland for dealing with this thankless task. - Fix an ugly race between vcpu and vgic creation/init, resulting in unexpected behaviours. - Fix use of kernel VAs at EL2 when emulating timers with nVHE. - Small set of pKVM improvements and cleanups. commit 3f2ca7b8b33db7d094ef729e6b0707b5534159b0 Merge: f92a80bdb445 a6768c4f92e1 Author: Linus Torvalds Date: Fri Feb 14 15:07:11 2025 -0800 Merge tag 'thermal-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fixes from Rafael Wysocki: "Fix a regression caused by an inadvertent change of the THERMAL_GENL_ATTR_CPU_CAPABILITY value in one of the recent thermal commits (Zhang Rui) and drop a stale piece of documentation (Daniel Lezcano)" * tag 'thermal-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal/cpufreq_cooling: Remove structure member documentation thermal/netlink: Prevent userspace segmentation fault by adjusting UAPI header commit f92a80bdb445e4e73e810ea7e94bebb10717f40a Merge: cabb162eb5ab 3e68abf2b9ce Author: Linus Torvalds Date: Fri Feb 14 14:55:50 2025 -0800 Merge tag 'mmc-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC host fixes from Ulf Hansson: - mtk-sd: Fix register settings for hs400(es) mode - sdhci_am654: Revert patch for start-signal-voltage-switch * tag 'mmc-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: mtk-sd: Fix register settings for hs400(es) mode Revert "mmc: sdhci_am654: Add sdhci_am654_start_signal_voltage_switch" commit cabb162eb5ab02bf10809fe5025d437e99e119e3 Merge: c7ab7b2a18f3 f1bf10d7e909 Author: Linus Torvalds Date: Fri Feb 14 14:42:52 2025 -0800 Merge tag 'v6.14-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fix from Steve French: "SMB3 client multichannel fix" * tag 'v6.14-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: pick channels for individual subrequests commit 43c70b104093c324b1a000762ce943d16ce788f9 Author: Caleb Sander Mateos Date: Fri Feb 14 12:36:36 2025 -0700 block/merge: remove unnecessary min() with UINT_MAX In bvec_split_segs(), max_bytes is an unsigned, so it must be less than or equal to UINT_MAX. Remove the unnecessary min(). Prior to commit 67927d220150 ("block/merge: count bytes instead of sectors"), the min() was with UINT_MAX >> 9, so it did have an effect. Signed-off-by: Caleb Sander Mateos Link: https://lore.kernel.org/r/20250214193637.234702-1-csander@purestorage.com Signed-off-by: Jens Axboe block/blk-merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13918315c5dc5a515926c8799042ea6885c2b734 Author: Uday Shankar Date: Sat Feb 8 13:42:13 2025 -0700 io-wq: backoff when retrying worker creation When io_uring submission goes async for the first time on a given task, we'll try to create a worker thread to handle the submission. Creating this worker thread can fail due to various transient conditions, such as an outstanding signal in the forking thread, so we have retry logic with a limit of 3 retries. However, this retry logic appears to be too aggressive/fast - we've observed a thread blowing through the retry limit while having the same outstanding signal the whole time. Here's an excerpt of some tracing that demonstrates the issue: First, signal 26 is generated for the process. It ends up getting routed to thread 92942. 0) cbd-92284 /* signal_generate: sig=26 errno=0 code=-2 comm=psblkdASD pid=92934 grp=1 res=0 */ This causes create_io_thread in the signalled thread to fail with ERESTARTNOINTR, and thus a retry is queued. 13) task_th-92942 /* io_uring_queue_async_work: ring 000000007325c9ae, request 0000000080c96d8e, user_data 0x0, opcode URING_CMD, flags 0x8240001, normal queue, work 000000006e96dd3f */ 13) task_th-92942 io_wq_enqueue() { 13) task_th-92942 _raw_spin_lock(); 13) task_th-92942 io_wq_activate_free_worker(); 13) task_th-92942 _raw_spin_lock(); 13) task_th-92942 create_io_worker() { 13) task_th-92942 __kmalloc_cache_noprof(); 13) task_th-92942 __init_swait_queue_head(); 13) task_th-92942 kprobe_ftrace_handler() { 13) task_th-92942 get_kprobe(); 13) task_th-92942 aggr_pre_handler() { 13) task_th-92942 pre_handler_kretprobe(); 13) task_th-92942 /* create_enter: (create_io_thread+0x0/0x50) fn=0xffffffff8172c0e0 arg=0xffff888996bb69c0 node=-1 */ 13) task_th-92942 } /* aggr_pre_handler */ ... 13) task_th-92942 } /* copy_process */ 13) task_th-92942 } /* create_io_thread */ 13) task_th-92942 kretprobe_rethook_handler() { 13) task_th-92942 /* create_exit: (create_io_worker+0x8a/0x1a0 <- create_io_thread) arg1=0xfffffffffffffdff */ 13) task_th-92942 } /* kretprobe_rethook_handler */ 13) task_th-92942 queue_work_on() { ... The CPU is then handed to a kworker to process the queued retry: ------------------------------------------ 13) task_th-92942 => kworker-54154 ------------------------------------------ 13) kworker-54154 io_workqueue_create() { 13) kworker-54154 io_queue_worker_create() { 13) kworker-54154 task_work_add() { 13) kworker-54154 wake_up_state() { 13) kworker-54154 try_to_wake_up() { 13) kworker-54154 _raw_spin_lock_irqsave(); 13) kworker-54154 _raw_spin_unlock_irqrestore(); 13) kworker-54154 } /* try_to_wake_up */ 13) kworker-54154 } /* wake_up_state */ 13) kworker-54154 kick_process(); 13) kworker-54154 } /* task_work_add */ 13) kworker-54154 } /* io_queue_worker_create */ 13) kworker-54154 } /* io_workqueue_create */ And then we immediately switch back to the original task to try creating a worker again. This fails, because the original task still hasn't handled its signal. ----------------------------------------- 13) kworker-54154 => task_th-92942 ------------------------------------------ 13) task_th-92942 create_worker_cont() { 13) task_th-92942 kprobe_ftrace_handler() { 13) task_th-92942 get_kprobe(); 13) task_th-92942 aggr_pre_handler() { 13) task_th-92942 pre_handler_kretprobe(); 13) task_th-92942 /* create_enter: (create_io_thread+0x0/0x50) fn=0xffffffff8172c0e0 arg=0xffff888996bb69c0 node=-1 */ 13) task_th-92942 } /* aggr_pre_handler */ 13) task_th-92942 } /* kprobe_ftrace_handler */ 13) task_th-92942 create_io_thread() { 13) task_th-92942 copy_process() { 13) task_th-92942 task_active_pid_ns(); 13) task_th-92942 _raw_spin_lock_irq(); 13) task_th-92942 recalc_sigpending(); 13) task_th-92942 _raw_spin_lock_irq(); 13) task_th-92942 } /* copy_process */ 13) task_th-92942 } /* create_io_thread */ 13) task_th-92942 kretprobe_rethook_handler() { 13) task_th-92942 /* create_exit: (create_worker_cont+0x35/0x1b0 <- create_io_thread) arg1=0xfffffffffffffdff */ 13) task_th-92942 } /* kretprobe_rethook_handler */ 13) task_th-92942 io_worker_release(); 13) task_th-92942 queue_work_on() { 13) task_th-92942 clear_pending_if_disabled(); 13) task_th-92942 __queue_work() { 13) task_th-92942 } /* __queue_work */ 13) task_th-92942 } /* queue_work_on */ 13) task_th-92942 } /* create_worker_cont */ The pattern repeats another couple times until we blow through the retry counter, at which point we give up. All outstanding work is canceled, and the io_uring command which triggered all this is failed with ECANCELED: 13) task_th-92942 io_acct_cancel_pending_work() { ... 13) task_th-92942 /* io_uring_complete: ring 000000007325c9ae, req 0000000080c96d8e, user_data 0x0, result -125, cflags 0x0 extra1 0 extra2 0 */ Finally, the task gets around to processing its outstanding signal 26, but it's too late. 13) task_th-92942 /* signal_deliver: sig=26 errno=0 code=-2 sa_handler=59566a0 sa_flags=14000000 */ Try to address this issue by adding a small scaling delay when retrying worker creation. This should give the forking thread time to handle its signal in the above case. This isn't a particularly satisfying solution, as sufficiently paradoxical scheduling would still have us hitting the same issue, and I'm open to suggestions for something better. But this is likely to prevent this (already rare) issue from hitting in practice. Signed-off-by: Uday Shankar Link: https://lore.kernel.org/r/20250208-wq_retry-v2-1-4f6f5041d303@purestorage.com Signed-off-by: Jens Axboe io_uring/io-wq.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit c7ab7b2a18f386b37a289a00ff3d92f00bb16934 Merge: 1b8c8cdad174 bbc4578537e3 Author: Linus Torvalds Date: Fri Feb 14 13:56:04 2025 -0800 Merge tag 'efi-fixes-for-v6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI fixes from Ard Biesheuvel: "Take the newly introduced EFI_MEMORY_HOT_PLUGGABLE memory attribute into account when placing the kernel image in memory at boot. Otherwise, the presence of the kernel image could prevent such a memory region from being unplugged at runtime if it was 'cold plugged', i.e., already plugged in at boot time (and exposed via the EFI memory map). This should ensure that the new EFI_MEMORY_HOT_PLUGGABLE memory attribute is used consistently by Linux before it ever turns up in production, ensuring that we can make meaningful use of it without running the risk of regressing existing users" * tag 'efi-fixes-for-v6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi: Use BIT_ULL() constants for memory attributes efi: Avoid cold plugged memory for placing the kernel commit 0d1fac6d26aff5df21bb4ec980d9b7a11c410b96 Author: Stephan Gerhold Date: Wed Feb 12 12:15:35 2025 +0100 net: wwan: mhi_wwan_mbim: Silence sequence number glitch errors When using the Qualcomm X55 modem on the ThinkPad X13s, the kernel log is constantly being filled with errors related to a "sequence number glitch", e.g.: [ 1903.284538] sequence number glitch prev=16 curr=0 [ 1913.812205] sequence number glitch prev=50 curr=0 [ 1923.698219] sequence number glitch prev=142 curr=0 [ 2029.248276] sequence number glitch prev=1555 curr=0 [ 2046.333059] sequence number glitch prev=70 curr=0 [ 2076.520067] sequence number glitch prev=272 curr=0 [ 2158.704202] sequence number glitch prev=2655 curr=0 [ 2218.530776] sequence number glitch prev=2349 curr=0 [ 2225.579092] sequence number glitch prev=6 curr=0 Internet connectivity is working fine, so this error seems harmless. It looks like modem does not preserve the sequence number when entering low power state; the amount of errors depends on how actively the modem is being used. A similar issue has also been seen on USB-based MBIM modems [1]. However, in cdc_ncm.c the "sequence number glitch" message is a debug message instead of an error. Apply the same to the mhi_wwan_mbim.c driver to silence these errors when using the modem. [1]: https://lists.freedesktop.org/archives/libmbim-devel/2016-November/000781.html Signed-off-by: Stephan Gerhold Reviewed-by: Loic Poulain Acked-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20250212-mhi-wwan-mbim-sequence-glitch-v1-1-503735977cbd@linaro.org Signed-off-by: Jakub Kicinski drivers/net/wwan/mhi_wwan_mbim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 054e61bb1de4fa02d148344152007facbcb28583 Author: Jeroen de Borst Date: Thu Feb 13 10:45:23 2025 -0800 gve: Update MAINTAINERS Updating MAINTAINERS to include active contributers. Signed-off-by: Jeroen de Borst Link: https://patch.msgid.link/20250213184523.2002582-1-jeroendb@google.com Signed-off-by: Jakub Kicinski MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 245aece3750d3692ae7a44516c1096936bded7ab Author: Alexandre Ghiti Date: Thu Dec 12 14:11:34 2024 +0100 MAINTAINERS: Add myself as a riscv reviewer The goal is for me to get a kernel.org account and then send pull requests in order to relieve some pressure from Palmer and make our workflow smoother. Signed-off-by: Alexandre Ghiti Enthusiastically-Supported-by: Björn Töpel Acked-by: Conor Dooley Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20241212131134.288819-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 564fc8eb6f78e01292ff10801f318feae6153fdd Author: Yong-Xuan Wang Date: Fri Dec 20 16:39:24 2024 +0800 riscv: signal: fix signal_minsigstksz The init_rt_signal_env() funciton is called before the alternative patch is applied, so using the alternative-related API to check the availability of an extension within this function doesn't have the intended effect. This patch reorders the init_rt_signal_env() and apply_boot_alternatives() to get the correct signal_minsigstksz. Fixes: e92f469b0771 ("riscv: signal: Report signal frame size to userspace via auxv") Signed-off-by: Yong-Xuan Wang Reviewed-by: Zong Li Reviewed-by: Andy Chiu Reviewed-by: Alexandre Ghiti Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20241220083926.19453-3-yongxuan.wang@sifive.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa49bc2ca8524186ceb0811c23a7f00c3dea6987 Author: Yong-Xuan Wang Date: Fri Dec 20 16:39:23 2024 +0800 riscv: signal: fix signal frame size The signal context of certain RISC-V extensions will be appended after struct __riscv_extra_ext_header, which already includes an empty context header. Therefore, there is no need to preserve a separate hdr for the END of signal context. Fixes: 8ee0b41898fa ("riscv: signal: Add sigcontext save/restore for vector") Signed-off-by: Yong-Xuan Wang Reviewed-by: Zong Li Reviewed-by: Andy Chiu Reviewed-by: Alexandre Ghiti Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20241220083926.19453-2-yongxuan.wang@sifive.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/signal.c | 6 ------ 1 file changed, 6 deletions(-) commit 713e788c0e07e185fd44dd581f74855ef149722f Author: Stafford Horne Date: Tue Jan 14 17:07:21 2025 +0000 rseq/selftests: Fix riscv rseq_offset_deref_addv inline asm When working on OpenRISC support for restartable sequences I noticed and fixed these two issues with the riscv support bits. 1 The 'inc' argument to RSEQ_ASM_OP_R_DEREF_ADDV was being implicitly passed to the macro. Fix this by adding 'inc' to the list of macro arguments. 2 The inline asm input constraints for 'inc' and 'off' use "er", The riscv gcc port does not have an "e" constraint, this looks to be copied from the x86 port. Fix this by just using an "r" constraint. I have compile tested this only for riscv. However, the same fixes I use in the OpenRISC rseq selftests and everything passes with no issues. Fixes: 171586a6ab66 ("selftests/rseq: riscv: Template memory ordering and percpu access mode") Signed-off-by: Stafford Horne Tested-by: Charlie Jenkins Reviewed-by: Charlie Jenkins Reviewed-by: Mathieu Desnoyers Acked-by: Shuah Khan Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250114170721.3613280-1-shorne@gmail.com Signed-off-by: Palmer Dabbelt tools/testing/selftests/rseq/rseq-riscv-bits.h | 6 +++--- tools/testing/selftests/rseq/rseq-riscv.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 599c44cd21f4967774e0acf58f734009be4aea9a Author: Andreas Schwab Date: Mon Feb 3 11:06:00 2025 +0100 riscv/futex: sign extend compare value in atomic cmpxchg Make sure the compare value in the lr/sc loop is sign extended to match what lr.w does. Fortunately, due to the compiler keeping the register contents sign extended anyway the lack of the explicit extension didn't result in wrong code so far, but this cannot be relied upon. Fixes: b90edb33010b ("RISC-V: Add futex support.") Signed-off-by: Andreas Schwab Reviewed-by: Alexandre Ghiti Reviewed-by: Björn Töpel Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/mvmfrkv2vhz.fsf@suse.de Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/futex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1898300abf3508bca152e65b36cce5bf93d7e63e Author: Andreas Schwab Date: Thu Jan 30 10:25:38 2025 +0100 riscv/atomic: Do proper sign extension also for unsigned in arch_cmpxchg Sign extend also an unsigned compare value to match what lr.w is doing. Otherwise try_cmpxchg may spuriously return true when used on a u32 value that has the sign bit set, as it happens often in inode_set_ctime_current. Do this in three conversion steps. The first conversion to long is needed to avoid a -Wpointer-to-int-cast warning when arch_cmpxchg is used with a pointer type. Then convert to int and back to long to always sign extend the 32-bit value to 64-bit. Fixes: 6c58f25e6938 ("riscv/atomic: Fix sign extension for RV64I") Signed-off-by: Andreas Schwab Reviewed-by: Alexandre Ghiti Reviewed-by: Andrew Jones Tested-by: Xi Ruoyao Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/mvmed0k4prh.fsf@suse.de Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/cmpxchg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6ec1e1b078d8e2ecd075e46db6197a14930a3fc Author: Clément Léger Date: Mon Feb 10 16:56:14 2025 +0100 riscv: cpufeature: use bitmap_equal() instead of memcmp() Comparison of bitmaps should be done using bitmap_equal(), not memcmp(), use the former one to compare isa bitmaps. Signed-off-by: Clément Léger Fixes: 625034abd52a8c ("riscv: add ISA extensions validation callback") Reviewed-by: Alexandre Ghiti Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250210155615.1545738-1-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb8179ce2996bffaa36a04e2b6262843b01b7565 Author: Rob Herring Date: Mon Nov 4 13:03:13 2024 -0600 riscv: cacheinfo: 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) Reviewed-by: Clément Léger Cc: stable@vger.kernel.org Fixes: 76d2a0493a17 ("RISC-V: Init and Halt Code") Link: https://lore.kernel.org/r/20241104190314.270095-1-robh@kernel.org Signed-off-by: Palmer Dabbelt arch/riscv/kernel/cacheinfo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1b8c8cdad1749d68130147f187008a368d564933 Merge: ea7173247414 80e648042e51 Author: Linus Torvalds Date: Fri Feb 14 11:40:59 2025 -0800 Merge tag 'block-6.14-20250214' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - Fix for request rejection for batch addition - Fix a few issues for bogus mac partition tables * tag 'block-6.14-20250214' of git://git.kernel.dk/linux: partitions: mac: fix handling of bogus partition table block: cleanup and fix batch completion adding conditions commit c158647c107358bf1be579f98e4bb705c1953292 Author: Komal Bajaj Date: Tue Nov 19 12:16:08 2024 +0530 EDAC/qcom: Correct interrupt enable register configuration The previous implementation incorrectly configured the cmn_interrupt_2_enable register for interrupt handling. Using cmn_interrupt_2_enable to configure Tag, Data RAM ECC interrupts would lead to issues like double handling of the interrupts (EL1 and EL3) as cmn_interrupt_2_enable is meant to be configured for interrupts which needs to be handled by EL3. EL1 LLCC EDAC driver needs to use cmn_interrupt_0_enable register to configure Tag, Data RAM ECC interrupts instead of cmn_interrupt_2_enable. Fixes: 27450653f1db ("drivers: edac: Add EDAC driver support for QCOM SoCs") Signed-off-by: Komal Bajaj Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Manivannan Sadhasivam Cc: Link: https://lore.kernel.org/r/20241119064608.12326-1-quic_kbajaj@quicinc.com drivers/edac/qcom_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea717324741471665110b4475a52c08a56026a9e Merge: 04f41cbf03ec d6211ebbdaa5 Author: Linus Torvalds Date: Fri Feb 14 11:30:53 2025 -0800 Merge tag 'io_uring-6.14-20250214' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - fixes for a potential data corruption issue with IORING_OP_URING_CMD, where not all the SQE data is stable. Will be revisited in the future, for now it ends up with just always copying it beyond prep to provide the same guarantees as all other opcodes - make the waitid opcode setup async data like any other opcodes (no real fix here, just a consistency thing) - fix for waitid io_tw_state abuse - when a buffer group is type is changed, do so by allocating a new buffer group entry and discard the old one, rather than migrating * tag 'io_uring-6.14-20250214' of git://git.kernel.dk/linux: io_uring/uring_cmd: unconditionally copy SQEs at prep time io_uring/waitid: setup async data in the prep handler io_uring/uring_cmd: remove dead req_has_async_data() check io_uring/uring_cmd: switch sqe to async_data on EAGAIN io_uring/uring_cmd: don't assume io_uring_cmd_data layout io_uring/kbuf: reallocate buf lists on upgrade io_uring/waitid: don't abuse io_tw_state commit 04f41cbf03ec7221ab0b179e336f4c805ee55520 Merge: 80868f5d3dca f5717c93a1b9 Author: Linus Torvalds Date: Fri Feb 14 11:14:24 2025 -0800 Merge tag 'sched_ext-for-6.14-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext Pull sched_ext fixes from Tejun Heo: - Fix lock imbalance in a corner case of dispatch_to_local_dsq() - Migration disabled tasks were confusing some BPF schedulers and its handling had a bug. Fix it and simplify the default behavior by dispatching them automatically - ops.tick(), ops.disable() and ops.exit_task() were incorrectly disallowing kfuncs that require the task argument to be the rq operation is currently operating on and thus is rq-locked. Allow them. - Fix autogroup migration handling bug which was occasionally triggering a warning in the cgroup migration path - tools/sched_ext, selftest and other misc updates * tag 'sched_ext-for-6.14-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext: sched_ext: Use SCX_CALL_OP_TASK in task_tick_scx sched_ext: Fix the incorrect bpf_list kfunc API in common.bpf.h. sched_ext: selftests: Fix grammar in tests description sched_ext: Fix incorrect assumption about migration disabled tasks in task_can_run_on_remote_rq() sched_ext: Fix migration disabled handling in targeted dispatches sched_ext: Implement auto local dispatching of migration disabled tasks sched_ext: Fix incorrect time delta calculation in time_delta() sched_ext: Fix lock imbalance in dispatch_to_local_dsq() sched_ext: selftests/dsp_local_on: Fix selftest on UP systems tools/sched_ext: Add helper to check task migration state sched_ext: Fix incorrect autogroup migration detection sched_ext: selftests/dsp_local_on: Fix sporadic failures selftests/sched_ext: Fix enum resolution sched_ext: Include task weight in the error state dump sched_ext: Fixes typos in comments commit 1523226edda566057bdd3264ceb56631ddf5f6f7 Author: Thorsten Blum Date: Wed Feb 12 12:14:47 2025 +0100 alpha: Use str_yes_no() helper in pci_dac_dma_supported() Remove hard-coded strings by using the str_yes_no() helper function. Reviewed-by: Geert Uytterhoeven Signed-off-by: Thorsten Blum Signed-off-by: Matt Turner arch/alpha/kernel/pci_iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 757f051a506198186d796dff4ba696adb7bda54c Author: Thorsten Blum Date: Tue Jan 7 11:43:42 2025 +0100 alpha: Replace one-element array with flexible array member Replace the deprecated one-element array with a modern flexible array member in the struct crb_struct. Reviewed-by: Kees Cook Signed-off-by: Thorsten Blum Signed-off-by: Matt Turner arch/alpha/include/asm/hwrpb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b35a171060f846b08b48646b38c30b5d57d17ff Author: Ivan Kokshaysky Date: Tue Feb 4 23:35:24 2025 +0100 alpha: align stack for page fault and user unaligned trap handlers do_page_fault() and do_entUna() are special because they use non-standard stack frame layout. Fix them manually. Cc: stable@vger.kernel.org Tested-by: Maciej W. Rozycki Tested-by: Magnus Lindholm Tested-by: Matt Turner Reviewed-by: Maciej W. Rozycki Suggested-by: Maciej W. Rozycki Signed-off-by: Ivan Kokshaysky Signed-off-by: Matt Turner arch/alpha/kernel/entry.S | 20 ++++++++++---------- arch/alpha/kernel/traps.c | 2 +- arch/alpha/mm/fault.c | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) commit 0a0f7362b0367634a2d5cb7c96226afc116f19c9 Author: Ivan Kokshaysky Date: Tue Feb 4 23:35:23 2025 +0100 alpha: make stack 16-byte aligned (most cases) The problem is that GCC expects 16-byte alignment of the incoming stack since early 2004, as Maciej found out [1]: Having actually dug speculatively I can see that the psABI was changed in GCC 3.5 with commit e5e10fb4a350 ("re PR target/14539 (128-bit long double improperly aligned)") back in Mar 2004, when the stack pointer alignment was increased from 8 bytes to 16 bytes, and arch/alpha/kernel/entry.S has various suspicious stack pointer adjustments, starting with SP_OFF which is not a whole multiple of 16. Also, as Magnus noted, "ALPHA Calling Standard" [2] required the same: D.3.1 Stack Alignment This standard requires that stacks be octaword aligned at the time a new procedure is invoked. However: - the "normal" kernel stack is always misaligned by 8 bytes, thanks to the odd number of 64-bit words in 'struct pt_regs', which is the very first thing pushed onto the kernel thread stack; - syscall, fault, interrupt etc. handlers may, or may not, receive aligned stack depending on numerous factors. Somehow we got away with it until recently, when we ended up with a stack corruption in kernel/smp.c:smp_call_function_single() due to its use of 32-byte aligned local data and the compiler doing clever things allocating it on the stack. This adds padding between the PAL-saved and kernel-saved registers so that 'struct pt_regs' have an even number of 64-bit words. This makes the stack properly aligned for most of the kernel code, except two handlers which need special threatment. Note: struct pt_regs doesn't belong in uapi/asm; this should be fixed, but let's put this off until later. Link: https://lore.kernel.org/rcu/alpine.DEB.2.21.2501130248010.18889@angie.orcam.me.uk/ [1] Link: https://bitsavers.org/pdf/dec/alpha/Alpha_Calling_Standard_Rev_2.0_19900427.pdf [2] Cc: stable@vger.kernel.org Tested-by: Maciej W. Rozycki Tested-by: Magnus Lindholm Tested-by: Matt Turner Reviewed-by: Maciej W. Rozycki Signed-off-by: Ivan Kokshaysky Signed-off-by: Matt Turner arch/alpha/include/uapi/asm/ptrace.h | 2 ++ 1 file changed, 2 insertions(+) commit 77b823fa619f97d16409ca37ad4f7936e28c5f83 Author: Ivan Kokshaysky Date: Tue Feb 4 23:35:22 2025 +0100 alpha: replace hardcoded stack offsets with autogenerated ones This allows the assembly in entry.S to automatically keep in sync with changes in the stack layout (struct pt_regs and struct switch_stack). Cc: stable@vger.kernel.org Tested-by: Maciej W. Rozycki Tested-by: Matt Turner Reviewed-by: Maciej W. Rozycki Signed-off-by: Ivan Kokshaysky Signed-off-by: Matt Turner arch/alpha/kernel/asm-offsets.c | 4 ++++ arch/alpha/kernel/entry.S | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) commit 80868f5d3dca7230a87ee7947d0c7f821ce85b3e Merge: f4d4680965aa db5fd3cf8bf4 Author: Linus Torvalds Date: Fri Feb 14 11:00:42 2025 -0800 Merge tag 'cgroup-for-6.14-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: - Fix a race window where a newly forked task could escape cgroup.kill - Remove incorrectly included steal time from cpu.stat::usage_usec - Minor update in selftest * tag 'cgroup-for-6.14-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: Remove steal time from usage_usec selftests/cgroup: use bash in test_cpuset_v1_hp.sh cgroup: fix race between fork and cgroup.kill commit f4d4680965aa3be2b2bf392a54fabb244fdce46a Merge: 111b29599c18 e76946110137 Author: Linus Torvalds Date: Fri Feb 14 10:58:03 2025 -0800 Merge tag 'wq-for-6.14-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fix from Tejun Heo: - Fix a regression where a worker pool can be freed before rescuer workers are done with it leading to user-after-free * tag 'wq-for-6.14-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Put the pwq after detaching the rescuer from the pool commit 41758630dd7ea9dce3eb152168c979534b415ab0 Author: Niravkumar L Rabara Date: Wed Feb 12 19:25:34 2025 +0800 dt-bindings: mtd: cadence: document required clock-names The clock-names property is required because the driver requests the clock by name and not the index. Update the example to use &clk instead of &nf_clk for the clocks property to avoid confusion with the clock-names property "nf_clk". Fixes: 1f05f823a16c (dt-bindings: mtd: cadence: convert cadence-nand-controller.txt to yaml) Signed-off-by: Niravkumar L Rabara Reviewed-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal Documentation/devicetree/bindings/mtd/cdns,hp-nfc.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 111b29599c189247919a514b6c3a93e828db27c2 Merge: 93bd481b6076 446a8351f160 Author: Linus Torvalds Date: Fri Feb 14 09:55:17 2025 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: - Fix kexec and hibernation when using 5-level page-table configuration - Remove references to non-existent SF8MM4 and SF8MM8 ID register fields, hooking up hwcaps for the FPRCVT, F8MM4 and F8MM8 fields instead - Drop unused .ARM.attributes ELF sections - Fix array indexing when probing CPU cache topology from firmware - Fix potential use-after-free in AMU initialisation code - Work around broken GTDT entries by tolerating excessively large timer arrays - Force use of Rust's "softfloat" target to avoid a threatening warning about the NEON target feature - Typo fix in GCS documentation and removal of duplicate Kconfig select * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: rust: clean Rust 1.85.0 warning using softfloat target arm64: Add missing registrations of hwcaps ACPI: GTDT: Relax sanity checking on Platform Timers array count arm64: amu: Delay allocating cpumask for AMU FIE support arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array arm64: Handle .ARM.attributes section in linker scripts arm64/hwcap: Remove stray references to SF8MMx arm64/gcs: Fix documentation for HWCAP arm64: Kconfig: Remove selecting replaced HAVE_FUNCTION_GRAPH_RETVAL arm64: Fix 5-level paging support in kexec/hibernate trampoline commit f5b95f1fa2ef3a03f49eeec658ba97e721412b32 Author: Steven Rostedt Date: Fri Feb 14 10:28:20 2025 -0500 ring-buffer: Validate the persistent meta data subbuf array The meta data for a mapped ring buffer contains an array of indexes of all the subbuffers. The first entry is the reader page, and the rest of the entries lay out the order of the subbuffers in how the ring buffer link list is to be created. The validator currently makes sure that all the entries are within the range of 0 and nr_subbufs. But it does not check if there are any duplicates. While working on the ring buffer, I corrupted this array, where I added duplicates. The validator did not catch it and created the ring buffer link list on top of it. Luckily, the corruption was only that the reader page was also in the writer path and only presented corrupted data but did not crash the kernel. But if there were duplicates in the writer side, then it could corrupt the ring buffer link list and cause a crash. Create a bitmask array with the size of the number of subbuffers. Then clear it. When walking through the subbuf array checking to see if the entries are within the range, test if its bit is already set in the subbuf_mask. If it is, then there is duplicates and fail the validation. If not, set the corresponding bit and continue. Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Vincent Donnefort Link: https://lore.kernel.org/20250214102820.7509ddea@gandalf.local.home Fixes: c76883f18e59b ("ring-buffer: Add test if range of boot buffer is valid") Signed-off-by: Steven Rostedt (Google) kernel/trace/ring_buffer.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 60b8f711143de7cd9c0f55be0fe7eb94b19eb5c7 Author: Steven Rostedt Date: Thu Feb 13 13:41:32 2025 -0500 tracing: Have the error of __tracing_resize_ring_buffer() passed to user Currently if __tracing_resize_ring_buffer() returns an error, the tracing_resize_ringbuffer() returns -ENOMEM. But it may not be a memory issue that caused the function to fail. If the ring buffer is memory mapped, then the resizing of the ring buffer will be disabled. But if the user tries to resize the buffer, it will get an -ENOMEM returned, which is confusing because there is plenty of memory. The actual error returned was -EBUSY, which would make much more sense to the user. Cc: stable@vger.kernel.org Cc: Mathieu Desnoyers Cc: Vincent Donnefort Link: https://lore.kernel.org/20250213134132.7e4505d7@gandalf.local.home Fixes: 117c39200d9d7 ("ring-buffer: Introducing ring-buffer mapping functions") Signed-off-by: Steven Rostedt (Google) Reviewed-by: Masami Hiramatsu (Google) kernel/trace/trace.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 9ba0e1755a40f9920ad0f4168031291b3eb58d7b Author: Steven Rostedt Date: Thu Feb 13 13:19:57 2025 -0500 ring-buffer: Unlock resize on mmap error Memory mapping the tracing ring buffer will disable resizing the buffer. But if there's an error in the memory mapping like an invalid parameter, the function exits out without re-enabling the resizing of the ring buffer, preventing the ring buffer from being resized after that. Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Vincent Donnefort Link: https://lore.kernel.org/20250213131957.530ec3c5@gandalf.local.home Fixes: 117c39200d9d7 ("ring-buffer: Introducing ring-buffer mapping functions") Signed-off-by: Steven Rostedt (Google) kernel/trace/ring_buffer.c | 1 + 1 file changed, 1 insertion(+) commit 93bd481b6076299256c96aa21362f09cea121c69 Merge: fd31a1bea3c9 add43c4fbc92 Author: Linus Torvalds Date: Fri Feb 14 09:46:51 2025 -0800 Merge tag 'iommu-fixes-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux Pull iommu fixes from Joerg Roedel: - core: fix potential memory leak in iopf_queue_remove_device() - Intel VT-d: handle faults correctly in intel_iommu_drain_pasid_prq() - AMD-Vi: fix faults happening in resume path - typo and spelling fixes * tag 'iommu-fixes-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux: iommu/vt-d: Make intel_iommu_drain_pasid_prq() cover faults for RID iommu/exynos: Fix typos iommu: Fix a spelling error iommu/amd: Expicitly enable CNTRL.EPHEn bit in resume path iommu: Fix potential memory leak in iopf_queue_remove_device() commit 8221fd1a73044adef712a5c9346a23c2447f629c Author: Will Deacon Date: Fri Feb 14 16:43:49 2025 +0000 workqueue: Log additional details when rejecting work Syzbot regularly runs into the following warning on arm64: | WARNING: CPU: 1 PID: 6023 at kernel/workqueue.c:2257 current_wq_worker kernel/workqueue_internal.h:69 [inline] | WARNING: CPU: 1 PID: 6023 at kernel/workqueue.c:2257 is_chained_work kernel/workqueue.c:2199 [inline] | WARNING: CPU: 1 PID: 6023 at kernel/workqueue.c:2257 __queue_work+0xe50/0x1308 kernel/workqueue.c:2256 | Modules linked in: | CPU: 1 UID: 0 PID: 6023 Comm: klogd Not tainted 6.13.0-rc2-syzkaller-g2e7aff49b5da #0 | Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 | pstate: 404000c5 (nZcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) | pc : __queue_work+0xe50/0x1308 kernel/workqueue_internal.h:69 | lr : current_wq_worker kernel/workqueue_internal.h:69 [inline] | lr : is_chained_work kernel/workqueue.c:2199 [inline] | lr : __queue_work+0xe50/0x1308 kernel/workqueue.c:2256 [...] | __queue_work+0xe50/0x1308 kernel/workqueue.c:2256 (L) | delayed_work_timer_fn+0x74/0x90 kernel/workqueue.c:2485 | call_timer_fn+0x1b4/0x8b8 kernel/time/timer.c:1793 | expire_timers kernel/time/timer.c:1839 [inline] | __run_timers kernel/time/timer.c:2418 [inline] | __run_timer_base+0x59c/0x7b4 kernel/time/timer.c:2430 | run_timer_base kernel/time/timer.c:2439 [inline] | run_timer_softirq+0xcc/0x194 kernel/time/timer.c:2449 The warning is probably because we are trying to queue work into a destroyed workqueue, but the softirq context makes it hard to pinpoint the problematic caller. Extend the warning diagnostics to print both the function we are trying to queue as well as the name of the workqueue. Cc: Tejun Heo Cc: Catalin Marinas Cc: Marc Zyngier Cc: Lai Jiangshan Link: https://syzkaller.appspot.com/bug?extid=e13e654d315d4da1277c Signed-off-by: Will Deacon Signed-off-by: Tejun Heo kernel/workqueue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f85478fb3fecad01927935c51fe7e9dd5731d0b7 Merge: 6fe9116dd6be 7422c319fd80 Author: Wolfram Sang Date: Fri Feb 14 17:23:54 2025 +0100 Merge tag 'i2c-host-fixes-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current i2c-host-fixes for v6.14-rc3 - Mukesh and Viken take over maintainership of the Qualcomm I2C driver. - Krzysztof Adamski is removed as maintainer of the Axxia I2C driver. commit fd31a1bea3c94e01cb7b998485d2d7b14bdc8101 Merge: 128c8f96eb86 75ad02318af2 Author: Linus Torvalds Date: Fri Feb 14 08:15:17 2025 -0800 Merge tag 'for-linus-6.14-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Three fixes to xen-swiotlb driver: - two fixes for issues coming up due to another fix in 6.12 - addition of an __init annotation" * tag 'for-linus-6.14-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: Xen/swiotlb: mark xen_swiotlb_fixup() __init x86/xen: allow larger contiguous memory regions in PV guests xen/swiotlb: relax alignment requirements commit 80e648042e512d5a767da251d44132553fe04ae0 Author: Jann Horn Date: Fri Feb 14 02:39:50 2025 +0100 partitions: mac: fix handling of bogus partition table Fix several issues in partition probing: - The bailout for a bad partoffset must use put_dev_sector(), since the preceding read_part_sector() succeeded. - If the partition table claims a silly sector size like 0xfff bytes (which results in partition table entries straddling sector boundaries), bail out instead of accessing out-of-bounds memory. - We must not assume that the partition table contains proper NUL termination - use strnlen() and strncmp() instead of strlen() and strcmp(). Cc: stable@vger.kernel.org Signed-off-by: Jann Horn Link: https://lore.kernel.org/r/20250214-partition-mac-v1-1-c1c626dffbd5@google.com Signed-off-by: Jens Axboe block/partitions/mac.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit b3fefbb30a1691533cb905006b69b2a474660744 Author: David Hildenbrand Date: Fri Jan 24 19:15:23 2025 +0100 nouveau/svm: fix missing folio unlock + put after make_device_exclusive_range() In case we have to retry the loop, we are missing to unlock+put the folio. In that case, we will keep failing make_device_exclusive_range() because we cannot grab the folio lock, and even return from the function with the folio locked and referenced, effectively never succeeding the make_device_exclusive_range(). While at it, convert the other unlock+put to use a folio as well. This was found by code inspection. Fixes: 8f187163eb89 ("nouveau/svm: implement atomic SVM access") Signed-off-by: David Hildenbrand Reviewed-by: Alistair Popple Tested-by: Alistair Popple Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20250124181524.3584236-2-david@redhat.com drivers/gpu/drm/nouveau/nouveau_svm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 70b0d6b0a199c5a3ee6c72f5e61681ed6f759612 Author: Sumit Garg Date: Tue Feb 4 13:04:18 2025 +0530 tee: optee: Fix supplicant wait loop OP-TEE supplicant is a user-space daemon and it's possible for it be hung or crashed or killed in the middle of processing an OP-TEE RPC call. It becomes more complicated when there is incorrect shutdown ordering of the supplicant process vs the OP-TEE client application which can eventually lead to system hang-up waiting for the closure of the client application. Allow the client process waiting in kernel for supplicant response to be killed rather than indefinitely waiting in an unkillable state. Also, a normal uninterruptible wait should not have resulted in the hung-task watchdog getting triggered, but the endless loop would. This fixes issues observed during system reboot/shutdown when supplicant got hung for some reason or gets crashed/killed which lead to client getting hung in an unkillable state. It in turn lead to system being in hung up state requiring hard power off/on to recover. Fixes: 4fb0a5eb364d ("tee: add OP-TEE driver") Suggested-by: Arnd Bergmann Cc: stable@vger.kernel.org Signed-off-by: Sumit Garg Reviewed-by: Arnd Bergmann Reviewed-by: Jens Wiklander Signed-off-by: Arnd Bergmann drivers/tee/optee/supp.c | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) commit dd0f05b98925111f4530d7dab774398cdb32e9e3 Author: Geert Uytterhoeven Date: Fri Feb 14 09:31:29 2025 +0100 platform: cznic: CZNIC_PLATFORMS should depend on ARCH_MVEBU CZ.NIC's Turris devices are based on Marvell EBU SoCs. Hence add a dependency on ARCH_MVEBU, to prevent asking the user about these drivers when configuring a kernel that cannot run on an affected CZ.NIC Turris system. Fixes: 992f1a3d4e88498d ("platform: cznic: Add preliminary support for Turris Omnia MCU") Signed-off-by: Geert Uytterhoeven Signed-off-by: Arnd Bergmann drivers/platform/cznic/Kconfig | 1 + 1 file changed, 1 insertion(+) commit be6686b823b30a69b1f71bde228ce042c78a1941 Author: Geert Uytterhoeven Date: Wed Feb 5 15:41:43 2025 +0100 firmware: imx: IMX_SCMI_MISC_DRV should depend on ARCH_MXC The i.MX System Controller Management Interface firmware is only present on Freescale i.MX SoCs. Hence add a dependency on ARCH_MXC, to prevent asking the user about this driver when configuring a kernel without Freescale i.MX platform support. Fixes: 514b2262ade48a05 ("firmware: arm_scmi: Fix i.MX build dependency") Signed-off-by: Geert Uytterhoeven Reviewed-by: Fabio Estevam Signed-off-by: Arnd Bergmann drivers/firmware/imx/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0d7f66437875a38bec7764d59ac2f77bc1271351 Merge: f0570fdc8f72 c7691aec5e99 Author: Arnd Bergmann Date: Fri Feb 14 15:07:16 2025 +0100 Merge tag 'ti-k3-config-fixes-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into HEAD TI K3 defconfig fixes for v6.14 - Enable TISCI Interrupt Router, Interrupt Aggregator and related drivers. * tag 'ti-k3-config-fixes-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: arm64: defconfig: Enable TISCI Interrupt Router and Aggregator Link: https://lore.kernel.org/r/20250212112857.pm6ptaqbx545qnv7@eternity Signed-off-by: Arnd Bergmann commit f0570fdc8f72fb1a22bfd2bbf030b34a06da21ff Author: Janne Grunau Date: Sat Feb 8 10:22:01 2025 +0100 MAINTAINERS: arm: apple: Add Janne as maintainer Sven and I have agreed to share the maintainership for the ARM/APPLE platform after Marcan's step down. I'm handling the downstream Asahi Linux tree since April 2024 and worked on or wrote several drivers for the platform. Signed-off-by: Janne Grunau Acked-by: Sven Peter Acked-by: Hector Martin Acked-by: Neal Gompa Link: https://lore.kernel.org/r/20250208-maint-soc-apple-v1-1-a7f7337baec0@jannau.net Signed-off-by: Arnd Bergmann MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 5755eb0a8168493fddf63d72e0133de54b3a17dd Author: Andrew Jeffery Date: Mon Feb 3 13:26:31 2025 +1030 MAINTAINERS: Mark Andrew as M: for ASPEED MACHINE SUPPORT From discussion in [1] and in-person with Joel, flip my entry from R: to M:. Link: https://lore.kernel.org/all/CACPK8Xe8yZLXzEQPp=1D2f0TsKA7hBZG=pHHW6U51FMpp_BiRQ@mail.gmail.com/ [1] Cc: Joel Stanley Cc: Arnd Bergmann Cc: soc@lists.linux.dev Cc: linux-aspeed@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrew Jeffery Acked-by: Joel Stanley Signed-off-by: Arnd Bergmann MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 410014579eb0e891032e3c45092f17d186232fb1 Merge: a64dcfb451e2 8546cfd08aa4 Author: Arnd Bergmann Date: Fri Feb 14 15:04:45 2025 +0100 Merge tag 'v6.14-rockchip-dtsfixes1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into HEAD Fixes for the IOMMU used together with the PCIe controllers on rk3588, some board-level fixes for wrong pins, pinctrl and regulators, and disabling DMA on a board where the DMA+uart causes the dma controller to hang, as well as improved network stability for the OrangePi R1. * tag 'v6.14-rockchip-dtsfixes1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: adjust SMMU interrupt type on rk3588 arm64: dts: rockchip: disable IOMMU when running rk3588 in PCIe endpoint mode dt-bindings: rockchip: pmu: Ensure all properties are defined arm64: dts: rockchip: Fix lcdpwr_en pin for Cool Pi GenBook arm64: dts: rockchip: fix fixed-regulator renames on rk3399-gru devices arm64: dts: rockchip: Disable DMA for uart5 on px30-ringneck arm64: dts: rockchip: Move uart5 pin configuration to px30 ringneck SoM arm64: dts: rockchip: change eth phy mode to rgmii-id for orangepi r1 plus lts arm64: dts: rockchip: Fix broken tsadc pinctrl names for rk3588 Link: https://lore.kernel.org/r/3004814.3ZeAukHxDK@diego Signed-off-by: Arnd Bergmann commit 55f1a5f7c97c3c92ba469e16991a09274410ceb7 Author: BH Hsieh Date: Wed Jan 22 18:59:43 2025 +0800 phy: tegra: xusb: reset VBUS & ID OVERRIDE Observed VBUS_OVERRIDE & ID_OVERRIDE might be programmed with unexpected value prior to XUSB PADCTL driver, this could also occur in virtualization scenario. For example, UEFI firmware programs ID_OVERRIDE=GROUNDED to set a type-c port to host mode and keeps the value to kernel. If the type-c port is connected a usb host, below errors can be observed right after usb host mode driver gets probed. The errors would keep until usb role class driver detects the type-c port as device mode and notifies usb device mode driver to set both ID_OVERRIDE and VBUS_OVERRIDE to correct value by XUSB PADCTL driver. [ 173.765814] usb usb3-port2: Cannot enable. Maybe the USB cable is bad? [ 173.765837] usb usb3-port2: config error Taking virtualization into account, asserting XUSB PADCTL reset would break XUSB functions used by other guest OS, hence only reset VBUS & ID OVERRIDE of the port in utmi_phy_init. Fixes: bbf711682cd5 ("phy: tegra: xusb: Add Tegra186 support") Cc: stable@vger.kernel.org Change-Id: Ic63058d4d49b4a1f8f9ab313196e20ad131cc591 Signed-off-by: BH Hsieh Signed-off-by: Henry Lin Link: https://lore.kernel.org/r/20250122105943.8057-1-henryl@nvidia.com Signed-off-by: Vinod Koul drivers/phy/tegra/xusb-tegra186.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 5ab90f40121a9f6a9b368274cd92d0f435dc7cfa Author: Andrew Davis Date: Thu Jan 23 12:22:34 2025 -0600 phy: ti: gmii-sel: 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/20250123182234.597665-1-afd@ti.com Signed-off-by: Vinod Koul drivers/phy/ti/phy-gmii-sel.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 8789b4296aa796f658a19cac7d27365012893de1 Author: André Draszik Date: Thu Dec 5 10:22:00 2024 +0000 phy: exynos5-usbdrd: gs101: ensure power is gated to SS phy in phy_exit() We currently don't gate the power to the SS phy in phy_exit(). Shuffle the code slightly to ensure the power is gated to the SS phy as well. Fixes: 32267c29bc7d ("phy: exynos5-usbdrd: support Exynos USBDRD 3.1 combo phy (HS & SS)") CC: stable@vger.kernel.org # 6.11+ Reviewed-by: Krzysztof Kozlowski Reviewed-by: Peter Griffin Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20241205-gs101-usb-phy-fix-v4-1-0278809fb810@linaro.org Signed-off-by: Vinod Koul drivers/phy/samsung/phy-exynos5-usbdrd.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 362ff1e7c6c20f8d6ebe20682870d471373c608b Author: Stefano Garzarella Date: Thu Feb 13 17:18:25 2025 +0100 virtio_snd.h: clarify that `controls` depends on VIRTIO_SND_F_CTLS As defined in the specification, the `controls` field in the configuration space is only valid/present if VIRTIO_SND_F_CTLS is negotiated. From https://docs.oasis-open.org/virtio/virtio/v1.3/virtio-v1.3.html: 5.14.4 Device Configuration Layout ... controls (driver-read-only) indicates a total number of all available control elements if VIRTIO_SND_F_CTLS has been negotiated. Let's use the same style used in virtio_blk.h to clarify this and to avoid confusion as happened in QEMU (see link). Link: https://gitlab.com/qemu-project/qemu/-/issues/2805 Signed-off-by: Stefano Garzarella Acked-by: Eugenio Pérez Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250213161825.139952-1-sgarzare@redhat.com include/uapi/linux/virtio_snd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c67c37e1710b2a8f61c8a02db95a51fe577e2c1 Author: Joanne Koong Date: Tue Feb 11 13:47:50 2025 -0800 fuse: revert back to __readahead_folio() for readahead In commit 3eab9d7bc2f4 ("fuse: convert readahead to use folios"), the logic was converted to using the new folio readahead code, which drops the reference on the folio once it is locked, using an inferred reference on the folio. Previously we held a reference on the folio for the entire duration of the readpages call. This is fine, however for the case for splice pipe responses where we will remove the old folio and splice in the new folio (see fuse_try_move_page()), we assume that there is a reference held on the folio for ap->folios, which is no longer the case. To fix this, revert back to __readahead_folio() which allows us to hold the reference on the folio for the duration of readpages until either we drop the reference ourselves in fuse_readpages_end() or the reference is dropped after it's replaced in the page cache in the splice case. This will fix the UAF bug that was reported. Link: https://lore.kernel.org/linux-fsdevel/2f681f48-00f5-4e09-8431-2b3dbfaa881e@heusel.eu/ Fixes: 3eab9d7bc2f4 ("fuse: convert readahead to use folios") Reported-by: Christian Heusel Closes: https://lore.kernel.org/all/2f681f48-00f5-4e09-8431-2b3dbfaa881e@heusel.eu/ Closes: https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/issues/110 Reported-by: Mantas Mikulėnas Closes: https://lore.kernel.org/all/34feb867-09e2-46e4-aa31-d9660a806d1a@gmail.com/ Closes: https://bugzilla.opensuse.org/show_bug.cgi?id=1236660 Cc: # v6.13 Signed-off-by: Joanne Koong Reviewed-by: Jeff Layton Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 6 ++++++ fs/fuse/file.c | 13 +++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) commit 9e512eaaf8f4008c44ede3dfc0fbc9d9c5118583 Author: John Keeping Date: Sat Feb 8 12:41:44 2025 +0000 serial: 8250: Fix fifo underflow on flush When flushing the serial port's buffer, uart_flush_buffer() calls kfifo_reset() but if there is an outstanding DMA transfer then the completion function will consume data from the kfifo via uart_xmit_advance(), underflowing and leading to ongoing DMA as the driver tries to transmit another 2^32 bytes. This is readily reproduced with serial-generic and amidi sending even short messages as closing the device on exit will wait for the fifo to drain and in the underflow case amidi hangs for 30 seconds on exit in tty_wait_until_sent(). A trace of that gives: kworker/1:1-84 [001] 51.769423: bprint: serial8250_tx_dma: tx_size=3 fifo_len=3 amidi-763 [001] 51.769460: bprint: uart_flush_buffer: resetting fifo irq/21-fe530000-76 [000] 51.769474: bprint: __dma_tx_complete: tx_size=3 irq/21-fe530000-76 [000] 51.769479: bprint: serial8250_tx_dma: tx_size=4096 fifo_len=4294967293 irq/21-fe530000-76 [000] 51.781295: bprint: __dma_tx_complete: tx_size=4096 irq/21-fe530000-76 [000] 51.781301: bprint: serial8250_tx_dma: tx_size=4096 fifo_len=4294963197 irq/21-fe530000-76 [000] 51.793131: bprint: __dma_tx_complete: tx_size=4096 irq/21-fe530000-76 [000] 51.793135: bprint: serial8250_tx_dma: tx_size=4096 fifo_len=4294959101 irq/21-fe530000-76 [000] 51.804949: bprint: __dma_tx_complete: tx_size=4096 Since the port lock is held in when the kfifo is reset in uart_flush_buffer() and in __dma_tx_complete(), adding a flush_buffer hook to adjust the outstanding DMA byte count is sufficient to avoid the kfifo underflow. Fixes: 9ee4b83e51f74 ("serial: 8250: Add support for dmaengine") Cc: stable Signed-off-by: John Keeping Link: https://lore.kernel.org/r/20250208124148.1189191-1-jkeeping@inmusicbrands.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250.h | 2 ++ drivers/tty/serial/8250/8250_dma.c | 16 ++++++++++++++++ drivers/tty/serial/8250/8250_port.c | 9 +++++++++ 3 files changed, 27 insertions(+) commit 2d873efd174bae9005776937d5ac6a96050266db Author: Christoph Hellwig Date: Thu Feb 6 07:15:00 2025 +0100 xfs: flush inodegc before swapon Fix the brand new xfstest that tries to swapon on a recently unshared file and use the chance to document the other bit of magic in this function. The big comment is taken from a mailinglist post by Dave Chinner. Fixes: 5e672cd69f0a53 ("xfs: introduce xfs_inodegc_push()") Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_aops.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 3cd6a8056f5a2e794c42fc2114ee2611e358b357 Author: Christoph Hellwig Date: Thu Feb 6 07:15:01 2025 +0100 xfs: rename xfs_iomap_swapfile_activate to xfs_vm_swap_activate Match the method name and the naming convention or address_space operations. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_aops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9f0902091c332b2665951cfb970f60ae7cbdc0f3 Author: Carlos Maiolino Date: Mon Feb 3 14:04:57 2025 +0100 xfs: Do not allow norecovery mount with quotacheck Mounting a filesystem that requires quota state changing will generate a transaction. We already check for a read-only device; we should do that for norecovery too. A quotacheck on a norecovery mount, and with the right log size, will cause the mount process to hang on: [<0>] xlog_grant_head_wait+0x5d/0x2a0 [xfs] [<0>] xlog_grant_head_check+0x112/0x180 [xfs] [<0>] xfs_log_reserve+0xe3/0x260 [xfs] [<0>] xfs_trans_reserve+0x179/0x250 [xfs] [<0>] xfs_trans_alloc+0x101/0x260 [xfs] [<0>] xfs_sync_sb+0x3f/0x80 [xfs] [<0>] xfs_qm_mount_quotas+0xe3/0x2f0 [xfs] [<0>] xfs_mountfs+0x7ad/0xc20 [xfs] [<0>] xfs_fs_fill_super+0x762/0xa50 [xfs] [<0>] get_tree_bdev_flags+0x131/0x1d0 [<0>] vfs_get_tree+0x26/0xd0 [<0>] vfs_cmd_create+0x59/0xe0 [<0>] __do_sys_fsconfig+0x4e3/0x6b0 [<0>] do_syscall_64+0x82/0x160 [<0>] entry_SYSCALL_64_after_hwframe+0x76/0x7e This is caused by a transaction running with bogus initialized head/tail I initially hit this while running generic/050, with random log sizes, but I managed to reproduce it reliably here with the steps below: mkfs.xfs -f -lsize=1025M -f -b size=4096 -m crc=1,reflink=1,rmapbt=1, -i sparse=1 /dev/vdb2 > /dev/null mount -o usrquota,grpquota,prjquota /dev/vdb2 /mnt xfs_io -x -c 'shutdown -f' /mnt umount /mnt mount -o ro,norecovery,usrquota,grpquota,prjquota /dev/vdb2 /mnt Last mount hangs up As we add yet another validation if quota state is changing, this also add a new helper named xfs_qm_validate_state_change(), factoring the quota state changes out of xfs_qm_newmount() to reduce cluttering within it. Signed-off-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino fs/xfs/xfs_qm_bhv.c | 55 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 16 deletions(-) commit 9e00163c31676c6b43d2334fdf5b406232f42dee Author: Lukas Herbolt Date: Mon Feb 3 09:55:13 2025 +0100 xfs: do not check NEEDSREPAIR if ro,norecovery mount. If there is corrutpion on the filesystem andxfs_repair fails to repair it. The last resort of getting the data is to use norecovery,ro mount. But if the NEEDSREPAIR is set the filesystem cannot be mounted. The flag must be cleared out manually using xfs_db, to get access to what left over of the corrupted fs. Signed-off-by: Lukas Herbolt Reviewed-by: Dave Chinner Reviewed-by: Eric Sandeen Signed-off-by: Carlos Maiolino fs/xfs/xfs_super.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 6e33017c3276e3af7f79f61f3b3648e4a4c03d34 Author: Darrick J. Wong Date: Sun Feb 2 16:50:14 2025 -0800 xfs: fix data fork format filtering during inode repair Coverity noticed that xrep_dinode_bad_metabt_fork never runs because XFS_DINODE_FMT_META_BTREE is always filtered out in the mode selection switch of xrep_dinode_check_dfork. Metadata btrees are allowed only in the data forks of regular files, so add this case explicitly. I guess this got fubard during a refactoring prior to 6.13 and I didn't notice until now. :/ Coverity-id: 1617714 Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino fs/xfs/scrub/inode_repair.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 66314e9a57a050f95cb0ebac904f5ab047a8926e Author: Darrick J. Wong Date: Sun Feb 2 16:50:14 2025 -0800 xfs: fix online repair probing when CONFIG_XFS_ONLINE_REPAIR=n I received a report from the release engineering side of the house that xfs_scrub without the -n flag (aka fix it mode) would try to fix a broken filesystem even on a kernel that doesn't have online repair built into it: # xfs_scrub -dTvn /mnt/test EXPERIMENTAL xfs_scrub program in use! Use at your own risk! Phase 1: Find filesystem geometry. /mnt/test: using 1 threads to scrub. Phase 1: Memory used: 132k/0k (108k/25k), time: 0.00/ 0.00/ 0.00s Phase 4: Repair filesystem. Info: /mnt/test/some/victimdir directory entries: Attempting repair. (repair.c line 351) Corruption: /mnt/test/some/victimdir directory entries: Repair unsuccessful; offline repair required. (repair.c line 204) Source: https://blogs.oracle.com/linux/post/xfs-online-filesystem-repair It is strange that xfs_scrub doesn't refuse to run, because the kernel is supposed to return EOPNOTSUPP if we actually needed to run a repair, and xfs_io's repair subcommand will perror that. And yet: # xfs_io -x -c 'repair probe' /mnt/test # The first problem is commit dcb660f9222fd9 (4.15) which should have had xchk_probe set the CORRUPT OFLAG so that any of the repair machinery will get called at all. It turns out that some refactoring that happened in the 6.6-6.8 era broke the operation of this corner case. What we *really* want to happen is that all the predicates that would steer xfs_scrub_metadata() towards calling xrep_attempt() should function the same way that they do when repair is compiled in; and then xrep_attempt gets to return the fatal EOPNOTSUPP error code that causes the probe to fail. Instead, commit 8336a64eb75cba (6.6) started the failwhale swimming by hoisting OFLAG checking logic into a helper whose non-repair stub always returns false, causing scrub to return "repair not needed" when in fact the repair is not supported. Prior to that commit, the oflag checking that was open-coded in scrub.c worked correctly. Similarly, in commit 4bdfd7d15747b1 (6.8) we hoisted the IFLAG_REPAIR and ALREADY_FIXED logic into a helper whose non-repair stub always returns false, so we never enter the if test body that would have called xrep_attempt, let alone fail to decode the OFLAGs correctly. The final insult (yes, we're doing The Naked Gun now) is commit 48a72f60861f79 (6.8) in which we hoisted the "are we going to try a repair?" predicate into yet another function with a non-repair stub always returns false. Fix xchk_probe to trigger xrep_probe if repair is enabled, or return EOPNOTSUPP directly if it is not. For all the other scrub types, we need to fix the header predicates so that the ->repair functions (which are all xrep_notsupported) get called to return EOPNOTSUPP. Commit 48a72 is tagged here because the scrub code prior to LTS 6.12 are incomplete and not worth patching. Reported-by: David Flynn Cc: # v6.8 Fixes: 8336a64eb75c ("xfs: don't complain about unfixed metadata when repairs were injected") Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino fs/xfs/scrub/common.h | 5 ----- fs/xfs/scrub/repair.h | 11 ++++++++++- fs/xfs/scrub/scrub.c | 12 ++++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) commit 659f5d55feb75782bd46cf130da3c1f240afe9ba Author: Jos Wang Date: Thu Feb 13 21:49:21 2025 +0800 usb: typec: tcpm: PSSourceOffTimer timeout in PR_Swap enters ERROR_RECOVERY As PD2.0 spec ("6.5.6.2 PSSourceOffTimer"),the PSSourceOffTimer is used by the Policy Engine in Dual-Role Power device that is currently acting as a Sink to timeout on a PS_RDY Message during a Power Role Swap sequence. This condition leads to a Hard Reset for USB Type-A and Type-B Plugs and Error Recovery for Type-C plugs and return to USB Default Operation. Therefore, after PSSourceOffTimer timeout, the tcpm state machine should switch from PR_SWAP_SNK_SRC_SINK_OFF to ERROR_RECOVERY. This can also solve the test items in the USB power delivery compliance test: TEST.PD.PROT.SNK.12 PR_Swap – PSSourceOffTimer Timeout [1] https://usb.org/document-library/usb-power-delivery-compliance-test-specification-0/USB_PD3_CTS_Q4_2025_OR.zip Fixes: f0690a25a140 ("staging: typec: USB Type-C Port Manager (tcpm)") Cc: stable Signed-off-by: Jos Wang Reviewed-by: Heikki Krogerus Tested-by: Amit Sunil Dhamne Link: https://lore.kernel.org/r/20250213134921.3798-1-joswang1221@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 634775a752a86784511018a108f3b530cc3399a7 Author: Elson Roy Serrao Date: Thu Feb 6 11:39:50 2025 -0800 usb: roles: set switch registered flag early on The role switch registration and set_role() can happen in parallel as they are invoked independent of each other. There is a possibility that a driver might spend significant amount of time in usb_role_switch_register() API due to the presence of time intensive operations like component_add() which operate under common mutex. This leads to a time window after allocating the switch and before setting the registered flag where the set role notifications are dropped. Below timeline summarizes this behavior Thread1 | Thread2 usb_role_switch_register() | | | ---> allocate switch | | | ---> component_add() | usb_role_switch_set_role() | | | | | --> Drop role notifications | | since sw->registered | | flag is not set. | | --->Set registered flag.| To avoid this, set the registered flag early on in the switch register API. Fixes: b787a3e78175 ("usb: roles: don't get/set_role() when usb_role_switch is unregistered") Cc: stable Signed-off-by: Elson Roy Serrao Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250206193950.22421-1-quic_eserrao@quicinc.com Signed-off-by: Greg Kroah-Hartman drivers/usb/roles/class.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e5644be4079750a0a0a5a7068fd90b97bf6fac55 Author: Frederic Weisbecker Date: Wed Feb 12 14:55:14 2025 +0100 usb: gadget: uvc: Fix unstarted kthread worker The behaviour of kthread_create_worker() was recently changed to align with the one of kthread_create(). The kthread worker is created but not awaken by default. This is to allow the use of kthread_affine_preferred() and kthread_bind[_mask]() with kthread workers. In order to keep the old behaviour and wake the kthread up, kthread_run_worker() must be used. All the pre-existing users have been converted, except for UVC that was introduced in the same merge window as the API change. This results in hangs: INFO: task UVCG:82 blocked for more than 491 seconds. Tainted: G T 6.13.0-rc2-00014-gb04e317b5226 #1 task:UVCG state:D stack:0 pid:82 Call Trace: __schedule schedule schedule_preempt_disabled kthread ? kthread_flush_work ret_from_fork ret_from_fork_asm entry_INT80_32 Fix this with converting UVCG kworker to the new API. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202502121025.55bfa801-lkp@intel.com Fixes: f0bbfbd16b3b ("usb: gadget: uvc: rework to enqueue in pump worker from encoded queue") Cc: stable Cc: Michael Grzeschik Signed-off-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20250212135514.30539-1-frederic@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/uvc_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e169d96eecd447ff7fd7542ca5fa0911f5622054 Author: Lei Huang Date: Wed Feb 12 17:38:29 2025 +0800 USB: quirks: add USB_QUIRK_NO_LPM quirk for Teclast dist Teclast disk used on Huawei hisi platforms doesn't work well, losing connectivity intermittently if LPM is enabled. Add quirk disable LPM to resolve the issue. Signed-off-by: Lei Huang Cc: stable Link: https://lore.kernel.org/r/20250212093829.7379-1-huanglei814@163.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) commit 399a45e5237ca14037120b1b895bd38a3b4492ea Author: Roy Luo Date: Tue Feb 4 23:36:42 2025 +0000 usb: gadget: core: flush gadget workqueue after device removal device_del() can lead to new work being scheduled in gadget->work workqueue. This is observed, for example, with the dwc3 driver with the following call stack: device_del() gadget_unbind_driver() usb_gadget_disconnect_locked() dwc3_gadget_pullup() dwc3_gadget_soft_disconnect() usb_gadget_set_state() schedule_work(&gadget->work) Move flush_work() after device_del() to ensure the workqueue is cleaned up. Fixes: 5702f75375aa9 ("usb: gadget: udc-core: move sysfs_notify() to a workqueue") Cc: stable Signed-off-by: Roy Luo Reviewed-by: Alan Stern Reviewed-by: Thinh Nguyen Link: https://lore.kernel.org/r/20250204233642.666991-1-royluo@google.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ab37fcb42832cdd3e9d5e50653285ca84d6686f Author: Jill Donahue Date: Tue Feb 11 10:48:05 2025 -0700 USB: gadget: f_midi: f_midi_complete to call queue_work When using USB MIDI, a lock is attempted to be acquired twice through a re-entrant call to f_midi_transmit, causing a deadlock. Fix it by using queue_work() to schedule the inner f_midi_transmit() via a high priority work queue from the completion handler. Link: https://lore.kernel.org/all/CAArt=LjxU0fUZOj06X+5tkeGT+6RbXzpWg1h4t4Fwa_KGVAX6g@mail.gmail.com/ Fixes: d5daf49b58661 ("USB: gadget: midi: add midi function driver") Cc: stable Signed-off-by: Jill Donahue Link: https://lore.kernel.org/r/20250211174805.1369265-1-jdonahue@fender.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_midi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4aac0db5a0ebc599d4ad9bf5ebab78afa1f33e10 Author: Stefan Eichenberger Date: Mon Feb 3 11:58:24 2025 +0100 usb: core: fix pipe creation for get_bMaxPacketSize0 When usb_control_msg is used in the get_bMaxPacketSize0 function, the USB pipe does not include the endpoint device number. This can cause failures when a usb hub port is reinitialized after encountering a bad cable connection. As a result, the system logs the following error messages: usb usb2-port1: cannot reset (err = -32) usb usb2-port1: Cannot enable. Maybe the USB cable is bad? usb usb2-port1: attempt power cycle usb 2-1: new high-speed USB device number 5 using ci_hdrc usb 2-1: device descriptor read/8, error -71 The problem began after commit 85d07c556216 ("USB: core: Unite old scheme and new scheme descriptor reads"). There usb_get_device_descriptor was replaced with get_bMaxPacketSize0. Unlike usb_get_device_descriptor, the get_bMaxPacketSize0 function uses the macro usb_rcvaddr0pipe, which does not include the endpoint device number. usb_get_device_descriptor, on the other hand, used the macro usb_rcvctrlpipe, which includes the endpoint device number. By modifying the get_bMaxPacketSize0 function to use usb_rcvctrlpipe instead of usb_rcvaddr0pipe, the issue can be resolved. This change will ensure that the endpoint device number is included in the USB pipe, preventing reinitialization failures. If the endpoint has not set the device number yet, it will still work because the device number is 0 in udev. Cc: stable Fixes: 85d07c556216 ("USB: core: Unite old scheme and new scheme descriptor reads") Signed-off-by: Stefan Eichenberger Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20250203105840.17539-1-eichest@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d3a8c28426fc1fb3252753a9f1db0d691ffc21b0 Author: Selvarasu Ganesan Date: Sat Feb 1 22:09:02 2025 +0530 usb: dwc3: Fix timeout issue during controller enter/exit from halt state There is a frequent timeout during controller enter/exit from halt state after toggling the run_stop bit by SW. This timeout occurs when performing frequent role switches between host and device, causing device enumeration issues due to the timeout. This issue was not present when USB2 suspend PHY was disabled by passing the SNPS quirks (snps,dis_u2_susphy_quirk and snps,dis_enblslpm_quirk) from the DTS. However, there is a requirement to enable USB2 suspend PHY by setting of GUSB2PHYCFG.ENBLSLPM and GUSB2PHYCFG.SUSPHY bits when controller starts in gadget or host mode results in the timeout issue. This commit addresses this timeout issue by ensuring that the bits GUSB2PHYCFG.ENBLSLPM and GUSB2PHYCFG.SUSPHY are cleared before starting the dwc3_gadget_run_stop sequence and restoring them after the dwc3_gadget_run_stop sequence is completed. Fixes: 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver") Cc: stable Signed-off-by: Selvarasu Ganesan Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20250201163903.459-1-selvarasu.g@samsung.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/gadget.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 78332fdb956f18accfbca5993b10c5ed69f00a2c Author: Bharadwaj Raju Date: Mon Feb 10 21:40:57 2025 +0530 selftests/landlock: Add binaries to .gitignore Building the test creates binaries 'wait-pipe' and 'sandbox-and-launch' which need to be gitignore'd. Signed-off-by: Bharadwaj Raju Link: https://lore.kernel.org/r/20250210161101.6024-1-bharadwaj.raju777@gmail.com [mic: Sort entries] Signed-off-by: Mickaël Salaün tools/testing/selftests/landlock/.gitignore | 2 ++ 1 file changed, 2 insertions(+) commit 3d4033985ff508ef587ca11f1c8361ba57c7e09f Author: Mikhail Ivanov Date: Wed Feb 5 17:36:51 2025 +0800 selftests/landlock: Test that MPTCP actions are not restricted Extend protocol fixture with test suits for MPTCP protocol. Add CONFIG_MPTCP and CONFIG_MPTCP_IPV6 options in config. Signed-off-by: Mikhail Ivanov Link: https://lore.kernel.org/r/20250205093651.1424339-4-ivanov.mikhail1@huawei-partners.com Cc: # 6.7.x Signed-off-by: Mickaël Salaün tools/testing/selftests/landlock/config | 2 ++ tools/testing/selftests/landlock/net_test.c | 44 +++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) commit f5534d511bcd273720f168386de74af76e148a9b Author: Mikhail Ivanov Date: Wed Feb 5 17:36:50 2025 +0800 selftests/landlock: Test TCP accesses with protocol=IPPROTO_TCP Extend protocol_variant structure with protocol field (Cf. socket(2)). Extend protocol fixture with TCP test suits with protocol=IPPROTO_TCP which can be used as an alias for IPPROTO_IP (=0) in socket(2). Signed-off-by: Mikhail Ivanov Link: https://lore.kernel.org/r/20250205093651.1424339-3-ivanov.mikhail1@huawei-partners.com Cc: # 6.7.x Signed-off-by: Mickaël Salaün tools/testing/selftests/landlock/common.h | 1 + tools/testing/selftests/landlock/net_test.c | 80 ++++++++++++++++++++++++----- 2 files changed, 67 insertions(+), 14 deletions(-) commit 854277e2cc8c75dc3c216c82e72523258fcf65b9 Author: Mikhail Ivanov Date: Wed Feb 5 17:36:49 2025 +0800 landlock: Fix non-TCP sockets restriction Use sk_is_tcp() to check if socket is TCP in bind(2) and connect(2) hooks. SMC, MPTCP, SCTP protocols are currently restricted by TCP access rights. The purpose of TCP access rights is to provide control over ports that can be used by userland to establish a TCP connection. Therefore, it is incorrect to deny bind(2) and connect(2) requests for a socket of another protocol. However, SMC, MPTCP and RDS implementations use TCP internal sockets to establish communication or even to exchange packets over a TCP connection [1]. Landlock rules that configure bind(2) and connect(2) usage for TCP sockets should not cover requests for sockets of such protocols. These protocols have different set of security issues and security properties, therefore, it is necessary to provide the userland with the ability to distinguish between them (eg. [2]). Control over TCP connection used by other protocols can be achieved with upcoming support of socket creation control [3]. [1] https://lore.kernel.org/all/62336067-18c2-3493-d0ec-6dd6a6d3a1b5@huawei-partners.com/ [2] https://lore.kernel.org/all/20241204.fahVio7eicim@digikod.net/ [3] https://lore.kernel.org/all/20240904104824.1844082-1-ivanov.mikhail1@huawei-partners.com/ Closes: https://github.com/landlock-lsm/linux/issues/40 Fixes: fff69fb03dde ("landlock: Support network rules with TCP bind and connect") Signed-off-by: Mikhail Ivanov Link: https://lore.kernel.org/r/20250205093651.1424339-2-ivanov.mikhail1@huawei-partners.com [mic: Format commit message to 72 columns] Signed-off-by: Mickaël Salaün security/landlock/net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 192b7ff29b1fb0335a9b9107991e6286f462f361 Author: Günther Noack Date: Fri Jan 24 15:44:44 2025 +0000 landlock: Minor typo and grammar fixes in IPC scoping documentation * Fix some whitespace, punctuation and minor grammar. * Add a missing sentence about the minimum ABI version, to stay in line with the section next to it. Cc: Tahera Fahimi Cc: Tanya Agarwal Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20250124154445.162841-1-gnoack@google.com [mic: Add newlines, update doc date] Signed-off-by: Mickaël Salaün Documentation/userspace-api/landlock.rst | 6 +++--- include/uapi/linux/landlock.h | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) commit 143c9aae043a1dc174a75be52521192a0caa224b Author: Tanya Agarwal Date: Fri Jan 24 01:12:10 2025 +0530 landlock: Fix grammar error Fix grammar error in comments that were identified using the codespell tool. Signed-off-by: Tanya Agarwal Reviewed-by: Günther Noack Link: https://lore.kernel.org/r/20250123194208.2660-1-tanyaagarwal25699@gmail.com [mic: Simplify commit message] Signed-off-by: Mickaël Salaün security/landlock/ruleset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89cb121e94612cd3bb3c74b0e772ead5b40b7a5d Author: Mickaël Salaün Date: Tue Feb 11 14:25:28 2025 +0100 selftests/landlock: Enable the new CONFIG_AF_UNIX_OOB Since commit 5155cbcdbf03 ("af_unix: Add a prompt to CONFIG_AF_UNIX_OOB"), the Landlock selftests's configuration is not enough to build a minimal kernel. Because scoped_signal_test checks with the MSG_OOB flag, we need to enable CONFIG_AF_UNIX_OOB for tests: # RUN fown.no_sandbox.sigurg_socket ... # scoped_signal_test.c:420:sigurg_socket:Expected 1 (1) == send(client_socket, ".", 1, MSG_OOB) (-1) # sigurg_socket: Test terminated by assertion # FAIL fown.no_sandbox.sigurg_socket ... Cc: Günther Noack Acked-by: Florent Revest Link: https://lore.kernel.org/r/20250211132531.1625566-1-mic@digikod.net Signed-off-by: Mickaël Salaün tools/testing/selftests/landlock/config | 1 + 1 file changed, 1 insertion(+) commit 159daf1258227f44b26b5d38f4aa8f37b8cca663 Author: Mathias Nyman Date: Thu Feb 6 17:18:36 2025 +0200 USB: Add USB_QUIRK_NO_LPM quirk for sony xperia xz1 smartphone The fastboot tool for communicating with Android bootloaders does not work reliably with this device if USB 2 Link Power Management (LPM) is enabled. Various fastboot commands are affected, including the following, which usually reproduces the problem within two tries: fastboot getvar kernel getvar:kernel FAILED (remote: 'GetVar Variable Not found') This issue was hidden on many systems up until commit 63a1f8454962 ("xhci: stored cached port capability values in one place") as the xhci driver failed to detect USB 2 LPM support if USB 3 ports were listed before USB 2 ports in the "supported protocol capabilities". Adding the quirk resolves the issue. No drawbacks are expected since the device uses different USB product IDs outside of fastboot mode, and since fastboot commands worked before, until LPM was enabled on the tested system by the aforementioned commit. Based on a patch from Forest from which most of the code and commit message is taken. Cc: stable Reported-by: Forest Closes: https://lore.kernel.org/hk8umj9lv4l4qguftdq1luqtdrpa1gks5l@sonic.net Tested-by: Forest Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20250206151836.51742-1-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) commit 7284922f3e4fa285dff1b8bb593aa9a0b8458f30 Author: Marek Vasut Date: Sun Feb 9 15:56:11 2025 +0100 USB: cdc-acm: Fill in Renesas R-Car D3 USB Download mode quirk Add Renesas R-Car D3 USB Download mode quirk and update comments on all the other Renesas R-Car USB Download mode quirks to discern them from each other. This follows R-Car Series, 3rd Generation reference manual Rev.2.00 chapter 19.2.8 USB download mode . Fixes: 6d853c9e4104 ("usb: cdc-acm: Add DISABLE_ECHO for Renesas USB Download mode") Cc: stable Signed-off-by: Marek Vasut Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20250209145708.106914-1-marek.vasut+renesas@mailbox.org Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 12e712964f41d05ae034989892de445781c46730 Author: Jann Horn Date: Wed Feb 12 19:15:16 2025 +0100 usb: cdc-acm: Fix handling of oversized fragments If we receive an initial fragment of size 8 bytes which specifies a wLength of 1 byte (so the reassembled message is supposed to be 9 bytes long), and we then receive a second fragment of size 9 bytes (which is not supposed to happen), we currently wrongly bypass the fragment reassembly code but still pass the pointer to the acm->notification_buffer to acm_process_notification(). Make this less wrong by always going through fragment reassembly when we expect more fragments. Before this patch, receiving an overlong fragment could lead to `newctrl` in acm_process_notification() being uninitialized data (instead of data coming from the device). Cc: stable Fixes: ea2583529cd1 ("cdc-acm: reassemble fragmented notifications") Signed-off-by: Jann Horn Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e563b01208f4d1f609bcab13333b6c0e24ce6a01 Author: Jann Horn Date: Wed Feb 12 19:15:15 2025 +0100 usb: cdc-acm: Check control transfer buffer size before access If the first fragment is shorter than struct usb_cdc_notification, we can't calculate an expected_size. Log an error and discard the notification instead of reading lengths from memory outside the received data, which can lead to memory corruption when the expected_size decreases between fragments, causing `expected_size - acm->nb_index` to wrap. This issue has been present since the beginning of git history; however, it only leads to memory corruption since commit ea2583529cd1 ("cdc-acm: reassemble fragmented notifications"). A mitigating factor is that acm_ctrl_irq() can only execute after userspace has opened /dev/ttyACM*; but if ModemManager is running, ModemManager will do that automatically depending on the USB device's vendor/product IDs and its other interfaces. Cc: stable Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jann Horn Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit c81d9fcd5b9402166048f377d4e5e0ee6f9ef26d Author: Michal Pecio Date: Tue Jan 28 10:45:29 2025 +0100 usb: xhci: Restore xhci_pci support for Renesas HCs Some Renesas HCs require firmware upload to work, this is handled by the xhci_pci_renesas driver. Other variants of those chips load firmware from a SPI flash and are ready to work with xhci_pci alone. A refactor merged in v6.12 broke the latter configuration so that users are finding their hardware ignored by the normal driver and are forced to enable the firmware loader which isn't really necessary on their systems. Let xhci_pci work with those chips as before when the firmware loader is disabled by kernel configuration. Fixes: 25f51b76f90f ("xhci-pci: Make xhci-pci-renesas a proper modular driver") Cc: stable Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219616 Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219726 Signed-off-by: Michal Pecio Tested-by: Nicolai Buchwitz Link: https://lore.kernel.org/r/20250128104529.58a79bfc@foxbook Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e71f7f42e3c874ac3314b8f250e8416a706165af Author: Huacai Chen Date: Sun Feb 2 20:49:35 2025 +0800 USB: pci-quirks: Fix HCCPARAMS register error for LS7A EHCI LS7A EHCI controller doesn't have extended capabilities, so the EECP (EHCI Extended Capabilities Pointer) field of HCCPARAMS register should be 0x0, but it reads as 0xa0 now. This is a hardware flaw and will be fixed in future, now just clear the EECP field to avoid error messages on boot: ...... [ 0.581675] pci 0000:00:04.1: EHCI: unrecognized capability ff [ 0.581699] pci 0000:00:04.1: EHCI: unrecognized capability ff [ 0.581716] pci 0000:00:04.1: EHCI: unrecognized capability ff [ 0.581851] pci 0000:00:04.1: EHCI: unrecognized capability ff ...... [ 0.581916] pci 0000:00:05.1: EHCI: unrecognized capability ff [ 0.581951] pci 0000:00:05.1: EHCI: unrecognized capability ff [ 0.582704] pci 0000:00:05.1: EHCI: unrecognized capability ff [ 0.582799] pci 0000:00:05.1: EHCI: unrecognized capability ff ...... Cc: stable Signed-off-by: Baoqi Zhang Signed-off-by: Huacai Chen Link: https://lore.kernel.org/r/20250202124935.480500-1-chenhuacai@loongson.cn Signed-off-by: Greg Kroah-Hartman drivers/usb/host/pci-quirks.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit add43c4fbc92f8b48c1acd64e953af3b1be4cd9c Author: Lu Baolu Date: Tue Feb 11 08:55:12 2025 +0800 iommu/vt-d: Make intel_iommu_drain_pasid_prq() cover faults for RID This driver supports page faults on PCI RID since commit <9f831c16c69e> ("iommu/vt-d: Remove the pasid present check in prq_event_thread") by allowing the reporting of page faults with the pasid_present field cleared to the upper layer for further handling. The fundamental assumption here is that the detach or replace operations act as a fence for page faults. This implies that all pending page faults associated with a specific RID or PASID are flushed when a domain is detached or replaced from a device RID or PASID. However, the intel_iommu_drain_pasid_prq() helper does not correctly handle faults for RID. This leads to faults potentially remaining pending in the iommu hardware queue even after the domain is detached, thereby violating the aforementioned assumption. Fix this issue by extending intel_iommu_drain_pasid_prq() to cover faults for RID. Fixes: 9f831c16c69e ("iommu/vt-d: Remove the pasid present check in prq_event_thread") Cc: stable@vger.kernel.org Suggested-by: Kevin Tian Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20250121023150.815972-1-baolu.lu@linux.intel.com Reviewed-by: Yi Liu Link: https://lore.kernel.org/r/20250211005512.985563-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/intel/prq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4a8991fe9cd0b6a509bab3d056700d3520601d86 Author: Andrew Kreimer Date: Mon Feb 10 13:20:04 2025 +0200 iommu/exynos: Fix typos There are some typos in comments/messages: - modyfying -> modifying - Unabled -> Unable Fix them via codespell. Signed-off-by: Andrew Kreimer Link: https://lore.kernel.org/r/20250210112027.29791-1-algonell@gmail.com Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 78be7f04537fa35f6cc694879e9a475ca1984936 Author: Easwar Hariharan Date: Tue Jan 28 19:05:21 2025 +0000 iommu: Fix a spelling error Fix spelling error IDENITY -> IDENTITY in drivers/iommu/iommu.c. Signed-off-by: Easwar Hariharan Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20250128190522.70800-1-eahariha@linux.microsoft.com [ joro: Add commit message ] Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef75966abf950c0539534effa4960caa29fb7167 Author: Vasant Hegde Date: Mon Jan 27 09:44:11 2025 +0000 iommu/amd: Expicitly enable CNTRL.EPHEn bit in resume path With recent kernel, AMDGPU failed to resume after suspend on certain laptop. Sample log: ----------- Nov 14 11:52:19 Thinkbook kernel: iommu ivhd0: AMD-Vi: Event logged [ILLEGAL_DEV_TABLE_ENTRY device=0000:06:00.0 pasid=0x00000 address=0x135300000 flags=0x0080] Nov 14 11:52:19 Thinkbook kernel: AMD-Vi: DTE[0]: 7d90000000000003 Nov 14 11:52:19 Thinkbook kernel: AMD-Vi: DTE[1]: 0000100103fc0009 Nov 14 11:52:19 Thinkbook kernel: AMD-Vi: DTE[2]: 2000000117840013 Nov 14 11:52:19 Thinkbook kernel: AMD-Vi: DTE[3]: 0000000000000000 This is because in resume path, CNTRL[EPHEn] is not set. Fix this by setting CNTRL[EPHEn] to 1 in resume path if EFR[EPHSUP] is set. Note May be better approach is to save the control register in suspend path and restore it in resume path instead of trying to set indivisual bits. We will have separate patch for that. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219499 Fixes: c4cb23111103 ("iommu/amd: Add support for enable/disable IOPF") Tested-by: Hamish McIntyre-Bhatty Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20250127094411.5931-1-vasant.hegde@amd.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu_types.h | 1 + drivers/iommu/amd/init.c | 4 ++++ 2 files changed, 5 insertions(+) commit 822b7ec657e99b44b874e052d8540d8b54fe8569 Author: Wentao Liang Date: Thu Feb 13 15:45:43 2025 +0800 ALSA: hda: Add error check for snd_ctl_rename_id() in snd_hda_create_dig_out_ctls() Check the return value of snd_ctl_rename_id() in snd_hda_create_dig_out_ctls(). Ensure that failures are properly handled. [ Note: the error cannot happen practically because the only error condition in snd_ctl_rename_id() is the missing ID, but this is a rename, hence it must be present. But for the code consistency, it's safer to have always the proper return check -- tiwai ] Fixes: 5c219a340850 ("ALSA: hda: Fix kctl->id initialization") Cc: stable@vger.kernel.org # 6.4+ Signed-off-by: Wentao Liang Link: https://patch.msgid.link/20250213074543.1620-1-vulab@iscas.ac.cn Signed-off-by: Takashi Iwai sound/pci/hda/hda_codec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 325735e83d7d0016e7b61069df2570e910898466 Author: Baojun Xu Date: Fri Feb 14 09:30:21 2025 +0800 ALSA: hda/tas2781: Fix index issue in tas2781 hda SPI driver Correct wrong mask for device index. Signed-off-by: Baojun Xu Fixes: bb5f86ea50ff ("ALSA: hda/tas2781: Add tas2781 hda SPI driver") Link: https://patch.msgid.link/20250214013021.6072-1-baojun.xu@ti.com Signed-off-by: Takashi Iwai sound/pci/hda/tas2781_spi_fwlib.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c5a9df928ec4d91e8ab7ab3b4c37012e79bc2a09 Merge: 174448badb44 571b69f2f9b1 Author: Takashi Iwai Date: Fri Feb 14 08:24:55 2025 +0100 Merge tag 'asoc-fix-v6.14-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.14 More fixes and deviec quirks, most of them driver specific including a few SOF robustness fixes. Nothing super remarkable individually. commit 128c8f96eb8638c060cd3532dc394d046ce64fe1 Merge: 68763b29e0a6 04485cc34868 Author: Linus Torvalds Date: Thu Feb 13 20:04:43 2025 -0800 Merge tag 'drm-fixes-2025-02-14' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Weekly drm fixes pull request, nothing too unusual, the hdmi tests needs a bit of refactoring after lockdep shouted at them, otherwise amdgpu and xe lead and a few misc otherwise. amdgpu: - Fix shutdown regression on old APUs - Fix compute queue hang on gfx9 APUs - Fix possible invalid access in PSP failure path - Avoid possible buffer overflow in pptable override amdkfd: - Properly free gang bo in failure path - GFX12 trap handler fix i915: - selftest fix: avoid using uninitialized context xe: - Remove bo->clients out of bos_lock area - Carve out wopcm portion from the stolen memory tests: - fix lockdep with hdmi infrastructure tests host1x: - fix uninitialised mutex usage panthor: - fix uninit variable hibmc: - fix missing Kconfig select" * tag 'drm-fixes-2025-02-14' of https://gitlab.freedesktop.org/drm/kernel: drm: Fix DSC BPP increment decoding drm/amdgpu: avoid buffer overflow attach in smu_sys_set_pp_table() drm/amdkfd: Ensure consistent barrier state saved in gfx12 trap handler drm/amdgpu: bail out when failed to load fw in psp_init_cap_microcode() amdkfd: properly free gang_ctx_bo when failed to init user queue drm/amdgpu: bump version for RV/PCO compute fix drm/amdgpu/gfx9: manually control gfxoff for CS on RV drm/amdgpu/pm: fix UVD handing in amdgpu_dpm_set_powergating_by_smu() drm/xe: Carve out wopcm portion from the stolen memory drm/i915/selftests: avoid using uninitialized context drm/xe/client: bo->client does not need bos_lock drm/hisilicon/hibmc: select CONFIG_DRM_DISPLAY_DP_HELPER drm/panthor: avoid garbage value in panthor_ioctl_dev_query() gpu: host1x: Fix a use of uninitialized mutex drm/tests: hdmi: Fix recursive locking drm/tests: hdmi: Reorder DRM entities variables assignment drm/tests: hdmi: Remove redundant assignments drm/tests: hdmi: Fix WW_MUTEX_SLOWPATH failures commit 04485cc34868892a823b909c6d5468ba21b63569 Merge: d70c6ae53d79 e97749982078 Author: Dave Airlie Date: Fri Feb 14 12:15:53 2025 +1000 Merge tag 'drm-xe-fixes-2025-02-13' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes - Remove bo->clients out of bos_lock area (Tejas) - Carve out wopcm portion from the stolen memory (Nirmoy) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Z64rCicgpBe_t5GY@intel.com commit d70c6ae53d790d3528a14092ae208d0ed125d7a5 Merge: 981724b46314 53139b3f9998 Author: Dave Airlie Date: Fri Feb 14 12:11:19 2025 +1000 Merge tag 'drm-intel-fixes-2025-02-13' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - Selftest fix: avoid using uninitialized context Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Z64qg13R_72iN3_X@intel.com commit 981724b463141cf828744320ee8c93468d5dbe01 Merge: 79f9efa085f9 1abb2648698b Author: Dave Airlie Date: Fri Feb 14 11:54:19 2025 +1000 Merge tag 'amd-drm-fixes-6.14-2025-02-13' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.14-2025-02-13: amdgpu: - Fix shutdown regression on old APUs - Fix compute queue hang on gfx9 APUs - Fix possible invalid access in PSP failure path - Avoid possible buffer overflow in pptable override amdkfd: - Properly free gang bo in failure path - GFX12 trap handler fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20250213153843.242640-1-alexander.deucher@amd.com commit 79f9efa085f98353d0a7452806b82d6fe0923194 Merge: a64dcfb451e2 e00a2e5d485f Author: Dave Airlie Date: Fri Feb 14 10:32:31 2025 +1000 Merge tag 'drm-misc-fixes-2025-02-13' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes Some locking fixes for the HDMI infrastructure tests, an unitialized mutex fix for host1x, an unitialized variable fix for panthor, and a config selection fix for hibmc. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20250213-brilliant-terrier-from-hell-d06dd5@houat commit 7422c319fd805b956aab5ba93e0274517a8e3650 Author: Mukesh Kumar Savaliya Date: Thu Jan 23 14:11:47 2025 +0530 MAINTAINERS: Add maintainer for Qualcomm's I2C GENI driver Add a new entry for the I2C QCOM GENI driver to the MAINTAINERS file. This entry includes the maintainer's name and contact information, ensuring proper maintainership and communication for the i2c-qcom-geni driver file. Signed-off-by: Mukesh Kumar Savaliya Link: https://lore.kernel.org/r/20250123084147.3632023-1-quic_msavaliy@quicinc.com Signed-off-by: Andi Shyti MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 320702a76186222426e5dc8efb9d68ba9d4ed0ab Author: Wolfram Sang Date: Thu Feb 13 17:29:51 2025 +0100 MAINTAINERS: delete entry for AXXIA I2C The maintainer's email address bounced and he wasn't active for 4 years. Delete this entry and fall back to the generic I2C host drivers entry. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250213162950.45596-2-wsa+renesas@sang-engineering.com Signed-off-by: Andi Shyti MAINTAINERS | 7 ------- 1 file changed, 7 deletions(-) commit 68763b29e0a6441f57f9ee652bbf8e7bc59183e5 Merge: 85cc5751db7c 3588b1c0fde2 Author: Linus Torvalds Date: Thu Feb 13 13:13:37 2025 -0800 Merge tag 'spi-fix-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A small collection of driver specific fixes, none standing out in particular" * tag 'spi-fix-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: sn-f-ospi: Fix division by zero spi: pxa2xx: Fix regression when toggling chip select on LPSS devices spi: atmel-quadspi: Fix warning in doc-comment commit 85cc5751db7cc3211945bc380c944de6fe6979d1 Merge: f9af8e771890 35e21de48e69 Author: Linus Torvalds Date: Thu Feb 13 13:09:01 2025 -0800 Merge tag 'regulator-fix-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "The main change here is a revert for a cleanup that was done in the core, attempting to resolve some confusion about how we handle systems where we've somehow managed to end up with both platform data and device tree data for the same device. Unfortunately it turns out there are actually a few systems that deliberately do this and were broken by the change so we've just reverted it. There's also a new Qualcomm device ID" * tag 'regulator-fix-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: core: let dt properties override driver init_data regulator: qcom_smd: Add l2, l5 sub-node to mp5496 regulator commit f9af8e7718904f0b77595d1b610c96dd7796c655 Merge: 348f968b89bf 32ffed055dce Author: Linus Torvalds Date: Thu Feb 13 13:07:30 2025 -0800 Merge tag 'regmap-fix-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fix from Mark Brown: "A simple fix for memory leaks when deallocating regmap-irq controllers" * tag 'regmap-fix-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap-irq: Add missing kfree() commit 348f968b89bfeec0bb53dd82dba58b94d97fbd34 Merge: 945ce413ac14 488fb6effe03 Author: Linus Torvalds Date: Thu Feb 13 12:17:04 2025 -0800 Merge tag 'net-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from netfilter, wireless and bluetooth. Kalle Valo steps down after serving as the WiFi driver maintainer for over a decade. Current release - fix to a fix: - vsock: orphan socket after transport release, avoid null-deref - Bluetooth: L2CAP: fix corrupted list in hci_chan_del Current release - regressions: - eth: - stmmac: correct Rx buffer layout when SPH is enabled - iavf: fix a locking bug in an error path - rxrpc: fix alteration of headers whilst zerocopy pending - s390/qeth: move netif_napi_add_tx() and napi_enable() from under BH - Revert "netfilter: flowtable: teardown flow if cached mtu is stale" Current release - new code bugs: - rxrpc: fix ipv6 path MTU discovery, only ipv4 worked - pse-pd: fix deadlock in current limit functions Previous releases - regressions: - rtnetlink: fix netns refleak with rtnl_setlink() - wifi: brcmfmac: use random seed flag for BCM4355 and BCM4364 firmware Previous releases - always broken: - add missing RCU protection of struct net throughout the stack - can: rockchip: bail out if skb cannot be allocated - eth: ti: am65-cpsw: base XDP support fixes Misc: - ethtool: tsconfig: update the format of hwtstamp flags, changes the uAPI but this uAPI was not in any release yet" * tag 'net-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (72 commits) net: pse-pd: Fix deadlock in current limit functions rxrpc: Fix ipv6 path MTU discovery Reapply "net: skb: introduce and use a single page frag cache" s390/qeth: move netif_napi_add_tx() and napi_enable() from under BH mlxsw: Add return value check for mlxsw_sp_port_get_stats_raw() ipv6: mcast: add RCU protection to mld_newpack() team: better TEAM_OPTION_TYPE_STRING validation Bluetooth: L2CAP: Fix corrupted list in hci_chan_del Bluetooth: btintel_pcie: Fix a potential race condition Bluetooth: L2CAP: Fix slab-use-after-free Read in l2cap_send_cmd net: ethernet: ti: am65_cpsw: fix tx_cleanup for XDP case net: ethernet: ti: am65-cpsw: fix RX & TX statistics for XDP_TX case net: ethernet: ti: am65-cpsw: fix memleak in certain XDP cases vsock/test: Add test for SO_LINGER null ptr deref vsock: Orphan socket after transport release MAINTAINERS: Add sctp headers to the general netdev entry Revert "netfilter: flowtable: teardown flow if cached mtu is stale" iavf: Fix a locking bug in an error path rxrpc: Fix alteration of headers whilst zerocopy pending net: phylink: make configuring clock-stop dependent on MAC support ... commit 945ce413ac14388219afe09de84ee08994f05e53 Merge: 1854c7f79dca da2dccd7451d Author: Linus Torvalds Date: Thu Feb 13 12:06:29 2025 -0800 Merge tag 'for-6.14-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - fix stale page cache after race between readahead and direct IO write - fix hole expansion when writing at an offset beyond EOF, the range will not be zeroed - use proper way to calculate offsets in folio ranges * tag 'for-6.14-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix hole expansion when writing at an offset beyond EOF btrfs: fix stale page cache after race between readahead and direct IO write btrfs: fix two misuses of folio_shift() commit 1854c7f79dcaaba9f1c0b131445ace03f9fd532d Merge: ab68d7eb7b1a 406e445b3c6b Author: Linus Torvalds Date: Thu Feb 13 11:58:11 2025 -0800 Merge tag 'bcachefs-2025-02-12' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: "Just small stuff. As a general announcement, on disk format is now frozen in my master branch - future on disk format changes will be optional, not required. - More fixes for going read-only: the previous fix was insufficient, but with more work on ordering journal reclaim flushing (and a btree node accounting fix so we don't split until we have to) the tiering_replication test now consistently goes read-only in less than a second. - fix for fsck when we have reflink pointers to missing indirect extents - some transaction restart handling fixes from Alan; the "Pass _orig_restart_count to trans_was_restarted" likely fixes some rare undefined behaviour heisenbugs" * tag 'bcachefs-2025-02-12' of git://evilpiepirate.org/bcachefs: bcachefs: Reuse transaction bcachefs: Pass _orig_restart_count to trans_was_restarted bcachefs: CONFIG_BCACHEFS_INJECT_TRANSACTION_RESTARTS bcachefs: Fix want_new_bset() so we write until the end of the btree node bcachefs: Split out journal pins by btree level bcachefs: Fix use after free bcachefs: Fix marking reflink pointers to missing indirect extents commit b3aa9283c0c505b5cfd25f7d6cfd720de2adc807 Author: Marc Zyngier Date: Wed Feb 12 18:25:58 2025 +0000 KVM: arm64: vgic: Hoist SGI/PPI alloc from vgic_init() to kvm_create_vgic() If userspace creates vcpus, then a vgic, we end-up in a situation where irqchip_in_kernel() will return true, but no private interrupt has been allocated for these vcpus. This situation will continue until userspace initialises the vgic, at which point we fix the early vcpus. Should a vcpu run or be initialised in the interval, bad things may happen. An obvious solution is to move this fix-up phase to the point where the vgic is created. This ensures that from that point onwards, all vcpus have their private interrupts, as new vcpus will directly allocate them. With that, we have the invariant that when irqchip_in_kernel() is true, all vcpus have their private interrupts. Reported-by: Alexander Potapenko Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250212182558.2865232-3-maz@kernel.org Signed-off-by: Marc Zyngier arch/arm64/kvm/vgic/vgic-init.c | 74 ++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 37 deletions(-) commit e6e3e0022ef8f1d584ee4d5b89dca02472c5eb1f Author: Marc Zyngier Date: Wed Feb 12 18:25:57 2025 +0000 KVM: arm64: timer: Drop warning on failed interrupt signalling We currently spit out a warning if making a timer interrupt pending fails. But not only this is loud and easy to trigger from userspace, we also fail to do anything useful with that information. Dropping the warning is the easiest thing to do for now. We can always add error reporting if we really want in the future. Reported-by: Alexander Potapenko Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250212182558.2865232-2-maz@kernel.org Signed-off-by: Marc Zyngier arch/arm64/kvm/arch_timer.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 488fb6effe03e20f38d34da7425de77bbd3e2665 Author: Kory Maincent Date: Wed Feb 12 16:17:51 2025 +0100 net: pse-pd: Fix deadlock in current limit functions Fix a deadlock in pse_pi_get_current_limit and pse_pi_set_current_limit caused by consecutive mutex_lock calls. One in the function itself and another in pse_pi_get_voltage. Resolve the issue by using the unlocked version of pse_pi_get_voltage instead. Fixes: e0a5e2bba38a ("net: pse-pd: Use power limit at driver side instead of current limit") Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20250212151751.1515008-1-kory.maincent@bootlin.com Signed-off-by: Jakub Kicinski drivers/net/pse-pd/pse_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 540cda75884a6ba4c289980c84392261b1f61a9c Author: David Howells Date: Wed Feb 12 11:21:24 2025 +0000 rxrpc: Fix ipv6 path MTU discovery rxrpc path MTU discovery currently only makes use of ICMPv4, but not ICMPv6, which means that pmtud for IPv6 doesn't work correctly. Fix it to check for ICMPv6 messages also. Fixes: eeaedc5449d9 ("rxrpc: Implement path-MTU probing using padded PING ACKs (RFC8899)") Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/3517283.1739359284@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski net/rxrpc/peer_event.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b938731ed2d4eea8e268a27bfc600581fedae2a9 Author: Quentin Perret Date: Thu Feb 13 15:36:14 2025 +0000 KVM: arm64: Fix alignment of kvm_hyp_memcache allocations When allocating guest stage-2 page-table pages at EL2, pKVM can consume pages from the host-provided kvm_hyp_memcache. As pgtable.c expects zeroed pages, guest_s2_zalloc_page() actively implements this zeroing with a PAGE_SIZE memset. Unfortunately, we don't check the page alignment of the host-provided address before doing so, which could lead to the memset overrunning the page if the host was malicious. Fix this by simply force-aligning all kvm_hyp_memcache allocations to page boundaries. Fixes: 60dfe093ec13 ("KVM: arm64: Instantiate guest stage-2 page-tables at EL2") Reported-by: Ben Simner Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250213153615.3642515-1-qperret@google.com Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65729da9ce37f5a2c62e2542ef03bc9ac6775a7d Author: Marc Zyngier Date: Wed Feb 12 17:34:54 2025 +0000 KVM: arm64: Convert timer offset VA when accessed in HYP code Now that EL2 has gained some early timer emulation, it accesses the offsets pointed to by the timer structure, both of which live in the KVM structure. Of course, these are *kernel* pointers, so the dereferencing of these pointers in non-kernel code must be itself be offset. Given switch.h its own version of timer_get_offset() and use that instead. Fixes: b86fc215dc26d ("KVM: arm64: Handle counter access early in non-HYP context") Reported-by: Linux Kernel Functional Testing Reviewed-by: Oliver Upton Tested-by: Anders Roxell Link: https://lore.kernel.org/r/20250212173454.2864462-1-maz@kernel.org Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/include/hyp/switch.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 332b7e6d62b7a3a988017f5184e547aa20e3a19a Author: Mark Rutland Date: Thu Feb 13 09:15:31 2025 +0000 KVM: arm64: Simplify warning in kvm_arch_vcpu_load_fp() At the end of kvm_arch_vcpu_load_fp() we check that no bits are set in SVCR. We only check this for protected mode despite this mattering equally for non-protected mode, and the comment above this is confusing. Remove the comment and simplify the check, moving from WARN_ON() to WARN_ON_ONCE() to avoid spamming the log. Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier arch/arm64/kvm/fpsimd.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 59419f10045bc955d2229819c7cf7a8b0b9c5b59 Author: Mark Rutland Date: Mon Feb 10 19:52:26 2025 +0000 KVM: arm64: Eagerly switch ZCR_EL{1,2} In non-protected KVM modes, while the guest FPSIMD/SVE/SME state is live on the CPU, the host's active SVE VL may differ from the guest's maximum SVE VL: * For VHE hosts, when a VM uses NV, ZCR_EL2 contains a value constrained by the guest hypervisor, which may be less than or equal to that guest's maximum VL. Note: in this case the value of ZCR_EL1 is immaterial due to E2H. * For nVHE/hVHE hosts, ZCR_EL1 contains a value written by the guest, which may be less than or greater than the guest's maximum VL. Note: in this case hyp code traps host SVE usage and lazily restores ZCR_EL2 to the host's maximum VL, which may be greater than the guest's maximum VL. This can be the case between exiting a guest and kvm_arch_vcpu_put_fp(). If a softirq is taken during this period and the softirq handler tries to use kernel-mode NEON, then the kernel will fail to save the guest's FPSIMD/SVE state, and will pend a SIGKILL for the current thread. This happens because kvm_arch_vcpu_ctxsync_fp() binds the guest's live FPSIMD/SVE state with the guest's maximum SVE VL, and fpsimd_save_user_state() verifies that the live SVE VL is as expected before attempting to save the register state: | if (WARN_ON(sve_get_vl() != vl)) { | force_signal_inject(SIGKILL, SI_KERNEL, 0, 0); | return; | } Fix this and make this a bit easier to reason about by always eagerly switching ZCR_EL{1,2} at hyp during guest<->host transitions. With this happening, there's no need to trap host SVE usage, and the nVHE/nVHE __deactivate_cptr_traps() logic can be simplified to enable host access to all present FPSIMD/SVE/SME features. In protected nVHE/hVHE modes, the host's state is always saved/restored by hyp, and the guest's state is saved prior to exit to the host, so from the host's PoV the guest never has live FPSIMD/SVE/SME state, and the host's ZCR_EL1 is never clobbered by hyp. Fixes: 8c8010d69c132273 ("KVM: arm64: Save/restore SVE state for nVHE") Fixes: 2e3cf82063a00ea0 ("KVM: arm64: nv: Ensure correct VL is loaded before saving SVE state") Signed-off-by: Mark Rutland Reviewed-by: Mark Brown Tested-by: Mark Brown Cc: Catalin Marinas Cc: Fuad Tabba Cc: Marc Zyngier Cc: Oliver Upton Cc: Will Deacon Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250210195226.1215254-9-mark.rutland@arm.com Signed-off-by: Marc Zyngier arch/arm64/kvm/fpsimd.c | 30 ----------------- arch/arm64/kvm/hyp/entry.S | 5 +++ arch/arm64/kvm/hyp/include/hyp/switch.h | 59 +++++++++++++++++++++++++++++++++ arch/arm64/kvm/hyp/nvhe/hyp-main.c | 13 ++++---- arch/arm64/kvm/hyp/nvhe/switch.c | 6 ++-- arch/arm64/kvm/hyp/vhe/switch.c | 4 +++ 6 files changed, 76 insertions(+), 41 deletions(-) commit f9dd00de1e53a47763dfad601635d18542c3836d Author: Mark Rutland Date: Mon Feb 10 19:52:25 2025 +0000 KVM: arm64: Mark some header functions as inline The shared hyp switch header has a number of static functions which might not be used by all files that include the header, and when unused they will provoke compiler warnings, e.g. | In file included from arch/arm64/kvm/hyp/nvhe/hyp-main.c:8: | ./arch/arm64/kvm/hyp/include/hyp/switch.h:703:13: warning: 'kvm_hyp_handle_dabt_low' defined but not used [-Wunused-function] | 703 | static bool kvm_hyp_handle_dabt_low(struct kvm_vcpu *vcpu, u64 *exit_code) | | ^~~~~~~~~~~~~~~~~~~~~~~ | ./arch/arm64/kvm/hyp/include/hyp/switch.h:682:13: warning: 'kvm_hyp_handle_cp15_32' defined but not used [-Wunused-function] | 682 | static bool kvm_hyp_handle_cp15_32(struct kvm_vcpu *vcpu, u64 *exit_code) | | ^~~~~~~~~~~~~~~~~~~~~~ | ./arch/arm64/kvm/hyp/include/hyp/switch.h:662:13: warning: 'kvm_hyp_handle_sysreg' defined but not used [-Wunused-function] | 662 | static bool kvm_hyp_handle_sysreg(struct kvm_vcpu *vcpu, u64 *exit_code) | | ^~~~~~~~~~~~~~~~~~~~~ | ./arch/arm64/kvm/hyp/include/hyp/switch.h:458:13: warning: 'kvm_hyp_handle_fpsimd' defined but not used [-Wunused-function] | 458 | static bool kvm_hyp_handle_fpsimd(struct kvm_vcpu *vcpu, u64 *exit_code) | | ^~~~~~~~~~~~~~~~~~~~~ | ./arch/arm64/kvm/hyp/include/hyp/switch.h:329:13: warning: 'kvm_hyp_handle_mops' defined but not used [-Wunused-function] | 329 | static bool kvm_hyp_handle_mops(struct kvm_vcpu *vcpu, u64 *exit_code) | | ^~~~~~~~~~~~~~~~~~~ Mark these functions as 'inline' to suppress this warning. This shouldn't result in any functional change. At the same time, avoid the use of __alias() in the header and alias kvm_hyp_handle_iabt_low() and kvm_hyp_handle_watchpt_low() to kvm_hyp_handle_memory_fault() using CPP, matching the style in the rest of the kernel. For consistency, kvm_hyp_handle_memory_fault() is also marked as 'inline'. Signed-off-by: Mark Rutland Reviewed-by: Mark Brown Tested-by: Mark Brown Acked-by: Will Deacon Cc: Catalin Marinas Cc: Fuad Tabba Cc: Marc Zyngier Cc: Oliver Upton Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250210195226.1215254-8-mark.rutland@arm.com Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/include/hyp/switch.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 9b66195063c5a145843547b1d692bd189be85287 Author: Mark Rutland Date: Mon Feb 10 19:52:24 2025 +0000 KVM: arm64: Refactor exit handlers The hyp exit handling logic is largely shared between VHE and nVHE/hVHE, with common logic in arch/arm64/kvm/hyp/include/hyp/switch.h. The code in the header depends on function definitions provided by arch/arm64/kvm/hyp/vhe/switch.c and arch/arm64/kvm/hyp/nvhe/switch.c when they include the header. This is an unusual header dependency, and prevents the use of arch/arm64/kvm/hyp/include/hyp/switch.h in other files as this would result in compiler warnings regarding missing definitions, e.g. | In file included from arch/arm64/kvm/hyp/nvhe/hyp-main.c:8: | ./arch/arm64/kvm/hyp/include/hyp/switch.h:733:31: warning: 'kvm_get_exit_handler_array' used but never defined | 733 | static const exit_handler_fn *kvm_get_exit_handler_array(struct kvm_vcpu *vcpu); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | ./arch/arm64/kvm/hyp/include/hyp/switch.h:735:13: warning: 'early_exit_filter' used but never defined | 735 | static void early_exit_filter(struct kvm_vcpu *vcpu, u64 *exit_code); | | ^~~~~~~~~~~~~~~~~ Refactor the logic such that the header doesn't depend on anything from the C files. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Reviewed-by: Mark Brown Tested-by: Mark Brown Acked-by: Will Deacon Cc: Catalin Marinas Cc: Fuad Tabba Cc: Marc Zyngier Cc: Oliver Upton Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250210195226.1215254-7-mark.rutland@arm.com Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/include/hyp/switch.h | 30 ++++++------------------------ arch/arm64/kvm/hyp/nvhe/switch.c | 28 ++++++++++++++++------------ arch/arm64/kvm/hyp/vhe/switch.c | 9 ++++----- 3 files changed, 26 insertions(+), 41 deletions(-) commit ee14db31a9c84e65f5adfd45598760d851f1d817 Author: Mark Rutland Date: Mon Feb 10 19:52:23 2025 +0000 KVM: arm64: Refactor CPTR trap deactivation For historical reasons, the VHE and nVHE/hVHE implementations of __activate_cptr_traps() pair with a common implementation of __kvm_reset_cptr_el2(), which ideally would be named __deactivate_cptr_traps(). Rename __kvm_reset_cptr_el2() to __deactivate_cptr_traps(), and split it into separate VHE and nVHE/hVHE variants so that each can be paired with its corresponding implementation of __activate_cptr_traps(). At the same time, fold kvm_write_cptr_el2() into its callers. This makes it clear in-context whether a write is made to the CPACR_EL1 encoding or the CPTR_EL2 encoding, and removes the possibility of confusion as to whether kvm_write_cptr_el2() reformats the sysreg fields as cpacr_clear_set() does. In the nVHE/hVHE implementation of __activate_cptr_traps(), placing the sysreg writes within the if-else blocks requires that the call to __activate_traps_fpsimd32() is moved earlier, but as this was always called before writing to CPTR_EL2/CPACR_EL1, this should not result in a functional change. Signed-off-by: Mark Rutland Reviewed-by: Mark Brown Tested-by: Mark Brown Acked-by: Will Deacon Cc: Catalin Marinas Cc: Fuad Tabba Cc: Marc Zyngier Cc: Oliver Upton Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250210195226.1215254-6-mark.rutland@arm.com Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_emulate.h | 42 ------------------------------------ arch/arm64/kvm/hyp/nvhe/switch.c | 35 ++++++++++++++++++++++++++---- arch/arm64/kvm/hyp/vhe/switch.c | 12 ++++++++++- 3 files changed, 42 insertions(+), 47 deletions(-) commit 407a99c4654e8ea65393f412c421a55cac539f5b Author: Mark Rutland Date: Mon Feb 10 19:52:22 2025 +0000 KVM: arm64: Remove VHE host restore of CPACR_EL1.SMEN When KVM is in VHE mode, the host kernel tries to save and restore the configuration of CPACR_EL1.SMEN (i.e. CPTR_EL2.SMEN when HCR_EL2.E2H=1) across kvm_arch_vcpu_load_fp() and kvm_arch_vcpu_put_fp(), since the configuration may be clobbered by hyp when running a vCPU. This logic has historically been broken, and is currently redundant. This logic was originally introduced in commit: 861262ab86270206 ("KVM: arm64: Handle SME host state when running guests") At the time, the VHE hyp code would reset CPTR_EL2.SMEN to 0b00 when returning to the host, trapping host access to SME state. Unfortunately, this was unsafe as the host could take a softirq before calling kvm_arch_vcpu_put_fp(), and if a softirq handler were to use kernel mode NEON the resulting attempt to save the live FPSIMD/SVE/SME state would result in a fatal trap. That issue was limited to VHE mode. For nVHE/hVHE modes, KVM always saved/restored the host kernel's CPACR_EL1 value, and configured CPTR_EL2.TSM to 0b0, ensuring that host usage of SME would not be trapped. The issue above was incidentally fixed by commit: 375110ab51dec5dc ("KVM: arm64: Fix resetting SME trap values on reset for (h)VHE") That commit changed the VHE hyp code to configure CPTR_EL2.SMEN to 0b01 when returning to the host, permitting host kernel usage of SME, avoiding the issue described above. At the time, this was not identified as a fix for commit 861262ab86270206. Now that the host eagerly saves and unbinds its own FPSIMD/SVE/SME state, there's no need to save/restore the state of the EL0 SME trap. The kernel can safely save/restore state without trapping, as described above, and will restore userspace state (including trap controls) before returning to userspace. Remove the redundant logic. Signed-off-by: Mark Rutland Reviewed-by: Mark Brown Tested-by: Mark Brown Acked-by: Will Deacon Cc: Catalin Marinas Cc: Fuad Tabba Cc: Marc Zyngier Cc: Oliver Upton Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250210195226.1215254-5-mark.rutland@arm.com Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 1 - arch/arm64/kvm/fpsimd.c | 21 --------------------- 2 files changed, 22 deletions(-) commit 459f059be702056d91537b99a129994aa6ccdd35 Author: Mark Rutland Date: Mon Feb 10 19:52:21 2025 +0000 KVM: arm64: Remove VHE host restore of CPACR_EL1.ZEN When KVM is in VHE mode, the host kernel tries to save and restore the configuration of CPACR_EL1.ZEN (i.e. CPTR_EL2.ZEN when HCR_EL2.E2H=1) across kvm_arch_vcpu_load_fp() and kvm_arch_vcpu_put_fp(), since the configuration may be clobbered by hyp when running a vCPU. This logic is currently redundant. The VHE hyp code unconditionally configures CPTR_EL2.ZEN to 0b01 when returning to the host, permitting host kernel usage of SVE. Now that the host eagerly saves and unbinds its own FPSIMD/SVE/SME state, there's no need to save/restore the state of the EL0 SVE trap. The kernel can safely save/restore state without trapping, as described above, and will restore userspace state (including trap controls) before returning to userspace. Remove the redundant logic. Signed-off-by: Mark Rutland Reviewed-by: Mark Brown Tested-by: Mark Brown Acked-by: Will Deacon Cc: Catalin Marinas Cc: Fuad Tabba Cc: Marc Zyngier Cc: Oliver Upton Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250210195226.1215254-4-mark.rutland@arm.com Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 1 - arch/arm64/kvm/fpsimd.c | 16 ---------------- 2 files changed, 17 deletions(-) commit 8eca7f6d5100b6997df4f532090bc3f7e0203bef Author: Mark Rutland Date: Mon Feb 10 19:52:20 2025 +0000 KVM: arm64: Remove host FPSIMD saving for non-protected KVM Now that the host eagerly saves its own FPSIMD/SVE/SME state, non-protected KVM never needs to save the host FPSIMD/SVE/SME state, and the code to do this is never used. Protected KVM still needs to save/restore the host FPSIMD/SVE state to avoid leaking guest state to the host (and to avoid revealing to the host whether the guest used FPSIMD/SVE/SME), and that code needs to be retained. Remove the unused code and data structures. To avoid the need for a stub copy of kvm_hyp_save_fpsimd_host() in the VHE hyp code, the nVHE/hVHE version is moved into the shared switch header, where it is only invoked when KVM is in protected mode. Signed-off-by: Mark Rutland Reviewed-by: Mark Brown Tested-by: Mark Brown Acked-by: Will Deacon Cc: Catalin Marinas Cc: Fuad Tabba Cc: Marc Zyngier Cc: Oliver Upton Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250210195226.1215254-3-mark.rutland@arm.com Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_host.h | 20 +++++--------------- arch/arm64/kvm/arm.c | 8 -------- arch/arm64/kvm/fpsimd.c | 2 -- arch/arm64/kvm/hyp/include/hyp/switch.h | 25 +++++++++++++++++++++++-- arch/arm64/kvm/hyp/nvhe/hyp-main.c | 2 +- arch/arm64/kvm/hyp/nvhe/switch.c | 28 ---------------------------- arch/arm64/kvm/hyp/vhe/switch.c | 8 -------- 7 files changed, 29 insertions(+), 64 deletions(-) commit fbc7e61195e23f744814e78524b73b59faa54ab4 Author: Mark Rutland Date: Mon Feb 10 19:52:19 2025 +0000 KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state There are several problems with the way hyp code lazily saves the host's FPSIMD/SVE state, including: * Host SVE being discarded unexpectedly due to inconsistent configuration of TIF_SVE and CPACR_ELx.ZEN. This has been seen to result in QEMU crashes where SVE is used by memmove(), as reported by Eric Auger: https://issues.redhat.com/browse/RHEL-68997 * Host SVE state is discarded *after* modification by ptrace, which was an unintentional ptrace ABI change introduced with lazy discarding of SVE state. * The host FPMR value can be discarded when running a non-protected VM, where FPMR support is not exposed to a VM, and that VM uses FPSIMD/SVE. In these cases the hyp code does not save the host's FPMR before unbinding the host's FPSIMD/SVE/SME state, leaving a stale value in memory. Avoid these by eagerly saving and "flushing" the host's FPSIMD/SVE/SME state when loading a vCPU such that KVM does not need to save any of the host's FPSIMD/SVE/SME state. For clarity, fpsimd_kvm_prepare() is removed and the necessary call to fpsimd_save_and_flush_cpu_state() is placed in kvm_arch_vcpu_load_fp(). As 'fpsimd_state' and 'fpmr_ptr' should not be used, they are set to NULL; all uses of these will be removed in subsequent patches. Historical problems go back at least as far as v5.17, e.g. erroneous assumptions about TIF_SVE being clear in commit: 8383741ab2e773a9 ("KVM: arm64: Get rid of host SVE tracking/saving") ... and so this eager save+flush probably needs to be backported to ALL stable trees. Fixes: 93ae6b01bafee8fa ("KVM: arm64: Discard any SVE state when entering KVM guests") Fixes: 8c845e2731041f0f ("arm64/sve: Leave SVE enabled on syscall if we don't context switch") Fixes: ef3be86021c3bdf3 ("KVM: arm64: Add save/restore support for FPMR") Reported-by: Eric Auger Reported-by: Wilco Dijkstra Reviewed-by: Mark Brown Tested-by: Mark Brown Tested-by: Eric Auger Acked-by: Will Deacon Cc: Catalin Marinas Cc: Florian Weimer Cc: Fuad Tabba Cc: Jeremy Linton Cc: Marc Zyngier Cc: Oliver Upton Cc: Paolo Bonzini Signed-off-by: Mark Rutland Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250210195226.1215254-2-mark.rutland@arm.com Signed-off-by: Marc Zyngier arch/arm64/kernel/fpsimd.c | 25 ------------------------- arch/arm64/kvm/fpsimd.c | 35 ++++++++++------------------------- 2 files changed, 10 insertions(+), 50 deletions(-) commit 7b4aebeecbbd5b5fe73e35fad3f62ed21aa7ef44 Author: Andy Shevchenko Date: Thu Feb 13 17:56:46 2025 +0200 gpiolib: Fix crash on error in gpiochip_get_ngpios() The gpiochip_get_ngpios() uses chip_*() macros to print messages. However these macros rely on gpiodev to be initialised and set, which is not the case when called via bgpio_init(). In such a case the printing messages will crash on NULL pointer dereference. Replace chip_*() macros by the respective dev_*() ones to avoid such crash. Fixes: 55b2395e4e92 ("gpio: mmio: handle "ngpios" properly in bgpio_init()") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250213155646.2882324-1-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 82c260c8806bf248ee11a053dd69665b8b207531 Merge: 458bf63d175e ab4eedb790ca Author: Jakub Kicinski Date: Thu Feb 13 09:41:33 2025 -0800 Merge tag 'for-net-2025-02-13' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - btintel_pcie: Fix a potential race condition - L2CAP: Fix slab-use-after-free Read in l2cap_send_cmd - L2CAP: Fix corrupted list in hci_chan_del * tag 'for-net-2025-02-13' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: L2CAP: Fix corrupted list in hci_chan_del Bluetooth: btintel_pcie: Fix a potential race condition Bluetooth: L2CAP: Fix slab-use-after-free Read in l2cap_send_cmd ==================== Link: https://patch.msgid.link/20250213162446.617632-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 458bf63d175ec5f192a3213380c1456bf17f2075 Merge: 0892b840318d cf56aa8dd263 Author: Jakub Kicinski Date: Thu Feb 13 09:38:50 2025 -0800 Merge tag 'nf-25-02-13' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following batch contains one revert for: 1) Revert flowtable entry teardown cycle when skbuff exceeds mtu to deal with DF flag unset scenarios. This is reverts a patch coming in the previous merge window (available in 6.14-rc releases). * tag 'nf-25-02-13' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: Revert "netfilter: flowtable: teardown flow if cached mtu is stale" ==================== Link: https://patch.msgid.link/20250213100502.3983-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit cd57e4327707126dca3f9517b84274c001d4c184 Author: Pei Xiao Date: Tue Feb 11 10:29:48 2025 +0800 phy: freescale: fsl-samsung-hdmi: Limit PLL lock detection clock divider to valid range FIELD_PREP() checks that a value fits into the available bitfield, but the index div equals to 4,is out of range. which gcc complains about: In function ‘fsl_samsung_hdmi_phy_configure_pll_lock_det’, inlined from ‘fsl_samsung_hdmi_phy_configure’ at drivers/phy/freescale/phy-fsl-samsung-hdmi.c :470:2: ././include/linux/compiler_types.h:542:38: error: call to ‘__compiletime_assert_538’ declared with attribute error: FIELD_PREP: value too large for the field 542 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ ././include/linux/compiler_types.h:523:4: note: in definition of macro ‘__compiletime_assert’ 523 | prefix ## suffix(); | ^~~~~~ ././include/linux/compiler_types.h:542:2: note: in expansion of macro ‘_compiletime_assert’ 542 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) REG12_CK_DIV_MASK only two bit, limit div to range 0~3, so build error will fix. Fixes: d567679f2b6a ("phy: freescale: fsl-samsung-hdmi: Clean up fld_tg_code calculation") Signed-off-by: Pei Xiao Changlog: Reviewed-by: Adam Ford Link: https://lore.kernel.org/r/tencent_6F503D43467AA99DD8CC59B8F645F0725B0A@qq.com Signed-off-by: Vinod Koul drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit fbe8f2fa971c537571994a0df532c511c4fb5537 Author: Bart Van Assche Date: Wed Feb 12 09:11:07 2025 -0800 md/raid*: Fix the set_queue_limits implementations queue_limits_cancel_update() must only be called if queue_limits_start_update() is called first. Remove the queue_limits_cancel_update() calls from the raid*_set_limits() functions because there is no corresponding queue_limits_start_update() call. Cc: Christoph Hellwig Fixes: c6e56cf6b2e7 ("block: move integrity information into queue_limits") Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/linux-raid/20250212171108.3483150-1-bvanassche@acm.org/ Signed-off-by: Yu Kuai drivers/md/raid0.c | 4 +--- drivers/md/raid1.c | 4 +--- drivers/md/raid10.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) commit d6211ebbdaa541af197b50b8dd8f22642ce0b87f Author: Jens Axboe Date: Thu Feb 13 08:24:23 2025 -0700 io_uring/uring_cmd: unconditionally copy SQEs at prep time This isn't generally necessary, but conditions have been observed where SQE data is accessed from the original SQE after prep has been done and outside of the initial issue. Opcode prep handlers must ensure that any SQE related data is stable beyond the prep phase, but uring_cmd is a bit special in how it handles the SQE which makes it susceptible to reading stale data. If the application has reused the SQE before the original completes, then that can lead to data corruption. Down the line we can relax this again once uring_cmd has been sanitized a bit, and avoid unnecessarily copying the SQE. Fixes: 5eff57fa9f3a ("io_uring/uring_cmd: defer SQE copying until it's needed") Reported-by: Caleb Sander Mateos Reviewed-by: Caleb Sander Mateos Reviewed-by: Li Zetao Signed-off-by: Jens Axboe io_uring/uring_cmd.c | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) commit f5717c93a1b999970f3a64d771a1a9ee68cc37d0 Author: Chuyi Zhou Date: Wed Feb 12 21:09:35 2025 +0800 sched_ext: Use SCX_CALL_OP_TASK in task_tick_scx Now when we use scx_bpf_task_cgroup() in ops.tick() to get the cgroup of the current task, the following error will occur: scx_foo[3795244] triggered exit kind 1024: runtime error (called on a task not being operated on) The reason is that we are using SCX_CALL_OP() instead of SCX_CALL_OP_TASK() when calling ops.tick(), which triggers the error during the subsequent scx_kf_allowed_on_arg_tasks() check. SCX_CALL_OP_TASK() was first introduced in commit 36454023f50b ("sched_ext: Track tasks that are subjects of the in-flight SCX operation") to ensure task's rq lock is held when accessing task's sched_group. Since ops.tick() is marked as SCX_KF_TERMINAL and task_tick_scx() is protected by the rq lock, we can use SCX_CALL_OP_TASK() to avoid the above issue. Similarly, the same changes should be made for ops.disable() and ops.exit_task(), as they are also protected by task_rq_lock() and it's safe to access the task's task_group. Fixes: 36454023f50b ("sched_ext: Track tasks that are subjects of the in-flight SCX operation") Signed-off-by: Chuyi Zhou Signed-off-by: Tejun Heo kernel/sched/ext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0892b840318daa6ae739b7cdec5ecdfca4006689 Author: Jakub Kicinski Date: Thu Feb 13 08:49:44 2025 -0800 Reapply "net: skb: introduce and use a single page frag cache" This reverts commit 011b0335903832facca86cd8ed05d7d8d94c9c76. Sabrina reports that the revert may trigger warnings due to intervening changes, especially the ability to rise MAX_SKB_FRAGS. Let's drop it and revisit once that part is also ironed out. Fixes: 011b03359038 ("Revert "net: skb: introduce and use a single page frag cache"") Reported-by: Sabrina Dubroca Link: https://lore.kernel.org/6bf54579233038bc0e76056c5ea459872ce362ab.1739375933.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski include/linux/netdevice.h | 1 + net/core/dev.c | 17 -------- net/core/skbuff.c | 103 +++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 99 insertions(+), 22 deletions(-) commit 2e2006c91c842c551521434466f9b4324719c9a7 Author: Chuyi Zhou Date: Wed Feb 12 15:19:36 2025 +0800 sched_ext: Fix the incorrect bpf_list kfunc API in common.bpf.h. Now BPF only supports bpf_list_push_{front,back}_impl kfunc, not bpf_list_ push_{front,back}. This patch fix this issue. Without this patch, if we use bpf_list kfunc in scx, the BPF verifier would complain: libbpf: extern (func ksym) 'bpf_list_push_back': not found in kernel or module BTFs libbpf: failed to load object 'scx_foo' libbpf: failed to load BPF skeleton 'scx_foo': -EINVAL With this patch, the bpf list kfunc will work as expected. Signed-off-by: Chuyi Zhou Fixes: 2a52ca7c98960 ("sched_ext: Add scx_simple and scx_example_qmap example schedulers") Signed-off-by: Tejun Heo tools/sched_ext/include/scx/common.bpf.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit a8972d5a49b408248294b5ecbdd0a085e4726349 Author: Hugo Villeneuve Date: Fri Sep 27 09:53:05 2024 -0400 drm: panel: jd9365da-h3: fix reset signal polarity In jadard_prepare() a reset pulse is generated with the following statements (delays ommited for clarity): gpiod_set_value(jadard->reset, 1); --> Deassert reset gpiod_set_value(jadard->reset, 0); --> Assert reset for 10ms gpiod_set_value(jadard->reset, 1); --> Deassert reset However, specifying second argument of "0" to gpiod_set_value() means to deassert the GPIO, and "1" means to assert it. If the reset signal is defined as GPIO_ACTIVE_LOW in the DTS, the above statements will incorrectly generate the reset pulse (inverted) and leave it asserted (LOW) at the end of jadard_prepare(). Fix reset behavior by inverting gpiod_set_value() second argument in jadard_prepare(). Also modify second argument to devm_gpiod_get() in jadard_dsi_probe() to assert the reset when probing. Do not modify it in jadard_unprepare() as it is already properly asserted with "1", which seems to be the intended behavior. Fixes: 6b818c533dd8 ("drm: panel: Add Jadard JD9365DA-H3 DSI panel") Cc: stable@vger.kernel.org Signed-off-by: Hugo Villeneuve Reviewed-by: Neil Armstrong Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240927135306.857617-1-hugo@hugovil.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240927135306.857617-1-hugo@hugovil.com drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0760d62dad5d3e76c2aa175d9bc42b5f664967c2 Author: Devaansh Kumar Date: Tue Feb 11 22:48:48 2025 +0530 sched_ext: selftests: Fix grammar in tests description Fixed grammar for a few tests of sched_ext. Signed-off-by: Devaansh Kumar Signed-off-by: Tejun Heo tools/testing/selftests/sched_ext/init_enable_count.c | 2 +- tools/testing/selftests/sched_ext/maybe_null.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ab68d7eb7b1a64f3f4710da46cc5f93c6c154942 Merge: d63609e41295 3011b29ec5a3 Author: Linus Torvalds Date: Thu Feb 13 08:43:46 2025 -0800 Merge tag 'loongarch-fixes-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch fixes from Huacai Chen: "Fix bugs about idle, kernel_page_present(), IP checksum and KVM, plus some trival cleanups" * tag 'loongarch-fixes-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: KVM: Set host with kernel mode when switch to VM mode LoongArch: KVM: Remove duplicated cache attribute setting LoongArch: KVM: Fix typo issue about GCFG feature detection LoongArch: csum: Fix OoB access in IP checksum code for negative lengths LoongArch: Remove the deprecated notifier hook mechanism LoongArch: Use str_yes_no() helper function for /proc/cpuinfo LoongArch: Fix kernel_page_present() for KPRANGE/XKPRANGE LoongArch: Fix idle VS timer enqueue commit d63609e4129596cbf86d91c1fb6903273ca26269 Merge: 4dc1d1bec898 b3e127dacad6 Author: Linus Torvalds Date: Thu Feb 13 08:41:48 2025 -0800 Merge tag 'platform-drivers-x86-v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Ilpo Järvinen: - thinkpad_acpi: - Fix registration of tpacpi platform driver - Support fan speed in ticks per revolution (Thinkpad X120e) - Support V9 DYTC profiles (new Thinkpad AMD platforms) - int3472: Handle GPIO "enable" vs "reset" variation (ov7251) * tag 'platform-drivers-x86-v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: thinkpad_acpi: Fix registration of tpacpi platform driver platform/x86: int3472: Call "reset" GPIO "enable" for INT347E platform/x86: int3472: Use correct type for "polarity", call it gpio_flags platform/x86: thinkpad_acpi: Support for V9 DYTC platform profiles platform/x86: thinkpad_acpi: Fix invalid fan speed on ThinkPad X120e commit 0d0b752f2497471ddd2b32143d167d42e18a8f3c Author: Alexandra Winter Date: Wed Feb 12 17:36:59 2025 +0100 s390/qeth: move netif_napi_add_tx() and napi_enable() from under BH Like other drivers qeth is calling local_bh_enable() after napi_schedule() to kick-start softirqs [0]. Since netif_napi_add_tx() and napi_enable() now take the netdev_lock() mutex [1], move them out from under the BH protection. Same solution as in commit a60558644e20 ("wifi: mt76: move napi_enable() from under BH") Fixes: 1b23cdbd2bbc ("net: protect netdev->napi_list with netdev_lock()") Link: https://lore.kernel.org/netdev/20240612181900.4d9d18d0@kernel.org/ [0] Link: https://lore.kernel.org/netdev/20250115035319.559603-1-kuba@kernel.org/ [1] Signed-off-by: Alexandra Winter Acked-by: Joe Damato Link: https://patch.msgid.link/20250212163659.2287292-1-wintera@linux.ibm.com Signed-off-by: Jakub Kicinski drivers/s390/net/qeth_core_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit fee5d688940690cc845937459e340e4e02598e90 Author: Wentao Liang Date: Wed Feb 12 23:23:11 2025 +0800 mlxsw: Add return value check for mlxsw_sp_port_get_stats_raw() Add a check for the return value of mlxsw_sp_port_get_stats_raw() in __mlxsw_sp_port_get_stats(). If mlxsw_sp_port_get_stats_raw() returns an error, exit the function to prevent further processing with potentially invalid data. Fixes: 614d509aa1e7 ("mlxsw: Move ethtool_ops to spectrum_ethtool.c") Cc: stable@vger.kernel.org # 5.9+ Signed-off-by: Wentao Liang Reviewed-by: Petr Machata Link: https://patch.msgid.link/20250212152311.1332-1-vulab@iscas.ac.cn Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a527750d877fd334de87eef81f1cb5f0f0ca3373 Author: Eric Dumazet Date: Wed Feb 12 14:10:21 2025 +0000 ipv6: mcast: add RCU protection to mld_newpack() mld_newpack() can be called without RTNL or RCU being held. Note that we no longer can use sock_alloc_send_skb() because ipv6.igmp_sk uses GFP_KERNEL allocations which can sleep. Instead use alloc_skb() and charge the net->ipv6.igmp_sk socket under RCU protection. Fixes: b8ad0cbc58f7 ("[NETNS][IPV6] mcast - handle several network namespace") Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Link: https://patch.msgid.link/20250212141021.1663666-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv6/mcast.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 5bef3ac184b5626ea62385d6b82a1992b89d7940 Author: Eric Dumazet Date: Wed Feb 12 13:49:28 2025 +0000 team: better TEAM_OPTION_TYPE_STRING validation syzbot reported following splat [1] Make sure user-provided data contains one nul byte. [1] BUG: KMSAN: uninit-value in string_nocheck lib/vsprintf.c:633 [inline] BUG: KMSAN: uninit-value in string+0x3ec/0x5f0 lib/vsprintf.c:714 string_nocheck lib/vsprintf.c:633 [inline] string+0x3ec/0x5f0 lib/vsprintf.c:714 vsnprintf+0xa5d/0x1960 lib/vsprintf.c:2843 __request_module+0x252/0x9f0 kernel/module/kmod.c:149 team_mode_get drivers/net/team/team_core.c:480 [inline] team_change_mode drivers/net/team/team_core.c:607 [inline] team_mode_option_set+0x437/0x970 drivers/net/team/team_core.c:1401 team_option_set drivers/net/team/team_core.c:375 [inline] team_nl_options_set_doit+0x1339/0x1f90 drivers/net/team/team_core.c:2662 genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline] genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0x1214/0x12c0 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2543 genl_rcv+0x40/0x60 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0xf52/0x1260 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x10da/0x11e0 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg+0x30f/0x380 net/socket.c:733 ____sys_sendmsg+0x877/0xb60 net/socket.c:2573 ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2627 __sys_sendmsg net/socket.c:2659 [inline] __do_sys_sendmsg net/socket.c:2664 [inline] __se_sys_sendmsg net/socket.c:2662 [inline] __x64_sys_sendmsg+0x212/0x3c0 net/socket.c:2662 x64_sys_call+0x2ed6/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device") Reported-by: syzbot+1fcd957a82e3a1baa94d@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=1fcd957a82e3a1baa94d Signed-off-by: Eric Dumazet Reviewed-by: Jiri Pirko Link: https://patch.msgid.link/20250212134928.1541609-1-edumazet@google.com Signed-off-by: Jakub Kicinski drivers/net/team/team_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ab4eedb790cae44313759b50fe47da285e2519d5 Author: Luiz Augusto von Dentz Date: Thu Feb 6 15:54:45 2025 -0500 Bluetooth: L2CAP: Fix corrupted list in hci_chan_del This fixes the following trace by reworking the locking of l2cap_conn so instead of only locking when changing the chan_l list this promotes chan_lock to a general lock of l2cap_conn so whenever it is being held it would prevents the likes of l2cap_conn_del to run: list_del corruption, ffff888021297e00->prev is LIST_POISON2 (dead000000000122) ------------[ cut here ]------------ kernel BUG at lib/list_debug.c:61! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 1 UID: 0 PID: 5896 Comm: syz-executor213 Not tainted 6.14.0-rc1-next-20250204-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 RIP: 0010:__list_del_entry_valid_or_report+0x12c/0x190 lib/list_debug.c:59 Code: 8c 4c 89 fe 48 89 da e8 32 8c 37 fc 90 0f 0b 48 89 df e8 27 9f 14 fd 48 c7 c7 a0 c0 60 8c 4c 89 fe 48 89 da e8 15 8c 37 fc 90 <0f> 0b 4c 89 e7 e8 0a 9f 14 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 cb RSP: 0018:ffffc90003f6f998 EFLAGS: 00010246 RAX: 000000000000004e RBX: dead000000000122 RCX: 01454d423f7fbf00 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: dffffc0000000000 R08: ffffffff819f077c R09: 1ffff920007eded0 R10: dffffc0000000000 R11: fffff520007eded1 R12: dead000000000122 R13: dffffc0000000000 R14: ffff8880352248d8 R15: ffff888021297e00 FS: 00007f7ace6686c0(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7aceeeb1d0 CR3: 000000003527c000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __list_del_entry_valid include/linux/list.h:124 [inline] __list_del_entry include/linux/list.h:215 [inline] list_del_rcu include/linux/rculist.h:168 [inline] hci_chan_del+0x70/0x1b0 net/bluetooth/hci_conn.c:2858 l2cap_conn_free net/bluetooth/l2cap_core.c:1816 [inline] kref_put include/linux/kref.h:65 [inline] l2cap_conn_put+0x70/0xe0 net/bluetooth/l2cap_core.c:1830 l2cap_sock_shutdown+0xa8a/0x1020 net/bluetooth/l2cap_sock.c:1377 l2cap_sock_release+0x79/0x1d0 net/bluetooth/l2cap_sock.c:1416 __sock_release net/socket.c:642 [inline] sock_close+0xbc/0x240 net/socket.c:1393 __fput+0x3e9/0x9f0 fs/file_table.c:448 task_work_run+0x24f/0x310 kernel/task_work.c:227 ptrace_notify+0x2d2/0x380 kernel/signal.c:2522 ptrace_report_syscall include/linux/ptrace.h:415 [inline] ptrace_report_syscall_exit include/linux/ptrace.h:477 [inline] syscall_exit_work+0xc7/0x1d0 kernel/entry/common.c:173 syscall_exit_to_user_mode_prepare kernel/entry/common.c:200 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:205 [inline] syscall_exit_to_user_mode+0x24a/0x340 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7aceeaf449 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 19 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:00007f7ace668218 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: fffffffffffffffc RBX: 00007f7acef39328 RCX: 00007f7aceeaf449 RDX: 000000000000000e RSI: 0000000020000100 RDI: 0000000000000004 RBP: 00007f7acef39320 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003 R13: 0000000000000004 R14: 00007f7ace668670 R15: 000000000000000b Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__list_del_entry_valid_or_report+0x12c/0x190 lib/list_debug.c:59 Code: 8c 4c 89 fe 48 89 da e8 32 8c 37 fc 90 0f 0b 48 89 df e8 27 9f 14 fd 48 c7 c7 a0 c0 60 8c 4c 89 fe 48 89 da e8 15 8c 37 fc 90 <0f> 0b 4c 89 e7 e8 0a 9f 14 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 cb RSP: 0018:ffffc90003f6f998 EFLAGS: 00010246 RAX: 000000000000004e RBX: dead000000000122 RCX: 01454d423f7fbf00 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: dffffc0000000000 R08: ffffffff819f077c R09: 1ffff920007eded0 R10: dffffc0000000000 R11: fffff520007eded1 R12: dead000000000122 R13: dffffc0000000000 R14: ffff8880352248d8 R15: ffff888021297e00 FS: 00007f7ace6686c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7acef05b08 CR3: 000000003527c000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Reported-by: syzbot+10bd8fe6741eedd2be2e@syzkaller.appspotmail.com Tested-by: syzbot+10bd8fe6741eedd2be2e@syzkaller.appspotmail.com Fixes: b4f82f9ed43a ("Bluetooth: L2CAP: Fix slab-use-after-free Read in l2cap_send_cmd") Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Dan Carpenter include/net/bluetooth/l2cap.h | 3 +- net/bluetooth/l2cap_core.c | 138 +++++++++++++++--------------------------- net/bluetooth/l2cap_sock.c | 15 +++-- 3 files changed, 58 insertions(+), 98 deletions(-) commit 872274b992839ff64fe560767fe7ee5f942ccdb1 Author: Kiran K Date: Fri Jan 31 18:30:19 2025 +0530 Bluetooth: btintel_pcie: Fix a potential race condition On HCI_OP_RESET command, firmware raises alive interrupt. Driver needs to wait for this before sending other command. This patch fixes the potential miss of alive interrupt due to which HCI_OP_RESET can timeout. Expected flow: If tx command is HCI_OP_RESET, 1. set data->gp0_received = false 2. send HCI_OP_RESET 3. wait for alive interrupt Actual flow having potential race: If tx command is HCI_OP_RESET, 1. send HCI_OP_RESET 1a. Firmware raises alive interrupt here and in ISR data->gp0_received is set to true 2. set data->gp0_received = false 3. wait for alive interrupt Signed-off-by: Kiran K Fixes: 05c200c8f029 ("Bluetooth: btintel_pcie: Add handshake between driver and firmware") Reported-by: Bjorn Helgaas Closes: https://patchwork.kernel.org/project/bluetooth/patch/20241001104451.626964-1-kiran.k@intel.com/ Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btintel_pcie.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b4f82f9ed43aefa79bec2504ae8c29be0c0f5d1d Author: Luiz Augusto von Dentz Date: Thu Jan 16 10:35:03 2025 -0500 Bluetooth: L2CAP: Fix slab-use-after-free Read in l2cap_send_cmd After the hci sync command releases l2cap_conn, the hci receive data work queue references the released l2cap_conn when sending to the upper layer. Add hci dev lock to the hci receive data work queue to synchronize the two. [1] BUG: KASAN: slab-use-after-free in l2cap_send_cmd+0x187/0x8d0 net/bluetooth/l2cap_core.c:954 Read of size 8 at addr ffff8880271a4000 by task kworker/u9:2/5837 CPU: 0 UID: 0 PID: 5837 Comm: kworker/u9:2 Not tainted 6.13.0-rc5-syzkaller-00163-gab75170520d4 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: hci1 hci_rx_work 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 l2cap_build_cmd net/bluetooth/l2cap_core.c:2964 [inline] l2cap_send_cmd+0x187/0x8d0 net/bluetooth/l2cap_core.c:954 l2cap_sig_send_rej net/bluetooth/l2cap_core.c:5502 [inline] l2cap_sig_channel net/bluetooth/l2cap_core.c:5538 [inline] l2cap_recv_frame+0x221f/0x10db0 net/bluetooth/l2cap_core.c:6817 hci_acldata_packet net/bluetooth/hci_core.c:3797 [inline] hci_rx_work+0x508/0xdb0 net/bluetooth/hci_core.c:4040 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 5837: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x243/0x390 mm/slub.c:4329 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] l2cap_conn_add+0xa9/0x8e0 net/bluetooth/l2cap_core.c:6860 l2cap_connect_cfm+0x115/0x1090 net/bluetooth/l2cap_core.c:7239 hci_connect_cfm include/net/bluetooth/hci_core.h:2057 [inline] hci_remote_features_evt+0x68e/0xac0 net/bluetooth/hci_event.c:3726 hci_event_func net/bluetooth/hci_event.c:7473 [inline] hci_event_packet+0xac2/0x1540 net/bluetooth/hci_event.c:7525 hci_rx_work+0x3f3/0xdb0 net/bluetooth/hci_core.c:4035 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Freed by task 54: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:582 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/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:4613 [inline] kfree+0x196/0x430 mm/slub.c:4761 l2cap_connect_cfm+0xcc/0x1090 net/bluetooth/l2cap_core.c:7235 hci_connect_cfm include/net/bluetooth/hci_core.h:2057 [inline] hci_conn_failed+0x287/0x400 net/bluetooth/hci_conn.c:1266 hci_abort_conn_sync+0x56c/0x11f0 net/bluetooth/hci_sync.c:5603 hci_cmd_sync_work+0x22b/0x400 net/bluetooth/hci_sync.c:332 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Reported-by: syzbot+31c2f641b850a348a734@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=31c2f641b850a348a734 Tested-by: syzbot+31c2f641b850a348a734@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis Signed-off-by: Luiz Augusto von Dentz net/bluetooth/l2cap_core.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) commit 78418f300d3999f1cf8a9ac71065bf2eca61f4dd Author: Lyude Paul Date: Mon Feb 10 13:30:26 2025 +0100 rust/kernel: Add faux device bindings This introduces a module for working with faux devices in rust, along with adding sample code to show how the API is used. Unlike other types of devices, we don't provide any hooks for device probe/removal - since these are optional for the faux API and are unnecessary in rust. Signed-off-by: Lyude Paul Cc: Maíra Canal Cc: Danilo Krummrich Cc: Miguel Ojeda Acked-by: Danilo Krummrich Link: https://lore.kernel.org/r/2025021026-exert-accent-b4c6@gregkh Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 ++ rust/bindings/bindings_helper.h | 1 + rust/kernel/faux.rs | 67 ++++++++++++++++++++++++++++++++++++++++ rust/kernel/lib.rs | 1 + samples/rust/Kconfig | 10 ++++++ samples/rust/Makefile | 1 + samples/rust/rust_driver_faux.rs | 29 +++++++++++++++++ 7 files changed, 111 insertions(+) commit 35fa2d88ca9481e5caf533d58b99ca259c63b2fe Author: Greg Kroah-Hartman Date: Mon Feb 10 13:30:25 2025 +0100 driver core: add a faux bus for use when a simple device/bus is needed Many drivers abuse the platform driver/bus system as it provides a simple way to create and bind a device to a driver-specific set of probe/release functions. Instead of doing that, and wasting all of the memory associated with a platform device, here is a "faux" bus that can be used instead. Reviewed-by: Jonathan Cameron Reviewed-by: Danilo Krummrich Reviewed-by: Lyude Paul Reviewed-by: Thomas Weißschuh Reviewed-by: Zijun Hu Link: https://lore.kernel.org/r/2025021026-atlantic-gibberish-3f0c@gregkh Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/infrastructure.rst | 6 + drivers/base/Makefile | 2 +- drivers/base/base.h | 1 + drivers/base/faux.c | 232 ++++++++++++++++++++++++++++ drivers/base/init.c | 1 + include/linux/device/faux.h | 69 +++++++++ 6 files changed, 310 insertions(+), 1 deletion(-) commit 6fe9116dd6bebee570406ec3f00a50388a62ccb3 Author: Mika Westerberg Date: Tue Feb 4 13:52:36 2025 +0200 MAINTAINERS: Use my kernel.org address for I2C ACPI work Switch to use my kernel.org address for I2C ACPI work. Signed-off-by: Mika Westerberg Signed-off-by: Wolfram Sang MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f47ed294a2bd577d5ae43e6e28e1c9a3be4a833 Author: Jens Axboe Date: Thu Feb 13 08:18:46 2025 -0700 block: cleanup and fix batch completion adding conditions The conditions for whether or not a request is allowed adding to a completion batch are a bit hard to read, and they also have a few issues. One is that ioerror may indeed be a random value on passthrough, and it's being checked unconditionally of whether or not the given request is a passthrough request or not. Rewrite the conditions to be separate for easier reading, and only check ioerror for non-passthrough requests. This fixes an issue with bio unmapping on passthrough, where it fails getting added to a batch. This both leads to suboptimal performance, and may trigger a potential schedule-under-atomic condition for polled passthrough IO. Fixes: f794f3351f26 ("block: add support for blk_mq_end_request_batch()") Link: https://lore.kernel.org/r/20575f0a-656e-4bb3-9d82-dec6c7e3a35c@kernel.dk Signed-off-by: Jens Axboe include/linux/blk-mq.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit a33f72554adf4552e53af3784cebfc4f2886c396 Merge: 240189294fbc 5de0219a9bb9 Author: Christian Brauner Date: Thu Feb 13 16:00:53 2025 +0100 Merge patch series "netfs: Miscellaneous fixes" David Howells says: Here are some miscellaneous fixes and changes for netfslib: (1) Fix a number of read-retry hangs, including: (a) Incorrect getting/putting of references on subreqs as we retry them. (b) Failure to track whether a last old subrequest in a retried set is superfluous. (c) Inconsistency in the usage of wait queues used for subrequests (ie. using clear_and_wake_up_bit() whilst waiting on a private waitqueue). (Note that waitqueue consistency also needs looking at for netfs_io_request structs.) (2) Add stats counters for retries and publish in /proc/fs/netfs/stats. This is not a fix per se, but is useful in debugging and shouldn't otherwise change the operation of the code. (3) Fix the ordering of queuing subrequests with respect to setting the request flag that says we've now queued them all. * patches from https://lore.kernel.org/r/20250212222402.3618494-1-dhowells@redhat.com: netfs: Fix setting NETFS_RREQ_ALL_QUEUED to be after all subreqs queued netfs: Add retry stat counters netfs: Fix a number of read-retry hangs Link: https://lore.kernel.org/r/20250212222402.3618494-1-dhowells@redhat.com Signed-off-by: Christian Brauner commit 5de0219a9bb9dacc4ce6e8f2745540dcce786983 Author: David Howells Date: Wed Feb 12 22:24:01 2025 +0000 netfs: Fix setting NETFS_RREQ_ALL_QUEUED to be after all subreqs queued Due to the code that queues a subreq on the active subrequest list getting moved to netfs_issue_read(), the NETFS_RREQ_ALL_QUEUED flag may now get set before the list-add actually happens. This is not a problem if the collection worker happens after the list-add, but it's a race - and, for 9P, where the read from the server is synchronous and done in the submitting thread, this is a lot more likely. The result is that, if the timing is wrong, a ref gets leaked because the collector thinks that all the subreqs have completed (because it can't see the last one yet) and clears NETFS_RREQ_IN_PROGRESS - at which point, the collection worker no longer goes into the collector. This can be provoked with AFS by injecting an msleep() right before the final subreq is queued. Fix this by splitting the queuing part out of netfs_issue_read() into a new function, netfs_queue_read(), and calling it separately. The setting of NETFS_RREQ_ALL_QUEUED is then done by netfs_queue_read() whilst it is holding the spinlock (that's probably unnecessary, but shouldn't hurt). It might be better to set a flag on the final subreq, but this could be a problem if an error occurs and we can't queue it. Fixes: e2d46f2ec332 ("netfs: Change the read result collector to only use one work item") Reported-by: Ihor Solodrai Closes: https://lore.kernel.org/r/a7x33d4dnMdGTtRivptq6S1i8btK70SNBP2XyX_xwDAhLvgQoPox6FVBOkifq4eBinfFfbZlIkMZBe3QarlWTxoEtHZwJCZbNKtaqrR7PvI=@pm.me/ Signed-off-by: David Howells Link: https://lore.kernel.org/r/20250212222402.3618494-4-dhowells@redhat.com Tested-by: Ihor Solodrai cc: Eric Van Hensbergen cc: Latchesar Ionkov cc: Dominique Martinet cc: Christian Schoenebeck cc: Marc Dionne cc: Steve French 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 fs/netfs/buffered_read.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit d01c495f432ce34df8bfd092e71720a2cf169a90 Author: David Howells Date: Wed Feb 12 22:24:00 2025 +0000 netfs: Add retry stat counters Add stat counters to count the number of request and subrequest retries and display them in /proc/fs/netfs/stats. Signed-off-by: David Howells Link: https://lore.kernel.org/r/20250212222402.3618494-3-dhowells@redhat.com cc: Jeff Layton cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner fs/netfs/internal.h | 4 ++++ fs/netfs/read_retry.c | 3 +++ fs/netfs/stats.c | 9 +++++++++ fs/netfs/write_issue.c | 1 + fs/netfs/write_retry.c | 2 ++ 5 files changed, 19 insertions(+) commit 1d0013962d220b166d9f7c9fe2746f1542e459a3 Author: David Howells Date: Wed Feb 12 22:23:59 2025 +0000 netfs: Fix a number of read-retry hangs Fix a number of hangs in the netfslib read-retry code, including: (1) netfs_reissue_read() doubles up the getting of references on subrequests, thereby leaking the subrequest and causing inode eviction to wait indefinitely. This can lead to the kernel reporting a hang in the filesystem's evict_inode(). Fix this by removing the get from netfs_reissue_read() and adding one to netfs_retry_read_subrequests() to deal with the one place that didn't double up. (2) The loop in netfs_retry_read_subrequests() that retries a sequence of failed subrequests doesn't record whether or not it retried the one that the "subreq" pointer points to when it leaves the loop. It may not if renegotiation/repreparation of the subrequests means that fewer subrequests are needed to span the cumulative range of the sequence. Because it doesn't record this, the piece of code that discards now-superfluous subrequests doesn't know whether it should discard the one "subreq" points to - and so it doesn't. Fix this by noting whether the last subreq it examines is superfluous and if it is, then getting rid of it and all subsequent subrequests. If that one one wasn't superfluous, then we would have tried to go round the previous loop again and so there can be no further unretried subrequests in the sequence. (3) netfs_retry_read_subrequests() gets yet an extra ref on any additional subrequests it has to get because it ran out of ones it could reuse to to renegotiation/repreparation shrinking the subrequests. Fix this by removing that extra ref. (4) In netfs_retry_reads(), it was using wait_on_bit() to wait for NETFS_SREQ_IN_PROGRESS to be cleared on all subrequests in the sequence - but netfs_read_subreq_terminated() is now using a wait queue on the request instead and so this wait will never finish. Fix this by waiting on the wait queue instead. To make this work, a new flag, NETFS_RREQ_RETRYING, is now set around the wait loop to tell the wake-up code to wake up the wait queue rather than requeuing the request's work item. Note that this flag replaces the NETFS_RREQ_NEED_RETRY flag which is no longer used. (5) Whilst not strictly anything to do with the hang, netfs_retry_read_subrequests() was also doubly incrementing the subreq_counter and re-setting the debug index, leaving a gap in the trace. This is also fixed. One of these hangs was observed with 9p and with cifs. Others were forced by manual code injection into fs/afs/file.c. Firstly, afs_prepare_read() was created to provide an changing pattern of maximum subrequest sizes: static int afs_prepare_read(struct netfs_io_subrequest *subreq) { struct netfs_io_request *rreq = subreq->rreq; if (!S_ISREG(subreq->rreq->inode->i_mode)) return 0; if (subreq->retry_count < 20) rreq->io_streams[0].sreq_max_len = umax(200, 2222 - subreq->retry_count * 40); else rreq->io_streams[0].sreq_max_len = 3333; return 0; } and pointed to by afs_req_ops. Then the following: struct netfs_io_subrequest *subreq = op->fetch.subreq; if (subreq->error == 0 && S_ISREG(subreq->rreq->inode->i_mode) && subreq->retry_count < 20) { subreq->transferred = subreq->already_done; __clear_bit(NETFS_SREQ_HIT_EOF, &subreq->flags); __set_bit(NETFS_SREQ_NEED_RETRY, &subreq->flags); afs_fetch_data_notify(op); return; } was inserted into afs_fetch_data_success() at the beginning and struct netfs_io_subrequest given an extra field, "already_done" that was set to the value in "subreq->transferred" by netfs_reissue_read(). When reading a 4K file, the subrequests would get gradually smaller, a new subrequest would be allocated around the 3rd retry and then eventually be rendered superfluous when the 20th retry was hit and the limit on the first subrequest was eased. Fixes: e2d46f2ec332 ("netfs: Change the read result collector to only use one work item") Signed-off-by: David Howells Link: https://lore.kernel.org/r/20250212222402.3618494-2-dhowells@redhat.com Tested-by: Marc Dionne Tested-by: 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 fs/netfs/read_collect.c | 6 ++++-- fs/netfs/read_retry.c | 40 ++++++++++++++++++++++++++++++---------- include/linux/netfs.h | 2 +- include/trace/events/netfs.h | 4 +++- 4 files changed, 38 insertions(+), 14 deletions(-) commit 71db7b9a019b76df43512639c282c03733ba3eeb Merge: da1668997052 6aa8a63c471e Author: Greg Kroah-Hartman Date: Thu Feb 13 15:40:29 2025 +0100 Merge tag 'usb-serial-6.14-rc3' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial device ids for 6.14-rc3 Here are some new modem device ids and a couple of related cleanups of the device id table. All have been in linux-next with no reported issues. * tag 'usb-serial-6.14-rc3' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: drop MeiG Smart defines USB: serial: option: fix Telit Cinterion FN990A name USB: serial: option: add Telit Cinterion FN990B compositions USB: serial: option: add MeiG Smart SLM828 commit 81f64e925c29fe6e99f04b131fac1935ac931e81 Author: Bjorn Helgaas Date: Wed Feb 12 13:35:16 2025 -0600 PCI: Avoid FLR for Mediatek MT7922 WiFi The Mediatek MT7922 WiFi device advertises FLR support, but it apparently does not work, and all subsequent config reads return ~0: pci 0000:01:00.0: [14c3:0616] type 00 class 0x028000 PCIe Endpoint pciback 0000:01:00.0: not ready 65535ms after FLR; giving up After an FLR, pci_dev_wait() waits for the device to become ready. Prior to d591f6804e7e ("PCI: Wait for device readiness with Configuration RRS"), it polls PCI_COMMAND until it is something other that PCI_POSSIBLE_ERROR (~0). If it times out, pci_dev_wait() returns -ENOTTY and __pci_reset_function_locked() tries the next available reset method. Typically this is Secondary Bus Reset, which does work, so the MT7922 is eventually usable. After d591f6804e7e, if Configuration Request Retry Status Software Visibility (RRS SV) is enabled, pci_dev_wait() polls PCI_VENDOR_ID until it is something other than the special 0x0001 Vendor ID that indicates a completion with RRS status. When RRS SV is enabled, reads of PCI_VENDOR_ID should return either 0x0001, i.e., the config read was completed with RRS, or a valid Vendor ID. On the MT7922, it seems that all config reads after FLR return ~0 indefinitely. When pci_dev_wait() reads PCI_VENDOR_ID and gets 0xffff, it assumes that's a valid Vendor ID and the device is now ready, so it returns with success. After pci_dev_wait() returns success, we restore config space and continue. Since the MT7922 is not actually ready after the FLR, the restore fails and the device is unusable. We considered changing pci_dev_wait() to continue polling if a PCI_VENDOR_ID read returns either 0x0001 or 0xffff. This "works" as it did before d591f6804e7e, although we have to wait for the timeout and then fall back to SBR. But it doesn't work for SR-IOV VFs, which *always* return 0xffff as the Vendor ID. Mark Mediatek MT7922 WiFi devices to avoid the use of FLR completely. This will cause fallback to another reset method, such as SBR. Link: https://lore.kernel.org/r/20250212193516.88741-1-helgaas@kernel.org Fixes: d591f6804e7e ("PCI: Wait for device readiness with Configuration RRS") Link: https://github.com/QubesOS/qubes-issues/issues/9689#issuecomment-2582927149 Link: https://lore.kernel.org/r/Z4pHll_6GX7OUBzQ@mail-itl Signed-off-by: Bjorn Helgaas Tested-by: Marek Marczykowski-Górecki Cc: stable@vger.kernel.org drivers/pci/quirks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ab027c488fc4a1fff0a5b712d4bdb2d2d324e8f8 Author: Peng Fan Date: Thu Jan 23 14:34:41 2025 +0800 firmware: arm_scmi: imx: Correct tx size of scmi_imx_misc_ctrl_set 'struct scmi_imx_misc_ctrl_set_in' has a zero length array in the end, The sizeof will not count 'value[]', and hence Tx size will be smaller than actual size for Tx,and SCMI firmware will flag this as protocol error. Fix this by enlarge the Tx size with 'num * sizeof(__le32)' to count in the size of data. Fixes: 61c9f03e22fc ("firmware: arm_scmi: Add initial support for i.MX MISC protocol") Reviewed-by: Jacky Bai Tested-by: Shengjiu Wang Acked-by: Jason Liu Signed-off-by: Peng Fan Message-Id: <20250123063441.392555-1-peng.fan@oss.nxp.com> (sudeep.holla: Commit rewording and replace hardcoded sizeof(__le32) value) Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/vendors/imx/imx-sm-misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4cf7d58620bfc2ebe934e3dfa97208f13f14ab8b Author: Anup Patel Date: Sun Feb 9 09:46:50 2025 +0530 genirq: Remove unused CONFIG_GENERIC_PENDING_IRQ_CHIPFLAGS CONFIG_GENERIC_PENDING_IRQ_CHIPFLAGS is not used anymore, hence remove it. Fixes: f94a18249b7f ("genirq: Remove IRQ_MOVE_PCNTXT and related code") Signed-off-by: Anup Patel Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250209041655.331470-7-apatel@ventanamicro.com kernel/irq/Kconfig | 4 ---- 1 file changed, 4 deletions(-) commit 75ad02318af2e4ae669e26a79f001bd5e1f97472 Author: Jan Beulich Date: Wed Feb 12 16:14:38 2025 +0100 Xen/swiotlb: mark xen_swiotlb_fixup() __init It's sole user (pci_xen_swiotlb_init()) is __init, too. Signed-off-by: Jan Beulich Reviewed-by: Stefano Stabellini Message-ID: Signed-off-by: Juergen Gross drivers/xen/swiotlb-xen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e93ec87286bd1fd30b7389e7a387cfb259f297e3 Author: Juergen Gross Date: Tue Feb 11 11:16:28 2025 +0100 x86/xen: allow larger contiguous memory regions in PV guests Today a PV guest (including dom0) can create 2MB contiguous memory regions for DMA buffers at max. This has led to problems at least with the megaraid_sas driver, which wants to allocate a 2.3MB DMA buffer. The limiting factor is the frame array used to do the hypercall for making the memory contiguous, which has 512 entries and is just a static array in mmu_pv.c. In order to not waste memory for non-PV guests, put the initial frame array into .init.data section and dynamically allocate an array from the .init_after_bootmem hook of PV guests. In case a contiguous memory area larger than the initially supported 2MB is requested, allocate a larger buffer for the frame list. Note that such an allocation is tried only after memory management has been initialized properly, which is tested via a flag being set in the .init_after_bootmem hook. Fixes: 9f40ec84a797 ("xen/swiotlb: add alignment check for dma buffers") Signed-off-by: Juergen Gross Tested-by: Alan Robinson Reviewed-by: Jan Beulich Signed-off-by: Juergen Gross arch/x86/xen/mmu_pv.c | 71 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 62 insertions(+), 9 deletions(-) commit 85fcb57c983f423180ba6ec5d0034242da05cc54 Author: Juergen Gross Date: Mon Feb 10 08:43:39 2025 +0100 xen/swiotlb: relax alignment requirements When mapping a buffer for DMA via .map_page or .map_sg DMA operations, there is no need to check the machine frames to be aligned according to the mapped areas size. All what is needed in these cases is that the buffer is contiguous at machine level. So carve out the alignment check from range_straddles_page_boundary() and move it to a helper called by xen_swiotlb_alloc_coherent() and xen_swiotlb_free_coherent() directly. Fixes: 9f40ec84a797 ("xen/swiotlb: add alignment check for dma buffers") Reported-by: Jan Vejvalka Tested-by: Jan Vejvalka Signed-off-by: Juergen Gross Reviewed-by: Stefano Stabellini Signed-off-by: Juergen Gross drivers/xen/swiotlb-xen.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 446a8351f160d65a1c5df7097f31c74102ed2bb1 Author: Miguel Ojeda Date: Mon Feb 10 17:37:32 2025 +0100 arm64: rust: clean Rust 1.85.0 warning using softfloat target Starting with Rust 1.85.0 (to be released 2025-02-20), `rustc` warns [1] about disabling neon in the aarch64 hardfloat target: warning: target feature `neon` cannot be toggled with `-Ctarget-feature`: unsound on hard-float targets because it changes float ABI | = note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #116344 Thus, instead, use the softfloat target instead. While trying it out, I found that the kernel sanitizers were not enabled for that built-in target [2]. Upstream Rust agreed to backport the enablement for the current beta so that it is ready for the 1.85.0 release [3] -- thanks! However, that still means that before Rust 1.85.0, we cannot switch since sanitizers could be in use. Thus conditionally do so. Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Cc: Catalin Marinas Cc: Will Deacon Cc: Matthew Maurer Cc: Alice Ryhl Cc: Ralf Jung Cc: Jubilee Young Link: https://github.com/rust-lang/rust/pull/133417 [1] Link: https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/arm64.20neon.20.60-Ctarget-feature.60.20warning/near/495358442 [2] Link: https://github.com/rust-lang/rust/pull/135905 [3] Link: https://github.com/rust-lang/rust/issues/116344 Signed-off-by: Miguel Ojeda Reviewed-by: Trevor Gross Tested-by: Matthew Maurer Reviewed-by: Ralf Jung Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250210163732.281786-1-ojeda@kernel.org Signed-off-by: Will Deacon arch/arm64/Makefile | 4 ++++ 1 file changed, 4 insertions(+) commit 733a90561ad0a4a74035d2d627098da85d43b592 Author: Dmitry V. Levin Date: Wed Feb 12 01:02:09 2025 +0200 MIPS: fix mips_get_syscall_arg() for o32 This makes ptrace/get_syscall_info selftest pass on mips o32 and mips64 o32 by fixing the following two test assertions: 1. get_syscall_info test assertion on mips o32: # get_syscall_info.c:218:get_syscall_info:Expected exp_args[5] (3134521044) == info.entry.args[4] (4911432) # get_syscall_info.c:219:get_syscall_info:wait #1: entry stop mismatch 2. get_syscall_info test assertion on mips64 o32: # get_syscall_info.c:209:get_syscall_info:Expected exp_args[2] (3134324433) == info.entry.args[1] (18446744072548908753) # get_syscall_info.c:210:get_syscall_info:wait #1: entry stop mismatch The first assertion happens due to mips_get_syscall_arg() trying to access another task's context but failing to do it properly because get_user() it calls just peeks at the current task's context. It usually does not crash because the default user stack always gets assigned the same VMA, but it is pure luck which mips_get_syscall_arg() wouldn't have if e.g. the stack was switched (via setcontext(3) or however) or a non-default process's thread peeked at, and in any case irrelevant data is obtained just as observed with the test case. mips_get_syscall_arg() ought to be using access_remote_vm() instead to retrieve the other task's stack contents, but given that the data has been already obtained and saved in `struct pt_regs' it would be an overkill. The first assertion is fixed for mips o32 by using struct pt_regs.args instead of get_user() to obtain syscall arguments. This approach works due to this piece in arch/mips/kernel/scall32-o32.S: /* * Ok, copy the args from the luser stack to the kernel stack. */ .set push .set noreorder .set nomacro load_a4: user_lw(t5, 16(t0)) # argument #5 from usp load_a5: user_lw(t6, 20(t0)) # argument #6 from usp load_a6: user_lw(t7, 24(t0)) # argument #7 from usp load_a7: user_lw(t8, 28(t0)) # argument #8 from usp loads_done: sw t5, PT_ARG4(sp) # argument #5 to ksp sw t6, PT_ARG5(sp) # argument #6 to ksp sw t7, PT_ARG6(sp) # argument #7 to ksp sw t8, PT_ARG7(sp) # argument #8 to ksp .set pop .section __ex_table,"a" PTR_WD load_a4, bad_stack_a4 PTR_WD load_a5, bad_stack_a5 PTR_WD load_a6, bad_stack_a6 PTR_WD load_a7, bad_stack_a7 .previous arch/mips/kernel/scall64-o32.S has analogous code for mips64 o32 that allows fixing the issue by obtaining syscall arguments from struct pt_regs.regs[4..11] instead of the erroneous use of get_user(). The second assertion is fixed by truncating 64-bit values to 32-bit syscall arguments. Fixes: c0ff3c53d4f9 ("MIPS: Enable HAVE_ARCH_TRACEHOOK.") Signed-off-by: Dmitry V. Levin Signed-off-by: Thomas Bogendoerfer arch/mips/include/asm/syscall.h | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) commit ed975485a13d1f6080218aa71c29425ba2dfb332 Author: Maciej W. Rozycki Date: Tue Feb 11 18:22:30 2025 +0000 MIPS: Export syscall stack arguments properly for remote use We have several places across the kernel where we want to access another task's syscall arguments, such as ptrace(2), seccomp(2), etc., by making a call to syscall_get_arguments(). This works for register arguments right away by accessing the task's `regs' member of `struct pt_regs', however for stack arguments seen with 32-bit/o32 kernels things are more complicated. Technically they ought to be obtained from the user stack with calls to an access_remote_vm(), but we have an easier way available already. So as to be able to access syscall stack arguments as regular function arguments following the MIPS calling convention we copy them over from the user stack to the kernel stack in arch/mips/kernel/scall32-o32.S, in handle_sys(), to the current stack frame's outgoing argument space at the top of the stack, which is where the handler called expects to see its incoming arguments. This area is also pointed at by the `pt_regs' pointer obtained by task_pt_regs(). Make the o32 stack argument space a proper member of `struct pt_regs' then, by renaming the existing member from `pad0' to `args' and using generated offsets to access the space. No functional change though. With the change in place the o32 kernel stack frame layout at the entry to a syscall handler invoked by handle_sys() is therefore as follows: $sp + 68 -> | ... | <- pt_regs.regs[9] +---------------------+ $sp + 64 -> | $t0 | <- pt_regs.regs[8] +---------------------+ $sp + 60 -> | $a3/argument #4 | <- pt_regs.regs[7] +---------------------+ $sp + 56 -> | $a2/argument #3 | <- pt_regs.regs[6] +---------------------+ $sp + 52 -> | $a1/argument #2 | <- pt_regs.regs[5] +---------------------+ $sp + 48 -> | $a0/argument #1 | <- pt_regs.regs[4] +---------------------+ $sp + 44 -> | $v1 | <- pt_regs.regs[3] +---------------------+ $sp + 40 -> | $v0 | <- pt_regs.regs[2] +---------------------+ $sp + 36 -> | $at | <- pt_regs.regs[1] +---------------------+ $sp + 32 -> | $zero | <- pt_regs.regs[0] +---------------------+ $sp + 28 -> | stack argument #8 | <- pt_regs.args[7] +---------------------+ $sp + 24 -> | stack argument #7 | <- pt_regs.args[6] +---------------------+ $sp + 20 -> | stack argument #6 | <- pt_regs.args[5] +---------------------+ $sp + 16 -> | stack argument #5 | <- pt_regs.args[4] +---------------------+ $sp + 12 -> | psABI space for $a3 | <- pt_regs.args[3] +---------------------+ $sp + 8 -> | psABI space for $a2 | <- pt_regs.args[2] +---------------------+ $sp + 4 -> | psABI space for $a1 | <- pt_regs.args[1] +---------------------+ $sp + 0 -> | psABI space for $a0 | <- pt_regs.args[0] +---------------------+ holding user data received and with the first 4 frame slots reserved by the psABI for the compiler to spill the incoming arguments from $a0-$a3 registers (which it sometimes does according to its needs) and the next 4 frame slots designated by the psABI for any stack function arguments that follow. This data is also available for other tasks to peek/poke at as reqired and where permitted. Signed-off-by: Maciej W. Rozycki Signed-off-by: Thomas Bogendoerfer arch/mips/include/asm/ptrace.h | 4 ++-- arch/mips/kernel/asm-offsets.c | 6 ++++++ arch/mips/kernel/scall32-o32.S | 8 ++++---- 3 files changed, 12 insertions(+), 6 deletions(-) commit 571b69f2f9b1ec7cf7d0e9b79e52115a87a869c4 Author: Shengjiu Wang Date: Thu Feb 13 15:05:18 2025 +0800 ASoC: imx-audmix: remove cpu_mclk which is from cpu dai device When defer probe happens, there may be below error: platform 59820000.sai: Resources present before probing The cpu_mclk clock is from the cpu dai device, if it is not released, then the cpu dai device probe will fail for the second time. The cpu_mclk is used to get rate for rate constraint, rate constraint may be specific for each platform, which is not necessary for machine driver, so remove it. Fixes: b86ef5367761 ("ASoC: fsl: Add Audio Mixer machine driver") Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/20250213070518.547375-1-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/imx-audmix.c | 31 ------------------------------- 1 file changed, 31 deletions(-) commit a4cc8494f1d853a0945d2a655b4891935d717355 Author: Mark Brown Date: Wed Feb 12 00:30:42 2025 +0000 arm64: Add missing registrations of hwcaps Commit 819935464cb2 ("arm64/hwcap: Describe 2024 dpISA extensions to userspace") added definitions for HWCAP_FPRCVT, HWCAP_F8MM8 and HWCAP_F8MM4 but did not include the crucial registration in arm64_elf_hwcaps. Add it. Fixes: 819935464cb2 ("arm64/hwcap: Describe 2024 dpISA extensions to userspace") Reported-by: Mark Rutland Signed-off-by: Mark Brown Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20250212-arm64-fix-2024-dpisa-v2-1-67a1c11d6001@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 3 +++ 1 file changed, 3 insertions(+) commit f818227a2f3d1d4f26469347e428323d61cc83f0 Author: Oliver Upton Date: Tue Jan 28 00:17:49 2025 +0000 ACPI: GTDT: Relax sanity checking on Platform Timers array count Perhaps unsurprisingly there are some platforms where the GTDT isn't quite right and the Platforms Timer array overflows the length of the overall table. While the recently-added sanity checking isn't wrong, it makes it impossible to boot the kernel on offending platforms. Try to hobble along and limit the Platform Timer count to the bounds of the table. Cc: Marc Zyngier Cc: Lorenzo Pieralisi Cc: Zheng Zengkai Cc: stable@vger.kernel.org Fixes: 263e22d6bd1f ("ACPI: GTDT: Tighten the check for the array of platform timer structures") Signed-off-by: Oliver Upton Acked-by: Marc Zyngier Reviewed-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20250128001749.3132656-1-oliver.upton@linux.dev Signed-off-by: Will Deacon drivers/acpi/arm64/gtdt.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit d923782b041218ef3804b2fed87619b5b1a497f3 Author: Beata Michalska Date: Fri Jan 31 15:58:42 2025 +0000 arm64: amu: Delay allocating cpumask for AMU FIE support For the time being, the amu_fie_cpus cpumask is being exclusively used by the AMU-related internals of FIE support and is guaranteed to be valid on every access currently made. Still the mask is not being invalidated on one of the error handling code paths, which leaves a soft spot with theoretical risk of UAF for CPUMASK_OFFSTACK cases. To make things sound, delay allocating said cpumask (for CPUMASK_OFFSTACK) avoiding otherwise nasty sanitising case failing to register the cpufreq policy notifications. Signed-off-by: Beata Michalska Reviewed-by: Prasanna Kumar T S M Reviewed-by: Sumit Gupta Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20250131155842.3839098-1-beata.michalska@arm.com Signed-off-by: Will Deacon arch/arm64/kernel/topology.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit e00a2e5d485faf53c7a24b9d1b575a642227947f Author: Imre Deak Date: Wed Feb 12 18:18:51 2025 +0200 drm: Fix DSC BPP increment decoding Starting with DPCD version 2.0 bits 6:3 of the DP_DSC_BITS_PER_PIXEL_INC DPCD register contains the NativeYCbCr422_MAX_bpp_DELTA field, which can be non-zero as opposed to earlier DPCD versions, hence decoding the bit_per_pixel increment value at bits 2:0 in the same register requires applying a mask, do so. Cc: Ankit Nautiyal Fixes: 0c2287c96521 ("drm/display/dp: Add helper function to get DSC bpp precision") Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20250212161851.4007005-1-imre.deak@intel.com drivers/gpu/drm/display/drm_dp_helper.c | 2 +- include/drm/display/drm_dp.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 0469b410c888414c3505d8d2b5814eb372404638 Merge: b698b9a8acc8 4542536f664f Author: Jakub Kicinski Date: Wed Feb 12 20:08:47 2025 -0800 Merge branch 'net-ethernet-ti-am65-cpsw-xdp-fixes' Roger Quadros says: ==================== net: ethernet: ti: am65-cpsw: XDP fixes This series fixes memleak and statistics for XDP cases. ==================== Link: https://patch.msgid.link/20250210-am65-cpsw-xdp-fixes-v1-0-ec6b1f7f1aca@kernel.org Signed-off-by: Jakub Kicinski commit 4542536f664f752db5feba2c5998b165933c34f2 Author: Roger Quadros Date: Mon Feb 10 16:52:17 2025 +0200 net: ethernet: ti: am65_cpsw: fix tx_cleanup for XDP case For XDP transmit case, swdata doesn't contain SKB but the XDP Frame. Infer the correct swdata based on buffer type and return the XDP Frame for XDP transmit case. Signed-off-by: Roger Quadros Fixes: 8acacc40f733 ("net: ethernet: ti: am65-cpsw: Add minimal XDP support") Link: https://patch.msgid.link/20250210-am65-cpsw-xdp-fixes-v1-3-ec6b1f7f1aca@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 8a9f82ff15da03a6804cdd6557fb36ff71c0924f Author: Roger Quadros Date: Mon Feb 10 16:52:16 2025 +0200 net: ethernet: ti: am65-cpsw: fix RX & TX statistics for XDP_TX case For successful XDP_TX and XDP_REDIRECT cases, the packet was received successfully so update RX statistics. Use original received packet length for that. TX packets statistics are incremented on TX completion so don't update it while TX queueing. If xdp_convert_buff_to_frame() fails, increment tx_dropped. Signed-off-by: Roger Quadros Fixes: 8acacc40f733 ("net: ethernet: ti: am65-cpsw: Add minimal XDP support") Link: https://patch.msgid.link/20250210-am65-cpsw-xdp-fixes-v1-2-ec6b1f7f1aca@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 5db843258de1e4e6b1ef1cbd1797923c9e3de548 Author: Roger Quadros Date: Mon Feb 10 16:52:15 2025 +0200 net: ethernet: ti: am65-cpsw: fix memleak in certain XDP cases If the XDP program doesn't result in XDP_PASS then we leak the memory allocated by am65_cpsw_build_skb(). It is pointless to allocate SKB memory before running the XDP program as we would be wasting CPU cycles for cases other than XDP_PASS. Move the SKB allocation after evaluating the XDP program result. This fixes the memleak. A performance boost is seen for XDP_DROP test. XDP_DROP test: Before: 460256 rx/s 0 err/s After: 784130 rx/s 0 err/s Fixes: 8acacc40f733 ("net: ethernet: ti: am65-cpsw: Add minimal XDP support") Signed-off-by: Roger Quadros Link: https://patch.msgid.link/20250210-am65-cpsw-xdp-fixes-v1-1-ec6b1f7f1aca@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 3011b29ec5a33ec16502e687c4264d57416a8b1f Author: Bibo Mao Date: Thu Feb 13 12:02:56 2025 +0800 LoongArch: KVM: Set host with kernel mode when switch to VM mode PRMD register is only meaningful on the beginning stage of exception entry, and it is overwritten with nested irq or exception. When CPU runs in VM mode, interrupt need be enabled on host. And the mode for host had better be kernel mode rather than random or user mode. When VM is running, the running mode with top command comes from CRMD register, and running mode should be kernel mode since kernel function is executing with perf command. It needs be consistent with both top and perf command. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen arch/loongarch/kvm/switch.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8cc4fee3f8ad21f83326ec8a6d200e04c8f0a00 Author: Bibo Mao Date: Thu Feb 13 12:02:56 2025 +0800 LoongArch: KVM: Remove duplicated cache attribute setting Cache attribute comes from GPA->HPA secondary mmu page table and is configured when kvm is enabled. It is the same for all VMs, so remove duplicated cache attribute setting on vCPU context switch. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen arch/loongarch/kvm/vcpu.c | 3 --- 1 file changed, 3 deletions(-) commit bdb13252e5d1518823b81f458d9975c85d5240c2 Author: Bibo Mao Date: Thu Feb 13 12:02:56 2025 +0800 LoongArch: KVM: Fix typo issue about GCFG feature detection This is typo issue and misusage about GCFG feature macro. The code is wrong, only that it does not cause obvious problem since GCFG is set again on vCPU context switch. Fixes: 0d0df3c99d4f ("LoongArch: KVM: Implement kvm hardware enable, disable interface") Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen arch/loongarch/kvm/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6287f1a8c16138c2ec750953e35039634018c84a Author: Yuli Wang Date: Thu Feb 13 12:02:40 2025 +0800 LoongArch: csum: Fix OoB access in IP checksum code for negative lengths Commit 69e3a6aa6be2 ("LoongArch: Add checksum optimization for 64-bit system") would cause an undefined shift and an out-of-bounds read. Commit 8bd795fedb84 ("arm64: csum: Fix OoB access in IP checksum code for negative lengths") fixes the same issue on ARM64. Fixes: 69e3a6aa6be2 ("LoongArch: Add checksum optimization for 64-bit system") Co-developed-by: Wentao Guan Signed-off-by: Wentao Guan Signed-off-by: Yuli Wang Signed-off-by: Huacai Chen arch/loongarch/lib/csum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b72cd9ef062702390fc96c469beea1729a5dffe Author: Yuli Wang Date: Thu Feb 13 12:02:40 2025 +0800 LoongArch: Remove the deprecated notifier hook mechanism The notifier hook mechanism in proc and cpuinfo is actually unnecessary for LoongArch because it's not used anywhere. It was originally added to the MIPS code in commit d6d3c9afaab4 ("MIPS: MT: proc: Add support for printing VPE and TC ids"), and LoongArch then inherited it. But as the kernel code stands now, this notifier hook mechanism doesn't really make sense for either LoongArch or MIPS. In addition, the seq_file forward declaration needs to be moved to its proper place, as only the show_ipi_list() function in smp.c requires it. Co-developed-by: Wentao Guan Signed-off-by: Wentao Guan Signed-off-by: Yuli Wang Signed-off-by: Huacai Chen arch/loongarch/include/asm/cpu-info.h | 21 --------------------- arch/loongarch/include/asm/smp.h | 2 ++ arch/loongarch/kernel/proc.c | 22 ---------------------- 3 files changed, 2 insertions(+), 43 deletions(-) commit 03a99d16e64fad41c8d39700bef9b0ac9c4e148b Author: Yuli Wang Date: Thu Feb 13 12:02:35 2025 +0800 LoongArch: Use str_yes_no() helper function for /proc/cpuinfo Remove hard-coded strings by using the str_yes_no() helper function. Similar to commit c4a0a4a45a45 ("MIPS: kernel: proc: Use str_yes_no() helper function"). Co-developed-by: Wentao Guan Signed-off-by: Wentao Guan Signed-off-by: Yuli Wang Signed-off-by: Huacai Chen arch/loongarch/kernel/proc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 619b52777a4972bdb6ddf86ac54c6f68a47b51c4 Author: Huacai Chen Date: Thu Feb 13 12:02:35 2025 +0800 LoongArch: Fix kernel_page_present() for KPRANGE/XKPRANGE Now kernel_page_present() always return true for KPRANGE/XKPRANGE addresses, this isn't correct because hibernation (ACPI S4) use it to distinguish whether a page is saveable. If all KPRANGE/XKPRANGE addresses are considered as saveable, then reserved memory such as EFI_RUNTIME_SERVICES_CODE / EFI_RUNTIME_SERVICES_DATA will also be saved and restored. Fix this by returning true only if the KPRANGE/XKPRANGE address is in memblock.memory. Signed-off-by: Huacai Chen arch/loongarch/mm/pageattr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit edb1942542bc538707cea221e9c7923a6270465f Author: Marco Crivellari Date: Thu Feb 13 12:02:35 2025 +0800 LoongArch: Fix idle VS timer enqueue LoongArch re-enables interrupts on its idle routine and performs a TIF_NEED_RESCHED check afterwards before putting the CPU to sleep. The IRQs firing between the check and the idle instruction may set the TIF_NEED_RESCHED flag. In order to deal with such a race, IRQs interrupting __arch_cpu_idle() rollback their return address to the beginning of __arch_cpu_idle() so that TIF_NEED_RESCHED is checked again before going back to sleep. However idle IRQs can also queue timers that may require a tick reprogramming through a new generic idle loop iteration but those timers would go unnoticed here because __arch_cpu_idle() only checks TIF_NEED_RESCHED. It doesn't check for pending timers. Fix this with fast-forwarding idle IRQs return address to the end of the idle routine instead of the beginning, so that the generic idle loop can handle both TIF_NEED_RESCHED and pending timers. Fixes: 0603839b18f4 ("LoongArch: Add exception/interrupt handling") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Frederic Weisbecker Signed-off-by: Marco Crivellari Signed-off-by: Huacai Chen arch/loongarch/kernel/genex.S | 28 +++++++++++++++------------- arch/loongarch/kernel/idle.c | 3 +-- arch/loongarch/kernel/reset.c | 6 +++--- 3 files changed, 19 insertions(+), 18 deletions(-) commit b698b9a8acc804e1b777aece0b3699850d736087 Merge: 15d6f74f03f8 440c9d488705 Author: Jakub Kicinski Date: Wed Feb 12 20:01:30 2025 -0800 Merge branch 'vsock-null-ptr-deref-when-so_linger-enabled' Michal Luczaj says: ==================== vsock: null-ptr-deref when SO_LINGER enabled syzbot pointed out that a recent patching of a use-after-free introduced a null-ptr-deref. This series fixes the problem and adds a test. v2: https://lore.kernel.org/20250206-vsock-linger-nullderef-v2-0-f8a1f19146f8@rbox.co v1: https://lore.kernel.org/20250204-vsock-linger-nullderef-v1-0-6eb1760fa93e@rbox.co ==================== Link: https://patch.msgid.link/20250210-vsock-linger-nullderef-v3-0-ef6244d02b54@rbox.co Signed-off-by: Jakub Kicinski commit 440c9d488705366b00372ea7213af69827a6c7af Author: Michal Luczaj Date: Mon Feb 10 13:15:01 2025 +0100 vsock/test: Add test for SO_LINGER null ptr deref Explicitly close() a TCP_ESTABLISHED (connectible) socket with SO_LINGER enabled. As for now, test does not verify if close() actually lingers. On an unpatched machine, may trigger a null pointer dereference. Tested-by: Luigi Leonardi Reviewed-by: Luigi Leonardi Reviewed-by: Stefano Garzarella Signed-off-by: Michal Luczaj Link: https://patch.msgid.link/20250210-vsock-linger-nullderef-v3-2-ef6244d02b54@rbox.co Signed-off-by: Jakub Kicinski tools/testing/vsock/vsock_test.c | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 78dafe1cf3afa02ed71084b350713b07e72a18fb Author: Michal Luczaj Date: Mon Feb 10 13:15:00 2025 +0100 vsock: Orphan socket after transport release During socket release, sock_orphan() is called without considering that it sets sk->sk_wq to NULL. Later, if SO_LINGER is enabled, this leads to a null pointer dereferenced in virtio_transport_wait_close(). Orphan the socket only after transport release. Partially reverts the 'Fixes:' commit. KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f] lock_acquire+0x19e/0x500 _raw_spin_lock_irqsave+0x47/0x70 add_wait_queue+0x46/0x230 virtio_transport_release+0x4e7/0x7f0 __vsock_release+0xfd/0x490 vsock_release+0x90/0x120 __sock_release+0xa3/0x250 sock_close+0x14/0x20 __fput+0x35e/0xa90 __x64_sys_close+0x78/0xd0 do_syscall_64+0x93/0x1b0 entry_SYSCALL_64_after_hwframe+0x76/0x7e Reported-by: syzbot+9d55b199192a4be7d02c@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=9d55b199192a4be7d02c Fixes: fcdd2242c023 ("vsock: Keep the binding until socket destruction") Tested-by: Luigi Leonardi Reviewed-by: Luigi Leonardi Signed-off-by: Michal Luczaj Link: https://patch.msgid.link/20250210-vsock-linger-nullderef-v3-1-ef6244d02b54@rbox.co Signed-off-by: Jakub Kicinski net/vmw_vsock/af_vsock.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 15d6f74f03f84c5b8d032bb1be6b90af82e5b679 Author: Marcelo Ricardo Leitner Date: Mon Feb 10 10:24:55 2025 -0300 MAINTAINERS: Add sctp headers to the general netdev entry All SCTP patches are picked up by netdev maintainers. Two headers were missing to be listed there. Reported-by: Thorsten Blum Signed-off-by: Marcelo Ricardo Leitner Reviewed-by: Simon Horman Link: https://patch.msgid.link/b3c2dc3a102eb89bd155abca2503ebd015f50ee0.1739193671.git.marcelo.leitner@gmail.com Signed-off-by: Jakub Kicinski MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 7229fa6b303cdaa3375b419a207b4d54c04c5b88 Merge: e589adf5b70c 63f20f00d23d Author: Jakub Kicinski Date: Wed Feb 12 19:53:03 2025 -0800 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-02-11 (idpf, ixgbe, igc) For idpf: Sridhar fixes a couple issues in handling of RSC packets. Josh adds a call to set_real_num_queues() to keep queue count in sync. For ixgbe: Piotr removes missed IS_ERR() removal when ERR_PTR usage was removed. For igc: Zdenek Bouska fixes reporting of Rx timestamp with AF_XDP. Siang sets buffer type on empty frame to ensure proper handling. * '200GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: igc: Set buffer type for empty frames in igc_init_empty_frame igc: Fix HW RX timestamp when passed by ZC XDP ixgbe: Fix possible skb NULL pointer dereference idpf: call set_real_num_queues in idpf_open idpf: record rx queue in skb for RSC packets idpf: fix handling rsc packet with a single segment ==================== Link: https://patch.msgid.link/20250211214343.4092496-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 1abb2648698bf10783d2236a6b4a7ca5e8021699 Author: Jiang Liu Date: Fri Feb 7 14:44:14 2025 +0800 drm/amdgpu: avoid buffer overflow attach in smu_sys_set_pp_table() It malicious user provides a small pptable through sysfs and then a bigger pptable, it may cause buffer overflow attack in function smu_sys_set_pp_table(). Reviewed-by: Lijo Lazar Signed-off-by: Jiang Liu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d584198a6fe4c51f4aa88ad72f258f8961a0f11c Author: Lancelot SIX Date: Tue Jan 28 19:16:49 2025 +0000 drm/amdkfd: Ensure consistent barrier state saved in gfx12 trap handler It is possible for some waves in a workgroup to finish their save sequence before the group leader has had time to capture the workgroup barrier state. When this happens, having those waves exit do impact the barrier state. As a consequence, the state captured by the group leader is invalid, and is eventually incorrectly restored. This patch proposes to have all waves in a workgroup wait for each other at the end of their save sequence (just before calling s_endpgm_saved). Signed-off-by: Lancelot SIX Reviewed-by: Jay Cornwall Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.12.x drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 3 ++- drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx12.asm | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit a0a455b4bc7483ad60e8b8a50330c1e05bb7bfcf Author: Jiang Liu Date: Fri Feb 7 14:28:51 2025 +0800 drm/amdgpu: bail out when failed to load fw in psp_init_cap_microcode() In function psp_init_cap_microcode(), it should bail out when failed to load firmware, otherwise it may cause invalid memory access. Fixes: 07dbfc6b102e ("drm/amd: Use `amdgpu_ucode_*` helpers for PSP") Reviewed-by: Lijo Lazar Signed-off-by: Jiang Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a33f7f9660705fb2ecf3467b2c48965564f392ce Author: Zhu Lingshan Date: Sun Jan 26 17:21:10 2025 +0800 amdkfd: properly free gang_ctx_bo when failed to init user queue The destructor of a gtt bo is declared as void amdgpu_amdkfd_free_gtt_mem(struct amdgpu_device *adev, void **mem_obj); Which takes void** as the second parameter. GCC allows passing void* to the function because void* can be implicitly casted to any other types, so it can pass compiling. However, passing this void* parameter into the function's execution process(which expects void** and dereferencing void**) will result in errors. Signed-off-by: Zhu Lingshan Reviewed-by: Felix Kuehling Fixes: fb91065851cd ("drm/amdkfd: Refactor queue wptr_bo GART mapping") Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55ed2b1b50d029dd7e49a35f6628ca64db6d75d8 Author: Alex Deucher Date: Fri Jan 31 13:53:40 2025 -0500 drm/amdgpu: bump version for RV/PCO compute fix Bump the driver version for RV/PCO compute stability fix so mesa can use this check to enable compute queues on RV/PCO. Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.12.x drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b35eb9128ebeec534eed1cefd6b9b1b7282cf5ba Author: Alex Deucher Date: Tue Jan 28 11:55:22 2025 -0500 drm/amdgpu/gfx9: manually control gfxoff for CS on RV When mesa started using compute queues more often we started seeing additional hangs with compute queues. Disabling gfxoff seems to mitigate that. Manually control gfxoff and gfx pg with command submissions to avoid any issues related to gfxoff. KFD already does the same thing for these chips. v2: limit to compute v3: limit to APUs v4: limit to Raven/PCO v5: only update the compute ring_funcs v6: Disable GFX PG v7: adjust order Reviewed-by: Lijo Lazar Suggested-by: Błażej Szczygieł Suggested-by: Sergey Kovalenko Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3861 Link: https://lists.freedesktop.org/archives/amd-gfx/2025-January/119116.html Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.12.x drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 36 +++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) commit 406e445b3c6be65ab0ee961145e74bfd7ef6c9e1 Author: Alan Huang Date: Wed Feb 12 17:27:51 2025 +0800 bcachefs: Reuse transaction bch2_nocow_write_convert_unwritten is already in transaction context: 00191 ========= TEST generic/648 00242 kernel BUG at fs/bcachefs/btree_iter.c:3332! 00242 Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP 00242 Modules linked in: 00242 CPU: 4 UID: 0 PID: 2593 Comm: fsstress Not tainted 6.13.0-rc3-ktest-g345af8f855b7 #14403 00242 Hardware name: linux,dummy-virt (DT) 00242 pstate: 60001005 (nZCv daif -PAN -UAO -TCO -DIT +SSBS BTYPE=--) 00242 pc : __bch2_trans_get+0x120/0x410 00242 lr : __bch2_trans_get+0xcc/0x410 00242 sp : ffffff80d89af600 00242 x29: ffffff80d89af600 x28: ffffff80ddb23000 x27: 00000000fffff705 00242 x26: ffffff80ddb23028 x25: ffffff80d8903fe0 x24: ffffff80ebb30168 00242 x23: ffffff80c8aeb500 x22: 000000000000005d x21: ffffff80d8904078 00242 x20: ffffff80d8900000 x19: ffffff80da9e8000 x18: 0000000000000000 00242 x17: 64747568735f6c61 x16: 6e72756f6a20726f x15: 0000000000000028 00242 x14: 0000000000000004 x13: 000000000000f787 x12: ffffffc081bbcdc8 00242 x11: 0000000000000000 x10: 0000000000000003 x9 : ffffffc08094efbc 00242 x8 : 000000001092c111 x7 : 000000000000000c x6 : ffffffc083c31fc4 00242 x5 : ffffffc083c31f28 x4 : ffffff80c8aeb500 x3 : ffffff80ebb30000 00242 x2 : 0000000000000001 x1 : 0000000000000a21 x0 : 000000000000028e 00242 Call trace: 00242 __bch2_trans_get+0x120/0x410 (P) 00242 bch2_inum_offset_err_msg+0x48/0xb0 00242 bch2_nocow_write_convert_unwritten+0x3d0/0x530 00242 bch2_nocow_write+0xeb0/0x1000 00242 __bch2_write+0x330/0x4e8 00242 bch2_write+0x1f0/0x530 00242 bch2_direct_write+0x530/0xc00 00242 bch2_write_iter+0x160/0xbe0 00242 vfs_write+0x1cc/0x360 00242 ksys_write+0x5c/0xf0 00242 __arm64_sys_write+0x20/0x30 00242 invoke_syscall.constprop.0+0x54/0xe8 00242 do_el0_svc+0x44/0xc0 00242 el0_svc+0x34/0xa0 00242 el0t_64_sync_handler+0x104/0x130 00242 el0t_64_sync+0x154/0x158 00242 Code: 6b01001f 54ffff01 79408460 3617fec0 (d4210000) 00242 ---[ end trace 0000000000000000 ]--- 00242 Kernel panic - not syncing: Oops - BUG: Fatal exception Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet fs/bcachefs/io_write.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 531323a2efc3fbe20b540e3f41ecc94d68e74b76 Author: Alan Huang Date: Thu Feb 13 02:11:01 2025 +0800 bcachefs: Pass _orig_restart_count to trans_was_restarted _orig_restart_count is unused now, according to the logic, trans_was_restarted should be using _orig_restart_count. Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet fs/bcachefs/btree_iter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cf6b84b71adb97f3c19476ebb5a42228fad89b5 Author: Kent Overstreet Date: Mon Sep 23 22:12:31 2024 -0400 bcachefs: CONFIG_BCACHEFS_INJECT_TRANSACTION_RESTARTS Incorrectly handled transaction restarts can be a source of heisenbugs; add a mode where we randomly inject them to shake them out. Signed-off-by: Kent Overstreet fs/bcachefs/Kconfig | 7 +++++++ fs/bcachefs/btree_iter.c | 33 ++++++++++++++++++++++++++++++++- fs/bcachefs/btree_iter.h | 12 ++++++++++++ fs/bcachefs/btree_trans_commit.c | 4 ++++ fs/bcachefs/btree_types.h | 3 +++ 5 files changed, 58 insertions(+), 1 deletion(-) commit 960a62877466067adc89bd37fe36d3b6edddb965 Author: Alex Deucher Date: Mon Feb 10 18:18:29 2025 -0500 drm/amdgpu/pm: fix UVD handing in amdgpu_dpm_set_powergating_by_smu() UVD and VCN were split into separate dpm helpers in commit ff69bba05f08 ("drm/amd/pm: add inst to dpm_set_powergating_by_smu") as such, there is no need to include UVD in the is_vcn variable since UVD and VCN are handled by separate dpm helpers now. Fix the check. Fixes: ff69bba05f08 ("drm/amd/pm: add inst to dpm_set_powergating_by_smu") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3959 Link: https://lists.freedesktop.org/archives/amd-gfx/2025-February/119827.html Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: Boyuan Zhang drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b4fc4cd43f28e9e39179c8702e6ee821258584d Author: Jens Axboe Date: Wed Feb 12 15:52:54 2025 -0700 io_uring/waitid: setup async data in the prep handler This is the idiomatic way that opcodes should setup their async data, so that it's always valid inside ->issue() without issue needing to do that. Fixes: f31ecf671ddc4 ("io_uring: add IORING_OP_WAITID support") Signed-off-by: Jens Axboe io_uring/waitid.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 96178631c3f53398044ed437010f7632ad764bf8 Author: Johannes Berg Date: Fri Jan 10 13:54:06 2025 +0100 um: convert irq_lock to raw spinlock Since this is deep in the architecture, and the code is called nested into other deep management code, this really needs to be a raw spinlock. Convert it. Link: https://patch.msgid.link/20250110125550.32479-8-johannes@sipsolutions.net Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/kernel/irq.c | 79 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 32 deletions(-) commit daa1a05ba431540097ec925d4e01d53ef29a98f1 Author: Johannes Berg Date: Fri Jan 10 13:54:05 2025 +0100 um: virtio_uml: use raw spinlock This is needed because at least in time-travel the code can be called directly from the deep architecture and IRQ handling code. Link: https://patch.msgid.link/20250110125550.32479-7-johannes@sipsolutions.net Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/drivers/virtio_uml.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5b166b782d327f4b66190cc43afd3be36f2b3b7a Author: Johannes Berg Date: Fri Jan 10 13:54:04 2025 +0100 um: virt-pci: don't use kmalloc() This code can be called deep in the IRQ handling, for example, and then cannot normally use kmalloc(). Have its own pre-allocated memory and use from there instead so this doesn't occur. Only in the (very rare) case of memcpy_toio() we'd still need to allocate memory. Link: https://patch.msgid.link/20250110125550.32479-6-johannes@sipsolutions.net Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/drivers/virt-pci.c | 198 +++++++++++++++++++++++---------------------- 1 file changed, 102 insertions(+), 96 deletions(-) commit f82a9e7b9fa922bb9cccb00aae684a27b79e6df7 Author: Benjamin Berg Date: Mon Jan 13 10:41:07 2025 +0100 um: fix execve stub execution on old host OSs The stub execution uses the somewhat new close_range and execveat syscalls. Of these two, the execveat call is essential, but the close_range call is more about stub process hygiene rather than safety (and its result is ignored). Replace both calls with a raw syscall as older machines might not have a recent enough kernel for close_range (with CLOSE_RANGE_CLOEXEC) or a libc that does not yet expose both of the syscalls. Fixes: 32e8eaf263d9 ("um: use execveat to create userspace MMs") Reported-by: Glenn Washburn Closes: https://lore.kernel.org/20250108022404.05e0de1e@crass-HP-ZBook-15-G2 Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250113094107.674738-1-benjamin@sipsolutions.net Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/os-Linux/skas/process.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 3c2fc7434d90338cf4c1b37bc95994208d23bfc6 Author: Benjamin Berg Date: Tue Jan 7 14:35:09 2025 +0100 um: properly align signal stack on x86_64 The stack needs to be properly aligned so 16 byte memory accesses on the stack are correct. This was broken when introducing the dynamic math register sizing as the rounding was not moved appropriately. Fixes: 3f17fed21491 ("um: switch to regset API and depend on XSTATE") Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20250107133509.265576-1-benjamin@sipsolutions.net Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/x86/um/signal.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 8891b176d350ec5ea9a39c6ef4c99bd63d68e64c Author: Benjamin Berg Date: Tue Dec 17 21:27:44 2024 +0100 um: avoid copying FP state from init_task The init_task instance of struct task_struct is statically allocated and does not contain the dynamic area for the userspace FP registers. As such, limit the copy to the valid area of init_task and fill the rest with zero. Note that the FP state is only needed for userspace, and as such it is entirely reasonable for init_task to not contain it. Reported-by: Brian Norris Closes: https://lore.kernel.org/Z1ySXmjZm-xOqk90@google.com Fixes: 3f17fed21491 ("um: switch to regset API and depend on XSTATE") Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20241217202745.1402932-3-benjamin@sipsolutions.net Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/kernel/process.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 5298b7cffa8461009a4410f4e23f1c50ade39182 Author: Benjamin Berg Date: Wed Dec 4 08:48:27 2024 +0100 um: add back support for FXSAVE registers It was reported that qemu may not enable the XSTATE CPU extension, which is a requirement after commit 3f17fed21491 ("um: switch to regset API and depend on XSTATE"). Add a fallback to use FXSAVE (FP registers on x86_64 and XFP on i386) which is just a shorter version of the same data. The only difference is that the XSTATE magic should not be set in the signal frame. Note that this still drops support for the older i386 FP register layout as supporting this would require more backward compatibility to build a correct signal frame. Fixes: 3f17fed21491 ("um: switch to regset API and depend on XSTATE") Reported-by: SeongJae Park Closes: https://lore.kernel.org/r/20241203070218.240797-1-sj@kernel.org Tested-by: SeongJae Park Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20241204074827.1582917-1-benjamin@sipsolutions.net Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/x86/um/os-Linux/registers.c | 21 ++++++++++++++++++--- arch/x86/um/signal.c | 5 +++++ 2 files changed, 23 insertions(+), 3 deletions(-) commit 0edf1283a9d1419a2095b4fcdd95c11ac00a191c Author: Jens Axboe Date: Wed Feb 12 14:05:11 2025 -0700 io_uring/uring_cmd: remove dead req_has_async_data() check Any uring_cmd always has async data allocated now, there's no reason to check and clear a cached copy of the SQE. Fixes: d10f19dff56e ("io_uring/uring_cmd: switch to always allocating async data") Signed-off-by: Jens Axboe io_uring/uring_cmd.c | 3 --- 1 file changed, 3 deletions(-) commit 2e4f982cf392af2f1282b5537a72144e064799e3 Author: Miguel Ojeda Date: Fri Feb 7 00:20:22 2025 +0100 rust: rbtree: fix overindented list item Starting with Rust 1.86.0 (to be released 2025-04-03), Clippy will have a new lint, `doc_overindented_list_items` [1], which catches cases of overindented list items. The lint has been added by Yutaro Ohno, based on feedback from the kernel [2] on a patch that fixed a similar case -- commit 0c5928deada1 ("rust: block: fix formatting in GenDisk doc"). Clippy reports a few cases in the kernel, apart from the one already fixed in the commit above. One is this one: error: doc list item overindented --> rust/kernel/rbtree.rs:1152:5 | 1152 | /// null, it is a pointer to the root of the [`RBTree`]. | ^^^^ help: try using ` ` (2 spaces) | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items = note: `-D clippy::doc-overindented-list-items` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::doc_overindented_list_items)]` Thus clean it up. Cc: Yutaro Ohno Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Fixes: a335e9591404 ("rust: rbtree: add `RBTree::entry`") Link: https://github.com/rust-lang/rust-clippy/pull/13711 [1] Link: https://github.com/rust-lang/rust-clippy/issues/13601 [2] Reviewed-by: Alice Ryhl Reviewed-by: Yutaro Ohno Link: https://lore.kernel.org/r/20250206232022.599998-1-ojeda@kernel.org [ There are a few other cases, so updated message. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/rbtree.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cee6f9a9c87b6ecfb51845950c28216b231c3610 Author: Miguel Ojeda Date: Sun Jan 12 15:39:51 2025 +0100 objtool/rust: add one more `noreturn` Rust function Starting with Rust 1.85.0 (currently in beta, to be released 2025-02-20), under some kernel configurations with `CONFIG_RUST_DEBUG_ASSERTIONS=y`, one may trigger a new `objtool` warning: rust/kernel.o: warning: objtool: _R...securityNtB2_11SecurityCtx8as_bytes() falls through to next function _R...core3ops4drop4Drop4drop() due to a call to the `noreturn` symbol: core::panicking::assert_failed:: Thus add it to the list so that `objtool` knows it is actually `noreturn`. Do so matching with `strstr` since it is a generic. See commit 56d680dd23c3 ("objtool/rust: list `noreturn` Rust functions") for more details. Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Fixes: 56d680dd23c3 ("objtool/rust: list `noreturn` Rust functions") Reviewed-by: Gary Guo Link: https://lore.kernel.org/r/20250112143951.751139-1-ojeda@kernel.org [ Updated Cc: stable@ to include 6.13.y. - Miguel ] Signed-off-by: Miguel Ojeda tools/objtool/check.c | 1 + 1 file changed, 1 insertion(+) commit 4dc1d1bec89864d8076e5ab314f86f46442bfb02 Merge: 09fbf3d50205 5728c92ae112 Author: Linus Torvalds Date: Wed Feb 12 14:22:37 2025 -0800 Merge tag 'mfd-fixes-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD fix from Lee Jones: - Fix syscon users not specifying the "syscon" compatible * tag 'mfd-fixes-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: mfd: syscon: Restore device_node_to_regmap() for non-syscon nodes commit 472ff48e2c09e49f2f90eeb6922f747306559506 Author: Alex Williamson Date: Wed Feb 12 11:53:32 2025 -0700 PCI: Fix BUILD_BUG_ON usage for old gcc As reported in the below link, it seems older versions of gcc cannot determine that the howmany variable is known for all callers. Include a test so that newer compilers can enforce this sanity check and older compilers can still work. Add __always_inline attribute to give the compiler an even better chance to know the inputs. Link: https://lore.kernel.org/r/20250212185337.293023-1-alex.williamson@redhat.com Fixes: 4453f360862e ("PCI: Batch BAR sizing operations") Reported-by: Oleg Nesterov Link: https://lore.kernel.org/all/20250209154512.GA18688@redhat.com Signed-off-by: Alex Williamson Signed-off-by: Bjorn Helgaas Tested-by: Oleg Nesterov Tested-by: Mitchell Augustin drivers/pci/probe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e663da62ba8672aaa66843f1af8b20e3bb1a0515 Author: Caleb Sander Mateos Date: Wed Feb 12 13:45:46 2025 -0700 io_uring/uring_cmd: switch sqe to async_data on EAGAIN 5eff57fa9f3a ("io_uring/uring_cmd: defer SQE copying until it's needed") moved the unconditional memcpy() of the uring_cmd SQE to async_data to 2 cases when the request goes async: - If REQ_F_FORCE_ASYNC is set to force the initial issue to go async - If ->uring_cmd() returns -EAGAIN in the initial non-blocking issue Unlike the REQ_F_FORCE_ASYNC case, in the EAGAIN case, io_uring_cmd() copies the SQE to async_data but neglects to update the io_uring_cmd's sqe field to point to async_data. As a result, sqe still points to the slot in the userspace-mapped SQ. At the end of io_submit_sqes(), the kernel advances the SQ head index, allowing userspace to reuse the slot for a new SQE. If userspace reuses the slot before the io_uring worker reissues the original SQE, the io_uring_cmd's SQE will be corrupted. Introduce a helper io_uring_cmd_cache_sqes() to copy the original SQE to the io_uring_cmd's async_data and point sqe there. Use it for both the REQ_F_FORCE_ASYNC and EAGAIN cases. This ensures the uring_cmd doesn't read from the SQ slot after it has been returned to userspace. Signed-off-by: Caleb Sander Mateos Fixes: 5eff57fa9f3a ("io_uring/uring_cmd: defer SQE copying until it's needed") Link: https://lore.kernel.org/r/20250212204546.3751645-3-csander@purestorage.com Signed-off-by: Jens Axboe io_uring/uring_cmd.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 34cae91215c6f65bed2a124fb9283da6ec0b8dd9 Author: Caleb Sander Mateos Date: Wed Feb 12 13:45:45 2025 -0700 io_uring/uring_cmd: don't assume io_uring_cmd_data layout eaf72f7b414f ("io_uring/uring_cmd: cleanup struct io_uring_cmd_data layout") removed most of the places assuming struct io_uring_cmd_data has sqes as its first field. However, the EAGAIN case in io_uring_cmd() still compares ioucmd->sqe to the struct io_uring_cmd_data pointer using a void * cast. Since fa3595523d72 ("io_uring: get rid of alloc cache init_once handling"), sqes is no longer io_uring_cmd_data's first field. As a result, the pointers will always compare unequal and memcpy() may be called with the same source and destination. Replace the incorrect void * cast with the address of the sqes field. Signed-off-by: Caleb Sander Mateos Fixes: eaf72f7b414f ("io_uring/uring_cmd: cleanup struct io_uring_cmd_data layout") Link: https://lore.kernel.org/r/20250212204546.3751645-2-csander@purestorage.com Signed-off-by: Jens Axboe io_uring/uring_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2fee09fc167c74a64adb08656cb993ea475197e Author: Sean Christopherson Date: Fri Jan 24 17:18:33 2025 -0800 KVM: x86: Load DR6 with guest value only before entering .vcpu_run() loop Move the conditional loading of hardware DR6 with the guest's DR6 value out of the core .vcpu_run() loop to fix a bug where KVM can load hardware with a stale vcpu->arch.dr6. When the guest accesses a DR and host userspace isn't debugging the guest, KVM disables DR interception and loads the guest's values into hardware on VM-Enter and saves them on VM-Exit. This allows the guest to access DRs at will, e.g. so that a sequence of DR accesses to configure a breakpoint only generates one VM-Exit. For DR0-DR3, the logic/behavior is identical between VMX and SVM, and also identical between KVM_DEBUGREG_BP_ENABLED (userspace debugging the guest) and KVM_DEBUGREG_WONT_EXIT (guest using DRs), and so KVM handles loading DR0-DR3 in common code, _outside_ of the core kvm_x86_ops.vcpu_run() loop. But for DR6, the guest's value doesn't need to be loaded into hardware for KVM_DEBUGREG_BP_ENABLED, and SVM provides a dedicated VMCB field whereas VMX requires software to manually load the guest value, and so loading the guest's value into DR6 is handled by {svm,vmx}_vcpu_run(), i.e. is done _inside_ the core run loop. Unfortunately, saving the guest values on VM-Exit is initiated by common x86, again outside of the core run loop. If the guest modifies DR6 (in hardware, when DR interception is disabled), and then the next VM-Exit is a fastpath VM-Exit, KVM will reload hardware DR6 with vcpu->arch.dr6 and clobber the guest's actual value. The bug shows up primarily with nested VMX because KVM handles the VMX preemption timer in the fastpath, and the window between hardware DR6 being modified (in guest context) and DR6 being read by guest software is orders of magnitude larger in a nested setup. E.g. in non-nested, the VMX preemption timer would need to fire precisely between #DB injection and the #DB handler's read of DR6, whereas with a KVM-on-KVM setup, the window where hardware DR6 is "dirty" extends all the way from L1 writing DR6 to VMRESUME (in L1). L1's view: ========== CPU 0/KVM-7289 [023] d.... 2925.640961: kvm_entry: vcpu 0 A: L1 Writes DR6 CPU 0/KVM-7289 [023] d.... 2925.640963: : Set DRs, DR6 = 0xffff0ff1 B: CPU 0/KVM-7289 [023] d.... 2925.640967: kvm_exit: vcpu 0 reason EXTERNAL_INTERRUPT intr_info 0x800000ec D: L1 reads DR6, arch.dr6 = 0 CPU 0/KVM-7289 [023] d.... 2925.640969: : Sync DRs, DR6 = 0xffff0ff0 CPU 0/KVM-7289 [023] d.... 2925.640976: kvm_entry: vcpu 0 L2 reads DR6, L1 disables DR interception CPU 0/KVM-7289 [023] d.... 2925.640980: kvm_exit: vcpu 0 reason DR_ACCESS info1 0x0000000000000216 CPU 0/KVM-7289 [023] d.... 2925.640983: kvm_entry: vcpu 0 CPU 0/KVM-7289 [023] d.... 2925.640983: : Set DRs, DR6 = 0xffff0ff0 L2 detects failure CPU 0/KVM-7289 [023] d.... 2925.640987: kvm_exit: vcpu 0 reason HLT L1 reads DR6 (confirms failure) CPU 0/KVM-7289 [023] d.... 2925.640990: : Sync DRs, DR6 = 0xffff0ff0 L0's view: ========== L2 reads DR6, arch.dr6 = 0 CPU 23/KVM-5046 [001] d.... 3410.005610: kvm_exit: vcpu 23 reason DR_ACCESS info1 0x0000000000000216 CPU 23/KVM-5046 [001] ..... 3410.005610: kvm_nested_vmexit: vcpu 23 reason DR_ACCESS info1 0x0000000000000216 L2 => L1 nested VM-Exit CPU 23/KVM-5046 [001] ..... 3410.005610: kvm_nested_vmexit_inject: reason: DR_ACCESS ext_inf1: 0x0000000000000216 CPU 23/KVM-5046 [001] d.... 3410.005610: kvm_entry: vcpu 23 CPU 23/KVM-5046 [001] d.... 3410.005611: kvm_exit: vcpu 23 reason VMREAD CPU 23/KVM-5046 [001] d.... 3410.005611: kvm_entry: vcpu 23 CPU 23/KVM-5046 [001] d.... 3410.005612: kvm_exit: vcpu 23 reason VMREAD CPU 23/KVM-5046 [001] d.... 3410.005612: kvm_entry: vcpu 23 L1 writes DR7, L0 disables DR interception CPU 23/KVM-5046 [001] d.... 3410.005612: kvm_exit: vcpu 23 reason DR_ACCESS info1 0x0000000000000007 CPU 23/KVM-5046 [001] d.... 3410.005613: kvm_entry: vcpu 23 L0 writes DR6 = 0 (arch.dr6) CPU 23/KVM-5046 [001] d.... 3410.005613: : Set DRs, DR6 = 0xffff0ff0 A: B: CPU 23/KVM-5046 [001] d.... 3410.005614: kvm_exit: vcpu 23 reason PREEMPTION_TIMER CPU 23/KVM-5046 [001] d.... 3410.005614: kvm_entry: vcpu 23 C: L0 writes DR6 = 0 (arch.dr6) CPU 23/KVM-5046 [001] d.... 3410.005614: : Set DRs, DR6 = 0xffff0ff0 L1 => L2 nested VM-Enter CPU 23/KVM-5046 [001] d.... 3410.005616: kvm_exit: vcpu 23 reason VMRESUME L0 reads DR6, arch.dr6 = 0 Reported-by: John Stultz Closes: https://lkml.kernel.org/r/CANDhNCq5_F3HfFYABqFGCA1bPd_%2BxgNj-iDQhH4tDk%2Bwi8iZZg%40mail.gmail.com Fixes: 375e28ffc0cf ("KVM: X86: Set host DR6 only on VMX and for KVM_DEBUGREG_WONT_EXIT") Fixes: d67668e9dd76 ("KVM: x86, SVM: isolate vcpu->arch.dr6 from vmcb->save.dr6") Cc: stable@vger.kernel.org Cc: Jim Mattson Tested-by: John Stultz Link: https://lore.kernel.org/r/20250125011833.3644371-1-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/include/asm/kvm-x86-ops.h | 1 + arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/svm/svm.c | 13 ++++++------- arch/x86/kvm/vmx/main.c | 1 + arch/x86/kvm/vmx/vmx.c | 10 ++++++---- arch/x86/kvm/vmx/x86_ops.h | 1 + arch/x86/kvm/x86.c | 3 +++ 7 files changed, 19 insertions(+), 11 deletions(-) commit 46d6c6f3ef0eaff71c2db6d77d4e2ebb7adac34f Author: Sean Christopherson Date: Wed Jan 29 17:08:25 2025 -0800 KVM: nSVM: Enter guest mode before initializing nested NPT MMU When preparing vmcb02 for nested VMRUN (or state restore), "enter" guest mode prior to initializing the MMU for nested NPT so that guest_mode is set in the MMU's role. KVM's model is that all L2 MMUs are tagged with guest_mode, as the behavior of hypervisor MMUs tends to be significantly different than kernel MMUs. Practically speaking, the bug is relatively benign, as KVM only directly queries role.guest_mode in kvm_mmu_free_guest_mode_roots() and kvm_mmu_page_ad_need_write_protect(), which SVM doesn't use, and in paths that are optimizations (mmu_page_zap_pte() and shadow_mmu_try_split_huge_pages()). And while the role is incorprated into shadow page usage, because nested NPT requires KVM to be using NPT for L1, reusing shadow pages across L1 and L2 is impossible as L1 MMUs will always have direct=1, while L2 MMUs will have direct=0. Hoist the TLB processing and setting of HF_GUEST_MASK to the beginning of the flow instead of forcing guest_mode in the MMU, as nothing in nested_vmcb02_prepare_control() between the old and new locations touches TLB flush requests or HF_GUEST_MASK, i.e. there's no reason to present inconsistent vCPU state to the MMU. Fixes: 69cb877487de ("KVM: nSVM: move MMU setup to nested_prepare_vmcb_control") Cc: stable@vger.kernel.org Reported-by: Yosry Ahmed Reviewed-by: Yosry Ahmed Link: https://lore.kernel.org/r/20250130010825.220346-1-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/mmu/mmu.c | 2 +- arch/x86/kvm/svm/nested.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit e36454461c5ebe6372952560b2abad5dc9ac579d Author: Sean Christopherson Date: Fri Jan 17 16:34:54 2025 -0800 KVM: selftests: Add CPUID tests for Hyper-V features that need in-kernel APIC Add testcases to x86's Hyper-V CPUID test to verify that KVM advertises support for features that require an in-kernel local APIC appropriately, i.e. that KVM hides support from the vCPU-scoped ioctl if the VM doesn't have an in-kernel local APIC. Cc: Vitaly Kuznetsov Reviewed-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20250118003454.2619573-5-seanjc@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/x86/hyperv_cpuid.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit cd5a0c2f0faeb4a3fab3b78f6693a2d55ee51efa Author: Sean Christopherson Date: Fri Jan 17 16:34:53 2025 -0800 KVM: selftests: Manage CPUID array in Hyper-V CPUID test's core helper Allocate, get, and free the CPUID array in the Hyper-V CPUID test in the test's core helper, instead of copy+pasting code at each call site. In addition to deduplicating a small amount of code, restricting visibility of the array to a single invocation of the core test prevents "leaking" an array across test cases. Passing in @vcpu to the helper will also allow pivoting on VM-scoped information without needing to pass more booleans, e.g. to conditionally assert on features that require an in-kernel APIC. To avoid use-after-free bugs due to overzealous and careless developers, opportunstically add a comment to explain that the system-scoped helper caches the Hyper-V CPUID entries, i.e. that the caller is not responsible for freeing the memory. Cc: Vitaly Kuznetsov Reviewed-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20250118003454.2619573-4-seanjc@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/x86/hyperv_cpuid.c | 30 +++++++++++++++----------- 1 file changed, 17 insertions(+), 13 deletions(-) commit 0b6db0dc43eefb4f89181546785c3609fd276524 Author: Sean Christopherson Date: Fri Jan 17 16:34:52 2025 -0800 KVM: selftests: Mark test_hv_cpuid_e2big() static in Hyper-V CPUID test Make the Hyper-V CPUID test's local helper test_hv_cpuid_e2big() static, it's not used outside of the test (and isn't intended to be). Reviewed-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20250118003454.2619573-3-seanjc@google.com Signed-off-by: Sean Christopherson tools/testing/selftests/kvm/x86/hyperv_cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8de7f100bb5989d9c3627d3a223ee1c863f3b69 Author: Sean Christopherson Date: Fri Jan 17 16:34:51 2025 -0800 KVM: x86: Reject Hyper-V's SEND_IPI hypercalls if local APIC isn't in-kernel Advertise support for Hyper-V's SEND_IPI and SEND_IPI_EX hypercalls if and only if the local API is emulated/virtualized by KVM, and explicitly reject said hypercalls if the local APIC is emulated in userspace, i.e. don't rely on userspace to opt-in to KVM_CAP_HYPERV_ENFORCE_CPUID. Rejecting SEND_IPI and SEND_IPI_EX fixes a NULL-pointer dereference if Hyper-V enlightenments are exposed to the guest without an in-kernel local APIC: dump_stack+0xbe/0xfd __kasan_report.cold+0x34/0x84 kasan_report+0x3a/0x50 __apic_accept_irq+0x3a/0x5c0 kvm_hv_send_ipi.isra.0+0x34e/0x820 kvm_hv_hypercall+0x8d9/0x9d0 kvm_emulate_hypercall+0x506/0x7e0 __vmx_handle_exit+0x283/0xb60 vmx_handle_exit+0x1d/0xd0 vcpu_enter_guest+0x16b0/0x24c0 vcpu_run+0xc0/0x550 kvm_arch_vcpu_ioctl_run+0x170/0x6d0 kvm_vcpu_ioctl+0x413/0xb20 __se_sys_ioctl+0x111/0x160 do_syscal1_64+0x30/0x40 entry_SYSCALL_64_after_hwframe+0x67/0xd1 Note, checking the sending vCPU is sufficient, as the per-VM irqchip_mode can't be modified after vCPUs are created, i.e. if one vCPU has an in-kernel local APIC, then all vCPUs have an in-kernel local APIC. Reported-by: Dongjie Zou Fixes: 214ff83d4473 ("KVM: x86: hyperv: implement PV IPI send hypercalls") Fixes: 2bc39970e932 ("x86/kvm/hyper-v: Introduce KVM_GET_SUPPORTED_HV_CPUID") Cc: stable@vger.kernel.org Reviewed-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20250118003454.2619573-2-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/hyperv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8802766324e1f5d414a81ac43365c20142e85603 Author: Pavel Begunkov Date: Wed Feb 12 13:46:46 2025 +0000 io_uring/kbuf: reallocate buf lists on upgrade IORING_REGISTER_PBUF_RING can reuse an old struct io_buffer_list if it was created for legacy selected buffer and has been emptied. It violates the requirement that most of the field should stay stable after publish. Always reallocate it instead. Cc: stable@vger.kernel.org Reported-by: Pumpkin Chang Fixes: 2fcabce2d7d34 ("io_uring: disallow mixed provided buffer group registrations") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe io_uring/kbuf.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 06521ac0485effdcc9c792cb0b40ed8e6f2f5fb8 Author: Pavel Begunkov Date: Wed Feb 12 13:33:24 2025 +0000 io_uring/waitid: don't abuse io_tw_state struct io_tw_state is managed by core io_uring, and opcode handling code must never try to cheat and create their own instances, it's plain incorrect. io_waitid_complete() attempts exactly that outside of the task work context, and even though the ring is locked, there would be no one to reap the requests from the defer completion list. It only works now because luckily it's called before io_uring_try_cancel_uring_cmd(), which flushes completions. Fixes: f31ecf671ddc4 ("io_uring: add IORING_OP_WAITID support") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe io_uring/waitid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e977499820782ab1c69f354d9f41b6d9ad1f43d9 Author: Nirmoy Das Date: Mon Feb 10 15:36:54 2025 +0100 drm/xe: Carve out wopcm portion from the stolen memory The top of stolen memory is WOPCM, which shouldn't be accessed. Remove this portion from the stolen memory region for discrete platforms. This was already done for integrated, but was missing for discrete platforms. This also moves get_wopcm_size() so detect_bar2_dgfx() and detect_bar2_integrated can use the same function. v2: Improve commit message and suitable stable version tag(Lucas) Fixes: d8b52a02cb40 ("drm/xe: Implement stolen memory.") Cc: Maarten Lankhorst Cc: Matthew Auld Cc: Lucas De Marchi Cc: stable@vger.kernel.org # v6.11+ Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20250210143654.2076747-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das (cherry picked from commit 2c7f45cc7e197a792ce5c693e56ea48f60b312da) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c | 54 +++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 24 deletions(-) commit b3e127dacad60a384c92baafdc74f1508bf7dd47 Author: Mark Pearson Date: Tue Feb 11 12:36:11 2025 -0500 platform/x86: thinkpad_acpi: Fix registration of tpacpi platform driver The recent platform profile changes prevent the tpacpi platform driver from registering. This error is seen in the kernel logs, and the various tpacpi entries are not created: [ 7550.642171] platform thinkpad_acpi: Resources present before probing This happens because devm_platform_profile_register() is called before tpacpi_pdev probes (thanks to Kurt Borja for identifying the root cause). For now revert back to the old platform_profile_register to fix the issue. This is quick fix and will be re-implemented later as more testing is needed for full solution. Tested on X1 Carbon G12. Fixes: 31658c916fa6 ("platform/x86: thinkpad_acpi: Use devm_platform_profile_register()") Signed-off-by: Mark Pearson Reviewed-by: Kurt Borja Link: https://lore.kernel.org/r/20250211173620.16522-1-mpearson-lenovo@squebb.ca Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/thinkpad_acpi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 240189294fbc9550f5cd7ae9b446ad3cf3c5386a Merge: a64dcfb451e2 890ed45bde80 Author: Christian Brauner Date: Wed Feb 12 12:24:28 2025 +0100 Merge patch series "acct: don't allow access to internal filesystems" Christian Brauner says: In [1] it was reported that the acct(2) system call can be used to trigger a NULL deref in cases where it is set to write to a file that triggers an internal lookup. This can e.g., happen when pointing acct(2) to /sys/power/resume. At the point the where the write to this file happens the calling task has already exited and called exit_fs() but an internal lookup might be triggered through lookup_bdev(). This may trigger a NULL-deref when accessing current->fs. This series does two things: - Reorganize the code so that the the final write happens from the workqueue but with the caller's credentials. This preserves the (strange) permission model and has almost no regression risk. - Block access to kernel internal filesystems as well as procfs and sysfs in the first place. This api should stop to exist imho. Link: https://lore.kernel.org/r/20250127091811.3183623-1-quzicheng@huawei.com [1] * patches from https://lore.kernel.org/r/20250211-work-acct-v1-0-1c16aecab8b3@kernel.org: acct: block access to kernel internal filesystems acct: perform last write from workqueue Link: https://lore.kernel.org/r/20250211-work-acct-v1-0-1c16aecab8b3@kernel.org Signed-off-by: Christian Brauner commit 890ed45bde808c422c3c27d3285fc45affa0f930 Author: Christian Brauner Date: Tue Feb 11 18:16:00 2025 +0100 acct: block access to kernel internal filesystems There's no point in allowing anything kernel internal nor procfs or sysfs. Link: https://lore.kernel.org/r/20250127091811.3183623-1-quzicheng@huawei.com Link: https://lore.kernel.org/r/20250211-work-acct-v1-2-1c16aecab8b3@kernel.org Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reviewed-by: Amir Goldstein Reported-by: Zicheng Qu Cc: stable@vger.kernel.org Signed-off-by: Christian Brauner kernel/acct.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 56d5f3eba3f5de0efdd556de4ef381e109b973a9 Author: Christian Brauner Date: Tue Feb 11 18:15:59 2025 +0100 acct: perform last write from workqueue In [1] it was reported that the acct(2) system call can be used to trigger NULL deref in cases where it is set to write to a file that triggers an internal lookup. This can e.g., happen when pointing acc(2) to /sys/power/resume. At the point the where the write to this file happens the calling task has already exited and called exit_fs(). A lookup will thus trigger a NULL-deref when accessing current->fs. Reorganize the code so that the the final write happens from the workqueue but with the caller's credentials. This preserves the (strange) permission model and has almost no regression risk. This api should stop to exist though. Link: https://lore.kernel.org/r/20250127091811.3183623-1-quzicheng@huawei.com [1] Link: https://lore.kernel.org/r/20250211-work-acct-v1-1-1c16aecab8b3@kernel.org Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Zicheng Qu Cc: stable@vger.kernel.org Signed-off-by: Christian Brauner kernel/acct.c | 120 ++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 70 insertions(+), 50 deletions(-) commit b9644fbfbcab13da7f8b37bef7c51e5b8407d031 Author: Wentao Liang Date: Wed Feb 12 10:18:49 2025 +0800 gpio: stmpe: Check return value of stmpe_reg_read in stmpe_gpio_irq_sync_unlock The stmpe_reg_read function can fail, but its return value is not checked in stmpe_gpio_irq_sync_unlock. This can lead to silent failures and incorrect behavior if the hardware access fails. This patch adds checks for the return value of stmpe_reg_read. If the function fails, an error message is logged and the function returns early to avoid further issues. Fixes: b888fb6f2a27 ("gpio: stmpe: i2c transfer are forbiden in atomic context") Cc: stable@vger.kernel.org # 4.16+ Signed-off-by: Wentao Liang Link: https://lore.kernel.org/r/20250212021849.275-1-vulab@iscas.ac.cn Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-stmpe.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit cf56aa8dd26328a9af4ffe7fb0bd8fcfa9407112 Author: Pablo Neira Ayuso Date: Fri Feb 7 13:25:57 2025 +0100 Revert "netfilter: flowtable: teardown flow if cached mtu is stale" This reverts commit b8baac3b9c5cc4b261454ff87d75ae8306016ffd. IPv4 packets with no DF flag set on result in frequent flow entry teardown cycles, this is visible in the network topology that is used in the nft_flowtable.sh test. nft_flowtable.sh test ocassionally fails reporting that the dscp_fwd test sees no packets going through the flowtable path. Fixes: b8baac3b9c5c ("netfilter: flowtable: teardown flow if cached mtu is stale") Reported-by: Jakub Kicinski Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_flow_table_ip.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit e45e07c16743b9e1ee8b43e4ca59998ff7feacb1 Merge: a64dcfb451e2 cc2c3540d947 Author: Greg Kroah-Hartman Date: Wed Feb 12 10:26:17 2025 +0100 Merge tag 'iio-fixes-for-6.14a' 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.14 cycle hid-sensors - Fix an ABI issue that occurred when we gained multiple proximity sensor support. adi,adi-axi-adc - Fix missing pwm-names inItems entry in dt binding. adi,ad3552r - Make sure to clear the reset bit in the status flag so future resets can be detected. adi,ad7192 - Fix use of value where it should be bit(value) to select channel. adi,ad7606 - Fix up reporting of wrong available scales. adi,admv8818 - Force SDO line to be initialized without relying on it already being intialized to read back current register value. atmel,sama5d2 - Fix wrong number of bits reported for readings from sama7g5 avago,apds9306 - Fix wrong scaling of scale values (missing a few zeros). microchip,pac1921 - Fix resource leak by moving ACPI_FREE() call up a few lines. tyhx,hx9023s - Fix a use after free caused by releasing firmware a few lines early. * tag 'iio-fixes-for-6.14a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: filter: admv8818: Force initialization of SDO iio: adc: ad7606: fix wrong scale available dt-bindings: iio: dac: adi-axi-adc: fix ad7606 pwm-names iio: dac: ad3552r: clear reset status flag iio: adc: ad7192: fix channel select iio: hid-sensor-prox: Split difference from multiple channels iio: proximity: Fix use-after-free in hx9023s_send_cfg() iio: adc: at91-sama5d2_adc: fix sama7g5 realbits value iio: adc: pac1921: Move ACPI_FREE() to cover all branches iio: light: apds9306: fix max_scale_nano values commit d262a192d38e527faa5984629aabda2e0d1c4f54 Author: Christophe Leroy Date: Wed Feb 12 07:46:28 2025 +0100 powerpc/code-patching: Fix KASAN hit by not flagging text patching area as VM_ALLOC Erhard reported the following KASAN hit while booting his PowerMac G4 with a KASAN-enabled kernel 6.13-rc6: BUG: KASAN: vmalloc-out-of-bounds in copy_to_kernel_nofault+0xd8/0x1c8 Write of size 8 at addr f1000000 by task chronyd/1293 CPU: 0 UID: 123 PID: 1293 Comm: chronyd Tainted: G W 6.13.0-rc6-PMacG4 #2 Tainted: [W]=WARN Hardware name: PowerMac3,6 7455 0x80010303 PowerMac Call Trace: [c2437590] [c1631a84] dump_stack_lvl+0x70/0x8c (unreliable) [c24375b0] [c0504998] print_report+0xdc/0x504 [c2437610] [c050475c] kasan_report+0xf8/0x108 [c2437690] [c0505a3c] kasan_check_range+0x24/0x18c [c24376a0] [c03fb5e4] copy_to_kernel_nofault+0xd8/0x1c8 [c24376c0] [c004c014] patch_instructions+0x15c/0x16c [c2437710] [c00731a8] bpf_arch_text_copy+0x60/0x7c [c2437730] [c0281168] bpf_jit_binary_pack_finalize+0x50/0xac [c2437750] [c0073cf4] bpf_int_jit_compile+0xb30/0xdec [c2437880] [c0280394] bpf_prog_select_runtime+0x15c/0x478 [c24378d0] [c1263428] bpf_prepare_filter+0xbf8/0xc14 [c2437990] [c12677ec] bpf_prog_create_from_user+0x258/0x2b4 [c24379d0] [c027111c] do_seccomp+0x3dc/0x1890 [c2437ac0] [c001d8e0] system_call_exception+0x2dc/0x420 [c2437f30] [c00281ac] ret_from_syscall+0x0/0x2c --- interrupt: c00 at 0x5a1274 NIP: 005a1274 LR: 006a3b3c CTR: 005296c8 REGS: c2437f40 TRAP: 0c00 Tainted: G W (6.13.0-rc6-PMacG4) MSR: 0200f932 CR: 24004422 XER: 00000000 GPR00: 00000166 af8f3fa0 a7ee3540 00000001 00000000 013b6500 005a5858 0200f932 GPR08: 00000000 00001fe9 013d5fc8 005296c8 2822244c 00b2fcd8 00000000 af8f4b57 GPR16: 00000000 00000001 00000000 00000000 00000000 00000001 00000000 00000002 GPR24: 00afdbb0 00000000 00000000 00000000 006e0004 013ce060 006e7c1c 00000001 NIP [005a1274] 0x5a1274 LR [006a3b3c] 0x6a3b3c --- interrupt: c00 The buggy address belongs to the virtual mapping at [f1000000, f1002000) created by: text_area_cpu_up+0x20/0x190 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:00000000 index:0x0 pfn:0x76e30 flags: 0x80000000(zone=2) raw: 80000000 00000000 00000122 00000000 00000000 00000000 ffffffff 00000001 raw: 00000000 page dumped because: kasan: bad access detected Memory state around the buggy address: f0ffff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f0ffff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >f1000000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ^ f1000080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f1000100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ================================================================== f8 corresponds to KASAN_VMALLOC_INVALID which means the area is not initialised hence not supposed to be used yet. Powerpc text patching infrastructure allocates a virtual memory area using get_vm_area() and flags it as VM_ALLOC. But that flag is meant to be used for vmalloc() and vmalloc() allocated memory is not supposed to be used before a call to __vmalloc_node_range() which is never called for that area. That went undetected until commit e4137f08816b ("mm, kasan, kmsan: instrument copy_from/to_kernel_nofault") The area allocated by text_area_cpu_up() is not vmalloc memory, it is mapped directly on demand when needed by map_kernel_page(). There is no VM flag corresponding to such usage, so just pass no flag. That way the area will be unpoisonned and usable immediately. Reported-by: Erhard Furtner Closes: https://lore.kernel.org/all/20250112135832.57c92322@yea/ Fixes: 37bc3e5fd764 ("powerpc/lib/code-patching: Use alternate map for patch_instruction()") Signed-off-by: Christophe Leroy Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/06621423da339b374f48c0886e3a5db18e896be8.1739342693.git.christophe.leroy@csgroup.eu arch/powerpc/lib/code-patching.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8743d66979e494c5378563e6b5a32e913380abd8 Author: Mario Limonciello Date: Tue Feb 11 14:32:01 2025 -0600 gpiolib: acpi: Add a quirk for Acer Nitro ANV14 Spurious immediate wake up events are reported on Acer Nitro ANV14. GPIO 11 is specified as an edge triggered input and also a wake source but this pin is supposed to be an output pin for an LED, so it's effectively floating. Block the interrupt from getting set up for this GPIO on this device. Cc: stable@vger.kernel.org Reported-by: Delgan Tested-by: Delgan Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3954 Signed-off-by: Mario Limonciello Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20250211203222.761206-1-superm1@kernel.org Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-acpi.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 174448badb4409491bfba2e6b46f7aa078741c5e Author: Kailang Yang Date: Wed Feb 12 14:40:46 2025 +0800 ALSA: hda/realtek: Fixup ALC225 depop procedure Headset MIC will no function when power_save=0. Fixes: 1fd50509fe14 ("ALSA: hda/realtek: Update ALC225 depop procedure") Link: https://bugzilla.kernel.org/show_bug.cgi?id=219743 Signed-off-by: Kailang Yang Link: https://lore.kernel.org/0474a095ab0044d0939ec4bf4362423d@realtek.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 59115e2e25f42924181055ed7cc1d123af7598b7 Author: Naman Jain Date: Thu Jan 16 06:12:24 2025 +0000 x86/hyperv/vtl: Stop kernel from probing VTL0 low memory For Linux, running in Hyper-V VTL (Virtual Trust Level), kernel in VTL2 tries to access VTL0 low memory in probe_roms. This memory is not described in the e820 map. Initialize probe_roms call to no-ops during boot for VTL2 kernel to avoid this. The issue got identified in OpenVMM which detects invalid accesses initiated from kernel running in VTL2. Co-developed-by: Saurabh Sengar Signed-off-by: Saurabh Sengar Signed-off-by: Naman Jain Tested-by: Roman Kisel Reviewed-by: Roman Kisel Link: https://lore.kernel.org/r/20250116061224.1701-1-namjain@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20250116061224.1701-1-namjain@linux.microsoft.com> arch/x86/hyperv/hv_vtl.c | 1 + 1 file changed, 1 insertion(+) commit e589adf5b70c07b1ab974d077046fdbf583b2f36 Author: Bart Van Assche Date: Thu Feb 6 09:51:08 2025 -0800 iavf: Fix a locking bug in an error path If the netdev lock has been obtained, unlock it before returning. This bug has been detected by the Clang thread-safety analyzer. Fixes: afc664987ab3 ("eth: iavf: extend the netdev_lock usage") Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/20250206175114.1974171-28-bvanassche@acm.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06ea2c9c4163b8a8fde890a9e21d1059f22bb76d Author: David Howells Date: Sun Feb 9 20:07:55 2025 +0000 rxrpc: Fix alteration of headers whilst zerocopy pending rxrpc: Fix alteration of headers whilst zerocopy pending AF_RXRPC now uses MSG_SPLICE_PAGES to do zerocopy of the DATA packets when it transmits them, but to reduce the number of descriptors required in the DMA ring, it allocates a space for the protocol header in the memory immediately before the data content so that it can include both in a single descriptor. This is used for either the main RX header or the smaller jumbo subpacket header as appropriate: +----+------+ | RX | | +-+--+DATA | |JH| | +--+------+ Now, when it stitches a large jumbo packet together from a number of individual DATA packets (each of which is 1412 bytes of data), it uses the full RX header from the first and then the jumbo subpacket header for the rest of the components: +---+--+------+--+------+--+------+--+------+--+------+--+------+ |UDP|RX|DATA |JH|DATA |JH|DATA |JH|DATA |JH|DATA |JH|DATA | +---+--+------+--+------+--+------+--+------+--+------+--+------+ As mentioned, the main RX header and the jumbo header overlay one another in memory and the formats don't match, so switching from one to the other means rearranging the fields and adjusting the flags. However, now that TLP has been included, it wants to retransmit the last subpacket as a new data packet on its own, which means switching between the header formats... and if the transmission is still pending, because of the MSG_SPLICE_PAGES, we end up corrupting the jumbo subheader. This has a variety of effects, with the RX service number overwriting the jumbo checksum/key number field and the RX checksum overwriting the jumbo flags - resulting in, at the very least, a confused connection-level abort from the peer. Fix this by leaving the jumbo header in the allocation with the data, but allocating the RX header from the page frag allocator and concocting it on the fly at the point of transmission as it does for ACK packets. Fixes: 7c482665931b ("rxrpc: Implement RACK/TLP to deal with transmission stalls [RFC8985]") Signed-off-by: David Howells cc: Marc Dionne cc: Chuck Lever cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/2181712.1739131675@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski net/rxrpc/ar-internal.h | 7 +++---- net/rxrpc/output.c | 50 ++++++++++++++++++++++++++++++++++--------------- net/rxrpc/rxkad.c | 13 +++++-------- net/rxrpc/sendmsg.c | 4 +--- net/rxrpc/txbuf.c | 37 ++++++++++-------------------------- 5 files changed, 54 insertions(+), 57 deletions(-) commit f1bf10d7e909fe898a112f5cae1e97ce34d6484d Author: Shyam Prasad N Date: Tue Feb 11 10:00:25 2025 +0000 cifs: pick channels for individual subrequests The netfs library could break down a read request into multiple subrequests. When multichannel is used, there is potential to improve performance when each of these subrequests pick a different channel. Today we call cifs_pick_channel when the main read request is initialized in cifs_init_request. This change moves this to cifs_prepare_read, which is the right place to pick channel since it gets called for each subrequest. Interestingly cifs_prepare_write already does channel selection for individual subreq, but looks like it was missed for read. This is especially important when multichannel is used with increased rasize. In my test setup, with rasize set to 8MB, a sequential read of large file was taking 11.5s without this change. With the change, it completed in 9s. The difference is even more signigicant with bigger rasize. Cc: Cc: David Howells Signed-off-by: Shyam Prasad N Signed-off-by: Steve French fs/smb/client/cifsglob.h | 1 - fs/smb/client/file.c | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 1942b1c6f687b9d1efc93f35239f185a84900e93 Author: Russell King (Oracle) Date: Sat Feb 8 11:52:23 2025 +0000 net: phylink: make configuring clock-stop dependent on MAC support We should not be configuring the PHYs clock-stop settings unless the MAC supports phylink managed EEE. Make this dependent on MAC support. This was noticed in a suspicious RCU usage report from the kernel test robot (the suspicious RCU usage due to calling phy_detach() remains unaddressed, but is triggered by the error this was generating.) Fixes: 03abf2a7c654 ("net: phylink: add EEE management") Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1tgjNn-003q0w-Pw@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/phy/phylink.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 5805402dcc56241987bca674a1b4da79a249bab7 Author: Eric Dumazet Date: Mon Feb 10 10:52:42 2025 +0000 vxlan: check vxlan_vnigroup_init() return value vxlan_init() must check vxlan_vnigroup_init() success otherwise a crash happens later, spotted by syzbot. Oops: general protection fault, probably for non-canonical address 0xdffffc000000002c: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000160-0x0000000000000167] CPU: 0 UID: 0 PID: 7313 Comm: syz-executor147 Not tainted 6.14.0-rc1-syzkaller-00276-g69b54314c975 #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:vxlan_vnigroup_uninit+0x89/0x500 drivers/net/vxlan/vxlan_vnifilter.c:912 Code: 00 48 8b 44 24 08 4c 8b b0 98 41 00 00 49 8d 86 60 01 00 00 48 89 c2 48 89 44 24 10 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 4d 04 00 00 49 8b 86 60 01 00 00 48 ba 00 00 00 RSP: 0018:ffffc9000cc1eea8 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000001 RCX: ffffffff8672effb RDX: 000000000000002c RSI: ffffffff8672ecb9 RDI: ffff8880461b4f18 RBP: ffff8880461b4ef4 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000020000 R13: ffff8880461b0d80 R14: 0000000000000000 R15: dffffc0000000000 FS: 00007fecfa95d6c0(0000) GS:ffff88806a600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fecfa95cfb8 CR3: 000000004472c000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: vxlan_uninit+0x1ab/0x200 drivers/net/vxlan/vxlan_core.c:2942 unregister_netdevice_many_notify+0x12d6/0x1f30 net/core/dev.c:11824 unregister_netdevice_many net/core/dev.c:11866 [inline] unregister_netdevice_queue+0x307/0x3f0 net/core/dev.c:11736 register_netdevice+0x1829/0x1eb0 net/core/dev.c:10901 __vxlan_dev_create+0x7c6/0xa30 drivers/net/vxlan/vxlan_core.c:3981 vxlan_newlink+0xd1/0x130 drivers/net/vxlan/vxlan_core.c:4407 rtnl_newlink_create net/core/rtnetlink.c:3795 [inline] __rtnl_newlink net/core/rtnetlink.c:3906 [inline] Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device") Reported-by: syzbot+6a9624592218c2c5e7aa@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/67a9d9b4.050a0220.110943.002d.GAE@google.com/T/#u Signed-off-by: Eric Dumazet Cc: Roopa Prabhu Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20250210105242.883482-1-edumazet@google.com Signed-off-by: Jakub Kicinski drivers/net/vxlan/vxlan_core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit da2dccd7451de62b175fb8f0808d644959e964c7 Author: Filipe Manana Date: Wed Feb 5 17:36:48 2025 +0000 btrfs: fix hole expansion when writing at an offset beyond EOF At btrfs_write_check() if our file's i_size is not sector size aligned and we have a write that starts at an offset larger than the i_size that falls within the same page of the i_size, then we end up not zeroing the file range [i_size, write_offset). The code is this: start_pos = round_down(pos, fs_info->sectorsize); oldsize = i_size_read(inode); if (start_pos > oldsize) { /* Expand hole size to cover write data, preventing empty gap */ loff_t end_pos = round_up(pos + count, fs_info->sectorsize); ret = btrfs_cont_expand(BTRFS_I(inode), oldsize, end_pos); if (ret) return ret; } So if our file's i_size is 90269 bytes and a write at offset 90365 bytes comes in, we get 'start_pos' set to 90112 bytes, which is less than the i_size and therefore we don't zero out the range [90269, 90365) by calling btrfs_cont_expand(). This is an old bug introduced in commit 9036c10208e1 ("Btrfs: update hole handling v2"), from 2008, and the buggy code got moved around over the years. Fix this by discarding 'start_pos' and comparing against the write offset ('pos') without any alignment. This bug was recently exposed by test case generic/363 which tests this scenario by polluting ranges beyond EOF with an mmap write and than verify that after a file increases we get zeroes for the range which is supposed to be a hole and not what we wrote with the previous mmaped write. We're only seeing this exposed now because generic/363 used to run only on xfs until last Sunday's fstests update. The test was failing like this: $ ./check generic/363 FSTYP -- btrfs PLATFORM -- Linux/x86_64 debian0 6.13.0-rc7-btrfs-next-185+ #17 SMP PREEMPT_DYNAMIC Mon Feb 3 12:28:46 WET 2025 MKFS_OPTIONS -- /dev/sdc MOUNT_OPTIONS -- /dev/sdc /home/fdmanana/btrfs-tests/scratch_1 generic/363 0s ... [failed, exit status 1]- output mismatch (see /home/fdmanana/git/hub/xfstests/results//generic/363.out.bad) --- tests/generic/363.out 2025-02-05 15:31:14.013646509 +0000 +++ /home/fdmanana/git/hub/xfstests/results//generic/363.out.bad 2025-02-05 17:25:33.112630781 +0000 @@ -1 +1,46 @@ QA output created by 363 +READ BAD DATA: offset = 0xdcad, size = 0xd921, fname = /home/fdmanana/btrfs-tests/dev/junk +OFFSET GOOD BAD RANGE +0x1609d 0x0000 0x3104 0x0 +operation# (mod 256) for the bad data may be 4 +0x1609e 0x0000 0x0472 0x1 +operation# (mod 256) for the bad data may be 4 ... (Run 'diff -u /home/fdmanana/git/hub/xfstests/tests/generic/363.out /home/fdmanana/git/hub/xfstests/results//generic/363.out.bad' to see the entire diff) Ran: generic/363 Failures: generic/363 Failed 1 of 1 tests Fixes: 9036c10208e1 ("Btrfs: update hole handling v2") CC: stable@vger.kernel.org Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/file.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit acc18e1c1d8c0d59d793cf87790ccfcafb1bf5f0 Author: Filipe Manana Date: Tue Feb 4 11:02:32 2025 +0000 btrfs: fix stale page cache after race between readahead and direct IO write After commit ac325fc2aad5 ("btrfs: do not hold the extent lock for entire read") we can now trigger a race between a task doing a direct IO write and readahead. When this race is triggered it results in tasks getting stale data when they attempt do a buffered read (including the task that did the direct IO write). This race can be sporadically triggered with test case generic/418, failing like this: $ ./check generic/418 FSTYP -- btrfs PLATFORM -- Linux/x86_64 debian0 6.13.0-rc7-btrfs-next-185+ #17 SMP PREEMPT_DYNAMIC Mon Feb 3 12:28:46 WET 2025 MKFS_OPTIONS -- /dev/sdc MOUNT_OPTIONS -- /dev/sdc /home/fdmanana/btrfs-tests/scratch_1 generic/418 14s ... - output mismatch (see /home/fdmanana/git/hub/xfstests/results//generic/418.out.bad) --- tests/generic/418.out 2020-06-10 19:29:03.850519863 +0100 +++ /home/fdmanana/git/hub/xfstests/results//generic/418.out.bad 2025-02-03 15:42:36.974609476 +0000 @@ -1,2 +1,5 @@ QA output created by 418 +cmpbuf: offset 0: Expected: 0x1, got 0x0 +[6:0] FAIL - comparison failed, offset 24576 +diotest -wp -b 4096 -n 8 -i 4 failed at loop 3 Silence is golden ... (Run 'diff -u /home/fdmanana/git/hub/xfstests/tests/generic/418.out /home/fdmanana/git/hub/xfstests/results//generic/418.out.bad' to see the entire diff) Ran: generic/418 Failures: generic/418 Failed 1 of 1 tests The race happens like this: 1) A file has a prealloc extent for the range [16K, 28K); 2) Task A starts a direct IO write against file range [24K, 28K). At the start of the direct IO write it invalidates the page cache at __iomap_dio_rw() with kiocb_invalidate_pages() for the 4K page at file offset 24K; 3) Task A enters btrfs_dio_iomap_begin() and locks the extent range [24K, 28K); 4) Task B starts a readahead for file range [16K, 28K), entering btrfs_readahead(). First it attempts to read the page at offset 16K by entering btrfs_do_readpage(), where it calls get_extent_map(), locks the range [16K, 20K) and gets the extent map for the range [16K, 28K), caching it into the 'em_cached' variable declared in the local stack of btrfs_readahead(), and then unlocks the range [16K, 20K). Since the extent map has the prealloc flag, at btrfs_do_readpage() we zero out the page's content and don't submit any bio to read the page from the extent. Then it attempts to read the page at offset 20K entering btrfs_do_readpage() where we reuse the previously cached extent map (decided by get_extent_map()) since it spans the page's range and it's still in the inode's extent map tree. Just like for the previous page, we zero out the page's content since the extent map has the prealloc flag set. Then it attempts to read the page at offset 24K entering btrfs_do_readpage() where we reuse the previously cached extent map (decided by get_extent_map()) since it spans the page's range and it's still in the inode's extent map tree. Just like for the previous pages, we zero out the page's content since the extent map has the prealloc flag set. Note that we didn't lock the extent range [24K, 28K), so we didn't synchronize with the ongoing direct IO write being performed by task A; 5) Task A enters btrfs_create_dio_extent() and creates an ordered extent for the range [24K, 28K), with the flags BTRFS_ORDERED_DIRECT and BTRFS_ORDERED_PREALLOC set; 6) Task A unlocks the range [24K, 28K) at btrfs_dio_iomap_begin(); 7) The ordered extent enters btrfs_finish_one_ordered() and locks the range [24K, 28K); 8) Task A enters fs/iomap/direct-io.c:iomap_dio_complete() and it tries to invalidate the page at offset 24K by calling kiocb_invalidate_post_direct_write(), resulting in a call chain that ends up at btrfs_release_folio(). The btrfs_release_folio() call ends up returning false because the range for the page at file offset 24K is currently locked by the task doing the ordered extent completion in the previous step (7), so we have: btrfs_release_folio() -> __btrfs_release_folio() -> try_release_extent_mapping() -> try_release_extent_state() This last function checking that the range is locked and returning false and propagating it up to btrfs_release_folio(). So this results in a failure to invalidate the page and kiocb_invalidate_post_direct_write() triggers this message logged in dmesg: Page cache invalidation failure on direct I/O. Possible data corruption due to collision with buffered I/O! After this we leave the page cache with stale data for the file range [24K, 28K), filled with zeroes instead of the data written by direct IO write (all bytes with a 0x01 value), so any task attempting to read with buffered IO, including the task that did the direct IO write, will get all bytes in the range with a 0x00 value instead of the written data. Fix this by locking the range, with btrfs_lock_and_flush_ordered_range(), at the two callers of btrfs_do_readpage() instead of doing it at get_extent_map(), just like we did before commit ac325fc2aad5 ("btrfs: do not hold the extent lock for entire read"), and unlocking the range after all the calls to btrfs_do_readpage(). This way we never reuse a cached extent map without flushing any pending ordered extents from a concurrent direct IO write. Fixes: ac325fc2aad5 ("btrfs: do not hold the extent lock for entire read") Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent_io.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 8546cfd08aa4b982acd2357403a1f15495d622ec Author: Patrick Wildt Date: Mon Feb 10 22:37:29 2025 +0100 arm64: dts: rockchip: adjust SMMU interrupt type on rk3588 The SMMU architecture requires wired interrupts to be edge triggered, which does not align with the DT description for the RK3588. This leads to interrupt storms, as the SMMU continues to hold the pin high and only pulls it down for a short amount when issuing an IRQ. Update the DT description to be in line with the spec and perceived reality. Signed-off-by: Patrick Wildt Fixes: cd81d3a0695c ("arm64: dts: rockchip: add rk3588 pcie and php IOMMUs") Reviewed-by: Niklas Cassel Link: https://lore.kernel.org/r/Z6pxme2Chmf3d3uK@windev.fritz.box Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 7d1163fc08936fcb5cf5d9daf366c322c3b4e882 Author: Niklas Cassel Date: Fri Feb 7 15:39:01 2025 +0100 arm64: dts: rockchip: disable IOMMU when running rk3588 in PCIe endpoint mode Commit da92d3dfc871 ("arm64: dts: rockchip: enable the mmu600_pcie IOMMU on the rk3588 SoC") enabled the mmu600_pcie IOMMU, both in the normal case (when all PCIe controllers are running in Root Complex mode) and in the case when running the pcie3x4 PCIe controller in Endpoint mode. There have been no issues detected when running the PCIe controllers in Root Complex mode. During PCI probe time, we will add a SID to the IOMMU for each PCI device enumerated on the bus, including the root port itself. However, when running the pcie3x4 PCIe controller in Endpoint mode, we will only add a single SID to the IOMMU (the SID specified in the iommus DT property). The enablement of IOMMU in endpoint mode was verified on setup with two Rock 5b:s, where the BDF of the Root Complex has BDF (00:00.0). A Root Complex sending a TLP to the Endpoint will have Requester ID set to the BDF of the initiator. On the EP side, the Requester ID will then be used as the SID. This works fine if the Root Complex has a BDF that matches the iommus DT property, however, if the Root Complex has any other BDF, we will see something like: arm-smmu-v3 fc900000.iommu: event: C_BAD_STREAMID client: (unassigned sid) sid: 0x1600 ssid: 0x0 on the endpoint side. For PCIe controllers running in endpoint mode that always uses the incoming Requester ID as the SID, the iommus DT property simply isn't a viable solution. (Neither is iommu-map a viable solution, as there is no enumeration done on the endpoint side.) Thus, partly revert commit da92d3dfc871 ("arm64: dts: rockchip: enable the mmu600_pcie IOMMU on the rk3588 SoC") by disabling the PCI IOMMU when running the pcie3x4 PCIe controller in Endpoint mode. Since the PCI IOMMU is working as expected in the normal case, keep it enabled when running all PCIe controllers in Root Complex mode. Fixes: da92d3dfc871 ("arm64: dts: rockchip: enable the mmu600_pcie IOMMU on the rk3588 SoC") Signed-off-by: Niklas Cassel Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20250207143900.2047949-2-cassel@kernel.org Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi | 1 - arch/arm64/boot/dts/rockchip/rk3588-rock-5b-pcie-ep.dtso | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) commit a6768c4f92e152265590371975d44c071a5279c7 Author: Daniel Lezcano Date: Tue Feb 11 09:47:11 2025 +0100 thermal/cpufreq_cooling: Remove structure member documentation The structure member documentation refers to a member which does not exist any more. Remove it. Link: https://lore.kernel.org/all/202501220046.h3PMBCti-lkp@intel.com/ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501220046.h3PMBCti-lkp@intel.com/ Signed-off-by: Daniel Lezcano Acked-by: Viresh Kumar Link: https://patch.msgid.link/20250211084712.2746705-1-daniel.lezcano@linaro.org [ rjw: Minor changelog edits ] Signed-off-by: Rafael J. Wysocki drivers/thermal/cpufreq_cooling.c | 2 -- 1 file changed, 2 deletions(-) commit c195b9c6ab9c383d7aa3f4a65879b3ca90cb378b Author: Zhang Rui Date: Sat Feb 8 15:49:07 2025 +0800 thermal/netlink: Prevent userspace segmentation fault by adjusting UAPI header The intel-lpmd tool [1], which uses the THERMAL_GENL_ATTR_CPU_CAPABILITY attribute to receive HFI events from kernel space, encounters a segmentation fault after commit 1773572863c4 ("thermal: netlink: Add the commands and the events for the thresholds"). The issue arises because the THERMAL_GENL_ATTR_CPU_CAPABILITY raw value was changed while intel_lpmd still uses the old value. Although intel_lpmd can be updated to check the THERMAL_GENL_VERSION and use the appropriate THERMAL_GENL_ATTR_CPU_CAPABILITY value, the commit itself is questionable. The commit introduced a new element in the middle of enum thermal_genl_attr, which affects many existing attributes and introduces potential risks and unnecessary maintenance burdens for userspace thermal netlink event users. Solve the issue by moving the newly introduced THERMAL_GENL_ATTR_TZ_PREV_TEMP attribute to the end of the enum thermal_genl_attr. This ensures that all existing thermal generic netlink attributes remain unaffected. Link: https://github.com/intel/intel-lpmd [1] Fixes: 1773572863c4 ("thermal: netlink: Add the commands and the events for the thresholds") Signed-off-by: Zhang Rui Reviewed-by: Daniel Lezcano Link: https://patch.msgid.link/20250208074907.5679-1-rui.zhang@intel.com [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki include/uapi/linux/thermal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2844ddbd540fc84d7571cca65d6c43088e4d6952 Author: Niklas Schnelle Date: Fri Feb 7 13:30:17 2025 +0100 s390/pci: Fix handling of isolated VFs In contrast to the commit message of the fixed commit VFs whose parent PF is not configured are not always isolated, that is put on their own PCI domain. This is because for VFs to be added to an existing PCI domain it is enough for that PCI domain to share the same topology ID or PCHID. Such a matching PCI domain without a parent PF may exist when a PF from the same PCI card created the domain with the VF being a child of a different, non accessible, PF. While not causing technical issues it makes the rules which VFs are isolated inconsistent. Fix this by explicitly checking that the parent PF exists on the PCI domain determined by the topology ID or PCHID before registering the VF. This works because a parent PF which is under control of this Linux instance must be enabled and configured at the point where its child VFs appear because otherwise SR-IOV could not have been enabled on the parent. Fixes: 25f39d3dcb48 ("s390/pci: Ignore RID for isolated VFs") Cc: stable@vger.kernel.org Reviewed-by: Halil Pasic Signed-off-by: Niklas Schnelle Signed-off-by: Vasily Gorbik arch/s390/pci/pci_bus.c | 20 ++++++++++++++++++++ arch/s390/pci/pci_iov.c | 2 +- arch/s390/pci/pci_iov.h | 7 +++++++ 3 files changed, 28 insertions(+), 1 deletion(-) commit 05793884a1f30509e477de9da233ab73584b1c8c Author: Niklas Schnelle Date: Fri Feb 7 13:30:16 2025 +0100 s390/pci: Pull search for parent PF out of zpci_iov_setup_virtfn() This creates a new zpci_iov_find_parent_pf() function which a future commit can use to find if a VF has a configured parent PF. Use zdev->rid instead of zdev->devfn such that the new function can be used before it has been decided if the RID will be exposed and zdev->devfn is set. Also handle the hypotheical case that the RID is not available but there is an otherwise matching zbus. Fixes: 25f39d3dcb48 ("s390/pci: Ignore RID for isolated VFs") Cc: stable@vger.kernel.org Reviewed-by: Halil Pasic Signed-off-by: Niklas Schnelle Signed-off-by: Vasily Gorbik arch/s390/pci/pci_iov.c | 56 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 14 deletions(-) commit 6166caf3bbe2429e4fac71b77e1c8254f2690383 Author: Heiko Carstens Date: Mon Feb 10 09:56:53 2025 +0100 s390/bitops: Disable arch_test_bit() optimization for PROFILE_ALL_BRANCHES With PROFILE_ALL_BRANCHES enabled gcc sometimes fails to handle __builtin_constant_p() correctly: In function 'arch_test_bit', inlined from 'node_state' at include/linux/nodemask.h:423:9, inlined from 'warn_if_node_offline' at include/linux/gfp.h:252:2, inlined from '__alloc_pages_node_noprof' at include/linux/gfp.h:267:2, inlined from 'alloc_pages_node_noprof' at include/linux/gfp.h:296:9, inlined from 'vm_area_alloc_pages.constprop' at mm/vmalloc.c:3591:11: >> arch/s390/include/asm/bitops.h:60:17: warning: 'asm' operand 2 probably does not match constraints 60 | asm volatile( | ^~~ >> arch/s390/include/asm/bitops.h:60:17: error: impossible constraint in 'asm' Therefore disable the optimization for this case. This is similar to commit 63678eecec57 ("s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES") Fixes: b2bc1b1a77c0 ("s390/bitops: Provide optimized arch_test_bit()") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202502091912.xL2xTCGw-lkp@intel.com/ Acked-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik arch/s390/include/asm/bitops.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 32ae4a2992529e2c7934e422035fad1d9b0f1fb5 Author: Peter Oberparleiter Date: Fri Jan 31 12:02:55 2025 +0100 s390/cio: Fix CHPID "configure" attribute caching In some environments, the SCLP firmware interface used to query a CHPID's configured state is not supported. On these environments, rapidly reading the corresponding sysfs attribute produces inconsistent results: $ cat /sys/devices/css0/chp0.00/configure cat: /sys/devices/css0/chp0.00/configure: Operation not supported $ cat /sys/devices/css0/chp0.00/configure 3 This occurs for example when Linux is run as a KVM guest. The inconsistency is a result of CIO using cached results for generating the value of the "configure" attribute while failing to handle the situation where no data was returned by SCLP. Fix this by not updating the cache-expiration timestamp when SCLP returns no data. With the fix applied, the system response is consistent: $ cat /sys/devices/css0/chp0.00/configure cat: /sys/devices/css0/chp0.00/configure: Operation not supported $ cat /sys/devices/css0/chp0.00/configure cat: /sys/devices/css0/chp0.00/configure: Operation not supported Reviewed-by: Vineeth Vijayan Reviewed-by: Eric Farman Tested-by: Eric Farman Signed-off-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik drivers/s390/cio/chp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8d1d1e8d3345b56d3d8a64f845962c71468cd776 Author: Ilya Leoshkevich Date: Thu Jan 30 14:56:07 2025 +0100 s390/configs: Remove CONFIG_LSM s390 defconfig does not have BPF LSM, resulting in systemd[1]: bpf-restrict-fs: BPF LSM hook not enabled in the kernel, BPF LSM not supported. with the respective kernels. The other architectures do not explicitly set it, and the default values have BPF in them, so just drop it. Reported-by: Marc Hartmayer Acked-by: Vasily Gorbik Signed-off-by: Ilya Leoshkevich Signed-off-by: Vasily Gorbik arch/s390/configs/debug_defconfig | 1 - arch/s390/configs/defconfig | 1 - arch/s390/configs/zfcpdump_defconfig | 1 - 3 files changed, 3 deletions(-) commit 09fbf3d502050282bf47ab3babe1d4ed54dd1fd8 Merge: 318e8c339c9a bdc35f164b0f Author: Linus Torvalds Date: Tue Feb 11 10:19:36 2025 -0800 Merge tag 'tomoyo-pr-20250211' of git://git.code.sf.net/p/tomoyo/tomoyo Pull tomoyo fixes from Tetsuo Handa: "Redo of pathname patternization and fix spelling errors" * tag 'tomoyo-pr-20250211' of git://git.code.sf.net/p/tomoyo/tomoyo: tomoyo: use better patterns for procfs in learning mode tomoyo: fix spelling errors tomoyo: fix spelling error commit 318e8c339c9a0891c389298bb328ed0762a9935e Author: Patrick Bellasi Date: Wed Feb 5 14:04:41 2025 +0000 x86/cpu/kvm: SRSO: Fix possible missing IBPB on VM-Exit In [1] the meaning of the synthetic IBPB flags has been redefined for a better separation of concerns: - ENTRY_IBPB -- issue IBPB on entry only - IBPB_ON_VMEXIT -- issue IBPB on VM-Exit only and the Retbleed mitigations have been updated to match this new semantics. Commit [2] was merged shortly before [1], and their interaction was not handled properly. This resulted in IBPB not being triggered on VM-Exit in all SRSO mitigation configs requesting an IBPB there. Specifically, an IBPB on VM-Exit is triggered only when X86_FEATURE_IBPB_ON_VMEXIT is set. However: - X86_FEATURE_IBPB_ON_VMEXIT is not set for "spec_rstack_overflow=ibpb", because before [1] having X86_FEATURE_ENTRY_IBPB was enough. Hence, an IBPB is triggered on entry but the expected IBPB on VM-exit is not. - X86_FEATURE_IBPB_ON_VMEXIT is not set also when "spec_rstack_overflow=ibpb-vmexit" if X86_FEATURE_ENTRY_IBPB is already set. That's because before [1] this was effectively redundant. Hence, e.g. a "retbleed=ibpb spec_rstack_overflow=bpb-vmexit" config mistakenly reports the machine still vulnerable to SRSO, despite an IBPB being triggered both on entry and VM-Exit, because of the Retbleed selected mitigation config. - UNTRAIN_RET_VM won't still actually do anything unless CONFIG_MITIGATION_IBPB_ENTRY is set. For "spec_rstack_overflow=ibpb", enable IBPB on both entry and VM-Exit and clear X86_FEATURE_RSB_VMEXIT which is made superfluous by X86_FEATURE_IBPB_ON_VMEXIT. This effectively makes this mitigation option similar to the one for 'retbleed=ibpb', thus re-order the code for the RETBLEED_MITIGATION_IBPB option to be less confusing by having all features enabling before the disabling of the not needed ones. For "spec_rstack_overflow=ibpb-vmexit", guard this mitigation setting with CONFIG_MITIGATION_IBPB_ENTRY to ensure UNTRAIN_RET_VM sequence is effectively compiled in. Drop instead the CONFIG_MITIGATION_SRSO guard, since none of the SRSO compile cruft is required in this configuration. Also, check only that the required microcode is present to effectively enabled the IBPB on VM-Exit. Finally, update the KConfig description for CONFIG_MITIGATION_IBPB_ENTRY to list also all SRSO config settings enabled by this guard. Fixes: 864bcaa38ee4 ("x86/cpu/kvm: Provide UNTRAIN_RET_VM") [1] Fixes: d893832d0e1e ("x86/srso: Add IBPB on VMEXIT") [2] Reported-by: Yosry Ahmed Signed-off-by: Patrick Bellasi Reviewed-by: Borislav Petkov (AMD) Cc: stable@kernel.org Signed-off-by: Linus Torvalds arch/x86/Kconfig | 3 ++- arch/x86/kernel/cpu/bugs.c | 21 ++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) commit 569617dbbd06286fb73f3f1c2ac91e51d863c7de Author: Sakari Ailus Date: Tue Feb 11 09:28:40 2025 +0200 platform/x86: int3472: Call "reset" GPIO "enable" for INT347E The DT bindings for ov7251 specify "enable" GPIO (xshutdown in documentation) but the int3472 indiscriminately provides this as a "reset" GPIO to sensor drivers. Take this into account by assigning it as "enable" with active high polarity for INT347E devices, i.e. ov7251. "reset" with active low polarity remains the default GPIO name for other devices. Signed-off-by: Sakari Ailus Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250211072841.7713-3-sakari.ailus@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/intel/int3472/discrete.c | 52 ++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 4 deletions(-) commit fc22b06fbd2afefa1eddff69a6fd30c539cef577 Author: Sakari Ailus Date: Tue Feb 11 09:28:39 2025 +0200 platform/x86: int3472: Use correct type for "polarity", call it gpio_flags Struct gpiod_lookup flags field's type is unsigned long. Thus use unsigned long for values to be assigned to that field. Similarly, also call the field gpio_flags which it really is. Signed-off-by: Sakari Ailus Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250211072841.7713-2-sakari.ailus@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/intel/int3472/discrete.c | 39 ++++++++++++++------------- 1 file changed, 20 insertions(+), 19 deletions(-) commit 63f20f00d23d569e4e67859b4e8dcc9de79221cb Author: Song Yoong Siang Date: Wed Feb 5 10:36:03 2025 +0800 igc: Set buffer type for empty frames in igc_init_empty_frame Set the buffer type to IGC_TX_BUFFER_TYPE_SKB for empty frame in the igc_init_empty_frame function. This ensures that the buffer type is correctly identified and handled during Tx ring cleanup. Fixes: db0b124f02ba ("igc: Enhance Qbv scheduling by using first flag bit") Cc: stable@vger.kernel.org # 6.2+ Signed-off-by: Song Yoong Siang Acked-by: Maciej Fijalkowski Reviewed-by: Simon Horman Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igc/igc_main.c | 1 + 1 file changed, 1 insertion(+) commit 7822dd4d6d4bebca5045a395e1784ef09cae2d43 Author: Zdenek Bouska Date: Tue Jan 28 13:26:48 2025 +0100 igc: Fix HW RX timestamp when passed by ZC XDP Fixes HW RX timestamp in the following scenario: - AF_PACKET socket with enabled HW RX timestamps is created - AF_XDP socket with enabled zero copy is created - frame is forwarded to the BPF program, where the timestamp should still be readable (extracted by igc_xdp_rx_timestamp(), kfunc behind bpf_xdp_metadata_rx_timestamp()) - the frame got XDP_PASS from BPF program, redirecting to the stack - AF_PACKET socket receives the frame with HW RX timestamp Moves the skb timestamp setting from igc_dispatch_skb_zc() to igc_construct_skb_zc() so that igc_construct_skb_zc() is similar to igc_construct_skb(). This issue can also be reproduced by running: # tools/testing/selftests/bpf/xdp_hw_metadata enp1s0 When a frame with the wrong port 9092 (instead of 9091) is used: # echo -n xdp | nc -u -q1 192.168.10.9 9092 then the RX timestamp is missing and xdp_hw_metadata prints: skb hwtstamp is not found! With this fix or when copy mode is used: # tools/testing/selftests/bpf/xdp_hw_metadata -c enp1s0 then RX timestamp is found and xdp_hw_metadata prints: found skb hwtstamp = 1736509937.852786132 Fixes: 069b142f5819 ("igc: Add support for PTP .getcyclesx64()") Signed-off-by: Zdenek Bouska Acked-by: Vinicius Costa Gomes Reviewed-by: Simon Horman Reviewed-by: Florian Bezdeka Reviewed-by: Song Yoong Siang Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/igc/igc_main.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 61fb097f9a644407b9342a8169d0edef868612d7 Author: Piotr Kwapulinski Date: Fri Jan 31 13:14:50 2025 +0100 ixgbe: Fix possible skb NULL pointer dereference The commit c824125cbb18 ("ixgbe: Fix passing 0 to ERR_PTR in ixgbe_run_xdp()") stopped utilizing the ERR-like macros for xdp status encoding. Propagate this logic to the ixgbe_put_rx_buffer(). The commit also relaxed the skb NULL pointer check - caught by Smatch. Restore this check. Fixes: c824125cbb18 ("ixgbe: Fix passing 0 to ERR_PTR in ixgbe_run_xdp()") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/intel-wired-lan/2c7d6c31-192a-4047-bd90-9566d0e14cc0@stanley.mountain/ Acked-by: Maciej Fijalkowski Signed-off-by: Piotr Kwapulinski Reviewed-by: Simon Horman Tested-by: Saritha Sanigani (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52c11d31b5a1d1c747bb5f36cc4808e93e2348f4 Author: Joshua Hay Date: Tue Feb 4 18:08:11 2025 -0800 idpf: call set_real_num_queues in idpf_open On initial driver load, alloc_etherdev_mqs is called with whatever max queue values are provided by the control plane. However, if the driver is loaded on a system where num_online_cpus() returns less than the max queues, the netdev will think there are more queues than are actually available. Only num_online_cpus() will be allocated, but skb_get_queue_mapping(skb) could possibly return an index beyond the range of allocated queues. Consequently, the packet is silently dropped and it appears as if TX is broken. Set the real number of queues during open so the netdev knows how many queues will be allocated. Fixes: 1c325aac10a8 ("idpf: configure resources for TX queues") Signed-off-by: Joshua Hay Reviewed-by: Madhu Chittim Tested-by: Samuel Salin Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/idpf/idpf_lib.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2ff66c2f9ea4e9311e9a00004348b6c465bd5d3b Author: Sridhar Samudrala Date: Fri Jan 10 16:29:58 2025 -0800 idpf: record rx queue in skb for RSC packets Move the call to skb_record_rx_queue in idpf_rx_process_skb_fields() so that RX queue is recorded for RSC packets too. Fixes: 90912f9f4f2d ("idpf: convert header split mode to libeth + napi_build_skb()") Signed-off-by: Sridhar Samudrala Reviewed-by: Madhu Chittim Tested-by: Samuel Salin Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/idpf/idpf_txrx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 69ab25a74e2df53edc2de4acfce0a484bdb88155 Author: Sridhar Samudrala Date: Fri Jan 10 16:29:22 2025 -0800 idpf: fix handling rsc packet with a single segment Handle rsc packet with a single segment same as a multi segment rsc packet so that CHECKSUM_PARTIAL is set in the skb->ip_summed field. The current code is passing CHECKSUM_NONE resulting in TCP GRO layer doing checksum in SW and hiding the issue. This will fail when using dmabufs as payload buffers as skb frag would be unreadable. Fixes: 3a8845af66ed ("idpf: add RX splitq napi poll support") Signed-off-by: Sridhar Samudrala Reviewed-by: Przemek Kitszel Tested-by: Samuel Salin Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/idpf/idpf_txrx.c | 2 -- 1 file changed, 2 deletions(-) commit 35e21de48e693af1dcfdbf2dc3d73dcfa3c8f2d9 Author: Jerome Brunet Date: Tue Feb 11 16:48:06 2025 +0100 regulator: core: let dt properties override driver init_data This reverts commit cd7a38c40b231350a3cd0fd774f4e6bb68c4b411. When submitting the change above, it was thought that the origin of the init_data should be a clear choice, from the driver or from DT but not both. It turns out some devices, such as qcom-msm8974-lge-nexus5-hammerhead, relied on the old behaviour to override the init_data provided by the driver, making it some kind of default if none is provided by the platform. Using the init_data provided by the driver when it is present broke these devices so revert the change to fixup the situation and add a comment to make things a bit more clear Reported-by: Luca Weiss Closes: https://lore.kernel.org/lkml/5857103.DvuYhMxLoT@lucaweiss.eu Fixes: cd7a38c40b23 ("regulator: core: do not silently ignore provided init_data") Signed-off-by: Jerome Brunet Link: https://patch.msgid.link/20250211-regulator-init-data-fixup-v1-1-5ce1c6cff990@baylibre.com Signed-off-by: Mark Brown drivers/regulator/core.c | 61 +++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 34 deletions(-) commit 6aa8a63c471eb6756aabd03f880feffe6a7af6c9 Author: Johan Hovold Date: Tue Feb 11 15:45:16 2025 +0100 USB: serial: option: drop MeiG Smart defines Several MeiG Smart modems apparently use the same product id, making the defines even less useful. Drop them in favour of using comments consistently to make the id table slightly less unwieldy. Cc: stable@vger.kernel.org Acked-by: Chester A. Unal Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) commit 9f734cd076931fa4d7feb5728e5cd95cde0af114 Author: Kent Overstreet Date: Mon Feb 10 17:46:36 2025 -0500 bcachefs: Fix want_new_bset() so we write until the end of the btree node want_new_bset() returns the address of a new bset to initialize if we wish to do so in a btree node - either because the previous one is too big, or because it's been written. The case for 'previous bset was written' was wrong: it's only supposed to check for if we have space in the node for one more block, but because it subtracted the header from the space available it would never initialize a new bset if we were down to the last block in a node. Fixing this results in fewer btree node splits/compactions, which fixes a bug with flushing the journal to go read-only sometimes not terminating or taking excessively long. Signed-off-by: Kent Overstreet fs/bcachefs/btree_update_interior.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e690efa72596a1163dc56709707f459221889d2 Author: Kent Overstreet Date: Mon Feb 10 11:34:59 2025 -0500 bcachefs: Split out journal pins by btree level This lets us flush the journal to go read-only more effectively. Flushing the journal and going read-only requires halting mutually recursive processes, which strictly speaking are not guaranteed to terminate. Flushing btree node journal pins will kick off a btree node write, and btree node writes on completion must do another btree update to the parent node to update the 'sectors_written' field for that node's key. If the parent node is full and requires a split or compaction, that's going to generate a whole bunch of additional btree updates - alloc info, LRU btree, and more - which then have to be flushed, and the cycle repeats. This process will terminate much more effectively if we tweak journal reclaim to flush btree updates leaf to root: i.e., don't flush updates for a given btree node (kicking off a write, and consuming space within that node up to the next block boundary) if there might still be unflushed updates in child nodes. Signed-off-by: Kent Overstreet fs/bcachefs/journal_reclaim.c | 37 ++++++++++++++++++------------------- fs/bcachefs/journal_types.h | 5 ++++- 2 files changed, 22 insertions(+), 20 deletions(-) commit 1c316eb57c11fb3dc447b04ef765459cd61c8647 Author: Alan Huang Date: Mon Feb 10 11:04:22 2025 +0800 bcachefs: Fix use after free acc->k.data should be used with the lock hold: 00221 ========= TEST generic/187 00221 run fstests generic/187 at 2025-02-09 21:08:10 00221 spectre-v4 mitigation disabled by command-line option 00222 bcachefs (vdc): starting version 1.20: directory_size opts=errors=ro 00222 bcachefs (vdc): initializing new filesystem 00222 bcachefs (vdc): going read-write 00222 bcachefs (vdc): marking superblocks 00222 bcachefs (vdc): initializing freespace 00222 bcachefs (vdc): done initializing freespace 00222 bcachefs (vdc): reading snapshots table 00222 bcachefs (vdc): reading snapshots done 00222 bcachefs (vdc): done starting filesystem 00222 bcachefs (vdc): shutting down 00222 bcachefs (vdc): going read-only 00222 bcachefs (vdc): finished waiting for writes to stop 00223 bcachefs (vdc): flushing journal and stopping allocators, journal seq 6 00223 bcachefs (vdc): flushing journal and stopping allocators complete, journal seq 8 00223 bcachefs (vdc): clean shutdown complete, journal seq 9 00223 bcachefs (vdc): marking filesystem clean 00223 bcachefs (vdc): shutdown complete 00223 bcachefs (vdc): starting version 1.20: directory_size opts=errors=ro 00223 bcachefs (vdc): initializing new filesystem 00223 bcachefs (vdc): going read-write 00223 bcachefs (vdc): marking superblocks 00223 bcachefs (vdc): initializing freespace 00223 bcachefs (vdc): done initializing freespace 00223 bcachefs (vdc): reading snapshots table 00223 bcachefs (vdc): reading snapshots done 00223 bcachefs (vdc): done starting filesystem 00244 hrtimer: interrupt took 123350440 ns 00264 bcachefs (vdc): shutting down 00264 bcachefs (vdc): going read-only 00264 bcachefs (vdc): finished waiting for writes to stop 00264 bcachefs (vdc): flushing journal and stopping allocators, journal seq 97 00265 bcachefs (vdc): flushing journal and stopping allocators complete, journal seq 101 00265 bcachefs (vdc): clean shutdown complete, journal seq 102 00265 bcachefs (vdc): marking filesystem clean 00265 bcachefs (vdc): shutdown complete 00265 bcachefs (vdc): starting version 1.20: directory_size opts=errors=ro 00265 bcachefs (vdc): recovering from clean shutdown, journal seq 102 00265 bcachefs (vdc): accounting_read... 00265 ================================================================== 00265 done 00265 BUG: KASAN: slab-use-after-free in bch2_fs_to_text+0x12b4/0x1728 00265 bcachefs (vdc): alloc_read... done 00265 bcachefs (vdc): stripes_read... done 00265 Read of size 4 at addr ffffff80c57eac00 by task cat/7531 00265 bcachefs (vdc): snapshots_read... done 00265 00265 CPU: 6 UID: 0 PID: 7531 Comm: cat Not tainted 6.13.0-rc3-ktest-g16fc6fa3819d #14103 00265 Hardware name: linux,dummy-virt (DT) 00265 Call trace: 00265 show_stack+0x1c/0x30 (C) 00265 dump_stack_lvl+0x6c/0x80 00265 print_report+0xf8/0x5d8 00265 kasan_report+0x90/0xd0 00265 __asan_report_load4_noabort+0x1c/0x28 00265 bch2_fs_to_text+0x12b4/0x1728 00265 bch2_fs_show+0x94/0x188 00265 sysfs_kf_seq_show+0x1a4/0x348 00265 kernfs_seq_show+0x12c/0x198 00265 seq_read_iter+0x27c/0xfd0 00265 kernfs_fop_read_iter+0x390/0x4f8 00265 vfs_read+0x480/0x7f0 00265 ksys_read+0xe0/0x1e8 00265 __arm64_sys_read+0x70/0xa8 00265 invoke_syscall.constprop.0+0x74/0x1e8 00265 do_el0_svc+0xc8/0x1c8 00265 el0_svc+0x20/0x60 00265 el0t_64_sync_handler+0x104/0x130 00265 el0t_64_sync+0x154/0x158 00265 00265 Allocated by task 7510: 00265 kasan_save_stack+0x28/0x50 00265 kasan_save_track+0x1c/0x38 00265 kasan_save_alloc_info+0x3c/0x50 00265 __kasan_kmalloc+0xac/0xb0 00265 __kmalloc_node_noprof+0x168/0x348 00265 __kvmalloc_node_noprof+0x20/0x140 00265 __bch2_darray_resize_noprof+0x90/0x1b0 00265 __bch2_accounting_mem_insert+0x76c/0xb08 00265 bch2_accounting_mem_insert+0x224/0x3b8 00265 bch2_accounting_mem_mod_locked+0x480/0xc58 00265 bch2_accounting_read+0xa94/0x3eb8 00265 bch2_run_recovery_pass+0x80/0x178 00265 bch2_run_recovery_passes+0x340/0x698 00265 bch2_fs_recovery+0x1c98/0x2bd8 00265 bch2_fs_start+0x240/0x490 00265 bch2_fs_get_tree+0xe1c/0x1458 00265 vfs_get_tree+0x7c/0x250 00265 path_mount+0xe24/0x1648 00265 __arm64_sys_mount+0x240/0x438 00265 invoke_syscall.constprop.0+0x74/0x1e8 00265 do_el0_svc+0xc8/0x1c8 00265 el0_svc+0x20/0x60 00265 el0t_64_sync_handler+0x104/0x130 00265 el0t_64_sync+0x154/0x158 00265 00265 Freed by task 7510: 00265 kasan_save_stack+0x28/0x50 00265 kasan_save_track+0x1c/0x38 00265 kasan_save_free_info+0x48/0x88 00265 __kasan_slab_free+0x48/0x60 00265 kfree+0x188/0x408 00265 kvfree+0x3c/0x50 00265 __bch2_darray_resize_noprof+0xe0/0x1b0 00265 __bch2_accounting_mem_insert+0x76c/0xb08 00265 bch2_accounting_mem_insert+0x224/0x3b8 00265 bch2_accounting_mem_mod_locked+0x480/0xc58 00265 bch2_accounting_read+0xa94/0x3eb8 00265 bch2_run_recovery_pass+0x80/0x178 00265 bch2_run_recovery_passes+0x340/0x698 00265 bch2_fs_recovery+0x1c98/0x2bd8 00265 bch2_fs_start+0x240/0x490 00265 bch2_fs_get_tree+0xe1c/0x1458 00265 vfs_get_tree+0x7c/0x250 00265 path_mount+0xe24/0x1648 00265 bcachefs (vdc): going read-write 00265 __arm64_sys_mount+0x240/0x438 00265 invoke_syscall.constprop.0+0x74/0x1e8 00265 do_el0_svc+0xc8/0x1c8 00265 el0_svc+0x20/0x60 00265 el0t_64_sync_handler+0x104/0x130 00265 el0t_64_sync+0x154/0x158 00265 00265 The buggy address belongs to the object at ffffff80c57eac00 00265 which belongs to the cache kmalloc-128 of size 128 00265 The buggy address is located 0 bytes inside of 00265 freed 128-byte region [ffffff80c57eac00, ffffff80c57eac80) 00265 00265 The buggy address belongs to the physical page: 00265 page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1057ea 00265 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 00265 flags: 0x8000000000000040(head|zone=2) 00265 page_type: f5(slab) 00265 raw: 8000000000000040 ffffff80c0002800 dead000000000100 dead000000000122 00265 raw: 0000000000000000 0000000000200020 00000001f5000000 ffffff80c57a6400 00265 head: 8000000000000040 ffffff80c0002800 dead000000000100 dead000000000122 00265 head: 0000000000000000 0000000000200020 00000001f5000000 ffffff80c57a6400 00265 head: 8000000000000001 fffffffec315fa81 ffffffffffffffff 0000000000000000 00265 head: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000 00265 page dumped because: kasan: bad access detected 00265 00265 Memory state around the buggy address: 00265 ffffff80c57eab00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00265 ffffff80c57eab80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc 00265 >ffffff80c57eac00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb 00265 ^ 00265 ffffff80c57eac80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc 00265 ffffff80c57ead00: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc 00265 ================================================================== 00265 Kernel panic - not syncing: kasan.fault=panic set ... 00265 CPU: 6 UID: 0 PID: 7531 Comm: cat Not tainted 6.13.0-rc3-ktest-g16fc6fa3819d #14103 00265 Hardware name: linux,dummy-virt (DT) 00265 Call trace: 00265 show_stack+0x1c/0x30 (C) 00265 dump_stack_lvl+0x30/0x80 00265 dump_stack+0x18/0x20 00265 panic+0x4d4/0x518 00265 start_report.constprop.0+0x0/0x90 00265 kasan_report+0xa0/0xd0 00265 __asan_report_load4_noabort+0x1c/0x28 00265 bch2_fs_to_text+0x12b4/0x1728 00265 bch2_fs_show+0x94/0x188 00265 sysfs_kf_seq_show+0x1a4/0x348 00265 kernfs_seq_show+0x12c/0x198 00265 seq_read_iter+0x27c/0xfd0 00265 kernfs_fop_read_iter+0x390/0x4f8 00265 vfs_read+0x480/0x7f0 00265 ksys_read+0xe0/0x1e8 00265 __arm64_sys_read+0x70/0xa8 00265 invoke_syscall.constprop.0+0x74/0x1e8 00265 do_el0_svc+0xc8/0x1c8 00265 el0_svc+0x20/0x60 00265 el0t_64_sync_handler+0x104/0x130 00265 el0t_64_sync+0x154/0x158 00265 SMP: stopping secondary CPUs 00265 Kernel Offset: disabled 00265 CPU features: 0x000,00000070,00000010,8240500b 00265 Memory Limit: none 00265 ---[ end Kernel panic - not syncing: kasan.fault=panic set ... ]--- 00270 ========= FAILED TIMEOUT generic.187 in 1200s Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet fs/bcachefs/disk_accounting.h | 2 ++ 1 file changed, 2 insertions(+) commit 12606fe73f33647c5e79bf666833bf0b225e649d Author: Fabio Porcedda Date: Wed Feb 5 18:16:47 2025 +0100 USB: serial: option: fix Telit Cinterion FN990A name The correct name for FN990 is FN990A so use it in order to avoid confusion with FN990B. Signed-off-by: Fabio Porcedda Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c979fb5ece2dc11cc9cc3d5c66f750e210bfdee2 Author: Fabio Porcedda Date: Wed Feb 5 18:16:45 2025 +0100 USB: serial: option: add Telit Cinterion FN990B compositions Add the following Telit Cinterion FN990B40 compositions: 0x10d0: rmnet + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) + tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 17 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1bc7 ProdID=10d0 Rev=05.15 S: Manufacturer=Telit Cinterion S: Product=FN990 S: SerialNumber=43b38f19 C: #Ifs= 9 Cfg#= 1 Atr=e0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 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#= 2 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#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=88(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8a(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=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms 0x10d1: MBIM + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) + tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 16 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1bc7 ProdID=10d1 Rev=05.15 S: Manufacturer=Telit Cinterion S: Product=FN990 S: SerialNumber=43b38f19 C: #Ifs=10 Cfg#= 1 Atr=e0 MxPwr=500mA 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= 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=60 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= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=88(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8a(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 8 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms 0x10d2: RNDIS + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) + tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 18 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1bc7 ProdID=10d2 Rev=05.15 S: Manufacturer=Telit Cinterion S: Product=FN990 S: SerialNumber=43b38f19 C: #Ifs=10 Cfg#= 1 Atr=e0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 1 Cls=ef(misc ) Sub=04 Prot=01 Driver=rndis_host E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host 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=60 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= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=88(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8a(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 8 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms 0x10d3: ECM + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) + tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 20 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1bc7 ProdID=10d3 Rev=05.15 S: Manufacturer=Telit Cinterion S: Product=FN990 S: SerialNumber=43b38f19 C: #Ifs=10 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=60 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= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=88(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8a(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 8 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms Cc: stable@vger.kernel.org Signed-off-by: Fabio Porcedda Reviewed-by: Daniele Palmas Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 5728c92ae112301936006c5e305677beb1a7f578 Author: Rob Herring (Arm) Date: Fri Jan 24 13:16:44 2025 -0600 mfd: syscon: Restore device_node_to_regmap() for non-syscon nodes Commit ba5095ebbc7a ("mfd: syscon: Allow syscon nodes without a "syscon" compatible") broke drivers which call device_node_to_regmap() on nodes without a "syscon" compatible. Restore the prior behavior for device_node_to_regmap(). This also makes using device_node_to_regmap() incompatible with of_syscon_register_regmap() again, so add kerneldoc for device_node_to_regmap() and syscon_node_to_regmap() to make it clear how and when each one should be used. Fixes: ba5095ebbc7a ("mfd: syscon: Allow syscon nodes without a "syscon" compatible") Reported-by: Vaishnav Achath Signed-off-by: Rob Herring (Arm) Reviewed-by: Daniel Golle Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Tested-by: Nishanth Menon Tested-by: Daniel Golle Tested-by: Frank Wunderlich Tested-by: Dhruva Gole Tested-by: Nícolas F. R. A. Prado Tested-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250124191644.2309790-1-robh@kernel.org Signed-off-by: Lee Jones drivers/mfd/syscon.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit db79e75460fc59b19f9c89d4b068e61cee59f37d Author: Chester A. Unal Date: Fri Jan 24 10:28:00 2025 +0000 USB: serial: option: add MeiG Smart SLM828 MeiG Smart SLM828 is an LTE-A CAT6 modem with the mPCIe form factor. The "Cls=ff(vend.) Sub=10 Prot=02" and "Cls=ff(vend.) Sub=10 Prot=03" interfaces respond to AT commands. Add these interfaces. The product ID the modem uses is shared across multiple modems. Therefore, add comments to describe which interface is used for which modem. T: Bus=01 Lev=01 Prnt=05 Port=01 Cnt=01 Dev#= 6 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2dee ProdID=4d22 Rev=05.04 S: Manufacturer=MEIG S: Product=LTE-A Module S: SerialNumber=4da7ec42 C: #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=10 Prot=01 Driver=(none) 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= 3 Cls=ff(vend.) Sub=10 Prot=02 Driver=(none) E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=10 Prot=03 Driver=(none) E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=10 Prot=04 Driver=(none) E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 4 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I: If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=10 Prot=05 Driver=qmi_wwan E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Chester A. Unal Link: https://lore.kernel.org/20250124-for-johan-meig-slm828-v2-1-6b4cd3f6344f@arinc9.com Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 2afd96a4a0b1d62c7a44227e535b073926d73368 Author: Baojun Xu Date: Tue Feb 11 16:39:41 2025 +0800 ALSA: hda/tas2781: Update tas2781 hda SPI driver Because firmware issue of platform, found spi device is not stable, so add status check before firmware download, and remove some operations which is not must in current stage. Signed-off-by: Baojun Xu Fixes: bb5f86ea50ff ("ALSA: hda/tas2781: Add tas2781 hda SPI driver") Link: https://patch.msgid.link/20250211083941.5574-1-baojun.xu@ti.com Signed-off-by: Takashi Iwai sound/pci/hda/tas2781_hda_spi.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 86ede0a61f8576a84bb0a93c5d9861d2ec1cdf9a Author: Christian Marangi Date: Sun Feb 9 15:09:38 2025 +0100 mtd: rawnand: qcom: fix broken config in qcom_param_page_type_exec Fix broken config in qcom_param_page_type_exec caused by copy-paste error from commit 0c08080fd71c ("mtd: rawnand: qcom: use FIELD_PREP and GENMASK") In qcom_param_page_type_exec the value needs to be set to nandc->regs->cfg0 instead of host->cfg0. This wrong configuration caused the Qcom NANDC driver to malfunction on any device that makes use of it (IPQ806x, IPQ40xx, IPQ807x, IPQ60xx) with the following error: [ 0.885369] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xaa [ 0.885909] nand: Micron NAND 256MiB 1,8V 8-bit [ 0.892499] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 [ 0.896823] nand: ECC (step, strength) = (512, 8) does not fit in OOB [ 0.896836] qcom-nandc 79b0000.nand-controller: No valid ECC settings possible [ 0.910996] bam-dma-engine 7984000.dma-controller: Cannot free busy channel [ 0.918070] qcom-nandc: probe of 79b0000.nand-controller failed with error -28 Restore original configuration fix the problem and makes the driver work again. Also restore the wrongly dropped cpu_to_le32 to correctly support BE systems. Cc: stable@vger.kernel.org Fixes: 0c08080fd71c ("mtd: rawnand: qcom: use FIELD_PREP and GENMASK") Tested-by: Robert Marko # IPQ8074 and IPQ6018 Signed-off-by: Christian Marangi Reviewed-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/qcom_nandc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 3640dbc1f75ce15d128ea4af44226960d894f3fd Author: Ilan Peer Date: Sun Feb 9 14:34:53 2025 +0200 wifi: iwlwifi: Fix A-MSDU TSO preparation The TSO preparation assumed that the skb head contained the headers while the rest of the data was in the fragments. Since this is not always true, e.g., it is possible that the data was linearised, modify the TSO preparation to start the data processing after the network headers. Fixes: 7f5e3038f029 ("wifi: iwlwifi: map entire SKB when sending AMSDUs") Signed-off-by: Ilan Peer Reviewed-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250209143303.75769a4769bf.Iaf79e8538093cdf8c446c292cc96164ad6498f61@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 5 +++-- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 5 +++-- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 20 ++++++++++++-------- 3 files changed, 18 insertions(+), 12 deletions(-) commit 3b08e608d50c44ca1135beed179f266aa0461da7 Author: Ilan Peer Date: Sun Feb 9 14:34:52 2025 +0200 wifi: iwlwifi: Free pages allocated when failing to build A-MSDU When failing to prepare the data needed for A-MSDU transmission, the memory allocated for the TSO management was not freed. Fix it. Fixes: 7f5e3038f029 ("wifi: iwlwifi: map entire SKB when sending AMSDUs") Signed-off-by: Ilan Peer Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250209143303.bc27fad9b3d5.Ibf43dd18fb652b1a59061204e081f11c9fa34a3f@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 1 + 1 file changed, 1 insertion(+) commit e0dc2c1bef722cbf16ae557690861e5f91208129 Author: Johannes Berg Date: Sun Feb 9 14:34:51 2025 +0200 wifi: iwlwifi: limit printed string from FW file There's no guarantee here that the file is always with a NUL-termination, so reading the string may read beyond the end of the TLV. If that's the last TLV in the file, it can perhaps even read beyond the end of the file buffer. Fix that by limiting the print format to the size of the buffer we have. Fixes: aee1b6385e29 ("iwlwifi: support fseq tlv and print fseq version") Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250209143303.cb5f9d0c2f5d.Idec695d53c6c2234aade306f7647b576c7e3d928@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a03e2082e678ea10d0d8bdf3ed933eb05a8ddbb0 Author: Emmanuel Grumbach Date: Sun Feb 9 14:34:50 2025 +0200 wifi: iwlwifi: mvm: use the right version of the rate API The firmware uses the newer version of the API in recent devices. For older devices, we translate the rate to the new format. Don't parse the rate with old parsing macros. Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250209143303.13d70cdcbb4e.Ic92193bce4013b70a823cfef250ee79c16cf7c17@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d73d2c6e3313f0ba60711ab4f4b9044eddca9ca5 Author: Emmanuel Grumbach Date: Sun Feb 9 14:34:49 2025 +0200 wifi: iwlwifi: mvm: don't try to talk to a dead firmware This fixes: bad state = 0 WARNING: CPU: 10 PID: 702 at drivers/net/wireless/inel/iwlwifi/iwl-trans.c:178 iwl_trans_send_cmd+0xba/0xe0 [iwlwifi] Call Trace: ? __warn+0xca/0x1c0 ? iwl_trans_send_cmd+0xba/0xe0 [iwlwifi 64fa9ad799a0e0d2ba53d4af93a53ad9a531f8d4] iwl_fw_dbg_clear_monitor_buf+0xd7/0x110 [iwlwifi 64fa9ad799a0e0d2ba53d4af93a53ad9a531f8d4] _iwl_dbgfs_fw_dbg_clear_write+0xe2/0x120 [iwlmvm 0e8adb18cea92d2c341766bcc10b18699290068a] Ask whether the firmware is alive before sending a command. Fixes: 268712dc3b34 ("wifi: iwlwifi: mvm: add a debugfs hook to clear the monitor data") Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250209143303.8e1597b62c70.I12ea71dd9b805b095c9fc12a10c9f34a4e801b61@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d48ff3ce92259bae7e77732c7cfd7cbc7992c021 Author: Emmanuel Grumbach Date: Sun Feb 9 14:34:48 2025 +0200 wifi: iwlwifi: mvm: don't dump the firmware state upon RFKILL while suspend This is not really a firmware error. We need to reload the firmware, but this doesn't mean that we should consider this as a firmware error. When the firmware was restarted upon resume, this wasn't felt by the driver. Now that we keep the firmware running during suspend even if we don't have wowlan, this started to pop-up. Fixes: e8bb19c1d590 ("wifi: iwlwifi: support fast resume") Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250209143303.a10463a40318.I14131781c3124b58e60e1f5e9d793a2bc88b464c@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 77 +++++++++++++++++++---------- 1 file changed, 51 insertions(+), 26 deletions(-) commit f9751163bffd3fe60794929829f810968c6de73d Author: Johannes Berg Date: Sun Feb 9 14:34:47 2025 +0200 wifi: iwlwifi: mvm: clean up ROC on failure If the firmware fails to start the session protection, then we do call iwl_mvm_roc_finished() here, but that won't do anything at all because IWL_MVM_STATUS_ROC_P2P_RUNNING was never set. Set IWL_MVM_STATUS_ROC_P2P_RUNNING in the failure/stop path. If it started successfully before, it's already set, so that doesn't matter, and if it didn't start it needs to be set to clean up. Not doing so will lead to a WARN_ON() later on a fresh remain- on-channel, since the link is already active when activated as it was never deactivated. Fixes: 35c1bbd93c4e ("wifi: iwlwifi: mvm: remove IWL_MVM_STATUS_NEED_FLUSH_P2P") Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250209143303.0fe36c291068.I67f5dac742170dd937f11e4d4f937f45f71b7cb4@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 2 ++ 1 file changed, 2 insertions(+) commit 3f8aa0b8a53df2247a84eaf3b3aa38b6ef86cb1c Author: Miri Korenblit Date: Sun Feb 9 14:34:46 2025 +0200 wifi: iwlwifi: fw: avoid using an uninitialized variable iwl_fwrt_read_err_table can return true also when it failed to read the memory. In this case, err_id argument is not initialized, but the callers are still using it. Simply initialize it to 0. If the error table was read successfully it'll be overridden. Fixes: 43e0b2ada519 ("wifi: iwlwifi: fw: add an error table status getter") Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20250209143303.37cdbba4eb56.I95fe9bd95303b8179f946766558a9f15f4fe254c@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/dump.c | 3 +++ 1 file changed, 3 insertions(+) commit 7774e3920029398ad49dc848b23840593f14d515 Author: Johannes Berg Date: Sun Feb 9 14:34:45 2025 +0200 wifi: iwlwifi: fw: allocate chained SG tables for dump The firmware dumps can be pretty big, and since we use single pages for each SG table entry, even the table itself may end up being an order-5 allocation. Build chained tables so that we need not allocate a higher-order table here. This could be improved and cleaned up, e.g. by using the SG pool code or simply kvmalloc(), but all of that would require also updating the devcoredump first since that frees it all, so we need to be more careful. SG pool might also run against the CONFIG_ARCH_NO_SG_CHAIN limitation, which is irrelevant here. Also use _devcd_free_sgtable() for the error paths now, much simpler especially since it's in two places now. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250209143303.697c7a465ac9.Iea982df46b5c075bfb77ade36f187d99a70c63db@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 86 +++++++++++++++++++---------- 1 file changed, 58 insertions(+), 28 deletions(-) commit 646262c71aca87bb66945933abe4e620796d6c5a Author: Alexander Wetzel Date: Tue Feb 4 17:42:40 2025 +0100 wifi: mac80211: remove debugfs dir for virtual monitor Don't call ieee80211_debugfs_recreate_netdev() for virtual monitor interface when deleting it. The virtual monitor interface shouldn't have debugfs entries and trying to update them will *create* them on deletion. And when the virtual monitor interface is created/destroyed multiple times we'll get warnings about debugfs name conflicts. Signed-off-by: Alexander Wetzel Link: https://patch.msgid.link/20250204164240.370153-1-Alexander@wetzel-home.de Signed-off-by: Johannes Berg net/mac80211/driver-ops.c | 10 ++++++++-- net/mac80211/iface.c | 11 ++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) commit 5b999006e35ea9c11116ddff7e375b256421d0af Author: Alexander Wetzel Date: Tue Feb 4 13:31:29 2025 +0100 wifi: mac80211: Cleanup sta TXQs on flush Drop the sta TXQs on flush when the drivers is not supporting flush. ieee80211_set_disassoc() tries to clean up everything for the sta. But it ignored queued frames in the sta TX queues when the driver isn't supporting the flush driver ops. Signed-off-by: Alexander Wetzel Link: https://patch.msgid.link/20250204123129.9162-1-Alexander@wetzel-home.de Signed-off-by: Johannes Berg net/mac80211/util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 49f27f29446a5bfe633dd2cc0cfebd48a1a5e77f Author: Vitaliy Shevtsov Date: Fri Jan 31 20:26:55 2025 +0500 wifi: nl80211: reject cooked mode if it is set along with other flags It is possible to set both MONITOR_FLAG_COOK_FRAMES and MONITOR_FLAG_ACTIVE flags simultaneously on the same monitor interface from the userspace. This causes a sub-interface to be created with no IEEE80211_SDATA_IN_DRIVER bit set because the monitor interface is in the cooked state and it takes precedence over all other states. When the interface is then being deleted the kernel calls WARN_ONCE() from check_sdata_in_driver() because of missing that bit. Fix this by rejecting MONITOR_FLAG_COOK_FRAMES if it is set along with other flags. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 66f7ac50ed7c ("nl80211: Add monitor interface configuration flags") Cc: stable@vger.kernel.org Reported-by: syzbot+2e5c1e55b9e5c28a3da7@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=2e5c1e55b9e5c28a3da7 Signed-off-by: Vitaliy Shevtsov Link: https://patch.msgid.link/20250131152657.5606-1-v.shevtsov@mt-integration.ru Signed-off-by: Johannes Berg net/wireless/nl80211.c | 5 +++++ 1 file changed, 5 insertions(+) commit 44ce3511c21c6ba87a719a0b9f140822cc1cc00b Merge: 2196ceea2d39 f4c9c2cc827d Author: Paolo Abeni Date: Tue Feb 11 10:39:46 2025 +0100 Merge tag 'batadv-net-pullrequest-20250207' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are some batman-adv bugfixes: - Fix panic during interface removal in BATMAN V, by Andy Strohman - Cleanup BATMAN V/ELP metric handling, by Sven Eckelmann (2 patches) - Fix incorrect offset in batadv_tt_tvlv_ogm_handler_v1(), by Remi Pommarel * tag 'batadv-net-pullrequest-20250207' of git://git.open-mesh.org/linux-merge: batman-adv: Fix incorrect offset in batadv_tt_tvlv_ogm_handler_v1() batman-adv: Drop unmanaged ELP metric worker batman-adv: Ignore neighbor throughput metrics in error case batman-adv: fix panic during interface removal ==================== Link: https://patch.msgid.link/20250207095823.26043-1-sw@simonwunderlich.de Signed-off-by: Paolo Abeni commit 2196ceea2d39018a85a037cbb4c22666edb5a72c Merge: 8e248f2dbb18 b4c1fde5ced9 Author: Paolo Abeni Date: Tue Feb 11 10:20:55 2025 +0100 Merge branch 'ptp-vmclock-bugfixes-and-cleanups-for-error-handling' says: ==================== ptp: vmclock: bugfixes and cleanups for error handling Some error handling issues I noticed while looking at the code. Only compile-tested. v1: https://lore.kernel.org/r/20250206-vmclock-probe-v1-0-17a3ea07be34@linutronix.de Signed-off-by: Thomas Weißschuh ==================== Link: https://patch.msgid.link/20250207-vmclock-probe-v2-0-bc2fce0bdf07@linutronix.de Signed-off-by: Paolo Abeni commit b4c1fde5ced93d9f4ad89e2c940d3fd56ad82288 Author: Thomas Weißschuh Date: Fri Feb 7 10:39:06 2025 +0100 ptp: vmclock: Remove goto-based cleanup logic vmclock_probe() uses an "out:" label to return from the function on error. This indicates that some cleanup operation is necessary. However the label does not do anything as all resources are managed through devres, making the code slightly harder to read. Remove the label and just return directly. Signed-off-by: Thomas Weißschuh Acked-by: Richard Cochran Reviewed-by: David Woodhouse Signed-off-by: Paolo Abeni drivers/ptp/ptp_vmclock.c | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) commit 9a884c3800b207bac36e27be4ec7277c78a84568 Author: Thomas Weißschuh Date: Fri Feb 7 10:39:05 2025 +0100 ptp: vmclock: Clean up miscdev and ptp clock through devres Most resources owned by the vmclock device are managed through devres. Only the miscdev and ptp clock are managed manually. This makes the code slightly harder to understand than necessary. Switch them over to devres and remove the now unnecessary drvdata. Signed-off-by: Thomas Weißschuh Acked-by: Richard Cochran Reviewed-by: David Woodhouse Signed-off-by: Paolo Abeni drivers/ptp/ptp_vmclock.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 39e926c3a21b25af6cae479fbb752f193240ce03 Author: Thomas Weißschuh Date: Fri Feb 7 10:39:04 2025 +0100 ptp: vmclock: Don't unregister misc device if it was not registered vmclock_remove() tries to detect the successful registration of the misc device based on the value of its minor value. However that check is incorrect if the misc device registration was not attempted in the first place. Always initialize the minor number, so the check works properly. Fixes: 205032724226 ("ptp: Add support for the AMZNC10C 'vmclock' device") Cc: stable@vger.kernel.org Signed-off-by: Thomas Weißschuh Acked-by: Richard Cochran Reviewed-by: David Woodhouse Signed-off-by: Paolo Abeni drivers/ptp/ptp_vmclock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f7d07cd4f77d77f366c8ffbb8ba8b61f614e5fce Author: Thomas Weißschuh Date: Fri Feb 7 10:39:03 2025 +0100 ptp: vmclock: Set driver data before its usage If vmclock_ptp_register() fails during probing, vmclock_remove() is called to clean up the ptp clock and misc device. It uses dev_get_drvdata() to access the vmclock state. However the driver data is not yet set at this point. Assign the driver data earlier. Fixes: 205032724226 ("ptp: Add support for the AMZNC10C 'vmclock' device") Cc: stable@vger.kernel.org Signed-off-by: Thomas Weißschuh Reviewed-by: Mateusz Polchlopek Acked-by: Richard Cochran Reviewed-by: David Woodhouse Signed-off-by: Paolo Abeni drivers/ptp/ptp_vmclock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7b07b040257c1b658ef3eca86e4b6ae02d65069c Author: David Woodhouse Date: Fri Feb 7 10:39:02 2025 +0100 ptp: vmclock: Add .owner to vmclock_miscdev_fops Without the .owner field, the module can be unloaded while /dev/vmclock0 is open, leading to an oops. Fixes: 205032724226 ("ptp: Add support for the AMZNC10C 'vmclock' device") Cc: stable@vger.kernel.org Signed-off-by: David Woodhouse Signed-off-by: Thomas Weißschuh Signed-off-by: Paolo Abeni drivers/ptp/ptp_vmclock.c | 1 + 1 file changed, 1 insertion(+) commit 615279db222c3ac56d5c93716efd72b843295c1f Author: Artur Weber Date: Thu Feb 6 18:46:02 2025 +0100 gpio: bcm-kona: Add missing newline to dev_err format string Add a missing newline to the format string of the "Couldn't get IRQ for bank..." error message. Fixes: 757651e3d60e ("gpio: bcm281xx: Add GPIO driver") Reviewed-by: Florian Fainelli Reviewed-by: Markus Mayer Signed-off-by: Artur Weber Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250206-kona-gpio-fixes-v2-3-409135eab780@gmail.com Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-bcm-kona.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57f5db77a915cc29461a679a6bcae7097967be1a Author: Artur Weber Date: Thu Feb 6 18:46:01 2025 +0100 gpio: bcm-kona: Make sure GPIO bits are unlocked when requesting IRQ The settings for all GPIOs are locked by default in bcm_kona_gpio_reset. The settings for a GPIO are unlocked when requesting it as a GPIO, but not when requesting it as an interrupt, causing the IRQ settings to not get applied. Fix this by making sure to unlock the right bits when an IRQ is requested. To avoid a situation where an IRQ being released causes a lock despite the same GPIO being used by a GPIO request or vice versa, add an unlock counter and only lock if it reaches 0. Fixes: 757651e3d60e ("gpio: bcm281xx: Add GPIO driver") Reviewed-by: Florian Fainelli Reviewed-by: Markus Mayer Signed-off-by: Artur Weber Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250206-kona-gpio-fixes-v2-2-409135eab780@gmail.com Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-bcm-kona.c | 67 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 55 insertions(+), 12 deletions(-) commit de1d0d160f64ee76df1d364d521b2faf465a091c Author: Artur Weber Date: Thu Feb 6 18:46:00 2025 +0100 gpio: bcm-kona: Fix GPIO lock/unlock for banks above bank 0 The GPIO lock/unlock functions clear/write a bit to the relevant register for each bank. However, due to an oversight the bit that was being written was based on the total GPIO number, not the index of the GPIO within the relevant bank, causing it to fail for any GPIO above 32 (thus any GPIO for banks above bank 0). Fix lock/unlock for these banks by using the correct bit. Fixes: bdb93c03c550 ("gpio: bcm281xx: Centralize register locking") Reviewed-by: Florian Fainelli Reviewed-by: Markus Mayer Signed-off-by: Artur Weber Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250206-kona-gpio-fixes-v2-1-409135eab780@gmail.com Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-bcm-kona.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8e248f2dbb1885647e259837d38200942f3591a3 Merge: 17847ea6ced8 f7f0adfe64de Author: Jakub Kicinski Date: Mon Feb 10 19:24:05 2025 -0800 Merge tag 'linux-can-fixes-for-6.14-20250208' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2025-02-08 The first patch is by Reyders Morales and fixes a code example in the CAN ISO15765-2 documentation. The next patch is contributed by Alexander Hölzl and fixes sending of J1939 messages with zero data length. Fedor Pchelkin's patch for the ctucanfd driver adds a missing handling for an skb allocation error. Krzysztof Kozlowski contributes a patch for the c_can driver to fix unbalanced runtime PM disable in error path. The next patch is by Vincent Mailhol and fixes a NULL pointer dereference on udev->serial in the etas_es58x driver. The patch is by Robin van der Gracht and fixes the handling for an skb allocation error. * tag 'linux-can-fixes-for-6.14-20250208' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: rockchip: rkcanfd_handle_rx_fifo_overflow_int(): bail out if skb cannot be allocated can: etas_es58x: fix potential NULL pointer dereference on udev->serial can: c_can: fix unbalanced runtime PM disable in error path can: ctucanfd: handle skb allocation failure can: j1939: j1939_sk_send_loop(): fix unable to send messages with data length zero Documentation/networking: fix basic node example document ISO 15765-2 ==================== Link: https://patch.msgid.link/20250208115120.237274-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 17847ea6ced8f645646ef93e8826a36e434fcb2c Merge: 9dfedb8dc78b b76adb9758f8 Author: Jakub Kicinski Date: Mon Feb 10 18:13:06 2025 -0800 Merge tag 'wireless-2025-02-07' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.14-rc3 We have only one fix for ath12k and one fix for brcmfmac. Also this will be my last pull request as I'm stepping down as wireless driver maintainer. * tag 'wireless-2025-02-07' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: MAINTAINERS: wifi: remove Kalle MAINTAINERS: wifi: ath: remove Kalle wifi: brcmfmac: use random seed flag for BCM4355 and BCM4364 firmware wifi: ath12k: fix handling of 6 GHz rules ==================== Link: https://patch.msgid.link/20250207182957.23315C4CED1@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 9dfedb8dc78b4eff15873a2e29731cf7028058ab Merge: cb6cc8ed7717 087c1faa594f Author: Jakub Kicinski Date: Mon Feb 10 18:09:11 2025 -0800 Merge branch 'net-second-round-to-use-dev_net_rcu' Eric Dumazet says: ==================== net: second round to use dev_net_rcu() dev_net(dev) should either be protected by RTNL or RCU. There is no LOCKDEP support yet for this helper. Adding it would trigger too many splats. This second series fixes some of them. ==================== Link: https://patch.msgid.link/20250207135841.1948589-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 087c1faa594fa07a66933d750c0b2610aa1a2946 Author: Eric Dumazet Date: Fri Feb 7 13:58:40 2025 +0000 ipv6: mcast: extend RCU protection in igmp6_send() igmp6_send() can be called without RTNL or RCU being held. Extend RCU protection so that we can safely fetch the net pointer and avoid a potential UAF. Note that we no longer can use sock_alloc_send_skb() because ipv6.igmp_sk uses GFP_KERNEL allocations which can sleep. Instead use alloc_skb() and charge the net->ipv6.igmp_sk socket under RCU protection. Fixes: b8ad0cbc58f7 ("[NETNS][IPV6] mcast - handle several network namespace") Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250207135841.1948589-9-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv6/mcast.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit ed6ae1f325d3c43966ec1b62ac1459e2b8e45640 Author: Eric Dumazet Date: Fri Feb 7 13:58:39 2025 +0000 ndisc: extend RCU protection in ndisc_send_skb() ndisc_send_skb() can be called without RTNL or RCU held. Acquire rcu_read_lock() earlier, so that we can use dev_net_rcu() and avoid a potential UAF. Fixes: 1762f7e88eb3 ("[NETNS][IPV6] ndisc - make socket control per namespace") Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250207135841.1948589-8-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv6/ndisc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 6d0ce46a93135d96b7fa075a94a88fe0da8e8773 Author: Eric Dumazet Date: Fri Feb 7 13:58:38 2025 +0000 vrf: use RCU protection in l3mdev_l3_out() l3mdev_l3_out() can be called without RCU being held: raw_sendmsg() ip_push_pending_frames() ip_send_skb() ip_local_out() __ip_local_out() l3mdev_ip_out() Add rcu_read_lock() / rcu_read_unlock() pair to avoid a potential UAF. Fixes: a8e3e1a9f020 ("net: l3mdev: Add hook to output path") Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250207135841.1948589-7-edumazet@google.com Signed-off-by: Jakub Kicinski include/net/l3mdev.h | 2 ++ 1 file changed, 2 insertions(+) commit 90b2f49a502fa71090d9f4fe29a2f51fe5dff76d Author: Eric Dumazet Date: Fri Feb 7 13:58:37 2025 +0000 openvswitch: use RCU protection in ovs_vport_cmd_fill_info() ovs_vport_cmd_fill_info() can be called without RTNL or RCU. Use RCU protection and dev_net_rcu() to avoid potential UAF. Fixes: 9354d4520342 ("openvswitch: reliable interface indentification in port dumps") Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250207135841.1948589-6-edumazet@google.com Signed-off-by: Jakub Kicinski net/openvswitch/datapath.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit a42b69f692165ec39db42d595f4f65a4c8f42e44 Author: Eric Dumazet Date: Fri Feb 7 13:58:36 2025 +0000 arp: use RCU protection in arp_xmit() arp_xmit() can be called without RTNL or RCU protection. Use RCU protection to avoid potential UAF. Fixes: 29a26a568038 ("netfilter: Pass struct net into the netfilter hooks") Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250207135841.1948589-5-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/arp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit becbd5850c03ed33b232083dd66c6e38c0c0e569 Author: Eric Dumazet Date: Fri Feb 7 13:58:35 2025 +0000 neighbour: use RCU protection in __neigh_notify() __neigh_notify() can be called without RTNL or RCU protection. Use RCU protection to avoid potential UAF. Fixes: 426b5303eb43 ("[NETNS]: Modify the neighbour table code so it handles multiple network namespaces") Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250207135841.1948589-4-edumazet@google.com Signed-off-by: Jakub Kicinski net/core/neighbour.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 628e6d18930bbd21f2d4562228afe27694f66da9 Author: Eric Dumazet Date: Fri Feb 7 13:58:34 2025 +0000 ndisc: use RCU protection in ndisc_alloc_skb() ndisc_alloc_skb() can be called without RTNL or RCU being held. Add RCU protection to avoid possible UAF. Fixes: de09334b9326 ("ndisc: Introduce ndisc_alloc_skb() helper.") Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250207135841.1948589-3-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv6/ndisc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 48145a57d4bbe3496e8e4880b23ea6b511e6e519 Author: Eric Dumazet Date: Fri Feb 7 13:58:33 2025 +0000 ndisc: ndisc_send_redirect() must use dev_get_by_index_rcu() ndisc_send_redirect() is called under RCU protection, not RTNL. It must use dev_get_by_index_rcu() instead of __dev_get_by_index() Fixes: 2f17becfbea5 ("vrf: check the original netdevice for generating redirect") Signed-off-by: Eric Dumazet Cc: Stephen Suryaputra Reviewed-by: David Ahern Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250207135841.1948589-2-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv6/ndisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb6cc8ed77177c7553c2f8ac8605d32de58f43ac Author: Furong Xu <0x1207@gmail.com> Date: Fri Feb 7 16:56:39 2025 +0800 net: stmmac: Apply new page pool parameters when SPH is enabled Commit df542f669307 ("net: stmmac: Switch to zero-copy in non-XDP RX path") makes DMA write received frame into buffer at offset of NET_SKB_PAD and sets page pool parameters to sync from offset of NET_SKB_PAD. But when Header Payload Split is enabled, the header is written at offset of NET_SKB_PAD, while the payload is written at offset of zero. Uncorrect offset parameter for the payload breaks dma coherence [1] since both CPU and DMA touch the page buffer from offset of zero which is not handled by the page pool sync parameter. And in case the DMA cannot split the received frame, for example, a large L2 frame, pp_params.max_len should grow to match the tail of entire frame. [1] https://lore.kernel.org/netdev/d465f277-bac7-439f-be1d-9a47dfe2d951@nvidia.com/ Reported-by: Jon Hunter Reported-by: Brad Griffis Suggested-by: Ido Schimmel Fixes: df542f669307 ("net: stmmac: Switch to zero-copy in non-XDP RX path") Signed-off-by: Furong Xu <0x1207@gmail.com> Tested-by: Jon Hunter Tested-by: Thierry Reding Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20250207085639.13580-1-0x1207@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +++++ 1 file changed, 5 insertions(+) commit febbc555cf0fff895546ddb8ba2c9a523692fb55 Merge: 58c9bf3363e5 4990d098433d Author: Linus Torvalds Date: Mon Feb 10 13:11:24 2025 -0800 Merge tag 'nfsd-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: "Fixes for new bugs: - A fix for CB_GETATTR reply decoding was not quite correct - Fix the NFSD connection limiting logic - Fix a bug in the new session table resizing logic Bugs that pre-date v6.14: - Support for courteous clients (5.19) introduced a shutdown hang - Fix a crash in the filecache laundrette (6.9) - Fix a zero-day crash in NFSD's NFSv3 ACL implementation" * tag 'nfsd-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: NFSD: Fix CB_GETATTR status fix NFSD: fix hang in nfsd4_shutdown_callback nfsd: fix __fh_verify for localio nfsd: fix uninitialised slot info when a request is retried nfsd: validate the nfsd_serv pointer before calling svc_wake_up nfsd: clear acl_access/acl_default after releasing them commit f3f08c3acfb8860e07a22814a344e83c99ad7398 Author: Tejun Heo Date: Mon Feb 10 09:27:09 2025 -1000 sched_ext: Fix incorrect assumption about migration disabled tasks in task_can_run_on_remote_rq() While fixing migration disabled task handling, 32966821574c ("sched_ext: Fix migration disabled handling in targeted dispatches") assumed that a migration disabled task's ->cpus_ptr would only have the pinned CPU. While this is eventually true for migration disabled tasks that are switched out, ->cpus_ptr update is performed by migrate_disable_switch() which is called right before context_switch() in __scheduler(). However, the task is enqueued earlier during pick_next_task() via put_prev_task_scx(), so there is a race window where another CPU can see the task on a DSQ. If the CPU tries to dispatch the migration disabled task while in that window, task_allowed_on_cpu() will succeed and task_can_run_on_remote_rq() will subsequently trigger SCHED_WARN(is_migration_disabled()). WARNING: CPU: 8 PID: 1837 at kernel/sched/ext.c:2466 task_can_run_on_remote_rq+0x12e/0x140 Sched_ext: layered (enabled+all), task: runnable_at=-10ms RIP: 0010:task_can_run_on_remote_rq+0x12e/0x140 ... consume_dispatch_q+0xab/0x220 scx_bpf_dsq_move_to_local+0x58/0xd0 bpf_prog_84dd17b0654b6cf0_layered_dispatch+0x290/0x1cfa bpf__sched_ext_ops_dispatch+0x4b/0xab balance_one+0x1fe/0x3b0 balance_scx+0x61/0x1d0 prev_balance+0x46/0xc0 __pick_next_task+0x73/0x1c0 __schedule+0x206/0x1730 schedule+0x3a/0x160 __do_sys_sched_yield+0xe/0x20 do_syscall_64+0xbb/0x1e0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Fix it by converting the SCHED_WARN() back to a regular failure path. Also, perform the migration disabled test before task_allowed_on_cpu() test so that BPF schedulers which fail to handle migration disabled tasks can be noticed easily. While at it, adjust scx_ops_error() message for !task_allowed_on_cpu() case for brevity and consistency. Signed-off-by: Tejun Heo Fixes: 32966821574c ("sched_ext: Fix migration disabled handling in targeted dispatches") Acked-by: Andrea Righi Reported-by: Jake Hillion kernel/sched/ext.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 4990d098433db18c854e75fb0f90d941eb7d479e Author: Chuck Lever Date: Mon Feb 10 11:43:31 2025 -0500 NFSD: Fix CB_GETATTR status fix Jeff says: Now that I look, 1b3e26a5ccbf is wrong. The patch on the ml was correct, but the one that got committed is different. It should be: status = decode_cb_op_status(xdr, OP_CB_GETATTR, &cb->cb_status); if (unlikely(status || cb->cb_status)) If "status" is non-zero, decoding failed (usu. BADXDR), but we also want to bail out and not decode the rest of the call if the decoded cb_status is non-zero. That's not happening here, cb_seq_status has already been checked and is non-zero, so this ends up trying to decode the rest of the CB_GETATTR reply when it doesn't exist. Reported-by: Jeff Layton Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219737 Fixes: 1b3e26a5ccbf ("NFSD: fix decoding in nfs4_xdr_dec_cb_getattr") Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4callback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 036ac2778f7b28885814c6fbc07e156ad1624d03 Author: Dai Ngo Date: Thu Jan 30 11:01:27 2025 -0800 NFSD: fix hang in nfsd4_shutdown_callback If nfs4_client is in courtesy state then there is no point to send the callback. This causes nfsd4_shutdown_callback to hang since cl_cb_inflight is not 0. This hang lasts about 15 minutes until TCP notifies NFSD that the connection was dropped. This patch modifies nfsd4_run_cb_work to skip the RPC call if nfs4_client is in courtesy state. Signed-off-by: Dai Ngo Fixes: 66af25799940 ("NFSD: add courteous server support for thread with only delegation") Cc: stable@vger.kernel.org Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4callback.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d9d6b74e4be989f919498798fa40df37a74b5bb0 Author: Olga Kornievskaia Date: Tue Jan 28 11:58:06 2025 -0500 nfsd: fix __fh_verify for localio __fh_verify() added a call to svc_xprt_set_valid() to help do connection management but during LOCALIO path rqstp argument is NULL, leading to NULL pointer dereferencing and a crash. Fixes: eccbbc7c00a5 ("nfsd: don't use sv_nrthreads in connection limiting calculations.") Signed-off-by: Olga Kornievskaia Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfsfh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5fb25161217370eeee86b63e47060870b67ed2b4 Author: NeilBrown Date: Tue Jan 28 10:05:03 2025 +1100 nfsd: fix uninitialised slot info when a request is retried A recent patch moved the assignment of seq->maxslots from before the test for a resent request (which ends with a goto) to after, resulting in it not being run in that case. This results in the server returning bogus "high slot id" and "target high slot id" values. The assignments to ->maxslots and ->target_maxslots need to be *after* the out: label so that the correct values are returned in replies to requests that are served from cache. Fixes: 60aa6564317d ("nfsd: allocate new session-based DRC slots on demand.") Signed-off-by: NeilBrown Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f6841309b6de97c21a3ce25d1d9d945ad4f7ee2c Merge: b19181638182 cb78b8dc7834 Author: Mark Brown Date: Mon Feb 10 18:28:22 2025 +0000 ASoC: Intel: soc-acpi-intel-ptl-match typo fixups Merge series from Bard Liao : Fix copy paste of lnl into ptl. commit 58c9bf3363e596d744f56616d407278ef5f97f5a Merge: c581f8c240f5 b051ffa2aeb2 Author: Linus Torvalds Date: Mon Feb 10 09:50:01 2025 -0800 Merge tag 'hid-for-linus-2025021001' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - build/dependency fixes for hid-lenovo and hid-intel-thc (Arnd Bergmann) - functional fixes for hid-corsair-void (Stuart Hayhurst) - workqueue handling and ordering fix for hid-steam (Vicki Pfau) - Gamepad mode vs. Lizard mode fix for hid-steam (Vicki Pfau) - OOB read fix for hid-thrustmaster (Tulio Fernandes) - fix for very long timeout on certain firmware in intel-ish-hid (Zhang Lixu) - other assorted small code fixes and device ID additions * tag 'hid-for-linus-2025021001' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: hid-steam: Don't use cancel_delayed_work_sync in IRQ context HID: hid-steam: Move hidraw input (un)registering to work HID: hid-thrustmaster: fix stack-out-of-bounds read in usb_check_int_endpoints() HID: apple: fix up the F6 key on the Omoton KB066 keyboard HID: hid-apple: Apple Magic Keyboard a3203 USB-C support samples/hid: fix broken vmlinux path for VMLINUX_BTF samples/hid: remove unnecessary -I flags from libbpf EXTRA_CFLAGS HID: topre: Fix n-key rollover on Realforce R3S TKL boards HID: intel-ish-hid: ipc: Add Panther Lake PCI device IDs HID: multitouch: Add NULL check in mt_input_configured HID: winwing: Add NULL check in winwing_init_led() HID: hid-steam: Fix issues with disabling both gamepad mode and lizard mode HID: ignore non-functional sensor in HP 5MP Camera HID: intel-thc: fix CONFIG_HID dependency HID: lenovo: select CONFIG_ACPI_PLATFORM_PROFILE HID: intel-ish-hid: Send clock sync message immediately after reset HID: intel-ish-hid: fix the length of MNG_SYNC_FW_CLOCK in doorbell HID: corsair-void: Initialise memory for psy_cfg HID: corsair-void: Add missing delayed work cancel for headset status commit c581f8c240f57a19c857da3e0eec24285354fdb7 Merge: a64dcfb451e2 0af4c120f5e7 Author: Linus Torvalds Date: Mon Feb 10 09:40:45 2025 -0800 Merge tag 'pinctrl-v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - A series of IRQ and behaviour stabilization fixes for the CY8C95x0 pin control expander - A print format fix for the generic debugfs output * tag 'pinctrl-v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: pinconf-generic: Print unsigned value if a format is registered pinctrl: cy8c95x0: Respect IRQ trigger settings from firmware pinctrl: cy8c95x0: Rename PWMSEL to SELPWM pinctrl: cy8c95x0: Enable regmap locking for debug pinctrl: cy8c95x0: Avoid accessing reserved registers pinctrl: cy8c95x0: Fix off-by-one in the regmap range settings commit b19181638182d1f5c43757b471c056b6196c8ca3 Author: Stefan Binding Date: Mon Feb 10 16:32:50 2025 +0000 ASoC: cs35l41: Fix acpi_device_hid() not found Function acpi_device_hid() is only defined if CONFIG_ACPI is set. Use #ifdef CONFIG_ACPI to ensure that cs35l41 driver only calls this function is CONFIG_ACPI is define. Fixes: 1d44a30ae3f9 ("ASoC: cs35l41: Fallback to using HID for system_name if no SUB is available") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202502090100.SbXmGFqs-lkp@intel.com/ Signed-off-by: Stefan Binding Reviewed-by: André Almeida Link: https://patch.msgid.link/20250210163256.1722350-1-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs35l41.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e2158c953c973adb49383ddea2504faf08d375b7 Author: Kaustabh Chakraborty Date: Sun Feb 9 00:29:30 2025 +0530 phy: exynos5-usbdrd: fix MPLL_MULTIPLIER and SSC_REFCLKSEL masks in refclk In exynos5_usbdrd_{pipe3,utmi}_set_refclk(), the masks PHYCLKRST_MPLL_MULTIPLIER_MASK and PHYCLKRST_SSC_REFCLKSEL_MASK are not inverted when applied to the register values. Fix it. Cc: stable@vger.kernel.org Fixes: 59025887fb08 ("phy: Add new Exynos5 USB 3.0 PHY driver") Signed-off-by: Kaustabh Chakraborty Reviewed-by: Krzysztof Kozlowski Reviewed-by: Anand Moon Link: https://lore.kernel.org/r/20250209-exynos5-usbdrd-masks-v1-1-4f7f83f323d7@disroot.org Signed-off-by: Vinod Koul drivers/phy/samsung/phy-exynos5-usbdrd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit fd75f371f3a1b04a33d2e750363d6ad76abf734e Author: Christian Bruel Date: Mon Feb 10 11:35:15 2025 +0100 phy: stm32: Fix constant-value overflow assertion Rework the workaround as the lookup tables always fits into the bitfield, and the default values are defined by the hardware and cannot be 0: Guard against false positive with a WARN_ON check to make the compiler happy: The offset range is pre-checked against the sorted imp_lookup_table values and overflow should not happen and would be caught by a warning and return in error. Also guard against a true positive found during the max_vswing lookup, as a max vswing value can be 802000 or 803000 microvolt depending on the current impedance. Therefore set the default impedence index. Fixes: 2de679ecd724 ("phy: stm32: work around constant-value overflow assertion") Signed-off-by: Christian Bruel Link: https://lore.kernel.org/r/20250210103515.2598377-1-christian.bruel@foss.st.com Signed-off-by: Vinod Koul drivers/phy/st/phy-stm32-combophy.c | 38 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 20 deletions(-) commit 53139b3f9998ea07289e7b70b909fea2264a0de9 Author: Krzysztof Karas Date: Thu Jan 30 09:19:31 2025 +0000 drm/i915/selftests: avoid using uninitialized context There is an error path in igt_ppgtt_alloc(), which leads to ww object being passed down to i915_gem_ww_ctx_fini() without initialization. Correct that by only putting ppgtt->vm and returning early. Fixes: 480ae79537b2 ("drm/i915/selftests: Prepare gtt tests for obj->mm.lock removal") Signed-off-by: Krzysztof Karas Reviewed-by: Mikolaj Wasiak Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/iuaonpjc3rywmvhna6umjlvzilocn2uqsrxfxfob24e2taocbi@lkaivvfp4777 (cherry picked from commit 8d8334632ea62424233ac6529712868241d0f8df) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fc876c9524e2a9f816f51d533ed31df789cff65a Author: Tejas Upadhyay Date: Wed Feb 5 10:40:42 2025 +0530 drm/xe/client: bo->client does not need bos_lock bos_lock is to protect list of bos used by client, it is not required to protect bo->client so bring it outside of bos_lock. Fixes: b27970f3e11c ("drm/xe: Add tracking support for bos per client") Signed-off-by: Tejas Upadhyay Reviewed-by: Himal Prasad Ghimiray Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20250205051042.1991192-1-tejas.upadhyay@intel.com Signed-off-by: Nirmoy Das (cherry picked from commit f74fd53ba34551b7626193fb70c17226f06e9bf1) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_drm_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f37d135b42cb484bdecee93f56b9f483214ede78 Author: Niravkumar L Rabara Date: Mon Feb 10 13:35:51 2025 +0800 mtd: rawnand: cadence: fix incorrect device in dma_unmap_single dma_map_single is using physical/bus device (DMA) but dma_unmap_single is using framework device(NAND controller), which is incorrect. Fixed dma_unmap_single to use correct physical/bus device. Fixes: ec4ba01e894d ("mtd: rawnand: Add new Cadence NAND driver to MTD subsystem") Cc: stable@vger.kernel.org Signed-off-by: Niravkumar L Rabara Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/cadence-nand-controller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d76d22b5096c5b05208fd982b153b3f182350b19 Author: Niravkumar L Rabara Date: Mon Feb 10 13:35:50 2025 +0800 mtd: rawnand: cadence: use dma_map_resource for sdma address Remap the slave DMA I/O resources to enhance driver portability. Using a physical address causes DMA translation failure when the ARM SMMU is enabled. Fixes: ec4ba01e894d ("mtd: rawnand: Add new Cadence NAND driver to MTD subsystem") Cc: stable@vger.kernel.org Signed-off-by: Niravkumar L Rabara Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/cadence-nand-controller.c | 29 ++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit 2b9df00cded911e2ca2cfae5c45082166b24f8aa Author: Niravkumar L Rabara Date: Mon Feb 10 13:35:49 2025 +0800 mtd: rawnand: cadence: fix error code in cadence_nand_init() Replace dma_request_channel() with dma_request_chan_by_mask() and use helper functions to return proper error code instead of fixed -EBUSY. Fixes: ec4ba01e894d ("mtd: rawnand: Add new Cadence NAND driver to MTD subsystem") Cc: stable@vger.kernel.org Signed-off-by: Niravkumar L Rabara Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/cadence-nand-controller.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 9cff907cbf8c7fb5345918dbcc7b74a01656f34f Author: Mark Pearson Date: Thu Feb 6 14:39:41 2025 -0500 platform/x86: thinkpad_acpi: Support for V9 DYTC platform profiles Newer Thinkpad AMD platforms are using V9 DYTC and this changes the profiles used for PSC mode. Add support for this update. Tested on P14s G5 AMD Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20250206193953.58365-1-mpearson-lenovo@squebb.ca Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/thinkpad_acpi.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 1046cac109225eda0973b898e053aeb3d6c10e1d Author: Sybil Isabel Dorsett Date: Mon Feb 3 16:33:15 2025 +0000 platform/x86: thinkpad_acpi: Fix invalid fan speed on ThinkPad X120e On ThinkPad X120e, fan speed is reported in ticks per revolution rather than RPM. Recalculate the fan speed value reported for ThinkPad X120e to RPM based on a 22.5 kHz clock. Based on the information on https://www.thinkwiki.org/wiki/How_to_control_fan_speed, the same problem is highly likely to be relevant to at least Edge11, but Edge11 is not addressed in this patch. Signed-off-by: Sybil Isabel Dorsett Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250203163255.5525-1-sybdorsett@proton.me Signed-off-by: Ilpo Järvinen drivers/platform/x86/thinkpad_acpi.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 76ed9b7d177ed5aa161a824ea857619b88542de1 Author: Mohan Kumar D Date: Mon Feb 10 19:24:13 2025 +0530 dmaengine: tegra210-adma: check for adma max page Have additional check for max channel page during the probe to cover if any offset overshoot happens due to wrong DT configuration. Fixes: 68811c928f88 ("dmaengine: tegra210-adma: Support channel page") Cc: stable@vger.kernel.org Signed-off-by: Mohan Kumar D Reviewed-by: Jon Hunter Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20250210135413.2504272-3-mkumard@nvidia.com Signed-off-by: Vinod Koul drivers/dma/tegra210-adma.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 17987453a9d997c4d0749abc52f047bfa275427a Author: Mohan Kumar D Date: Mon Feb 10 19:24:12 2025 +0530 dmaengine: tegra210-adma: Use div_u64 for 64 bit division The ADMA base and page address are represented using a 64-bit variable. To accurately derive the exact ADMA page number provided from the DT properties, use the div_u64() to divide the address difference between adma page and base address by the page offset. This change fixes the below error "ERROR: modpost: "__udivdi3" [drivers/dma/tegra210-adma.ko] undefined! ld: drivers/dma/tegra210-adma.o: in function `tegra_adma_probe': tegra210-adma.c:(.text+0x12cf): undefined reference to `__udivdi3'" Fixes: 68811c928f88 ("dmaengine: tegra210-adma: Support channel page") Cc: stable@vger.kernel.org Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202412250204.GCQhdKe3-lkp@intel.com/ Signed-off-by: Mohan Kumar D Reviewed-by: Jon Hunter Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20250210135413.2504272-2-mkumard@nvidia.com Signed-off-by: Vinod Koul drivers/dma/tegra210-adma.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 9759ae2cee7cd42b95f1c48aa3749bd02b5ddb08 Author: Lu Baolu Date: Fri Jan 17 13:58:00 2025 +0800 iommu: Fix potential memory leak in iopf_queue_remove_device() The iopf_queue_remove_device() helper removes a device from the per-iommu iopf queue when PRI is disabled on the device. It responds to all outstanding iopf's with an IOMMU_PAGE_RESP_INVALID code and detaches the device from the queue. However, it fails to release the group structure that represents a group of iopf's awaiting for a response after responding to the hardware. This can cause a memory leak if iopf_queue_remove_device() is called with pending iopf's. Fix it by calling iopf_free_group() after the iopf group is responded. Fixes: 199112327135 ("iommu: Track iopf group instead of last fault") Cc: stable@vger.kernel.org Suggested-by: Kevin Tian Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20250117055800.782462-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel drivers/iommu/io-pgfault.c | 1 + 1 file changed, 1 insertion(+) commit ccc8480d90e8cb60f06bd90e227f34784927e19f Author: Cristian Ciocaltea Date: Fri Feb 7 13:46:05 2025 +0200 ASoC: SOF: amd: Add branch prediction hint in ACP IRQ handler The conditional involving sdev->first_boot in acp_sof_ipc_irq_thread() will succeed only once, i.e. during the very first run of the DSP firmware. Use the unlikely() annotation to help improve branch prediction accuracy. Signed-off-by: Cristian Ciocaltea Reviewed-by: Venkata Prasad Potturu Link: https://patch.msgid.link/20250207-sof-vangogh-fixes-v1-4-67824c1e4c9a@collabora.com Signed-off-by: Mark Brown sound/soc/sof/amd/acp-ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac84ca815adb4171a4276b1d44096b75f6a150b7 Author: Cristian Ciocaltea Date: Fri Feb 7 13:46:04 2025 +0200 ASoC: SOF: amd: Handle IPC replies before FW_BOOT_COMPLETE In some cases, e.g. during resuming from suspend, there is a possibility that some IPC reply messages get received by the host while the DSP firmware has not yet reached the complete boot state. Detect when this happens and do not attempt to process the unexpected replies from DSP. Instead, provide proper debugging support. Signed-off-by: Cristian Ciocaltea Link: https://patch.msgid.link/20250207-sof-vangogh-fixes-v1-3-67824c1e4c9a@collabora.com Signed-off-by: Mark Brown sound/soc/sof/amd/acp-ipc.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 2ecbc2e9f3b19e2199e8bc3ba603d299f1985f09 Author: Cristian Ciocaltea Date: Fri Feb 7 13:46:03 2025 +0200 ASoC: SOF: amd: Drop unused includes from Vangogh driver Remove all the includes for headers which are not (directly) used from the Vangogh SOF driver sources. Signed-off-by: Cristian Ciocaltea Reviewed-by: Venkata Prasad Potturu Link: https://patch.msgid.link/20250207-sof-vangogh-fixes-v1-2-67824c1e4c9a@collabora.com Signed-off-by: Mark Brown sound/soc/sof/amd/pci-vangogh.c | 2 -- sound/soc/sof/amd/vangogh.c | 4 ---- 2 files changed, 6 deletions(-) commit 91b98d5a6e8067c5226207487681a48f0d651e46 Author: Cristian Ciocaltea Date: Fri Feb 7 13:46:02 2025 +0200 ASoC: SOF: amd: Add post_fw_run_delay ACP quirk Stress testing resume from suspend on Valve Steam Deck OLED (Galileo) revealed that the DSP firmware could enter an unrecoverable faulty state, where the kernel ring buffer is flooded with IPC related error messages: [ +0.017002] snd_sof_amd_vangogh 0000:04:00.5: acp_sof_ipc_send_msg: Failed to acquire HW lock [ +0.000054] snd_sof_amd_vangogh 0000:04:00.5: ipc3_tx_msg_unlocked: ipc message send for 0x30100000 failed: -22 [ +0.000005] snd_sof_amd_vangogh 0000:04:00.5: Failed to setup widget PIPELINE.6.ACPHS1.IN [ +0.000004] snd_sof_amd_vangogh 0000:04:00.5: Failed to restore pipeline after resume -22 [ +0.000003] snd_sof_amd_vangogh 0000:04:00.5: PM: dpm_run_callback(): pci_pm_resume returns -22 [ +0.000009] snd_sof_amd_vangogh 0000:04:00.5: PM: failed to resume async: error -22 [...] [ +0.002582] PM: suspend exit [ +0.065085] snd_sof_amd_vangogh 0000:04:00.5: ipc tx error for 0x30130000 (msg/reply size: 12/0): -22 [ +0.000499] snd_sof_amd_vangogh 0000:04:00.5: error: failed widget list set up for pcm 1 dir 0 [ +0.000011] snd_sof_amd_vangogh 0000:04:00.5: error: set pcm hw_params after resume [ +0.000006] snd_sof_amd_vangogh 0000:04:00.5: ASoC: error at snd_soc_pcm_component_prepare on 0000:04:00.5: -22 [...] A system reboot would be necessary to restore the speakers functionality. However, by delaying a bit any host to DSP transmission right after the firmware boot completed, the issue could not be reproduced anymore and sound continued to work flawlessly even after performing thousands of suspend/resume cycles. Introduce the post_fw_run_delay ACP quirk to allow providing the aforementioned delay via the snd_sof_dsp_ops->post_fw_run() callback for the affected devices. Signed-off-by: Cristian Ciocaltea Link: https://patch.msgid.link/20250207-sof-vangogh-fixes-v1-1-67824c1e4c9a@collabora.com Signed-off-by: Mark Brown sound/soc/sof/amd/acp.c | 1 + sound/soc/sof/amd/acp.h | 1 + sound/soc/sof/amd/vangogh.c | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+) commit cb78b8dc7834066539253c039f276b3625fecd9f Author: Peter Ujfalusi Date: Mon Feb 10 11:19:54 2025 +0800 ASoC: Intel: soc-acpi-intel-ptl-match: revise typo of rt713_vb_l2_rt1320_l13 s/lnl/ptl Fixes: a7ebb0255188 ("ASoC: Intel: soc-acpi-intel-ptl-match: add rt713_vb_l2_rt1320_l13 support") Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://patch.msgid.link/20250210031954.6287-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-ptl-match.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 78ccf6a6bae11e451e20a52dd2bc2ab98f66326b Author: Peter Ujfalusi Date: Mon Feb 10 11:19:53 2025 +0800 ASoC: Intel: soc-acpi-intel-ptl-match: revise typo of rt712_vb + rt1320 support s/lnl/ptl Fixes: bd40d912728f ("ASoC: Intel: soc-acpi-intel-ptl-match: add rt712_vb + rt1320 support") Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://patch.msgid.link/20250210031954.6287-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-ptl-match.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2c202e6c4f4dd19d2e8c1dfac9df05170aa3934f Author: Damien Le Moal Date: Sat Feb 8 08:29:15 2025 +0900 ata: libahci_platform: Do not set mask_port_map when not needed Commit 8c87215dd3a2 ("ata: libahci_platform: support non-consecutive port numbers") modified ahci_platform_get_resources() to allow identifying the ports of a controller that are defined as child nodes of the controller node in order to support non-consecutive port numbers (as defined by the platform device tree). However, this commit also erroneously sets bit 0 of hpriv->mask_port_map when the platform devices tree does not define port child nodes, to match the fact that the temporary default number of ports used in that case is 1 (which is also consistent with the fact that only index 0 of hpriv->phys[] is initialized with the call to ahci_platform_get_phy(). But doing so causes ahci_platform_init_host() to initialize and probe only the first port, even if this function determines that the controller has in fact multiple ports using the capability register of the controller (through a call to ahci_nr_ports()). This can be seen with the ahci_mvebu driver (Armada 385 SoC) with the second port declared as "dummy": ahci-mvebu f10a8000.sata: masking port_map 0x3 -> 0x1 ahci-mvebu f10a8000.sata: AHCI vers 0001.0000, 32 command slots, 6 Gbps, platform mode ahci-mvebu f10a8000.sata: 1/2 ports implemented (port mask 0x1) ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs scsi host0: ahci-mvebu scsi host1: ahci-mvebu ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 40 lpm-pol 0 ata2: DUMMY Fix this issue by removing setting bit 0 of hpriv->mask_port_map when the platform device tree does not define port child nodes. Reported-by: Klaus Kudielka Fixes: 8c87215dd3a2 ("ata: libahci_platform: support non-consecutive port numbers") Tested-by: Klaus Kudielka Signed-off-by: Damien Le Moal Acked-by: Josua Mayer Link: https://lore.kernel.org/r/20250207232915.1439174-1-dlemoal@kernel.org Signed-off-by: Niklas Cassel drivers/ata/libahci_platform.c | 2 -- 1 file changed, 2 deletions(-) commit b921f66ccf5e8cf1b8a5052b35ceda454f19f5dd Author: Rob Herring (Arm) Date: Mon Feb 3 15:30:56 2025 -0600 dt-bindings: rockchip: pmu: Ensure all properties are defined Device specific schemas should not allow undefined properties which is what 'additionalProperties: true' allows. Add the missing child nodes and fix this constraint. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20250203213056.13827-1-robh@kernel.org Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip/pmu.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 8dbccafce3c8ae026606f5c7bc6637667d9d5595 Author: Marc Zyngier Date: Mon Feb 10 09:17:58 2025 +0000 KVM: arm64: Fix __pkvm_host_mkyoung_guest() return value Don't use an uninitialised stack variable, and just return 0 on the non-error path. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202502100911.8c9DbtKD-lkp@intel.com/ Reviewed-by: Quentin Perret Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/nvhe/mem_protect.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8238c7bd84209c8216b1381ab0dbe6db9e203769 Author: Selvin Xavier Date: Tue Feb 4 00:21:25 2025 -0800 RDMA/bnxt_re: Fix the statistics for Gen P7 VF Gen P7 VF support the extended stats and is prevented by a VF check. Fix the check to issue the FW command for GenP7 VFs also. Fixes: 1801d87b3598 ("RDMA/bnxt_re: Support new 5760X P7 devices") Signed-off-by: Selvin Xavier Link: https://patch.msgid.link/1738657285-23968-5-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/bnxt_re/hw_counters.c | 4 ++-- drivers/infiniband/hw/bnxt_re/qplib_res.h | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) commit e2f105277411c4ebacd00d4ae1a57f693ba7d22d Author: Kalesh AP Date: Tue Feb 4 00:21:24 2025 -0800 RDMA/bnxt_re: Fix issue in the unload path The cited comment removed the netdev notifier register call from the driver. But, it did not remove the cleanup code from the unload path. As a result, driver unload is not clean and resulted in undesired behaviour. Fixes: d3b15fcc4201 ("RDMA/bnxt_re: Remove deliver net device event") Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier Link: https://patch.msgid.link/1738657285-23968-4-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/bnxt_re/bnxt_re.h | 1 - drivers/infiniband/hw/bnxt_re/main.c | 10 ---------- 2 files changed, 11 deletions(-) commit f0df225d12fcb049429fb5bf5122afe143c2dd15 Author: Kalesh AP Date: Tue Feb 4 00:21:23 2025 -0800 RDMA/bnxt_re: Add sanity checks on rdev validity There is a possibility that ulp_irq_stop and ulp_irq_start callbacks will be called when the device is in detached state. This can cause a crash due to NULL pointer dereference as the rdev is already freed. Fixes: cc5b9b48d447 ("RDMA/bnxt_re: Recover the device when FW error is detected") Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier Link: https://patch.msgid.link/1738657285-23968-3-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/bnxt_re/main.c | 5 +++++ 1 file changed, 5 insertions(+) commit a27c6f46dcec8f697cbf15c8a10f8534c7b8a2c3 Author: Kalesh AP Date: Tue Feb 4 00:21:22 2025 -0800 RDMA/bnxt_re: Fix an issue in bnxt_re_async_notifier In the bnxt_re_async_notifier() callback, the way driver retrieves rdev pointer is wrong. The rdev pointer should be parsed from adev pointer as while registering with the L2 for ULP, driver uses the aux device pointer for the handle. Fixes: 7fea32784068 ("RDMA/bnxt_re: Add Async event handling support") Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier Link: https://patch.msgid.link/1738657285-23968-2-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/bnxt_re/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 70e90680c2592c38c62e5716f1296a2d74bae7af Author: Nam Cao Date: Wed Feb 5 11:46:33 2025 +0100 ALSA: Switch to use hrtimer_setup() hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Acked-by: Zack Rusin Signed-off-by: Nam Cao Cc: Takashi Iwai Link: https://patch.msgid.link/598031332ce738c82286a158cb66eb7e735b2e79.1738746904.git.namcao@linutronix.de Signed-off-by: Takashi Iwai sound/core/hrtimer.c | 3 +-- sound/drivers/dummy.c | 3 +-- sound/drivers/pcsp/pcsp.c | 3 +-- sound/sh/sh_dac_audio.c | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) commit d7e2447a4d51de5c3c03e3b7892898e98ddd9769 Author: Pierre-Louis Bossart Date: Mon Feb 10 10:17:30 2025 +0200 ALSA: hda: hda-intel: add Panther Lake-H support Add Intel PTL-H audio Device ID. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250210081730.22916-5-peter.ujfalusi@linux.intel.com sound/pci/hda/hda_intel.c | 2 ++ 1 file changed, 2 insertions(+) commit 4e9c87cfcd0584f2a2e2f352a43ff003d688f3a4 Author: Peter Ujfalusi Date: Mon Feb 10 10:17:29 2025 +0200 ASoC: SOF: Intel: pci-ptl: Add support for PTL-H PTL-H uses the same configuration as PTL. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Acked-by: Mark Brown Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250210081730.22916-4-peter.ujfalusi@linux.intel.com sound/soc/sof/intel/pci-ptl.c | 1 + 1 file changed, 1 insertion(+) commit 214e6be2d91d5d58f28d3a37630480077a1aafbd Author: Pierre-Louis Bossart Date: Mon Feb 10 10:17:28 2025 +0200 ALSA: hda: intel-dsp-config: Add PTL-H support Use same recipes as PTL for PTL-H. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250210081730.22916-3-peter.ujfalusi@linux.intel.com sound/hda/intel-dsp-config.c | 5 +++++ 1 file changed, 5 insertions(+) commit a1f7b7ff0e10ae574d388131596390157222f986 Author: Pierre-Louis Bossart Date: Mon Feb 10 10:17:27 2025 +0200 PCI: pci_ids: add INTEL_HDA_PTL_H Add Intel PTL-H audio Device ID. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Acked-by: Bjorn Helgaas Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250210081730.22916-2-peter.ujfalusi@linux.intel.com include/linux/pci_ids.h | 1 + 1 file changed, 1 insertion(+) commit 61bcc752d1b81fde3cae454ff20c1d3c359df500 Author: Christophe Leroy Date: Sun Jan 12 19:24:46 2025 +0100 powerpc/64s: Rewrite __real_pte() and __rpte_to_hidx() as static inline Rewrite __real_pte() and __rpte_to_hidx() as static inline in order to avoid following warnings/errors when building with 4k page size: CC arch/powerpc/mm/book3s64/hash_tlb.o arch/powerpc/mm/book3s64/hash_tlb.c: In function 'hpte_need_flush': arch/powerpc/mm/book3s64/hash_tlb.c:49:16: error: variable 'offset' set but not used [-Werror=unused-but-set-variable] 49 | int i, offset; | ^~~~~~ CC arch/powerpc/mm/book3s64/hash_native.o arch/powerpc/mm/book3s64/hash_native.c: In function 'native_flush_hash_range': arch/powerpc/mm/book3s64/hash_native.c:782:29: error: variable 'index' set but not used [-Werror=unused-but-set-variable] 782 | unsigned long hash, index, hidx, shift, slot; | ^~~~~ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501081741.AYFwybsq-lkp@intel.com/ Fixes: ff31e105464d ("powerpc/mm/hash64: Store the slot information at the right offset for hugetlb") Signed-off-by: Christophe Leroy Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/e0d340a5b7bd478ecbf245d826e6ab2778b74e06.1736706263.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/book3s/64/hash-4k.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit dc9c5166c3cb044f8a001e397195242fd6796eee Author: Christophe Leroy Date: Mon Feb 3 11:14:57 2025 +0100 powerpc/code-patching: Disable KASAN report during patching via temporary mm Erhard reports the following KASAN hit on Talos II (power9) with kernel 6.13: [ 12.028126] ================================================================== [ 12.028198] BUG: KASAN: user-memory-access in copy_to_kernel_nofault+0x8c/0x1a0 [ 12.028260] Write of size 8 at addr 0000187e458f2000 by task systemd/1 [ 12.028346] CPU: 87 UID: 0 PID: 1 Comm: systemd Tainted: G T 6.13.0-P9-dirty #3 [ 12.028408] Tainted: [T]=RANDSTRUCT [ 12.028446] Hardware name: T2P9D01 REV 1.01 POWER9 0x4e1202 opal:skiboot-bc106a0 PowerNV [ 12.028500] Call Trace: [ 12.028536] [c000000008dbf3b0] [c000000001656a48] dump_stack_lvl+0xbc/0x110 (unreliable) [ 12.028609] [c000000008dbf3f0] [c0000000006e2fc8] print_report+0x6b0/0x708 [ 12.028666] [c000000008dbf4e0] [c0000000006e2454] kasan_report+0x164/0x300 [ 12.028725] [c000000008dbf600] [c0000000006e54d4] kasan_check_range+0x314/0x370 [ 12.028784] [c000000008dbf640] [c0000000006e6310] __kasan_check_write+0x20/0x40 [ 12.028842] [c000000008dbf660] [c000000000578e8c] copy_to_kernel_nofault+0x8c/0x1a0 [ 12.028902] [c000000008dbf6a0] [c0000000000acfe4] __patch_instructions+0x194/0x210 [ 12.028965] [c000000008dbf6e0] [c0000000000ade80] patch_instructions+0x150/0x590 [ 12.029026] [c000000008dbf7c0] [c0000000001159bc] bpf_arch_text_copy+0x6c/0xe0 [ 12.029085] [c000000008dbf800] [c000000000424250] bpf_jit_binary_pack_finalize+0x40/0xc0 [ 12.029147] [c000000008dbf830] [c000000000115dec] bpf_int_jit_compile+0x3bc/0x930 [ 12.029206] [c000000008dbf990] [c000000000423720] bpf_prog_select_runtime+0x1f0/0x280 [ 12.029266] [c000000008dbfa00] [c000000000434b18] bpf_prog_load+0xbb8/0x1370 [ 12.029324] [c000000008dbfb70] [c000000000436ebc] __sys_bpf+0x5ac/0x2e00 [ 12.029379] [c000000008dbfd00] [c00000000043a228] sys_bpf+0x28/0x40 [ 12.029435] [c000000008dbfd20] [c000000000038eb4] system_call_exception+0x334/0x610 [ 12.029497] [c000000008dbfe50] [c00000000000c270] system_call_vectored_common+0xf0/0x280 [ 12.029561] --- interrupt: 3000 at 0x3fff82f5cfa8 [ 12.029608] NIP: 00003fff82f5cfa8 LR: 00003fff82f5cfa8 CTR: 0000000000000000 [ 12.029660] REGS: c000000008dbfe80 TRAP: 3000 Tainted: G T (6.13.0-P9-dirty) [ 12.029735] MSR: 900000000280f032 CR: 42004848 XER: 00000000 [ 12.029855] IRQMASK: 0 GPR00: 0000000000000169 00003fffdcf789a0 00003fff83067100 0000000000000005 GPR04: 00003fffdcf78a98 0000000000000090 0000000000000000 0000000000000008 GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR12: 0000000000000000 00003fff836ff7e0 c000000000010678 0000000000000000 GPR16: 0000000000000000 0000000000000000 00003fffdcf78f28 00003fffdcf78f90 GPR20: 0000000000000000 0000000000000000 0000000000000000 00003fffdcf78f80 GPR24: 00003fffdcf78f70 00003fffdcf78d10 00003fff835c7239 00003fffdcf78bd8 GPR28: 00003fffdcf78a98 0000000000000000 0000000000000000 000000011f547580 [ 12.030316] NIP [00003fff82f5cfa8] 0x3fff82f5cfa8 [ 12.030361] LR [00003fff82f5cfa8] 0x3fff82f5cfa8 [ 12.030405] --- interrupt: 3000 [ 12.030444] ================================================================== Commit c28c15b6d28a ("powerpc/code-patching: Use temporary mm for Radix MMU") is inspired from x86 but unlike x86 is doesn't disable KASAN reports during patching. This wasn't a problem at the begining because __patch_mem() is not instrumented. Commit 465cabc97b42 ("powerpc/code-patching: introduce patch_instructions()") use copy_to_kernel_nofault() to copy several instructions at once. But when using temporary mm the destination is not regular kernel memory but a kind of kernel-like memory located in user address space. Because it is not in kernel address space it is not covered by KASAN shadow memory. Since commit e4137f08816b ("mm, kasan, kmsan: instrument copy_from/to_kernel_nofault") KASAN reports bad accesses from copy_to_kernel_nofault(). Here a bad access to user memory is reported because KASAN detects the lack of shadow memory and the address is below TASK_SIZE. Do like x86 in commit b3fd8e83ada0 ("x86/alternatives: Use temporary mm for text poking") and disable KASAN reports during patching when using temporary mm. Reported-by: Erhard Furtner Close: https://lore.kernel.org/all/20250201151435.48400261@yea/ Fixes: 465cabc97b42 ("powerpc/code-patching: introduce patch_instructions()") Signed-off-by: Christophe Leroy Acked-by: Michael Ellerman Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/1c05b2a1b02ad75b981cfc45927e0b4a90441046.1738577687.git.christophe.leroy@csgroup.eu arch/powerpc/lib/code-patching.c | 2 ++ 1 file changed, 2 insertions(+) commit a64dcfb451e254085a7daee5fe51bf22959d52d3 Author: Linus Torvalds Date: Sun Feb 9 12:45:03 2025 -0800 Linux 6.14-rc2 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69b54314c975f4dfd3a29d6b9211ab68fff46682 Merge: 146339ddb8b7 f354fc88a72a Author: Linus Torvalds Date: Sun Feb 9 10:05:32 2025 -0800 Merge tag 'kbuild-fixes-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Suppress false-positive -Wformat-{overflow,truncation}-non-kprintf warnings regardless of the W= option - Avoid CONFIG_TRIM_UNUSED_KSYMS dropping symbols passed to symbol_get() - Fix a build regression of the Debian linux-headers package * tag 'kbuild-fixes-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: install-extmod-build: add missing quotation marks for CC variable kbuild: fix misspelling in scripts/Makefile.lib kbuild: keep symbols for symbol_get() even with CONFIG_TRIM_UNUSED_KSYMS scripts/Makefile.extrawarn: Do not show clang's non-kprintf warnings at W=1 commit 146339ddb8b7520ee486389c7b0a7b24d68e5f60 Merge: 954a209f431c 7585946243d6 Author: Linus Torvalds Date: Sun Feb 9 09:47:06 2025 -0800 Merge tag 'pm-6.14-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Fix a recently introduced kernel crash due to a NULL pointer dereference during system-wide suspend (Rafael Wysocki)" * tag 'pm-6.14-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: sleep: core: Restrict power.set_active propagation commit 954a209f431c06b62718a49b403bd4c549f0d6fb Merge: 9946eaf552b1 43fb96ae7855 Author: Linus Torvalds Date: Sun Feb 9 09:41:38 2025 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM: - Correctly clean the BSS to the PoC before allowing EL2 to access it on nVHE/hVHE/protected configurations - Propagate ownership of debug registers in protected mode after the rework that landed in 6.14-rc1 - Stop pretending that we can run the protected mode without a GICv3 being present on the host - Fix a use-after-free situation that can occur if a vcpu fails to initialise the NV shadow S2 MMU contexts - Always evaluate the need to arm a background timer for fully emulated guest timers - Fix the emulation of EL1 timers in the absence of FEAT_ECV - Correctly handle the EL2 virtual timer, specially when HCR_EL2.E2H==0 s390: - move some of the guest page table (gmap) logic into KVM itself, inching towards the final goal of completely removing gmap from the non-kvm memory management code. As an initial set of cleanups, move some code from mm/gmap into kvm and start using __kvm_faultin_pfn() to fault-in pages as needed; but especially stop abusing page->index and page->lru to aid in the pgdesc conversion. x86: - Add missing check in the fix to defer starting the huge page recovery vhost_task - SRSO_USER_KERNEL_NO does not need SYNTHESIZED_F" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (31 commits) KVM: x86/mmu: Ensure NX huge page recovery thread is alive before waking KVM: remove kvm_arch_post_init_vm KVM: selftests: Fix spelling mistake "initally" -> "initially" kvm: x86: SRSO_USER_KERNEL_NO is not synthesized KVM: arm64: timer: Don't adjust the EL2 virtual timer offset KVM: arm64: timer: Correctly handle EL1 timer emulation when !FEAT_ECV KVM: arm64: timer: Always evaluate the need for a soft timer KVM: arm64: Fix nested S2 MMU structures reallocation KVM: arm64: Fail protected mode init if no vgic hardware is present KVM: arm64: Flush/sync debug state in protected mode KVM: s390: selftests: Streamline uc_skey test to issue iske after sske KVM: s390: remove the last user of page->index KVM: s390: move PGSTE softbits KVM: s390: remove useless page->index usage KVM: s390: move gmap_shadow_pgt_lookup() into kvm KVM: s390: stop using lists to keep track of used dat tables KVM: s390: stop using page->index for non-shadow gmaps KVM: s390: move some gmap shadowing functions away from mm/gmap.c KVM: s390: get rid of gmap_translate() KVM: s390: get rid of gmap_fault() ... commit 7585946243d614bd2cd4e13377be2c711c9539e0 Author: Rafael J. Wysocki Date: Sat Feb 8 18:54:28 2025 +0100 PM: sleep: core: Restrict power.set_active propagation Commit 3775fc538f53 ("PM: sleep: core: Synchronize runtime PM status of parents and children") exposed an issue related to simple_pm_bus_pm_ops that uses pm_runtime_force_suspend() and pm_runtime_force_resume() as bus type PM callbacks for the noirq phases of system-wide suspend and resume. The problem is that pm_runtime_force_suspend() does not distinguish runtime-suspended devices from devices for which runtime PM has never been enabled, so if it sees a device with runtime PM status set to RPM_ACTIVE, it will assume that runtime PM is enabled for that device and so it will attempt to suspend it with the help of its runtime PM callbacks which may not be ready for that. As it turns out, this causes simple_pm_bus_runtime_suspend() to crash due to a NULL pointer dereference. Another problem related to the above commit and simple_pm_bus_pm_ops is that setting runtime PM status of a device handled by the latter to RPM_ACTIVE will actually prevent it from being resumed because pm_runtime_force_resume() only resumes devices with runtime PM status set to RPM_SUSPENDED. To mitigate these issues, do not allow power.set_active to propagate beyond the parent of the device with DPM_FLAG_SMART_SUSPEND set that will need to be resumed, which should be a sufficient stop-gap for the time being, but they will need to be properly addressed in the future because in general during system-wide resume it is necessary to resume all devices in a dependency chain in which at least one device is going to be resumed. Fixes: 3775fc538f53 ("PM: sleep: core: Synchronize runtime PM status of parents and children") Closes: https://lore.kernel.org/linux-pm/1c2433d4-7e0f-4395-b841-b8eac7c25651@nvidia.com/ Reported-by: Jon Hunter Tested-by: Johan Hovold Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/6137505.lOV4Wx5bFT@rjwysocki.net drivers/base/power/main.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit eabc7aaef7a553b64bf6e631ce04526af6c8d104 Author: Quentin Perret Date: Fri Feb 7 14:54:38 2025 +0000 KVM: arm64: Simplify np-guest hypercalls When the handling of a guest stage-2 permission fault races with an MMU notifier, the faulting page might be gone from the guest's stage-2 by the point we attempt to call (p)kvm_pgtable_stage2_relax_perms(). In the normal KVM case, this leads to returning -EAGAIN which user_mem_abort() handles correctly by simply re-entering the guest. However, the pKVM hypercall implementation has additional logic to check the page state using __check_host_shared_guest() which gets confused with absence of a page mapped at the requested IPA and returns -ENOENT, hence breaking user_mem_abort() and hilarity ensues. Luckily, several of the hypercalls for managing the stage-2 page-table of NP guests have no effect on the pKVM ownership tracking (wrprotect, test_clear_young, mkyoung, and crucially relax_perms), so the extra state checking logic is in fact not strictly necessary. So, to fix the discrepancy between standard KVM and pKVM, let's just drop the superfluous __check_host_shared_guest() logic from those hypercalls and make the extra state checking a debug assertion dependent on CONFIG_NVHE_EL2_DEBUG as we already do for other transitions. Signed-off-by: Quentin Perret Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250207145438.1333475-3-qperret@google.com Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/nvhe/mem_protect.c | 69 +++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 31 deletions(-) commit c53fbdb60fb61fd6bda2bc0dc89837966625c5dc Author: Quentin Perret Date: Fri Feb 7 14:54:37 2025 +0000 KVM: arm64: Improve error handling from check_host_shared_guest() The check_host_shared_guest() path expects to find a last-level valid PTE in the guest's stage-2 page-table. However, it checks the PTE's level before its validity, which makes it hard for callers to figure out what went wrong. To make error handling simpler, check the PTE's validity first. Signed-off-by: Quentin Perret Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250207145438.1333475-2-qperret@google.com Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/nvhe/mem_protect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9747c0c7791d4a5a62018a0c9c563dd2e6f6c1c0 Author: Junxian Huang Date: Sat Feb 8 18:59:30 2025 +0800 RDMA/hns: Fix mbox timing out by adding retry mechanism If a QP is modified to error state and a flush CQE process is triggered, the subsequent QP destruction mbox can still be successfully posted but will be blocked in HW until the flush CQE process finishes. This causes further mbox posting timeouts in driver. The blocking time is related to QP depth. Considering an extreme case where SQ depth and RQ depth are both 32K, the blocking time can reach about 135ms. This patch adds a retry mechanism for mbox posting. For each try, FW waits 15ms for HW to complete the previous mbox, otherwise return a timeout error code to driver. Counting other time consumption in FW, set 8 tries for mbox posting and a 5ms time gap before each retry to increase to a sufficient timeout limit. Fixes: 0425e3e6e0c7 ("RDMA/hns: Support flush cqe for hip08 in kernel space") Signed-off-by: Junxian Huang Link: https://patch.msgid.link/20250208105930.522796-1-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 64 ++++++++++++++++++++++-------- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 2 + 2 files changed, 50 insertions(+), 16 deletions(-) commit ee9d1619ef6e4a3412a13788256cb8c3e5efbe3d Author: Long Li Date: Fri Feb 7 13:46:28 2025 -0800 MAINTAINERS: update maintainer for Microsoft MANA RDMA driver Ajay is no longer working on the MANA RDMA driver. Konstantin Taranov has made significant contributions to implementing RC QP in both kernel and user-mode. He will take the responsibility of fixing bugs, reviewing patches and developing new features for MANA RDMA driver. Signed-off-by: Long Li Link: https://patch.msgid.link/1738964792-21140-1-git-send-email-longli@linuxonhyperv.com Signed-off-by: Leon Romanovsky MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32966821574cd2917bd60f2554f435fe527f4702 Author: Tejun Heo Date: Fri Feb 7 10:59:06 2025 -1000 sched_ext: Fix migration disabled handling in targeted dispatches A dispatch operation that can target a specific local DSQ - scx_bpf_dsq_move_to_local() or scx_bpf_dsq_move() - checks whether the task can be migrated to the target CPU using task_can_run_on_remote_rq(). If the task can't be migrated to the targeted CPU, it is bounced through a global DSQ. task_can_run_on_remote_rq() assumes that the task is on a CPU that's different from the targeted CPU but the callers doesn't uphold the assumption and may call the function when the task is already on the target CPU. When such task has migration disabled, task_can_run_on_remote_rq() ends up returning %false incorrectly unnecessarily bouncing the task to a global DSQ. Fix it by updating the callers to only call task_can_run_on_remote_rq() when the task is on a different CPU than the target CPU. As this is a bit subtle, for clarity and documentation: - Make task_can_run_on_remote_rq() trigger SCHED_WARN_ON() if the task is on the same CPU as the target CPU. - is_migration_disabled() test in task_can_run_on_remote_rq() cannot trigger if the task is on a different CPU than the target CPU as the preceding task_allowed_on_cpu() test should fail beforehand. Convert the test into SCHED_WARN_ON(). Signed-off-by: Tejun Heo Fixes: 4c30f5ce4f7a ("sched_ext: Implement scx_bpf_dispatch[_vtime]_from_dsq()") Fixes: 0366017e0973 ("sched_ext: Use task_can_run_on_remote_rq() test in dispatch_to_local_dsq()") Cc: stable@vger.kernel.org # v6.12+ kernel/sched/ext.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 2fa0fbeb69edd367b7c44f484e8dc5a5a1a311ef Author: Tejun Heo Date: Fri Feb 7 10:58:23 2025 -1000 sched_ext: Implement auto local dispatching of migration disabled tasks Migration disabled tasks are special and pinned to their previous CPUs. They tripped up some unsuspecting BPF schedulers as their ->nr_cpus_allowed may not agree with the bits set in ->cpus_ptr. Make it easier for BPF schedulers by automatically dispatching them to the pinned local DSQs by default. If a BPF scheduler wants to handle migration disabled tasks explicitly, it can set SCX_OPS_ENQ_MIGRATION_DISABLED. Signed-off-by: Tejun Heo Acked-by: Andrea Righi kernel/sched/ext.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 9ab127a18018fb06bd42a54ed38bb7b8c449d686 Author: Arnd Bergmann Date: Mon Jan 27 08:10:02 2025 +0100 drm/hisilicon/hibmc: select CONFIG_DRM_DISPLAY_DP_HELPER Without the DP helper code, the newly added displayport support causes a link failure: x86_64-linux-ld: drivers/gpu/drm/hisilicon/hibmc/dp/dp_aux.o: in function `hibmc_dp_aux_init': dp_aux.c:(.text+0x37e): undefined reference to `drm_dp_aux_init' x86_64-linux-ld: drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.o: in function `hibmc_dp_link_set_pattern': dp_link.c:(.text+0xae): undefined reference to `drm_dp_dpcd_write' x86_64-linux-ld: drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.o: in function `hibmc_dp_link_get_adjust_train': dp_link.c:(.text+0x121): undefined reference to `drm_dp_get_adjust_request_voltage' x86_64-linux-ld: dp_link.c:(.text+0x12e): undefined reference to `drm_dp_get_adjust_request_pre_emphasis' x86_64-linux-ld: drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.o: in function `hibmc_dp_link_training': dp_link.c:(.text+0x2b0): undefined reference to `drm_dp_dpcd_write' x86_64-linux-ld: dp_link.c:(.text+0x2e3): undefined reference to `drm_dp_dpcd_write' Add both DRM_DISPLAY_DP_HELPER and DRM_DISPLAY_HELPER, which is in turn required by the former. Fixes: 0ab6ea261c1f ("drm/hisilicon/hibmc: add dp module in hibmc") Signed-off-by: Arnd Bergmann Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250127071059.617567-1-arnd@kernel.org Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/hisilicon/hibmc/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 9946eaf552b194bb352c2945b54ff98c8193b3f1 Merge: f4a45f14cf69 6270f4deba3f Author: Linus Torvalds Date: Sat Feb 8 14:12:17 2025 -0800 Merge tag 'hardening-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardening fixes from Kees Cook: "Address a KUnit stack initialization regression that got tickled on m68k, and solve a Clang(v14 and earlier) bug found by 0day: - Fix stackinit KUnit regression on m68k - Use ARRAY_SIZE() for memtostr*()/strtomem*()" * tag 'hardening-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: string.h: Use ARRAY_SIZE() for memtostr*()/strtomem*() compiler.h: Introduce __must_be_byte_array() compiler.h: Move C string helpers into C-only kernel section stackinit: Fix comment for test_small_end stackinit: Keep selftest union size small on m68k commit f4a45f14cf6902a96d9805ba51829054940ef3e7 Merge: 8b0582f50952 c2debdb8544f Author: Linus Torvalds Date: Sat Feb 8 14:04:21 2025 -0800 Merge tag 'seccomp-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp fix from Kees Cook: "This is really a work-around for x86_64 having grown a syscall to implement uretprobe, which has caused problems since v6.11. This may change in the future, but for now, this fixes the unintended seccomp filtering when uretprobe switched away from traps, and does so with something that should be easy to backport. - Allow uretprobe on x86_64 to avoid behavioral complications (Eyal Birger)" * tag 'seccomp-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: selftests/seccomp: validate uretprobe syscall passes through seccomp seccomp: passthrough uretprobe systemcall without filtering commit 8b0582f50952a0e225fabd97bb6f90ca5138a0e7 Merge: 493f3f38da21 b029628be267 Author: Linus Torvalds Date: Sat Feb 8 13:59:24 2025 -0800 Merge tag 'execve-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull execve fix from Kees Cook: "This is an alpha-specific fix, but since it touched ELF I was asked to carry it. - alpha/elf: Fix misc/setarch test of util-linux by removing 32bit support (Eric W. Biederman)" * tag 'execve-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: alpha/elf: Fix misc/setarch test of util-linux by removing 32bit support commit 493f3f38da21cf61b25254f7a3dc817179b497c8 Merge: 74b5161d57c1 5233e3235dec Author: Linus Torvalds Date: Sat Feb 8 13:45:34 2025 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "A number of fairly small fixes, mostly in drivers but two in the core to change a retry for depopulation (a trendy new hdd thing that reorganizes blocks away from failing elements) and one to fix a GFP_ annotation to avoid a lock dependency (the third core patch is all in testing)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: qla1280: Fix kernel oops when debug level > 2 scsi: ufs: core: Fix error return with query response scsi: storvsc: Set correct data length for sending SCSI command without payload scsi: ufs: core: Fix use-after free in init error and remove paths scsi: core: Do not retry I/Os during depopulation scsi: core: Use GFP_NOIO to avoid circular locking dependency scsi: ufs: Fix toggling of clk_gating.state when clock gating is not allowed scsi: ufs: core: Ensure clk_gating.lock is used only after initialization scsi: ufs: core: Simplify temperature exception event handling scsi: target: core: Add line break to status show scsi: ufs: core: Fix the HIGH/LOW_TEMP Bit Definitions scsi: core: Add passthrough tests for success and no failure definitions commit 74b5161d57c1dd221a20f89e3d490da56b223a29 Merge: 595ab66f1bec 3bfa08fe9ec8 Author: Linus Torvalds Date: Sat Feb 8 13:35:17 2025 -0800 Merge tag 'i2c-for-6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c reverts from Wolfram Sang: "It turned out the new mechanism for handling created devices does not handle all muxing cases. Revert the changes to give a proper solution more time" * tag 'i2c-for-6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: Revert "i2c: Replace list-based mechanism for handling auto-detected clients" Revert "i2c: Replace list-based mechanism for handling userspace-created clients" commit 595ab66f1becea80c4182b2d2660f357c17db2a9 Merge: a0df483fe303 6273a058383e Author: Linus Torvalds Date: Sat Feb 8 12:22:21 2025 -0800 Merge tag 'rust-fixes-6.14' of https://github.com/Rust-for-Linux/linux Pull rust fixes from Miguel Ojeda: - Do not export KASAN ODR symbols to avoid gendwarfksyms warnings - Fix future Rust 1.86.0 (to be released 2025-04-03) x86_64 builds - Clean future Rust 1.86.0 (to be released 2025-04-03) warning - Fix future GCC 15 (to be released in a few months) builds - Fix `rusttest` target in macOS * tag 'rust-fixes-6.14' of https://github.com/Rust-for-Linux/linux: x86: rust: set rustc-abi=x86-softfloat on rustc>=1.86.0 rust: kbuild: do not export generated KASAN ODR symbols rust: kbuild: add -fzero-init-padding-bits to bindgen_skip_cflags rust: init: use explicit ABI to clean warning in future compilers rust: kbuild: use host dylib naming in rusttestlib-kernel commit a0df483fe303e0c87a6d4a4f60213d5f8703c5ae Merge: a5057ded6e88 c8c9b1d2d5b4 Author: Linus Torvalds Date: Sat Feb 8 12:18:02 2025 -0800 Merge tag 'ftrace-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull ftrace fix from Steven Rostedt: "Function graph fix of notrace functions. When the function graph tracer was restructured to use the global section of the meta data in the shadow stack, the bit logic was changed. There's a TRACE_GRAPH_NOTRACE_BIT that is the bit number in the mask that tells if the function graph tracer is currently in the "notrace" mode. The TRACE_GRAPH_NOTRACE is the mask with that bit set. But when the code we restructured, the TRACE_GRAPH_NOTRACE_BIT was used when it should have been the TRACE_GRAPH_NOTRACE mask. This made notrace not work properly" * tag 'ftrace-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: fgraph: Fix set_graph_notrace with setting TRACE_GRAPH_NOTRACE_BIT commit a5057ded6e882fc7a5f26de592259818ed07d397 Merge: 3a0562d733b1 ee2ab467bddf Author: Linus Torvalds Date: Sat Feb 8 12:04:00 2025 -0800 Merge tag 'x86-urgent-2025-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Ingo Molnar: "Fix a build regression on GCC 15 builds, caused by GCC changing the default C version that is overriden in the main Makefile but not in the x86 boot code Makefile" * tag 'x86-urgent-2025-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Use '-std=gnu11' to fix build with GCC 15 commit 3a0562d733b19d5f10ebf7643dab0ab1a4fd8cf7 Merge: c7b92e8969cd 868c9037df62 Author: Linus Torvalds Date: Sat Feb 8 11:55:03 2025 -0800 Merge tag 'timers-urgent-2025-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Ingo Molnar: "Fix a PREEMPT_RT bug in the clocksource verification code that caused false positive warnings. Also fix a timer migration setup bug when new CPUs are added" * tag 'timers-urgent-2025-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timers/migration: Fix off-by-one root mis-connection clocksource: Use migrate_disable() to avoid calling get_random_u32() in atomic context commit c7b92e8969cd60a585629cef8d19b7ef330bc171 Merge: a8f5fe68fc06 9065ce69754d Author: Linus Torvalds Date: Sat Feb 8 11:16:22 2025 -0800 Merge tag 'sched-urgent-2025-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Fix a cfs_rq->h_nr_runnable accounting bug that trips up a defensive SCHED_WARN_ON() on certain workloads. The bug is believed to be (accidentally) self-correcting, hence no behavioral side effects are expected. Also print se.slice in debug output, since this value can now be set via the syscall ABI and can be useful to track" * tag 'sched-urgent-2025-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/debug: Provide slice length for fair tasks sched/fair: Fix inaccurate h_nr_runnable accounting with delayed dequeue commit a8f5fe68fc063913a77ec2df90c57e897c9aa7ae Merge: fa76887bb72a 29a61a1f4063 Author: Linus Torvalds Date: Sat Feb 8 11:05:54 2025 -0800 Merge tag 'irq-urgent-2025-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Ingo Molnar: "Another followup fix for the procps genirq output formatting regression caused by an optimization" * tag 'irq-urgent-2025-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Remove leading space from irq_chip::irq_print_chip() callbacks commit fa76887bb72ae11347730271e6a04c147b7527e6 Merge: 8f6629c004b1 5e0e02f0d7e5 Author: Linus Torvalds Date: Sat Feb 8 10:54:11 2025 -0800 Merge tag 'locking-urgent-2025-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Ingo Molnar: "Fix a dangling pointer bug in the futex code used by the uring code. It isn't causing problems at the moment due to uring ABI limitations leaving it essentially unused in current usages, but is a good idea to fix nevertheless" * tag 'locking-urgent-2025-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Pass in task to futex_queue() commit c631a2de7ae48d50434bdc205d901423f8577c65 Author: Sean Christopherson Date: Thu Jan 30 17:07:21 2025 -0800 perf/x86/intel: Ensure LBRs are disabled when a CPU is starting Explicitly clear DEBUGCTL.LBR when a CPU is starting, prior to purging the LBR MSRs themselves, as at least one system has been found to transfer control to the kernel with LBRs enabled (it's unclear whether it's a BIOS flaw or a CPU goof). Because the kernel preserves the original DEBUGCTL, even when toggling LBRs, leaving DEBUGCTL.LBR as is results in running with LBRs enabled at all times. Closes: https://lore.kernel.org/all/c9d8269bff69f6359731d758e3b1135dedd7cc61.camel@redhat.com Reported-by: Maxim Levitsky Signed-off-by: Sean Christopherson Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Maxim Levitsky Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20250131010721.470503-1-seanjc@google.com arch/x86/events/intel/core.c | 5 ++++- arch/x86/include/asm/msr-index.h | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 47a973fd75639fe80d59f9e1860113bb2a0b112b Author: Kan Liang Date: Wed Jan 29 07:48:19 2025 -0800 perf/x86/intel: Fix ARCH_PERFMON_NUM_COUNTER_LEAF The EAX of the CPUID Leaf 023H enumerates the mask of valid sub-leaves. To tell the availability of the sub-leaf 1 (enumerate the counter mask), perf should check the bit 1 (0x2) of EAS, rather than bit 0 (0x1). The error is not user-visible on bare metal. Because the sub-leaf 0 and the sub-leaf 1 are always available. However, it may bring issues in a virtualization environment when a VMM only enumerates the sub-leaf 0. Introduce the cpuid35_e?x to replace the macros, which makes the implementation style consistent. Fixes: eb467aaac21e ("perf/x86/intel: Support Architectural PerfMon Extension leaf") Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20250129154820.3755948-3-kan.liang@linux.intel.com arch/x86/events/intel/core.c | 18 ++++++++++-------- arch/x86/include/asm/perf_event.h | 28 +++++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 11 deletions(-) commit 0a5561501397e2bbd0fb0e300eb489f72a90597a Author: Kan Liang Date: Wed Jan 29 07:48:18 2025 -0800 perf/x86/intel: Clean up PEBS-via-PT on hybrid The PEBS-via-PT feature is exposed for the e-core of some hybrid platforms, e.g., ADL and MTL. But it never works. $ dmesg | grep PEBS [ 1.793888] core: cpu_atom PMU driver: PEBS-via-PT $ perf record -c 1000 -e '{intel_pt/branch=0/, cpu_atom/cpu-cycles,aux-output/pp}' -C8 Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (cpu_atom/cpu-cycles,aux-output/pp). "dmesg | grep -i perf" may provide additional information. The "PEBS-via-PT" is printed if the corresponding bit of per-PMU capabilities is set. Since the feature is supported by the e-core HW, perf sets the bit for e-core. However, for Intel PT, if a feature is not supported on all CPUs, it is not supported at all. The PEBS-via-PT event cannot be created successfully. The PEBS-via-PT is no longer enumerated on the latest hybrid platform. It will be deprecated on future platforms with Arch PEBS. Let's remove it from the existing hybrid platforms. Fixes: d9977c43bff8 ("perf/x86: Register hybrid PMUs") Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250129154820.3755948-2-kan.liang@linux.intel.com arch/x86/events/intel/core.c | 10 ---------- arch/x86/events/intel/ds.c | 10 +++++++++- 2 files changed, 9 insertions(+), 11 deletions(-) commit 469c76a83bb9f6b2c7b2989c46617c4fe01fee79 Author: Dhananjay Ugwekar Date: Wed Jan 29 08:05:14 2025 +0000 perf/x86/rapl: Fix the error checking order After the commit b4943b8bfc41 ("perf/x86/rapl: Add core energy counter support for AMD CPUs"), the default "perf record"/"perf top" command is broken in systems where there isn't a PMU registered for type PERF_TYPE_RAW. This is due to the change in order of error checks in rapl_pmu_event_init() Due to which we return -EINVAL instead of -ENOENT, when we reach here from the fallback loop in perf_init_event(). Move the "PMU and event type match" back to the beginning of the function so that we return -ENOENT early on. Closes: https://lore.kernel.org/all/uv7mz6vew2bzgre5jdpmwldxljp5djzmuiksqdcdwipfm4zm7w@ribobcretidk/ Fixes: b4943b8bfc41 ("perf/x86/rapl: Add core energy counter support for AMD CPUs") Reported-by: Koichiro Den Signed-off-by: Dhananjay Ugwekar Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250129080513.30353-1-dhananjay.ugwekar@amd.com arch/x86/events/rapl.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit bcc6244e13b4d4903511a1ea84368abf925031c0 Author: Jann Horn Date: Wed Jan 29 20:53:03 2025 +0100 sched: Clarify wake_up_q()'s write to task->wake_q.next Clarify that wake_up_q() does an atomic write to task->wake_q.next, after which a concurrent __wake_q_add() can immediately overwrite task->wake_q.next again. Signed-off-by: Jann Horn Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20250129-sched-wakeup-prettier-v1-1-2f51f5f663fa@google.com kernel/sched/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7e501637bd5b702a2fa627e903a0025654110e1e Author: Peter Zijlstra Date: Thu Feb 6 11:12:08 2025 +0100 objtool: Move dodgy linker warn to verbose The lld.ld borkage is fixed in the latest llvm release (?) but will not be backported, meaning we're stuck with broken linker for a fair while. Lets not spam all clang build logs and move warning to verbose. Signed-off-by: Peter Zijlstra (Intel) tools/objtool/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3724062ca2b1364f02cf44dbea1a552227844ad1 Author: Josh Poimboeuf Date: Tue Jan 14 13:57:58 2025 -0800 objtool: Ignore dangling jump table entries Clang sometimes leaves dangling unused jump table entries which point to the end of the function. Ignore them. Closes: https://lore.kernel.org/20250113235835.vqgvb7cdspksy5dn@jpoimboe Reported-by: Klaus Kusche Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/ee25c0b7e80113e950bd1d4c208b671d35774ff4.1736891751.git.jpoimboe@kernel.org tools/objtool/check.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c8c9b1d2d5b4377c72a979f5a26e842a869aefc9 Author: Steven Rostedt Date: Sat Feb 8 00:15:11 2025 -0500 fgraph: Fix set_graph_notrace with setting TRACE_GRAPH_NOTRACE_BIT The code was restructured where the function graph notrace code, that would not trace a function and all its children is done by setting a NOTRACE flag when the function that is not to be traced is hit. There's a TRACE_GRAPH_NOTRACE_BIT which defines the bit in the flags and a TRACE_GRAPH_NOTRACE which is the mask with that bit set. But the restructuring used TRACE_GRAPH_NOTRACE_BIT when it should have used TRACE_GRAPH_NOTRACE. For example: # cd /sys/kernel/tracing # echo set_track_prepare stack_trace_save > set_graph_notrace # echo function_graph > current_tracer # cat trace [..] 0) | __slab_free() { 0) | free_to_partial_list() { 0) | arch_stack_walk() { 0) | __unwind_start() { 0) 0.501 us | get_stack_info(); Where a non filter trace looks like: # echo > set_graph_notrace # cat trace 0) | free_to_partial_list() { 0) | set_track_prepare() { 0) | stack_trace_save() { 0) | arch_stack_walk() { 0) | __unwind_start() { Where the filter should look like: # cat trace 0) | free_to_partial_list() { 0) | _raw_spin_lock_irqsave() { 0) 0.350 us | preempt_count_add(); 0) 0.351 us | do_raw_spin_lock(); 0) 2.440 us | } Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250208001511.535be150@batman.local.home Fixes: b84214890a9bc ("function_graph: Move graph notrace bit to shadow stack global var") Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_functions_graph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc2c3540d9477a9931fb0fd851fcaeba524a5b35 Author: Sam Winchenbach Date: Mon Feb 3 13:34:34 2025 +0000 iio: filter: admv8818: Force initialization of SDO When a weak pull-up is present on the SDO line, regmap_update_bits fails to write both the SOFTRESET and SDOACTIVE bits because it incorrectly reads them as already set. Since the soft reset disables the SDO line, performing a read-modify-write operation on ADI_SPI_CONFIG_A to enable the SDO line doesn't make sense. This change directly writes to the register instead of using regmap_update_bits. Fixes: f34fe888ad05 ("iio:filter:admv8818: add support for ADMV8818") Signed-off-by: Sam Winchenbach Link: https://patch.msgid.link/SA1P110MB106904C961B0F3FAFFED74C0BCF5A@SA1P110MB1069.NAMP110.PROD.OUTLOOK.COM Cc: Signed-off-by: Jonathan Cameron drivers/iio/filter/admv8818.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit f7f0adfe64de08803990dc4cbecd2849c04e314a Author: Robin van der Gracht Date: Mon Jan 27 13:16:44 2025 +0100 can: rockchip: rkcanfd_handle_rx_fifo_overflow_int(): bail out if skb cannot be allocated Fix NULL pointer check in rkcanfd_handle_rx_fifo_overflow_int() to bail out if skb cannot be allocated. Fixes: ff60bfbaf67f ("can: rockchip_canfd: add driver for Rockchip CAN-FD controller") Cc: stable@vger.kernel.org Signed-off-by: Robin van der Gracht Link: https://patch.msgid.link/20250208-fix-rockchip-canfd-v1-1-ec533c8a9895@pengutronix.de Signed-off-by: Marc Kleine-Budde drivers/net/can/rockchip/rockchip_canfd-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1ad2109ce41c9e3912dadd07ad8a9c640064ffb Author: Vincent Mailhol Date: Wed Feb 5 00:48:15 2025 +0900 can: etas_es58x: fix potential NULL pointer dereference on udev->serial The driver assumed that es58x_dev->udev->serial could never be NULL. While this is true on commercially available devices, an attacker could spoof the device identity providing a NULL USB serial number. That would trigger a NULL pointer dereference. Add a check on es58x_dev->udev->serial before accessing it. Reported-by: yan kang Reported-by: yue sun Closes: https://lore.kernel.org/linux-can/SY8P300MB0421E0013C0EBD2AA46BA709A1F42@SY8P300MB0421.AUSP300.PROD.OUTLOOK.COM/ Fixes: 9f06631c3f1f ("can: etas_es58x: export product information through devlink_ops::info_get()") Signed-off-by: Vincent Mailhol Link: https://patch.msgid.link/20250204154859.9797-2-mailhol.vincent@wanadoo.fr Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/etas_es58x/es58x_devlink.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 257a2cd3eb578ee63d6bf90475dc4f4b16984139 Author: Krzysztof Kozlowski Date: Sun Jan 12 13:41:52 2025 +0100 can: c_can: fix unbalanced runtime PM disable in error path Runtime PM is enabled as one of the last steps of probe(), so all earlier gotos to "exit_free_device" label were not correct and were leading to unbalanced runtime PM disable depth. Fixes: 6e2fe01dd6f9 ("can: c_can: move runtime PM enable/disable to c_can_platform") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vincent Mailhol Link: https://patch.msgid.link/20250112-syscon-phandle-args-can-v1-1-314d9549906f@linaro.org Signed-off-by: Marc Kleine-Budde drivers/net/can/c_can/c_can_platform.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9bd24927e3eeb85642c7baa3b28be8bea6c2a078 Author: Fedor Pchelkin Date: Tue Jan 14 18:21:38 2025 +0300 can: ctucanfd: handle skb allocation failure If skb allocation fails, the pointer to struct can_frame is NULL. This is actually handled everywhere inside ctucan_err_interrupt() except for the only place. Add the missed NULL check. Found by Linux Verification Center (linuxtesting.org) with SVACE static analysis tool. Fixes: 2dcb8e8782d8 ("can: ctucanfd: add support for CTU CAN FD open-source IP core - bus independent part.") Cc: stable@vger.kernel.org Signed-off-by: Fedor Pchelkin Acked-by: Pavel Pisa Reviewed-by: Vincent Mailhol Link: https://patch.msgid.link/20250114152138.139580-1-pchelkin@ispras.ru Signed-off-by: Marc Kleine-Budde drivers/net/can/ctucanfd/ctucanfd_base.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 44de577e61ed239db09f0da9d436866bef9b77dd Author: Alexander Hölzl Date: Wed Feb 5 18:46:51 2025 +0100 can: j1939: j1939_sk_send_loop(): fix unable to send messages with data length zero The J1939 standard requires the transmission of messages of length 0. For example proprietary messages are specified with a data length of 0 to 1785. The transmission of such messages is not possible. Sending results in no error being returned but no corresponding can frame being generated. Enable the transmission of zero length J1939 messages. In order to facilitate this two changes are necessary: 1) If the transmission of a new message is requested from user space the message is segmented in j1939_sk_send_loop(). Let the segmentation take into account zero length messages, do not terminate immediately, queue the corresponding skb. 2) j1939_session_skb_get_by_offset() selects the next skb to transmit for a session. Take into account that there might be zero length skbs in the queue. Signed-off-by: Alexander Hölzl Acked-by: Oleksij Rempel Link: https://patch.msgid.link/20250205174651.103238-1-alexander.hoelzl@gmx.net Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Cc: stable@vger.kernel.org [mkl: commit message rephrased] Signed-off-by: Marc Kleine-Budde net/can/j1939/socket.c | 4 ++-- net/can/j1939/transport.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) commit d0b197b6505fe3788860fc2a81b3ce53cbecc69c Author: Reyders Morales Date: Mon Feb 3 23:47:20 2025 +0100 Documentation/networking: fix basic node example document ISO 15765-2 In the current struct sockaddr_can tp is member of can_addr. tp is not member of struct sockaddr_can. Signed-off-by: Reyders Morales Reviewed-by: Simon Horman Acked-by: Oliver Hartkopp Link: https://patch.msgid.link/20250203224720.42530-1-reyders1@gmail.com Fixes: 67711e04254c ("Documentation: networking: document ISO 15765-2") Signed-off-by: Marc Kleine-Budde Documentation/networking/iso15765-2.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8f6629c004b193d23612641c3607e785819e97ab Author: Nathan Chancellor Date: Thu Oct 17 10:09:22 2024 -0700 kbuild: Move -Wenum-enum-conversion to W=2 -Wenum-enum-conversion was strengthened in clang-19 to warn for C, which caused the kernel to move it to W=1 in commit 75b5ab134bb5 ("kbuild: Move -Wenum-{compare-conditional,enum-conversion} into W=1") because there were numerous instances that would break builds with -Werror. Unfortunately, this is not a full solution, as more and more developers, subsystems, and distributors are building with W=1 as well, so they continue to see the numerous instances of this warning. Since the move to W=1, there have not been many new instances that have appeared through various build reports and the ones that have appeared seem to be following similar existing patterns, suggesting that most instances of this warning will not be real issues. The only alternatives for silencing this warning are adding casts (which is generally seen as an ugly practice) or refactoring the enums to macro defines or a unified enum (which may be undesirable because of type safety in other parts of the code). Move the warning to W=2, where warnings that occur frequently but may be relevant should reside. Cc: stable@vger.kernel.org Fixes: 75b5ab134bb5 ("kbuild: Move -Wenum-{compare-conditional,enum-conversion} into W=1") Link: https://lore.kernel.org/ZwRA9SOcOjjLJcpi@google.com/ Signed-off-by: Nathan Chancellor Acked-by: Arnd Bergmann Signed-off-by: Linus Torvalds scripts/Makefile.extrawarn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2b753053980339a25d7ccc717b879f64e6a1cbea Merge: 7ee983c850b4 57e4a9bd61c3 Author: Linus Torvalds Date: Fri Feb 7 19:23:06 2025 -0800 Merge tag 'v6.14rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: - Three DFS fixes: DFS mount fix, fix for noisy log msg and one to remove some unused code - SMB3 Lease fix * tag 'v6.14rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: smb: client: change lease epoch type from unsigned int to __u16 smb: client: get rid of kstrdup() in get_ses_refpath() smb: client: fix noisy when tree connecting to DFS interlink targets smb: client: don't trust DFSREF_STORAGE_SERVER bit commit 8784714d7f27045c7cb72456cf66705b73fbc804 Author: Kumar Kartikeya Dwivedi Date: Thu Feb 6 02:54:31 2025 -0800 bpf: Handle allocation failure in acquire_lock_state The acquire_lock_state function needs to handle possible NULL values returned by acquire_reference_state, and return -ENOMEM. Fixes: 769b0f1c8214 ("bpf: Refactor {acquire,release}_reference_state") Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20250206105435.2159977-24-memxor@gmail.com Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 2 ++ 1 file changed, 2 insertions(+) commit 011b0335903832facca86cd8ed05d7d8d94c9c76 Author: Paolo Abeni Date: Thu Feb 6 22:28:48 2025 +0100 Revert "net: skb: introduce and use a single page frag cache" This reverts commit dbae2b062824 ("net: skb: introduce and use a single page frag cache"). The intended goal of such change was to counter a performance regression introduced by commit 3226b158e67c ("net: avoid 32 x truesize under-estimation for tiny skbs"). Unfortunately, the blamed commit introduces another regression for the virtio_net driver. Such a driver calls napi_alloc_skb() with a tiny size, so that the whole head frag could fit a 512-byte block. The single page frag cache uses a 1K fragment for such allocation, and the additional overhead, under small UDP packets flood, makes the page allocator a bottleneck. Thanks to commit bf9f1baa279f ("net: add dedicated kmem_cache for typical/small skb->head"), this revert does not re-introduce the original regression. Actually, in the relevant test on top of this revert, I measure a small but noticeable positive delta, just above noise level. The revert itself required some additional mangling due to the introduction of the SKB_HEAD_ALIGN() helper and local lock infra in the affected code. Suggested-by: Eric Dumazet Fixes: dbae2b062824 ("net: skb: introduce and use a single page frag cache") Signed-off-by: Paolo Abeni Link: https://patch.msgid.link/e649212fde9f0fdee23909ca0d14158d32bb7425.1738877290.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski include/linux/netdevice.h | 1 - net/core/dev.c | 17 ++++++++ net/core/skbuff.c | 103 +++------------------------------------------- 3 files changed, 22 insertions(+), 99 deletions(-) commit 310794c219e7b6bd4b21254ac3b871ee989cbece Merge: 517e8a7835e8 7968c6581507 Author: Alexei Starovoitov Date: Fri Feb 7 15:45:44 2025 -0800 Merge branch 'bpf-some-fixes-for-nullness-elision' Daniel Xu says: ==================== Tow fixes for nullness elision. Changes from v1: * Reword commit message in patch 1 * Add tags ==================== Link: https://patch.msgid.link/cover.1738689872.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 7968c6581507052c1c6484ee6c5cbe07381e2dbc Author: Daniel Xu Date: Tue Feb 4 10:25:18 2025 -0700 bpf: verifier: Disambiguate get_constant_map_key() errors Refactor get_constant_map_key() to disambiguate the constant key value from potential error values. In the case that the key is negative, it could be confused for an error. It's not currently an issue, as the verifier seems to track s32 spills as u32. So even if the program wrongly uses a negative value for an arraymap key, the verifier just thinks it's an impossibly high value which gets correctly discarded. Refactor anyways to make things cleaner and prevent potential future issues. Acked-by: Eduard Zingerman Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/dfe144259ae7cfc98aa63e1b388a14869a10632a.1738689872.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 973cb1382ead401c476c82f20525e593ae84788f Author: Daniel Xu Date: Tue Feb 4 10:25:17 2025 -0700 bpf: selftests: Test constant key extraction on irrelevant maps Test that very high constant map keys are not interpreted as an error value by the verifier. This would previously fail. Acked-by: Eduard Zingerman Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/c0590b62eb9303f389b2f52c0c7e9cf22a358a30.1738689872.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/progs/verifier_array_access.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 884c3a18dadfda326dffa364477cc027728219de Author: Daniel Xu Date: Tue Feb 4 10:25:16 2025 -0700 bpf: verifier: Do not extract constant map keys for irrelevant maps Previously, we were trying to extract constant map keys for all bpf_map_lookup_elem(), regardless of map type. This is an issue if the map has a u64 key and the value is very high, as it can be interpreted as a negative signed value. This in turn is treated as an error value by check_func_arg() which causes a valid program to be incorrectly rejected. Fix by only extracting constant map keys for relevant maps. This fix works because nullness elision is only allowed for {PERCPU_}ARRAY maps, and keys for these are within u32 range. See next commit for an example via selftest. Acked-by: Eduard Zingerman Reported-by: Marc Hartmayer Reported-by: Ilya Leoshkevich Tested-by: Marc Hartmayer Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/aa868b642b026ff87ba6105ea151bc8693b35932.1738689872.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit db5fd3cf8bf41b84b577b8ad5234ea95f327c9be Author: Muhammad Adeel Date: Fri Feb 7 14:24:32 2025 +0000 cgroup: Remove steal time from usage_usec The CPU usage time is the time when user, system or both are using the CPU. Steal time is the time when CPU is waiting to be run by the Hypervisor. It should not be added to the CPU usage time, hence removing it from the usage_usec entry. Fixes: 936f2a70f2077 ("cgroup: add cpu.stat file to root cgroup") Acked-by: Axel Busch Acked-by: Michal Koutný Signed-off-by: Muhammad Adeel Signed-off-by: Tejun Heo kernel/cgroup/rstat.c | 1 - 1 file changed, 1 deletion(-) commit 7ee983c850b40043ac4751836fbd9a2b4d0c5937 Merge: 8aa0f49c0011 4f6993b3feab Author: Linus Torvalds Date: Fri Feb 7 12:21:54 2025 -0800 Merge tag 'drm-fixes-2025-02-08' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Just regular drm fixes, amdgpu, xe and i915 mostly, but a few scattered fixes. I think one of the i915 fixes fixes some build combos that Guenter was seeing. amdgpu: - Add new tiling flag for DCC write compress disable - Add BO metadata flag for DCC - Fix potential out of bounds access in display - Seamless boot fix - CONFIG_FRAME_WARN fix - PSR1 fix xe: - OA uAPI related fixes - Fix SRIOV migration initialization - Restore devcoredump to a sane state i915: - Fix the build error with clamp after WARN_ON on gcc 13.x+ - HDCP related fixes - PMU fix zero delta busyness issue - Fix page cleanup on DMA remap failure - Drop 64bpp YUV formats from ICL+ SDR planes - GuC log related fix - DisplayPort related fixes ivpu: - Fix error handling komeda: - add return check zynqmp: - fix locking in DP code ast: - fix AST DP timeout cec: - fix broken CEC adapter check" * tag 'drm-fixes-2025-02-08' of https://gitlab.freedesktop.org/drm/kernel: (29 commits) drm/i915/dp: Fix potential infinite loop in 128b/132b SST Revert "drm/amd/display: Use HW lock mgr for PSR1" drm/amd/display: Respect user's CONFIG_FRAME_WARN more for dml files accel/amdxdna: Add MODULE_FIRMWARE() declarations drm/i915/dp: Iterate DSC BPP from high to low on all platforms drm/xe: Fix and re-enable xe_print_blob_ascii85() drm/xe/devcoredump: Move exec queue snapshot to Contexts section drm/xe/oa: Set stream->pollin in xe_oa_buffer_check_unlocked drm/xe/pf: Fix migration initialization drm/xe/oa: Preserve oa_ctrl unused bits drm/amd/display: Fix seamless boot sequence drm/amd/display: Fix out-of-bound accesses drm/amdgpu: add a BO metadata flag to disable write compression for Vulkan drm/i915/backlight: Return immediately when scale() finds invalid parameters drm/i915/dp: Return min bpc supported by source instead of 0 drm/i915/dp: fix the Adaptive sync Operation mode for SDP drm/i915/guc: Debug print LRC state entries only if the context is pinned drm/i915: Drop 64bpp YUV formats from ICL+ SDR planes drm/i915: Fix page cleanup on DMA remap failure drm/i915/pmu: Fix zero delta busyness issue ... commit cb827db50a88aebec516151681adb6db10b688ee Author: Eric Dumazet Date: Thu Feb 6 08:30:51 2025 +0000 net: fib_rules: annotate data-races around rule->[io]ifindex rule->iifindex and rule->oifindex can be read without holding RTNL. Add READ_ONCE()/WRITE_ONCE() annotations where needed. Fixes: 32affa5578f0 ("fib: rules: no longer hold RTNL in fib_nl_dumprule()") Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20250206083051.2494877-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/core/fib_rules.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 01af106a076352182b2916b143fc50272600bd81 Author: Matthew Wilcox (Oracle) Date: Tue Jan 21 05:40:51 2025 +0000 btrfs: fix two misuses of folio_shift() It is meaningless to shift a byte count by folio_shift(). The folio index is in units of PAGE_SIZE, not folio_size(). We can use folio_contains() to make this work for arbitrary-order folios, so remove the assertion that the folios are of order 0. Reviewed-by: Qu Wenruo Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 595170d4b660640289003d1881a9a6ef8ded6865 Author: Kent Overstreet Date: Thu Feb 6 22:28:41 2025 -0500 bcachefs: Fix marking reflink pointers to missing indirect extents reflink pointers to missing indirect extents aren't deleted, they just have an error bit set - in case the indirect extent somehow reappears. fsck/mark and sweep thus needs to ignore these errors. Also, they can be marked AUTOFIX now. Reported-by: Roland Vet Signed-off-by: Kent Overstreet fs/bcachefs/reflink.c | 2 ++ fs/bcachefs/sb-errors_format.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit 8aa0f49c0011ade597b1659df54e0c9fabbd6d58 Merge: a67d0a051349 07e0d99a2f70 Author: Linus Torvalds Date: Fri Feb 7 11:05:50 2025 -0800 Merge tag 'stable/for-linus-6.14-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft Pull ibft fixes from Konrad Rzeszutek Wilk: "Two tiny fixes to IBFT code: one for Kconfig and another for IPv6" * tag 'stable/for-linus-6.14-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft: iscsi_ibft: Fix UBSAN shift-out-of-bounds warning in ibft_attr_show_nic() firmware: iscsi_ibft: fix ISCSI_IBFT Kconfig entry commit a67d0a051349d89afe4d5ad4ef85a7d576d69e2a Merge: 1fa9970a4e61 96b531f9bb0d Author: Linus Torvalds Date: Fri Feb 7 11:00:33 2025 -0800 Merge tag 'block-6.14-20250207' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - MD pull request via Song: - fix an error handling path for md-linear - NVMe pull request via Keith: - Connection fixes for fibre channel transport (Daniel) - Endian fixes (Keith, Christoph) - Cleanup fix for host memory buffer (Francis) - Platform specific power quirks (Georg) - Target memory leak (Sagi) - Use appropriate controller state accessor (Daniel) - Fixup for a regression introduced last week, where sunvdc wasn't updated for an API change, causing compilation failures on sparc64. * tag 'block-6.14-20250207' of git://git.kernel.dk/linux: drivers/block/sunvdc.c: update the correct AIP call md: Fix linear_set_limits() nvme-fc: use ctrl state getter nvme: make nvme_tls_attrs_group static nvmet: add a missing endianess conversion in nvmet_execute_admin_connect nvmet: the result field in nvmet_alloc_ctrl_args is little endian nvmet: fix a memory leak in controller identify nvme-fc: do not ignore connectivity loss during connecting nvme: handle connectivity loss in nvme_set_queue_count nvme-fc: go straight to connecting state when initializing nvme-pci: Add TUXEDO IBP Gen9 to Samsung sleep quirk nvme-pci: Add TUXEDO InfinityFlex to Samsung sleep quirk nvme-pci: remove redundant dma frees in hmb nvmet: fix rw control endian access commit f354fc88a72ae83dacd68370f6fa040e5733bcfe Author: WangYuli Date: Fri Feb 7 15:08:55 2025 +0800 kbuild: install-extmod-build: add missing quotation marks for CC variable While attempting to build a Debian packages with CC="ccache gcc", I saw the following error as builddeb builds linux-headers-$KERNELVERSION: make HOSTCC=ccache gcc VPATH= srcroot=. -f ./scripts/Makefile.build obj=debian/linux-headers-6.14.0-rc1/usr/src/linux-headers-6.14.0-rc1/scripts make[6]: *** No rule to make target 'gcc'. Stop. Upon investigation, it seems that one instance of $(CC) variable reference in ./scripts/package/install-extmod-build was missing quotation marks, causing the above error. Add the missing quotation marks around $(CC) to fix build. Fixes: 5f73e7d0386d ("kbuild: refactor cross-compiling linux-headers package") Co-developed-by: Mingcong Bai Signed-off-by: Mingcong Bai Tested-by: WangYuli Signed-off-by: WangYuli Signed-off-by: Masahiro Yamada scripts/package/install-extmod-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fa9970a4e61e9383a8ee738b44e2194d4ce7ff5 Merge: 0aa0282a720f 73195bed7899 Author: Linus Torvalds Date: Fri Feb 7 10:34:50 2025 -0800 Merge tag 'pm-6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix a handful of issues in the amd-pstate driver, the airoha cpufreq driver build, a (recently added) possible NULL pointer dereference in the cpufreq code and a possible memory leak in the power capping subsystem: - Fix cpufreq_policy reference counting and prevent max_perf from going above the current limit in amd-pstate, and drop a redundant goto label from it (Dhananjay Ugwekar) - Prevent the per-policy boost_enabled flag in amd-pstate from getting out of sync with the actual state after boot failures (Lifeng Zheng) - Fix a recently added possible NULL pointer dereference in the cpufreq core (Aboorva Devarajan) - Fix a build issue related to CONFIG_OF and COMPILE_TEST dependencies in the airoha cpufreq driver (Arnd Bergmann) - Fix a possible memory leak in the power capping subsystem (Joe Hattori)" * tag 'pm-6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq/amd-pstate: Fix cpufreq_policy ref counting cpufreq: prevent NULL dereference in cpufreq_online() cpufreq: airoha: modify CONFIG_OF dependency cpufreq/amd-pstate: Fix max_perf updation with schedutil cpufreq/amd-pstate: Remove the goto label in amd_pstate_update_limits cpufreq/amd-pstate: Fix per-policy boost flag incorrect when fail powercap: call put_device() on an error path in powercap_register_control_type() commit 0aa0282a720fd7c58f131eb5a5b0440e839e2977 Merge: 78b2a2328bf9 3e3e377dd1f3 Author: Linus Torvalds Date: Fri Feb 7 10:08:25 2025 -0800 Merge tag 'acpi-6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix three assorted issues, including one recent regression: - Add an ACPI IRQ override quirk for Eluktronics MECH-17 to make the internal keyboard work (Gannon Kolding) - Make acpi_data_prop_read() reflect the OF counterpart behavior in error cases (Andy Shevchenko) - Remove recently added strict ACPI PRM handler address checks that prevented PRM from working on some platforms in the field (Aubrey Li)" * tag 'acpi-6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: PRM: Remove unnecessary strict handler address checks ACPI: resource: IRQ override for Eluktronics MECH-17 ACPI: property: Fix return value for nval == 0 in acpi_data_prop_read() commit 78b2a2328bf931ff7791dbfb82c2da97d10b42f9 Merge: 8c67da5bc11a 59ff2040f0a5 Author: Linus Torvalds Date: Fri Feb 7 09:50:33 2025 -0800 Merge tag 'gpio-fixes-for-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix interrupt support in gpio-pca953x - fix configfs attribute locking in gpio-sim - limit the visibility of the GPIO_GRGPIO Kconfig symbol to OF systems only - update MAINTAINERS * tag 'gpio-fixes-for-v6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: MAINTAINERS: Use my kernel.org address for ACPI GPIO work gpio: GPIO_GRGPIO should depend on OF gpio: sim: lock hog configfs items if present gpio: pca953x: Improve interrupt support commit 8c67da5bc11a79833d9fd464e82b1b271c67fc87 Merge: 94b481f7671f 37d11cfc6360 Author: Linus Torvalds Date: Fri Feb 7 09:22:31 2025 -0800 Merge tag 'vfs-6.14-rc2.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: - Fix fsnotify FMODE_NONOTIFY* handling. This also disables fsnotify on all pseudo files by default apart from very select exceptions. This carries a regression risk so we need to watch out and adapt accordingly. However, it is overall a significant improvement over the current status quo where every rando file can get fsnotify enabled. - Cleanup and simplify lockref_init() after recent lockref changes. - Fix vboxfs build with gcc-15. - Add an assert into inode_set_cached_link() to catch corrupt links. - Allow users to also use an empty string check to detect whether a given mount option string was empty or not. - Fix how security options were appended to statmount()'s ->mnt_opt field. - Fix statmount() selftests to always check the returned mask. - Fix uninitialized value in vfs_statx_path(). - Fix pidfs_ioctl() sanity checks to guard against ioctl() overloading and preserve extensibility. * tag 'vfs-6.14-rc2.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: vfs: sanity check the length passed to inode_set_cached_link() pidfs: improve ioctl handling fsnotify: disable pre-content and permission events by default selftests: always check mask returned by statmount(2) fsnotify: disable notification by default for all pseudo files fs: fix adding security options to statmount.mnt_opt fsnotify: use accessor to set FMODE_NONOTIFY_* lockref: remove count argument of lockref_init gfs2: switch to lockref_init(..., 1) gfs2: use lockref_init for gl_lockref statmount: let unset strings be empty vboxsf: fix building with GCC 15 fs/stat.c: avoid harmless garbage value problem in vfs_statx_path() commit 94b481f7671f412b571e4ee5e3b24f33a889812d Merge: 1b3291f00013 4be214c26936 Author: Linus Torvalds Date: Fri Feb 7 09:16:07 2025 -0800 Merge tag 'bcachefs-2025-02-06.2' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: "Nothing major, things continue to be fairly quiet over here. - add a SubmittingPatches to clarify that patches submitted for bcachefs do, in fact, need to be tested - discard path now correctly issues journal flushes when needed, this fixes performance issues when the filesystem is nearly full and we're bottlenecked on copygc - fix a bug that could cause the pending rebalance work accounting to be off when devices are being onlined/offlined; users should report if they are still seeing this - and a few more trivial ones" * tag 'bcachefs-2025-02-06.2' of git://evilpiepirate.org/bcachefs: bcachefs: bch2_bkey_sectors_need_rebalance() now only depends on bch_extent_rebalance bcachefs: Fix rcu imbalance in bch2_fs_btree_key_cache_exit() bcachefs: Fix discard path journal flushing bcachefs: fix deadlock in journal_entry_open() bcachefs: fix incorrect pointer check in __bch2_subvolume_delete() bcachefs docs: SubmittingPatches.rst commit 1b3291f00013c86a9bb349d6158a9a7a4f0334fe Author: Hector Martin Date: Fri Feb 7 03:21:46 2025 +0900 MAINTAINERS: Remove myself I no longer have any faith left in the kernel development process or community management approach. Apple/ARM platform development will continue downstream. If I feel like sending some patches upstream in the future myself for whatever subtree I may, or I may not. Anyone who feels like fighting the upstreaming fight themselves is welcome to do so. Signed-off-by: Hector Martin Signed-off-by: Linus Torvalds MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 511121a48bbd12df4ae50a099a8936e833df8c46 Author: Pavel Machek Date: Wed Feb 5 19:42:01 2025 +0100 MAINTAINERS: Move Pavel to kernel.org address I need to filter my emails better, switch to pavel@kernel.org address to help with that. Signed-off-by: Pavel Machek Signed-off-by: Linus Torvalds CREDITS | 6 ++---- MAINTAINERS | 10 +++++----- 2 files changed, 7 insertions(+), 9 deletions(-) commit 3b32b7f638fe61e9d29290960172f4e360e38233 Author: Su Hui Date: Sun Jan 19 10:58:29 2025 +0800 drm/panthor: avoid garbage value in panthor_ioctl_dev_query() 'priorities_info' is uninitialized, and the uninitialized value is copied to user object when calling PANTHOR_UOBJ_SET(). Using memset to initialize 'priorities_info' to avoid this garbage value problem. Fixes: f70000ef2352 ("drm/panthor: Add DEV_QUERY_GROUP_PRIORITIES_INFO dev query") Signed-off-by: Su Hui Reviewed-by: Dan Carpenter Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20250119025828.1168419-1-suhui@nfschina.com drivers/gpu/drm/panthor/panthor_drv.c | 1 + 1 file changed, 1 insertion(+) commit 02458fbfaa0170aabf8506f7d4ed054f02414251 Author: Rupinderjit Singh Date: Thu Feb 6 15:58:03 2025 +0000 gpu: host1x: Fix a use of uninitialized mutex commit c8347f915e67 ("gpu: host1x: Fix boot regression for Tegra") caused a use of uninitialized mutex leading to below warning when CONFIG_DEBUG_MUTEXES and CONFIG_DEBUG_LOCK_ALLOC are enabled. [ 41.662843] ------------[ cut here ]------------ [ 41.663012] DEBUG_LOCKS_WARN_ON(lock->magic != lock) [ 41.663035] WARNING: CPU: 4 PID: 794 at kernel/locking/mutex.c:587 __mutex_lock+0x670/0x878 [ 41.663458] Modules linked in: rtw88_8822c(+) bluetooth(+) rtw88_pci rtw88_core mac80211 aquantia libarc4 crc_itu_t cfg80211 tegra194_cpufreq dwmac_tegra(+) arm_dsu_pmu stmmac_platform stmmac pcs_xpcs rfkill at24 host1x(+) tegra_bpmp_thermal ramoops reed_solomon fuse loop nfnetlink xfs mmc_block rpmb_core ucsi_ccg ina3221 crct10dif_ce xhci_tegra ghash_ce lm90 sha2_ce sha256_arm64 sha1_ce sdhci_tegra pwm_fan sdhci_pltfm sdhci gpio_keys rtc_tegra cqhci mmc_core phy_tegra_xusb i2c_tegra tegra186_gpc_dma i2c_tegra_bpmp spi_tegra114 dm_mirror dm_region_hash dm_log dm_mod [ 41.665078] CPU: 4 UID: 0 PID: 794 Comm: (udev-worker) Not tainted 6.11.0-29.31_1538613708.el10.aarch64+debug #1 [ 41.665838] Hardware name: NVIDIA NVIDIA Jetson AGX Orin Developer Kit/Jetson, BIOS 36.3.0-gcid-35594366 02/26/2024 [ 41.672555] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 41.679636] pc : __mutex_lock+0x670/0x878 [ 41.683834] lr : __mutex_lock+0x670/0x878 [ 41.688035] sp : ffff800084b77090 [ 41.691446] x29: ffff800084b77160 x28: ffffdd4bebf7b000 x27: ffffdd4be96b1000 [ 41.698799] x26: 1fffe0002308361c x25: 1ffff0001096ee18 x24: 0000000000000000 [ 41.706149] x23: 0000000000000000 x22: 0000000000000002 x21: ffffdd4be6e3c7a0 [ 41.713500] x20: ffff800084b770f0 x19: ffff00011841b1e8 x18: 0000000000000000 [ 41.720675] x17: 0000000000000000 x16: 0000000000000000 x15: 0720072007200720 [ 41.728023] x14: 0000000000000000 x13: 0000000000000001 x12: ffff6001a96eaab3 [ 41.735375] x11: 1fffe001a96eaab2 x10: ffff6001a96eaab2 x9 : ffffdd4be4838bbc [ 41.742723] x8 : 00009ffe5691554e x7 : ffff000d4b755593 x6 : 0000000000000001 [ 41.749985] x5 : ffff000d4b755590 x4 : 1fffe0001d88f001 x3 : dfff800000000000 [ 41.756988] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0000ec478000 [ 41.764251] Call trace: [ 41.766695] __mutex_lock+0x670/0x878 [ 41.770373] mutex_lock_nested+0x2c/0x40 [ 41.774134] host1x_intr_start+0x54/0xf8 [host1x] [ 41.778863] host1x_runtime_resume+0x150/0x228 [host1x] [ 41.783935] pm_generic_runtime_resume+0x84/0xc8 [ 41.788485] __rpm_callback+0xa0/0x478 [ 41.792422] rpm_callback+0x15c/0x1a8 [ 41.795922] rpm_resume+0x698/0xc08 [ 41.799597] __pm_runtime_resume+0xa8/0x140 [ 41.803621] host1x_probe+0x810/0xbc0 [host1x] [ 41.807909] platform_probe+0xcc/0x1a8 [ 41.811845] really_probe+0x188/0x800 [ 41.815347] __driver_probe_device+0x164/0x360 [ 41.819810] driver_probe_device+0x64/0x1a8 [ 41.823834] __driver_attach+0x180/0x490 [ 41.827773] bus_for_each_dev+0x104/0x1a0 [ 41.831797] driver_attach+0x44/0x68 [ 41.835296] bus_add_driver+0x23c/0x4e8 [ 41.839235] driver_register+0x15c/0x3a8 [ 41.843170] __platform_register_drivers+0xa4/0x208 [ 41.848159] tegra_host1x_init+0x4c/0xff8 [host1x] [ 41.853147] do_one_initcall+0xd4/0x380 [ 41.856997] do_init_module+0x1dc/0x698 [ 41.860758] load_module+0xc70/0x1300 [ 41.864435] __do_sys_init_module+0x1a8/0x1d0 [ 41.868721] __arm64_sys_init_module+0x74/0xb0 [ 41.873183] invoke_syscall.constprop.0+0xdc/0x1e8 [ 41.877997] do_el0_svc+0x154/0x1d0 [ 41.881671] el0_svc+0x54/0x140 [ 41.884820] el0t_64_sync_handler+0x120/0x130 [ 41.889285] el0t_64_sync+0x1a4/0x1a8 [ 41.892960] irq event stamp: 69737 [ 41.896370] hardirqs last enabled at (69737): [] _raw_spin_unlock_irqrestore+0x44/0xe8 [ 41.905739] hardirqs last disabled at (69736): [] clk_enable_lock+0x98/0x198 [ 41.914314] softirqs last enabled at (68082): [] handle_softirqs+0x4c8/0x890 [ 41.922977] softirqs last disabled at (67945): [] __do_softirq+0x1c/0x28 [ 41.931289] ---[ end trace 0000000000000000 ]--- Inside the probe function when pm_runtime_enable() is called, the PM core invokes a resume callback if the device Host1x is in a suspended state. As it can be seen in the logs above, this leads to host1x_intr_start() function call which is trying to acquire a mutex lock. But, the function host_intr_init() only gets called after the pm_runtime_enable() where mutex is initialised leading to the use of mutex prior to its initialisation. Fix this by moving the mutex initialisation prior to the runtime PM enablement function pm_runtime_enable() in probe. Fixes: c8347f915e67 ("gpu: host1x: Fix boot regression for Tegra") Signed-off-by: Rupinderjit Singh Reviewed-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Thierry Reding Link: https://patchwork.ozlabs.org/project/linux-tegra/patch/20250206155803.201942-1-rusingh@redhat.com/ drivers/gpu/host1x/dev.c | 2 ++ drivers/gpu/host1x/intr.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit 96b531f9bb0da924299d1850bb9b2911f5c0c50a Merge: 457bf49627ae a572593ac80e Author: Jens Axboe Date: Fri Feb 7 07:23:03 2025 -0700 Merge tag 'md-6.14-20250206' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux into block-6.14 Pull MD fix from Song: "This patch, by Bart Van Assche, fixes an error handling path for md-linear." * tag 'md-6.14-20250206' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux: md: Fix linear_set_limits() commit b051ffa2aeb2a60e092387b6fb2af1ad42f51a3c Author: Vicki Pfau Date: Tue Feb 4 19:55:29 2025 -0800 HID: hid-steam: Don't use cancel_delayed_work_sync in IRQ context Lockdep reported that, as steam_do_deck_input_event is called from steam_raw_event inside of an IRQ context, it can lead to issues if that IRQ occurs while the work to be cancelled is running. By using cancel_delayed_work, this issue can be avoided. The exact ordering of the work and the event processing is not super important, so this is safe. Fixes: cd438e57dd05 ("HID: hid-steam: Add gamepad-only mode switched to by holding options") Signed-off-by: Vicki Pfau Signed-off-by: Jiri Kosina drivers/hid/hid-steam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79504249d7e27cad4a3eeb9afc6386e418728ce0 Author: Vicki Pfau Date: Tue Feb 4 19:55:27 2025 -0800 HID: hid-steam: Move hidraw input (un)registering to work Due to an interplay between locking in the input and hid transport subsystems, attempting to register or deregister the relevant input devices during the hidraw open/close events can lead to a lock ordering issue. Though this shouldn't cause a deadlock, this commit moves the input device manipulation to deferred work to sidestep the issue. Fixes: 385a4886778f6 ("HID: steam: remove input device when a hid client is running.") Signed-off-by: Vicki Pfau Signed-off-by: Jiri Kosina drivers/hid/hid-steam.c | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) commit 0b43d98ff29be3144e86294486b1373b5df74c0e Author: Tulio Fernandes Date: Wed Feb 5 18:50:34 2025 -0300 HID: hid-thrustmaster: fix stack-out-of-bounds read in usb_check_int_endpoints() Syzbot[1] has detected a stack-out-of-bounds read of the ep_addr array from hid-thrustmaster driver. This array is passed to usb_check_int_endpoints function from usb.c core driver, which executes a for loop that iterates over the elements of the passed array. Not finding a null element at the end of the array, it tries to read the next, non-existent element, crashing the kernel. To fix this, a 0 element was added at the end of the array to break the for loop. [1] https://syzkaller.appspot.com/bug?extid=9c9179ac46169c56c1ad Reported-by: syzbot+9c9179ac46169c56c1ad@syzkaller.appspotmail.com Fixes: 50420d7c79c3 ("HID: hid-thrustmaster: Fix warning in thrustmaster_probe by adding endpoint check") Signed-off-by: Túlio Fernandes Signed-off-by: Jiri Kosina drivers/hid/hid-thrustmaster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 819083cb6eedcc8495cbf84845877bcc741b93b3 Author: Alex Henrie Date: Thu Jan 16 23:12:17 2025 -0700 HID: apple: fix up the F6 key on the Omoton KB066 keyboard The Omoton KB066 is an Apple A1255 keyboard clone (HID product code 05ac:022c). On both keyboards, the F6 key becomes Num Lock when the Fn key is held. But unlike its Apple exemplar, when the Omoton's F6 key is pressed without Fn, it sends the usage code 0xC0301 from the reserved section of the consumer page instead of the standard F6 usage code 0x7003F from the keyboard page. The nonstandard code is translated to KEY_UNKNOWN and becomes useless on Linux. The Omoton KB066 is a pretty popular keyboard, judging from its 29,058 reviews on Amazon at time of writing, so let's account for its quirk to make it more usable. By the way, it would be nice if we could automatically set fnmode to 0 for Omoton keyboards because they handle the Fn key internally and the kernel's Fn key handling creates undesirable side effects such as making F1 and F2 always Brightness Up and Brightness Down in fnmode=1 (the default) or always F1 and F2 in fnmode=2. Unfortunately I don't think there's a way to identify Bluetooth keyboards more specifically than the HID product code which is obviously inaccurate. Users of Omoton keyboards will just have to set fnmode to 0 manually to get full Fn key functionality. Signed-off-by: Alex Henrie Signed-off-by: Jiri Kosina drivers/hid/hid-apple.c | 3 +++ 1 file changed, 3 insertions(+) commit 2813e00dcd748cef47d2bffaa04071de93fddf00 Author: Ievgen Vovk Date: Sun Jan 12 13:13:14 2025 +0900 HID: hid-apple: Apple Magic Keyboard a3203 USB-C support Add Apple Magic Keyboard 2024 model (with USB-C port) device ID (0320) to those recognized by the hid-apple driver. Keyboard is otherwise compatible with the existing implementation for its earlier 2021 model. Signed-off-by: Ievgen Vovk Signed-off-by: Jiri Kosina drivers/hid/hid-apple.c | 5 +++++ drivers/hid/hid-ids.h | 1 + 2 files changed, 6 insertions(+) commit 3e3e377dd1f300bbdd230533686ce9c9f4f8a90d Merge: 7f5704b6a143 ab930483eca9 607ab6f85f41 Author: Rafael J. Wysocki Date: Fri Feb 7 13:06:31 2025 +0100 Merge branches 'acpi-property' and 'acpi-resource' Merge a new ACPI IRQ override quirk for Eluktronics MECH-17 (Gannon Kolding) and an acpi_data_prop_read() fix making it reflect the OF counterpart behavior in error cases (Andy Shevchenko). * acpi-property: ACPI: property: Fix return value for nval == 0 in acpi_data_prop_read() * acpi-resource: ACPI: resource: IRQ override for Eluktronics MECH-17 commit 73195bed7899150cd1005cf0a902b68793adad23 Merge: b3cc5afc4d97 93c66fbc2807 Author: Rafael J. Wysocki Date: Fri Feb 7 12:43:58 2025 +0100 Merge branch 'pm-powercap' Fix a possible memory leak in the power capping subsystem (Joe Hattori). * pm-powercap: powercap: call put_device() on an error path in powercap_register_control_type() commit 875d742cf5327c93cba1f11e12b08d3cce7a88d2 Author: Radu Rendec Date: Thu Feb 6 12:44:20 2025 -0500 arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array The loop that detects/populates cache information already has a bounds check on the array size but does not account for cache levels with separate data/instructions cache. Fix this by incrementing the index for any populated leaf (instead of any populated level). Fixes: 5d425c186537 ("arm64: kernel: add support for cpu cache information") Signed-off-by: Radu Rendec Link: https://lore.kernel.org/r/20250206174420.2178724-1-rrendec@redhat.com Signed-off-by: Will Deacon arch/arm64/kernel/cacheinfo.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit ca0f4fe7cf7183bfbdc67ca2de56ae1fc3a8db2b Author: Nathan Chancellor Date: Thu Feb 6 10:21:38 2025 -0700 arm64: Handle .ARM.attributes section in linker scripts A recent LLVM commit [1] started generating an .ARM.attributes section similar to the one that exists for 32-bit, which results in orphan section warnings (or errors if CONFIG_WERROR is enabled) from the linker because it is not handled in the arm64 linker scripts. ld.lld: error: arch/arm64/kernel/vdso/vgettimeofday.o:(.ARM.attributes) is being placed in '.ARM.attributes' ld.lld: error: arch/arm64/kernel/vdso/vgetrandom.o:(.ARM.attributes) is being placed in '.ARM.attributes' ld.lld: error: vmlinux.a(lib/vsprintf.o):(.ARM.attributes) is being placed in '.ARM.attributes' ld.lld: error: vmlinux.a(lib/win_minmax.o):(.ARM.attributes) is being placed in '.ARM.attributes' ld.lld: error: vmlinux.a(lib/xarray.o):(.ARM.attributes) is being placed in '.ARM.attributes' Discard the new sections in the necessary linker scripts to resolve the warnings, as the kernel and vDSO do not need to retain it, similar to the .note.gnu.property section. Cc: stable@vger.kernel.org Fixes: b3e5d80d0c48 ("arm64/build: Warn on orphan section placement") Link: https://github.com/llvm/llvm-project/commit/ee99c4d4845db66c4daa2373352133f4b237c942 [1] Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20250206-arm64-handle-arm-attributes-in-linker-script-v3-1-d53d169913eb@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/vdso/vdso.lds.S | 1 + arch/arm64/kernel/vmlinux.lds.S | 1 + 2 files changed, 2 insertions(+) commit 37d11cfc63604b3886308e2111d845d148ced8bc Author: Mateusz Guzik Date: Tue Feb 4 22:32:07 2025 +0100 vfs: sanity check the length passed to inode_set_cached_link() This costs a strlen() call when instatianating a symlink. Preferably it would be hidden behind VFS_WARN_ON (or compatible), but there is no such facility at the moment. With the facility in place the call can be patched out in production kernels. In the meantime, since the cost is being paid unconditionally, use the result to a fixup the bad caller. This is not expected to persist in the long run (tm). Sample splat: bad length passed for symlink [/tmp/syz-imagegen43743633/file0/file0] (got 131109, expected 37) [rest of WARN blurp goes here] Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20250204213207.337980-1-mjguzik@gmail.com Signed-off-by: Christian Brauner include/linux/fs.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 091ee63e36e8289f9067f659a48d497911e49d6f Author: Christian Brauner Date: Tue Feb 4 14:51:20 2025 +0100 pidfs: improve ioctl handling Pidfs supports extensible and non-extensible ioctls. The extensible ioctls need to check for the ioctl number itself not just the ioctl command otherwise both backward- and forward compatibility are broken. The pidfs ioctl handler also needs to look at the type of the ioctl command to guard against cases where "[...] a daemon receives some random file descriptor from a (potentially less privileged) client and expects the FD to be of some specific type, it might call ioctl() on this FD with some type-specific command and expect the call to fail if the FD is of the wrong type; but due to the missing type check, the kernel instead performs some action that userspace didn't expect." (cf. [1]] Link: https://lore.kernel.org/r/20250204-work-pidfs-ioctl-v1-1-04987d239575@kernel.org Link: https://lore.kernel.org/r/CAG48ez2K9A5GwtgqO31u9ZL292we8ZwAA=TJwwEv7wRuJ3j4Lw@mail.gmail.com [1] Fixes: 8ce352818820 ("pidfs: check for valid ioctl commands") Acked-by: Luca Boccassi Reported-by: Jann Horn Cc: stable@vger.kernel.org # v6.13; please backport with 8ce352818820 ("pidfs: check for valid ioctl commands") Signed-off-by: Christian Brauner fs/pidfs.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit ec6164adc73e57c4c43b37682cae1d5c9ad40ca1 Merge: 2cc02059fbc7 711f9b8fbe4f Author: Christian Brauner Date: Tue Feb 4 11:25:45 2025 +0100 Merge patch series "Fix for huge faults regression" Amir Goldstein says: The two Fix patches have been tested by Alex together and each one independently. I also verified that they pass the LTP inoityf/fanotify tests. * patches from https://lore.kernel.org/r/20250203223205.861346-1-amir73il@gmail.com: fsnotify: disable pre-content and permission events by default fsnotify: disable notification by default for all pseudo files fsnotify: use accessor to set FMODE_NONOTIFY_* Link: https://lore.kernel.org/r/20250203223205.861346-1-amir73il@gmail.com Signed-off-by: Christian Brauner commit 711f9b8fbe4f4936302804e246e206f0829f628f Author: Amir Goldstein Date: Mon Feb 3 23:32:05 2025 +0100 fsnotify: disable pre-content and permission events by default After introducing pre-content events, we had a regression related to disabling huge faults on files that should never have pre-content events enabled. This happened because the default f_mode of allocated files (0) does not disable pre-content events. Pre-content events are disabled in file_set_fsnotify_mode_by_watchers() but internal files may not get to call this helper. Initialize f_mode to disable permission and pre-content events for all files and if needed they will be enabled for the callers of file_set_fsnotify_mode_by_watchers(). Fixes: 20bf82a898b6 ("mm: don't allow huge faults for files with pre content watches") Reported-by: Alex Williamson Closes: https://lore.kernel.org/linux-fsdevel/20250131121703.1e4d00a7.alex.williamson@redhat.com/ Tested-by: Alex Williamson Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20250203223205.861346-4-amir73il@gmail.com Signed-off-by: Christian Brauner fs/file_table.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2cc02059fbc79306b53a44b1f1a4444aa3c76598 Author: Miklos Szeredi Date: Wed Jan 29 17:06:41 2025 +0100 selftests: always check mask returned by statmount(2) STATMOUNT_MNT_OPTS can actually be missing if there are no options. This is a change of behavior since 75ead69a7173 ("fs: don't let statmount return empty strings"). The other checks shouldn't actually trigger, but add them for correctness and for easier debugging if the test fails. Signed-off-by: Miklos Szeredi Link: https://lore.kernel.org/r/20250129160641.35485-1-mszeredi@redhat.com Signed-off-by: Christian Brauner .../filesystems/statmount/statmount_test.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 2a42754b3104d78a2bc7a2ad8844427411c76ca6 Author: Amir Goldstein Date: Mon Feb 3 23:32:04 2025 +0100 fsnotify: disable notification by default for all pseudo files Most pseudo files are not applicable for fsnotify events at all, let alone to the new pre-content events. Disable notifications to all files allocated with alloc_file_pseudo() and enable legacy inotify events for the specific cases of pipe and socket, which have known users of inotify events. Pre-content events are also kept disabled for sockets and pipes. Fixes: 20bf82a898b6 ("mm: don't allow huge faults for files with pre content watches") Reported-by: Alex Williamson Closes: https://lore.kernel.org/linux-fsdevel/20250131121703.1e4d00a7.alex.williamson@redhat.com/ Suggested-by: Linus Torvalds Link: https://lore.kernel.org/linux-fsdevel/CAHk-=wi2pThSVY=zhO=ZKxViBj5QCRX-=AS2+rVknQgJnHXDFg@mail.gmail.com/ Tested-by: Alex Williamson Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20250203223205.861346-3-amir73il@gmail.com Signed-off-by: Christian Brauner fs/file_table.c | 11 +++++++++++ fs/open.c | 4 ++-- fs/pipe.c | 6 ++++++ net/socket.c | 5 +++++ 4 files changed, 24 insertions(+), 2 deletions(-) commit 5eb987105357cb7cfa7cf3b1e2f66d5c0977e412 Author: Miklos Szeredi Date: Wed Jan 29 16:12:53 2025 +0100 fs: fix adding security options to statmount.mnt_opt Prepending security options was made conditional on sb->s_op->show_options, but security options are independent of sb options. Fixes: 056d33137bf9 ("fs: prepend statmount.mnt_opts string with security_sb_mnt_opts()") Fixes: f9af549d1fd3 ("fs: export mount options via statmount()") Cc: stable@vger.kernel.org # v6.11 Signed-off-by: Miklos Szeredi Link: https://lore.kernel.org/r/20250129151253.33241-1-mszeredi@redhat.com Signed-off-by: Christian Brauner fs/namespace.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 95101401bb50ae2cf9deee1bbf4d2b28d0dfdc26 Author: Amir Goldstein Date: Mon Feb 3 23:32:03 2025 +0100 fsnotify: use accessor to set FMODE_NONOTIFY_* The FMODE_NONOTIFY_* bits are a 2-bits mode. Open coding manipulation of those bits is risky. Use an accessor file_set_fsnotify_mode() to set the mode. Rename file_set_fsnotify_mode() => file_set_fsnotify_mode_from_watchers() to make way for the simple accessor name. Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20250203223205.861346-2-amir73il@gmail.com Signed-off-by: Christian Brauner drivers/tty/pty.c | 2 +- fs/notify/fsnotify.c | 18 ++++++++++++------ fs/open.c | 7 ++++--- include/linux/fs.h | 7 ++++++- include/linux/fsnotify.h | 4 ++-- 5 files changed, 25 insertions(+), 13 deletions(-) commit b06ddfeedcbe3c493215c85e43ac48dbb8769038 Merge: e52e97f09fb6 bb504b4d6426 Author: Christian Brauner Date: Thu Jan 30 16:04:42 2025 +0100 Merge patch series "further lockref cleanups" Andreas Gruenbacher says: Here's an updated version with an additional comment saying that lockref_init() initializes count to 1. * patches from https://lore.kernel.org/r/20250130135624.1899988-1-agruenba@redhat.com: lockref: remove count argument of lockref_init gfs2: switch to lockref_init(..., 1) gfs2: use lockref_init for gl_lockref Link: https://lore.kernel.org/r/20250130135624.1899988-1-agruenba@redhat.com Signed-off-by: Christian Brauner commit bb504b4d64266fa0d7460c218c85afed371db03a Author: Andreas Gruenbacher Date: Thu Jan 30 14:56:23 2025 +0100 lockref: remove count argument of lockref_init All users of lockref_init() now initialize the count to 1, so hardcode that and remove the count argument. Reviewed-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher Link: https://lore.kernel.org/r/20250130135624.1899988-4-agruenba@redhat.com Signed-off-by: Christian Brauner fs/dcache.c | 2 +- fs/erofs/zdata.c | 2 +- fs/gfs2/glock.c | 2 +- fs/gfs2/quota.c | 2 +- include/linux/lockref.h | 7 ++++--- 5 files changed, 8 insertions(+), 7 deletions(-) commit 34ad6fa2add2b38f2a89d28518de0142bff8fb43 Author: Andreas Gruenbacher Date: Thu Jan 30 14:56:22 2025 +0100 gfs2: switch to lockref_init(..., 1) In qd_alloc(), initialize the lockref count to 1 to cover the common case. Compensate for that in gfs2_quota_init() by adjusting the count back down to 0; this only occurs when mounting the filesystem rw. Reviewed-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher Link: https://lore.kernel.org/r/20250130135624.1899988-3-agruenba@redhat.com Signed-off-by: Christian Brauner fs/gfs2/quota.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d9b3a3c70df2c2b87c83ca3f6e8ab49bd092fdbd Author: Andreas Gruenbacher Date: Thu Jan 30 14:56:21 2025 +0100 gfs2: use lockref_init for gl_lockref Move the initialization of gl_lockref from gfs2_init_glock_once() to gfs2_glock_get(). This allows to use lockref_init() there. Reviewed-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher Link: https://lore.kernel.org/r/20250130135624.1899988-2-agruenba@redhat.com Signed-off-by: Christian Brauner fs/gfs2/glock.c | 2 +- fs/gfs2/main.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit e52e97f09fb66fd868260d05bd6b74a9a3db39ee Author: Miklos Szeredi Date: Thu Jan 30 13:15:00 2025 +0100 statmount: let unset strings be empty Just like it's normal for unset values to be zero, unset strings should be empty instead of containing random values. It seems to be a typical mistake that the mask returned by statmount is not checked, which can result in various bugs. With this fix, these bugs are prevented, since it is highly likely that userspace would just want to turn the missing mask case into an empty string anyway (most of the recently found cases are of this type). Link: https://lore.kernel.org/all/CAJfpegsVCPfCn2DpM8iiYSS5DpMsLB8QBUCHecoj6s0Vxf4jzg@mail.gmail.com/ Fixes: 68385d77c05b ("statmount: simplify string option retrieval") Fixes: 46eae99ef733 ("add statmount(2) syscall") Cc: stable@vger.kernel.org # v6.8 Signed-off-by: Miklos Szeredi Link: https://lore.kernel.org/r/20250130121500.113446-1-mszeredi@redhat.com Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner fs/namespace.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 4e7487245abcbc5a1a1aea54e4d3b33c53804bda Author: Brahmajit Das Date: Tue Jan 21 21:56:48 2025 +0530 vboxsf: fix building with GCC 15 Building with GCC 15 results in build error fs/vboxsf/super.c:24:54: error: initializer-string for array of ‘unsigned char’ is too long [-Werror=unterminated-string-initialization] 24 | static const unsigned char VBSF_MOUNT_SIGNATURE[4] = "\000\377\376\375"; | ^~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Due to GCC having enabled -Werror=unterminated-string-initialization[0] by default. Separately initializing each array element of VBSF_MOUNT_SIGNATURE to ensure NUL termination, thus satisfying GCC 15 and fixing the build error. [0]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wno-unterminated-string-initialization Signed-off-by: Brahmajit Das Link: https://lore.kernel.org/r/20250121162648.1408743-1-brahmajit.xyz@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Christian Brauner fs/vboxsf/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0fac3ed473dd2955053be6671cdd747807f5e488 Author: Su Hui Date: Sun Jan 19 10:59:47 2025 +0800 fs/stat.c: avoid harmless garbage value problem in vfs_statx_path() Clang static checker(scan-build) warning: fs/stat.c:287:21: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage. 287 | stat->result_mask |= STATX_MNT_ID_UNIQUE; | ~~~~~~~~~~~~~~~~~ ^ fs/stat.c:290:21: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage. 290 | stat->result_mask |= STATX_MNT_ID; When vfs_getattr() failed because of security_inode_getattr(), 'stat' is uninitialized. In this case, there is a harmless garbage problem in vfs_statx_path(). It's better to return error directly when vfs_getattr() failed, avoiding garbage value and more clearly. Signed-off-by: Su Hui Link: https://lore.kernel.org/r/20250119025946.1168957-1-suhui@nfschina.com Signed-off-by: Christian Brauner fs/stat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 868c9037df626b3c245ee26a290a03ae1f9f58d3 Author: Frederic Weisbecker Date: Wed Feb 5 17:02:20 2025 +0100 timers/migration: Fix off-by-one root mis-connection Before attaching a new root to the old root, the children counter of the new root is checked to verify that only the upcoming CPU's top group have been connected to it. However since the recently added commit b729cc1ec21a ("timers/migration: Fix another race between hotplug and idle entry/exit") this check is not valid anymore because the old root is pre-accounted as a child to the new root. Therefore after connecting the upcoming CPU's top group to the new root, the children count to be expected must be 2 and not 1 anymore. This omission results in the old root to not be connected to the new root. Then eventually the system may run with more than one top level, which defeats the purpose of a single idle migrator. Also the old root is pre-accounted but not connected upon the new root creation. But it can be connected to the new root later on. Therefore the old root may be accounted twice to the new root. The propagation of such overcommit can end up creating a double final top-level root with a groupmask incorrectly initialized. Although harmless given that the final top level roots will never have a parent to walk up to, this oddity opportunistically reported the core issue: WARNING: CPU: 8 PID: 0 at kernel/time/timer_migration.c:543 tmigr_requires_handle_remote CPU: 8 UID: 0 PID: 0 Comm: swapper/8 RIP: 0010:tmigr_requires_handle_remote Call Trace: ? tmigr_requires_handle_remote ? hrtimer_run_queues update_process_times tick_periodic tick_handle_periodic __sysvec_apic_timer_interrupt sysvec_apic_timer_interrupt Fix the problem by taking the old root into account in the children count of the new root so the connection is not omitted. Also warn when more than one top level group exists to better detect similar issues in the future. Fixes: b729cc1ec21a ("timers/migration: Fix another race between hotplug and idle entry/exit") Reported-by: Matt Fleming Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20250205160220.39467-1-frederic@kernel.org kernel/time/timer_migration.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 29a61a1f40637ae010b828745fb41f60301c3a3d Author: Geert Uytterhoeven Date: Wed Feb 5 15:22:56 2025 +0100 genirq: Remove leading space from irq_chip::irq_print_chip() callbacks The space separator was factored out from the multiple chip name prints, but several irq_chip::irq_print_chip() callbacks still print a leading space. Remove the superfluous double spaces. Fixes: 9d9f204bdf7243bf ("genirq/proc: Add missing space separator back") Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/893f7e9646d8933cd6786d5a1ef3eb076d263768.1738764803.git.geert+renesas@glider.be arch/powerpc/sysdev/fsl_msi.c | 2 +- drivers/bus/moxtet.c | 2 +- drivers/irqchip/irq-partition-percpu.c | 2 +- drivers/soc/qcom/smp2p.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 4f6993b3feab7bfb1869a8fa12eb8b375964c19f Merge: 7fa68b9f8597 069504f1fcfa Author: Dave Airlie Date: Fri Feb 7 15:37:12 2025 +1000 Merge tag 'drm-intel-fixes-2025-02-06' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - Fix the build error with clamp after WARN_ON on gcc 13.x+ (Guenter) - HDCP related fixes (Suraj) - PMU fix zero delta busyness issue (Umesh) - Fix page cleanup on DMA remap failure (Brian) - Drop 64bpp YUV formats from ICL+ SDR planes (Ville) - GuC log related fix (Daniele) - DisplayPort related fixes (Ankit, Jani) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Z6TDHpgI6dnOc0KI@intel.com commit 7fa68b9f85973cd21eaf7dbb969b1c0f7fd95c63 Merge: e92e11b462b8 a9ab6591b452 Author: Dave Airlie Date: Fri Feb 7 15:27:23 2025 +1000 Merge tag 'drm-xe-fixes-2025-02-06' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes UAPI Changes: - OA uAPI related fixes (Ashutosh) Driver Changes: - Fix SRIOV migration initialization (Michal) - Restore devcoredump to a sane state (Lucas) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Z6S9rI1ScT_5Aw6_@intel.com commit e92e11b462b8d8d004da0091c824bec871ae87ba Merge: f2e6f0025639 2c1ed907520c Author: Dave Airlie Date: Fri Feb 7 14:47:11 2025 +1000 Merge tag 'drm-misc-fixes-2025-02-06' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes A couple of fixes for ivpu to error handling, komeda for format handling, AST DP timeout fix when enabling the output, locking fix for zynqmp DP support, tiled format handling in drm/client, and refcounting fix for bochs Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20250206-encouraging-judicious-quoll-adc1dc@houat commit f2e6f0025639228f6b024607d1ce3cd1c3b9d5d4 Merge: 2014c95afece f245b400a223 Author: Dave Airlie Date: Fri Feb 7 13:53:59 2025 +1000 Merge tag 'amd-drm-fixes-6.14-2025-02-05' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.14-2025-02-05: amdgpu: - Add BO metadata flag for DCC - Fix potential out of bounds access in display - Seamless boot fix - CONFIG_FRAME_WARN fix - PSR1 fix UAPI: - Add new tiling flag for DCC write compress disable Proposed userspace: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33255 Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20250205214910.3664690-1-alexander.deucher@amd.com commit 4be214c26936813b636eed2fac906f585ddbf0f9 Author: Kent Overstreet Date: Sat Jan 25 21:29:45 2025 -0500 bcachefs: bch2_bkey_sectors_need_rebalance() now only depends on bch_extent_rebalance Previously, bch2_bkey_sectors_need_rebalance() called bch2_target_accepts_data(), checking whether the target is writable. However, this means that adding or removing devices from a target would change the value of bch2_bkey_sectors_need_rebalance() for an existing extent; this needs to be invariant so that the extent trigger can correctly maintain rebalance_work accounting. Instead, check target_accepts_data() in io_opts_to_rebalance_opts(), before creating the bch_extent_rebalance entry. This fixes (one?) cause of rebalance_work accounting being off. Signed-off-by: Kent Overstreet fs/bcachefs/inode.h | 4 +++- fs/bcachefs/opts.h | 14 -------------- fs/bcachefs/rebalance.c | 8 +++----- fs/bcachefs/rebalance.h | 20 ++++++++++++++++++++ 4 files changed, 26 insertions(+), 20 deletions(-) commit 3539880ef1a5f8c970d0f69a6fdcfeffc000e63d Author: Kent Overstreet Date: Mon Feb 3 11:35:11 2025 -0500 bcachefs: Fix rcu imbalance in bch2_fs_btree_key_cache_exit() Spotted by sparse. Signed-off-by: Kent Overstreet fs/bcachefs/btree_key_cache.c | 1 - 1 file changed, 1 deletion(-) commit 9e9033522ad1e4bb697c9493aa449630fa2c98d2 Author: Kent Overstreet Date: Mon Jan 27 01:21:44 2025 -0500 bcachefs: Fix discard path journal flushing The discard path is supposed to issue journal flushes when there's too many buckets empty buckets that need a journal commit before they can be written to again, but at some point this code seems to have been lost. Bring it back with a new optimization to make sure we don't issue too many journal flushes: the journal now tracks the sequence number of the most recent flush in progress, which the discard path uses when deciding which buckets need a journal flush. Signed-off-by: Kent Overstreet fs/bcachefs/alloc_background.c | 47 ++++++++++++++++--------------- fs/bcachefs/alloc_foreground.c | 10 +++++-- fs/bcachefs/alloc_types.h | 1 + fs/bcachefs/buckets_waiting_for_journal.c | 12 ++++---- fs/bcachefs/buckets_waiting_for_journal.h | 4 +-- fs/bcachefs/journal.c | 1 + fs/bcachefs/journal_types.h | 1 + fs/bcachefs/trace.h | 14 ++++++++- 8 files changed, 55 insertions(+), 35 deletions(-) commit 2ef995df0ce592f665d312008dbe1ad1c4bcf87f Author: Jeongjun Park Date: Sun Feb 2 15:13:51 2025 +0900 bcachefs: fix deadlock in journal_entry_open() In the previous commit b3d82c2f2761, code was added to prevent journal sequence overflow. Among them, the code added to journal_entry_open() uses the bch2_fs_fatal_err_on() function to handle errors. However, __journal_res_get() , which calls journal_entry_open() , calls journal_entry_open() while holding journal->lock , but bch2_fs_fatal_err_on() internally tries to acquire journal->lock , which results in a deadlock. So we need to add a locked helper to handle fatal errors even when the journal->lock is held. Fixes: b3d82c2f2761 ("bcachefs: Guard against journal seq overflow") Signed-off-by: Jeongjun Park Signed-off-by: Kent Overstreet fs/bcachefs/journal.c | 17 +++++++++++++++-- fs/bcachefs/journal.h | 1 + fs/bcachefs/super.c | 11 +++++++++++ fs/bcachefs/super.h | 1 + 4 files changed, 28 insertions(+), 2 deletions(-) commit 6b37037d6d1b42083642340efcf80f7a30203039 Author: Jeongjun Park Date: Sat Feb 1 01:20:31 2025 +0900 bcachefs: fix incorrect pointer check in __bch2_subvolume_delete() For some unknown reason, checks on struct bkey_s_c_snapshot and struct bkey_s_c_snapshot_tree pointers are missing. Therefore, I think it would be appropriate to fix the incorrect pointer checking through this patch. Fixes: 4bd06f07bcb5 ("bcachefs: Fixes for snapshot_tree.master_subvol") Signed-off-by: Jeongjun Park Signed-off-by: Kent Overstreet fs/bcachefs/subvolume.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit fdfd0ad82890f678398ee670c4e59747738540e7 Author: Kent Overstreet Date: Sat Feb 1 12:56:51 2025 -0500 bcachefs docs: SubmittingPatches.rst Add an (initial?) patch submission checklist, focusing mainly on testing. Yes, all patches must be tested, and that starts (but does not end) with the patch author. Signed-off-by: Kent Overstreet .../filesystems/bcachefs/SubmittingPatches.rst | 98 ++++++++++++++++++++++ Documentation/filesystems/bcachefs/index.rst | 1 + MAINTAINERS | 1 + 3 files changed, 100 insertions(+) commit 6270f4deba3fbd77d1717fb8634f1fc612ff69e2 Author: Kees Cook Date: Wed Feb 5 13:45:26 2025 -0800 string.h: Use ARRAY_SIZE() for memtostr*()/strtomem*() The destination argument of memtostr*() and strtomem*() must be a fixed-size char array at compile time, so there is no need to use __builtin_object_size() (which is useful for when an argument is either a pointer or unknown). Instead use ARRAY_SIZE(), which has the benefit of working around a bug in Clang (fixed[1] in 15+) that got __builtin_object_size() wrong sometimes. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501310832.kiAeOt2z-lkp@intel.com/ Suggested-by: Kent Overstreet Link: https://github.com/llvm/llvm-project/commit/d8e0a6d5e9dd2311641f9a8a5d2bf90829951ddc [1] Tested-by: Suren Baghdasaryan Signed-off-by: Kees Cook include/linux/string.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 20e5cc26e56db09cc612721f90b4994cce5e5b7b Author: Kees Cook Date: Wed Feb 5 12:48:07 2025 -0800 compiler.h: Introduce __must_be_byte_array() In preparation for adding stricter type checking to the str/mem*() helpers, provide a way to check that a variable is a byte array via __must_be_byte_array(). Suggested-by: Kent Overstreet Signed-off-by: Kees Cook include/linux/compiler.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit cb7380de9e4cbc9a24216b722ec50e092ae83036 Author: Kees Cook Date: Wed Feb 5 12:32:49 2025 -0800 compiler.h: Move C string helpers into C-only kernel section The C kernel helpers for evaluating C Strings were positioned where they were visible to assembly inclusion, which was not intended. Move them into the kernel and C-only area of the header so future changes won't confuse the assembler. Fixes: d7a516c6eeae ("compiler.h: Fix undefined BUILD_BUG_ON_ZERO()") Fixes: 559048d156ff ("string: Check for "nonstring" attribute on strscpy() arguments") Reviewed-by: Miguel Ojeda Signed-off-by: Kees Cook include/linux/compiler.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 1438f5d07b9a7afb15e1d0e26df04a6fd4e56a3c Author: Nicolas Dichtel Date: Wed Feb 5 23:10:37 2025 +0100 rtnetlink: fix netns leak with rtnl_setlink() A call to rtnl_nets_destroy() is needed to release references taken on netns put in rtnl_nets. CC: stable@vger.kernel.org Fixes: 636af13f213b ("rtnetlink: Register rtnl_dellink() and rtnl_setlink() with RTNL_FLAG_DOIT_PERNET_WIP.") Signed-off-by: Nicolas Dichtel Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250205221037.2474426-1-nicolas.dichtel@6wind.com Signed-off-by: Jakub Kicinski net/core/rtnetlink.c | 1 + 1 file changed, 1 insertion(+) commit bca0902e61731a75fc4860c8720168d9f1bae3b6 Author: Murad Masimov Date: Mon Feb 3 12:12:03 2025 +0300 ax25: Fix refcount leak caused by setting SO_BINDTODEVICE sockopt If an AX25 device is bound to a socket by setting the SO_BINDTODEVICE socket option, a refcount leak will occur in ax25_release(). Commit 9fd75b66b8f6 ("ax25: Fix refcount leaks caused by ax25_cb_del()") added decrement of device refcounts in ax25_release(). In order for that to work correctly the refcounts must already be incremented when the device is bound to the socket. An AX25 device can be bound to a socket by either calling ax25_bind() or setting SO_BINDTODEVICE socket option. In both cases the refcounts should be incremented, but in fact it is done only in ax25_bind(). This bug leads to the following issue reported by Syzkaller: ================================================================ refcount_t: decrement hit 0; leaking memory. WARNING: CPU: 1 PID: 5932 at lib/refcount.c:31 refcount_warn_saturate+0x1ed/0x210 lib/refcount.c:31 Modules linked in: CPU: 1 UID: 0 PID: 5932 Comm: syz-executor424 Not tainted 6.13.0-rc4-syzkaller-00110-g4099a71718b0 #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:refcount_warn_saturate+0x1ed/0x210 lib/refcount.c:31 Call Trace: __refcount_dec include/linux/refcount.h:336 [inline] refcount_dec include/linux/refcount.h:351 [inline] ref_tracker_free+0x710/0x820 lib/ref_tracker.c:236 netdev_tracker_free include/linux/netdevice.h:4156 [inline] netdev_put include/linux/netdevice.h:4173 [inline] netdev_put include/linux/netdevice.h:4169 [inline] ax25_release+0x33f/0xa10 net/ax25/af_ax25.c:1069 __sock_release+0xb0/0x270 net/socket.c:640 sock_close+0x1c/0x30 net/socket.c:1408 ... 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 ... ================================================================ Fix the implementation of ax25_setsockopt() by adding increment of refcounts for the new device bound, and decrement of refcounts for the old unbound device. Fixes: 9fd75b66b8f6 ("ax25: Fix refcount leaks caused by ax25_cb_del()") Reported-by: syzbot+33841dc6aa3e1d86b78a@syzkaller.appspotmail.com Signed-off-by: Murad Masimov Link: https://patch.msgid.link/20250203091203.1744-1-m.masimov@mt-integration.ru Signed-off-by: Jakub Kicinski net/ax25/af_ax25.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6a774228e890ee04a0ee13f4e6e731ec8554b9c2 Author: Kory Maincent Date: Wed Feb 5 12:03:01 2025 +0100 net: ethtool: tsconfig: Fix netlink type of hwtstamp flags Fix the netlink type for hardware timestamp flags, which are represented as a bitset of flags. Although only one flag is supported currently, the correct netlink bitset type should be used instead of u32 to keep consistency with other fields. Address this by adding a new named string set description for the hwtstamp flag structure. The code has been introduced in the current release so the uAPI change is still okay. Signed-off-by: Kory Maincent Fixes: 6e9e2eed4f39 ("net: ethtool: Add support for tsconfig command to get/set hwtstamp config") Link: https://patch.msgid.link/20250205110304.375086-1-kory.maincent@bootlin.com Signed-off-by: Jakub Kicinski Documentation/netlink/specs/ethtool.yaml | 3 ++- include/uapi/linux/ethtool.h | 2 ++ net/ethtool/common.c | 5 +++++ net/ethtool/common.h | 2 ++ net/ethtool/strset.c | 5 +++++ net/ethtool/tsconfig.c | 33 ++++++++++++++++++++++---------- 6 files changed, 39 insertions(+), 11 deletions(-) commit 3da81cb9a4ac26ac6bc7ef48508b3ebea714eb1a Merge: 3cf0a98fea77 b768294d449d Author: Jakub Kicinski Date: Thu Feb 6 16:14:34 2025 -0800 Merge branch 'net-first-round-to-use-dev_net_rcu' Eric Dumazet says: ==================== net: first round to use dev_net_rcu() dev_net(dev) should either be protected by RTNL or RCU. There is no LOCKDEP support yet for this helper. Adding it would trigger too many splats. Instead, add dev_net_rcu() for rcu_read_lock() contexts and start to use it to fix bugs and clearly document the safety requirements. v4: https://lore.kernel.org/CANn89i+AozhFhZNK0Y4e_EqXV1=yKjGuvf43Wa6JJKWMOixWQQ@mail.gmail.com v3: https://lore.kernel.org/20250203153633.46ce0337@kernel.org/ ==================== Link: https://patch.msgid.link/20250205155120.1676781-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit b768294d449da6d7dc0667c1ec92dc4af6ef766b Author: Eric Dumazet Date: Wed Feb 5 15:51:20 2025 +0000 ipv6: Use RCU in ip6_input() Instead of grabbing rcu_read_lock() from ip6_input_finish(), do it earlier in is caller, so that ip6_input() access to dev_net() can be validated by LOCKDEP. Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250205155120.1676781-13-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv6/ip6_input.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 34aef2b0ce3aa4eb4ef2e1f5cad3738d527032f5 Author: Eric Dumazet Date: Wed Feb 5 15:51:19 2025 +0000 ipv6: icmp: convert to dev_net_rcu() icmp6_send() must acquire rcu_read_lock() sooner to ensure the dev_net() call done from a safe context. Other ICMPv6 uses of dev_net() seem safe, change them to dev_net_rcu() to get LOCKDEP support to catch bugs. Fixes: 9a43b709a230 ("[NETNS][IPV6] icmp6 - make icmpv6_socket per namespace") Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250205155120.1676781-12-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv6/icmp.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit 3c8ffcd248da34fc41e52a46e51505900115fc2a Author: Eric Dumazet Date: Wed Feb 5 15:51:18 2025 +0000 ipv6: use RCU protection in ip6_default_advmss() ip6_default_advmss() needs rcu protection to make sure the net structure it reads does not disappear. Fixes: 5578689a4e3c ("[NETNS][IPV6] route6 - make route6 per namespace") Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250205155120.1676781-11-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv6/route.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit afec62cd0a4191cde6dd3a75382be4d51a38ce9b Author: Eric Dumazet Date: Wed Feb 5 15:51:17 2025 +0000 flow_dissector: use RCU protection to fetch dev_net() __skb_flow_dissect() can be called from arbitrary contexts. It must extend its RCU protection section to include the call to dev_net(), which can become dev_net_rcu(). This makes sure the net structure can not disappear under us. Fixes: 9b52e3f267a6 ("flow_dissector: handle no-skb use case") Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250205155120.1676781-10-edumazet@google.com Signed-off-by: Jakub Kicinski net/core/flow_dissector.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 4b8474a0951e605d2a27a2c483da4eb4b8c63760 Author: Eric Dumazet Date: Wed Feb 5 15:51:16 2025 +0000 ipv4: icmp: convert to dev_net_rcu() __icmp_send() must ensure rcu_read_lock() is held, as spotted by Jakub. Other ICMP uses of dev_net() seem safe, change them to dev_net_rcu() to get LOCKDEP support. Fixes: dde1bc0e6f86 ("[NETNS]: Add namespace for ICMP replying code.") Closes: https://lore.kernel.org/netdev/20250203153633.46ce0337@kernel.org/ Reported-by: Jakub Kicinski Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250205155120.1676781-9-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/icmp.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit 139512191bd06f1b496117c76372b2ce372c9a41 Author: Eric Dumazet Date: Wed Feb 5 15:51:15 2025 +0000 ipv4: use RCU protection in __ip_rt_update_pmtu() __ip_rt_update_pmtu() must use RCU protection to make sure the net structure it reads does not disappear. Fixes: 2fbc6e89b2f1 ("ipv4: Update exception handling for multipath routes via same device") Fixes: 1de6b15a434c ("Namespaceify min_pmtu sysctl") Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250205155120.1676781-8-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/route.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 719817cd293e4fa389e1f69c396f3f816ed5aa41 Author: Eric Dumazet Date: Wed Feb 5 15:51:14 2025 +0000 ipv4: use RCU protection in inet_select_addr() inet_select_addr() must use RCU protection to make sure the net structure it reads does not disappear. Fixes: c4544c724322 ("[NETNS]: Process inet_select_addr inside a namespace.") Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250205155120.1676781-7-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/devinet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dd205fcc33d92d54eee4d7f21bb073af9bd5ce2b Author: Eric Dumazet Date: Wed Feb 5 15:51:13 2025 +0000 ipv4: use RCU protection in rt_is_expired() rt_is_expired() must use RCU protection to make sure the net structure it reads does not disappear. Fixes: e84f84f27647 ("netns: place rt_genid into struct net") Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250205155120.1676781-6-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/route.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 71b8471c93fa0bcab911fcb65da1eb6c4f5f735f Author: Eric Dumazet Date: Wed Feb 5 15:51:12 2025 +0000 ipv4: use RCU protection in ipv4_default_advmss() ipv4_default_advmss() must use RCU protection to make sure the net structure it reads does not disappear. Fixes: 2e9589ff809e ("ipv4: Namespaceify min_adv_mss sysctl knob") Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250205155120.1676781-5-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/route.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 071d8012869b6af352acca346ade13e7be90a49f Author: Eric Dumazet Date: Wed Feb 5 15:51:11 2025 +0000 ipv4: use RCU protection in ip_dst_mtu_maybe_forward() ip_dst_mtu_maybe_forward() must use RCU protection to make sure the net structure it reads does not disappear. Fixes: f87c10a8aa1e8 ("ipv4: introduce ip_dst_mtu_maybe_forward and protect forwarding path against pmtu spoofing") Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250205155120.1676781-4-edumazet@google.com Signed-off-by: Jakub Kicinski include/net/ip.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 469308552ca4560176cfc100e7ca84add1bebd7c Author: Eric Dumazet Date: Wed Feb 5 15:51:10 2025 +0000 ipv4: add RCU protection to ip4_dst_hoplimit() ip4_dst_hoplimit() must use RCU protection to make sure the net structure it reads does not disappear. Fixes: fa50d974d104 ("ipv4: Namespaceify ip_default_ttl sysctl knob") Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250205155120.1676781-3-edumazet@google.com Signed-off-by: Jakub Kicinski include/net/route.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 482ad2a4ace2740ca0ff1cbc8f3c7f862f3ab507 Author: Eric Dumazet Date: Wed Feb 5 15:51:09 2025 +0000 net: add dev_net_rcu() helper dev->nd_net can change, readers should either use rcu_read_lock() or RTNL. We currently use a generic helper, dev_net() with no debugging support. We probably have many hidden bugs. Add dev_net_rcu() helper for callers using rcu_read_lock() protection. Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250205155120.1676781-2-edumazet@google.com Signed-off-by: Jakub Kicinski include/linux/netdevice.h | 6 ++++++ include/net/net_namespace.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 6273a058383e05465083b535ed9469f2c8a48321 Author: Alice Ryhl Date: Mon Feb 3 08:40:57 2025 +0000 x86: rust: set rustc-abi=x86-softfloat on rustc>=1.86.0 When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option. Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build. [ For future reference, this solves the following error: RUSTC L rust/core.o error: Error loading target specification: target feature `soft-float` is incompatible with the ABI but gets enabled in target spec. Run `rustc --print target-list` for a list of built-in targets - Miguel ] Cc: # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: https://github.com/rust-lang/rust/pull/136146 Signed-off-by: Alice Ryhl Acked-by: Dave Hansen # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda scripts/generate_rust_target.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit c2debdb8544f415eaf9292a866d4073912eeb561 Author: Eyal Birger Date: Sun Feb 2 08:29:21 2025 -0800 selftests/seccomp: validate uretprobe syscall passes through seccomp The uretprobe syscall is implemented as a performance enhancement on x86_64 by having the kernel inject a call to it on function exit; User programs cannot call this system call explicitly. As such, this syscall is considered a kernel implementation detail and should not be filtered by seccomp. Enhance the seccomp bpf test suite to check that uretprobes can be attached to processes without the killing the process regardless of seccomp policy. Signed-off-by: Eyal Birger Link: https://lore.kernel.org/r/20250202162921.335813-3-eyal.birger@gmail.com [kees: Skip archs without __NR_uretprobe] Signed-off-by: Kees Cook tools/testing/selftests/seccomp/seccomp_bpf.c | 199 ++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) commit cf6cb56ef24410fb5308f9655087f1eddf4452e6 Author: Eyal Birger Date: Sun Feb 2 08:29:20 2025 -0800 seccomp: passthrough uretprobe systemcall without filtering When attaching uretprobes to processes running inside docker, the attached process is segfaulted when encountering the retprobe. The reason is that now that uretprobe is a system call the default seccomp filters in docker block it as they only allow a specific set of known syscalls. This is true for other userspace applications which use seccomp to control their syscall surface. Since uretprobe is a "kernel implementation detail" system call which is not used by userspace application code directly, it is impractical and there's very little point in forcing all userspace applications to explicitly allow it in order to avoid crashing tracked processes. Pass this systemcall through seccomp without depending on configuration. Note: uretprobe is currently only x86_64 and isn't expected to ever be supported in i386. Fixes: ff474a78cef5 ("uprobe: Add uretprobe syscall to speed up return probe") Reported-by: Rafael Buchbinder Closes: https://lore.kernel.org/lkml/CAHsH6Gs3Eh8DFU0wq58c_LF8A4_+o6z456J7BidmcVY2AqOnHQ@mail.gmail.com/ Link: https://lore.kernel.org/lkml/20250121182939.33d05470@gandalf.local.home/T/#me2676c378eff2d6a33f3054fed4a5f3afa64e65b Link: https://lore.kernel.org/lkml/20250128145806.1849977-1-eyal.birger@gmail.com/ Cc: stable@vger.kernel.org Signed-off-by: Eyal Birger Link: https://lore.kernel.org/r/20250202162921.335813-2-eyal.birger@gmail.com [kees: minimized changes for easier backporting, tweaked commit log] Signed-off-by: Kees Cook kernel/seccomp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit bb066fe812d6fb3a9d01c073d9f1e2fd5a63403b Merge: 5b734b49de8e 6f64b83d9fe9 Author: Linus Torvalds Date: Thu Feb 6 12:32:03 2025 -0800 Merge tag 'pci-v6.14-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci fixes from Bjorn Helgaas: - When saving a device's state, always save the upstream bridge's PM L1 Substates configuration as well because the bridge never saves its own state, and restoring a device needs the state for both ends; this was a regression that caused link and power management errors after suspend/resume (Ilpo Järvinen) - Correct TPH Control Register write, where we wrote the ST Mode where the THP Requester Enable value was intended (Robin Murphy) * tag 'pci-v6.14-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI/TPH: Restore TPH Requester Enable correctly PCI/ASPM: Fix L1SS saving commit b76adb9758f8eaaf22b824d0bcdd694551ce0557 Author: Kalle Valo Date: Mon Feb 3 20:04:45 2025 +0200 MAINTAINERS: wifi: remove Kalle I'm stepping down as wireless driver maintainer. Johannes kindly voluntereed to be the "custodian"[1] for the drivers until a better solution is found. Link: https://lore.kernel.org/all/21896d2788b8bc6c7fcb534cd43e75671a57f494.camel@sipsolutions.net/ [1] Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20250203180445.1429640-2-kvalo@kernel.org MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0db6b7d49b50c037b5eac19a8d8d1da986db80c6 Author: Kalle Valo Date: Mon Feb 3 20:04:44 2025 +0200 MAINTAINERS: wifi: ath: remove Kalle I'm stepping down as ath10k, ath11k and ath12k maintainer so remove me from MAINTAINERS file and Device Tree bindings. Jeff continues as the maintainer. As my quicinc.com email will not work anymore so add an entry to .mailmap file to direct the mail to my kernel.org address. Signed-off-by: Kalle Valo Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20250203180445.1429640-1-kvalo@kernel.org .mailmap | 1 + Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml | 1 - Documentation/devicetree/bindings/net/wireless/qcom,ath11k-pci.yaml | 1 - Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml | 1 - Documentation/devicetree/bindings/net/wireless/qcom,ath12k-wsi.yaml | 1 - Documentation/devicetree/bindings/net/wireless/qcom,ath12k.yaml | 1 - MAINTAINERS | 4 ---- 7 files changed, 1 insertion(+), 9 deletions(-) commit 5b734b49de8e195a9c9693d0d256ed1ca9fe6c9b Merge: 3cf0a98fea77 aaf5eefd374b Author: Linus Torvalds Date: Thu Feb 6 12:25:35 2025 -0800 Merge tag 'for-linus-6.14-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Three fixes for xen_hypercall_hvm() that was introduced in the 6.13 cycle" * tag 'for-linus-6.14-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/xen: remove unneeded dummy push from xen_hypercall_hvm() x86/xen: add FRAME_END to xen_hypercall_hvm() x86/xen: fix xen_hypercall_hvm() to not clobber %rbx commit b3cc5afc4d972ca30dc5d25ed5e1056e62b5efa8 Merge: 0813fd2e14ca 3ace20038e19 Author: Rafael J. Wysocki Date: Thu Feb 6 20:39:43 2025 +0100 Merge tag 'amd-pstate-v6.14-2025-02-06' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux Merge amd-pstate driver fixes for 6.14-rc2 from Mario Limonciello: "* Fix some error cleanup paths with mutex use and boost * Fix a ref counting issue * Fix a schedutil issue" * tag 'amd-pstate-v6.14-2025-02-06' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux: cpufreq/amd-pstate: Fix cpufreq_policy ref counting cpufreq/amd-pstate: Fix max_perf updation with schedutil cpufreq/amd-pstate: Remove the goto label in amd_pstate_update_limits cpufreq/amd-pstate: Fix per-policy boost flag incorrect when fail commit 78bba6097b9318f4aa645afeade14024af86af4e Author: Geert Uytterhoeven Date: Mon Feb 3 15:34:07 2025 +0100 stackinit: Fix comment for test_small_end In union test_small_end, the small members are three and four. Fixes: e71a29db79da1946 ("stackinit: Add union initialization to selftests") Closes: https://lore.kernel.org/CAMuHMdWvcKOc6v5o3-9-SqP_4oh5-GZQjZZb=-krhY=mVRED_Q@mail.gmail.com Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/3f8faa2d7d0d6b36571093ab0fb1fd5157abd7bb.1738593178.git.geert+renesas@glider.be Signed-off-by: Kees Cook lib/stackinit_kunit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb5408801a5f2ecd76b61dcd539a5c466ebaac4c Author: Kees Cook Date: Tue Feb 4 09:45:13 2025 -0800 stackinit: Keep selftest union size small on m68k The stack frame on m68k is very sensitive to the size of what needs to be stored. Like done for long string testing, reduce the size of the large trailing struct in the union initialization testing. Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/all/CAMuHMdXW8VbtOAixO7w+aDOG70aZtZ50j1Ybcr8B3eYnRUcrcA@mail.gmail.com Fixes: e71a29db79da ("stackinit: Add union initialization to selftests") Link: https://lore.kernel.org/r/20250204174509.work.711-kees@kernel.org Signed-off-by: Kees Cook Tested-by: Geert Uytterhoeven lib/stackinit_kunit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3ace20038e19f23fe73259513f1f08d4bf1a3c83 Author: Dhananjay Ugwekar Date: Wed Feb 5 11:25:20 2025 +0000 cpufreq/amd-pstate: Fix cpufreq_policy ref counting amd_pstate_update_limits() takes a cpufreq_policy reference but doesn't decrement the refcount in one of the exit paths, fix that. Fixes: 45722e777fd9 ("cpufreq: amd-pstate: Optimize amd_pstate_update_limits()") Signed-off-by: Dhananjay Ugwekar Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20250205112523.201101-10-dhananjay.ugwekar@amd.com Signed-off-by: Mario Limonciello drivers/cpufreq/amd-pstate.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 0e446e3145011b8fe39759b59bd69d39fb47cfeb Author: Matthew Maurer Date: Wed Jan 22 00:14:43 2025 +0000 rust: kbuild: do not export generated KASAN ODR symbols ASAN generates special synthetic symbols to help check for ODR violations. These synthetic symbols lack debug information, so gendwarfksyms emits warnings when processing them. No code should ever have a dependency on these symbols, so we should not be exporting them, just like the __cfi symbols. Signed-off-by: Matthew Maurer Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250122-gendwarfksyms-kasan-rust-v1-1-5ee5658f4fb6@google.com [ Fixed typo in commit message. Slightly reworded title. - Miguel ] Signed-off-by: Miguel Ojeda rust/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cf0a98fea776adb09087e521fe150c295a4b031 Merge: 92514ef226f5 2a64c96356c8 Author: Linus Torvalds Date: Thu Feb 6 09:14:54 2025 -0800 Merge tag 'net-6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Interestingly the recent kmemleak improvements allowed our CI to catch a couple of percpu leaks addressed here. We (mostly Jakub, to be accurate) are working to increase review coverage over the net code-base tweaking the MAINTAINER entries. Current release - regressions: - core: harmonize tstats and dstats - ipv6: fix dst refleaks in rpl, seg6 and ioam6 lwtunnels - eth: tun: revert fix group permission check - eth: stmmac: revert "specify hardware capability value when FIFO size isn't specified" Previous releases - regressions: - udp: gso: do not drop small packets when PMTU reduces - rxrpc: fix race in call state changing vs recvmsg() - eth: ice: fix Rx data path for heavy 9k MTU traffic - eth: vmxnet3: fix tx queue race condition with XDP Previous releases - always broken: - sched: pfifo_tail_enqueue: drop new packet when sch->limit == 0 - ethtool: ntuple: fix rss + ring_cookie check - rxrpc: fix the rxrpc_connection attend queue handling Misc: - recognize Kuniyuki Iwashima as a maintainer" * tag 'net-6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (34 commits) Revert "net: stmmac: Specify hardware capability value when FIFO size isn't specified" MAINTAINERS: add a sample ethtool section entry MAINTAINERS: add entry for ethtool rxrpc: Fix race in call state changing vs recvmsg() rxrpc: Fix call state set to not include the SERVER_SECURING state net: sched: Fix truncation of offloaded action statistics tun: revert fix group permission check selftests/tc-testing: Add a test case for qdisc_tree_reduce_backlog() netem: Update sch->q.qlen before qdisc_tree_reduce_backlog() selftests/tc-testing: Add a test case for pfifo_head_drop qdisc when limit==0 pfifo_tail_enqueue: Drop new packet when sch->limit == 0 selftests: mptcp: connect: -f: no reconnect net: rose: lock the socket in rose_bind() net: atlantic: fix warning during hot unplug rxrpc: Fix the rxrpc_connection attend queue handling net: harmonize tstats and dstats selftests: drv-net: rss_ctx: don't fail reconfigure test if queue offset not supported selftests: drv-net: rss_ctx: add missing cleanup in queue reconfigure ethtool: ntuple: fix rss + ring_cookie check ethtool: rss: fix hiding unsupported fields in dumps ... commit 6f64b83d9fe9729000a0616830cb1606945465d8 Author: Robin Murphy Date: Wed Feb 5 12:52:13 2025 +0000 PCI/TPH: Restore TPH Requester Enable correctly When we reenable TPH after changing a Steering Tag value, we need the actual TPH Requester Enable value, not the ST Mode (which only happens to work out by chance for non-extended TPH in interrupt vector mode). Link: https://lore.kernel.org/r/13118098116d7bce07aa20b8c52e28c7d1847246.1738759933.git.robin.murphy@arm.com Fixes: d2e8a34876ce ("PCI/TPH: Add Steering Tag support") Signed-off-by: Robin Murphy Signed-off-by: Bjorn Helgaas Reviewed-by: Wei Huang drivers/pci/tph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7858defd60d1f2d8e9f32bedb00ac754c3bdf69a Merge: 199b87f1409b d8989106287d Author: Mark Brown Date: Thu Feb 6 16:16:42 2025 +0000 ASoC: Intel: sof_sdw: Add support for new devices Merge series from Bard Liao : This patch series adds support for Asus Zenbook S14 and Fatcat board. commit 199b87f1409b936cc23a8ba2d66a1ce962db7f0f Merge: b9cb90a5bf9d 46c7b901e2a0 Author: Mark Brown Date: Thu Feb 6 16:16:38 2025 +0000 ASoC: SOF: Correct sps->stream and cstream nullity Merge series from Peter Ujfalusi : The Nullity of sps->cstream needs to be checked in sof_ipc_msg_data() and not assume that it is not NULL. The sps->stream must be cleared to NULL on close since this is used as a check to see if we have active PCM stream. commit b9cb90a5bf9d0e96e4ff353d113b8a483f2e3942 Merge: 0b06000704f8 89f9cf185885 Author: Mark Brown Date: Thu Feb 6 16:16:34 2025 +0000 ASoC: rsnd: adjust convert rate in 1% Merge series from Kuninori Morimoto : Renesas Synchronous SRC Mode has HW limitation to be used in 1% rate difference, but driver didn't care it. This patch-set adjust to it. Link: https://lore.kernel.org/r/87o6zi32ry.wl-kuninori.morimoto.gx@renesas.com commit a9c621a217128eb3fb7522cf763992d9437fd5ba Author: Justin M. Forbes Date: Wed Jan 29 14:50:02 2025 -0700 rust: kbuild: add -fzero-init-padding-bits to bindgen_skip_cflags This seems to break the build when building with gcc15: Unable to generate bindings: ClangDiagnostic("error: unknown argument: '-fzero-init-padding-bits=all'\n") Thus skip that flag. Signed-off-by: Justin M. Forbes Fixes: dce4aab8441d ("kbuild: Use -fzero-init-padding-bits=all") Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20250129215003.1736127-1-jforbes@fedoraproject.org [ Slightly reworded commit. - Miguel ] Signed-off-by: Miguel Ojeda rust/Makefile | 1 + 1 file changed, 1 insertion(+) commit 57e4a9bd61c308f607bc3e55e8fa02257b06b552 Author: Meetakshi Setiya Date: Thu Feb 6 01:50:41 2025 -0500 smb: client: change lease epoch type from unsigned int to __u16 MS-SMB2 section 2.2.13.2.10 specifies that 'epoch' should be a 16-bit unsigned integer used to track lease state changes. Change the data type of all instances of 'epoch' from unsigned int to __u16. This simplifies the epoch change comparisons and makes the code more compliant with the protocol spec. Cc: stable@vger.kernel.org Signed-off-by: Meetakshi Setiya Reviewed-by: Shyam Prasad N Signed-off-by: Steve French fs/smb/client/cifsglob.h | 14 +++++++------- fs/smb/client/smb1ops.c | 2 +- fs/smb/client/smb2ops.c | 18 +++++++++--------- fs/smb/client/smb2pdu.c | 2 +- fs/smb/client/smb2proto.h | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) commit 7507eb3e7bfac7c3baef8dd377fdf5871eefd42b Author: Ilpo Järvinen Date: Fri Jan 31 17:29:13 2025 +0200 PCI/ASPM: Fix L1SS saving Commit 1db806ec06b7 ("PCI/ASPM: Save parent L1SS config in pci_save_aspm_l1ss_state()") aimed to perform L1SS config save for both the Upstream Port and its upstream bridge when handling an Upstream Port, which matches what the L1SS restore side does. However, parent->state_saved can be set true at an earlier time when the upstream bridge saved other parts of its state. Then later when attempting to save the L1SS config while handling the Upstream Port, parent->state_saved is true in pci_save_aspm_l1ss_state() resulting in early return and skipping saving bridge's L1SS config because it is assumed to be already saved. Later on restore, junk is written into L1SS config which causes issues with some devices. Remove parent->state_saved check and unconditionally save L1SS config also for the upstream bridge from an Upstream Port which ought to be harmless from correctness point of view. With the Upstream Port check now present, saving the L1SS config more than once for the bridge is no longer a problem (unlike when the parent->state_saved check got introduced into the fix during its development). Link: https://lore.kernel.org/r/20250131152913.2507-1-ilpo.jarvinen@linux.intel.com Fixes: 1db806ec06b7 ("PCI/ASPM: Save parent L1SS config in pci_save_aspm_l1ss_state()") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219731 Reported-by: Niklāvs Koļesņikovs Reported by: Rafael J. Wysocki Closes: https://lore.kernel.org/r/CAJZ5v0iKmynOQ5vKSQbg1J_FmavwZE-nRONovOZ0mpMVauheWg@mail.gmail.com Reported-by: Paul Menzel Closes: https://lore.kernel.org/r/d7246feb-4f3f-4d0c-bb64-89566b170671@molgen.mpg.de Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas Tested-by: Niklāvs Koļesņikovs Tested-by: Paul Menzel # Dell XPS 13 9360 drivers/pci/pcie/aspm.c | 3 --- 1 file changed, 3 deletions(-) commit b029628be267cba3c7684ec684749fe3e4372398 Author: Eric W. Biederman Date: Sun Jan 12 23:39:01 2025 -0600 alpha/elf: Fix misc/setarch test of util-linux by removing 32bit support Richard Henderson writes[1]: > There was a Spec benchmark (I forget which) which was memory bound and ran > twice as fast with 32-bit pointers. > > I copied the idea from DEC to the ELF abi, but never did all the other work > to allow the toolchain to take advantage. > > Amusingly, a later Spec changed the benchmark data sets to not fit into a > 32-bit address space, specifically because of this. > > I expect one could delete the ELF bit and personality and no one would > notice. Not even the 10 remaining Alpha users. In [2] it was pointed out that parts of setarch weren't working properly on alpha because it has it's own SET_PERSONALITY implementation. In the discussion that followed Richard Henderson pointed out that the 32bit pointer support for alpha was never completed. Fix this by removing alpha's 32bit pointer support. As a bit of paranoia refuse to execute any alpha binaries that have the EF_ALPHA_32BIT flag set. Just in case someone somewhere has binaries that try to use alpha's 32bit pointer support. Link: https://lkml.kernel.org/r/CAFXwXrkgu=4Qn-v1PjnOR4SG0oUb9LSa0g6QXpBq4ttm52pJOQ@mail.gmail.com [1] Link: https://lkml.kernel.org/r/20250103140148.370368-1-glaubitz@physik.fu-berlin.de [2] Signed-off-by: Eric W. Biederman Reviewed-by: Richard Henderson Reviewed-by: Arnd Bergmann Reviewed-by: John Paul Adrian Glaubitz Tested-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/87y0zfs26i.fsf_-_@email.froward.int.ebiederm.org Signed-off-by: Kees Cook arch/alpha/include/asm/elf.h | 6 +----- arch/alpha/include/asm/pgtable.h | 2 +- arch/alpha/include/asm/processor.h | 8 ++------ arch/alpha/kernel/osf_sys.c | 11 ++--------- 4 files changed, 6 insertions(+), 21 deletions(-) commit 0b06000704f8ae72056ad777a67742b7799d6660 Author: Shenghao Ding Date: Thu Feb 6 20:38:08 2025 +0800 ASoC: tas2781: drop a redundant code Report from internal ticket, priv->cali_data.data devm_kzalloc twice, drop the first one, it is the unnecessary one. Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20250206123808.1590-1-shenghao-ding@ti.com Signed-off-by: Mark Brown sound/soc/codecs/tas2781-i2c.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5d14c08a47460e8eedf0185a28b116420ea7f29d Author: Maxime Ripard Date: Wed Jan 29 15:21:56 2025 +0100 drm/tests: hdmi: Fix recursive locking The find_preferred_mode() functions takes the mode_config mutex, but due to the order most tests have, is called with the crtc_ww_class_mutex taken. This raises a warning for a circular dependency when running the tests with lockdep. Reorder the tests to call find_preferred_mode before the acquire context has been created to avoid the issue. Reviewed-by: Simona Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20250129-test-kunit-v2-4-fe59c43805d5@kernel.org Signed-off-by: Maxime Ripard drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 114 ++++++++++----------- 1 file changed, 57 insertions(+), 57 deletions(-) commit 6b6bfd63e1626ceedc738b2a06505aa5b46c1481 Author: Maxime Ripard Date: Wed Jan 29 15:21:55 2025 +0100 drm/tests: hdmi: Reorder DRM entities variables assignment The tests all deviate slightly in how they assign their local pointers to DRM entities. This makes refactoring pretty difficult, so let's just move the assignment as soon as the entities are allocated. Reviewed-by: Simona Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20250129-test-kunit-v2-3-fe59c43805d5@kernel.org Signed-off-by: Maxime Ripard drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 81 +++++++++++----------- 1 file changed, 42 insertions(+), 39 deletions(-) commit bb4f929a8875b4801db95b8cf3b2c527c1e475e0 Author: Maxime Ripard Date: Wed Jan 29 15:21:54 2025 +0100 drm/tests: hdmi: Remove redundant assignments Some tests have the drm pointer assigned multiple times to the same value. Drop the redundant assignments. Reviewed-by: Simona Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20250129-test-kunit-v2-2-fe59c43805d5@kernel.org Signed-off-by: Maxime Ripard drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 4 ---- 1 file changed, 4 deletions(-) commit fb97bc2e47f694f79d6358d981ae0428db8e8088 Author: Maxime Ripard Date: Wed Jan 29 15:21:53 2025 +0100 drm/tests: hdmi: Fix WW_MUTEX_SLOWPATH failures The light_up_connector helper function in the HDMI infrastructure unit tests uses drm_atomic_set_crtc_for_connector(), but fails when it returns an error. This function can return EDEADLK though if the sequence needs to be restarted, and WW_MUTEX_SLOWPATH is meant to test that we handle it properly. Let's handle EDEADLK and restart the sequence in our tests as well. Fixes: eb66d34d793e ("drm/tests: Add output bpc tests") Reported-by: Dave Airlie Closes: https://lore.kernel.org/r/CAPM=9tzJ4-ERDxvuwrCyUPY0=+P44orhp1kLWVGL7MCfpQjMEQ@mail.gmail.com/ Link: https://lore.kernel.org/r/20241031091558.2435850-1-mripard@kernel.org Reviewed-by: Simona Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20250129-test-kunit-v2-1-fe59c43805d5@kernel.org Signed-off-by: Maxime Ripard drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 517e8a7835e8cfb398a0aeb0133de50e31cae32b Author: Alan Maguire Date: Wed Feb 5 17:00:59 2025 +0000 bpf: Fix softlockup in arena_map_free on 64k page kernel On an aarch64 kernel with CONFIG_PAGE_SIZE_64KB=y, arena_htab tests cause a segmentation fault and soft lockup. The same failure is not observed with 4k pages on aarch64. It turns out arena_map_free() is calling apply_to_existing_page_range() with the address returned by bpf_arena_get_kern_vm_start(). If this address is not page-aligned the code ends up calling apply_to_pte_range() with that unaligned address causing soft lockup. Fix it by round up GUARD_SZ to PAGE_SIZE << 1 so that the division by 2 in bpf_arena_get_kern_vm_start() returns a page-aligned value. Fixes: 317460317a02 ("bpf: Introduce bpf_arena.") Reported-by: Colm Harrington Suggested-by: Alexei Starovoitov Signed-off-by: Alan Maguire Link: https://lore.kernel.org/r/20250205170059.427458-1-alan.maguire@oracle.com Signed-off-by: Alexei Starovoitov kernel/bpf/arena.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3588b1c0fde2f58d166e3f94a5a58d64b893526c Author: Kunihiko Hayashi Date: Thu Feb 6 17:57:47 2025 +0900 spi: sn-f-ospi: Fix division by zero When there is no dummy cycle in the spi-nor commands, both dummy bus cycle bytes and width are zero. Because of the cpu's warning when divided by zero, the warning should be avoided. Return just zero to avoid such calculations. Fixes: 1b74dd64c861 ("spi: Add Socionext F_OSPI SPI flash controller driver") Co-developed-by: Kohei Ito Signed-off-by: Kohei Ito Signed-off-by: Kunihiko Hayashi Link: https://patch.msgid.link/20250206085747.3834148-1-hayashi.kunihiko@socionext.com Signed-off-by: Mark Brown drivers/spi/spi-sn-f-ospi.c | 3 +++ 1 file changed, 3 insertions(+) commit 33b7dc7843dbdc9b90c91d11ba30b107f9138ffd Author: Terry Cheong Date: Thu Feb 6 11:47:23 2025 +0200 ASoC: SOF: Intel: hda: add softdep pre to snd-hda-codec-hdmi module In enviornment without KMOD requesting module may fail to load snd-hda-codec-hdmi, resulting in HDMI audio not usable. Add softdep to loading HDMI codec module first to ensure we can load it correctly. Signed-off-by: Terry Cheong Reviewed-by: Bard Liao Reviewed-by: Johny Lin Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://patch.msgid.link/20250206094723.18013-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda-codec.c | 1 + 1 file changed, 1 insertion(+) commit 6fd60136d256b3b948333ebdb3835f41a95ab7ef Author: Peter Ujfalusi Date: Thu Feb 6 10:46:42 2025 +0200 ASoC: SOF: ipc4-topology: Harden loops for looking up ALH copiers Other, non DAI copier widgets could have the same stream name (sname) as the ALH copier and in that case the copier->data is NULL, no alh_data is attached, which could lead to NULL pointer dereference. We could check for this NULL pointer in sof_ipc4_prepare_copier_module() and avoid the crash, but a similar loop in sof_ipc4_widget_setup_comp_dai() will miscalculate the ALH device count, causing broken audio. The correct fix is to harden the matching logic by making sure that the 1. widget is a DAI widget - so dai = w->private is valid 2. the dai (and thus the copier) is ALH copier Fixes: a150345aa758 ("ASoC: SOF: ipc4-topology: add SoundWire/ALH aggregation support") Reported-by: Seppo Ingalsuo Link: https://github.com/thesofproject/sof/pull/9652 Signed-off-by: Peter Ujfalusi Reviewed-by: Liam Girdwood Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://patch.msgid.link/20250206084642.14988-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/ipc4-topology.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 1d44a30ae3f9195cb4eb7d81bb9ced2776232094 Author: Stefan Binding Date: Wed Feb 5 16:48:04 2025 +0000 ASoC: cs35l41: Fallback to using HID for system_name if no SUB is available For systems which load firmware on the cs35l41 which use ACPI, the _SUB value is used to differentiate firmware and tuning files for the individual systems. In the case where a system does not have a _SUB defined in ACPI node for cs35l41, there needs to be a fallback to allow the files for that system to be differentiated. Since all ACPI nodes for cs35l41 should have a HID defined, the HID should be a safe option. Signed-off-by: Stefan Binding Reviewed-by: André Almeida Tested-by: André Almeida Link: https://patch.msgid.link/20250205164806.414020-1-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/codecs/cs35l41.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 679074942c2502a95842a80471d8fb718165ac77 Author: Vitaly Rodionov Date: Wed Feb 5 16:08:46 2025 +0000 ASoC: arizona/madera: use fsleep() in up/down DAPM event delays. Using `fsleep` instead of `msleep` resolves some customer complaints regarding the precision of up/down DAPM event timing. `fsleep()` automatically selects the appropriate sleep function, making the delay time more predictable. Signed-off-by: Vitaly Rodionov Link: https://patch.msgid.link/20250205160849.500306-1-vitalyr@opensource.cirrus.com Reviewed-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/arizona.c | 14 +++++++------- sound/soc/codecs/madera.c | 10 +++++----- sound/soc/codecs/wm5110.c | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) commit 2a64c96356c87aa8af826605943e5524bf45e24d Author: Russell King (Oracle) Date: Wed Feb 5 12:57:47 2025 +0000 Revert "net: stmmac: Specify hardware capability value when FIFO size isn't specified" This reverts commit 8865d22656b4, which caused breakage for platforms which are not using xgmac2 or gmac4. Only these two cores have the capability of providing the FIFO sizes from hardware capability fields (which are provided in priv->dma_cap.[tr]x_fifo_size.) All other cores can not, which results in these two fields containing zero. We also have platforms that do not provide a value in priv->plat->[tr]x_fifo_size, resulting in these also being zero. This causes the new tests introduced by the reverted commit to fail, and produce e.g.: stmmaceth f0804000.eth: Can't specify Rx FIFO size An example of such a platform which fails is QEMU's npcm750-evb. This uses dwmac1000 which, as noted above, does not have the capability to provide the FIFO sizes from hardware. Therefore, revert the commit to maintain compatibility with the way the driver used to work. Reported-by: Guenter Roeck Link: https://lore.kernel.org/r/4e98f967-f636-46fb-9eca-d383b9495b86@roeck-us.net Signed-off-by: Russell King (Oracle) Tested-by: Steven Price Fixes: 8865d22656b4 ("net: stmmac: Specify hardware capability value when FIFO size isn't specified") Link: https://patch.msgid.link/E1tfeyR-003YGJ-Gb@rmk-PC.armlinux.org.uk Signed-off-by: Paolo Abeni drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 35 +++++++++++------------ 1 file changed, 17 insertions(+), 18 deletions(-) commit 5da7e15fb5a12e78de974d8908f348e279922ce9 Author: Kuniyuki Iwashima Date: Fri Jan 31 19:01:42 2025 -0800 net: Add rx_skb of kfree_skb to raw_tp_null_args[]. Yan Zhai reported a BPF prog could trigger a null-ptr-deref [0] in trace_kfree_skb if the prog does not check if rx_sk is NULL. Commit c53795d48ee8 ("net: add rx_sk to trace_kfree_skb") added rx_sk to trace_kfree_skb, but rx_sk is optional and could be NULL. Let's add kfree_skb to raw_tp_null_args[] to let the BPF verifier validate such a prog and prevent the issue. Now we fail to load such a prog: libbpf: prog 'drop': -- BEGIN PROG LOAD LOG -- 0: R1=ctx() R10=fp0 ; int BPF_PROG(drop, struct sk_buff *skb, void *location, @ kfree_skb_sk_null.bpf.c:21 0: (79) r3 = *(u64 *)(r1 +24) func 'kfree_skb' arg3 has btf_id 5253 type STRUCT 'sock' 1: R1=ctx() R3_w=trusted_ptr_or_null_sock(id=1) ; bpf_printk("sk: %d, %d\n", sk, sk->__sk_common.skc_family); @ kfree_skb_sk_null.bpf.c:24 1: (69) r4 = *(u16 *)(r3 +16) R3 invalid mem access 'trusted_ptr_or_null_' processed 2 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0 -- END PROG LOAD LOG -- Note this fix requires commit 838a10bd2ebf ("bpf: Augment raw_tp arguments with PTR_MAYBE_NULL"). [0]: BUG: kernel NULL pointer dereference, address: 0000000000000010 PF: supervisor read access in kernel mode PF: error_code(0x0000) - not-present page PGD 0 P4D 0 PREEMPT SMP RIP: 0010:bpf_prog_5e21a6db8fcff1aa_drop+0x10/0x2d Call Trace: ? __die+0x1f/0x60 ? page_fault_oops+0x148/0x420 ? search_bpf_extables+0x5b/0x70 ? fixup_exception+0x27/0x2c0 ? exc_page_fault+0x75/0x170 ? asm_exc_page_fault+0x22/0x30 ? bpf_prog_5e21a6db8fcff1aa_drop+0x10/0x2d bpf_trace_run4+0x68/0xd0 ? unix_stream_connect+0x1f4/0x6f0 sk_skb_reason_drop+0x90/0x120 unix_stream_connect+0x1f4/0x6f0 __sys_connect+0x7f/0xb0 __x64_sys_connect+0x14/0x20 do_syscall_64+0x47/0xc30 entry_SYSCALL_64_after_hwframe+0x4b/0x53 Fixes: c53795d48ee8 ("net: add rx_sk to trace_kfree_skb") Reported-by: Yan Zhai Closes: https://lore.kernel.org/netdev/Z50zebTRzI962e6X@debian.debian/ Signed-off-by: Kuniyuki Iwashima Tested-by: Yan Zhai Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20250201030142.62703-1-kuniyu@amazon.com Signed-off-by: Alexei Starovoitov kernel/bpf/btf.c | 2 ++ 1 file changed, 2 insertions(+) commit ba958ac74800573f7f54dbe2a7a7b9a9a523ed52 Author: Oleh Zadorozhnyi Date: Tue Feb 4 07:17:30 2025 +0200 kbuild: fix misspelling in scripts/Makefile.lib Signed-off-by: Oleh Zadorozhnyi Signed-off-by: Masahiro Yamada scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82b02a7c459922bbf80e45d5f7e2c4cfef617943 Author: Jakub Kicinski Date: Tue Feb 4 13:57:50 2025 -0800 MAINTAINERS: add a sample ethtool section entry I feel like we don't do a good enough keeping authors of driver APIs around. The ethtool code base was very nicely compartmentalized by Michal. Establish a precedent of creating MAINTAINERS entries for "sections" of the ethtool API. Use Andrew and cable test as a sample entry. The entry should ideally cover 3 elements: a core file, test(s), and keywords. The last one is important because we intend the entries to cover core code *and* reviews of drivers implementing given API! Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250204215750.169249-1-kuba@kernel.org Signed-off-by: Paolo Abeni MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 1e3835a8aea5118d58ff9daa656395e69c8806b2 Author: Jakub Kicinski Date: Tue Feb 4 13:57:29 2025 -0800 MAINTAINERS: add entry for ethtool Michal did an amazing job converting ethtool to Netlink, but never added an entry to MAINTAINERS for himself. Create a formal entry so that we can delegate (portions) of this code to folks. Over the last 3 years majority of the reviews have been done by Andrew and I. I suppose Michal didn't want to be on the receiving end of the flood of patches. Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20250204215729.168992-1-kuba@kernel.org Signed-off-by: Paolo Abeni MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0af4c120f5e7a1ea70aff7da2dfb65b6148a3e84 Author: Claudiu Beznea Date: Wed Feb 5 12:10:58 2025 +0200 pinctrl: pinconf-generic: Print unsigned value if a format is registered Commit 3ba11e684d16 ("pinctrl: pinconf-generic: print hex value") unconditionally switched to printing hex values in pinconf_generic_dump_one(). However, if a dump format is registered for the dumped pin, the hex value is printed as well. This hex value does not necessarily correspond 1:1 with the hardware register value (as noted by commit 3ba11e684d16 ("pinctrl: pinconf-generic: print hex value")). As a result, user-facing output may include information like: output drive strength (0x100 uA). To address this, check if a dump format is registered for the dumped property, and print the unsigned value instead when applicable. Fixes: 3ba11e684d16 ("pinctrl: pinconf-generic: print hex value") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/20250205101058.2034860-1-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Linus Walleij drivers/pinctrl/pinconf-generic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 29b7bb98234cc287cebef9bccf638c2e3f39be71 Author: Konstantin Taranov Date: Wed Feb 5 02:30:05 2025 -0800 RDMA/mana_ib: Allocate PAGE aligned doorbell index Allocate a PAGE aligned doorbell index to ensure each process gets a separate PAGE sized doorbell area space remapped to it in mana_ib_mmap Fixes: 0266a177631d ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter") Signed-off-by: Shiraz Saleem Signed-off-by: Konstantin Taranov Link: https://patch.msgid.link/1738751405-15041-1-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Long Li Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mana/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c1ed907520c50326b8f604907a8478b27881a2e Merge: 41a2d8286c90 ecee4d069506 Author: Maxime Ripard Date: Thu Feb 6 09:59:35 2025 +0100 Merge remote-tracking branch 'drm-misc/drm-misc-next-fixes' into drm-misc-fixes Merge the few remaining patches stuck into drm-misc-next-fixes. Signed-off-by: Maxime Ripard commit abc7b3f1f056d69a8f11d6dceecc0c9549ace770 Author: Yishai Hadas Date: Mon Feb 3 14:51:43 2025 +0200 RDMA/mlx5: Fix a WARN during dereg_mr for DM type Memory regions (MR) of type DM (device memory) do not have an associated umem. In the __mlx5_ib_dereg_mr() -> mlx5_free_priv_descs() flow, the code incorrectly takes the wrong branch, attempting to call dma_unmap_single() on a DMA address that is not mapped. This results in a WARN [1], as shown below. The issue is resolved by properly accounting for the DM type and ensuring the correct branch is selected in mlx5_free_priv_descs(). [1] WARNING: CPU: 12 PID: 1346 at drivers/iommu/dma-iommu.c:1230 iommu_dma_unmap_page+0x79/0x90 Modules linked in: ip6table_mangle ip6table_nat ip6table_filter ip6_tables iptable_mangle xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter rpcsec_gss_krb5 auth_rpcgss oid_registry ovelay rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi ib_umad rdma_cm ib_ipoib iw_cm ib_cm mlx5_ib ib_uverbs ib_core fuse mlx5_core CPU: 12 UID: 0 PID: 1346 Comm: ibv_rc_pingpong Not tainted 6.12.0-rc7+ #1631 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:iommu_dma_unmap_page+0x79/0x90 Code: 2b 49 3b 29 72 26 49 3b 69 08 73 20 4d 89 f0 44 89 e9 4c 89 e2 48 89 ee 48 89 df 5b 5d 41 5c 41 5d 41 5e 41 5f e9 07 b8 88 ff <0f> 0b 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc 66 0f 1f 44 00 RSP: 0018:ffffc90001913a10 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff88810194b0a8 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001 RBP: ffff88810194b0a8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f537abdd740(0000) GS:ffff88885fb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f537aeb8000 CR3: 000000010c248001 CR4: 0000000000372eb0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? __warn+0x84/0x190 ? iommu_dma_unmap_page+0x79/0x90 ? report_bug+0xf8/0x1c0 ? handle_bug+0x55/0x90 ? exc_invalid_op+0x13/0x60 ? asm_exc_invalid_op+0x16/0x20 ? iommu_dma_unmap_page+0x79/0x90 dma_unmap_page_attrs+0xe6/0x290 mlx5_free_priv_descs+0xb0/0xe0 [mlx5_ib] __mlx5_ib_dereg_mr+0x37e/0x520 [mlx5_ib] ? _raw_spin_unlock_irq+0x24/0x40 ? wait_for_completion+0xfe/0x130 ? rdma_restrack_put+0x63/0xe0 [ib_core] ib_dereg_mr_user+0x5f/0x120 [ib_core] ? lock_release+0xc6/0x280 destroy_hw_idr_uobject+0x1d/0x60 [ib_uverbs] uverbs_destroy_uobject+0x58/0x1d0 [ib_uverbs] uobj_destroy+0x3f/0x70 [ib_uverbs] ib_uverbs_cmd_verbs+0x3e4/0xbb0 [ib_uverbs] ? __pfx_uverbs_destroy_def_handler+0x10/0x10 [ib_uverbs] ? lock_acquire+0xc1/0x2f0 ? ib_uverbs_ioctl+0xcb/0x170 [ib_uverbs] ? ib_uverbs_ioctl+0x116/0x170 [ib_uverbs] ? lock_release+0xc6/0x280 ib_uverbs_ioctl+0xe7/0x170 [ib_uverbs] ? ib_uverbs_ioctl+0xcb/0x170 [ib_uverbs] __x64_sys_ioctl+0x1b0/0xa70 do_syscall_64+0x6b/0x140 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f537adaf17b Code: 0f 1e fa 48 8b 05 1d ad 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 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 ed ac 0c 00 f7 d8 64 89 01 48 RSP: 002b:00007ffff218f0b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ffff218f1d8 RCX: 00007f537adaf17b RDX: 00007ffff218f1c0 RSI: 00000000c0181b01 RDI: 0000000000000003 RBP: 00007ffff218f1a0 R08: 00007f537aa8d010 R09: 0000561ee2e4f270 R10: 00007f537aace3a8 R11: 0000000000000246 R12: 00007ffff218f190 R13: 000000000000001c R14: 0000561ee2e4d7c0 R15: 00007ffff218f450 Fixes: f18ec4223117 ("RDMA/mlx5: Use a union inside mlx5_ib_mr") Signed-off-by: Yishai Hadas Link: https://patch.msgid.link/2039c22cfc3df02378747ba4d623a558b53fc263.1738587076.git.leon@kernel.org Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/mr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cc668a11e6ac8adb0e016711080d3f314722cc91 Author: Yishai Hadas Date: Mon Feb 3 14:50:59 2025 +0200 RDMA/mlx5: Fix a race for DMABUF MR which can lead to CQE with error This patch addresses a potential race condition for a DMABUF MR that can result in a CQE with an error on the UMR QP. During the __mlx5_ib_dereg_mr() flow, the following sequence of calls occurs: mlx5_revoke_mr() mlx5r_umr_revoke_mr() mlx5r_umr_post_send_wait() At this point, the lkey is freed from the hardware's perspective. However, concurrently, mlx5_ib_dmabuf_invalidate_cb() might be triggered by another task attempting to invalidate the MR having that freed lkey. Since the lkey has already been freed, this can lead to a CQE error, causing the UMR QP to enter an error state. To resolve this race condition, the dma_resv_lock() which was hold as part of the mlx5_ib_dmabuf_invalidate_cb() is now also acquired as part of the mlx5_revoke_mr() scope. Upon a successful revoke, we set umem_dmabuf->private which points to that MR to NULL, preventing any further invalidation attempts on its lkey. Fixes: e6fb246ccafb ("RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr()") Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Link: https://patch.msgid.link/70617067abbfaa0c816a2544c922e7f4346def58.1738587016.git.leon@kernel.org Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/mr.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit c7691aec5e991cec9c5c5fdab08c24856a1fc56f Author: Vaishnav Achath Date: Wed Feb 5 11:52:29 2025 +0530 arm64: defconfig: Enable TISCI Interrupt Router and Aggregator Enable TISCI Interrupt Router and Interrupt Aggregator drivers. These IPs are found in all TI K3 SoCs like J721E, AM62X and is required for core functionality like DMA, GPIO Interrupts which is necessary during boot, thus make them built-in. bloat-o-meter summary on vmlinux: add/remove: 460/1 grow/shrink: 4/0 up/down: 162483/-8 (162475) ... Total: Before=31615984, After=31778459, chg +0.51% These configs were previously selected for ARCH_K3 in respective Kconfigs till commit b8b26ae398c4 ("irqchip/ti-sci-inta : Add module build support") and commit 2d95ffaecbc2 ("irqchip/ti-sci-intr: Add module build support") dropped them and few driver configs (TI_K3_UDMA, TI_K3_RINGACC) dependent on these also got disabled due to this. While re-enabling the TI_SCI_INT_*_IRQCHIP configs, these configs with missing dependencies (which are already part of arm64 defconfig) also get re-enabled which explains the slightly larger size increase from the bloat-o-meter summary. Fixes: 2d95ffaecbc2 ("irqchip/ti-sci-intr: Add module build support") Fixes: b8b26ae398c4 ("irqchip/ti-sci-inta : Add module build support") Signed-off-by: Vaishnav Achath Tested-by: Dhruva Gole Reviewed-by: Dhruva Gole Link: https://lore.kernel.org/r/20250205062229.3869081-1-vaishnav.a@ti.com Signed-off-by: Nishanth Menon arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit be1963dd4ce4e467f062b023d1e696f40c926a04 Author: Paulo Alcantara Date: Wed Feb 5 13:41:32 2025 -0300 smb: client: get rid of kstrdup() in get_ses_refpath() After commit 36008fe6e3dc ("smb: client: don't try following DFS links in cifs_tree_connect()"), TCP_Server_Info::leaf_fullpath will no longer be changed, so there is no need to kstrdup() it. Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/dfs.h | 7 +++++++ fs/smb/client/dfs_cache.c | 27 +++++---------------------- 2 files changed, 12 insertions(+), 22 deletions(-) commit 773dc23ff81838b6f74d7fabba5a441cc6a93982 Author: Paulo Alcantara Date: Wed Feb 5 13:22:11 2025 -0300 smb: client: fix noisy when tree connecting to DFS interlink targets When the client attempts to tree connect to a domain-based DFS namespace from a DFS interlink target, the server will return STATUS_BAD_NETWORK_NAME and the following will appear on dmesg: CIFS: VFS: BAD_NETWORK_NAME: \\dom\dfs Since a DFS share might contain several DFS interlinks and they expire after 10 minutes, the above message might end up being flooded on dmesg when mounting or accessing them. Print this only once per share. Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/smb2pdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77c2e45dbf9d2ced21d2cf6cc3b2a048d57ab7ad Author: Paulo Alcantara Date: Wed Feb 5 13:03:33 2025 -0300 smb: client: don't trust DFSREF_STORAGE_SERVER bit Some servers don't respect the DFSREF_STORAGE_SERVER bit, so unconditionally tree connect to DFS link target and then decide whether or not continue chasing DFS referrals for DFS interlinks. Otherwise the client would fail to mount such shares. Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/dfs.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 884af6ab1eb1f0b98afe11e00dcb06d4dbb36696 Merge: 811b8f534fd8 2d7b30aef34d Author: Jakub Kicinski Date: Wed Feb 5 18:47:50 2025 -0800 Merge branch 'rxrpc-call-state-fixes' David Howells says: ==================== rxrpc: Call state fixes Here some call state fixes for AF_RXRPC. (1) Fix the state of a call to not treat the challenge-response cycle as part of an incoming call's state set. The problem is that it makes handling received of the final packet in the receive phase difficult as that wants to change the call state - but security negotiations may not yet be complete. (2) Fix a race between the changing of the call state at the end of the request reception phase of a service call, recvmsg() collecting the last data and sendmsg() trying to send the reply before the I/O thread has advanced the call state. Link: https://lore.kernel.org/20250203110307.7265-2-dhowells@redhat.com ==================== Link: https://patch.msgid.link/20250204230558.712536-1-dhowells@redhat.com Signed-off-by: Jakub Kicinski commit 2d7b30aef34dae942e9ab7812b288ce14658ae66 Author: David Howells Date: Tue Feb 4 23:05:54 2025 +0000 rxrpc: Fix race in call state changing vs recvmsg() There's a race in between the rxrpc I/O thread recording the end of the receive phase of a call and recvmsg() examining the state of the call to determine whether it has completed. The problem is that call->_state records the I/O thread's view of the call, not the application's view (which may lag), so that alone is not sufficient. To this end, the application also checks whether there is anything left in call->recvmsg_queue for it to pick up. The call must be in state RXRPC_CALL_COMPLETE and the recvmsg_queue empty for the call to be considered fully complete. In rxrpc_input_queue_data(), the latest skbuff is added to the queue and then, if it was marked as LAST_PACKET, the state is advanced... But this is two separate operations with no locking around them. As a consequence, the lack of locking means that sendmsg() can jump into the gap on a service call and attempt to send the reply - but then get rejected because the I/O thread hasn't advanced the state yet. Simply flipping the order in which things are done isn't an option as that impacts the client side, causing the checks in rxrpc_kernel_check_life() as to whether the call is still alive to race instead. Fix this by moving the update of call->_state inside the skb queue spinlocked section where the packet is queued on the I/O thread side. rxrpc's recvmsg() will then automatically sync against this because it has to take the call->recvmsg_queue spinlock in order to dequeue the last packet. rxrpc's sendmsg() doesn't need amending as the app shouldn't be calling it to send a reply until recvmsg() indicates it has returned all of the request. Fixes: 93368b6bd58a ("rxrpc: Move call state changes from recvmsg to I/O thread") Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250204230558.712536-3-dhowells@redhat.com Signed-off-by: Jakub Kicinski net/rxrpc/input.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 41b996ce83bf944de5569d6263c8dbd5513e7ed0 Author: David Howells Date: Tue Feb 4 23:05:53 2025 +0000 rxrpc: Fix call state set to not include the SERVER_SECURING state The RXRPC_CALL_SERVER_SECURING state doesn't really belong with the other states in the call's state set as the other states govern the call's Rx/Tx phase transition and govern when packets can and can't be received or transmitted. The "Securing" state doesn't actually govern the reception of packets and would need to be split depending on whether or not we've received the last packet yet (to mirror RECV_REQUEST/ACK_REQUEST). The "Securing" state is more about whether or not we can start forwarding packets to the application as recvmsg will need to decode them and the decoding can't take place until the challenge/response exchange has completed. Fix this by removing the RXRPC_CALL_SERVER_SECURING state from the state set and, instead, using a flag, RXRPC_CALL_CONN_CHALLENGING, to track whether or not we can queue the call for reception by recvmsg() or notify the kernel app that data is ready. In the event that we've already received all the packets, the connection event handler will poke the app layer in the appropriate manner. Also there's a race whereby the app layer sees the last packet before rxrpc has managed to end the rx phase and change the state to one amenable to allowing a reply. Fix this by queuing the packet after calling rxrpc_end_rx_phase(). Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both") Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20250204230558.712536-2-dhowells@redhat.com Signed-off-by: Jakub Kicinski net/rxrpc/ar-internal.h | 2 +- net/rxrpc/call_object.c | 6 ++---- net/rxrpc/conn_event.c | 4 +--- net/rxrpc/input.c | 2 +- net/rxrpc/sendmsg.c | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) commit 811b8f534fd85e17077bd2ac0413bcd16cc8fb9b Author: Ido Schimmel Date: Tue Feb 4 14:38:39 2025 +0200 net: sched: Fix truncation of offloaded action statistics In case of tc offload, when user space queries the kernel for tc action statistics, tc will query the offloaded statistics from device drivers. Among other statistics, drivers are expected to pass the number of packets that hit the action since the last query as a 64-bit number. Unfortunately, tc treats the number of packets as a 32-bit number, leading to truncation and incorrect statistics when the number of packets since the last query exceeds 0xffffffff: $ tc -s filter show dev swp2 ingress filter protocol all pref 1 flower chain 0 filter protocol all pref 1 flower chain 0 handle 0x1 skip_sw in_hw in_hw_count 1 action order 1: mirred (Egress Redirect to device swp1) stolen index 1 ref 1 bind 1 installed 58 sec used 0 sec Action statistics: Sent 1133877034176 bytes 536959475 pkt (dropped 0, overlimits 0 requeues 0) [...] According to the above, 2111-byte packets were redirected which is impossible as only 64-byte packets were transmitted and the MTU was 1500. Fix by treating packets as a 64-bit number: $ tc -s filter show dev swp2 ingress filter protocol all pref 1 flower chain 0 filter protocol all pref 1 flower chain 0 handle 0x1 skip_sw in_hw in_hw_count 1 action order 1: mirred (Egress Redirect to device swp1) stolen index 1 ref 1 bind 1 installed 61 sec used 0 sec Action statistics: Sent 1370624380864 bytes 21416005951 pkt (dropped 0, overlimits 0 requeues 0) [...] Which shows that only 64-byte packets were redirected (1370624380864 / 21416005951 = 64). Fixes: 380407023526 ("net/sched: Enable netdev drivers to update statistics of offloaded actions") Reported-by: Joe Botha Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250204123839.1151804-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski include/net/sch_generic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a70c7b3cbc0688016810bb2e0b9b8a0d6a530045 Author: Willem de Bruijn Date: Tue Feb 4 11:10:06 2025 -0500 tun: revert fix group permission check This reverts commit 3ca459eaba1bf96a8c7878de84fa8872259a01e3. The blamed commit caused a regression when neither tun->owner nor tun->group is set. This is intended to be allowed, but now requires CAP_NET_ADMIN. Discussion in the referenced thread pointed out that the original issue that prompted this patch can be resolved in userspace. The relaxed access control may also make a device accessible when it previously wasn't, while existing users may depend on it to not be. This is a clean pure git revert, except for fixing the indentation on the gid_valid line that checkpatch correctly flagged. Fixes: 3ca459eaba1b ("tun: fix group permission check") Link: https://lore.kernel.org/netdev/CAFqZXNtkCBT4f+PwyVRmQGoT3p1eVa01fCG_aNtpt6dakXncUg@mail.gmail.com/ Signed-off-by: Willem de Bruijn Cc: Ondrej Mosnacek Cc: Stas Sergeev Link: https://patch.msgid.link/20250204161015.739430-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski drivers/net/tun.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 02b71dc1159095f54458a68a7bd4bc065d877135 Merge: 5368a67307b3 91aadc16ee73 Author: Jakub Kicinski Date: Wed Feb 5 18:15:00 2025 -0800 Merge branch 'net_sched-two-security-bug-fixes-and-test-cases' Cong Wang says: ==================== net_sched: two security bug fixes and test cases This patchset contains two bug fixes reported in security mailing list, and test cases for both of them. ==================== Link: https://patch.msgid.link/20250204005841.223511-1-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski commit 91aadc16ee73cf958be6b0896da3caea49b7f414 Author: Cong Wang Date: Mon Feb 3 16:58:41 2025 -0800 selftests/tc-testing: Add a test case for qdisc_tree_reduce_backlog() Integrate the test case provided by Mingi Cho into TDC. All test results: 1..4 ok 1 ca5e - Check class delete notification for ffff: ok 2 e4b7 - Check class delete notification for root ffff: ok 3 33a9 - Check ingress is not searchable on backlog update ok 4 a4b9 - Test class qlen notification Cc: Mingi Cho Signed-off-by: Cong Wang Link: https://patch.msgid.link/20250204005841.223511-5-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski .../tc-testing/tc-tests/infra/qdiscs.json | 34 +++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit 638ba5089324796c2ee49af10427459c2de35f71 Author: Cong Wang Date: Mon Feb 3 16:58:40 2025 -0800 netem: Update sch->q.qlen before qdisc_tree_reduce_backlog() qdisc_tree_reduce_backlog() notifies parent qdisc only if child qdisc becomes empty, therefore we need to reduce the backlog of the child qdisc before calling it. Otherwise it would miss the opportunity to call cops->qlen_notify(), in the case of DRR, it resulted in UAF since DRR uses ->qlen_notify() to maintain its active list. Fixes: f8d4bc455047 ("net/sched: netem: account for backlog updates from child qdisc") Cc: Martin Ottens Reported-by: Mingi Cho Signed-off-by: Cong Wang Link: https://patch.msgid.link/20250204005841.223511-4-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski net/sched/sch_netem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3fe5648d1df1798ce14b5464b2ea49f10cd9db31 Author: Quang Le Date: Mon Feb 3 16:58:39 2025 -0800 selftests/tc-testing: Add a test case for pfifo_head_drop qdisc when limit==0 When limit == 0, pfifo_tail_enqueue() must drop new packet and increase dropped packets count of the qdisc. All test results: 1..16 ok 1 a519 - Add bfifo qdisc with system default parameters on egress ok 2 585c - Add pfifo qdisc with system default parameters on egress ok 3 a86e - Add bfifo qdisc with system default parameters on egress with handle of maximum value ok 4 9ac8 - Add bfifo qdisc on egress with queue size of 3000 bytes ok 5 f4e6 - Add pfifo qdisc on egress with queue size of 3000 packets ok 6 b1b1 - Add bfifo qdisc with system default parameters on egress with invalid handle exceeding maximum value ok 7 8d5e - Add bfifo qdisc on egress with unsupported argument ok 8 7787 - Add pfifo qdisc on egress with unsupported argument ok 9 c4b6 - Replace bfifo qdisc on egress with new queue size ok 10 3df6 - Replace pfifo qdisc on egress with new queue size ok 11 7a67 - Add bfifo qdisc on egress with queue size in invalid format ok 12 1298 - Add duplicate bfifo qdisc on egress ok 13 45a0 - Delete nonexistent bfifo qdisc ok 14 972b - Add prio qdisc on egress with invalid format for handles ok 15 4d39 - Delete bfifo qdisc twice ok 16 d774 - Check pfifo_head_drop qdisc enqueue behaviour when limit == 0 Signed-off-by: Quang Le Signed-off-by: Cong Wang Link: https://patch.msgid.link/20250204005841.223511-3-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski .../selftests/tc-testing/tc-tests/qdiscs/fifo.json | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 647cef20e649c576dff271e018d5d15d998b629d Author: Quang Le Date: Mon Feb 3 16:58:38 2025 -0800 pfifo_tail_enqueue: Drop new packet when sch->limit == 0 Expected behaviour: In case we reach scheduler's limit, pfifo_tail_enqueue() will drop a packet in scheduler's queue and decrease scheduler's qlen by one. Then, pfifo_tail_enqueue() enqueue new packet and increase scheduler's qlen by one. Finally, pfifo_tail_enqueue() return `NET_XMIT_CN` status code. Weird behaviour: In case we set `sch->limit == 0` and trigger pfifo_tail_enqueue() on a scheduler that has no packet, the 'drop a packet' step will do nothing. This means the scheduler's qlen still has value equal 0. Then, we continue to enqueue new packet and increase scheduler's qlen by one. In summary, we can leverage pfifo_tail_enqueue() to increase qlen by one and return `NET_XMIT_CN` status code. The problem is: Let's say we have two qdiscs: Qdisc_A and Qdisc_B. - Qdisc_A's type must have '->graft()' function to create parent/child relationship. Let's say Qdisc_A's type is `hfsc`. Enqueue packet to this qdisc will trigger `hfsc_enqueue`. - Qdisc_B's type is pfifo_head_drop. Enqueue packet to this qdisc will trigger `pfifo_tail_enqueue`. - Qdisc_B is configured to have `sch->limit == 0`. - Qdisc_A is configured to route the enqueued's packet to Qdisc_B. Enqueue packet through Qdisc_A will lead to: - hfsc_enqueue(Qdisc_A) -> pfifo_tail_enqueue(Qdisc_B) - Qdisc_B->q.qlen += 1 - pfifo_tail_enqueue() return `NET_XMIT_CN` - hfsc_enqueue() check for `NET_XMIT_SUCCESS` and see `NET_XMIT_CN` => hfsc_enqueue() don't increase qlen of Qdisc_A. The whole process lead to a situation where Qdisc_A->q.qlen == 0 and Qdisc_B->q.qlen == 1. Replace 'hfsc' with other type (for example: 'drr') still lead to the same problem. This violate the design where parent's qlen should equal to the sum of its childrens'qlen. Bug impact: This issue can be used for user->kernel privilege escalation when it is reachable. Fixes: 57dbb2d83d10 ("sched: add head drop fifo queue") Reported-by: Quang Le Signed-off-by: Quang Le Signed-off-by: Cong Wang Link: https://patch.msgid.link/20250204005841.223511-2-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski net/sched/sch_fifo.c | 3 +++ 1 file changed, 3 insertions(+) commit 5368a67307b3b2c347dc8965ac55b888be665934 Author: Matthieu Baerts (NGI0) Date: Tue Feb 4 23:19:53 2025 +0100 selftests: mptcp: connect: -f: no reconnect The '-f' parameter is there to force the kernel to emit MPTCP FASTCLOSE by closing the connection with unread bytes in the receive queue. The xdisconnect() helper was used to stop the connection, but it does more than that: it will shut it down, then wait before reconnecting to the same address. This causes the mptcp_join's "fastclose test" to fail all the time. This failure is due to a recent change, with commit 218cc166321f ("selftests: mptcp: avoid spurious errors on disconnect"), but that went unnoticed because the test is currently ignored. The recent modification only shown an existing issue: xdisconnect() doesn't need to be used here, only the shutdown() part is needed. Fixes: 6bf41020b72b ("selftests: mptcp: update and extend fastclose test-cases") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250204-net-mptcp-sft-conn-f-v1-1-6b470c72fffa@kernel.org Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/mptcp_connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c21bdb3d8a850afdfa4afe77eea39ae9533629b0 Author: Miguel Ojeda Date: Tue Jan 21 21:09:34 2025 +0100 rust: init: use explicit ABI to clean warning in future compilers Starting with Rust 1.86.0 (currently in nightly, to be released on 2025-04-03), the `missing_abi` lint is warn-by-default [1]: error: extern declarations without an explicit ABI are deprecated --> rust/doctests_kernel_generated.rs:3158:1 | 3158 | extern { | ^^^^^^ help: explicitly specify the C ABI: `extern "C"` | = note: `-D missing-abi` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(missing_abi)]` Thus clean it up. Cc: # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Fixes: 7f8977a7fe6d ("rust: init: add `{pin_}chain` functions to `{Pin}Init`") Link: https://github.com/rust-lang/rust/pull/132397 [1] Reviewed-by: Gary Guo Reviewed-by: Alice Ryhl Reviewed-by: Fiona Behrens Link: https://lore.kernel.org/r/20250121200934.222075-1-ojeda@kernel.org [ Added 6.13.y to Cc: stable tag. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/init.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1749432a52d3605151634b000fec0361ad45067 Author: Tamir Duberstein Date: Sat Feb 1 12:40:38 2025 -0500 rust: kbuild: use host dylib naming in rusttestlib-kernel There seems to have been merge skew between commit b2c261fa8629 ("rust: kbuild: expand rusttest target for macros") and commit 0730422bced5 ("rust: use host dylib naming convention to support macOS") ; the latter replaced `libmacros.so` with `$(libmacros_name)` and the former added an instance of `libmacros.so`. The former was not yet applied when the latter was sent, resulting in a stray `libmacros.so`. Replace the stray with `$(libmacros_name)` to allow `rusttest` to build on macOS. Fixes: 0730422bced5 ("rust: use host dylib naming convention to support macOS") Signed-off-by: Tamir Duberstein Link: https://lore.kernel.org/r/20250201-fix-mac-build-again-v1-1-ca665f5d7de7@gmail.com [ Slightly reworded title. - Miguel ] Signed-off-by: Miguel Ojeda rust/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f5704b6a143b8eca640cba820968e798d065e91 Author: Aubrey Li Date: Sun Jan 26 10:22:50 2025 +0800 ACPI: PRM: Remove unnecessary strict handler address checks Commit 088984c8d54c ("ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and context") added unnecessary strict handler address checks, causing the PRM module to fail in translating memory error addresses. Both static data buffer address and ACPI parameter buffer address may be NULL if they are not needed, as described in section 4.1.2 PRM Handler Information Structure of Platform Runtime Mechanism specification [1]. Here are two examples from real hardware: ----PRMT.dsl---- - staic data address is not used [10Ch 0268 2] Revision : 0000 [10Eh 0270 2] Length : 002C [110h 0272 16] Handler GUID : F6A58D47-E04F-4F5A-86B8-2A50D4AA109B [120h 0288 8] Handler address : 0000000065CE51F4 [128h 0296 8] Satic Data Address : 0000000000000000 [130h 0304 8] ACPI Parameter Address : 000000006522A718 - ACPI parameter address is not used [1B0h 0432 2] Revision : 0000 [1B2h 0434 2] Length : 002C [1B4h 0436 16] Handler GUID : 657E8AE6-A8FC-4877-BB28-42E7DE1899A5 [1C4h 0452 8] Handler address : 0000000065C567C8 [1CCh 0460 8] Satic Data Address : 000000006113FB98 [1D4h 0468 8] ACPI Parameter Address : 0000000000000000 Fixes: 088984c8d54c ("ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and context") Reported-and-tested-by: Shi Liu Cc: All applicable Signed-off-by: Aubrey Li Link: https://uefi.org/sites/default/files/resources/Platform%20Runtime%20Mechanism%20-%20with%20legal%20notice.pdf # [1] Reviewed-by: Koba Ko Acked-by: Ard Biesheuvel Link: https://patch.msgid.link/20250126022250.3014210-1-aubrey.li@linux.intel.com [ rjw: Minor changelog edits ] Signed-off-by: Rafael J. Wysocki drivers/acpi/prmt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 607ab6f85f4194b644ea95ac5fe660ef575db3b4 Author: Gannon Kolding Date: Mon Jan 27 02:39:02 2025 -0700 ACPI: resource: IRQ override for Eluktronics MECH-17 The Eluktronics MECH-17 (GM7RG7N) needs IRQ overriding for the keyboard to work. Adding a DMI_MATCH entry for this laptop model makes the internal keyboard function normally. Signed-off-by: Gannon Kolding Link: https://patch.msgid.link/20250127093902.328361-1-gannon.kolding@gmail.com Signed-off-by: Rafael J. Wysocki drivers/acpi/resource.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ab930483eca9f3e816c35824b5868599af0c61d7 Author: Andy Shevchenko Date: Mon Feb 3 21:46:29 2025 +0200 ACPI: property: Fix return value for nval == 0 in acpi_data_prop_read() While analysing code for software and OF node for the corner case when caller asks to read zero items in the supposed to be an array of values I found that ACPI behaves differently to what OF does, i.e. 1. It returns -EINVAL when caller asks to read zero items from integer array, while OF returns 0, if no other errors happened. 2. It returns -EINVAL when caller asks to read zero items from string array, while OF returns -ENODATA, if no other errors happened. Amend ACPI implementation to follow what OF does. Fixes: b31384fa5de3 ("Driver core: Unified device properties interface for platform firmware") Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20250203194629.3731895-1-andriy.shevchenko@linux.intel.com [ rjw: Added empty line after a conditional ] Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0813fd2e14ca6ecd4e6ba005a9766f08e26020d7 Author: Aboorva Devarajan Date: Wed Feb 5 23:43:47 2025 +0530 cpufreq: prevent NULL dereference in cpufreq_online() Ensure cpufreq_driver->set_boost is non-NULL before using it in cpufreq_online() to prevent a potential NULL pointer dereference. Reported-by: Gautam Menghani Closes: https://lore.kernel.org/all/c9e56c5f54cc33338762c94e9bed7b5a0d5de812.camel@linux.ibm.com/ Fixes: dd016f379ebc ("cpufreq: Introduce a more generic way to set default per-policy boost flag") Suggested-by: Viresh Kumar Signed-off-by: Aboorva Devarajan Link: https://patch.msgid.link/20250205181347.2079272-1-aboorvad@linux.ibm.com [ rjw: Minor edits in the subject and changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 90508a1bb8f00618fa12cb2ad2276bc783656fc5 Author: Arnd Bergmann Date: Mon Feb 3 16:24:15 2025 +0530 cpufreq: airoha: modify CONFIG_OF dependency Compile-testing without CONFIG_OF leads to a harmless build warning: drivers/cpufreq/airoha-cpufreq.c:109:34: error: 'airoha_cpufreq_match_list' defined but not used [-Werror=unused-const-variable=] 109 | static const struct of_device_id airoha_cpufreq_match_list[] __initconst = { | ^~~~~~~~~~~~~~~~~~~~~~~~~ It would be possible to mark the variable as __maybe_unused to shut up that warning, but a Kconfig dependency seems more appropriate as this still allows build testing in allmodconfig and randconfig builds on all architectures. An earlier commit, b865a8404642 ("cpufreq: airoha: Depends on OF"), tried to fix it incorrectly. ARCH_AIROHA already requires CONFIG_OF, so this change does nothing, and the dependency is still missing for the COMPILE_TEST case. Fix it properly. Fixes: 84cf9e541ccc ("cpufreq: airoha: Add EN7581 CPUFreq SMCCC driver") Fixes: b865a8404642 ("cpufreq: airoha: Depends on OF") Signed-off-by: Arnd Bergmann [ Viresh: updated commit log and fixed rebase conflict ] Signed-off-by: Viresh Kumar Link: https://patch.msgid.link/9d51d2710061dfa7f2568287c6ed125b858b7318.1738580005.git.viresh.kumar@linaro.org Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig.arm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 069504f1fcfa1532e4e221290df428b15bd9d284 Author: Jani Nikula Date: Tue Feb 4 17:49:25 2025 +0200 drm/i915/dp: Fix potential infinite loop in 128b/132b SST Passing 0 as the step only works when there are other reasons to break out of the BPP loop in intel_dp_mtp_tu_compute_config(). Otherwise, an infinite loop might occur. Fix it by explicitly checking for 0 step. Fixes: ef0a0757bbea ("drm/i915/dp: compute config for 128b/132b SST w/o DSC") Reported-by: Imre Deak Closes: https://lore.kernel.org/r/Z6I0knh2Kt5T0JrT@ideak-desk.fi.intel.com Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20250204154925.3001781-1-jani.nikula@intel.com Signed-off-by: Jani Nikula (cherry picked from commit a40e718d34d3d02c781c295466b013415f68c4f1) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_dp_mst.c | 4 ++++ 1 file changed, 4 insertions(+) commit 038e33fcd40e59b60cdca561c2a39998e6759e08 Author: Lukasz Majewski Date: Thu Jan 9 16:41:49 2025 +0100 dt-bindings: display: Add powertip,{st7272|hx8238a} as DT Schema description This patch provides the DT Schema description of: - powertip,st7272 320 x 240 LCD display - powertip,hx8238a 320 x 240 LCD display Used with the different HW revisions of btt3 devices. Signed-off-by: Lukasz Majewski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20250109154149.1212631-1-lukma@denx.de Signed-off-by: Rob Herring (Arm) .../bindings/display/panel/powertip,hx8238a.yaml | 29 ++++++++++++++++++++++ .../bindings/display/panel/powertip,st7272.yaml | 29 ++++++++++++++++++++++ 2 files changed, 58 insertions(+) commit 55db9b73c3a77544efc671d5e796d9674772c330 Author: Dhananjay Ugwekar Date: Wed Feb 5 11:25:13 2025 +0000 cpufreq/amd-pstate: Fix max_perf updation with schedutil In adjust_perf() callback, we are setting the max_perf to highest_perf, as opposed to the correct limit value i.e. max_limit_perf. Fix that. Fixes: 3f7b835fa4d0 ("cpufreq/amd-pstate: Move limit updating code") Signed-off-by: Dhananjay Ugwekar Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20250205112523.201101-3-dhananjay.ugwekar@amd.com Signed-off-by: Mario Limonciello drivers/cpufreq/amd-pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d364eee14c682b141f4667efc3c65191339d88bd Author: Dhananjay Ugwekar Date: Wed Feb 5 11:25:12 2025 +0000 cpufreq/amd-pstate: Remove the goto label in amd_pstate_update_limits Scope based guard/cleanup macros should not be used together with goto labels. Hence, remove the goto label. Fixes: 6c093d5a5b73 ("cpufreq/amd-pstate: convert mutex use to guard()") Signed-off-by: Dhananjay Ugwekar Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20250205112523.201101-2-dhananjay.ugwekar@amd.com Signed-off-by: Mario Limonciello drivers/cpufreq/amd-pstate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit aaf5eefd374b6e006e1c224a2b37bac9d3737aa2 Author: Juergen Gross Date: Wed Feb 5 11:24:47 2025 +0100 x86/xen: remove unneeded dummy push from xen_hypercall_hvm() Stack alignment of the kernel in 64-bit mode is 8, not 16, so the dummy push in xen_hypercall_hvm() for aligning the stack to 16 bytes can be removed. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Reviewed-by: Andrew Cooper Signed-off-by: Juergen Gross arch/x86/xen/xen-head.S | 6 ------ 1 file changed, 6 deletions(-) commit 0bd797b801bd8ee06c822844e20d73aaea0878dd Author: Juergen Gross Date: Wed Feb 5 10:07:56 2025 +0100 x86/xen: add FRAME_END to xen_hypercall_hvm() xen_hypercall_hvm() is missing a FRAME_END at the end, add it. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202502030848.HTNTTuo9-lkp@intel.com/ Fixes: b4845bb63838 ("x86/xen: add central hypercall functions") Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Reviewed-by: Andrew Cooper Signed-off-by: Juergen Gross arch/x86/xen/xen-head.S | 1 + 1 file changed, 1 insertion(+) commit 98a5cfd2320966f40fe049a9855f8787f0126825 Author: Juergen Gross Date: Wed Feb 5 09:43:31 2025 +0100 x86/xen: fix xen_hypercall_hvm() to not clobber %rbx xen_hypercall_hvm(), which is used when running as a Xen PVH guest at most only once during early boot, is clobbering %rbx. Depending on whether the caller relies on %rbx to be preserved across the call or not, this clobbering might result in an early crash of the system. This can be avoided by using an already saved register instead of %rbx. Fixes: b4845bb63838 ("x86/xen: add central hypercall functions") Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Reviewed-by: Andrew Cooper Signed-off-by: Juergen Gross arch/x86/xen/xen-head.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 92514ef226f511f2ca1fb1b8752966097518edc0 Merge: 5c8c229261f1 fdef89ce6fad Author: Linus Torvalds Date: Wed Feb 5 08:13:07 2025 -0800 Merge tag 'for-6.14-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - add lockdep annotation for relocation root to fix a splat warning while merging roots - fix assertion failure when splitting ordered extent after transaction abort - don't print 'qgroup inconsistent' message when rescan process updates qgroup data sooner than the subvolume deletion process - fix use-after-free (accessing the error number) when attempting to join an aborted transaction - avoid starting new transaction if not necessary when cleaning qgroup during subvolume drop * tag 'for-6.14-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: avoid starting new transaction when cleaning qgroup during subvolume drop btrfs: fix use-after-free when attempting to join an aborted transaction btrfs: do not output error message if a qgroup has been already cleaned up btrfs: fix assertion failure when splitting ordered extent after transaction abort btrfs: fix lockdep splat while merging a relocation root commit 4c56eb33e603c3b9eb4bd24efbfdd0283c1c37e4 Author: Masahiro Yamada Date: Sun Feb 2 03:51:41 2025 +0900 kbuild: keep symbols for symbol_get() even with CONFIG_TRIM_UNUSED_KSYMS Linus observed that the symbol_request(utf8_data_table) call fails when CONFIG_UNICODE=y and CONFIG_TRIM_UNUSED_KSYMS=y. symbol_get() relies on the symbol data being present in the ksymtab for symbol lookups. However, EXPORT_SYMBOL_GPL(utf8_data_table) is dropped due to CONFIG_TRIM_UNUSED_KSYMS, as no module references it in this case. Probably, this has been broken since commit dbacb0ef670d ("kconfig option for TRIM_UNUSED_KSYMS"). This commit addresses the issue by leveraging modpost. Symbol names passed to symbol_get() are recorded in the special .no_trim_symbol section, which is then parsed by modpost to forcibly keep such symbols. The .no_trim_symbol section is discarded by the linker scripts, so there is no impact on the size of the final vmlinux or modules. This commit cannot resolve the issue for direct calls to __symbol_get() because the symbol name is not known at compile-time. Although symbol_get() may eventually be deprecated, this workaround should be good enough meanwhile. Reported-by: Linus Torvalds Suggested-by: Linus Torvalds Signed-off-by: Masahiro Yamada include/asm-generic/vmlinux.lds.h | 1 + include/linux/module.h | 5 ++++- scripts/mod/modpost.c | 35 +++++++++++++++++++++++++++++++++++ scripts/mod/modpost.h | 6 ++++++ scripts/module.lds.S | 1 + 5 files changed, 47 insertions(+), 1 deletion(-) commit 738fc998b639407346a9e026514f0562301462cd Author: Nathan Chancellor Date: Fri Jan 31 15:55:28 2025 -0700 scripts/Makefile.extrawarn: Do not show clang's non-kprintf warnings at W=1 Clang's -Wformat-overflow and -Wformat-truncation have chosen to check '%p' unlike GCC but it does not know about the kernel's pointer extensions in lib/vsprintf.c, so the developers split that part of the warning out for the kernel to disable because there will always be false positives. Commit 908dd508276d ("kbuild: enable -Wformat-truncation on clang") did disabled these warnings but only in a block that would be called when W=1 was not passed, so they would appear with W=1. Move the disabling of the non-kprintf warnings to a block that always runs so that they are never seen, regardless of warning level. Fixes: 908dd508276d ("kbuild: enable -Wformat-truncation on clang") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501291646.VtwF98qd-lkp@intel.com/ Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada scripts/Makefile.extrawarn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 46c7b901e2a03536df5a3cb40b3b26e2be505df6 Author: Peter Ujfalusi Date: Wed Feb 5 15:52:32 2025 +0200 ASoC: SOF: pcm: Clear the susbstream pointer to NULL on close The spcm->stream[substream->stream].substream is set during open and was left untouched. After the first PCM stream it will never be NULL and we have code which checks for substream NULLity as indication if the stream is active or not. For the compressed cstream pointer the same has been done, this change will correct the handling of PCM streams. Fixes: 090349a9feba ("ASoC: SOF: Add support for compress API for stream data/offset") Cc: stable@vger.kernel.org Reported-by: Curtis Malainey Closes: https://github.com/thesofproject/linux/pull/5214 Signed-off-by: Peter Ujfalusi Reviewed-by: Daniel Baluta Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Curtis Malainey Link: https://patch.msgid.link/20250205135232.19762-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/pcm.c | 2 ++ 1 file changed, 2 insertions(+) commit d8d99c3b5c485f339864aeaa29f76269cc0ea975 Author: Peter Ujfalusi Date: Wed Feb 5 15:52:31 2025 +0200 ASoC: SOF: stream-ipc: Check for cstream nullity in sof_ipc_msg_data() The nullity of sps->cstream should be checked similarly as it is done in sof_set_stream_data_offset() function. Assuming that it is not NULL if sps->stream is NULL is incorrect and can lead to NULL pointer dereference. Fixes: 090349a9feba ("ASoC: SOF: Add support for compress API for stream data/offset") Cc: stable@vger.kernel.org Reported-by: Curtis Malainey Closes: https://github.com/thesofproject/linux/pull/5214 Signed-off-by: Peter Ujfalusi Reviewed-by: Daniel Baluta Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Curtis Malainey Link: https://patch.msgid.link/20250205135232.19762-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/stream-ipc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 59ff2040f0a58923c787fdba5999100667338230 Author: Mika Westerberg Date: Tue Feb 4 13:45:15 2025 +0200 MAINTAINERS: Use my kernel.org address for ACPI GPIO work Switch to use my kernel.org address for ACPI GPIO work. Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20250204114515.3971923-1-mika.westerberg@linux.intel.com Signed-off-by: Bartosz Golaszewski MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5393f40a640b8c4f716bf87e7b0d4328bf1f22b2 Author: Geert Uytterhoeven Date: Wed Feb 5 14:05:03 2025 +0100 gpio: GPIO_GRGPIO should depend on OF While the Aeroflex Gaisler GRGPIO driver has no build-time dependency on gpiolib-of, it supports only DT-based configuration, and is used only on DT systems. Hence add a dependency on OF, to prevent asking the user about this driver when configuring a kernel without DT support. Fixes: bc40668def384256 ("gpio: grgpio: drop Kconfig dependency on OF_GPIO") Signed-off-by: Geert Uytterhoeven Reviewed-by: Andreas Larsson Link: https://lore.kernel.org/r/db6da3d11bf850d89f199e5c740d8f133e38078d.1738760539.git.geert+renesas@glider.be Signed-off-by: Bartosz Golaszewski drivers/gpio/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 015b7dae084fa95465ff89f6cbf15fe49906a370 Author: Bartosz Golaszewski Date: Mon Feb 3 12:01:23 2025 +0100 gpio: sim: lock hog configfs items if present Depending on the user config, the leaf entry may be the hog directory, not line. Check it and lock the correct item. Fixes: 8bd76b3d3f3a ("gpio: sim: lock up configfs that an instantiated device depends on") Tested-by: Koichiro Den Link: https://lore.kernel.org/r/20250203110123.87701-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-sim.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 3bfa08fe9ec8dd79e183c88e1275be74191e7bc8 Author: Wolfram Sang Date: Wed Feb 5 14:22:12 2025 +0100 Revert "i2c: Replace list-based mechanism for handling auto-detected clients" This reverts commit 56a50667cbcfaf95eea9128d5676af94e54b51a8. Mux handling is not sufficiently implemented. It needs more time. Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 52 +++++++++++++++++++++++++++++++-------------- include/linux/i2c.h | 3 ++- 2 files changed, 38 insertions(+), 17 deletions(-) commit c4d3dfd8ccaef2cbd374860e307f1e056854a472 Author: Wolfram Sang Date: Wed Feb 5 14:21:36 2025 +0100 Revert "i2c: Replace list-based mechanism for handling userspace-created clients" This reverts commit 3cfe39b3a845593a485ab1c716615979004ef9f6. Mux handling is not sufficiently implemented. It needs more time. Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 61 +++++++++++++++++++++++++++++---------------- include/linux/i2c.h | 7 +++++- 2 files changed, 45 insertions(+), 23 deletions(-) commit 89f9cf185885d4358aa92b48e51d0f09b71775aa Author: Kuninori Morimoto Date: Wed Feb 5 00:20:48 2025 +0000 ASoC: rsnd: adjust convert rate limitation Current rsnd driver supports Synchronous SRC Mode, but HW allow to update rate only within 1% from current rate. Adjust to it. Becially, this feature is used to fine-tune subtle difference that occur during sampling rate conversion in SRC. So, it should be called within 1% margin of rate difference. If there was difference over 1%, it will apply with 1% increments by using loop without indicating error message. Cc: Yoshihiro Shimoda Signed-off-by: Kuninori Morimoto Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://patch.msgid.link/871pwd2qe8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/renesas/rcar/src.c | 98 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 76 insertions(+), 22 deletions(-) commit c3fc002b206c6c83d1e3702b979733002ba6fb2c Author: Kuninori Morimoto Date: Wed Feb 5 00:20:42 2025 +0000 ASoC: rsnd: don't indicate warning on rsnd_kctrl_accept_runtime() rsnd_kctrl_accept_runtime() (1) is used for runtime convert rate (= Synchronous SRC Mode). Now, rsnd driver has 2 kctrls for it (A): "SRC Out Rate Switch" (B): "SRC Out Rate" // it calls (1) (A): can be called anytime (B): can be called only runtime, and will indicate warning if it was used at non-runtime. To use runtime convert rate (= Synchronous SRC Mode), user might uses command in below order. (X): > amixer set "SRC Out Rate" on > aplay xxx.wav & (Y): > amixer set "SRC Out Rate" 48010 // convert rate to 48010Hz (Y): calls B (X): calls both A and B. In this case, when user calls (X), it calls both (A) and (B), but it is not yet start running. So, (B) will indicate warning. This warning was added by commit b5c088689847 ("ASoC: rsnd: add warning message to rsnd_kctrl_accept_runtime()"), but the message sounds like the operation was not correct. Let's update warning message. The message is very SRC specific, implement it in src.c Signed-off-by: Kuninori Morimoto Reviewed-by: Yoshihiro Shimoda Link: https://patch.msgid.link/8734gt2qed.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/renesas/rcar/core.c | 14 -------------- sound/soc/renesas/rcar/rsnd.h | 1 - sound/soc/renesas/rcar/src.c | 18 +++++++++++++++++- 3 files changed, 17 insertions(+), 16 deletions(-) commit 796106e29e5df6cd4b4e2b51262a8a19e9fa0625 Author: Kuninori Morimoto Date: Wed Feb 5 00:20:36 2025 +0000 ASoC: rsnd: indicate unsupported clock rate It will indicate "unsupported clock rate" when setup clock failed. But it is unclear what kind of rate was failed. Indicate it. Signed-off-by: Kuninori Morimoto Reviewed-by: Yoshihiro Shimoda Link: https://patch.msgid.link/874j192qej.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/renesas/rcar/ssi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b0eddc21900fb44f8c5db95710479865e3700fbd Author: Varadarajan Narayanan Date: Wed Feb 5 13:16:56 2025 +0530 regulator: qcom_smd: Add l2, l5 sub-node to mp5496 regulator Adding l2, l5 sub-node entry to mp5496 regulator node. Cc: stable@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Varadarajan Narayanan Link: https://patch.msgid.link/20250205074657.4142365-2-quic_varada@quicinc.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76b0a22d4cf7dc9091129560fdc04e73eb9db4cb Author: Edson Juliano Drosdeck Date: Sat Feb 1 11:39:30 2025 -0300 ALSA: hda/realtek: Limit mic boost on Positivo ARN50 The internal mic boost on the Positivo ARN50 is too high. Fix this by applying the ALC269_FIXUP_LIMIT_INT_MIC_BOOST fixup to the machine to limit the gain. Signed-off-by: Edson Juliano Drosdeck Link: https://patch.msgid.link/20250201143930.25089-1-edson.drosdeck@gmail.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 32ffed055dcee17f6705f545b069e44a66067808 Author: Jiasheng Jiang Date: Wed Feb 5 00:43:43 2025 +0000 regmap-irq: Add missing kfree() Add kfree() for "d->main_status_buf" to the error-handling path to prevent a memory leak. Fixes: a2d21848d921 ("regmap: regmap-irq: Add main status register support") Cc: stable@vger.kernel.org # v5.1+ Signed-off-by: Jiasheng Jiang Link: https://patch.msgid.link/20250205004343.14413-1-jiashengjiangcool@gmail.com Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 2 ++ 1 file changed, 2 insertions(+) commit dabbd325b25edb5cdd99c94391817202dd54b651 Author: Kuninori Morimoto Date: Tue Feb 4 23:50:08 2025 +0000 ASoC: simple-card-utils.c: add missing dlc->of_node commit 90de551c1bf ("ASoC: simple-card-utils.c: enable multi Component support") added muiti Component support, but was missing to add dlc->of_node. Because of it, Sound device list will indicates strange name if it was DPCM connection and driver supports dai->driver->dai_args, like below > aplay -l card X: sndulcbmix [xxxx], device 0: fe.(null).rsnd-dai.0 (*) [] ... ^^^^^^ It will be fixed by this patch > aplay -l card X: sndulcbmix [xxxx], device 0: fe.sound@ec500000.rsnd-dai.0 (*) [] ... ^^^^^^^^^^^^^^ Signed-off-by: Kuninori Morimoto Reviewed-by: Daniel Baluta Link: https://patch.msgid.link/87ikpp2rtb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/generic/simple-card-utils.c | 1 + 1 file changed, 1 insertion(+) commit 57a0ef02fefafc4b9603e33a18b669ba5ce59ba3 Author: Roberto Sassu Date: Tue Feb 4 13:57:20 2025 +0100 ima: Reset IMA_NONACTION_RULE_FLAGS after post_setattr Commit 0d73a55208e9 ("ima: re-introduce own integrity cache lock") mistakenly reverted the performance improvement introduced in commit 42a4c603198f0 ("ima: fix ima_inode_post_setattr"). The unused bit mask was subsequently removed by commit 11c60f23ed13 ("integrity: Remove unused macro IMA_ACTION_RULE_FLAGS"). Restore the performance improvement by introducing the new mask IMA_NONACTION_RULE_FLAGS, equal to IMA_NONACTION_FLAGS without IMA_NEW_FILE, which is not a rule-specific flag. Finally, reset IMA_NONACTION_RULE_FLAGS instead of IMA_NONACTION_FLAGS in process_measurement(), if the IMA_CHANGE_ATTR atomic flag is set (after file metadata modification). With this patch, new files for which metadata were modified while they are still open, can be reopened before the last file close (when security.ima is written), since the IMA_NEW_FILE flag is not cleared anymore. Otherwise, appraisal fails because security.ima is missing (files with IMA_NEW_FILE set are an exception). Cc: stable@vger.kernel.org # v4.16.x Fixes: 0d73a55208e9 ("ima: re-introduce own integrity cache lock") Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar security/integrity/ima/ima.h | 3 +++ security/integrity/ima/ima_main.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit ceb5faef848b2fbb5d1e99617093cc9d4deb2b30 Author: Tanya Agarwal Date: Fri Jan 24 01:07:44 2025 +0530 integrity: fix typos and spelling errors Fix typos and spelling errors in integrity module comments that were identified using the codespell tool. No functional changes - documentation only. Signed-off-by: Tanya Agarwal Reviewed-by: Mimi Zohar Signed-off-by: Mimi Zohar security/integrity/evm/evm_crypto.c | 2 +- security/integrity/evm/evm_main.c | 2 +- security/integrity/ima/ima_main.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) commit 98fcb50a98424efb9176d075c71e5af48b6104dd Merge: 6b24e67b4056 20efccc53abf Author: Mark Brown Date: Tue Feb 4 22:54:23 2025 +0000 ASoC: Intel: soc-acpi-intel-tgl/mtl-match: declare adr Merge series from Bard Liao : The adr is u64. commit f245b400a223a71d6d5f4c72a2cb9b573a7fc2b6 Author: Tom Chung Date: Tue Feb 4 15:07:44 2025 +0800 Revert "drm/amd/display: Use HW lock mgr for PSR1" This reverts commit a2b5a9956269 ("drm/amd/display: Use HW lock mgr for PSR1") Because it may cause system hang while connect with two edp panel. Acked-by: Wayne Lin Signed-off-by: Tom Chung Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 820ccf8cb2b145ab9fc12651f7f80339614fa46c Author: Nathan Chancellor Date: Fri Jan 31 15:31:19 2025 -0700 drm/amd/display: Respect user's CONFIG_FRAME_WARN more for dml files Currently, there are several files in drm/amd/display that aim to have a higher -Wframe-larger-than value to avoid instances of that warning with a lower value from the user's configuration. However, with the way that it is currently implemented, it does not respect the user's request via CONFIG_FRAME_WARN for a higher stack frame limit, which can cause pain when new instances of the warning appear and break the build due to CONFIG_WERROR. Adjust the logic to switch from a hard coded -Wframe-larger-than value to only using the value as a minimum clamp and deferring to the requested value from CONFIG_FRAME_WARN if it is higher. Suggested-by: Harry Wentland Reported-by: Greg Kroah-Hartman Closes: https://lore.kernel.org/2025013003-audience-opposing-7f95@gregkh/ Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/Makefile | 14 +++++++++----- drivers/gpu/drm/amd/display/dc/dml2/Makefile | 22 +++++++++++++--------- 2 files changed, 22 insertions(+), 14 deletions(-) commit a1300691aed9ee852b0a9192e29e2bdc2411a7e6 Author: Eric Dumazet Date: Mon Feb 3 17:08:38 2025 +0000 net: rose: lock the socket in rose_bind() syzbot reported a soft lockup in rose_loopback_timer(), with a repro calling bind() from multiple threads. rose_bind() must lock the socket to avoid this issue. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+7ff41b5215f0c534534e@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/67a0f78d.050a0220.d7c5a.00a0.GAE@google.com/T/#u Signed-off-by: Eric Dumazet Acked-by: Paolo Abeni Link: https://patch.msgid.link/20250203170838.3521361-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/rose/af_rose.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 028676bb189ed6d1b550a0fc570a9d695b6acfd3 Author: Jacob Moroni Date: Mon Feb 3 09:36:05 2025 -0500 net: atlantic: fix warning during hot unplug Firmware deinitialization performs MMIO accesses which are not necessary if the device has already been removed. In some cases, these accesses happen via readx_poll_timeout_atomic which ends up timing out, resulting in a warning at hw_atl2_utils_fw.c:112: [ 104.595913] Call Trace: [ 104.595915] [ 104.595918] ? show_regs+0x6c/0x80 [ 104.595923] ? __warn+0x8d/0x150 [ 104.595925] ? aq_a2_fw_deinit+0xcf/0xe0 [atlantic] [ 104.595934] ? report_bug+0x182/0x1b0 [ 104.595938] ? handle_bug+0x6e/0xb0 [ 104.595940] ? exc_invalid_op+0x18/0x80 [ 104.595942] ? asm_exc_invalid_op+0x1b/0x20 [ 104.595944] ? aq_a2_fw_deinit+0xcf/0xe0 [atlantic] [ 104.595952] ? aq_a2_fw_deinit+0xcf/0xe0 [atlantic] [ 104.595959] aq_nic_deinit.part.0+0xbd/0xf0 [atlantic] [ 104.595964] aq_nic_deinit+0x17/0x30 [atlantic] [ 104.595970] aq_ndev_close+0x2b/0x40 [atlantic] [ 104.595975] __dev_close_many+0xad/0x160 [ 104.595978] dev_close_many+0x99/0x170 [ 104.595979] unregister_netdevice_many_notify+0x18b/0xb20 [ 104.595981] ? __call_rcu_common+0xcd/0x700 [ 104.595984] unregister_netdevice_queue+0xc6/0x110 [ 104.595986] unregister_netdev+0x1c/0x30 [ 104.595988] aq_pci_remove+0xb1/0xc0 [atlantic] Fix this by skipping firmware deinitialization altogether if the PCI device is no longer present. Tested with an AQC113 attached via Thunderbolt by performing repeated unplug cycles while traffic was running via iperf. Fixes: 97bde5c4f909 ("net: ethernet: aquantia: Support for NIC-specific code") Signed-off-by: Jacob Moroni Reviewed-by: Igor Russkikh Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250203143604.24930-3-mail@jakemoroni.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d6179f6c6204f9932aed3a7a2100b4a295dfed9d Author: Mark Tomlinson Date: Thu Jun 6 15:31:02 2024 +1200 gpio: pca953x: Improve interrupt support The GPIO drivers with latch interrupt support (typically types starting with PCAL) have interrupt status registers to determine which particular inputs have caused an interrupt. Unfortunately there is no atomic operation to read these registers and clear the interrupt. Clearing the interrupt is done by reading the input registers. The code was reading the interrupt status registers, and then reading the input registers. If an input changed between these two events it was lost. The solution in this patch is to revert to the non-latch version of code, i.e. remembering the previous input status, and looking for the changes. This system results in no more I2C transfers, so is no slower. The latch property of the device still means interrupts will still be noticed if the input changes back to its initial state. Fixes: 44896beae605 ("gpio: pca953x: add PCAL9535 interrupt support for Galileo Gen2") Signed-off-by: Mark Tomlinson Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606033102.2271916-1-mark.tomlinson@alliedtelesis.co.nz Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-pca953x.c | 19 ------------------- 1 file changed, 19 deletions(-) commit fd079124112c6e11c1bca2e7c71470a2d60bc363 Author: Bharadwaj Raju Date: Wed Feb 5 00:59:53 2025 +0530 selftests/cgroup: use bash in test_cpuset_v1_hp.sh The script uses non-POSIX features like `[[` for conditionals and hence does not work when run with a POSIX /bin/sh. Change the shebang to /bin/bash instead, like the other tests in cgroup. Signed-off-by: Bharadwaj Raju Signed-off-by: Tejun Heo tools/testing/selftests/cgroup/test_cpuset_v1_hp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aff2355d260e47e780cd96af127beaab18a664b1 Author: Mark Lord Date: Tue Feb 4 19:45:06 2025 +0200 spi: pxa2xx: Fix regression when toggling chip select on LPSS devices The commit 78b435c9044a ("spi: pxa2xx: Introduce __lpss_ssp_update_priv() helper") broke speaker output on my ASUS UX5304MA laptop. The problem is in inverted value that got written in the private register. Simple bug, simple fix. Fixes: 78b435c9044a ("spi: pxa2xx: Introduce __lpss_ssp_update_priv() helper") Signed-off-by: Mark Lord Tested-by: Mark Lord Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20250204174506.149978-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecee4d0695067ae04959b121028b42a588e75370 Author: Mario Limonciello Date: Tue Feb 4 11:40:25 2025 -0600 accel/amdxdna: Add MODULE_FIRMWARE() declarations Initramfs building tools such as dracut will look for a MODULE_FIRMWARE() declaration to determine which firmware to include in the initramfs when a driver is included in the initramfs. As amdxdna doesn't declare any firmware this causes the driver to fail to load with -ENOENT when in the initramfs. Add the missing declaration for possible firmware. Reported-by: Renjith Pananchikkal Suggested-by: Alexander Deucher Fixes: 8c9ff1b181ba ("accel/amdxdna: Add a new driver for AMD AI Engine") Reviewed-by: Lizhi Hou Link: https://lore.kernel.org/r/20250204174031.3425762-1-superm1@kernel.org Signed-off-by: Mario Limonciello Link: https://patchwork.freedesktop.org/patch/msgid/20250204174031.3425762-1-superm1@kernel.org drivers/accel/amdxdna/amdxdna_pci_drv.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5c8c229261f14159b54b9a32f12e5fa89d88b905 Merge: d009de7d5428 1b0332a42656 Author: Linus Torvalds Date: Tue Feb 4 11:01:48 2025 -0800 Merge tag 'kthreads-fixes-2025-02-04' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks Pull kthreads fix from Frederic Weisbecker: - Properly handle return value when allocation fails for the preferred affinity * tag 'kthreads-fixes-2025-02-04' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks: kthread: Fix return value on kzalloc() failure in kthread_affine_preferred() commit d009de7d54281f5c23d7d82ec5e6e2d54609791a Merge: f5a2601378af 28aecef5b101 Author: Linus Torvalds Date: Tue Feb 4 09:52:01 2025 -0800 Merge tag 'livepatching-for-6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching fix from Petr Mladek: - Fix livepatching selftests for util-linux-2.40.x * tag 'livepatching-for-6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: selftests: livepatch: handle PRINTK_CALLER in check_result() commit f5a2601378af1ea1e2a51d613e49e629159dc956 Merge: 0de63bb7d919 a787ab73e2e4 Author: Linus Torvalds Date: Tue Feb 4 09:50:02 2025 -0800 Merge tag 'platform-drivers-x86-v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Ilpo Järvinen: - ideapad-laptop: Pass a correct pointer to the driver data - intel/ifs: Provide a link to the IFS test images - intel/pmc: Use large enough type when decoding LTR value * tag 'platform-drivers-x86-v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86/intel/ifs: Update documentation with image download path platform/x86/intel: pmc: fix ltr decode in pmc_core_ltr_show() platform/x86: ideapad-laptop: pass a correct pointer to the driver data commit 230b19bc2bcc5897d0e20b4ce7e9790a469a2db0 Author: Jani Nikula Date: Fri Jan 31 14:49:54 2025 +0200 drm/i915/dp: Iterate DSC BPP from high to low on all platforms Commit 1c56e9a39833 ("drm/i915/dp: Get optimal link config to have best compressed bpp") tries to find the best compressed bpp for the link. However, it iterates from max to min bpp on display 13+, and from min to max on other platforms. This presumably leads to minimum compressed bpp always being chosen on display 11-12. Iterate from high to low on all platforms to actually use the best possible compressed bpp. Fixes: 1c56e9a39833 ("drm/i915/dp: Get optimal link config to have best compressed bpp") Cc: Ankit Nautiyal Cc: Imre Deak Cc: # v6.7+ Reviewed-by: Imre Deak Reviewed-by: Ankit Nautiyal Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/3bba67923cbcd13a59d26ef5fa4bb042b13c8a9b.1738327620.git.jani.nikula@intel.com (cherry picked from commit 56b0337d429356c3b9ecc36a03023c8cc856b196) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_dp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2a03d2da55b4cd5c86b360db0e917ee93b3f0cb9 Author: Dmitry Baryshkov Date: Thu Jan 9 06:35:49 2025 +0200 dt-bindings: nvmem: qcom,qfprom: Add SAR2130P compatible Document compatible for the QFPROM on SAR2130P platform. Signed-off-by: Dmitry Baryshkov Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250109-sar2130p-nvmem-v4-5-633739fe5f11@linaro.org Signed-off-by: Rob Herring (Arm) Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + 1 file changed, 1 insertion(+) commit 43fb96ae78551d7bfa4ecca956b258f085d67c40 Author: Sean Christopherson Date: Fri Jan 24 15:46:23 2025 -0800 KVM: x86/mmu: Ensure NX huge page recovery thread is alive before waking When waking a VM's NX huge page recovery thread, ensure the thread is actually alive before trying to wake it. Now that the thread is spawned on-demand during KVM_RUN, a VM without a recovery thread is reachable via the related module params. BUG: kernel NULL pointer dereference, address: 0000000000000040 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:vhost_task_wake+0x5/0x10 Call Trace: set_nx_huge_pages+0xcc/0x1e0 [kvm] param_attr_store+0x8a/0xd0 module_attr_store+0x1a/0x30 kernfs_fop_write_iter+0x12f/0x1e0 vfs_write+0x233/0x3e0 ksys_write+0x60/0xd0 do_syscall_64+0x5b/0x160 entry_SYSCALL_64_after_hwframe+0x4b/0x53 RIP: 0033:0x7f3b52710104 Modules linked in: kvm_intel kvm CR2: 0000000000000040 Fixes: 931656b9e2ff ("kvm: defer huge page recovery vhost task to later") Cc: stable@vger.kernel.org Cc: Keith Busch Signed-off-by: Sean Christopherson Message-ID: <20250124234623.3609069-1-seanjc@google.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) commit 6f61269495260531e15d84d090ee63618110c470 Author: Paolo Bonzini Date: Fri Jan 24 10:26:22 2025 -0500 KVM: remove kvm_arch_post_init_vm The only statement in a kvm_arch_post_init_vm implementation can be moved into the x86 kvm_arch_init_vm. Do so and remove all traces from architecture-independent code. Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 7 +------ include/linux/kvm_host.h | 1 - virt/kvm/kvm_main.c | 15 --------------- 3 files changed, 1 insertion(+), 22 deletions(-) commit 6b24e67b4056ba83b1e95e005b7e50fdb1cc6cf4 Author: John Keeping Date: Tue Feb 4 16:13:10 2025 +0000 ASoC: rockchip: i2s-tdm: fix shift config for SND_SOC_DAIFMT_DSP_[AB] Commit 2f45a4e289779 ("ASoC: rockchip: i2s_tdm: Fixup config for SND_SOC_DAIFMT_DSP_A/B") applied a partial change to fix the configuration for DSP A and DSP B formats. The shift control also needs updating to set the correct offset for frame data compared to LRCK. Set the correct values. Fixes: 081068fd64140 ("ASoC: rockchip: add support for i2s-tdm controller") Signed-off-by: John Keeping Link: https://patch.msgid.link/20250204161311.2117240-1-jkeeping@inmusicbrands.com Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s_tdm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 20efccc53abf99fa52ea30a43dec758f6b6b9940 Author: Bard Liao Date: Tue Feb 4 11:31:34 2025 +0800 ASoC: Intel: soc-acpi-intel-mtl-match: declare adr as ull The adr is u64. Signed-off-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://patch.msgid.link/20250204033134.92332-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-mtl-match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3588b76db7ba798f54dee39a55708b16e1c61de4 Author: Bard Liao Date: Tue Feb 4 11:31:33 2025 +0800 ASoC: Intel: soc-acpi-intel-tgl-match: declare adr as ull The adr is u64. Signed-off-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://patch.msgid.link/20250204033134.92332-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-tgl-match.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d8989106287d3735c7e7fc6acb3811d62ebb666c Author: Uday M Bhat Date: Tue Feb 4 13:39:43 2025 +0800 ASoC: Intel: sof_sdw: Add support for Fatcat board with BT offload enabled in PTL platform This change adds an entry for fatcat boards in soundwire quirk table and also, enables BT offload for PTL RVP. Signed-off-by: Uday M Bhat Signed-off-by: Jairaj Arava Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://patch.msgid.link/20250204053943.93596-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0843449708085c4fb45a3c325c2fbced556f6abf Author: Richard Fitzgerald Date: Tue Feb 4 13:39:42 2025 +0800 ASoC: Intel: sof_sdw: Add quirk for Asus Zenbook S14 Asus laptops with sound PCI subsystem ID 1043:1e13 have the DMICs connected to the host instead of the CS42L43 so need the SOC_SDW_CODEC_MIC quirk. Signed-off-by: Richard Fitzgerald Reviewed-by: Liam Girdwood Signed-off-by: Bard Liao Link: https://patch.msgid.link/20250204053943.93596-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 1 + 1 file changed, 1 insertion(+) commit fc016ef7da64fd473d73ee6c261ba1b0b47afe2b Author: Richard Fitzgerald Date: Tue Feb 4 13:39:41 2025 +0800 ASoC: Intel: sof_sdw: Add lookup of quirk using PCI subsystem ID Add lookup of PCI subsystem vendor:device ID to find a quirk. The subsystem ID (SSID) is part of the PCI specification to uniquely identify a particular system-specific implementation of a hardware device. Unlike DMI information, it identifies the sound hardware itself, rather than a specific model of PC. SSID can be more reliable and stable than DMI strings, and is preferred by some vendors as the way to identify the actual sound hardware. Signed-off-by: Richard Fitzgerald Reviewed-by: Liam Girdwood Signed-off-by: Bard Liao Link: https://patch.msgid.link/20250204053943.93596-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit 203a53029a9c6935ad38e0343d048e51488797cf Author: Colin Ian King Date: Tue Feb 4 10:56:47 2025 +0000 KVM: selftests: Fix spelling mistake "initally" -> "initially" There is a spelling mistake in a literal string and in the function test_get_inital_dirty. Fix them. Signed-off-by: Colin Ian King Message-ID: <20250204105647.367743-1-colin.i.king@gmail.com> Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/s390/cmma_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5e21d0c5b95c6351936bb1400a354af09cb74ace Merge: 35441cdd5092 0e4598102855 Author: Paolo Bonzini Date: Tue Feb 4 11:14:53 2025 -0500 Merge tag 'kvmarm-fixes-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.14, take #1 - Correctly clean the BSS to the PoC before allowing EL2 to access it on nVHE/hVHE/protected configurations - Propagate ownership of debug registers in protected mode after the rework that landed in 6.14-rc1 - Stop pretending that we can run the protected mode without a GICv3 being present on the host - Fix a use-after-free situation that can occur if a vcpu fails to initialise the NV shadow S2 MMU contexts - Always evaluate the need to arm a background timer for fully emulated guest timers - Fix the emulation of EL1 timers in the absence of FEAT_ECV - Correctly handle the EL2 virtual timer, specially when HCR_EL2.E2H==0 commit 35441cdd50920495cf93c267377a6964ef50388e Merge: ee3a66f431d6 32239066776a Author: Paolo Bonzini Date: Tue Feb 4 11:14:21 2025 -0500 Merge tag 'kvm-s390-next-6.14-2' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD - some selftest fixes - move some kvm-related functions from mm into kvm - remove all usage of page->index and page->lru from kvm - fixes and cleanups for vsie commit ee3a66f431d689b796b9cb48aefd3d223540381c Author: Paolo Bonzini Date: Tue Feb 4 11:13:24 2025 -0500 kvm: x86: SRSO_USER_KERNEL_NO is not synthesized SYNTHESIZED_F() generally is used together with setup_force_cpu_cap(), i.e. when it makes sense to present the feature even if cpuid does not have it *and* the VM is not able to see the difference. For example, it can be used when mitigations on the host automatically protect the guest as well. The "SYNTHESIZED_F(SRSO_USER_KERNEL_NO)" line came in as a conflict resolution between the CPUID overhaul from the KVM tree and support for the feature in the x86 tree. Using it right now does not hurt, or make a difference for that matter, because there is no setup_force_cpu_cap(X86_FEATURE_SRSO_USER_KERNEL_NO). However, it is a little less future proof in case such a setup_force_cpu_cap() appears later, for a case where the kernel somehow is not vulnerable but the guest would have to apply the mitigation. Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e459810285503fb354537e84049e212c5917c33 Author: Marc Zyngier Date: Tue Feb 4 11:00:50 2025 +0000 KVM: arm64: timer: Don't adjust the EL2 virtual timer offset The way we deal with the EL2 virtual timer is a bit odd. We try to cope with E2H being flipped, and adjust which offset applies to that timer depending on the current E2H value. But that's a complexity we shouldn't have to worry about. What we have to deal with is either E2H being RES1, in which case there is no offset, or E2H being RES0, and the virtual timer simply does not exist. Drop the adjusting of the timer offset, which makes things a bit simpler. At the same time, make sure that accessing the HV timer when E2H is RES0 results in an UNDEF in the guest. Suggested-by: Oliver Upton Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250204110050.150560-4-maz@kernel.org Signed-off-by: Marc Zyngier arch/arm64/kvm/arch_timer.c | 15 --------------- arch/arm64/kvm/sys_regs.c | 16 +++++++++++++--- 2 files changed, 13 insertions(+), 18 deletions(-) commit 1b8705ad5365b5333240b46d5cd24e88ef2ddb14 Author: Marc Zyngier Date: Tue Feb 4 11:00:49 2025 +0000 KVM: arm64: timer: Correctly handle EL1 timer emulation when !FEAT_ECV Both Wei-Lin Chang and Volodymyr Babchuk report that the way we handle the emulation of EL1 timers with NV is completely wrong, specially in the case of HCR_EL2.E2H==0. There are three problems in about as many lines of code: - With E2H==0, the EL1 timers are overwritten with the EL1 state, while they should actually contain the EL2 state (as per the timer map) - With E2H==1, we run the full EL1 timer emulation even when ECV is present, hiding a bug in timer_emulate() (see previous patch) - The comments are actively misleading, and say all the wrong things. This is only attributable to the code having been initially written for FEAT_NV, hacked up to handle FEAT_NV2 *in parallel*, and vaguely hacked again to be FEAT_NV2 only. Oh, and yours truly being a gold plated idiot. The fix is obvious: just delete most of the E2H==0 code, have a unified handling of the timers (because they really are E2H agnostic), and make sure we don't execute any of that when FEAT_ECV is present. Fixes: 4bad3068cfa9f ("KVM: arm64: nv: Sync nested timer state with FEAT_NV2") Reported-by: Wei-Lin Chang Reported-by: Volodymyr Babchuk Link: https://lore.kernel.org/r/fqiqfjzwpgbzdtouu2pwqlu7llhnf5lmy4hzv5vo6ph4v3vyls@jdcfy3fjjc5k Link: https://lore.kernel.org/r/87frl51tse.fsf@epam.com Tested-by: Dmytro Terletskyi Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250204110050.150560-3-maz@kernel.org Signed-off-by: Marc Zyngier arch/arm64/kvm/arch_timer.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) commit b450dcce93bc2cf6d2bfaf5a0de88a94ebad8f89 Author: Marc Zyngier Date: Tue Feb 4 11:00:48 2025 +0000 KVM: arm64: timer: Always evaluate the need for a soft timer When updating the interrupt state for an emulated timer, we return early and skip the setup of a soft timer that runs in parallel with the guest. While this is OK if we have set the interrupt pending, it is pretty wrong if the guest moved CVAL into the future. In that case, no timer is armed and the guest can wait for a very long time (it will take a full put/load cycle for the situation to resolve). This is specially visible with EDK2 running at EL2, but still using the EL1 virtual timer, which in that case is fully emulated. Any key-press takes ages to be captured, as there is no UART interrupt and EDK2 relies on polling from a timer... The fix is simply to drop the early return. If the timer interrupt is pending, we will still return early, and otherwise arm the soft timer. Fixes: 4d74ecfa6458b ("KVM: arm64: Don't arm a hrtimer for an already pending timer") Cc: stable@vger.kernel.org Tested-by: Dmytro Terletskyi Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20250204110050.150560-2-maz@kernel.org Signed-off-by: Marc Zyngier arch/arm64/kvm/arch_timer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5417a2e9b130a78bf48cb4cf92630efcee5ccf38 Author: Marc Zyngier Date: Tue Feb 4 14:55:54 2025 +0000 KVM: arm64: Fix nested S2 MMU structures reallocation For each vcpu that userspace creates, we allocate a number of s2_mmu structures that will eventually contain our shadow S2 page tables. Since this is a dynamically allocated array, we reallocate the array and initialise the newly allocated elements. Once everything is correctly initialised, we adjust pointer and size in the kvm structure, and move on. But should that initialisation fail *and* the reallocation triggered a copy to another location, we end-up returning early, with the kvm structure still containing the (now stale) old pointer. Weeee! Cure it by assigning the pointer early, and use this to perform the initialisation. If everything succeeds, we adjust the size. Otherwise, we just leave the size as it was, no harm done, and the new memory is as good as the ol' one (we hope...). Fixes: 4f128f8e1aaac ("KVM: arm64: nv: Support multiple nested Stage-2 mmu structures") Reported-by: Alexander Potapenko Tested-by: Alexander Potapenko Link: https://lore.kernel.org/r/20250204145554.774427-1-maz@kernel.org Signed-off-by: Marc Zyngier arch/arm64/kvm/nested.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4241a702e0d0c2ca9364cfac08dbf134264962de Author: David Howells Date: Mon Feb 3 11:03:04 2025 +0000 rxrpc: Fix the rxrpc_connection attend queue handling The rxrpc_connection attend queue is never used because conn::attend_link is never initialised and so is always NULL'd out and thus always appears to be busy. This requires the following fix: (1) Fix this the attend queue problem by initialising conn::attend_link. And, consequently, two further fixes for things masked by the above bug: (2) Fix rxrpc_input_conn_event() to handle being invoked with a NULL sk_buff pointer - something that can now happen with the above change. (3) Fix the RXRPC_SKB_MARK_SERVICE_CONN_SECURED message to carry a pointer to the connection and a ref on it. 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 Fixes: f2cce89a074e ("rxrpc: Implement a mechanism to send an event notification to a connection") Link: https://patch.msgid.link/20250203110307.7265-3-dhowells@redhat.com Signed-off-by: Paolo Abeni include/trace/events/rxrpc.h | 1 + net/rxrpc/conn_event.c | 17 ++++++++++------- net/rxrpc/conn_object.c | 1 + 3 files changed, 12 insertions(+), 7 deletions(-) commit 0f3fd9cf6491f5beecbb65abb41556c56135340c Author: Andy Shevchenko Date: Fri Jan 24 18:10:51 2025 +0200 serial: 8250_pnp: Remove unneeded ->iotype assignment If ->iobase is set the default will be UPIO_PORT for ->iotype after the uart_read_and_validate_port_properties() call. Hence no need to assign that explicitly. Otherwise it will be UPIO_MEM. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250124161530.398361-7-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pnp.c | 10 ---------- 1 file changed, 10 deletions(-) commit 34bbb5d5137f32be3186a995a5ad4c60aaad11a7 Author: Andy Shevchenko Date: Fri Jan 24 18:10:50 2025 +0200 serial: 8250_platform: Remove unneeded ->iotype assignment If ->iobase is set the default will be UPIO_PORT for ->iotype after the uart_read_and_validate_port_properties() call. Hence no need to assign that explicitly. Otherwise it will be UPIO_MEM. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250124161530.398361-6-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_platform.c | 9 --------- 1 file changed, 9 deletions(-) commit fe310f75327edbc042c7cc0df32c6b9ec29eb93a Author: Andy Shevchenko Date: Fri Jan 24 18:10:49 2025 +0200 serial: 8250_of: Remove unneeded ->iotype assignment If ->iobase is set the default will be UPIO_PORT for ->iotype after the uart_read_and_validate_port_properties() call. Hence no need to assign that explicitly. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250124161530.398361-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_of.c | 1 - 1 file changed, 1 deletion(-) commit 12397549b5014071e1d2b315509f68eb93ef9144 Author: Andy Shevchenko Date: Fri Jan 24 18:10:48 2025 +0200 serial: port: Make ->iotype validation global in __uart_read_properties() In order to make code robust against potential changes in the future move ->iotype validation outside of switch in __uart_read_properties(). If any code will be added in between that might leave the ->iotype value unknown the validation catches this up. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250124161530.398361-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_port.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit e8486bd50ecf63c9a1e25271f258a8d959f2672f Author: Andy Shevchenko Date: Fri Jan 24 18:10:47 2025 +0200 serial: port: Always update ->iotype in __uart_read_properties() The documentation of the __uart_read_properties() states that ->iotype member is always altered after the function call, but the code doesn't do that in the case when use_defaults == false and the value of reg-io-width is unsupported. Make sure the code follows the documentation. Note, the current users of the uart_read_and_validate_port_properties() will fail and the change doesn't affect their behaviour, neither users of uart_read_port_properties() will be affected since the alteration happens there even in the current code flow. Fixes: e894b6005dce ("serial: port: Introduce a common helper to read properties") Cc: stable Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250124161530.398361-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 166ac2bba167d575e7146beaa66093bc7c072f43 Author: Andy Shevchenko Date: Fri Jan 24 18:10:46 2025 +0200 serial: port: Assign ->iotype correctly when ->iobase is set Currently the ->iotype is always assigned to the UPIO_MEM when the respective property is not found. However, this will not support the cases when user wants to have UPIO_PORT to be set or preserved. Support this scenario by checking ->iobase value and default the ->iotype respectively. Fixes: 1117a6fdc7c1 ("serial: 8250_of: Switch to use uart_read_port_properties()") Fixes: e894b6005dce ("serial: port: Introduce a common helper to read properties") Cc: stable Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250124161530.398361-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_port.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e8ed246ded863eb862806c5591afdcf70012ab5e Author: Andre Werner Date: Tue Jan 21 08:18:19 2025 +0100 serial: sc16is7xx: Fix IRQ number check behavior The logical meaning of the previous version is wrong due to a typo. If the IRQ equals 0, no interrupt pin is available and polling mode shall be used. Additionally, this fix adds a check for IRQ < 0 to increase robustness, because documentation still says that negative IRQ values cannot be absolutely ruled-out. Fixes: 104c1b9dde9d ("serial: sc16is7xx: Add polling mode if no IRQ pin is available") Signed-off-by: Andre Werner Reviewed-by: Jiri Slaby Reviewed-by: Andy Shevchenko Reviewed-by: Maarten Brock Reviewed-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20250121071819.1346672-1-andre.werner@systec-electronic.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sc16is7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbc4578537e350d5bf8a7a2c7d054d6b163b3c41 Author: Ard Biesheuvel Date: Sat Feb 1 18:21:36 2025 +0100 efi: Use BIT_ULL() constants for memory attributes For legibility, use the existing BIT_ULL() to generate the u64 type EFI memory attribute macros. Signed-off-by: Ard Biesheuvel include/linux/efi.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit ba69e0750b0362870294adab09339a0c39c3beaf Author: Ard Biesheuvel Date: Sat Feb 1 18:21:35 2025 +0100 efi: Avoid cold plugged memory for placing the kernel UEFI 2.11 introduced EFI_MEMORY_HOT_PLUGGABLE to annotate system memory regions that are 'cold plugged' at boot, i.e., hot pluggable memory that is available from early boot, and described as system RAM by the firmware. Existing loaders and EFI applications running in the boot context will happily use this memory for allocating data structures that cannot be freed or moved at runtime, and this prevents the memory from being unplugged. Going forward, the new EFI_MEMORY_HOT_PLUGGABLE attribute should be tested, and memory annotated as such should be avoided for such allocations. In the EFI stub, there are a couple of occurrences where, instead of the high-level AllocatePages() UEFI boot service, a low-level code sequence is used that traverses the EFI memory map and carves out the requested number of pages from a free region. This is needed, e.g., for allocating as low as possible, or for allocating pages at random. While AllocatePages() should presumably avoid special purpose memory and cold plugged regions, this manual approach needs to incorporate this logic itself, in order to prevent the kernel itself from ending up in a hot unpluggable region, preventing it from being unplugged. So add the EFI_MEMORY_HOTPLUGGABLE macro definition, and check for it where appropriate. Cc: stable@vger.kernel.org Signed-off-by: Ard Biesheuvel drivers/firmware/efi/efi.c | 6 ++++-- drivers/firmware/efi/libstub/randomalloc.c | 3 +++ drivers/firmware/efi/libstub/relocate.c | 3 +++ include/linux/efi.h | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) commit 21fed7c223e20e694b91dbf25936d922a50c8b19 Author: Mark Brown Date: Mon Feb 3 20:11:04 2025 +0000 arm64/hwcap: Remove stray references to SF8MMx Due to SME currently being disabled when removing the SF8MMx support it wasn't noticed that there were some stray references in the hwcap table, delete them. Fixes: 819935464cb2 ("arm64/hwcap: Describe 2024 dpISA extensions to userspace") Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20250203-arm64-remove-sf8mmx-v1-1-6f1da3dbff82@kernel.org Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 2 -- 1 file changed, 2 deletions(-) commit f64f9dddd1f58c41c140034f7d2b0beeef1bc548 Author: Mark Brown Date: Fri Jan 24 17:33:22 2025 +0000 arm64/gcs: Fix documentation for HWCAP In one of the renumberings of the GCS hwcap a stray reference to HWCAP2 was left, fix it. Reported-by: David Spickett Fixes: 7058bf87cd59 ("arm64/gcs: Document the ABI for Guarded Control Stacks") Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20250124-arm64-gcs-hwcap-doc-v1-1-fa9368b01ca6@kernel.org Signed-off-by: Will Deacon Documentation/arch/arm64/gcs.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f458b2165d7ac0f2401fff48f19c8f864e7e1e38 Author: Lukas Bulwahn Date: Fri Jan 17 07:55:22 2025 -0500 arm64: Kconfig: Remove selecting replaced HAVE_FUNCTION_GRAPH_RETVAL Commit a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs") replaces the config HAVE_FUNCTION_GRAPH_RETVAL with the config HAVE_FUNCTION_GRAPH_FREGS, and it replaces all the select commands in the various architecture Kconfig files. In the arm64 architecture, the commit adds the 'select HAVE_FUNCTION_GRAPH_FREGS', but misses to remove the 'select HAVE_FUNCTION_GRAPH_RETVAL', i.e., the select on the replaced config. Remove selecting the replaced config. No functional change, just cleanup. Fixes: a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs") Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20250117125522.99071-1-lukas.bulwahn@redhat.com Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 3648027de1fa91a0c80cffd3ecff263d06e62605 Author: Ard Biesheuvel Date: Fri Jan 10 18:51:46 2025 +0100 arm64: Fix 5-level paging support in kexec/hibernate trampoline Add the missing code to allocate P4D level page tables when cloning the the kernel page tables. This fixes a crash that may be observed when attempting to resume from hibernation on an LPA2 capable system with 4k pages, which therefore uses 5 levels of paging. Presumably, kexec is equally affected. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20250110175145.785702-2-ardb+git@google.com Signed-off-by: Will Deacon arch/arm64/mm/trans_pgd.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 32392e04cb50d87bb7a6a7d9213f44a1a0961820 Author: Oliver Upton Date: Mon Feb 3 15:15:43 2025 -0800 KVM: arm64: Fail protected mode init if no vgic hardware is present Protected mode assumes that at minimum vgic-v3 is present, however KVM fails to actually enforce this at the time of initialization. As such, when running protected mode in a half-baked state on GICv2 hardware we see the hyp go belly up at vcpu_load() when it tries to restore the vgic-v3 cpuif: $ ./arch_timer_edge_cases [ 130.599140] kvm [4518]: nVHE hyp panic at: [] __kvm_nvhe___vgic_v3_restore_vmcr_aprs+0x8/0x84! [ 130.603685] kvm [4518]: Cannot dump pKVM nVHE stacktrace: !CONFIG_PROTECTED_NVHE_STACKTRACE [ 130.611962] kvm [4518]: Hyp Offset: 0xfffeca95ed000000 [ 130.617053] Kernel panic - not syncing: HYP panic: [ 130.617053] PS:800003c9 PC:0000b56a94102b58 ESR:0000000002000000 [ 130.617053] FAR:ffff00007b98d4d0 HPFAR:00000000007b98d0 PAR:0000000000000000 [ 130.617053] VCPU:0000000000000000 [ 130.638013] CPU: 0 UID: 0 PID: 4518 Comm: arch_timer_edge Tainted: G C 6.13.0-rc3-00009-gf7d03fcbf1f4 #1 [ 130.648790] Tainted: [C]=CRAP [ 130.651721] Hardware name: Libre Computer AML-S905X-CC (DT) [ 130.657242] Call trace: [ 130.659656] show_stack+0x18/0x24 (C) [ 130.663279] dump_stack_lvl+0x38/0x90 [ 130.666900] dump_stack+0x18/0x24 [ 130.670178] panic+0x388/0x3e8 [ 130.673196] nvhe_hyp_panic_handler+0x104/0x208 [ 130.677681] kvm_arch_vcpu_load+0x290/0x548 [ 130.681821] vcpu_load+0x50/0x80 [ 130.685013] kvm_arch_vcpu_ioctl_run+0x30/0x868 [ 130.689498] kvm_vcpu_ioctl+0x2e0/0x974 [ 130.693293] __arm64_sys_ioctl+0xb4/0xec [ 130.697174] invoke_syscall+0x48/0x110 [ 130.700883] el0_svc_common.constprop.0+0x40/0xe0 [ 130.705540] do_el0_svc+0x1c/0x28 [ 130.708818] el0_svc+0x30/0xd0 [ 130.711837] el0t_64_sync_handler+0x10c/0x138 [ 130.716149] el0t_64_sync+0x198/0x19c [ 130.719774] SMP: stopping secondary CPUs [ 130.723660] Kernel Offset: disabled [ 130.727103] CPU features: 0x000,00000800,02800000,0200421b [ 130.732537] Memory Limit: none [ 130.735561] ---[ end Kernel panic - not syncing: HYP panic: [ 130.735561] PS:800003c9 PC:0000b56a94102b58 ESR:0000000002000000 [ 130.735561] FAR:ffff00007b98d4d0 HPFAR:00000000007b98d0 PAR:0000000000000000 [ 130.735561] VCPU:0000000000000000 ]--- Fix it by failing KVM initialization if the system doesn't implement vgic-v3, as protected mode will never do anything useful on such hardware. Reported-by: Mark Brown Closes: https://lore.kernel.org/kvmarm/5ca7588c-7bf2-4352-8661-e4a56a9cd9aa@sirena.org.uk/ Signed-off-by: Oliver Upton Link: https://lore.kernel.org/r/20250203231543.233511-1-oliver.upton@linux.dev Signed-off-by: Marc Zyngier arch/arm64/kvm/arm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 8b125949df58a00e8797c6e6d3f3d3dc08f4d939 Author: Jinghao Jia Date: Mon Feb 3 02:55:06 2025 -0600 samples/hid: fix broken vmlinux path for VMLINUX_BTF Commit 13b25489b6f8 ("kbuild: change working directory to external module directory with M=") changed kbuild working directory of hid-bpf sample programs to samples/hid, which broke the vmlinux path for VMLINUX_BTF, as the Makefiles assume the current work directory to be the kernel output directory and use a relative path (i.e., ./vmlinux): Makefile:173: *** Cannot find a vmlinux for VMLINUX_BTF at any of " /path/to/linux/samples/hid/vmlinux", build the kernel or set VMLINUX_BTF or VMLINUX_H variable. Stop. Correctly refer to the kernel output directory using $(objtree). Fixes: 13b25489b6f8 ("kbuild: change working directory to external module directory with M=") Tested-by: Ruowen Qin Suggested-by: Daniel Borkmann Suggested-by: Andrii Nakryiko Signed-off-by: Jinghao Jia Link: https://patch.msgid.link/20250203085506.220297-4-jinghao7@illinois.edu Signed-off-by: Benjamin Tissoires samples/hid/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1739cafdb8decad538410b05a4640055408826de Author: Jinghao Jia Date: Mon Feb 3 02:55:04 2025 -0600 samples/hid: remove unnecessary -I flags from libbpf EXTRA_CFLAGS Commit 5a6ea7022ff4 ("samples/bpf: Remove unnecessary -I flags from libbpf EXTRA_CFLAGS") fixed the build error caused by redundant include path for samples/bpf, but not samples/hid. Apply the same fix on samples/hid as well. Fixes: 13b25489b6f8 ("kbuild: change working directory to external module directory with M=") Tested-by: Ruowen Qin Signed-off-by: Jinghao Jia Link: https://patch.msgid.link/20250203085506.220297-2-jinghao7@illinois.edu Signed-off-by: Benjamin Tissoires samples/hid/Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit a787ab73e2e43c0a3df10bc8d9b9b7a679129d49 Author: Jithu Joseph Date: Fri Jan 31 12:53:15 2025 -0800 platform/x86/intel/ifs: Update documentation with image download path The documentation previously listed the path to download In Field Scan (IFS) test images as "TBD". Update the documentation to include the correct image download location. Also move the download link to the appropriate section within the documentation. Reported-by: Anisse Astier Signed-off-by: Jithu Joseph Link: https://lore.kernel.org/r/20250131205315.1585663-1-jithu.joseph@intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/intel/ifs/ifs.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 3126ea9be66b53e607f87f067641ba724be24181 Author: Chukun Pan Date: Mon Jan 6 18:00:01 2025 +0800 phy: rockchip: naneng-combphy: compatible reset with old DT The device tree of RK3568 did not specify reset-names before. So add fallback to old behaviour to be compatible with old DT. Fixes: fbcbffbac994 ("phy: rockchip: naneng-combphy: fix phy reset") Cc: Jianfeng Liu Signed-off-by: Chukun Pan Reviewed-by: Jonas Karlman Link: https://lore.kernel.org/r/20250106100001.1344418-2-amadeus@jmu.edu.cn Signed-off-by: Vinod Koul drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fcf5d353b09b3fc212ab24b89ef23a7a8f7b308e Author: Arnd Bergmann Date: Wed Jan 22 07:52:44 2025 +0100 phy: rockchip: fix Kconfig dependency more A previous patch ensured that USB Type C connector support is enabled, but it is still possible to build the phy driver without enabling CONFIG_USB (host support) or CONFIG_USB_GADGET (device support), and in that case the common helper functions are unavailable: aarch64-linux-ld: drivers/phy/rockchip/phy-rockchip-usbdp.o: in function `rk_udphy_probe': phy-rockchip-usbdp.c:(.text+0xe74): undefined reference to `usb_get_maximum_speed' Select CONFIG_USB_COMMON directly here, like we do in some other phy drivers, to make sure this is available even when actual USB support is disabled or in a loadable module that cannot be reached from a built-in phy driver. Fixes: 9c79b779643e ("phy: rockchip: fix CONFIG_TYPEC dependency") Signed-off-by: Arnd Bergmann Reviewed-by: Sebastian Reichel Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250122065249.1390081-1-arnd@kernel.org Signed-off-by: Vinod Koul drivers/phy/rockchip/Kconfig | 1 + 1 file changed, 1 insertion(+) commit d3ed6dee73c560fad0a8e152c8e233b3fb3a2e44 Author: Paolo Abeni Date: Sat Feb 1 19:02:51 2025 +0100 net: harmonize tstats and dstats After the blamed commits below, some UDP tunnel use dstats for accounting. On the xmit path, all the UDP-base tunnels ends up using iptunnel_xmit_stats() for stats accounting, and the latter assumes the relevant (tunnel) network device uses tstats. The end result is some 'funny' stat report for the mentioned UDP tunnel, e.g. when no packet is actually dropped and a bunch of packets are transmitted: gnv2: mtu 1450 qdisc noqueue \ state UNKNOWN mode DEFAULT group default qlen 1000 link/ether ee:7d:09:87:90:ea brd ff:ff:ff:ff:ff:ff RX: bytes packets errors dropped missed mcast 14916 23 0 15 0 0 TX: bytes packets errors dropped carrier collsns 0 1566 0 0 0 0 Address the issue ensuring the same binary layout for the overlapping fields of dstats and tstats. While this solution is a bit hackish, is smaller and with no performance pitfall compared to other alternatives i.e. supporting both dstat and tstat in iptunnel_xmit_stats() or reverting the blamed commit. With time we should possibly move all the IP-based tunnel (and virtual devices) to dstats. Fixes: c77200c07491 ("bareudp: Handle stats using NETDEV_PCPU_STAT_DSTATS.") Fixes: 6fa6de302246 ("geneve: Handle stats using NETDEV_PCPU_STAT_DSTATS.") Fixes: be226352e8dc ("vxlan: Handle stats using NETDEV_PCPU_STAT_DSTATS.") Signed-off-by: Paolo Abeni Reviewed-by: Guillaume Nault Link: https://patch.msgid.link/2e1c444cf0f63ae472baff29862c4c869be17031.1738432804.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski include/linux/netdevice.h | 2 +- net/core/dev.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) commit 2fc9956b31028040d50e5c7a6631a310f1ce4014 Merge: 0e6dc66b5c5f c3da585509ae Author: Jakub Kicinski Date: Mon Feb 3 18:39:23 2025 -0800 Merge branch 'ethtool-rss-minor-fixes-for-recent-rss-changes' Jakub Kicinski says: ==================== ethtool: rss: minor fixes for recent RSS changes Make sure RSS_GET messages are consistent in do and dump. Fix up a recently added safety check for RSS + queue offset. Adjust related tests so that they pass on devices which don't support RSS + queue offset. ==================== Link: https://patch.msgid.link/20250201013040.725123-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit c3da585509aeb8476886adf75a266c81a9b0df6c Author: Jakub Kicinski Date: Fri Jan 31 17:30:40 2025 -0800 selftests: drv-net: rss_ctx: don't fail reconfigure test if queue offset not supported Vast majority of drivers does not support queue offset. Simply return if the rss context + queue ntuple fails. Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250201013040.725123-5-kuba@kernel.org Signed-off-by: Jakub Kicinski tools/testing/selftests/drivers/net/hw/rss_ctx.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit de379dfd9ada2995699052f4a1ecebe5d8f8d70f Author: Jakub Kicinski Date: Fri Jan 31 17:30:39 2025 -0800 selftests: drv-net: rss_ctx: add missing cleanup in queue reconfigure Commit under Fixes adds ntuple rules but never deletes them. Fixes: 29a4bc1fe961 ("selftest: extend test_rss_context_queue_reconfigure for action addition") Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250201013040.725123-4-kuba@kernel.org Signed-off-by: Jakub Kicinski tools/testing/selftests/drivers/net/hw/rss_ctx.py | 2 ++ 1 file changed, 2 insertions(+) commit 2b91cc1214b165c25ac9b0885db89a0d3224028a Author: Jakub Kicinski Date: Fri Jan 31 17:30:38 2025 -0800 ethtool: ntuple: fix rss + ring_cookie check The info.flow_type is for RXFH commands, ntuple flow_type is inside the flow spec. The check currently does nothing, as info.flow_type is 0 (or even uninitialized by user space) for ETHTOOL_SRXCLSRLINS. Fixes: 9e43ad7a1ede ("net: ethtool: only allow set_rxnfc with rss + ring_cookie if driver opts in") Reviewed-by: Gal Pressman Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250201013040.725123-3-kuba@kernel.org Signed-off-by: Jakub Kicinski net/ethtool/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 244f8aa46fa9e2f4ea5fe0e04988b395d5e30fc7 Author: Jakub Kicinski Date: Fri Jan 31 17:30:37 2025 -0800 ethtool: rss: fix hiding unsupported fields in dumps Commit ec6e57beaf8b ("ethtool: rss: don't report key if device doesn't support it") intended to stop reporting key fields for additional rss contexts if device has a global hashing key. Later we added dump support and the filtering wasn't properly added there. So we end up reporting the key fields in dumps but not in dos: # ./pyynl/cli.py --spec netlink/specs/ethtool.yaml --do rss-get \ --json '{"header": {"dev-index":2}, "context": 1 }' { "header": { ... }, "context": 1, "indir": [0, 1, 2, 3, ...]] } # ./pyynl/cli.py --spec netlink/specs/ethtool.yaml --dump rss-get [ ... snip context 0 ... { "header": { ... }, "context": 1, "indir": [0, 1, 2, 3, ...], -> "input_xfrm": 255, -> "hfunc": 1, -> "hkey": "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" } ] Hide these fields correctly. The drivers/net/hw/rss_ctx.py selftest catches this when run on a device with single key, already: # Check| At /root/./ksft-net-drv/drivers/net/hw/rss_ctx.py, line 381, in test_rss_context_dump: # Check| ksft_ne(set(data.get('hkey', [1])), {0}, "key is all zero") # Check failed {0} == {0} key is all zero not ok 8 rss_ctx.test_rss_context_dump Fixes: f6122900f4e2 ("ethtool: rss: support dumping RSS contexts") Reviewed-by: Gal Pressman Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250201013040.725123-2-kuba@kernel.org Signed-off-by: Jakub Kicinski net/ethtool/rss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1b0332a42656b798bea867631d739de023633ec6 Author: Yu-Chun Lin Date: Thu Jan 30 22:48:49 2025 +0800 kthread: Fix return value on kzalloc() failure in kthread_affine_preferred() kthread_affine_preferred() incorrectly returns 0 instead of -ENOMEM when kzalloc() fails. Return 'ret' to ensure the correct error code is propagated. Fixes: 4d13f4304fa4 ("kthread: Implement preferred affinity") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501301528.t0cZVbnq-lkp@intel.com/ Signed-off-by: Yu-Chun Lin Signed-off-by: Frederic Weisbecker kernel/kthread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5233e3235dec3065ccc632729675575dbe3c6b8a Author: Magnus Lindholm Date: Sat Jan 25 10:49:22 2025 +0100 scsi: qla1280: Fix kernel oops when debug level > 2 A null dereference or oops exception will eventually occur when qla1280.c driver is compiled with DEBUG_QLA1280 enabled and ql_debug_level > 2. I think its clear from the code that the intention here is sg_dma_len(s) not length of sg_next(s) when printing the debug info. Signed-off-by: Magnus Lindholm Link: https://lore.kernel.org/r/20250125095033.26188-1-linmag7@gmail.com Signed-off-by: Martin K. Petersen drivers/scsi/qla1280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a78a56ea65252bb089e0daace989167227f2d31 Author: Seunghui Lee Date: Sat Jan 18 11:38:08 2025 +0900 scsi: ufs: core: Fix error return with query response There is currently no mechanism to return error from query responses. Return the error and print the corresponding error message with it. Signed-off-by: Seunghui Lee Link: https://lore.kernel.org/r/20250118023808.24726-1-sh043.lee@samsung.com Reviewed-by: Bean Huo Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 87c4b5e8a6b65189abd9ea5010ab308941f964a4 Author: Long Li Date: Wed Jan 22 19:07:22 2025 -0800 scsi: storvsc: Set correct data length for sending SCSI command without payload In StorVSC, payload->range.len is used to indicate if this SCSI command carries payload. This data is allocated as part of the private driver data by the upper layer and may get passed to lower driver uninitialized. For example, the SCSI error handling mid layer may send TEST_UNIT_READY or REQUEST_SENSE while reusing the buffer from a failed command. The private data section may have stale data from the previous command. If the SCSI command doesn't carry payload, the driver may use this value as is for communicating with host, resulting in possible corruption. Fix this by always initializing this value. Fixes: be0cf6ca301c ("scsi: storvsc: Set the tablesize based on the information given by the host") Cc: stable@kernel.org Tested-by: Roman Kisel Reviewed-by: Roman Kisel Reviewed-by: Michael Kelley Signed-off-by: Long Li Link: https://lore.kernel.org/r/1737601642-7759-1-git-send-email-longli@linuxonhyperv.com Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 1 + 1 file changed, 1 insertion(+) commit f8fb2403ddebb5eea0033d90d9daae4c88749ada Author: André Draszik Date: Fri Jan 24 15:09:00 2025 +0000 scsi: ufs: core: Fix use-after free in init error and remove paths devm_blk_crypto_profile_init() registers a cleanup handler to run when the associated (platform-) device is being released. For UFS, the crypto private data and pointers are stored as part of the ufs_hba's data structure 'struct ufs_hba::crypto_profile'. This structure is allocated as part of the underlying ufshcd and therefore Scsi_host allocation. During driver release or during error handling in ufshcd_pltfrm_init(), this structure is released as part of ufshcd_dealloc_host() before the (platform-) device associated with the crypto call above is released. Once this device is released, the crypto cleanup code will run, using the just-released 'struct ufs_hba::crypto_profile'. This causes a use-after-free situation: Call trace: kfree+0x60/0x2d8 (P) kvfree+0x44/0x60 blk_crypto_profile_destroy_callback+0x28/0x70 devm_action_release+0x1c/0x30 release_nodes+0x6c/0x108 devres_release_all+0x98/0x100 device_unbind_cleanup+0x20/0x70 really_probe+0x218/0x2d0 In other words, the initialisation code flow is: platform-device probe ufshcd_pltfrm_init() ufshcd_alloc_host() scsi_host_alloc() allocation of struct ufs_hba creation of scsi-host devices devm_blk_crypto_profile_init() devm registration of cleanup handler using platform-device and during error handling of ufshcd_pltfrm_init() or during driver removal: ufshcd_dealloc_host() scsi_host_put() put_device(scsi-host) release of struct ufs_hba put_device(platform-device) crypto cleanup handler To fix this use-after free, change ufshcd_alloc_host() to register a devres action to automatically cleanup the underlying SCSI device on ufshcd destruction, without requiring explicit calls to ufshcd_dealloc_host(). This way: * the crypto profile and all other ufs_hba-owned resources are destroyed before SCSI (as they've been registered after) * a memleak is plugged in tc-dwc-g210-pci.c remove() as a side-effect * EXPORT_SYMBOL_GPL(ufshcd_dealloc_host) can be removed fully as it's not needed anymore * no future drivers using ufshcd_alloc_host() could ever forget adding the cleanup Fixes: cb77cb5abe1f ("blk-crypto: rename blk_keyslot_manager to blk_crypto_profile") Fixes: d76d9d7d1009 ("scsi: ufs: use devm_blk_ksm_init()") Cc: stable@vger.kernel.org Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250124-ufshcd-fix-v4-1-c5d0144aae59@linaro.org Reviewed-by: Bean Huo Reviewed-by: Manivannan Sadhasivam Acked-by: Eric Biggers Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 31 +++++++++++++++++++++---------- drivers/ufs/host/ufshcd-pci.c | 2 -- drivers/ufs/host/ufshcd-pltfrm.c | 28 +++++++++------------------- include/ufs/ufshcd.h | 1 - 4 files changed, 30 insertions(+), 32 deletions(-) commit 9ff7c383b8ac0c482a1da7989f703406d78445c6 Author: Igor Pylypiv Date: Fri Jan 31 10:44:07 2025 -0800 scsi: core: Do not retry I/Os during depopulation Fail I/Os instead of retry to prevent user space processes from being blocked on the I/O completion for several minutes. Retrying I/Os during "depopulation in progress" or "depopulation restore in progress" results in a continuous retry loop until the depopulation completes or until the I/O retry loop is aborted due to a timeout by the scsi_cmd_runtime_exceeced(). Depopulation is slow and can take 24+ hours to complete on 20+ TB HDDs. Most I/Os in the depopulation retry loop end up taking several minutes before returning the failure to user space. Cc: stable@vger.kernel.org # 4.18.x: 2bbeb8d scsi: core: Handle depopulation and restoration in progress Cc: stable@vger.kernel.org # 4.18.x Fixes: e37c7d9a0341 ("scsi: core: sanitize++ in progress") Signed-off-by: Igor Pylypiv Link: https://lore.kernel.org/r/20250131184408.859579-1-ipylypiv@google.com Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5363ee9d110e139584c2d92a0b640bc210588506 Author: Rik van Riel Date: Tue Jan 28 16:35:39 2025 -0500 scsi: core: Use GFP_NOIO to avoid circular locking dependency Filesystems can write to disk from page reclaim with __GFP_FS set. Marc found a case where scsi_realloc_sdev_budget_map() ends up in page reclaim with GFP_KERNEL, where it could try to take filesystem locks again, leading to a deadlock. WARNING: possible circular locking dependency detected 6.13.0 #1 Not tainted ------------------------------------------------------ kswapd0/70 is trying to acquire lock: ffff8881025d5d78 (&q->q_usage_counter(io)){++++}-{0:0}, at: blk_mq_submit_bio+0x461/0x6e0 but task is already holding lock: ffffffff81ef5f40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x9f/0x760 The full lockdep splat can be found in Marc's report: https://lkml.org/lkml/2025/1/24/1101 Avoid the potential deadlock by doing the allocation with GFP_NOIO, which prevents both filesystem and block layer recursion. Reported-by: Marc Aurèle La France Signed-off-by: Rik van Riel Link: https://lore.kernel.org/r/20250129104525.0ae8421e@fangorn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9271af9d846c7e49c8709b58d5853cb73c00b193 Author: Daniel Brackenbury Date: Tue Jan 28 20:08:49 2025 -0500 HID: topre: Fix n-key rollover on Realforce R3S TKL boards Newer model R3* Topre Realforce keyboards share an issue with their older R2 cousins where a report descriptor fixup is needed in order for n-key rollover to work correctly, otherwise only 6-key rollover is available. This patch adds some new hardware IDs for the R3S 87-key keyboard and makes amendments to the existing hid-topre driver in order to change the correct byte in the new model. Signed-off-by: Daniel Brackenbury Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 3 ++- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-topre.c | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) commit 18c966b62819b9d3b99eac8fb8cdc8950826e0c2 Author: Zhang Lixu Date: Thu Jan 23 09:30:44 2025 +0800 HID: intel-ish-hid: ipc: Add Panther Lake PCI device IDs Add device IDs of Panther Lake-H and Panther Lake-P into ishtp support list. Signed-off-by: Zhang Lixu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/hw-ish.h | 2 ++ drivers/hid/intel-ish-hid/ipc/pci-ish.c | 7 +++++++ 2 files changed, 9 insertions(+) commit 839a74b5649c9f41d939a05059b5ca6b17156d03 Author: Avri Altman Date: Tue Jan 28 09:12:07 2025 +0200 scsi: ufs: Fix toggling of clk_gating.state when clock gating is not allowed This commit addresses an issue where clk_gating.state is being toggled in ufshcd_setup_clocks() even if clock gating is not allowed. The fix is to add a check for hba->clk_gating.is_initialized before toggling clk_gating.state in ufshcd_setup_clocks(). Since clk_gating.lock is now initialized unconditionally, it can no longer lead to the spinlock being used before it is properly initialized, but instead it is mostly for documentation purposes. Fixes: 1ab27c9cf8b6 ("ufs: Add support for clock gating") Reported-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Avri Altman Link: https://lore.kernel.org/r/20250128071207.75494-3-avri.altman@wdc.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d4114a1d34413dfffa0094c2eb7b95e61087abd Author: Avri Altman Date: Tue Jan 28 09:12:06 2025 +0200 scsi: ufs: core: Ensure clk_gating.lock is used only after initialization Address a lockdep warning triggered by the use of the clk_gating.lock before it is properly initialized. The warning is as follows: [ 4.388838] INFO: trying to register non-static key. [ 4.395673] The code is fine but needs lockdep annotation, or maybe [ 4.402118] you didn't initialize this object before use? [ 4.407673] turning off the locking correctness validator. [ 4.413334] CPU: 5 UID: 0 PID: 58 Comm: kworker/u32:1 Not tainted 6.12-rc1 #185 [ 4.413343] Hardware name: Qualcomm Technologies, Inc. Robotics RB5 (DT) [ 4.413362] Call trace: [ 4.413364] show_stack+0x18/0x24 (C) [ 4.413374] dump_stack_lvl+0x90/0xd0 [ 4.413384] dump_stack+0x18/0x24 [ 4.413392] register_lock_class+0x498/0x4a8 [ 4.413400] __lock_acquire+0xb4/0x1b90 [ 4.413406] lock_acquire+0x114/0x310 [ 4.413413] _raw_spin_lock_irqsave+0x60/0x88 [ 4.413423] ufshcd_setup_clocks+0x2c0/0x490 [ 4.413433] ufshcd_init+0x198/0x10ec [ 4.413437] ufshcd_pltfrm_init+0x600/0x7c0 [ 4.413444] ufs_qcom_probe+0x20/0x58 [ 4.413449] platform_probe+0x68/0xd8 [ 4.413459] really_probe+0xbc/0x268 [ 4.413466] __driver_probe_device+0x78/0x12c [ 4.413473] driver_probe_device+0x40/0x11c [ 4.413481] __device_attach_driver+0xb8/0xf8 [ 4.413489] bus_for_each_drv+0x84/0xe4 [ 4.413495] __device_attach+0xfc/0x18c [ 4.413502] device_initial_probe+0x14/0x20 [ 4.413510] bus_probe_device+0xb0/0xb4 [ 4.413517] deferred_probe_work_func+0x8c/0xc8 [ 4.413524] process_scheduled_works+0x250/0x658 [ 4.413534] worker_thread+0x15c/0x2c8 [ 4.413542] kthread+0x134/0x200 [ 4.413550] ret_from_fork+0x10/0x20 To fix this issue, ensure that the spinlock is only used after it has been properly initialized before using it in ufshcd_setup_clocks(). Do that unconditionally as initializing a spinlock is a fast operation. Fixes: 209f4e43b806 ("scsi: ufs: core: Introduce a new clock_gating lock") Reported-by: Dmitry Baryshkov Tested-by: Geert Uytterhoeven Signed-off-by: Avri Altman Link: https://lore.kernel.org/r/20250128071207.75494-2-avri.altman@wdc.com Reviewed-by: Bean Huo Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9b8e2220d3a052a690b1d1b23019673e612494c5 Author: Charles Han Date: Fri Nov 15 14:26:21 2024 +0800 HID: multitouch: Add NULL check in mt_input_configured devm_kasprintf() can return a NULL pointer on failure,but this returned value in mt_input_configured() is not checked. Add NULL check in mt_input_configured(), to handle kernel NULL pointer dereference error. Fixes: 479439463529 ("HID: multitouch: Correct devm device reference for hidinput input_dev name") Signed-off-by: Charles Han Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 45ab5166a82d038c898985b0ad43ead69c1f9573 Author: Charles Han Date: Thu Nov 14 17:19:47 2024 +0800 HID: winwing: Add NULL check in winwing_init_led() devm_kasprintf() can return a NULL pointer on failure,but this returned value in winwing_init_led() is not checked. Add NULL check in winwing_init_led(), to handle kernel NULL pointer dereference error. Fixes: 266c990debad ("HID: Add WinWing Orion2 throttle support") Signed-off-by: Charles Han Signed-off-by: Jiri Kosina drivers/hid/hid-winwing.c | 2 ++ 1 file changed, 2 insertions(+) commit 0de63bb7d91975e73338300a57c54b93d3cc151c Merge: f286757b644c 902e09c8acde Author: Linus Torvalds Date: Mon Feb 3 13:39:55 2025 -0800 Merge tag 'pull-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull d_revalidate fix from Al Viro: "Fix a braino in d_revalidate series: check ->d_op for NULL" * tag 'pull-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix braino in "9p: fix ->rename_sem exclusion" commit 16b047c9a4dd4d4cc07284f5b38d4c7b9766c111 Merge: 2014c95afece 8c09f612b293 Author: Martin K. Petersen Date: Mon Feb 3 16:28:51 2025 -0500 Merge branch '6.14/scsi-queue' into 6.14/scsi-fixes Pull outstanding fixes bound for this release into 6.14/scsi-fixes. Signed-off-by: Martin K. Petersen commit 0e6dc66b5c5fa186a9f96c66421af74212ebcf66 Merge: 3a4e7193ec37 8a2e22f665a0 Author: Jakub Kicinski Date: Mon Feb 3 13:27:52 2025 -0800 Merge branch 'maintainers-recognize-kuniyuki-iwashima-as-a-maintainer' Jakub Kicinski says: ==================== MAINTAINERS: recognize Kuniyuki Iwashima as a maintainer Kuniyuki Iwashima has been a prolific contributor and trusted reviewer for some core portions of the networking stack for a couple of years now. Formalize some obvious areas of his expertise and list him as a maintainer. ==================== Link: https://patch.msgid.link/20250202014728.1005003-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 8a2e22f665a0b5c212057031e94b75cfdc11a4a6 Author: Jakub Kicinski Date: Sat Feb 1 17:47:28 2025 -0800 MAINTAINERS: add entry for UNIX sockets Add a MAINTAINERS entry for UNIX socket, Kuniyuki has been the de-facto maintainer of this code for a while. Reviewed-by: Simon Horman Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250202014728.1005003-4-kuba@kernel.org Signed-off-by: Jakub Kicinski MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit ae0585b04ab741b536b0db20c12baf24bf7118d2 Author: Jakub Kicinski Date: Sat Feb 1 17:47:27 2025 -0800 MAINTAINERS: add a general entry for BSD sockets Create a MAINTAINERS entry for BSD sockets. List the top 3 reviewers as maintainers. The entry is meant to cover core socket code (of which there isn't much) but also reviews of any new socket families. Reviewed-by: Simon Horman Acked-by: Willem de Bruijn Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250202014728.1005003-3-kuba@kernel.org Signed-off-by: Jakub Kicinski MAINTAINERS | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 4d896b35394144c246daaeb5280a015a630958e7 Author: Jakub Kicinski Date: Sat Feb 1 17:47:26 2025 -0800 MAINTAINERS: add Kuniyuki Iwashima to TCP reviewers List Kuniyuki as an official TCP reviewer. Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250202014728.1005003-2-kuba@kernel.org Signed-off-by: Jakub Kicinski MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 3a4e7193ec37ee2476ce726589de4495a066b565 Author: Jakub Kicinski Date: Sat Feb 1 16:50:24 2025 -0800 MAINTAINERS: list openvswitch docs under its entry Submissions to the docs seem to not get properly CCed. Acked-by: Ilya Maximets Link: https://patch.msgid.link/20250202005024.964262-1-kuba@kernel.org Signed-off-by: Jakub Kicinski MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 88be092224d51f6ca7b369a8e5d29cfee8754a32 Merge: 235174b2bed8 468a1952df78 Author: Jakub Kicinski Date: Mon Feb 3 13:18:44 2025 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== ice: fix Rx data path for heavy 9k MTU traffic Maciej Fijalkowski says: This patchset fixes a pretty nasty issue that was reported by RedHat folks which occurred after ~30 minutes (this value varied, just trying here to state that it was not observed immediately but rather after a considerable longer amount of time) when ice driver was tortured with jumbo frames via mix of iperf traffic executed simultaneously with wrk/nginx on client/server sides (HTTP and TCP workloads basically). The reported splats were spanning across all the bad things that can happen to the state of page - refcount underflow, use-after-free, etc. One of these looked as follows: [ 2084.019891] BUG: Bad page state in process swapper/34 pfn:97fcd0 [ 2084.025990] page:00000000a60ee772 refcount:-1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x97fcd0 [ 2084.035462] flags: 0x17ffffc0000000(node=0|zone=2|lastcpupid=0x1fffff) [ 2084.041990] raw: 0017ffffc0000000 dead000000000100 dead000000000122 0000000000000000 [ 2084.049730] raw: 0000000000000000 0000000000000000 ffffffffffffffff 0000000000000000 [ 2084.057468] page dumped because: nonzero _refcount [ 2084.062260] Modules linked in: bonding tls sunrpc intel_rapl_msr intel_rapl_common intel_uncore_frequency intel_uncore_frequency_common i10nm_edac nfit libnvdimm x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm mgag200 irqd [ 2084.137829] CPU: 34 PID: 0 Comm: swapper/34 Kdump: loaded Not tainted 5.14.0-427.37.1.el9_4.x86_64 #1 [ 2084.147039] Hardware name: Dell Inc. PowerEdge R750/0216NK, BIOS 1.13.2 12/19/2023 [ 2084.154604] Call Trace: [ 2084.157058] [ 2084.159080] dump_stack_lvl+0x34/0x48 [ 2084.162752] bad_page.cold+0x63/0x94 [ 2084.166333] check_new_pages+0xb3/0xe0 [ 2084.170083] rmqueue_bulk+0x2d2/0x9e0 [ 2084.173749] ? ktime_get+0x35/0xa0 [ 2084.177159] rmqueue_pcplist+0x13b/0x210 [ 2084.181081] rmqueue+0x7d3/0xd40 [ 2084.184316] ? xas_load+0x9/0xa0 [ 2084.187547] ? xas_find+0x183/0x1d0 [ 2084.191041] ? xa_find_after+0xd0/0x130 [ 2084.194879] ? intel_iommu_iotlb_sync_map+0x89/0xe0 [ 2084.199759] get_page_from_freelist+0x11f/0x530 [ 2084.204291] __alloc_pages+0xf2/0x250 [ 2084.207958] ice_alloc_rx_bufs+0xcc/0x1c0 [ice] [ 2084.212543] ice_clean_rx_irq+0x631/0xa20 [ice] [ 2084.217111] ice_napi_poll+0xdf/0x2a0 [ice] [ 2084.221330] __napi_poll+0x27/0x170 [ 2084.224824] net_rx_action+0x233/0x2f0 [ 2084.228575] __do_softirq+0xc7/0x2ac [ 2084.232155] __irq_exit_rcu+0xa1/0xc0 [ 2084.235821] common_interrupt+0x80/0xa0 [ 2084.239662] [ 2084.241768] The fix is mostly about reverting what was done in commit 1dc1a7e7f410 ("ice: Centrallize Rx buffer recycling") followed by proper timing on page_count() storage and then removing the ice_rx_buf::act related logic (which was mostly introduced for purposes from cited commit). Special thanks to Xu Du for providing reproducer and Jacob Keller for initial extensive analysis. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: stop storing XDP verdict within ice_rx_buf ice: gather page_count()'s of each frag right before XDP prog call ice: put Rx buffers after being done with current frame ==================== Link: https://patch.msgid.link/20250131185415.3741532-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 902e09c8acde117b00369521f54df817a983d4ab Author: Al Viro Date: Mon Feb 3 16:16:09 2025 -0500 fix braino in "9p: fix ->rename_sem exclusion" ->d_op can bloody well be NULL Fucked-up-by: Al Viro Fixes: 30d61efe118c "9p: fix ->rename_sem exclusion" Signed-off-by: Al Viro fs/dcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1ddee69108d305bbc059cbf31c0b47626796be77 Author: Andy Shevchenko Date: Fri Jan 17 16:21:45 2025 +0200 pinctrl: cy8c95x0: Respect IRQ trigger settings from firmware Some of the platforms may connect the INT pin via inversion logic effectively make the triggering to be active-low. Remove explicit trigger flag to respect the settings from firmware. Without this change even idling chip produces spurious interrupts and kernel disables the line in the result: irq 33: nobody cared (try booting with the "irqpoll" option) CPU: 0 UID: 0 PID: 125 Comm: irq/33-i2c-INT3 Not tainted 6.12.0-00236-g8b874ed11dae #64 Hardware name: Intel Corp. QUARK/Galileo, BIOS 0x01000900 01/01/2014 ... handlers: [<86e86bea>] irq_default_primary_handler threaded [] cy8c95x0_irq_handler [pinctrl_cy8c95x0] Disabling IRQ #33 Fixes: e6cbbe42944d ("pinctrl: Add Cypress cy8c95x0 support") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/20250117142304.596106-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-cy8c95x0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bead181694df16de464ca2392d0cec2cf15fb978 Author: Angelo Dureghello Date: Wed Jan 29 12:03:04 2025 +0100 iio: adc: ad7606: fix wrong scale available Fix wrong scale available list since only one value is returned: ... iio:device1: ad7606b (buffer capable) 8 channels found: voltage0: (input, index: 0, format: le:S16/16>>0) 2 channel-specific attributes found: attr 0: scale value: 0.305176 attr 1: scale_available value: 0.076293 Fix as: voltage0: (input, index: 0, format: le:S16/16>>0) 2 channel-specific attributes found: attr 0: scale value: 0.305176 attr 1: scale_available value: 0.076293 0.152588 0.305176 Fixes: 97c6d857041d ("iio: adc: ad7606: rework scale-available to be static") Signed-off-by: Angelo Dureghello Link: https://patch.msgid.link/20250129-wip-bl-ad7606_add_backend_sw_mode-v3-3-c3aec77c0ab7@baylibre.com Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7606.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02ccd7e5d81af4ae20852fc1ad67e7d943fa5778 Author: Angelo Dureghello Date: Wed Jan 29 12:03:02 2025 +0100 dt-bindings: iio: dac: adi-axi-adc: fix ad7606 pwm-names Fix make dt_binding_check warning: DTC [C] Documentation/devicetree/bindings/iio/adc/adi,axi-adc.example.dtb .../adc/adi,axi-adc.example.dtb: adc@0: pwm-names: ['convst1'] is too short from schema $id: http://devicetree.org/schemas/iio/adc/adi,ad7606.yaml# Add "minItems" to pwm-names, it allows to use one single pwm when connected to both adc conversion inputs. Fixes: 7c2357b10490 ("dt-bindings: iio: adc: ad7606: Add iio backend bindings") Signed-off-by: Angelo Dureghello Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20250129-wip-bl-ad7606_add_backend_sw_mode-v3-1-c3aec77c0ab7@baylibre.com Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml | 1 + 1 file changed, 1 insertion(+) commit e17b9f20da7d2bc1f48878ab2230523b2512d965 Author: Angelo Dureghello Date: Sat Jan 25 17:24:32 2025 +0100 iio: dac: ad3552r: clear reset status flag Clear reset status flag, to keep error status register clean after reset (ad3552r manual, rev B table 38). Reset error flag was left to 1, so debugging registers, the "Error Status Register" was dirty (0x01). It is important to clear this bit, so if there is any reset event over normal working mode, it is possible to detect it. Fixes: 8f2b54824b28 ("drivers:iio:dac: Add AD3552R driver support") Signed-off-by: Angelo Dureghello Link: https://patch.msgid.link/20250125-wip-bl-ad3552r-clear-reset-v2-1-aa3a27f3ff8c@baylibre.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/dac/ad3552r.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 21d7241faf406e8aee3ce348451cc362d5db6a02 Author: Markus Burri Date: Fri Jan 24 16:07:03 2025 +0100 iio: adc: ad7192: fix channel select Channel configuration doesn't work as expected. For FIELD_PREP the bit mask is needed and not the bit number. Fixes: 874bbd1219c7 ("iio: adc: ad7192: Use bitfield access macros") Signed-off-by: Markus Burri Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250124150703.97848-1-markus.burri@mt.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7192.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4eba4d92906c3814ca3ec65c16af27c46c12342e Author: Ricardo Ribalda Date: Mon Dec 16 10:05:53 2024 +0000 iio: hid-sensor-prox: Split difference from multiple channels When the driver was originally created, it was decided that sampling_frequency and hysteresis would be shared_per_type instead of shared_by_all (even though it is internally shared by all). Eg: in_proximity_raw in_proximity_sampling_frequency When we introduced support for more channels, we continued with shared_by_type which. Eg: in_proximity0_raw in_proximity1_raw in_proximity_sampling_frequency in_attention_raw in_attention_sampling_frequency Ideally we should change to shared_by_all, but it is not an option, because the current naming has been a stablished ABI by now. Luckily we can use separate instead. That will be more consistent: in_proximity0_raw in_proximity0_sampling_frequency in_proximity1_raw in_proximity1_sampling_frequency in_attention_raw in_attention_sampling_frequency Fixes: 596ef5cf654b ("iio: hid-sensor-prox: Add support for more channels") Signed-off-by: Ricardo Ribalda Link: https://patch.msgid.link/20241216-fix-hid-sensor-v2-1-ff8c1959ec4a@chromium.org Signed-off-by: Jonathan Cameron drivers/iio/light/hid-sensor-prox.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5d702aa2a47bbab6231382f9ead5be40a287a53b Author: Dheeraj Reddy Jonnalagadda Date: Tue Jan 7 18:05:10 2025 +0530 iio: proximity: Fix use-after-free in hx9023s_send_cfg() Reorder the assignment of fw_size to happen before release_firmware() to avoid accessing the firmware structure after it's been freed. Fixes: e9ed97be4fcc ("iio: proximity: hx9023s: Added firmware file parsing functionality") Closes: https://scan7.scan.coverity.com/#/project-view/52337/11354?selectedIssue=1602791 Signed-off-by: Dheeraj Reddy Jonnalagadda Reviewed-by: David Lechner Link: https://patch.msgid.link/20250107123510.44978-1-dheeraj.linuxdev@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/proximity/hx9023s.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit aa5119c36d19639397d29ef305aa53a5ecd72b27 Author: Nayab Sayed Date: Wed Jan 15 11:37:04 2025 +0530 iio: adc: at91-sama5d2_adc: fix sama7g5 realbits value The number of valid bits in SAMA7G5 ADC channel data register are 16. Hence changing the realbits value to 16 Fixes: 840bf6cb983f ("iio: adc: at91-sama5d2_adc: add support for sama7g5 device") Signed-off-by: Nayab Sayed Link: https://patch.msgid.link/20250115-fix-sama7g5-adc-realbits-v2-1-58a6e4087584@microchip.com Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/at91-sama5d2_adc.c | 68 ++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 28 deletions(-) commit 34d93804199fea23da2645dde35d0feb38a5d445 Author: Victor Duicu Date: Fri Jan 17 08:53:14 2025 +0200 iio: adc: pac1921: Move ACPI_FREE() to cover all branches This patch moves ACPI_FREE() in pac1921_match_acpi_device() in order to cover all branches. Reported-by: Andy Shevchenko Fixes: 9fdf1d033316 ("iio: adc: pac1921: Add ACPI support to Microchip pac1921") Acked-by: Matteo Martelli Signed-off-by: Victor Duicu Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250117065314.4431-1-victor.duicu@microchip.com Signed-off-by: Jonathan Cameron drivers/iio/adc/pac1921.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a96d3e2beca0e51c8444d0a3b6b3ec484c4c5a8f Author: Javier Carrasco Date: Sun Jan 12 01:08:11 2025 +0100 iio: light: apds9306: fix max_scale_nano values The two provided max_scale_nano values must be multiplied by 100 and 10 respectively to achieve nano units. According to the comments: Max scale for apds0306 is 16.326432 → the fractional part is 0.326432, which is 326432000 in NANO. The current value is 3264320. Max scale for apds0306-065 is 14.09721 → the fractional part is 0.09712, which is 97120000 in NANO. The current value is 9712000. Update max_scale_nano initialization to use the right NANO fractional parts. Cc: stable@vger.kernel.org Fixes: 620d1e6c7a3f ("iio: light: Add support for APDS9306 Light Sensor") Signed-off-by: Javier Carrasco Tested-by: subhajit.ghosh@tweaklogic.com Link: https://patch.msgid.link/20250112-apds9306_nano_vals-v1-1-82fb145d0b16@gmail.com Signed-off-by: Jonathan Cameron drivers/iio/light/apds9306.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d275a5e0c5f528b4b877ec683b8cd8bfced96af5 Author: Devarsh Thakkar Date: Mon Feb 3 21:24:31 2025 +0530 dt-bindings: display: ti: Fix compatible for am62a7 dss Fix incorrect format of compatible string (comma instead of hyphen) for TI's AM62A7 SoC. s/ti,am62a7,dss/ti,am62a7-dss Fixes: 7959ceb767e4 ("dt-bindings: display: ti: Add support for am62a7 dss") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Devarsh Thakkar Link: https://lore.kernel.org/r/20250203155431.2174170-1-devarsht@ti.com Signed-off-by: Rob Herring (Arm) Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9ab6591b45258b79af1cb66112fd9f83c8855da Author: Lucas De Marchi Date: Thu Jan 23 12:22:03 2025 -0800 drm/xe: Fix and re-enable xe_print_blob_ascii85() Commit 70fb86a85dc9 ("drm/xe: Revert some changes that break a mesa debug tool") partially reverted some changes to workaround breakage caused to mesa tools. However, in doing so it also broke fetching the GuC log via debugfs since xe_print_blob_ascii85() simply bails out. The fix is to avoid the extra newlines: the devcoredump interface is line-oriented and adding random newlines in the middle breaks it. If a tool is able to parse it by looking at the data and checking for chars that are out of the ascii85 space, it can still do so. A format change that breaks the line-oriented output on devcoredump however needs better coordination with existing tools. v2: Add suffix description comment v3: Reword explanation of xe_print_blob_ascii85() calling drm_puts() in a loop Reviewed-by: José Roberto de Souza Cc: John Harrison Cc: Julia Filipchuk Cc: José Roberto de Souza Cc: stable@vger.kernel.org Fixes: 70fb86a85dc9 ("drm/xe: Revert some changes that break a mesa debug tool") Fixes: ec1455ce7e35 ("drm/xe/devcoredump: Add ASCII85 dump helper function") Link: https://patchwork.freedesktop.org/patch/msgid/20250123202307.95103-2-jose.souza@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 2c95bbf5002776117a69caed3b31c10bf7341bec) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_devcoredump.c | 34 +++++++++++++--------------------- drivers/gpu/drm/xe/xe_devcoredump.h | 2 +- drivers/gpu/drm/xe/xe_guc_ct.c | 3 ++- drivers/gpu/drm/xe/xe_guc_log.c | 4 +++- 4 files changed, 19 insertions(+), 24 deletions(-) commit 042c48b73699c47d84b6ace73036e5a31a0d4cfc Author: Lucas De Marchi Date: Wed Jan 22 21:11:11 2025 -0800 drm/xe/devcoredump: Move exec queue snapshot to Contexts section Having the exec queue snapshot inside a "GuC CT" section was always wrong. Commit c28fd6c358db ("drm/xe/devcoredump: Improve section headings and add tile info") tried to fix that bug, but with that also broke the mesa tool that parses the devcoredump, hence it was reverted in commit a53da2fb25a3 ("drm/xe: Revert some changes that break a mesa debug tool"). With the mesa tool also fixed, this can propagate as a fix on both kernel and userspace side to avoid unnecessary headache for a debug feature. Cc: John Harrison Cc: Julia Filipchuk Cc: José Roberto de Souza Cc: stable@vger.kernel.org Fixes: a53da2fb25a3 ("drm/xe: Revert some changes that break a mesa debug tool") Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20250123051112.1938193-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit a37934ea75d331fafa7fe80b6180642ba5193422) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_devcoredump.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 990d35edc5d333ca6cd3acfdfc13683dc5bb105f Author: Ashutosh Dixit Date: Wed Jan 15 14:20:29 2025 -0800 drm/xe/oa: Set stream->pollin in xe_oa_buffer_check_unlocked We rely on stream->pollin to decide whether or not to block during poll/read calls. However, currently there are blocking read code paths which don't even set stream->pollin. The best place to consistently set stream->pollin for all code paths is therefore to set it in xe_oa_buffer_check_unlocked. Fixes: e936f885f1e9 ("drm/xe/oa/uapi: Expose OA stream fd") Signed-off-by: Ashutosh Dixit Acked-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20250115222029.3002103-1-ashutosh.dixit@intel.com (cherry picked from commit d3fedff828bb7e4a422c42caeafd5d974e24ee43) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_oa.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 9f706fd8024208b0686bb8ec68589d758f765672 Author: Michal Wajdeczko Date: Tue Jan 21 00:24:43 2025 +0100 drm/xe/pf: Fix migration initialization The migration support only needs to be initialized once, but it was incorrectly called from the xe_gt_sriov_pf_init_hw(), which is part of the reset flow and may be called multiple times. Fixes: d86e3737c7ab ("drm/xe/pf: Add functions to save and restore VF GuC state") Signed-off-by: Michal Wajdeczko Cc: Michał Winiarski Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20250120232443.544-1-michal.wajdeczko@intel.com (cherry picked from commit 9ebb5846e1a3b1705f8a7cbc528888a1aa0b163e) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/xe_gt.c | 4 +++- drivers/gpu/drm/xe/xe_gt_sriov_pf.c | 14 +++++++++++++- drivers/gpu/drm/xe/xe_gt_sriov_pf.h | 6 ++++++ 3 files changed, 22 insertions(+), 2 deletions(-) commit 588c20079e17dae9e1f49ba42981a05de1c9136e Author: Ashutosh Dixit Date: Thu Jan 16 19:21:55 2025 -0800 drm/xe/oa: Preserve oa_ctrl unused bits UMD's have interest in setting unused bits of the oa_ctrl register "out of band" for certain experiments. To facilitate this, don't clobber previous oa_ctrl unused bits, i.e. rmw the values rather than simply write them. Fixes: e936f885f1e9 ("drm/xe/oa/uapi: Expose OA stream fd") Signed-off-by: Ashutosh Dixit Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20250117032155.3048063-1-ashutosh.dixit@intel.com (cherry picked from commit cfa9d40db8c30d894171010fe765d96e9bc6a47e) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/xe/regs/xe_oa_regs.h | 6 ++++++ drivers/gpu/drm/xe/xe_oa.c | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) commit e01f07cb92513ca4b9b219ab9caa34d607bc1e2d Author: Lo-an Chen Date: Fri Jan 17 17:56:25 2025 +0800 drm/amd/display: Fix seamless boot sequence [WHY] When the system powers up eDP with external monitors in seamless boot sequence, stutter get enabled before TTU and HUBP registers being programmed, which resulting in underflow. [HOW] Enable TTU in hubp_init. Change the sequence that do not perpare_bandwidth and optimize_bandwidth while having seamless boot streams. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Nicholas Kazlauskas Signed-off-by: Lo-an Chen Signed-off-by: Paul Hsieh Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/hubbub/dcn30/dcn30_hubbub.c | 3 ++- drivers/gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c | 3 ++- drivers/gpu/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c | 3 ++- drivers/gpu/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c | 3 ++- drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c | 2 ++ drivers/gpu/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.c | 2 ++ drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 3 ++- 8 files changed, 15 insertions(+), 6 deletions(-) commit 8adbb2a98b00926315fd513b5fe2596b5716b82d Author: Alex Hung Date: Fri Jan 17 12:37:11 2025 -0700 drm/amd/display: Fix out-of-bound accesses [WHAT & HOW] hpo_stream_to_link_encoder_mapping has size MAX_HPO_DP2_ENCODERS(=4), but location can have size up to 6. As a result, it is necessary to check location against MAX_HPO_DP2_ENCODERS. Similiarly, disp_cfg_stream_location can be used as an array index which should be 0..5, so the ASSERT's conditions should be less without equal. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3904 Reviewed-by: Austin Zheng Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 2255b40cacc2e5ef1b127770fc1808c60de4a2fc Author: Marek Olšák Date: Fri Jan 24 09:43:45 2025 -0500 drm/amdgpu: add a BO metadata flag to disable write compression for Vulkan Vulkan can't support DCC and Z/S compression on GFX12 without WRITE_COMPRESS_DISABLE in this commit or a completely different DCC interface. AMDGPU_TILING_GFX12_SCANOUT is added because it's already used by userspace. Cc: stable@vger.kernel.org # 6.12.x Signed-off-by: Marek Olšák Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 2 ++ drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 5 +++-- include/uapi/drm/amdgpu_drm.h | 9 ++++++++- 5 files changed, 21 insertions(+), 6 deletions(-) commit f286757b644c226b6b31779da95a4fa7ab245ef5 Merge: a360f3ffd005 bb2784d9ab49 Author: Linus Torvalds Date: Mon Feb 3 09:10:56 2025 -0800 Merge tag 'timers-urgent-2025-02-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: - Properly cast the input to secs_to_jiffies() to unsigned long as otherwise the result uses the data type of the input variable, which causes result range checks to fail if the input data type is signed and smaller than unsigned long. - Handle late armed hrtimers gracefully on CPU hotplug There are legitimate cases where a hrtimer is (re)armed on an outgoing CPU after the timers have been migrated away. This triggers warnings and caused people to implement horrible workarounds in RCU. But those workarounds are incomplete and do not cover e.g. the scheduler hrtimers. Stop this by force moving timer which are enqueued on the current CPU after timer migration to be queued on a remote online CPU. This allows to undo the workarounds in a seperate step. - Demote a warning level printk() to info level in the clocksource watchdog code as there is no point to emit a warning level message for a purely informational message. - Mark a helper function __always_inline and move it into the existing #ifdef block to avoid 'unused function' warnings from CLANG * tag 'timers-urgent-2025-02-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: jiffies: Cast to unsigned long in secs_to_jiffies() conversion clocksource: Use pr_info() for "Checking clocksource synchronization" message hrtimers: Force migrate away hrtimers queued after CPUHP_AP_HRTIMERS_DYING hrtimers: Mark is_migration_base() with __always_inline commit a360f3ffd005fe00f002c033b2548aba57af8c9a Merge: 0a08238acfba 698244bbb3bf Author: Linus Torvalds Date: Mon Feb 3 09:04:21 2025 -0800 Merge tag 'irq-urgent-2025-02-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: - Ensure ordering of memory and device I/O for IPIs on RISCV The RISCV interrupt controllers use writel_relaxed() for generating an IPI. That's a device I/O write which is not guaranteed to be ordered against preceding memory writes. As a consequence a IPI receiving CPU might not be able to observe the actual IPI data which is required to handle it. Switch to writel() which contains the necessary memory barriers to enforce ordering. - Fix up the fallout of the MSI conversion in the MVEVBU ICU driver. The conversion failed to handle the change of the data storage and kept the original code which uses the domain::host_data pointer unchanged. After the conversion domain::host_data points to the new msi_domain_info structure and not longer to the MVEBU specific MSI data, which is now stored in a member of msi_domain_info. This leads to malfunction of the transalate() callback. - Only handle the PMC in FIQ mode when it is configured that way. The original check was incorrect as it did not explicitely check for the proper conditions, which led to malfunctions of the PMU interrupt. - Improve Kconfig dependencies for the LAN966x Outband Interrupt controller to avoid pointless pronmpts. * tag 'irq-urgent-2025-02-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/apple-aic: Only handle PMC interrupt as FIQ when configured so irqchip/irq-mvebu-icu: Fix access to msi_data from irq_domain::host_data irqchip/riscv: Ensure ordering of memory writes and IPI writes irqchip/lan966x-oic: Make CONFIG_LAN966X_OIC depend on CONFIG_MCHP_LAN966X_PCI dt-bindings: interrupt-controller: microchip,lan966x-oic: Clarify endpoint use commit 0a08238acfbaeb7d3605a5bec623ed1bc88734eb Merge: 2014c95afece a9ab28b3d21a Author: Linus Torvalds Date: Mon Feb 3 08:51:24 2025 -0800 Merge tag 'xfs-fixes-6.14-rc2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs bug fixes from Carlos Maiolino: "A few fixes for XFS, but the most notable one is: - xfs: remove xfs_buf_cache.bc_lock which has been hit by different persons including syzbot" * tag 'xfs-fixes-6.14-rc2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: remove xfs_buf_cache.bc_lock xfs: Add error handling for xfs_reflink_cancel_cow_range xfs: Propagate errors from xfs_reflink_cancel_cow_range in xfs_dax_write_iomap_end xfs: don't call remap_verify_area with sb write protection held xfs: remove an out of data comment in _xfs_buf_alloc xfs: fix the entry condition of exact EOF block allocation optimization commit 457bf49627ae19ba789c09e3960ab4cc41d6d129 Merge: 64b48ec36dbe c8ed6cb5d37b Author: Jens Axboe Date: Mon Feb 3 09:19:03 2025 -0700 Merge tag 'nvme-6.14-2025-01-31' of git://git.infradead.org/nvme into block-6.14 Pull NVMe fixes from Keith: "nvme fixes for Linux 6.14 - Connection fixes for fibre channel transport (Daniel) - Endian fixes (Keith, Christoph) - Cleanup fix for host memory buffer (Francis) - Platform specific power quirks (Georg) - Target memory leak (Sagi) - Use appropriate controller state accessor (Daniel)" * tag 'nvme-6.14-2025-01-31' of git://git.infradead.org/nvme: nvme-fc: use ctrl state getter nvme: make nvme_tls_attrs_group static nvmet: add a missing endianess conversion in nvmet_execute_admin_connect nvmet: the result field in nvmet_alloc_ctrl_args is little endian nvmet: fix a memory leak in controller identify nvme-fc: do not ignore connectivity loss during connecting nvme: handle connectivity loss in nvme_set_queue_count nvme-fc: go straight to connecting state when initializing nvme-pci: Add TUXEDO IBP Gen9 to Samsung sleep quirk nvme-pci: Add TUXEDO InfinityFlex to Samsung sleep quirk nvme-pci: remove redundant dma frees in hmb nvmet: fix rw control endian access commit da1668997052ed1cb00322e1f3b63702615c9429 Author: John Keeping Date: Thu Jan 30 19:50:34 2025 +0000 usb: gadget: f_midi: fix MIDI Streaming descriptor lengths While the MIDI jacks are configured correctly, and the MIDIStreaming endpoint descriptors are filled with the correct information, bNumEmbMIDIJack and bLength are set incorrectly in these descriptors. This does not matter when the numbers of in and out ports are equal, but when they differ the host will receive broken descriptors with uninitialized stack memory leaking into the descriptor for whichever value is smaller. The precise meaning of "in" and "out" in the port counts is not clearly defined and can be confusing. But elsewhere the driver consistently uses this to match the USB meaning of IN and OUT viewed from the host, so that "in" ports send data to the host and "out" ports receive data from it. Cc: stable Fixes: c8933c3f79568 ("USB: gadget: f_midi: allow a dynamic number of input and output ports") Signed-off-by: John Keeping Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20250130195035.3883857-1-jkeeping@inmusicbrands.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_midi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 58cd423820d5b5610977e55e4acdd06628829ede Author: Fabrice Gasnier Date: Fri Jan 24 18:33:25 2025 +0100 usb: dwc2: gadget: remove of_node reference upon udc_stop In dwc2_hsotg_udc_start(), e.g. when binding composite driver, "of_node" is set to hsotg->dev->of_node. It causes errors when binding the gadget driver several times, on stm32mp157c-ev1 board. Below error is seen: "pin PA10 already requested by 49000000.usb-otg; cannot claim for gadget.0" The first time, no issue is seen as when registering the driver, of_node isn't NULL: -> gadget_dev_desc_UDC_store -> usb_gadget_register_driver_owner -> driver_register ... -> really_probe -> pinctrl_bind_pins (no effect) Then dwc2_hsotg_udc_start() sets of_node. The second time (stop the gadget, reconfigure it, then start it again), of_node has been set, so the probing code tries to acquire pins for the gadget. These pins are hold by the controller, hence the error. So clear gadget.dev.of_node in udc_stop() routine to avoid the issue. Fixes: 7d7b22928b90 ("usb: gadget: s3c-hsotg: Propagate devicetree to gadget drivers") Cc: stable Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20250124173325.2747710-1-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc2/gadget.c | 1 + 1 file changed, 1 insertion(+) commit 2240fed37afbcdb5e8b627bc7ad986891100e05d Author: Alan Stern Date: Wed Jan 22 14:26:17 2025 -0500 USB: hub: Ignore non-compliant devices with too many configs or interfaces Robert Morris created a test program which can cause usb_hub_to_struct_hub() to dereference a NULL or inappropriate pointer: Oops: general protection fault, probably for non-canonical address 0xcccccccccccccccc: 0000 [#1] SMP DEBUG_PAGEALLOC PTI CPU: 7 UID: 0 PID: 117 Comm: kworker/7:1 Not tainted 6.13.0-rc3-00017-gf44d154d6e3d #14 Hardware name: FreeBSD BHYVE/BHYVE, BIOS 14.0 10/17/2021 Workqueue: usb_hub_wq hub_event RIP: 0010:usb_hub_adjust_deviceremovable+0x78/0x110 ... Call Trace: ? die_addr+0x31/0x80 ? exc_general_protection+0x1b4/0x3c0 ? asm_exc_general_protection+0x26/0x30 ? usb_hub_adjust_deviceremovable+0x78/0x110 hub_probe+0x7c7/0xab0 usb_probe_interface+0x14b/0x350 really_probe+0xd0/0x2d0 ? __pfx___device_attach_driver+0x10/0x10 __driver_probe_device+0x6e/0x110 driver_probe_device+0x1a/0x90 __device_attach_driver+0x7e/0xc0 bus_for_each_drv+0x7f/0xd0 __device_attach+0xaa/0x1a0 bus_probe_device+0x8b/0xa0 device_add+0x62e/0x810 usb_set_configuration+0x65d/0x990 usb_generic_driver_probe+0x4b/0x70 usb_probe_device+0x36/0xd0 The cause of this error is that the device has two interfaces, and the hub driver binds to interface 1 instead of interface 0, which is where usb_hub_to_struct_hub() looks. We can prevent the problem from occurring by refusing to accept hub devices that violate the USB spec by having more than one configuration or interface. Reported-and-tested-by: Robert Morris Cc: stable Closes: https://lore.kernel.org/linux-usb/95564.1737394039@localhost/ Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/c27f3bf4-63d8-4fb5-ac82-09e3cd19f61c@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 335a1fc1193481f8027f176649c72868172f6f8b Author: Guo Ren Date: Wed Jan 22 03:12:31 2025 -0500 usb: gadget: udc: renesas_usb3: Fix compiler warning drivers/usb/gadget/udc/renesas_usb3.c: In function 'renesas_usb3_probe': drivers/usb/gadget/udc/renesas_usb3.c:2638:73: warning: '%d' directive output may be truncated writing between 1 and 11 bytes into a region of size 6 [-Wformat-truncation=] 2638 | snprintf(usb3_ep->ep_name, sizeof(usb3_ep->ep_name), "ep%d", i); ^~~~~~~~~~~~~~~~~~~~~~~~ ^~ ^ Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller") Cc: stable@vger.kernel.org Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501201409.BIQPtkeB-lkp@intel.com/ Signed-off-by: Guo Ren Link: https://lore.kernel.org/r/20250122081231.47594-1-guoren@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/renesas_usb3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ed3af5a2aaefd0ecd887ecabdc8da07220e31fe Author: Thinh Nguyen Date: Tue Jan 21 23:11:23 2025 +0000 usb: dwc3: Document nostream_work Add missing description to the nostream_work of dwc3_ep. The work is used by bulk multi-stream endpoints for a NoStream event to reinitiate the stream if needed. Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/linux-next/20250120182219.30dcb3c6@canb.auug.org.au/ Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/7cdeaa346d24907712aac533c1c5f90a03151189.1737500936.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.h | 1 + 1 file changed, 1 insertion(+) commit 309005e448c1f3e4b81e4416406991b7c3339c1d Author: Alexander Stein Date: Mon Jan 20 15:42:51 2025 +0100 usb: phy: generic: Use proper helper for property detection Since commit c141ecc3cecd7 ("of: Warn when of_property_read_bool() is used on non-boolean properties") a warning is raised if this function is used for property detection. of_property_present() is the correct helper for this. Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20250120144251.580981-1-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/phy-generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e8b21410f310c50733f6e1730bae5a8e30d3570 Author: Selvarasu Ganesan Date: Sat Jan 18 11:31:33 2025 +0530 usb: gadget: f_midi: Fixing wMaxPacketSize exceeded issue during MIDI bind retries The current implementation sets the wMaxPacketSize of bulk in/out endpoints to 1024 bytes at the end of the f_midi_bind function. However, in cases where there is a failure in the first midi bind attempt, consider rebinding. This scenario may encounter an f_midi_bind issue due to the previous bind setting the bulk endpoint's wMaxPacketSize to 1024 bytes, which exceeds the ep->maxpacket_limit where configured dwc3 TX/RX FIFO's maxpacket size of 512 bytes for IN/OUT endpoints in support HS speed only. Here the term "rebind" in this context refers to attempting to bind the MIDI function a second time in certain scenarios. The situations where rebinding is considered include: * When there is a failure in the first UDC write attempt, which may be caused by other functions bind along with MIDI. * Runtime composition change : Example : MIDI,ADB to MIDI. Or MIDI to MIDI,ADB. This commit addresses this issue by resetting the wMaxPacketSize before endpoint claim. And here there is no need to reset all values in the usb endpoint descriptor structure, as all members except wMaxPacketSize and bEndpointAddress have predefined values. This ensures that restores the endpoint to its expected configuration, and preventing conflicts with value of ep->maxpacket_limit. It also aligns with the approach used in other function drivers, which treat endpoint descriptors as if they were full speed before endpoint claim. Fixes: 46decc82ffd5 ("usb: gadget: unconditionally allocate hs/ss descriptor in bind operation") Cc: stable@vger.kernel.org Signed-off-by: Selvarasu Ganesan Link: https://lore.kernel.org/r/20250118060134.927-1-selvarasu.g@samsung.com Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_midi.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3492321e2e60ddfe91aa438bb9ac209016f48f7a Author: Pavel Rojtberg Date: Mon Feb 3 07:22:27 2025 -0800 Input: xpad - add multiple supported devices This is based on multiple commits at https://github.com/paroj/xpad that had bouncing email addresses and were not signed off. Signed-off-by: Pavel Rojtberg Link: https://lore.kernel.org/r/20250123175404.23254-1-rojtberg@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 36e093c8dcc585d0a9e79a005f721f01f3365eba Author: Nilton Perim Neto Date: Mon Feb 3 07:13:09 2025 -0800 Input: xpad - add 8BitDo SN30 Pro, Hyperkin X91 and Gamesir G7 SE controllers Add 8BitDo SN30 Pro, Hyperkin X91 and Gamesir G7 SE to the list of recognized controllers, and update vendor comments to match. Signed-off-by: Nilton Perim Neto Link: https://lore.kernel.org/r/20250122214814.102311-2-niltonperimneto@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 4fd2707e3e71bfd5d4df4f4c9656a009f09dfc7e Author: Bence Csókás Date: Mon Feb 3 16:12:49 2025 +0100 spi: atmel-quadspi: Fix warning in doc-comment The doc-comment for `struct atmel_qspi_pcal` had a typo in one of the struct members' name, causing a warning with the `W=1` option. Fixes: 5af42209a4d2 ("spi: atmel-quadspi: Add support for sama7g5 QSPI") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501311707.Ltj0qXse-lkp@intel.com/ Signed-off-by: Bence Csókás Link: https://patch.msgid.link/20250203151249.79876-2-csokas.bence@prolan.hu Signed-off-by: Mark Brown drivers/spi/atmel-quadspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6bb05a33337b2c842373857b63de5c9bf1ae2a09 Author: Waiman Long Date: Fri Jan 31 12:33:23 2025 -0500 clocksource: Use migrate_disable() to avoid calling get_random_u32() in atomic context The following bug report happened with a PREEMPT_RT kernel: BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 2012, name: kwatchdog preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 get_random_u32+0x4f/0x110 clocksource_verify_choose_cpus+0xab/0x1a0 clocksource_verify_percpu.part.0+0x6b/0x330 clocksource_watchdog_kthread+0x193/0x1a0 It is due to the fact that clocksource_verify_choose_cpus() is invoked with preemption disabled. This function invokes get_random_u32() to obtain random numbers for choosing CPUs. The batched_entropy_32 local lock and/or the base_crng.lock spinlock in driver/char/random.c will be acquired during the call. In PREEMPT_RT kernel, they are both sleeping locks and so cannot be acquired in atomic context. Fix this problem by using migrate_disable() to allow smp_processor_id() to be reliably used without introducing atomic context. preempt_disable() is then called after clocksource_verify_choose_cpus() but before the clocksource measurement is being run to avoid introducing unexpected latency. Fixes: 7560c02bdffb ("clocksource: Check per-CPU clock synchronization when marked unstable") Suggested-by: Sebastian Andrzej Siewior Signed-off-by: Waiman Long Signed-off-by: Thomas Gleixner Reviewed-by: Paul E. McKenney Reviewed-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/all/20250131173323.891943-2-longman@redhat.com kernel/time/clocksource.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3cf3ec911d70ee7774978f639fd3364c98d42b2c Author: Guenter Roeck Date: Tue Jan 21 06:52:03 2025 -0800 drm/i915/backlight: Return immediately when scale() finds invalid parameters The scale() functions detects invalid parameters, but continues its calculations anyway. This causes bad results if negative values are used for unsigned operations. Worst case, a division by 0 error will be seen if source_min == source_max. On top of that, after v6.13, the sequence of WARN_ON() followed by clamp() may result in a build error with gcc 13.x. drivers/gpu/drm/i915/display/intel_backlight.c: In function 'scale': include/linux/compiler_types.h:542:45: error: call to '__compiletime_assert_415' declared with attribute error: clamp() low limit source_min greater than high limit source_max This happens if the compiler decides to rearrange the code as follows. if (source_min > source_max) { WARN(..); /* Do the clamp() knowing that source_min > source_max */ source_val = clamp(source_val, source_min, source_max); } else { /* Do the clamp knowing that source_min <= source_max */ source_val = clamp(source_val, source_min, source_max); } Fix the problem by evaluating the return values from WARN_ON and returning immediately after a warning. While at it, fix divide by zero error seen if source_min == source_max. Analyzed-by: Linus Torvalds Suggested-by: Linus Torvalds Suggested-by: David Laight Cc: David Laight Cc: Jani Nikula Cc: Andy Shevchenko Signed-off-by: Guenter Roeck Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20250121145203.2851237-1-linux@roeck-us.net Signed-off-by: Rodrigo Vivi (cherry picked from commit 6f71507415841d1a6d38118e5fa0eaf0caab9c17) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_backlight.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 985a44b02484a47f2c6ecbe971a5f0c47830120b Author: Ankit Nautiyal Date: Fri Jan 31 09:43:42 2025 +0530 drm/i915/dp: Return min bpc supported by source instead of 0 Currently, intel_dp_dsc_max_src_input_bpc can return 0 for platforms not supporting DSC, which could theoretically cause issues in clamp() due to a low limit being greater than the high limit. Instead, return the minimum bpc supported by the source to prevent such issues. Reported-by: Linux Kernel Functional Testing Closes: https://lore.kernel.org/all/CA+G9fYtNfM399_=_ff81zeRJv=0+z7oFJfPGmJgTp6yrJmU+1w@mail.gmail.com/ Fixes: 160672b86b0d ("drm/i915/dp: Use clamp for pipe_bpp limits with DSC") Cc: Suraj Kandpal Cc: Jani Nikula Cc: Rodrigo Vivi Signed-off-by: Ankit Nautiyal Reviewed-by: Suraj Kandpal Tested-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/20250131041342.3086716-1-ankit.k.nautiyal@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit a67221b5eb8d59fb7e1f0df3ef9945b6a0f32cca) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4466302262b38f5e6c65325035b4036a42efc934 Author: Ankit Nautiyal Date: Thu Jan 30 10:46:06 2025 +0530 drm/i915/dp: fix the Adaptive sync Operation mode for SDP Currently we support Adaptive sync operation mode with dynamic frame rate, but instead the operation mode with fixed rate is set. This was initially set correctly in the earlier version of changes but later got changed, while defining a macro for the same. Fixes: a5bd5991cb8a ("drm/i915/display: Compute AS SDP parameters") Cc: Mitul Golani Cc: Ankit Nautiyal Cc: Jani Nikula Reviewed-by: Mitul Golani Signed-off-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20250130051609.1796524-4-mitulkumar.ajitkumar.golani@intel.com (cherry picked from commit c5806862543ff6c2ad242409fcdf0667eac26dae) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_dp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 57965269896313e1629a518d3971ad55f599b792 Author: Daniele Ceraolo Spurio Date: Tue Jan 14 16:13:34 2025 -0800 drm/i915/guc: Debug print LRC state entries only if the context is pinned After the context is unpinned the backing memory can also be unpinned, so any accesses via the lrc_reg_state pointer can end up in unmapped memory. To avoid that, make sure to only access that memory if the context is pinned when printing its info. v2: fix newline alignment Fixes: 28ff6520a34d ("drm/i915/guc: Update GuC debugfs to support new GuC") Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Matthew Brost Cc: # v5.15+ Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20250115001334.3875347-1-daniele.ceraolospurio@intel.com (cherry picked from commit 5bea40687c5cf2a33bf04e9110eb2e2b80222ef5) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit c7b49506b3ba7a62335e6f666a43f67d5cd9fd1e Author: Ville Syrjälä Date: Wed Dec 18 19:36:47 2024 +0200 drm/i915: Drop 64bpp YUV formats from ICL+ SDR planes I'm seeing underruns with these 64bpp YUV formats on TGL. The weird details: - only happens on pipe B/C/D SDR planes, pipe A SDR planes seem fine, as do all HDR planes - somehow CDCLK related, higher CDCLK allows for bigger plane with these formats without underruns. With 300MHz CDCLK I can only go up to 1200 pixels wide or so, with 650MHz even a 3840 pixel wide plane was OK - ICL and ADL so far appear unaffected So not really sure what's the deal with this, but bspec does state "64-bit formats supported only on the HDR planes" so let's just drop these formats from the SDR planes. We already disallow 64bpp RGB formats. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20241218173650.19782-2-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila (cherry picked from commit 35e1aacfe536d6e8d8d440cd7155366da2541ad4) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/skl_universal_plane.c | 4 ---- 1 file changed, 4 deletions(-) commit fa6182c8b13ebfdc70ebdc09161a70dd8131f3b1 Author: Brian Geffon Date: Mon Jan 27 15:43:32 2025 -0500 drm/i915: Fix page cleanup on DMA remap failure When converting to folios the cleanup path of shmem_get_pages() was missed. When a DMA remap fails and the max segment size is greater than PAGE_SIZE it will attempt to retry the remap with a PAGE_SIZEd segment size. The cleanup code isn't properly using the folio apis and as a result isn't handling compound pages correctly. v2 -> v3: (Ville) Just use shmem_sg_free_table() as-is in the failure path of shmem_get_pages(). shmem_sg_free_table() will clear mapping unevictable but it will be reset when it retries in shmem_sg_alloc_table(). v1 -> v2: (Ville) Fixed locations where we were not clearing mapping unevictable. Cc: stable@vger.kernel.org Cc: Ville Syrjala Cc: Vidya Srinivas Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13487 Link: https://lore.kernel.org/lkml/20250116135636.410164-1-bgeffon@google.com/ Fixes: 0b62af28f249 ("i915: convert shmem_sg_free_table() to use a folio_batch") Signed-off-by: Brian Geffon Suggested-by: Tomasz Figa Link: https://patchwork.freedesktop.org/patch/msgid/20250127204332.336665-1-bgeffon@google.com Reviewed-by: Jonathan Cavitt Tested-by: Vidya Srinivas Signed-off-by: Ville Syrjälä (cherry picked from commit 9e304a18630875352636ad52a3d2af47c3bde824) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit cb5fab2afd906307876d79537ef0329033c40dd3 Author: Umesh Nerlige Ramappa Date: Thu Jan 23 11:38:39 2025 -0800 drm/i915/pmu: Fix zero delta busyness issue When running igt@gem_exec_balancer@individual for multiple iterations, it is seen that the delta busyness returned by PMU is 0. The issue stems from a combination of 2 implementation specific details: 1) gt_park is throttling __update_guc_busyness_stats() so that it does not hog PCI bandwidth for some use cases. (Ref: 59bcdb564b3ba) 2) busyness implementation always returns monotonically increasing counters. (Ref: cf907f6d29421) If an application queried an engine while it was active, engine->stats.guc.running is set to true. Following that, if all PM wakeref's are released, then gt is parked. At this time the throttling of __update_guc_busyness_stats() may result in a missed update to the running state of the engine (due to (1) above). This means subsequent calls to guc_engine_busyness() will think that the engine is still running and they will keep updating the cached counter (stats->total). This results in an inflated cached counter. Later when the application runs a workload and queries for busyness, we return the cached value since it is larger than the actual value (due to (2) above) All subsequent queries will return the same large (inflated) value, so the application sees a delta busyness of zero. Fix the issue by resetting the running state of engines each time intel_guc_busyness_park() is called. v2: (Rodrigo) - Use the correct tag in commit message - Drop the redundant wakeref check in guc_engine_busyness() and update commit message Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13366 Fixes: cf907f6d2942 ("i915/guc: Ensure busyness counter increases motonically") Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20250123193839.2394694-1-umesh.nerlige.ramappa@intel.com (cherry picked from commit 431b742e2bfc9f6dd713f261629741980996d001) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 8dd5a5eb6a209e3bdb4e536e36698400445c6c2e Author: Suraj Kandpal Date: Fri Jan 17 09:42:48 2025 +0530 drm/i915/hdcp: Use correct function to check if encoder is HDMI Use intel_encoder_is_hdmi function which was recently introduced to see if encoder is HDMI or not. --v2 -Add Fixes tag [Jani] Fixes: 6a3691ca4799 ("drm/i915/hdcp: Disable HDCP Line Rekeying for HDCP2.2 on HDMI") Signed-off-by: Suraj Kandpal Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20250117041247.1084381-1-suraj.kandpal@intel.com (cherry picked from commit 2499212e21601740ed7d5563563f39cf7e7d833a) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_hdcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 448060463198924c0a485e7e1622fa8a9c03cf3e Author: Suraj Kandpal Date: Tue Dec 17 14:07:23 2024 +0530 drm/i915/hdcp: Fix Repeater authentication during topology change When topology changes, before beginning a new HDCP authentication by sending AKE_init message we need to first authenticate only the repeater. Only after repeater authentication failure, it makes sense to start a new HDCP authentication. Even though it made sense to not enable HDCP directly from check_link and schedule it for later, repeater authentication needs to be done immediately. --v2 -Fix comment grammatical errors [Ankit] Fixes: 47ef55a8b784 ("drm/i915/hdcp: Don't enable HDCP2.2 directly from check_link") Signed-off-by: Suraj Kandpal Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20241217083723.2883317-1-suraj.kandpal@intel.com (cherry picked from commit 605a33e765890e4f1345315afc25268d4ae0fb7c) Signed-off-by: Rodrigo Vivi drivers/gpu/drm/i915/display/intel_hdcp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 0a7404fc5399e1100b14e7e2a4af2e4fd5e3b602 Author: Andy Shevchenko Date: Mon Feb 3 15:10:30 2025 +0200 pinctrl: cy8c95x0: Rename PWMSEL to SELPWM There are two registers in the hardware, one, "Select PWM", is per-port configuration enabling PWM function instead of GPIO. The other one is "PWM Select" is per-PWM selector to configure PWM itself. Original code uses abbreviation of the latter to describe the former. Rename it to follow the datasheet. Fixes: e6cbbe42944d ("pinctrl: Add Cypress cy8c95x0 support") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/20250203131506.3318201-5-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-cy8c95x0.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit aac4470fa6e695e4d6ac94cc77d4690b57f1d2bc Author: Andy Shevchenko Date: Mon Feb 3 15:10:29 2025 +0200 pinctrl: cy8c95x0: Enable regmap locking for debug When regmap locking is disabled, debugfs is also disabled. Enable locking for debug when CONFIG_DEBUG_PINCTRL is set. Fixes: f71aba339a66 ("pinctrl: cy8c95x0: Use single I2C lock") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/20250203131506.3318201-4-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-cy8c95x0.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3fbe3fe28764455e4fc3578afb9765f46f9ce93d Author: Andy Shevchenko Date: Mon Feb 3 15:10:28 2025 +0200 pinctrl: cy8c95x0: Avoid accessing reserved registers The checks for vrtual registers in the cy8c95x0_readable_register() and cy8c95x0_writeable_register() are not aligned and broken. Fix that by explicitly avoiding reserved registers to be accessed. Fixes: 71e4001a0455 ("pinctrl: pinctrl-cy8c95x0: Fix regcache") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/20250203131506.3318201-3-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-cy8c95x0.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 6f36f103cff1737094f2187b1f9a7b312820d377 Author: Andy Shevchenko Date: Mon Feb 3 15:10:27 2025 +0200 pinctrl: cy8c95x0: Fix off-by-one in the regmap range settings The range_max is inclusive, so we need to use the number of the last accessible register address. Fixes: 8670de9fae49 ("pinctrl: cy8c95x0: Use regmap ranges") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/20250203131506.3318201-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-cy8c95x0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c9ccb88f534ca760d06590b67571c353a2f0cbcd Author: H. Nikolaus Schaller Date: Sat Feb 1 12:43:24 2025 +0100 Input: ads7846 - fix gpiod allocation commit 767d83361aaa ("Input: ads7846 - Convert to use software nodes") has simplified the code but accidentially converted a devm_gpiod_get() to gpiod_get(). This leaves the gpio reserved on module remove and the driver can no longer be loaded again. Fixes: 767d83361aaa ("Input: ads7846 - Convert to use software nodes") Cc: stable@vger.kernel.org Signed-off-by: H. Nikolaus Schaller Link: https://lore.kernel.org/r/6e9b143f19cdfda835711a8a7a3966e5a2494cff.1738410204.git.hns@goldelico.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ads7846.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e68abf2b9cebe76c6cd4b1aca8e95cd671035a3 Author: Andy-ld Lu Date: Thu Jan 23 17:26:01 2025 +0800 mmc: mtk-sd: Fix register settings for hs400(es) mode For hs400(es) mode, the 'hs400-ds-delay' is typically configured in the dts. However, some projects may only define 'mediatek,hs400-ds-dly3', which can lead to initialization failures in hs400es mode. CMD13 reported response crc error in the mmc_switch_status() just after switching to hs400es mode. [ 1.914038][ T82] mmc0: mmc_select_hs400es failed, error -84 [ 1.914954][ T82] mmc0: error -84 whilst initialising MMC card Currently, the hs400_ds_dly3 value is set within the tuning function. This means that the PAD_DS_DLY3 field is not configured before tuning process, which is the reason for the above-mentioned CMD13 response crc error. Move the PAD_DS_DLY3 field configuration into msdc_prepare_hs400_tuning(), and add a value check of hs400_ds_delay to prevent overwriting by zero when the 'hs400-ds-delay' is not set in the dts. In addition, since hs400(es) only tune the PAD_DS_DLY1, the PAD_DS_DLY2_SEL bit should be cleared to bypass it. Fixes: c4ac38c6539b ("mmc: mtk-sd: Add HS400 online tuning support") Signed-off-by: Andy-ld Lu Reviewed-by: AngeloGioacchino Del Regno Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250123092644.7359-1-andy-ld.lu@mediatek.com Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) commit ac5a41b472b4ef8bb37d7550796d059b377b4646 Author: Josua Mayer Date: Mon Jan 27 21:12:02 2025 +0100 Revert "mmc: sdhci_am654: Add sdhci_am654_start_signal_voltage_switch" This reverts commit 941a7abd4666912b84ab209396fdb54b0dae685d. This commit uses presence of device-tree properties vmmc-supply and vqmmc-supply for deciding whether to enable a quirk affecting timing of clock and data. The intention was to address issues observed with eMMC and SD on AM62 platforms. This new quirk is however also enabled for AM64 breaking microSD access on the SolidRun HimmingBoard-T which is supported in-tree since v6.11, causing a regression. During boot microSD initialization now fails with the error below: [ 2.008520] mmc1: SDHCI controller on fa00000.mmc [fa00000.mmc] using ADMA 64-bit [ 2.115348] mmc1: error -110 whilst initialising SD card The heuristics for enabling the quirk are clearly not correct as they break at least one but potentially many existing boards. Revert the change and restore original behaviour until a more appropriate method of selecting the quirk is derived. Fixes: 941a7abd4666 ("mmc: sdhci_am654: Add sdhci_am654_start_signal_voltage_switch") Closes: https://lore.kernel.org/linux-mmc/a70fc9fc-186f-4165-a652-3de50733763a@solid-run.com/ Cc: stable@vger.kernel.org Signed-off-by: Josua Mayer Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20250127-am654-mmc-regression-v2-1-9bb39fb12810@solid-run.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci_am654.c | 30 ------------------------------ 1 file changed, 30 deletions(-) commit 98380110bd48fbfd6a798ee11fffff893d36062c Author: Chris Morgan Date: Fri Jan 31 17:14:51 2025 -0600 power: supply: axp20x_battery: Fix fault handling for AXP717 Correct the fault handling for the AXP717 by changing the i2c write from regmap_update_bits() to regmap_write_bits(). The update bits function does not work properly on a RW1C register where we must write a 1 back to an existing register to clear it. Additionally, as part of this testing I confirmed the behavior of errors reappearing, so remove comment about assumptions. Fixes: 6625767049c2 ("power: supply: axp20x_battery: add support for AXP717") Signed-off-by: Chris Morgan Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20250131231455.153447-2-macroalpha82@gmail.com Signed-off-by: Sebastian Reichel drivers/power/supply/axp20x_battery.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 12d044770e12c4205fa69535b4fa8a9981fea98f Author: Mark Zhang Date: Sun Jan 19 14:39:46 2025 +0200 IB/mlx5: Set and get correct qp_num for a DCT QP When a DCT QP is created on an active lag, it's dctc.port is assigned in a round-robin way, which is from 1 to dev->lag_port. In this case when querying this QP, we may get qp_attr.port_num > 2. Fix this by setting qp->port when modifying a DCT QP, and read port_num from qp->port instead of dctc.port when querying it. Fixes: 7c4b1ab9f167 ("IB/mlx5: Add DCT RoCE LAG support") Signed-off-by: Mark Zhang Reviewed-by: Maher Sanalla Link: https://patch.msgid.link/94c76bf0adbea997f87ffa27674e0a7118ad92a9.1737290358.git.leon@kernel.org Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/qp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d97505baea64d93538b16baf14ce7b8c1fbad746 Author: Yishai Hadas Date: Sun Jan 19 14:36:13 2025 +0200 RDMA/mlx5: Fix the recovery flow of the UMR QP This patch addresses an issue in the recovery flow of the UMR QP, ensuring tasks do not get stuck, as highlighted by the call trace [1]. During recovery, before transitioning the QP to the RESET state, the software must wait for all outstanding WRs to complete. Failing to do so can cause the firmware to skip sending some flushed CQEs with errors and simply discard them upon the RESET, as per the IB specification. This race condition can result in lost CQEs and tasks becoming stuck. To resolve this, the patch sends a final WR which serves only as a barrier before moving the QP state to RESET. Once a CQE is received for that final WR, it guarantees that no outstanding WRs remain, making it safe to transition the QP to RESET and subsequently back to RTS, restoring proper functionality. Note: For the barrier WR, we simply reuse the failed and ready WR. Since the QP is in an error state, it will only receive IB_WC_WR_FLUSH_ERR. However, as it serves only as a barrier we don't care about its status. [1] INFO: task rdma_resource_l:1922 blocked for more than 120 seconds. Tainted: G W 6.12.0-rc7+ #1626 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:rdma_resource_l state:D stack:0 pid:1922 tgid:1922 ppid:1369 flags:0x00004004 Call Trace: __schedule+0x420/0xd30 schedule+0x47/0x130 schedule_timeout+0x280/0x300 ? mark_held_locks+0x48/0x80 ? lockdep_hardirqs_on_prepare+0xe5/0x1a0 wait_for_completion+0x75/0x130 mlx5r_umr_post_send_wait+0x3c2/0x5b0 [mlx5_ib] ? __pfx_mlx5r_umr_done+0x10/0x10 [mlx5_ib] mlx5r_umr_revoke_mr+0x93/0xc0 [mlx5_ib] __mlx5_ib_dereg_mr+0x299/0x520 [mlx5_ib] ? _raw_spin_unlock_irq+0x24/0x40 ? wait_for_completion+0xfe/0x130 ? rdma_restrack_put+0x63/0xe0 [ib_core] ib_dereg_mr_user+0x5f/0x120 [ib_core] ? lock_release+0xc6/0x280 destroy_hw_idr_uobject+0x1d/0x60 [ib_uverbs] uverbs_destroy_uobject+0x58/0x1d0 [ib_uverbs] uobj_destroy+0x3f/0x70 [ib_uverbs] ib_uverbs_cmd_verbs+0x3e4/0xbb0 [ib_uverbs] ? __pfx_uverbs_destroy_def_handler+0x10/0x10 [ib_uverbs] ? __lock_acquire+0x64e/0x2080 ? mark_held_locks+0x48/0x80 ? find_held_lock+0x2d/0xa0 ? lock_acquire+0xc1/0x2f0 ? ib_uverbs_ioctl+0xcb/0x170 [ib_uverbs] ? __fget_files+0xc3/0x1b0 ib_uverbs_ioctl+0xe7/0x170 [ib_uverbs] ? ib_uverbs_ioctl+0xcb/0x170 [ib_uverbs] __x64_sys_ioctl+0x1b0/0xa70 do_syscall_64+0x6b/0x140 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f99c918b17b RSP: 002b:00007ffc766d0468 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ffc766d0578 RCX: 00007f99c918b17b RDX: 00007ffc766d0560 RSI: 00000000c0181b01 RDI: 0000000000000003 RBP: 00007ffc766d0540 R08: 00007f99c8f99010 R09: 000000000000bd7e R10: 00007f99c94c1c70 R11: 0000000000000246 R12: 00007ffc766d0530 R13: 000000000000001c R14: 0000000040246a80 R15: 0000000000000000 Fixes: 158e71bb69e3 ("RDMA/mlx5: Add a umr recovery flow") Signed-off-by: Yishai Hadas Reviewed-by: Michael Guralnik Link: https://patch.msgid.link/27b51b92ec42dfb09d8096fcbd51878f397ce6ec.1737290141.git.leon@kernel.org Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/umr.c | 83 +++++++++++++++++++++++++++------------- 1 file changed, 56 insertions(+), 27 deletions(-) commit 64dd6edfc421479e416301c48b79cece8d0351fc Author: Hans de Goede Date: Thu Jan 30 15:00:35 2025 +0100 power: supply: core: Fix extension related lockdep warning Since commit 6037802bbae8 ("power: supply: core: implement extension API") there is the following ABBA deadlock (simplified) between the LED trigger code and the power-supply code: 1) When registering a power-supply class device, power_supply_register() calls led_trigger_register() from power_supply_create_triggers() in a scoped_guard(rwsem_read, &psy->extensions_sem) context. led_trigger_register() then in turn takes a LED subsystem lock. So here we have the following locking order: * Read-lock extensions_sem * Lock LED subsystem lock(s) 2) When registering a LED class device, with its default trigger set to a power-supply LED trigger (which has already been registered) The LED class code calls power_supply_led_trigger_activate() when setting up the default trigger. power_supply_led_trigger_activate() calls power_supply_get_property() to determine the initial value of to assign to the LED and that read-locks extensions_sem. So now we have the following locking order: * Lock LED subsystem lock(s) * Read-lock extensions_sem Fixing this is easy, there is no need to hold the extensions_sem when calling power_supply_create_triggers() since all triggers are always created rather then checking for the presence of certain attributes as power_supply_add_hwmon_sysfs() does. Move power_supply_create_triggers() out of the guard block to fix this. Here is the lockdep report fixed by this change: [ 31.249343] ====================================================== [ 31.249378] WARNING: possible circular locking dependency detected [ 31.249413] 6.13.0-rc6+ #251 Tainted: G C E [ 31.249440] ------------------------------------------------------ [ 31.249471] (udev-worker)/553 is trying to acquire lock: [ 31.249501] ffff892adbcaf660 (&psy->extensions_sem){.+.+}-{4:4}, at: power_supply_get_property.part.0+0x22/0x150 [ 31.249574] but task is already holding lock: [ 31.249603] ffff892adbc0bad0 (&led_cdev->trigger_lock){+.+.}-{4:4}, at: led_trigger_set_default+0x34/0xe0 [ 31.249657] which lock already depends on the new lock. [ 31.249696] the existing dependency chain (in reverse order) is: [ 31.249735] -> #2 (&led_cdev->trigger_lock){+.+.}-{4:4}: [ 31.249778] down_write+0x3b/0xd0 [ 31.249803] led_trigger_set_default+0x34/0xe0 [ 31.249833] led_classdev_register_ext+0x311/0x3a0 [ 31.249863] input_leds_connect+0x1dc/0x2a0 [ 31.249889] input_attach_handler.isra.0+0x75/0x90 [ 31.249921] input_register_device.cold+0xa1/0x150 [ 31.249955] hidinput_connect+0x8a2/0xb80 [ 31.249982] hid_connect+0x582/0x5c0 [ 31.250007] hid_hw_start+0x3f/0x60 [ 31.250030] hid_device_probe+0x122/0x1f0 [ 31.250053] really_probe+0xde/0x340 [ 31.250080] __driver_probe_device+0x78/0x110 [ 31.250105] driver_probe_device+0x1f/0xa0 [ 31.250132] __device_attach_driver+0x85/0x110 [ 31.250160] bus_for_each_drv+0x78/0xc0 [ 31.250184] __device_attach+0xb0/0x1b0 [ 31.250207] bus_probe_device+0x94/0xb0 [ 31.250230] device_add+0x64a/0x860 [ 31.250252] hid_add_device+0xe5/0x240 [ 31.250279] usbhid_probe+0x4dc/0x620 [ 31.250303] usb_probe_interface+0xe4/0x2a0 [ 31.250329] really_probe+0xde/0x340 [ 31.250353] __driver_probe_device+0x78/0x110 [ 31.250377] driver_probe_device+0x1f/0xa0 [ 31.250404] __device_attach_driver+0x85/0x110 [ 31.250431] bus_for_each_drv+0x78/0xc0 [ 31.250455] __device_attach+0xb0/0x1b0 [ 31.250478] bus_probe_device+0x94/0xb0 [ 31.250501] device_add+0x64a/0x860 [ 31.250523] usb_set_configuration+0x606/0x8a0 [ 31.250552] usb_generic_driver_probe+0x3e/0x60 [ 31.250579] usb_probe_device+0x3d/0x120 [ 31.250605] really_probe+0xde/0x340 [ 31.250629] __driver_probe_device+0x78/0x110 [ 31.250653] driver_probe_device+0x1f/0xa0 [ 31.250680] __device_attach_driver+0x85/0x110 [ 31.250707] bus_for_each_drv+0x78/0xc0 [ 31.250731] __device_attach+0xb0/0x1b0 [ 31.250753] bus_probe_device+0x94/0xb0 [ 31.250776] device_add+0x64a/0x860 [ 31.250798] usb_new_device.cold+0x141/0x38f [ 31.250828] hub_event+0x1166/0x1980 [ 31.250854] process_one_work+0x20f/0x580 [ 31.250879] worker_thread+0x1d1/0x3b0 [ 31.250904] kthread+0xee/0x120 [ 31.250926] ret_from_fork+0x30/0x50 [ 31.250954] ret_from_fork_asm+0x1a/0x30 [ 31.250982] -> #1 (triggers_list_lock){++++}-{4:4}: [ 31.251022] down_write+0x3b/0xd0 [ 31.251045] led_trigger_register+0x40/0x1b0 [ 31.251074] power_supply_register_led_trigger+0x88/0x150 [ 31.251107] power_supply_create_triggers+0x55/0xe0 [ 31.251135] __power_supply_register.part.0+0x34e/0x4a0 [ 31.251164] devm_power_supply_register+0x70/0xc0 [ 31.251190] bq27xxx_battery_setup+0x1a1/0x6d0 [bq27xxx_battery] [ 31.251235] bq27xxx_battery_i2c_probe+0xe5/0x17f [bq27xxx_battery_i2c] [ 31.251272] i2c_device_probe+0x125/0x2b0 [ 31.251299] really_probe+0xde/0x340 [ 31.251324] __driver_probe_device+0x78/0x110 [ 31.251348] driver_probe_device+0x1f/0xa0 [ 31.251375] __driver_attach+0xba/0x1c0 [ 31.251398] bus_for_each_dev+0x6b/0xb0 [ 31.251421] bus_add_driver+0x111/0x1f0 [ 31.251445] driver_register+0x6e/0xc0 [ 31.251470] i2c_register_driver+0x41/0xb0 [ 31.251498] do_one_initcall+0x5e/0x3a0 [ 31.251522] do_init_module+0x60/0x220 [ 31.251550] __do_sys_init_module+0x15f/0x190 [ 31.251575] do_syscall_64+0x93/0x180 [ 31.251598] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 31.251629] -> #0 (&psy->extensions_sem){.+.+}-{4:4}: [ 31.251668] __lock_acquire+0x13ce/0x21c0 [ 31.251694] lock_acquire+0xcf/0x2e0 [ 31.251719] down_read+0x3e/0x170 [ 31.251741] power_supply_get_property.part.0+0x22/0x150 [ 31.251774] power_supply_update_leds+0x8d/0x230 [ 31.251804] power_supply_led_trigger_activate+0x18/0x20 [ 31.251837] led_trigger_set+0x1fc/0x300 [ 31.251863] led_trigger_set_default+0x90/0xe0 [ 31.251892] led_classdev_register_ext+0x311/0x3a0 [ 31.251921] devm_led_classdev_multicolor_register_ext+0x6e/0xb80 [led_class_multicolor] [ 31.251969] ktd202x_probe+0x464/0x5c0 [leds_ktd202x] [ 31.252002] i2c_device_probe+0x125/0x2b0 [ 31.252027] really_probe+0xde/0x340 [ 31.252052] __driver_probe_device+0x78/0x110 [ 31.252076] driver_probe_device+0x1f/0xa0 [ 31.252103] __driver_attach+0xba/0x1c0 [ 31.252125] bus_for_each_dev+0x6b/0xb0 [ 31.252148] bus_add_driver+0x111/0x1f0 [ 31.252172] driver_register+0x6e/0xc0 [ 31.252197] i2c_register_driver+0x41/0xb0 [ 31.252225] do_one_initcall+0x5e/0x3a0 [ 31.252248] do_init_module+0x60/0x220 [ 31.252274] __do_sys_init_module+0x15f/0x190 [ 31.253986] do_syscall_64+0x93/0x180 [ 31.255826] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 31.257614] other info that might help us debug this: [ 31.257619] Chain exists of: &psy->extensions_sem --> triggers_list_lock --> &led_cdev->trigger_lock [ 31.257630] Possible unsafe locking scenario: [ 31.257632] CPU0 CPU1 [ 31.257633] ---- ---- [ 31.257634] lock(&led_cdev->trigger_lock); [ 31.257637] lock(triggers_list_lock); [ 31.257640] lock(&led_cdev->trigger_lock); [ 31.257643] rlock(&psy->extensions_sem); [ 31.257646] *** DEADLOCK *** [ 31.289433] 4 locks held by (udev-worker)/553: [ 31.289443] #0: ffff892ad9658108 (&dev->mutex){....}-{4:4}, at: __driver_attach+0xaf/0x1c0 [ 31.289463] #1: ffff892adbc0bbc8 (&led_cdev->led_access){+.+.}-{4:4}, at: led_classdev_register_ext+0x1c7/0x3a0 [ 31.289476] #2: ffffffffad0e30b0 (triggers_list_lock){++++}-{4:4}, at: led_trigger_set_default+0x2c/0xe0 [ 31.289487] #3: ffff892adbc0bad0 (&led_cdev->trigger_lock){+.+.}-{4:4}, at: led_trigger_set_default+0x34/0xe0 Fixes: 6037802bbae8 ("power: supply: core: implement extension API") Cc: Thomas Weißschuh Cc: Armin Wolf Signed-off-by: Hans de Goede Reviewed-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20250130140035.20636-1-hdegoede@redhat.com Signed-off-by: Sebastian Reichel drivers/power/supply/power_supply_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3fb3cb4350befc4f901c54e0cb4a2a47b1302e08 Author: Andrey Vatoropin Date: Thu Jan 30 09:00:34 2025 +0000 power: supply: da9150-fg: fix potential overflow Size of variable sd_gain equals four bytes - DA9150_QIF_SD_GAIN_SIZE. Size of variable shunt_val equals two bytes - DA9150_QIF_SHUNT_VAL_SIZE. The expression sd_gain * shunt_val is currently being evaluated using 32-bit arithmetic. So during the multiplication an overflow may occur. As the value of type 'u64' is used as storage for the eventual result, put ULL variable at the first position of each expression in order to give the compiler complete information about the proper arithmetic to use. According to C99 the guaranteed width for a variable of type 'unsigned long long' >= 64 bits. Remove the explicit cast to u64 as it is meaningless. Just for the sake of consistency, perform the similar trick with another expression concerning 'iavg'. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: a419b4fd9138 ("power: Add support for DA9150 Fuel-Gauge") Signed-off-by: Andrey Vatoropin Link: https://lore.kernel.org/r/20250130090030.53422-1-a.vatoropin@crpt.ru Signed-off-by: Sebastian Reichel drivers/power/supply/da9150-fg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 05c4ede6951b5d8e083b6bb237950cac59bdeb92 Author: Vicki Pfau Date: Wed Jan 15 17:28:16 2025 -0800 HID: hid-steam: Fix issues with disabling both gamepad mode and lizard mode When lizard mode is disabled, there were two issues: 1. Switching between gamepad mode and desktop mode still functioned, even though desktop mode did not. This lead to the ability to "break" gamepad mode by holding down the Options key even while lizard mode is disabled 2. If you were in desktop mode when lizard mode is disabled, you would immediately enter this faulty mode. This patch properly disables the ability to switch between gamepad mode and the faulty desktop mode by holding the Options key, as well as effectively removing the faulty mode by bypassing the early returns if lizard mode is disabled. Reported-by: Eugeny Shcheglov Signed-off-by: Vicki Pfau Signed-off-by: Jiri Kosina drivers/hid/hid-steam.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 363236d709e75610b628c2a4337ccbe42e454b6d Author: Chia-Lin Kao (AceLan) Date: Wed Jan 15 15:00:20 2025 +0800 HID: ignore non-functional sensor in HP 5MP Camera The HP 5MP Camera (USB ID 0408:5473) reports 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. [453] hid-sensor-hub 0003:0408:5473.0003: Report latency attributes: ffffffff:ffffffff [453] hid-sensor-hub 0003:0408:5473.0003: common attributes: 5:1, 2:1, 3:1 ffffffff:ffffffff Add this device 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) Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/hid-quirks.c | 1 + 2 files changed, 2 insertions(+) commit 235174b2bed88501fda689c113c55737f99332d8 Author: Yan Zhai Date: Fri Jan 31 00:31:39 2025 -0800 udp: gso: do not drop small packets when PMTU reduces Commit 4094871db1d6 ("udp: only do GSO if # of segs > 1") avoided GSO for small packets. But the kernel currently dismisses GSO requests only after checking MTU/PMTU on gso_size. This means any packets, regardless of their payload sizes, could be dropped when PMTU becomes smaller than requested gso_size. We encountered this issue in production and it caused a reliability problem that new QUIC connection cannot be established before PMTU cache expired, while non GSO sockets still worked fine at the same time. Ideally, do not check any GSO related constraints when payload size is smaller than requested gso_size, and return EMSGSIZE instead of EINVAL on MTU/PMTU check failure to be more specific on the error cause. Fixes: 4094871db1d6 ("udp: only do GSO if # of segs > 1") Signed-off-by: Yan Zhai Suggested-by: Willem de Bruijn Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller net/ipv4/udp.c | 4 ++-- net/ipv6/udp.c | 4 ++-- tools/testing/selftests/net/udpgso.c | 26 ++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 4 deletions(-) commit e0efe83ed325277bb70f9435d4d9fc70bebdcca8 Author: Lenny Szubowicz Date: Thu Jan 30 16:57:54 2025 -0500 tg3: Disable tg3 PCIe AER on system reboot Disable PCIe AER on the tg3 device on system reboot on a limited list of Dell PowerEdge systems. This prevents a fatal PCIe AER event on the tg3 device during the ACPI _PTS (prepare to sleep) method for S5 on those systems. The _PTS is invoked by acpi_enter_sleep_state_prep() as part of the kernel's reboot sequence as a result of commit 38f34dba806a ("PM: ACPI: reboot: Reinstate S5 for reboot"). There was an earlier fix for this problem by commit 2ca1c94ce0b6 ("tg3: Disable tg3 device on system reboot to avoid triggering AER"). But it was discovered that this earlier fix caused a reboot hang when some Dell PowerEdge servers were booted via ipxe. To address this reboot hang, the earlier fix was essentially reverted by commit 9fc3bc764334 ("tg3: power down device only on SYSTEM_POWER_OFF"). This re-exposed the tg3 PCIe AER on reboot problem. This fix is not an ideal solution because the root cause of the AER is in system firmware. Instead, it's a targeted work-around in the tg3 driver. Note also that the PCIe AER must be disabled on the tg3 device even if the system is configured to use "firmware first" error handling. V3: - Fix sparse warning on improper comparison of pdev->current_state - Adhere to netdev comment style Fixes: 9fc3bc764334 ("tg3: power down device only on SYSTEM_POWER_OFF") Signed-off-by: Lenny Szubowicz Reviewed-by: Pavan Chebbi Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/tg3.c | 58 +++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit a5a056c8d2ba60017dffb914bdf92c5562defc48 Author: Arnd Bergmann Date: Thu Jan 23 14:48:12 2025 +0100 HID: intel-thc: fix CONFIG_HID dependency In drivers/hid/, most drivers depend on CONFIG_HID, while a couple of the drivers in subdirectories instead depend on CONFIG_HID_SUPPORT and use 'select HID'. With the newly added INTEL_THC_HID, this causes a build warning for a circular dependency: WARNING: unmet direct dependencies detected for HID Depends on [m]: HID_SUPPORT [=y] && INPUT [=m] Selected by [y]: - INTEL_THC_HID [=y] && HID_SUPPORT [=y] && X86_64 [=y] && PCI [=y] && ACPI [=y] WARNING: unmet direct dependencies detected for INPUT_FF_MEMLESS Depends on [m]: INPUT [=m] Selected by [y]: - HID_MICROSOFT [=y] && HID_SUPPORT [=y] && HID [=y] - GREENASIA_FF [=y] && HID_SUPPORT [=y] && HID [=y] && HID_GREENASIA [=y] - HID_WIIMOTE [=y] && HID_SUPPORT [=y] && HID [=y] && LEDS_CLASS [=y] - ZEROPLUS_FF [=y] && HID_SUPPORT [=y] && HID [=y] && HID_ZEROPLUS [=y] Selected by [m]: - HID_ACRUX_FF [=y] && HID_SUPPORT [=y] && HID [=y] && HID_ACRUX [=m] - HID_EMS_FF [=m] && HID_SUPPORT [=y] && HID [=y] - HID_GOOGLE_STADIA_FF [=m] && HID_SUPPORT [=y] && HID [=y] - PANTHERLORD_FF [=y] && HID_SUPPORT [=y] && HID [=y] && HID_PANTHERLORD [=m] It's better to be consistent and always use 'depends on HID' for HID drivers. The notable exception here is USB_KBD/USB_MOUSE, which are alternative implementations that do not depend on the HID subsystem. Do this by extending the "if HID" section below, which means that a few of the duplicate "depends on HID" and "depends on INPUT" statements can be removed in the process. Fixes: 1b2d05384c29 ("HID: intel-thc-hid: Add basic THC driver skeleton") Signed-off-by: Arnd Bergmann Reviewed-by: Ilpo Järvinen Reviewed-by: Maximilian Luz Reviewed-by: Even Xu Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 10 ++++++---- drivers/hid/amd-sfh-hid/Kconfig | 1 - drivers/hid/i2c-hid/Kconfig | 2 +- drivers/hid/intel-ish-hid/Kconfig | 1 - drivers/hid/intel-thc-hid/Kconfig | 1 - drivers/hid/surface-hid/Kconfig | 2 -- drivers/hid/usbhid/Kconfig | 3 +-- net/bluetooth/hidp/Kconfig | 3 +-- 8 files changed, 9 insertions(+), 14 deletions(-) commit 52572cde8b4a44676557ccb67b035291833112c5 Author: Arnd Bergmann Date: Wed Jan 22 07:50:57 2025 +0100 HID: lenovo: select CONFIG_ACPI_PLATFORM_PROFILE A previous patch tried to fix this link failure: x86_64-linux-ld: drivers/hid/hid-lenovo.o: in function `lenovo_raw_event': hid-lenovo.c:(.text+0x22c): undefined reference to `platform_profile_cycle' but got it wrong in three ways: - the link failure still exists with CONFIG_ACPI_PLATFORM_PROFILE=m when hid-lenovo is built-in - There is no way to manually enable CONFIG_ACPI_PLATFORM_PROFILE, as it is intended to be selected by its users. Remove the broken #if check again and instead select the symbol like the other users do. This requires adding a dependency on CONFIG_ACPI. Fixes: 52e7d1f7c2fd ("HID: lenovo: Fix undefined platform_profile_cycle in ThinkPad X12 keyboard patch") Signed-off-by: Arnd Bergmann Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 2 ++ drivers/hid/hid-lenovo.c | 7 +------ 2 files changed, 3 insertions(+), 6 deletions(-) commit 7e0d1cff12b895f44f4ddc8cf50311bc1f775201 Author: Zhang Lixu Date: Wed Jan 22 09:29:01 2025 +0800 HID: intel-ish-hid: Send clock sync message immediately after reset The ISH driver performs a clock sync with the firmware once at system startup and then every 20 seconds. If a firmware reset occurs right after a clock sync, the driver would wait 20 seconds before performing another clock sync with the firmware. This is particularly problematic with the introduction of the "load firmware from host" feature, where the driver performs a clock sync with the bootloader and then has to wait 20 seconds before syncing with the main firmware. This patch clears prev_sync immediately upon receiving an IPC reset, so that the main firmware and driver will perform a clock sync immediately after completing the IPC handshake. Signed-off-by: Zhang Lixu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/ipc.c | 9 ++++++--- drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) commit 4b54ae69197b9f416baa0fceadff7e89075f8454 Author: Zhang Lixu Date: Wed Jan 22 09:29:00 2025 +0800 HID: intel-ish-hid: fix the length of MNG_SYNC_FW_CLOCK in doorbell The timestamps in the Firmware log and HID sensor samples are incorrect. They show 1970-01-01 because the current IPC driver only uses the first 8 bytes of bootup time when synchronizing time with the firmware. The firmware converts the bootup time to UTC time, which results in the display of 1970-01-01. In write_ipc_from_queue(), when sending the MNG_SYNC_FW_CLOCK message, the clock is updated according to the definition of ipc_time_update_msg. However, in _ish_sync_fw_clock(), the message length is specified as the size of uint64_t when building the doorbell. As a result, the firmware only receives the first 8 bytes of struct ipc_time_update_msg. This patch corrects the length in the doorbell to ensure the entire ipc_time_update_msg is sent, fixing the timestamp issue. Signed-off-by: Zhang Lixu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/ipc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c098363828f7006ef5c5121b673bc5e26571e6c8 Author: Stuart Hayhurst Date: Tue Jan 21 20:00:08 2025 +0000 HID: corsair-void: Initialise memory for psy_cfg power_supply_config psy_cfg was missing its initialiser, add it in. Fixes: 6ea2a6fd3872 ("HID: corsair-void: Add Corsair Void headset family driver") Cc: stable@vger.kernel.org Signed-off-by: Stuart Hayhurst Signed-off-by: Jiri Kosina drivers/hid/hid-corsair-void.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48e487b002891eb0aeaec704c9bed51f028deff1 Author: Stuart Hayhurst Date: Tue Jan 21 20:00:07 2025 +0000 HID: corsair-void: Add missing delayed work cancel for headset status The cancel_delayed_work_sync() call was missed, causing a use-after-free in corsair_void_remove(). Reported-by: yan kang Reported-by: yue sun Closes: https://lore.kernel.org/all/SY8P300MB042106286A2536707D2FB736A1E42@SY8P300MB0421.AUSP300.PROD.OUTLOOK.COM/ Closes: https://lore.kernel.org/all/SY8P300MB0421872E0AE934C9616FA61EA1E42@SY8P300MB0421.AUSP300.PROD.OUTLOOK.COM/ Fixes: 6ea2a6fd3872 ("HID: corsair-void: Add Corsair Void headset family driver") Cc: stable@vger.kernel.org Signed-off-by: Stuart Hayhurst Signed-off-by: Jiri Kosina drivers/hid/hid-corsair-void.c | 1 + 1 file changed, 1 insertion(+) commit a1d939055a22be06d8c12bf53afb258b9d38575f Author: Andy Yan Date: Mon Jan 13 18:47:34 2025 +0800 arm64: dts: rockchip: Fix lcdpwr_en pin for Cool Pi GenBook According to the schematic, the lcdpwr_en pin is GPIO0_C4, not GPIO1_C4. Fixes: 4a8c1161b843 ("arm64: dts: rockchip: Add support for rk3588 based Cool Pi CM5 GenBook") Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20250113104825.2390427-1-andyshrk@163.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-genbook.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2f9eb5262e63396a315c7da34a6c80c5d335df9f Author: Heiko Stuebner Date: Thu Jan 16 15:36:31 2025 +0100 arm64: dts: rockchip: fix fixed-regulator renames on rk3399-gru devices rk3399-gru chromebooks have a regulator chains where one named regulator supplies multiple regulators pp900-usb pp900_pcie that supply the named peripherals. The dtsi used somewhat creative structure to describe that in creating the base node 3 times with different phandles and describing the EC dependency in a comment. This didn't register in the recent regulator-node renaming, as the additional nodes were empty, so adapt the missing node names for now. Fixes: 5c96e6330197 ("arm64: dts: rockchip: adapt regulator nodenames to preferred form") Tested-by: Vicente Bergas Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20250116143631.3650469-1-heiko@sntech.de .../boot/dts/rockchip/rk3399-gru-chromebook.dtsi | 8 ++++---- .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi | 6 +++--- arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 22 +++++++++++----------- 3 files changed, 18 insertions(+), 18 deletions(-) commit 5ae4dca718eacd0a56173a687a3736eb7e627c77 Author: Lukasz Czechowski Date: Tue Jan 21 13:56:04 2025 +0100 arm64: dts: rockchip: Disable DMA for uart5 on px30-ringneck UART controllers without flow control seem to behave unstable in case DMA is enabled. The issues were indicated in the message: https://lore.kernel.org/linux-arm-kernel/CAMdYzYpXtMocCtCpZLU_xuWmOp2Ja_v0Aj0e6YFNRA-yV7u14g@mail.gmail.com/ In case of PX30-uQ7 Ringneck SoM, it was noticed that after couple of hours of UART communication, the CPU stall was occurring, leading to the system becoming unresponsive. After disabling the DMA, extensive UART communication tests for up to two weeks were performed, and no issues were further observed. The flow control pins for uart5 are not available on PX30-uQ7 Ringneck, as configured by pinctrl-0, so the DMA nodes were removed on SoM dtsi. Cc: stable@vger.kernel.org Fixes: c484cf93f61b ("arm64: dts: rockchip: add PX30-µQ7 (Ringneck) SoM with Haikou baseboard") Reviewed-by: Quentin Schulz Signed-off-by: Lukasz Czechowski Link: https://lore.kernel.org/r/20250121125604.3115235-3-lukasz.czechowski@thaumatec.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 41a2d8286c905614f29007f1bc8e652d54654b82 Author: Jacek Lawrynowicz Date: Wed Jan 29 13:40:09 2025 +0100 accel/ivpu: Fix error handling in recovery/reset Disable runtime PM for the duration of reset/recovery so it is possible to set the correct runtime PM state depending on the outcome of the `ivpu_resume()`. Don’t suspend or reset the HW if the NPU is suspended when the reset/recovery is requested. Also, move common reset/recovery code to separate functions for better code readability. Fixes: 27d19268cf39 ("accel/ivpu: Improve recovery and reset support") Cc: stable@vger.kernel.org # v6.8+ Reviewed-by: Maciej Falkowski Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20250129124009.1039982-4-jacek.lawrynowicz@linux.intel.com drivers/accel/ivpu/ivpu_pm.c | 79 ++++++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 36 deletions(-) commit f2bc2afe34c107a02ce829a4039e85514feafe55 Author: Jacek Lawrynowicz Date: Wed Jan 29 13:40:08 2025 +0100 accel/ivpu: Clear runtime_error after pm_runtime_resume_and_get() fails pm_runtime_resume_and_get() sets dev->power.runtime_error that causes all subsequent pm_runtime_get_sync() calls to fail. Clear the runtime_error using pm_runtime_set_suspended(), so the driver doesn't have to be reloaded to recover when the NPU fails to boot during runtime resume. Fixes: 7d4b4c74432d ("accel/ivpu: Remove suspend_reschedule_counter") Cc: stable@vger.kernel.org # v6.11+ Reviewed-by: Maciej Falkowski Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20250129124009.1039982-3-jacek.lawrynowicz@linux.intel.com drivers/accel/ivpu/ivpu_pm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f3be8a9b1afffbcc70f8e41063b151b1038d7813 Author: Jacek Lawrynowicz Date: Wed Jan 29 13:40:07 2025 +0100 accel/ivpu: Fix error handling in ivpu_boot() Ensure IRQs and IPC are properly disabled if HW sched or DCT initialization fails. Fixes: cc3c72c7e610 ("accel/ivpu: Refactor failure diagnostics during boot") Cc: stable@vger.kernel.org # v6.13+ Reviewed-by: Karol Wachowski Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20250129124009.1039982-2-jacek.lawrynowicz@linux.intel.com drivers/accel/ivpu/ivpu_drv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4eee627ea59304cdd66c5d4194ef13486a6c44fc Author: Lukasz Czechowski Date: Tue Jan 21 13:56:03 2025 +0100 arm64: dts: rockchip: Move uart5 pin configuration to px30 ringneck SoM In the PX30-uQ7 (Ringneck) SoM, the hardware CTS and RTS pins for uart5 cannot be used for the UART CTS/RTS, because they are already allocated for different purposes. CTS pin is routed to SUS_S3# signal, while RTS pin is used internally and is not available on Q7 connector. Move definition of the pinctrl-0 property from px30-ringneck-haikou.dts to px30-ringneck.dtsi. This commit is a dependency to next commit in the patch series, that disables DMA for uart5. Cc: stable@vger.kernel.org Reviewed-by: Quentin Schulz Signed-off-by: Lukasz Czechowski Link: https://lore.kernel.org/r/20250121125604.3115235-2-lukasz.czechowski@thaumatec.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/px30-ringneck-haikou.dts | 1 - arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) commit a6a7cba17c544fb95d5a29ab9d9ed4503029cb29 Author: Tianling Shen Date: Sun Jan 19 17:11:54 2025 +0800 arm64: dts: rockchip: change eth phy mode to rgmii-id for orangepi r1 plus lts In general the delay should be added by the PHY instead of the MAC, and this improves network stability on some boards which seem to need different delay. Fixes: 387b3bbac5ea ("arm64: dts: rockchip: Add Xunlong OrangePi R1 Plus LTS") Cc: stable@vger.kernel.org # 6.6+ Signed-off-by: Tianling Shen Link: https://lore.kernel.org/r/20250119091154.1110762-1-cnsztl@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts | 3 +-- arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts | 1 + arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dtsi | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) commit 5c8f9a05336cf5cadbd57ad461621b386aadb762 Author: Alexander Shiyan Date: Thu Jan 30 08:38:49 2025 +0300 arm64: dts: rockchip: Fix broken tsadc pinctrl names for rk3588 The tsadc driver does not handle pinctrl "gpio" and "otpout". Let's use the correct pinctrl names "default" and "sleep". Additionally, Alexey Charkov's testing [1] has established that it is necessary for pinctrl state to reference the &tsadc_shut_org configuration rather than &tsadc_shut for the driver to function correctly. [1] https://lkml.org/lkml/2025/1/24/966 Fixes: 32641b8ab1a5 ("arm64: dts: rockchip: add rk3588 thermal sensor") Cc: stable@vger.kernel.org Reviewed-by: Dragan Simic Signed-off-by: Alexander Shiyan Link: https://lore.kernel.org/r/20250130053849.4902-1-eagle.alexander923@gmail.com Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 583ef25bb2a094813351a727ddec38b35a15b9f8 Author: Dmitry Kandybka Date: Fri Jan 24 01:07:39 2025 +0300 platform/x86/intel: pmc: fix ltr decode in pmc_core_ltr_show() In pmc_core_ltr_show(), promote 'val' to 'u64' to avoid possible integer overflow. Values (10 bit) are multiplied by the scale, the result of expression is in a range from 1 to 34,326,183,936 which is bigger then UINT32_MAX. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Kandybka Reviewed-by: Rajneesh Bhardwaj Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250123220739.68087-1-d.kandybka@gmail.com Signed-off-by: Ilpo Järvinen drivers/platform/x86/intel/pmc/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4d4648eac8b4ef39f412d07715eb26f1ccd7342 Author: Fedor Pchelkin Date: Tue Jan 28 00:02:01 2025 +0300 platform/x86: ideapad-laptop: pass a correct pointer to the driver data devm_platform_profile_register() expects a pointer to the private driver data but instead an address of the pointer variable is passed due to a typo. This leads to the crashes later: BUG: unable to handle page fault for address: 00000000fe0d0044 PGD 0 P4D 0 Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 6 UID: 0 PID: 1284 Comm: tuned Tainted: G W 6.13.0+ #7 Tainted: [W]=WARN Hardware name: LENOVO 21D0/LNVNB161216, BIOS J6CN45WW 03/17/2023 RIP: 0010:__mutex_lock.constprop.0+0x6bf/0x7f0 Call Trace: dytc_profile_set+0x4a/0x140 [ideapad_laptop] _store_and_notify+0x13/0x40 [platform_profile] class_for_each_device+0x145/0x180 platform_profile_store+0xc0/0x130 [platform_profile] kernfs_fop_write_iter+0x13e/0x1f0 vfs_write+0x290/0x450 ksys_write+0x6c/0xe0 do_syscall_64+0x82/0x160 entry_SYSCALL_64_after_hwframe+0x76/0x7e Found by Linux Verification Center (linuxtesting.org). Fixes: 249c576f0f9d ("ACPI: platform_profile: Let drivers set drvdata to the class device") Signed-off-by: Fedor Pchelkin Reviewed-by: Kurt Borja Link: https://lore.kernel.org/r/20250127210202.568691-1-pchelkin@ispras.ru Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/ideapad-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa803513ab68ba07369643393f1754b845160030 Author: Lifeng Zheng Date: Fri Jan 10 17:19:49 2025 +0800 cpufreq/amd-pstate: Fix per-policy boost flag incorrect when fail Commit c8c68c38b56f ("cpufreq: amd-pstate: initialize core precision boost state") sets per-policy boost flag to false when boost fail. However, this boost flag will be set to reverse value in store_local_boost() and cpufreq_boost_trigger_state() in cpufreq.c. This will cause the per-policy boost flag set to true when fail to set boost. Remove the extra assignment in amd_pstate_set_boost() and keep all operations on per-policy boost flag outside of set_boost() to fix this problem. Fixes: c8c68c38b56f ("cpufreq: amd-pstate: initialize core precision boost state") Signed-off-by: Lifeng Zheng Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20250110091949.3610770-1-zhenglifeng1@huawei.com Signed-off-by: Mario Limonciello drivers/cpufreq/amd-pstate.c | 1 - 1 file changed, 1 deletion(-) commit e6649328dc07bff6227367eda6f1b2263d6c10f0 Author: Thomas Weißschuh Date: Wed Jan 29 14:35:27 2025 +0100 of: address: Add kunit test for __of_address_resource_bounds() The overflow checking has to deal with different datatypes and edgecases. Add a new kunit testcase to make sure it works correctly. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20250129-of-address-overflow-v3-1-95d1760ed791@linutronix.de Signed-off-by: Rob Herring (Arm) drivers/of/address.c | 5 +- drivers/of/of_private.h | 4 ++ drivers/of/of_test.c | 119 +++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 126 insertions(+), 2 deletions(-) commit 3e86e57356f0e2284454d82c7200807c6fa9e65b Author: Imran Shaik Date: Thu Jan 9 14:27:48 2025 +0530 dt-bindings: clock: qcom: Add QCS8300 video clock controller The QCS8300 video clock controller is a derivative of SA8775P, but QCS8300 has minor difference. Hence, reuse the SA8775P videocc bindings for QCS8300 platform. Acked-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Imran Shaik Link: https://lore.kernel.org/r/20250109-qcs8300-mm-patches-new-v4-5-63e8ac268b02@quicinc.com Signed-off-by: Rob Herring (Arm) Documentation/devicetree/bindings/clock/qcom,sa8775p-videocc.yaml | 1 + 1 file changed, 1 insertion(+) commit 0e193cc558e32a879c717bb2d53a1cf8628b5d20 Author: Imran Shaik Date: Thu Jan 9 14:27:46 2025 +0530 dt-bindings: clock: qcom: Add CAMCC clocks for QCS8300 The QCS8300 camera clock controller is a derivative of SA8775P, but has an additional clock and minor differences. Hence, reuse the SA8775P camera bindings and add additional clock required for QCS8300. Reviewed-by: Vladimir Zapolskiy Acked-by: Krzysztof Kozlowski Signed-off-by: Imran Shaik Link: https://lore.kernel.org/r/20250109-qcs8300-mm-patches-new-v4-3-63e8ac268b02@quicinc.com Signed-off-by: Rob Herring (Arm) .../devicetree/bindings/clock/qcom,sa8775p-camcc.yaml | 6 +++++- include/dt-bindings/clock/qcom,qcs8300-camcc.h | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) commit f0ada00a9b3801b71d203b0033b7612b687b7d72 Author: Imran Shaik Date: Thu Jan 9 14:27:44 2025 +0530 dt-bindings: clock: qcom: Add GPU clocks for QCS8300 The QCS8300 GPU clock controller is a derivative of SA8775P, but has few additional clocks and minor differences. Hence, reuse gpucc bindings of SA8775P and add additional clocks required for QCS8300. Acked-by: Krzysztof Kozlowski Signed-off-by: Imran Shaik Link: https://lore.kernel.org/r/20250109-qcs8300-mm-patches-new-v4-1-63e8ac268b02@quicinc.com Signed-off-by: Rob Herring (Arm) Documentation/devicetree/bindings/clock/qcom,gpucc.yaml | 3 +++ include/dt-bindings/clock/qcom,qcs8300-gpucc.h | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) commit 64b48ec36dbed561ab1cd99708c33d96f4b7b729 Author: Stephen Rothwell Date: Mon Feb 3 12:47:17 2025 +1100 drivers/block/sunvdc.c: update the correct AIP call My sparc64 defconfig build failed like this: drivers/block/sunvdc.c: In function 'vdc_queue_drain': drivers/block/sunvdc.c:1130:9: error: too many arguments to function 'blk_mq_unquiesce_queue' 1130 | blk_mq_unquiesce_queue(q, memflags); | ^~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/block/sunvdc.c:10: include/linux/blk-mq.h:895:6: note: declared here 895 | void blk_mq_unquiesce_queue(struct request_queue *q); | ^~~~~~~~~~~~~~~~~~~~~~ drivers/block/sunvdc.c:1131:9: error: too few arguments to function 'blk_mq_unfreeze_queue' 1131 | blk_mq_unfreeze_queue(q); | ^~~~~~~~~~~~~~~~~~~~~ In file included from drivers/block/sunvdc.c:10: include/linux/blk-mq.h:914:1: note: declared here 914 | blk_mq_unfreeze_queue(struct request_queue *q, unsigned int memflags) | ^~~~~~~~~~~~~~~~~~~~~ Fixes: 1e1a9cecfab3 ("block: force noio scope in blk_mq_freeze_queue") Cc: Christoph Hellwig Cc: Jens Axboe Signed-off-by: Stephen Rothwell Signed-off-by: Jens Axboe drivers/block/sunvdc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a8c9a453387640dbe45761970f41301a6985e7fa Author: Nikita Zhandarovich Date: Thu Jan 16 06:24:36 2025 -0800 ASoC: fsl_micfil: Enable default case in micfil_set_quality() If 'micfil->quality' received from micfil_quality_set() somehow ends up with an unpredictable value, switch() operator will fail to initialize local variable qsel before regmap_update_bits() tries to utilize it. While it is unlikely, play it safe and enable a default case that returns -EINVAL error. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: bea1d61d5892 ("ASoC: fsl_micfil: rework quality setting") Cc: stable@vger.kernel.org Signed-off-by: Nikita Zhandarovich Link: https://patch.msgid.link/20250116142436.22389-1-n.zhandarovich@fintech.ru Signed-off-by: Mark Brown sound/soc/fsl/fsl_micfil.c | 2 ++ 1 file changed, 2 insertions(+) commit 2014c95afecee3e76ca4a56956a936e23283f05b Author: Linus Torvalds Date: Sun Feb 2 15:39:26 2025 -0800 Linux 6.14-rc1 Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d79bc8f79baacdd2549ec4af6d963ce3e69d7330 Merge: 5d82ca7b5019 2c4627c8ced7 Author: Linus Torvalds Date: Sun Feb 2 10:49:13 2025 -0800 Merge tag 'turbostat-2025.02.02' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull turbostat updates from Len Brown: - Fix regression that affinitized forked child in one-shot mode. - Harden one-shot mode against hotplug online/offline - Enable RAPL SysWatt column by default - Add initial PTL, CWF platform support - Harden initial PMT code in response to early use - Enable first built-in PMT counter: CWF c1e residency - Refuse to run on unsupported platforms without --force, to encourage updating to a version that supports the system, and to avoid no-so-useful measurement results * tag 'turbostat-2025.02.02' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (25 commits) tools/power turbostat: version 2025.02.02 tools/power turbostat: Add CPU%c1e BIC for CWF tools/power turbostat: Harden one-shot mode against cpu offline tools/power turbostat: Fix forked child affinity regression tools/power turbostat: Add tcore clock PMT type tools/power turbostat: version 2025.01.14 tools/power turbostat: Allow adding PMT counters directly by sysfs path tools/power turbostat: Allow mapping multiple PMT files with the same GUID tools/power turbostat: Add PMT directory iterator helper tools/power turbostat: Extend PMT identification with a sequence number tools/power turbostat: Return default value for unmapped PMT domains tools/power turbostat: Check for non-zero value when MSR probing tools/power turbostat: Enhance turbostat self-performance visibility tools/power turbostat: Add fixed RAPL PSYS divisor for SPR tools/power turbostat: Fix PMT mmaped file size rounding tools/power turbostat: Remove SysWatt from DISABLED_BY_DEFAULT tools/power turbostat: Add an NMI column tools/power turbostat: add Busy% to "show idle" tools/power turbostat: Introduce --force parameter tools/power turbostat: Improve --help output ... commit 5d82ca7b5019d880a579831278eb73cbbfdb87da Merge: a86bf2283d2c 909f3c55d887 Author: Linus Torvalds Date: Sun Feb 2 10:40:27 2025 -0800 Merge tag 'sh-for-v6.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux Pull sh updates from John Paul Adrian Glaubitz: "Fixes and improvements for sh: - replace seq_printf() with the more efficient seq_put_decimal_ull_width() to increase performance when stress reading /proc/interrupts (David Wang) - migrate sh to the generic rule for built-in DTB to help avoid race conditions during parallel builds which can occur because Kbuild decends into arch/*/boot/dts twice (Masahiro Yamada) - replace select with imply in the board Kconfig for enabling hardware with complex dependencies. This addresses warnings which were reported by the kernel test robot (Geert Uytterhoeven)" * tag 'sh-for-v6.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux: sh: boards: Use imply to enable hardware with complex dependencies sh: Migrate to the generic rule for built-in DTB sh: irq: Use seq_put_decimal_ull_width() for decimal values commit 029b6ce733712a41421955194b113f283dcb1026 Author: Changwoo Min Date: Sun Feb 2 12:37:48 2025 +0900 sched_ext: Fix incorrect time delta calculation in time_delta() When (s64)(after - before) > 0, the code returns the result of (s64)(after - before) > 0 while the intended result should be (s64)(after - before). That happens because the middle operand of the ternary operator was omitted incorrectly, returning the result of (s64)(after - before) > 0. Thus, add the middle operand -- (s64)(after - before) -- to return the correct time calculation. Fixes: d07be814fc71 ("sched_ext: Add time helpers for BPF schedulers") Signed-off-by: Changwoo Min Acked-by: Andrea Righi Signed-off-by: Tejun Heo tools/sched_ext/include/scx/common.bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b69bb476dee99d564d65d418e9a20acca6f32c3f Author: Shakeel Butt Date: Thu Jan 30 16:05:42 2025 -0800 cgroup: fix race between fork and cgroup.kill Tejun reported the following race between fork() and cgroup.kill at [1]. Tejun: I was looking at cgroup.kill implementation and wondering whether there could be a race window. So, __cgroup_kill() does the following: k1. Set CGRP_KILL. k2. Iterate tasks and deliver SIGKILL. k3. Clear CGRP_KILL. The copy_process() does the following: c1. Copy a bunch of stuff. c2. Grab siglock. c3. Check fatal_signal_pending(). c4. Commit to forking. c5. Release siglock. c6. Call cgroup_post_fork() which puts the task on the css_set and tests CGRP_KILL. The intention seems to be that either a forking task gets SIGKILL and terminates on c3 or it sees CGRP_KILL on c6 and kills the child. However, I don't see what guarantees that k3 can't happen before c6. ie. After a forking task passes c5, k2 can take place and then before the forking task reaches c6, k3 can happen. Then, nobody would send SIGKILL to the child. What am I missing? This is indeed a race. One way to fix this race is by taking cgroup_threadgroup_rwsem in write mode in __cgroup_kill() as the fork() side takes cgroup_threadgroup_rwsem in read mode from cgroup_can_fork() to cgroup_post_fork(). However that would be heavy handed as this adds one more potential stall scenario for cgroup.kill which is usually called under extreme situation like memory pressure. To fix this race, let's maintain a sequence number per cgroup which gets incremented on __cgroup_kill() call. On the fork() side, the cgroup_can_fork() will cache the sequence number locally and recheck it against the cgroup's sequence number at cgroup_post_fork() site. If the sequence numbers mismatch, it means __cgroup_kill() can been called and we should send SIGKILL to the newly created task. Reported-by: Tejun Heo Closes: https://lore.kernel.org/all/Z5QHE2Qn-QZ6M-KW@slm.duckdns.org/ [1] Fixes: 661ee6280931 ("cgroup: introduce cgroup.kill") Cc: stable@vger.kernel.org # v5.14+ Signed-off-by: Shakeel Butt Reviewed-by: Michal Koutný Signed-off-by: Tejun Heo include/linux/cgroup-defs.h | 6 +++--- include/linux/sched/task.h | 1 + kernel/cgroup/cgroup.c | 20 ++++++++++++-------- 3 files changed, 16 insertions(+), 11 deletions(-) commit 2c4627c8ced77855b106c7104ecab70837d53799 Author: Len Brown Date: Sun Feb 2 10:43:02 2025 -0600 tools/power turbostat: version 2025.02.02 Summary of Changes since 2024.11.30: Fix regression in 2023.11.07 that affinitized forked child in one-shot mode. Harden one-shot mode against hotplug online/offline Enable RAPL SysWatt column by default. Add initial PTL, CWF platform support. Harden initial PMT code in response to early use. Enable first built-in PMT counter: CWF c1e residency Refuse to run on unsupported platforms without --force, to encourage updating to a version that supports the system, and to avoid no-so-useful measurement results. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9382e29ca538b879645899ce45d652a304e2ed2 Author: Jeff Layton Date: Sat Jan 25 20:13:18 2025 -0500 nfsd: validate the nfsd_serv pointer before calling svc_wake_up nfsd_file_dispose_list_delayed can be called from the filecache laundrette, which is shut down after the nfsd threads are shut down and the nfsd_serv pointer is cleared. If nn->nfsd_serv is NULL then there are no threads to wake. Ensure that the nn->nfsd_serv pointer is non-NULL before calling svc_wake_up in nfsd_file_dispose_list_delayed. This is safe since the svc_serv is not freed until after the filecache laundrette is cancelled. Reported-by: Salvatore Bonaccorso Closes: https://bugs.debian.org/1093734 Fixes: ffb402596147 ("nfsd: Don't leave work of closing files to a work queue") Cc: stable@vger.kernel.org Signed-off-by: Jeff Layton Reviewed-by: NeilBrown Signed-off-by: Chuck Lever fs/nfsd/filecache.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 7faf14a7b0366f153284db0ad3347c457ea70136 Author: Li Lingfeng Date: Sun Jan 26 17:47:22 2025 +0800 nfsd: clear acl_access/acl_default after releasing them If getting acl_default fails, acl_access and acl_default will be released simultaneously. However, acl_access will still retain a pointer pointing to the released posix_acl, which will trigger a WARNING in nfs3svc_release_getacl like this: ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 26 PID: 3199 at lib/refcount.c:28 refcount_warn_saturate+0xb5/0x170 Modules linked in: CPU: 26 UID: 0 PID: 3199 Comm: nfsd Not tainted 6.12.0-rc6-00079-g04ae226af01f-dirty #8 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.1-2.fc37 04/01/2014 RIP: 0010:refcount_warn_saturate+0xb5/0x170 Code: cc cc 0f b6 1d b3 20 a5 03 80 fb 01 0f 87 65 48 d8 00 83 e3 01 75 e4 48 c7 c7 c0 3b 9b 85 c6 05 97 20 a5 03 01 e8 fb 3e 30 ff <0f> 0b eb cd 0f b6 1d 8a3 RSP: 0018:ffffc90008637cd8 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff83904fde RDX: dffffc0000000000 RSI: 0000000000000008 RDI: ffff88871ed36380 RBP: ffff888158beeb40 R08: 0000000000000001 R09: fffff520010c6f56 R10: ffffc90008637ab7 R11: 0000000000000001 R12: 0000000000000001 R13: ffff888140e77400 R14: ffff888140e77408 R15: ffffffff858b42c0 FS: 0000000000000000(0000) GS:ffff88871ed00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000562384d32158 CR3: 000000055cc6a000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? refcount_warn_saturate+0xb5/0x170 ? __warn+0xa5/0x140 ? refcount_warn_saturate+0xb5/0x170 ? report_bug+0x1b1/0x1e0 ? handle_bug+0x53/0xa0 ? exc_invalid_op+0x17/0x40 ? asm_exc_invalid_op+0x1a/0x20 ? tick_nohz_tick_stopped+0x1e/0x40 ? refcount_warn_saturate+0xb5/0x170 ? refcount_warn_saturate+0xb5/0x170 nfs3svc_release_getacl+0xc9/0xe0 svc_process_common+0x5db/0xb60 ? __pfx_svc_process_common+0x10/0x10 ? __rcu_read_unlock+0x69/0xa0 ? __pfx_nfsd_dispatch+0x10/0x10 ? svc_xprt_received+0xa1/0x120 ? xdr_init_decode+0x11d/0x190 svc_process+0x2a7/0x330 svc_handle_xprt+0x69d/0x940 svc_recv+0x180/0x2d0 nfsd+0x168/0x200 ? __pfx_nfsd+0x10/0x10 kthread+0x1a2/0x1e0 ? kthread+0xf4/0x1e0 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x34/0x60 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 Kernel panic - not syncing: kernel: panic_on_warn set ... Clear acl_access/acl_default after posix_acl_release is called to prevent UAF from being triggered. Fixes: a257cdd0e217 ("[PATCH] NFSD: Add server support for NFSv3 ACLs.") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20241107014705.2509463-1-lilingfeng@huaweicloud.com/ Signed-off-by: Li Lingfeng Reviewed-by: Rick Macklem Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs2acl.c | 2 ++ fs/nfsd/nfs3acl.c | 2 ++ 2 files changed, 4 insertions(+) commit 3f1baa91a1fdf3de9dbad4bd615b35fab347874b Author: Sankararaman Jayaraman Date: Fri Jan 31 09:53:41 2025 +0530 vmxnet3: Fix tx queue race condition with XDP If XDP traffic runs on a CPU which is greater than or equal to the number of the Tx queues of the NIC, then vmxnet3_xdp_get_tq() always picks up queue 0 for transmission as it uses reciprocal scale instead of simple modulo operation. vmxnet3_xdp_xmit() and vmxnet3_xdp_xmit_frame() use the above returned queue without any locking which can lead to race conditions when multiple XDP xmits run in parallel on different CPU's. This patch uses a simple module scheme when the current CPU equals or exceeds the number of Tx queues on the NIC. It also adds locking in vmxnet3_xdp_xmit() and vmxnet3_xdp_xmit_frame() functions. Fixes: 54f00cce1178 ("vmxnet3: Add XDP support.") Signed-off-by: Sankararaman Jayaraman Signed-off-by: Ronak Doshi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250131042340.156547-1-sankararaman.jayaraman@broadcom.com Signed-off-by: Jakub Kicinski drivers/net/vmxnet3/vmxnet3_xdp.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit a8aa6a6ddce9b5585f2b74f27f3feea1427fb4e7 Author: Jiasheng Jiang Date: Fri Jan 31 01:38:32 2025 +0000 ice: Add check for devm_kzalloc() Add check for the return value of devm_kzalloc() to guarantee the success of allocation. Fixes: 42c2eb6b1f43 ("ice: Implement devlink-rate API") Signed-off-by: Jiasheng Jiang Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/20250131013832.24805-1-jiashengjiangcool@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/ice/devlink/devlink.c | 3 +++ 1 file changed, 3 insertions(+) commit 92191dd1073088753821b862b791dcc83e558e07 Author: Jakub Kicinski Date: Wed Jan 29 19:15:19 2025 -0800 net: ipv6: fix dst ref loops in rpl, seg6 and ioam6 lwtunnels Some lwtunnels have a dst cache for post-transformation dst. If the packet destination did not change we may end up recording a reference to the lwtunnel in its own cache, and the lwtunnel state will never be freed. Discovered by the ioam6.sh test, kmemleak was recently fixed to catch per-cpu memory leaks. I'm not sure if rpl and seg6 can actually hit this, but in principle I don't see why not. Fixes: 8cb3bf8bff3c ("ipv6: ioam: Add support for the ip6ip6 encapsulation") Fixes: 6c8702c60b88 ("ipv6: sr: add support for SRH encapsulation and injection with lwtunnels") Fixes: a7a29f9c361f ("net: ipv6: add rpl sr tunnel") Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250130031519.2716843-2-kuba@kernel.org Signed-off-by: Jakub Kicinski net/ipv6/ioam6_iptunnel.c | 9 ++++++--- net/ipv6/rpl_iptunnel.c | 9 ++++++--- net/ipv6/seg6_iptunnel.c | 9 ++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) commit c71a192976ded2f2f416d03c4f595cdd4478b825 Author: Jakub Kicinski Date: Wed Jan 29 19:15:18 2025 -0800 net: ipv6: fix dst refleaks in rpl, seg6 and ioam6 lwtunnels dst_cache_get() gives us a reference, we need to release it. Discovered by the ioam6.sh test, kmemleak was recently fixed to catch per-cpu memory leaks. Fixes: 985ec6f5e623 ("net: ipv6: rpl_iptunnel: mitigate 2-realloc issue") Fixes: 40475b63761a ("net: ipv6: seg6_iptunnel: mitigate 2-realloc issue") Fixes: dce525185bc9 ("net: ipv6: ioam6_iptunnel: mitigate 2-realloc issue") Reviewed-by: Justin Iurman Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250130031519.2716843-1-kuba@kernel.org Signed-off-by: Jakub Kicinski net/ipv6/ioam6_iptunnel.c | 5 +++-- net/ipv6/rpl_iptunnel.c | 6 ++++-- net/ipv6/seg6_iptunnel.c | 6 ++++-- 3 files changed, 11 insertions(+), 6 deletions(-) commit 46ded709232344b5750a852747a8881763c721ab Author: Florian Fainelli Date: Wed Jan 29 15:13:42 2025 -0800 net: bcmgenet: Correct overlaying of PHY and MAC Wake-on-LAN Some Wake-on-LAN modes such as WAKE_FILTER may only be supported by the MAC, while others might be only supported by the PHY. Make sure that the .get_wol() returns the union of both rather than only that of the PHY if the PHY supports Wake-on-LAN. When disabling Wake-on-LAN, make sure that this is done at both the PHY and MAC level, rather than doing an early return from the PHY driver. Fixes: 7e400ff35cbe ("net: bcmgenet: Add support for PHY-based Wake-on-LAN") Fixes: 9ee09edc05f2 ("net: bcmgenet: Properly overlay PHY and MAC Wake-on-LAN capabilities") Signed-off-by: Florian Fainelli Link: https://patch.msgid.link/20250129231342.35013-1-florian.fainelli@broadcom.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit a86bf2283d2c9769205407e2b54777c03d012939 Merge: c270ab5a8740 c1feab95e0b2 Author: Linus Torvalds Date: Sat Feb 1 15:07:56 2025 -0800 Merge tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs cleanups from Al Viro: "Two unrelated patches - one is a removal of long-obsolete include in overlayfs (it used to need fs/internal.h, but the extern it wanted has been moved back to include/linux/namei.h) and another introduces convenience helper constructing struct qstr by a NUL-terminated string" * tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: add a string-to-qstr constructor fs/overlayfs/namei.c: get rid of include ../internal.h commit c270ab5a87403f9365c00d3c587aa8000560bdc3 Merge: cabb4685d57e ec918a11e638 Author: Linus Torvalds Date: Sat Feb 1 14:54:33 2025 -0800 Merge tag 'mips_6.14_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fix from Thomas Bogendoerfer: "Revert commit breaking sysv ipc for o32 ABI" * tag 'mips_6.14_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: Revert "mips: fix shmctl/semctl/msgctl syscall for o32" commit cabb4685d57ed50cd197498d2ac946ad5b6272e7 Merge: 8c198ffd6342 a49da4ef4b94 Author: Linus Torvalds Date: Sat Feb 1 11:30:41 2025 -0800 Merge tag 'v6.14-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 Pull more smb client updates from Steve French: - various updates for special file handling: symlink handling, support for creating sockets, cleanups, new mount options (e.g. to allow disabling using reparse points for them, and to allow overriding the way symlinks are saved), and fixes to error paths - fix for kerberos mounts (allow IAKerb) - SMB1 fix for stat and for setting SACL (auditing) - fix an incorrect error code mapping - cleanups" * tag 'v6.14-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6: (21 commits) cifs: Fix parsing native symlinks directory/file type cifs: update internal version number cifs: Add support for creating WSL-style symlinks smb3: add support for IAKerb cifs: Fix struct FILE_ALL_INFO cifs: Add support for creating NFS-style symlinks cifs: Add support for creating native Windows sockets cifs: Add mount option -o reparse=none cifs: Add mount option -o symlink= for choosing symlink create type cifs: Fix creating and resolving absolute NT-style symlinks cifs: Simplify reparse point check in cifs_query_path_info() function cifs: Remove symlink member from cifs_open_info_data union cifs: Update description about ACL permissions cifs: Rename struct reparse_posix_data to reparse_nfs_data_buffer and move to common/smb2pdu.h cifs: Remove struct reparse_posix_data from struct cifs_open_info_data cifs: Remove unicode parameter from parse_reparse_point() function cifs: Fix getting and setting SACLs over SMB1 cifs: Remove intermediate object of failed create SFU call cifs: Validate EAs for WSL reparse points cifs: Change translation of STATUS_PRIVILEGE_NOT_HELD to -EPERM ... commit 8c198ffd6342c3c673058f55200eef75c17ea185 Merge: 03cc3579bc61 57b314752ec0 Author: Linus Torvalds Date: Sat Feb 1 10:04:29 2025 -0800 Merge tag 'driver-core-6.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull debugfs fix from Greg KH: "Here is a single debugfs fix from Al to resolve a reported regression in the driver-core tree. It has been reported to fix the issue" * tag 'driver-core-6.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: debugfs: Fix the missing initializations in __debugfs_file_get() commit 03cc3579bc617ba7615068bedbb5331043e62142 Merge: c6fe03a3f92e e5b2a356dc8a Author: Linus Torvalds Date: Sat Feb 1 09:49:20 2025 -0800 Merge tag 'mm-hotfixes-stable-2025-02-01-03-56' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "21 hotfixes. 8 are cc:stable and the remainder address post-6.13 issues. 13 are for MM and 8 are for non-MM. All are singletons, please see the changelogs for details" * tag 'mm-hotfixes-stable-2025-02-01-03-56' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (21 commits) MAINTAINERS: include linux-mm for xarray maintenance revert "xarray: port tests to kunit" MAINTAINERS: add lib/test_xarray.c mailmap, MAINTAINERS, docs: update Carlos's email address mm/hugetlb: fix hugepage allocation for interleaved memory nodes mm: gup: fix infinite loop within __get_longterm_locked mm, swap: fix reclaim offset calculation error during allocation .mailmap: update email address for Christopher Obbard kfence: skip __GFP_THISNODE allocations on NUMA systems nilfs2: fix possible int overflows in nilfs_fiemap() mm: compaction: use the proper flag to determine watermarks kernel: be more careful about dup_mmap() failures and uprobe registering mm/fake-numa: handle cases with no SRAT info mm: kmemleak: fix upper boundary check for physical address objects mailmap: add an entry for Hamza Mahfooz MAINTAINERS: mailmap: update Yosry Ahmed's email address scripts/gdb: fix aarch64 userspace detection in get_current_task mm/vmscan: accumulate nr_demoted for accurate demotion statistics ocfs2: fix incorrect CPU endianness conversion causing mount failure mm/zsmalloc: add __maybe_unused attribute for is_first_zpdesc() ... commit c6fe03a3f92efdaecff085591fcd18cac9850855 Merge: 60c828cf80c0 8004d635f27b Author: Linus Torvalds Date: Sat Feb 1 09:15:01 2025 -0800 Merge tag 'media/v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fix from Mauro Carvalho Chehab: "A revert for a regression in the uvcvideo driver" * tag 'media/v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: Revert "media: uvcvideo: Require entities to have a non-zero unique ID" commit e5b2a356dc8a88708d97bd47cca3b8f7ed7af6cb Author: Andrew Morton Date: Thu Jan 30 16:16:20 2025 -0800 MAINTAINERS: include linux-mm for xarray maintenance MM developers have an interest in the xarray code. Cc: David Gow Cc: Geert Uytterhoeven Cc: "Liam R. Howlett" Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Sidhartha Kumar Cc: Tamir Duberstein Signed-off-by: Andrew Morton MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 050339050f6f2b18d32a61a0f725f423804ad2a5 Author: Andrew Morton Date: Thu Jan 30 16:09:20 2025 -0800 revert "xarray: port tests to kunit" Revert c7bb5cf9fc4e ("xarray: port tests to kunit"). It broke the build when compiing the xarray userspace test harness code. Reported-by: Sidhartha Kumar Closes: https://lkml.kernel.org/r/07cf896e-adf8-414f-a629-a808fc26014a@oracle.com Cc: David Gow Cc: Matthew Wilcox Cc: Tamir Duberstein Cc: "Liam R. Howlett" Cc: Geert Uytterhoeven Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton arch/m68k/configs/amiga_defconfig | 1 + arch/m68k/configs/apollo_defconfig | 1 + arch/m68k/configs/atari_defconfig | 1 + arch/m68k/configs/bvme6000_defconfig | 1 + arch/m68k/configs/hp300_defconfig | 1 + arch/m68k/configs/mac_defconfig | 1 + arch/m68k/configs/multi_defconfig | 1 + arch/m68k/configs/mvme147_defconfig | 1 + arch/m68k/configs/mvme16x_defconfig | 1 + arch/m68k/configs/q40_defconfig | 1 + arch/m68k/configs/sun3_defconfig | 1 + arch/m68k/configs/sun3x_defconfig | 1 + arch/powerpc/configs/ppc64_defconfig | 1 + lib/Kconfig.debug | 18 +- lib/Makefile | 2 +- lib/test_xarray.c | 671 +++++++++++++++-------------------- 16 files changed, 294 insertions(+), 410 deletions(-) commit 0ca2a41e0ccc573845428b686ff09e9322c82b16 Author: Tamir Duberstein Date: Wed Jan 29 16:13:49 2025 -0500 MAINTAINERS: add lib/test_xarray.c Ensure test-only changes are sent to the relevant maintainer. Link: https://lkml.kernel.org/r/20250129-xarray-test-maintainer-v1-1-482e31f30f47@gmail.com Signed-off-by: Tamir Duberstein Cc: Mattew Wilcox Signed-off-by: Andrew Morton MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit e5eaa1bbe2813ac34788e485283be75f9d07137b Author: Carlos Bilbao Date: Wed Jan 29 19:22:44 2025 -0600 mailmap, MAINTAINERS, docs: update Carlos's email address Update .mailmap to reflect my new (and final) primary email address, carlos.bilbao@kernel.org. Also update contact information in files Documentation/translations/sp_SP/index.rst and MAINTAINERS. Link: https://lkml.kernel.org/r/20250130012248.1196208-1-carlos.bilbao@kernel.org Signed-off-by: Carlos Bilbao Cc: Carlos Bilbao Cc: Jonathan Corbet Cc: Mattew Wilcox Signed-off-by: Andrew Morton .mailmap | 4 +++- Documentation/translations/sp_SP/index.rst | 2 +- MAINTAINERS | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) commit 76e961157e078bc5d3cd2df08317e00b00a829eb Author: Ritesh Harjani (IBM) Date: Sat Jan 11 16:36:55 2025 +0530 mm/hugetlb: fix hugepage allocation for interleaved memory nodes gather_bootmem_prealloc() assumes the start nid as 0 and size as num_node_state(N_MEMORY). That means in case if memory attached numa nodes are interleaved, then gather_bootmem_prealloc_parallel() will fail to scan few of these nodes. Since memory attached numa nodes can be interleaved in any fashion, hence ensure that the current code checks for all numa node ids (.size = nr_node_ids). Let's still keep max_threads as N_MEMORY, so that it can distributes all nr_node_ids among the these many no. threads. e.g. qemu cmdline ======================== numa_cmd="-numa node,nodeid=1,memdev=mem1,cpus=2-3 -numa node,nodeid=0,cpus=0-1 -numa dist,src=0,dst=1,val=20" mem_cmd="-object memory-backend-ram,id=mem1,size=16G" w/o this patch for cmdline (default_hugepagesz=1GB hugepagesz=1GB hugepages=2): ========================== ~ # cat /proc/meminfo |grep -i huge AnonHugePages: 0 kB ShmemHugePages: 0 kB FileHugePages: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 1048576 kB Hugetlb: 0 kB with this patch for cmdline (default_hugepagesz=1GB hugepagesz=1GB hugepages=2): =========================== ~ # cat /proc/meminfo |grep -i huge AnonHugePages: 0 kB ShmemHugePages: 0 kB FileHugePages: 0 kB HugePages_Total: 2 HugePages_Free: 2 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 1048576 kB Hugetlb: 2097152 kB Link: https://lkml.kernel.org/r/f8d8dad3a5471d284f54185f65d575a6aaab692b.1736592534.git.ritesh.list@gmail.com Fixes: b78b27d02930 ("hugetlb: parallelize 1G hugetlb initialization") Signed-off-by: Ritesh Harjani (IBM) Reported-by: Pavithra Prakash Suggested-by: Muchun Song Tested-by: Sourabh Jain Reviewed-by: Luiz Capitulino Acked-by: David Rientjes Cc: Donet Tom Cc: Gang Li Cc: Daniel Jordan Cc: Signed-off-by: Andrew Morton mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1aaf8c122918aa8897605a9aa1e8ed6600d6f930 Author: Zhaoyang Huang Date: Tue Jan 21 10:01:59 2025 +0800 mm: gup: fix infinite loop within __get_longterm_locked We can run into an infinite loop in __get_longterm_locked() when collect_longterm_unpinnable_folios() finds only folios that are isolated from the LRU or were never added to the LRU. This can happen when all folios to be pinned are never added to the LRU, for example when vm_ops->fault allocated pages using cma_alloc() and never added them to the LRU. Fix it by simply taking a look at the list in the single caller, to see if anything was added. [zhaoyang.huang@unisoc.com: move definition of local] Link: https://lkml.kernel.org/r/20250122012604.3654667-1-zhaoyang.huang@unisoc.com Link: https://lkml.kernel.org/r/20250121020159.3636477-1-zhaoyang.huang@unisoc.com Fixes: 67e139b02d99 ("mm/gup.c: refactor check_and_migrate_movable_pages()") Signed-off-by: Zhaoyang Huang Reviewed-by: John Hubbard Reviewed-by: David Hildenbrand Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Cc: Aijun Sun Cc: Alistair Popple Cc: Signed-off-by: Andrew Morton mm/gup.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 498c48c66eb600535f1221652509eefb2dce7770 Author: Kairui Song Date: Thu Jan 30 19:51:31 2025 +0800 mm, swap: fix reclaim offset calculation error during allocation There is a code error that will cause the swap entry allocator to reclaim and check the whole cluster with an unexpected tail offset instead of the part that needs to be reclaimed. This may cause corruption of the swap map, so fix it. Link: https://lkml.kernel.org/r/20250130115131.37777-1-ryncsn@gmail.com Fixes: 3b644773eefd ("mm, swap: reduce contention on device lock") Signed-off-by: Kairui Song Cc: Chris Li Signed-off-by: Andrew Morton mm/swapfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ccae30ecd98671325fa6954f9934bad298b56a2 Author: Christopher Obbard Date: Wed Jan 22 12:04:27 2025 +0000 .mailmap: update email address for Christopher Obbard Update my email address. Link: https://lkml.kernel.org/r/20250122-wip-obbardc-update-email-v2-1-12bde6b79ad0@linaro.org Signed-off-by: Christopher Obbard Signed-off-by: Andrew Morton .mailmap | 1 + 1 file changed, 1 insertion(+) commit e64f81946adf68cd75e2207dd9a51668348a4af8 Author: Marco Elver Date: Fri Jan 24 13:01:38 2025 +0100 kfence: skip __GFP_THISNODE allocations on NUMA systems On NUMA systems, __GFP_THISNODE indicates that an allocation _must_ be on a particular node, and failure to allocate on the desired node will result in a failed allocation. Skip __GFP_THISNODE allocations if we are running on a NUMA system, since KFENCE can't guarantee which node its pool pages are allocated on. Link: https://lkml.kernel.org/r/20250124120145.410066-1-elver@google.com Fixes: 236e9f153852 ("kfence: skip all GFP_ZONEMASK allocations") Signed-off-by: Marco Elver Reported-by: Vlastimil Babka Acked-by: Vlastimil Babka Cc: Christoph Lameter Cc: Alexander Potapenko Cc: Chistoph Lameter Cc: Dmitriy Vyukov Cc: Signed-off-by: Andrew Morton mm/kfence/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 6438ef381c183444f7f9d1de18f22661cba1e946 Author: Nikita Zhandarovich Date: Sat Jan 25 07:20:53 2025 +0900 nilfs2: fix possible int overflows in nilfs_fiemap() Since nilfs_bmap_lookup_contig() in nilfs_fiemap() calculates its result by being prepared to go through potentially maxblocks == INT_MAX blocks, the value in n may experience an overflow caused by left shift of blkbits. While it is extremely unlikely to occur, play it safe and cast right hand expression to wider type to mitigate the issue. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Link: https://lkml.kernel.org/r/20250124222133.5323-1-konishi.ryusuke@gmail.com Fixes: 622daaff0a89 ("nilfs2: fiemap support") Signed-off-by: Nikita Zhandarovich Signed-off-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton fs/nilfs2/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6268f0a166ebcf5a31577036f4c1e613d5ab4fb1 Author: yangge Date: Sat Jan 25 14:53:57 2025 +0800 mm: compaction: use the proper flag to determine watermarks There are 4 NUMA nodes on my machine, and each NUMA node has 32GB of memory. I have configured 16GB of CMA memory on each NUMA node, and starting a 32GB virtual machine with device passthrough is extremely slow, taking almost an hour. Long term GUP cannot allocate memory from CMA area, so a maximum of 16 GB of no-CMA memory on a NUMA node can be used as virtual machine memory. There is 16GB of free CMA memory on a NUMA node, which is sufficient to pass the order-0 watermark check, causing the __compaction_suitable() function to consistently return true. For costly allocations, if the __compaction_suitable() function always returns true, it causes the __alloc_pages_slowpath() function to fail to exit at the appropriate point. This prevents timely fallback to allocating memory on other nodes, ultimately resulting in excessively long virtual machine startup times. Call trace: __alloc_pages_slowpath if (compact_result == COMPACT_SKIPPED || compact_result == COMPACT_DEFERRED) goto nopage; // should exit __alloc_pages_slowpath() from here We could use the real unmovable allocation context to have __zone_watermark_unusable_free() subtract CMA pages, and thus we won't pass the order-0 check anymore once the non-CMA part is exhausted. There is some risk that in some different scenario the compaction could in fact migrate pages from the exhausted non-CMA part of the zone to the CMA part and succeed, and we'll skip it instead. But only __GFP_NORETRY allocations should be affected in the immediate "goto nopage" when compaction is skipped, others will attempt with DEF_COMPACT_PRIORITY anyway and won't fail without trying to compact-migrate the non-CMA pageblocks into CMA pageblocks first, so it should be fine. After this fix, it only takes a few tens of seconds to start a 32GB virtual machine with device passthrough functionality. Link: https://lore.kernel.org/lkml/1736335854-548-1-git-send-email-yangge1116@126.com/ Link: https://lkml.kernel.org/r/1737788037-8439-1-git-send-email-yangge1116@126.com Signed-off-by: yangge Acked-by: Vlastimil Babka Reviewed-by: Baolin Wang Acked-by: Johannes Weiner Cc: Barry Song <21cnbao@gmail.com> Cc: David Hildenbrand Signed-off-by: Andrew Morton mm/compaction.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit 64c37e134b120fb462fb4a80694bfb8e7be77b14 Author: Liam R. Howlett Date: Mon Jan 27 12:02:21 2025 -0500 kernel: be more careful about dup_mmap() failures and uprobe registering If a memory allocation fails during dup_mmap(), the maple tree can be left in an unsafe state for other iterators besides the exit path. All the locks are dropped before the exit_mmap() call (in mm/mmap.c), but the incomplete mm_struct can be reached through (at least) the rmap finding the vmas which have a pointer back to the mm_struct. Up to this point, there have been no issues with being able to find an mm_struct that was only partially initialised. Syzbot was able to make the incomplete mm_struct fail with recent forking changes, so it has been proven unsafe to use the mm_struct that hasn't been initialised, as referenced in the link below. Although 8ac662f5da19f ("fork: avoid inappropriate uprobe access to invalid mm") fixed the uprobe access, it does not completely remove the race. This patch sets the MMF_OOM_SKIP to avoid the iteration of the vmas on the oom side (even though this is extremely unlikely to be selected as an oom victim in the race window), and sets MMF_UNSTABLE to avoid other potential users from using a partially initialised mm_struct. When registering vmas for uprobe, skip the vmas in an mm that is marked unstable. Modifying a vma in an unstable mm may cause issues if the mm isn't fully initialised. Link: https://lore.kernel.org/all/6756d273.050a0220.2477f.003d.GAE@google.com/ Link: https://lkml.kernel.org/r/20250127170221.1761366-1-Liam.Howlett@oracle.com Fixes: d24062914837 ("fork: use __mt_dup() to duplicate maple tree in dup_mmap()") Signed-off-by: Liam R. Howlett Reviewed-by: Lorenzo Stoakes Cc: Oleg Nesterov Cc: Masami Hiramatsu Cc: Jann Horn Cc: Peter Zijlstra Cc: Michal Hocko Cc: Peng Zhang Cc: Matthew Wilcox Signed-off-by: Andrew Morton kernel/events/uprobes.c | 4 ++++ kernel/fork.c | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) commit 4c80187001d3e2876dfe7e011b9eac3b6270156f Author: Bruno Faccini Date: Mon Jan 27 09:16:23 2025 -0800 mm/fake-numa: handle cases with no SRAT info Handle more gracefully cases where no SRAT information is available, like in VMs with no Numa support, and allow fake-numa configuration to complete successfully in these cases Link: https://lkml.kernel.org/r/20250127171623.1523171-1-bfaccini@nvidia.com Fixes: 63db8170bf34 (“mm/fake-numa: allow later numa node hotplug”) Signed-off-by: Bruno Faccini Cc: David Hildenbrand Cc: Hyeonggon Yoo Cc: John Hubbard Cc: Len Brown Cc: "Mike Rapoport (IBM)" Cc: "Rafael J. Wysocki" Cc: Zi Yan Signed-off-by: Andrew Morton drivers/acpi/numa/srat.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 488b5b9eca68497b533ced059be5eff19578bbca Author: Catalin Marinas Date: Mon Jan 27 18:42:33 2025 +0000 mm: kmemleak: fix upper boundary check for physical address objects Memblock allocations are registered by kmemleak separately, based on their physical address. During the scanning stage, it checks whether an object is within the min_low_pfn and max_low_pfn boundaries and ignores it otherwise. With the recent addition of __percpu pointer leak detection (commit 6c99d4eb7c5e ("kmemleak: enable tracking for percpu pointers")), kmemleak started reporting leaks in setup_zone_pageset() and setup_per_cpu_pageset(). These were caused by the node_data[0] object (initialised in alloc_node_data()) ending on the PFN_PHYS(max_low_pfn) boundary. The non-strict upper boundary check introduced by commit 84c326299191 ("mm: kmemleak: check physical address when scan") causes the pg_data_t object to be ignored (not scanned) and the __percpu pointers it contains to be reported as leaks. Make the max_low_pfn upper boundary check strict when deciding whether to ignore a physical address object and not scan it. Link: https://lkml.kernel.org/r/20250127184233.2974311-1-catalin.marinas@arm.com Fixes: 84c326299191 ("mm: kmemleak: check physical address when scan") Signed-off-by: Catalin Marinas Reported-by: Jakub Kicinski Tested-by: Matthieu Baerts (NGI0) Cc: Patrick Wang Cc: [6.0.x] Signed-off-by: Andrew Morton mm/kmemleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3d8ced37e6f724cdcc5382b40858a2136c47591 Author: Hamza Mahfooz Date: Mon Jan 20 15:56:59 2025 -0500 mailmap: add an entry for Hamza Mahfooz Map my previous work email to my current one. Link: https://lkml.kernel.org/r/20250120205659.139027-1-hamzamahfooz@linux.microsoft.com Signed-off-by: Hamza Mahfooz Cc: David S. Miller Cc: Hans verkuil Cc: Matthieu Baerts Signed-off-by: Andrew Morton .mailmap | 1 + 1 file changed, 1 insertion(+) commit bc404701349fbd3d94e389a06ccfc0948129ab24 Author: Yosry Ahmed Date: Thu Jan 23 23:13:44 2025 +0000 MAINTAINERS: mailmap: update Yosry Ahmed's email address Moving to a linux.dev email address. Link: https://lkml.kernel.org/r/20250123231344.817358-1-yosry.ahmed@linux.dev Signed-off-by: Yosry Ahmed Cc: Chengming Zhou Cc: Johannes Weiner Cc: Nhat Pham Signed-off-by: Andrew Morton .mailmap | 1 + MAINTAINERS | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 4ebc417ef9cb34010a71270421fe320ec5d88aa2 Author: Jan Kiszka Date: Fri Jan 10 11:36:33 2025 +0100 scripts/gdb: fix aarch64 userspace detection in get_current_task At least recent gdb releases (seen with 14.2) return SP_EL0 as signed long which lets the right-shift always return 0. Link: https://lkml.kernel.org/r/dcd2fabc-9131-4b48-8419-6444e2d67454@siemens.com Signed-off-by: Jan Kiszka Cc: Barry Song Cc: Kieran Bingham Cc: Signed-off-by: Andrew Morton scripts/gdb/linux/cpus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a479b078fddb0ad7f9e3c6da22d9cf8f2b5c7799 Author: Li Zhijian Date: Fri Jan 10 20:21:32 2025 +0800 mm/vmscan: accumulate nr_demoted for accurate demotion statistics In shrink_folio_list(), demote_folio_list() can be called 2 times. Currently stat->nr_demoted will only store the last nr_demoted( the later nr_demoted is always zero, the former nr_demoted will get lost), as a result number of demoted pages is not accurate. Accumulate the nr_demoted count across multiple calls to demote_folio_list(), ensuring accurate reporting of demotion statistics. [lizhijian@fujitsu.com: introduce local nr_demoted to fix nr_reclaimed double counting] Link: https://lkml.kernel.org/r/20250111015253.425693-1-lizhijian@fujitsu.com Link: https://lkml.kernel.org/r/20250110122133.423481-1-lizhijian@fujitsu.com Fixes: f77f0c751478 ("mm,memcg: provide per-cgroup counters for NUMA balancing operations") Signed-off-by: Li Zhijian Acked-by: Kaiyang Zhao Tested-by: Donet Tom Reviewed-by: Donet Tom Cc: Signed-off-by: Andrew Morton mm/vmscan.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f921da2c34692dfec5f72b5ae347b1bea22bb369 Author: Heming Zhao Date: Tue Jan 21 19:22:03 2025 +0800 ocfs2: fix incorrect CPU endianness conversion causing mount failure Commit 23aab037106d ("ocfs2: fix UBSAN warning in ocfs2_verify_volume()") introduced a regression bug. The blksz_bits value is already converted to CPU endian in the previous code; therefore, the code shouldn't use le32_to_cpu() anymore. Link: https://lkml.kernel.org/r/20250121112204.12834-1-heming.zhao@suse.com Fixes: 23aab037106d ("ocfs2: fix UBSAN warning in ocfs2_verify_volume()") Signed-off-by: Heming Zhao Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Cc: Signed-off-by: Andrew Morton fs/ocfs2/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e8e04291d81867680552b49f40fa5c746b641d8 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Tue Jan 28 08:16:31 2025 +0900 mm/zsmalloc: add __maybe_unused attribute for is_first_zpdesc() Commit c1b3bb73d55e ("mm/zsmalloc: use zpdesc in trylock_zspage()/lock_zspage()") introduces is_first_zpdesc() function. However, the function is only used when CONFIG_DEBUG_VM=y. When building with LLVM=1 and W=1 option, the following warning is generated: $ make -j12 W=1 LLVM=1 mm/zsmalloc.o mm/zsmalloc.c:455:20: error: function 'is_first_zpdesc' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] 455 | static inline bool is_first_zpdesc(struct zpdesc *zpdesc) | ^~~~~~~~~~~~~~~ 1 error generated. Fix the warning by adding __maybe_unused attribute to the function. No functional change intended. Link: https://lkml.kernel.org/r/20250127231631.4363-1-42.hyeyoo@gmail.com Fixes: c1b3bb73d55e ("mm/zsmalloc: use zpdesc in trylock_zspage()/lock_zspage()") Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501240958.4ILzuBrH-lkp@intel.com/ Cc: Alex Shi Cc: Minchan Kim Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c7b17cf0594f33c898004ac1b5576c032f266e2 Author: liuye Date: Tue Nov 19 14:08:42 2024 +0800 mm/vmscan: fix hard LOCKUP in function isolate_lru_folios This fixes the following hard lockup in isolate_lru_folios() during memory reclaim. If the LRU mostly contains ineligible folios this may trigger watchdog. watchdog: Watchdog detected hard LOCKUP on cpu 173 RIP: 0010:native_queued_spin_lock_slowpath+0x255/0x2a0 Call Trace: _raw_spin_lock_irqsave+0x31/0x40 folio_lruvec_lock_irqsave+0x5f/0x90 folio_batch_move_lru+0x91/0x150 lru_add_drain_per_cpu+0x1c/0x40 process_one_work+0x17d/0x350 worker_thread+0x27b/0x3a0 kthread+0xe8/0x120 ret_from_fork+0x34/0x50 ret_from_fork_asm+0x1b/0x30 lruvec->lru_lock owner: PID: 2865 TASK: ffff888139214d40 CPU: 40 COMMAND: "kswapd0" #0 [fffffe0000945e60] crash_nmi_callback at ffffffffa567a555 #1 [fffffe0000945e68] nmi_handle at ffffffffa563b171 #2 [fffffe0000945eb0] default_do_nmi at ffffffffa6575920 #3 [fffffe0000945ed0] exc_nmi at ffffffffa6575af4 #4 [fffffe0000945ef0] end_repeat_nmi at ffffffffa6601dde [exception RIP: isolate_lru_folios+403] RIP: ffffffffa597df53 RSP: ffffc90006fb7c28 RFLAGS: 00000002 RAX: 0000000000000001 RBX: ffffc90006fb7c60 RCX: ffffea04a2196f88 RDX: ffffc90006fb7c60 RSI: ffffc90006fb7c60 RDI: ffffea04a2197048 RBP: ffff88812cbd3010 R8: ffffea04a2197008 R9: 0000000000000001 R10: 0000000000000000 R11: 0000000000000001 R12: ffffea04a2197008 R13: ffffea04a2197048 R14: ffffc90006fb7de8 R15: 0000000003e3e937 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 #5 [ffffc90006fb7c28] isolate_lru_folios at ffffffffa597df53 #6 [ffffc90006fb7cf8] shrink_active_list at ffffffffa597f788 #7 [ffffc90006fb7da8] balance_pgdat at ffffffffa5986db0 #8 [ffffc90006fb7ec0] kswapd at ffffffffa5987354 #9 [ffffc90006fb7ef8] kthread at ffffffffa5748238 crash> Scenario: User processe are requesting a large amount of memory and keep page active. Then a module continuously requests memory from ZONE_DMA32 area. Memory reclaim will be triggered due to ZONE_DMA32 watermark alarm reached. However pages in the LRU(active_anon) list are mostly from the ZONE_NORMAL area. Reproduce: Terminal 1: Construct to continuously increase pages active(anon). mkdir /tmp/memory mount -t tmpfs -o size=1024000M tmpfs /tmp/memory dd if=/dev/zero of=/tmp/memory/block bs=4M tail /tmp/memory/block Terminal 2: vmstat -a 1 active will increase. procs ---memory--- ---swap-- ---io---- -system-- ---cpu--- ... r b swpd free inact active si so bi bo 1 0 0 1445623076 45898836 83646008 0 0 0 1 0 0 1445623076 43450228 86094616 0 0 0 1 0 0 1445623076 41003480 88541364 0 0 0 1 0 0 1445623076 38557088 90987756 0 0 0 1 0 0 1445623076 36109688 93435156 0 0 0 1 0 0 1445619552 33663256 95881632 0 0 0 1 0 0 1445619804 31217140 98327792 0 0 0 1 0 0 1445619804 28769988 100774944 0 0 0 1 0 0 1445619804 26322348 103222584 0 0 0 1 0 0 1445619804 23875592 105669340 0 0 0 cat /proc/meminfo | head Active(anon) increase. MemTotal: 1579941036 kB MemFree: 1445618500 kB MemAvailable: 1453013224 kB Buffers: 6516 kB Cached: 128653956 kB SwapCached: 0 kB Active: 118110812 kB Inactive: 11436620 kB Active(anon): 115345744 kB Inactive(anon): 945292 kB When the Active(anon) is 115345744 kB, insmod module triggers the ZONE_DMA32 watermark. perf record -e vmscan:mm_vmscan_lru_isolate -aR perf script isolate_mode=0 classzone=1 order=1 nr_requested=32 nr_scanned=2 nr_skipped=2 nr_taken=0 lru=active_anon isolate_mode=0 classzone=1 order=1 nr_requested=32 nr_scanned=0 nr_skipped=0 nr_taken=0 lru=active_anon isolate_mode=0 classzone=1 order=0 nr_requested=32 nr_scanned=28835844 nr_skipped=28835844 nr_taken=0 lru=active_anon isolate_mode=0 classzone=1 order=1 nr_requested=32 nr_scanned=28835844 nr_skipped=28835844 nr_taken=0 lru=active_anon isolate_mode=0 classzone=1 order=0 nr_requested=32 nr_scanned=29 nr_skipped=29 nr_taken=0 lru=active_anon isolate_mode=0 classzone=1 order=0 nr_requested=32 nr_scanned=0 nr_skipped=0 nr_taken=0 lru=active_anon See nr_scanned=28835844. 28835844 * 4k = 115343376KB approximately equal to 115345744 kB. If increase Active(anon) to 1000G then insmod module triggers the ZONE_DMA32 watermark. hard lockup will occur. In my device nr_scanned = 0000000003e3e937 when hard lockup. Convert to memory size 0x0000000003e3e937 * 4KB = 261072092 KB. [ffffc90006fb7c28] isolate_lru_folios at ffffffffa597df53 ffffc90006fb7c30: 0000000000000020 0000000000000000 ffffc90006fb7c40: ffffc90006fb7d40 ffff88812cbd3000 ffffc90006fb7c50: ffffc90006fb7d30 0000000106fb7de8 ffffc90006fb7c60: ffffea04a2197008 ffffea0006ed4a48 ffffc90006fb7c70: 0000000000000000 0000000000000000 ffffc90006fb7c80: 0000000000000000 0000000000000000 ffffc90006fb7c90: 0000000000000000 0000000000000000 ffffc90006fb7ca0: 0000000000000000 0000000003e3e937 ffffc90006fb7cb0: 0000000000000000 0000000000000000 ffffc90006fb7cc0: 8d7c0b56b7874b00 ffff88812cbd3000 About the Fixes: Why did it take eight years to be discovered? The problem requires the following conditions to occur: 1. The device memory should be large enough. 2. Pages in the LRU(active_anon) list are mostly from the ZONE_NORMAL area. 3. The memory in ZONE_DMA32 needs to reach the watermark. If the memory is not large enough, or if the usage design of ZONE_DMA32 area memory is reasonable, this problem is difficult to detect. notes: The problem is most likely to occur in ZONE_DMA32 and ZONE_NORMAL, but other suitable scenarios may also trigger the problem. Link: https://lkml.kernel.org/r/20241119060842.274072-1-liuye@kylinos.cn Fixes: b2e18757f2c9 ("mm, vmscan: begin reclaiming pages on a per-node basis") Signed-off-by: liuye Cc: Hugh Dickins Cc: Mel Gorman Cc: Yang Shi Signed-off-by: Andrew Morton include/linux/swap.h | 1 + mm/vmscan.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 909f3c55d887a9f9d4cd2762813cbfcaf640ec57 Author: Geert Uytterhoeven Date: Fri Jan 24 09:39:19 2025 +0100 sh: boards: Use imply to enable hardware with complex dependencies If CONFIG_I2C=n: WARNING: unmet direct dependencies detected for SND_SOC_AK4642 Depends on [n]: SOUND [=y] && SND [=y] && SND_SOC [=y] && I2C [=n] Selected by [y]: - SH_7724_SOLUTION_ENGINE [=y] && CPU_SUBTYPE_SH7724 [=y] && SND_SIMPLE_CARD [=y] WARNING: unmet direct dependencies detected for SND_SOC_DA7210 Depends on [n]: SOUND [=y] && SND [=y] && SND_SOC [=y] && SND_SOC_I2C_AND_SPI [=n] Selected by [y]: - SH_ECOVEC [=y] && CPU_SUBTYPE_SH7724 [=y] && SND_SIMPLE_CARD [=y] Fix this by replacing select by imply, instead of adding a dependency on I2C. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501240836.OvXqmANX-lkp@intel.com/ Signed-off-by: Geert Uytterhoeven Reviewed-by: John Paul Adrian Glaubitz Signed-off-by: John Paul Adrian Glaubitz arch/sh/boards/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21bcc49974c2a45c6c5e8e5e500ce6642e4328f1 Author: Masahiro Yamada Date: Sun Dec 22 09:32:07 2024 +0900 sh: 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 when built-in DTB support is enabled. To keep consistency across architectures, this commit also renames CONFIG_USE_BUILTIN_DTB to CONFIG_BUILTIN_DTB, and CONFIG_BUILTIN_DTB_SOURCE to CONFIG_BUILTIN_DTB_NAME. Signed-off-by: Masahiro Yamada Reviewed-by: John Paul Adrian Glaubitz Signed-off-by: John Paul Adrian Glaubitz arch/sh/Kbuild | 1 - arch/sh/Kconfig | 7 ++++--- arch/sh/boot/dts/Makefile | 2 +- arch/sh/kernel/setup.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit d2a5f10bf1f123f6d9a7fb4be4cd92f6e95c129d Author: David Wang <00107082@163.com> Date: Sat Nov 30 21:49:09 2024 +0800 sh: irq: Use seq_put_decimal_ull_width() for decimal values On a system with n CPUs and m interrupts, there will be n*m decimal values yielded via seq_printf(.."%10u "..) which has significant costs parsing format string and is less efficient than seq_put_decimal_ull_width(). Stress reading /proc/interrupts indicates ~30% performance improvement with this patch. Signed-off-by: David Wang <00107082@163.com> Reviewed-by: John Paul Adrian Glaubitz Signed-off-by: John Paul Adrian Glaubitz arch/sh/kernel/irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0f1a6c5c9784eff7e31e4915e17285fb89ad3644 Author: Oliver Upton Date: Fri Jan 31 22:29:24 2025 +0000 KVM: arm64: Flush/sync debug state in protected mode The recent changes to debug state management broke self-hosted debug for guests when running in protected mode, since both the debug owner and the debug state itself aren't shared with the hyp's view of the vcpu. Fix it by flushing/syncing the relevant bits with the hyp vcpu. Fixes: beb470d96cec ("KVM: arm64: Use debug_owner to track if debug regs need save/restore") Reported-by: Mark Brown Closes: https://lore.kernel.org/kvmarm/5f62740f-a065-42d9-9f56-8fb648b9c63f@sirena.org.uk/ Signed-off-by: Oliver Upton Link: https://lore.kernel.org/r/20250131222922.1548780-3-oliver.upton@linux.dev Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/nvhe/hyp-main.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 60c828cf80c07394762a1edfaff63bea55cc8e45 Merge: 04a3389b3535 84d78214b4f1 Author: Linus Torvalds Date: Fri Jan 31 20:11:24 2025 -0800 Merge tag 'for-linus-hexagon-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/bcain/linux Pull hexagon updates from Brian Cain: - Move kernel prototypes out of uapi header to internal header - Fix to address an unbalanced spinlock - Miscellaneous patches to fix static checks - Update bcain@quicinc.com->brian.cain@oss.qualcomm.com * tag 'for-linus-hexagon-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/bcain/linux: MAINTAINERS: Update my email address hexagon: Fix unbalanced spinlock in die() hexagon: Fix warning comparing pointer to 0 hexagon: Move kernel prototypes out of uapi/asm/setup.h header hexagon: time: Remove redundant null check for resource hexagon: fix using plain integer as NULL pointer warning in cmpxchg commit 04a3389b35357e9bf44533d20a80eb70d188adb8 Author: Linus Torvalds Date: Fri Jan 31 19:49:17 2025 -0800 Remove stale generated 'genheaders' file This bogus stale file was added in commit 101971298be2 ("riscv: add a warning when physical memory address overflows"). It's the old location for what is now 'security/selinux/genheaders'. It looks like it got incorrectly committed back when that file was in the old location, and then rebasing kept the bogus file alive. Reported-by: Eric Biggers Link: https://lore.kernel.org/linux-riscv/20250201020003.GA77370@sol.localdomain/ Fixes: 101971298be2 ("riscv: add a warning when physical memory address overflows") Cc: Palmer Dabbelt Signed-off-by: Linus Torvalds scripts/selinux/genheaders/genheaders | Bin 90112 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) commit bdd4f86c97e60b748027bdf6f6a3729c8a12da15 Merge: 73512f2a0b5c 38567b972a22 Author: Linus Torvalds Date: Fri Jan 31 17:12:31 2025 -0800 Merge tag 'AT_EXECVE_CHECK-v6.14-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull AT_EXECVE_CHECK selftest fix from Kees Cook: "Fixes the AT_EXECVE_CHECK selftests which didn't run on old versions of glibc" * tag 'AT_EXECVE_CHECK-v6.14-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: selftests: Handle old glibc without execveat(2) commit 73512f2a0b5c0531a9882e459ee3cd99396478b8 Merge: 851faa888a52 dce4aab8441d Author: Linus Torvalds Date: Fri Jan 31 17:10:26 2025 -0800 Merge tag 'hardening-v6.14-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardening fixes from Kees Cook: "This is a fix for the soon to be released GCC 15 which has regressed its initialization of unions when performing explicit initialization (i.e. a general problem, not specifically a hardening problem; we're just carrying the fix). Details in the final patch, Acked by Masahiro, with updated selftests to validate the fix" * tag 'hardening-v6.14-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: kbuild: Use -fzero-init-padding-bits=all stackinit: Add union initialization to selftests stackinit: Add old-style zero-init syntax to struct tests commit 851faa888a523f74f9796c2c1cc7b3f7626f0e25 Merge: 0c0746f9dcd6 8dcb26b493d3 Author: Linus Torvalds Date: Fri Jan 31 15:45:41 2025 -0800 Merge tag 'drm-next-2025-02-01' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "This is only AMD fixes: amdgpu: - GC 12 fix - Aldebaran fix - DCN 3.5 fix - Freesync fix amdkfd: - Per queue reset fix - MES fix" * tag 'drm-next-2025-02-01' of https://gitlab.freedesktop.org/drm/kernel: drm/amd/display: restore invalid MSA timing check for freesync drm/amdkfd: only flush the validate MES contex drm/amd/display: Correct register address in dcn35 drm/amd/pm: Mark MM activity as unsupported drm/amd/amdgpu: change the config of cgcg on gfx12 drm/amdkfd: Block per-queue reset when halt_if_hws_hang=1 commit 0c0746f9dcd6f42e742d2813f9044e12f1497f8a Merge: 1b5f3c51fbb8 d555ed45a5a1 Author: Linus Torvalds Date: Fri Jan 31 15:39:50 2025 -0800 Merge tag 'pci-v6.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci fix from Bjorn Helgaas: - Save the original INTX_DISABLE bit at the first pcim_intx() call and restore that at devres cleanup instead of restoring the opposite of the most recent enable/disable pcim_intx() argument, which was wrong when a driver called pcim_intx() multiple times or with the already enabled state (Takashi Iwai) * tag 'pci-v6.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI: Restore original INTX_DISABLE bit by pcim_intx() commit 1b5f3c51fbb8042efb314484b47b2092cdd40bf6 Merge: fd8c09ad0d87 101971298be2 Author: Linus Torvalds Date: Fri Jan 31 15:13:25 2025 -0800 Merge tag 'riscv-for-linus-6.14-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: - The PH1520 pinctrl and dwmac drivers are enabeled in defconfig - A redundant AQRL barrier has been removed from the futex cmpxchg implementation - Support for the T-Head vector extensions, which includes exposing these extensions to userspace on systems that implement them - Some more page table information is now printed on die() and systems that cause PA overflows * tag 'riscv-for-linus-6.14-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: add a warning when physical memory address overflows riscv/mm/fault: add show_pte() before die() riscv: Add ghostwrite vulnerability selftests: riscv: Support xtheadvector in vector tests selftests: riscv: Fix vector tests riscv: hwprobe: Document thead vendor extensions and xtheadvector extension riscv: hwprobe: Add thead vendor extension probing riscv: vector: Support xtheadvector save/restore riscv: Add xtheadvector instruction definitions riscv: csr: Add CSR encodings for CSR_VXRM/CSR_VXSAT RISC-V: define the elements of the VCSR vector CSR riscv: vector: Use vlenb from DT for thead riscv: Add thead and xtheadvector as a vendor extension riscv: dts: allwinner: Add xtheadvector to the D1/D1s devicetree dt-bindings: cpus: add a thead vlen register length property dt-bindings: riscv: Add xtheadvector ISA extension description RISC-V: Mark riscv_v_init() as __init riscv: defconfig: drop RT_GROUP_SCHED=y riscv/futex: Optimize atomic cmpxchg riscv: defconfig: enable pinctrl and dwmac support for TH1520 commit 8004d635f27bbccaa5c083c50d4d5302a6ffa00e Author: Thadeu Lima de Souza Cascardo Date: Tue Jan 14 17:00:45 2025 -0300 Revert "media: uvcvideo: Require entities to have a non-zero unique ID" This reverts commit 3dd075fe8ebbc6fcbf998f81a75b8c4b159a6195. Tomasz has reported that his device, Generalplus Technology Inc. 808 Camera, with ID 1b3f:2002, stopped being detected: $ ls -l /dev/video* zsh: no matches found: /dev/video* [ 7.230599] usb 3-2: Found multiple Units with ID 5 This particular device is non-compliant, having both the Output Terminal and Processing Unit with ID 5. uvc_scan_fallback, though, is able to build a chain. However, when media elements are added and uvc_mc_create_links call uvc_entity_by_id, it will get the incorrect entity, media_create_pad_link will WARN, and it will fail to register the entities. In order to reinstate support for such devices in a timely fashion, reverting the fix for these warnings is appropriate. A proper fix that considers the existence of such non-compliant devices will be submitted in a later development cycle. Reported-by: Tomasz Sikora Fixes: 3dd075fe8ebb ("media: uvcvideo: Require entities to have a non-zero unique ID") Cc: stable@vger.kernel.org Signed-off-by: Thadeu Lima de Souza Cascardo Reviewed-by: Laurent Pinchart Reviewed-by: Hans de Goede Reviewed-by: Ricardo Ribalda Link: https://lore.kernel.org/r/20250114200045.1401644-1-cascardo@igalia.com Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_driver.c | 70 +++++++++++++++----------------------- 1 file changed, 27 insertions(+), 43 deletions(-) commit fd8c09ad0d87783b9b6a27900d66293be45b7bad Merge: 9755ffd989aa 695ed93bb30e Author: Linus Torvalds Date: Fri Jan 31 12:07:07 2025 -0800 Merge tag 'kbuild-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Support multiple hook locations for maint scripts of Debian package - Remove 'cpio' from the build tool requirement - Introduce gendwarfksyms tool, which computes CRCs for export symbols based on the DWARF information - Support CONFIG_MODVERSIONS for Rust - Resolve all conflicts in the genksyms parser - Fix several syntax errors in genksyms * tag 'kbuild-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (64 commits) kbuild: fix Clang LTO with CONFIG_OBJTOOL=n kbuild: Strip runtime const RELA sections correctly kconfig: fix memory leak in sym_warn_unmet_dep() kconfig: fix file name in warnings when loading KCONFIG_DEFCONFIG_LIST genksyms: fix syntax error for attribute before init-declarator genksyms: fix syntax error for builtin (u)int*x*_t types genksyms: fix syntax error for attribute after 'union' genksyms: fix syntax error for attribute after 'struct' genksyms: fix syntax error for attribute after abstact_declarator genksyms: fix syntax error for attribute before nested_declarator genksyms: fix syntax error for attribute before abstract_declarator genksyms: decouple ATTRIBUTE_PHRASE from type-qualifier genksyms: record attributes consistently for init-declarator genksyms: restrict direct-declarator to take one parameter-type-list genksyms: restrict direct-abstract-declarator to take one parameter-type-list genksyms: remove Makefile hack genksyms: fix last 3 shift/reduce conflicts genksyms: fix 6 shift/reduce conflicts and 5 reduce/reduce conflicts genksyms: reduce type_qualifier directly to decl_specifier genksyms: rename cvar_qualifier to type_qualifier ... commit 9755ffd989aa04c298d265c27625806595875895 Merge: c82da38b28f3 1e1a9cecfab3 Author: Linus Torvalds Date: Fri Jan 31 11:49:30 2025 -0800 Merge tag 'block-6.14-20250131' of git://git.kernel.dk/linux Pull more block updates from Jens Axboe: - MD pull request via Song: - Fix a md-cluster regression introduced - More sysfs race fixes - Mark anything inside queue freezing as not being able to do IO for memory allocations - Fix for a regression introduced in loop in this merge window - Fix for a regression in queue mapping setups introduced in this merge window - Fix for the block dio fops attempting an iov_iter revert upton getting -EIOCBQUEUED on the read side. This one is going to stable as well * tag 'block-6.14-20250131' of git://git.kernel.dk/linux: block: force noio scope in blk_mq_freeze_queue block: fix nr_hw_queue update racing with disk addition/removal block: get rid of request queue ->sysfs_dir_lock loop: don't clear LO_FLAGS_PARTSCAN on LOOP_SET_STATUS{,64} md/md-bitmap: Synchronize bitmap_get_stats() with bitmap lifetime blk-mq: create correct map for fallback case block: don't revert iter for -EIOCBQUEUED commit c82da38b28f39e0cca835139ab31bf80ac91f282 Merge: 95d7e8226106 8c8492ca64e7 Author: Linus Torvalds Date: Fri Jan 31 11:29:23 2025 -0800 Merge tag 'io_uring-6.14-20250131' of git://git.kernel.dk/linux Pull more io_uring updates from Jens Axboe: - Series cleaning up the alloc cache changes from this merge window, and then another series on top making it better yet. This also solves an issue with KASAN_EXTRA_INFO, by making io_uring resilient to KASAN using parts of the freed struct for storage - Cleanups and simplications to buffer cloning and io resource node management - Fix an issue introduced in this merge window where READ/WRITE_ONCE was used on an atomic_t, which made some archs complain - Fix for an errant connect retry when the socket has been shut down - Fix for multishot and provided buffers * tag 'io_uring-6.14-20250131' of git://git.kernel.dk/linux: io_uring/net: don't retry connect operation on EPOLLERR io_uring/rw: simplify io_rw_recycle() io_uring: remove !KASAN guards from cache free io_uring/net: extract io_send_select_buffer() io_uring/net: clean io_msg_copy_hdr() io_uring/net: make io_net_vec_assign() return void io_uring: add alloc_cache.c io_uring: dont ifdef io_alloc_cache_kasan() io_uring: include all deps for alloc_cache.h io_uring: fix multishots with selected buffers io_uring/register: use atomic_read/write for sq_flags migration io_uring/alloc_cache: get rid of _nocache() helper io_uring: get rid of alloc cache init_once handling io_uring/uring_cmd: cleanup struct io_uring_cmd_data layout io_uring/uring_cmd: use cached cmd_op in io_uring_cmd_sock() io_uring/msg_ring: don't leave potentially dangling ->tctx pointer io_uring/rsrc: Move lockdep assert from io_free_rsrc_node() to caller io_uring/rsrc: remove unused parameter ctx for io_rsrc_node_alloc() io_uring: clean up io_uring_register_get_file() io_uring/rsrc: Simplify buffer cloning by locking both rings commit 695ed93bb30e03e9f826ee70abdd83f970741a37 Author: Masahiro Yamada Date: Fri Jan 31 23:04:01 2025 +0900 kbuild: fix Clang LTO with CONFIG_OBJTOOL=n Since commit bede169618c6 ("kbuild: enable objtool for *.mod.o and additional kernel objects"), Clang LTO builds do not perform any optimizations when CONFIG_OBJTOOL is disabled (e.g., for ARCH=arm64). This is because every LLVM bitcode file is immediately converted to ELF format before the object files are linked together. This commit fixes the breakage. Fixes: bede169618c6 ("kbuild: enable objtool for *.mod.o and additional kernel objects") Reported-by: Yonghong Song Signed-off-by: Masahiro Yamada Tested-by: Yonghong Song scripts/Makefile.build | 2 ++ scripts/Makefile.lib | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) commit 71d815bf5dfd4f63f7557e0abe7f257c202863a1 Author: Ard Biesheuvel Date: Mon Jan 13 16:53:07 2025 +0100 kbuild: Strip runtime const RELA sections correctly Due to the fact that runtime const ELF sections are named without a leading period or double underscore, the RSTRIP logic that removes the static RELA sections from vmlinux fails to identify them. This results in a situation like below, where some sections that were supposed to get removed are left behind. [Nr] Name Type Address Off Size ES Flg Lk Inf Al [58] runtime_shift_d_hash_shift PROGBITS ffffffff83500f50 2900f50 000014 00 A 0 0 1 [59] .relaruntime_shift_d_hash_shift RELA 0000000000000000 55b6f00 000078 18 I 70 58 8 [60] runtime_ptr_dentry_hashtable PROGBITS ffffffff83500f68 2900f68 000014 00 A 0 0 1 [61] .relaruntime_ptr_dentry_hashtable RELA 0000000000000000 55b6f78 000078 18 I 70 60 8 [62] runtime_ptr_USER_PTR_MAX PROGBITS ffffffff83500f80 2900f80 000238 00 A 0 0 1 [63] .relaruntime_ptr_USER_PTR_MAX RELA 0000000000000000 55b6ff0 000d50 18 I 70 62 8 So tweak the match expression to strip all sections starting with .rel. While at it, consolidate the logic used by RISC-V, s390 and x86 into a single shared Makefile library command. Link: https://lore.kernel.org/all/CAHk-=wjk3ynjomNvFN8jf9A1k=qSc=JFF591W00uXj-qqNUxPQ@mail.gmail.com/ Signed-off-by: Ard Biesheuvel Reviewed-by: Charlie Jenkins Tested-by: Charlie Jenkins Tested-by: Alexander Gordeev Signed-off-by: Masahiro Yamada arch/riscv/Makefile.postlink | 8 ++------ arch/s390/Makefile.postlink | 6 +----- arch/x86/Makefile.postlink | 6 +----- scripts/Makefile.lib | 3 +++ 4 files changed, 7 insertions(+), 16 deletions(-) commit 95d7e8226106e3445b0d877015f4192c47d23637 Merge: c545cd3276cd 6e74e53b34b6 Author: Linus Torvalds Date: Fri Jan 31 11:07:56 2025 -0800 Merge tag 'ata-6.14-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull more ata updates from Niklas Cassel: - Add ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives (Daniel) - Ensure that PIO transfers using libata-sff cannot write outside the allocated buffer (me) * tag 'ata-6.14-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: ata: libata-sff: Ensure that we cannot write outside the allocated buffer ata: libata-core: Add ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives commit a49da4ef4b94345554923cdba1127a2d2a73d1e6 Author: Pali Rohár Date: Mon Sep 23 22:29:30 2024 +0200 cifs: Fix parsing native symlinks directory/file type As SMB protocol distinguish between symlink to directory and symlink to file, add some mechanism to disallow resolving incompatible types. When SMB symlink is of the directory type, ensure that its target path ends with slash. This forces Linux to not allow resolving such symlink to file. And when SMB symlink is of the file type and its target path ends with slash then returns an error as such symlink is unresolvable. Such symlink always points to invalid location as file cannot end with slash. As POSIX server does not distinguish between symlinks to file and symlink directory, do not apply this change for symlinks from POSIX SMB server. For POSIX SMB servers, this change does nothing. This mimics Windows behavior of native SMB symlinks. Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/inode.c | 5 +++++ fs/smb/client/smb2file.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++ fs/smb/client/smb2inode.c | 5 +++++ fs/smb/client/smb2proto.h | 1 + 4 files changed, 62 insertions(+) commit 2008d8c7121a9eee0ef8ea121581269886535150 Author: Steve French Date: Mon Jan 27 17:45:57 2025 -0600 cifs: update internal version number To 2.53 Signed-off-by: Steve French fs/smb/client/cifsfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4e2043be5c149cb07d806c438a8ec8657741bd31 Author: Pali Rohár Date: Sat Sep 28 13:24:26 2024 +0200 cifs: Add support for creating WSL-style symlinks This change implements support for creating new symlink in WSL-style by Linux cifs client when -o reparse=wsl mount option is specified. WSL-style symlink uses reparse point with tag IO_REPARSE_TAG_LX_SYMLINK and symlink target location is stored in reparse buffer in UTF-8 encoding prefixed by 32-bit flags. Flags bits are unknown, but it was observed that WSL always sets flags to value 0x02000000. Do same in Linux cifs client. New symlinks would be created in WSL-style only in case the mount option -o reparse=wsl is specified, which is not by default. So default CIFS mounts are not affected by this change. Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/reparse.c | 65 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 12 deletions(-) commit eea5119fa5979c350af5783a8148eacdd4219715 Author: Steve French Date: Tue Jan 28 01:04:23 2025 -0600 smb3: add support for IAKerb There are now more servers which advertise support for IAKerb (passthrough Kerberos authentication via proxy). IAKerb is a public extension industry standard Kerberos protocol that allows a client without line-of-sight to a Domain Controller to authenticate. There can be cases where we would fail to mount if the server only advertises the OID for IAKerb in SPNEGO/GSSAPI. Add code to allow us to still upcall to userspace in these cases to obtain the Kerberos ticket. Signed-off-by: Steve French fs/smb/client/asn1.c | 2 ++ fs/smb/client/cifs_spnego.c | 4 +++- fs/smb/client/cifsglob.h | 4 ++++ fs/smb/client/sess.c | 3 ++- fs/smb/client/smb2pdu.c | 2 +- 5 files changed, 12 insertions(+), 3 deletions(-) commit 021840c1426c012a812f8b8d9413f3cf9d3e0b9b Author: Pali Rohár Date: Sun Dec 29 15:31:05 2024 +0100 cifs: Fix struct FILE_ALL_INFO struct FILE_ALL_INFO for level 263 (0x107) used by QPathInfo does not have any IndexNumber, AccessFlags, IndexNumber1, CurrentByteOffset, Mode or AlignmentRequirement members. So remove all of them. Also adjust code in move_cifs_info_to_smb2() function which converts struct FILE_ALL_INFO to struct smb2_file_all_info. Fixed content of struct FILE_ALL_INFO was verified that is correct against: * [MS-CIFS] section 2.2.8.3.10 SMB_QUERY_FILE_ALL_INFO * Samba server implementation of trans2 query file/path for level 263 * Packet structure tests against Windows SMB servers This change fixes CIFSSMBQFileInfo() and CIFSSMBQPathInfo() functions which directly copy received FILE_ALL_INFO network buffers into kernel structures of FILE_ALL_INFO type. struct FILE_ALL_INFO is the response structure returned by the SMB server. So the incorrect definition of this structure can lead to returning bogus information in stat() call. Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/cifsglob.h | 12 +++++++----- fs/smb/client/cifspdu.h | 6 ------ 2 files changed, 7 insertions(+), 11 deletions(-) commit 071b8a67a8b2e611e837dfa342a883183a19c190 Author: Pali Rohár Date: Fri Sep 13 11:42:59 2024 +0200 cifs: Add support for creating NFS-style symlinks CIFS client is currently able to parse NFS-style symlinks, but is not able to create them. This functionality is useful when the mounted SMB share is used also by Windows NFS server (on Windows Server 2012 or new). It allows interop of symlinks between SMB share mounted by Linux CIFS client and same export from Windows NFS server mounted by some NFS client. New symlinks would be created in NFS-style only in case the mount option -o reparse=nfs is specified, which is not by default. So default CIFS mounts are not affected by this change. Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/reparse.c | 47 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 8 deletions(-) commit 45a99d5d117300eb84eceaa312bb3c3262f8c85b Author: Pali Rohár Date: Mon Sep 16 20:21:52 2024 +0200 cifs: Add support for creating native Windows sockets Native Windows sockets created by WinSock on Windows 10 April 2018 Update (version 1803) or Windows Server 2019 (version 1809) or later versions is reparse point with IO_REPARSE_TAG_AF_UNIX tag, with empty reparse point data buffer and without any EAs. Create AF_UNIX sockets in this native format if -o nonativesocket was not specified. This change makes AF_UNIX sockets created by Linux CIFS client compatible with AF_UNIX sockets created by Windows applications on NTFS volumes. Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/cifsfs.c | 4 ++++ fs/smb/client/connect.c | 2 ++ fs/smb/client/fs_context.c | 5 +++++ fs/smb/client/fs_context.h | 2 ++ fs/smb/client/reparse.c | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 45 insertions(+) commit c545cd3276cd611a5d53ac5e18e98a37f013694c Merge: 626d1a1e9958 aa135d1d0902 Author: Linus Torvalds Date: Fri Jan 31 10:39:07 2025 -0800 Merge tag 'x86-mm-2025-01-31' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mm updates from Ingo Molnar: - The biggest changes are the TLB flushing scalability optimizations, to update the mm_cpumask lazily and related changes. This feature has both a track record and a continued risk of performance regressions, so it was already delayed by a cycle - but it's all 100% perfect now™ (Rik van Riel) - Also miscellaneous fixes and cleanups. (Gautam Somani, Kirill Shutemov, Sebastian Andrzej Siewior) * tag 'x86-mm-2025-01-31' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Remove unnecessary include of x86/mtrr: Rename mtrr_overwrite_state() to guest_force_mtrr_state() x86/mm/selftests: Fix typo in lam.c x86/mm/tlb: Only trim the mm_cpumask once a second x86/mm/tlb: Also remove local CPU from mm_cpumask if stale x86/mm/tlb: Add tracepoint for TLB flush IPI to stale CPU x86/mm/tlb: Update mm_cpumask lazily commit 626d1a1e99583f846e44d6eefdc9d1c8b82c372d Merge: 69b8923f5003 3981be13ec1b Author: Linus Torvalds Date: Fri Jan 31 10:30:34 2025 -0800 Merge tag 'ceph-for-6.14-rc1' of https://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "A fix for a memory leak from Antoine (marked for stable) and two cleanups from Liang and Slava" * tag 'ceph-for-6.14-rc1' of https://github.com/ceph/ceph-client: ceph: exchange hardcoded value on NAME_MAX ceph: streamline request head structures in MDS client ceph: fix memory leak in ceph_mds_auth_match() commit a572593ac80e51eb69ecede7e614289fcccdbf8d Author: Bart Van Assche Date: Wed Jan 29 14:56:35 2025 -0800 md: Fix linear_set_limits() queue_limits_cancel_update() must only be called if queue_limits_start_update() is called first. Remove the queue_limits_cancel_update() call from linear_set_limits() because there is no corresponding queue_limits_start_update() call. This bug was discovered by annotating all mutex operations with clang thread-safety attributes and by building the kernel with clang and -Wthread-safety. Cc: Yu Kuai Cc: Coly Li Cc: Mike Snitzer Cc: Christoph Hellwig Fixes: 127186cfb184 ("md: reintroduce md-linear") Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250129225636.2667932-1-bvanassche@acm.org Signed-off-by: Song Liu drivers/md/md-linear.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c8ed6cb5d37bc09c7e25e49a670e9fd1a3bd1dfa Author: Daniel Wagner Date: Tue Jan 28 17:34:47 2025 +0100 nvme-fc: use ctrl state getter Do not access the state variable directly, instead use proper synchronization so not stale data is read. Fixes: e6e7f7ac03e4 ("nvme: ensure reset state check ordering") Signed-off-by: Daniel Wagner Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch drivers/nvme/host/fc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 2d1a2dab95cdc6f2e0c6af3c0514b0bea94af482 Author: Keith Busch Date: Tue Jan 28 07:22:31 2025 -0800 nvme: make nvme_tls_attrs_group static To suppress the compiler "warning: symbol 'nvme_tls_attrs_group' was not declared. Should it be static?" Fixes: 1e48b34c9bc79a ("nvme: split off TLS sysfs attributes into a separate group") Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch drivers/nvme/host/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 468a1952df78f65c5991b7ac885c8b5b7dd87bab Author: Maciej Fijalkowski Date: Thu Jan 23 16:01:18 2025 +0100 ice: stop storing XDP verdict within ice_rx_buf Idea behind having ice_rx_buf::act was to simplify and speed up the Rx data path by walking through buffers that were representing cleaned HW Rx descriptors. Since it caused us a major headache recently and we rolled back to old approach that 'puts' Rx buffers right after running XDP prog/creating skb, this is useless now and should be removed. Get rid of ice_rx_buf::act and related logic. We still need to take care of a corner case where XDP program releases a particular fragment. Make ice_run_xdp() to return its result and use it within ice_put_rx_mbuf(). Fixes: 2fba7dc5157b ("ice: Add support for XDP multi-buffer on Rx side") Reviewed-by: Przemek Kitszel Reviewed-by: Simon Horman Signed-off-by: Maciej Fijalkowski Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_txrx.c | 62 ++++++++++++++++----------- drivers/net/ethernet/intel/ice/ice_txrx.h | 1 - drivers/net/ethernet/intel/ice/ice_txrx_lib.h | 43 ------------------- 3 files changed, 36 insertions(+), 70 deletions(-) commit 11c4aa074d547d825b19cd8d9f288254d89d805c Author: Maciej Fijalkowski Date: Thu Jan 23 16:01:17 2025 +0100 ice: gather page_count()'s of each frag right before XDP prog call If we store the pgcnt on few fragments while being in the middle of gathering the whole frame and we stumbled upon DD bit not being set, we terminate the NAPI Rx processing loop and come back later on. Then on next NAPI execution we work on previously stored pgcnt. Imagine that second half of page was used actively by networking stack and by the time we came back, stack is not busy with this page anymore and decremented the refcnt. The page reuse algorithm in this case should be good to reuse the page but given the old refcnt it will not do so and attempt to release the page via page_frag_cache_drain() with pagecnt_bias used as an arg. This in turn will result in negative refcnt on struct page, which was initially observed by Xu Du. Therefore, move the page count storage from ice_get_rx_buf() to a place where we are sure that whole frame has been collected, but before calling XDP program as it internally can also change the page count of fragments belonging to xdp_buff. Fixes: ac0753391195 ("ice: Store page count inside ice_rx_buf") Reported-and-tested-by: Xu Du Reviewed-by: Przemek Kitszel Reviewed-by: Simon Horman Co-developed-by: Jacob Keller Signed-off-by: Jacob Keller Signed-off-by: Maciej Fijalkowski Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_txrx.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 743bbd93cf29f653fae0e1416a31f03231689911 Author: Maciej Fijalkowski Date: Thu Jan 23 16:01:16 2025 +0100 ice: put Rx buffers after being done with current frame Introduce a new helper ice_put_rx_mbuf() that will go through gathered frags from current frame and will call ice_put_rx_buf() on them. Current logic that was supposed to simplify and optimize the driver where we go through a batch of all buffers processed in current NAPI instance turned out to be broken for jumbo frames and very heavy load that was coming from both multi-thread iperf and nginx/wrk pair between server and client. The delay introduced by approach that we are dropping is simply too big and we need to take the decision regarding page recycling/releasing as quick as we can. While at it, address an error path of ice_add_xdp_frag() - we were missing buffer putting from day 1 there. As a nice side effect we get rid of annoying and repetitive three-liner: xdp->data = NULL; rx_ring->first_desc = ntc; rx_ring->nr_frags = 0; by embedding it within introduced routine. Fixes: 1dc1a7e7f410 ("ice: Centrallize Rx buffer recycling") Reported-and-tested-by: Xu Du Reviewed-by: Przemek Kitszel Reviewed-by: Simon Horman Co-developed-by: Jacob Keller Signed-off-by: Jacob Keller Signed-off-by: Maciej Fijalkowski Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_txrx.c | 79 +++++++++++++++++++------------ 1 file changed, 50 insertions(+), 29 deletions(-) commit 69b8923f5003664e3ffef102e73333edfa2abdcf Merge: b2fde87318f3 f7c848431632 Author: Linus Torvalds Date: Fri Jan 31 09:40:31 2025 -0800 Merge tag 'for-linus-6.14-ofs4' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs fix from Mike Marshall: "Fix a oob in orangefs_debug_write I got a syzbot report: "slab-out-of-bounds Read in orangefs_debug_write" Several people suggested fixes, I tested Al Viro's suggestion and made this patch" * tag 'for-linus-6.14-ofs4' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: fix a oob in orangefs_debug_write commit b2fde87318f3d77314334b8bfe93846f36ae1708 Merge: 8f08ed05b31c 60a600243244 Author: Linus Torvalds Date: Fri Jan 31 09:33:54 2025 -0800 Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull hostfs fix from Al Viro: "Fix hostfs __dentry_name() string handling. The use of strcpy() with overlapping source and destination is a UB; original loop hadn't been. More to the point, the whole thing is much easier done with memcpy() + memmove()" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: hostfs: fix string handling in __dentry_name() commit 8f08ed05b31c6cfb5acd2eb7340368560f17cdd3 Merge: 69e858e0b8b2 8c2fa44132e8 Author: Linus Torvalds Date: Fri Jan 31 09:17:02 2025 -0800 Merge tag 'sound-fix-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Here is a collection of fixes that have been gathered since the previous pull request. All about device-specific fixes and quirks, and most of them are pretty small and trivial" * tag 'sound-fix-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (25 commits) ALSA: hda/realtek: Workaround for resume on Dell Venue 11 Pro 7130 ALSA: hda: Fix headset detection failure due to unstable sort ALSA: pcm: use new array-copying-wrapper ASoC: codec: es8316: "DAC Soft Ramp Rate" is just a 2 bit control ASoC: amd: acp: Fix possible deadlock firmware: cs_dsp: FW_CS_DSP_KUNIT_TEST should not select REGMAP ALSA: usb-audio: Add delay quirk for iBasso DC07 Pro ALSA: hda/realtek: Fix quirk matching for Legion Pro 7 ASoC: renesas: SND_SIU_MIGOR should depend on DMADEVICES ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet 5V ASoC: da7213: Initialize the mutex ASoC: use to_platform_device() instead of container_of() ASoC: acp: Support microphone from Lenovo Go S ASoC: SOF: imx8m: Add entry for new 8M Plus revision ASoC: SOF: imx8: Add entries for new 8QM and 8QXP revisions ASoC: SOF: imx: Add mach entry to select cs42888 topology dt-bindings: arm: imx: Add board revisions for i.MX8MP, i.MX8QM and i.MX8QXP ASoC: fsl_asrc_m2m: select CONFIG_DMA_SHARED_BUFFER ASoC: audio-graph-card2: use correct endpoint when getting link parameters ASoC: SOF: imx8m: add SAI2,5,6,7 ... commit 1e1a9cecfab3f22ebef0a976f849c87be8d03c1c Author: Christoph Hellwig Date: Fri Jan 31 13:03:47 2025 +0100 block: force noio scope in blk_mq_freeze_queue When block drivers or the core block code perform allocations with a frozen queue, this could try to recurse into the block device to reclaim memory and deadlock. Thus all allocations done by a process that froze a queue need to be done without __GFP_IO and __GFP_FS. Instead of tying to track all of them down, force a noio scope as part of freezing the queue. Note that nvme is a bit of a mess here due to the non-owner freezes, and they will be addressed separately. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250131120352.1315351-2-hch@lst.de Signed-off-by: Jens Axboe block/blk-cgroup.c | 10 ++++++---- block/blk-iocost.c | 14 ++++++++------ block/blk-iolatency.c | 6 ++++-- block/blk-mq.c | 21 +++++++++++++-------- block/blk-pm.c | 2 +- block/blk-rq-qos.c | 12 +++++++----- block/blk-settings.c | 5 +++-- block/blk-sysfs.c | 8 +++----- block/blk-throttle.c | 5 +++-- block/blk-zoned.c | 5 +++-- block/elevator.c | 16 ++++++++++------ drivers/block/aoe/aoedev.c | 5 +++-- drivers/block/ataflop.c | 5 +++-- drivers/block/loop.c | 20 ++++++++++++-------- drivers/block/nbd.c | 7 ++++--- drivers/block/rbd.c | 5 +++-- drivers/block/sunvdc.c | 5 +++-- drivers/block/swim3.c | 5 +++-- drivers/block/virtio_blk.c | 5 +++-- drivers/mtd/mtd_blkdevs.c | 5 +++-- drivers/nvme/host/core.c | 17 ++++++++++------- drivers/nvme/host/multipath.c | 2 +- drivers/scsi/scsi_lib.c | 5 +++-- drivers/scsi/scsi_scan.c | 5 +++-- drivers/ufs/core/ufs-sysfs.c | 7 +++++-- include/linux/blk-mq.h | 18 ++++++++++++++++-- 26 files changed, 136 insertions(+), 84 deletions(-) commit 6daaae5ff7f3b23a2dacc9c387ff3d4f95b67cad Author: Hans Verkuil Date: Wed Jan 29 10:51:48 2025 +0100 gpu: drm_dp_cec: fix broken CEC adapter properties check If the hotplug detect of a display is low for longer than one second (configurable through drm_dp_cec_unregister_delay), then the CEC adapter is unregistered since we assume the display was disconnected. If the HPD went low for less than one second, then we check if the properties of the CEC adapter have changed, since that indicates that we actually switch to new hardware and we have to unregister the old CEC device and register a new one. Unfortunately, the test for changed properties was written poorly, and after a new CEC capability was added to the CEC core code the test always returned true (i.e. the properties had changed). As a result the CEC device was unregistered and re-registered for every HPD toggle. If the CEC remote controller integration was also enabled (CONFIG_MEDIA_CEC_RC was set), then the corresponding input device was also unregistered and re-registered. As a result the input device in /sys would keep incrementing its number, e.g.: /sys/devices/pci0000:00/0000:00:08.1/0000:e7:00.0/rc/rc0/input20 Since short HPD toggles are common, the number could over time get into the thousands. While not a serious issue (i.e. nothing crashes), it is not intended to work that way. This patch changes the test so that it only checks for the single CEC capability that can actually change, and it ignores any other capabilities, so this is now safe as well if new caps are added in the future. With the changed test the bit under #ifndef CONFIG_MEDIA_CEC_RC can be dropped as well, so that's a nice cleanup. Signed-off-by: Hans Verkuil Reported-by: Farblos Reviewed-by: Dmitry Baryshkov Fixes: 2c6d1fffa1d9 ("drm: add support for DisplayPort CEC-Tunneling-over-AUX") Tested-by: Farblos Link: https://patchwork.freedesktop.org/patch/msgid/361bb03d-1691-4e23-84da-0861ead5dbdc@xs4all.nl Signed-off-by: Dmitry Baryshkov drivers/gpu/drm/display/drm_dp_cec.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 32239066776a27287837a193b37c6e55259e5c10 Author: Christoph Schlameuss Date: Tue Jan 28 14:18:03 2025 +0100 KVM: s390: selftests: Streamline uc_skey test to issue iske after sske In some rare situations a non default storage key is already set on the memory used by the test. Within normal VMs the key is reset / zapped when the memory is added to the VM. This is not the case for ucontrol VMs. With the initial iske check removed this test case can work in all situations. The function of the iske instruction is still validated by the remaining code. Fixes: 0185fbc6a2d3 ("KVM: s390: selftests: Add uc_skey VM test case") Signed-off-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250128131803.1047388-1-schlameuss@linux.ibm.com Message-ID: <20250128131803.1047388-1-schlameuss@linux.ibm.com> Signed-off-by: Claudio Imbrenda tools/testing/selftests/kvm/s390/ucontrol_test.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit 84b7387692a8c849bd8bddd0f5c5474d4923aa6e Author: Claudio Imbrenda Date: Thu Jan 23 15:46:27 2025 +0100 KVM: s390: remove the last user of page->index Shadow page tables use page->index to keep the g2 address of the guest page table being shadowed. Instead of keeping the information in page->index, split the address and smear it over the 16-bit softbits areas of 4 PGSTEs. This removes the last s390 user of page->index. Reviewed-by: Steffen Eiden Reviewed-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250123144627.312456-16-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250123144627.312456-16-imbrenda@linux.ibm.com> arch/s390/include/asm/pgtable.h | 15 +++++++++++++++ arch/s390/kvm/gaccess.c | 6 ++++-- arch/s390/mm/gmap.c | 22 ++++++++++++++++++++-- 3 files changed, 39 insertions(+), 4 deletions(-) commit 1f4389931e9fea7e8b3c1f189d505b040b25be8a Author: Claudio Imbrenda Date: Thu Jan 23 15:46:26 2025 +0100 KVM: s390: move PGSTE softbits Move the softbits in the PGSTEs to the other usable area. This leaves the 16-bit block of usable bits free, which will be used in the next patch for something else. Reviewed-by: Steffen Eiden Reviewed-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250123144627.312456-15-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250123144627.312456-15-imbrenda@linux.ibm.com> arch/s390/include/asm/pgtable.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c27e002626b9fbd2729fa00ddda789319648e7ba Author: Claudio Imbrenda Date: Thu Jan 23 15:46:25 2025 +0100 KVM: s390: remove useless page->index usage The page->index field for VSIE dat tables is only used for segment tables. Stop setting the field for all region tables. Reviewed-by: Janosch Frank Reviewed-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250123144627.312456-14-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250123144627.312456-14-imbrenda@linux.ibm.com> arch/s390/mm/gmap.c | 9 --------- 1 file changed, 9 deletions(-) commit 43656f774a4b4a2841035947e89dcde8ee136caa Author: Claudio Imbrenda Date: Thu Jan 23 15:46:24 2025 +0100 KVM: s390: move gmap_shadow_pgt_lookup() into kvm Move gmap_shadow_pgt_lookup() from mm/gmap.c into kvm/gaccess.c . Reviewed-by: Steffen Eiden Reviewed-by: Janosch Frank Reviewed-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250123144627.312456-13-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250123144627.312456-13-imbrenda@linux.ibm.com> arch/s390/include/asm/gmap.h | 3 +-- arch/s390/kvm/gaccess.c | 42 +++++++++++++++++++++++++++++++++++++++- arch/s390/kvm/gmap.h | 2 ++ arch/s390/mm/gmap.c | 46 ++------------------------------------------ 4 files changed, 46 insertions(+), 47 deletions(-) commit ef0c8ef8485d9629c6d042cea8f2082f159b467e Author: Claudio Imbrenda Date: Thu Jan 23 15:46:23 2025 +0100 KVM: s390: stop using lists to keep track of used dat tables Until now, every dat table allocated to map a guest was put in a linked list. The page->lru field of struct page was used to keep track of which pages were being used, and when the gmap is torn down, the list was walked and all pages freed. This patch gets rid of the usage of page->lru. Page tables are now freed by recursively walking the dat table tree. Since s390_unlist_old_asce() becomes useless now, remove it. Acked-by: Steffen Eiden Reviewed-by: Janosch Frank Reviewed-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250123144627.312456-12-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250123144627.312456-12-imbrenda@linux.ibm.com> arch/s390/include/asm/gmap.h | 5 --- arch/s390/mm/gmap.c | 102 ++++++++++--------------------------------- arch/s390/mm/pgalloc.c | 2 - 3 files changed, 23 insertions(+), 86 deletions(-) commit 37d1b5d8d588a9761e47d9941005e2da7def8310 Author: Claudio Imbrenda Date: Thu Jan 23 15:46:22 2025 +0100 KVM: s390: stop using page->index for non-shadow gmaps The host_to_guest radix tree will now map userspace addresses to guest addresses, instead of userspace addresses to segment tables. When segment tables and page tables are needed, they are found using an additional gmap_table_walk(). This gets rid of all usage of page->index for non-shadow gmaps. Reviewed-by: Janosch Frank Reviewed-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250123144627.312456-11-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250123144627.312456-11-imbrenda@linux.ibm.com> arch/s390/mm/gmap.c | 105 +++++++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 51 deletions(-) commit c9f721ed8ec6942dad951d2d8c4fca291170165e Author: Claudio Imbrenda Date: Thu Jan 23 15:46:21 2025 +0100 KVM: s390: move some gmap shadowing functions away from mm/gmap.c Move some gmap shadowing functions from mm/gmap.c to kvm/kvm-s390.c and the newly created kvm/gmap-vsie.c This is a step toward removing gmap from mm. Reviewed-by: Janosch Frank Reviewed-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250123144627.312456-10-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250123144627.312456-10-imbrenda@linux.ibm.com> arch/s390/include/asm/gmap.h | 9 +- arch/s390/kvm/Makefile | 2 +- arch/s390/kvm/gmap-vsie.c | 142 ++++++++++++++++++++++++++ arch/s390/kvm/gmap.h | 20 ++++ arch/s390/kvm/kvm-s390.c | 74 +++++++++++++- arch/s390/kvm/kvm-s390.h | 2 + arch/s390/kvm/vsie.c | 2 + arch/s390/mm/gmap.c | 238 ++++++------------------------------------- 8 files changed, 271 insertions(+), 218 deletions(-) commit d41993f71385ce7e9661c203e02a588a93a59b24 Author: Claudio Imbrenda Date: Thu Jan 23 15:46:20 2025 +0100 KVM: s390: get rid of gmap_translate() Add gpa_to_hva(), which uses memslots, and use it to replace all uses of gmap_translate(). Reviewed-by: Janosch Frank Reviewed-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250123144627.312456-9-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250123144627.312456-9-imbrenda@linux.ibm.com> arch/s390/include/asm/gmap.h | 1 - arch/s390/kvm/interrupt.c | 19 +++++++++++-------- arch/s390/kvm/kvm-s390.h | 9 +++++++++ arch/s390/mm/gmap.c | 20 -------------------- 4 files changed, 20 insertions(+), 29 deletions(-) commit 6eb84e130075b9ea35a946dcf9a2476ac2c749a0 Author: Claudio Imbrenda Date: Thu Jan 23 15:46:19 2025 +0100 KVM: s390: get rid of gmap_fault() All gmap page faults are already handled in kvm by the function kvm_s390_handle_dat_fault(); only few users of gmap_fault remained, all within kvm. Convert those calls to use kvm_s390_handle_dat_fault() instead. Remove gmap_fault() entirely since it has no more users. Acked-by: Janosch Frank Reviewed-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250123144627.312456-8-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250123144627.312456-8-imbrenda@linux.ibm.com> arch/s390/include/asm/gmap.h | 1 - arch/s390/kvm/intercept.c | 4 +- arch/s390/mm/gmap.c | 124 ------------------------------------------- 3 files changed, 2 insertions(+), 127 deletions(-) commit 3762e905ec2e498c96464e094b7d46be98151d3b Author: Claudio Imbrenda Date: Thu Jan 23 15:46:18 2025 +0100 KVM: s390: use __kvm_faultin_pfn() Refactor the existing page fault handling code to use __kvm_faultin_pfn(). This possible now that memslots are always present. Acked-by: Janosch Frank Reviewed-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250123144627.312456-7-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250123144627.312456-7-imbrenda@linux.ibm.com> arch/s390/kvm/kvm-s390.c | 126 +++++++++++++++++++++++++++++++++++++---------- arch/s390/kvm/kvm-s390.h | 6 +++ arch/s390/mm/gmap.c | 1 + 3 files changed, 106 insertions(+), 27 deletions(-) commit 5cbe24350b7d8ef6d466a37d56b07ae643c622ca Author: Claudio Imbrenda Date: Thu Jan 23 15:46:17 2025 +0100 KVM: s390: move pv gmap functions into kvm Move gmap related functions from kernel/uv into kvm. Create a new file to collect gmap-related functions. Reviewed-by: Janosch Frank Reviewed-by: Christoph Schlameuss [fixed unpack_one(), thanks mhartmay@linux.ibm.com] Link: https://lore.kernel.org/r/20250123144627.312456-6-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250123144627.312456-6-imbrenda@linux.ibm.com> arch/s390/include/asm/gmap.h | 1 + arch/s390/include/asm/uv.h | 6 +- arch/s390/kernel/uv.c | 292 +++++-------------------------------------- arch/s390/kvm/Makefile | 2 +- arch/s390/kvm/gmap.c | 212 +++++++++++++++++++++++++++++++ arch/s390/kvm/gmap.h | 17 +++ arch/s390/kvm/intercept.c | 3 +- arch/s390/kvm/kvm-s390.c | 1 + arch/s390/kvm/pv.c | 21 ++++ arch/s390/mm/gmap.c | 28 +++++ 10 files changed, 315 insertions(+), 268 deletions(-) commit 63e71519891024b622d00c486c4d0348c44ca911 Author: Claudio Imbrenda Date: Thu Jan 23 15:46:16 2025 +0100 KVM: s390: selftests: fix ucontrol memory region test With the latest patch, attempting to create a memslot from userspace will result in an EEXIST error for UCONTROL VMs, instead of EINVAL, since the new memslot will collide with the internal memslot. There is no simple way to bring back the previous behaviour. This is not a problem, but the test needs to be fixed accordingly. Reviewed-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250123144627.312456-5-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250123144627.312456-5-imbrenda@linux.ibm.com> tools/testing/selftests/kvm/s390/ucontrol_test.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 413c98f24c63b3b8aff202fce6f01e8950730511 Author: Claudio Imbrenda Date: Thu Jan 23 15:46:15 2025 +0100 KVM: s390: fake memslot for ucontrol VMs Create a fake memslot for ucontrol VMs. The fake memslot identity-maps userspace. Now memslots will always be present, and ucontrol is not a special case anymore. Suggested-by: Sean Christopherson Reviewed-by: David Hildenbrand Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20250123144627.312456-4-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250123144627.312456-4-imbrenda@linux.ibm.com> Documentation/virt/kvm/api.rst | 2 +- arch/s390/include/asm/kvm_host.h | 2 ++ arch/s390/kvm/kvm-s390.c | 17 ++++++++++++++++- arch/s390/kvm/kvm-s390.h | 2 ++ 4 files changed, 21 insertions(+), 2 deletions(-) commit decff09adbeba4b75a1982b1dc3991761914e2df Author: Claudio Imbrenda Date: Thu Jan 23 15:46:14 2025 +0100 KVM: s390: wrapper for KVM_BUG Wrap the call to KVM_BUG; this reduces code duplication and improves readability. Reviewed-by: Christian Borntraeger Reviewed-by: Christoph Schlameuss Reviewed-by: Steffen Eiden Reviewed-by: David Hildenbrand Link: https://lore.kernel.org/r/20250123144627.312456-3-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250123144627.312456-3-imbrenda@linux.ibm.com> arch/s390/kvm/kvm-s390.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 66119f8ce135de664cb2fb88d9aaa322d7451a1f Author: Sean Christopherson Date: Thu Jan 23 15:46:13 2025 +0100 KVM: Do not restrict the size of KVM-internal memory regions Exempt KVM-internal memslots from the KVM_MEM_MAX_NR_PAGES restriction, as the limit on the number of pages exists purely to play nice with dirty bitmap operations, which use 32-bit values to index the bitmaps, and dirty logging isn't supported for KVM-internal memslots. Link: https://lore.kernel.org/all/20240802205003.353672-6-seanjc@google.com Signed-off-by: Sean Christopherson Reviewed-by: Christoph Schlameuss Reviewed-by: David Hildenbrand Link: https://lore.kernel.org/r/20250123144627.312456-2-imbrenda@linux.ibm.com Signed-off-by: Claudio Imbrenda Message-ID: <20250123144627.312456-2-imbrenda@linux.ibm.com> virt/kvm/kvm_main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 4514eda4c1dbd0b7062e06c769d2ceafd25c9284 Author: David Hildenbrand Date: Tue Jan 7 16:43:44 2025 +0100 KVM: s390: vsie: stop using "struct page" for vsie page Now that we no longer use page->index and the page refcount explicitly, let's avoid messing with "struct page" completely. Signed-off-by: David Hildenbrand Reviewed-by: Claudio Imbrenda Reviewed-by: Christoph Schlameuss Tested-by: Christoph Schlameuss Message-ID: <20250107154344.1003072-5-david@redhat.com> Signed-off-by: Claudio Imbrenda arch/s390/include/asm/kvm_host.h | 4 +++- arch/s390/kvm/vsie.c | 31 ++++++++++++------------------- 2 files changed, 15 insertions(+), 20 deletions(-) commit 905f5ce0835c938c501237d9371cdbc91d8f7e02 Author: David Hildenbrand Date: Tue Jan 7 16:43:43 2025 +0100 KVM: s390: vsie: stop messing with page refcount Let's stop messing with the page refcount, and use a flag that is set / cleared atomically to remember whether a vsie page is currently in use. Note that we could use a page flag, or a lower bit of the scb_gpa. Let's keep it simple for now, we have sufficient space. While at it, stop passing "struct kvm *" to put_vsie_page(), it's unused. Signed-off-by: David Hildenbrand Reviewed-by: Claudio Imbrenda Reviewed-by: Christoph Schlameuss Tested-by: Christoph Schlameuss Message-ID: <20250107154344.1003072-4-david@redhat.com> Signed-off-by: Claudio Imbrenda arch/s390/kvm/vsie.c | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) commit c5f64c98a1f7e4ca0e55b441620473389b8c7a72 Author: David Hildenbrand Date: Tue Jan 7 16:43:42 2025 +0100 KVM: s390: vsie: stop using page->index Let's stop using page->index, and instead use a field inside "struct vsie_page" to hold that value. We have plenty of space left in there. This is one part of stopping using "struct page" when working with vsie pages. We place the "page_to_virt(page)" strategically, so the next cleanups requires less churn. Signed-off-by: David Hildenbrand Reviewed-by: Claudio Imbrenda Reviewed-by: Christoph Schlameuss Tested-by: Christoph Schlameuss Message-ID: <20250107154344.1003072-3-david@redhat.com> Signed-off-by: Claudio Imbrenda arch/s390/kvm/vsie.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 5f230f41fdd9e799f43a699348dc572bca7159aa Author: David Hildenbrand Date: Tue Jan 7 16:43:41 2025 +0100 KVM: s390: vsie: fix some corner-cases when grabbing vsie pages We try to reuse the same vsie page when re-executing the vsie with a given SCB address. The result is that we use the same shadow SCB -- residing in the vsie page -- and can avoid flushing the TLB when re-running the vsie on a CPU. So, when we allocate a fresh vsie page, or when we reuse a vsie page for a different SCB address -- reusing the shadow SCB in different context -- we set ihcpu=0xffff to trigger the flush. However, after we looked up the SCB address in the radix tree, but before we grabbed the vsie page by raising the refcount to 2, someone could reuse the vsie page for a different SCB address, adjusting page->index and the radix tree. In that case, we would be reusing the vsie page with a wrong page->index. Another corner case is that we might set the SCB address for a vsie page, but fail the insertion into the radix tree. Whoever would reuse that page would remove the corresponding radix tree entry -- which might now be a valid entry pointing at another page, resulting in the wrong vsie page getting removed from the radix tree. Let's handle such races better, by validating that the SCB address of a vsie page didn't change after we grabbed it (not reuse for a different SCB; the alternative would be performing another tree lookup), and by setting the SCB address to invalid until the insertion in the tree succeeded (SCB addresses are aligned to 512, so ULONG_MAX is invalid). These scenarios are rare, the effects a bit unclear, and these issues were only found by code inspection. Let's CC stable to be safe. Fixes: a3508fbe9dc6 ("KVM: s390: vsie: initial support for nested virtualization") Cc: stable@vger.kernel.org Signed-off-by: David Hildenbrand Reviewed-by: Claudio Imbrenda Reviewed-by: Christoph Schlameuss Tested-by: Christoph Schlameuss Message-ID: <20250107154344.1003072-2-david@redhat.com> Signed-off-by: Claudio Imbrenda arch/s390/kvm/vsie.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 9065ce69754dece78606c8bbb3821449272e56bf Author: Christian Loehle Date: Wed Jan 29 17:59:44 2025 +0000 sched/debug: Provide slice length for fair tasks Since commit: 857b158dc5e8 ("sched/eevdf: Use sched_attr::sched_runtime to set request/slice suggestion") ... we have the userspace per-task tunable slice length, which is a key parameter that is otherwise difficult to obtain, so provide it in /proc/$PID/sched. [ mingo: Clarified the changelog. ] Signed-off-by: Christian Loehle Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Link: https://lore.kernel.org/r/453349b1-1637-42f5-a7b2-2385392b5956@arm.com kernel/sched/debug.c | 2 ++ 1 file changed, 2 insertions(+) commit bb2784d9ab49587ba4fbff37a319fff2924db289 Author: Easwar Hariharan Date: Thu Jan 30 19:26:58 2025 +0000 jiffies: Cast to unsigned long in secs_to_jiffies() conversion While converting users of msecs_to_jiffies(), lkp reported that some range checks would always be true because of the mismatch between the implied int value of secs_to_jiffies() vs the unsigned long return value of the msecs_to_jiffies() calls it was replacing. Fix this by casting the secs_to_jiffies() input value to unsigned long. Fixes: b35108a51cf7ba ("jiffies: Define secs_to_jiffies()") Reported-by: kernel test robot Signed-off-by: Easwar Hariharan Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20250130192701.99626-1-eahariha@linux.microsoft.com Closes: https://lore.kernel.org/oe-kbuild-all/202501301334.NB6NszQR-lkp@intel.com/ include/linux/jiffies.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec918a11e63856999b31705e81226dd7dc043e20 Author: Thomas Bogendoerfer Date: Thu Jan 30 11:48:56 2025 +0100 Revert "mips: fix shmctl/semctl/msgctl syscall for o32" This reverts commit bc7584e009c39375294794f7ca751a6b2622c425. The split IPC system calls for o32 have been introduced with modern version only. Changing this breaks ABI. Signed-off-by: Thomas Bogendoerfer arch/mips/kernel/syscalls/syscall_o32.tbl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 84d78214b4f187da7e029f5dad344203511a04d7 Author: Brian Cain Date: Mon Jan 27 12:51:03 2025 -0800 MAINTAINERS: Update my email address Qualcomm is migrating away from quicinc.com email addresses towards ones with *.qualcomm.com. Signed-off-by: Brian Cain Signed-off-by: Brian Cain .mailmap | 2 ++ MAINTAINERS | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 03410e87563a122075c3721acc7d5510e41d8332 Author: Lin Yujun Date: Mon May 22 02:56:08 2023 +0000 hexagon: Fix unbalanced spinlock in die() die executes holding the spinlock of &die.lock and unlock it after printing the oops message. However in the code if the notify_die() returns NOTIFY_STOP , die() exit with returning 1 but never unlocked the spinlock. Fix this by adding spin_unlock_irq(&die.lock) before returning. Fixes: cf9750bae262 ("Hexagon: Provide basic debugging and system trap support.") Signed-off-by: Lin Yujun Link: https://lore.kernel.org/r/20230522025608.2515558-1-linyujun809@huawei.com Signed-off-by: Brian Cain Signed-off-by: Brian Cain arch/hexagon/kernel/traps.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e8265a947b0267950a2b74e5a4f118e6764540e8 Author: Yang Li Date: Wed Feb 8 09:11:05 2023 +0800 hexagon: Fix warning comparing pointer to 0 ./arch/hexagon/kernel/traps.c:138:6-7: WARNING comparing pointer to 0 Avoid pointer type value compared with 0 to make code clear. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3978 Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230208011105.80219-1-yang.lee@linux.alibaba.com Signed-off-by: Brian Cain Signed-off-by: Brian Cain arch/hexagon/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e882d6f72caa9fca7b615c7bc88998717552e05e Author: Thomas Huth Date: Thu May 2 19:38:18 2024 +0200 hexagon: Move kernel prototypes out of uapi/asm/setup.h header The kernel function prototypes are of no use for userspace and shouldn't get exposed in an uapi header, so let's move them into an internal header instead. Signed-off-by: Thomas Huth Link: https://lore.kernel.org/r/20240502173818.58152-1-thuth@redhat.com Signed-off-by: Brian Cain Signed-off-by: Brian Cain arch/hexagon/include/asm/setup.h | 20 ++++++++++++++++++++ arch/hexagon/include/uapi/asm/setup.h | 14 ++------------ 2 files changed, 22 insertions(+), 12 deletions(-) commit e1e481edf9718222eeb285c41c1837c1c6b0afbd Author: Hardevsinh Palaniya Date: Mon Nov 11 19:54:10 2024 +0530 hexagon: time: Remove redundant null check for resource Null check for 'resource' before assignment is unnecessary because the variable 'resource' is initialized to NULL at the beginning of the function. Signed-off-by: Hardevsinh Palaniya Link: https://lore.kernel.org/r/20241111142458.67854-1-hardevsinh.palaniya@siliconsignals.io Signed-off-by: Brian Cain Signed-off-by: Brian Cain arch/hexagon/kernel/time.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8a20030038742b9915c6d811a4e6c14b126cafb4 Author: Willem de Bruijn Date: Tue Dec 3 17:17:34 2024 -0500 hexagon: fix using plain integer as NULL pointer warning in cmpxchg Sparse reports net/ipv4/inet_diag.c:1511:17: sparse: sparse: Using plain integer as NULL pointer Due to this code calling cmpxchg on a non-integer type struct inet_diag_handler * return !cmpxchg((const struct inet_diag_handler**)&inet_diag_table[type], NULL, h) ? 0 : -EEXIST; While hexagon's cmpxchg assigns an integer value to a variable of this type. __typeof__(*(ptr)) __oldval = 0; Update this assignment to cast 0 to the correct type. The original issue is easily reproduced at head with the below block, and is absent after this change. make LLVM=1 ARCH=hexagon defconfig make C=1 LLVM=1 ARCH=hexagon net/ipv4/inet_diag.o Fixes: 99a70aa051d2 ("Hexagon: Add processor and system headers") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202411091538.PGSTqUBi-lkp@intel.com/ Signed-off-by: Willem de Bruijn Tested-by: Christian Gmeiner Link: https://lore.kernel.org/r/20241203221736.282020-1-willemdebruijn.kernel@gmail.com Signed-off-by: Brian Cain Signed-off-by: Brian Cain arch/hexagon/include/asm/cmpxchg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69e858e0b8b2ea07759e995aa383e8780d9d140c Merge: 350130afc22b 2d2b61ae38bd Author: Linus Torvalds Date: Thu Jan 30 18:29:40 2025 -0800 Merge tag 'uml-for-linus-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux Pull UML updates from Richard Weinberger: - hostfs: Convert to writepages - many cleanups: removal of dead macros, missing __init * tag 'uml-for-linus-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: um: Remove unused asm/archparam.h header um: Include missing headers in asm/pgtable.h hostfs: Convert to writepages um: rtc: use RTC time when calculating the alarm um: Remove unused user_context function um: Remove unused THREAD_NAME_LEN macro um: Remove unused PGD_BOUND macro um: Mark setup_env_path as __init um: Mark install_fatal_handler as __init um: Mark set_stklim as __init um: Mark get_top_address as __init um: Mark parse_cache_line as __init um: Mark parse_host_cpu_flags as __init um: Count iomem_size only once in physmem calculation um: Remove obsolete fixmap support um: Remove unused MODULES_LEN macro commit 350130afc22bd083ea18e17452dd3979c88b08ff Merge: 2a9f04bde07a 69146a8c893f Author: Linus Torvalds Date: Thu Jan 30 18:27:02 2025 -0800 Merge tag 'ubifs-for-linus-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull UBI and UBIFS updates from Richard Weinberger: "UBI: - New interface to dump detailed erase counters - Fixes around wear-leveling UBIFS: - Minor cleanups - Fix for TNC dumping code" * tag 'ubifs-for-linus-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubi: ubi_get_ec_info: Fix compiling error 'cast specifies array type' ubi: Implement ioctl for detailed erase counters ubi: Expose interface for detailed erase counters ubifs: skip dumping tnc tree when zroot is null ubi: Revert "ubi: wl: Close down wear-leveling before nand is suspended" ubifs: ubifs_dump_leb: remove return from end of void function ubifs: dump_lpt_leb: remove return at end of void function ubi: Add a check for ubi_num commit 2a9f04bde07a35530d53b71628cdc950dac86eab Merge: a4b5e48ec4c9 97274527e8dc Author: Linus Torvalds Date: Thu Jan 30 17:50:02 2025 -0800 Merge tag 'rtc-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Not much this cycle, there are multiple small fixes. Core: - use boolean values with device_init_wakeup() Drivers: - pcf2127: add BSM support - pcf85063: fix possible out of bounds write" * tag 'rtc-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: pcf2127: add BSM support rtc: Remove hpet_rtc_dropped_irq() dt-bindings: rtc: mxc: Document fsl,imx31-rtc rtc: stm32: Use syscon_regmap_lookup_by_phandle_args rtc: zynqmp: Fix optional clock name property rtc: loongson: clear TOY_MATCH0_REG in loongson_rtc_isr() rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM read rtc: tps6594: Fix integer overflow on 32bit systems rtc: use boolean values with device_init_wakeup() rtc: RTC_DRV_SPEAR should not default to y when compile-testing commit a4b5e48ec4c975f40ec4f51cd5e054276c25eb34 Merge: c06310fd6b1c 6250ebe666e4 Author: Linus Torvalds Date: Thu Jan 30 17:43:36 2025 -0800 Merge tag 'i2c-for-6.14-rc1-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: - add a missing Kconfig dependency for imx-lpi2c - in the core, handle the new per-client debugfs directory during probe/remove, not during {un}register * tag 'i2c-for-6.14-rc1-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: Fix core-managed per-client debugfs handling i2c: imx-lpi2c: select CONFIG_I2C_SLAVE commit c06310fd6b1c98f27f51a81637311ad560c614e9 Merge: e20f2bb8b7b6 9fae5884bb0e Author: Linus Torvalds Date: Thu Jan 30 17:38:20 2025 -0800 Merge tag 'perf-tools-fixes-for-v6.14-2025-01-30' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools Pull perf tools fixes from Namhyung Kim: "An early round of random fixes in perf tools for this cycle. perf trace: - Fix loading of BPF program on certain clang versions - Fix out-of-bound access in syscalls with 6 arguments - Skip syscall enum test if landlock syscall is not available perf annotate: - Fix segfaults due to invalid access in disasm arrays perf stat: - Fix error handling in topology parsing" * tag 'perf-tools-fixes-for-v6.14-2025-01-30' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: perf cpumap: Fix die and cluster IDs perf test: Skip syscall enum test if no landlock syscall perf trace: Fix runtime error of index out of bounds perf annotate: Use an array for the disassembler preference perf trace: Fix BPF loading failure (-E2BIG) commit e20f2bb8b7b6047182066dde0a101e0660519f6a Merge: 47cbb41a2e22 35fcac7a7c25 Author: Linus Torvalds Date: Thu Jan 30 17:36:14 2025 -0800 Merge tag 'audit-pr-20250130' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit fix from Paul Moore: "A minor audit patch to fix an unitialized variable problem" * tag 'audit-pr-20250130' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: Initialize lsmctx to avoid memory allocation error commit 8dcb26b493d3bab90851f93ae1c127af5cb2dbb5 Merge: 64179a1416e1 7f2b5237e313 Author: Dave Airlie Date: Thu Jan 30 14:31:38 2025 +1000 Merge tag 'amd-drm-fixes-6.14-2025-01-29' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-fixes-6.14-2025-01-29: amdgpu: - GC 12 fix - Aldebaran fix - DCN 3.5 fix - Freesync fix amdkfd: - Per queue reset fix - MES fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20250129213037.3966625-1-alexander.deucher@amd.com commit 47cbb41a2e22554ab63ad2d6f36e9cdacd8cdc11 Merge: f55b0671e3f9 0141978ae75b Author: Linus Torvalds Date: Thu Jan 30 15:22:18 2025 -0800 Merge tag 'acpi-6.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "Add a new ACPI-related quirk for Vexia EDU ATLA 10 tablet 5V (Hans de Goede) and fix the MADT parsing code so that CPUs with different entry types (LAPIC and x2APIC) are initialized in the order in which they appear in the MADT as required by the ACPI specification (Zhang Rui)" * tag 'acpi-6.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: x86/acpi: Fix LAPIC/x2APIC parsing order ACPI: x86: Add skip i2c clients quirk for Vexia EDU ATLA 10 tablet 5V commit f55b0671e3f90824ac06dc06b988075eb9c6830c Merge: c2933b2befe2 a01e0f47a7a1 Author: Linus Torvalds Date: Thu Jan 30 15:10:34 2025 -0800 Merge tag 'pm-6.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These are mostly fixes on top of the previously merged power management material with the addition of some teo cpuidle governor updates, some of which may also be regarded as fixes: - Add missing error handling for syscore_suspend() to the hibernation core code (Wentao Liang) - Revert a commit that added unused macros (Andy Shevchenko) - Synchronize the runtime PM status of devices that were runtime- suspended before a system-wide suspend and need to be resumed during the subsequent system-wide resume transition (Rafael Wysocki) - Clean up the teo cpuidle governor and make the handling of short idle intervals in it consistent regardless of the properties of idle states supplied by the cpuidle driver (Rafael Wysocki) - Fix some boost-related issues in cpufreq (Lifeng Zheng) - Fix build issues in the s3c64xx and airoha cpufreq drivers (Viresh Kumar) - Remove unconditional binding of schedutil governor kthreads to the affected CPUs if the cpufreq driver indicates that updates can happen from any CPU (Christian Loehle)" * tag 'pm-6.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: sleep: core: Synchronize runtime PM status of parents and children cpufreq: airoha: Depends on OF PM: Revert "Add EXPORT macros for exporting PM functions" PM: hibernate: Add error handling for syscore_suspend() cpufreq/schedutil: Only bind threads if needed cpufreq: ACPI: Remove set_boost in acpi_cpufreq_cpu_init() cpufreq: CPPC: Fix wrong max_freq in policy initialization cpufreq: Introduce a more generic way to set default per-policy boost flag cpufreq: Fix re-boost issue after hotplugging a CPU cpufreq: s3c64xx: Fix compilation warning cpuidle: teo: Skip sleep length computation for low latency constraints cpuidle: teo: Replace time_span_ns with a flag cpuidle: teo: Simplify handling of total events count cpuidle: teo: Skip getting the sleep length if wakeups are very frequent cpuidle: teo: Simplify counting events used for tick management cpuidle: teo: Clarify two code comments cpuidle: teo: Drop local variable prev_intercept_idx cpuidle: teo: Combine candidate state index checks against 0 cpuidle: teo: Reorder candidate state index checks cpuidle: teo: Rearrange idle state lookup code commit a01e0f47a7a10668c178f058bcf136f8ec897286 Merge: 14ee7df1ac5a 3775fc538f53 Author: Rafael J. Wysocki Date: Thu Jan 30 21:28:16 2025 +0100 Merge branch 'pm-sleep' Merge fixes related to system sleep for 6.14-rc1: - Add missing error handling for syscore_suspend() to the hibernation core code (Wentao Liang). - Revert a commit that added unused macros (Andy Shevchenko). - Synchronize the runtime PM status of devices that were runtime- suspended before a system-wide suspend and need to be resumed during the subsequent syste-wide resume transition (Rafael Wysocki). * pm-sleep: PM: sleep: core: Synchronize runtime PM status of parents and children PM: Revert "Add EXPORT macros for exporting PM functions" PM: hibernate: Add error handling for syscore_suspend() commit 14ee7df1ac5a93019394e17375003e86f45cdcd8 Merge: b865a8404642 59484c3095ff Author: Rafael J. Wysocki Date: Thu Jan 30 21:24:47 2025 +0100 Merge branch 'pm-cpuidle' Merge updates of the teo cpuidle governor for 6.14-rc1 that clean it up and make the handling of short idle intervals in it consistent regardless of the properties of idle states supplied by the cpuidle driver. * pm-cpuidle: cpuidle: teo: Skip sleep length computation for low latency constraints cpuidle: teo: Replace time_span_ns with a flag cpuidle: teo: Simplify handling of total events count cpuidle: teo: Skip getting the sleep length if wakeups are very frequent cpuidle: teo: Simplify counting events used for tick management cpuidle: teo: Clarify two code comments cpuidle: teo: Drop local variable prev_intercept_idx cpuidle: teo: Combine candidate state index checks against 0 cpuidle: teo: Reorder candidate state index checks cpuidle: teo: Rearrange idle state lookup code commit c2933b2befe25309f4c5cfbea0ca80909735fd76 Merge: b4b0881156fb dfffaccffc53 Author: Linus Torvalds Date: Thu Jan 30 12:24:20 2025 -0800 Merge tag 'net-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from IPSec, netfilter and Bluetooth. Nothing really stands out, but as usual there's a slight concentration of fixes for issues added in the last two weeks before the merge window, and driver bugs from 6.13 which tend to get discovered upon wider distribution. Current release - regressions: - net: revert RTNL changes in unregister_netdevice_many_notify() - Bluetooth: fix possible infinite recursion of btusb_reset - eth: adjust locking in some old drivers which protect their state with spinlocks to avoid sleeping in atomic; core protects netdev state with a mutex now Previous releases - regressions: - eth: - mlx5e: make sure we pass node ID, not CPU ID to kvzalloc_node() - bgmac: reduce max frame size to support just 1500 bytes; the jumbo frame support would previously cause OOB writes, but now fails outright - mptcp: blackhole only if 1st SYN retrans w/o MPC is accepted, avoid false detection of MPTCP blackholing Previous releases - always broken: - mptcp: handle fastopen disconnect correctly - xfrm: - make sure skb->sk is a full sock before accessing its fields - fix taking a lock with preempt disabled for RT kernels - usb: ipheth: improve safety of packet metadata parsing; prevent potential OOB accesses - eth: renesas: fix missing rtnl lock in suspend/resume path" * tag 'net-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (88 commits) MAINTAINERS: add Neal to TCP maintainers net: revert RTNL changes in unregister_netdevice_many_notify() net: hsr: fix fill_frame_info() regression vs VLAN packets doc: mptcp: sysctl: blackhole_timeout is per-netns mptcp: blackhole only if 1st SYN retrans w/o MPC is accepted netfilter: nf_tables: reject mismatching sum of field_len with set key length net: sh_eth: Fix missing rtnl lock in suspend/resume path net: ravb: Fix missing rtnl lock in suspend/resume path selftests/net: Add test for loading devbound XDP program in generic mode net: xdp: Disallow attaching device-bound programs in generic mode tcp: correct handling of extreme memory squeeze bgmac: reduce max frame size to support just MTU 1500 vsock/test: Add test for connect() retries vsock/test: Add test for UAF due to socket unbinding vsock/test: Introduce vsock_connect_fd() vsock/test: Introduce vsock_bind() vsock: Allow retrying on connect() failure vsock: Keep the binding until socket destruction Bluetooth: L2CAP: accept zero as a special value for MTU auto-selection Bluetooth: btnxpuart: Fix glitches seen in dual A2DP streaming ... commit b4b0881156fb8209bf5ef6cb63211bb0ad6e1a6b Merge: b8a1c9f4b710 96720ce8b1fa Author: Linus Torvalds Date: Thu Jan 30 10:57:19 2025 -0800 Merge tag 'docs-6.14-2' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "Two fixes for footnote-related warnings that appeared with Sphinx 8.x. We want to encourage use of newer Sphinx - they fixed a performance problem and the docs build takes less than half the time it used to" * tag 'docs-6.14-2' of git://git.lwn.net/linux: docs: power: Fix footnote reference for Toshiba Satellite P10-554 Documentation: ublk: Drop Stefan Hajnoczi's message footnote commit b8a1c9f4b7106c94d95c83416d34277ee689638f Merge: b731bc5f4965 b999589956dd Author: Linus Torvalds Date: Thu Jan 30 10:53:49 2025 -0800 Merge tag 's390-6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Alexander Gordeev: - Architecutre-specific ftrace recursion trylock tests were removed in favour of the generic function_graph_enter(), but s390 got missed. Remove this test for s390 as well. - Add ftrace_get_symaddr() for s390, which returns the symbol address from ftrace 'ip' parameter * tag 's390-6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/tracing: Define ftrace_get_symaddr() for s390 s390/fgraph: Fix to remove ftrace_test_recursion_trylock() commit b731bc5f49651bb85ef31fa1db6e76a0fe10d572 Merge: 90cb220062f5 87f017d0792b Author: Linus Torvalds Date: Thu Jan 30 10:48:17 2025 -0800 Merge tag 's390-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Alexander Gordeev: - The rework that uncoupled physical and virtual address spaces inadvertently prevented KASAN shadow mappings from using large pages. Restore large page mappings for KASAN shadows - Add decompressor routine physmem_alloc() that may fail, unlike physmem_alloc_or_die(). This allows callers to implement fallback paths - Allow falling back from large pages to smaller pages (1MB or 4KB) if the allocation of 2GB pages in the decompressor can not be fulfilled - Add to the decompressor boot print support of "%%" format string, width and padding hadnling, length modifiers and decimal conversion specifiers - Add to the decompressor message severity levels similar to kernel ones. Support command-line options that control console output verbosity - Replaces boot_printk() calls with appropriate loglevel- specific helpers such as boot_emerg(), boot_warn(), and boot_debug(). - Collect all boot messages into a ring buffer independent of the current log level. This is particularly useful for early crash analysis - If 'earlyprintk' command line parameter is not specified, store decompressor boot messages in a ring buffer to be printed later by the kernel, once the console driver is registered - Add 'bootdebug' command line parameter to enable printing of decompressor debug messages when needed. That parameters allows message suppressing and filtering - Dump boot messages on a decompressor crash, but only if 'bootdebug' command line parameter is enabled - When CONFIG_PRINTK_TIME is enabled, add timestamps to boot messages in the same format as regular printk() - Dump physical memory tracking information on boot: online ranges, reserved areas and vmem allocations - Dump virtual memory layout and randomization details - Improve decompression error reporting and dump the message ring buffer in case the boot failed and system halted - Add an exception handler which handles exceptions when FPU control register is attempted to be set to an invalid value. Remove '.fixup' section as result of this change - Use 'A', 'O', and 'R' inline assembly format flags, which allows recent Clang compilers to generate better FPU code - Rework uaccess code so it reads better and generates more efficient code - Cleanup futex inline assembly code - Disable KMSAN instrumention for futex inline assemblies, which contain dereferenced user pointers. Otherwise, shadows for the user pointers would be accessed - PFs which are not initially configured but in standby create only a single-function PCI domain. If they are configured later on, sibling PFs and their child VFs will not be added to their PCI domain breaking SR-IOV expectations. Fix that by allowing initially configured but in standby PFs create multi-function PCI domains - Add '-std=gnu11' to decompressor and purgatory CFLAGS to avoid compile errors caused by kernel's own definitions of 'bool', 'false', and 'true' conflicting with the C23 reserved keywords - Fix sclp subsystem failure when a sclp console is not present - Fix misuse of non-NULL terminated strings in vmlogrdr driver - Various other small improvements, cleanups and fixes * tag 's390-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (53 commits) s390/vmlogrdr: Use array instead of string initializer s390/vmlogrdr: Use internal_name for error messages s390/sclp: Initialize sclp subsystem via arch_cpu_finalize_init() s390/tools: Use array instead of string initializer s390/vmem: Fix null-pointer-arithmetic warning in vmem_map_init() s390: Add '-std=gnu11' to decompressor and purgatory CFLAGS s390/bitops: Use correct constraint for arch_test_bit() inline assembly s390/pci: Fix SR-IOV for PFs initially in standby s390/futex: Avoid KMSAN instrumention for user pointers s390/uaccess: Rename get_put_user_noinstr_attributes to uaccess_kmsan_or_inline s390/futex: Cleanup futex_atomic_cmpxchg_inatomic() s390/futex: Generate futex atomic op functions s390/uaccess: Remove INLINE_COPY_FROM_USER and INLINE_COPY_TO_USER s390/uaccess: Use asm goto for put_user()/get_user() s390/uaccess: Remove usage of the oac specifier s390/uaccess: Replace EX_TABLE_UA_LOAD_MEM exception handling s390/uaccess: Cleanup noinstr __put_user()/__get_user() inline assembly constraints s390/uaccess: Remove __put_user_fn()/__get_user_fn() wrappers s390/uaccess: Move put_user() / __put_user() close to put_user() asm code s390/uaccess: Use asm goto for __mvc_kernel_nofault() ... commit 90cb220062f52c50ad689f40be3aa958a4553204 Merge: d3d90cc2891c f8524ac33cd4 Author: Linus Torvalds Date: Thu Jan 30 10:19:30 2025 -0800 Merge tag 'gpio-fixes-for-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - update gpio-sim selftests to not fail now that we no longer allow rmdir() on configfs entries of active devices - remove leftover code from gpio-mxc * tag 'gpio-fixes-for-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: selftests: gpio: gpio-sim: Fix missing chip disablements gpio: mxc: remove dead code after switch to DT-only commit ee2ab467bddfb2d7f68d996dbab94d7b88f8eaf7 Author: Nathan Chancellor Date: Tue Jan 21 18:11:33 2025 -0700 x86/boot: Use '-std=gnu11' to fix build with GCC 15 GCC 15 changed the default C standard version to C23, which should not have impacted the kernel because it requests the gnu11 standard via '-std=' in the main Makefile. However, the x86 compressed boot Makefile uses its own set of KBUILD_CFLAGS without a '-std=' value (i.e., using the default), resulting in errors from the kernel's definitions of bool, true, and false in stddef.h, which are reserved keywords under C23. ./include/linux/stddef.h:11:9: error: expected identifier before ‘false’ 11 | false = 0, ./include/linux/types.h:35:33: error: two or more data types in declaration specifiers 35 | typedef _Bool bool; Set '-std=gnu11' in the x86 compressed boot Makefile to resolve the error and consistently use the same C standard version for the entire kernel. Closes: https://lore.kernel.org/4OAhbllK7x4QJGpZjkYjtBYNLd_2whHx9oFiuZcGwtVR4hIzvduultkgfAIRZI3vQpZylu7Gl929HaYFRGeMEalWCpeMzCIIhLxxRhq4U-Y=@protonmail.com/ Closes: https://lore.kernel.org/Z4467umXR2PZ0M1H@tucnak/ Reported-by: Kostadin Shishmanov Reported-by: Jakub Jelinek Signed-off-by: Nathan Chancellor Signed-off-by: Dave Hansen Reviewed-by: Ard Biesheuvel Cc:stable@vger.kernel.org Link: https://lore.kernel.org/all/20250121-x86-use-std-consistently-gcc-15-v1-1-8ab0acf645cb%40kernel.org arch/x86/boot/compressed/Makefile | 1 + 1 file changed, 1 insertion(+) commit d3d90cc2891c9cf4ecba7b85c0af716ab755c7e5 Merge: ce335806b5ec 30d61efe118c Author: Linus Torvalds Date: Thu Jan 30 09:13:35 2025 -0800 Merge tag 'pull-revalidate' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs d_revalidate updates from Al Viro: "Provide stable parent and name to ->d_revalidate() instances Most of the filesystem methods where we care about dentry name and parent have their stability guaranteed by the callers; ->d_revalidate() is the major exception. It's easy enough for callers to supply stable values for expected name and expected parent of the dentry being validated. That kills quite a bit of boilerplate in ->d_revalidate() instances, along with a bunch of races where they used to access ->d_name without sufficient precautions" * tag 'pull-revalidate' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: 9p: fix ->rename_sem exclusion orangefs_d_revalidate(): use stable parent inode and name passed by caller ocfs2_dentry_revalidate(): use stable parent inode and name passed by caller nfs: fix ->d_revalidate() UAF on ->d_name accesses nfs{,4}_lookup_validate(): use stable parent inode passed by caller gfs2_drevalidate(): use stable parent inode and name passed by caller fuse_dentry_revalidate(): use stable parent inode and name passed by caller vfat_revalidate{,_ci}(): use stable parent inode passed by caller exfat_d_revalidate(): use stable parent inode passed by caller fscrypt_d_revalidate(): use stable parent inode passed by caller ceph_d_revalidate(): propagate stable name down into request encoding ceph_d_revalidate(): use stable parent inode passed by caller afs_d_revalidate(): use stable name and parent inode passed by caller Pass parent directory inode and expected name to ->d_revalidate() generic_ci_d_compare(): use shortname_storage ext4 fast_commit: make use of name_snapshot primitives dissolve external_name.u into separate members make take_dentry_name_snapshot() lockless dcache: back inline names with a struct-wrapped array of unsigned long make sure that DNAME_INLINE_LEN is a multiple of word size commit dfffaccffc53642b532c9942ade3535f25a8a8fb Merge: d7dda216ca49 1b9335a8000f Author: Jakub Kicinski Date: Thu Jan 30 09:01:00 2025 -0800 Merge tag 'nf-25-01-30' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following batch contains one Netfilter fix: 1) Reject mismatching sum of field_len with set key length which allows to create a set without inconsistent pipapo rule width and set key length. * tag 'nf-25-01-30' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_tables: reject mismatching sum of field_len with set key length ==================== Link: https://patch.msgid.link/20250130113307.2327470-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit d7dda216ca49f1ac214cb577cbeeee760a2b425b Author: Jakub Kicinski Date: Wed Jan 29 11:13:32 2025 -0800 MAINTAINERS: add Neal to TCP maintainers Neal Cardwell has been indispensable in TCP reviews and investigations, especially protocol-related. Neal is also the author of packetdrill. Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250129191332.2526140-1-kuba@kernel.org Signed-off-by: Jakub Kicinski MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit e759e1e4a4bd2926d082afe56046a90224433a31 Author: Eric Dumazet Date: Wed Jan 29 14:27:26 2025 +0000 net: revert RTNL changes in unregister_netdevice_many_notify() This patch reverts following changes: 83419b61d187 net: reduce RTNL hold duration in unregister_netdevice_many_notify() (part 2) ae646f1a0bb9 net: reduce RTNL hold duration in unregister_netdevice_many_notify() (part 1) cfa579f66656 net: no longer hold RTNL while calling flush_all_backlogs() This caused issues in layers holding a private mutex: cleanup_net() rtnl_lock(); mutex_lock(subsystem_mutex); unregister_netdevice(); rtnl_unlock(); // LOCKDEP violation rtnl_lock(); I will revisit this in next cycle, opt-in for the new behavior from safe contexts only. Fixes: cfa579f66656 ("net: no longer hold RTNL while calling flush_all_backlogs()") Fixes: ae646f1a0bb9 ("net: reduce RTNL hold duration in unregister_netdevice_many_notify() (part 1)") Fixes: 83419b61d187 ("net: reduce RTNL hold duration in unregister_netdevice_many_notify() (part 2)") Reported-by: syzbot+5b9196ecf74447172a9a@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/6789d55f.050a0220.20d369.004e.GAE@google.com/ Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250129142726.747726-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/core/dev.c | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) commit 0f5697f1a3f99bc2b674b8aa3c5da822c5673c11 Author: Eric Dumazet Date: Wed Jan 29 13:00:07 2025 +0000 net: hsr: fix fill_frame_info() regression vs VLAN packets Stephan Wurm reported that my recent patch broke VLAN support. Apparently skb->mac_len is not correct for VLAN traffic as shown by debug traces [1]. Use instead pskb_may_pull() to make sure the expected header is present in skb->head. Many thanks to Stephan for his help. [1] kernel: skb len=170 headroom=2 headlen=170 tailroom=20 mac=(2,14) mac_len=14 net=(16,-1) trans=-1 shinfo(txflags=0 nr_frags=0 gso(size=0 type=0 segs=0)) csum(0x0 start=0 offset=0 ip_summed=0 complete_sw=0 valid=0 level=0) hash(0x0 sw=0 l4=0) proto=0x0000 pkttype=0 iif=0 priority=0x0 mark=0x0 alloc_cpu=0 vlan_all=0x0 encapsulation=0 inner(proto=0x0000, mac=0, net=0, trans=0) kernel: dev name=prp0 feat=0x0000000000007000 kernel: sk family=17 type=3 proto=0 kernel: skb headroom: 00000000: 74 00 kernel: skb linear: 00000000: 01 0c cd 01 00 01 00 d0 93 53 9c cb 81 00 80 00 kernel: skb linear: 00000010: 88 b8 00 01 00 98 00 00 00 00 61 81 8d 80 16 52 kernel: skb linear: 00000020: 45 47 44 4e 43 54 52 4c 2f 4c 4c 4e 30 24 47 4f kernel: skb linear: 00000030: 24 47 6f 43 62 81 01 14 82 16 52 45 47 44 4e 43 kernel: skb linear: 00000040: 54 52 4c 2f 4c 4c 4e 30 24 44 73 47 6f 6f 73 65 kernel: skb linear: 00000050: 83 07 47 6f 49 64 65 6e 74 84 08 67 8d f5 93 7e kernel: skb linear: 00000060: 76 c8 00 85 01 01 86 01 00 87 01 00 88 01 01 89 kernel: skb linear: 00000070: 01 00 8a 01 02 ab 33 a2 15 83 01 00 84 03 03 00 kernel: skb linear: 00000080: 00 91 08 67 8d f5 92 77 4b c6 1f 83 01 00 a2 1a kernel: skb linear: 00000090: a2 06 85 01 00 83 01 00 84 03 03 00 00 91 08 67 kernel: skb linear: 000000a0: 8d f5 92 77 4b c6 1f 83 01 00 kernel: skb tailroom: 00000000: 80 18 02 00 fe 4e 00 00 01 01 08 0a 4f fd 5e d1 kernel: skb tailroom: 00000010: 4f fd 5e cd Fixes: b9653d19e556 ("net: hsr: avoid potential out-of-bound access in fill_frame_info()") Reported-by: Stephan Wurm Tested-by: Stephan Wurm Closes: https://lore.kernel.org/netdev/Z4o_UC0HweBHJ_cw@PC-LX-SteWu/ Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250129130007.644084-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/hsr/hsr_forward.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit dce4aab8441d285b9a78b33753e0bf583c1320ee Author: Kees Cook Date: Mon Jan 27 11:10:28 2025 -0800 kbuild: Use -fzero-init-padding-bits=all GCC 15 introduces a regression in "= { 0 }" style initialization of unions that Linux has depended on for eliminating uninitialized variable contents. GCC does not seem likely to fix it[1], instead suggesting[2] that affected projects start using -fzero-init-padding-bits=unions. To avoid future surprises beyond just the current situation with unions, enable -fzero-init-padding-bits=all when available (GCC 15+). This will correctly zero padding bits in unions and structs that might have been left uninitialized, and will make sure there is no immediate regression in union initializations. As seen in the stackinit KUnit selftest union cases, which were passing before, were failing under GCC 15: not ok 18 test_small_start_old_zero ok 29 test_small_start_dynamic_partial # SKIP XFAIL uninit bytes: 63 ok 32 test_small_start_assigned_dynamic_partial # SKIP XFAIL uninit bytes: 63 ok 67 test_small_start_static_partial # SKIP XFAIL uninit bytes: 63 ok 70 test_small_start_static_all # SKIP XFAIL uninit bytes: 56 ok 73 test_small_start_dynamic_all # SKIP XFAIL uninit bytes: 56 ok 82 test_small_start_assigned_static_partial # SKIP XFAIL uninit bytes: 63 ok 85 test_small_start_assigned_static_all # SKIP XFAIL uninit bytes: 56 ok 88 test_small_start_assigned_dynamic_all # SKIP XFAIL uninit bytes: 56 The above all now pass again with -fzero-init-padding-bits=all added. This also fixes the following cases for struct initialization that had been XFAIL until now because there was no compiler support beyond the larger "-ftrivial-auto-var-init=zero" option: ok 38 test_small_hole_static_all # SKIP XFAIL uninit bytes: 3 ok 39 test_big_hole_static_all # SKIP XFAIL uninit bytes: 124 ok 40 test_trailing_hole_static_all # SKIP XFAIL uninit bytes: 7 ok 42 test_small_hole_dynamic_all # SKIP XFAIL uninit bytes: 3 ok 43 test_big_hole_dynamic_all # SKIP XFAIL uninit bytes: 124 ok 44 test_trailing_hole_dynamic_all # SKIP XFAIL uninit bytes: 7 ok 58 test_small_hole_assigned_static_all # SKIP XFAIL uninit bytes: 3 ok 59 test_big_hole_assigned_static_all # SKIP XFAIL uninit bytes: 124 ok 60 test_trailing_hole_assigned_static_all # SKIP XFAIL uninit bytes: 7 ok 62 test_small_hole_assigned_dynamic_all # SKIP XFAIL uninit bytes: 3 ok 63 test_big_hole_assigned_dynamic_all # SKIP XFAIL uninit bytes: 124 ok 64 test_trailing_hole_assigned_dynamic_all # SKIP XFAIL uninit bytes: 7 All of the above now pass when built under GCC 15. Tests can be seen with: ./tools/testing/kunit/kunit.py run stackinit --arch=x86_64 \ --make_option CC=gcc-15 Clang continues to fully initialize these kinds of variables[3] without additional flags. Suggested-by: Jakub Jelinek Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118403 [1] Link: https://lore.kernel.org/linux-toolchains/Z0hRrrNU3Q+ro2T7@tucnak/ [2] Link: https://github.com/llvm/llvm-project/commit/7a086e1b2dc05f54afae3591614feede727601fa [3] Reviewed-by: Nathan Chancellor Acked-by: Masahiro Yamada Link: https://lore.kernel.org/r/20250127191031.245214-3-kees@kernel.org Signed-off-by: Kees Cook scripts/Makefile.extrawarn | 3 +++ 1 file changed, 3 insertions(+) commit e71a29db79da194678630ebfcc53ff2aecc9d441 Author: Kees Cook Date: Mon Jan 27 11:10:27 2025 -0800 stackinit: Add union initialization to selftests The stack initialization selftests were checking scalars, strings, and structs, but not unions. Add union tests (which are mostly identical setup to structs). This catches the recent union initialization behavioral changes seen in GCC 15. Before GCC 15, this new test passes: ok 18 test_small_start_old_zero With GCC 15, it fails: not ok 18 test_small_start_old_zero Specifically, a union with a larger member where a smaller member is initialized with the older "= { 0 }" syntax: union test_small_start { char one:1; char two; short three; unsigned long four; struct big_struct { unsigned long array[8]; } big; }; This is a regression in compiler behavior that Linux has depended on. GCC does not seem likely to fix it, instead suggesting that affected projects start using -fzero-init-padding-bits=unions: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118403 Link: https://lore.kernel.org/r/20250127191031.245214-2-kees@kernel.org Signed-off-by: Kees Cook lib/stackinit_kunit.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) commit ad9f265c7328d9d73a9d1edbd52f4415cc764296 Author: Kees Cook Date: Mon Jan 27 11:10:26 2025 -0800 stackinit: Add old-style zero-init syntax to struct tests The deprecated way to do a full zero init of a structure is with "= { 0 }", but we weren't testing this style. Add it. Link: https://lore.kernel.org/r/20250127191031.245214-1-kees@kernel.org Signed-off-by: Kees Cook lib/stackinit_kunit.c | 3 +++ 1 file changed, 3 insertions(+) commit ce335806b5ecc5132aed0a1af8bd48ae3b2ea178 Merge: 8080ff5ac656 55ad333de0f8 Author: Linus Torvalds Date: Thu Jan 30 08:47:17 2025 -0800 Merge tag 'ntfs3_for_6.14' of https://github.com/Paragon-Software-Group/linux-ntfs3 Pull ntfs3 fixes from Konstantin Komarov: - unify inode corruption marking and mark them as bad immediately upon detection of an error in attribute enumeration - folio cleanup * tag 'ntfs3_for_6.14' of https://github.com/Paragon-Software-Group/linux-ntfs3: fs/ntfs3: Unify inode corruption marking with _ntfs_bad_inode() fs/ntfs3: Mark inode as bad as soon as error detected in mi_enum_attr() ntfs3: Remove an access to page->index commit 8080ff5ac656b9ca6c282e4044be19d2b8a837df Merge: 72deda0abee6 5d9ccda9ba7e Author: Linus Torvalds Date: Thu Jan 30 08:42:50 2025 -0800 Merge tag 'bcachefs-2025-01-29' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: - second half of a fix for a bug that'd been causing oopses on filesystems using snapshots with memory pressure (key cache fills for snaphots btrees are tricky) - build fix for strange compiler configurations that double stack frame size - "journal stuck timeout" now takes into account device latency: this fixes some spurious warnings, and the main remaining source of SRCU lock hold time warnings (I'm no longer seeing this in my CI, so any users still seeing this should definitely ping me) - fix for slow/hanging unmounts (" Improve journal pin flushing") - some more tracepoint fixes/improvements, to chase down the "rebalance isn't making progress" issues * tag 'bcachefs-2025-01-29' of git://evilpiepirate.org/bcachefs: bcachefs: Improve trace_move_extent_finish bcachefs: Fix trace_copygc bcachefs: Journal writes are now IOPRIO_CLASS_RT bcachefs: Improve journal pin flushing bcachefs: fix bch2_btree_node_flags bcachefs: rebalance, copygc enabled are runtime opts bcachefs: Improve decompression error messages bcachefs: bset_blacklisted_journal_seq is now AUTOFIX bcachefs: "Journal stuck" timeout now takes into account device latency bcachefs: Reduce stack frame size of __bch2_str_hash_check_key() bcachefs: Fix btree_trans_peek_key_cache() commit 8c8492ca64e79c6e0f433e8c9d2bcbd039ef83d0 Author: Jens Axboe Date: Thu Jan 30 08:40:29 2025 -0700 io_uring/net: don't retry connect operation on EPOLLERR If a socket is shutdown before the connection completes, POLLERR is set in the poll mask. However, connect ignores this as it doesn't know, and attempts the connection again. This may lead to a bogus -ETIMEDOUT result, where it should have noticed the POLLERR and just returned -ECONNRESET instead. Have the poll logic check for whether or not POLLERR is set in the mask, and if so, mark the request as failed. Then connect can appropriately fail the request rather than retry it. Reported-by: Sergey Galas Cc: stable@vger.kernel.org Link: https://github.com/axboe/liburing/discussions/1335 Fixes: 3fb1bd688172 ("io_uring/net: handle -EINPROGRESS correct for IORING_OP_CONNECT") Signed-off-by: Jens Axboe io_uring/net.c | 5 +++++ io_uring/poll.c | 2 ++ 2 files changed, 7 insertions(+) commit bdc35f164b0f60480b2f5e098bb8f3c0cea05cd2 Author: Tetsuo Handa Date: Fri Jan 31 00:27:44 2025 +0900 tomoyo: use better patterns for procfs in learning mode Commit 08ae2487b202 ("tomoyo: automatically use patterns for several situations in learning mode") replaced only $PID part of procfs pathname with \$ pattern. But it turned out that we need to also replace $TID part and $FD part to make this functionality useful for e.g. /bin/lsof . Signed-off-by: Tetsuo Handa security/tomoyo/common.c | 145 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 112 insertions(+), 33 deletions(-) commit 047558caf7e502fe5babe9b85008950731d0e2d3 Merge: 3effcc04d886 18da4b5d1232 Author: Paolo Abeni Date: Thu Jan 30 14:02:21 2025 +0100 Merge branch 'mptcp-blackhole-only-if-1st-syn-retrans-w-o-mpc-is-accepted' Matthieu Baerts says: ==================== mptcp: blackhole only if 1st SYN retrans w/o MPC is accepted Here are two small fixes for issues introduced in v6.12. - Patch 1: reset the mpc_drop mark for other SYN retransmits, to only consider an MPTCP blackhole when the first SYN retransmitted without the MPTCP options is accepted, as initially intended. - Patch 2: also mention in the doc that the blackhole_timeout sysctl knob is per-netns, like all the others. Signed-off-by: Matthieu Baerts (NGI0) ==================== Link: https://patch.msgid.link/20250129-net-mptcp-blackhole-fix-v1-0-afe88e5a6d2c@kernel.org Signed-off-by: Paolo Abeni commit 18da4b5d123285dea470b15ff51c7fbe61dc37fd Author: Matthieu Baerts (NGI0) Date: Wed Jan 29 13:24:33 2025 +0100 doc: mptcp: sysctl: blackhole_timeout is per-netns All other sysctl entries mention it, and it is a per-namespace sysctl. So mention it as well. Fixes: 27069e7cb3d1 ("mptcp: disable active MPTCP in case of blackhole") Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni Documentation/networking/mptcp-sysctl.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e598d8981fd34470b78a1ae777dbf131b15d5bf2 Author: Matthieu Baerts (NGI0) Date: Wed Jan 29 13:24:32 2025 +0100 mptcp: blackhole only if 1st SYN retrans w/o MPC is accepted The Fixes commit mentioned this: > An MPTCP firewall blackhole can be detected if the following SYN > retransmission after a fallback to "plain" TCP is accepted. But in fact, this blackhole was detected if any following SYN retransmissions after a fallback to TCP was accepted. That's because 'mptcp_subflow_early_fallback()' will set 'request_mptcp' to 0, and 'mpc_drop' will never be reset to 0 after. This is an issue, because some not so unusual situations might cause the kernel to detect a false-positive blackhole, e.g. a client trying to connect to a server while the network is not ready yet, causing a few SYN retransmissions, before reaching the end server. Fixes: 27069e7cb3d1 ("mptcp: disable active MPTCP in case of blackhole") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni net/mptcp/ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8c2fa44132e8cd1b05c77a705adb8d1f5a5daf3f Author: Takashi Iwai Date: Thu Jan 30 13:32:59 2025 +0100 ALSA: hda/realtek: Workaround for resume on Dell Venue 11 Pro 7130 It was reported that the headphone output on Dell Venue 11 Pro 7130 becomes mono after PM resume. The cause seems to be the BIOS setting up the codec COEF 0x0d bit 0x40 wrongly by some reason, and restoring the original value 0x2800 fixes the problem. This patch adds the quirk entry to perform the COEF restore. Cc: Link: https://bugzilla.kernel.org/show_bug.cgi?id=219697 Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1235686 Link: https://patch.msgid.link/20250130123301.8996-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 1b9335a8000fb70742f7db10af314104b6ace220 Author: Pablo Neira Ayuso Date: Tue Jan 28 12:26:33 2025 +0100 netfilter: nf_tables: reject mismatching sum of field_len with set key length The field length description provides the length of each separated key field in the concatenation, each field gets rounded up to 32-bits to calculate the pipapo rule width from pipapo_init(). The set key length provides the total size of the key aligned to 32-bits. Register-based arithmetics still allows for combining mismatching set key length and field length description, eg. set key length 10 and field description [ 5, 4 ] leading to pipapo width of 12. Cc: stable@vger.kernel.org Fixes: 3ce67e3793f4 ("netfilter: nf_tables: do not allow mismatch field size and set key length") Reported-by: Noam Rathaus Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3effcc04d886eda3c302d8c8b89bcaa15875e953 Merge: da5ca229b625 b95102215a8d Author: Paolo Abeni Date: Thu Jan 30 11:23:32 2025 +0100 Merge branch 'fix-missing-rtnl-lock-in-suspend-path' Kory Maincent says: ==================== Fix missing rtnl lock in suspend path Fix the suspend path by ensuring the rtnl lock is held where required. Calls to open, close and WOL operations must be performed under the rtnl lock to prevent conflicts with ongoing ndo operations. Discussion about this issue can be found here: https://lore.kernel.org/netdev/20250120141926.1290763-1-kory.maincent@bootlin.com/ While working on the ravb fix, it was discovered that the sh_eth driver has the same issue. This patch series addresses both drivers. I do not have access to hardware for either of these MACs, so it would be great if maintainers or others with the relevant boards could test these fixes. v2: https://lore.kernel.org/r/20250123-fix_missing_rtnl_lock_phy_disconnect-v2-0-e6206f5508ba@bootlin.com v1: https://lore.kernel.org/r/20250122-fix_missing_rtnl_lock_phy_disconnect-v1-0-8cb9f6f88fd1@bootlin.com Signed-off-by: Kory Maincent ==================== Link: https://patch.msgid.link/20250129-fix_missing_rtnl_lock_phy_disconnect-v3-0-24c4ba185a92@bootlin.com Signed-off-by: Paolo Abeni commit b95102215a8d0987789715ce11c0d4ec031cbfbe Author: Kory Maincent Date: Wed Jan 29 10:50:47 2025 +0100 net: sh_eth: Fix missing rtnl lock in suspend/resume path Fix the suspend/resume path by ensuring the rtnl lock is held where required. Calls to sh_eth_close, sh_eth_open and wol operations must be performed under the rtnl lock to prevent conflicts with ongoing ndo operations. Fixes: b71af04676e9 ("sh_eth: add more PM methods") Tested-by: Niklas Söderlund Reviewed-by: Sergey Shtylyov Signed-off-by: Kory Maincent Signed-off-by: Paolo Abeni drivers/net/ethernet/renesas/sh_eth.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2c2ebb2b49573e5f8726112ad06b1dffc3c9ea03 Author: Kory Maincent Date: Wed Jan 29 10:50:46 2025 +0100 net: ravb: Fix missing rtnl lock in suspend/resume path Fix the suspend/resume path by ensuring the rtnl lock is held where required. Calls to ravb_open, ravb_close and wol operations must be performed under the rtnl lock to prevent conflicts with ongoing ndo operations. Without this fix, the following warning is triggered: [ 39.032969] ============================= [ 39.032983] WARNING: suspicious RCU usage [ 39.033019] ----------------------------- [ 39.033033] drivers/net/phy/phy_device.c:2004 suspicious rcu_dereference_protected() usage! ... [ 39.033597] stack backtrace: [ 39.033613] CPU: 0 UID: 0 PID: 174 Comm: python3 Not tainted 6.13.0-rc7-next-20250116-arm64-renesas-00002-g35245dfdc62c #7 [ 39.033623] Hardware name: Renesas SMARC EVK version 2 based on r9a08g045s33 (DT) [ 39.033628] Call trace: [ 39.033633] show_stack+0x14/0x1c (C) [ 39.033652] dump_stack_lvl+0xb4/0xc4 [ 39.033664] dump_stack+0x14/0x1c [ 39.033671] lockdep_rcu_suspicious+0x16c/0x22c [ 39.033682] phy_detach+0x160/0x190 [ 39.033694] phy_disconnect+0x40/0x54 [ 39.033703] ravb_close+0x6c/0x1cc [ 39.033714] ravb_suspend+0x48/0x120 [ 39.033721] dpm_run_callback+0x4c/0x14c [ 39.033731] device_suspend+0x11c/0x4dc [ 39.033740] dpm_suspend+0xdc/0x214 [ 39.033748] dpm_suspend_start+0x48/0x60 [ 39.033758] suspend_devices_and_enter+0x124/0x574 [ 39.033769] pm_suspend+0x1ac/0x274 [ 39.033778] state_store+0x88/0x124 [ 39.033788] kobj_attr_store+0x14/0x24 [ 39.033798] sysfs_kf_write+0x48/0x6c [ 39.033808] kernfs_fop_write_iter+0x118/0x1a8 [ 39.033817] vfs_write+0x27c/0x378 [ 39.033825] ksys_write+0x64/0xf4 [ 39.033833] __arm64_sys_write+0x18/0x20 [ 39.033841] invoke_syscall+0x44/0x104 [ 39.033852] el0_svc_common.constprop.0+0xb4/0xd4 [ 39.033862] do_el0_svc+0x18/0x20 [ 39.033870] el0_svc+0x3c/0xf0 [ 39.033880] el0t_64_sync_handler+0xc0/0xc4 [ 39.033888] el0t_64_sync+0x154/0x158 [ 39.041274] ravb 11c30000.ethernet eth0: Link is Down Reported-by: Claudiu Beznea Closes: https://lore.kernel.org/netdev/4c6419d8-c06b-495c-b987-d66c2e1ff848@tuxon.dev/ Fixes: 0184165b2f42 ("ravb: add sleep PM suspend/resume support") Signed-off-by: Kory Maincent Tested-by: Niklas Söderlund Signed-off-by: Paolo Abeni drivers/net/ethernet/renesas/ravb_main.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit da5ca229b62520fe6a2c7f7b2e610b19cd83828d Merge: f7bf624b1fed 5c61419e0203 Author: Paolo Abeni Date: Thu Jan 30 11:00:31 2025 +0100 Merge tag 'for-net-2025-01-29' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - btusb: mediatek: Add locks for usb_driver_claim_interface() - L2CAP: accept zero as a special value for MTU auto-selection - btusb: Fix possible infinite recursion of btusb_reset - Add ABI doc for sysfs reset - btnxpuart: Fix glitches seen in dual A2DP streaming * tag 'for-net-2025-01-29' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: L2CAP: accept zero as a special value for MTU auto-selection Bluetooth: btnxpuart: Fix glitches seen in dual A2DP streaming Bluetooth: Add ABI doc for sysfs reset Bluetooth: Fix possible infinite recursion of btusb_reset Bluetooth: btusb: mediatek: Add locks for usb_driver_claim_interface() ==================== Link: https://patch.msgid.link/20250129210057.1318963-1-luiz.dentz@gmail.com Signed-off-by: Paolo Abeni commit 57b314752ec0ad42685bc78b376326f1f4c04669 Author: Al Viro Date: Wed Jan 29 19:19:37 2025 +0000 debugfs: Fix the missing initializations in __debugfs_file_get() both method table pointers in debugfs_fsdata need to be initialized, obviously, and calculating the bitmap of present methods would also go better if we start with initialized state. Fixes: 41a0ecc0997c ("debugfs: get rid of dynamically allocation proxy_ops") Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250129191937.GR1977892@ZenIV Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit f7bf624b1fedf232195804ac0f6584cb3e4b86bc Author: Toke Høiland-Jørgensen Date: Mon Jan 27 14:13:43 2025 +0100 selftests/net: Add test for loading devbound XDP program in generic mode Add a test to bpf_offload.py for loading a devbound XDP program in generic mode, checking that it fails correctly. Signed-off-by: Toke Høiland-Jørgensen Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250127131344.238147-2-toke@redhat.com Signed-off-by: Jakub Kicinski tools/testing/selftests/net/bpf_offload.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 3595599fa8360bb3c7afa7ee50c810b4a64106ea Author: Toke Høiland-Jørgensen Date: Mon Jan 27 14:13:42 2025 +0100 net: xdp: Disallow attaching device-bound programs in generic mode Device-bound programs are used to support RX metadata kfuncs. These kfuncs are driver-specific and rely on the driver context to read the metadata. This means they can't work in generic XDP mode. However, there is no check to disallow such programs from being attached in generic mode, in which case the metadata kfuncs will be called in an invalid context, leading to crashes. Fix this by adding a check to disallow attaching device-bound programs in generic mode. Fixes: 2b3486bc2d23 ("bpf: Introduce device-bound XDP programs") Reported-by: Marcus Wichelmann Closes: https://lore.kernel.org/r/dae862ec-43b5-41a0-8edf-46c59071cdda@hetzner-cloud.de Tested-by: Marcus Wichelmann Acked-by: Stanislav Fomichev Signed-off-by: Toke Høiland-Jørgensen Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://patch.msgid.link/20250127131344.238147-1-toke@redhat.com Signed-off-by: Jakub Kicinski net/core/dev.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8c670bdfa58e48abad1d5b6ca1ee843ca91f7303 Author: Jon Maloy Date: Mon Jan 27 18:13:04 2025 -0500 tcp: correct handling of extreme memory squeeze Testing with iperf3 using the "pasta" protocol splicer has revealed a problem in the way tcp handles window advertising in extreme memory squeeze situations. Under memory pressure, a socket endpoint may temporarily advertise a zero-sized window, but this is not stored as part of the socket data. The reasoning behind this is that it is considered a temporary setting which shouldn't influence any further calculations. However, if we happen to stall at an unfortunate value of the current window size, the algorithm selecting a new value will consistently fail to advertise a non-zero window once we have freed up enough memory. This means that this side's notion of the current window size is different from the one last advertised to the peer, causing the latter to not send any data to resolve the sitution. The problem occurs on the iperf3 server side, and the socket in question is a completely regular socket with the default settings for the fedora40 kernel. We do not use SO_PEEK or SO_RCVBUF on the socket. The following excerpt of a logging session, with own comments added, shows more in detail what is happening: // tcp_v4_rcv(->) // tcp_rcv_established(->) [5201<->39222]: ==== Activating log @ net/ipv4/tcp_input.c/tcp_data_queue()/5257 ==== [5201<->39222]: tcp_data_queue(->) [5201<->39222]: DROPPING skb [265600160..265665640], reason: SKB_DROP_REASON_PROTO_MEM [rcv_nxt 265600160, rcv_wnd 262144, snt_ack 265469200, win_now 131184] [copied_seq 259909392->260034360 (124968), unread 5565800, qlen 85, ofoq 0] [OFO queue: gap: 65480, len: 0] [5201<->39222]: tcp_data_queue(<-) [5201<->39222]: __tcp_transmit_skb(->) [tp->rcv_wup: 265469200, tp->rcv_wnd: 262144, tp->rcv_nxt 265600160] [5201<->39222]: tcp_select_window(->) [5201<->39222]: (inet_csk(sk)->icsk_ack.pending & ICSK_ACK_NOMEM) ? --> TRUE [tp->rcv_wup: 265469200, tp->rcv_wnd: 262144, tp->rcv_nxt 265600160] returning 0 [5201<->39222]: tcp_select_window(<-) [5201<->39222]: ADVERTISING WIN 0, ACK_SEQ: 265600160 [5201<->39222]: [__tcp_transmit_skb(<-) [5201<->39222]: tcp_rcv_established(<-) [5201<->39222]: tcp_v4_rcv(<-) // Receive queue is at 85 buffers and we are out of memory. // We drop the incoming buffer, although it is in sequence, and decide // to send an advertisement with a window of zero. // We don't update tp->rcv_wnd and tp->rcv_wup accordingly, which means // we unconditionally shrink the window. [5201<->39222]: tcp_recvmsg_locked(->) [5201<->39222]: __tcp_cleanup_rbuf(->) tp->rcv_wup: 265469200, tp->rcv_wnd: 262144, tp->rcv_nxt 265600160 [5201<->39222]: [new_win = 0, win_now = 131184, 2 * win_now = 262368] [5201<->39222]: [new_win >= (2 * win_now) ? --> time_to_ack = 0] [5201<->39222]: NOT calling tcp_send_ack() [tp->rcv_wup: 265469200, tp->rcv_wnd: 262144, tp->rcv_nxt 265600160] [5201<->39222]: __tcp_cleanup_rbuf(<-) [rcv_nxt 265600160, rcv_wnd 262144, snt_ack 265469200, win_now 131184] [copied_seq 260040464->260040464 (0), unread 5559696, qlen 85, ofoq 0] returning 6104 bytes [5201<->39222]: tcp_recvmsg_locked(<-) // After each read, the algorithm for calculating the new receive // window in __tcp_cleanup_rbuf() finds it is too small to advertise // or to update tp->rcv_wnd. // Meanwhile, the peer thinks the window is zero, and will not send // any more data to trigger an update from the interrupt mode side. [5201<->39222]: tcp_recvmsg_locked(->) [5201<->39222]: __tcp_cleanup_rbuf(->) tp->rcv_wup: 265469200, tp->rcv_wnd: 262144, tp->rcv_nxt 265600160 [5201<->39222]: [new_win = 262144, win_now = 131184, 2 * win_now = 262368] [5201<->39222]: [new_win >= (2 * win_now) ? --> time_to_ack = 0] [5201<->39222]: NOT calling tcp_send_ack() [tp->rcv_wup: 265469200, tp->rcv_wnd: 262144, tp->rcv_nxt 265600160] [5201<->39222]: __tcp_cleanup_rbuf(<-) [rcv_nxt 265600160, rcv_wnd 262144, snt_ack 265469200, win_now 131184] [copied_seq 260099840->260171536 (71696), unread 5428624, qlen 83, ofoq 0] returning 131072 bytes [5201<->39222]: tcp_recvmsg_locked(<-) // The above pattern repeats again and again, since nothing changes // between the reads. [...] [5201<->39222]: tcp_recvmsg_locked(->) [5201<->39222]: __tcp_cleanup_rbuf(->) tp->rcv_wup: 265469200, tp->rcv_wnd: 262144, tp->rcv_nxt 265600160 [5201<->39222]: [new_win = 262144, win_now = 131184, 2 * win_now = 262368] [5201<->39222]: [new_win >= (2 * win_now) ? --> time_to_ack = 0] [5201<->39222]: NOT calling tcp_send_ack() [tp->rcv_wup: 265469200, tp->rcv_wnd: 262144, tp->rcv_nxt 265600160] [5201<->39222]: __tcp_cleanup_rbuf(<-) [rcv_nxt 265600160, rcv_wnd 262144, snt_ack 265469200, win_now 131184] [copied_seq 265600160->265600160 (0), unread 0, qlen 0, ofoq 0] returning 54672 bytes [5201<->39222]: tcp_recvmsg_locked(<-) // The receive queue is empty, but no new advertisement has been sent. // The peer still thinks the receive window is zero, and sends nothing. // We have ended up in a deadlock situation. Note that well behaved endpoints will send win0 probes, so the problem will not occur. Furthermore, we have observed that in these situations this side may send out an updated 'th->ack_seq´ which is not stored in tp->rcv_wup as it should be. Backing ack_seq seems to be harmless, but is of course still wrong from a protocol viewpoint. We fix this by updating the socket state correctly when a packet has been dropped because of memory exhaustion and we have to advertize a zero window. Further testing shows that the connection recovers neatly from the squeeze situation, and traffic can continue indefinitely. Fixes: e2142825c120 ("net: tcp: send zero-window ACK when no memory") Cc: Menglong Dong Reviewed-by: Stefano Brivio Signed-off-by: Jon Maloy Reviewed-by: Jason Xing Reviewed-by: Eric Dumazet Reviewed-by: Neal Cardwell Link: https://patch.msgid.link/20250127231304.1465565-1-jmaloy@redhat.com Signed-off-by: Jakub Kicinski net/ipv4/tcp_output.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 752e5fcc2e77358936d36ef8e522d6439372e201 Author: Rafał Miłecki Date: Mon Jan 27 09:51:59 2025 -0800 bgmac: reduce max frame size to support just MTU 1500 bgmac allocates new replacement buffer before handling each received frame. Allocating & DMA-preparing 9724 B each time consumes a lot of CPU time. Ideally bgmac should just respect currently set MTU but it isn't the case right now. For now just revert back to the old limited frame size. This change bumps NAT masquerade speed by ~95%. Since commit 8218f62c9c9b ("mm: page_frag: use initial zero offset for page_frag_alloc_align()"), the bgmac driver fails to open its network interface successfully and runs out of memory in the following call stack: bgmac_open -> bgmac_dma_init -> bgmac_dma_rx_skb_for_slot -> netdev_alloc_frag BGMAC_RX_ALLOC_SIZE = 10048 and PAGE_FRAG_CACHE_MAX_SIZE = 32768. Eventually we land into __page_frag_alloc_align() with the following parameters across multiple successive calls: __page_frag_alloc_align: fragsz=10048, align_mask=-1, size=32768, offset=0 __page_frag_alloc_align: fragsz=10048, align_mask=-1, size=32768, offset=10048 __page_frag_alloc_align: fragsz=10048, align_mask=-1, size=32768, offset=20096 __page_frag_alloc_align: fragsz=10048, align_mask=-1, size=32768, offset=30144 So in that case we do indeed have offset + fragsz (40192) > size (32768) and so we would eventually return NULL. Reverting to the older 1500 bytes MTU allows the network driver to be usable again. Fixes: 8c7da63978f1 ("bgmac: configure MTU and add support for frames beyond 8192 byte size") Signed-off-by: Rafał Miłecki [florian: expand commit message about recent commits] Reviewed-by: Simon Horman Signed-off-by: Florian Fainelli Link: https://patch.msgid.link/20250127175159.1788246-1-florian.fainelli@broadcom.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bgmac.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6e6c62be16724468ece29990ec9d5b7f9f6a9619 Merge: 9e6c4e6b605c 4695f64e028d Author: Jakub Kicinski Date: Wed Jan 29 18:50:40 2025 -0800 Merge branch 'vsock-transport-reassignment-and-error-handling-issues' Michal Luczaj says: ==================== vsock: Transport reassignment and error handling issues Series deals with two issues: - socket reference count imbalance due to an unforgiving transport release (triggered by transport reassignment); - unintentional API feature, a failing connect() making the socket impossible to use for any subsequent connect() attempts. v2: https://lore.kernel.org/20250121-vsock-transport-vs-autobind-v2-0-aad6069a4e8c@rbox.co v1: https://lore.kernel.org/20250117-vsock-transport-vs-autobind-v1-0-c802c803762d@rbox.co ==================== Link: https://patch.msgid.link/20250128-vsock-transport-vs-autobind-v3-0-1cf57065b770@rbox.co Signed-off-by: Jakub Kicinski commit 4695f64e028dd1407d077565fbdb30ddb364180a Author: Michal Luczaj Date: Tue Jan 28 14:15:32 2025 +0100 vsock/test: Add test for connect() retries Deliberately fail a connect() attempt; expect error. Then verify that subsequent attempt (using the same socket) can still succeed, rather than fail outright. Reviewed-by: Stefano Garzarella Reviewed-by: Luigi Leonardi Signed-off-by: Michal Luczaj Link: https://patch.msgid.link/20250128-vsock-transport-vs-autobind-v3-6-1cf57065b770@rbox.co Signed-off-by: Jakub Kicinski tools/testing/vsock/vsock_test.c | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 301a62dfb0d0dff79460ed3a54e1f8dbd8db52e9 Author: Michal Luczaj Date: Tue Jan 28 14:15:31 2025 +0100 vsock/test: Add test for UAF due to socket unbinding Fail the autobind, then trigger a transport reassign. Socket might get unbound from unbound_sockets, which then leads to a reference count underflow. Reviewed-by: Stefano Garzarella Signed-off-by: Michal Luczaj Link: https://patch.msgid.link/20250128-vsock-transport-vs-autobind-v3-5-1cf57065b770@rbox.co Signed-off-by: Jakub Kicinski tools/testing/vsock/vsock_test.c | 58 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit ac12b7e2912d60fceefaacc78ee8b5aec8b51c04 Author: Michal Luczaj Date: Tue Jan 28 14:15:30 2025 +0100 vsock/test: Introduce vsock_connect_fd() Distill timeout-guarded vsock_connect_fd(). Adapt callers. Suggested-by: Stefano Garzarella Reviewed-by: Stefano Garzarella Signed-off-by: Michal Luczaj Link: https://patch.msgid.link/20250128-vsock-transport-vs-autobind-v3-4-1cf57065b770@rbox.co Signed-off-by: Jakub Kicinski tools/testing/vsock/util.c | 45 +++++++++++++++++---------------------------- tools/testing/vsock/util.h | 1 + 2 files changed, 18 insertions(+), 28 deletions(-) commit 852a00c4281d3c4cf82020421cc9b5b05d53e93f Author: Michal Luczaj Date: Tue Jan 28 14:15:29 2025 +0100 vsock/test: Introduce vsock_bind() Add a helper for socket()+bind(). Adapt callers. Reviewed-by: Stefano Garzarella Reviewed-by: Luigi Leonardi Signed-off-by: Michal Luczaj Link: https://patch.msgid.link/20250128-vsock-transport-vs-autobind-v3-3-1cf57065b770@rbox.co Signed-off-by: Jakub Kicinski tools/testing/vsock/util.c | 57 +++++++++++++++++----------------------- tools/testing/vsock/util.h | 1 + tools/testing/vsock/vsock_test.c | 17 +----------- 3 files changed, 26 insertions(+), 49 deletions(-) commit aa388c72113b7458127b709bdd7d3628af26e9b4 Author: Michal Luczaj Date: Tue Jan 28 14:15:28 2025 +0100 vsock: Allow retrying on connect() failure sk_err is set when a (connectible) connect() fails. Effectively, this makes an otherwise still healthy SS_UNCONNECTED socket impossible to use for any subsequent connection attempts. Clear sk_err upon trying to establish a connection. Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") Reviewed-by: Stefano Garzarella Reviewed-by: Luigi Leonardi Signed-off-by: Michal Luczaj Link: https://patch.msgid.link/20250128-vsock-transport-vs-autobind-v3-2-1cf57065b770@rbox.co Signed-off-by: Jakub Kicinski net/vmw_vsock/af_vsock.c | 5 +++++ 1 file changed, 5 insertions(+) commit fcdd2242c0231032fc84e1404315c245ae56322a Author: Michal Luczaj Date: Tue Jan 28 14:15:27 2025 +0100 vsock: Keep the binding until socket destruction Preserve sockets bindings; this includes both resulting from an explicit bind() and those implicitly bound through autobind during connect(). Prevents socket unbinding during a transport reassignment, which fixes a use-after-free: 1. vsock_create() (refcnt=1) calls vsock_insert_unbound() (refcnt=2) 2. transport->release() calls vsock_remove_bound() without checking if sk was bound and moved to bound list (refcnt=1) 3. vsock_bind() assumes sk is in unbound list and before __vsock_insert_bound(vsock_bound_sockets()) calls __vsock_remove_bound() which does: list_del_init(&vsk->bound_table); // nop sock_put(&vsk->sk); // refcnt=0 BUG: KASAN: slab-use-after-free in __vsock_bind+0x62e/0x730 Read of size 4 at addr ffff88816b46a74c by task a.out/2057 dump_stack_lvl+0x68/0x90 print_report+0x174/0x4f6 kasan_report+0xb9/0x190 __vsock_bind+0x62e/0x730 vsock_bind+0x97/0xe0 __sys_bind+0x154/0x1f0 __x64_sys_bind+0x6e/0xb0 do_syscall_64+0x93/0x1b0 entry_SYSCALL_64_after_hwframe+0x76/0x7e Allocated by task 2057: kasan_save_stack+0x1e/0x40 kasan_save_track+0x10/0x30 __kasan_slab_alloc+0x85/0x90 kmem_cache_alloc_noprof+0x131/0x450 sk_prot_alloc+0x5b/0x220 sk_alloc+0x2c/0x870 __vsock_create.constprop.0+0x2e/0xb60 vsock_create+0xe4/0x420 __sock_create+0x241/0x650 __sys_socket+0xf2/0x1a0 __x64_sys_socket+0x6e/0xb0 do_syscall_64+0x93/0x1b0 entry_SYSCALL_64_after_hwframe+0x76/0x7e Freed by task 2057: kasan_save_stack+0x1e/0x40 kasan_save_track+0x10/0x30 kasan_save_free_info+0x37/0x60 __kasan_slab_free+0x4b/0x70 kmem_cache_free+0x1a1/0x590 __sk_destruct+0x388/0x5a0 __vsock_bind+0x5e1/0x730 vsock_bind+0x97/0xe0 __sys_bind+0x154/0x1f0 __x64_sys_bind+0x6e/0xb0 do_syscall_64+0x93/0x1b0 entry_SYSCALL_64_after_hwframe+0x76/0x7e refcount_t: addition on 0; use-after-free. WARNING: CPU: 7 PID: 2057 at lib/refcount.c:25 refcount_warn_saturate+0xce/0x150 RIP: 0010:refcount_warn_saturate+0xce/0x150 __vsock_bind+0x66d/0x730 vsock_bind+0x97/0xe0 __sys_bind+0x154/0x1f0 __x64_sys_bind+0x6e/0xb0 do_syscall_64+0x93/0x1b0 entry_SYSCALL_64_after_hwframe+0x76/0x7e refcount_t: underflow; use-after-free. WARNING: CPU: 7 PID: 2057 at lib/refcount.c:28 refcount_warn_saturate+0xee/0x150 RIP: 0010:refcount_warn_saturate+0xee/0x150 vsock_remove_bound+0x187/0x1e0 __vsock_release+0x383/0x4a0 vsock_release+0x90/0x120 __sock_release+0xa3/0x250 sock_close+0x14/0x20 __fput+0x359/0xa80 task_work_run+0x107/0x1d0 do_exit+0x847/0x2560 do_group_exit+0xb8/0x250 __x64_sys_exit_group+0x3a/0x50 x64_sys_call+0xfec/0x14f0 do_syscall_64+0x93/0x1b0 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: c0cfa2d8a788 ("vsock: add multi-transports support") Reviewed-by: Stefano Garzarella Signed-off-by: Michal Luczaj Link: https://patch.msgid.link/20250128-vsock-transport-vs-autobind-v3-1-1cf57065b770@rbox.co Signed-off-by: Jakub Kicinski net/vmw_vsock/af_vsock.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c78f4afbd962f43a3989f45f3ca04300252b19b5 Author: Abel Wu Date: Sat Dec 21 14:10:16 2024 +0800 bpf: Fix deadlock when freeing cgroup storage The following commit bc235cdb423a ("bpf: Prevent deadlock from recursive bpf_task_storage_[get|delete]") first introduced deadlock prevention for fentry/fexit programs attaching on bpf_task_storage helpers. That commit also employed the logic in map free path in its v6 version. Later bpf_cgrp_storage was first introduced in c4bcfb38a95e ("bpf: Implement cgroup storage available to non-cgroup-attached bpf progs") which faces the same issue as bpf_task_storage, instead of its busy counter, NULL was passed to bpf_local_storage_map_free() which opened a window to cause deadlock: (acquiring local_storage->lock) _raw_spin_lock_irqsave+0x3d/0x50 bpf_local_storage_update+0xd1/0x460 bpf_cgrp_storage_get+0x109/0x130 bpf_prog_a4d4a370ba857314_cgrp_ptr+0x139/0x170 ? __bpf_prog_enter_recur+0x16/0x80 bpf_trampoline_6442485186+0x43/0xa4 cgroup_storage_ptr+0x9/0x20 (holding local_storage->lock) bpf_selem_unlink_storage_nolock.constprop.0+0x135/0x160 bpf_selem_unlink_storage+0x6f/0x110 bpf_local_storage_map_free+0xa2/0x110 bpf_map_free_deferred+0x5b/0x90 process_one_work+0x17c/0x390 worker_thread+0x251/0x360 kthread+0xd2/0x100 ret_from_fork+0x34/0x50 ret_from_fork_asm+0x1a/0x30 Progs: - A: SEC("fentry/cgroup_storage_ptr") - cgid (BPF_MAP_TYPE_HASH) Record the id of the cgroup the current task belonging to in this hash map, using the address of the cgroup as the map key. - cgrpa (BPF_MAP_TYPE_CGRP_STORAGE) If current task is a kworker, lookup the above hash map using function parameter @owner as the key to get its corresponding cgroup id which is then used to get a trusted pointer to the cgroup through bpf_cgroup_from_id(). This trusted pointer can then be passed to bpf_cgrp_storage_get() to finally trigger the deadlock issue. - B: SEC("tp_btf/sys_enter") - cgrpb (BPF_MAP_TYPE_CGRP_STORAGE) The only purpose of this prog is to fill Prog A's hash map by calling bpf_cgrp_storage_get() for as many userspace tasks as possible. Steps to reproduce: - Run A; - while (true) { Run B; Destroy B; } Fix this issue by passing its busy counter to the free procedure so it can be properly incremented before storage/smap locking. Fixes: c4bcfb38a95e ("bpf: Implement cgroup storage available to non-cgroup-attached bpf progs") Signed-off-by: Abel Wu Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20241221061018.37717-1-wuyun.abel@bytedance.com Signed-off-by: Alexei Starovoitov kernel/bpf/bpf_cgrp_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 101971298be2aa4706c8602bd81066a0f6f2ced5 Author: Yunhui Cui Date: Wed Aug 14 14:26:25 2024 +0800 riscv: add a warning when physical memory address overflows The part of physical memory that exceeds the size of the linear mapping will be discarded. When the system starts up normally, a warning message will be printed to prevent confusion caused by the mismatch between the system memory and the actual physical memory. Signed-off-by: Yunhui Cui Reviewed-by: Alexandre Ghiti Tested-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240814062625.19794-1-cuiyunhui@bytedance.com Signed-off-by: Palmer Dabbelt arch/riscv/mm/init.c | 8 ++++++-- scripts/selinux/genheaders/genheaders | Bin 0 -> 90112 bytes 2 files changed, 6 insertions(+), 2 deletions(-) commit 35fcac7a7c25cc04f730b9570c737f31295fa92d Author: Huacai Chen Date: Wed Jan 29 20:06:52 2025 +0800 audit: Initialize lsmctx to avoid memory allocation error When audit is enabled in a kernel build, and there are no LSMs active that support LSM labeling, it is possible that local variable lsmctx in the AUDIT_SIGNAL_INFO handler in audit_receive_msg() could be used before it is properly initialize. Then kmalloc() will try to allocate a large amount of memory with the uninitialized length. This patch corrects this problem by initializing the lsmctx to a safe value when it is declared, which avoid errors like: WARNING: CPU: 2 PID: 443 at mm/page_alloc.c:4727 __alloc_pages_noprof ... ra: 9000000003059644 ___kmalloc_large_node+0x84/0x1e0 ERA: 900000000304d588 __alloc_pages_noprof+0x4c8/0x1040 CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE) PRMD: 00000004 (PPLV0 +PIE -PWE) EUEN: 00000007 (+FPE +SXE +ASXE -BTE) ECFG: 00071c1d (LIE=0,2-4,10-12 VS=7) ESTAT: 000c0000 [BRK] (IS= ECode=12 EsubCode=0) PRID: 0014c010 (Loongson-64bit, Loongson-3A5000) CPU: 2 UID: 0 PID: 443 Comm: auditd Not tainted 6.13.0-rc1+ #1899 ... Call Trace: [<9000000002def6a8>] show_stack+0x30/0x148 [<9000000002debf58>] dump_stack_lvl+0x68/0xa0 [<9000000002e0fe18>] __warn+0x80/0x108 [<900000000407486c>] report_bug+0x154/0x268 [<90000000040ad468>] do_bp+0x2a8/0x320 [<9000000002dedda0>] handle_bp+0x120/0x1c0 [<900000000304d588>] __alloc_pages_noprof+0x4c8/0x1040 [<9000000003059640>] ___kmalloc_large_node+0x80/0x1e0 [<9000000003061504>] __kmalloc_noprof+0x2c4/0x380 [<9000000002f0f7ac>] audit_receive_msg+0x764/0x1530 [<9000000002f1065c>] audit_receive+0xe4/0x1c0 [<9000000003e5abe8>] netlink_unicast+0x340/0x450 [<9000000003e5ae9c>] netlink_sendmsg+0x1a4/0x4a0 [<9000000003d9ffd0>] __sock_sendmsg+0x48/0x58 [<9000000003da32f0>] __sys_sendto+0x100/0x170 [<9000000003da3374>] sys_sendto+0x14/0x28 [<90000000040ad574>] do_syscall+0x94/0x138 [<9000000002ded318>] handle_syscall+0xb8/0x158 Fixes: 6fba89813ccf333d ("lsm: ensure the correct LSM context releaser") Signed-off-by: Huacai Chen [PM: resolved excessive line length in the backtrace] Signed-off-by: Paul Moore kernel/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a409fc1463d664002ea9bf700ae4674df03de111 Author: Masahiro Yamada Date: Mon Jan 20 17:10:31 2025 +0900 kconfig: fix memory leak in sym_warn_unmet_dep() The string allocated in sym_warn_unmet_dep() is never freed, leading to a memory leak when an unmet dependency is detected. Fixes: f8f69dc0b4e0 ("kconfig: make unmet dependency warnings readable") Signed-off-by: Masahiro Yamada Reviewed-by: Petr Vorel scripts/kconfig/symbol.c | 1 + 1 file changed, 1 insertion(+) commit a314f52a0210730d0d556de76bb7388e76d4597d Author: Masahiro Yamada Date: Mon Jan 20 16:59:14 2025 +0900 kconfig: fix file name in warnings when loading KCONFIG_DEFCONFIG_LIST Most 'make *config' commands use .config as the base configuration file. When .config does not exist, Kconfig tries to load a file listed in KCONFIG_DEFCONFIG_LIST instead. However, since commit b75b0a819af9 ("kconfig: change defconfig_list option to environment variable"), warning messages have displayed an incorrect file name in such cases. Below is a demonstration using Debian Trixie. While loading /boot/config-6.12.9-amd64, the warning messages incorrectly show .config as the file name. With this commit, the correct file name is displayed in warnings. [Before] $ rm -f .config $ make config # # using defaults found in /boot/config-6.12.9-amd64 # .config:6804:warning: symbol value 'm' invalid for FB_BACKLIGHT .config:9895:warning: symbol value 'm' invalid for ANDROID_BINDER_IPC [After] $ rm -f .config $ make config # # using defaults found in /boot/config-6.12.9-amd64 # /boot/config-6.12.9-amd64:6804:warning: symbol value 'm' invalid for FB_BACKLIGHT /boot/config-6.12.9-amd64:9895:warning: symbol value 'm' invalid for ANDROID_BINDER_IPC Fixes: b75b0a819af9 ("kconfig: change defconfig_list option to environment variable") Signed-off-by: Masahiro Yamada scripts/kconfig/confdata.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 78f69467cbbfd24da5ce9917c4b738b38a615f8b Author: Pali Rohár Date: Sat Sep 21 16:15:30 2024 +0200 cifs: Add mount option -o reparse=none This new mount option allows to completely disable creating new reparse points. When -o sfu or -o mfsymlinks or -o symlink= is not specified then creating any special file (fifo, socket, symlink, block and char) will fail with -EOPNOTSUPP error. Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/cifsglob.h | 3 +++ fs/smb/client/fs_context.c | 8 +++++++- fs/smb/client/fs_context.h | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) commit 660618dde2b4c372132a6be62f11ab68a0a1571a Author: Pali Rohár Date: Fri Oct 11 11:20:56 2024 +0200 cifs: Add mount option -o symlink= for choosing symlink create type Currently Linux CIFS client creates a new symlink of the first flavor which is allowed by mount options, parsed in this order: -o (no)mfsymlinks, -o (no)sfu, -o (no)unix (+ its aliases) and -o reparse=[type]. Introduce a new mount option -o symlink= for explicitly choosing a symlink flavor. Possible options are: -o symlink=default - The default behavior, like before this change. -o symlink=none - Disallow creating a new symlinks -o symlink=native - Create as native SMB symlink reparse point -o symlink=unix - Create via SMB1 unix extension command -o symlink=mfsymlinks - Create as regular file of mfsymlinks format -o symlink=sfu - Create as regular system file of SFU format -o symlink=nfs - Create as NFS reparse point -o symlink=wsl - Create as WSL reparse point So for example specifying -o sfu,mfsymlinks,symlink=native will allow to parse symlinks also of SFU and mfsymlinks types (which are disabled by default unless mount option is explicitly specified), but new symlinks will be created under native SMB type (which parsing is always enabled). Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/cifsfs.c | 2 ++ fs/smb/client/cifsglob.h | 33 +++++++++++++++++++++ fs/smb/client/connect.c | 2 ++ fs/smb/client/fs_context.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++ fs/smb/client/fs_context.h | 16 +++++++++++ fs/smb/client/link.c | 60 ++++++++++++++++++++++++++++++--------- fs/smb/client/reparse.c | 52 ++++++++++++++++++++++++++------- fs/smb/client/reparse.h | 2 ++ 8 files changed, 214 insertions(+), 24 deletions(-) commit 12b466eb52d926802b6898d2cb7e67386467f54a Author: Pali Rohár Date: Mon Sep 23 23:01:59 2024 +0200 cifs: Fix creating and resolving absolute NT-style symlinks If the SMB symlink is stored on NT server in absolute form then it points to the NT object hierarchy, which is different from POSIX one and needs some conversion / mapping. To make interoperability with Windows SMB server and WSL subsystem, reuse its logic of mapping between NT paths and POSIX paths into Linux SMB client. WSL subsystem on Windows uses for -t drvfs mount option -o symlinkroot= which specifies the POSIX path where are expected to be mounted lowercase Windows drive letters (without colon). Do same for Linux SMB client and add a new mount option -o symlinkroot= which mimics the drvfs mount option of the same name. It specifies where in the Linux VFS hierarchy is the root of the DOS / Windows drive letters, and translates between absolute NT-style symlinks and absolute Linux VFS symlinks. Default value of symlinkroot is "/mnt", same what is using WSL. Note that DOS / Windows drive letter symlinks are just subset of all possible NT-style symlinks. Drive letters live in NT subtree \??\ and important details about NT paths and object hierarchy are in the comments in this change. When symlink target location from non-POSIX SMB server is in absolute form (indicated by absence of SYMLINK_FLAG_RELATIVE) then it is converted to Linux absolute symlink according to symlinkroot configuration. And when creating a new symlink on non-POSIX SMB server in absolute form then Linux absolute target is converted to NT-style according to symlinkroot configuration. When SMB server is POSIX, then this change does not affect neither reading target location of symlink, nor creating a new symlink. It is expected that POSIX SMB server works with POSIX paths where the absolute root is /. This change improves interoperability of absolute SMB symlinks with Windows SMB servers. Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/fs_context.c | 22 ++++ fs/smb/client/fs_context.h | 2 + fs/smb/client/reparse.c | 267 ++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 273 insertions(+), 18 deletions(-) commit 32ba03042ab2618f2622e4dae57ca802ac982e39 Author: Pali Rohár Date: Thu Dec 26 14:56:33 2024 +0100 cifs: Simplify reparse point check in cifs_query_path_info() function For checking if path is reparse point and setting data->reparse_point member, it is enough to check if ATTR_REPARSE is present. It is not required to call CIFS_open() without OPEN_REPARSE_POINT and checking for -EOPNOTSUPP error code. Signed-off-by: Pali Rohár Acked-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/smb1ops.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) commit 65c49767dd4fc058673f9259fda1772fd398eaa7 Author: Pali Rohár Date: Thu Dec 26 14:50:38 2024 +0100 cifs: Remove symlink member from cifs_open_info_data union Member 'symlink' is part of the union in struct cifs_open_info_data. Its value is assigned on few places, but is always read through another union member 'reparse_point'. So to make code more readable, always use only 'reparse_point' member and drop whole union structure. No function change. Signed-off-by: Pali Rohár Acked-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/cifsglob.h | 5 +---- fs/smb/client/inode.c | 2 +- fs/smb/client/smb1ops.c | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) commit a46221fcdd40a29eb08900221797ad63d0271118 Author: Pali Rohár Date: Tue Dec 24 15:31:22 2024 +0100 cifs: Update description about ACL permissions There are some incorrect information about individual SMB permission constants like WRITE_DAC can change ownership, or incomplete information to distinguish between ACL types (discretionary vs system) and there is completely missing information how permissions apply for directory objects and what is meaning of GENERIC_* bits. Also there is missing constant for MAXIMUM_ALLOWED permission. Fix and extend description of all SMB permission constants to match the reality, how the reference Windows SMB / NTFS implementation handles them. Links to official Microsoft documentation related to permissions: https://learn.microsoft.com/en-us/windows/win32/fileio/file-access-rights-constants https://learn.microsoft.com/en-us/windows/win32/secauthz/access-mask https://learn.microsoft.com/en-us/windows/win32/secauthz/standard-access-rights https://learn.microsoft.com/en-us/windows/win32/secauthz/generic-access-rights https://learn.microsoft.com/en-us/windows/win32/api/winternl/nf-winternl-ntcreatefile https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-ntcreatefile Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/cifspdu.h | 82 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 61 insertions(+), 21 deletions(-) commit b6d002f0a345218edbe9de049693004482a81327 Author: Pali Rohár Date: Fri Sep 13 11:46:35 2024 +0200 cifs: Rename struct reparse_posix_data to reparse_nfs_data_buffer and move to common/smb2pdu.h Function parse_reparse_posix() parses NFS-style reparse points, which are used only by Windows NFS server since Windows Server 2012 version. This style is not understood by Microsoft POSIX/Interix/SFU/SUA subsystems. So make it clear that parse_reparse_posix() function and reparse_posix_data structure are not POSIX general, but rather NFS specific. All reparse buffer structures are defined in common/smb2pdu.h and have _buffer suffix. So move struct reparse_posix_data from client/cifspdu.h to common/smb2pdu.h and rename it to reparse_nfs_data_buffer for consistency. Note that also SMB specification in [MS-FSCC] document, section 2.1.2.6 defines it under name "Network File System (NFS) Reparse Data Buffer". So use this name for consistency. Having this structure in common/smb2pdu.h can be useful for ksmbd server code as NFS-style reparse points is the preferred way for implementing support for special files. Signed-off-by: Pali Rohár Acked-by: Paulo Alcantara (Red Hat) Reviewed-by: Namjae Jeon Signed-off-by: Steve French fs/smb/client/cifspdu.h | 14 -------------- fs/smb/client/reparse.c | 12 ++++++------ fs/smb/common/smb2pdu.h | 14 +++++++++++++- 3 files changed, 19 insertions(+), 21 deletions(-) commit 65ccccee4eb1a8147a3242238f7730bd8359077e Author: Pali Rohár Date: Sat Sep 28 14:13:44 2024 +0200 cifs: Remove struct reparse_posix_data from struct cifs_open_info_data Linux SMB client already supports more reparse point types but only the reparse_posix_data is defined in union of struct cifs_open_info_data. This union is currently used as implicit casting between point types. With this code style, it hides information that union is used for pointer casting, and just in mknod_nfs() and posix_reparse_to_fattr() functions. Other reparse point buffers do not use this kind of casting. So remove reparse_posix_data from reparse part of struct cifs_open_info_data and for all cases of reparse buffer use just struct reparse_data_buffer *buf. Signed-off-by: Pali Rohár Reviewed-by: Namjae Jeon Signed-off-by: Steve French fs/smb/client/cifsglob.h | 5 +---- fs/smb/client/reparse.c | 5 ++--- 2 files changed, 3 insertions(+), 7 deletions(-) commit 24cf72976acee4b731c7c3ef2080e8535441fa3b Author: Pali Rohár Date: Sun Oct 6 19:44:50 2024 +0200 cifs: Remove unicode parameter from parse_reparse_point() function This parameter is always true, so remove it and also remove dead code which is never called (for all false code paths). Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/cifsproto.h | 2 +- fs/smb/client/reparse.c | 25 +++++++++++-------------- fs/smb/client/smb1ops.c | 2 +- fs/smb/client/smb2file.c | 1 - fs/smb/client/smb2proto.h | 2 +- 5 files changed, 14 insertions(+), 18 deletions(-) commit 8b19dfb34d17e77a0809d433cc128b779282131b Author: Pali Rohár Date: Mon Oct 14 13:43:23 2024 +0200 cifs: Fix getting and setting SACLs over SMB1 SMB1 callback get_cifs_acl_by_fid() currently ignores its last argument and therefore ignores request for SACL_SECINFO. Fix this issue by correctly propagating info argument from get_cifs_acl() and get_cifs_acl_by_fid() to CIFSSMBGetCIFSACL() function and pass SACL_SECINFO when requested. For accessing SACLs it is needed to open object with SYSTEM_SECURITY access. Pass this flag when trying to get or set SACLs. Same logic is in the SMB2+ code path. This change fixes getting and setting of "system.cifs_ntsd_full" and "system.smb3_ntsd_full" xattrs over SMB1 as currently it silentely ignored SACL part of passed xattr buffer. Fixes: 3970acf7ddb9 ("SMB3: Add support for getting and setting SACLs") Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/cifsacl.c | 25 +++++++++++++++---------- fs/smb/client/cifsproto.h | 2 +- fs/smb/client/cifssmb.c | 4 ++-- 3 files changed, 18 insertions(+), 13 deletions(-) commit 25f6184e24b3991eae977a29ecf27d537cc930b2 Author: Pali Rohár Date: Wed Dec 25 14:00:39 2024 +0100 cifs: Remove intermediate object of failed create SFU call Check if the server honored ATTR_SYSTEM flag by CREATE_OPTION_SPECIAL option. If not then server does not support ATTR_SYSTEM and newly created file is not SFU compatible, which means that the call failed. If CREATE was successful but either setting ATTR_SYSTEM failed or writing type/data information failed then remove the intermediate object created by CREATE. Otherwise intermediate empty object stay on the server. This ensures that if the creating of SFU files with system attribute is unsupported by the server then no empty file stay on the server as a result of unsupported operation. This is for example case with Samba server and Linux tmpfs storage without enabled xattr support (where Samba stores ATTR_SYSTEM bit). Cc: stable@vger.kernel.org Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/smb2ops.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit ef201e8759d20bf82b5943101147072de12bc524 Author: Pali Rohár Date: Thu Dec 26 15:20:39 2024 +0100 cifs: Validate EAs for WSL reparse points Major and minor numbers for char and block devices are mandatory for stat. So check that the WSL EA $LXDEV is present for WSL CHR and BLK reparse points. WSL reparse point tag determinate type of the file. But file type is present also in the WSL EA $LXMOD. So check that both file types are same. Fixes: 78e26bec4d6d ("smb: client: parse uid, gid, mode and dev from WSL reparse points") Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/reparse.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 438e2116d7bd3095184d1997b367380c4f465164 Author: Pali Rohár Date: Mon Oct 14 13:00:48 2024 +0200 cifs: Change translation of STATUS_PRIVILEGE_NOT_HELD to -EPERM STATUS_PRIVILEGE_NOT_HELD indicates that user does not have privilege to issue some operation, for example to create symlink. Currently STATUS_PRIVILEGE_NOT_HELD is translated to -EIO. Change it to -EPERM which better describe this error code. Note that there is no ERR* code usable in ntstatus_to_dos_map[] table which can be used to -EPERM translation, so do explicit translation in map_smb_to_linux_error() function. Signed-off-by: Pali Rohár Acked-by: Tom Talpey Acked-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/netmisc.c | 3 ++- fs/smb/client/smb2maperror.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 72deda0abee6e705ae71a93f69f55e33be5bca5c Merge: 9f10e7fb6a06 74148bb59e20 Author: Linus Torvalds Date: Wed Jan 29 14:38:19 2025 -0800 Merge tag 'soundwire-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire Pull soundwire updates from Vinod Koul: - SoundWire multi lane support to use multiple lanes if supported - Stream handling of DEPREPARED state - AMD wake register programming for power off mode * tag 'soundwire-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: amd: clear wake enable register for power off mode soundwire: generic_bandwidth_allocation: count the bandwidth of active streams only SoundWire: pass stream to compute_params() soundwire: generic_bandwidth_allocation: add lane in sdw_group_params soundwire: generic_bandwidth_allocation: select data lane soundwire: generic_bandwidth_allocation: check required freq accurately soundwire: generic_bandwidth_allocation: correct clk_freq check in sdw_select_row_col Soundwire: generic_bandwidth_allocation: set frame shape on fly Soundwire: stream: program BUSCLOCK_SCALE Soundwire: add sdw_slave_get_scale_index helper soundwire: generic_bandwidth_allocation: skip DEPREPARED streams soundwire: stream: set DEPREPARED state earlier soundwire: add lane_used_bandwidth in struct sdw_bus soundwire: mipi_disco: read lane mapping properties from ACPI soundwire: add lane field in sdw_port_runtime soundwire: bus: Move irq mapping cleanup into devres commit 9f10e7fb6a06bce4f81de5fd0f2f0390f99e89e4 Merge: 7c775c6056d0 af1bc0ebe743 Author: Linus Torvalds Date: Wed Jan 29 14:32:38 2025 -0800 Merge tag 'phy-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy updates from Vinod Koul: "Lots of Qualcomm and Rockchip device support. New Support: - Qualcomm SAR2130P qmp usb, SAR2130P qmp pcie, QCS615 qusb2 and PCIe, IPQ5424 qmp pcie, IPQ5424 QUSB2 and USB3 PHY - Rockchip rk3576 combo phy support Updates: - Drop Shengyang for JH7110 maintainer - Freescale hdmi register calculation optimization - Rockchip pcie phy mutex and regmap updates" * tag 'phy-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (37 commits) dt-bindings: phy: qcom,qmp-pcie: document the SM8350 two lanes PCIe PHY phy: rockchip: phy-rockchip-typec: Fix Copyright description dt-bindings: phy: qcom,ipq8074-qmp-pcie: Document the IPQ5424 QMP PCIe PHYs phy: qcom-qusb2: Add support for QCS615 dt-bindings: usb: qcom,dwc3: Add QCS615 to USB DWC3 bindings phy: core: Simplify API of_phy_simple_xlate() implementation phy: sun4i-usb: Remove unused of_gpio.h phy: HiSilicon: Don't use "proxy" headers phy: samsung-ufs: switch back to syscon_regmap_lookup_by_phandle() phy: qualcomm: qmp-pcie: add support for SAR2130P phy: qualcomm: qmp-pcie: define several new registers phy: qualcomm: qmp-pcie: split PCS_LANE1 region phy: qualcomm: qmp-combo: add support for SAR2130P dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add SAR2130P compatible dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp: Add SAR2130P compatible phy: freescale: fsl-samsung-hdmi: Clean up fld_tg_code calculation phy: freescale: fsl-samsung-hdmi: Stop searching when exact match is found phy: freescale: fsl-samsung-hdmi: Expand Integer divider range phy: rockchip-naneng-combo: add rk3576 support dt-bindings: phy: rockchip: add rk3576 compatible ... commit 7c775c6056d07eb777f37c7ac1340115b27dc9f8 Merge: ebbb8be421ee 98d187a98903 Author: Linus Torvalds Date: Wed Jan 29 14:29:57 2025 -0800 Merge tag 'dmaengine-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine updates from Vinod Koul: "A bunch of new device support and updates to few drivers, biggest of them amd ones. New support: - TI J722S CSI BCDMA controller support - Intel idxd Panther Lake family platforms - Allwinner F1C100s suniv DMA - Qualcomm QCS615, QCS8300, SM8750, SA8775P GPI dma controller support - AMD ae4dma controller support and reorganisation of amd driver Updates: - Channel page support for Nvidia Tegra210 adma driver - Freescale support for S32G based platforms - Yamilfy atmel dma bindings" * tag 'dmaengine-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (45 commits) dmaengine: idxd: Enable Function Level Reset (FLR) for halt dmaengine: idxd: Refactor halt handler dmaengine: idxd: Add idxd_device_config_save() and idxd_device_config_restore() helpers dmaengine: idxd: Binding and unbinding IDXD device and driver dmaengine: idxd: Add idxd_pci_probe_alloc() helper dt-bindings: dma: atmel: Convert to json schema dt-bindings: dma: st-stm32-dmamux: Add description for dma-cell values dmaengine: qcom: gpi: Add GPI immediate DMA support for SPI protocol dt-bindings: dma: adi,axi-dmac: deprecate adi,channels node dt-bindings: dma: adi,axi-dmac: convert to yaml schema dmaengine: mv_xor: switch to for_each_child_of_node_scoped() dmaengine: bcm2835-dma: Prevent suspend if DMA channel is busy dmaengine: tegra210-adma: Support channel page dt-bindings: dma: Support channel page to nvidia,tegra210-adma dmaengine: ti: k3-udma: Add support for J722S CSI BCDMA dt-bindings: dma: ti: k3-bcdma: Add J722S CSI BCDMA dmaengine: ti: edma: fix OF node reference leaks in edma_driver dmaengine: ti: edma: make the loop condition simpler in edma_probe() dmaengine: fsl-edma: read/write multiple registers in cyclic transactions dmaengine: fsl-edma: add support for S32G based platforms ... commit 9bf412d4d5b1f431e6cdd8111094be39c031036c Merge: bc27c52eea18 6fcfe96e0f6e Author: Martin KaFai Lau Date: Wed Jan 29 13:31:19 2025 -0800 Merge branch 'bpf-fix-wrong-copied_seq-calculation-and-add-tests' Jiayuan Chen says: ==================== A previous commit described in this topic http://lore.kernel.org/bpf/20230523025618.113937-9-john.fastabend@gmail.com directly updated 'sk->copied_seq' in the tcp_eat_skb() function when the action of a BPF program was SK_REDIRECT. For other actions, like SK_PASS, the update logic for 'sk->copied_seq' was moved to tcp_bpf_recvmsg_parser() to ensure the accuracy of the 'fionread' feature. That commit works for a single stream_verdict scenario, as it also modified 'sk_data_ready->sk_psock_verdict_data_ready->tcp_read_skb' to remove updating 'sk->copied_seq'. However, for programs where both stream_parser and stream_verdict are active (strparser purpose), tcp_read_sock() was used instead of tcp_read_skb() (sk_data_ready->strp_data_ready->tcp_read_sock). tcp_read_sock() now still updates 'sk->copied_seq', leading to duplicated updates. In summary, for strparser + SK_PASS, copied_seq is redundantly calculated in both tcp_read_sock() and tcp_bpf_recvmsg_parser(). The issue causes incorrect copied_seq calculations, which prevent correct data reads from the recv() interface in user-land. Also we added test cases for bpf + strparser and separated them from sockmap_basic, as strparser has more encapsulation and parsing capabilities compared to sockmap. ==================== Link: https://patch.msgid.link/20250122100917.49845-1-mrpre@163.com Signed-off-by: Martin KaFai Lau commit 6fcfe96e0f6e9bebe1b185f1548a9a8cb1b68dea Author: Jiayuan Chen Date: Wed Jan 22 18:09:17 2025 +0800 selftests/bpf: Add strparser test for bpf Add test cases for bpf + strparser and separated them from sockmap_basic, as strparser has more encapsulation and parsing capabilities compared to standard sockmap. Signed-off-by: Jiayuan Chen Signed-off-by: Martin KaFai Lau Acked-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://patch.msgid.link/20250122100917.49845-6-mrpre@163.com .../selftests/bpf/prog_tests/sockmap_basic.c | 53 --- .../selftests/bpf/prog_tests/sockmap_strp.c | 454 +++++++++++++++++++++ .../selftests/bpf/progs/test_sockmap_strp.c | 53 +++ 3 files changed, 507 insertions(+), 53 deletions(-) commit a0c11149509aa905aeec10cf9998091443472b0b Author: Jiayuan Chen Date: Wed Jan 22 18:09:16 2025 +0800 selftests/bpf: Fix invalid flag of recv() SOCK_NONBLOCK flag is only effective during socket creation, not during recv. Use MSG_DONTWAIT instead. Signed-off-by: Jiayuan Chen Signed-off-by: Martin KaFai Lau Acked-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://patch.msgid.link/20250122100917.49845-5-mrpre@163.com tools/testing/selftests/bpf/prog_tests/sockmap_basic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5459cce6bf49e72ee29be21865869c2ac42419f5 Author: Jiayuan Chen Date: Wed Jan 22 18:09:15 2025 +0800 bpf: Disable non stream socket for strparser Currently, only TCP supports strparser, but sockmap doesn't intercept non-TCP connections to attach strparser. For example, with UDP, although the read/write handlers are replaced, strparser is not executed due to the lack of a read_sock operation. Furthermore, in udp_bpf_recvmsg(), it checks whether the psock has data, and if not, it falls back to the native UDP read interface, making UDP + strparser appear to read correctly. According to its commit history, this behavior is unexpected. Moreover, since UDP lacks the concept of streams, we intercept it directly. Fixes: 1fa1fe8ff161 ("bpf, sockmap: Test shutdown() correctly exits epoll and recv()=0") Signed-off-by: Jiayuan Chen Signed-off-by: Martin KaFai Lau Acked-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://patch.msgid.link/20250122100917.49845-4-mrpre@163.com net/core/sock_map.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 36b62df5683c315ba58c950f1a9c771c796c30ec Author: Jiayuan Chen Date: Wed Jan 22 18:09:14 2025 +0800 bpf: Fix wrong copied_seq calculation 'sk->copied_seq' was updated in the tcp_eat_skb() function when the action of a BPF program was SK_REDIRECT. For other actions, like SK_PASS, the update logic for 'sk->copied_seq' was moved to tcp_bpf_recvmsg_parser() to ensure the accuracy of the 'fionread' feature. It works for a single stream_verdict scenario, as it also modified sk_data_ready->sk_psock_verdict_data_ready->tcp_read_skb to remove updating 'sk->copied_seq'. However, for programs where both stream_parser and stream_verdict are active (strparser purpose), tcp_read_sock() was used instead of tcp_read_skb() (sk_data_ready->strp_data_ready->tcp_read_sock). tcp_read_sock() now still updates 'sk->copied_seq', leading to duplicate updates. In summary, for strparser + SK_PASS, copied_seq is redundantly calculated in both tcp_read_sock() and tcp_bpf_recvmsg_parser(). The issue causes incorrect copied_seq calculations, which prevent correct data reads from the recv() interface in user-land. We do not want to add new proto_ops to implement a new version of tcp_read_sock, as this would introduce code complexity [1]. We could have added noack and copied_seq to desc, and then called ops->read_sock. However, unfortunately, other modules didn’t fully initialize desc to zero. So, for now, we are directly calling tcp_read_sock_noack() in tcp_bpf.c. [1]: https://lore.kernel.org/bpf/20241218053408.437295-1-mrpre@163.com Fixes: e5c6de5fa025 ("bpf, sockmap: Incorrectly handling copied_seq") Suggested-by: Jakub Sitnicki Signed-off-by: Jiayuan Chen Signed-off-by: Martin KaFai Lau Reviewed-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://patch.msgid.link/20250122100917.49845-3-mrpre@163.com include/linux/skmsg.h | 2 ++ include/net/tcp.h | 8 ++++++++ net/core/skmsg.c | 7 +++++++ net/ipv4/tcp.c | 29 ++++++++++++++++++++++++----- net/ipv4/tcp_bpf.c | 36 ++++++++++++++++++++++++++++++++++++ 5 files changed, 77 insertions(+), 5 deletions(-) commit 0532a79efd68a4d9686b0385e4993af4b130ff82 Author: Jiayuan Chen Date: Wed Jan 22 18:09:13 2025 +0800 strparser: Add read_sock callback Added a new read_sock handler, allowing users to customize read operations instead of relying on the native socket's read_sock. Signed-off-by: Jiayuan Chen Signed-off-by: Martin KaFai Lau Reviewed-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://patch.msgid.link/20250122100917.49845-2-mrpre@163.com Documentation/networking/strparser.rst | 9 ++++++++- include/net/strparser.h | 2 ++ net/strparser/strparser.c | 11 +++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) commit 5c61419e02033eaf01733d66e2fcd4044808f482 Author: Fedor Pchelkin Date: Wed Jan 29 00:08:14 2025 +0300 Bluetooth: L2CAP: accept zero as a special value for MTU auto-selection One of the possible ways to enable the input MTU auto-selection for L2CAP connections is supposed to be through passing a special "0" value for it as a socket option. Commit [1] added one of those into avdtp. However, it simply wouldn't work because the kernel still treats the specified value as invalid and denies the setting attempt. Recorded BlueZ logs include the following: bluetoothd[496]: profiles/audio/avdtp.c:l2cap_connect() setsockopt(L2CAP_OPTIONS): Invalid argument (22) [1]: https://github.com/bluez/bluez/commit/ae5be371a9f53fed33d2b34748a95a5498fd4b77 Found by Linux Verification Center (linuxtesting.org). Fixes: 4b6e228e297b ("Bluetooth: Auto tune if input MTU is set to 0") Cc: stable@vger.kernel.org Signed-off-by: Fedor Pchelkin Signed-off-by: Luiz Augusto von Dentz net/bluetooth/l2cap_sock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7de119bb79a63f6a1959b83117a98734914fb0b0 Author: Neeraj Sanjay Kale Date: Mon Jan 20 19:49:46 2025 +0530 Bluetooth: btnxpuart: Fix glitches seen in dual A2DP streaming This fixes a regression caused by previous commit for fixing truncated ACL data, which is causing some intermittent glitches when running two A2DP streams. serdev_device_write_buf() is the root cause of the glitch, which is reverted, and the TX work will continue to write until the queue is empty. This change fixes both issues. No A2DP streaming glitches or truncated ACL data issue observed. Fixes: 8023dd220425 ("Bluetooth: btnxpuart: Fix driver sending truncated data") Fixes: 689ca16e5232 ("Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets") Signed-off-by: Neeraj Sanjay Kale Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btnxpuart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 514a8e6d6152a418da95db942827d5e3ce58613a Author: Hsin-chen Chuang Date: Mon Jan 20 16:47:36 2025 +0800 Bluetooth: Add ABI doc for sysfs reset The functionality was implemented in commit 0f8a00137411 ("Bluetooth: Allow reset via sysfs") Fixes: 0f8a00137411 ("Bluetooth: Allow reset via sysfs") Signed-off-by: Hsin-chen Chuang Signed-off-by: Luiz Augusto von Dentz Documentation/ABI/stable/sysfs-class-bluetooth | 9 +++++++++ MAINTAINERS | 1 + 2 files changed, 10 insertions(+) commit 0983fb4799e78b1783eb5ed0dfe324649c491bb7 Author: Hsin-chen Chuang Date: Mon Jan 20 18:39:39 2025 +0800 Bluetooth: Fix possible infinite recursion of btusb_reset The function enters infinite recursion if the HCI device doesn't support GPIO reset: btusb_reset -> hdev->reset -> vendor_reset -> btusb_reset... btusb_reset shouldn't call hdev->reset after commit f07d478090b0 ("Bluetooth: Get rid of cmd_timeout and use the reset callback") Fixes: f07d478090b0 ("Bluetooth: Get rid of cmd_timeout and use the reset callback") Signed-off-by: Hsin-chen Chuang Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 5 ----- 1 file changed, 5 deletions(-) commit e9087e828827e5a5c85e124ce77503f2b81c3491 Author: Douglas Anderson Date: Wed Jan 15 19:36:36 2025 -0800 Bluetooth: btusb: mediatek: Add locks for usb_driver_claim_interface() The documentation for usb_driver_claim_interface() says that "the device lock" is needed when the function is called from places other than probe(). This appears to be the lock for the USB interface device. The Mediatek btusb code gets called via this path: Workqueue: hci0 hci_power_on [bluetooth] Call trace: usb_driver_claim_interface btusb_mtk_claim_iso_intf btusb_mtk_setup hci_dev_open_sync hci_power_on process_scheduled_works worker_thread kthread With the above call trace the device lock hasn't been claimed. Claim it. Without this fix, we'd sometimes see the error "Failed to claim iso interface". Sometimes we'd even see worse errors, like a NULL pointer dereference (where `intf->dev.driver` was NULL) with a trace like: Call trace: usb_suspend_both usb_runtime_suspend __rpm_callback rpm_suspend pm_runtime_work process_scheduled_works Both errors appear to be fixed with the proper locking. Fixes: ceac1cb0259d ("Bluetooth: btusb: mediatek: add ISO data transmission functions") Signed-off-by: Douglas Anderson Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 79fc672a092d93a7eac24fe20a571d4efd8fa5a4 Author: Haoxiang Li Date: Thu Dec 19 17:02:56 2024 +0800 drm/komeda: Add check for komeda_get_layer_fourcc_list() Add check for the return value of komeda_get_layer_fourcc_list() to catch the potential exception. Fixes: 5d51f6c0da1b ("drm/komeda: Add writeback support") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li Acked-by: Liviu Dudau Link: https://lore.kernel.org/r/20241219090256.146424-1-haoxiang_li2024@163.com Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c | 4 ++++ 1 file changed, 4 insertions(+) commit 07e0d99a2f701123ad3104c0f1a1e66bce74d6e5 Author: Chengen Du Date: Tue Jan 14 12:12:34 2025 +0800 iscsi_ibft: Fix UBSAN shift-out-of-bounds warning in ibft_attr_show_nic() When performing an iSCSI boot using IPv6, iscsistart still reads the /sys/firmware/ibft/ethernetX/subnet-mask entry. Since the IPv6 prefix length is 64, this causes the shift exponent to become negative, triggering a UBSAN warning. As the concept of a subnet mask does not apply to IPv6, the value is set to ~0 to suppress the warning message. Signed-off-by: Chengen Du Signed-off-by: Konrad Rzeszutek Wilk drivers/firmware/iscsi_ibft.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e1e17a1715982201034024863efbf238bee2bdf9 Author: Prasad Pandit Date: Mon Mar 11 16:21:22 2024 +0530 firmware: iscsi_ibft: fix ISCSI_IBFT Kconfig entry Fix ISCSI_IBFT Kconfig entry, replace tab with a space character. Fixes: 138fe4e0697 ("Firmware: add iSCSI iBFT Support") Signed-off-by: Prasad Pandit Signed-off-by: Konrad Rzeszutek Wilk drivers/firmware/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebbb8be421eefbe2d47b99c2e1a6dd840d7930f9 Merge: b2091a64820f 155c569fa4c3 Author: Linus Torvalds Date: Wed Jan 29 11:56:55 2025 -0800 Merge tag 'regulator-fix-v6.14-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A couple of fixes that have come in during the merge window: one that operates the TPS6287x devices more within the design spec and can prevent current surges when changing voltages and another more trivial one for error message formatting" * tag 'regulator-fix-v6.14-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: core: Add missing newline character regulator: TPS6287X: Use min/max uV to get VRANGE commit b2091a64820f068dd19b7dd5351d8095adb3e5f6 Merge: 9071080d1e7a bda50f7770e5 Author: Linus Torvalds Date: Wed Jan 29 11:39:20 2025 -0800 Merge tag 'for-linus-6.14-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: "Three minor fixes" * tag 'for-linus-6.14-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: update pvcalls_front_accept prototype Grab mm lock before grabbing pt lock xen: pcpu: remove unnecessary __ref annotation commit 9071080d1e7af1a3a1699c3ba065c3293b5d09ce Merge: aa5216a2b065 448a60e85ae2 Author: Linus Torvalds Date: Wed Jan 29 11:23:22 2025 -0800 Merge tag 'cxl-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull Compute Express Link (CXL) updates from Dave Jiang: "A tweak to the HMAT output that was acked by Rafael, a prep patch for CXL type2 devices support that's coming soon, refactoring of the CXL regblock enumeration code, and a series of patches to update the event records to CXL spec r3.1: - Move HMAT printouts to pr_debug() - Add CXL type2 support to cxl_dvsec_rr_decode() in preparation for type2 support - A series that updates CXL event records to spec r3.1 and related changes - Refactoring of cxl_find_regblock_instance() to count regblocks" * tag 'cxl-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: cxl/core/regs: Refactor out functions to count regblocks of given type cxl/test: Update test code for event records to CXL spec rev 3.1 cxl/events: Update Memory Module Event Record to CXL spec rev 3.1 cxl/events: Update DRAM Event Record to CXL spec rev 3.1 cxl/events: Update General Media Event Record to CXL spec rev 3.1 cxl/events: Add Component Identifier formatting for CXL spec rev 3.1 cxl/events: Update Common Event Record to CXL spec rev 3.1 cxl/pci: Add CXL Type 1/2 support to cxl_dvsec_rr_decode() ACPI/HMAT: Move HMAT messages to pr_debug() commit aa5216a2b06594c558942d491cf71af76d34521e Merge: fed3819bac88 17391cb2613b Author: Linus Torvalds Date: Wed Jan 29 10:55:04 2025 -0800 Merge tag 'powerpc-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Madhavan Srinivasan: - Fix to handle PE state in pseries_eeh_get_state() - Handle unset of tce window if it was never set Thanks to Narayana Murty N, Ritesh Harjani (IBM), Shivaprasad G Bhat, and Vaishnavi Bhat. * tag 'powerpc-6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/pseries/iommu: Don't unset window if it was never set powerpc/pseries/eeh: Fix get PE state translation commit fed3819bac88835b54c68a15ba41d95151ebaf12 Merge: af13ff1c33e0 5e3c1c48fac3 Author: Linus Torvalds Date: Wed Jan 29 10:50:28 2025 -0800 Merge tag 'crc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux Pull CRC cleanups from Eric Biggers: "Simplify the kconfig options for controlling which CRC implementations are built into the kernel, as was requested by Linus. This means making the option to disable the arch code visible only when CONFIG_EXPERT=y, and standardizing on a single generic implementation of CRC32" * tag 'crc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux: lib/crc32: remove other generic implementations lib/crc: simplify the kconfig options for CRC implementations commit af13ff1c33e043b746cd96c83c7660ddf0272f73 Merge: 92cc9acff719 1751f872cc97 Author: Linus Torvalds Date: Wed Jan 29 10:35:40 2025 -0800 Merge tag 'constfy-sysctl-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl Pull sysctl table constification from Joel Granados: "All ctl_table declared outside of functions and that remain unmodified after initialization are const qualified. This prevents unintended modifications to proc_handler function pointers by placing them in the .rodata section. This is a continuation of the tree-wide effort started a few releases ago with the constification of the ctl_table struct arguments in the sysctl API done in 78eb4ea25cd5 ("sysctl: treewide: constify the ctl_table argument of proc_handlers")" * tag 'constfy-sysctl-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl: treewide: const qualify ctl_tables where applicable commit bc27c52eea189e8f7492d40739b7746d67b65beb Author: Andrii Nakryiko Date: Tue Jan 28 17:22:46 2025 -0800 bpf: avoid holding freeze_mutex during mmap operation We use map->freeze_mutex to prevent races between map_freeze() and memory mapping BPF map contents with writable permissions. The way we naively do this means we'll hold freeze_mutex for entire duration of all the mm and VMA manipulations, which is completely unnecessary. This can potentially also lead to deadlocks, as reported by syzbot in [0]. So, instead, hold freeze_mutex only during writeability checks, bump (proactively) "write active" count for the map, unlock the mutex and proceed with mmap logic. And only if something went wrong during mmap logic, then undo that "write active" counter increment. [0] https://lore.kernel.org/bpf/678dcbc9.050a0220.303755.0066.GAE@google.com/ Fixes: fc9702273e2e ("bpf: Add mmap() support for BPF_MAP_TYPE_ARRAY") Reported-by: syzbot+4dc041c686b7c816a71e@syzkaller.appspotmail.com Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20250129012246.1515826-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov kernel/bpf/syscall.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 98671a0fd1f14e4a518ee06b19037c20014900eb Author: Andrii Nakryiko Date: Tue Jan 28 17:22:45 2025 -0800 bpf: unify VM_WRITE vs VM_MAYWRITE use in BPF map mmaping logic For all BPF maps we ensure that VM_MAYWRITE is cleared when memory-mapping BPF map contents as initially read-only VMA. This is because in some cases BPF verifier relies on the underlying data to not be modified afterwards by user space, so once something is mapped read-only, it shouldn't be re-mmap'ed as read-write. As such, it's not necessary to check VM_MAYWRITE in bpf_map_mmap() and map->ops->map_mmap() callbacks: VM_WRITE should be consistently set for read-write mappings, and if VM_WRITE is not set, there is no way for user space to upgrade read-only mapping to read-write one. This patch cleans up this VM_WRITE vs VM_MAYWRITE handling within bpf_map_mmap(), which is an entry point for any BPF map mmap()-ing logic. We also drop unnecessary sanitization of VM_MAYWRITE in BPF ringbuf's map_mmap() callback implementation, as it is already performed by common code in bpf_map_mmap(). Note, though, that in bpf_map_mmap_{open,close}() callbacks we can't drop VM_MAYWRITE use, because it's possible (and is outside of subsystem's control) to have initially read-write memory mapping, which is subsequently dropped to read-only by user space through mprotect(). In such case, from BPF verifier POV it's read-write data throughout the lifetime of BPF map, and is counted as "active writer". But its VMAs will start out as VM_WRITE|VM_MAYWRITE, then mprotect() can change it to just VM_MAYWRITE (and no VM_WRITE), so when its finally munmap()'ed and bpf_map_mmap_close() is called, vm_flags will be just VM_MAYWRITE, but we still need to decrement active writer count with bpf_map_write_active_dec() as it's still considered to be a read-write mapping by the rest of BPF subsystem. Similar reasoning applies to bpf_map_mmap_open(), which is called whenever mmap(), munmap(), and/or mprotect() forces mm subsystem to split original VMA into multiple discontiguous VMAs. Memory-mapping handling is a bit tricky, yes. Cc: Jann Horn Cc: Suren Baghdasaryan Cc: Shakeel Butt Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20250129012246.1515826-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov kernel/bpf/ringbuf.c | 4 ---- kernel/bpf/syscall.c | 10 ++++++++-- 2 files changed, 8 insertions(+), 6 deletions(-) commit 92cc9acff7194b1b9db078901f2a83182bb73202 Merge: 27560b371ab8 2d4fde59fd50 Author: Linus Torvalds Date: Wed Jan 29 09:40:23 2025 -0800 Merge tag 'fuse-update-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse updates from Miklos Szeredi: "Add support for io-uring communication between kernel and userspace using IORING_OP_URING_CMD (Bernd Schubert). Following features enable gains in performance compared to the regular interface: - Allow processing multiple requests with less syscall overhead - Combine commit of old and fetch of new fuse request - CPU/NUMA affinity of queues Patches were reviewed by several people, including Pavel Begunkov, io-uring co-maintainer" * tag 'fuse-update-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: prevent disabling io-uring on active connections fuse: enable fuse-over-io-uring fuse: block request allocation until io-uring init is complete fuse: {io-uring} Prevent mount point hang on fuse-server termination fuse: Allow to queue bg requests through io-uring fuse: Allow to queue fg requests through io-uring fuse: {io-uring} Make fuse_dev_queue_{interrupt,forget} non-static fuse: {io-uring} Handle teardown of ring entries fuse: Add io-uring sqe commit and fetch support fuse: {io-uring} Make hash-list req unique finding functions non-static fuse: Add fuse-io-uring handling into fuse_copy fuse: Make fuse_copy non static fuse: {io-uring} Handle SQEs - register commands fuse: make args->in_args[0] to be always the header fuse: Add fuse-io-uring design documentation fuse: Move request bits fuse: Move fuse_get_dev to header file fuse: rename to fuse_dev_end_requests and make non-static commit 5e3c1c48fac3793c173567df735890d4e29cbb64 Author: Eric Biggers Date: Thu Jan 23 13:29:04 2025 -0800 lib/crc32: remove other generic implementations Now that we've standardized on the byte-by-byte implementation of CRC32 as the only generic implementation (see previous commit for the rationale), remove the code for the other implementations. Tested with crc_kunit. Link: https://lore.kernel.org/r/20250123212904.118683-3-ebiggers@kernel.org Reviewed-by: Ard Biesheuvel Reviewed-by: Martin K. Petersen Signed-off-by: Eric Biggers lib/Kconfig | 4 - lib/crc32.c | 225 +++------------------------------------------------ lib/crc32defs.h | 59 -------------- lib/gen_crc32table.c | 113 +++++++------------------- 4 files changed, 40 insertions(+), 361 deletions(-) commit b0430f39de089920e3aab3f4a9c35c35110bdbea Author: Eric Biggers Date: Thu Jan 23 13:29:03 2025 -0800 lib/crc: simplify the kconfig options for CRC implementations Make the following simplifications to the kconfig options for choosing CRC implementations for CRC32 and CRC_T10DIF: 1. Make the option to disable the arch-optimized code be visible only when CONFIG_EXPERT=y. 2. Make a single option control the inclusion of the arch-optimized code for all enabled CRC variants. 3. Make CRC32_SARWATE (a.k.a. slice-by-1 or byte-by-byte) be the only generic CRC32 implementation. The result is there is now just one option, CRC_OPTIMIZATIONS, which is default y and can be disabled only when CONFIG_EXPERT=y. Rationale: 1. Enabling the arch-optimized code is nearly always the right choice. However, people trying to build the tiniest kernel possible would find some use in disabling it. Anything we add to CRC32 is de facto unconditional, given that CRC32 gets selected by something in nearly all kernels. And unfortunately enabling the arch CRC code does not eliminate the need to build the generic CRC code into the kernel too, due to CPU feature dependencies. The size of the arch CRC code will also increase slightly over time as more CRC variants get added and more implementations targeting different instruction set extensions get added. Thus, it seems worthwhile to still provide an option to disable it, but it should be considered an expert-level tweak. 2. Considering the use case described in (1), there doesn't seem to be sufficient value in making the arch-optimized CRC code be independently configurable for different CRC variants. Note also that multiple variants were already grouped together, e.g. CONFIG_CRC32 actually enables three different variants of CRC32. 3. The bit-by-bit implementation is uselessly slow, whereas slice-by-n for n=4 and n=8 use tables that are inconveniently large: 4096 bytes and 8192 bytes respectively, compared to 1024 bytes for n=1. Higher n gives higher instruction-level parallelism, so higher n easily wins on traditional microbenchmarks on most CPUs. However, the larger tables, which are accessed randomly, can be harmful in real-world situations where the dcache may be cold or useful data may need be evicted from the dcache. Meanwhile, today most architectures have much faster CRC32 implementations using dedicated CRC32 instructions or carryless multiplication instructions anyway, which make the generic code obsolete in most cases especially on long messages. Another reason for going with n=1 is that this is already what is used by all the other CRC variants in the kernel. CRC32 was unique in having support for larger tables. But as per the above this can be considered an outdated optimization. The standardization on slice-by-1 a.k.a. CRC32_SARWATE makes much of the code in lib/crc32.c unused. A later patch will clean that up. Link: https://lore.kernel.org/r/20250123212904.118683-2-ebiggers@kernel.org Reviewed-by: Ard Biesheuvel Reviewed-by: Martin K. Petersen Signed-off-by: Eric Biggers lib/Kconfig | 116 ++++++++---------------------------------------------------- 1 file changed, 14 insertions(+), 102 deletions(-) commit 27560b371ab82c1894d048aef0d113acb093f67f Author: Christoph Hellwig Date: Wed Jan 29 07:37:57 2025 +0100 fs: pack struct kstat better Move the change_cookie and subvol up to avoid two 4 byte holes. Signed-off-by: Christoph Hellwig Signed-off-by: Linus Torvalds include/linux/stat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c7f2188d68c114095660a950b7e880a1e5a71c8f Author: Shigeru Yoshida Date: Wed Jan 22 00:06:43 2025 +0900 selftests/bpf: Adjust data size to have ETH_HLEN The function bpf_test_init() now returns an error if user_size (.data_size_in) is less than ETH_HLEN, causing the tests to fail. Adjust the data size to ensure it meets the requirement of ETH_HLEN. Signed-off-by: Shigeru Yoshida Signed-off-by: Martin KaFai Lau Link: https://patch.msgid.link/20250121150643.671650-2-syoshida@redhat.com Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/xdp_cpumap_attach.c | 4 ++-- tools/testing/selftests/bpf/prog_tests/xdp_devmap_attach.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 6b3d638ca897e099fa99bd6d02189d3176f80a47 Author: Shigeru Yoshida Date: Wed Jan 22 00:06:42 2025 +0900 bpf, test_run: Fix use-after-free issue in eth_skb_pkt_type() KMSAN reported a use-after-free issue in eth_skb_pkt_type()[1]. The cause of the issue was that eth_skb_pkt_type() accessed skb's data that didn't contain an Ethernet header. This occurs when bpf_prog_test_run_xdp() passes an invalid value as the user_data argument to bpf_test_init(). Fix this by returning an error when user_data is less than ETH_HLEN in bpf_test_init(). Additionally, remove the check for "if (user_size > size)" as it is unnecessary. [1] BUG: KMSAN: use-after-free in eth_skb_pkt_type include/linux/etherdevice.h:627 [inline] BUG: KMSAN: use-after-free in eth_type_trans+0x4ee/0x980 net/ethernet/eth.c:165 eth_skb_pkt_type include/linux/etherdevice.h:627 [inline] eth_type_trans+0x4ee/0x980 net/ethernet/eth.c:165 __xdp_build_skb_from_frame+0x5a8/0xa50 net/core/xdp.c:635 xdp_recv_frames net/bpf/test_run.c:272 [inline] xdp_test_run_batch net/bpf/test_run.c:361 [inline] bpf_test_run_xdp_live+0x2954/0x3330 net/bpf/test_run.c:390 bpf_prog_test_run_xdp+0x148e/0x1b10 net/bpf/test_run.c:1318 bpf_prog_test_run+0x5b7/0xa30 kernel/bpf/syscall.c:4371 __sys_bpf+0x6a6/0xe20 kernel/bpf/syscall.c:5777 __do_sys_bpf kernel/bpf/syscall.c:5866 [inline] __se_sys_bpf kernel/bpf/syscall.c:5864 [inline] __x64_sys_bpf+0xa4/0xf0 kernel/bpf/syscall.c:5864 x64_sys_call+0x2ea0/0x3d90 arch/x86/include/generated/asm/syscalls_64.h:322 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd9/0x1d0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Uninit was created at: free_pages_prepare mm/page_alloc.c:1056 [inline] free_unref_page+0x156/0x1320 mm/page_alloc.c:2657 __free_pages+0xa3/0x1b0 mm/page_alloc.c:4838 bpf_ringbuf_free kernel/bpf/ringbuf.c:226 [inline] ringbuf_map_free+0xff/0x1e0 kernel/bpf/ringbuf.c:235 bpf_map_free kernel/bpf/syscall.c:838 [inline] bpf_map_free_deferred+0x17c/0x310 kernel/bpf/syscall.c:862 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa2b/0x1b60 kernel/workqueue.c:3310 worker_thread+0xedf/0x1550 kernel/workqueue.c:3391 kthread+0x535/0x6b0 kernel/kthread.c:389 ret_from_fork+0x6e/0x90 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 CPU: 1 UID: 0 PID: 17276 Comm: syz.1.16450 Not tainted 6.12.0-05490-g9bb88c659673 #8 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-3.fc41 04/01/2014 Fixes: be3d72a2896c ("bpf: move user_size out of bpf_test_init") Reported-by: syzkaller Suggested-by: Martin KaFai Lau Signed-off-by: Shigeru Yoshida Signed-off-by: Martin KaFai Lau Acked-by: Stanislav Fomichev Acked-by: Daniel Borkmann Link: https://patch.msgid.link/20250121150643.671650-1-syoshida@redhat.com Signed-off-by: Alexei Starovoitov net/bpf/test_run.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 7332537962956fab2c055b37e5e2e6a0d2a8d6bf Author: Jared Kangas Date: Tue Jan 21 06:25:04 2025 -0800 bpf: Remove unnecessary BTF lookups in bpf_sk_storage_tracing_allowed When loading BPF programs, bpf_sk_storage_tracing_allowed() does a series of lookups to get a type name from the program's attach_btf_id, making the assumption that the type is present in the vmlinux BTF along the way. However, this results in btf_type_by_id() returning a null pointer if a non-vmlinux kernel BTF is attached to. Proof-of-concept on a kernel with CONFIG_IPV6=m: $ cat bpfcrash.c #include #include #include static int bpf(enum bpf_cmd cmd, union bpf_attr *attr) { return syscall(__NR_bpf, cmd, attr, sizeof(*attr)); } int main(void) { const int btf_fd = bpf(BPF_BTF_GET_FD_BY_ID, &(union bpf_attr) { .btf_id = BTF_ID, }); if (btf_fd < 0) return 1; const int bpf_sk_storage_get = 107; const struct bpf_insn insns[] = { { .code = BPF_JMP | BPF_CALL, .imm = bpf_sk_storage_get}, { .code = BPF_JMP | BPF_EXIT }, }; return bpf(BPF_PROG_LOAD, &(union bpf_attr) { .prog_type = BPF_PROG_TYPE_TRACING, .expected_attach_type = BPF_TRACE_FENTRY, .license = (unsigned long)"GPL", .insns = (unsigned long)&insns, .insn_cnt = sizeof(insns) / sizeof(insns[0]), .attach_btf_obj_fd = btf_fd, .attach_btf_id = TYPE_ID, }); } $ sudo bpftool btf list | grep ipv6 2: name [ipv6] size 928200B $ sudo bpftool btf dump id 2 | awk '$3 ~ /inet6_sock_destruct/' [130689] FUNC 'inet6_sock_destruct' type_id=130677 linkage=static $ gcc -D_DEFAULT_SOURCE -DBTF_ID=2 -DTYPE_ID=130689 \ bpfcrash.c -o bpfcrash $ sudo ./bpfcrash This causes a null pointer dereference: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 Call trace: bpf_sk_storage_tracing_allowed+0x8c/0xb0 P check_helper_call.isra.0+0xa8/0x1730 do_check+0xa18/0xb40 do_check_common+0x140/0x640 bpf_check+0xb74/0xcb8 bpf_prog_load+0x598/0x9a8 __sys_bpf+0x580/0x980 __arm64_sys_bpf+0x28/0x40 invoke_syscall.constprop.0+0x54/0xe8 do_el0_svc+0xb4/0xd0 el0_svc+0x44/0x1f8 el0t_64_sync_handler+0x13c/0x160 el0t_64_sync+0x184/0x188 Resolve this by using prog->aux->attach_func_name and removing the lookups. Fixes: 8e4597c627fb ("bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP") Suggested-by: Martin KaFai Lau Signed-off-by: Jared Kangas Signed-off-by: Martin KaFai Lau Link: https://patch.msgid.link/20250121142504.1369436-1-jkangas@redhat.com Signed-off-by: Alexei Starovoitov net/core/bpf_sk_storage.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit b9a49520679e98700d3d89689cc91c08a1c88c1d Author: Thomas Gleixner Date: Sun Jan 19 00:55:32 2025 +0100 rcuref: Plug slowpath race in rcuref_put() Kernel test robot reported an "imbalanced put" in the rcuref_put() slow path, which turned out to be a false positive. Consider the following race: ref = 0 (via rcuref_init(ref, 1)) T1 T2 rcuref_put(ref) -> atomic_add_negative_release(-1, ref) # ref -> 0xffffffff -> rcuref_put_slowpath(ref) rcuref_get(ref) -> atomic_add_negative_relaxed(1, &ref->refcnt) -> return true; # ref -> 0 rcuref_put(ref) -> atomic_add_negative_release(-1, ref) # ref -> 0xffffffff -> rcuref_put_slowpath() -> cnt = atomic_read(&ref->refcnt); # cnt -> 0xffffffff / RCUREF_NOREF -> atomic_try_cmpxchg_release(&ref->refcnt, &cnt, RCUREF_DEAD)) # ref -> 0xe0000000 / RCUREF_DEAD -> return true -> cnt = atomic_read(&ref->refcnt); # cnt -> 0xe0000000 / RCUREF_DEAD -> if (cnt > RCUREF_RELEASED) # 0xe0000000 > 0xc0000000 -> WARN_ONCE(cnt >= RCUREF_RELEASED, "rcuref - imbalanced put()") The problem is the additional read in the slow path (after it decremented to RCUREF_NOREF) which can happen after the counter has been marked RCUREF_DEAD. Prevent this by reusing the return value of the decrement. Now every "final" put uses RCUREF_NOREF in the slow path and attempts the final cmpxchg() to RCUREF_DEAD. [ bigeasy: Add changelog ] Fixes: ee1ee6db07795 ("atomics: Provide rcuref - scalable reference counting") Reported-by: kernel test robot Debugged-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Reviewed-by: Sebastian Andrzej Siewior Cc: stable@vger.kernel.org Closes: https://lore.kernel.org/oe-lkp/202412311453.9d7636a2-lkp@intel.com include/linux/rcuref.h | 9 ++++++--- lib/rcuref.c | 5 ++--- 2 files changed, 8 insertions(+), 6 deletions(-) commit 14ef49657ff3b7156952b2eadcf2e5bafd735795 Author: Nilay Shroff Date: Tue Jan 28 20:04:14 2025 +0530 block: fix nr_hw_queue update racing with disk addition/removal The nr_hw_queue update could potentially race with disk addtion/removal while registering/unregistering hctx sysfs files. The __blk_mq_update_ nr_hw_queues() runs with q->tag_list_lock held and so to avoid it racing with disk addition/removal we should acquire q->tag_list_lock while registering/unregistering hctx sysfs files. With this patch, blk_mq_sysfs_register() (called during disk addition) and blk_mq_sysfs_unregister() (called during disk removal) now runs with q->tag_list_lock held so that it avoids racing with __blk_mq_update _nr_hw_queues(). Signed-off-by: Nilay Shroff Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20250128143436.874357-3-nilay@linux.ibm.com Signed-off-by: Jens Axboe block/blk-mq-sysfs.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit fe6628608627424fb4a6d4c8d2235822457c5d9c Author: Nilay Shroff Date: Tue Jan 28 20:04:13 2025 +0530 block: get rid of request queue ->sysfs_dir_lock The request queue uses ->sysfs_dir_lock for protecting the addition/ deletion of kobject entries under sysfs while we register/unregister blk-mq. However kobject addition/deletion is already protected with kernfs/sysfs internal synchronization primitives. So use of q->sysfs_ dir_lock seems redundant. Moreover, q->sysfs_dir_lock is also used at few other callsites along with q->sysfs_lock for protecting the addition/deletion of kojects. One such example is when we register with sysfs a set of independent access ranges for a disk. Here as well we could get rid off q->sysfs_ dir_lock and only use q->sysfs_lock. The only variable which q->sysfs_dir_lock appears to protect is q-> mq_sysfs_init_done which is set/unset while registering/unregistering blk-mq with sysfs. But use of q->mq_sysfs_init_done could be easily replaced using queue registered bit QUEUE_FLAG_REGISTERED. So with this patch we remove q->sysfs_dir_lock from each callsite and replace q->mq_sysfs_init_done using QUEUE_FLAG_REGISTERED. Reviewed-by: Christoph Hellwig Signed-off-by: Nilay Shroff Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20250128143436.874357-2-nilay@linux.ibm.com Signed-off-by: Jens Axboe block/blk-core.c | 1 - block/blk-ia-ranges.c | 4 ---- block/blk-mq-sysfs.c | 23 +++++------------------ block/blk-sysfs.c | 5 ----- include/linux/blkdev.h | 3 --- 5 files changed, 5 insertions(+), 31 deletions(-) commit b999589956dd3ae096b7d67b6fee4e9989a2e430 Author: Masami Hiramatsu (Google) Date: Wed Jan 29 00:29:48 2025 +0900 s390/tracing: Define ftrace_get_symaddr() for s390 Add ftrace_get_symaddr() for s390, which returns the symbol address from ftrace's 'ip' parameter. Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Heiko Carstens Link: https://lore.kernel.org/r/173807818869.1854334.15474589105952793986.stgit@devnote2 Signed-off-by: Alexander Gordeev arch/s390/include/asm/ftrace.h | 1 + 1 file changed, 1 insertion(+) commit 95a05bf552adcb665af57b2958506a4395ab2f5e Author: Masami Hiramatsu (Google) Date: Wed Jan 29 00:29:37 2025 +0900 s390/fgraph: Fix to remove ftrace_test_recursion_trylock() Fix to remove ftrace_test_recursion_trylock() from ftrace_graph_func() because commit d576aec24df9 ("fgraph: Get ftrace recursion lock in function_graph_enter") has been moved it to function_graph_enter_regs() already. Reported-by: Jiri Olsa Closes: https://lore.kernel.org/all/Z5O0shrdgeExZ2kF@krava/ Fixes: d576aec24df9 ("fgraph: Get ftrace recursion lock in function_graph_enter") Signed-off-by: Masami Hiramatsu (Google) Tested-by: Jiri Olsa Tested-by: Ihor Solodrai Reviewed-by: Heiko Carstens Link: https://lore.kernel.org/r/173807817692.1854334.2985776940754607459.stgit@devnote2 Signed-off-by: Alexander Gordeev arch/s390/kernel/ftrace.c | 5 ----- 1 file changed, 5 deletions(-) commit 86d0d3ee07de37d51764c62473f4bb58ef88badc Merge: 3b4309546b48 6c1bb4031729 Author: Takashi Iwai Date: Wed Jan 29 14:39:55 2025 +0100 Merge tag 'asoc-fix-v6.14-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.14 A bunch of fixes that came in during the merge window, plus a few new device IDs. The i.MX changes are a little large since they add some new quirk data as well as device IDs, and the audio graph card change for picking the correct endpoint for links is large due to updating a number of call sites. commit 87f017d0792befa83722b99cb21f9c8f574cd71d Author: Heiko Carstens Date: Fri Jan 24 14:51:54 2025 +0100 s390/vmlogrdr: Use array instead of string initializer Compiling vmlogrdr with GCC 15 generates this warning: CC [M] drivers/s390/char/vmlogrdr.o drivers/s390/char/vmlogrdr.c:126:29: error: initializer-string for array of ‘char’ is too long [-Werror=unterminated-string-initialization] 126 | { .system_service = "*LOGREC ", Given that the system_service array intentionally contains a non-null terminated string use an array initializer, instead of string initializer to get rid of this warning. Reviewed-by: Gerald Schaefer Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev drivers/s390/char/vmlogrdr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 76bda8a16d77063cffea9fc4e3ead033afba9d6d Author: Heiko Carstens Date: Fri Jan 24 14:51:53 2025 +0100 s390/vmlogrdr: Use internal_name for error messages Use the internal_name member of vmlogrdr_priv_t to print error messages instead of the system_service member. The system_service member is not a string, but a non-null terminated eight byte character array, which contains the ASCII representation of a z/VM system service. Reviewed-by: Gerald Schaefer Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev drivers/s390/char/vmlogrdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3775fc538f535a7c5adaf11990c7932a0bd1f9eb Author: Rafael J. Wysocki Date: Tue Jan 28 20:24:41 2025 +0100 PM: sleep: core: Synchronize runtime PM status of parents and children Commit 6e176bf8d461 ("PM: sleep: core: Do not skip callbacks in the resume phase") overlooked the case in which the parent of a device with DPM_FLAG_SMART_SUSPEND set did not use that flag and could be runtime- suspended before a transition into a system-wide sleep state. In that case, if the child is resumed during the subsequent transition from that state into the working state, its runtime PM status will be set to RPM_ACTIVE, but the runtime PM status of the parent will not be updated accordingly, even though the parent will be resumed too, because of the dev_pm_skip_suspend() check in device_resume_noirq(). Address this problem by tracking the need to set the runtime PM status to RPM_ACTIVE during system-wide resume transitions for devices with DPM_FLAG_SMART_SUSPEND set and all of the devices depended on by them. Fixes: 6e176bf8d461 ("PM: sleep: core: Do not skip callbacks in the resume phase") Closes: https://lore.kernel.org/linux-pm/Z30p2Etwf3F2AUvD@hovoldconsulting.com/ Reported-by: Johan Hovold Tested-by: Manivannan Sadhasivam Signed-off-by: Rafael J. Wysocki Reviewed-by: Johan Hovold Tested-by: Johan Hovold Link: https://patch.msgid.link/12619233.O9o76ZdvQC@rjwysocki.net drivers/base/power/main.c | 29 ++++++++++++++++++++--------- include/linux/pm.h | 1 + 2 files changed, 21 insertions(+), 9 deletions(-) commit b865a8404642279e53644fc7288d172afd6a170e Author: Viresh Kumar Date: Tue Jan 28 13:21:23 2025 +0530 cpufreq: airoha: Depends on OF The Airoha cpufreq depends on OF and must be marked as such. With the kernel compiled without OF support, we get following warning: drivers/cpufreq/airoha-cpufreq.c:109:34: warning: 'airoha_cpufreq_match_list' defined but not used [-Wunused-const-variable=] 109 | static const struct of_device_id airoha_cpufreq_match_list[] __initconst = { | ^~~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501251941.0fXlcd1D-lkp@intel.com/ Signed-off-by: Viresh Kumar Link: https://patch.msgid.link/455e18c947bd9529701a2f1c796f0f934d1354d7.1738050679.git.viresh.kumar@linaro.org Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97274527e8dc709bbb4c7cb44279a12d085da9ef Author: Alexandre Belloni Date: Mon Jan 27 17:27:28 2025 +0100 rtc: pcf2127: add BSM support The pcf2127 encodes BSM, BLD and power fail detection in the same set of bits so it is necessary to do some calculation when changing BSM to keep the rest of the configuration as-is. However, when BSM is disabled, there is no configuration with BLD enabled so this will be lost when coming back to a mode with BSM enabled. Link: https://lore.kernel.org/r/20250127162728.86234-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2127.c | 82 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit 05dbaf8dd8bf537d4b4eb3115ab42a5fb40ff1f5 Merge: b88fe2b5dd01 1105ab42a84b Author: Linus Torvalds Date: Tue Jan 28 14:32:03 2025 -0800 Merge tag 'x86-urgent-2025-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Ingo Molnar: "Fix a potential early boot crash in SEV-SNP guests, where certain config and build environment combinations can generate absolute references to symbols in the early boot code" * tag 'x86-urgent-2025-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sev: Disable jump tables in SEV startup code commit b88fe2b5dd018c2b856fd6c32b82f25033e908d4 Merge: 3673f5be0ec4 6f56971841a1 Author: Linus Torvalds Date: Tue Jan 28 14:23:46 2025 -0800 Merge tag 'nfs-for-6.14-1' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client updates from Anna Schumaker: "New Features: - Enable using direct IO with localio - Added localio related tracepoints Bugfixes: - Sunrpc fixes for working with a very large cl_tasks list - Fix a possible buffer overflow in nfs_sysfs_link_rpc_client() - Fixes for handling reconnections with localio - Fix how the NFS_FSCACHE kconfig option interacts with NETFS_SUPPORT - Fix COPY_NOTIFY xdr_buf size calculations - pNFS/Flexfiles fix for retrying requesting a layout segment for reads - Sunrpc fix for retrying on EKEYEXPIRED error when the TGT is expired Cleanups: - Various other nfs & nfsd localio cleanups - Prepratory patches for async copy improvements that are under development - Make OFFLOAD_CANCEL, LAYOUTSTATS, and LAYOUTERR moveable to other xprts - Add netns inum and srcaddr to debugfs rpc_xprt info" * tag 'nfs-for-6.14-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (28 commits) SUNRPC: do not retry on EKEYEXPIRED when user TGT ticket expired sunrpc: add netns inum and srcaddr to debugfs rpc_xprt info pnfs/flexfiles: retry getting layout segment for reads NFSv4.2: make LAYOUTSTATS and LAYOUTERROR MOVEABLE NFSv4.2: mark OFFLOAD_CANCEL MOVEABLE NFSv4.2: fix COPY_NOTIFY xdr buf size calculation NFS: Rename struct nfs4_offloadcancel_data NFS: Fix typo in OFFLOAD_CANCEL comment NFS: CB_OFFLOAD can return NFS4ERR_DELAY nfs: Make NFS_FSCACHE select NETFS_SUPPORT instead of depending on it nfs: fix incorrect error handling in LOCALIO nfs: probe for LOCALIO when v3 client reconnects to server nfs: probe for LOCALIO when v4 client reconnects to server nfs/localio: remove redundant code and simplify LOCALIO enablement nfs_common: add nfs_localio trace events nfs_common: track all open nfsd_files per LOCALIO nfs_client nfs_common: rename nfslocalio nfs_uuid_lock to nfs_uuids_lock nfsd: nfsd_file_acquire_local no longer returns GC'd nfsd_file nfsd: rename nfsd_serv_ prefixed methods and variables with nfsd_net_ nfsd: update percpu_ref to manage references on nfsd_net ... commit 3673f5be0ec4798089c2c014505e54fc361d3616 Merge: 2ab002c755bf 2bb447540e71 Author: Linus Torvalds Date: Tue Jan 28 14:16:46 2025 -0800 Merge tag 'vfio-v6.14-rc1' of https://github.com/awilliam/linux-vfio Pull vfio updates from Alex Williamson: - Extend vfio-pci 8-byte read/write support to include archs defining CONFIG_GENERIC_IOMAP, such as x86, and remove now extraneous #ifdefs around 64-bit accessors (Ramesh Thomas) - Update vfio-pci shadow ROM handling and allow cached ROM from setup data to be exposed as a functional ROM BAR region when available (Yunxiang Li) - Update nvgrace-gpu vfio-pci variant driver for new Grace Blackwell hardware, conditionalizing the uncached BAR workaround for previous generation hardware based on the presence of a flag in a new DVSEC capability, and include a delay during probe for link training to complete, a new requirement for GB devices (Ankit Agrawal) * tag 'vfio-v6.14-rc1' of https://github.com/awilliam/linux-vfio: vfio/nvgrace-gpu: Add GB200 SKU to the devid table vfio/nvgrace-gpu: Check the HBM training and C2C link status vfio/nvgrace-gpu: Expose the blackwell device PF BAR1 to the VM vfio/nvgrace-gpu: Read dvsec register to determine need for uncached resmem vfio/platform: check the bounds of read/write syscalls vfio/pci: Expose setup ROM at ROM bar when needed vfio/pci: Remove shadow ROM specific code paths vfio/pci: Remove #ifdef iowrite64 and #ifdef ioread64 vfio/pci: Enable iowrite64 and ioread64 for vfio pci commit d1fdab8c06791945d9454fb430951533eba9e175 Author: Pavel Begunkov Date: Tue Jan 28 20:56:16 2025 +0000 io_uring/rw: simplify io_rw_recycle() Instead of freeing iovecs in case of IO_URING_F_UNLOCKED in io_rw_recycle(), leave it be and rely on the core io_uring code to call io_readv_writev_cleanup() later. This way the iovec will get recycled and we can clean up io_rw_recycle() and kill io_rw_iovec_free(). Signed-off-by: Pavel Begunkov Reviewed-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/14f83b112eb40078bea18e15d77a4f99fc981a44.1738087204.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/rw.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 0d124578fed92cadeaca47d734da782beacdc1a7 Author: Pavel Begunkov Date: Tue Jan 28 20:56:15 2025 +0000 io_uring: remove !KASAN guards from cache free Test setups (with KASAN) will avoid !KASAN sections, and so it's not testing paths that would be exercised otherwise. That's bad as to be sure that your code works you now have to specifically test both KASAN and !KASAN configs. Remove !CONFIG_KASAN guards from io_netmsg_cache_free() and io_rw_cache_free(). The free functions should always be getting valid entries, and even though for KASAN iovecs should already be cleared, that's better than skipping the chunks completely. Signed-off-by: Pavel Begunkov Reviewed-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/d6078a51c7137a243f9d00849bc3daa660873209.1738087204.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 2 -- io_uring/rw.c | 2 -- 2 files changed, 4 deletions(-) commit 86e62354eef16993834be5bd218d38ec96c47f16 Author: Pavel Begunkov Date: Tue Jan 28 20:56:14 2025 +0000 io_uring/net: extract io_send_select_buffer() Extract a helper out of io_send() for provided buffer selection to improve readability as it has grown to take too many lines. Signed-off-by: Pavel Begunkov Reviewed-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/26a769cdabd61af7f40c5d88a22469c5ad071796.1738087204.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 87 +++++++++++++++++++++++++++++++++------------------------- 1 file changed, 50 insertions(+), 37 deletions(-) commit 2b350f756b7acf84afab31d65ce6e3d496213ae5 Author: Pavel Begunkov Date: Tue Jan 28 20:56:13 2025 +0000 io_uring/net: clean io_msg_copy_hdr() Put msg->msg_iov into a local variable in io_msg_copy_hdr(), it reads better and clearly shows the used types. Signed-off-by: Pavel Begunkov Reviewed-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/6a5d4f7a96b10e571d6128be010166b3aaf7afd5.1738087204.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit fefcb0dcd02fd34f808e91b13ce25f9847e52eb9 Author: Pavel Begunkov Date: Tue Jan 28 20:56:12 2025 +0000 io_uring/net: make io_net_vec_assign() return void io_net_vec_assign() can only return 0 and it doesn't make sense for it to fail, so make it return void. Signed-off-by: Pavel Begunkov Reviewed-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/7c1a2390c99e17d3ae4e8562063e572d3cdeb164.1738087204.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/net.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d19af0e9366298aa60afc0fb51ffcbd6205edcee Author: Pavel Begunkov Date: Tue Jan 28 20:56:11 2025 +0000 io_uring: add alloc_cache.c Avoid inlining all and everything from alloc_cache.h and move cold bits into a new file. Signed-off-by: Pavel Begunkov Reviewed-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/06984c6cd58e703f7cfae5ab3067912f9f635a06.1738087204.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/Makefile | 2 +- io_uring/alloc_cache.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ io_uring/alloc_cache.h | 44 +++++++++----------------------------------- 3 files changed, 54 insertions(+), 36 deletions(-) commit 16ac51a0a7aa051fd3b82fa077597488b5572d41 Author: Pavel Begunkov Date: Tue Jan 28 20:56:10 2025 +0000 io_uring: dont ifdef io_alloc_cache_kasan() Use IS_ENABLED in io_alloc_cache_kasan() so at least it gets compile tested without KASAN. Signed-off-by: Pavel Begunkov Reviewed-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/35e53e83f6e16478dca0028a64a6cc905dc764d3.1738087204.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/alloc_cache.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 299276502d41cd86376f47b7e087d017eaa0f914 Author: Pavel Begunkov Date: Tue Jan 28 20:56:09 2025 +0000 io_uring: include all deps for alloc_cache.h alloc_cache.h uses types it doesn't declare and thus depends on the order in which it's included. Make it self contained and pull all needed definitions. Signed-off-by: Pavel Begunkov Reviewed-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/39569f3d5b250b4fe78bb609d57f67d3736ebcc4.1738087204.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/alloc_cache.h | 2 ++ 1 file changed, 2 insertions(+) commit 1105ab42a84bc11c62597005f78ccad2434fbd66 Author: Ard Biesheuvel Date: Mon Jan 27 12:43:37 2025 +0100 x86/sev: Disable jump tables in SEV startup code When retpolines and IBT are both disabled, the compiler is free to use jump tables to optimize switch instructions. However, these are emitted by Clang as absolute references into .rodata: jmp *-0x7dfffe90(,%r9,8) R_X86_64_32S .rodata+0x170 Given that this code will execute before that address in .rodata has even been mapped, it is guaranteed to crash a SEV-SNP guest in a way that is difficult to diagnose. So disable jump tables when building this code. It would be better if we could attach this annotation to the __head macro but this appears to be impossible. Reported-by: Linus Torvalds Tested-by: Linus Torvalds Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250127114334.1045857-6-ardb+git@google.com arch/x86/coco/sev/Makefile | 4 ++++ 1 file changed, 4 insertions(+) commit 96720ce8b1fa72659ab03544516ceaad6bd1ebc0 Author: Bagas Sanjaya Date: Wed Jan 22 21:34:56 2025 +0700 docs: power: Fix footnote reference for Toshiba Satellite P10-554 Sphinx reports unreferenced footnote warning on "Video issues with S3 resume" doc: Documentation/power/video.rst:213: WARNING: Footnote [#] is not referenced. [ref.footnote] Fix the warning by separating footnote reference for Toshiba Satellite P10-554 by a space. Fixes: 151f4e2bdc7a ("docs: power: convert docs to ReST and rename to *.rst") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/linux-next/20250122170335.148a23b0@canb.auug.org.au/ Signed-off-by: Bagas Sanjaya Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250122143456.68867-4-bagasdotme@gmail.com Documentation/power/video.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3fdf2ec7da1c3b2ca13d2d3360f37f017558ed84 Author: Bagas Sanjaya Date: Wed Jan 22 21:34:55 2025 +0700 Documentation: ublk: Drop Stefan Hajnoczi's message footnote Sphinx reports unreferenced footnote warning pointing to ubd-control message by Stefan Hajnoczi: Documentation/block/ublk.rst:336: WARNING: Footnote [#] is not referenced. [ref.footnote] Drop the footnote to squash above warning. Signed-off-by: Bagas Sanjaya Fixes: 4093cb5a0634 ("ublk_drv: add mechanism for supporting unprivileged ublk device") Reviewed-by: Stefan Hajnoczi Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250122143456.68867-3-bagasdotme@gmail.com Documentation/block/ublk.rst | 2 -- 1 file changed, 2 deletions(-) commit 7f2b5237e313e39008a85b33ca94ab503a8fdff9 Author: Melissa Wen Date: Mon Jan 27 21:41:10 2025 -0300 drm/amd/display: restore invalid MSA timing check for freesync This restores the original behavior that gets min/max freq from EDID and only set DP/eDP connector as freesync capable if "sink device is capable of rendering incoming video stream without MSA timing parameters", i.e., `allow_invalid_MSA_timing_params` is true. The condition was mistakenly removed by 0159f88a99c9 ("drm/amd/display: remove redundant freesync parser for DP"). CC: Mario Limonciello CC: Alex Hung Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3915 Fixes: 0159f88a99c9 ("drm/amd/display: remove redundant freesync parser for DP") Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 9078a5bfa21e78ae68b6d7c365d1b92f26720c55 Author: Prike Liang Date: Tue Jan 14 11:20:17 2025 +0800 drm/amdkfd: only flush the validate MES contex The following page fault was observed duringthe KFD process release. In this particular error case, the HIP test (./MemcpyPerformance -h) does not require the queue. As a result, the process_context_addr was not assigned when the KFD process was released, ultimately leading to this page fault during the execution of the function kfd_process_dequeue_from_all_devices(). [345962.294891] amdgpu 0000:03:00.0: amdgpu: [gfxhub] page fault (src_id:0 ring:153 vmid:0 pasid:0) [345962.295333] amdgpu 0000:03:00.0: amdgpu: in page starting at address 0x0000000000000000 from client 10 [345962.295775] amdgpu 0000:03:00.0: amdgpu: GCVM_L2_PROTECTION_FAULT_STATUS:0x00000B33 [345962.296097] amdgpu 0000:03:00.0: amdgpu: Faulty UTCL2 client ID: CPC (0x5) [345962.296394] amdgpu 0000:03:00.0: amdgpu: MORE_FAULTS: 0x1 [345962.296633] amdgpu 0000:03:00.0: amdgpu: WALKER_ERROR: 0x1 [345962.296876] amdgpu 0000:03:00.0: amdgpu: PERMISSION_FAULTS: 0x3 [345962.297135] amdgpu 0000:03:00.0: amdgpu: MAPPING_ERROR: 0x1 [345962.297377] amdgpu 0000:03:00.0: amdgpu: RW: 0x0 [345962.297682] amdgpu 0000:03:00.0: amdgpu: [gfxhub] page fault (src_id:0 ring:169 vmid:0 pasid:0) Signed-off-by: Prike Liang Reviewed-by: Jonathan Kim Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f88192d2335b5a911fcfa09338cc00624571ec5e Author: loanchen Date: Wed Jan 15 17:43:29 2025 +0800 drm/amd/display: Correct register address in dcn35 [Why] the offset address of mmCLK5_spll_field_8 was incorrect for dcn35 which causes SSC not to be enabled. Reviewed-by: Charlene Liu Signed-off-by: Lo-An Chen Signed-off-by: Zaeem Mohamed Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 819bf6662b93a5a8b0c396d2c7e7fab6264c9808 Author: Lijo Lazar Date: Wed Jan 22 09:12:41 2025 +0530 drm/amd/pm: Mark MM activity as unsupported Aldebaran doesn't support querying MM activity percentage. Keep the field as 0xFFs to mark it as unsupported. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 1 - 1 file changed, 1 deletion(-) commit 5cda56bd86c455341087dca29c65dc7c87f84340 Author: Kenneth Feng Date: Mon Jan 20 15:33:03 2025 +0800 drm/amd/amdgpu: change the config of cgcg on gfx12 change the config of cgcg on gfx12 Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.12.x drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 11 ----------- 1 file changed, 11 deletions(-) commit f214b7beb00621b983e67ce97477afc3ab4b38f4 Author: Jay Cornwall Date: Thu Jan 16 14:36:39 2025 -0600 drm/amdkfd: Block per-queue reset when halt_if_hws_hang=1 The purpose of halt_if_hws_hang is to preserve GPU state for driver debugging when queue preemption fails. Issuing per-queue reset may kill wavefronts which caused the preemption failure. Signed-off-by: Jay Cornwall Reviewed-by: Jonathan Kim Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.12.x drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f4c9c2cc827d803159730b1da813a0c595969831 Author: Remi Pommarel Date: Tue Jan 28 16:11:06 2025 +0100 batman-adv: Fix incorrect offset in batadv_tt_tvlv_ogm_handler_v1() Since commit 4436df478860 ("batman-adv: Add flex array to struct batadv_tvlv_tt_data"), the introduction of batadv_tvlv_tt_data's flex array member in batadv_tt_tvlv_ogm_handler_v1() put tt_changes at invalid offset. Those TT changes are supposed to be filled from the end of batadv_tvlv_tt_data structure (including vlan_data flexible array), but only the flex array size is taken into account missing completely the size of the fixed part of the structure itself. Fix the tt_change offset computation by using struct_size() instead of flex_array_size() so both flex array member and its container structure sizes are taken into account. Cc: stable@vger.kernel.org Fixes: 4436df478860 ("batman-adv: Add flex array to struct batadv_tvlv_tt_data") Signed-off-by: Remi Pommarel Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/translation-table.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 2ab002c755bfa88777e3f2db884d531f3010736c Merge: f785692ff545 01b3cb620815 Author: Linus Torvalds Date: Tue Jan 28 12:25:12 2025 -0800 Merge tag 'driver-core-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core and debugfs updates from Greg KH: "Here is the big set of driver core and debugfs updates for 6.14-rc1. Included in here is a bunch of driver core, PCI, OF, and platform rust bindings (all acked by the different subsystem maintainers), hence the merge conflict with the rust tree, and some driver core api updates to mark things as const, which will also require some fixups due to new stuff coming in through other trees in this merge window. There are also a bunch of debugfs updates from Al, and there is at least one user that does have a regression with these, but Al is working on tracking down the fix for it. In my use (and everyone else's linux-next use), it does not seem like a big issue at the moment. Here's a short list of the things in here: - driver core rust bindings for PCI, platform, OF, and some i/o functions. We are almost at the "write a real driver in rust" stage now, depending on what you want to do. - misc device rust bindings and a sample driver to show how to use them - debugfs cleanups in the fs as well as the users of the fs api for places where drivers got it wrong or were unnecessarily doing things in complex ways. - driver core const work, making more of the api take const * for different parameters to make the rust bindings easier overall. - other small fixes and updates All of these have been in linux-next with all of the aforementioned merge conflicts, and the one debugfs issue, which looks to be resolved "soon"" * tag 'driver-core-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (95 commits) rust: device: Use as_char_ptr() to avoid explicit cast rust: device: Replace CString with CStr in property_present() devcoredump: Constify 'struct bin_attribute' devcoredump: Define 'struct bin_attribute' through macro rust: device: Add property_present() saner replacement for debugfs_rename() orangefs-debugfs: don't mess with ->d_name octeontx2: don't mess with ->d_parent or ->d_parent->d_name arm_scmi: don't mess with ->d_parent->d_name slub: don't mess with ->d_name sof-client-ipc-flood-test: don't mess with ->d_name qat: don't mess with ->d_name xhci: don't mess with ->d_iname mtu3: don't mess wiht ->d_iname greybus/camera - stop messing with ->d_iname mediatek: stop messing with ->d_iname netdevsim: don't embed file_operations into your structs b43legacy: make use of debugfs_get_aux() b43: stop embedding struct file_operations into their objects carl9170: stop embedding file_operations into their objects ... commit f785692ff545aecb517d2609864e1c6d838329e6 Merge: b2b3379f4c9c c861cac950fb Author: Linus Torvalds Date: Tue Jan 28 11:35:58 2025 -0800 Merge tag 'stop-machine.2025.01.28a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull stop_machine update from Paul McKenney: "Move a misplaced call to rcu_momentary_eqs() from multi_cpu_stop() to ensure that interrupts are disabled as required" * tag 'stop-machine.2025.01.28a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: stop_machine: Fix rcu_momentary_eqs() call in multi_cpu_stop() commit b2b3379f4c9c63309d183891a8a164bb6a29635e Merge: cd45f362fc1f 0e4a19e2bd37 Author: Linus Torvalds Date: Tue Jan 28 11:34:03 2025 -0800 Merge tag 'csd-lock.2025.01.28a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull CSD-lock update from Paul McKenney: "Allow runtime modification of the csd_lock_timeout and panic_on_ipistall module parameters" * tag 'csd-lock.2025.01.28a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: locking/csd-lock: make CSD lock debug tunables writable in /sys commit 3319569bf9d8b4d8c5aaf0d410b620210c4bb317 Merge: 0e9724d0f89e 64a1ba4072b3 Author: Kalle Valo Date: Tue Jan 28 20:18:52 2025 +0200 Merge tag 'ath-current-20250124' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath ath.git patch for v6.14-rc Fix an issue in the ath12k driver where 6 GHz operation no longer works with new firmware. commit 0e9724d0f89e8d77fa683e3129cadaed7c6e609d Author: Aditya Garg Date: Mon Jan 20 16:50:47 2025 +0000 wifi: brcmfmac: use random seed flag for BCM4355 and BCM4364 firmware Before 6.13, random seed to the firmware was given based on the logic whether the device had valid OTP or not, and such devices were found mainly on the T2 and Apple Silicon Macs. In 6.13, the logic was changed, and the device table was used for this purpose, so as to cover the special case of BCM43752 chip. During the transition, the device table for BCM4364 and BCM4355 Wi-Fi chips which had valid OTP was not modified, thus breaking Wi-Fi on these devices. This patch adds does the necessary changes, similar to the ones done for other chips. Fixes: ea11a89c3ac6 ("wifi: brcmfmac: add flag for random seed during firmware download") Cc: stable@vger.kernel.org Signed-off-by: Aditya Garg Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://patch.msgid.link/47E43F07-E11D-478C-86D4-23627154AC7C@live.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd45f362fc1f2d81fa69a19e7f8eca058db3e320 Merge: 58f504efcda5 f6ab7384d554 Author: Linus Torvalds Date: Tue Jan 28 10:11:33 2025 -0800 Merge tag 'bootconfig-fixes-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull bootconfig fix from Masami Hiramatsu: - Fix wrong format specifier: use '%u' for unsigned int * tag 'bootconfig-fixes-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tools/bootconfig: Fix the wrong format specifier commit 9fae5884bb0e3480dbb69314b82ed3d8f8482eef Author: James Clark Date: Wed Dec 18 11:55:51 2024 +0000 perf cpumap: Fix die and cluster IDs Now that filename__read_int() returns -errno instead of -1 these statements need to be updated otherwise error values will be used as die IDs. This appears as a -2 die ID when the platform doesn't export one: $ perf stat --per-core -a -- true S36-D-2-C0 1 9.45 msec cpu-clock And the session topology test fails: $ perf test -vvv topology CPU 0, core 0, socket 36 CPU 1, core 1, socket 36 CPU 2, core 2, socket 36 CPU 3, core 3, socket 36 FAILED tests/topology.c:137 Cpu map - Die ID doesn't match ---- end(-1) ---- 38: Session topology : FAILED! Fixes: 05be17eed774 ("tool api fs: Correctly encode errno for read/write open failures") Reported-by: Thomas Richter Signed-off-by: James Clark Acked-by: Namhyung Kim Link: https://lore.kernel.org/r/20241218115552.912517-1-james.clark@linaro.org Signed-off-by: Namhyung Kim tools/perf/util/cpumap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 58f504efcda54a9079a38203acc088c3354aaa60 Merge: e2ee2e9b1590 f79b163c4231 Author: Linus Torvalds Date: Tue Jan 28 09:55:04 2025 -0800 Merge tag 'tty-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty / serial driver updates from Greg KH: "Here is the tty/serial driver set of changes for 6.14-rc1. Nothing major in here, it was delayed a bit due to a regression found in linux-next which has now been reverted and verified that it is fixed. Other than the reverts, highlights include: - 8250 work to get the nbcon mode working (partially reverted) - altera_jtaguart minor fixes - fsl_lpuart minor updates - sh-sci driver minor updatesa - other tiny driver updates and cleanups All of these have been in linux-next for a while, and now with no reports of problems (thanks to the reverts)" * tag 'tty-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (44 commits) Revert "serial: 8250: Switch to nbcon console" Revert "serial: 8250: Revert "drop lockdep annotation from serial8250_clear_IER()"" serial: sh-sci: Increment the runtime usage counter for the earlycon device serial: sh-sci: Clean sci_ports[0] after at earlycon exit serial: sh-sci: Do not probe the serial port if its slot in sci_ports[] is in use serial: sh-sci: Move runtime PM enable to sci_probe_single() serial: sh-sci: Drop __initdata macro for port_cfg serial: kgdb_nmi: Remove unused knock code tty: Permit some TIOCL_SETSEL modes without CAP_SYS_ADMIN tty: xilinx_uartps: split sysrq handling serial: 8250: Revert "drop lockdep annotation from serial8250_clear_IER()" serial: 8250: Switch to nbcon console serial: 8250: Provide flag for IER toggling for RS485 serial: 8250: Use high-level writing function for FIFO serial: 8250: Use frame time to determine timeout serial: 8250: Adjust the timeout for FIFO mode tty: atmel_serial: Use of_property_present() for non-boolean properties serial: sc16is7xx: Add polling mode if no IRQ pin is available dt-bindings: serial: sc16is7xx: Add description for polling mode tty: serial: atmel: make it selectable for ARCH_LAN969X ... commit 72d81e10628be6a948463259cbb6d3b670b20054 Author: Namhyung Kim Date: Tue Jan 28 09:06:29 2025 -0800 perf test: Skip syscall enum test if no landlock syscall The perf trace enum augmentation test specifically targets landlock_ add_rule syscall but IIUC it's an optional and can be opt-out by a kernel config. Currently trace_landlock() runs `perf test -w landlock` before the actual testing to check the availability but it's not enough since the workload always returns 0. Instead it could check if perf trace output has 'landlock' string. Fixes: d66763fed30f0bd8c ("perf test trace_btf_enum: Add regression test for the BTF augmentation of enums in 'perf trace'") Reviewed-by: Howard Chu Link: https://lore.kernel.org/r/20250128170629.1251574-1-namhyung@kernel.org Signed-off-by: Namhyung Kim tools/perf/tests/shell/trace_btf_enum.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c7b87ce0dd10b64b68a0b22cb83bbd556e28fe81 Author: Howard Chu Date: Tue Jan 21 18:55:19 2025 -0800 perf trace: Fix runtime error of index out of bounds libtraceevent parses and returns an array of argument fields, sometimes larger than RAW_SYSCALL_ARGS_NUM (6) because it includes "__syscall_nr", idx will traverse to index 6 (7th element) whereas sc->fmt->arg holds 6 elements max, creating an out-of-bounds access. This runtime error is found by UBsan. The error message: $ sudo UBSAN_OPTIONS=print_stacktrace=1 ./perf trace -a --max-events=1 builtin-trace.c:1966:35: runtime error: index 6 out of bounds for type 'syscall_arg_fmt [6]' #0 0x5c04956be5fe in syscall__alloc_arg_fmts /home/howard/hw/linux-perf/tools/perf/builtin-trace.c:1966 #1 0x5c04956c0510 in trace__read_syscall_info /home/howard/hw/linux-perf/tools/perf/builtin-trace.c:2110 #2 0x5c04956c372b in trace__syscall_info /home/howard/hw/linux-perf/tools/perf/builtin-trace.c:2436 #3 0x5c04956d2f39 in trace__init_syscalls_bpf_prog_array_maps /home/howard/hw/linux-perf/tools/perf/builtin-trace.c:3897 #4 0x5c04956d6d25 in trace__run /home/howard/hw/linux-perf/tools/perf/builtin-trace.c:4335 #5 0x5c04956e112e in cmd_trace /home/howard/hw/linux-perf/tools/perf/builtin-trace.c:5502 #6 0x5c04956eda7d in run_builtin /home/howard/hw/linux-perf/tools/perf/perf.c:351 #7 0x5c04956ee0a8 in handle_internal_command /home/howard/hw/linux-perf/tools/perf/perf.c:404 #8 0x5c04956ee37f in run_argv /home/howard/hw/linux-perf/tools/perf/perf.c:448 #9 0x5c04956ee8e9 in main /home/howard/hw/linux-perf/tools/perf/perf.c:556 #10 0x79eb3622a3b7 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #11 0x79eb3622a47a in __libc_start_main_impl ../csu/libc-start.c:360 #12 0x5c04955422d4 in _start (/home/howard/hw/linux-perf/tools/perf/perf+0x4e02d4) (BuildId: 5b6cab2d59e96a4341741765ad6914a4d784dbc6) 0.000 ( 0.014 ms): Chrome_ChildIO/117244 write(fd: 238, buf: !, count: 1) = 1 Fixes: 5e58fcfaf4c6 ("perf trace: Allow allocating sc->arg_fmt even without the syscall tracepoint") Signed-off-by: Howard Chu Link: https://lore.kernel.org/r/20250122025519.361873-1-howardchu95@gmail.com Signed-off-by: Namhyung Kim tools/perf/builtin-trace.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3b4309546b48fc167aa615a2d881a09c0a97971f Author: Kuan-Wei Chiu Date: Wed Jan 29 00:54:15 2025 +0800 ALSA: hda: Fix headset detection failure due to unstable sort The auto_parser assumed sort() was stable, but the kernel's sort() uses heapsort, which has never been stable. After commit 0e02ca29a563 ("lib/sort: optimize heapsort with double-pop variation"), the order of equal elements changed, causing the headset to fail to work. Fix the issue by recording the original order of elements before sorting and using it as a tiebreaker for equal elements in the comparison function. Fixes: b9030a005d58 ("ALSA: hda - Use standard sort function in hda_auto_parser.c") Reported-by: Austrum Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219158 Tested-by: Austrum Cc: stable@vger.kernel.org Signed-off-by: Kuan-Wei Chiu Link: https://patch.msgid.link/20250128165415.643223-1-visitorckw@gmail.com Signed-off-by: Takashi Iwai sound/pci/hda/hda_auto_parser.c | 8 +++++++- sound/pci/hda/hda_auto_parser.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) commit e2ee2e9b159094527ae7ad78058b1316f62fc5b7 Merge: 9ff28f2fad67 01009b06a6b5 Author: Linus Torvalds Date: Tue Jan 28 09:01:36 2025 -0800 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull KVM/arm64 updates from Will Deacon: "New features: - Support for non-protected guest in protected mode, achieving near feature parity with the non-protected mode - Support for the EL2 timers as part of the ongoing NV support - Allow control of hardware tracing for nVHE/hVHE Improvements, fixes and cleanups: - Massive cleanup of the debug infrastructure, making it a bit less awkward and definitely easier to maintain. This should pave the way for further optimisations - Complete rewrite of pKVM's fixed-feature infrastructure, aligning it with the rest of KVM and making the code easier to follow - Large simplification of pKVM's memory protection infrastructure - Better handling of RES0/RES1 fields for memory-backed system registers - Add a workaround for Qualcomm's Snapdragon X CPUs, which suffer from a pretty nasty timer bug - Small collection of cleanups and low-impact fixes" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (87 commits) arm64/sysreg: Get rid of TRFCR_ELx SysregFields KVM: arm64: nv: Fix doc header layout for timers KVM: arm64: nv: Apply RESx settings to sysreg reset values KVM: arm64: nv: Always evaluate HCR_EL2 using sanitising accessors KVM: arm64: Fix selftests after sysreg field name update coresight: Pass guest TRFCR value to KVM KVM: arm64: Support trace filtering for guests KVM: arm64: coresight: Give TRBE enabled state to KVM coresight: trbe: Remove redundant disable call arm64/sysreg/tools: Move TRFCR definitions to sysreg tools: arm64: Update sysreg.h header files KVM: arm64: Drop pkvm_mem_transition for host/hyp donations KVM: arm64: Drop pkvm_mem_transition for host/hyp sharing KVM: arm64: Drop pkvm_mem_transition for FF-A KVM: arm64: Explicitly handle BRBE traps as UNDEFINED KVM: arm64: vgic: Use str_enabled_disabled() in vgic_v3_probe() arm64: kvm: Introduce nvhe stack size constants KVM: arm64: Fix nVHE stacktrace VA bits mask KVM: arm64: Fix FEAT_MTE in pKVM Documentation: Update the behaviour of "kvm-arm.mode" ... commit 9ff28f2fad67e173ed25b8c3a183b15da5445d2d Merge: a37eea94f775 531936dee53e Author: Linus Torvalds Date: Tue Jan 28 08:52:01 2025 -0800 Merge tag 'loongarch-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch updates from Huacai Chen: - Migrate to the generic rule for built-in DTB - Disable FIX_EARLYCON_MEM when ARCH_IOREMAP is enabled - Derive timer max_delta from PRCFG1's timer_bits - Correct the cacheinfo sharing information - Add pgprot_nx() implementation - Add debugfs entries to switch SFB/TSO state - Change the maximum number of watchpoints - Some bug fixes and other small changes * tag 'loongarch-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: Extend the maximum number of watchpoints LoongArch: Change 8 to 14 for LOONGARCH_MAX_{BRP,WRP} LoongArch: Add debugfs entries to switch SFB/TSO state LoongArch: Fix warnings during S3 suspend LoongArch: Adjust SETUP_SLEEP and SETUP_WAKEUP LoongArch: Refactor bug_handler() implementation LoongArch: Add pgprot_nx() implementation LoongArch: Correct the __switch_to() prototype in comments LoongArch: Correct the cacheinfo sharing information LoongArch: Derive timer max_delta from PRCFG1's timer_bits LoongArch: Disable FIX_EARLYCON_MEM when ARCH_IOREMAP is enabled LoongArch: Migrate to the generic rule for built-in DTB commit 3bcc8a1af581af152d43e42b53db3534018301b5 Author: Heiko Carstens Date: Mon Jan 20 11:53:42 2025 +0100 s390/sclp: Initialize sclp subsystem via arch_cpu_finalize_init() With the switch to GENERIC_CPU_DEVICES an early call to the sclp subsystem was added to smp_prepare_cpus(). This will usually succeed since the sclp subsystem is implicitly initialized early enough if an sclp based console is present. If no such console is present the initialization happens with an arch_initcall(); in such cases calls to the sclp subsystem will fail. For CPU detection this means that the fallback sigp loop will be used permanently to detect CPUs instead of the preferred READ_CPU_INFO sclp request. Fix this by adding an explicit early sclp_init() call via arch_cpu_finalize_init(). Reported-by: Sheshu Ramanandan Fixes: 4a39f12e753d ("s390/smp: Switch to GENERIC_CPU_DEVICES") Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/Kconfig | 1 + arch/s390/include/asm/sclp.h | 1 + arch/s390/kernel/setup.c | 5 +++++ drivers/s390/char/sclp.c | 12 ++---------- 4 files changed, 9 insertions(+), 10 deletions(-) commit a37eea94f775132866ecdd466fd88027d7125515 Merge: 6d61a53dd6f5 2cec2c4dc90c Author: Linus Torvalds Date: Tue Jan 28 08:38:30 2025 -0800 Merge tag 'sparc-for-6.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc Pull sparc updates from Andreas Larsson: - Improve performance for reading /proc/interrupts - Simplify irq code for sun4v - Replace zero-length array with flexible array in struct for pci for sparc64 * tag 'sparc-for-6.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc: sparc/irq: Remove unneeded if check in sun4v_cookie_only_virqs() sparc/irq: Use str_enabled_disabled() helper function sparc: replace zero-length array with flexible-array member sparc/irq: use seq_put_decimal_ull_width() for decimal values commit cc3d4671a0db9499b201c43faba6c46e1a21274c Author: Christoph Hellwig Date: Tue Jan 28 08:55:34 2025 +0100 nvmet: add a missing endianess conversion in nvmet_execute_admin_connect The kato field is little endian on the wire, but native endian in the in-core structure, add the missing byte swap. Fixes: 6202783184bf ("nvmet: Improve nvmet_alloc_ctrl() interface and implementation") Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch drivers/nvme/target/fabrics-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7bf6b497a747b0e28a411beacdd62f1488d0781c Author: Christoph Hellwig Date: Tue Jan 28 08:55:33 2025 +0100 nvmet: the result field in nvmet_alloc_ctrl_args is little endian So use the __le32 type for it. Fixes: 6202783184bf ("nvmet: Improve nvmet_alloc_ctrl() interface and implementation") Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch drivers/nvme/target/nvmet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6ab7384d554ba80ff4793259d75535874b366f5 Author: Luo Yifan Date: Tue Jan 28 23:27:01 2025 +0900 tools/bootconfig: Fix the wrong format specifier Use '%u' instead of '%d' for unsigned int. Link: https://lore.kernel.org/all/20241105011048.201629-1-luoyifan@cmss.chinamobile.com/ Fixes: 973780011106 ("tools/bootconfig: Suppress non-error messages") Signed-off-by: Luo Yifan Signed-off-by: Masami Hiramatsu (Google) tools/bootconfig/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5ce1e9bbb2a1d43cf9e613cb03e65ecdfd309fe9 Author: Patryk Wlazlyn Date: Fri Jan 17 13:50:29 2025 +0100 tools/power turbostat: Add CPU%c1e BIC for CWF Intel Clearwater Forest report PMT telemetry with GUID 0x14421519, which can be used to obtain module c1e residency counter of type tcore clock. Add early support for the counter by using heuristic that should work for the Clearwater Forest platforms. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 68 +++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 7cbae7ea3de5c17b47aeb34a770446aba1eaa904 Author: Heiko Carstens Date: Fri Jan 24 14:51:52 2025 +0100 s390/tools: Use array instead of string initializer The in-kernel disassembler intentionally uses nun-null terminated strings in order to keep the arrays which contain mnemonics as small as possible. GCC 15 however warns about this: ./arch/s390/include/generated/asm/dis-defs.h:1662:71: error: initializer-string for array of ‘char’ is too long [-Werror=unterminated-string-initialization] 1662 | [1261] = { .opfrag = 0xea, .format = INSTR_SS_L0RDRD, .name = "unpka" }, \ Get rid of this warning by using array initializers. Reviewed-by: Jens Remus Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/tools/gen_opcode_table.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit d63b0e8a628e62ca85a0f7915230186bb92f8bb4 Author: Pavel Begunkov Date: Tue Jan 28 00:55:24 2025 +0000 io_uring: fix multishots with selected buffers We do io_kbuf_recycle() when arming a poll but every iteration of a multishot can grab more buffers, which is why we need to flush the kbuf ring state before continuing with waiting. Cc: stable@vger.kernel.org Fixes: b3fdea6ecb55c ("io_uring: multishot recv") Reported-by: Muhammad Ramdhan Reported-by: Bing-Jhong Billy Jheng Reported-by: Jacob Soo Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1bfc9990fe435f1fc6152ca9efeba5eb3e68339c.1738025570.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/poll.c | 2 ++ 1 file changed, 2 insertions(+) commit fd39c41bcd82d5ebaaebadb944eab5598c668a90 Author: Thomas Zimmermann Date: Mon Jan 27 14:44:14 2025 +0100 drm/ast: astdp: Fix timeout for enabling video signal The ASTDP transmitter sometimes takes up to 1 second for enabling the video signal, while the timeout is only 200 msec. This results in a kernel error message. Increase the timeout to 1 second. An example of the error message is shown below. [ 697.084433] ------------[ cut here ]------------ [ 697.091115] ast 0000:02:00.0: [drm] drm_WARN_ON(!__ast_dp_wait_enable(ast, enabled)) [ 697.091233] WARNING: CPU: 1 PID: 160 at drivers/gpu/drm/ast/ast_dp.c:232 ast_dp_set_enable+0x123/0x140 [ast] [...] [ 697.272469] RIP: 0010:ast_dp_set_enable+0x123/0x140 [ast] [...] [ 697.415283] Call Trace: [ 697.420727] [ 697.425908] ? show_trace_log_lvl+0x196/0x2c0 [ 697.433304] ? show_trace_log_lvl+0x196/0x2c0 [ 697.440693] ? drm_atomic_helper_commit_modeset_enables+0x30a/0x470 [ 697.450115] ? ast_dp_set_enable+0x123/0x140 [ast] [ 697.458059] ? __warn.cold+0xaf/0xca [ 697.464713] ? ast_dp_set_enable+0x123/0x140 [ast] [ 697.472633] ? report_bug+0x134/0x1d0 [ 697.479544] ? handle_bug+0x58/0x90 [ 697.486127] ? exc_invalid_op+0x13/0x40 [ 697.492975] ? asm_exc_invalid_op+0x16/0x20 [ 697.500224] ? preempt_count_sub+0x14/0xc0 [ 697.507473] ? ast_dp_set_enable+0x123/0x140 [ast] [ 697.515377] ? ast_dp_set_enable+0x123/0x140 [ast] [ 697.523227] drm_atomic_helper_commit_modeset_enables+0x30a/0x470 [ 697.532388] drm_atomic_helper_commit_tail+0x58/0x90 [ 697.540400] ast_mode_config_helper_atomic_commit_tail+0x30/0x40 [ast] [ 697.550009] commit_tail+0xfe/0x1d0 [ 697.556547] drm_atomic_helper_commit+0x198/0x1c0 This is a cosmetical problem. Enabling the video signal still works even with the error message. The problem has always been present, but only recent versions of the ast driver warn about missing the timeout. Signed-off-by: Thomas Zimmermann Fixes: 4e29cc7c5c67 ("drm/ast: astdp: Replace ast_dp_set_on_off()") Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: # v6.13+ Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20250127134423.84266-1-tzimmermann@suse.de drivers/gpu/drm/ast/ast_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1751f872cc97f992ed5c4c72c55588db1f0021e1 Author: Joel Granados Date: Tue Jan 28 13:48:37 2025 +0100 treewide: const qualify ctl_tables where applicable Add the const qualifier to all the ctl_tables in the tree except for watchdog_hardlockup_sysctl, memory_allocation_profiling_sysctls, loadpin_sysctl_table and the ones calling register_net_sysctl (./net, drivers/inifiniband dirs). These are special cases as they use a registration function with a non-const qualified ctl_table argument or modify the arrays before passing them on to the registration function. Constifying ctl_table structs will prevent the modification of proc_handler function pointers as the arrays would reside in .rodata. This is made possible after commit 78eb4ea25cd5 ("sysctl: treewide: constify the ctl_table argument of proc_handlers") constified all the proc_handlers. Created this by running an spatch followed by a sed command: Spatch: virtual patch @ depends on !(file in "net") disable optional_qualifier @ identifier table_name != { watchdog_hardlockup_sysctl, iwcm_ctl_table, ucma_ctl_table, memory_allocation_profiling_sysctls, loadpin_sysctl_table }; @@ + const struct ctl_table table_name [] = { ... }; sed: sed --in-place \ -e "s/struct ctl_table .table = &uts_kern/const struct ctl_table *table = \&uts_kern/" \ kernel/utsname_sysctl.c Reviewed-by: Song Liu Acked-by: Steven Rostedt (Google) # for kernel/trace/ Reviewed-by: Martin K. Petersen # SCSI Reviewed-by: Darrick J. Wong # xfs Acked-by: Jani Nikula Acked-by: Corey Minyard Acked-by: Wei Liu Acked-by: Thomas Gleixner Reviewed-by: Bill O'Donnell Acked-by: Baoquan He Acked-by: Ashutosh Dixit Acked-by: Anna Schumaker Signed-off-by: Joel Granados arch/arm/kernel/isa.c | 2 +- arch/arm64/kernel/fpsimd.c | 4 ++-- arch/arm64/kernel/process.c | 2 +- arch/powerpc/kernel/idle.c | 2 +- arch/powerpc/platforms/pseries/mobility.c | 2 +- arch/riscv/kernel/process.c | 2 +- arch/riscv/kernel/vector.c | 2 +- arch/s390/appldata/appldata_base.c | 2 +- arch/s390/kernel/debug.c | 2 +- arch/s390/kernel/hiperdispatch.c | 2 +- arch/s390/kernel/topology.c | 2 +- arch/s390/mm/cmm.c | 2 +- arch/s390/mm/pgalloc.c | 2 +- arch/x86/entry/vdso/vdso32-setup.c | 2 +- arch/x86/kernel/cpu/bus_lock.c | 2 +- crypto/fips.c | 2 +- drivers/base/firmware_loader/fallback_table.c | 2 +- drivers/cdrom/cdrom.c | 2 +- drivers/char/hpet.c | 2 +- drivers/char/ipmi/ipmi_poweroff.c | 2 +- drivers/char/random.c | 2 +- drivers/gpu/drm/i915/i915_perf.c | 2 +- drivers/gpu/drm/xe/xe_observation.c | 2 +- drivers/hv/hv_common.c | 2 +- drivers/md/md.c | 2 +- drivers/misc/sgi-xp/xpc_main.c | 4 ++-- drivers/perf/arm_pmuv3.c | 2 +- drivers/perf/riscv_pmu_sbi.c | 2 +- drivers/scsi/scsi_sysctl.c | 2 +- drivers/scsi/sg.c | 2 +- drivers/tty/tty_io.c | 2 +- drivers/xen/balloon.c | 2 +- fs/aio.c | 2 +- fs/cachefiles/error_inject.c | 2 +- fs/coda/sysctl.c | 2 +- fs/coredump.c | 2 +- fs/dcache.c | 2 +- fs/devpts/inode.c | 2 +- fs/eventpoll.c | 2 +- fs/exec.c | 2 +- fs/file_table.c | 2 +- fs/fuse/sysctl.c | 2 +- fs/inode.c | 2 +- fs/lockd/svc.c | 2 +- fs/locks.c | 2 +- fs/namei.c | 2 +- fs/namespace.c | 2 +- fs/nfs/nfs4sysctl.c | 2 +- fs/nfs/sysctl.c | 2 +- fs/notify/dnotify/dnotify.c | 2 +- fs/notify/fanotify/fanotify_user.c | 2 +- fs/notify/inotify/inotify_user.c | 2 +- fs/ocfs2/stackglue.c | 2 +- fs/pipe.c | 2 +- fs/quota/dquot.c | 2 +- fs/sysctls.c | 2 +- fs/userfaultfd.c | 2 +- fs/verity/init.c | 2 +- fs/xfs/xfs_sysctl.c | 2 +- init/do_mounts_initrd.c | 2 +- io_uring/io_uring.c | 2 +- ipc/ipc_sysctl.c | 2 +- ipc/mq_sysctl.c | 2 +- kernel/acct.c | 2 +- kernel/bpf/syscall.c | 2 +- kernel/delayacct.c | 2 +- kernel/exit.c | 2 +- kernel/hung_task.c | 2 +- kernel/kexec_core.c | 2 +- kernel/kprobes.c | 2 +- kernel/latencytop.c | 2 +- kernel/locking/lockdep.c | 2 +- kernel/panic.c | 2 +- kernel/pid.c | 2 +- kernel/pid_namespace.c | 2 +- kernel/pid_sysctl.h | 2 +- kernel/printk/sysctl.c | 2 +- kernel/reboot.c | 2 +- kernel/sched/autogroup.c | 2 +- kernel/sched/core.c | 2 +- kernel/sched/deadline.c | 2 +- kernel/sched/fair.c | 2 +- kernel/sched/rt.c | 2 +- kernel/sched/topology.c | 2 +- kernel/seccomp.c | 2 +- kernel/signal.c | 2 +- kernel/stackleak.c | 2 +- kernel/sysctl-test.c | 6 +++--- kernel/sysctl.c | 4 ++-- kernel/time/timer.c | 2 +- kernel/trace/ftrace.c | 2 +- kernel/trace/trace_events_user.c | 2 +- kernel/umh.c | 2 +- kernel/utsname_sysctl.c | 4 ++-- kernel/watchdog.c | 2 +- lib/test_sysctl.c | 6 +++--- mm/compaction.c | 2 +- mm/hugetlb.c | 2 +- mm/hugetlb_vmemmap.c | 2 +- mm/memory-failure.c | 2 +- mm/oom_kill.c | 2 +- mm/page-writeback.c | 2 +- mm/page_alloc.c | 2 +- security/apparmor/lsm.c | 2 +- security/keys/sysctl.c | 2 +- security/yama/yama_lsm.c | 2 +- 106 files changed, 114 insertions(+), 114 deletions(-) commit 9e6c4e6b605c1fa3e24f74ee0b641e95f090188a Author: Cosmin Ratiu Date: Mon Jan 27 12:41:47 2025 +0200 bonding: Correctly support GSO ESP offload The referenced fix is incomplete. It correctly computes bond_dev->gso_partial_features across slaves, but unfortunately netdev_fix_features discards gso_partial_features from the feature set if NETIF_F_GSO_PARTIAL isn't set in bond_dev->features. This is visible with ethtool -k bond0 | grep esp: tx-esp-segmentation: off [requested on] esp-hw-offload: on esp-tx-csum-hw-offload: on This patch reworks the bonding GSO offload support by: - making aggregating gso_partial_features across slaves similar to the other feature sets (this part is a no-op). - advertising the default partial gso features on empty bond devs, same as with other feature sets (also a no-op). - adding NETIF_F_GSO_PARTIAL to hw_enc_features filtered across slaves. - adding NETIF_F_GSO_PARTIAL to features in bond_setup() With all of these, 'ethtool -k bond0 | grep esp' now reports: tx-esp-segmentation: on esp-hw-offload: on esp-tx-csum-hw-offload: on Fixes: 4861333b4217 ("bonding: add ESP offload features when slaves support") Signed-off-by: Hangbin Liu Signed-off-by: Cosmin Ratiu Acked-by: Jay Vosburgh Link: https://patch.msgid.link/20250127104147.759658-1-cratiu@nvidia.com Signed-off-by: Paolo Abeni drivers/net/bonding/bond_main.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 740a3e71567195427495cb4d68bdee1eb1482ba4 Merge: 4f5a52adeb1a 8865d22656b4 Author: Paolo Abeni Date: Tue Jan 28 12:44:47 2025 +0100 Merge branch 'limit-devicetree-parameters-to-hardware-capability' Kunihiko Hayashi says: ==================== Limit devicetree parameters to hardware capability This series includes patches that checks the devicetree properties, the number of MTL queues and FIFO size values, and if these specified values exceed the value contained in hardware capabilities, limit to the values from the capabilities. Do nothing if the capabilities don't have any specified values. And this sets hardware capability values if FIFO sizes are not specified and removes redundant lines. ==================== Link: https://patch.msgid.link/20250127013820.2941044-1-hayashi.kunihiko@socionext.com Signed-off-by: Paolo Abeni commit 8865d22656b442b8d0fb019e6acb2292b99a9c3c Author: Kunihiko Hayashi Date: Mon Jan 27 10:38:20 2025 +0900 net: stmmac: Specify hardware capability value when FIFO size isn't specified When Tx/Rx FIFO size is not specified in advance, the driver checks if the value is zero and sets the hardware capability value in functions where that value is used. Consolidate the check and settings into function stmmac_hw_init() and remove redundant other statements. If FIFO size is zero and the hardware capability also doesn't have upper limit values, return with an error message. Signed-off-by: Kunihiko Hayashi Reviewed-by: Yanteng Si Signed-off-by: Paolo Abeni drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 35 ++++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 044f2fbaa2725696ecbf1f02ba7ab0a8ccb7e1ae Author: Kunihiko Hayashi Date: Mon Jan 27 10:38:19 2025 +0900 net: stmmac: Limit FIFO size by hardware capability Tx/Rx FIFO size is specified by the parameter "{tx,rx}-fifo-depth" from stmmac_platform layer. However, these values are constrained by upper limits determined by the capabilities of each hardware feature. There is a risk that the upper bits will be truncated due to the calculation, so it's appropriate to limit them to the upper limit values and display a warning message. This only works if the hardware capability has the upper limit values. Fixes: e7877f52fd4a ("stmmac: Read tx-fifo-depth and rx-fifo-depth from the devicetree") Signed-off-by: Kunihiko Hayashi Reviewed-by: Yanteng Si Signed-off-by: Paolo Abeni drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit f5fb35a3d6b36d378b2e2ecbfb9caa337d5428e6 Author: Kunihiko Hayashi Date: Mon Jan 27 10:38:18 2025 +0900 net: stmmac: Limit the number of MTL queues to hardware capability The number of MTL queues to use is specified by the parameter "snps,{tx,rx}-queues-to-use" from stmmac_platform layer. However, the maximum numbers of queues are constrained by upper limits determined by the capability of each hardware feature. It's appropriate to limit the values not to exceed the upper limit values and display a warning message. This only works if the hardware capability has the upper limit values. Fixes: d976a525c371 ("net: stmmac: multiple queues dt configuration") Signed-off-by: Kunihiko Hayashi Reviewed-by: Yanteng Si Signed-off-by: Paolo Abeni drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 4f5a52adeb1ad675ca33f1e1eacd9c0bbaf393d4 Author: Gal Pressman Date: Sun Jan 26 21:18:45 2025 +0200 ethtool: Fix set RXNFC command with symmetric RSS hash The sanity check that both source and destination are set when symmetric RSS hash is requested is only relevant for ETHTOOL_SRXFH (rx-flow-hash), it should not be performed on any other commands (e.g. ETHTOOL_SRXCLSRLINS/ETHTOOL_SRXCLSRLDEL). This resolves accessing uninitialized 'info.data' field, and fixes false errors in rule insertion: # ethtool --config-ntuple eth2 flow-type ip4 dst-ip 255.255.255.255 action -1 loc 0 rmgr: Cannot insert RX class rule: Invalid argument Cannot insert classification rule Fixes: 13e59344fb9d ("net: ethtool: add support for symmetric-xor RSS hash") Cc: Ahmed Zaki Reviewed-by: Tariq Toukan Signed-off-by: Gal Pressman Reviewed-by: Michal Swiatkowski Reviewed-by: Edward Cree Reviewed-by: Ahmed Zaki Link: https://patch.msgid.link/20250126191845.316589-1-gal@nvidia.com Signed-off-by: Paolo Abeni net/ethtool/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e091043bfabef7cb6d970ffd3cbb174847fd6300 Merge: 19ae40f572a9 be154b598fa5 Author: Paolo Abeni Date: Tue Jan 28 12:16:34 2025 +0100 Merge branch 'usbnet-ipheth-prevent-oob-reads-of-ndp16' Foster Snowhill says: ==================== usbnet: ipheth: prevent OoB reads of NDP16 iOS devices support two types of tethering over USB: regular, where the internet connection is shared from the phone to the attached computer, and reverse, where the internet connection is shared from the attached computer to the phone. The `ipheth` driver is responsible for regular tethering only. With this tethering type, iOS devices support two encapsulation modes on RX: legacy and NCM. In "NCM mode", the iOS device encapsulates RX (phone->computer) traffic in NCM Transfer Blocks (similarly to CDC NCM). However, unlike reverse tethering, regular tethering is not compliant with the CDC NCM spec: * Does not have the required CDC NCM descriptors * TX (computer->phone) is not NCM-encapsulated at all Thus `ipheth` implements a very limited subset of the spec with the sole purpose of parsing RX URBs. This driver does not aim to be a CDC NCM-compliant implementation and, in fact, can't be one because of the points above. For a complete spec-compliant CDC NCM implementation, there is already the `cdc_ncm` driver. This driver is used for reverse tethering on iOS devices. This patch series does not in any way change `cdc_ncm`. In the first iteration of the NCM mode implementation in `ipheth`, there were a few potential out of bounds reads when processing malformed URBs received from a connected device: * Only the start of NDP16 (wNdpIndex) was checked to fit in the URB buffer. * Datagram length check as part of DPEs could overflow. * DPEs could be read past the end of NDP16 and even end of URB buffer if a trailer DPE wasn't encountered. The above is not expected to happen in normal device operation. To address the above issues for iOS devices in NCM mode, rely on and check for a specific fixed format of incoming URBs expected from an iOS device: * 12-byte NTH16 * 96-byte NDP16, allowing up to 22 DPEs (up to 21 datagrams + trailer) On iOS, NDP16 directly follows NTH16, and its length is constant regardless of the DPE count. As the regular tethering implementation of iOS devices isn't compliant with CDC NCM, it's not possible to use the `cdc_ncm` driver to handle this functionality. Furthermore, while the logic required to properly parse URBs with NCM-encapsulated frames is already part of said driver, I haven't found a nice way to reuse the existing code without messing with the `cdc_ncm` driver itself. I didn't want to reimplement more of the spec than I absolutely had to, because that work had already been done in `cdc_ncm`. Instead, to limit the scope, I chose to rely on the specific URB format of iOS devices that hasn't changed since the NCM mode was introduced there. I tested each individual patch in the v5 series with iPhone 15 Pro Max, iOS 18.2.1: compiled cleanly, ran iperf3 between phone and computer, observed no errors in either kernel log or interface statistics. v4 was Reviewed-by Jakub Kicinski . Compared to v4, v5 has no code changes. The two differences are: * Patch "usbnet: ipheth: break up NCM header size computation" moved later in the series, closer to a subsequent commit that makes use of the change. * In patch "usbnet: ipheth: refactor NCM datagram loop", removed a stray paragraph in commit msg. Above items are also noted in the changelogs of respective patches. ==================== Link: https://patch.msgid.link/20250125235409.3106594-1-forst@pen.gy Signed-off-by: Paolo Abeni commit be154b598fa54136e2be17d6dd13c8a8bc0078ce Author: Foster Snowhill Date: Sun Jan 26 00:54:09 2025 +0100 usbnet: ipheth: document scope of NCM implementation Clarify that the "NCM" implementation in `ipheth` is very limited, as iOS devices aren't compatible with the CDC NCM specification in regular tethering mode. For a standards-compliant implementation, one shall turn to the `cdc_ncm` module. Cc: stable@vger.kernel.org # 6.5.x Signed-off-by: Foster Snowhill Reviewed-by: Jakub Kicinski Signed-off-by: Paolo Abeni drivers/net/usb/ipheth.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ee591f2b281721171896117f9946fced31441418 Author: Foster Snowhill Date: Sun Jan 26 00:54:08 2025 +0100 usbnet: ipheth: fix DPE OoB read Fix an out-of-bounds DPE read, limit the number of processed DPEs to the amount that fits into the fixed-size NDP16 header. Fixes: a2d274c62e44 ("usbnet: ipheth: add CDC NCM support") Cc: stable@vger.kernel.org Signed-off-by: Foster Snowhill Reviewed-by: Jakub Kicinski Signed-off-by: Paolo Abeni drivers/net/usb/ipheth.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit efcbc678a14be268040ffc1fa33c98faf2d55141 Author: Foster Snowhill Date: Sun Jan 26 00:54:07 2025 +0100 usbnet: ipheth: break up NCM header size computation Originally, the total NCM header size was computed as the sum of two vaguely labelled constants. While accurate, it wasn't particularly clear where they were coming from. Use sizes of existing NCM structs where available. Define the total NDP16 size based on the maximum amount of DPEs that can fit into the iOS-specific fixed-size header. This change does not fix any particular issue. Rather, it introduces intermediate constants that will simplify subsequent commits. It should also make it clearer for the reader where the constant values come from. Cc: stable@vger.kernel.org # 6.5.x Signed-off-by: Foster Snowhill Reviewed-by: Jakub Kicinski Signed-off-by: Paolo Abeni drivers/net/usb/ipheth.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 2a9a196429e98fcc64078366c2679bc40aba5466 Author: Foster Snowhill Date: Sun Jan 26 00:54:06 2025 +0100 usbnet: ipheth: refactor NCM datagram loop Introduce an rx_error label to reduce repetitions in the header signature checks. Store wDatagramIndex and wDatagramLength after endianness conversion to avoid repeated le16_to_cpu() calls. Rewrite the loop to return on a null trailing DPE, which is required by the CDC NCM spec. In case it is missing, fall through to rx_error. This change does not fix any particular issue. Its purpose is to simplify a subsequent commit that fixes a potential OoB read by limiting the maximum amount of processed DPEs. Cc: stable@vger.kernel.org # 6.5.x Signed-off-by: Foster Snowhill Reviewed-by: Jakub Kicinski Signed-off-by: Paolo Abeni drivers/net/usb/ipheth.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit 86586dcb75cb8fd062a518aca8ee667938b91efb Author: Foster Snowhill Date: Sun Jan 26 00:54:05 2025 +0100 usbnet: ipheth: use static NDP16 location in URB Original code allowed for the start of NDP16 to be anywhere within the URB based on the `wNdpIndex` value in NTH16. Only the start position of NDP16 was checked, so it was possible for even the fixed-length part of NDP16 to extend past the end of URB, leading to an out-of-bounds read. On iOS devices, the NDP16 header always directly follows NTH16. Rely on and check for this specific format. This, along with NCM-specific minimal URB length check that already exists, will ensure that the fixed-length part of NDP16 plus a set amount of DPEs fit within the URB. Note that this commit alone does not fully address the OoB read. The limit on the amount of DPEs needs to be enforced separately. Fixes: a2d274c62e44 ("usbnet: ipheth: add CDC NCM support") Cc: stable@vger.kernel.org Signed-off-by: Foster Snowhill Reviewed-by: Jakub Kicinski Signed-off-by: Paolo Abeni drivers/net/usb/ipheth.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 429fa68b58cefb9aa9de27e4089637298b46b757 Author: Foster Snowhill Date: Sun Jan 26 00:54:04 2025 +0100 usbnet: ipheth: check that DPE points past NCM header By definition, a DPE points at the start of a network frame/datagram. Thus it makes no sense for it to point at anything that's part of the NCM header. It is not a security issue, but merely an indication of a malformed DPE. Enforce that all DPEs point at the data portion of the URB, past the NCM header. Fixes: a2d274c62e44 ("usbnet: ipheth: add CDC NCM support") Cc: stable@vger.kernel.org Signed-off-by: Foster Snowhill Reviewed-by: Jakub Kicinski Signed-off-by: Paolo Abeni drivers/net/usb/ipheth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c219427ed296f94bb4b91d08626776dc7719ee27 Author: Foster Snowhill Date: Sun Jan 26 00:54:03 2025 +0100 usbnet: ipheth: fix possible overflow in DPE length check Originally, it was possible for the DPE length check to overflow if wDatagramIndex + wDatagramLength > U16_MAX. This could lead to an OoB read. Move the wDatagramIndex term to the other side of the inequality. An existing condition ensures that wDatagramIndex < urb->actual_length. Fixes: a2d274c62e44 ("usbnet: ipheth: add CDC NCM support") Cc: stable@vger.kernel.org Signed-off-by: Foster Snowhill Reviewed-by: Jakub Kicinski Signed-off-by: Paolo Abeni drivers/net/usb/ipheth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 19ae40f572a9ce1ade9954990af709a03fd37010 Author: Thomas Weißschuh Date: Sat Jan 25 10:28:38 2025 +0100 ptp: Properly handle compat ioctls Pointer arguments passed to ioctls need to pass through compat_ptr() to work correctly on s390; as explained in Documentation/driver-api/ioctl.rst. Detect compat mode at runtime and call compat_ptr() for those commands which do take pointer arguments. Suggested-by: Arnd Bergmann Link: https://lore.kernel.org/lkml/1ba5d3a4-7931-455b-a3ce-85a968a7cb10@app.fastmail.com/ Fixes: d94ba80ebbea ("ptp: Added a brand new class driver for ptp clocks.") Signed-off-by: Thomas Weißschuh Reviewed-by: Cyrill Gorcunov Reviewed-by: Arnd Bergmann Acked-by: Richard Cochran Link: https://patch.msgid.link/20250125-posix-clock-compat_ioctl-v2-1-11c865c500eb@weissschuh.net Signed-off-by: Paolo Abeni drivers/ptp/ptp_chardev.c | 4 ++++ 1 file changed, 4 insertions(+) commit 90b7f2961798793275b4844348619b622f983907 Author: Nikita Zhandarovich Date: Fri Jan 24 01:30:20 2025 -0800 net: usb: rtl8150: enable basic endpoint checking Syzkaller reports [1] encountering a common issue of utilizing a wrong usb endpoint type during URB submitting stage. This, in turn, triggers a warning shown below. For now, enable simple endpoint checking (specifically, bulk and interrupt eps, testing control one is not essential) to mitigate the issue with a view to do other related cosmetic changes later, if they are necessary. [1] Syzkaller report: usb 1-1: BOGUS urb xfer, pipe 3 != type 1 WARNING: CPU: 1 PID: 2586 at drivers/usb/core/urb.c:503 usb_submit_urb+0xe4b/0x1730 driv> Modules linked in: CPU: 1 UID: 0 PID: 2586 Comm: dhcpcd Not tainted 6.11.0-rc4-syzkaller-00069-gfc88bb11617> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 RIP: 0010:usb_submit_urb+0xe4b/0x1730 drivers/usb/core/urb.c:503 Code: 84 3c 02 00 00 e8 05 e4 fc fc 4c 89 ef e8 fd 25 d7 fe 45 89 e0 89 e9 4c 89 f2 48 8> RSP: 0018:ffffc9000441f740 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff888112487a00 RCX: ffffffff811a99a9 RDX: ffff88810df6ba80 RSI: ffffffff811a99b6 RDI: 0000000000000001 RBP: 0000000000000003 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001 R13: ffff8881023bf0a8 R14: ffff888112452a20 R15: ffff888112487a7c FS: 00007fc04eea5740(0000) GS:ffff8881f6300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f0a1de9f870 CR3: 000000010dbd0000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rtl8150_open+0x300/0xe30 drivers/net/usb/rtl8150.c:733 __dev_open+0x2d4/0x4e0 net/core/dev.c:1474 __dev_change_flags+0x561/0x720 net/core/dev.c:8838 dev_change_flags+0x8f/0x160 net/core/dev.c:8910 devinet_ioctl+0x127a/0x1f10 net/ipv4/devinet.c:1177 inet_ioctl+0x3aa/0x3f0 net/ipv4/af_inet.c:1003 sock_do_ioctl+0x116/0x280 net/socket.c:1222 sock_ioctl+0x22e/0x6c0 net/socket.c:1341 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+0x193/0x220 fs/ioctl.c:893 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:0x7fc04ef73d49 ... This change has not been tested on real hardware. Reported-and-tested-by: syzbot+d7e968426f644b567e31@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=d7e968426f644b567e31 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Nikita Zhandarovich Link: https://patch.msgid.link/20250124093020.234642-1-n.zhandarovich@fintech.ru Signed-off-by: Paolo Abeni drivers/net/usb/rtl8150.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 6e74e53b34b6dec5a50e1404e2680852ec6768d2 Author: Niklas Cassel Date: Mon Jan 27 16:43:04 2025 +0100 ata: libata-sff: Ensure that we cannot write outside the allocated buffer reveliofuzzing reported that a SCSI_IOCTL_SEND_COMMAND ioctl with out_len set to 0xd42, SCSI command set to ATA_16 PASS-THROUGH, ATA command set to ATA_NOP, and protocol set to ATA_PROT_PIO, can cause ata_pio_sector() to write outside the allocated buffer, overwriting random memory. While a ATA device is supposed to abort a ATA_NOP command, there does seem to be a bug either in libata-sff or QEMU, where either this status is not set, or the status is cleared before read by ata_sff_hsm_move(). Anyway, that is most likely a separate bug. Looking at __atapi_pio_bytes(), it already has a safety check to ensure that __atapi_pio_bytes() cannot write outside the allocated buffer. Add a similar check to ata_pio_sector(), such that also ata_pio_sector() cannot write outside the allocated buffer. Cc: stable@vger.kernel.org Reported-by: reveliofuzzing Closes: https://lore.kernel.org/linux-ide/CA+-ZZ_jTgxh3bS7m+KX07_EWckSnW3N2adX3KV63y4g7M4CZ2A@mail.gmail.com/ Link: https://lore.kernel.org/r/20250127154303.15567-2-cassel@kernel.org Signed-off-by: Niklas Cassel drivers/ata/libata-sff.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit b05d66c882994fb63e8435bf64f262ef44c51874 Author: Vasily Gorbik Date: Mon Jan 27 15:23:02 2025 +0100 s390/vmem: Fix null-pointer-arithmetic warning in vmem_map_init() Fixes the following clang warning introduced by commit d7bebcb4a898 ("s390: Optimize __pa/__va when RANDOMIZE_IDENTITY_BASE is off") arch/s390/mm/vmem.c:665:36: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 665 | __set_memory_4k(__va(0), __va(0) + ident_map_size); | ~~~~~~~ ^ Fixes: d7bebcb4a898 ("s390: Optimize __pa/__va when RANDOMIZE_IDENTITY_BASE is off") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501270309.HzsVNo3o-lkp@intel.com/ Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Alexander Gordeev arch/s390/mm/vmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9ab28b3d21aec6d0f56fe722953e20ce470237b Author: Christoph Hellwig Date: Tue Jan 28 06:22:58 2025 +0100 xfs: remove xfs_buf_cache.bc_lock xfs_buf_cache.bc_lock serializes adding buffers to and removing them from the hashtable. But as the rhashtable code already uses fine grained internal locking for inserts and removals the extra protection isn't actually required. It also happens to fix a lock order inversion vs b_lock added by the recent lookup race fix. Fixes: ee10f6fcdb96 ("xfs: fix buffer lookup vs release race") Reported-by: Lai, Yi Signed-off-by: Christoph Hellwig Reviewed-by: Carlos Maiolino Reviewed-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 31 +++++++++++++++++-------------- fs/xfs/xfs_buf.h | 1 - 2 files changed, 17 insertions(+), 15 deletions(-) commit 3b8b80e993766dc96d1a1c01c62f5d15fafc79b9 Author: Nathan Chancellor Date: Wed Jan 22 19:54:27 2025 -0700 s390: Add '-std=gnu11' to decompressor and purgatory CFLAGS GCC 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, there are certain places in the s390 code that use their 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=gnu11' 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. Cc: stable@vger.kernel.org Signed-off-by: Nathan Chancellor Tested-by: Heiko Carstens Link: https://lore.kernel.org/r/20250122-s390-fix-std-for-gcc-15-v1-1-8b00cadee083@kernel.org Signed-off-by: Alexander Gordeev arch/s390/Makefile | 2 +- arch/s390/purgatory/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 519b2b14bef70922bd64117a978ea7f2a683b75b Author: Chenyuan Yang Date: Mon Jan 27 10:06:55 2025 -0600 ALSA: pcm: use new array-copying-wrapper This is found by our static analysis tool. pcm_native.c utilizes memdup_user() to copy an array from userspace. There is a new wrapper, specifically designed for copying arrays. Use this one instead. This is similar to the commit 3e91a38de1dc ("fbdev: viafb: use new array-copying-wrapper"). Signed-off-by: Chenyuan Yang Link: https://patch.msgid.link/20250127160655.3119470-1-cy1yang@outlook.com Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d61a53dd6f55405ebcaea6ee38d1ab5a8856c2c Merge: f34b580514c9 03511e936916 Author: Linus Torvalds Date: Mon Jan 27 20:58:58 2025 -0800 Merge tag 'f2fs-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this series, there are several major improvements such as folio conversion by Matthew, speed-up of block truncation, and caching more dentry pages. In addition, we implemented a linear dentry search to address recent unicode regression, and figured out some false alarms that we could get rid of. Enhancements: - foilio conversion in various IO paths - optimize f2fs_truncate_data_blocks_range() - cache more dentry pages - remove unnecessary blk_finish_plug - procfs: show mtime in segment_bits Bug fixes: - introduce linear search for dentries - don't call block truncation for aliased file - fix using wrong 'submitted' value in f2fs_write_cache_pages - fix to do sanity check correctly on i_inline_xattr_size - avoid trying to get invalid block address - fix inconsistent dirty state of atomic file" * tag 'f2fs-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (32 commits) f2fs: fix inconsistent dirty state of atomic file f2fs: fix to avoid changing 'check only' behaior of recovery f2fs: Clean up the loop outside of f2fs_invalidate_blocks() f2fs: procfs: show mtime in segment_bits f2fs: fix to avoid return invalid mtime from f2fs_get_section_mtime() f2fs: Fix format specifier in sanity_check_inode() f2fs: avoid trying to get invalid block address f2fs: fix to do sanity check correctly on i_inline_xattr_size f2fs: remove blk_finish_plug f2fs: Optimize f2fs_truncate_data_blocks_range() f2fs: fix using wrong 'submitted' value in f2fs_write_cache_pages f2fs: add parameter @len to f2fs_invalidate_blocks() f2fs: update_sit_entry_for_release() supports consecutive blocks. f2fs: introduce update_sit_entry_for_release/alloc() f2fs: don't call block truncation for aliased file f2fs: Introduce linear search for dentries f2fs: add parameter @len to f2fs_invalidate_internal_cache() f2fs: expand f2fs_invalidate_compress_page() to f2fs_invalidate_compress_pages_range() f2fs: ensure that node info flags are always initialized f2fs: The GC triggered by ioctl also needs to mark the segno as victim ... commit 5499b5ac0b2c661cc37190a23a4aee9308b3d3ee Author: Len Brown Date: Mon Jan 27 20:58:42 2025 -0600 tools/power turbostat: Harden one-shot mode against cpu offline when turbostat interval mode can't migrate to a CPU, it complains, prints no data, re-initializes with the new CPU configuration and starts a new interval. But this strategy in the face of a CPU hotplug offline during an interval doesn't help in one-shot mode. When the missing CPU is discovered at the end of the interval, the forked program has already returned and there is nothing left for a new interval to measure. So instead of aborting get_coutners() and delta_cpu() if a missing CPU is detected, complain, but carry on and output what statistics are actually present. Use the same strategy for delta_cpu when aperf:mperf are observed to have been reset -- complain, but carry on and print data for the CPUs that are still present. Interval mode error handling is unchanged. One-shot mode can now do this: $ sudo chcpu -e 1 ; sudo ./turbostat --quiet --show PkgWatt,Busy%,CPU chcpu -d 1 CPU 1 enabled CPU 1 disabled get_counters: Could not migrate to CPU 1 ./turbostat: Counter reset detected 0.036920 sec CPU Busy% PkgWatt - 0.00 10.00 0 99.73 10.00 1 0.00 2 91.53 3 16.83 Suggested-by: Zhang Rui Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit f34b580514c9816a317764e6b138ec66a4adab25 Merge: 7d6e5b525827 c92066e78600 Author: Linus Torvalds Date: Mon Jan 27 17:27:24 2025 -0800 Merge tag 'nfsd-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd updates from Chuck Lever: "Jeff Layton contributed an implementation of NFSv4.2+ attribute delegation, as described here: https://www.ietf.org/archive/id/draft-ietf-nfsv4-delstid-08.html This interoperates with similar functionality introduced into the Linux NFS client in v6.11. An attribute delegation permits an NFS client to manage a file's mtime, rather than flushing dirty data to the NFS server so that the file's mtime reflects the last write, which is considerably slower. Neil Brown contributed dynamic NFSv4.1 session slot table resizing. This facility enables NFSD to increase or decrease the number of slots per NFS session depending on server memory availability. More session slots means greater parallelism. Chuck Lever fixed a long-standing latent bug where NFSv4 COMPOUND encoding screws up when crossing a page boundary in the encoding buffer. This is a zero-day bug, but hitting it is rare and depends on the NFS client implementation. The Linux NFS client does not happen to trigger this issue. A variety of bug fixes and other incremental improvements fill out the list of commits in this release. Great thanks to all contributors, reviewers, testers, and bug reporters who participated during this development cycle" * tag 'nfsd-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: (42 commits) sunrpc: Remove gss_{de,en}crypt_xdr_buf deadcode sunrpc: Remove gss_generic_token deadcode sunrpc: Remove unused xprt_iter_get_xprt Revert "SUNRPC: Reduce thread wake-up rate when receiving large RPC messages" nfsd: implement OPEN_ARGS_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION nfsd: handle delegated timestamps in SETATTR nfsd: add support for delegated timestamps nfsd: rework NFS4_SHARE_WANT_* flag handling nfsd: add support for FATTR4_OPEN_ARGUMENTS nfsd: prepare delegation code for handing out *_ATTRS_DELEG delegations nfsd: rename NFS4_SHARE_WANT_* constants to OPEN4_SHARE_ACCESS_WANT_* nfsd: switch to autogenerated definitions for open_delegation_type4 nfs_common: make include/linux/nfs4.h include generated nfs4_1.h nfsd: fix handling of delegated change attr in CB_GETATTR SUNRPC: Document validity guarantees of the pointer returned by reserve_space NFSD: Insulate nfsd4_encode_fattr4() from page boundaries in the encode buffer NFSD: Insulate nfsd4_encode_secinfo() from page boundaries in the encode buffer NFSD: Refactor nfsd4_do_encode_secinfo() again NFSD: Insulate nfsd4_encode_readlink() from page boundaries in the encode buffer NFSD: Insulate nfsd4_encode_read_plus_data() from page boundaries in the encode buffer ... commit 7d6e5b525827c69b6d24716fa3e407441edfcf09 Merge: 9629d83f05bd 64179a1416e1 Author: Linus Torvalds Date: Mon Jan 27 17:17:16 2025 -0800 Merge tag 'drm-next-2025-01-27' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Simona Vetter: "cgroup: - fix Koncfig fallout from new dmem controller Driver Changes: - v3d NULL pointer regression fix in fence signalling race - virtio: uaf in dma_buf free path - xlnx: fix kerneldoc - bochs: fix double-free on driver removal - zynqmp: add missing locking to DP bridge driver - amdgpu fixes all over: - documentation, display, sriov, various hw block drivers - use drm/sched helper - mark some debug module options as unsafe - amdkfd: mark some debug module options as unsafe, trap handler updates, fix partial migration handling DRM core: - fix fbdev Kconfig select rules, improve tiled-based display support" * tag 'drm-next-2025-01-27' of https://gitlab.freedesktop.org/drm/kernel: (40 commits) drm/amd/display: Optimize cursor position updates drm/amd/display: Add hubp cache reset when powergating drm/amd/amdgpu: Enable scratch data dump for mes 12 drm/amd: Clarify kdoc for amdgpu.gttsize drm/amd/amdgpu: Prevent null pointer dereference in GPU bandwidth calculation drm/amd/display: Fix error pointers in amdgpu_dm_crtc_mem_type_changed drm/amdgpu: fix ring timeout issue in gfx10 sr-iov environment drm/amd/pm: Fix smu v13.0.6 caps initialization drm/amd/pm: Refactor SMU 13.0.6 SDMA reset firmware version checks revert "drm/amdgpu/pm: add definition PPSMC_MSG_ResetSDMA2" revert "drm/amdgpu/pm: Implement SDMA queue reset for different asic" drm/amd/pm: Add capability flags for SMU v13.0.6 drm/amd/display: fix SUBVP DC_DEBUG_MASK documentation drm/amd/display: fix CEC DC_DEBUG_MASK documentation drm/amdgpu: fix the PCIe lanes reporting in the INFO IOCTL drm/amdgpu: cache gpu pcie link width drm/amd/display: mark static functions noinline_for_stack drm/amdkfd: Clear MODE.VSKIP in gfx9 trap handler drm/amdgpu: Refine ip detection log message drm/amdgpu: Add handler for SDMA context empty ... commit 9629d83f05bdc7fdc21363979e96696886bd129a Merge: 13845bdc869f 8b8f80377657 Author: Linus Torvalds Date: Mon Jan 27 17:06:42 2025 -0800 Merge tag 'for-6.14/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mikulas Patocka: - fix a spelling error in dm-raid - change kzalloc to kcalloc - remove useless test in alloc_multiple_bios - disable REQ_NOWAIT for flushes - dm-transaction-manager: use red-black trees instead of linear lists - atomic writes support for dm-linear, dm-stripe and dm-mirror - dm-crypt: code cleanups and two bugfixes * tag 'for-6.14/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm-crypt: track tag_offset in convert_context dm-crypt: don't initialize cc_sector again dm-crypt: don't update io->sector after kcryptd_crypt_write_io_submit() dm-crypt: use bi_sector in bio when initialize integrity seed dm-crypt: fully initialize clone->bi_iter in crypt_alloc_buffer() dm-crypt: set atomic as false when calling crypt_convert() in kworker dm-mirror: Support atomic writes dm-io: Warn on creating multiple atomic write bios for a region dm-stripe: Enable atomic writes dm-linear: Enable atomic writes dm: Ensure cloned bio is same length for atomic write dm-table: atomic writes support dm-transaction-manager: use red-black trees instead of linear lists dm: disable REQ_NOWAIT for flushes dm: remove useless test in alloc_multiple_bios dm: change kzalloc to kcalloc dm raid: fix spelling errors in raid_ctr() commit 13845bdc869f136f92ad3d40ea09b867bb4ce467 Merge: 125ca745467d 970b9757cb44 Author: Linus Torvalds Date: Mon Jan 27 16:51:51 2025 -0800 Merge tag 'char-misc-6.14-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" set of char/misc/iio and other smaller driver subsystem updates for 6.14-rc1. Loads of different things in here this development cycle, highlights are: - ntsync "driver" to handle Windows locking types enabling Wine to work much better on many workloads (i.e. games). The driver framework was in 6.13, but now it's enabled and fully working properly. Should make many SteamOS users happy. Even comes with tests! - Large IIO driver updates and bugfixes - FPGA driver updates - Coresight driver updates - MHI driver updates - PPS driver updatesa - const bin_attribute reworking for many drivers - binder driver updates - smaller driver updates and fixes All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (311 commits) ntsync: Fix reference leaks in the remaining create ioctls. spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe() spmi: Set fwnode for spmi devices ntsync: fix a file reference leak in drivers/misc/ntsync.c scripts/tags.sh: Don't tag usages of DECLARE_BITMAP dt-bindings: interconnect: qcom,msm8998-bwmon: Add SM8750 CPU BWMONs dt-bindings: interconnect: OSM L3: Document sm8650 OSM L3 compatible dt-bindings: interconnect: qcom-bwmon: Document QCS615 bwmon compatibles interconnect: sm8750: Add missing const to static qcom_icc_desc memstick: core: fix kernel-doc notation intel_th: core: fix kernel-doc warnings binder: log transaction code on failure iio: dac: ad3552r-hs: clear reset status flag iio: dac: ad3552r-common: fix ad3541/2r ranges iio: chemical: bme680: Fix uninitialized variable in __bme680_read_raw() misc: fastrpc: Fix copy buffer page size misc: fastrpc: Fix registered buffer page address misc: fastrpc: Deregister device nodes properly in error scenarios nvmem: core: improve range check for nvmem_cell_write() nvmem: qcom-spmi-sdam: Set size in struct nvmem_config ... commit 125ca745467d4f87ae58e671a4a5714e024d2908 Merge: cc8b10fa7068 579b6f18c5ca Author: Linus Torvalds Date: Mon Jan 27 16:43:27 2025 -0800 Merge tag 'staging-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here's the pretty small staging driver tree update for 6.14-rc1. Not much happened this development cycle: - deleted some unused ioctl code from the rtl8723bs driver - gpib driver cleanups and fixes - other tiny minor coding style fixes. All of these have been in linux-next for a while with no reported issues" * tag 'staging-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (38 commits) staging: gpib: Agilent usb code cleanup staging: gpib: Fix NULL pointer dereference in detach staging: gpib: Fix inadvertent negative shift staging: gpib: fix prefixing 0x with decimal output staging: gpib: Use C99 syntax and make static staging: gpib: Avoid plain integers as NULL pointers staging: gpib: Use __user for user space pointers staging: gpib: Use __iomem attribute for io addresses staging: gpib: Add missing mutex unlock in ni usb driver staging: gpib: Add missing mutex unlock in agilent usb driver staging: gpib: Modernize gpib_interface_t initialization and make static staging: gpib: Remove commented-out debug code staging: rtl8723bs: Remove ioctl interface staging: gpib: tnt4882: Handle gpib_register_driver() errors staging: gpib: pc2: Handle gpib_register_driver() errors staging: gpib: ni_usb: Handle gpib_register_driver() errors staging: gpib: lpvo_usb: Return error value from gpib_register_driver() staging: gpib: ines: Handle gpib_register_driver() errors staging: gpib: hp_82341: Handle gpib_register_driver() errors staging: gpib: hp_82335: Return error value from gpib_register_driver() ... commit cc8b10fa70682218c2a318fc44f71f3175a23cc0 Merge: 078eac2b5ba3 70cd0576aa39 Author: Linus Torvalds Date: Mon Jan 27 16:29:16 2025 -0800 Merge tag 'usb-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt driver updates from Greg KH: "Here is the USB and Thunderbolt driver updates for 6.14-rc1. Nothing huge in here, just lots of new hardware support and updates for existing drivers. Changes here are: - big gadget f_tcm driver update - other gadget driver updates and fixes - thunderbolt driver updates for new hardware and capabilities and lots more debugging functionality to handle it when things aren't working well. - xhci driver updates - new USB-serial device updates - typec driver updates, including a chrome platform driver (acked by the subsystem maintainers) - other small driver updates All of these have been in linux-next for a while with no reported issues" * tag 'usb-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (123 commits) usb: hcd: Bump local buffer size in rh_string() Revert "usb: gadget: u_serial: Disable ep before setting port to null to fix the crash caused by port being null" usb: typec: tcpci: Prevent Sink disconnection before vPpsShutdown in SPR PPS usb: xhci: tegra: Fix OF boolean read warning usb: host: xhci-plat: add support compatible ID PNP0D15 usb: typec: ucsi: Add a macro definition for UCSI v1.0 usb: dwc3: core: Defer the probe until USB power supply ready usbip: Correct format specifier for seqnum from %d to %u usbip: Fix seqnum sign extension issue in vhci_tx_urb dt-bindings: usb: snps,dwc3: Split core description usb: quirks: Add NO_LPM quirk for TOSHIBA TransMemory-Mx device usb: dwc3: gadget: Reinitiate stream for all host NoStream behavior USB: Use str_enable_disable-like helpers USB: gadget: Use str_enable_disable-like helpers USB: phy: Use str_enable_disable-like helpers USB: typec: Use str_enable_disable-like helpers USB: host: Use str_enable_disable-like helpers USB: Replace own str_plural with common one USB: serial: quatech2: fix null-ptr-deref in qt2_process_read_urb() usb: phy: Remove API devm_usb_put_phy() ... commit c1feab95e0b2e9fce7e4f4b2739baf40d84543af Author: Al Viro Date: Thu Jan 23 22:51:04 2025 -0500 add a string-to-qstr constructor Quite a few places want to build a struct qstr by given string; it would be convenient to have a primitive doing that, rather than open-coding it via QSTR_INIT(). The closest approximation was in bcachefs, but that expands to initializer list - {.len = strlen(string), .name = string}. It would be more useful to have it as compound literal - (struct qstr){.len = strlen(string), .name = string}. Unlike initializer list it's a valid expression. What's more, it's a valid lvalue - it's an equivalent of anonymous local variable with such initializer, so the things like path->dentry = d_alloc_pseudo(mnt->mnt_sb, &QSTR(name)); are valid. It can also be used as initializer, with identical effect - struct qstr x = (struct qstr){.name = s, .len = strlen(s)}; is equivalent to struct qstr anon_variable = {.name = s, .len = strlen(s)}; struct qstr x = anon_variable; // anon_variable is never used after that point and any even remotely sane compiler will manage to collapse that into struct qstr x = {.name = s, .len = strlen(s)}; What compound literals can't be used for is initialization of global variables, but those are covered by QSTR_INIT(). This commit lifts definition(s) of QSTR() into linux/dcache.h, converts it to compound literal (all bcachefs users are fine with that) and converts assorted open-coded instances to using that. Signed-off-by: Al Viro fs/anon_inodes.c | 4 ++-- fs/bcachefs/fsck.c | 2 +- fs/bcachefs/recovery.c | 2 -- fs/bcachefs/util.h | 2 -- fs/erofs/xattr.c | 2 +- fs/file_table.c | 4 +--- fs/kernfs/file.c | 2 +- include/linux/dcache.h | 1 + mm/secretmem.c | 3 +-- net/sunrpc/rpc_pipe.c | 14 +++++--------- 10 files changed, 13 insertions(+), 23 deletions(-) commit 30d61efe118cad1a73ad2ad66a3298e4abdf9f41 Author: Al Viro Date: Sun Jan 5 21:33:17 2025 -0500 9p: fix ->rename_sem exclusion 9p wants to be able to build a path from given dentry to fs root and keep it valid over a blocking operation. ->s_vfs_rename_mutex would be a natural candidate, but there are places where we need that and where we have no way to tell if ->s_vfs_rename_mutex is already held deeper in callchain. Moreover, it's only held for cross-directory renames; name changes within the same directory happen without it. Solution: * have d_move() done in ->rename() rather than in its caller * maintain a 9p-private rwsem (per-filesystem) * hold it exclusive over the relevant part of ->rename() * hold it shared over the places where we want the path. That almost works. FS_RENAME_DOES_D_MOVE is enough to put all d_move() and d_exchange() calls under filesystem's control. However, there's also __d_unalias(), which isn't covered by any of that. If ->lookup() hits a directory inode with preexisting dentry elsewhere (due to e.g. rename done on server behind our back), d_splice_alias() called by ->lookup() will move/rename that alias. Add a couple of optional methods, so that __d_unalias() would do if alias->d_op->d_unalias_trylock != NULL if (!alias->d_op->d_unalias_trylock(alias)) fail (resulting in -ESTALE from lookup) __d_move(...) if alias->d_op->d_unalias_unlock != NULL alias->d_unalias_unlock(alias) where it currently does __d_move(). 9p instances do down_write_trylock() and up_write() of ->rename_mutex. Signed-off-by: Al Viro Documentation/filesystems/locking.rst | 4 ++++ Documentation/filesystems/vfs.rst | 21 +++++++++++++++++++++ fs/9p/v9fs.h | 2 +- fs/9p/vfs_dentry.c | 16 ++++++++++++++++ fs/dcache.c | 5 +++++ include/linux/dcache.h | 2 ++ 6 files changed, 49 insertions(+), 1 deletion(-) commit 90341f22c364d8ad55184ce2b8777545942dc5cf Author: Al Viro Date: Fri Jan 3 01:35:18 2025 -0500 orangefs_d_revalidate(): use stable parent inode and name passed by caller ->d_name use is a UAF if the userland side of things can be slowed down by attacker. Tested-by: Mike Marshall Signed-off-by: Al Viro fs/orangefs/dcache.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 9640fe5b5e40f664da401ac8ca5d7046edbc62db Author: Al Viro Date: Fri Jan 3 01:32:38 2025 -0500 ocfs2_dentry_revalidate(): use stable parent inode and name passed by caller theoretically, ->d_name use in there is a UAF, but only if you are messing with tracepoints... Reviewed-by: Jan Kara Signed-off-by: Al Viro fs/ocfs2/dcache.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit ffeeaada2bddb88078f16ba24f24ce8651c22d5b Author: Al Viro Date: Sun Dec 8 01:27:11 2024 -0500 nfs: fix ->d_revalidate() UAF on ->d_name accesses Pass the stable name all the way down to ->rpc_ops->lookup() instances. Note that passing &dentry->d_name is safe in e.g. nfs_lookup() - it *is* stable there, as it is in ->create() et.al. dget_parent() in nfs_instantiate() should be redundant - it'd better be stable there; if it's not, we have more trouble, since ->d_name would also be unsafe in such case. nfs_submount() and nfs4_submount() may or may not require fixes - if they ever get moved on server with fhandle preserved, we are in trouble there... UAF window is fairly narrow here and exfiltration requires the ability to watch the traffic. Reviewed-by: Jeff Layton Signed-off-by: Al Viro fs/nfs/dir.c | 14 ++++++++------ fs/nfs/namespace.c | 2 +- fs/nfs/nfs3proc.c | 5 ++--- fs/nfs/nfs4proc.c | 20 ++++++++++---------- fs/nfs/proc.c | 6 +++--- include/linux/nfs_xdr.h | 2 +- 6 files changed, 25 insertions(+), 24 deletions(-) commit 39f644a26600634aee00f179ba42cbe5437fd04f Author: Al Viro Date: Fri Jan 3 01:28:29 2025 -0500 nfs{,4}_lookup_validate(): use stable parent inode passed by caller we can't kill __nfs_lookup_revalidate() completely, but ->d_parent boilerplate in it is gone Reviewed-by: Jeff Layton Signed-off-by: Al Viro fs/nfs/dir.c | 43 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 30 deletions(-) commit eab2a11e5be68e42832957f6ad813db4bee4d18c Author: Al Viro Date: Fri Jan 3 01:23:50 2025 -0500 gfs2_drevalidate(): use stable parent inode and name passed by caller No need to mess with dget_parent() for the former; for the latter we really should not rely upon ->d_name.name remaining stable. Theoretically a UAF, but it's hard to exfiltrate the information... Reviewed-by: Andreas Gruenbacher Signed-off-by: Al Viro fs/gfs2/dentry.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit 19e1dbdc6b9e9b069bef94c6856364781338eb76 Author: Al Viro Date: Fri Jan 3 01:20:35 2025 -0500 fuse_dentry_revalidate(): use stable parent inode and name passed by caller No need to mess with dget_parent() for the former; for the latter we really should not rely upon ->d_name.name remaining stable - it's a real-life UAF. Reviewed-by: Jeff Layton Acked-by: Miklos Szeredi Signed-off-by: Al Viro fs/fuse/dir.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 464361133e6af521d1307ed89a54c4c181162c91 Author: Al Viro Date: Fri Jan 3 01:16:14 2025 -0500 vfat_revalidate{,_ci}(): use stable parent inode passed by caller Reviewed-by: Jeff Layton Signed-off-by: Al Viro fs/fat/namei_vfat.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 14d02c3dcf774f325c77d948eed05ff8196f94cc Author: Al Viro Date: Fri Jan 3 01:13:16 2025 -0500 exfat_d_revalidate(): use stable parent inode passed by caller ... no need to bother with ->d_lock and ->d_parent->d_inode. Reviewed-by: Jeff Layton Signed-off-by: Al Viro fs/exfat/namei.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit c4a9fe6319e3343ed26ac9d671d96decebc95a03 Author: Al Viro Date: Fri Jan 3 00:58:15 2025 -0500 fscrypt_d_revalidate(): use stable parent inode passed by caller The only thing it's using is parent directory inode and we are already given a stable reference to that - no need to bother with boilerplate. Reviewed-by: Jeff Layton Signed-off-by: Al Viro fs/crypto/fname.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit 541795cb0be6e29f79deff50831bc6caa72b5f8e Author: Al Viro Date: Tue Jan 7 10:04:11 2025 -0500 ceph_d_revalidate(): propagate stable name down into request encoding Currently get_fscrypt_altname() requires ->r_dentry->d_name to be stable and it gets that in almost all cases. The only exception is ->d_revalidate(), where we have a stable name, but it's passed separately - dentry->d_name is not stable there. Propagate it down to get_fscrypt_altname() as a new field of struct ceph_mds_request - ->r_dname, to be used instead ->r_dentry->d_name when non-NULL. Reviewed-by: Jeff Layton Signed-off-by: Al Viro fs/ceph/dir.c | 2 ++ fs/ceph/mds_client.c | 9 ++++++--- fs/ceph/mds_client.h | 2 ++ 3 files changed, 10 insertions(+), 3 deletions(-) commit bf636ed4a9521617ea309b063d8f67522d75a203 Author: Al Viro Date: Fri Jan 3 00:54:18 2025 -0500 ceph_d_revalidate(): use stable parent inode passed by caller No need to mess with the boilerplate for obtaining what we already have. Note that ceph is one of the "will want a path from filesystem root if we want to talk to server" cases, so the name of the last component is of little use - it is passed to fscrypt_d_revalidate() and it's used to deal with (also crypt-related) case in request marshalling, when encrypted name turns out to be too long. The former is not a problem, but the latter is racy; that part will be handled in the next commit. Reviewed-by: Jeff Layton Reviewed-by: Viacheslav Dubeyko Signed-off-by: Al Viro fs/ceph/dir.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit da192022f82f075709c60f070f72fae8a185ecff Author: Al Viro Date: Fri Jan 3 00:27:27 2025 -0500 afs_d_revalidate(): use stable name and parent inode passed by caller No need to bother with boilerplate for obtaining the latter and for the former we really should not count upon ->d_name.name remaining stable under us. Reviewed-by: Jeff Layton Acked-by: David Howells Signed-off-by: Al Viro fs/afs/dir.c | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) commit 5be1fa8abd7b049f51e6e98e75a37eef5ae2c296 Author: Al Viro Date: Sun Dec 8 00:28:51 2024 -0500 Pass parent directory inode and expected name to ->d_revalidate() ->d_revalidate() often needs to access dentry parent and name; that has to be done carefully, since the locking environment varies from caller to caller. We are not guaranteed that dentry in question will not be moved right under us - not unless the filesystem is such that nothing on it ever gets renamed. It can be dealt with, but that results in boilerplate code that isn't even needed - the callers normally have just found the dentry via dcache lookup and want to verify that it's in the right place; they already have the values of ->d_parent and ->d_name stable. There is a couple of exceptions (overlayfs and, to less extent, ecryptfs), but for the majority of calls that song and dance is not needed at all. It's easier to make ecryptfs and overlayfs find and pass those values if there's a ->d_revalidate() instance to be called, rather than doing that in the instances. This commit only changes the calling conventions; making use of supplied values is left to followups. NOTE: some instances need more than just the parent - things like CIFS may need to build an entire path from filesystem root, so they need more precautions than the usual boilerplate. This series doesn't do anything to that need - these filesystems have to keep their locking mechanisms (rename_lock loops, use of dentry_path_raw(), private rwsem a-la v9fs). One thing to keep in mind when using name is that name->name will normally point into the pathname being resolved; the filename in question occupies name->len bytes starting at name->name, and there is NUL somewhere after it, but it the next byte might very well be '/' rather than '\0'. Do not ignore name->len. Reviewed-by: Jeff Layton Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Al Viro Documentation/filesystems/locking.rst | 3 ++- Documentation/filesystems/porting.rst | 16 ++++++++++++++++ Documentation/filesystems/vfs.rst | 3 ++- fs/9p/vfs_dentry.c | 10 ++++++++-- fs/afs/dir.c | 6 ++++-- fs/ceph/dir.c | 5 +++-- fs/coda/dir.c | 3 ++- fs/crypto/fname.c | 3 ++- fs/ecryptfs/dentry.c | 18 ++++++++++++++---- fs/exfat/namei.c | 3 ++- fs/fat/namei_vfat.c | 6 ++++-- fs/fuse/dir.c | 3 ++- fs/gfs2/dentry.c | 7 +++++-- fs/hfs/sysdep.c | 3 ++- fs/jfs/namei.c | 3 ++- fs/kernfs/dir.c | 3 ++- fs/namei.c | 18 ++++++++++-------- fs/nfs/dir.c | 9 ++++++--- fs/ocfs2/dcache.c | 3 ++- fs/orangefs/dcache.c | 3 ++- fs/overlayfs/super.c | 22 ++++++++++++++++++++-- fs/proc/base.c | 6 ++++-- fs/proc/fd.c | 3 ++- fs/proc/generic.c | 6 ++++-- fs/proc/proc_sysctl.c | 3 ++- fs/smb/client/dir.c | 3 ++- fs/tracefs/inode.c | 3 ++- fs/vboxsf/dir.c | 3 ++- include/linux/dcache.h | 3 ++- include/linux/fscrypt.h | 7 ++++--- 30 files changed, 136 insertions(+), 51 deletions(-) commit 4c43ab1b100f95c410a8633d5a6eb9d74afb5b8d Author: Al Viro Date: Mon Dec 23 02:23:00 2024 -0500 generic_ci_d_compare(): use shortname_storage ... and check the "name might be unstable" predicate the right way. Reviewed-by: Jeff Layton Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Al Viro fs/libfs.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 7e3270165a8704ffb3948ef78f139aefc033135a Author: Al Viro Date: Mon Dec 9 20:10:42 2024 -0500 ext4 fast_commit: make use of name_snapshot primitives ... rather than open-coding them. As a bonus, that avoids the pointless work with extra allocations, etc. for long names. Reviewed-by: Jeff Layton Reviewed-by: Jan Kara Signed-off-by: Al Viro fs/ext4/fast_commit.c | 29 +++++------------------------ fs/ext4/fast_commit.h | 3 +-- 2 files changed, 6 insertions(+), 26 deletions(-) commit 95a4ccbbe596b45264af5e3a019cb920c05ccffd Author: Al Viro Date: Mon Dec 9 20:03:33 2024 -0500 dissolve external_name.u into separate members ... and document the constraints on the layout. Kept separate from the previous commit to keep the noise separate from actual changes. The reason for explicit __aligned() on ->name[] rather than relying upon the alignment of the previous field is that the previous iteration of that commit tried to save 4 bytes on 64bit by eliminating a hole in there, which broke the assumptions in dentry_string_cmp(). Better spell it out and avoid the temptation for the future... Reviewed-by: Jeff Layton Reviewed-by: Jan Kara Signed-off-by: Al Viro fs/dcache.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit b2aec4efe834130d190ed8052e3312761fb9e790 Merge: 463ec95a162d ee7d79433d78 Author: Jakub Kicinski Date: Mon Jan 27 16:16:31 2025 -0800 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-01-24 (idpf, ice, iavf) For idpf: Emil adds memory barrier when accessing control queue descriptors and restores call to idpf_vc_xn_shutdown() when resetting. Manoj Vishwanathan expands transaction lock to properly protect xn->salt value and adds additional debugging information. Marco Leogrande converts workqueues to be unbound. For ice: Przemek fixes incorrect size use for array. Mateusz removes reporting of invalid parameter and value. For iavf: Michal adjusts some VLAN changes to occur without a PF call to avoid timing issues with the calls. * '200GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: iavf: allow changing VLAN state without calling PF ice: remove invalid parameter of equalizer ice: fix ice_parser_rt::bst_key array size idpf: add more info during virtchnl transaction timeout/salt mismatch idpf: convert workqueues to unbound idpf: Acquire the lock before accessing the xn->salt idpf: fix transaction timeouts on reset idpf: add read memory barrier when checking descriptor done bit ==================== Link: https://patch.msgid.link/20250124213213.1328775-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit bde4ccfd5ab5361490514fc4af7497989cfbee17 Author: Ian Rogers Date: Thu Jan 23 20:38:56 2025 -0800 perf annotate: Use an array for the disassembler preference Prior to this change a string was used which could cause issues with an unrecognized disassembler in symbol__disassembler. Change to initializing an array of perf_disassembler enum values. If a value already exists then adding it a second time is ignored to avoid array out of bounds problems present in the previous code, it also allows a statically sized array and removes memory allocation needs. Errors in the disassembler string are reported when the config is parsed during perf annotate or perf top start up. If the array is uninitialized after processing the config file the default llvm, capstone then objdump values are added but without a need to parse a string. Fixes: a6e8a58de629 ("perf disasm: Allow configuring what disassemblers to use") Closes: https://lore.kernel.org/lkml/CAP-5=fUdfCyxmEiTpzS2uumUp3-SyQOseX2xZo81-dQtWXj6vA@mail.gmail.com/ Signed-off-by: Ian Rogers Tested-by: Namhyung Kim Link: https://lore.kernel.org/r/20250124043856.1177264-1-irogers@google.com Signed-off-by: Namhyung Kim tools/perf/util/annotate.c | 76 +++++++++++++++++++++++++++++++++++++++--- tools/perf/util/annotate.h | 15 ++++++--- tools/perf/util/disasm.c | 83 +++++++++------------------------------------- 3 files changed, 96 insertions(+), 78 deletions(-) commit 078eac2b5ba3532ad3ded7c4aa10df8712722c50 Merge: f28f4890454c da6b35378699 Author: Linus Torvalds Date: Mon Jan 27 15:45:29 2025 -0800 Merge tag 'pwm/for-6.14-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux Pull pwm fixes from Uwe Kleine-König: "Two fixes. Conor Dooley found and fixed a problem in the pwm-microchip-core driver that existed since the driver's birth in v6.5-rc1. It's about a corner case that only happens if two pwm devices of the same chip are set to the same long period. The other problem is about the new pwm API that currently is only supported by two hardware drivers. The fix prevents a NULL pointer exception if one of the new functions is called for a pwm device with a driver that only provides the old callbacks" * tag 'pwm/for-6.14-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: pwm: Ensure callbacks exist before calling them pwm: microchip-core: fix incorrect comparison with max period commit f28f4890454cc97c18d31ab4686957857cc862b5 Merge: deee7487f5d4 b4a95b8fd3e6 Author: Linus Torvalds Date: Mon Jan 27 15:37:16 2025 -0800 Merge tag 'for-v6.14' 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: - introduce power supply extensions, which allows adding properties to a power supply device from a separate driver. This will be used initially to extend the generic ACPI charger/battery driver with vendor extensions for charge thresholds. - convert all drivers from power_supply_for_each_device to new power_supply_for_each_psy(), which avoids lots of casting being done in the drivers. - avoid LED trigger like values in uevent for POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR - introduce POWER_SUPPLY_PROP_CHARGE_TYPES, which is similar to the POWER_SUPPLY_PROP_CHARGE_TYPE property, but also lists the available options on the specific platform Power-supply drivers - dell-laptop: use new power_supply_charge_types_show/_parse helpers - stc3117: new driver for equally named fuel gauge chip - bq24190: add support for new POWER_SUPPLY_PROP_CHARGE_TYPES - bq24190: add BQ24297 support - bq27xxx: add voltage min design for bq27000/bq27200 - cros_charge-control: convert to new power supply extension API - multiple drivers: constify 'struct bin_attribute' - ds2782: convert to device managed resources - max1720x: add charge full property - max1720x: support extra thermistor temperatures - max17042: add max77705 support - ip5xxx-power: add support for IP5306 - ltc4162-l-charger: add ltc4162-f/s and ltc4015 support - gpio-charger: support for default charge current limit - misc small cleanups and fixes Reset drivers: - at91-poweroff: add sam9x7 support" * tag 'for-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (77 commits) power: supply: max1720x: add support for reading internal and thermistor temperatures power: supply: ltc4162l: Use GENMASK macro in bitmask operation power: supply: max17042: add max77705 fuel gauge support dt-bindings: power: supply: max17042: add max77705 support power: supply: add undervoltage health status property power: supply: max17042: add platform driver variant power: supply: max17042: make interrupt shared power: reset: keystone: Use syscon_regmap_lookup_by_phandle_args power: supply: Use str_enable_disable-like helpers platform/x86: dell-laptop: Use power_supply_charge_types_show/_parse() helpers power: supply: bq2415x_charger: Immediately reschedule delayed work on notifier events power: supply: Add STC3117 fuel gauge unit driver dt-bindings: power: supply: Add STC3117 Fuel Gauge power: supply: ug3105_battery: Let the core handle POWER_SUPPLY_PROP_TECHNOLOGY power: supply: gpio-charger: add support for default charge current limit dt-bindings: power: supply: gpio-charger: add support for default charge current limit power: supply: Use power_supply_external_power_changed() in __power_supply_changed_work() power: supply: core: fix build of extension sysfs group if CONFIG_SYSFS=n power: supply: bq2415x_charger: report charging state changes to userspace bq27xxx: add voltage min design for bq27000 and bq27200 ... commit deee7487f5d495d0d9e5ab40d866d69ad524c46a Merge: 805ba04cb7cc 5820a3b08987 Author: Linus Torvalds Date: Mon Jan 27 15:26:06 2025 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: "A small number of improvements all over the place: - vdpa/octeon support for multiple interrupts - virtio-pci support for error recovery - vp_vdpa support for notification with data - vhost/net fix to set num_buffers for spec compliance - virtio-mem now works with kdump on s390 And small cleanups all over the place" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (23 commits) virtio_blk: Add support for transport error recovery virtio_pci: Add support for PCIe Function Level Reset vhost/net: Set num_buffers for virtio 1.0 vdpa/octeon_ep: read vendor-specific PCI capability virtio-pci: define type and header for PCI vendor data vdpa/octeon_ep: handle device config change events vdpa/octeon_ep: enable support for multiple interrupts per device vdpa: solidrun: Replace deprecated PCI functions s390/kdump: virtio-mem kdump support (CONFIG_PROC_VMCORE_DEVICE_RAM) virtio-mem: support CONFIG_PROC_VMCORE_DEVICE_RAM virtio-mem: remember usable region size virtio-mem: mark device ready before registering callbacks in kdump mode fs/proc/vmcore: introduce PROC_VMCORE_DEVICE_RAM to detect device RAM ranges in 2nd kernel fs/proc/vmcore: factor out freeing a list of vmcore ranges fs/proc/vmcore: factor out allocating a vmcore range and adding it to a list fs/proc/vmcore: move vmcore definitions out of kcore.h fs/proc/vmcore: prefix all pr_* with "vmcore:" fs/proc/vmcore: disallow vmcore modifications while the vmcore is open fs/proc/vmcore: replace vmcoredd_mutex by vmcore_mutex fs/proc/vmcore: convert vmcore_cb_lock into vmcore_mutex ... commit 463ec95a162d5036f81831c2cd8d6d661b1e7b9f Merge: 0154b949a16b 6c9b7db96db6 Author: Jakub Kicinski Date: Mon Jan 27 15:15:11 2025 -0800 Merge tag 'ipsec-2025-01-27' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2025-01-27 1) Fix incrementing the upper 32 bit sequence numbers for GSO skbs. From Jianbo Liu. 2) Fix an out-of-bounds read on xfrm state lookup. From Florian Westphal. 3) Fix secpath handling on packet offload mode. From Alexandre Cassen. 4) Fix the usage of skb->sk in the xfrm layer. 5) Don't disable preemption while looking up cache state to fix PREEMPT_RT. From Sebastian Sewior. * tag 'ipsec-2025-01-27' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec: xfrm: Don't disable preemption while looking up cache state. xfrm: Fix the usage of skb->sk xfrm: delete intermediate secpath entry in packet offload mode xfrm: state: fix out-of-bounds read during lookup xfrm: replay: Fix the update of replay_esn->oseq_hi for GSO ==================== Link: https://patch.msgid.link/20250127060757.3946314-1-steffen.klassert@secunet.com Signed-off-by: Jakub Kicinski commit 0154b949a16b989104fef2df91c48be26a593af1 Merge: 19e65c45a150 619af16b3b57 Author: Jakub Kicinski Date: Mon Jan 27 15:07:08 2025 -0800 Merge branch 'mptcp-fixes-addressing-syzbot-reports' Matthieu Baerts says: ==================== mptcp: fixes addressing syzbot reports Recently, a few issues linked to MPTCP have been reported by syzbot. All the remaining ones are addressed in this series. - Patch 1: Address "KMSAN: uninit-value in mptcp_incoming_options (2)". A fix for v5.11. - Patch 2: Address "WARNING in mptcp_pm_nl_set_flags (2)". A fix for v5.18. - Patch 3: Address "WARNING in __mptcp_clean_una (2)". A fix for v6.4, backported up to v6.1. ==================== Link: https://patch.msgid.link/20250123-net-mptcp-syzbot-issues-v1-0-af73258a726f@kernel.org Signed-off-by: Jakub Kicinski commit 619af16b3b57a3a4ee50b9a30add9ff155541e71 Author: Paolo Abeni Date: Thu Jan 23 19:05:56 2025 +0100 mptcp: handle fastopen disconnect correctly Syzbot was able to trigger a data stream corruption: WARNING: CPU: 0 PID: 9846 at net/mptcp/protocol.c:1024 __mptcp_clean_una+0xddb/0xff0 net/mptcp/protocol.c:1024 Modules linked in: CPU: 0 UID: 0 PID: 9846 Comm: syz-executor351 Not tainted 6.13.0-rc2-syzkaller-00059-g00a5acdbf398 #0 Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 11/25/2024 RIP: 0010:__mptcp_clean_una+0xddb/0xff0 net/mptcp/protocol.c:1024 Code: fa ff ff 48 8b 4c 24 18 80 e1 07 fe c1 38 c1 0f 8c 8e fa ff ff 48 8b 7c 24 18 e8 e0 db 54 f6 e9 7f fa ff ff e8 e6 80 ee f5 90 <0f> 0b 90 4c 8b 6c 24 40 4d 89 f4 e9 04 f5 ff ff 44 89 f1 80 e1 07 RSP: 0018:ffffc9000c0cf400 EFLAGS: 00010293 RAX: ffffffff8bb0dd5a RBX: ffff888033f5d230 RCX: ffff888059ce8000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000c0cf518 R08: ffffffff8bb0d1dd R09: 1ffff110170c8928 R10: dffffc0000000000 R11: ffffed10170c8929 R12: 0000000000000000 R13: ffff888033f5d220 R14: dffffc0000000000 R15: ffff8880592b8000 FS: 00007f6e866496c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f6e86f491a0 CR3: 00000000310e6000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __mptcp_clean_una_wakeup+0x7f/0x2d0 net/mptcp/protocol.c:1074 mptcp_release_cb+0x7cb/0xb30 net/mptcp/protocol.c:3493 release_sock+0x1aa/0x1f0 net/core/sock.c:3640 inet_wait_for_connect net/ipv4/af_inet.c:609 [inline] __inet_stream_connect+0x8bd/0xf30 net/ipv4/af_inet.c:703 mptcp_sendmsg_fastopen+0x2a2/0x530 net/mptcp/protocol.c:1755 mptcp_sendmsg+0x1884/0x1b10 net/mptcp/protocol.c:1830 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x1a6/0x270 net/socket.c:726 ____sys_sendmsg+0x52a/0x7e0 net/socket.c:2583 ___sys_sendmsg net/socket.c:2637 [inline] __sys_sendmsg+0x269/0x350 net/socket.c:2669 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 RIP: 0033:0x7f6e86ebfe69 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 1f 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:00007f6e86649168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f6e86f491b8 RCX: 00007f6e86ebfe69 RDX: 0000000030004001 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 00007f6e86f491b0 R08: 00007f6e866496c0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f6e86f491bc R13: 000000000000006e R14: 00007ffe445d9420 R15: 00007ffe445d9508 The root cause is the bad handling of disconnect() generated internally by the MPTCP protocol in case of connect FASTOPEN errors. Address the issue increasing the socket disconnect counter even on such a case, to allow other threads waiting on the same socket lock to properly error out. Fixes: c2b2ae3925b6 ("mptcp: handle correctly disconnect() failures") Cc: stable@vger.kernel.org Reported-by: syzbot+ebc0b8ae5d3590b2c074@syzkaller.appspotmail.com Closes: https://lore.kernel.org/67605870.050a0220.37aaf.0137.GAE@google.com Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/537 Tested-by: syzbot+ebc0b8ae5d3590b2c074@syzkaller.appspotmail.com Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250123-net-mptcp-syzbot-issues-v1-3-af73258a726f@kernel.org Signed-off-by: Jakub Kicinski net/mptcp/protocol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1bb0d1348546ad059f55c93def34e67cb2a034a6 Author: Matthieu Baerts (NGI0) Date: Thu Jan 23 19:05:55 2025 +0100 mptcp: pm: only set fullmesh for subflow endp With the in-kernel path-manager, it is possible to change the 'fullmesh' flag. The code in mptcp_pm_nl_fullmesh() expects to change it only on 'subflow' endpoints, to recreate more or less subflows using the linked address. Unfortunately, the set_flags() hook was a bit more permissive, and allowed 'implicit' endpoints to get the 'fullmesh' flag while it is not allowed before. That's what syzbot found, triggering the following warning: WARNING: CPU: 0 PID: 6499 at net/mptcp/pm_netlink.c:1496 __mark_subflow_endp_available net/mptcp/pm_netlink.c:1496 [inline] WARNING: CPU: 0 PID: 6499 at net/mptcp/pm_netlink.c:1496 mptcp_pm_nl_fullmesh net/mptcp/pm_netlink.c:1980 [inline] WARNING: CPU: 0 PID: 6499 at net/mptcp/pm_netlink.c:1496 mptcp_nl_set_flags net/mptcp/pm_netlink.c:2003 [inline] WARNING: CPU: 0 PID: 6499 at net/mptcp/pm_netlink.c:1496 mptcp_pm_nl_set_flags+0x974/0xdc0 net/mptcp/pm_netlink.c:2064 Modules linked in: CPU: 0 UID: 0 PID: 6499 Comm: syz.1.413 Not tainted 6.13.0-rc5-syzkaller-00172-gd1bf27c4e176 #0 Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 RIP: 0010:__mark_subflow_endp_available net/mptcp/pm_netlink.c:1496 [inline] RIP: 0010:mptcp_pm_nl_fullmesh net/mptcp/pm_netlink.c:1980 [inline] RIP: 0010:mptcp_nl_set_flags net/mptcp/pm_netlink.c:2003 [inline] RIP: 0010:mptcp_pm_nl_set_flags+0x974/0xdc0 net/mptcp/pm_netlink.c:2064 Code: 01 00 00 49 89 c5 e8 fb 45 e8 f5 e9 b8 fc ff ff e8 f1 45 e8 f5 4c 89 f7 be 03 00 00 00 e8 44 1d 0b f9 eb a0 e8 dd 45 e8 f5 90 <0f> 0b 90 e9 17 ff ff ff 89 d9 80 e1 07 38 c1 0f 8c c9 fc ff ff 48 RSP: 0018:ffffc9000d307240 EFLAGS: 00010293 RAX: ffffffff8bb72e03 RBX: 0000000000000000 RCX: ffff88807da88000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000d307430 R08: ffffffff8bb72cf0 R09: 1ffff1100b842a5e R10: dffffc0000000000 R11: ffffed100b842a5f R12: ffff88801e2e5ac0 R13: ffff88805c214800 R14: ffff88805c2152e8 R15: 1ffff1100b842a5d FS: 00005555619f6500(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020002840 CR3: 00000000247e6000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline] genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0xb14/0xec0 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2542 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:726 ____sys_sendmsg+0x52a/0x7e0 net/socket.c:2583 ___sys_sendmsg net/socket.c:2637 [inline] __sys_sendmsg+0x269/0x350 net/socket.c:2669 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 RIP: 0033:0x7f5fe8785d29 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:00007fff571f5558 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f5fe8975fa0 RCX: 00007f5fe8785d29 RDX: 0000000000000000 RSI: 0000000020000480 RDI: 0000000000000007 RBP: 00007f5fe8801b08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5fe8975fa0 R14: 00007f5fe8975fa0 R15: 00000000000011f4 Here, syzbot managed to set the 'fullmesh' flag on an 'implicit' and used -- according to 'id_avail_bitmap' -- endpoint, causing the PM to try decrement the local_addr_used counter which is only incremented for the 'subflow' endpoint. Note that 'no type' endpoints -- not 'subflow', 'signal', 'implicit' -- are fine, because their ID will not be marked as used in the 'id_avail' bitmap, and setting 'fullmesh' can help forcing the creation of subflow when receiving an ADD_ADDR. Fixes: 73c762c1f07d ("mptcp: set fullmesh flag in pm_netlink") Cc: stable@vger.kernel.org Reported-by: syzbot+cd16e79c1e45f3fe0377@syzkaller.appspotmail.com Closes: https://lore.kernel.org/6786ac51.050a0220.216c54.00a6.GAE@google.com Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/540 Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250123-net-mptcp-syzbot-issues-v1-2-af73258a726f@kernel.org Signed-off-by: Jakub Kicinski net/mptcp/pm_netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c86b000782daba926c627d2fa00c3f60a75e7472 Author: Paolo Abeni Date: Thu Jan 23 19:05:54 2025 +0100 mptcp: consolidate suboption status MPTCP maintains the received sub-options status is the bitmask carrying the received suboptions and in several bitfields carrying per suboption additional info. Zeroing the bitmask before parsing is not enough to ensure a consistent status, and the MPTCP code has to additionally clear some bitfiled depending on the actually parsed suboption. The above schema is fragile, and syzbot managed to trigger a path where a relevant bitfield is not cleared/initialized: BUG: KMSAN: uninit-value in __mptcp_expand_seq net/mptcp/options.c:1030 [inline] BUG: KMSAN: uninit-value in mptcp_expand_seq net/mptcp/protocol.h:864 [inline] BUG: KMSAN: uninit-value in ack_update_msk net/mptcp/options.c:1060 [inline] BUG: KMSAN: uninit-value in mptcp_incoming_options+0x2036/0x3d30 net/mptcp/options.c:1209 __mptcp_expand_seq net/mptcp/options.c:1030 [inline] mptcp_expand_seq net/mptcp/protocol.h:864 [inline] ack_update_msk net/mptcp/options.c:1060 [inline] mptcp_incoming_options+0x2036/0x3d30 net/mptcp/options.c:1209 tcp_data_queue+0xb4/0x7be0 net/ipv4/tcp_input.c:5233 tcp_rcv_established+0x1061/0x2510 net/ipv4/tcp_input.c:6264 tcp_v4_do_rcv+0x7f3/0x11a0 net/ipv4/tcp_ipv4.c:1916 tcp_v4_rcv+0x51df/0x5750 net/ipv4/tcp_ipv4.c:2351 ip_protocol_deliver_rcu+0x2a3/0x13d0 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x336/0x500 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:314 [inline] ip_local_deliver+0x21f/0x490 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:460 [inline] ip_rcv_finish+0x4a2/0x520 net/ipv4/ip_input.c:447 NF_HOOK include/linux/netfilter.h:314 [inline] ip_rcv+0xcd/0x380 net/ipv4/ip_input.c:567 __netif_receive_skb_one_core net/core/dev.c:5704 [inline] __netif_receive_skb+0x319/0xa00 net/core/dev.c:5817 process_backlog+0x4ad/0xa50 net/core/dev.c:6149 __napi_poll+0xe7/0x980 net/core/dev.c:6902 napi_poll net/core/dev.c:6971 [inline] net_rx_action+0xa5a/0x19b0 net/core/dev.c:7093 handle_softirqs+0x1a0/0x7c0 kernel/softirq.c:561 __do_softirq+0x14/0x1a kernel/softirq.c:595 do_softirq+0x9a/0x100 kernel/softirq.c:462 __local_bh_enable_ip+0x9f/0xb0 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+0x2758/0x57d0 net/core/dev.c:4493 dev_queue_xmit include/linux/netdevice.h:3168 [inline] neigh_hh_output include/net/neighbour.h:523 [inline] neigh_output include/net/neighbour.h:537 [inline] ip_finish_output2+0x187c/0x1b70 net/ipv4/ip_output.c:236 __ip_finish_output+0x287/0x810 ip_finish_output+0x4b/0x600 net/ipv4/ip_output.c:324 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip_output+0x15f/0x3f0 net/ipv4/ip_output.c:434 dst_output include/net/dst.h:450 [inline] ip_local_out net/ipv4/ip_output.c:130 [inline] __ip_queue_xmit+0x1f2a/0x20d0 net/ipv4/ip_output.c:536 ip_queue_xmit+0x60/0x80 net/ipv4/ip_output.c:550 __tcp_transmit_skb+0x3cea/0x4900 net/ipv4/tcp_output.c:1468 tcp_transmit_skb net/ipv4/tcp_output.c:1486 [inline] tcp_write_xmit+0x3b90/0x9070 net/ipv4/tcp_output.c:2829 __tcp_push_pending_frames+0xc4/0x380 net/ipv4/tcp_output.c:3012 tcp_send_fin+0x9f6/0xf50 net/ipv4/tcp_output.c:3618 __tcp_close+0x140c/0x1550 net/ipv4/tcp.c:3130 __mptcp_close_ssk+0x74e/0x16f0 net/mptcp/protocol.c:2496 mptcp_close_ssk+0x26b/0x2c0 net/mptcp/protocol.c:2550 mptcp_pm_nl_rm_addr_or_subflow+0x635/0xd10 net/mptcp/pm_netlink.c:889 mptcp_pm_nl_rm_subflow_received net/mptcp/pm_netlink.c:924 [inline] mptcp_pm_flush_addrs_and_subflows net/mptcp/pm_netlink.c:1688 [inline] mptcp_nl_flush_addrs_list net/mptcp/pm_netlink.c:1709 [inline] mptcp_pm_nl_flush_addrs_doit+0xe10/0x1630 net/mptcp/pm_netlink.c:1750 genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline] genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0x1214/0x12c0 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2542 genl_rcv+0x40/0x60 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0xf52/0x1260 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x10da/0x11e0 net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x30f/0x380 net/socket.c:726 ____sys_sendmsg+0x877/0xb60 net/socket.c:2583 ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2637 __sys_sendmsg net/socket.c:2669 [inline] __do_sys_sendmsg net/socket.c:2674 [inline] __se_sys_sendmsg net/socket.c:2672 [inline] __x64_sys_sendmsg+0x212/0x3c0 net/socket.c:2672 x64_sys_call+0x2ed6/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Uninit was stored to memory at: mptcp_get_options+0x2c0f/0x2f20 net/mptcp/options.c:397 mptcp_incoming_options+0x19a/0x3d30 net/mptcp/options.c:1150 tcp_data_queue+0xb4/0x7be0 net/ipv4/tcp_input.c:5233 tcp_rcv_established+0x1061/0x2510 net/ipv4/tcp_input.c:6264 tcp_v4_do_rcv+0x7f3/0x11a0 net/ipv4/tcp_ipv4.c:1916 tcp_v4_rcv+0x51df/0x5750 net/ipv4/tcp_ipv4.c:2351 ip_protocol_deliver_rcu+0x2a3/0x13d0 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x336/0x500 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:314 [inline] ip_local_deliver+0x21f/0x490 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:460 [inline] ip_rcv_finish+0x4a2/0x520 net/ipv4/ip_input.c:447 NF_HOOK include/linux/netfilter.h:314 [inline] ip_rcv+0xcd/0x380 net/ipv4/ip_input.c:567 __netif_receive_skb_one_core net/core/dev.c:5704 [inline] __netif_receive_skb+0x319/0xa00 net/core/dev.c:5817 process_backlog+0x4ad/0xa50 net/core/dev.c:6149 __napi_poll+0xe7/0x980 net/core/dev.c:6902 napi_poll net/core/dev.c:6971 [inline] net_rx_action+0xa5a/0x19b0 net/core/dev.c:7093 handle_softirqs+0x1a0/0x7c0 kernel/softirq.c:561 __do_softirq+0x14/0x1a kernel/softirq.c:595 Uninit was stored to memory at: put_unaligned_be32 include/linux/unaligned.h:68 [inline] mptcp_write_options+0x17f9/0x3100 net/mptcp/options.c:1417 mptcp_options_write net/ipv4/tcp_output.c:465 [inline] tcp_options_write+0x6d9/0xe90 net/ipv4/tcp_output.c:759 __tcp_transmit_skb+0x294b/0x4900 net/ipv4/tcp_output.c:1414 tcp_transmit_skb net/ipv4/tcp_output.c:1486 [inline] tcp_write_xmit+0x3b90/0x9070 net/ipv4/tcp_output.c:2829 __tcp_push_pending_frames+0xc4/0x380 net/ipv4/tcp_output.c:3012 tcp_send_fin+0x9f6/0xf50 net/ipv4/tcp_output.c:3618 __tcp_close+0x140c/0x1550 net/ipv4/tcp.c:3130 __mptcp_close_ssk+0x74e/0x16f0 net/mptcp/protocol.c:2496 mptcp_close_ssk+0x26b/0x2c0 net/mptcp/protocol.c:2550 mptcp_pm_nl_rm_addr_or_subflow+0x635/0xd10 net/mptcp/pm_netlink.c:889 mptcp_pm_nl_rm_subflow_received net/mptcp/pm_netlink.c:924 [inline] mptcp_pm_flush_addrs_and_subflows net/mptcp/pm_netlink.c:1688 [inline] mptcp_nl_flush_addrs_list net/mptcp/pm_netlink.c:1709 [inline] mptcp_pm_nl_flush_addrs_doit+0xe10/0x1630 net/mptcp/pm_netlink.c:1750 genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline] genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0x1214/0x12c0 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2542 genl_rcv+0x40/0x60 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0xf52/0x1260 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x10da/0x11e0 net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x30f/0x380 net/socket.c:726 ____sys_sendmsg+0x877/0xb60 net/socket.c:2583 ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2637 __sys_sendmsg net/socket.c:2669 [inline] __do_sys_sendmsg net/socket.c:2674 [inline] __se_sys_sendmsg net/socket.c:2672 [inline] __x64_sys_sendmsg+0x212/0x3c0 net/socket.c:2672 x64_sys_call+0x2ed6/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Uninit was stored to memory at: mptcp_pm_add_addr_signal+0x3d7/0x4c0 mptcp_established_options_add_addr net/mptcp/options.c:666 [inline] mptcp_established_options+0x1b9b/0x3a00 net/mptcp/options.c:884 tcp_established_options+0x2c4/0x7d0 net/ipv4/tcp_output.c:1012 __tcp_transmit_skb+0x5b7/0x4900 net/ipv4/tcp_output.c:1333 tcp_transmit_skb net/ipv4/tcp_output.c:1486 [inline] tcp_write_xmit+0x3b90/0x9070 net/ipv4/tcp_output.c:2829 __tcp_push_pending_frames+0xc4/0x380 net/ipv4/tcp_output.c:3012 tcp_send_fin+0x9f6/0xf50 net/ipv4/tcp_output.c:3618 __tcp_close+0x140c/0x1550 net/ipv4/tcp.c:3130 __mptcp_close_ssk+0x74e/0x16f0 net/mptcp/protocol.c:2496 mptcp_close_ssk+0x26b/0x2c0 net/mptcp/protocol.c:2550 mptcp_pm_nl_rm_addr_or_subflow+0x635/0xd10 net/mptcp/pm_netlink.c:889 mptcp_pm_nl_rm_subflow_received net/mptcp/pm_netlink.c:924 [inline] mptcp_pm_flush_addrs_and_subflows net/mptcp/pm_netlink.c:1688 [inline] mptcp_nl_flush_addrs_list net/mptcp/pm_netlink.c:1709 [inline] mptcp_pm_nl_flush_addrs_doit+0xe10/0x1630 net/mptcp/pm_netlink.c:1750 genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline] genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0x1214/0x12c0 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2542 genl_rcv+0x40/0x60 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0xf52/0x1260 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x10da/0x11e0 net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x30f/0x380 net/socket.c:726 ____sys_sendmsg+0x877/0xb60 net/socket.c:2583 ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2637 __sys_sendmsg net/socket.c:2669 [inline] __do_sys_sendmsg net/socket.c:2674 [inline] __se_sys_sendmsg net/socket.c:2672 [inline] __x64_sys_sendmsg+0x212/0x3c0 net/socket.c:2672 x64_sys_call+0x2ed6/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Uninit was stored to memory at: mptcp_pm_add_addr_received+0x95f/0xdd0 net/mptcp/pm.c:235 mptcp_incoming_options+0x2983/0x3d30 net/mptcp/options.c:1169 tcp_data_queue+0xb4/0x7be0 net/ipv4/tcp_input.c:5233 tcp_rcv_state_process+0x2a38/0x49d0 net/ipv4/tcp_input.c:6972 tcp_v4_do_rcv+0xbf9/0x11a0 net/ipv4/tcp_ipv4.c:1939 tcp_v4_rcv+0x51df/0x5750 net/ipv4/tcp_ipv4.c:2351 ip_protocol_deliver_rcu+0x2a3/0x13d0 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x336/0x500 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:314 [inline] ip_local_deliver+0x21f/0x490 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:460 [inline] ip_rcv_finish+0x4a2/0x520 net/ipv4/ip_input.c:447 NF_HOOK include/linux/netfilter.h:314 [inline] ip_rcv+0xcd/0x380 net/ipv4/ip_input.c:567 __netif_receive_skb_one_core net/core/dev.c:5704 [inline] __netif_receive_skb+0x319/0xa00 net/core/dev.c:5817 process_backlog+0x4ad/0xa50 net/core/dev.c:6149 __napi_poll+0xe7/0x980 net/core/dev.c:6902 napi_poll net/core/dev.c:6971 [inline] net_rx_action+0xa5a/0x19b0 net/core/dev.c:7093 handle_softirqs+0x1a0/0x7c0 kernel/softirq.c:561 __do_softirq+0x14/0x1a kernel/softirq.c:595 Local variable mp_opt created at: mptcp_incoming_options+0x119/0x3d30 net/mptcp/options.c:1127 tcp_data_queue+0xb4/0x7be0 net/ipv4/tcp_input.c:5233 The current schema is too fragile; address the issue grouping all the state-related data together and clearing the whole group instead of just the bitmask. This also cleans-up the code a bit, as there is no need to individually clear "random" bitfield in a couple of places any more. Fixes: 84dfe3677a6f ("mptcp: send out dedicated ADD_ADDR packet") Cc: stable@vger.kernel.org Reported-by: syzbot+23728c2df58b3bd175ad@syzkaller.appspotmail.com Closes: https://lore.kernel.org/6786ac51.050a0220.216c54.00a7.GAE@google.com Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/541 Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250123-net-mptcp-syzbot-issues-v1-1-af73258a726f@kernel.org Signed-off-by: Jakub Kicinski net/mptcp/options.c | 13 +++++-------- net/mptcp/protocol.h | 30 ++++++++++++++++-------------- 2 files changed, 21 insertions(+), 22 deletions(-) commit 19e65c45a1507a1a2926649d2db3583ed9d55fd9 Author: Chenyuan Yang Date: Thu Jan 23 15:42:13 2025 -0600 net: davicom: fix UAF in dm9000_drv_remove dm is netdev private data and it cannot be used after free_netdev() call. Using dm after free_netdev() can cause UAF bug. Fix it by moving free_netdev() at the end of the function. This is similar to the issue fixed in commit ad297cd2db89 ("net: qcom/emac: fix UAF in emac_remove"). This bug is detected by our static analysis tool. Fixes: cf9e60aa69ae ("net: davicom: Fix regulator not turned off on driver removal") Signed-off-by: Chenyuan Yang CC: Uwe Kleine-König Link: https://patch.msgid.link/20250123214213.623518-1-chenyuan0y@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/davicom/dm9000.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bd1bbab717608757cccbbe08b0d46e6c3ed0ced5 Author: Milos Reljin Date: Fri Jan 24 10:41:02 2025 +0000 net: phy: c45-tjaxx: add delay between MDIO write and read in soft_reset In application note (AN13663) for TJA1120, on page 30, there's a figure with average PHY startup timing values following software reset. The time it takes for SMI to become operational after software reset ranges roughly from 500 us to 1500 us. This commit adds 2000 us delay after MDIO write which triggers software reset. Without this delay, soft_reset function returns an error and prevents successful PHY init. Cc: stable@vger.kernel.org Fixes: b050f2f15e04 ("phy: nxp-c45: add driver for tja1103") Signed-off-by: Milos Reljin Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/AM8P250MB0124D258E5A71041AF2CC322E1E32@AM8P250MB0124.EURP250.PROD.OUTLOOK.COM Signed-off-by: Jakub Kicinski drivers/net/phy/nxp-c45-tja11xx.c | 2 ++ 1 file changed, 2 insertions(+) commit b32c36975da48afc9089f8b61f7b2dcc40e479d2 Author: Len Brown Date: Mon Jan 27 16:42:19 2025 -0600 tools/power turbostat: Fix forked child affinity regression In "one-shot" mode, turbostat 1. takes a counter snapshot 2. forks and waits for a child 3. takes the end counter snapshot and prints the result. But turbostat counter snapshots currently use affinity to travel around the system so that counter reads are "local", and this affinity must be cleared between #1 and #2 above. The offending commit removed that reset that allowed the child to run on cpu_present_set. Fix that issue, and improve upon the original by using cpu_possible_set for the child. This allows the child to also run on CPUs that hotplug online during its runtime. Reported-by: Zhang Rui Fixes: 7bb3fe27ad4f ("tools/power/turbostat: Obey allowed CPUs during startup") Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 54 +++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) commit 5066293b9b7046a906eff60e3949a887ae185a43 Author: Shigeru Yoshida Date: Thu Jan 23 23:57:46 2025 +0900 vxlan: Fix uninit-value in vxlan_vnifilter_dump() KMSAN reported an uninit-value access in vxlan_vnifilter_dump() [1]. If the length of the netlink message payload is less than sizeof(struct tunnel_msg), vxlan_vnifilter_dump() accesses bytes beyond the message. This can lead to uninit-value access. Fix this by returning an error in such situations. [1] BUG: KMSAN: uninit-value in vxlan_vnifilter_dump+0x328/0x920 drivers/net/vxlan/vxlan_vnifilter.c:422 vxlan_vnifilter_dump+0x328/0x920 drivers/net/vxlan/vxlan_vnifilter.c:422 rtnl_dumpit+0xd5/0x2f0 net/core/rtnetlink.c:6786 netlink_dump+0x93e/0x15f0 net/netlink/af_netlink.c:2317 __netlink_dump_start+0x716/0xd60 net/netlink/af_netlink.c:2432 netlink_dump_start include/linux/netlink.h:340 [inline] rtnetlink_dump_start net/core/rtnetlink.c:6815 [inline] rtnetlink_rcv_msg+0x1256/0x14a0 net/core/rtnetlink.c:6882 netlink_rcv_skb+0x467/0x660 net/netlink/af_netlink.c:2542 rtnetlink_rcv+0x35/0x40 net/core/rtnetlink.c:6944 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0xed6/0x1290 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x1092/0x1230 net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x330/0x3d0 net/socket.c:726 ____sys_sendmsg+0x7f4/0xb50 net/socket.c:2583 ___sys_sendmsg+0x271/0x3b0 net/socket.c:2637 __sys_sendmsg net/socket.c:2669 [inline] __do_sys_sendmsg net/socket.c:2674 [inline] __se_sys_sendmsg net/socket.c:2672 [inline] __x64_sys_sendmsg+0x211/0x3e0 net/socket.c:2672 x64_sys_call+0x3878/0x3d90 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd9/0x1d0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Uninit was created at: slab_post_alloc_hook mm/slub.c:4110 [inline] slab_alloc_node mm/slub.c:4153 [inline] kmem_cache_alloc_node_noprof+0x800/0xe80 mm/slub.c:4205 kmalloc_reserve+0x13b/0x4b0 net/core/skbuff.c:587 __alloc_skb+0x347/0x7d0 net/core/skbuff.c:678 alloc_skb include/linux/skbuff.h:1323 [inline] netlink_alloc_large_skb+0xa5/0x280 net/netlink/af_netlink.c:1196 netlink_sendmsg+0xac9/0x1230 net/netlink/af_netlink.c:1866 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x330/0x3d0 net/socket.c:726 ____sys_sendmsg+0x7f4/0xb50 net/socket.c:2583 ___sys_sendmsg+0x271/0x3b0 net/socket.c:2637 __sys_sendmsg net/socket.c:2669 [inline] __do_sys_sendmsg net/socket.c:2674 [inline] __se_sys_sendmsg net/socket.c:2672 [inline] __x64_sys_sendmsg+0x211/0x3e0 net/socket.c:2672 x64_sys_call+0x3878/0x3d90 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd9/0x1d0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f CPU: 0 UID: 0 PID: 30991 Comm: syz.4.10630 Not tainted 6.12.0-10694-gc44daa7e3c73 #29 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-3.fc41 04/01/2014 Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device") Reported-by: syzkaller Signed-off-by: Shigeru Yoshida Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20250123145746.785768-1-syoshida@redhat.com Signed-off-by: Jakub Kicinski drivers/net/vxlan/vxlan_vnifilter.c | 5 +++++ 1 file changed, 5 insertions(+) commit 79d458c13056559d49b5e41fbc4b6890e68cf65b Author: David Howells Date: Thu Jan 23 08:59:12 2025 +0000 rxrpc, afs: Fix peer hash locking vs RCU callback In its address list, afs now retains pointers to and refs on one or more rxrpc_peer objects. The address list is freed under RCU and at this time, it puts the refs on those peers. Now, when an rxrpc_peer object runs out of refs, it gets removed from the peer hash table and, for that, rxrpc has to take a spinlock. However, it is now being called from afs's RCU cleanup, which takes place in BH context - but it is just taking an ordinary spinlock. The put may also be called from non-BH context, and so there exists the possibility of deadlock if the BH-based RCU cleanup happens whilst the hash spinlock is held. This led to the attached lockdep complaint. Fix this by changing spinlocks of rxnet->peer_hash_lock back to BH-disabling locks. ================================ WARNING: inconsistent lock state 6.13.0-rc5-build2+ #1223 Tainted: G E -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. swapper/1/0 [HC0[0]:SC1[1]:HE1:SE0] takes: ffff88810babe228 (&rxnet->peer_hash_lock){+.?.}-{3:3}, at: rxrpc_put_peer+0xcb/0x180 {SOFTIRQ-ON-W} state was registered at: mark_usage+0x164/0x180 __lock_acquire+0x544/0x990 lock_acquire.part.0+0x103/0x280 _raw_spin_lock+0x2f/0x40 rxrpc_peer_keepalive_worker+0x144/0x440 process_one_work+0x486/0x7c0 process_scheduled_works+0x73/0x90 worker_thread+0x1c8/0x2a0 kthread+0x19b/0x1b0 ret_from_fork+0x24/0x40 ret_from_fork_asm+0x1a/0x30 irq event stamp: 972402 hardirqs last enabled at (972402): [] _raw_spin_unlock_irqrestore+0x2e/0x50 hardirqs last disabled at (972401): [] _raw_spin_lock_irqsave+0x18/0x60 softirqs last enabled at (972300): [] handle_softirqs+0x3ee/0x430 softirqs last disabled at (972313): [] __irq_exit_rcu+0x44/0x110 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&rxnet->peer_hash_lock); lock(&rxnet->peer_hash_lock); *** DEADLOCK *** 1 lock held by swapper/1/0: #0: ffffffff83576be0 (rcu_callback){....}-{0:0}, at: rcu_lock_acquire+0x7/0x30 stack backtrace: CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G E 6.13.0-rc5-build2+ #1223 Tainted: [E]=UNSIGNED_MODULE Hardware name: ASUS All Series/H97-PLUS, BIOS 2306 10/09/2014 Call Trace: dump_stack_lvl+0x57/0x80 print_usage_bug.part.0+0x227/0x240 valid_state+0x53/0x70 mark_lock_irq+0xa5/0x2f0 mark_lock+0xf7/0x170 mark_usage+0xe1/0x180 __lock_acquire+0x544/0x990 lock_acquire.part.0+0x103/0x280 _raw_spin_lock+0x2f/0x40 rxrpc_put_peer+0xcb/0x180 afs_free_addrlist+0x46/0x90 [kafs] rcu_do_batch+0x2d2/0x640 rcu_core+0x2f7/0x350 handle_softirqs+0x1ee/0x430 __irq_exit_rcu+0x44/0x110 irq_exit_rcu+0xa/0x30 sysvec_apic_timer_interrupt+0x7f/0xa0 Fixes: 72904d7b9bfb ("rxrpc, afs: Allow afs to pin rxrpc_peer objects") Signed-off-by: David Howells cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/2095618.1737622752@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski net/rxrpc/peer_event.c | 16 ++++++++-------- net/rxrpc/peer_object.c | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) commit 9b06d5b956131bde535f5c045cf8c1ff6bfba76c Author: Jan Stancek Date: Thu Jan 23 13:38:51 2025 +0100 selftests: net/{lib,openvswitch}: extend CFLAGS to keep options from environment Package build environments like Fedora rpmbuild introduced hardening options (e.g. -pie -Wl,-z,now) by passing a -spec option to CFLAGS and LDFLAGS. Some Makefiles currently override CFLAGS but not LDFLAGS, which leads to a mismatch and build failure, for example: /usr/bin/ld: /tmp/ccd2apay.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status make[1]: *** [../../lib.mk:222: tools/testing/selftests/net/lib/csum] Error 1 openvswitch/Makefile CFLAGS currently do not appear to be used, but fix it anyway for the case when new tests are introduced in future. Fixes: 1d0dc857b5d8 ("selftests: drv-net: add checksum tests") Signed-off-by: Jan Stancek Acked-by: Matthieu Baerts (NGI0) Reviewed-by: Hangbin Liu Link: https://patch.msgid.link/3d173603ee258f419d0403363765c9f9494ff79a.1737635092.git.jstancek@redhat.com Signed-off-by: Jakub Kicinski tools/testing/selftests/net/lib/Makefile | 2 +- tools/testing/selftests/net/openvswitch/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 23b3a7c4a7583eac9e3976355928a832c87caa0f Author: Jan Stancek Date: Thu Jan 23 09:35:42 2025 +0100 selftests: mptcp: extend CFLAGS to keep options from environment Package build environments like Fedora rpmbuild introduced hardening options (e.g. -pie -Wl,-z,now) by passing a -spec option to CFLAGS and LDFLAGS. mptcp Makefile currently overrides CFLAGS but not LDFLAGS, which leads to a mismatch and build failure, for example: make[1]: *** [../../lib.mk:222: tools/testing/selftests/net/mptcp/mptcp_sockopt] Error 1 /usr/bin/ld: /tmp/ccqyMVdb.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status Fixes: cc937dad85ae ("selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk") Signed-off-by: Jan Stancek Reviewed-by: Hangbin Liu Reviewed-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/7abc701da9df39c2d6cd15bc3cf9e6cee445cb96.1737621162.git.jstancek@redhat.com Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1626e5ef0b00386a4fd083fa7c46c8edbd75f9b4 Author: Andrea Righi Date: Mon Jan 27 23:06:16 2025 +0100 sched_ext: Fix lock imbalance in dispatch_to_local_dsq() While performing the rq locking dance in dispatch_to_local_dsq(), we may trigger the following lock imbalance condition, in particular when multiple tasks are rapidly changing CPU affinity (i.e., running a `stress-ng --race-sched 0`): [ 13.413579] ===================================== [ 13.413660] WARNING: bad unlock balance detected! [ 13.413729] 6.13.0-virtme #15 Not tainted [ 13.413792] ------------------------------------- [ 13.413859] kworker/1:1/80 is trying to release lock (&rq->__lock) at: [ 13.413954] [] dispatch_to_local_dsq+0x108/0x1a0 [ 13.414111] but there are no more locks to release! [ 13.414176] [ 13.414176] other info that might help us debug this: [ 13.414258] 1 lock held by kworker/1:1/80: [ 13.414318] #0: ffff8b66feb41698 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x20/0x90 [ 13.414612] [ 13.414612] stack backtrace: [ 13.415255] CPU: 1 UID: 0 PID: 80 Comm: kworker/1:1 Not tainted 6.13.0-virtme #15 [ 13.415505] Workqueue: 0x0 (events) [ 13.415567] Sched_ext: dsp_local_on (enabled+all), task: runnable_at=-2ms [ 13.415570] Call Trace: [ 13.415700] [ 13.415744] dump_stack_lvl+0x78/0xe0 [ 13.415806] ? dispatch_to_local_dsq+0x108/0x1a0 [ 13.415884] print_unlock_imbalance_bug+0x11b/0x130 [ 13.415965] ? dispatch_to_local_dsq+0x108/0x1a0 [ 13.416226] lock_release+0x231/0x2c0 [ 13.416326] _raw_spin_unlock+0x1b/0x40 [ 13.416422] dispatch_to_local_dsq+0x108/0x1a0 [ 13.416554] flush_dispatch_buf+0x199/0x1d0 [ 13.416652] balance_one+0x194/0x370 [ 13.416751] balance_scx+0x61/0x1e0 [ 13.416848] prev_balance+0x43/0xb0 [ 13.416947] __pick_next_task+0x6b/0x1b0 [ 13.417052] __schedule+0x20d/0x1740 This happens because dispatch_to_local_dsq() is racing with dispatch_dequeue() and, when the latter wins, we incorrectly assume that the task has been moved to dst_rq. Fix by properly tracking the currently locked rq. Fixes: 4d3ca89bdd31 ("sched_ext: Refactor consume_remote_task()") Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo kernel/sched/ext.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 67e4bb2ced0f2d8fbd414f932daea94ba63ae4c4 Author: Jakub Kicinski Date: Thu Jan 23 15:16:20 2025 -0800 net: page_pool: don't try to stash the napi id Page ppol tried to cache the NAPI ID in page pool info to avoid having a dependency on the life cycle of the NAPI instance. Since commit under Fixes the NAPI ID is not populated until napi_enable() and there's a good chance that page pool is created before NAPI gets enabled. Protect the NAPI pointer with the existing page pool mutex, the reading path already holds it. napi_id itself we need to READ_ONCE(), it's protected by netdev_lock() which are not holding in page pool. Before this patch napi IDs were missing for mlx5: # ./cli.py --spec netlink/specs/netdev.yaml --dump page-pool-get [{'id': 144, 'ifindex': 2, 'inflight': 3072, 'inflight-mem': 12582912}, {'id': 143, 'ifindex': 2, 'inflight': 5568, 'inflight-mem': 22806528}, {'id': 142, 'ifindex': 2, 'inflight': 5120, 'inflight-mem': 20971520}, {'id': 141, 'ifindex': 2, 'inflight': 4992, 'inflight-mem': 20447232}, ... After: [{'id': 144, 'ifindex': 2, 'inflight': 3072, 'inflight-mem': 12582912, 'napi-id': 565}, {'id': 143, 'ifindex': 2, 'inflight': 4224, 'inflight-mem': 17301504, 'napi-id': 525}, {'id': 142, 'ifindex': 2, 'inflight': 4288, 'inflight-mem': 17563648, 'napi-id': 524}, ... Fixes: 86e25f40aa1e ("net: napi: Add napi_config") Reviewed-by: Mina Almasry Reviewed-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20250123231620.1086401-1-kuba@kernel.org Signed-off-by: Jakub Kicinski include/net/page_pool/types.h | 1 - net/core/dev.c | 2 +- net/core/page_pool.c | 2 ++ net/core/page_pool_priv.h | 2 ++ net/core/page_pool_user.c | 15 +++++++++------ 5 files changed, 14 insertions(+), 8 deletions(-) commit 6db9d3a536cd638e2ee17cf880e14026cec19d26 Author: Jakub Kicinski Date: Thu Jan 23 14:14:10 2025 -0800 netdevsim: don't assume core pre-populates HDS params on GET Syzbot reports: BUG: KMSAN: uninit-value in nsim_get_ringparam+0xa8/0xe0 drivers/net/netdevsim/ethtool.c:77 nsim_get_ringparam+0xa8/0xe0 drivers/net/netdevsim/ethtool.c:77 ethtool_set_ringparam+0x268/0x570 net/ethtool/ioctl.c:2072 __dev_ethtool net/ethtool/ioctl.c:3209 [inline] dev_ethtool+0x126d/0x2a40 net/ethtool/ioctl.c:3398 dev_ioctl+0xb0e/0x1280 net/core/dev_ioctl.c:759 This is the SET path, where we call GET to either check user request against max values, or check if any of the settings will change. The logic in netdevsim is trying to report the default (ENABLED) if user has not requested any specific setting. The user setting is recorded in dev->cfg, don't depend on kernel_ringparam being pre-populated with it. Fixes: 928459bbda19 ("net: ethtool: populate the default HDS params in the core") Reported-by: Eric Dumazet Reported-by: syzbot+b3bcd80232d00091e061@syzkaller.appspotmail.com Tested-by: syzbot+b3bcd80232d00091e061@syzkaller.appspotmail.com Link: https://patch.msgid.link/20250123221410.1067678-1-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/netdevsim/ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b1af76604398c12cf6e54a5587cc61566680ca3 Author: Jakub Kicinski Date: Thu Jan 23 07:55:40 2025 -0800 MAINTAINERS: add Paul Fertser as a NC-SI reviewer Paul has been providing very solid reviews for NC-SI changes lately, so much so I started CCing him on all NC-SI patches. Make the designation official. Reviewed-by: Paul Fertser Link: https://patch.msgid.link/20250123155540.943243-1-kuba@kernel.org Signed-off-by: Jakub Kicinski MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit f17b15d0c2f16f19d78a03c829d1577020d91326 Merge: 964417a5d4a0 a60558644e20 Author: Jakub Kicinski Date: Mon Jan 27 14:30:51 2025 -0800 Merge branch 'eth-fix-calling-napi_enable-in-atomic-context' Jakub Kicinski says: ==================== eth: fix calling napi_enable() in atomic context Dan has reported that I missed a lot of drivers which call napi_enable() in atomic with the naive coccinelle search for spin locks: https://lore.kernel.org/dcfd56bc-de32-4b11-9e19-d8bd1543745d@stanley.mountain Fix them. Most of the fixes involve taking the netdev_lock() before the spin lock. mt76 is special because we can just move napi_enable() from the BH section. All patches compile tested only. v2: https://lore.kernel.org/20250123004520.806855-1-kuba@kernel.org v1: https://lore.kernel.org/20250121221519.392014-1-kuba@kernel.org ==================== Link: https://patch.msgid.link/20250124031841.1179756-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit a60558644e20d036cae0e63d0e3a37f46b7789c0 Author: Jakub Kicinski Date: Thu Jan 23 19:18:41 2025 -0800 wifi: mt76: move napi_enable() from under BH mt76 does a lot of: local_bh_disable(); napi_enable(...napi); napi_schedule(...napi); local_bh_enable(); local_bh_disable() is not a real lock, its most likely taken because napi_schedule() requires that we invoke softirqs at some point. napi_enable() needs to take a mutex, so move it from under the BH protection. Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()") Reported-by: Dan Carpenter Link: https://lore.kernel.org/dcfd56bc-de32-4b11-9e19-d8bd1543745d@stanley.mountain Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250124031841.1179756-8-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 9 ++++----- drivers/net/wireless/mediatek/mt76/mt7615/pci.c | 8 ++++++-- drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c | 8 +++++--- drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 8 +++++--- drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 8 +++++--- drivers/net/wireless/mediatek/mt76/mt76x2/pci.c | 7 +++++-- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 17 +++++++++++++---- drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 7 +++++-- drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c | 7 +++++-- drivers/net/wireless/mediatek/mt76/mt7925/pci.c | 7 +++++-- drivers/net/wireless/mediatek/mt76/mt7925/pci_mac.c | 7 +++++-- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 12 ++++++------ 12 files changed, 69 insertions(+), 36 deletions(-) commit 09a939487fc8b2a437a8f1df20fe95e2857523d9 Author: Jakub Kicinski Date: Thu Jan 23 19:18:40 2025 -0800 eth: via-rhine: fix calling napi_enable() in atomic context napi_enable() may sleep now, take netdev_lock() before rp->lock. napi_enable() is hidden inside init_registers(). Note that this patch orders netdev_lock after rp->task_lock, to avoid having to take the netdev_lock() around disable path. Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()") Reported-by: Dan Carpenter Link: https://lore.kernel.org/dcfd56bc-de32-4b11-9e19-d8bd1543745d@stanley.mountain Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250124031841.1179756-7-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/via/via-rhine.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit f1d12bc7a596fce1df6a02cab1fdb797cc4d1642 Author: Jakub Kicinski Date: Thu Jan 23 19:18:39 2025 -0800 eth: niu: fix calling napi_enable() in atomic context napi_enable() may sleep now, take netdev_lock() before np->lock. Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()") Reported-by: Dan Carpenter Link: https://lore.kernel.org/dcfd56bc-de32-4b11-9e19-d8bd1543745d@stanley.mountain Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250124031841.1179756-6-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/sun/niu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit d19e612c47f4cf9da07105d95ac7233fe27e5f48 Author: Jakub Kicinski Date: Thu Jan 23 19:18:38 2025 -0800 eth: 8139too: fix calling napi_enable() in atomic context napi_enable() may sleep now, take netdev_lock() before tp->lock and tp->rx_lock. Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()") Reported-by: Dan Carpenter Link: https://lore.kernel.org/dcfd56bc-de32-4b11-9e19-d8bd1543745d@stanley.mountain Reviewed-by: Eric Dumazet Acked-by: Francois Romieu Link: https://patch.msgid.link/20250124031841.1179756-5-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/realtek/8139too.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5c4470a1719c664d3b9aaa03619a49d74d6e6345 Author: Jakub Kicinski Date: Thu Jan 23 19:18:37 2025 -0800 eth: forcedeth: fix calling napi_enable() in atomic context napi_enable() may sleep now, take netdev_lock() before np->lock. Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()") Reported-by: Dan Carpenter Link: https://lore.kernel.org/dcfd56bc-de32-4b11-9e19-d8bd1543745d@stanley.mountain Acked-by: Zhu Yanjun Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250124031841.1179756-4-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/nvidia/forcedeth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a878f3e4ace7c042852747c2cd34c15872d59cd2 Author: Jakub Kicinski Date: Thu Jan 23 19:18:36 2025 -0800 eth: forcedeth: remove local wrappers for napi enable/disable The local helpers for calling napi_enable() and napi_disable() don't serve much purpose and they will complicate the fix in the subsequent patch. Remove them, call the core functions directly. Acked-by: Zhu Yanjun Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250124031841.1179756-3-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/nvidia/forcedeth.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) commit 8ed47e4e0b428424e4c43704f12e9c1085f5425c Author: Jakub Kicinski Date: Thu Jan 23 19:18:35 2025 -0800 eth: tg3: fix calling napi_enable() in atomic context tg3 has a spin lock protecting most of the config, switch to taking netdev_lock() explicitly on enable/start paths. Disable/stop paths seem to not be under the spin lock (since napi_disable() already needs to sleep), so leave that side as is. tg3_restart_hw() releases and re-takes the spin lock, we need to do the same because dev_close() needs to take netdev_lock(). Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()") Reported-by: Dan Carpenter Link: https://lore.kernel.org/dcfd56bc-de32-4b11-9e19-d8bd1543745d@stanley.mountain Reviewed-by: Eric Dumazet Reviewed-by: Michael Chan Link: https://patch.msgid.link/20250124031841.1179756-2-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/tg3.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) commit 964417a5d4a06614ef7fb3ae69bb17c91a2dc016 Author: Jakub Kicinski Date: Thu Jan 23 17:21:30 2025 -0800 tools: ynl: c: correct reverse decode of empty attrs netlink reports which attribute was incorrect by sending back an attribute offset. Offset points to the address of struct nlattr, but to interpret the type we also need the nesting path. Attribute IDs have different meaning in different nests of the same message. Correct the condition for "is the offset within current attribute". ynl_attr_data_len() does not include the attribute header, so the end offset was off by 4 bytes. This means that we'd always skip over flags and empty nests. The devmem tests, for example, issues an invalid request with empty queue nests, resulting in the following error: YNL failed: Kernel error: missing attribute: .queues.ifindex The message is incorrect, "queues" nest does not have an "ifindex" attribute defined. With this fix we decend correctly into the nest: YNL failed: Kernel error: missing attribute: .queues.id Fixes: 86878f14d71a ("tools: ynl: user space helpers") Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20250124012130.1121227-1-kuba@kernel.org Signed-off-by: Jakub Kicinski tools/net/ynl/lib/ynl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd53aa40e65f518453115b6f56183b0c201db26b Author: Thomas Weißschuh Date: Thu Jan 23 08:22:40 2025 +0100 ptp: Ensure info->enable callback is always set The ioctl and sysfs handlers unconditionally call the ->enable callback. Not all drivers implement that callback, leading to NULL dereferences. Example of affected drivers: ptp_s390.c, ptp_vclock.c and ptp_mock.c. Instead use a dummy callback if no better was specified by the driver. Fixes: d94ba80ebbea ("ptp: Added a brand new class driver for ptp clocks.") Cc: stable@vger.kernel.org Signed-off-by: Thomas Weißschuh Acked-by: Richard Cochran Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/20250123-ptp-enable-v1-1-b015834d3a47@weissschuh.net Signed-off-by: Jakub Kicinski drivers/ptp/ptp_clock.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit cde5959913b713eecee44451c9bb3141e625a8d8 Author: Khaled Elnaggar Date: Thu Jan 23 10:25:20 2025 +0200 documentation: networking: fix spelling mistakes Fix a couple of typos/spelling mistakes in the documentation. Signed-off-by: Khaled Elnaggar Acked-by: Marc Kleine-Budde Reviewed-by: Przemek Kitszel Acked-by: Randy Dunlap Reviewed-by: Bagas Sanjaya Link: https://patch.msgid.link/20250123082521.59997-1-khaledelnaggarlinux@gmail.com Signed-off-by: Jakub Kicinski Documentation/networking/can.rst | 4 ++-- Documentation/networking/napi.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 979284535aaf12a287a2f43d9d5dfcbdc1dc4cac Author: Stanislav Fomichev Date: Wed Jan 22 16:04:07 2025 -0800 net/mlx5e: add missing cpu_to_node to kvzalloc_node in mlx5e_open_xdpredirect_sq kvzalloc_node is not doing a runtime check on the node argument (__alloc_pages_node_noprof does have a VM_BUG_ON, but it expands to nothing on !CONFIG_DEBUG_VM builds), so doing any ethtool/netlink operation that calls mlx5e_open on a CPU that's larger that MAX_NUMNODES triggers OOB access and panic (see the trace below). Add missing cpu_to_node call to convert cpu id to node id. [ 165.427394] mlx5_core 0000:5c:00.0 beth1: Link up [ 166.479327] BUG: unable to handle page fault for address: 0000000800000010 [ 166.494592] #PF: supervisor read access in kernel mode [ 166.505995] #PF: error_code(0x0000) - not-present page ... [ 166.816958] Call Trace: [ 166.822380] [ 166.827034] ? __die_body+0x64/0xb0 [ 166.834774] ? page_fault_oops+0x2cd/0x3f0 [ 166.843862] ? exc_page_fault+0x63/0x130 [ 166.852564] ? asm_exc_page_fault+0x22/0x30 [ 166.861843] ? __kvmalloc_node_noprof+0x43/0xd0 [ 166.871897] ? get_partial_node+0x1c/0x320 [ 166.880983] ? deactivate_slab+0x269/0x2b0 [ 166.890069] ___slab_alloc+0x521/0xa90 [ 166.898389] ? __kvmalloc_node_noprof+0x43/0xd0 [ 166.908442] __kmalloc_node_noprof+0x216/0x3f0 [ 166.918302] ? __kvmalloc_node_noprof+0x43/0xd0 [ 166.928354] __kvmalloc_node_noprof+0x43/0xd0 [ 166.938021] mlx5e_open_channels+0x5e2/0xc00 [ 166.947496] mlx5e_open_locked+0x3e/0xf0 [ 166.956201] mlx5e_open+0x23/0x50 [ 166.963551] __dev_open+0x114/0x1c0 [ 166.971292] __dev_change_flags+0xa2/0x1b0 [ 166.980378] dev_change_flags+0x21/0x60 [ 166.988887] do_setlink+0x38d/0xf20 [ 166.996628] ? ep_poll_callback+0x1b9/0x240 [ 167.005910] ? __nla_validate_parse.llvm.10713395753544950386+0x80/0xd70 [ 167.020782] ? __wake_up_sync_key+0x52/0x80 [ 167.030066] ? __mutex_lock+0xff/0x550 [ 167.038382] ? security_capable+0x50/0x90 [ 167.047279] rtnl_setlink+0x1c9/0x210 [ 167.055403] ? ep_poll_callback+0x1b9/0x240 [ 167.064684] ? security_capable+0x50/0x90 [ 167.073579] rtnetlink_rcv_msg+0x2f9/0x310 [ 167.082667] ? rtnetlink_bind+0x30/0x30 [ 167.091173] netlink_rcv_skb+0xb1/0xe0 [ 167.099492] netlink_unicast+0x20f/0x2e0 [ 167.108191] netlink_sendmsg+0x389/0x420 [ 167.116896] __sys_sendto+0x158/0x1c0 [ 167.125024] __x64_sys_sendto+0x22/0x30 [ 167.133534] do_syscall_64+0x63/0x130 [ 167.141657] ? __irq_exit_rcu.llvm.17843942359718260576+0x52/0xd0 [ 167.155181] entry_SYSCALL_64_after_hwframe+0x4b/0x53 Fixes: bb135e40129d ("net/mlx5e: move XDP_REDIRECT sq to dynamic allocation") Signed-off-by: Stanislav Fomichev Reviewed-by: Joe Damato Reviewed-by: Tariq Toukan Link: https://patch.msgid.link/20250123000407.3464715-1-sdf@fomichev.me Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50bf398e1ceacb9a7f85bd3bdca065ebe5cb6159 Author: Jakub Kicinski Date: Wed Jan 22 14:45:03 2025 -0800 net: netdevsim: try to close UDP port harness races syzbot discovered that we remove the debugfs files after we free the netdev. Try to clean up the relevant dir while the device is still around. Reported-by: syzbot+2e5de9e3ab986b71d2bf@syzkaller.appspotmail.com Fixes: 424be63ad831 ("netdevsim: add UDP tunnel port offload support") Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/20250122224503.762705-1-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/netdevsim/netdevsim.h | 1 + drivers/net/netdevsim/udp_tunnels.c | 23 +++++++++++++--------- .../drivers/net/netdevsim/udp_tunnel_nic.sh | 16 +++++++-------- 3 files changed, 23 insertions(+), 17 deletions(-) commit 5de7665e0a0746b5ad7943554b34db8f8614a196 Author: Eric Dumazet Date: Wed Jan 22 18:02:44 2025 +0000 net: rose: fix timer races against user threads Rose timers only acquire the socket spinlock, without checking if the socket is owned by one user thread. Add a check and rearm the timers if needed. BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x31d/0x360 net/rose/rose_timer.c:174 Read of size 2 at addr ffff88802f09b82a by task swapper/0/0 CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.13.0-rc5-syzkaller-00172-gd1bf27c4e176 #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 rose_timer_expiry+0x31d/0x360 net/rose/rose_timer.c:174 call_timer_fn+0x187/0x650 kernel/time/timer.c:1793 expire_timers kernel/time/timer.c:1844 [inline] __run_timers kernel/time/timer.c:2418 [inline] __run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2430 run_timer_base kernel/time/timer.c:2439 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2449 handle_softirqs+0x2d4/0x9b0 kernel/softirq.c:561 __do_softirq kernel/softirq.c:595 [inline] invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0xf7/0x220 kernel/softirq.c:662 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250122180244.1861468-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/rose/rose_timer.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 09ebd028d6d70c7dc4b1c69212a18134ad2e0020 Author: 谢致邦 (XIE Zhibang) Date: Thu Jan 23 11:57:03 2025 +0000 net: the appletalk subsystem no longer uses ndo_do_ioctl ndo_do_ioctl is no longer used by the appletalk subsystem after commit 45bd1c5ba758 ("net: appletalk: Drop aarp_send_probe_phase1()"). Signed-off-by: 谢致邦 (XIE Zhibang) Reviewed-by: Simon Horman Link: https://patch.msgid.link/tencent_4AC6ED413FEA8116B4253D3ED6947FDBCF08@qq.com Signed-off-by: Jakub Kicinski include/linux/netdevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 38567b972a22706e9a1a52b2c4bc9ea4b5ed00ed Author: Mickaël Salaün Date: Wed Jan 15 15:47:50 2025 +0100 selftests: Handle old glibc without execveat(2) Add an execveat(2) wrapper because glibc < 2.34 does not have one. This fixes the check-exec tests and samples. Cc: Günther Noack Cc: Jeff Xu Cc: Kees Cook Cc: Mimi Zohar Cc: Paul Moore Cc: Roberto Sassu Cc: Serge Hallyn Cc: Stefan Berger Cc: Stephen Rothwell Reported-by: Nathan Chancellor Closes: https://lore.kernel.org/r/20250114205645.GA2825031@ax162 Signed-off-by: Mickaël Salaün Reviewed-by: Günther Noack Link: https://lore.kernel.org/r/20250115144753.311152-1-mic@digikod.net Signed-off-by: Kees Cook samples/check-exec/inc.c | 11 +++++++++-- tools/testing/selftests/exec/check-exec.c | 11 +++++++++-- tools/testing/selftests/landlock/fs_test.c | 10 ++++++++-- 3 files changed, 26 insertions(+), 6 deletions(-) commit 3c7d51b0d29954c40ea3a097e0ec7884b4344331 Author: Andrea Righi Date: Sat Jan 25 10:36:07 2025 +0100 sched_ext: selftests/dsp_local_on: Fix selftest on UP systems In UP systems p->migration_disabled is not available. Fix this by using the portable helper is_migration_disabled(p). Fixes: e9fe182772dc ("sched_ext: selftests/dsp_local_on: Fix sporadic failures") Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo tools/testing/selftests/sched_ext/dsp_local_on.bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f52bbf2f6e0997394cf9c449d44e1c80ff4282c Author: Andrea Righi Date: Sat Jan 25 18:14:12 2025 +0100 tools/sched_ext: Add helper to check task migration state Introduce a new helper for BPF schedulers to determine whether a task can migrate or not (supporting both SMP and UP systems). Fixes: e9fe182772dc ("sched_ext: selftests/dsp_local_on: Fix sporadic failures") Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo tools/sched_ext/include/scx/common.bpf.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit d555ed45a5a10a813528c7685f432369d536ae3d Author: Takashi Iwai Date: Thu Oct 31 14:42:56 2024 +0100 PCI: Restore original INTX_DISABLE bit by pcim_intx() pcim_intx() tries to restore the INTx bit at removal via devres, but there is a chance that it restores a wrong value. Because the value to be restored is blindly assumed to be the negative of the enable argument, when a driver calls pcim_intx() unnecessarily for the already enabled state, it'll restore to the disabled state in turn. That is, the function assumes the case like: // INTx == 1 pcim_intx(pdev, 0); // old INTx value assumed to be 1 -> correct but it might be like the following, too: // INTx == 0 pcim_intx(pdev, 0); // old INTx value assumed to be 1 -> wrong Also, when a driver calls pcim_intx() multiple times with different enable argument values, the last one will win no matter what value it is. This can lead to inconsistency, e.g. // INTx == 1 pcim_intx(pdev, 0); // OK ... pcim_intx(pdev, 1); // now old INTx wrongly assumed to be 0 This patch addresses those inconsistencies by saving the original INTx state at the first pcim_intx() call. For that, get_or_create_intx_devres() is folded into pcim_intx() caller side; it allows us to simply check the already allocated devres and record the original INTx along with the devres_alloc() call. Link: https://lore.kernel.org/r/20241031134300.10296-1-tiwai@suse.de Fixes: 25216afc9db5 ("PCI: Add managed pcim_intx()") Link: https://lore.kernel.org/87v7xk2ps5.wl-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Bjorn Helgaas Reviewed-by: Philipp Stanner Cc: stable@vger.kernel.org # v6.11+ drivers/pci/devres.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit d6f3e7d564b2309e1f17e709a70eca78d7ca2bb8 Author: Tejun Heo Date: Fri Jan 24 12:22:12 2025 -1000 sched_ext: Fix incorrect autogroup migration detection scx_move_task() is called from sched_move_task() and tells the BPF scheduler that cgroup migration is being committed. sched_move_task() is used by both cgroup and autogroup migrations and scx_move_task() tried to filter out autogroup migrations by testing the destination cgroup and PF_EXITING but this is not enough. In fact, without explicitly tagging the thread which is doing the cgroup migration, there is no good way to tell apart scx_move_task() invocations for racing migration to the root cgroup and an autogroup migration. This led to scx_move_task() incorrectly ignoring a migration from non-root cgroup to an autogroup of the root cgroup triggering the following warning: WARNING: CPU: 7 PID: 1 at kernel/sched/ext.c:3725 scx_cgroup_can_attach+0x196/0x340 ... Call Trace: cgroup_migrate_execute+0x5b1/0x700 cgroup_attach_task+0x296/0x400 __cgroup_procs_write+0x128/0x140 cgroup_procs_write+0x17/0x30 kernfs_fop_write_iter+0x141/0x1f0 vfs_write+0x31d/0x4a0 __x64_sys_write+0x72/0xf0 do_syscall_64+0x82/0x160 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fix it by adding an argument to sched_move_task() that indicates whether the moving is for a cgroup or autogroup migration. After the change, scx_move_task() is called only for cgroup migrations and renamed to scx_cgroup_move_task(). Link: https://github.com/sched-ext/scx/issues/370 Fixes: 819513666966 ("sched_ext: Add cgroup support") Cc: stable@vger.kernel.org # v6.12+ Acked-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo kernel/sched/autogroup.c | 4 ++-- kernel/sched/core.c | 7 ++++--- kernel/sched/ext.c | 15 +-------------- kernel/sched/ext.h | 4 ++-- kernel/sched/sched.h | 2 +- 5 files changed, 10 insertions(+), 22 deletions(-) commit 698244bbb3bfd32ddf9a0b70a12b1c7d69056497 Author: Nick Chan Date: Sun Jan 19 00:31:42 2025 +0800 irqchip/apple-aic: Only handle PMC interrupt as FIQ when configured so The CPU PMU in Apple SoCs can be configured to fire its interrupt in one of several ways, and since Apple A11 one of the methods is FIQ, but the check of the configuration register fails to test explicitely for FIQ mode. It tests whether the IMODE bitfield is zero or not and the PMCRO_IACT bit is set. That results in false positives when the IMODE bitfield is not zero, but does not have the mode PMCR0_IMODE_FIQ. Only handle the PMC interrupt as a FIQ when the CPU PMU has been configured to fire FIQs, i.e. the IMODE bitfield value is PMCR0_IMODE_FIQ and PMCR0_IACT is set. Fixes: c7708816c944 ("irqchip/apple-aic: Wire PMU interrupts") Signed-off-by: Nick Chan Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20250118163554.16733-1-towinchenmi@gmail.com drivers/irqchip/irq-apple-aic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1a202afeaa370970413846c2cb09b383875e753c Author: Patryk Wlazlyn Date: Fri Jan 17 13:36:59 2025 +0100 tools/power turbostat: Add tcore clock PMT type Some PMT counters, for example module c1e residency on Intel Clearwater Forest, are reported using tcore clock type. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) commit a80e53472209b1c749e02e91ac62c053ac457099 Author: Len Brown Date: Tue Dec 3 16:11:21 2024 -0500 tools/power turbostat: version 2025.01.14 Fix checkpatch whitespace issues since 2024.11.30 Summary of Changes since 2024.11.30: Enable SysWatt by default. Add initial PTL, CWF platform support. Refuse to run on unsupported platforms without --force to avoid not-so-useful measurements mistakenly made using obsolete versions. Harden initial PMT code in response to early use. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 36 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit 83fbeb9f9776cd044d36af606127f56206337bab Author: Patryk Wlazlyn Date: Thu Dec 12 19:11:34 2024 +0100 tools/power turbostat: Allow adding PMT counters directly by sysfs path Allow user to add PMT counters by either identifying the source with: guid=%u,seq=%u or, since this patch, with direct sysfs path: path=%s, for example path=/sys/class/intel_pmt/telem5 In the later case, the guid and sequence number will be infered by turbostat. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 107 +++++++++++++++++++++++++++++++++- 1 file changed, 106 insertions(+), 1 deletion(-) commit 16ce467875ef8572b82f9af30fcf7b2f65fc2e95 Author: Patryk Wlazlyn Date: Fri Dec 6 11:22:00 2024 +0100 tools/power turbostat: Allow mapping multiple PMT files with the same GUID Some platforms may expose multiple telemetry files identified with the same GUID. Interpreting it correctly, to associate given counter with a CPU, core or a package requires more metadata from the user. Parse and create ordered, linked list of those PMT aggregators, so that we can identify specific aggregator with GUID + sequence number. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 75 +++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 35 deletions(-) commit 4265a86582eaa224d171328be0c71e2a7ccd194f Author: Patryk Wlazlyn Date: Thu Dec 12 18:59:25 2024 +0100 tools/power turbostat: Add PMT directory iterator helper PMT directories exposed in sysfs use the following pattern: telem%u for example: telem0, telem2, telem3, ..., telem15, telem16 This naming scheme preserves the ordering from the PCIe discovery, which is important to correctly map the telemetry directory to the specific domain (cpu, core, package etc). Because readdir() traverses the entries in alphabetical order, causing for example "telem13" to be traversed before "telem3", it is necessary to use scandir() with custom compare() callback to preserve the PCIe ordering. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 87 +++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) commit 089134cb0502ba962bce9402ce96e0875876d401 Author: Patryk Wlazlyn Date: Tue Dec 10 11:41:58 2024 +0100 tools/power turbostat: Extend PMT identification with a sequence number When platforms expose multiple PMT aggregators with the same GUID, the only way to identify them and map to specific domain is by reading them in an order they were exposed via PCIe. Intel PMT kernel driver does keep the same order and numbers the telemetry directories accordingly. Use GUID and sequence number (order) to uniquely identify PMT aggregators. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 34537ddd208d614dbefeb97823ae1c79e7771588 Author: Patryk Wlazlyn Date: Tue Dec 10 18:27:38 2024 +0100 tools/power turbostat: Return default value for unmapped PMT domains When requesting PMT counters with --add command, user may want to skip specifying values for all the domains (that is, cpu, core, package etc). For the domains that user did not provide information on how to read the counter, return default value - zero. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7c6fee25bdf5c8f8a1bcc6fa3566fffb7fe9eb9a Author: Patryk Wlazlyn Date: Tue Jan 14 16:11:28 2025 +0100 tools/power turbostat: Check for non-zero value when MSR probing For some MSRs, for example, the Platform Energy Counter (RAPL PSYS), it is required to additionally check for a non-zero value to confirm that it is present. From Intel SDM vol. 4: Platform Energy Counter (R/O) This MSR is valid only if both platform vendor hardware implementation and BIOS enablement support it. This MSR will read 0 if not valid. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 1af5baeda512d0940748fdf9b559e1041dbab0cf Author: Zhang Rui Date: Wed Jan 8 14:19:42 2025 +0800 tools/power turbostat: Enhance turbostat self-performance visibility Include procfs and sysfs data collection time in the system summary row of the "usec" column. This is useful for isolating where the time goes during turbostat data collection. Background: Column "usec" shows 1. the number of microseconds elapsed during counter collection, including thread migration -- if any, for each CPU row. 2. total elapsed time to collect the counters on all cpus, for the summary row. This can be used to check the time cost of a give column. For example, run below commands separately turbostat --show usec sleep 1 turbostat --show usec,CoreTmp sleep 1 and the delta in the usec column will tell the time cost for CoreTmp (Thermal MSR read) Problem: Some of the kernel procfs/sysfs accesses are expensive, especially on high core count systems. "usec" column cannot tell this because it only includes the time cost of the counters. Solution: Leave the per CPU "usec" as it is and modify the summary "usec" to include the time cost of the procfs/sysfs snapshot. With it, the "usec" column can be used to get 1. the baseline, e.g. turbostat --show usec sleep 1 2. the baseline + some per CPU counter cost, e.g. turbostat --show usec,CoreTmp sleep 1 3. the baseline + some per CPU sysfs cost, e.g. turbostat --show usec,C1 sleep 1 4. the baseline + /proc/interrupts cost, e.g turbostat --show usec,IRQ sleep 1 Man-page update is also included. Signed-off-by: Zhang Rui Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.8 | 2 +- tools/power/x86/turbostat/turbostat.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit debe797c1e972ebe434c90f3fa7f54d9cf7ab251 Author: Patryk Wlazlyn Date: Thu Dec 5 19:26:14 2024 +0100 tools/power turbostat: Add fixed RAPL PSYS divisor for SPR Intel Sapphire Rapids is an exception and has fixed divisor for RAPL PSYS counter set to 1.0. Add a platform bit and enable it for SPR. Reported-by: Zhang Rui Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 2d4fde59fd502a65c1698b61ad4d0f10a9ab665a Author: Bernd Schubert Date: Thu Jan 23 17:55:32 2025 +0100 fuse: prevent disabling io-uring on active connections The enable_uring module parameter allows administrators to enable/disable io-uring support for FUSE at runtime. However, disabling io-uring while connections already have it enabled can lead to an inconsistent state. Fix this by keeping io-uring enabled on connections that were already using it, even if the module parameter is later disabled. This ensures active FUSE mounts continue to function correctly. Signed-off-by: Bernd Schubert Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dev_uring.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 786412a73e7ee5b00ef3437bbf2f3a250759b2ae Author: Bernd Schubert Date: Mon Jan 20 02:29:10 2025 +0100 fuse: enable fuse-over-io-uring All required parts are handled now, fuse-io-uring can be enabled. Signed-off-by: Bernd Schubert Reviewed-by: Pavel Begunkov # io_uring Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 3 +++ fs/fuse/dev_uring.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) commit 3393ff964e0fa5def66570c54a4612bf9df06b76 Author: Bernd Schubert Date: Mon Jan 20 02:29:09 2025 +0100 fuse: block request allocation until io-uring init is complete Avoid races and block request allocation until io-uring queues are ready. This is a especially important for background requests, as bg request completion might cause lock order inversion of the typical queue->lock and then fc->bg_lock fuse_request_end spin_lock(&fc->bg_lock); flush_bg_queue fuse_send_one fuse_uring_queue_fuse_req spin_lock(&queue->lock); Signed-off-by: Bernd Schubert Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 3 ++- fs/fuse/dev_uring.c | 3 +++ fs/fuse/fuse_i.h | 3 +++ fs/fuse/inode.c | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) commit b6236c8407cba5d7a108facb1bcfab24994d3814 Author: Bernd Schubert Date: Mon Jan 20 02:29:08 2025 +0100 fuse: {io-uring} Prevent mount point hang on fuse-server termination When the fuse-server terminates while the fuse-client or kernel still has queued URING_CMDs, these commands retain references to the struct file used by the fuse connection. This prevents fuse_dev_release() from being invoked, resulting in a hung mount point. This patch addresses the issue by making queued URING_CMDs cancelable, allowing fuse_dev_release() to proceed as expected and preventing the mount point from hanging. Signed-off-by: Bernd Schubert Reviewed-by: Pavel Begunkov # io_uring Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dev_uring.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++--- fs/fuse/dev_uring_i.h | 9 +++++++ 2 files changed, 75 insertions(+), 3 deletions(-) commit 857b0263f30eebe13ab4b6a65156a0d6c8fc2210 Author: Bernd Schubert Date: Mon Jan 20 02:29:07 2025 +0100 fuse: Allow to queue bg requests through io-uring This prepares queueing and sending background requests through io-uring. Signed-off-by: Bernd Schubert Reviewed-by: Pavel Begunkov # io_uring Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 26 +++++++++++++- fs/fuse/dev_uring.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++ fs/fuse/dev_uring_i.h | 12 +++++++ 3 files changed, 136 insertions(+), 1 deletion(-) commit c2c9af9a0b13261c36909036057a116f2edb5e1a Author: Bernd Schubert Date: Mon Jan 20 02:29:06 2025 +0100 fuse: Allow to queue fg requests through io-uring This prepares queueing and sending foreground requests through io-uring. Signed-off-by: Bernd Schubert Reviewed-by: Pavel Begunkov # io_uring Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dev_uring.c | 180 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/fuse/dev_uring_i.h | 8 +++ 2 files changed, 188 insertions(+) commit ba74ba571189668697a8d8da906ad6d44762ebc6 Author: Bernd Schubert Date: Mon Jan 20 02:29:05 2025 +0100 fuse: {io-uring} Make fuse_dev_queue_{interrupt,forget} non-static These functions are also needed by fuse-over-io-uring. Signed-off-by: Bernd Schubert Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 5 +++-- fs/fuse/fuse_dev_i.h | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) commit 4a9bfb9b6850fec0685447aed280533cf980de70 Author: Bernd Schubert Date: Mon Jan 20 02:29:04 2025 +0100 fuse: {io-uring} Handle teardown of ring entries On teardown struct file_operations::uring_cmd requests need to be completed by calling io_uring_cmd_done(). Not completing all ring entries would result in busy io-uring tasks giving warning messages in intervals and unreleased struct file. Additionally the fuse connection and with that the ring can only get released when all io-uring commands are completed. Completion is done with ring entries that are a) in waiting state for new fuse requests - io_uring_cmd_done is needed b) already in userspace - io_uring_cmd_done through teardown is not needed, the request can just get released. If fuse server is still active and commits such a ring entry, fuse_uring_cmd() already checks if the connection is active and then complete the io-uring itself with -ENOTCONN. I.e. special handling is not needed. This scheme is basically represented by the ring entry state FRRS_WAIT and FRRS_USERSPACE. Entries in state: - FRRS_INIT: No action needed, do not contribute to ring->queue_refs yet - All other states: Are currently processed by other tasks, async teardown is needed and it has to wait for the two states above. It could be also solved without an async teardown task, but would require additional if conditions in hot code paths. Also in my personal opinion the code looks cleaner with async teardown. Signed-off-by: Bernd Schubert Reviewed-by: Pavel Begunkov # io_uring Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 9 +++ fs/fuse/dev_uring.c | 207 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/fuse/dev_uring_i.h | 51 +++++++++++++ 3 files changed, 267 insertions(+) commit 805ba04cb7ccfc7d72e834ebd796e043142156ba Merge: 816cef980d81 df1b8d6e89db Author: Linus Torvalds Date: Mon Jan 27 09:00:25 2025 -0800 Merge tag 'mips_6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Thomas Bogendoerfer: "Cleanups and fixes" * tag 'mips_6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: pci-legacy: Override pci_address_to_pio MIPS: Loongson64: env: Use str_on_off() helper in prom_lefi_init_env() MIPS: migrate to generic rule for built-in DTBs mips: fix shmctl/semctl/msgctl syscall for o32 mips/math-emu: fix emulation of the prefx instruction MIPS: Loongson: Add comments for interface_info MIPS: Loongson64: remove ROM Size unit in boardinfo MIPS: traps: Use str_enabled_disabled() in parity_protection_init() MIPS: ftrace: Declare ftrace_get_parent_ra_addr() as static Revert "MIPS: csrc-r4k: Select HAVE_UNSTABLE_SCHED_CLOCK if SMP && 64BIT" MIPS: Fix the wrong format specifier MIPS: Add a blank line after __HEAD MIPS: kernel: Rename read/write_c0_ecc to read/writec0_errctl commit 816cef980d816bdb1b3121a5c406df839a85d7f5 Merge: 3cbb9ce2b9e3 f520fab580c9 Author: Linus Torvalds Date: Mon Jan 27 08:50:19 2025 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux Pull ARM updates from Russell King: - fix typos in vfpmodule.c - drop obsolete VFP accessor fallback for old assemblers - add cache line identifier register accessor functions - add cacheinfo support * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux: ARM: 9440/1: cacheinfo fix format field mask ARM: 9433/2: implement cacheinfo support ARM: 9432/2: add CLIDR accessor functions ARM: 9438/1: assembler: Drop obsolete VFP accessor fallback ARM: 9437/1: vfp: Fix typographical errors in vfpmodule.c commit 2bb447540e71ee530388750c38e1b2c8ea08b4b7 Author: Ankit Agrawal Date: Fri Jan 24 18:31:02 2025 +0000 vfio/nvgrace-gpu: Add GB200 SKU to the devid table NVIDIA is productizing the new Grace Blackwell superchip SKU bearing device ID 0x2941. Add the SKU devid to nvgrace_gpu_vfio_pci_table. CC: Alex Williamson Signed-off-by: Ankit Agrawal Link: https://lore.kernel.org/r/20250124183102.3976-5-ankita@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/nvgrace-gpu/main.c | 2 ++ 1 file changed, 2 insertions(+) commit d85f69d520e6aca8ae5ce353666e2fc2756eb9e7 Author: Ankit Agrawal Date: Fri Jan 24 18:31:01 2025 +0000 vfio/nvgrace-gpu: Check the HBM training and C2C link status In contrast to Grace Hopper systems, the HBM training has been moved out of the UEFI on the Grace Blackwell systems. This reduces the system bootup time significantly. The onus of checking whether the HBM training has completed thus falls on the module. The HBM training status can be determined from a BAR0 register. Similarly, another BAR0 register exposes the status of the CPU-GPU chip-to-chip (C2C) cache coherent interconnect. Based on testing, 30s is determined to be sufficient to ensure initialization completion on all the Grace based systems. Thus poll these register and check for 30s. If the HBM training is not complete or if the C2C link is not ready, fail the probe. While the time is not required on Grace Hopper systems, it is beneficial to make the check to ensure the device is in an expected state. Hence keeping it generalized to both the generations. Ensure that the BAR0 is enabled before accessing the registers. CC: Alex Williamson CC: Kevin Tian CC: Jason Gunthorpe Signed-off-by: Ankit Agrawal Link: https://lore.kernel.org/r/20250124183102.3976-4-ankita@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/nvgrace-gpu/main.c | 72 +++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 6a9eb2d125ba90d13b45bcfabcddf9f61268f6a8 Author: Ankit Agrawal Date: Fri Jan 24 18:31:00 2025 +0000 vfio/nvgrace-gpu: Expose the blackwell device PF BAR1 to the VM There is a HW defect on Grace Hopper (GH) to support the Multi-Instance GPU (MIG) feature [1] that necessiated the presence of a 1G region carved out from the device memory and mapped as uncached. The 1G region is shown as a fake BAR (comprising region 2 and 3) to workaround the issue. The Grace Blackwell systems (GB) differ from GH systems in the following aspects: 1. The aforementioned HW defect is fixed on GB systems. 2. There is a usable BAR1 (region 2 and 3) on GB systems for the GPUdirect RDMA feature [2]. This patch accommodate those GB changes by showing the 64b physical device BAR1 (region2 and 3) to the VM instead of the fake one. This takes care of both the differences. Moreover, the entire device memory is exposed on GB as cacheable to the VM as there is no carveout required. Link: https://www.nvidia.com/en-in/technologies/multi-instance-gpu/ [1] Link: https://docs.nvidia.com/cuda/gpudirect-rdma/ [2] Cc: Kevin Tian CC: Jason Gunthorpe Suggested-by: Alex Williamson Signed-off-by: Ankit Agrawal Link: https://lore.kernel.org/r/20250124183102.3976-3-ankita@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/nvgrace-gpu/main.c | 67 +++++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 22 deletions(-) commit bd53764a60ad586ad5b6ed339423ad5e67824464 Author: Ankit Agrawal Date: Fri Jan 24 18:30:59 2025 +0000 vfio/nvgrace-gpu: Read dvsec register to determine need for uncached resmem NVIDIA's recently introduced Grace Blackwell (GB) Superchip is a continuation with the Grace Hopper (GH) superchip that provides a cache coherent access to CPU and GPU to each other's memory with an internal proprietary chip-to-chip cache coherent interconnect. There is a HW defect on GH systems to support the Multi-Instance GPU (MIG) feature [1] that necessiated the presence of a 1G region with uncached mapping carved out from the device memory. The 1G region is shown as a fake BAR (comprising region 2 and 3) to workaround the issue. This is fixed on the GB systems. The presence of the fix for the HW defect is communicated by the device firmware through the DVSEC PCI config register with ID 3. The module reads this to take a different codepath on GB vs GH. Scan through the DVSEC registers to identify the correct one and use it to determine the presence of the fix. Save the value in the device's nvgrace_gpu_pci_core_device structure. Link: https://www.nvidia.com/en-in/technologies/multi-instance-gpu/ [1] CC: Jason Gunthorpe CC: Kevin Tian Signed-off-by: Ankit Agrawal Link: https://lore.kernel.org/r/20250124183102.3976-2-ankita@nvidia.com Signed-off-by: Alex Williamson drivers/vfio/pci/nvgrace-gpu/main.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit c090c8abae4b6b77a1bee116aa6c385456ebef96 Author: Bernd Schubert Date: Mon Jan 20 02:29:03 2025 +0100 fuse: Add io-uring sqe commit and fetch support This adds support for fuse request completion through ring SQEs (FUSE_URING_CMD_COMMIT_AND_FETCH handling). After committing the ring entry it becomes available for new fuse requests. Handling of requests through the ring (SQE/CQE handling) is complete now. Fuse request data are copied through the mmaped ring buffer, there is no support for any zero copy yet. Signed-off-by: Bernd Schubert Reviewed-by: Pavel Begunkov # io_uring Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dev_uring.c | 441 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/fuse/dev_uring_i.h | 12 ++ fs/fuse/fuse_i.h | 4 + 3 files changed, 457 insertions(+) commit 3cbb9ce2b9e3e5799f31c53aadebaddc6aad66cb Merge: ae3813525624 a0a8306c8239 Author: Linus Torvalds Date: Mon Jan 27 08:30:06 2025 -0800 Merge tag 'm68knommu-for-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu update from Greg Ungerer: "Just a single fix to correct the clock rate defined for the internal timer hardware blocks of the ColdFire 5441x family of SoC devices" * tag 'm68knommu-for-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: coldfire: Use proper clock rate for timers commit 6c1bb4031729871fa203983bd77bed1ee3c61347 Author: Ondrej Jirman Date: Mon Jan 27 16:04:55 2025 +0100 ASoC: codec: es8316: "DAC Soft Ramp Rate" is just a 2 bit control Max value should be 3, otherwise "DAC Soft Ramp Switch" will be overwritten by this control. Signed-off-by: Ondrej Jirman Link: https://patch.msgid.link/20250127150458.1489425-1-megi@xff.cz Signed-off-by: Mark Brown sound/soc/codecs/es8316.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae3813525624fa55683d202c41a6301ab841447f Merge: 9c5968db9e62 d14b9a713b34 Author: Linus Torvalds Date: Mon Jan 27 08:16:33 2025 -0800 Merge tag 'xtensa-20250126' of https://github.com/jcmvbkbc/linux-xtensa Pull xtensa updates from Max Filippov: - a few one-liner cleanups * tag 'xtensa-20250126' of https://github.com/jcmvbkbc/linux-xtensa: xtensa/simdisk: Use str_write_read() helper in simdisk_transfer() xtensa: Remove zero-length alignment array xtensa: annotate dtb_start variable as static __initdata commit 5aa21b0495df1fac6d39f45011c1572bb431c44c Author: Christoph Hellwig Date: Mon Jan 27 15:30:44 2025 +0100 loop: don't clear LO_FLAGS_PARTSCAN on LOOP_SET_STATUS{,64} LOOP_SET_STATUS{,64} can set a lot more flags than it is supposed to clear (the LOOP_SET_STATUS_CLEARABLE_FLAGS vs LOOP_SET_STATUS_SETTABLE_FLAGS defines should have been a hint..). Fix this by only clearing the bits in LOOP_SET_STATUS_CLEARABLE_FLAGS. Fixes: ae074d07a0e5 ("loop: move updating lo_flag s out of loop_set_status_from_info") Reported-by: kernel test robot Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250127143045.538279-1-hch@lst.de Signed-off-by: Jens Axboe drivers/block/loop.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3981be13ec1baf811bfb93ed6a98bafc85cdeab1 Author: Viacheslav Dubeyko Date: Fri Jan 24 11:46:23 2025 -0800 ceph: exchange hardcoded value on NAME_MAX Initially, ceph_fs_debugfs_init() had temporary name buffer with hardcoded length of 80 symbols. Then, it was hardcoded again for 100 symbols. Finally, it makes sense to exchange hardcoded value on properly defined constant and 255 symbols should be enough for any name case. Signed-off-by: Viacheslav Dubeyko Reviewed-by: Patrick Donnelly Signed-off-by: Ilya Dryomov fs/ceph/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f0805d7c08bea71c95561bfb3e45d93b05196b9 Author: Liang Jie Date: Fri Jan 10 18:05:24 2025 +0800 ceph: streamline request head structures in MDS client The existence of the ceph_mds_request_head_old structure in the MDS client code is no longer required due to improvements in handling different MDS request header versions. This patch removes the now redundant ceph_mds_request_head_old structure and replaces its usage with the flexible and extensible ceph_mds_request_head structure. Changes include: - Modification of find_legacy_request_head to directly cast the pointer to ceph_mds_request_head_legacy without going through the old structure. - Update sizeof calculations in create_request_message to use offsetofend for consistency and future-proofing, rather than referencing the old structure. - Use of the structured ceph_mds_request_head directly instead of the old one. Additionally, this consolidation normalizes the handling of request_head_version v1 to align with versions v2 and v3, leading to a more consistent and maintainable codebase. These changes simplify the codebase and reduce potential confusion stemming from the existence of an obsolete structure. Signed-off-by: Liang Jie Reviewed-by: Viacheslav Dubeyko Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 16 ++++++++-------- include/linux/ceph/ceph_fs.h | 14 -------------- 2 files changed, 8 insertions(+), 22 deletions(-) commit 5820a3b08987951e3e4a89fca8ab6e1448f672e1 Author: Israel Rukshin Date: Wed Nov 27 08:57:32 2024 +0200 virtio_blk: Add support for transport error recovery Add support for proper cleanup and re-initialization of virtio-blk devices during transport reset error recovery flow. This enhancement includes: - Pre-reset handler (reset_prepare) to perform device-specific cleanup - Post-reset handler (reset_done) to re-initialize the device These changes allow the device to recover from various reset scenarios, ensuring proper functionality after a reset event occurs. Without this implementation, the device cannot properly recover from resets, potentially leading to undefined behavior or device malfunction. This feature has been tested using PCI transport with Function Level Reset (FLR) as an example reset mechanism. The reset can be triggered manually via sysfs (echo 1 > /sys/bus/pci/devices/$PCI_ADDR/reset). Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Message-Id: <1732690652-3065-3-git-send-email-israelr@nvidia.com> Signed-off-by: Michael S. Tsirkin drivers/block/virtio_blk.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit a0ec4fb63f5ce15732f8dadc63c931bdf9ff98b5 Author: Israel Rukshin Date: Wed Nov 27 08:57:31 2024 +0200 virtio_pci: Add support for PCIe Function Level Reset Implement support for Function Level Reset (FLR) in virtio_pci devices. This change adds reset_prepare and reset_done callbacks, allowing drivers to properly handle FLR operations. Without this patch, performing and recovering from an FLR is not possible for virtio_pci devices. This implementation ensures proper FLR handling and recovery for both physical and virtual functions. The device reset can be triggered in case of error or manually via sysfs: echo 1 > /sys/bus/pci/devices/$PCI_ADDR/reset Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Message-Id: <1732690652-3065-2-git-send-email-israelr@nvidia.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio.c | 94 ++++++++++++++++++++++++++++---------- drivers/virtio/virtio_pci_common.c | 41 +++++++++++++++++ include/linux/virtio.h | 8 ++++ 3 files changed, 118 insertions(+), 25 deletions(-) commit a3b9c053d82a9e524746f5473ad1bd18e9894bfa Author: Akihiko Odaki Date: Sun Sep 15 10:35:53 2024 +0900 vhost/net: Set num_buffers for virtio 1.0 The specification says the device MUST set num_buffers to 1 if VIRTIO_NET_F_MRG_RXBUF has not been negotiated. Fixes: 41e3e42108bc ("vhost/net: enable virtio 1.0") Signed-off-by: Akihiko Odaki Message-Id: <20240915-v1-v1-1-f10d2cb5e759@daynix.com> Signed-off-by: Michael S. Tsirkin drivers/vhost/net.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5abfb2208bd7b71381f6b803173d8ea075b67277 Author: Shijith Thotton Date: Fri Jan 3 21:01:37 2025 +0530 vdpa/octeon_ep: read vendor-specific PCI capability Added support to read the vendor-specific PCI capability to identify the type of device being emulated. Reviewed-by: Dan Carpenter Acked-by: Jason Wang Signed-off-by: Shijith Thotton Message-Id: <20250103153226.1933479-4-sthotton@marvell.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/octeon_ep/octep_vdpa.h | 20 ++++++++++++++++++ drivers/vdpa/octeon_ep/octep_vdpa_hw.c | 36 +++++++++++++++++++++++++++++++- drivers/vdpa/octeon_ep/octep_vdpa_main.c | 4 +++- 3 files changed, 58 insertions(+), 2 deletions(-) commit 1629ee1078fc2ac38e324adb0e50c8b04ec714a2 Author: Shijith Thotton Date: Fri Jan 3 21:01:36 2025 +0530 virtio-pci: define type and header for PCI vendor data Added macro definition for VIRTIO_PCI_CAP_VENDOR_CFG to identify the PCI vendor data type in the virtio_pci_cap structure. Defined a new struct virtio_pci_vndr_data for the vendor data capability header as per the specification. Acked-by: Jason Wang Signed-off-by: Shijith Thotton Message-Id: <20250103153226.1933479-3-sthotton@marvell.com> Signed-off-by: Michael S. Tsirkin include/uapi/linux/virtio_pci.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 59e457122982534f1c0fc1171056d0d8b1ed9f68 Author: Satha Rao Date: Fri Jan 3 21:01:35 2025 +0530 vdpa/octeon_ep: handle device config change events The first interrupt of the device is used to notify the host about device configuration changes, such as link status updates. The ISR configuration area is updated to indicate a config change event when triggered. Signed-off-by: Satha Rao Reviewed-by: Dan Carpenter Acked-by: Jason Wang Signed-off-by: Shijith Thotton Message-Id: <20250103153226.1933479-2-sthotton@marvell.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/octeon_ep/octep_vdpa_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 26f8ce06af6475b33b0bc60261e9f5027f9af58f Author: Shijith Thotton Date: Fri Jan 3 21:01:34 2025 +0530 vdpa/octeon_ep: enable support for multiple interrupts per device Updated the driver to utilize all the MSI-X interrupt vectors supported by each OCTEON endpoint VF, instead of relying on a single vector. Enabling more interrupts allows packets from multiple rings to be distributed across multiple cores, improving parallelism and performance. Reviewed-by: Dan Carpenter Acked-by: Jason Wang Signed-off-by: Shijith Thotton Message-Id: <20250103153226.1933479-1-sthotton@marvell.com> Signed-off-by: Michael S. Tsirkin drivers/vdpa/octeon_ep/octep_vdpa.h | 12 ++--- drivers/vdpa/octeon_ep/octep_vdpa_hw.c | 2 - drivers/vdpa/octeon_ep/octep_vdpa_main.c | 87 ++++++++++++++++++++------------ 3 files changed, 62 insertions(+), 39 deletions(-) commit 6f3955a62cec4ab4486eea2c81bdc3e39e7dee72 Author: Philipp Stanner Date: Thu Dec 19 10:44:29 2024 +0100 vdpa: solidrun: Replace deprecated PCI functions The PCI functions pcim_iomap_regions() pcim_iounmap_regions() pcim_iomap_table() have been deprecated by the PCI subsystem. Replace these functions with their successors pcim_iomap_region() and pcim_iounmap_region(). Signed-off-by: Philipp Stanner Message-Id: <20241219094428.21511-2-phasta@kernel.org> Signed-off-by: Michael S. Tsirkin Acked-by: Stefano Garzarella drivers/vdpa/solidrun/snet_main.c | 57 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 29 deletions(-) commit 212c3a85133332d776449fad3b9150c8d927f0fd Author: David Hildenbrand Date: Wed Dec 4 13:54:43 2024 +0100 s390/kdump: virtio-mem kdump support (CONFIG_PROC_VMCORE_DEVICE_RAM) Let's add support for including virtio-mem device RAM in the crash dump, setting NEED_PROC_VMCORE_DEVICE_RAM, and implementing elfcorehdr_fill_device_ram_ptload_elf64(). To avoid code duplication, factor out the code to fill a PT_LOAD entry. Signed-off-by: David Hildenbrand Message-Id: <20241204125444.1734652-13-david@redhat.com> Signed-off-by: Michael S. Tsirkin arch/s390/Kconfig | 1 + arch/s390/kernel/crash_dump.c | 39 +++++++++++++++++++++++++++++++-------- 2 files changed, 32 insertions(+), 8 deletions(-) commit c6a8239a9eddf38137797292ed75432957a37a14 Author: David Hildenbrand Date: Wed Dec 4 13:54:42 2024 +0100 virtio-mem: support CONFIG_PROC_VMCORE_DEVICE_RAM Let's implement the get_device_ram() vmcore callback, so architectures that select NEED_PROC_VMCORE_NEED_DEVICE_RAM, like s390 soon, can include that memory in a crash dump. Merge ranges, and process ranges that might contain a mixture of plugged and unplugged, to reduce the total number of ranges. Signed-off-by: David Hildenbrand Message-Id: <20241204125444.1734652-12-david@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_mem.c | 88 +++++++++++++++++++++++++++++++++++++++++++++ fs/proc/Kconfig | 1 + 2 files changed, 89 insertions(+) commit fe1d79dc54ac4f599a8739e4e6f6082ea5629006 Author: David Hildenbrand Date: Wed Dec 4 13:54:41 2024 +0100 virtio-mem: remember usable region size Let's remember the usable region size, which will be helpful in kdump mode next. Signed-off-by: David Hildenbrand Message-Id: <20241204125444.1734652-11-david@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_mem.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit a9403425b3cf704ab79eeb2c19cf00b2a3462834 Author: David Hildenbrand Date: Wed Dec 4 13:54:40 2024 +0100 virtio-mem: mark device ready before registering callbacks in kdump mode After the callbacks are registered we may immediately get a callback. So mark the device ready before registering the callbacks. Signed-off-by: David Hildenbrand Message-Id: <20241204125444.1734652-10-david@redhat.com> Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_mem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7ad4d1f6e6ef967cd24c6275d8d4056045c019c1 Author: David Hildenbrand Date: Wed Dec 4 13:54:39 2024 +0100 fs/proc/vmcore: introduce PROC_VMCORE_DEVICE_RAM to detect device RAM ranges in 2nd kernel s390 allocates+prepares the elfcore hdr in the dump (2nd) kernel, not in the crashed kernel. RAM provided by memory devices such as virtio-mem can only be detected using the device driver; when vmcore_init() is called, these device drivers are usually not loaded yet, or the devices did not get probed yet. Consequently, on s390 these RAM ranges will not be included in the crash dump, which makes the dump partially corrupt and is unfortunate. Instead of deferring the vmcore_init() call, to an (unclear?) later point, let's reuse the vmcore_cb infrastructure to obtain device RAM ranges as the device drivers probe the device and get access to this information. Then, we'll add these ranges to the vmcore, adding more PT_LOAD entries and updating the offsets+vmcore size. Use a separate Kconfig option to be set by an architecture to include this code only if the arch really needs it. Further, we'll make the config depend on the relevant drivers (i.e., virtio_mem) once they implement support (next). The alternative of having a PROVIDE_PROC_VMCORE_DEVICE_RAM config option was dropped for now for simplicity. The current target use case is s390, which only creates an elf64 elfcore, so focusing on elf64 is sufficient. Signed-off-by: David Hildenbrand Message-Id: <20241204125444.1734652-9-david@redhat.com> Acked-by: Andrew Morton Signed-off-by: Michael S. Tsirkin fs/proc/Kconfig | 18 ++++++ fs/proc/vmcore.c | 156 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/crash_dump.h | 9 +++ 3 files changed, 183 insertions(+) commit e29e9acae06dc28ca8dbf3db976e09787e610dc8 Author: David Hildenbrand Date: Wed Dec 4 13:54:38 2024 +0100 fs/proc/vmcore: factor out freeing a list of vmcore ranges Let's factor it out into include/linux/crash_dump.h, from where we can use it also outside of vmcore.c later. Acked-by: Baoquan He Signed-off-by: David Hildenbrand Message-Id: <20241204125444.1734652-8-david@redhat.com> Acked-by: Andrew Morton Signed-off-by: Michael S. Tsirkin fs/proc/vmcore.c | 9 +-------- include/linux/crash_dump.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) commit e017b1f4aa4eb887ee85fe13862206c0d31344b4 Author: David Hildenbrand Date: Wed Dec 4 13:54:37 2024 +0100 fs/proc/vmcore: factor out allocating a vmcore range and adding it to a list Let's factor it out into include/linux/crash_dump.h, from where we can use it also outside of vmcore.c later. Acked-by: Baoquan He Signed-off-by: David Hildenbrand Message-Id: <20241204125444.1734652-7-david@redhat.com> Acked-by: Andrew Morton Signed-off-by: Michael S. Tsirkin fs/proc/vmcore.c | 21 ++------------------- include/linux/crash_dump.h | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 19 deletions(-) commit 819403c893551c5e93bf9087d334e01bcab5c6b9 Author: David Hildenbrand Date: Wed Dec 4 13:54:36 2024 +0100 fs/proc/vmcore: move vmcore definitions out of kcore.h These vmcore defines are not related to /proc/kcore, move them out. We'll move "struct vmcoredd_node" to vmcore.c, because it is only used internally. While "struct vmcore" is only used internally for now, we're planning on using it from inline functions in crash_dump.h next, so move it to crash_dump.h. While at it, rename "struct vmcore" to "struct vmcore_range", which is a more suitable name and will make the usage of it outside of vmcore.c clearer. Signed-off-by: David Hildenbrand Message-Id: <20241204125444.1734652-6-david@redhat.com> Acked-by: Andrew Morton Signed-off-by: Michael S. Tsirkin fs/proc/vmcore.c | 26 ++++++++++++++++---------- include/linux/crash_dump.h | 7 +++++++ include/linux/kcore.h | 13 ------------- 3 files changed, 23 insertions(+), 23 deletions(-) commit 8e386957cc2d1fb67b65937c771140c1c47445b1 Author: David Hildenbrand Date: Wed Dec 4 13:54:35 2024 +0100 fs/proc/vmcore: prefix all pr_* with "vmcore:" Let's use "vmcore: " as a prefix, converting the single "Kdump: vmcore not initialized" one to effectively be "vmcore: not initialized". Signed-off-by: David Hildenbrand Message-Id: <20241204125444.1734652-5-david@redhat.com> Acked-by: Andrew Morton Signed-off-by: Michael S. Tsirkin fs/proc/vmcore.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0f3b1c40c65262a216fb459fd375f39442a5138b Author: David Hildenbrand Date: Wed Dec 4 13:54:34 2024 +0100 fs/proc/vmcore: disallow vmcore modifications while the vmcore is open The vmcoredd_update_size() call and its effects (size/offset changes) are currently completely unsynchronized, and will cause trouble when performed concurrently, or when done while someone is already reading the vmcore. Let's protect all vmcore modifications by the vmcore_mutex, disallow vmcore modifications while the vmcore is open, and warn on vmcore modifications after the vmcore was already opened once: modifications while the vmcore is open are unsafe, and modifications after the vmcore was opened indicates trouble. Properly synchronize against concurrent opening of the vmcore. No need to grab the mutex during mmap()/read(): after we opened the vmcore, modifications are impossible. It's worth noting that modifications after the vmcore was opened are completely unexpected, so failing if open, and warning if already opened (+closed again) is good enough. This change not only handles concurrent adding of device dumps + concurrent reading of the vmcore properly, it also prepares for other mechanisms that will modify the vmcore. Signed-off-by: David Hildenbrand Message-Id: <20241204125444.1734652-4-david@redhat.com> Acked-by: Andrew Morton Signed-off-by: Michael S. Tsirkin fs/proc/vmcore.c | 57 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 23 deletions(-) commit 2083dfe45e83336fafb92f689d6d4b873ad9872d Author: David Hildenbrand Date: Wed Dec 4 13:54:33 2024 +0100 fs/proc/vmcore: replace vmcoredd_mutex by vmcore_mutex Now that we have a mutex that synchronizes against opening of the vmcore, let's use that one to replace vmcoredd_mutex: there is no need to have two separate ones. This is a preparation for properly preventing vmcore modifications after the vmcore was opened. Signed-off-by: David Hildenbrand Message-Id: <20241204125444.1734652-3-david@redhat.com> Acked-by: Andrew Morton Signed-off-by: Michael S. Tsirkin fs/proc/vmcore.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit cdbc69716ff3a126cef43154742858e1caffa858 Author: David Hildenbrand Date: Wed Dec 4 13:54:32 2024 +0100 fs/proc/vmcore: convert vmcore_cb_lock into vmcore_mutex We want to protect vmcore modifications from concurrent opening of the vmcore, and also serialize vmcore modification. (a) We can currently modify the vmcore after it was opened. This can happen if a vmcoredd is added after the vmcore module was initialized and already opened by user space. We want to fix that and prepare for new code wanting to serialize against concurrent opening. (b) To handle it cleanly we need to protect the modifications against concurrent opening. As the modifications end up allocating memory and can sleep, we cannot rely on the spinlock. Let's convert the spinlock into a mutex to prepare for further changes. Signed-off-by: David Hildenbrand Message-Id: <20241204125444.1734652-2-david@redhat.com> Acked-by: Andrew Morton Signed-off-by: Michael S. Tsirkin fs/proc/vmcore.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit cc77e2ce187d26cc66af3577bf896d7410eb25ab Author: Daniel Baumann Date: Sat Jan 18 06:36:43 2025 +0100 ata: libata-core: Add ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives Disabling link power management on Samsung SSD 870 QVO drives to make them work again after the switch of the default LPM policy to low. Testing so far has shown that regular Samsung SSD 870 (the non QVO variants) do not need it and work fine with the default LPM policy. Cc: stable@vger.kernel.org Fixes: 7627a0edef54 ("ata: ahci: Drop low power policy board type") Signed-off-by: Daniel Baumann Link: https://lore.kernel.org/linux-ide/ac64a484-022c-42a0-95bc-1520333b1536@debian.org/ Signed-off-by: Niklas Cassel drivers/ata/libata-core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3ff53862c322aa7bb115d84348d5a641dc905d87 Author: Daniel Baluta Date: Mon Jan 27 10:34:22 2025 +0200 ASoC: amd: acp: Fix possible deadlock On error path, function acp_i2s_set_tdm_slot returns without releasing the lock and this could result in potential deadlocks in the future. Error reported by sparse: sound/soc/amd/acp/acp-i2s.c:95:12: error: context imbalance in 'acp_i2s_set_tdm_slot' - different lock contexts for basic block Fixes: cd60dec8994c ("ASoC: amd: acp: Refactor TDM slots selction based on acp revision id") Signed-off-by: Daniel Baluta Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://patch.msgid.link/20250127083422.20406-1-daniel.baluta@nxp.com Signed-off-by: Mark Brown sound/soc/amd/acp/acp-i2s.c | 1 + 1 file changed, 1 insertion(+) commit eb5c79828cfa72e8dbdf2db842a781ad6806cdaf Author: Geert Uytterhoeven Date: Sat Jan 25 20:32:15 2025 +0100 firmware: cs_dsp: FW_CS_DSP_KUNIT_TEST should not select REGMAP Enabling a (modular) test should not silently enable additional kernel functionality, as that may increase the attack vector of a product. Fix this by making FW_CS_DSP_KUNIT_TEST (and FW_CS_DSP_KUNIT_TEST_UTILS) depend on REGMAP instead of selecting it. After this, one can safely enable CONFIG_KUNIT_ALL_TESTS=m to build modules for all appropriate tests for ones system, without pulling in extra unwanted functionality, while still allowing a tester to manually enable REGMAP_BUILD and this test suite on a system where REGMAP is not enabled by default. Fixes: dd0b6b1f29b92202 ("firmware: cs_dsp: Add KUnit testing of bin file download") Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/73c81ac85e21f1c5a75b7628d90cbb0e1b4ed0fa.1737833376.git.geert@linux-m68k.org Signed-off-by: Mark Brown drivers/firmware/cirrus/Kconfig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 26b63bee2f6e711c5a169997fd126fddcfb90848 Author: Wentao Liang Date: Fri Jan 24 11:45:09 2025 +0800 xfs: Add error handling for xfs_reflink_cancel_cow_range In xfs_inactive(), xfs_reflink_cancel_cow_range() is called without error handling, risking unnoticed failures and inconsistent behavior compared to other parts of the code. Fix this issue by adding an error handling for the xfs_reflink_cancel_cow_range(), improving code robustness. Fixes: 6231848c3aa5 ("xfs: check for cow blocks before trying to clear them") Cc: stable@vger.kernel.org # v4.17 Reviewed-by: Darrick J. Wong Signed-off-by: Wentao Liang Signed-off-by: Carlos Maiolino fs/xfs/xfs_inode.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 28aecef5b1015bf6023ddc12b1a67f6678271fcb Author: Madhavan Srinivasan Date: Sun Jan 19 22:02:38 2025 +0530 selftests: livepatch: handle PRINTK_CALLER in check_result() Some arch configs (like ppc64) enable CONFIG_PRINTK_CALLER, which adds the caller id as part of the dmesg. With recent util-linux's update 467a5b3192f16 ('dmesg: add caller_id support') the standard "dmesg" has been enhanced to print PRINTK_CALLER fields. Due to this, even though the expected vs observed are same, end testcase results are failed. -% insmod test_modules/test_klp_livepatch.ko -livepatch: enabling patch 'test_klp_livepatch' -livepatch: 'test_klp_livepatch': initializing patching transition -livepatch: 'test_klp_livepatch': starting patching transition -livepatch: 'test_klp_livepatch': completing patching transition -livepatch: 'test_klp_livepatch': patching complete -% echo 0 > /sys/kernel/livepatch/test_klp_livepatch/enabled -livepatch: 'test_klp_livepatch': initializing unpatching transition -livepatch: 'test_klp_livepatch': starting unpatching transition -livepatch: 'test_klp_livepatch': completing unpatching transition -livepatch: 'test_klp_livepatch': unpatching complete -% rmmod test_klp_livepatch +[ T3659] % insmod test_modules/test_klp_livepatch.ko +[ T3682] livepatch: enabling patch 'test_klp_livepatch' +[ T3682] livepatch: 'test_klp_livepatch': initializing patching transition +[ T3682] livepatch: 'test_klp_livepatch': starting patching transition +[ T826] livepatch: 'test_klp_livepatch': completing patching transition +[ T826] livepatch: 'test_klp_livepatch': patching complete +[ T3659] % echo 0 > /sys/kernel/livepatch/test_klp_livepatch/enabled +[ T3659] livepatch: 'test_klp_livepatch': initializing unpatching transition +[ T3659] livepatch: 'test_klp_livepatch': starting unpatching transition +[ T789] livepatch: 'test_klp_livepatch': completing unpatching transition +[ T789] livepatch: 'test_klp_livepatch': unpatching complete +[ T3659] % rmmod test_klp_livepatch ERROR: livepatch kselftest(s) failed not ok 1 selftests: livepatch: test-livepatch.sh # exit=1 Currently the check_result() handles the "[time]" removal from the dmesg. Enhance the check to also handle removal of "[Thread Id]" or "[CPU Id]". Signed-off-by: Madhavan Srinivasan Acked-by: Miroslav Benes Reviewed-by: Petr Mladek Tested-by: Petr Mladek Link: https://lore.kernel.org/r/20250119163238.749847-1-maddy@linux.ibm.com Signed-off-by: Petr Mladek tools/testing/selftests/livepatch/functions.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fb95897b8c60653805aa09daec575ca30983f768 Author: Wentao Liang Date: Fri Jan 24 11:22:28 2025 +0800 xfs: Propagate errors from xfs_reflink_cancel_cow_range in xfs_dax_write_iomap_end In xfs_dax_write_iomap_end(), directly return the result of xfs_reflink_cancel_cow_range() when !written, ensuring proper error propagation and improving code robustness. Fixes: ea6c49b784f0 ("xfs: support CoW in fsdax mode") Cc: stable@vger.kernel.org # v6.0 Reviewed-by: Darrick J. Wong Signed-off-by: Wentao Liang Signed-off-by: Carlos Maiolino fs/xfs/xfs_iomap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 987f379b54091cc1b1db986bde71cee1081350b3 Author: Stefan Eichenberger Date: Fri Jan 24 09:50:39 2025 +0100 irqchip/irq-mvebu-icu: Fix access to msi_data from irq_domain::host_data mvebu_icu_translate() incorrectly casts irq_domain::host_data directly to mvebu_icu_msi_data. However, host_data actually points to a structure of type msi_domain_info. This incorrect cast causes issues such as the thermal sensors of the CP110 platform malfunctioning. Specifically, the translation of the SEI interrupt to IRQ_TYPE_EDGE_RISING fails, preventing proper interrupt handling. The following error was observed: genirq: Setting trigger mode 4 for irq 85 failed (irq_chip_set_type_parent+0x0/0x34) armada_thermal f2400000.system-controller:thermal-sensor@70: Cannot request threaded IRQ 85 Resolve the issue by first casting host_data to msi_domain_info and then accessing mvebu_icu_msi_data through msi_domain_info::chip_data. Fixes: d929e4db22b6 ("irqchip/irq-mvebu-icu: Prepare for real per device MSI") Signed-off-by: Stefan Eichenberger Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20250124085140.44792-1-eichest@gmail.com drivers/irqchip/irq-mvebu-icu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 825c78e6a60c309a59d18d5ac5968aa79cef0bd6 Author: Xu Lu Date: Mon Jan 27 17:38:46 2025 +0800 irqchip/riscv: Ensure ordering of memory writes and IPI writes RISC-V distinguishes between memory accesses and device I/O and uses FENCE instruction to order them as viewed by other RISC-V harts and external devices or coprocessors. The FENCE instruction can order any combination of device input(I), device output(O), memory reads(R) and memory writes(W). For example, 'fence w, o' is used to ensure all memory writes from instructions preceding the FENCE instruction appear earlier in the global memory order than device output writes from instructions after the FENCE instruction. RISC-V issues IPIs by writing to the IMSIC/ACLINT MMIO registers, which is regarded as device output operation. However, the existing implementation of the IMSIC/ACLINT drivers issue the IPI via writel_relaxed(), which does not guarantee the order of device output operation and preceding memory writes. As a consequence the hart receiving the IPI might not observe the IPI related data. Fix this by replacing writel_relaxed() with writel() when issuing IPIs, which uses 'fence w, o' to ensure all previous writes made by the current hart are visible to other harts before they receive the IPI. Signed-off-by: Xu Lu Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250127093846.98625-1-luxu.kernel@bytedance.com drivers/irqchip/irq-riscv-imsic-early.c | 2 +- drivers/irqchip/irq-thead-c900-aclint-sswi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1f566840a82982141f94086061927a90e79440e5 Author: Waiman Long Date: Fri Jan 24 20:54:41 2025 -0500 clocksource: Use pr_info() for "Checking clocksource synchronization" message The "Checking clocksource synchronization" message is normally printed when clocksource_verify_percpu() is called for a given clocksource if both the CLOCK_SOURCE_UNSTABLE and CLOCK_SOURCE_VERIFY_PERCPU flags are set. It is an informational message and so pr_info() is the correct choice. Signed-off-by: Waiman Long Signed-off-by: Thomas Gleixner Reviewed-by: Paul E. McKenney Acked-by: John Stultz Link: https://lore.kernel.org/all/20250125015442.3740588-1-longman@redhat.com kernel/time/clocksource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 05d91cdb1f9108426b14975ef4eeddf15875ca05 Author: Paul Fertser Date: Mon Jan 20 16:35:36 2025 +0300 net/ncsi: use dev_set_mac_address() for Get MC MAC Address handling Copy of the rationale from 790071347a0a1a89e618eedcd51c687ea783aeb3: Change ndo_set_mac_address to dev_set_mac_address because dev_set_mac_address provides a way to notify network layer about MAC change. In other case, services may not aware about MAC change and keep using old one which set from network adapter driver. As example, DHCP client from systemd do not update MAC address without notification from net subsystem which leads to the problem with acquiring the right address from DHCP server. Since dev_set_mac_address requires RTNL lock the operation can not be performed directly in the response handler, see 9e2bbab94b88295dcc57c7580393c9ee08d7314d. The way of selecting the first suitable MAC address from the list is changed, instead of having the driver check it this patch just assumes any valid MAC should be good. Fixes: b8291cf3d118 ("net/ncsi: Add NC-SI 1.2 Get MC MAC Address command") Signed-off-by: Paul Fertser Signed-off-by: David S. Miller net/ncsi/ncsi-rsp.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit f764fab72d98833b47d389ac2ed35bd000132d87 Author: Pali Rohár Date: Mon Oct 14 15:18:04 2024 +0200 cifs: Change translation of STATUS_NOT_A_REPARSE_POINT to -ENODATA STATUS_NOT_A_REPARSE_POINT indicates that object does not have reparse point buffer attached, for example returned by FSCTL_GET_REPARSE_POINT. Currently STATUS_NOT_A_REPARSE_POINT is translated to -EIO. Change it to -ENODATA which better describe the situation when no reparse point is set. Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/netmisc.c | 7 +++++++ fs/smb/client/nterr.c | 1 + fs/smb/client/nterr.h | 1 + fs/smb/client/smb2maperror.c | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) commit 5d9ccda9ba7e80893cd67905882315a4a7ab6ec1 Author: Kent Overstreet Date: Sat Jan 25 20:08:26 2025 -0500 bcachefs: Improve trace_move_extent_finish We're currently debugging issues with rebalance, where it's not making progress as quickly as it should be (or sometimes not at all). Add the full data_update to the move_extent_finish tracepoint, so we can check that the replicas we wrote match what we were supposed to do. Signed-off-by: Kent Overstreet fs/bcachefs/data_update.c | 50 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 16 deletions(-) commit 0e458a616f680837d0ba9c3c8ba9f66993db4225 Author: Kent Overstreet Date: Fri Jan 17 12:51:51 2025 -0500 bcachefs: Fix trace_copygc Signed-off-by: Kent Overstreet fs/bcachefs/movinggc.c | 11 +++++++---- fs/bcachefs/trace.h | 26 ++++++++++++-------------- 2 files changed, 19 insertions(+), 18 deletions(-) commit 75474a54ed354ab7b00b8557ca7a166871473848 Author: Kent Overstreet Date: Fri Jan 24 21:29:24 2025 -0500 bcachefs: Journal writes are now IOPRIO_CLASS_RT System performance is particularly sensitive to journal write latency, the number of outstanding journal writes is bounded and we can't issue journal flushes until other journal writes have completed. Signed-off-by: Kent Overstreet fs/bcachefs/journal_io.c | 2 ++ 1 file changed, 2 insertions(+) commit 9c5968db9e625019a0ee5226c7eebef5519d366a Merge: c159dfbdd4fc d1366e74342e Author: Linus Torvalds Date: Sun Jan 26 18:36:23 2025 -0800 Merge tag 'mm-stable-2025-01-26-14-59' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull MM updates from Andrew Morton: "The various patchsets are summarized below. Plus of course many indivudual patches which are described in their changelogs. - "Allocate and free frozen pages" from Matthew Wilcox reorganizes the page allocator so we end up with the ability to allocate and free zero-refcount pages. So that callers (ie, slab) can avoid a refcount inc & dec - "Support large folios for tmpfs" from Baolin Wang teaches tmpfs to use large folios other than PMD-sized ones - "Fix mm/rodata_test" from Petr Tesarik performs some maintenance and fixes for this small built-in kernel selftest - "mas_anode_descend() related cleanup" from Wei Yang tidies up part of the mapletree code - "mm: fix format issues and param types" from Keren Sun implements a few minor code cleanups - "simplify split calculation" from Wei Yang provides a few fixes and a test for the mapletree code - "mm/vma: make more mmap logic userland testable" from Lorenzo Stoakes continues the work of moving vma-related code into the (relatively) new mm/vma.c - "mm/page_alloc: gfp flags cleanups for alloc_contig_*()" from David Hildenbrand cleans up and rationalizes handling of gfp flags in the page allocator - "readahead: Reintroduce fix for improper RA window sizing" from Jan Kara is a second attempt at fixing a readahead window sizing issue. It should reduce the amount of unnecessary reading - "synchronously scan and reclaim empty user PTE pages" from Qi Zheng addresses an issue where "huge" amounts of pte pagetables are accumulated: https://lore.kernel.org/lkml/cover.1718267194.git.zhengqi.arch@bytedance.com/ Qi's series addresses this windup by synchronously freeing PTE memory within the context of madvise(MADV_DONTNEED) - "selftest/mm: Remove warnings found by adding compiler flags" from Muhammad Usama Anjum fixes some build warnings in the selftests code when optional compiler warnings are enabled - "mm: don't use __GFP_HARDWALL when migrating remote pages" from David Hildenbrand tightens the allocator's observance of __GFP_HARDWALL - "pkeys kselftests improvements" from Kevin Brodsky implements various fixes and cleanups in the MM selftests code, mainly pertaining to the pkeys tests - "mm/damon: add sample modules" from SeongJae Park enhances DAMON to estimate application working set size - "memcg/hugetlb: Rework memcg hugetlb charging" from Joshua Hahn provides some cleanups to memcg's hugetlb charging logic - "mm/swap_cgroup: remove global swap cgroup lock" from Kairui Song removes the global swap cgroup lock. A speedup of 10% for a tmpfs-based kernel build was demonstrated - "zram: split page type read/write handling" from Sergey Senozhatsky has several fixes and cleaups for zram in the area of zram_write_page(). A watchdog softlockup warning was eliminated - "move pagetable_*_dtor() to __tlb_remove_table()" from Kevin Brodsky cleans up the pagetable destructor implementations. A rare use-after-free race is fixed - "mm/debug: introduce and use VM_WARN_ON_VMG()" from Lorenzo Stoakes simplifies and cleans up the debugging code in the VMA merging logic - "Account page tables at all levels" from Kevin Brodsky cleans up and regularizes the pagetable ctor/dtor handling. This results in improvements in accounting accuracy - "mm/damon: replace most damon_callback usages in sysfs with new core functions" from SeongJae Park cleans up and generalizes DAMON's sysfs file interface logic - "mm/damon: enable page level properties based monitoring" from SeongJae Park increases the amount of information which is presented in response to DAMOS actions - "mm/damon: remove DAMON debugfs interface" from SeongJae Park removes DAMON's long-deprecated debugfs interfaces. Thus the migration to sysfs is completed - "mm/hugetlb: Refactor hugetlb allocation resv accounting" from Peter Xu cleans up and generalizes the hugetlb reservation accounting - "mm: alloc_pages_bulk: small API refactor" from Luiz Capitulino removes a never-used feature of the alloc_pages_bulk() interface - "mm/damon: extend DAMOS filters for inclusion" from SeongJae Park extends DAMOS filters to support not only exclusion (rejecting), but also inclusion (allowing) behavior - "Add zpdesc memory descriptor for zswap.zpool" from Alex Shi introduces a new memory descriptor for zswap.zpool that currently overlaps with struct page for now. This is part of the effort to reduce the size of struct page and to enable dynamic allocation of memory descriptors - "mm, swap: rework of swap allocator locks" from Kairui Song redoes and simplifies the swap allocator locking. A speedup of 400% was demonstrated for one workload. As was a 35% reduction for kernel build time with swap-on-zram - "mm: update mips to use do_mmap(), make mmap_region() internal" from Lorenzo Stoakes reworks MIPS's use of mmap_region() so that mmap_region() can be made MM-internal - "mm/mglru: performance optimizations" from Yu Zhao fixes a few MGLRU regressions and otherwise improves MGLRU performance - "Docs/mm/damon: add tuning guide and misc updates" from SeongJae Park updates DAMON documentation - "Cleanup for memfd_create()" from Isaac Manjarres does that thing - "mm: hugetlb+THP folio and migration cleanups" from David Hildenbrand provides various cleanups in the areas of hugetlb folios, THP folios and migration - "Uncached buffered IO" from Jens Axboe implements the new RWF_DONTCACHE flag which provides synchronous dropbehind for pagecache reading and writing. To permite userspace to address issues with massive buildup of useless pagecache when reading/writing fast devices - "selftests/mm: virtual_address_range: Reduce memory" from Thomas Weißschuh fixes and optimizes some of the MM selftests" * tag 'mm-stable-2025-01-26-14-59' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (321 commits) mm/compaction: fix UBSAN shift-out-of-bounds warning s390/mm: add missing ctor/dtor on page table upgrade kasan: sw_tags: use str_on_off() helper in kasan_init_sw_tags() tools: add VM_WARN_ON_VMG definition mm/damon/core: use str_high_low() helper in damos_wmark_wait_us() seqlock: add missing parameter documentation for raw_seqcount_try_begin() mm/page-writeback: consolidate wb_thresh bumping logic into __wb_calc_thresh mm/page_alloc: remove the incorrect and misleading comment zram: remove zcomp_stream_put() from write_incompressible_page() mm: separate move/undo parts from migrate_pages_batch() mm/kfence: use str_write_read() helper in get_access_type() selftests/mm/mkdirty: fix memory leak in test_uffdio_copy() kasan: hw_tags: Use str_on_off() helper in kasan_init_hw_tags() selftests/mm: virtual_address_range: avoid reading from VM_IO mappings selftests/mm: vm_util: split up /proc/self/smaps parsing selftests/mm: virtual_address_range: unmap chunks after validation selftests/mm: virtual_address_range: mmap() without PROT_WRITE selftests/memfd/memfd_test: fix possible NULL pointer dereference mm: add FGP_DONTCACHE folio creation flag mm: call filemap_fdatawrite_range_kick() after IOCB_DONTCACHE issue ... commit c159dfbdd4fc62fa08f6715d9d6c34d39cf40446 Merge: baf29cc16e18 beeba1eeec9c Author: Linus Torvalds Date: Sun Jan 26 17:50:53 2025 -0800 Merge tag 'mm-nonmm-stable-2025-01-24-23-16' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull non-MM updates from Andrew Morton: "Mainly individually changelogged singleton patches. The patch series in this pull are: - "lib min_heap: Improve min_heap safety, testing, and documentation" from Kuan-Wei Chiu provides various tightenings to the min_heap library code - "xarray: extract __xa_cmpxchg_raw" from Tamir Duberstein preforms some cleanup and Rust preparation in the xarray library code - "Update reference to include/asm-" from Geert Uytterhoeven fixes pathnames in some code comments - "Converge on using secs_to_jiffies()" from Easwar Hariharan uses the new secs_to_jiffies() in various places where that is appropriate - "ocfs2, dlmfs: convert to the new mount API" from Eric Sandeen switches two filesystems to the new mount API - "Convert ocfs2 to use folios" from Matthew Wilcox does that - "Remove get_task_comm() and print task comm directly" from Yafang Shao removes now-unneeded calls to get_task_comm() in various places - "squashfs: reduce memory usage and update docs" from Phillip Lougher implements some memory savings in squashfs and performs some maintainability work - "lib: clarify comparison function requirements" from Kuan-Wei Chiu tightens the sort code's behaviour and adds some maintenance work - "nilfs2: protect busy buffer heads from being force-cleared" from Ryusuke Konishi fixes an issues in nlifs when the fs is presented with a corrupted image - "nilfs2: fix kernel-doc comments for function return values" from Ryusuke Konishi fixes some nilfs kerneldoc - "nilfs2: fix issues with rename operations" from Ryusuke Konishi addresses some nilfs BUG_ONs which syzbot was able to trigger - "minmax.h: Cleanups and minor optimisations" from David Laight does some maintenance work on the min/max library code - "Fixes and cleanups to xarray" from Kemeng Shi does maintenance work on the xarray library code" * tag 'mm-nonmm-stable-2025-01-24-23-16' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (131 commits) ocfs2: use str_yes_no() and str_no_yes() helper functions include/linux/lz4.h: add some missing macros Xarray: use xa_mark_t in xas_squash_marks() to keep code consistent Xarray: remove repeat check in xas_squash_marks() Xarray: distinguish large entries correctly in xas_split_alloc() Xarray: move forward index correctly in xas_pause() Xarray: do not return sibling entries from xas_find_marked() ipc/util.c: complete the kernel-doc function descriptions gcov: clang: use correct function param names latencytop: use correct kernel-doc format for func params minmax.h: remove some #defines that are only expanded once minmax.h: simplify the variants of clamp() minmax.h: move all the clamp() definitions after the min/max() ones minmax.h: use BUILD_BUG_ON_MSG() for the lo < hi test in clamp() minmax.h: reduce the #define expansion of min(), max() and clamp() minmax.h: update some comments minmax.h: add whitespace around operators and after commas nilfs2: do not update mtime of renamed directory that is not moved nilfs2: handle errors that nilfs_prepare_chunk() may return CREDITS: fix spelling mistake ... commit baf29cc16e18e621a05340695d333fa5d0d001ce Merge: 88e45067a309 f2809aa4f591 Author: Linus Torvalds Date: Sun Jan 26 16:22:03 2025 -0800 Merge tag 'ata-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata updates from Damien Le Moal: - Constify struct pci_device_id (Christophe) - Remove unused code in the sata_gemini driver (David) - Improve libahci_platform to allow supporting non consecutive port numbers as specified in device trees (Josua) - Cleanup ahci driver code handling of port numbers with the new helper ahci_ignore_port() (me) - Use pm_sleep_ptr() to remove CONFIG_PM_SLEEP ifdefs in the ahci_st driver (Raphael). More of these changes will be included in the next cycle * tag 'ata-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: ahci: st: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() ahci: Introduce ahci_ignore_port() helper ata: libahci_platform: support non-consecutive port numbers ata: sata_gemini: Remove remaining reset glue ata: sata_gemini: Remove unused gemini_sata_reset_bridge() ata: Constify struct pci_device_id commit 88e45067a30918ebb4942120892963e2311330af Merge: 949268ec542a 7d6f88e76e28 Author: Linus Torvalds Date: Sun Jan 26 16:12:44 2025 -0800 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 (ufs, lpfc, fnic, qla2xx, mpi3mr). The major core change is the renaming of the slave_ methods plus a bit of constification. The rest are minor updates and fixes" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (103 commits) scsi: fnic: Propagate SCSI error code from fnic_scsi_drv_init() scsi: fnic: Test for memory allocation failure and return error code scsi: fnic: Return appropriate error code from failure of scsi drv init scsi: fnic: Return appropriate error code for mem alloc failure scsi: fnic: Remove always-true IS_FNIC_FCP_INITIATOR macro scsi: fnic: Fix use of uninitialized value in debug message scsi: fnic: Delete incorrect debugfs error handling scsi: fnic: Remove unnecessary else to fix warning in FDLS FIP scsi: fnic: Remove extern definition from .c files scsi: fnic: Remove unnecessary else and unnecessary break in FDLS scsi: mpi3mr: Fix possible crash when setting up bsg fails scsi: ufs: bsg: Set bsg_queue to NULL after removal scsi: ufs: bsg: Delete bsg_dev when setting up bsg fails scsi: st: Don't set pos_unknown just after device recognition scsi: aic7xxx: Fix build 'aicasm' warning scsi: Revert "scsi: ufs: core: Probe for EXT_IID support" scsi: storvsc: Ratelimit warning logs to prevent VM denial of service scsi: scsi_debug: Constify sdebug_driver_template scsi: documentation: Corrections for struct updates scsi: driver-api: documentation: Change what is added to docbook ... commit 949268ec542aac728e0284633a202983f8ec340e Merge: 41bfad507c04 352fafe97784 Author: Linus Torvalds Date: Sun Jan 26 15:59:47 2025 -0800 Merge tag 'firewire-updates-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire updates from Takashi Sakamoto: "Two changes for the 6.14 kernel. The first change concerns the PCI driver for 1394 OHCI hardware. Previously, it used legacy PCI suspend/resume callbacks, which have now been replaced with callbacks defined in the Linux generic power management framework. This original patch was posted in 2020 and has been adapted with some modifications for the latest kernel. Note that the driver still includes platform-specific operations for PowerPC, and these operations have not been tested in the new implementation yet. It would be helpful to share the results of suspending/resuming on the platform. The other one is a minor fix for the memory allocation in some KUnit tests" * tag 'firewire-updates-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: test: Fix potential null dereference in firewire kunit test firewire: ohci: use generic power management commit a23d4c2f5b80a8dc5f1e40658abbe5983af1a0e9 Author: Masahiro Yamada Date: Tue Jan 14 00:00:55 2025 +0900 genksyms: fix syntax error for attribute before init-declarator A longstanding issue with genksyms is that it has hidden syntax errors. For example, genksyms fails to parse the following valid code: int x, __attribute__((__section__(".init.data")))y; Here, only 'y' is annotated by the attribute, although I am not aware of actual uses of this pattern in the kernel tree. When a syntax error occurs, yyerror() is called. However, error_with_pos() is a no-op unless the -w option is provided. You can observe syntax errors by manually passing the -w option. $ echo 'int x, __attribute__((__section__(".init.data")))y;' | scripts/genksyms/genksyms -w :1: syntax error This commit allows attributes to be placed between a comma and init_declarator. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/parse.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c825840527813582385edca3ddeee46886527258 Author: Masahiro Yamada Date: Tue Jan 14 00:00:54 2025 +0900 genksyms: fix syntax error for builtin (u)int*x*_t types A longstanding issue with genksyms is that it has hidden syntax errors. When a syntax error occurs, yyerror() is called. However, error_with_pos() is a no-op unless the -w option is provided. You can observe syntax errors by manually passing the -w option. For example, genksyms fails to parse the following code in arch/arm64/lib/xor-neon.c: static inline uint64x2_t eor3(uint64x2_t p, uint64x2_t q, uint64x2_t r) { [ snip ] } The syntax error occurs because genksyms does not recognize the uint64x2_t keyword. This commit adds support for builtin types described in Arm Neon Intrinsics Reference. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/lex.l | 1 + 1 file changed, 1 insertion(+) commit 6494bd2d05f927fc0395c2ea11461517a9e0bb80 Author: Masahiro Yamada Date: Tue Jan 14 00:00:53 2025 +0900 genksyms: fix syntax error for attribute after 'union' A longstanding issue with genksyms is that it has hidden syntax errors. When a syntax error occurs, yyerror() is called. However, error_with_pos() is a no-op unless the -w option is provided. You can observe syntax errors by manually passing the -w option. For example, with CONFIG_MODVERSIONS=y on v6.13-rc1: $ make -s KCFLAGS=-D__GENKSYMS__ fs/lockd/svc.i $ cat fs/lockd/svc.i | scripts/genksyms/genksyms -w [ snip ] ./include/net/addrconf.h:35: syntax error The syntax error occurs in the following code in include/net/addrconf.h: union __packed { [ snip ] }; The issue arises from __packed, which is defined as __attribute__((__packed__)), immediately after the 'union' keyword. This commit allows the 'union' keyword to be followed by attributes. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/parse.y | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 41bfad507c04c3d0cced1277243aed6733616184 Merge: 40648d246fa4 f3b93547b91a Author: Linus Torvalds Date: Sun Jan 26 14:30:43 2025 -0800 Merge tag 'modules-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux Pull modules updates from Petr Pavlu: - Sign modules with sha512 instead of sha1 by default - Don't fail module loading when failing to set the ro_after_init section read-only - Constify 'struct module_attribute' - Cleanups and preparation for const struct bin_attribute - Put known GPL offenders in an array - Extend the preempt disabled section in dereference_symbol_descriptor() * tag 'modules-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux: module: sign with sha512 instead of sha1 by default module: Don't fail module loading when setting ro_after_init section RO failed module: Split module_enable_rodata_ro() module: sysfs: Use const 'struct bin_attribute' module: sysfs: Add notes attributes through attribute_group module: sysfs: Simplify section attribute allocation module: sysfs: Drop 'struct module_sect_attr' module: sysfs: Drop member 'module_sect_attr::address' module: sysfs: Drop member 'module_sect_attrs::nsections' module: Constify 'struct module_attribute' module: Handle 'struct module_version_attribute' as const params: Prepare for 'const struct module_attribute *' module: Put known GPL offenders in an array module: Extend the preempt disabled section in dereference_symbol_descriptor(). commit 40648d246fa4307ef11d185933cb0d79fc9ff46c Merge: 90ab2117f4cd cf186201118c Author: Linus Torvalds Date: Sun Jan 26 14:25:58 2025 -0800 Merge tag 'trace-tools-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull rv and tools/rtla updates from Steven Rostedt: - Add a test suite to test the tool Add a small test suite that can be used to test rtla's basic features to at least have something to test when applying changes. - Automate manual steps in monitor creation While creating a new monitor in RV, besides generating code from dot2k, there are a few manual steps which can be tedious and error prone, like adding the tracepoints, makefile lines and kconfig, or selecting events that start the monitor in the initial state. Updates were made to try and automate as much as possible among those steps to make creating a new RV monitor much quicker. It is still requires to select proper tracepoints, this step is harder to automate in a general way and, in several cases, would still need user intervention. - Have rtla timerlat hist and top set OSNOISE_WORKLOAD flag Have both rtla-timerlat-hist and rtla-timerlat-top set OSNOISE_WORKLOAD to the proper value ("on" when running with -k, "off" when running with -u) every time the option is available instead of setting it only when running with -u. This prevents rtla timerlat -k from giving no results when NO_OSNOISE_WORKLOAD is set, either manually or by an abnormally exited earlier run of rtla timerlat -u. - Stop rtla timerlat on signal properly when overloaded There is an issue where if rtla is run on machines with a high number of CPUs (100+), timerlat can generate more samples than rtla is able to process via tracefs_iterate_raw_events. This is especially common when the interval is set to 100us (rteval and cyclictest default) as opposed to the rtla default of 1000us, but also happens with the rtla default. Currently, this leads to rtla hanging and having to be terminated with SIGTERM. SIGINT setting stop_tracing is not enough, since more and more events are coming and tracefs_iterate_raw_events never exits. To fix this: Stop the timerlat tracer on SIGINT/SIGALRM to ensure no more events are generated when rtla is supposed to exit. Also on receiving SIGINT/SIGALRM twice, abort iteration immediately with tracefs_iterate_stop, making rtla exit right away instead of waiting for all events to be processed. - Account for missed events Due to tracefs buffer overflow, it can happen that rtla misses events, making the tracing results inaccurate. Count both the number of missed events and the total number of processed events, and display missed events as well as their percentage. The numbers are displayed for both osnoise and timerlat, even though for the earlier, missed events are generally not expected. For hist, the number is displayed at the end of the run; for top, it is displayed on each printing of the top table. - Changes to make osnoise more robust There was a dependency in the code that the first field of the osnoise_tool structure was the trace field. If that that ever changed, then the code work break. Change the code to encapsulate this dependency where the code that uses the structure does not have this dependency. * tag 'trace-tools-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (22 commits) rtla: Report missed event count rtla: Add function to report missed events rtla: Count all processed events rtla: Count missed trace events tools/rtla: Add osnoise_trace_is_off() rtla/timerlat_top: Set OSNOISE_WORKLOAD for kernel threads rtla/timerlat_hist: Set OSNOISE_WORKLOAD for kernel threads rtla/osnoise: Distinguish missing workload option rtla/timerlat_top: Abort event processing on second signal rtla/timerlat_hist: Abort event processing on second signal rtla/timerlat_top: Stop timerlat tracer on signal rtla/timerlat_hist: Stop timerlat tracer on signal rtla: Add trace_instance_stop tools/rtla: Add basic test suite verification/dot2k: Implement event type detection verification/dot2k: Auto patch current kernel source verification/dot2k: Simplify manual steps in monitor creation rv: Simplify manual steps in monitor creation verification/dot2k: Add support for name and description options verification/dot2k: More robust template variables ... commit 90ab2117f4cdde06ac1fd4906bfa46149ddd4323 Merge: 5fb40886243b e3ff4245928f Author: Linus Torvalds Date: Sun Jan 26 14:19:45 2025 -0800 Merge tag 'trace-rv-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull runtime verifier and osnoise fixes from Steven Rostedt: - Reset idle tasks on reset for runtime verifier When the runtime verifier is reset, it resets the task's data that is being monitored. But it only iterates for_each_process() which does not include the idle tasks. As the idle tasks can be monitored, they need to be reset as well. - Fix the enabling and disabling of tracepoints in osnoise If timerlat is enabled and the WORKLOAD flag is not set, then the osnoise tracer will enable the migrate task tracepoint to monitor it for its own workload. The test to enable the tracepoint is done against user space modifiable parameters. On disabling of the tracer, those same parameters are used to determine if the tracepoint should be disabled. The problem is if user space were to modify the parameters after it enables the tracer then it may not disable the tracepoint. Instead, a static variable is used to keep track if the tracepoint was enabled or not. Then when the tracer shuts down, it will use this variable to decide to disable the tracepoint or not, instead of looking at the user space parameters. * tag 'trace-rv-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing/osnoise: Fix resetting of tracepoints rv: Reset per-task monitors also for idle tasks commit 5fb40886243b64b8e084b99d983a19c10e296e9c Merge: c2da8b3f914f e876695aab1e Author: Linus Torvalds Date: Sun Jan 26 14:03:44 2025 -0800 Merge tag 'bitmap-for-6.14' of https://github.com:/norov/linux Pull bitmap updates from Yury Norov: "This includes const_true() series from Vincent Mailhol, another __always_inline rework from Nathan Chancellor for RISCV, and a couple of random fixes from Dr. David Alan Gilbert and I Hsin Cheng" * tag 'bitmap-for-6.14' of https://github.com:/norov/linux: cpumask: Rephrase comments for cpumask_any*() APIs cpu: Remove unused init_cpu_online riscv: Always inline bitops linux/bits.h: simplify GENMASK_INPUT_CHECK() compiler.h: add const_true() commit 0a89123deec34698720ccb1a2aba2d7df49076b3 Author: Heiko Carstens Date: Thu Jan 23 09:14:15 2025 +0100 s390/bitops: Use correct constraint for arch_test_bit() inline assembly Use the "Q" instead of "R" constraint to correctly reflect the instruction format of the tm instruction: the first operand is a memory reference without index register and short displacement. The "R" constraint indicates a memory reference with index register instead. This may lead to compile errors like: arch/s390/include/asm/bitops.h: Assembler messages: arch/s390/include/asm/bitops.h:60: Error: operand 1: syntax error; missing ')' after base register arch/s390/include/asm/bitops.h:60: Error: operand 2: syntax error; ')' not allowed here arch/s390/include/asm/bitops.h:60: Error: junk at end of line: `,4' Reported-by: Nathan Chancellor Closes: https://lore.kernel.org/r/20250122-s390-fix-std-for-gcc-15-v1-1-8b00cadee083@kernel.org Fixes: b2bc1b1a77c0 ("s390/bitops: Provide optimized arch_test_bit()") Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc287e4c9149ab54a5003b4d4da007818b5fda3d Author: Niklas Schnelle Date: Wed Jan 22 14:36:01 2025 +0100 s390/pci: Fix SR-IOV for PFs initially in standby Since commit 25f39d3dcb48 ("s390/pci: Ignore RID for isolated VFs") PFs which are not initially configured but in standby are considered isolated. That is they create only a single function PCI domain. Due to the PCI domains being created on discovery, this means that even if they are configured later on, sibling PFs and their child VFs will not be added to their PCI domain breaking SR-IOV expectations. The reason the referenced commit ignored standby PFs for the creation of multi-function PCI subhierarchies, was to work around a PCI domain renumbering scenario on reboot. The renumbering would occur after removing a previously in standby PF, whose domain number is used for its configured sibling PFs and their child VFs, but which itself remained in standby. When this is followed by a reboot, the sibling PF is used instead to determine the PCI domain number of it and its child VFs. In principle it is not possible to know which standby PFs will be configured later and which may be removed. The PCI domain and root bus are pre-requisites for hotplug slots so the decision of which functions belong to which domain can not be postponed. With the renumbering occurring only in rare circumstances and being generally benign, accept it as an oddity and fix SR-IOV for initially standby PFs simply by allowing them to create PCI domains. Cc: stable@vger.kernel.org Reviewed-by: Gerd Bayer Fixes: 25f39d3dcb48 ("s390/pci: Ignore RID for isolated VFs") Signed-off-by: Niklas Schnelle Signed-off-by: Alexander Gordeev arch/s390/pci/pci_bus.c | 1 - 1 file changed, 1 deletion(-) commit d8eebb11e933b784f6e5071da93d977f9187b2b5 Author: Heiko Carstens Date: Tue Jan 21 15:55:03 2025 +0100 s390/futex: Avoid KMSAN instrumention for user pointers Similar to commit eb6efdfeaeca ("s390/uaccess: add KMSAN support to put_user() and get_user()") disable KMSAN instrumention for futex inline assemblies, which contain dereferenced user pointers. With KMSAN instrumentation this would lead to accesses of shadows for user pointers, which should not happen. Handle the futex operations like they copy a value (old) from user space to kernel space. Acked-by: Ilya Leoshkevich Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/futex.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit c4891f4599410e50a1e42b8e76ca769cac83d846 Author: Heiko Carstens Date: Tue Jan 21 15:55:02 2025 +0100 s390/uaccess: Rename get_put_user_noinstr_attributes to uaccess_kmsan_or_inline Rename get_put_user_noinstr_attributes to a more generic uaccess_kmsan_or_inline name. This allows to use it for other non put_user()/get_user() uaccess functions withour causing confusion. Acked-by: Ilya Leoshkevich Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/uaccess.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 554f8842dcd9555cfd91517062c31f229b309ba1 Author: Heiko Carstens Date: Tue Jan 21 15:55:01 2025 +0100 s390/futex: Cleanup futex_atomic_cmpxchg_inatomic() Cleanup the futex_atomic_cmpxchg_inatomic() inline assembly to make it a bit more readable. Acked-by: Ilya Leoshkevich Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/futex.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 9e8f72f7730a403b66b3cf4b8e34244d08f74db5 Author: Heiko Carstens Date: Tue Jan 21 15:55:00 2025 +0100 s390/futex: Generate futex atomic op functions Cleanup the futex atomic op inline assembly and generate a function for each futex atomic op. This makes the code hopefully a bit more readable. Acked-by: Ilya Leoshkevich Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/futex.h | 76 ++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 34 deletions(-) commit 884f0582b232f521333c8ad1899c977d580dd755 Author: Heiko Carstens Date: Thu Jan 16 16:24:31 2025 +0100 s390/uaccess: Remove INLINE_COPY_FROM_USER and INLINE_COPY_TO_USER The s390 implementations of raw_copy_from_user() and raw_copy_to_user() are never inlined. However INLINE_COPY_FROM_USER and INLINE_COPY_TO_USER are still set. This leads to the odd situation that only the error handling (memset to zero of the not copied bytes) of copy_from_user() is inlined, while the actual fast path code is out-of-line. This would make sense if raw_copy_from_user() and raw_copy_to_user() were implemented in assembler files, where inlining is not possible. But the current s390 setup does not make any sense. Address this by moving the raw uaccess copy inline assemblies to the uaccess header file, and remove INLINE_COPY_FROM_USER and INLINE_COPY_TO_USER definitions. This way the uaccess code, but now including error handling, is still out-of-line with the common code _copy_from_user() and _copy_to_user() variants, which inline the raw uaccess functions via _inline_copy_from_user() and _inline_copy_to_user(). This reduces the size of the kernel image by ~17kb. (defconfig, gcc 14.2.0) Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/uaccess.h | 139 +++++++++++++++++++++++++++++++--------- arch/s390/lib/uaccess.c | 90 -------------------------- 2 files changed, 109 insertions(+), 120 deletions(-) commit ea5ae3a7f0a95cea70bd8afd165c95e19404a216 Author: Heiko Carstens Date: Mon Jan 13 13:37:06 2025 +0100 s390/uaccess: Use asm goto for put_user()/get_user() Use asm goto if available for put_user() and get_user(). This generates slightly better code. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/uaccess.h | 83 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 6 deletions(-) commit 636d35aec55d1e9062ce81cf0da66d05ed561096 Author: Heiko Carstens Date: Mon Jan 13 13:37:05 2025 +0100 s390/uaccess: Remove usage of the oac specifier Remove usage of the operand access control specifier for put_user() and get_user() (again). Instead hardcode the specifier for both inline assemblies. This saves one instruction. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/uaccess.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit dc7ff4b8cb782901c0c6809c708502293165a780 Author: Heiko Carstens Date: Mon Jan 13 13:37:04 2025 +0100 s390/uaccess: Replace EX_TABLE_UA_LOAD_MEM exception handling Remove EX_TABLE_UA_LOAD_MEM exception handling and replace it with EX_TABLE_UA_FAULT. Open code the return code check, and also open code setting of the destination to zero in case of an error. In almost all cases the compiler is able to optimize the open coded checks away, since all users of get_users() must check the return code, and are not supposed to use the result in case of an error. In addition this allows to change the get_user() inline assembly so that the "Q" constraint can be used for the destination, instead of only an "a" constraint. This generates slightly better code. Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/asm-extable.h | 4 ---- arch/s390/include/asm/uaccess.h | 14 ++++++++------ arch/s390/mm/extable.c | 14 -------------- 3 files changed, 8 insertions(+), 24 deletions(-) commit 67e959af254fe842c7b2ba4396c931985b289ef9 Author: Heiko Carstens Date: Mon Jan 13 13:37:03 2025 +0100 s390/uaccess: Cleanup noinstr __put_user()/__get_user() inline assembly constraints Remove superfluous underscores, brackets, and early clobber to make the code a bit more readable. Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/uaccess.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 718056f9d96872580f7c7cd73be1928a91924eb5 Author: Heiko Carstens Date: Mon Jan 13 13:37:02 2025 +0100 s390/uaccess: Remove __put_user_fn()/__get_user_fn() wrappers The __put_user_fn() and __get_user_fn() wrappers are leftovers from the time where the kernel was compiled with or without mvcos support plus they were later used to workaround the problems that came with asm register constructs. Both reasons do not exist anymore, therefore remove the wrappers and shorten the code. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/uaccess.h | 113 ++++++++++++---------------------------- 1 file changed, 32 insertions(+), 81 deletions(-) commit 5e680e265f46b28bebc652638bc246cf815ed582 Author: Heiko Carstens Date: Mon Jan 13 13:37:01 2025 +0100 s390/uaccess: Move put_user() / __put_user() close to put_user() asm code Keep put_user() and get_user() code separated. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/uaccess.h | 60 ++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit c7474da9fef537c0fc89cef552897116456a2e41 Author: Heiko Carstens Date: Mon Jan 13 13:37:00 2025 +0100 s390/uaccess: Use asm goto for __mvc_kernel_nofault() Use asm goto for __mvc_kernel_nofault() if available. This generates slightly better code, since the error checking happens implicitly with the goto (aka exception) and the good path comes without any checks and branches. Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/uaccess.h | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 5b629e64e5dd22d2f68f730f0c341342d9b83dda Author: Heiko Carstens Date: Mon Jan 13 13:36:59 2025 +0100 s390/uaccess: Implement __get_kernel_nofault()/__put_kernel_nofault() with mvc Use the mvc instruction in order to implement __get_kernel_nofault() and __put_kernel_nofault(). Both functions have a source and destination address where the code is supposed to read from and write to. Use the mvc instruction to copy from source to destination instead of lg/stg like instructions. This generates slightly better code. Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/uaccess.h | 122 +++++++++++++++------------------------- 1 file changed, 44 insertions(+), 78 deletions(-) commit 722926ecbcb36c41e3cf3f051aa6cfbfaebe5959 Author: Heiko Carstens Date: Mon Jan 13 13:36:58 2025 +0100 s390/extable: Rename EX_TABLE_UA_STORE to EX_TABLE_UA_FAULT Rename EX_TABLE_UA_STORE to a more generic EX_TABLE_UA_FAULT name. This allows to use the extable type also for uaccess inline assemblies which read from userspace, without causing confusion. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/asm-extable.h | 6 +++--- arch/s390/include/asm/uaccess.h | 8 ++++---- arch/s390/mm/extable.c | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) commit 836968fa0a85f01eeeb1f1144dfa87e3ab94a3d7 Author: Heiko Carstens Date: Mon Jan 13 13:36:57 2025 +0100 s390/fpu: Use CONFIG_CC_HAS_ASM_AOR_FORMAT_FLAGS instead of CONFIG_CC_IS_CLANG Use the more precise CONFIG_CC_HAS_ASM_AOR_FORMAT_FLAGS to tell if the compiler has support for the A, O, and R inline assembly format flags. This allows recent Clang compilers to generate better code. Move code around so the good (aka better) case at the top of each ifdef construct. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/fpu-insn.h | 168 +++++++++++++++++++-------------------- 1 file changed, 84 insertions(+), 84 deletions(-) commit f340d270491dc6b4c2da036c33642fbbf1de47af Author: Heiko Carstens Date: Mon Jan 13 13:36:56 2025 +0100 s390: Introduce CC_HAS_ASM_AOR_FORMAT_FLAGS Kconfig option Introduce CC_HAS_ASM_AOR_FORMAT_FLAGS Kconfig option. Use this option for inline assemblies where the A, O, or R format flags are used. Those flags are not available for Clang versions before 19.1.0. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+) commit 579a6633b8f720ed2c17e3445012e3834a8535a0 Author: Heiko Carstens Date: Mon Jan 13 13:36:55 2025 +0100 s390: Rename GCC_ASM_FLAG_OUTPUT_BROKEN to CC_ASM_FLAG_OUTPUT_BROKEN Config options which can be used to check for compiler bugs and features have the compiler independent CC prefix in order to avoid duplicating and having to check config options for multiple compilers. Therefore rename the config option accordingly. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/Kconfig | 2 +- arch/s390/include/asm/asm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1d7a9719ba2dacac866bfa4fd17212d4dfc03bbe Author: Heiko Carstens Date: Fri Jan 10 11:52:18 2025 +0100 s390/extable: Replace open-coded sfpc inline assembly with fpu_sfpc() Use fpc_sfpc() instead of open-coding. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/mm/extable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ae02615b7fcea9ce9a4ec40b3c5b5dafd322b179 Author: Heiko Carstens Date: Fri Jan 10 11:52:17 2025 +0100 s390/fpu: Add fpc exception handler / remove fixup section again The fixup section was added again by mistake when test_fp_ctl() was removed. The reason for the removal of the fixup section is described in commit 484a8ed8b7d1 ("s390/extable: add dedicated uaccess handler"). Remove it again for the same reason. Add an exception handler which handles exceptions when the floating point control register is attempted to be set to invalid values. The exception handler sets the floating point control register to zero and continues execution at the specified address. The new sfpc inline assembly is open-coded to make back porting a bit easier. Fixes: 702644249d3e ("s390/fpu: get rid of test_fp_ctl()") Cc: stable@vger.kernel.org Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/asm-extable.h | 4 ++++ arch/s390/include/asm/fpu-insn.h | 15 ++++----------- arch/s390/kernel/vmlinux.lds.S | 1 - arch/s390/mm/extable.c | 9 +++++++++ 4 files changed, 17 insertions(+), 12 deletions(-) commit f684b7954ea6b29662caa25e0a4941231c05e413 Author: Vasily Gorbik Date: Wed Dec 11 12:33:45 2024 +0100 s390/ipl_report: Remove unused 'size' variable Remove unused since commit f913a6600491 ("s390/boot: rework decompressor reserved tracking") 'size' variable from get_cert_comp_list_size(). Signed-off-by: Vasily Gorbik Acked-by: Alexander Gordeev Signed-off-by: Alexander Gordeev arch/s390/boot/ipl_report.c | 1 - 1 file changed, 1 deletion(-) commit d7bebcb4a898bd214bbd71107f975b7b9f0bde32 Author: Vasily Gorbik Date: Wed Dec 11 12:29:40 2024 +0100 s390: Optimize __pa/__va when RANDOMIZE_IDENTITY_BASE is off Use a zero identity base when CONFIG_RANDOMIZE_IDENTITY_BASE is off, slightly optimizing __pa/__va calculations. Signed-off-by: Vasily Gorbik Acked-by: Alexander Gordeev Signed-off-by: Alexander Gordeev arch/s390/boot/startup.c | 5 +++-- arch/s390/include/asm/page.h | 4 ++++ arch/s390/kernel/setup.c | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) commit 9af310ef10dedc2f8d400d26fdc99d771537b2fd Author: Vasily Gorbik Date: Thu Dec 12 16:39:05 2024 +0100 s390/boot: Improve decompression error reporting Currently, decompression error messages can be very uninformative: [ 0.029853] startup: read error [ 0.040507] startup: -- System halted Improve these messages to make it clear that the error originates from the decompression code. Additionally, on decompression failures, if bootdebug is enabled, dump the message ring buffer before halting. This provides more context for diagnosing startup issues. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/decompressor.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit ec6f9f7e5bbf983323d53b66e8a76d699d26736c Author: Vasily Gorbik Date: Wed Dec 11 16:57:21 2024 +0100 s390/boot: Add startup debugging support Add boot_debug() calls to log various memory layout decisions and randomization details during early startup, improving debugging capabilities. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/startup.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 418b4d5e617ad0a4c532496ea86f7fb28de9fd95 Author: Vasily Gorbik Date: Wed Dec 11 12:11:04 2024 +0100 s390/boot: Add vmem debugging support Introduce boot_debug() calls in vmem code to log page table mappings including KASAN shadow mappings for improved early boot debugging. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/vmem.c | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) commit a56827e5a5fa02a5241eab7342f51c840d99ee15 Author: Vasily Gorbik Date: Wed Dec 11 11:59:50 2024 +0100 s390/boot: Move command line parsing earlier Reorder the store_ipl_parmblock(), uv_query_info(), and command line setup calls to occur earlier. This ensures debug printing covers all memory tracking activities from the start. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/startup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9688b17b4a3e608c35b22028e37641d3512faafe Author: Vasily Gorbik Date: Wed Dec 11 11:06:19 2024 +0100 s390/boot: Add physmem tracking debug support Introduce boot_debug() calls to track memory detection, online ranges, reserved areas, and allocations (except for VMEM allocations, which are too frequent). Instead introduce dump_physmem_reserved() function which prints out full memory tracking information. This helps in debugging early boot memory handling. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/boot.h | 1 + arch/s390/boot/physmem_info.c | 49 +++++++++++++++++++++++++++++++++--- arch/s390/boot/startup.c | 1 + arch/s390/include/asm/physmem_info.h | 4 +-- arch/s390/kernel/setup.c | 4 +-- 5 files changed, 51 insertions(+), 8 deletions(-) commit d2ebe06bf5a18714b74cda0eea60bbb10553477e Author: Vasily Gorbik Date: Fri Nov 29 12:57:44 2024 +0100 s390: Use pr_info for "KernelAddressSanitizer initialized" message sclp_early_printk() ignores boot console debug settings and prints unconditionally. It also prints message without any timestamp or formatting. Convert it to pr_info(). Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/kernel/early.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70309dc77699dd598ade67ca7fca5a17ac3275c1 Author: Vasily Gorbik Date: Fri Nov 29 12:56:48 2024 +0100 s390/boot: Add timestamps to early boot messages When CONFIG_PRINTK_TIME is enabled, add timestamps to boot messages in the same format as regular printk. Timestamps appear only with earlyprintk and are stored in the boot messages ring buffer, but are not propagated to main kernel messages (if earlyprintk is not enabled). This prevents double timestamps in the output. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/printk.c | 27 ++++++++++++++++++++++----- arch/s390/include/asm/boot_data.h | 11 +++++++++++ arch/s390/kernel/setup.c | 2 +- 3 files changed, 34 insertions(+), 6 deletions(-) commit b2a992a55fb60395d1ab9a4d4b2ea3783e3b7ad9 Author: Vasily Gorbik Date: Wed Nov 20 20:30:10 2024 +0100 s390/boot: Dump message ring buffer on crash with bootdebug Dump the boot message ring buffer when a crash occurs during boot, but only if bootdebug is enabled. This helps assist in analyzing boot-time issues by providing additional debugging information. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/boot.h | 1 + arch/s390/boot/pgm_check_info.c | 2 ++ arch/s390/boot/printk.c | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+) commit b79015ae63d3c91f06ab78b6f06abba94fd88e12 Author: Vasily Gorbik Date: Sat Nov 23 00:02:25 2024 +0100 s390/boot: Add prefix filtering to bootdebug messages Enhance boot debugging by allowing the "bootdebug" kernel parameter to accept an optional comma-separated list of prefixes. Only debug messages starting with these prefixes will be printed during boot. For example: bootdebug=startup,vmem Not specifying a filter for the "bootdebug" parameter prints all debug messages. The `boot_fmt` macro can be defined to set a common prefix: #define boot_fmt(fmt) "startup: " fmt Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/boot.h | 20 ++++++++++++-------- arch/s390/boot/ipl_parm.c | 5 ++++- arch/s390/boot/printk.c | 6 ++++-- arch/s390/include/asm/boot_data.h | 25 +++++++++++++++++++++++++ arch/s390/kernel/setup.c | 8 +++++--- 5 files changed, 50 insertions(+), 14 deletions(-) commit d20d8e51338fc39aedf98786a4e9b71d4af4bda7 Author: Vasily Gorbik Date: Wed Nov 20 22:23:48 2024 +0100 s390/boot: Add bootdebug option to control debug messages Suppress decompressor debug messages by default, similar to regular kernel debug messages that require 'DEBUG' or 'dyndbg' to be enabled (depending on CONFIG_DYNAMIC_DEBUG). Introduce a 'bootdebug' option to enable printing these messages when needed. All messages are still stored in the boot ring buffer regardless. To enable boot debug messages: bootdebug debug Or combine with 'earlyprintk' to print them without delay: bootdebug debug earlyprintk Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/ipl_parm.c | 2 ++ arch/s390/boot/printk.c | 4 ++++ arch/s390/include/asm/boot_data.h | 1 + arch/s390/kernel/early.c | 1 + arch/s390/kernel/setup.c | 10 ++++++++-- 5 files changed, 16 insertions(+), 2 deletions(-) commit c09f8d0ad673afdfd5d097d95d2026a84fa4926e Author: Vasily Gorbik Date: Wed Nov 20 21:46:17 2024 +0100 s390/boot: Defer boot messages when earlyprintk is not enabled When earlyprintk is not specified, boot messages are only stored in a ring buffer to be printed later by printk when console driver is registered. Critical messages from boot_emerg() are always printed immediately, even without earlyprintk. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/ipl_parm.c | 2 ++ arch/s390/boot/printk.c | 9 +++++++-- arch/s390/include/asm/boot_data.h | 1 + arch/s390/kernel/setup.c | 18 ++++++++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) commit 847e5a4c713747e8c0e9e25bda00aea782d1062b Author: Vasily Gorbik Date: Wed Nov 20 20:36:46 2024 +0100 s390/boot: Make boot_printk() return int Modify boot_printk() to return int, aligning it with printk(). Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/boot.h | 2 +- arch/s390/boot/printk.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 816b5feaed13946b06fb7c63b7343fbfd83e520f Author: Vasily Gorbik Date: Wed Nov 20 20:10:50 2024 +0100 s390/boot: Introduce ring buffer for boot messages Collect all boot messages into a ring buffer independent of the current log level. This allows to retain all boot-time messages, which is particularly useful for analyzing early crashes. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/printk.c | 20 +++++++++++++++++++- arch/s390/include/asm/boot_data.h | 13 +++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) commit bbbaf061237dbf5817a46f2e209a663750277e3b Author: Vasily Gorbik Date: Sun Nov 24 14:47:58 2024 +0100 s390/boot: Use decimal format specifiers in boot messages Now that boot_printk() supports decimal specifiers, update boot_emerg() messages to use %d and %lu instead of %x and %lx where appropriate. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/pgm_check_info.c | 2 +- arch/s390/boot/physmem_info.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 42fc158c7e789ccb8f9d42e5b18d00ca00d93cfe Author: Vasily Gorbik Date: Wed Nov 20 17:07:56 2024 +0100 s390/boot: Replace boot_printk() with loglevel-specific helpers Replaces boot_printk() calls with appropriate loglevel-specific helpers such as boot_emerg(), boot_warn(), and boot_debug(). Using functions with explicit log levels improves log clarity and aligns the boot code with standard kernel logging practices. This makes it easier to filter and manage boot-time messages based on their severity. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/als.c | 10 ++++---- arch/s390/boot/ipl_parm.c | 2 +- arch/s390/boot/kaslr.c | 2 +- arch/s390/boot/pgm_check_info.c | 51 ++++++++++++++++++++--------------------- arch/s390/boot/physmem_info.c | 26 ++++++++++----------- arch/s390/boot/startup.c | 5 ++-- 6 files changed, 48 insertions(+), 48 deletions(-) commit d538fdc49a7d7dd068fc29bcc6093e8dd45abbd9 Author: Vasily Gorbik Date: Wed Nov 20 16:56:12 2024 +0100 s390/boot: Add support for boot messages loglevels Add message severity levels for boot messages, similar to the main kernel. Support command-line options that control console output verbosity, including "loglevel," "ignore_loglevel," "debug," and "quiet". Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/boot.h | 12 ++++++++++++ arch/s390/boot/ipl_parm.c | 11 +++++++++++ arch/s390/boot/printk.c | 29 ++++++++++++++++++++++++++++- 3 files changed, 51 insertions(+), 1 deletion(-) commit 92b712fa7d5b67ffa3d1ee6147643e9f60154c10 Author: Vasily Gorbik Date: Thu Nov 28 02:35:17 2024 +0100 s390/boot: Add decimal conversion specifiers to boot_printk() Enable the boot_printk() function to print decimal values. Add the 'd', 'i', and 'u' conversion specifiers support. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/printk.c | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) commit 3d846daafb2fe89e9f1ecf48d2a5d8fec52189f9 Author: Vasily Gorbik Date: Thu Nov 28 02:22:54 2024 +0100 s390/boot: Add field width and padding handling to boot_printk() Enhance boot_printk() to support field width and padding across all argument types for better formatting. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/printk.c | 68 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 18 deletions(-) commit 9291d572fe5b887ae1d93e9b40d8fd6ad10c2f30 Author: Vasily Gorbik Date: Wed Nov 20 16:10:55 2024 +0100 s390/boot: Add length modifiers to boot_printk() Add support for the 'l', 'h', 'hh', and 'z' length modifiers. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/printk.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit dccac2b22b1cabb37b141f7df5bebbcf10a2b44d Author: Vasily Gorbik Date: Wed Nov 20 15:58:56 2024 +0100 s390/boot: Add %% support to boot_printk() Add "%%" support for the boot_printk() format string. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/boot/printk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 490a5e99ead57b16045a8e968fd8bc5fdcbfc90c Author: Vasily Gorbik Date: Tue Dec 10 11:18:32 2024 +0100 s390/boot: Allow KASAN mapping to fallback to small pages For KASAN shadow mappings, switch from physmem_alloc_or_die() to physmem_alloc() and return INVALID_PHYS_ADDR on allocation failure. This allows gracefully falling back from large pages to smaller pages (1MB or 4KB) if the allocation of 2GB size/aligned pages cannot be fulfilled. Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Alexander Gordeev arch/s390/boot/vmem.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit aeb4358a52365269e6ca658505a6410ed85570b2 Author: Vasily Gorbik Date: Fri Nov 29 02:26:19 2024 +0100 s390/boot: Add physmem_alloc() Add physmem_alloc() as a variant of physmem_alloc_or_die() that can return an error instead of triggering a panic on OOM. This allows callers to implement alternative fallback paths. Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Alexander Gordeev arch/s390/boot/boot.h | 2 ++ arch/s390/boot/physmem_info.c | 28 +++++++++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) commit 02415f1cf435ac1403743156c21b79f52adee6ab Author: Vasily Gorbik Date: Fri Dec 13 00:59:26 2024 +0100 s390/boot: Rename physmem_alloc_top_down() to physmem_alloc_or_die() The new name better reflects the function's behavior, emphasizing that it will terminate execution if allocation fails. Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Alexander Gordeev arch/s390/boot/boot.h | 4 ++-- arch/s390/boot/ipl_report.c | 2 +- arch/s390/boot/kaslr.c | 2 +- arch/s390/boot/physmem_info.c | 4 ++-- arch/s390/boot/startup.c | 2 +- arch/s390/boot/vmem.c | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-) commit e70452c4ba2ce1e24a3fdc18bd623edb7b56013c Author: Vasily Gorbik Date: Fri Nov 29 01:49:26 2024 +0100 s390/mm: Allow large pages for KASAN shadow mapping Commit c98d2ecae08f ("s390/mm: Uncouple physical vs virtual address spaces") introduced a large_allowed() helper that restricts which mapping modes can use large pages. This change unintentionally prevented KASAN shadow mappings from using large pages, despite there being no reason to avoid them. In fact, large pages are preferred for performance. Since commit d8073dc6bc04 ("s390/mm: Allow large pages only for aligned physical addresses"), both can_large_pud() and can_large_pmd() call _pa() to check if large page physical addresses are aligned. However, _pa() has a side effect: it allocates memory in POPULATE_KASAN_MAP_SHADOW mode. Rename large_allowed() to large_page_mapping_allowed() and add POPULATE_KASAN_MAP_SHADOW to the allowed list to restore large page mappings for KASAN shadows. While large_page_mapping_allowed() isn't strictly necessary with current mapping modes since disallowed modes either don't map anything or fail alignment and size checks, keep it for clarity. Rename _pa() to resolve_pa_may_alloc() for clarity and to emphasize existing side effect. Rework can_large_pud()/can_large_pmd() to take the side effect into consideration and actually return physical address instead of just checking conditions. Fixes: c98d2ecae08f ("s390/mm: Uncouple physical vs virtual address spaces") Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Alexander Gordeev arch/s390/boot/vmem.c | 74 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 24 deletions(-) commit 531936dee53e471a3ec668de3c94ca357f54b7e8 Author: Tiezhu Yang Date: Sun Jan 26 21:49:59 2025 +0800 LoongArch: Extend the maximum number of watchpoints The maximum number of load/store watchpoints and fetch instruction watchpoints is 14 each according to LoongArch Reference Manual, so extend the maximum number of watchpoints from 8 to 14 for ptrace. By the way, just simply change 8 to 14 for the definition in struct user_watch_state at the beginning, but it may corrupt uapi, then add a new struct user_watch_state_v2 directly. As far as I can tell, the only users for this struct in the userspace are GDB and LLDB, there are no any problems of software compatibility between the application and kernel according to the analysis. The compatibility problem has been considered while developing and testing. When the applications in the userspace get watchpoint state, the length will be specified which is no bigger than the sizeof struct user_watch_state or user_watch_state_v2, the actual length is assigned as the minimal value of the application and kernel in the generic code of ptrace: kernel/ptrace.c: ptrace_regset(): kiov->iov_len = min(kiov->iov_len, (__kernel_size_t) (regset->n * regset->size)); if (req == PTRACE_GETREGSET) return copy_regset_to_user(task, view, regset_no, 0, kiov->iov_len, kiov->iov_base); else return copy_regset_from_user(task, view, regset_no, 0, kiov->iov_len, kiov->iov_base); For example, there are four kind of combinations, all of them work well. (1) "older kernel + older gdb", the actual length is 8+(8+8+4+4)*8=200; (2) "newer kernel + newer gdb", the actual length is 8+(8+8+4+4)*14=344; (3) "older kernel + newer gdb", the actual length is 8+(8+8+4+4)*8=200; (4) "newer kernel + older gdb", the actual length is 8+(8+8+4+4)*8=200. Link: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#control-and-status-registers-related-to-watchpoints Cc: stable@vger.kernel.org Fixes: 1a69f7a161a7 ("LoongArch: ptrace: Expose hardware breakpoints to debuggers") Reviewed-by: WANG Xuerui Reviewed-by: Xi Ruoyao Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen arch/loongarch/include/uapi/asm/ptrace.h | 10 ++++++++++ arch/loongarch/kernel/ptrace.c | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) commit f502ea618bf16d615d7dc6138c8988d3118fe750 Author: Tiezhu Yang Date: Sun Jan 26 21:49:59 2025 +0800 LoongArch: Change 8 to 14 for LOONGARCH_MAX_{BRP,WRP} The maximum number of load/store watchpoints and fetch instruction watchpoints is 14 each according to LoongArch Reference Manual, so change 8 to 14 for the related code. Link: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#control-and-status-registers-related-to-watchpoints Cc: stable@vger.kernel.org Fixes: edffa33c7bb5 ("LoongArch: Add hardware breakpoints/watchpoints support") Reviewed-by: WANG Xuerui Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen arch/loongarch/include/asm/hw_breakpoint.h | 4 +- arch/loongarch/include/asm/loongarch.h | 60 ++++++++++++++++++++++++++++++ arch/loongarch/kernel/hw_breakpoint.c | 16 +++++++- 3 files changed, 76 insertions(+), 4 deletions(-) commit 04816c1507b46baccd17a4bc948440b3634d5d13 Author: Huacai Chen Date: Sun Jan 26 21:49:59 2025 +0800 LoongArch: Add debugfs entries to switch SFB/TSO state We need to switch SFB (Store Fill Buffer) and TSO (Total Store Order) state at runtime to debug memory management and KVM virtualization, so add two debugfs entries "sfb_state" and "tso_state" under the directory /sys/kernel/debug/loongarch. Query SFB: cat /sys/kernel/debug/loongarch/sfb_state Enable SFB: echo 1 > /sys/kernel/debug/loongarch/sfb_state Disable SFB: echo 0 > /sys/kernel/debug/loongarch/sfb_state Query TSO: cat /sys/kernel/debug/loongarch/tso_state Switch TSO: echo [TSO] > /sys/kernel/debug/loongarch/tso_state Available [TSO] states: 0 (No Load No Store) 1 (All Load No Store) 3 (Same Load No Store) 4 (No Load All Store) 5 (All Load All Store) 7 (Same Load All Store) Signed-off-by: Huacai Chen arch/loongarch/include/asm/loongarch.h | 15 +++ arch/loongarch/kernel/Makefile | 2 +- arch/loongarch/kernel/kdebugfs.c | 168 +++++++++++++++++++++++++++++++++ arch/loongarch/kernel/unaligned.c | 8 +- 4 files changed, 186 insertions(+), 7 deletions(-) commit 26c0a2d93af55d30a46d5f45d3e9c42cde730168 Author: Huacai Chen Date: Sun Jan 26 21:49:59 2025 +0800 LoongArch: Fix warnings during S3 suspend The enable_gpe_wakeup() function calls acpi_enable_all_wakeup_gpes(), and the later one may call the preempt_schedule_common() function, resulting in a thread switch and causing the CPU to be in an interrupt enabled state after the enable_gpe_wakeup() function returns, leading to the warnings as follow. [ C0] WARNING: ... at kernel/time/timekeeping.c:845 ktime_get+0xbc/0xc8 [ C0] ... [ C0] Call Trace: [ C0] [<90000000002243b4>] show_stack+0x64/0x188 [ C0] [<900000000164673c>] dump_stack_lvl+0x60/0x88 [ C0] [<90000000002687e4>] __warn+0x8c/0x148 [ C0] [<90000000015e9978>] report_bug+0x1c0/0x2b0 [ C0] [<90000000016478e4>] do_bp+0x204/0x3b8 [ C0] [<90000000025b1924>] exception_handlers+0x1924/0x10000 [ C0] [<9000000000343bbc>] ktime_get+0xbc/0xc8 [ C0] [<9000000000354c08>] tick_sched_timer+0x30/0xb0 [ C0] [<90000000003408e0>] __hrtimer_run_queues+0x160/0x378 [ C0] [<9000000000341f14>] hrtimer_interrupt+0x144/0x388 [ C0] [<9000000000228348>] constant_timer_interrupt+0x38/0x48 [ C0] [<90000000002feba4>] __handle_irq_event_percpu+0x64/0x1e8 [ C0] [<90000000002fed48>] handle_irq_event_percpu+0x20/0x80 [ C0] [<9000000000306b9c>] handle_percpu_irq+0x5c/0x98 [ C0] [<90000000002fd4a0>] generic_handle_domain_irq+0x30/0x48 [ C0] [<9000000000d0c7b0>] handle_cpu_irq+0x70/0xa8 [ C0] [<9000000001646b30>] handle_loongarch_irq+0x30/0x48 [ C0] [<9000000001646bc8>] do_vint+0x80/0xe0 [ C0] [<90000000002aea1c>] finish_task_switch.isra.0+0x8c/0x2a8 [ C0] [<900000000164e34c>] __schedule+0x314/0xa48 [ C0] [<900000000164ead8>] schedule+0x58/0xf0 [ C0] [<9000000000294a2c>] worker_thread+0x224/0x498 [ C0] [<900000000029d2f0>] kthread+0xf8/0x108 [ C0] [<9000000000221f28>] ret_from_kernel_thread+0xc/0xa4 [ C0] [ C0] ---[ end trace 0000000000000000 ]--- The root cause is acpi_enable_all_wakeup_gpes() uses a mutex to protect acpi_hw_enable_all_wakeup_gpes(), and acpi_ut_acquire_mutex() may cause a thread switch. Since there is no longer concurrent execution during loongarch_acpi_suspend(), we can call acpi_hw_enable_all_wakeup_gpes() directly in enable_gpe_wakeup(). The solution is similar to commit 22db06337f590d01 ("ACPI: sleep: Avoid breaking S3 wakeup due to might_sleep()"). Fixes: 366bb35a8e48 ("LoongArch: Add suspend (ACPI S3) support") Signed-off-by: Qunqin Zhao Signed-off-by: Huacai Chen arch/loongarch/power/platform.c | 2 +- drivers/acpi/acpica/achware.h | 2 -- include/acpi/acpixf.h | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) commit f3b93547b91ad849b58eb5ab2dd070950ad7beb3 Author: Thorsten Leemhuis Date: Wed Oct 16 16:18:41 2024 +0200 module: sign with sha512 instead of sha1 by default Switch away from using sha1 for module signing by default and use the more modern sha512 instead, which is what among others Arch, Fedora, RHEL, and Ubuntu are currently using for their kernels. Sha1 has not been considered secure against well-funded opponents since 2005[1]; since 2011 the NIST and other organizations furthermore recommended its replacement[2]. This is why OpenSSL on RHEL9, Fedora Linux 41+[3], and likely some other current and future distributions reject the creation of sha1 signatures, which leads to a build error of allmodconfig configurations: 80A20474797F0000:error:03000098:digital envelope routines:do_sigver_init:invalid digest:crypto/evp/m_sigver.c:342: make[4]: *** [.../certs/Makefile:53: certs/signing_key.pem] Error 1 make[4]: *** Deleting file 'certs/signing_key.pem' make[4]: *** Waiting for unfinished jobs.... make[3]: *** [.../scripts/Makefile.build:478: certs] Error 2 make[2]: *** [.../Makefile:1936: .] Error 2 make[1]: *** [.../Makefile:224: __sub-make] Error 2 make[1]: Leaving directory '...' make: *** [Makefile:224: __sub-make] Error 2 This change makes allmodconfig work again and sets a default that is more appropriate for current and future users, too. Link: https://www.schneier.com/blog/archives/2005/02/cryptanalysis_o.html [1] Link: https://csrc.nist.gov/projects/hash-functions [2] Link: https://fedoraproject.org/wiki/Changes/OpenSSLDistrustsha1SigVer [3] Signed-off-by: Thorsten Leemhuis Reviewed-by: Sami Tolvanen Tested-by: kdevops [0] Link: https://github.com/linux-kdevops/linux-modules-kpd/actions/runs/11420092929/job/31775404330 [0] Link: https://lore.kernel.org/r/52ee32c0c92afc4d3263cea1f8a1cdc809728aff.1729088288.git.linux@leemhuis.info Signed-off-by: Petr Pavlu kernel/module/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 110b1e070f1d50f5217bd2c758db094998bb7b77 Author: Christophe Leroy Date: Thu Dec 5 20:46:16 2024 +0100 module: Don't fail module loading when setting ro_after_init section RO failed Once module init has succeded it is too late to cancel loading. If setting ro_after_init data section to read-only fails, all we can do is to inform the user through a warning. Reported-by: Thomas Gleixner Closes: https://lore.kernel.org/all/20230915082126.4187913-1-ruanjinjie@huawei.com/ Fixes: d1909c022173 ("module: Don't ignore errors from set_memory_XX()") Signed-off-by: Christophe Leroy Reviewed-by: Luis Chamberlain Link: https://lore.kernel.org/r/d6c81f38da76092de8aacc8c93c4c65cb0fe48b8.1733427536.git.christophe.leroy@csgroup.eu Signed-off-by: Petr Pavlu kernel/module/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 097fd001e1c42b5fd0a6d77cbd855ce373d7e7a2 Author: Christophe Leroy Date: Thu Dec 5 20:46:15 2024 +0100 module: Split module_enable_rodata_ro() module_enable_rodata_ro() is called twice, once before module init to set rodata sections readonly and once after module init to set rodata_after_init section readonly. The second time, only the rodata_after_init section needs to be set to read-only, no need to re-apply it to already set rodata. Split module_enable_rodata_ro() in two. Signed-off-by: Christophe Leroy Tested-by: Daniel Gomez Reviewed-by: Luis Chamberlain Link: https://lore.kernel.org/r/e3b6ff0df7eac281c58bb02cecaeb377215daff3.1733427536.git.christophe.leroy@csgroup.eu Signed-off-by: Petr Pavlu kernel/module/internal.h | 3 ++- kernel/module/main.c | 4 ++-- kernel/module/strict_rwx.c | 13 +++++++++---- 3 files changed, 13 insertions(+), 7 deletions(-) commit b83815afaeecf4448cdd54b3f9dc2623ebbc3576 Author: Thomas Weißschuh Date: Fri Dec 27 14:23:25 2024 +0100 module: sysfs: Use const 'struct bin_attribute' The sysfs core is switching to 'const struct bin_attribute's. Prepare for that. Signed-off-by: Thomas Weißschuh Reviewed-by: Petr Pavlu Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20241227-sysfs-const-bin_attr-module-v2-6-e267275f0f37@weissschuh.net Signed-off-by: Petr Pavlu kernel/module/sysfs.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 4723f16de64e1580ec5dc15173f8da0b316b2257 Author: Thomas Weißschuh Date: Fri Dec 27 14:23:24 2024 +0100 module: sysfs: Add notes attributes through attribute_group A kobject is meant to manage the lifecycle of some resource. However the module sysfs code only creates a kobject to get a "notes" subdirectory in sysfs. This can be achieved easier and cheaper by using a sysfs group. Switch the notes attribute code to such a group, similar to how the section allocation in the same file already works. Signed-off-by: Thomas Weißschuh Reviewed-by: Petr Pavlu Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20241227-sysfs-const-bin_attr-module-v2-5-e267275f0f37@weissschuh.net Signed-off-by: Petr Pavlu kernel/module/sysfs.c | 54 ++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) commit f47c0bebed44673c54a6a1870f04a2261db28ca0 Author: Thomas Weißschuh Date: Fri Dec 27 14:23:23 2024 +0100 module: sysfs: Simplify section attribute allocation The existing allocation logic manually stuffs two allocations into one. This is hard to understand and of limited value, given that all the section names are allocated on their own anyways. Une one allocation per datastructure. Signed-off-by: Thomas Weißschuh Reviewed-by: Petr Pavlu Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20241227-sysfs-const-bin_attr-module-v2-4-e267275f0f37@weissschuh.net Signed-off-by: Petr Pavlu kernel/module/sysfs.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 34f5ec0f8252e2ba83fa5da05d56b6fdb0ebef59 Author: Thomas Weißschuh Date: Fri Dec 27 14:23:22 2024 +0100 module: sysfs: Drop 'struct module_sect_attr' This is now an otherwise empty wrapper around a 'struct bin_attribute', not providing any functionality. Remove it. Signed-off-by: Thomas Weißschuh Reviewed-by: Petr Pavlu Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20241227-sysfs-const-bin_attr-module-v2-3-e267275f0f37@weissschuh.net Signed-off-by: Petr Pavlu kernel/module/sysfs.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 4b2c11e4aaf7e3d7fd9ce8e5995a32ff5e27d74f Author: Thomas Weißschuh Date: Fri Dec 27 14:23:21 2024 +0100 module: sysfs: Drop member 'module_sect_attr::address' 'struct bin_attribute' already contains the member 'private' to pass custom data to the attribute handlers. Use that instead of the custom 'address' member. Signed-off-by: Thomas Weißschuh Reviewed-by: Petr Pavlu Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20241227-sysfs-const-bin_attr-module-v2-2-e267275f0f37@weissschuh.net Signed-off-by: Petr Pavlu kernel/module/sysfs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit d8959b947a8dfab1047c6fd5e982808f65717bfe Author: Thomas Weißschuh Date: Fri Dec 27 14:23:20 2024 +0100 module: sysfs: Drop member 'module_sect_attrs::nsections' The member is only used to iterate over all attributes in free_sect_attrs(). However the attribute group can already be used for that. Use the group and drop 'nsections'. Signed-off-by: Thomas Weißschuh Reviewed-by: Petr Pavlu Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20241227-sysfs-const-bin_attr-module-v2-1-e267275f0f37@weissschuh.net Signed-off-by: Petr Pavlu kernel/module/sysfs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit f3227ffda07470848abe3cfa2039b21816ce3090 Author: Thomas Weißschuh Date: Mon Dec 16 18:25:10 2024 +0100 module: Constify 'struct module_attribute' These structs are never modified, move them to read-only memory. This makes the API clearer and also prepares for the constification of 'struct attribute' itself. While at it, also constify 'modinfo_attrs_count'. Signed-off-by: Thomas Weißschuh Reviewed-by: Petr Pavlu Link: https://lore.kernel.org/r/20241216-sysfs-const-attr-module-v1-3-3790b53e0abf@weissschuh.net Signed-off-by: Petr Pavlu include/linux/module.h | 8 ++++---- kernel/module/internal.h | 4 ++-- kernel/module/main.c | 40 ++++++++++++++++++++-------------------- kernel/module/sysfs.c | 4 ++-- kernel/params.c | 12 ++++++------ 5 files changed, 34 insertions(+), 34 deletions(-) commit 38e3fe6595e1fa806c0450b2db666bc46325025e Author: Thomas Weißschuh Date: Mon Dec 16 18:25:09 2024 +0100 module: Handle 'struct module_version_attribute' as const The structure is always read-only due to its placement in the read-only section __modver. Reflect this at its usage sites. Also prepare for the const handling of 'struct module_attribute' itself. Signed-off-by: Thomas Weißschuh Reviewed-by: Petr Pavlu Link: https://lore.kernel.org/r/20241216-sysfs-const-attr-module-v1-2-3790b53e0abf@weissschuh.net Signed-off-by: Petr Pavlu include/linux/module.h | 2 +- kernel/params.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 30d446088866db99b0cf9e6af58ac1427f51f3dd Author: Thomas Weißschuh Date: Mon Dec 16 18:25:08 2024 +0100 params: Prepare for 'const struct module_attribute *' The 'struct module_attribute' sysfs callbacks are about to change to receive a 'const struct module_attribute *' parameter. Prepare for that by avoid casting away the constness through container_of() and using const pointers to 'struct param_attribute'. Signed-off-by: Thomas Weißschuh Reviewed-by: Petr Pavlu Link: https://lore.kernel.org/r/20241216-sysfs-const-attr-module-v1-1-3790b53e0abf@weissschuh.net Signed-off-by: Petr Pavlu kernel/params.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c8e0bd579ed35355ea7e3e3190556c9738870ac9 Author: Uwe Kleine-König Date: Fri Nov 15 19:50:30 2024 +0100 module: Put known GPL offenders in an array Instead of repeating the add_taint_module() call for each offender, create an array and loop over that one. This simplifies adding new entries considerably. Signed-off-by: Uwe Kleine-König Reviewed-by: Greg Kroah-Hartman Reviewed-by: Christoph Hellwig Signed-off-by: Werner Sembach Link: https://lore.kernel.org/r/20241115185253.1299264-2-wse@tuxedocomputers.com [ppavlu: make the array const] Signed-off-by: Petr Pavlu kernel/module/main.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit a145c848d69f9c6f32008d8319edaa133360dd74 Author: Sebastian Andrzej Siewior Date: Wed Jan 8 10:04:30 2025 +0100 module: Extend the preempt disabled section in dereference_symbol_descriptor(). dereference_symbol_descriptor() needs to obtain the module pointer belonging to pointer in order to resolve that pointer. The returned mod pointer is obtained under RCU-sched/ preempt_disable() guarantees and needs to be used within this section to ensure that the module is not removed in the meantime. Extend the preempt_disable() section to also cover dereference_module_function_descriptor(). Fixes: 04b8eb7a4ccd9 ("symbol lookup: introduce dereference_symbol_descriptor()") Cc: James E.J. Bottomley Cc: Christophe Leroy Cc: Helge Deller Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Sergey Senozhatsky Cc: linux-parisc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Sergey Senozhatsky Acked-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/20250108090457.512198-2-bigeasy@linutronix.de Signed-off-by: Petr Pavlu include/linux/kallsyms.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6250ebe666e425e173df5e11e8a612d57921f48d Author: Guenter Roeck Date: Sat Jan 25 11:15:25 2025 -0800 i2c: Fix core-managed per-client debugfs handling The debugfs directory should be created when a device is probed, not when it is registered. It should be removed when the device is removed, not when it is unregistered. Fixes: d06905d68610 ("i2c: add core-managed per-client directory in debugfs") Signed-off-by: Guenter Roeck drivers/i2c/i2c-core-base.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 5851a88dac1501353659690343b936d6fcb5d509 Author: Arnd Bergmann Date: Wed Jan 22 07:48:36 2025 +0100 i2c: imx-lpi2c: select CONFIG_I2C_SLAVE The addition of target mode causes a build failure when CONFIG_I2C_SLAVE is turned off: drivers/i2c/busses/i2c-imx-lpi2c.c:1273:10: error: 'const struct i2c_algorithm' has no member named 'reg_target' 1273 | .reg_target = lpi2c_imx_register_target, | ^~~~~~~~~~ drivers/i2c/busses/i2c-imx-lpi2c.c:1274:10: error: 'const struct i2c_algorithm' has no member named 'unreg_target' 1274 | .unreg_target = lpi2c_imx_unregister_target, | ^~~~~~~~~~~~ Select the Kconfig symbol like we do for other similar drivers. Fixes: 1ee867e465c1 ("i2c: imx-lpi2c: add target mode support") Signed-off-by: Arnd Bergmann Acked-by: Carlos Song Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 691a1f3f180133965d01e0ab0f332248d0345554 Author: Tetsuo Handa Date: Sun Jan 26 19:13:58 2025 +0900 tomoyo: fix spelling errors No functional changes. Signed-off-by: Tetsuo Handa security/tomoyo/securityfs_if.c | 6 +++--- security/tomoyo/tomoyo.c | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) commit 41f198d58b6f2b36f9f8a4481d517369b324e773 Author: Tanya Agarwal Date: Fri Jan 24 01:18:00 2025 +0530 tomoyo: fix spelling error Fix spelling error in security/tomoyo module comments that were identified using the codespell tool. No functional changes - documentation only. Signed-off-by: Tanya Agarwal Reviewed-by: Mimi Zohar Signed-off-by: Tetsuo Handa security/tomoyo/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d85fc52cbb9a719c8335d93a28d6a79d7acd419f Author: Lianqin Hu Date: Sun Jan 26 03:51:11 2025 +0000 ALSA: usb-audio: Add delay quirk for iBasso DC07 Pro Audio control requests that sets sampling frequency sometimes fail on this card. Adding delay between control messages eliminates that problem. usb 1-1: New USB device found, idVendor=2fc6, idProduct=f0b7 usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1: Product: iBasso DC07 Pro usb 1-1: Manufacturer: iBasso usb 1-1: SerialNumber: CTUA171130B Signed-off-by: Lianqin Hu Cc: Link: https://patch.msgid.link/TYUPR06MB62174A48D04E09A37996DF84D2ED2@TYUPR06MB6217.apcprd06.prod.outlook.com Signed-off-by: Takashi Iwai sound/usb/quirks.c | 2 ++ 1 file changed, 2 insertions(+) commit d1366e74342e75555af2648a2964deb2d5c92200 Author: Liu Shixin Date: Thu Jan 23 10:10:29 2025 +0800 mm/compaction: fix UBSAN shift-out-of-bounds warning syzkaller reported a UBSAN shift-out-of-bounds warning of (1UL << order) in isolate_freepages_block(). The bogus compound_order can be any value because it is union with flags. Add back the MAX_PAGE_ORDER check to fix the warning. Link: https://lkml.kernel.org/r/20250123021029.2826736-1-liushixin2@huawei.com Fixes: 3da0272a4c7d ("mm/compaction: correctly return failure with bogus compound_order in strict mode") Signed-off-by: Liu Shixin Reviewed-by: Kemeng Shi Acked-by: David Hildenbrand Reviewed-by: Oscar Salvador Cc: Baolin Wang Cc: David Hildenbrand Cc: Kemeng Shi Cc: Matthew Wilcox Cc: Mel Gorman Cc: Nanyong Sun Cc: Signed-off-by: Andrew Morton mm/compaction.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 502269ab98b5b31428be23aa3871d297d916a90b Author: Alexander Gordeev Date: Thu Jan 23 17:03:49 2025 +0100 s390/mm: add missing ctor/dtor on page table upgrade Commit 78966b550289 ("s390: pgtable: add statistics for PUD and P4D level page table") misses the call to pagetable_p4d_ctor() against a newly allocated P4D table in crst_table_upgrade(); Commit 68c601de75d8 ("mm: introduce ctor/dtor at PGD level") misses the call to pagetable_pgd_ctor() against a newly allocated PGD and the call to pagetable_dtor() against a newly allocated P4D that is about to be freed on crst_table_upgrade() PGD upgrade fail path. The missed constructors and destructor break (at least) the page table accounting when a process memory space is upgraded. Link: https://lkml.kernel.org/r/20250123160349.200154-1-agordeev@linux.ibm.com Fixes: 78966b550289 ("s390: pgtable: add statistics for PUD and P4D level page table") Fixes: 68c601de75d8 ("mm: introduce ctor/dtor at PGD level") Signed-off-by: Alexander Gordeev Reported-by: Heiko Carstens Closes: https://lore.kernel.org/all/20250122074954.8685-A-hca@linux.ibm.com/ Suggested-by: Heiko Carstens Reviewed-by: Gerald Schaefer Acked-by: Qi Zheng Reviewed-by: Kevin Brodsky Cc: Heiko Carstens Signed-off-by: Andrew Morton arch/s390/mm/pgalloc.c | 3 +++ 1 file changed, 3 insertions(+) commit 0e81f6e441e4b461fbe18559651445b18240ab4e Author: Thorsten Blum Date: Thu Jan 16 07:24:04 2025 +0100 kasan: sw_tags: use str_on_off() helper in kasan_init_sw_tags() Remove hard-coded strings by using the str_on_off() helper function. Link: https://lkml.kernel.org/r/20250116062403.2496-2-thorsten.blum@linux.dev Signed-off-by: Thorsten Blum Suggested-by: Anshuman Khandual Reviewed-by: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitriy Vyukov Cc: Vincenzo Frascino Signed-off-by: Andrew Morton mm/kasan/sw_tags.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cf929a2863bff58608ab30a88b8c7a5fc93ff437 Author: Suren Baghdasaryan Date: Thu Jan 16 10:15:38 2025 -0800 tools: add VM_WARN_ON_VMG definition vma tests compilation yields the following error: vma.c:732:9: error: implicit declaration of function ‘VM_WARN_ON_VMG’ Fix it by adding missing VM_WARN_ON_VMG() definition. Link: https://lkml.kernel.org/r/20250116181538.759469-1-surenb@google.com Fixes: e3a7ae85f87c ("mm/debug: prefer VM_WARN_ON_VMG() to report VMG debug warnings") Signed-off-by: Suren Baghdasaryan Reviewed-by: Lorenzo Stoakes Cc: Liam R. Howlett Signed-off-by: Andrew Morton tools/testing/vma/vma_internal.h | 1 + 1 file changed, 1 insertion(+) commit 56dff92932591638b249911fd4529a1e47480a04 Author: Thorsten Blum Date: Thu Jan 16 21:42:16 2025 +0100 mm/damon/core: use str_high_low() helper in damos_wmark_wait_us() Remove hard-coded strings by using the str_high_low() helper function. Link: https://lkml.kernel.org/r/20250116204216.106999-2-thorsten.blum@linux.dev Signed-off-by: Thorsten Blum Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3c7fd94205f86ad89f1d1d01dbfbc4b139860d8f Author: Suren Baghdasaryan Date: Thu Jan 16 10:27:30 2025 -0800 seqlock: add missing parameter documentation for raw_seqcount_try_begin() Add missing documentation for raw_seqcount_try_begin() start parameter. Link: https://lkml.kernel.org/r/20250116182730.801497-1-surenb@google.com Fixes: dba4761a3e40 ("seqlock: add raw_seqcount_try_begin") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/all/20250116170522.23e884d5@canb.auug.org.au/ Signed-off-by: Suren Baghdasaryan Acked-by: Waiman Long Cc: Boqun Feng Cc: David Hildenbrand Cc: Ingo Molnar Cc: Liam Howlett Cc: Peter Zijlstra (Intel) Cc: Will Deacon Signed-off-by: Andrew Morton include/linux/seqlock.h | 1 + 1 file changed, 1 insertion(+) commit 6aeb991c54b281710591ce388158bc1739afc227 Author: Jim Zhao Date: Thu Nov 21 18:05:39 2024 +0800 mm/page-writeback: consolidate wb_thresh bumping logic into __wb_calc_thresh Address the feedback from 39ac99852fca ("mm/page-writeback: raise wb_thresh to prevent write blocking with strictlimit)". The wb_thresh bumping logic is scattered across wb_position_ratio, __wb_calc_thresh, and wb_update_dirty_ratelimit. For consistency, consolidate all wb_thresh bumping logic into __wb_calc_thresh. Link: https://lkml.kernel.org/r/20241121100539.605818-1-jimzhao.ai@gmail.com Signed-off-by: Jim Zhao Reviewed-by: Jan Kara Cc: Matthew Wilcox Cc: Kemeng Shi Cc: Guenter Roeck Signed-off-by: Andrew Morton mm/page-writeback.c | 53 ++++++++++++++++------------------------------------- 1 file changed, 16 insertions(+), 37 deletions(-) commit 686fa9537d78d2f1bea42bf3891828510202be14 Author: Yuntao Wang Date: Wed Jan 15 12:16:34 2025 +0800 mm/page_alloc: remove the incorrect and misleading comment The comment removed in this patch originally belonged to the build_zonelists_in_zone_order() function, which was introduced by commit f0c0b2b808f2 ("change zonelist order: zonelist order selection logic"). Later, commit c9bff3eebc09 ("mm, page_alloc: rip out ZONELIST_ORDER_ZONE") removed build_zonelists_in_zone_order() but left its comment behind. Subsequently, commit 9d3be21bf9c0 ("mm, page_alloc: simplify zonelist initialization") moved the node_order variable into build_zonelists(), making the comment originally belonged to build_zonelists_in_zone_order() appear as if it were part of build_zonelists(). Remove this misleading comment. Link: https://lkml.kernel.org/r/20250115041634.63387-1-yuntao.wang@linux.dev Signed-off-by: Yuntao Wang Cc: Michal Hocko Signed-off-by: Andrew Morton mm/page_alloc.c | 7 ------- 1 file changed, 7 deletions(-) commit 81f804c3df8661c12ae5eaa1ae605694017c7349 Author: Sergey Senozhatsky Date: Wed Jan 15 16:19:16 2025 +0900 zram: remove zcomp_stream_put() from write_incompressible_page() We cannot and should not put per-CPU compression stream in write_incompressible_page() because that function never gets any per-CPU streams in the first place. It's zram_write_page() that puts the stream before it calls write_incompressible_page(). Link: https://lkml.kernel.org/r/20250115072003.380567-1-senozhatsky@chromium.org Fixes: 485d11509d6d ("zram: factor out ZRAM_HUGE write") Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 1 - 1 file changed, 1 deletion(-) commit f752e677f85993c812fe9de7b4427f3f18408a11 Author: Byungchul Park Date: Thu Aug 8 15:53:58 2024 +0900 mm: separate move/undo parts from migrate_pages_batch() Functionally, no change. This is a preparation for luf mechanism that requires to use separated folio lists for its own handling during migration. Refactored migrate_pages_batch() so as to separate move/undo parts from migrate_pages_batch(). Link: https://lkml.kernel.org/r/20250115103403.11882-1-byungchul@sk.com Signed-off-by: Byungchul Park Reviewed-by: Shivank Garg Reviewed-by: Zi Yan Signed-off-by: Andrew Morton mm/migrate.c | 134 ++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 83 insertions(+), 51 deletions(-) commit ff9b7e0b17e67f8cf624c4fb7a536decfa6e2994 Author: Thorsten Blum Date: Wed Jan 15 16:55:12 2025 +0100 mm/kfence: use str_write_read() helper in get_access_type() Remove hard-coded strings by using the str_write_read() helper function. Link: https://lkml.kernel.org/r/20250115155511.954535-2-thorsten.blum@linux.dev Signed-off-by: Thorsten Blum Suggested-by: Anshuman Khandual Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Anshuman Khandual Cc: Dmitriy Vyukov Cc: Thorsten Blum Signed-off-by: Andrew Morton mm/kfence/kfence_test.c | 3 ++- mm/kfence/report.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 7882d8fc8fe0c2b2a01f09e56edf82df6b3013fd Author: liuye Date: Tue Jan 14 10:38:38 2025 +0800 selftests/mm/mkdirty: fix memory leak in test_uffdio_copy() Release memory before exception branch returns to prevent memory leaks Checking tools/testing/selftests/mm/mkdirty.c ... tools/testing/selftests/mm/mkdirty.c:283:3: error: Memory leak: src [memleak] return; ^ Link: https://lkml.kernel.org/r/20250114023838.48589-1-liuye@kylinos.cn Signed-off-by: liuye Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton tools/testing/selftests/mm/mkdirty.c | 1 + 1 file changed, 1 insertion(+) commit 92da98845a93dc408eaf999885f62f276c91754a Author: Thorsten Blum Date: Tue Jan 14 16:09:35 2025 +0100 kasan: hw_tags: Use str_on_off() helper in kasan_init_hw_tags() Remove hard-coded strings by using the str_on_off() helper function. Link: https://lkml.kernel.org/r/20250114150935.780869-2-thorsten.blum@linux.dev Signed-off-by: Thorsten Blum Suggested-by: Anshuman Khandual Reviewed-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitriy Vyukov Cc: Vincenzo Frascino Signed-off-by: Andrew Morton mm/kasan/hw_tags.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3bd6137220bb5cf4114d038cf90cb20375b31124 Author: Thomas Weißschuh Date: Tue Jan 14 17:06:48 2025 +0100 selftests/mm: virtual_address_range: avoid reading from VM_IO mappings The virtual_address_range selftest reads from the start of each mapping listed in /proc/self/maps. However not all mappings are valid to be arbitrarily accessed. For example the vvar data used for virtual clocks on x86 [vvar_vclock] can only be accessed if 1) the kernel configuration enables virtual clocks and 2) the hypervisor provided the data for it. Only the VDSO itself has the necessary information to know this. Since commit e93d2521b27f ("x86/vdso: Split virtual clock pages into dedicated mapping") the virtual clock data was split out into its own mapping, leading to EFAULT from read() during the validation. Check for the VM_IO flag as a proxy. It is present for the VVAR mappings and MMIO ranges can be dangerous to access arbitrarily. Link: https://lkml.kernel.org/r/20250114-virtual_address_range-tests-v4-4-6fd7269934a5@linutronix.de Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202412271148.2656e485-lkp@intel.com Fixes: e93d2521b27f ("x86/vdso: Split virtual clock pages into dedicated mapping") Fixes: 010409649885 ("selftests/mm: confirm VA exhaustion without reliance on correctness of mmap()") Signed-off-by: Thomas Weißschuh Suggested-by: David Hildenbrand Link: https://lore.kernel.org/lkml/e97c2a5d-c815-4936-a767-ac42a3220a90@redhat.com/ Acked-by: David Hildenbrand Cc: Anshuman Khandual Cc: Dev Jain Cc: Shuah Khan (Samsung OSG) Cc: Thomas Gleixner Signed-off-by: Andrew Morton tools/testing/selftests/mm/virtual_address_range.c | 4 ++++ tools/testing/selftests/mm/vm_util.c | 24 ++++++++++++++++++++++ tools/testing/selftests/mm/vm_util.h | 1 + 3 files changed, 29 insertions(+) commit 3c479b5dc60b297a9e327ac2734475c1d68b4443 Author: Thomas Weißschuh Date: Tue Jan 14 17:06:47 2025 +0100 selftests/mm: vm_util: split up /proc/self/smaps parsing Upcoming changes want to reuse the /proc/self/smaps parsing logic to parse the VmFlags field. As that works differently from the currently parsed HugePage counters, split up the logic so common functionality can be shared. While reworking this code, also use the correct sscanf placeholder for the "uint64_t thp" variable. Link: https://lkml.kernel.org/r/20250114-virtual_address_range-tests-v4-3-6fd7269934a5@linutronix.de Signed-off-by: Thomas Weißschuh Acked-by: David Hildenbrand Cc: Anshuman Khandual Cc: Dev Jain Cc: kernel test robot Cc: Shuah Khan (Samsung OSG) Cc: Thomas Gleixner Signed-off-by: Andrew Morton tools/testing/selftests/mm/vm_util.c | 42 +++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 13 deletions(-) commit b2a79f62133aa687d8d966dd524192d9706bf3de Author: Thomas Weißschuh Date: Tue Jan 14 17:06:46 2025 +0100 selftests/mm: virtual_address_range: unmap chunks after validation For each accessed chunk a PTE is created. More than 1GiB of PTEs is used in this way. Remove each PTE after validating a chunk to reduce peak memory usage. It is important to only unmap memory that previously mmap()ed, as unmapping other mappings like the stack, heap or executable mappings will crash the process. The mappings read from /proc/self/maps and the return values from mmap() don't allow a simple correlation due to merging and no guaranteed order. To correlate the pointers and mappings use prctl(PR_SET_VMA_ANON_NAME). While it introduces a test dependency, other alternatives would introduce runtime or development overhead. Link: https://lkml.kernel.org/r/20250114-virtual_address_range-tests-v4-2-6fd7269934a5@linutronix.de Fixes: 010409649885 ("selftests/mm: confirm VA exhaustion without reliance on correctness of mmap()") Signed-off-by: Thomas Weißschuh Acked-by: David Hildenbrand Cc: Anshuman Khandual Cc: Dev Jain Cc: kernel test robot Cc: Shuah Khan (Samsung OSG) Cc: Thomas Gleixner Signed-off-by: Andrew Morton tools/testing/selftests/mm/config | 1 + tools/testing/selftests/mm/virtual_address_range.c | 33 ++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) commit a005145b9c969651a8997725e1df35c81040f76b Author: Thomas Weißschuh Date: Tue Jan 14 17:06:45 2025 +0100 selftests/mm: virtual_address_range: mmap() without PROT_WRITE Patch series "selftests/mm: virtual_address_range: Reduce memory", v4. The selftest started failing since commit e93d2521b27f ("x86/vdso: Split virtual clock pages into dedicated mapping") was merged. While debugging I stumbled upon some memory usage optimizations. With these test now runs on a VM with only 60MiB of memory. This patch (of 4): When mapping a larger chunk than physical memory is available with PROT_WRITE and overcommit is disabled, the mapping will fail. This will prevent the test from running on systems with less then ~1GiB of memory and triggering an inscrutinable test failure. As the mappings are never written to anyways, the flag can be removed. Link: https://lkml.kernel.org/r/20250114-virtual_address_range-tests-v4-0-6fd7269934a5@linutronix.de Link: https://lkml.kernel.org/r/20250114-virtual_address_range-tests-v4-1-6fd7269934a5@linutronix.de Fixes: 4e5ce33ceb32 ("selftests/vm: add a test for virtual address range mapping") Signed-off-by: Thomas Weißschuh Acked-by: David Hildenbrand Acked-by: Dev Jain Cc: Thomas Gleixner Cc: Anshuman Khandual Cc: Shuah Khan (Samsung OSG) Cc: kernel test robot Signed-off-by: Andrew Morton tools/testing/selftests/mm/virtual_address_range.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 73519ded992fc9dda2807450d6931002bb93cb16 Author: liuye Date: Tue Jan 14 11:21:15 2025 +0800 selftests/memfd/memfd_test: fix possible NULL pointer dereference If `name' is NULL, a NULL pointer may be accessed in printf. Link: https://lkml.kernel.org/r/20250114032115.58638-1-liuye@kylinos.cn Signed-off-by: liuye Reviewed-by: Lorenzo Stoakes Cc: Greg Thelen Cc: "Isaac J. Manjarres" Cc: Jeff Xu Cc: Saurav Shah Cc: Shuah Khan (Samsung OSG) Signed-off-by: Andrew Morton tools/testing/selftests/memfd/memfd_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d94d23fdd7529f1f3218235d1e0a69e9856907b7 Author: Jens Axboe Date: Fri Dec 20 08:47:50 2024 -0700 mm: add FGP_DONTCACHE folio creation flag Callers can pass this in for uncached folio creation, in which case if a folio is newly created it gets marked as uncached. If a folio exists for this index and lookup succeeds, then it will not get marked as uncached. If an !uncached lookup finds a cached folio, clear the flag. For that case, there are competeting uncached and cached users of the folio, and it should not get pruned. Link: https://lkml.kernel.org/r/20241220154831.1086649-13-axboe@kernel.dk Signed-off-by: Jens Axboe Cc: Brian Foster Cc: Chris Mason Cc: Christoph Hellwig Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton include/linux/pagemap.h | 2 ++ mm/filemap.c | 5 +++++ 2 files changed, 7 insertions(+) commit 1d4457576570627e1702614bc060b55d95b85e39 Author: Jens Axboe Date: Fri Dec 20 08:47:49 2024 -0700 mm: call filemap_fdatawrite_range_kick() after IOCB_DONTCACHE issue When a buffered write submitted with IOCB_DONTCACHE has been successfully submitted, call filemap_fdatawrite_range_kick() to kick off the IO. File systems call generic_write_sync() for any successful buffered write submission, hence add the logic here rather than needing to modify the file system. Link: https://lkml.kernel.org/r/20241220154831.1086649-12-axboe@kernel.dk Signed-off-by: Jens Axboe Cc: Brian Foster Cc: Chris Mason Cc: Christoph Hellwig Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+) commit dddc559f2e7cff9c6525150cd29ef3a4f6692b26 Author: Jens Axboe Date: Fri Dec 20 08:47:48 2024 -0700 mm/filemap: add filemap_fdatawrite_range_kick() helper Works like filemap_fdatawrite_range(), except it's a non-integrity data writeback and hence only starts writeback on the specified range. Will help facilitate generically starting uncached writeback from generic_write_sync(), as header dependencies preclude doing this inline from fs.h. Link: https://lkml.kernel.org/r/20241220154831.1086649-11-axboe@kernel.dk Signed-off-by: Jens Axboe Cc: Brian Foster Cc: Chris Mason Cc: Christoph Hellwig Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton include/linux/fs.h | 2 ++ mm/filemap.c | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) commit fb7d3bc4149395c1ae99029c852eab6c28fc3c88 Author: Jens Axboe Date: Fri Dec 20 08:47:47 2024 -0700 mm/filemap: drop streaming/uncached pages when writeback completes If the folio is marked as streaming, drop pages when writeback completes. Intended to be used with RWF_DONTCACHE, to avoid needing sync writes for uncached IO. Link: https://lkml.kernel.org/r/20241220154831.1086649-10-axboe@kernel.dk Signed-off-by: Jens Axboe Cc: Brian Foster Cc: Chris Mason Cc: Christoph Hellwig Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/filemap.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 8026e49bff9b151609da4cae20e9da7f1833dde6 Author: Jens Axboe Date: Fri Dec 20 08:47:46 2024 -0700 mm/filemap: add read support for RWF_DONTCACHE Add RWF_DONTCACHE as a read operation flag, which means that any data read wil be removed from the page cache upon completion. Uses the page cache to synchronize, and simply prunes folios that were instantiated when the operation completes. While it would be possible to use private pages for this, using the page cache as synchronization is handy for a variety of reasons: 1) No special truncate magic is needed 2) Async buffered reads need some place to serialize, using the page cache is a lot easier than writing extra code for this 3) The pruning cost is pretty reasonable and the code to support this is much simpler as a result. You can think of uncached buffered IO as being the much more attractive cousin of O_DIRECT - it has none of the restrictions of O_DIRECT. Yes, it will copy the data, but unlike regular buffered IO, it doesn't run into the unpredictability of the page cache in terms of reclaim. As an example, on a test box with 32 drives, reading them with buffered IO looks as follows: Reading bs 65536, uncached 0 1s: 145945MB/sec 2s: 158067MB/sec 3s: 157007MB/sec 4s: 148622MB/sec 5s: 118824MB/sec 6s: 70494MB/sec 7s: 41754MB/sec 8s: 90811MB/sec 9s: 92204MB/sec 10s: 95178MB/sec 11s: 95488MB/sec 12s: 95552MB/sec 13s: 96275MB/sec where it's quite easy to see where the page cache filled up, and performance went from good to erratic, and finally settles at a much lower rate. Looking at top while this is ongoing, we see: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 7535 root 20 0 267004 0 0 S 3199 0.0 8:40.65 uncached 3326 root 20 0 0 0 0 R 100.0 0.0 0:16.40 kswapd4 3327 root 20 0 0 0 0 R 100.0 0.0 0:17.22 kswapd5 3328 root 20 0 0 0 0 R 100.0 0.0 0:13.29 kswapd6 3332 root 20 0 0 0 0 R 100.0 0.0 0:11.11 kswapd10 3339 root 20 0 0 0 0 R 100.0 0.0 0:16.25 kswapd17 3348 root 20 0 0 0 0 R 100.0 0.0 0:16.40 kswapd26 3343 root 20 0 0 0 0 R 100.0 0.0 0:16.30 kswapd21 3344 root 20 0 0 0 0 R 100.0 0.0 0:11.92 kswapd22 3349 root 20 0 0 0 0 R 100.0 0.0 0:16.28 kswapd27 3352 root 20 0 0 0 0 R 99.7 0.0 0:11.89 kswapd30 3353 root 20 0 0 0 0 R 96.7 0.0 0:16.04 kswapd31 3329 root 20 0 0 0 0 R 96.4 0.0 0:11.41 kswapd7 3345 root 20 0 0 0 0 R 96.4 0.0 0:13.40 kswapd23 3330 root 20 0 0 0 0 S 91.1 0.0 0:08.28 kswapd8 3350 root 20 0 0 0 0 S 86.8 0.0 0:11.13 kswapd28 3325 root 20 0 0 0 0 S 76.3 0.0 0:07.43 kswapd3 3341 root 20 0 0 0 0 S 74.7 0.0 0:08.85 kswapd19 3334 root 20 0 0 0 0 S 71.7 0.0 0:10.04 kswapd12 3351 root 20 0 0 0 0 R 60.5 0.0 0:09.59 kswapd29 3323 root 20 0 0 0 0 R 57.6 0.0 0:11.50 kswapd1 [...] which is just showing a partial list of the 32 kswapd threads that are running mostly full tilt, burning ~28 full CPU cores. If the same test case is run with RWF_DONTCACHE set for the buffered read, the output looks as follows: Reading bs 65536, uncached 0 1s: 153144MB/sec 2s: 156760MB/sec 3s: 158110MB/sec 4s: 158009MB/sec 5s: 158043MB/sec 6s: 157638MB/sec 7s: 157999MB/sec 8s: 158024MB/sec 9s: 157764MB/sec 10s: 157477MB/sec 11s: 157417MB/sec 12s: 157455MB/sec 13s: 157233MB/sec 14s: 156692MB/sec which is just chugging along at ~155GB/sec of read performance. Looking at top, we see: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 7961 root 20 0 267004 0 0 S 3180 0.0 5:37.95 uncached 8024 axboe 20 0 14292 4096 0 R 1.0 0.0 0:00.13 top where just the test app is using CPU, no reclaim is taking place outside of the main thread. Not only is performance 65% better, it's also using half the CPU to do it. Link: https://lkml.kernel.org/r/20241220154831.1086649-9-axboe@kernel.dk Signed-off-by: Jens Axboe Cc: Brian Foster Cc: Chris Mason Cc: Christoph Hellwig Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/filemap.c | 28 ++++++++++++++++++++++++++-- mm/swap.c | 2 ++ 2 files changed, 28 insertions(+), 2 deletions(-) commit b9f958d4f146bd11be33a5f2bc3ced50f86d6b23 Author: Jens Axboe Date: Fri Dec 20 08:47:45 2024 -0700 fs: add RWF_DONTCACHE iocb and FOP_DONTCACHE file_operations flag If a file system supports uncached buffered IO, it may set FOP_DONTCACHE and enable support for RWF_DONTCACHE. If RWF_DONTCACHE is attempted without the file system supporting it, it'll get errored with -EOPNOTSUPP. Link: https://lkml.kernel.org/r/20241220154831.1086649-8-axboe@kernel.dk Signed-off-by: Jens Axboe Cc: Brian Foster Cc: Chris Mason Cc: Christoph Hellwig Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton include/linux/fs.h | 14 +++++++++++++- include/uapi/linux/fs.h | 6 +++++- 2 files changed, 18 insertions(+), 2 deletions(-) commit 4a9e23159fd37677efc0c2c53e3b45a5d260a90a Author: Jens Axboe Date: Fri Dec 20 08:47:44 2024 -0700 mm/truncate: add folio_unmap_invalidate() helper Add a folio_unmap_invalidate() helper, which unmaps and invalidates a given folio. The caller must already have locked the folio. Embed the old invalidate_complete_folio2() helper in there as well, as nobody else calls it. Use this new helper in invalidate_inode_pages2_range(), rather than duplicate the code there. In preparation for using this elsewhere as well, have it take a gfp_t mask rather than assume GFP_KERNEL is the right choice. This bubbles back to invalidate_complete_folio2() as well. Link: https://lkml.kernel.org/r/20241220154831.1086649-7-axboe@kernel.dk Signed-off-by: Jens Axboe Cc: Brian Foster Cc: Chris Mason Cc: Christoph Hellwig Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton mm/internal.h | 2 ++ mm/truncate.c | 53 ++++++++++++++++++++++++++++------------------------- 2 files changed, 30 insertions(+), 25 deletions(-) commit 77d075221ae777296e2b18a0a4f5fea6f75daf2c Author: Jens Axboe Date: Fri Dec 20 08:47:43 2024 -0700 mm/readahead: add readahead_control->dropbehind member If ractl->dropbehind is set to true, then folios created are marked as dropbehind as well. Link: https://lkml.kernel.org/r/20241220154831.1086649-6-axboe@kernel.dk Signed-off-by: Jens Axboe Reviewed-by: Kirill A. Shutemov Cc: Brian Foster Cc: Chris Mason Cc: Christoph Hellwig Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton include/linux/pagemap.h | 1 + mm/readahead.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) commit cceba6f7e46c48deca433030d80fc34599fb9fd8 Author: Jens Axboe Date: Fri Dec 20 08:47:42 2024 -0700 mm: add PG_dropbehind folio flag Add a folio flag that file IO can use to indicate that the cached IO being done should be dropped from the page cache upon completion. Link: https://lkml.kernel.org/r/20241220154831.1086649-5-axboe@kernel.dk Signed-off-by: Jens Axboe Reviewed-by: Kirill A. Shutemov Cc: Brian Foster Cc: Chris Mason Cc: Christoph Hellwig Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton include/linux/page-flags.h | 5 +++++ include/trace/events/mmflags.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) commit 1963de79d3a3bc12b7a17a922d508b733ca8fa9e Author: Jens Axboe Date: Fri Dec 20 08:47:41 2024 -0700 mm/readahead: add folio allocation helper Just a wrapper around filemap_alloc_folio() for now, but add it in preparation for modifying the folio based on the 'ractl' being passed in. No functional changes in this patch. Link: https://lkml.kernel.org/r/20241220154831.1086649-4-axboe@kernel.dk Signed-off-by: Jens Axboe Reviewed-by: Kirill A. Shutemov Reviewed-by: Matthew Wilcox (Oracle) Cc: Brian Foster Cc: Chris Mason Cc: Christoph Hellwig Cc: Johannes Weiner Signed-off-by: Andrew Morton mm/readahead.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit f598cdaafc370a797ae883d370a7c18c1ffc43ef Author: Jens Axboe Date: Fri Dec 20 08:47:40 2024 -0700 mm/filemap: use page_cache_sync_ra() to kick off read-ahead Rather than use the page_cache_sync_readahead() helper, define our own ractl and use page_cache_sync_ra() directly. In preparation for needing to modify ractl inside filemap_get_pages(). No functional changes in this patch. Link: https://lkml.kernel.org/r/20241220154831.1086649-3-axboe@kernel.dk Signed-off-by: Jens Axboe Reviewed-by: Kirill A. Shutemov Reviewed-by: Christoph Hellwig Reviewed-by: Matthew Wilcox (Oracle) Cc: Brian Foster Cc: Chris Mason Cc: Johannes Weiner Signed-off-by: Andrew Morton mm/filemap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9ad6344568cc31ede9741795b3e3c41c21e3156f Author: Jens Axboe Date: Fri Dec 20 08:47:39 2024 -0700 mm/filemap: change filemap_create_folio() to take a struct kiocb Patch series "Uncached buffered IO", v8. 5 years ago I posted patches adding support for RWF_UNCACHED, as a way to do buffered IO that isn't page cache persistent. The approach back then was to have private pages for IO, and then get rid of them once IO was done. But that then runs into all the issues that O_DIRECT has, in terms of synchronizing with the page cache. So here's a new approach to the same concent, but using the page cache as synchronization. Due to excessive bike shedding on the naming, this is now named RWF_DONTCACHE, and is less special in that it's just page cache IO, except it prunes the ranges once IO is completed. Why do this, you may ask? The tldr is that device speeds are only getting faster, while reclaim is not. Doing normal buffered IO can be very unpredictable, and suck up a lot of resources on the reclaim side. This leads people to use O_DIRECT as a work-around, which has its own set of restrictions in terms of size, offset, and length of IO. It's also inherently synchronous, and now you need async IO as well. While the latter isn't necessarily a big problem as we have good options available there, it also should not be a requirement when all you want to do is read or write some data without caching. Even on desktop type systems, a normal NVMe device can fill the entire page cache in seconds. On the big system I used for testing, there's a lot more RAM, but also a lot more devices. As can be seen in some of the results in the following patches, you can still fill RAM in seconds even when there's 1TB of it. Hence this problem isn't solely a "big hyperscaler system" issue, it's common across the board. Common for both reads and writes with RWF_DONTCACHE is that they use the page cache for IO. Reads work just like a normal buffered read would, with the only exception being that the touched ranges will get pruned after data has been copied. For writes, the ranges will get writeback kicked off before the syscall returns, and then writeback completion will prune the range. Hence writes aren't synchronous, and it's easy to pipeline writes using RWF_DONTCACHE. Folios that aren't instantiated by RWF_DONTCACHE IO are left untouched. This means you that uncached IO will take advantage of the page cache for uptodate data, but not leave anything it instantiated/created in cache. File systems need to support this. This patchset adds support for the generic read path, which covers file systems like ext4. Patches exist to add support for iomap/XFS and btrfs as well, which sit on top of this series. If RWF_DONTCACHE IO is attempted on a file system that doesn't support it, -EOPNOTSUPP is returned. Hence the user can rely on it either working as designed, or flagging and error if that's not the case. The intent here is to give the application a sensible fallback path - eg, it may fall back to O_DIRECT if appropriate, or just live with the fact that uncached IO isn't available and do normal buffered IO. Adding "support" to other file systems should be trivial, most of the time just a one-liner adding FOP_DONTCACHE to the fop_flags in the file_operations struct, if the file system is using either iomap or the generic filemap helpers for reading and writing. Performance results are in patch 8 for reads, and you can find the write side results in the XFS patch adding support for DONTCACHE writes for XFS: https://git.kernel.dk/cgit/linux/commit/?h=buffered-uncached-fs.10&id=257e92de795fdff7d7e256501e024fac6da6a7f4 with the tldr being that I see about a 65% improvement in performance for both, with fully predictable IO times. CPU reduction is substantial as well, with no kswapd activity at all for reclaim when using uncached IO. Using it from applications is trivial - just set RWF_DONTCACHE for the read or write, using pwritev2(2) or preadv2(2). For io_uring, same thing, just set RWF_DONTCACHE in sqe->rw_flags for a buffered read/write operation. And that's it. Patches 1..7 are just prep patches, and should have no functional changes at all. Patch 8 adds support for the filemap path for RWF_DONTCACHE reads, and patches 9..12 are just prep patches for supporting the write side of uncached writes. In the below mentioned branch, there are then patches to adopt uncached reads and writes for xfs, btrfs, and ext4. The latter currently relies on bit of a hack for passing whether this is an uncached write or not through ->write_begin(), which can hopefully go away once ext4 adopts iomap for buffered writes. I say this is a hack as it's not the prettiest way to do it, however it is fully solid and will work just fine. Passes full xfstests and fsx overnight runs, no issues observed. That includes the vm running the testing also using RWF_DONTCACHE on the host. I'll post fsstress and fsx patches for RWF_DONTCACHE separately. As far as I'm concerned, no further work needs doing here. And git tree for the patches is here: https://git.kernel.dk/cgit/linux/log/?h=buffered-uncached.10 with the file system patches on top adding support for xfs/btrfs/ext4 here: https://git.kernel.dk/cgit/linux/log/?h=buffered-uncached-fs.10 This patch (of 12): Rather than pass in both the file and position directly from the kiocb, just take a struct kiocb instead. With the kiocb being passed in, skip passing in the address_space separately as well. While doing so, move the ki_flags checking into filemap_create_folio() as well. In preparation for actually needing the kiocb in the function. No functional changes in this patch. Link: https://lkml.kernel.org/r/20241220154831.1086649-1-axboe@kernel.dk Link: https://lkml.kernel.org/r/20241220154831.1086649-2-axboe@kernel.dk Signed-off-by: Jens Axboe Reviewed-by: Kirill A. Shutemov Reviewed-by: Matthew Wilcox (Oracle) Cc: Brian Foster Cc: Chris Mason Cc: Johannes Weiner Cc: Christoph Hellwig Signed-off-by: Andrew Morton mm/filemap.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 89a41a0263293856678189981e5407375261c4ff Author: David Hildenbrand Date: Mon Jan 13 14:16:11 2025 +0100 mm/hugetlb: use folio->lru int demote_free_hugetlb_folios() We are demoting hugetlb folios to smaller hugetlb folios; let's avoid messing with pages where avoidable and handle it more similar to __split_huge_page_tail(). Link: https://lkml.kernel.org/r/20250113131611.2554758-7-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Sidhartha Kumar Cc: Baolin Wang Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton mm/hugetlb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3f982b9b18c23900da10956b91036a3f6fe3f5bc Author: David Hildenbrand Date: Mon Jan 13 14:16:10 2025 +0100 mm/hugetlb-cgroup: convert hugetlb_cgroup_css_offline() to work on folios Let's convert hugetlb_cgroup_css_offline() and hugetlb_cgroup_move_parent() to work on folios. hugepage_activelist contains folios, not pages. While at it, rename page_hcg simply to hcg, removing most of the "page" terminology. This removes an unnecessary call to compound_head(). Link: https://lkml.kernel.org/r/20250113131611.2554758-6-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Matthew Wilcox (Oracle) Cc: Baolin Wang Cc: Muchun Song Cc: Sidhartha Kumar Signed-off-by: Andrew Morton mm/hugetlb_cgroup.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit b235448e8cab7eea17d164efc7bf55505985ba65 Author: David Hildenbrand Date: Mon Jan 13 14:16:09 2025 +0100 mm/hugetlb: rename folio_putback_active_hugetlb() to folio_putback_hugetlb() Now that folio_putback_hugetlb() is only called on folios that were previously isolated through folio_isolate_hugetlb(), let's rename it to match folio_putback_lru(). Add some kernel doc to clarify how this function is supposed to be used. Link: https://lkml.kernel.org/r/20250113131611.2554758-5-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Baolin Wang Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Sidhartha Kumar Signed-off-by: Andrew Morton include/linux/hugetlb.h | 4 ++-- mm/hugetlb.c | 15 +++++++++++++-- mm/migrate.c | 6 +++--- 3 files changed, 18 insertions(+), 7 deletions(-) commit ba23f58de896842028b4b33b95530f08288396fe Author: David Hildenbrand Date: Mon Jan 13 14:16:08 2025 +0100 mm/migrate: don't call folio_putback_active_hugetlb() on dst hugetlb folio We replaced a simple put_page() by a putback_active_hugepage() call in commit 3aaa76e125c1 ("mm: migrate: hugetlb: putback destination hugepage to active list"), to set the "active" flag on the dst hugetlb folio. Nowadays, we decoupled the "active" list from the flag, by calling the flag "migratable". Calling "putback" on something that wasn't allocated is weird and not future proof, especially if we might reach that path when migration failed and we just want to free the freshly allocated hugetlb folio. Let's simply handle the migratable flag and the active list flag in move_hugetlb_state(), where we know that allocation succeeded and already handle the temporary flag; use a simple folio_put() to return our reference. Link: https://lkml.kernel.org/r/20250113131611.2554758-4-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Baolin Wang Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Sidhartha Kumar Signed-off-by: Andrew Morton mm/hugetlb.c | 10 ++++++++++ mm/migrate.c | 8 ++++---- 2 files changed, 14 insertions(+), 4 deletions(-) commit 4c640f128074e0d4459ecf072595a44df5c2ae18 Author: David Hildenbrand Date: Mon Jan 13 14:16:07 2025 +0100 mm/hugetlb: rename isolate_hugetlb() to folio_isolate_hugetlb() Let's make the function name match "folio_isolate_lru()", and add some kernel doc. Link: https://lkml.kernel.org/r/20250113131611.2554758-3-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Baolin Wang Cc: Muchun Song Cc: Sidhartha Kumar Signed-off-by: Andrew Morton include/linux/hugetlb.h | 4 ++-- mm/gup.c | 2 +- mm/hugetlb.c | 23 ++++++++++++++++++++--- mm/mempolicy.c | 2 +- mm/migrate.c | 6 +++--- 5 files changed, 27 insertions(+), 10 deletions(-) commit 8d91fed83cc12306cbb63efa6c473ffee117977a Author: David Hildenbrand Date: Mon Jan 13 14:16:06 2025 +0100 mm/huge_memory: convert has_hwpoisoned into a pure folio flag Patch series "mm: hugetlb+THP folio and migration cleanups", v2. Some cleanups around more folio conversion and migration handling that I collected working on random stuff. This patch (of 6): Let's stop setting it on pages, there is no need to anymore. Link: https://lkml.kernel.org/r/20250113131611.2554758-2-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Baolin Wang Cc: Sidhartha Kumar Signed-off-by: Andrew Morton include/linux/page-flags.h | 6 ++---- mm/huge_memory.c | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) commit f57f63b0f0fd7ed71987857d244f8490b2d6043c Author: Joshua Hahn Date: Mon Jan 13 13:01:56 2025 -0800 mm/damon/paddr: improve readability of damon_pa_stat damon_pa_stat contains an unnecessary goto statement, and the if/else can be re-written to be more readable. This patch is written on top of SJ's patch series [1], which in turn is written on top of another one of his series [2]. [1] https://lore.kernel.org/all/20241219040327.61902-1-sj@kernel.org/ [2] https://lore.kernel.org/all/20241213215306.54778-1-sj@kernel.org/ Link: https://lkml.kernel.org/r/20250113210201.446051-1-joshua.hahnjy@gmail.com Signed-off-by: Joshua Hahn Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/paddr.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit bdbe1d7bc325dbe77335f39b265620f9accc0ae9 Author: Usama Arif Date: Mon Jan 13 19:07:38 2025 +0000 mm/damon/paddr: increment pa_stat damon address range by folio size This is to avoid going through all the pages in a folio. For folio_size > PAGE_SIZE, damon_get_folio will return NULL for tail pages, so the for loop in those instances will be a nop. Have a more efficient loop by just incrementing the address by folio_size. Link: https://lkml.kernel.org/r/20250113190738.1156381-1-usamaarif642@gmail.com Signed-off-by: Usama Arif Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/paddr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit bf069012df19cf80b460a03c92bfe6320dc268b0 Author: Hao Ge Date: Mon Jan 13 11:28:58 2025 +0800 selftests/mm/cow: modify the incorrect checking parameters In run_with_memfd_hugetlb(), some error handle have passed incorrect parameters. It should be "smem", but it was mistakenly written as "mem". Let's fix it. [gehao@kylinos.cn: fix other errant sites, per Anshuman] Link: https://lkml.kernel.org/r/20250113050908.93638-1-hao.ge@linux.dev Link: https://lkml.kernel.org/r/20250113032858.63670-1-hao.ge@linux.dev Fixes: f8664f3c4a08 ("selftests/vm: cow: basic COW tests for non-anonymous pages") Signed-off-by: Hao Ge Cc: SeongJae Park Cc: Shuah Khan (Samsung OSG) Cc: Anshuman Khandual Signed-off-by: Andrew Morton tools/testing/selftests/mm/cow.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d6550ee43f4b96d10792912c6c01ebeeec38af79 Author: Randy Dunlap Date: Fri Jan 10 22:32:49 2025 -0800 kasan: use correct kernel-doc format Use the correct kernel-doc character following function parameters or struct members (':' instead of '-') to eliminate kernel-doc warnings. kasan.h:509: warning: Function parameter or struct member 'addr' not described in 'kasan_poison' kasan.h:509: warning: Function parameter or struct member 'size' not described in 'kasan_poison' kasan.h:509: warning: Function parameter or struct member 'value' not described in 'kasan_poison' kasan.h:509: warning: Function parameter or struct member 'init' not described in 'kasan_poison' kasan.h:522: warning: Function parameter or struct member 'addr' not described in 'kasan_unpoison' kasan.h:522: warning: Function parameter or struct member 'size' not described in 'kasan_unpoison' kasan.h:522: warning: Function parameter or struct member 'init' not described in 'kasan_unpoison' kasan.h:539: warning: Function parameter or struct member 'address' not described in 'kasan_poison_last_granule' kasan.h:539: warning: Function parameter or struct member 'size' not described in 'kasan_poison_last_granule' Link: https://lkml.kernel.org/r/20250111063249.910975-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Vincenzo Frascino Signed-off-by: Andrew Morton mm/kasan/kasan.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit dfe61db4a132f229706dee64045c49144128be91 Author: Zi Yan Date: Fri Jan 10 18:50:28 2025 -0500 selftests/mm: add tests for splitting pmd THPs to all lower orders Kernel already supports splitting a folio to any lower order. Test it. [ziy@nvidia.com: no need to test splitting to order-1] Link: https://lkml.kernel.org/r/DDA202EA-4664-4F50-A7FD-B00CBB7A624B@nvidia.com Link: https://lkml.kernel.org/r/20250110235028.96824-2-ziy@nvidia.com Signed-off-by: Zi Yan Cc: Alexander Zhu Cc: Rik van Riel Cc: Shuah Khan Cc: Usama Arif Signed-off-by: Andrew Morton tools/testing/selftests/mm/split_huge_page_test.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 136c5b40e0ad84f4b4a38584089cd565b97f799c Author: Zi Yan Date: Fri Jan 10 18:50:27 2025 -0500 selftests/mm: use selftests framework to print test result Otherwise the number of tests does not match the reality. Link: https://lkml.kernel.org/r/20250110235028.96824-1-ziy@nvidia.com Fixes: 391e86971161 ("mm: selftest to verify zero-filled pages are mapped to zeropage") Signed-off-by: Zi Yan Cc: Alexander Zhu Cc: Rik van Riel Cc: Shuah Khan Cc: Usama Arif Signed-off-by: Andrew Morton tools/testing/selftests/mm/split_huge_page_test.c | 34 ++++++++--------------- 1 file changed, 12 insertions(+), 22 deletions(-) commit 91fe0e4d044044592e667fd4784edc39fe53bbd8 Author: Andrew Morton Date: Fri Jan 10 16:38:41 2025 -0800 Documentation/filesystems/proc.rst: fix possessive form of "process" The possessive form of "process" is "process's". Fix up various misdirected attempts at this. Also reflow some paragraphs. Cc: David Hildenbrand Cc: Wang Yaxin Cc: xu xin Cc: Yang Yang Signed-off-by: Andrew Morton Documentation/filesystems/proc.rst | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 3ab76c767bc783c122a8dfe105fbc10a0b029b42 Author: xu xin Date: Fri Jan 10 17:40:34 2025 +0800 ksm: add ksm involvement information for each process In /proc//ksm_stat, add two extra ksm involvement items including KSM_mergeable and KSM_merge_any. It helps administrators to better know the system's KSM behavior at process level. ksm_merge_any: yes/no whether the process'mm is added by prctl() into the candidate list of KSM or not, and fully enabled at process level. ksm_mergeable: yes/no whether any VMAs of the process'mm are currently applicable to KSM. Purpose ======= These two items are just to improve the observability of KSM at process level, so that users can know if a certain process has enabled KSM. For example, if without these two items, when we look at /proc//ksm_stat and there's no merging pages found, We are not sure whether it is because KSM was not enabled or because KSM did not successfully merge any pages. Although "mg" in /proc//smaps indicate VM_MERGEABLE, it's opaque and not very obvious for non professionals. [akpm@linux-foundation.org: wording tweaks, per David and akpm] Link: https://lkml.kernel.org/r/20250110174034304QOb8eDoqtFkp3_t8mqnqc@zte.com.cn Signed-off-by: xu xin Acked-by: David Hildenbrand Tested-by: Mario Casquero Cc: Wang Yaxin Cc: Yang Yang Signed-off-by: Andrew Morton Documentation/filesystems/proc.rst | 68 ++++++++++++++++++++++++++++++++++++++ fs/proc/base.c | 11 ++++++ include/linux/ksm.h | 1 + mm/ksm.c | 19 +++++++++++ 4 files changed, 99 insertions(+) commit 8f65ac0b7577a9691ed838c95e514ce287d8e36e Author: Isaac J. Manjarres Date: Fri Jan 10 08:59:00 2025 -0800 mm/memfd: use strncpy_from_user() to read memfd name The existing logic uses strnlen_user() to calculate the length of the memfd name from userspace and then copies the string into a buffer using copy_from_user(). This is error-prone, as the string length could have changed between the time when it was calculated and when the string was copied. The existing logic handles this by ensuring that the last byte in the buffer is the terminating zero. This handling is contrived and can better be handled by using strncpy_from_user(), which gets the length of the string and copies it in one shot. Therefore, simplify the logic for copying the memfd name by using strncpy_from_user(). No functional change. Link: https://lkml.kernel.org/r/20250110165904.3437374-3-isaacmanjarres@google.com Signed-off-by: Isaac J. Manjarres Reviewed-by: Alice Ryhl Reviewed-by: Lorenzo Stoakes Cc: John Stultz Cc: Kalesh Singh Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton mm/memfd.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit f5dbcd90dacd39ecd17fca86b47f52be6ffdd179 Author: Isaac J. Manjarres Date: Fri Jan 10 08:58:59 2025 -0800 mm/memfd: refactor and cleanup the logic in memfd_create() Patch series "Cleanup for memfd_create()", v4. memfd_create() handles all of its logic in a single function. Some of the logic in the function is also somewhat contrived (i.e. copying the memfd name from userpace). This series aims to cleanup memfd_create() by splitting out the logic into helper functions, and simplifying the memfd name copying to make the code easier to follow. This has no intended functional changes. Thank you Alice and Lorenzo for reviewing v3 of this series and for your feedback! This patch (of 2): memfd_create() is a pretty busy function that could be easier to read if some of the logic was split out into helper functions. Therefore, split the flags sanitization, name allocation, and file structure allocation into their own helper functions. No functional change. Link: https://lkml.kernel.org/r/20250110165904.3437374-1-isaacmanjarres@google.com Link: https://lkml.kernel.org/r/20250110165904.3437374-2-isaacmanjarres@google.com Signed-off-by: Isaac J. Manjarres Reviewed-by: Alice Ryhl Reviewed-by: Lorenzo Stoakes Cc: Isaac J. Manjarres Cc: John Stultz Cc: Kalesh Singh Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton mm/memfd.c | 81 ++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 58 insertions(+), 23 deletions(-) commit d783cc5913f17b2b5d9c51cb0904860ec97ed44d Author: SeongJae Park Date: Fri Jan 10 10:52:32 2025 -0800 mm/damon: explain "effective quota" on kernel-doc comment The kernel-doc comment for 'struct damos_quota' describes how "effective quota" is calculated, but does not explain what it is. Actually there was an input[1] about it. Add the explanation on the comment. Also, fix a trivial typo on the comment block: s/empt/empty/ [1] https://github.com/damonitor/damo/issues/17#issuecomment-2497525043 Link: https://lkml.kernel.org/r/20250110185232.54907-6-sj@kernel.org Signed-off-by: SeongJae Park Suggested-by: Honggyu Kim Cc: Yunjeong Mun Cc: Honggyu Kim Cc: Jonathan Corbet Signed-off-by: Andrew Morton include/linux/damon.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit d24393450b8300ca6ec55db9cf4e498123e55b4c Author: SeongJae Park Date: Fri Jan 10 10:52:31 2025 -0800 Docs/admin-guide/mm/damon/start: update snapshot example Two of DAMON user-space tool (damo) commands that are used for examples on DAMON getting started document, namely 'damo show' and 'damo report heats' are deprecated[1,2], and replaced by new commands that provides same functions with unified and simplified user interfaces. Also the example output of 'damo show' is outdated. 'damo schemes' command is not deprecated, but users are recommended to use 'damo start' or 'damo tune' instead. Update the examples to use the replacements, recommendations, and up-to-date output formats. [1] https://git.kernel.org/sj/damo/c/3272e0ac94ecc5e1 [2] https://git.kernel.org/sj/damo/c/da3ec66bbdd9e87d Link: https://lkml.kernel.org/r/20250110185232.54907-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Honggyu Kim Cc: Jonathan Corbet Cc: Yunjeong Mun Signed-off-by: Andrew Morton Documentation/admin-guide/mm/damon/start.rst | 67 +++++++++++++++++----------- 1 file changed, 40 insertions(+), 27 deletions(-) commit eb14b12c8c22fb8bcc72b8f02889a02cf3577590 Author: SeongJae Park Date: Fri Jan 10 10:52:30 2025 -0800 Docs/admin-guide/mm/damon/usage: fix and add missing DAMOS filter sysfs files on files hierarchy DAMOS filter directory part of DAMON sysfs files hierarchy on the usage document is wrong. 'memcg_path' file under the directory is wrongly written as 'memcg_id'. Also the directory has 'addr_start', 'addr_end', and 'target_idx' files, but the list is missing those. Fix the wrong name and add missing files. Link: https://lkml.kernel.org/r/20250110185232.54907-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Honggyu Kim Cc: Jonathan Corbet Cc: Yunjeong Mun Signed-off-by: Andrew Morton Documentation/admin-guide/mm/damon/usage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a96f9e2773630967c7c5b3d364263784a67b5daf Author: SeongJae Park Date: Fri Jan 10 10:52:29 2025 -0800 Docs/mm/damon: add an example monitoring intervals tuning Add a DAMON monitoring intervals tuning example that contains output from a demonstration of the guide on a real server workload system. The example with real world numbers will help users better understanding the guide instructions and what outputs they can expect and verify. Those will again help finding the rooms for improvements on the guide. Link: https://lkml.kernel.org/r/20250110185232.54907-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Honggyu Kim Cc: Jonathan Corbet Cc: Yunjeong Mun Signed-off-by: Andrew Morton Documentation/mm/damon/design.rst | 9 + .../damon/monitoring_intervals_tuning_example.rst | 247 +++++++++++++++++++++ 2 files changed, 256 insertions(+) commit 82047ae18446c2c5e97a9bf114c5c871212a656e Author: SeongJae Park Date: Fri Jan 10 10:52:28 2025 -0800 Docs/mm/damon/design: add monitoring parameters tuning guide Patch series "Docs/mm/damon: add tuning guide and misc updates". Add DAMON monitoring parameters tuning guide (patches 1 and 2), with misc documentation fixes (patch 3), updates (patch 4) and clarifications (patch 5). This patch (of 5): DAMON monitoring parameters including sampling and aggregation intervals should be tuned for given workloads. However, the fact is not explicitly documented. Also there is no official guide to help the tuning. This apparently confused a number of people[1] at best, or made people forgive DAMON without tuning. Add a guide on the design document. [1] https://lore.kernel.org/20241202175459.2005526-1-sj@kernel.org Link: https://lkml.kernel.org/r/20250110185232.54907-1-sj@kernel.org Link: https://lkml.kernel.org/r/20250110185232.54907-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Honggyu Kim Cc: Yunjeong Mun Signed-off-by: Andrew Morton Documentation/mm/damon/design.rst | 48 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit d670c8e5302af8ccdf5f12242e58816420738bb5 Author: Matthew Wilcox (Oracle) Date: Thu Jan 9 15:22:21 2025 +0000 mm: remove PageTransTail() The last caller was removed in October. Also remove the FALSE definition of PageTransCompoundMap(); the normal definition was removed a few years ago. Link: https://lkml.kernel.org/r/20250109152245.1591914-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: David Hildenbrand Acked-by: Zi Yan Signed-off-by: Andrew Morton include/linux/page-flags.h | 12 ------------ 1 file changed, 12 deletions(-) commit a52dcec56c5b96250f15efbd7de3d3ea6ce863d9 Author: Yu Zhao Date: Mon Dec 30 21:35:38 2024 -0700 mm/mglru: fix PTE-mapped large folios Count the accessed bits from PTEs mapping the same large folio as one access rather than multiple accesses. The last patch changed how folios accessed through page tables are promoted: rather than getting promoted after the accessed bit is cleared for the first time, a folio only gets promoted thereafter. Counting the accessed bits from the same large folio as multiple accesses can cause that folio to be promoted prematurely, which in turn can cause overprotection of single-use large folios. This patch reduced the sys time of the kernel compilation by 95% CI [2, 5]% on Altra M128-30 with 3GB DRAM, 12GB zram, 16KB THPs and -j32. Link: https://lkml.kernel.org/r/20241231043538.4075764-8-yuzhao@google.com Signed-off-by: Yu Zhao Reported-by: Barry Song Tested-by: Kalesh Singh Cc: Bharata B Rao Cc: David Stevens Cc: Kairui Song Signed-off-by: Andrew Morton mm/vmscan.c | 108 +++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 71 insertions(+), 37 deletions(-) commit 4d5d14a01e2c9091b128fb46e1d07475e9a7bb72 Author: Yu Zhao Date: Mon Dec 30 21:35:37 2024 -0700 mm/mglru: rework workingset protection With the aging feedback no longer considering the distribution of folios in each generation, rework workingset protection to better distribute folios across MAX_NR_GENS. This is achieved by reusing PG_workingset and PG_referenced/LRU_REFS_FLAGS in a slightly different way. For folios accessed multiple times through file descriptors, make lru_gen_inc_refs() set additional bits of LRU_REFS_WIDTH in folio->flags after PG_referenced, then PG_workingset after LRU_REFS_WIDTH. After all its bits are set, i.e., LRU_REFS_FLAGS|BIT(PG_workingset), a folio is lazily promoted into the second oldest generation in the eviction path. And when folio_inc_gen() does that, it clears LRU_REFS_FLAGS so that lru_gen_inc_refs() can start over. For this case, LRU_REFS_MASK is only valid when PG_referenced is set. For folios accessed multiple times through page tables, folio_update_gen() from a page table walk or lru_gen_set_refs() from a rmap walk sets PG_referenced after the accessed bit is cleared for the first time. Thereafter, those two paths set PG_workingset and promote folios to the youngest generation. Like folio_inc_gen(), when folio_update_gen() does that, it also clears PG_referenced. For this case, LRU_REFS_MASK is not used. For both of the cases, after PG_workingset is set on a folio, it remains until this folio is either reclaimed, or "deactivated" by lru_gen_clear_refs(). It can be set again if lru_gen_test_recent() returns true upon a refault. When adding folios to the LRU lists, lru_gen_folio_seq() distributes them as follows: +---------------------------------+---------------------------------+ | Accessed thru page tables | Accessed thru file descriptors | +---------------------------------+---------------------------------+ | PG_active (set while isolated) | | +----------------+----------------+----------------+----------------+ | PG_workingset | PG_referenced | PG_workingset | LRU_REFS_FLAGS | +---------------------------------+---------------------------------+ |<--------- MIN_NR_GENS --------->| | |<-------------------------- MAX_NR_GENS -------------------------->| After this patch, some typical client and server workloads showed improvements under heavy memory pressure. For example, Python TPC-C, which was used to benchmark a different approach [1] to better detect refault distances, showed a significant decrease in total refaults: Before After Change Time (seconds) 10801 10801 0% Executed (transactions) 41472 43663 +5% workingset_nodes 109070 120244 +10% workingset_refault_anon 5019627 7281831 +45% workingset_refault_file 1294678786 554855564 -57% workingset_refault_total 1299698413 562137395 -57% [1] https://lore.kernel.org/20230920190244.16839-1-ryncsn@gmail.com/ Link: https://lkml.kernel.org/r/20241231043538.4075764-7-yuzhao@google.com Signed-off-by: Yu Zhao Reported-by: Kairui Song Closes: https://lore.kernel.org/CAOUHufahuWcKf5f1Sg3emnqX+cODuR=2TQo7T4Gr-QYLujn4RA@mail.gmail.com/ Tested-by: Kalesh Singh Cc: Barry Song Cc: Bharata B Rao Cc: David Stevens Signed-off-by: Andrew Morton include/linux/mm_inline.h | 88 ++++++++++++++-------------- include/linux/mmzone.h | 82 ++++++++++++++++---------- mm/swap.c | 24 ++++---- mm/vmscan.c | 143 +++++++++++++++++++++++++++------------------- mm/workingset.c | 29 +++++----- 5 files changed, 202 insertions(+), 164 deletions(-) commit b1a71694fb00c9a7bad788a0b49198eab20621b3 Author: Yu Zhao Date: Mon Dec 30 21:35:36 2024 -0700 mm/mglru: rework refault detection With anon and file min_seq being able to move independently, rework workingset protection as well so that the comparison of refaults between anon and file is always on an equal footing. Specifically, make lru_gen_test_recent() return true for refaults happening within the distance of MAX_NR_GENS. For example, if min_seq of a type is max_seq-MIN_NR_GENS, refaults from min_seq-1, i.e., max_seq-MIN_NR_GENS-1, are also considered recent, since the distance max_seq-(max_seq-MIN_NR_GENS-1), i.e., MIN_NR_GENS+1 is less than MAX_NR_GENS. As an intermediate step to the final optimization, this change by itself should not have userspace-visiable effects beyond performance. Link: https://lkml.kernel.org/r/20241231043538.4075764-6-yuzhao@google.com Signed-off-by: Yu Zhao Reported-by: Kairui Song Closes: https://lore.kernel.org/CAOUHufahuWcKf5f1Sg3emnqX+cODuR=2TQo7T4Gr-QYLujn4RA@mail.gmail.com/ Tested-by: Kalesh Singh Cc: Barry Song Cc: Bharata B Rao Cc: David Stevens Signed-off-by: Andrew Morton mm/workingset.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 37a260870f2ce41a649b14f74f10224046bcaeb1 Author: Yu Zhao Date: Mon Dec 30 21:35:35 2024 -0700 mm/mglru: rework type selection With anon and file min_seq being able to move independently, rework type selection so that it is based on the total refaults from all tiers of each type. Also allow a type to be selected until that type reaches MIN_NR_GENS, regardless of whether that type has a larger min_seq or not, to accommodate extreme swappiness. Since some tiers of a selected type can have higher refaults than the first tier of the other type, use a less larger gain factor 2:3 instead of 1:2, in order for those tiers in the selected type to be better protected. As an intermediate step to the final optimization, this change by itself should not have userspace-visiable effects beyond performance. Link: https://lkml.kernel.org/r/20241231043538.4075764-5-yuzhao@google.com Signed-off-by: Yu Zhao Reported-by: David Stevens Tested-by: Kalesh Singh Cc: Barry Song Cc: Bharata B Rao Cc: Kairui Song Signed-off-by: Andrew Morton mm/vmscan.c | 82 ++++++++++++++++++++----------------------------------------- 1 file changed, 26 insertions(+), 56 deletions(-) commit 798c0330c2ca078cc3e155e567c77c4d61345a38 Author: Yu Zhao Date: Mon Dec 30 21:35:34 2024 -0700 mm/mglru: rework aging feedback The aging feedback is based on both the number of generations and the distribution of folios in each generation. The number of generations is currently the distance between max_seq and anon min_seq. This is because anon min_seq is not allowed to move past file min_seq. The rationale for that is that file is always evictable whereas anon is not. However, for use cases where anon is a lot cheaper than file: 1. Anon in the second oldest generation can be a better choice than file in the oldest generation. 2. A large amount of file in the oldest generation can skew the distribution, making should_run_aging() return false negative. Allow anon and file min_seq to move independently, and use solely the number of generations as the feedback for aging. Specifically, when both anon and file are evictable, anon min_seq can now be greater than file min_seq, and therefore the number of generations becomes the distance between max_seq and min(min_seq[0],min_seq[1]). And should_run_aging() returns true if and only if the number of generations is less than MAX_NR_GENS. As the first step to the final optimization, this change by itself should not have userspace-visiable effects beyond performance. The next twos patch will take advantage of this change; the last patch in this series will better distribute folios across MAX_NR_GENS. [yuzhao@google.com: restore behaviour for systems with swappiness == 200] Link: https://lkml.kernel.org/r/Z4S3-aJy5dj9tBTk@google.com Link: https://lkml.kernel.org/r/20241231043538.4075764-4-yuzhao@google.com Signed-off-by: Yu Zhao Reported-by: David Stevens Tested-by: Kalesh Singh Cc: Barry Song Cc: Bharata B Rao Cc: Kairui Song Signed-off-by: Andrew Morton include/linux/mmzone.h | 17 ++-- mm/vmscan.c | 206 ++++++++++++++++++++++--------------------------- 2 files changed, 99 insertions(+), 124 deletions(-) commit cc8ec7be78ffaa29f6e0781fd12602974970eb53 Author: Yu Zhao Date: Mon Dec 30 21:35:33 2024 -0700 mm/mglru: optimize deactivation Do not shuffle a folio in the deactivation paths if it is already in the oldest generation. This reduces the LRU lock contention. Before this patch, the contention is reproducible by FIO, e.g., fio -filename=/dev/nvme1n1p2 -direct=0 -thread -size=1024G \ -rwmixwrite=30 --norandommap --randrepeat=0 -ioengine=sync \ -bs=4k -numjobs=400 -runtime=25000 --time_based \ -group_reporting -name=mglru 98.96%--_raw_spin_lock_irqsave folio_lruvec_lock_irqsave | --98.78%--folio_batch_move_lru | --98.63%--deactivate_file_folio mapping_try_invalidate invalidate_mapping_pages invalidate_bdev blkdev_common_ioctl blkdev_ioctl After this patch, deactivate_file_folio() bails out early without taking the LRU lock. A side effect is that a folio can be left at the head of the oldest generation, rather than the tail. If reclaim happens at the same time, it cannot reclaim this folio immediately. Since there is no known correlation between truncation and reclaim, this side effect is considered insignificant. Link: https://lkml.kernel.org/r/20241231043538.4075764-3-yuzhao@google.com Reported-by: Bharata B Rao Closes: https://lore.kernel.org/CAOUHufawNerxqLm7L9Yywp3HJFiYVrYO26ePUb1jH-qxNGWzyA@mail.gmail.com/ Signed-off-by: Yu Zhao Tested-by: Kalesh Singh Cc: Barry Song Cc: David Stevens Cc: Kairui Song Signed-off-by: Andrew Morton mm/swap.c | 48 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 7 deletions(-) commit 9cbfd1c3c83b62c42ff46e17227e996cc9b2b336 Author: Yu Zhao Date: Mon Dec 30 21:35:32 2024 -0700 mm/mglru: clean up workingset Patch series "mm/mglru: performance optimizations", v4. This series improves performance for some previously reported test cases. Most of the code changes gathered here has been floating on the mailing list [1][2]. They are now properly organized and have gone through various benchmarks on client and server devices, including Android, FIO, memcached, multiple VMs and MongoDB. In addition to the syzbot regressions fixed in v2 [3] and v3 [4], this version fixes two more regressions: one reported by Oliver Sang [5] and the other by Barry Song. [1] https://lore.kernel.org/CAOUHufahuWcKf5f1Sg3emnqX+cODuR=2TQo7T4Gr-QYLujn4RA@mail.gmail.com/ [2] https://lore.kernel.org/CAOUHufawNerxqLm7L9Yywp3HJFiYVrYO26ePUb1jH-qxNGWzyA@mail.gmail.com/ [3] https://lore.kernel.org/67294349.050a0220.701a.0010.GAE@google.com/ [4] https://lore.kernel.org/67549eca.050a0220.2477f.001b.GAE@google.com/ [5] https://lore.kernel.org/202412231601.f1eb8f84-lkp@intel.com/ This patch (of 7): Move VM_BUG_ON_FOLIO() to cover both the default and MGLRU paths. Also use a pair of rcu_read_lock() and rcu_read_unlock() within each path, to improve readability. This change should not have any side effects. Link: https://lkml.kernel.org/r/20241231043538.4075764-1-yuzhao@google.com Link: https://lkml.kernel.org/r/20241231043538.4075764-2-yuzhao@google.com Signed-off-by: Yu Zhao Tested-by: Kalesh Singh Cc: Barry Song Cc: Bharata B Rao Cc: David Stevens Cc: Kairui Song Signed-off-by: Andrew Morton mm/workingset.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit c6f239796b55dbc4225a6fca9f96232092b9df83 Author: Guo Weikang Date: Thu Jan 2 15:25:28 2025 +0800 mm/memblock: add memblock_alloc_or_panic interface Before SLUB initialization, various subsystems used memblock_alloc to allocate memory. In most cases, when memory allocation fails, an immediate panic is required. To simplify this behavior and reduce repetitive checks, introduce `memblock_alloc_or_panic`. This function ensures that memory allocation failures result in a panic automatically, improving code readability and consistency across subsystems that require this behavior. [guoweikang.kernel@gmail.com: arch/s390: save_area_alloc default failure behavior changed to panic] Link: https://lkml.kernel.org/r/20250109033136.2845676-1-guoweikang.kernel@gmail.com Link: https://lore.kernel.org/lkml/Z2fknmnNtiZbCc7x@kernel.org/ Link: https://lkml.kernel.org/r/20250102072528.650926-1-guoweikang.kernel@gmail.com Signed-off-by: Guo Weikang Acked-by: Geert Uytterhoeven [m68k] Reviewed-by: Alexander Gordeev [s390] Acked-by: Mike Rapoport (Microsoft) Cc: Alexander Gordeev Signed-off-by: Andrew Morton arch/alpha/kernel/core_cia.c | 5 +-- arch/alpha/kernel/core_marvel.c | 10 +---- arch/alpha/kernel/pci.c | 13 +----- arch/alpha/kernel/pci_iommu.c | 10 +---- arch/arm/kernel/setup.c | 10 +---- arch/arm/mm/mmu.c | 17 ++------ arch/arm/mm/nommu.c | 5 +-- arch/arm64/kernel/setup.c | 4 +- arch/loongarch/kernel/setup.c | 2 +- arch/loongarch/mm/init.c | 13 ++---- arch/m68k/mm/init.c | 5 +-- arch/m68k/mm/mcfmmu.c | 10 +---- arch/m68k/mm/motorola.c | 5 +-- arch/m68k/mm/sun3mmu.c | 10 +---- arch/m68k/sun3/sun3dvma.c | 6 +-- arch/mips/kernel/setup.c | 5 +-- arch/openrisc/mm/ioremap.c | 5 +-- arch/parisc/mm/init.c | 20 +++------- arch/powerpc/kernel/dt_cpu_ftrs.c | 10 ++--- arch/powerpc/kernel/pci_32.c | 5 +-- arch/powerpc/kernel/setup-common.c | 5 +-- arch/powerpc/kernel/setup_32.c | 8 +--- arch/powerpc/mm/book3s32/mmu.c | 5 +-- arch/powerpc/mm/book3s64/pgtable.c | 6 +-- arch/powerpc/mm/kasan/init_book3e_64.c | 8 ++-- arch/powerpc/mm/kasan/init_book3s_64.c | 2 +- arch/powerpc/mm/nohash/mmu_context.c | 16 ++------ arch/powerpc/mm/pgtable_32.c | 7 +--- arch/powerpc/platforms/powermac/nvram.c | 5 +-- arch/powerpc/platforms/powernv/opal.c | 5 +-- arch/powerpc/platforms/ps3/setup.c | 5 +-- arch/powerpc/sysdev/msi_bitmap.c | 5 +-- arch/riscv/kernel/setup.c | 4 +- arch/riscv/mm/kasan_init.c | 14 +++---- arch/s390/kernel/crash_dump.c | 4 +- arch/s390/kernel/numa.c | 8 +--- arch/s390/kernel/setup.c | 20 ++-------- arch/s390/kernel/smp.c | 11 +----- arch/s390/kernel/topology.c | 10 +---- arch/sh/mm/init.c | 10 +---- arch/sparc/kernel/prom_32.c | 4 +- arch/sparc/mm/srmmu.c | 14 ++----- arch/um/drivers/net_kern.c | 5 +-- arch/um/drivers/vector_kern.c | 5 +-- arch/um/kernel/load_file.c | 4 +- arch/x86/coco/sev/core.c | 4 +- arch/x86/kernel/acpi/boot.c | 5 +-- arch/x86/kernel/apic/io_apic.c | 9 +---- arch/x86/kernel/e820.c | 5 +-- arch/x86/platform/olpc/olpc_dt.c | 6 +-- arch/x86/xen/p2m.c | 8 +--- arch/xtensa/mm/kasan_init.c | 6 +-- drivers/clk/ti/clk.c | 5 +-- drivers/macintosh/smu.c | 6 +-- drivers/of/fdt.c | 8 +--- drivers/of/unittest.c | 8 +--- include/linux/memblock.h | 6 +++ init/main.c | 18 ++------- kernel/power/snapshot.c | 5 +-- lib/cpumask.c | 5 +-- mm/kmsan/shadow.c | 8 +--- mm/memblock.c | 20 ++++++++++ mm/numa.c | 8 +--- mm/percpu.c | 70 +++++++-------------------------- mm/sparse.c | 5 +-- 65 files changed, 144 insertions(+), 431 deletions(-) commit f8d4a6cabb74f82c37ccb7c5e9dc3fdad50393d4 Author: Lorenzo Stoakes Date: Thu Jan 2 12:10:52 2025 +0000 mm: make mmap_region() internal Now that we have removed the one user of mmap_region() outside of mm, make it internal and add it to vma.c so it can be userland tested. This ensures that all external memory mappings are performed using the appropriate interfaces and allows us to modify memory mapping logic as we see fit. Additionally expand test stubs to allow for the mmap_region() code to compile and be userland testable. Link: https://lkml.kernel.org/r/de5a3c574d35c26237edf20a1d8652d7305709c9.1735819274.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Cc: Jann Horn Cc: Thomas Bogendoerfer Cc: Vlastimil Babka Signed-off-by: Andrew Morton include/linux/mm.h | 3 -- mm/mmap.c | 59 ------------------------------------ mm/vma.c | 61 ++++++++++++++++++++++++++++++++++++- mm/vma.h | 2 +- tools/testing/vma/vma_internal.h | 65 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 126 insertions(+), 64 deletions(-) commit c4f1b56f3f78d22d8f73bd9264a7c2e6d74432ff Author: Lorenzo Stoakes Date: Thu Jan 2 12:10:51 2025 +0000 mips: vdso: prefer do_mmap() to mmap_region() Patch series "mm: update mips to use do_mmap(), make mmap_region() internal". Currently the only user of mmap_region() outside of the memory management code is the MIPS VDSO implementation. This uses mmap_region() to map a 'delay slot emulation page' at the top of the stack which is read-only and executable. This mapping requires that an already-acquired mmap write lock is utilised and that uffd and populate logic is ignored. This rules out vm_mmap(), however do_mmap() fits the bill. Adapt this code to use do_mmap() and then once done, make mmap_region() internal and userland testable, and avoid any other uses of mmap_region(), which is absolutely and strictly an internal mm function which bypasses a great number of checks and logic. This patch (of 2): mmap_region() is an internal memory management implementation detail that is not intended to be used outside of the memory management subsystem. Map the delay slot emulation page using do_mmap() which makes use of the already-held mmap write lock and bypasses unneeded populate and userfaultfd logic. This should have the precise same behaviour as the existing logic. Link: https://lkml.kernel.org/r/cover.1735819274.git.lorenzo.stoakes@oracle.com Link: https://lkml.kernel.org/r/ef076e381570f709e5c2c142dc030ec5b3309a0e.1735819274.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Cc: Jann Horn Cc: Thomas Bogendoerfer Cc: Vlastimil Babka Signed-off-by: Andrew Morton arch/mips/kernel/vdso.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 4f79384a25d57a59e142009e52f40ae1f25102fe Author: Kairui Song Date: Tue Jan 14 01:57:32 2025 +0800 mm, swap_slots: remove slot cache for freeing path The slot cache for freeing path is mostly for reducing the overhead of si->lock. As we have basically eliminated the si->lock usage for freeing path, it can be removed. This helps simplify the code, and avoids swap entries from being hold in cache upon freeing. The delayed freeing of entries have been causing trouble for further optimizations for zswap [1] and in theory will also cause more fragmentation, and extra overhead. Test with build linux kernel showed both performance and fragmentation is better without the cache: tiem make -j96 / 768M memcg, 4K pages, 10G ZRAM, avg of 4 test run:: Before: Sys time: 36047.78, Real time: 472.43 After: (-7.6% sys time, -7.3% real time) Sys time: 33314.76, Real time: 437.67 time make -j96 / 1152M memcg, 64K mTHP, 10G ZRAM, avg of 4 test run: Before: Sys time: 46859.04, Real time: 562.63 hugepages-64kB/stats/swpout: 1783392 hugepages-64kB/stats/swpout_fallback: 240875 After: (-23.3% sys time, -21.3% real time) Sys time: 35958.87, Real time: 442.69 hugepages-64kB/stats/swpout: 1866267 hugepages-64kB/stats/swpout_fallback: 158330 Sequential SWAP should be also slightly faster, tests didn't show a measurable difference though, at least no regression: Swapin 4G zero page on ZRAM (time in us): Before (avg. 1923756) 1912391 1927023 1927957 1916527 1918263 1914284 1934753 1940813 1921791 After (avg. 1922290): 1919101 1925743 1916810 1917007 1923930 1935152 1917403 1923549 1921913 Link: https://lore.kernel.org/all/CAMgjq7ACohT_uerSz8E_994ZZCv709Zor+43hdmesW_59W1BWw@mail.gmail.com/[1] Link: https://lkml.kernel.org/r/20250113175732.48099-14-ryncsn@gmail.com Signed-off-by: Kairui Song Suggested-by: Chris Li Cc: Baoquan He Cc: Barry Song Cc: "Huang, Ying" Cc: Hugh Dickens Cc: Johannes Weiner Cc: Kalesh Singh Cc: Nhat Pham Cc: Ryan Roberts Cc: Yosry Ahmed Signed-off-by: Andrew Morton include/linux/swap_slots.h | 3 -- mm/swap_slots.c | 78 ++++++---------------------------------- mm/swapfile.c | 89 ++++++++++++++++++---------------------------- 3 files changed, 44 insertions(+), 126 deletions(-) commit bae8a4ef3efb56bb7e83bafd3c0856845aeaf605 Author: Kairui Song Date: Tue Jan 14 01:57:31 2025 +0800 mm, swap: use a global swap cluster for non-rotation devices Non-rotational devices (SSD / ZRAM) can tolerate fragmentation, so the goal of the SWAP allocator is to avoid contention for clusters. It uses a per-CPU cluster design, and each CPU will use a different cluster as much as possible. However, HDDs are very sensitive to fragmentation, contention is trivial in comparison. Therefore, we use one global cluster instead. This ensures that each order will be written to the same cluster as much as possible, which helps make the I/O more continuous. This ensures that the performance of the cluster allocator is as good as that of the old allocator. Tests after this commit compared to those before this series: Tested using 'make -j32' with tinyconfig, a 1G memcg limit, and HDD swap: make -j32 with tinyconfig, using 1G memcg limit and HDD swap: Before this series: 114.44user 29.11system 39:42.90elapsed 6%CPU (0avgtext+0avgdata 157284maxresident)k 2901232inputs+0outputs (238877major+4227640minor)pagefaults After this commit: 113.90user 23.81system 38:11.77elapsed 6%CPU (0avgtext+0avgdata 157260maxresident)k 2548728inputs+0outputs (235471major+4238110minor)pagefaults [ryncsn@gmail.com: check kmalloc() return in setup_clusters] Link: https://lkml.kernel.org/r/CAMgjq7Au+o04ckHyT=iU-wVx9az=t0B-ZiC5E0bDqNrAtNOP-g@mail.gmail.com Link: https://lkml.kernel.org/r/20250113175732.48099-13-ryncsn@gmail.com Signed-off-by: Kairui Song Suggested-by: Chris Li Cc: Baoquan He Cc: Barry Song Cc: "Huang, Ying" Cc: Hugh Dickens Cc: Johannes Weiner Cc: Kalesh Singh Cc: Nhat Pham Cc: Ryan Roberts Cc: Yosry Ahmed Signed-off-by: Andrew Morton include/linux/swap.h | 2 ++ mm/swapfile.c | 54 ++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 42 insertions(+), 14 deletions(-) commit 3f641cf938e6a3d5ad2e219c3ad1638b6886a291 Author: Kairui Song Date: Tue Jan 14 01:57:30 2025 +0800 mm, swap: introduce a helper for retrieving cluster from offset It's a common operation to retrieve the cluster info from offset, introduce a helper for this. Link: https://lkml.kernel.org/r/20250113175732.48099-12-ryncsn@gmail.com Signed-off-by: Kairui Song Suggested-by: Chris Li Cc: Baoquan He Cc: Barry Song Cc: "Huang, Ying" Cc: Hugh Dickens Cc: Johannes Weiner Cc: Kalesh Singh Cc: Nhat Pham Cc: Ryan Roberts Cc: Yosry Ahmed Signed-off-by: Andrew Morton mm/swapfile.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit e3ae2dec849ba8bc5649c2d0507e02bd4379da71 Author: Kairui Song Date: Tue Jan 14 01:57:29 2025 +0800 mm, swap: simplify percpu cluster updating Instead of using a returning argument, we can simply store the next cluster offset to the fixed percpu location, which reduce the stack usage and simplify the function: Object size: ./scripts/bloat-o-meter mm/swapfile.o mm/swapfile.o.new add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-271 (-271) Function old new delta get_swap_pages 2847 2733 -114 alloc_swap_scan_cluster 894 737 -157 Total: Before=30833, After=30562, chg -0.88% Stack usage: Before: swapfile.c:1190:5:get_swap_pages 240 static After: swapfile.c:1185:5:get_swap_pages 216 static Link: https://lkml.kernel.org/r/20250113175732.48099-11-ryncsn@gmail.com Signed-off-by: Kairui Song Cc: Baoquan He Cc: Barry Song Cc: Chis Li Cc: "Huang, Ying" Cc: Hugh Dickens Cc: Johannes Weiner Cc: Kalesh Singh Cc: Nhat Pham Cc: Ryan Roberts Cc: Yosry Ahmed Signed-off-by: Andrew Morton include/linux/swap.h | 4 ++-- mm/swapfile.c | 66 +++++++++++++++++++++++----------------------------- 2 files changed, 31 insertions(+), 39 deletions(-) commit 3b644773eefda88112d3ee5d57620f6e58fccfc6 Author: Kairui Song Date: Tue Jan 14 01:57:28 2025 +0800 mm, swap: reduce contention on device lock Currently, swap locking is mainly composed of two locks: the cluster lock (ci->lock) and the device lock (si->lock). The cluster lock is much more fine-grained, so it is best to use ci->lock instead of si->lock as much as possible. We have cleaned up other hard dependencies on si->lock. Following the new cluster allocator design, most operations don't need to touch si->lock at all. In practice, we only need to take si->lock when moving clusters between lists. To achieve this, this commit reworks the locking pattern of all si->lock and ci->lock users, eliminates all usage of ci->lock inside si->lock, and introduces a new design to avoid touching si->lock unless needed. For minimal contention and easier understanding of the system, two ideas are introduced with the corresponding helpers: isolation and relocation. - Clusters will be `isolated` from the list when iterating the list to search for an allocatable cluster. This ensures other CPUs won't walk into the same cluster easily, and it releases si->lock after acquiring ci->lock, providing the only place that handles the inversion of two locks, and avoids contention. Iterating the cluster list almost always moves the cluster (free -> nonfull, nonfull -> frag, frag -> frag tail), but it doesn't know where the cluster should be moved to until scanning is done. So keeping the cluster off-list is a good option with low overhead. The off-list time window of a cluster is also minimal. In the worst case, one CPU will return the cluster after scanning the 512 entries on it, which we used to busy wait with a spin lock. This is done with the new helper `isolate_lock_cluster`. - Clusters will be `relocated` after allocation or freeing, according to their usage count and status. Allocations no longer hold si->lock now, and may drop ci->lock for reclaim, so the cluster could be moved to any location while no lock is held. Besides, isolation clears all flags when it takes the cluster off the list (the flags must be in sync with the list status, so cluster users don't need to touch si->lock for checking its list status). So the cluster has to be relocated to the right list according to its usage after allocation or freeing. Relocation is optional, if the cluster flags indicate it's already on the right list, it will skip touching the list or si->lock. This is done with `relocate_cluster` after allocation or with `[partial_]free_cluster` after freeing. This handled usage of all kinds of clusters in a clean way. Scanning and allocation by iterating the cluster list is handled by "isolate - - relocate". Scanning and allocation of per-CPU clusters will only involve " - relocate", as it knows which cluster to lock and use. Freeing will only involve "relocate". Each CPU will keep using its per-CPU cluster until the 512 entries are all consumed. Freeing also has to free 512 entries to trigger cluster movement in the best case, so si->lock is rarely touched. Testing with building the Linux kernel with defconfig showed huge improvement: tiem make -j96 / 768M memcg, 4K pages, 10G ZRAM, on Intel 8255C: Before: Sys time: 73578.30, Real time: 864.05 After: (-50.7% sys time, -44.8% real time) Sys time: 36227.49, Real time: 476.66 time make -j96 / 1152M memcg, 64K mTHP, 10G ZRAM, on Intel 8255C: (avg of 4 test run) Before: Sys time: 74044.85, Real time: 846.51 hugepages-64kB/stats/swpout: 1735216 hugepages-64kB/stats/swpout_fallback: 430333 After: (-40.4% sys time, -37.1% real time) Sys time: 44160.56, Real time: 532.07 hugepages-64kB/stats/swpout: 1786288 hugepages-64kB/stats/swpout_fallback: 243384 time make -j32 / 512M memcg, 4K pages, 5G ZRAM, on AMD 7K62: Before: Sys time: 8098.21, Real time: 401.3 After: (-22.6% sys time, -12.8% real time ) Sys time: 6265.02, Real time: 349.83 The allocation success rate also slightly improved as we sanitized the usage of clusters with new defined helpers, previously dropping si->lock or ci->lock during scan will cause cluster order shuffle. Link: https://lkml.kernel.org/r/20250113175732.48099-10-ryncsn@gmail.com Signed-off-by: Kairui Song Suggested-by: Chris Li Cc: Baoquan He Cc: Barry Song Cc: "Huang, Ying" Cc: Hugh Dickens Cc: Johannes Weiner Cc: Kalesh Singh Cc: Nhat Pham Cc: Ryan Roberts Cc: Yosry Ahmed Signed-off-by: Andrew Morton include/linux/swap.h | 3 +- mm/swapfile.c | 432 +++++++++++++++++++++++++++++---------------------- 2 files changed, 247 insertions(+), 188 deletions(-) commit 3494d184706ff5e7d28481de0c841b039caa38b1 Author: Kairui Song Date: Tue Jan 14 01:57:27 2025 +0800 mm, swap: use an enum to define all cluster flags and wrap flags changes Currently, we are only using flags to indicate which list the cluster is on. Using one bit for each list type might be a waste, as the list type grows, we will consume too many bits. Additionally, the current mixed usage of '&' and '==' is a bit confusing. Make it clean by using an enum to define all possible cluster statuses. Only an off-list cluster will have the NONE (0) flag. And use a wrapper to annotate and sanitize all flag settings and list movements. Link: https://lkml.kernel.org/r/20250113175732.48099-9-ryncsn@gmail.com Signed-off-by: Kairui Song Suggested-by: Chris Li Cc: Baoquan He Cc: Barry Song Cc: "Huang, Ying" Cc: Hugh Dickens Cc: Johannes Weiner Cc: Kalesh Singh Cc: Nhat Pham Cc: Ryan Roberts Cc: Yosry Ahmed Signed-off-by: Andrew Morton include/linux/swap.h | 17 +++++++++--- mm/swapfile.c | 76 +++++++++++++++++++++++++++------------------------- 2 files changed, 53 insertions(+), 40 deletions(-) commit 9a0ddeb7988095a5c21994c37005a45b240039ef Author: Kairui Song Date: Tue Jan 14 01:57:26 2025 +0800 mm, swap: hold a reference during scan and cleanup flag usage The flag SWP_SCANNING was used as an indicator of whether a device is being scanned for allocation, and prevents swapoff. Combined with SWP_WRITEOK, they work as a set of barriers for a clean swapoff: 1. Swapoff clears SWP_WRITEOK, allocation requests will see ~SWP_WRITEOK and abort as it's serialized by si->lock. 2. Swapoff unuses all allocated entries. 3. Swapoff waits for SWP_SCANNING flag to be cleared, so ongoing allocations will stop, preventing UAF. 4. Now swapoff can free everything safely. This will make the allocation path have a hard dependency on si->lock. Allocation always have to acquire si->lock first for setting SWP_SCANNING and checking SWP_WRITEOK. This commit removes this flag, and just uses the existing per-CPU refcount instead to prevent UAF in step 3, which serves well for such usage without dependency on si->lock, and scales very well too. Just hold a reference during the whole scan and allocation process. Swapoff will kill and wait for the counter. And for preventing any allocation from happening after step 1 so the unuse in step 2 can ensure all slots are free, swapoff will acquire the ci->lock of each cluster one by one to ensure all allocations see ~SWP_WRITEOK and abort. This way these dependences on si->lock are gone. And worth noting we can't kill the refcount as the first step for swapoff as the unuse process have to acquire the refcount. Link: https://lkml.kernel.org/r/20250113175732.48099-8-ryncsn@gmail.com Signed-off-by: Kairui Song Cc: Baoquan He Cc: Barry Song Cc: Chis Li Cc: "Huang, Ying" Cc: Hugh Dickens Cc: Johannes Weiner Cc: Kalesh Singh Cc: Nhat Pham Cc: Ryan Roberts Cc: Yosry Ahmed Signed-off-by: Andrew Morton include/linux/swap.h | 1 - mm/swapfile.c | 90 +++++++++++++++++++++++++++++++++------------------- 2 files changed, 57 insertions(+), 34 deletions(-) commit b228386cf237e659cdf5d8037a19db0b0a06f6b5 Author: Kairui Song Date: Tue Jan 14 01:57:25 2025 +0800 mm, swap: clean up plist removal and adding When the swap device is full (inuse_pages == pages), it should be removed from the allocation available plist. If any slot is freed, the swap device should be added back to the plist. Additionally, during swapon or swapoff, the swap device is forcefully added or removed. Currently, the condition (inuse_pages == pages) is checked after every counter update, then remove or add the device accordingly. This is serialized by si->lock. This commit decouples it from the protection of si->lock and reworked plist removal and adding, making it possible to get rid of the hard dependency on si->lock in allocation path in later commits. To achieve this, simply using another lock is not an optimal approach, as the overhead is observable for a hot counter, and may cause complex locking issues. Thus, this commit manages to make it a lock-free atomic operation, by embedding the plist state into the second highest bit of the atomic counter. Simply making the counter an atomic will not work, if the update and plist status check are not performed atomically, we may miss an addition or removal. With the embedded info we can update the counter and check the plist status with single atomic operations, and avoid any extra overheads: If the counter is full (inuse_pages == pages) and the off-list bit is unset, we attempt to remove it from the plist. If the counter is not full (inuse_pages != pages) and the off-list bit is set, we attempt to add it to the plist. Removing, adding and bit update is serialized with a lock, which is a cold path. Ordinary counter updates will be lock-free. Link: https://lkml.kernel.org/r/20250113175732.48099-7-ryncsn@gmail.com Signed-off-by: Kairui Song Cc: Baoquan He Cc: Barry Song Cc: Chis Li Cc: "Huang, Ying" Cc: Hugh Dickens Cc: Johannes Weiner Cc: Kalesh Singh Cc: Nhat Pham Cc: Ryan Roberts Cc: Yosry Ahmed Signed-off-by: Andrew Morton include/linux/swap.h | 2 +- mm/swapfile.c | 186 +++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 138 insertions(+), 50 deletions(-) commit 27701521beb5897d6b97e2f8c20de41e74cbcb7b Author: Kairui Song Date: Tue Jan 14 01:57:24 2025 +0800 mm, swap: clean up device availability check Remove highest_bit and lowest_bit. After the HDD allocation path has been removed, the only purpose of these two fields is to determine whether the device is full or not, which can instead be determined by checking the inuse_pages. Link: https://lkml.kernel.org/r/20250113175732.48099-6-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: Baoquan He Cc: Barry Song Cc: Chis Li Cc: "Huang, Ying" Cc: Hugh Dickens Cc: Johannes Weiner Cc: Kalesh Singh Cc: Nhat Pham Cc: Ryan Roberts Cc: Yosry Ahmed Signed-off-by: Andrew Morton fs/btrfs/inode.c | 1 - fs/f2fs/data.c | 1 - fs/iomap/swapfile.c | 1 - include/linux/swap.h | 2 -- mm/page_io.c | 1 - mm/swapfile.c | 38 ++++++++------------------------------ 6 files changed, 8 insertions(+), 36 deletions(-) commit 0b310d9cfd94e1725ccf09487b6dfc471da958cc Author: Kairui Song Date: Tue Jan 14 01:57:23 2025 +0800 mm, swap: use cluster lock for HDD Cluster lock (ci->lock) was introduced to reduce contention for certain operations. Using cluster lock for HDD is not helpful as HDD have a poor performance, so locking isn't the bottleneck. But having different set of locks for HDD / non-HDD prevents further rework of device lock (si->lock). This commit just changed all lock_cluster_or_swap_info to lock_cluster, which is a safe and straight conversion since cluster info is always allocated now, also removed all cluster_info related checks. Link: https://lkml.kernel.org/r/20250113175732.48099-5-ryncsn@gmail.com Signed-off-by: Kairui Song Suggested-by: Chris Li Reviewed-by: Baoquan He Cc: Barry Song Cc: "Huang, Ying" Cc: Hugh Dickens Cc: Johannes Weiner Cc: Kalesh Singh Cc: Nhat Pham Cc: Ryan Roberts Cc: Yosry Ahmed Signed-off-by: Andrew Morton mm/swapfile.c | 109 +++++++++++++++++++--------------------------------------- 1 file changed, 35 insertions(+), 74 deletions(-) commit 7277433096f6ce4a84a1620529ac4ba3e1041ee1 Author: Kairui Song Date: Tue Jan 14 01:57:22 2025 +0800 mm, swap: remove old allocation path for HDD We are currently using different swap allocation algorithm for HDD and non-HDD. This leads to the existence of a different set of locks, and the code path is heavily bloated, causing difficulties for further optimization and maintenance. This commit removes all HDD swap allocation and related dead code, and uses the cluster allocation algorithm instead. The performance may drop temporarily, but this should be negligible: The main advantage of the legacy HDD allocation algorithm is that it tends to use continuous slots, but swap device gets fragmented quickly anyway, and the attempt to use continuous slots will fail easily. This commit also enables mTHP swap on HDD, which is expected to be beneficial, and following commits will adapt and optimize the cluster allocator for HDD. Link: https://lkml.kernel.org/r/20250113175732.48099-4-ryncsn@gmail.com Signed-off-by: Kairui Song Suggested-by: Chris Li Suggested-by: "Huang, Ying" Reviewed-by: Baoquan He Cc: Barry Song Cc: Hugh Dickens Cc: Johannes Weiner Cc: Kalesh Singh Cc: Nhat Pham Cc: Ryan Roberts Cc: Yosry Ahmed Signed-off-by: Andrew Morton include/linux/swap.h | 3 - mm/swapfile.c | 235 ++------------------------------------------------- 2 files changed, 9 insertions(+), 229 deletions(-) commit e027ec414fe8f540c6098ba1214e63e43b4eba1b Author: Kairui Song Date: Tue Jan 14 01:57:21 2025 +0800 mm, swap: fold swap_info_get_cont in the only caller The name of the function is confusing, and the code is much easier to follow after folding, also rename the confusing naming "p" to more meaningful "si". Link: https://lkml.kernel.org/r/20250113175732.48099-3-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: Baoquan He Cc: Barry Song Cc: Chis Li Cc: "Huang, Ying" Cc: Hugh Dickens Cc: Johannes Weiner Cc: Kalesh Singh Cc: Nhat Pham Cc: Ryan Roberts Cc: Yosry Ahmed Signed-off-by: Andrew Morton mm/swapfile.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) commit d563ced682505c4e0a713b0de73abf58550ff97e Author: Kairui Song Date: Tue Jan 14 01:57:20 2025 +0800 mm, swap: minor clean up for swap entry allocation Patch series "mm, swap: rework of swap allocator locks", v4. This series greatly improved swap performance by reworking the locking design and simplify a lot of code path. Test showed a up to 400% vm-scalability improvement with pmem as SWAP, and up to 37% reduce of kernel compile real time with ZRAM as SWAP (up to 60% improvement in system time). This is part of the new swap allocator discussed during the "Swap Abstraction" discussion at LSF/MM 2024, and "mTHP and swap allocator" discussion at LPC 2024. This is a follow up of previous swap cluster allocator series: https://lore.kernel.org/linux-mm/20240730-swap-allocator-v5-0-cb9c148b9297@kernel.org/ Also enables further optimizations which will come later. Previous series introduced a fully cluster based allocator, this series completely get rid of the old allocator and makes the new allocator avoid touching the si->lock unless needed. This bring huge performance gain and get rid of slot cache for freeing path. Currently, swap locking is mainly composed of two locks, cluster lock (ci->lock) and device lock (si->lock). The device lock is widely used to protect many things, causing it to be the main bottleneck for SWAP. Cluster lock is much more fine-grained, so it will be best to use ci->lock instead of si->lock as much as possible. `perf lock' indicates this issue clearly. Doing linux kernel build using tmpfs and ZRAM with limited memory (make -j64 with 1G memcg and 4k pages), result of "perf lock contention -ab sleep 3" shows: contended total wait max wait avg wait type caller 34948 53.63 s 7.11 ms 1.53 ms spinlock free_swap_and_cache_nr+0x350 16569 40.05 s 6.45 ms 2.42 ms spinlock get_swap_pages+0x231 11191 28.41 s 7.03 ms 2.54 ms spinlock swapcache_free_entries+0x59 4147 22.78 s 122.66 ms 5.49 ms spinlock page_vma_mapped_walk+0x6f3 4595 7.17 s 6.79 ms 1.56 ms spinlock swapcache_free_entries+0x59 406027 2.74 s 2.59 ms 6.74 us spinlock list_lru_add+0x39 ...snip... The top 5 caller are all users of si->lock, total wait time sums to several minutes in the 3 seconds time window. Following the new allocator design, many operation doesn't need to touch si->lock at all. We only need to take si->lock when doing operations across multiple clusters (changing the cluster list). So ideally allocator should always take ci->lock first, then take si->lock only if needed. But due to historical reasons, ci->lock is used inside si->lock critical section, causing lock inversion if we simply try to acquire si->lock after acquiring ci->lock. This series audited all si->lock usage, clean up legacy codes, eliminate usage of si->lock as much as possible by introducing new designs based on the new cluster allocator. Old HDD allocation codes are removed, cluster allocator is adapted with small changes for HDD usage, test is looking OK. And this also removed slot cache for freeing path. The performance is even better without it now, and this enables other clean up and optimizations as discussed before: https://lore.kernel.org/all/CAMgjq7ACohT_uerSz8E_994ZZCv709Zor+43hdmesW_59W1BWw@mail.gmail.com/ After this series, lock contention on si->lock is nearly unobservable with `perf lock` with the same test above: contended total wait max wait avg wait type caller ... snip ... 52 127.12 us 3.82 us 2.44 us spinlock move_cluster+0x2c 56 120.77 us 12.41 us 2.16 us spinlock move_cluster+0x2c ... snip ... 10 21.96 us 2.78 us 2.20 us spinlock isolate_lock_cluster+0x20 ... snip ... 9 19.27 us 2.70 us 2.14 us spinlock move_cluster+0x2c ... snip ... 5 11.07 us 2.70 us 2.21 us spinlock isolate_lock_cluster+0x20 `move_cluster' and `isolate_lock_cluster' (two new introduced helper) are basically the only users of si->lock now, performance gain is huge, and LOC is reduced. Tests Results: vm-scalability ============== Running `usemem --init-time -O -y -x -R -31 1G` from vm-scalability in a 12G memory cgroup using simulated pmem as SWAP backend (32G pmem, 32 CPUs). Using 4K folio by default, 64k mTHP and sequential access (!-R) results are also provided. 6 test runs for each case, Total Throughput: Test Before (KB/s) (stdev) After (KB/s) (stdev) Delta --------------------------------------------------------------------------- Random (4K): 69937.11 (16449.77) 369816.17 (24476.68) +428.78% Random (64k): 123442.83 (13207.51) 216379.00 (25024.83) +75.28% Sequential (4K): 6313909.83 (148856.12) 6419860.66 (183563.38) +1.7% Sequential access will cause lower stress for the allocator so the gain is limited, but with random access (which is much closer to real workloads) the performance gain is huge. Build kernel with defconfig on tmpfs with ZRAM ============================================== Below results shows a test matrix using different memory cgroup limit and job numbets, and scaled up progressive for a intuitive result. Done on a 48c96t system. 6 test run for each case, it can be seen clearly that as concurrent job number goes higher the performance gain is higher, but even -j6 is showing slight improvement. make -j | System Time (seconds) | Total Time (seconds) (NR / Mem / ZRAM) | (Before / After / Delta) | (Before / After / Delta) With 4k pages only: 6 / 192M / 3G | 1533 / 1522 / -0.7% | 1420 / 1414 / -0.3% 12 / 256M / 4G | 2275 / 2226 / -2.2% | 758 / 742 / -2.1% 24 / 384M / 5G | 3596 / 3154 / -12.3% | 476 / 422 / -11.3% 48 / 768M / 7G | 8159 / 3605 / -55.8% | 330 / 221 / -33.0% 96 / 1.5G / 10G | 18541 / 6462 / -65.1% | 283 / 180 / -36.4% With 64k mTHP: 24 / 512M / 5G | 3585 / 3469 / -3.2% | 293 / 290 / -0.1% 48 / 1G / 7G | 8173 / 3607 / -55.9% | 251 / 158 / -37.0% 96 / 2G / 10G | 16305 / 7791 / -52.2% | 226 / 144 / -36.3% The fragmentation are reduced too: With: make -j96 / 1152M memcg, 64K mTHP: (avg of 4 test run) Before: hugepages-64kB/stats/swpout: 1696184 hugepages-64kB/stats/swpout_fallback: 414318 After: (-63.2% mTHP swapout failure) hugepages-64kB/stats/swpout: 1866267 hugepages-64kB/stats/swpout_fallback: 158330 There is a up to 65.1% improvement in sys time for build kernel test, and lower fragmentation rate. Build kernel with tinyconfig on tmpfs with HDD as swap: ======================================================= This test is similar to above, but HDD test is very noisy and slow, the deviation is huge, so just use tinyconfig instead and take the median test result of 3 test run, which looks OK: Before this series: 114.44user 29.11system 39:42.90elapsed 6%CPU 2901232inputs+0outputs (238877major+4227640minor)pagefaults After this commit: 113.90user 23.81system 38:11.77elapsed 6%CPU 2548728inputs+0outputs (235471major+4238110minor)pagefaults Single thread SWAP: =================== Sequential SWAP should also be slightly faster as we removed a lot of unnecessary parts. Test using micro benchmark for swapout/in 4G zero memory using ZRAM, 10 test runs: Swapout Before (avg. 3359304): 3353796 3358551 3371305 3356043 3367524 3355303 3355924 3354513 3360776 Swapin Before (avg. 1928698): 1920283 1927183 1934105 1921373 1926562 1938261 1927726 1928636 1934155 Swapout After (avg. 3347511, -0.4%): 3337863 3347948 3355235 3339081 3333134 3353006 3354917 3346055 3360359 Swapin After (avg. 1922290, -0.3%): 1919101 1925743 1916810 1917007 1923930 1935152 1917403 1923549 1921913 The gain is limited at noise level but seems slightly better. This patch (of 13): Direct reclaim can skip the whole folio after reclaimed a set of folio based slots. Also simplify the code for allocation, reduce indention. Link: https://lkml.kernel.org/r/20250113175732.48099-1-ryncsn@gmail.com Link: https://lkml.kernel.org/r/20250113175732.48099-2-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: Baoquan He Cc: Barry Song Cc: Chis Li (Google) Cc: "Huang, Ying" Cc: Hugh Dickens Cc: Johannes Weiner Cc: Kalesh Singh Cc: Nhat Pham Cc: Ryan Roberts Cc: Yosry Ahmed Signed-off-by: Andrew Morton mm/swapfile.c | 59 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 29 insertions(+), 30 deletions(-) commit 07438779313caafe52ac1a1a6958d735a5938988 Author: Suren Baghdasaryan Date: Thu Dec 26 13:16:38 2024 -0800 alloc_tag: avoid current->alloc_tag manipulations when profiling is disabled When memory allocation profiling is disabled there is no need to update current->alloc_tag and these manipulations add unnecessary overhead. Fix the overhead by skipping these extra updates. I ran comprehensive testing on Pixel 6 on Big, Medium and Little cores: Overhead before fixes Overhead after fixes slab alloc page alloc slab alloc page alloc Big 6.21% 5.32% 3.31% 4.93% Medium 4.51% 5.05% 3.79% 4.39% Little 7.62% 1.82% 6.68% 1.02% This is an allocation microbenchmark doing allocations in a tight loop. Not a really realistic scenario and useful only to make performance comparisons. Link: https://lkml.kernel.org/r/20241226211639.1357704-1-surenb@google.com Fixes: b951aaff5035 ("mm: enable page allocation tagging") Signed-off-by: Suren Baghdasaryan Cc: David Wang <00107082@163.com> Cc: Kent Overstreet Cc: Yu Zhao Cc: Zhenhua Huang Signed-off-by: Andrew Morton include/linux/alloc_tag.h | 11 ++++++++--- lib/alloc_tag.c | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) commit ade81479c7dda1ce3eedb215c78bc615bbd04f06 Author: Chen Ridong Date: Tue Dec 24 02:52:38 2024 +0000 memcg: fix soft lockup in the OOM process A soft lockup issue was found in the product with about 56,000 tasks were in the OOM cgroup, it was traversing them when the soft lockup was triggered. watchdog: BUG: soft lockup - CPU#2 stuck for 23s! [VM Thread:1503066] CPU: 2 PID: 1503066 Comm: VM Thread Kdump: loaded Tainted: G Hardware name: Huawei Cloud OpenStack Nova, BIOS RIP: 0010:console_unlock+0x343/0x540 RSP: 0000:ffffb751447db9a0 EFLAGS: 00000247 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00000000ffffffff RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000247 RBP: ffffffffafc71f90 R08: 0000000000000000 R09: 0000000000000040 R10: 0000000000000080 R11: 0000000000000000 R12: ffffffffafc74bd0 R13: ffffffffaf60a220 R14: 0000000000000247 R15: 0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2fe6ad91f0 CR3: 00000004b2076003 CR4: 0000000000360ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: vprintk_emit+0x193/0x280 printk+0x52/0x6e dump_task+0x114/0x130 mem_cgroup_scan_tasks+0x76/0x100 dump_header+0x1fe/0x210 oom_kill_process+0xd1/0x100 out_of_memory+0x125/0x570 mem_cgroup_out_of_memory+0xb5/0xd0 try_charge+0x720/0x770 mem_cgroup_try_charge+0x86/0x180 mem_cgroup_try_charge_delay+0x1c/0x40 do_anonymous_page+0xb5/0x390 handle_mm_fault+0xc4/0x1f0 This is because thousands of processes are in the OOM cgroup, it takes a long time to traverse all of them. As a result, this lead to soft lockup in the OOM process. To fix this issue, call 'cond_resched' in the 'mem_cgroup_scan_tasks' function per 1000 iterations. For global OOM, call 'touch_softlockup_watchdog' per 1000 iterations to avoid this issue. Link: https://lkml.kernel.org/r/20241224025238.3768787-1-chenridong@huaweicloud.com Fixes: 9cbb78bb3143 ("mm, memcg: introduce own oom handler to iterate only over its own threads") Signed-off-by: Chen Ridong Acked-by: Michal Hocko Cc: Roman Gushchin Cc: Johannes Weiner Cc: Shakeel Butt Cc: Muchun Song Cc: Michal Koutný Cc: Signed-off-by: Andrew Morton mm/memcontrol.c | 7 ++++++- mm/oom_kill.c | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) commit b5f469a140b9f535fe2d3770209d5d751822898a Author: Alex Shi Date: Tue Dec 17 00:04:49 2024 +0900 mm/zsmalloc: introduce __zpdesc_clear/set_zsmalloc() Add helper __zpdesc_clear_zsmalloc() for __ClearPageZsmalloc(), __zpdesc_set_zsmalloc() for __SetPageZsmalloc(), and use them in callers. [42.hyeyoo@gmail.com: keep reset_zpdesc() to use struct page] Link: https://lkml.kernel.org/r/20241216150450.1228021-19-42.hyeyoo@gmail.com Signed-off-by: Alex Shi Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zpdesc.h | 10 ++++++++++ mm/zsmalloc.c | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) commit fc5eec0d8c898f27057d797351ae5055c1daa585 Author: Alex Shi Date: Tue Dec 17 00:04:48 2024 +0900 mm/zsmalloc: convert get/set_first_obj_offset() to take zpdesc Now that all users of get/set_first_obj_offset() are converted to use zpdesc, convert them to take zpdesc. Link: https://lkml.kernel.org/r/20241216150450.1228021-18-42.hyeyoo@gmail.com Signed-off-by: Alex Shi Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zsmalloc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 74999813c03323a9133fa378a1ce313c10cef24c Author: Alex Shi Date: Tue Dec 17 00:04:47 2024 +0900 mm/zsmalloc: convert SetZsPageMovable and remove unused funcs Convert SetZsPageMovable() to use zpdesc, and then remove unused funcs: get_next_page()/get_first_page()/is_first_page(). Link: https://lkml.kernel.org/r/20241216150450.1228021-17-42.hyeyoo@gmail.com Originally-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Alex Shi Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zsmalloc.c | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) commit 6d0adf4b6262157ed212b7869af8f2f5d72ea38a Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Tue Dec 17 00:04:46 2024 +0900 mm/zsmalloc: convert get_zspage() to take zpdesc Now that all users except get_next_page() (which will be removed in later patch) use zpdesc, convert get_zspage() to take zpdesc instead of page. Link: https://lkml.kernel.org/r/20241216150450.1228021-16-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Alex Shi Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zsmalloc.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 65a1cf15802c7a571299df507b1b72ba89ef1da8 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Tue Dec 17 00:04:45 2024 +0900 mm/zsmalloc: convert migrate_zspage() to use zpdesc Use get_first_zpdesc/get_next_zpdesc to replace get_first/next_page. No functional change. Link: https://lkml.kernel.org/r/20241216150450.1228021-15-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Alex Shi Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zsmalloc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2d57eb9ea996749365a4b2cdf2f2c688363b3b93 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Tue Dec 17 00:04:44 2024 +0900 mm/zsmalloc: convert location_to_obj() to take zpdesc As all users of location_to_obj() now use zpdesc, convert location_to_obj() to take zpdesc. Link: https://lkml.kernel.org/r/20241216150450.1228021-14-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Alex Shi Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zsmalloc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 7f0b0c6642077296edec442c6f54a4d7c608392c Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Tue Dec 17 00:04:43 2024 +0900 mm/zsmalloc: convert __free_zspage() to use zpdesc Introduce zpdesc_is_locked() and convert __free_zspage() to use zpdesc. Link: https://lkml.kernel.org/r/20241216150450.1228021-13-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Alex Shi Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zpdesc.h | 4 ++++ mm/zsmalloc.c | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) commit 73349afa00419585c11ee232377879b1f2912881 Author: Alex Shi Date: Tue Dec 17 00:04:42 2024 +0900 mm/zsmalloc: convert reset_page to reset_zpdesc zpdesc.zspage matches with page.private, zpdesc.next matches with page.index. They will be reset in reset_page() which is called prior to free base pages of a zspage. Since the fields that need to be initialized are independent of the order in struct zpdesc, Keep it to use struct page to ensure robustness against potential rearrangements of struct zpdesc fields in the future. [42.hyeyoo@gmail.com: reset zpdesc fields in reset_zpdesc()] Link: https://lkml.kernel.org/r/Z4Uw136VdG7vlKCL@localhost.localdomain [42.hyeyoo@gmail.com: keep reset_zpdesc() to use struct page fields] Link: https://lkml.kernel.org/r/20241216150450.1228021-12-42.hyeyoo@gmail.com Signed-off-by: Alex Shi Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zsmalloc.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 68721300856cafde0188f71df59e1ca7fab1df22 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Tue Dec 17 00:04:41 2024 +0900 mm/zsmalloc: add two helpers for zs_page_migrate() and make it use zpdesc To convert page to zpdesc in zs_page_migrate(), we added zpdesc_is_isolated()/zpdesc_zone() helpers. No functional change. Link: https://lkml.kernel.org/r/20241216150450.1228021-11-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Alex Shi Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zpdesc.h | 11 +++++++++++ mm/zsmalloc.c | 30 ++++++++++++++++-------------- 2 files changed, 27 insertions(+), 14 deletions(-) commit 4e04d10c66a9c5c1d6df143401fd0452b3a93e22 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Tue Dec 17 00:04:40 2024 +0900 mm/zsmalloc: convert obj_to_page() and zs_free() to use zpdesc Rename obj_to_page() to obj_to_zpdesc() and also convert it and its user zs_free() to use zpdesc. Link: https://lkml.kernel.org/r/20241216150450.1228021-10-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Alex Shi Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zsmalloc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit acaf41841e96170daa49df8d5b4633305f53e766 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Tue Dec 17 00:04:39 2024 +0900 mm/zsmalloc: convert init_zspage() to use zpdesc Replace get_first/next_page func series and kmap_atomic to new helper, no functional change. Link: https://lkml.kernel.org/r/20241216150450.1228021-9-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Alex Shi Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zsmalloc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 76fb5d9981be026bc78662e3d62ecfced78a5852 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Tue Dec 17 00:04:38 2024 +0900 mm/zsmalloc: convert obj_allocated() and related helpers to use zpdesc Convert obj_allocated(), and related helpers to take zpdesc. Also make its callers to cast (struct page *) to (struct zpdesc *) when calling them. The users will be converted gradually as there are many. Link: https://lkml.kernel.org/r/20241216150450.1228021-8-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Alex Shi Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zsmalloc.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 7d2e1a695023bbcd76d9ca312ab8b369eee98685 Author: Alex Shi Date: Tue Dec 17 00:04:37 2024 +0900 mm/zsmalloc: convert create_page_chain() and its users to use zpdesc Introduce a few helper functions for conversion to convert create_page_chain() to use zpdesc, then use zpdesc in replace_sub_page(). Link: https://lkml.kernel.org/r/20241216150450.1228021-7-42.hyeyoo@gmail.com Originally-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Alex Shi Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zpdesc.h | 6 ++++ mm/zsmalloc.c | 109 +++++++++++++++++++++++++++++++++++++--------------------- 2 files changed, 76 insertions(+), 39 deletions(-) commit 8f1868ad0c88ed0c8a56bc02da6831f843e6507b Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Tue Dec 17 00:04:36 2024 +0900 mm/zsmalloc: convert obj_malloc() to use zpdesc Use get_first_zpdesc/get_next_zpdesc to replace get_first_page/get_next_page. no functional change. Link: https://lkml.kernel.org/r/20241216150450.1228021-6-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Alex Shi Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zsmalloc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b5c1d8b510ad18eace94562e1d2ad419cb6a6147 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Tue Dec 17 00:04:35 2024 +0900 mm/zsmalloc: add and use pfn/zpdesc seeking funcs Add pfn_zpdesc(), pfn_zpdesc() and kmap_local_zpdesc(). Convert obj_to_location() to take zpdesc and also convert its users to use zpdesc. Link: https://lkml.kernel.org/r/20241216150450.1228021-5-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Alex Shi Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zpdesc.h | 14 +++++++++++ mm/zsmalloc.c | 75 ++++++++++++++++++++++++++++++----------------------------- 2 files changed, 52 insertions(+), 37 deletions(-) commit 4610d35c14fc861d1795f8396d8c245ee43f3c37 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Tue Dec 17 00:04:34 2024 +0900 mm/zsmalloc: convert __zs_map_object/__zs_unmap_object to use zpdesc These two functions take a pointer to an array of struct page. Make __zs_{map,unmap}_object() take pointer to an array of zpdesc instead of page. Add silly type casting when calling them. Casting will be removed later. Link: https://lkml.kernel.org/r/20241216150450.1228021-4-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Alex Shi Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zsmalloc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit c1b3bb73d55e17fb4b322a0d85f5450baff415e4 Author: Alex Shi Date: Tue Dec 17 00:04:33 2024 +0900 mm/zsmalloc: use zpdesc in trylock_zspage()/lock_zspage() Convert trylock_zspage() and lock_zspage() to use zpdesc. To achieve that, introduce a couple of helper functions: - zpdesc_lock() - zpdesc_unlock() - zpdesc_trylock() - zpdesc_wait_locked() - zpdesc_get() - zpdesc_put() Here we use the folio version of functions for 2 reasons. First, zswap.zpool currently only uses order-0 pages and using folio could save some compound_head checks. Second, folio_put could bypass devmap checking that we don't need. BTW, thanks Intel LKP found a build warning on the patch. Originally-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Link: https://lkml.kernel.org/r/20241216150450.1228021-3-42.hyeyoo@gmail.com Signed-off-by: Alex Shi Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zpdesc.h | 30 ++++++++++++++++++++++++++++ mm/zsmalloc.c | 64 +++++++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 73 insertions(+), 21 deletions(-) commit f4e33d325fe6633e66a2a2014afb2e9920e4bd1e Author: Alex Shi Date: Tue Dec 17 00:04:32 2024 +0900 mm/zsmalloc: add zpdesc memory descriptor for zswap.zpool Patch series "Add zpdesc memory descriptor for zswap.zpool", v9. This patch series introduces a new memory descriptor for zswap.zpool that currently overlaps with struct page for now. This is part of the effort to reduce the size of struct page and to enable dynamic allocation of memory descriptors [1]. This series does not bloat anything for zsmalloc and no functional change is intended (except for using zpdesc and folios). In the near future, the removal of page->index from struct page [2] will be addressed and the project also depends on this patch series. Thanks to everyone got involved in this series, especially, Alex who's been pushing it forward this year. [1] https://lore.kernel.org/linux-mm/ZvRKzKizOfEWBtJp@casper.infradead.org [2] https://lore.kernel.org/linux-mm/Z09hOy-UY9KC8WMb@casper.infradead.org This patch (of 18): The 1st patch introduces new memory descriptor zpdesc and renames zspage.first_page to zspage.first_zpdesc, with no functional change. We removed the comment about PG_owner_priv_1 since it is no longer used after commit a41ec880aa7b ("zsmalloc: move huge compressed obj from page to zspage"). [rdunlap@infradead.org: fix function parameter kernel-doc notation] Link: https://lkml.kernel.org/r/20250111063305.911010-1-rdunlap@infradead.org [42.hyeyoo@gmail.com: rework comments a little bit] Link: https://lkml.kernel.org/r/20241216150450.1228021-1-42.hyeyoo@gmail.com Link: https://lkml.kernel.org/r/20241216150450.1228021-2-42.hyeyoo@gmail.com Originally-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Alex Shi Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Randy Dunlap Acked-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Alex Shi Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/zpdesc.h | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mm/zsmalloc.c | 28 +++------------ 2 files changed, 112 insertions(+), 23 deletions(-) commit bc6f663add012d601677875345bf9c4075a145da Author: SeongJae Park Date: Thu Jan 9 09:51:26 2025 -0800 Docs/admin-guide/mm/damon/usage: document DAMOS filter 'allow' sysfs file Update DAMON usage document for the newly added 'allow' sysfs file for DAMOS filters. Link: https://lkml.kernel.org/r/20250109175126.57878-11-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/admin-guide/mm/damon/usage.rst | 33 ++++++++++++++++------------ 1 file changed, 19 insertions(+), 14 deletions(-) commit 5bce494764bb4ef21b63fba334c775a951a755ea Author: SeongJae Park Date: Thu Jan 9 09:51:25 2025 -0800 Docs/admin-guide/mm/damon/usage: omit DAMOS filter details in favor of design doc DAMON usage document is describing some details about DAMOS filters, which are also documented on the design doc. Deduplicate the details in favor of the design doc. Link: https://lkml.kernel.org/r/20250109175126.57878-10-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/admin-guide/mm/damon/usage.rst | 29 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 1c2ac23df75f21561453f0b7c024aa50119554cf Author: SeongJae Park Date: Thu Jan 9 09:51:24 2025 -0800 Docs/ABI/damon: document DAMOS filter allow sysfs file Update DAMON ABI document for added DAMOS filter 'allow' file. Link: https://lkml.kernel.org/r/20250109175126.57878-9-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/ABI/testing/sysfs-kernel-mm-damon | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit f477b9b409c03b2c431ad5910f6cd9de773c58c4 Author: SeongJae Park Date: Thu Jan 9 09:51:23 2025 -0800 Docs/mm/damon/design: document allow/reject DAMOS filter behaviors Update DAMOS filters design document to describe the allow/reject behavior of filters. Link: https://lkml.kernel.org/r/20250109175126.57878-8-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/mm/damon/design.rst | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) commit faa636c0ec063a105c6d766cc8a0362a144c2b5e Author: SeongJae Park Date: Thu Jan 9 09:51:22 2025 -0800 mm/damon/sysfs-schemes: add a file for setting damos_filter->allow Only kernel-space DAMON API users can use inclusive DAMOS filters. Add a sysfs file named 'allow' under DAMOS filter directory of DAMON sysfs interface, to let the user-space users use inclusive DAMOS filters. Link: https://lkml.kernel.org/r/20250109175126.57878-7-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/sysfs-schemes.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) commit e2fbfedad03401a38b8c3b7fd52d8fdcd039d0bc Author: SeongJae Park Date: Thu Jan 9 09:51:21 2025 -0800 mm/damon: add 'allow' argument to damos_new_filter() DAMON API users should set damos_filter->allow manually to use a DAMOS allow-filter, since damos_new_filter() unsets the field always. It is cumbersome and easy to mistake. Add an arugment for setting the field to damos_new_filter(). Link: https://lkml.kernel.org/r/20250109175126.57878-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton include/linux/damon.h | 2 +- mm/damon/core.c | 7 ++++--- mm/damon/paddr.c | 3 ++- mm/damon/reclaim.c | 2 +- mm/damon/sysfs-schemes.c | 2 +- mm/damon/tests/core-kunit.h | 4 ++-- 6 files changed, 11 insertions(+), 9 deletions(-) commit 283cbc006fe5043ee6583f1e6b355e1ade672d07 Author: SeongJae Park Date: Thu Jan 9 09:51:20 2025 -0800 mm/damon/paddr: support damos_filter->allow Respect damos_filter->allow from 'paddr', which is a DAMON operations set implementation for the physical address space and supports a few types of region-internal DAMOS filters (anon, memcg and young). The change is similar to that of the previous commit for core layer update. Link: https://lkml.kernel.org/r/20250109175126.57878-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/paddr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 491fee286e566e5e8af7f4c0330e179e47af2d00 Author: SeongJae Park Date: Thu Jan 9 09:51:19 2025 -0800 mm/damon/core: support damos_filter->allow DAMOS filters supports allowing behavior, but the core layer's DAMOS filters handling logic still assumes only rejecting (filtering-out) behavior. Update the logic to aware of and respect the behavioral decision by reading damos_filter->allow when making the decision to exclude a region or not. Link: https://lkml.kernel.org/r/20250109175126.57878-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/core.c | 6 +++--- mm/damon/tests/core-kunit.h | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) commit fe6d7fdd62491524d11433b9ff8d3db5dde32700 Author: SeongJae Park Date: Thu Jan 9 09:51:18 2025 -0800 mm/damon/core: add damos_filter->allow field DAMOS filters work as only exclusive (reject) filters. This makes it easy to be confused, and restrictive at combining multiple filters for covering various types of memory. Add a field named 'allow' to damos_filter. The field will be used to indicate whether the filter should work for inclusion or exclusion. To keep the old behavior, set it as 'false' (work as exclusive filter) by default, from damos_new_filter(). Following two commits will make the core and operations set layers, which handles damos_filter objects, respect the field, respectively. Link: https://lkml.kernel.org/r/20250109175126.57878-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton include/linux/damon.h | 4 +++- mm/damon/core.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit e20f52e8e3b7947e40bd40c6cdc69884c6df716c Author: SeongJae Park Date: Thu Jan 9 09:51:17 2025 -0800 mm/damon: fixup damos_filter kernel-doc Patch series "mm/damon: extend DAMOS filters for inclusion", v2. DAMOS fitlers are exclusive filters. It only excludes memory of given criterias from the DAMOS action targets. This has below limitations. First, the name is not explicitly explaining the behavior. This actually resulted in users' confusions[1]. Secondly, combined uses of multiple filters provide only restriced coverages. For example, building a DAMOS scheme that applies the action to memory that belongs to cgroup A "or" cgroup B is impossible. A workaround would be using two schemes that fitlers out memory that not belong to cgroup A and cgroup B, respectively. It is cumbersome, and difficult to control quota-like per-scheme features in an orchestration. Monitoring of filters-passed memory statistic will also be complicated. Extend DAMOS filters to support not only exclusion (rejecting), but also inclusion (allowing) behavior. For this, add a new damos_filter struct field called 'allow' for DAMON kernel API users. The filter works as an inclusion or exclusion filter when it is set or unset, respectively. For DAMON user-space ABI users, add a DAMON sysfs file of same name under DAMOS filter sysfs directory. To prevent exposing a behavioral change to old users, set rejecting as the default behavior. Note that allow-filters work for only inclusion, not exclusion of memory that not satisfying the criteria. And the default behavior of DAMOS for memory that no filter has involved is that the action can be applied to those memory. Also, filters-passed memory statistics are for any memory that passed through the DAMOS filters check stage. These implies installing allow-filters at the endof the filter list is useless. Refer to the design doc change of this series for more details. [1] https://lore.kernel.org/20240320165619.71478-1-sj@kernel.org This patch (of 10): The comment is slightly wrong. DAMOS filters are not only for pages, but general bytes of memory. Also the description of 'matching' is bit confusing, since DAMOS filters do only filtering out. Update the comments to be less confusing. Link: https://lkml.kernel.org/r/20250109175126.57878-1-sj@kernel.org Link: https://lkml.kernel.org/r/20250109175126.57878-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton include/linux/damon.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 6bf9b5b40af373690313f64a3935b2bf2e5d46d9 Author: Luiz Capitulino Date: Mon Dec 23 17:00:38 2024 -0500 mm: alloc_pages_bulk: rename API The previous commit removed the page_list argument from alloc_pages_bulk_noprof() along with the alloc_pages_bulk_list() function. Now that only the *_array() flavour of the API remains, we can do the following renaming (along with the _noprof() ones): alloc_pages_bulk_array -> alloc_pages_bulk alloc_pages_bulk_array_mempolicy -> alloc_pages_bulk_mempolicy alloc_pages_bulk_array_node -> alloc_pages_bulk_node Link: https://lkml.kernel.org/r/275a3bbc0be20fbe9002297d60045e67ab3d4ada.1734991165.git.luizcap@redhat.com Signed-off-by: Luiz Capitulino Acked-by: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Yunsheng Lin Signed-off-by: Andrew Morton drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 4 ++-- drivers/vfio/pci/mlx5/cmd.c | 14 +++++++------- drivers/vfio/pci/virtio/migrate.c | 6 +++--- fs/btrfs/extent_io.c | 2 +- fs/erofs/zutil.c | 4 ++-- fs/splice.c | 2 +- fs/xfs/xfs_buf.c | 4 ++-- include/linux/gfp.h | 14 +++++++------- kernel/bpf/arena.c | 2 +- lib/alloc_tag.c | 4 ++-- lib/kunit_iov_iter.c | 2 +- lib/test_vmalloc.c | 2 +- mm/mempolicy.c | 14 +++++++------- mm/vmalloc.c | 4 ++-- net/core/page_pool.c | 7 +++---- net/sunrpc/svc.c | 4 ++-- net/sunrpc/svc_xprt.c | 3 +-- 17 files changed, 45 insertions(+), 47 deletions(-) commit c8b979530f27f90c0353a189b2faa6e50a0ea94a Author: Luiz Capitulino Date: Mon Dec 23 17:00:37 2024 -0500 mm: alloc_pages_bulk_noprof: drop page_list argument Patch series "mm: alloc_pages_bulk: small API refactor", v2. Today, alloc_pages_bulk_noprof() supports two arguments to return allocated pages: a linked list and an array. There are also higher level APIs for both. However, the linked list API has apparently never been used. So, this series removes it along with the list API and also refactors the remaining API naming for consistency. This patch (of 2): commit 387ba26fb1cb ("mm/page_alloc: add a bulk page allocator") added __alloc_pages_bulk() along with the page_list argument. The next commit 0f87d9d30f21 ("mm/page_alloc: add an array-based interface to the bulk page allocator") added the array-based argument. As it turns out, the page_list argument has no users in the current tree (if it ever had any). Dropping it allows for a slight simplification and eliminates some unnecessary checks, now that page_array is required. Also, note that the removal of the page_list argument was proposed before in the thread below, where Matthew Wilcox mentions that: """ Iterating a linked list is _expensive_. It is about 10x quicker to iterate an array than a linked list. """ (https://lore.kernel.org/linux-mm/20231025093254.xvomlctwhcuerzky@techsingularity.net) Link: https://lkml.kernel.org/r/cover.1734991165.git.luizcap@redhat.com Link: https://lkml.kernel.org/r/f1c75db91d08cafd211eca6a3b199b629d4ffe16.1734991165.git.luizcap@redhat.com Signed-off-by: Luiz Capitulino Acked-by: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Yunsheng Lin Signed-off-by: Andrew Morton include/linux/gfp.h | 8 ++------ mm/mempolicy.c | 14 +++++++------- mm/page_alloc.c | 39 ++++++++++++--------------------------- 3 files changed, 21 insertions(+), 40 deletions(-) commit b2466bb3b4955350ee102b29c904ef301cb72bd2 Author: Ryan Roberts Date: Tue Jan 7 14:47:53 2025 +0000 selftests/mm: introduce uffd-wp-mremap regression test Introduce a test that registers a range of memory for UFFDIO_WRITEPROTECT_MODE_WP without UFFD_FEATURE_EVENT_REMAP. First check that the uffd-wp bit is set for every PTE in the range. Then mremap() the range to a new location and check that the uffd-wp bit is clear for every PTE in the range. Run the test for small folios, all supported THP sizes and all supported hugetlb sizes, and for swapped out memory, shared and private. There was previously a bug in the kernel where the uffd-wp bits remained set in all PTEs for this case, after fixing the kernel, the tests all pass. Link: https://lkml.kernel.org/r/20250107144755.1871363-3-ryan.roberts@arm.com Signed-off-by: Ryan Roberts Cc: David Hildenbrand Cc: Jann Horn Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Mark Rutland Cc: Muchun Song Cc: Peter Xu Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton tools/testing/selftests/mm/.gitignore | 1 + tools/testing/selftests/mm/Makefile | 2 + tools/testing/selftests/mm/run_vmtests.sh | 1 + tools/testing/selftests/mm/uffd-wp-mremap.c | 380 ++++++++++++++++++++++++++++ 4 files changed, 384 insertions(+) commit f931af2e41ab406e7fc3063ba5a73b536779006e Author: Peter Xu Date: Tue Jan 7 15:40:02 2025 -0500 mm/hugetlb: unify restore reserve accounting for new allocations Either hugetlb pages dequeued from hstate, or newly allocated from buddy, would require restore-reserve accounting to be managed properly. Merge the two paths on it. Add a small comment to make it slightly nicer. Link: https://lkml.kernel.org/r/20250107204002.2683356-8-peterx@redhat.com Signed-off-by: Peter Xu Cc: Ackerley Tng Cc: Breno Leitao Cc: Muchun Song Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Rik van Riel Cc: Roman Gushchin Signed-off-by: Andrew Morton mm/hugetlb.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 72d8f72631d278c7003defbe3fe88fe5332822f8 Author: Peter Xu Date: Tue Jan 7 15:40:01 2025 -0500 mm/hugetlb: drop vma_has_reserves() After the previous cleanup, vma_has_reserves() is mostly an empty helper except that it says "use reserve count" is inverted meaning from "needs a global reserve count", which is still true. To avoid confusions on having two inverted ways to ask the same question, always use the gbl_chg everywhere, and drop the function. When at it, rename "chg" to "gbl_chg" in dequeue_hugetlb_folio_vma(). It might be helpful for readers to see that the "chg" here is the global reserve count, not the vma resv count. Link: https://lkml.kernel.org/r/20250107204002.2683356-7-peterx@redhat.com Signed-off-by: Peter Xu Cc: Ackerley Tng Cc: Breno Leitao Cc: Muchun Song Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Rik van Riel Cc: Roman Gushchin Signed-off-by: Andrew Morton mm/hugetlb.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit 51e1de00acdb75585c46654147c7c7eb0689a068 Author: Peter Xu Date: Tue Jan 7 15:40:00 2025 -0500 mm/hugetlb: simplify vma_has_reserves() vma_has_reserves() is a helper "trying" to know whether the vma should consume one reservation when allocating the hugetlb folio. However it's not clear on why we need such complexity, as such information is already represented in the "chg" variable. From alloc_hugetlb_folio() context, "chg" (or in the function's context, "gbl_chg") is defined as: - If gbl_chg=1, the allocation cannot reuse an existing reservation - If gbl_chg=0, the allocation should reuse an existing reservation Firstly, map_chg is defined as following, to cover all cases of hugetlb reservation scenarios (mostly, via vma_needs_reservation(), but cow_from_owner is an outlier): CONDITION HAS RESERVATION? ========= ================ - SHARED: always check against per-inode resv_map (ignore NONRESERVE) - If resv exists ==> YES [1] - If not ==> NO [2] - PRIVATE: complicated... - Request came from a CoW from owner resv map ==> NO [3] (when cow_from_owner==true) - If does not own a resv_map at all.. ==> NO [4] (examples: VM_NORESERVE, private fork()) - If owns a resv_map, but resv donsn't exists ==> NO [5] - If owns a resv_map, and resv exists ==> YES [6] Further on, gbl_chg considered spool setup, so that is a decision based on all the context. If we look at vma_has_reserves(), it almost does check that has already been processed by map_chg accounting (I marked each return value to the case above): static bool vma_has_reserves(struct vm_area_struct *vma, long chg) { if (vma->vm_flags & VM_NORESERVE) { if (vma->vm_flags & VM_MAYSHARE && chg == 0) return true; ==> [1] else return false; ==> [2] or [4] } if (vma->vm_flags & VM_MAYSHARE) { if (chg) return false; ==> [2] else return true; ==> [1] } if (is_vma_resv_set(vma, HPAGE_RESV_OWNER)) { if (chg) return false; ==> [5] else return true; ==> [6] } return false; ==> [4] } It didn't check [3], but [3] case was actually already covered now by the "chg" / "gbl_chg" / "map_chg" calculations. In short, vma_has_reserves() doesn't provide anything more than return "!chg".. so just simplify all the things. There're a lot of comments describing truncation races, IIUC there should have no race as long as map_chg is properly done. Link: https://lkml.kernel.org/r/20250107204002.2683356-6-peterx@redhat.com Signed-off-by: Peter Xu Cc: Ackerley Tng Cc: Breno Leitao Cc: Muchun Song Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Rik van Riel Cc: Roman Gushchin Signed-off-by: Andrew Morton mm/hugetlb.c | 67 +++++++----------------------------------------------------- 1 file changed, 7 insertions(+), 60 deletions(-) commit 923682a0dd57065aef21bc297bfa6a9101c5da83 Author: Peter Xu Date: Tue Jan 7 15:39:59 2025 -0500 mm/hugetlb: clean up map/global resv accounting when allocate alloc_hugetlb_folio() isn't a function easy to read, especially on reservation accountings for either VMA or globally (majorly, spool only). The 1st complexity lies in the special private CoW path, aka, cow_from_owner=true case. The 2nd complexity may be the confusing updates of gbl_chg after it's set once, which looks like they can change anytime on the fly. Logically, cow_from_user is only about vma reservation. We could already decouple the flag and consolidate it into map charge flag very early. Then we don't need to keep checking the CoW special flag every time. This patch does it by making map_chg a tri-state flag. Tri-state needed is unfortunate, and it's because currently vma_needs_reservation() has a side effect internally, that it must be followed by either a end() or commit(). We keep the same semantic as before on one thing: "if (map_chg)" means we need a separate per-vma resv count. It keeps most of the old code like before untouched with the new enum. After this patch, we take these steps to decide these variables, hopefully slightly easier to follow: - First, decide map_chg. This will take cow_from_owner into account, once and for all. It's about whether we could take a resv count from the vma, no matter it's shared, private, etc. - Then, decide gbl_chg. The only diff here is spool, comparing to map_chg. Now only update each flag once and for all, instead of keep any of them flipping which can be very hard to follow. With cow_from_owner merged into map_chg, we could remove quite a few such checks all over. Side benefit of such is that we can get rid of one more confusing flag, which is deferred_reserve. Cleanup the comments a bit too. E.g., MAP_NORESERVE may not need to check against spool limit, AFAIU, if it's on a shared mapping, and if the page cache folio has its inode's resv map available (in which case map_chg would have been set zero, hence the code should be correct, not the comment). There's one trivial detail that needs attention that this patch touched, which is this check right after vma_commit_reservation(): if (map_chg > map_commit) It changes to: if (unlikely(map_chg == MAP_CHG_NEEDED && retval == 0)) It should behave the same like before, because previously the only way to make "map_chg > map_commit" happen is map_chg=1 && map_commit=0. That's exactly the rewritten line. Meanwhile, either commit() or end() will need to be skipped if ENFORCE, to keep the old behavior. Even though it looks a lot changed, but no functional change expected. Link: https://lkml.kernel.org/r/20250107204002.2683356-5-peterx@redhat.com Signed-off-by: Peter Xu Cc: Ackerley Tng Cc: Breno Leitao Cc: Muchun Song Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Rik van Riel Cc: Roman Gushchin Signed-off-by: Andrew Morton mm/hugetlb.c | 110 +++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 77 insertions(+), 33 deletions(-) commit 30cef82bc6e8975a360ec05b707f7fb194c875ed Author: Peter Xu Date: Tue Jan 7 15:39:58 2025 -0500 mm/hugetlb: rename avoid_reserve to cow_from_owner The old name "avoid_reserve" can be too generic and can be used wrongly in the new call sites that want to allocate a hugetlb folio. It's confusing on two things: (1) whether one can opt-in to avoid global reservation, and (2) whether it should take more than one count. In reality, this flag is only used in an extremely hacky path, in an extremely hacky way in hugetlb CoW path only, and always use with 1 saying "skip global reservation". Rename the flag to avoid future abuse of this flag, making it a boolean so as to reflect its true representation that it's not a counter. To make it even harder to abuse, add a comment above the function to explain it. Link: https://lkml.kernel.org/r/20250107204002.2683356-4-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Oscar Salvador Cc: Ackerley Tng Cc: Breno Leitao Cc: Muchun Song Cc: Naoya Horiguchi Cc: Rik van Riel Cc: Roman Gushchin Signed-off-by: Andrew Morton fs/hugetlbfs/inode.c | 2 +- include/linux/hugetlb.h | 4 ++-- mm/hugetlb.c | 33 ++++++++++++++++++++------------- 3 files changed, 23 insertions(+), 16 deletions(-) commit be8d7314b18ede1c6cdebbb982c9659020e2f1f2 Author: Peter Xu Date: Tue Jan 7 15:39:57 2025 -0500 mm/hugetlb: stop using avoid_reserve flag in fork() When fork() and stumble on top of a dma-pinned hugetlb private page, CoW must happen during fork() to guarantee dma coherency. In this specific path, hugetlb pages need to be allocated for the child process. Stop using avoid_reserve=1 flag here: it's not required to be used here, as dest_vma (which is destined to be a MAP_PRIVATE hugetlb vma) will have no private vma resv map, and that will make sure it won't be able to use a vma reservation later. No functional change intended with this change. Said that, it's still wanted to do this, so as to reduce the usage of avoid_reserve to the only one user, which is also why this flag was introduced initially in commit 04f2cbe35699 ("hugetlb: guarantee that COW faults for a process that called mmap(MAP_PRIVATE) on hugetlbfs will succeed"). I don't see whoever else should set it at all. Further patch will clean up resv accounting based on this. Link: https://lkml.kernel.org/r/20250107204002.2683356-3-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Oscar Salvador Cc: Ackerley Tng Cc: Breno Leitao Cc: Muchun Song Cc: Naoya Horiguchi Cc: Rik van Riel Cc: Roman Gushchin Signed-off-by: Andrew Morton mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58db7c5fbe7daa42098d4965133a864f98ba90ba Author: Peter Xu Date: Tue Jan 7 15:39:56 2025 -0500 mm/hugetlb: fix avoid_reserve to allow taking folio from subpool Patch series "mm/hugetlb: Refactor hugetlb allocation resv accounting", v2. This is a follow up on Ackerley's series here as replacement: https://lore.kernel.org/r/cover.1728684491.git.ackerleytng@google.com The goal of this series is to cleanup hugetlb resv accounting, especially during folio allocation, to decouple a few things: - Hugetlb folios v.s. Hugetlbfs: IOW, the hope is in the future hugetlb folios can be allocated completely without hugetlbfs. - Decouple VMA v.s. hugetlb folio allocations: allocating a hugetlb folio should not always require a hugetlbfs VMA. For example, either it got allocated from the inode level (see hugetlbfs_fallocate() where it used a pesudo VMA for allocation), or it can be allocated by other kernel subsystems. It paves way for other users to allocate hugetlb folios out of either system reservations, or subpools (instead of hugetlbfs, as a file system). For longer term, this prepares hugetlb as a separate concept versus hugetlbfs, so that hugetlb folios can be allocated by not only hugetlbfs and other things. Tests I've done: - I had a reproducer in patch 1 for the bug I found, this will start to work after patch 1 or the whole set applied. - Hugetlb regression tests (on x86_64 2MBs), includes: - All vmtests on hugetlbfs - libhugetlbfs test suite (which may fail some tests, but no new failures will be introduced by this series, so all such failures happen before this series so shouldn't be relevant). This patch (of 7): Since commit 04f2cbe35699 ("hugetlb: guarantee that COW faults for a process that called mmap(MAP_PRIVATE) on hugetlbfs will succeed"), avoid_reserve was introduced for a special case of CoW on hugetlb private mappings, and only if the owner VMA is trying to allocate yet another hugetlb folio that is not reserved within the private vma reserved map. Later on, in commit d85f69b0b533 ("mm/hugetlb: alloc_huge_page handle areas hole punched by fallocate"), alloc_huge_page() enforced to not consume any global reservation as long as avoid_reserve=true. This operation doesn't look correct, because even if it will enforce the allocation to not use global reservation at all, it will still try to take one reservation from the spool (if the subpool existed). Then since the spool reserved pages take from global reservation, it'll also take one reservation globally. Logically it can cause global reservation to go wrong. I wrote a reproducer below, trigger this special path, and every run of such program will cause global reservation count to increment by one, until it hits the number of free pages: #define _GNU_SOURCE /* See feature_test_macros(7) */ #include #include #include #include #include #include #define MSIZE (2UL << 20) int main(int argc, char *argv[]) { const char *path; int *buf; int fd, ret; pid_t child; if (argc < 2) { printf("usage: %s \n", argv[0]); return -1; } path = argv[1]; fd = open(path, O_RDWR | O_CREAT, 0666); if (fd < 0) { perror("open failed"); return -1; } ret = fallocate(fd, 0, 0, MSIZE); if (ret != 0) { perror("fallocate"); return -1; } buf = mmap(NULL, MSIZE, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); if (buf == MAP_FAILED) { perror("mmap() failed"); return -1; } /* Allocate a page */ *buf = 1; child = fork(); if (child == 0) { /* child doesn't need to do anything */ exit(0); } /* Trigger CoW from owner */ *buf = 2; munmap(buf, MSIZE); close(fd); unlink(path); return 0; } It can only reproduce with a sub-mount when there're reserved pages on the spool, like: # sysctl vm.nr_hugepages=128 # mkdir ./hugetlb-pool # mount -t hugetlbfs -o min_size=8M,pagesize=2M none ./hugetlb-pool Then run the reproducer on the mountpoint: # ./reproducer ./hugetlb-pool/test Fix it by taking the reservation from spool if available. In general, avoid_reserve is IMHO more about "avoid vma resv map", not spool's. I copied stable, however I have no intention for backporting if it's not a clean cherry-pick, because private hugetlb mapping, and then fork() on top is too rare to hit. Link: https://lkml.kernel.org/r/20250107204002.2683356-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20250107204002.2683356-2-peterx@redhat.com Fixes: d85f69b0b533 ("mm/hugetlb: alloc_huge_page handle areas hole punched by fallocate") Signed-off-by: Peter Xu Reviewed-by: Ackerley Tng Tested-by: Ackerley Tng Reviewed-by: Oscar Salvador Cc: Breno Leitao Cc: Muchun Song Cc: Naoya Horiguchi Cc: Rik van Riel Cc: Roman Gushchin Cc: Signed-off-by: Andrew Morton mm/hugetlb.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) commit 1dd44c0af4fa1e80a4e82faa10cbf5d22da40362 Author: Baolin Wang Date: Wed Jan 8 10:16:49 2025 +0800 mm: shmem: skip swapcache for swapin of synchronous swap device With fast swap devices (such as zram), swapin latency is crucial to applications. For shmem swapin, similar to anonymous memory swapin, we can skip the swapcache operation to improve swapin latency. Testing 1G shmem sequential swapin without THP enabled, I observed approximately a 6% performance improvement: (Note: I repeated 5 times and took the mean data for each test) w/o patch w/ patch changes 534.8ms 501ms +6.3% In addition, currently, we always split the large swap entry stored in the shmem mapping during shmem large folio swapin, which is not perfect, especially with a fast swap device. We should swap in the whole large folio instead of splitting the precious large folios to take advantage of the large folios and improve the swapin latency if the swap device is synchronous device, which is similar to anonymous memory mTHP swapin. Testing 1G shmem sequential swapin with 64K mTHP and 2M mTHP, I observed obvious performance improvement: mTHP=64K w/o patch w/ patch changes 550.4ms 169.6ms +69% mTHP=2M w/o patch w/ patch changes 542.8ms 126.8ms +77% Note that skipping swapcache requires attention to concurrent swapin scenarios. Fortunately the swapcache_prepare() and shmem_add_to_page_cache() can help identify concurrent swapin and large swap entry split scenarios, and return -EEXIST for retry. [akpm@linux-foundation.org: use IS_ENABLED(), tweak comment grammar] Link: https://lkml.kernel.org/r/3d9f3bd3bc6ec953054baff5134f66feeaae7c1e.1736301701.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Cc: David Hildenbrand Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Kairui Song Cc: Kefeng Wang Cc: Matthew Wilcox (Oracle) Cc: Ryan Roberts Signed-off-by: Andrew Morton mm/shmem.c | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 105 insertions(+), 5 deletions(-) commit b2aad24b53333f1904a55d97e3fde2246ef05bb6 Author: Guo Weikang Date: Mon Jan 6 10:11:25 2025 +0800 mm/memmap: prevent double scanning of memmap by kmemleak kmemleak explicitly scans the mem_map through the valid struct page objects. However, memmap_alloc() was also adding this memory to the gray object list, causing it to be scanned twice. Remove memmap_alloc() from the scan list and add a comment to clarify the behavior. Link: https://lore.kernel.org/lkml/CAOm6qn=FVeTpH54wGDFMHuCOeYtvoTx30ktnv9-w3Nh8RMofEA@mail.gmail.com/ Link: https://lkml.kernel.org/r/20250106021126.1678334-1-guoweikang.kernel@gmail.com Signed-off-by: Guo Weikang Reviewed-by: Catalin Marinas Cc: Mike Rapoport (Microsoft) Signed-off-by: Andrew Morton include/linux/memblock.h | 4 ++++ mm/mm_init.c | 8 ++++++-- mm/sparse-vmemmap.c | 5 +++-- 3 files changed, 13 insertions(+), 4 deletions(-) commit 63db8170bf34ce9e0763f87d993cf9b4c9002b09 Author: Bruno Faccini Date: Mon Jan 6 04:06:59 2025 -0800 mm/fake-numa: allow later numa node hotplug Current fake-numa implementation prevents new Numa nodes to be later hot-plugged by drivers. A common symptom of this limitation is the "node was absent from the node_possible_map" message by associated warning in mm/memory_hotplug.c: add_memory_resource(). This comes from the lack of remapping in both pxm_to_node_map[] and node_to_pxm_map[] tables to take fake-numa nodes into account and thus triggers collisions with original and physical nodes only-mapping that had been determined from BIOS tables. This patch fixes this by doing the necessary node-ids translation in both pxm_to_node_map[]/node_to_pxm_map[] tables. node_distance[] table has also been fixed accordingly. Details: When trying to use fake-numa feature on our system where new Numa nodes are being "hot-plugged" upon driver load, this fails with the following type of message and warning with stack : node 8 was absent from the node_possible_map WARNING: CPU: 61 PID: 4259 at mm/memory_hotplug.c:1506 add_memory_resource+0x3dc/0x418 This issue prevents the use of the fake-NUMA debug feature with the system's full configuration, when it has proven to be sometimes extremely useful for performance testing of multi-tasked, memory-bound applications, as it enables better isolation of processes/ranks compared to fat NUMA nodes. Usual numactl output after driver has “hot-plugged”/unveiled some new Numa nodes with and without memory : $ numactl --hardware available: 9 nodes (0-8) node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 node 0 size: 490037 MB node 0 free: 484432 MB node 1 cpus: node 1 size: 97280 MB node 1 free: 97279 MB node 2 cpus: node 2 size: 0 MB node 2 free: 0 MB node 3 cpus: node 3 size: 0 MB node 3 free: 0 MB node 4 cpus: node 4 size: 0 MB node 4 free: 0 MB node 5 cpus: node 5 size: 0 MB node 5 free: 0 MB node 6 cpus: node 6 size: 0 MB node 6 free: 0 MB node 7 cpus: node 7 size: 0 MB node 7 free: 0 MB node 8 cpus: node 8 size: 0 MB node 8 free: 0 MB node distances: node 0 1 2 3 4 5 6 7 8 0: 10 80 80 80 80 80 80 80 80 1: 80 10 255 255 255 255 255 255 255 2: 80 255 10 255 255 255 255 255 255 3: 80 255 255 10 255 255 255 255 255 4: 80 255 255 255 10 255 255 255 255 5: 80 255 255 255 255 10 255 255 255 6: 80 255 255 255 255 255 10 255 255 7: 80 255 255 255 255 255 255 10 255 8: 80 255 255 255 255 255 255 255 10 With recent M.Rapoport set of fake-numa patches in mm-everything and using numa=fake=4 boot parameter : $ numactl --hardware available: 4 nodes (0-3) node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 node 0 size: 122518 MB node 0 free: 117141 MB node 1 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 node 1 size: 219911 MB node 1 free: 219751 MB node 2 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 node 2 size: 122599 MB node 2 free: 122541 MB node 3 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 node 3 size: 122479 MB node 3 free: 122408 MB node distances: node 0 1 2 3 0: 10 10 10 10 1: 10 10 10 10 2: 10 10 10 10 3: 10 10 10 10 With recent M.Rapoport set of fake-numa patches in mm-everything, this patch on top, using numa=fake=4 boot parameter : # numactl —hardware available: 12 nodes (0-11) node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 node 0 size: 122518 MB node 0 free: 116429 MB node 1 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 node 1 size: 122631 MB node 1 free: 122576 MB node 2 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 node 2 size: 122599 MB node 2 free: 122544 MB node 3 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 node 3 size: 122479 MB node 3 free: 122419 MB node 4 cpus: node 4 size: 97280 MB node 4 free: 97279 MB node 5 cpus: node 5 size: 0 MB node 5 free: 0 MB node 6 cpus: node 6 size: 0 MB node 6 free: 0 MB node 7 cpus: node 7 size: 0 MB node 7 free: 0 MB node 8 cpus: node 8 size: 0 MB node 8 free: 0 MB node 9 cpus: node 9 size: 0 MB node 9 free: 0 MB node 10 cpus: node 10 size: 0 MB node 10 free: 0 MB node 11 cpus: node 11 size: 0 MB node 11 free: 0 MB node distances: node 0 1 2 3 4 5 6 7 8 9 10 11 0: 10 10 10 10 80 80 80 80 80 80 80 80 1: 10 10 10 10 80 80 80 80 80 80 80 80 2: 10 10 10 10 80 80 80 80 80 80 80 80 3: 10 10 10 10 80 80 80 80 80 80 80 80 4: 80 80 80 80 10 255 255 255 255 255 255 255 5: 80 80 80 80 255 10 255 255 255 255 255 255 6: 80 80 80 80 255 255 10 255 255 255 255 255 7: 80 80 80 80 255 255 255 10 255 255 255 255 8: 80 80 80 80 255 255 255 255 10 255 255 255 9: 80 80 80 80 255 255 255 255 255 10 255 255 10: 80 80 80 80 255 255 255 255 255 255 10 255 11: 80 80 80 80 255 255 255 255 255 255 255 10 Link: https://lkml.kernel.org/r/20250106120659.359610-2-bfaccini@nvidia.com Signed-off-by: Bruno Faccini Cc: David Hildenbrand Cc: John Hubbard Cc: Mike Rapoport (Microsoft) Cc: Zi Yan Signed-off-by: Andrew Morton drivers/acpi/numa/srat.c | 86 ++++++++++++++++++++++++++++++++++++++++++++ include/acpi/acpi_numa.h | 5 +++ include/linux/numa_memblks.h | 3 ++ mm/numa_emulation.c | 45 +++++++++++++++++++---- mm/numa_memblks.c | 2 +- 5 files changed, 133 insertions(+), 8 deletions(-) commit 5ec4333b1967cab7607bd9e863b47a81eb30b250 Author: SeongJae Park Date: Mon Jan 6 11:19:41 2025 -0800 mm/damon: remove DAMON debugfs interface It's time to remove DAMON debugfs interface, which has deprecated long before in February 2023. Read the cover letter of this patch series for more details. All documents and related tests are also removed. Finally remove the interface. Link: https://lkml.kernel.org/r/20250106191941.107070-9-sj@kernel.org Signed-off-by: SeongJae Park Cc: Alex Shi Cc: Brendan Higgins Cc: David Gow Cc: Hu Haowen <2023002089@link.tyut.edu.cn> Cc: Jonathan Corbet Cc: Rae Moar Cc: Shuah Khan Cc: Yanteng Si Signed-off-by: Andrew Morton mm/damon/Kconfig | 18 - mm/damon/Makefile | 1 - mm/damon/dbgfs.c | 1146 ----------------------------------------------------- 3 files changed, 1165 deletions(-) commit 4d047d4f8ab4bbbd0b017fb287fcdad083e081ea Author: SeongJae Park Date: Mon Jan 6 11:19:40 2025 -0800 mm/damon: remove DAMON debugfs interface kunit tests It's time to remove DAMON debugfs interface, which has deprecated long before in February 2023. Read the cover letter of this patch series for more details. Remove kunit tests for the interface, to prevent unnecessary test failures. Link: https://lkml.kernel.org/r/20250106191941.107070-8-sj@kernel.org Signed-off-by: SeongJae Park Cc: Alex Shi Cc: Brendan Higgins Cc: David Gow Cc: Hu Haowen <2023002089@link.tyut.edu.cn> Cc: Jonathan Corbet Cc: Rae Moar Cc: Shuah Khan Cc: Yanteng Si Signed-off-by: Andrew Morton mm/damon/Kconfig | 12 --- mm/damon/dbgfs.c | 2 - mm/damon/tests/.kunitconfig | 7 -- mm/damon/tests/dbgfs-kunit.h | 173 ------------------------------------------- 4 files changed, 194 deletions(-) commit d8a142058f39a32ae6c7cd5a786c656133c717fb Author: SeongJae Park Date: Mon Jan 6 11:19:39 2025 -0800 kunit: configs: remove configs for DAMON debugfs interface tests It's time to remove DAMON debugfs interface, which has deprecated long before in February 2023. Read the cover letter of this patch series for more details. Remove kernel configs for running DAMON debugfs interface kunit tests from the kunit all_tests configuration, to prevent unnecessary noises from tests. Link: https://lkml.kernel.org/r/20250106191941.107070-7-sj@kernel.org Signed-off-by: SeongJae Park Cc: Alex Shi Cc: Brendan Higgins Cc: David Gow Cc: Hu Haowen <2023002089@link.tyut.edu.cn> Cc: Jonathan Corbet Cc: Rae Moar Cc: Shuah Khan Cc: Yanteng Si Signed-off-by: Andrew Morton tools/testing/kunit/configs/all_tests.config | 3 --- 1 file changed, 3 deletions(-) commit 859de14931a6b2db02f6579a8c4c9bc34dd326e0 Author: SeongJae Park Date: Mon Jan 6 11:19:38 2025 -0800 selftests/damon: remove tests for DAMON debugfs interface It's time to remove DAMON debugfs interface, which has deprecated long before in February 2023. Read the cover letter of this patch series for more details. Remove selftests for the interface, to prevent causing unnecessary test failures. Link: https://lkml.kernel.org/r/20250106191941.107070-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Alex Shi Cc: Brendan Higgins Cc: David Gow Cc: Hu Haowen <2023002089@link.tyut.edu.cn> Cc: Jonathan Corbet Cc: Rae Moar Cc: Shuah Khan Cc: Yanteng Si Signed-off-by: Andrew Morton tools/testing/selftests/damon/.gitignore | 3 - tools/testing/selftests/damon/Makefile | 11 +-- tools/testing/selftests/damon/debugfs_attrs.sh | 17 ----- .../damon/debugfs_duplicate_context_creation.sh | 27 -------- .../selftests/damon/debugfs_empty_targets.sh | 21 ------ .../damon/debugfs_huge_count_read_write.sh | 22 ------ .../selftests/damon/debugfs_rm_non_contexts.sh | 19 ----- tools/testing/selftests/damon/debugfs_schemes.sh | 19 ----- .../testing/selftests/damon/debugfs_target_ids.sh | 19 ----- .../selftests/damon/debugfs_target_ids_pid_leak.c | 68 ------------------ .../selftests/damon/debugfs_target_ids_pid_leak.sh | 22 ------ ...debugfs_target_ids_read_before_terminate_race.c | 80 ---------------------- ...ebugfs_target_ids_read_before_terminate_race.sh | 14 ---- .../selftests/damon/huge_count_read_write.c | 46 ------------- 14 files changed, 1 insertion(+), 387 deletions(-) commit ce1d750282e6c886c0d1ad0a836b18cfac9d4c61 Author: SeongJae Park Date: Mon Jan 6 11:19:37 2025 -0800 selftests/damon/config: remove configs for DAMON debugfs interface selftests It's time to remove DAMON debugfs interface, which has deprecated long before in February 2023. Read the cover letter of this patch series for more details. Remove configs for selftests of it from DAMON selftests config file, to prevent unnecessary noises from the tests. [1] https://lore.kernel.org/20230209192009.7885-1-sj@kernel.org Link: https://lkml.kernel.org/r/20250106191941.107070-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Alex Shi Cc: Brendan Higgins Cc: David Gow Cc: Hu Haowen <2023002089@link.tyut.edu.cn> Cc: Jonathan Corbet Cc: Rae Moar Cc: Shuah Khan Cc: Yanteng Si Signed-off-by: Andrew Morton tools/testing/selftests/damon/config | 1 - 1 file changed, 1 deletion(-) commit 550b7af318e2eba5f94ec6fba17f3537f862ce23 Author: SeongJae Park Date: Mon Jan 6 11:19:36 2025 -0800 Docs/mm/damon/design: update for removal of DAMON debugfs interface It's time to remove DAMON debugfs interface, which has deprecated long before in February 2023. Read the cover letter of this patch series for more details. Update DAMON design documentation to stop mentioning about the interface, to avoid unnecessary confuses. Link: https://lkml.kernel.org/r/20250106191941.107070-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Alex Shi Cc: Brendan Higgins Cc: David Gow Cc: Hu Haowen <2023002089@link.tyut.edu.cn> Cc: Jonathan Corbet Cc: Rae Moar Cc: Shuah Khan Cc: Yanteng Si Signed-off-by: Andrew Morton Documentation/mm/damon/design.rst | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 38c433bc7e5ec7c340af9968fecf98754c299f76 Author: SeongJae Park Date: Mon Jan 6 11:19:35 2025 -0800 Docs/admin-guide/mm/damon/usage: remove DAMON debugfs interface documentation It's time to remove DAMON debugfs interface, which has deprecated long before in February 2023. Read the cover letter of this patch series for more details. Remove DAMON debugfs interface usage documentation, to avoid confusing users with documents for an already removed thing. Link: https://lkml.kernel.org/r/20250106191941.107070-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Alex Shi Cc: Brendan Higgins Cc: David Gow Cc: Hu Haowen <2023002089@link.tyut.edu.cn> Cc: Jonathan Corbet Cc: Rae Moar Cc: Shuah Khan Cc: Yanteng Si Signed-off-by: Andrew Morton Documentation/admin-guide/mm/damon/usage.rst | 309 --------------------------- 1 file changed, 309 deletions(-) commit 2a91cb2d2b33fa5b4e9bb8d9c5e27b475ea1142d Author: SeongJae Park Date: Mon Jan 6 11:19:34 2025 -0800 Docs/translations/*/admin-guide/mm/damon/usage: remove DAMON debugfs interface documentation Patch series "mm/damon: remove DAMON debugfs interface". DAMON debugfs interface was the only user interface of DAMON at the beginning[1]. However, it turned out the interface would be not good enough for long-term flexibility and stability. In Feb 2022[2], we therefore introduced DAMON sysfs interface as an alternative user interface that aims long-term flexibility and stability. With its introduction, DAMON debugfs interface has announced to be deprecated in near future. In Feb 2023[3], we announced the official deprecation of DAMON debugfs interface. In Jan 2024[4], we further made the deprecation difficult to be ignored. In Oct 2024[5], we posted an RFC version of this patch series as the last notice. And as of this writing, no problem or concerns about the removal plan have reported. Apparently users are already moved to the alternative, or made good plans for the change. Remove the DAMON debugfs interface code from the tree. Given the past timeline and the absence of reported problems or concerns, it is safe enough to be done. [1] https://lore.kernel.org/20210716081449.22187-1-sj38.park@gmail.com [2] https://lore.kernel.org/20220228081314.5770-1-sj@kernel.org [3] https://lore.kernel.org/20230209192009.7885-1-sj@kernel.org [4] https://lore.kernel.org/20240130013549.89538-1-sj@kernel.org [5] https://lore.kernel.org/20241015175412.60563-1-sj@kernel.org This patch (of 8): It's time to remove DAMON debugfs interface, which has deprecated long before in February 2023. Read the cover letter of this patch sereis for more details. Remove DAMON debugfs interface usage documentation and references to it from translations, to avoid confusing users with documents for already removed things. Link: https://lkml.kernel.org/r/20250106191941.107070-1-sj@kernel.org Link: https://lkml.kernel.org/r/20250106191941.107070-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Alex Shi Cc: Brendan Higgins Cc: David Gow Cc: Hu Haowen <2023002089@link.tyut.edu.cn> Cc: Jonathan Corbet Cc: Rae Moar Cc: Shuah Khan Cc: Yanteng Si Signed-off-by: Andrew Morton .../zh_CN/admin-guide/mm/damon/usage.rst | 248 +-------------------- .../zh_TW/admin-guide/mm/damon/usage.rst | 248 +-------------------- 2 files changed, 2 insertions(+), 494 deletions(-) commit f1de9e69f9679bff9de470124edc1678e9fc0632 Author: SeongJae Park Date: Mon Jan 6 11:34:01 2025 -0800 Docs/ABI/damon: document per-region DAMOS filter-passed bytes stat file Document the new ABI for per-region operations set layer-handled DAMOS filters passed bytes statistic. Link: https://lkml.kernel.org/r/20250106193401.109161-17-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/ABI/testing/sysfs-kernel-mm-damon | 7 +++++++ 1 file changed, 7 insertions(+) commit f423944bd7c28c37e8ecb8e08fc5b1c030932e98 Author: SeongJae Park Date: Mon Jan 6 11:34:00 2025 -0800 Docs/admin-guide/mm/damon/usage: document sz_filtered_out of scheme tried region directories Document the newly added DAMON sysfs interface file for per-scheme-tried region's bytes that passed the operations set handling DAMOS filters. Link: https://lkml.kernel.org/r/20250106193401.109161-16-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/admin-guide/mm/damon/usage.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 156845977bf0e736a7a534d7fdc2bd10e0b0cdba Author: SeongJae Park Date: Mon Jan 6 11:33:59 2025 -0800 Docs/mm/damon/design: document per-region sz_filter_passed stat Update 'Regions Walking' section of design document for the newly added per-region operations set handling DAMOS filters-passed bytes. Link: https://lkml.kernel.org/r/20250106193401.109161-15-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/mm/damon/design.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a2a60f9e5708f421446eb846217dad7f623c8d33 Author: SeongJae Park Date: Mon Jan 6 11:33:58 2025 -0800 mm/damon/sysfs-schemes: expose per-region filter-passed bytes Per-region operations set-handled DAMOS filters passed memory size information is provided to only DAMON core API users. Further expose it to the user space by adding a new DAMON sysfs interface file under each scheme tried region directory. Link: https://lkml.kernel.org/r/20250106193401.109161-14-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/sysfs-common.h | 2 +- mm/damon/sysfs-schemes.c | 19 ++++++++++++++++++- mm/damon/sysfs.c | 3 ++- 3 files changed, 21 insertions(+), 3 deletions(-) commit cfc33a7d2daca4455ef3ebae63a2e89bd9bb0ebe Author: SeongJae Park Date: Mon Jan 6 11:33:57 2025 -0800 mm/damon/core: pass per-region filter-passed bytes to damos_walk_control->walk_fn() Total size of memory that passed DAMON operations set layer-handled DAMOS filters per scheme is provided to DAMON core API and ABI (sysfs interface) users. Having it per-region in non-accumulated way can provide it in finer granularity. Provide it to damos_walk() core API users, by passing the data to damos_walk_control->walk_fn(). Link: https://lkml.kernel.org/r/20250106193401.109161-13-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton include/linux/damon.h | 2 +- mm/damon/core.c | 7 ++++--- mm/damon/sysfs.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) commit e1a1d377e486b097343575e3b8a499f191447e1e Author: SeongJae Park Date: Mon Jan 6 11:33:56 2025 -0800 Docs/ABI/damon: document per-scheme filter-passed bytes stat file Document the new ABI for per-scheme operations set layer-handled DAMOS filters passed bytes statistic on the ABI document. Link: https://lkml.kernel.org/r/20250106193401.109161-12-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/ABI/testing/sysfs-kernel-mm-damon | 6 ++++++ 1 file changed, 6 insertions(+) commit 6bbdb28d88bacf12102d5cccf878cfc6c432aa20 Author: SeongJae Park Date: Mon Jan 6 11:33:55 2025 -0800 Docs/admin-guide/mm/damon/usage: document sz_ops_filter_passed Document the new per-scheme operations set layer-handled DAMOS filters passed bytes statistic file on DAMON sysfs interface usage document. Link: https://lkml.kernel.org/r/20250106193401.109161-11-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/admin-guide/mm/damon/usage.rst | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 0f0a0bfd07386e52c77192b0e6cd44903102c559 Author: SeongJae Park Date: Mon Jan 6 11:33:54 2025 -0800 Docs/mm/damon/design: document sz_ops_filter_passed Document the new per-scheme accumulated stat for total bytes that passed the operations set layer-handled DAMOS filters on the design document. Link: https://lkml.kernel.org/r/20250106193401.109161-10-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/mm/damon/design.rst | 2 ++ 1 file changed, 2 insertions(+) commit 9caac9d55fa6d90d0f95000fa8ed424c151421e3 Author: SeongJae Park Date: Mon Jan 6 11:33:53 2025 -0800 mm/damon/syfs-schemes: implement per-scheme filter-passed bytes stat Add a new DAMON sysfs interface file under scheme stat directory, namely 'sz_ops_filter_passed'. It represents total bytes that passed region-internal DAMOS filters of the scheme that handled by the DAMON operations set layer. Link: https://lkml.kernel.org/r/20250106193401.109161-9-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/sysfs-schemes.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 60fa9355a6c620f7b727d3fdb433fb6cf714a9b0 Author: SeongJae Park Date: Mon Jan 6 11:33:52 2025 -0800 mm/damon/core: implement per-scheme ops-handled filter-passed bytes stat Implement a new per-DAMOS scheme statistic field, namely sz_ops_filter_passed, using the changed damon_operations->apply_scheme() interface. It counts total bytes of memory that given DAMOS action tried to be applied, and passed the operations layer handled region-internal filters of the scheme. DAMON API users can access it using DAMON-internal safe access features such as damon_call() and/or damos_walk(). Link: https://lkml.kernel.org/r/20250106193401.109161-8-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton include/linux/damon.h | 3 +++ mm/damon/core.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit c0cb9d91bf297fdcd3bd3126d793a22e720e1990 Author: SeongJae Park Date: Mon Jan 6 11:33:51 2025 -0800 mm/damon/paddr: report filter-passed bytes back for DAMOS_STAT action DAMOS_STAT action handling of paddr DAMON operations set implementation is simply ignoring the region-internal DAMOS filters, and therefore not reporting back the filter-passed bytes. Apply the filters and report back the information. Before this change, DAMOS_STAT was doing nothing for DAMOS filters. Hence users might see some performance regressions. Such regression for use cases where no region-internal DAMOS filter is added to the scheme will be negligible, since this change avoids unnecessary filtering works if no such filter is installed. For old users who are using DAMOS_STAT with the types of filters, the regression could be visible depending on the size of the region and the overhead of the installed DAMOS filters. But, because the filters were completely ignored before in the use case, no real users would really depend on such use case that makes no point. Link: https://lkml.kernel.org/r/20250106193401.109161-7-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/paddr.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 96f1971dabca714f0dd0894a856d6a959c3a851b Author: SeongJae Park Date: Mon Jan 6 11:33:50 2025 -0800 mm/damon/paddr: report filter-passed bytes back for normal actions damon_operations->apply_scheme() implementations are requested to report back how many bytes of the given region has passed DAMOS filter. 'paddr' operations set implementation supports some of region-internal DAMOS filter handling for normal DAMOS actions except DAMOS_STAT action. But, those are not respecting the request. Report the region-internal DAMOS filter-passed bytes back for the actions. Link: https://lkml.kernel.org/r/20250106193401.109161-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/paddr.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit b5bbe9c08fd1519f96832b82256543a567ce2900 Author: SeongJae Park Date: Mon Jan 6 11:33:49 2025 -0800 mm/damon: ask apply_scheme() to report filter-passed region-internal bytes Some DAMOS filter types including those for young page, anon page, and belonging memcg are handled by underlying DAMON operations set implementation, via damon_operations->apply_scheme() interface. How many bytes of the region have passed the filter can be useful for DAMOS scheme tuning and access pattern monitoring. Modify the interface to let the callback implementation reports back the number if possible. Link: https://lkml.kernel.org/r/20250106193401.109161-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton include/linux/damon.h | 5 +++-- mm/damon/core.c | 4 +++- mm/damon/paddr.c | 2 +- mm/damon/vaddr.c | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) commit fc4e40937dcd457adfd529c51be0ac7e20845020 Author: SeongJae Park Date: Mon Jan 6 11:33:48 2025 -0800 Docs/admin-guide/mm/damon/usage: link damos stat design doc DAMON sysfs usage document focuses on usage, rather than the detail of the stat metric itself. Add a link to the design document on DAMOS stat usage section. Link: https://lkml.kernel.org/r/20250106193401.109161-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/admin-guide/mm/damon/usage.rst | 3 ++- Documentation/mm/damon/design.rst | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 10418f263a5c789417da62b969ca15de3e78bc1f Author: SeongJae Park Date: Mon Jan 6 11:33:47 2025 -0800 Docs/mm/damon/design: add 'statistics' section DAMOS stats are important feature for tuning of DAMOS-based access-aware system operation, and efficient access pattern monitoring. But not well documented on the design document. Add a section on the document. Link: https://lkml.kernel.org/r/20250106193401.109161-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/mm/damon/design.rst | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 626ffabe67c2359f3a88bb61fdc83a6280ef16e9 Author: SeongJae Park Date: Mon Jan 6 11:33:46 2025 -0800 mm/damon: clarify trying vs applying on damos_stat kernel-doc comment Patch series "mm/damon: enable page level properties based monitoring". TL; DR ====== This patch series enables access monitoring based on page level properties including their anonymousness, belonging cgroups and young-ness, by extending DAMOS stats and regions walk features with region-internal DAMOS filters. Background ========== DAMOS has initially developed for only access-aware system operations. But, efficient acces monitoring results querying is yet another major usage of today's DAMOS. DAMOS stats and regions walk, which exposes accumulated counts and per-region monitoring results that filtered by DAMOS parameters including target access pattern, quotas and DAMOS filters, are the key features for that usage. For tunings and investigations, it can be more useful if only the information can be exposed without making real system operational change. Special DAMOS action, DAMOS_STAT, was introduced for the purpose. DAMOS fundametally works with only access pattern information in region granularity. For some use cases, fixed and fine granularity information based on non access pattern properties can be useful, though. For example, on systems having swap devices that much faster than storage devices for files, DAMOS-based proactive reclaim need to be applied differently for anonymous pages and file-backed pages. DAMOS filters is a feature that makes it possible. It supports non access pattern information including page level properties such as anonymousness, belonging cgroups, and young-ness (whether the page has accessed since the last access check of it). The information can be useful for tuning and investigations. DAMOS stat exposes some of it via {nr,sz}_applied, but it is mixed with operation failures. Also, exposing the information without making system operation change is impossible, since DAMOS_STAT simply ignores the page level properties based DAMOS filters. Design ====== Expose the exact information for every DAMOS action including DAMOS_STAT by implementing below changes. Extend the interface for DAMON operations set layer, which contains the implementation of the page level filters, to report back the amount of memory that passed the region-internal DAMOS filters to the core layer. On the core layer, account the operations set layer reported stat with DAMOS stat for per-scheme monitoring. Also, pass the information to regions walk for per-region monitoring. In this way, DAMON API users can efficiently get the fine-grained information. For the user-space, make DAMON sysfs interface collects the information using the updated DAMON core API, and expose those to new per-scheme stats file and per-DAMOS-tried region properties file. Practical Usages ================ With this patch series, DAMON users can query how many bytes of regions of specific access temperature is backed by pages of specific type. The type can be any of DAMOS filter-supporting one, including anonymousness, belonging cgroups, and young-ness. For example, users can visualize access hotness-based page granulairty histogram for different cgroups, backing content type, or youngness. In future, it could be extended to more types such as whether it is THP, position on LRU lists, etc. This can be useful for estimating benefits of a new or an existing access-aware system optimizations without really committing the changes. Patches Sequence ================ The patches are constructed in four sub-sequences. First three patches (patches 1-3) update documents to have missing background knowledges and better structures for easily introducing followup changes. Following three patches (patches 4-6) change the operations set layer interface to report back the region-internal filter passed memory size, and make the operations set implementations support the changed symantic. Following five patches (patches 7-11) implement per-scheme accumulated stat for region-internal filter-passed memory size on core API (damos_stat) and DAMON sysfs interface. First two patches of those are for code change, and following three patches are for documentation. Finally, five patches (patches 12-16) implementing per-region region-internal filter-passed memory size follows. Similar to that for per-scheme stat, first two patches implement core-API and sysfs interface change. Then three patches for documentation update follow. This patch (of 16): DAMOS stat kernel-doc documentation is using terms that bit ambiguous. Without reading the code, understanding it correctly is not that easy. Add the clarification on the kernel-doc comment. Link: https://lkml.kernel.org/r/20250106193401.109161-1-sj@kernel.org Link: https://lkml.kernel.org/r/20250106193401.109161-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton include/linux/damon.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit ee14cbc6f8a3015ee11602b15fdc6e42d298a1a6 Author: SeongJae Park Date: Fri Jan 3 09:44:00 2025 -0800 mm/damon/sysfs: remove unused code for schemes tried regions update DAMON sysfs interface was using damon_callback with its own complicated synchronization logics to update DAMOS scheme applied regions directories and files. But it is replaced to use damos_walk(), and the additional synchronization logics are no more being used. Remove those. Link: https://lkml.kernel.org/r/20250103174400.54890-11-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/sysfs-common.h | 10 --- mm/damon/sysfs-schemes.c | 204 ----------------------------------------------- mm/damon/sysfs.c | 70 +--------------- 3 files changed, 2 insertions(+), 282 deletions(-) commit 66178e4ec30a67777f3795dc59a891b106cdb4db Author: SeongJae Park Date: Fri Jan 3 09:43:59 2025 -0800 mm/damon/sysfs: use damos_walk() for update_schemes_tried_{bytes,regions} DAMON sysfs interface uses damon_callback with its own complicated synchronization facility to handle update_schemes_tried_bytes and update_schemes_tried_regions commands. But damos_walk() can support the use case without the additional synchronizations. Convert the code to use damos_walk() instead. Link: https://lkml.kernel.org/r/20250103174400.54890-10-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/sysfs-common.h | 5 +++++ mm/damon/sysfs-schemes.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ mm/damon/sysfs.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+) commit cce0b334c3108b49b0d550c387cde949b6788f22 Author: SeongJae Park Date: Fri Jan 3 09:43:58 2025 -0800 Docs/mm/damon/design: document DAMOS regions walking DAMOS' regions walking is a feature for efficiently retrieving monitoring results or DAMOS-internal behavior. It can be useful for multiple purposes including investigations and tuning. Add a section for it on the design document. Link: https://lkml.kernel.org/r/20250103174400.54890-9-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Documentation/mm/damon/design.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) commit bf0eaba0ff9c9c8e6fd58ddfa1a8b6df4b813f61 Author: SeongJae Park Date: Fri Jan 3 09:43:57 2025 -0800 mm/damon/core: implement damos_walk() Introduce a new core layer interface, damos_walk(). It aims to replace some damon_callback usages that access DAMOS schemes applied regions of ongoing kdamond with additional synchronizations. It receives a function pointer and asks kdamond to invoke it for any region that it tried to apply any DAMOS action within one scheme apply interval for every scheme of it. The function further waits until the kdamond finishes the invocations for every scheme, or cancels the request, and returns. The kdamond invokes the function as requested within the main loop. If it is deactivated by DAMOS watermarks or going out of the main loop, it marks the request as canceled, so that damos_walk() can wakeup and return. Link: https://lkml.kernel.org/r/20250103174400.54890-8-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton include/linux/damon.h | 33 ++++++++++++- mm/damon/core.c | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+), 2 deletions(-) commit 9a5aa3349b9428ae451b22c331d0d9a9cfc7ac90 Author: SeongJae Park Date: Fri Jan 3 09:43:56 2025 -0800 mm/damon/sysfs: use damon_call() for update_schemes_effective_quotas DAMON sysfs interface uses damon_callback with its own synchronization facility to handle update_schemes_effective_quotas command. But damon_call() can support the use case without the additional synchronizations. Convert the code to use damon_call() instead. Link: https://lkml.kernel.org/r/20250103174400.54890-7-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/sysfs.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 60d2c527bd3a44faa848a7feb3d29307e28cc8cb Author: SeongJae Park Date: Fri Jan 3 09:43:55 2025 -0800 mm/damon/sysfs: use damon_call() for commit_schemes_quota_goals DAMON sysfs interface uses damon_callback with its own synchronization facility to handle commit_schemes_quota_goals command. But damon_call() can support the use case without the additional synchronizations. Convert the code to use damon_call() instead. Link: https://lkml.kernel.org/r/20250103174400.54890-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/sysfs.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit f64539dcdb87111f98a899b72753613535a05484 Author: SeongJae Park Date: Fri Jan 3 09:43:54 2025 -0800 mm/damon/sysfs: use damon_call() for update_schemes_stats DAMON sysfs interface uses damon_callback with its own synchronization facility to handle update_schemes_stats kdamond command. But damon_call() can support the use case without the additional synchronizations. Convert the code to use damon_call() instead. Link: https://lkml.kernel.org/r/20250103174400.54890-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/sysfs.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit 42b7491af14cbba2393329ce43d508a957bd94fa Author: SeongJae Park Date: Fri Jan 3 09:43:53 2025 -0800 mm/damon/core: introduce damon_call() Introduce a new DAMON core API function, damon_call(). It aims to replace some damon_callback usages that access damon_ctx of ongoing kdamond with additional synchronizations. It receives a function pointer, let the parallel kdamond invokes the function, and returns after the invocation is finished, or canceled due to some races. kdamond invokes the function inside the main loop after sampling is done. If it is deactivated by DAMOS watermarks or already out of the main loop, mark the request as canceled so that damon_call() can wakeup and return. Link: https://lkml.kernel.org/r/20250103174400.54890-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton include/linux/damon.h | 26 ++++++++++++++++ mm/damon/core.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) commit 0f3e40eb5ec17949ad6053ed057735e1a33079f7 Author: SeongJae Park Date: Fri Jan 3 09:43:52 2025 -0800 mm/damon/sysfs: handle clear_schemes_tried_regions from DAMON sysfs context DAMON sysfs interface handles clear_schemes_tried_regions request from the DAMON callback context (damon_sysfs_cmd_request_callback()), which is designed to be used for safe access to the related DAMON context internal data. But no DAMON context internal data is accessed for the work. Directly handle it from DAMON sysfs interface context, namely damon_sysfs_handle_cmd(). Link: https://lkml.kernel.org/r/20250103174400.54890-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/sysfs-schemes.c | 2 +- mm/damon/sysfs.c | 17 +++-------------- 2 files changed, 4 insertions(+), 15 deletions(-) commit e035320fd38efcfdb77e7e1d1ab5b92449c1c2b5 Author: SeongJae Park Date: Fri Jan 3 09:43:51 2025 -0800 mm/damon/sysfs-schemes: remove unnecessary schemes existence check in damon_sysfs_schemes_clear_regions() Patch series "mm/damon: replace most damon_callback usages in sysfs with new core functions". DAMON provides damon_callback API that notifies monitoring events and allows safe access to damon_ctx internal data. The usage is simple. Users register and deregister callback functions for different monitoring events in damon_ctx. Then the DAMON worker thread (kdamond) of the damon_ctx calls back the registered functions on the events. It is designed in such simple way because it was sufficient for usages of DAMON at the early days. We also wanted to make it flexible so that API user code can implement any required additional features on top of damon_callback on their demands. As expected, more sophisticated usages have invented. Online updates of DAMON parameters and DAMOS auto-tuning inputs, and online retrieval of DAMOS statistics and tried regions information are such usages. Because damon_callback doesn't provide any explicit synchronization mechanism, the user ABIs for exposing such functionalities are implemented in asynchronous ways (DAMON_RECLAIM and DAMON_LRU_SORT}), or synchronous ways (DAMON_SYSFS) with additional synchronization mechanisms that built inside the ABI implementation, on top of damon_callback. So damon_callback is working as expected. However, the additional mechanisms built inside ABI on top of damon_callback is becoming somewhat too big and not easy to maintain. The additional mechanisms can be smaller and easier to maintain when implemented inside the core logic layer. Introduce two new DAMON core API, namely 'damon_call()' and 'damos_walk()'. The two functions support synchronous access to - damon_ctx internal data including DAMON parameters and monitoring results, and - DAMOS-specific data such as regions that each DAMOS action is applied, respectively. And replace most of damon_callback usages in DAMON sysfs interface with the new core API functions. damon_callback usage for online DAMON parameters tuning is not replaced in this series, since it has specific callback timing assumptions that require more works. Patch sequence ============== First two patches are fixups for simplifying the following changes. Those remove a unnecessary condition check and a synchronization, respectively. Third patch implements one of the new DAMON core APIs, namely damon_call(). Three patches replacing damon_callback usages in DAMON sysfs interface using damon_call() follow. Then, seventh and eighth patches introduces the other new DAMON API, damos_walk(), and document it on the design doc. Ninth patch replaces two damon_callback usages in DAMON sysfs interface using damos_walk(). The tenth patch finally cleans up code that no more being used. This patch (of 10): damon_sysfs_schemes_clear_regions() skips removing the scheme tried region directories only if the matching scheme is still ongoing. It is unnecessary check, since what users want is just removing the entire region directories. Remove the unnecessary check. Link: https://lkml.kernel.org/r/20250103174400.54890-1-sj@kernel.org Link: https://lkml.kernel.org/r/20250103174400.54890-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton mm/damon/sysfs-common.h | 3 +-- mm/damon/sysfs-schemes.c | 16 +++++----------- mm/damon/sysfs.c | 2 +- 3 files changed, 7 insertions(+), 14 deletions(-) commit d95936a2267c11a38917d5fc7bf3862a64fe13d8 Author: Kevin Brodsky Date: Fri Jan 3 18:44:15 2025 +0000 mm: introduce ctor/dtor at PGD level Following on from the introduction of P4D-level ctor/dtor, let's finish the job and introduce ctor/dtor at PGD level. The incurred improvement in page accounting is minimal - the main motivation is to create a single, generic place where construction/destruction hooks can be added for all page table pages. This patch should cover all architectures and all configurations where PGDs are one or more regular pages. This excludes any configuration where PGDs are allocated from a kmem_cache object. Link: https://lkml.kernel.org/r/20250103184415.2744423-7-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Acked-by: Dave Hansen Acked-by: Qi Zheng Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Ingo Molnar Cc: Linus Walleij Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Peter Zijlstra Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton arch/m68k/include/asm/mcf_pgalloc.h | 3 ++- arch/m68k/mm/motorola.c | 6 ++++-- arch/s390/include/asm/pgalloc.h | 9 ++++++++- include/asm-generic/pgalloc.h | 3 ++- include/linux/mm.h | 5 +++++ 5 files changed, 21 insertions(+), 5 deletions(-) commit a9b3c355c2e6388b0a3b67627460a516d88bdbc9 Author: Kevin Brodsky Date: Fri Jan 3 18:44:14 2025 +0000 asm-generic: pgalloc: provide generic __pgd_{alloc,free} We already have a generic implementation of alloc/free up to P4D level, as well as pgd_free(). Let's finish the work and add a generic PGD-level alloc helper as well. Unlike at lower levels, almost all architectures need some specific magic at PGD level (typically initialising PGD entries), so introducing a generic pgd_alloc() isn't worth it. Instead we introduce two new helpers, __pgd_alloc() and __pgd_free(), and make use of them in the arch-specific pgd_alloc() and pgd_free() wherever possible. To accommodate as many arch as possible, __pgd_alloc() takes a page allocation order. Because pagetable_alloc() allocates zeroed pages, explicit zeroing in pgd_alloc() becomes redundant and we can get rid of it. Some trivial implementations of pgd_free() also become unnecessary once __pgd_alloc() is used; remove them. Another small improvement is consistent accounting of PGD pages by using GFP_PGTABLE_{USER,KERNEL} as appropriate. Not all PGD allocations can be handled by the generic helpers. In particular, multiple architectures allocate PGDs from a kmem_cache, and those PGDs may not be page-sized. Link: https://lkml.kernel.org/r/20250103184415.2744423-6-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Acked-by: Dave Hansen Acked-by: Qi Zheng Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Ingo Molnar Cc: Linus Walleij Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Peter Zijlstra Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton arch/alpha/mm/init.c | 2 +- arch/arc/include/asm/pgalloc.h | 9 ++------- arch/arm/mm/pgd.c | 8 +++----- arch/arm64/mm/pgd.c | 4 ++-- arch/csky/include/asm/pgalloc.h | 2 +- arch/hexagon/include/asm/pgalloc.h | 2 +- arch/loongarch/mm/pgtable.c | 7 +++---- arch/m68k/include/asm/sun3_pgalloc.h | 2 +- arch/microblaze/include/asm/pgalloc.h | 7 +------ arch/mips/include/asm/pgalloc.h | 6 ------ arch/mips/mm/pgtable.c | 8 +++----- arch/nios2/mm/pgtable.c | 3 ++- arch/openrisc/include/asm/pgalloc.h | 6 ++---- arch/parisc/include/asm/pgalloc.h | 16 +--------------- arch/riscv/include/asm/pgalloc.h | 3 +-- arch/um/kernel/mem.c | 7 +++---- arch/x86/mm/pgtable.c | 24 +++++++++++------------- arch/xtensa/include/asm/pgalloc.h | 2 +- include/asm-generic/pgalloc.h | 27 ++++++++++++++++++++++++++- 19 files changed, 65 insertions(+), 80 deletions(-) commit 94771023712a65a11a8fed5ba395a26b0f2588f4 Author: Kevin Brodsky Date: Fri Jan 3 18:44:13 2025 +0000 ARM: mm: rename PGD helpers Generic implementations of __pgd_alloc and __pgd_free are about to be introduced. Rename the macros in arch/arm/mm/pgd.c to avoid clashes. While we're at it, also pass down the mm as argument to those helpers, as it will be needed to call the generic __pgd_{alloc,free}. Link: https://lkml.kernel.org/r/20250103184415.2744423-5-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Acked-by: Dave Hansen Acked-by: Qi Zheng Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Ingo Molnar Cc: Linus Walleij Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Peter Zijlstra Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton arch/arm/mm/pgd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 1879688e5c423a0f58b687b4b5be61e1bc81f46c Author: Kevin Brodsky Date: Fri Jan 3 18:44:12 2025 +0000 m68k: mm: add calls to pagetable_pmd_[cd]tor get_pointer_table() and free_pointer_table() already special-case TABLE_PTE to call pagetable_pte_[cd]tor. Let's do the same at PMD level to improve accounting further. TABLE_PGD and TABLE_PMD are currently defined to the same value, so we first need to separate them. That also implies separating ptable_list for PMD/PGD levels. Link: https://lkml.kernel.org/r/20250103184415.2744423-4-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Acked-by: Dave Hansen Acked-by: Qi Zheng Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Ingo Molnar Cc: Linus Walleij Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Peter Zijlstra Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton arch/m68k/include/asm/motorola_pgalloc.h | 6 +++--- arch/m68k/mm/motorola.c | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) commit 3565522e15eb2f3dc312d01cd11ab7651f1721a8 Author: Kevin Brodsky Date: Fri Jan 3 18:44:11 2025 +0000 parisc: mm: ensure pagetable_pmd_[cd]tor are called The implementation of pmd_{alloc_one,free} on parisc requires a non-zero allocation order, but is completely standard aside from that. Let's reuse the generic implementation of pmd_alloc_one(). Explicit zeroing is not needed as GFP_PGTABLE_KERNEL includes __GFP_ZERO. The generic pmd_free() can handle higher allocation orders so we don't need to define our own. These changes ensure that pagetable_pmd_[cd]tor are called, improving the accounting of page table pages. Link: https://lkml.kernel.org/r/20250103184415.2744423-3-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Acked-by: Dave Hansen Acked-by: Qi Zheng Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Ingo Molnar Cc: Linus Walleij Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Peter Zijlstra Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton arch/parisc/include/asm/pgalloc.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 11e2400b21a3e2dfbc95e31a9a849a30191f7a92 Author: Kevin Brodsky Date: Fri Jan 3 18:44:10 2025 +0000 mm: move common part of pagetable_*_ctor to helper Patch series "Account page tables at all levels". This series should be considered in conjunction with Qi's series [1]. Together, they ensure that page table ctor/dtor are called at all levels (PTE to PGD) and all architectures, where page tables are regular pages. Besides the improvement in accounting and general cleanup, this also create a single place where construction/destruction hooks can be called for all page tables, namely the now-generic pagetable_dtor() introduced by Qi, and __pagetable_ctor() introduced in this series. [1] https://lore.kernel.org/linux-mm/cover.1735549103.git.zhengqi.arch@bytedance.com/ This patch (of 6): pagetable_*_ctor all have the same basic implementation. Move the common part to a helper to reduce duplication. Link: https://lkml.kernel.org/r/20250103184415.2744423-1-kevin.brodsky@arm.com Link: https://lkml.kernel.org/r/20250103184415.2744423-2-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Acked-by: Dave Hansen Acked-by: Qi Zheng Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Linus Walleij Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Peter Zijlstra Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Will Deacon Cc: Ingo Molnar Signed-off-by: Andrew Morton include/linux/mm.h | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit fe1679ed02bc24d88918c555dd9e5d95ddb03ab1 Author: Lorenzo Stoakes Date: Fri Jan 3 19:35:36 2025 +0000 mm/debug: prefer VM_WARN_ON_VMG() to report VMG debug warnings Now we have VM_WARN_ON_VMG() to provide us with considerably more debug output when a debug assert fails, utilise it everywhere we can. This allows us to have considerably more information to go on when things go wrong, especially when a non-repro issue occurs as reported by syzkaller or the like. Link: https://lkml.kernel.org/r/986e45e9549e71284ac7a7fa878688568a94d58b.1735932169.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Cc: David Hildenbrand Cc: Jann Horn Cc: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/vma.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit b0d66d82fce60161de6f3d57f87016c3a6f7a121 Author: Lorenzo Stoakes Date: Fri Jan 3 19:35:35 2025 +0000 mm/debug: introduce VM_WARN_ON_VMG() to dump VMA merge state Patch series "mm/debug: introduce and use VM_WARN_ON_VMG()". We use a number of asserts, enabled only when CONFIG_DEBUG_VM is set, during VMA merge operations to ensure state is as expected. However, when syzkaller or the like encounters these asserts, often the information provided by the report is insufficient to narrow down what the problem is. We noticed this recently in [0], where a non-repro issue resisted debugging due to simply not having sufficient information to go on. This series improves the situation by providing VM_WARN_ON_VMG() which acts like VM_WARN_ON() (i.e. only actually being invoked if CONFIG_DEBUG_VM is set), while dumping significant information about the VMA merge state, the mm_struct describing the virtual address space, all associated VMAs and, if CONFIG_DEBUG_VM_MAPLE_TREE is set, the associated maple tree. [0]:https://lore.kernel.org/all/6774c98f.050a0220.25abdd.0991.GAE@google.com/ This patch (of 2): We use a number of asserts, enabled only when CONFIG_DEBUG_VM is set, during VMA merge operations to ensure state is as expected. However, when syzkaller or the like encounters these asserts, often the information provided by the report is insufficient to narrow down what the problem is. This might not be so much of an issue if the reported problem is reproducible, but if it is a rarely encountered race or some other case which precludes a repro, it is a very big problem (see [0] for the motivating case). It is therefore sensible to provide a means by which we can easily and conveniently dump a lot more information in these circumstances. The aggregation of merge state into a single struct threaded through the operation makes this trivial - we can simply introduce a variant on VM_WARN_ON() which takes the VMA merge state object (vmg) and use that to dump information. This patch therefore introduces VM_WARN_ON_VMG() which provides this functionality. It additionally dumps full mm state, VMA state for each of the three VMAs the vmg contains (prev, next, vma) and if CONFIG_DEBUG_VM_MAPLE_TREE is enabled, dumps the maple tree from the provided VMA iterator if non-NULL. This patch has no functional impact if CONFIG_DEBUG_VM is not set. [0]:https://lore.kernel.org/all/6774c98f.050a0220.25abdd.0991.GAE@google.com/ Link: https://lkml.kernel.org/r/cover.1735932169.git.lorenzo.stoakes@oracle.com Link: https://lkml.kernel.org/r/13b09b52d4d103ee86acaf0ae612539648ae29e0.1735932169.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Cc: David Hildenbrand Cc: Jann Horn Cc: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Signed-off-by: Andrew Morton include/linux/mmdebug.h | 14 +++++++++- mm/debug.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 1 deletion(-) commit 30cee1e4861b59200aa09c94a4d789c461e5f408 Author: Maninder Singh Date: Mon Dec 30 15:40:43 2024 +0530 lib/list_debug.c: add object information in case of invalid object As of now during link list corruption it prints about cluprit address and its wrong value, but sometime it is not enough to catch the actual issue point. If it prints allocation and free path of that corrupted node, it will be a lot easier to find and fix the issues. Adding the same information when data mismatch is found in link list debug data: [ 14.243055] slab kmalloc-32 start ffff0000cda19320 data offset 32 pointer offset 8 size 32 allocated at add_to_list+0x28/0xb0 [ 14.245259] __kmalloc_cache_noprof+0x1c4/0x358 [ 14.245572] add_to_list+0x28/0xb0 ... [ 14.248632] do_el0_svc_compat+0x1c/0x34 [ 14.249018] el0_svc_compat+0x2c/0x80 [ 14.249244] Free path: [ 14.249410] kfree+0x24c/0x2f0 [ 14.249724] do_force_corruption+0xbc/0x100 ... [ 14.252266] el0_svc_common.constprop.0+0x40/0xe0 [ 14.252540] do_el0_svc_compat+0x1c/0x34 [ 14.252763] el0_svc_compat+0x2c/0x80 [ 14.253071] ------------[ cut here ]------------ [ 14.253303] list_del corruption. next->prev should be ffff0000cda192a8, but was 6b6b6b6b6b6b6b6b. (next=ffff0000cda19348) [ 14.254255] WARNING: CPU: 3 PID: 84 at lib/list_debug.c:65 __list_del_entry_valid_or_report+0x158/0x164 Moved prototype of mem_dump_obj() to bug.h, as mm.h can not be included in bug.h. Link: https://lkml.kernel.org/r/20241230101043.53773-1-maninder1.s@samsung.com Signed-off-by: Maninder Singh Acked-by: Jan Kara Cc: Al Viro Cc: Christian Brauner Cc: Marco Elver Cc: Rohit Thapliyal Signed-off-by: Andrew Morton fs/open.c | 2 +- fs/super.c | 2 +- include/linux/bug.h | 10 +++++++++- include/linux/mm.h | 6 ------ lib/list_debug.c | 22 +++++++++++----------- 5 files changed, 22 insertions(+), 20 deletions(-) commit 553e77529fb61e5520b839a0ce412a46cba996e0 Author: Qi Zheng Date: Wed Jan 8 14:57:33 2025 +0800 mm: pgtable: introduce generic pagetable_dtor_free() The pte_free(), pmd_free(), __pud_free() and __p4d_free() in asm-generic/pgalloc.h and the generic __tlb_remove_table() are basically the same, so let's introduce pagetable_dtor_free() to deduplicate them. In addition, the pagetable_dtor_free() in s390 does the same thing, so let's s390 also calls generic pagetable_dtor_free(). Link: https://lkml.kernel.org/r/1663a0565aca881d1338ceb7d1db4aa9c333abd6.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Suggested-by: Peter Zijlstra (Intel) Reviewed-by: Kevin Brodsky Acked-by: Alexander Gordeev [s390] Cc: Alexandre Ghiti Cc: Alexandre Ghiti Cc: Andreas Larsson Cc: Aneesh Kumar K.V (Arm) Cc: Arnd Bergmann Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton arch/s390/mm/pgalloc.c | 6 ------ include/asm-generic/pgalloc.h | 12 ++++-------- include/asm-generic/tlb.h | 3 +-- include/linux/mm.h | 6 ++++++ 4 files changed, 11 insertions(+), 16 deletions(-) commit e74e1731012036d06505ce10eda2141d0fd8a90d Author: Qi Zheng Date: Wed Jan 8 14:57:32 2025 +0800 mm: pgtable: move __tlb_remove_table_one() in x86 to generic file The __tlb_remove_table_one() in x86 does not contain architecture-specific content, so move it to the generic file. Link: https://lkml.kernel.org/r/aab8a449bc67167943fd2cb5aab0a3a23b7b1cd7.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Reviewed-by: Kevin Brodsky Cc: Alexander Gordeev Cc: Alexandre Ghiti Cc: Alexandre Ghiti Cc: Andreas Larsson Cc: Aneesh Kumar K.V (Arm) Cc: Arnd Bergmann Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Peter Zijlstra (Intel) Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton arch/x86/include/asm/tlb.h | 19 ------------------- mm/mmu_gather.c | 20 ++++++++++++++++++-- 2 files changed, 18 insertions(+), 21 deletions(-) commit 92ec7fd136a1f900656bbf6788e15127529e5387 Author: Qi Zheng Date: Wed Jan 8 14:57:31 2025 +0800 mm: pgtable: completely move pagetable_dtor() to generic tlb_remove_table() For the generic tlb_remove_table(), it is implemented in the following two forms: 1) CONFIG_MMU_GATHER_TABLE_FREE is enabled tlb_remove_table --> generic __tlb_remove_table() 2) CONFIG_MMU_GATHER_TABLE_FREE is disabled tlb_remove_table --> tlb_remove_page For case 1), the pagetable_dtor() has already been moved to generic __tlb_remove_table(). For case 2), now only arm will call tlb_remove_table()/tlb_remove_ptdesc() when CONFIG_MMU_GATHER_TABLE_FREE is disabled. Let's move pagetable_dtor() completely to generic tlb_remove_table(), so that the architectures can follow more easily. Link: https://lkml.kernel.org/r/0c733ac867b287ec08190676496d1decebf49da2.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Suggested-by: Kevin Brodsky Reviewed-by: Kevin Brodsky Cc: Alexander Gordeev Cc: Alexandre Ghiti Cc: Alexandre Ghiti Cc: Andreas Larsson Cc: Aneesh Kumar K.V (Arm) Cc: Arnd Bergmann Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Peter Zijlstra (Intel) Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton arch/arm/include/asm/tlb.h | 4 ---- include/asm-generic/tlb.h | 10 ++++++++-- 2 files changed, 8 insertions(+), 6 deletions(-) commit 2dccdf7076f671764d02c850e83a8b457105268d Author: Qi Zheng Date: Wed Jan 8 14:57:30 2025 +0800 mm: pgtable: introduce generic __tlb_remove_table() Several architectures (arm, arm64, riscv and x86) define exactly the same __tlb_remove_table(), just introduce generic __tlb_remove_table() to eliminate these duplications. The s390 __tlb_remove_table() is nearly the same, so also make s390 __tlb_remove_table() version generic. Link: https://lkml.kernel.org/r/ea372633d94f4d3f9f56a7ec5994bf050bf77e39.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Reviewed-by: Kevin Brodsky Acked-by: Andreas Larsson [sparc] Acked-by: Alexander Gordeev [s390] Acked-by: Arnd Bergmann [asm-generic] Cc: Alexandre Ghiti Cc: Alexandre Ghiti Cc: Aneesh Kumar K.V (Arm) Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Peter Zijlstra (Intel) Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton arch/arm/include/asm/tlb.h | 9 --------- arch/arm64/include/asm/tlb.h | 7 ------- arch/powerpc/include/asm/tlb.h | 1 + arch/riscv/include/asm/tlb.h | 12 ------------ arch/s390/include/asm/tlb.h | 9 ++++----- arch/s390/mm/pgalloc.c | 7 ------- arch/sparc/include/asm/tlb_64.h | 1 + arch/x86/include/asm/tlb.h | 17 ----------------- include/asm-generic/tlb.h | 15 +++++++++++++-- 9 files changed, 19 insertions(+), 59 deletions(-) commit 5550b3c5d5f6e7d82e3a6b2bbd2bbff658bc5d4b Author: Qi Zheng Date: Wed Jan 8 14:57:29 2025 +0800 s390: pgtable: consolidate PxD and PTE TLB free paths Call pagetable_dtor() for PMD|PUD|P4D tables just before ptdesc is freed - same as it is done for PTE tables. That allows consolidating TLB free paths for all table types. Link: https://lkml.kernel.org/r/ac69360a5f3350ebb2f63cd14b7b45316a130ee4.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Suggested-by: Peter Zijlstra (Intel) Reviewed-by: Kevin Brodsky Acked-by: Alexander Gordeev Cc: Alexandre Ghiti Cc: Alexandre Ghiti Cc: Andreas Larsson Cc: Aneesh Kumar K.V (Arm) Cc: Arnd Bergmann Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton arch/s390/include/asm/tlb.h | 3 --- arch/s390/mm/pgalloc.c | 14 ++++---------- 2 files changed, 4 insertions(+), 13 deletions(-) commit ee0934b03510743ceacb12b63f1eaa85aae3bc61 Author: Qi Zheng Date: Wed Jan 8 14:57:28 2025 +0800 x86: pgtable: move pagetable_dtor() to __tlb_remove_table() Move pagetable_dtor() to __tlb_remove_table(), so that ptlock and page table pages can be freed together (regardless of whether RCU is used). This prevents the use-after-free problem where the ptlock is freed immediately but the page table pages is freed later via RCU. Link: https://lkml.kernel.org/r/27b3cdc8786bebd4f748380bf82f796482718504.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Suggested-by: Peter Zijlstra (Intel) Reviewed-by: Kevin Brodsky Cc: Alexander Gordeev Cc: Alexandre Ghiti Cc: Alexandre Ghiti Cc: Andreas Larsson Cc: Aneesh Kumar K.V (Arm) Cc: Arnd Bergmann Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton arch/x86/include/asm/tlb.h | 1 + arch/x86/kernel/paravirt.c | 1 + arch/x86/mm/pgtable.c | 16 ++++------------ 3 files changed, 6 insertions(+), 12 deletions(-) commit 0b6476f93998a20a537ee025f124618488ea36a7 Author: Qi Zheng Date: Wed Jan 8 14:57:27 2025 +0800 x86: pgtable: convert __tlb_remove_table() to use struct ptdesc Convert __tlb_remove_table() to use struct ptdesc, which will help to move pagetable_dtor() to __tlb_remove_table(). And page tables shouldn't have swap cache, so use pagetable_free() instead of free_page_and_swap_cache() to free page table pages. Link: https://lkml.kernel.org/r/39f60f93143ff77cf5d6b3c3e75af0ffc1480adb.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Reviewed-by: Kevin Brodsky Cc: Alexander Gordeev Cc: Alexandre Ghiti Cc: Alexandre Ghiti Cc: Andreas Larsson Cc: Aneesh Kumar K.V (Arm) Cc: Arnd Bergmann Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Peter Zijlstra (Intel) Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton arch/x86/include/asm/tlb.h | 16 +++++++++------- arch/x86/kernel/paravirt.c | 4 +++- arch/x86/mm/pgtable.c | 12 +++++++----- 3 files changed, 19 insertions(+), 13 deletions(-) commit deab5a355e5283d3802203b2be599611ad8af861 Author: Qi Zheng Date: Wed Jan 8 14:57:26 2025 +0800 riscv: pgtable: move pagetable_dtor() to __tlb_remove_table() Move pagetable_dtor() to __tlb_remove_table(), so that ptlock and page table pages can be freed together (regardless of whether RCU is used). This prevents the use-after-free problem where the ptlock is freed immediately but the page table pages is freed later via RCU. Page tables shouldn't have swap cache, so use pagetable_free() instead of free_page_and_swap_cache() to free page table pages. By the way, move the comment above __tlb_remove_table() to riscv_tlb_remove_ptdesc(), it will be more appropriate. Link: https://lkml.kernel.org/r/b89d77c965507b1b102cbabe988e69365cb288b6.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Suggested-by: Peter Zijlstra (Intel) Reviewed-by: Kevin Brodsky Cc: Alexander Gordeev Cc: Alexandre Ghiti Cc: Alexandre Ghiti Cc: Andreas Larsson Cc: Aneesh Kumar K.V (Arm) Cc: Arnd Bergmann Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton arch/riscv/include/asm/pgalloc.h | 38 +++++++++++++++++--------------------- arch/riscv/include/asm/tlb.h | 14 ++++---------- 2 files changed, 21 insertions(+), 31 deletions(-) commit 12359c039b5f510339cb3e68f8e6020e9a848e8c Author: Qi Zheng Date: Wed Jan 8 14:57:25 2025 +0800 arm64: pgtable: move pagetable_dtor() to __tlb_remove_table() Move pagetable_dtor() to __tlb_remove_table(), so that ptlock and page table pages can be freed together (regardless of whether RCU is used). This prevents the use-after-free problem where the ptlock is freed immediately but the page table pages is freed later via RCU. Page tables shouldn't have swap cache, so use pagetable_free() instead of free_page_and_swap_cache() to free page table pages. Link: https://lkml.kernel.org/r/cf4b847caf390f96a3e3d534dacb2c174e16c154.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Suggested-by: Peter Zijlstra (Intel) Reviewed-by: Kevin Brodsky Acked-by: Will Deacon Cc: Alexander Gordeev Cc: Alexandre Ghiti Cc: Alexandre Ghiti Cc: Andreas Larsson Cc: Aneesh Kumar K.V (Arm) Cc: Arnd Bergmann Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Yu Zhao Signed-off-by: Andrew Morton arch/arm64/include/asm/tlb.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 0ada8c4df69722c6987976e421a43d0f8a2a319e Author: Qi Zheng Date: Wed Jan 8 14:57:24 2025 +0800 arm: pgtable: move pagetable_dtor() to __tlb_remove_table() Move pagetable_dtor() to __tlb_remove_table(), so that ptlock and page table pages can be freed together (regardless of whether RCU is used). This prevents the use-after-free problem where the ptlock is freed immediately but the page table pages is freed later via RCU. Page tables shouldn't have swap cache, so use pagetable_free() instead of free_page_and_swap_cache() to free page table pages. Link: https://lkml.kernel.org/r/327b4b8990729edd4ce97d9d5acbdaff2d9fa1d1.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Suggested-by: Peter Zijlstra (Intel) Reviewed-by: Kevin Brodsky Cc: Alexander Gordeev Cc: Alexandre Ghiti Cc: Alexandre Ghiti Cc: Andreas Larsson Cc: Aneesh Kumar K.V (Arm) Cc: Arnd Bergmann Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton arch/arm/include/asm/tlb.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit db6b435d731a8d82c38e558175db55466cb5832a Author: Qi Zheng Date: Wed Jan 8 14:57:23 2025 +0800 mm: pgtable: introduce pagetable_dtor() The pagetable_p*_dtor() are exactly the same except for the handling of ptlock. If we make ptlock_free() handle the case where ptdesc->ptl is NULL and remove VM_BUG_ON_PAGE() from pmd_ptlock_free(), we can unify pagetable_p*_dtor() into one function. Let's introduce pagetable_dtor() to do this. Later, pagetable_dtor() will be moved to tlb_remove_ptdesc(), so that ptlock and page table pages can be freed together (regardless of whether RCU is used). This prevents the use-after-free problem where the ptlock is freed immediately but the page table pages is freed later via RCU. Link: https://lkml.kernel.org/r/47f44fff9dc68d9d9e9a0d6c036df275f820598a.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Originally-by: Peter Zijlstra (Intel) Reviewed-by: Kevin Brodsky Acked-by: Alexander Gordeev [s390] Cc: Alexandre Ghiti Cc: Alexandre Ghiti Cc: Andreas Larsson Cc: Aneesh Kumar K.V (Arm) Cc: Arnd Bergmann Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton Documentation/mm/split_page_table_lock.rst | 4 +-- arch/arm/include/asm/tlb.h | 4 +-- arch/arm64/include/asm/tlb.h | 8 ++--- arch/csky/include/asm/pgalloc.h | 2 +- arch/hexagon/include/asm/pgalloc.h | 2 +- arch/loongarch/include/asm/pgalloc.h | 2 +- arch/m68k/include/asm/mcf_pgalloc.h | 4 +-- arch/m68k/include/asm/sun3_pgalloc.h | 2 +- arch/m68k/mm/motorola.c | 2 +- arch/mips/include/asm/pgalloc.h | 2 +- arch/nios2/include/asm/pgalloc.h | 2 +- arch/openrisc/include/asm/pgalloc.h | 2 +- arch/powerpc/mm/book3s64/mmu_context.c | 2 +- arch/powerpc/mm/book3s64/pgtable.c | 2 +- arch/powerpc/mm/pgtable-frag.c | 4 +-- arch/riscv/include/asm/pgalloc.h | 8 ++--- arch/riscv/mm/init.c | 4 +-- arch/s390/include/asm/pgalloc.h | 6 ++-- arch/s390/include/asm/tlb.h | 6 ++-- arch/s390/mm/pgalloc.c | 2 +- arch/sh/include/asm/pgalloc.h | 2 +- arch/sparc/mm/init_64.c | 2 +- arch/sparc/mm/srmmu.c | 2 +- arch/um/include/asm/pgalloc.h | 6 ++-- arch/x86/mm/pgtable.c | 12 +++---- include/asm-generic/pgalloc.h | 8 ++--- include/linux/mm.h | 52 ++++++------------------------ mm/memory.c | 3 +- 28 files changed, 62 insertions(+), 95 deletions(-) commit b7dcd539bfc7301b56fdaa6ebbb23752b670ee81 Author: Qi Zheng Date: Wed Jan 8 14:57:22 2025 +0800 s390: pgtable: add statistics for PUD and P4D level page table Like PMD and PTE level page table, also add statistics for PUD and P4D page table. Link: https://lkml.kernel.org/r/4707dffce228ccec5c6662810566dd12b5741c4b.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Suggested-by: Peter Zijlstra (Intel) Reviewed-by: Kevin Brodsky Acked-by: Alexander Gordeev Cc: Alexandre Ghiti Cc: Alexandre Ghiti Cc: Andreas Larsson Cc: Aneesh Kumar K.V (Arm) Cc: Arnd Bergmann Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton arch/s390/include/asm/pgalloc.h | 29 +++++++++++++++++++++-------- arch/s390/include/asm/tlb.h | 2 ++ 2 files changed, 23 insertions(+), 8 deletions(-) commit 440af48d6879c9a8bf381ca9487b384fca8851fe Author: Qi Zheng Date: Wed Jan 8 14:57:21 2025 +0800 arm64: pgtable: use mmu gather to free p4d level page table Like other levels of page tables, also use mmu gather mechanism to free p4d level page table. Link: https://lkml.kernel.org/r/3fd48525397b34a64f7c0eb76746da30814dc941.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Originally-by: Peter Zijlstra (Intel) Reviewed-by: Kevin Brodsky Cc: Alexander Gordeev Cc: Alexandre Ghiti Cc: Alexandre Ghiti Cc: Andreas Larsson Cc: Aneesh Kumar K.V (Arm) Cc: Arnd Bergmann Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton arch/arm64/include/asm/pgalloc.h | 1 - arch/arm64/include/asm/tlb.h | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit 5fcf5fa61218176acf198d9e63fb5739dd147244 Author: Qi Zheng Date: Wed Jan 8 14:57:20 2025 +0800 mm: pgtable: add statistics for P4D level page table Like other levels of page tables, add statistics for P4D level page table. Link: https://lkml.kernel.org/r/d55fe3c286305aae84457da9e1066df99b3de125.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Originally-by: Peter Zijlstra (Intel) Reviewed-by: Kevin Brodsky Cc: Alexander Gordeev Cc: Alexandre Ghiti Cc: Alexandre Ghiti Cc: Andreas Larsson Cc: Aneesh Kumar K.V (Arm) Cc: Arnd Bergmann Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton arch/riscv/include/asm/pgalloc.h | 6 +++++- arch/x86/mm/pgtable.c | 3 +++ include/asm-generic/pgalloc.h | 2 ++ include/linux/mm.h | 16 ++++++++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) commit 98a7e47faa3ec38260b851a1c5823cbd45d5a229 Author: Kevin Brodsky Date: Wed Jan 8 14:57:19 2025 +0800 asm-generic: pgalloc: provide generic p4d_{alloc_one,free} Four architectures currently implement 5-level pgtables: arm64, riscv, x86 and s390. The first three have essentially the same implementation for p4d_alloc_one() and p4d_free(), so we've got an opportunity to reduce duplication like at the lower levels. Provide a generic version of p4d_alloc_one() and p4d_free(), and make use of it on those architectures. Their implementation is the same as at PUD level, except that p4d_free() performs a runtime check by calling mm_p4d_folded(). 5-level pgtables depend on a runtime-detected hardware feature on all supported architectures, so we might as well include this check in the generic implementation. No runtime check is required in p4d_alloc_one() as the top-level p4d_alloc() already does the required check. Link: https://lkml.kernel.org/r/26d69c74a29183ecc335b9b407040d8e4cd70c6a.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Kevin Brodsky Signed-off-by: Qi Zheng Acked-by: Dave Hansen Acked-by: Arnd Bergmann [asm-generic] Cc: Alexander Gordeev Cc: Alexandre Ghiti Cc: Alexandre Ghiti Cc: Andreas Larsson Cc: Aneesh Kumar K.V (Arm) Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Peter Zijlstra (Intel) Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton arch/arm64/include/asm/pgalloc.h | 17 --------------- arch/riscv/include/asm/pgalloc.h | 23 -------------------- arch/x86/include/asm/pgalloc.h | 18 ---------------- include/asm-generic/pgalloc.h | 45 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 58 deletions(-) commit 5a32443f94d31d712c77d8793a947129f08226ee Author: Kevin Brodsky Date: Wed Jan 8 14:57:18 2025 +0800 riscv: mm: skip pgtable level check in {pud,p4d}_alloc_one Patch series "move pagetable_*_dtor() to __tlb_remove_table()", v5. As proposed [1] by Peter Zijlstra below, this patch series aims to move pagetable_*_dtor() into __tlb_remove_table(). This will cleanup pagetable_*_dtor() a bit and more gracefully fix the UAF issue [2] reported by syzbot. : Notably: : : - s390 pud isn't calling the existing pagetable_pud_[cd]tor() : - none of the p4d things have pagetable_p4d_[cd]tor() (x86,arm64,s390,riscv) : and they have inconsistent accounting : - while much of the _ctor calls are in generic code, many of the _dtor : calls are in arch code for hysterial raisins, this could easily be : fixed : - if we fix ptlock_free() to handle NULL, then all the _dtor() : functions can use it, and we can observe they're all identical : and can be folded : : after all that cleanup, you can move the _dtor from *_free_tlb() into : tlb_remove_table() -- which for the above case, would then have it called : from __tlb_remove_table_free(). This patch (of 16): {pmd,pud,p4d}_alloc_one() is never called if the corresponding page table level is folded, as {pmd,pud,p4d}_alloc() already does the required check. We can therefore remove the runtime page table level checks in {pud,p4d}_alloc_one. The PUD helper becomes equivalent to the generic version, so we remove it altogether. This is consistent with the way arm64 and x86 handle this situation (runtime check in p4d_free() only). Link: https://lkml.kernel.org/r/cover.1736317725.git.zhengqi.arch@bytedance.com Link: https://lkml.kernel.org/r/93a1c6bddc0ded9f1a9f15658c1e4af5c93d1194.1736317725.git.zhengqi.arch@bytedance.com Signed-off-by: Kevin Brodsky Signed-off-by: Qi Zheng Acked-by: Dave Hansen Reviewed-by: Alexandre Ghiti Cc: Alexander Gordeev Cc: Alexandre Ghiti Cc: Andreas Larsson Cc: Aneesh Kumar K.V (Arm) Cc: Arnd Bergmann Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Peter Zijlstra (Intel) Cc: Ryan Roberts Cc: Thomas Gleixner Cc: Vishal Moola (Oracle) Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton arch/riscv/include/asm/pgalloc.h | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit 1aa43598c03b71d945f8b12d6d579f0ad836f8f8 Author: Rik van Riel Date: Thu Dec 19 15:32:53 2024 -0500 mm: remove unnecessary calls to lru_add_drain There seem to be several categories of calls to lru_add_drain and lru_add_drain_all. The first are code paths that recently allocated, swapped in, or otherwise processed a batch of pages, and want them all on the LRU. These drain pages that were recently allocated, probably on the local CPU. A second category are code paths that are actively trying to reclaim, migrate, or offline memory. These often use lru_add_drain_all, to drain the caches on all CPUs. However, there also seem to be some other callers where we aren't really doing either. They are calling lru_add_drain(), despite operating on pages that may have been allocated long ago, and quite possibly on different CPUs. Those calls are not likely to be effective at anything but creating lock contention on the LRU locks. Remove the lru_add_drain calls in the latter category. For detailed reasoning, see [1] and [2]. Link: https://lkml.kernel.org/r/dca2824e8e88e826c6b260a831d79089b5b9c79d.camel@surriel.com [1] Link: https://lkml.kernel.org/r/xxfhcjaq2xxcl5adastz5omkytenq7izo2e5f4q7e3ns4z6lko@odigjjc7hqrg [2] Link: https://lkml.kernel.org/r/20241219153253.3da9e8aa@fangorn Signed-off-by: Rik van Riel Suggested-by: David Hildenbrand Acked-by: Shakeel Butt Acked-by: David Hildenbrand Acked-by: Lorenzo Stoakes Cc: Chris Li Cc: Matthew Wilcox (Oracle) Cc: Ryan Roberts Signed-off-by: Andrew Morton mm/memory.c | 1 - mm/mmap.c | 2 -- mm/swap_state.c | 1 - mm/vma.c | 2 -- 4 files changed, 6 deletions(-) commit 44d46b76c3a4b514a0cc9dab147ed430e5c1d699 Author: Gregory Price Date: Fri Dec 20 16:07:09 2024 -0500 mm: add build-time option for hotplug memory default online type Memory hotplug presently auto-onlines memory into a zone the kernel deems appropriate if CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y. The memhp_default_state boot param enables runtime config, but it's not possible to do this at build-time. Remove CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE, and replace it with CONFIG_MHP_DEFAULT_ONLINE_TYPE_* choices that sync with the boot param. Selections: CONFIG_MHP_DEFAULT_ONLINE_TYPE_OFFLINE => mhp_default_online_type = "offline" Memory will not be onlined automatically. CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_AUTO => mhp_default_online_type = "online" Memory will be onlined automatically in a zone deemed. appropriate by the kernel. CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_KERNEL => mhp_default_online_type = "online_kernel" Memory will be onlined automatically. The zone may allow kernel data (e.g. ZONE_NORMAL). CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_MOVABLE => mhp_default_online_type = "online_movable" Memory will be onlined automatically. The zone will be ZONE_MOVABLE. Default to CONFIG_MHP_DEFAULT_ONLINE_TYPE_OFFLINE to match the existing default CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=n behavior. Existing users of CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y should use CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_AUTO. [gourry@gourry.net: update KConfig comments] Link: https://lkml.kernel.org/r/20241226182918.648799-1-gourry@gourry.net Link: https://lkml.kernel.org/r/20241220210709.300066-1-gourry@gourry.net Signed-off-by: Gregory Price Acked-by: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Huacai Chen Cc: Jonathan Corbet Cc: Oscar Salvador Cc: "Rafael J. Wysocki" Cc: WANG Xuerui Signed-off-by: Andrew Morton Documentation/admin-guide/kernel-parameters.txt | 4 +- Documentation/admin-guide/mm/memory-hotplug.rst | 4 +- arch/loongarch/configs/loongson3_defconfig | 5 ++- drivers/base/memory.c | 4 +- include/linux/memory_hotplug.h | 5 ++- mm/Kconfig | 57 ++++++++++++++++++++++--- mm/memory_hotplug.c | 33 +++++++++++--- 7 files changed, 89 insertions(+), 23 deletions(-) commit 901083d8f5c55dc125834bbc5ac1720014e66758 Author: Donet Tom Date: Thu Dec 19 04:27:20 2024 -0600 selftests/mm: add new test cases to the migration test Added three new test cases to the migration tests: 1. Shared anon THP migration test This test will mmap shared anon memory, madvise it to MADV_HUGEPAGE, then do migration entry testing. One thread will move pages back and forth between nodes whilst other threads try and access them. 2. Private anon hugetlb migration test This test will mmap private anon hugetlb memory and then do the migration entry testing. 3. Shared anon hugetlb migration test This test will mmap shared anon hugetlb memory and then do the migration entry testing. Test results ============ # ./tools/testing/selftests/mm/migration TAP version 13 1..6 # Starting 6 tests from 1 test cases. # RUN migration.private_anon ... # OK migration.private_anon ok 1 migration.private_anon # RUN migration.shared_anon ... # OK migration.shared_anon ok 2 migration.shared_anon # RUN migration.private_anon_thp ... # OK migration.private_anon_thp ok 3 migration.private_anon_thp # RUN migration.shared_anon_thp ... # OK migration.shared_anon_thp ok 4 migration.shared_anon_thp # RUN migration.private_anon_htlb ... # OK migration.private_anon_htlb ok 5 migration.private_anon_htlb # RUN migration.shared_anon_htlb ... # OK migration.shared_anon_htlb ok 6 migration.shared_anon_htlb # PASSED: 6 / 6 tests passed. # Totals: pass:6 fail:0 xfail:0 xpass:0 skip:0 error:0 # Link: https://lkml.kernel.org/r/20241219102720.4487-1-donettom@linux.ibm.com Signed-off-by: Donet Tom Reviewed-by: Dev Jain Cc: Baolin Wang Cc: David Hildenbrand Cc: Ritesh Harjani (IBM) Cc: Shuah Khan Cc: Zi Yan Signed-off-by: Andrew Morton tools/testing/selftests/mm/migration.c | 99 ++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) commit 04f13d241b8b146b23038bffd907cb8278391d07 Author: yangge Date: Sat Jan 11 15:58:20 2025 +0800 mm: replace free hugepage folios after migration My machine has 4 NUMA nodes, each equipped with 32GB of memory. I have configured each NUMA node with 16GB of CMA and 16GB of in-use hugetlb pages. The allocation of contiguous memory via cma_alloc() can fail probabilistically. When there are free hugetlb folios in the hugetlb pool, during the migration of in-use hugetlb folios, new folios are allocated from the free hugetlb pool. After the migration is completed, the old folios are released back to the free hugetlb pool instead of being returned to the buddy system. This can cause test_pages_isolated() check to fail, ultimately leading to the failure of cma_alloc(). Call trace: cma_alloc() __alloc_contig_migrate_range() // migrate in-use hugepage test_pages_isolated() __test_page_isolated_in_pageblock() PageBuddy(page) // check if the page is in buddy To address this issue, we introduce a function named replace_free_hugepage_folios(). This function will replace the hugepage in the free hugepage pool with a new one and release the old one to the buddy system. After the migration of in-use hugetlb pages is completed, we will invoke replace_free_hugepage_folios() to ensure that these hugepages are properly released to the buddy system. Following this step, when test_pages_isolated() is executed for inspection, it will successfully pass. Additionally, when alloc_contig_range() is used to migrate multiple in-use hugetlb pages, it can result in some in-use hugetlb pages being released back to the free hugetlb pool and subsequently being reallocated and used again. For example: [huge 0] [huge 1] To migrate huge 0, we obtain huge x from the pool. After the migration is completed, we return the now-freed huge 0 back to the pool. When it's time to migrate huge 1, we can simply reuse the now-freed huge 0 from the pool. As a result, when replace_free_hugepage_folios() is executed, it cannot release huge 0 back to the buddy system. To address this issue, we should prevent the reuse of isolated free hugepages during the migration process. Link: https://lkml.kernel.org/r/1734503588-16254-1-git-send-email-yangge1116@126.com Link: https://lkml.kernel.org/r/1736582300-11364-1-git-send-email-yangge1116@126.com Signed-off-by: yangge Cc: Baolin Wang Cc: Barry Song <21cnbao@gmail.com> Cc: David Hildenbrand Cc: SeongJae Park Signed-off-by: Andrew Morton include/linux/hugetlb.h | 7 +++++++ mm/hugetlb.c | 42 ++++++++++++++++++++++++++++++++++++++++++ mm/page_alloc.c | 12 +++++++++++- 3 files changed, 60 insertions(+), 1 deletion(-) commit 424d0e5828ada98130081b9846f6557158e3f9dd Author: Sergey Senozhatsky Date: Wed Dec 18 15:34:24 2024 +0900 zram: cond_resched() in writeback loop zram writeback is a costly operation, because every target slot (unless ZRAM_HUGE) is decompressed before it gets written to a backing device. The writeback to a backing device uses submit_bio_wait() which may look like a rescheduling point. However, if the backing device has BD_HAS_SUBMIT_BIO bit set __submit_bio() calls directly disk->fops->submit_bio(bio) on the backing device and so when submit_bio_wait() calls blk_wait_io() the I/O is already done. On such systems we effective end up in a loop for_each (target slot) { decompress(slot) __submit_bio() disk->fops->submit_bio(bio) } Which on PREEMPT_NONE systems triggers watchdogs (since there are no explicit rescheduling points). Add cond_resched() to the zram writeback loop. Link: https://lkml.kernel.org/r/20241218063513.297475-8-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit b8d3ff7bb5111c6a88d5672469de445d9b46cf22 Author: Sergey Senozhatsky Date: Wed Dec 18 15:34:23 2024 +0900 zram: use zram_read_from_zspool() in writeback We only can read pages from zspool in writeback, zram_read_page() is not really right in that context not only because it's a more generic function that handles ZRAM_WB pages, but also because it requires us to unlock slot between slot flag check and actual page read. Use zram_read_from_zspool() instead and do slot flags check and page read under the same slot lock. Link: https://lkml.kernel.org/r/20241218063513.297475-7-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit e355b253adbcc45e32acd28926f5c61b34f30c93 Author: Sergey Senozhatsky Date: Wed Dec 18 15:34:22 2024 +0900 zram: factor out different page types read Similarly to write, split the page read code into ZRAM_HUGE read, ZRAM_SAME read and compressed page read to simplify the code. Link: https://lkml.kernel.org/r/20241218063513.297475-6-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 85 ++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 33 deletions(-) commit ef932cd23b78e8bc3a4162c8c63d434b8446b8b5 Author: Sergey Senozhatsky Date: Wed Dec 18 15:34:21 2024 +0900 zram: factor out ZRAM_HUGE write zram_write_page() handles: ZRAM_SAME pages (which was already factored out) stores, regular page stores and ZRAM_HUGE pages stores. ZRAM_HUGE handling adds a significant amount of complexity. Instead, we can handle ZRAM_HUGE in a separate function. This allows us to simplify zs_handle allocations slow-path, as it now does not handle ZRAM_HUGE case. ZRAM_HUGE zs_handle allocation, on the other hand, can now drop __GFP_KSWAPD_RECLAIM because we handle ZRAM_HUGE in preemptible context (outside of local-lock scope). Link: https://lkml.kernel.org/r/20241218063513.297475-5-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 136 ++++++++++++++++++++++++++---------------- 1 file changed, 83 insertions(+), 53 deletions(-) commit a5cd78accfd376541e9b731d58656d58fdf1a6fe Author: Sergey Senozhatsky Date: Wed Dec 18 15:34:20 2024 +0900 zram: factor out ZRAM_SAME write Handling of ZRAM_SAME now uses a goto to the final stages of zram_write_page() plus it introduces a branch and flags variable, which is not making the code any simpler. In reality, we can handle ZRAM_SAME immediately when we detect such pages and remove a goto and a branch. Factor out ZRAM_SAME handling into a separate routine to simplify zram_write_page(). Link: https://lkml.kernel.org/r/20241218063513.297475-4-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) commit b4444a849f1827c04df81a6f1ef26ddb6f072a94 Author: Sergey Senozhatsky Date: Wed Dec 18 15:34:19 2024 +0900 zram: remove entry element member Element is in the same anon union as handle and hence holds the same value, which makes code below sort of confusing handle = zram_get_handle() if (!handle) element = zram_get_element() Element doesn't really simplify the code, let's just remove it. We already re-purpose handle to store the block id a written back page. Link: https://lkml.kernel.org/r/20241218063513.297475-3-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 23 +++++------------------ drivers/block/zram/zram_drv.h | 5 +---- 2 files changed, 6 insertions(+), 22 deletions(-) commit 71268035f5d734ad6373d953298bd5779985497a Author: Sergey Senozhatsky Date: Wed Dec 18 15:34:18 2024 +0900 zram: free slot memory early during write Patch series "zram: split page type read/write handling", v2. This is a subset of [1] series which contains only fixes and improvements (no new features, as ZRAM_HUGE split is still under consideration). The motivation for factoring out is that zram_write_page() gets more and more complex all the time, because it tries to handle too many scenarios: ZRAM_SAME store, ZRAM_HUGE store, compress page store with zs_malloc allocation slowpath and conditional recompression, etc. Factor those out and make things easier to handle. Addition of cond_resched() is simply a fix, I can trigger watchdog from zram writeback(). And early slot free is just a reasonable thing to do. [1] https://lore.kernel.org/linux-kernel/20241119072057.3440039-1-senozhatsky@chromium.org This patch (of 7): In the current implementation entry's previously allocated memory is released in the very last moment, when we already have allocated a new memory for new data. This, basically, temporarily increases memory usage for no good reason. For example, consider the case when both old (stale) and new entry data are incompressible so such entry will temporarily use two physical pages - one for stale (old) data and one for new data. We can release old memory as soon as we get a write request for entry. Link: https://lkml.kernel.org/r/20241218063513.297475-1-senozhatsky@chromium.org Link: https://lkml.kernel.org/r/20241218063513.297475-2-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton drivers/block/zram/zram_drv.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 6769183166b33b1a5de8f938d1ff4d5f4be0f428 Author: Kairui Song Date: Wed Dec 18 19:46:33 2024 +0800 mm/swap_cgroup: decouple swap cgroup recording and clearing The current implementation of swap cgroup tracking is a bit complex and fragile: On charging path, swap_cgroup_record always records an actual memcg id, and it depends on the caller to make sure all entries passed in must belong to one single folio. As folios are always charged or uncharged as a whole, and always charged and uncharged in order, swap_cgroup doesn't need an extra lock. On uncharging path, swap_cgroup_record always sets the record to zero. These entries won't be charged again until uncharging is done. So there is no extra lock needed either. Worth noting that swap cgroup clearing may happen without folio involved, eg. exiting processes will zap its page table without swapin. The xchg/cmpxchg provides atomic operations and barriers to ensure no tearing or synchronization issue of these swap cgroup records. It works but quite error-prone. Things can be much clear and robust by decoupling recording and clearing into two helpers. Recording takes the actual folio being charged as argument, and clearing always set the record to zero, and refine the debug sanity checks to better reflect their usage Benchmark even showed a very slight improvement as it saved some extra arguments and lookups: make -j96 with defconfig on tmpfs in 1.5G memory cgroup using 4k folios: Before: sys 9617.23 (stdev 37.764062) After : sys 9541.54 (stdev 42.973976) make -j96 with defconfig on tmpfs in 2G memory cgroup using 64k folios: Before: sys 7358.98 (stdev 54.927593) After : sys 7337.82 (stdev 39.398956) Link: https://lkml.kernel.org/r/20241218114633.85196-5-ryncsn@gmail.com Signed-off-by: Kairui Song Suggested-by: Chris Li Cc: Barry Song Cc: Hugh Dickins Cc: Johannes Weiner Cc: Michal Hocko Cc: Roman Gushchin Cc: Shakeel Butt Cc: Yosry Ahmed Signed-off-by: Andrew Morton include/linux/swap_cgroup.h | 12 ++++++--- mm/memcontrol.c | 13 ++++----- mm/swap_cgroup.c | 66 ++++++++++++++++++++++++++++----------------- 3 files changed, 55 insertions(+), 36 deletions(-) commit 2b3a58b121344465cbf36b5f7f94a710f8677941 Author: Kairui Song Date: Wed Dec 18 19:46:32 2024 +0800 mm/swap_cgroup: remove global swap cgroup lock commit e9e58a4ec3b1 ("memcg: avoid use cmpxchg in swap cgroup maintainance") replaced the cmpxchg/xchg with a global irq spinlock because some archs doesn't support 2 bytes cmpxchg/xchg. Clearly this won't scale well. And as commented in swap_cgroup.c, this lock is not needed for map synchronization. Emulation of 2 bytes xchg with atomic cmpxchg isn't hard, so implement it to get rid of this lock. Introduced two helpers for doing so and they can be easily dropped if a generic 2 byte xchg is support. Testing using 64G brd and build with build kernel with make -j96 in 1.5G memory cgroup using 4k folios showed below improvement (6 test run): Before this series: Sys time: 10782.29 (stdev 42.353886) Real time: 171.49 (stdev 0.595541) After this commit: Sys time: 9617.23 (stdev 37.764062), -10.81% Real time: 159.65 (stdev 0.587388), -6.90% With 64k folios and 2G memcg: Before this series: Sys time: 8176.94 (stdev 26.414712) Real time: 141.98 (stdev 0.797382) After this commit: Sys time: 7358.98 (stdev 54.927593), -10.00% Real time: 134.07 (stdev 0.757463), -5.57% Sequential swapout of 8G 64k zero folios with madvise (24 test run): Before this series: 5461409.12 us (stdev 183957.827084) After this commit: 5420447.26 us (stdev 196419.240317) Sequential swapin of 8G 4k zero folios (24 test run): Before this series: 19736958.916667 us (stdev 189027.246676) After this commit: 19662182.629630 us (stdev 172717.640614) Performance is better or at least not worse for all tests above. Link: https://lkml.kernel.org/r/20241218114633.85196-4-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: Roman Gushchin Cc: Barry Song Cc: Chris Li Cc: Hugh Dickins Cc: Johannes Weiner Cc: Michal Hocko Cc: Shakeel Butt Cc: Yosry Ahmed Signed-off-by: Andrew Morton mm/swap_cgroup.c | 77 +++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 28 deletions(-) commit 40733e7e0c260d540447d3646e451274bc5d3374 Author: Kairui Song Date: Wed Dec 18 19:46:31 2024 +0800 mm/swap_cgroup: remove swap_cgroup_cmpxchg This function is never used after commit 6b611388b626 ("memcg-v1: remove charge move code"). Link: https://lkml.kernel.org/r/20241218114633.85196-3-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: Yosry Ahmed Reviewed-by: Roman Gushchin Acked-by: Shakeel Butt Acked-by: Chris Li Cc: Barry Song Cc: Hugh Dickins Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton include/linux/swap_cgroup.h | 2 -- mm/swap_cgroup.c | 29 ----------------------------- 2 files changed, 31 deletions(-) commit a53f311349ca967b481f73501df5dfabb47a1d2f Author: Kairui Song Date: Wed Dec 18 19:46:30 2024 +0800 mm, memcontrol: avoid duplicated memcg enable check Patch series "mm/swap_cgroup: remove global swap cgroup lock", v3. This series removes the global swap cgroup lock. The critical section of this lock is very short but it's still a bottle neck for mass parallel swap workloads. Up to 10% performance gain for tmpfs build kernel test on a 48c96t system under memory pressure, and no regression for other cases: This patch (of 3): mem_cgroup_uncharge_swap() includes a mem_cgroup_disabled() check, so the caller doesn't need to check that. Link: https://lkml.kernel.org/r/20241218114633.85196-1-ryncsn@gmail.com Link: https://lkml.kernel.org/r/20241218114633.85196-2-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: Yosry Ahmed Reviewed-by: Roman Gushchin Acked-by: Shakeel Butt Acked-by: Chris Li Cc: Barry Song Cc: Hugh Dickins Cc: Johannes Weiner Cc: Michal Hocko Cc: Yosry Ahmed Signed-off-by: Andrew Morton mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b02fcc082a4ae1675a7f70a017ca4926286271ad Author: Liam R. Howlett Date: Mon Dec 16 14:01:13 2024 -0500 test_maple_tree: test exhausted upper limit of mtree_alloc_cyclic() When the upper bound of the search is exhausted, the maple state may be returned in an error state of -EBUSY. This means maple state needs to be reset before the second search in mas_alloc_cylic() to ensure the search happens. This test ensures the issue is not recreated. Link: https://lkml.kernel.org/r/20241216190113.1226145-3-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Yang Erkun Cc: Christian Brauner Cc: Chuck Lever says: Signed-off-by: Andrew Morton lib/test_maple_tree.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit e2c9e6190dbb127466b9da9fb18f9adc16dff43b Author: Thomas Weißschuh Date: Mon Dec 16 13:20:25 2024 +0100 mm/page_idle: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Link: https://lkml.kernel.org/r/20241216-sysfs-const-bin_attr-page_idle-v1-1-cc01ecc55196@weissschuh.net Signed-off-by: Thomas Weißschuh Signed-off-by: Andrew Morton mm/page_idle.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1fc10653552c17b9f336a81014f20465e664a2ec Author: Andrew Morton Date: Sun Dec 15 21:44:47 2024 -0800 mm/huge_memory.c: rename shadowed local split_huge_pages_write() has a lccal `buf' which shadows incoming arg `buf'. Reviewer confusion resulted. Rename the inner local to `tok_buf'. Cc: Leo Stone Signed-off-by: Andrew Morton mm/huge_memory.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 7e8c8fd3487c41690ebaf1f37218d8e191d45166 Author: Lorenzo Stoakes Date: Fri Dec 13 16:24:09 2024 +0000 tools: testing: add simple __mmap_region() userland test Introduce demonstrative, basic, __mmap_region() test upon which we can base further work upon moving forwards. This simply asserts that mappings can be made and merges occur as expected. As part of this change, fix the security_vm_enough_memory_mm() stub which was previously incorrectly implemented. Link: https://lkml.kernel.org/r/20241213162409.41498-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Cc: Jann Horn Cc: Liam R. Howlett Cc: Vlastimil Babka Signed-off-by: Andrew Morton tools/testing/vma/vma.c | 53 ++++++++++++++++++++++++++++++++++++++++ tools/testing/vma/vma_internal.h | 2 +- 2 files changed, 54 insertions(+), 1 deletion(-) commit ec838c7da584529bb74c8123fcea6f5f122b2128 Author: Christoph Hellwig Date: Thu Dec 12 08:34:23 2024 +0100 mm: unexport apply_to_existing_page_range apply_to_existing_page_range() is only used by non-modular code. Link: https://lkml.kernel.org/r/20241212073423.1439954-1-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton mm/memory.c | 1 - 1 file changed, 1 deletion(-) commit 8e6173ccf7b87c1f855e1ad3d94fd50c51d1f46b Author: Jinliang Zheng Date: Fri Dec 13 11:18:20 2024 +0800 mm: fix outdated incorrect code comments for handle_mm_fault() [akpm@linux-foundation.org: s/mmap_Lock/mmap_lock/, per Liam] Link: https://lkml.kernel.org/r/20241213031820.778342-1-alexjlzheng@tencent.com Signed-off-by: Jinliang Zheng Cc: "Liam R. Howlett" Signed-off-by: Andrew Morton mm/memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c2da8b3f914f83fb9089d26a692eb8f22146ddb9 Merge: aa22f4da2a46 8f9530aeeb4f Author: Linus Torvalds Date: Sat Jan 25 20:03:04 2025 -0800 Merge tag 'erofs-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "Still no new features for this cycle, as some ongoing improvements remain premature for now. This includes a micro-optimization for the superblock checksum, along with minor bugfixes and code cleanups, as usual: - Micro-optimize superblock checksum - Avoid overly large bvecs[] for file-backed mounts - Some leftover folio conversion in z_erofs_bind_cache() - Minor bugfixes and cleanups" * tag 'erofs-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: refine z_erofs_get_extent_compressedlen() erofs: remove dead code in erofs_fc_parse_param erofs: return SHRINK_EMPTY if no objects to free erofs: convert z_erofs_bind_cache() to folios erofs: tidy up zdata.c erofs: get rid of `z_erofs_next_pcluster_t` erofs: simplify z_erofs_load_compact_lcluster() erofs: fix potential return value overflow of z_erofs_shrink_scan() erofs: shorten bvecs[] for file-backed mounts erofs: micro-optimize superblock checksum fs: erofs: xattr.c change kzalloc to kcalloc commit 35f5197009cae284cec9beb8b2692d2321a5bd3c Author: Kent Overstreet Date: Sat Jan 25 19:22:50 2025 -0500 bcachefs: Improve journal pin flushing Running the preempt tiering tests with a lower than normal journal reclaim delay turned up a shutdown hang - a lost wakeup, caused because flushing a journal pin (e.g. key cache/write buffer) can generate a new journal pin. The "simple" fix of adding the correct wakeup didn't work because of ordering issues; if we flush btree node pins too aggressively before other pins have completed, we end up spinning where each flush iteration generates new work. So to fix this correctly: - The list of flushed journal pins is now broken out by type, so that we can wait for key cache/write buffer pin flushing to complete before flushing dirty btree nodes - A new closure_waitlist is added for bch2_journal_flush_pins; this one is only used under or when we're taking the journal lock, so it's pretty cheap to add rigorously correct wakeups to journal_pin_set() and journal_pin_drop(). Additionally, bch2_journal_seq_pins_to_text() is moved to journal_reclaim.c, where it belongs, along with a bit of other small renaming and refactoring. Besides fixing the hang, the better ordering between key cache/write buffer flushing and btree node flushing should help or fix the "unmount taking excessively long" a few users have been noticing. Signed-off-by: Kent Overstreet fs/bcachefs/debug.c | 1 + fs/bcachefs/journal.c | 60 ++---------------- fs/bcachefs/journal.h | 2 - fs/bcachefs/journal_reclaim.c | 142 +++++++++++++++++++++++++++++++++++------- fs/bcachefs/journal_reclaim.h | 3 + fs/bcachefs/journal_types.h | 13 ++-- 6 files changed, 136 insertions(+), 85 deletions(-) commit 0c74c85bbe84f765220492938400b9d50d75e985 Author: Kent Overstreet Date: Sat Jan 25 18:09:32 2025 -0500 bcachefs: fix bch2_btree_node_flags Signed-off-by: Kent Overstreet fs/bcachefs/btree_cache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 37fd6b8176520c7ebe4edf78b01f0ee0a0aab62d Author: Kent Overstreet Date: Sat Jan 25 17:19:38 2025 -0500 bcachefs: rebalance, copygc enabled are runtime opts Fix a regression from when these were switched to normal opts.h options. Signed-off-by: Kent Overstreet fs/bcachefs/opts.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa22f4da2a46b484a257d167c67a2adc1b7aaf68 Merge: eda061cccd14 3a53ff95b0be Author: Linus Torvalds Date: Sat Jan 25 16:23:38 2025 -0800 Merge tag 'rproc-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull remoteproc updates from Bjorn Andersson: - Correct error path in rproc_alloc(), with regards to put_device() and freeing of the rproc index ida - The Mediatek SCP remoteproc driver is returned to only creating child devices from specific DeviceTree nodes - Update the OMAP remoteproc driver to match the cleanups in the OMAP iommu driver In addition to this, a number of conversions to devres and other small, mostly stylistic, code cleanups * tag 'rproc-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: remoteproc: st: Use syscon_regmap_lookup_by_phandle_args remoteproc: keystone: Use syscon_regmap_lookup_by_phandle_args remoteproc: st: Simplify with dev_err_probe remoteproc: omap: Simplify returning syscon PTR_ERR remoteproc: keystone: Simplify returning syscon PTR_ERR remoteproc: k3-r5: Add devm action to release tsp remoteproc: k3-r5: Use devm_rproc_add() helper remoteproc: k3-r5: Use devm_ioremap_wc() helper remoteproc: k3-r5: Use devm_kcalloc() helper remoteproc: k3-r5: Add devm action to release reserved memory remoteproc: mtk_scp: Only populate devices for SCP cores remoteproc: omap: Handle ARM dma_iommu_mapping remoteproc: core: Fix ida_free call while not allocated commit eda061cccd146fcbe71051bb4aa5a8672b71216e Merge: 08de7f9d4d39 b3db0b5356ff Author: Linus Torvalds Date: Sat Jan 25 16:19:10 2025 -0800 Merge tag 'linux-watchdog-6.14-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - Add Qualcomm IPQ5424 DT binding - da9052_wdt: add support for bootstatus bits - Other small fixes and improvements * tag 'linux-watchdog-6.14-rc1' of git://www.linux-watchdog.org/linux-watchdog: dt-bindings: watchdog: Document Qualcomm IPQ5424 watchdog: rti_wdt: Fix an OF node leak in rti_wdt_probe() watchdog: max77620: fix excess field in kerneldoc watchdog: sp805_wdt: Drop documentation of non-existent `status` member watchdog: rzv2h_wdt: Use local `dev` pointer in probe watchdog: da9052_wdt: add support for bootstatus bits watchdog: sp805: Report correct timeleft at maximum watchdog: rti: Fix off-by-one in heartbeat recovery commit 08de7f9d4d39fd9aa5e747a13acc891214fa2d5f Merge: 647d69605c70 0ddeb4fe9d3b Author: Linus Torvalds Date: Sat Jan 25 16:12:07 2025 -0800 Merge tag 'mtd/for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD updates from Miquel Raynal: "MTD changes: - There's been no major core change, just a bunch of driver related improvements. Amongst them the conversion to of_property_present() for non-boolean properties, the addition of the support for Fujitsu MB85RS128TY FRAM, a couple of improvements to the phram driver and the usual load of misc changes. Raw NAND changes: - A new controller driver, from Nuvoton, has been merged - Bastien Curutchet has contributed a series improving the Davinci controller driver, both on the organization of the code, but also on the performance side. The binding has also been converted to yaml, received a new OOB layout and now supports on-die ECC engines - The Qualcomm controller driver has been deeply cleaned to extract some parts of the code into a shared file with the Qualcomm SPI memory controller - Aside from these main changes, the Cadence binding has been converted to yaml, the brcmnand controller driver has received a small fix, otherwise some more minor changes have also made their way in SPI NAND changes: - The SPI NAND subsystem has seen a great improvement, with the advent of DTR operations (DDR operations, which may be extended to the address cycles). The first vendor driver to benefit from these improvements is the Winbond driver - A new manufacturer driver is added SkyHigh, with a new constraint for the core, it is impossible to disable the on-die ECC engine - A Foresee device is also now supported SPI NOR changes: - Several flash entries have been added: Atmel AT25SF321, Spansion S28HL256T and S28HL02GT - Support for vcc-supply regulators and their DT bindings has been added - The mx25u25635f entry has been dropped. The flash shares its ID with mx25u25645g and both parts have an SFDP table. Removing their entry lets them be driven by the generic SFDP-based driver" * tag 'mtd/for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (47 commits) mtd: spinand: skyhigh: Align with recent read from cache variant changes mtd: spinand: winbond: Add support for DTR operations mtd: spinand: winbond: Add comment about naming mtd: spinand: winbond: Update the *JW chip definitions mtd: spinand: Add support for read DTR operations mtd: spinand: Enhance the logic when picking a variant mtd: spinand: Add an optional frequency to read from cache macros mtd: spinand: Create distinct fast and slow read from cache variants mtd: hyperbus: Use of_property_present() for non-boolean properties mtd: st_spi_fsm: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() mtd: rawnand: davinci: add ROM supported OOB layout mtd: spi-nor: sysfs: constify 'struct bin_attribute' mtd: spi-nor: spansion: Add support for S28HL02GT mtd: spi-nor: spansion: Add support for S28HL256T mtd: spi-nor: extend description of size member of struct flash_info mtd: rawnand: davinci: Reduce polling interval in NAND_OP_WAITRDY_INSTR mtd: rawnand: qcom: Fix build issue on x86 architecture mtd: rawnand: qcom: use FIELD_PREP and GENMASK mtd: nand: Add qpic_common API file mtd: rawnand: qcom: Add qcom prefix to common api ... commit 647d69605c70368d54fc012fce8a43e8e5955b04 Merge: 184a0997fb77 10ff5bbfd4b0 Author: Linus Torvalds Date: Sat Jan 25 16:03:40 2025 -0800 Merge tag 'pci-v6.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci updates from Bjorn Helgaas: "Enumeration: - Batch sizing of multiple BARs while memory decoding is disabled instead of disabling/enabling decoding for each BAR individually; this optimizes virtualized environments where toggling decoding enable is expensive (Alex Williamson) - Add host bridge .enable_device() and .disable_device() hooks for bridges that need to configure things like Requester ID to StreamID mapping when enabling devices (Frank Li) - Extend struct pci_ecam_ops with .enable_device() and .disable_device() hooks so drivers that use pci_host_common_probe() instead of their own .probe() have a way to set the .enable_device() callbacks (Marc Zyngier) - Drop 'No bus range found' message so we don't complain when DTs don't specify the default 'bus-range = <0x00 0xff>' (Bjorn Helgaas) - Rename the drivers/pci/of_property.c struct of_pci_range to of_pci_range_entry to avoid confusion with the global of_pci_range in include/linux/of_address.h (Bjorn Helgaas) Driver binding: - Update resource request API documentation to encourage callers to supply a driver name when requesting resources (Philipp Stanner) - Export pci_intx_unmanaged() and pcim_intx() (always managed) so callers of pci_intx() (which is sometimes managed) can explicitly choose the one they need (Philipp Stanner) - Convert drivers from pci_intx() to always-managed pcim_intx() or never-managed pci_intx_unmanaged(): amd_sfh, ata (ahci, ata_piix, pata_rdc, sata_sil24, sata_sis, sata_uli, sata_vsc), bnx2x, bna, ntb, qtnfmac, rtsx, tifm_7xx1, vfio, xen-pciback (Philipp Stanner) - Remove pci_intx_unmanaged() since pci_intx() is now always unmanaged and pcim_intx() is always managed (Philipp Stanner) Error handling: - Unexport pcie_read_tlp_log() to encourage drivers to use PCI core logging rather than building their own (Ilpo Järvinen) - Move TLP Log handling to its own file (Ilpo Järvinen) - Store number of supported End-End TLP Prefixes always so we can read the correct number of DWORDs from the TLP Prefix Log (Ilpo Järvinen) - Read TLP Prefixes in addition to the Header Log in pcie_read_tlp_log() (Ilpo Järvinen) - Add pcie_print_tlp_log() to consolidate printing of TLP Header and Prefix Log (Ilpo Järvinen) - Quirk the Intel Raptor Lake-P PIO log size to accommodate vendor BIOSes that don't configure it correctly (Takashi Iwai) ASPM: - Save parent L1 PM Substates config so when we restore it along with an endpoint's config, the parent info isn't junk (Jian-Hong Pan) Power management: - Avoid D3 for Root Ports on TUXEDO Sirius Gen1 with old BIOS because the system can't wake up from suspend (Werner Sembach) Endpoint framework: - Destroy the EPC device in devm_pci_epc_destroy(), which previously didn't call devres_release() (Zijun Hu) - Finish virtual EP removal in pci_epf_remove_vepf(), which previously caused a subsequent pci_epf_add_vepf() to fail with -EBUSY (Zijun Hu) - Write BAR_MASK before iATU registers in pci_epc_set_bar() so we don't depend on the BAR_MASK reset value being larger than the requested BAR size (Niklas Cassel) - Prevent changing BAR size/flags in pci_epc_set_bar() to prevent reads from bypassing the iATU if we reduced the BAR size (Niklas Cassel) - Verify address alignment when programming iATU so we don't attempt to write bits that are read-only because of the BAR size, which could lead to directing accesses to the wrong address (Niklas Cassel) - Implement artpec6 pci_epc_features so we can rely on all drivers supporting it so we can use it in EPC core code (Niklas Cassel) - Check for BARs of fixed size to prevent endpoint drivers from trying to change their size (Niklas Cassel) - Verify that requested BAR size is a power of two when endpoint driver sets the BAR (Niklas Cassel) Endpoint framework tests: - Clear pci-epf-test dma_chan_rx, not dma_chan_tx, after freeing dma_chan_rx (Mohamed Khalfella) - Correct the DMA MEMCPY test so it doesn't fail if the Endpoint supports both DMA_PRIVATE and DMA_MEMCPY (Manivannan Sadhasivam) - Add pci-epf-test and pci_endpoint_test support for capabilities (Niklas Cassel) - Add Endpoint test for consecutive BARs (Niklas Cassel) - Remove redundant comparison from Endpoint BAR test because a > 1MB BAR can always be exactly covered by iterating with a 1MB buffer (Hans Zhang) - Move and convert PCI Endpoint tests from tools/pci to Kselftests (Manivannan Sadhasivam) Apple PCIe controller driver: - Convert StreamID mapping configuration from a bus notifier to the .enable_device() and .disable_device() callbacks (Marc Zyngier) Freescale i.MX6 PCIe controller driver: - Add Requester ID to StreamID mapping configuration when enabling devices (Frank Li) - Use DWC core suspend/resume functions for imx6 (Frank Li) - Add suspend/resume support for i.MX8MQ, i.MX8Q, and i.MX95 (Richard Zhu) - Add DT compatible string 'fsl,imx8q-pcie-ep' and driver support for i.MX8Q series (i.MX8QM, i.MX8QXP, and i.MX8DXL) Endpoints (Frank Li) - Add DT binding for optional i.MX95 Refclk and driver support to enable it if the platform hasn't enabled it (Richard Zhu) - Configure PHY based on controller being in Root Complex or Endpoint mode (Frank Li) - Rely on dbi2 and iATU base addresses from DT via dw_pcie_get_resources() instead of hardcoding them (Richard Zhu) - Deassert apps_reset in imx_pcie_deassert_core_reset() since it is asserted in imx_pcie_assert_core_reset() (Richard Zhu) - Add missing reference clock enable or disable logic for IMX6SX, IMX7D, IMX8MM (Richard Zhu) - Remove redundant imx7d_pcie_init_phy() since imx7d_pcie_enable_ref_clk() does the same thing (Richard Zhu) Freescale Layerscape PCIe controller driver: - Simplify by using syscon_regmap_lookup_by_phandle_args() instead of syscon_regmap_lookup_by_phandle() followed by of_property_read_u32_array() (Krzysztof Kozlowski) Marvell MVEBU PCIe controller driver: - Add MODULE_DEVICE_TABLE() to enable module autoloading (Liao Chen) MediaTek PCIe Gen3 controller driver: - Use clk_bulk_prepare_enable() instead of separate clk_bulk_prepare() and clk_bulk_enable() (Lorenzo Bianconi) - Rearrange reset assert/deassert so they're both done in the *_power_up() callbacks (Lorenzo Bianconi) - Document that Airoha EN7581 requires PHY init and power-on before PHY reset deassert, unlike other MediaTek Gen3 controllers (Lorenzo Bianconi) - Move Airoha EN7581 post-reset delay from the en7581 clock .enable() method to mtk_pcie_en7581_power_up() (Lorenzo Bianconi) - Sleep instead of delay during Airoha EN7581 power-up, since this is a non-atomic context (Lorenzo Bianconi) - Skip PERST# assertion on Airoha EN7581 during probe and suspend/resume to avoid a hardware defect (Lorenzo Bianconi) - Enable async probe to reduce system startup time (Douglas Anderson) Microchip PolarFlare PCIe controller driver: - Set up the inbound address translation based on whether the platform allows coherent or non-coherent DMA (Daire McNamara) - Update DT binding such that platforms are DMA-coherent by default and must specify 'dma-noncoherent' if needed (Conor Dooley) Mobiveil PCIe controller driver: - Convert mobiveil-pcie.txt to YAML and update 'interrupt-names' and 'reg-names' (Frank Li) Qualcomm PCIe controller driver: - Add DT SM8550 and SM8650 optional 'global' interrupt for link events (Neil Armstrong) - Add DT 'compatible' strings for IPQ5424 PCIe controller (Manikanta Mylavarapu) - If 'global' IRQ is supported for detection of Link Up events, tell DWC core not to wait for link up (Krishna chaitanya chundru) Renesas R-Car PCIe controller driver: - Avoid passing stack buffer as resource name (King Dix) Rockchip PCIe controller driver: - Simplify clock and reset handling by using bulk interfaces (Anand Moon) - Pass typed rockchip_pcie (not void) pointer to rockchip_pcie_disable_clocks() (Anand Moon) - Return -ENOMEM, not success, when pci_epc_mem_alloc_addr() fails (Dan Carpenter) Rockchip DesignWare PCIe controller driver: - Use dll_link_up IRQ to detect Link Up and enumerate devices so users don't have to manually rescan (Niklas Cassel) - Tell DWC core not to wait for link up since the 'sys' interrupt is required and detects Link Up events (Niklas Cassel) Synopsys DesignWare PCIe controller driver: - Don't wait for link up in DWC core if driver can detect Link Up event (Krishna chaitanya chundru) - Update ICC and OPP votes after Link Up events (Krishna chaitanya chundru) - Always stop link in dw_pcie_suspend_noirq(), which is required at least for i.MX8QM to re-establish link on resume (Richard Zhu) - Drop racy and unnecessary LTSSM state check before sending PME_TURN_OFF message in dw_pcie_suspend_noirq() (Richard Zhu) - Add struct of_pci_range.parent_bus_addr for devices that need their immediate parent bus address, not the CPU address, e.g., to program an internal Address Translation Unit (iATU) (Frank Li) TI DRA7xx PCIe controller driver: - Simplify by using syscon_regmap_lookup_by_phandle_args() instead of syscon_regmap_lookup_by_phandle() followed by of_parse_phandle_with_fixed_args() or of_property_read_u32_index() (Krzysztof Kozlowski) Xilinx Versal CPM PCIe controller driver: - Add DT binding and driver support for Xilinx Versal CPM5 (Thippeswamy Havalige) MicroSemi Switchtec management driver: - Add Microchip PCI100X device IDs (Rakesh Babu Saladi) Miscellaneous: - Move reset related sysfs code from pci.c to pci-sysfs.c where other similar code lives (Ilpo Järvinen) - Simplify reset_method_store() memory management by using __free() instead of explicit kfree() cleanup (Ilpo Järvinen) - Constify struct bin_attribute for sysfs, VPD, P2PDMA, and the IBM ACPI hotplug driver (Thomas Weißschuh) - Remove redundant PCI_VSEC_HDR and PCI_VSEC_HDR_LEN_SHIFT (Dongdong Zhang) - Correct documentation of the 'config_acs=' kernel parameter (Akihiko Odaki)" * tag 'pci-v6.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: (111 commits) PCI: Batch BAR sizing operations dt-bindings: PCI: microchip,pcie-host: Allow dma-noncoherent PCI: microchip: Set inbound address translation for coherent or non-coherent mode Documentation: Fix pci=config_acs= example PCI: Remove redundant PCI_VSEC_HDR and PCI_VSEC_HDR_LEN_SHIFT PCI: Don't include 'pm_wakeup.h' directly selftests: pci_endpoint: Migrate to Kselftest framework selftests: Move PCI Endpoint tests from tools/pci to Kselftests misc: pci_endpoint_test: Fix IOCTL return value dt-bindings: PCI: qcom: Document the IPQ5424 PCIe controller dt-bindings: PCI: qcom,pcie-sm8550: Document 'global' interrupt dt-bindings: PCI: mobiveil: Convert mobiveil-pcie.txt to YAML PCI: switchtec: Add Microchip PCI100X device IDs misc: pci_endpoint_test: Remove redundant 'remainder' test misc: pci_endpoint_test: Add consecutive BAR test misc: pci_endpoint_test: Add support for capabilities PCI: endpoint: pci-epf-test: Add support for capabilities PCI: endpoint: pci-epf-test: Fix check for DMA MEMCPY test PCI: endpoint: pci-epf-test: Set dma_chan_rx pointer to NULL on error PCI: dwc: Simplify config resource lookup ... commit 184a0997fb77f4a9527fc867fcd16806776c27ce Merge: 405057718a1f c4b7779abc66 Author: Linus Torvalds Date: Sat Jan 25 15:59:46 2025 -0800 Merge tag 'media/v6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Sensor driver fixes - remove dead TI wl128x FM radio driver - Add support for the imx462 sensor at the IMX290 binding - V4L2 pixel data transmitter and receiver documentation improvements - Add support for MIPI Discovery and Configuration for C-PHY line orders - imx8-isi fixes and improvements - stm32: dcmipp: add core support for the stm32mp25 - qcom: camss: Add sc7280 support - Various fixes and enhancements * tag 'media/v6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (152 commits) media: nuvoton: Fix an error check in npcm_video_ece_init() media: dvb-usb-v2: af9035: fix ISO C90 compilation error on af9035_i2c_master_xfer media: platform: rzg2l-cru: rzg2l-video: Fix the comment in rzg2l_cru_start_streaming_vq() media: fix secfeed undefined when filter alloc fail media: dt-bindings: trivial white-space and example cleanup MAINTAINERS: repair file entry in MEDIA DRIVERS FOR STM32 - CSI media: solo6x10: Use const 'struct bin_attribute' callback media: saa7164: Remove unused values staging: media: imx: fix OF node leak in imx_media_add_of_subdevs() media: platform: exynos4-is: Remove unused __is_get_frame_size media: vidtv: Fix a null-ptr-deref in vidtv_mux_stop_thread media: mmp: Bring back registration of the device media: cec: include linux/debugfs.h and linux/seq_file.h where needed Revert "media: qcom: camss: Restructure camss_link_entities" media: venus: Remove unused hfi_core_ping() media: dt-bindings: qcom-venus: Deprecate video-decoder and video-encoder where applicable media: venus: Populate video encoder/decoder nodename entries media: venus: Add support for static video encoder/decoder declarations media: venus: match instance creation and destruction order media: venus: destroy hfi session after m2m_ctx release ... commit e0f63bc68f59d281e2d06e596f6c1bd9382a15cd Author: Gustavo Sousa Date: Tue Jan 21 18:09:25 2025 -0300 drm/print: Include drm_device.h The header drm_print.h uses members of struct drm_device pointers, as such, it should include drm_device.h to let the compiler know the full type definition. Without such include, users of drm_print.h that don't explicitly need drm_device.h would bump into build errors and be forced to include the latter. Signed-off-by: Gustavo Sousa Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20250121210935.84357-1-gustavo.sousa@intel.com Signed-off-by: Lucas De Marchi include/drm/drm_print.h | 1 + 1 file changed, 1 insertion(+) commit 2efbc3518fb3dad164643099fa8ce62361894243 Author: Kent Overstreet Date: Fri Jan 24 09:23:02 2025 -0500 bcachefs: Improve decompression error messages Ratelimit them, and use the new bch2_write_op_error() helper that prints path and file offset. Reported-by: https://github.com/koverstreet/bcachefs/issues/819 Signed-off-by: Kent Overstreet fs/bcachefs/compress.c | 31 ++++++++++++++++++++++--------- fs/bcachefs/compress.h | 4 ++-- fs/bcachefs/io_write.c | 4 ++-- fs/bcachefs/io_write.h | 2 ++ 4 files changed, 28 insertions(+), 13 deletions(-) commit 405057718a1f9074133979a9f2ff0c9fa4a19948 Merge: fd56e5104a37 6beaa75cd24d Author: Linus Torvalds Date: Sat Jan 25 10:21:13 2025 -0800 Merge tag 'kgdb-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux Pull kgdb updates from Daniel Thompson: "A very small set of changes this kernel cycle. Two cleanups, one switches to kmap_local_page() (from kmap_atomic()) and the other removes a bit of dead code" * tag 'kgdb-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux: kdb: Remove unused flags stack kdb: use kmap_local_page() commit fd56e5104a37f96e1b1ca42b4fd64fd49257fdce Merge: 0f8e26b38d7a ea1413e5b53a Author: Linus Torvalds Date: Sat Jan 25 10:16:56 2025 -0800 Merge tag 'for-linus' of https://github.com/openrisc/linux Pull OpenRISC updates from Stafford Horne: - Added support for restartable sequences (me) - Migration to Generic built-in DTB (Masahiro Yamada) * tag 'for-linus' of https://github.com/openrisc/linux: rseq/selftests: Add support for OpenRISC openrisc: Add support for restartable sequences openrisc: Add HAVE_REGS_AND_STACK_ACCESS_API support openrisc: migrate to the generic rule for built-in DTB commit 0f8e26b38d7ac72b3ad764944a25dd5808f37a6e Merge: 382e391365ca 931656b9e2ff Author: Linus Torvalds Date: Sat Jan 25 09:55:09 2025 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm updates from Paolo Bonzini: "Loongarch: - Clear LLBCTL if secondary mmu mapping changes - Add hypercall service support for usermode VMM x86: - Add a comment to kvm_mmu_do_page_fault() to explain why KVM performs a direct call to kvm_tdp_page_fault() when RETPOLINE is enabled - Ensure that all SEV code is compiled out when disabled in Kconfig, even if building with less brilliant compilers - Remove a redundant TLB flush on AMD processors when guest CR4.PGE changes - Use str_enabled_disabled() to replace open coded strings - Drop kvm_x86_ops.hwapic_irr_update() as KVM updates hardware's APICv cache prior to every VM-Enter - Overhaul KVM's CPUID feature infrastructure to track all vCPU capabilities instead of just those where KVM needs to manage state and/or explicitly enable the feature in hardware. Along the way, refactor the code to make it easier to add features, and to make it more self-documenting how KVM is handling each feature - Rework KVM's handling of VM-Exits during event vectoring; this plugs holes where KVM unintentionally puts the vCPU into infinite loops in some scenarios (e.g. if emulation is triggered by the exit), and brings parity between VMX and SVM - Add pending request and interrupt injection information to the kvm_exit and kvm_entry tracepoints respectively - Fix a relatively benign flaw where KVM would end up redoing RDPKRU when loading guest/host PKRU, due to a refactoring of the kernel helpers that didn't account for KVM's pre-checking of the need to do WRPKRU - Make the completion of hypercalls go through the complete_hypercall function pointer argument, no matter if the hypercall exits to userspace or not. Previously, the code assumed that KVM_HC_MAP_GPA_RANGE specifically went to userspace, and all the others did not; the new code need not special case KVM_HC_MAP_GPA_RANGE and in fact does not care at all whether there was an exit to userspace or not - As part of enabling TDX virtual machines, support support separation of private/shared EPT into separate roots. When TDX will be enabled, operations on private pages will need to go through the privileged TDX Module via SEAMCALLs; as a result, they are limited and relatively slow compared to reading a PTE. The patches included in 6.14 allow KVM to keep a mirror of the private EPT in host memory, and define entries in kvm_x86_ops to operate on external page tables such as the TDX private EPT - The recently introduced conversion of the NX-page reclamation kthread to vhost_task moved the task under the main process. The task is created as soon as KVM_CREATE_VM was invoked and this, of course, broke userspace that didn't expect to see any child task of the VM process until it started creating its own userspace threads. In particular crosvm refuses to fork() if procfs shows any child task, so unbreak it by creating the task lazily. This is arguably a userspace bug, as there can be other kinds of legitimate worker tasks and they wouldn't impede fork(); but it's not like userspace has a way to distinguish kernel worker tasks right now. Should they show as "Kthread: 1" in proc/.../status? x86 - Intel: - Fix a bug where KVM updates hardware's APICv cache of the highest ISR bit while L2 is active, while ultimately results in a hardware-accelerated L1 EOI effectively being lost - Honor event priority when emulating Posted Interrupt delivery during nested VM-Enter by queueing KVM_REQ_EVENT instead of immediately handling the interrupt - Rework KVM's processing of the Page-Modification Logging buffer to reap entries in the same order they were created, i.e. to mark gfns dirty in the same order that hardware marked the page/PTE dirty - Misc cleanups Generic: - Cleanup and harden kvm_set_memory_region(); add proper lockdep assertions when setting memory regions and add a dedicated API for setting KVM-internal memory regions. The API can then explicitly disallow all flags for KVM-internal memory regions - Explicitly verify the target vCPU is online in kvm_get_vcpu() to fix a bug where KVM would return a pointer to a vCPU prior to it being fully online, and give kvm_for_each_vcpu() similar treatment to fix a similar flaw - Wait for a vCPU to come online prior to executing a vCPU ioctl, to fix a bug where userspace could coerce KVM into handling the ioctl on a vCPU that isn't yet onlined - Gracefully handle xarray insertion failures; even though such failures are impossible in practice after xa_reserve(), reserving an entry is always followed by xa_store() which does not know (or differentiate) whether there was an xa_reserve() before or not RISC-V: - Zabha, Svvptc, and Ziccrse extension support for guests. None of them require anything in KVM except for detecting them and marking them as supported; Zabha adds byte and halfword atomic operations, while the others are markers for specific operation of the TLB and of LL/SC instructions respectively - Virtualize SBI system suspend extension for Guest/VM - Support firmware counters which can be used by the guests to collect statistics about traps that occur in the host Selftests: - Rework vcpu_get_reg() to return a value instead of using an out-param, and update all affected arch code accordingly - Convert the max_guest_memory_test into a more generic mmu_stress_test. The basic gist of the "conversion" is to have the test do mprotect() on guest memory while vCPUs are accessing said memory, e.g. to verify KVM and mmu_notifiers are working as intended - Play nice with treewrite builds of unsupported architectures, e.g. arm (32-bit), as KVM selftests' Makefile doesn't do anything to ensure the target architecture is actually one KVM selftests supports - Use the kernel's $(ARCH) definition instead of the target triple for arch specific directories, e.g. arm64 instead of aarch64, mainly so as not to be different from the rest of the kernel - Ensure that format strings for logging statements are checked by the compiler even when the logging statement itself is disabled - Attempt to whack the last LLC references/misses mole in the Intel PMU counters test by adding a data load and doing CLFLUSH{OPT} on the data instead of the code being executed. It seems that modern Intel CPUs have learned new code prefetching tricks that bypass the PMU counters - Fix a flaw in the Intel PMU counters test where it asserts that events are counting correctly without actually knowing what the events count given the underlying hardware; this can happen if Intel reuses a formerly microarchitecture-specific event encoding as an architectural event, as was the case for Top-Down Slots" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (151 commits) kvm: defer huge page recovery vhost task to later KVM: x86/mmu: Return RET_PF* instead of 1 in kvm_mmu_page_fault() KVM: Disallow all flags for KVM-internal memslots KVM: x86: Drop double-underscores from __kvm_set_memory_region() KVM: Add a dedicated API for setting KVM-internal memslots KVM: Assert slots_lock is held when setting memory regions KVM: Open code kvm_set_memory_region() into its sole caller (ioctl() API) LoongArch: KVM: Add hypercall service support for usermode VMM LoongArch: KVM: Clear LLBCTL if secondary mmu mapping is changed KVM: SVM: Use str_enabled_disabled() helper in svm_hardware_setup() KVM: VMX: read the PML log in the same order as it was written KVM: VMX: refactor PML terminology KVM: VMX: Fix comment of handle_vmx_instruction() KVM: VMX: Reinstate __exit attribute for vmx_exit() KVM: SVM: Use str_enabled_disabled() helper in sev_hardware_setup() KVM: x86: Avoid double RDPKRU when loading host/guest PKRU KVM: x86: Use LVT_TIMER instead of an open coded literal RISC-V: KVM: Add new exit statstics for redirected traps RISC-V: KVM: Update firmware counters for various events RISC-V: KVM: Redirect instruction access fault trap to guest ... commit 382e391365ca12d1e5a15f109ba8b4609d58db6b Merge: b46c89c08f41 2e03358be78b Author: Linus Torvalds Date: Sat Jan 25 09:22:55 2025 -0800 Merge tag 'hyperv-next-signed-20250123' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv updates from Wei Liu: - Introduce a new set of Hyper-V headers in include/hyperv and replace the old hyperv-tlfs.h with the new headers (Nuno Das Neves) - Fixes for the Hyper-V VTL mode (Roman Kisel) - Fixes for cpu mask usage in Hyper-V code (Michael Kelley) - Document the guest VM hibernation behaviour (Michael Kelley) - Miscellaneous fixes and cleanups (Jacob Pan, John Starks, Naman Jain) * tag 'hyperv-next-signed-20250123' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: Documentation: hyperv: Add overview of guest VM hibernation hyperv: Do not overlap the hvcall IO areas in hv_vtl_apicid_to_vp_id() hyperv: Do not overlap the hvcall IO areas in get_vtl() hyperv: Enable the hypercall output page for the VTL mode hv_balloon: Fallback to generic_online_page() for non-HV hot added mem Drivers: hv: vmbus: Log on missing offers if any Drivers: hv: vmbus: Wait for boot-time offers during boot and resume uio_hv_generic: Add a check for HV_NIC for send, receive buffers setup iommu/hyper-v: Don't assume cpu_possible_mask is dense Drivers: hv: Don't assume cpu_possible_mask is dense x86/hyperv: Don't assume cpu_possible_mask is dense hyperv: Remove the now unused hyperv-tlfs.h files hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h hyperv: Add new Hyper-V headers in include/hyperv hyperv: Clean up unnecessary #includes hyperv: Move hv_connection_id to hyperv-tlfs.h commit 0f3a822ae2254a1e7ce3a130a1efd94e2cab73ee Author: Takashi Iwai Date: Sat Jan 25 13:04:40 2025 +0100 ALSA: hda/realtek: Fix quirk matching for Legion Pro 7 The recent cleanup of the quirk table entries with the codec ID matching caused a regression on some Lenovo Legion 7 models with PCI SSID 17aa:386f: it assumed wrongly as if the codec SSID on the machine were also 17aa:386f, but in this case, it was 17aa:38a8. This made the binding with a wrong sub-codec, instead of TAS2781, the Cirrus codec was bound. For addressing the regression, correct the quirk entry to the right value 17aa:38a8. Note that this makes the entry appearing in an unsorted position. This exception is needed because the entry must match before the PCI SSID 17aa:386f. Also there is another entry for 17aa:38a8, but the latter is for PCI SSID matching while the new entry is for the codec SSID matching. Fixes: 504f052aa343 ("ALSA: hda/realtek: Use codec SSID matching for Lenovo devices") Reported-and-tested-by: Samantha Glocker Closes: https://lore.kernel.org/CAGPQRHYd48U__UKYj2jJnT4+dnNNoWRBi+wj6zPRn=JpNMBUrg@mail.gmail.com Cc: Link: https://patch.msgid.link/20250125120519.16420-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 307094c9e26ef704d7061733f8d6fab9ca2ad09a Author: Huacai Chen Date: Sat Jan 25 18:51:43 2025 +0800 LoongArch: Adjust SETUP_SLEEP and SETUP_WAKEUP SETUP_SLEEP should only save the GPR context, which is symmetric to SETUP_WAKEUP, so move the acpi_saved_sp handling out of SETUP_SLEEP. Move "addi.d sp, sp, PT_SIZE" into SETUP_WAKEUP for the same reason. No functional changes. Signed-off-by: Huacai Chen arch/loongarch/power/suspend_asm.S | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 5d0cc7e585432b64a18aefab8876a8c433394560 Author: Huacai Chen Date: Sat Jan 25 18:51:42 2025 +0800 LoongArch: Refactor bug_handler() implementation 1. Early return for user mode triggered exception with all types. 2. Give a chance to call fixup_exception() for default types (like S390). Signed-off-by: Huacai Chen arch/loongarch/kernel/traps.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 0816b2ea18284e2598faec024a4df6a93591bd17 Author: Huacai Chen Date: Sat Jan 25 18:51:42 2025 +0800 LoongArch: Add pgprot_nx() implementation Commit cca98e9f8b5ebcd964 ("mm: enforce that vmap can't map pages executable") enforces the W^X protection by not allowing remapping existing pages as executable. Add LoongArch bits so that LoongArch can benefit the same protection. Signed-off-by: Huacai Chen arch/loongarch/include/asm/pgtable-bits.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 613d4164f5a5032716f79106f48a59286c7b1c24 Author: Huacai Chen Date: Sat Jan 25 18:51:42 2025 +0800 LoongArch: Correct the __switch_to() prototype in comments Correct the __switch_to() prototype in comments, keep it be the same as the declaration in switch_to.h. Signed-off-by: Huacai Chen arch/loongarch/kernel/switch.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b62a03049f141061d0397bfa86b74f65985d9338 Author: Huacai Chen Date: Sat Jan 25 18:51:33 2025 +0800 LoongArch: Correct the cacheinfo sharing information SMT cores and their sibling cores share the same L1 and L2 private caches (of course last level cache is also shared), so correct the cacheinfo sharing information to let shared_cpu_map correctly reflect this relationship. Below is the output of "lscpu" on Loongson-3A6000 (4 cores, 8 threads). 1. Before patch: L1d: 512 KiB (8 instances) L1i: 512 KiB (8 instances) L2: 2 MiB (8 instances) L3: 16 MiB (1 instance) 2. After patch: L1d: 256 KiB (4 instances) L1i: 256 KiB (4 instances) L2: 1 MiB (4 instances) L3: 16 MiB (1 instance) Reported-by: Chao Li Signed-off-by: Juxin Gao Signed-off-by: Huacai Chen arch/loongarch/kernel/cacheinfo.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 98e720f77dba6bb702a57f3d8479e6445e34f38c Author: Jiaxun Yang Date: Sat Jan 25 18:51:33 2025 +0800 LoongArch: Derive timer max_delta from PRCFG1's timer_bits As per arch spec, maximum timer bits is configurable and should not be hardcoded in any way. Probe timer bits from PRCFG1 and use that to determine the clockevent's max_delta to be conformance. Signed-off-by: Jiaxun Yang Signed-off-by: Huacai Chen arch/loongarch/include/asm/cpu-info.h | 1 + arch/loongarch/include/asm/loongarch.h | 1 - arch/loongarch/kernel/cpu-probe.c | 1 + arch/loongarch/kernel/time.c | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-) commit 341cf992d331a34d764bf943e4e177daff94fc92 Author: Jiaxun Yang Date: Sat Jan 25 18:51:33 2025 +0800 LoongArch: Disable FIX_EARLYCON_MEM when ARCH_IOREMAP is enabled When ARCH_IOREMAP is enabled, we are using always accessible DMW for ioremap(). It makes no sense to create a dedicated mapping for earlycon given that we can access the region via DMW. Disable FIX_EARLYCON_MEM when ARCH_IOREMAP is selected. This can ease debugging for early mapping issues. Signed-off-by: Jiaxun Yang Signed-off-by: Huacai Chen arch/loongarch/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c91ddab5799109124ccdfa88fd381c613a766a89 Author: Masahiro Yamada Date: Sat Jan 25 18:51:33 2025 +0800 LoongArch: 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 when built-in DTB support is enabled. Signed-off-by: Masahiro Yamada Signed-off-by: Huacai Chen arch/loongarch/Kbuild | 1 - arch/loongarch/Kconfig | 1 + arch/loongarch/boot/dts/Makefile | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) commit 09e9d370ceb304418b47fd1fda901f00c7f450a0 Merge: ffd294d346d1 a4b3990e01df Author: Huacai Chen Date: Sat Jan 25 18:15:32 2025 +0800 Merge tag 'irq-core-2025-01-21' into loongarch-next LoongArch architecture changes for 6.14 depend on the irq-core changes (AVECINTC fixes) to work well for NUMA, so merge them to create a base. commit 6beaa75cd24d660e7913c60aff702ec809ff9b28 Author: Dr. David Alan Gilbert Date: Sun Jan 12 01:20:49 2025 +0000 kdb: Remove unused flags stack kdb_restore_flags() and kdb_save_flags() were added in 2010 by commit 5d5314d6795f ("kdb: core for kgdb back end (1 of 2)") but have remained unused. Remove them, and their associated storage. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20250112012049.319515-1-linux@treblig.org Signed-off-by: Daniel Thompson (RISCstar) include/linux/kdb.h | 3 --- kernel/debug/kdb/kdb_support.c | 18 ------------------ 2 files changed, 21 deletions(-) commit 36975ec3a2c15c20f0df312633f4272da649d8fc Author: Zhang Heng Date: Mon Dec 23 16:54:20 2024 +0800 kdb: use kmap_local_page() Use kmap_local_page() instead of kmap_atomic() which has been deprecated. Signed-off-by: Zhang Heng Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20241223085420.1815930-1-zhangheng@kylinos.cn Signed-off-by: Daniel Thompson (RISCstar) kernel/debug/kdb/kdb_support.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit beeba1eeec9c75d0a62335861ac175b9bdccfbd5 Author: Thorsten Blum Date: Fri Jan 17 10:13:29 2025 +0100 ocfs2: use str_yes_no() and str_no_yes() helper functions Remove hard-coded strings by using the str_yes_no() and str_no_yes() helper functions. Link: https://lkml.kernel.org/r/20250117091335.1189-2-thorsten.blum@linux.dev 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 fs/ocfs2/dlm/dlmdebug.c | 9 +++++---- fs/ocfs2/dlm/dlmmaster.c | 12 ++++++------ fs/ocfs2/dlm/dlmrecovery.c | 7 +++---- fs/ocfs2/dlmglue.c | 3 ++- 4 files changed, 16 insertions(+), 15 deletions(-) commit f0ef073e213a3a1a494b6f55a76ce1242600a453 Author: Gao Xiang Date: Tue Jan 14 21:04:54 2025 +0800 include/linux/lz4.h: add some missing macros Currently, LZ4_DISTANCE_MAX and LZ4_DECOMPRESS_INPLACE_MARGIN are defined in the erofs subsystem for LZ4 in-place decompression, which is somewhat unsuitable since they should belong to the LZ4 itself and may change with future LZ4 codebase updates. Move them to include/linux/lz4.h to match the upstream LZ4 library [1]. No logic changes. [1] https://github.com/lz4/lz4/blob/v1.10.0/lib/lz4.h#L670 Link: https://lkml.kernel.org/r/20250114130454.1191150-1-hsiangkao@linux.alibaba.com Signed-off-by: Gao Xiang Cc: Yann Collet Cc: Nick Terrell Cc: Chao Yu Cc: Yue Hu Cc; Jeffle Xu Cc: Sandeep Dhavale Signed-off-by: Andrew Morton fs/erofs/decompressor.c | 7 ------- include/linux/lz4.h | 6 ++++++ lib/lz4/lz4_compress.c | 1 - lib/lz4/lz4_decompress.c | 1 - lib/lz4/lz4defs.h | 4 ++-- lib/lz4/lz4hc_compress.c | 1 - 6 files changed, 8 insertions(+), 12 deletions(-) commit 13fd5cf37456620b57106dbfa89c5aad5f195343 Author: Kemeng Shi Date: Fri Dec 13 20:25:23 2024 +0800 Xarray: use xa_mark_t in xas_squash_marks() to keep code consistent Besides xas_squash_marks(), all functions use xa_mark_t type to iterate all possible marks. Use xa_mark_t in xas_squash_marks() to keep code consistent. Link: https://lkml.kernel.org/r/20241213122523.12764-6-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Cc: Mattew Wilcox Signed-off-by: Andrew Morton lib/xarray.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 1988b318b32d3a0260e05bf6643990230df35843 Author: Kemeng Shi Date: Fri Dec 13 20:25:22 2024 +0800 Xarray: remove repeat check in xas_squash_marks() Caller of xas_squash_marks() has ensured xas->xa_sibs is non-zero. Just remove repeat check of xas->xa_sibs in xas_squash_marks(). Link: https://lkml.kernel.org/r/20241213122523.12764-5-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Cc: Mattew Wilcox Signed-off-by: Andrew Morton lib/xarray.c | 3 --- 1 file changed, 3 deletions(-) commit 97db889b961ef3f849813de34bd3ea5715813ed0 Author: Kemeng Shi Date: Fri Dec 13 20:25:21 2024 +0800 Xarray: distinguish large entries correctly in xas_split_alloc() We don't support large entries which expand two more level xa_node in split. For case "xas->xa_shift + 2 * XA_CHUNK_SHIFT == order", we also need two level of xa_node to expand. Distinguish entry as large entry in case "xas->xa_shift + 2 * XA_CHUNK_SHIFT == order". As max order of folio in pagecache (MAX_PAGECACHE_ORDER) is <= (XA_CHUNK_SHIFT * 2 - 1), this change is more likely a cleanup... Link: https://lkml.kernel.org/r/20241213122523.12764-4-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Cc: Mattew Wilcox Signed-off-by: Andrew Morton lib/xarray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9ba5249ef8b080c6779d3da14a061f6d4d6d5fa Author: Kemeng Shi Date: Fri Dec 13 20:25:20 2024 +0800 Xarray: move forward index correctly in xas_pause() After xas_load(), xas->index could point to mid of found multi-index entry and xas->index's bits under node->shift maybe non-zero. The afterward xas_pause() will move forward xas->index with xa->node->shift with bits under node->shift un-masked and thus skip some index unexpectedly. Consider following case: Assume XA_CHUNK_SHIFT is 4. xa_store_range(xa, 16, 31, ...) xa_store(xa, 32, ...) XA_STATE(xas, xa, 17); xas_for_each(&xas,...) xas_load(&xas) /* xas->index = 17, xas->xa_offset = 1, xas->xa_node->xa_shift = 4 */ xas_pause() /* xas->index = 33, xas->xa_offset = 2, xas->xa_node->xa_shift = 4 */ As we can see, index of 32 is skipped unexpectedly. Fix this by mask bit under node->xa_shift when move forward index in xas_pause(). For now, this will not cause serious problems. Only minor problem like cachestat return less number of page status could happen. Link: https://lkml.kernel.org/r/20241213122523.12764-3-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Cc: Mattew Wilcox Signed-off-by: Andrew Morton lib/test_xarray.c | 35 +++++++++++++++++++++++++++++++++++ lib/xarray.c | 1 + 2 files changed, 36 insertions(+) commit 7e060df04f562b37bdc101fd06b16f013e2d989b Author: Kemeng Shi Date: Fri Dec 13 20:25:19 2024 +0800 Xarray: do not return sibling entries from xas_find_marked() Patch series "Fixes and cleanups to xarray", v5. This series contains some random fixes and cleanups to xarray. Patch 1-2 are fixes and patch 3-6 are cleanups. More details can be found in respective patches. This patch (of 5): Similar to issue fixed in commit cbc02854331ed ("XArray: Do not return sibling entries from xa_load()"), we may return sibling entries from xas_find_marked as following: Thread A: Thread B: xa_store_range(xa, entry, 6, 7, gfp); xa_set_mark(xa, 6, mark) XA_STATE(xas, xa, 6); xas_find_marked(&xas, 7, mark); offset = xas_find_chunk(xas, advance, mark); [offset is 6 which points to a valid entry] xa_store_range(xa, entry, 4, 7, gfp); entry = xa_entry(xa, node, 6); [entry is a sibling of 4] if (!xa_is_node(entry)) return entry; Skip sibling entry like xas_find() does to protect caller from seeing sibling entry from xas_find_marked() or caller may use sibling entry as a valid entry and crash the kernel. Besides, load_race() test is modified to catch mentioned issue and modified load_race() only passes after this fix is merged. Here is an example how this bug could be triggerred in tmpfs which enables large folio in mapping: Let's take a look at involved racer: 1. How pages could be created and dirtied in shmem file. write ksys_write vfs_write new_sync_write shmem_file_write_iter generic_perform_write shmem_write_begin shmem_get_folio shmem_allowable_huge_orders shmem_alloc_and_add_folios shmem_alloc_folio __folio_set_locked shmem_add_to_page_cache XA_STATE_ORDER(..., index, order) xax_store() shmem_write_end folio_mark_dirty() 2. How dirty pages could be deleted in shmem file. ioctl do_vfs_ioctl file_ioctl ioctl_preallocate vfs_fallocate shmem_fallocate shmem_truncate_range shmem_undo_range truncate_inode_folio filemap_remove_folio page_cache_delete xas_store(&xas, NULL); 3. How dirty pages could be lockless searched sync_file_range ksys_sync_file_range __filemap_fdatawrite_range filemap_fdatawrite_wbc do_writepages writeback_use_writepage writeback_iter writeback_get_folio filemap_get_folios_tag find_get_entry folio = xas_find_marked() folio_try_get(folio) Kernel will crash as following: 1.Create 2.Search 3.Delete /* write page 2,3 */ write ... shmem_write_begin XA_STATE_ORDER(xas, i_pages, index = 2, order = 1) xa_store(&xas, folio) shmem_write_end folio_mark_dirty() /* sync page 2 and page 3 */ sync_file_range ... find_get_entry folio = xas_find_marked() /* offset will be 2 */ offset = xas_find_chunk() /* delete page 2 and page 3 */ ioctl ... xas_store(&xas, NULL); /* write page 0-3 */ write ... shmem_write_begin XA_STATE_ORDER(xas, i_pages, index = 0, order = 2) xa_store(&xas, folio) shmem_write_end folio_mark_dirty(folio) /* get sibling entry from offset 2 */ entry = xa_entry(.., 2) /* use sibling entry as folio and crash kernel */ folio_try_get(folio) Link: https://lkml.kernel.org/r/20241213122523.12764-1-shikemeng@huaweicloud.com Link: https://lkml.kernel.org/r/20241213122523.12764-2-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Cc: Mattew Wilcox [English fixes] Signed-off-by: Andrew Morton lib/xarray.c | 2 ++ tools/testing/radix-tree/multiorder.c | 4 ++++ 2 files changed, 6 insertions(+) commit cb7c77e9c06a583a2e843554a7ef61c1f1af13f4 Author: Randy Dunlap Date: Fri Jan 10 22:29:05 2025 -0800 ipc/util.c: complete the kernel-doc function descriptions Move the function descriptive comments so that they conform to kernel-doc format, eliminating the kernel-doc warnings. util.c:618: warning: missing initial short description on line: * ipc_obtain_object_idr util.c:640: warning: missing initial short description on line: * ipc_obtain_object_check Link: https://lkml.kernel.org/r/20250111062905.910576-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton ipc/util.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 9c9ce355b1013a7ef37c06007cb8d714eaf4c303 Author: Randy Dunlap Date: Fri Jan 10 22:29:44 2025 -0800 gcov: clang: use correct function param names Fix the function parameter names to match the function so that the kernel-doc warnings disappear. clang.c:273: warning: Function parameter or struct member 'dst' not described in 'gcov_info_add' clang.c:273: warning: Function parameter or struct member 'src' not described in 'gcov_info_add' clang.c:273: warning: Excess function parameter 'dest' description in 'gcov_info_add' clang.c:273: warning: Excess function parameter 'source' description in 'gcov_info_add' Link: https://lkml.kernel.org/r/20250111062944.910638-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Peter Oberparleiter Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Bill Wendling Cc: Justin Stitt Signed-off-by: Andrew Morton kernel/gcov/clang.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 690794430afa75028a7daed65ba5c9f590d057ff Author: Randy Dunlap Date: Fri Jan 10 22:30:19 2025 -0800 latencytop: use correct kernel-doc format for func params Use a ':' instead of a '-' after function parameters to eliminate kernel-doc warnings. kernel/latencytop.c:177: warning: Function parameter or struct member 'tsk' not described in '__account_scheduler_latency' ../kernel/latencytop.c:177: warning: Function parameter or struct member 'usecs' not described in '__account_scheduler_latency' ../kernel/latencytop.c:177: warning: Function parameter or struct member 'inter' not described in '__account_scheduler_latency' Link: https://lkml.kernel.org/r/20250111063019.910730-1-rdunlap@infradead.org Fixes: ad0b0fd554df ("sched, latencytop: incorporate review feedback from Andrew Morton") Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton kernel/latencytop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2b97aaf74ed534fb838d09867d09a3ca5d795208 Author: David Laight Date: Mon Nov 18 19:15:51 2024 +0000 minmax.h: remove some #defines that are only expanded once The bodies of __signed_type_use() and __unsigned_type_use() are much the same size as their names - so put the bodies in the only line that expands them. Similarly __signed_type() is defined separately for 64bit and then used exactly once just below. Change the test for __signed_type from CONFIG_64BIT to one based on gcc defined macros so that the code is valid if it gets used outside of a kernel build. Link: https://lkml.kernel.org/r/9386d1ebb8974fbabbed2635160c3975@AcuMS.aculab.com Signed-off-by: David Laight Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Dan Carpenter Cc: Jason A. Donenfeld Cc: Jens Axboe Cc: Lorenzo Stoakes Cc: Mateusz Guzik Cc: Matthew Wilcox Cc: Pedro Falcato Signed-off-by: Andrew Morton include/linux/minmax.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 495bba17cdf95e9703af1b8ef773c55ef0dfe703 Author: David Laight Date: Mon Nov 18 19:15:05 2024 +0000 minmax.h: simplify the variants of clamp() Always pass a 'type' through to __clamp_once(), pass '__auto_type' from clamp() itself. The expansion of __types_ok3() is reasonable so it isn't worth the added complexity of avoiding it when a fixed type is used for all three values. Link: https://lkml.kernel.org/r/8f69f4deac014f558bab186444bac2e8@AcuMS.aculab.com Signed-off-by: David Laight Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Dan Carpenter Cc: Jason A. Donenfeld Cc: Jens Axboe Cc: Lorenzo Stoakes Cc: Mateusz Guzik Cc: Matthew Wilcox Cc: Pedro Falcato Signed-off-by: Andrew Morton include/linux/minmax.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit c3939872ee4a6b8bdcd0e813c66823b31e6e26f7 Author: David Laight Date: Mon Nov 18 19:14:19 2024 +0000 minmax.h: move all the clamp() definitions after the min/max() ones At some point the definitions for clamp() got added in the middle of the ones for min() and max(). Re-order the definitions so they are more sensibly grouped. Link: https://lkml.kernel.org/r/8bb285818e4846469121c8abc3dfb6e2@AcuMS.aculab.com Signed-off-by: David Laight Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Dan Carpenter Cc: Jason A. Donenfeld Cc: Jens Axboe Cc: Lorenzo Stoakes Cc: Mateusz Guzik Cc: Matthew Wilcox Cc: Pedro Falcato Signed-off-by: Andrew Morton include/linux/minmax.h | 109 +++++++++++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 58 deletions(-) commit a5743f32baec4728711bbc01d6ac2b33d4c67040 Author: David Laight Date: Mon Nov 18 19:13:31 2024 +0000 minmax.h: use BUILD_BUG_ON_MSG() for the lo < hi test in clamp() Use BUILD_BUG_ON_MSG(statically_true(ulo > uhi), ...) for the sanity check of the bounds in clamp(). Gives better error coverage and one less expansion of the arguments. Link: https://lkml.kernel.org/r/34d53778977747f19cce2abb287bb3e6@AcuMS.aculab.com Signed-off-by: David Laight Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Dan Carpenter Cc: Jason A. Donenfeld Cc: Jens Axboe Cc: Lorenzo Stoakes Cc: Mateusz Guzik Cc: Matthew Wilcox Cc: Pedro Falcato Signed-off-by: Andrew Morton include/linux/minmax.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b280bb27a9f7c91ddab730e1ad91a9c18a051f41 Author: David Laight Date: Mon Nov 18 19:12:50 2024 +0000 minmax.h: reduce the #define expansion of min(), max() and clamp() Since the test for signed values being non-negative only relies on __builtion_constant_p() (not is_constexpr()) it can use the 'ux' variable instead of the caller supplied expression. This means that the #define parameters are only expanded twice. Once in the code and once quoted in the error message. Link: https://lkml.kernel.org/r/051afc171806425da991908ed8688a98@AcuMS.aculab.com Signed-off-by: David Laight Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Dan Carpenter Cc: Jason A. Donenfeld Cc: Jens Axboe Cc: Lorenzo Stoakes Cc: Mateusz Guzik Cc: Matthew Wilcox Cc: Pedro Falcato Signed-off-by: Andrew Morton include/linux/minmax.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 10666e99204818ef45c702469488353b5bb09ec7 Author: David Laight Date: Mon Nov 18 19:12:07 2024 +0000 minmax.h: update some comments - Change three to several. - Remove the comment about retaining constant expressions, no longer true. - Realign to nearer 80 columns and break on major punctiation. - Add a leading comment to the block before __signed_type() and __is_nonneg() Otherwise the block explaining the cast is a bit 'floating'. Reword the rest of that comment to improve readability. Link: https://lkml.kernel.org/r/85b050c81c1d4076aeb91a6cded45fee@AcuMS.aculab.com Signed-off-by: David Laight Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Dan Carpenter Cc: Jason A. Donenfeld Cc: Jens Axboe Cc: Lorenzo Stoakes Cc: Mateusz Guzik Cc: Matthew Wilcox Cc: Pedro Falcato Signed-off-by: Andrew Morton include/linux/minmax.h | 53 +++++++++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 29 deletions(-) commit 71ee9b16251ea4bf7c1fe222517c82bdb3220acc Author: David Laight Date: Mon Nov 18 19:11:24 2024 +0000 minmax.h: add whitespace around operators and after commas Patch series "minmax.h: Cleanups and minor optimisations". Some tidyups and minor changes to minmax.h. This patch (of 7): Link: https://lkml.kernel.org/r/c50365d214e04f9ba256d417c8bebbc0@AcuMS.aculab.com Link: https://lkml.kernel.org/r/f04b2e1310244f62826267346fde0553@AcuMS.aculab.com Signed-off-by: David Laight Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Dan Carpenter Cc: Jason A. Donenfeld Cc: Jens Axboe Cc: Lorenzo Stoakes Cc: Mateusz Guzik Cc: Matthew Wilcox Cc: Pedro Falcato Signed-off-by: Andrew Morton include/linux/minmax.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit e30ccbb9c022660c52648f02ab6231d5dcaf4253 Author: Ryusuke Konishi Date: Sat Jan 11 23:26:36 2025 +0900 nilfs2: do not update mtime of renamed directory that is not moved A minor issue with nilfs_rename, originating from an old ext2 implementation, is that the mtime is updated even if the rename target is a directory and it is renamed within the same directory, rather than moved to a different directory. In this case, the child directory being renamed does not change in any way, so changing its mtime is unnecessary according to the specification, and can unnecessarily confuse backup tools. In ext2, this issue was fixed by commit 39fe7557b4d6 ("ext2: Do not update mtime of a moved directory") and a few subsequent fixes, but it remained in nilfs2. Fix this issue by not calling nilfs_set_link(), which rewrites the inode number of the directory entry that refers to the parent directory, when the move target is a directory and the source and destination are the same directory. Here, the directory to be moved only needs to be read if the inode number of the parent directory is rewritten with nilfs_set_link, so also adjust the execution conditions of the preparation work to avoid unnecessary directory reads. Link: https://lkml.kernel.org/r/20250111143518.7901-3-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton fs/nilfs2/namei.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit ee70999a988b8abc3490609142f50ebaa8344432 Author: Ryusuke Konishi Date: Sat Jan 11 23:26:35 2025 +0900 nilfs2: handle errors that nilfs_prepare_chunk() may return Patch series "nilfs2: fix issues with rename operations". This series fixes BUG_ON check failures reported by syzbot around rename operations, and a minor behavioral issue where the mtime of a child directory changes when it is renamed instead of moved. This patch (of 2): The directory manipulation routines nilfs_set_link() and nilfs_delete_entry() rewrite the directory entry in the folio/page previously read by nilfs_find_entry(), so error handling is omitted on the assumption that nilfs_prepare_chunk(), which prepares the buffer for rewriting, will always succeed for these. And if an error is returned, it triggers the legacy BUG_ON() checks in each routine. This assumption is wrong, as proven by syzbot: the buffer layer called by nilfs_prepare_chunk() may call nilfs_get_block() if necessary, which may fail due to metadata corruption or other reasons. This has been there all along, but improved sanity checks and error handling may have made it more reproducible in fuzzing tests. Fix this issue by adding missing error paths in nilfs_set_link(), nilfs_delete_entry(), and their caller nilfs_rename(). Link: https://lkml.kernel.org/r/20250111143518.7901-1-konishi.ryusuke@gmail.com Link: https://lkml.kernel.org/r/20250111143518.7901-2-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Reported-by: syzbot+32c3706ebf5d95046ea1@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=32c3706ebf5d95046ea1 Reported-by: syzbot+1097e95f134f37d9395c@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=1097e95f134f37d9395c Fixes: 2ba466d74ed7 ("nilfs2: directory entry operations") Signed-off-by: Andrew Morton fs/nilfs2/dir.c | 13 ++++++++++--- fs/nilfs2/namei.c | 29 +++++++++++++++-------------- fs/nilfs2/nilfs.h | 4 ++-- 3 files changed, 27 insertions(+), 19 deletions(-) commit 28097f7ba18753f7120bbd460bb2d099276dec8b Author: Tanya Agarwal Date: Sun Jan 12 01:17:10 2025 +0530 CREDITS: fix spelling mistake Fix spelling error identified using codespell tool. Link: https://lkml.kernel.org/r/20250111194709.51133-1-tanyaagarwal25699@gmail.com Signed-off-by: Tanya Agarwal Cc: Anup Sharma Cc: Shuah Khan Signed-off-by: Andrew Morton CREDITS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e62857f1312606bd173b81102047e8c7bce3c3f Author: Ryusuke Konishi Date: Fri Jan 10 10:01:50 2025 +0900 nilfs2: revise the return value description style for consistency. Also for comments that do not cause kernel-doc warnings (those that list multiple error codes), revise the return value description style to match Brian G.'s suggestion of "..., or one of the following negative error codes on failure:". Link: https://lkml.kernel.org/r/CAAq45aNh1qV8P6XgDhKeNstT=PvcPUaCXsAF-f9rvmzznsZL5A@mail.gmail.com Link: https://lkml.kernel.org/r/20250110010530.21872-8-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Cc: "Brian G ." Signed-off-by: Andrew Morton fs/nilfs2/btnode.c | 3 ++- fs/nilfs2/cpfile.c | 16 ++++++++++------ fs/nilfs2/dat.c | 3 ++- fs/nilfs2/ifile.c | 3 ++- fs/nilfs2/ioctl.c | 3 ++- fs/nilfs2/segment.c | 6 ++++-- fs/nilfs2/sufile.c | 2 +- 7 files changed, 23 insertions(+), 13 deletions(-) commit fd4e7fadfd91023c2c5868f16af3fe8bed06636b Author: Ryusuke Konishi Date: Fri Jan 10 10:01:49 2025 +0900 nilfs2: add missing return value kernel-doc descriptions There are a number of kernel-doc comments for functions that are missing return values, which also causes a number of warnings when the kernel-doc script is run with the "-Wall" option. Fix this issue by adding proper return value descriptions, and improve code maintainability. Link: https://lkml.kernel.org/r/20250110010530.21872-7-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Cc: "Brian G ." Signed-off-by: Andrew Morton fs/nilfs2/alloc.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++-- fs/nilfs2/alloc.h | 2 ++ fs/nilfs2/cpfile.c | 2 ++ fs/nilfs2/dat.c | 2 ++ fs/nilfs2/ifile.c | 2 ++ fs/nilfs2/inode.c | 4 +++ fs/nilfs2/mdt.c | 4 +++ fs/nilfs2/page.c | 8 +++--- fs/nilfs2/recovery.c | 30 +++++++++++++++++++++++ fs/nilfs2/segment.c | 8 ++++++ fs/nilfs2/sufile.c | 8 ++++++ fs/nilfs2/sufile.h | 6 +++++ fs/nilfs2/super.c | 10 +++++++- fs/nilfs2/the_nilfs.c | 14 +++++++++++ 14 files changed, 160 insertions(+), 7 deletions(-) commit 343d4a33f26d048fde4b02cfc3681f766b3f1b12 Author: Ryusuke Konishi Date: Fri Jan 10 10:01:48 2025 +0900 nilfs2: correct return value kernel-doc descriptions for the rest Similar to the previous changes to fix return value descriptions, this fixes the format of the return value descriptions of functions for the rest. Link: https://lkml.kernel.org/r/20250110010530.21872-6-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Cc: "Brian G ." Signed-off-by: Andrew Morton fs/nilfs2/gcinode.c | 24 ++++++++++-------------- fs/nilfs2/inode.c | 12 +++--------- fs/nilfs2/recovery.c | 32 ++++++++++++-------------------- fs/nilfs2/segbuf.c | 12 ++---------- fs/nilfs2/segment.c | 48 ++++++++++++++++++------------------------------ fs/nilfs2/the_nilfs.c | 12 +++++------- 6 files changed, 50 insertions(+), 90 deletions(-) commit b8268501f1e3c49e3f90526d44b92eae4baa421b Author: Ryusuke Konishi Date: Fri Jan 10 10:01:47 2025 +0900 nilfs2: correct return value kernel-doc descriptions for metadata files Similar to the previous changes to fix return value descriptions, this fixes the format of the return value descriptions for metadata file functions other than sufile. Link: https://lkml.kernel.org/r/20250110010530.21872-5-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Cc: "Brian G ." Signed-off-by: Andrew Morton fs/nilfs2/cpfile.c | 51 ++++++++++++++++++---------------------------- fs/nilfs2/dat.c | 40 +++++++++++++++--------------------- fs/nilfs2/ifile.c | 32 +++++++++++++---------------- fs/nilfs2/mdt.c | 59 +++++++++++++++++++++++++----------------------------- 4 files changed, 77 insertions(+), 105 deletions(-) commit d33544adcb89cd15f99de37fd5a1ea8e4838ec31 Author: Ryusuke Konishi Date: Fri Jan 10 10:01:46 2025 +0900 nilfs2: correct return value kernel-doc descriptions for sufile Similar to the previous changes to fix return value descriptions, this fixes the format of the return value descriptions of functions for sufile-related functions, eliminating a dozen warnings emitted by the kernel-doc script. Link: https://lkml.kernel.org/r/20250110010530.21872-4-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Cc: "Brian G ." Signed-off-by: Andrew Morton fs/nilfs2/sufile.c | 102 ++++++++++++++++++++--------------------------------- fs/nilfs2/sufile.h | 16 ++++----- 2 files changed, 45 insertions(+), 73 deletions(-) commit e4a99d48bb3adcd4cf4377dcdf2263158914b448 Author: Ryusuke Konishi Date: Fri Jan 10 10:01:45 2025 +0900 nilfs2: correct return value kernel-doc descriptions for bmap functions Similar to the previous patch to fix the ioctl return value descriptions, this fixes the format of the return value descriptions for bmap (and btree)-related functions, which was causing the kernel-doc script to emit a number of warnings. Link: https://lkml.kernel.org/r/20250110010530.21872-3-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Cc: "Brian G ." Signed-off-by: Andrew Morton fs/nilfs2/bmap.c | 124 +++++++++++++++++++++++------------------------------- fs/nilfs2/btree.c | 7 ++- 2 files changed, 56 insertions(+), 75 deletions(-) commit 17c46a45cdb94c500f4e93b176cdd61931b03020 Author: Ryusuke Konishi Date: Fri Jan 10 10:01:44 2025 +0900 nilfs2: correct return value kernel-doc descriptions for ioctl functions Patch series "nilfs2: fix kernel-doc comments for function return values", v2. This series fixes the inadequacies in the return value descriptions in nilfs2's kernel-doc comments (mainly incorrect formatting), as well as the lack of return value descriptions themselves, and fixes most of the remaining warnings that are output when the kernel-doc script is run with the "-Wall" option. This patch (of 7): In the kernel-doc comments for functions, there are many cases where the format of the return value description is inaccurate, such as "Return Value: ...", which causes many warnings to be output when the kernel-doc script is executed with the "-Wall" option. This fixes such incorrectly formatted return value descriptions for ioctl functions. Link: https://lkml.kernel.org/r/20250110010530.21872-1-konishi.ryusuke@gmail.com Link: https://lkml.kernel.org/r/20250110010530.21872-2-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Cc: "Brian G ." Signed-off-by: Andrew Morton fs/nilfs2/ioctl.c | 233 ++++++++++++++++++++++-------------------------------- 1 file changed, 96 insertions(+), 137 deletions(-) commit d22feb5b64a4ecb1f029b3266148823c9fe569ee Author: Dan Carpenter Date: Fri Jan 10 10:12:17 2025 +0300 checkpatch: don't warn about extra parentheses in staging/ This "Unnecessary parentheses" warning is disabled for drivers/staging unless the --strict option is used. Really, we don't want it at all even if the --strict option is used. Link: https://lkml.kernel.org/r/c7278d21-d96c-4c1e-b3bf-f82b8decc5df@stanley.mountain Signed-off-by: Dan Carpenter Acked-by: Greg Kroah-Hartman Cc: Andy Whitcroft Cc: Dwaipayan Ray Cc: Joe Perches Cc: Lukas Bulwahn Signed-off-by: Andrew Morton scripts/checkpatch.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 65ef17aa07115d1a8d21d77f1e7cef3b639a396f Author: Oxana Kharitonova Date: Fri Jan 10 16:03:28 2025 +0000 hung_task: add task->flags, blocked by coredump to log Resending this patch as I haven't received feedback on my initial submission https://lore.kernel.org/all/20241204182953.10854-1-oxana@cloudflare.com/ For the processes which are terminated abnormally the kernel can provide a coredump if enabled. When the coredump is performed, the process and all its threads are put into the D state (TASK_UNINTERRUPTIBLE | TASK_FREEZABLE). On the other hand, we have kernel thread khungtaskd which monitors the processes in the D state. If the task stuck in the D state more than kernel.hung_task_timeout_secs, the hung_task alert appears in the kernel log. The higher memory usage of a process, the longer it takes to create coredump, the longer tasks are in the D state. We have hung_task alerts for the processes with memory usage above 10Gb. Although, our kernel.hung_task_timeout_secs is 10 sec when the default is 120 sec. Adding additional information to the log that the task is blocked by coredump will help with monitoring. Another approach might be to completely filter out alerts for such tasks, but in that case we would lose transparency about what is putting pressure on some system resources, e.g. we saw an increase in I/O when coredump occurs due its writing to disk. Additionally, it would be helpful to have task_struct->flags in the log from the function sched_show_task(). Currently it prints task_struct->thread_info->flags, this seems misleading as the line starts with "task:xxxx". [akpm@linux-foundation.org: fix printk control string] Link: https://lkml.kernel.org/r/20250110160328.64947-1-oxana@cloudflare.com Signed-off-by: Oxana Kharitonova Cc: Al Viro Cc: Ben Segall Cc: Christian Brauner Cc: Dietmar Eggemann Cc: Ingo Molnar Cc: Jan Kara Cc: Juri Lelli Cc: Mel Gorman Cc: Peter Zijlstra (Intel) Cc: Steven Rostedt Cc: Valentin Schneider Cc: Vincent Guittot Signed-off-by: Andrew Morton kernel/hung_task.c | 2 ++ kernel/sched/core.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit c6da721f5889b650bc99a77ac3b6dcf86f4cb138 Author: David Reaver Date: Wed Jan 8 11:24:54 2025 -0800 checkpatch: remove migrated RCU APIs from deprecated_apis The deprecated_apis map was created in [1] so checkpatch would flag deprecated RCU APIs. These deprecated APIs have since been removed from the kernel. This patch removes them from this map so checkpatch doesn't waste time looking for them, and so readers of checkpatch looking for deprecated APIs don't waste time searching for them. Link: https://lore.kernel.org/all/20181111192904.3199-13-paulmck@linux.ibm.com/ [1] Link: https://lkml.kernel.org/r/20250108192456.47871-1-me@davidreaver.com Signed-off-by: David Reaver Reviewed-by: Paul E. McKenney Reviewed-by: Kuan-Wei Chiu Acked-by: Joe Perches Cc: Andy Whitcroft Cc: Dwaipayan Ray Cc: Krister Johansen Cc: Lukas Bulwahn Signed-off-by: Andrew Morton scripts/checkpatch.pl | 10 ---------- 1 file changed, 10 deletions(-) commit 367a9bffabe08c04f6d725032cce3d891b2b9e1a Author: Ryusuke Konishi Date: Wed Jan 8 05:00:47 2025 +0900 nilfs2: protect access to buffers with no active references nilfs_lookup_dirty_data_buffers(), which iterates through the buffers attached to dirty data folios/pages, accesses the attached buffers without locking the folios/pages. For data cache, nilfs_clear_folio_dirty() may be called asynchronously when the file system degenerates to read only, so nilfs_lookup_dirty_data_buffers() still has the potential to cause use after free issues when buffers lose the protection of their dirty state midway due to this asynchronous clearing and are unintentionally freed by try_to_free_buffers(). Eliminate this race issue by adjusting the lock section in this function. Link: https://lkml.kernel.org/r/20250107200202.6432-3-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Fixes: 8c26c4e2694a ("nilfs2: fix issue with flush kernel thread after remount in RO mode because of driver's internal error or metadata corruption") Signed-off-by: Andrew Morton fs/nilfs2/segment.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ca76bb226bf47ff04c782cacbd299f12ddee1ec1 Author: Ryusuke Konishi Date: Wed Jan 8 05:00:46 2025 +0900 nilfs2: do not force clear folio if buffer is referenced Patch series "nilfs2: protect busy buffer heads from being force-cleared". This series fixes the buffer head state inconsistency issues reported by syzbot that occurs when the filesystem is corrupted and falls back to read-only, and the associated buffer head use-after-free issue. This patch (of 2): Syzbot has reported that after nilfs2 detects filesystem corruption and falls back to read-only, inconsistencies in the buffer state may occur. One of the inconsistencies is that when nilfs2 calls mark_buffer_dirty() to set a data or metadata buffer as dirty, but it detects that the buffer is not in the uptodate state: WARNING: CPU: 0 PID: 6049 at fs/buffer.c:1177 mark_buffer_dirty+0x2e5/0x520 fs/buffer.c:1177 ... Call Trace: nilfs_palloc_commit_alloc_entry+0x4b/0x160 fs/nilfs2/alloc.c:598 nilfs_ifile_create_inode+0x1dd/0x3a0 fs/nilfs2/ifile.c:73 nilfs_new_inode+0x254/0x830 fs/nilfs2/inode.c:344 nilfs_mkdir+0x10d/0x340 fs/nilfs2/namei.c:218 vfs_mkdir+0x2f9/0x4f0 fs/namei.c:4257 do_mkdirat+0x264/0x3a0 fs/namei.c:4280 __do_sys_mkdirat fs/namei.c:4295 [inline] __se_sys_mkdirat fs/namei.c:4293 [inline] __x64_sys_mkdirat+0x87/0xa0 fs/namei.c:4293 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 The other is when nilfs_btree_propagate(), which propagates the dirty state to the ancestor nodes of a b-tree that point to a dirty buffer, detects that the origin buffer is not dirty, even though it should be: WARNING: CPU: 0 PID: 5245 at fs/nilfs2/btree.c:2089 nilfs_btree_propagate+0xc79/0xdf0 fs/nilfs2/btree.c:2089 ... Call Trace: nilfs_bmap_propagate+0x75/0x120 fs/nilfs2/bmap.c:345 nilfs_collect_file_data+0x4d/0xd0 fs/nilfs2/segment.c:587 nilfs_segctor_apply_buffers+0x184/0x340 fs/nilfs2/segment.c:1006 nilfs_segctor_scan_file+0x28c/0xa50 fs/nilfs2/segment.c:1045 nilfs_segctor_collect_blocks fs/nilfs2/segment.c:1216 [inline] nilfs_segctor_collect fs/nilfs2/segment.c:1540 [inline] nilfs_segctor_do_construct+0x1c28/0x6b90 fs/nilfs2/segment.c:2115 nilfs_segctor_construct+0x181/0x6b0 fs/nilfs2/segment.c:2479 nilfs_segctor_thread_construct fs/nilfs2/segment.c:2587 [inline] nilfs_segctor_thread+0x69e/0xe80 fs/nilfs2/segment.c:2701 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Both of these issues are caused by the callbacks that handle the page/folio write requests, forcibly clear various states, including the working state of the buffers they hold, at unexpected times when they detect read-only fallback. Fix these issues by checking if the buffer is referenced before clearing the page/folio state, and skipping the clear if it is. Link: https://lkml.kernel.org/r/20250107200202.6432-1-konishi.ryusuke@gmail.com Link: https://lkml.kernel.org/r/20250107200202.6432-2-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Reported-by: syzbot+b2b14916b77acf8626d7@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=b2b14916b77acf8626d7 Reported-by: syzbot+d98fd19acd08b36ff422@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=d98fd19acd08b36ff422 Fixes: 8c26c4e2694a ("nilfs2: fix issue with flush kernel thread after remount in RO mode because of driver's internal error or metadata corruption") Tested-by: syzbot+b2b14916b77acf8626d7@syzkaller.appspotmail.com Signed-off-by: Andrew Morton fs/nilfs2/page.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit 840265f7b2795ec12a04ef948f52d12cd96f42c3 Author: Su Yue Date: Mon Jan 6 22:06:34 2025 +0800 ocfs2: remove parameter parent_fe_bh from __ocfs2_mknod_locked The parameter is not used in __ocfs2_mknod_locked(). So remove it. No functional change. Link: https://lkml.kernel.org/r/20250106140634.92241-1-glass.su@suse.com Signed-off-by: Su Yue Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Signed-off-by: Andrew Morton fs/ocfs2/namei.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 276c61385f6bc3223a5ecd307cf4aba2dfbb9a31 Author: Su Yue Date: Mon Jan 6 22:06:53 2025 +0800 ocfs2: mark dquot as inactive if failed to start trans while releasing dquot While running fstests generic/329, the kernel workqueue quota_release_workfn is dead looping in calling ocfs2_release_dquot(). The ocfs2 state is already readonly but ocfs2_release_dquot wants to start a transaction but fails and returns. ===================================================================== [ 2918.123602 ][ T275 ] On-disk corruption discovered. Please run fsck.ocfs2 once the filesystem is unmounted. [ 2918.124034 ][ T275 ] (kworker/u135:1,275,11):ocfs2_release_dquot:765 ERROR: status = -30 [ 2918.124452 ][ T275 ] (kworker/u135:1,275,11):ocfs2_release_dquot:795 ERROR: status = -30 [ 2918.124883 ][ T275 ] (kworker/u135:1,275,11):ocfs2_start_trans:357 ERROR: status = -30 [ 2918.125276 ][ T275 ] OCFS2: abort (device dm-0): ocfs2_start_trans: Detected aborted journal [ 2918.125710 ][ T275 ] On-disk corruption discovered. Please run fsck.ocfs2 once the filesystem is unmounted. ===================================================================== ocfs2_release_dquot() is much like dquot_release(), which is called by ext4 to handle similar situation. So here fix it by marking the dquot as inactive like what dquot_release() does. Link: https://lkml.kernel.org/r/20250106140653.92292-1-glass.su@suse.com Fixes: 9e33d69f553a ("ocfs2: Implementation of local and global quota file handling") Signed-off-by: Su Yue Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Signed-off-by: Andrew Morton fs/ocfs2/quota_global.c | 5 +++++ 1 file changed, 5 insertions(+) commit 01676ecd0b5c897ebb420c5a09a658e3514cc6d8 Author: Su Yue Date: Wed Jan 8 10:41:19 2025 +0800 ocfs2: check tl->count of truncate log inode in ocfs2_get_truncate_log_info syz reported: (syz-executor404,5313,0):ocfs2_truncate_log_append:5874 ERROR: bug expression: tl_count > ocfs2_truncate_recs_per_inode(osb->sb) || tl_count == 0 (syz-executor404,5313,0):ocfs2_truncate_log_append:5874 ERROR: Truncate record count on #77 invalid wanted 39, actual 2087 ------------[ cut here ]------------ kernel BUG at fs/ocfs2/alloc.c:5874! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5313 Comm: syz-executor404 Not tainted 6.12.0-rc5-syzkaller-00299-g11066801dd4b #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:ocfs2_truncate_log_append+0x9a8/0x9c0 fs/ocfs2/alloc.c:5868 RSP: 0018:ffffc9000cf16f40 EFLAGS: 00010292 RAX: b4b54f1d10640800 RBX: 0000000000000027 RCX: b4b54f1d10640800 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: ffffc9000cf17070 R08: ffffffff8174a14c R09: 1ffff11003f8519a R10: dffffc0000000000 R11: ffffed1003f8519b R12: 1ffff110085f5f58 R13: ffffff3800000000 R14: 000000000000004d R15: ffff8880438f0008 FS: 00005555722df380(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002000f000 CR3: 000000004010e000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ocfs2_remove_btree_range+0x1303/0x1860 fs/ocfs2/alloc.c:5789 ocfs2_remove_inode_range+0xff3/0x29f0 fs/ocfs2/file.c:1907 ocfs2_reflink_remap_extent fs/ocfs2/refcounttree.c:4537 [inline] ocfs2_reflink_remap_blocks+0xcd4/0x1f30 fs/ocfs2/refcounttree.c:4684 ocfs2_remap_file_range+0x5fa/0x8d0 fs/ocfs2/file.c:2736 vfs_copy_file_range+0xc07/0x1510 fs/read_write.c:1615 __do_sys_copy_file_range fs/read_write.c:1705 [inline] __se_sys_copy_file_range+0x3f2/0x5d0 fs/read_write.c:1668 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 RIP: 0033:0x7fd327167af9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 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:00007ffe6b8e22e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000146 RAX: ffffffffffffffda RBX: 00007fd3271b005e RCX: 00007fd327167af9 RDX: 0000000000000006 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007fd3271de610 R08: 000000000000d8c2 R09: 0000000000000000 R10: 0000000020000640 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffe6b8e24b8 R14: 0000000000000001 R15: 0000000000000001 The fuzz image has a truncate log inode whose tl_count is bigger than ocfs2_truncate_recs_per_inode() so it triggers the BUG in ocfs2_truncate_log_append(). As what the check in ocfs2_truncate_log_append() does, just do same check into ocfs2_get_truncate_log_info when truncate log inode is reading in so we can bail out earlier. Link: https://lkml.kernel.org/r/20250108024119.60313-1-glass.su@suse.com Signed-off-by: Su Yue Reported-by: Liebes Wang Link: https://lore.kernel.org/ocfs2-devel/CADCV8souQhdP0RdQF1U7KTWtuHDfpn+3LnTt-EEuMmB-pMRrgQ@mail.gmail.com/T/#u Reported-by: syzbot+a66542ca5ebb4233b563@syzkaller.appspotmail.com Tested-by: syzbot+a66542ca5ebb4233b563@syzkaller.appspotmail.com Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Signed-off-by: Andrew Morton fs/ocfs2/alloc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 982209f632c6850ef798411ad978f4ac15d8ba90 Author: Linus Lüssing Date: Wed Jan 8 04:58:39 2025 +0100 mailmap: update entry for Linus Lüssing Mapping another old, obsolete work email address to my primary one. Link: https://lkml.kernel.org/r/20250108035840.25194-1-linus.luessing@c0d3.blue Signed-off-by: Linus Lüssing Signed-off-by: Andrew Morton .mailmap | 1 + 1 file changed, 1 insertion(+) commit fdbb6cd96ed51da002bd9a5a142586a74a436784 Author: Julian Sun Date: Mon Jan 6 10:34:32 2025 +0800 ocfs2: correct l_next_free_rec in online check Correct the value of l_next_free_rec to l_count during the online check, as done in the check_el() function in ocfs2_tools. Link: https://lkml.kernel.org/r/20250106023432.1320904-2-sunjunchao2870@gmail.com Signed-off-by: Julian Sun Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Signed-off-by: Andrew Morton fs/ocfs2/inode.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 34bb50c42335b9316cbdb9506c2c4126a66a52ee Author: Julian Sun Date: Mon Jan 6 10:34:31 2025 +0800 ocfs2: check el->l_next_free_rec in ocfs2_get_clusters_nocache Recently syzbot reported a use-after-free issue[1]. The root cause of the problem is that the journal inode recorded in this file system image is corrupted. The value of "di->id2.i_list.l_next_free_rec" is 8193, which is greater than the value of "di->id2.i_list.l_count" (19). To solve this problem, an additional check should be added within ocfs2_get_clusters_nocache(). If the check fails, an error will be returned and the file system will be set to read-only. [1]: https://lore.kernel.org/all/67577778.050a0220.a30f1.01bc.GAE@google.com/T/ Link: https://lkml.kernel.org/r/20250106023432.1320904-1-sunjunchao2870@gmail.com Signed-off-by: Julian Sun Reported-by: syzbot+2313dda4dc4885c93578@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=2313dda4dc4885c93578 Tested-by: syzbot+2313dda4dc4885c93578@syzkaller.appspotmail.com Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/extent_map.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e420460ba443e8ad1cd71568c50b6e09d13fb106 Author: Kuan-Wei Chiu Date: Tue Jan 7 01:01:04 2025 +0800 lib/list_sort: clarify comparison function requirements in list_sort() Add a detailed explanation in the list_sort() kernel doc comment specifying that the comparison function must satisfy antisymmetry and transitivity. These properties are essential for the sorting algorithm to produce correct results. Issues have arisen in the past [1][2][3][4] where comparison functions violated the transitivity property, causing sorting algorithms to fail to correctly order elements. While these requirements may seem straightforward, they are commonly misunderstood or overlooked, leading to bugs. Highlighting these properties in the documentation will help prevent such mistakes in the future. Link: https://lore.kernel.org/lkml/20240701205639.117194-1-visitorckw@gmail.com [1] Link: https://lore.kernel.org/lkml/20241203202228.1274403-1-visitorckw@gmail.com [2] Link: https://lore.kernel.org/lkml/20241209134226.1939163-1-visitorckw@gmail.com [3] Link: https://lore.kernel.org/lkml/20241209145728.1975311-1-visitorckw@gmail.com [4] Link: https://lkml.kernel.org/r/20250106170104.3137845-3-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Cc: Ching-Chun (Jim) Huang Cc: Signed-off-by: Andrew Morton lib/list_sort.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4e0a15f8b4bd47548032acccdbeb5b9083b3675e Author: Kuan-Wei Chiu Date: Tue Jan 7 01:01:03 2025 +0800 lib/sort: clarify comparison function requirements in sort_r() Patch series "lib: clarify comparison function requirements", v2. Add a detailed explanation in the sort_r/list_sort kernel doc comment specifying that the comparison function must satisfy antisymmetry and transitivity. These properties are essential for the sorting algorithm to produce correct results. Issues have arisen in the past [1][2][3][4] where comparison functions violated the transitivity property, causing sorting algorithms to fail to correctly order elements. While these requirements may seem straightforward, they are commonly misunderstood or overlooked, leading to bugs. Highlighting these properties in the documentation will help prevent such mistakes in the future. Link: https://lore.kernel.org/lkml/20240701205639.117194-1-visitorckw@gmail.com [1] Link: https://lore.kernel.org/lkml/20241203202228.1274403-1-visitorckw@gmail.com [2] Link: https://lore.kernel.org/lkml/20241209134226.1939163-1-visitorckw@gmail.com [3] Link: https://lore.kernel.org/lkml/20241209145728.1975311-1-visitorckw@gmail.com [4] This patch (of 2): Add a detailed explanation in the sort_r() kernel doc comment specifying that the comparison function must satisfy antisymmetry and transitivity. These properties are essential for the sorting algorithm to produce correct results. Issues have arisen in the past [1][2][3][4] where comparison functions violated the transitivity property, causing sorting algorithms to fail to correctly order elements. While these requirements may seem straightforward, they are commonly misunderstood or overlooked, leading to bugs. Highlighting these properties in the documentation will help prevent such mistakes in the future. Link: https://lkml.kernel.org/r/20250106170104.3137845-1-visitorckw@gmail.com Link: https://lore.kernel.org/lkml/20240701205639.117194-1-visitorckw@gmail.com [1] Link: https://lore.kernel.org/lkml/20241203202228.1274403-1-visitorckw@gmail.com [2] Link: https://lore.kernel.org/lkml/20241209134226.1939163-1-visitorckw@gmail.com [3] Link: https://lore.kernel.org/lkml/20241209145728.1975311-1-visitorckw@gmail.com [4] Link: https://lkml.kernel.org/r/20250106170104.3137845-2-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Cc: Ching-Chun (Jim) Huang Cc: Signed-off-by: Andrew Morton lib/sort.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bb2de9b04942fab82cad19a31f2612deab9751be Author: Rob Herring (Arm) Date: Tue Dec 31 09:54:14 2024 -0600 MAINTAINERS: fix list entries with display names get_maintainers.pl doesn't expect list entries to have a display name. Entries with a display name are omitted and print just the description: (open list:PIN CONTROLLER - FREESCALE) These cases are pretty much aliases to a few people, not lists which are archived and can be subscribed to. Change these cases to be reviewers instead. Link: https://lkml.kernel.org/r/20241231155415.186244-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) Cc: Arnd Bergmann Cc: Joe Perches Signed-off-by: Andrew Morton MAINTAINERS | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 97549ce6848e5e30b667378b28c3cff937d167d2 Author: Tio Zhang Date: Tue Dec 24 17:53:44 2024 +0800 kthread: correct comments before kthread_queue_work() s/kthread_worker_create/kthread_create_worker/ to avoid confusion when reading comments before kthread_queue_work(). Link: https://lkml.kernel.org/r/20241224095344.GA7587@didi-ThinkCentre-M930t-N000 Signed-off-by: Tio Zhang Signed-off-by: Andrew Morton kernel/kthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5748be3e9ef4659f9adf7e1ad454fafb0868cd88 Author: Matthew Wilcox (Oracle) Date: Fri Dec 20 22:46:28 2024 +0000 squashfs: convert squashfs_fill_page() to take a folio squashfs_fill_page is only used in this file, so make it static. Use kmap_local instead of kmap_atomic, and return a bool so that the caller can use folio_end_read() which saves an atomic operation over calling folio_mark_uptodate() followed by folio_unlock(). [willy@infradead.org: fix polarity of "uptodate" Thanks to Ryan for testing] Link: https://lkml.kernel.org/r/20250110163300.3346321-2-willy@infradead.org Link: https://lkml.kernel.org/r/20241220224634.723899-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Tested-by: Ryan Roberts Cc: Phillip Lougher Signed-off-by: Andrew Morton fs/squashfs/file.c | 21 ++++++++++++--------- fs/squashfs/squashfs.h | 1 - 2 files changed, 12 insertions(+), 10 deletions(-) commit 5641371fd0b3703d11809a0ae249aed270cb8add Author: Matthew Wilcox (Oracle) Date: Fri Dec 20 22:46:27 2024 +0000 squashfs; convert squashfs_copy_cache() to take a folio Remove accesses to page->index and page->mapping. Also use folio APIs where available. This code still assumes order 0 folios. [dan.carpenter@linaro.org: fix a NULL vs IS_ERR() bug] Link: https://lkml.kernel.org/r/7b7f44d6-9153-4d7c-b65b-2d78febe6c7a@stanley.mountain Link: https://lkml.kernel.org/r/20241220224634.723899-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dan Carpenter Cc: Phillip Lougher Cc: Dan Carpenter Signed-off-by: Andrew Morton fs/squashfs/file.c | 46 +++++++++++++++++++++++++--------------------- fs/squashfs/file_cache.c | 2 +- fs/squashfs/squashfs.h | 4 ++-- 3 files changed, 28 insertions(+), 24 deletions(-) commit 2a7aea59cf4dd4a070c4550fddaffc5a73312cad Author: Matthew Wilcox (Oracle) Date: Fri Dec 20 22:46:26 2024 +0000 squashfs: convert squashfs_readpage_block() to take a folio Remove a few accesses to page->mapping. Link: https://lkml.kernel.org/r/20241220224634.723899-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Phillip Lougher Signed-off-by: Andrew Morton fs/squashfs/file.c | 2 +- fs/squashfs/file_cache.c | 6 +++--- fs/squashfs/file_direct.c | 11 +++++------ fs/squashfs/squashfs.h | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) commit 8c1565fcf6392d2f962b7cbc9fde43bfcd175c2f Author: Matthew Wilcox (Oracle) Date: Fri Dec 20 22:46:25 2024 +0000 squashfs: pass a folio to squashfs_readpage_fragment() Remove an access to page->mapping. Link: https://lkml.kernel.org/r/20241220224634.723899-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Phillip Lougher Signed-off-by: Andrew Morton fs/squashfs/file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 608c2501675cd37260312d35daa2fd6dc6d56e96 Author: Matthew Wilcox (Oracle) Date: Fri Dec 20 22:46:24 2024 +0000 squashfs: use a folio throughout squashfs_read_folio() Use modern folio APIs where they exist and convert back to struct page for the internal functions. Link: https://lkml.kernel.org/r/20241220224634.723899-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Phillip Lougher Signed-off-by: Andrew Morton fs/squashfs/file.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit d7f4b23c6702e2afbdfe33fe77eedc1584761242 Author: Phillip Lougher Date: Sun Dec 29 23:37:52 2024 +0000 squashfs: update Kconfig information Update the compression algorithms supported, and the Squashfs website location. Link: https://lkml.kernel.org/r/20241229233752.54481-5-phillip@squashfs.org.uk Signed-off-by: Phillip Lougher Signed-off-by: Andrew Morton fs/squashfs/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f2cad9850ede417d81aaf30644f50767993bbc0e Author: Phillip Lougher Date: Sun Dec 29 23:37:51 2024 +0000 Documentation: update the Squashfs filesystem documentation This patch updates the following which are out of date. - Zstd has been added to the compression algorithms supported. - The filesystem mailing list (for the kernel code) is changed to linux-fsdevel rather than the now very little used Sourceforge mailing list. - The Squashfs website has been changed to the Squashfs-tools github repository. - The fact that Squashfs-tools is likely packaged by the linux distribution is mentioned. Link: https://lkml.kernel.org/r/20241229233752.54481-4-phillip@squashfs.org.uk Signed-off-by: Phillip Lougher Signed-off-by: Andrew Morton Documentation/filesystems/squashfs.rst | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit f5cc08737507f227e5e7e2df52d26ed1f0a7e315 Author: Phillip Lougher Date: Sun Dec 29 23:37:50 2024 +0000 squashfs: don't allocate read_page cache if SQUASHFS_FILE_DIRECT configured If Squashfs has been configured to directly read datablocks into the page cache (SQUASHFS_FILE_DIRECT), then the read_page cache is unnecessary. This improvement is due to the following two commits, which added the ability to read datablocks into the page cache when pages were missing, enabling the fallback which used an intermediate buffer to be removed. commit f268eedddf359 ("squashfs: extend "page actor" to handle missing pages") commit 1bb1a07afad97 ("squashfs: don't use intermediate buffer if pages missing") This reduces the amount of memory used when mounting a filesystem by block_size * maximum number of threads. Link: https://lkml.kernel.org/r/20241229233752.54481-3-phillip@squashfs.org.uk Signed-off-by: Phillip Lougher Signed-off-by: Andrew Morton fs/squashfs/squashfs.h | 6 ++++++ fs/squashfs/super.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 49ff29240ebb13bc0efa4623d4379650e68fcb35 Author: Phillip Lougher Date: Sun Dec 29 23:37:49 2024 +0000 squashfs: make squashfs_cache_init() return ERR_PTR(-ENOMEM) Patch series "squashfs: reduce memory usage and update docs". This patchset reduces the amount of memory that Squashfs uses when CONFIG_FILE_DIRECT is configured, and updates various out of date information in the documentation and Kconfig. This patch (of 4): Make squashfs_cache_init() return an ERR_PTR(-ENOMEM) on failure rather than NULL. This tidies up some calling code, but, it also allows NULL to be returned as a valid result when a cache hasn't be allocated. Link: https://lkml.kernel.org/r/20241229233752.54481-1-phillip@squashfs.org.uk Link: https://lkml.kernel.org/r/20241229233752.54481-2-phillip@squashfs.org.uk Signed-off-by: Phillip Lougher Signed-off-by: Andrew Morton fs/squashfs/cache.c | 10 +++++++--- fs/squashfs/super.c | 17 ++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) commit 03511e936916873bf880e6678c98d5fb59c19742 Author: Jianan Huang Date: Fri Jan 24 13:57:51 2025 +0800 f2fs: fix inconsistent dirty state of atomic file When testing the atomic write fix patches, the f2fs_bug_on was triggered as below: ------------[ cut here ]------------ kernel BUG at fs/f2fs/inode.c:935! Oops: invalid opcode: 0000 [#1] PREEMPT SMP PTI CPU: 3 UID: 0 PID: 257 Comm: bash Not tainted 6.13.0-rc1-00033-gc283a70d3497 #5 RIP: 0010:f2fs_evict_inode+0x50f/0x520 Call Trace: ? __die_body+0x65/0xb0 ? die+0x9f/0xc0 ? do_trap+0xa1/0x170 ? f2fs_evict_inode+0x50f/0x520 ? f2fs_evict_inode+0x50f/0x520 ? handle_invalid_op+0x65/0x80 ? f2fs_evict_inode+0x50f/0x520 ? exc_invalid_op+0x39/0x50 ? asm_exc_invalid_op+0x1a/0x20 ? __pfx_f2fs_get_dquots+0x10/0x10 ? f2fs_evict_inode+0x50f/0x520 ? f2fs_evict_inode+0x2e5/0x520 evict+0x186/0x2f0 prune_icache_sb+0x75/0xb0 super_cache_scan+0x1a8/0x200 do_shrink_slab+0x163/0x320 shrink_slab+0x2fc/0x470 drop_slab+0x82/0xf0 drop_caches_sysctl_handler+0x4e/0xb0 proc_sys_call_handler+0x183/0x280 vfs_write+0x36d/0x450 ksys_write+0x68/0xd0 do_syscall_64+0xc8/0x1a0 ? arch_exit_to_user_mode_prepare+0x11/0x60 ? irqentry_exit_to_user_mode+0x7e/0xa0 The root cause is: f2fs uses FI_ATOMIC_DIRTIED to indicate dirty atomic files during commit. If the inode is dirtied during commit, such as by f2fs_i_pino_write, the vfs inode keeps clean and the f2fs inode is set to FI_DIRTY_INODE. The FI_DIRTY_INODE flag cann't be cleared by write_inode later due to the clean vfs inode. Finally, f2fs_bug_on is triggered due to this inconsistent state when evict. To reproduce this situation: - fd = open("/mnt/test.db", O_WRONLY) - ioctl(fd, F2FS_IOC_START_ATOMIC_WRITE) - mv /mnt/test.db /mnt/test1.db - ioctl(fd, F2FS_IOC_COMMIT_ATOMIC_WRITE) - echo 3 > /proc/sys/vm/drop_caches To fix this problem, clear FI_DIRTY_INODE after commit, then f2fs_mark_inode_dirty_sync will ensure a consistent dirty state. Fixes: fccaa81de87e ("f2fs: prevent atomic file from being dirtied before commit") Signed-off-by: Yunlei He Signed-off-by: Jianan Huang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b46c89c08f4146e7987fc355941a93b12e2c03ef Merge: 917846e9f005 a07eb4f67ed0 Author: Linus Torvalds Date: Fri Jan 24 16:12:12 2025 -0800 Merge tag 'spi-fix-v6.14-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fix from Mark Brown: "A simple fix for mishandling of some clk_get_optional() return codes in the OMAP driver, the problem was reported against stable kernels on a few platforms after an earlier incomplete fix was backported" * tag 'spi-fix-v6.14-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: omap2-mcspi: Correctly handle devm_clk_get_optional() errors commit 917846e9f00508ba91e7f1f6fd03db696c971459 Merge: 9d5db4e3fcb1 4783ce32b080 Author: Linus Torvalds Date: Fri Jan 24 16:04:40 2025 -0800 Merge tag 'mailbox-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox Pull mailbox updates from Jassi Brar: - samsung: add gs101-mbox driver - microchip: add sbi-ipc driver - zynqmp: fix invalid __percpu annotation - qcom: add IPQ5424 APCS compatible - mpfs fix copy and paste bug - th1520: Fix NULL vs IS_ERR() and a memory corruption bug - tegra-hsp: clear mailbox before using message * tag 'mailbox-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox: riscv: export __cpuid_to_hartid_map riscv: sbi: vendorid_list: Add Microchip Technology to the vendor list mailbox: th1520: Fix memory corruption due to incorrect array size mailbox: zynqmp: Remove invalid __percpu annotation in zynqmp_ipi_probe() MAINTAINERS: add entry for Samsung Exynos mailbox driver mailbox: add Samsung Exynos driver dt-bindings: mailbox: add google,gs101-mbox mailbox: qcom: Add support for IPQ5424 APCS IPC dt-bindings: mailbox: qcom: Add IPQ5424 APCS compatible mailbox: qcom-ipcc: Reset CLEAR_ON_RECV_RD if set from boot firmware mailbox: add Microchip IPC support dt-bindings: mailbox: add binding for Microchip IPC mailbox controller mailbox: tegra-hsp: Clear mailbox before using message mailbox: mpfs: fix copy and paste bug in probe mailbox: th1520: Fix a NULL vs IS_ERR() bug commit 9d5db4e3fcb10900d828826418a83dfba9318277 Merge: ae8b53aac327 5eb6d3561f6c Author: Linus Torvalds Date: Fri Jan 24 15:48:01 2025 -0800 Merge tag 'i3c/for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Alexandre Belloni: "The main change is the addition of PCI bus support for mipi-i3c-hci. I'm also carrying an hwmon patch as it makes use of the bitops addition that is then mainly used by i3c drivers. Core: - Improve initialization of numbered I2C adapters Drivers: - use parity8 helper - dw: fix possible use-after-free - mipi-i3c-hci: add support for PCI bus host - svc: many fixes for IBI and hotjoin" * tag 'i3c/for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: Improve initialization of numbered I2C adapters i3c: master: Fix missing 'ret' assignment in set_speed() i3c: cdns: use parity8 helper instead of open coding it i3c: mipi-i3c-hci: use parity8 helper instead of open coding it i3c: dw: use parity8 helper instead of open coding it hwmon: (spd5118) Use generic parity calculation bitops: add generic parity calculation for u8 i3c: mipi-i3c-hci: Add support for MIPI I3C HCI on PCI bus i3c: mipi-i3c-hci: Add Intel specific quirk to ring resuming i3c: fix kdoc parameter description for module_i3c_i2c_driver() i3c: dw: Fix use-after-free in dw_i3c_master driver due to race condition commit ae8b53aac3273d876170437197631bcb5e16c932 Merge: f345fc7a0706 64b45dd46e15 Author: Linus Torvalds Date: Fri Jan 24 15:33:33 2025 -0800 Merge tag 'efi-next-for-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI updates from Ard Biesheuvel: - Increase the headroom in the EFI memory map allocation created by the EFI stub. This is needed because event callbacks called during ExitBootServices() may cause fragmentation, and reallocation is not allowed after that. - Drop obsolete UGA graphics code and switch to a more ergonomic API to traverse handle buffers. Simplify some error paths using a __free() helper while at it. - Fix some W=1 warnings when CONFIG_EFI=n - Rely on the dentry cache to keep track of the contents of the efivarfs filesystem, rather than using a separate linked list. - Improve and extend efivarfs test cases. - Synchronize efivarfs with underlying variable store on resume from hibernation - this is needed because the firmware itself or another OS running on the same machine may have modified it. - Fix x86 EFI stub build with GCC 15. - Fix kexec/x86 false positive warning in EFI memory attributes table sanity check. * tag 'efi-next-for-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: (23 commits) x86/efi: skip memattr table on kexec boot efivarfs: add variable resync after hibernation efivarfs: abstract initial variable creation routine efi: libstub: Use '-std=gnu11' to fix build with GCC 15 selftests/efivarfs: add concurrent update tests selftests/efivarfs: fix tests for failed write removal efivarfs: fix error on write to new variable leaving remnants efivarfs: remove unused efivarfs_list efivarfs: move variable lifetime management into the inodes selftests/efivarfs: add check for disallowing file truncation efivarfs: prevent setting of zero size on the inodes in the cache efi: sysfb_efi: fix W=1 warnings when EFI is not set efi/libstub: Use __free() helper for pool deallocations efi/libstub: Use cleanup helpers for freeing copies of the memory map efi/libstub: Simplify PCI I/O handle buffer traversal efi/libstub: Refactor and clean up GOP resolution picker code efi/libstub: Simplify GOP handling code efi/libstub: Use C99-style for loop to traverse handle buffer x86/efistub: Drop long obsolete UGA support efivarfs: make variable_is_present use dcache lookup ... commit f345fc7a07065902fab1d33c11dfe631ee95357c Merge: 71088146704e 15e2f65f2ecf Author: Linus Torvalds Date: Fri Jan 24 15:09:20 2025 -0800 Merge tag 'devicetree-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: "DT Bindings: - Add Bindings for QCom QCS615 UFS, QCom IPQ5424 DWC3 USB, NXP imx7d MIPI DSI, QCom SM8750 PDC, QCom MSM8976 SRAM, QCom ipq6018 temp sensor, QCom QCS8300 Power Domain Controller, QCom QCS615 Power Domain Controller, QCom QCS615 APSS, QCom QCS615 qfprom, QCom QCS8300 remoteproc, Mediatek MT6328 PMIC, Allwinner A100 OPP, and NXP iMX35 GPT - Convert Altera socfpga-system, raspberrypi,bcm2835-power to DT schema - Add Siflower vendor prefix - Cleanup display, interrupt-controller, and UFS binding examples' indentation - Document preferred line wrapping (the same as the rest of the kernel) DT Core: - Add warning when of_property_read_bool() is used on non-boolean properties - Restore keeping bootloader DTB when booting with ACPI. Turns out some x86 platforms relied on that. Shrug. - Fix of_find_node_opts_by_path() handling of alias+path+options - Fix resource bounds checking for empty resources - A bunch of small fixes/cleanups all over from Zijun Hu - Cleanups in bin_attribute handling" * tag 'devicetree-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (50 commits) of: address: Fix empty resource handling in __of_address_resource_bounds() of/fdt: Restore possibility to use both ACPI and FDT from bootloader docs: dt-bindings: Document preferred line wrapping dt-bindings: ufs: Correct indentation and style in DTS example of: Correct element count for two arrays in API of_parse_phandle_with_args_map() of: reserved-memory: Warn for missing static reserved memory regions of: Do not expose of_alias_scan() and correct its comments dt-bindings: ufs: qcom: Add UFS Host Controller for QCS615 dt-bindings: usb: qcom,dwc3: Add IPQ5424 to USB DWC3 bindings dt-bindings: arm: coresight: Update the pattern of ete node name of: Warn when of_property_read_bool() is used on non-boolean properties device property: Split property reading bool and presence test ops of/fdt: Check fdt_get_mem_rsv() error in early_init_fdt_scan_reserved_mem() of: reserved-memory: Move an assignment to effective place in __reserved_mem_alloc_size() of: reserved-memory: Do not make kmemleak ignore freed address of: reserved-memory: Fix using wrong number of cells to get property 'alignment' of: Remove a duplicated code block of: property: Avoiding using uninitialized variable @imaplen in parse_interrupt_map() of: Correct child specifier used as input of the 2nd nexus node dt-bindings: interrupt-controller: ti,omap4-wugen-mpu: Add file extension ... commit 71088146704efcd13ab85ae00345c98526ccc87d Merge: f2ad904e923f 309f64469cd5 Author: Linus Torvalds Date: Fri Jan 24 15:03:53 2025 -0800 Merge tag 'soc-defconfig-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC defconfig updates from Arnd Bergmann: "As usual, a number of new drivers get added to the defconfig to support additional hardware. The stm32 defconfig also turns off a few options to optimize for size" * tag 'soc-defconfig-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (27 commits) dt-bindings: soc: samsung: exynos-pmu: Add exynos990-pmu compatible arm64: defconfig: enable Maxim TCPCI driver ARM: configs: stm32: Remove useless flags in STM32 defconfig ARM: configs: stm32: Remove CRYPTO in STM32 defconfig ARM: configs: stm32: Clean STM32 defconfig ARM: configs: stm32: Remove FLASH_MEM_BASE and FLASH_SIZE in STM32 defconfig arm64: defconfig: Enable pinctrl-based I2C mux arm64: defconfig: Enable Rockchip extensions for Synopsys DW HDMI QP arm64: defconfig: Enable RFKILL GPIO arm64: defconfig: Enable TI K3 M4 remoteproc driver arm64: defconfig: Enable Qualcomm IPQ CMN PLL clock controller arm64: defconfig: Enable basic Qualcomm SM8750 SoC drivers arm64: defconfig: remove obsolete CONFIG_SM_DISPCC_8650 arm64: defconfig: enable clock controller, interconnect and pinctrl for QCS8300 arm64: defconfig: Enable sa8775p clock controllers arm64: defconfig: Enable MediaTek DWMAC arm64: defconfig: Enable sound for MT8188 arm64: defconfig: Enable MediaTek STAR Ethernet MAC riscv: defconfig: enable pinctrl and dwmac support for TH1520 arm64: defconfig: Enable Amazon Elastic Network Adaptor ... commit f2ad904e923f70a80f478febf001f88dfd65a64c Merge: f10203927097 9ec80025030b Author: Linus Torvalds Date: Fri Jan 24 14:56:59 2025 -0800 Merge tag 'soc-drivers-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC driver updates from Arnd Bergmann: "These are changes to SoC specific drivers and DT bindings that don't have a separate subsystem tree, or that get grouped here for simplicity. Nothing out of the ordinary for the 6.14 release here: - Most of the updates are for Qualcomm specific drivers, adding support for additional SoCs in the exssting drivers, and support for wrapped encryption key access in the SCM firmware. - The Arm SCMI firmware code gains support for having multiple instances of firmware running, and better module auto loading. - A few minor updates for litex, samsung, ti, tegra, mediatek, imx and renesas platforms. - Reset controller updates for amlogic, to add support for the A1 soc and clean up the existing code. - Memory controller updates for ti davinci aemif, refactoring the code and adding a few interfaces to other drivers" * tag 'soc-drivers-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (58 commits) drivers/soc/litex: Use devm_register_restart_handler() reset: amlogic: aux: drop aux registration helper reset: amlogic: aux: get regmap through parent device reset: amlogic: add support for A1 SoC in auxiliary reset driver dt-bindings: reset: add bindings for A1 SoC audio reset controller soc/tegra: fuse: Update Tegra234 nvmem keepout list soc/tegra: Fix spelling error in tegra234_lookup_slave_timeout() soc/tegra: cbb: Drop unnecessary debugfs error handling firmware: qcom: scm: add calls for wrapped key support soc: qcom: pd_mapper: Add SM7225 compatible dt-bindings: firmware: qcom,scm: Document ipq5424 SCM soc: qcom: llcc: Update configuration data for IPQ5424 dt-bindings: cache: qcom,llcc: Add IPQ5424 compatible soc: mediatek: mtk-devapc: Fix leaking IO map on driver remove soc: mediatek: mtk-devapc: Fix leaking IO map on error paths firmware: qcom: scm: smc: Narrow 'mempool' variable scope firmware: qcom: scm: smc: Handle missing SCM device firmware: qcom: scm: Cleanup global '__scm' on probe failures firmware: qcom: scm: Fix missing read barrier in qcom_scm_get_tzmem_pool() firmware: qcom: scm: Fix missing read barrier in qcom_scm_is_available() ... commit f10203927097ff9e5a251f170038fefa38e274b7 Merge: 4e517a6acdc4 3c9690f76d66 Author: Linus Torvalds Date: Fri Jan 24 14:48:03 2025 -0800 Merge tag 'soc-dt-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC devicetree updates from Arnd Bergmann: "We see the addition of eleven new SoCs, including a total of sixx arm64 chips from Qualcomm alone. Overall, the Qualcomm platforms once again make up the majority of all changes, after a couple of quieter releases. The new SoCs in this branch are: - Microchip sama7d65 is a new 32-bit embedded chip with a single Cortex-A7 and the current high end of the old Atmel SoC line. - Samsung Exynos 9810 is a mobile phone chip used in some older phones like the Samsung Galaxy S9 - Renesas R-Car V4H ES3.0 (R8A779G3) is an updated version of the V4H (R8A779G0) low-power automotive SoC - Renesas RZ/G3E (R0A09G047) is a family of embedded chips using Cortex-A55 cores - Qualcomm Snapdragon 8 Elite (SM8750) is a new phone chip based on Qualcomm's Oryon CPU cores. - Qualcomm Snapdragon AR2 (SAR2130P) is a SoC for augmented reality glasses. - Qualcomm IQ6 (QCS610) and IQ8 (QCS8300) are two industrial IOT platforms. - Snapdragon 425 (MSM8917) is a mobile phone SoC from 2016 - Qualcomm IPQ5424 is a Wi-Fi 7 networking chip All of the above are part of already supported SoC families that only need new devicetree files. Two additional SoCs in new families are part of a separate branch. There are 48 new machines in total, including six arm32 ones based on aspeed. broadcom, microchip and st SoCs all using Cortex-A7 cores, and a single risc-v board, the Banana Pi R3. The remaining ones use arm64 chips from Broadcom, Samsung, NXP, Mediatek, Qualcomm, Renesas and Rockchips and cover development boards, phones, laptops, industrial machines routers. A lot of ongoing work is for cleaning up build time warnings and other issues, in addition to the new machines and added features" * tag 'soc-dt-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (619 commits) arm64: tegra: Fix Tegra234 PCIe interrupt-map arm64: dts: qcom: x1e80100-romulus: Update firmware nodes arm64: dts: rockchip: add DTs for Firefly ITX-3588J and its Core-3588J SoM dt-bindings: arm: rockchip: Add Firefly ITX-3588J board arm64: dts: rockchip: Add Orange Pi 5 Max board dt-bindings: arm: rockchip: Add Xunlong Orange Pi 5 Max arm64: dts: rockchip: refactor common rk3588-orangepi-5.dtsi arm64: dts: rockchip: add WLAN to rk3588-evb1 controller arm64: dts: rockchip: increase gmac rx_delay on rk3399-puma arm64: dts: rockchip: Delete redundant RK3328 GMAC stability fixes arm64: tegra: Disable Tegra234 sce-fabric node arm64: tegra: Fix typo in Tegra234 dce-fabric compatible arm64: tegra: Fix DMA ID for SPI2 arm64: dts: qcom: msm8916-samsung-serranove: Add display panel arm64: dts: qcom: sm8650: Add 'global' interrupt to the PCIe RC nodes arm64: dts: qcom: sm8550: Add 'global' interrupt to the PCIe RC nodes arm64: dts: qcom: Remove unused and undocumented properties arm64: dts: qcom: sdm450-lenovo-tbx605f: add DSI panel nodes arm64: dts: qcom: pmi8950: add LAB-IBB nodes arm64: dts: qcom: ipq5424: enable the download mode support ... commit 4e517a6acdc40d61076ead4244b980c276af9b6e Merge: 1e8f6db9eb1d 0bcf3ac14626 Author: Linus Torvalds Date: Fri Jan 24 14:31:06 2025 -0800 Merge tag 'soc-new-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull new SoC support from Arnd Bergmann: "Two new SoC families are added here, with devicetree files and a little bit of infrastructure to allow booting: - Blaize BLZP1600 is an AI chip using custom GSP (Graph Streaming Processor) cores for computation, and two small Cortex-A53 cores that run the operating system. - SpacemiT K1 is a 64-bit RISC-V chip, using eight custom RVA22 compatible CPU cores with vector support. Also marketed at AI applications, it has a much slower NPU compared to BLZP1600, but in turn focuses on the CPU performance" * tag 'soc-new-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: riscv: dts: spacemit: move aliases to board dts riscv: dts: spacemit: add pinctrl property to uart0 in BPI-F3 riscv: defconfig: enable SpacemiT SoC riscv: dts: spacemit: add Banana Pi BPI-F3 board device tree riscv: dts: add initial SpacemiT K1 SoC device tree riscv: add SpacemiT SoC family Kconfig support dt-bindings: serial: 8250: Add SpacemiT K1 uart compatible dt-bindings: interrupt-controller: Add SpacemiT K1 PLIC dt-bindings: timer: Add SpacemiT K1 CLINT dt-bindings: riscv: add SpacemiT K1 bindings dt-bindings: riscv: Add SpacemiT X60 compatibles MAINTAINERS: setup support for SpacemiT SoC tree MAINTAINER: Add entry for Blaize SoC arm64: defconfig: Enable Blaize BLZP1600 platform arm64: dts: Add initial support for Blaize BLZP1600 CB2 arm64: Add Blaize BLZP1600 SoC family dt-bindings: arm: blaize: Add Blaize BLZP1600 SoC dt-bindings: Add Blaize vendor prefix commit 1e8f6db9eb1d88e2761d7e8498a06e9c4c0324b1 Merge: 0afd22092df4 2fd7a3f27892 Author: Linus Torvalds Date: Fri Jan 24 14:23:59 2025 -0800 Merge tag 'soc-arm-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC arm platform code updates from Arnd Bergmann: "The updates here add code for the Microchip SAMA7D65 SoC, as well as minor bugfixes for OMAP" * tag 'soc-arm-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: omap1: Fix up the Retu IRQ on Nokia 770 ARM: omap2plus_defconfig: enable charger of TWL603X ARM: at91: add new SoC sama7d65 ARM: at91: pm: change BU Power Switch to automatic mode soc: atmel: fix device_node release in atmel_soc_device_init() ARM: OMAP2+: Fix a typo commit 15e2f65f2ecfeb8e39315522e2b5cfdc5651fc10 Author: Thomas Weißschuh Date: Mon Jan 20 15:09:40 2025 +0100 of: address: Fix empty resource handling in __of_address_resource_bounds() "resource->end" needs to always be equal to "resource->start + size - 1". The previous version of the function did not perform the "- 1" in case of an empty resource. Also make sure to allow an empty resource at address 0. Reported-by: Basharath Hussain Khaja Closes: https://lore.kernel.org/lkml/20250108140414.13530-1-basharath@couthit.com/ Fixes: 1a52a094c2f0 ("of: address: Unify resource bounds overflow checking") Cc: stable@vger.kernel.org Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20250120-of-address-overflow-v1-1-dd68dbf47bce@linutronix.de Signed-off-by: Rob Herring (Arm) drivers/of/address.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 14bce187d1600710623d81888da3501bbc470ba2 Author: Dmytro Maluka Date: Sun Jan 5 17:27:41 2025 +0000 of/fdt: Restore possibility to use both ACPI and FDT from bootloader There are cases when the bootloader provides information to the kernel in both ACPI and DTB, not interchangeably. One such use case is virtual machines in Android. When running on x86, the Android Virtualization Framework (AVF) boots VMs with ACPI like it is usually done on x86 (i.e. the virtual LAPIC, IOAPIC, HPET, PCI MMCONFIG etc are described in ACPI) but also passes various AVF-specific boot parameters in DTB. This allows reusing the same implementations of various AVF components on both arm64 and x86. Commit 7b937cc243e5 ("of: Create of_root if no dtb provided by firmware") removed the possibility to do that, since among other things it introduced forcing emptying the bootloader-provided DTB if ACPI is enabled (probably assuming that if ACPI is available, a DTB can only be useful for applying overlays to it afterwards, for testing purposes). So restore this possibility. Instead of completely preventing using ACPI and DT together, rely on arch-specific setup code to prevent using both to set up the same things (see various acpi_disabled checks under arch/). Fixes: 7b937cc243e5 ("of: Create of_root if no dtb provided by firmware") Signed-off-by: Dmytro Maluka Link: https://lore.kernel.org/r/20250105172741.3476758-3-dmaluka@chromium.org Signed-off-by: Rob Herring (Arm) drivers/of/fdt.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit a23ad06bfee5e51cd9e51aebf11401e7b4b5d00a Author: Jens Axboe Date: Fri Jan 24 14:32:25 2025 -0700 io_uring/register: use atomic_read/write for sq_flags migration A previous commit changed all of the migration from the old to the new ring for resizing to use READ/WRITE_ONCE. However, ->sq_flags is an atomic_t, and while most archs won't complain on this, some will indeed flag this: io_uring/register.c:554:9: sparse: sparse: cast to non-scalar io_uring/register.c:554:9: sparse: sparse: cast from non-scalar Just use atomic_set/atomic_read for handling this case. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501242000.A2sKqaCL-lkp@intel.com/ Fixes: 2c5aae129f42 ("io_uring/register: document io_register_resize_rings() shared mem usage") Signed-off-by: Jens Axboe io_uring/register.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9fe182772dcb2630964724fd93e9c90b68ea0fd Author: Tejun Heo Date: Fri Jan 24 10:48:25 2025 -1000 sched_ext: selftests/dsp_local_on: Fix sporadic failures dsp_local_on has several incorrect assumptions, one of which is that p->nr_cpus_allowed always tracks p->cpus_ptr. This is not true when a task is scheduled out while migration is disabled - p->cpus_ptr is temporarily overridden to the previous CPU while p->nr_cpus_allowed remains unchanged. This led to sporadic test faliures when dsp_local_on_dispatch() tries to put a migration disabled task to a different CPU. Fix it by keeping the previous CPU when migration is disabled. There are SCX schedulers that make use of p->nr_cpus_allowed. They should also implement explicit handling for p->migration_disabled. Signed-off-by: Tejun Heo Reported-by: Ihor Solodrai Cc: Andrea Righi Cc: Changwoo Min tools/testing/selftests/sched_ext/dsp_local_on.bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0afd22092df4d3473569c197e317f91face7e51b Merge: aa44198a6cf5 d3d930411ce3 Author: Linus Torvalds Date: Fri Jan 24 12:21:28 2025 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "Lighter that normal, but the now usual collection of driver fixes and small improvements: - Small fixes and minor improvements to cxgb4, bnxt_re, rxe, srp, efa, cxgb4 - Update mlx4 to use the new umem APIs, avoiding direct use of scatterlist - Support ROCEv2 in erdma - Remove various uncalled functions, constify bin_attribute - Provide core infrastructure to catch netdev events and route them to drivers, consolidating duplicated driver code - Fix rare race condition crashes in mlx5 ODP flows" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (63 commits) RDMA/mlx5: Fix implicit ODP use after free RDMA/mlx5: Fix a race for an ODP MR which leads to CQE with error RDMA/qib: Constify 'struct bin_attribute' RDMA/hfi1: Constify 'struct bin_attribute' RDMA/rxe: Fix the warning "__rxe_cleanup+0x12c/0x170 [rdma_rxe]" RDMA/cxgb4: Notify rdma stack for IB_EVENT_QP_LAST_WQE_REACHED event RDMA/bnxt_re: Allocate dev_attr information dynamically RDMA/bnxt_re: Pass the context for ulp_irq_stop RDMA/bnxt_re: Add support to handle DCB_CONFIG_CHANGE event RDMA/bnxt_re: Query firmware defaults of CC params during probe RDMA/bnxt_re: Add Async event handling support bnxt_en: Add ULP call to notify async events RDMA/mlx5: Fix indirect mkey ODP page count MAINTAINERS: Update the bnxt_re maintainers RDMA/hns: Clean up the legacy CONFIG_INFINIBAND_HNS RDMA/rtrs: Add missing deinit() call RDMA/efa: Align interrupt related fields to same type RDMA/bnxt_re: Fix to drop reference to the mmap entry in case of error RDMA/mlx5: Fix link status down event for MPV RDMA/erdma: Support create_ah/destroy_ah in non-sleepable contexts ... commit e3ff4245928f948f3eb2e852aa350b870421c358 Author: Steven Rostedt Date: Thu Jan 23 20:41:59 2025 -0500 tracing/osnoise: Fix resetting of tracepoints If a timerlat tracer is started with the osnoise option OSNOISE_WORKLOAD disabled, but then that option is enabled and timerlat is removed, the tracepoints that were enabled on timerlat registration do not get disabled. If the option is disabled again and timelat is started, then it triggers a warning in the tracepoint code due to registering the tracepoint again without ever disabling it. Do not use the same user space defined options to know to disable the tracepoints when timerlat is removed. Instead, set a global flag when it is enabled and use that flag to know to disable the events. ~# echo NO_OSNOISE_WORKLOAD > /sys/kernel/tracing/osnoise/options ~# echo timerlat > /sys/kernel/tracing/current_tracer ~# echo OSNOISE_WORKLOAD > /sys/kernel/tracing/osnoise/options ~# echo nop > /sys/kernel/tracing/current_tracer ~# echo NO_OSNOISE_WORKLOAD > /sys/kernel/tracing/osnoise/options ~# echo timerlat > /sys/kernel/tracing/current_tracer Triggers: ------------[ cut here ]------------ WARNING: CPU: 6 PID: 1337 at kernel/tracepoint.c:294 tracepoint_add_func+0x3b6/0x3f0 Modules linked in: CPU: 6 UID: 0 PID: 1337 Comm: rtla Not tainted 6.13.0-rc4-test-00018-ga867c441128e-dirty #73 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:tracepoint_add_func+0x3b6/0x3f0 Code: 48 8b 53 28 48 8b 73 20 4c 89 04 24 e8 23 59 11 00 4c 8b 04 24 e9 36 fe ff ff 0f 0b b8 ea ff ff ff 45 84 e4 0f 84 68 fe ff ff <0f> 0b e9 61 fe ff ff 48 8b 7b 18 48 85 ff 0f 84 4f ff ff ff 49 8b RSP: 0018:ffffb9b003a87ca0 EFLAGS: 00010202 RAX: 00000000ffffffef RBX: ffffffff92f30860 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff9bf59e91ccd0 RDI: ffffffff913b6410 RBP: 000000000000000a R08: 00000000000005c7 R09: 0000000000000002 R10: ffffb9b003a87ce0 R11: 0000000000000002 R12: 0000000000000001 R13: ffffb9b003a87ce0 R14: ffffffffffffffef R15: 0000000000000008 FS: 00007fce81209240(0000) GS:ffff9bf6fdd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055e99b728000 CR3: 00000001277c0002 CR4: 0000000000172ef0 Call Trace: ? __warn.cold+0xb7/0x14d ? tracepoint_add_func+0x3b6/0x3f0 ? report_bug+0xea/0x170 ? handle_bug+0x58/0x90 ? exc_invalid_op+0x17/0x70 ? asm_exc_invalid_op+0x1a/0x20 ? __pfx_trace_sched_migrate_callback+0x10/0x10 ? tracepoint_add_func+0x3b6/0x3f0 ? __pfx_trace_sched_migrate_callback+0x10/0x10 ? __pfx_trace_sched_migrate_callback+0x10/0x10 tracepoint_probe_register+0x78/0xb0 ? __pfx_trace_sched_migrate_callback+0x10/0x10 osnoise_workload_start+0x2b5/0x370 timerlat_tracer_init+0x76/0x1b0 tracing_set_tracer+0x244/0x400 tracing_set_trace_write+0xa0/0xe0 vfs_write+0xfc/0x570 ? do_sys_openat2+0x9c/0xe0 ksys_write+0x72/0xf0 do_syscall_64+0x79/0x1c0 entry_SYSCALL_64_after_hwframe+0x76/0x7e Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Tomas Glozar Cc: Gabriele Monaco Cc: Luis Goncalves Cc: John Kacur Link: https://lore.kernel.org/20250123204159.4450c88e@gandalf.local.home Fixes: e88ed227f639e ("tracing/timerlat: Add user-space interface") Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_osnoise.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit aa44198a6cf599837350aa954b5153b75feaed2d Merge: 47d65738b975 e721f619e3ec Author: Linus Torvalds Date: Fri Jan 24 12:04:35 2025 -0800 Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd Pull iommufd updates from Jason Gunthorpe: "No major functionality this cycle: - iommufd part of the domain_alloc_paging_flags() conversion - Move IOMMU_HWPT_FAULT_ID_VALID processing out of drivers - Increase a timeout waiting for other threads to drop transient refcounts that syzkaller was hitting - Fix a UBSAN hit in iova_bitmap due to shift out of bounds - Add missing cleanup of fault events during FD shutdown, fixing a memory leak - Improve the fault delivery flow to have a smaller locking critical region that does not include copy_to_user() - Fix 32 bit ABI breakage due to missed implicit padding, and fix the stack memory leakage" * tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd: iommufd: Fix struct iommu_hwpt_pgfault init and padding iommufd/fault: Use a separate spinlock to protect fault->deliver list iommufd/fault: Destroy response and mutex in iommufd_fault_destroy() iommufd: Keep OBJ/IOCTL lists in an alphabetical order iommufd/iova_bitmap: Fix shift-out-of-bounds in iova_bitmap_offset_to_index() iommu: iommufd: fix WARNING in iommufd_device_unbind iommufd: Deal with IOMMU_HWPT_FAULT_ID_VALID in iommufd core iommufd/selftest: Remove domain_alloc_paging() commit 47d65738b9752d6bf0ed694c3c829a06a1c460ac Merge: ac0761d8d831 3599bae489d8 Author: Linus Torvalds Date: Fri Jan 24 11:52:59 2025 -0800 Merge tag 'parisc-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc architecture updates from Helge Deller: - Temporarily disable jump label support to avoid kernel crash with 32-bit kernel - Add vdso linker script to 'targets' instead of extra-y - Remove parisc versions of memcpy_toio and memset_io * tag 'parisc-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Temporarily disable jump label support parisc: add vdso linker script to 'targets' instead of extra-y parisc: Remove memcpy_toio and memset_io commit e9d8c873964e6fcec85657dde5406eafa596751a Merge: a9ae6fe1c319 8d28d0ddb986 Author: Jens Axboe Date: Fri Jan 24 12:42:48 2025 -0700 Merge tag 'md-6.14-20250124' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux into block-6.14 Pull MD fix from Song: "Fix a md-cluster regression introduced in the 6.12 release." * tag 'md-6.14-20250124' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux: md/md-bitmap: Synchronize bitmap_get_stats() with bitmap lifetime commit ac0761d8d8315759562a3b85120d482cedf44328 Merge: ab18b8fff124 d08e78362a5f Author: Linus Torvalds Date: Fri Jan 24 11:32:13 2025 -0800 Merge tag 'fbdev-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev updates from Helge Deller: "Fixes: - omap: use threaded IRQ for LCD DMA - omapfb: Fix an OF node leak in dss_of_port_get_parent_device() - vga16fb: fix orig_video_isVGA confusion Updates & cleanups: - hdmi: Remove unused hdmi_infoframe_check - omapfb: - Remove unused hdmi5_core_handle_irqs - Use of_property_present() to test existence of DT property - Use syscon_regmap_lookup_by_phandle_args - efifb: Change the return value type to void - lcdcfb: Use backlight helper - udlfb: Use const 'struct bin_attribute' callback - radeon: Use const 'struct bin_attribute' callbacks - sm501fb: Use str_enabled_disabled() helper in sm501fb_init_fb()" * tag 'fbdev-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: lcdcfb: Use backlight helper fbdev: vga16fb: fix orig_video_isVGA confusion fbdev: omapfb: Use syscon_regmap_lookup_by_phandle_args fbdev: omapfb: Use of_property_present() to test existence of DT property fbdev: sm501fb: Use str_enabled_disabled() helper in sm501fb_init_fb() fbdev: omap: use threaded IRQ for LCD DMA fbdev: omapfb: Fix an OF node leak in dss_of_port_get_parent_device() fbdev: efifb: Change the return value type to void fbdev: omapfb: Remove unused hdmi5_core_handle_irqs video: hdmi: Remove unused hdmi_infoframe_check fbdev: radeon: Use const 'struct bin_attribute' callbacks fbdev: udlfb: Use const 'struct bin_attribute' callback commit e76946110137703c16423baf6ee177b751a34b7e Author: Lai Jiangshan Date: Thu Jan 23 16:25:35 2025 +0800 workqueue: Put the pwq after detaching the rescuer from the pool The commit 68f83057b913("workqueue: Reap workers via kthread_stop() and remove detach_completion") adds code to reap the normal workers but mistakenly does not handle the rescuer and also removes the code waiting for the rescuer in put_unbound_pool(), which caused a use-after-free bug reported by Cheung Wall. To avoid the use-after-free bug, the pool’s reference must be held until the detachment is complete. Therefore, move the code that puts the pwq after detaching the rescuer from the pool. Reported-by: cheung wall Cc: cheung wall Link: https://lore.kernel.org/lkml/CAKHoSAvP3iQW+GwmKzWjEAOoPvzeWeoMO0Gz7Pp3_4kxt-RMoA@mail.gmail.com/ Fixes: 68f83057b913("workqueue: Reap workers via kthread_stop() and remove detach_completion") Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo kernel/workqueue.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ee7d79433d783346430ee32f28c9df44a88b3bb6 Author: Michal Swiatkowski Date: Thu Sep 5 11:14:10 2024 +0200 iavf: allow changing VLAN state without calling PF First case: > ip l a l $VF name vlanx type vlan id 100 > ip l d vlanx > ip l a l $VF name vlanx type vlan id 100 As workqueue can be execute after sometime, there is a window to have call trace like that: - iavf_del_vlan - iavf_add_vlan - iavf_del_vlans (wq) It means that our VLAN 100 will change the state from IAVF_VLAN_ACTIVE to IAVF_VLAN_REMOVE (iavf_del_vlan). After that in iavf_add_vlan state won't be changed because VLAN 100 is on the filter list. The final result is that the VLAN 100 filter isn't added in hardware (no iavf_add_vlans call). To fix that change the state if the filter wasn't removed yet directly to active. It is save as IAVF_VLAN_REMOVE means that virtchnl message wasn't sent yet. Second case: > ip l a l $VF name vlanx type vlan id 100 Any type of VF reset ex. change trust > ip l s $PF vf $VF_NUM trust on > ip l d vlanx > ip l a l $VF name vlanx type vlan id 100 In case of reset iavf driver is responsible for readding all filters that are being used. To do that all VLAN filters state are changed to IAVF_VLAN_ADD. Here is even longer window for changing VLAN state from kernel side, as workqueue isn't called immediately. We can have call trace like that: - changing to IAVF_VLAN_ADD (after reset) - iavf_del_vlan (called from kernel ops) - iavf_del_vlans (wq) Not exsisitng VLAN filters will be removed from hardware. It isn't a bug, ice driver will handle it fine. However, we can have call trace like that: - changing to IAVF_VLAN_ADD (after reset) - iavf_del_vlan (called from kernel ops) - iavf_add_vlan (called from kernel ops) - iavf_del_vlans (wq) With fix for previous case we end up with no VLAN filters in hardware. We have to remove VLAN filters if the state is IAVF_VLAN_ADD and delete VLAN was called. It is save as IAVF_VLAN_ADD means that virtchnl message wasn't sent yet. Fixes: 0c0da0e95105 ("iavf: refactor VLAN filter states") Signed-off-by: Michal Swiatkowski Reviewed-by: Przemek Kitszel Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/iavf/iavf_main.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit c5cc2a27e04f2fcd77c74ada9aef76a758a24697 Author: Mateusz Polchlopek Date: Tue Dec 31 10:50:44 2024 +0100 ice: remove invalid parameter of equalizer It occurred that in the commit 70838938e89c ("ice: Implement driver functionality to dump serdes equalizer values") the invalid DRATE parameter for reading has been added. The output of the command: $ ethtool -d returns the garbage value in the place where DRATE value should be stored. Remove mentioned parameter to prevent return of corrupted data to userspace. Fixes: 70838938e89c ("ice: Implement driver functionality to dump serdes equalizer values") Signed-off-by: Mateusz Polchlopek Reviewed-by: Michal Swiatkowski Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 1 - drivers/net/ethernet/intel/ice/ice_ethtool.c | 1 - drivers/net/ethernet/intel/ice/ice_ethtool.h | 1 - 3 files changed, 3 deletions(-) commit 18625e26fefced78f2ae28b25e80a07079821e04 Author: Przemek Kitszel Date: Thu Dec 19 12:55:16 2024 +0100 ice: fix ice_parser_rt::bst_key array size Fix &ice_parser_rt::bst_key size. It was wrongly set to 10 instead of 20 in the initial impl commit (see Fixes tag). All usage code assumed it was of size 20. That was also the initial size present up to v2 of the intro series [2], but halved by v3 [3] refactor described as "Replace magic hardcoded values with macros." The introducing series was so big that some ugliness was unnoticed, same for bugs :/ ICE_BST_KEY_TCAM_SIZE and ICE_BST_TCAM_KEY_SIZE were differing by one. There was tmp variable @j in the scope of edited function, but was not used in all places. This ugliness is now gone. I'm moving ice_parser_rt::pg_prio a few positions up, to fill up one of the holes in order to compensate for the added 10 bytes to the ::bst_key, resulting in the same size of the whole as prior to the fix, and minimal changes in the offsets of the fields. Extend also the debug dump print of the key to cover all bytes. To not have string with 20 "%02x" and 20 params, switch to ice_debug_array_w_prefix(). This fix obsoletes Ahmed's attempt at [1]. [1] https://lore.kernel.org/intel-wired-lan/20240823230847.172295-1-ahmed.zaki@intel.com [2] https://lore.kernel.org/intel-wired-lan/20230605054641.2865142-13-junfeng.guo@intel.com [3] https://lore.kernel.org/intel-wired-lan/20230817093442.2576997-13-junfeng.guo@intel.com Reported-by: Dan Carpenter Closes: https://lore.kernel.org/intel-wired-lan/b1fb6ff9-b69e-4026-9988-3c783d86c2e0@stanley.mountain Fixes: 9a4c07aaa0f5 ("ice: add parser execution main loop") CC: Ahmed Zaki Reviewed-by: Larysa Zaremba Signed-off-by: Przemek Kitszel Reviewed-by: Simon Horman Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_parser.h | 6 ++---- drivers/net/ethernet/intel/ice/ice_parser_rt.c | 12 +++++------- 2 files changed, 7 insertions(+), 11 deletions(-) commit cf186201118c953c3a0256312a186b3d24ffdb9f Author: Tomas Glozar Date: Thu Jan 23 15:23:39 2025 +0100 rtla: Report missed event count Print how many events were missed by trace buffer overflow in the main instance at the end of the run (for hist) or during the run (for top). Cc: John Kacur Cc: Luis Goncalves Link: https://lore.kernel.org/20250123142339.990300-5-tglozar@redhat.com Signed-off-by: Tomas Glozar Tested-by: Gabriele Monaco Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/osnoise_hist.c | 1 + tools/tracing/rtla/src/osnoise_top.c | 1 + tools/tracing/rtla/src/timerlat_hist.c | 1 + tools/tracing/rtla/src/timerlat_top.c | 1 + 4 files changed, 4 insertions(+) commit 8ccd9d8bb913577c7ec98061cd6e73380e538532 Author: Tomas Glozar Date: Thu Jan 23 15:23:38 2025 +0100 rtla: Add function to report missed events Add osnoise_report_missed_events to be used to report the number of missed events either during or after an osnoise or timerlat run. Also, display the percentage of missed events compared to the total number of received events. If an unknown number of missed events was reported during the run, the entire number of missed events is reported as unknown. Cc: John Kacur Cc: Luis Goncalves Cc: Gabriele Monaco Link: https://lore.kernel.org/20250123142339.990300-4-tglozar@redhat.com Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/osnoise.c | 20 ++++++++++++++++++++ tools/tracing/rtla/src/osnoise.h | 1 + 2 files changed, 21 insertions(+) commit 2aee44f721a75daebc55c372271221286efd79ec Author: Tomas Glozar Date: Thu Jan 23 15:23:37 2025 +0100 rtla: Count all processed events Add a field processed_events to struct trace_instance and increment it in collect_registered_events, regardless of whether a handler is registered for the event. The purpose is to calculate the percentage of events that were missed due to tracefs buffer overflow. Cc: John Kacur Cc: Luis Goncalves Cc: Gabriele Monaco Link: https://lore.kernel.org/20250123142339.990300-3-tglozar@redhat.com Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/trace.c | 4 ++++ tools/tracing/rtla/src/trace.h | 1 + 2 files changed, 5 insertions(+) commit d6fcd28ffeaaa6a1733303096637e6bf15704efb Author: Tomas Glozar Date: Thu Jan 23 15:23:36 2025 +0100 rtla: Count missed trace events Add function collect_missed_events to trace.c to act as a callback for tracefs_follow_missed_events, summing the number of total missed events into a new field missing_events of struct trace_instance. In case record->missed_events is negative, trace->missed_events is set to UINT64_MAX to signify an unknown number of events was missed. The callback is activated on initialization of the trace instance. Cc: John Kacur Cc: Luis Goncalves Cc: Gabriele Monaco Link: https://lore.kernel.org/20250123142339.990300-2-tglozar@redhat.com Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/trace.c | 34 ++++++++++++++++++++++++++++++++++ tools/tracing/rtla/src/trace.h | 1 + 2 files changed, 35 insertions(+) commit b91cfd9f75c02e7f4463f8416d99138630c4dfd0 Author: Costa Shulyupin Date: Wed Jan 15 19:58:30 2025 +0200 tools/rtla: Add osnoise_trace_is_off() All of the users of trace_is_off() passes in &record->trace as the second parameter, where record is a pointer to a struct osnoise_tool. This record could be NULL and there is a hidden dependency that the trace field is the first field to allow &record->trace to work with a NULL record pointer. In order to make this code a bit more robust, as record shouldn't be dereferenced if it is NULL, even if the code does work, create a new function called osnoise_trace_is_off() that takes the pointer to a struct osnoise_tool as its second parameter. This way it can properly test if it is NULL before it dereferences it. The old function trace_is_off() is removed and the function osnoise_trace_is_off() is added into osnoise.c which is what the struct osnoise_tool is associated with. Cc: John Kacur Cc: "Luis Claudio R. Goncalves" Cc: Eder Zulian Cc: Dan Carpenter Cc: Tomas Glozar Cc: Gabriele Monaco Link: https://lore.kernel.org/20250115180055.2136815-1-costa.shul@redhat.com Signed-off-by: Costa Shulyupin Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/osnoise.c | 16 ++++++++++++++++ tools/tracing/rtla/src/osnoise.h | 1 + tools/tracing/rtla/src/osnoise_hist.c | 4 ++-- tools/tracing/rtla/src/osnoise_top.c | 4 ++-- tools/tracing/rtla/src/timerlat_hist.c | 4 ++-- tools/tracing/rtla/src/timerlat_top.c | 6 +++--- tools/tracing/rtla/src/trace.c | 19 ------------------- tools/tracing/rtla/src/trace.h | 1 - 8 files changed, 26 insertions(+), 29 deletions(-) commit 217f0b1e990e30a1f06f6d531fdb4530f4788d48 Author: Tomas Glozar Date: Tue Jan 7 15:48:23 2025 +0100 rtla/timerlat_top: Set OSNOISE_WORKLOAD for kernel threads When using rtla timerlat with userspace threads (-u or -U), rtla disables the OSNOISE_WORKLOAD option in /sys/kernel/tracing/osnoise/options. This option is not re-enabled in a subsequent run with kernel-space threads, leading to rtla collecting no results if the previous run exited abnormally: $ rtla timerlat top -u ^\Quit (core dumped) $ rtla timerlat top -k -d 1s Timer Latency 0 00:00:01 | IRQ Timer Latency (us) | Thread Timer Latency (us) CPU COUNT | cur min avg max | cur min avg max The issue persists until OSNOISE_WORKLOAD is set manually by running: $ echo OSNOISE_WORKLOAD > /sys/kernel/tracing/osnoise/options Set OSNOISE_WORKLOAD when running rtla with kernel-space threads if available to fix the issue. Cc: stable@vger.kernel.org Cc: John Kacur Cc: Luis Goncalves Link: https://lore.kernel.org/20250107144823.239782-4-tglozar@redhat.com Fixes: cdca4f4e5e8e ("rtla/timerlat_top: Add timerlat user-space support") Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/timerlat_top.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit d8d866171a414ed88bd0d720864095fd75461134 Author: Tomas Glozar Date: Tue Jan 7 15:48:22 2025 +0100 rtla/timerlat_hist: Set OSNOISE_WORKLOAD for kernel threads When using rtla timerlat with userspace threads (-u or -U), rtla disables the OSNOISE_WORKLOAD option in /sys/kernel/tracing/osnoise/options. This option is not re-enabled in a subsequent run with kernel-space threads, leading to rtla collecting no results if the previous run exited abnormally: $ rtla timerlat hist -u ^\Quit (core dumped) $ rtla timerlat hist -k -d 1s Index over: count: min: avg: max: ALL: IRQ Thr Usr count: 0 0 0 min: - - - avg: - - - max: - - - The issue persists until OSNOISE_WORKLOAD is set manually by running: $ echo OSNOISE_WORKLOAD > /sys/kernel/tracing/osnoise/options Set OSNOISE_WORKLOAD when running rtla with kernel-space threads if available to fix the issue. Cc: stable@vger.kernel.org Cc: John Kacur Cc: Luis Goncalves Link: https://lore.kernel.org/20250107144823.239782-3-tglozar@redhat.com Fixes: ed774f7481fa ("rtla/timerlat_hist: Add timerlat user-space support") Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/timerlat_hist.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 80d3ba1cf51bfbbb3b098434f2b2c95cd7c0ae5c Author: Tomas Glozar Date: Tue Jan 7 15:48:21 2025 +0100 rtla/osnoise: Distinguish missing workload option osnoise_set_workload returns -1 for both missing OSNOISE_WORKLOAD option and failure in setting the option. Return -1 for missing and -2 for failure to distinguish them. Cc: stable@vger.kernel.org Cc: John Kacur Cc: Luis Goncalves Link: https://lore.kernel.org/20250107144823.239782-2-tglozar@redhat.com Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/osnoise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80967b354a76b360943af384c10d807d98bea5c4 Author: Tomas Glozar Date: Thu Jan 16 15:49:31 2025 +0100 rtla/timerlat_top: Abort event processing on second signal If either SIGINT is received twice, or after a SIGALRM (that is, after timerlat was supposed to stop), abort processing events currently left in the tracefs buffer and exit immediately. This allows the user to exit rtla without waiting for processing all events, should that take longer than wanted, at the cost of not processing all samples. Cc: John Kacur Cc: Luis Goncalves Cc: Gabriele Monaco Link: https://lore.kernel.org/20250116144931.649593-6-tglozar@redhat.com Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/timerlat_top.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit d6899e560366e10141189697502bc5521940c588 Author: Tomas Glozar Date: Thu Jan 16 15:49:30 2025 +0100 rtla/timerlat_hist: Abort event processing on second signal If either SIGINT is received twice, or after a SIGALRM (that is, after timerlat was supposed to stop), abort processing events currently left in the tracefs buffer and exit immediately. This allows the user to exit rtla without waiting for processing all events, should that take longer than wanted, at the cost of not processing all samples. Cc: John Kacur Cc: Luis Goncalves Cc: Gabriele Monaco Link: https://lore.kernel.org/20250116144931.649593-5-tglozar@redhat.com Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/timerlat_hist.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a4dfce7559d75430c464294ddee554be2a413c4a Author: Tomas Glozar Date: Thu Jan 16 15:49:29 2025 +0100 rtla/timerlat_top: Stop timerlat tracer on signal Currently, when either SIGINT from the user or SIGALRM from the duration timer is caught by rtla-timerlat, stop_tracing is set to break out of the main loop. This is not sufficient for cases where the timerlat tracer is producing more data than rtla can consume, since in that case, rtla is looping indefinitely inside tracefs_iterate_raw_events, never reaches the check of stop_tracing and hangs. In addition to setting stop_tracing, also stop the timerlat tracer on received signal (SIGINT or SIGALRM). This will stop new samples so that the existing samples may be processed and tracefs_iterate_raw_events eventually exits. Cc: stable@vger.kernel.org Cc: John Kacur Cc: Luis Goncalves Cc: Gabriele Monaco Link: https://lore.kernel.org/20250116144931.649593-4-tglozar@redhat.com Fixes: a828cd18bc4a ("rtla: Add timerlat tool and timelart top mode") Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/timerlat_top.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit c73cab9dbed04d8f65ca69177b4b21ed3e09dfa7 Author: Tomas Glozar Date: Thu Jan 16 15:49:28 2025 +0100 rtla/timerlat_hist: Stop timerlat tracer on signal Currently, when either SIGINT from the user or SIGALRM from the duration timer is caught by rtla-timerlat, stop_tracing is set to break out of the main loop. This is not sufficient for cases where the timerlat tracer is producing more data than rtla can consume, since in that case, rtla is looping indefinitely inside tracefs_iterate_raw_events, never reaches the check of stop_tracing and hangs. In addition to setting stop_tracing, also stop the timerlat tracer on received signal (SIGINT or SIGALRM). This will stop new samples so that the existing samples may be processed and tracefs_iterate_raw_events eventually exits. Cc: stable@vger.kernel.org Cc: John Kacur Cc: Luis Goncalves Cc: Gabriele Monaco Link: https://lore.kernel.org/20250116144931.649593-3-tglozar@redhat.com Fixes: 1eeb6328e8b3 ("rtla/timerlat: Add timerlat hist mode") Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/timerlat_hist.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit e879b5dcf8d044f3865a32d95cc5b213f314c54f Author: Tomas Glozar Date: Thu Jan 16 15:49:27 2025 +0100 rtla: Add trace_instance_stop Support not only turning trace on for the timerlat tracer, but also turning it off. This will be used in subsequent patches to stop the timerlat tracer without also wiping the trace buffer. Cc: stable@vger.kernel.org Cc: John Kacur Cc: Luis Goncalves Cc: Gabriele Monaco Link: https://lore.kernel.org/20250116144931.649593-2-tglozar@redhat.com Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/src/trace.c | 8 ++++++++ tools/tracing/rtla/src/trace.h | 1 + 2 files changed, 9 insertions(+) commit 64a1ba4072b34af1b76bf15fca5c2075b8cc4d64 Author: Aditya Kumar Singh Date: Thu Jan 23 21:51:38 2025 +0530 wifi: ath12k: fix handling of 6 GHz rules In the US country code, to avoid including 6 GHz rules in the 5 GHz rules list, the number of 5 GHz rules is set to a default constant value of 4 (REG_US_5G_NUM_REG_RULES). However, if there are more than 4 valid 5 GHz rules, the current logic will bypass the legitimate 6 GHz rules. For example, if there are 5 valid 5 GHz rules and 1 valid 6 GHz rule, the current logic will only consider 4 of the 5 GHz rules, treating the last valid rule as a 6 GHz rule. Consequently, the actual 6 GHz rule is never processed, leading to the eventual disabling of 6 GHz channels. To fix this issue, instead of hardcoding the value to 4, use a helper function to determine the number of 6 GHz rules present in the 5 GHz rules list and ignore only those rules. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Cc: stable@vger.kernel.org Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250123-fix_6ghz_rules_handling-v1-1-d734bfa58ff4@oss.qualcomm.com Signed-off-by: Jeff Johnson drivers/net/wireless/ath/ath12k/wmi.c | 61 ++++++++++++++++++++++++++--------- drivers/net/wireless/ath/ath12k/wmi.h | 1 - 2 files changed, 45 insertions(+), 17 deletions(-) commit 74ca334338a4489173d9e50775b13fa20cbd5958 Author: Andrea Righi Date: Thu Jan 23 13:46:06 2025 +0100 selftests/sched_ext: Fix enum resolution All scx enums are now automatically generated from vmlinux.h and they must be initialized using the SCX_ENUM_INIT() macro. Fix the scx selftests to use this macro to properly initialize these values. Fixes: 8da7bf2cee27 ("tools/sched_ext: Receive updates from SCX repo") Reported-by: Ihor Solodrai Closes: https://lore.kernel.org/all/Z2tNK2oFDX1OPp8C@slm.duckdns.org/ Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo tools/testing/selftests/sched_ext/create_dsq.c | 10 ++++----- .../selftests/sched_ext/ddsp_bogus_dsq_fail.c | 7 ++++-- .../selftests/sched_ext/ddsp_vtimelocal_fail.c | 7 ++++-- tools/testing/selftests/sched_ext/dsp_local_on.c | 1 + .../selftests/sched_ext/enq_last_no_enq_fails.c | 10 ++++----- .../selftests/sched_ext/enq_select_cpu_fails.c | 10 ++++----- tools/testing/selftests/sched_ext/exit.c | 1 + tools/testing/selftests/sched_ext/hotplug.c | 6 ++++-- .../selftests/sched_ext/init_enable_count.c | 25 +++++++--------------- tools/testing/selftests/sched_ext/maximal.c | 7 ++++-- tools/testing/selftests/sched_ext/minimal.c | 10 ++++----- tools/testing/selftests/sched_ext/prog_run.c | 10 ++++----- tools/testing/selftests/sched_ext/reload_loop.c | 9 ++++---- tools/testing/selftests/sched_ext/select_cpu_dfl.c | 7 ++++-- .../sched_ext/select_cpu_dfl_nodispatch.c | 7 ++++-- .../selftests/sched_ext/select_cpu_dispatch.c | 7 ++++-- .../sched_ext/select_cpu_dispatch_bad_dsq.c | 7 ++++-- .../sched_ext/select_cpu_dispatch_dbl_dsp.c | 7 ++++-- .../testing/selftests/sched_ext/select_cpu_vtime.c | 7 ++++-- 19 files changed, 88 insertions(+), 67 deletions(-) commit 2279563e3a8cac367b267b09c15cf1e39c06c5cc Author: Andrea Righi Date: Wed Jan 22 10:05:25 2025 +0100 sched_ext: Include task weight in the error state dump Report the task weight when dumping the task state during an error exit. Moreover, adjust the output format to display dsq_vtime, slice, and weight on the same line. This can help identify whether certain tasks were excessively prioritized or de-prioritized due to large niceness gaps. Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo kernel/sched/ext.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit be8ee18152b0523752f3a44900363838bd1573bb Author: Atul Kumar Pant Date: Sat Jan 18 14:09:27 2025 +0530 sched_ext: Fixes typos in comments Fixes some spelling errors in the comments. Signed-off-by: Atul Kumar Pant Signed-off-by: Tejun Heo kernel/sched/ext.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d0ea9ebac3e7a5b53bc259e51f54043aa98696ad Author: Manoj Vishwanathan Date: Mon Dec 16 16:27:35 2024 +0000 idpf: add more info during virtchnl transaction timeout/salt mismatch Add more information related to the transaction like cookie, vc_op, salt when transaction times out and include similar information when transaction salt does not match. Info output for transaction timeout: ------------------- (op:5015 cookie:45fe vc_op:5015 salt:45 timeout:60000ms) ------------------- before it was: ------------------- (op 5015, 60000ms) ------------------- Signed-off-by: Manoj Vishwanathan Signed-off-by: Brian Vazquez Reviewed-by: Jacob Keller Reviewed-by: Pavan Kumar Linga Reviewed-by: Paul Menzel Tested-by: Krishneil Singh Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 9a5b021cb8186f1854bac2812bd4f396bb1e881c Author: Marco Leogrande Date: Mon Dec 16 16:27:34 2024 +0000 idpf: convert workqueues to unbound When a workqueue is created with `WQ_UNBOUND`, its work items are served by special worker-pools, whose host workers are not bound to any specific CPU. In the default configuration (i.e. when `queue_delayed_work` and friends do not specify which CPU to run the work item on), `WQ_UNBOUND` allows the work item to be executed on any CPU in the same node of the CPU it was enqueued on. While this solution potentially sacrifices locality, it avoids contention with other processes that might dominate the CPU time of the processor the work item was scheduled on. This is not just a theoretical problem: in a particular scenario misconfigured process was hogging most of the time from CPU0, leaving less than 0.5% of its CPU time to the kworker. The IDPF workqueues that were using the kworker on CPU0 suffered large completion delays as a result, causing performance degradation, timeouts and eventual system crash. Tested: * I have also run a manual test to gauge the performance improvement. The test consists of an antagonist process (`./stress --cpu 2`) consuming as much of CPU 0 as possible. This process is run under `taskset 01` to bind it to CPU0, and its priority is changed with `chrt -pQ 9900 10000 ${pid}` and `renice -n -20 ${pid}` after start. Then, the IDPF driver is forced to prefer CPU0 by editing all calls to `queue_delayed_work`, `mod_delayed_work`, etc... to use CPU 0. Finally, `ktraces` for the workqueue events are collected. Without the current patch, the antagonist process can force arbitrary delays between `workqueue_queue_work` and `workqueue_execute_start`, that in my tests were as high as `30ms`. With the current patch applied, the workqueue can be migrated to another unloaded CPU in the same node, and, keeping everything else equal, the maximum delay I could see was `6us`. Fixes: 0fe45467a104 ("idpf: add create vport and netdev configuration") Signed-off-by: Marco Leogrande Signed-off-by: Manoj Vishwanathan Signed-off-by: Brian Vazquez Reviewed-by: Jacob Keller Reviewed-by: Pavan Kumar Linga Tested-by: Krishneil Singh Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/idpf/idpf_main.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit d15fe4edd7decdf14d8ad2b78df100ea23302065 Author: Manoj Vishwanathan Date: Mon Dec 16 16:27:33 2024 +0000 idpf: Acquire the lock before accessing the xn->salt The transaction salt was being accessed before acquiring the idpf_vc_xn_lock when idpf has to forward the virtchnl reply. Fixes: 34c21fa894a1 ("idpf: implement virtchnl transaction manager") Signed-off-by: Manoj Vishwanathan Signed-off-by: David Decotigny Signed-off-by: Brian Vazquez Reviewed-by: Jacob Keller Reviewed-by: Pavan Kumar Linga Tested-by: Krishneil Singh Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 137da75ba72593598898a4e79da34f4b2da5d151 Author: Emil Tantilov Date: Thu Dec 19 18:09:32 2024 -0800 idpf: fix transaction timeouts on reset Restore the call to idpf_vc_xn_shutdown() at the beginning of idpf_vc_core_deinit() provided the function is not called on remove. In the reset path the mailbox is destroyed, leading to all transactions timing out. Fixes: 09d0fb5cb30e ("idpf: deinit virtchnl transaction manager after vport and vectors") Reviewed-by: Larysa Zaremba Signed-off-by: Emil Tantilov Reviewed-by: Simon Horman Tested-by: Krishneil Singh Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 396f0165672c6a74d7379027d344b83b5f05948c Author: Emil Tantilov Date: Thu Nov 21 20:40:59 2024 -0800 idpf: add read memory barrier when checking descriptor done bit Add read memory barrier to ensure the order of operations when accessing control queue descriptors. Specifically, we want to avoid cases where loads can be reordered: 1. Load #1 is dispatched to read descriptor flags. 2. Load #2 is dispatched to read some other field from the descriptor. 3. Load #2 completes, accessing memory/cache at a point in time when the DD flag is zero. 4. NIC DMA overwrites the descriptor, now the DD flag is one. 5. Any fields loaded before step 4 are now inconsistent with the actual descriptor state. Add read memory barrier between steps 1 and 2, so that load #2 is not executed until load #1 has completed. Fixes: 8077c727561a ("idpf: add controlq init and reset checks") Reviewed-by: Przemek Kitszel Reviewed-by: Sridhar Samudrala Suggested-by: Lance Richardson Signed-off-by: Emil Tantilov Tested-by: Krishneil Singh Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/idpf/idpf_controlq.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8d28d0ddb986f56920ac97ae704cc3340a699a30 Author: Yu Kuai Date: Fri Jan 24 17:20:55 2025 +0800 md/md-bitmap: Synchronize bitmap_get_stats() with bitmap lifetime After commit ec6bb299c7c3 ("md/md-bitmap: add 'sync_size' into struct md_bitmap_stats"), following panic is reported: Oops: general protection fault, probably for non-canonical address RIP: 0010:bitmap_get_stats+0x2b/0xa0 Call Trace: md_seq_show+0x2d2/0x5b0 seq_read_iter+0x2b9/0x470 seq_read+0x12f/0x180 proc_reg_read+0x57/0xb0 vfs_read+0xf6/0x380 ksys_read+0x6c/0xf0 do_syscall_64+0x82/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e Root cause is that bitmap_get_stats() can be called at anytime if mddev is still there, even if bitmap is destroyed, or not fully initialized. Deferenceing bitmap in this case can crash the kernel. Meanwhile, the above commit start to deferencing bitmap->storage, make the problem easier to trigger. Fix the problem by protecting bitmap_get_stats() with bitmap_info.mutex. Cc: stable@vger.kernel.org # v6.12+ Fixes: 32a7627cf3a3 ("[PATCH] md: optimised resync using Bitmap based intent logging") Reported-and-tested-by: Harshit Mogalapalli Closes: https://lore.kernel.org/linux-raid/ca3a91a2-50ae-4f68-b317-abd9889f3907@oracle.com/T/#m6e5086c95201135e4941fe38f9efa76daf9666c5 Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20250124092055.4050195-1-yukuai1@huaweicloud.com Signed-off-by: Song Liu drivers/md/md-bitmap.c | 5 ++++- drivers/md/md.c | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 64179a1416e1420a34226ab3beb5f84710953d16 Merge: 7f751be5405f 6e64d6b3a3c3 Author: Simona Vetter Date: Fri Jan 24 17:06:06 2025 +0100 Merge tag 'drm-misc-next-fixes-2025-01-24' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next-fixes for v6.14-rc1: - Fix a serious regression from commit e4b5ccd392b9 ("drm/v3d: Ensure job pointer is set to NULL after job completion") - dmem cgroup Kconfig fix (acked by Tejun) - virtio: uaf in dma_buf free path - xlnx: kerneldoc Signed-off-by: Simona Vetter From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/0d4a18f4-222c-4767-9169-e6350ce8fea5@linux.intel.com commit ab18b8fff124c9b76ea12692571ca822dcd92854 Merge: 2c8d2a510c15 93b216cb312d Author: Linus Torvalds Date: Fri Jan 24 08:03:52 2025 -0800 Merge tag 'auxdisplay-v6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay Pull auxdisplay updates from Andy Shevchenko: - A couple of cleanups to img-ascii-lcd driver * tag 'auxdisplay-v6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay: auxdisplay: img-ascii-lcd: Constify struct img_ascii_lcd_config auxdisplay: img-ascii-lcd: Remove an unused field in struct img_ascii_lcd_ctx commit 7f751be5405f115d7a1d09e46d9ee05fed2c39e6 Merge: 37f332ea1dd8 024771f3fb75 Author: Simona Vetter Date: Fri Jan 24 17:01:41 2025 +0100 Merge tag 'amd-drm-next-6.14-2025-01-24' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.14-2025-01-24: amdgpu: - Documentation fixes - SMU 13.x fixes - SR-IOV fix - Display fix - PCIe calculation fix - MES 12 fix - HUBP fix - Cursor fix - Enforce isolation fixes - GFX 12 fix - Use drm scheduler API helper rather than open coding it - Mark some debugging parameters as unsafe - PSP 14.x fix - Add cleaner shader support for gfx12 - Add subvp debugging flag - SDMA 4.4.x fix - Clarify some kernel log messages - clang fix - PCIe lane reporting fix - Documentation fix amdkfd: - Mark some debugging parameters as unsafe - Fix partial migration handling - Trap handler updates Signed-off-by: Simona Vetter From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20250124152153.3861868-1-alexander.deucher@amd.com commit 2c8d2a510c15c003749e43ac2b8e1bc79a7a00d6 Merge: 454cb97726fe 6aa96f780204 Author: Linus Torvalds Date: Fri Jan 24 07:54:34 2025 -0800 Merge tag 'sound-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "This was a relatively calm cycle, and most of changes are rather small device-specific fixes. Here are highlights: Core: - Further enhancements of ALSA rawmidi and sequencer APIs for MIDI 2.0 - compress-offload API extensions for ASRC support ASoC: - Allow clocking on each DAI in an audio graph card to be configured separately - Improved power management for Renesas RZ-SSI - KUnit testing for the Cirrus DSP framework - Memory to meory operation support for Freescale/NXP platforms - Support for pause operations in SOF - Support for Allwinner suinv F1C100s, Awinc AW88083, Realtek ALC5682I-VE HD- and USB-audio: - Add support for Focusrite Scarlett 4th Gen 16i16, 18i16, and 18i20 interfaces via new FCP driver - TAS2781 SPI HD-audio sub-codec support - Various device-specific quirks as usual" * tag 'sound-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (235 commits) ALSA: hda: tas2781-spi: Fix bogus error handling in tas2781_hda_spi_probe() ALSA: hda: tas2781-spi: Fix error code in tas2781_read_acpi() ALSA: hda: tas2781-spi: Delete some dead code ALSA: usb: fcp: Fix return code from poll ops ALSA: usb: fcp: Fix incorrect resp->opcode retrieval ALSA: usb: fcp: Fix meter_levels type to __le32 ALSA: hda/realtek: Enable Mute LED on HP Laptop 14s-fq1xxx ALSA: hda: tas2781-spi: Fix -Wsometimes-uninitialized in tasdevice_spi_switch_book() ALSA: ctxfi: Simplify dao_clear_{left,right}_input() functions ALSA: hda: tas2781-spi: select CRC32 instead of CRC32_SARWATE ALSA: usb: fcp: Fix hwdep read ops types ALSA: scarlett2: Add device_setup option to use FCP driver ALSA: FCP: Add Focusrite Control Protocol driver ALSA: hda/tas2781: Add tas2781 hda SPI driver ALSA: hda/realtek - Fixed headphone distorted sound on Acer Aspire A115-31 laptop ASoC: xilinx: xlnx_spdif: Simpify using devm_clk_get_enabled() ALSA: hda: Support for Ideapad hotkey mute LEDs ASoC: Intel: sof_sdw: Fix DMI match for Lenovo 83JX, 83MC and 83NM ASoC: Intel: sof_sdw: Fix DMI match for Lenovo 83LC ASoC: dapm: add support for preparing streams ... commit 931656b9e2ff7029aee0b36e17780621948a6ac1 Author: Keith Busch Date: Thu Jan 23 07:35:43 2025 -0800 kvm: defer huge page recovery vhost task to later Some libraries want to ensure they are single threaded before forking, so making the kernel's kvm huge page recovery process a vhost task of the user process breaks those. The minijail library used by crosvm is one such affected application. Defer the task to after the first VM_RUN call, which occurs after the parent process has forked all its jailed processes. This needs to happen only once for the kvm instance, so introduce some general-purpose infrastructure for that, too. It's similar in concept to pthread_once; except it is actually usable, because the callback takes a parameter. Cc: Sean Christopherson Cc: Paolo Bonzini Tested-by: Alyssa Ross Signed-off-by: Keith Busch Message-ID: <20250123153543.2769928-1-kbusch@meta.com> [Move call_once API to include/linux. - Paolo] Cc: stable@vger.kernel.org Fixes: d96c77bd4eeb ("KVM: x86: switch hugepage recovery thread to vhost_task") Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/mmu/mmu.c | 18 ++++++++++++----- arch/x86/kvm/x86.c | 7 ++++++- include/linux/call_once.h | 45 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+), 6 deletions(-) commit 454cb97726fe62a04b187a0d631ec0a69f6b713a Merge: ae2d4fc540cd 9d4f8e54cef2 Author: Linus Torvalds Date: Fri Jan 24 07:48:10 2025 -0800 Merge tag 'v6.14-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Remove physical address skcipher walking - Fix boot-up self-test race Algorithms: - Optimisations for x86/aes-gcm - Optimisations for x86/aes-xts - Remove VMAC - Remove keywrap Drivers: - Remove n2 Others: - Fixes for padata UAF - Fix potential rhashtable deadlock by moving schedule_work outside lock" * tag 'v6.14-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (75 commits) rhashtable: Fix rhashtable_try_insert test dt-bindings: crypto: qcom,inline-crypto-engine: Document the SM8750 ICE dt-bindings: crypto: qcom,prng: Document SM8750 RNG dt-bindings: crypto: qcom-qce: Document the SM8750 crypto engine crypto: asymmetric_keys - Remove unused key_being_used_for[] padata: avoid UAF for reorder_work padata: fix UAF in padata_reorder padata: add pd get/put refcnt helper crypto: skcipher - call cond_resched() directly crypto: skcipher - optimize initializing skcipher_walk fields crypto: skcipher - clean up initialization of skcipher_walk::flags crypto: skcipher - fold skcipher_walk_skcipher() into skcipher_walk_virt() crypto: skcipher - remove redundant check for SKCIPHER_WALK_SLOW crypto: skcipher - remove redundant clamping to page size crypto: skcipher - remove unnecessary page alignment of bounce buffer crypto: skcipher - document skcipher_walk_done() and rename some vars crypto: omap - switch from scatter_walk to plain offset crypto: powerpc/p10-aes-gcm - simplify handling of linear associated data crypto: bcm - Drop unused setting of local 'ptr' variable crypto: hisilicon/qm - support new function communication ... commit ae2d4fc540cd27d667d10597b6ad8cc4c6ce622a Merge: 68732c0bf97c a3a860bc0fd6 Author: Linus Torvalds Date: Fri Jan 24 07:46:33 2025 -0800 Merge tag 'tpmdd-next-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull TPM update from Jarkko Sakkinen. * tag 'tpmdd-next-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm: Change to kvalloc() in eventlog/acpi.c commit 68732c0bf97cf946ad08660203e8eabfea11463e Merge: b746043cb325 885f5669f2ab Author: Linus Torvalds Date: Fri Jan 24 07:43:35 2025 -0800 Merge tag 'pmdomain-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm Pull pmdomain updates from Ulf Hansson: "pmdomain core: - Add support for naming idlestates through DT pmdomain providers: - arm: Explicitly request the current state at init for the SCMI PM domain - mediatek: Add Airoha CPU PM Domain support for CPU frequency scaling - ti: Add per-device latency constraint management to the ti_sci PM domain cpuidle-psci: - Enable system-wakeup through GENPD_FLAG_ACTIVE_WAKEUP" * tag 'pmdomain-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: pmdomain: airoha: Fix compilation error with Clang-20 and Thumb2 mode pmdomain: arm: scmi_pm_domain: Send an explicit request to set the current state pmdomain: airoha: Add Airoha CPU PM Domain support pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups pmdomain: ti_sci: add wakeup constraint management pmdomain: ti_sci: add per-device latency constraint management pmdomain: imx-gpcv2: Suppress bind attrs pmdomain: imx8m[p]-blk-ctrl: Suppress bind attrs pmdomain: core: Support naming idle states dt-bindings: power: domain-idle-state: Allow idle-state-name cpuidle: psci: Activate GENPD_FLAG_ACTIVE_WAKEUP with OSI commit b746043cb3250eaa1d52735bc5977c7756a9c380 Merge: f1c243fc78ca c9da9958ba14 Author: Linus Torvalds Date: Fri Jan 24 07:38:50 2025 -0800 Merge tag 'pinctrl-v6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "No core changes this time New drivers: - New subdriver for the Qualcomm MSM8917 SoC TLMM - New subdriver for the Mediatek MT7988 SoC - New subdriver for the Rockchip RK3562 SoC - New subdriver for the Renesas RZ/G3E SoC Improvements: - Fix some missing pins in the Qualcomm IPQ5424 TLMM - Fix some missing LVDS pins in the Sunxi A100/A133 - Support Sunxi V853 (simple compatible string) - Cleanups in the Samsung driver - Fix some AMD suspend behaviour - Cleanups" * tag 'pinctrl-v6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (29 commits) dt-bindings: pinctrl: sunxi: add compatible for V853 pinctrl: Use str_enable_disable-like helpers dt-bindings: pinctrl: Correct indentation and style in DTS example pinctrl: amd: Take suspend type into consideration which pins are non-wake pinctrl: stm32: Add check for clk_enable() pinctrl: renesas: rzg2l: Fix PFC_MASK for RZ/V2H and RZ/G3E pinctrl: sunxi: add missed lvds pins for a100/a133 pinctrl: mediatek: Drop mtk_pinconf_bias_set_pd() pinctrl: renesas: rzg2l: Add support for RZ/G3E SoC pinctrl: renesas: rzg2l: Update r9a09g057_variable_pin_cfg table dt-bindings: pinctrl: renesas: Document RZ/G3E SoC dt-bindings: pinctrl: renesas: Add alpha-numerical port support for RZ/V2H pinctrl: rockchip: add rk3562 support dt-bindings: pinctrl: Add rk3562 pinctrl support pinctrl: Fix the clean up on pinconf_apply_setting failure dt-bindings: pinctrl: add binding for MT7988 SoC pinctrl: mediatek: add MT7988 pinctrl driver pinctrl: mediatek: add support for MTK_PULL_PD_TYPE pinctrl: ocelot: Constify some structures pinctrl: renesas: rzg2l: Add audio clock pins on RZ/G3S ... commit 58f5c8d5ca07a2f9fa93fb073f5b1646ec482ff2 Author: Sagi Grimberg Date: Fri Jan 24 13:00:33 2025 +0200 nvmet: fix a memory leak in controller identify Simply free an allocated buffer once we copied its content to the request sgl. kmemleak complaint: unreferenced object 0xffff8cd40c388000 (size 4096): comm "kworker/2:2H", pid 14739, jiffies 4401313113 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_alloc+0x4a/0x90 [] __kmalloc_cache_noprof+0x35a/0x420 [] nvmet_execute_identify+0x912/0x9f0 [nvmet] [] nvmet_tcp_try_recv_pdu+0x84c/0xc90 [nvmet_tcp] [] nvmet_tcp_io_work+0x82/0x8b0 [nvmet_tcp] [] process_one_work+0x178/0x3e0 [] worker_thread+0x2ec/0x420 [] kthread+0xf0/0x120 [] ret_from_fork+0x44/0x70 [] ret_from_fork_asm+0x1a/0x30 Fixes: 84909f7decbd ("nvmet: use kzalloc instead of ZERO_PAGE in nvme_execute_identify_ns_nvm()") Signed-off-by: Sagi Grimberg Reviewed-by: Nilay Shroff Signed-off-by: Keith Busch drivers/nvme/target/admin-cmd.c | 1 + 1 file changed, 1 insertion(+) commit f1c243fc78ca94fd72e2e6e8f0f49b7360fef475 Merge: c9c0543b52d8 125f34e4c107 Author: Linus Torvalds Date: Fri Jan 24 07:33:46 2025 -0800 Merge tag 'iommu-updates-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux Pull iommu updates from Joerg Roedel: "Core changes: - PASID support for the blocked_domain ARM-SMMU Updates: - SMMUv2: - Implement per-client prefetcher configuration on Qualcomm SoCs - Support for the Adreno SMMU on Qualcomm's SDM670 SOC - SMMUv3: - Pretty-printing of event records - Drop the ->domain_alloc_paging implementation in favour of domain_alloc_paging_flags(flags==0) - IO-PGTable: - Generalisation of the page-table walker to enable external walkers (e.g. for debugging unexpected page-faults from the GPU) - Minor fix for handling concatenated PGDs at stage-2 with 16KiB pages - Misc: - Clean-up device probing and replace the crufty probe-deferral hack with a more robust implementation of arm_smmu_get_by_fwnode() - Device-tree binding updates for a bunch of Qualcomm platforms Intel VT-d Updates: - Remove domain_alloc_paging() - Remove capability audit code - Draining PRQ in sva unbind path when FPD bit set - Link cache tags of same iommu unit together AMD-Vi Updates: - Use CMPXCHG128 to update DTE - Cleanups of the domain_alloc_paging() path RiscV IOMMU: - Platform MSI support - Shutdown support Rockchip IOMMU: - Add DT bindings for Rockchip RK3576 More smaller fixes and cleanups" * tag 'iommu-updates-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux: (66 commits) iommu: Use str_enable_disable-like helpers iommu/amd: Fully decode all combinations of alloc_paging_flags iommu/amd: Move the nid to pdom_setup_pgtable() iommu/amd: Change amd_iommu_pgtable to use enum protection_domain_mode iommu/amd: Remove type argument from do_iommu_domain_alloc() and related iommu/amd: Remove dev == NULL checks iommu/amd: Remove domain_alloc() iommu/amd: Remove unused amd_iommu_domain_update() iommu/riscv: Fixup compile warning iommu/arm-smmu-v3: Add missing #include of linux/string_choices.h iommu/arm-smmu-v3: Use str_read_write helper w/ logs iommu/io-pgtable-arm: Add way to debug pgtable walk iommu/io-pgtable-arm: Re-use the pgtable walk for iova_to_phys iommu/io-pgtable-arm: Make pgtable walker more generic iommu/arm-smmu: Add ACTLR data and support for qcom_smmu_500 iommu/arm-smmu: Introduce ACTLR custom prefetcher settings iommu/arm-smmu: Add support for PRR bit setup iommu/arm-smmu: Refactor qcom_smmu structure to include single pointer iommu/arm-smmu: Re-enable context caching in smmu reset operation iommu/vt-d: Link cache tags of same iommu unit together ... commit c9c0543b52d8cfe3a3b15d1e39ab9dbc91be6df4 Merge: 113691ce9f32 0da9a3f9ac8a Author: Linus Torvalds Date: Fri Jan 24 07:18:39 2025 -0800 Merge tag 'platform-drivers-x86-v6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Ilpo Järvinen: "acer-wmi: - Add support for PH14-51, PH16-72, and Nitro AN515-58 - Add proper hwmon support - Improve error handling when reading "gaming system info" - Replace direct EC reads for the current platform profile with WMI calls to handle EC address variations - Replace custom platform_profile cycling with the generic one ACPI: - platform_profile: Major refactoring and improvements - Support registering multiple platform_profile handlers concurrently to avoid the need to quirk which handler takes precedence - Support reporting "custom" profile for cases where the current profile is ambiguous or when settings tweaks are done outside the pre-defined profile - Abstract and layer platform_profile API better using the class_dev and drvdata - Various minor improvements - Add Documentation and kerneldoc amd/hsmp: - Add support for HSMP protocol v7 amd/pmc: - Support AMD 1Ah family 70h - Support STB with Ryzen desktop SoCs amd/pmf: - Support Custom BIOS inputs for PMF TA - Support passing SRA sensor data from AMD SFH (HID) to PMF TA dell-smo8800: - Move SMO88xx quirk away from the generic i2c-i801 driver - Add accelerometer support for Dell Latitude E6330/E6430 and XPS 9550 - Support probing accelerometer for models yet to be listed in the DMI mapping table because ACPI lacks i2c-address for the accelerometer (behind a module parameter because probing might be dangerous) HID: - amd_sfh: Add support for exporting SRA sensor data hp-wmi: - Add fan and thermal support for Victus 16-s1000 input: - Add key for phone linking - i8042: Add context for the i8042 filter to enable cleaning up the filter related global variables from pdx86 drivers lenovo-wmi-camera: - Use SW_CAMERA_LENS_COVER instead of KEY_CAMERA_ACCESS mellanox mlxbf-pmc: - Add support for monitoring cycle count - Add Documentation thinkpad_acpi: - Add support for phone link key tools/power/x86/intel-speed-select: - Fix Turbo Ratio Limit restore x86-android-tables: - Add support for Vexia EDU ATLA 10 Bluetooth and EC battery driver And miscellaneous cleanups / refactoring / improvements" * tag 'platform-drivers-x86-v6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (133 commits) platform/x86: acer-wmi: Fix initialization of last_non_turbo_profile platform/x86: acer-wmi: Ignore AC events platform/mellanox: mlxreg-io: use sysfs_emit() instead of sprintf() platform/mellanox: mlxreg-hotplug: use sysfs_emit() instead of sprintf() platform/mellanox: mlxbf-bootctl: use sysfs_emit() instead of sprintf() platform/x86: hp-wmi: Add fan and thermal profile support for Victus 16-s1000 ACPI: platform_profile: Add a prefix to log messages ACPI: platform_profile: Add documentation ACPI: platform_profile: Clean platform_profile_handler ACPI: platform_profile: Move platform_profile_handler ACPI: platform_profile: Remove platform_profile_handler from exported symbols platform/x86: thinkpad_acpi: Use devm_platform_profile_register() platform/x86: inspur_platform_profile: Use devm_platform_profile_register() platform/x86: hp-wmi: Use devm_platform_profile_register() platform/x86: ideapad-laptop: Use devm_platform_profile_register() platform/x86: dell-pc: Use devm_platform_profile_register() platform/x86: asus-wmi: Use devm_platform_profile_register() platform/x86: amd: pmf: sps: Use devm_platform_profile_register() platform/x86: acer-wmi: Use devm_platform_profile_register() platform/surface: surface_platform_profile: Use devm_platform_profile_register() ... commit 024771f3fb75dc817e9429d5763f1a6eb84b6f21 Author: Aric Cyr Date: Tue Dec 10 18:38:15 2024 -0500 drm/amd/display: Optimize cursor position updates [why] Updating the cursor enablement register can be a slow operation and accumulates when high polling rate cursors cause frequent updates asynchronously to the cursor position. [how] Since the cursor enable bit is cached there is no need to update the enablement register if there is no change to it. This removes the read-modify-write from the cursor position programming path in HUBP and DPP, leaving only the register writes. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Sung Lee Signed-off-by: Aric Cyr Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c | 7 ++++--- drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c | 6 ++++-- drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c | 8 +++++--- drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c | 10 ++++++---- 4 files changed, 19 insertions(+), 12 deletions(-) commit 01130f5260e5868fb6b15ab8c00dbc894139f48e Author: Aric Cyr Date: Thu Jan 9 15:03:48 2025 -0500 drm/amd/display: Add hubp cache reset when powergating [Why] When HUBP is power gated, the SW state can get out of sync with the hardware state causing cursor to not be programmed correctly. [How] Similar to DPP, add a HUBP reset function which is called wherever HUBP is initialized or powergated. This function will clear the cursor position and attribute cache allowing for proper programming when the HUBP is brought back up. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Sung Lee Signed-off-by: Aric Cyr Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c | 3 +++ drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c | 10 +++++++++- drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.h | 2 ++ drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c | 1 + drivers/gpu/drm/amd/display/dc/hubp/dcn201/dcn201_hubp.c | 1 + drivers/gpu/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c | 3 +++ drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c | 3 +++ drivers/gpu/drm/amd/display/dc/hubp/dcn31/dcn31_hubp.c | 1 + drivers/gpu/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.c | 1 + drivers/gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c | 1 + drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c | 3 ++- drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 2 ++ drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 2 ++ drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 2 ++ 14 files changed, 33 insertions(+), 2 deletions(-) commit 335acfb64eb88eb638e2adc8ba5bfa530f2dd20d Author: Shaoyun Liu Date: Tue Jan 14 11:57:41 2025 -0500 drm/amd/amdgpu: Enable scratch data dump for mes 12 MES internal will check CP_MES_MSCRATCH_LO/HI register to set scratch data location during ucode start, driver side need to start the MES one by one with different setting for each pipe Signed-off-by: Shaoyun Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 2 +- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 49 ++++++++++++++++++++++++--------- 2 files changed, 37 insertions(+), 14 deletions(-) commit 7e4cb7dea2b406c8f472f71ab574e399f1a0a656 Author: Mario Limonciello Date: Thu Jan 16 15:47:11 2025 -0600 drm/amd: Clarify kdoc for amdgpu.gttsize Effectively amdgpu.gttsize gets set to ~1/2 of RAM, but that's controlled by what the TTM page limit is set to. Clarify the kdoc. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc915275ea5e7e476d174f84cb7674a1e69273d3 Author: Srinivasan Shanmugam Date: Mon Jan 20 17:57:04 2025 +0530 drm/amd/amdgpu: Prevent null pointer dereference in GPU bandwidth calculation If the parent is NULL, adev->pdev is used to retrieve the PCIe speed and width, ensuring that the function can still determine these capabilities from the device itself. Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:6193 amdgpu_device_gpu_bandwidth() error: we previously assumed 'parent' could be null (see line 6180) drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 6170 static void amdgpu_device_gpu_bandwidth(struct amdgpu_device *adev, 6171 enum pci_bus_speed *speed, 6172 enum pcie_link_width *width) 6173 { 6174 struct pci_dev *parent = adev->pdev; 6175 6176 if (!speed || !width) 6177 return; 6178 6179 parent = pci_upstream_bridge(parent); 6180 if (parent && parent->vendor == PCI_VENDOR_ID_ATI) { ^^^^^^ If parent is NULL 6181 /* use the upstream/downstream switches internal to dGPU */ 6182 *speed = pcie_get_speed_cap(parent); 6183 *width = pcie_get_width_cap(parent); 6184 while ((parent = pci_upstream_bridge(parent))) { 6185 if (parent->vendor == PCI_VENDOR_ID_ATI) { 6186 /* use the upstream/downstream switches internal to dGPU */ 6187 *speed = pcie_get_speed_cap(parent); 6188 *width = pcie_get_width_cap(parent); 6189 } 6190 } 6191 } else { 6192 /* use the device itself */ --> 6193 *speed = pcie_get_speed_cap(parent); ^^^^^^ Then we are toasted here. 6194 *width = pcie_get_width_cap(parent); 6195 } 6196 } Fixes: 757e8b951ce2 ("drm/amdgpu: cache gpu pcie link width") Cc: Christian König Cc: Alex Deucher Reported-by: Dan Carpenter Signed-off-by: Srinivasan Shanmugam Suggested-by: Lijo Lazar Reviewed-by: Lijo Lazar Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit da29abe71e164f10917ea6da02f5d9c192ccdeb7 Author: Srinivasan Shanmugam Date: Wed Jan 15 22:29:06 2025 +0530 drm/amd/display: Fix error pointers in amdgpu_dm_crtc_mem_type_changed The function amdgpu_dm_crtc_mem_type_changed was dereferencing pointers returned by drm_atomic_get_plane_state without checking for errors. This could lead to undefined behavior if the function returns an error pointer. This commit adds checks using IS_ERR to ensure that new_plane_state and old_plane_state are valid before dereferencing them. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:11486 amdgpu_dm_crtc_mem_type_changed() error: 'new_plane_state' dereferencing possible ERR_PTR() drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c 11475 static bool amdgpu_dm_crtc_mem_type_changed(struct drm_device *dev, 11476 struct drm_atomic_state *state, 11477 struct drm_crtc_state *crtc_state) 11478 { 11479 struct drm_plane *plane; 11480 struct drm_plane_state *new_plane_state, *old_plane_state; 11481 11482 drm_for_each_plane_mask(plane, dev, crtc_state->plane_mask) { 11483 new_plane_state = drm_atomic_get_plane_state(state, plane); 11484 old_plane_state = drm_atomic_get_plane_state(state, plane); ^^^^^^^^^^^^^^^^^^^^^^^^^^ These functions can fail. 11485 --> 11486 if (old_plane_state->fb && new_plane_state->fb && 11487 get_mem_type(old_plane_state->fb) != get_mem_type(new_plane_state->fb)) 11488 return true; 11489 } 11490 11491 return false; 11492 } Fixes: 4caacd1671b7 ("drm/amd/display: Do not elevate mem_type change to full update") Cc: Leo Li Cc: Tom Chung Cc: Rodrigo Siqueira Cc: Roman Li Cc: Alex Hung Cc: Aurabindo Pillai Cc: Harry Wentland Cc: Hamza Mahfooz Reported-by: Dan Carpenter Signed-off-by: Srinivasan Shanmugam Reviewed-by: Roman Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++ 1 file changed, 5 insertions(+) commit b529093999ff052916b35356dc66eddb83258ead Author: Lin.Cao Date: Tue Jan 14 17:42:01 2025 +0800 drm/amdgpu: fix ring timeout issue in gfx10 sr-iov environment commit 26c95e838e63 ("drm/amdgpu: set the VM pointer to NULL in amdgpu_job_prepare") set job->vm as NULL if there is no fence. It will cause emit switch buffer be skippen if job->vm set as NULL. Check job rather than vm could solve this problem. Fixes: 26c95e838e63 ("drm/amdgpu: set the VM pointer to NULL in amdgpu_job_prepare") Signed-off-by: Lin.Cao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bf06a1fcd7e06435e654e10f6a24784785854f7 Author: Lijo Lazar Date: Fri Jan 17 20:12:42 2025 +0530 drm/amd/pm: Fix smu v13.0.6 caps initialization Fix the initialization and usage of SMU v13.0.6 capability values. Use caps_set/clear functions to set/clear capability. Also, fix SET_UCLK_MAX capability on APUs, it is supported on APUs. Fixes: e9b86b841baf ("drm/amd/pm: Add capability flags for SMU v13.0.6") Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher Reviewed-by: Yang Wang Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 239 ++++++++++++--------- 1 file changed, 134 insertions(+), 105 deletions(-) commit 875596b984c509a2ab3eba7ce054e5278171a701 Author: Jesse.zhang@amd.com Date: Sat Jan 18 17:38:22 2025 +0800 drm/amd/pm: Refactor SMU 13.0.6 SDMA reset firmware version checks This patch refactors the firmware version checks in `smu_v13_0_6_reset_sdma` to support multiple SMU programs with different firmware version thresholds. V2: return -EOPNOTSUPP for unspported pmfw Suggested-by: Lazar Lijo Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 2e7618457c3871c8657ed1e8bc16e09a3aff39c2 Author: Jesse.zhang@amd.com Date: Mon Jan 13 09:44:56 2025 +0800 revert "drm/amdgpu/pm: add definition PPSMC_MSG_ResetSDMA2" pmfw now unifies PPSMC_MSG_ResetSDMA definitions for different devices. PPSMC_MSG_ResetSDMA2 is not needed. Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_ppsmc.h | 1 - drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 +-- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) commit 941f0cb6c8609ea5bab095d5deb3fe367cc41c85 Author: Jesse.zhang@amd.com Date: Sat Jan 18 17:05:25 2025 +0800 revert "drm/amdgpu/pm: Implement SDMA queue reset for different asic" pmfw unified PPSMC_MSG_ResetSDMA definitions for different devices. PPSMC_MSG_ResetSDMA2 is not needed. Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 30 +++++++--------------- 1 file changed, 9 insertions(+), 21 deletions(-) commit e9b86b841baf2e4e7e8b3521734aeb4803f22b99 Author: Lijo Lazar Date: Thu Jan 16 17:56:12 2025 +0530 drm/amd/pm: Add capability flags for SMU v13.0.6 Add capability flags for SMU v13.0.6 variants. Initialize the flags based on firmware support. As there are multiple IP versions maintained, it is more manageable with one time initialization of caps flags based on IP version and firmware feature support. Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher Reviewed-by: Asad Kamal Reviewed-by: Yang Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 1 + .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 225 ++++++++++++++------- 2 files changed, 158 insertions(+), 68 deletions(-) commit aedf498a2c3334a8c1baca107e6f43cb1ca39d9a Author: Alex Deucher Date: Fri Jan 17 14:16:11 2025 -0500 drm/amd/display: fix SUBVP DC_DEBUG_MASK documentation This needs to be kerneldoc formatted. Fixes: 5349658fa4a1 ("drm/amd: Add debug option to disable subvp") Reviewed-by: Harry Wentland Reported-by: Stephen Rothwell Signed-off-by: Alex Deucher Cc: Aurabindo Pillai drivers/gpu/drm/amd/include/amd_shared.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85172c80347fec8bcffa9e26b0d727efe3b00fb2 Author: Alex Deucher Date: Tue Jan 14 14:31:55 2025 -0500 drm/amd/display: fix CEC DC_DEBUG_MASK documentation This needs to be kerneldoc formatted. Fixes: 7594874227e1 ("drm/amd/display: add CEC notifier to amdgpu driver") Reported-by: Stephen Rothwell Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: Kun Liu drivers/gpu/drm/amd/include/amd_shared.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64314e3f9c11578b28f145fc9a4b37ca1196fafd Author: Alex Deucher Date: Mon Jan 6 12:19:11 2025 -0500 drm/amdgpu: fix the PCIe lanes reporting in the INFO IOCTL Combine the platform and GPU caps like we do for PCIe Gen. This aligns properly with expectations and documentation for the interface. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3820 Reviewed-by: Yang Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 757e8b951ce27bae1c1fd96f9d4c6f14037a542b Author: Alex Deucher Date: Mon Jan 6 11:55:05 2025 -0500 drm/amdgpu: cache gpu pcie link width Get the PCIe link with of the device itself (or it's integrated upstream bridge) and cache that. v2: fix typo Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3820 Reviewed-by: Yang Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 152 +++++++++++++++++++++++------ drivers/gpu/drm/amd/include/amd_pcie.h | 18 ++++ 2 files changed, 138 insertions(+), 32 deletions(-) commit a8d42cd228ec41ad99c50a270db82f0dd9127a28 Author: Tzung-Bi Shih Date: Thu Jan 9 05:35:04 2025 +0000 drm/amd/display: mark static functions noinline_for_stack When compiling allmodconfig (CONFIG_WERROR=y) with clang-19, see the following errors: .../display/dc/dml2/display_mode_core.c:6268:13: warning: stack frame size (3128) exceeds limit (3072) in 'dml_prefetch_check' [-Wframe-larger-than] .../display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c:7236:13: warning: stack frame size (3256) exceeds limit (3072) in 'dml_core_mode_support' [-Wframe-larger-than] Mark static functions called by dml_prefetch_check() and dml_core_mode_support() noinline_for_stack to avoid them become huge functions and thus exceed the frame size limit. A way to reproduce: $ git checkout next-20250107 $ mkdir build_dir $ export PATH=/tmp/llvm-19.1.6-x86_64/bin:$PATH $ make LLVM=1 O=build_dir allmodconfig $ make LLVM=1 O=build_dir drivers/gpu/drm/ -j The way how it chose static functions to mark: [0] Unset CONFIG_WERROR in build_dir/.config. To get display_mode_core.o without errors. [1] Get a function list called by dml_prefetch_check(). $ sed -n '6268,6711p' drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c \ | sed -n -r 's/.*\W(\w+)\(.*/\1/p' | sort -u >/tmp/syms [2] Get the non-inline function list. Objdump won't show the symbols if they are inline functions. $ make LLVM=1 O=build_dir drivers/gpu/drm/ -j $ objdump -d build_dir/.../display_mode_core.o | \ ./scripts/checkstack.pl x86_64 0 | \ grep -f /tmp/syms | cut -d' ' -f2- >/tmp/orig [3] Get the full function list. Append "-fno-inline" to `CFLAGS_.../display_mode_core.o` in drivers/gpu/drm/amd/display/dc/dml2/Makefile. $ make LLVM=1 O=build_dir drivers/gpu/drm/ -j $ objdump -d build_dir/.../display_mode_core.o | \ ./scripts/checkstack.pl x86_64 0 | \ grep -f /tmp/syms | cut -d' ' -f2- >/tmp/noinline [4] Get the inline function list. If a symbol only in /tmp/noinline but not in /tmp/orig, it is a good candidate to mark noinline. $ diff /tmp/orig /tmp/noinline Chosen functions and their stack sizes: CalculateBandwidthAvailableForImmediateFlip [display_mode_core.o]:144 CalculateExtraLatency [display_mode_core.o]:176 CalculateTWait [display_mode_core.o]:64 CalculateVActiveBandwithSupport [display_mode_core.o]:112 set_calculate_prefetch_schedule_params [display_mode_core.o]:48 CheckGlobalPrefetchAdmissibility [dml2_core_dcn4_calcs.o]:544 calculate_bandwidth_available [dml2_core_dcn4_calcs.o]:320 calculate_vactive_det_fill_latency [dml2_core_dcn4_calcs.o]:272 CalculateDCFCLKDeepSleep [dml2_core_dcn4_calcs.o]:208 CalculateODMMode [dml2_core_dcn4_calcs.o]:208 CalculateOutputLink [dml2_core_dcn4_calcs.o]:176 Signed-off-by: Tzung-Bi Shih Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c | 12 ++++++------ .../dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) commit 1241b64d4be8f9cc013711df9847436ef1599b24 Author: Jay Cornwall Date: Tue Jan 7 21:59:06 2025 -0600 drm/amdkfd: Clear MODE.VSKIP in gfx9 trap handler If user shader issues S_SETVSKIP then this state will persist when executing the trap handler, causing vector instructions to be skipped. VSKIP state is already saved/restored through the MODE register. Signed-off-by: Jay Cornwall Reviewed-by: Lancelot Six Suggested-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 2721 ++++++++++---------- .../gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx9.asm | 4 +- 2 files changed, 1366 insertions(+), 1359 deletions(-) commit a0db1ea0dd4d7442cded8be30474eadc6638caaa Author: Lijo Lazar Date: Tue Dec 17 10:19:49 2024 +0530 drm/amdgpu: Refine ip detection log message 'add ip block' causes a confusion if the blocks are disabled later with ip_block_mask. Instead change to 'detected' and also add device context. Signed-off-by: Lijo Lazar Reviewed-by: Asad Kamal Suggested-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b1df8050e7c7b7c1ff8ce9715e12f1c825aedbc3 Author: Lijo Lazar Date: Wed Jan 1 10:01:50 2025 +0530 drm/amdgpu: Add handler for SDMA context empty Context empty interrupt is enabled for SDMA 4.4.2. Add a handler for context empty interrupt so that it is disposed of fast, and not propagated to KFD layer. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Suggested-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h | 1 + drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) commit 9d63fbf75158811bccd08c5ac9b2db70427c3e51 Author: Aurabindo Pillai Date: Mon Jan 13 17:05:16 2025 -0500 drm/amd: Add debug option to disable subvp Some monitors flicker when subvp is enabled which maybe related to an uncommon timing they use. To isolate such issues, add a debug option to help isolate this the issue for debugging. Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Suggested-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ drivers/gpu/drm/amd/include/amd_shared.h | 5 +++++ 2 files changed, 8 insertions(+) commit 36a21f2686dcf96bb61f1918f8b44156191b2543 Author: Jay Cornwall Date: Tue Jan 7 21:26:32 2025 -0600 drm/amdkfd: Sync trap handler binary with source Source and binary have become mismatched during branch activity. Signed-off-by: Jay Cornwall Reviewed-by: Lancelot Six Suggested-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 726 ++++++++++++------------- 1 file changed, 359 insertions(+), 367 deletions(-) commit b5f022fe8ec58540e29a32e328f89b7298f70313 Author: Emily Deng Date: Tue Dec 31 16:13:14 2024 +0800 drm/amdkfd: Fix partial migrate issue For partial migrate from ram to vram, the migrate->cpages is not equal to migrate->npages, should use migrate->npages to check all needed migrate pages which could be copied or not. And only need to set those pages could be migrated to migrate->dst[i], or the migrate_vma_pages will migrate the wrong pages based on the migrate->dst[i]. v2: Add mpages to break the loop earlier. v3: Uses MIGRATE_PFN_MIGRATE to identify whether page could be migrated. v4: Correct the error part. Signed-off-by: Emily Deng Reviewed-by: Philip Yang Suggested-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 113691ce9f321c6d3d4da0cae2bfc233403251dc Merge: 5b7f7234ff18 6f5c71cc42d4 Author: Linus Torvalds Date: Fri Jan 24 05:58:31 2025 -0800 Merge tag 'x86_tdx_for_6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 TDX updates from Dave Hansen: "Intel Trust Domain updates. The existing TDX code needs a _bit_ of metadata from the TDX module. But KVM is going to need a bunch more very shortly. Rework the interface with the TDX module to be more consistent and handle the new higher volume. The TDX module has added a few new features. The first is a promise not to clobber RBP under any circumstances. Basically the kernel now will refuse to use any modules that don't have this promise. Second, enable the new "REDUCE_VE" feature. This ensures that the TDX module will not send some silly virtualization exceptions that the guest had no good way to handle anyway. - Centralize global metadata infrastructure - Use new TDX module features for exception suppression and RBP clobbering" * tag 'x86_tdx_for_6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/virt/tdx: Require the module to assert it has the NO_RBP_MOD mitigation x86/virt/tdx: Switch to use auto-generated global metadata reading code x86/virt/tdx: Use dedicated struct members for PAMT entry sizes x86/virt/tdx: Use auto-generated code to read global metadata x86/virt/tdx: Start to track all global metadata in one structure x86/virt/tdx: Rename 'struct tdx_tdmr_sysinfo' to reflect the spec better x86/tdx: Dump attributes and TD_CTLS on boot x86/tdx: Disable unnecessary virtualization exceptions commit 5b7f7234ff18a5f48e0d36c417a0d07c7fdfc61a Merge: 7685b334d1e4 cf4ca8065090 Author: Linus Torvalds Date: Fri Jan 24 05:54:26 2025 -0800 Merge tag 'x86-boot-2025-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot updates from Ingo Molnar: - A large and involved preparatory series to pave the way to add exception handling for relocate_kernel - which will be a debugging facility that has aided in the field to debug an exceptionally hard to debug early boot bug. Plus assorted cleanups and fixes that were discovered along the way, by David Woodhouse: - Clean up and document register use in relocate_kernel_64.S - Use named labels in swap_pages in relocate_kernel_64.S - Only swap pages for ::preserve_context mode - Allocate PGD for x86_64 transition page tables separately - Copy control page into place in machine_kexec_prepare() - Invoke copy of relocate_kernel() instead of the original - Move relocate_kernel to kernel .data section - Add data section to relocate_kernel - Drop page_list argument from relocate_kernel() - Eliminate writes through kernel mapping of relocate_kernel page - Clean up register usage in relocate_kernel() - Mark relocate_kernel page as ROX instead of RWX - Disable global pages before writing to control page - Ensure preserve_context flag is set on return to kernel - Use correct swap page in swap_pages function - Fix stack and handling of re-entry point for ::preserve_context - Mark machine_kexec() with __nocfi - Cope with relocate_kernel() not being at the start of the page - Use typedef for relocate_kernel_fn function prototype - Fix location of relocate_kernel with -ffunction-sections (fix by Nathan Chancellor) - A series to remove the last remaining absolute symbol references from .head.text, and enforce this at build time, by Ard Biesheuvel: - Avoid WARN()s and panic()s in early boot code - Don't hang but terminate on failure to remap SVSM CA - Determine VA/PA offset before entering C code - Avoid intentional absolute symbol references in .head.text - Disable UBSAN in early boot code - Move ENTRY_TEXT to the start of the image - Move .head.text into its own output section - Reject absolute references in .head.text - The above build-time enforcement uncovered a handful of bugs of essentially non-working code, and a wrokaround for a toolchain bug, fixed by Ard Biesheuvel as well: - Fix spurious undefined reference when CONFIG_X86_5LEVEL=n, on GCC-12 - Disable UBSAN on SEV code that may execute very early - Disable ftrace branch profiling in SEV startup code - And miscellaneous cleanups: - kexec_core: Add and update comments regarding the KEXEC_JUMP flow (Rafael J. Wysocki) - x86/sysfs: Constify 'struct bin_attribute' (Thomas Weißschuh)" * tag 'x86-boot-2025-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (33 commits) x86/sev: Disable ftrace branch profiling in SEV startup code x86/kexec: Use typedef for relocate_kernel_fn function prototype x86/kexec: Cope with relocate_kernel() not being at the start of the page kexec_core: Add and update comments regarding the KEXEC_JUMP flow x86/kexec: Mark machine_kexec() with __nocfi x86/kexec: Fix location of relocate_kernel with -ffunction-sections x86/kexec: Fix stack and handling of re-entry point for ::preserve_context x86/kexec: Use correct swap page in swap_pages function x86/kexec: Ensure preserve_context flag is set on return to kernel x86/kexec: Disable global pages before writing to control page x86/sev: Don't hang but terminate on failure to remap SVSM CA x86/sev: Disable UBSAN on SEV code that may execute very early x86/boot/64: Fix spurious undefined reference when CONFIG_X86_5LEVEL=n, on GCC-12 x86/sysfs: Constify 'struct bin_attribute' x86/kexec: Mark relocate_kernel page as ROX instead of RWX x86/kexec: Clean up register usage in relocate_kernel() x86/kexec: Eliminate writes through kernel mapping of relocate_kernel page x86/kexec: Drop page_list argument from relocate_kernel() x86/kexec: Add data section to relocate_kernel x86/kexec: Move relocate_kernel to kernel .data section ... commit 7685b334d1e4927cc73b62c65293ba65748d9c52 Merge: bc8198dc7ebc 91b7747dc70d Author: Linus Torvalds Date: Fri Jan 24 05:45:40 2025 -0800 Merge tag 'perf-tools-for-v6.14-2025-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools Pull perf-tools updates from Namhyung Kim: "There are a lot of changes in the perf tools in this cycle. build: - Use generic syscall table to generate syscall numbers on supported archs - This also enables to get rid of libaudit which was used for syscall numbers - Remove python2 support as it's deprecated for years - Fix issues on static build with libzstd perf record: - Intel-PT supports "aux-action" config term to pause or resume tracing in the aux-buffer. Users can start the intel_pt event as "started-paused" and configure other events to control the Intel-PT tracing: # perf record --kcore -e intel_pt/aux-action=start-paused/ \ -e syscalls:sys_enter_newuname/aux-action=resume/ \ -e syscalls:sys_exit_newuname/aux-action=pause/ -- uname This requires kernel support (which was added in v6.13) perf lock: - 'perf lock contention' command has an ability to symbolize locks in dynamically allocated objects using slab cache name when it runs with BPF. Those dynamic locks would have "&" prefix in the name to distinguish them from ordinary (static) locks # perf lock con -abl -E 5 sleep 1 contended total wait max wait avg wait address symbol 2 1.95 us 1.77 us 975 ns ffff9d5e852d3498 &task_struct (mutex) 1 1.18 us 1.18 us 1.18 us ffff9d5e852d3538 &task_struct (mutex) 4 1.12 us 354 ns 279 ns ffff9d5e841ca800 &kmalloc-cg-512 (mutex) 2 859 ns 617 ns 429 ns ffffffffa41c3620 delayed_uprobe_lock (mutex) 3 691 ns 388 ns 230 ns ffffffffa41c0940 pack_mutex (mutex) This also requires kernel/BPF support (which was added in v6.13) perf ftrace: - 'perf ftrace latency' command gets a couple of options to support linear buckets instead of exponential. Also it's possible to specify max and min latency for the linear buckets: # perf ftrace latency -abn -T switch_mm_irqs_off --bucket-range=100 \ --min-latency=200 --max-latency=800 -- sleep 1 # DURATION | COUNT | GRAPH | 0 - 200 ns | 186 | ### | 200 - 300 ns | 256 | ##### | 300 - 400 ns | 364 | ####### | 400 - 500 ns | 223 | #### | 500 - 600 ns | 111 | ## | 600 - 700 ns | 41 | | 700 - 800 ns | 141 | ## | 800 - ... ns | 169 | ### | # statistics (in nsec) total time: 2162212 avg time: 967 max time: 16817 min time: 132 count: 2236 - As you can see in the above example, it nows shows the statistics at the end so that users can see the avg/max/min latencies easily - 'perf ftrace profile' command has --graph-opts option like 'perf ftrace trace' so that it can control the tracing behaviors in the same way. For example, it can limit the function call depth or threshold perf script: - Improve physical memory resolution in 'mem-phys-addr' script by parsing /proc/iomem file # perf script mem-phys-addr -- find / ... Event: mem_inst_retired.all_loads:P Memory type count percentage ---------------------------------------- ---------- ---------- 100000000-85f7fffff : System RAM 8929 69.7 547600000-54785d23f : Kernel data 1240 9.7 546a00000-5474bdfff : Kernel rodata 490 3.8 5480ce000-5485fffff : Kernel bss 121 0.9 0-fff : Reserved 3860 30.1 100000-89c01fff : System RAM 18 0.1 8a22c000-8df6efff : System RAM 5 0.0 Others: - 'perf test' gets --runs-per-test option to run the test cases repeatedly. This would be helpful to see if it's flaky - Add 'parse_events' method to Python perf extension module, so that users can use the same event parsing logic in the python code. One more step towards implementing perf tools in Python. :) - Support opening tracepoint events without libtraceevent. This will be helpful if it won't use the tracing data like in 'perf stat' - Update ARM Neoverse N2/V2 JSON events and metrics" * tag 'perf-tools-for-v6.14-2025-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (176 commits) perf test: Update event_groups test to use instructions perf bench: Fix undefined behavior in cmpworker() perf annotate: Prefer passing evsel to evsel->core.idx perf lock: Rename fields in lock_type_table perf lock: Add percpu-rwsem for type filter perf lock: Fix parse_lock_type which only retrieve one lock flag perf lock: Fix return code for functions in __cmd_contention perf hist: Fix width calculation in hpp__fmt() perf hist: Fix bogus profiles when filters are enabled perf hist: Deduplicate cmp/sort/collapse code perf test: Improve verbose documentation perf test: Add a runs-per-test flag perf test: Fix parallel/sequential option documentation perf test: Send list output to stdout rather than stderr perf test: Rename functions and variables for better clarity perf tools: Expose quiet/verbose variables in Makefile.perf perf config: Add a function to set one variable in .perfconfig perf test perftool_testsuite: Return correct value for skipping perf test perftool_testsuite: Add missing description perf test record+probe_libc_inet_pton: Make test resilient ... commit 0141978ae75bd48bac13fca6de131a5071c32011 Author: Zhang Rui Date: Fri Jan 17 16:14:20 2025 +0800 x86/acpi: Fix LAPIC/x2APIC parsing order On some systems, the same CPU (with the same APIC ID) is assigned a different logical CPU id after commit ec9aedb2aa1a ("x86/acpi: Ignore invalid x2APIC entries"). This means that Linux enumerates the CPUs in a different order, which violates ACPI specification[1] that states: "OSPM should initialize processors in the order that they appear in the MADT" The problematic commit parses all LAPIC entries before any x2APIC entries, aiming to ignore x2APIC entries with APIC ID < 255 when valid LAPIC entries exist. However, it disrupts the CPU enumeration order on systems where x2APIC entries precede LAPIC entries in the MADT. Fix this problem by: 1) Parsing LAPIC entries first without registering them in the topology to evaluate whether valid LAPIC entries exist. 2) Restoring the MADT in order parser which invokes either the LAPIC or the X2APIC parser function depending on the entry type. The X2APIC parser still ignores entries < 0xff in case that #1 found valid LAPIC entries independent of their position in the MADT table. Link: https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#madt-processor-local-apic-sapic-structure-entry-order Cc: All applicable Reported-by: Jim Mattson Closes: https://lore.kernel.org/all/20241010213136.668672-1-jmattson@google.com/ Fixes: ec9aedb2aa1a ("x86/acpi: Ignore invalid x2APIC entries") Signed-off-by: Zhang Rui Reviewed-by: Jim Mattson Tested-by: Jim Mattson Reviewed-by: Thomas Gleixner Link: https://patch.msgid.link/20250117081420.4046737-1-rui.zhang@intel.com Signed-off-by: Rafael J. Wysocki arch/x86/kernel/acpi/boot.c | 50 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 5 deletions(-) commit 2e3c688ddaf2bb8e3696a773b5278711a90ea080 Author: Geert Uytterhoeven Date: Fri Jan 24 09:52:45 2025 +0100 ASoC: renesas: SND_SIU_MIGOR should depend on DMADEVICES If CONFIG_DMADEVICES=n: WARNING: unmet direct dependencies detected for SND_SOC_SH4_SIU Depends on [n]: SOUND [=y] && SND [=y] && SND_SOC [=y] && (SUPERH [=y] || ARCH_RENESAS || COMPILE_TEST [=n]) && ARCH_SHMOBILE [=y] && HAVE_CLK [=y] && DMADEVICES [=n] Selected by [y]: - SND_SIU_MIGOR [=y] && SOUND [=y] && SND [=y] && SND_SOC [=y] && (SUPERH [=y] || ARCH_RENESAS || COMPILE_TEST [=n]) && SH_MIGOR [=y] && I2C [=y] SND_SIU_MIGOR selects SND_SOC_SH4_SIU. As the latter depends on DMADEVICES, the former should depend on DMADEVICES, too. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501241032.oOmsmzvk-lkp@intel.com/ Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/8c17ff52584ce824b8b42d08ea1b942ebeb7f4d9.1737708688.git.geert+renesas@glider.be Signed-off-by: Mark Brown sound/soc/renesas/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 309f64469cd5d09d5f1207e57d42f2eff9bd9311 Merge: fa8592f24944 6e59bcd1e088 Author: Arnd Bergmann Date: Fri Jan 24 13:08:51 2025 +0100 Merge tag 'arm-soc/for-6.14/defconfig-arm64' of https://github.com/Broadcom/stblinux into soc/defconfig This pull request contains Broadcom ARM64-based SoCs defconfig updates for 6.14, please pull the following: - Stefan enables the pinctrl-based I2C mux driver which is used on Raspberry Pi 4 based systems since we switched the Device Tree files to use the i2c mux representation * tag 'arm-soc/for-6.14/defconfig-arm64' of https://github.com/Broadcom/stblinux: arm64: defconfig: Enable pinctrl-based I2C mux Link: https://lore.kernel.org/r/20250123203302.1491843-1-florian.fainelli@broadcom.com Signed-off-by: Arnd Bergmann commit f5f0ed89f13e3e5246404a322ee85169a226bfb5 Author: Christoph Hellwig Date: Wed Jan 22 06:43:21 2025 +0100 xfs: don't call remap_verify_area with sb write protection held The XFS_IOC_EXCHANGE_RANGE ioctl with the XFS_EXCHANGE_RANGE_TO_EOF flag operates on a range bounded by the end of the file. This means the actual amount of blocks exchanged is derived from the inode size, which is only stable with the IOLOCK (i_rwsem) held. Do that, it currently calls remap_verify_area from inside the sb write protection which nests outside the IOLOCK. But this makes fsnotify_file_area_perm which is called from remap_verify_area unhappy when the kernel is built with lockdep and the recently added CONFIG_FANOTIFY_ACCESS_PERMISSIONS option. Fix this by always calling remap_verify_area before taking the write protection, and passing a 0 size to remap_verify_area similar to the FICLONE/FICLONERANGE ioctls when they are asked to clone until the file end. (Note: the size argument gets passed to fsnotify_file_area_perm, but then isn't actually used there). Fixes: 9a64d9b3109d ("xfs: introduce new file range exchange ioctl") Cc: # v6.10 Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino fs/xfs/xfs_exchrange.c | 71 +++++++++++++++++++------------------------------- 1 file changed, 27 insertions(+), 44 deletions(-) commit 89841b23809f5fb12cbead142204064739fef25a Author: Christoph Hellwig Date: Thu Jan 16 07:03:35 2025 +0100 xfs: remove an out of data comment in _xfs_buf_alloc There hasn't been anything like an io_length for a long time. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 5 ----- 1 file changed, 5 deletions(-) commit 915175b49f65d9edeb81659e82cbb27b621dbc17 Author: Jinliang Zheng Date: Wed Jan 15 20:35:25 2025 +0800 xfs: fix the entry condition of exact EOF block allocation optimization When we call create(), lseek() and write() sequentially, offset != 0 cannot be used as a judgment condition for whether the file already has extents. Furthermore, when xfs_bmap_adjacent() has not given a better blkno, it is not necessary to use exact EOF block allocation. Suggested-by: Dave Chinner Signed-off-by: Jinliang Zheng Reviewed-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/libxfs/xfs_bmap.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 3821336530616776414aa7a879640052b89def28 Author: Bernd Schubert Date: Mon Jan 20 02:29:02 2025 +0100 fuse: {io-uring} Make hash-list req unique finding functions non-static fuse-over-io-uring uses existing functions to find requests based on their unique id - make these functions non-static. Signed-off-by: Bernd Schubert Reviewed-by: Joanne Koong Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 6 +++--- fs/fuse/fuse_dev_i.h | 5 +++++ fs/fuse/fuse_i.h | 5 +++++ fs/fuse/inode.c | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) commit f773a7c2c3d934d00542c6471170066d150d152f Author: Bernd Schubert Date: Mon Jan 20 02:29:01 2025 +0100 fuse: Add fuse-io-uring handling into fuse_copy Add special fuse-io-uring into the fuse argument copy handler. Signed-off-by: Bernd Schubert Reviewed-by: Joanne Koong Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 12 +++++++++++- fs/fuse/fuse_dev_i.h | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) commit d0f9c62aaf7a98412b46a91fe7daad76b316b3b7 Author: Bernd Schubert Date: Mon Jan 20 02:29:00 2025 +0100 fuse: Make fuse_copy non static Move 'struct fuse_copy_state' and fuse_copy_* functions to fuse_dev_i.h to make it available for fuse-io-uring. 'copy_out_args()' is renamed to 'fuse_copy_out_args'. Signed-off-by: Bernd Schubert Reviewed-by: Joanne Koong Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 30 ++++++++---------------------- fs/fuse/fuse_dev_i.h | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 22 deletions(-) commit 24fe962c86f55347385933a1b06ca71b60854690 Author: Bernd Schubert Date: Mon Jan 20 02:28:59 2025 +0100 fuse: {io-uring} Handle SQEs - register commands This adds basic support for ring SQEs (with opcode=IORING_OP_URING_CMD). For now only FUSE_IO_URING_CMD_REGISTER is handled to register queue entries. Signed-off-by: Bernd Schubert Reviewed-by: Pavel Begunkov # io_uring Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/Kconfig | 12 ++ fs/fuse/Makefile | 1 + fs/fuse/dev_uring.c | 326 ++++++++++++++++++++++++++++++++++++++++++++++ fs/fuse/dev_uring_i.h | 113 ++++++++++++++++ fs/fuse/fuse_i.h | 5 + fs/fuse/inode.c | 10 ++ include/uapi/linux/fuse.h | 76 ++++++++++- 7 files changed, 542 insertions(+), 1 deletion(-) commit 7ccd86ba3a485a8bc33478776eb7053d9adb7816 Author: Bernd Schubert Date: Mon Jan 20 02:28:58 2025 +0100 fuse: make args->in_args[0] to be always the header This change sets up FUSE operations to always have headers in args.in_args[0], even for opcodes without an actual header. This step prepares for a clean separation of payload from headers, initially it is used by fuse-over-io-uring. For opcodes without a header, we use a zero-sized struct as a placeholder. This approach: - Keeps things consistent across all FUSE operations - Will help with payload alignment later - Avoids future issues when header sizes change Op codes that already have an op code specific header do not need modification. Op codes that have neither payload nor op code headers are not modified either (FUSE_READLINK and FUSE_DESTROY). FUSE_BATCH_FORGET already has the header in the right place, but is not using fuse_copy_args - as -over-uring is currently not handling forgets it does not matter for now, but header separation will later need special attention for that op code. Correct the struct fuse_args->in_args array max size. Signed-off-by: Bernd Schubert Reviewed-by: Joanne Koong Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dax.c | 11 ++++++----- fs/fuse/dev.c | 9 +++++---- fs/fuse/dir.c | 32 ++++++++++++++++++-------------- fs/fuse/fuse_i.h | 15 ++++++++++++++- fs/fuse/xattr.c | 7 ++++--- 5 files changed, 47 insertions(+), 27 deletions(-) commit a7040a06e4bc6a550ddb2078d59fad311dc0ee3b Author: Bernd Schubert Date: Mon Jan 20 02:28:57 2025 +0100 fuse: Add fuse-io-uring design documentation [Add several documentation updates I had missed after renaming functions and also fixes 'make htmldocs'.] Signed-off-by: Bernd Schubert Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi Documentation/filesystems/fuse-io-uring.rst | 99 +++++++++++++++++++++++++++++ Documentation/filesystems/index.rst | 1 + 2 files changed, 100 insertions(+) commit 88be7aa98d91f5761f8764273ebd961915e4632d Author: Bernd Schubert Date: Mon Jan 20 02:28:56 2025 +0100 fuse: Move request bits These are needed by fuse-over-io-uring. Signed-off-by: Bernd Schubert Reviewed-by: Josef Bacik Reviewed-by: Joanne Koong Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 4 ---- fs/fuse/fuse_dev_i.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) commit 867d93dcdede5ea453543085d1ed0bf43cde60de Author: Bernd Schubert Date: Mon Jan 20 02:28:55 2025 +0100 fuse: Move fuse_get_dev to header file Another preparation patch, as this function will be needed by fuse/dev.c and fuse/dev_uring.c. Signed-off-by: Bernd Schubert Reviewed-by: Josef Bacik Reviewed-by: Joanne Koong Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 9 --------- fs/fuse/fuse_dev_i.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) commit 92270d076115ae81b83f0605703602d2d5a866e2 Author: Bernd Schubert Date: Mon Jan 20 02:28:54 2025 +0100 fuse: rename to fuse_dev_end_requests and make non-static This function is needed by fuse_uring.c to clean ring queues, so make it non static. Especially in non-static mode the function name 'end_requests' should be prefixed with fuse_ Signed-off-by: Bernd Schubert Reviewed-by: Josef Bacik Reviewed-by: Joanne Koong Reviewed-by: Luis Henriques Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 11 +++++------ fs/fuse/fuse_dev_i.h | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) commit 37f332ea1dd8901d0883ada1aeba732a68e7dac0 Merge: 07c5b277208c 0a1ee19d46b7 Author: Simona Vetter Date: Fri Jan 24 11:26:41 2025 +0100 Merge tag 'drm-misc-fixes-2025-01-24' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next Short summary of fixes pull: bochs: - Fix double-free on driver removal client: - Improve support for tile-based modes - Fix fbdev Kconfig select rules xlnx: - zynqmp_dp: Add locking to DP-bridge enable helper Signed-off-by: Simona Vetter From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20250124082932.GA13715@linux.fritz.box commit 0ddeb4fe9d3b501c2c6a3522325d88ee166e02ea Merge: b44574c7da71 98b34d52004b Author: Miquel Raynal Date: Fri Jan 24 10:52:35 2025 +0100 Merge tag 'nand/for-6.14' into mtd/next * Raw NAND changes A new controller driver, from Nuvoton, has been merged. Bastien Curutchet has contributed a series improving the Davinci controller driver, both on the organization of the code, but also on the performance side. The binding has also been converted to yaml, received a new OOB layout and now supports on-die ECC engines. The Qualcomm controller driver has been deeply cleaned to extract some parts of the code into a shared file with the Qualcomm SPI memory controller. Aside from these main changes, the Cadence binding has been converted to yaml, the brcmnand controller driver has received a small fix, otherwise some more minor changes have also made their way in. * SPI NAND changes The SPI NAND subsystem has seen a great improvement, with the advent of DTR operations (DDR operations, which may be extended to the address cycles). The first vendor driver to benefit from these improvements is the Winbond driver. A new manufacturer driver is added SkyHigh, with a new constraint for the core, it is impossible to disable the on-die ECC engine. A Foresee device is also now supported. commit b44574c7da71e03792de51daf4d5fa5435a64a54 Merge: cd97c961681a 943e5f856007 Author: Miquel Raynal Date: Fri Jan 24 10:52:25 2025 +0100 Merge tag 'spi-nor/for-6.14' into mtd/next SPI NOR changes for 6.14 Notable changes: - Add flash entries for Atmel AT25SF321, Spansion S28HL256T, S28HL02GT. - Add support for vcc-supply regulators and their DT bindings. - Drop mx25u25635f entry. The flash shares its ID with mx25u25645g and both parts have an SFDP table. Removing their entry lets them be driven by the generic SFDP-based driver. commit 5e0e02f0d7e52cfc8b1adfc778dd02181d8b47b4 Author: Jens Axboe Date: Wed Jan 15 09:05:15 2025 -0700 futex: Pass in task to futex_queue() futex_queue() -> __futex_queue() uses 'current' as the task to store in the struct futex_q->task field. This is fine for synchronous usage of the futex infrastructure, but it's not always correct when used by io_uring where the task doing the initial futex_queue() might not be available later on. This doesn't lead to any issues currently, as the io_uring side doesn't support PI futexes, but it does leave a potentially dangling pointer which is never a good idea. Have futex_queue() take a task_struct argument, and have the regular callers pass in 'current' for that. Meanwhile io_uring can just pass in NULL, as the task should never be used off that path. In theory req->tctx->task could be used here, but there's no point populating it with a task field that will never be used anyway. Reported-by: Jann Horn Signed-off-by: Jens Axboe Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/22484a23-542c-4003-b721-400688a0d055@kernel.dk io_uring/futex.c | 2 +- kernel/futex/core.c | 5 +++-- kernel/futex/futex.h | 11 ++++++++--- kernel/futex/pi.c | 2 +- kernel/futex/waitwake.c | 4 ++-- 5 files changed, 15 insertions(+), 9 deletions(-) commit 0a1ee19d46b71691c5acdf234bb6105913bd9add Author: Dan Carpenter Date: Mon Nov 11 12:06:10 2024 +0300 drm: zynqmp_dp: Unlock on error in zynqmp_dp_bridge_atomic_enable() We added some locking to this function, but accidentally forgot to unlock if zynqmp_dp_mode_configure() failed. Use a guard lock to fix it. Fixes: a7d5eeaa57d7 ("drm: zynqmp_dp: Add locking") Signed-off-by: Dan Carpenter Reviewed-by: Sean Anderson Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/b4042bd9-c943-4738-a2e1-8647259137c6@stanley.mountain drivers/gpu/drm/xlnx/zynqmp_dp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6c9b7db96db62ee9ad8d359d90ff468d462518c4 Author: Sebastian Sewior Date: Thu Jan 23 17:20:45 2025 +0100 xfrm: Don't disable preemption while looking up cache state. For the state cache lookup xfrm_input_state_lookup() first disables preemption, to remain on the CPU and then retrieves a per-CPU pointer. Within the preempt-disable section it also acquires netns_xfrm::xfrm_state_lock, a spinlock_t. This lock must not be acquired with explicit disabled preemption (such as by get_cpu()) because this lock becomes a sleeping lock on PREEMPT_RT. To remain on the same CPU is just an optimisation for the CPU local lookup. The actual modification of the per-CPU variable happens with netns_xfrm::xfrm_state_lock acquired. Remove get_cpu() and use the state_cache_input on the current CPU. Reported-by: Alexei Starovoitov Closes: https://lore.kernel.org/all/CAADnVQKkCLaj=roayH=Mjiiqz_svdf1tsC3OE4EC0E=mAD+L1A@mail.gmail.com/ Fixes: 81a331a0e72dd ("xfrm: Add an inbound percpu state cache.") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit bc8198dc7ebc492ec3e9fa1617dcdfbe98e73b17 Merge: 606489dbfa97 987ce79b5242 Author: Linus Torvalds Date: Thu Jan 23 18:49:43 2025 -0800 Merge tag 'sched_ext-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext Pull sched_ext updates from Tejun Heo: - scx_bpf_now() added so that BPF scheduler can access the cached timestamp in struct rq to avoid reading TSC multiple times within a locked scheduling operation. - Minor updates to the built-in idle CPU selection logic. - tool/sched_ext updates and other misc changes. * tag 'sched_ext-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext: sched_ext: fix kernel-doc warnings sched_ext: Use time helpers in BPF schedulers sched_ext: Replace bpf_ktime_get_ns() to scx_bpf_now() sched_ext: Add time helpers for BPF schedulers sched_ext: Add scx_bpf_now() for BPF scheduler sched_ext: Implement scx_bpf_now() sched_ext: Relocate scx_enabled() related code sched_ext: Add option -l in selftest runner to list all available tests sched_ext: Include remaining task time slice in error state dump sched_ext: update scx_bpf_dsq_insert() doc for SCX_DSQ_LOCAL_ON sched_ext: idle: small CPU iteration refactoring sched_ext: idle: introduce check_builtin_idle_enabled() helper sched_ext: idle: clarify comments sched_ext: idle: use assign_cpu() to update the idle cpumask sched_ext: Use str_enabled_disabled() helper in update_selcpu_topology() sched_ext: Use sizeof_field for key_len in dsq_hash_params tools/sched_ext: Receive updates from SCX repo sched_ext: Use the NUMA scheduling domain for NUMA optimizations commit 606489dbfa979dce53797f24840c512d0e7510f9 Merge: 7c1badb2a990 6c8ad3ab45ad Author: Linus Torvalds Date: Thu Jan 23 18:02:55 2025 -0800 Merge tag 'trace-ringbuffer-v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull trace fing buffer fix from Steven Rostedt: "Fix atomic64 operations on some architectures for the tracing ring buffer: - Have emulating atomic64 use arch_spin_locks instead of raw_spin_locks The tracing ring buffer events have a small timestamp that holds the delta between itself and the event before it. But this can be tricky to update when interrupts come in. It originally just set the deltas to zero for events that interrupted the adding of another event which made all the events in the interrupt have the same timestamp as the event it interrupted. This was not suitable for many tools, so it was eventually fixed. But that fix required adding an atomic64 cmpxchg on the timestamp in cases where an event was added while another event was in the process of being added. Originally, for 32 bit architectures, the manipulation of the 64 bit timestamp was done by a structure that held multiple 32bit words to hold parts of the timestamp and a counter. But as updates to the ring buffer were done, maintaining this became too complex and was replaced by the atomic64 generic operations which are now used by both 64bit and 32bit architectures. Shortly after that, it was reported that riscv32 and other 32 bit architectures that just used the generic atomic64 were locking up. This was because the generic atomic64 operations defined in lib/atomic64.c uses a raw_spin_lock() to emulate an atomic64 operation. The problem here was that raw_spin_lock() can also be traced by the function tracer (which is commonly used for debugging raw spin locks). Since the function tracer uses the tracing ring buffer, which now is being traced internally, this was triggering a recursion and setting off a warning that the spin locks were recusing. There's no reason for the code that emulates atomic64 operations to be using raw_spin_locks which have a lot of debugging infrastructure attached to them (depending on the config options). Instead it should be using the arch_spin_lock() which does not have any infrastructure attached to them and is used by low level infrastructure like RCU locks, lockdep and of course tracing. Using arch_spin_lock()s fixes this issue. - Do not trace in NMI if the architecture uses emulated atomic64 operations Another issue with using the emulated atomic64 operations that uses spin locks to emulate the atomic64 operations is that they cannot be used in NMI context. As an NMI can trigger while holding the atomic64 spin locks it can try to take the same lock and cause a deadlock. Have the ring buffer fail recording events if in NMI context and the architecture uses the emulated atomic64 operations" * tag 'trace-ringbuffer-v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: atomic64: Use arch_spin_locks instead of raw_spin_locks ring-buffer: Do not allow events in NMI with generic atomic64 cmpxchg() commit 7c1badb2a9902ab4c5e9fe4093e532eeb11fd9fc Merge: e8744fbc8318 66611c047570 Author: Linus Torvalds Date: Thu Jan 23 17:59:25 2025 -0800 Merge tag 'ftrace-v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull fgraph updates from Steven Rostedt: "Remove calltime and rettime from fgraph infrastructure The calltime and rettime were used by the function graph tracer to calculate the timings of functions where it traced their entry and exit. The calltime and rettime were stored in the generic structures that were used for the mechanisms to add an entry and exit callback. Now that function graph infrastructure is used by other subsystems than just the tracer, the calltime and rettime are not needed for them. Remove the calltime and rettime from the generic fgraph infrastructure and have the callers that require them handle them" * tag 'ftrace-v6.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: fgraph: Remove calltime and rettime from generic operations commit e8744fbc83188693f3590020b14d50df3387fc5a Merge: 7f71554b4ea2 8f21943e101a Author: Linus Torvalds Date: Thu Jan 23 17:51:16 2025 -0800 Merge tag 'trace-v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing updates from Steven Rostedt: - Cleanup with guard() and free() helpers There were several places in the code that had a lot of "goto out" in the error paths to either unlock a lock or free some memory that was allocated. But this is error prone. Convert the code over to use the guard() and free() helpers that let the compiler unlock locks or free memory when the function exits. - Update the Rust tracepoint code to use the C code too There was some duplication of the tracepoint code for Rust that did the same logic as the C code. Add a helper that makes it possible for both algorithms to use the same logic in one place. - Add poll to trace event hist files It is useful to know when an event is triggered, or even with some filtering. Since hist files of events get updated when active and the event is triggered, allow applications to poll the hist file and wake up when an event is triggered. This will let the application know that the event it is waiting for happened. - Add :mod: command to enable events for current or future modules The function tracer already has a way to enable functions to be traced in modules by writing ":mod:" into set_ftrace_filter. That will enable either all the functions for the module if it is loaded, or if it is not, it will cache that command, and when the module is loaded that matches , its functions will be enabled. This also allows init functions to be traced. But currently events do not have that feature. Add the command where if ':mod:' is written into set_event, then either all the modules events are enabled if it is loaded, or cache it so that the module's events are enabled when it is loaded. This also works from the kernel command line, where "trace_event=:mod:", when the module is loaded at boot up, its events will be enabled then. * tag 'trace-v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (26 commits) tracing: Fix output of set_event for some cached module events tracing: Fix allocation of printing set_event file content tracing: Rename update_cache() to update_mod_cache() tracing: Fix #if CONFIG_MODULES to #ifdef CONFIG_MODULES selftests/ftrace: Add test that tests event :mod: commands tracing: Cache ":mod:" events for modules not loaded yet tracing: Add :mod: command to enabled module events selftests/tracing: Add hist poll() support test tracing/hist: Support POLLPRI event for poll on histogram tracing/hist: Add poll(POLLIN) support on hist file tracing: Fix using ret variable in tracing_set_tracer() tracepoint: Reduce duplication of __DO_TRACE_CALL tracing/string: Create and use __free(argv_free) in trace_dynevent.c tracing: Switch trace_stat.c code over to use guard() tracing: Switch trace_stack.c code over to use guard() tracing: Switch trace_osnoise.c code over to use guard() and __free() tracing: Switch trace_events_synth.c code over to use guard() tracing: Switch trace_events_filter.c code over to use guard() tracing: Switch trace_events_trigger.c code over to use guard() tracing: Switch trace_events_hist.c code over to use guard() ... commit 7f71554b4ea27ebd03e712abd386b66360147469 Merge: 544521d6217f f3a30016e4b5 Author: Linus Torvalds Date: Thu Jan 23 17:45:24 2025 -0800 Merge tag 'ktest-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest Pull ktest updates from Steven Rostedt: - Fix use of KERNEL_VERSION in newly created output directory If a new output directory is created (O=/dir), and one of the options uses KERNEL_VERSION which will run a "make kernelversion" in the output directory, it will fail because there is no config file yet. In this case, have it do a "make allnoconfig" which is the minimal needed to run the "make kernelversion". - Remove unused variables - Fix some typos * tag 'ktest-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest.pl: Fix typo "accesing" ktest.pl: Fix typo in comment ktest.pl: Remove unused declarations in run_bisect_test function ktest.pl: Check kernelrelease return in get_version commit 544521d6217fb7846b746ada9d70f308f078aa7e Merge: e0b1f5914274 927054606d08 Author: Linus Torvalds Date: Thu Jan 23 17:24:20 2025 -0800 Merge tag 'probes-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull probes updates from Masami Hiramatsu: - kprobes: Cleanups using guard() and __free(): Use cleanup.h macros to cleanup code and remove all gotos from kprobes code. - tracing/probes: Also cleanups tracing/*probe events code with guard() and __free(). These patches are just to simplify the parser codes. - kprobes: Reduce preempt disable scope in check_kprobe_access_safe() This reduces preempt disable time to only when getting the module refcount in check_kprobe_access_safe(). Previously it disabled preempt needlessly for other checks including jump_label_text_reserved(), which took a long time because of the linear search. * tag 'probes-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing/kprobes: Simplify __trace_kprobe_create() by removing gotos tracing: Use __free() for kprobe events to cleanup tracing: Use __free() in trace_probe for cleanup kprobes: Remove remaining gotos kprobes: Remove unneeded goto kprobes: Use guard for rcu_read_lock kprobes: Use guard() for external locks jump_label: Define guard() for jump_label_lock tracing/eprobe: Adopt guard() and scoped_guard() tracing/uprobe: Adopt guard() and scoped_guard() tracing/kprobe: Adopt guard() and scoped_guard() kprobes: Adopt guard() and scoped_guard() kprobes: Reduce preempt disable scope in check_kprobe_access_safe() commit e0b1f59142746f74476a03040f745329c8355a7e Merge: e814f3fd16ac 3681c74d342d Author: Linus Torvalds Date: Thu Jan 23 17:05:45 2025 -0800 Merge tag 'v6.14-rc-smb3-client-fixes-part' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client updates from Steve French: - Fix oops in DebugData when link speed 0 - Two reparse point fixes - Ten DFS (global namespace) fixes - Symlink error handling fix - Two SMB1 fixes - Four cleanup fixes - Improved debugging of status codes - Fix incorrect output of tracepoints for compounding, and add missing compounding tracepoint * tag 'v6.14-rc-smb3-client-fixes-part' of git://git.samba.org/sfrench/cifs-2.6: (23 commits) smb: client: handle lack of EA support in smb2_query_path_info() smb: client: don't check for @leaf_fullpath in match_server() smb: client: get rid of TCP_Server_Info::refpath_lock cifs: Remove duplicate struct reparse_symlink_data and SYMLINK_FLAG_RELATIVE cifs: Do not attempt to call CIFSGetSrvInodeNumber() without CAP_INFOLEVEL_PASSTHRU cifs: Do not attempt to call CIFSSMBRenameOpenFile() without CAP_INFOLEVEL_PASSTHRU cifs: Remove declaration of dead CIFSSMBQuerySymLink function cifs: Fix printing Status code into dmesg cifs: Add missing NT_STATUS_* codes from nterr.h to nterr.c cifs: Fix endian types in struct rfc1002_session_packet cifs: Use cifs_autodisable_serverino() for disabling CIFS_MOUNT_SERVER_INUM in readdir.c smb3: add missing tracepoint for querying wsl EAs smb: client: fix order of arguments of tracepoints smb: client: fix oops due to unset link speed smb: client: correctly handle ErrorContextData as a flexible array smb: client: don't retry DFS targets on server shutdown smb: client: fix return value of parse_dfs_referrals() smb: client: optimize referral walk on failed link targets smb: client: provide dns_resolve_{unc,name} helpers smb: client: parse DNS domain name from domain= option ... commit e814f3fd16acfb7f9966773953de8f740a1e3202 Merge: 8883957b3c9d aab98e2dbd64 Author: Linus Torvalds Date: Thu Jan 23 17:00:11 2025 -0800 Merge tag 'v6.14-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd Pull smb server updates from Steve French: "Three ksmbd server fixes: - Fix potential memory corruption in IPC calls - Support FSCTL_QUERY_INTERFACE_INFO for more configurations - Remove some unused functions" * tag 'v6.14-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd: ksmbd: fix integer overflows on 32 bit systems ksmbd: browse interfaces list on FSCTL_QUERY_INTERFACE_INFO IOCTL ksmbd: Remove unused functions commit 013eb043f37bd87c4d60d51034401a5a6d105bcf Author: Howard Chu Date: Thu Dec 12 18:30:47 2024 -0800 perf trace: Fix BPF loading failure (-E2BIG) As reported by Namhyung Kim and acknowledged by Qiao Zhao (link: https://lore.kernel.org/linux-perf-users/20241206001436.1947528-1-namhyung@kernel.org/), on certain machines, perf trace failed to load the BPF program into the kernel. The verifier runs perf trace's BPF program for up to 1 million instructions, returning an E2BIG error, whereas the perf trace BPF program should be much less complex than that. This patch aims to fix the issue described above. The E2BIG problem from clang-15 to clang-16 is cause by this line: } else if (size < 0 && size >= -6) { /* buffer */ Specifically this check: size < 0. seems like clang generates a cool optimization to this sign check that breaks things. Making 'size' s64, and use } else if ((int)size < 0 && size >= -6) { /* buffer */ Solves the problem. This is some Hogwarts magic. And the unbounded access of clang-12 and clang-14 (clang-13 works this time) is fixed by making variable 'aug_size' s64. As for this: -if (aug_size > TRACE_AUG_MAX_BUF) - aug_size = TRACE_AUG_MAX_BUF; +aug_size = args->args[index] > TRACE_AUG_MAX_BUF ? TRACE_AUG_MAX_BUF : args->args[index]; This makes the BPF skel generated by clang-18 work. Yes, new clangs introduce problems too. Sorry, I only know that it works, but I don't know how it works. I'm not an expert in the BPF verifier. I really hope this is not a kernel version issue, as that would make the test case (kernel_nr) * (clang_nr), a true horror story. I will test it on more kernel versions in the future. Fixes: 395d38419f18: ("perf trace augmented_raw_syscalls: Add more check s to pass the verifier") Reported-by: Namhyung Kim Signed-off-by: Howard Chu Tested-by: Namhyung Kim Link: https://lore.kernel.org/r/20241213023047.541218-1-howardchu95@gmail.com Signed-off-by: Namhyung Kim tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 1f744135f996257229f98c0ed3efc9726ac8c77f Author: Krzysztof Kozlowski Date: Sat Jan 18 11:22:47 2025 +0100 docs: dt-bindings: Document preferred line wrapping There are some patches with long lines as a result of checkpatch enforcing 100, not 80, but checkpatch is only a tool not a coding style. The Linux Kernel Coding Style is still clear here on preferred limit. Mentioned preferred style of wrapping long lines in DTS, based on Linux Kernel Coding Style. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250118102247.18257-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) Documentation/devicetree/bindings/dts-coding-style.rst | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 8883957b3c9de2087fb6cf9691c1188cccf1ac9c Merge: fb6fec6bdd9b 0c0214df28f0 Author: Linus Torvalds Date: Thu Jan 23 13:36:06 2025 -0800 Merge tag 'fsnotify_hsm_for_v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify pre-content notification support from Jan Kara: "This introduces a new fsnotify event (FS_PRE_ACCESS) that gets generated before a file contents is accessed. The event is synchronous so if there is listener for this event, the kernel waits for reply. On success the execution continues as usual, on failure we propagate the error to userspace. This allows userspace to fill in file content on demand from slow storage. The context in which the events are generated has been picked so that we don't hold any locks and thus there's no risk of a deadlock for the userspace handler. The new pre-content event is available only for users with global CAP_SYS_ADMIN capability (similarly to other parts of fanotify functionality) and it is an administrator responsibility to make sure the userspace event handler doesn't do stupid stuff that can DoS the system. Based on your feedback from the last submission, fsnotify code has been improved and now file->f_mode encodes whether pre-content event needs to be generated for the file so the fast path when nobody wants pre-content event for the file just grows the additional file->f_mode check. As a bonus this also removes the checks whether the old FS_ACCESS event needs to be generated from the fast path. Also the place where the event is generated during page fault has been moved so now filemap_fault() generates the event if and only if there is no uptodate folio in the page cache. Also we have dropped FS_PRE_MODIFY event as current real-world users of the pre-content functionality don't really use it so let's start with the minimal useful feature set" * tag 'fsnotify_hsm_for_v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: (21 commits) fanotify: Fix crash in fanotify_init(2) fs: don't block write during exec on pre-content watched files fs: enable pre-content events on supported file systems ext4: add pre-content fsnotify hook for DAX faults btrfs: disable defrag on pre-content watched files xfs: add pre-content fsnotify hook for DAX faults fsnotify: generate pre-content permission event on page fault mm: don't allow huge faults for files with pre content watches fanotify: disable readahead if we have pre-content watches fanotify: allow to set errno in FAN_DENY permission response fanotify: report file range info with pre-content events fanotify: introduce FAN_PRE_ACCESS permission event fsnotify: generate pre-content permission event on truncate fsnotify: pass optional file access range in pre-content event fsnotify: introduce pre-content permission events fanotify: reserve event bit of deprecated FAN_DIR_MODIFY fanotify: rename a misnamed constant fanotify: don't skip extra event info if no info_mode is set fsnotify: check if file is actually being watched for pre-content events on open fsnotify: opt-in for permission events at file open time ... commit fdef89ce6fada462aef9cb90a140c93c8c209f0f Author: Filipe Manana Date: Tue Jan 21 12:24:39 2025 +0000 btrfs: avoid starting new transaction when cleaning qgroup during subvolume drop At btrfs_qgroup_cleanup_dropped_subvolume() all we want to commit the current transaction in order to have all the qgroup rfer/excl numbers up to date. However we are using btrfs_start_transaction(), which joins the current transaction if there is one that is not yet committing, but also starts a new one if there is none or if the current one is already committing (its state is >= TRANS_STATE_COMMIT_START). This later case results in unnecessary IO, wasting time and a pointless rotation of the backup roots in the super block. So instead of using btrfs_start_transaction() followed by a btrfs_commit_transaction(), use btrfs_commit_current_transaction() which achieves our purpose and avoids starting and committing new transactions. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/qgroup.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit e2f0943cf37305dbdeaf9846e3c941451bcdef63 Author: Filipe Manana Date: Mon Jan 20 17:26:10 2025 +0000 btrfs: fix use-after-free when attempting to join an aborted transaction When we are trying to join the current transaction and if it's aborted, we read its 'aborted' field after unlocking fs_info->trans_lock and without holding any extra reference count on it. This means that a concurrent task that is aborting the transaction may free the transaction before we read its 'aborted' field, leading to a use-after-free. Fix this by reading the 'aborted' field while holding fs_info->trans_lock since any freeing task must first acquire that lock and set fs_info->running_transaction to NULL before freeing the transaction. This was reported by syzbot and Dmitry with the following stack traces from KASAN: ================================================================== BUG: KASAN: slab-use-after-free in join_transaction+0xd9b/0xda0 fs/btrfs/transaction.c:278 Read of size 4 at addr ffff888011839024 by task kworker/u4:9/1128 CPU: 0 UID: 0 PID: 1128 Comm: kworker/u4:9 Not tainted 6.13.0-rc7-syzkaller-00019-gc45323b7560e #0 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 btrfs_async_reclaim_data_space 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 join_transaction+0xd9b/0xda0 fs/btrfs/transaction.c:278 start_transaction+0xaf8/0x1670 fs/btrfs/transaction.c:697 flush_space+0x448/0xcf0 fs/btrfs/space-info.c:803 btrfs_async_reclaim_data_space+0x159/0x510 fs/btrfs/space-info.c:1321 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3317 worker_thread+0x870/0xd30 kernel/workqueue.c:3398 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 5315: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x243/0x390 mm/slub.c:4329 kmalloc_noprof include/linux/slab.h:901 [inline] join_transaction+0x144/0xda0 fs/btrfs/transaction.c:308 start_transaction+0xaf8/0x1670 fs/btrfs/transaction.c:697 btrfs_create_common+0x1b2/0x2e0 fs/btrfs/inode.c:6572 lookup_open fs/namei.c:3649 [inline] open_last_lookups fs/namei.c:3748 [inline] path_openat+0x1c03/0x3590 fs/namei.c:3984 do_filp_open+0x27f/0x4e0 fs/namei.c:4014 do_sys_openat2+0x13e/0x1d0 fs/open.c:1402 do_sys_open fs/open.c:1417 [inline] __do_sys_creat fs/open.c:1495 [inline] __se_sys_creat fs/open.c:1489 [inline] __x64_sys_creat+0x123/0x170 fs/open.c:1489 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 Freed by task 5336: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:582 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/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:4613 [inline] kfree+0x196/0x430 mm/slub.c:4761 cleanup_transaction fs/btrfs/transaction.c:2063 [inline] btrfs_commit_transaction+0x2c97/0x3720 fs/btrfs/transaction.c:2598 insert_balance_item+0x1284/0x20b0 fs/btrfs/volumes.c:3757 btrfs_balance+0x992/0x10c0 fs/btrfs/volumes.c:4633 btrfs_ioctl_balance+0x493/0x7c0 fs/btrfs/ioctl.c:3670 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 The buggy address belongs to the object at ffff888011839000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 36 bytes inside of freed 2048-byte region [ffff888011839000, ffff888011839800) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11838 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801ac42000 ffffea0000493400 dead000000000002 raw: 0000000000000000 0000000000080008 00000001f5000000 0000000000000000 head: 00fff00000000040 ffff88801ac42000 ffffea0000493400 dead000000000002 head: 0000000000000000 0000000000080008 00000001f5000000 0000000000000000 head: 00fff00000000003 ffffea0000460e01 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 57, tgid 57 (kworker/0:2), ts 67248182943, free_ts 67229742023 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1558 prep_new_page mm/page_alloc.c:1566 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3476 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4753 alloc_pages_mpol_noprof+0x3e1/0x780 mm/mempolicy.c:2269 alloc_slab_page+0x6a/0x110 mm/slub.c:2423 allocate_slab+0x5a/0x2b0 mm/slub.c:2589 new_slab mm/slub.c:2642 [inline] ___slab_alloc+0xc27/0x14a0 mm/slub.c:3830 __slab_alloc+0x58/0xa0 mm/slub.c:3920 __slab_alloc_node mm/slub.c:3995 [inline] slab_alloc_node mm/slub.c:4156 [inline] __do_kmalloc_node mm/slub.c:4297 [inline] __kmalloc_node_track_caller_noprof+0x2e9/0x4c0 mm/slub.c:4317 kmalloc_reserve+0x111/0x2a0 net/core/skbuff.c:609 __alloc_skb+0x1f3/0x440 net/core/skbuff.c:678 alloc_skb include/linux/skbuff.h:1323 [inline] alloc_skb_with_frags+0xc3/0x820 net/core/skbuff.c:6612 sock_alloc_send_pskb+0x91a/0xa60 net/core/sock.c:2884 sock_alloc_send_skb include/net/sock.h:1803 [inline] mld_newpack+0x1c3/0xaf0 net/ipv6/mcast.c:1747 add_grhead net/ipv6/mcast.c:1850 [inline] add_grec+0x1492/0x19a0 net/ipv6/mcast.c:1988 mld_send_cr net/ipv6/mcast.c:2114 [inline] mld_ifc_work+0x691/0xd90 net/ipv6/mcast.c:2651 page last free pid 5300 tgid 5300 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0xd3f/0x1010 mm/page_alloc.c:2659 __slab_free+0x2c2/0x380 mm/slub.c:4524 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4119 [inline] slab_alloc_node mm/slub.c:4168 [inline] __do_kmalloc_node mm/slub.c:4297 [inline] __kmalloc_noprof+0x236/0x4c0 mm/slub.c:4310 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] fib_create_info+0xc14/0x25b0 net/ipv4/fib_semantics.c:1435 fib_table_insert+0x1f6/0x1f20 net/ipv4/fib_trie.c:1231 fib_magic+0x3d8/0x620 net/ipv4/fib_frontend.c:1112 fib_add_ifaddr+0x40c/0x5e0 net/ipv4/fib_frontend.c:1156 fib_netdev_event+0x375/0x490 net/ipv4/fib_frontend.c:1494 notifier_call_chain+0x1a5/0x3f0 kernel/notifier.c:85 __dev_notify_flags+0x207/0x400 dev_change_flags+0xf0/0x1a0 net/core/dev.c:9045 do_setlink+0xc90/0x4210 net/core/rtnetlink.c:3109 rtnl_changelink net/core/rtnetlink.c:3723 [inline] __rtnl_newlink net/core/rtnetlink.c:3875 [inline] rtnl_newlink+0x1bb6/0x2210 net/core/rtnetlink.c:4012 Memory state around the buggy address: ffff888011838f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888011838f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888011839000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888011839080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888011839100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Reported-by: syzbot+45212e9d87a98c3f5b42@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-btrfs/678e7da5.050a0220.303755.007c.GAE@google.com/ Reported-by: Dmitry Vyukov Link: https://lore.kernel.org/linux-btrfs/CACT4Y+ZFBdo7pT8L2AzM=vegZwjp-wNkVJZQf0Ta3vZqtExaSw@mail.gmail.com/ Fixes: 871383be592b ("btrfs: add missing unlocks to transaction abort paths") Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/transaction.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c9c863793395cf0a66c2778a29d72c48c02fbb66 Author: Qu Wenruo Date: Mon Jan 20 09:40:43 2025 +1030 btrfs: do not output error message if a qgroup has been already cleaned up [BUG] There is a bug report that btrfs outputs the following error message: BTRFS info (device nvme0n1p2): qgroup scan completed (inconsistency flag cleared) BTRFS warning (device nvme0n1p2): failed to cleanup qgroup 0/1179: -2 [CAUSE] The error itself is pretty harmless, and the end user should ignore it. When a subvolume is fully dropped, btrfs will call btrfs_qgroup_cleanup_dropped_subvolume() to delete the qgroup. However if a qgroup rescan happened before a subvolume fully dropped, qgroup for that subvolume will not be re-created, as rescan will only create new qgroup if there is a BTRFS_ROOT_REF_KEY found. But before we drop a subvolume, the subvolume is unlinked thus there is no BTRFS_ROOT_REF_KEY. In that case, btrfs_remove_qgroup() will fail with -ENOENT and trigger the above error message. [FIX] Just ignore -ENOENT error from btrfs_remove_qgroup() inside btrfs_qgroup_cleanup_dropped_subvolume(). Reported-by: John Shand Link: https://bugzilla.suse.com/show_bug.cgi?id=1236056 Fixes: 839d6ea4f86d ("btrfs: automatically remove the subvolume qgroup") Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/qgroup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0d85f5c2dd91df6b5da454406756f463ba923b69 Author: Filipe Manana Date: Mon Jan 13 15:01:08 2025 +0000 btrfs: fix assertion failure when splitting ordered extent after transaction abort If while we are doing a direct IO write a transaction abort happens, we mark all existing ordered extents with the BTRFS_ORDERED_IOERR flag (done at btrfs_destroy_ordered_extents()), and then after that if we enter btrfs_split_ordered_extent() and the ordered extent has bytes left (meaning we have a bio that doesn't cover the whole ordered extent, see details at btrfs_extract_ordered_extent()), we will fail on the following assertion at btrfs_split_ordered_extent(): ASSERT(!(flags & ~BTRFS_ORDERED_TYPE_FLAGS)); because the BTRFS_ORDERED_IOERR flag is set and the definition of BTRFS_ORDERED_TYPE_FLAGS is just the union of all flags that identify the type of write (regular, nocow, prealloc, compressed, direct IO, encoded). Fix this by returning an error from btrfs_extract_ordered_extent() if we find the BTRFS_ORDERED_IOERR flag in the ordered extent. The error will be the error that resulted in the transaction abort or -EIO if no transaction abort happened. This was recently reported by syzbot with the following trace: FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 0 UID: 0 PID: 5321 Comm: syz.0.0 Not tainted 6.13.0-rc5-syzkaller #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 fail_dump lib/fault-inject.c:53 [inline] should_fail_ex+0x3b0/0x4e0 lib/fault-inject.c:154 should_failslab+0xac/0x100 mm/failslab.c:46 slab_pre_alloc_hook mm/slub.c:4072 [inline] slab_alloc_node mm/slub.c:4148 [inline] __do_kmalloc_node mm/slub.c:4297 [inline] __kmalloc_noprof+0xdd/0x4c0 mm/slub.c:4310 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] btrfs_chunk_alloc_add_chunk_item+0x244/0x1100 fs/btrfs/volumes.c:5742 reserve_chunk_space+0x1ca/0x2c0 fs/btrfs/block-group.c:4292 check_system_chunk fs/btrfs/block-group.c:4319 [inline] do_chunk_alloc fs/btrfs/block-group.c:3891 [inline] btrfs_chunk_alloc+0x77b/0xf80 fs/btrfs/block-group.c:4187 find_free_extent_update_loop fs/btrfs/extent-tree.c:4166 [inline] find_free_extent+0x42d1/0x5810 fs/btrfs/extent-tree.c:4579 btrfs_reserve_extent+0x422/0x810 fs/btrfs/extent-tree.c:4672 btrfs_new_extent_direct fs/btrfs/direct-io.c:186 [inline] btrfs_get_blocks_direct_write+0x706/0xfa0 fs/btrfs/direct-io.c:321 btrfs_dio_iomap_begin+0xbb7/0x1180 fs/btrfs/direct-io.c:525 iomap_iter+0x697/0xf60 fs/iomap/iter.c:90 __iomap_dio_rw+0xeb9/0x25b0 fs/iomap/direct-io.c:702 btrfs_dio_write fs/btrfs/direct-io.c:775 [inline] btrfs_direct_write+0x610/0xa30 fs/btrfs/direct-io.c:880 btrfs_do_write_iter+0x2a0/0x760 fs/btrfs/file.c:1397 do_iter_readv_writev+0x600/0x880 vfs_writev+0x376/0xba0 fs/read_write.c:1050 do_pwritev fs/read_write.c:1146 [inline] __do_sys_pwritev2 fs/read_write.c:1204 [inline] __se_sys_pwritev2+0x196/0x2b0 fs/read_write.c:1195 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 RIP: 0033:0x7f1281f85d29 RSP: 002b:00007f12819fe038 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 00007f1282176080 RCX: 00007f1281f85d29 RDX: 0000000000000001 RSI: 0000000020000240 RDI: 0000000000000005 RBP: 00007f12819fe090 R08: 0000000000000000 R09: 0000000000000003 R10: 0000000000007000 R11: 0000000000000246 R12: 0000000000000002 R13: 0000000000000000 R14: 00007f1282176080 R15: 00007ffcb9e23328 BTRFS error (device loop0 state A): Transaction aborted (error -12) BTRFS: error (device loop0 state A) in btrfs_chunk_alloc_add_chunk_item:5745: errno=-12 Out of memory BTRFS info (device loop0 state EA): forced readonly assertion failed: !(flags & ~BTRFS_ORDERED_TYPE_FLAGS), in fs/btrfs/ordered-data.c:1234 ------------[ cut here ]------------ kernel BUG at fs/btrfs/ordered-data.c:1234! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5321 Comm: syz.0.0 Not tainted 6.13.0-rc5-syzkaller #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:btrfs_split_ordered_extent+0xd8d/0xe20 fs/btrfs/ordered-data.c:1234 RSP: 0018:ffffc9000d1df2b8 EFLAGS: 00010246 RAX: 0000000000000057 RBX: 000000000006a000 RCX: 9ce21886c4195300 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: 0000000000000091 R08: ffffffff817f0a3c R09: 1ffff92001a3bdf4 R10: dffffc0000000000 R11: fffff52001a3bdf5 R12: 1ffff1100a45f401 R13: ffff8880522fa018 R14: dffffc0000000000 R15: 000000000006a000 FS: 00007f12819fe6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000557750bd7da8 CR3: 00000000400ea000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_extract_ordered_extent fs/btrfs/direct-io.c:702 [inline] btrfs_dio_submit_io+0x4be/0x6d0 fs/btrfs/direct-io.c:737 iomap_dio_submit_bio fs/iomap/direct-io.c:85 [inline] iomap_dio_bio_iter+0x1022/0x1740 fs/iomap/direct-io.c:447 __iomap_dio_rw+0x13b7/0x25b0 fs/iomap/direct-io.c:703 btrfs_dio_write fs/btrfs/direct-io.c:775 [inline] btrfs_direct_write+0x610/0xa30 fs/btrfs/direct-io.c:880 btrfs_do_write_iter+0x2a0/0x760 fs/btrfs/file.c:1397 do_iter_readv_writev+0x600/0x880 vfs_writev+0x376/0xba0 fs/read_write.c:1050 do_pwritev fs/read_write.c:1146 [inline] __do_sys_pwritev2 fs/read_write.c:1204 [inline] __se_sys_pwritev2+0x196/0x2b0 fs/read_write.c:1195 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 RIP: 0033:0x7f1281f85d29 RSP: 002b:00007f12819fe038 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 00007f1282176080 RCX: 00007f1281f85d29 RDX: 0000000000000001 RSI: 0000000020000240 RDI: 0000000000000005 RBP: 00007f12819fe090 R08: 0000000000000000 R09: 0000000000000003 R10: 0000000000007000 R11: 0000000000000246 R12: 0000000000000002 R13: 0000000000000000 R14: 00007f1282176080 R15: 00007ffcb9e23328 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btrfs_split_ordered_extent+0xd8d/0xe20 fs/btrfs/ordered-data.c:1234 RSP: 0018:ffffc9000d1df2b8 EFLAGS: 00010246 RAX: 0000000000000057 RBX: 000000000006a000 RCX: 9ce21886c4195300 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: 0000000000000091 R08: ffffffff817f0a3c R09: 1ffff92001a3bdf4 R10: dffffc0000000000 R11: fffff52001a3bdf5 R12: 1ffff1100a45f401 R13: ffff8880522fa018 R14: dffffc0000000000 R15: 000000000006a000 FS: 00007f12819fe6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000557750bd7da8 CR3: 00000000400ea000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 In this case the transaction abort was due to (an injected) memory allocation failure when attempting to allocate a new chunk. Reported-by: syzbot+f60d8337a5c8e8d92a77@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-btrfs/6777f2dd.050a0220.178762.0045.GAE@google.com/ Fixes: 52b1fdca23ac ("btrfs: handle completed ordered extents in btrfs_split_ordered_extent") Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/ordered-data.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit a216542027b892e6651c1b4e076012140d04afaf Author: Filipe Manana Date: Fri Jan 10 15:22:24 2025 +0000 btrfs: fix lockdep splat while merging a relocation root When COWing a relocation tree path, at relocation.c:replace_path(), we can trigger a lockdep splat while we are in the btrfs_search_slot() call against the relocation root. This happens in that callchain at ctree.c:read_block_for_search() when we happen to find a child extent buffer already loaded through the fs tree with a lockdep class set to the fs tree. So when we attempt to lock that extent buffer through a relocation tree we have to reset the lockdep class to the class for a relocation tree, since a relocation tree has extent buffers that used to belong to a fs tree and may currently be already loaded (we swap extent buffers between the two trees at the end of replace_path()). However we are missing calls to btrfs_maybe_reset_lockdep_class() to reset the lockdep class at ctree.c:read_block_for_search() before we read lock an extent buffer, just like we did for btrfs_search_slot() in commit b40130b23ca4 ("btrfs: fix lockdep splat with reloc root extent buffers"). So add the missing btrfs_maybe_reset_lockdep_class() calls before the attempts to read lock an extent buffer at ctree.c:read_block_for_search(). The lockdep splat was reported by syzbot and it looks like this: ====================================================== WARNING: possible circular locking dependency detected 6.13.0-rc5-syzkaller-00163-gab75170520d4 #0 Not tainted ------------------------------------------------------ syz.0.0/5335 is trying to acquire lock: ffff8880545dbc38 (btrfs-tree-01){++++}-{4:4}, at: btrfs_tree_read_lock_nested+0x2f/0x250 fs/btrfs/locking.c:146 but task is already holding lock: ffff8880545dba58 (btrfs-treloc-02/1){+.+.}-{4:4}, at: btrfs_tree_lock_nested+0x2f/0x250 fs/btrfs/locking.c:189 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (btrfs-treloc-02/1){+.+.}-{4:4}: reacquire_held_locks+0x3eb/0x690 kernel/locking/lockdep.c:5374 __lock_release kernel/locking/lockdep.c:5563 [inline] lock_release+0x396/0xa30 kernel/locking/lockdep.c:5870 up_write+0x79/0x590 kernel/locking/rwsem.c:1629 btrfs_force_cow_block+0x14b3/0x1fd0 fs/btrfs/ctree.c:660 btrfs_cow_block+0x371/0x830 fs/btrfs/ctree.c:755 btrfs_search_slot+0xc01/0x3180 fs/btrfs/ctree.c:2153 replace_path+0x1243/0x2740 fs/btrfs/relocation.c:1224 merge_reloc_root+0xc46/0x1ad0 fs/btrfs/relocation.c:1692 merge_reloc_roots+0x3b3/0x980 fs/btrfs/relocation.c:1942 relocate_block_group+0xb0a/0xd40 fs/btrfs/relocation.c:3754 btrfs_relocate_block_group+0x77d/0xd90 fs/btrfs/relocation.c:4087 btrfs_relocate_chunk+0x12c/0x3b0 fs/btrfs/volumes.c:3494 __btrfs_balance+0x1b0f/0x26b0 fs/btrfs/volumes.c:4278 btrfs_balance+0xbdc/0x10c0 fs/btrfs/volumes.c:4655 btrfs_ioctl_balance+0x493/0x7c0 fs/btrfs/ioctl.c:3670 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 -> #1 (btrfs-tree-01/1){+.+.}-{4:4}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 down_write_nested+0xa2/0x220 kernel/locking/rwsem.c:1693 btrfs_tree_lock_nested+0x2f/0x250 fs/btrfs/locking.c:189 btrfs_init_new_buffer fs/btrfs/extent-tree.c:5052 [inline] btrfs_alloc_tree_block+0x41c/0x1440 fs/btrfs/extent-tree.c:5132 btrfs_force_cow_block+0x526/0x1fd0 fs/btrfs/ctree.c:573 btrfs_cow_block+0x371/0x830 fs/btrfs/ctree.c:755 btrfs_search_slot+0xc01/0x3180 fs/btrfs/ctree.c:2153 btrfs_insert_empty_items+0x9c/0x1a0 fs/btrfs/ctree.c:4351 btrfs_insert_empty_item fs/btrfs/ctree.h:688 [inline] btrfs_insert_inode_ref+0x2bb/0xf80 fs/btrfs/inode-item.c:330 btrfs_rename_exchange fs/btrfs/inode.c:7990 [inline] btrfs_rename2+0xcb7/0x2b90 fs/btrfs/inode.c:8374 vfs_rename+0xbdb/0xf00 fs/namei.c:5067 do_renameat2+0xd94/0x13f0 fs/namei.c:5224 __do_sys_renameat2 fs/namei.c:5258 [inline] __se_sys_renameat2 fs/namei.c:5255 [inline] __x64_sys_renameat2+0xce/0xe0 fs/namei.c:5255 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 -> #0 (btrfs-tree-01){++++}-{4:4}: check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 down_read_nested+0xb5/0xa50 kernel/locking/rwsem.c:1649 btrfs_tree_read_lock_nested+0x2f/0x250 fs/btrfs/locking.c:146 btrfs_tree_read_lock fs/btrfs/locking.h:188 [inline] read_block_for_search+0x718/0xbb0 fs/btrfs/ctree.c:1610 btrfs_search_slot+0x1274/0x3180 fs/btrfs/ctree.c:2237 replace_path+0x1243/0x2740 fs/btrfs/relocation.c:1224 merge_reloc_root+0xc46/0x1ad0 fs/btrfs/relocation.c:1692 merge_reloc_roots+0x3b3/0x980 fs/btrfs/relocation.c:1942 relocate_block_group+0xb0a/0xd40 fs/btrfs/relocation.c:3754 btrfs_relocate_block_group+0x77d/0xd90 fs/btrfs/relocation.c:4087 btrfs_relocate_chunk+0x12c/0x3b0 fs/btrfs/volumes.c:3494 __btrfs_balance+0x1b0f/0x26b0 fs/btrfs/volumes.c:4278 btrfs_balance+0xbdc/0x10c0 fs/btrfs/volumes.c:4655 btrfs_ioctl_balance+0x493/0x7c0 fs/btrfs/ioctl.c:3670 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 other info that might help us debug this: Chain exists of: btrfs-tree-01 --> btrfs-tree-01/1 --> btrfs-treloc-02/1 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(btrfs-treloc-02/1); lock(btrfs-tree-01/1); lock(btrfs-treloc-02/1); rlock(btrfs-tree-01); *** DEADLOCK *** 8 locks held by syz.0.0/5335: #0: ffff88801e3ae420 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write_file+0x5e/0x200 fs/namespace.c:559 #1: ffff888052c760d0 (&fs_info->reclaim_bgs_lock){+.+.}-{4:4}, at: __btrfs_balance+0x4c2/0x26b0 fs/btrfs/volumes.c:4183 #2: ffff888052c74850 (&fs_info->cleaner_mutex){+.+.}-{4:4}, at: btrfs_relocate_block_group+0x775/0xd90 fs/btrfs/relocation.c:4086 #3: ffff88801e3ae610 (sb_internal#2){.+.+}-{0:0}, at: merge_reloc_root+0xf11/0x1ad0 fs/btrfs/relocation.c:1659 #4: ffff888052c76470 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x405/0xda0 fs/btrfs/transaction.c:288 #5: ffff888052c76498 (btrfs_trans_num_extwriters){++++}-{0:0}, at: join_transaction+0x405/0xda0 fs/btrfs/transaction.c:288 #6: ffff8880545db878 (btrfs-tree-01/1){+.+.}-{4:4}, at: btrfs_tree_lock_nested+0x2f/0x250 fs/btrfs/locking.c:189 #7: ffff8880545dba58 (btrfs-treloc-02/1){+.+.}-{4:4}, at: btrfs_tree_lock_nested+0x2f/0x250 fs/btrfs/locking.c:189 stack backtrace: CPU: 0 UID: 0 PID: 5335 Comm: syz.0.0 Not tainted 6.13.0-rc5-syzkaller-00163-gab75170520d4 #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_circular_bug+0x13a/0x1b0 kernel/locking/lockdep.c:2074 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2206 check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 down_read_nested+0xb5/0xa50 kernel/locking/rwsem.c:1649 btrfs_tree_read_lock_nested+0x2f/0x250 fs/btrfs/locking.c:146 btrfs_tree_read_lock fs/btrfs/locking.h:188 [inline] read_block_for_search+0x718/0xbb0 fs/btrfs/ctree.c:1610 btrfs_search_slot+0x1274/0x3180 fs/btrfs/ctree.c:2237 replace_path+0x1243/0x2740 fs/btrfs/relocation.c:1224 merge_reloc_root+0xc46/0x1ad0 fs/btrfs/relocation.c:1692 merge_reloc_roots+0x3b3/0x980 fs/btrfs/relocation.c:1942 relocate_block_group+0xb0a/0xd40 fs/btrfs/relocation.c:3754 btrfs_relocate_block_group+0x77d/0xd90 fs/btrfs/relocation.c:4087 btrfs_relocate_chunk+0x12c/0x3b0 fs/btrfs/volumes.c:3494 __btrfs_balance+0x1b0f/0x26b0 fs/btrfs/volumes.c:4278 btrfs_balance+0xbdc/0x10c0 fs/btrfs/volumes.c:4655 btrfs_ioctl_balance+0x493/0x7c0 fs/btrfs/ioctl.c:3670 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 RIP: 0033:0x7f1ac6985d29 Code: ff ff c3 (...) RSP: 002b:00007f1ac63fe038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f1ac6b76160 RCX: 00007f1ac6985d29 RDX: 0000000020000180 RSI: 00000000c4009420 RDI: 0000000000000007 RBP: 00007f1ac6a01b08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000001 R14: 00007f1ac6b76160 R15: 00007fffda145a88 Reported-by: syzbot+63913e558c084f7f8fdc@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-btrfs/677b3014.050a0220.3b53b0.0064.GAE@google.com/ Fixes: 99785998ed1c ("btrfs: reduce lock contention when eb cache miss for btree search") Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.c | 2 ++ 1 file changed, 2 insertions(+) commit fb6fec6bdd9b16a935a0557773e313262366d071 Merge: 113385c5cc81 5c44aa21f086 Author: Linus Torvalds Date: Thu Jan 23 13:19:46 2025 -0800 Merge tag 'fs_for_v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull isofs update from Jan Kara: "Partial conversion of isofs to folios" * tag 'fs_for_v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: isofs: Partially convert zisofs_read_folio to use a folio commit 54f6052f904c3a5d4a63af4d907b2e19ecfbbcd9 Author: Krzysztof Kozlowski Date: Tue Jan 7 14:10:19 2025 +0100 dt-bindings: ufs: 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: Geert Uytterhoeven # renesas Link: https://lore.kernel.org/r/20250107131019.246517-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) .../devicetree/bindings/ufs/renesas,ufs.yaml | 16 ++++++------- .../bindings/ufs/samsung,exynos-ufs.yaml | 28 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) commit 113385c5cc81fd9d08563f1138029f718f593eb8 Merge: b477ff98d903 b8f2688258f8 Author: Linus Torvalds Date: Thu Jan 23 13:10:38 2025 -0800 Merge tag 'fsnotify_for_v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull inotify update from Jan Kara: "A small inotify strcpy() cleanup" * tag 'fsnotify_for_v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: inotify: Use strscpy() for event->name copies commit b477ff98d903618a1ab8247861f2ea6e70c0f0f8 Merge: d0d106a2bd21 ee10f6fcdb96 Author: Linus Torvalds Date: Thu Jan 23 13:06:42 2025 -0800 Merge tag 'xfs-merge-6.14' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull XFS updates from Carlos Maiolino: "This is mostly focused on the implementation of reflink and reverse-mapping support for XFS's real-time devices. It also includes several bugfixes. - Implement reflink support for the realtime device - Implement reverse-mapping support for the realtime device - Several bug fixes and cleanups" * tag 'xfs-merge-6.14' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (121 commits) xfs: fix buffer lookup vs release race xfs: check for dead buffers in xfs_buf_find_insert xfs: add a b_iodone callback to struct xfs_buf xfs: move b_li_list based retry handling to common code xfs: simplify xfsaild_resubmit_item xfs: always complete the buffer inline in xfs_buf_submit xfs: remove the extra buffer reference in xfs_buf_submit xfs: move invalidate_kernel_vmap_range to xfs_buf_ioend xfs: simplify buffer I/O submission xfs: move in-memory buftarg handling out of _xfs_buf_ioapply xfs: move write verification out of _xfs_buf_ioapply xfs: remove xfs_buf_delwri_submit_buffers xfs: simplify xfs_buf_delwri_pushbuf xfs: move xfs_buf_iowait out of (__)xfs_buf_submit xfs: remove the incorrect comment about the b_pag field xfs: remove the incorrect comment above xfs_buf_free_maps xfs: fix a double completion for buffers on in-memory targets xfs/libxfs: replace kmalloc() and memcpy() with kmemdup() xfs: constify feature checks xfs: refactor xfs_fs_statfs ... commit 93c66fbc280747ea700bd6199633d661e3c819b3 Author: Joe Hattori Date: Fri Jan 10 10:05:54 2025 +0900 powercap: call put_device() on an error path in powercap_register_control_type() powercap_register_control_type() calls device_register(), but does not release the refcount of the device when it fails. Call put_device() before returning an error to balance the refcount. Since the kfree(control_type) will be done by powercap_release(), remove the lines in powercap_register_control_type() before returning the error. This bug was found by an experimental verifier that I am developing. Signed-off-by: Joe Hattori Link: https://patch.msgid.link/20250110010554.1583411-1-joe@pf.is.s.u-tokyo.ac.jp [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki drivers/powercap/powercap_sys.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4891cd3eba62ac611a7929948cf5588a1abed909 Author: Andy Shevchenko Date: Thu Jan 16 17:43:29 2025 +0200 PM: Revert "Add EXPORT macros for exporting PM functions" Revert commit 41a337b40e98 ("Add EXPORT macros for exporting PM functions") because the macros added by it are still unused almost two years after they had been introduced. Reported-by: Adrian Hunter Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20250116154354.149297-1-andriy.shevchenko@linux.intel.com [ rjw: New changelog ] Signed-off-by: Rafael J. Wysocki include/linux/pm.h | 4 ---- 1 file changed, 4 deletions(-) commit e20a70c572539a486dbd91b225fa6a194a5e2122 Author: Wentao Liang Date: Sun Jan 19 22:32:05 2025 +0800 PM: hibernate: Add error handling for syscore_suspend() In hibernation_platform_enter(), the code did not check the return value of syscore_suspend(), potentially leading to a situation where syscore_resume() would be called even if syscore_suspend() failed. This could cause unpredictable behavior or system instability. Modify the code sequence in question to properly handle errors returned by syscore_suspend(). If an error occurs in the suspend path, the code now jumps to label 'Enable_irqs' skipping the syscore_resume() call and only enabling interrupts after setting the system state to SYSTEM_RUNNING. Fixes: 40dc166cb5dd ("PM / Core: Introduce struct syscore_ops for core subsystems PM") Signed-off-by: Wentao Liang Link: https://patch.msgid.link/20250119143205.2103-1-vulab@iscas.ac.cn [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki kernel/power/hibernate.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ce9ff21ea89d191e477a02ad7eabf4f996b80a69 Author: Alex Williamson Date: Wed Jan 22 10:38:30 2025 -0700 vfio/platform: check the bounds of read/write syscalls count and offset are passed from user space and not checked, only offset is capped to 40 bits, which can be used to read/write out of bounds of the device. Fixes: 6e3f26456009 (“vfio/platform: read and write support for the device fd”) Cc: stable@vger.kernel.org Reported-by: Mostafa Saleh Reviewed-by: Eric Auger Reviewed-by: Mostafa Saleh Tested-by: Mostafa Saleh Signed-off-by: Alex Williamson drivers/vfio/platform/vfio_platform_common.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 93940fbdc46843cea58708bbe8dd225bd0f32e67 Author: Christian Loehle Date: Mon Jan 20 10:09:46 2025 +0000 cpufreq/schedutil: Only bind threads if needed Remove the unconditional binding of sugov kthreads to the affected CPUs if the cpufreq driver indicates that updates can happen from any CPU. This allows userspace to set affinities to either save power (waking up bigger CPUs on HMP can be expensive) or increasing performance (by letting the utilized CPUs run without preemption of the sugov kthread). Signed-off-by: Christian Loehle Acked-by: Viresh Kumar Acked-by: Vincent Guittot Acked-by: Rafael J. Wysocki Acked-by: Juri Lelli Link: https://patch.msgid.link/5a8deed4-7764-4729-a9d4-9520c25fa7e8@arm.com Signed-off-by: Rafael J. Wysocki kernel/sched/cpufreq_schedutil.c | 6 +++++- kernel/sched/syscalls.c | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) commit 2b16c631832df6cf8782fb1fdc7df8a4f03f4f16 Author: Lifeng Zheng Date: Fri Jan 17 18:14:57 2025 +0800 cpufreq: ACPI: Remove set_boost in acpi_cpufreq_cpu_init() At the end of cpufreq_online() in cpufreq.c, set_boost is executed and the per-policy boost flag is set to mirror the cpufreq_driver boost, so it is not necessary to run set_boost in acpi_cpufreq_cpu_init(). Signed-off-by: Lifeng Zheng Acked-by: Viresh Kumar Link: https://patch.msgid.link/20250117101457.1530653-5-zhenglifeng1@huawei.com [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/acpi-cpufreq.c | 5 ----- 1 file changed, 5 deletions(-) commit 03d8b4e76266e11662c5e544854b737843173e2d Author: Lifeng Zheng Date: Fri Jan 17 18:14:56 2025 +0800 cpufreq: CPPC: Fix wrong max_freq in policy initialization In policy initialization, policy->max and policy->cpuinfo.max_freq are always set to the value calculated from caps->nominal_perf. This will cause the frequency stay on base frequency even if the policy is already boosted when a CPU is going online. Fix this by using policy->boost_enabled to determine which value should be set. Signed-off-by: Lifeng Zheng Acked-by: Viresh Kumar Link: https://patch.msgid.link/20250117101457.1530653-4-zhenglifeng1@huawei.com [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cppc_cpufreq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit dd016f379ebc2d43a9405742d1a6066577509bd7 Author: Lifeng Zheng Date: Fri Jan 17 18:14:55 2025 +0800 cpufreq: Introduce a more generic way to set default per-policy boost flag In cpufreq_online() of cpufreq.c, the per-policy boost flag is already set to mirror the cpufreq_driver boost during init but using freq_table to judge if the policy has boost frequency. There are two drawbacks to this approach: 1. It doesn't work for the cpufreq drivers that do not use a frequency table. For now, acpi-cpufreq and amd-pstate have to enable boost in policy initialization. And cppc_cpufreq never set policy to boost when going online no matter what the cpufreq_driver boost flag is. 2. If the CPU goes offline when cpufreq_driver boost is enabled and then goes online when cpufreq_driver boost is disabled, the per-policy boost flag will incorrectly remain true. Running set_boost at the end of the online process is a more generic way for all cpufreq drivers. Signed-off-by: Lifeng Zheng Link: https://patch.msgid.link/20250117101457.1530653-3-zhenglifeng1@huawei.com Acked-by: Viresh Kumar [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 1608f0230510489d74a2e24e47054233b7e4678a Author: Lifeng Zheng Date: Fri Jan 17 18:14:54 2025 +0800 cpufreq: Fix re-boost issue after hotplugging a CPU It turns out that CPUX will stay on the base frequency after performing these operations: 1. boost all CPUs: echo 1 > /sys/devices/system/cpu/cpufreq/boost 2. offline one CPU: echo 0 > /sys/devices/system/cpu/cpuX/online 3. deboost all CPUs: echo 0 > /sys/devices/system/cpu/cpufreq/boost 4. online CPUX: echo 1 > /sys/devices/system/cpu/cpuX/online 5. boost all CPUs again: echo 1 > /sys/devices/system/cpu/cpufreq/boost This is because max_freq_req of the policy is not updated during the online process, and the value of max_freq_req before the last offline is retained. When the CPU is boosted again, freq_qos_update_request() will do nothing because the old value is the same as the new one. This causes the CPU to stay at the base frequency. Updating max_freq_req in cpufreq_online() will solve this problem. Signed-off-by: Lifeng Zheng Acked-by: Viresh Kumar Link: https://patch.msgid.link/20250117101457.1530653-2-zhenglifeng1@huawei.com [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 4 ++++ 1 file changed, 4 insertions(+) commit 43855ac61483cb914f060851535ea753c094b3e0 Author: Viresh Kumar Date: Wed Jan 22 11:36:16 2025 +0530 cpufreq: s3c64xx: Fix compilation warning The driver generates following warning when regulator support isn't enabled in the kernel. Fix it. drivers/cpufreq/s3c64xx-cpufreq.c: In function 's3c64xx_cpufreq_set_target': >> drivers/cpufreq/s3c64xx-cpufreq.c:55:22: warning: variable 'old_freq' set but not used [-Wunused-but-set-variable] 55 | unsigned int old_freq, new_freq; | ^~~~~~~~ >> drivers/cpufreq/s3c64xx-cpufreq.c:54:30: warning: variable 'dvfs' set but not used [-Wunused-but-set-variable] 54 | struct s3c64xx_dvfs *dvfs; | ^~~~ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501191803.CtfT7b2o-lkp@intel.com/ Cc: 5.4+ # v5.4+ Signed-off-by: Viresh Kumar Link: https://patch.msgid.link/236b227e929e5adc04d1e9e7af6845a46c8e9432.1737525916.git.viresh.kumar@linaro.org Signed-off-by: Rafael J. Wysocki drivers/cpufreq/s3c64xx-cpufreq.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit da6b353786997c0ffa67127355ad1d54ed3324c2 Author: Uwe Kleine-König Date: Thu Jan 23 18:27:07 2025 +0100 pwm: Ensure callbacks exist before calling them If one of the waveform functions is called for a chip that only supports .apply(), we want that an error code is returned and not a NULL pointer exception. Fixes: 6c5126c6406d ("pwm: Provide new consumer API functions for waveforms") Cc: stable@vger.kernel.org Signed-off-by: Uwe Kleine-König Tested-by: Trevor Gamblin Link: https://lore.kernel.org/r/20250123172709.391349-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König drivers/pwm/core.c | 13 +++++++++++-- include/linux/pwm.h | 17 +++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) commit 8f62ca9c338aae4f73e9ce0221c3d4668359ddd8 Author: Hans de Goede Date: Thu Jan 23 14:22:02 2025 +0100 ACPI: x86: Add skip i2c clients quirk for Vexia EDU ATLA 10 tablet 5V The Vexia EDU ATLA 10 tablet comes in 2 different versions with significantly different mainboards. The only outward difference is that the charging barrel on one is marked 5V and the other is marked 9V. Both ship with Android 4.4 as factory OS and have the usual broken DSDT issues for x86 Android tablets. Add a quirk to skip ACPI I2C client enumeration for the 5V version to complement the existing quirk for the 9V version. Signed-off-by: Hans de Goede Link: https://patch.msgid.link/20250123132202.18209-1-hdegoede@redhat.com Signed-off-by: Rafael J. Wysocki drivers/acpi/x86/utils.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 6e64d6b3a3c39655de56682ec83e894978d23412 Author: Maíra Canal Date: Wed Jan 22 22:24:03 2025 -0300 drm/v3d: Assign job pointer to NULL before signaling the fence In commit e4b5ccd392b9 ("drm/v3d: Ensure job pointer is set to NULL after job completion"), we introduced a change to assign the job pointer to NULL after completing a job, indicating job completion. However, this approach created a race condition between the DRM scheduler workqueue and the IRQ execution thread. As soon as the fence is signaled in the IRQ execution thread, a new job starts to be executed. This results in a race condition where the IRQ execution thread sets the job pointer to NULL simultaneously as the `run_job()` function assigns a new job to the pointer. This race condition can lead to a NULL pointer dereference if the IRQ execution thread sets the job pointer to NULL after `run_job()` assigns it to the new job. When the new job completes and the GPU emits an interrupt, `v3d_irq()` is triggered, potentially causing a crash. [ 466.310099] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000c0 [ 466.318928] Mem abort info: [ 466.321723] ESR = 0x0000000096000005 [ 466.325479] EC = 0x25: DABT (current EL), IL = 32 bits [ 466.330807] SET = 0, FnV = 0 [ 466.333864] EA = 0, S1PTW = 0 [ 466.337010] FSC = 0x05: level 1 translation fault [ 466.341900] Data abort info: [ 466.344783] ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000 [ 466.350285] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 466.355350] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 466.360677] user pgtable: 4k pages, 39-bit VAs, pgdp=0000000089772000 [ 466.367140] [00000000000000c0] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 [ 466.375875] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP [ 466.382163] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device algif_hash algif_skcipher af_alg bnep binfmt_misc vc4 snd_soc_hdmi_codec drm_display_helper cec brcmfmac_wcc spidev rpivid_hevc(C) drm_client_lib brcmfmac hci_uart drm_dma_helper pisp_be btbcm brcmutil snd_soc_core aes_ce_blk v4l2_mem2mem bluetooth aes_ce_cipher snd_compress videobuf2_dma_contig ghash_ce cfg80211 gf128mul snd_pcm_dmaengine videobuf2_memops ecdh_generic sha2_ce ecc videobuf2_v4l2 snd_pcm v3d sha256_arm64 rfkill videodev snd_timer sha1_ce libaes gpu_sched snd videobuf2_common sha1_generic drm_shmem_helper mc rp1_pio drm_kms_helper raspberrypi_hwmon spi_bcm2835 gpio_keys i2c_brcmstb rp1 raspberrypi_gpiomem rp1_mailbox rp1_adc nvmem_rmem uio_pdrv_genirq uio i2c_dev drm ledtrig_pattern drm_panel_orientation_quirks backlight fuse dm_mod ip_tables x_tables ipv6 [ 466.458429] CPU: 0 UID: 1000 PID: 2008 Comm: chromium Tainted: G C 6.13.0-v8+ #18 [ 466.467336] Tainted: [C]=CRAP [ 466.470306] Hardware name: Raspberry Pi 5 Model B Rev 1.0 (DT) [ 466.476157] pstate: 404000c9 (nZcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 466.483143] pc : v3d_irq+0x118/0x2e0 [v3d] [ 466.487258] lr : __handle_irq_event_percpu+0x60/0x228 [ 466.492327] sp : ffffffc080003ea0 [ 466.495646] x29: ffffffc080003ea0 x28: ffffff80c0c94200 x27: 0000000000000000 [ 466.502807] x26: ffffffd08dd81d7b x25: ffffff80c0c94200 x24: ffffff8003bdc200 [ 466.509969] x23: 0000000000000001 x22: 00000000000000a7 x21: 0000000000000000 [ 466.517130] x20: ffffff8041bb0000 x19: 0000000000000001 x18: 0000000000000000 [ 466.524291] x17: ffffffafadfb0000 x16: ffffffc080000000 x15: 0000000000000000 [ 466.531452] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 [ 466.538613] x11: 0000000000000000 x10: 0000000000000000 x9 : ffffffd08c527eb0 [ 466.545777] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000 [ 466.552941] x5 : ffffffd08c4100d0 x4 : ffffffafadfb0000 x3 : ffffffc080003f70 [ 466.560102] x2 : ffffffc0829e8058 x1 : 0000000000000001 x0 : 0000000000000000 [ 466.567263] Call trace: [ 466.569711] v3d_irq+0x118/0x2e0 [v3d] (P) [ 466.573826] __handle_irq_event_percpu+0x60/0x228 [ 466.578546] handle_irq_event+0x54/0xb8 [ 466.582391] handle_fasteoi_irq+0xac/0x240 [ 466.586498] generic_handle_domain_irq+0x34/0x58 [ 466.591128] gic_handle_irq+0x48/0xd8 [ 466.594798] call_on_irq_stack+0x24/0x58 [ 466.598730] do_interrupt_handler+0x88/0x98 [ 466.602923] el0_interrupt+0x44/0xc0 [ 466.606508] __el0_irq_handler_common+0x18/0x28 [ 466.611050] el0t_64_irq_handler+0x10/0x20 [ 466.615156] el0t_64_irq+0x198/0x1a0 [ 466.618740] Code: 52800035 3607faf3 f9442e80 52800021 (f9406018) [ 466.624853] ---[ end trace 0000000000000000 ]--- [ 466.629483] Kernel panic - not syncing: Oops: Fatal exception in interrupt [ 466.636384] SMP: stopping secondary CPUs [ 466.640320] Kernel Offset: 0x100c400000 from 0xffffffc080000000 [ 466.646259] PHYS_OFFSET: 0x0 [ 466.649141] CPU features: 0x100,00000170,00901250,0200720b [ 466.654644] Memory Limit: none [ 466.657706] ---[ end Kernel panic - not syncing: Oops: Fatal exception in interrupt ]--- Fix the crash by assigning the job pointer to NULL before signaling the fence. This ensures that the job pointer is cleared before any new job starts execution, preventing the race condition and the NULL pointer dereference crash. Cc: stable@vger.kernel.org Fixes: e4b5ccd392b9 ("drm/v3d: Ensure job pointer is set to NULL after job completion") Signed-off-by: Maíra Canal Reviewed-by: Jose Maria Casanova Crespo Reviewed-by: Iago Toral Quiroga Tested-by: Phil Elwell Link: https://patchwork.freedesktop.org/patch/msgid/20250123012403.20447-1-mcanal@igalia.com drivers/gpu/drm/v3d/v3d_irq.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 53dac345395c0d2493cbc2f4c85fe38aef5b63f5 Author: Frederic Weisbecker Date: Sat Jan 18 00:24:33 2025 +0100 hrtimers: Force migrate away hrtimers queued after CPUHP_AP_HRTIMERS_DYING hrtimers are migrated away from the dying CPU to any online target at the CPUHP_AP_HRTIMERS_DYING stage in order not to delay bandwidth timers handling tasks involved in the CPU hotplug forward progress. However wakeups can still be performed by the outgoing CPU after CPUHP_AP_HRTIMERS_DYING. Those can result again in bandwidth timers being armed. Depending on several considerations (crystal ball power management based election, earliest timer already enqueued, timer migration enabled or not), the target may eventually be the current CPU even if offline. If that happens, the timer is eventually ignored. The most notable example is RCU which had to deal with each and every of those wake-ups by deferring them to an online CPU, along with related workarounds: _ e787644caf76 (rcu: Defer RCU kthreads wakeup when CPU is dying) _ 9139f93209d1 (rcu/nocb: Fix RT throttling hrtimer armed from offline CPU) _ f7345ccc62a4 (rcu/nocb: Fix rcuog wake-up from offline softirq) The problem isn't confined to RCU though as the stop machine kthread (which runs CPUHP_AP_HRTIMERS_DYING) reports its completion at the end of its work through cpu_stop_signal_done() and performs a wake up that eventually arms the deadline server timer: WARNING: CPU: 94 PID: 588 at kernel/time/hrtimer.c:1086 hrtimer_start_range_ns+0x289/0x2d0 CPU: 94 UID: 0 PID: 588 Comm: migration/94 Not tainted Stopper: multi_cpu_stop+0x0/0x120 <- stop_machine_cpuslocked+0x66/0xc0 RIP: 0010:hrtimer_start_range_ns+0x289/0x2d0 Call Trace: start_dl_timer enqueue_dl_entity dl_server_start enqueue_task_fair enqueue_task ttwu_do_activate try_to_wake_up complete cpu_stopper_thread Instead of providing yet another bandaid to work around the situation, fix it in the hrtimers infrastructure instead: always migrate away a timer to an online target whenever it is enqueued from an offline CPU. This will also allow to revert all the above RCU disgraceful hacks. Fixes: 5c0930ccaad5 ("hrtimers: Push pending hrtimers away from outgoing CPU earlier") Reported-by: Vlad Poenaru Reported-by: Usama Arif Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Tested-by: Paul E. McKenney Link: https://lore.kernel.org/all/20250117232433.24027-1-frederic@kernel.org Closes: 20241213203739.1519801-1-usamaarif642@gmail.com include/linux/hrtimer_defs.h | 1 + kernel/time/hrtimer.c | 103 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 83 insertions(+), 21 deletions(-) commit 27af31e44949fa85550176520ef7086a0d00fd7b Author: Andy Shevchenko Date: Thu Jan 16 18:07:45 2025 +0200 hrtimers: Mark is_migration_base() with __always_inline When is_migration_base() is unused, it prevents kernel builds with clang, `make W=1` and CONFIG_WERROR=y: kernel/time/hrtimer.c:156:20: error: unused function 'is_migration_base' [-Werror,-Wunused-function] 156 | static inline bool is_migration_base(struct hrtimer_clock_base *base) | ^~~~~~~~~~~~~~~~~ Fix this by marking it with __always_inline. [ tglx: Use __always_inline instead of __maybe_unused and move it into the usage sites conditional ] Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250116160745.243358-1-andriy.shevchenko@linux.intel.com kernel/time/hrtimer.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 10ff5bbfd4b020e58fd8863e44ae59f0d4c337bf Merge: 4d3bf4e8450c b388face5f16 Author: Bjorn Helgaas Date: Thu Jan 23 13:05:06 2025 -0600 Merge branch 'pci/misc' - Constify struct bin_attribute for sysfs, VPD, P2PDMA, and the IBM ACPI hotplug driver (Thomas Weißschuh) - Update PCI_EXP_LNKCAP_SLS comment (Lukas Wunner) - Drop superfluous pm_wakeup.h include (Wolfram Sang) - Remove redundant PCI_VSEC_HDR and PCI_VSEC_HDR_LEN_SHIFT (Dongdong Zhang) - Correct documentation of the 'config_acs=' kernel parameter (Akihiko Odaki) * pci/misc: Documentation: Fix pci=config_acs= example PCI: Remove redundant PCI_VSEC_HDR and PCI_VSEC_HDR_LEN_SHIFT PCI: Don't include 'pm_wakeup.h' directly PCI: Update code comment on PCI_EXP_LNKCAP_SLS for PCIe r3.0 PCI/ACPI: Constify 'struct bin_attribute' PCI/P2PDMA: Constify 'struct bin_attribute' PCI/VPD: Constify 'struct bin_attribute' PCI/sysfs: Constify 'struct bin_attribute' commit 4d3bf4e8450cf99667b0938850f72389792082b8 Merge: d3f0bec2a490 4eea7596b8fb Author: Bjorn Helgaas Date: Thu Jan 23 13:05:06 2025 -0600 Merge branch 'pci/controller/xilinx-cpm' - Add DT binding and driver support for Xilinx Versal CPM5 (Thippeswamy Havalige) * pci/controller/xilinx-cpm: PCI: xilinx-cpm: Add support for Versal CPM5 Root Port Controller 1 dt-bindings: PCI: xilinx-cpm: Add compatible string for CPM5 host1 commit d3f0bec2a4901c0061b4aebadece5be0534a6aa9 Merge: a306f01eb5b1 7ca288760007 Author: Bjorn Helgaas Date: Thu Jan 23 13:05:05 2025 -0600 Merge branch 'pci/controller/rockchip' - Add struct rockchip_pcie_ep kernel-doc to fix warnings (Damien Le Moal) - Simplify clock and reset handling by using bulk interfaces (Anand Moon) - Pass typed rockchip_pcie (not void) pointer to rockchip_pcie_disable_clocks() (Anand Moon) - Return -ENOMEM, not success, when pci_epc_mem_alloc_addr() fails (Dan Carpenter) * pci/controller/rockchip: PCI: rockchip-ep: Fix error code in rockchip_pcie_ep_init_ob_mem() PCI: rockchip: Refactor rockchip_pcie_disable_clocks() signature PCI: rockchip: Simplify reset control handling by using reset_control_bulk*() function PCI: rockchip: Simplify clock handling by using clk_bulk*() functions PCI: rockchip: Add missing fields descriptions for struct rockchip_pcie_ep commit a306f01eb5b190d30c51aecac93439fa6ff8c69d Merge: 1854b2e019b4 2d2da5a4c1b4 Author: Bjorn Helgaas Date: Thu Jan 23 13:05:05 2025 -0600 Merge branch 'pci/controller/rcar-ep' - Avoid passing stack buffer as resource name (King Dix) * pci/controller/rcar-ep: PCI: rcar-ep: Fix incorrect variable used when calling devm_request_mem_region() commit 1854b2e019b4b4b4a809bc3513403d05638654de Merge: 8d35c2b0eb22 26cdda544479 Author: Bjorn Helgaas Date: Thu Jan 23 13:05:05 2025 -0600 Merge branch 'pci/controller/mvebu' - Add MODULE_DEVICE_TABLE() to enable module autoloading (Liao Chen) * pci/controller/mvebu: PCI: mvebu: Enable module autoloading commit 8d35c2b0eb22c2607aab3c97d47746d4febfb794 Merge: 1276ad01a25e 04aa999eb96f Author: Bjorn Helgaas Date: Thu Jan 23 13:05:04 2025 -0600 Merge branch 'pci/controller/microchip' - Set up the inbound address translation based on whether the platform allows coherent or non-coherent DMA (Daire McNamara) - Update DT binding such that platforms are DMA-coherent by default and must specify 'dma-noncoherent' if needed (Conor Dooley) * pci/controller/microchip: dt-bindings: PCI: microchip,pcie-host: Allow dma-noncoherent PCI: microchip: Set inbound address translation for coherent or non-coherent mode commit 1276ad01a25e62a283ebdeec20108aad0204c5d3 Merge: 09b7c1627b40 17bd5e4dc96c Author: Bjorn Helgaas Date: Thu Jan 23 13:05:04 2025 -0600 Merge branch 'pci/controller/mediatek' - Use clk_bulk_prepare_enable() instead of separate clk_bulk_prepare() and clk_bulk_enable() (Lorenzo Bianconi) - Rearrange reset assert/deassert so they're both done in the *_power_up() callbacks (Lorenzo Bianconi) - Document that Airoha EN7581 requires PHY init and power-on before PHY reset deassert, unlike other MediaTek Gen3 controllers (Lorenzo Bianconi) - Move Airoha EN7581 post-reset delay from the en7581 clock .enable() method to mtk_pcie_en7581_power_up() (Lorenzo Bianconi) - Sleep instead of delay during Airoha EN7581 power-up, since this is a non-atomic context (Lorenzo Bianconi) - Skip PERST# assertion on Airoha EN7581 during probe and suspend/resume to avoid a hardware defect (Lorenzo Bianconi) - Enable async probe to reduce system startup time (Douglas Anderson) * pci/controller/mediatek: PCI: mediatek-gen3: Enable async probe by default PCI: mediatek-gen3: Avoid PCIe resetting via PERST# for Airoha EN7581 SoC PCI: mediatek-gen3: Rely on msleep() in mtk_pcie_en7581_power_up() PCI: mediatek-gen3: Move reset delay in mtk_pcie_en7581_power_up() PCI: mediatek-gen3: Add comment about initialization order in mtk_pcie_en7581_power_up() PCI: mediatek-gen3: Move reset/assert callbacks in .power_up() PCI: mediatek-gen3: Rely on clk_bulk_prepare_enable() in mtk_pcie_en7581_power_up() commit 09b7c1627b40a649b5960e641718105e32f5b4d4 Merge: 5b9c74b635a6 149fc35734e5 Author: Bjorn Helgaas Date: Thu Jan 23 13:05:03 2025 -0600 Merge branch 'pci/controller/layerscape' - Simplify by using syscon_regmap_lookup_by_phandle_args() instead of syscon_regmap_lookup_by_phandle() followed by of_property_read_u32_array() (Krzysztof Kozlowski) * pci/controller/layerscape: PCI: layerscape: Use syscon_regmap_lookup_by_phandle_args commit 5b9c74b635a6941bc320b6a1201ced5ad4e99294 Merge: 349b434b7a19 b881532991f8 Author: Bjorn Helgaas Date: Thu Jan 23 13:05:03 2025 -0600 Merge branch 'pci/controller/imx6' - Add DT compatible string 'fsl,imx8q-pcie-ep' and driver support for i.MX8Q series (i.MX8QM, i.MX8QXP, and i.MX8DXL) Endpoints (Frank Li) - Add DT binding for optional i.MX95 Refclk and driver support to enable it if the platform hasn't enabled it (Richard Zhu) - Configure PHY based on controller being in Root Complex or Endpoint mode (Frank Li) - Rely on dbi2 and iATU base addresses from DT via dw_pcie_get_resources() instead of hardcoding them in imx6 (Richard Zhu) - Skip controller_id computation for i.MX7D since it only has one controller (Richard Zhu) - Deassert apps_reset in imx_pcie_deassert_core_reset() since it is asserted in imx_pcie_assert_core_reset() (Richard Zhu) - Add missing reference clock enable or disable logic for IMX6SX, IMX7D, IMX8MM (Richard Zhu) - Remove redundant imx7d_pcie_init_phy() since imx7d_pcie_enable_ref_clk() does the same thing (Richard Zhu) * pci/controller/imx6: PCI: imx6: Clean up comments and whitespace PCI: imx6: Remove surplus imx7d_pcie_init_phy() function PCI: imx6: Add missing reference clock disable logic PCI: imx6: Deassert apps_reset in imx_pcie_deassert_core_reset() PCI: imx6: Skip controller_id generation logic for i.MX7D PCI: imx6: Fetch dbi2 and iATU base addesses from DT PCI: imx6: Configure PHY based on Root Complex or Endpoint mode PCI: imx6: Add Refclk for i.MX95 PCIe dt-bindings: PCI: fsl,imx6q-pcie: Add Refclk for i.MX95 RC PCI: imx6: Add i.MX8Q PCIe Endpoint (EP) support dt-bindings: PCI: fsl,imx6q-pcie-ep: Add compatible string fsl,imx8q-pcie-ep # Conflicts: # drivers/pci/controller/dwc/pci-imx6.c commit 349b434b7a191fb120f0f7a96183fc9409b98777 Merge: 8ee6c616337a 1108d677dae2 Author: Bjorn Helgaas Date: Thu Jan 23 13:04:59 2025 -0600 Merge branch 'pci/controller/dwc' - Fix potential string truncation in dw_pcie_edma_irq_verify() (Niklas Cassel) - Don't wait for link up in DWC core if driver can detect Link Up event (Krishna chaitanya chundru) - If qcom 'global' IRQ is supported for detection of Link Up events, tell DWC core not to wait for link up (Krishna chaitanya chundru) - Update ICC and OPP votes after Link Up events (Krishna chaitanya chundru) - Use dw-rockchip dll_link_up IRQ to detect Link Up and enumerate devices so users don't have to manually rescan (Niklas Cassel) - In dw-rockchip, the 'sys' interrupt is required and detects Link Up events, so tell DWC core not to wait for link up (Niklas Cassel) - Always stop link in dw_pcie_suspend_noirq(), which is required at least for i.MX8QM to re-establish link on resume (Richard Zhu) - Drop racy and unnecessary LTSSM state check before sending PME_TURN_OFF message in dw_pcie_suspend_noirq() (Richard Zhu) - Add stubs for dw_pcie_suspend_noirq() dw_pcie_resume_noirq() when CONFIG_PCIE_DW_HOST is not defined so drivers don't need #ifdefs (Bjorn Helgaas) - Use DWC core suspend/resume functions for imx6 (Frank Li) - Add imx6 suspend/resume support for i.MX8MQ, i.MX8Q, and i.MX95 (Richard Zhu) - Add struct of_pci_range.parent_bus_addr for devices that need their immediate parent bus address, not the CPU address, e.g., to program an internal Address Translation Unit (iATU) (Frank Li) * pci/controller/dwc: PCI: dwc: Simplify config resource lookup of: address: Add parent_bus_addr to struct of_pci_range PCI: imx6: Add i.MX8MQ, i.MX8Q and i.MX95 PM support PCI: imx6: Use DWC common suspend resume method PCI: dwc: Add dw_pcie_suspend_noirq(), dw_pcie_resume_noirq() stubs for !CONFIG_PCIE_DW_HOST PCI: dwc: Remove LTSSM state test in dw_pcie_suspend_noirq() PCI: dwc: Always stop link in the dw_pcie_suspend_noirq PCI: dw-rockchip: Don't wait for link since we can detect Link Up PCI: dw-rockchip: Enumerate endpoints based on dll_link_up IRQ PCI: qcom: Update ICC and OPP values after Link Up event PCI: qcom: Don't wait for link if we can detect Link Up PCI: dwc: Don't wait for link up if driver can detect Link Up event PCI: dwc: Fix potential truncation in dw_pcie_edma_irq_verify() # Conflicts: # drivers/pci/controller/dwc/pci-imx6.c commit 8ee6c616337ae3fe3db150a2f426415ead9fd69f Merge: ec3619abbf0e ad9afd750301 Author: Bjorn Helgaas Date: Thu Jan 23 13:04:54 2025 -0600 Merge branch 'pci/controller/dra7xx' - Simplify by using syscon_regmap_lookup_by_phandle_args() instead of syscon_regmap_lookup_by_phandle() followed by of_parse_phandle_with_fixed_args() or of_property_read_u32_index() (Krzysztof Kozlowski) * pci/controller/dra7xx: PCI: dra7xx: Use syscon_regmap_lookup_by_phandle_args commit ec3619abbf0ea62d7215f345a07a6b33fa90ce8b Merge: 1532594de17e d9f6642ab7ca Author: Bjorn Helgaas Date: Thu Jan 23 13:04:53 2025 -0600 Merge branch 'pci/controller/iommu-map' - Add host bridge .enable_device() and .disable_device() hooks for bridges that need to configure things like Requester ID to StreamID mapping when enabling devices (Frank Li) - Add imx6 Requester ID to StreamID mapping configuration when enabling devices (Frank Li) - Extend struct pci_ecam_ops with .enable_device() and .disable_device() hooks so drivers that use pci_host_common_probe() instead of their own .probe() have a way to set the .enable_device() callbacks (Marc Zyngier) - Convert pcie-apple StreamID mapping configuration from a bus notifier to the .enable_device() and .disable_device() callbacks (Marc Zyngier) * pci/controller/iommu-map: PCI: apple: Convert to {en,dis}able_device() callbacks PCI: host-generic: Allow {en,dis}able_device() to be provided via pci_ecam_ops PCI: imx6: Add IOMMU and ITS MSI support for i.MX95 PCI: Add enable_device() and disable_device() callbacks for bridges commit 1532594de17e297eaf8b390e72d6037b6feb3005 Merge: e321b10b83f0 c25b978d351f Author: Bjorn Helgaas Date: Thu Jan 23 13:04:53 2025 -0600 Merge branch 'pci/dt-bindings' - Convert mobiveil-pcie.txt to YAML and update 'interrupt-names' and 'reg-names' (Frank Li) - Add qcom DT SM8550 and SM8650 optional 'global' interrupt for link events (Neil Armstrong) - Add qcom DT 'compatible' strings for IPQ5424 PCIe controller (Manikanta Mylavarapu) * pci/dt-bindings: dt-bindings: PCI: qcom: Document the IPQ5424 PCIe controller dt-bindings: PCI: qcom,pcie-sm8550: Document 'global' interrupt dt-bindings: PCI: mobiveil: Convert mobiveil-pcie.txt to YAML commit e321b10b83f01befc05f50b31c364f2ece240628 Merge: 74855f6697e9 392188bb0f6e Author: Bjorn Helgaas Date: Thu Jan 23 13:04:53 2025 -0600 Merge branch 'pci/endpoint-test' - Clear pci-epf-test dma_chan_rx, not dma_chan_tx, after freeing dma_chan_rx (Mohamed Khalfella) - Correct the DMA MEMCPY test so it doesn't fail if the Endpoint supports both DMA_PRIVATE and DMA_MEMCPY (Manivannan Sadhasivam) - Add pci-epf-test and pci_endpoint_test support for capabilities (Niklas Cassel) - Add Endpoint test for consecutive BARs (Niklas Cassel) - Remove redundant comparison from Endpoint BAR test because a > 1MB BAR can always be exactly covered by iterating with a 1MB buffer (Hans Zhang) - Correct the PCI Endpoint test IOCTL return value (Manivannan Sadhasivam) - Move PCI Endpoint tests from tools/pci to Kselftests (Manivannan Sadhasivam) - Convert PCI Endpoint tests to the Kselftest framework (Manivannan Sadhasivam) * pci/endpoint-test: selftests: pci_endpoint: Migrate to Kselftest framework selftests: Move PCI Endpoint tests from tools/pci to Kselftests misc: pci_endpoint_test: Fix IOCTL return value misc: pci_endpoint_test: Remove redundant 'remainder' test misc: pci_endpoint_test: Add consecutive BAR test misc: pci_endpoint_test: Add support for capabilities PCI: endpoint: pci-epf-test: Add support for capabilities PCI: endpoint: pci-epf-test: Fix check for DMA MEMCPY test PCI: endpoint: pci-epf-test: Set dma_chan_rx pointer to NULL on error commit 74855f6697e9ed4f0281a42ffd20eff5b2f75b2c Merge: 770b18a541f3 0e7faea1880c Author: Bjorn Helgaas Date: Thu Jan 23 13:04:52 2025 -0600 Merge branch 'pci/endpoint' - Destroy the EPC device in devm_pci_epc_destroy(), which previously didn't call devres_release() (Zijun Hu) - Simplify pci_epc_get() with class_find_device_by_name() (Zijun Hu) - Finish virtual EP removal in pci_epf_remove_vepf(), which previously caused a subsequent pci_epf_add_vepf() to fail with -EBUSY (Zijun Hu) - Write BAR_MASK before iATU registers in pci_epc_set_bar() so we don't depend on the BAR_MASK reset value being larger than the requested BAR size (Niklas Cassel) - Prevent changing BAR size/flags in pci_epc_set_bar() to prevent reads from bypassing the iATU if we reduced the BAR size (Niklas Cassel) - Verify address alignment when programming iATU so we don't attempt to write bits that are read-only because of the BAR size, which could lead to directing accesses to the wrong address (Niklas Cassel) - Implement artpec6 pci_epc_features so we can rely on all drivers supporting it so we can use it in EPC core code (Niklas Cassel) - Check for BARs of fixed size to prevent endpoint drivers from trying to change their size (Niklas Cassel) - Verify that requested BAR size is a power of two when endpoint driver sets the BAR (Niklas Cassel) * pci/endpoint: PCI: endpoint: Verify that requested BAR size is a power of two PCI: endpoint: Add size check for fixed size BARs in pci_epc_set_bar() PCI: artpec6: Implement dw_pcie_ep operation get_features PCI: dwc: ep: Add 'address' alignment to 'size' check in dw_pcie_prog_ep_inbound_atu() PCI: dwc: ep: Prevent changing BAR size/flags in pci_epc_set_bar() PCI: dwc: ep: Write BAR_MASK before iATU registers in pci_epc_set_bar() PCI: endpoint: Finish virtual EP removal in pci_epf_remove_vepf() PCI: endpoint: Simplify pci_epc_get() PCI: endpoint: Destroy the EPC device in devm_pci_epc_destroy() PCI: endpoint: Replace magic number '6' by PCI_STD_NUM_BARS commit 770b18a541f3d625a0a9f89d060c1f65c65b419b Merge: 3aa8f6524017 a3282f84b215 Author: Bjorn Helgaas Date: Thu Jan 23 13:04:52 2025 -0600 Merge branch 'pci/switchtec' - Add Microchip PCI100X device IDs (Rakesh Babu Saladi) * pci/switchtec: PCI: switchtec: Add Microchip PCI100X device IDs commit 3aa8f6524017a466b86c5e03405289d0f508f476 Merge: 60b5cd4f8244 b1049f2d6869 Author: Bjorn Helgaas Date: Thu Jan 23 13:04:52 2025 -0600 Merge branch 'pci/pm' - Avoid D3 for Root Ports on TUXEDO Sirius Gen1 with old BIOS because the system can't wake up from suspend (Werner Sembach) * pci/pm: PCI: Avoid putting some root ports into D3 on TUXEDO Sirius Gen1 commit 60b5cd4f82448595aed58f24583308baf86e4565 Merge: ccbd884f9efb 2d54d23c604d Author: Bjorn Helgaas Date: Thu Jan 23 13:04:51 2025 -0600 Merge branch 'pci/pci-sysfs' - Move reset related sysfs code from pci.c to pci-sysfs.c where other similar code lives (Ilpo Järvinen) - Simplify reset_method_store() memory management by using __free() instead of explicit kfree() cleanup (Ilpo Järvinen) - Drop unnecessary zero initializer (Ilpo Järvinen) * pci/pci-sysfs: PCI/sysfs: Remove unnecessary zero in initializer PCI/sysfs: Use __free() in reset_method_store() PCI/sysfs: Move reset related sysfs code to correct file commit ccbd884f9efbcd8bd58350186edfe5cbbb537de1 Merge: f4a09274c592 42d9972732f7 Author: Bjorn Helgaas Date: Thu Jan 23 13:04:51 2025 -0600 Merge branch 'pci/of' - Unexport of_pci_parse_bus_range() since it's only used in of.c (Bjorn Helgaas) - Drop 'No bus range found' message so we don't complain when DTs don't specify the default 'bus-range = <0x00 0xff>' (Bjorn Helgaas) - Simplify devm_of_pci_get_host_bridge_resources() interface by dropping parameters that are always the same default values (Bjorn Helgaas) - Update comment reference to of_pci_get_host_bridge_resources(), which no longer exists (Bjorn Helgaas) - Rename the drivers/pci/of_property.c struct of_pci_range to of_pci_range_entry to avoid confusion with the global of_pci_range in include/linux/of_address.h (Bjorn Helgaas) * pci/of: PCI: of_property: Rename struct of_pci_range to of_pci_range_entry sparc/PCI: Update reference to devm_of_pci_get_host_bridge_resources() PCI: of: Simplify devm_of_pci_get_host_bridge_resources() interface PCI: of: Drop 'No bus range found' message PCI: Unexport of_pci_parse_bus_range() commit f4a09274c592ac1235d7695c03f19aad1b7d2069 Merge: 5a1d568ad142 f68ea779d98a Author: Bjorn Helgaas Date: Thu Jan 23 13:04:50 2025 -0600 Merge branch 'pci/err' - Unexport pcie_read_tlp_log() to encourage drivers to use PCI core logging rather than building their own (Ilpo Järvinen) - Move TLP Log handling to its own file (Ilpo Järvinen) - Add #defines for TLP Header/Prefix log sizes (Ilpo Järvinen) - Store number of supported End-End TLP Prefixes always so we can read the correct number of DWORDs from the TLP Prefix Log (Ilpo Järvinen) - Read TLP Prefixes in addition to the Header Log in pcie_read_tlp_log() (Ilpo Järvinen) - Add pcie_print_tlp_log() to consolidate printing of TLP Header and Prefix Log (Ilpo Järvinen) * pci/err: PCI: Add pcie_print_tlp_log() to print TLP Header and Prefix Log PCI: Add TLP Prefix reading to pcie_read_tlp_log() PCI: Store number of supported End-End TLP Prefixes PCI: Use unsigned int i in pcie_read_tlp_log() PCI: Use same names in pcie_read_tlp_log() prototype and definition PCI: Add defines for TLP Header/Prefix log sizes PCI: Move TLP Log handling to its own file PCI: Don't expose pcie_read_tlp_log() outside PCI subsystem commit 5a1d568ad142fb9c7fff0a6bceb9e04d05a04dd9 Merge: 06fd49ef4790 4453f360862e Author: Bjorn Helgaas Date: Thu Jan 23 13:04:50 2025 -0600 Merge branch 'pci/enumeration' - Batch sizing of multiple BARs while memory decoding is disabled instead of disabling/enabling decoding for each BAR individually; this optimizes virtualized environments where toggling decoding enable is expensive (Alex Williamson) * pci/enumeration: PCI: Batch BAR sizing operations commit 06fd49ef47907c8d38a26048f8164c91e99387de Merge: a3eda0e33307 b198499c7d25 Author: Bjorn Helgaas Date: Thu Jan 23 13:04:50 2025 -0600 Merge branch 'pci/dpc' - Quirk the Intel Raptor Lake-P PIO log size to accommodate vendor BIOSes that don't configure it correctly (Takashi Iwai) * pci/dpc: PCI/DPC: Quirk PIO log size for Intel Raptor Lake-P commit a3eda0e333073bfc9a437a21371446726d1a2664 Merge: 35f11c38cd29 dfa2f4d5f9e5 Author: Bjorn Helgaas Date: Thu Jan 23 13:04:49 2025 -0600 Merge branch 'pci/devres' - Update resource request API documentation to encourage callers to supply a driver name when requesting resources (Philipp Stanner) - Export pci_intx_unmanaged() and pcim_intx() (always managed) so callers of pci_intx() (which is sometimes managed) can explicitly choose the one they need (Philipp Stanner) - Convert drivers from pci_intx() to always-managed pcim_intx() or never-managed pci_intx_unmanaged(): amd_sfh, ata (ahci, ata_piix, pata_rdc, sata_sil24, sata_sis, sata_uli, sata_vsc), bnx2x, bna, ntb, qtnfmac, rtsx, tifm_7xx1, vfio, xen-pciback (Philipp Stanner) - Remove pci_intx_unmanaged() since pci_intx() is now always unmanaged and pcim_intx() is always managed (Philipp Stanner) * pci/devres: PCI: Remove devres from pci_intx() net/ethernet: Use never-managed version of pci_intx() HID: amd_sfh: Use always-managed version of pcim_intx() wifi: qtnfmac: use always-managed version of pcim_intx() ata: Use always-managed version of pci_intx() PCI/MSI: Use never-managed version of pci_intx() vfio/pci: Use never-managed version of pci_intx() misc: Use never-managed version of pci_intx() ntb: Use never-managed version of pci_intx() drivers/xen: Use never-managed version of pci_intx() PCI: Export pci_intx_unmanaged() and pcim_intx() PCI: Encourage resource request API users to supply driver name commit 35f11c38cd29a0f64da45595ab2341002e04f55c Merge: 40384c840ea1 1db806ec06b7 Author: Bjorn Helgaas Date: Thu Jan 23 13:04:49 2025 -0600 Merge branch 'pci/aspm' - Save parent L1 PM Substates config so when we restore it along with an endpoint's config, the parent info isn't junk (Jian-Hong Pan) * pci/aspm: PCI/ASPM: Save parent L1SS config in pci_save_aspm_l1ss_state() commit ff74954e4e9374f24b95dd46ef0bb1b5fa0a46f2 Author: Jens Axboe Date: Thu Jan 23 07:34:36 2025 -0700 io_uring/alloc_cache: get rid of _nocache() helper Just allow passing in NULL for the cache, if the type in question doesn't have a cache associated with it. Signed-off-by: Jens Axboe io_uring/io_uring.h | 18 +++++++----------- io_uring/timeout.c | 2 +- io_uring/waitid.c | 2 +- 3 files changed, 9 insertions(+), 13 deletions(-) commit fa3595523d72d13508befd28cf2ca642cafc69f7 Author: Jens Axboe Date: Wed Jan 22 20:00:57 2025 -0700 io_uring: get rid of alloc cache init_once handling init_once is called when an object doesn't come from the cache, and hence needs initial clearing of certain members. While the whole struct could get cleared by memset() in that case, a few of the cache members are large enough that this may cause unnecessary overhead if the caches used aren't large enough to satisfy the workload. For those cases, some churn of kmalloc+kfree is to be expected. Ensure that the 3 users that need clearing put the members they need cleared at the start of the struct, and wrap the rest of the struct in a struct group so the offset is known. While at it, improve the interaction with KASAN such that when/if KASAN writes to members inside the struct that should be retained over caching, it won't trip over itself. For rw and net, the retaining of the iovec over caching is disabled if KASAN is enabled. A helper will free and clear those members in that case. Signed-off-by: Jens Axboe include/linux/io_uring/cmd.h | 2 +- include/linux/io_uring_types.h | 3 ++- io_uring/alloc_cache.h | 43 +++++++++++++++++++++++++++++++++--------- io_uring/futex.c | 4 ++-- io_uring/io_uring.c | 12 +++++++----- io_uring/io_uring.h | 5 ++--- io_uring/net.c | 28 ++++++--------------------- io_uring/net.h | 20 ++++++++++++-------- io_uring/poll.c | 2 +- io_uring/rw.c | 27 ++++++-------------------- io_uring/rw.h | 27 +++++++++++++++----------- io_uring/uring_cmd.c | 11 ++--------- 12 files changed, 91 insertions(+), 93 deletions(-) commit eaf72f7b414f5944585e7dee9c915c7f8f7f6344 Author: Jens Axboe Date: Wed Jan 22 19:50:31 2025 -0700 io_uring/uring_cmd: cleanup struct io_uring_cmd_data layout A few spots in uring_cmd assume that the SQEs copied are always at the start of the structure, and hence mix req->async_data and the struct itself. Clean that up and use the proper indices. Signed-off-by: Jens Axboe io_uring/uring_cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d58d82bd0efd6c8edd452fc2f6c6dd052ec57cb2 Author: Jens Axboe Date: Wed Jan 22 17:29:31 2025 -0700 io_uring/uring_cmd: use cached cmd_op in io_uring_cmd_sock() io_uring_cmd_sock() does a normal read of cmd->sqe->cmd_op, where it really should be using a READ_ONCE() as ->sqe may still be pointing to the original SQE. Since the prep side already does this READ_ONCE() and stores it locally, use that value rather than re-read it. Fixes: 8e9fad0e70b7b ("io_uring: Add io_uring command support for sockets") Link: https://lore.kernel.org/r/20250121-uring-sockcmd-fix-v1-1-add742802a29@google.com Signed-off-by: Jens Axboe io_uring/uring_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee59e3820ca92a9f4307ae23dfc7229dc8b8d400 Author: Daniel Wagner Date: Thu Jan 9 14:30:49 2025 +0100 nvme-fc: do not ignore connectivity loss during connecting When a connectivity loss occurs while nvme_fc_create_assocation is being executed, it's possible that the ctrl ends up stuck in the LIVE state: 1) nvme nvme10: NVME-FC{10}: create association : ... 2) nvme nvme10: NVME-FC{10}: controller connectivity lost. Awaiting Reconnect nvme nvme10: queue_size 128 > ctrl maxcmd 32, reducing to maxcmd 3) nvme nvme10: Could not set queue count (880) nvme nvme10: Failed to configure AEN (cfg 900) 4) nvme nvme10: NVME-FC{10}: controller connect complete 5) nvme nvme10: failed nvme_keep_alive_end_io error=4 A connection attempt starts 1) and the ctrl is in state CONNECTING. Shortly after the LLDD driver detects a connection lost event and calls nvme_fc_ctrl_connectivity_loss 2). Because we are still in CONNECTING state, this event is ignored. nvme_fc_create_association continues to run in parallel and tries to communicate with the controller and these commands will fail. Though these errors are filtered out, e.g in 3) setting the I/O queues numbers fails which leads to an early exit in nvme_fc_create_io_queues. Because the number of IO queues is 0 at this point, there is nothing left in nvme_fc_create_association which could detected the connection drop. Thus the ctrl enters LIVE state 4). Eventually the keep alive handler times out 5) but because nothing is being done, the ctrl stays in LIVE state. There is already the ASSOC_FAILED flag to track connectivity loss event but this bit is set too late in the recovery code path. Move this into the connectivity loss event handler and synchronize it with the state change. This ensures that the ASSOC_FAILED flag is seen by nvme_fc_create_io_queues and it does not enter the LIVE state after a connectivity loss event. If the connectivity loss event happens after we entered the LIVE state the normal error recovery path is executed. Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch drivers/nvme/host/fc.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 294b2b7516fd06a8dd82e4a6118f318ec521e706 Author: Daniel Wagner Date: Thu Jan 9 14:30:48 2025 +0100 nvme: handle connectivity loss in nvme_set_queue_count When the set feature attempts fails with any NVME status code set in nvme_set_queue_count, the function still report success. Though the numbers of queues set to 0. This is done to support controllers in degraded state (the admin queue is still up and running but no IO queues). Though there is an exception. When nvme_set_features reports an host path error, nvme_set_queue_count should propagate this error as the connectivity is lost, which means also the admin queue is not working anymore. Fixes: 9a0be7abb62f ("nvme: refactor set_queue_count") Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch drivers/nvme/host/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit d3d380eded7ee5fc2fc53b3b0e72365ded025c4a Author: Daniel Wagner Date: Thu Jan 9 14:30:47 2025 +0100 nvme-fc: go straight to connecting state when initializing The initial controller initialization mimiks the reconnect loop behavior by switching from NEW to RESETTING and then to CONNECTING. The transition from NEW to CONNECTING is a valid transition, so there is no point entering the RESETTING state. TCP and RDMA also transition directly to CONNECTING state. Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch drivers/nvme/host/fc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9a0bad41dfb2434ee4e674ffe08df544207c6d80 Merge: 6917192378c1 af65d7d041d4 Author: Mark Brown Date: Thu Jan 23 17:49:41 2025 +0000 Add SOF support for new board revisions Merge series from Daniel Baluta : We introduce SOF support for new board revisions for i.MX8MP/QM/QXP which wrt audio they replace wm8960 codec with wm8962. Also add support for cs42888 codec on i.MX8QM/8QXP baseboard. commit ab16714fcb0614c1bcedfa8fa3e5dbf5e032cff2 Author: Tomas Glozar Date: Mon Jan 20 14:56:30 2025 +0100 tools/rtla: Add basic test suite Implement a simple TAP-based test engine in bash and a few basic tests using it, to be used to check for bugs and regressions. A new "check" target is added to the rtla Makefile that runs the test suite using the "prove" command implemented by Test::Harness. The only test format currently supported is running rtla with defined command arguments per test, checking its exit code. In case the exit code is non-zero, the output of rtla is displayed, together with the exit code. The test cases are adopted from rtla tests in the Continuous Kernel Integration (CKI) project [1] with the authors' approval. [1] https://gitlab.com/redhat/centos-stream/tests/kernel/kernel-tests/-/blob/main/rt-tests/us/rtla/ Cc: John Kacur Cc: Luis Goncalves Cc: Chang Yin Cc: Qiao Zhao Link: https://lore.kernel.org/20250120135630.802111-1-tglozar@redhat.com Signed-off-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) tools/tracing/rtla/Makefile | 4 +++- tools/tracing/rtla/tests/engine.sh | 48 +++++++++++++++++++++++++++++++++++++ tools/tracing/rtla/tests/hwnoise.t | 21 ++++++++++++++++ tools/tracing/rtla/tests/osnoise.t | 19 +++++++++++++++ tools/tracing/rtla/tests/timerlat.t | 27 +++++++++++++++++++++ 5 files changed, 118 insertions(+), 1 deletion(-) commit 8259cb14a70680553d5e82d65d1302fe589e9b39 Author: Gabriele Monaco Date: Wed Jan 15 16:15:48 2025 +0100 rv: Reset per-task monitors also for idle tasks RV per-task monitors are implemented through a monitor structure available for each task_struct. This structure is reset every time the monitor is (re-)started, to avoid inconsistencies if the monitor was activated previously. To do so, we reset the monitor on all threads using the macro for_each_process_thread. However, this macro excludes the idle tasks on each CPU. Idle tasks could be considered tasks on their own right and it should be up to the model whether to ignore them or not. Reset monitors also on the idle tasks for each present CPU whenever we reset all per-task monitors. Cc: stable@vger.kernel.org Cc: Juri Lelli Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: John Kacur Link: https://lore.kernel.org/20250115151547.605750-2-gmonaco@redhat.com Fixes: 792575348ff7 ("rv/include: Add deterministic automata monitor definition via C macros") Signed-off-by: Gabriele Monaco Signed-off-by: Steven Rostedt (Google) include/rv/da_monitor.h | 4 ++++ 1 file changed, 4 insertions(+) commit 4453f360862e5d9f0807941d613162c3f7a36559 Author: Alex Williamson Date: Mon Jan 20 11:21:59 2025 -0700 PCI: Batch BAR sizing operations Toggling memory enable is free on bare metal, but potentially expensive in virtualized environments as the device MMIO spaces are added and removed from the VM address space, including DMA mapping of those spaces through the IOMMU where peer-to-peer is supported. Currently memory decode is disabled around sizing each individual BAR, even for SR-IOV BARs while VF Enable is cleared. This can be better optimized for virtual environments by sizing a set of BARs at once, stashing the resulting mask into an array, while only toggling memory enable once. This also naturally improves the SR-IOV path as the caller becomes responsible for any necessary decode disables while sizing BARs, therefore SR-IOV BARs are sized relying only on the VF Enable rather than toggling the PF memory enable in the command register. Link: https://lore.kernel.org/r/20250120182202.1878581-1-alex.williamson@redhat.com Reported-by: Mitchell Augustin Link: https://lore.kernel.org/r/CAHTA-uYp07FgM6T1OZQKqAdSA5JrZo0ReNEyZgQZub4mDRrV5w@mail.gmail.com Signed-off-by: Alex Williamson Signed-off-by: Bjorn Helgaas Tested-by: Mitchell Augustin Reviewed-by: Mitchell Augustin Reviewed-by: Ilpo Järvinen drivers/pci/iov.c | 8 ++++- drivers/pci/pci.h | 4 ++- drivers/pci/probe.c | 93 +++++++++++++++++++++++++++++++++++++++-------------- 3 files changed, 78 insertions(+), 27 deletions(-) commit 37ba6c7f4c69ee775dd3d3f84e45d9f89f1cf183 Merge: db8b2c0e2abc 07c5b277208c Author: Maarten Lankhorst Date: Thu Jan 23 17:58:12 2025 +0100 Merge remote-tracking branch 'drm/drm-next' into drm-misc-next-fixes A regression was caused by commit e4b5ccd392b9 ("drm/v3d: Ensure job pointer is set to NULL after job completion"), but this commit is not yet in next-fixes, fast-forward it. Try #2, first one didn't have v6.13 in it. Signed-off-by: Maarten Lankhorst commit 3c9690f76d66f45f727e00c838faba9a3ef4e295 Merge: d67251079651 3540adcccc71 Author: Arnd Bergmann Date: Thu Jan 23 17:39:13 2025 +0100 Merge tag 'aspeed-6.14-devicetree' of https://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc into soc/dt ASPEED device tree updates for 6.14 - New machines * IBM SPB1 AST2600 BMC machine, a Sapphire Rapids x86 server * Ampre Mt Jefferson AST2600 BMC - Updates to mtmitchell, rainier, blueridge, everest, fuji, system1, harma, catalina and minerva - A big rework of yosemite4 * tag 'aspeed-6.14-devicetree' of https://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc: (55 commits) ARM: dts: aspeed: yosemite4: adjust secondary flash name ARM: dts: aspeed: system1: Use crps PSU driver ARM: dts: aspeed: minerva: add second source RTC ARM: dts: aspeed: minerva: add bmc ready led setting ARM: dts: aspeed: minerva: add i/o expanders on each FCB ARM: dts: aspeed: minerva: add i/o expanders on bus 0 ARM: dts: aspeed: catalina: remove interrupt of GPIOB4 form all IOEXP ARM: dts: aspeed: catalina: revise ltc4287 shunt-resistor value arm: dts: aspeed: Blueridge and Rainer: Add VRM presence GPIOs ARM: dts: aspeed: Blueridge and Fuji: Fix LED node names arm: dts: aspeed: Everest and Fuji: Add VRM presence gpio expander ARM: dts: aspeed: sbp1: IBM sbp1 BMC board dt-bindings: arm: aspeed: add IBM SBP1 board ARM: dts: aspeed: Add device tree for Ampere's Mt. Jefferson BMC dt-bindings: arm: aspeed: add Mt. Jefferson board ARM: dts: aspeed: yosemite4: Add i2c-mux for ADC monitor on Spider Board ARM: dts: aspeed: yosemite4: Revise adc128d818 adc mode on Fan Boards ARM: dts: aspeed: yosemite4: Change the address of Fan IC on fan boards ARM: dts: aspeed: yosemite4: Revise address of i2c-mux for two fan boards ARM: dts: aspeed: yosemite4: correct the compatible string for max31790 ... Link: https://lore.kernel.org/r/CACPK8Xe8yZLXzEQPp=1D2f0TsKA7hBZG=pHHW6U51FMpp_BiRQ@mail.gmail.com Signed-off-by: Arnd Bergmann commit 0bcf3ac14626f1c174c262834656603769579497 Merge: d4c0d167b1f6 3d72d603afa7 Author: Arnd Bergmann Date: Thu Jan 23 17:33:19 2025 +0100 Merge tag 'spacemit-dt-for-6.14-1' of https://github.com/spacemit-com/linux into soc/newsoc RISC-V SpacemiT DT changes for 6.14 This adds support for the SpacemiT K1 SoC and the Banana Pi F3 board using it: - basic device tree support - pinctrl dt node info - update MAINTAINERS info * tag 'spacemit-dt-for-6.14-1' of https://github.com/spacemit-com/linux: riscv: dts: spacemit: move aliases to board dts riscv: dts: spacemit: add pinctrl property to uart0 in BPI-F3 riscv: defconfig: enable SpacemiT SoC riscv: dts: spacemit: add Banana Pi BPI-F3 board device tree riscv: dts: add initial SpacemiT K1 SoC device tree riscv: add SpacemiT SoC family Kconfig support dt-bindings: serial: 8250: Add SpacemiT K1 uart compatible dt-bindings: interrupt-controller: Add SpacemiT K1 PLIC dt-bindings: timer: Add SpacemiT K1 CLINT dt-bindings: riscv: add SpacemiT K1 bindings dt-bindings: riscv: Add SpacemiT X60 compatibles MAINTAINERS: setup support for SpacemiT SoC tree Link: https://wiki.banana-pi.org/Banana_Pi_BPI-F3 Link: https://www.spacemit.com/en/key-stone-k1/ Link: https://lore.kernel.org/r/20250117004911-GYA25021@gentoo Signed-off-by: Arnd Bergmann commit d0d106a2bd21499901299160744e5fe9f4c83ddb Merge: 754916d4a2b9 3f3c2f0cf669 Author: Linus Torvalds Date: Thu Jan 23 08:04:07 2025 -0800 Merge tag 'bpf-next-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Pull bpf updates from Alexei Starovoitov: "A smaller than usual release cycle. The main changes are: - Prepare selftest to run with GCC-BPF backend (Ihor Solodrai) In addition to LLVM-BPF runs the BPF CI now runs GCC-BPF in compile only mode. Half of the tests are failing, since support for btf_decl_tag is still WIP, but this is a great milestone. - Convert various samples/bpf to selftests/bpf/test_progs format (Alexis Lothoré and Bastien Curutchet) - Teach verifier to recognize that array lookup with constant in-range index will always succeed (Daniel Xu) - Cleanup migrate disable scope in BPF maps (Hou Tao) - Fix bpf_timer destroy path in PREEMPT_RT (Hou Tao) - Always use bpf_mem_alloc in bpf_local_storage in PREEMPT_RT (Martin KaFai Lau) - Refactor verifier lock support (Kumar Kartikeya Dwivedi) This is a prerequisite for upcoming resilient spin lock. - Remove excessive 'may_goto +0' instructions in the verifier that LLVM leaves when unrolls the loops (Yonghong Song) - Remove unhelpful bpf_probe_write_user() warning message (Marco Elver) - Add fd_array_cnt attribute for prog_load command (Anton Protopopov) This is a prerequisite for upcoming support for static_branch" * tag 'bpf-next-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (125 commits) selftests/bpf: Add some tests related to 'may_goto 0' insns bpf: Remove 'may_goto 0' instruction in opt_remove_nops() bpf: Allow 'may_goto 0' instruction in verifier selftests/bpf: Add test case for the freeing of bpf_timer bpf: Cancel the running bpf_timer through kworker for PREEMPT_RT bpf: Free element after unlock in __htab_map_lookup_and_delete_elem() bpf: Bail out early in __htab_map_lookup_and_delete_elem() bpf: Free special fields after unlock in htab_lru_map_delete_node() tools: Sync if_xdp.h uapi tooling header libbpf: Work around kernel inconsistently stripping '.llvm.' suffix bpf: selftests: verifier: Add nullness elision tests bpf: verifier: Support eliding map lookup nullness bpf: verifier: Refactor helper access type tracking bpf: tcp: Mark bpf_load_hdr_opt() arg2 as read-write bpf: verifier: Add missing newline on verbose() call selftests/bpf: Add distilled BTF test about marking BTF_IS_EMBEDDED libbpf: Fix incorrect traversal end type ID when marking BTF_IS_EMBEDDED libbpf: Fix return zero when elf_begin failed selftests/bpf: Fix btf leak on new btf alloc failure in btf_distill test veristat: Load struct_ops programs only once ... commit 754916d4a2b970bc1b5104d552b5d16ab54954c0 Merge: 21266b8df522 d48da4d5ed7b Author: Linus Torvalds Date: Thu Jan 23 08:00:16 2025 -0800 Merge tag 'caps-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sergeh/linux Pull capabilities updates from Serge Hallyn: - remove the cap_mmap_file() hook, as it simply returned the default return value and so doesn't need to exist (Paul Moore) - add a trace event for cap_capable() (Jordan Rome) * tag 'caps-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sergeh/linux: security: add trace event for cap_capable capabilities: remove cap_mmap_file() commit 6917192378c1ce17ba31df51c4e0d8b1c97a453b Author: Hans de Goede Date: Thu Jan 23 14:25:07 2025 +0100 ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet 5V The Vexia EDU ATLA 10 tablet comes in 2 different versions with significantly different mainboards. The only outward difference is that the charging barrel on one is marked 5V and the other is marked 9V. The 5V version mostly works with the BYTCR defaults, except that it is missing a CHAN package in its ACPI tables and the default of using SSP0-AIF2 is wrong, instead SSP0-AIF1 must be used. That and its jack detect signal is not inverted as it usually is. Add a DMI quirk for the 5V version to fix sound not working. Signed-off-by: Hans de Goede Link: https://patch.msgid.link/20250123132507.18434-1-hdegoede@redhat.com Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 752b6e3af374460a2de18f0c10bfa06bf844dbe8 Author: Conor Dooley Date: Wed Jan 22 14:42:56 2025 +0000 pwm: microchip-core: fix incorrect comparison with max period In mchp_core_pwm_apply_locked(), if hw_period_steps is equal to its max, an error is reported and .apply fails. The max value is actually a permitted value however, and so this check can fail where multiple channels are enabled. For example, the first channel to be configured requests a period that sets hw_period_steps to the maximum value, and when a second channel is enabled the driver reads hw_period_steps back from the hardware and finds it to be the maximum possible value, triggering the warning on a permitted value. The value to be avoided is 255 (PERIOD_STEPS_MAX + 1), as that will produce undesired behaviour, so test for greater than, rather than equal to. Fixes: 2bf7ecf7b4ff ("pwm: add microchip soft ip corePWM driver") Cc: stable@vger.kernel.org Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20250122-pastor-fancied-0b993da2d2d2@spud Signed-off-by: Uwe Kleine-König drivers/pwm/pwm-microchip-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15a901361ec3fb1c393f91880e1cbf24ec0a88bd Author: Eric Dumazet Date: Tue Jan 21 18:12:41 2025 +0000 ipmr: do not call mr_mfc_uses_dev() for unres entries syzbot found that calling mr_mfc_uses_dev() for unres entries would crash [1], because c->mfc_un.res.minvif / c->mfc_un.res.maxvif alias to "struct sk_buff_head unresolved", which contain two pointers. This code never worked, lets remove it. [1] Unable to handle kernel paging request at virtual address ffff5fff2d536613 KASAN: maybe wild-memory-access in range [0xfffefff96a9b3098-0xfffefff96a9b309f] Modules linked in: CPU: 1 UID: 0 PID: 7321 Comm: syz.0.16 Not tainted 6.13.0-rc7-syzkaller-g1950a0af2d55 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : mr_mfc_uses_dev net/ipv4/ipmr_base.c:290 [inline] pc : mr_table_dump+0x5a4/0x8b0 net/ipv4/ipmr_base.c:334 lr : mr_mfc_uses_dev net/ipv4/ipmr_base.c:289 [inline] lr : mr_table_dump+0x694/0x8b0 net/ipv4/ipmr_base.c:334 Call trace: mr_mfc_uses_dev net/ipv4/ipmr_base.c:290 [inline] (P) mr_table_dump+0x5a4/0x8b0 net/ipv4/ipmr_base.c:334 (P) mr_rtm_dumproute+0x254/0x454 net/ipv4/ipmr_base.c:382 ipmr_rtm_dumproute+0x248/0x4b4 net/ipv4/ipmr.c:2648 rtnl_dump_all+0x2e4/0x4e8 net/core/rtnetlink.c:4327 rtnl_dumpit+0x98/0x1d0 net/core/rtnetlink.c:6791 netlink_dump+0x4f0/0xbc0 net/netlink/af_netlink.c:2317 netlink_recvmsg+0x56c/0xe64 net/netlink/af_netlink.c:1973 sock_recvmsg_nosec net/socket.c:1033 [inline] sock_recvmsg net/socket.c:1055 [inline] sock_read_iter+0x2d8/0x40c net/socket.c:1125 new_sync_read fs/read_write.c:484 [inline] vfs_read+0x740/0x970 fs/read_write.c:565 ksys_read+0x15c/0x26c fs/read_write.c:708 Fixes: cb167893f41e ("net: Plumb support for filtering ipv4 and ipv6 multicast route dumps") Reported-by: syzbot+5cfae50c0e5f2c500013@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/678fe2d1.050a0220.15cac.00b3.GAE@google.com/T/#u Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Link: https://patch.msgid.link/20250121181241.841212-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/ipmr_base.c | 3 --- 1 file changed, 3 deletions(-) commit 965adae5a33a998e2b62ec1b37c5eb21f1875b15 Author: Jakub Kicinski Date: Tue Jan 21 06:34:23 2025 -0800 selftests/net: packetdrill: more xfail changes (and a correction) Recent change to add more cases to XFAIL has a broken regex, the matching needs a real regex not a glob pattern. While at it add the cases Willem pointed out during review. Fixes: 3030e3d57ba8 ("selftests/net: packetdrill: make tcp buf limited timing tests benign") Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250121143423.215261-1-kuba@kernel.org Signed-off-by: Jakub Kicinski tools/testing/selftests/net/packetdrill/ksft_runner.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 59e00e8ca24220acea2d2d9f540fccf64e0f41ea Author: Harshit Mogalapalli Date: Mon Jan 20 16:50:02 2025 -0800 net: mvneta: fix locking in mvneta_cpu_online() When port is stopped, unlock before returning Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()") Signed-off-by: Harshit Mogalapalli Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250121005002.3938236-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/mvneta.c | 1 + 1 file changed, 1 insertion(+) commit f8524ac33cd452aef5384504b3264db6039a455e Author: Koichiro Den Date: Wed Jan 22 13:33:09 2025 +0900 selftests: gpio: gpio-sim: Fix missing chip disablements Since upstream commit 8bd76b3d3f3a ("gpio: sim: lock up configfs that an instantiated device depends on"), rmdir for an active virtual devices been prohibited. Update gpio-sim selftest to align with the change. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202501221006.a1ca5dfa-lkp@intel.com Signed-off-by: Koichiro Den Link: https://lore.kernel.org/r/20250122043309.304621-1-koichiro.den@canonical.com Signed-off-by: Bartosz Golaszewski tools/testing/selftests/gpio/gpio-sim.sh | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) commit 07c5b277208cf9a9e9cf31bf0143977d7f030aa1 Merge: 951a6bf30667 ffd294d346d1 Author: Simona Vetter Date: Thu Jan 23 14:39:49 2025 +0100 Merge v6.13 into drm-next A regression was caused by commit e4b5ccd392b9 ("drm/v3d: Ensure job pointer is set to NULL after job completion"), but this commit is not yet in next-fixes, fast-forward it. Note that this recreates Linus merge in 96c84703f1cf ("Merge tag 'drm-next-2025-01-17' of https://gitlab.freedesktop.org/drm/kernel") because I didn't want to backmerge a random point in the merge window. Signed-off-by: Simona Vetter commit a9ae6fe1c319c4776c2b11e85e15109cd3f04076 Author: Daniel Wagner Date: Thu Jan 23 14:08:29 2025 +0100 blk-mq: create correct map for fallback case The fallback code in blk_mq_map_hw_queues is original from blk_mq_pci_map_queues and was added to handle the case where pci_irq_get_affinity will return NULL for !SMP configuration. blk_mq_map_hw_queues replaces besides blk_mq_pci_map_queues also blk_mq_virtio_map_queues which used to use blk_mq_map_queues for the fallback. It's possible to use blk_mq_map_queues for both cases though. blk_mq_map_queues creates the same map as blk_mq_clear_mq_map for !SMP that is CPU 0 will be mapped to hctx 0. The WARN_ON_ONCE has to be dropped for virtio as the fallback is also taken for certain configuration on default. Though there is still a WARN_ON_ONCE check in lib/group_cpus.c: WARN_ON(nr_present + nr_others < numgrps); which will trigger if the caller tries to create more hardware queues than CPUs. It tests the same as the WARN_ON_ONCE in blk_mq_pci_map_queues did. Fixes: a5665c3d150c ("virtio: blk/scsi: replace blk_mq_virtio_map_queues with blk_mq_map_hw_queues") Reported-by: Steven Rostedt Closes: https://lore.kernel.org/all/20250122093020.6e8a4e5b@gandalf.local.home/ Signed-off-by: Daniel Wagner Link: https://lore.kernel.org/r/20250123-fix-blk_mq_map_hw_queues-v1-1-08dbd01f2c39@kernel.org Signed-off-by: Jens Axboe block/blk-mq-cpumap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 59484c3095ffe0afe22049e85fde11b44fd2b8ff Merge: f4b9d3bf44d5 16c8d7586c19 Author: Rafael J. Wysocki Date: Thu Jan 23 14:29:18 2025 +0100 Merge branch 'cpuidle-teo' Two mistakes were made back at the time when the teo governor was rearranged to avoid calling tick_nohz_get_sleep_length() every time it was looking for a CPU idle state. One of them was to make it always skip calling tick_nohz_get_sleep_length() when idle state 0 was about to be selected and the other one was to make skipping the invocation of tick_nohz_get_sleep_length() in other cases conditional on whether or not idle state 0 was a "polling" state (that is, a special sequence of instructions continuously executed by the CPU in a loop). One problem overlooked at that time was that, even though teo might not need to call tick_nohz_get_sleep_length() in order to select an idle state in some cases, it would still need to know its return value to be able to tell whether or not the subsequent CPU wakeup would be caused by a timer. Without that information, it has to count the wakeup as a non- timer one, so if there were many timer wakeups between idle state 0 and the next enabled idle state, they would all be counted as non-timer wakeups promoting the selection of idle state 0 in the future. However, in the absence of an imminent timer, it might have been better to select the next enabled idle state instead of it. There was an attempt to address this issue by making teo always call tick_nohz_get_sleep_length() when idle state 0 was about to be selected again, but that did not really play well with the systems where idle state 1 was very shallow and it should have been preferred to idle state 0 (which was a "polling" state), which wanted to reduce the governor latency as much as possible in the cases when idle state 0 was selected and clearly calling tick_nohz_get_sleep_length() in those cases did not align with that goal. Another problem is that making the governor behavior conditional on any particular propoerties of idle state 0 is confusing at best and it should not have been done at all. It was based on the assumtion that idle state 0 would be a "polling" one only if idle state 1 would be very close to it, so idle state 0 would only be selected in the cases when idle duration tends to be extemely short, but that assumption turned out to be invalid. There are platforms in which idle state 0 is a "polling" state and the target residency of the next enabled idle state is orders of magnitude larger than the target residency of idle state 0. To address the first problem described above, modify teo to count wakeups occurring after a very small idle duration and use that metric for avoiding tick_nohz_get_sleep_length() invocations. Namely, if idle duration is sufficiently small in the majority of cases taken into account and the idle state about to be selected is shallow enough, it should be safe to skip calling tick_nohz_get_sleep_length() and count the subsequent wakeup as non-timer one. This can also be done if the idle state exit residency constraint value is small enough. Otherwise, it is necessary to call tick_nohz_get_sleep_length() to avoid classifying timer wakeups inaccurately, which may adversely affect future governor decisions. Doing the above also helps to address the second problem because it can be done regardless of the properties of idle state 0. Some preliminary cleanups and preparatory changes are made in addition. * cpuidle-teo: cpuidle: teo: Skip sleep length computation for low latency constraints cpuidle: teo: Replace time_span_ns with a flag cpuidle: teo: Simplify handling of total events count cpuidle: teo: Skip getting the sleep length if wakeups are very frequent cpuidle: teo: Simplify counting events used for tick management cpuidle: teo: Clarify two code comments cpuidle: teo: Drop local variable prev_intercept_idx cpuidle: teo: Combine candidate state index checks against 0 cpuidle: teo: Reorder candidate state index checks cpuidle: teo: Rearrange idle state lookup code commit b13ee668e8280ca5b07f8ce2846b9957a8a10853 Author: Jens Axboe Date: Thu Jan 23 06:18:41 2025 -0700 block: don't revert iter for -EIOCBQUEUED blkdev_read_iter() has a few odd checks, like gating the position and count adjustment on whether or not the result is bigger-than-or-equal to zero (where bigger than makes more sense), and not checking the return value of blkdev_direct_IO() before doing an iov_iter_revert(). The latter can lead to attempting to revert with a negative value, which when passed to iov_iter_revert() as an unsigned value will lead to throwing a WARN_ON() because unroll is bigger than MAX_RW_COUNT. Be sane and don't revert for -EIOCBQUEUED, like what is done in other spots. Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe block/fops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4a32a38cb68f55ff9e100df348ddb3d4b3e50643 Author: Claudiu Beznea Date: Thu Jan 23 14:10:36 2025 +0200 ASoC: da7213: Initialize the mutex Initialize the struct da7213_priv::ctrl_lock mutex. Without it the following stack trace is displayed when rebooting and lockdep is enabled: DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 0 PID: 180 at kernel/locking/mutex.c:564 __mutex_lock+0x254/0x4e4 CPU: 0 UID: 0 PID: 180 Comm: alsactl Not tainted 6.13.0-next-20250123-arm64-renesas-00002-g132083a22d3d #30 Hardware name: Renesas SMARC EVK version 2 based on r9a08g045s33 (DT) pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __mutex_lock+0x254/0x4e4 lr : __mutex_lock+0x254/0x4e4 sp : ffff800082c13c00 x29: ffff800082c13c00 x28: ffff00001002b500 x27: 0000000000000000 x26: 0000000000000000 x25: ffff800080b30db4 x24: 0000000000000002 x23: ffff800082c13c70 x22: 0000ffffc2a68a70 x21: ffff000010348000 x20: 0000000000000000 x19: ffff00000be2e488 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 00000000000003c1 x13: 00000000000003c1 x12: 0000000000000000 x11: 0000000000000011 x10: 0000000000001420 x9 : ffff800082c13a70 x8 : 0000000000000001 x7 : ffff800082c13a50 x6 : ffff800082c139e0 x5 : ffff800082c14000 x4 : ffff800082c13a50 x3 : 0000000000000000 x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff00001002b500 Call trace: __mutex_lock+0x254/0x4e4 (P) mutex_lock_nested+0x20/0x28 da7213_volsw_locked_get+0x34/0x60 snd_ctl_elem_read+0xbc/0x114 snd_ctl_ioctl+0x878/0xa70 __arm64_sys_ioctl+0x94/0xc8 invoke_syscall+0x44/0x104 el0_svc_common.constprop.0+0xb4/0xd4 do_el0_svc+0x18/0x20 el0_svc+0x3c/0xf0 el0t_64_sync_handler+0xc0/0xc4 el0t_64_sync+0x154/0x158 irq event stamp: 7713 hardirqs last enabled at (7713): [] ktime_get_coarse_real_ts64+0xf0/0x10c hardirqs last disabled at (7712): [] ktime_get_coarse_real_ts64+0xb4/0x10c softirqs last enabled at (7550): [] fpsimd_restore_current_state+0x30/0xb8 softirqs last disabled at (7548): [] fpsimd_restore_current_state+0x4/0xb8 ---[ end trace 0000000000000000 ]--- Fixes: 64c3259b5f86 ("ASoC: da7213: Add new kcontrol for tonegen") Cc: stable@vger.kernel.org Signed-off-by: Claudiu Beznea Link: https://patch.msgid.link/20250123121036.70406-1-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown sound/soc/codecs/da7213.c | 2 ++ 1 file changed, 2 insertions(+) commit 87284832bb91259c3ba2a4a1fa5739dc7a45dcb7 Author: Luoxi Li Date: Thu Jan 23 11:39:37 2025 +0800 ASoC: use to_platform_device() instead of container_of() Use the to_platform_device() macro where possible. Signed-off-by: Luoxi Li Link: https://patch.msgid.link/20250123033937.3587880-1-lee.lockhey@gmail.com Signed-off-by: Mark Brown sound/soc/codecs/rt5514.c | 3 +-- sound/soc/sof/imx/imx8.c | 3 +-- sound/soc/sof/imx/imx8m.c | 3 +-- sound/soc/sof/imx/imx8ulp.c | 3 +-- sound/soc/sof/intel/bdw.c | 3 +-- sound/soc/sof/intel/byt.c | 3 +-- sound/soc/sof/mediatek/mt8186/mt8186.c | 2 +- sound/soc/sof/mediatek/mt8195/mt8195.c | 6 +++--- 8 files changed, 10 insertions(+), 16 deletions(-) commit b9a8ea185f3f8024619b2e74b74375493c87df8c Author: Mario Limonciello Date: Wed Jan 22 20:49:13 2025 -0600 ASoC: acp: Support microphone from Lenovo Go S On Lenovo Go S there is a DMIC connected to the ACP but the firmware has no `AcpDmicConnected` ACPI _DSD. Add a DMI entry for all possible Lenovo Go S SKUs to enable DMIC. Cc: nijs1@lenovo.com Cc: pgriffais@valvesoftware.com Cc: mpearson-lenovo@squebb.ca Cc: stable@vger.kernel.org Signed-off-by: Mario Limonciello Link: https://patch.msgid.link/20250123024915.2457115-1-superm1@kernel.org Signed-off-by: Mark Brown sound/soc/amd/yc/acp6x-mach.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit e06c9e3682f58fbeb632b7b866bb4fe66a4a4b42 Author: Geert Uytterhoeven Date: Mon Jan 20 15:35:02 2025 +0100 irqchip/lan966x-oic: Make CONFIG_LAN966X_OIC depend on CONFIG_MCHP_LAN966X_PCI The Microchip LAN966x outband interrupt controller is only present on Microchip LAN966x SoCs, and only used in PCI endpoint mode. Hence add a dependency on MCHP_LAN966X_PCI, to prevent asking the user about this driver when configuring a kernel without Microchip LAN966x PCIe support. Fixes: 3e3a7b35332924c8 ("irqchip: Add support for LAN966x OIC") Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Gleixner Acked-by: Herve Codina Link: https://lore.kernel.org/all/28e8a605e72ee45e27f0d06b2b71366159a9c782.1737383314.git.geert+renesas@glider.be drivers/irqchip/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3fafa6a02be219ddd05d6201911534a34135cb82 Author: Geert Uytterhoeven Date: Mon Jan 20 15:35:01 2025 +0100 dt-bindings: interrupt-controller: microchip,lan966x-oic: Clarify endpoint use Reword the description, to make it clear that the LAN966x Outbound Interrupt Controller is used only in PCI endpoint mode. Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Gleixner Acked-by: Krzysztof Kozlowski Acked-by: Herve Codina Link: https://lore.kernel.org/all/247b1185c93610100f3f8c9e0ab2c1506e53e1f4.1737383314.git.geert+renesas@glider.be .../bindings/interrupt-controller/microchip,lan966x-oic.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 61dc1fd9205bc9d9918aa933a847b08e80b4dc20 Author: Dheeraj Reddy Jonnalagadda Date: Mon Jan 20 14:24:30 2025 +0530 net: fec: implement TSO descriptor cleanup Implement cleanup of descriptors in the TSO error path of fec_enet_txq_submit_tso(). The cleanup - Unmaps DMA buffers for data descriptors skipping TSO header - Clears all buffer descriptors - Handles extended descriptors by clearing cbd_esc when enabled Fixes: 79f339125ea3 ("net: fec: Add software TSO support") Signed-off-by: Dheeraj Reddy Jonnalagadda Reviewed-by: Wei Fang Link: https://patch.msgid.link/20250120085430.99318-1-dheeraj.linuxdev@gmail.com Signed-off-by: Paolo Abeni drivers/net/ethernet/freescale/fec_main.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit 8f9530aeeb4f756bdfa70510b40e5d28ea3c742e Author: Gao Xiang Date: Thu Jan 23 17:01:09 2025 +0800 erofs: refine z_erofs_get_extent_compressedlen() - Set `compressedblks = 1` directly for non-bigpcluster cases. This simplifies the logic a bit since lcluster sizes larger than one block are unsupported and the details remain unclear. - For Z_EROFS_LCLUSTER_TYPE_PLAIN pclusters, avoid assuming `compressedblks = 1` by default. Instead, check if Z_EROFS_ADVISE_BIG_PCLUSTER_2 is set. It basically has no impact to existing valid images, but it's useful to find the gap to prepare for large PLAIN pclusters. Link: https://lore.kernel.org/r/20250123090109.973463-1-hsiangkao@linux.alibaba.com Signed-off-by: Gao Xiang fs/erofs/zmap.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit 64b45dd46e154ee7641d7e0457f3fa266e57179f Author: Dave Young Date: Thu Jan 23 14:36:27 2025 +0800 x86/efi: skip memattr table on kexec boot efi_memattr_init() added a sanity check to avoid firmware caused corruption. The check is based on efi memmap entry numbers, but kexec only takes the runtime related memmap entries thus this caused many false warnings, see below thread for details: https://lore.kernel.org/all/20250108215957.3437660-2-usamaarif642@gmail.com/ Ard suggests to skip the efi memattr table in kexec, this makes sense because those memattr fixups are not critical. Fixes: 8fbe4c49c0cc ("efi/memattr: Ignore table if the size is clearly bogus") Cc: # v6.13+ Reported-by: Breno Leitao Reported-and-tested-by: Usama Arif Suggested-by: Ard Biesheuvel Signed-off-by: Dave Young Signed-off-by: Ard Biesheuvel arch/x86/platform/efi/quirks.c | 5 +++++ 1 file changed, 5 insertions(+) commit a197004cf3c2e6c8cc0695c787a97e62e3229754 Author: Dimitri Fedrau Date: Sat Jan 18 19:43:43 2025 +0100 net: phy: marvell-88q2xxx: Fix temperature measurement with reset-gpios When using temperature measurement on Marvell 88Q2XXX devices and the reset-gpios property is set in DT, the device does a hardware reset when interface is brought down and up again. That means that the content of the register MDIO_MMD_PCS_MV_TEMP_SENSOR2 is reset to default and that leads to permanent deactivation of the temperature measurement, because activation is done in mv88q2xxx_probe. To fix this move activation of temperature measurement to mv88q222x_config_init. Fixes: a557a92e6881 ("net: phy: marvell-88q2xxx: add support for temperature sensor") Reviewed-by: Niklas Söderlund Signed-off-by: Dimitri Fedrau Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250118-marvell-88q2xxx-fix-hwmon-v2-1-402e62ba2dcb@gmail.com Signed-off-by: Paolo Abeni drivers/net/phy/marvell-88q2xxx.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) commit a3a860bc0fd6c07332e4911cf9a238d20de90173 Author: Jarkko Sakkinen Date: Fri Dec 27 17:39:09 2024 +0200 tpm: Change to kvalloc() in eventlog/acpi.c The following failure was reported on HPE ProLiant D320: [ 10.693310][ T1] tpm_tis STM0925:00: 2.0 TPM (device-id 0x3, rev-id 0) [ 10.848132][ T1] ------------[ cut here ]------------ [ 10.853559][ T1] WARNING: CPU: 59 PID: 1 at mm/page_alloc.c:4727 __alloc_pages_noprof+0x2ca/0x330 [ 10.862827][ T1] Modules linked in: [ 10.866671][ T1] CPU: 59 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.0-lp155.2.g52785e2-default #1 openSUSE Tumbleweed (unreleased) 588cd98293a7c9eba9013378d807364c088c9375 [ 10.882741][ T1] Hardware name: HPE ProLiant DL320 Gen12/ProLiant DL320 Gen12, BIOS 1.20 10/28/2024 [ 10.892170][ T1] RIP: 0010:__alloc_pages_noprof+0x2ca/0x330 [ 10.898103][ T1] Code: 24 08 e9 4a fe ff ff e8 34 36 fa ff e9 88 fe ff ff 83 fe 0a 0f 86 b3 fd ff ff 80 3d 01 e7 ce 01 00 75 09 c6 05 f8 e6 ce 01 01 <0f> 0b 45 31 ff e9 e5 fe ff ff f7 c2 00 00 08 00 75 42 89 d9 80 e1 [ 10.917750][ T1] RSP: 0000:ffffb7cf40077980 EFLAGS: 00010246 [ 10.923777][ T1] RAX: 0000000000000000 RBX: 0000000000040cc0 RCX: 0000000000000000 [ 10.931727][ T1] RDX: 0000000000000000 RSI: 000000000000000c RDI: 0000000000040cc0 The above transcript shows that ACPI pointed a 16 MiB buffer for the log events because RSI maps to the 'order' parameter of __alloc_pages_noprof(). Address the bug by moving from devm_kmalloc() to devm_add_action() and kvmalloc() and devm_add_action(). Suggested-by: Ard Biesheuvel Cc: stable@vger.kernel.org # v2.6.16+ Fixes: 55a82ab3181b ("[PATCH] tpm: add bios measurement log") Reported-by: Andy Liang Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219495 Reviewed-by: Ard Biesheuvel Reviewed-by: Stefan Berger Reviewed-by: Takashi Iwai Tested-by: Andy Liang Signed-off-by: Jarkko Sakkinen drivers/char/tpm/eventlog/acpi.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit b049e7abe9001a780d58e78e3833dcceee22f396 Author: Ahmad Fatoum Date: Mon Jan 13 23:19:11 2025 +0100 gpio: mxc: remove dead code after switch to DT-only struct platform_device::id was only set by board code, but since i.MX became a devicetree-only platform, this will always be -1 (PLATFORM_DEVID_NONE). Note: of_alias_get_id() returns a negative number on error and base treats all negative errors the same, so we need not add any additional error handling. Fixes: 0f2c7af45d7e ("gpio: mxc: Convert the driver to DT-only") Signed-off-by: Ahmad Fatoum Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250113-b4-imx-gpio-base-warning-v1-3-0a28731a5cf6@pengutronix.de Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-mxc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5247a8b313cc88f18614ea5d163c4f8dc198ccab Author: Thomas Zimmermann Date: Fri Jan 3 10:55:45 2025 +0100 drm/bochs: Do not put DRM device in PCI remove callback Removing the bochs PCI device should mark the DRM device as unplugged without removing it. Hence clear the respective call to drm_dev_put() from bochs_pci_remove(). Fixes a double unref in devm_drm_dev_init_release(). An example error message is shown below: [ 32.958338] BUG: KASAN: use-after-free in drm_dev_put.part.0+0x1b/0x90 [ 32.958850] Write of size 4 at addr ffff888152134004 by task (udev-worker)/591 [ 32.959574] CPU: 3 UID: 0 PID: 591 Comm: (udev-worker) Tainted: G E 6.13.0-rc2-1-default+ #3417 [ 32.960316] Tainted: [E]=UNSIGNED_MODULE [ 32.960637] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.3-2-gc13ff2cd-prebuilt.qemu.org 04/01/2014 [ 32.961429] Call Trace: [ 32.961433] [ 32.961439] dump_stack_lvl+0x68/0x90 [ 32.961452] print_address_description.constprop.0+0x88/0x330 [ 32.961461] ? preempt_count_sub+0x14/0xc0 [ 32.961473] print_report+0xe2/0x1d0 [ 32.961479] ? srso_alias_return_thunk+0x5/0xfbef5 [ 32.963725] ? __virt_addr_valid+0x143/0x320 [ 32.964077] ? srso_alias_return_thunk+0x5/0xfbef5 [ 32.964463] ? drm_dev_put.part.0+0x1b/0x90 [ 32.964817] kasan_report+0xce/0x1a0 [ 32.965123] ? drm_dev_put.part.0+0x1b/0x90 [ 32.965474] kasan_check_range+0xff/0x1c0 [ 32.965806] drm_dev_put.part.0+0x1b/0x90 [ 32.966138] release_nodes+0x84/0xc0 [ 32.966447] devres_release_all+0xd2/0x110 [ 32.966788] ? __pfx_devres_release_all+0x10/0x10 [ 32.967177] ? preempt_count_sub+0x14/0xc0 [ 32.967523] device_unbind_cleanup+0x16/0xc0 [ 32.967886] really_probe+0x1b7/0x570 [ 32.968207] __driver_probe_device+0xca/0x1b0 [ 32.968568] driver_probe_device+0x4a/0xf0 [ 32.968907] __driver_attach+0x10b/0x290 [ 32.969239] ? __pfx___driver_attach+0x10/0x10 [ 32.969598] bus_for_each_dev+0xc0/0x110 [ 32.969923] ? __pfx_bus_for_each_dev+0x10/0x10 [ 32.970291] ? bus_add_driver+0x17a/0x2b0 [ 32.970622] ? srso_alias_return_thunk+0x5/0xfbef5 [ 32.971011] bus_add_driver+0x19a/0x2b0 [ 32.971335] driver_register+0xd8/0x160 [ 32.971671] ? __pfx_bochs_pci_driver_init+0x10/0x10 [bochs] [ 32.972130] do_one_initcall+0xba/0x390 [...] After unplugging the DRM device, clients will close their references. Closing the final reference will also release the DRM device. Reported-by: Dr. David Alan Gilbert Closes: https://lore.kernel.org/lkml/Z18dbfDAiFadsSdg@gallifrey/ Fixes: 04826f588682 ("drm/bochs: Allocate DRM device in struct bochs_device") Cc: Thomas Zimmermann Cc: Gerd Hoffmann Cc: virtualization@lists.linux.dev Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250103095615.231162-1-tzimmermann@suse.de drivers/gpu/drm/tiny/bochs.c | 1 - 1 file changed, 1 deletion(-) commit 21266b8df5224c4f677acf9f353eecc9094731f0 Merge: 5ab889facc68 95b3cdafd7cb Author: Linus Torvalds Date: Wed Jan 22 20:34:42 2025 -0800 Merge tag 'AT_EXECVE_CHECK-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull AT_EXECVE_CHECK from Kees Cook: - Implement AT_EXECVE_CHECK flag to execveat(2) (Mickaël Salaün) - Implement EXEC_RESTRICT_FILE and EXEC_DENY_INTERACTIVE securebits (Mickaël Salaün) - Add selftests and samples for AT_EXECVE_CHECK (Mickaël Salaün) * tag 'AT_EXECVE_CHECK-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: ima: instantiate the bprm_creds_for_exec() hook samples/check-exec: Add an enlighten "inc" interpreter and 28 tests selftests: ktap_helpers: Fix uninitialized variable samples/check-exec: Add set-exec selftests/landlock: Add tests for execveat + AT_EXECVE_CHECK selftests/exec: Add 32 tests for AT_EXECVE_CHECK and exec securebits security: Add EXEC_RESTRICT_FILE and EXEC_DENY_INTERACTIVE securebits exec: Add a new AT_EXECVE_CHECK flag to execveat(2) commit 5ab889facc6893e4a973d6ab5432550ef4f6ff09 Merge: ad2aec7c963e a9a5e0bdc5a7 Author: Linus Torvalds Date: Wed Jan 22 20:29:53 2025 -0800 Merge tag 'hardening-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardening updates from Kees Cook: - stackleak: Use str_enabled_disabled() helper (Thorsten Blum) - Document GCC INIT_STACK_ALL_PATTERN behavior (Geert Uytterhoeven) - Add task_prctl_unknown tracepoint (Marco Elver) * tag 'hardening-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: hardening: Document INIT_STACK_ALL_PATTERN behavior with GCC stackleak: Use str_enabled_disabled() helper in stack_erasing_sysctl() tracing: Remove pid in task_rename tracing output tracing: Add task_prctl_unknown tracepoint commit ad2aec7c963e8ce32c2f2106276ab6ba549ff355 Merge: de5817bbfb56 08ae2487b202 Author: Linus Torvalds Date: Wed Jan 22 20:25:00 2025 -0800 Merge tag 'tomoyo-pr-20250123' of git://git.code.sf.net/p/tomoyo/tomoyo Pull tomoyo updates from Tetsuo Handa: "Small changes to improve usability" * tag 'tomoyo-pr-20250123' of git://git.code.sf.net/p/tomoyo/tomoyo: tomoyo: automatically use patterns for several situations in learning mode tomoyo: use realpath if symlink's pathname refers to procfs tomoyo: don't emit warning in tomoyo_write_control() commit de5817bbfb569f22406970f81360ac3f694ba6e8 Merge: 37b33c68b000 2a794ee61361 Author: Linus Torvalds Date: Wed Jan 22 20:20:55 2025 -0800 Merge tag 'landlock-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux Pull landlock updates from Mickaël Salaün: "This mostly factors out some Landlock code and prepares for upcoming audit support. Because files with invalid modes might be visible after filesystem corruption, Landlock now handles those weird files too. A few sample and test issues are also fixed" * tag 'landlock-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: selftests/landlock: Add layout1.umount_sandboxer tests selftests/landlock: Add wrappers.h selftests/landlock: Fix error message landlock: Optimize file path walks and prepare for audit support selftests/landlock: Add test to check partial access in a mount tree landlock: Align partial refer access checks with final ones landlock: Simplify initially denied access rights landlock: Move access types landlock: Factor out check_access_path() selftests/landlock: Fix build with non-default pthread linking landlock: Use scoped guards for ruleset in landlock_add_rule() landlock: Use scoped guards for ruleset landlock: Constify get_mode_access() landlock: Handle weird files samples/landlock: Fix possible NULL dereference in parse_path() selftests/landlock: Remove unused macros in ptrace_test.c commit 92e5995773774a3e70257e9c95ea03518268bea5 Author: Jian Shen Date: Sat Jan 18 17:47:41 2025 +0800 net: hns3: fix oops when unload drivers paralleling When unload hclge driver, it tries to disable sriov first for each ae_dev node from hnae3_ae_dev_list. If user unloads hns3 driver at the time, because it removes all the ae_dev nodes, and it may cause oops. But we can't simply use hnae3_common_lock for this. Because in the process flow of pci_disable_sriov(), it will trigger the remove flow of VF, which will also take hnae3_common_lock. To fixes it, introduce a new mutex to protect the unload process. Fixes: 0dd8a25f355b ("net: hns3: disable sriov before unload hclge layer") Signed-off-by: Jian Shen Signed-off-by: Jijie Shao Link: https://patch.msgid.link/20250118094741.3046663-1-shaojijie@huawei.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/hisilicon/hns3/hnae3.c | 15 +++++++++++++++ drivers/net/ethernet/hisilicon/hns3/hnae3.h | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 ++ 5 files changed, 23 insertions(+) commit 37b33c68b00089a574ebd0a856a5d554eb3001b7 Merge: 9cb2bf599b2c 72914faebaab Author: Linus Torvalds Date: Wed Jan 22 19:55:08 2025 -0800 Merge tag 'crc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux Pull CRC updates from Eric Biggers: - Reorganize the architecture-optimized CRC32 and CRC-T10DIF code to be directly accessible via the library API, instead of requiring the crypto API. This is much simpler and more efficient. - Convert some users such as ext4 to use the CRC32 library API instead of the crypto API. More conversions like this will come later. - Add a KUnit test that tests and benchmarks multiple CRC variants. Remove older, less-comprehensive tests that are made redundant by this. - Add an entry to MAINTAINERS for the kernel's CRC library code. I'm volunteering to maintain it. I have additional cleanups and optimizations planned for future cycles. * tag 'crc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux: (31 commits) MAINTAINERS: add entry for CRC library powerpc/crc: delete obsolete crc-vpmsum_test.c lib/crc32test: delete obsolete crc32test.c lib/crc16_kunit: delete obsolete crc16_kunit.c lib/crc_kunit.c: add KUnit test suite for CRC library functions powerpc/crc-t10dif: expose CRC-T10DIF function through lib arm64/crc-t10dif: expose CRC-T10DIF function through lib arm/crc-t10dif: expose CRC-T10DIF function through lib x86/crc-t10dif: expose CRC-T10DIF function through lib crypto: crct10dif - expose arch-optimized lib function lib/crc-t10dif: add support for arch overrides lib/crc-t10dif: stop wrapping the crypto API scsi: target: iscsi: switch to using the crc32c library f2fs: switch to using the crc32 library jbd2: switch to using the crc32c library ext4: switch to using the crc32c library lib/crc32: make crc32c() go directly to lib bcachefs: Explicitly select CRYPTO from BCACHEFS_FS x86/crc32: expose CRC32 functions through lib x86/crc32: update prototype for crc32_pclmul_le_16() ... commit ba1af257a0575bfa86e69eaa85bddcc6cf346df3 Author: Yijie Yang Date: Mon Jan 20 15:08:28 2025 +0800 dt-bindings: net: qcom,ethqos: Correct fallback compatible for qcom,qcs615-ethqos The qcs615-ride utilizes the same EMAC as the qcs404, rather than the sm8150. The current incorrect fallback could result in packet loss. The Ethernet on qcs615-ride is currently not utilized by anyone. Therefore, there is no need to worry about any ABI impact. Fixes: 32535b9410b8 ("dt-bindings: net: qcom,ethqos: add description for qcs615") Signed-off-by: Yijie Yang Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250120-schema_qcs615-v4-1-d9d122f89e64@quicinc.com Signed-off-by: Jakub Kicinski Documentation/devicetree/bindings/net/qcom,ethqos.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6bb194d036c6e1b329dcdff459338cdd9a54802a Author: Paul Fertser Date: Thu Jan 16 18:29:00 2025 +0300 net/ncsi: wait for the last response to Deselect Package before configuring channel The NCSI state machine as it's currently implemented assumes that transition to the next logical state is performed either explicitly by calling `schedule_work(&ndp->work)` to re-queue itself or implicitly after processing the predefined (ndp->pending_req_num) number of replies. Thus to avoid the configuration FSM from advancing prematurely and getting out of sync with the process it's essential to not skip waiting for a reply. This patch makes the code wait for reception of the Deselect Package response for the last package probed before proceeding to channel configuration. Thanks go to Potin Lai and Cosmo Chou for the initial investigation and testing. Fixes: 8e13f70be05e ("net/ncsi: Probe single packages to avoid conflict") Cc: stable@vger.kernel.org Signed-off-by: Paul Fertser Link: https://patch.msgid.link/20250116152900.8656-1-fercerpav@gmail.com Signed-off-by: Jakub Kicinski net/ncsi/ncsi-manage.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 9cb2bf599b2ce832127fa61fb430cc00a724d371 Merge: 7004a2e46d16 e8d9fab39d1f Author: Linus Torvalds Date: Wed Jan 22 19:47:17 2025 -0800 Merge tag 'keys-next-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull keys updates from Jarkko Sakkinen. Avoid using stack addresses for sg lists. And a cleanup. * tag 'keys-next-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: KEYS: trusted: dcp: fix improper sg use with CONFIG_VMAP_STACK=y keys: drop shadowing dead prototype commit d31a49d37cb132b31cc6683eef2122f8609d6229 Author: Christian Marangi Date: Mon Jan 20 16:41:40 2025 +0100 net: airoha: Fix wrong GDM4 register definition Fix wrong GDM4 register definition, in Airoha SDK GDM4 is defined at offset 0x2400 but this doesn't make sense as it does conflict with the CDM4 that is in the same location. Following the pattern where each GDM base is at the FWD_CFG, currently GDM4 base offset is set to 0x2500. This is correct but REG_GDM4_FWD_CFG and REG_GDM4_SRC_PORT_SET are still using the SDK reference with the 0x2400 offset. Fix these 2 define by subtracting 0x100 to each register to reflect the real address location. Fixes: 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC") Signed-off-by: Christian Marangi Acked-by: Lorenzo Bianconi Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20250120154148.13424-1-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/airoha_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 110b43ef05342d5a11284cc8b21582b698b4ef1c Author: Dan Carpenter Date: Fri Jan 17 12:38:41 2025 +0300 NFC: nci: Add bounds checking in nci_hci_create_pipe() The "pipe" variable is a u8 which comes from the network. If it's more than 127, then it results in memory corruption in the caller, nci_hci_connect_gate(). Cc: stable@vger.kernel.org Fixes: a1b0b9415817 ("NFC: nci: Create pipe on specific gate in nci_hci_connect_gate") Signed-off-by: Dan Carpenter Reviewed-by: Simon Horman Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/bcf5453b-7204-4297-9c20-4d8c7dacf586@stanley.mountain Signed-off-by: Jakub Kicinski net/nfc/nci/hci.c | 2 ++ 1 file changed, 2 insertions(+) commit d62b04fca4340a0d468d7853bd66e511935a18cb Author: Jamal Hadi Salim Date: Sat Jan 11 09:57:39 2025 -0500 net: sched: fix ets qdisc OOB Indexing Haowei Yan found that ets_class_from_arg() can index an Out-Of-Bound class in ets_class_from_arg() when passed clid of 0. The overflow may cause local privilege escalation. [ 18.852298] ------------[ cut here ]------------ [ 18.853271] UBSAN: array-index-out-of-bounds in net/sched/sch_ets.c:93:20 [ 18.853743] index 18446744073709551615 is out of range for type 'ets_class [16]' [ 18.854254] CPU: 0 UID: 0 PID: 1275 Comm: poc Not tainted 6.12.6-dirty #17 [ 18.854821] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 [ 18.856532] Call Trace: [ 18.857441] [ 18.858227] dump_stack_lvl+0xc2/0xf0 [ 18.859607] dump_stack+0x10/0x20 [ 18.860908] __ubsan_handle_out_of_bounds+0xa7/0xf0 [ 18.864022] ets_class_change+0x3d6/0x3f0 [ 18.864322] tc_ctl_tclass+0x251/0x910 [ 18.864587] ? lock_acquire+0x5e/0x140 [ 18.865113] ? __mutex_lock+0x9c/0xe70 [ 18.866009] ? __mutex_lock+0xa34/0xe70 [ 18.866401] rtnetlink_rcv_msg+0x170/0x6f0 [ 18.866806] ? __lock_acquire+0x578/0xc10 [ 18.867184] ? __pfx_rtnetlink_rcv_msg+0x10/0x10 [ 18.867503] netlink_rcv_skb+0x59/0x110 [ 18.867776] rtnetlink_rcv+0x15/0x30 [ 18.868159] netlink_unicast+0x1c3/0x2b0 [ 18.868440] netlink_sendmsg+0x239/0x4b0 [ 18.868721] ____sys_sendmsg+0x3e2/0x410 [ 18.869012] ___sys_sendmsg+0x88/0xe0 [ 18.869276] ? rseq_ip_fixup+0x198/0x260 [ 18.869563] ? rseq_update_cpu_node_id+0x10a/0x190 [ 18.869900] ? trace_hardirqs_off+0x5a/0xd0 [ 18.870196] ? syscall_exit_to_user_mode+0xcc/0x220 [ 18.870547] ? do_syscall_64+0x93/0x150 [ 18.870821] ? __memcg_slab_free_hook+0x69/0x290 [ 18.871157] __sys_sendmsg+0x69/0xd0 [ 18.871416] __x64_sys_sendmsg+0x1d/0x30 [ 18.871699] x64_sys_call+0x9e2/0x2670 [ 18.871979] do_syscall_64+0x87/0x150 [ 18.873280] ? do_syscall_64+0x93/0x150 [ 18.874742] ? lock_release+0x7b/0x160 [ 18.876157] ? do_user_addr_fault+0x5ce/0x8f0 [ 18.877833] ? irqentry_exit_to_user_mode+0xc2/0x210 [ 18.879608] ? irqentry_exit+0x77/0xb0 [ 18.879808] ? clear_bhb_loop+0x15/0x70 [ 18.880023] ? clear_bhb_loop+0x15/0x70 [ 18.880223] ? clear_bhb_loop+0x15/0x70 [ 18.880426] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 18.880683] RIP: 0033:0x44a957 [ 18.880851] Code: ff ff e8 fc 00 00 00 66 2e 0f 1f 84 00 00 00 00 00 66 90 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 8974 24 10 [ 18.881766] RSP: 002b:00007ffcdd00fad8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 18.882149] RAX: ffffffffffffffda RBX: 00007ffcdd010db8 RCX: 000000000044a957 [ 18.882507] RDX: 0000000000000000 RSI: 00007ffcdd00fb70 RDI: 0000000000000003 [ 18.885037] RBP: 00007ffcdd010bc0 R08: 000000000703c770 R09: 000000000703c7c0 [ 18.887203] R10: 0000000000000080 R11: 0000000000000246 R12: 0000000000000001 [ 18.888026] R13: 00007ffcdd010da8 R14: 00000000004ca7d0 R15: 0000000000000001 [ 18.888395] [ 18.888610] ---[ end trace ]--- Fixes: dcc68b4d8084 ("net: sch_ets: Add a new Qdisc") Reported-by: Haowei Yan Suggested-by: Haowei Yan Signed-off-by: Jamal Hadi Salim Reviewed-by: Eric Dumazet Reviewed-by: Petr Machata Link: https://patch.msgid.link/20250111145740.74755-1-jhs@mojatatu.com Signed-off-by: Jakub Kicinski net/sched/sch_ets.c | 2 ++ 1 file changed, 2 insertions(+) commit 3681c74d342db75b0d641ba60de27bf73e16e66b Author: Paulo Alcantara Date: Tue Jan 21 15:25:36 2025 -0300 smb: client: handle lack of EA support in smb2_query_path_info() If the server doesn't support both EAs and reparse point in a file, the SMB2_QUERY_INFO request will fail with either STATUS_NO_EAS_ON_FILE or STATUS_EAS_NOT_SUPPORT in the compound chain, so ignore it as long as reparse point isn't IO_REPARSE_TAG_LX_(CHR|BLK), which would require the EAs to know about major/minor numbers. Reported-by: Pali Rohár Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/smb2inode.c | 92 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 69 insertions(+), 23 deletions(-) commit 056e91cbc9804f15704b5bc2f02f91c23b1abea1 Author: Paulo Alcantara Date: Fri Jan 17 17:52:15 2025 -0300 smb: client: don't check for @leaf_fullpath in match_server() The matching of DFS connections is already handled by @dfs_conn, so remove @leaf_fullpath matching altogether. Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/connect.c | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) commit 0a9b00e5e5c5fc3c77cbfd01e6ffbe77fc7fe74a Author: Paulo Alcantara Date: Fri Jan 17 17:38:56 2025 -0300 smb: client: get rid of TCP_Server_Info::refpath_lock TCP_Server_Info::leaf_fullpath is allocated in cifs_get_tcp_session() and never changed afterwards, so there is no need to serialize its access. Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/cifsglob.h | 13 ++----------- fs/smb/client/connect.c | 20 ++++---------------- fs/smb/client/dfs_cache.c | 4 +--- 3 files changed, 7 insertions(+), 30 deletions(-) commit 69a62e03f896a7382671877b6ad6aab87c53e9c3 Author: Jens Axboe Date: Wed Jan 22 17:03:28 2025 -0700 io_uring/msg_ring: don't leave potentially dangling ->tctx pointer For remote posting of messages, req->tctx is assigned even though it is never used. Rather than leave a dangling pointer, just clear it to NULL and use the previous check for a valid submitter_task to gate on whether or not the request should be terminated. Reported-by: Jann Horn Fixes: b6f58a3f4aa8 ("io_uring: move struct io_kiocb from task_struct to io_uring_task") Signed-off-by: Jens Axboe io_uring/msg_ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit edf3c0860060f8171d60dc5a6c28cb6702559f32 Author: Zhiguo Niu Date: Tue Jan 21 10:15:41 2025 +0800 f2fs: fix to avoid changing 'check only' behaior of recovery The following two 'check only recovery' processes are very dependent on the return value of f2fs_recover_fsync_data, especially when the return value is greater than 0. 1. when device has readonly mode, shown as commit 23738e74472f ("f2fs: fix to restrict mount condition on readonly block device") 2. mount optiont NORECOVERY or DISABLE_ROLL_FORWARD is set, shown as commit 6781eabba1bd ("f2fs: give -EINVAL for norecovery and rw mount") However, commit c426d99127b1 ("f2fs: Check write pointer consistency of open zones") will change the return value unexpectedly, thereby changing the caller's behavior This patch let the f2fs_recover_fsync_data return correct value,and not do f2fs_check_and_fix_write_pointer when the device is read-only. Fixes: c426d99127b1 ("f2fs: Check write pointer consistency of open zones") Signed-off-by: Zhiguo Niu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/recovery.c | 4 +--- fs/f2fs/segment.c | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) commit 6d4008dc4a8e0949afe1d9ff27c93fe68672ea06 Author: Yi Sun Date: Mon Jan 13 09:47:02 2025 +0800 f2fs: Clean up the loop outside of f2fs_invalidate_blocks() Now f2fs_invalidate_blocks() supports a continuous range of addresses, so the for loop can be omitted. Signed-off-by: Yi Sun Signed-off-by: Zhiguo Niu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f6370a360d46e4cf10f5dde3c857747994fe1fd5 Author: Chao Yu Date: Mon Jan 20 19:19:41 2025 +0800 f2fs: procfs: show mtime in segment_bits Show mtime in segment_bits for debug. cat /proc/fs//f2fs/loop0/segment_bits format: segment_type|valid_blocks|bitmaps|mtime segment_type(0:HD, 1:WD, 2:CD, 3:HN, 4:WN, 5:CN) 0 3|1 | 04 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| ffffffffffffffff 1 4|3 | 00 d0 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| ffffffffffffffff 2 5|0 | 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| ffffffffffffffff 3 0|1 | 40 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| ffffffffffffffff Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 207764e5d6f19de483d7f0e43243d1a1fce4fb32 Author: Chao Yu Date: Mon Jan 20 19:19:40 2025 +0800 f2fs: fix to avoid return invalid mtime from f2fs_get_section_mtime() syzbot reported a f2fs bug as below: ------------[ cut here ]------------ kernel BUG at fs/f2fs/gc.c:373! CPU: 0 UID: 0 PID: 5316 Comm: syz.0.0 Not tainted 6.13.0-rc3-syzkaller-00044-gaef25be35d23 #0 RIP: 0010:get_cb_cost fs/f2fs/gc.c:373 [inline] RIP: 0010:get_gc_cost fs/f2fs/gc.c:406 [inline] RIP: 0010:f2fs_get_victim+0x68b1/0x6aa0 fs/f2fs/gc.c:912 Call Trace: __get_victim fs/f2fs/gc.c:1707 [inline] f2fs_gc+0xc89/0x2f60 fs/f2fs/gc.c:1915 f2fs_ioc_gc fs/f2fs/file.c:2624 [inline] __f2fs_ioctl+0x4cc9/0xb8b0 fs/f2fs/file.c:4482 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 w/ below testcase, it can reproduce directly: - dd if=/dev/zero of=/tmp/file bs=1M count=64 - mkfs.f2fs /tmp/file - mount -t f2fs -o loop,mode=fragment:block /tmp/file /mnt/f2fs - echo 0 > /sys/fs/f2fs/loop0/min_ssr_sections - dd if=/dev/zero of=/mnt/f2fs/file bs=1M count=5 - umount /mnt/f2fs - for((i=4096;i<16384;i+=512)) do inject.f2fs --sit 0 --blk $i --mb mtime --val -1 /tmp/file; done - mount -o loop /tmp/file /mnt/f2fs - f2fs_io gc 0 /mnt/f2fs/file static unsigned int get_cb_cost() { ... mtime = f2fs_get_section_mtime(sbi, segno); f2fs_bug_on(sbi, mtime == INVALID_MTIME); ... } The root cause is: mtime in f2fs_sit_entry can be fuzzed to INVALID_MTIME, then it will trigger BUG_ON in get_cb_cost() during GC. Let's change behavior of f2fs_get_section_mtime() as below for fix: - return INVALID_MTIME only if total valid blocks is zero. - return INVALID_MTIME - 1 if average mtime calculated is INVALID_MTIME. Fixes: b19ee7272208 ("f2fs: introduce f2fs_get_section_mtime") Reported-by: syzbot+b9972806adbe20a910eb@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-f2fs-devel/6768c82e.050a0220.226966.0035.GAE@google.com Cc: liuderong Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit a68905d48a4efe5ca45bb4ceab5cd7d6ac47c300 Author: Nathan Chancellor Date: Mon Jan 20 05:59:44 2025 -0700 f2fs: Fix format specifier in sanity_check_inode() When building for 32-bit platforms, for which 'size_t' is 'unsigned int', there is a warning due to an incorrect format specifier: fs/f2fs/inode.c:320:6: error: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Werror,-Wformat] 318 | f2fs_warn(sbi, "%s: inode (ino=%lx) has corrupted i_inline_xattr_size: %d, min: %lu, max: %lu", | ~~~ | %u 319 | __func__, inode->i_ino, fi->i_inline_xattr_size, 320 | MIN_INLINE_XATTR_SIZE, MAX_INLINE_XATTR_SIZE); | ^~~~~~~~~~~~~~~~~~~~~ fs/f2fs/f2fs.h:1855:46: note: expanded from macro 'f2fs_warn' 1855 | f2fs_printk(sbi, false, KERN_WARNING fmt, ##__VA_ARGS__) | ~~~ ^~~~~~~~~~~ fs/f2fs/xattr.h:86:31: note: expanded from macro 'MIN_INLINE_XATTR_SIZE' 86 | #define MIN_INLINE_XATTR_SIZE (sizeof(struct f2fs_xattr_header) / sizeof(__le32)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Use the format specifier for 'size_t', '%zu', to resolve the warning. Fixes: 5c1768b67250 ("f2fs: fix to do sanity check correctly on i_inline_xattr_size") Signed-off-by: Nathan Chancellor Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f520fab580c9179bacc432f3a3bf1eada73fdfcc Author: Dmitry Baryshkov Date: Fri Jan 17 08:09:09 2025 +0100 ARM: 9440/1: cacheinfo fix format field mask Fix C&P error left unnoticed during the reviews. The FORMAT field spans over bits 29-31, not 24-27 of the CTR register. Closes: https://lore.kernel.org/linux-arm-msm/01515ea0-c6f0-479f-9da5-764d9ee79ed6@samsung.com/ Fixes: a9ff94477836 ("ARM: 9433/2: implement cacheinfo support") Reported-by: Marek Szyprowski Reviewed-by: Linus Walleij Signed-off-by: Dmitry Baryshkov Signed-off-by: Russell King (Oracle) arch/arm/kernel/cacheinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f56971841a178e99c502f4150fa28b9d699ed31 Author: Dai Ngo Date: Wed Jan 8 12:48:12 2025 -0800 SUNRPC: do not retry on EKEYEXPIRED when user TGT ticket expired When a user TGT ticket expired, gssd returns EKEYEXPIRED to the RPC layer for the upcall to create the security context. The RPC layer then retries the upcall twice before returning the EKEYEXPIRED to the NFS layer. This results in three separate TCP connections to the NFS server being created by gssd for each RPC request. These connections are not used and left in TIME_WAIT state. Note that for RPC call that uses machine credential, gssd automatically renews the ticket. But for a regular user the ticket needs to be renewed by the user before access to the krb5 share is allowed. This patch removes the retries by RPC on EKEYEXPIRED so that these unused TCP connections are not created. Reproducer: $ kinit -l 1m $ sleep 65 $ cd /mnt/krb5share $ netstat -na |grep TIME_WAIT Signed-off-by: Dai Ngo Signed-off-by: Anna Schumaker net/sunrpc/clnt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 918b8e3b3ffda3602a0179b7b9b904f89561c03e Author: Jeff Layton Date: Wed Jan 22 10:18:12 2025 -0500 sunrpc: add netns inum and srcaddr to debugfs rpc_xprt info The output format should provide a value that matches the one in the /proc//ns/net symlink. This makes it simpler to match the rpc_xprt and rpc_clnt to a particular container. Also, when the xprt defines the get_srcaddr operation, use that to display the source address as well. Signed-off-by: Jeff Layton Signed-off-by: Anna Schumaker net/sunrpc/debugfs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 8c8ecc98f5c65947b0070a24bac11e12e47cc65d Author: Sven Eckelmann Date: Mon Jan 20 00:06:11 2025 +0100 batman-adv: Drop unmanaged ELP metric worker The ELP worker needs to calculate new metric values for all neighbors "reachable" over an interface. Some of the used metric sources require locks which might need to sleep. This sleep is incompatible with the RCU list iterator used for the recorded neighbors. The initial approach to work around of this problem was to queue another work item per neighbor and then run this in a new context. Even when this solved the RCU vs might_sleep() conflict, it has a major problems: Nothing was stopping the work item in case it is not needed anymore - for example because one of the related interfaces was removed or the batman-adv module was unloaded - resulting in potential invalid memory accesses. Directly canceling the metric worker also has various problems: * cancel_work_sync for a to-be-deactivated interface is called with rtnl_lock held. But the code in the ELP metric worker also tries to use rtnl_lock() - which will never return in this case. This also means that cancel_work_sync would never return because it is waiting for the worker to finish. * iterating over the neighbor list for the to-be-deactivated interface is currently done using the RCU specific methods. Which means that it is possible to miss items when iterating over it without the associated spinlock - a behaviour which is acceptable for a periodic metric check but not for a cleanup routine (which must "stop" all still running workers) The better approch is to get rid of the per interface neighbor metric worker and handle everything in the interface worker. The original problems are solved by: * creating a list of neighbors which require new metric information inside the RCU protected context, gathering the metric according to the new list outside the RCU protected context * only use rcu_trylock inside metric gathering code to avoid a deadlock when the cancel_delayed_work_sync is called in the interface removal code (which is called with the rtnl_lock held) Cc: stable@vger.kernel.org Fixes: c833484e5f38 ("batman-adv: ELP - compute the metric based on the estimated throughput") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bat_v.c | 2 -- net/batman-adv/bat_v_elp.c | 71 +++++++++++++++++++++++++++++++--------------- net/batman-adv/bat_v_elp.h | 2 -- net/batman-adv/types.h | 3 -- 4 files changed, 48 insertions(+), 30 deletions(-) commit e7e34ffc976aaae4f465b7898303241b81ceefc3 Author: Sven Eckelmann Date: Mon Jan 20 20:35:28 2025 +0100 batman-adv: Ignore neighbor throughput metrics in error case If a temporary error happened in the evaluation of the neighbor throughput information, then the invalid throughput result should not be stored in the throughtput EWMA. Cc: stable@vger.kernel.org Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bat_v_elp.c | 50 +++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 16 deletions(-) commit 7004a2e46d1693848370809aa3d9c340a209edbb Merge: e8f17cb6f5ab 24728b70b036 Author: Linus Torvalds Date: Wed Jan 22 12:36:16 2025 -0800 Merge tag 'linux_kselftest-nolibc-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull nolibc updates from Shuah Khan: - add support for waitid() - use waitid() over waitpid() - use a pipe in vfprintf tests - skip tests for unimplemented syscalls - rename riscv to riscv64 - add configurations for riscv32 - add detecting missing toolchain to run-tests.sh * tag 'linux_kselftest-nolibc-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/nolibc: add configurations for riscv32 selftests/nolibc: rename riscv to riscv64 selftests/nolibc: skip tests for unimplemented syscalls selftests/nolibc: use a pipe to in vfprintf tests selftests/nolibc: use waitid() over waitpid() tools/nolibc: add support for waitid() selftests/nolibc: run-tests.sh: detect missing toolchain commit e8f17cb6f5abd4e52e89b5768c7016b7dab1e6fe Merge: 8fb1e2eed14d 31691914c392 Author: Linus Torvalds Date: Wed Jan 22 12:32:39 2025 -0800 Merge tag 'linux_kselftest-kunit-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kunit updates from Shuah Khan: - fix struct completion warning - introduce autorun option - add fallback for os.sched_getaffinity - enable hardware acceleration when available * tag 'linux_kselftest-kunit-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: Introduce autorun option kunit: enable hardware acceleration when available kunit: add fallback for os.sched_getaffinity kunit: platform: Resolve 'struct completion' warning commit 8fb1e2eed14dc347e1d04b8bf0bf52c606de6da1 Merge: 88e969fc18a2 336d02bc4c6b Author: Linus Torvalds Date: Wed Jan 22 12:30:20 2025 -0800 Merge tag 'linux_kselftest-next-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest updates from Shuah Khan: - fixes, reporting improvements, and cleanup changes to several tests - add support for DT_GNU_HASH to selftests/vDSO * tag 'linux_kselftest-next-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/rseq: Fix handling of glibc without rseq support selftests/resctrl: Discover SNC kernel support and adjust messages selftests/resctrl: Adjust effective L3 cache size with SNC enabled selftests/ftrace: Make uprobe test more robust against binary name selftests/ftrace: Fix to use remount when testing mount GID option selftests: tmpfs: Add kselftest support to tmpfs selftests: tmpfs: Add Test-skip if not run as root selftests: harness: fix printing of mismatch values in __EXPECT() selftests/ring-buffer: Add test for out-of-bound pgoff mapping selftests/run_kselftest.sh: Fix help string for --per-test-log selftests: acct: Add ksft_exit_skip if not running as root selftests: kselftest: Fix the wrong format specifier selftests: timers: clocksource-switch: Adapt progress to kselftest framework selftests/zram: gitignore output file selftests/filesystems: Add missing gitignore file selftests: Warn about skipped tests in result summary selftests: kselftest: Add ksft_test_result_xpass selftests/vDSO: support DT_GNU_HASH selftests/ipc: Remove unused variables selftest: media_tests: fix trivial UAF typo commit 88e969fc18a25ab3ffe554a1c2e8e45c8ade6d3e Merge: 27c02784773a 25768de50b1f Author: Linus Torvalds Date: Wed Jan 22 12:12:42 2025 -0800 Merge tag 'input-for-v6.14-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - more conversions to the guard notation in the input core - a fix for NXP BBNSM power key driver to clean up wake IRQ after unbinding - several new vendor/device ID pairs added to xpad game controller driver - several drivers switched to using str_enable_disable and similar helpers instead of open-coding - add mapping for F23 to atkbd driver so that MS "Copilot" key shortcut works out of the box (if userspace is ready to handle it) - evbug input handler has been removed (debugging through evdev is strongly preferred to dumping all events into the kernel log). * tag 'input-for-v6.14-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (22 commits) Input: synaptics - fix crash when enabling pass-through port Input: atkbd - map F23 key to support default copilot shortcut Input: xpad - add support for Nacon Evol-X Xbox One Controller Input: xpad - add unofficial Xbox 360 wireless receiver clone Input: xpad - add support for wooting two he (arm) Input: xpad - improve name of 8BitDo controller 2dc8:3106 Input: xpad - add QH Electronics VID/PID Input: joystick - use str_off_on() helper in sw_connect() Input: Use str_enable_disable-like helpers Input: use guard notation in input core Input: poller - convert locking to guard notation Input: mt - make use of __free() cleanup facility Input: mt - convert locking to guard notation Input: ff-memless - make use of __free() cleanup facility Input: ff-memless - convert locking to guard notation Input: ff-core - make use of __free() cleanup facility Input: ff-core - convert locking to guard notation Input: remove evbug driver Input: mma8450 - add chip ID check in probe Input: bbnsm_pwrkey - add remove hook ... commit 6c8ad3ab45ad0e94bfb7a9c71f2fa9c6cacea4b2 Author: Steven Rostedt Date: Wed Jan 22 14:43:11 2025 -0500 atomic64: Use arch_spin_locks instead of raw_spin_locks raw_spin_locks can be traced by lockdep or tracing itself. Atomic64 operations can be used in the tracing infrastructure. When an architecture does not have true atomic64 operations it can use the generic version that disables interrupts and uses spin_locks. The tracing ring buffer code uses atomic64 operations for the time keeping. But because some architectures use the default operations, the locking inside the atomic operations can cause an infinite recursion. As atomic64 implementation is architecture specific, it should not be using raw_spin_locks() but instead arch_spin_locks as that is the purpose of arch_spin_locks. To be used in architecture specific implementations of generic infrastructure like atomic64 operations. Note, by switching from raw_spin_locks to arch_spin_locks, the locks taken to emulate the atomic64 operations will not have lockdep, mmio, or any kind of checks done on them. They will not even disable preemption, although the code will disable interrupts preventing the tasks that hold the locks from being preempted. As the locks held are done so for very short periods of time, and the logic is only done to emulate atomic64, not having them be instrumented should not be an issue. Cc: stable@vger.kernel.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds Cc: Andreas Larsson Link: https://lore.kernel.org/20250122144311.64392baf@gandalf.local.home Fixes: c84897c0ff592 ("ring-buffer: Remove 32bit timestamp logic") Closes: https://lore.kernel.org/all/86fb4f86-a0e4-45a2-a2df-3154acc4f086@gaisler.com/ Reported-by: Ludwig Rydberg Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) lib/atomic64.c | 78 ++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 30 deletions(-) commit 27c02784773a69fd896e42f3cec73be8c5c83c1f Merge: d78794d4f4db 973d690416fc Author: Linus Torvalds Date: Wed Jan 22 11:56:39 2025 -0800 Merge tag 'hid-for-linus-2025012001' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: - newly added support for Intel Touch Host Controller (Even Xu, Xinpeng Sun) - hid-core fix for long-standing syzbot-reported cornercase of Resolution Multiplier not being present in any of the Logical Collections in the device HID report descriptor (Alan Stern) - improvement of behavior for non-standard LED brightness values for Wacom driver (Jason Gerecke) - PCI Wacom device support (depends on Intel THC support) (Even Xu) - SteelSeries Arctis 9 support (Christian Mayer) - constification of 'struct bin_attribute' in various HID driver (Thomas Weißschuh) - other assorted code cleanups / fixes and device ID additions * tag 'hid-for-linus-2025012001' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (63 commits) HID: hid-asus: Disable OOBE mode on the ProArt P16 HID: steelseries: remove unnecessary return HID: steelseries: export model and manufacturer HID: steelseries: export charging state for the SteelSeries Arctis 9 headset HID: steelseries: add SteelSeries Arctis 9 support HID: steelseries: preparation for adding SteelSeries Arctis 9 support HID: intel-thc-hid: fix build errors in um mode HID: intel-thc-hid: intel-quicki2c: fix potential memory corruption HID: intel-thc-hid: intel-thc: Fix error code in thc_i2c_subip_init() HID: lenovo: Fix undefined platform_profile_cycle in ThinkPad X12 keyboard patch HID: uclogic: make const read-only array touch_ring_model_params_buf static HID: hid-steam: Make sure rumble work is canceled on removal HID: Wacom: Add PCI Wacom device support HID: intel-thc-hid: intel-quicki2c: Add PM implementation HID: intel-thc-hid: intel-quicki2c: Complete THC QuickI2C driver HID: intel-thc-hid: intel-quicki2c: Add HIDI2C protocol implementation HID: intel-thc-hid: intel-quicki2c: Add THC QuickI2C ACPI interfaces HID: intel-thc-hid: intel-quicki2c: Add THC QuickI2C driver hid layer HID: intel-thc-hid: intel-quicki2c: Add THC QuickI2C driver skeleton HID: intel-thc-hid: intel-quickspi: Add PM implementation ... commit d78794d4f4dbeac0a39e15d2fbc8e917741b5b7c Merge: 603f162a02d5 2dc748695568 Author: Linus Torvalds Date: Wed Jan 22 11:37:33 2025 -0800 Merge tag 'thermal-6.14-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 Intel Panther Lake processors in multiple places, modify Intel thermal drivers to stop selecting the user space thermal governor which is not necessary for them to work any more and clean up the thermal core somewhat: - Add support for Panther Lake processors in multiple places (Zhang Rui, Srinivas Pandruvada) - Remove explicit user_space governor selection from Intel thermal drivers (Srinivas Pandruvada) - Rename a few things and relocate a comment in the thermal subsystem (Rafael Wysocki)" * tag 'thermal-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: core: Rename function argument related to trip crossing thermal: gov_bang_bang: Relocate regulation logic description thermal: core: Rename callback functions in two governors thermal: intel: Fix compile issue when CONFIG_NET is not defined thermal: intel: int340x: Panther Lake power floor and workload hint support thermal: intel: int340x: Panther Lake DLVR support thermal: intel: Remove explicit user_space governor selection ACPI: DPTF: Support Panther Lake thermal: intel: int340x: processor: Enable MMIO RAPL for Panther Lake powercap: intel_rapl: Add support for Panther Lake platform commit 603f162a02d5ccf0b3c5b2c6f488e456be81007f Merge: f4b9d3bf44d5 d1ddf94665c6 Author: Linus Torvalds Date: Wed Jan 22 11:28:39 2025 -0800 Merge tag 'acpi-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "The most significant change here is replacing msleep() in acpi_os_sleep() with usleep_range() to reduce spurious sleep time due to timer inaccuracy which may spectacularly reduce the duration of system suspend and resume transitions on some systems. All of the other changes fall into the fixes and cleanups category this time. Specifics: - Use usleep_range() instead of msleep() in acpi_os_sleep() to reduce excessive delays due to timer inaccuracy, mostly affecting system suspend and resume (Rafael Wysocki) - Use str_enabled_disabled() string helpers in the ACPI tables parsing code to make it easier to follow (Sunil V L) - Update device properties parsing on systems using ACPI so that data firmware nodes resulting from _DSD evaluation are treated as available in firmware nodes walks (Sakari Ailus) - Fix missing guid_t declaration in linux/prmt.h (Robert Richter) - Update the GHES handling code to follow the global panic= policy instead of overriding it by force-rebooting the system after a fatal HW error has been reported (Borislav Petkov) - Update messages printed by the ACPI battery driver to always refer to driver extensions as "hooks" to avoid confusion with similar functionality in the power supply subsystem in the future (Thomas Weißschuh) - Fix .probe() error path cleanup in the ACPI fan driver to avoid memory leaks (Joe Hattori) - Constify 'struct bin_attribute' in some places in the ACPI subsystem and mark it as __ro_after_init in one place to prevent binary blob attributes from being updated (Thomas Weißschuh) - Add empty stubs for several ACPI-related symbols so that they can be used when CONFIG_ACPI is unset and use them for removing unnecessary conditional compilation from the ipu-bridge driver (Ricardo Ribalda)" * tag 'acpi-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: APEI: GHES: Have GHES honor the panic= setting ACPI: PRM: Fix missing guid_t declaration in linux/prmt.h ACPI: tables: Use string choice helpers ACPI: property: Consider data nodes as being available media: ipu-bridge: Remove unneeded conditional compilations ACPI: bus: implement acpi_device_hid when !ACPI ACPI: bus: implement for_each_acpi_consumer_dev when !ACPI ACPI: header: implement acpi_device_handle when !ACPI ACPI: bus: implement acpi_get_physical_device_location when !ACPI ACPI: bus: implement for_each_acpi_dev_match when !ACPI ACPI: bus: change the prototype for acpi_get_physical_device_location ACPI: fan: cleanup resources in the error path of .probe() ACPI: battery: Rename extensions to hook in messages ACPI: OSL: Use usleep_range() in acpi_os_sleep() ACPI: sysfs: Constify 'struct bin_attribute' ACPI: BGRT: Constify 'struct bin_attribute' ACPI: BGRT: Mark bin_attribute as __ro_after_init commit eb3fabde15bccdf34f1c9b35a83aa4c0dacbb4ca Author: Mike Snitzer Date: Thu Jan 16 20:05:39 2025 -0500 pnfs/flexfiles: retry getting layout segment for reads If ff_layout_pg_get_read()'s attempt to get a layout segment results in -EAGAIN have ff_layout_pg_init_read() retry it after sleeping. If "softerr" mount is used, use 'io_maxretrans' to limit the number of attempts to get a layout segment. This fixes a long-standing issue of O_DIRECT reads failing with -EAGAIN (11) when using flexfiles Client Side Mirroring (CSM). Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer Signed-off-by: Anna Schumaker fs/nfs/flexfilelayout/flexfilelayout.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit f4b9d3bf44d59ca4489bd8c489539c27c02e5c6a Merge: df60eac9efe8 1c91c99075db Author: Linus Torvalds Date: Wed Jan 22 11:16:14 2025 -0800 Merge tag 'pm-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "The majority of changes here are cpufreq updates which are dominated by amd-pstate driver changes, like in the previous cycle. Moreover, changes related to amd-pstate are also the majority of cpupower utility updates. Included are some pieces of new hardware support, like the addition of Clearwater Forest processors support to intel_idle, new cpufreq driver for Airoha SoCs, and Apple cpufreq driver extensions to support more SoCs. The intel_pstate driver is also extended to be able to support new platforms by using ACPI CPPC to compute scaling factors between HWP performance states and frequency. The rest is mostly fixes and cleanups in assorted pieces of power management code. Specifics: - Use str_enable_disable()-like helpers in cpufreq (Krzysztof Kozlowski) - Extend the Apple cpufreq driver to support more SoCs (Hector Martin, Nick Chan) - Add new cpufreq driver for Airoha SoCs (Christian Marangi) - Fix using cpufreq-dt as module (Andreas Kemnade) - Minor fixes for Sparc, SCMI, and Qcom cpufreq drivers (Ethan Carter Edwards, Sibi Sankar, Manivannan Sadhasivam) - Fix the maximum supported frequency computation in the ACPI cpufreq driver to avoid relying on unfounded assumptions (Gautham Shenoy) - Fix an amd-pstate driver regression with preferred core rankings not being used (Mario Limonciello) - Fix a precision issue with frequency calculation in the amd-pstate driver (Naresh Solanki) - Add ftrace event to the amd-pstate driver for active mode (Mario Limonciello) - Set default EPP policy on Ryzen processors in amd-pstate (Mario Limonciello) - Clean up the amd-pstate cpufreq driver and optimize it to increase code reuse (Mario Limonciello, Dhananjay Ugwekar) - Use CPPC to get scaling factors between HWP performance levels and frequency in the intel_pstate driver and make it stop using a built-in scaling factor for Arrow Lake processors (Rafael Wysocki) - Make intel_pstate initialize epp_policy to CPUFREQ_POLICY_UNKNOWN for consistency with CPU offline (Christian Loehle) - Fix superfluous updates caused by need_freq_update in the schedutil cpufreq governor (Sultan Alsawaf) - Allow configuring the system suspend-resume (DPM) watchdog to warn earlier than panic (Douglas Anderson) - Implement devm_device_init_wakeup() helper and introduce a device- managed variant of dev_pm_set_wake_irq() (Joe Hattori, Peng Fan) - Remove direct inclusions of 'pm_wakeup.h' which should be only included via 'device.h' (Wolfram Sang) - Clean up two comments in the core system-wide PM code (Rafael Wysocki, Randy Dunlap) - Add Clearwater Forest processor support to the intel_idle cpuidle driver (Artem Bityutskiy) - Clean up the Exynos devfreq driver and devfreq core (Markus Elfring, Jeongjun Park) - Minor cleanups and fixes for OPP (Dan Carpenter, Neil Armstrong, Joe Hattori) - Implement dev_pm_opp_get_bw() (Neil Armstrong) - Expose OPP reference counting helpers for Rust (Viresh Kumar) - Fix TSC MHz calculation in cpupower (He Rongguang) - Add install and uninstall options to bindings Makefile and add header changes for cpufreq.h to SWIG bindings in cpupower (John B. Wyatt IV) - Add missing residency header changes in cpuidle.h to SWIG bindings in cpupower (John B. Wyatt IV) - Add output files to .gitignore and clean them up in "make clean" in selftests/cpufreq (Li Zhijian) - Fix cross-compilation in cpupower Makefile (Peng Fan) - Revise the is_valid flag handling for idle_monitor in the cpupower utility (wangfushuai) - Extend and clean up AMD processors support in cpupower (Mario Limonciello)" * tag 'pm-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (67 commits) PM / OPP: Add reference counting helpers for Rust implementation PM: sleep: wakeirq: Introduce device-managed variant of dev_pm_set_wake_irq() cpufreq: Use str_enable_disable()-like helpers cpufreq: airoha: Add EN7581 CPUFreq SMCCC driver PM: sleep: Allow configuring the DPM watchdog to warn earlier than panic PM: sleep: convert comment from kernel-doc to plain comment cpufreq: ACPI: Fix max-frequency computation pm: cpupower: Add missing residency header changes in cpuidle.h to SWIG PM / devfreq: exynos: remove unused function parameter OPP: OF: Fix an OF node leak in _opp_add_static_v2() cpufreq/amd-pstate: Refactor max frequency calculation cpufreq/amd-pstate: Fix prefcore rankings pm: cpupower: Add header changes for cpufreq.h to SWIG bindings cpufreq: sparc: change kzalloc to kcalloc cpufreq: qcom: Implement clk_ops::determine_rate() for qcom_cpufreq* clocks cpufreq: qcom: Fix qcom_cpufreq_hw_recalc_rate() to query LUT if LMh IRQ is not available cpufreq: apple-soc: Add Apple A7-A8X SoC cpufreq support cpufreq: apple-soc: Set fallback transition latency to APPLE_DVFS_TRANSITION_TIMEOUT cpufreq: apple-soc: Increase cluster switch timeout to 400us cpufreq: apple-soc: Use 32-bit read for status register ... commit df60eac9efe8be41cd30767ed001c04f478e0f4e Merge: 641b0c64b85a b4339d599bc2 Author: Linus Torvalds Date: Wed Jan 22 10:57:57 2025 -0800 Merge tag 'for-linus-6.14-1' of https://github.com/cminyard/linux-ipmi Pull ipmi updates from Corey Minyard: - I'm switching to a new email address, so update that - Minor fixes for formats and return values and missing ifdefs - A fix for some error handling that causes a loss of messages * tag 'for-linus-6.14-1' of https://github.com/cminyard/linux-ipmi: MAINTAINERS: ipmi: update my email address ipmi: ssif_bmc: Fix new request loss when bmc ready for a response ipmi: make ipmi_destroy_user() return void char:ipmi: Fix a not-used variable on a non-ACPI system char:ipmi: Fix the wrong format specifier ipmi: ipmb: Add check devm_kasprintf() returned value commit 641b0c64b85a9b21110268f511f20d6887406117 Merge: abdebb2837ff 53c9c27672bb Author: Linus Torvalds Date: Wed Jan 22 10:54:18 2025 -0800 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "A pretty quiet cycle this time around. We have a bunch of new Qualcomm clk drivers, per usual, and then a handful of drivers for other SoCs. Then the usual pile of cleanups is fairly small data fixes or converting DT bindings to YAML so they can be validated. No changes to the core framework besides an OF node refcount bump that never got decremented. New Drivers: - 5L35023 variant of Versa 3 clock generator - Various Qualcomm clk controllers: IPQ CMN PLL, SM6115 LPASS, SM750 global, tcsr, rpmh, and display. X Plus GPU and global. QCS615 rpmh and MSM8937 and MSM8940 RPM. - Qualcomm Pongo and Taycan Alpha PLLs - Qualcomm IPQ5424 NoC-related interconnect clks - Renesas RZ/G3E (R9A09G047) SoC clk driver - SAMA7D65 SoC clk driver - Samsung Exynos990 SoC clk driver" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (159 commits) clk: analogbits: Fix incorrect calculation of vco rate delta clk: bcm: rpi: Add disp clock clk: bcm: rpi: Create helper to retrieve private data clk: bcm: rpi: Enable minimize for all firmware clocks clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks clk: bcm: rpi: Add ISP to exported clocks clk: stm32f4: support spread spectrum clock generation clk: stm32f4: use FIELD helpers to access the PLLCFGR fields dt-bindings: clock: st,stm32-rcc: support spread spectrum clocking dt-bindings: clock: convert stm32 rcc bindings to json-schema clk: Use str_enable_disable-like helpers clk: clk-loongson2: Fix the number count of clk provider clk: clk-loongson2: Switch to use devm_clk_hw_register_fixed_rate_parent_data() clk: starfive: Make _clk_get become a common helper function clk: en7523: Add clock for eMMC for EN7581 dt-bindings: clock: add ID for eMMC for EN7581 dt-bindings: clock: drop NUM_CLOCKS define for EN7581 clk: en7523: Rework clock handling for different clock numbers clk: thead: Fix cpu2vp_clk for TH1520 AP_SUBSYS clocks clk: thead: Add CLK_IGNORE_UNUSED to fix TH1520 boot ... commit abdebb2837ffbf3187791e92b68a7d80eec0e773 Merge: d12f68b5ba08 27c3f0e61f19 Author: Linus Torvalds Date: Wed Jan 22 10:47:46 2025 -0800 Merge tag 'i2c-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "Core: - list-based mechanisms for handling auto-detected and userspace created clients are replaced with a flag-based approach. The resulting code is much simpler as well as the locking. - i2c clients now get a default debugfs dir managed by the I2C core. Drivers don't have to maintain their own directory anymore. Driver updates: - xiic: atomic_transfer support - imx-lpi2c: DMA and target mode support - riic cleanups - npcm: better timeout handling and more precise frequency setups - davinci: remove unused platform_data - at24: add new compatibles for variants from Giantec and Puya Semiconductor (together with a new vendor prefix)" * tag 'i2c-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (52 commits) i2c: add kdoc for the new debugfs entry of clients i2c: designware: Actually make use of the I2C_DW_COMMON and I2C_DW symbol namespaces i2c: add core-managed per-client directory in debugfs i2c: Force ELAN06FA touchpad I2C bus freq to 100KHz i2c: riic: Add `riic_bus_barrier()` to check bus availability i2c: riic: Use predefined macro and simplify clock tick calculation i2c: riic: Mark riic_irqs array as const i2c: riic: Make use of devres helper to request deasserted reset line i2c: riic: Use GENMASK() macro for bitmask definitions i2c: riic: Use BIT macro consistently i2c: riic: Use local `dev` pointer in `dev_err_probe()` i2c: riic: Use dev_err_probe in probe and riic_init_hw functions i2c: riic: Introduce a separate variable for IRQ i2c: amd756: Remove superfluous TODO Revert "i2c: amd756: Fix endianness handling for word data" i2c: i801: Add lis3lv02d for Dell Precision M6800 i2c: i801: Remove unnecessary PCI function call i2c: core: Allocate temp client on the stack in i2c_detect i2c: slave-eeprom: Constify 'struct bin_attribute' i2c: imx-lpi2c: make controller available until the system enters suspend_noirq() and from resume_noirq(). ... commit d12f68b5ba08e8b4527532fa8a61c404c9832842 Merge: 2bf717b07969 e8c59791ebb6 Author: Linus Torvalds Date: Wed Jan 22 10:43:09 2025 -0800 Merge tag 'pwm/for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux Pull pwm updates from Uwe Kleine-König: "This time there are very little changes for pwm. There is nothing new, just a few maintenance cleanups. The contributors this time around were Krzysztof Kozlowski, Mingwei Zheng, Philipp Stanner, and Stanislav Jakubek. Thanks!" * tag 'pwm/for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: pwm: stm32: Add check for clk_enable() dt-bindings: pwm: Correct indentation and style in DTS example pwm: stm32-lp: Add check for clk_enable() dt-bindings: pwm: marvell,berlin-pwm: Convert from txt to yaml dt-bindings: pwm: sprd,ums512-pwm: convert to YAML pwm: Replace deprecated PCI functions commit c8084a89bd91b05f51a36bff61f63a94c800b0d6 Author: Yu-Chun Lin Date: Sun Jan 19 16:43:12 2025 +0800 Input: wdt87xx_i2c - fix compiler warning As reported by the kernel test robot, the following warning occur: >> drivers/input/touchscreen/wdt87xx_i2c.c:1166:36: warning: 'wdt87xx_acpi_id' defined but not used [-Wunused-const-variable=] 1166 | static const struct acpi_device_id wdt87xx_acpi_id[] = { | ^~~~~~~~~~~~~~~ The 'wdt87xx_acpi_id' array is only used when CONFIG_ACPI is enabled. Wrapping its definition and 'MODULE_DEVICE_TABLE' in '#ifdef CONFIG_ACPI' prevents a compiler warning when ACPI is disabled. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501181549.uzdlBwuN-lkp@intel.com/ Signed-off-by: Yu-Chun Lin Link: https://lore.kernel.org/r/20250119084312.1851486-1-eleanor15x@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/wdt87xx_i2c.c | 2 ++ 1 file changed, 2 insertions(+) commit 2bf717b07969b6d9e9ba5bccd3ac778e9aeaab18 Merge: a4910ed25d48 20a0c37e4406 Author: Linus Torvalds Date: Wed Jan 22 10:39:17 2025 -0800 Merge tag 'mmc-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Share a helper to convert from crypto_profile to mmc_host - Respect quirk_max_rate for non-UHS SDIO card too MMC host: - Add DT bindings for the mmc-slot - Clarify DT bindings for the mmc-controller - bcm2835: Add support for system-wide suspend/resume PM - dw_mmc-exynos: Add support for the exynos8895 variant - meson-mx-sdio: Convert DT bindings to dtschema - mtk-sd: Fixup use of two register ranges - mtk-sd: Add support for ignoring cmd response CRC - sdhci-esdhc-imx: enable 'SDHCI_QUIRK_NO_LED' quirk for S32G - sdhci-msm: Correctly set the load for the regulator - sdhci-msm: Convert to use custom crypto profile - sdhci-of-at91: Add support for the microchip sama7d65 variant" * tag 'mmc-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (25 commits) mmc: sdhci-msm: Correctly set the load for the regulator mmc: hi3798mv200: Use syscon_regmap_lookup_by_phandle_args mmc: Use of_property_present() for non-boolean properties dt-bindings: mmc: samsung,exynos-dw-mshc: add specific compatible for exynos8895 mmc: sdhci-msm: convert to use custom crypto profile mmc: crypto: add mmc_from_crypto_profile() mmc: mtk-sd: Limit getting top_base to SoCs that require it dt-bindings: mmc: mtk-sd: Document compatibles that need two register ranges mmc: sdhci-acpi: Use devm_platform_ioremap_resource() mmc: sdhci-acpi: Remove not so useful error message dt-bindings: mmc: convert amlogic,meson-mx-sdio.txt to dtschema dt-bindings: mmc: document mmc-slot dt-bindings: mmc: controller: remove '|' when not needed dt-bindings: mmc: controller: move properties common with slot out to mmc-controller-common dt-bindings: mmc: controller: clarify the address-cells description mmc: bcm2835: add suspend/resume pm support dt-bindings: Drop Bhupesh Sharma from maintainers mmc: core: don't include 'pm_wakeup.h' directly mmc: mtk-sd: Add support for ignoring cmd response CRC mmc: core: Introduce the MMC_RSP_R1B_NO_CRC response ... commit a4910ed25d48eb06b81fe6beca7d4f31e6275be0 Merge: 11a7b03346e2 a76539b29367 Author: Linus Torvalds Date: Wed Jan 22 10:16:48 2025 -0800 Merge tag 'hwmon-for-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "New drivers: - PMBus client driver for Intel CRPS185 power supply - PMBus client driver for Texas Instruments TPS25990 Chip support added to existing drivers: - pmbus/max15301: Add support for MAX15303 - pmbus/adm1275: Add adm1273 support - lm75: Add NXP P3T1755 support; with it, add I3C support to the driver - asus-ec-sensors: Add TUF GAMING X670E PLUS Other notable changes: - nct6683: Add customer IDs for several MSI and ASRock boards - tmp108: Add regulator support - Improve write protect support in PMBus core - pmbus/dps920ab: Add ability to instantiate through i2c - The hwmon core now accepts NULL as device name parameter to [devm_]hwmon_device_register_with_info ans uses the parent device name as fallback in that case - The PMBus core now provides the PMBUs revision in a debugfs file - asus-ec-sensors: Support for optional CPU fan on AMD 600 motherboards - raspberrypi: Add PM suspend/resume support - dell-smm: Enable manual fan control support on Dell XPS 9370 - pwm-fan: Default to maximum cooling level if provided And various other minor fixes and improvements" * tag 'hwmon-for-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (44 commits) hwmon: pmbus: dps920ab: Add ability to instantiate through i2c hwmon: (pwm-fan) Default to the Maximum cooling level if provided hwmon: (asus_atk0110) Use str_enabled_disabled() and str_enable_disable() helpers hwmon: Fix help text for aspeed-g6-pwm-tach hwmon: (dell-smm) Add Dell XPS 9370 to fan control whitelist hwmon: (acpi_power_meter) Fix update the power trip points on failure hwmon: (acpi_power_meter) Fix uninitialized variables hwmon: (core) Use device name as a fallback in devm_hwmon_device_register_with_info hwmon: (pmbus/max15301) Add support for MAX15303 hwmon: (pmbus/adm1275) add adm1273 support dt-bindings: hwmon: adm1275: add adm1273 hwmon: (nct6683) Add another customer ID for MSI hwmon: (pwm-fan): Make use of device properties everywhere hwmon: (lm75) add I3C support for P3T1755 hwmon: (lm75) separate probe into common and I2C parts hwmon: (lm75) Remove superfluous 'client' member from private struct hwmon: (lm75) simplify regulator handling hwmon: (lm75) simplify lm75_write_config() hwmon: (lm75) Hide register size differences in regmap access functions hwmon: (pmbus/crps) Add Intel CRPS185 power supply ... commit 11a7b03346e2ac4bf13783d409dd7ec0ecf1f3ac Merge: 909fd2b89f2e daefd7fbd544 Author: Linus Torvalds Date: Wed Jan 22 09:19:36 2025 -0800 Merge tag 'leds-next-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds Pull LED updates from Lee Jones: - Allow struct bin_attribute instances to be placed in read-only memory for enhanced protection - Fix a memory leak in the cht-wcove driver by using devm_led_classdev_register() - Fix an OF node reference leak in the netxbig driver - Ensure PWM is disabled properly in pwm-multicolor suspend - Add support for Texas Instruments LP8864, LP8864S, LP8866 LED-backlight drivers - Add support for STMicroelectronics's LED1202 12-channel LED driver - Convert LP8860 bindings to YAML format - Add bindings for the TI LP8864/LP8866 LED drivers - Add LED1202 LED controller bindings - Fix path to color definitions in leds-class-multicolor.yaml - Add pm660l compatible to qcom,spmi-flash-led bindings - Extend cznic,turris-omnia-leds binding with interrupts property - Add documentation for the STMicroelectronics LED1202 driver - Add entry for AAEON UP board FPGA drivers in MAINTAINERS - Fix a wrong format specifier in the ledtrig-activity driver - Fix a bug in the lp8860 driver where only half of the EEPROM was written * tag 'leds-next-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (28 commits) leds: triggers: Constify 'struct bin_attribute' leds: cht-wcove: Use devm_led_classdev_register() to avoid memory leak leds: lp8864: Add support for Texas Instruments LP8864, LP8864S, LP8866 LED-backlights dt-bindings: leds: Convert LP8860 into YAML format leds: Add LED1202 I2C driver dt-bindings: leds: Add LED1202 LED Controller Documentation:leds: Add leds-st1202.rst leds: pwm-multicolor: Disable PWM when going to suspend leds: netxbig: Fix an OF node reference leak in netxbig_leds_get_of_pdata() turris-omnia-mcu-interface.h: Move macro definitions outside of enums MAINTAINERS: Add entry for AAEON UP board FPGA drivers leds: Add AAEON UP board LED driver leds: trigger: netdev: Check offload ability on interface up leds: turris-omnia: Use uppercase first letter in all comments leds: turris-omnia: Use dev_err_probe() where appropriate leds: turris-omnia: Inform about missing LED gamma correction feature in the MCU driver platform: cznic: turris-omnia-mcu: Inform about missing LED panel brightness change interrupt feature leds: turris-omnia: Notify sysfs on MCU global LEDs brightness change leds: turris-omnia: Document driver private structures dt-bindings: leds: cznic,turris-omnia-leds: Allow interrupts property ... commit 909fd2b89f2edab8ec440a67dcf8627614e272b6 Merge: 38f5265ed2c4 2816b0c949af Author: Linus Torvalds Date: Wed Jan 22 09:16:02 2025 -0800 Merge tag 'mfd-next-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull mfd updates from Lee Jones: - Fix race in device_node_get_regmap() using more extensive locking - Remove unused platform driver support for syscon - Allow syscon nodes to be registered without a "syscon" compatible string - Make `platform_data` pointer const in struct mfd_cell - Revert support for multiple AXP PMICs to avoid regressions - Increase SoundWire attach timeout and use gpiod_set_raw() for GPIO operation - Store the result from fault_log() for use by other sub-components - Fix an invalid regmap-config max_register value - Add another Gemini Lake ISA bridge PCI device ID - Use devm_register_power_off_handler() to simplify code - Add support for QNAP microcontroller units, including LEDs, input, and hwmon - Use MFD_CELL macros and remove unused code - Add support for AAEON UP board FPGA - Remove unused includes - Fix various typos and compatibility issues in multiple bindings - Add new bindings for rk3562 QoS, LED1202, and qcom,tcsr-ipq5424 - Convert several bindings to YAML schema - Update sprd,sc2731 bindings to reference sprd,sc2731-efuse bindings directly - Fix rohm,bd71815 bindings by correcting resistor values and typos - Documentation improvements: - Add documentation for LED1202 and qnap-mcu-hwmon - Adjust the file entry for the qnap-mcu header in MAINTAINERS * tag 'mfd-next-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (35 commits) MAINTAINERS: Adjust the file entry for the qnap-mcu header dt-bindings: mfd: syscon: Fix ti,j784s4-acspcie-proxy-ctrl compatible dt-bindings: mfd: syscon: Fix al,alpine-sysfabric-service compatible Revert "mfd: axp20x: Allow multiple regulators" dt-bindings: mfd: syscon: Add rk3562 QoS register compatible mfd: syscon: Allow syscon nodes without a "syscon" compatible mfd: syscon: Remove the platform driver support mfd: syscon: Fix race in device_node_get_regmap() dt-bindings: mfd: atmel: Convert to YAML schema dt-bindings: mfd: atmel,at91sam9260: Convert to YAML schema dt-bindings: mfd: sprd,sc2731: Reference sprd,sc2731-efuse bindings mfd: tps65219: Remove unused macros & add regmap.h mfd: tps65219: Use MFD_CELL macros leds: Add LED1202 I2C driver dt-bindings: leds: Add LED1202 LED Controller Documentation:leds: Add leds-st1202.rst mfd: Add support for AAEON UP board FPGA mfd: da9052: Store result from fault_log mfd: intel_soc_pmic_chtdc_ti: Fix invalid regmap-config max_register value mfd: cs42l43: Use devres for remove as well ... commit 38f5265ed2c468f43a3080e4f82abfe53d7ea0be Merge: 7b081a74c07d 78b435c9044a Author: Linus Torvalds Date: Wed Jan 22 09:08:18 2025 -0800 Merge tag 'spi-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "This is a fairly quiet release for the most part, though we do have one really nice improvement in the spi-mem framework which will improve performance for flash devices especially when built on by changes in the MTD subsystem which are also due to be sent this merge window. There's also been some substantial work on some of the drivers, highlights include: - Support for per-operation bus frequency in the spi-mem framework, meaning speeds are no longer limited by the slowest operation - ACPI support and improved power management for Rockchip SFC controllers - Support for Atmel SAM7G5 QuadSPI and KEBA SPI controllers" * tag 'spi-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (49 commits) spi: pxa2xx: Introduce __lpss_ssp_update_priv() helper spi: ti-qspi: Use syscon_regmap_lookup_by_phandle_args spi: amd: Fix -Wuninitialized in amd_spi_exec_mem_op() spi: spi-mem: Estimate the time taken by operations spi: spi-mem: Create macros for DTR operation spi: spi-mem: Reorder spi-mem macro assignments spi: zynqmp-gqspi: Support per spi-mem operation frequency switches spi: zynq-qspi: Support per spi-mem operation frequency switches spi: spi-ti-qspi: Support per spi-mem operation frequency switches spi: spi-sn-f-ospi: Support per spi-mem operation frequency switches spi: rockchip-sfc: Support per spi-mem operation frequency switches spi: nxp-fspi: Support per spi-mem operation frequency switches spi: mxic: Support per spi-mem operation frequency switches spi: mt65xx: Support per spi-mem operation frequency switches spi: microchip-core-qspi: Support per spi-mem operation frequency switches spi: fsl-qspi: Support per spi-mem operation frequency switches spi: dw: Support per spi-mem operation frequency switches spi: cadence-qspi: Support per spi-mem operation frequency switches spi: amlogic-spifc-a1: Support per spi-mem operation frequency switches spi: amd: Drop redundant check ... commit af65d7d041d486cc55530e14d806e16143037962 Author: Iuliana Prodan Date: Wed Jan 22 18:35:44 2025 +0200 ASoC: SOF: imx8m: Add entry for new 8M Plus revision The new revision for 8M Plus has wm8962 codec instead of wm8960. Therefore add new entry in sof_imx8mp_machs, an array of snd_sof_of_mach, where we describe topology name and driver name. For the new revision we have new compatible value and based on this, we select the new topology file, for wm8962 codec. Reviewed-by: Peter Ujfalusi Reviewed-by: Liam Girdwood Reviewed-by: Bard Liao Reviewed-by: Laurentiu Mihalcea Signed-off-by: Daniel Baluta Signed-off-by: Iuliana Prodan Link: https://patch.msgid.link/20250122163544.1392869-5-daniel.baluta@nxp.com Signed-off-by: Mark Brown sound/soc/sof/imx/imx8m.c | 5 +++++ 1 file changed, 5 insertions(+) commit a9f54c7fbd2edb28c8d4d812be3d0129167f92d4 Author: Iuliana Prodan Date: Wed Jan 22 18:35:43 2025 +0200 ASoC: SOF: imx8: Add entries for new 8QM and 8QXP revisions The new revisions for 8QM and 8QXP have wm8962 codec instead of wm8960. Therefore add new entries in sof_imx8_machs, an array of snd_sof_of_mach, where we describe topology name and driver name. For the new revisions we have new compatible values and based on these, we select the new topology file, for wm8962 codec. Reviewed-by: Peter Ujfalusi Reviewed-by: Liam Girdwood Reviewed-by: Bard Liao Reviewed-by: Laurentiu Mihalcea Signed-off-by: Iuliana Prodan Signed-off-by: Daniel Baluta Link: https://patch.msgid.link/20250122163544.1392869-4-daniel.baluta@nxp.com Signed-off-by: Mark Brown sound/soc/sof/imx/imx8.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 66084793fac9c8b841f65da1809ad0ad398f9f2f Author: Daniel Baluta Date: Wed Jan 22 18:35:42 2025 +0200 ASoC: SOF: imx: Add mach entry to select cs42888 topology After commit 2b9cdef13648 ("ASoC: SOF: imx: Add devicetree support to select topologies") we select topology to be used by the board compatible string in the dts. Now that we have a way to know when the baseboard is installed, use the board compatible and select proper topology files when the cs42888 Audio IO card is used. Reviewed-by: Peter Ujfalusi Reviewed-by: Liam Girdwood Reviewed-by: Bard Liao Reviewed-by: Iuliana Prodan Reviewed-by: Laurentiu Mihalcea Signed-off-by: Daniel Baluta Link: https://patch.msgid.link/20250122163544.1392869-3-daniel.baluta@nxp.com Signed-off-by: Mark Brown sound/soc/sof/imx/imx8.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 4b24c69af9cd5bd8fe98ab2ddd822d73f5e20a00 Author: Iuliana Prodan Date: Wed Jan 22 18:35:41 2025 +0200 dt-bindings: arm: imx: Add board revisions for i.MX8MP, i.MX8QM and i.MX8QXP wm8960 codec is EOL so we have i.MX8MP EVK Rev B4, i.MX8QM MEK Rev D and i.MX8QXP MEK WCPU boards with wm8962 codec. Therefore, add compatibles for them. Signed-off-by: Iuliana Prodan Signed-off-by: Daniel Baluta Link: https://patch.msgid.link/20250122163544.1392869-2-daniel.baluta@nxp.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/arm/fsl.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 7b081a74c07d9e097f6829a1749f0aa441553c5e Merge: 6f10810ccd6d 367a8200a910 Author: Linus Torvalds Date: Wed Jan 22 09:03:41 2025 -0800 Merge tag 'regulator-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "This was a very quiet release, aside from some smaller improvements we have: - Support for power budgeting on regulators, initially targeted at some still in review support for PSE controllers but generally useful - Support for error interrupts from ROHM BD96801 devices - Support for NXP PCA9452" * tag 'regulator-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: dt-bindings: Add regulator-power-budget-milliwatt property regulator: Add support for power budget regulator: core: Resolve supply using of_node from regulator_config regulator: of: Implement the unwind path of of_regulator_match() regulator: tps65219: Remove debugging helper function regulator: tps65219: Remove MODULE_ALIAS regulator: tps65219: Update driver name regulator: tps65219: Use dev_err_probe() instead of dev_err() regulator: dt-bindings: mt6315: Drop regulator-compatible property regulator: pca9450: Add PMIC pca9452 support regulator: dt-bindings: pca9450: Add pca9452 support regulator: pca9450: Use dev_err_probe() to simplify code regulator: pca9450: add enable_value for all bucks regulator: bd96801: Add ERRB IRQ commit 6f10810ccd6de53ff158d3b16013591c8d7442b3 Merge: 0c9343150cfe d406b354df90 Author: Linus Torvalds Date: Wed Jan 22 08:57:52 2025 -0800 Merge tag 'regmap-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "There's one big bit of work this time around, the addition of support for a greater range of MBQ access sizes to SoundWire devices together with support for deferred read/write. The MBQ register maps generally have variable register sizes, the variable regiseter size support allows them to be handled much more naturally within regmap with less open coding in drivers. The deferred read/write support avoids spurious errors when devices make use of a bus feature allowing them to indicate they're busy. These changes pull in a supporting SoundWire change, and there's an ASoC change building off the new code. The remainder of the changes are code cleanups" * tag 'regmap-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: sdw-mbq: Add support for SDCA deferred controls regmap: sdw-mbq: Add support for further MBQ register sizes ASoC: SDCA: Update list of entity_0 controls soundwire: SDCA: Add additional SDCA address macros regmap: regmap_multi_reg_read(): make register list const regmap: cache: rbtree: use krealloc_array() to replace krealloc() regmap: cache: mapple: use kmalloc_array() to replace kmalloc() regmap: place foo / 8 and foo % 8 closer to each other regmap: Use BITS_TO_BYTES() regmap: cache: Use BITS_TO_BYTES() commit 0c9343150cfebe4bda9339670ab423e330fb5224 Merge: 4abae5b6af81 29da3e8748f9 Author: Linus Torvalds Date: Wed Jan 22 08:52:26 2025 -0800 Merge tag 'pwrseq-updates-for-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull power sequencing updates from Bartosz Golaszewski: "We added support for another Qualcomm WCN model and a FIXME comment that explains why we still need to keep a GPIO workaround for now despite having merged a set of changes to the PCI code that seemingly fixed the underlying problem: - support a new model in the qcom-wcn pwrseq driver - explain the need to keep the WLAN_EN GPIO workaround for now with a FIXME comment" * tag 'pwrseq-updates-for-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: power: sequencing: qcom-wcn: explain why we need the WLAN_EN GPIO hack power: sequencing: qcom-wcn: add support for the WCN6750 PMU commit 4abae5b6af811ab2b53aa761bf9ae2139757d594 Merge: 0ad9617c78ac b0fa00fe38f6 Author: Linus Torvalds Date: Wed Jan 22 08:47:54 2025 -0800 Merge tag 'gpio-updates-for-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "Thanks to little activity in December, this is really tiny. Just a few updates to drivers and device-tree bindings. Driver improvements: - support a new model in gpio-mpc8xxx - refactor gpio-tqmx86 and add support for direction setting - allow building gpio-omap with COMPILE_TEST=y - use gpiochip_get_data() instead of dev_get_drvdata() in gpio-twl6040 - drop unued field from driver data in gpio-altera - use generic request/free callbacks in gpio-regmap for better integration with pinctrl - use dev_err_probe() where applicable in gpio-pca953x - use existing dedicated GPIO defines in gpio-tps65219 instead of custom ones DT bindings: - document a new model in fsl,qoriq-gpio - explain the chip's latch clock pin and how it works like chip-select in fairchild,74hc595 - enable the gpio-line-names property for gpio-brcmstb" * tag 'gpio-updates-for-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: regmap: Use generic request/free ops gpio: altera: Drop .mapped_irq from driver data gpio: mpc8xxx: Add MPC8314 support dt-bindings: gpio: fsl,qoriq-gpio: Add compatible string fsl,mpc8314-gpio dt-bindings: gpio: fairchild,74hc595: Document chip select vs. latch clock gpio: tps65219: Use existing kernel gpio macros gpio: pca953x: log an error when failing to get the reset GPIO dt-bindings: gpio: brcmstb: permit gpio-line-names property gpio: tqmx86: add support for changing GPIO directions gpio: tqmx86: introduce tqmx86_gpio_clrsetbits() helper gpio: tqmx86: use cleanup guards for spinlock gpio: tqmx86: consistently refer to IRQs by hwirq numbers gpio: tqmx86: add macros for interrupt configuration gpio: omap: allow building the module with COMPILE_TEST=y gpio: twl4030: use gpiochip_get_data commit 0ad9617c78acbc71373fb341a6f75d4012b01d69 Merge: 5f537664e705 cf33d96f5090 Author: Linus Torvalds Date: Wed Jan 22 08:28:57 2025 -0800 Merge tag 'net-next-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Paolo Abeni: "This is slightly smaller than usual, with the most interesting work being still around RTNL scope reduction. Core: - More core refactoring to reduce the RTNL lock contention, including preparatory work for the per-network namespace RTNL lock, replacing RTNL lock with a per device-one to protect NAPI-related net device data and moving synchronize_net() calls outside such lock. - Extend drop reasons usage, adding net scheduler, AF_UNIX, bridge and more specific TCP coverage. - Reduce network namespace tear-down time by removing per-subsystems synchronize_net() in tipc and sched. - Add flow label selector support for fib rules, allowing traffic redirection based on such header field. Netfilter: - Do not remove netdev basechain when last device is gone, allowing netdev basechains without devices. - Revisit the flowtable teardown strategy, dealing better with fin, reset and re-open events. - Scale-up IP-vs connection dumping by avoiding linear search on each restart. Protocols: - A significant XDP socket refactor, consolidating and optimizing several helpers into the core - Better scaling of ICMP rate-limiting, by removing false-sharing in inet peers handling. - Introduces netlink notifications for multicast IPv4 and IPv6 address changes. - Add ipsec support for IP-TFS/AggFrag encapsulation, allowing aggregation and fragmentation of the inner IP. - Add sysctl to configure TIME-WAIT reuse delay for TCP sockets, to avoid local port exhaustion issues when the average connection lifetime is very short. - Support updating keys (re-keying) for connections using kernel TLS (for TLS 1.3 only). - Support ipv4-mapped ipv6 address clients in smc-r v2. - Add support for jumbo data packet transmission in RxRPC sockets, gluing multiple data packets in a single UDP packet. - Support RxRPC RACK-TLP to manage packet loss and retransmission in conjunction with the congestion control algorithm. Driver API: - Introduce a unified and structured interface for reporting PHY statistics, exposing consistent data across different H/W via ethtool. - Make timestamping selectable, allow the user to select the desired hwtstamp provider (PHY or MAC) administratively. - Add support for configuring a header-data-split threshold (HDS) value via ethtool, to deal with partial or buggy H/W implementation. - Consolidate DSA drivers Energy Efficiency Ethernet support. - Add EEE management to phylink, making use of the phylib implementation. - Add phylib support for in-band capabilities negotiation. - Simplify how phylib-enabled mac drivers expose the supported interfaces. Tests and tooling: - Make the YNL tool package-friendly to make it easier to deploy it separately from the kernel. - Increase TCP selftest coverage importing several packetdrill test-cases. - Regenerate the ethtool uapi header from the YNL spec, to ease maintenance and future development. - Add YNL support for decoding the link types used in net self-tests, allowing a single build to run both net and drivers/net. Drivers: - Ethernet high-speed NICs: - nVidia/Mellanox (mlx5): - add cross E-Switch QoS support - add SW Steering support for ConnectX-8 - implement support for HW-Managed Flow Steering, improving the rule deletion/insertion rate - support for multi-host LAG - Intel (ixgbe, ice, igb): - ice: add support for devlink health events - ixgbe: add initial support for E610 chipset variant - igb: add support for AF_XDP zero-copy - Meta: - add support for basic RSS config - allow changing the number of channels - add hardware monitoring support - Broadcom (bnxt): - implement TCP data split and HDS threshold ethtool support, enabling Device Memory TCP. - Marvell Octeon: - implement egress ipsec offload support for the cn10k family - Hisilicon (HIBMC): - implement unicast MAC filtering - Ethernet NICs embedded and virtual: - Convert UDP tunnel drivers to NETDEV_PCPU_STAT_DSTATS, avoiding contented atomic operations for drop counters - Freescale: - quicc: phylink conversion - enetc: support Tx and Rx checksum offload and improve TSO performances - MediaTek: - airoha: introduce support for ETS and HTB Qdisc offload - Microchip: - lan78XX USB: preparation work for phylink conversion - Synopsys (stmmac): - support DWMAC IP on NXP Automotive SoCs S32G2xx/S32G3xx/S32R45 - refactor EEE support to leverage the new driver API - optimize DMA and cache access to increase raw RX performances by 40% - TI: - icssg-prueth: add multicast filtering support for VLAN interface - netkit: - add ability to configure head/tailroom - VXLAN: - accepts packets with user-defined reserved bit - Ethernet switches: - Microchip: - lan969x: add RGMII support - lan969x: improve TX and RX performance using the FDMA engine - nVidia/Mellanox: - move Tx header handling to PCI driver, to ease XDP support - Ethernet PHYs: - Texas Instruments DP83822: - add support for GPIO2 clock output - Realtek: - 8169: add support for RTL8125D rev.b - rtl822x: add hwmon support for the temperature sensor - Microchip: - add support for RDS PTP hardware - consolidate periodic output signal generation - CAN: - several DT-bindings to DT schema conversions - tcan4x5x: - add HW standby support - support nWKRQ voltage selection - kvaser: - allowing Bus Error Reporting runtime configuration - WiFi: - the on-going Multi-Link Operation (MLO) effort continues, affecting both the stack and in drivers - mac80211/cfg80211: - Emergency Preparedness Communication Services (EPCS) station mode support - support for adding and removing station links for MLO - add support for WiFi 7/EHT mesh over 320 MHz channels - report Tx power info for each link - RealTek (rtw88): - enable USB Rx aggregation and USB 3 to improve performance - LED support - RealTek (rtw89): - refactor power save to support Multi-Link Operations - add support for RTL8922AE-VS variant - MediaTek (mt76): - single wiphy multiband support (preparation for MLO) - p2p device support - add TP-Link TXE50UH USB adapter support - Qualcomm (ath10k): - support for the QCA6698AQ IP core - Qualcomm (ath12k): - enable MLO for QCN9274 - Bluetooth: - Allow sysfs to trigger hdev reset, to allow recovering devices not responsive from user-space - MediaTek: add support for MT7922, MT7925, MT7921e devices - Realtek: add support for RTL8851BE devices - Qualcomm: add support for WCN785x devices - ISO: allow BIG re-sync" * tag 'net-next-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1386 commits) net/rose: prevent integer overflows in rose_setsockopt() net: phylink: fix regression when binding a PHY net: ethernet: ti: am65-cpsw: streamline TX queue creation and cleanup net: ethernet: ti: am65-cpsw: streamline RX queue creation and cleanup net: ethernet: ti: am65-cpsw: ensure proper channel cleanup in error path ipv6: Convert inet6_rtm_deladdr() to per-netns RTNL. ipv6: Convert inet6_rtm_newaddr() to per-netns RTNL. ipv6: Move lifetime validation to inet6_rtm_newaddr(). ipv6: Set cfg.ifa_flags before device lookup in inet6_rtm_newaddr(). ipv6: Pass dev to inet6_addr_add(). ipv6: Convert inet6_ioctl() to per-netns RTNL. ipv6: Hold rtnl_net_lock() in addrconf_init() and addrconf_cleanup(). ipv6: Hold rtnl_net_lock() in addrconf_dad_work(). ipv6: Hold rtnl_net_lock() in addrconf_verify_work(). ipv6: Convert net.ipv6.conf.${DEV}.XXX sysctl to per-netns RTNL. ipv6: Add __in6_dev_get_rtnl_net(). net: stmmac: Drop redundant skb_mark_for_recycle() for SKB frags net: mii: Fix the Speed display when the network cable is not connected sysctl net: Remove macro checks for CONFIG_SYSCTL eth: bnxt: update header sizing defaults ... commit 448a60e85ae2afe2cb760f5d2ed2c8a49d2bd1b4 Author: Huaisheng Ye Date: Wed Jan 15 23:26:00 2025 +0800 cxl/core/regs: Refactor out functions to count regblocks of given type cxl_find_regblock_instance() counts the number of instances of a register block as a side effect of searching through all available register blocks. cxl_count_regblock() throws away that work and recounts all the register blocks by asking cxl_find_regblock_instance() to redo work it has already done until it finally returns an error, that is needlessly wasteful. Let cxl_count_regblock() leverage the counting that cxl_find_regblock_instance() already does by passing in a sentinel value (CXL_INSTANCES_COUNT) that triggers the count to be returned. [ davej: Updated to more concise commit log supplied by djbw ] [ davej: Fix up checkpatch formatting warnings ] Signed-off-by: Huaisheng Ye Reviewed-by: Jonathan Cameron Reviewed-by: Dan Williams Link: https://patch.msgid.link/20250115152600.26482-2-huaisheng.ye@intel.com Signed-off-by: Dave Jiang drivers/cxl/core/regs.c | 56 ++++++++++++++++++++++++++++++------------------- drivers/cxl/cxl.h | 3 ++- drivers/cxl/pci.c | 6 +++++- 3 files changed, 41 insertions(+), 24 deletions(-) commit bda50f7770e5b8e730745e119eb6ca78570f7abf Author: Stefano Stabellini Date: Mon Jan 20 15:38:24 2025 -0800 xen: update pvcalls_front_accept prototype While currently there are no in-tree callers of these functions, it is best to keep them up-to-date with the latest network API. In addition, add the missing EXPORT_SYMBOL_GPL to the functions listed in pvcalls-front.h. Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross Message-ID: Signed-off-by: Juergen Gross drivers/xen/pvcalls-front.c | 14 ++++++++++++-- drivers/xen/pvcalls-front.h | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) commit 155c569fa4c3b340fbf8571a0e42dd415c025377 Author: Alexander Stein Date: Wed Jan 22 08:20:19 2025 +0100 regulator: core: Add missing newline character dev_err_probe() error messages need newline character. Fixes: 6eabfc018e8d ("regulator: core: Allow specifying an initial load w/ the bulk API") Signed-off-by: Alexander Stein Link: https://patch.msgid.link/20250122072019.1926093-1-alexander.stein@ew.tq-group.com Signed-off-by: Mark Brown drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2cd92185db0586f2136feae84d98cc54580f381 Author: Arnd Bergmann Date: Wed Jan 22 07:53:17 2025 +0100 ASoC: fsl_asrc_m2m: select CONFIG_DMA_SHARED_BUFFER Randconfig builds without dmabuf result in this link error from the fasl-asrc driver: ERROR: modpost: "dma_buf_put" [sound/core/snd-compress.ko] undefined! ERROR: modpost: "dma_buf_export" [sound/soc/fsl/snd-soc-fsl-asrc.ko] undefined! Add the missing 'select' statement. Fixes: 24a01710f627 ("ASoC: fsl_asrc_m2m: Add memory to memory function") Signed-off-by: Arnd Bergmann Reviewed-by: Daniel Baluta Link: https://patch.msgid.link/20250122065330.1423248-1-arnd@kernel.org Signed-off-by: Mark Brown sound/soc/fsl/Kconfig | 1 + 1 file changed, 1 insertion(+) commit e935f903ab9bee43f3375883c230a32138ae3d1d Author: Ivaylo Dimitrov Date: Tue Jan 21 08:48:15 2025 +0200 ASoC: audio-graph-card2: use correct endpoint when getting link parameters When link DT nodes are parsed, most functions get port as a parameter, which results in port endpoint@0 always being used. However, each endpoint might have different settings, but those are currently ignored. Fix that by passing endpoint instead of port when parsing link parameters. Signed-off-by: Ivaylo Dimitrov Acked-by: Kuninori Morimoto Link: https://patch.msgid.link/20250121064815.741820-1-ivo.g.dimitrov.75@gmail.com Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card2.c | 62 ++++++++++++++++------------------- 1 file changed, 29 insertions(+), 33 deletions(-) commit b76b3ee5573fd6ff8761d82feb74d707eb2139ef Author: Alexander Boehm Date: Wed Jan 22 10:29:27 2025 +0200 ASoC: SOF: imx8m: add SAI2,5,6,7 Added the remaining SAIs in addition to SAI1 and SAI3. There is no SAI4. Signed-off-by: Alexander Boehm Reviewed-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Signed-off-by: Daniel Baluta Reviewed-by: Iuliana Prodan Link: https://patch.msgid.link/20250122082928.1321536-1-daniel.baluta@nxp.com Signed-off-by: Mark Brown sound/soc/sof/imx/imx8m.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 9ec80025030b0492512e01e2e667f4111c583b46 Merge: f51df260e82b c7345869aa38 Author: Arnd Bergmann Date: Wed Jan 22 14:35:13 2025 +0100 Merge tag 'litex-6.13-rc1' of https://github.com/litex-hub/linux into soc/drivers LiteX updates for next Remaining LiteX updates from 2024, reviewed and successfully tested against v6.13-rc1. Signed-off-by: Gabriel Somlo * tag 'litex-6.13-rc1' of https://github.com/litex-hub/linux: drivers/soc/litex: Use devm_register_restart_handler() Link: https://lore.kernel.org/r/Z41PgCffqPUTyxkE@errol.ini.cmu.edu Signed-off-by: Arnd Bergmann commit b5d1e6ee761a109400e97ac6a1b91c57d0f6a43a Author: James Bottomley Date: Tue Jan 7 13:31:29 2025 -0800 efivarfs: add variable resync after hibernation Hibernation allows other OSs to boot and thus the variable state might be altered by the time the hibernation image is resumed. Resync the variable state by looping over all the dentries and update the size (in case of alteration) delete any which no-longer exist. Finally, loop over all efi variables creating any which don't have corresponding dentries. Signed-off-by: James Bottomley [ardb: - apply error pointer fixup from Dan Carpenter - rebase onto latest version of James's efivarfs rework] Signed-off-by: Ard Biesheuvel fs/efivarfs/internal.h | 3 +- fs/efivarfs/super.c | 151 ++++++++++++++++++++++++++++++++++++++++++++++++- fs/efivarfs/vars.c | 6 +- 3 files changed, 156 insertions(+), 4 deletions(-) commit 0e2f98da2071bae0f07135adb9b3efdb737aaee6 Author: James Bottomley Date: Tue Jan 7 13:31:28 2025 -0800 efivarfs: abstract initial variable creation routine Reuse later for variable creation after hibernation Signed-off-by: James Bottomley Signed-off-by: Ard Biesheuvel fs/efivarfs/super.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit 8ba14d9f490aef9fd535c04e9e62e1169eb7a055 Author: Nathan Chancellor Date: Tue Jan 21 18:11:34 2025 -0700 efi: libstub: Use '-std=gnu11' to fix build with GCC 15 GCC 15 changed the default C standard version to C23, which should not have impacted the kernel because it requests the gnu11 standard via '-std=' in the main Makefile. However, the EFI libstub Makefile uses its own set of KBUILD_CFLAGS for x86 without a '-std=' value (i.e., using the default), resulting in errors from the kernel's definitions of bool, true, and false in stddef.h, which are reserved keywords under C23. ./include/linux/stddef.h:11:9: error: expected identifier before ‘false’ 11 | false = 0, ./include/linux/types.h:35:33: error: two or more data types in declaration specifiers 35 | typedef _Bool bool; Set '-std=gnu11' in the x86 cflags to resolve the error and consistently use the same C standard version for the entire kernel. All other architectures reuse KBUILD_CFLAGS from the rest of the kernel, so this issue is not visible for them. Cc: stable@vger.kernel.org Reported-by: Kostadin Shishmanov Closes: https://lore.kernel.org/4OAhbllK7x4QJGpZjkYjtBYNLd_2whHx9oFiuZcGwtVR4hIzvduultkgfAIRZI3vQpZylu7Gl929HaYFRGeMEalWCpeMzCIIhLxxRhq4U-Y=@protonmail.com/ Reported-by: Jakub Jelinek Closes: https://lore.kernel.org/Z4467umXR2PZ0M1H@tucnak/ Signed-off-by: Nathan Chancellor Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c40ca9ef7c5c9bbb0d2f7774c87417cc4f1713bf Author: Arnd Bergmann Date: Wed Jan 22 10:02:03 2025 +0100 drm: select DRM_KMS_HELPER from DRM_GEM_SHMEM_HELPER In the combination of DRM_KMS_HELPER=m, DRM_GEM_SHMEM_HELPER=y, DRM_FBDEV_EMULATION=y, The shmem code fails to link against the KMS helpers: x86_64-linux-ld: vmlinux.o: in function `drm_fbdev_shmem_driver_fbdev_probe': (.text+0xeec601): undefined reference to `drm_fb_helper_alloc_info' x86_64-linux-ld: (.text+0xeec633): undefined reference to `drm_fb_helper_fill_info' x86_64-linux-ld: vmlinux.o: in function `drm_fbdev_shmem_get_page': drm_fbdev_shmem.c:(.text+0xeec7d2): undefined reference to `drm_gem_fb_get_obj' x86_64-linux-ld: vmlinux.o: in function `drm_fbdev_shmem_fb_mmap': drm_fbdev_shmem.c:(.text+0xeec9f6): undefined reference to `drm_gem_fb_get_obj' x86_64-linux-ld: vmlinux.o: in function `drm_fbdev_shmem_defio_imageblit': (.rodata+0x5b2288): undefined reference to `drm_fb_helper_check_var' x86_64-linux-ld: (.rodata+0x5b2290): undefined reference to `drm_fb_helper_set_par' This can happen for a number of device drivers that select DRM_GEM_SHMEM_HELPER without also selecting DRM_KMS_HELPER. To work around this, add another select that forces DRM_KMS_HELPER to be built-in rather than a loadable module, but only if FBDEV emulation is also enabled. DRM_TTM_HELPER and DRM_GEM_DMA_HELPER look like they have the same problem in theory even if there is no possible configuration that shows it. For consistency, do the same change to those. Closes: https://lore.kernel.org/all/20250121-greedy-flounder-of-abundance-4d2ee8-mkl@pengutronix.de Reported-by: Marc Kleine-Budde Tested-by: Marc Kleine-Budde Reviewed-by: Thomas Zimmermann Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20250122090211.3161186-1-arnd@kernel.org drivers/gpu/drm/Kconfig | 3 +++ 1 file changed, 3 insertions(+) commit 6aa96f780204bfdac225eb4c8f51f86c38cc1a26 Author: Takashi Iwai Date: Wed Jan 22 09:47:55 2025 +0100 ALSA: hda: tas2781-spi: Fix bogus error handling in tas2781_hda_spi_probe() The error handling in tas2781_hda_spi_probe() has quite a few problems, as reported by Dan Carpenter. The code jumps to err label and calls tas2781_hda_remove(), but this call would rather crash. In some places, no error code is set properly, and the runtime PM setup is doubly done. This patch tries to address those bogus error handling. Basically we can return immediately at each error before adding the component. Also, the error code should be set properly for the unmatched SPI device name. And finally, component_add() should be added before enabling the runtime PM. Fixes: bb5f86ea50ff ("ALSA: hda/tas2781: Add tas2781 hda SPI driver") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/ae5fcd48-58ac-49a8-a434-5f779bad0fb7@stanley.mountain Link: https://patch.msgid.link/20250122084756.23876-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/pci/hda/tas2781_hda_spi.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit f79b163c42314a1f46f4bcc40a19c8a75cf1e7a3 Author: Greg Kroah-Hartman Date: Wed Jan 22 10:35:56 2025 +0100 Revert "serial: 8250: Switch to nbcon console" This reverts commit b63e6f60eab45b16a1bf734fef9035a4c4187cd5. kernel test robot has found problems with this commit so revert it for now. Link: https://lore.kernel.org/r/202501221029.fb0d574d-lkp@intel.com Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202501221029.fb0d574d-lkp@intel.com Cc: John Ogness Cc: Petr Mladek Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_core.c | 35 +------ drivers/tty/serial/8250/8250_port.c | 180 +++++++----------------------------- include/linux/serial_8250.h | 13 +-- 3 files changed, 41 insertions(+), 187 deletions(-) commit 244eb5c6ec62ccab59ecac1f4815bb33130c423a Author: Greg Kroah-Hartman Date: Wed Jan 22 10:34:25 2025 +0100 Revert "serial: 8250: Revert "drop lockdep annotation from serial8250_clear_IER()"" This reverts commit 422c9727b07f9f86e2ec11c56622e566221591cc. kernel test robot has found problems with this commit so revert it for now. Link: https://lore.kernel.org/r/202501221029.fb0d574d-lkp@intel.com Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202501221029.fb0d574d-lkp@intel.com Cc: John Ogness Cc: Petr Mladek Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 3 --- 1 file changed, 3 deletions(-) commit 807563cdc85dac2d151d7d93676d1551d067c72b Author: Dan Carpenter Date: Wed Jan 22 10:18:13 2025 +0300 ALSA: hda: tas2781-spi: Fix error code in tas2781_read_acpi() Propagate the error code from devm_gpiod_get_index_optional(). The current code returns success. Fixes: bb5f86ea50ff ("ALSA: hda/tas2781: Add tas2781 hda SPI driver") Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/6103e81a-13bf-4eab-89af-f6830c14e14c@stanley.mountain Signed-off-by: Takashi Iwai sound/pci/hda/tas2781_hda_spi.c | 1 + 1 file changed, 1 insertion(+) commit be125a0b8946a69cd8d91340ae14ec72ef6558fc Author: Dan Carpenter Date: Wed Jan 22 10:18:06 2025 +0300 ALSA: hda: tas2781-spi: Delete some dead code The scnprintf() function never returns negatives. And it won't return zero here either, plus if it did we'd need to fix the error code. Delete this dead code. Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/d57ded9e-9969-4922-8347-67b758499483@stanley.mountain Signed-off-by: Takashi Iwai sound/pci/hda/tas2781_hda_spi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 5f537664e705b0bf8b7e329861f20128534f6a83 Author: Linus Torvalds Date: Tue Jan 21 09:27:22 2025 -0800 cachestat: fix page cache statistics permission checking When the 'cachestat()' system call was added in commit cf264e1329fb ("cachestat: implement cachestat syscall"), it was meant to be a much more convenient (and performant) version of mincore() that didn't need mapping things into the user virtual address space in order to work. But it ended up missing the "check for writability or ownership" fix for mincore(), done in commit 134fca9063ad ("mm/mincore.c: make mincore() more conservative"). This just adds equivalent logic to 'cachestat()', modified for the file context (rather than vma). Reported-by: Sudheendra Raghav Neela Fixes: cf264e1329fb ("cachestat: implement cachestat syscall") Tested-by: Johannes Weiner Acked-by: Johannes Weiner Acked-by: Nhat Pham Signed-off-by: Linus Torvalds mm/filemap.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit c4b9570cfb63501638db720f3bee9f6dfd044b82 Merge: 690ffcd817ea e92eebb0d611 Author: Linus Torvalds Date: Tue Jan 21 20:12:24 2025 -0800 Merge tag 'audit-pr-20250121' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit update from Paul Moore: "A single audit patch that fixes a problem when collecting pathnames for audit PATH records that was caused by some faulty pathname matching logic" * tag 'audit-pr-20250121' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: fix suffixed '/' filename matching commit 690ffcd817eaad3bd25a24dd8d63d9d97adf5cfe Merge: f96a974170b7 01c2253a0fbd Author: Linus Torvalds Date: Tue Jan 21 20:09:14 2025 -0800 Merge tag 'selinux-pr-20250121' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux updates from Paul Moore: - Extended permissions supported in conditional policy The SELinux extended permissions, aka "xperms", allow security admins to target individuals ioctls, and recently netlink messages, with their SELinux policy. Adding support for conditional policies allows admins to toggle the granular xperms using SELinux booleans, helping pave the way for greater use of xperms in general purpose SELinux policies. This change bumps the maximum SELinux policy version to 34. - Fix a SCTP/SELinux error return code inconsistency Depending on the loaded SELinux policy, specifically it's EXTSOCKCLASS support, the bind(2) LSM/SELinux hook could return different error codes due to the SELinux code checking the socket's SELinux object class (which can vary depending on EXTSOCKCLASS) and not the socket's sk_protocol field. We fix this by doing the obvious, and looking at the sock->sk_protocol field instead of the object class. - Makefile fixes to properly cleanup av_permissions.h Add av_permissions.h to "targets" so that it is properly cleaned up using the kbuild infrastructure. - A number of smaller improvements by Christian Göttsche A variety of straightforward changes to reduce code duplication, reduce pointer lookups, migrate void pointers to defined types, simplify code, constify function parameters, and correct iterator types. * tag 'selinux-pr-20250121' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: make more use of str_read() when loading the policy selinux: avoid unnecessary indirection in struct level_datum selinux: use known type instead of void pointer selinux: rename comparison functions for clarity selinux: rework match_ipv6_addrmask() selinux: constify and reconcile function parameter names selinux: avoid using types indicating user space interaction selinux: supply missing field initializers selinux: add netlink nlmsg_type audit message selinux: add support for xperms in conditional policies selinux: Fix SCTP error inconsistency in selinux_socket_bind() selinux: use native iterator types selinux: add generated av_permissions.h to targets commit c9c8a17f7aa65b713418626573c5695c2a5d8ecd Author: Kent Overstreet Date: Tue Jan 21 23:03:08 2025 -0500 bcachefs: bset_blacklisted_journal_seq is now AUTOFIX Signed-off-by: Kent Overstreet fs/bcachefs/sb-errors_format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f96a974170b749e3a56844e25b31d46a7233b6f6 Merge: 678ca9f78e40 714d87c90a76 Author: Linus Torvalds Date: Tue Jan 21 20:03:04 2025 -0800 Merge tag 'lsm-pr-20250121' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm Pull lsm updates from Paul Moore: - Improved handling of LSM "secctx" strings through lsm_context struct The LSM secctx string interface is from an older time when only one LSM was supported, migrate over to the lsm_context struct to better support the different LSMs we now have and make it easier to support new LSMs in the future. These changes explain the Rust, VFS, and networking changes in the diffstat. - Only build lsm_audit.c if CONFIG_SECURITY and CONFIG_AUDIT are enabled Small tweak to be a bit smarter about when we build the LSM's common audit helpers. - Check for absurdly large policies from userspace in SafeSetID SafeSetID policies rules are fairly small, basically just "UID:UID", it easy to impose a limit of KMALLOC_MAX_SIZE on policy writes which helps quiet a number of syzbot related issues. While work is being done to address the syzbot issues through other mechanisms, this is a trivial and relatively safe fix that we can do now. - Various minor improvements and cleanups A collection of improvements to the kernel selftests, constification of some function parameters, removing redundant assignments, and local variable renames to improve readability. * tag 'lsm-pr-20250121' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: lockdown: initialize local array before use to quiet static analysis safesetid: check size of policy writes net: corrections for security_secid_to_secctx returns lsm: rename variable to avoid shadowing lsm: constify function parameters security: remove redundant assignment to return variable lsm: Only build lsm_audit.c if CONFIG_SECURITY and CONFIG_AUDIT are set selftests: refactor the lsm `flags_overset_lsm_set_self_attr` test binder: initialize lsm_context structure rust: replace lsm context+len with lsm_context lsm: secctx provider check on release lsm: lsm_context in security_dentry_init_security lsm: use lsm_context in security_inode_getsecctx lsm: replace context+len with lsm_context lsm: ensure the correct LSM context releaser commit 678ca9f78e40ec8ebbd054b0c22bd3b5ecc6c7e4 Merge: 0ca0cf9f8cb1 6f71ad02aae8 Author: Linus Torvalds Date: Tue Jan 21 19:59:46 2025 -0800 Merge tag 'Smack-for-6.14' of https://github.com/cschaufler/smack-next Pull smack update from Casey Schaufler: "One minor code improvement for v6.14" * tag 'Smack-for-6.14' of https://github.com/cschaufler/smack-next: smack: deduplicate access to string conversion commit 0ca0cf9f8cb16e3850e5242d68a1825d286e6a68 Merge: 7dd457a2fd78 4785ed362a24 Author: Linus Torvalds Date: Tue Jan 21 19:54:32 2025 -0800 Merge tag 'integrity-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity updates from Mimi Zohar: "There's just a couple of changes: two kernel messages addressed, a measurement policy collision addressed, and one policy cleanup. Please note that the contents of the IMA measurement list is potentially affected. The builtin tmpfs IMA policy rule change might introduce additional measurements, while detecting a reboot might eliminate some measurements" * tag 'integrity-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: ima: ignore suffixed policy rule comments ima: limit the builtin 'tcb' dont_measure tmpfs policy rule ima: kexec: silence RCU list traversal warning ima: Suspend PCR extends and log appends when rebooting commit 7dd457a2fd78f3dd39aad4579d13e9eed2effbca Merge: b394eabd539d 7543d5702c2c Author: Linus Torvalds Date: Tue Jan 21 19:51:28 2025 -0800 Merge tag 'chrome-platform-firmware-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform firmware updates from Tzung-Bi Shih: - Constify 'struct bin_attribute'. * tag 'chrome-platform-firmware-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: firmware: google: vpd: Use const 'struct bin_attribute' callback firmware: google: memconsole: Use const 'struct bin_attribute' callback firmware: google: gsmi: Constify 'struct bin_attribute' firmware: google: cbmem: Constify 'struct bin_attribute' commit b394eabd539d01db10e27b57ac2497cbd1d32c6d Merge: d0f93ac2c384 fccebbdde206 Author: Linus Torvalds Date: Tue Jan 21 19:48:29 2025 -0800 Merge tag 'chrome-platform-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform updates from Tzung-Bi Shih: "New: - Support new EC if the memory region information comes from the CRS ACPI resource descriptor in cros_ec_lpc Improvements: - Make sure EC is in RW before probing - Only check events on MKBP notifies to reduce the number of query commands in cros_ec_lpc Cleanups: - Remove unused code and DT bindings for cros-kbd-led-backlight - Constify 'struct bin_attribute' in cros_ec_vbc - Use str_enabled_disabled() in cros_usbpd_logger" * tag 'chrome-platform-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: cros_ec_lpc: Handle EC without CRS section platform/chrome: cros_usbpd_logger: Use str_enabled_disabled() helper platform/chrome: cros_ec_lpc: Support direct EC register memory access platform/chrome: cros_ec_lpc: Merge lpc_driver_ops into ec private structure platform/chrome: Update ChromeOS EC command tracing platform/chrome: cros_ec_lpc: Only check for events on MKBP notifies platform/chrome: cros_ec_vbc: Constify 'struct bin_attribute' dt-bindings: cros-ec: Remove google,cros-kbd-led-backlight platform/chrome: cros_kbd_led_backlight: Remove OF match platform/chrome: cros_ec_proto: remove unnecessary retries platform/chrome: cros_ec: jump to RW before probing platform/chrome: cros_kbd_led_backlight: remove unneeded if-statement commit 66611c0475709607f398e2a5d691b1fc72fe9dfc Author: Steven Rostedt Date: Tue Jan 21 19:44:36 2025 -0500 fgraph: Remove calltime and rettime from generic operations The function graph infrastructure is now generic so that kretprobes, fprobes and BPF can use it. But there is still some leftover logic that only the function graph tracer itself uses. This is the calculation of the calltime and return time of the functions. The calculation of the calltime has been moved into the function graph tracer and those users that need it so that it doesn't cause overhead to the other users. But the return function timestamp was still called. Instead of just moving the taking of the timestamp into the function graph trace remove the calltime and rettime completely from the ftrace_graph_ret structure. Instead, move it into the function graph return entry event structure and this also moves all the calltime and rettime logic out of the generic fgraph.c code and into the tracing code that uses it. This has been reported to decrease the overhead by ~27%. Link: https://lore.kernel.org/all/Z3aSuql3fnXMVMoM@krava/ Link: https://lore.kernel.org/all/173665959558.1629214.16724136597211810729.stgit@devnote2/ Cc: Mark Rutland Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250121194436.15bdf71a@gandalf.local.home Reported-by: Jiri Olsa Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) include/linux/ftrace.h | 2 -- kernel/trace/fgraph.c | 1 - kernel/trace/trace.h | 4 +++- kernel/trace/trace_entries.h | 8 ++++---- kernel/trace/trace_functions_graph.c | 33 +++++++++++++++++++-------------- kernel/trace/trace_irqsoff.c | 5 +++-- kernel/trace/trace_sched_wakeup.c | 6 ++++-- 7 files changed, 33 insertions(+), 26 deletions(-) commit d0f93ac2c384c40202cf393fa7e8a2cac7004ba1 Merge: e3610441d1fb 6912bdb7c676 Author: Linus Torvalds Date: Tue Jan 21 18:00:00 2025 -0800 Merge tag 'docs-6.14' of git://git.lwn.net/linux Pull Documentation updates from Jonathan Corbet: - Quite a bit of Chinese and Spanish translation work - Clarifying that Git commit IDs >12chars are OK - A new nvme-multipath document - A reorganization of the admin-guide top-level page to make it readable - Clarification of the role of Acked-by and maintainer discretion on their acceptance - Some reorganization of debugging-oriented docs ... and typo fixes, documentation updates, etc as usual * tag 'docs-6.14' of git://git.lwn.net/linux: (50 commits) Documentation: Fix x86_64 UEFI outdated references to elilo Documentation/sysctl: Add timer_migration to kernel.rst docs/mm: Physical memory: Remove zone_t docs: submitting-patches: clarify that signers may use their discretion on tags docs: submitting-patches: clarify difference between Acked-by and Reviewed-by docs: submitting-patches: clarify Acked-by and introduce "# Suffix" Documentation: bug-hunting.rst: remove odd contact information docs/zh_CN: Add sak index Chinese translation doc: module: DEFAULT_SYMBOL_NAMESPACE must be defined before #includes doc: module: Fix documented type of namespace Documentation/kernel-parameters: Fix a reference to vga-softcursor.rst docs/zh_CN: Add landlock index Chinese translation Documentation: Fix typo localmodonfig -> localmodconfig overlayfs.rst: Fix and improve grammar docs/zh_CN: Add siphash index Chinese translation docs/zh_CN: Add security IMA-templates Chinese translation docs/zh_CN: Add security digsig Chinese translation Align git commit ID abbreviation guidelines and checks docs: process: submitting-patches: split canonical patch format section docs/zh_CN: Add security lsm Chinese translation ... commit e3610441d1fb47b1f00e4c38bdf333176e824729 Merge: 1d6d3992235e ceff0757f5da Author: Linus Torvalds Date: Tue Jan 21 17:48:03 2025 -0800 Merge tag 'rust-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux Pull rust updates from Miguel Ojeda: "Toolchain and infrastructure: - Finish the move to custom FFI integer types started in the previous cycle and finally map 'long' to 'isize' and 'char' to 'u8'. Do a few cleanups on top thanks to that. - Start to use 'derive(CoercePointee)' on Rust >= 1.84.0. This is a major milestone on the path to build the kernel using only stable Rust features. In particular, previously we were using the unstable features 'coerce_unsized', 'dispatch_from_dyn' and 'unsize', and now we will use the new 'derive_coerce_pointee' one, which is on track to stabilization. This new feature is a macro that essentially expands into code that internally uses the unstable features that we were using before, without having to expose those. With it, stable Rust users, including the kernel, will be able to build custom smart pointers that work with trait objects, e.g.: fn f(p: &Arc) { pr_info!("{p}\n"); } let a: Arc = Arc::new(42i32, GFP_KERNEL)?; let b: Arc = Arc::new("hello there", GFP_KERNEL)?; f(&a); // Prints "42". f(&b); // Prints "hello there". Together with the 'arbitrary_self_types' feature that we started using in the previous cycle, using our custom smart pointers like 'Arc' will eventually only rely in stable Rust. - Introduce 'PROCMACROLDFLAGS' environment variable to allow to link Rust proc macros using different flags than those used for linking Rust host programs (e.g. when 'rustc' uses a different C library than the host programs' one), which Android needs. - Help kernel builds under macOS with Rust enabled by accomodating other naming conventions for dynamic libraries (i.e. '.so' vs. '.dylib') which are used for Rust procedural macros. The actual support for macOS (i.e. the rest of the pieces needed) is provided out-of-tree by others, following the policy used for other parts of the kernel by Kbuild. - Run Clippy for 'rusttest' code too and clean the bits it spotted. - Provide Clippy with the minimum supported Rust version to improve the suggestions it gives. - Document 'bindgen' 0.71.0 regression. 'kernel' crate: - 'build_error!': move users of the hidden function to the documented macro, prevent such uses in the future by moving the function elsewhere and add the macro to the prelude. - 'types' module: add improved version of 'ForeignOwnable::borrow_mut' (which was removed in the past since it was problematic); change 'ForeignOwnable' pointer type to '*mut'. - 'alloc' module: implement 'Display' for 'Box' and align the 'Debug' implementation to it; add example (doctest) for 'ArrayLayout::new()' - 'sync' module: document 'PhantomData' in 'Arc'; use 'NonNull::new_unchecked' in 'ForeignOwnable for Arc' impl. - 'uaccess' module: accept 'Vec's with different allocators in 'UserSliceReader::read_all'. - 'workqueue' module: enable run-testing a couple more doctests. - 'error' module: simplify 'from_errno()'. - 'block' module: fix formatting in code documentation (a lint to catch these is being implemented). - Avoid 'unwrap()'s in doctests, which also improves the examples by showing how kernel code is supposed to be written. - Avoid 'as' casts with 'cast{,_mut}' calls which are a bit safer. And a few other cleanups" * tag 'rust-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux: (32 commits) kbuild: rust: add PROCMACROLDFLAGS rust: uaccess: generalize userSliceReader to support any Vec rust: kernel: add improved version of `ForeignOwnable::borrow_mut` rust: kernel: reorder `ForeignOwnable` items rust: kernel: change `ForeignOwnable` pointer to mut rust: arc: split unsafe block, add missing comment rust: types: avoid `as` casts rust: arc: use `NonNull::new_unchecked` rust: use derive(CoercePointee) on rustc >= 1.84.0 rust: alloc: add doctest for `ArrayLayout::new()` rust: init: update `stack_try_pin_init` examples rust: error: import `kernel`'s `LayoutError` instead of `core`'s rust: str: replace unwraps with question mark operators rust: page: remove unnecessary helper function from doctest rust: rbtree: remove unwrap in asserts rust: init: replace unwraps with question mark operators rust: use host dylib naming convention to support macOS rust: add `build_error!` to the prelude rust: kernel: move `build_error` hidden function to prevent mistakes rust: use the `build_error!` macro, not the hidden function ... commit 1d6d3992235ed08929846f98fecf79682e0b422c Merge: 96c84703f1cf d8b4bf4ea04d Author: Linus Torvalds Date: Tue Jan 21 17:10:05 2025 -0800 Merge tag 'kthread-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks Pull kthread updates from Frederic Weisbecker: "Kthreads affinity follow either of 4 existing different patterns: 1) Per-CPU kthreads must stay affine to a single CPU and never execute relevant code on any other CPU. This is currently handled by smpboot code which takes care of CPU-hotplug operations. Affinity here is a correctness constraint. 2) Some kthreads _have_ to be affine to a specific set of CPUs and can't run anywhere else. The affinity is set through kthread_bind_mask() and the subsystem takes care by itself to handle CPU-hotplug operations. Affinity here is assumed to be a correctness constraint. 3) Per-node kthreads _prefer_ to be affine to a specific NUMA node. This is not a correctness constraint but merely a preference in terms of memory locality. kswapd and kcompactd both fall into this category. The affinity is set manually like for any other task and CPU-hotplug is supposed to be handled by the relevant subsystem so that the task is properly reaffined whenever a given CPU from the node comes up. Also care should be taken so that the node affinity doesn't cross isolated (nohz_full) cpumask boundaries. 4) Similar to the previous point except kthreads have a _preferred_ affinity different than a node. Both RCU boost kthreads and RCU exp kworkers fall into this category as they refer to "RCU nodes" from a distinctly distributed tree. Currently the preferred affinity patterns (3 and 4) have at least 4 identified users, with more or less success when it comes to handle CPU-hotplug operations and CPU isolation. Each of which do it in its own ad-hoc way. This is an infrastructure proposal to handle this with the following API changes: - kthread_create_on_node() automatically affines the created kthread to its target node unless it has been set as per-cpu or bound with kthread_bind[_mask]() before the first wake-up. - kthread_affine_preferred() is a new function that can be called right after kthread_create_on_node() to specify a preferred affinity different than the specified node. When the preferred affinity can't be applied because the possible targets are offline or isolated (nohz_full), the kthread is affine to the housekeeping CPUs (which means to all online CPUs most of the time or only the non-nohz_full CPUs when nohz_full= is set). kswapd, kcompactd, RCU boost kthreads and RCU exp kworkers have been converted, along with a few old drivers. Summary of the changes: - Consolidate a bunch of ad-hoc implementations of kthread_run_on_cpu() - Introduce task_cpu_fallback_mask() that defines the default last resort affinity of a task to become nohz_full aware - Add some correctness check to ensure kthread_bind() is always called before the first kthread wake up. - Default affine kthread to its preferred node. - Convert kswapd / kcompactd and remove their halfway working ad-hoc affinity implementation - Implement kthreads preferred affinity - Unify kthread worker and kthread API's style - Convert RCU kthreads to the new API and remove the ad-hoc affinity implementation" * tag 'kthread-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks: kthread: modify kernel-doc function name to match code rcu: Use kthread preferred affinity for RCU exp kworkers treewide: Introduce kthread_run_worker[_on_cpu]() kthread: Unify kthread_create_on_cpu() and kthread_create_worker_on_cpu() automatic format rcu: Use kthread preferred affinity for RCU boost kthread: Implement preferred affinity mm: Create/affine kswapd to its preferred node mm: Create/affine kcompactd to its preferred node kthread: Default affine kthread to its preferred NUMA node kthread: Make sure kthread hasn't started while binding it sched,arm64: Handle CPU isolation on last resort fallback rq selection arm64: Exclude nohz_full CPUs from 32bits el0 support lib: test_objpool: Use kthread_run_on_cpu() kallsyms: Use kthread_run_on_cpu() soc/qman: test: Use kthread_run_on_cpu() arm/bL_switcher: Use kthread_run_on_cpu() commit 96c84703f1cf6ea43617f9565166681cd71df104 Merge: c0e75905caf3 951a6bf30667 Author: Linus Torvalds Date: Tue Jan 21 16:09:47 2025 -0800 Merge tag 'drm-next-2025-01-17' of https://gitlab.freedesktop.org/drm/kernel Pull drm updates from Dave Airlie: "There are two external interactions of note, the msm tree pull in some opp tree, hopefully the opp tree arrives from the same git tree however it normally does. There is also a new cgroup controller for device memory, that is used by drm, so is merging through my tree. This will hopefully help open up gpu cgroup usage a bit more and move us forward. There is a new accelerator driver for the AMD XDNA Ryzen AI NPUs. Then the usual xe/amdgpu/i915/msm leaders and lots of changes and refactors across the board: core: - device memory cgroup controller added - Remove driver date from drm_driver - Add drm_printer based hex dumper - drm memory stats docs update - scheduler documentation improvements new driver: - amdxdna - Ryzen AI NPU support connector: - add a mutex to protect ELD - make connector setup two-step panels: - Introduce backlight quirks infrastructure - New panels: KDB KD116N2130B12, Tianma TM070JDHG34-00, - Multi-Inno Technology MI1010Z1T-1CP11 bridge: - ti-sn65dsi83: Add ti,lvds-vod-swing optional properties - Provide default implementation of atomic_check for HDMI bridges - it605: HDCP improvements, MCCS Support xe: - make OA buffer size configurable - GuC capture fixes - add ufence and g2h flushes - restore system memory GGTT mappings - ioctl fixes - SRIOV PF scheduling priority - allow fault injection - lots of improvements/refactors - Enable GuC's WA_DUAL_QUEUE for newer platforms - IRQ related fixes and improvements i915: - More accurate engine busyness metrics with GuC submission - Ensure partial BO segment offset never exceeds allowed max - Flush GuC CT receive tasklet during reset preparation - Some DG2 refactor to fix DG2 bugs when operating with certain CPUs - Fix DG1 power gate sequence - Enabling uncompressed 128b/132b UHBR SST - Handle hdmi connector init failures, and no HDMI/DP cases - More robust engine resets on Haswell and older i915/xe display: - HDCP fixes for Xe3Lpd - New GSC FW ARL-H/ARL-U - support 3 VDSC engines 12 slices - MBUS joining sanitisation - reconcile i915/xe display power mgmt - Xe3Lpd fixes - UHBR rates for Thunderbolt amdgpu: - DRM panic support - track BO memory stats at runtime - Fix max surface handling in DC - Cleaner shader support for gfx10.3 dGPUs - fix drm buddy trim handling - SDMA engine reset updates - Fix doorbell ttm cleanup - RAS updates - ISP updates - SDMA queue reset support - Rework DPM powergating interfaces - Documentation updates and cleanups - DCN 3.5 updates - Use a pm notifier to more gracefully handle VRAM eviction on suspend or hibernate - Add debugfs interfaces for forcing scheduling to specific engine instances - GG 9.5 updates - IH 4.4 updates - Make missing optional firmware less noisy - PSP 13.x updates - SMU 13.x updates - VCN 5.x updates - JPEG 5.x updates - GC 12.x updates - DC FAMS updates amdkfd: - GG 9.5 updates - Logging improvements - Shader debugger fixes - Trap handler cleanup - Cleanup includes - Eviction fence wq fix msm: - MDSS: - properly described UBWC registers - added SM6150 (aka QCS615) support - DPU: - added SM6150 (aka QCS615) support - enabled wide planes if virtual planes are enabled (by using two SSPPs for a single plane) - added CWB hardware blocks support - DSI: - added SM6150 (aka QCS615) support - GPU: - Print GMU core fw version - GMU bandwidth voting for a740 and a750 - Expose uche trap base via uapi - UAPI error reporting rcar-du: - Add r8a779h0 Support ivpu: - Fix qemu crash when using passthrough nouveau: - expose GSP-RM logging buffers via debugfs panfrost: - Add MT8188 Mali-G57 MC3 support rockchip: - Gamma LUT support hisilicon: - new HIBMC support virtio-gpu: - convert to helpers - add prime support for scanout buffers v3d: - Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL vc4: - Add support for BCM2712 vkms: - line-per-line compositing algorithm to improve performance zynqmp: - Add DP audio support mediatek: - dp: Add sdp path reset - dp: Support flexible length of DP calibration data etnaviv: - add fdinfo memory support - add explicit reset handling" * tag 'drm-next-2025-01-17' of https://gitlab.freedesktop.org/drm/kernel: (1070 commits) drm/bridge: fix documentation for the hdmi_audio_prepare() callback doc/cgroup: Fix title underline length drm/doc: Include new drm-compute documentation cgroup/dmem: Fix parameters documentation cgroup/dmem: Select PAGE_COUNTER kernel/cgroup: Remove the unused variable climit drm/display: hdmi: Do not read EDID on disconnected connectors drm/tests: hdmi: Add connector disablement test drm/connector: hdmi: Do atomic check when necessary drm/amd/display: 3.2.316 drm/amd/display: avoid reset DTBCLK at clock init drm/amd/display: improve dpia pre-train drm/amd/display: Apply DML21 Patches drm/amd/display: Use HW lock mgr for PSR1 drm/amd/display: Revised for Replay Pseudo vblank control drm/amd/display: Add a new flag for replay low hz drm/amd/display: Remove unused read_ono_state function from Hwss module drm/amd/display: Do not elevate mem_type change to full update drm/amd/display: Do not wait for PSR disable on vbl enable drm/amd/display: Remove unnecessary eDP power down ... commit 04aa999eb96fdc8d3cf2b2d98363d6372befaef2 Author: Conor Dooley Date: Fri Oct 11 15:00:43 2024 +0100 dt-bindings: PCI: microchip,pcie-host: Allow dma-noncoherent 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. Link: https://lore.kernel.org/r/20241011140043.1250030-4-daire.mcnamara@microchip.com Signed-off-by: Conor Dooley Signed-off-by: Daire McNamara Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 1390a33b3d04fdf6ba4e3e7082107a12027fc188 Author: Daire McNamara Date: Fri Oct 11 15:00:42 2024 +0100 PCI: microchip: Set inbound address translation for coherent or non-coherent mode On Microchip PolarFire SoC the PCIe Root Port can be behind one of three general purpose Fabric Interface Controller (FIC) buses that encapsulates an AXI-S bus. Depending on which FIC(s) the Root Port is connected through to CPU space, and what address translation is done by that FIC, the Root Port driver's inbound address translation may vary. For all current supported designs and all future expected designs, inbound address translation done by a FIC on PolarFire SoC varies depending on whether PolarFire SoC is operating in coherent DMA mode or noncoherent DMA mode. The setup of the outbound address translation tables in the Root Port driver only needs to handle these two cases. Setup the inbound address translation tables to one of two address translations, depending on whether the Root Port is being used with coherent DMA or noncoherent DMA. Link: https://lore.kernel.org/r/20241011140043.1250030-3-daire.mcnamara@microchip.com Fixes: 6f15a9c9f941 ("PCI: microchip: Add Microchip PolarFire PCIe controller driver") Signed-off-by: Daire McNamara [bhelgaas: adapt for ac7f53b7e728 ("PCI: microchip: Add support for using either Root Port 1 or 2")] Signed-off-by: Bjorn Helgaas Acked-by: Conor Dooley drivers/pci/controller/plda/pcie-microchip-host.c | 96 +++++++++++++++++++++++ drivers/pci/controller/plda/pcie-plda-host.c | 17 +++- drivers/pci/controller/plda/pcie-plda.h | 6 +- 3 files changed, 114 insertions(+), 5 deletions(-) commit 2c5d8a8347a8ea8c243245e2ed8d87dfbf9f54fb Author: Kent Overstreet Date: Tue Jan 21 17:42:25 2025 -0500 bcachefs: "Journal stuck" timeout now takes into account device latency If a block device (e.g. your typical consumer SSD) is taking multiple seconds for IOs (typically flushes), we don't want to emit the "journal stuck" message prematurely. Also, make sure to drop the btree_trans srcu lock if we're blocking for more than a second. Signed-off-by: Kent Overstreet fs/bcachefs/btree_trans_commit.c | 2 +- fs/bcachefs/journal.c | 32 ++++++++++++++++++++++++++++---- fs/bcachefs/journal.h | 7 ++++--- 3 files changed, 33 insertions(+), 8 deletions(-) commit b388face5f169e7a41c1b5e1cdd20515160a83b3 Author: Akihiko Odaki Date: Sun Sep 15 10:36:58 2024 +0900 Documentation: Fix pci=config_acs= example The documentation currently says: config_acs= Format: @[; ...] Specify one or more PCI devices (in the format specified above) optionally prepended with flags and separated by semicolons. The respective capabilities will be enabled, disabled or unchanged based on what is specified in flags. (...) For example, pci=config_acs=10x would configure all devices that support ACS to enable P2P Request Redirect, disable Translation Blocking, and leave Source Validation unchanged from whatever power-up or firmware set it to. See the complete documentation at: https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html However, a flag specification always needs to be suffixed with "@" and a PCI valid device address, which is missing in this example. Also, to configure all devices that support ACS, the flag needs to be suffixed with "@pci:0:0", for the ACS support to be enabled. Fix the documentation so the example is correct. Link: https://lore.kernel.org/r/20240915-acs-v1-1-b9ee536ee9bd@daynix.com Signed-off-by: Akihiko Odaki [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Documentation/admin-guide/kernel-parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 188973e3536a18aebee3af486cd3d2ef82b09f88 Author: Dongdong Zhang Date: Mon Dec 16 09:35:36 2024 +0800 PCI: Remove redundant PCI_VSEC_HDR and PCI_VSEC_HDR_LEN_SHIFT Remove duplicate macro PCI_VSEC_HDR and its related macro PCI_VSEC_HDR_LEN_SHIFT from pci_regs.h to avoid redundancy and inconsistencies. Update VFIO PCI code to use PCI_VNDR_HEADER and PCI_VNDR_HEADER_LEN() for consistent naming and functionality. These changes aim to streamline header handling while minimizing impact, given the niche usage of these macros in userspace. Link: https://lore.kernel.org/r/20241216013536.4487-1-zhangdongdong@eswincomputing.com Signed-off-by: Dongdong Zhang Signed-off-by: Bjorn Helgaas Acked-by: Alex Williamson drivers/vfio/pci/vfio_pci_config.c | 5 +++-- include/uapi/linux/pci_regs.h | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) commit 816875a468f40a601da001d7518ddbf363381a18 Author: Wolfram Sang Date: Mon Nov 18 08:29:10 2024 +0100 PCI: Don't include 'pm_wakeup.h' directly The header clearly states that it does not want to be included directly, only via 'device.h'. The 'platform_device.h' works equally well. Thus, remove the direct inclusion. Link: https://lore.kernel.org/r/20241118072917.3853-12-wsa+renesas@sang-engineering.com Signed-off-by: Wolfram Sang Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 1 - 1 file changed, 1 deletion(-) commit c0e75905caf368e19aab585d20151500e750de89 Merge: 2e04247f7cce 1e5f6771c247 Author: Linus Torvalds Date: Tue Jan 21 15:19:20 2025 -0800 Merge tag 'trace-sorttable-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull scipts/sorttable updates from Steven Rostedt: "The sorttable.c was a copy from recordmcount.c which is very hard to maintain. That's because it uses macro helpers and places the code in a header file sorttable.h to handle both the 64 bit and 32 bit version of the Elf structures. It also uses _r()/r()/r2() wrappers around accessing the data which will read the 64 bit or 32 bit version of the data as well as handle endianess. If the wrong wrapper is used, an invalid value will result, and this has been a cause for bugs in the past. In fact the new ORC code doesn't even use it. That's fine because ORC is only for 64 bit x86 which is the default parsing. Instead of having a bunch of macros defined and then include the code twice from a header, the Elf structures are each wrapped in a union. The union holds the 64 bit and 32 bit version of the needed structure. Then a structure of function pointers is used, along with helper macros to access the ELF types appropriately for their byte size and endianess. How to reference the data fields is moved from the code that implements the sorting to the helper functions where all accesses to a field will use he same helper function. As long as the helper functions access the fields correctly, the code will also access the fields. This is an improvement over having to code implementing the sorting having to make sure it always uses the right accessor function when reading an ELF field. This is a clean up only, the functionality of the scripts/sorttable.c does not change" * tag 'trace-sorttable-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: scripts/sorttable: Use a structure of function pointers for elf helpers scripts/sorttable: Get start/stop_mcount_loc from ELF file directly scripts/sorttable: Move code from sorttable.h into sorttable.c scripts/sorttable: Use uint64_t for mcount sorting scripts/sorttable: Add helper functions for Elf_Sym scripts/sorttable: Add helper functions for Elf_Shdr scripts/sorttable: Add helper functions for Elf_Ehdr scripts/sorttable: Convert Elf_Sym MACRO over to a union scripts/sorttable: Replace Elf_Shdr Macro with a union scripts/sorttable: Convert Elf_Ehdr to union scripts/sorttable: Make compare_extable() into two functions scripts/sorttable: Have the ORC code use the _r() functions to read scripts/sorttable: Remove unneeded Elf_Rel scripts/sorttable: Remove unused write functions scripts/sorttable: Remove unused macro defines commit 2e04247f7cce8b8cd8381a29078701691fec684d Merge: 0074adea39b6 31f505dc7033 Author: Linus Torvalds Date: Tue Jan 21 15:15:28 2025 -0800 Merge tag 'ftrace-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull ftrace updates from Steven Rostedt: - Have fprobes built on top of function graph infrastructure The fprobe logic is an optimized kprobe that uses ftrace to attach to functions when a probe is needed at the start or end of the function. The fprobe and kretprobe logic implements a similar method as the function graph tracer to trace the end of the function. That is to hijack the return address and jump to a trampoline to do the trace when the function exits. To do this, a shadow stack needs to be created to store the original return address. Fprobes and function graph do this slightly differently. Fprobes (and kretprobes) has slots per callsite that are reserved to save the return address. This is fine when just a few points are traced. But users of fprobes, such as BPF programs, are starting to add many more locations, and this method does not scale. The function graph tracer was created to trace all functions in the kernel. In order to do this, when function graph tracing is started, every task gets its own shadow stack to hold the return address that is going to be traced. The function graph tracer has been updated to allow multiple users to use its infrastructure. Now have fprobes be one of those users. This will also allow for the fprobe and kretprobe methods to trace the return address to become obsolete. With new technologies like CFI that need to know about these methods of hijacking the return address, going toward a solution that has only one method of doing this will make the kernel less complex. - Cleanup with guard() and free() helpers There were several places in the code that had a lot of "goto out" in the error paths to either unlock a lock or free some memory that was allocated. But this is error prone. Convert the code over to use the guard() and free() helpers that let the compiler unlock locks or free memory when the function exits. - Remove disabling of interrupts in the function graph tracer When function graph tracer was first introduced, it could race with interrupts and NMIs. To prevent that race, it would disable interrupts and not trace NMIs. But the code has changed to allow NMIs and also interrupts. This change was done a long time ago, but the disabling of interrupts was never removed. Remove the disabling of interrupts in the function graph tracer is it is not needed. This greatly improves its performance. - Allow the :mod: command to enable tracing module functions on the kernel command line. The function tracer already has a way to enable functions to be traced in modules by writing ":mod:" into set_ftrace_filter. That will enable either all the functions for the module if it is loaded, or if it is not, it will cache that command, and when the module is loaded that matches , its functions will be enabled. This also allows init functions to be traced. But currently events do not have that feature. Because enabling function tracing can be done very early at boot up (before scheduling is enabled), the commands that can be done when function tracing is started is limited. Having the ":mod:" command to trace module functions as they are loaded is very useful. Update the kernel command line function filtering to allow it. * tag 'ftrace-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (26 commits) ftrace: Implement :mod: cache filtering on kernel command line tracing: Adopt __free() and guard() for trace_fprobe.c bpf: Use ftrace_get_symaddr() for kprobe_multi probes ftrace: Add ftrace_get_symaddr to convert fentry_ip to symaddr Documentation: probes: Update fprobe on function-graph tracer selftests/ftrace: Add a test case for repeating register/unregister fprobe selftests: ftrace: Remove obsolate maxactive syntax check tracing/fprobe: Remove nr_maxactive from fprobe fprobe: Add fprobe_header encoding feature fprobe: Rewrite fprobe on function-graph tracer s390/tracing: Enable HAVE_FTRACE_GRAPH_FUNC ftrace: Add CONFIG_HAVE_FTRACE_GRAPH_FUNC bpf: Enable kprobe_multi feature if CONFIG_FPROBE is enabled tracing/fprobe: Enable fprobe events with CONFIG_DYNAMIC_FTRACE_WITH_ARGS tracing: Add ftrace_fill_perf_regs() for perf event tracing: Add ftrace_partial_regs() for converting ftrace_regs to pt_regs fprobe: Use ftrace_regs in fprobe exit handler fprobe: Use ftrace_regs in fprobe entry handler fgraph: Pass ftrace_regs to retfunc fgraph: Replace fgraph_ret_regs with ftrace_regs ... commit 0074adea39b64d717407b913fd405ac586ee45ca Merge: 9f3ee94e705a 6e31b759b076 Author: Linus Torvalds Date: Tue Jan 21 15:11:54 2025 -0800 Merge tag 'trace-ringbuffer-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull trace ring-buffer updates from Steven Rostedt: - Clean up the __rb_map_vma() logic The logic of __rb_map_vma() has a error check with WARN_ON() that makes sure that the index does not go past the end of the array of buffers. The test in the loop pretty much guarantees that it will never happen, but since the relation of the variables used is a little complex, the WARN_ON() check was added. It was noticed that the array was dereferenced before this check and if the logic does break and for some reason the logic goes past the array, there will be an out of bounds access here. Move the access to after the WARN_ON(). - Consolidate how the ring buffer is determined to be empty Currently there's two ways that are used to determine if the ring buffer is empty. One relies on the status of the commit and reader pages and what was read, and the other is on what was written vs what was read. By using the number of entries (written) method, it can be used for reading events that are out of the kernel's control (what pKVM will use). Move to this method to make it easier to implement a pKVM ring buffer that the kernel can read. * tag 'trace-ringbuffer-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: ring-buffer: Make reading page consistent with the code logic ring-buffer: Check for empty ring-buffer with rb_num_of_entries() commit 9f3ee94e705a5b2fe352befb37e499163f98b9b6 Merge: ad37df3bcb1c 4b5c2205526c Author: Linus Torvalds Date: Tue Jan 21 14:39:21 2025 -0800 Merge tag 'rcu.release.v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux Pull RCU updates from Uladzislau Rezki: "Misc fixes: - check if IRQs are disabled in rcu_exp_need_qs() - instrument KCSAN exclusive-writer assertions - add extra WARN_ON_ONCE() check - set the cpu_no_qs.b.exp under lock - warn if callback enqueued on offline CPU Torture-test updates: - add rcutorture.preempt_duration kernel module parameter - make the TREE03 scenario do preemption - improve pooling timeouts for rcu_torture_writer() - improve output of "Failure/close-call rcutorture reader segments" - add some reader-state debugging checks - update doc of polled APIs - add extra diagnostics for per-reader-segment preemption - add an extra test for sched_clock() - improve testing on unresponsive systems SRCU updates: - improve doc for srcu_read_lock() in terms of return value - fix typo in comments - remove redundant GP sequence checks in the srcu_funnel_gp_start" * tag 'rcu.release.v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux: (31 commits) srcu: Remove redundant GP sequence checks in srcu_funnel_gp_start srcu: Fix typo s/srcu_check_read_flavor()/__srcu_check_read_flavor()/ srcu: Guarantee non-negative return value from srcu_read_lock() MAINTAINERS: Update RCU git tree rcu: Add lockdep_assert_irqs_disabled() to rcu_exp_need_qs() rcu: Add KCSAN exclusive-writer assertions for rdp->cpu_no_qs.b.exp rcu: Make preemptible rcu_exp_handler() check idempotency rcu: Replace open-coded rcu_exp_need_qs() from rcu_exp_handler() with call rcu: Move rcu_report_exp_rdp() setting of ->cpu_no_qs.b.exp under lock rcu: Make rcu_report_exp_cpu_mult() caller acquire lock rcu: Report callbacks enqueued on offline CPU blind spot rcutorture: Use symbols for SRCU reader flavors rcutorture: Add per-reader-segment preemption diagnostics rcutorture: Read CPU ID for decoration protected by both reader types rcutorture: Add preempt_count() to rcutorture_one_extend_check() diagnostics rcutorture: Add parameters to control polled/conditional wait interval rcutorture: Add documentation for recent conditional and polled APIs rcutorture: Ignore attempts to test preemption and forward progress rcutorture: Make rcutorture_one_extend() check reader state rcutorture: Pretty-print rcutorture reader segments ... commit ad37df3bcb1c88f3f73bdd04bad0b9eca8eae7b7 Merge: 4c551165e771 e492fac3657b Author: Linus Torvalds Date: Tue Jan 21 13:57:20 2025 -0800 Merge tag 'slab-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab Pull slab updates from Vlastimil Babka: - Move the kfree_rcu() implementation from RCU to SLAB subsystem (Uladzislau Rezki) The kfree_rcu() implementation has been historically maintained in the RCU subsystem. At LSF/MM we agreed to move it to SLAB, where it more logically belongs. The batching is planned be more integrated with SLUB internals in the future, while using the RCU APIs like any other subsystem. - Fix for kernel-doc warning (Randy Dunlap) * tag 'slab-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: mm/slab: fix kernel-doc func param names mm/slab: Move kvfree_rcu() into SLAB rcu/kvfree: Adjust a shrinker name rcu/kvfree: Adjust names passed into trace functions rcu/kvfree: Move some functions under CONFIG_TINY_RCU rcu/kvfree: Initialize kvfree_rcu() separately commit 4c551165e771ff565bf6c3b13e06a587e70acdef Merge: f200c315da80 a4b3990e01df Author: Linus Torvalds Date: Tue Jan 21 13:51:07 2025 -0800 Merge tag 'irq-core-2025-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull interrupt subsystem updates from Thomas Gleixner: - Consolidate the machine_kexec_mask_interrupts() by providing a generic implementation and replacing the copy & pasta orgy in the relevant architectures. - Prevent unconditional operations on interrupt chips during kexec shutdown, which can trigger warnings in certain cases when the underlying interrupt has been shut down before. - Make the enforcement of interrupt handling in interrupt context unconditionally available, so that it actually works for non x86 related interrupt chips. The earlier enablement for ARM GIC chips set the required chip flag, but did not notice that the check was hidden behind a config switch which is not selected by ARM[64]. - Decrapify the handling of deferred interrupt affinity setting. Some interrupt chips require that affinity changes are made from the context of handling an interrupt to avoid certain race conditions. For x86 this was the default, but with interrupt remapping this requirement was lifted and a flag was introduced which tells the core code that affinity changes can be done in any context. Unrestricted affinity changes are the default for the majority of interrupt chips. RISCV has the requirement to add the deferred mode to one of it's interrupt controllers, but with the original implementation this would require to add the any context flag to all other RISC-V interrupt chips. That's backwards, so reverse the logic and require that chips, which need the deferred mode have to be marked accordingly. That avoids chasing the 'sane' chips and marking them. - Add multi-node support to the Loongarch AVEC interrupt controller driver. - The usual tiny cleanups, fixes and improvements all over the place. * tag 'irq-core-2025-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/generic_chip: Export irq_gc_mask_disable_and_ack_set() genirq/timings: Add kernel-doc for a function parameter genirq: Remove IRQ_MOVE_PCNTXT and related code x86/apic: Convert to IRQCHIP_MOVE_DEFERRED genirq: Provide IRQCHIP_MOVE_DEFERRED hexagon: Remove GENERIC_PENDING_IRQ leftover ARC: Remove GENERIC_PENDING_IRQ genirq: Remove handle_enforce_irqctx() wrapper genirq: Make handle_enforce_irqctx() unconditionally available irqchip/loongarch-avec: Add multi-nodes topology support irqchip/ts4800: Replace seq_printf() by seq_puts() irqchip/ti-sci-inta : Add module build support irqchip/ti-sci-intr: Add module build support irqchip/irq-brcmstb-l2: Replace brcmstb_l2_mask_and_ack() by generic function irqchip: keystone: Use syscon_regmap_lookup_by_phandle_args genirq/kexec: Prevent redundant IRQ masking by checking state before shutdown kexec: Consolidate machine_kexec_mask_interrupts() implementation genirq: Reuse irq_thread_fn() for forced thread case genirq: Move irq_thread_fn() further up in the code commit f200c315da80584ad4d7d752f9eda1cea05fe183 Merge: 336088234e9f dcf6230555dc Author: Linus Torvalds Date: Tue Jan 21 13:16:00 2025 -0800 Merge tag 'timers-core-2025-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer and timekeeping updates from Thomas Gleixner: - Just boring cleanups, typo and comment fixes and trivial optimizations * tag 'timers-core-2025-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timers/migration: Simplify top level detection on group setup timers: Optimize get_timer_[this_]cpu_base() timekeeping: Remove unused ktime_get_fast_timestamps() timer/migration: Fix kernel-doc warnings for union tmigr_state tick/broadcast: Add kernel-doc for function parameters hrtimers: Update the return type of enqueue_hrtimer() clocksource/wdtest: Print time values for short udelay(1) posix-timers: Fix typo in __lock_timer() vdso: Correct typo in PAGE_SHIFT comment commit 336088234e9f85f6221135ba698c41dbf3c9e78e Merge: 4ca6c022279d 49dcb50d6ce3 Author: Linus Torvalds Date: Tue Jan 21 13:11:26 2025 -0800 Merge tag 'livepatching-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching updates from Petr Mladek: - Add a sysfs attribute showing the livepatch ordering - Some code clean up * tag 'livepatching-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: selftests: livepatch: add test cases of stack_order sysfs interface livepatch: Add stack_order sysfs attribute selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh commit 4ca6c022279dddba1eca8ea580c82ea510ecf690 Merge: 62de6e168526 4859bcd7a5bb Author: Linus Torvalds Date: Tue Jan 21 13:09:29 2025 -0800 Merge tag 'printk-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk updates from Petr Mladek: - Prevent possible deadlocks, caused by the lock serializing per-CPU backtraces, by entering the deferred printk context - Enforce the right casting in LOG_BUF_LEN_MAX definition * tag 'printk-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk: Defer legacy printing when holding printk_cpu_sync printk: Remove redundant deferred check in vprintk() printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX commit 8b8f8037765757861f899ed3a2bfb34525b5c065 Author: Hou Tao Date: Mon Jan 20 16:29:51 2025 +0800 dm-crypt: track tag_offset in convert_context dm-crypt uses tag_offset to index the integrity metadata for each crypt sector. When the initial crypt_convert() returns BLK_STS_DEV_RESOURCE, dm-crypt will try to continue the crypt/decrypt procedure in a kworker. However, it resets tag_offset as zero instead of using the tag_offset related with current sector. It may return unexpected data when using random IV or return unexpected integrity related error. Fix the problem by tracking tag_offset in per-IO convert_context. Therefore, when the crypt/decrypt procedure continues in a kworker, it could use the next tag_offset saved in convert_context. Fixes: 8abec36d1274 ("dm crypt: do not wait for backlogged crypto request completion in softirq") Cc: stable@vger.kernel.org Signed-off-by: Hou Tao Signed-off-by: Mikulas Patocka drivers/md/dm-crypt.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 996c451d982d1f3f110a4639d822abcd433336e7 Author: Hou Tao Date: Mon Jan 20 16:29:50 2025 +0800 dm-crypt: don't initialize cc_sector again For aead_recheck case, cc_sector has already been initialized in crypt_convert_init() when trying to re-read the read. Therefore, remove the duplicated initialization. Signed-off-by: Hou Tao Signed-off-by: Mikulas Patocka drivers/md/dm-crypt.c | 1 - 1 file changed, 1 deletion(-) commit 9fdbbdbbc92b1474a87b89f8b964892a63734492 Author: Hou Tao Date: Mon Jan 20 16:29:49 2025 +0800 dm-crypt: don't update io->sector after kcryptd_crypt_write_io_submit() The updates of io->sector are the leftovers when dm-crypt allocated pages for partial write request. However, since commit cf2f1abfbd0db ("dm crypt: don't allocate pages for a partial request"), there is no partial request anymore. After the introduction of write request rb-tree, the updates of io->sectors may interfere the insertion procedure, because ->sectors of these write requests which have already been added in the rb-tree may be changed during the insertion of new write request. Fix it by removing these buggy updates of io->sectors. Considering these updates only effect the write request rb-tree, the commit which introduces the write request rb-tree is used as the fix tag. Fixes: b3c5fd305249 ("dm crypt: sort writes") Cc: stable@vger.kernel.org Signed-off-by: Hou Tao Signed-off-by: Mikulas Patocka drivers/md/dm-crypt.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 2f8c28d0d97313edc36d62cbd505019f36111fd5 Author: Hou Tao Date: Mon Jan 20 16:29:48 2025 +0800 dm-crypt: use bi_sector in bio when initialize integrity seed bio->bi_iter.bi_sector has already been initialized when initialize the integrity seed in dm_crypt_integrity_io_alloc(). There is no need to calculate it again. Therefore, use the helper bip_set_seed() to initialize the seed and pass bi_iter.bi_sector to it instead. Mikulas: We can't use bip_set_seed because it doesn't compile without CONFIG_BLK_DEV_INTEGRITY. Signed-off-by: Hou Tao Signed-off-by: Mikulas Patocka drivers/md/dm-crypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c92066e78600b058638785288274a1f1426fe268 Author: Dr. David Alan Gilbert Date: Tue Dec 10 01:02:25 2024 +0000 sunrpc: Remove gss_{de,en}crypt_xdr_buf deadcode Commit ec596aaf9b48 ("SUNRPC: Remove code behind CONFIG_RPCSEC_GSS_KRB5_SIMPLIFIED") was the last user of the gss_decrypt_xdr_buf() and gss_encrypt_xdr_buf() functions. Remove them. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever net/sunrpc/auth_gss/gss_krb5_crypto.c | 55 --------------------------------- net/sunrpc/auth_gss/gss_krb5_internal.h | 7 ----- 2 files changed, 62 deletions(-) commit afc52b1eeb36f20eea321f50e338e38d00a8a61f Author: Dr. David Alan Gilbert Date: Tue Dec 10 01:02:24 2024 +0000 sunrpc: Remove gss_generic_token deadcode Commit ec596aaf9b48 ("SUNRPC: Remove code behind CONFIG_RPCSEC_GSS_KRB5_SIMPLIFIED") was the last user of the routines in gss_generic_token.c. Remove the routines and associated header. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever include/linux/sunrpc/gss_asn1.h | 81 ----------- include/linux/sunrpc/gss_krb5.h | 1 - net/sunrpc/auth_gss/Makefile | 2 +- net/sunrpc/auth_gss/gss_generic_token.c | 231 -------------------------------- net/sunrpc/auth_gss/gss_mech_switch.c | 1 - 5 files changed, 1 insertion(+), 315 deletions(-) commit ee0d90d4b97a9787ed55b22c85c72376329d86ac Author: Dr. David Alan Gilbert Date: Tue Dec 10 01:02:23 2024 +0000 sunrpc: Remove unused xprt_iter_get_xprt xprt_iter_get_xprt() was added by commit 80b14d5e61ca ("SUNRPC: Add a structure to track multiple transports") but is unused. Remove it. Signed-off-by: Dr. David Alan Gilbert Acked-by: Anna Schumaker Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever include/linux/sunrpc/xprtmultipath.h | 1 - net/sunrpc/xprtmultipath.c | 17 ----------------- 2 files changed, 18 deletions(-) commit 966a675da844f1a764bb44557c21561cc3d09840 Author: Chuck Lever Date: Thu Jan 2 20:00:01 2025 -0500 Revert "SUNRPC: Reduce thread wake-up rate when receiving large RPC messages" I noticed that a handful of NFSv3 fstests were taking an unexpectedly long time to run. Troubleshooting showed that the server's TCP window closed and never re-opened, which caused the client to trigger an RPC retransmit timeout after 180 seconds. The client's recovery action was to establish a fresh connection and retransmit the timed-out requests. This worked, but it adds a long delay. I tracked the problem to the commit that attempted to reduce the rate at which the network layer delivers TCP socket data_ready callbacks. Under most circumstances this change worked as expected, but for NFSv3, which has no session or other type of throttling, it can overwhelm the receiver on occasion. I'm sure I could tweak the lowat settings, but the small benefit doesn't seem worth the bother. Just revert it. Fixes: 2b877fc53e97 ("SUNRPC: Reduce thread wake-up rate when receiving large RPC messages") Cc: Jakub Kicinski Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever net/sunrpc/svcsock.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit d3edfd9ed17cb3bc754b3064051fb5df7863fda3 Author: Jeff Layton Date: Mon Dec 9 16:14:02 2024 -0500 nfsd: implement OPEN_ARGS_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION Allow clients to request getting a delegation xor an open stateid if a delegation isn't available. This allows the client to avoid sending a final CLOSE for the (useless) open stateid, when it is granted a delegation. If this flag is requested by the client and there isn't already a new open stateid, discard the new open stateid before replying. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4state.c | 24 +++++++++++++++++++++++- fs/nfsd/nfs4xdr.c | 3 ++- 2 files changed, 25 insertions(+), 2 deletions(-) commit 7e13f4f8d27dc02fb88666f603c53ca749d56f92 Author: Jeff Layton Date: Mon Dec 9 16:14:01 2024 -0500 nfsd: handle delegated timestamps in SETATTR Allow SETATTR to handle delegated timestamps. This patch assumes that only the delegation holder has the ability to set the timestamps in this way, so we allow this only if the SETATTR stateid refers to a *_ATTRS_DELEG delegation. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4proc.c | 31 ++++++++++++++++++++++++++++--- fs/nfsd/nfs4state.c | 2 +- fs/nfsd/nfs4xdr.c | 20 ++++++++++++++++++++ fs/nfsd/nfsd.h | 5 ++++- 4 files changed, 53 insertions(+), 5 deletions(-) commit 6ae30d6eb26bce02c48c60074b4306270e2434c1 Author: Jeff Layton Date: Mon Dec 9 16:14:00 2024 -0500 nfsd: add support for delegated timestamps Add support for the delegated timestamps on write delegations. This allows the server to proxy timestamps from the delegation holder to other clients that are doing GETATTRs vs. the same inode. When OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS bit is set in the OPEN call, set the dl_type to the *_ATTRS_DELEG flavor of delegation. Add timespec64 fields to nfs4_cb_fattr and decode the timestamps into those. Vet those timestamps according to the delstid spec and update the inode attrs if necessary. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4callback.c | 42 +++++++++++++++++++-- fs/nfsd/nfs4state.c | 99 +++++++++++++++++++++++++++++++++++++++++++------- fs/nfsd/nfs4xdr.c | 15 +++++++- fs/nfsd/nfsd.h | 2 + fs/nfsd/state.h | 2 + fs/nfsd/xdr4cb.h | 10 +++-- include/linux/time64.h | 5 +++ 7 files changed, 152 insertions(+), 23 deletions(-) commit cee9b4ef42512a6e57562460a15f18a022c84dda Author: Jeff Layton Date: Mon Dec 9 16:13:59 2024 -0500 nfsd: rework NFS4_SHARE_WANT_* flag handling The delstid draft adds new NFS4_SHARE_WANT_TYPE_MASK values that don't fit neatly into the existing WANT_MASK or WHEN_MASK. Add a new NFS4_SHARE_WANT_MOD_MASK value and redefine NFS4_SHARE_WANT_MASK to include it. Also fix the checks in nfsd4_deleg_xgrade_none_ext() to check for the flags instead of equality, since there may be modifier flags in the value. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4state.c | 4 ++-- fs/nfsd/nfs4xdr.c | 2 +- include/uapi/linux/nfs4.h | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) commit 51c0d4f7e317d3cb4a3001e502bd8ca2d57f2a4b Author: Jeff Layton Date: Mon Dec 9 16:13:58 2024 -0500 nfsd: add support for FATTR4_OPEN_ARGUMENTS Add support for FATTR4_OPEN_ARGUMENTS. This a new mechanism for the client to discover what OPEN features the server supports. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4xdr.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/nfsd/nfsd.h | 3 ++- 2 files changed, 52 insertions(+), 1 deletion(-) commit fbd5573d0deda145fe173431f1f3ca444940de18 Author: Jeff Layton Date: Mon Dec 9 16:13:57 2024 -0500 nfsd: prepare delegation code for handing out *_ATTRS_DELEG delegations Add some preparatory code to various functions that handle delegation types to allow them to handle the OPEN_DELEGATE_*_ATTRS_DELEG constants. Add helpers for detecting whether it's a read or write deleg, and whether the attributes are delegated. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4state.c | 43 ++++++++++++++++++++++++++++--------------- fs/nfsd/nfs4xdr.c | 2 ++ fs/nfsd/state.h | 16 ++++++++++++++++ 3 files changed, 46 insertions(+), 15 deletions(-) commit c9c99a33e2b0083c83a2c29eebfad92c78e16791 Author: Jeff Layton Date: Mon Dec 9 16:13:56 2024 -0500 nfsd: rename NFS4_SHARE_WANT_* constants to OPEN4_SHARE_ACCESS_WANT_* Add the OPEN4_SHARE_ACCESS_WANT constants from the nfs4.1 and delstid draft into the nfs4_1.x file, and regenerate the headers and source files. Do a mass renaming of NFS4_SHARE_WANT_* to OPEN4_SHARE_ACCESS_WANT_* in the nfsd directory. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever Documentation/sunrpc/xdr/nfs4_1.x | 15 ++++++++++++++- fs/nfsd/nfs4state.c | 16 ++++++++-------- fs/nfsd/nfs4xdr.c | 12 ++++++------ fs/nfsd/nfs4xdr_gen.c | 2 +- fs/nfsd/nfs4xdr_gen.h | 2 +- include/linux/sunrpc/xdrgen/nfs4_1.h | 24 +++++++++++++++++++++--- 6 files changed, 51 insertions(+), 20 deletions(-) commit 8dfbea8bde6e976136948421325b24b5bdb76ad3 Author: Jeff Layton Date: Mon Dec 9 16:13:55 2024 -0500 nfsd: switch to autogenerated definitions for open_delegation_type4 Rename the enum with the same name in include/linux/nfs4.h, add the proper enum to nfs4_1.x and regenerate the headers and source files. Do a mass rename of all NFS4_OPEN_DELEGATE_* to OPEN_DELEGATE_* in the nfsd directory. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever Documentation/sunrpc/xdr/nfs4_1.x | 9 ++++++++- fs/nfsd/nfs4state.c | 34 +++++++++++++++++----------------- fs/nfsd/nfs4xdr.c | 8 ++++---- fs/nfsd/nfs4xdr_gen.c | 19 ++++++++++++++++++- fs/nfsd/nfs4xdr_gen.h | 2 +- include/linux/nfs4.h | 2 +- include/linux/sunrpc/xdrgen/nfs4_1.h | 13 ++++++++++++- 7 files changed, 61 insertions(+), 26 deletions(-) commit 8e1d32273ab7d06b6f78771e05824bfab01141f4 Author: Jeff Layton Date: Mon Dec 9 16:13:54 2024 -0500 nfs_common: make include/linux/nfs4.h include generated nfs4_1.h In the long run, the NFS development community intends to autogenerate a lot of the XDR handling code. Both the NFS client and server include "include/linux/nfs4.hi". That file was hand-rolled, and some of the symbols in it conflict with the autogenerated symbols. Add a small nfs4_1.x to Documentation that currently just has the necessary definitions for the delstid draft, and generate the relevant header and source files. Make include/linux/nfs4.h include the generated include/linux/sunrpc/xdrgen/nfs4_1.h and remove the conflicting definitions from it and nfs_xdr.h. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever Documentation/sunrpc/xdr/nfs4_1.x | 166 ++++++++++++++++++++++++ fs/nfsd/Makefile | 16 ++- fs/nfsd/nfs4xdr_gen.c | 239 +++++++++++++++++++++++++++++++++++ fs/nfsd/nfs4xdr_gen.h | 25 ++++ include/linux/nfs4.h | 7 +- include/linux/nfs_xdr.h | 5 - include/linux/sunrpc/xdrgen/nfs4_1.h | 124 ++++++++++++++++++ 7 files changed, 570 insertions(+), 12 deletions(-) commit 531503054e8fe9f4502fff0dceba20dfaa9920d5 Author: Jeff Layton Date: Mon Dec 9 16:13:53 2024 -0500 nfsd: fix handling of delegated change attr in CB_GETATTR RFC8881, section 10.4.3 has some specific guidance as to how the delegated change attribute should be handled. We currently don't follow that guidance properly. In particular, when the file is modified, the server always reports the initial change attribute + 1. Section 10.4.3 however indicates that it should be incremented on every GETATTR request from other clients. Only request the change attribute until the file has been modified. If there is an outstanding delegation, then increment the cached change attribute on every GETATTR. Fixes: 6487a13b5c6b ("NFSD: add support for CB_GETATTR callback") Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever fs/nfsd/nfs4callback.c | 8 +++++--- fs/nfsd/nfs4xdr.c | 15 +++++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) commit 8f21943e101a15f56a8f02970a80edc936de8ec8 Author: Steven Rostedt Date: Tue Jan 21 15:13:36 2025 -0500 tracing: Fix output of set_event for some cached module events The following works fine: ~# echo ':mod:trace_events_sample' > /sys/kernel/tracing/set_event ~# cat /sys/kernel/tracing/set_event *:*:mod:trace_events_sample ~# But if a name is given without a ':' where it can match an event name or system name, the output of the cached events does not include a new line: ~# echo 'foo_bar:mod:trace_events_sample' > /sys/kernel/tracing/set_event ~# cat /sys/kernel/tracing/set_event foo_bar:mod:trace_events_sample~# Add the '\n' to that as well. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250121151336.6c491844@gandalf.local.home Fixes: b355247df104e ("tracing: Cache ":mod:" events for modules not loaded yet") Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f95ee542947d748d4ca01b4d3103dbdc4fdc8889 Author: Steven Rostedt Date: Tue Jan 21 15:12:36 2025 -0500 tracing: Fix allocation of printing set_event file content The adding of cached events for modules not loaded yet required a descriptor to separate the iteration of events with the iteration of cached events for a module. But the allocation used the size of the pointer and not the size of the contents to allocate its data and caused a slab-out-of-bounds. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Linus Torvalds Link: https://lore.kernel.org/20250121151236.47fcf433@gandalf.local.home Reported-by: Sasha Levin Closes: https://lore.kernel.org/all/Z4_OHKESRSiJcr-b@lappy/ Fixes: b355247df104e ("tracing: Cache ":mod:" events for modules not loaded yet") Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd2375a3567fd3d93aa6c68e0027a5756213bda0 Author: Steven Rostedt Date: Mon Jan 20 18:56:56 2025 -0500 ring-buffer: Do not allow events in NMI with generic atomic64 cmpxchg() Some architectures can not safely do atomic64 operations in NMI context. Since the ring buffer relies on atomic64 operations to do its time keeping, if an event is requested in NMI context, reject it for these architectures. Cc: stable@vger.kernel.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds Cc: Andreas Larsson Link: https://lore.kernel.org/20250120235721.407068250@goodmis.org Fixes: c84897c0ff592 ("ring-buffer: Remove 32bit timestamp logic") Closes: https://lore.kernel.org/all/86fb4f86-a0e4-45a2-a2df-3154acc4f086@gaisler.com/ Reported-by: Ludwig Rydberg Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/ring_buffer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 392188bb0f6ec5162edf457c062929a6abfa369a Author: Manivannan Sadhasivam Date: Thu Jan 16 22:46:50 2025 +0530 selftests: pci_endpoint: Migrate to Kselftest framework Migrate the PCI endpoint test to Kselftest framework. All the tests that were part of the previous pcitest.sh file were migrated. Below is the list of tests converted: 1. BAR0 Test 2. BAR1 Test 3. BAR2 Test 4. BAR3 Test 5. BAR4 Test 6. BAR5 Test 7. Consecutive BAR Tests 8. Legacy IRQ Tests 9. MSI Interrupt Tests (MSI1 to MSI32) 10. MSI-X Interrupt Tests (MSI-X1 to MSI-X2048) 11. Read Tests - MEMCPY (For 1, 1024, 1025, 1024000, 1024001 Bytes) 12. Write Tests - MEMCPY (For 1, 1024, 1025, 1024000, 1024001 Bytes) 13. Copy Tests - MEMCPY (For 1, 1024, 1025, 1024000, 1024001 Bytes) 14. Read Tests - DMA (For 1, 1024, 1025, 1024000, 1024001 Bytes) 15. Write Tests - DMA (For 1, 1024, 1025, 1024000, 1024001 Bytes) 16. Copy Tests - DMA (For 1, 1024, 1025, 1024000, 1024001 Bytes) BAR, DMA and MEMCPY tests are added as fixture variants and can be executed separately as below: $ pci_endpoint_test -v BAR0 $ pci_endpoint_test -v dma $ pci_endpoint_test -v memcpy Link: https://lore.kernel.org/r/20250116171650.33585-5-manivannan.sadhasivam@linaro.org Co-developed-by: Aman Gupta Co-developed-by: Padmanabhan Rajanbabu [mani: reworked based on the IOCTL fix, cleanups, documentation, commit message] Signed-off-by: Aman Gupta Signed-off-by: Padmanabhan Rajanbabu Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Tested-by: Niklas Cassel Reviewed-by: Niklas Cassel Documentation/PCI/endpoint/pci-test-howto.rst | 173 ++++++-------- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/pci_endpoint/.gitignore | 3 +- tools/testing/selftests/pci_endpoint/Build | 1 - tools/testing/selftests/pci_endpoint/Makefile | 59 +---- tools/testing/selftests/pci_endpoint/config | 4 + .../selftests/pci_endpoint/pci_endpoint_test.c | 221 +++++++++++++++++ tools/testing/selftests/pci_endpoint/pcitest.c | 265 --------------------- tools/testing/selftests/pci_endpoint/pcitest.sh | 73 ------ 9 files changed, 302 insertions(+), 498 deletions(-) commit e19bde2269ca3611156fd0c078a71af0b6956545 Author: Manivannan Sadhasivam Date: Thu Jan 16 22:46:49 2025 +0530 selftests: Move PCI Endpoint tests from tools/pci to Kselftests This just moves the existing tests under tools/pci to tools/testing/selftests/pci_endpoint and adjusts the paths in Makefile accordingly. Migration to Kselftest framework will be done in subsequent commits. Link: https://lore.kernel.org/r/20250116171650.33585-4-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Tested-by: Niklas Cassel Reviewed-by: Niklas Cassel Documentation/PCI/endpoint/pci-test-howto.rst | 9 +++++---- MAINTAINERS | 2 +- tools/testing/selftests/pci_endpoint/.gitignore | 3 +++ tools/{pci => testing/selftests/pci_endpoint}/Build | 0 tools/{pci => testing/selftests/pci_endpoint}/Makefile | 10 +++++----- tools/{pci => testing/selftests/pci_endpoint}/pcitest.c | 0 tools/{pci => testing/selftests/pci_endpoint}/pcitest.sh | 0 7 files changed, 14 insertions(+), 10 deletions(-) commit f26d37ee9bda938e968d0e11ba1f8f1588b2a135 Author: Manivannan Sadhasivam Date: Thu Jan 16 22:46:48 2025 +0530 misc: pci_endpoint_test: Fix IOCTL return value IOCTLs are supposed to return 0 for success and negative error codes for failure. Currently, this driver is returning 0 for failure and 1 for success, that's not correct. Hence, fix it! Link: https://lore.kernel.org/r/20250116171650.33585-3-manivannan.sadhasivam@linaro.org Fixes: 2c156ac71c6b ("misc: Add host side PCI driver for PCI test function device") Reported-by: Greg Kroah-Hartman Closes: https://lore.kernel.org/r/YvzNg5ROnxEApDgS@kroah.com Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Tested-by: Niklas Cassel Reviewed-by: Damien Le Moal Reviewed-by: Niklas Cassel drivers/misc/pci_endpoint_test.c | 255 +++++++++++++++++++-------------------- tools/pci/pcitest.c | 51 ++++---- 2 files changed, 153 insertions(+), 153 deletions(-) commit 62de6e1685269e1637a6c6684c8be58cc8d4ff38 Merge: 858df1de2158 40724ecafccb Author: Linus Torvalds Date: Tue Jan 21 11:32:36 2025 -0800 Merge tag 'sched-core-2025-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "Fair scheduler (SCHED_FAIR) enhancements: - Behavioral improvements: - Untangle NEXT_BUDDY and pick_next_task() (Peter Zijlstra) - Delayed-dequeue enhancements & fixes: (Vincent Guittot) - Rename h_nr_running into h_nr_queued - Add new cfs_rq.h_nr_runnable - Use the new cfs_rq.h_nr_runnable - Removed unsued cfs_rq.h_nr_delayed - Rename cfs_rq.idle_h_nr_running into h_nr_idle - Remove unused cfs_rq.idle_nr_running - Rename cfs_rq.nr_running into nr_queued - Do not try to migrate delayed dequeue task - Fix variable declaration position - Encapsulate set custom slice in a __setparam_fair() function - Fixes: - Fix race between yield_to() and try_to_wake_up() (Tianchen Ding) - Fix CPU bandwidth limit bypass during CPU hotplug (Vishal Chourasia) - Cleanups: - Clean up in migrate_degrades_locality() to improve readability (Peter Zijlstra) - Mark m*_vruntime() with __maybe_unused (Andy Shevchenko) - Update comments after sched_tick() rename (Sebastian Andrzej Siewior) - Remove CONFIG_CFS_BANDWIDTH=n definition of cfs_bandwidth_used() (Valentin Schneider) Deadline scheduler (SCHED_DL) enhancements: - Restore dl_server bandwidth on non-destructive root domain changes (Juri Lelli) - Correctly account for allocated bandwidth during hotplug (Juri Lelli) - Check bandwidth overflow earlier for hotplug (Juri Lelli) - Clean up goto label in pick_earliest_pushable_dl_task() (John Stultz) - Consolidate timer cancellation (Wander Lairson Costa) Load-balancer enhancements: - Improve performance by prioritizing migrating eligible tasks in sched_balance_rq() (Hao Jia) - Do not compute NUMA Balancing stats unnecessarily during load-balancing (K Prateek Nayak) - Do not compute overloaded status unnecessarily during load-balancing (K Prateek Nayak) Generic scheduling code enhancements: - Use READ_ONCE() in task_on_rq_queued(), to consistently use the WRITE_ONCE() updated ->on_rq field (Harshit Agarwal) Isolated CPUs support enhancements: (Waiman Long) - Make "isolcpus=nohz" equivalent to "nohz_full" - Consolidate housekeeping cpumasks that are always identical - Remove HK_TYPE_SCHED - Unify HK_TYPE_{TIMER|TICK|MISC} to HK_TYPE_KERNEL_NOISE RSEQ enhancements: - Validate read-only fields under DEBUG_RSEQ config (Mathieu Desnoyers) PSI enhancements: - Fix race when task wakes up before psi_sched_switch() adjusts flags (Chengming Zhou) IRQ time accounting performance enhancements: (Yafang Shao) - Define sched_clock_irqtime as static key - Don't account irq time if sched_clock_irqtime is disabled Virtual machine scheduling enhancements: - Don't try to catch up excess steal time (Suleiman Souhlal) Heterogenous x86 CPU scheduling enhancements: (K Prateek Nayak) - Convert "sysctl_sched_itmt_enabled" to boolean - Use guard() for itmt_update_mutex - Move the "sched_itmt_enabled" sysctl to debugfs - Remove x86_smt_flags and use cpu_smt_flags directly - Use x86_sched_itmt_flags for PKG domain unconditionally Debugging code & instrumentation enhancements: - Change need_resched warnings to pr_err() (David Rientjes) - Print domain name in /proc/schedstat (K Prateek Nayak) - Fix value reported by hot tasks pulled in /proc/schedstat (Peter Zijlstra) - Report the different kinds of imbalances in /proc/schedstat (Swapnil Sapkal) - Move sched domain name out of CONFIG_SCHED_DEBUG (Swapnil Sapkal) - Update Schedstat version to 17 (Swapnil Sapkal)" * tag 'sched-core-2025-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (48 commits) rseq: Fix rseq unregistration regression psi: Fix race when task wakes up before psi_sched_switch() adjusts flags sched, psi: Don't account irq time if sched_clock_irqtime is disabled sched: Don't account irq time if sched_clock_irqtime is disabled sched: Define sched_clock_irqtime as static key sched/fair: Do not compute overloaded status unnecessarily during lb sched/fair: Do not compute NUMA Balancing stats unnecessarily during lb x86/topology: Use x86_sched_itmt_flags for PKG domain unconditionally x86/topology: Remove x86_smt_flags and use cpu_smt_flags directly x86/itmt: Move the "sched_itmt_enabled" sysctl to debugfs x86/itmt: Use guard() for itmt_update_mutex x86/itmt: Convert "sysctl_sched_itmt_enabled" to boolean sched/core: Prioritize migrating eligible tasks in sched_balance_rq() sched/debug: Change need_resched warnings to pr_err sched/fair: Encapsulate set custom slice in a __setparam_fair() function sched: Fix race between yield_to() and try_to_wake_up() docs: Update Schedstat version to 17 sched/stats: Print domain name in /proc/schedstat sched: Move sched domain name out of CONFIG_SCHED_DEBUG sched: Report the different kinds of imbalances in /proc/schedstat ... commit 53c9c27672bb0241998ddf2d1588106920d4064b Merge: 1d2da923fb98 5fb33b679763 Author: Stephen Boyd Date: Tue Jan 21 11:22:46 2025 -0800 Merge branch 'clk-fixes' into clk-next * clk-fixes: clk: clk-loongson2: Fix the number count of clk provider clk: mmp2: call pm_genpd_init() only after genpd.name is set clk: sunxi-ng: a100: enable MMC clock reparenting clk: clk-imx8mp-audiomix: fix function signature clk: thead: Fix TH1520 emmc and shdci clock rate commit 1d2da923fb985bb57cc161316c76edb8d567b9bd Merge: b2fee97e6f0b bfe257f9780d 57ea1423aaaa 65b3516dbe50 3a43cd19f1b8 e7d0b023955a Author: Stephen Boyd Date: Tue Jan 21 11:22:26 2025 -0800 Merge branches 'clk-airoha', 'clk-rockchip', 'clk-stm', 'clk-thead' and 'clk-bcm' into clk-next * clk-airoha: clk: en7523: Add clock for eMMC for EN7581 dt-bindings: clock: add ID for eMMC for EN7581 dt-bindings: clock: drop NUM_CLOCKS define for EN7581 clk: en7523: Rework clock handling for different clock numbers clk: en7523: Initialize num before accessing hws in en7523_register_clocks() clk: en7523: Fix wrong BUS clock for EN7581 clk: amlogic: axg-audio: revert reset implementation Revert "clk: Fix invalid execution of clk_set_rate" * clk-rockchip: clk: rockchip: rk3588: make refclko25m_ethX critical clk: rockchip: rk3588: drop RK3588_LINKED_CLK clk: rockchip: implement linked gate clock support clk: rockchip: expose rockchip_clk_set_lookup clk: rockchip: rk3588: register GATE_LINK later clk: rockchip: support clocks registered late * clk-stm: clk: stm32f4: support spread spectrum clock generation clk: stm32f4: use FIELD helpers to access the PLLCFGR fields dt-bindings: clock: st,stm32-rcc: support spread spectrum clocking dt-bindings: clock: convert stm32 rcc bindings to json-schema * clk-thead: clk: thead: Fix cpu2vp_clk for TH1520 AP_SUBSYS clocks clk: thead: Add CLK_IGNORE_UNUSED to fix TH1520 boot clk: thead: Fix clk gate registration to pass flags * clk-bcm: clk: bcm: rpi: Add disp clock clk: bcm: rpi: Create helper to retrieve private data clk: bcm: rpi: Enable minimize for all firmware clocks clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks clk: bcm: rpi: Add ISP to exported clocks commit b2fee97e6f0b6b935918744f44ca80246a18289e Merge: 70741cc38463 765ea12f8ae0 7681f64e6404 087b4083d3f9 b7efd2297090 5542b0b57d8a Author: Stephen Boyd Date: Tue Jan 21 11:22:19 2025 -0800 Merge branches 'clk-microchip', 'clk-xilinx', 'clk-allwinner', 'clk-imx' and 'clk-qcom' into clk-next * clk-microchip: clk: at91: sama7d65: add sama7d65 pmc driver dt-bindings: clock: Add SAMA7D65 PMC compatible string dt-bindings: clocks: atmel,at91sam9x5-sckc: add sama7d65 clk: at91: sckc: Use SCKC_{TD, MD}_SLCK IDs for clk32k clocks dt-bindings: clk: at91: Add clock IDs for the slow clock controller * clk-xilinx: clk: clocking-wizard: calculate dividers fractional parts dt-bindings: clock: xilinx: Add reset GPIO for VCU dt-bindings: clock: xilinx: Convert VCU bindings to dtschema * clk-allwinner: clk: sunxi-ng: h616: Reparent CPU clock during frequency changes clk: sunxi-ng: a64: stop force-selecting PLL-MIPI as TCON0 parent clk: sunxi-ng: a64: drop redundant CLK_PLL_VIDEO0_2X and CLK_PLL_MIPI dt-bindings: clock: sunxi: Export PLL_VIDEO_2X and PLL_MIPI * clk-imx: clk: imx: Apply some clks only for i.MX93 arm64: dts: imx93: Use IMX93_CLK_SPDIF_IPG as SPDIF IPG clock clk: imx93: Add IMX93_CLK_SPDIF_IPG clock dt-bindings: clock: imx93: Add SPDIF IPG clk clk: imx: pll14xx: Add 208 MHz and 416 MHz entries for PLL1416x clk: imx8mp: Fix clkout1/2 support * clk-qcom: (63 commits) clk: qcom: Select CLK_X1E80100_GCC in config CLK_X1P42100_GPUCC dt-bindings: clock: move qcom,x1e80100-camcc to its own file clk: qcom: smd-rpm: Add clocks for MSM8940 dt-bindings: clock: qcom,rpmcc: Add MSM8940 compatible clk: qcom: smd-rpm: Add clocks for MSM8937 dt-bindings: clock: qcom,rpmcc: Add MSM8937 compatible clk: qcom: ipq5424: Use icc-clk for enabling NoC related clocks dt-bindings: interconnect: Add Qualcomm IPQ5424 support clk: qcom: Add SM6115 LPASSCC dt-bindings: clock: Add Qualcomm SM6115 LPASS clock controller clk: qcom: gcc-sdm845: Do not use shared clk_ops for QUPs clk: qcom: gcc-sdm845: Add general purpose clock ops clk: qcom: clk-rcg2: split __clk_rcg2_configure function clk: qcom: clk-rcg2: document calc_rate function clk: qcom: gcc-x1e80100: Do not turn off usb_2 controller GDSC clk: qcom: ipq5424: add gcc_xo_clk dt-bindings: clock: qcom: gcc-ipq5424: add gcc_xo_clk macro dt-bindings: clock: qcom: gcc-ipq5424: remove apss_dbg clock macro clk: qcom: ipq5424: remove apss_dbg clock dt-bindings: clock: qcom,sdm845-camcc: add sdm670 compatible ... commit 70741cc38463371914f49a1f4fda5de2afdc4c86 Merge: d7f12857f095 83f6c3dea942 830d8062d255 9c2fb0c2a10f e9f7da0776fb Author: Stephen Boyd Date: Tue Jan 21 11:22:03 2025 -0800 Merge branches 'clk-cleanup', 'clk-renesas', 'clk-mediatek', 'clk-samsung' and 'clk-socfpga' into clk-next - Support for 5L35023 variant of Versa 3 clock generator * clk-cleanup: clk: analogbits: Fix incorrect calculation of vco rate delta clk: Use str_enable_disable-like helpers clk: clk-loongson2: Switch to use devm_clk_hw_register_fixed_rate_parent_data() clk: starfive: Make _clk_get become a common helper function clk: ep93xx: make const read-only arrays static clk: lmk04832: make read-only const arrays static clk: ti: use kcalloc() instead of kzalloc() dt-bindings: clock: st,stm32mp1-rcc: complete the reference path dt-bindings: clock: st,stm32mp1-rcc: fix reference paths dt-bindings: clock: ti: Convert composite.txt to json-schema dt-bindings: clock: ti: Convert gate.txt to json-schema clk: Drop obsolete devm_clk_bulk_get_all_enable() helper PCI: exynos: Switch to devm_clk_bulk_get_all_enabled() soc: mediatek: pwrap: Switch to devm_clk_bulk_get_all_enabled() clk: davinci: remove platform data struct clk: fix an OF node reference leak in of_clk_get_parent_name() clk: mmp: pxa1908-apbc: Fix NULL vs IS_ERR() check clk: mmp: pxa1908-apbcp: Fix a NULL vs IS_ERR() check clk: mmp: pxa1908-mpmu: Fix a NULL vs IS_ERR() check * clk-renesas: (24 commits) dt-bindings: clock: renesas,r9a08g045-vbattb: Fix include guard clk: renesas: r9a09g057: Add clock and reset entries for GIC clk: renesas: r9a09g057: Add reset entry for SYS clk: renesas: r8a779g0: Add VSPX clocks clk: renesas: r8a779g0: Add FCPVX clocks clk: renesas: r9a09g047: Add I2C clocks/resets clk: renesas: r9a09g047: Add CA55 core clocks clk: renesas: rzv2h: Add support for RZ/G3E SoC clk: renesas: rzv2h: Add MSTOP support dt-bindings: clock: renesas: Document RZ/G3E SoC CPG dt-bindings: soc: renesas: Document RZ/G3E SMARC SoM and Carrier-II EVK dt-bindings: soc: renesas: Document Renesas RZ/G3E SoC variants clk: versaclock3: Add support for the 5L35023 variant dt-bindings: clock: versaclock3: Document 5L35023 Versa3 clock generator clk: versaclock3: Prepare for the addition of 5L35023 device clk: renesas: r9a08g045: Add clocks, resets and power domain support for the ADC IP clk: renesas: r8a779h0: Add display clocks clk: renesas: r9a09g057: Add support for PLLVDO, CRU clocks, and resets clk: renesas: rzv2h: Add selective Runtime PM support for clocks clk: renesas: r9a06g032: Use BIT macro consistently ... * clk-mediatek: clk: ralink: mtmips: remove duplicated 'xtal' clock for Ralink SoC RT3883 clk: mediatek: mt2701-img: add missing dummy clk clk: mediatek: mt2701-mm: add missing dummy clk clk: mediatek: mt2701-bdp: add missing dummy clk clk: mediatek: mt2701-aud: fix conversion to mtk_clk_simple_probe clk: mediatek: mt2701-vdec: fix conversion to mtk_clk_simple_probe * clk-samsung: clk: samsung: Introduce Exynos990 clock controller driver clk: samsung: clk-pll: Add support for pll_{0717x, 0718x, 0732x} dt-bindings: clock: samsung: Add Exynos990 SoC CMU bindings * clk-socfpga: clk: socfpga: arria10: Optimize local variables in clk_pll_recalc_rate() commit 858df1de2158bd7ab88d31b557592e990bacc0b5 Merge: 6c4aa896ebee 0094014be0cd Author: Linus Torvalds Date: Tue Jan 21 11:15:29 2025 -0800 Merge tag 'x86-cleanups-2025-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Ingo Molnar: "Miscellaneous x86 cleanups and typo fixes, and also the removal of the 'disablelapic' boot parameter" * tag 'x86-cleanups-2025-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ioapic: Remove a stray tab in the IO-APIC type string x86/cpufeatures: Remove "AMD" from the comments to the AMD-specific leaf Documentation/kernel-parameters: Fix a typo in kvm.enable_virt_at_load text x86/cpu: Fix typo in x86_match_cpu()'s doc x86/apic: Remove "disablelapic" cmdline option Documentation: Merge x86-specific boot options doc into kernel-parameters.txt x86/ioremap: Remove unused size parameter in remapping functions x86/ioremap: Simplify setup_data mapping variants x86/boot/compressed: Remove unused header includes from kaslr.c commit 6c4aa896ebee5edf2b35a9d071e5a468797f96d8 Merge: a6640c8c2fc0 b709eb872e19 Author: Linus Torvalds Date: Tue Jan 21 10:52:03 2025 -0800 Merge tag 'perf-core-2025-01-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull performance events updates from Ingo Molnar: "Seqlock optimizations that arose in a perf context and were merged into the perf tree: - seqlock: Add raw_seqcount_try_begin (Suren Baghdasaryan) - mm: Convert mm_lock_seq to a proper seqcount (Suren Baghdasaryan) - mm: Introduce mmap_lock_speculate_{try_begin|retry} (Suren Baghdasaryan) - mm/gup: Use raw_seqcount_try_begin() (Peter Zijlstra) Core perf enhancements: - Reduce 'struct page' footprint of perf by mapping pages in advance (Lorenzo Stoakes) - Save raw sample data conditionally based on sample type (Yabin Cui) - Reduce sampling overhead by checking sample_type in perf_sample_save_callchain() and perf_sample_save_brstack() (Yabin Cui) - Export perf_exclude_event() (Namhyung Kim) Uprobes scalability enhancements: (Andrii Nakryiko) - Simplify find_active_uprobe_rcu() VMA checks - Add speculative lockless VMA-to-inode-to-uprobe resolution - Simplify session consumer tracking - Decouple return_instance list traversal and freeing - Ensure return_instance is detached from the list before freeing - Reuse return_instances between multiple uretprobes within task - Guard against kmemdup() failing in dup_return_instance() AMD core PMU driver enhancements: - Relax privilege filter restriction on AMD IBS (Namhyung Kim) AMD RAPL energy counters support: (Dhananjay Ugwekar) - Introduce topology_logical_core_id() (K Prateek Nayak) - Remove the unused get_rapl_pmu_cpumask() function - Remove the cpu_to_rapl_pmu() function - Rename rapl_pmu variables - Make rapl_model struct global - Add arguments to the init and cleanup functions - Modify the generic variable names to *_pkg* - Remove the global variable rapl_msrs - Move the cntr_mask to rapl_pmus struct - Add core energy counter support for AMD CPUs Intel core PMU driver enhancements: - Support RDPMC 'metrics clear mode' feature (Kan Liang) - Clarify adaptive PEBS processing (Kan Liang) - Factor out functions for PEBS records processing (Kan Liang) - Simplify the PEBS records processing for adaptive PEBS (Kan Liang) Intel uncore driver enhancements: (Kan Liang) - Convert buggy pmu->func_id use to pmu->registered - Support more units on Granite Rapids" * tag 'perf-core-2025-01-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (33 commits) perf: map pages in advance perf/x86/intel/uncore: Support more units on Granite Rapids perf/x86/intel/uncore: Clean up func_id perf/x86/intel: Support RDPMC metrics clear mode uprobes: Guard against kmemdup() failing in dup_return_instance() perf/x86: Relax privilege filter restriction on AMD IBS perf/core: Export perf_exclude_event() uprobes: Reuse return_instances between multiple uretprobes within task uprobes: Ensure return_instance is detached from the list before freeing uprobes: Decouple return_instance list traversal and freeing uprobes: Simplify session consumer tracking uprobes: add speculative lockless VMA-to-inode-to-uprobe resolution uprobes: simplify find_active_uprobe_rcu() VMA checks mm: introduce mmap_lock_speculate_{try_begin|retry} mm: convert mm_lock_seq to a proper seqcount mm/gup: Use raw_seqcount_try_begin() seqlock: add raw_seqcount_try_begin perf/x86/rapl: Add core energy counter support for AMD CPUs perf/x86/rapl: Move the cntr_mask to rapl_pmus struct perf/x86/rapl: Remove the global variable rapl_msrs ... commit a6640c8c2fc029f015c87672585931c6106971c1 Merge: 8838a1a2d219 41a1e976623e Author: Linus Torvalds Date: Tue Jan 21 10:13:11 2025 -0800 Merge tag 'objtool-core-2025-01-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool updates from Ingo Molnar: - Introduce the generic section-based annotation infrastructure a.k.a. ASM_ANNOTATE/ANNOTATE (Peter Zijlstra) - Convert various facilities to ASM_ANNOTATE/ANNOTATE: (Peter Zijlstra) - ANNOTATE_NOENDBR - ANNOTATE_RETPOLINE_SAFE - instrumentation_{begin,end}() - VALIDATE_UNRET_BEGIN - ANNOTATE_IGNORE_ALTERNATIVE - ANNOTATE_INTRA_FUNCTION_CALL - {.UN}REACHABLE - Optimize the annotation-sections parsing code (Peter Zijlstra) - Centralize annotation definitions in - Unify & simplify the barrier_before_unreachable()/unreachable() definitions (Peter Zijlstra) - Convert unreachable() calls to BUG() in x86 code, as unreachable() has unreliable code generation (Peter Zijlstra) - Remove annotate_reachable() and annotate_unreachable(), as it's unreliable against compiler optimizations (Peter Zijlstra) - Fix non-standard ANNOTATE_REACHABLE annotation order (Peter Zijlstra) - Robustify the annotation code by warning about unknown annotation types (Peter Zijlstra) - Allow arch code to discover jump table size, in preparation of annotated jump table support (Ard Biesheuvel) * tag 'objtool-core-2025-01-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Convert unreachable() to BUG() objtool: Allow arch code to discover jump table size objtool: Warn about unknown annotation types objtool: Fix ANNOTATE_REACHABLE to be a normal annotation objtool: Convert {.UN}REACHABLE to ANNOTATE objtool: Remove annotate_{,un}reachable() loongarch: Use ASM_REACHABLE x86: Convert unreachable() to BUG() unreachable: Unify objtool: Collect more annotations in objtool.h objtool: Collapse annotate sequences objtool: Convert ANNOTATE_INTRA_FUNCTION_CALL to ANNOTATE objtool: Convert ANNOTATE_IGNORE_ALTERNATIVE to ANNOTATE objtool: Convert VALIDATE_UNRET_BEGIN to ANNOTATE objtool: Convert instrumentation_{begin,end}() to ANNOTATE objtool: Convert ANNOTATE_RETPOLINE_SAFE to ANNOTATE objtool: Convert ANNOTATE_NOENDBR to ANNOTATE objtool: Generic annotation infrastructure commit d3d930411ce390e532470194296658a960887773 Author: Patrisious Haddad Date: Sun Jan 19 10:21:41 2025 +0200 RDMA/mlx5: Fix implicit ODP use after free Prevent double queueing of implicit ODP mr destroy work by using __xa_cmpxchg() to make sure this is the only time we are destroying this specific mr. Without this change, we could try to invalidate this mr twice, which in turn could result in queuing a MR work destroy twice, and eventually the second work could execute after the MR was freed due to the first work, causing a user after free and trace below. refcount_t: underflow; use-after-free. WARNING: CPU: 2 PID: 12178 at lib/refcount.c:28 refcount_warn_saturate+0x12b/0x130 Modules linked in: bonding ib_ipoib vfio_pci ip_gre geneve nf_tables ip6_gre gre ip6_tunnel tunnel6 ipip tunnel4 ib_umad rdma_ucm mlx5_vfio_pci vfio_pci_core vfio_iommu_type1 mlx5_ib vfio ib_uverbs mlx5_core iptable_raw openvswitch nsh rpcrdma ib_iser libiscsi scsi_transport_iscsi rdma_cm iw_cm ib_cm ib_core xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter rpcsec_gss_krb5 auth_rpcgss oid_registry overlay zram zsmalloc fuse [last unloaded: ib_uverbs] CPU: 2 PID: 12178 Comm: kworker/u20:5 Not tainted 6.5.0-rc1_net_next_mlx5_58c644e #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Workqueue: events_unbound free_implicit_child_mr_work [mlx5_ib] RIP: 0010:refcount_warn_saturate+0x12b/0x130 Code: 48 c7 c7 38 95 2a 82 c6 05 bc c6 fe 00 01 e8 0c 66 aa ff 0f 0b 5b c3 48 c7 c7 e0 94 2a 82 c6 05 a7 c6 fe 00 01 e8 f5 65 aa ff <0f> 0b 5b c3 90 8b 07 3d 00 00 00 c0 74 12 83 f8 01 74 13 8d 50 ff RSP: 0018:ffff8881008e3e40 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000027 RDX: ffff88852c91b5c8 RSI: 0000000000000001 RDI: ffff88852c91b5c0 RBP: ffff8881dacd4e00 R08: 00000000ffffffff R09: 0000000000000019 R10: 000000000000072e R11: 0000000063666572 R12: ffff88812bfd9e00 R13: ffff8881c792d200 R14: ffff88810011c005 R15: ffff8881002099c0 FS: 0000000000000000(0000) GS:ffff88852c900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f5694b5e000 CR3: 00000001153f6003 CR4: 0000000000370ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? refcount_warn_saturate+0x12b/0x130 free_implicit_child_mr_work+0x180/0x1b0 [mlx5_ib] process_one_work+0x1cc/0x3c0 worker_thread+0x218/0x3c0 kthread+0xc6/0xf0 ret_from_fork+0x1f/0x30 Fixes: 5256edcb98a1 ("RDMA/mlx5: Rework implicit ODP destroy") Cc: stable@vger.kernel.org Link: https://patch.msgid.link/r/c96b8645a81085abff739e6b06e286a350d1283d.1737274283.git.leon@kernel.org Signed-off-by: Patrisious Haddad Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/odp.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 8838a1a2d219a86ab05e679c73f68dd75a25aca5 Merge: b9d8a295ed6b cb4ccc70344c Author: Linus Torvalds Date: Tue Jan 21 10:10:24 2025 -0800 Merge tag 'locking-core-2025-01-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: "Lockdep: - Improve and fix lockdep bitsize limits, clarify the Kconfig documentation (Carlos Llamas) - Fix lockdep build warning on Clang related to chain_hlock_class_idx() inlining (Andy Shevchenko) - Relax the requirements of PROVE_RAW_LOCK_NESTING arch support by not tying it to ARCH_SUPPORTS_RT unnecessarily (Waiman Long) Rust integration: - Support lock pointers managed by the C side (Lyude Paul) - Support guard types (Lyude Paul) - Update MAINTAINERS file filters to include the Rust locking code (Boqun Feng) Wake-queues: - Add raw_spin_*wake() helpers to simplify locking code (John Stultz) SMP cross-calls: - Fix potential data update race by evaluating the local cond_func() before IPI side-effects (Mathieu Desnoyers) Guard primitives: - Ease [c]tags based searches by including the cleanup/guard type primitives (Peter Zijlstra) ww_mutexes: - Simplify the ww_mutex self-test code via swap() (Thorsten Blum) Static calls: - Update the static calls MAINTAINERS file-pattern (Jiri Slaby)" * tag 'locking-core-2025-01-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: MAINTAINERS: Add static_call_inline.c to STATIC BRANCH/CALL cleanup, tags: Create tags for the cleanup primitives sched/wake_q: Add helper to call wake_up_q after unlock with preemption disabled rust: sync: Add lock::Backend::assert_is_held() rust: sync: Add SpinLockGuard type alias rust: sync: Add MutexGuard type alias rust: sync: Make Guard::new() public rust: sync: Add Lock::from_raw() for Lock<(), B> locking: MAINTAINERS: Start watching Rust locking primitives lockdep: Move lockdep_assert_locked() under #ifdef CONFIG_PROVE_LOCKING lockdep: Mark chain_hlock_class_idx() with __maybe_unused lockdep: Document MAX_LOCKDEP_CHAIN_HLOCKS calculation lockdep: Clarify size for LOCKDEP_*_BITS configs lockdep: Fix upper limit for LOCKDEP_*_BITS configs locking/ww_mutex/test: Use swap() macro smp/scf: Evaluate local cond_func() before IPI side-effects locking/lockdep: Enforce PROVE_RAW_LOCK_NESTING only if ARCH_SUPPORTS_RT commit dec6b006f4cc13968d75ed28673ca4e3633de96b Author: Fabio Estevam Date: Tue Jan 21 12:57:47 2025 -0300 ASoC: dt-bindings: ti,pcm1681: Fix the binding title The PCM1681 is an 8-channel Digital-to-Analog Converter, so fix it accordingly. Signed-off-by: Fabio Estevam Link: https://patch.msgid.link/20250121155747.3740995-1-festevam@gmail.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/ti,pcm1681.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abb604a1a9c87255c7a6f3b784410a9707baf467 Author: Yishai Hadas Date: Sun Jan 19 14:38:25 2025 +0200 RDMA/mlx5: Fix a race for an ODP MR which leads to CQE with error This patch addresses a race condition for an ODP MR that can result in a CQE with an error on the UMR QP. During the __mlx5_ib_dereg_mr() flow, the following sequence of calls occurs: mlx5_revoke_mr() mlx5r_umr_revoke_mr() mlx5r_umr_post_send_wait() At this point, the lkey is freed from the hardware's perspective. However, concurrently, mlx5_ib_invalidate_range() might be triggered by another task attempting to invalidate a range for the same freed lkey. This task will: - Acquire the umem_odp->umem_mutex lock. - Call mlx5r_umr_update_xlt() on the UMR QP. - Since the lkey has already been freed, this can lead to a CQE error, causing the UMR QP to enter an error state [1]. To resolve this race condition, the umem_odp->umem_mutex lock is now also acquired as part of the mlx5_revoke_mr() scope. Upon successful revoke, we set umem_odp->private which points to that MR to NULL, preventing any further invalidation attempts on its lkey. [1] From dmesg: infiniband rocep8s0f0: dump_cqe:277:(pid 0): WC error: 6, Message: memory bind operation error cqe_dump: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cqe_dump: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cqe_dump: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cqe_dump: 00000030: 00 00 00 00 08 00 78 06 25 00 11 b9 00 0e dd d2 WARNING: CPU: 15 PID: 1506 at drivers/infiniband/hw/mlx5/umr.c:394 mlx5r_umr_post_send_wait+0x15a/0x2b0 [mlx5_ib] Modules linked in: ip6table_mangle ip6table_natip6table_filter ip6_tables iptable_mangle xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter rpcsec_gss_krb5 auth_rpcgss oid_registry overlay rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi rdma_cm iw_cm ib_umad ib_ipoib ib_cm mlx5_ib ib_uverbs ib_core fuse mlx5_core CPU: 15 UID: 0 PID: 1506 Comm: ibv_rc_pingpong Not tainted 6.12.0-rc7+ #1626 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:mlx5r_umr_post_send_wait+0x15a/0x2b0 [mlx5_ib] [..] Call Trace: mlx5r_umr_update_xlt+0x23c/0x3e0 [mlx5_ib] mlx5_ib_invalidate_range+0x2e1/0x330 [mlx5_ib] __mmu_notifier_invalidate_range_start+0x1e1/0x240 zap_page_range_single+0xf1/0x1a0 madvise_vma_behavior+0x677/0x6e0 do_madvise+0x1a2/0x4b0 __x64_sys_madvise+0x25/0x30 do_syscall_64+0x6b/0x140 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: e6fb246ccafb ("RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr()") Cc: stable@vger.kernel.org Link: https://patch.msgid.link/r/68a1e007c25b2b8fe5d625f238cc3b63e5341f77.1737290229.git.leon@kernel.org Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mr.c | 17 +++++++++++++++-- drivers/infiniband/hw/mlx5/odp.c | 2 ++ 2 files changed, 17 insertions(+), 2 deletions(-) commit f917016f69ba5a0c42a3a3327792707315f2a937 Author: Kent Overstreet Date: Tue Jan 21 12:56:00 2025 -0500 bcachefs: Reduce stack frame size of __bch2_str_hash_check_key() We don't need all the helpers inlined here. Signed-off-by: Kent Overstreet fs/bcachefs/str_hash.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit e721f619e3ec9bae08bf419c3944cf1e6966c821 Author: Nicolin Chen Date: Mon Jan 20 11:50:51 2025 -0800 iommufd: Fix struct iommu_hwpt_pgfault init and padding The iommu_hwpt_pgfault is used to report IO page fault data to userspace, but iommufd_fault_fops_read was never zeroing its padding. This leaks the content of the kernel stack memory to userspace. Also, the iommufd uAPI requires explicit padding and use of __aligned_u64 to ensure ABI compatibility's with 32 bit. pahole result, before: struct iommu_hwpt_pgfault { __u32 flags; /* 0 4 */ __u32 dev_id; /* 4 4 */ __u32 pasid; /* 8 4 */ __u32 grpid; /* 12 4 */ __u32 perm; /* 16 4 */ /* XXX 4 bytes hole, try to pack */ __u64 addr; /* 24 8 */ __u32 length; /* 32 4 */ __u32 cookie; /* 36 4 */ /* size: 40, cachelines: 1, members: 8 */ /* sum members: 36, holes: 1, sum holes: 4 */ /* last cacheline: 40 bytes */ }; pahole result, after: struct iommu_hwpt_pgfault { __u32 flags; /* 0 4 */ __u32 dev_id; /* 4 4 */ __u32 pasid; /* 8 4 */ __u32 grpid; /* 12 4 */ __u32 perm; /* 16 4 */ __u32 __reserved; /* 20 4 */ __u64 addr __attribute__((__aligned__(8))); /* 24 8 */ __u32 length; /* 32 4 */ __u32 cookie; /* 36 4 */ /* size: 40, cachelines: 1, members: 9 */ /* forced alignments: 1 */ /* last cacheline: 40 bytes */ } __attribute__((__aligned__(8))); Fixes: c714f15860fc ("iommufd: Add fault and response message definitions") Link: https://patch.msgid.link/r/20250120195051.2450-1-nicolinc@nvidia.com Cc: stable@vger.kernel.org Reviewed-by: Jason Gunthorpe Signed-off-by: Nicolin Chen Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/fault.c | 2 +- include/uapi/linux/iommufd.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit b9d8a295ed6bc3cee846f8e3f27c9c6e9ebe43f2 Merge: 48795f90cbdc 79821b907f8d Author: Linus Torvalds Date: Tue Jan 21 09:38:52 2025 -0800 Merge tag 'x86_misc_for_v6.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 updates from Borislav Petkov: - The first part of a restructuring of AMD's representation of a northbridge which is legacy now, and the creation of the new AMD node concept which represents the Zen architecture of having a collection of I/O devices within an SoC. Those nodes comprise the so-called data fabric on Zen. This has at least one practical advantage of not having to add a PCI ID each time a new data fabric PCI device releases. Eventually, the lot more uniform provider of data fabric functionality amd_node.c will be used by all the drivers which need it - Smaller cleanups * tag 'x86_misc_for_v6.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/amd_node: Use defines for SMN register offsets x86/amd_node: Remove dependency on AMD_NB x86/amd_node: Update __amd_smn_rw() error paths x86/amd_nb: Move SMN access code to a new amd_node driver x86/amd_nb, hwmon: (k10temp): Simplify amd_pci_dev_to_node_id() x86/amd_nb: Simplify function 3 search x86/amd_nb: Use topology info to get AMD node count x86/amd_nb: Simplify root device search x86/amd_nb: Simplify function 4 search x86: Start moving AMD node functionality out of AMD_NB x86/amd_nb: Clean up early_is_amd_nb() x86/amd_nb: Restrict init function to AMD-based systems x86/mtrr: Rename mtrr_overwrite_state() to guest_force_mtrr_state() commit 48795f90cbdcccc36cc415a2d785a23a4b23e57a Merge: 13b6931c4496 e5d3a57891ba Author: Linus Torvalds Date: Tue Jan 21 09:30:59 2025 -0800 Merge tag 'x86_cpu_for_v6.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpuid updates from Borislav Petkov: - Remove the less generic CPU matching infra around struct x86_cpu_desc and use the generic struct x86_cpu_id thing - Remove magic naked numbers for CPUID functions and use proper defines of the prefix CPUID_LEAF_*. Consolidate some of the crazy use around the tree - Smaller cleanups and improvements * tag 'x86_cpu_for_v6.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Make all all CPUID leaf names consistent x86/fpu: Remove unnecessary CPUID level check x86/fpu: Move CPUID leaf definitions to common code x86/tsc: Remove CPUID "frequency" leaf magic numbers. x86/tsc: Move away from TSC leaf magic numbers x86/cpu: Move TSC CPUID leaf definition x86/cpu: Refresh DCA leaf reading code x86/cpu: Remove unnecessary MwAIT leaf checks x86/cpu: Use MWAIT leaf definition x86/cpu: Move MWAIT leaf definition to common header x86/cpu: Remove 'x86_cpu_desc' infrastructure x86/cpu: Move AMD erratum 1386 table over to 'x86_cpu_id' x86/cpu: Replace PEBS use of 'x86_cpu_desc' use with 'x86_cpu_id' x86/cpu: Expose only stepping min/max interface x86/cpu: Introduce new microcode matching helper x86/cpufeature: Document cpu_feature_enabled() as the default to use x86/paravirt: Remove the WBINVD callback x86/cpufeatures: Free up unused feature bits commit a8581752278ef9d6ea73bb10eef2657bfb73e116 Author: Kent Overstreet Date: Tue Jan 21 02:26:13 2025 -0500 bcachefs: Fix btree_trans_peek_key_cache() BTREE_ITER_cached_nofill has some tricky corner cases; it's used internally for iterators that aren't walking the key cache, but need to be coherent with the key cache. It tells traverse to look up and lock the key cache entry if present, but don't create one if it doesn't exist. That means we have to have a BTREE_ITER_UPTODATE path (because after traverse the path has to be UPTODATE, or we pop assertions) that doesn't point to anything (which is the less bad option, taken by the previous fix). The previous fix for this path missed an issue that can happen in bch2_trans_peek_key_cache(): we can't set should_be_locked on a path that doesn't point to anything and doesn't hold locks. Fixes: bd5b09727f3d ("bcachefs: Don't set btree_path to updtodate if we don't fill") Signed-off-by: Kent Overstreet fs/bcachefs/btree_iter.c | 3 +-- fs/bcachefs/btree_key_cache.c | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) commit 8c09f612b2937da109ed0df583ace3a29fc95a93 Author: Avri Altman Date: Tue Jan 14 20:12:05 2025 +0200 scsi: ufs: core: Simplify temperature exception event handling This commit simplifies the temperature exception event handling by removing the ufshcd_temp_exception_event_handler() function and directly calling ufs_hwmon_notify_event() in ufshcd_exception_event_handler(). The ufshcd_temp_exception_event_handler() function contained a placeholder comment for platform vendors to add additional steps if required. However, since its introduction a few years ago, no vendor has added any additional steps. Therefore, the placeholder function is removed to streamline the code. Signed-off-by: Avri Altman Link: https://lore.kernel.org/r/20250114181205.153760-1-avri.altman@wdc.com Reviewed-by: Bean Huo Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/ufs/core/ufshcd.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) commit c9d2782988df354b5a2db00be93920b4ecdde7a2 Author: Guixin Liu Date: Tue Jan 14 10:50:41 2025 +0800 scsi: target: core: Add line break to status show To ensure the output is not tangled with the shell prompt, add a line break to clearly display the status. Signed-off-by: Guixin Liu Link: https://lore.kernel.org/r/20250114025041.97301-1-kanie@linux.alibaba.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_stat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c25b978d351fae5da87794be9160d8acfa6e6823 Author: Manikanta Mylavarapu Date: Fri Dec 13 19:19:47 2024 +0530 dt-bindings: PCI: qcom: Document the IPQ5424 PCIe controller Document the PCIe controller on the IPQ5424 platform using the IPQ9574 bindings as a fallback, since the PCIe on the IPQ5424 is similar to IPQ9574. Link: https://lore.kernel.org/r/20241213134950.234946-2-quic_mmanikan@quicinc.com Signed-off-by: Manikanta Mylavarapu Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Kozlowski Acked-by: Manivannan Sadhasivam Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 10e796eed62648ff928cb66d52f226452e1affff Author: Neil Armstrong Date: Tue Nov 26 11:22:49 2024 +0100 dt-bindings: PCI: qcom,pcie-sm8550: Document 'global' interrupt Qcom PCIe RC controllers are capable of generating 'global' SPI interrupt to the host CPU. This interrupt can be used by the device driver to handle PCIe link specific events such as Link up and Link down, which give the driver a chance to start bus enumeration on its own when link is up and initiate link training if link goes to a bad state. The PCIe driver can still work without this interrupt but it will provide a nice user experience when device gets plugged and removed. Document the interrupt as optional for SM8550 and SM8650 platforms. Link: https://lore.kernel.org/r/20241126-topic-sm8x50-pcie-global-irq-v1-1-4049cfccd073@linaro.org Signed-off-by: Neil Armstrong Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Kozlowski Reviewed-by: Manivannan Sadhasivam Documentation/devicetree/bindings/pci/qcom,pcie-sm8550.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 1b3e2d4ec0c5848776cc56d2624998aa5b2f0d27 Author: Bao D. Nguyen Date: Mon Jan 13 10:32:07 2025 -0800 scsi: ufs: core: Fix the HIGH/LOW_TEMP Bit Definitions According to the UFS Device Specification, the dExtendedUFSFeaturesSupport defines the support for TOO_HIGH_TEMPERATURE as bit[4] and the TOO_LOW_TEMPERATURE as bit[5]. Correct the code to match with the UFS device specification definition. Cc: stable@vger.kernel.org Fixes: e88e2d32200a ("scsi: ufs: core: Probe for temperature notification support") Signed-off-by: Bao D. Nguyen Link: https://lore.kernel.org/r/69992b3e3e3434a5c7643be5a64de48be892ca46.1736793068.git.quic_nguyenb@quicinc.com Reviewed-by: Avri Altman Reviewed-by: Peter Wang Signed-off-by: Martin K. Petersen include/ufs/ufs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b02cfbd9bfb9f45eebb33771e5705af95b5c9673 Author: Frank Li Date: Wed Dec 11 12:13:16 2024 -0500 dt-bindings: PCI: mobiveil: Convert mobiveil-pcie.txt to YAML Convert device tree binding document mobiveil-pcie.txt to YAML format and merge layerscape-pcie-gen4.txt into this file. Additional changes: - interrupt-names: "aer", "pme", "intr", which align order in examples. - reg-names: reorder as csr_axi_slave, config_axi_slave to match layerscape-pcie-gen4 and existing Layerscape DTS users. Fix below CHECK_DTBS warning: arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dtb: /soc/pcie@3400000: failed to match any schema with compatible: ['fsl,lx2160a-pcie'] Link: https://lore.kernel.org/r/20241211171318.4129818-1-Frank.Li@nxp.com Signed-off-by: Frank Li Signed-off-by: Lorenzo Pieralisi [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński [bhelgaas: fix typos, whitespace, consistent bus-range usage] Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Kozlowski .../bindings/pci/layerscape-pcie-gen4.txt | 52 ------- .../devicetree/bindings/pci/mbvl,gpex40-pcie.yaml | 173 +++++++++++++++++++++ .../devicetree/bindings/pci/mobiveil-pcie.txt | 72 --------- MAINTAINERS | 3 +- 4 files changed, 174 insertions(+), 126 deletions(-) commit b893d7ff853e27aa6000fc4ca12e0ffda3318bfc Author: Mike Christie Date: Mon Jan 13 12:07:57 2025 -0600 scsi: core: Add passthrough tests for success and no failure definitions This patch adds scsi_check_passthrough() tests for the cases where a command completes successfully and when the command failed but the caller did not pass in a list of failures. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20250113180757.16691-1-michael.christie@oracle.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib_test.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 0a8f5f4652ef4d530a7cb8bed2b6e502cdfa825f Author: Takashi Iwai Date: Tue Jan 21 18:00:31 2025 +0100 ALSA: usb: fcp: Fix return code from poll ops Fix a sparse warning due to the invalid return type from poll ops, which is __poll_t. Fixes: 46757a3e7d50 ("ALSA: FCP: Add Focusrite Control Protocol driver") Link: https://patch.msgid.link/20250121170032.7236-4-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/fcp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f08cc80f69be62beb7a63cd4813c7989c8708831 Author: Takashi Iwai Date: Tue Jan 21 18:00:30 2025 +0100 ALSA: usb: fcp: Fix incorrect resp->opcode retrieval Fix a wrong conversion macro used for resp->opcode, which is __le32. Fixes: 46757a3e7d50 ("ALSA: FCP: Add Focusrite Control Protocol driver") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501212331.SaePSmsA-lkp@intel.com/ Link: https://patch.msgid.link/20250121170032.7236-3-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/fcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7217011ddd8e86a0d18c6cbfb4f14da3d18eee0 Author: Takashi Iwai Date: Tue Jan 21 18:00:29 2025 +0100 ALSA: usb: fcp: Fix meter_levels type to __le32 The cached level meter values are returned from the USB core as __le32, hence declare properly. Fixes: 46757a3e7d50 ("ALSA: FCP: Add Focusrite Control Protocol driver") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501212331.SaePSmsA-lkp@intel.com/ Link: https://patch.msgid.link/20250121170032.7236-2-tiwai@suse.de Signed-off-by: Takashi Iwai sound/usb/fcp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 13b6931c44969ff057ad2a3aa1c20a1b28b79b6f Merge: 254d7633103c 0563ee35ae2c Author: Linus Torvalds Date: Tue Jan 21 09:00:31 2025 -0800 Merge tag 'x86_sev_for_v6.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 SEV updates from Borislav Petkov: - A segmented Reverse Map table (RMP) is a across-nodes distributed table of sorts which contains per-node descriptors of each node-local 4K page, denoting its ownership (hypervisor, guest, etc) in the realm of confidential computing. Add support for such a table in order to improve referential locality when accessing or modifying RMP table entries - Add support for reading the TSC in SNP guests by removing any interference or influence the hypervisor might have, with the goal of making a confidential guest even more independent from the hypervisor * tag 'x86_sev_for_v6.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sev: Add the Secure TSC feature for SNP guests x86/tsc: Init the TSC for Secure TSC guests x86/sev: Mark the TSC in a secure TSC guest as reliable x86/sev: Prevent RDTSC/RDTSCP interception for Secure TSC enabled guests x86/sev: Prevent GUEST_TSC_FREQ MSR interception for Secure TSC enabled guests x86/sev: Change TSC MSR behavior for Secure TSC enabled guests x86/sev: Add Secure TSC support for SNP guests x86/sev: Relocate SNP guest messaging routines to common code x86/sev: Carve out and export SNP guest messaging init routines virt: sev-guest: Replace GFP_KERNEL_ACCOUNT with GFP_KERNEL virt: sev-guest: Remove is_vmpck_empty() helper x86/sev/docs: Document the SNP Reverse Map Table (RMP) x86/sev: Add full support for a segmented RMP table x86/sev: Treat the contiguous RMP table as a single RMP segment x86/sev: Map only the RMP table entries instead of the full RMP range x86/sev: Move the SNP probe routine out of the way x86/sev: Require the RMPREAD instruction after Zen4 x86/sev: Add support for the RMPREAD instruction x86/sev: Prepare for using the RMPREAD instruction to access the RMP commit a3282f84b2151d254dc4abf24d1255c6382be774 Author: Rakesh Babu Saladi Date: Mon Jan 20 15:25:24 2025 +0530 PCI: switchtec: Add Microchip PCI100X device IDs Add Microchip parts to the Device ID table so the driver supports PCI100x devices. Add a new macro to quirk the Microchip Switchtec PCI100x parts to allow DMA access via NTB to work when the IOMMU is turned on. PCI100x family has 6 variants; each variant is designed for different application usages, different port counts and lane counts: PCI1001 has 1 x4 upstream port and 3 x4 downstream ports PCI1002 has 1 x4 upstream port and 4 x2 downstream ports PCI1003 has 2 x4 upstream ports, 2 x2 upstream ports, and 2 x2 downstream ports PCI1004 has 4 x4 upstream ports PCI1005 has 1 x4 upstream port and 6 x2 downstream ports PCI1006 has 6 x2 upstream ports and 2 x2 downstream ports [Historical note: these parts use PCI_VENDOR_ID_EFAR (0x1055), from EFAR Microsystems, which was acquired in 1996 by Standard Microsystems Corp, which was acquired by Microchip Technology in 2012. The PCI-SIG confirms that Vendor ID 0x1055 is assigned to Microchip even though it's not visible via https://pcisig.com/membership/member-companies] Link: https://lore.kernel.org/r/20250120095524.243103-1-Saladi.Rakeshbabu@microchip.com Signed-off-by: Rakesh Babu Saladi [bhelgaas: Vendor ID history] Signed-off-by: Bjorn Helgaas Acked-By: Logan Gunthorpe drivers/pci/quirks.c | 11 +++++++++++ drivers/pci/switch/switchtec.c | 26 ++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit 0b96c75d86560c077d29ce629e9d1ca0258c9cc1 Author: Olga Kornievskaia Date: Fri Dec 13 11:52:02 2024 -0500 NFSv4.2: make LAYOUTSTATS and LAYOUTERROR MOVEABLE LAYOUTSTATS and LAYOUTERROR should be marked MOVEABLE for when we need to move tasks off a non-functional transport. Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker fs/nfs/nfs42proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 668135b9348c53fd205f5e07d11e82b10f31b55b Author: Olga Kornievskaia Date: Fri Dec 13 11:52:01 2024 -0500 NFSv4.2: mark OFFLOAD_CANCEL MOVEABLE OFFLOAD_CANCEL should be marked MOVEABLE for when we need to move tasks off a non-functional transport. Fixes: c975c2092657 ("NFS send OFFLOAD_CANCEL when COPY killed") Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker fs/nfs/nfs42proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8380c2d06055665b3df6c03964911375d7f9290 Author: Olga Kornievskaia Date: Fri Dec 13 11:52:00 2024 -0500 NFSv4.2: fix COPY_NOTIFY xdr buf size calculation We need to include sequence size in the compound. Fixes: 0491567b51ef ("NFS: add COPY_NOTIFY operation") Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker fs/nfs/nfs42xdr.c | 2 ++ 1 file changed, 2 insertions(+) commit aa9e4ad0fd87f44748af84616accbd42cfb875aa Author: Chuck Lever Date: Mon Jan 13 10:32:38 2025 -0500 NFS: Rename struct nfs4_offloadcancel_data Refactor: This struct can be used unchanged for the new OFFLOAD_STATUS implementation, so give it a more generic name. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker fs/nfs/nfs42proc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 36f4e9ef84bb334392628bcc21557ddad7dc8e5f Author: Chuck Lever Date: Mon Jan 13 10:32:37 2025 -0500 NFS: Fix typo in OFFLOAD_CANCEL comment Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker fs/nfs/nfs42xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2fc83c5df63f1391006ff7f734bfb794c76badd Author: Chuck Lever Date: Mon Jan 13 10:32:36 2025 -0500 NFS: CB_OFFLOAD can return NFS4ERR_DELAY RFC 7862 permits the callback service to respond to a CB_OFFLOAD operation with NFS4ERR_DELAY. Use that instead of NFS4ERR_SERVERFAULT for temporary memory allocation failure, as that is more consistent with how other operations report memory allocation failure. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker fs/nfs/callback_proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90190ba1c3b11687e2c251fda1f5d9893b4bab17 Author: Dragan Simic Date: Fri Dec 27 20:17:58 2024 +0100 nfs: Make NFS_FSCACHE select NETFS_SUPPORT instead of depending on it Having the NFS_FSCACHE option depend on the NETFS_SUPPORT options makes selecting NFS_FSCACHE impossible unless another option that additionally selects NETFS_SUPPORT is already selected. As a result, for example, being able to reach and select the NFS_FSCACHE option requires the CEPH_FS or CIFS option to be selected beforehand, which obviously doesn't make much sense. Let's correct this by making the NFS_FSCACHE option actually select the NETFS_SUPPORT option, instead of depending on it. Fixes: 915cd30cdea8 ("netfs, fscache: Combine fscache with netfs") Cc: stable@vger.kernel.org Reported-by: Diederik de Haas Signed-off-by: Dragan Simic Signed-off-by: Anna Schumaker fs/nfs/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ead11ac50ad4b8ef1b64806e962ea984862d96ad Author: Mike Snitzer Date: Mon Jan 13 17:29:03 2025 -0500 nfs: fix incorrect error handling in LOCALIO nfs4_stat_to_errno() expects a NFSv4 error code as an argument and returns a POSIX errno. The problem is LOCALIO is passing nfs4_stat_to_errno() the POSIX errno return values from filp->f_op->read_iter(), filp->f_op->write_iter() and vfs_fsync_range(). So the POSIX errno that nfs_local_pgio_done() and nfs_local_commit_done() are passing to nfs4_stat_to_errno() are failing to match any NFSv4 error code, which results in nfs4_stat_to_errno() defaulting to returning -EREMOTEIO. This causes assertions in upper layers due to -EREMOTEIO not being a valid NFSv4 error code. Fix this by updating nfs_local_pgio_done() and nfs_local_commit_done() to use the new nfs_localio_errno_to_nfs4_stat() to map a POSIX errno to an NFSv4 error code. Care was taken to factor out nfs4_errtbl_common[] to avoid duplicating the same NFS error to errno table. nfs4_errtbl_common[] is checked first by both nfs4_stat_to_errno and nfs_localio_errno_to_nfs4_stat before they check their own more specialized tables (nfs4_errtbl[] and nfs4_errtbl_localio[] respectively). While auditing the associated error mapping tables, the (ab)use of -1 for the last table entry was removed in favor of using ARRAY_SIZE to iterate the nfs_errtbl[] and nfs4_errtbl[]. And 'errno_NFSERR_IO' was removed because it caused needless obfuscation. Fixes: 70ba381e1a431 ("nfs: add LOCALIO support") Reported-by: Trond Myklebust Signed-off-by: Mike Snitzer Signed-off-by: Anna Schumaker fs/nfs/localio.c | 4 +-- fs/nfs_common/common.c | 89 ++++++++++++++++++++++++++++++++++++++++------ include/linux/nfs_common.h | 3 +- 3 files changed, 82 insertions(+), 14 deletions(-) commit 254d7633103cfe2773fa001ca3ab9e5c1c7fa59a Merge: 3357d1d1f915 ead0db14c726 Author: Linus Torvalds Date: Tue Jan 21 08:33:10 2025 -0800 Merge tag 'x86_microcode_for_v6.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 microcode loader updates from Borislav Petkov: - A bunch of minor cleanups * tag 'x86_microcode_for_v6.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode/AMD: Remove ret local var in early_apply_microcode() x86/microcode/AMD: Have __apply_microcode_amd() return bool x86/microcode/AMD: Make __verify_patch_size() return bool x86/microcode/AMD: Remove bogus comment from parse_container() x86/microcode/AMD: Return bool from find_blobs_in_containers() commit 3357d1d1f9157089d96c04f3258ebd7e29e47752 Merge: d80825ee4a34 faf6ef673787 Author: Linus Torvalds Date: Tue Jan 21 08:31:04 2025 -0800 Merge tag 'x86_cache_for_v6.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 resource control updates from Borislav Petkov: - Extend resctrl with the capability of total memory bandwidth monitoring, thus accomodating systems which support only total but not local memory bandwidth monitoring. Add the respective new mount options - The usual cleanups * tag 'x86_cache_for_v6.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Document the new "mba_MBps_event" file x86/resctrl: Add write option to "mba_MBps_event" file x86/resctrl: Add "mba_MBps_event" file to CTRL_MON directories x86/resctrl: Make mba_sc use total bandwidth if local is not supported x86/resctrl: Compute memory bandwidth for all supported events x86/resctrl: Modify update_mba_bw() to use per CTRL_MON group event x86/resctrl: Prepare for per-CTRL_MON group mba_MBps control x86/resctrl: Introduce resctrl_file_fflags_init() to initialize fflags x86/resctrl: Use kthread_run_on_cpu() commit e02938613eb206ebf788e2d3d4fccf534e4ea12e Author: Jaegeuk Kim Date: Fri Jan 17 21:38:22 2025 +0000 f2fs: avoid trying to get invalid block address In f2fs_new_inode(), if we fail to get a new inode, we go iput(), followed by f2fs_evict_inode(). If the inode is not marked as bad, it'll try to call f2fs_remove_inode_page() which tries to read the inode block given node id. But, there's no block address allocated yet, which gives a chance to access a wrong block address, if the block device has some garbage data in NAT table. We need to make sure NAT table should have zero data for all the unallocated node ids, but also would be better to take this unnecessary path as well. Let's mark the faild inode as bad. Fixes: 0abd675e97e6 ("f2fs: support plain user/group quota") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/namei.c | 1 + 1 file changed, 1 insertion(+) commit d80825ee4a34a1b108aee51cd0302be0ab7943fa Merge: 0763dd892855 716f86b523d8 Author: Linus Torvalds Date: Tue Jan 21 08:22:40 2025 -0800 Merge tag 'x86_bugs_for_v6.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 CPU speculation update from Borislav Petkov: - Add support for AMD hardware which is not affected by SRSO on the user/kernel attack vector and advertise it to guest userspace * tag 'x86_bugs_for_v6.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: KVM: x86: Advertise SRSO_USER_KERNEL_NO to userspace x86/bugs: Add SRSO_USER_KERNEL_NO support commit 0763dd892855aca05c4b45bc3a5da439d5f009ae Merge: d3504411a45e 368736db4d1c Author: Linus Torvalds Date: Tue Jan 21 08:21:12 2025 -0800 Merge tag 'edac_updates_for_v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Borislav Petkov: - Remove the EDAC PowerPC Cell driver due to the removal of the IBM Cell blades support - Add a new EDAC driver for Loongson SoCs which reports single-bit correctable errors - Extend the SKX and i10NM EDAC drivers to support UV systems which can have more than 8 nodes - Add Intel Clearwater Forest server support to i10nm_edac - Minor fix * tag 'edac_updates_for_v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/cell: Remove powerpc Cell driver EDAC: Add an EDAC driver for the Loongson memory controller EDAC: Fix typos in comments EDAC/{i10nm,skx,skx_common}: Support UV systems EDAC/i10nm: Add Intel Clearwater Forest server support commit d3504411a45e01a7bd7187bab7bcae0a9041514a Merge: 95ec54a420b8 d35fb3121a36 Author: Linus Torvalds Date: Tue Jan 21 08:16:24 2025 -0800 Merge tag 'ras_core_for_v6.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 RAS updates from Borislav Petkov: - Remove the shared threshold bank hack on AMD and streamline and simplify it - Cleanup and sanitize MCA code * tag 'ras_core_for_v6.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce/amd: Remove shared threshold bank plumbing x86/mce: Remove the redundant mce_hygon_feature_init() x86/mce: Convert family/model mixed checks to VFM-based checks x86/mce: Break up __mcheck_cpu_apply_quirks() x86/mce: Make four functions return bool x86/mce/threshold: Remove the redundant this_cpu_dec_return() x86/mce: Make several functions return bool commit 4644db83642d92f6d7407a7786a72cb65c56c10a Author: Hans Zhang <18255117159@163.com> Date: Thu Jan 9 17:45:55 2025 +0800 misc: pci_endpoint_test: Remove redundant 'remainder' test A BAR size is always a power of two. buf_size = min(SZ_1M, bar_size). If the BAR size is <= 1MB, there will be one iteration, no remainder. If the BAR size is > 1MB, there will be more than one iteration, but the size will always be evenly divisible by 1MB, so no remainder. Link: https://lore.kernel.org/r/20250109094556.1724663-2-18255117159@163.com Suggested-by: Niklas Cassel Signed-off-by: Hans Zhang <18255117159@163.com> Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel Reviewed-by: Manivannan Sadhasivam drivers/misc/pci_endpoint_test.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit d6658d3338f84173fb55c9d6c6cdfa57f879712d Author: Niklas Cassel Date: Sat Nov 16 04:20:45 2024 +0100 misc: pci_endpoint_test: Add consecutive BAR test Add a more advanced BAR test that writes all BARs in one go, and then reads them back and verifies that the value matches the BAR number bitwise OR'ed with offset, this allows us to verify: - The BAR number was what we intended to read - The offset was what we intended to read This allows us to detect potential address translation issues on the EP. Reading back the BAR directly after writing will not allow us to detect the case where inbound address translation on the endpoint incorrectly causes multiple BARs to be redirected to the same memory region (within the EP). Link: https://lore.kernel.org/r/20241116032045.2574168-2-cassel@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam drivers/misc/pci_endpoint_test.c | 88 ++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/pcitest.h | 1 + tools/pci/pcitest.c | 16 +++++++- tools/pci/pcitest.sh | 1 + 4 files changed, 105 insertions(+), 1 deletion(-) commit 0d292a1e6d90ff899342734d9ecfda59394daa42 Author: Niklas Cassel Date: Tue Dec 3 07:38:54 2024 +0100 misc: pci_endpoint_test: Add support for capabilities The test BAR is on the EP side is allocated using pci_epf_alloc_space(), which allocates the backing memory using dma_alloc_coherent(), which will return zeroed memory regardless of __GFP_ZERO was set or not. This means that running a new version of pci-endpoint-test.c (host side) with an old version of pci-epf-test.c (EP side) will not see any capabilities being set (as intended), so this is backwards compatible. Additionally, the EP side always allocates at least 128 bytes for the test BAR (excluding the MSI-X table), this means that adding another register at offset 0x30 is still within the 128 available bytes. For now, we only add the CAP_UNALIGNED_ACCESS capability. If CAP_UNALIGNED_ACCESS is set, that means that the EP side supports reading/writing to an address without any alignment requirements. Thus, if CAP_UNALIGNED_ACCESS is set, make sure that the host side does not add any extra padding to the buffers that we allocate (which was only done in order to get the buffers to satisfy certain alignment requirements by the endpoint controller). Link: https://lore.kernel.org/r/20241203063851.695733-6-cassel@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Frank Li drivers/misc/pci_endpoint_test.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 8a02612f85660e0e18e7ac59ef8ff8592b8e2d42 Author: Niklas Cassel Date: Tue Dec 3 07:38:53 2024 +0100 PCI: endpoint: pci-epf-test: Add support for capabilities The test BAR is on the EP side is allocated using pci_epf_alloc_space(), which allocates the backing memory using dma_alloc_coherent(), which will return zeroed memory regardless of __GFP_ZERO was set or not. This means that running a new version of pci-endpoint-test.c (host side) with an old version of pci-epf-test.c (EP side) will not see any capabilities being set (as intended), so this is backwards compatible. Additionally, the EP side always allocates at least 128 bytes for the test BAR (excluding the MSI-X table), this means that adding another register at offset 0x30 is still within the 128 available bytes. For now, we only add the CAP_UNALIGNED_ACCESS capability. Set CAP_UNALIGNED_ACCESS if the EPC driver can handle any address (because it implements the .align_addr callback). Link: https://lore.kernel.org/r/20241203063851.695733-5-cassel@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Frank Li drivers/pci/endpoint/functions/pci-epf-test.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 235c2b197a8de2887f13990094a3343d2392155b Author: Manivannan Sadhasivam Date: Thu Jan 16 22:46:47 2025 +0530 PCI: endpoint: pci-epf-test: Fix check for DMA MEMCPY test Currently, if DMA MEMCPY test is requested by the host, and if the endpoint DMA controller supports DMA_PRIVATE, the test will fail. This is not correct since there is no check for DMA_MEMCPY capability and the DMA controller can support both DMA_PRIVATE and DMA_MEMCPY. Fix the check and also reword the error message. Link: https://lore.kernel.org/r/20250116171650.33585-2-manivannan.sadhasivam@linaro.org Fixes: 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities") Reported-by: Niklas Cassel Closes: https://lore.kernel.org/linux-pci/Z3QtEihbiKIGogWA@ryzen Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Tested-by: Niklas Cassel Reviewed-by: Niklas Cassel drivers/pci/endpoint/functions/pci-epf-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b1b1f4b12969130c0a6ec0cf0299460cb01e799c Author: Mohamed Khalfella Date: Fri Dec 27 08:08:41 2024 -0800 PCI: endpoint: pci-epf-test: Set dma_chan_rx pointer to NULL on error If dma_chan_tx allocation fails, set dma_chan_rx to NULL after it is freed. Link: https://lore.kernel.org/r/20241227160841.92382-1-khalfella@gmail.com Fixes: 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities") Signed-off-by: Mohamed Khalfella [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel Reviewed-by: Manivannan Sadhasivam drivers/pci/endpoint/functions/pci-epf-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87e6cd7cdbe8d6cb233528d5163ac1cacd30b948 Author: James Bottomley Date: Sun Jan 19 10:12:14 2025 -0500 selftests/efivarfs: add concurrent update tests The delete on last close functionality can now only be tested properly by using multiple threads to hold open the variable files and testing what happens as they complete. Signed-off-by: James Bottomley Signed-off-by: Ard Biesheuvel tools/testing/selftests/efivarfs/efivarfs.sh | 134 +++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) commit 3028583d1314a70ca273c51e0265f698c0bd5760 Author: Jonas Andreasson Date: Tue Jan 21 15:37:50 2025 +0100 regulator: TPS6287X: Use min/max uV to get VRANGE Changing voltage might ignore slew rate and cause a current surge. With current implementation the driver will get the regulator to change the voltage range used during run time. According to communication I have had with Texas Instruments, this is not intended, since the Dynamic Voltage Scaling in the hardware is only designed to work within a voltage range. The current implementation will therefore ignore the slew rate that is defined in devicetree when the voltage range is changed during use. The current implementation will always select a voltage in the most accurate range that can reach that voltage even though multiple ranges are able to reach that voltage. There are 4 Voltage ranges with the following reach: 0b00: 0.4-0.71875V (1.25mV step size) 0b01: 0.4-1.0375V (2.5mV) 0b10: 0.4-1.675V (5mV) 0b11: 0.8-3.3V (10mV) This in practice means that a change from below to above 0.71875V will use the smallest range(0b00) for the values below and the second smallest range(0b01) for the voltages above (Up to 1.675V). I have timed how long it takes to go from below 0.71875V to above. The increase was 100mV which, with the slew rate set to 1250µV/µs. This in theory should take 80µs to do. With the current implementation, it takes 10µs on my hardware. Doing the same test with the slew rate set to 5000µV/µs, which should take 20µs, also only takes 10µs to do on my hardware. Not only is this not in line with the technical specification for the regulator. It also causes a current surge. Which when calculating the output current, as described in the technical specification, compared to what I could observe on my hardware the real output is ~1A higher (~1.2A) than what I calculated it to be(~0.2A). I tested also transitioning from a bigger to a smaller range, and the results were the same. Instead, let's limit the voltage range to a single one, which is in line with the intended use of the regulator. This is done by looking up the minimum and maximum requested voltage specified in devicetree. Signed-off-by: Jonas Andreasson Link: https://patch.msgid.link/20250121-tps-fix-v2-1-50cc4d0f1635@axis.com Signed-off-by: Mark Brown drivers/regulator/tps6287x-regulator.c | 57 ++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 5323186e2e8d33c073fad51e24f18e2d6dbae2da Author: Detlev Casanova Date: Fri Jan 17 11:31:02 2025 -0500 ASoC: rockchip: i2s_tdm: Re-add the set_sysclk callback In commit 9e2ab4b18ebd ("ASoC: rockchip: i2s-tdm: Fix inaccurate sampling rates"), the set_sysclk callback was removed as considered unused as the mclk rate can be set in the hw_params callback. The difference between hw_params and set_sysclk is that the former is called with the audio sampling rate set in the params (e.g.: 48000 Hz) while the latter is called with a clock rate already computed with sampling_rate * mclk-fs (e.g.: 48000 * 256) For HDMI audio using the Rockchip I2S TDM driver, the mclk-fs value must be set to 128 instead of the default 256, and that value is set in the device tree at the machine driver level (like a simple-audio-card compatible node). Therefore, the i2s_tdm driver has no idea that another mclk-fs value can be configured and simply computes the mclk rate in the hw_params callback with DEFAULT_MCLK_FS * params_rate(params), which is wrong for HDMI audio. Re-add the set_sysclk callback so that the mclk rate is computed by the machine driver which has the correct mclk-fs value set in its device tree node. Fixes: 9e2ab4b18ebd ("ASoC: rockchip: i2s-tdm: Fix inaccurate sampling rates") Signed-off-by: Detlev Casanova Link: https://patch.msgid.link/20250117163102.65807-1-detlev.casanova@collabora.com Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s_tdm.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) commit 2839ab71ac9009884fe41a7422a167a64716c0a7 Author: Jann Horn Date: Mon Jan 20 17:21:57 2025 +0100 io_uring/rsrc: Move lockdep assert from io_free_rsrc_node() to caller Checking for lockdep_assert_held(&ctx->uring_lock) in io_free_rsrc_node() means that the assertion is only checked when the resource drops to zero references. Move the lockdep assertion up into the caller io_put_rsrc_node() so that it instead happens on every reference count decrement. Signed-off-by: Jann Horn Link: https://lore.kernel.org/r/20250120-uring-lockdep-assert-earlier-v1-1-68d8e071a4bb@google.com Signed-off-by: Jens Axboe io_uring/rsrc.c | 2 -- io_uring/rsrc.h | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) commit b73de0da50129d790975bb8a9893b421cc38bc24 Author: Sidong Yang Date: Wed Jan 15 14:20:31 2025 +0000 io_uring/rsrc: remove unused parameter ctx for io_rsrc_node_alloc() io_uring_ctx parameter for io_rsrc_node_alloc() is unused for now. This patch removes the parameter and fixes the callers accordingly. Signed-off-by: Sidong Yang Link: https://lore.kernel.org/r/20250115142033.658599-1-sidong.yang@furiosa.ai Signed-off-by: Jens Axboe io_uring/filetable.c | 2 +- io_uring/rsrc.c | 10 +++++----- io_uring/rsrc.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit bb2d76344bc80933a462aa84581d1258e0dc758b Author: Pavel Begunkov Date: Thu Jan 16 02:53:26 2025 +0000 io_uring: clean up io_uring_register_get_file() Make it always reference the returned file. It's safer, especially with unregistrations happening under it. And it makes the api cleaner with no conditional clean ups by the caller. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/0d0b13a63e8edd6b5d360fc821dcdb035cb6b7e0.1736995897.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/register.c | 6 ++++-- io_uring/rsrc.c | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) commit 5719e2823565a304a2afb752d4792c622a693e22 Author: Jann Horn Date: Wed Jan 15 21:26:03 2025 +0100 io_uring/rsrc: Simplify buffer cloning by locking both rings The locking in the buffer cloning code is somewhat complex because it goes back and forth between locking the source ring and the destination ring. Make it easier to reason about by locking both rings at the same time. To avoid ABBA deadlocks, lock the rings in ascending kernel address order, just like in lock_two_nondirectories(). Signed-off-by: Jann Horn Link: https://lore.kernel.org/r/20250115-uring-clone-refactor-v2-1-7289ba50776d@google.com Signed-off-by: Jens Axboe io_uring/rsrc.c | 73 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 33 deletions(-) commit b4339d599bc2b95be7887bde82114c153f6d0c10 Author: Corey Minyard Date: Tue Jan 7 09:28:45 2025 -0600 MAINTAINERS: ipmi: update my email address Old email still works, and will indefinitely, but I'm switching to a new one. Signed-off-by: Corey Minyard MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d08e78362a5f5e156b6a1dae90c28ed48c0a8357 Author: Shixiong Ou Date: Tue Jan 21 14:42:36 2025 +0800 fbdev: lcdcfb: Use backlight helper Signed-off-by: Shixiong Ou Signed-off-by: Helge Deller drivers/video/fbdev/sh_mobile_lcdcfb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit a07eb4f67ed085f32002a1af2b6073546d67de3f Author: Mark Brown Date: Fri Jan 17 16:16:03 2025 +0000 spi: omap2-mcspi: Correctly handle devm_clk_get_optional() errors devm_clk_get_optional() returns NULL for missing clocks and a PTR_ERR() if there is a clock but we fail to get it, but currently we only handle the latter case and do so as though the clock was missing. If we get an error back we should handle that as an error since the clock exists but we failed to get it, if we get NULL then the clock doesn't exist and we should handle that. Fixes: 4c6ac5446d06 ("spi: omap2-mcspi: Fix the IS_ERR() bug for devm_clk_get_optional_enabled()") Reported-by: Lars Pedersen Link: https://patch.msgid.link/20250117-spi-fix-omap2-optional-v1-1-e77d4ac6db6e@kernel.org Signed-off-by: Mark Brown Tested-by: Lars Pedersen Signed-off-by: Mark Brown drivers/spi/spi-omap2-mcspi.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 7c88f7cfab553016a1b02a38ba261d9ac3750b6a Author: Hou Tao Date: Mon Jan 20 16:29:47 2025 +0800 dm-crypt: fully initialize clone->bi_iter in crypt_alloc_buffer() Both kcryptd_io_read() and kcryptd_crypt_write_convert() will invoke crypt_alloc_buffer() to allocate a new bio. Both of these two callers initialize bi_iter.bi_sector for the new bio separatedly after crypt_alloc_buffer() returns. However, kcryptd_crypt_write_convert() will copy the bi_iter of the new bio into ctx.iter_out or ctx.iter_in. Although it doesn't incur any harm now, it is better to fully initialize bi_iter before it is used. Therefore, initialize bi_iter.bi_sector in crypt_alloc_buffer() instead. Signed-off-by: Hou Tao Signed-off-by: Mikulas Patocka drivers/md/dm-crypt.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 6fd2cb38c006cbdc4653e7e15e37ab23af59c2de Author: Hou Tao Date: Mon Jan 20 16:29:46 2025 +0800 dm-crypt: set atomic as false when calling crypt_convert() in kworker Both kcryptd_crypt_write_continue() and kcryptd_crypt_read_continue() are running in the kworker context, it is OK to call cond_resched(), Therefore, set atomic as false when invoking crypt_convert() under kworker context. Signed-off-by: Hou Tao Reviewed-by: Ignat Korchagin Signed-off-by: Mikulas Patocka drivers/md/dm-crypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3429dd57f0deb1a602c2624a1dd7c4c11b6c4734 Author: K Prateek Nayak Date: Fri Jan 17 10:58:52 2025 +0000 sched/fair: Fix inaccurate h_nr_runnable accounting with delayed dequeue set_delayed() adjusts cfs_rq->h_nr_runnable for the hierarchy when an entity is delayed irrespective of whether the entity corresponds to a task or a cfs_rq. Consider the following scenario: root / \ A B (*) delayed since B is no longer eligible on root | | Task0 Task1 <--- dequeue_task_fair() - task blocks When Task1 blocks (dequeue_entity() for task's se returns true), dequeue_entities() will continue adjusting cfs_rq->h_nr_* for the hierarchy of Task1. However, when the sched_entity corresponding to cfs_rq B is delayed, set_delayed() will adjust the h_nr_runnable for the hierarchy too leading to both dequeue_entity() and set_delayed() decrementing h_nr_runnable for the dequeue of the same task. A SCHED_WARN_ON() to inspect h_nr_runnable post its update in dequeue_entities() like below: cfs_rq->h_nr_runnable -= h_nr_runnable; SCHED_WARN_ON(((int) cfs_rq->h_nr_runnable) < 0); is consistently tripped when running wakeup intensive workloads like hackbench in a cgroup. This error is self correcting since cfs_rq are per-cpu and cannot migrate. The entitiy is either picked for full dequeue or is requeued when a task wakes up below it. Both those paths call clear_delayed() which again increments h_nr_runnable of the hierarchy without considering if the entity corresponds to a task or not. h_nr_runnable will eventually reflect the correct value however in the interim, the incorrect values can still influence PELT calculation which uses se->runnable_weight or cfs_rq->h_nr_runnable. Since only delayed tasks take the early return path in dequeue_entities() and enqueue_task_fair(), adjust the h_nr_runnable in {set,clear}_delayed() only when a task is delayed as this path skips the h_nr_* update loops and returns early. For entities corresponding to cfs_rq, the h_nr_* update loop in the caller will do the right thing. Fixes: 76f2f783294d ("sched/eevdf: More PELT vs DELAYED_DEQUEUE") Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Gautham R. Shenoy Tested-by: Swapnil Sapkal Link: https://lkml.kernel.org/r/20250117105852.23908-1-kprateek.nayak@amd.com kernel/sched/fair.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 0da9a3f9ac8ada83fa79579455871ec59f11db72 Merge: 3ef4ea516c2f 59616a91e5e7 Author: Ilpo Järvinen Date: Mon Jan 20 14:22:06 2025 +0200 Merge branch 'fixes' into 'for-next' Merged the 'fixes' branch into the 'for-next' branch to resolve a conflict in alienware-wmi zone teardown code. commit 10026f536843eb8c9148ef6ffb4c6deeebc26838 Author: Maarten Lankhorst Date: Thu Jan 16 15:28:25 2025 +0100 drm/client: Handle tiled displays better When testing on my tiled display, initially the tiled display is detected correctly: [90376.523692] xe 0000:67:00.0: [drm:drm_client_firmware_config.isra.0 [drm]] fallback: Not all outputs enabled [90376.523713] xe 0000:67:00.0: [drm:drm_client_firmware_config.isra.0 [drm]] Enabled: 0, detected: 2 ... [90376.523967] xe 0000:67:00.0: [drm:drm_client_modeset_probe [drm]] [CRTC:82:pipe A] desired mode 1920x2160 set (1920,0) [90376.524020] xe 0000:67:00.0: [drm:drm_client_modeset_probe [drm]] [CRTC:134:pipe B] desired mode 1920x2160 set (0,0) But then, when modes have been set: [90379.729525] xe 0000:67:00.0: [drm:drm_client_firmware_config.isra.0 [drm]] [CONNECTOR:287:DP-4] on [CRTC:82:pipe A]: 1920x2160 [90379.729640] xe 0000:67:00.0: [drm:drm_client_firmware_config.isra.0 [drm]] [CONNECTOR:289:DP-5] on [CRTC:134:pipe B]: 1920x2160 ... [90379.730036] xe 0000:67:00.0: [drm:drm_client_modeset_probe [drm]] [CRTC:82:pipe A] desired mode 1920x2160 set (0,0) [90379.730124] xe 0000:67:00.0: [drm:drm_client_modeset_probe [drm]] [CRTC:134:pipe B] desired mode 1920x2160 set (0,0) Call drm_client_get_tile_offsets() in drm_client_firmware_config() as well, to ensure that the offset is set correctly. This has to be done as a separate pass, as the tile order may not be equal to the drm connector order. Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20250116142825.3933-2-dev@lankhorst.se Signed-off-by: Maarten Lankhorst Cc: drivers/gpu/drm/drm_client_modeset.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f4a9dd57e549a17a7dac1c1defec26abd7e5c2d4 Author: Maarten Lankhorst Date: Thu Jan 16 15:28:24 2025 +0100 drm/modeset: Handle tiled displays in pan_display_atomic. Tiled displays have a different x/y offset to begin with. Instead of attempting to remember this, just apply a delta instead. This fixes the first tile being duplicated on other tiles when vt switching. Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20250116142825.3933-1-dev@lankhorst.se Signed-off-by: Maarten Lankhorst Cc: drivers/gpu/drm/drm_fb_helper.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 885f5669f2abd0db34c9832259f77240d5350e36 Author: Christian Marangi Date: Mon Jan 20 16:38:09 2025 +0100 pmdomain: airoha: Fix compilation error with Clang-20 and Thumb2 mode The use of R7 in the SMCCC conflicts with the compiler's use of R7 as a frame pointer in Thumb2 mode, which is forcibly enabled by Clang when profiling hooks are inserted via the -pg switch. This is a known issue and similar driver workaround this with a Makefile ifdef. Exact workaround are applied in drivers/firmware/arm_scmi/transports/Makefile and other similar driver. Suggested-by: Sudeep Holla Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501201840.XmpHXpQ4-lkp@intel.com/ Fixes: 82e703dd438b ("pmdomain: airoha: Add Airoha CPU PM Domain support") Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20250120153817.11807-1-ansuelsmth@gmail.com Signed-off-by: Ulf Hansson drivers/pmdomain/mediatek/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) commit e8d9fab39d1f87b52932646b2f1e7877aa3fc0f4 Author: David Gstir Date: Wed Nov 13 22:27:54 2024 +0100 KEYS: trusted: dcp: fix improper sg use with CONFIG_VMAP_STACK=y With vmalloc stack addresses enabled (CONFIG_VMAP_STACK=y) DCP trusted keys can crash during en- and decryption of the blob encryption key via the DCP crypto driver. This is caused by improperly using sg_init_one() with vmalloc'd stack buffers (plain_key_blob). Fix this by always using kmalloc() for buffers we give to the DCP crypto driver. Cc: stable@vger.kernel.org # v6.10+ Fixes: 0e28bf61a5f9 ("KEYS: trusted: dcp: fix leak of blob encryption key") Signed-off-by: David Gstir Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen security/keys/trusted-keys/trusted_dcp.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 5f56d41a21b6d17b59525958a57feffe597b7de5 Author: Christian Göttsche Date: Mon Nov 25 12:03:40 2024 +0100 keys: drop shadowing dead prototype The global variable pkcs7 does not exist. Drop the variable declaration, but keep the struct prototype needed for is_key_on_revocation_list(). Reported by clang: ./include/keys/system_keyring.h:104:67: warning: declaration shadows a variable in the global scope [-Wshadow] 104 | static inline int is_key_on_revocation_list(struct pkcs7_message *pkcs7) | ^ ./include/keys/system_keyring.h:76:30: note: previous declaration is here 76 | extern struct pkcs7_message *pkcs7; | ^ Fixes: 56c5812623f9 ("certs: Add EFI_CERT_X509_GUID support for dbx entries") Signed-off-by: Christian Göttsche Signed-off-by: Jarkko Sakkinen include/keys/system_keyring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf33d96f50903214226b379b3f10d1f262dae018 Merge: b1754a69e7be d640627663bf Author: Paolo Abeni Date: Tue Jan 21 10:24:33 2025 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net No conflicts and no adjacent changes. Signed-off-by: Paolo Abeni commit 9bcbb6104a344d3526e185ee1e7b985509914e90 Author: Lokesh Vutla Date: Tue Jan 21 04:40:16 2025 +0000 KVM: arm64: Flush hyp bss section after initialization of variables in bss To determine CPU features during initialization, the nVHE hypervisor utilizes sanitized values of the host's CPU features registers. These values, stored in u64 idaa64*_el1_sys_val variables are updated by the kvm_hyp_init_symbols() function at EL1. To ensure EL2 visibility with the MMU off, the data cache needs to be flushed after these updates. However, individually flushing each variable using kvm_flush_dcache_to_poc() is inefficient. These cpu feature variables would be part of the bss section of the hypervisor. Hence, flush the entire bss section of hypervisor once the initialization is complete. Fixes: 6c30bfb18d0b ("KVM: arm64: Add handlers for protected VM System Registers") Suggested-by: Fuad Tabba Signed-off-by: Lokesh Vutla Link: https://lore.kernel.org/r/20250121044016.2219256-1-lokeshvutla@google.com Signed-off-by: Marc Zyngier arch/arm64/kvm/arm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 40724ecafccb1fb62b66264854e8c3ad394c8f3d Author: Mathieu Desnoyers Date: Thu Jan 16 15:59:56 2025 -0500 rseq: Fix rseq unregistration regression A logic inversion in rseq_reset_rseq_cpu_node_id() causes the rseq unregistration to fail when rseq_validate_ro_fields() succeeds rather than the opposite. This affects both CONFIG_DEBUG_RSEQ=y and CONFIG_DEBUG_RSEQ=n. Fixes: 7d5265ffcd8b ("rseq: Validate read-only fields under DEBUG_RSEQ config") Signed-off-by: Mathieu Desnoyers Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250116205956.836074-1-mathieu.desnoyers@efficios.com kernel/rseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95ec54a420b8f445e04a7ca0ea8deb72c51fe1d3 Merge: 9ad09c4f2868 2bf66e66d2e6 Author: Linus Torvalds Date: Mon Jan 20 21:40:19 2025 -0800 Merge tag 'powerpc-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Madhavan Srinivasan: - Add preempt lazy support - Deprecate cxl and cxl flash driver - Fix a possible IOMMU related OOPS at boot on pSeries - Optimize sched_clock() in ppc32 by replacing mulhdu() by mul_u64_u64_shr() Thanks to Andrew Donnellan, Andy Shevchenko, Ankur Arora, Christophe Leroy, Frederic Barrat, Gaurav Batra, Luis Felipe Hernandez, Michael Ellerman, Nilay Shroff, Ricardo B. Marliere, Ritesh Harjani (IBM), Sebastian Andrzej Siewior, Shrikanth Hegde, Sourabh Jain, Thorsten Blum, and Zhu Jun. * tag 'powerpc-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: selftests/powerpc: Fix argument order to timer_sub() powerpc/prom_init: Use IS_ENABLED() powerpc/pseries/iommu: IOMMU incorrectly marks MMIO range in DDW powerpc: Use str_on_off() helper in check_cache_coherency() powerpc: Large user copy aware of full:rt:lazy preemption powerpc: Add preempt lazy support powerpc/book3s64/hugetlb: Fix disabling hugetlb when fadump is active powerpc/vdso: Mark the vDSO code read-only after init powerpc/64: Use get_user() in start_thread() macintosh: declare ctl_table as const selftest/powerpc/ptrace: Cleanup duplicate macro definitions selftest/powerpc/ptrace/ptrace-pkey: Remove duplicate macros selftest/powerpc/ptrace/core-pkey: Remove duplicate macros powerpc/8xx: Drop legacy-of-mm-gpiochip.h header scsi/cxlflash: Deprecate driver cxl: Deprecate driver selftests/powerpc: Fix typo in test-vphn.c powerpc/xmon: Use str_yes_no() helper in dump_one_paca() powerpc/32: Replace mulhdu() by mul_u64_u64_shr() commit 25768de50b1f2dbb6ea44bd5148a87fe2c9c3688 Merge: 3a6e5ed2372b 08bd5b7c9a24 Author: Dmitry Torokhov Date: Mon Jan 20 21:37:39 2025 -0800 Merge branch 'next' into for-linus Prepare input updates for 6.14 merge window. commit 08bd5b7c9a2401faabdaa1472d45c7de0755fd7e Author: Dmitry Torokhov Date: Fri Jan 17 09:23:40 2025 -0800 Input: synaptics - fix crash when enabling pass-through port When enabling a pass-through port an interrupt might come before psmouse driver binds to the pass-through port. However synaptics sub-driver tries to access psmouse instance presumably associated with the pass-through port to figure out if only 1 byte of response or entire protocol packet needs to be forwarded to the pass-through port and may crash if psmouse instance has not been attached to the port yet. Fix the crash by introducing open() and close() methods for the port and check if the port is open before trying to access psmouse instance. Because psmouse calls serio_open() only after attaching psmouse instance to serio port instance this prevents the potential crash. Reported-by: Takashi Iwai Fixes: 100e16959c3c ("Input: libps2 - attach ps2dev instances as serio port's drvdata") Link: https://bugzilla.suse.com/show_bug.cgi?id=1219522 Cc: stable@vger.kernel.org Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/Z4qSHORvPn7EU2j1@google.com Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 56 ++++++++++++++++++++++++++++++----------- drivers/input/mouse/synaptics.h | 1 + 2 files changed, 43 insertions(+), 14 deletions(-) commit 907bc9268a5a9f823ffa751957a5c1dd59f83f42 Author: Mark Pearson Date: Mon Jan 20 20:24:08 2025 -0800 Input: atkbd - map F23 key to support default copilot shortcut Microsoft defined Meta+Shift+F23 as the Copilot shortcut instead of a dedicated keycode, and multiple vendors have their keyboards emit this sequence in response to users pressing a dedicated "Copilot" key. Unfortunately the default keymap table in atkbd does not map scancode 0x6e (F23) and so the key combination does not work even if userspace is ready to handle it. Because this behavior is common between multiple vendors and the scancode is currently unused map 0x6e to keycode 193 (KEY_F23) so that key sequence is generated properly. MS documentation for the scan code: https://learn.microsoft.com/en-us/windows/win32/inputdev/about-keyboard-input#scan-codes Confirmed on Lenovo, HP and Dell machines by Canonical. Tested on Lenovo T14s G6 AMD. Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20250107034554.25843-1-mpearson-lenovo@squebb.ca Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/atkbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ad09c4f2868540130ad2d5dfe265f55c75c1705 Merge: e7244cc38252 1dd3393696ef Author: Linus Torvalds Date: Mon Jan 20 21:21:49 2025 -0800 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: "We've got a little less than normal thanks to the holidays in December, but there's the usual summary below. The highlight is probably the 52-bit physical addressing (LPA2) clean-up from Ard. Confidential Computing: - Register a platform device when running in CCA realm mode to enable automatic loading of dependent modules CPU Features: - Update a bunch of system register definitions to pick up new field encodings from the architectural documentation - Add hwcaps and selftests for the new (2024) dpISA extensions Documentation: - Update EL3 (firmware) requirements for booting Linux on modern arm64 designs - Remove stale information about the kernel virtual memory map Miscellaneous: - Minor cleanups and typo fixes Memory management: - Fix vmemmap_check_pmd() to look at the PMD type bits - LPA2 (52-bit physical addressing) cleanups and minor fixes - Adjust physical address space depending upon whether or not LPA2 is enabled Perf and PMUs: - Add port filtering support for NVIDIA's NVLINK-C2C Coresight PMU - Extend AXI filtering support for the DDR PMU on NXP IMX SoCs - Fix Designware PCIe PMU event numbering - Add generic branch events for the Apple M1 CPU PMU - Add support for Marvell Odyssey DDR and LLC-TAD PMUs - Cleanups to the Hisilicon DDRC and Uncore PMU code - Advertise discard mode for the SPE PMU - Add the perf users mailing list to our MAINTAINERS entry" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (64 commits) Documentation: arm64: Remove stale and redundant virtual memory diagrams perf docs: arm_spe: Document new discard mode perf: arm_spe: Add format option for discard mode MAINTAINERS: Add perf list for drivers/perf/ arm64: Remove duplicate included header drivers/perf: apple_m1: Map generic branch events arm64: rsi: Add automatic arm-cca-guest module loading kselftest/arm64: Add 2024 dpISA extensions to hwcap test KVM: arm64: Allow control of dpISA extensions in ID_AA64ISAR3_EL1 arm64/hwcap: Describe 2024 dpISA extensions to userspace arm64/sysreg: Update ID_AA64SMFR0_EL1 to DDI0601 2024-12 arm64: Filter out SVE hwcaps when FEAT_SVE isn't implemented drivers/perf: hisi: Set correct IRQ affinity for PMUs with no association arm64/sme: Move storage of reg_smidr to __cpuinfo_store_cpu() arm64: mm: Test for pmd_sect() in vmemmap_check_pmd() arm64/mm: Replace open encodings with PXD_TABLE_BIT arm64/mm: Rename pte_mkpresent() as pte_mkvalid() arm64/sysreg: Update ID_AA64ISAR2_EL1 to DDI0601 2024-09 arm64/sysreg: Update ID_AA64ZFR0_EL1 to DDI0601 2024-09 arm64/sysreg: Update ID_AA64FPFR0_EL1 to DDI0601 2024-09 ... commit e7244cc382524ac5354dbf7b7cb351e926e8118f Merge: 4f42d0bf7225 bb2e0fb1e6aa Author: Linus Torvalds Date: Mon Jan 20 21:18:36 2025 -0800 Merge tag 'm68k-for-v6.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - Use the generic muldi3 libgcc function - Miscellaneous fixes and improvements * tag 'm68k-for-v6.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: libgcc: Fix lvalue abuse in umul_ppmm() m68k: vga: Fix I/O defines zorro: Constify 'struct bin_attribute' m68k: atari: Use str_on_off() helper in atari_nvram_proc_read() m68k: Use kernel's generic muldi3 libgcc function commit 4f42d0bf72253dd01e9a8d168e28706803c98a9d Merge: a312e1706ce6 26701574cee6 Author: Linus Torvalds Date: Mon Jan 20 21:14:49 2025 -0800 Merge tag 's390-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Alexander Gordeev: - Select config option KASAN_VMALLOC if KASAN is enabled - Select config option VMAP_STACK unconditionally - Implement arch_atomic_inc() / arch_atomic_dec() functions which result in a single instruction if compiled for z196 or newer architectures - Make layering between atomic.h and atomic_ops.h consistent - Comment s390 preempt_count implementation - Remove pre MARCH_HAS_Z196_FEATURES preempt count implementation - GCC uses the number of lines of an inline assembly to calculate number of instructions and decide on inlining. Therefore remove superfluous new lines from a couple of inline assemblies. - Provide arch_atomic_*_and_test() implementations that allow the compiler to generate slightly better code. - Optimize __preempt_count_dec_and_test() - Remove __bootdata annotations from declarations in header files - Add missing include of in abs_lowcore.h to provide declarations for get_cpu() and put_cpu() used in the code - Fix suboptimal kernel image base when running make kasan.config - Remove huge_pte_none() and huge_pte_none_mostly() as are identical to the generic variants - Remove unused PAGE_KERNEL_EXEC, SEGMENT_KERNEL_EXEC, and REGION3_KERNEL_EXEC defines - Simplify noexec page protection handling and change the page, segment and region3 protection definitions automatically if the instruction execution-protection facility is not available - Save one instruction and prefer EXRL instruction over EX in string, xor_*(), amode31 and other functions - Create /dev/diag misc device to fetch diagnose specific information from the kernel and provide it to userspace - Retrieve electrical power readings using DIAGNOSE 0x324 ioctl - Make ccw_device_get_ciw() consistent and use array indices instead of pointer arithmetic - s390/qdio: Move memory alloc/pointer arithmetic for slib and sl into one place - The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that in s390 code - Add missing TLB range adjustment in pud_free_tlb() - Improve topology setup by adding early polarization detection - Fix length checks in codepage_convert() function - The generic bitops implementation is nearly identical to the s390 one. Switch to the generic variant and decrease a bit the kernel image size - Provide an optimized arch_test_bit() implementation which makes use of flag output constraint. This generates slightly better code - Provide memory topology information obtanied with DIAGNOSE 0x310 using ioctl. - Various other small improvements, fixes, and cleanups Also, some changes came in through a merge of 'pci-device-recovery' branch: - Add PCI error recovery status mechanism - Simplify and document debug_next_entry() logic - Split private data allocation and freeing out of debug file open() and close() operations - Add debug_dump() function that gets a textual representation of a debug info (e.g. PCI recovery hardware error logs) - Add formatted content of pci_debug_msg_id to the PCI report * tag 's390-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (48 commits) s390/futex: Fix FUTEX_OP_ANDN implementation s390/diag: Add memory topology information via diag310 s390/bitops: Provide optimized arch_test_bit() s390/bitops: Switch to generic bitops s390/ebcdic: Fix length decrement in codepage_convert() s390/ebcdic: Fix length check in codepage_convert() s390/ebcdic: Use exrl instead of ex s390/amode31: Use exrl instead of ex s390/stackleak: Use exrl instead of ex in __stackleak_poison() s390/lib: Use exrl instead of ex in xor functions s390/topology: Improve topology detection s390/tlb: Add missing TLB range adjustment s390/pkey: Constify 'struct bin_attribute' s390/sclp: Constify 'struct bin_attribute' s390/pci: Constify 'struct bin_attribute' s390/ipl: Constify 'struct bin_attribute' s390/crypto/cpacf: Constify 'struct bin_attribute' s390/qdio: Move memory alloc/pointer arithmetic for slib and sl into one place s390/cio: Use array indices instead of pointer arithmetic s390/qdio: Rename feature flag aif_osa to aif_qdio ... commit 17391cb2613b82f8c405570fea605af3255ff8d2 Author: Shivaprasad G Bhat Date: Mon Jan 13 03:48:55 2025 +0000 powerpc/pseries/iommu: Don't unset window if it was never set On pSeries, when user attempts to use the same vfio container used by different iommu group, the spapr_tce_set_window() returns -EPERM and the subsequent cleanup leads to the below crash. Kernel attempted to read user page (308) - exploit attempt? BUG: Kernel NULL pointer dereference on read at 0x00000308 Faulting instruction address: 0xc0000000001ce358 Oops: Kernel access of bad area, sig: 11 [#1] NIP: c0000000001ce358 LR: c0000000001ce05c CTR: c00000000005add0 NIP [c0000000001ce358] spapr_tce_unset_window+0x3b8/0x510 LR [c0000000001ce05c] spapr_tce_unset_window+0xbc/0x510 Call Trace: spapr_tce_unset_window+0xbc/0x510 (unreliable) tce_iommu_attach_group+0x24c/0x340 [vfio_iommu_spapr_tce] vfio_container_attach_group+0xec/0x240 [vfio] vfio_group_fops_unl_ioctl+0x548/0xb00 [vfio] sys_ioctl+0x754/0x1580 system_call_exception+0x13c/0x330 system_call_vectored_common+0x15c/0x2ec --- interrupt: 3000 Fix this by having null check for the tbl passed to the spapr_tce_unset_window(). Fixes: f431a8cde7f1 ("powerpc/iommu: Reimplement the iommu_table_group_ops for pSeries") Cc: stable@vger.kernel.org Reported-by: Vaishnavi Bhat Signed-off-by: Shivaprasad G Bhat Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/173674009556.1559.12487885286848752833.stgit@linux.ibm.com arch/powerpc/platforms/pseries/iommu.c | 3 +++ 1 file changed, 3 insertions(+) commit 11b93559000c686ad7e5ab0547e76f21cc143844 Author: Narayana Murty N Date: Thu Jan 16 04:39:54 2025 -0600 powerpc/pseries/eeh: Fix get PE state translation The PE Reset State "0" returned by RTAS calls "ibm_read_slot_reset_[state|state2]" indicates that the reset is deactivated and the PE is in a state where MMIO and DMA are allowed. However, the current implementation of "pseries_eeh_get_state()" does not reflect this, causing drivers to incorrectly assume that MMIO and DMA operations cannot be resumed. The userspace drivers as a part of EEH recovery using VFIO ioctls fail to detect when the recovery process is complete. The VFIO_EEH_PE_GET_STATE ioctl does not report the expected EEH_PE_STATE_NORMAL state, preventing userspace drivers from functioning properly on pseries systems. The patch addresses this issue by updating 'pseries_eeh_get_state()' to include "EEH_STATE_MMIO_ENABLED" and "EEH_STATE_DMA_ENABLED" in the result mask for PE Reset State "0". This ensures correct state reporting to the callers, aligning the behavior with the PAPR specification and fixing the bug in EEH recovery for VFIO user workflows. Fixes: 00ba05a12b3c ("powerpc/pseries: Cleanup on pseries_eeh_get_state()") Cc: stable@vger.kernel.org Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Narayana Murty N Link: https://lore.kernel.org/stable/20241212075044.10563-1-nnmlinux%40linux.ibm.com Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250116103954.17324-1-nnmlinux@linux.ibm.com arch/powerpc/platforms/pseries/eeh_pseries.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a312e1706ce6c124f04ec85ddece240f3bb2a696 Merge: 1cbfb828e051 561e3a0c40dc Author: Linus Torvalds Date: Mon Jan 20 20:27:33 2025 -0800 Merge tag 'for-6.14/io_uring-20250119' of git://git.kernel.dk/linux Pull io_uring updates from Jens Axboe: "Not a lot in terms of features this time around, mostly just cleanups and code consolidation: - Support for PI meta data read/write via io_uring, with NVMe and SCSI covered - Cleanup the per-op structure caching, making it consistent across various command types - Consolidate the various user mapped features into a concept called regions, making the various users of that consistent - Various cleanups and fixes" * tag 'for-6.14/io_uring-20250119' of git://git.kernel.dk/linux: (56 commits) io_uring/fdinfo: fix io_uring_show_fdinfo() misuse of ->d_iname io_uring: reuse io_should_terminate_tw() for cmds io_uring: Factor out a function to parse restrictions io_uring/rsrc: require cloned buffers to share accounting contexts io_uring: simplify the SQPOLL thread check when cancelling requests io_uring: expose read/write attribute capability io_uring/rw: don't gate retry on completion context io_uring/rw: handle -EAGAIN retry at IO completion time io_uring/rw: use io_rw_recycle() from cleanup path io_uring/rsrc: simplify the bvec iter count calculation io_uring: ensure io_queue_deferred() is out-of-line io_uring/rw: always clear ->bytes_done on io_async_rw setup io_uring/rw: use NULL for rw->free_iovec assigment io_uring/rw: don't mask in f_iocb_flags io_uring/msg_ring: Drop custom destructor io_uring: Move old async data allocation helper to header io_uring/rw: Allocate async data through helper io_uring/net: Allocate msghdr async data through helper io_uring/uring_cmd: Allocate async data through generic helper io_uring/poll: Allocate apoll with generic alloc_cache helper ... commit 1cbfb828e05171ca2dd77b5988d068e6872480fe Merge: 3d3a9c8b89d4 554b22864cc7 Author: Linus Torvalds Date: Mon Jan 20 19:38:46 2025 -0800 Merge tag 'for-6.14/block-20250118' of git://git.kernel.dk/linux Pull block updates from Jens Axboe: - NVMe pull requests via Keith: - Target support for PCI-Endpoint transport (Damien) - TCP IO queue spreading fixes (Sagi, Chaitanya) - Target handling for "limited retry" flags (Guixen) - Poll type fix (Yongsoo) - Xarray storage error handling (Keisuke) - Host memory buffer free size fix on error (Francis) - MD pull requests via Song: - Reintroduce md-linear (Yu Kuai) - md-bitmap refactor and fix (Yu Kuai) - Replace kmap_atomic with kmap_local_page (David Reaver) - Quite a few queue freeze and debugfs deadlock fixes Ming introduced lockdep support for this in the 6.13 kernel, and it has (unsurprisingly) uncovered quite a few issues - Use const attributes for IO schedulers - Remove bio ioprio wrappers - Fixes for stacked device atomic write support - Refactor queue affinity helpers, in preparation for better supporting isolated CPUs - Cleanups of loop O_DIRECT handling - Cleanup of BLK_MQ_F_* flags - Add rotational support for null_blk - Various fixes and cleanups * tag 'for-6.14/block-20250118' of git://git.kernel.dk/linux: (106 commits) block: Don't trim an atomic write block: Add common atomic writes enable flag md/md-linear: Fix a NULL vs IS_ERR() bug in linear_add() block: limit disk max sectors to (LLONG_MAX >> 9) block: Change blk_stack_atomic_writes_limits() unit_min check block: Ensure start sector is aligned for stacking atomic writes blk-mq: Move more error handling into blk_mq_submit_bio() block: Reorder the request allocation code in blk_mq_submit_bio() nvme: fix bogus kzalloc() return check in nvme_init_effects_log() md/md-bitmap: move bitmap_{start, end}write to md upper layer md/raid5: implement pers->bitmap_sector() md: add a new callback pers->bitmap_sector() md/md-bitmap: remove the last parameter for bimtap_ops->endwrite() md/md-bitmap: factor behind write counters out from bitmap_{start/end}write() md: Replace deprecated kmap_atomic() with kmap_local_page() md: reintroduce md-linear partitions: ldm: remove the initial kernel-doc notation blk-cgroup: rwstat: fix kernel-doc warnings in header file blk-cgroup: fix kernel-doc warnings in header file nbd: fix partial sending ... commit 2948f0d4db40d839db2c1d141121c2e4e12a6faa Author: Pali Rohár Date: Sat Sep 28 14:16:31 2024 +0200 cifs: Remove duplicate struct reparse_symlink_data and SYMLINK_FLAG_RELATIVE In file common/smb2pdu.h is defined struct reparse_symlink_data_buffer which is same as struct reparse_symlink_data and is used in the whole code. So remove duplicate struct reparse_symlink_data from client/cifspdu.h. In file common/smb2pdu.h is defined also SYMLINK_FLAG_RELATIVE constant, so remove duplication from client/cifspdu.h. Signed-off-by: Pali Rohár Acked-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/cifspdu.h | 16 ---------------- 1 file changed, 16 deletions(-) commit d640627663bfe7d8963c7615316d7d4ef60f3b0b Author: Nikita Zhandarovich Date: Wed Jan 15 08:42:20 2025 -0800 net/rose: prevent integer overflows in rose_setsockopt() In case of possible unpredictably large arguments passed to rose_setsockopt() and multiplied by extra values on top of that, integer overflows may occur. Do the safest minimum and fix these issues by checking the contents of 'opt' and returning -EINVAL if they are too large. Also, switch to unsigned int and remove useless check for negative 'opt' in ROSE_IDLE case. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Nikita Zhandarovich Link: https://patch.msgid.link/20250115164220.19954-1-n.zhandarovich@fintech.ru Signed-off-by: Jakub Kicinski net/rose/af_rose.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b1754a69e7be48a64b3cdb0df60a96d97959da73 Author: Russell King (Oracle) Date: Mon Jan 20 10:28:54 2025 +0000 net: phylink: fix regression when binding a PHY Some PHYs don't support clause 45 access, and return -EOPNOTSUPP from phy_modify_mmd(), which causes phylink_bringup_phy() to fail. Prevent this failure by allowing -EOPNOTSUPP to also mean success. Reported-by: Jiawen Wu Tested-by: Jiawen Wu Signed-off-by: Russell King (Oracle) Reviewed-by: Simon Horman Link: https://patch.msgid.link/E1tZp1a-001V62-DT@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/phy/phylink.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 22412b72cafd1b2570c2f9f14b7a133bdff8b80c Author: Steven Rostedt Date: Mon Jan 20 17:27:56 2025 -0500 tracing: Rename update_cache() to update_mod_cache() The static function in trace_events.c called update_cache() is too generic and conflicts with the function defined in arch/openrisc/include/asm/pgtable.h Rename it to update_mod_cache() to make it less generic. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250120172756.4ecfb43f@batman.local.home Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501210550.Ufrj5CRn-lkp@intel.com/ Fixes: b355247df104e ("tracing: Cache ":mod:" events for modules not loaded yet") Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d73a4602e973e9e922f00c537a4643907a547ade Merge: b115243ab8bd 3568d21686b7 Author: Jakub Kicinski Date: Mon Jan 20 14:57:32 2025 -0800 Merge branch 'net-ethernet-ti-am65-cpsw-streamline-rx-tx-queue-creation-and-cleanup' Roger Quadros says: ==================== net: ethernet: ti: am65-cpsw: streamline RX/TX queue creation and cleanup In this series we fix an issue with missing cleanups during error path of am65_cpsw_nuss_init_tx/rx_chns() when used anywhere other than at probe(). Then we streamline RX and TX queue creation and cleanup. The queues can now be created or destroyed by calling the appropriate functions am65_cpsw_create_rxqs/txqs() and am65_cpsw_destroy_rxq/txqs(). v1: https://lore.kernel.org/20250115-am65-cpsw-streamline-v1-0-326975c36935@kernel.org ==================== Link: https://patch.msgid.link/20250117-am65-cpsw-streamline-v2-0-91a29c97e569@kernel.org Signed-off-by: Jakub Kicinski commit 3568d21686b740592c314c6f392c46560ff39bd2 Author: Roger Quadros Date: Fri Jan 17 16:06:35 2025 +0200 net: ethernet: ti: am65-cpsw: streamline TX queue creation and cleanup Introduce am65_cpsw_create_txqs() and am65_cpsw_destroy_txqs() and use them. Signed-off-by: Roger Quadros Link: https://patch.msgid.link/20250117-am65-cpsw-streamline-v2-3-91a29c97e569@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 123 +++++++++++++++++++------------ 1 file changed, 77 insertions(+), 46 deletions(-) commit 66c1ae68a1e9bde7376a50229b0b33145fcb0a71 Author: Roger Quadros Date: Fri Jan 17 16:06:34 2025 +0200 net: ethernet: ti: am65-cpsw: streamline RX queue creation and cleanup Introduce am65_cpsw_create_rxqs() and am65_cpsw_destroy_rxqs() and use them. Signed-off-by: Roger Quadros Link: https://patch.msgid.link/20250117-am65-cpsw-streamline-v2-2-91a29c97e569@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 243 +++++++++++++++---------------- 1 file changed, 119 insertions(+), 124 deletions(-) commit 681eb2beb3efe21e630bcc4881595e3b42dd7948 Author: Roger Quadros Date: Fri Jan 17 16:06:33 2025 +0200 net: ethernet: ti: am65-cpsw: ensure proper channel cleanup in error path We are missing netif_napi_del() and am65_cpsw_nuss_free_tx/rx_chns() in error path when am65_cpsw_nuss_init_tx/rx_chns() is used anywhere other than at probe(). i.e. am65_cpsw_nuss_update_tx_rx_chns and am65_cpsw_nuss_resume() As reported, in am65_cpsw_nuss_update_tx_rx_chns(), if am65_cpsw_nuss_init_tx_chns() partially fails then devm_add_action(dev, am65_cpsw_nuss_free_tx_chns,..) is added but the cleanup via am65_cpsw_nuss_free_tx_chns() will not run. Same issue exists for am65_cpsw_nuss_init_tx/rx_chns() failures in am65_cpsw_nuss_resume() as well. This would otherwise require more instances of devm_add/remove_action and is clearly more of a distraction than any benefit. So, drop devm_add/remove_action for am65_cpsw_nuss_free_tx/rx_chns() and call am65_cpsw_nuss_free_tx/rx_chns() and netif_napi_del() where required. Reported-by: Siddharth Vadapalli Closes: https://lore.kernel.org/all/m4rhkzcr7dlylxr54udyt6lal5s2q4krrvmyay6gzgzhcu4q2c@r34snfumzqxy/ Signed-off-by: Roger Quadros Link: https://patch.msgid.link/20250117-am65-cpsw-streamline-v2-1-91a29c97e569@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 67 +++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 23 deletions(-) commit 3d3a9c8b89d4f8a3785e06ffd15405c670696f02 Merge: 2622f2904170 6784ed98fde5 Author: Linus Torvalds Date: Mon Jan 20 14:26:59 2025 -0800 Merge tag 'dlm-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: - Fix a case where the new scanning code missed removing an unused rsb - Fix the error when removing a configfs entry for an invalid node id * tag 'dlm-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: dlm: return -ENOENT if no comm was found dlm: fix srcu_read_lock() return type to int dlm: fix removal of rsb struct that is master and dir record commit 2622f290417001b0440f4a48dc6978f5f1e12a56 Merge: 5d8a4bd6b251 ff0b7ed607e7 Author: Linus Torvalds Date: Mon Jan 20 13:55:19 2025 -0800 Merge tag 'bcachefs-2025-01-20.2' of git://evilpiepirate.org/bcachefs Pull bcachefs updates from Kent Overstreet: "Lots of scalability work, another big on-disk format change. On-disk format version goes from 1.13 to 1.20. Like 6.11, this is another big and expensive automatic/required on disk format upgrade. This is planned to be the last big on disk format upgrade before the experimental label comes off. There will be one more minor on disk format update for a few things that couldn't make this release. Headline improvements: - Self healing work: Allocator and reflink now run the exact same check/repair code that fsck does at runtime, where applicable. The long term goal here is to remove inconsistent() errors (that cause us to go emergency read only) by lifting fsck code up to normal runtime paths; we should only go emergency read-only if we detect an inconsistency that was due to a runtime bug - or truly catastrophic damage (corrupted btree roots/interior nodes). - Reflink repair no longer deletes reflink pointers: Instead we flip an error bit and log the error, and they can still be deleted by file deletion. This means a temporary failure to find an indirect extent (perhaps repaired later by btree node scan) won't result in unnecessary data loss - Improvements to rebalance data path option handling: We can now correctly apply changed filesystem-level io path options to pending rebalance work, and soon we'll be able to apply file-level io path option changes to indirect extents - Fix mount time regression that some users encountered post the 6.11 disk accounting rewrite. Accounting keys were encoded little endian (typetag in the low bits) - which didn't anticipate adding accounting keys for every inode, which aren't stored in memory and we don't want to scan at mount time. - fsck time on large filesystems is improved by multiple orders of magnitude. Previously, 100TB was about the practical max filesystem size, where users were reporting fsck times of a day+. With the new changes (which nearly eliminate backpointers fsck overhead), we fsck'd a filesystem with 10PB of data in 1.5 hours. The problematic fsck passes were walking every extent and checking for missing backpointers, and walking every backpointer to check for dangling backpointers. As we've been adding more and more runtime self healing there was no reason to keep around the backpointers -> extents pass; dangling backpointers are just deleted, and we can do that when using them - thus, backpointers -> extents is now only run in debug mode. extents -> backpointers does need to exist, since missing backpointers would mean we can't find data to move it (for e.g. copygc, device evacuate, scrub). But the new on disk format version makes possible a new strategy where we sum up backpointers within a bucket and check it against the bucket sector counts, and then only scan for missing backpointers if the counts are off (and then, only for specific buckets). Full list of on disk format changes: - 1.14: backpointer_bucket_gen Backpointers now have a field for the bucket generation number, replacing the obsolete bucket_offset field. This is needed for the new "sum up backpointers within a bucket" code, since backpointers use the btree write buffer - meaning we will see stale reads, and this runs online, with the filesystem in full rw mode. - 1.15: disk_accounting_big_endian As previously described, fix the endianness of accounting keys so that accounting keys with the same typetag sort together, and accounting read can skip types it's not interested in. - 1.16: reflink_p_may_update_opts: This version indicates that a new reflink pointer field is understood and may be used; the field indicates whether the reflink pointer has permissions to update IO path options (e.g. compression, replicas) may be updated on the indirect extent it points to. This completes the rebalance/reflink data path option handling from the 6.13 pull request. - 1.17: inode_depth Add a new inode field, bi_depth, to accelerate the check_directory_structure fsck path, which checks for loops in the filesystem heirarchy. check_inodes and check_dirents check connectivity, so check_directory_structure only has to check for loops - by walking back up to the root from every directory. But a path can't be a loop if it has a counter that increases monotonically from root to leaf - adding a depth counter means that we can check for loops with only local (parent -> child) checks. We might need to occasionally renumber the depth field in fsck if directories have been moved around, but then future fsck runs will be much faster. - 1.18: persistent_inode_cursors Previously, the cursor used for inode allocation was only kept in memory, which meant that users with large filesystems and lots of files were reporting that the first create after mounting would take awhile - since it had to scan from the start. Inode allocation cursors are now persistent, and also include a generation field (incremented on wraparound, which will only happen if inode allocation is restricted to 32 bit inodes), so that we don't have to leave inode_generation keys around after a delete. The option for 32 bit inode numbers may now also be set on individual directories, and non-32 bit inode allocations are disallowed from allocating from the 32 bit part of the inode number space. - 1.19: autofix_errors Runtime self healing is now the default.o - 1.20: directory size (from Hongbo) directory i_size is now meaningful, and not 0" * tag 'bcachefs-2025-01-20.2' of git://evilpiepirate.org/bcachefs: (268 commits) bcachefs: Fix check_inode_hash_info_matches_root() bcachefs: Document issue with bch_stripe layout bcachefs: Fix self healing on read error bcachefs: Pop all the transactions from the abort one bcachefs: Only abort the transactions in the cycle bcachefs: Introduce lock_graph_pop_from bcachefs: Convert open-coded lock_graph_pop_all to helper bcachefs: Do not allow no fail lock request to fail bcachefs: Merge the condition to avoid additional invocation Revert "bcachefs: Fix bch2_btree_node_upgrade()" bcachefs: bcachefs_metadata_version_directory_size bcachefs: make directory i_size meaningful bcachefs: check_unreachable_inodes is not actually PASS_ONLINE yet bcachefs: Don't use BTREE_ITER_cached when walking alloc btree during fsck bcachefs: Check for dirents to overwritten inodes bcachefs: bch2_btree_iter_peek_slot() handles navigating to nonexistent depth bcachefs: Don't set btree_path to updtodate if we don't fill bcachefs: __bch2_btree_pos_to_text() bcachefs: printbuf_reset() handles tabstops bcachefs: Silence read-only errors when deleting snapshots ... commit 5d8a4bd6b251216acc532801f6a5258903aead42 Merge: fadc3ed9ce1c 067cdf020329 Author: Linus Torvalds Date: Mon Jan 20 13:37:14 2025 -0800 Merge tag 'pstore-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: - pstore/blk: trivial typo fixes (Eugen Hristev) - pstore/zone: reject zero-sized allocations (Eugen Hristev) * tag 'pstore-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore/zone: avoid dereferencing zero sized ptr after init zones pstore/blk: trivial typo fixes commit fadc3ed9ce1cd9ecc5c8be8875f7ec11ab3a7ebe Merge: 0eb4aaa230d7 55cf2f4b945f Author: Linus Torvalds Date: Mon Jan 20 13:27:58 2025 -0800 Merge tag 'execve-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull execve updates from Kees Cook: - fix up /proc/pid/comm in the execveat(AT_EMPTY_PATH) case (Tycho Andersen, Kees Cook) - binfmt_misc: Fix comment typos (Christophe JAILLET) - move empty argv[0] warning closer to actual logic (Nir Lichtman) - remove legacy custom binfmt modules autoloading (Nir Lichtman) - Make sure set_task_comm() always NUL-terminates - binfmt_flat: Fix integer overflow bug on 32 bit systems (Dan Carpenter) - coredump: Do not lock when copying "comm" - MAINTAINERS: add auxvec.h and set myself as maintainer * tag 'execve-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: binfmt_flat: Fix integer overflow bug on 32 bit systems selftests/exec: add a test for execveat()'s comm exec: fix up /proc/pid/comm in the execveat(AT_EMPTY_PATH) case exec: Make sure task->comm is always NUL-terminated exec: remove legacy custom binfmt modules autoloading exec: move warning of null argv to be next to the relevant code fs: binfmt: Fix a typo MAINTAINERS: exec: Mark Kees as maintainer MAINTAINERS: exec: Add auxvec.h UAPI coredump: Do not lock during 'comm' reporting commit 0eb4aaa230d725fa9b1cd758c0f17abca5597af6 Merge: 1851bccf608a 9d0c23db26cb Author: Linus Torvalds Date: Mon Jan 20 13:09:30 2025 -0800 Merge tag 'for-6.14-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "User visible changes, features: - rebuilding of the free space tree at mount time is done in more transactions, fix potential hangs when the transaction thread is blocked due to large amount of block groups - more read IO balancing strategies (experimental config), add two new ways how to select a device for read if the profiles allow that (all RAID1*), the current default selects the device by pid which is good on average but less performant for single reader workloads - select preferred device for all reads (namely for testing) - round-robin, balance reads across devices relevant for the requested IO range - add encoded write ioctl support to io_uring (read was added in 6.12), basis for writing send stream using that instead of syscalls, non-blocking mode is not yet implemented - support FS_IOC_READ_VERITY_METADATA, applications can use the metadata to do their own verification - pass inode's i_write_hint to bios, for parity with other filesystems, ioctls F_GET_RW_HINT/F_SET_RW_HINT Core: - in zoned mode: allow to directly reclaim a block group by simply resetting it, then it can be reused and another block group does not need to be allocated - super block validation now also does more comprehensive sys array validation, adding it to the points where superblock is validated (post-read, pre-write) - subpage mode fixes: - fix double accounting of blocks due to some races - improved or fixed error handling in a few cases (compression, delalloc) - raid stripe tree: - fix various cases with extent range splitting or deleting - implement hole punching to extent range - reduce number of stripe tree lookups during bio submission - more self-tests - updated self-tests (delayed refs) - error handling improvements - cleanups, refactoring - remove rest of backref caching infrastructure from relocation, not needed anymore - error message updates - remove unnecessary calls when extent buffer was marked dirty - unused parameter removal - code moved to new files Other code changes: add rb_find_add_cached() to the rb-tree API" * tag 'for-6.14-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (127 commits) btrfs: selftests: add a selftest for deleting two out of three extents btrfs: selftests: add test for punching a hole into 3 RAID stripe-extents btrfs: selftests: add selftest for punching holes into the RAID stripe extents btrfs: selftests: test RAID stripe-tree deletion spanning two items btrfs: selftests: don't split RAID extents in half btrfs: selftests: check for correct return value of failed lookup btrfs: don't use btrfs_set_item_key_safe on RAID stripe-extents btrfs: implement hole punching for RAID stripe extents btrfs: fix deletion of a range spanning parts two RAID stripe extents btrfs: fix tail delete of RAID stripe-extents btrfs: fix front delete range calculation for RAID stripe extents btrfs: assert RAID stripe-extent length is always greater than 0 btrfs: don't try to delete RAID stripe-extents if we don't need to btrfs: selftests: correct RAID stripe-tree feature flag setting btrfs: add io_uring interface for encoded writes btrfs: remove the unused locked_folio parameter from btrfs_cleanup_ordered_extents() btrfs: add extra error messages for delalloc range related errors btrfs: subpage: dump the involved bitmap when ASSERT() failed btrfs: subpage: fix the bitmap dump of the locked flags btrfs: do proper folio cleanup when run_delalloc_nocow() failed ... commit 1851bccf608a28ac5ec9410764dda9a46828213b Merge: b971424b6e3c 7c9d9223802f Author: Linus Torvalds Date: Mon Jan 20 13:06:28 2025 -0800 Merge tag 'gfs2-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Andreas Gruenbacher: - In the quota code, to avoid spurious audit messages, don't call capable() when quotas are off - When changing the 'j' flag of an inode, truncate the inode address space to avoid mixing "buffer head" and "iomap" pages * tag 'gfs2-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Truncate address space when flipping GFS2_DIF_JDATA flag gfs2: reorder capability check last commit b115243ab8bd92387cf524ba3a7d81eda8eca885 Merge: ba5f78505fb4 7bcf45ddb8bb Author: Jakub Kicinski Date: Mon Jan 20 12:16:07 2025 -0800 Merge branch 'ipv6-convert-rtm_-new-del-addr-and-more-to-per-netns-rtnl' Kuniyuki Iwashima says: ==================== ipv6: Convert RTM_{NEW,DEL}ADDR and more to per-netns RTNL. This series converts RTM_NEWADDR/RTM_DELADDR and some more RTNL users in addrconf.c to per-netns RTNL. v1: https://lore.kernel.org/20250114080516.46155-1-kuniyu@amazon.com ==================== Link: https://patch.msgid.link/20250115080608.28127-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 7bcf45ddb8bb3d386072677ce4d86d1ec9896096 Author: Kuniyuki Iwashima Date: Wed Jan 15 17:06:08 2025 +0900 ipv6: Convert inet6_rtm_deladdr() to per-netns RTNL. Let's register inet6_rtm_deladdr() with RTNL_FLAG_DOIT_PERNET and hold rtnl_net_lock() before inet6_addr_del(). Now that inet6_addr_del() is always called under per-netns RTNL. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115080608.28127-12-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/ipv6/addrconf.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 82a1e6aa8f6c181e73117975a9d44eb3b51425a2 Author: Kuniyuki Iwashima Date: Wed Jan 15 17:06:07 2025 +0900 ipv6: Convert inet6_rtm_newaddr() to per-netns RTNL. Let's register inet6_rtm_newaddr() with RTNL_FLAG_DOIT_PERNET and hold rtnl_net_lock() before __dev_get_by_index(). Now that inet6_addr_add() and inet6_addr_modify() are always called under per-netns RTNL. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115080608.28127-11-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/ipv6/addrconf.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 867b385251eac666685f7f4132315a1e3619baa5 Author: Kuniyuki Iwashima Date: Wed Jan 15 17:06:06 2025 +0900 ipv6: Move lifetime validation to inet6_rtm_newaddr(). inet6_addr_add() and inet6_addr_modify() have the same code to validate IPv6 lifetime that is done under RTNL. Let's factorise it out to inet6_rtm_newaddr() so that we can validate the lifetime without RTNL later. Note that inet6_addr_add() is called from addrconf_add_ifaddr(), but the lifetime is INFINITY_LIFE_TIME in the path, so expires and flags are 0. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115080608.28127-10-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/ipv6/addrconf.c | 93 ++++++++++++++++++++--------------------------------- 1 file changed, 35 insertions(+), 58 deletions(-) commit 2f1ace4127fdfc102603f359756b230f3d897411 Author: Kuniyuki Iwashima Date: Wed Jan 15 17:06:05 2025 +0900 ipv6: Set cfg.ifa_flags before device lookup in inet6_rtm_newaddr(). We will convert inet6_rtm_newaddr() to per-netns RTNL. Except for IFA_F_OPTIMISTIC, cfg.ifa_flags can be set before __dev_get_by_index(). Let's move ifa_flags setup before __dev_get_by_index() so that we can set ifa_flags without RTNL. Also, now it's moved before tb[IFA_CACHEINFO] in preparing for the next patch. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115080608.28127-9-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/ipv6/addrconf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit f7fce98a73df01901c8d67f1e7cd66a05fed148f Author: Kuniyuki Iwashima Date: Wed Jan 15 17:06:04 2025 +0900 ipv6: Pass dev to inet6_addr_add(). inet6_addr_add() is called from inet6_rtm_newaddr() and addrconf_add_ifaddr(). inet6_addr_add() looks up dev by __dev_get_by_index(), but it's already done in inet6_rtm_newaddr(). Let's move the 2nd lookup to addrconf_add_ifaddr() and pass dev to inet6_addr_add(). Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115080608.28127-8-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/ipv6/addrconf.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 832128cc4438ab69c801bc6130756203eae1198e Author: Kuniyuki Iwashima Date: Wed Jan 15 17:06:03 2025 +0900 ipv6: Convert inet6_ioctl() to per-netns RTNL. These functions are called from inet6_ioctl() with a socket's netns and hold RTNL. * SIOCSIFADDR : addrconf_add_ifaddr() * SIOCDIFADDR : addrconf_del_ifaddr() * SIOCSIFDSTADDR : addrconf_set_dstaddr() Let's use rtnl_net_lock(). Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115080608.28127-7-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/ipv6/addrconf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cdc5c1196ee9bcb12979d2599ed00dc187d989f1 Author: Kuniyuki Iwashima Date: Wed Jan 15 17:06:02 2025 +0900 ipv6: Hold rtnl_net_lock() in addrconf_init() and addrconf_cleanup(). addrconf_init() holds RTNL for blackhole_netdev, which is the global device in init_net. addrconf_cleanup() holds RTNL to clean up devices in init_net too. Let's use rtnl_net_lock(&init_net) there. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115080608.28127-6-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/ipv6/addrconf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 02cdd78b4e8d411163327ecfdd54c3208baebc0e Author: Kuniyuki Iwashima Date: Wed Jan 15 17:06:01 2025 +0900 ipv6: Hold rtnl_net_lock() in addrconf_dad_work(). addrconf_dad_work() is per-address work and holds RTNL internally. We can fetch netns as dev_net(ifp->idev->dev). Let's use rtnl_net_lock(). Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115080608.28127-5-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/ipv6/addrconf.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 6550ba0863f9e015cf4ca9b668e44b28fc6fe896 Author: Kuniyuki Iwashima Date: Wed Jan 15 17:06:00 2025 +0900 ipv6: Hold rtnl_net_lock() in addrconf_verify_work(). addrconf_verify_work() is per-netns work to call addrconf_verify_rtnl() under RTNL. Let's use rtnl_net_lock(). Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115080608.28127-4-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/ipv6/addrconf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 93c839e3edbe2cdf59d3bc12d776cce4cdf159ce Author: Kuniyuki Iwashima Date: Wed Jan 15 17:05:59 2025 +0900 ipv6: Convert net.ipv6.conf.${DEV}.XXX sysctl to per-netns RTNL. net.ipv6.conf.${DEV}.XXX sysctl are changed under RTNL: * forwarding * ignore_routes_with_linkdown * disable_ipv6 * proxy_ndp * addr_gen_mode * stable_secret * disable_policy Let's use rtnl_net_lock() there. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115080608.28127-3-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/ipv6/addrconf.c | 60 ++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit f7a6082b5e4c15f34fd766cf0960f7e082009c54 Author: Kuniyuki Iwashima Date: Wed Jan 15 17:05:58 2025 +0900 ipv6: Add __in6_dev_get_rtnl_net(). We will convert rtnl_lock() with rtnl_net_lock(), and we want to convert __in6_dev_get() too. __in6_dev_get() uses rcu_dereference_rtnl(), but as written in its comment, rtnl_dereference() or rcu_dereference() is preferable. Let's add __in6_dev_get_rtnl_net() that uses rtnl_net_dereference(). We can add the RCU version helper later if needed. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115080608.28127-2-kuniyu@amazon.com Signed-off-by: Jakub Kicinski include/net/addrconf.h | 5 +++++ 1 file changed, 5 insertions(+) commit 3599bae489d86fbabe039f9a2ab5472ffb04f7f1 Author: Helge Deller Date: Thu Jan 16 21:17:47 2025 +0100 parisc: Temporarily disable jump label support The 32-bit Debian kernel 6.12 fails to boot and crashes like this: init (pid 65): Protection id trap (code 7) CPU: 0 UID: 0 PID: 65 Comm: init Not tainted 6.12.9 #2 Hardware name: 9000/778/B160L YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI PSW: 00000000000001000000000000001111 Not tainted r00-03 0004000f 110d39d0 109a6558 12974400 r04-07 12a810e0 12a810e0 00000000 12a81144 r08-11 12a81174 00000007 00000000 00000002 r12-15 f8c55c08 0000006c 00000001 f8c55c08 r16-19 00000002 f8c58620 002da3a8 0000004e r20-23 00001a46 0000000f 10754f84 00000000 r24-27 00000000 00000003 12ae6980 1127b9d0 r28-31 00000000 00000000 12974440 109a6558 sr00-03 00000000 00000000 00000000 00000010 sr04-07 00000000 00000000 00000000 00000000 IASQ: 00000000 00000000 IAOQ: 110d39d0 110d39d4 IIR: baadf00d ISR: 00000000 IOR: 110d39d0 CPU: 0 CR30: 128740c0 CR31: 00000000 ORIG_R28: 000003f3 IAOQ[0]: 0x110d39d0 IAOQ[1]: 0x110d39d4 RP(r2): security_sk_free+0x70/0x1a4 Backtrace: [<10d8c844>] __sk_destruct+0x2bc/0x378 [<10d8e33c>] sk_destruct+0x68/0x8c [<10d8e3dc>] __sk_free+0x7c/0x148 [<10d8e560>] sk_free+0xb8/0xf0 [<10f6420c>] unix_release_sock+0x3ac/0x50c [<10f643b8>] unix_release+0x4c/0x7c [<10d832f8>] __sock_release+0x5c/0xf8 [<10d833b4>] sock_close+0x20/0x44 [<107ba52c>] __fput+0xf8/0x468 [<107baa08>] __fput_sync+0xb4/0xd4 [<107b471c>] sys_close+0x44/0x94 [<10405334>] syscall_exit+0x0/0x10 Bisecting points to this commit which triggers the issue: commit 417c5643cd67a55f424b203b492082035d0236c3 Author: KP Singh Date: Fri Aug 16 17:43:07 2024 +0200 lsm: replace indirect LSM hook calls with static calls After more analysis it seems that we don't fully implement the static calls and jump tables yet. Additionally the functions which mark kernel memory read-only or read-write-executable needs to be further enhanced to be able to fully support static calls. Enabling CONFIG_SECURITY_YAMA=y was one possibility to trigger the issue, although YAMA isn't the reason for the fault. As a temporary solution disable JUMP_LABEL functionality to avoid the crashes. Signed-off-by: Helge Deller Cc: Guenter Roeck Reviewed-by: Guenter Roeck Cc: # v6.12+ arch/parisc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 36b2f3aefc486ea2f773db5c42539a52e1fcbcb3 Author: Masahiro Yamada Date: Sat Dec 21 15:16:18 2024 +0900 parisc: add vdso linker script to 'targets' instead of extra-y The vdso linker script is preprocessed on demand. Adding it to 'targets' is enough to include the .cmd file. This commit applies the previous change to parisc, which added the vdso support after commit 887af6d7c99e ("arch: vdso: add vdso linker script to 'targets' instead of extra-y"). Signed-off-by: Masahiro Yamada Acked-by: Helge Deller Signed-off-by: Helge Deller arch/parisc/kernel/vdso32/Makefile | 2 +- arch/parisc/kernel/vdso64/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ba5f78505fb4e3feb73d8e5249a13b3244dac4d9 Author: Furong Xu <0x1207@gmail.com> Date: Fri Jan 17 14:28:05 2025 +0800 net: stmmac: Drop redundant skb_mark_for_recycle() for SKB frags After commit df542f669307 ("net: stmmac: Switch to zero-copy in non-XDP RX path"), SKBs are always marked for recycle, it is redundant to mark SKBs more than once when new frags are appended. Signed-off-by: Furong Xu <0x1207@gmail.com> Link: https://patch.msgid.link/20250117062805.192393-1-0x1207@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ------ 1 file changed, 6 deletions(-) commit f6f2e946aa4da1b378f44dbc79708b546f2a0c0e Author: Xiangqian Zhang Date: Fri Jan 17 17:46:03 2025 +0800 net: mii: Fix the Speed display when the network cable is not connected Two different models of usb card, the drivers are r8152 and asix. If no network cable is connected, Speed = 10Mb/s. This problem is repeated in linux 3.10, 4.19, 5.4, 6.12. This problem also exists on the latest kernel. Both drivers call mii_ethtool_get_link_ksettings, but the value of cmd->base.speed in this function can only be SPEED_1000 or SPEED_100 or SPEED_10. When the network cable is not connected, set cmd->base.speed =SPEED_UNKNOWN. Signed-off-by: Xiangqian Zhang Link: https://patch.msgid.link/20250117094603.4192594-1-zhangxiangqian@kylinos.cn Signed-off-by: Jakub Kicinski drivers/net/mii.c | 3 +++ 1 file changed, 3 insertions(+) commit 1c91c99075db4e31fb5cf0838ce59e80ecd51eab Merge: eddd3769eba3 166eb2356e4f Author: Rafael J. Wysocki Date: Mon Jan 20 21:01:50 2025 +0100 Merge branch 'pm-tools' Merge cpupower utility updates for 6.14: - Fix TSC MHz calculation in cpupower (He Rongguang). - Add install and uninstall options to bindings Makefile and add header changes for cpufreq.h to SWIG bindings in cpupower (John B. Wyatt IV). - Add missing residency header changes in cpuidle.h to SWIG bindings in cpupower (John B. Wyatt IV). - Add output files to .gitignore and clean them up in "make clean" in selftests/cpufreq (Li Zhijian). - Fix cross-compilation in cpupower Makefile (Peng Fan). - Revise the is_valid flag handling for idle_monitor in the cpupower utility (wangfushuai). - Extend and clean up AMD processors support in cpupower (Mario Limonciello). * pm-tools: pm: cpupower: Add missing residency header changes in cpuidle.h to SWIG pm: cpupower: Add header changes for cpufreq.h to SWIG bindings pm: cpupower: Add install and uninstall options to bindings makefile cpupower: Adjust whitespace for amd-pstate specific prints cpupower: Don't fetch maximum latency when EPP is enabled cpupower: Add support for showing energy performance preference cpupower: Don't try to read frequency from hardware when kernel uses aperfmperf cpupower: Add support for amd-pstate preferred core rankings cpupower: Add support for parsing 'enabled' or 'disabled' strings from table cpupower: Remove spurious return statement cpupower: fix TSC MHz calculation cpupower: revise is_valid flag handling for idle_monitor pm: cpupower: Makefile: Fix cross compilation selftests/cpufreq: gitignore output files and clean them in make clean commit 19d7750a06bb6063c8bcf2630766516215dc13dc Author: Denis Kirjanov Date: Sun Jan 19 16:42:53 2025 +0300 sysctl net: Remove macro checks for CONFIG_SYSCTL Since dccp and llc makefiles already check sysctl code compilation with xxx-$(CONFIG_SYSCTL) we can drop the checks Signed-off-by: Denis Kirjanov Link: https://patch.msgid.link/20250119134254.19250-1-kirjanov@gmail.com Signed-off-by: Jakub Kicinski net/dccp/sysctl.c | 4 ---- net/llc/sysctl_net_llc.c | 4 ---- 2 files changed, 8 deletions(-) commit 4fd001f5f32deb4c5e9dcd05612f8371b79d380e Merge: 01f5f35ae4c9 fdbaf5163331 Author: Jakub Kicinski Date: Mon Jan 20 11:59:25 2025 -0800 Merge tag 'nf-next-25-01-19' 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) Unbreak set size settings for rbtree set backend, intervals in rbtree are represented as two elements, this detailed is leaked to userspace leading to bogus ENOSPC from control plane. 2) Remove dead code in br_netfilter's br_nf_pre_routing_finish() due to never matching error when looking up for route, from Antoine Tenart. 3) Simplify check for device already in use in flowtable, from Phil Sutter. 4) Three patches to restore interface name field in struct nft_hook and use it, this is to prepare for wildcard interface support. From Phil Sutter. 5) Do not remove netdev basechain when last device is gone, this is for consistency with the flowtable behaviour. This allows for netdev basechains without devices. Another patch to simplify netdev event notifier after this update. Also from Phil. 6) Two patches to add missing spinlock when flowtable updates TCP state flags, from Florian Westphal. 7) Simplify __nf_ct_refresh_acct() by removing skbuff parameter, also from Florian. 8) Flowtable gc now extends ct timeout for offloaded flow. This is to address a possible race that leads to handing over flow to classic path with long ct timeouts. 9) Tear down flow if cached rt_mtu is stale, before this patch, packet is handed over to classic path but flow entry still remained in place. 10) Revisit the flowtable teardown strategy, which was originally designed to release flowtable hardware entries early. Add a new CLOSING flag that still allows hardware to release entries when fin/rst is seen, but keeps the flow entry in place when the TCP connection is closed. Release flow after timeout or when a new syn packet is seen for TCP reopen scenario. * tag 'nf-next-25-01-19' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: netfilter: flowtable: add CLOSING state netfilter: flowtable: teardown flow if cached mtu is stale netfilter: conntrack: rework offload nf_conn timeout extension logic netfilter: conntrack: remove skb argument from nf_ct_refresh netfilter: nft_flow_offload: update tcp state flags under lock netfilter: nft_flow_offload: clear tcp MAXACK flag before moving to slowpath netfilter: nf_tables: Simplify chain netdev notifier netfilter: nf_tables: Tolerate chains with no remaining hooks netfilter: nf_tables: Compare netdev hooks based on stored name netfilter: nf_tables: Use stored ifname in netdev hook dumps netfilter: nf_tables: Store user-defined hook ifname netfilter: nf_tables: Flowtable hook's pf value never varies netfilter: br_netfilter: remove unused conditional and dead code netfilter: nf_tables: fix set size with rbtree backend ==================== Link: https://patch.msgid.link/20250119172051.8261-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit eddd3769eba3a284bc8306e2b00c9782f08006ef Merge: a5c16f29a807 a500acaab6db 763fcb939971 Author: Rafael J. Wysocki Date: Mon Jan 20 20:56:33 2025 +0100 Merge branches 'pm-devfreq' and 'pm-opp' Merge devfreq and OPP (Operating Performance Points) updates for 6.14: - Clean up the Exynos devfreq driver and devfreq core (Markus Elfring, Jeongjun Park). - Minor cleanups and fixes for OPP (Dan Carpenter, Neil Armstrong, Joe Hattori). - Implement dev_pm_opp_get_bw() (Neil Armstrong). - Expose OPP reference counting helpers for Rust (Viresh Kumar). * pm-devfreq: PM / devfreq: exynos: remove unused function parameter PM / devfreq: event: Call of_node_put() only once in devfreq_event_get_edev_by_phandle() * pm-opp: PM / OPP: Add reference counting helpers for Rust implementation OPP: OF: Fix an OF node leak in _opp_add_static_v2() OPP: fix dev_pm_opp_find_bw_*() when bandwidth table not initialized OPP: add index check to assert to avoid buffer overflow in _read_freq() opp: core: Fix off by one in dev_pm_opp_get_bw() opp: core: implement dev_pm_opp_get_bw commit 01f5f35ae4c96f127b997be2af7cf91f21a92d7f Merge: e81fdf7078e9 99d028c63457 Author: Jakub Kicinski Date: Mon Jan 20 11:45:01 2025 -0800 Merge branch 'net-ethtool-fixes-for-hds-threshold' Jakub Kicinski says: ==================== net: ethtool: fixes for HDS threshold Quick follow up on the HDS threshold work, since the merge window is upon us. Fix the bnxt implementation to apply the settings right away, because we update the parameters _after_ configuring HW user needed to reconfig the device twice to get the settings to stick. For this I took the liberty of moving the config to a separate struct. This follows my original thinking for the queue API. It should also fit more neatly into how many drivers which support safe config update operate. Drivers can allocate new objects using the "pending" struct. netdevsim: KTAP version 1 1..7 ok 1 hds.get_hds ok 2 hds.get_hds_thresh ok 3 hds.set_hds_disable ok 4 hds.set_hds_enable ok 5 hds.set_hds_thresh_zero ok 6 hds.set_hds_thresh_max ok 7 hds.set_hds_thresh_gt # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:0 error:0 bnxt: KTAP version 1 1..7 ok 1 hds.get_hds ok 2 hds.get_hds_thresh ok 3 hds.set_hds_disable # SKIP disabling of HDS not supported by the device ok 4 hds.set_hds_enable ok 5 hds.set_hds_thresh_zero ok 6 hds.set_hds_thresh_max ok 7 hds.set_hds_thresh_gt # Totals: pass:6 fail:0 xfail:0 xpass:0 skip:1 error:0 v1: https://lore.kernel.org/20250117194815.1514410-1-kuba@kernel.org ==================== Link: https://patch.msgid.link/20250119020518.1962249-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 99d028c63457773152964ba3abc0d8fb8cf220bf Author: Jakub Kicinski Date: Sat Jan 18 18:05:17 2025 -0800 eth: bnxt: update header sizing defaults 300-400B RPC requests are fairly common. With the current default of 256B HDS threshold bnxt ends up splitting those, lowering PCIe bandwidth efficiency and increasing the number of memory allocation. Increase the HDS threshold to fit 4 buffers in a 4k page. This works out to 640B as the threshold on a typical kernel confing. This change increases the performance for a microbenchmark which receives 400B RPCs and sends empty responses by 4.5%. Admittedly this is just a single benchmark, but 256B works out to just 6 (so 2 more) packets per head page, because shinfo size dominates the headers. Now that we use page pool for the header pages I was also tempted to default rx_copybreak to 0, but in synthetic testing the copybreak size doesn't seem to make much difference. Reviewed-by: Michael Chan Link: https://patch.msgid.link/20250119020518.1962249-8-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit bee018052d1bbfa6d33ca016a42e8e2534429492 Author: Jakub Kicinski Date: Sat Jan 18 18:05:16 2025 -0800 eth: bnxt: allocate enough buffer space to meet HDS threshold Now that we can configure HDS threshold separately from the rx_copybreak HDS threshold may be higher than rx_copybreak. We need to make sure that we have enough space for the headers. Fixes: 6b43673a25c3 ("bnxt_en: add support for hds-thresh ethtool command") Reviewed-by: Michael Chan Link: https://patch.msgid.link/20250119020518.1962249-7-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 928459bbda19eb47e09d9bd4386ac46fad088958 Author: Jakub Kicinski Date: Sat Jan 18 18:05:15 2025 -0800 net: ethtool: populate the default HDS params in the core The core has the current HDS config, it can pre-populate the values for the drivers. While at it, remove the zero-setting in netdevsim. Zero are the default values since the config is zalloc'ed. Reviewed-by: Michael Chan Link: https://patch.msgid.link/20250119020518.1962249-6-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 1 - drivers/net/netdevsim/ethtool.c | 5 ----- net/ethtool/rings.c | 4 ++++ 3 files changed, 4 insertions(+), 6 deletions(-) commit e58263e9111733c4bfbbf07517d1f98f21134c52 Author: Jakub Kicinski Date: Sat Jan 18 18:05:14 2025 -0800 eth: bnxt: apply hds_thrs settings correctly Use the pending config for hds_thrs. Core will only update the "current" one after we return success. Without this change 2 reconfigs would be required for the setting to reach the device. Fixes: 6b43673a25c3 ("bnxt_en: add support for hds-thresh ethtool command") Reviewed-by: Michael Chan Link: https://patch.msgid.link/20250119020518.1962249-5-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32ad1f7a050d0c17e1e52e1dfdd9f6221ae20ef9 Author: Jakub Kicinski Date: Sat Jan 18 18:05:13 2025 -0800 net: provide pending ring configuration in net_device Record the pending configuration in net_device struct. ethtool core duplicates the current config and the specific handlers (for now just ringparam) can modify it. Reviewed-by: Michael Chan Link: https://patch.msgid.link/20250119020518.1962249-4-kuba@kernel.org Signed-off-by: Jakub Kicinski include/linux/netdevice.h | 6 ++++++ net/core/dev.c | 2 ++ net/ethtool/netlink.c | 21 ++++++++++++++++++--- net/ethtool/rings.c | 8 +++----- 4 files changed, 29 insertions(+), 8 deletions(-) commit 743dea746ed6d581877c114ef1f362bc277fed6a Author: Jakub Kicinski Date: Sat Jan 18 18:05:12 2025 -0800 net: ethtool: store netdev in a temp variable in ethnl_default_set_doit() For ease of review of the next patch store the dev pointer on the stack, instead of referring to req_info.dev every time. No functional changes. Reviewed-by: Michael Chan Link: https://patch.msgid.link/20250119020518.1962249-3-kuba@kernel.org Signed-off-by: Jakub Kicinski net/ethtool/netlink.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 3c836451ca9041cfb32a7d8f59ea15b3b991bbb3 Author: Jakub Kicinski Date: Sat Jan 18 18:05:11 2025 -0800 net: move HDS config from ethtool state Separate the HDS config from the ethtool state struct. The HDS config contains just simple parameters, not state. Having it as a separate struct will make it easier to clone / copy and also long term potentially make it per-queue. Reviewed-by: Michael Chan Link: https://patch.msgid.link/20250119020518.1962249-2-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++-- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 5 +++-- drivers/net/netdevsim/ethtool.c | 9 +++++---- drivers/net/netdevsim/netdev.c | 10 +++++----- include/linux/ethtool.h | 4 ---- include/linux/netdevice.h | 3 +++ include/net/netdev_queues.h | 10 ++++++++++ net/core/dev.c | 10 ++++++++-- net/core/devmem.c | 4 ++-- net/ethtool/rings.c | 8 +++++--- 10 files changed, 43 insertions(+), 24 deletions(-) commit b971424b6e3cbea5c017061fedda6a5f74e142cd Merge: 47c9f2b3c838 e30458d690f3 Author: Linus Torvalds Date: Mon Jan 20 11:40:48 2025 -0800 Merge tag 'vfs-6.14-rc1.afs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull afs updates from Christian Brauner: "Dynamic root improvements: - Create an /afs/. mountpoint to match the /afs/ mountpoint when a cell is created - Add some more checks on cell names proposed by the user to prevent dodgy symlink bodies from being created. Also prevent rootcell from being altered once set to simplify the locking - Change the handling of /afs/@cell from being a dentry name substitution at lookup time to making it a symlink to the current cell name and also provide a /afs/.@cell symlink to point to the dotted cell mountpoint Fixes: - Fix the abort code check in the fallback handling for the YFS.RemoveFile2 RPC call - Use call->op->server() for oridnary filesystem RPC calls that have an operation descriptor instead of call->server()" * tag 'vfs-6.14-rc1.afs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: afs: Fix the fallback handling for the YFS.RemoveFile2 RPC call afs: Make /afs/@cell and /afs/.@cell symlinks afs: Add rootcell checks afs: Make /afs/. as well as /afs/ mountpoints commit df1b8d6e89db0edd572a1e375f5d3dd5575b9a9b Author: Jiaxun Yang Date: Tue Jan 14 18:11:58 2025 +0000 MIPS: pci-legacy: Override pci_address_to_pio pci-legacy systems are not using logic_pio to managed PIO allocations, thus the generic pci_address_to_pio won't work when PCI_IOBASE is defined. Override the function to use architecture implementation to fix the problem. Cc: stable@vger.kernel.org Fixes: 4bfb53e7d317 ("mips: add including") Reported-by: Mateusz Jończyk Closes: https://lore.kernel.org/r/99f75c66-4c2d-45dc-a808-b5ba440c7551@app.fastmail.com/ Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer arch/mips/pci/pci-legacy.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a5c16f29a8078ce3724a5ea07e154aa217e62143 Merge: 1225bb42b8ce 251be0b542fd Author: Rafael J. Wysocki Date: Mon Jan 20 20:34:50 2025 +0100 Merge branch 'pm-cpufreq' Merge cpufreq updates for 6.14: - Use str_enable_disable()-like helpers in cpufreq (Krzysztof Kozlowski). - Extend the Apple cpufreq driver to support more SoCs (Hector Martin, Nick Chan). - Add new cpufreq driver for Airoha SoCs (Christian Marangi). - Fix using cpufreq-dt as module (Andreas Kemnade). - Minor fixes for Sparc, SCMI, and Qcom cpufreq drivers (Ethan Carter Edwards, Sibi Sankar, Manivannan Sadhasivam). - Fix the maximum supported frequency computation in the ACPI cpufreq driver to avoid relying on unfounded assumptions (Gautham Shenoy). - Fix an amd-pstate driver regression with preferred core rankings not being used (Mario Limonciello). - Fix a precision issue with frequency calculation in the amd-pstate driver (Naresh Solanki). - Add ftrace event to the amd-pstate driver for active mode (Mario Limonciello). - Set default EPP policy on Ryzen processors in amd-pstate (Mario Limonciello). - Clean up the amd-pstate cpufreq driver and optimize it to increase code reuse (Mario Limonciello, Dhananjay Ugwekar). - Use CPPC to get scaling factors between HWP performance levels and frequency in the intel_pstate driver and make it stop using a built -in scaling factor for the Arrow Lake processor (Rafael Wysocki). - Make intel_pstate initialize epp_policy to CPUFREQ_POLICY_UNKNOWN for consistency with CPU offline (Christian Loehle). - Fix superfluous updates caused by need_freq_update in the schedutil cpufreq governor (Sultan Alsawaf). * pm-cpufreq: (40 commits) cpufreq: Use str_enable_disable()-like helpers cpufreq: airoha: Add EN7581 CPUFreq SMCCC driver cpufreq: ACPI: Fix max-frequency computation cpufreq/amd-pstate: Refactor max frequency calculation cpufreq/amd-pstate: Fix prefcore rankings cpufreq: sparc: change kzalloc to kcalloc cpufreq: qcom: Implement clk_ops::determine_rate() for qcom_cpufreq* clocks cpufreq: qcom: Fix qcom_cpufreq_hw_recalc_rate() to query LUT if LMh IRQ is not available cpufreq: apple-soc: Add Apple A7-A8X SoC cpufreq support cpufreq: apple-soc: Set fallback transition latency to APPLE_DVFS_TRANSITION_TIMEOUT cpufreq: apple-soc: Increase cluster switch timeout to 400us cpufreq: apple-soc: Use 32-bit read for status register cpufreq: apple-soc: Allow per-SoC configuration of APPLE_DVFS_CMD_PS1 cpufreq: apple-soc: Drop setting the PS2 field on M2+ dt-bindings: cpufreq: apple,cluster-cpufreq: Add A7-A11, T2 compatibles dt-bindings: cpufreq: Document support for Airoha EN7581 CPUFreq cpufreq: fix using cpufreq-dt as module cpufreq: scmi: Register for limit change notifications cpufreq: schedutil: Fix superfluous updates caused by need_freq_update cpufreq: intel_pstate: Use CPUFREQ_POLICY_UNKNOWN ... commit a3c4afc0e081f8b6b5a744afb3f69c88288d218e Author: Thorsten Blum Date: Wed Jan 15 10:01:35 2025 +0100 MIPS: Loongson64: env: Use str_on_off() helper in prom_lefi_init_env() Remove hard-coded strings by using the str_on_off() helper function. Signed-off-by: Thorsten Blum Signed-off-by: Thomas Bogendoerfer arch/mips/loongson64/env.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e81fdf7078e950d3a5c78cc640a2ad58a523092d Merge: 3a0b7fa09521 085e6cba85ca Author: Jakub Kicinski Date: Mon Jan 20 11:27:44 2025 -0800 Merge branch 'af_unix-set-skb-drop-reason-in-every-kfree_skb-path' Kuniyuki Iwashima says: ==================== af_unix: Set skb drop reason in every kfree_skb() path. There is a potential user for skb drop reason for AF_UNIX. This series replaces some kfree_skb() in connect() and sendmsg() paths and sets skb drop reason for the rest of kfree_skb() in AF_UNIX. Link: https://lore.kernel.org/netdev/CAAf2ycmZHti95WaBR3s+L5Epm1q7sXmvZ-EqCK=-oZj=45tOwQ@mail.gmail.com/ v2: https://lore.kernel.org/20250112040810.14145-1-kuniyu@amazon.com/ v1: https://lore.kernel.org/20250110092641.85905-1-kuniyu@amazon.com/ ==================== Link: https://patch.msgid.link/20250116053441.5758-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 085e6cba85ca81fbb4ebfc238c934108f0e8467e Author: Kuniyuki Iwashima Date: Thu Jan 16 14:34:42 2025 +0900 af_unix: Use consume_skb() in connect() and sendmsg(). This is based on Donald Hunter's patch. These functions could fail for various reasons, sometimes triggering kfree_skb(). * unix_stream_connect() : connect() * unix_stream_sendmsg() : sendmsg() * queue_oob() : sendmsg(MSG_OOB) * unix_dgram_sendmsg() : sendmsg() Such kfree_skb() is tied to the errno of connect() and sendmsg(), and we need not define skb drop reasons. Let's use consume_skb() not to churn kfree_skb() events. Link: https://lore.kernel.org/netdev/eb30b164-7f86-46bf-a5d3-0f8bda5e9398@redhat.com/ Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250116053441.5758-10-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/unix/af_unix.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 3b2d40dc13c26a4efde438beb664576d20a9fb4a Author: Kuniyuki Iwashima Date: Thu Jan 16 14:34:41 2025 +0900 af_unix: Reuse out_pipe label in unix_stream_sendmsg(). This is a follow-up of commit d460b04bc452 ("af_unix: Clean up error paths in unix_stream_sendmsg()."). If we initialise skb with NULL in unix_stream_sendmsg(), we can reuse the existing out_pipe label for the SEND_SHUTDOWN check. Let's rename it and adjust the existing label as out_pipe_lock. While at it, size and data_len are moved to the while loop scope. Suggested-by: Paolo Abeni Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250116053441.5758-9-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/unix/af_unix.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit b3e365bbf4f47b8f76b25b0fcf3f38916ca53e42 Author: Kuniyuki Iwashima Date: Thu Jan 16 14:34:40 2025 +0900 af_unix: Set drop reason in unix_dgram_disconnected(). unix_dgram_disconnected() is called from two places: 1. when a connect()ed socket dis-connect()s or re-connect()s to another socket 2. when sendmsg() fails because the peer socket that the client has connect()ed to has been close()d Then, the client's recv queue is purged to remove all messages from the old peer socket. Let's define a new drop reason for that case. # echo 1 > /sys/kernel/tracing/events/skb/kfree_skb/enable # python3 >>> from socket import * >>> >>> # s1 has a message from s2 >>> s1, s2 = socketpair(AF_UNIX, SOCK_DGRAM) >>> s2.send(b'hello world') >>> >>> # re-connect() drops the message from s2 >>> s3 = socket(AF_UNIX, SOCK_DGRAM) >>> s3.bind('') >>> s1.connect(s3.getsockname()) # cat /sys/kernel/tracing/trace_pipe python3-250 ... kfree_skb: ... location=skb_queue_purge_reason+0xdc/0x110 reason: UNIX_DISCONNECT Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250116053441.5758-8-kuniyu@amazon.com Signed-off-by: Jakub Kicinski include/net/dropreason-core.h | 7 +++++++ net/unix/af_unix.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) commit bace4b468049a558295a0f59460fcb51e28f8fde Author: Kuniyuki Iwashima Date: Thu Jan 16 14:34:39 2025 +0900 af_unix: Set drop reason in unix_stream_read_skb(). unix_stream_read_skb() is called when BPF SOCKMAP reads some data from a socket in the map. SOCKMAP does not support MSG_OOB, and reading OOB results in a drop. Let's set drop reasons respectively. * SOCKET_CLOSE : the socket in SOCKMAP was close()d * UNIX_SKIP_OOB : OOB was read from the socket in SOCKMAP Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250116053441.5758-7-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/unix/af_unix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 533643b091dd6e246d57caf81e6892fa9cbb1cc9 Author: Kuniyuki Iwashima Date: Thu Jan 16 14:34:38 2025 +0900 af_unix: Set drop reason in manage_oob(). AF_UNIX SOCK_STREAM socket supports MSG_OOB. When OOB data is sent to a socket, recv() will break at that point. If the next recv() does not have MSG_OOB, the normal data following the OOB data is returned. Then, the OOB skb is dropped. Let's define a new drop reason for that case in manage_oob(). # echo 1 > /sys/kernel/tracing/events/skb/kfree_skb/enable # python3 >>> from socket import * >>> s1, s2 = socketpair(AF_UNIX) >>> s1.send(b'a', MSG_OOB) >>> s1.send(b'b') >>> s2.recv(2) b'b' # cat /sys/kernel/tracing/trace_pipe ... python3-223 ... kfree_skb: ... location=unix_stream_read_generic+0x59e/0xc20 reason: UNIX_SKIP_OOB Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250116053441.5758-6-kuniyu@amazon.com Signed-off-by: Jakub Kicinski include/net/dropreason-core.h | 6 ++++++ net/unix/af_unix.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit c49a157c33c45cf00a1881e8c1f65bed5ff0023e Author: Kuniyuki Iwashima Date: Thu Jan 16 14:34:37 2025 +0900 af_unix: Set drop reason in __unix_gc(). Inflight file descriptors by SCM_RIGHTS hold references to the struct file. AF_UNIX sockets could hold references to each other, forming reference cycles. Once such sockets are close()d without the fd recv()ed, they will be unaccessible from userspace but remain in kernel. __unix_gc() garbage-collects skb with the dead file descriptors and frees them by __skb_queue_purge(). Let's set SKB_DROP_REASON_SOCKET_CLOSE there. # echo 1 > /sys/kernel/tracing/events/skb/kfree_skb/enable # python3 >>> from socket import * >>> from array import array >>> >>> # Create a reference cycle >>> s1 = socket(AF_UNIX, SOCK_DGRAM) >>> s1.bind('') >>> s1.sendmsg([b"nop"], [(SOL_SOCKET, SCM_RIGHTS, array("i", [s1.fileno()]))], 0, s1.getsockname()) >>> s1.close() >>> >>> # Trigger GC >>> s2 = socket(AF_UNIX) >>> s2.close() # cat /sys/kernel/tracing/trace_pipe ... kworker/u16:2-42 ... kfree_skb: ... location=__unix_gc+0x4ad/0x580 reason: SOCKET_CLOSE Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250116053441.5758-5-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/unix/garbage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d0446b7a214e2aa28c0e914329610731f665ad2 Author: Kuniyuki Iwashima Date: Thu Jan 16 14:34:36 2025 +0900 af_unix: Set drop reason in unix_sock_destructor(). unix_sock_destructor() is called as sk->sk_destruct() just before the socket is actually freed. Let's use SKB_DROP_REASON_SOCKET_CLOSE for skb_queue_purge(). Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250116053441.5758-4-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/unix/af_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c32f0bd7d4838982c6724fca0da92353f27c6f88 Author: Kuniyuki Iwashima Date: Thu Jan 16 14:34:35 2025 +0900 af_unix: Set drop reason in unix_release_sock(). unix_release_sock() is called when the last refcnt of struct file is released. Let's define a new drop reason SKB_DROP_REASON_SOCKET_CLOSE and set it for kfree_skb() in unix_release_sock(). # echo 1 > /sys/kernel/tracing/events/skb/kfree_skb/enable # python3 >>> from socket import * >>> s1, s2 = socketpair(AF_UNIX) >>> s1.send(b'hello world') >>> s2.close() # cat /sys/kernel/tracing/trace_pipe ... python3-280 ... kfree_skb: ... protocol=0 location=unix_release_sock+0x260/0x420 reason: SOCKET_CLOSE To be precise, unix_release_sock() is also called for a new child socket in unix_stream_connect() when something fails, but the new sk does not have skb in the recv queue then and no event is logged. Note that only tcp_inbound_ao_hash() uses a similar drop reason, SKB_DROP_REASON_TCP_CLOSE, and this can be generalised later. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250116053441.5758-3-kuniyu@amazon.com Signed-off-by: Jakub Kicinski include/net/dropreason-core.h | 3 +++ net/unix/af_unix.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit 454d402481d45af79ee7eea7e64bce02bbbe9766 Author: Kuniyuki Iwashima Date: Thu Jan 16 14:34:34 2025 +0900 net: dropreason: Gather SOCKET_ drop reasons. The following patch adds a new drop reason starting with the SOCKET_ prefix. Let's gather the existing SOCKET_ reasons. Note that the order is not part of uAPI. Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250116053441.5758-2-kuniyu@amazon.com Signed-off-by: Jakub Kicinski include/net/dropreason-core.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3a0b7fa095212b51ed63892540c4f249991a2d74 Author: Liu Ye Date: Thu Jan 16 09:30:37 2025 +0800 selftests/net/ipsec: Fix Null pointer dereference in rtattr_pack() Address Null pointer dereference / undefined behavior in rtattr_pack (note that size is 0 in the bad case). Flagged by cppcheck as: tools/testing/selftests/net/ipsec.c:230:25: warning: Possible null pointer dereference: payload [nullPointer] memcpy(RTA_DATA(attr), payload, size); ^ tools/testing/selftests/net/ipsec.c:1618:54: note: Calling function 'rtattr_pack', 4th argument 'NULL' value is 0 if (rtattr_pack(&req.nh, sizeof(req), XFRMA_IF_ID, NULL, 0)) { ^ tools/testing/selftests/net/ipsec.c:230:25: note: Null pointer dereference memcpy(RTA_DATA(attr), payload, size); ^ Signed-off-by: Liu Ye Link: https://patch.msgid.link/20250116013037.29470-1-liuye@kylinos.cn Signed-off-by: Jakub Kicinski tools/testing/selftests/net/ipsec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 47c9f2b3c838a33552dbd41db6c5d93377842fcd Merge: 7e587c20adab cf40ebb2ed9f Author: Linus Torvalds Date: Mon Jan 20 11:16:50 2025 -0800 Merge tag 'vfs-6.14-rc1.statx.dio' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs direct-io updates from Christian Brauner: "File systems that write out of place usually require different alignment for direct I/O writes than what they can do for reads. Add a separate dio read align field to statx, as many out of place write file systems can easily do reads aligned to the device sector size, but require bigger alignment for writes. This is usually papered over by falling back to buffered I/O for smaller writes and doing read-modify-write cycles, but performance for this sucks, so applications benefit from knowing the actual write alignment" * tag 'vfs-6.14-rc1.statx.dio' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: xfs: report larger dio alignment for COW inodes xfs: report the correct read/write dio alignment for reflinked inodes xfs: cleanup xfs_vn_getattr fs: add STATX_DIO_READ_ALIGN fs: reformat the statx definition commit 711aad3c43a9853657e00225466d204e46ae528b Author: Sebastian Wiese-Wagner Date: Mon Jan 20 19:12:40 2025 +0100 ALSA: hda/realtek: Enable Mute LED on HP Laptop 14s-fq1xxx This HP Laptop uses ALC236 codec with COEF 0x07 controlling the mute LED. Enable existing quirk for this device. Signed-off-by: Sebastian Wiese-Wagner Cc: Link: https://patch.msgid.link/20250120181240.13106-1-seb@fastmail.to Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 7e587c20adab5b8da4c7b5573e711a8c808e0a2d Merge: 100ceb4817a2 a0634b457eca Author: Linus Torvalds Date: Mon Jan 20 11:00:53 2025 -0800 Merge tag 'vfs-6.14-rc1.libfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs libfs updates from Christian Brauner: "This improves the stable directory offset behavior in various ways. Stable offsets are needed so that NFS can reliably read directories on filesystems such as tmpfs: - Improve the end-of-directory detection According to getdents(3), the d_off field in each returned directory entry points to the next entry in the directory. The d_off field in the last returned entry in the readdir buffer must contain a valid offset value, but if it points to an actual directory entry, then readdir/getdents can loop. Introduce a specific fixed offset value that is placed in the d_off field of the last entry in a directory. Some user space applications assume that the EOD offset value is larger than the offsets of real directory entries, so the largest valid offset value is reserved for this purpose. This new value is never allocated by simple_offset_add(). When ->iterate_dir() returns, getdents{64} inserts the ctx->pos value into the d_off field of the last valid entry in the readdir buffer. When it hits EOD, offset_readdir() sets ctx->pos to the EOD offset value so the last entry is updated to point to the EOD marker. When trying to read the entry at the EOD offset, offset_readdir() terminates immediately. - Rely on d_children to iterate stable offset directories Instead of using the mtree to emit entries in the order of their offset values, use it only to map incoming ctx->pos to a starting entry. Then use the directory's d_children list, which is already maintained properly by the dcache, to find the next child to emit. - Narrow the range of directory offset values returned by simple_offset_add() to 3 .. (S32_MAX - 1) on all platforms. This means the allocation behavior is identical on 32-bit systems, 64-bit systems, and 32-bit user space on 64-bit kernels. The new range still permits over 2 billion concurrent entries per directory. - Return ENOSPC when the directory offset range is exhausted. Hitting this error is almost impossible though. - Remove the simple_offset_empty() helper" * tag 'vfs-6.14-rc1.libfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: libfs: Use d_children list to iterate simple_offset directories libfs: Replace simple_offset end-of-directory detection Revert "libfs: fix infinite directory reads for offset dir" Revert "libfs: Add simple_offset_empty()" libfs: Return ENOSPC when the directory offset range is exhausted commit d1e7dce240f1352816564dc483b734db334ebde4 Merge: da8146ce615a abe01a78bfc8 Author: Mark Brown Date: Mon Jan 20 18:54:36 2025 +0000 ASoC: fsl: two fixes for asrc memory to memory Merge series from Shengjiu Wang : 1. Fix the suspend failure for memory to peripheral function. 2. Return error value for processing function. commit 100ceb4817a2ac650e29f107cf97161ce3e2289a Merge: 1a89a6924b58 68e6b7d98bc6 Author: Linus Torvalds Date: Mon Jan 20 10:44:51 2025 -0800 Merge tag 'vfs-6.14-rc1.mount.v2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs mount updates from Christian Brauner: - Add a mountinfo program to demonstrate statmount()/listmount() Add a new "mountinfo" sample userland program that demonstrates how to use statmount() and listmount() to get at the same info that /proc/pid/mountinfo provides - Remove pointless nospec.h include - Prepend statmount.mnt_opts string with security_sb_mnt_opts() Currently these mount options aren't accessible via statmount() - Add new mount namespaces to mount namespace rbtree outside of the namespace semaphore - Lockless mount namespace lookup Currently we take the read lock when looking for a mount namespace to list mounts in. We can make this lockless. The simple search case can just use a sequence counter to detect concurrent changes to the rbtree For walking the list of mount namespaces sequentially via nsfs we keep a separate rcu list as rb_prev() and rb_next() aren't usable safely with rcu. Currently there is no primitive for retrieving the previous list member. To do this we need a new deletion primitive that doesn't poison the prev pointer and a corresponding retrieval helper Since creating mount namespaces is a relatively rare event compared with querying mounts in a foreign mount namespace this is worth it. Once libmount and systemd pick up this mechanism to list mounts in foreign mount namespaces this will be used very frequently - Add extended selftests for lockless mount namespace iteration - Add a sample program to list all mounts on the system, i.e., in all mount namespaces - Improve mount namespace iteration performance Make finding the last or first mount to start iterating the mount namespace from an O(1) operation and add selftests for iterating the mount table starting from the first and last mount - Use an xarray for the old mount id While the ida does use the xarray internally we can use it explicitly which allows us to increment the unique mount id under the xa lock. This allows us to remove the atomic as we're now allocating both ids in one go - Use a shared header for vfs sample programs - Fix build warnings for new sample program to list all mounts * tag 'vfs-6.14-rc1.mount.v2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: samples/vfs: fix build warnings samples/vfs: use shared header samples/vfs/mountinfo: Use __u64 instead of uint64_t fs: remove useless lockdep assertion fs: use xarray for old mount id selftests: add listmount() iteration tests fs: cache first and last mount samples: add test-list-all-mounts selftests: remove unneeded include selftests: add tests for mntns iteration seltests: move nsfs into filesystems subfolder fs: simplify rwlock to spinlock fs: lockless mntns lookup for nsfs rculist: add list_bidir_{del,prev}_rcu() fs: lockless mntns rbtree lookup fs: add mount namespace to rbtree late fs: prepend statmount.mnt_opts string with security_sb_mnt_opts() mount: remove inlude/nospec.h include samples: add a mountinfo program to demonstrate statmount()/listmount() commit 1108d677dae296d2f05664bc71fd1d50bd61eb1f Author: Bjorn Helgaas Date: Fri Jan 17 17:51:19 2025 -0600 PCI: dwc: Simplify config resource lookup If platform_get_resource_byname("config") fails, return error immediately and unindent the normal path. No functional change intended. Link: https://lore.kernel.org/r/20250117235119.712043-1-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Frank Li Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-host.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit b881532991f81f5e3a069fe6d1a3e091400042b5 Author: Bjorn Helgaas Date: Sat Jan 18 13:55:58 2025 -0600 PCI: imx6: Clean up comments and whitespace For readability, fix typos and comments that needlessly exceed 80 columns. Link: https://lore.kernel.org/r/20250118210727.795559-1-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Frank Li drivers/pci/controller/dwc/pci-imx6.c | 41 +++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 19 deletions(-) commit 1a89a6924b581884b1b54bcd3ea790b3668be2e0 Merge: 37c12fcb3c8e c625aa276319 Author: Linus Torvalds Date: Mon Jan 20 10:29:11 2025 -0800 Merge tag 'kernel-6.14-rc1.pid' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull pid_max namespacing update from Christian Brauner: "The pid_max sysctl is a global value. For a long time the default value has been 65535 and during the pidfd dicussions Linus proposed to bump pid_max by default. Based on this discussion systemd started bumping pid_max to 2^22. So all new systems now run with a very high pid_max limit with some distros having also backported that change. The decision to bump pid_max is obviously correct. It just doesn't make a lot of sense nowadays to enforce such a low pid number. There's sufficient tooling to make selecting specific processes without typing really large pid numbers available. In any case, there are workloads that have expections about how large pid numbers they accept. Either for historical reasons or architectural reasons. One concreate example is the 32-bit version of Android's bionic libc which requires pid numbers less than 65536. There are workloads where it is run in a 32-bit container on a 64-bit kernel. If the host has a pid_max value greater than 65535 the libc will abort thread creation because of size assumptions of pthread_mutex_t. That's a fairly specific use-case however, in general specific workloads that are moved into containers running on a host with a new kernel and a new systemd can run into issues with large pid_max values. Obviously making assumptions about the size of the allocated pid is suboptimal but we have userspace that does it. Of course, giving containers the ability to restrict the number of processes in their respective pid namespace indepent of the global limit through pid_max is something desirable in itself and comes in handy in general. Independent of motivating use-cases the existence of pid namespaces makes this also a good semantical extension and there have been prior proposals pushing in a similar direction. The trick here is to minimize the risk of regressions which I think is doable. The fact that pid namespaces are hierarchical will help us here. What we mostly care about is that when the host sets a low pid_max limit, say (crazy number) 100 that no descendant pid namespace can allocate a higher pid number in its namespace. Since pid allocation is hierarchial this can be ensured by checking each pid allocation against the pid namespace's pid_max limit. This means if the allocation in the descendant pid namespace succeeds, the ancestor pid namespace can reject it. If the ancestor pid namespace has a higher limit than the descendant pid namespace the descendant pid namespace will reject the pid allocation. The ancestor pid namespace will obviously not care about this. All in all this means pid_max continues to enforce a system wide limit on the number of processes but allows pid namespaces sufficient leeway in handling workloads with assumptions about pid values and allows containers to restrict the number of processes in a pid namespace through the pid_max interface" * tag 'kernel-6.14-rc1.pid' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: tests/pid_namespace: add pid_max tests pid: allow pid_max to be set per pid namespace commit 1225bb42b8cea7507bbd06b91057393accac91cc Merge: 3744b08449c2 fd8318a32573 9c782ccc6968 ebeeee390b6a Author: Rafael J. Wysocki Date: Mon Jan 20 19:14:15 2025 +0100 Merge branches 'pm-sleep', 'pm-cpuidle' and 'pm-em' Merge updates related to system sleep, a cpuidle update and an Energy Model handling code update for 6.14-rc1: - Allow configuring the system suspend-resume (DPM) watchdog to warn earlier than panic (Douglas Anderson). - Implement devm_device_init_wakeup() helper and introduce a device- managed variant of dev_pm_set_wake_irq() (Joe Hattori, Peng Fan). - Remove direct inclusions of 'pm_wakeup.h' which should be only included via 'device.h' (Wolfram Sang). - Clean up two comments in the core system-wide PM code (Rafael Wysocki, Randy Dunlap). - Add Clearwater Forest processor support to the intel_idle cpuidle driver (Artem Bityutskiy). - Move sched domains rebuild function from the schedutil cpufreq governor to the Energy Model handling code (Rafael Wysocki). * pm-sleep: PM: sleep: wakeirq: Introduce device-managed variant of dev_pm_set_wake_irq() PM: sleep: Allow configuring the DPM watchdog to warn earlier than panic PM: sleep: convert comment from kernel-doc to plain comment PM: wakeup: implement devm_device_init_wakeup() helper PM: sleep: sysfs: don't include 'pm_wakeup.h' directly PM: sleep: autosleep: don't include 'pm_wakeup.h' directly PM: sleep: Update stale comment in device_resume() * pm-cpuidle: intel_idle: add Clearwater Forest SoC support * pm-em: PM: EM: Move sched domains rebuild function from schedutil to EM commit 37c12fcb3c8e356825bbffb64c0158ccf8a7de94 Merge: 5f85bd6aecea a6babf4cbeaa Author: Linus Torvalds Date: Mon Jan 20 10:13:06 2025 -0800 Merge tag 'kernel-6.14-rc1.cred' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull cred refcount updates from Christian Brauner: "For the v6.13 cycle we switched overlayfs to a variant of override_creds() that doesn't take an extra reference. To this end the {override,revert}_creds_light() helpers were introduced. This generalizes the idea behind {override,revert}_creds_light() to the {override,revert}_creds() helpers. Afterwards overriding and reverting credentials is reference count free unless the caller explicitly takes a reference. All callers have been appropriately ported" * tag 'kernel-6.14-rc1.cred' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (30 commits) cred: fold get_new_cred_many() into get_cred_many() cred: remove unused get_new_cred() nfsd: avoid pointless cred reference count bump cachefiles: avoid pointless cred reference count bump dns_resolver: avoid pointless cred reference count bump trace: avoid pointless cred reference count bump cgroup: avoid pointless cred reference count bump acct: avoid pointless reference count bump io_uring: avoid pointless cred reference count bump smb: avoid pointless cred reference count bump cifs: avoid pointless cred reference count bump cifs: avoid pointless cred reference count bump ovl: avoid pointless cred reference count bump open: avoid pointless cred reference count bump nfsfh: avoid pointless cred reference count bump nfs/nfs4recover: avoid pointless cred reference count bump nfs/nfs4idmap: avoid pointless reference count bump nfs/localio: avoid pointless cred reference count bumps coredump: avoid pointless cred reference count bump binfmt_misc: avoid pointless cred reference count bump ... commit a925df6f5036013b6592eef28f7ec4a45bf465a9 Author: Steven Rostedt Date: Mon Jan 20 12:57:45 2025 -0500 tracing: Fix #if CONFIG_MODULES to #ifdef CONFIG_MODULES A typo was introduced when adding the ":mod:" command that did a "#if CONFIG_MODULES" instead of a "#ifdef CONFIG_MODULES". Fix it. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Linus Torvalds Link: https://lore.kernel.org/20250120125745.4ac90ca6@gandalf.local.home Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501190121.E2CIJuUj-lkp@intel.com/ Fixes: b355247df104e ("tracing: Cache ":mod:" events for modules not loaded yet") Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f85bd6aeceaecd0ff3a5ee827bf75eb6141ad55 Merge: 4b84a4c8d40d 3781680fba3e Author: Linus Torvalds Date: Mon Jan 20 09:59:00 2025 -0800 Merge tag 'vfs-6.14-rc1.pidfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull pidfs updates from Christian Brauner: - Rework inode number allocation Recently we received a patchset that aims to enable file handle encoding and decoding via name_to_handle_at(2) and open_by_handle_at(2). A crucical step in the patch series is how to go from inode number to struct pid without leaking information into unprivileged contexts. The issue is that in order to find a struct pid the pid number in the initial pid namespace must be encoded into the file handle via name_to_handle_at(2). This can be used by containers using a separate pid namespace to learn what the pid number of a given process in the initial pid namespace is. While this is a weak information leak it could be used in various exploits and in general is an ugly wart in the design. To solve this problem a new way is needed to lookup a struct pid based on the inode number allocated for that struct pid. The other part is to remove the custom inode number allocation on 32bit systems that is also an ugly wart that should go away. Allocate unique identifiers for struct pid by simply incrementing a 64 bit counter and insert each struct pid into the rbtree so it can be looked up to decode file handles avoiding to leak actual pids across pid namespaces in file handles. On both 64 bit and 32 bit the same 64 bit identifier is used to lookup struct pid in the rbtree. On 64 bit the unique identifier for struct pid simply becomes the inode number. Comparing two pidfds continues to be as simple as comparing inode numbers. On 32 bit the 64 bit number assigned to struct pid is split into two 32 bit numbers. The lower 32 bits are used as the inode number and the upper 32 bits are used as the inode generation number. Whenever a wraparound happens on 32 bit the 64 bit number will be incremented by 2 so inode numbering starts at 2 again. When a wraparound happens on 32 bit multiple pidfds with the same inode number are likely to exist. This isn't a problem since before pidfs pidfds used the anonymous inode meaning all pidfds had the same inode number. On 32 bit sserspace can thus reconstruct the 64 bit identifier by retrieving both the inode number and the inode generation number to compare, or use file handles. This gives the same guarantees on both 32 bit and 64 bit. - Implement file handle support This is based on custom export operation methods which allows pidfs to implement permission checking and opening of pidfs file handles cleanly without hacking around in the core file handle code too much. - Support bind-mounts Allow bind-mounting pidfds. Similar to nsfs let's allow bind-mounts for pidfds. This allows pidfds to be safely recovered and checked for process recycling. Instead of checking d_ops for both nsfs and pidfs we could in a follow-up patch add a flag argument to struct dentry_operations that functions similar to file_operations->fop_flags. * tag 'vfs-6.14-rc1.pidfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: selftests: add pidfd bind-mount tests pidfs: allow bind-mounts pidfs: lookup pid through rbtree selftests/pidfd: add pidfs file handle selftests pidfs: check for valid ioctl commands pidfs: implement file handle support exportfs: add permission method fhandle: pull CAP_DAC_READ_SEARCH check into may_decode_fh() exportfs: add open method fhandle: simplify error handling pseudofs: add support for export_ops pidfs: support FS_IOC_GETVERSION pidfs: remove 32bit inode number handling pidfs: rework inode number allocation commit 3f3c2f0cf669ff28b995b3d6b820ab870c2aa9d9 Merge: d10cafc5d54a 14a627fe794a Author: Alexei Starovoitov Date: Mon Jan 20 09:43:29 2025 -0800 Merge branch 'bpf-allow-may_goto-0-instruction' Yonghong Song says: ==================== Emil Tsalapatis from Meta reported such a case where 'may_goto 0' insn is generated by clang-19 compiler and this caused verification failure since 'may_goto 0' is rejected by verifier. In fact, 'may_goto 0' insn is actually a no-op and it won't hurt verification. The only side effect is that the verifier will convert the insn to a sequence of codes like /* r10 - 8 stores the implicit loop count */ r11 = *(u64 *)(r10 -8) if r11 == 0x0 goto pc+2 r11 -= 1 *(u64 *)(r10 -8) = r11 With this patch set 'may_goto 0' insns are allowed in verification which also removes those insns. Changelogs: v1 -> v2: - Instead of a separate function, removing 'may_goto 0' in existing func opt_remove_nops(). ==================== Link: https://patch.msgid.link/20250118192019.2123689-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit 14a627fe794a10cf507861e63cf9d46077699337 Author: Yonghong Song Date: Sat Jan 18 11:20:34 2025 -0800 selftests/bpf: Add some tests related to 'may_goto 0' insns Add both asm-based and C-based tests which have 'may_goto 0' insns. For the following code in C-based test, int i, tmp[3]; for (i = 0; i < 3 && can_loop; i++) tmp[i] = 0; The clang compiler (clang 19 and 20) generates may_goto 2 may_goto 1 may_goto 0 r1 = 0 r2 = 0 r3 = 0 The above asm codes are due to llvm pass SROAPass. This ensures the successful verification since tmp[0-2] are initialized. Otherwise, the code without SROAPass like may_goto 5 r1 = 0 may_goto 3 r2 = 0 may_goto 1 r3 = 0 will have verification failure. Although from the source code C-based test should have verification failure, clang compiler optimization generates code with successful verification. If gcc generates different asm codes than clang, the following code can be used for gcc: int i, tmp[3]; for (i = 0; i < 3; i++) tmp[i] = 0; Acked-by: Eduard Zingerman Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20250118192034.2124952-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/verifier.c | 4 + .../selftests/bpf/progs/verifier_may_goto_1.c | 97 ++++++++++++++++++++++ .../selftests/bpf/progs/verifier_may_goto_2.c | 28 +++++++ 3 files changed, 129 insertions(+) commit 0c35ca252a7dea61f0731e99d695492176862e2c Author: Yonghong Song Date: Sat Jan 18 11:20:29 2025 -0800 bpf: Remove 'may_goto 0' instruction in opt_remove_nops() Since 'may_goto 0' insns are actually no-op, let us remove them. Otherwise, verifier will generate code like /* r10 - 8 stores the implicit loop count */ r11 = *(u64 *)(r10 -8) if r11 == 0x0 goto pc+2 r11 -= 1 *(u64 *)(r10 -8) = r11 which is the pure overhead. The following code patterns (from the previous commit) are also handled: may_goto 2 may_goto 1 may_goto 0 With this commit, the above three 'may_goto' insns are all eliminated. Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20250118192029.2124584-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit aefaa4313b5083427781f9e3e0cc7b5ce5cb4df0 Author: Yonghong Song Date: Sat Jan 18 11:20:24 2025 -0800 bpf: Allow 'may_goto 0' instruction in verifier Commit 011832b97b31 ("bpf: Introduce may_goto instruction") added support for may_goto insn. The 'may_goto 0' insn is disallowed since the insn is equivalent to a nop as both branch will go to the next insn. But it is possible that compiler transformation may generate 'may_goto 0' insn. Emil Tsalapatis from Meta reported such a case which caused verification failure. For example, for the following code, int i, tmp[3]; for (i = 0; i < 3 && can_loop; i++) tmp[i] = 0; ... clang 20 may generate code like may_goto 2; may_goto 1; may_goto 0; r1 = 0; /* tmp[0] = 0; */ r2 = 0; /* tmp[1] = 0; */ r3 = 0; /* tmp[2] = 0; */ Let us permit 'may_goto 0' insn to avoid verification failure for codes like the above. Reported-by: Emil Tsalapatis Acked-by: Eduard Zingerman Signed-off-by: Yonghong Song Acked-by: Daniel Borkmann Link: https://lore.kernel.org/r/20250118192024.2124059-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4b84a4c8d40dfbfe1becec13a6e373e871e103e9 Merge: d58295242436 c859df526b20 Author: Linus Torvalds Date: Mon Jan 20 09:40:49 2025 -0800 Merge tag 'vfs-6.14-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull misc vfs updates from Christian Brauner: "Features: - Support caching symlink lengths in inodes The size is stored in a new union utilizing the same space as i_devices, thus avoiding growing the struct or taking up any more space When utilized it dodges strlen() in vfs_readlink(), giving about 1.5% speed up when issuing readlink on /initrd.img on ext4 - Add RWF_DONTCACHE iocb and FOP_DONTCACHE file_operations flag If a file system supports uncached buffered IO, it may set FOP_DONTCACHE and enable support for RWF_DONTCACHE. If RWF_DONTCACHE is attempted without the file system supporting it, it'll get errored with -EOPNOTSUPP - Enable VBOXGUEST and VBOXSF_FS on ARM64 Now that VirtualBox is able to run as a host on arm64 (e.g. the Apple M3 processors) we can enable VBOXSF_FS (and in turn VBOXGUEST) for this architecture. Tested with various runs of bonnie++ and dbench on an Apple MacBook Pro with the latest Virtualbox 7.1.4 r165100 installed Cleanups: - Delay sysctl_nr_open check in expand_files() - Use kernel-doc includes in fiemap docbook - Use page->private instead of page->index in watch_queue - Use a consume fence in mnt_idmap() as it's heavily used in link_path_walk() - Replace magic number 7 with ARRAY_SIZE() in fc_log - Sort out a stale comment about races between fd alloc and dup2() - Fix return type of do_mount() from long to int - Various cosmetic cleanups for the lockref code Fixes: - Annotate spinning as unlikely() in __read_seqcount_begin The annotation already used to be there, but got lost in commit 52ac39e5db51 ("seqlock: seqcount_t: Implement all read APIs as statement expressions") - Fix proc_handler for sysctl_nr_open - Flush delayed work in delayed fput() - Fix grammar and spelling in propagate_umount() - Fix ESP not readable during coredump In /proc/PID/stat, there is the kstkesp field which is the stack pointer of a thread. While the thread is active, this field reads zero. But during a coredump, it should have a valid value However, at the moment, kstkesp is zero even during coredump - Don't wake up the writer if the pipe is still full - Fix unbalanced user_access_end() in select code" * tag 'vfs-6.14-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (28 commits) gfs2: use lockref_init for qd_lockref erofs: use lockref_init for pcl->lockref dcache: use lockref_init for d_lockref lockref: add a lockref_init helper lockref: drop superfluous externs lockref: use bool for false/true returns lockref: improve the lockref_get_not_zero description lockref: remove lockref_put_not_zero fs: Fix return type of do_mount() from long to int select: Fix unbalanced user_access_end() vbox: Enable VBOXGUEST and VBOXSF_FS on ARM64 pipe_read: don't wake up the writer if the pipe is still full selftests: coredump: Add stackdump test fs/proc: do_task_stat: Fix ESP not readable during coredump fs: add RWF_DONTCACHE iocb and FOP_DONTCACHE file_operations flag fs: sort out a stale comment about races between fd alloc and dup2 fs: Fix grammar and spelling in propagate_umount() fs: fc_log replace magic number 7 with ARRAY_SIZE() fs: use a consume fence in mnt_idmap() file: flush delayed work in delayed fput() ... commit d5829524243652409e3fa2853736649674c294f0 Merge: ca56a74a31e2 4972226d0dc4 Author: Linus Torvalds Date: Mon Jan 20 09:36:55 2025 -0800 Merge tag 'vfs-6.14-rc1.kcore' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull /proc/kcore updates from Christian Brauner: "The performance of /proc/kcore reads has been showing up as a bottleneck for the drgn debugger. drgn scripts often spend ~25% of their time in the kernel reading from /proc/kcore. A lot of this overhead comes from silly inefficiencies. This pull request contains fixes for the low-hanging fruit. The fixes are all fairly small and straightforward. The result is a 25% improvement in read latency in micro-benchmarks (from ~235 nanoseconds to ~175) and a 15% improvement in execution time for real-world drgn scripts: - Make /proc/kcore entry permanent - Avoid walking the list on every read - Use percpu_rw_semaphore for kclist_lock - Make Omar Sandoval the official maintainer for /proc/kcore" * tag 'vfs-6.14-rc1.kcore' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: MAINTAINERS: add me as /proc/kcore maintainer proc/kcore: use percpu_rw_semaphore for kclist_lock proc/kcore: don't walk list on every read proc/kcore: mark proc entry as permanent commit ca56a74a31e26d81a481304ed2f631e65883372b Merge: 91309a70829d 7a47db23a9f0 Author: Linus Torvalds Date: Mon Jan 20 09:29:11 2025 -0800 Merge tag 'vfs-6.14-rc1.netfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs netfs updates from Christian Brauner: "This contains read performance improvements and support for monolithic single-blob objects that have to be read/written as such (e.g. AFS directory contents). The implementation of the two parts is interwoven as each makes the other possible. - Read performance improvements The read performance improvements are intended to speed up some loss of performance detected in cifs and to a lesser extend in afs. The problem is that we queue too many work items during the collection of read results: each individual subrequest is collected by its own work item, and then they have to interact with each other when a series of subrequests don't exactly align with the pattern of folios that are being read by the overall request. Whilst the processing of the pages covered by individual subrequests as they complete potentially allows folios to be woken in parallel and with minimum delay, it can shuffle wakeups for sequential reads out of order - and that is the most common I/O pattern. The final assessment and cleanup of an operation is then held up until the last I/O completes - and for a synchronous sequential operation, this means the bouncing around of work items just adds latency. Two changes have been made to make this work: (1) All collection is now done in a single "work item" that works progressively through the subrequests as they complete (and also dispatches retries as necessary). (2) For readahead and AIO, this work item be done on a workqueue and can run in parallel with the ultimate consumer of the data; for synchronous direct or unbuffered reads, the collection is run in the application thread and not offloaded. Functions such as smb2_readv_callback() then just tell netfslib that the subrequest has terminated; netfslib does a minimal bit of processing on the spot - stat counting and tracing mostly - and then queues/wakes up the worker. This simplifies the logic as the collector just walks sequentially through the subrequests as they complete and walks through the folios, if buffered, unlocking them as it goes. It also keeps to a minimum the amount of latency injected into the filesystem's low-level I/O handling The way netfs supports filesystems using the deprecated PG_private_2 flag is changed: folios are flagged and added to a write request as they complete and that takes care of scheduling the writes to the cache. The originating read request can then just unlock the pages whatever happens. - Single-blob object support Single-blob objects are files for which the content of the file must be read from or written to the server in a single operation because reading them in parts may yield inconsistent results. AFS directories are an example of this as there exists the possibility that the contents are generated on the fly and would differ between reads or might change due to third party interference. Such objects will be written to and retrieved from the cache if one is present, though we allow/may need to propose multiple subrequests to do so. The important part is that read from/write to the *server* is monolithic. Single blob reading is, for the moment, fully synchronous and does result collection in the application thread and, also for the moment, the API is supplied the buffer in the form of a folio_queue chain rather than using the pagecache. - Related afs changes This series makes a number of changes to the kafs filesystem, primarily in the area of directory handling: - AFS's FetchData RPC reply processing is made partially asynchronous which allows the netfs_io_request's outstanding operation counter to be removed as part of reducing the collection to a single work item. - Directory and symlink reading are plumbed through netfslib using the single-blob object API and are now cacheable with fscache. This also allows the afs_read struct to be eliminated and netfs_io_subrequest to be used directly instead. - Directory and symlink content are now stored in a folio_queue buffer rather than in the pagecache. This means we don't require the RCU read lock and xarray iteration to access it, and folios won't randomly disappear under us because the VM wants them back. - The vnode operation lock is changed from a mutex struct to a private lock implementation. The problem is that the lock now needs to be dropped in a separate thread and mutexes don't permit that. - When a new directory or symlink is created, we now initialise it locally and mark it valid rather than downloading it (we know what it's likely to look like). - We now use the in-directory hashtable to reduce the number of entries we need to scan when doing a lookup. The edit routines have to maintain the hash chains. - Cancellation (e.g. by signal) of an async call after the rxrpc_call has been set up is now offloaded to the worker thread as there will be a notification from rxrpc upon completion. This avoids a double cleanup. - A "rolling buffer" implementation is created to abstract out the two separate folio_queue chaining implementations I had (one for read and one for write). - Functions are provided to create/extend a buffer in a folio_queue chain and tear it down again. This is used to handle AFS directories, but could also be used to create bounce buffers for content crypto and transport crypto. - The was_async argument is dropped from netfs_read_subreq_terminated() Instead we wake the read collection work item by either queuing it or waking up the app thread. - We don't need to use BH-excluding locks when communicating between the issuing thread and the collection thread as neither of them now run in BH context. - Also included are a number of new tracepoints; a split of the netfslib write collection code to put retrying into its own file (it gets more complicated with content encryption). - There are also some minor fixes AFS included, including fixing the AFS directory format struct layout, reducing some directory over-invalidation and making afs_mkdir() translate EEXIST to ENOTEMPY (which is not available on all systems the servers support). - Finally, there's a patch to try and detect entry into the folio unlock function with no folio_queue structs in the buffer (which isn't allowed in the cases that can get there). This is a debugging patch, but should be minimal overhead" * tag 'vfs-6.14-rc1.netfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (31 commits) netfs: Report on NULL folioq in netfs_writeback_unlock_folios() afs: Add a tracepoint for afs_read_receive() afs: Locally initialise the contents of a new symlink on creation afs: Use the contained hashtable to search a directory afs: Make afs_mkdir() locally initialise a new directory's content netfs: Change the read result collector to only use one work item afs: Make {Y,}FS.FetchData an asynchronous operation afs: Fix cleanup of immediately failed async calls afs: Eliminate afs_read afs: Use netfslib for symlinks, allowing them to be cached afs: Use netfslib for directories afs: Make afs_init_request() get a key if not given a file netfs: Add support for caching single monolithic objects such as AFS dirs netfs: Add functions to build/clean a buffer in a folio_queue afs: Add more tracepoints to do with tracking validity cachefiles: Add auxiliary data trace cachefiles: Add some subrequest tracepoints netfs: Remove some extraneous directory invalidations afs: Fix directory format encoding struct afs: Fix EEXIST error returned from afs_rmdir() to be ENOTEMPTY ... commit d10cafc5d54a0f70681ab2f739ea6c46282c86f9 Merge: 01f3ce5328c4 0a5d2efa3827 Author: Alexei Starovoitov Date: Mon Jan 20 09:09:02 2025 -0800 Merge branch 'free-htab-element-out-of-bucket-lock' Hou Tao says: ==================== The patch set continues the previous work [1] to move all the freeings of htab elements out of bucket lock. One motivation for the patch set is the locking problem reported by Sebastian [2]: the freeing of bpf_timer under PREEMPT_RT may acquire a spin-lock (namely softirq_expiry_lock). However the freeing procedure for htab element has already held a raw-spin-lock (namely bucket lock), and it will trigger the warning: "BUG: scheduling while atomic" as demonstrated by the selftests patch. Another motivation is to reduce the locked scope of bucket lock. However, the patch set doesn't move all freeing of htab element out of bucket lock, it still keep the free of special fields in pre-allocated hash map under the protect of bucket lock in htab_map_update_elem(). The patch set is structured as follows: * Patch #1 moves the element freeing out of bucket lock for htab_lru_map_delete_node(). However the freeing is still in the locked scope of LRU raw spin lock. * Patch #2~#3 move the element freeing out of bucket lock for __htab_map_lookup_and_delete_elem() * Patch #4 cancels the bpf_timer in two steps to fix the locking problem in htab_map_update_elem() for PREEMPT_PRT. * Patch #5 adds a selftest for the locking problem Please see individual patches for more details. Comments are always welcome. --- v3: * patch #1: update the commit message to state that the freeing of special field is still in the locked scope of LRU raw spin lock * patch #4: cancel the bpf_timer in two steps only for PREEMPT_RT (suggested by Alexei) v2: https://lore.kernel.org/bpf/20250109061901.2620825-1-houtao@huaweicloud.com * cancels the bpf timer in two steps instead of breaking the reuse the refill of per-cpu ->extra_elems into two steps v1: https://lore.kernel.org/bpf/20250107085559.3081563-1-houtao@huaweicloud.com [1]: https://lore.kernel.org/bpf/20241106063542.357743-1-houtao@huaweicloud.com [2]: https://lore.kernel.org/bpf/20241106084527.4gPrMnHt@linutronix.de ==================== Link: https://patch.msgid.link/20250117101816.2101857-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 0a5d2efa382751fc2b0a9a82f6cbdfe8aef29fb3 Author: Hou Tao Date: Fri Jan 17 18:18:16 2025 +0800 selftests/bpf: Add test case for the freeing of bpf_timer The main purpose of the test is to demonstrate the lock problem for the free of bpf_timer under PREEMPT_RT. When freeing a bpf_timer which is running on other CPU in bpf_timer_cancel_and_free(), hrtimer_cancel() will try to acquire a spin-lock (namely softirq_expiry_lock), however the freeing procedure has already held a raw-spin-lock. The test first creates two threads: one to start timers and the other to free timers. The start-timers thread will start the timer and then wake up the free-timers thread to free these timers when the starts complete. After freeing, the free-timer thread will wake up the start-timer thread to complete the current iteration. A loop of 10 iterations is used. Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20250117101816.2101857-6-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov .../testing/selftests/bpf/prog_tests/free_timer.c | 165 +++++++++++++++++++++ tools/testing/selftests/bpf/progs/free_timer.c | 71 +++++++++ 2 files changed, 236 insertions(+) commit 58f038e6d209d2dd862fcf5de55407855856794d Author: Hou Tao Date: Fri Jan 17 18:18:15 2025 +0800 bpf: Cancel the running bpf_timer through kworker for PREEMPT_RT During the update procedure, when overwrite element in a pre-allocated htab, the freeing of old_element is protected by the bucket lock. The reason why the bucket lock is necessary is that the old_element has already been stashed in htab->extra_elems after alloc_htab_elem() returns. If freeing the old_element after the bucket lock is unlocked, the stashed element may be reused by concurrent update procedure and the freeing of old_element will run concurrently with the reuse of the old_element. However, the invocation of check_and_free_fields() may acquire a spin-lock which violates the lockdep rule because its caller has already held a raw-spin-lock (bucket lock). The following warning will be reported when such race happens: BUG: scheduling while atomic: test_progs/676/0x00000003 3 locks held by test_progs/676: #0: ffffffff864b0240 (rcu_read_lock_trace){....}-{0:0}, at: bpf_prog_test_run_syscall+0x2c0/0x830 #1: ffff88810e961188 (&htab->lockdep_key){....}-{2:2}, at: htab_map_update_elem+0x306/0x1500 #2: ffff8881f4eac1b8 (&base->softirq_expiry_lock){....}-{2:2}, at: hrtimer_cancel_wait_running+0xe9/0x1b0 Modules linked in: bpf_testmod(O) Preemption disabled at: [] htab_map_update_elem+0x293/0x1500 CPU: 0 UID: 0 PID: 676 Comm: test_progs Tainted: G ... 6.12.0+ #11 Tainted: [W]=WARN, [O]=OOT_MODULE Hardware name: QEMU Standard PC (i440FX + PIIX, 1996)... Call Trace: dump_stack_lvl+0x57/0x70 dump_stack+0x10/0x20 __schedule_bug+0x120/0x170 __schedule+0x300c/0x4800 schedule_rtlock+0x37/0x60 rtlock_slowlock_locked+0x6d9/0x54c0 rt_spin_lock+0x168/0x230 hrtimer_cancel_wait_running+0xe9/0x1b0 hrtimer_cancel+0x24/0x30 bpf_timer_delete_work+0x1d/0x40 bpf_timer_cancel_and_free+0x5e/0x80 bpf_obj_free_fields+0x262/0x4a0 check_and_free_fields+0x1d0/0x280 htab_map_update_elem+0x7fc/0x1500 bpf_prog_9f90bc20768e0cb9_overwrite_cb+0x3f/0x43 bpf_prog_ea601c4649694dbd_overwrite_timer+0x5d/0x7e bpf_prog_test_run_syscall+0x322/0x830 __sys_bpf+0x135d/0x3ca0 __x64_sys_bpf+0x75/0xb0 x64_sys_call+0x1b5/0xa10 do_syscall_64+0x3b/0xc0 entry_SYSCALL_64_after_hwframe+0x4b/0x53 ... It seems feasible to break the reuse and refill of per-cpu extra_elems into two independent parts: reuse the per-cpu extra_elems with bucket lock being held and refill the old_element as per-cpu extra_elems after the bucket lock is unlocked. However, it will make the concurrent overwrite procedures on the same CPU return unexpected -E2BIG error when the map is full. Therefore, the patch fixes the lock problem by breaking the cancelling of bpf_timer into two steps for PREEMPT_RT: 1) use hrtimer_try_to_cancel() and check its return value 2) if the timer is running, use hrtimer_cancel() through a kworker to cancel it again Considering that the current implementation of hrtimer_cancel() will try to acquire a being held softirq_expiry_lock when the current timer is running, these steps above are reasonable. However, it also has downside. When the timer is running, the cancelling of the timer is delayed when releasing the last map uref. The delay is also fixable (e.g., break the cancelling of bpf timer into two parts: one part in locked scope, another one in unlocked scope), it can be revised later if necessary. It is a bit hard to decide the right fix tag. One reason is that the problem depends on PREEMPT_RT which is enabled in v6.12. Considering the softirq_expiry_lock lock exists since v5.4 and bpf_timer is introduced in v5.15, the bpf_timer commit is used in the fixes tag and an extra depends-on tag is added to state the dependency on PREEMPT_RT. Fixes: b00628b1c7d5 ("bpf: Introduce bpf timers.") Depends-on: v6.12+ with PREEMPT_RT enabled Reported-by: Sebastian Andrzej Siewior Closes: https://lore.kernel.org/bpf/20241106084527.4gPrMnHt@linutronix.de Signed-off-by: Hou Tao Reviewed-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20250117101816.2101857-5-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov kernel/bpf/helpers.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 47363f1553e69b8c2e3269f9883799a4ea898cd4 Author: Hou Tao Date: Fri Jan 17 18:18:14 2025 +0800 bpf: Free element after unlock in __htab_map_lookup_and_delete_elem() The freeing of special fields in map value may acquire a spin-lock (e.g., the freeing of bpf_timer), however, the lookup_and_delete_elem procedure has already held a raw-spin-lock, which violates the lockdep rule. The running context of __htab_map_lookup_and_delete_elem() has already disabled the migration. Therefore, it is OK to invoke free_htab_elem() after unlocking the bucket lock. Fix the potential problem by freeing element after unlocking bucket lock in __htab_map_lookup_and_delete_elem(). Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20250117101816.2101857-4-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov kernel/bpf/hashtab.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 588c6ead325aecc9894c9925cf1f771b77437bee Author: Hou Tao Date: Fri Jan 17 18:18:13 2025 +0800 bpf: Bail out early in __htab_map_lookup_and_delete_elem() Use goto statement to bail out early when the target element is not found, instead of using a large else branch to handle the more likely case. This change doesn't affect functionality and simply make the code cleaner. Signed-off-by: Hou Tao Reviewed-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20250117101816.2101857-3-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov kernel/bpf/hashtab.c | 51 ++++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 25 deletions(-) commit 45dc92c32a476daf60eaef855014d0ea35780ba5 Author: Hou Tao Date: Fri Jan 17 18:18:12 2025 +0800 bpf: Free special fields after unlock in htab_lru_map_delete_node() When bpf_timer is used in LRU hash map, calling check_and_free_fields() in htab_lru_map_delete_node() will invoke bpf_timer_cancel_and_free() to free the bpf_timer. If the timer is running on other CPUs, hrtimer_cancel() will invoke hrtimer_cancel_wait_running() to spin on current CPU to wait for the completion of the hrtimer callback. Considering that the deletion has already acquired a raw-spin-lock (bucket lock). To reduce the time holding the bucket lock, move the invocation of check_and_free_fields() out of bucket lock. However, because htab_lru_map_delete_node() is invoked with LRU raw spin lock being held, the freeing of special fields still happens in a locked scope. Signed-off-by: Hou Tao Reviewed-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20250117101816.2101857-2-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov kernel/bpf/hashtab.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d1ddf94665c6805a63659ab0b09ef626ecc2b0b2 Merge: 5e9019857cdc 02915b4813a1 c759bc8e9046 84524b1dadd8 Author: Rafael J. Wysocki Date: Mon Jan 20 17:58:25 2025 +0100 Merge branches 'acpi-battery', 'acpi-fan' and 'acpi-misc' Merge ACPI battery and fan drivers updates and miscellaneous ACPI chanages for 6.14: - Update messages printed by the ACPI battery driver to always refer to driver extensions as "hooks" to avoid confusion with similar functionality in the power supply subsystem in the future (Thomas Weißschuh). - Fix .probe() error path cleanup in the ACPI fan driver to avoid memory leaks (Joe Hattori). - Constify 'struct bin_attribute' in some places in the ACPI subsystem and mark it as __ro_after_init in one place to prevent binary blob attributes from being updated (Thomas Weißschuh) - Add empty stubs for several ACPI-related symbols so that they can be used when CONFIG_ACPI is unset and use them for removing unnecessary conditional compilation from the ipu-bridge driver (Ricardo Ribalda). * acpi-battery: ACPI: battery: Rename extensions to hook in messages * acpi-fan: ACPI: fan: cleanup resources in the error path of .probe() * acpi-misc: media: ipu-bridge: Remove unneeded conditional compilations ACPI: bus: implement acpi_device_hid when !ACPI ACPI: bus: implement for_each_acpi_consumer_dev when !ACPI ACPI: header: implement acpi_device_handle when !ACPI ACPI: bus: implement acpi_get_physical_device_location when !ACPI ACPI: bus: implement for_each_acpi_dev_match when !ACPI ACPI: bus: change the prototype for acpi_get_physical_device_location ACPI: sysfs: Constify 'struct bin_attribute' ACPI: BGRT: Constify 'struct bin_attribute' ACPI: BGRT: Mark bin_attribute as __ro_after_init commit 91309a70829d94c735c8bb1cc383e78c96127a16 Author: Linus Torvalds Date: Tue Dec 10 10:25:04 2024 -0800 x86: use cmov for user address masking This was a suggestion by David Laight, and while I was slightly worried that some micro-architecture would predict cmov like a conditional branch, there is little reason to actually believe any core would be that broken. Intel documents that their existing cores treat CMOVcc as a data dependency that will constrain speculation in their "Speculative Execution Side Channel Mitigations" whitepaper: "Other instructions such as CMOVcc, AND, ADC, SBB and SETcc can also be used to prevent bounds check bypass by constraining speculative execution on current family 6 processors (Intel® Core™, Intel® Atom™, Intel® Xeon® and Intel® Xeon Phi™ processors)" and while that leaves the future uarch issues open, that's certainly true of our traditional SBB usage too. Any core that predicts CMOV will be unusable for various crypto algorithms that need data-independent timing stability, so let's just treat CMOV as the safe choice that simplifies the address masking by avoiding an extra instruction and doesn't need a temporary register. Suggested-by: David Laight Link: https://www.intel.com/content/dam/develop/external/us/en/documents/336996-speculative-execution-side-channel-mitigations.pdf Signed-off-by: Linus Torvalds arch/x86/include/asm/uaccess_64.h | 12 ++++++------ arch/x86/lib/getuser.S | 5 ++--- 2 files changed, 8 insertions(+), 9 deletions(-) commit 5e9019857cdc482dad5a18754d8838909ca3f96e Merge: 14578923e8c2 bede543d2f8a bff7165da9c1 17159601d2ec f4757d84abf5 5c0e00a391dd Author: Rafael J. Wysocki Date: Mon Jan 20 17:43:04 2025 +0100 Merge branches 'acpi-osl', 'acpi-tables', 'acpi-property', 'acpi-prm' and 'acpi-apei' Merge assorted changes in ACPI library code for 6.14: - Use usleep_range() instead of msleep() in acpi_os_sleep() to reduce excessive delays due to timer inaccuracy, mostly affecting system suspend and resume (Rafael Wysocki). - Use str_enabled_disabled() string helpers in the ACPI tables parsing code to make it easier to follow (Sunil V L). - Update device properties parsing on systems using ACPI so that data firmware nodes resulting from _DSD evaluation are treated as available in firmware nodes walks (Sakari Ailus). - Fix missing guid_t declaration in linux/prmt.h (Robert Richter). - Update the GHES handling code to follow the global panic= instead of overriding it by force-rebooting the system after a fatal hw error has been reported (Borislav Petkov). * acpi-osl: ACPI: OSL: Use usleep_range() in acpi_os_sleep() * acpi-tables: ACPI: tables: Use string choice helpers * acpi-property: ACPI: property: Consider data nodes as being available * acpi-prm: ACPI: PRM: Fix missing guid_t declaration in linux/prmt.h * acpi-apei: APEI: GHES: Have GHES honor the panic= setting commit 027ea4f5f2c814b703adabdd42b779cd98e24411 Author: Linus Torvalds Date: Sun Dec 29 13:07:51 2024 -0800 x86: use proper 'clac' and 'stac' opcode names Back when we added SMAP support, all versions of binutils didn't necessarily understand the 'clac' and 'stac' instructions. So we implemented those instructions manually as ".byte" sequences. But we've since upgraded the minimum version of binutils to version 2.25, and that included proper support for the SMAP instructions, and there's no reason for us to use some line noise to express them any more. Signed-off-by: Linus Torvalds arch/x86/include/asm/smap.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 3d49020a327cd7d069059317c11df24e407ccfa3 Author: Nicolin Chen Date: Fri Jan 17 11:29:01 2025 -0800 iommufd/fault: Use a separate spinlock to protect fault->deliver list The fault->mutex serializes the fault read()/write() fops and the iommufd_fault_auto_response_faults(), mainly for fault->response. Also, it was conveniently used to fence the fault->deliver in poll() fop and iommufd_fault_iopf_handler(). However, copy_from/to_user() may sleep if pagefaults are enabled. Thus, they could take a long time to wait for user pages to swap in, blocking iommufd_fault_iopf_handler() and its caller that is typically a shared IRQ handler of an IOMMU driver, resulting in a potential global DOS. Instead of reusing the mutex to protect the fault->deliver list, add a separate spinlock, nested under the mutex, to do the job. iommufd_fault_iopf_handler() would no longer be blocked by copy_from/to_user(). Add a free_list in iommufd_auto_response_faults(), so the spinlock can simply fence a fast list_for_each_entry_safe routine. Provide two deliver list helpers for iommufd_fault_fops_read() to use: - Fetch the first iopf_group out of the fault->deliver list - Restore an iopf_group back to the head of the fault->deliver list Lastly, move the mutex closer to the response in the fault structure, and update its kdoc accordingly. Fixes: 07838f7fd529 ("iommufd: Add iommufd fault object") Link: https://patch.msgid.link/r/20250117192901.79491-1-nicolinc@nvidia.com Cc: stable@vger.kernel.org Suggested-by: Jason Gunthorpe Reviewed-by: Kevin Tian Reviewed-by: Lu Baolu Reviewed-by: Jason Gunthorpe Signed-off-by: Nicolin Chen Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/fault.c | 34 +++++++++++++++++++++------------ drivers/iommu/iommufd/iommufd_private.h | 29 ++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 14 deletions(-) commit 4783ce32b0806911287f35cc65b799876d6f9547 Author: Valentina Fernandez Date: Tue Dec 17 11:31:32 2024 +0000 riscv: export __cpuid_to_hartid_map EXPORT_SYMBOL_GPL() is missing for __cpuid_to_hartid_map array. Export this symbol to allow drivers compiled as modules to use cpuid_to_hartid_map(). Signed-off-by: Valentina Fernandez Acked-by: Conor Dooley Signed-off-by: Jassi Brar arch/riscv/kernel/smp.c | 1 + 1 file changed, 1 insertion(+) commit c1382852330ee2e78d884bab2da25b880488fa1c Author: Valentina Fernandez Date: Tue Dec 17 11:31:31 2024 +0000 riscv: sbi: vendorid_list: Add Microchip Technology to the vendor list Add Microchip Technology to the RISC-V vendor list. Signed-off-by: Valentina Fernandez Acked-by: Conor Dooley Signed-off-by: Jassi Brar arch/riscv/include/asm/vendorid_list.h | 1 + 1 file changed, 1 insertion(+) commit 16c8d7586c196cddcc8822a946ef03c9cfabae30 Author: Rafael J. Wysocki Date: Mon Jan 20 17:08:50 2025 +0100 cpuidle: teo: Skip sleep length computation for low latency constraints If the idle state exit latency constraint is sufficiently low, it is better to avoid the additional latency related to calling tick_nohz_get_sleep_length(). It is also not necessary to compute the sleep length in that case because shallow idle state selection will be forced then regardless of the recent wakeup history. Accordingly, skip the sleep length computation and subsequent checks of the exit latency constraint is low enough. Signed-off-by: Rafael J. Wysocki Reviewed-by: Christian Loehle Link: https://patch.msgid.link/6122398.lOV4Wx5bFT@rjwysocki.net drivers/cpuidle/governors/teo.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 65e18e6544751ac25dc284794566ee90d65a379e Author: Rafael J. Wysocki Date: Mon Jan 13 19:51:59 2025 +0100 cpuidle: teo: Replace time_span_ns with a flag After recent updates, the time_span_ns field in struct teo_cpu has become an indicator on whether or not the most recent wakeup has been "genuine" which may as well be indicated by a bool field without calling local_clock(), so update the code accordingly. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Christian Loehle Tested-by: Aboorva Devarajan Tested-by: Christian Loehle Link: https://patch.msgid.link/6010475.MhkbZ0Pkbq@rjwysocki.net drivers/cpuidle/governors/teo.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) commit ddcfa7964677b1298712edb931a98ac25ffd2fb6 Author: Rafael J. Wysocki Date: Mon Jan 13 19:50:23 2025 +0100 cpuidle: teo: Simplify handling of total events count Instead of computing the total events count from scratch every time, decay it and add a PULSE value to it in teo_update(). No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Christian Loehle Tested-by: Aboorva Devarajan Tested-by: Christian Loehle Link: https://patch.msgid.link/9388883.CDJkKcVGEf@rjwysocki.net drivers/cpuidle/governors/teo.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 13ed5c4a6d9c91755227b7b0fab7b2543f6adfd2 Author: Rafael J. Wysocki Date: Mon Jan 13 19:48:47 2025 +0100 cpuidle: teo: Skip getting the sleep length if wakeups are very frequent Commit 6da8f9ba5a87 ("cpuidle: teo: Skip tick_nohz_get_sleep_length() call in some cases") attempted to reduce the governor overhead in some cases by making it avoid obtaining the sleep length (the time till the next timer event) which may be costly. Among other things, after the above commit, tick_nohz_get_sleep_length() was not called any more when idle state 0 was to be returned, which turned out to be problematic and the previous behavior in that respect was restored by commit 4b20b07ce72f ("cpuidle: teo: Don't count non- existent intercepts"). However, commit 6da8f9ba5a87 also caused the governor to avoid calling tick_nohz_get_sleep_length() on systems where idle state 0 is a "polling" one (that is, it is not really an idle state, but a loop continuously executed by the CPU) when the target residency of the idle state to be returned was low enough, so there was no practical need to refine the idle state selection in any way. This change was not removed by the other commit, so now on systems where idle state 0 is a "polling" one, tick_nohz_get_sleep_length() is called when idle state 0 is to be returned, but it is not called when a deeper idle state with sufficiently low target residency is to be returned. That is arguably confusing and inconsistent. Moreover, there is no specific reason why the behavior in question should depend on whether or not idle state 0 is a "polling" one. One way to address this would be to make the governor always call tick_nohz_get_sleep_length() to obtain the sleep length, but that would effectively mean reverting commit 6da8f9ba5a87 and restoring the latency issue that was the reason for doing it. This approach is thus not particularly attractive. To address it differently, notice that if a CPU is woken up very often, this is not likely to be caused by timers in the first place (user space has a default timer slack of 50 us and there are relatively few timers with a deadline shorter than several microseconds in the kernel) and even if it were the case, the potential benefit from using a deep idle state would then be questionable for latency reasons. Therefore, if the majority of CPU wakeups occur within several microseconds, it can be assumed that all wakeups in that range are non-timer and the sleep length need not be determined. Accordingly, introduce a new metric for counting wakeups with the measured idle duration below RESIDENCY_THRESHOLD_NS and modify the idle state selection to skip the tick_nohz_get_sleep_length() invocation if idle state 0 has been selected or the target residency of the candidate idle state is below RESIDENCY_THRESHOLD_NS and the value of the new metric is at least 1/2 of the total event count. Since the above requires the measured idle duration to be determined every time, except for the cases when one of the safety nets has triggered in which the wakeup is counted as a hit in the deepest idle state idle residency range, update the handling of those cases to avoid skipping the idle duration computation when the CPU wakeup is "genuine". Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/3851791.kQq0lBPeGt@rjwysocki.net Tested-by: Aboorva Devarajan Tested-by: Christian Loehle Reviewed-by: Christian Loehle [ rjw: Renamed a struct field ] [ rjw: Fixed typo in the subject and one in a comment ] Signed-off-by: Rafael J. Wysocki drivers/cpuidle/governors/teo.c | 58 +++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 22 deletions(-) commit d619b5cc678024fa5ed7eb3702c3991a2aa96823 Author: Rafael J. Wysocki Date: Mon Jan 13 19:45:50 2025 +0100 cpuidle: teo: Simplify counting events used for tick management Replace the tick_hits metric with a new tick_intercepts one that can be used directly when deciding whether or not to stop the scheduler tick and update the governor functional description accordingly. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Christian Loehle Tested-by: Aboorva Devarajan Tested-by: Christian Loehle Link: https://patch.msgid.link/1987985.PYKUYFuaPT@rjwysocki.net drivers/cpuidle/governors/teo.c | 49 ++++++++++++----------------------------- 1 file changed, 14 insertions(+), 35 deletions(-) commit e24f8a55de509ba26726f094e084d90428cbcf26 Author: Rafael J. Wysocki Date: Mon Jan 13 19:41:55 2025 +0100 cpuidle: teo: Clarify two code comments Rewrite two code comments suposed to explain its behavior that are too concise or not sufficiently clear. No functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Christian Loehle Tested-by: Aboorva Devarajan Tested-by: Christian Loehle Link: https://patch.msgid.link/8472971.T7Z3S40VBb@rjwysocki.net [ rjw: Fixed 2 typos in new comments ] Signed-off-by: Rafael J. Wysocki drivers/cpuidle/governors/teo.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit b9a6af26bd83fb23d15c53b1ce63df77dda15513 Author: Rafael J. Wysocki Date: Mon Jan 13 19:40:49 2025 +0100 cpuidle: teo: Drop local variable prev_intercept_idx Local variable prev_intercept_idx in teo_select() is redundant because it cannot be 0 when candidate state index is 0. The prev_intercept_idx value is the index of the deepest enabled idle state, so if it is 0, state 0 is the deepest enabled idle state, in which case it must be the only enabled idle state, but then teo_select() would have returned early before initializing prev_intercept_idx. Thus prev_intercept_idx must be nonzero and the check of it against 0 always passes, so it can be dropped altogether. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Christian Loehle Tested-by: Aboorva Devarajan Tested-by: Christian Loehle Link: https://patch.msgid.link/3327997.aeNJFYEL58@rjwysocki.net [ rjw: Fixed typo in the changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpuidle/governors/teo.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit ea185406d1ed90493ef0868a03ddcb6b2701b11b Author: Rafael J. Wysocki Date: Mon Jan 13 19:39:00 2025 +0100 cpuidle: teo: Combine candidate state index checks against 0 There are two candidate state index checks against 0 in teo_select() that need not be separate, so combine them and update comments around them. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Christian Loehle Tested-by: Aboorva Devarajan Tested-by: Christian Loehle Link: https://patch.msgid.link/13676346.uLZWGnKmhe@rjwysocki.net drivers/cpuidle/governors/teo.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 92ce5c07b7a1913246fd5492aee52db8a0c66f55 Author: Rafael J. Wysocki Date: Mon Jan 13 19:36:57 2025 +0100 cpuidle: teo: Reorder candidate state index checks Since constraint_idx may be 0, the candidate state index may change to 0 after assigning constraint_idx to it, so first check if it is greater than constraint_idx (and update it if so) and then check it against 0. Signed-off-by: Rafael J. Wysocki Reviewed-by: Christian Loehle Tested-by: Aboorva Devarajan Tested-by: Christian Loehle Link: https://patch.msgid.link/1907276.tdWV9SEqCh@rjwysocki.net drivers/cpuidle/governors/teo.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 425b753645767049f1a3eab02f39120c02156b72 Author: Rafael J. Wysocki Date: Mon Jan 13 19:34:22 2025 +0100 cpuidle: teo: Rearrange idle state lookup code Rearrange code in the idle state lookup loop in teo_select() to make it somewhat easier to follow and update comments around it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Christian Loehle Tested-by: Aboorva Devarajan Tested-by: Christian Loehle Link: https://patch.msgid.link/4619938.LvFx2qVVIh@rjwysocki.net drivers/cpuidle/governors/teo.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) commit 8514d8f80e5cc87eb68ec037857fcd64d9c0bc68 Merge: 1256961d865c fee89ddd76e4 Author: Takashi Iwai Date: Mon Jan 20 16:15:07 2025 +0100 Merge tag 'asoc-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v6.14 This was quite a quiet release for what I imagine are holiday related reasons, the diffstat is dominated by some Cirrus Logic Kunit tests. There's the usual mix of small improvements and fixes, plus a few new drivers and features. The diffstat includes some DRM changes due to work on HDMI audio. - Allow clocking on each DAI in an audio graph card to be configured separately. - Improved power management for Renesas RZ-SSI. - KUnit testing for the Cirrus DSP framework. - Memory to meory operation support for Freescale/NXP platforms. - Support for pause operations in SOF. - Support for Allwinner suinv F1C100s, Awinc AW88083, Realtek ALC5682I-VE commit da8146ce615ad49ca4d873c1028b1b6fb0bba910 Author: Zhang Yi Date: Mon Jan 20 18:17:58 2025 +0800 ASoC: codecs: ES8326: Improved PSRR Modified configuration to improve PSSR when ES8326 is working Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20250120101758.13347-1-zhangyi@everest-semi.com Signed-off-by: Mark Brown sound/soc/codecs/es8326.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit abe01a78bfc8be9cc025a73b991c4e77431de9de Author: Shengjiu Wang Date: Mon Jan 20 16:19:38 2025 +0800 ASoC: fsl_asrc_m2m: return error value in asrc_m2m_device_run() The asrc_m2m_device_run() function is the main process function of converting, the error need to be returned to user, that user can handle error case properly. Fixes: 24a01710f627 ("ASoC: fsl_asrc_m2m: Add memory to memory function") Signed-off-by: Shengjiu Wang Reviewed-by: Daniel Baluta Link: https://patch.msgid.link/20250120081938.2501554-3-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc_m2m.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit d12ca6d4c31bf974ecc80e36761488f41d05d18b Author: Shengjiu Wang Date: Mon Jan 20 16:19:37 2025 +0800 ASoC: fsl_asrc_m2m: only handle pairs for m2m in the suspend ASRC memory to memory cases and memory to peripheral cases are sharing the same pair pools, the pairs got for m2m suspend function may be used for memory to peripheral, which is handled memory to peripheral driver and can't be handled in memory to memory suspend function. Use the "pair->dma_buffer" as a flag for memory to memory case, when it is allocated, handle the suspend operation for the related pairs. Fixes: 24a01710f627 ("ASoC: fsl_asrc_m2m: Add memory to memory function") Signed-off-by: Shengjiu Wang Reviewed-by: Daniel Baluta Link: https://patch.msgid.link/20250120081938.2501554-2-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc_m2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1256961d865cb6e8ab131351283036117f895283 Author: Nathan Chancellor Date: Mon Jan 20 06:32:48 2025 -0700 ALSA: hda: tas2781-spi: Fix -Wsometimes-uninitialized in tasdevice_spi_switch_book() Clang warns (or errors with CONFIG_WERROR=y): sound/pci/hda/tas2781_hda_spi.c:110:6: error: variable 'ret' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] 110 | if (tas_priv->cur_book != TASDEVICE_BOOK_ID(reg)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/pci/hda/tas2781_hda_spi.c:119:9: note: uninitialized use occurs here 119 | return ret; | ^~~ sound/pci/hda/tas2781_hda_spi.c:110:2: note: remove the 'if' if its condition is always true 110 | if (tas_priv->cur_book != TASDEVICE_BOOK_ID(reg)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/pci/hda/tas2781_hda_spi.c:108:9: note: initialize the variable 'ret' to silence this warning 108 | int ret; | ^ | = 0 Sink the declaration of ret into the if block and just return 0 at the end of the function, as there is nothing to do if cur_book has already been changed. Fixes: bb5f86ea50ff ("ALSA: hda/tas2781: Add tas2781 hda SPI driver") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501192006.Hm9GmKiV-lkp@intel.com/ Signed-off-by: Nathan Chancellor Link: https://patch.msgid.link/20250120-tas2781_hda_spi-fix-wsometimes-uninitialized-v1-1-d7fd104aa63e@kernel.org Signed-off-by: Takashi Iwai sound/pci/hda/tas2781_hda_spi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 49dcb50d6ce33320c28f572f90a9bb9c33d92042 Merge: ed2ec63d3faa 477fb0671feb Author: Petr Mladek Date: Mon Jan 20 14:25:01 2025 +0100 Merge branch 'for-6.14/selftests-trivial' into for-linus commit 4859bcd7a5bb2fda9660cb48ab41d9c5e4e1a6ec Merge: 3d6f83df8ff2 0161e2d6950f Author: Petr Mladek Date: Mon Jan 20 13:40:52 2025 +0100 Merge branch 'for-6.14-cpu_sync-fixup' into for-linus commit 64ff63aeefb03139ae27454bd4208244579ae88e Author: Aleksander Jan Bajkowski Date: Fri Jan 17 23:24:21 2025 +0100 net: phy: realtek: HWMON support for standalone versions of RTL8221B and RTL8251 HWMON support has been added for the RTL8221/8251 PHYs integrated together with the MAC inside the RTL8125/8126 chips. This patch extends temperature reading support for standalone variants of the mentioned PHYs. I don't know whether the earlier revisions of the RTL8226 also have a built-in temperature sensor, so they have been skipped for now. Tested on RTL8221B-VB-CG. Signed-off-by: Aleksander Jan Bajkowski Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/realtek/realtek_main.c | 5 +++++ 1 file changed, 5 insertions(+) commit 25c1a9ca53db5780757e7f53e688b8f916821baa Author: Mahdi Arghavani Date: Fri Jan 17 21:37:51 2025 +0000 tcp_cubic: fix incorrect HyStart round start detection I noticed that HyStart incorrectly marks the start of rounds, leading to inaccurate measurements of ACK train lengths and resetting the `ca->sample_cnt` variable. This inaccuracy can impact HyStart's functionality in terminating exponential cwnd growth during Slow-Start, potentially degrading TCP performance. The issue arises because the changes introduced in commit 4e1fddc98d25 ("tcp_cubic: fix spurious Hystart ACK train detections for not-cwnd-limited flows") moved the caller of the `bictcp_hystart_reset` function inside the `hystart_update` function. This modification added an additional condition for triggering the caller, requiring that (tcp_snd_cwnd(tp) >= hystart_low_window) must also be satisfied before invoking `bictcp_hystart_reset`. This fix ensures that `bictcp_hystart_reset` is correctly called at the start of a new round, regardless of the congestion window size. This is achieved by moving the condition (tcp_snd_cwnd(tp) >= hystart_low_window) from before calling `bictcp_hystart_reset` to after it. I tested with a client and a server connected through two Linux software routers. In this setup, the minimum RTT was 150 ms, the bottleneck bandwidth was 50 Mbps, and the bottleneck buffer size was 1 BDP, calculated as (50M / 1514 / 8) * 0.150 = 619 packets. I conducted the test twice, transferring data from the server to the client for 1.5 seconds. Before the patch was applied, HYSTART-DELAY stopped the exponential growth of cwnd when cwnd = 516, and the bottleneck link was not yet saturated (516 < 619). After the patch was applied, HYSTART-ACK-TRAIN stopped the exponential growth of cwnd when cwnd = 632, and the bottleneck link was saturated (632 > 619). In this test, applying the patch resulted in 300 KB more data delivered. Fixes: 4e1fddc98d25 ("tcp_cubic: fix spurious Hystart ACK train detections for not-cwnd-limited flows") Signed-off-by: Mahdi Arghavani Reviewed-by: Jason Xing Cc: Neal Cardwell Cc: Eric Dumazet Cc: Haibo Zhang Cc: David Eyers Cc: Abbas Arghavani Reviewed-by: Neal Cardwell Tested-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_cubic.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 457bb7970a0f10effd6b4ca9e1057727963c473a Author: Ales Nezbeda Date: Fri Jan 17 12:22:28 2025 +0100 net: macsec: Add endianness annotations in salt struct This change resolves warning produced by sparse tool as currently there is a mismatch between normal generic type in salt and endian annotated type in macsec driver code. Endian annotated types should be used here. Sparse output: warning: restricted ssci_t degrades to integer warning: incorrect type in assignment (different base types) expected restricted ssci_t [usertype] ssci got unsigned int warning: restricted __be64 degrades to integer warning: incorrect type in assignment (different base types) expected restricted __be64 [usertype] pn got unsigned long long Signed-off-by: Ales Nezbeda Reviewed-by: Simon Horman Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller include/net/macsec.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5fe71fda89745fc3cd95f70d06e9162b595c3702 Author: Dan Carpenter Date: Fri Jan 17 12:36:14 2025 +0300 tipc: re-order conditions in tipc_crypto_key_rcv() On a 32bit system the "keylen + sizeof(struct tipc_aead_key)" math could have an integer wrapping issue. It doesn't matter because the "keylen" is checked on the next line, but just to make life easier for static analysis tools, let's re-order these conditions and avoid the integer overflow. Signed-off-by: Dan Carpenter Reviewed-by: Simon Horman Signed-off-by: David S. Miller net/tipc/crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit af10e092b77aaa11f056765d979e9be7e8276a3a Author: Russell King (Oracle) Date: Fri Jan 17 08:44:25 2025 +0000 net: phylink: always do a major config when attaching a SFP PHY Background: https://lore.kernel.org/r/20250107123615.161095-1-ericwouds@gmail.com Since adding negotiation of in-band capabilities, it is no longer sufficient to just look at the MLO_AN_xxx mode and PHY interface to decide whether to do a major configuration, since the result now depends on the capabilities of the attaching PHY. Always trigger a major configuration in this case. Testing log: https://lore.kernel.org/r/f20c9744-3953-40e7-a9c9-5534b25d2e2a@gmail.com Reported-by: Eric Woudstra Tested-by: Eric Woudstra Signed-off-by: Russell King (Oracle) Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 3ef4ea516c2f8a2f1ff8ca59b156fb2e4472c2a4 Author: Armin Wolf Date: Sun Jan 19 21:17:23 2025 +0100 platform/x86: acer-wmi: Fix initialization of last_non_turbo_profile On machines that do not support the balanced profile the value of last_non_turbo_profile is invalid after initialization which might cause the driver to switch to an unsupported platform profile later. Fix this by only setting last_non_turbo_profile to supported platform profile values. Fixes: 191e21f1a4c3 ("platform/x86: acer-wmi: use an ACPI bitmap to set the platform profile choices") Signed-off-by: Armin Wolf Tested-by: Hridesh MG Reviewed-by: Hridesh MG Link: https://lore.kernel.org/r/20250119201723.11102-3-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/acer-wmi.c | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) commit f6bfa25c6665f8721421ea94fe506cc22f1d4b43 Author: Armin Wolf Date: Sun Jan 19 21:17:22 2025 +0100 platform/x86: acer-wmi: Ignore AC events On the Acer Swift SFG14-41, the events 8 - 1 and 8 - 0 are printed on AC connect/disconnect. Ignore those events to avoid spamming the kernel log with error messages. Reported-by: Farhan Anwar Closes: https://lore.kernel.org/platform-driver-x86/2ffb529d-e7c8-4026-a3b8-120c8e7afec8@gmail.com Tested-by: Rayan Margham Reviewed-by: Ilpo Järvinen Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20250119201723.11102-2-W_Armin@gmx.de Signed-off-by: Ilpo Järvinen drivers/platform/x86/acer-wmi.c | 4 ++++ 1 file changed, 4 insertions(+) commit 86eb1aef7279ec68fe9b7a44685efc09aa56a8f0 Merge: 3eba032bb720 7c5480386300 Author: Paolo Bonzini Date: Mon Jan 20 07:15:58 2025 -0500 Merge branch 'kvm-mirror-page-tables' into HEAD As part of enabling TDX virtual machines, support support separation of private/shared EPT into separate roots. Confidential computing solutions almost invariably have concepts of private and shared memory, but they may different a lot in the details. In SEV, for example, the bit is handled more like a permission bit as far as the page tables are concerned: the private/shared bit is not included in the physical address. For TDX, instead, the bit is more like a physical address bit, with the host mapping private memory in one half of the address space and shared in another. Furthermore, the two halves are mapped by different EPT roots and only the shared half is managed by KVM; the private half (also called Secure EPT in Intel documentation) gets managed by the privileged TDX Module via SEAMCALLs. As a result, the operations that actually change the private half of the EPT are limited and relatively slow compared to reading a PTE. For this reason the design for KVM is to keep a mirror of the private EPT in host memory. This allows KVM to quickly walk the EPT and only perform the slower private EPT operations when it needs to actually modify mid-level private PTEs. There are thus three sets of EPT page tables: external, mirror and direct. In the case of TDX (the only user of this framework) the first two cover private memory, whereas the third manages shared memory: external EPT - Hidden within the TDX module, modified via TDX module calls. mirror EPT - Bookkeeping tree used as an optimization by KVM, not used by the processor. direct EPT - Normal EPT that maps unencrypted shared memory. Managed like the EPT of a normal VM. Modifying external EPT ---------------------- Modifications to the mirrored page tables need to also perform the same operations to the private page tables, which will be handled via kvm_x86_ops. Although this prep series does not interact with the TDX module at all to actually configure the private EPT, it does lay the ground work for doing this. In some ways updating the private EPT is as simple as plumbing PTE modifications through to also call into the TDX module; however, the locking is more complicated because inserting a single PTE cannot anymore be done atomically with a single CMPXCHG. For this reason, the existing FROZEN_SPTE mechanism is used whenever a call to the TDX module updates the private EPT. FROZEN_SPTE acts basically as a spinlock on a PTE. Besides protecting operation of KVM, it limits the set of cases in which the TDX module will encounter contention on its own PTE locks. Zapping external EPT -------------------- While the framework tries to be relatively generic, and to be understandable without knowing TDX much in detail, some requirements of TDX sometimes leak; for example the private page tables also cannot be zapped while the range has anything mapped, so the mirrored/private page tables need to be protected from KVM operations that zap any non-leaf PTEs, for example kvm_mmu_reset_context() or kvm_mmu_zap_all_fast(). For normal VMs, guest memory is zapped for several reasons: user memory getting paged out by the guest, memslots getting deleted, passthrough of devices with non-coherent DMA. Confidential computing adds to these the conversion of memory between shared and privates. These operations must not zap any private memory that is in use by the guest. This is possible because the only zapping that is out of the control of KVM/userspace is paging out userspace memory, which cannot apply to guestmemfd operations. Thus a TDX VM will only zap private memory from memslot deletion and from conversion between private and shared memory which is triggered by the guest. To avoid zapping too much memory, enums are introduced so that operations can choose to target only private or shared memory, and thus only direct or mirror EPT. For example: Memslot deletion - Private and shared MMU notifier based zapping - Shared only Conversion to shared - Private only Conversion to private - Shared only Other cases of zapping will not be supported for KVM, for example APICv update or non-coherent DMA status update; for the latter, TDX will simply require that the CPU supports self-snoop and honor guest PAT unconditionally for shared memory. commit 68e6b7d98bc64bbf1a54d963ca85111432f3a0b4 Author: Christian Brauner Date: Mon Jan 20 12:56:10 2025 +0100 samples/vfs: fix build warnings Fix build warnings reported from linux-next. Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20250120192504.4a1965a0@canb.auug.org.au Signed-off-by: Christian Brauner samples/vfs/test-list-all-mounts.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit ff44b1ca889f9ddc401daf375f8ee15a16f6d394 Author: Ai Chao Date: Thu Jan 16 16:11:29 2025 +0800 platform/mellanox: mlxreg-io: use sysfs_emit() instead of sprintf() 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: Ai Chao Acked-by: Vadim Pasternak Link: https://lore.kernel.org/r/20250116081129.2902274-1-aichao@kylinos.cn Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/mellanox/mlxreg-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcf1b6f8d8248b4c79e5f7c506010d389f1e4f16 Author: Ai Chao Date: Thu Jan 16 16:10:00 2025 +0800 platform/mellanox: mlxreg-hotplug: use sysfs_emit() instead of sprintf() 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: Ai Chao Acked-by: Vadim Pasternak Link: https://lore.kernel.org/r/20250116081000.2900435-1-aichao@kylinos.cn Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/mellanox/mlxreg-hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9886f575de5aefcfab537467c72e5176e5301df0 Author: Ai Chao Date: Thu Jan 16 16:08:35 2025 +0800 platform/mellanox: mlxbf-bootctl: use sysfs_emit() instead of sprintf() 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: Ai Chao Acked-by: Vadim Pasternak Link: https://lore.kernel.org/r/20250116080836.2890442-1-aichao@kylinos.cn Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/mellanox/mlxbf-bootctl.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 6e4ab59b8391a248398951035b544f97fe5d9dc3 Author: Julien ROBIN Date: Thu Jan 16 23:20:23 2025 +0100 platform/x86: hp-wmi: Add fan and thermal profile support for Victus 16-s1000 The following patch adds support for HP Victus 16-s1000 laptop series, by adding and fixing the following functionalities, which can be accessed through hwmon and platform_profile sysfs: - Functional measured fan speed reading - Ability to enable and disable maximum fan speed - Platform profiles full setting ability for CPU and GPU It sets appropriates CPU and GPU power settings both on AC and battery power sources, for low-power, balanced and performance modes. It has been thoroughly tested on a 16-s1034nf laptop based on a 8C9C DMI board name, and behavior of the driver on previous boards is left untouched thanks to the separated lists of DMI board names. Signed-off-by: Julien ROBIN Link: https://lore.kernel.org/r/1c00f906-8500-41d5-be80-f9092b6a49f1@free.fr Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/hp/hp-wmi.c | 366 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 355 insertions(+), 11 deletions(-) commit 2dc748695568a02199e813d408a8f6f58919f4bd Merge: 0ac66e512f13 207a792d0160 Author: Rafael J. Wysocki Date: Mon Jan 20 13:10:15 2025 +0100 Merge branch 'thermal-intel' Merge updates of Intel thermal drivers for 6.14: - Add support for Panther Lake processors in multiple places (Zhang Rui, Srinivas Pandruvada). - Remove explicit user_space governor selection from Intel thermal drivers (Srinivas Pandruvada). * thermal-intel: thermal: intel: Fix compile issue when CONFIG_NET is not defined thermal: intel: int340x: Panther Lake power floor and workload hint support thermal: intel: int340x: Panther Lake DLVR support thermal: intel: Remove explicit user_space governor selection ACPI: DPTF: Support Panther Lake thermal: intel: int340x: processor: Enable MMIO RAPL for Panther Lake powercap: intel_rapl: Add support for Panther Lake platform commit 3eba032bb720931c6fe8ab3575d0c9bf05bcf8c5 Merge: 43f640f4b941 c50be1c9457d Author: Paolo Bonzini Date: Mon Jan 20 07:03:06 2025 -0500 Merge branch 'kvm-userspace-hypercall' into HEAD Make the completion of hypercalls go through the complete_hypercall function pointer argument, no matter if the hypercall exits to userspace or not. Previously, the code assumed that KVM_HC_MAP_GPA_RANGE specifically went to userspace, and all the others did not; the new code need not special case KVM_HC_MAP_GPA_RANGE and in fact does not care at all whether there was an exit to userspace or not. commit 43f640f4b941d0f31114d2e0bd9b70c86b7d84ca Merge: 4f7ff70c0599 af79caa83f6a Author: Paolo Bonzini Date: Mon Jan 20 07:01:17 2025 -0500 Merge tag 'kvm-riscv-6.14-1' of https://github.com/kvm-riscv/linux into HEAD KVM/riscv changes for 6.14 - Svvptc, Zabha, and Ziccrse extension support for Guest/VM - Virtualize SBI system suspend extension for Guest/VM - Trap related exit statstics as SBI PMU firmware counters for Guest/VM commit 251be0b542fd57efff4eda4ba5ec5b9e2d93ef41 Merge: f994c1cb6c43 84cf9e541ccc Author: Rafael J. Wysocki Date: Mon Jan 20 12:53:59 2025 +0100 Merge tag 'cpufreq-arm-updates-6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Merge ARM cpufreq updates for 6.14 from Viresh Kumar: "- Extended support for more SoCs in apple cpufreq driver (Hector Martin and Nick Chan). - Add new cpufreq driver for Airoha SoCs (Christian Marangi). - Fix using cpufreq-dt as module (Andreas Kemnade). - Minor fixes for Sparc, scmi, and Qcom drivers (Ethan Carter Edwards, Sibi Sankar and Manivannan Sadhasivam)." * tag 'cpufreq-arm-updates-6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: airoha: Add EN7581 CPUFreq SMCCC driver cpufreq: sparc: change kzalloc to kcalloc cpufreq: qcom: Implement clk_ops::determine_rate() for qcom_cpufreq* clocks cpufreq: qcom: Fix qcom_cpufreq_hw_recalc_rate() to query LUT if LMh IRQ is not available cpufreq: apple-soc: Add Apple A7-A8X SoC cpufreq support cpufreq: apple-soc: Set fallback transition latency to APPLE_DVFS_TRANSITION_TIMEOUT cpufreq: apple-soc: Increase cluster switch timeout to 400us cpufreq: apple-soc: Use 32-bit read for status register cpufreq: apple-soc: Allow per-SoC configuration of APPLE_DVFS_CMD_PS1 cpufreq: apple-soc: Drop setting the PS2 field on M2+ dt-bindings: cpufreq: apple,cluster-cpufreq: Add A7-A11, T2 compatibles dt-bindings: cpufreq: Document support for Airoha EN7581 CPUFreq cpufreq: fix using cpufreq-dt as module cpufreq: scmi: Register for limit change notifications commit 763fcb939971a6b0adce3407879dd0a1412256b5 Merge: 5bc55a333a2f b489e7946656 Author: Rafael J. Wysocki Date: Mon Jan 20 12:51:52 2025 +0100 Merge tag 'opp-updates-6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Merge OPP (Operating Performance Points) updates for 6.14 from Viresh Kumar: "- Minor cleanups / fixes (Dan Carpenter, Neil Armstrong, and Joe Hattori). - Implement dev_pm_opp_get_bw (Neil Armstrong). - Expose reference counting helpers (Viresh Kumar)." * tag 'opp-updates-6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: PM / OPP: Add reference counting helpers for Rust implementation OPP: OF: Fix an OF node leak in _opp_add_static_v2() OPP: fix dev_pm_opp_find_bw_*() when bandwidth table not initialized OPP: add index check to assert to avoid buffer overflow in _read_freq() opp: core: Fix off by one in dev_pm_opp_get_bw() opp: core: implement dev_pm_opp_get_bw commit f9d94f78a8749e15de8aeb2e281898aa980e62d9 Author: Christian Brauner Date: Mon Jan 20 12:41:24 2025 +0100 samples/vfs: use shared header Share some infrastructure between sample programs and fix a build failure that was reported. Reported-by: Sasha Levin Link: https://lore.kernel.org/r/Z42UkSXx0MS9qZ9w@lappy Link: https://qa-reports.linaro.org/lkft/sashal-linus-next/build/v6.13-rc7-511-g109a8e0fa9d6/testrun/26809210/suite/build/test/gcc-8-allyesconfig/log Signed-off-by: Christian Brauner samples/vfs/mountinfo.c | 13 +- samples/vfs/samples-vfs.h | 241 +++++++++++++++++++++++++++++++++++++ samples/vfs/test-list-all-mounts.c | 88 +------------- 3 files changed, 249 insertions(+), 93 deletions(-) commit 4f7ff70c0599bd4b90fef787045901b394655f06 Merge: 892e7b8c279a 4c20cd4cee92 Author: Paolo Bonzini Date: Mon Jan 20 06:49:39 2025 -0500 Merge tag 'kvm-x86-misc-6.14' of https://github.com/kvm-x86/linux into HEAD KVM x86 misc changes for 6.14: - Overhaul KVM's CPUID feature infrastructure to track all vCPU capabilities instead of just those where KVM needs to manage state and/or explicitly enable the feature in hardware. Along the way, refactor the code to make it easier to add features, and to make it more self-documenting how KVM is handling each feature. - Rework KVM's handling of VM-Exits during event vectoring; this plugs holes where KVM unintentionally puts the vCPU into infinite loops in some scenarios (e.g. if emulation is triggered by the exit), and brings parity between VMX and SVM. - Add pending request and interrupt injection information to the kvm_exit and kvm_entry tracepoints respectively. - Fix a relatively benign flaw where KVM would end up redoing RDPKRU when loading guest/host PKRU, due to a refactoring of the kernel helpers that didn't account for KVM's pre-checking of the need to do WRPKRU. commit 892e7b8c279a40dad047ec23d2efe51284e578df Merge: 672162a0d33f 37c3ddfe5238 Author: Paolo Bonzini Date: Mon Jan 20 06:48:53 2025 -0500 Merge tag 'kvm-x86-vmx-6.14' of https://github.com/kvm-x86/linux into HEAD KVM VMX changes for 6.14: - Fix a bug where KVM updates hardware's APICv cache of the highest ISR bit while L2 is active, while ultimately results in a hardware-accelerated L1 EOI effectively being lost. - Honor event priority when emulating Posted Interrupt delivery during nested VM-Enter by queueing KVM_REQ_EVENT instead of immediately handling the interrupt. - Drop kvm_x86_ops.hwapic_irr_update() as KVM updates hardware's APICv cache prior to every VM-Enter. - Rework KVM's processing of the Page-Modification Logging buffer to reap entries in the same order they were created, i.e. to mark gfns dirty in the same order that hardware marked the page/PTE dirty. - Misc cleanups. commit 672162a0d33f08e0c16fbbffd5b96199717ff45f Merge: cae083c4e7ce 4c334c68804a Author: Paolo Bonzini Date: Mon Jan 20 06:48:35 2025 -0500 Merge tag 'kvm-x86-svm-6.14' of https://github.com/kvm-x86/linux into HEAD KVM SVM changes for 6.14: - Macrofy the SEV=n version of the sev_xxx_guest() helpers so that the code is optimized away when building with less than brilliant compilers. - Remove a now-redundant TLB flush when guest CR4.PGE changes. - Use str_enabled_disabled() to replace open coded strings. commit cae083c4e7ce2123fa173d3551b3f6468d6d6f9c Merge: 7a9164dc69fd 2d5faa6a8402 Author: Paolo Bonzini Date: Mon Jan 20 06:36:55 2025 -0500 Merge tag 'kvm-x86-mmu-6.14' of https://github.com/kvm-x86/linux into HEAD KVM x86 MMU changes for 6.14: - Add a comment to kvm_mmu_do_page_fault() to explain why KVM performs a direct call to kvm_tdp_page_fault() when RETPOLINE is enabled. commit 7a9164dc69fd56d0f5c4af6fce6552837b2b0bad Merge: 4e4f38f84e68 01528db67f28 Author: Paolo Bonzini Date: Mon Jan 20 06:36:40 2025 -0500 Merge tag 'kvm-x86-vcpu_array-6.14' of https://github.com/kvm-x86/linux into HEAD KVM vcpu_array fixes and cleanups for 6.14: - Explicitly verify the target vCPU is online in kvm_get_vcpu() to fix a bug where KVM would return a pointer to a vCPU prior to it being fully online, and give kvm_for_each_vcpu() similar treatment to fix a similar flaw. - Wait for a vCPU to come online prior to executing a vCPU ioctl to fix a bug where userspace could coerce KVM into handling the ioctl on a vCPU that isn't yet onlined. - Gracefully handle xa_insert() failures even though such failuires should be impossible in practice. commit 4e4f38f84e68c6cf3bb2c70be949eb79cef01b7d Merge: 5cf32aff2088 0cc3cb2151f9 Author: Paolo Bonzini Date: Mon Jan 20 06:36:14 2025 -0500 Merge tag 'kvm-memslots-6.14' of https://github.com/kvm-x86/linux into HEAD KVM kvm_set_memory_region() cleanups and hardening for 6.14: - Add proper lockdep assertions when setting memory regions. - Add a dedicated API for setting KVM-internal memory regions. - Explicitly disallow all flags for KVM-internal memory regions. commit 45bd1c5ba7580f612e46f3c6cb430c64adfd0294 Author: 谢致邦 (XIE Zhibang) Date: Fri Jan 17 01:41:40 2025 +0000 net: appletalk: Drop aarp_send_probe_phase1() aarp_send_probe_phase1() used to work by calling ndo_do_ioctl of appletalk drivers ltpc or cops, but these two drivers have been removed since the following commits: commit 03dcb90dbf62 ("net: appletalk: remove Apple/Farallon LocalTalk PC support") commit 00f3696f7555 ("net: appletalk: remove cops support") Thus aarp_send_probe_phase1() no longer works, so drop it. (found by code inspection) Signed-off-by: 谢致邦 (XIE Zhibang) Signed-off-by: David S. Miller net/appletalk/aarp.c | 45 +++++++-------------------------------------- 1 file changed, 7 insertions(+), 38 deletions(-) commit 4395a44acb15850e492dd1de9ec4b6479d96bc80 Author: Roger Quadros Date: Thu Jan 16 15:54:49 2025 +0200 net: ethernet: ti: am65-cpsw: fix freeing IRQ in am65_cpsw_nuss_remove_tx_chns() When getting the IRQ we use k3_udma_glue_tx_get_irq() which returns negative error value on error. So not NULL check is not sufficient to deteremine if IRQ is valid. Check that IRQ is greater then zero to ensure it is valid. There is no issue at probe time but at runtime user can invoke .set_channels which results in the following call chain. am65_cpsw_set_channels() am65_cpsw_nuss_update_tx_rx_chns() am65_cpsw_nuss_remove_tx_chns() am65_cpsw_nuss_init_tx_chns() At this point if am65_cpsw_nuss_init_tx_chns() fails due to k3_udma_glue_tx_get_irq() then tx_chn->irq will be set to a negative value. Then, at subsequent .set_channels with higher channel count we will attempt to free an invalid IRQ in am65_cpsw_nuss_remove_tx_chns() leading to a kernel warning. The issue is present in the original commit that introduced this driver, although there, am65_cpsw_nuss_update_tx_rx_chns() existed as am65_cpsw_nuss_update_tx_chns(). Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Signed-off-by: Roger Quadros Reviewed-by: Simon Horman Reviewed-by: Siddharth Vadapalli Reviewed-by: Jacob Keller Signed-off-by: David S. Miller drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d002348789bc16e9203e9818b7a3688787e3b29 Author: Maksym Planeta Date: Wed Dec 4 11:35:15 2024 +0100 Grab mm lock before grabbing pt lock Function xen_pin_page calls xen_pte_lock, which in turn grab page table lock (ptlock). When locking, xen_pte_lock expect mm->page_table_lock to be held before grabbing ptlock, but this does not happen when pinning is caused by xen_mm_pin_all. This commit addresses lockdep warning below, which shows up when suspending a Xen VM. [ 3680.658422] Freezing user space processes [ 3680.660156] Freezing user space processes completed (elapsed 0.001 seconds) [ 3680.660182] OOM killer disabled. [ 3680.660192] Freezing remaining freezable tasks [ 3680.661485] Freezing remaining freezable tasks completed (elapsed 0.001 seconds) [ 3680.685254] [ 3680.685265] ================================== [ 3680.685269] WARNING: Nested lock was not taken [ 3680.685274] 6.12.0+ #16 Tainted: G W [ 3680.685279] ---------------------------------- [ 3680.685283] migration/0/19 is trying to lock: [ 3680.685288] ffff88800bac33c0 (ptlock_ptr(ptdesc)#2){+.+.}-{3:3}, at: xen_pin_page+0x175/0x1d0 [ 3680.685303] [ 3680.685303] but this task is not holding: [ 3680.685308] init_mm.page_table_lock [ 3680.685311] [ 3680.685311] stack backtrace: [ 3680.685316] CPU: 0 UID: 0 PID: 19 Comm: migration/0 Tainted: G W 6.12.0+ #16 [ 3680.685324] Tainted: [W]=WARN [ 3680.685328] Stopper: multi_cpu_stop+0x0/0x120 <- __stop_cpus.constprop.0+0x8c/0xd0 [ 3680.685339] Call Trace: [ 3680.685344] [ 3680.685347] dump_stack_lvl+0x77/0xb0 [ 3680.685356] __lock_acquire+0x917/0x2310 [ 3680.685364] lock_acquire+0xce/0x2c0 [ 3680.685369] ? xen_pin_page+0x175/0x1d0 [ 3680.685373] _raw_spin_lock_nest_lock+0x2f/0x70 [ 3680.685381] ? xen_pin_page+0x175/0x1d0 [ 3680.685386] xen_pin_page+0x175/0x1d0 [ 3680.685390] ? __pfx_xen_pin_page+0x10/0x10 [ 3680.685394] __xen_pgd_walk+0x233/0x2c0 [ 3680.685401] ? stop_one_cpu+0x91/0x100 [ 3680.685405] __xen_pgd_pin+0x5d/0x250 [ 3680.685410] xen_mm_pin_all+0x70/0xa0 [ 3680.685415] xen_pv_pre_suspend+0xf/0x280 [ 3680.685420] xen_suspend+0x57/0x1a0 [ 3680.685428] multi_cpu_stop+0x6b/0x120 [ 3680.685432] ? update_cpumasks_hier+0x7c/0xa60 [ 3680.685439] ? __pfx_multi_cpu_stop+0x10/0x10 [ 3680.685443] cpu_stopper_thread+0x8c/0x140 [ 3680.685448] ? smpboot_thread_fn+0x20/0x1f0 [ 3680.685454] ? __pfx_smpboot_thread_fn+0x10/0x10 [ 3680.685458] smpboot_thread_fn+0xed/0x1f0 [ 3680.685462] kthread+0xde/0x110 [ 3680.685467] ? __pfx_kthread+0x10/0x10 [ 3680.685471] ret_from_fork+0x2f/0x50 [ 3680.685478] ? __pfx_kthread+0x10/0x10 [ 3680.685482] ret_from_fork_asm+0x1a/0x30 [ 3680.685489] [ 3680.685491] [ 3680.685491] other info that might help us debug this: [ 3680.685497] 1 lock held by migration/0/19: [ 3680.685500] #0: ffffffff8284df38 (pgd_lock){+.+.}-{3:3}, at: xen_mm_pin_all+0x14/0xa0 [ 3680.685512] [ 3680.685512] stack backtrace: [ 3680.685518] CPU: 0 UID: 0 PID: 19 Comm: migration/0 Tainted: G W 6.12.0+ #16 [ 3680.685528] Tainted: [W]=WARN [ 3680.685531] Stopper: multi_cpu_stop+0x0/0x120 <- __stop_cpus.constprop.0+0x8c/0xd0 [ 3680.685538] Call Trace: [ 3680.685541] [ 3680.685544] dump_stack_lvl+0x77/0xb0 [ 3680.685549] __lock_acquire+0x93c/0x2310 [ 3680.685554] lock_acquire+0xce/0x2c0 [ 3680.685558] ? xen_pin_page+0x175/0x1d0 [ 3680.685562] _raw_spin_lock_nest_lock+0x2f/0x70 [ 3680.685568] ? xen_pin_page+0x175/0x1d0 [ 3680.685572] xen_pin_page+0x175/0x1d0 [ 3680.685578] ? __pfx_xen_pin_page+0x10/0x10 [ 3680.685582] __xen_pgd_walk+0x233/0x2c0 [ 3680.685588] ? stop_one_cpu+0x91/0x100 [ 3680.685592] __xen_pgd_pin+0x5d/0x250 [ 3680.685596] xen_mm_pin_all+0x70/0xa0 [ 3680.685600] xen_pv_pre_suspend+0xf/0x280 [ 3680.685607] xen_suspend+0x57/0x1a0 [ 3680.685611] multi_cpu_stop+0x6b/0x120 [ 3680.685615] ? update_cpumasks_hier+0x7c/0xa60 [ 3680.685620] ? __pfx_multi_cpu_stop+0x10/0x10 [ 3680.685625] cpu_stopper_thread+0x8c/0x140 [ 3680.685629] ? smpboot_thread_fn+0x20/0x1f0 [ 3680.685634] ? __pfx_smpboot_thread_fn+0x10/0x10 [ 3680.685638] smpboot_thread_fn+0xed/0x1f0 [ 3680.685642] kthread+0xde/0x110 [ 3680.685645] ? __pfx_kthread+0x10/0x10 [ 3680.685649] ret_from_fork+0x2f/0x50 [ 3680.685654] ? __pfx_kthread+0x10/0x10 [ 3680.685657] ret_from_fork_asm+0x1a/0x30 [ 3680.685662] [ 3680.685267] xen:grant_table: Grant tables using version 1 layout [ 3680.685921] OOM killer enabled. [ 3680.685934] Restarting tasks ... done. Signed-off-by: Maksym Planeta Reviewed-by: Juergen Gross Message-ID: <20241204103516.3309112-1-maksym@exostellar.io> Signed-off-by: Juergen Gross arch/x86/xen/mmu_pv.c | 4 ++++ 1 file changed, 4 insertions(+) commit 544c9394065fdbb733349bcd1464087d6e12d28e Author: Krzysztof Kozlowski Date: Wed Jan 15 20:47:03 2025 +0100 dsa: Use str_enable_disable-like helpers Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/pcs-639x.c | 3 ++- drivers/net/dsa/mv88e6xxx/port.c | 3 ++- drivers/net/dsa/realtek/rtl8366rb.c | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) commit a12c76a03386e32413ae8eaaefa337e491880632 Author: Xin Long Date: Wed Jan 15 09:27:54 2025 -0500 net: sched: refine software bypass handling in tc_run This patch addresses issues with filter counting in block (tcf_block), particularly for software bypass scenarios, by introducing a more accurate mechanism using useswcnt. Previously, filtercnt and skipswcnt were introduced by: Commit 2081fd3445fe ("net: sched: cls_api: add filter counter") and Commit f631ef39d819 ("net: sched: cls_api: add skip_sw counter") filtercnt tracked all tp (tcf_proto) objects added to a block, and skipswcnt counted tp objects with the skipsw attribute set. The problem is: a single tp can contain multiple filters, some with skipsw and others without. The current implementation fails in the case: When the first filter in a tp has skipsw, both skipswcnt and filtercnt are incremented, then adding a second filter without skipsw to the same tp does not modify these counters because tp->counted is already set. This results in bypass software behavior based solely on skipswcnt equaling filtercnt, even when the block includes filters without skipsw. Consequently, filters without skipsw are inadvertently bypassed. To address this, the patch introduces useswcnt in block to explicitly count tp objects containing at least one filter without skipsw. Key changes include: Whenever a filter without skipsw is added, its tp is marked with usesw and counted in useswcnt. tc_run() now uses useswcnt to determine software bypass, eliminating reliance on filtercnt and skipswcnt. This refined approach prevents software bypass for blocks containing mixed filters, ensuring correct behavior in tc_run(). Additionally, as atomic operations on useswcnt ensure thread safety and tp->lock guards access to tp->usesw and tp->counted, the broader lock down_write(&block->cb_lock) is no longer required in tc_new_tfilter(), and this resolves a performance regression caused by the filter counting mechanism during parallel filter insertions. The improvement can be demonstrated using the following script: # cat insert_tc_rules.sh tc qdisc add dev ens1f0np0 ingress for i in $(seq 16); do taskset -c $i tc -b rules_$i.txt & done wait Each of rules_$i.txt files above includes 100000 tc filter rules to a mlx5 driver NIC ens1f0np0. Without this patch: # time sh insert_tc_rules.sh real 0m50.780s user 0m23.556s sys 4m13.032s With this patch: # time sh insert_tc_rules.sh real 0m17.718s user 0m7.807s sys 3m45.050s Fixes: 047f340b36fc ("net: sched: make skip_sw actually skip software") Reported-by: Shuang Li Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Reviewed-by: Asbjørn Sloth Tønnesen Tested-by: Asbjørn Sloth Tønnesen Signed-off-by: David S. Miller include/net/pkt_cls.h | 13 +++++++++-- include/net/sch_generic.h | 5 ++--- net/core/dev.c | 15 ++++++++----- net/sched/cls_api.c | 57 +++++++++++++++++++---------------------------- net/sched/cls_bpf.c | 2 ++ net/sched/cls_flower.c | 2 ++ net/sched/cls_matchall.c | 2 ++ net/sched/cls_u32.c | 4 ++++ 8 files changed, 55 insertions(+), 45 deletions(-) commit 973d690416fcc31cad21ea7bd3bccac0e7f2ecca Merge: 5a68172a532e d2c342334141 c4c123504a65 Author: Jiri Kosina Date: Mon Jan 20 10:11:14 2025 +0100 Merge branches 'for-6.14/wacom' and 'for-6.14/wacom-pci' into for-linus - improvement of behavior for non-standard LED brightness values (Jason Gerecke) - PCI Wacom device supports (depends on Intel THC support) (Even Xu) commit 5a68172a532ef4f5556e3a4018fa80216184bd6b Merge: e24e31ea63d6 c7571e1a675d Author: Jiri Kosina Date: Mon Jan 20 10:07:30 2025 +0100 Merge branch 'for-6.14/uclogic' into for-linus - minor code cleanup (Colin Ian King) commit e24e31ea63d6cca7ef611bfbbe63a1a8c0be2c89 Merge: 068815efc7b4 ad8ef3dfceb3 Author: Jiri Kosina Date: Mon Jan 20 10:06:44 2025 +0100 Merge branch 'for-6.14/steelseries' into for-linus - SteelSeries Arctis 9 support (Christian Mayer) commit 068815efc7b41006363550480f57c5cfeb51004e Merge: cf6473b9470c 03ece9509700 Author: Jiri Kosina Date: Mon Jan 20 10:05:49 2025 +0100 Merge branch 'for-6.14/nintendo' into for-linus - support for MD/GEN 6B controller (Ryan McClelland) commit cf6473b9470c3398d496d69c817e61abf6700be9 Merge: 2ec37df77fa0 52e7d1f7c2fd Author: Jiri Kosina Date: Mon Jan 20 10:05:03 2025 +0100 Merge branch 'for-6.14/lenovo' into for-linus - improved support for Thinkpad-X12-TAB-1/2 (Vishnu Sankar) commit 2ec37df77fa06c39471a6f7a23b1011b0e2c4a3c Merge: 5a4b5f3d455c f1d3ad0ac143 Author: Jiri Kosina Date: Mon Jan 20 10:02:05 2025 +0100 Merge branch 'for-6.14/intel-thc' into for-linus - newly added support for Intel Touch Host Controller (Even Xu, Xinpeng Sun) commit 5a4b5f3d455cec041f56511c8544d30a95bf0e9d Merge: e91b496e9c6e b8842f202fec Author: Jiri Kosina Date: Mon Jan 20 10:01:13 2025 +0100 Merge branch 'for-6.14/intel-ish' into for-linus - dead code removal in intel-ish-hid driver (Dr. David Alan Gilbert) commit e91b496e9c6ea7ee60faed7d76a9bd250c8712ba Merge: 670af65d2ab4 64f2657b5793 Author: Jiri Kosina Date: Mon Jan 20 09:59:16 2025 +0100 Merge branch 'for-6.14/core' into for-linus - hid-core fix for long-standing cornercase of Resolution Multiplier not being present in any of the Logical Collections in the device HID report descriptor (Alan Stern) commit 670af65d2ab4a6a9bb72f014b080757e291ad3fe Merge: 53078a736fbc 1b1d865715e0 Author: Jiri Kosina Date: Mon Jan 20 09:58:12 2025 +0100 Merge branch 'for-6.14/constify-bin-attribute' into for-linus - constification of 'struct bin_attribute' in various HID driver (Thomas Weißschuh) commit f839f532c9b0f6195ac75164afab6ae15cc09091 Author: Sergio Miguéns Iglesias Date: Mon Dec 2 09:59:05 2024 +0100 xen: pcpu: remove unnecessary __ref annotation The __ref annotation has been there since many years now, but the reason why it has been added has been removed from the code long ago. [jgross: clarify commit message] Cc: Juergen Gross Cc: Stefano Stabellini Cc: Oleksandr Tyshchenko Cc: xen-devel@lists.xenproject.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergio Miguéns Iglesias Reviewed-by: Juergen Gross Message-ID: <20241202085910.5539-1-sergio@lony.xyz> Signed-off-by: Juergen Gross drivers/xen/pcpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e576e7843c0d65b82d4092e5b386d9fbf5bc10c3 Author: Ethan Carter Edwards Date: Sun Jan 19 20:10:30 2025 -0500 ALSA: ctxfi: Simplify dao_clear_{left,right}_input() functions There was a lote of code duplication in the dao_clear_left_input() and dao_clear_right_input() functions. A new function, dao_clear_input(), was created and now the left and right functions call it instead of repeating themselves. Link: https://lore.kernel.org/lkml/NyKCr2VHK_xCQDwNxFKKx2LVd2d_AC2f2j4eAvnD9uRPtb50i2AruCLOp6mHxsGiyYJ0Tgd3Z50Oy1JTi5gPhjd2WQM2skrv7asp3fLl8HU=@ethancedwards.com/ Signed-off-by: Ethan Carter Edwards Link: https://patch.msgid.link/x3glr6fetk7d7hlqimkv6g5krz2oibe7yusms3d7zk4ofrhlrx@75avihssncc5 Signed-off-by: Takashi Iwai sound/pci/ctxfi/ctdaio.c | 48 +++++++++++++----------------------------------- 1 file changed, 13 insertions(+), 35 deletions(-) commit 7bba999e939f6d20e4db66effeecc179ed896496 Merge: 8cd671d65b42 1a0f59b04c8c Author: Takashi Iwai Date: Mon Jan 20 09:25:33 2025 +0100 Merge branch 'for-linus' into for-next Pull pending ASoC and HD-audio fixes for 6.14-rc1 Signed-off-by: Takashi Iwai commit 98b34d52004b5a35db1c1b2c2133f52d67bede0f Author: Miquel Raynal Date: Thu Jan 16 10:35:27 2025 +0100 mtd: spinand: skyhigh: Align with recent read from cache variant changes The SPINAND_PAGE_READ_FROM_CACHE_OP macro has just been changed to stop encoding the "fast" parameter (the macro has been duplicated and renamed). The Skyhigh driver is new and is still using the old style macro. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501161302.bQqBGjJ5-lkp@intel.com/ Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/linux-kernel/20250116132010.4948547d@canb.auug.org.au/ Fixes: 042087247835d ("mtd: spinand: Create distinct fast and slow read from cache variants") Reviewed-by: Tudor Ambarus Signed-off-by: Miquel Raynal Tested-by: Stephen Rothwell # build tested drivers/mtd/nand/spi/skyhigh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 69146a8c893f734cefaac0af6f917f894f29077e Author: Zhihao Cheng Date: Mon Jan 20 12:38:24 2025 +0800 ubi: ubi_get_ec_info: Fix compiling error 'cast specifies array type' On risc V platform, there is a type conversion for the return value (unsigned long type) of __untagged_addr_remote() in function untagged_addr(). The compiler will complain when the parameter 'addr' is an array type: arch/riscv/include/asm/uaccess.h:33:9: error: cast specifies array type (__force __typeof__(addr))__untagged_addr_remote(current->mm, __addr) Fix it by converting the input parameter as a pointer. Fixes: 01099f635a4c ("ubi: Implement ioctl for detailed erase counters") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501191405.WYnmdL0U-lkp@intel.com/ Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger drivers/mtd/ubi/cdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8cd671d65b4255bb7ce368b4258ef4fd52798468 Author: Takashi Iwai Date: Mon Jan 20 08:46:54 2025 +0100 ALSA: hda: tas2781-spi: select CRC32 instead of CRC32_SARWATE Just like the I2C driver (as in commit 86c96e7289c5 "ALSA: hda/tas2781: select CRC32 instead of CRC32_SARWATE"), the new tas2781 SPI driver has to select CONFIG_CRC32 instead of CONFIG_CRC32_SARWATE for fixing the build failures. Fixes: bb5f86ea50ff ("ALSA: hda/tas2781: Add tas2781 hda SPI driver") Suggested-by: Eric Biggers Link: https://lore.kernel.org/20250120181744.6433557e@canb.auug.org.au Link: https://patch.msgid.link/20250120074655.922-1-tiwai@suse.de Signed-off-by: Takashi Iwai sound/pci/hda/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f95719b069dc6d04d752469a76285f3c52261a32 Author: Stephen Rothwell Date: Mon Jan 20 14:56:17 2025 +1100 ALSA: usb: fcp: Fix hwdep read ops types The FCP driver defined hwdep read function with ssize_t, but it should be long due to historical reason. This caused build errors on 32bit archs. Fixes: 46757a3e7d50 ("ALSA: FCP: Add Focusrite Control Protocol driver") Signed-off-by: Stephen Rothwell Link: https://patch.msgid.link/20250120145617.07945574@canb.auug.org.au Signed-off-by: Takashi Iwai sound/usb/fcp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1620c88887b16940e00dbe57dd38c74eda9bad9e Author: Steffen Klassert Date: Thu Jan 16 11:46:03 2025 +0100 xfrm: Fix the usage of skb->sk xfrm assumed to always have a full socket at skb->sk. This is not always true, so fix it by converting to a full socket before it is used. Signed-off-by: Steffen Klassert Reviewed-by: Eric Dumazet net/ipv4/esp4.c | 2 +- net/ipv6/esp6.c | 2 +- net/ipv6/xfrm6_output.c | 4 ++-- net/xfrm/xfrm_interface_core.c | 2 +- net/xfrm/xfrm_output.c | 7 ++++--- net/xfrm/xfrm_policy.c | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) commit 5293b5f97ea17814da1b88a807290c392823162b Merge: ffd294d346d1 ecdc475e0707 Author: Linus Torvalds Date: Sun Jan 19 21:28:57 2025 -0800 Merge branch 'vsnprintf' This merges the vsnprintf internal cleanups I did, which were triggered by a combination of performance issues (see for example commit f9ed1f7c2e26: "genirq/proc: Use seq_put_decimal_ull_width() for decimal values") and discussion about tracing abusing the vsnprintf code in odd ways. The intent was to improve code generation, but also to possibly eventually expose the cleaned-up printf format decoding state machine. It certainly didn't get to the point where we'd want to expose the format decoding to external users, but it's an improvement over what we used to have. Several of the complex case statements have been simplified, or removed entirely to be replaced by simple table lookups. * branch 'vsnprintf': vsnprintf: fix the number base for non-numeric formats vsnprintf: fix up kerneldoc for argument name changes vsprintf: don't make the 'binary' version pack small integer arguments vsnprintf: collapse the number format state into one single state vsnprintf: mark the indirect width and precision cases unlikely vsnprintf: inline skip_atoi() again vsprintf: deal with format specifiers with a lookup table vsprintf: deal with format flags with a simple lookup table vsprintf: associate the format state with the format pointer vsprintf: fix calling convention for format_decode() vsprintf: avoid nested switch statement on same variable vsprintf: simplify number handling commit b489e7946656ed67fea1a30f5103eb62a8686e04 Author: Viresh Kumar Date: Tue Jan 9 11:57:48 2024 +0530 PM / OPP: Add reference counting helpers for Rust implementation To ensure that resources such as OPP tables or OPP nodes are not freed while in use by the Rust implementation, it is necessary to increment their reference count from Rust code. This commit introduces a new helper function, dev_pm_opp_get_opp_table_ref(), to increment the reference count of an OPP table and declares the existing helper dev_pm_opp_get() in pm_opp.h. Signed-off-by: Viresh Kumar drivers/opp/core.c | 17 ++++++++++++----- drivers/opp/opp.h | 1 - include/linux/pm_opp.h | 6 ++++++ 3 files changed, 18 insertions(+), 6 deletions(-) commit 10e6fe53d90b550876bffc5847107c5372c01084 Author: Pali Rohár Date: Sat Dec 28 21:21:56 2024 +0100 cifs: Do not attempt to call CIFSGetSrvInodeNumber() without CAP_INFOLEVEL_PASSTHRU CIFSGetSrvInodeNumber() uses SMB_QUERY_FILE_INTERNAL_INFO (0x3ee) level which is SMB PASSTHROUGH level (>= 0x03e8). SMB PASSTHROUGH levels are supported only when server announce CAP_INFOLEVEL_PASSTHRU. So add guard in cifs_query_file_info() function which is the only user of CIFSGetSrvInodeNumber() function and returns -EOPNOTSUPP when server does not announce CAP_INFOLEVEL_PASSTHRU. Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/smb1ops.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e20a405fe4f240d94f1baaa0eaf816cbf16ffb60 Author: Pali Rohár Date: Fri Dec 27 16:04:38 2024 +0100 cifs: Do not attempt to call CIFSSMBRenameOpenFile() without CAP_INFOLEVEL_PASSTHRU CIFSSMBRenameOpenFile() uses SMB_SET_FILE_RENAME_INFORMATION (0x3f2) level which is SMB PASSTHROUGH level (>= 0x03e8). SMB PASSTHROUGH levels are supported only when server announce CAP_INFOLEVEL_PASSTHRU. All usage of CIFSSMBRenameOpenFile() execept the one is already guarded by checks which prevents calling it against servers without support for CAP_INFOLEVEL_PASSTHRU. The remaning usage without guard is in cifs_do_rename() function, so add missing guard here. Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/inode.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4bda5f4de03883913e9d0a4ce9a495aa918051ac Author: Pali Rohár Date: Wed Dec 25 18:04:55 2024 +0100 cifs: Remove declaration of dead CIFSSMBQuerySymLink function Function CIFSSMBQuerySymLink() was renamed to cifs_query_reparse_point() in commit ed3e0a149b58 ("smb: client: implement ->query_reparse_point() for SMB1"). Remove its dead declaration from header file too. Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/cifsproto.h | 3 --- 1 file changed, 3 deletions(-) commit 6d08851c601328025615d779c08753067ecefa34 Author: Pali Rohár Date: Thu Dec 26 14:27:16 2024 +0100 cifs: Fix printing Status code into dmesg NT Status code is 32-bit number, so for comparing two NT Status codes is needed to check all 32 bits, and not just low 24 bits. Before this change kernel printed message: "Status code returned 0x8000002d NT_STATUS_NOT_COMMITTED" It was incorrect as because NT_STATUS_NOT_COMMITTED is defined as 0xC000002d and 0x8000002d has defined name NT_STATUS_STOPPED_ON_SYMLINK. With this change kernel prints message: "Status code returned 0x8000002d NT_STATUS_STOPPED_ON_SYMLINK" Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/netmisc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 014fdae602c1dd23f967d539c8174d6aca689763 Author: Pali Rohár Date: Thu Dec 26 17:47:58 2024 +0100 cifs: Add missing NT_STATUS_* codes from nterr.h to nterr.c This allows cifs_print_status() to show string representation also for these error codes. Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/nterr.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4e2ee328291585b7224ac8cc025625841ccfbf03 Author: Pali Rohár Date: Wed Dec 25 15:54:22 2024 +0100 cifs: Fix endian types in struct rfc1002_session_packet All fields in struct rfc1002_session_packet are in big endian. This is because all NetBIOS packet headers are in big endian as opposite of SMB structures which are in little endian. Therefore use __be16 and __be32 types instead of __u16 and __u32 in struct rfc1002_session_packet. Reported-by: kernel test robot Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/rfc1002pdu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 015683d4ed0d23698c71f2194f09bd17dbfad044 Author: Pali Rohár Date: Thu Jan 2 21:38:48 2025 +0100 cifs: Use cifs_autodisable_serverino() for disabling CIFS_MOUNT_SERVER_INUM in readdir.c In all other places is used function cifs_autodisable_serverino() for disabling CIFS_MOUNT_SERVER_INUM mount flag. So use is also in readir.c _initiate_cifs_search() function. Benefit of cifs_autodisable_serverino() is that it also prints dmesg message that server inode numbers are being disabled. Fixes: ec06aedd4454 ("cifs: clean up handling when server doesn't consistently support inode numbers") Fixes: f534dc994397 ("cifs: clear server inode number flag while autodisabling") Signed-off-by: Pali Rohár Signed-off-by: Steve French fs/smb/client/readdir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72cf9e94f32fc18096be3cc21216a78f50220e03 Author: Steve French Date: Sun Jan 19 01:02:06 2025 -0600 smb3: add missing tracepoint for querying wsl EAs We had tracepoints for the return code for querying WSL EAs (trace_smb3_query_wsl_ea_compound_err and trace_smb3_query_wsl_ea_compound_done) but were missing one for trace_smb3_query_wsl_ea_compound_enter. Fixes: ea41367b2a60 ("smb: client: introduce SMB2_OP_QUERY_WSL_EA") Signed-off-by: Steve French fs/smb/client/smb2inode.c | 2 ++ fs/smb/client/trace.h | 1 + 2 files changed, 3 insertions(+) commit 11f8b80ab9f99291dc88d09855b9f8f43b772335 Author: Ruben Devos Date: Sat Jan 18 21:03:30 2025 +0100 smb: client: fix order of arguments of tracepoints The tracepoints based on smb3_inf_compound_*_class have tcon id and session id swapped around. This results in incorrect output in `trace-cmd report`. Fix the order of arguments to resolve this issue. The trace-cmd output below shows the before and after of the smb3_delete_enter and smb3_delete_done events as an example. The smb3_cmd_* events show the correct session and tcon id for reference. Also fix tracepoint set -> get in the SMB2_OP_GET_REPARSE case. BEFORE: rm-2211 [001] ..... 1839.550888: smb3_delete_enter: xid=281 sid=0x5 tid=0x3d path=\hello2.txt rm-2211 [001] ..... 1839.550894: smb3_cmd_enter: sid=0x1ac000000003d tid=0x5 cmd=5 mid=61 rm-2211 [001] ..... 1839.550896: smb3_cmd_enter: sid=0x1ac000000003d tid=0x5 cmd=6 mid=62 rm-2211 [001] ..... 1839.552091: smb3_cmd_done: sid=0x1ac000000003d tid=0x5 cmd=5 mid=61 rm-2211 [001] ..... 1839.552093: smb3_cmd_done: sid=0x1ac000000003d tid=0x5 cmd=6 mid=62 rm-2211 [001] ..... 1839.552103: smb3_delete_done: xid=281 sid=0x5 tid=0x3d AFTER: rm-2501 [001] ..... 3237.656110: smb3_delete_enter: xid=88 sid=0x1ac0000000041 tid=0x5 path=\hello2.txt rm-2501 [001] ..... 3237.656122: smb3_cmd_enter: sid=0x1ac0000000041 tid=0x5 cmd=5 mid=84 rm-2501 [001] ..... 3237.656123: smb3_cmd_enter: sid=0x1ac0000000041 tid=0x5 cmd=6 mid=85 rm-2501 [001] ..... 3237.657909: smb3_cmd_done: sid=0x1ac0000000041 tid=0x5 cmd=5 mid=84 rm-2501 [001] ..... 3237.657909: smb3_cmd_done: sid=0x1ac0000000041 tid=0x5 cmd=6 mid=85 rm-2501 [001] ..... 3237.657922: smb3_delete_done: xid=88 sid=0x1ac0000000041 tid=0x5 Cc: stable@vger.kernel.org Signed-off-by: Ruben Devos Signed-off-by: Steve French fs/smb/client/dir.c | 6 +-- fs/smb/client/smb2inode.c | 108 +++++++++++++++++++++++----------------------- 2 files changed, 57 insertions(+), 57 deletions(-) commit be7a6a77669588bfa5022a470989702bbbb11e7f Author: Paulo Alcantara Date: Thu Jan 16 14:29:03 2025 -0300 smb: client: fix oops due to unset link speed It isn't guaranteed that NETWORK_INTERFACE_INFO::LinkSpeed will always be set by the server, so the client must handle any values and then prevent oopses like below from happening: Oops: divide error: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 1323 Comm: cat Not tainted 6.13.0-rc7 #2 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-3.fc41 04/01/2014 RIP: 0010:cifs_debug_data_proc_show+0xa45/0x1460 [cifs] Code: 00 00 48 89 df e8 3b cd 1b c1 41 f6 44 24 2c 04 0f 84 50 01 00 00 48 89 ef e8 e7 d0 1b c1 49 8b 44 24 18 31 d2 49 8d 7c 24 28 <48> f7 74 24 18 48 89 c3 e8 6e cf 1b c1 41 8b 6c 24 28 49 8d 7c 24 RSP: 0018:ffffc90001817be0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff88811230022c RCX: ffffffffc041bd99 RDX: 0000000000000000 RSI: 0000000000000567 RDI: ffff888112300228 RBP: ffff888112300218 R08: fffff52000302f5f R09: ffffed1022fa58ac R10: ffff888117d2c566 R11: 00000000fffffffe R12: ffff888112300200 R13: 000000012a15343f R14: 0000000000000001 R15: ffff888113f2db58 FS: 00007fe27119e740(0000) GS:ffff888148600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe2633c5000 CR3: 0000000124da0000 CR4: 0000000000750ef0 PKRU: 55555554 Call Trace: ? __die_body.cold+0x19/0x27 ? die+0x2e/0x50 ? do_trap+0x159/0x1b0 ? cifs_debug_data_proc_show+0xa45/0x1460 [cifs] ? do_error_trap+0x90/0x130 ? cifs_debug_data_proc_show+0xa45/0x1460 [cifs] ? exc_divide_error+0x39/0x50 ? cifs_debug_data_proc_show+0xa45/0x1460 [cifs] ? asm_exc_divide_error+0x1a/0x20 ? cifs_debug_data_proc_show+0xa39/0x1460 [cifs] ? cifs_debug_data_proc_show+0xa45/0x1460 [cifs] ? seq_read_iter+0x42e/0x790 seq_read_iter+0x19a/0x790 proc_reg_read_iter+0xbe/0x110 ? __pfx_proc_reg_read_iter+0x10/0x10 vfs_read+0x469/0x570 ? do_user_addr_fault+0x398/0x760 ? __pfx_vfs_read+0x10/0x10 ? find_held_lock+0x8a/0xa0 ? __pfx_lock_release+0x10/0x10 ksys_read+0xd3/0x170 ? __pfx_ksys_read+0x10/0x10 ? __rcu_read_unlock+0x50/0x270 ? mark_held_locks+0x1a/0x90 do_syscall_64+0xbb/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fe271288911 Code: 00 48 8b 15 01 25 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 b5 a7 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:00007ffe87c079d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000040000 RCX: 00007fe271288911 RDX: 0000000000040000 RSI: 00007fe2633c6000 RDI: 0000000000000003 RBP: 00007ffe87c07a00 R08: 0000000000000000 R09: 00007fe2713e6380 R10: 0000000000000022 R11: 0000000000000246 R12: 0000000000040000 R13: 00007fe2633c6000 R14: 0000000000000003 R15: 0000000000000000 Fix this by setting cifs_server_iface::speed to a sane value (1Gbps) by default when link speed is unset. Cc: Shyam Prasad N Cc: Tom Talpey Fixes: a6d8fb54a515 ("cifs: distribute channels across interfaces based on speed") Reported-by: Frank Sorenson Reported-by: Jay Shin Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/smb2ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 215b7f9ecb8d7c14d56febdcdd246f3579c32aba Author: Liang Jie Date: Sat Jan 18 20:35:28 2025 +0800 smb: client: correctly handle ErrorContextData as a flexible array The `smb2_symlink_err_rsp` structure was previously defined with `ErrorContextData` as a single `__u8` byte. However, the `ErrorContextData` field is intended to be a variable-length array based on `ErrorDataLength`. This mismatch leads to incorrect pointer arithmetic and potential memory access issues when processing error contexts. Updates the `ErrorContextData` field to be a flexible array (`__u8 ErrorContextData[]`). Additionally, it modifies the corresponding casts in the `symlink_data()` function to properly handle the flexible array, ensuring correct memory calculations and data handling. These changes improve the robustness of SMB2 symlink error processing. Signed-off-by: Liang Jie Suggested-by: Tom Talpey Signed-off-by: Steve French fs/smb/client/smb2file.c | 4 ++-- fs/smb/client/smb2pdu.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 48aa99523e88e5792edc007e0c7f89faffacc5f7 Author: Paulo Alcantara Date: Mon Jan 13 19:00:29 2025 -0300 smb: client: don't retry DFS targets on server shutdown If TCP Server is about to be destroyed (e.g. CifsExiting was set) and it is reconnecting, stop retrying DFS targets from cached DFS referral as this would potentially delay server shutdown in several seconds. Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/connect.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit bfc1155030151912e7c5426449c7703dad45a890 Author: Paulo Alcantara Date: Fri Jan 10 16:45:44 2025 -0300 smb: client: fix return value of parse_dfs_referrals() Return -ENOENT in parse_dfs_referrals() when server returns no targets for a referral request as specified in MS-DFSC 3.1.5.4.3 Receiving a Root Referral Response or Link Referral Response: > If the referral request is successful, but the NumberOfReferrals > field in the referral header (as specified in section 2.2.4) is > 0, the DFS server could not find suitable targets to return to > the client. In this case, the client MUST fail the original I/O > operation with STATUS_OBJECT_PATH_NOT_FOUND. Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/misc.c | 6 +++--- fs/smb/client/smb2ops.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 5433c629e8d4eee77233a2bc88075886dc6e37ef Author: Paulo Alcantara Date: Fri Jan 10 15:58:08 2025 -0300 smb: client: optimize referral walk on failed link targets If a link referral request sent to root server was successful but client failed to connect to all link targets, there is no need to retry same link referral on a different root server. Set an end marker for the DFS root referral so the client will not attempt to re-send link referrals to different root servers on failures. Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/dfs.c | 69 ++++++++++++++++++++--------------------------------- fs/smb/client/dfs.h | 44 +++++++++++++++++++++++----------- 2 files changed, 56 insertions(+), 57 deletions(-) commit 4b1b4c8be9dee9aa1a751cfa3954b2fcfdfe9c3d Author: Paulo Alcantara Date: Tue Jan 7 12:22:50 2025 -0300 smb: client: provide dns_resolve_{unc,name} helpers Some places pass hostnames rather than UNC paths to resolve them to ip addresses, so provide helpers to handle both cases and then stop converting hostnames to UNC paths by inserting path delimiters into them. Also kill @expiry parameter as it's not used anywhere. Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/cifsproto.h | 2 +- fs/smb/client/connect.c | 27 +++++---------------------- fs/smb/client/dfs.c | 8 +++----- fs/smb/client/dfs_cache.c | 17 ++++------------- fs/smb/client/dns_resolve.c | 44 +++++++++++++++++--------------------------- fs/smb/client/dns_resolve.h | 24 ++++++++++++++++++++++-- fs/smb/client/misc.c | 23 +++++++---------------- 7 files changed, 59 insertions(+), 86 deletions(-) commit 489d1523105e14e7a2c6e68205e05397e3b714fb Author: Paulo Alcantara Date: Fri Jan 3 16:38:51 2025 -0300 smb: client: parse DNS domain name from domain= option If the user specified a DNS domain name in domain= mount option, then use it instead of parsing it in NTLMSSP CHALLENGE_MESSAGE message. Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/connect.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit ad46faff1afcc8db72f9954a6ea2296d31259217 Author: Paulo Alcantara Date: Fri Jan 3 16:58:12 2025 -0300 smb: client: fix DFS mount against old servers with NTLMSSP Old Windows servers will return not fully qualified DFS targets by default as specified in MS-DFSC 3.2.5.5 Receiving a Root Referral Request or Link Referral Request | Servers SHOULD<30> return fully qualified DNS host names of | targets in responses to root referral requests and link referral | requests. | ... | <30> Section 3.2.5.5: By default, Windows Server 2003, Windows | Server 2008, Windows Server 2008 R2, Windows Server 2012, and | Windows Server 2012 R2 return DNS host names that are not fully | qualified for targets. Fix this by converting all NetBIOS host names from DFS targets to FQDNs and try resolving them first if DNS domain name was provided in NTLMSSP CHALLENGE_MESSAGE message from previous SMB2_SESSION_SETUP. This also prevents the client from translating the DFS target hostnames to another domain depending on the network domain search order. Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/cifsglob.h | 21 +++++++++ fs/smb/client/connect.c | 5 ++- fs/smb/client/dfs.c | 13 ++++-- fs/smb/client/dfs_cache.c | 3 +- fs/smb/client/dns_resolve.c | 102 ++++++++++++++++++++++++++------------------ fs/smb/client/dns_resolve.h | 3 +- fs/smb/client/fs_context.c | 4 ++ fs/smb/client/fs_context.h | 1 + fs/smb/client/misc.c | 3 +- 9 files changed, 105 insertions(+), 50 deletions(-) commit 0e8ae9b953bc2c12aebd21e1e552e5deb1a0ff1e Author: Paulo Alcantara Date: Fri Jan 3 16:52:25 2025 -0300 smb: client: parse av pair type 4 in CHALLENGE_MESSAGE Parse FQDN of the domain in CHALLENGE_MESSAGE message as it's gonna be useful when mounting DFS shares against old Windows Servers (2012 R2 or earlier) that return not fully qualified hostnames for DFS targets by default. Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/cifsencrypt.c | 63 +++++++++++++++++++++++++++++---------------- fs/smb/client/cifsglob.h | 1 + fs/smb/client/misc.c | 1 + 3 files changed, 43 insertions(+), 22 deletions(-) commit 62eecd8aac6c880a4a09ccb5d890949f2a09a730 Author: Paulo Alcantara Date: Fri Jan 3 16:50:27 2025 -0300 smb: client: introduce av_for_each_entry() helper Use new helper in find_domain_name() and find_timestamp() to avoid duplicating code. Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French fs/smb/client/cifsencrypt.c | 125 +++++++++++++++++++------------------------- fs/smb/client/cifspdu.h | 2 +- 2 files changed, 55 insertions(+), 72 deletions(-) commit c542a56aad1f88b88713293c128952feb1945301 Author: Zsolt Kajtar Date: Sat Jan 18 11:38:56 2025 +0100 fbdev: vga16fb: fix orig_video_isVGA confusion At some point the orig_video_isVGA field of screen_info was repurposed for video type. Using it directly for video type check is unsafe as it can still mean yes (1) or no-output (0) in certain configurations. I had one of those. Signed-off-by: Zsolt Kajtar Signed-off-by: Helge Deller drivers/video/fbdev/vga16fb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ccb7276a6d26d6f8416e315b43b45e15ee7f29e2 Author: Andy Strohman Date: Thu Jan 9 02:27:56 2025 +0000 batman-adv: fix panic during interface removal Reference counting is used to ensure that batadv_hardif_neigh_node and batadv_hard_iface are not freed before/during batadv_v_elp_throughput_metric_update work is finished. But there isn't a guarantee that the hard if will remain associated with a soft interface up until the work is finished. This fixes a crash triggered by reboot that looks like this: Call trace: batadv_v_mesh_free+0xd0/0x4dc [batman_adv] batadv_v_elp_throughput_metric_update+0x1c/0xa4 process_one_work+0x178/0x398 worker_thread+0x2e8/0x4d0 kthread+0xd8/0xdc ret_from_fork+0x10/0x20 (the batadv_v_mesh_free call is misleading, and does not actually happen) I was able to make the issue happen more reliably by changing hardif_neigh->bat_v.metric_work work to be delayed work. This allowed me to track down and confirm the fix. Cc: stable@vger.kernel.org Fixes: c833484e5f38 ("batman-adv: ELP - compute the metric based on the estimated throughput") Signed-off-by: Andy Strohman [sven@narfation.org: prevent entering batadv_v_elp_get_throughput without soft_iface] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bat_v_elp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit c7345869aa382b1e22691d51cbbd218d7f488a55 Author: Andrew Davis Date: Tue Jan 23 10:44:41 2024 -0600 drivers/soc/litex: Use devm_register_restart_handler() Use device life-cycle managed register function to simplify probe error path and eliminate need for explicit remove function. Signed-off-by: Andrew Davis Reviewed-by: Gabriel Somlo Link: https://lore.kernel.org/all/20240123164443.394642-3-afd@ti.com Signed-off-by: Gabriel Somlo drivers/soc/litex/litex_soc_ctrl.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit e876695aab1e3d4743e11633219cea456820660b Author: I Hsin Cheng Date: Fri Jan 17 22:27:24 2025 +0800 cpumask: Rephrase comments for cpumask_any*() APIs The cpumask_any*() APIs comment states that it returns a "random" cpu within the given cpumask. However it's not actually random as random itself stands a meaning for uniform distribution. cpumask_any*() APIs are a naming convention for the caller to states that it doesn't care which CPU it gets, so change "random" to "arbitrary" would be more appropriate. CC: Mark Rutland Signed-off-by: I Hsin Cheng Reviewed-by: Kuan-Wei Chiu Signed-off-by: Yury Norov include/linux/cpumask.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fd3aa3d5e5dbbf4254cd4ac6c550a4da671e07cc Author: James Bottomley Date: Sun Jan 19 10:12:13 2025 -0500 selftests/efivarfs: fix tests for failed write removal The current self tests expect the zero size remnants that failed variable creation leaves. Update the tests to verify these are now absent. Signed-off-by: James Bottomley Signed-off-by: Ard Biesheuvel tools/testing/selftests/efivarfs/efivarfs.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit e7b4b1f61db79fd5a3ded518526941b0e3d70abc Merge: 8a32d46b2043 908af31f4896 Author: Ard Biesheuvel Date: Sun Jan 19 17:50:58 2025 +0100 Merge branch 'efivarfs' into next commit 908af31f4896f2c0645031f8b74a89d3a8beb5b9 Author: James Bottomley Date: Sun Jan 19 10:12:12 2025 -0500 efivarfs: fix error on write to new variable leaving remnants Make variable cleanup go through the fops release mechanism and use zero inode size as the indicator to delete the file. Since all EFI variables must have an initial u32 attribute, zero size occurs either because the update deleted the variable or because an unsuccessful write after create caused the size never to be set in the first place. In the case of multiple racing opens and closes, the open is counted to ensure that the zero size check is done on the last close. Even though this fixes the bug that a create either not followed by a write or followed by a write that errored would leave a remnant file for the variable, the file will appear momentarily globally visible until the last close of the fd deletes it. This is safe because the normal filesystem operations will mediate any races; however, it is still possible for a directory listing at that instant between create and close contain a zero size variable that doesn't exist in the EFI table. Signed-off-by: James Bottomley Signed-off-by: Ard Biesheuvel fs/efivarfs/file.c | 59 ++++++++++++++++++++++++++++++++++++++++++-------- fs/efivarfs/internal.h | 2 ++ fs/efivarfs/super.c | 1 + 3 files changed, 53 insertions(+), 9 deletions(-) commit a58e954464db477307ac879d772a535deca8efb7 Author: James Bottomley Date: Sun Jan 19 10:12:11 2025 -0500 efivarfs: remove unused efivarfs_list Remove all function helpers and mentions of the efivarfs_list now that all consumers of the list have been removed and entry management goes exclusively through the inode. Signed-off-by: James Bottomley Signed-off-by: Ard Biesheuvel fs/efivarfs/inode.c | 24 ++++---------- fs/efivarfs/internal.h | 12 ++----- fs/efivarfs/super.c | 12 ++----- fs/efivarfs/vars.c | 89 +++++++------------------------------------------- 4 files changed, 21 insertions(+), 116 deletions(-) commit fddca52766e276cb2fdc0be940ad75e0f01e214e Author: James Bottomley Date: Sun Jan 19 10:12:10 2025 -0500 efivarfs: move variable lifetime management into the inodes Make the inodes the default management vehicle for struct efivar_entry, so they are now all freed automatically if the file is removed and on unmount in kill_litter_super(). Remove the now superfluous iterator to free the entries after kill_litter_super(). Also fixes a bug where some entry freeing was missing causing efivarfs to leak memory. Signed-off-by: James Bottomley Signed-off-by: Ard Biesheuvel fs/efivarfs/inode.c | 23 ++++++++++------------- fs/efivarfs/internal.h | 7 ++++++- fs/efivarfs/super.c | 51 ++++++++++++++++++++++++++++---------------------- fs/efivarfs/vars.c | 39 +++----------------------------------- 4 files changed, 48 insertions(+), 72 deletions(-) commit 8a32d46b204396255462712afbef16e227423f68 Author: James Bottomley Date: Sun Jan 19 09:59:41 2025 -0500 selftests/efivarfs: add check for disallowing file truncation Now that the ability of arbitrary writes to set the inode size is fixed, verify that a variable file accepts a truncation operation but does not change the stat size because of it. Signed-off-by: James Bottomley Signed-off-by: Ard Biesheuvel tools/testing/selftests/efivarfs/efivarfs.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 8b4bc207f981bd87728d2e1c0cf6f4304f9d0159 Author: James Bottomley Date: Sun Jan 19 09:59:40 2025 -0500 efivarfs: prevent setting of zero size on the inodes in the cache Current efivarfs uses simple_setattr which allows the setting of any size in the inode cache. This is wrong because a zero size file is used to indicate an "uncommitted" variable, so by simple means of truncating the file (as root) any variable may be turned to look like it's uncommitted. Fix by adding an efivarfs_setattr routine which does not allow updating of the cached inode size (which now only comes from the underlying variable). Signed-off-by: James Bottomley Signed-off-by: Ard Biesheuvel fs/efivarfs/inode.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 6e2c2342e2b608264cf763a27410295b05995191 Author: Chen Linxuan Date: Fri Jan 17 18:06:36 2025 +0800 erofs: remove dead code in erofs_fc_parse_param If an option is unknown to erofs, which means that option is not in `erofs_fs_parameters`, `fs_parse` will return -ENOPARAM, which makes `erofs_fc_parse_param` returns earlier. Signed-off-by: Chen Linxuan Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/DB86A4E2BB2BB44E+20250117100635.335963-2-chenlinxuan@uniontech.com Signed-off-by: Gao Xiang fs/erofs/super.c | 2 -- 1 file changed, 2 deletions(-) commit fdbaf5163331342e90a2c29b87629021f4c15f0c Author: Pablo Neira Ayuso Date: Tue Jan 14 00:50:38 2025 +0100 netfilter: flowtable: add CLOSING state tcp rst/fin packet triggers an immediate teardown of the flow which results in sending flows back to the classic forwarding path. This behaviour was introduced by: da5984e51063 ("netfilter: nf_flow_table: add support for sending flows back to the slow path") b6f27d322a0a ("netfilter: nf_flow_table: tear down TCP flows if RST or FIN was seen") whose goal is to expedite removal of flow entries from the hardware table. Before these patches, the flow was released after the flow entry timed out. However, this approach leads to packet races when restoring the conntrack state as well as late flow re-offload situations when the TCP connection is ending. This patch adds a new CLOSING state that is is entered when tcp rst/fin packet is seen. This allows for an early removal of the flow entry from the hardware table. But the flow entry still remains in software, so tcp packets to shut down the flow are not sent back to slow path. If syn packet is seen from this new CLOSING state, then this flow enters teardown state, ct state is set to TCP_CONNTRACK_CLOSE state and packet is sent to slow path, so this TCP reopen scenario can be handled by conntrack. TCP_CONNTRACK_CLOSE provides a small timeout that aims at quickly releasing this stale entry from the conntrack table. Moreover, skip hardware re-offload from flowtable software packet if the flow is in CLOSING state. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_flow_table.h | 1 + net/netfilter/nf_flow_table_core.c | 70 ++++++++++++++++++++++++++--------- net/netfilter/nf_flow_table_ip.c | 6 ++- 3 files changed, 58 insertions(+), 19 deletions(-) commit b8baac3b9c5cc4b261454ff87d75ae8306016ffd Author: Pablo Neira Ayuso Date: Tue Jan 14 00:50:37 2025 +0100 netfilter: flowtable: teardown flow if cached mtu is stale Tear down the flow entry in the unlikely case that the interface mtu changes, this gives the flow a chance to refresh the cached mtu, otherwise such refresh does not occur until flow entry expires. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_flow_table_ip.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 03428ca5cee9f0792edc996c06ce4514816af1fb Author: Florian Westphal Date: Tue Jan 14 00:50:36 2025 +0100 netfilter: conntrack: rework offload nf_conn timeout extension logic Offload nf_conn entries may not see traffic for a very long time. To prevent incorrect 'ct is stale' checks during nf_conntrack table lookup, the gc worker extends the timeout nf_conn entries marked for offload to a large value. The existing logic suffers from a few problems. Garbage collection runs without locks, its unlikely but possible that @ct is removed right after the 'offload' bit test. In that case, the timeout of a new/reallocated nf_conn entry will be increased. Prevent this by obtaining a reference count on the ct object and re-check of the confirmed and offload bits. If those are not set, the ct is being removed, skip the timeout extension in this case. Parallel teardown is also problematic: cpu1 cpu2 gc_worker calls flow_offload_teardown() tests OFFLOAD bit, set clear OFFLOAD bit ct->timeout is repaired (e.g. set to timeout[UDP_CT_REPLIED]) nf_ct_offload_timeout() called expire value is fetched -> NF_CT_DAY timeout for flow that isn't offloaded (and might not see any further packets). Use cmpxchg: if ct->timeout was repaired after the 2nd 'offload bit' test passed, then ct->timeout will only be updated of ct->timeout was not altered in between. As we already have a gc worker for flowtable entries, ct->timeout repair can be handled from the flowtable gc worker. This avoids having flowtable specific logic in the conntrack core and avoids checking entries that were never offloaded. This allows to remove the nf_ct_offload_timeout helper. Its safe to use in the add case, but not on teardown. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 10 ---- net/netfilter/nf_conntrack_core.c | 6 -- net/netfilter/nf_flow_table_core.c | 105 ++++++++++++++++++++++++++++++++++- 3 files changed, 103 insertions(+), 18 deletions(-) commit 31768596b15aa8c9c55f078acad29d0238c8269b Author: Florian Westphal Date: Tue Jan 14 00:50:35 2025 +0100 netfilter: conntrack: remove skb argument from nf_ct_refresh Its not used (and could be NULL), so remove it. This allows to use nf_ct_refresh in places where we don't have an skb without having to double-check that skb == NULL would be safe. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 8 +++----- net/netfilter/nf_conntrack_amanda.c | 2 +- net/netfilter/nf_conntrack_broadcast.c | 2 +- net/netfilter/nf_conntrack_core.c | 7 +++---- net/netfilter/nf_conntrack_h323_main.c | 4 ++-- net/netfilter/nf_conntrack_sip.c | 4 ++-- net/netfilter/nft_ct.c | 2 +- 7 files changed, 13 insertions(+), 16 deletions(-) commit 7a4b61406395291ffb7220a10e8951a9a8684819 Author: Florian Westphal Date: Tue Jan 14 00:50:34 2025 +0100 netfilter: nft_flow_offload: update tcp state flags under lock The conntrack entry is already public, there is a small chance that another CPU is handling a packet in reply direction and racing with the tcp state update. Move this under ct spinlock. This is done once, when ct is about to be offloaded, so this should not result in a noticeable performance hit. Fixes: 8437a6209f76 ("netfilter: nft_flow_offload: set liberal tracking mode for tcp") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_flow_offload.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit d9d7b489416d18ba696c32a93623ecb0176b374e Author: Florian Westphal Date: Tue Jan 14 00:50:33 2025 +0100 netfilter: nft_flow_offload: clear tcp MAXACK flag before moving to slowpath This state reset is racy, no locks are held here. Since commit 8437a6209f76 ("netfilter: nft_flow_offload: set liberal tracking mode for tcp"), the window checks are disabled for normal data packets, but MAXACK flag is checked when validating TCP resets. Clear the flag so tcp reset validation checks are ignored. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_flow_table_core.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 375f222800bc001bb9cbd2baa1daec006430aeba Author: Phil Sutter Date: Thu Jan 9 18:31:37 2025 +0100 netfilter: nf_tables: Simplify chain netdev notifier With conditional chain deletion gone, callback code simplifies: Instead of filling an nft_ctx object, just pass basechain to the per-chain function. Also plain list_for_each_entry() is safe now. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_chain_filter.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit fc0133428e7ad65aa6b7c8e65ccfe86e469e4512 Author: Phil Sutter Date: Thu Jan 9 18:31:36 2025 +0100 netfilter: nf_tables: Tolerate chains with no remaining hooks Do not drop a netdev-family chain if the last interface it is registered for vanishes. Users dumping and storing the ruleset upon shutdown to restore it upon next boot may otherwise lose the chain and all contained rules. They will still lose the list of devices, a later patch will fix that. For now, this aligns the event handler's behaviour with that for flowtables. The controversal situation at netns exit should be no problem here: event handler will unregister the hooks, core nftables cleanup code will drop the chain itself. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 2 -- net/netfilter/nf_tables_api.c | 41 --------------------------------------- net/netfilter/nft_chain_filter.c | 29 +++++++-------------------- 3 files changed, 7 insertions(+), 65 deletions(-) commit bc87b75847d86f073a3df56e4ad44265b3d64e44 Author: Phil Sutter Date: Thu Jan 9 18:31:35 2025 +0100 netfilter: nf_tables: Compare netdev hooks based on stored name The 1:1 relationship between nft_hook and nf_hook_ops is about to break, so choose the stored ifname to uniquely identify hooks. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 880ccec0d02efb24900f589d0cac826af1d91523 Author: Phil Sutter Date: Thu Jan 9 18:31:34 2025 +0100 netfilter: nf_tables: Use stored ifname in netdev hook dumps The stored ifname and ops.dev->name may deviate after creation due to interface name changes. Prefer the more deterministic stored name in dumps which also helps avoiding inadvertent changes to stored ruleset dumps. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b7c2d793c28cda7dbb67d6b427e3280b7c1e601a Author: Phil Sutter Date: Thu Jan 9 18:31:33 2025 +0100 netfilter: nf_tables: Store user-defined hook ifname Prepare for hooks with NULL ops.dev pointer (due to non-existent device) and store the interface name and length as specified by the user upon creation. No functional change intended. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 2 ++ net/netfilter/nf_tables_api.c | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) commit 2a67414a143e120527e17f8372f13d3b31eeb5a3 Author: Phil Sutter Date: Thu Jan 9 18:31:32 2025 +0100 netfilter: nf_tables: Flowtable hook's pf value never varies When checking for duplicate hooks in nft_register_flowtable_net_hooks(), comparing ops.pf value is pointless as it is always NFPROTO_NETDEV with flowtable hooks. Dropping the check leaves the search identical to the one in nft_hook_list_find() so call that function instead of open coding. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit d01ed3240b22ffd76b7e1ebcabce900fc00cc8d0 Author: Antoine Tenart Date: Thu Jan 9 10:37:09 2025 +0100 netfilter: br_netfilter: remove unused conditional and dead code The SKB_DROP_REASON_IP_INADDRERRORS drop reason is never returned from any function, as such it cannot be returned from the ip_route_input call tree. The 'reason != SKB_DROP_REASON_IP_INADDRERRORS' conditional is thus always true. Looking back at history, commit 50038bf38e65 ("net: ip: make ip_route_input() return drop reasons") changed the ip_route_input returned value check in br_nf_pre_routing_finish from -EHOSTUNREACH to SKB_DROP_REASON_IP_INADDRERRORS. It turns out -EHOSTUNREACH could not be returned either from the ip_route_input call tree and this since commit 251da4130115 ("ipv4: Cache ip_error() routes even when not forwarding."). Not a fix as this won't change the behavior. While at it use kfree_skb_reason. Signed-off-by: Antoine Tenart Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/bridge/br_netfilter_hooks.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) commit 8d738c1869f611955d91d8d0fd0012d9ef207201 Author: Pablo Neira Ayuso Date: Mon Jan 6 23:40:50 2025 +0100 netfilter: nf_tables: fix set size with rbtree backend The existing rbtree implementation uses singleton elements to represent ranges, however, userspace provides a set size according to the number of ranges in the set. Adjust provided userspace set size to the number of singleton elements in the kernel by multiplying the range by two. Check if the no-match all-zero element is already in the set, in such case release one slot in the set size. Fixes: 0ed6389c483d ("netfilter: nf_tables: rename set implementations") Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 6 +++++ net/netfilter/nf_tables_api.c | 49 +++++++++++++++++++++++++++++++++++++-- net/netfilter/nft_set_rbtree.c | 43 ++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 2 deletions(-) commit 561e3a0c40dc7e3ab7b0b3647a2b89eca16215d9 Author: Al Viro Date: Sun Jan 19 03:26:49 2025 +0000 io_uring/fdinfo: fix io_uring_show_fdinfo() misuse of ->d_iname Output of io_uring_show_fdinfo() has several problems: * racy use of ->d_iname * junk if the name is long - in that case it's not stored in ->d_iname at all * lack of quoting (names can contain newlines, etc. - or be equal to "", for that matter). * lines for empty slots are pointless noise - we already have the total amount, so having just the non-empty ones would carry the same information. Signed-off-by: Al Viro Signed-off-by: Jens Axboe io_uring/fdinfo.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit db8b2c0e2abc90d1025fd7f6d4461b21b1d3248e Author: Vivek Kasireddy Date: Wed Dec 11 21:54:21 2024 -0800 drm/virtio: Fix UAF in virtgpu_dma_buf_free_obj() Fix the following issues identified by Smatch static checker: - The call to dma_buf_put(attach->dmabuf) after dma_buf_detach() leads to a UAF bug as dma_buf_detach() frees the attach object. Fix this by extracting the dmabuf object from attach and using that in the call to dma_buf_put(). - The resv object is extracted from attach before checking to see if attach is valid (that is !NULL) or not. Although, attach would very likely be valid, fix this by making sure that the resv object is used only after ensuring that attach is valid. Fixes: 2885e575abc7 ("drm/virtio: Add helpers to initialize and free the imported object") Fixes: ca77f27a2665 ("drm/virtio: Import prime buffers from other devices as guest blobs") Cc: Gerd Hoffmann Cc: Dmitry Osipenko Cc: Gurchetan Singh Cc: Chia-I Wu Reported-by: Dan Carpenter Signed-off-by: Vivek Kasireddy Link: https://patchwork.freedesktop.org/patch/msgid/20241212055421.775759-1-vivek.kasireddy@intel.com Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko [dmitry.osipenko@collabora.com: Edited commit title] drivers/gpu/drm/virtio/virtgpu_prime.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit f5f01c5c409e697c6ae7091ca578bfbd3825e87c Author: Thomas Weißschuh Date: Tue Jan 14 22:32:14 2025 +0100 RDMA/qib: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh Link: https://patch.msgid.link/20250114-sysfs-const-bin_attr-infiniband-v1-2-397aaa94d453@weissschuh.net Signed-off-by: Leon Romanovsky drivers/infiniband/hw/qib/qib_sysfs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 39d772f6654a17ae57656602e801d265e82a2e36 Author: Thomas Weißschuh Date: Tue Jan 14 22:32:13 2025 +0100 RDMA/hfi1: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh Link: https://patch.msgid.link/20250114-sysfs-const-bin_attr-infiniband-v1-1-397aaa94d453@weissschuh.net Signed-off-by: Leon Romanovsky drivers/infiniband/hw/hfi1/sysfs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 579b6f18c5ca162af040f44684cc55f7da182236 Author: Dave Penkler Date: Sat Jan 18 15:50:46 2025 +0100 staging: gpib: Agilent usb code cleanup Remove useless #ifdef RESET_USB_CONFIG code. Change kalloc / memset to kzalloc The attach function was not freeing the private data on error returns. Separate the releasing of urbs and private data and add a common error exit for attach failure. Set the board private data pointer to NULL after freeing the private data. Reduce console spam by emitting only one attach message. Change last pr_err in attach to dev_err Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250118145046.12181-3-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman .../staging/gpib/agilent_82357a/agilent_82357a.c | 84 ++++++++++------------ 1 file changed, 36 insertions(+), 48 deletions(-) commit 6a6c153537f093c3bc79ea9633f3954d3450d0ba Author: Dave Penkler Date: Sat Jan 18 15:50:45 2025 +0100 staging: gpib: Fix NULL pointer dereference in detach When the detach function is called after a failed attach the usb_dev initialization can cause a NULL pointer dereference. This happens when the usb device is not found in the attach procedure. Remove the usb_dev variable and initialization and change the dev in the dev_info message from the usb_dev to the gpib_dev. Fixes: fbae7090f30c ("staging: gpib: Update messaging and usb_device refs in agilent_usb") Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250118145046.12181-2-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/gpib/agilent_82357a/agilent_82357a.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9d4f8e54cef2c42e23ef258833dbd06a1eaff89b Author: Herbert Xu Date: Tue Jan 14 11:15:19 2025 +0800 rhashtable: Fix rhashtable_try_insert test The test on whether rhashtable_insert_one did an insertion relies on the value returned by rhashtable_lookup_one. Unfortunately that value is overwritten after rhashtable_insert_one returns. Fix this by moving the test before data gets overwritten. Simplify the test as only data == NULL matters. Finally move atomic_inc back within the lock as otherwise it may be reordered with the atomic_dec on the removal side, potentially leading to an underflow. Reported-by: Michael Kelley Fixes: e1d3422c95f0 ("rhashtable: Fix potential deadlock by moving schedule_work outside lock") Signed-off-by: Herbert Xu Tested-by: Michael Kelley Reviewed-by: Breno Leitao Tested-by: Mikhail Zaslonko Signed-off-by: Herbert Xu lib/rhashtable.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 076d9119cc3292c20524ceeecfbed9b3e9c7221b Author: Gaurav Kashyap Date: Mon Jan 13 13:16:25 2025 -0800 dt-bindings: crypto: qcom,inline-crypto-engine: Document the SM8750 ICE Document the Inline Crypto Engine (ICE) on the SM8750 Platform. Signed-off-by: Gaurav Kashyap Signed-off-by: Melody Olvera Acked-by: Rob Herring (Arm) Signed-off-by: Herbert Xu Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml | 1 + 1 file changed, 1 insertion(+) commit f78a36d325c5f985f7ac36753e3e72bca0f7c4df Author: Gaurav Kashyap Date: Mon Jan 13 13:16:23 2025 -0800 dt-bindings: crypto: qcom,prng: Document SM8750 RNG Document SM8750 compatible for the True Random Number Generator. Signed-off-by: Gaurav Kashyap Signed-off-by: Melody Olvera Acked-by: Rob Herring (Arm) Signed-off-by: Herbert Xu Documentation/devicetree/bindings/crypto/qcom,prng.yaml | 1 + 1 file changed, 1 insertion(+) commit 7a6bfb6e2716f4b3389f56314b7b363e3bd3ee9e Author: Gaurav Kashyap Date: Mon Jan 13 13:16:21 2025 -0800 dt-bindings: crypto: qcom-qce: Document the SM8750 crypto engine Document the crypto engine on the SM8750 Platform. Signed-off-by: Gaurav Kashyap Signed-off-by: Melody Olvera Acked-by: Rob Herring (Arm) Signed-off-by: Herbert Xu Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 1 + 1 file changed, 1 insertion(+) commit f50fcd23c9b9d99bf03d0ab9f30cba4665e6326e Author: Dr. David Alan Gilbert Date: Sun Jan 12 16:30:59 2025 +0000 crypto: asymmetric_keys - Remove unused key_being_used_for[] key_being_used_for[] is an unused array of textual names for the elements of the enum key_being_used_for. It was added in 2015 by commit 99db44350672 ("PKCS#7: Appropriately restrict authenticated attributes and content type") Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Herbert Xu crypto/asymmetric_keys/asymmetric_type.c | 10 ---------- include/linux/verification.h | 2 -- 2 files changed, 12 deletions(-) commit dd7d37ccf6b11f3d95e797ebe4e9e886d0332600 Author: Chen Ridong Date: Fri Jan 10 06:16:39 2025 +0000 padata: avoid UAF for reorder_work Although the previous patch can avoid ps and ps UAF for _do_serial, it can not avoid potential UAF issue for reorder_work. This issue can happen just as below: crypto_request crypto_request crypto_del_alg padata_do_serial ... padata_reorder // processes all remaining // requests then breaks while (1) { if (!padata) break; ... } padata_do_serial // new request added list_add // sees the new request queue_work(reorder_work) padata_reorder queue_work_on(squeue->work) ... padata_serial_worker // completes new request, // no more outstanding // requests crypto_del_alg // free pd invoke_padata_reorder // UAF of pd To avoid UAF for 'reorder_work', get 'pd' ref before put 'reorder_work' into the 'serial_wq' and put 'pd' ref until the 'serial_wq' finish. Fixes: bbefa1dd6a6d ("crypto: pcrypt - Avoid deadlock by using per-instance padata queues") Signed-off-by: Chen Ridong Acked-by: Daniel Jordan Signed-off-by: Herbert Xu kernel/padata.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit e01780ea4661172734118d2a5f41bc9720765668 Author: Chen Ridong Date: Fri Jan 10 06:16:38 2025 +0000 padata: fix UAF in padata_reorder A bug was found when run ltp test: BUG: KASAN: slab-use-after-free in padata_find_next+0x29/0x1a0 Read of size 4 at addr ffff88bbfe003524 by task kworker/u113:2/3039206 CPU: 0 PID: 3039206 Comm: kworker/u113:2 Kdump: loaded Not tainted 6.6.0+ Workqueue: pdecrypt_parallel padata_parallel_worker Call Trace: dump_stack_lvl+0x32/0x50 print_address_description.constprop.0+0x6b/0x3d0 print_report+0xdd/0x2c0 kasan_report+0xa5/0xd0 padata_find_next+0x29/0x1a0 padata_reorder+0x131/0x220 padata_parallel_worker+0x3d/0xc0 process_one_work+0x2ec/0x5a0 If 'mdelay(10)' is added before calling 'padata_find_next' in the 'padata_reorder' function, this issue could be reproduced easily with ltp test (pcrypt_aead01). This can be explained as bellow: pcrypt_aead_encrypt ... padata_do_parallel refcount_inc(&pd->refcnt); // add refcnt ... padata_do_serial padata_reorder // pd while (1) { padata_find_next(pd, true); // using pd queue_work_on ... padata_serial_worker crypto_del_alg padata_put_pd_cnt // sub refcnt padata_free_shell padata_put_pd(ps->pd); // pd is freed // loop again, but pd is freed // call padata_find_next, UAF } In the padata_reorder function, when it loops in 'while', if the alg is deleted, the refcnt may be decreased to 0 before entering 'padata_find_next', which leads to UAF. As mentioned in [1], do_serial is supposed to be called with BHs disabled and always happen under RCU protection, to address this issue, add synchronize_rcu() in 'padata_free_shell' wait for all _do_serial calls to finish. [1] https://lore.kernel.org/all/20221028160401.cccypv4euxikusiq@parnassus.localdomain/ [2] https://lore.kernel.org/linux-kernel/jfjz5d7zwbytztackem7ibzalm5lnxldi2eofeiczqmqs2m7o6@fq426cwnjtkm/ Fixes: b128a3040935 ("padata: allocate workqueue internally") Signed-off-by: Chen Ridong Signed-off-by: Qu Zicheng Acked-by: Daniel Jordan Signed-off-by: Herbert Xu kernel/padata.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ae154202cc6a189b035359f3c4e143d5c24d5352 Author: Chen Ridong Date: Fri Jan 10 06:16:37 2025 +0000 padata: add pd get/put refcnt helper Add helpers for pd to get/put refcnt to make code consice. Signed-off-by: Chen Ridong Acked-by: Daniel Jordan Signed-off-by: Herbert Xu kernel/padata.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit 59372af69d4d71e6487614f1b35712cf241eadb4 Merge: 1a280c54fd98 6ecc4fd6c2f4 Author: Jakub Kicinski Date: Sat Jan 18 17:57:31 2025 -0800 Merge tag 'batadv-next-pullrequest-20250117' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - Reorder includes for distributed-arp-table.c, by Sven Eckelmann - Fix translation table change handling, by Remi Pommarel (2 patches) - Map VID 0 to untagged TT VLAN, by Sven Eckelmann - Update MAINTAINERS/mailmap e-mail addresses, by the respective authors (4 patches) - netlink: reduce duplicate code by returning interfaces, by Linus Lüssing * tag 'batadv-next-pullrequest-20250117' of git://git.open-mesh.org/linux-merge: batman-adv: netlink: reduce duplicate code by returning interfaces MAINTAINERS: mailmap: add entries for Antonio Quartulli mailmap: add entries for Sven Eckelmann mailmap: add entries for Simon Wunderlich MAINTAINERS: update email address of Marek Linder batman-adv: Map VID 0 to untagged TT VLAN batman-adv: Don't keep redundant TT change events batman-adv: Remove atomic usage for tt.local_changes batman-adv: Reorder includes for distributed-arp-table.c batman-adv: Start new development cycle ==================== Link: https://patch.msgid.link/20250117123910.219278-1-sw@simonwunderlich.de Signed-off-by: Jakub Kicinski commit 1a280c54fd982379a35f1a7b6d93d1b9bf148ad9 Merge: 66cc61a25c7d 26fbd3494a7d Author: Jakub Kicinski Date: Sat Jan 18 17:51:57 2025 -0800 Merge tag 'for-net-next-2025-01-15' 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: - btusb: Add new VID/PID 13d3/3610 for MT7922 - btusb: Add new VID/PID 13d3/3628 for MT7925 - btusb: Add MT7921e device 13d3:3576 - btusb: Add RTL8851BE device 13d3:3600 - btusb: Add ID 0x2c7c:0x0130 for Qualcomm WCN785x - btusb: add sysfs attribute to control USB alt setting - qca: Expand firmware-name property - qca: Fix poor RF performance for WCN6855 - L2CAP: handle NULL sock pointer in l2cap_sock_alloc - Allow reset via sysfs - ISO: Allow BIG re-sync - dt-bindings: Utilize PMU abstraction for WCN6750 - MGMT: Mark LL Privacy as stable * tag 'for-net-next-2025-01-15' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next: (23 commits) Bluetooth: MGMT: Fix slab-use-after-free Read in mgmt_remove_adv_monitor_sync Bluetooth: qca: Fix poor RF performance for WCN6855 Bluetooth: Allow reset via sysfs Bluetooth: Get rid of cmd_timeout and use the reset callback Bluetooth: Remove the cmd timeout count in btusb Bluetooth: Use str_enable_disable-like helpers Bluetooth: btmtk: Remove resetting mt7921 before downloading the fw Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc Bluetooth: btusb: Add RTL8851BE device 13d3:3600 dt-bindings: bluetooth: Utilize PMU abstraction for WCN6750 Bluetooth: btusb: Add MT7921e device 13d3:3576 Bluetooth: btrtl: check for NULL in btrtl_setup_realtek() Bluetooth: btbcm: Fix NULL deref in btbcm_get_board_name() Bluetooth: qca: Expand firmware-name to load specific rampatch Bluetooth: qca: Update firmware-name to support board specific nvm dt-bindings: net: bluetooth: qca: Expand firmware-name property Bluetooth: btusb: Add new VID/PID 13d3/3628 for MT7925 Bluetooth: btusb: Add new VID/PID 13d3/3610 for MT7922 Bluetooth: btusb: add sysfs attribute to control USB alt setting Bluetooth: btusb: Add ID 0x2c7c:0x0130 for Qualcomm WCN785x ... ==================== Link: https://patch.msgid.link/20250117213203.3921910-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 66cc61a25c7dd64489e0b7d160e3de513fbaca8c Merge: 185e5b869071 68abd0c4ebf2 Author: Jakub Kicinski Date: Sat Jan 18 17:46:53 2025 -0800 Merge tag 'wireless-next-2025-01-17' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.14 Most likely the last "new features" pull request for v6.14 and this is a bigger one. Multi-Link Operation (MLO) work continues both in stack in drivers. Few new devices supported and usual fixes all over. Major changes: cfg80211 * Emergency Preparedness Communication Services (EPCS) station mode support mac80211 * an option to filter a sta from being flushed * some support for RX Operating Mode Indication (OMI) power saving * support for adding and removing station links for MLO iwlwifi * new device ids * rework firmware error handling and restart rtw88 * RTL8812A: RFE type 2 support * LED support rtw89 * variant info to support RTL8922AE-VS mt76 * mt7996: single wiphy multiband support (preparation for MLO) * mt7996: support for more variants * mt792x: P2P_DEVICE support * mt7921u: TP-Link TXE50UH support ath12k * enable MLO for QCN9274 (although it seems to be broken with dual band devices) * MLO radar detection support * debugfs: transmit buffer OFDMA, AST entry and puncture stats * tag 'wireless-next-2025-01-17' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (322 commits) wifi: brcmfmac: fix NULL pointer dereference in brcmf_txfinalize() wifi: rtw88: add RTW88_LEDS depends on LEDS_CLASS to Kconfig wifi: wilc1000: unregister wiphy only after netdev registration wifi: cfg80211: adjust allocation of colocated AP data wifi: mac80211: fix memory leak in ieee80211_mgd_assoc_ml_reconf() wifi: ath12k: fix key cache handling wifi: ath12k: Fix uninitialized variable access in ath12k_mac_allocate() function wifi: ath12k: Remove ath12k_get_num_hw() helper function wifi: ath12k: Refactor the ath12k_hw get helper function argument wifi: ath12k: Refactor ath12k_hw set helper function argument wifi: mt76: mt7996: add implicit beamforming support for mt7992 wifi: mt76: mt7996: fix beacon command during disabling wifi: mt76: mt7996: fix ldpc setting wifi: mt76: mt7996: fix definition of tx descriptor wifi: mt76: connac: adjust phy capabilities based on band constraints wifi: mt76: mt7996: fix incorrect indexing of MIB FW event wifi: mt76: mt7996: fix HE Phy capability wifi: mt76: mt7996: fix the capability of reception of EHT MU PPDU wifi: mt76: mt7996: add max mpdu len capability wifi: mt76: mt7921: avoid undesired changes of the preset regulatory domain ... ==================== Link: https://patch.msgid.link/20250117203529.72D45C4CEDD@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 185e5b869071812bcb278cf0973b8a7bbce0dc27 Author: Eric Dumazet Date: Fri Jan 17 23:21:13 2025 +0000 net: introduce netdev_napi_exit() After 1b23cdbd2bbc ("net: protect netdev->napi_list with netdev_lock()") it makes sense to iterate through dev->napi_list while holding the device lock. Also call synchronize_net() at most one time. Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250117232113.1612899-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/core/dev.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 12d5151be01017401b8d2681f3c975265a233eaf Author: Heiner Kallweit Date: Thu Jan 16 22:38:40 2025 +0100 net: phy: remove leftovers from switch to linkmode bitmaps We have some leftovers from the switch to linkmode bitmaps which - have never been used - are not used any longer - have no user outside phy_device.c So remove them. Signed-off-by: Heiner Kallweit Link: https://patch.msgid.link/5493b96e-88bb-4230-a911-322659ec5167@gmail.com Signed-off-by: Jakub Kicinski drivers/net/phy/phy_device.c | 54 ++------------------------------------------ include/linux/phy.h | 18 --------------- 2 files changed, 2 insertions(+), 70 deletions(-) commit bc50835e83f60f56e9bec2b392fb5544f250fb6f Author: Jamal Hadi Salim Date: Wed Jan 15 17:37:13 2025 -0800 net: sched: Disallow replacing of child qdisc from one parent to another Lion Ackermann was able to create a UAF which can be abused for privilege escalation with the following script Step 1. create root qdisc tc qdisc add dev lo root handle 1:0 drr step2. a class for packet aggregation do demonstrate uaf tc class add dev lo classid 1:1 drr step3. a class for nesting tc class add dev lo classid 1:2 drr step4. a class to graft qdisc to tc class add dev lo classid 1:3 drr step5. tc qdisc add dev lo parent 1:1 handle 2:0 plug limit 1024 step6. tc qdisc add dev lo parent 1:2 handle 3:0 drr step7. tc class add dev lo classid 3:1 drr step 8. tc qdisc add dev lo parent 3:1 handle 4:0 pfifo step 9. Display the class/qdisc layout tc class ls dev lo class drr 1:1 root leaf 2: quantum 64Kb class drr 1:2 root leaf 3: quantum 64Kb class drr 3:1 root leaf 4: quantum 64Kb tc qdisc ls qdisc drr 1: dev lo root refcnt 2 qdisc plug 2: dev lo parent 1:1 qdisc pfifo 4: dev lo parent 3:1 limit 1000p qdisc drr 3: dev lo parent 1:2 step10. trigger the bug <=== prevented by this patch tc qdisc replace dev lo parent 1:3 handle 4:0 step 11. Redisplay again the qdiscs/classes tc class ls dev lo class drr 1:1 root leaf 2: quantum 64Kb class drr 1:2 root leaf 3: quantum 64Kb class drr 1:3 root leaf 4: quantum 64Kb class drr 3:1 root leaf 4: quantum 64Kb tc qdisc ls qdisc drr 1: dev lo root refcnt 2 qdisc plug 2: dev lo parent 1:1 qdisc pfifo 4: dev lo parent 3:1 refcnt 2 limit 1000p qdisc drr 3: dev lo parent 1:2 Observe that a) parent for 4:0 does not change despite the replace request. There can only be one parent. b) refcount has gone up by two for 4:0 and c) both class 1:3 and 3:1 are pointing to it. Step 12. send one packet to plug echo "" | socat -u STDIN UDP4-DATAGRAM:127.0.0.1:8888,priority=$((0x10001)) step13. send one packet to the grafted fifo echo "" | socat -u STDIN UDP4-DATAGRAM:127.0.0.1:8888,priority=$((0x10003)) step14. lets trigger the uaf tc class delete dev lo classid 1:3 tc class delete dev lo classid 1:1 The semantics of "replace" is for a del/add _on the same node_ and not a delete from one node(3:1) and add to another node (1:3) as in step10. While we could "fix" with a more complex approach there could be consequences to expectations so the patch takes the preventive approach of "disallow such config". Joint work with Lion Ackermann Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jamal Hadi Salim Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250116013713.900000-1-kuba@kernel.org Signed-off-by: Jakub Kicinski net/sched/sch_api.c | 4 ++++ 1 file changed, 4 insertions(+) commit 12e070eb6964b341b41677fd260af5a305316a1f Author: Antoine Tenart Date: Thu Jan 16 10:21:57 2025 +0100 net: avoid race between device unregistration and ethnl ops The following trace can be seen if a device is being unregistered while its number of channels are being modified. DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 3 PID: 3754 at kernel/locking/mutex.c:564 __mutex_lock+0xc8a/0x1120 CPU: 3 UID: 0 PID: 3754 Comm: ethtool Not tainted 6.13.0-rc6+ #771 RIP: 0010:__mutex_lock+0xc8a/0x1120 Call Trace: ethtool_check_max_channel+0x1ea/0x880 ethnl_set_channels+0x3c3/0xb10 ethnl_default_set_doit+0x306/0x650 genl_family_rcv_msg_doit+0x1e3/0x2c0 genl_rcv_msg+0x432/0x6f0 netlink_rcv_skb+0x13d/0x3b0 genl_rcv+0x28/0x40 netlink_unicast+0x42e/0x720 netlink_sendmsg+0x765/0xc20 __sys_sendto+0x3ac/0x420 __x64_sys_sendto+0xe0/0x1c0 do_syscall_64+0x95/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e This is because unregister_netdevice_many_notify might run before the rtnl lock section of ethnl operations, eg. set_channels in the above example. In this example the rss lock would be destroyed by the device unregistration path before being used again, but in general running ethnl operations while dismantle has started is not a good idea. Fix this by denying any operation on devices being unregistered. A check was already there in ethnl_ops_begin, but not wide enough. Note that the same issue cannot be seen on the ioctl version (__dev_ethtool) because the device reference is retrieved from within the rtnl lock section there. Once dismantle started, the net device is unlisted and no reference will be found. Fixes: dde91ccfa25f ("ethtool: do not perform operations on net devices being unregistered") Signed-off-by: Antoine Tenart Reviewed-by: Przemek Kitszel Reviewed-by: Edward Cree Link: https://patch.msgid.link/20250116092159.50890-1-atenart@kernel.org Signed-off-by: Jakub Kicinski net/ethtool/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bff406bc042408c021e41a439698a346119c2f11 Author: Eric Dumazet Date: Fri Jan 17 22:46:26 2025 +0000 net: destroy dev->lock later in free_netdev() syzbot complained that free_netdev() was calling netif_napi_del() after dev->lock mutex has been destroyed. This fires a warning for CONFIG_DEBUG_MUTEXES=y builds. Move mutex_destroy(&dev->lock) near the end of free_netdev(). [1] DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 0 PID: 5971 at kernel/locking/mutex.c:564 __mutex_lock_common kernel/locking/mutex.c:564 [inline] WARNING: CPU: 0 PID: 5971 at kernel/locking/mutex.c:564 __mutex_lock+0xdac/0xee0 kernel/locking/mutex.c:735 Modules linked in: CPU: 0 UID: 0 PID: 5971 Comm: syz-executor Not tainted 6.13.0-rc7-syzkaller-01131-g8d20dcda404d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 RIP: 0010:__mutex_lock_common kernel/locking/mutex.c:564 [inline] RIP: 0010:__mutex_lock+0xdac/0xee0 kernel/locking/mutex.c:735 Code: 0f b6 04 38 84 c0 0f 85 1a 01 00 00 83 3d 6f 40 4c 04 00 75 19 90 48 c7 c7 60 84 0a 8c 48 c7 c6 00 85 0a 8c e8 f5 dc 91 f5 90 <0f> 0b 90 90 90 e9 c7 f3 ff ff 90 0f 0b 90 e9 29 f8 ff ff 90 0f 0b RSP: 0018:ffffc90003317580 EFLAGS: 00010246 RAX: ee0f97edaf7b7d00 RBX: ffff8880299f8cb0 RCX: ffff8880323c9e00 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc90003317710 R08: ffffffff81602ac2 R09: 1ffff110170c519a R10: dffffc0000000000 R11: ffffed10170c519b R12: 0000000000000000 R13: 0000000000000000 R14: 1ffff92000662ec4 R15: dffffc0000000000 FS: 000055557a046500(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fd581d46ff8 CR3: 000000006f870000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: netdev_lock include/linux/netdevice.h:2691 [inline] __netif_napi_del include/linux/netdevice.h:2829 [inline] netif_napi_del include/linux/netdevice.h:2848 [inline] free_netdev+0x2d9/0x610 net/core/dev.c:11621 netdev_run_todo+0xf21/0x10d0 net/core/dev.c:11189 nsim_destroy+0x3c3/0x620 drivers/net/netdevsim/netdev.c:1028 __nsim_dev_port_del+0x14b/0x1b0 drivers/net/netdevsim/dev.c:1428 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1440 [inline] nsim_dev_reload_destroy+0x28a/0x490 drivers/net/netdevsim/dev.c:1661 nsim_drv_remove+0x58/0x160 drivers/net/netdevsim/dev.c:1676 device_remove drivers/base/dd.c:567 [inline] Fixes: 1b23cdbd2bbc ("net: protect netdev->napi_list with netdev_lock()") Reported-by: syzbot+85ff1051228a04613a32@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/678add43.050a0220.303755.0016.GAE@google.com/T/#u Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250117224626.1427577-1-edumazet@google.com Signed-off-by: Jakub Kicinski net/core/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 17656eb5cfe5b7287dc7f1b21ad02acc25ecdb15 Author: Jakub Kicinski Date: Fri Jan 17 10:37:26 2025 -0800 eth: bnxt: fix string truncation warning in FW version W=1 builds with gcc 14.2.1 report: drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:4193:32: error: ‘%s’ directive output may be truncated writing up to 31 bytes into a region of size 27 [-Werror=format-truncation=] 4193 | "/pkg %s", buf); It's upset that we let buf be full length but then we use 5 characters for "/pkg ". The builds is also clear with clang version 19.1.5 now. Reviewed-by: Michael Chan Link: https://patch.msgid.link/20250117183726.1481524-1-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b4fd35343d72f4d4f964de2a9fe36143cc18f39 Author: Matthieu Baerts (NGI0) Date: Fri Jan 17 18:40:31 2025 +0100 mptcp: sysctl: add syn_retrans_before_tcp_fallback The number of SYN + MPC retransmissions before falling back to TCP was fixed to 2. This is certainly a good default value, but having a fixed number can be a problem in some environments. The current behaviour means that if all packets are dropped, there will be: - The initial SYN + MPC - 2 retransmissions with MPC - The next ones will be without MPTCP. So typically ~3 seconds before falling back to TCP. In some networks where some temporally blackholes are unfortunately frequent, or when a client tries to initiate connections while the network is not ready yet, this can cause new connections not to have MPTCP connections. In such environments, it is now possible to increase the number of SYN retransmissions with MPTCP options to make sure MPTCP is used. Interesting values are: - 0: the first retransmission will be done without MPTCP options: quite aggressive, but also a higher risk of detecting false-positive MPTCP blackholes. - >= 128: all SYN retransmissions will keep the MPTCP options: back to the < 6.12 behaviour. The default behaviour is not changed here. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250117-net-next-mptcp-syn_retrans_before_tcp_fallback-v1-1-ab4b187099b0@kernel.org Signed-off-by: Jakub Kicinski Documentation/networking/mptcp-sysctl.rst | 16 ++++++++++++++++ net/mptcp/ctrl.c | 21 +++++++++++++++++---- 2 files changed, 33 insertions(+), 4 deletions(-) commit ec81a13d88023a0fd4e6694c2d77da0983c5237c Merge: 70d81f25cc92 f84039939512 Author: Jakub Kicinski Date: Sat Jan 18 17:26:42 2025 -0800 Merge branch 'fix-race-conditions-in-ndo_get_stats64' Shinas Rasheed says: ==================== Fix race conditions in ndo_get_stats64 Fix race conditions in ndo_get_stats64 by storing tx/rx stats locally and not availing per queue resources which could be torn down during interface stop. Also remove stats fetch from firmware which is currently unnecessary ==================== Link: https://patch.msgid.link/20250117094653.2588578-1-srasheed@marvell.com Signed-off-by: Jakub Kicinski commit f84039939512e6d88b0f2f353695530f123be789 Author: Shinas Rasheed Date: Fri Jan 17 01:46:53 2025 -0800 octeon_ep_vf: update tx/rx stats locally for persistence Update tx/rx stats locally, so that ndo_get_stats64() can use that and not rely on per queue resources to obtain statistics. The latter used to cause race conditions when the device stopped. Signed-off-by: Shinas Rasheed Link: https://patch.msgid.link/20250117094653.2588578-5-srasheed@marvell.com Signed-off-by: Jakub Kicinski .../marvell/octeon_ep_vf/octep_vf_ethtool.c | 29 ++++++++-------------- .../ethernet/marvell/octeon_ep_vf/octep_vf_main.c | 17 ++++++------- .../ethernet/marvell/octeon_ep_vf/octep_vf_main.h | 6 +++++ .../ethernet/marvell/octeon_ep_vf/octep_vf_rx.c | 9 ++++--- .../ethernet/marvell/octeon_ep_vf/octep_vf_rx.h | 2 +- .../ethernet/marvell/octeon_ep_vf/octep_vf_tx.c | 7 +++--- .../ethernet/marvell/octeon_ep_vf/octep_vf_tx.h | 2 +- 7 files changed, 35 insertions(+), 37 deletions(-) commit cc0e510cc89fe0a6479203bc20cd964962dc6a43 Author: Shinas Rasheed Date: Fri Jan 17 01:46:52 2025 -0800 octeon_ep_vf: remove firmware stats fetch in ndo_get_stats64 The firmware stats fetch call that happens in ndo_get_stats64() is currently not required, and causes a warning to issue. The corresponding warn log for the PF is given below: [ 123.316837] ------------[ cut here ]------------ [ 123.316840] Voluntary context switch within RCU read-side critical section! [ 123.316917] pc : rcu_note_context_switch+0x2e4/0x300 [ 123.316919] lr : rcu_note_context_switch+0x2e4/0x300 [ 123.316947] Call trace: [ 123.316949] rcu_note_context_switch+0x2e4/0x300 [ 123.316952] __schedule+0x84/0x584 [ 123.316955] schedule+0x38/0x90 [ 123.316956] schedule_timeout+0xa0/0x1d4 [ 123.316959] octep_send_mbox_req+0x190/0x230 [octeon_ep] [ 123.316966] octep_ctrl_net_get_if_stats+0x78/0x100 [octeon_ep] [ 123.316970] octep_get_stats64+0xd4/0xf0 [octeon_ep] [ 123.316975] dev_get_stats+0x4c/0x114 [ 123.316977] dev_seq_printf_stats+0x3c/0x11c [ 123.316980] dev_seq_show+0x1c/0x40 [ 123.316982] seq_read_iter+0x3cc/0x4e0 [ 123.316985] seq_read+0xc8/0x110 [ 123.316987] proc_reg_read+0x9c/0xec [ 123.316990] vfs_read+0xc8/0x2ec [ 123.316993] ksys_read+0x70/0x100 [ 123.316995] __arm64_sys_read+0x20/0x30 [ 123.316997] invoke_syscall.constprop.0+0x7c/0xd0 [ 123.317000] do_el0_svc+0xb4/0xd0 [ 123.317002] el0_svc+0xe8/0x1f4 [ 123.317005] el0t_64_sync_handler+0x134/0x150 [ 123.317006] el0t_64_sync+0x17c/0x180 [ 123.317008] ---[ end trace 63399811432ab69b ]--- Fixes: c3fad23cdc06 ("octeon_ep_vf: add support for ndo ops") Signed-off-by: Shinas Rasheed Link: https://patch.msgid.link/20250117094653.2588578-4-srasheed@marvell.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c | 8 -------- 1 file changed, 8 deletions(-) commit 10fad79846e49f67ad1a0a05910837125c6ca9ad Author: Shinas Rasheed Date: Fri Jan 17 01:46:51 2025 -0800 octeon_ep: update tx/rx stats locally for persistence Update tx/rx stats locally, so that ndo_get_stats64() can use that and not rely on per queue resources to obtain statistics. The latter used to cause race conditions when the device stopped. Signed-off-by: Shinas Rasheed Link: https://patch.msgid.link/20250117094653.2588578-3-srasheed@marvell.com Signed-off-by: Jakub Kicinski .../net/ethernet/marvell/octeon_ep/octep_ethtool.c | 41 +++++++++------------- .../net/ethernet/marvell/octeon_ep/octep_main.c | 19 +++++----- .../net/ethernet/marvell/octeon_ep/octep_main.h | 6 ++++ drivers/net/ethernet/marvell/octeon_ep/octep_rx.c | 11 +++--- drivers/net/ethernet/marvell/octeon_ep/octep_rx.h | 4 +-- drivers/net/ethernet/marvell/octeon_ep/octep_tx.c | 7 ++-- drivers/net/ethernet/marvell/octeon_ep/octep_tx.h | 4 +-- 7 files changed, 45 insertions(+), 47 deletions(-) commit 1f64255bb76c11d0c41a7d81d7cec68e49d5362d Author: Shinas Rasheed Date: Fri Jan 17 01:46:50 2025 -0800 octeon_ep: remove firmware stats fetch in ndo_get_stats64 The firmware stats fetch call that happens in ndo_get_stats64() is currently not required, and causes a warning to issue. The warn log is given below: [ 123.316837] ------------[ cut here ]------------ [ 123.316840] Voluntary context switch within RCU read-side critical section! [ 123.316917] pc : rcu_note_context_switch+0x2e4/0x300 [ 123.316919] lr : rcu_note_context_switch+0x2e4/0x300 [ 123.316947] Call trace: [ 123.316949] rcu_note_context_switch+0x2e4/0x300 [ 123.316952] __schedule+0x84/0x584 [ 123.316955] schedule+0x38/0x90 [ 123.316956] schedule_timeout+0xa0/0x1d4 [ 123.316959] octep_send_mbox_req+0x190/0x230 [octeon_ep] [ 123.316966] octep_ctrl_net_get_if_stats+0x78/0x100 [octeon_ep] [ 123.316970] octep_get_stats64+0xd4/0xf0 [octeon_ep] [ 123.316975] dev_get_stats+0x4c/0x114 [ 123.316977] dev_seq_printf_stats+0x3c/0x11c [ 123.316980] dev_seq_show+0x1c/0x40 [ 123.316982] seq_read_iter+0x3cc/0x4e0 [ 123.316985] seq_read+0xc8/0x110 [ 123.316987] proc_reg_read+0x9c/0xec [ 123.316990] vfs_read+0xc8/0x2ec [ 123.316993] ksys_read+0x70/0x100 [ 123.316995] __arm64_sys_read+0x20/0x30 [ 123.316997] invoke_syscall.constprop.0+0x7c/0xd0 [ 123.317000] do_el0_svc+0xb4/0xd0 [ 123.317002] el0_svc+0xe8/0x1f4 [ 123.317005] el0t_64_sync_handler+0x134/0x150 [ 123.317006] el0t_64_sync+0x17c/0x180 [ 123.317008] ---[ end trace 63399811432ab69b ]--- Fixes: 6a610a46bad1 ("octeon_ep: add support for ndo ops") Signed-off-by: Shinas Rasheed Link: https://patch.msgid.link/20250117094653.2588578-2-srasheed@marvell.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 10 ---------- 1 file changed, 10 deletions(-) commit 50309d38114c36b8e2c361da59a9b144fd2b1557 Merge: a26892ee1297 9d301a53a532 Author: Jakub Kicinski Date: Sat Jan 18 17:19:04 2025 -0800 Merge branch 'net-xilinx-axienet-enable-adaptive-irq-coalescing-with-dim' Sean Anderson says: ==================== net: xilinx: axienet: Report an error for bad coalesce settings ==================== Link: https://patch.msgid.link/20250116232954.2696930-1-sean.anderson@linux.dev Signed-off-by: Jakub Kicinski commit 9d301a53a532e60586316f3401ca4912601dbb65 Author: Sean Anderson Date: Thu Jan 16 18:29:50 2025 -0500 net: xilinx: axienet: Report an error for bad coalesce settings Instead of silently ignoring invalid/unsupported settings, report an error. Additionally, relax the check for non-zero usecs to apply only when it will be used (i.e. when frames != 1). Signed-off-by: Sean Anderson Reviewed by: Shannon Nelson Link: https://patch.msgid.link/20250116232954.2696930-3-sean.anderson@linux.dev Signed-off-by: Jakub Kicinski drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 27 ++++++++++++++++------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 5cff9d1756fbe5c3f15e0284f6713f49b5c5164a Author: Sean Anderson Date: Thu Jan 16 18:29:49 2025 -0500 net: xilinx: axienet: Add some symbolic constants for IRQ delay timer Instead of using literals, add some symbolic constants for the IRQ delay timer calculation. Signed-off-by: Sean Anderson Reviewed by: Shannon Nelson Link: https://patch.msgid.link/20250116232954.2696930-2-sean.anderson@linux.dev Signed-off-by: Jakub Kicinski drivers/net/ethernet/xilinx/xilinx_axienet.h | 3 +++ drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) commit a26892ee1297dcdb8f5e08e5971f4439a9c2abb5 Author: Andy Shevchenko Date: Thu Jan 16 17:30:37 2025 +0200 nfc: mrvl: Don't use "proxy" headers Update header inclusions to follow IWYU (Include What You Use) principle. In this case replace of_gpio.h, which is subject to remove by the GPIOLIB subsystem, with the respective headers that are being used by the driver. Acked-by: Krzysztof Kozlowski Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20250116153119.148097-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski drivers/nfc/nfcmrvl/uart.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 33b5c84ae4fd962884d02e943b341e9d531fb9a1 Author: Andy Shevchenko Date: Thu Jan 16 17:27:28 2025 +0200 nfc: st21nfca: Remove unused of_gpio.h of_gpio.h is deprecated and subject to remove. The drivers in question don't use it, simply remove the unused header. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Andy Shevchenko Signed-off-by: Jakub Kicinski drivers/nfc/st21nfca/i2c.c | 1 - 1 file changed, 1 deletion(-) commit db049866943a38bf46a34fa120d526663339d7a5 Author: Michal Wilczynski Date: Mon Dec 2 11:05:35 2024 +0100 mailbox: th1520: Fix memory corruption due to incorrect array size The functions th1520_mbox_suspend_noirq and th1520_mbox_resume_noirq are intended to save and restore the interrupt mask registers in the MBOX ICU0. However, the array used to store these registers was incorrectly sized, leading to memory corruption when accessing all four registers. This commit corrects the array size to accommodate all four interrupt mask registers, preventing memory corruption during suspend and resume operations. Fixes: 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/a99e72be-8490-4960-ad26-cbfef6af238f@stanley.mountain/ Signed-off-by: Michal Wilczynski Signed-off-by: Jassi Brar drivers/mailbox/mailbox-th1520.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 170a264d2611a0bfa96b7818730473db5e7546fc Author: Uros Bizjak Date: Sat Dec 14 10:12:59 2024 +0100 mailbox: zynqmp: Remove invalid __percpu annotation in zynqmp_ipi_probe() struct zynqmp_ipi_pdata __percpu *pdata is not a per-cpu variable, so it should not be annotated with __percpu annotation. Remove invalid __percpu annotation to fix several zynqmp-ipi-mailbox.c:920:15: warning: incorrect type in assignment (different address spaces) zynqmp-ipi-mailbox.c:920:15: expected struct zynqmp_ipi_pdata [noderef] __percpu *pdata zynqmp-ipi-mailbox.c:920:15: got void * zynqmp-ipi-mailbox.c:927:56: warning: incorrect type in argument 3 (different address spaces) zynqmp-ipi-mailbox.c:927:56: expected unsigned int [usertype] *out_value zynqmp-ipi-mailbox.c:927:56: got unsigned int [noderef] __percpu * ... and several drivers/mailbox/zynqmp-ipi-mailbox.c:924:9: warning: dereference of noderef expression ... sparse warnings. There were no changes in the resulting object file. Cc: stable@vger.kernel.org Fixes: 6ffb1635341b ("mailbox: zynqmp: handle SGI for shared IPI") Signed-off-by: Uros Bizjak Reviewed-by: Michal Simek Reviewed-by: Tanmay Shah Signed-off-by: Jassi Brar drivers/mailbox/zynqmp-ipi-mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06e6994f0361eac3f28c29474a0e256c44a4f91e Author: Tudor Ambarus Date: Wed Jan 15 14:18:16 2025 +0000 MAINTAINERS: add entry for Samsung Exynos mailbox driver Add entry for the Samsung Exynos mailbox driver. Signed-off-by: Tudor Ambarus Reviewed-by: Krzysztof Kozlowski Reviewed-by: Peter Griffin Signed-off-by: Jassi Brar MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit fbf7e5ce408e0619072e84e93e875de52f2b5fa5 Author: Tudor Ambarus Date: Wed Jan 15 14:18:15 2025 +0000 mailbox: add Samsung Exynos driver The Samsung Exynos mailbox controller, used on Google GS101 SoC, has 16 flag bits for hardware interrupt generation and a shared register for passing mailbox messages. When the controller is used by the ACPM interface the shared register is ignored and the mailbox controller acts as a doorbell. The controller just raises the interrupt to APM after the ACPM interface has written the message to SRAM. Add support for the Samsung Exynos mailbox controller. Signed-off-by: Tudor Ambarus Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 11 +++ drivers/mailbox/Makefile | 2 + drivers/mailbox/exynos-mailbox.c | 157 +++++++++++++++++++++++++++++++++ include/linux/mailbox/exynos-message.h | 19 ++++ 4 files changed, 189 insertions(+) commit 56cf1209f61c08cb210d993434255efcb6a907a5 Author: Tudor Ambarus Date: Wed Jan 15 14:18:14 2025 +0000 dt-bindings: mailbox: add google,gs101-mbox Add bindings for the Samsung Exynos Mailbox Controller. Signed-off-by: Tudor Ambarus Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar .../bindings/mailbox/google,gs101-mbox.yaml | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit 443a5cae7e61cac66f4ec5a000d6eaacab59feda Author: Gokul Sriram Palanisamy Date: Tue Jan 7 15:46:44 2025 +0530 mailbox: qcom: Add support for IPQ5424 APCS IPC IPQ5424 mailbox do not have clock support and reuses msm8994_apcs_data. Signed-off-by: Gokul Sriram Palanisamy Signed-off-by: Jassi Brar drivers/mailbox/qcom-apcs-ipc-mailbox.c | 1 + 1 file changed, 1 insertion(+) commit 1122870325756abdaa6bac17b10613d1adc4eebf Author: Gokul Sriram Palanisamy Date: Tue Jan 7 15:46:42 2025 +0530 dt-bindings: mailbox: qcom: Add IPQ5424 APCS compatible Add compatible for the Qualcomm IPQ5424 APCS block. Signed-off-by: Gokul Sriram Palanisamy Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml | 1 + 1 file changed, 1 insertion(+) commit 16274d7e51bd6e8029b0189a8950583681c254f1 Author: Mukesh Ojha Date: Mon Dec 30 13:24:25 2024 +0530 mailbox: qcom-ipcc: Reset CLEAR_ON_RECV_RD if set from boot firmware For some SoCs, boot firmware is using the same IPCC instance used by Linux and it has kept CLEAR_ON_RECV_RD set which basically means interrupt pending registers are cleared when RECV_ID is read and the register automatically updates to the next pending interrupt/client status based on priority. Clear the CLEAR_ON_RECV_RD if it is set from the boot firmware. Signed-off-by: Mukesh Ojha Signed-off-by: Jassi Brar drivers/mailbox/qcom-ipcc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e4b1d67e71419c4af581890ecea84b04920d4116 Author: Valentina Fernandez Date: Tue Dec 17 11:31:34 2024 +0000 mailbox: add Microchip IPC support Add a mailbox controller driver for the Microchip Inter-processor Communication (IPC), which is used to send and receive data between processors. The driver uses the RISC-V Supervisor Binary Interface (SBI) to communicate with software running in machine mode (M-mode) to access the IPC hardware block. Additional details on the Microchip vendor extension and the IPC function IDs described in the driver can be found in the following documentation: https://github.com/linux4microchip/microchip-sbi-ecall-extension This SBI interface in this driver is compatible with the Mi-V Inter-hart Communication (IHC) IP. Transmitting and receiving data through the mailbox framework is done through struct mchp_ipc_msg. Signed-off-by: Valentina Fernandez Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 13 + drivers/mailbox/Makefile | 2 + drivers/mailbox/mailbox-mchp-ipc-sbi.c | 504 +++++++++++++++++++++++++++++++++ include/linux/mailbox/mchp-ipc.h | 33 +++ 4 files changed, 552 insertions(+) commit af33bd58c244e2403bf7eca45f58b31946fdf2be Author: Valentina Fernandez Date: Tue Dec 17 11:31:33 2024 +0000 dt-bindings: mailbox: add binding for Microchip IPC mailbox controller Add a dt-binding for the Microchip Inter-Processor Communication (IPC) mailbox controller. Signed-off-by: Valentina Fernandez Reviewed-by: Rob Herring (Arm) Signed-off-by: Jassi Brar .../bindings/mailbox/microchip,sbi-ipc.yaml | 123 +++++++++++++++++++++ 1 file changed, 123 insertions(+) commit 0b7f8328f988178b55ee11d772a6e1238c04d29d Author: Pekka Pessi Date: Mon Dec 2 15:35:59 2024 +0530 mailbox: tegra-hsp: Clear mailbox before using message The Tegra RCE (Camera) driver expects the mailbox to be empty before processing the IVC messages. On RT kernel, the threads processing the IVC messages (which are invoked after `mbox_chan_received_data()` is called) may be on a different CPU or running with a higher priority than the HSP interrupt handler thread. This can cause it to act on the message before the mailbox gets cleared in the HSP interrupt handler resulting in a loss of IVC notification. Fix this by clearing the mailbox data register before calling `mbox_chan_received_data()`. Fixes: 8f585d14030d ("mailbox: tegra-hsp: Add tegra_hsp_sm_ops") Fixes: 74c20dd0f892 ("mailbox: tegra-hsp: Add 128-bit shared mailbox support") Cc: stable@vger.kernel.org Signed-off-by: Pekka Pessi Signed-off-by: Kartik Rajput Acked-by: Thierry Reding Signed-off-by: Jassi Brar drivers/mailbox/tegra-hsp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f055feb49c1c4333abb80ce1e9d93841cf74ea84 Author: Dan Carpenter Date: Sat Nov 30 13:07:23 2024 +0300 mailbox: mpfs: fix copy and paste bug in probe This code accidentally checks ->ctrl_base instead of ->mbox_base so the error handling can never be triggered. Fixes: a4123ffab9ec ("mailbox: mpfs: support new, syscon based, devicetree configuration") Signed-off-by: Dan Carpenter Reviewed-by: Conor Dooley Signed-off-by: Jassi Brar drivers/mailbox/mailbox-mpfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0f98e14c010bcf27898b635a54c1994ac4110a8 Author: Dan Carpenter Date: Sat Nov 30 13:07:39 2024 +0300 mailbox: th1520: Fix a NULL vs IS_ERR() bug The devm_ioremap() function doesn't return error pointers, it returns NULL. Update the error checking to match. Fixes: 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver") Signed-off-by: Dan Carpenter Reviewed-by: Michal Wilczynski Signed-off-by: Jassi Brar drivers/mailbox/mailbox-th1520.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b6de116e4636e1a45e5ee69264a66cfab721e581 Author: Yunhui Cui Date: Tue Jul 23 10:18:20 2024 +0800 riscv/mm/fault: add show_pte() before die() When the kernel displays "Unable to handle kernel paging request at virtual address", we would like to confirm the status of the virtual address in the page table. So add show_pte() before die(). Signed-off-by: Yunhui Cui Reviewed-by: Alexandre Ghiti Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20240723021820.87718-1-cuiyunhui@bytedance.com Signed-off-by: Palmer Dabbelt arch/riscv/mm/fault.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 42d9972732f77ced1b7a2406907b19d46c62bcf9 Author: Bjorn Helgaas Date: Fri Jan 17 10:10:37 2025 -0600 PCI: of_property: Rename struct of_pci_range to of_pci_range_entry Previously there were two definitions of struct of_pci_range: one in include/linux/of_address.h and another local to drivers/pci/of_property.c. Rename the local struct of_pci_range to of_pci_range_entry to avoid confusion. Link: https://lore.kernel.org/r/20250117161037.643953-1-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Lizhi Hou drivers/pci/of_property.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4dbf0155dfcfa65440b5f70d3e905261208b387e Author: Frank Li Date: Tue Nov 19 14:44:19 2024 -0500 of: address: Add parent_bus_addr to struct of_pci_range Add a new field called 'parent_bus_addr' to struct of_pci_range to use when retrieving parent bus address information. Refer to the diagram below to better understand that the bus fabric in some systems (like i.MX8QXP) does not always use a 1:1 address map between input and output. Currently, many controller drivers use the cpu_addr_fixup() callback that would often hardcode address translation directly in the code, e.g., "cpu_addr & CDNS_PLAT_CPU_TO_BUS_ADDR" or "cpu_addr + BUS_IATU_OFFSET", etc., even though those translations *should* be described via DT. However, the cpu_addr_fixup() can be eliminated if DT correctly reflects hardware behavior and drivers use 'parent_bus_addr' in struct of_pci_range. ┌─────────┐ ┌────────────┐ ┌─────┐ │ │ IA: 0x8ff8_0000 │ │ │ CPU ├───►│ ┌────►├─────────────────┐ │ PCI │ └─────┘ │ │ │ IA: 0x8ff0_0000 │ │ │ CPU Addr │ │ ┌─►├─────────────┐ │ │ Controller │ 0x7ff8_0000─┼───┘ │ │ │ │ │ │ │ │ │ │ │ │ │ PCI Addr 0x7ff0_0000─┼──────┘ │ │ └──► IOSpace ─┼────────────► │ │ │ │ │ 0 0x7000_0000─┼────────►├─────────┐ │ │ │ └─────────┘ │ └──────► CfgSpace ─┼────────────► BUS Fabric │ │ │ 0 │ │ │ └──────────► MemSpace ─┼────────────► IA: 0x8000_0000 │ │ 0x8000_0000 └────────────┘ bus@5f000000 { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; ranges = <0x80000000 0x0 0x70000000 0x10000000>; pcie@5f010000 { compatible = "fsl,imx8q-pcie"; reg = <0x5f010000 0x10000>, <0x8ff00000 0x80000>; reg-names = "dbi", "config"; #address-cells = <3>; #size-cells = <2>; device_type = "pci"; bus-range = <0x00 0xff>; ranges = <0x81000000 0 0x00000000 0x8ff80000 0 0x00010000>, <0x82000000 0 0x80000000 0x80000000 0 0x0ff00000>; ... }; }; In the diagram above, the 'parent_bus_addr' field in struct of_pci_range can indicate internal address (IA) address information. Link: https://lore.kernel.org/r/20241119-pci_fixup_addr-v8-1-c4bfa5193288@nxp.com Signed-off-by: Frank Li [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring (Arm) Acked-by: Manivannan Sadhasivam drivers/of/address.c | 2 ++ include/linux/of_address.h | 1 + 2 files changed, 3 insertions(+) commit 9d6b1bd6b3c83e36810570024ce4bbb8ec24f64e Author: Richard Zhu Date: Tue Nov 26 15:57:01 2024 +0800 PCI: imx6: Add i.MX8MQ, i.MX8Q and i.MX95 PM support Add i.MX8MQ, i.MX8Q and i.MX95 PCIe suspend/resume support. Link: https://lore.kernel.org/r/20241126075702.4099164-10-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Frank Li drivers/pci/controller/dwc/pci-imx6.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit a528d1a725974d5e60a8b42fe4d0dade0b5fd026 Author: Frank Li Date: Tue Nov 26 15:57:00 2024 +0800 PCI: imx6: Use DWC common suspend resume method Call common DWC suspend/resume function. Use DWC common iATU method to send out PME_TURN_OFF message. In old DWC implementations, PCIE_ATU_INHIBIT_PAYLOAD in iATU Ctrl2 register is reserved, so the generic DWC implementation of sending the PME_Turn_Off message using a dummy MMIO write cannot be used. Use the previous method to kick off PME_TURN_OFF message for these platforms. The System Reset Control (SRC) interface is used to toggle 'turnoff_reset' to send PME_TURN_OFF and since the DWC implementation is used, it is not needed now. Replace the imx_pcie_stop_link() and imx_pcie_host_exit() by dw_pcie_suspend_noirq() in imx_pcie_suspend_noirq(). Since dw_pcie_suspend_noirq() already does these, see below call stack: dw_pcie_suspend_noirq() dw_pcie_stop_link() imx_pcie_stop_link() pci->pp.ops->deinit() imx_pcie_host_exit() Replace the imx_pcie_host_init(), dw_pcie_setup_rc() and imx_pcie_start_link() by dw_pcie_resume_noirq() in imx_pcie_resume_noirq(). Since dw_pcie_resume_noirq() already does these, see below call stack: dw_pcie_resume_noirq() pci->pp.ops->init() imx_pcie_host_init() dw_pcie_setup_rc() dw_pcie_start_link() imx_pcie_start_link(; Link: https://lore.kernel.org/r/20241126075702.4099164-9-hongxing.zhu@nxp.com Signed-off-by: Frank Li Signed-off-by: Richard Zhu Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pci-imx6.c | 96 +++++++++++++---------------------- 1 file changed, 35 insertions(+), 61 deletions(-) commit ec57335b81d8fcf3088994c532b5ca21e839616a Author: Bjorn Helgaas Date: Fri Jan 17 15:03:04 2025 -0600 PCI: dwc: Add dw_pcie_suspend_noirq(), dw_pcie_resume_noirq() stubs for !CONFIG_PCIE_DW_HOST Previously pcie-designware.h declared dw_pcie_suspend_noirq() and dw_pcie_resume_noirq() unconditionally, even though they were only implemented when CONFIG_PCIE_DW_HOST was defined. Add no-op stubs for them when CONFIG_PCIE_DW_HOST is not defined so drivers that support both Root Complex and Endpoint modes don't need Link: https://lore.kernel.org/r/20250117213810.GA656803@bhelgaas Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pcie-designware.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit dfa2f4d5f9e5d757700cefa8ee480099889f1c69 Author: Philipp Stanner Date: Mon Dec 9 14:06:33 2024 +0100 PCI: Remove devres from pci_intx() pci_intx() is a hybrid function which can sometimes be managed through devres. This hybrid nature is undesirable. Since all users of pci_intx() have by now been ported either to always-managed pcim_intx() or never-managed pci_intx_unmanaged(), the devres functionality can be removed from pci_intx(). Consequently, pci_intx_unmanaged() is now redundant, because pci_intx() itself is now unmanaged. Remove the devres functionality from pci_intx(). Have all users of pci_intx_unmanaged() call pci_intx(). Remove pci_intx_unmanaged(). Link: https://lore.kernel.org/r/20241209130632.132074-13-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Bjorn Helgaas Acked-by: Paolo Abeni drivers/misc/cardreader/rtsx_pcr.c | 2 +- drivers/misc/tifm_7xx1.c | 6 ++-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +- drivers/net/ethernet/brocade/bna/bnad.c | 2 +- drivers/ntb/hw/amd/ntb_hw_amd.c | 4 +-- drivers/ntb/hw/intel/ntb_hw_gen1.c | 2 +- drivers/pci/devres.c | 4 +-- drivers/pci/msi/api.c | 2 +- drivers/pci/msi/msi.c | 2 +- drivers/pci/pci.c | 43 ++---------------------- drivers/vfio/pci/vfio_pci_core.c | 2 +- drivers/vfio/pci/vfio_pci_intrs.c | 10 +++--- drivers/xen/xen-pciback/conf_space_header.c | 2 +- include/linux/pci.h | 1 - 14 files changed, 22 insertions(+), 62 deletions(-) commit 41400bc53378e706d672a43690c7ce682ec63fee Author: Philipp Stanner Date: Mon Dec 9 14:06:25 2024 +0100 net/ethernet: Use never-managed version of pci_intx() pci_intx() is a hybrid function which can sometimes be managed through devres. To remove this hybrid nature from pci_intx(), it is necessary to port users to either an always-managed or a never-managed version. broadcom/bnx2x and brocade/bna enable their PCI devices with pci_enable_device(). Thus, they need the never-managed version. Replace pci_intx() with pci_intx_unmanaged(). Link: https://lore.kernel.org/r/20241209130632.132074-5-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Bjorn Helgaas Acked-by: Paolo Abeni drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +- drivers/net/ethernet/brocade/bna/bnad.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 97fd88089fa26bc7b4c5a648a0ad7fbb03d9b7af Author: Philipp Stanner Date: Mon Dec 9 14:06:32 2024 +0100 HID: amd_sfh: Use always-managed version of pcim_intx() pci_intx() is a hybrid function which can sometimes be managed through devres. To remove this hybrid nature from pci_intx(), it is necessary to port users to either an always-managed or a never-managed version. All users of amd_mp2_pci_remove(), where pci_intx() is used, call pcim_enable_device(), which is why the driver needs the always-managed version. Replace pci_intx() with pcim_intx(). Link: https://lore.kernel.org/r/20241209130632.132074-12-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Bjorn Helgaas Acked-by: Basavaraj Natikar drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 4 ++-- drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 71cf28c649efb028a423987f3793a84fa0b2cdbe Author: Philipp Stanner Date: Mon Dec 9 14:06:31 2024 +0100 wifi: qtnfmac: use always-managed version of pcim_intx() pci_intx() is a hybrid function which can sometimes be managed through devres. To remove this hybrid nature from pci_intx(), it is necessary to port users to either an always-managed or a never-managed version. qtnfmac enables its PCI device with pcim_enable_device(). Thus, it needs the always-managed version. Replace pci_intx() with pcim_intx(). Link: https://lore.kernel.org/r/20241209130632.132074-11-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Bjorn Helgaas Acked-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eeda4c86d8097d316ca3474ffa52b79ee5c98d6e Author: Philipp Stanner Date: Mon Dec 9 14:06:30 2024 +0100 ata: Use always-managed version of pci_intx() pci_intx() is a hybrid function which can sometimes be managed through devres. To remove this hybrid nature from pci_intx(), it is necessary to port users to either an always-managed or a never-managed version. All users in ata enable their PCI devices with pcim_enable_device(). Thus, they need the always-managed version. Replace pci_intx() with pcim_intx(). Link: https://lore.kernel.org/r/20241209130632.132074-10-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Bjorn Helgaas Reviewed-by: Sergey Shtylyov Acked-by: Niklas Cassel drivers/ata/ahci.c | 2 +- drivers/ata/ata_piix.c | 2 +- drivers/ata/pata_rdc.c | 2 +- drivers/ata/sata_sil24.c | 2 +- drivers/ata/sata_sis.c | 2 +- drivers/ata/sata_uli.c | 2 +- drivers/ata/sata_vsc.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit b182cbaaa951720b142844445d34faa4d1a0766f Author: Philipp Stanner Date: Mon Dec 9 14:06:29 2024 +0100 PCI/MSI: Use never-managed version of pci_intx() pci_intx() is a hybrid function which can sometimes be managed through devres. To remove this hybrid nature from pci_intx(), it is necessary to port users to either an always-managed or a never-managed version. MSI sets up its own separate devres callback implicitly in pcim_setup_msi_release(). This callback ultimately uses pci_intx(), which is problematic since the callback runs on driver detach. That problem has last been described here: https://lore.kernel.org/all/ee44ea7ac760e73edad3f20b30b4d2fff66c1a85.camel@redhat.com/ Replace the call to pci_intx() with one to the never-managed version pci_intx_unmanaged(). Link: https://lore.kernel.org/r/20241209130632.132074-9-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Gleixner drivers/pci/msi/api.c | 2 +- drivers/pci/msi/msi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bf726979b8ab1220cd9605f66e8f64433b19a7dc Author: Philipp Stanner Date: Mon Dec 9 14:06:28 2024 +0100 vfio/pci: Use never-managed version of pci_intx() pci_intx() is a hybrid function which can sometimes be managed through devres. To remove this hybrid nature from pci_intx(), it is necessary to port users to either an always-managed or a never-managed version. vfio enables its PCI device with pci_enable_device(). Thus, it needs the never-managed version. Replace pci_intx() with pci_intx_unmanaged(). Link: https://lore.kernel.org/r/20241209130632.132074-8-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Bjorn Helgaas Acked-by: Alex Williamson drivers/vfio/pci/vfio_pci_core.c | 2 +- drivers/vfio/pci/vfio_pci_intrs.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit 96ee809b851b660a7d14bf1df4df5c8b3d88f8e3 Author: Philipp Stanner Date: Mon Dec 9 14:06:27 2024 +0100 misc: Use never-managed version of pci_intx() pci_intx() is a hybrid function which can sometimes be managed through devres. To remove this hybrid nature from pci_intx(), it is necessary to port users to either an always-managed or a never-managed version. cardreader/rtsx_pcr.c and tifm_7xx1.c enable their PCI devices with pci_enable_device(). Thus, they need the never-managed version. Replace pci_intx() with pci_intx_unmanaged(). Link: https://lore.kernel.org/r/20241209130632.132074-7-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Bjorn Helgaas Acked-by: Greg Kroah-Hartman drivers/misc/cardreader/rtsx_pcr.c | 2 +- drivers/misc/tifm_7xx1.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit f72acbeb2cc25b1769b3b3658ef4544caef25a42 Author: Philipp Stanner Date: Mon Dec 9 14:06:26 2024 +0100 ntb: Use never-managed version of pci_intx() pci_intx() is a hybrid function which can sometimes be managed through devres. To remove this hybrid nature from pci_intx(), it is necessary to port users to either an always-managed or a never-managed version. hw/amd and how/intel enable their PCI devices with pci_enable_device(). Thus, they need the never-managed version. Replace pci_intx() with pci_intx_unmanaged(). Link: https://lore.kernel.org/r/20241209130632.132074-6-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Bjorn Helgaas Acked-by: Shyam Sundar S K # ntb_hw_amd.c Acked-by: Dave Jiang # ntb_hw_gen1.c drivers/ntb/hw/amd/ntb_hw_amd.c | 4 ++-- drivers/ntb/hw/intel/ntb_hw_gen1.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 57ca6af53ebe5feac3b697afc562df016782d254 Author: Philipp Stanner Date: Mon Dec 9 14:06:24 2024 +0100 drivers/xen: Use never-managed version of pci_intx() pci_intx() is a hybrid function which can sometimes be managed through devres. To remove this hybrid nature from pci_intx(), it is necessary to port users to either an always-managed or a never-managed version. xen enables its PCI device with pci_enable_device(). Thus, it needs the never-managed version. Replace pci_intx() with pci_intx_unmanaged(). Link: https://lore.kernel.org/r/20241209130632.132074-4-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Bjorn Helgaas Acked-by: Juergen Gross drivers/xen/xen-pciback/conf_space_header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f546e8033d8f3e45d49622f04ca2fde650b80f6d Author: Philipp Stanner Date: Mon Dec 9 14:06:23 2024 +0100 PCI: Export pci_intx_unmanaged() and pcim_intx() pci_intx() is a hybrid function which sometimes performs devres operations, depending on whether pcim_enable_device() has been used to enable the pci_dev. This sometimes-managed nature of the function is problematic. Notably, it causes the function to allocate under some circumstances which makes it unusable from interrupt context. Export pcim_intx() (which is always managed) and rename __pcim_intx() (which is never managed) to pci_intx_unmanaged() and export it as well. Then all callers of pci_intx() can be ported to the version they need, depending whether they use pci_enable_device() or pcim_enable_device(). Link: https://lore.kernel.org/r/20241209130632.132074-3-pstanner@redhat.com Signed-off-by: Philipp Stanner [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas Reviewed-by: Damien Le Moal drivers/pci/devres.c | 24 +++--------------------- drivers/pci/pci.c | 29 +++++++++++++++++++++++++++++ include/linux/pci.h | 2 ++ 3 files changed, 34 insertions(+), 21 deletions(-) commit 2613c15b0cc1c0607d9f2b718d7bc117c40f9230 Merge: 26f2d6de4179 4bf97069239b Author: Palmer Dabbelt Date: Mon Dec 30 11:54:12 2024 -0800 Merge patch series "riscv: Add support for xtheadvector" Charlie Jenkins says: xtheadvector is a custom extension that is based upon riscv vector version 0.7.1 [1]. All of the vector routines have been modified to support this alternative vector version based upon whether xtheadvector was determined to be supported at boot. vlenb is not supported on the existing xtheadvector hardware, so a devicetree property thead,vlenb is added to provide the vlenb to Linux. There is a new hwprobe key RISCV_HWPROBE_KEY_VENDOR_EXT_THEAD_0 that is used to request which thead vendor extensions are supported on the current platform. This allows future vendors to allocate hwprobe keys for their vendor. Support for xtheadvector is also added to the vector kselftests. [1] https://github.com/T-head-Semi/thead-extension-spec/blob/95358cb2cca9489361c61d335e03d3134b14133f/xtheadvector.adoc * b4-shazam-merge: riscv: Add ghostwrite vulnerability selftests: riscv: Support xtheadvector in vector tests selftests: riscv: Fix vector tests riscv: hwprobe: Document thead vendor extensions and xtheadvector extension riscv: hwprobe: Add thead vendor extension probing riscv: vector: Support xtheadvector save/restore riscv: Add xtheadvector instruction definitions riscv: csr: Add CSR encodings for CSR_VXRM/CSR_VXSAT RISC-V: define the elements of the VCSR vector CSR riscv: vector: Use vlenb from DT for thead riscv: Add thead and xtheadvector as a vendor extension riscv: dts: allwinner: Add xtheadvector to the D1/D1s devicetree dt-bindings: cpus: add a thead vlen register length property dt-bindings: riscv: Add xtheadvector ISA extension description Signed-off-by: Charlie Jenkins Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-0-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt commit 4bf97069239bcfca9840936313c7ac35a6e04488 Author: Charlie Jenkins Date: Wed Nov 13 18:21:20 2024 -0800 riscv: Add ghostwrite vulnerability Follow the patterns of the other architectures that use GENERIC_CPU_VULNERABILITIES for riscv to introduce the ghostwrite vulnerability and mitigation. The mitigation is to disable all vector which is accomplished by clearing the bit from the cpufeature field. Ghostwrite only affects thead c9xx CPUs that impelment xtheadvector, so the vulerability will only be mitigated on these CPUs. Signed-off-by: Charlie Jenkins Tested-by: Yangyu Chen Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-14-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig.errata | 11 +++++++ arch/riscv/errata/thead/errata.c | 28 +++++++++++++++++ arch/riscv/include/asm/bugs.h | 22 +++++++++++++ arch/riscv/include/asm/errata_list.h | 3 +- arch/riscv/kernel/Makefile | 2 ++ arch/riscv/kernel/bugs.c | 60 ++++++++++++++++++++++++++++++++++++ arch/riscv/kernel/cpufeature.c | 10 +++++- drivers/base/cpu.c | 3 ++ include/linux/cpu.h | 1 + 9 files changed, 138 insertions(+), 2 deletions(-) commit c384c5d4a2aed5b6a10de1fcc2f5b46ad4aeeea8 Author: Charlie Jenkins Date: Wed Nov 13 18:21:19 2024 -0800 selftests: riscv: Support xtheadvector in vector tests Extend existing vector tests to be compatible with the xtheadvector instructions. Signed-off-by: Charlie Jenkins Tested-by: Yangyu Chen Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-13-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt .../selftests/riscv/vector/v_exec_initval_nolibc.c | 23 ++++-- tools/testing/selftests/riscv/vector/v_helpers.c | 17 ++++- tools/testing/selftests/riscv/vector/v_helpers.h | 4 +- tools/testing/selftests/riscv/vector/v_initval.c | 12 ++- .../selftests/riscv/vector/vstate_exec_nolibc.c | 20 +++-- .../testing/selftests/riscv/vector/vstate_prctl.c | 89 ++++++++++++++-------- 6 files changed, 113 insertions(+), 52 deletions(-) commit 57d7713af93e4b7344d3022fad9ddf0f10f815ec Author: Charlie Jenkins Date: Wed Nov 13 18:21:18 2024 -0800 selftests: riscv: Fix vector tests Overhaul the riscv vector tests to use kselftest_harness to help the test cases correctly report the results and decouple the individual test cases from each other. With this refactoring, only run the test cases if vector is reported and properly report the test case as skipped otherwise. The v_initval_nolibc test was previously not checking if vector was supported and used a function (malloc) which invalidates the state of the vector registers. Signed-off-by: Charlie Jenkins Tested-by: Yangyu Chen Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-12-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt tools/testing/selftests/riscv/vector/.gitignore | 3 +- tools/testing/selftests/riscv/vector/Makefile | 17 +- .../selftests/riscv/vector/v_exec_initval_nolibc.c | 85 +++++++ tools/testing/selftests/riscv/vector/v_helpers.c | 57 +++++ tools/testing/selftests/riscv/vector/v_helpers.h | 6 + tools/testing/selftests/riscv/vector/v_initval.c | 16 ++ .../selftests/riscv/vector/v_initval_nolibc.c | 68 ----- .../testing/selftests/riscv/vector/vstate_prctl.c | 278 ++++++++++++--------- 8 files changed, 337 insertions(+), 193 deletions(-) commit 7fa00fd6ff5366b50dcba2525b9743e1612da2aa Author: Charlie Jenkins Date: Wed Nov 13 18:21:17 2024 -0800 riscv: hwprobe: Document thead vendor extensions and xtheadvector extension Document support for thead vendor extensions using the key RISCV_HWPROBE_KEY_VENDOR_EXT_THEAD_0 and xtheadvector extension using the key RISCV_HWPROBE_VENDOR_EXT_XTHEADVECTOR. Signed-off-by: Charlie Jenkins Reviewed-by: Evan Green Tested-by: Yangyu Chen Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-11-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt Documentation/arch/riscv/hwprobe.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a5ea53da65c588339890c825e63c0da5baef6897 Author: Charlie Jenkins Date: Wed Nov 13 18:21:16 2024 -0800 riscv: hwprobe: Add thead vendor extension probing Add a new hwprobe key "RISCV_HWPROBE_KEY_VENDOR_EXT_THEAD_0" which allows userspace to probe for the new RISCV_ISA_VENDOR_EXT_XTHEADVECTOR vendor extension. This new key will allow userspace code to probe for which thead vendor extensions are supported. This API is modeled to be consistent with RISCV_HWPROBE_KEY_IMA_EXT_0. The bitmask returned will have each bit corresponding to a supported thead vendor extension of the cpumask set. Just like RISCV_HWPROBE_KEY_IMA_EXT_0, this allows a userspace program to determine all of the supported thead vendor extensions in one call. Signed-off-by: Charlie Jenkins Reviewed-by: Evan Green Tested-by: Yangyu Chen Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-10-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/hwprobe.h | 5 +-- .../include/asm/vendor_extensions/thead_hwprobe.h | 19 +++++++++++ .../include/asm/vendor_extensions/vendor_hwprobe.h | 37 ++++++++++++++++++++++ arch/riscv/include/uapi/asm/hwprobe.h | 3 +- arch/riscv/include/uapi/asm/vendor/thead.h | 3 ++ arch/riscv/kernel/sys_hwprobe.c | 5 +++ arch/riscv/kernel/vendor_extensions/Makefile | 1 + .../riscv/kernel/vendor_extensions/thead_hwprobe.c | 19 +++++++++++ 8 files changed, 89 insertions(+), 3 deletions(-) commit d863910eabaffc68eb28aaf476dd870fc3f7197d Author: Charlie Jenkins Date: Wed Nov 13 18:21:15 2024 -0800 riscv: vector: Support xtheadvector save/restore Use alternatives to add support for xtheadvector vector save/restore routines. Signed-off-by: Charlie Jenkins Reviewed-by: Conor Dooley Tested-by: Yangyu Chen Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-9-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/csr.h | 6 + arch/riscv/include/asm/switch_to.h | 2 +- arch/riscv/include/asm/vector.h | 222 +++++++++++++++++++++++++-------- arch/riscv/kernel/cpufeature.c | 6 +- arch/riscv/kernel/kernel_mode_vector.c | 8 +- arch/riscv/kernel/process.c | 4 +- arch/riscv/kernel/signal.c | 6 +- arch/riscv/kernel/vector.c | 12 +- 8 files changed, 198 insertions(+), 68 deletions(-) commit 01e3313e34d0e3912a7031c217367df051603149 Author: Charlie Jenkins Date: Wed Nov 13 18:21:14 2024 -0800 riscv: Add xtheadvector instruction definitions xtheadvector uses different encodings than standard vector for vsetvli and vector loads/stores. Write the instruction formats to be used in assembly code. Co-developed-by: Heiko Stuebner Signed-off-by: Heiko Stuebner Signed-off-by: Charlie Jenkins Tested-by: Yangyu Chen Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-8-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/vendor_extensions/thead.h | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit b9a9314424512e536db5e54ff554c2f10759c657 Author: Charlie Jenkins Date: Wed Nov 13 18:21:13 2024 -0800 riscv: csr: Add CSR encodings for CSR_VXRM/CSR_VXSAT The VXRM vector csr for xtheadvector has an encoding of 0xa and VXSAT has an encoding of 0x9. Co-developed-by: Heiko Stuebner Signed-off-by: Heiko Stuebner Signed-off-by: Charlie Jenkins Tested-by: Yangyu Chen Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-7-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/csr.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 66f197785d515d3fe5257ed65e189e4ee0b9b4e3 Author: Heiko Stuebner Date: Wed Nov 13 18:21:12 2024 -0800 RISC-V: define the elements of the VCSR vector CSR The VCSR CSR contains two elements VXRM[2:1] and VXSAT[0]. Define constants for those to access the elements in a readable way. Acked-by: Guo Ren Reviewed-by: Conor Dooley Signed-off-by: Heiko Stuebner Signed-off-by: Charlie Jenkins Tested-by: Yangyu Chen Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-6-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/csr.h | 4 ++++ 1 file changed, 4 insertions(+) commit 377be47f90e411c10440650864d72d2ecb639bd7 Author: Charlie Jenkins Date: Wed Nov 13 18:21:11 2024 -0800 riscv: vector: Use vlenb from DT for thead If thead,vlenb is provided in the device tree, prefer that over reading the vlenb csr. Signed-off-by: Charlie Jenkins Acked-by: Conor Dooley Tested-by: Yangyu Chen Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-5-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig.vendor | 13 +++++++ arch/riscv/include/asm/cpufeature.h | 2 + arch/riscv/include/asm/vendor_extensions/thead.h | 6 +++ arch/riscv/kernel/cpufeature.c | 48 ++++++++++++++++++++++++ arch/riscv/kernel/vector.c | 12 +++++- arch/riscv/kernel/vendor_extensions/thead.c | 11 ++++++ 6 files changed, 91 insertions(+), 1 deletion(-) commit cddd63869f9214f2bc5c4b89a8ea1bd0ff4d89c5 Author: Charlie Jenkins Date: Wed Nov 13 18:21:10 2024 -0800 riscv: Add thead and xtheadvector as a vendor extension Add support to the kernel for THead vendor extensions with the target of the new extension xtheadvector. Signed-off-by: Charlie Jenkins Reviewed-by: Conor Dooley Tested-by: Yangyu Chen Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-4-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/Kconfig.vendor | 13 +++++++++++++ arch/riscv/include/asm/vendor_extensions/thead.h | 16 ++++++++++++++++ arch/riscv/kernel/cpufeature.c | 1 + arch/riscv/kernel/vendor_extensions.c | 10 ++++++++++ arch/riscv/kernel/vendor_extensions/Makefile | 1 + arch/riscv/kernel/vendor_extensions/thead.c | 18 ++++++++++++++++++ 6 files changed, 59 insertions(+) commit ce1daeeba600a79b776864f12d19e799f1eb124f Author: Charlie Jenkins Date: Wed Nov 13 18:21:09 2024 -0800 riscv: dts: allwinner: Add xtheadvector to the D1/D1s devicetree The D1/D1s SoCs support xtheadvector so it can be included in the devicetree. Also include vlenb for the cpu. Signed-off-by: Charlie Jenkins Reviewed-by: Conor Dooley Tested-by: Yangyu Chen Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-3-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bf6279b38a4bbdb2954c3d159523d41367763a48 Author: Charlie Jenkins Date: Wed Nov 13 18:21:08 2024 -0800 dt-bindings: cpus: add a thead vlen register length property Add a property analogous to the vlenb CSR so that software can detect the vector length of each CPU prior to it being brought online. Currently software has to assume that the vector length read from the boot CPU applies to all possible CPUs. On T-Head CPUs implementing pre-ratification vector, reading the th.vlenb CSR may produce an illegal instruction trap, so this property is required on such systems. Signed-off-by: Charlie Jenkins Reviewed-by: Conor Dooley Tested-by: Yangyu Chen Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-2-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt Documentation/devicetree/bindings/riscv/cpus.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit e576b7cb818343e2dc740185fbea6af580763dde Author: Charlie Jenkins Date: Wed Nov 13 18:21:07 2024 -0800 dt-bindings: riscv: Add xtheadvector ISA extension description The xtheadvector ISA extension is described on the T-Head extension spec Github page [1] at commit 95358cb2cca9. Link: https://github.com/T-head-Semi/thead-extension-spec/blob/95358cb2cca9489361c61d335e03d3134b14133f/xtheadvector.adoc [1] Signed-off-by: Charlie Jenkins Reviewed-by: Conor Dooley Tested-by: Yangyu Chen Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-1-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt Documentation/devicetree/bindings/riscv/extensions.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 9d87cf525fd2e1a5fcbbb40ee3df216d1d266c88 Author: Palmer Dabbelt Date: Wed Jan 15 10:02:51 2025 -0800 RISC-V: Mark riscv_v_init() as __init This trips up with Xtheadvector enabled, but as far as I can tell it's just been an issue since the original patchset. Fixes: 7ca7a7b9b635 ("riscv: Add sysctl to set the default vector rule for new processes") Reviewed-by: Charlie Jenkins Tested-by: Charlie Jenkins Link: https://lore.kernel.org/r/20250115180251.31444-1-palmer@rivosinc.com Signed-off-by: Palmer Dabbelt arch/riscv/kernel/vector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 112aba9a79345aae81c508d92c1e9711c81d791c Author: Richard Zhu Date: Tue Dec 10 16:15:57 2024 +0800 PCI: dwc: Remove LTSSM state test in dw_pcie_suspend_noirq() It's safe to send PME_TURN_OFF message regardless of whether the link is up or down, so don't test the LTSSM state before sending the PME_TURN_OFF message. Only print an error message when the LTSSM is not in DETECT or POLL. There shouldn't be an error when no Endpoint is connected at all. Link: https://lore.kernel.org/r/20241210081557.163555-3-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas Reviewed-by: Frank Li Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-host.c | 27 ++++++++++++++--------- drivers/pci/controller/dwc/pcie-designware.h | 1 + 2 files changed, 18 insertions(+), 10 deletions(-) commit 91b7747dc70d64b5ec56ffe493310f207e7ffc99 Author: Athira Rajeev Date: Fri Jan 10 15:16:20 2025 +0530 perf test: Update event_groups test to use instructions In some of the powerpc platforms, event group testcase fails as below: # perf test -v 'Event groups' 69: Event groups : --- start --- test child forked, pid 9765 Using CPUID 0x00820200 Using hv_24x7 for uncore pmu event 0x0 0x0, 0x0 0x0, 0x0 0x0: Fail 0x0 0x0, 0x0 0x0, 0x1 0x3: Pass The testcase creates various combinations of hw, sw and uncore PMU events and verify group creation succeeds or fails as expected. This tests one of the limitation in perf where it doesn't allow creating a group of events from different hw PMUs. The testcase starts a leader event and opens two sibling events. The combination the fails is three hardware events in a group. "0x0 0x0, 0x0 0x0, 0x0 0x0: Fail" Type zero and config zero which translates to PERF_TYPE_HARDWARE and PERF_COUNT_HW_CPU_CYCLE. There is event constraint in powerpc that events using same counter cannot be programmed in a group. Here there is one alternative event for cycles, hence one leader and only one sibling event can go in as a group. if all three events (leader and two sibling events), are hardware events, use instructions as one of the sibling event. Since PERF_COUNT_HW_INSTRUCTIONS is a generic hardware event and present in all architectures, use this as third event. Reported-by: Tejas Manhas Signed-off-by: Athira Rajeev Link: https://lore.kernel.org/r/20250110094620.94976-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Namhyung Kim tools/perf/tests/event_groups.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit 62892e77b8a64b9dc0e1da75980aa145347b6820 Author: Kuan-Wei Chiu Date: Thu Jan 16 19:08:42 2025 +0800 perf bench: Fix undefined behavior in cmpworker() The comparison function cmpworker() violates the C standard's requirements for qsort() comparison functions, which mandate symmetry and transitivity: Symmetry: If x < y, then y > x. Transitivity: If x < y and y < z, then x < z. In its current implementation, cmpworker() incorrectly returns 0 when w1->tid < w2->tid, which breaks both symmetry and transitivity. This violation causes undefined behavior, potentially leading to issues such as memory corruption in glibc [1]. Fix the issue by returning -1 when w1->tid < w2->tid, ensuring compliance with the C standard and preventing undefined behavior. Link: https://www.qualys.com/2024/01/30/qsort.txt [1] Fixes: 121dd9ea0116 ("perf bench: Add epoll parallel epoll_wait benchmark") Cc: stable@vger.kernel.org Signed-off-by: Kuan-Wei Chiu Reviewed-by: James Clark Link: https://lore.kernel.org/r/20250116110842.4087530-1-visitorckw@gmail.com Signed-off-by: Namhyung Kim tools/perf/bench/epoll-wait.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 035f0c279bcfc07314240de273d90f4061aef04d Author: Ian Rogers Date: Fri Jan 17 10:18:48 2025 -0800 perf annotate: Prefer passing evsel to evsel->core.idx An evsel idx may not be stable due to sorting, evlist removal, etc. Try to reduce it being part of APIs by explicitly passing the evsel in annotate code. Internally the code just reads evsel->core.idx so behavior is unchanged. Signed-off-by: Ian Rogers Cc: Chen Ni Cc: Athira Rajeev Link: https://lore.kernel.org/r/20250117181848.690474-1-irogers@google.com Signed-off-by: Namhyung Kim tools/perf/builtin-top.c | 4 ++-- tools/perf/ui/browsers/annotate.c | 2 +- tools/perf/ui/gtk/annotate.c | 16 +++++++++------- tools/perf/util/annotate.c | 32 +++++++++++++++----------------- tools/perf/util/annotate.h | 20 +++++++++++--------- 5 files changed, 38 insertions(+), 36 deletions(-) commit 86a016e278b78cc2281edd4ffaddbc011c87a593 Author: Richard Zhu Date: Tue Dec 10 16:15:56 2024 +0800 PCI: dwc: Always stop link in the dw_pcie_suspend_noirq On the i.MX8QM, PCIe link can't be re-established again in dw_pcie_resume_noirq(), if the LTSSM_EN bit is not cleared properly in dw_pcie_suspend_noirq(). So, add dw_pcie_stop_link() to dw_pcie_suspend_noirq() to fix this issue and to align the suspend/resume functions since there is dw_pcie_start_link() in dw_pcie_resume_noirq() already. Fixes: 4774faf854f5 ("PCI: dwc: Implement generic suspend/resume functionality") Link: https://lore.kernel.org/r/20241210081557.163555-2-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware-host.c | 1 + 1 file changed, 1 insertion(+) commit ec9fd499b9c60a187ac8d6414c3c343c77d32e42 Author: Niklas Cassel Date: Mon Jan 13 11:59:34 2025 +0100 PCI: dw-rockchip: Don't wait for link since we can detect Link Up The Root Complex specific device tree binding for pcie-dw-rockchip has the 'sys' interrupt marked as required. The driver requests the 'sys' IRQ unconditionally, and errors out if not provided. Thus, we can unconditionally set 'use_linkup_irq', so dw_pcie_host_init() doesn't wait for the link to come up. This will skip the wait for link up (since the bus will be enumerated once the link up IRQ is triggered), which reduces the bootup time. Link: https://lore.kernel.org/r/20250113-rockchip-no-wait-v1-1-25417f37b92f@kernel.org Signed-off-by: Niklas Cassel [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński drivers/pci/controller/dwc/pcie-dw-rockchip.c | 1 + 1 file changed, 1 insertion(+) commit 0e0b45ab5d770a748487ba0ae8f77d1fb0f0de3e Author: Niklas Cassel Date: Wed Nov 27 15:50:42 2024 +0100 PCI: dw-rockchip: Enumerate endpoints based on dll_link_up IRQ Most boards using the pcie-dw-rockchip PCIe controller lack standard hotplug support. Thus, when an endpoint is attached to the SoC, users have to rescan the bus manually to enumerate the device. This can be avoided by using the 'dll_link_up' interrupt in the combined system interrupt 'sys'. Once the 'dll_link_up' IRQ is received, the bus underneath the host bridge is scanned to enumerate PCIe endpoint devices. This implements the same functionality that was implemented in the DWC based pcie-qcom driver in 4581403f6792 ("PCI: qcom: Enumerate endpoints based on Link up event in 'global_irq' interrupt"). The Root Complex specific device tree binding for pcie-dw-rockchip already has the 'sys' interrupt marked as required, so there is no need to update the device tree binding. This also means that we can request the 'sys' IRQ unconditionally. Link: https://lore.kernel.org/r/20241127145041.3531400-2-cassel@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński [bhelgaas: commit log, squash Pei Xiao's redundant dev_err() fix from https://lore.kernel.org/r/327718207d3cd72847c079ff9d56eb246744c182.1736126067.git.xiaopei01@kylinos.cn, squash Niklas's #define change from https://lore.kernel.org/r/20250103095812.2408364-2-cassel@kernel.org] Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-dw-rockchip.c | 68 +++++++++++++++++++++++---- 1 file changed, 60 insertions(+), 8 deletions(-) commit f0639013d340580b72df95d012a93f35eeb0da64 Author: Krishna chaitanya chundru Date: Sat Nov 23 00:40:01 2024 +0530 PCI: qcom: Update ICC and OPP values after Link Up event 4581403f6792 ("PCI: qcom: Enumerate endpoints based on Link up event in 'global_irq' interrupt") added the Link Up-based enumeration support, but did not update the ICC/OPP vote once link is up. Before that, the update happened during probe and the endpoints may or may not be enumerated at that time, so the ICC/OPP vote was not guaranteed to be accurate. With Link Up-based enumeration support, the driver can request the accurate vote based on the PCIe link. Call qcom_pcie_icc_opp_update() in qcom_pcie_global_irq_thread() after enumerating the endpoints. Fixes: 4581403f6792 ("PCI: qcom: Enumerate endpoints based on Link up event in 'global_irq' interrupt") Link: https://lore.kernel.org/r/20241123-remove_wait2-v5-3-b5f9e6b794c2@quicinc.com Signed-off-by: Krishna chaitanya chundru [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel drivers/pci/controller/dwc/pcie-qcom.c | 2 ++ 1 file changed, 2 insertions(+) commit 36971d6c5a9a134c15760ae9fd13c6d5f9a36abb Author: Krishna chaitanya chundru Date: Sat Nov 23 00:40:00 2024 +0530 PCI: qcom: Don't wait for link if we can detect Link Up If we have a 'global' IRQ for Link Up events, we need not wait for the link to be up during PCI initialization, which reduces startup time. Check for 'global' IRQ, and if present, set 'use_linkup_irq', so dw_pcie_host_init() doesn't wait for the link to come up. Link: https://lore.kernel.org/r/20241123-remove_wait2-v5-2-b5f9e6b794c2@quicinc.com Signed-off-by: Krishna chaitanya chundru Signed-off-by: Krzysztof Wilczyński [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel drivers/pci/controller/dwc/pcie-qcom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8d3bf19f1b585a3cc0027f508b64c33484db8d0d Author: Krishna chaitanya chundru Date: Sat Nov 23 00:39:59 2024 +0530 PCI: dwc: Don't wait for link up if driver can detect Link Up event If the driver can detect the Link Up event and enumerate downstream devices at that time, we need not wait here. Skip waiting for link to come up if the driver supports 'use_linkup_irq'. Link: https://lore.kernel.org/r/20241123-remove_wait2-v5-1-b5f9e6b794c2@quicinc.com Signed-off-by: Krishna chaitanya chundru Signed-off-by: Krzysztof Wilczyński [bhelgaas: wrap comment, update commit log] Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel drivers/pci/controller/dwc/pcie-designware-host.c | 10 ++++++++-- drivers/pci/controller/dwc/pcie-designware.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) commit 574913f9e197c050178f36b6e6fdd92031baa078 Author: Niklas Cassel Date: Sat Jan 4 01:21:20 2025 +0100 PCI: dwc: Fix potential truncation in dw_pcie_edma_irq_verify() Increase the size of the string buffer to avoid potential truncation in dw_pcie_edma_irq_verify(). This fixes the following build warning when compiling with W=1: drivers/pci/controller/dwc/pcie-designware.c: In function ‘dw_pcie_edma_detect’: drivers/pci/controller/dwc/pcie-designware.c:989:50: warning: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 3 [-Wformat-truncation=] 989 | snprintf(name, sizeof(name), "dma%d", pci->edma.nr_irqs); | ^~ Link: https://lore.kernel.org/r/20250104002119.2681246-2-cassel@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pcie-designware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01099f635a4c68b8574d350a972ba062dd5142e9 Author: Rickard Andersson Date: Mon Dec 16 09:54:20 2024 +0100 ubi: Implement ioctl for detailed erase counters Currently, "max_ec" can be read from sysfs, which provides a limited view of the flash device’s wear. In certain cases, such as bugs in the wear-leveling algorithm, specific blocks can be worn down more than others, resulting in uneven wear distribution. Also some use cases can wear the erase blocks of the fastmap area more heavily than other parts of flash. Providing detailed erase counter values give a better understanding of the overall flash wear and is needed to be able to calculate for example expected life time. There exists more detailed info in debugfs, but this information is only available for debug builds. Signed-off-by: Rickard Andersson Tested-by: Zhihao Cheng Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger drivers/mtd/ubi/cdev.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit 3156ceb222414456084d964f43ada071206039b8 Author: Rickard Andersson Date: Mon Dec 16 09:54:19 2024 +0100 ubi: Expose interface for detailed erase counters Using the ioctl command 'UBI_IOCECNFO' user space can obtain detailed erase counter information of all blocks of a device. Signed-off-by: Rickard Andersson Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger include/uapi/mtd/ubi-user.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit bdb0ca39e0acccf6771db49c3f94ed787d05f2d7 Author: pangliyuan Date: Tue Dec 24 16:18:23 2024 +0800 ubifs: skip dumping tnc tree when zroot is null Clearing slab cache will free all znode in memory and make c->zroot.znode = NULL, then dumping tnc tree will access c->zroot.znode which cause null pointer dereference. Link: https://bugzilla.kernel.org/show_bug.cgi?id=219624#c0 Fixes: 1e51764a3c2a ("UBIFS: add new flash file system") Signed-off-by: pangliyuan Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger fs/ubifs/debug.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 844c6fdc13cf3d9d251533631988a58f8356a8c8 Author: Zhihao Cheng Date: Sat Dec 14 19:01:53 2024 +0800 ubi: Revert "ubi: wl: Close down wear-leveling before nand is suspended" Commit 5580cdae05ae ("ubi: wl: Close down wear-leveling before nand is suspended") added a reboot notification in UBI layer to shutdown the wear-leveling subsystem, which imported an UAF problem[1]. Besides that, the method also brings other potential UAF problems, for example: reboot kworker ubi_wl_reboot_notifier ubi_wl_close ubi_fastmap_close kfree(ubi->fm) update_fastmap_work_fn ubi_update_fastmap old_fm = ubi->fm if (old_fm && old_fm->e[i]) // UAF! Actually, the problem fixed by commit 5580cdae05ae ("ubi: wl: Close down wear-leveling before nand is suspended") has been solved by commit 8cba323437a4 ("mtd: rawnand: protect access to rawnand devices while in suspend"), which was discussed in [2]. So we can revert the commit 5580cdae05ae ("ubi: wl: Close down wear-leveling before nand is suspended") directly. [1] https://lore.kernel.org/linux-mtd/20241208175211.9406-2-dennis.lamerice@gmail.com/ [2] https://lore.kernel.org/all/9bf76f5d-12a4-46ff-90d4-4a7f0f47c381@axis.com/ Fixes: 5580cdae05ae ("ubi: wl: Close down wear-leveling before nand is suspended") Reported-by: Dennis Lam Closes: https://lore.kernel.org/linux-mtd/20241208175211.9406-2-dennis.lamerice@gmail.com/ Signed-off-by: Zhihao Cheng Acked-by: Mårten Lindahl Signed-off-by: Richard Weinberger drivers/mtd/ubi/ubi.h | 2 -- drivers/mtd/ubi/wl.c | 21 --------------------- 2 files changed, 23 deletions(-) commit 404de7abc05758254ad57d9501d30427d9c57417 Author: Pintu Kumar Date: Mon Dec 9 21:51:04 2024 +0530 ubifs: ubifs_dump_leb: remove return from end of void function Noticed that there is a useless return statement at the end of void function ubifs_dump_leb(). Just removed it. Signed-off-by: Pintu Kumar Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger fs/ubifs/debug.c | 1 - 1 file changed, 1 deletion(-) commit 923d3583ead133da742b42d9debbb7d5c5a56587 Author: Pintu Kumar Date: Mon Dec 9 19:29:36 2024 +0530 ubifs: dump_lpt_leb: remove return at end of void function Noticed that there is a useless return statement at the end of void function dump_lpt_leb(). Just removing it. Signed-off-by: Pintu Kumar Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger fs/ubifs/lpt_commit.c | 1 - 1 file changed, 1 deletion(-) commit 97bbf9e312c3fbaf0baa56120238825d2eb23b8a Author: Denis Arefev Date: Mon Dec 2 12:36:52 2024 +0300 ubi: Add a check for ubi_num Added a check for ubi_num for negative numbers If the variable ubi_num takes negative values then we get: qemu-system-arm ... -append "ubi.mtd=0,0,0,-22222345" ... [ 0.745065] ubi_attach_mtd_dev from ubi_init+0x178/0x218 [ 0.745230] ubi_init from do_one_initcall+0x70/0x1ac [ 0.745344] do_one_initcall from kernel_init_freeable+0x198/0x224 [ 0.745474] kernel_init_freeable from kernel_init+0x18/0x134 [ 0.745600] kernel_init from ret_from_fork+0x14/0x28 [ 0.745727] Exception stack(0x90015fb0 to 0x90015ff8) Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 83ff59a06663 ("UBI: support ubi_num on mtd.ubi command line") Cc: stable@vger.kernel.org Signed-off-by: Denis Arefev Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger drivers/mtd/ubi/build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ce204d3af3beca1825018e9ca128635ccc8aa85 Author: Geoffrey D. Bennett Date: Fri Jan 17 04:17:58 2025 +1030 ALSA: scarlett2: Add device_setup option to use FCP driver Add a new device_setup option (SCARLETT2_USE_FCP_DRIVER = 0x08) that allows users to opt in to using the new FCP driver instead of the existing scarlett2 driver for their device. This provides a way to test the new FCP driver on existing supported hardware while keeping the Scarlett2 driver as the default. When the SCARLETT2_USE_FCP_DRIVER bit is set in device_setup, the scarlett2 driver initialisation will hand off to the FCP driver instead of proceeding with its own initialisation. The FCP driver then provides access to the device via its hwdep interface. Signed-off-by: Geoffrey D. Bennett Link: https://patch.msgid.link/94ffd7971d73cb0cbea6933b28f7528ce5b9edde.1737048528.git.g@b4.vu Signed-off-by: Takashi Iwai sound/usb/mixer_scarlett2.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 46757a3e7d50dac923888e7fbe68377736f13c70 Author: Geoffrey D. Bennett Date: Fri Jan 17 04:17:38 2025 +1030 ALSA: FCP: Add Focusrite Control Protocol driver Add a new kernel driver for the Focusrite Control Protocol (FCP), which is used by Focusrite Scarlett 2nd Gen, 3rd Gen, 4th Gen, Clarett USB, Clarett+, and Vocaster series audio interfaces. This driver provides a user-space control interface via ALSA's hwdep subsystem. Unlike the existing Scarlett2 driver which implements all ALSA controls in kernel space, this new FCP driver takes a different approach by providing a minimal kernel interface that allows a user-space driver to send FCP commands and receive notifications. The only control implemented in kernel space is the Level Meter, since it requires frequent polling of volatile data. While this driver supports all interfaces that the Scarlett2 driver works with, it is initially enabled only for 4th Gen 16i16, 18i16, and 18i20 interfaces that are not supported by the Scarlett2 driver. Signed-off-by: Geoffrey D. Bennett Link: https://patch.msgid.link/597741a9b1198b965561547511d3d345f91cba20.1737048528.git.g@b4.vu Signed-off-by: Takashi Iwai MAINTAINERS | 10 +- include/uapi/sound/fcp.h | 120 +++++ include/uapi/sound/tlv.h | 2 + sound/usb/Makefile | 1 + sound/usb/fcp.c | 1134 ++++++++++++++++++++++++++++++++++++++++++++++ sound/usb/fcp.h | 7 + sound/usb/mixer_quirks.c | 7 + 7 files changed, 1277 insertions(+), 4 deletions(-) commit 1a0f59b04c8c9e1177731609e62e2a439cfa3a73 Merge: 5cb4e5b05677 75a7f7d6e7e1 Author: Takashi Iwai Date: Sat Jan 18 09:14:40 2025 +0100 Merge tag 'asoc-fix-v6.13-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.13 A few final driver specific fixes - a couple of x86 ID field changes, plus bug fixes for simple-card-utils and nau8824. commit 4a38cde6d05394c7122388bb84592e5ff3175657 Merge: 19e1e17f50c4 e777a4b39b14 Author: Jakub Kicinski Date: Fri Jan 17 20:01:11 2025 -0800 Merge branch 'ethtool-get_ts_stats-for-dsa-and-ocelot-driver' Vladimir Oltean says: ==================== ethtool get_ts_stats() for DSA and ocelot driver After a recent patch set with fixes and general restructuring, Jakub asked for the Felix DSA driver to start reporting standardized statistics for hardware timestamping: https://lore.kernel.org/netdev/20241207180640.12da60ed@kernel.org/ Testing follows the same procedure as in the aforementioned series, with PTP packet loss induced through taprio: $ ethtool -I --show-time-stamping swp3 Time stamping parameters for swp3: Capabilities: hardware-transmit software-transmit hardware-receive software-receive software-system-clock hardware-raw-clock PTP Hardware Clock: 1 Hardware Transmit Timestamp Modes: off on onestep-sync Hardware Receive Filter Modes: none ptpv2-l4-event ptpv2-l2-event ptpv2-event Statistics: tx_pkts: 14591 tx_lost: 85 tx_err: 0 v1: https://lore.kernel.org/20241213140852.1254063-1-vladimir.oltean@nxp.com/ ==================== Link: https://patch.msgid.link/20250116104628.123555-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit e777a4b39b14efb8c3ae22ab4c311882831a63b2 Author: Vladimir Oltean Date: Thu Jan 16 12:46:28 2025 +0200 net: dsa: felix: report timestamping stats from the ocelot library Make the linkage between the DSA user port ethtool_ops :: get_ts_info and the implementation from the Ocelot switch library. Signed-off-by: Vladimir Oltean Reviewed-by: Jakub Kicinski Link: https://patch.msgid.link/20250116104628.123555-5-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski drivers/net/dsa/ocelot/felix.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8fbd24f3d17b9d26af6c66a28053fbf5f6da330d Author: Vladimir Oltean Date: Thu Jan 16 12:46:27 2025 +0200 net: mscc: ocelot: add TX timestamping statistics Add an u64 hardware timestamping statistics structure for each ocelot port. Export a function from the common switch library for reporting them to ethtool. This is called by the ocelot switchdev front-end for now. Note that for the switchdev driver, we report the one-step PTP packets as unconfirmed, even though in principle, for some transmission mechanisms like FDMA, we may be able to confirm transmission and bump the "pkts" counter in ocelot_fdma_tx_cleanup() instead. I don't have access to hardware which uses the switchdev front-end, and I've kept the implementation simple. Signed-off-by: Vladimir Oltean Reviewed-by: Jakub Kicinski Link: https://patch.msgid.link/20250116104628.123555-4-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mscc/ocelot_net.c | 11 +++++++ drivers/net/ethernet/mscc/ocelot_ptp.c | 53 +++++++++++++++++++++++++------- drivers/net/ethernet/mscc/ocelot_stats.c | 37 ++++++++++++++++++++++ include/soc/mscc/ocelot.h | 11 +++++++ 4 files changed, 101 insertions(+), 11 deletions(-) commit 4b0a3ffa799b1c21a6be010c0c1efa012251080d Author: Vladimir Oltean Date: Thu Jan 16 12:46:26 2025 +0200 net: dsa: implement get_ts_stats ethtool operation for user ports Integrate with the standard infrastructure for reporting hardware packet timestamping statistics. Signed-off-by: Vladimir Oltean Reviewed-by: Jakub Kicinski Link: https://patch.msgid.link/20250116104628.123555-3-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski include/net/dsa.h | 2 ++ net/dsa/user.c | 11 +++++++++++ 2 files changed, 13 insertions(+) commit 6a128cdf1926b20a94d6af7d7d03b76ba19a4f8b Author: Vladimir Oltean Date: Thu Jan 16 12:46:25 2025 +0200 net: ethtool: ts: add separate counter for unconfirmed one-step TX timestamps For packets with two-step timestamp requests, the hardware timestamp comes back to the driver through a confirmation mechanism of sorts, which allows the driver to confidently bump the successful "pkts" counter. For one-step PTP, the NIC is supposed to autonomously insert its hardware TX timestamp in the packet headers while simultaneously transmitting it. There may be a confirmation that this was done successfully, or there may not. None of the current drivers which implement ethtool_ops :: get_ts_stats() also support HWTSTAMP_TX_ONESTEP_SYNC or HWTSTAMP_TX_ONESTEP_SYNC, so it is a bit unclear which model to follow. But there are NICs, such as DSA, where there is no transmit confirmation at all. Here, it would be wrong / misleading to increment the successful "pkts" counter, because one-step PTP packets can be dropped on TX just like any other packets. So introduce a special counter which signifies "yes, an attempt was made, but we don't know whether it also exited the port or not". I expect that for one-step PTP packets where a confirmation is available, the "pkts" counter would be bumped. Signed-off-by: Vladimir Oltean Reviewed-by: Jakub Kicinski Link: https://patch.msgid.link/20250116104628.123555-2-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski Documentation/netlink/specs/ethtool.yaml | 3 +++ Documentation/networking/ethtool-netlink.rst | 16 +++++++++++----- include/linux/ethtool.h | 7 +++++++ include/uapi/linux/ethtool_netlink_generated.h | 1 + net/ethtool/tsinfo.c | 2 ++ 5 files changed, 24 insertions(+), 5 deletions(-) commit 19e1e17f50c411f77140dd86d8255c8daa9e2edb Merge: 41c5d104f338 448269fa05c1 Author: Jakub Kicinski Date: Fri Jan 17 19:58:01 2025 -0800 Merge branch 'mlxsw-move-tx-header-handling-to-pci-driver' Petr Machata says: ==================== mlxsw: Move Tx header handling to PCI driver Amit Cohen writes: Tx header should be added to all packets transmitted from the CPU to Spectrum ASICs. Historically, handling this header was added as a driver function, as Tx header is different between Spectrum and Switch-X. From May 2021, there is no support for SwitchX-2 ASIC, and all the relevant code was removed. For now, there is no justification to handle Tx header as part of spectrum.c, we can handle this as part of PCI, in skb_transmit(). This change will also be useful when XDP support will be added to mlxsw, as for XDP_TX and XDP_REDIRECT actions, Tx header should be added before transmitting the packet. Patch set overview: Patches #1-#2 add structure to store Tx header info and initialize it Patch #3 moves definitions of Tx header fields to txheader.h Patch #4 moves Tx header handling to PCI driver Patch #5 removes unnecessary attribute ==================== Link: https://patch.msgid.link/cover.1737044384.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 448269fa05c16f3d0450cdcf803ffbcf03d43f5f Author: Amit Cohen Date: Thu Jan 16 17:38:18 2025 +0100 mlxsw: Do not store Tx header length as driver parameter Tx header handling was moved to PCI code, as there is no several drivers which configure Tx header differently. Tx header length is stored as driver parameter, this is not really necessary as it always stores the same value. Remove this field and use the macro MLXSW_TXHDR_LEN explicitly. Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/1fb7b3f007de4d311e559c8a954b673d0895d5e9.1737044384.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/core.c | 3 ++- drivers/net/ethernet/mellanox/mlxsw/core.h | 1 - drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) commit 6ce1aac7480e597cd7e9235bc5c96edcac5e5339 Author: Amit Cohen Date: Thu Jan 16 17:38:17 2025 +0100 mlxsw: Move Tx header handling to PCI driver Tx header should be added to all packets transmitted from the CPU to Spectrum ASICs. Historically, handling this header was added as a driver function, as Tx header is different between Spectrum and Switch-X. See SwitchX implementation in commit 31557f0f9755 ("mlxsw: Introduce Mellanox SwitchX-2 ASIC support"). From May 2021, there is no support for SwitchX-2 ASIC, and all the relevant code was removed. For now, there is no justification to handle Tx header as part of spectrum.c, we can handle this as part of PCI, in skb_transmit(). A future patch set will add support for XDP in mlxsw driver, to support XDP_TX and XDP_REDIRECT actions, Tx header should be added before transmitting the packet. As preparation for this, move Tx header handling to PCI driver, so then XDP code will not have to call API from spectrum.c. This also improves the code as now Tx header is pushed just before transmitting, so it is not done from many flows which might miss something. Note that for PTP, we should configure Tx header differently, use the fields from mlxsw_txhdr_info to configure the packets correctly in PCI driver. Handle VLAN tagging in switch driver, verify that packet which should be transmitted as data is tagged, otherwise, tag it. Remove the calls for thxdr_construct() functions, as now this is done as part of skb_transmit(). Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/293a81e6f7d59a8ec9f9592edb7745536649ff11.1737044384.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/core.c | 6 +- drivers/net/ethernet/mellanox/mlxsw/core.h | 2 - drivers/net/ethernet/mellanox/mlxsw/pci.c | 38 +++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 121 +++++---------------- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 10 -- drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 40 ------- drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 28 ----- 7 files changed, 65 insertions(+), 180 deletions(-) commit c89d9c3d0a970b41c3188ec17b4f23499f5a7b49 Author: Amit Cohen Date: Thu Jan 16 17:38:16 2025 +0100 mlxsw: Define Tx header fields in txheader.h The next patch will move Tx header constructing to pci.c. As preparation, move the definitions of Tx header fields from spectrum.c to txheader.h, so pci.c will include this header and can access the fields. Remove 'etclass' which is not used. Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/2250b5cb3998ab4850fc8251c3a0f5926d32e194.1737044384.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 68 -------------------------- drivers/net/ethernet/mellanox/mlxsw/txheader.h | 63 ++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 68 deletions(-) commit e8e08279d3ce8850d6dd3fa629af4ecab0d4f67b Author: Amit Cohen Date: Thu Jan 16 17:38:15 2025 +0100 mlxsw: Initialize txhdr_info according to PTP operations A next patch will construct Tx header as part of pci.c. The switch driver (mlxsw_spectrum.ko) should encapsulate all the differences between the different ASICs and the bus driver (mlxsw_pci.ko) should remain unaware. As preparation, add the relevant info as part of mlxsw_txhdr_info structure, so later bus driver will merely construct the Tx header based on information passed from the switch driver. Most of the packets are transmitted as control packets, but PTP packets in Spectrum-2 and Spectrum-3 should be handled differently. The driver transmits them as data packets, and the default VLAN tag (4095) is added if the packet is not already tagged. Extend PTP operations to store a boolean which indicates whether packets should be transmitted as data packets. Set it for Spectrum-2 and Spectrum-3 only. Extend mlxsw_txhdr_info to store fields which will be used later to construct Tx header. Initialize such fields according to the new boolean which is stored in PTP operations. Note that for now, mlxsw_txhdr_info structure is initialized, but not used, a next patch will use it. Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/efcaacd4bedef524e840a0c29f96cebf2c4bc0e0.1737044384.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/core.h | 2 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 32 +++++++++++++++++++++- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 4 +++ 4 files changed, 38 insertions(+), 1 deletion(-) commit 3498566555048bb814185d6befcc1e615de7c6a8 Author: Amit Cohen Date: Thu Jan 16 17:38:14 2025 +0100 mlxsw: Add mlxsw_txhdr_info structure mlxsw_tx_info structure is used to store information that is needed to process Tx completions when Tx time stamps are requested. A next patch will move Tx header handling from spectrum.c to pci.c. For that, some additional fields which are related to Tx should be passed to pci driver. As preparation, create an extended structure, called mlxsw_txhdr_info, and store mlxsw_tx_info inside. The new fields should not be added to mlxsw_tx_info structure as it is stored in the SKB control block which is of limited size. The next patch will extend the new structure with some fields which are needed in order to construct Tx header. Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/93aed1961f046f79f46869bab37a3faa5027751d.1737044384.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/core.c | 14 +++++++------- drivers/net/ethernet/mellanox/mlxsw/core.h | 8 ++++++-- drivers/net/ethernet/mellanox/mlxsw/i2c.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/pci.c | 6 +++--- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 12 ++++++------ 5 files changed, 23 insertions(+), 19 deletions(-) commit 41c5d104f338b21b98aee5a207336c281325583f Author: Colin Ian King Date: Thu Jan 16 18:17:00 2025 +0000 net/mlx5: fix unintentional sign extension on shift of dest_attr->vport.vhca_id Shifting dest_attr->vport.vhca_id << 16 results in a promotion from an unsigned 16 bit integer to a 32 bit signed integer, this is then sign extended to a 64 bit unsigned long on 64 bitarchitectures. If vhca_id is greater than 0x7fff then this leads to a sign extended result where all the upper 32 bits of idx are set to 1. Fix this by casting vhca_id to the same type as idx before performing the shift. Fixes: 8e2e08a6d1e0 ("net/mlx5: fs, add support for dest vport HWS action") Signed-off-by: Colin Ian King Reviewed-by: Simon Horman Acked-by: Moshe Shemesh Link: https://patch.msgid.link/20250116181700.96437-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f16312b0b9c0ced87e5130d74eca37fc7d59cb6b Author: John Ousterhout Date: Thu Jan 16 11:56:41 2025 -0800 net: tc: improve qdisc error messages The existing error message ("Invalid qdisc name") is confusing because it suggests that there is no qdisc with the given name. In fact, the name does refer to a valid qdisc, but it doesn't match the kind of an existing qdisc being modified or replaced. The new error message provides more detail to eliminate confusion. Signed-off-by: John Ousterhout Acked-by: Jamal Hadi Salim Link: https://patch.msgid.link/20250116195642.2794-1-ouster@cs.stanford.edu Signed-off-by: Jakub Kicinski net/sched/sch_api.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ba0209bd1856248ba9cc46cd6daa2b5991d66377 Merge: 3df22e751027 1de25c6b984d Author: Jakub Kicinski Date: Fri Jan 17 19:45:34 2025 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== ice: support FW Recovery Mode Konrad Knitter says: Enable update of card in FW Recovery Mode * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: support FW Recovery Mode devlink: add devl guard pldmfw: enable selected component update ==================== Link: https://patch.msgid.link/20250116212059.1254349-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 3df22e75102785bac1768f7eeabbc45c01a6e7f4 Author: Thorsten Blum Date: Thu Jan 16 22:19:32 2025 +0100 hv_netvsc: Replace one-element array with flexible array member Replace the deprecated one-element array with a modern flexible array member in the struct nvsp_1_message_send_receive_buffer_complete. Use struct_size_t(,,1) instead of sizeof() to maintain the same size. Compile-tested only. Link: https://github.com/KSPP/linux/issues/79 Signed-off-by: Thorsten Blum Tested-by: Roman Kisel Reviewed-by: Roman Kisel Link: https://patch.msgid.link/20250116211932.139564-2-thorsten.blum@linux.dev Signed-off-by: Jakub Kicinski drivers/net/hyperv/hyperv_net.h | 2 +- drivers/net/hyperv/netvsc.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 2ce7289f180d68cfa9a04a28581e88c864abff9c Author: Guillaume Nault Date: Thu Jan 16 14:39:38 2025 +0100 gtp: Prepare ip4_route_output_gtp() to .flowi4_tos conversion. Use inet_sk_dscp() to get the socket DSCP value as dscp_t, instead of ip_sock_rt_tos() which returns a __u8. This will ease the conversion of fl4->flowi4_tos to dscp_t, which now just becomes a matter of dropping the inet_dscp_to_dsfield() call. Signed-off-by: Guillaume Nault Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/06bdb310a075355ff059cd32da2efc29a63981c9.1737034675.git.gnault@redhat.com Signed-off-by: Jakub Kicinski drivers/net/gtp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 02673d58adfa51e5e326d7472f251a63f42fcd93 Author: Guillaume Nault Date: Thu Jan 16 14:10:16 2025 +0100 dccp: Prepare dccp_v4_route_skb() to .flowi4_tos conversion. Use inet_sk_dscp() to get the socket DSCP value as dscp_t, instead of ip_sock_rt_tos() which returns a __u8. This will ease the conversion of fl4->flowi4_tos to dscp_t, which now just becomes a matter of dropping the inet_dscp_to_dsfield() call. Signed-off-by: Guillaume Nault Reviewed-by: Eric Dumazet Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/208dc5ca28bb5595d7a545de026bba18b1d63bda.1737032802.git.gnault@redhat.com Signed-off-by: Jakub Kicinski net/dccp/ipv4.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 70d81f25cc92cc4e914516c9935ae752f27d78ad Author: Maher Sanalla Date: Thu Jan 16 14:33:16 2025 +0200 net/mlxfw: Drop hard coded max FW flash image size Currently, mlxfw kernel module limits FW flash image size to be 10MB at most, preventing the ability to burn recent BlueField-3 FW that exceeds the said size limit. Thus, drop the hard coded limit. Instead, rely on FW's max_component_size threshold that is reported in MCQI register as the size limit for FW image. Fixes: 410ed13cae39 ("Add the mlxfw module for Mellanox firmware flash process") Signed-off-by: Maher Sanalla Signed-off-by: Moshe Shemesh Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/1737030796-1441634-1-git-send-email-moshe@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 2 -- 1 file changed, 2 deletions(-) commit d1f9f79fa2af8e3b45cffdeef66e05833480148a Author: Liu Jian Date: Thu Jan 16 22:30:53 2025 +0800 net: let net.core.dev_weight always be non-zero The following problem was encountered during stability test: (NULL net_device): NAPI poll function process_backlog+0x0/0x530 \ returned 1, exceeding its budget of 0. ------------[ cut here ]------------ list_add double add: new=ffff88905f746f48, prev=ffff88905f746f48, \ next=ffff88905f746e40. WARNING: CPU: 18 PID: 5462 at lib/list_debug.c:35 \ __list_add_valid_or_report+0xf3/0x130 CPU: 18 UID: 0 PID: 5462 Comm: ping Kdump: loaded Not tainted 6.13.0-rc7+ RIP: 0010:__list_add_valid_or_report+0xf3/0x130 Call Trace: ? __warn+0xcd/0x250 ? __list_add_valid_or_report+0xf3/0x130 enqueue_to_backlog+0x923/0x1070 netif_rx_internal+0x92/0x2b0 __netif_rx+0x15/0x170 loopback_xmit+0x2ef/0x450 dev_hard_start_xmit+0x103/0x490 __dev_queue_xmit+0xeac/0x1950 ip_finish_output2+0x6cc/0x1620 ip_output+0x161/0x270 ip_push_pending_frames+0x155/0x1a0 raw_sendmsg+0xe13/0x1550 __sys_sendto+0x3bf/0x4e0 __x64_sys_sendto+0xdc/0x1b0 do_syscall_64+0x5b/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e The reproduction command is as follows: sysctl -w net.core.dev_weight=0 ping 127.0.0.1 This is because when the napi's weight is set to 0, process_backlog() may return 0 and clear the NAPI_STATE_SCHED bit of napi->state, causing this napi to be re-polled in net_rx_action() until __do_softirq() times out. Since the NAPI_STATE_SCHED bit has been cleared, napi_schedule_rps() can be retriggered in enqueue_to_backlog(), causing this issue. Making the napi's weight always non-zero solves this problem. Triggering this issue requires system-wide admin (setting is not namespaced). Fixes: e38766054509 ("[NET]: Fix sysctl net.core.dev_weight") Fixes: 3d48b53fb2ae ("net: dev_weight: TX/RX orthogonality") Signed-off-by: Liu Jian Link: https://patch.msgid.link/20250116143053.4146855-1-liujian56@huawei.com Signed-off-by: Jakub Kicinski net/core/sysctl_net_core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 54ea680b759c4d76de16381e4d2a4623653b2f9f Author: Jakub Kicinski Date: Wed Jan 15 18:01:05 2025 -0800 selftests: net: give up on the cmsg_time accuracy on slow machines Commit b9d5f5711dd8 ("selftests: net: increase the delay for relative cmsg_time.sh test") widened the accepted value range 8x but we still see flakes (at a rate of around 7%). Return XFAIL for the most timing sensitive test on slow machines. Before: # ./cmsg_time.sh Case UDPv4 - TXTIME rel returned '8074us - 7397us < 4000', expected 'OK' FAIL - 1/36 cases failed After: # ./cmsg_time.sh Case UDPv4 - TXTIME rel returned '1123us - 941us < 500', expected 'OK' (XFAIL) Case UDPv6 - TXTIME rel returned '1227us - 776us < 500', expected 'OK' (XFAIL) OK Reviewed-by: Przemek Kitszel Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250116020105.931338-1-kuba@kernel.org Signed-off-by: Jakub Kicinski tools/testing/selftests/net/cmsg_time.sh | 35 +++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 10 deletions(-) commit 3a6e5ed2372bcb2a3c554fda32419efd91ff9b0c Author: Matheos Mattsson Date: Fri Jan 17 17:00:48 2025 -0800 Input: xpad - add support for Nacon Evol-X Xbox One Controller Add Nacon Evol-X Xbox One to the list of supported devices. Signed-off-by: Matheos Mattsson Signed-off-by: Pavel Rojtberg Link: https://lore.kernel.org/r/20250107192830.414709-9-rojtberg@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 2 ++ 1 file changed, 2 insertions(+) commit e4940fe6322c851659c17852b671c6e7b1aa9f56 Author: Nilton Perim Neto Date: Fri Jan 17 09:34:18 2025 -0800 Input: xpad - add unofficial Xbox 360 wireless receiver clone Although it mimics the Microsoft's VendorID, it is in fact a clone. Taking into account that the original Microsoft Receiver is not being manufactured anymore, this drive can solve dpad issues encontered by those who still use the original 360 Wireless controller but are using a receiver clone. Signed-off-by: Nilton Perim Neto Signed-off-by: Pavel Rojtberg Link: https://lore.kernel.org/r/20250107192830.414709-12-rojtberg@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 1 + 1 file changed, 1 insertion(+) commit 222f3390c15c4452a9f7e26f5b7d9138e75d00d5 Author: Jack Greiner Date: Fri Jan 17 16:51:58 2025 -0800 Input: xpad - add support for wooting two he (arm) Add Wooting Two HE (ARM) to the list of supported devices. Signed-off-by: Jack Greiner Signed-off-by: Pavel Rojtberg Link: https://lore.kernel.org/r/20250107192830.414709-3-rojtberg@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 1 + 1 file changed, 1 insertion(+) commit 66372fa9936088bf29c4f47907efeff03c51a2c8 Author: Leonardo Brondani Schenkel Date: Fri Jan 17 16:46:11 2025 -0800 Input: xpad - improve name of 8BitDo controller 2dc8:3106 8BitDo Pro 2 Wired Controller shares the same USB identifier (2dc8:3106) as a different device, so amend name to reflect that and reduce confusion as the user might think the controller was misdetected. Because Pro 2 Wired will not work in XTYPE_XBOXONE mode (button presses won't register), tagging it as XTYPE_XBOX360 remains appropriate. Signed-off-by: Leonardo Brondani Schenkel Signed-off-by: Pavel Rojtberg Link: https://lore.kernel.org/r/20250107192830.414709-2-rojtberg@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82db1c29103ebf581484c0b30805e68726121dcb Author: Masahiro Yamada Date: Tue Jan 14 00:00:52 2025 +0900 genksyms: fix syntax error for attribute after 'struct' A longstanding issue with genksyms is that it has hidden syntax errors. When a syntax error occurs, yyerror() is called. However, error_with_pos() is a no-op unless the -w option is provided. You can observe syntax errors by manually passing the -w option. For example, with CONFIG_MODVERSIONS=y on v6.13-rc1: $ make -s KCFLAGS=-D__GENKSYMS__ arch/x86/kernel/cpu/mshyperv.i $ cat arch/x86/kernel/cpu/mshyperv.i | scripts/genksyms/genksyms -w [ snip ] ./arch/x86/include/asm/svm.h:122: syntax error The syntax error occurs in the following code in arch/x86/include/asm/svm.h: struct __attribute__ ((__packed__)) vmcb_control_area { [ snip ] }; The issue arises from __attribute__ immediately after the 'struct' keyword. This commit allows the 'struct' keyword to be followed by attributes. The lexer must be adjusted because dont_want_brace_phase should not be decremented while processing attributes. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/lex.l | 7 ++++++- scripts/genksyms/parse.y | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) commit 2ac068cb0b366c61e7aebaccf0240eae8b2c1b43 Author: Masahiro Yamada Date: Tue Jan 14 00:00:51 2025 +0900 genksyms: fix syntax error for attribute after abstact_declarator A longstanding issue with genksyms is that it has hidden syntax errors. When a syntax error occurs, yyerror() is called. However, error_with_pos() is a no-op unless the -w option is provided. You can observe syntax errors by manually passing the -w option. For example, with CONFIG_MODVERSIONS=y on v6.13-rc1: $ make -s KCFLAGS=-D__GENKSYMS__ kernel/module/main.i $ cat kernel/module/main.i | scripts/genksyms/genksyms -w [ snip ] kernel/module/main.c:97: syntax error The syntax error occurs in the following code in kernel/module/main.c: static void __mod_update_bounds(enum mod_mem_type type __maybe_unused, void *base, unsigned int size, struct mod_tree_root *tree) { [ snip ] } The issue arises from __maybe_unused, which is defined as __attribute__((__unused__)). This commit allows direct_abstract_declarator to be followed with attributes. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a8b7d066f8626ec847d3e66aef1320968d1fe298 Author: Masahiro Yamada Date: Tue Jan 14 00:00:50 2025 +0900 genksyms: fix syntax error for attribute before nested_declarator A longstanding issue with genksyms is that it has hidden syntax errors. When a syntax error occurs, yyerror() is called. However, error_with_pos() is a no-op unless the -w option is provided. You can observe syntax errors by manually passing the -w option. For example, with CONFIG_MODVERSIONS=y on v6.13-rc1: $ make -s KCFLAGS=-D__GENKSYMS__ drivers/acpi/prmt.i $ cat drivers/acpi/prmt.i | scripts/genksyms/genksyms -w [ snip ] drivers/acpi/prmt.c:56: syntax error The syntax error occurs in the following code in drivers/acpi/prmt.c: struct prm_handler_info { [ snip ] efi_status_t (__efiapi *handler_addr)(u64, void *); [ snip ] }; The issue arises from __efiapi, which is defined as either __attribute__((ms_abi)) or __attribute__((regparm(0))). This commit allows nested_declarator to be prefixed with attributes. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2966b66c94a2b0d897f8626b8f2c50a0fd4878a9 Author: Masahiro Yamada Date: Tue Jan 14 00:00:49 2025 +0900 genksyms: fix syntax error for attribute before abstract_declarator A longstanding issue with genksyms is that it has hidden syntax errors. When a syntax error occurs, yyerror() is called. However, error_with_pos() is a no-op unless the -w option is provided. You can observe syntax errors by manually passing the -w option. For example, with CONFIG_MODVERSIONS=y on v6.13-rc1: $ make -s KCFLAGS=-D__GENKSYMS__ init/main.i $ cat init/main.i | scripts/genksyms/genksyms -w [ snip ] ./include/linux/efi.h:1225: syntax error The syntax error occurs in the following code in include/linux/efi.h: efi_status_t efi_call_acpi_prm_handler(efi_status_t (__efiapi *handler_addr)(u64, void *), u64 param_buffer_addr, void *context); The issue arises from __efiapi, which is defined as either __attribute__((ms_abi)) or __attribute__((regparm(0))). This commit allows abstract_declarator to be prefixed with attributes. To avoid conflicts, I tweaked the rule for decl_specifier_seq. Due to this change, a standalone attribute cannot become decl_specifier_seq. Otherwise, I do not know how to resolve the conflicts. The following code, which was previously accepted by genksyms, will now result in a syntax error: void my_func(__attribute__((unused))x); I do not think it is a big deal because GCC also fails to parse it. $ echo 'void my_func(__attribute__((unused))x);' | gcc -c -x c - :1:37: error: unknown type name 'x' Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/parse.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ec28bfff83c49b65527f0055e313d9d7c8c04a31 Author: Masahiro Yamada Date: Tue Jan 14 00:00:48 2025 +0900 genksyms: decouple ATTRIBUTE_PHRASE from type-qualifier The __attribute__ keyword can appear in more contexts than 'const' or 'volatile'. To avoid grammatical conflicts with future changes, ATTRIBUTE_PHRASE should not be reduced into type_qualifier. No functional changes are intended. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/parse.y | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ccc11a195c69b0c01ee140aecadfbdcdcdd03605 Author: Masahiro Yamada Date: Tue Jan 14 00:00:47 2025 +0900 genksyms: record attributes consistently for init-declarator I believe the missing action here is a bug. For rules with no explicit action, the following default is used: { $$ = $1; } However, in this case, $1 is the value of attribute_opt itself. As a result, the value of attribute_opt is always NULL. The following test code demonstrates inconsistent behavior. int x __attribute__((__aligned__(4))); int y __attribute__((__aligned__(4))) = 0; The attribute is recorded only when followed by an initializer. This commit adds the correct action to propagate the value of the ATTRIBUTE_PHRASE token. With this change, the attribute in the example above is consistently recorded for both 'x' and 'y'. [Before] $ cat < Defn for type0 y == Hash table occupancy 2/4096 = 0.000488281 [After] $ cat < Defn for type0 y == Hash table occupancy 2/4096 = 0.000488281 Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/parse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa710cee0d677043f49a447c4665df51a553a2ba Author: Masahiro Yamada Date: Tue Jan 14 00:00:46 2025 +0900 genksyms: restrict direct-declarator to take one parameter-type-list Similar to the previous commit, this change makes the parser logic a little more accurate. Currently, genksyms accepts the following invalid code: struct foo { int (*callback)(int)(int)(int); }; A direct-declarator should not recursively absorb multiple ( parameter-type-list ) constructs. In the example above, (*callback) should be followed by at most one (int). Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/parse.y | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit c2f1846ba87ead7ac544be624c13249d6b90eca0 Author: Masahiro Yamada Date: Tue Jan 14 00:00:45 2025 +0900 genksyms: restrict direct-abstract-declarator to take one parameter-type-list While there is no more grammatical ambiguity in genksyms, the parser logic is still inaccurate. For example, genksyms accepts the following invalid C code: void my_func(int ()(int)); This should result in a syntax error because () cannot be reduced to . ( ) can be reduced, but must not be empty in the following grammar from K&R [1]: ::= ( ) | {}? [ {}? ] | {}? ( {}? ) Furthermore, genksyms accepts the following weird code: void my_func(int (*callback)(int)(int)(int)); The parser allows to recursively absorb multiple ( {}? ), but this behavior is incorrect. In the example above, (*callback) should be followed by at most one (int). [1]: https://cs.wmich.edu/~gupta/teaching/cs4850/sumII06/The%20syntax%20of%20C%20in%20Backus-Naur%20form.htm Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/parse.y | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit a95298656c434357b38bec242412c65dcf6114d1 Author: Masahiro Yamada Date: Tue Jan 14 00:00:44 2025 +0900 genksyms: remove Makefile hack This workaround was introduced for suppressing the reduce/reduce conflict warnings because the %expect-rr directive, which is applicable only to GLR parsers, cannot be used for genksyms. Since there are no longer any conflicts, this Makefile hack is now unnecessary. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/Makefile | 18 ------------------ 1 file changed, 18 deletions(-) commit 668de2b9d48dccdc1b992e07287f15459515fefb Author: Masahiro Yamada Date: Tue Jan 14 00:00:43 2025 +0900 genksyms: fix last 3 shift/reduce conflicts The genksyms parser has ambiguities in its grammar, which are currently suppressed by a workaround in scripts/genksyms/Makefile. Building genksyms with W=1 generates the following warnings: YACC scripts/genksyms/parse.tab.[ch] scripts/genksyms/parse.y: warning: 3 shift/reduce conflicts [-Wconflicts-sr] scripts/genksyms/parse.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples The ambiguity arises when decl_specifier_seq is followed by '(' because the following two interpretations are possible: - decl_specifier_seq direct_abstract_declarator '(' parameter_declaration_clause ')' - decl_specifier_seq '(' abstract_declarator ')' This issue occurs because the current parser allows an empty string to be reduced to direct_abstract_declarator, which is incorrect. K&R [1] explains the correct grammar: ::= {}+ | {}+ | {}+ ::= | | ::= ( ) | {}? [ {}? ] | {}? ( {}? ) This commit resolves all remaining conflicts. We need to consider the difference between the following two examples: [Example 1] ( ) can become void my_func(int (foo)); ... is equivalent to: void my_func(int foo); [Example 2] ( ) can become typedef int foo; void my_func(int (foo)); ... is equivalent to: void my_func(int (*callback)(int)); Please note that the function declaration is identical in both examples, but the preceding typedef creates the distinction. I introduced a new term, open_paren, to enable the type lookup immediately after the '(' token. Without this, we cannot distinguish between [Example 1] and [Example 2]. [1]: https://cs.wmich.edu/~gupta/teaching/cs4850/sumII06/The%20syntax%20of%20C%20in%20Backus-Naur%20form.htm Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/parse.y | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 3ccda63a3af5f12c9e0b01c06561285227d2f79c Author: Masahiro Yamada Date: Tue Jan 14 00:00:42 2025 +0900 genksyms: fix 6 shift/reduce conflicts and 5 reduce/reduce conflicts The genksyms parser has ambiguities in its grammar, which are currently suppressed by a workaround in scripts/genksyms/Makefile. Building genksyms with W=1 generates the following warnings: YACC scripts/genksyms/parse.tab.[ch] scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr] scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr] scripts/genksyms/parse.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples The comment in the parser describes the current problem: /* This wasn't really a typedef name but an identifier that shadows one. */ Consider the following simple C code: typedef int foo; void my_func(foo foo) {} In the function parameter list (foo foo), the first 'foo' is a type specifier (typedef'ed as 'int'), while the second 'foo' is an identifier. However, the lexer cannot distinguish between the two. Since 'foo' is already typedef'ed, the lexer returns TYPE for both instances, instead of returning IDENT for the second one. To support shadowed identifiers, TYPE can be reduced to either a simple_type_specifier or a direct_abstract_declarator, which creates a grammatical ambiguity. Without analyzing the grammar context, it is very difficult to resolve this correctly. This commit introduces a flag, dont_want_type_specifier, which allows the parser to inform the lexer whether an identifier is expected. When dont_want_type_specifier is true, the type lookup is suppressed, and the lexer returns IDENT regardless of any preceding typedef. After this commit, only 3 shift/reduce conflicts will remain. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/genksyms.h | 3 +++ scripts/genksyms/lex.l | 9 ++++++++- scripts/genksyms/parse.y | 37 +++++++++++++++---------------------- 3 files changed, 26 insertions(+), 23 deletions(-) commit bc3a812b751ae1a4d91b3ea667ed77e76398bf46 Author: Masahiro Yamada Date: Tue Jan 14 00:00:41 2025 +0900 genksyms: reduce type_qualifier directly to decl_specifier A type_qualifier (const, volatile, etc.) is not a type_specifier. According to K&R [1], a type-qualifier should be directly reduced to a declaration-specifier. ::= | | [1]: https://cs.wmich.edu/~gupta/teaching/cs4850/sumII06/The%20syntax%20of%20C%20in%20Backus-Naur%20form.htm Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/parse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f33bfbd171a03c5d3f64ce956ccdfbece7114da4 Author: Masahiro Yamada Date: Tue Jan 14 00:00:40 2025 +0900 genksyms: rename cvar_qualifier to type_qualifier I believe "cvar" stands for "Const, Volatile, Attribute, or Restrict". This is called "type-qualifier" in K&R. [1] Adopt this more generic naming. No functional changes are intended. [1] https://cs.wmich.edu/~gupta/teaching/cs4850/sumII06/The%20syntax%20of%20C%20in%20Backus-Naur%20form.htm Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/parse.y | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 015b0bfe754ae157cfccd7a13c41391124b115f2 Author: Masahiro Yamada Date: Tue Jan 14 00:00:39 2025 +0900 genksyms: rename m_abstract_declarator to abstract_declarator This is called "abstract-declarator" in K&R. [1] I am not sure what "m_" stands for, but the name is clear enough without it. No functional changes are intended. [1] https://cs.wmich.edu/~gupta/teaching/cs4850/sumII06/The%20syntax%20of%20C%20in%20Backus-Naur%20form.htm Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier scripts/genksyms/parse.y | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 25ff08aa43e373a61c3e36fc7d7cae88ed0fc2d7 Author: Torsten Hilbrich Date: Mon Jan 13 07:01:29 2025 +0100 kbuild: Fix signing issue for external modules When running the sign script the kernel is within the source directory of external modules. This caused issues when the kernel uses relative paths, like: make[5]: Entering directory '/build/client/devel/kernel/work/linux-2.6' make[6]: Entering directory '/build/client/devel/addmodules/vtx/work/vtx' INSTALL /build/client/devel/addmodules/vtx/_/lib/modules/6.13.0-devel+/extra/vtx.ko SIGN /build/client/devel/addmodules/vtx/_/lib/modules/6.13.0-devel+/extra/vtx.ko /bin/sh: 1: scripts/sign-file: not found DEPMOD /build/client/devel/addmodules/vtx/_/lib/modules/6.13.0-devel+ Working around it by using absolute pathes here. Fixes: 13b25489b6f8 ("kbuild: change working directory to external module directory with M=") Signed-off-by: Torsten Hilbrich Signed-off-by: Masahiro Yamada scripts/Makefile.modinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b7f793acc13b6108452271b306d4aa94a3c4940 Author: Masahiro Yamada Date: Sun Dec 22 09:15:00 2024 +0900 ARC: 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_ARC_BUILTIN_DTB_NAME to CONFIG_BUILTIN_DTB_NAME. Now, "nsim_700" is the default value for CONFIG_BUILTIN_DTB_NAME, rather than a fallback in case it is empty. Acked-by: Vineet Gupta Signed-off-by: Masahiro Yamada arch/arc/Kconfig | 7 ++++--- arch/arc/Makefile | 3 --- arch/arc/boot/dts/Makefile | 9 +-------- arch/arc/configs/axs101_defconfig | 2 +- arch/arc/configs/axs103_defconfig | 2 +- arch/arc/configs/axs103_smp_defconfig | 2 +- arch/arc/configs/haps_hs_defconfig | 2 +- arch/arc/configs/haps_hs_smp_defconfig | 2 +- arch/arc/configs/hsdk_defconfig | 2 +- arch/arc/configs/nsim_700_defconfig | 2 +- arch/arc/configs/nsimosci_defconfig | 2 +- arch/arc/configs/nsimosci_hs_defconfig | 2 +- arch/arc/configs/nsimosci_hs_smp_defconfig | 2 +- arch/arc/configs/tb10x_defconfig | 2 +- arch/arc/configs/vdk_hs38_defconfig | 2 +- arch/arc/configs/vdk_hs38_smp_defconfig | 2 +- 16 files changed, 18 insertions(+), 27 deletions(-) commit ac61506bf2d1a6766d98b7d94b0c7b2134a0806a Author: Sami Tolvanen Date: Fri Jan 3 17:37:05 2025 +0000 rust: Use gendwarfksyms + extended modversions for CONFIG_MODVERSIONS Previously, two things stopped Rust from using MODVERSIONS: 1. Rust symbols are occasionally too long to be represented in the original versions table 2. Rust types cannot be properly hashed by the existing genksyms approach because: * Looking up type definitions in Rust is more complex than C * Type layout is potentially dependent on the compiler in Rust, not just the source type declaration. CONFIG_EXTENDED_MODVERSIONS addresses the first point, and CONFIG_GENDWARFKSYMS the second. If Rust wants to use MODVERSIONS, allow it to do so by selecting both features. Signed-off-by: Sami Tolvanen Co-developed-by: Matthew Maurer Signed-off-by: Matthew Maurer Signed-off-by: Masahiro Yamada init/Kconfig | 3 ++- rust/Makefile | 34 ++++++++++++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 3 deletions(-) commit 1c9be84a9074b2b91c0db6b88174145504acf0ef Author: Al Viro Date: Sun Dec 8 22:27:51 2024 -0500 make take_dentry_name_snapshot() lockless Use ->d_seq instead of grabbing ->d_lock; in case of shortname dentries that avoids any stores to shared data objects and in case of long names we are down to (unavoidable) atomic_inc on the external_name refcount. Makes the thing safer as well - the areas where ->d_seq is held odd are all nested inside the areas where ->d_lock is held, and the latter are much more numerous. NOTE: now that there is a lockless path where we might try to grab a reference to an already doomed external_name instance, it is no longer possible for external_name.u.count and external_name.u.head to share space (kudos to Linus for spotting that). To reduce the noise this commit just make external_name.u a struct (instead of union); the next commit will dissolve it. Reviewed-by: Jeff Layton Reviewed-by: Jan Kara Signed-off-by: Al Viro fs/dcache.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) commit 58cf9c383c5c686668082f83f7e0f3e0bd5cc2e3 Author: Al Viro Date: Mon Dec 9 19:35:36 2024 -0500 dcache: back inline names with a struct-wrapped array of unsigned long ... so that they can be copied with struct assignment (which generates better code) and accessed word-by-word. The type is union shortname_storage; it's a union of arrays of unsigned char and unsigned long. struct name_snapshot.inline_name turned into union shortname_storage; users (all in fs/dcache.c) adjusted. struct dentry.d_iname has some users outside of fs/dcache.c; to reduce the amount of noise in commit, it is replaced with union shortname_storage d_shortname and d_iname is turned into a macro that expands to d_shortname.string (similar to d_lock handling). That compat macro is temporary - most of the remaining instances will be taken out by debugfs series, and once that is merged and few others are taken care of this will go away. Reviewed-by: Jeff Layton Reviewed-by: Jan Kara Signed-off-by: Al Viro fs/dcache.c | 43 ++++++++++++---------------- include/linux/dcache.h | 10 +++++-- tools/testing/selftests/bpf/progs/find_vma.c | 2 +- 3 files changed, 28 insertions(+), 27 deletions(-) commit 61bc24ac974a4873e3040765e640f62fe99d6226 Author: Al Viro Date: Mon Dec 9 19:15:58 2024 -0500 make sure that DNAME_INLINE_LEN is a multiple of word size ... calling the number of words DNAME_INLINE_WORDS. The next step will be to have a structure to hold inline name arrays (both in dentry and in name_snapshot) and use that to alias the existing arrays of unsigned char there. That will allow both full-structure copies and convenient word-by-word accesses. Reviewed-by: Jeff Layton Reviewed-by: Jan Kara Signed-off-by: Al Viro fs/dcache.c | 4 +--- include/linux/dcache.h | 8 +++++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit b4a95b8fd3e67c1222c76bdd1078d43c9a11d132 Author: Dimitri Fedrau Date: Thu Jan 16 09:04:29 2025 +0100 power: supply: max1720x: add support for reading internal and thermistor temperatures If enabled in the nPackCfg register, the Temp1, Temp2 and IntTemp registers contain the temperature readings from the AIN1 thermistor, AIN2 thermistor and internal die temperature respectively. Registers are shared between SBS and normal IC functions and are always readable regardless of IC settings. Signed-off-by: Dimitri Fedrau Link: https://lore.kernel.org/r/20250116-max1720x-temperature-v2-1-9638969d091a@liebherr.com Signed-off-by: Sebastian Reichel .../ABI/testing/sysfs-class-power-max1720x | 32 ++++++++++++ drivers/power/supply/max1720x_battery.c | 60 +++++++++++++++++++++- 2 files changed, 91 insertions(+), 1 deletion(-) commit 92c71aa1a8942057e228c09d37f8513abbab5fea Author: Kim Seer Paller Date: Fri Jan 17 10:43:07 2025 +0800 power: supply: ltc4162l: Use GENMASK macro in bitmask operation Replace the bitmask operation BIT(6) - 1 with GENMASK(5, 0) to make the code clearer and readable. Reviewed-by: Nuno Sa Signed-off-by: Kim Seer Paller Link: https://lore.kernel.org/r/20250117024307.4119-1-kimseer.paller@analog.com Signed-off-by: Sebastian Reichel drivers/power/supply/ltc4162-l-charger.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6845de78ae3701ed19619cf786695072c73b8e92 Author: John Garry Date: Thu Jan 16 17:03:01 2025 +0000 dm-mirror: Support atomic writes Support atomic writes by setting DM_TARGET_ATOMIC_WRITES for the target type, and also unmasking REQ_ATOMIC from the submitted bio op flags. Signed-off-by: John Garry Reviewed-by: Mike Snitzer Signed-off-by: Mikulas Patocka drivers/md/dm-raid1.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c6a657d9683def5588aee6ed920cef61415a6a52 Author: John Garry Date: Thu Jan 16 17:03:00 2025 +0000 dm-io: Warn on creating multiple atomic write bios for a region A region should just be for a single atomic write, so warn when we are creating many. This should not occur if request queue limits are properly configured. Signed-off-by: John Garry Reviewed-by: Mike Snitzer Signed-off-by: Mikulas Patocka drivers/md/dm-io.c | 1 + 1 file changed, 1 insertion(+) commit 30b88ed06f8018b33e034c86d30d67b93f6aca12 Author: John Garry Date: Thu Jan 16 17:02:59 2025 +0000 dm-stripe: Enable atomic writes Set feature flag DM_TARGET_ATOMIC_WRITES. Similar to md raid0, the chunk size set in stripe_io_hints() limits the atomic write unit max. Signed-off-by: John Garry Reviewed-by: Mike Snitzer Signed-off-by: Mikulas Patocka drivers/md/dm-stripe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 487d1a9cb586746c03190310056e292e8552539e Author: John Garry Date: Thu Jan 16 17:02:58 2025 +0000 dm-linear: Enable atomic writes Set feature flag DM_TARGET_ATOMIC_WRITES. Signed-off-by: John Garry Reviewed-by: Mike Snitzer Signed-off-by: Mikulas Patocka drivers/md/dm-linear.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5f430e34087b4882545baa3d31962f1f7d735421 Author: John Garry Date: Thu Jan 16 17:02:57 2025 +0000 dm: Ensure cloned bio is same length for atomic write For an atomic write, a cloned bio must be same length as the original bio, i.e. no splitting. Error in case it is not. Per-dm device queue limits should be setup to ensure that this does not happen, but error this case as an insurance policy. Signed-off-by: John Garry Reviewed-by: Mike Snitzer Signed-off-by: Mikulas Patocka drivers/md/dm.c | 3 +++ 1 file changed, 3 insertions(+) commit 3194e36488e2dae05f9a822c73eaa367e47b2e3d Author: John Garry Date: Thu Jan 16 17:02:56 2025 +0000 dm-table: atomic writes support Support stacking atomic write limits for DM devices. All the pre-existing code in blk_stack_atomic_writes_limits() already takes care of finding the aggregrate limits from the bottom devices. Feature flag DM_TARGET_ATOMIC_WRITES is introduced so that atomic writes can be enabled on personalities selectively. This is to ensure that atomic writes are only enabled when verified to be working properly (for a specific personality). In addition, it just may not make sense to enable atomic writes on some personalities (so this flag also helps there). Signed-off-by: John Garry Reviewed-by: Mike Snitzer Signed-off-by: Mikulas Patocka drivers/md/dm-table.c | 29 +++++++++++++++++++++++++++++ include/linux/device-mapper.h | 3 +++ include/uapi/linux/dm-ioctl.h | 4 ++-- 3 files changed, 34 insertions(+), 2 deletions(-) commit a38425935f7886cef5fe04c796f36715e9d0ef3f Author: Mikulas Patocka Date: Wed Jan 15 18:33:30 2025 +0100 dm-transaction-manager: use red-black trees instead of linear lists There was reported performance degradation when the shadow map contained too many entries [1]. The shadow map uses 256-bucket hash with linear lists - when there are too many entries, it has quadratic complexity. Meir Elisha proposed to add a module parameter that could configure the size of the hash array - however, this is not ideal because users don't know that they should increase the parameter when they get bad performance. This commit replaces the linear lists with rb-trees (so that there's a hash of rb-trees), they have logarithmic complexity, so it solves the performance degradation. Link: https://patchwork.kernel.org/project/dm-devel/patch/20241014134944.1264991-1-meir.elisha@volumez.com/ [1] Reported-by: Meir Elisha Signed-off-by: Mikulas Patocka .../md/persistent-data/dm-transaction-manager.c | 54 +++++++++++++++------- 1 file changed, 37 insertions(+), 17 deletions(-) commit cd6521d03f6a722f18fc027f0d289c39d164dc4f Author: Mikulas Patocka Date: Thu Jan 9 14:49:11 2025 +0100 dm: disable REQ_NOWAIT for flushes REQ_NOWAIT for flushes cannot be easily supported by device mapper because it may allocate multiple bios and its impossible to undo if one of those allocations wants to wait. So, this patch disables REQ_NOWAIT flushes in device mapper and we always return EAGAIN. Previously, the code accepted REQ_NOWAIT flushes, but the non-blocking execution was not guaranteed. Signed-off-by: Mikulas Patocka drivers/md/dm.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6942348d1bbdb612bc14025cab467fd1f012abe8 Author: Mikulas Patocka Date: Thu Jan 9 14:47:20 2025 +0100 dm: remove useless test in alloc_multiple_bios The test gfp_flag & GFP_NOWAIT was always true, because both GFP_NOIO and GFP_NOWAIT include the flag __GFP_KSWAPD_RECLAIM. Luckily, this oversight didn't result in any harm; the loop always started with "try = 0". This patch removes the faulty test and explicitly starts the loop with "try = 0" (so that we don't hold the mutex in the first iteration). Signed-off-by: Mikulas Patocka drivers/md/dm.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit c3a1f2ef72a97a79410c566022c5ea962f815ed9 Author: Ethan Carter Edwards Date: Tue Dec 24 22:13:21 2024 +0000 dm: change kzalloc to kcalloc Use 2-factor multiplication argument form kcalloc() instead of instead of the deprecated kzalloc() [1]. [1] https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Ethan Carter Edwards Reviewed-by: Gustavo A. R. Silva Signed-off-by: Mikulas Patocka drivers/md/dm-ps-io-affinity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 193700b9b218a77222a1b5cd53206c17c40f786b Author: liujing Date: Mon Dec 9 11:10:55 2024 +0800 dm raid: fix spelling errors in raid_ctr() Fix the respective spelling errors in raid_ctr() function. Signed-off-by: liujing Signed-off-by: Mikulas Patocka drivers/md/dm-raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 166eb2356e4f604b893701f90af1d97dade49ce8 Merge: c3a8b2bfda3c 3d6f25870d17 Author: Rafael J. Wysocki Date: Fri Jan 17 21:36:37 2025 +0100 Merge tag 'linux-cpupower-6.14-rc1-second' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shuah/linux Merge additional cpupower update for 6.14 from Shuah Khan: "- Add missing residency header changes in cpuidle.h to SWIG" * tag 'linux-cpupower-6.14-rc1-second' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shuah/linux: pm: cpupower: Add missing residency header changes in cpuidle.h to SWIG commit 554b22864cc79e28cd65e3a6e1d0d1dfa8581c68 Author: John Garry Date: Thu Jan 16 17:02:55 2025 +0000 block: Don't trim an atomic write This is disallowed. This check will now be relevant since the device mapper personalities will start to support atomic writes, and they use this function. Signed-off-by: John Garry Reviewed-by: Mike Snitzer Link: https://lore.kernel.org/r/20250116170301.474130-3-john.g.garry@oracle.com Signed-off-by: Jens Axboe block/bio.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6a7e17b22062c84a111d7073c67cc677c4190f32 Author: John Garry Date: Thu Jan 16 17:02:54 2025 +0000 block: Add common atomic writes enable flag Currently only stacked devices need to explicitly enable atomic writes by setting BLK_FEAT_ATOMIC_WRITES_STACKED flag. This does not work well for device mapper stacking devices, as there many sets of limits are stacked and what is the 'bottom' and 'top' device can swapped. This means that BLK_FEAT_ATOMIC_WRITES_STACKED needs to be set for many queue limits, which is messy. Generalize enabling atomic writes enabling by ensuring that all devices must explicitly set a flag - that includes NVMe, SCSI sd, and md raid. Signed-off-by: John Garry Reviewed-by: Mike Snitzer Link: https://lore.kernel.org/r/20250116170301.474130-2-john.g.garry@oracle.com Signed-off-by: Jens Axboe block/blk-settings.c | 6 ++++-- drivers/md/raid0.c | 2 +- drivers/md/raid1.c | 2 +- drivers/md/raid10.c | 2 +- drivers/nvme/host/core.c | 1 + drivers/scsi/sd.c | 1 + include/linux/blkdev.h | 4 ++-- 7 files changed, 11 insertions(+), 7 deletions(-) commit fd8318a32573d73eb20637a0c80689de0dc98169 Author: Peng Fan Date: Fri Jan 3 16:41:13 2025 +0800 PM: sleep: wakeirq: Introduce device-managed variant of dev_pm_set_wake_irq() Add device-managed variant of dev_pm_set_wake_irq which automatically clear the wake irq on device destruction to simplify error handling and resource management in drivers. Signed-off-by: Peng Fan Link: https://patch.msgid.link/20250103-wake_irq-v2-1-e3aeff5e9966@nxp.com Signed-off-by: Rafael J. Wysocki drivers/base/power/wakeirq.c | 26 ++++++++++++++++++++++++++ include/linux/pm_wakeirq.h | 6 ++++++ 2 files changed, 32 insertions(+) commit 11cb3529d18514f7d28ad2190533192aedefd761 Author: Georg Gottleuber Date: Mon Dec 16 23:28:04 2024 +0100 nvme-pci: Add TUXEDO IBP Gen9 to Samsung sleep quirk On the TUXEDO InfinityBook Pro Gen9 Intel, a Samsung 990 Evo NVMe leads to a high power consumption in s2idle sleep (4 watts). This patch applies 'Force No Simple Suspend' quirk to achieve a sleep with a lower power consumption, typically around 1.2 watts. Signed-off-by: Georg Gottleuber Cc: stable@vger.kernel.org Signed-off-by: Werner Sembach Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch drivers/nvme/host/pci.c | 1 + 1 file changed, 1 insertion(+) commit dbf2bb1a1319b7c7d8828905378a6696cca6b0f2 Author: Georg Gottleuber Date: Mon Dec 16 23:28:03 2024 +0100 nvme-pci: Add TUXEDO InfinityFlex to Samsung sleep quirk On the TUXEDO InfinityFlex, a Samsung 990 Evo NVMe leads to a high power consumption in s2idle sleep (4 watts). This patch applies 'Force No Simple Suspend' quirk to achieve a sleep with a lower power consumption, typically around 1.4 watts. Signed-off-by: Georg Gottleuber Cc: stable@vger.kernel.org Signed-off-by: Werner Sembach Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch drivers/nvme/host/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d68fc95a771e0a7edd876ede7913d61276be77fd Author: Francis Pravin Date: Fri Jan 17 05:12:09 2025 +0530 nvme-pci: remove redundant dma frees in hmb The value of size is 0 when there is no dma buffer allocated. The value of i also remains 0. So, no need to free the dma buffer in out_free_bufs. Hence, remove the redundant dma frees. Signed-off-by: Francis Pravin Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch drivers/nvme/host/pci.c | 8 -------- 1 file changed, 8 deletions(-) commit 368736db4d1c317ad065a1c827b09cfac942e05a Merge: 6696037a56a7 586e62fe380f Author: Borislav Petkov (AMD) Date: Fri Jan 17 19:36:27 2025 +0100 Merge remote-tracking branches 'ras/edac-drivers' and 'ras/edac-misc' into edac-updates * ras/edac-drivers: EDAC/cell: Remove powerpc Cell driver EDAC: Add an EDAC driver for the Loongson memory controller EDAC/{i10nm,skx,skx_common}: Support UV systems EDAC/i10nm: Add Intel Clearwater Forest server support * ras/edac-misc: EDAC: Fix typos in comments Signed-off-by: Borislav Petkov (AMD) commit ac22d75377a04ceca53a8d438440e82bf4c722fc Author: Chun-Tse Shao Date: Thu Jan 16 15:58:16 2025 -0800 perf lock: Rename fields in lock_type_table `lock_type_table` contains `name` and `str` which can be confusing. Rename them to `flags_name` and `lock_name` and add descriptions to enhance understanding. Tested by building perf for x86. Reviewed-by: Namhyung Kim Signed-off-by: Chun-Tse Shao Cc: nick.forrington@arm.com Link: https://lore.kernel.org/r/20250116235838.2769691-3-ctshao@google.com Signed-off-by: Namhyung Kim tools/perf/builtin-lock.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit e9188ae3cd4e75297430c932d6e256c053bcc896 Author: Chun-Tse Shao Date: Thu Jan 16 15:58:15 2025 -0800 perf lock: Add percpu-rwsem for type filter percpu-rwsem was missing in man page. And for backward compatibility, replace `pcpu-sem` with `percpu-rwsem` before parsing lock name. Tested `./perf lock con -ab -Y pcpu-sem` and `./perf lock con -ab -Y percpu-rwsem` Fixes: 4f701063bfa2 ("perf lock contention: Show lock type with address") Reviewed-by: Namhyung Kim Signed-off-by: Chun-Tse Shao Cc: nick.forrington@arm.com Link: https://lore.kernel.org/r/20250116235838.2769691-2-ctshao@google.com Signed-off-by: Namhyung Kim tools/perf/Documentation/perf-lock.txt | 4 ++-- tools/perf/builtin-lock.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) commit 1be9264158ef4818393e5d8144887a1a5d3cc480 Author: Chun-Tse Shao Date: Thu Jan 16 15:58:14 2025 -0800 perf lock: Fix parse_lock_type which only retrieve one lock flag `parse_lock_type` can only add the first lock flag in `lock_type_table` given input `str`. For example, for `Y rwlock`, it only adds `rwlock:R` into this perf session. Another example is for `-Y mutex`, it only adds the mutex without `LCB_F_SPIN` flag. The patch fixes this issue, makes sure both `rwlock:R` and `rwlock:W` will be added with `-Y rwlock`, and so on. Testing: $ ./perf lock con -ab -Y mutex,rwlock -- perf bench sched pipe # Running 'sched/pipe' benchmark: # Executed 1000000 pipe operations between two processes Total time: 9.313 [sec] 9.313976 usecs/op 107365 ops/sec contended total wait max wait avg wait type caller 176 1.65 ms 19.43 us 9.38 us mutex pipe_read+0x57 34 180.14 us 10.93 us 5.30 us mutex pipe_write+0x50 7 77.48 us 16.09 us 11.07 us mutex do_epoll_wait+0x24d 7 74.70 us 13.50 us 10.67 us mutex do_epoll_wait+0x24d 3 35.97 us 14.44 us 11.99 us rwlock:W ep_done_scan+0x2d 3 35.00 us 12.23 us 11.66 us rwlock:W do_epoll_wait+0x255 2 15.88 us 11.96 us 7.94 us rwlock:W do_epoll_wait+0x47c 1 15.23 us 15.23 us 15.23 us rwlock:W do_epoll_wait+0x4d0 1 14.26 us 14.26 us 14.26 us rwlock:W ep_done_scan+0x2d 2 14.00 us 7.99 us 7.00 us mutex pipe_read+0x282 1 12.29 us 12.29 us 12.29 us rwlock:R ep_poll_callback+0x35 1 12.02 us 12.02 us 12.02 us rwlock:W do_epoll_ctl+0xb65 1 10.25 us 10.25 us 10.25 us rwlock:R ep_poll_callback+0x35 1 7.86 us 7.86 us 7.86 us mutex do_epoll_ctl+0x6c1 1 5.04 us 5.04 us 5.04 us mutex do_epoll_ctl+0x3d4 [namhyung: Add a comment and rename to 'mutex:spin' for consistency Fixes: d783ea8f62c4 ("perf lock contention: Simplify parse_lock_type()") Reviewed-by: Namhyung Kim Signed-off-by: Chun-Tse Shao Cc: nick.forrington@arm.com Link: https://lore.kernel.org/r/20250116235838.2769691-1-ctshao@google.com Signed-off-by: Namhyung Kim tools/perf/builtin-lock.c | 66 +++++++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 25 deletions(-) commit 83196dd3499ae032e6cd2afbc663dbad50b3850a Author: Athira Rajeev Date: Fri Jan 10 15:07:30 2025 +0530 perf lock: Fix return code for functions in __cmd_contention perf lock contention returns zero exit value even if the lock contention BPF setup failed. # ./perf lock con -b true libbpf: kernel BTF is missing at '/sys/kernel/btf/vmlinux', was CONFIG_DEBUG_INFO_BTF enabled? libbpf: failed to find '.BTF' ELF section in /lib/modules/6.13.0-rc3+/build/vmlinux libbpf: failed to find valid kernel BTF libbpf: kernel BTF is missing at '/sys/kernel/btf/vmlinux', was CONFIG_DEBUG_INFO_BTF enabled? libbpf: failed to find '.BTF' ELF section in /lib/modules/6.13.0-rc3+/build/vmlinux libbpf: failed to find valid kernel BTF libbpf: Error loading vmlinux BTF: -ESRCH libbpf: failed to load object 'lock_contention_bpf' libbpf: failed to load BPF skeleton 'lock_contention_bpf': -ESRCH Failed to load lock-contention BPF skeleton lock contention BPF setup failed # echo $? 0 Fix this by saving the return code for lock_contention_prepare so that command exits with proper return code. Similarly set the return code properly for two other functions in builtin-lock, namely setup_output_field() and select_key(). Signed-off-by: Athira Rajeev Reviewed-by: Namhyung Kim Link: https://lore.kernel.org/r/20250110093730.93610-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Namhyung Kim tools/perf/builtin-lock.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 2a794ee613617b5d8fd978b7ef08d64aa07ff2e6 Author: Mickaël Salaün Date: Wed Jan 8 16:43:30 2025 +0100 selftests/landlock: Add layout1.umount_sandboxer tests Check that a domain is not tied to the executable file that created it. For instance, that could happen if a Landlock domain took a reference to a struct path. Move global path names to common.h and replace copy_binary() with a more generic copy_file() helper. Test coverage for security/landlock is 92.7% of 1133 lines according to gcc/gcov-14. Cc: Günther Noack Link: https://lore.kernel.org/r/20250108154338.1129069-23-mic@digikod.net [mic: Update date and add test coverage] Signed-off-by: Mickaël Salaün tools/testing/selftests/landlock/Makefile | 2 +- tools/testing/selftests/landlock/common.h | 3 + tools/testing/selftests/landlock/fs_test.c | 94 +++++++++++++++++++--- .../selftests/landlock/sandbox-and-launch.c | 82 +++++++++++++++++++ tools/testing/selftests/landlock/wait-pipe.c | 42 ++++++++++ 5 files changed, 213 insertions(+), 10 deletions(-) commit 5147779d5e1b6425f30eb57071717be2bb65fa3b Author: Mickaël Salaün Date: Wed Jan 8 16:43:29 2025 +0100 selftests/landlock: Add wrappers.h Extract syscall wrappers to make them usable by standalone binaries (see next commit). Cc: Günther Noack Link: https://lore.kernel.org/r/20250108154338.1129069-22-mic@digikod.net [mic: Fix comments] Signed-off-by: Mickaël Salaün tools/testing/selftests/landlock/common.h | 37 +---------------------- tools/testing/selftests/landlock/wrappers.h | 47 +++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 36 deletions(-) commit 2107c35128ad751b201eb92fe91443450d9e5c37 Author: Mickaël Salaün Date: Wed Jan 8 16:43:28 2025 +0100 selftests/landlock: Fix error message The global variable errno may not be set in test_execute(). Do not use it in related error message. Cc: Günther Noack Fixes: e1199815b47b ("selftests/landlock: Add user space tests") Link: https://lore.kernel.org/r/20250108154338.1129069-21-mic@digikod.net Signed-off-by: Mickaël Salaün tools/testing/selftests/landlock/fs_test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d617f0d72d8041c7099fd04a62db0f0fa5331c1a Author: Mickaël Salaün Date: Wed Jan 8 16:43:21 2025 +0100 landlock: Optimize file path walks and prepare for audit support Always synchronize access_masked_parent* with access_request_parent* according to allowed_parent*. This is required for audit support to be able to get back to the reason of denial. In a rename/link action, instead of always checking a rule two times for the same parent directory of the source and the destination files, only check it when an action on a child was not already allowed. This also enables us to keep consistent allowed_parent* status, which is required to get back to the reason of denial. For internal mount points, only upgrade allowed_parent* to true but do not wrongfully set both of them to false otherwise. This is also required to get back to the reason of denial. This does not impact the current behavior but slightly optimize code and prepare for audit support that needs to know the exact reason why an access was denied. Cc: Günther Noack Link: https://lore.kernel.org/r/20250108154338.1129069-14-mic@digikod.net Signed-off-by: Mickaël Salaün security/landlock/fs.c | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) commit 12264f721f64a235f81e845e2cf95ad4a267613a Author: Mickaël Salaün Date: Wed Jan 8 16:43:20 2025 +0100 selftests/landlock: Add test to check partial access in a mount tree Add layout1.refer_part_mount_tree_is_allowed to test the masked logical issue regarding collect_domain_accesses() calls followed by the is_access_to_paths_allowed() check in current_check_refer_path(). See previous commit. This test should work without the previous fix as well, but it enables us to make sure future changes will not have impact regarding this behavior. Cc: Günther Noack Link: https://lore.kernel.org/r/20250108154338.1129069-13-mic@digikod.net Signed-off-by: Mickaël Salaün tools/testing/selftests/landlock/fs_test.c | 54 +++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 4 deletions(-) commit 058518c2092081f224edb37cbc236bed5c28852d Author: Mickaël Salaün Date: Wed Jan 8 16:43:19 2025 +0100 landlock: Align partial refer access checks with final ones Fix a logical issue that could have been visible if the source or the destination of a rename/link action was allowed for either the source or the destination but not both. However, this logical bug is unreachable because either: - the rename/link action is allowed by the access rights tied to the same mount point (without relying on access rights in a parent mount point) and the access request is allowed (i.e. allow_parent1 and allow_parent2 are true in current_check_refer_path), - or a common rule in a parent mount point updates the access check for the source and the destination (cf. is_access_to_paths_allowed). See the following layout1.refer_part_mount_tree_is_allowed test that work with and without this fix. This fix does not impact current code but it is required for the audit support. Cc: Günther Noack Link: https://lore.kernel.org/r/20250108154338.1129069-12-mic@digikod.net Signed-off-by: Mickaël Salaün security/landlock/fs.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit d6c7cf84a24fff332ff65ffe236302216474b834 Author: Mickaël Salaün Date: Wed Jan 8 16:43:14 2025 +0100 landlock: Simplify initially denied access rights Upgrade domain's handled access masks when creating a domain from a ruleset, instead of converting them at runtime. This is more consistent and helps with audit support. Cc: Günther Noack Link: https://lore.kernel.org/r/20250108154338.1129069-7-mic@digikod.net Signed-off-by: Mickaël Salaün security/landlock/access.h | 17 ++++++++++++++++- security/landlock/fs.c | 10 +--------- security/landlock/ruleset.c | 3 ++- 3 files changed, 19 insertions(+), 11 deletions(-) commit 622e2f5954763385c4fa1f9a11a11366952a9b60 Author: Mickaël Salaün Date: Wed Jan 8 16:43:13 2025 +0100 landlock: Move access types Move LANDLOCK_ACCESS_FS_INITIALLY_DENIED, access_mask_t, struct access_mask, and struct access_masks_all to a dedicated access.h file. Rename LANDLOCK_ACCESS_FS_INITIALLY_DENIED to _LANDLOCK_ACCESS_FS_INITIALLY_DENIED to make it clear that it's not part of UAPI. Add some newlines when appropriate. This file will be extended with following commits, and it will help to avoid dependency loops. Cc: Günther Noack Link: https://lore.kernel.org/r/20250108154338.1129069-6-mic@digikod.net [mic: Fix rebase conflict because of the new cleanup headers] Signed-off-by: Mickaël Salaün security/landlock/access.h | 62 +++++++++++++++++++++++++++++++++++++++++++++ security/landlock/fs.c | 3 ++- security/landlock/fs.h | 1 + security/landlock/ruleset.c | 1 + security/landlock/ruleset.h | 47 ++-------------------------------- 5 files changed, 68 insertions(+), 46 deletions(-) commit 924f4403d869ad24bd2c54ad97ad87d4b838d09c Author: Mickaël Salaün Date: Wed Jan 8 16:43:11 2025 +0100 landlock: Factor out check_access_path() Merge check_access_path() into current_check_access_path() and make hook_path_mknod() use it. Cc: Günther Noack Link: https://lore.kernel.org/r/20250108154338.1129069-4-mic@digikod.net Signed-off-by: Mickaël Salaün security/landlock/fs.c | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) commit 0e4db4f843c2c0115b5981bd6f6b75dea62e7d60 Author: Mickaël Salaün Date: Wed Jan 15 15:54:07 2025 +0100 selftests/landlock: Fix build with non-default pthread linking Old toolchains require explicit -lpthread (e.g. on Debian 11). Cc: Nathan Chancellor Cc: Tahera Fahimi Fixes: c8994965013e ("selftests/landlock: Test signal scoping for threads") Reviewed-by: Günther Noack Link: https://lore.kernel.org/r/20250115145409.312226-1-mic@digikod.net Signed-off-by: Mickaël Salaün tools/testing/selftests/landlock/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f994c1cb6c438bb32487d36ab26c1954829cab1f Author: Krzysztof Kozlowski Date: Tue Jan 14 20:06:00 2025 +0100 cpufreq: Use str_enable_disable()-like helpers Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski Acked-by: Viresh Kumar Link: https://patch.msgid.link/20250114190600.846651-1-krzysztof.kozlowski@linaro.org [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 7 ++++--- drivers/cpufreq/powernv-cpufreq.c | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) commit 036e2faa997c39a5f15dbeb50528911778d8b29d Author: Dmitry Vyukov Date: Wed Jan 8 07:59:34 2025 +0100 perf hist: Fix width calculation in hpp__fmt() hpp__width_fn() round up width to length of the field name, hpp__fmt() should do it too. Otherwise, the numbers may end up unaligned if the field name is long. Signed-off-by: Dmitry Vyukov Reviewed-by: James Clark Link: https://lore.kernel.org/r/20250108065949.235718-1-dvyukov@google.com Signed-off-by: Namhyung Kim tools/perf/ui/hist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ac66e512f13452d31e20d12546dc0b81a0ec713 Author: Rafael J. Wysocki Date: Thu Jan 16 20:31:56 2025 +0100 thermal: core: Rename function argument related to trip crossing Rename the 'crossed_up' function argument to 'upward', which is more proper English and a better match for representing temperature change direction, everywhere in the code. No functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukasz Luba Link: https://patch.msgid.link/2360961.ElGaqSPkdT@rjwysocki.net [ rjw: Rebased ] Signed-off-by: Rafael J. Wysocki drivers/thermal/gov_bang_bang.c | 6 +++--- drivers/thermal/gov_user_space.c | 4 ++-- drivers/thermal/thermal_core.c | 10 +++++----- drivers/thermal/thermal_core.h | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) commit e86001d6d09ddd93237bfcbc2dcfc01230f6b7a9 Author: Rafael J. Wysocki Date: Thu Jan 16 20:31:11 2025 +0100 thermal: gov_bang_bang: Relocate regulation logic description Move the regulation logic description from the bang_bang_trip_crossed() kerneldoc to the preamble. No functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukasz Luba Link: https://patch.msgid.link/4987649.31r3eYUQgx@rjwysocki.net [ rjw: Removed a trailing whitespace ] Signed-off-by: Rafael J. Wysocki drivers/thermal/gov_bang_bang.c | 43 ++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 22 deletions(-) commit 06354d7a619f9e8abfdbc21595605875f12d5f14 Author: Rafael J. Wysocki Date: Thu Jan 16 20:30:27 2025 +0100 thermal: core: Rename callback functions in two governors The names of :trip_crossed() callback functions in the Bang-bang and User-space thermal governors don't match their current purpose any more after previous changes, so rename them. No functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukasz Luba Link: https://patch.msgid.link/5859084.DvuYhMxLoT@rjwysocki.net drivers/thermal/gov_bang_bang.c | 10 +++++----- drivers/thermal/gov_user_space.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) commit 367a8200a91025289f9664e468fbc2b67c95e70e Author: Kory Maincent Date: Wed Jan 15 15:41:58 2025 +0100 regulator: dt-bindings: Add regulator-power-budget-milliwatt property Introduce a new property to describe the power budget of the regulator. This property will allow power management support for regulator consumers like PSE controllers, enabling them to make decisions based on the available power capacity. Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20250115-feature_regulator_pw_budget-v2-2-0a44b949e6bc@bootlin.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/regulator/regulator.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 42d7c87b4e1251f36eceac987e74623e7cda8577 Author: Kory Maincent Date: Wed Jan 15 15:41:57 2025 +0100 regulator: Add support for power budget Introduce power budget management for the regulator device. Enable tracking of available power capacity by providing helpers to request and release power budget allocations. Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20250115-feature_regulator_pw_budget-v2-1-0a44b949e6bc@bootlin.com Signed-off-by: Mark Brown drivers/regulator/core.c | 114 +++++++++++++++++++++++++++++++++++++ drivers/regulator/of_regulator.c | 3 + include/linux/regulator/consumer.h | 21 +++++++ include/linux/regulator/driver.h | 2 + include/linux/regulator/machine.h | 2 + 5 files changed, 142 insertions(+) commit 0025d83a3c201d0f1cda1085a3847591af563ec2 Author: Kurt Borja Date: Wed Jan 15 19:27:21 2025 -0500 ACPI: platform_profile: Add a prefix to log messages Declare a pr_fmt prefix. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-20-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/acpi/platform_profile.c | 2 ++ 1 file changed, 2 insertions(+) commit ee7f3e2b4942e3f6d8837780d0d3d5d58de8801a Author: Kurt Borja Date: Wed Jan 15 19:27:20 2025 -0500 ACPI: platform_profile: Add documentation Add kerneldoc and sysfs class documentation. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-19-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen .../ABI/testing/sysfs-class-platform-profile | 48 ++++++++++++++++++++++ drivers/acpi/platform_profile.c | 33 +++++++++++++++ include/linux/platform_profile.h | 10 +++++ 3 files changed, 91 insertions(+) commit c4f7d255be321d6cb0543174509f2b39f7c763b9 Author: Kurt Borja Date: Wed Jan 15 19:27:19 2025 -0500 ACPI: platform_profile: Clean platform_profile_handler Remove parent device *dev from platform_profile_handler, as it's no longer accessed directly. Rename class_dev -> dev. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-18-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/acpi/platform_profile.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 6ef33895503583d0741a0d8faf820ca8143b9cf2 Author: Kurt Borja Date: Wed Jan 15 19:27:18 2025 -0500 ACPI: platform_profile: Move platform_profile_handler platform_profile_handler is now an internal structure. Move it to platform_profile.c. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-17-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/acpi/platform_profile.c | 9 +++++++++ include/linux/platform_profile.h | 11 ----------- 2 files changed, 9 insertions(+), 11 deletions(-) commit 07f531b395db3cd1776ef0f7191abf4b077fcf21 Author: Kurt Borja Date: Wed Jan 15 19:27:17 2025 -0500 ACPI: platform_profile: Remove platform_profile_handler from exported symbols In order to protect the platform_profile_handler from API consumers, allocate it in platform_profile_register() and modify it's signature accordingly. Remove the platform_profile_handler from all consumer drivers and replace them with a pointer to the class device, which is now returned from platform_profile_register(). Replace *pprof with a pointer to the class device in the rest of exported symbols. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-16-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/acpi/platform_profile.c | 98 ++++++++++++++-------- .../platform/surface/surface_platform_profile.c | 11 ++- drivers/platform/x86/acer-wmi.c | 18 ++-- drivers/platform/x86/amd/pmf/pmf.h | 2 +- drivers/platform/x86/amd/pmf/sps.c | 17 ++-- drivers/platform/x86/asus-wmi.c | 15 ++-- drivers/platform/x86/dell/alienware-wmi.c | 10 +-- drivers/platform/x86/dell/dell-pc.c | 21 ++--- drivers/platform/x86/hp/hp-wmi.c | 19 ++--- drivers/platform/x86/ideapad-laptop.c | 15 ++-- drivers/platform/x86/inspur_platform_profile.c | 9 +- drivers/platform/x86/thinkpad_acpi.c | 14 ++-- include/linux/platform_profile.h | 12 ++- 13 files changed, 129 insertions(+), 132 deletions(-) commit 31658c916fa692b7dfceaba6fc6320b81c05b9c2 Author: Kurt Borja Date: Wed Jan 15 19:27:16 2025 -0500 platform/x86: thinkpad_acpi: Use devm_platform_profile_register() Replace platform_profile_register() with it's device managed version. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-15-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/thinkpad_acpi.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit c72ca29e7f4a6b3a2a3f9095f9e62ef281425e48 Author: Kurt Borja Date: Wed Jan 15 19:27:15 2025 -0500 platform/x86: inspur_platform_profile: Use devm_platform_profile_register() Replace platform_profile_register() with it's device managed version. While at it, pass inspur_wmi_priv to the class device as drvdata and replace uses of container_of() with dev_get_drvdata(). Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-14-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/inspur_platform_profile.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit db0c8eb72bc7ec65be830783461860de5041c71f Author: Kurt Borja Date: Wed Jan 15 19:27:14 2025 -0500 platform/x86: hp-wmi: Use devm_platform_profile_register() Replace platform_profile_register() with it's device managed version. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-13-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/hp/hp-wmi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2cec2c4dc90cbf5194c1acef08c1e74f0437af95 Author: Thorsten Blum Date: Tue Jan 14 21:25:00 2025 +0100 sparc/irq: Remove unneeded if check in sun4v_cookie_only_virqs() Remove the unnecessary if check and return the result directly. Signed-off-by: Thorsten Blum Reviewed-by: Andreas Larsson Link: https://lore.kernel.org/r/20250114202502.912690-1-thorsten.blum@linux.dev Signed-off-by: Andreas Larsson arch/sparc/kernel/irq_64.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4b9f0bdc2071aa0c04f8bb1f624ee678221d938e Author: Thorsten Blum Date: Wed Jan 15 10:03:43 2025 +0100 sparc/irq: Use str_enabled_disabled() helper function Remove hard-coded strings by using the str_enabled_disabled() helper function. Signed-off-by: Thorsten Blum Reviewed-by: Andreas Larsson Link: https://lore.kernel.org/r/20250115090344.918290-2-thorsten.blum@linux.dev Signed-off-by: Andreas Larsson arch/sparc/kernel/irq_64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f4ab186830222a18e2c232b425f2945b408e2607 Author: Zhang Kunbo Date: Wed Dec 18 07:44:39 2024 +0000 sparc: replace zero-length array with flexible-array member The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last, which is beneficial to cultivate a high-quality code.[2] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Zhang Kunbo Reviewed-by: Andreas Larsson Link: https://lore.kernel.org/r/20241218074439.3271397-1-zhangkunbo@huawei.com Signed-off-by: Andreas Larsson arch/sparc/kernel/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 929bd2a1772c91159b7a26fb559c8e4cde0d3dc3 Author: David Wang <00107082@163.com> Date: Sat Nov 9 00:11:23 2024 +0800 sparc/irq: use seq_put_decimal_ull_width() for decimal values Performance improvement for reading /proc/interrupts on arch sparc Signed-off-by: David Wang <00107082@163.com> Reviewed-by: Andreas Larsson Tested-by: Andreas Larsson Link: https://lore.kernel.org/r/20241108161123.9637-1-00107082@163.com Signed-off-by: Andreas Larsson arch/sparc/kernel/irq_32.c | 12 ++++++------ arch/sparc/kernel/irq_64.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) commit 8537a7011be9d9f9d205d8ec842f022a1598862d Author: Zijun Hu Date: Tue Jan 14 23:23:05 2025 +0800 of: Correct element count for two arrays in API of_parse_phandle_with_args_map() of_parse_phandle_with_args_map() defines array @dummy_mask and @dummy_pass these two arrays only need @MAX_PHANDLE_ARGS elements separately, but they actually have (@MAX_PHANDLE_ARGS + 1) elements, One extra element doesn't hurt anything except for some stack usage. Fix by using (@MAX_PHANDLE_ARGS - 1) as max element index in initializer. Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20250114-of_core_fix-v5-3-b8bafd00a86f@quicinc.com Signed-off-by: Rob Herring (Arm) drivers/of/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 81dfedd5234b42df11a473eefe7328ea4a0416ad Author: Zijun Hu Date: Tue Jan 14 23:23:04 2025 +0800 of: reserved-memory: Warn for missing static reserved memory regions For child node of /reserved-memory, its property 'reg' may contain multiple regions, but fdt_scan_reserved_mem_reg_nodes() only takes into account the first region, and miss remaining regions. But there are no simple approach to fix it, so give user warning message when miss remaining regions. Fixes: 8a6e02d0c00e ("of: reserved_mem: Restructure how the reserved memory regions are processed") Cc: stable@vger.kernel.org Signed-off-by: Zijun Hu Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250114-of_core_fix-v5-2-b8bafd00a86f@quicinc.com Signed-off-by: Rob Herring (Arm) drivers/of/of_reserved_mem.c | 5 +++++ 1 file changed, 5 insertions(+) commit 72d1c18262dd5a18d835a94391c31cf04252c748 Author: Zijun Hu Date: Tue Jan 14 23:23:03 2025 +0800 of: Do not expose of_alias_scan() and correct its comments of_alias_scan() has no external callers and returns void. Do not expose it and delete return value descriptions in its comments. Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20250114-of_core_fix-v5-1-b8bafd00a86f@quicinc.com Signed-off-by: Rob Herring (Arm) drivers/of/base.c | 3 +-- drivers/of/of_private.h | 2 ++ drivers/of/pdt.c | 2 ++ include/linux/of.h | 1 - 4 files changed, 5 insertions(+), 3 deletions(-) commit 01f3ce5328c405179b2c69ea047c423dad2bfa6d Author: Vishal Chourasia Date: Fri Jan 17 15:42:59 2025 +0100 tools: Sync if_xdp.h uapi tooling header Sync if_xdp.h uapi header to remove following warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/if_xdp.h' differs from latest version at 'include/uapi/linux/if_xdp.h' Fixes: 48eb03dd2630 ("xsk: Add TX timestamp and TX checksum offload support") Signed-off-by: Vishal Chourasia Signed-off-by: Song Yoong Siang Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20250115032248.125742-1-yoong.siang.song@intel.com tools/include/uapi/linux/if_xdp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 70cd0576aa39c55aabd227851cba0c601e811fb6 Author: Andy Shevchenko Date: Thu Jan 16 18:05:43 2025 +0200 usb: hcd: Bump local buffer size in rh_string() GCC is not happy about the buffer size: drivers/usb/core/hcd.c:441:48: error: ‘%s’ directive output may be truncated writing up to 64 bytes into a region of size between 35 and 99 [-Werror=format-truncation=] 441 | snprintf (buf, sizeof buf, "%s %s %s", init_utsname()->sysname, | ^~ 442 | init_utsname()->release, hcd->driver->description); | ~~~~~~~~~~~~~~~~~~~~~~~ Bump the size to get it enough for the possible strings. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250116160543.216913-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8a05692de060a889fe5b9eb00cc8f1fc8935899 Author: Andrii Nakryiko Date: Thu Jan 16 16:39:57 2025 -0800 libbpf: Work around kernel inconsistently stripping '.llvm.' suffix Some versions of kernel were stripping out '.llvm.' suffix from kerne symbols (produced by Clang LTO compilation) from function names reported in available_filter_functions, while kallsyms reported full original name. This confuses libbpf's multi-kprobe logic of finding all matching kernel functions for specified user glob pattern by joining available_filter_functions and kallsyms contents, because joining by full symbol name won't work for symbols containing '.llvm.' suffix. This was eventually fixed by [0] in the kernel, but we'd like to not regress multi-kprobe experience and add a work around for this bug on libbpf side, stripping kallsym's name if it matches user pattern and contains '.llvm.' suffix. [0] fb6a421fb615 ("kallsyms: Match symbols exactly with CONFIG_LTO_CLANG") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20250117003957.179331-1-andrii@kernel.org tools/lib/bpf/libbpf.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 1dd3393696efba1598aa7692939bba99d0cffae3 Merge: 602ffd4ce3a6 ba113ecad81a Author: Will Deacon Date: Fri Jan 17 13:52:37 2025 +0000 Merge branch 'for-next/perf' into for-next/core * for-next/perf: (29 commits) perf docs: arm_spe: Document new discard mode perf: arm_spe: Add format option for discard mode MAINTAINERS: Add perf list for drivers/perf/ drivers/perf: apple_m1: Map generic branch events drivers/perf: hisi: Set correct IRQ affinity for PMUs with no association perf: imx9_perf: Introduce AXI filter version to refactor the driver and better extension perf/arm-cmn: Permit more exhaustive groups perf/dwc_pcie: Qualify RAS DES VSEC Capability by Vendor, Revision drivers/perf: hisi: Delete redundant blank line of DDRC PMU drivers/perf: hisi: Fix incorrect variable name "hha_pmu" in DDRC PMU driver drivers/perf: hisi: Export associated CPUs of each PMU through sysfs drivers/perf: hisi: Provide a generic implementation of cpumask/identifier drivers/perf: hisi: Add a common function to retrieve topology from firmware drivers/perf: hisi: Extract topology information to a separate structure drivers/perf: hisi: Refactor the detection of associated CPUs drivers/perf: hisi: Migrate to one online CPU if no associated one online drivers/perf: hisi: Don't update the associated_cpus on CPU offline drivers/perf: hisi: Define a symbol namespace for HiSilicon Uncore PMUs perf/marvell: Odyssey LLC-TAD performance monitor support perf/marvell: Refactor to extract platform data ... commit 602ffd4ce3a61526d72dfbfb76ca06df19d429f1 Merge: 6e1173306ed5 9ab2601dc4c1 Author: Will Deacon Date: Fri Jan 17 13:52:33 2025 +0000 Merge branch 'for-next/mm' into for-next/core * for-next/mm: arm64: mm: Test for pmd_sect() in vmemmap_check_pmd() arm64/mm: Replace open encodings with PXD_TABLE_BIT arm64/mm: Rename pte_mkpresent() as pte_mkvalid() arm64: Kconfig: force ARM64_PAN=y when enabling TTBR0 sw PAN arm64/kvm: Avoid invalid physical addresses to signal owner updates arm64/kvm: Configure HYP TCR.PS/DS based on host stage1 arm64/mm: Override PARange for !LPA2 and use it consistently arm64/mm: Reduce PA space to 48 bits when LPA2 is not enabled commit 6e1173306ed57025e86aa461aac872ae65539cc4 Merge: e190227be427 965e9bbe025e Author: Will Deacon Date: Fri Jan 17 13:52:29 2025 +0000 Merge branch 'for-next/misc' into for-next/core * for-next/misc: arm64: Remove duplicate included header arm64/Kconfig: Drop EXECMEM dependency from ARCH_WANTS_EXECMEM_LATE arm64: asm: Fix typo in pgtable.h arm64/mm: Ensure adequate HUGE_MAX_HSTATE arm64/mm: Replace open encodings with PXD_TABLE_BIT arm64/mm: Drop INIT_MM_CONTEXT() commit e190227be427c3de93de738374e6aa1865bfdc1c Merge: 763d584c5bb2 fd10f08cb57b Author: Will Deacon Date: Fri Jan 17 13:52:23 2025 +0000 Merge branch 'for-next/docs' into for-next/core * for-next/docs: Documentation: arm64: Remove stale and redundant virtual memory diagrams docs: arm64: Document EL3 requirements for FEAT_PMUv3 docs: arm64: Document EL3 requirements for cpu debug architecture commit 763d584c5bb21c120f3e05ddc0fa4f64f6b12a9a Merge: f818fd30dced 8600640d21cf Author: Will Deacon Date: Fri Jan 17 13:52:15 2025 +0000 Merge branch 'for-next/cpufeature' into for-next/core * for-next/cpufeature: kselftest/arm64: Add 2024 dpISA extensions to hwcap test KVM: arm64: Allow control of dpISA extensions in ID_AA64ISAR3_EL1 arm64/hwcap: Describe 2024 dpISA extensions to userspace arm64/sysreg: Update ID_AA64SMFR0_EL1 to DDI0601 2024-12 arm64: Filter out SVE hwcaps when FEAT_SVE isn't implemented arm64/sme: Move storage of reg_smidr to __cpuinfo_store_cpu() arm64/sysreg: Update ID_AA64ISAR2_EL1 to DDI0601 2024-09 arm64/sysreg: Update ID_AA64ZFR0_EL1 to DDI0601 2024-09 arm64/sysreg: Update ID_AA64FPFR0_EL1 to DDI0601 2024-09 arm64/sysreg: Update ID_AA64ISAR3_EL1 to DDI0601 2024-09 arm64/sysreg: Update ID_AA64PFR2_EL1 to DDI0601 2024-09 arm64/sysreg: Get rid of CPACR_ELx SysregFields arm64/sysreg: Convert *_EL12 accessors to Mapping arm64/sysreg: Get rid of the TCR2_EL1x SysregFields arm64/sysreg: Allow a 'Mapping' descriptor for system registers arm64/cpufeature: Refactor conditional logic in init_cpu_ftr_reg() arm64: cpufeature: Add HAFT to cpucap_is_possible() commit f818fd30dced9565ce16dc6ad080bc32c9adcca6 Merge: fac04efc5c79 a1edec22457e Author: Will Deacon Date: Fri Jan 17 13:52:04 2025 +0000 Merge branch 'for-next/cca' into for-next/core * for-next/cca: arm64: rsi: Add automatic arm-cca-guest module loading commit bea6afc1bfad1d44f87ee73cfb631533b82aa3e2 Author: Geert Uytterhoeven Date: Thu Jan 16 10:56:35 2025 +0100 cgroup/rdma: Drop bogus PAGE_COUNTER select When adding the Device memory controller (DMEM), "select PAGE_COUNTER" was added to CGROUP_RDMA, presumably instead of CGROUP_DMEM. While commit e33b51499a0a6bca ("cgroup/dmem: Select PAGE_COUNTER") added the missing select to CGROUP_DMEM, the bogus select is still there. Remove it. Fixes: b168ed458ddecc17 ("kernel/cgroup: Add "dmem" memory accounting cgroup") Closes: https://lore.kernel.org/CAMuHMdUmPfahsnZwx2iB5yfh8rjjW25LNcnYujNBgcKotUXBNg@mail.gmail.com Signed-off-by: Geert Uytterhoeven Acked-by: Tejun Heo Link: https://patchwork.freedesktop.org/patch/msgid/b4d462f038a2f895f30ae759928397c8183f6f7e.1737020925.git.geert+renesas@glider.be Signed-off-by: Maxime Ripard init/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 6ecc4fd6c2f43862c5e3b280cf419f0131e45c97 Author: Linus Lüssing Date: Mon Jan 13 20:31:39 2025 +0100 batman-adv: netlink: reduce duplicate code by returning interfaces Reduce duplicate code by using netlink helpers which return the soft/hard interface directly. Instead of returning an interface index which we are typically not interested in. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bridge_loop_avoidance.c | 33 ++------ net/batman-adv/distributed-arp-table.c | 18 +--- net/batman-adv/gateway_client.c | 18 +--- net/batman-adv/multicast.c | 17 +--- net/batman-adv/netlink.c | 146 +++++++++++++++++++++++---------- net/batman-adv/netlink.h | 5 +- net/batman-adv/originator.c | 116 +++++++++----------------- net/batman-adv/translation-table.c | 30 ++----- 8 files changed, 174 insertions(+), 209 deletions(-) commit e492fac3657b60b8dd78a6e8ca26d1d14706c7b3 Merge: 2da76e9e12c3 bbe658d65802 Author: Vlastimil Babka Date: Mon Jan 13 10:22:44 2025 +0100 Merge branch 'slab/for-6.14/kfree_rcu_move' into slab/for-next Merge the slab feature branch for 6.14: - Move the kfree_rcu() implementation from RCU to SLAB subsystem (Uladzislau Rezki) commit 970b9757cb44c315b5c3da6b1b35a1ffb07cca5a Author: Elizabeth Figura Date: Thu Jan 16 13:07:17 2025 -0600 ntsync: Fix reference leaks in the remaining create ioctls. When ntsync_obj_get_fd() fails, we free the ntsync object but forget to drop the "file" member. This was fixed for semaphores in 0e7d523b5f7a23b1dc6ceceb04e31a60e9e3321d, but that commit did not fix the similar leak for events and mutexes, since they were part of patches not yet in the mainline kernel. Fix those cases. Fixes: 5bc2479a3585b "ntsync: Introduce NTSYNC_IOC_CREATE_MUTEX." Fixes: 4c7404b9c2b57 "ntsync: Introduce NTSYNC_IOC_CREATE_EVENT." Signed-off-by: Elizabeth Figura Link: https://lore.kernel.org/r/20250116190717.8923-1-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman drivers/misc/ntsync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5d6a361dc01d823cb7c10697f16695d45a82b909 Merge: ce69b4019001 d3eb58549842 Author: David S. Miller Date: Fri Jan 17 12:01:41 2025 +0000 Merge branch 'realtek-link-down' Daniel Golle says: ==================== net: phy: realtek: fix status when link is down The .read_status method for RealTek RTL822x PHYs (both C22 and C45) has multilpe issues which result in reporting bogus link partner advertised modes as well as speed and duplex while the link is down and no cable is plugged in. Example: ethtool after disconnecting a 1000M/Full capable link partner, now with no wire plugged: Settings for lan1: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full 2500baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full 2500baseT/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Link partner advertised link modes: 1000baseT/Full Link partner advertised pause frame use: No Link partner advertised auto-negotiation: No Link partner advertised FEC modes: Not reported Speed: 1000Mb/s Duplex: Full Auto-negotiation: on Port: Twisted Pair PHYAD: 7 Transceiver: external MDI-X: Unknown Supports Wake-on: d Wake-on: d Link detected: no Fix this by making sure all of the fields populated by rtl822x_c45_read_status() or rtl822x_read_status() get reset, also in case the link is down. ==================== Signed-off-by: David S. Miller commit d3eb58549842c60ed46f37da7f4da969e3d6ecd3 Author: Daniel Golle Date: Wed Jan 15 14:45:00 2025 +0000 net: phy: realtek: always clear NBase-T lpa Clear NBase-T link partner advertisement before calling rtlgen_read_status() to avoid phy_resolve_aneg_linkmode() wrongly setting speed and duplex. This fixes bogus 2.5G/5G/10G link partner advertisement and thus speed and duplex being set by phy_resolve_aneg_linkmode() due to stale NBase-T lpa. Fixes: 68d5cd09e891 ("net: phy: realtek: change order of calls in C22 read_status()") Signed-off-by: Daniel Golle Reviewed-by: Michal Swiatkowski Signed-off-by: David S. Miller drivers/net/phy/realtek.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ea8318cb33e593bbfc59d637eae45a69732c5387 Author: Daniel Golle Date: Wed Jan 15 14:43:43 2025 +0000 net: phy: realtek: clear master_slave_state if link is down rtlgen_decode_physr() which sets master_slave_state isn't called in case the link is down and other than rtlgen_read_status(), rtl822x_c45_read_status() doesn't implicitely clear master_slave_state. Avoid stale master_slave_state by always setting it to MASTER_SLAVE_STATE_UNKNOWN in rtl822x_c45_read_status() in case the link is down. Fixes: 081c9c0265c9 ("net: phy: realtek: read duplex and gbit master from PHYSR register") Signed-off-by: Daniel Golle Reviewed-by: Michal Swiatkowski Signed-off-by: David S. Miller drivers/net/phy/realtek.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 34d5a86ff7bbe225fba3ad91f9b4dc85fb408e18 Author: Daniel Golle Date: Wed Jan 15 14:43:35 2025 +0000 net: phy: realtek: clear 1000Base-T lpa if link is down Only read 1000Base-T link partner advertisement if autonegotiation has completed and otherwise 1000Base-T link partner advertisement bits. This fixes bogus 1000Base-T link partner advertisement after link goes down (eg. by disconnecting the wire). Fixes: 5cb409b3960e ("net: phy: realtek: clear 1000Base-T link partner advertisement") Signed-off-by: Daniel Golle Reviewed-by: Michal Swiatkowski Signed-off-by: David S. Miller drivers/net/phy/realtek.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit c65b229699dec5affffd4d4972825c3b3a818e92 Author: Joe Hattori Date: Thu Jan 16 15:53:38 2025 -0800 spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe() spmi_controller_probe() assigns a parent device and an OF node to an SPMI controller. However, the operations are not needed as they are already assigned in spmi_controller_alloc(). Thus, remove the duplicated assignments. An unnecessary OF node reference acquisition is also dropped by this patch. Signed-off-by: Joe Hattori Suggested-by: Stephen Boyd Link: https://lore.kernel.org/r/20250116044907.2947218-1-joe@pf.is.s.u-tokyo.ac.jp Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20250116235339.300485-3-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/spmi/hisi-spmi-controller.c | 3 --- 1 file changed, 3 deletions(-) commit bc32bbd0401170853b479645002df52f849f48fe Author: Saravana Kannan Date: Thu Jan 16 15:53:37 2025 -0800 spmi: Set fwnode for spmi devices This allows fw_devlink to do proper dependency tracking for SPMI devices. So, better deferred probe handling, async probing, async suspend/resume, etc. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20241115230509.1793191-1-saravanak@google.com Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20250116235339.300485-2-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/spmi/spmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fd7a3f27892f1ca4fca24591a7a82fd0437e080 Merge: afc67135bc04 452d18c78a46 Author: Arnd Bergmann Date: Fri Jan 17 12:56:59 2025 +0100 Merge tag 'at91-soc-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/arm Microchip AT91 SoC updates for v6.14 This update includes: - support for the SAMA7D65 SoC - support for automatic mode in the backup unit power switch, eliminating the need for software intervention when entering low power mode - a fix to release a device node reference in the failure path of the SoC driver initialization * tag 'at91-soc-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: at91: add new SoC sama7d65 ARM: at91: pm: change BU Power Switch to automatic mode soc: atmel: fix device_node release in atmel_soc_device_init() Link: https://lore.kernel.org/r/20250107081424.758980-3-claudiu.beznea@tuxon.dev Signed-off-by: Arnd Bergmann commit 651dee03696e1dfde6d9a7e8664bbdcd9a10ea7f Author: Claudiu Beznea Date: Thu Jan 16 20:22:49 2025 +0200 serial: sh-sci: Increment the runtime usage counter for the earlycon device In the sh-sci driver, serial ports are mapped to the sci_ports[] array, with earlycon mapped at index zero. The uart_add_one_port() function eventually calls __device_attach(), which, in turn, calls pm_request_idle(). The identified code path is as follows: uart_add_one_port() -> serial_ctrl_register_port() -> serial_core_register_port() -> serial_core_port_device_add() -> serial_base_port_add() -> device_add() -> bus_probe_device() -> device_initial_probe() -> __device_attach() -> // ... if (dev->p->dead) { // ... } else if (dev->driver) { // ... } else { // ... pm_request_idle(dev); // ... } The earlycon device clocks are enabled by the bootloader. However, the pm_request_idle() call in __device_attach() disables the SCI port clocks while earlycon is still active. The earlycon write function, serial_console_write(), calls sci_poll_put_char() via serial_console_putchar(). If the SCI port clocks are disabled, writing to earlycon may sometimes cause the SR.TDFE bit to remain unset indefinitely, causing the while loop in sci_poll_put_char() to never exit. On single-core SoCs, this can result in the system being blocked during boot when this issue occurs. To resolve this, increment the runtime PM usage counter for the earlycon SCI device before registering the UART port. Fixes: 0b0cced19ab1 ("serial: sh-sci: Add CONFIG_SERIAL_EARLYCON support") Cc: stable@vger.kernel.org Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20250116182249.3828577-6-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 5f1017069933489add0c08659673443c9905659e Author: Claudiu Beznea Date: Thu Jan 16 20:22:48 2025 +0200 serial: sh-sci: Clean sci_ports[0] after at earlycon exit The early_console_setup() function initializes sci_ports[0].port with an object of type struct uart_port obtained from the struct earlycon_device passed as an argument to early_console_setup(). Later, during serial port probing, the serial port used as earlycon (e.g., port A) might be remapped to a different position in the sci_ports[] array, and a different serial port (e.g., port B) might be assigned to slot 0. For example: sci_ports[0] = port B sci_ports[X] = port A In this scenario, the new port mapped at index zero (port B) retains the data associated with the earlycon configuration. Consequently, after the Linux boot process, any access to the serial port now mapped to sci_ports[0] (port B) will block the original earlycon port (port A). To address this, introduce an early_console_exit() function to clean up sci_ports[0] when earlycon is exited. To prevent the cleanup of sci_ports[0] while the serial device is still being used by earlycon, introduce the struct sci_port::probing flag and account for it in early_console_exit(). Fixes: 0b0cced19ab1 ("serial: sh-sci: Add CONFIG_SERIAL_EARLYCON support") Cc: stable@vger.kernel.org Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20250116182249.3828577-5-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) commit 9f7dea875cc7f9c1a56a5c688290634a59cd1420 Author: Claudiu Beznea Date: Thu Jan 16 20:22:47 2025 +0200 serial: sh-sci: Do not probe the serial port if its slot in sci_ports[] is in use In the sh-sci driver, sci_ports[0] is used by earlycon. If the earlycon is still active when sci_probe() is called and the new serial port is supposed to map to sci_ports[0], return -EBUSY to prevent breaking the earlycon. This situation should occurs in debug scenarios, and users should be aware of the potential conflict. Fixes: 0b0cced19ab1 ("serial: sh-sci: Add CONFIG_SERIAL_EARLYCON support") Cc: stable@vger.kernel.org Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20250116182249.3828577-4-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 239f11209e5f282e16f5241b99256e25dd0614b6 Author: Claudiu Beznea Date: Thu Jan 16 20:22:46 2025 +0200 serial: sh-sci: Move runtime PM enable to sci_probe_single() Relocate the runtime PM enable operation to sci_probe_single(). This change prepares the codebase for upcoming fixes. While at it, replace the existing logic with a direct call to devm_pm_runtime_enable() and remove sci_cleanup_single(). The devm_pm_runtime_enable() function automatically handles disabling runtime PM during driver removal. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20250116182249.3828577-3-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit eaeee4225dba30bef4d424bdf134a07b7f423e8b Author: Claudiu Beznea Date: Thu Jan 16 20:22:45 2025 +0200 serial: sh-sci: Drop __initdata macro for port_cfg The port_cfg object is used by serial_console_write(), which serves as the write function for the earlycon device. Marking port_cfg as __initdata causes it to be freed after kernel initialization, resulting in earlycon becoming unavailable thereafter. Remove the __initdata macro from port_cfg to resolve this issue. Fixes: 0b0cced19ab1 ("serial: sh-sci: Add CONFIG_SERIAL_EARLYCON support") Cc: stable@vger.kernel.org Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea Fixes: 0b0cced19ab15c9e ("serial: sh-sci: Add CONFIG_SERIAL_EARLYCON support") Link: https://lore.kernel.org/r/20250116182249.3828577-2-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39d0be87438a0cc29151898c7fba24b43f2f3df8 Author: Dr. David Alan Gilbert Date: Sun Jan 12 13:57:59 2025 +0000 serial: kgdb_nmi: Remove unused knock code kgdb_nmi_poll_knock() has been unused since it was added in 2013 in commit 0c57dfcc6c1d ("tty/serial: Add kgdb_nmi driver") Remove it, the static helpers, and module parameters it used. (The comment explaining why it might be used sounds sensible, but it's never been wired up, perhaps it's worth doing somewhere?) Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250112135759.105541-1-linux@treblig.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/kgdb_nmi.c | 101 ------------------------------------------ include/linux/kgdb.h | 2 - 2 files changed, 103 deletions(-) commit 086fd062bc3883ae1ce4166cff5355db315ad879 Author: Greg Kroah-Hartman Date: Fri Jan 17 09:17:12 2025 +0100 Revert "usb: gadget: u_serial: Disable ep before setting port to null to fix the crash caused by port being null" This reverts commit 13014969cbf07f18d62ceea40bd8ca8ec9d36cec. It is reported to cause crashes on Tegra systems, so revert it for now. Link: https://lore.kernel.org/r/1037c1ad-9230-4181-b9c3-167dbaa47644@nvidia.com Reported-by: Jon Hunter Cc: stable Cc: Lianqin Hu Link: https://lore.kernel.org/r/2025011711-yippee-fever-a737@gregkh Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/u_serial.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4d27afbf256028a1f54363367f30efc8854433c3 Author: Kyle Tso Date: Tue Jan 14 22:24:35 2025 +0800 usb: typec: tcpci: Prevent Sink disconnection before vPpsShutdown in SPR PPS The Source can drop its output voltage to the minimum of the requested PPS APDO voltage range when it is in Current Limit Mode. If this voltage falls within the range of vPpsShutdown, the Source initiates a Hard Reset and discharges Vbus. However, currently the Sink may disconnect before the voltage reaches vPpsShutdown, leading to unexpected behavior. Prevent premature disconnection by setting the Sink's disconnect threshold to the minimum vPpsShutdown value. Additionally, consider the voltage drop due to IR drop when calculating the appropriate threshold. This ensures a robust and reliable interaction between the Source and Sink during SPR PPS Current Limit Mode operation. Fixes: 4288debeaa4e ("usb: typec: tcpci: Fix up sink disconnect thresholds for PD") Cc: stable Signed-off-by: Kyle Tso Reviewed-by: Heikki Krogerus Reviewed-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20250114142435.2093857-1-kyletso@google.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpci.c | 13 +++++++++---- drivers/usb/typec/tcpm/tcpm.c | 8 +++++--- include/linux/usb/tcpm.h | 3 ++- 3 files changed, 16 insertions(+), 8 deletions(-) commit 983e375849fe4fd987cab94d940ba2af6f9e7a71 Author: Jon Hunter Date: Thu Jan 16 15:38:29 2025 +0000 usb: xhci: tegra: Fix OF boolean read warning After commit c141ecc3cecd ("of: Warn when of_property_read_bool() is used on non-boolean properties") was added, the following warning is observed for the Tegra XHCI driver ... OF: /bus@0/usb@3610000: Read of boolean property 'power-domains' with a value. Previously, of_property_read_bool() was used to determine if a property was present but has now been replaced by of_property_present(). The warning is meant to prevent new users but this user existed before the change was made. Fix this by updating the Tegra XHCI driver to use of_property_present() function to determine if the 'power-domains' property is present. Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20250116153829.477360-1-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb124822186be8ea433f568e92cc3bfbf6117a30 Author: Chunfeng Yun Date: Thu Jan 16 20:51:41 2025 +0800 usb: host: xhci-plat: add support compatible ID PNP0D15 Add support compatible ID PNP0D15 which declare that the xHCI controller doesn't support standard debug capability. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20250116125141.25856-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 1 + 1 file changed, 1 insertion(+) commit 06c47f203222c93dbec85950d976637aedd54514 Author: Pengyu Luo Date: Tue Jan 14 01:51:25 2025 +0800 usb: typec: ucsi: Add a macro definition for UCSI v1.0 Many platforms from Qualcomm(before X elite) still use UCSI v1.0, part of them hardcoded the version number to dsdt, add this for them. Signed-off-by: Pengyu Luo Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250113175131.590683-1-mitltlatltl@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi.h | 1 + 1 file changed, 1 insertion(+) commit 66e0ea341a2a78d14336117f19763bd9be26d45d Author: Kyle Tso Date: Wed Jan 15 12:45:48 2025 +0800 usb: dwc3: core: Defer the probe until USB power supply ready Currently, DWC3 driver attempts to acquire the USB power supply only once during the probe. If the USB power supply is not ready at that time, the driver simply ignores the failure and continues the probe, leading to permanent non-functioning of the gadget vbus_draw callback. Address this problem by delaying the dwc3 driver initialization until the USB power supply is registered. Fixes: 6f0764b5adea ("usb: dwc3: add a power supply for current control") Cc: stable Signed-off-by: Kyle Tso Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20250115044548.2701138-1-kyletso@google.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit 81702d41457a8aec49bfd0942f98697d529656f0 Author: Xiong Nandi Date: Wed Jan 1 00:15:38 2025 +0800 usbip: Correct format specifier for seqnum from %d to %u The seqnum field in USBIP protocol is an unsigned value. So we fix the format specifier from %d to %u to correctly display the value. Signed-off-by: Xiong Nandi Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20241231161539.20192-3-xndchn@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_rx.c | 2 +- drivers/usb/usbip/stub_tx.c | 2 +- drivers/usb/usbip/vhci_rx.c | 6 +++--- drivers/usb/usbip/vudc_tx.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 15b93f340fa6bcb0b47f574e1cd3b5ce02fec403 Author: Xiong Nandi Date: Wed Jan 1 00:15:37 2025 +0800 usbip: Fix seqnum sign extension issue in vhci_tx_urb The atomic_inc_return function returns an int, while priv->seqnum is an unsigned long. So we must cast the result to u32 to prevent potential sign extension and size mismatch issues. Signed-off-by: Xiong Nandi Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20241231161539.20192-2-xndchn@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci_hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d7965fb5cde90a6ef7bbbf0b3debb33a196cf9d Author: Bjorn Andersson Date: Mon Jan 13 21:11:34 2025 -0800 dt-bindings: usb: snps,dwc3: Split core description The Synopsys DWC3 core is found either as a standalone block or integrated with vendor glue logic. So far the latter has been described as two separate IP blocks in DeviceTree, but the two parts are not separate. In the case where the core is integrated together with vendor glue, resources such as clock and resets are often customized by the vendor, such that the standard properties doesn't make sense. Split the snps,dwc3 binding in a description of the core properties and the standard "glue" properties, in order to allow vendor bindings to inherit the core properties. Reviewed-by: Rob Herring (Arm) Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20250113-dwc3-refactor-v3-1-d1722075df7b@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/usb/snps,dwc3-common.yaml | 415 +++++++++++++++++++++ .../devicetree/bindings/usb/snps,dwc3.yaml | 391 +------------------ 2 files changed, 416 insertions(+), 390 deletions(-) commit 20a0c37e44063997391430c4ae09973e9cbc3911 Author: Yuanjie Yang Date: Tue Jan 14 16:35:14 2025 +0800 mmc: sdhci-msm: Correctly set the load for the regulator Qualcomm regulator supports two power supply modes: HPM and LPM. Currently, the sdhci-msm.c driver does not set the load to adjust the current for eMMC and SD. If the regulator dont't set correct load in LPM state, it will lead to the inability to properly initialize eMMC and SD. Set the correct regulator current for eMMC and SD to ensure that the device can work normally even when the regulator is in LPM. Signed-off-by: Yuanjie Yang Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250114083514.258379-1-quic_yuanjiey@quicinc.com Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 53 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) commit c2d7aa308ecfb55e798558683ee08b171929e764 Author: Sudeep Holla Date: Wed Jan 15 11:39:31 2025 +0000 pmdomain: arm: scmi_pm_domain: Send an explicit request to set the current state On a system with multiple active SCMI agents, one agent(other than OSPM/ Linux or bootloader) would request to turn on a shared power domain before the Linux boots/initialise the genpds. So when the Linux boots and gets the power state as already ON, it just registers the genpd with a default ON state. However, when the driver that needs this shared power domain is probed genpd sees that the power domain status is ON and never makes any SCMI call to power it up which is correct. But, since Linux didn't make an explicit request to turn on the shared power domain, the SCMI platform firmware will not know if the OSPM agent is actively using it. Suppose the other agent that requested the shared power domain to be powered ON requests to power it OFF as it no longer needs it, the SCMI platform firmware needs to turn it off if there are no active users of it which in the above scenaro is the case. As a result of SCMI platform firmware turning off the resource, OSPM/ Linux will crash the moment as it expects the shared power domain to be powered ON. Send an explicit request to set the current state when setting up the genpd power domains so that OSPM registers its vote in the power domain state with the SCMI platform firmware. The other option is to not read the state and set the genpds as default OFF, but it can't handle the scenario on certain platforms where SCMI platform keeps all the power domains turned ON by default for faster boot (or any other such variations) and expect the OSPM to turn off the unused domains if power saving is required. Link: https://lore.kernel.org/all/Z4aBkezSWOPCXcUh@bogus Reported-by: Ranjani Vaidyanathan Reported-by: Peng Fan Signed-off-by: Sudeep Holla Reviewed-by: Cristian Marussi Link: https://lore.kernel.org/r/20250115113931.1181309-1-sudeep.holla@arm.com Signed-off-by: Ulf Hansson drivers/pmdomain/arm/scmi_pm_domain.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 01009b06a6b52d8439c55b530633a971c13b6cb2 Author: Marc Zyngier Date: Sun Jan 12 13:08:59 2025 +0000 arm64/sysreg: Get rid of TRFCR_ELx SysregFields There is no such thing as TRFCR_ELx in the architecture. What we have is TRFCR_EL1, for which TRFCR_EL12 is an accessor. Rename TRFCR_ELx_* to TRFCR_EL1_*, and fix the bit of code using these names. Similarly, TRFCR_EL12 is redefined as a mapping to TRFCR_EL1. Reviewed-by: James Clark Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/87cygsqgkh.wl-maz@kernel.org Cc: Suzuki K Poulose Cc: Mark Brown Cc: Will Deacon Cc: Catalin Marinas arch/arm64/tools/sysreg | 8 ++------ drivers/hwtracing/coresight/coresight-etm4x-core.c | 16 ++++++++-------- drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 10 +++++----- drivers/hwtracing/coresight/coresight-trbe.c | 2 +- 4 files changed, 16 insertions(+), 20 deletions(-) commit fa5e4043e9b17ddd7339258eed26399c755e7659 Merge: 3643b334aa8f a7f1fa5564be Author: Marc Zyngier Date: Fri Jan 17 11:06:50 2025 +0000 Merge branch kvm-arm64/misc-6.14 into kvmarm-master/next * kvm-arm64/misc-6.14: : . : Misc KVM/arm64 changes for 6.14 : : - Don't expose AArch32 EL0 capability when NV is enabled : : - Update documentation to reflect the full gamut of kvm-arm.mode : behaviours : : - Use the hypervisor VA bit width when dumping stacktraces : : - Decouple the hypervisor stack size from PAGE_SIZE, at least : on the surface... : : - Make use of str_enabled_disabled() when advertising GICv4.1 support : : - Explicitly handle BRBE traps as UNDEFINED : . KVM: arm64: Explicitly handle BRBE traps as UNDEFINED KVM: arm64: vgic: Use str_enabled_disabled() in vgic_v3_probe() arm64: kvm: Introduce nvhe stack size constants KVM: arm64: Fix nVHE stacktrace VA bits mask Documentation: Update the behaviour of "kvm-arm.mode" KVM: arm64: nv: Advertise the lack of AArch32 EL0 support Signed-off-by: Marc Zyngier commit 3643b334aa8f02ddcedc093d7de623378192da06 Merge: 946904e728ea 36f998de853c Author: Marc Zyngier Date: Fri Jan 17 11:06:33 2025 +0000 Merge branch kvm-arm64/nv-resx-fixes-6.14 into kvmarm-master/next * kvm-arm64/nv-resx-fixes-6.14: : . : Fixes for NV sysreg accessors. From the cover letter: : : "Joey recently reported that some rather basic tests were failing on : NV, and managed to track it down to critical register fields (such as : HCR_EL2.E2H) not having their expect value. : : Further investigation has outlined a couple of critical issues: : : - Evaluating HCR_EL2.E2H must always be done with a sanitising : accessor, no ifs, no buts. Given that KVM assumes a fixed value for : this bit, we cannot leave it to the guest to mess with. : : - Resetting the sysreg file must result in the RESx bits taking : effect. Otherwise, we may end-up making the wrong decision (see : above), and we definitely expose invalid values to the guest. Note : that because we compute the RESx masks very late in the VM setup, we : need to apply these masks at that particular point as well. : [...]" : . KVM: arm64: nv: Apply RESx settings to sysreg reset values KVM: arm64: nv: Always evaluate HCR_EL2 using sanitising accessors Signed-off-by: Marc Zyngier # Conflicts: # arch/arm64/kvm/nested.c commit 946904e728eaf1d505d396516bed1eecac02939b Merge: 5e68d2eeac70 9fb4267a759c Author: Marc Zyngier Date: Fri Jan 17 11:05:44 2025 +0000 Merge branch kvm-arm64/coresight-6.14 into kvmarm-master/next * kvm-arm64/coresight-6.14: : . : Trace filtering update from James Clark. From the cover letter: : : "The guest filtering rules from the Perf session are now honored for both : nVHE and VHE modes. This is done by either writing to TRFCR_EL12 at the : start of the Perf session and doing nothing else further, or caching the : guest value and writing it at guest switch for nVHE. In pKVM, trace is : now be disabled for both protected and unprotected guests." : . KVM: arm64: Fix selftests after sysreg field name update coresight: Pass guest TRFCR value to KVM KVM: arm64: Support trace filtering for guests KVM: arm64: coresight: Give TRBE enabled state to KVM coresight: trbe: Remove redundant disable call arm64/sysreg/tools: Move TRFCR definitions to sysreg tools: arm64: Update sysreg.h header files Signed-off-by: Marc Zyngier commit 5e68d2eeac70978a06406c5b156815ceb00437f9 Merge: 080612b2942a 6f91d31d47c5 Author: Marc Zyngier Date: Fri Jan 17 11:05:18 2025 +0000 Merge branch kvm-arm64/pkvm-memshare-declutter into kvmarm-master/next * kvm-arm64/pkvm-memshare-declutter: : . : pKVM memory transition simplifications, courtesy of Quentin Perret. : : From the cover letter: : "Since its early days, pKVM has formalized memory 'transitions' (shares : and donations) using 'struct pkvm_mem_transition' and bunch of helpers : to manipulate it. The intention was for all transitions to use this : machinery to ensure we're checking things consistently. However, as : development progressed, it became clear that the rigidity of this model : made it really difficult to use in some use-cases which ended-up : side-stepping it entirely. That is the case for the : hyp_{un}pin_shared_mem() and host_{un}share_guest() paths upstream which : use lower level helpers directly, as well as for several other pKVM : features that should land upstream in the future (ex: when a guest : relinquishes a page during ballooning, when annotating a page that is : being DMA'd to, ...). On top of this, the pkvm_mem_transition machinery : requires a lot of boilerplate which makes the code hard to read, but : also adds layers of indirection that no compilers seems to see through, : hence leading to suboptimal generated code. : : Given all the above, this series removes the pkvm_mem_transition : machinery from mem_protect.c, and converts all its users to use : __*_{check,set}_page_state_range() low-level helpers directly." : . KVM: arm64: Drop pkvm_mem_transition for host/hyp donations KVM: arm64: Drop pkvm_mem_transition for host/hyp sharing KVM: arm64: Drop pkvm_mem_transition for FF-A KVM: arm64: Only apply PMCR_EL0.P to the guest range of counters KVM: arm64: nv: Reload PMU events upon MDCR_EL2.HPME change KVM: arm64: Use KVM_REQ_RELOAD_PMU to handle PMCR_EL0.E change KVM: arm64: Add unified helper for reprogramming counters by mask KVM: arm64: Always check the state from hyp_ack_unshare() KVM: arm64: Fix set_id_regs selftest for ASIDBITS becoming unwritable Signed-off-by: Marc Zyngier commit 080612b2942ab7947303029e1fa33117b5280ece Merge: e880b16efb78 544786361d4b Author: Marc Zyngier Date: Fri Jan 17 11:04:53 2025 +0000 Merge branch kvm-arm64/nv-timers into kvmarm-master/next * kvm-arm64/nv-timers: : . : Nested Virt support for the EL2 timers. From the initial cover letter: : : "Here's another batch of NV-related patches, this time bringing in most : of the timer support for EL2 as well as nested guests. : : The code is pretty convoluted for a bunch of reasons: : : - FEAT_NV2 breaks the timer semantics by redirecting HW controls to : memory, meaning that a guest could setup a timer and never see it : firing until the next exit : : - We go try hard to reflect the timer state in memory, but that's not : great. : : - With FEAT_ECV, we can finally correctly emulate the virtual timer, : but this emulation is pretty costly : : - As a way to make things suck less, we handle timer reads as early as : possible, and only defer writes to the normal trap handling : : - Finally, some implementations are badly broken, and require some : hand-holding, irrespective of NV support. So we try and reuse the NV : infrastructure to make them usable. This could be further optimised, : but I'm running out of patience for this sort of HW. : : [...]" : . KVM: arm64: nv: Fix doc header layout for timers KVM: arm64: nv: Document EL2 timer API KVM: arm64: Work around x1e's CNTVOFF_EL2 bogosity KVM: arm64: nv: Sanitise CNTHCTL_EL2 KVM: arm64: nv: Propagate CNTHCTL_EL2.EL1NV{P,V}CT bits KVM: arm64: nv: Add trap routing for CNTHCTL_EL2.EL1{NVPCT,NVVCT,TVT,TVCT} KVM: arm64: Handle counter access early in non-HYP context KVM: arm64: nv: Accelerate EL0 counter accesses from hypervisor context KVM: arm64: nv: Accelerate EL0 timer read accesses when FEAT_ECV in use KVM: arm64: nv: Use FEAT_ECV to trap access to EL0 timers KVM: arm64: nv: Publish emulated timer interrupt state in the in-memory state KVM: arm64: nv: Sync nested timer state with FEAT_NV2 KVM: arm64: nv: Add handling of EL2-specific timer registers Signed-off-by: Marc Zyngier commit bb5f86ea50ffb292f42eb1ebdb99991d5c5ac3ba Author: Baojun Xu Date: Mon Dec 16 20:20:08 2024 +0800 ALSA: hda/tas2781: Add tas2781 hda SPI driver This patch was used to add TAS2781 devices on SPI support in sound/pci/hda. It use ACPI node descript about parameters of TAS2781 on SPI, it like: Scope (_SB.PC00.SPI0) { Device (GSPK) { Name (_HID, "TXNW2781") // _HID: Hardware ID Method (_CRS, 0, NotSerialized) { Name (RBUF, ResourceTemplate () { SpiSerialBusV2 (...) SpiSerialBusV2 (...) } } } } And in platform/x86/serial-multi-instantiate.c, those spi devices will be added into system as a single SPI device, so TAS2781 SPI driver will probe twice for every single SPI device. And driver will also parser mono DSP firmware binary and RCA binary for itself. The code support Realtek as the primary codec. In patch version-10, add multi devices firmware binary support, to compatble with windows driver, they can share same firmware binary. Signed-off-by: Baojun Xu Link: https://patch.msgid.link/20241216122008.15425-1-baojun.xu@ti.com Signed-off-by: Takashi Iwai drivers/acpi/scan.c | 1 + drivers/platform/x86/serial-multi-instantiate.c | 12 + sound/pci/hda/Kconfig | 14 + sound/pci/hda/Makefile | 2 + sound/pci/hda/patch_realtek.c | 14 + sound/pci/hda/tas2781-spi.h | 158 ++ sound/pci/hda/tas2781_hda_spi.c | 1271 ++++++++++++++ sound/pci/hda/tas2781_spi_fwlib.c | 2006 +++++++++++++++++++++++ 8 files changed, 3478 insertions(+) commit 5cb4e5b056772e341b590755a976081776422053 Author: Kailang Yang Date: Mon Dec 30 14:44:01 2024 +0800 ALSA: hda/realtek - Fixed headphone distorted sound on Acer Aspire A115-31 laptop Sound played through headphones is distorted. Fixes: 34ab5bbc6e82 ("ALSA: hda/realtek - Add Headset Mic supported Acer NB platform") Closes: https://lore.kernel.org/linux-sound/e142749b-7714-4733-9452-918fbe328c8f@gmail.com/ Signed-off-by: Kailang Yang Link: https://lore.kernel.org/0a89b6c18ed94378a105fa61e9f290e4@realtek.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit e8c59791ebb60790c74b2c3ab520f04a8a57219a Author: Mingwei Zheng Date: Sun Dec 15 17:47:52 2024 -0500 pwm: stm32: Add check for clk_enable() Add check for the return value of clk_enable() to catch the potential error. Fixes: 19f1016ea960 ("pwm: stm32: Fix enable count for clk in .probe()") Signed-off-by: Mingwei Zheng Signed-off-by: Jiasheng Jiang Link: https://lore.kernel.org/r/20241215224752.220318-1-zmw12306@gmail.com Signed-off-by: Uwe Kleine-König drivers/pwm/pwm-stm32.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit cde1e61d81a4bdc66890de3eca0c489aa01e00a7 Merge: ba39e420c0e9 575a5adf48b0 Author: Greg Kroah-Hartman Date: Fri Jan 17 09:17:47 2025 +0100 Merge tag 'usb-serial-6.14-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Merge usb-serial updates from Johan: USB-serial updates for 6.14-rc1 Here are the USB-serial updates for 6.14-rc1, including: - fix a long-standing NULL-deref issue in quatech2 - add support for hardware flow control to ch341 Included is also a related clean up. All have been in linux-next with no reported issues. * tag 'usb-serial-6.14-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: quatech2: fix null-ptr-deref in qt2_process_read_urb() USB: serial: ch341: use fix-width types consistently USB: serial: ch341: add hardware flow control RTS/CTS commit 125f34e4c107b151029ccbeea92631481bf5a6a1 Merge: 5bc55a333a2f 1f3dc29d2445 8735e47e3a29 afc0cbc6e25b 5a0751fc9eab 10c62c38b073 54e7d90089b8 acf5d49aaf86 082f1bcae8d1 Author: Joerg Roedel Date: Fri Jan 17 09:02:35 2025 +0100 Merge branches 'arm/smmu/updates', 'arm/smmu/bindings', 'qualcomm/msm', 'rockchip', 'riscv', 'core', 'intel/vt-d' and 'amd/amd-vi' into next commit 54e7d90089b8100f120d7c2a5f3daee96eb6e203 Author: Krzysztof Kozlowski Date: Tue Jan 14 20:26:42 2025 +0100 iommu: Use str_enable_disable-like helpers Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski Acked-by: Heiko Stuebner Reviewed-by: Jason Gunthorpe Acked-by: Pranjal Shrivastava Link: https://lore.kernel.org/r/20250114192642.912331-1-krzysztof.kozlowski@linaro.org Signed-off-by: Joerg Roedel drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 3 ++- drivers/iommu/arm/arm-smmu/arm-smmu.c | 3 ++- drivers/iommu/mtk_iommu.c | 9 +++++---- drivers/iommu/mtk_iommu_v1.c | 3 ++- drivers/iommu/rockchip-iommu.c | 3 ++- 5 files changed, 13 insertions(+), 8 deletions(-) commit 082f1bcae8d1b5f76e92e369091176b8d61120ec Author: Jason Gunthorpe Date: Fri Jan 10 12:35:05 2025 -0400 iommu/amd: Fully decode all combinations of alloc_paging_flags Currently AMD does not support IOMMU_HWPT_ALLOC_PASID | IOMMU_HWPT_ALLOC_DIRTY_TRACKING It should be rejected. Instead it creates a V1 domain without dirty tracking support. Use a switch to fully decode the flags. Fixes: ce2cd175469f ("iommu/amd: Enhance amd_iommu_domain_alloc_user()") Reviewed-by: Vasant Hegde Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/7-v2-9776c53c2966+1c7-amd_paging_flags_jgg@nvidia.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 5a081f7f428cc68c2df8eb281bfbaedf65b749c1 Author: Jason Gunthorpe Date: Fri Jan 10 12:35:04 2025 -0400 iommu/amd: Move the nid to pdom_setup_pgtable() The only thing that uses the nid is the io_pgtable code, and it should be set before calling alloc_io_pgtable_ops() to ensure that the top levels are allocated on the correct nid. Since dev is never NULL now we can just do this trivially and remove the other uses of nid. SVA and identity code paths never use it since they don't use io_pgtable. Reviewed-by: Vasant Hegde Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/6-v2-9776c53c2966+1c7-amd_paging_flags_jgg@nvidia.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu.h | 2 +- drivers/iommu/amd/iommu.c | 22 +++++++++------------- drivers/iommu/amd/pasid.c | 2 +- 3 files changed, 11 insertions(+), 15 deletions(-) commit 13b4ec749163710e3d188d2fed7405308b1b1e73 Author: Jason Gunthorpe Date: Fri Jan 10 12:35:03 2025 -0400 iommu/amd: Change amd_iommu_pgtable to use enum protection_domain_mode Currently it uses enum io_pgtable_fmt which is from the io pagetable code and most of the enum values are invalid. protection_domain_mode is internal the driver and has the only two valid values. Fix some signatures and variables to use the right type as well. Reviewed-by: Vasant Hegde Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/5-v2-9776c53c2966+1c7-amd_paging_flags_jgg@nvidia.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu.h | 2 +- drivers/iommu/amd/init.c | 14 +++++++------- drivers/iommu/amd/iommu.c | 34 +++++++++++++++++----------------- 3 files changed, 25 insertions(+), 25 deletions(-) commit 55b237dd7f7ec2ee9c7986e0fc28c5867bf63282 Author: Jason Gunthorpe Date: Fri Jan 10 12:35:02 2025 -0400 iommu/amd: Remove type argument from do_iommu_domain_alloc() and related do_iommu_domain_alloc() is only called from amd_iommu_domain_alloc_paging_flags() so type is always IOMMU_DOMAIN_UNMANAGED. Remove type and all the dead conditionals checking it. IOMMU_DOMAIN_IDENTITY checks are similarly obsolete as the conversion to the global static identity domain removed those call paths. The caller of protection_domain_alloc() should set the type, fix the miss in the SVA code. Reviewed-by: Vasant Hegde Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/4-v2-9776c53c2966+1c7-amd_paging_flags_jgg@nvidia.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu.h | 2 +- drivers/iommu/amd/iommu.c | 35 ++++++++++------------------------- drivers/iommu/amd/pasid.c | 3 ++- 3 files changed, 13 insertions(+), 27 deletions(-) commit 02bcd1a8b991c6fc29271fa02250bea1b61fb742 Author: Jason Gunthorpe Date: Fri Jan 10 12:35:01 2025 -0400 iommu/amd: Remove dev == NULL checks This is no longer possible, amd_iommu_domain_alloc_paging_flags() is never called with dev = NULL from the core code. Similarly get_amd_iommu_from_dev() can never be NULL either. Reviewed-by: Vasant Hegde Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/3-v2-9776c53c2966+1c7-amd_paging_flags_jgg@nvidia.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) commit f9b80f941e0e68c3347c5d22a17a0f636a064e2c Author: Jason Gunthorpe Date: Fri Jan 10 12:35:00 2025 -0400 iommu/amd: Remove domain_alloc() IOMMU drivers should not be sensitive to the domain type, a paging domain should be created based only on the flags passed in, the same for all callers. AMD was using the domain_alloc() path to force VFIO into a v1 domain type, because v1 gives higher performance. However now that IOMMU_HWPT_ALLOC_PASID is present, and a NULL device is not possible, domain_alloc_paging_flags() will do the right thing for VFIO. When invoked from VFIO flags will be 0 and the amd_iommu_pgtable type of domain will be selected. This is v1 by default unless the kernel command line has overridden it to v2. If the admin is forcing v2 assume they know what they are doing so force it everywhere, including for VFIO. Reviewed-by: Vasant Hegde Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/2-v2-9776c53c2966+1c7-amd_paging_flags_jgg@nvidia.com Signed-off-by: Joerg Roedel drivers/iommu/amd/iommu.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 1a684b099fac9a37e6fe2f0e594adbb1eff5181a Author: Alejandro Jimenez Date: Fri Jan 10 12:34:59 2025 -0400 iommu/amd: Remove unused amd_iommu_domain_update() All the callers have been removed by the below commit, remove the implementation and prototypes. Fixes: 322d889ae7d3 ("iommu/amd: Remove amd_iommu_domain_update() from page table freeing") Reviewed-by: Vasant Hegde Signed-off-by: Alejandro Jimenez Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/1-v2-9776c53c2966+1c7-amd_paging_flags_jgg@nvidia.com Signed-off-by: Joerg Roedel drivers/iommu/amd/amd_iommu.h | 1 - drivers/iommu/amd/iommu.c | 9 --------- 2 files changed, 10 deletions(-) commit 10c62c38b073ecea775b7e23fa7c7a3995a84ff3 Author: Guo Ren Date: Thu Jan 2 21:46:16 2025 -0500 iommu/riscv: Fixup compile warning When __BITS_PER_LONG == 32, size_t is defined as unsigned int rather than unsigned long. Therefore, we should use size_t to avoid type-checking errors. Fixes: 488ffbf18171 ("iommu/riscv: Paging domain support") Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Tomasz Jeznach Reviewed-by: Charlie Jenkins Reviewed-by: Tomasz Jeznach Link: https://lore.kernel.org/r/20250103024616.3359159-1-guoren@kernel.org Signed-off-by: Joerg Roedel drivers/iommu/riscv/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84cf9e541cccb8cb698518a9897942e8c78f1d83 Author: Christian Marangi Date: Thu Jan 9 14:12:58 2025 +0100 cpufreq: airoha: Add EN7581 CPUFreq SMCCC driver Add simple CPU Freq driver for Airoha EN7581 SoC that control CPU frequency scaling with SMC APIs and register a generic "cpufreq-dt" device. All CPU share the same frequency and can't be controlled independently. CPU frequency is controlled by the attached PM domain. Add SoC compatible to cpufreq-dt-plat block list as a dedicated cpufreq driver is needed with OPP v2 nodes declared in DTS. Signed-off-by: Christian Marangi Signed-off-by: Viresh Kumar drivers/cpufreq/Kconfig.arm | 8 ++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/airoha-cpufreq.c | 152 +++++++++++++++++++++++++++++++++++ drivers/cpufreq/cpufreq-dt-platdev.c | 2 + 4 files changed, 163 insertions(+) commit 31f505dc70331243fbb54af868c14bb5f44a15bc Author: Steven Rostedt Date: Thu Jan 16 17:58:32 2025 -0500 ftrace: Implement :mod: cache filtering on kernel command line Module functions can be set to set_ftrace_filter before the module is loaded. # echo :mod:snd_hda_intel > set_ftrace_filter This will enable all the functions for the module snd_hda_intel. If that module is not loaded, it is "cached" in the trace array for when the module is loaded, its functions will be traced. But this is not implemented in the kernel command line. That's because the kernel command line filtering is added very early in boot up as it is needed to be done before boot time function tracing can start, which is also available very early in boot up. The code used by the "set_ftrace_filter" file can not be used that early as it depends on some other initialization to occur first. But some of the functions can. Implement the ":mod:" feature of "set_ftrace_filter" in the kernel command line parsing. Now function tracing on just a single module that is loaded at boot up can be done. Adding: ftrace=function ftrace_filter=:mod:sna_hda_intel To the kernel command line will only enable the sna_hda_intel module functions when the module is loaded, and it will start tracing. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250116175832.34e39779@gandalf.local.home Signed-off-by: Steven Rostedt (Google) kernel/trace/ftrace.c | 67 ++++++++++++++++++++++++++++++++++++++++++++------- kernel/trace/trace.c | 8 ++++++ kernel/trace/trace.h | 2 ++ 3 files changed, 68 insertions(+), 9 deletions(-) commit 8275637215bd3d447b31d37f9b8231a013adb042 Author: Masami Hiramatsu (Google) Date: Fri Jan 17 11:20:34 2025 +0900 tracing: Adopt __free() and guard() for trace_fprobe.c Adopt __free() and guard() for trace_fprobe.c to remove gotos. Link: https://lore.kernel.org/173708043449.319651.12242878905778792182.stgit@mhiramat.roam.corp.google.com Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/trace_fprobe.c | 124 +++++++++++++++++++++----------------------- 1 file changed, 58 insertions(+), 66 deletions(-) commit 5f4e6f7f8b77a3b1fb0005f6e1692475785ae05f Author: Al Viro Date: Tue Nov 12 16:20:45 2024 -0500 fs/overlayfs/namei.c: get rid of include ../internal.h Added for the sake of vfs_path_lookup(), which is in linux/namei.h these days. Signed-off-by: Al Viro fs/overlayfs/namei.c | 2 -- 1 file changed, 2 deletions(-) commit b53b63dbf3748eca32e8d19d56dba43ddfec78e6 Merge: 556a39940663 f932a8e4824b Author: Alexei Starovoitov Date: Thu Jan 16 17:51:10 2025 -0800 Merge branch 'support-eliding-map-lookup-nullness' Daniel Xu says: ==================== Support eliding map lookup nullness This patch allows progs to elide a null check on statically known map lookup keys. In other words, if the verifier can statically prove that the lookup will be in-bounds, allow the prog to drop the null check. This is useful for two reasons: 1. Large numbers of nullness checks (especially when they cannot fail) unnecessarily pushes prog towards BPF_COMPLEXITY_LIMIT_JMP_SEQ. 2. It forms a tighter contract between programmer and verifier. For (1), bpftrace is starting to make heavier use of percpu scratch maps. As a result, for user scripts with large number of unrolled loops, we are starting to hit jump complexity verification errors. These percpu lookups cannot fail anyways, as we only use static key values. Eliding nullness probably results in less work for verifier as well. For (2), percpu scratch maps are often used as a larger stack, as the currrent stack is limited to 512 bytes. In these situations, it is desirable for the programmer to express: "this lookup should never fail, and if it does, it means I messed up the code". By omitting the null check, the programmer can "ask" the verifier to double check the logic. === Changelog === Changes in v7: * Use more accurate frame number when marking precise * Add test for non-stack key * Test for marking stack slot precise Changes in v6: * Use is_spilled_scalar_reg() helper and remove unnecessary comment * Add back deleted selftest with different helper to dirty dst buffer * Check size of spill is exactly key_size and update selftests * Read slot_type from correct offset into the spi * Rewrite selftests in C where possible * Mark constant map keys as precise Changes in v5: * Dropped all acks * Use s64 instead of long for const_map_key * Ensure stack slot contains spilled reg before accessing spilled_ptr * Ensure spilled reg is a scalar before accessing tnum const value * Fix verifier selftest for 32-bit write to write at 8 byte alignment to ensure spill is tracked * Introduce more precise tracking of helper stack accesses * Do constant map key extraction as part of helper argument processing and then remove duplicated stack checks * Use ret_flag instead of regs[BPF_REG_0].type * Handle STACK_ZERO * Fix bug in bpf_load_hdr_opt() arg annotation Changes in v4: * Only allow for CAP_BPF * Add test for stack growing upwards * Improve comment about stack growing upwards Changes in v3: * Check if stack is (erroneously) growing upwards * Mention in commit message why existing tests needed change Changes in v2: * Added a check for when R2 is not a ptr to stack * Added a check for when stack is uninitialized (no stack slot yet) * Updated existing tests to account for null elision * Added test case for when R2 can be both const and non-const ==================== Link: https://patch.msgid.link/cover.1736886479.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit f932a8e4824b529e455b7e3eb3e5118beceb3e32 Author: Daniel Xu Date: Tue Jan 14 13:28:46 2025 -0700 bpf: selftests: verifier: Add nullness elision tests Test that nullness elision works for common use cases. For example, we want to check that both constant scalar spills and STACK_ZERO functions. As well as when there's both const and non-const values of R2 leading up to a lookup. And obviously some bound checks. Particularly tricky are spills both smaller or larger than key size. For smaller, we need to ensure verifier doesn't let through a potential read into unchecked bytes. For larger, endianness comes into play, as the native endian value tracked in the verifier may not be the bytes the kernel would have read out of the key pointer. So check that we disallow both. Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/f1dacaa777d4516a5476162e0ea549f7c3354d73.1736886479.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov .../selftests/bpf/progs/verifier_array_access.c | 188 +++++++++++++++++++++ 1 file changed, 188 insertions(+) commit d2102f2f5d75a84dbab6ff890359f0bd4a18ca22 Author: Daniel Xu Date: Tue Jan 14 13:28:45 2025 -0700 bpf: verifier: Support eliding map lookup nullness This commit allows progs to elide a null check on statically known map lookup keys. In other words, if the verifier can statically prove that the lookup will be in-bounds, allow the prog to drop the null check. This is useful for two reasons: 1. Large numbers of nullness checks (especially when they cannot fail) unnecessarily pushes prog towards BPF_COMPLEXITY_LIMIT_JMP_SEQ. 2. It forms a tighter contract between programmer and verifier. For (1), bpftrace is starting to make heavier use of percpu scratch maps. As a result, for user scripts with large number of unrolled loops, we are starting to hit jump complexity verification errors. These percpu lookups cannot fail anyways, as we only use static key values. Eliding nullness probably results in less work for verifier as well. For (2), percpu scratch maps are often used as a larger stack, as the currrent stack is limited to 512 bytes. In these situations, it is desirable for the programmer to express: "this lookup should never fail, and if it does, it means I messed up the code". By omitting the null check, the programmer can "ask" the verifier to double check the logic. Tests also have to be updated in sync with these changes, as the verifier is more efficient with this change. Notable, iters.c tests had to be changed to use a map type that still requires null checks, as it's exercising verifier tracking logic w.r.t iterators. Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/68f3ea96ff3809a87e502a11a4bd30177fc5823e.1736886479.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 92 +++++++++++++++++++++- tools/testing/selftests/bpf/progs/iters.c | 14 ++-- tools/testing/selftests/bpf/progs/map_kptr_fail.c | 2 +- .../selftests/bpf/progs/verifier_map_in_map.c | 2 +- tools/testing/selftests/bpf/verifier/map_kptr.c | 2 +- 5 files changed, 99 insertions(+), 13 deletions(-) commit 37cce22dbd51a3ef7f6c08c3fb5f1c5075a17fbb Author: Daniel Xu Date: Tue Jan 14 13:28:44 2025 -0700 bpf: verifier: Refactor helper access type tracking Previously, the verifier was treating all PTR_TO_STACK registers passed to a helper call as potentially written to by the helper. However, all calls to check_stack_range_initialized() already have precise access type information available. Rather than treat ACCESS_HELPER as a proxy for BPF_WRITE, pass enum bpf_access_type to check_stack_range_initialized() to more precisely track helper arguments. One benefit from this precision is that registers tracked as valid spills and passed as a read-only helper argument remain tracked after the call. Rather than being marked STACK_MISC afterwards. An additional benefit is the verifier logs are also more precise. For this particular error, users will enjoy a slightly clearer message. See included selftest updates for examples. Acked-by: Eduard Zingerman Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/ff885c0e5859e0cd12077c3148ff0754cad4f7ed.1736886479.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 45 ++++++++-------------- tools/testing/selftests/bpf/progs/dynptr_fail.c | 6 +-- .../selftests/bpf/progs/test_global_func10.c | 2 +- tools/testing/selftests/bpf/progs/uninit_stack.c | 5 ++- .../selftests/bpf/progs/verifier_basic_stack.c | 2 +- .../selftests/bpf/progs/verifier_const_or.c | 4 +- .../bpf/progs/verifier_helper_access_var_len.c | 12 +++--- .../testing/selftests/bpf/progs/verifier_int_ptr.c | 2 +- tools/testing/selftests/bpf/progs/verifier_mtu.c | 2 +- .../selftests/bpf/progs/verifier_raw_stack.c | 4 +- .../testing/selftests/bpf/progs/verifier_unpriv.c | 2 +- .../testing/selftests/bpf/progs/verifier_var_off.c | 8 ++-- tools/testing/selftests/bpf/verifier/calls.c | 2 +- 13 files changed, 42 insertions(+), 54 deletions(-) commit 8ac412a3361173e3000b16167af3d1f6f90af613 Author: Daniel Xu Date: Tue Jan 14 13:28:43 2025 -0700 bpf: tcp: Mark bpf_load_hdr_opt() arg2 as read-write MEM_WRITE attribute is defined as: "Non-presence of MEM_WRITE means that MEM is only being read". bpf_load_hdr_opt() both reads and writes from its arg2 - void *search_res. This matters a lot for the next commit where we more precisely track stack accesses. Without this annotation, the verifier will make false assumptions about the contents of memory written to by helpers and possibly prune valid branches. Fixes: 6fad274f06f0 ("bpf: Add MEM_WRITE attribute") Acked-by: Martin KaFai Lau Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/730e45f8c39be2a5f3d8c4406cceca9d574cbf14.1736886479.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov net/core/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8a81b5dd6450be730924ea5e78f5892927cccd1 Author: Daniel Xu Date: Tue Jan 14 13:28:42 2025 -0700 bpf: verifier: Add missing newline on verbose() call The print was missing a newline. Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/59cbe18367b159cd470dc6d5c652524c1dc2b984.1736886479.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d2eba0f83a59d360ed1e77ed2778101a6e3c4a1 Merge: 3030e3d57ba8 93359197f273 Author: Jakub Kicinski Date: Thu Jan 16 17:27:59 2025 -0800 Merge branch 'add-perout-library-for-rds-ptp-supported-phys' Divya Koppera says: ==================== Add PEROUT library for RDS PTP supported phys Adds support for PEROUT library, where phy can generate periodic output signal on supported pin out. ==================== Link: https://patch.msgid.link/20250115090634.12941-1-divya.koppera@microchip.com Signed-off-by: Jakub Kicinski commit 93359197f273e414136861e9077571bb8a5884b6 Author: Divya Koppera Date: Wed Jan 15 14:36:34 2025 +0530 net: phy: microchip_rds_ptp : Add PEROUT feature library for RDS PTP supported Microchip phys Adds PEROUT feature for RDS PTP supported phys where we can generate periodic output signal on supported pin out Signed-off-by: Divya Koppera Link: https://patch.msgid.link/20250115090634.12941-4-divya.koppera@microchip.com Signed-off-by: Jakub Kicinski drivers/net/phy/microchip_rds_ptp.c | 270 ++++++++++++++++++++++++++++++++++++ 1 file changed, 270 insertions(+) commit 8541fc12edcdef36a02885672f22ca8391bd2443 Author: Divya Koppera Date: Wed Jan 15 14:36:33 2025 +0530 net: phy: microchip_t1: Enable pin out specific to lan887x phy for PEROUT signal Adds support for enabling pin out that is required to generate periodic output signal on lan887x phy. Signed-off-by: Divya Koppera Link: https://patch.msgid.link/20250115090634.12941-3-divya.koppera@microchip.com Signed-off-by: Jakub Kicinski drivers/net/phy/microchip_t1.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit bf356a6df7992c7f4e51c51466a419a7148ab1a0 Author: Divya Koppera Date: Wed Jan 15 14:36:32 2025 +0530 net: phy: microchip_rds_ptp: Header file library changes for PEROUT This ptp header file library changes will cover PEROUT macros that are required to generate periodic output from pin out Signed-off-by: Divya Koppera Link: https://patch.msgid.link/20250115090634.12941-2-divya.koppera@microchip.com Signed-off-by: Jakub Kicinski drivers/net/phy/microchip_rds_ptp.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 3030e3d57ba8d0f59bd8162b3b1f3f7ee273f280 Author: Jakub Kicinski Date: Wed Jan 15 15:21:29 2025 -0800 selftests/net: packetdrill: make tcp buf limited timing tests benign The following tests are failing on debug kernels: tcp_tcp_info_tcp-info-rwnd-limited.pkt tcp_tcp_info_tcp-info-sndbuf-limited.pkt with reports like: assert 19000 <= tcpi_sndbuf_limited <= 21000, tcpi_sndbuf_limited; \ AssertionError: 18000 and: assert 348000 <= tcpi_busy_time <= 360000, tcpi_busy_time AssertionError: 362000 Extend commit 912d6f669725 ("selftests/net: packetdrill: report benign debug flakes as xfail") to cover them. Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20250115232129.845884-1-kuba@kernel.org Signed-off-by: Jakub Kicinski tools/testing/selftests/net/packetdrill/ksft_runner.sh | 1 + 1 file changed, 1 insertion(+) commit d338e12736f708984f902e81dc76af63d004449a Merge: 6da7a0f91b1d 4218647d4556 Author: Jakub Kicinski Date: Thu Jan 16 17:23:02 2025 -0800 Merge branch 'net-add-phylink-managed-eee-support' Russell King says: ==================== net: add phylink managed EEE support Adding managed EEE support to phylink has been on the cards ever since the idea in phylib was mooted. This overly large series attempts to do so. I've included all the patches as it's important to get the driver patches out there. Patch 1 adds a definition for the clock stop capable bit in the PCS MMD status register. Patch 2 adds a phylib API to query whether the PHY allows the transmit xMII clock to be stopped while in LPI mode. This capability is for MAC drivers to save power when LPI is active, to allow them to stop their transmit clock. Patch 3 extracts a phylink internal helper for determining whether the link is up. Patch 4 adds basic phylink managed EEE support. Two new MAC APIs are added, to enable and disable LPI. The enable method is passed the LPI timer setting which it is expected to program into the hardware, and also a flag ehther the transmit clock should be stopped. I have taken the decision to make enable_tx_lpi() to return an error code, but not do much with it other than report it - the intention being that we can later use it to extend functionality if needed without reworking loads of drivers. I have also dropped the validation/limitation of the LPI timer, and left that in the driver code prior to calling phylink_ethtool_set_eee(). The remainder of the patches convert mvneta, lan743x and stmmac, and add support for mvneta. ==================== Link: https://patch.msgid.link/Z4gdtOaGsBhQCZXn@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 4218647d4556f599b4e19c7491d299edbe5af72b Author: Russell King (Oracle) Date: Wed Jan 15 20:43:08 2025 +0000 net: stmmac: convert to phylink managed EEE support Convert stmmac to use phylink managed EEE support rather than delving into phylib: 1. Move the stmmac_eee_init() calls out of mac_link_down() and mac_link_up() methods into the new mac_{enable,disable}_lpi() methods. We leave the calls to stmmac_set_eee_pls() in place as these change bits which tell the EEE hardware when the link came up or down, and is used for a separate hardware timer. However, symmetrically conditionalise this with priv->dma_cap.eee. 2. Update the current LPI timer each time LPI is enabled - which we need for software-timed LPI. 3. With phylink managed EEE, phylink manages the receive clock stop configuration via phylink_config.eee_rx_clk_stop_enable. Set this appropriately which makes the call to phy_eee_rx_clock_stop() redundant. 4. From what I can work out, all supported interfaces support LPI signalling on stmmac (there's no restriction implemented.) It also appears to support LPI at all full duplex speeds at or over 100M. Set these capabilities. 5. The default timer appears to be derived from a module parameter. Set this the same, although we keep code that reconfigures the timer in stmmac_init_phy(). 6. Remove the direct call to phy_support_eee(), which phylink will do on the drivers behalf if phylink_config.eee_enabled_default is set. Signed-off-by: Russell King (Oracle) Reviewed-by: Jacob Keller Link: https://patch.msgid.link/E1tYAEG-0014QH-9O@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 57 ++++++++++++++++++----- 1 file changed, 45 insertions(+), 12 deletions(-) commit bd691d5ca9182f0462d9546d22314f67d70ddaa1 Author: Russell King (Oracle) Date: Wed Jan 15 20:43:03 2025 +0000 net: lan743x: convert to phylink managed EEE Convert lan743x to phylink managed EEE: - Set the lpi_capabilties. - Move the call to lan743x_mac_eee_enable() into the enable/disable tx_lpi functions. - Ensure that EEEEN is clear during probe. - Move the setting of the LPI timer into mac_enable_tx_lpi(). - Move reading of LPI timer to phylink initialisation to set the default timer value. Signed-off-by: Russell King (Oracle) Reviewed-by: Jacob Keller Link: https://patch.msgid.link/E1tYAEB-0014QB-4s@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/lan743x_ethtool.c | 21 ----------- drivers/net/ethernet/microchip/lan743x_main.c | 44 ++++++++++++++++++++---- drivers/net/ethernet/microchip/lan743x_main.h | 1 - 3 files changed, 38 insertions(+), 28 deletions(-) commit a66447966f03b04606a30e169c7cc2c6f8261bb7 Author: Russell King (Oracle) Date: Wed Jan 15 20:42:57 2025 +0000 net: lan743x: use netdev in lan743x_phylink_mac_link_down() Use the netdev that we already have in lan743x_phylink_mac_link_down(). Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Reviewed-by: Jacob Keller Link: https://patch.msgid.link/E1tYAE5-0014Q5-Up@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/lan743x_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b53b14786ed8aa8934504b047570cd5cd4e3a0e0 Author: Russell King (Oracle) Date: Wed Jan 15 20:42:52 2025 +0000 net: mvpp2: add EEE implementation Add EEE support for mvpp2, using phylink's EEE implementation, which means we just need to implement the two methods for LPI control, and with the initial configuration. Only SGMII mode is supported, so only 100M and 1G speeds. Disabling LPI requires clearing a single bit. Enabling LPI needs a full configuration of several values, as the timer values are dependent on the MAC operating speed. Signed-off-by: Russell King (Oracle) Reviewed-by: Maxime Chevallier Reviewed-by: Jacob Keller Link: https://patch.msgid.link/E1tYAE0-0014Pz-R9@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 5 ++ drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 86 +++++++++++++++++++++++++ 2 files changed, 91 insertions(+) commit ac79927dc84fac4fb2119ffb14391e721f6117c2 Author: Russell King (Oracle) Date: Wed Jan 15 20:42:47 2025 +0000 net: mvneta: convert to phylink EEE implementation Convert mvneta to use phylink's EEE implementation by implementing the two LPI control methods, and adding the initial configuration and capabilities. Although disabling LPI requires clearing a single bit, for safety we clear the manual mode and force bits to ensure that auto mode will be used. Enabling LPI needs a full configuration of several values, as the timer values are dependent on the MAC operating speed, as per the original code. As Armada 388 states that EEE is only supported in "SGMII" modes, mark this in lpi_interfaces. Testing with RGMII on the Clearfog platform indicates that the receive path fails to detect LPI over RGMII. Signed-off-by: Russell King (Oracle) Reviewed-by: Jacob Keller Link: https://patch.msgid.link/E1tYADv-0014Pt-NO@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/marvell/mvneta.c | 107 +++++++++++++++++++++------------- 1 file changed, 65 insertions(+), 42 deletions(-) commit 03abf2a7c65451e663b078b0ed1bfa648cd9380f Author: Russell King (Oracle) Date: Wed Jan 15 20:42:42 2025 +0000 net: phylink: add EEE management Add EEE management to phylink, making use of the phylib implementation. This will only be used where a MAC driver populates the methods and capabilities bitfield, otherwise we keep our old behaviour. Phylink will keep track of the EEE configuration, including the clock stop abilities at each end of the MAC to PHY link, programming the PHY appropriately and preserving the LPI configuration should the PHY go away. Phylink will call into the MAC driver when LPI needs to be enabled or disabled, with the requirement that the MAC have LPI disabled prior to the netdev being brought up (in other words, it will only call mac_disable_tx_lpi() if it has already called mac_enable_tx_lpi().) Support for phylink managed EEE is enabled by populating both tx_lpi MAC operations method pointers, and filling in both LPI interfaces and capabilities. If the methods are provided but the LPI interfaces or capabilities remain empty, this indicates to phylink that EEE is implemented by the driver but the hardware it is driving does not support EEE, and thus the ethtool set_eee() and get_eee() methods will return EOPNOTSUPP. No validation of the LPI timer value is performed by this patch. For interface modes which do not support LPI, we make no attempt to manipulate the phylib EEE advertisement, but instead refuse to activate LPI at the MAC, noting it at debug message level. We also restrict the advertisement and reported userspace support linkmode masks according to the lpi_capabilities provided to phylink by the MAC driver. Signed-off-by: Russell King (Oracle) Reviewed-by: Jacob Keller Link: https://patch.msgid.link/E1tYADq-0014Pn-J1@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/phy/phylink.c | 138 ++++++++++++++++++++++++++++++++++++++++++++-- include/linux/phylink.h | 45 +++++++++++++++ 2 files changed, 178 insertions(+), 5 deletions(-) commit a17ceec62f81cebadcaa6f15ca656ff5cbe77a52 Author: Russell King (Oracle) Date: Wed Jan 15 20:42:37 2025 +0000 net: phylink: add phylink_link_is_up() helper Add a helper to determine whether the link is up or down. Currently this is only used in one location, but becomes necessary to test when reconfiguring EEE. Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Reviewed-by: Jacob Keller Link: https://patch.msgid.link/E1tYADl-0014Ph-EV@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/phy/phylink.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit a00e0d34c0362a69369f212b8be1be1f6f4c365d Author: Russell King (Oracle) Date: Wed Jan 15 20:42:32 2025 +0000 net: phy: add support for querying PHY clock stop capability Add support for querying whether the PHY allows the transmit xMII clock to be stopped while in LPI mode. This will be used by phylink to pass to the MAC driver so it can configure the generation of the xMII clock appropriately. Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Reviewed-by: Jacob Keller Link: https://patch.msgid.link/E1tYADg-0014Pb-AJ@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/phy/phy.c | 20 ++++++++++++++++++++ include/linux/phy.h | 1 + 2 files changed, 21 insertions(+) commit 3ba0262a8fed29efe28e3ce3162d1794a58aa94f Author: Russell King (Oracle) Date: Wed Jan 15 20:42:27 2025 +0000 net: mdio: add definition for clock stop capable bit Add a definition for the clock stop capable bit in the PCS MMD. This bit indicates whether the MAC is able to stop the transmit xMII clock while it is signalling LPI. Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Reviewed-by: Jacob Keller Link: https://patch.msgid.link/E1tYADb-0014PV-6T@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski include/uapi/linux/mdio.h | 1 + 1 file changed, 1 insertion(+) commit 6da7a0f91b1dd3e985f9259e3cc9f0e8fd3df989 Merge: 8d20dcda404d be94cfdb993f Author: Jakub Kicinski Date: Thu Jan 16 17:20:52 2025 -0800 Merge branch 'dev-covnert-dev_change_name-to-per-netns-rtnl' Kuniyuki Iwashima says: ==================== dev: Covnert dev_change_name() to per-netns RTNL. Patch 1 adds a missing netdev_rename_lock in dev_change_name() and Patch 2 removes unnecessary devnet_rename_sem there. Patch 3 replaces RTNL with rtnl_net_lock() in dev_ifsioc(), and now dev_change_name() is always called under per-netns RTNL. Given it's close to -rc8 and Patch 1 touches the trivial unlikely path, can Patch 1 go into net-next ? Otherwise I'll post Patch 2 & 3 separately in the next cycle. ==================== Link: https://patch.msgid.link/20250115095545.52709-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit be94cfdb993ff091ce3b98a16b45795198957f95 Author: Kuniyuki Iwashima Date: Wed Jan 15 18:55:45 2025 +0900 dev: Hold rtnl_net_lock() for dev_ifsioc(). Basically, dev_ifsioc() operates on the passed single netns (except for netdev notifier chains with lower/upper devices for which we will need more changes). Let's hold rtnl_net_lock() for dev_ifsioc(). Now that NETDEV_CHANGENAME is always triggered under rtnl_net_lock() of the device's netns. (do_setlink() and dev_ifsioc()) Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250115095545.52709-4-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/core/dev.c | 7 ++----- net/core/dev_ioctl.c | 26 +++++++++++++++++--------- net/core/rtnl_net_debug.c | 15 +++------------ 3 files changed, 22 insertions(+), 26 deletions(-) commit 2f1bb1e2cc0068b6f5fe992ed3108d89b9b29cf9 Author: Kuniyuki Iwashima Date: Wed Jan 15 18:55:44 2025 +0900 dev: Remove devnet_rename_sem. devnet_rename_sem is no longer used since commit 0840556e5a3a ("net: Protect dev->name by seqlock."). Also, RTNL serialises dev_change_name(). Let's remove devnet_rename_sem. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250115095545.52709-3-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/core/dev.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit e361560a7912958ba3059f51e7dd21612d119169 Author: Kuniyuki Iwashima Date: Wed Jan 15 18:55:43 2025 +0900 dev: Acquire netdev_rename_lock before restoring dev->name in dev_change_name(). The cited commit forgot to add netdev_rename_lock in one of the error paths in dev_change_name(). Let's hold netdev_rename_lock before restoring the old dev->name. Fixes: 0840556e5a3a ("net: Protect dev->name by seqlock.") Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20250115095545.52709-2-kuniyu@amazon.com Signed-off-by: Jakub Kicinski net/core/dev.c | 2 ++ 1 file changed, 2 insertions(+) commit 8d20dcda404d48784f2359976811bfc189992aa0 Author: John Daley Date: Wed Jan 15 10:13:12 2025 -0800 selftests: drv-net-hw: inject pp_alloc_fail errors in the right place The tool pp_alloc_fail.py tested error recovery by injecting errors into the function page_pool_alloc_pages(). The page pool allocation function page_pool_dev_alloc() does not end up calling page_pool_alloc_pages(). page_pool_alloc_netmems() seems to be the function that is called by all of the page pool alloc functions in the API, so move error injection to that function instead. Signed-off-by: John Daley Link: https://patch.msgid.link/20250115181312.3544-2-johndale@cisco.com Signed-off-by: Jakub Kicinski net/core/page_pool.c | 2 +- tools/testing/selftests/drivers/net/hw/pp_alloc_fail.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 65a55aa7e64eefcd2a7f530a0bf8d21d20bffd37 Author: Guillaume Nault Date: Wed Jan 15 13:44:52 2025 +0100 ipv4: Prepare inet_rtm_getroute() to .flowi4_tos conversion. Store rtm->rtm_tos in a dscp_t variable, which can then be used for setting fl4.flowi4_tos and also be passed as parameter of ip_route_input_rcu(). The .flowi4_tos field is going to be converted to dscp_t to ensure ECN bits aren't erroneously taken into account during route lookups. Having a dscp_t variable available will simplify that conversion, as we'll just have to drop the inet_dscp_to_dsfield() call. Note that we can't just convert rtm->rtm_tos to dscp_t because this structure is exported to user space. Signed-off-by: Guillaume Nault Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/7bc1c7dc47ad1393569095d334521fae59af5bc7.1736944951.git.gnault@redhat.com Signed-off-by: Jakub Kicinski net/ipv4/route.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 2c77bcb344f589054b2039bddcd32c4f666258b9 Author: Guillaume Nault Date: Wed Jan 15 12:53:55 2025 +0100 gre: Prepare ipgre_open() to .flowi4_tos conversion. Use ip4h_dscp() to get the tunnel DSCP option as dscp_t, instead of manually masking the raw tos field with INET_DSCP_MASK. This will ease the conversion of fl4->flowi4_tos to dscp_t, which just becomes a matter of dropping the inet_dscp_to_dsfield() call. Signed-off-by: Guillaume Nault Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/6c05a11afdc61530f1a4505147e0909ad51feb15.1736941806.git.gnault@redhat.com Signed-off-by: Jakub Kicinski net/ipv4/ip_gre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 951a6bf30667307e7901aac5e74e50dadd5ccfc7 Merge: 24c61d553302 f1359f46f1f1 Author: Dave Airlie Date: Fri Jan 17 10:43:01 2025 +1000 Merge tag 'drm-misc-next-fixes-2025-01-16' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next Several fixes for the new dmem cgroup controller and the HDMI framework audio support Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20250116-bold-furry-perch-b1ca0e@houat commit 3d72d603afa72082501e9076eed61e0531339ef8 Author: Yixun Lan Date: Fri Jan 17 07:58:46 2025 +0800 riscv: dts: spacemit: move aliases to board dts aliases info should belong to board dts, instead of putting it at SoC dtsi file. Fixes: d8fe64691955 ("riscv: dts: add initial SpacemiT K1 SoC device tree") Link: https://lore.kernel.org/all/6a8bb914-858e-479d-a7d9-09e0ff688160@app.fastmail.com Signed-off-by: Yixun Lan arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 4 ++++ arch/riscv/boot/dts/spacemit/k1.dtsi | 12 ------------ 2 files changed, 4 insertions(+), 12 deletions(-) commit 3579b3506fac20abe5ed690d8a9863fc562678a4 Author: Yixun Lan Date: Wed Oct 16 08:59:43 2024 +0800 riscv: dts: spacemit: add pinctrl property to uart0 in BPI-F3 Before pinctrl driver implemented, the uart0 controller reply on bootloader for setting correct pin mux and configurations. Now, let's add pinctrl property to uart0 of Bananapi-F3 board. Signed-off-by: Yixun Lan arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 3 +++ arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi | 20 ++++++++++++++++++++ arch/riscv/boot/dts/spacemit/k1.dtsi | 5 +++++ 3 files changed, 28 insertions(+) commit 21bef40ad121b5b5bfab39803f175e3b3ba465fd Author: Yangyu Chen Date: Tue Jul 30 00:28:13 2024 +0000 riscv: defconfig: enable SpacemiT SoC Enable SpacemiT SoC config in defconfig to allow the default upstream kernel booting on Banana Pi BPI-F3 board. Signed-off-by: Yangyu Chen Acked-by: Palmer Dabbelt Reviewed-by: Conor Dooley Tested-by: Jesse Taube Signed-off-by: Yixun Lan arch/riscv/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit d60d57ab6b2a803b17b6f2aa78abd9487a9ece36 Author: Yangyu Chen Date: Tue Jul 30 00:28:12 2024 +0000 riscv: dts: spacemit: add Banana Pi BPI-F3 board device tree Banana Pi BPI-F3 [1] is a industrial grade RISC-V development board, it design with SpacemiT K1 8 core RISC-V chip [2]. Currently only support booting into console with only uart enabled, other features will be added soon later. Link: https://docs.banana-pi.org/en/BPI-F3/BananaPi_BPI-F3 [1] Link: https://www.spacemit.com/en/spacemit-key-stone-2/ [2] Signed-off-by: Yangyu Chen Acked-by: Jesse Taube Acked-by: Palmer Dabbelt Signed-off-by: Yixun Lan arch/riscv/boot/dts/Makefile | 1 + arch/riscv/boot/dts/spacemit/Makefile | 2 ++ arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+) commit d8fe64691955a792c34e19f16b09e63376554969 Author: Yangyu Chen Date: Tue Jul 30 00:28:11 2024 +0000 riscv: dts: add initial SpacemiT K1 SoC device tree Banana Pi BPI-F3 motherboard is powered by SpacemiT K1[1]. Key features: - 4 cores per cluster, 2 clusters on chip - UART IP is Intel XScale UART Some key considerations: - ISA string is inferred from vendor documentation[2] - Cluster topology is inferred from datasheet[1] and L2 in vendor dts[3] - No coherent DMA on this board Inferred by taking vendor ethernet and MMC drivers to the mainline kernel. Without dma-noncoherent in soc node, the driver fails. - Add cache nodes K1 SoC has 128 sets of 32KiB L1 I/D Cache for each hart, and 512 sets of 512KiB L2 Cache for each cluster. Currently only support booting into console with only uart, other features will be added soon later. Link: https://docs.banana-pi.org/en/BPI-F3/SpacemiT_K1_datasheet [1] Link: https://developer.spacemit.com/#/documentation?token=BWbGwbx7liGW21kq9lucSA6Vnpb [2] Link: https://gitee.com/bianbu-linux/linux-6.1/blob/bl-v1.0.y/arch/riscv/boot/dts/spacemit/k1-x.dtsi [3] Signed-off-by: Yangyu Chen Acked-by: Jesse Taube Acked-by: Palmer Dabbelt Signed-off-by: Yixun Lan arch/riscv/boot/dts/spacemit/k1.dtsi | 459 +++++++++++++++++++++++++++++++++++ 1 file changed, 459 insertions(+) commit 8814aa123adb373f66025cda80da94b59e849313 Author: Yangyu Chen Date: Tue Jul 30 00:28:10 2024 +0000 riscv: add SpacemiT SoC family Kconfig support The first SoC in the SpacemiT series is K1, which contains 8 RISC-V cores with RISC-V Vector v1.0 support. Link: https://www.spacemit.com/en/spacemit-key-stone-2/ Signed-off-by: Yangyu Chen Acked-by: Palmer Dabbelt Reviewed-by: Conor Dooley Signed-off-by: Yixun Lan arch/riscv/Kconfig.socs | 5 +++++ 1 file changed, 5 insertions(+) commit dfe6d083edff9f577f2e3db02fe5a838118fc0ac Author: Yixun Lan Date: Tue Jul 30 00:28:09 2024 +0000 dt-bindings: serial: 8250: Add SpacemiT K1 uart compatible Found SpacemiT's K1 uart controller is compatible with Intel's Xscale uart, but it's still worth to introduce a new compatible. Acked-by: Conor Dooley Acked-by: Palmer Dabbelt Signed-off-by: Yixun Lan Documentation/devicetree/bindings/serial/8250.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 562272a287d5633dfdffaae43dcd25244635cc74 Author: Yangyu Chen Date: Tue Jul 30 00:28:08 2024 +0000 dt-bindings: interrupt-controller: Add SpacemiT K1 PLIC Add compatible string for SpacemiT K1 PLIC. Signed-off-by: Yangyu Chen Acked-by: Conor Dooley Acked-by: Palmer Dabbelt Signed-off-by: Yixun Lan .../devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml | 1 + 1 file changed, 1 insertion(+) commit e5164af2a2fe67cca0186932b2aff93f4c3ed99d Author: Yangyu Chen Date: Tue Jul 30 00:28:07 2024 +0000 dt-bindings: timer: Add SpacemiT K1 CLINT Add compatible string for SpacemiT K1 CLINT. Signed-off-by: Yangyu Chen Acked-by: Conor Dooley Acked-by: Palmer Dabbelt Signed-off-by: Yixun Lan Documentation/devicetree/bindings/timer/sifive,clint.yaml | 1 + 1 file changed, 1 insertion(+) commit 244fe889b950fe97945abafc70bbf3254babf929 Author: Yangyu Chen Date: Tue Jul 30 00:28:06 2024 +0000 dt-bindings: riscv: add SpacemiT K1 bindings Add DT binding documentation for the SpacemiT K1 SoC[1] and the Banana Pi BPi-F3 board[2] which used it. Link: https://www.spacemit.com/en/spacemit-key-stone-2/ [1] Link: https://docs.banana-pi.org/en/BPI-F3/BananaPi_BPI-F3 [2] Signed-off-by: Yangyu Chen Acked-by: Rob Herring (Arm) Acked-by: Palmer Dabbelt Reviewed-by: Matthias Brugger Signed-off-by: Yixun Lan .../devicetree/bindings/riscv/spacemit.yaml | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 16c9147e6a6c6342f4b1f9909b8f914f6e4adcab Author: Yangyu Chen Date: Tue Jul 30 00:28:05 2024 +0000 dt-bindings: riscv: Add SpacemiT X60 compatibles The X60 is RISC-V CPU cores from SpacemiT and currently used in their K1 SoC. Link: https://www.spacemit.com/en/spacemit-x60-core/ Signed-off-by: Yangyu Chen Acked-by: Conor Dooley Acked-by: Palmer Dabbelt Signed-off-by: Yixun Lan Documentation/devicetree/bindings/riscv/cpus.yaml | 1 + 1 file changed, 1 insertion(+) commit 6055c764fcd5466696e08ac69485602c6a01d9d9 Author: Yixun Lan Date: Mon Oct 28 07:04:00 2024 +0800 MAINTAINERS: setup support for SpacemiT SoC tree Add myself as maintainer of SpacemiT's SoC tree, which suggested by Conor [1]. Link: https://lore.kernel.org/all/20241018234615-GYA2124001@gentoo/ [1] Signed-off-by: Yixun Lan MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 556a399406635566413f9c71b134d5d287b25b29 Author: Pu Lehui Date: Wed Jan 15 10:02:41 2025 +0000 selftests/bpf: Add distilled BTF test about marking BTF_IS_EMBEDDED When redirecting the split BTF to the vmlinux base BTF, we need to mark the distilled base struct/union members of split BTF structs/unions in id_map with BTF_IS_EMBEDDED. This indicates that these types must match both name and size later. So if a needed composite type, which is the member of composite type in the split BTF, has a different size in the base BTF we wish to relocate with, btf__relocate() should error out. Signed-off-by: Pu Lehui Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250115100241.4171581-4-pulehui@huaweicloud.com .../testing/selftests/bpf/prog_tests/btf_distill.c | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 5ca681a86ef93369685cb63f71994f4cf7303e7c Author: Pu Lehui Date: Wed Jan 15 10:02:40 2025 +0000 libbpf: Fix incorrect traversal end type ID when marking BTF_IS_EMBEDDED When redirecting the split BTF to the vmlinux base BTF, we need to mark the distilled base struct/union members of split BTF structs/unions in id_map with BTF_IS_EMBEDDED. This indicates that these types must match both name and size later. Therefore, we need to traverse the entire split BTF, which involves traversing type IDs from nr_dist_base_types to nr_types. However, the current implementation uses an incorrect traversal end type ID, so let's correct it. Fixes: 19e00c897d50 ("libbpf: Split BTF relocation") Signed-off-by: Pu Lehui Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250115100241.4171581-3-pulehui@huaweicloud.com tools/lib/bpf/btf_relocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5436a54332c19df0acbef2b87cbf9f7cba56f2dd Author: Pu Lehui Date: Wed Jan 15 10:02:39 2025 +0000 libbpf: Fix return zero when elf_begin failed The error number of elf_begin is omitted when encapsulating the btf_find_elf_sections function. Fixes: c86f180ffc99 ("libbpf: Make btf_parse_elf process .BTF.base transparently") Signed-off-by: Pu Lehui Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250115100241.4171581-2-pulehui@huaweicloud.com tools/lib/bpf/btf.c | 1 + 1 file changed, 1 insertion(+) commit 4a04cb326a6c7f9a2c066f8c2ca78a5a9b87ddab Author: Pu Lehui Date: Wed Jan 15 10:02:38 2025 +0000 selftests/bpf: Fix btf leak on new btf alloc failure in btf_distill test Fix btf leak on new btf alloc failure in btf_distill test. Fixes: affdeb50616b ("selftests/bpf: Extend distilled BTF tests to cover BTF relocation") Signed-off-by: Pu Lehui Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250115100241.4171581-1-pulehui@huaweicloud.com tools/testing/selftests/bpf/prog_tests/btf_distill.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7c311b7cb3c7d84c5c342e803c5cb1b2fabbc438 Author: Eduard Zingerman Date: Wed Jan 15 14:38:35 2025 -0800 veristat: Load struct_ops programs only once libbpf automatically adjusts autoload for struct_ops programs, see libbpf.c:bpf_object_adjust_struct_ops_autoload. For example, if there is a map: SEC(".struct_ops.link") struct sched_ext_ops ops = { .enqueue = foo, .tick = bar, }; Both 'foo' and 'bar' would be loaded if 'ops' autocreate is true, both 'foo' and 'bar' would be skipped if 'ops' autocreate is false. This means that when veristat processes object file with 'ops', it would load 4 programs in total: two programs per each 'process_prog' call. The adjustment occurs at object load time, and libbpf remembers association between 'ops' and 'foo'/'bar' at object open time. The only way to persuade libbpf to load one of two is to adjust map initial value, such that only one program is referenced. This patch does exactly that, significantly reducing time to process object files with big number of struct_ops programs. Signed-off-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250115223835.919989-1-eddyz87@gmail.com tools/testing/selftests/bpf/veristat.c | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit a8d1c48d0720140b53063ff23507845bb2078e92 Author: Tony Ambardar Date: Wed Jan 15 23:50:36 2025 -0800 selftests/bpf: Fix undefined UINT_MAX in veristat.c Include in 'veristat.c' to provide a UINT_MAX definition and avoid multiple compile errors against mips64el/musl-libc: veristat.c: In function 'max_verifier_log_size': veristat.c:1135:36: error: 'UINT_MAX' undeclared (first use in this function) 1135 | const int SMALL_LOG_SIZE = UINT_MAX >> 8; | ^~~~~~~~ veristat.c:24:1: note: 'UINT_MAX' is defined in header ''; did you forget to '#include '? 23 | #include +++ |+#include 24 | Fixes: 1f7c33630724 ("selftests/bpf: Increase verifier log limit in veristat") Signed-off-by: Tony Ambardar Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20250116075036.3459898-1-tony.ambardar@gmail.com tools/testing/selftests/bpf/veristat.c | 1 + 1 file changed, 1 insertion(+) commit d7f12857f095ef38523399d47e68787b357232f6 Author: Bo Gan Date: Thu Aug 29 23:16:39 2024 -0700 clk: analogbits: Fix incorrect calculation of vco rate delta In wrpll_configure_for_rate() we try to determine the best PLL configuration for a target rate. However, in the loop where we try values of R, we should compare the derived `vco` with `target_vco_rate`. However, we were in fact comparing it with `target_rate`, which is actually after Q shift. This is incorrect, and sometimes can result in suboptimal clock rates. Fix it. Fixes: 7b9487a9a5c4 ("clk: analogbits: add Wide-Range PLL library") Signed-off-by: Bo Gan Link: https://lore.kernel.org/r/20240830061639.2316-1-ganboing@gmail.com Signed-off-by: Stephen Boyd drivers/clk/analogbits/wrpll-cln28hpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b4799e4f0f40a4ec737bf870aa38d06288bf0fb Author: Dmitry Vyukov Date: Wed Jan 15 09:00:42 2025 +0100 perf hist: Fix bogus profiles when filters are enabled When a filtered column is not present in the sort order, profiles become arbitrary broken. Filtered and non-filtered entries are collapsed together, and the filtered-by field ends up with a random value (either from a filtered or non-filtered entry). If we end up with filtered entry/value, then the whole collapsed entry will be filtered out and will be missing in the profile. If we end up with non-filtered entry/value, then the overhead value will be wrongly larger (include some subset of filtered out samples). This leads to very confusing profiles. The problem is hard to notice, and if noticed hard to understand. If the filter is for a single value, then it can be fixed by adding the corresponding field to the sort order (provided user understood the problem). But if the filter is for multiple values, it's impossible to fix b/c there is no concept of binary sorting based on filter predicate (we want to group all non-filtered values in one bucket, and all filtered values in another). Examples of affected commands: perf report --tid=123 perf report --sort overhead,symbol --comm=foo,bar Fix this by considering filtered status as the highest priority sort/collapse predicate. As a side effect this effectively adds a new feature of showing profile where several lines are combined based on arbitrary filtering predicate. For example, showing symbols from binaries foo and bar combined together, but not from other binaries; or showing combined overhead of several particular threads. Signed-off-by: Dmitry Vyukov Link: https://lore.kernel.org/r/359dc444ce94d20e59d3a9e360c36fbeac833a04.1736927981.git.dvyukov@google.com Signed-off-by: Namhyung Kim tools/perf/util/hist.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit cd57c04c382ec0656f86b48390b0409a1cad61f7 Author: Dmitry Vyukov Date: Wed Jan 15 09:00:41 2025 +0100 perf hist: Deduplicate cmp/sort/collapse code Application of cmp/sort/collapse fmt callbacks is duplicated 6 times. Factor it into a common helper function. NFC. Signed-off-by: Dmitry Vyukov Link: https://lore.kernel.org/r/84c4b55614e24a344f86ae0db62e8fa8f251f874.1736927981.git.dvyukov@google.com Signed-off-by: Namhyung Kim tools/perf/util/hist.c | 103 +++++++++++++++++++++---------------------------- tools/perf/util/hist.h | 14 +++---- 2 files changed, 49 insertions(+), 68 deletions(-) commit 63492a2d7e2826f94e524e551b1abb3b32c55bca Merge: 3d9a9e9a77c5 62c552070a98 Author: Jens Axboe Date: Thu Jan 16 14:42:37 2025 -0700 Merge tag 'md-6.14-20250116' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux into for-6.14/block Pull MD fix from Song. * tag 'md-6.14-20250116' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux: md/md-linear: Fix a NULL vs IS_ERR() bug in linear_add() commit 92600f3295ff571890c981d886c6544030cc05f3 Author: Pierre-Loup A. Griffais Date: Thu Jan 16 10:29:53 2025 -0800 Input: xpad - add QH Electronics VID/PID Add support for QH Electronics Xbox 360-compatible controller Signed-off-by: Pierre-Loup A. Griffais Signed-off-by: Vicki Pfau Link: https://lore.kernel.org/r/20250116012518.3476735-1-vi@endrift.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 2 ++ 1 file changed, 2 insertions(+) commit e7d0b023955ae3cb25796e19d44a4d55b5ad58de Author: Maxime Ripard Date: Thu Jan 16 16:24:12 2025 +0000 clk: bcm: rpi: Add disp clock BCM2712 has an extra clock exposed by the firmware called DISP, and used by (at least) the HVS. Let's add it to the list of clocks to register in Linux. Acked-by: Stephen Boyd Signed-off-by: Maxime Ripard Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20250116-bcm2712-clk-updates-v1-5-10bc92ffbf41@raspberrypi.com Reviewed-by: Florian Fainelli Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-raspberrypi.c | 5 +++++ include/soc/bcm2835/raspberrypi-firmware.h | 1 + 2 files changed, 6 insertions(+) commit 4af2cfc2ccdc57330cbd5da8c8dc8878f863763a Author: Maxime Ripard Date: Thu Jan 16 16:24:11 2025 +0000 clk: bcm: rpi: Create helper to retrieve private data The RaspberryPi firmware clocks driver uses in several instances a container_of to retrieve the struct raspberrypi_clk_data from a pointer to struct clk_hw. Let's create a small function to avoid duplicating it all over the place. Acked-by: Stephen Boyd Signed-off-by: Maxime Ripard Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20250116-bcm2712-clk-updates-v1-4-10bc92ffbf41@raspberrypi.com Reviewed-by: Florian Fainelli Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-raspberrypi.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 4d85abb0fb8eac79375b88d4442cdfc624389bcc Author: Dom Cobley Date: Thu Jan 16 16:24:10 2025 +0000 clk: bcm: rpi: Enable minimize for all firmware clocks There isn't a reason not to minimise the clocks, and it saves some power. Acked-by: Stephen Boyd Signed-off-by: Dom Cobley Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20250116-bcm2712-clk-updates-v1-3-10bc92ffbf41@raspberrypi.com Reviewed-by: Florian Fainelli Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-raspberrypi.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c911a66059a23e284dcfd00cf847368c0a2fa6c8 Author: Dom Cobley Date: Thu Jan 16 16:24:09 2025 +0000 clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks For performance/power it is beneficial to adjust gpu clocks with arm clock. This is how the downstream cpufreq driver works Acked-by: Stephen Boyd Signed-off-by: Dom Cobley Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20250116-bcm2712-clk-updates-v1-2-10bc92ffbf41@raspberrypi.com Reviewed-by: Florian Fainelli Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-raspberrypi.c | 1 - 1 file changed, 1 deletion(-) commit 410cf8252e5c595dd7d20cb176359842c35bc4cb Author: Dom Cobley Date: Thu Jan 16 16:24:08 2025 +0000 clk: bcm: rpi: Add ISP to exported clocks The ISP clock can be controlled by the driver, so register it with the clock subsystem. Acked-by: Stephen Boyd Signed-off-by: Dom Cobley Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20250116-bcm2712-clk-updates-v1-1-10bc92ffbf41@raspberrypi.com Reviewed-by: Florian Fainelli Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-raspberrypi.c | 3 +++ 1 file changed, 3 insertions(+) commit 1de25c6b984d71a7961065e27514b4fd51b2daae Author: Konrad Knitter Date: Wed Nov 6 10:36:43 2024 +0100 ice: support FW Recovery Mode Recovery Mode is intended to recover from a fatal failure scenario in which the device is not accessible to the host, meaning the firmware is non-responsive. The purpose of the Firmware Recovery Mode is to enable software tools to update firmware and/or device configuration so the fatal error can be resolved. Recovery Mode Firmware supports a limited set of admin commands required for NVM update. Recovery Firmware does not support hardware interrupts so a polling mode is used. The driver will expose only the minimum set of devlink commands required for the recovery of the adapter. Using an appropriate NVM image, the user can recover the adapter using the devlink flash API. Prior to 4.20 E810 Adapter Recovery Firmware supports only the update and erase of the "fw.mgmt" component. E810 Adapter Recovery Firmware doesn't support selected preservation of cards settings or identifiers. The following command can be used to recover the adapter: $ devlink dev flash component fw.mgmt overwrite settings overwrite identifier Newer FW versions (4.20 or newer) supports update of "fw.undi" and "fw.netlist" components. $ devlink dev flash Tested on Intel Corporation Ethernet Controller E810-C for SFP FW revision 3.20 and 4.30. Reviewed-by: Przemek Kitszel Signed-off-by: Konrad Knitter Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/devlink/devlink.c | 8 +++- drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 1 + drivers/net/ethernet/intel/ice/ice_fw_update.c | 14 ++++++- drivers/net/ethernet/intel/ice/ice_lib.c | 6 +++ drivers/net/ethernet/intel/ice/ice_lib.h | 1 + drivers/net/ethernet/intel/ice/ice_main.c | 53 ++++++++++++++++++++++++ 6 files changed, 80 insertions(+), 3 deletions(-) commit 0502bd2e06055646f43871f76fb7bdd57f7c0939 Author: Konrad Knitter Date: Wed Nov 6 10:36:42 2024 +0100 devlink: add devl guard Add devl guard for scoped_guard(). Example usage: scoped_guard(devl, priv_to_devlink(pf)) { err = init_devlink(pf); if (err) return err; } Co-developed-by: Przemek Kitszel Signed-off-by: Przemek Kitszel Signed-off-by: Konrad Knitter Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen include/net/devlink.h | 1 + 1 file changed, 1 insertion(+) commit d4679b79ffae994fea08bc7751ff6550ad057f05 Author: Konrad Knitter Date: Wed Nov 6 10:36:41 2024 +0100 pldmfw: enable selected component update This patch enables to update a selected component from PLDM image containing multiple components. Example usage: struct pldmfw; data.mode = PLDMFW_UPDATE_MODE_SINGLE_COMPONENT; data.compontent_identifier = DRIVER_FW_MGMT_COMPONENT_ID; Reviewed-by: Jacob Keller Reviewed-by: Marcin Szycik Reviewed-by: Przemek Kitszel Signed-off-by: Konrad Knitter Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen include/linux/pldmfw.h | 8 ++++++++ lib/pldmfw/pldmfw.c | 8 ++++++++ 2 files changed, 16 insertions(+) commit 3f4818ec139030f425476bf8a10b616bab53a7b5 Author: Nicolin Chen Date: Tue Jan 14 22:55:59 2025 -0800 iommufd/fault: Destroy response and mutex in iommufd_fault_destroy() Both were missing in the initial patch. Fixes: 07838f7fd529 ("iommufd: Add iommufd fault object") Link: https://patch.msgid.link/r/bc8bb13e215af27e62ee51bdba3648dd4ed2dce3.1736923732.git.nicolinc@nvidia.com Cc: stable@vger.kernel.org Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Reviewed-by: Lu Baolu Signed-off-by: Nicolin Chen Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/fault.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ad9afd75030174e8f9eabd9d5c1a87a625db430c Author: Krzysztof Kozlowski Date: Sun Jan 12 14:39:02 2025 +0100 PCI: dra7xx: 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. Link: https://lore.kernel.org/r/20250112-syscon-phandle-args-pci-v1-1-fcb6ebcc0afc@linaro.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas drivers/pci/controller/dwc/pci-dra7xx.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) commit 149fc35734e50fc3200cf84c8efd711205961636 Author: Krzysztof Kozlowski Date: Sun Jan 12 14:39:03 2025 +0100 PCI: layerscape: 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. Link: https://lore.kernel.org/r/20250112-syscon-phandle-args-pci-v1-2-fcb6ebcc0afc@linaro.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Frank Li Acked-by: Roy Zang drivers/pci/controller/dwc/pci-layerscape.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 6dd24b0a858e64f9df596bf7cad2ddb436506f46 Author: Richard Zhu Date: Tue Nov 26 15:56:59 2024 +0800 PCI: imx6: Remove surplus imx7d_pcie_init_phy() function This function essentially duplicates imx7d_pcie_enable_ref_clk(). So remove it. Link: https://lore.kernel.org/r/20241126075702.4099164-8-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Frank Li drivers/pci/controller/dwc/pci-imx6.c | 8 -------- 1 file changed, 8 deletions(-) commit 93d883f89063744a92006fc356b1c767eb62d950 Author: Richard Zhu Date: Tue Nov 26 15:56:58 2024 +0800 PCI: imx6: Add missing reference clock disable logic Ensure the *_enable_ref_clk() function is symmetric by addressing missing disable parts on some platforms. Fixes: d0a75c791f98 ("PCI: imx6: Factor out ref clock disable to match enable") Link: https://lore.kernel.org/r/20241126075702.4099164-7-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Frank Li drivers/pci/controller/dwc/pci-imx6.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit ef61c7d8d032adb467f99d03ccfaa293b417ac75 Author: Richard Zhu Date: Tue Nov 26 15:56:57 2024 +0800 PCI: imx6: Deassert apps_reset in imx_pcie_deassert_core_reset() Since the apps_reset is asserted in imx_pcie_assert_core_reset(), it should be deasserted in imx_pcie_deassert_core_reset(). Fixes: 9b3fe6796d7c ("PCI: imx6: Add code to support i.MX7D") Link: https://lore.kernel.org/r/20241126075702.4099164-6-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Frank Li drivers/pci/controller/dwc/pci-imx6.c | 1 + 1 file changed, 1 insertion(+) commit f068ffdd034c93f0c768acdc87d4d2d7023c1379 Author: Richard Zhu Date: Tue Nov 26 15:56:56 2024 +0800 PCI: imx6: Skip controller_id generation logic for i.MX7D The i.MX7D only has one PCIe controller, so controller_id should always be 0. The previous code is incorrect although yielding the correct result. Fix by removing "IMX7D" from the switch case branch. Fixes: 2d8ed461dbc9 ("PCI: imx6: Add support for i.MX8MQ") Link: https://lore.kernel.org/r/20241126075702.4099164-5-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Frank Li drivers/pci/controller/dwc/pci-imx6.c | 1 - 1 file changed, 1 deletion(-) commit 7ab93e6a08d1c10bb2aad82dcb678a6c6ea65c20 Author: Richard Zhu Date: Tue Nov 26 15:56:55 2024 +0800 PCI: imx6: Fetch dbi2 and iATU base addesses from DT Since dw_pcie_get_resources() gets the dbi2 and iATU base addresses from DT, remove the code from the imx6 driver that does the same. Upstream DTSes have not enabled Endpoint function. So nothing is broken for old upstream DTBs. Link: https://lore.kernel.org/r/20241126075702.4099164-4-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pci-imx6.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit de22e20589b79f35f92543119c33051f8179dba0 Author: Frank Li Date: Tue Nov 19 14:44:24 2024 -0500 PCI: imx6: Configure PHY based on Root Complex or Endpoint mode Pass PHY_MODE_PCIE_EP if the PCI controller operates in Endpoint (EP) mode, and fix the Root Complex (RC) mode being hardcoded using a drvdata mode check. Fixes: 8026f2d8e8a9 ("PCI: imx6: Call common PHY API to set mode, speed, and submode") Link: https://lore.kernel.org/r/20241119-pci_fixup_addr-v8-6-c4bfa5193288@nxp.com Signed-off-by: Frank Li [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Richard Zhu drivers/pci/controller/dwc/pci-imx6.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 137250911f4e58e3a5ba9caa91288e0d101f70c4 Author: Richard Zhu Date: Tue Nov 26 15:56:54 2024 +0800 PCI: imx6: Add Refclk for i.MX95 PCIe Add "ref" clock to enable Refclk. To avoid breaking DT backwards compatibility, the i.MX95 "ref" clock is optional. Use devm_clk_get_optional() to fetch i.MX95 PCIe optional clocks in driver. If using external clock, "ref" clock should point to external reference. If using internal clock, CREF_EN in LAST_TO_REG controls reference output, implemented in drivers/clk/imx/clk-imx95-blk-ctl.c. Link: https://lore.kernel.org/r/20241126075702.4099164-3-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Frank Li drivers/pci/controller/dwc/pci-imx6.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit d4627402bd04795b039cb652bf0c6792ad654a84 Author: Richard Zhu Date: Tue Nov 26 15:56:53 2024 +0800 dt-bindings: PCI: fsl,imx6q-pcie: Add Refclk for i.MX95 RC Previous Refclk of i.MX95 PCIe RC is on when system boot to kernel. But boot firmware change the behavior, it is off when boot. So it must be turned on when it is used. Also it needs be turned off/on for suspend and resume. Add one Refclk for i.MX95 PCIe RC. Increase clocks' maxItems to 5 and keep the same restriction with other compatible string. Link: https://lore.kernel.org/r/20241126075702.4099164-2-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Kozlowski .../bindings/pci/fsl,imx6q-pcie-common.yaml | 4 ++-- .../devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml | 1 + .../devicetree/bindings/pci/fsl,imx6q-pcie.yaml | 25 ++++++++++++++++++---- 3 files changed, 24 insertions(+), 6 deletions(-) commit 687aedb73a401addf151c5f60e481e574b4c9ad9 Author: Frank Li Date: Tue Nov 19 14:44:25 2024 -0500 PCI: imx6: Add i.MX8Q PCIe Endpoint (EP) support Add support for the i.MX8Q series (i.MX8QM, i.MX8QXP, and i.MX8DXL) PCIe Endpoint (EP). On the i.MX8Q platforms, the PCI bus addresses differ from the CPU addresses. However, the DesignWare (DWC) driver already handles this in the common code. Link: https://lore.kernel.org/r/20241119-pci_fixup_addr-v8-7-c4bfa5193288@nxp.com Signed-off-by: Frank Li [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Richard Zhu Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/dwc/pci-imx6.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 3d2207256a373c510e4c29df0d4cfe9c1804b138 Author: Frank Li Date: Tue Nov 19 14:44:23 2024 -0500 dt-bindings: PCI: fsl,imx6q-pcie-ep: Add compatible string fsl,imx8q-pcie-ep Add new compatible string fsl,imx8q-pcie-ep for iMX8Q. The 'reg-names' property only needs 'dbi' and 'addr_space' because the others are located at a default offset. The new 'clock-names' property aligns with the Root Complex (RC) naming. Link: https://lore.kernel.org/r/20241119-pci_fixup_addr-v8-5-c4bfa5193288@nxp.com Signed-off-by: Frank Li [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Acked-by: Conor Dooley .../devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml | 38 +++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) commit 68abd0c4ebf24cd499841a488b97a6873d5efabb Author: Marcel Hamer Date: Thu Jan 16 14:22:40 2025 +0100 wifi: brcmfmac: fix NULL pointer dereference in brcmf_txfinalize() On removal of the device or unloading of the kernel module a potential NULL pointer dereference occurs. The following sequence deletes the interface: brcmf_detach() brcmf_remove_interface() brcmf_del_if() Inside the brcmf_del_if() function the drvr->if2bss[ifidx] is updated to BRCMF_BSSIDX_INVALID (-1) if the bsscfgidx matches. After brcmf_remove_interface() call the brcmf_proto_detach() function is called providing the following sequence: brcmf_detach() brcmf_proto_detach() brcmf_proto_msgbuf_detach() brcmf_flowring_detach() brcmf_msgbuf_delete_flowring() brcmf_msgbuf_remove_flowring() brcmf_flowring_delete() brcmf_get_ifp() brcmf_txfinalize() Since brcmf_get_ip() can and actually will return NULL in this case the call to brcmf_txfinalize() will result in a NULL pointer dereference inside brcmf_txfinalize() when trying to update ifp->ndev->stats.tx_errors. This will only happen if a flowring still has an skb. Although the NULL pointer dereference has only been seen when trying to update the tx statistic, all other uses of the ifp pointer have been guarded as well with an early return if ifp is NULL. Cc: stable@vger.kernel.org Signed-off-by: Marcel Hamer Link: https://lore.kernel.org/all/b519e746-ddfd-421f-d897-7620d229e4b2@gmail.com/ Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20250116132240.731039-1-marcel.hamer@windriver.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 5 +++++ 1 file changed, 5 insertions(+) commit b4bfbc50b1b92a0815800eb1231f73bfc917af03 Author: Ping-Ke Shih Date: Thu Jan 16 20:04:24 2025 +0800 wifi: rtw88: add RTW88_LEDS depends on LEDS_CLASS to Kconfig When using allmodconfig, .config has CONFIG_LEDS_CLASS=m but autoconf.h has CONFIG_LEDS_CLASS_MODULE (additional suffix _MODULE) instead of CONFIG_LEDS_CLASS, which condition CONFIG_LEDS_CLASS in rtw88/led.h can't work properly. Add RTW88_LEDS to Kconfig, and use it as condition to fix this problem. drivers/net/wireless/realtek/rtw88/led.c:19:6: error: redefinition of 'rtw_led_init' 19 | void rtw_led_init(struct rtw_dev *rtwdev) | ^~~~~~~~~~~~ In file included from drivers/net/wireless/realtek/rtw88/led.c:7: drivers/net/wireless/realtek/rtw88/led.h:15:20: note: previous definition of 'rtw_led_init' with type 'void(struct rtw_dev *)' 15 | static inline void rtw_led_init(struct rtw_dev *rtwdev) | ^~~~~~~~~~~~ drivers/net/wireless/realtek/rtw88/led.c:64:6: error: redefinition of 'rtw_led_deinit' 64 | void rtw_led_deinit(struct rtw_dev *rtwdev) | ^~~~~~~~~~~~~~ drivers/net/wireless/realtek/rtw88/led.h:19:20: note: previous definition of 'rtw_led_deinit' with type 'void(struct rtw_dev *)' 19 | static inline void rtw_led_deinit(struct rtw_dev *rtwdev) | ^~~~~~~~~~~~~~ Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/linux-wireless/e19a87ad9cd54bfa9907f3a043b25d30@realtek.com/T/#me407832de1040ce22e53517bcb18e322ad0e2260 Fixes: 4b6652bc6d8d ("wifi: rtw88: Add support for LED blinking") Cc: Bitterblue Smith Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20250116120424.13174-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw88/Kconfig | 5 +++++ drivers/net/wireless/realtek/rtw88/Makefile | 2 +- drivers/net/wireless/realtek/rtw88/led.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) commit 41fb0fabc40113769ce53ea85ffd1f4bc87ae03a Author: Chen Linxuan Date: Thu Jan 16 16:33:02 2025 +0800 erofs: return SHRINK_EMPTY if no objects to free Comments in file include/linux/shrinker.h says that `count_objects` of `struct shrinker` should return SHRINK_EMPTY when there are no objects to free. > If there are no objects to free, it should return SHRINK_EMPTY, > while 0 is returned in cases of the number of freeable items cannot > be determined or shrinker should skip this cache for this time > (e.g., their number is below shrinkable limit). Signed-off-by: Chen Linxuan Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/149E6E64B5B6B5E8+20250116083303.199817-1-chenlinxuan@uniontech.com [ Gao Xiang: should have no impact since it's not memcg-aware. ] Signed-off-by: Gao Xiang fs/erofs/zutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e180b8c4c23beb876927a999c49c18b361fa7975 Author: Gao Xiang Date: Tue Jan 14 11:44:29 2025 +0800 erofs: convert z_erofs_bind_cache() to folios The managed cache uses a pseudo inode to keep (necessary) compressed data. Currently, it still uses zero-order folios, so this is just a trivial conversion, except that the use of the pagepool is temporarily dropped. Drop some obsoleted comments too. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20250114034429.431408-4-hsiangkao@linux.alibaba.com fs/erofs/compress.h | 23 +---------------------- fs/erofs/zdata.c | 51 ++++++++++++++++++++------------------------------- 2 files changed, 21 insertions(+), 53 deletions(-) commit 6f435e94a19ad25b372bc61443afd0839b8a521c Author: Gao Xiang Date: Tue Jan 14 11:44:28 2025 +0800 erofs: tidy up zdata.c All small code style adjustments, no logic changes: - z_erofs_decompress_frontend => z_erofs_frontend; - z_erofs_decompress_backend => z_erofs_backend; - Use Z_EROFS_DEFINE_FRONTEND() to replace DECOMPRESS_FRONTEND_INIT(); - `nr_folios` should be `nrpages` in z_erofs_readahead(); - Refine in-line comments. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20250114034429.431408-3-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 111 +++++++++++++++++++++---------------------------------- 1 file changed, 43 insertions(+), 68 deletions(-) commit 5514d8478b8ef3f0ba1b77beaa65f05c12825143 Author: Gao Xiang Date: Tue Jan 14 11:44:27 2025 +0800 erofs: get rid of `z_erofs_next_pcluster_t` It was originally intended for tagged pointer reservation. Now all encoded data can be represented uniformally with `struct z_erofs_pcluster` as described in commit bf1aa03980f4 ("erofs: sunset `struct erofs_workgroup`"), let's drop it too. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20250114034429.431408-2-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 80 ++++++++++++++++++++------------------------------------ 1 file changed, 29 insertions(+), 51 deletions(-) commit 9c782ccc69688613cb1cebed13dfbc456c92e57b Merge: 5a597a19a214 eeed4bfbe9b9 Author: Rafael J. Wysocki Date: Thu Jan 16 20:21:18 2025 +0100 Merge back earlier cpuidle material for 6.14 commit 423124ab97b0235dce590a9fba8f3d3cd3cdb38b Merge: 7e265fc04690 083466754596 Author: Rafael J. Wysocki Date: Thu Jan 16 20:20:20 2025 +0100 Merge back earlier cpufreq material for 6.14 commit 2a810ea79cd7a6d5f134ea69ca2ba726e600cbc4 Author: Gao Xiang Date: Tue Jan 14 11:44:26 2025 +0800 erofs: simplify z_erofs_load_compact_lcluster() - Get rid of unpack_compacted_index() and fold it into z_erofs_load_compact_lcluster(); - Avoid a goto. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20250114034429.431408-1-hsiangkao@linux.alibaba.com fs/erofs/zmap.c | 89 +++++++++++++++++++++++---------------------------------- 1 file changed, 36 insertions(+), 53 deletions(-) commit db902986dee453bfb5835cbc8efa67154ab34caf Author: Gao Xiang Date: Tue Jan 14 12:00:58 2025 +0800 erofs: fix potential return value overflow of z_erofs_shrink_scan() z_erofs_shrink_scan() could return small numbers due to the mistyped `freed`. Although I don't think it has any visible impact. Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20250114040058.459981-1-hsiangkao@linux.alibaba.com fs/erofs/zdata.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9f74ae8c9ac97a79f9d45c92bd8ac8598e17f21f Author: Gao Xiang Date: Tue Jan 7 16:28:25 2025 +0800 erofs: shorten bvecs[] for file-backed mounts BIO_MAX_VECS is too large for __GFP_NOFAIL allocation. We could use a mempool (since BIOs can always proceed), but it seems overly complicated for now. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20250107082825.74242-1-hsiangkao@linux.alibaba.com fs/erofs/fileio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 54ab25d03eab652a321c3d1566edc2b050d83f2f Author: Gao Xiang Date: Thu Dec 12 10:39:48 2024 +0800 erofs: micro-optimize superblock checksum Just verify the remaining unknown on-disk data instead of allocating a temporary buffer for the whole superblock and zeroing out the checksum field since .magic(EROFS_SUPER_MAGIC_V1) is verified and .checksum(0) is fixed. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20241212023948.1143038-1-hsiangkao@linux.alibaba.com fs/erofs/erofs_fs.h | 3 ++- fs/erofs/super.c | 30 +++++++++++------------------- 2 files changed, 13 insertions(+), 20 deletions(-) commit a78c5c2269e39544fab4140105f55fca4502e915 Author: Ethan Carter Edwards Date: Sun Dec 22 21:23:56 2024 -0500 fs: erofs: xattr.c change kzalloc to kcalloc Refactor xattr.c to use kcalloc instead of kzalloc when multiplying allocation size by count. This refactor prevents unintentional memory overflows. Discovered by checkpatch.pl. Signed-off-by: Ethan Carter Edwards Link: https://lore.kernel.org/r/i3CLJhMELKzBJr3DaRyv-hP_4m-3Twx0sgBWXW6naZlMtHrIeWr93xOFshX8qZHDrJeSjHMTiUOh8JmBZ9v0AB-S1lIYM_d-vasSRlsF_s4=@ethancedwards.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang fs/erofs/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e38f2814f02ed2768a4f293088375528121afed Author: Ian Rogers Date: Thu Jan 9 20:57:36 2025 -0800 perf test: Improve verbose documentation Add a little more detail on the output expectations for each verbose level. Signed-off-by: Ian Rogers Reviewed-by: Namhyung Kim Cc: James Clark Link: https://lore.kernel.org/r/20250110045736.598281-6-irogers@google.com Signed-off-by: Namhyung Kim tools/perf/Documentation/perf-test.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1c0d9816e9cb9548c74e04971300ec9cecf2c0d7 Author: Ian Rogers Date: Thu Jan 9 20:57:35 2025 -0800 perf test: Add a runs-per-test flag To detect flakes it is useful to run tests more than once. Add a runs-per-test flag that will run each test multiple times. Example output: ``` $ perf test -r 3 lbr -v 122: perf record LBR tests : Ok 122: perf record LBR tests : Ok 122: perf record LBR tests : Ok ``` Update the documentation for the runs-per-test option. Signed-off-by: Ian Rogers Reviewed-by: Namhyung Kim Cc: James Clark Link: https://lore.kernel.org/r/20250110045736.598281-5-irogers@google.com Signed-off-by: Namhyung Kim tools/perf/Documentation/perf-test.txt | 5 +++++ tools/perf/tests/builtin-test.c | 28 +++++++++++++++++----------- 2 files changed, 22 insertions(+), 11 deletions(-) commit 4dd8bc4bf58e973eea3fdf5e2013011d83fba6c4 Author: Ian Rogers Date: Thu Jan 9 20:57:34 2025 -0800 perf test: Fix parallel/sequential option documentation The parallel option was removed in commit 94d1a913bdc4 ("perf test: Make parallel testing the default"). Update the sequential documentation to reflect it isn't the default except for "exclusive" tests. Fixes: 94d1a913bdc4 ("perf test: Make parallel testing the default") Signed-off-by: Ian Rogers Reviewed-by: Namhyung Kim Cc: James Clark Link: https://lore.kernel.org/r/20250110045736.598281-4-irogers@google.com Signed-off-by: Namhyung Kim tools/perf/Documentation/perf-test.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 2b7b78efc8c91430fd81a07d8fb4e0a89456aff8 Author: Ian Rogers Date: Thu Jan 9 20:57:33 2025 -0800 perf test: Send list output to stdout rather than stderr Follow the workload listing in using stdout rather than stderr. Correct the numbering of sub-tests to be 1.1 rather than 1:1. Signed-off-by: Ian Rogers Reviewed-by: Namhyung Kim Cc: James Clark Link: https://lore.kernel.org/r/20250110045736.598281-3-irogers@google.com Signed-off-by: Namhyung Kim tools/perf/tests/builtin-test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2e47c503deeeadc1bfa66ece7f75e298a814e94f Author: Ian Rogers Date: Thu Jan 9 20:57:32 2025 -0800 perf test: Rename functions and variables for better clarity The relationship between subtests and test cases is somewhat confusing, so let's do away with the notion of sub-tests and switch to just working with some number of test cases. Add a test_suite__for_each_test_case as in many cases, except the special one test case situation, the iteration can just be on all test cases. Switch variable names to be more intention revealing of what their value is. This work was motivated by discussion with Kan where it was noted the code is becoming overly indented: https://lore.kernel.org/lkml/20241109160219.49976-1-irogers@google.com/ Unifying more of the sub-test/no-sub-tests avoids one level of indentation in a number of places. Signed-off-by: Ian Rogers Reviewed-by: Namhyung Kim Cc: James Clark Link: https://lore.kernel.org/r/20250110045736.598281-2-irogers@google.com Signed-off-by: Namhyung Kim tools/perf/tests/builtin-test.c | 201 +++++++++++++++++++--------------------- 1 file changed, 93 insertions(+), 108 deletions(-) commit f2868b1a66d4f40f07e985b0beead606b2753602 Author: Charlie Jenkins Date: Tue Jan 14 11:35:44 2025 -0800 perf tools: Expose quiet/verbose variables in Makefile.perf The variables to make builds silent/verbose live inside tools/build/Makefile.build. Move those variables to the top-level Makefile.perf to be generally available. Committer testing: See the SYSCALL lines, now they are consistent with the other operations in other lines: SYSTBL /tmp/build/perf-tools-next/arch/x86/include/generated/asm/syscalls_32.h SYSTBL /tmp/build/perf-tools-next/arch/x86/include/generated/asm/syscalls_64.h GEN /tmp/build/perf-tools-next/common-cmds.h GEN /tmp/build/perf-tools-next/arch/arm64/include/generated/asm/sysreg-defs.h PERF_VERSION = 6.13.rc2.g3d94bb6ed1d0 GEN perf-archive MKDIR /tmp/build/perf-tools-next/jvmti/ MKDIR /tmp/build/perf-tools-next/jvmti/ MKDIR /tmp/build/perf-tools-next/jvmti/ MKDIR /tmp/build/perf-tools-next/jvmti/ GEN perf-iostat CC /tmp/build/perf-tools-next/jvmti/libjvmti.o Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Charlie Jenkins Tested-by: Arnaldo Carvalho de Melo Cc: Suzuki K Poulose Cc: James Clark Cc: Mike Leach Cc: linux-arm-kernel@lists.infradead.org Cc: coresight@lists.linaro.org Link: https://lore.kernel.org/r/20250114-perf_make_test-v1-1-decc1c517b11@rivosinc.com Signed-off-by: Namhyung Kim tools/build/Makefile.build | 20 ----------------- tools/perf/Makefile.perf | 37 ++++++++++++++++++++++++++++++- tools/perf/tests/shell/coresight/Makefile | 2 +- 3 files changed, 37 insertions(+), 22 deletions(-) commit 2ee738e90e80850582cbe10f34c6447965c1d87b Merge: b44e27b4df1a ce69b4019001 Author: Jakub Kicinski Date: Thu Jan 16 10:30:22 2025 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR (net-6.13-rc8). Conflicts: drivers/net/ethernet/realtek/r8169_main.c 1f691a1fc4be ("r8169: remove redundant hwmon support") 152d00a91396 ("r8169: simplify setting hwmon attribute visibility") https://lore.kernel.org/20250115122152.760b4e8d@canb.auug.org.au Adjacent changes: drivers/net/ethernet/broadcom/bnxt/bnxt.c 152f4da05aee ("bnxt_en: add support for rx-copybreak ethtool command") f0aa6a37a3db ("eth: bnxt: always recalculate features after XDP clearing, fix null-deref") drivers/net/ethernet/intel/ice/ice_type.h 50327223a8bb ("ice: add lock to protect low latency interface") dc26548d729e ("ice: Fix quad registers read on E825") Signed-off-by: Jakub Kicinski commit 6912bdb7c676019b6dd4520f555079c4d3ab1bdb Author: Nir Lichtman Date: Wed Jan 8 11:35:22 2025 +0000 Documentation: Fix x86_64 UEFI outdated references to elilo Problem: The x86_64 UEFI doc references Elilo which is an unmaintained/orphaned bootloader project. Also, on x86_64 a bootloader is technically not actually required since there is support for the Linux EFI stub. Solution: Remove the references to Elilo from the doc and refer to the EFI stub doc page, update steps accordingly, and add more details about creation of the EFI partition to improve clarity. Signed-off-by: Nir Lichtman Link: https://lore.kernel.org/r/20250108113522.GA897677@lichtman.org Signed-off-by: Jonathan Corbet Documentation/arch/x86/x86_64/uefi.rst | 37 +++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 10 deletions(-) commit e129fdc599093457648eccf981d672fade55a9c8 Author: Phil Auld Date: Tue Jan 14 14:05:25 2025 -0500 Documentation/sysctl: Add timer_migration to kernel.rst There is no mention of timer_migration in the docs. Add a short description. Signed-off-by: Phil Auld Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250114190525.169022-1-pauld@redhat.com Documentation/admin-guide/sysctl/kernel.rst | 7 +++++++ 1 file changed, 7 insertions(+) commit b6cdff984c3f820e8eb6b5ec083832253034581a Author: I Hsin Cheng Date: Wed Jan 15 15:03:55 2025 +0800 docs/mm: Physical memory: Remove zone_t "zone_t" doesn't exist in current code base anymore, remove the description of it. Signed-off-by: I Hsin Cheng Reviewed-by: Randy Dunlap Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250115070355.41769-1-richard120310@gmail.com Documentation/mm/physical_memory.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f68ea779d98a01de0c05b618e35ba2090af590cf Author: Ilpo Järvinen Date: Tue Jan 14 19:08:40 2025 +0200 PCI: Add pcie_print_tlp_log() to print TLP Header and Prefix Log Add pcie_print_tlp_log() to print TLP Header and Prefix Log. Print End-End Prefixes only if they are non-zero. Consolidate the few places which currently print TLP using custom formatting. Link: https://lore.kernel.org/r/20250114170840.1633-9-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron drivers/pci/pci.h | 2 ++ drivers/pci/pcie/aer.c | 10 ++-------- drivers/pci/pcie/dpc.c | 5 +---- drivers/pci/pcie/tlp.c | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 39 insertions(+), 12 deletions(-) commit ad41ddeeac216417a52fbc1060577f3098f4e90e Author: Ilpo Järvinen Date: Tue Jan 14 19:08:39 2025 +0200 PCI: Add TLP Prefix reading to pcie_read_tlp_log() pcie_read_tlp_log() handles only 4 Header Log DWORDs but TLP Prefix Log (PCIe r6.1 secs 7.8.4.12 & 7.9.14.13) may also be present. Generalize pcie_read_tlp_log() and struct pcie_tlp_log to also handle TLP Prefix Log. The relevant registers are formatted identically in AER and DPC Capability, but has these variations: a) The offsets of TLP Prefix Log registers vary. b) DPC RP PIO TLP Prefix Log register can be < 4 DWORDs. c) AER TLP Prefix Log Present (PCIe r6.1 sec 7.8.4.7) can indicate Prefix Log is not present. Therefore callers must pass the offset of the TLP Prefix Log register and the entire length to pcie_read_tlp_log() to be able to read the correct number of TLP Prefix DWORDs from the correct offset. Link: https://lore.kernel.org/r/20250114170840.1633-8-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen [bhelgaas: squash ternary fix from https://lore.kernel.org/r/20250116172019.88116-1-colin.i.king@gmail.com] Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron drivers/pci/pci.h | 5 ++++- drivers/pci/pcie/aer.c | 5 ++++- drivers/pci/pcie/dpc.c | 13 +++++------ drivers/pci/pcie/tlp.c | 52 ++++++++++++++++++++++++++++++++++++++----- include/linux/aer.h | 1 + include/uapi/linux/pci_regs.h | 10 +++++---- 6 files changed, 68 insertions(+), 18 deletions(-) commit 62c552070a980363d55a6082b432ebd1cade7a6e Author: Dan Carpenter Date: Wed Jan 15 09:53:52 2025 +0300 md/md-linear: Fix a NULL vs IS_ERR() bug in linear_add() The linear_conf() returns error pointers, it doesn't return NULL. Update the error checking to match. Fixes: 127186cfb184 ("md: reintroduce md-linear") Signed-off-by: Dan Carpenter Reviewed-by: Yu Kuai Link: https://lore.kernel.org/r/add654be-759f-4b2d-93ba-a3726dae380c@stanley.mountain Signed-off-by: Song Liu drivers/md/md-linear.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c1768b6725049e1fcfc841924d65f2872413000 Author: Chao Yu Date: Tue Jan 14 20:34:10 2025 +0800 f2fs: fix to do sanity check correctly on i_inline_xattr_size syzbot reported an out-of-range access issue as below: UBSAN: array-index-out-of-bounds in fs/f2fs/f2fs.h:3292:19 index 18446744073709550491 is out of range for type '__le32[923]' (aka 'unsigned int[923]') CPU: 0 UID: 0 PID: 5338 Comm: syz.0.0 Not tainted 6.12.0-syzkaller-10689-g7af08b57bcb9 #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 ubsan_epilogue lib/ubsan.c:231 [inline] __ubsan_handle_out_of_bounds+0x121/0x150 lib/ubsan.c:429 read_inline_xattr+0x273/0x280 lookup_all_xattrs fs/f2fs/xattr.c:341 [inline] f2fs_getxattr+0x57b/0x13b0 fs/f2fs/xattr.c:533 vfs_getxattr_alloc+0x472/0x5c0 fs/xattr.c:393 ima_read_xattr+0x38/0x60 security/integrity/ima/ima_appraise.c:229 process_measurement+0x117a/0x1fb0 security/integrity/ima/ima_main.c:353 ima_file_check+0xd9/0x120 security/integrity/ima/ima_main.c:572 security_file_post_open+0xb9/0x280 security/security.c:3121 do_open fs/namei.c:3830 [inline] path_openat+0x2ccd/0x3590 fs/namei.c:3987 do_file_open_root+0x3a7/0x720 fs/namei.c:4039 file_open_root+0x247/0x2a0 fs/open.c:1382 do_handle_open+0x85b/0x9d0 fs/fhandle.c:414 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 index: 18446744073709550491 (decimal, unsigned long long) = 0xfffffffffffffb9b (hexadecimal) = -1125 (decimal, long long) UBSAN detects that inline_xattr_addr() tries to access .i_addr[-1125]. w/ below testcase, it can reproduce this bug easily: - mkfs.f2fs -f -O extra_attr,flexible_inline_xattr /dev/sdb - mount -o inline_xattr_size=512 /dev/sdb /mnt/f2fs - touch /mnt/f2fs/file - umount /mnt/f2fs - inject.f2fs --node --mb i_inline --nid 4 --val 0x1 /dev/sdb - inject.f2fs --node --mb i_inline_xattr_size --nid 4 --val 2048 /dev/sdb - mount /dev/sdb /mnt/f2fs - getfattr /mnt/f2fs/file The root cause is if metadata of filesystem and inode were fuzzed as below: - extra_attr feature is enabled - flexible_inline_xattr feature is enabled - ri.i_inline_xattr_size = 2048 - F2FS_EXTRA_ATTR bit in ri.i_inline was not set sanity_check_inode() will skip doing sanity check on fi->i_inline_xattr_size, result in using invalid inline_xattr_size later incorrectly, fix it. Meanwhile, let's fix to check lower boundary for .i_inline_xattr_size w/ MIN_INLINE_XATTR_SIZE like we did in parse_options(). There is a related issue reported by syzbot, Qasim Ijaz has anlyzed and fixed it w/ very similar way [1], as discussed, we all agree that it will be better to do sanity check in sanity_check_inode() for fix, so finally, let's fix these two related bugs w/ current patch. Including commit message from Qasim's patch as below, thanks a lot for his contribution. "In f2fs_getxattr(), the function lookup_all_xattrs() allocates a 12-byte (base_size) buffer for an inline extended attribute. However, when __find_inline_xattr() calls __find_xattr(), it uses the macro "list_for_each_xattr(entry, addr)", which starts by calling XATTR_FIRST_ENTRY(addr). This skips a 24-byte struct f2fs_xattr_header at the beginning of the buffer, causing an immediate out-of-bounds read in a 12-byte allocation. The subsequent !IS_XATTR_LAST_ENTRY(entry) check then dereferences memory outside the allocated region, triggering the slab-out-of bounds read. This patch prevents the out-of-bounds read by adding a check to bail out early if inline_size is too small and does not account for the header plus the 4-byte value that IS_XATTR_LAST_ENTRY reads." [1]: https://lore.kernel.org/linux-f2fs-devel/Z32y1rfBY9Qb5ZjM@qasdev.system/ Fixes: 6afc662e68b5 ("f2fs: support flexible inline xattr size") Reported-by: syzbot+69f5379a1717a0b982a1@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-f2fs-devel/674f4e7d.050a0220.17bd51.004f.GAE@google.com Reported-by: syzbot Closes: https://syzkaller.appspot.com/bug?extid=f5e74075e096e757bdbf Tested-by: syzbot Tested-by: Qasim Ijaz Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/inode.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 4811fee8283f3f7416dd66e2303a55f6761187fc Author: Jaegeuk Kim Date: Wed Jan 8 18:18:32 2025 +0000 f2fs: remove blk_finish_plug Let's remove unclear blk_finish_plug. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 4 ---- 1 file changed, 4 deletions(-) commit 120ac1dc322f402544423582234f441d98ea4a6e Author: Yi Sun Date: Wed Jan 15 13:39:43 2025 +0800 f2fs: Optimize f2fs_truncate_data_blocks_range() Function f2fs_invalidate_blocks() can process consecutive blocks at a time, so f2fs_truncate_data_blocks_range() is optimized to use the new functionality of f2fs_invalidate_blocks(). Add two variables @blkstart and @blklen, @blkstart records the first address of the consecutive blocks, and @blkstart records the number of consecutive blocks. Signed-off-by: Yi Sun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit 78b435c9044a9ec321da29d299c70cb14b059682 Author: Andy Shevchenko Date: Thu Jan 16 18:21:09 2025 +0200 spi: pxa2xx: Introduce __lpss_ssp_update_priv() helper In a few places we repeat RMW IO operations on LPSS private registers. Let's introduce a helper to make the code better to read and maintain. Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20250116162109.263081-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 88 ++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 48 deletions(-) commit d67251079651eaafddf950f212e54837e7316644 Merge: a48867bc2f59 960a4140ade8 Author: Arnd Bergmann Date: Thu Jan 16 17:33:14 2025 +0100 Merge tag 'amlogic-drivers-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/dt Amlogic drivers changes for v6.14: - Document the System Control registers found on early Meson SoC * tag 'amlogic-drivers-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: dt-bindings: soc: amlogic,meson-gx-hhi-sysctrl: Document the System Control registers found on early Meson SoC Link: https://lore.kernel.org/r/d22513cc-c326-443c-982b-78adf755d3dc@linaro.org Signed-off-by: Arnd Bergmann commit 6696037a56a77af01170422674a98add3457e03f Author: Michael Ellerman Date: Wed Dec 18 21:55:11 2024 +1100 EDAC/cell: Remove powerpc Cell driver This driver can no longer be built since support for IBM Cell Blades was removed, in particular PPC_CELL_COMMON. Remove the driver. [ bp: Remove EDAC_CELL from Cell's defconfig too. ] Signed-off-by: Michael Ellerman Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20241218105523.416573-23-mpe@ellerman.id.au arch/powerpc/configs/cell_defconfig | 1 - drivers/edac/Kconfig | 8 - drivers/edac/Makefile | 2 - drivers/edac/cell_edac.c | 281 ------------------------------------ 4 files changed, 292 deletions(-) commit 9cba6947104a300405f74899493cd1a6bbe9799b Merge: 82e703dd438b 726efa92e02b Author: Ulf Hansson Date: Thu Jan 16 16:55:54 2025 +0100 pmdomain: Merge branch fixes into next Merge the pmdomain fixes for v6.13-rc[n] into the next branch, to allow them to get tested together with the new changes that are targeted for v6.14. Signed-off-by: Ulf Hansson commit afc67135bc04880fd5c1378c2cadb94b815a6c9e Merge: fac04efc5c79 ad455e48bba7 Author: Arnd Bergmann Date: Thu Jan 16 16:54:49 2025 +0100 Merge tag 'omap-for-v6.14/soc-signed' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap into soc/arm soc: omap: minor updates for v6.14 * tag 'omap-for-v6.14/soc-signed' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap: ARM: omap1: Fix up the Retu IRQ on Nokia 770 ARM: omap2plus_defconfig: enable charger of TWL603X ARM: OMAP2+: Fix a typo Link: https://lore.kernel.org/r/7hikqqb41a.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit a48867bc2f59f9ca3837a02de7a8d5f2a175f083 Merge: dec61b88d98f 708d55db3edb Author: Arnd Bergmann Date: Thu Jan 16 16:38:42 2025 +0100 Merge tag 'riscv-dt-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/dt ~RISC-V~ StarFive Devicetrees for v6.14 Not so much RISC-V, but rather StarFive, this time around as there are only two changes: the Milk-V Mars and Pine64 Star64 boards get their usb0 interfaces moved from peripheral to host mode. Signed-off-by: Conor Dooley * tag 'riscv-dt-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: dts: starfive: jh7110-milkv-mars: enable usb0 host function riscv: dts: starfive: jh7110-pine64-star64: enable usb0 host function Link: https://lore.kernel.org/r/20250113-kennel-outplayed-21a52a654c36@spud Signed-off-by: Arnd Bergmann commit dec61b88d98fc6ca762eae56e241a261a25ee2cb Merge: 116eda2ec90a a34c9fac85b2 Author: Arnd Bergmann Date: Thu Jan 16 16:37:41 2025 +0100 Merge tag 'mvebu-dt64-6.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/dt mvebu dt64 for 6.14 (part 1) Fix errors reported by dtbs_check for sata related nodes Fix cp1 comphy link on Marvell CN913x platforms * tag 'mvebu-dt64-6.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: arm64: dts: marvell: drop additional phy-names for sata arm64: dts: marvell: only enable complete sata nodes arm64: dts: marvell: cn9131-cf-solidwan: fix cp1 comphy links Link: https://lore.kernel.org/r/87frlnygej.fsf@BLaptop.bootlin.com Signed-off-by: Arnd Bergmann commit 0d882fae334be3e519290fbb05472b50b698169d Author: Kurt Borja Date: Wed Jan 15 19:27:13 2025 -0500 platform/x86: ideapad-laptop: Use devm_platform_profile_register() Replace platform_profile_register() with it's device managed version. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-12-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/ideapad-laptop.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1ab20816ab0f328a26cdb2467b62e6017fffef5d Author: Kurt Borja Date: Wed Jan 15 19:27:12 2025 -0500 platform/x86: dell-pc: Use devm_platform_profile_register() Replace platform_profile_register() with it's device managed version. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-11-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/dell/dell-pc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8f1868526702c1a544595075525b5bf52653607d Author: Kurt Borja Date: Wed Jan 15 19:27:11 2025 -0500 platform/x86: asus-wmi: Use devm_platform_profile_register() Replace platform_profile_register() with it's device managed version. Also replace pr_err with dev_err in case of error and make the error message more user-friendly. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-10-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/asus-wmi.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 3e6d0bf3b9bf2232ba604c1c61b106beaf3cae3b Author: Kurt Borja Date: Wed Jan 15 19:27:10 2025 -0500 platform/x86: amd: pmf: sps: Use devm_platform_profile_register() Replace platform_profile_register() with it's device managed version. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-9-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/amd/pmf/core.c | 1 - drivers/platform/x86/amd/pmf/pmf.h | 1 - drivers/platform/x86/amd/pmf/sps.c | 7 +------ 3 files changed, 1 insertion(+), 8 deletions(-) commit 9523ea90cb178fa75d2c8ee1eab2cf8176dea6ef Author: Kurt Borja Date: Wed Jan 15 19:27:09 2025 -0500 platform/x86: acer-wmi: Use devm_platform_profile_register() Replace platform_profile_register() with it's device managed version. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-8-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/acer-wmi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 24c54b19b4958c8bc390d78d1da3413eb0970b8a Author: Kurt Borja Date: Wed Jan 15 19:27:08 2025 -0500 platform/surface: surface_platform_profile: Use devm_platform_profile_register() Replace platform_profile_register() with it's device managed version. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-7-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/surface/surface_platform_profile.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 58d5629dc8b8b8d9928fc649d9f2aaa361a8a5c5 Author: Kurt Borja Date: Wed Jan 15 19:27:07 2025 -0500 ACPI: platform_profile: Add `probe` to platform_profile_ops Add a `probe` callback to platform_profile_ops, which lets drivers initialize the choices member manually. This is a step towards unexposing the struct platform_profile_handler from the consumer drivers. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-6-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/acpi/platform_profile.c | 15 +++- .../platform/surface/surface_platform_profile.c | 16 ++-- drivers/platform/x86/acer-wmi.c | 88 +++++++++++----------- drivers/platform/x86/amd/pmf/sps.c | 15 ++-- drivers/platform/x86/asus-wmi.c | 16 ++-- drivers/platform/x86/dell/alienware-wmi.c | 24 +++--- drivers/platform/x86/dell/dell-pc.c | 26 ++++--- drivers/platform/x86/hp/hp-wmi.c | 29 ++++--- drivers/platform/x86/ideapad-laptop.c | 15 ++-- drivers/platform/x86/inspur_platform_profile.c | 14 +++- drivers/platform/x86/thinkpad_acpi.c | 15 ++-- include/linux/platform_profile.h | 1 + 12 files changed, 172 insertions(+), 102 deletions(-) commit b5ca1a4488a5e6dfb9962e2319c03c7414e50ec3 Author: Kurt Borja Date: Wed Jan 15 19:27:06 2025 -0500 ACPI: platform_profile: Add `ops` member to handlers Replace *profile_get and *profile_set members with a general *ops member. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-5-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/acpi/platform_profile.c | 6 +++--- .../platform/surface/surface_platform_profile.c | 8 ++++++-- drivers/platform/x86/acer-wmi.c | 11 ++++++---- drivers/platform/x86/amd/pmf/sps.c | 8 ++++++-- drivers/platform/x86/asus-wmi.c | 8 ++++++-- drivers/platform/x86/dell/alienware-wmi.c | 8 ++++++-- drivers/platform/x86/dell/dell-pc.c | 8 ++++++-- drivers/platform/x86/hp/hp-wmi.c | 24 ++++++++++++++++------ drivers/platform/x86/ideapad-laptop.c | 8 ++++++-- drivers/platform/x86/inspur_platform_profile.c | 8 ++++++-- drivers/platform/x86/thinkpad_acpi.c | 8 ++++++-- include/linux/platform_profile.h | 10 +++++++-- 12 files changed, 84 insertions(+), 31 deletions(-) commit cf3ea098dd3af415f079bc0b999055f213dd4a83 Author: Kurt Borja Date: Wed Jan 15 19:27:05 2025 -0500 ACPI: platform_profile: Remove platform_profile_handler from callbacks Devices can now set drvdata to the class device, thus passing the platform_profile_handler to callbacks is unnecessary. Instead pass the class device. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-4-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/acpi/platform_profile.c | 4 ++-- drivers/platform/surface/surface_platform_profile.c | 8 ++++---- drivers/platform/x86/acer-wmi.c | 4 ++-- drivers/platform/x86/amd/pmf/sps.c | 8 ++++---- drivers/platform/x86/asus-wmi.c | 8 ++++---- drivers/platform/x86/dell/alienware-wmi.c | 4 ++-- drivers/platform/x86/dell/dell-pc.c | 4 ++-- drivers/platform/x86/hp/hp-wmi.c | 14 +++++++------- drivers/platform/x86/ideapad-laptop.c | 8 ++++---- drivers/platform/x86/inspur_platform_profile.c | 8 ++++---- drivers/platform/x86/thinkpad_acpi.c | 4 ++-- include/linux/platform_profile.h | 6 ++---- 12 files changed, 39 insertions(+), 41 deletions(-) commit 249c576f0f9d0556cb7473b8a437b30239afbd16 Author: Kurt Borja Date: Wed Jan 15 19:27:04 2025 -0500 ACPI: platform_profile: Let drivers set drvdata to the class device Add *drvdata to platform_profile_register() signature and assign it to the class device. While at it, pass specific driver state as drvdata to replace uses of container_of() with dev_get_drvdata(). Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-3-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/acpi/platform_profile.c | 7 ++++--- drivers/platform/surface/surface_platform_profile.c | 6 +++--- drivers/platform/x86/acer-wmi.c | 2 +- drivers/platform/x86/amd/pmf/sps.c | 6 +++--- drivers/platform/x86/asus-wmi.c | 6 +++--- drivers/platform/x86/dell/alienware-wmi.c | 2 +- drivers/platform/x86/dell/dell-pc.c | 2 +- drivers/platform/x86/hp/hp-wmi.c | 2 +- drivers/platform/x86/ideapad-laptop.c | 6 +++--- drivers/platform/x86/inspur_platform_profile.c | 8 +++----- drivers/platform/x86/thinkpad_acpi.c | 2 +- include/linux/platform_profile.h | 4 ++-- 12 files changed, 26 insertions(+), 27 deletions(-) commit d960f14800b581d79e1c3df4db524d9d4b3aac9a Author: Kurt Borja Date: Wed Jan 15 19:27:03 2025 -0500 ACPI: platform_profile: Replace *class_dev member with class_dev Instead of holding a reference to the class device, embed it the platform_profile_handler. This involves manually creating and registering the device and replacing dev_get_drvdata() with the newly created to_pprof_handler() macro. Reviewed-by: Mario Limonciello Signed-off-by: Kurt Borja Reviewed-by: Mark Pearson Tested-by: Mark Pearson Link: https://lore.kernel.org/r/20250116002721.75592-2-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/acpi/platform_profile.c | 37 ++++++++++++++++++++----------------- include/linux/platform_profile.h | 3 ++- 2 files changed, 22 insertions(+), 18 deletions(-) commit fee89ddd76e45841a2b01d87b481bc02483f4572 Author: Michal Simek Date: Thu Jan 16 15:55:46 2025 +0100 ASoC: xilinx: xlnx_spdif: Simpify using devm_clk_get_enabled() Clock handling can be very simlified with using devm_clk_get_enabled() as was done by commit 8d2aaf4382b7 ("gpio: zynq: Simplify using devm_clk_get_enabled()"). Signed-off-by: Michal Simek Link: https://patch.msgid.link/90075f57ceff7cdf958d0d146f46f50661335236.1737039345.git.michal.simek@amd.com Signed-off-by: Mark Brown sound/soc/xilinx/xlnx_spdif.c | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) commit 82e703dd438b71432cc0ccbb90925d1e32dd014a Author: Christian Marangi Date: Thu Jan 9 14:12:57 2025 +0100 pmdomain: airoha: Add Airoha CPU PM Domain support Add Airoha CPU PM Domain support to control frequency and power of CPU present on Airoha EN7581 SoC. Frequency and power can be controlled with the use of the SMC command by passing the performance state. The driver also expose a read-only clock that expose the current CPU frequency with SMC command. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20250109131313.32317-1-ansuelsmth@gmail.com Signed-off-by: Ulf Hansson drivers/pmdomain/mediatek/Kconfig | 12 ++ drivers/pmdomain/mediatek/Makefile | 1 + drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c | 144 ++++++++++++++++++++++++ 3 files changed, 157 insertions(+) commit 542079b4b12e89f82c8a689b6e9b119ab7d52018 Author: Steven Rostedt Date: Thu Jan 16 09:33:37 2025 -0500 selftests/ftrace: Add test that tests event :mod: commands Now that here's a :mod: command that can be sent into set_event, add a test that tests its use. Both setting events for a loaded module, as well as caching what events to set for a module that is not loaded yet. Cc: Shuah Khan Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: linux-kselftest@vger.kernel.org Link: https://lore.kernel.org/20250116143533.819228058@goodmis.org Signed-off-by: Steven Rostedt (Google) .../selftests/ftrace/test.d/event/event-mod.tc | 191 +++++++++++++++++++++ 1 file changed, 191 insertions(+) commit b355247df104ef6644288884afd2c08b7bf49897 Author: Steven Rostedt Date: Thu Jan 16 09:33:36 2025 -0500 tracing: Cache ":mod:" events for modules not loaded yet When the :mod: command is written into /sys/kernel/tracing/set_event (or that file within an instance), if the module specified after the ":mod:" is not yet loaded, it will store that string internally. When the module is loaded, it will enable the events as if the module was loaded when the string was written into the set_event file. This can also be useful to enable events that are in the init section of the module, as the events are enabled before the init section is executed. This also works on the kernel command line: trace_event=:mod: Will enable the events for when it is loaded. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250116143533.514730995@goodmis.org Signed-off-by: Steven Rostedt (Google) Documentation/admin-guide/kernel-parameters.txt | 8 + Documentation/trace/events.rst | 4 +- kernel/trace/ftrace.c | 17 -- kernel/trace/trace.c | 26 +++ kernel/trace/trace.h | 12 ++ kernel/trace/trace_events.c | 241 ++++++++++++++++++++++-- 6 files changed, 279 insertions(+), 29 deletions(-) commit 4c86bc531e60900053384867c082675bba82c29f Author: Steven Rostedt Date: Thu Jan 16 09:33:35 2025 -0500 tracing: Add :mod: command to enabled module events Add a :mod: command to enable only events from a given module from the set_events file. echo '*:mod:' > set_events Or echo ':mod:' > set_events Will enable all events for that module. Specific events can also be enabled via: echo ':mod:' > set_events Or echo '::mod:' > set_events Or echo '*::mod:' > set_events The ":mod:" keyword is consistent with the function tracing filter to enable functions from a given module. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Link: https://lore.kernel.org/20250116143533.214496360@goodmis.org Signed-off-by: Steven Rostedt (Google) Documentation/trace/events.rst | 22 ++++++++++++++++ kernel/trace/trace.c | 2 ++ kernel/trace/trace_events.c | 59 ++++++++++++++++++++++++++++++++---------- 3 files changed, 70 insertions(+), 13 deletions(-) commit 116eda2ec90a3be89ca1d49217e8474a6b3280bd Merge: d1181e342bff 983833061d95 Author: Arnd Bergmann Date: Thu Jan 16 15:31:25 2025 +0100 Merge tag 'qcom-arm64-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt Qualcomm Arm64 DeviceTree updates for v6.14 This adds support for the new Snapdragon 8 Elite platform with MTP and QRD boards, QCS615 platform with the Ride board, QCS8300 platform with its Ride board, IPQ5424 platform with the RDP466 board, MSM8917 platform with Xiaomi Redmi 5A, and the SAR2130P platform with the Snapdragon AR2 Gen1 Smart Viewer Development Kit. On X Elite the HP Omnibook X laptop and the Snapdragon Devkit are added. The 8cx Gen3-based Huawaei Matebook E Go and Microsoft Windows Dev Kit 2023 are introduced. IPQ9574 gains PCIe and TRNG descriptions, together with a few other smaller improvements. TRNG is also enabled on the IPQ5332 platform. On MSM8994, Huawei Nexus 6P gains power and volume keys support. USB interrupts are corrected. On QCM6490 the FairPhone 5 gains camera EEPROM and Rb3Gen2 development kit gains description of the onboard LEDs. On QRB4210 RB2 support for HDMI audio playback is added. SA8775P gains missing clock controllers, CPUs are tied to PSCI power domains, DisplayPort is introduced and enabled on the Ride board. On SDM670 the GPU components are described and enabled for Google Pixel 3a, together with camera clock controller and flash LED. Xiaomi Mi Pad 5 Pro, on SM8250, gets WiFi and Bluetooth enabled. "global" IRQ for PCIe RC controllers are described on SM8550 and SM8650, to allow for hotplug events. Coresight support is added for SM8450, SM8650, X 1 Elite, QCS615, and QCS8300. The X Elite platform gains QUP power domains and OPPs, another PCIe controller, another UART, and its SDHCI controllers. The ASUS Vivobook S 15 gets GPU and lid switch enabled. Microsoft Surface Laptop 7 gains audio configuration, SD card reader support, and USB retimers. The Lenovo Yoga Slim 7x gets its LID switch described. Dell XPS 13 gains retimers described. The Lenovo Thinkpad T14s has additional USB ports enabled, as well as sound and fingerprint sensor. USB U1/U2 entry is disabled across a variety of platforms, to improve USB stability. sleep clock frequencies are reviewed and corrected for a variety of platforms, so is also various remoteproc mmio address ranges. * tag 'qcom-arm64-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (240 commits) arm64: dts: qcom: x1e80100-romulus: Update firmware nodes arm64: dts: qcom: msm8916-samsung-serranove: Add display panel arm64: dts: qcom: sm8650: Add 'global' interrupt to the PCIe RC nodes arm64: dts: qcom: sm8550: Add 'global' interrupt to the PCIe RC nodes arm64: dts: qcom: Remove unused and undocumented properties arm64: dts: qcom: sdm450-lenovo-tbx605f: add DSI panel nodes arm64: dts: qcom: pmi8950: add LAB-IBB nodes arm64: dts: qcom: ipq5424: enable the download mode support arm64: dts: qcom: ipq5424: add scm node arm64: dts: qcom: sm8250: Fix interrupt types of camss interrupts arm64: dts: qcom: sdm845: Fix interrupt types of camss interrupts arm64: dts: qcom: sc8280xp: Fix interrupt type of camss interrupts arm64: dts: qcom: qcs8300-ride: Enable USB controllers arm64: dts: qcom: qcs8300: Add support for usb nodes arm64: dts: qcom: qcs8300: Add support for clock controllers arm64: dts: qcom: sm8450: Add coresight nodes arm64: dts: qcom: sa8775p: Fix the size of 'addr_space' regions arm64: dts: qcom: qcs615-ride: Enable UFS node arm64: dts: qcom: qcs615: add UFS node arm64: dts: qcom: ipq5424: Add USB controller and phy nodes ... Link: https://lore.kernel.org/r/20250111181025.394631-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit d1181e342bff46837d93ca6534e0c8117856d92d Merge: 29a052209412 e3bab40d5961 Author: Arnd Bergmann Date: Thu Jan 16 15:30:27 2025 +0100 Merge tag 'qcom-arm32-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt Qualcomm Arm32 DeviceTree updates for v6.14 Describe the interconnect paths for PCIe EP controllers on SDX55 and SDX65. Disable USB U1/U2 entry to improve USB stability on the same. * tag 'qcom-arm32-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: sdx55: Disable USB U1/U2 entry ARM: dts: qcom: sdx65: Disable USB U1/U2 entry ARM: dts: qcom: sdx55: Add CPU PCIe EP interconnect path ARM: dts: qcom: sdx65: Add PCIe EP interconnect path Link: https://lore.kernel.org/r/20250111171126.369502-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 29a05220941251cb5939f00dcb30e87a12745f10 Merge: ce4805664b74 ebe82df46fba Author: Arnd Bergmann Date: Thu Jan 16 15:29:03 2025 +0100 Merge tag 'v6.14-rockchip-dts64-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt New boards rk3576-evb1, H96 Max V58 TV Box (rk3588), BigTreeTech CB2 (SoM + baseboard) and Pi2 (SBC), Firefly ITX-3588J (Core-3588J SoM), Orange Pi 5 Max. A interesting case is the Radxa E52C using a soc called rk3582. This is rk3588-variant where some cpu cores are disabled during production and the bootloader needs to read the available cores from efuses and adapt the DT it hands over to the kernel. New supported peripherals are just the naneng combophy + the usb controllers using them on the rk3576 as well as the arm,smmu attached to the PCI controller on rk3588. And finally there are of course a number of board-specific enablements and refinements (MCU on Qnap-TS433, USB3 on NanoPi R6C/R6S and Orange Pi 5+ etc. * tag 'v6.14-rockchip-dts64-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (31 commits) arm64: dts: rockchip: add DTs for Firefly ITX-3588J and its Core-3588J SoM dt-bindings: arm: rockchip: Add Firefly ITX-3588J board arm64: dts: rockchip: Add Orange Pi 5 Max board dt-bindings: arm: rockchip: Add Xunlong Orange Pi 5 Max arm64: dts: rockchip: refactor common rk3588-orangepi-5.dtsi arm64: dts: rockchip: add WLAN to rk3588-evb1 controller arm64: dts: rockchip: increase gmac rx_delay on rk3399-puma arm64: dts: rockchip: Delete redundant RK3328 GMAC stability fixes arm64: dts: rockchip: enable hdmi out audio on wolfvision pf5 arm64: dts: rockchip: fix num-channels property of wolfvision pf5 mic arm64: dts: rockchip: Enable the USB 3.0 port on NanoPi R6C/R6S arm64: dts: rockchip: Add FRAM MB85RS128TY to rk3568-mecsbc arm64: dts: rockchip: Remove unused i2c2 node from rk3568-mecsbc arm64: dts: rockchip: Fix PCIe3 handling for Edgeble-6TOPS Modules arm64: dts: rockchip: Add Radxa E52C dt-bindings: arm: rockchip: Add Radxa E52C arm64: dts: rockchip: Add BigTreeTech CB2 and Pi2 dt-bindings: arm: rockchip: Add BigTreeTech CB2 and Pi2 arm64: dts: rockchip: Enable USB 3.0 ports on orangepi-5-plus arm64: dts: rockchip: Add H96 Max V58 TV Box based on RK3588 SoC ... Link: https://lore.kernel.org/r/2193001.3Lj2Plt8kZ@diego Signed-off-by: Arnd Bergmann commit ce4805664b740c0945c442440692f9b50e964e15 Merge: 73ac18dec25f 5532b8a9ce0e Author: Arnd Bergmann Date: Thu Jan 16 15:20:53 2025 +0100 Merge tag 'ti-k3-dt-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/dt TI K3 device tree updates for v6.14 Generic Fixups/Cleanups: - Remove unused and undocumented "ti,(rx|tx)-fifo-depth" properties for ethernet phy - Clock description added to ICSS-G SoC Specific features and Fixes: - Duplicate GICR reg defines in am62x/am62ax - Mailbox nodes are enabled at board level bringing AM67/j722s/am62p to same behavior as other K3 SoCs. - Introduction of deep-sleep state defines for pinctrl header AM62Ax - Enable ti-sysc for wkup_uart0 AM64: - Switch ICSSG clock to core clock. J7200: - Disable SPI1 loopback default. J784s4: - Clock ID fix for McSPI instances - Use j7200-padconf compatibility for padconf to enable suspend-to-ram support. Board Specific: AM62 - phyboard - hdmi bridge regulator and using 16bit input for hdmi bridge, vcc-supply for i2c eeprom - SK - SoC wakeup using USB1, Add bootph property around cpsw mac syscon node, M4 mailbox node redefinition fixup. - BeaglePlay: Fix ethernet phy reset time AM64 - hummingboard-t: Convert PCIE/USB overlays to independent dts. j7200: - EVM: fix typo in overlay name. j721e: - EVM: overlay for pcie1 endpoint mode. j722s: - EVM: Add mcu_i2c0 support for expansion pins., Add USB0 DFU support, Enable PMIC - AM67a-beagley-ai: Add remote proc nodes j784s4: - AM69-SK/ j784s4-EVM - Mark PMIC regulators with bootph-all property to indicate ones that are needed through boot phases. - AM69-sk: PIC0 Endpoint mode overlay, USB Superspeed mode. * tag 'ti-k3-dt-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: (31 commits) arm64: dts: ti: k3-am62a-wakeup: Configure ti-sysc for wkup_uart0 arm64: dts: ti: k3-j722s-evm: Enable PMIC arm64: dts: ti: k3-am69-sk: Add USB SuperSpeed support arm64: dts: ti: k3-am625-beagleplay: Fix DP83TD510E reset time arm64: dts: ti: k3-am642-hummingboard-t: Convert overlay to board dts arm64: dts: ti: k3-am69-sk: Add overlay for PCIE0 Endpoint Mode arm64: dts: ti: k3-am68-sk-base-board: Add overlay for PCIE1 Endpoint Mode arm64: dts: ti: k3-j721e-evm: Add overlay for PCIE1 Endpoint Mode arm64: dts: ti: Makefile: Fix typo "k3-j7200-evm-pcie1-ep.dtbo" arm64: dts: ti: k3-j7200: Add node to disable loopback connection arm64: dts: ti: k3-j784s4: Use ti,j7200-padconf compatible arm64: dts: ti: k3-am62p-j722s-common-main: Enable USB0 for DFU boot arm64: dts: ti: k3-am62a: Remove duplicate GICR reg arm64: dts: ti: k3-am62: Remove duplicate GICR reg arm64: dts: ti: k3-am67a-beagley-ai: Add remote processor nodes arm64: dts: ti: k3-am62p: Enable Mailbox nodes at the board level arm64: dts: ti: k3-am625-sk: Remove M4 mailbox node redefinition arm64: dts: ti: k3-j722s-evm: Enable support for mcu_i2c0 arm64: dts: ti: k3-am62x-sk-common: Add bootph-all property in cpsw_mac_syscon node arm64: dts: ti: Remove unused and undocumented "ti,(rx|tx)-fifo-depth" properties ... Link: https://lore.kernel.org/r/20250110210812.bdpypzvmg6s6sr5t@itinerary Signed-off-by: Arnd Bergmann commit 1b093633a1381c02854c53baf8657f74a40da3e4 Author: Sayali Lokhande Date: Mon Dec 16 17:54:37 2024 +0800 dt-bindings: ufs: qcom: Add UFS Host Controller for QCS615 Document the Universal Flash Storage(UFS) Host Controller on the Qualcomm QCS615 Platform. Signed-off-by: Sayali Lokhande Reviewed-by: Krzysztof Kozlowski Acked-by: Manivannan Sadhasivam Co-developed-by: Xin Liu Signed-off-by: Xin Liu Link: https://lore.kernel.org/r/20241216095439.531357-2-quic_liuxin@quicinc.com Signed-off-by: Rob Herring (Arm) Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 7376d345d6c06f6836637d7ac2d3507f392be7de Author: Varadarajan Narayanan Date: Mon Nov 18 10:58:38 2024 +0530 dt-bindings: usb: qcom,dwc3: Add IPQ5424 to USB DWC3 bindings Update dt-bindings to add IPQ5424 to USB DWC3 controller list. Acked-by: Conor Dooley Signed-off-by: Varadarajan Narayanan Link: https://lore.kernel.org/r/20241118052839.382431-6-quic_varada@quicinc.com Signed-off-by: Rob Herring (Arm) Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 1 + 1 file changed, 1 insertion(+) commit 73ac18dec25f120e7e570f46d83a0d63d2475fb2 Merge: 664b7a5f8bb3 b615fbd70fce Author: Arnd Bergmann Date: Thu Jan 16 15:16:40 2025 +0100 Merge tag 'tegra-for-6.14-arm64-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/dt arm64: tegra: Device tree fixes for v6.14-rc1 These patches fix up an issue with the DMA support on one of the SPI controllers, as well as properly identify the SCE fabric and disable it to prevent accessing registers that may not be accessible to the CPU. Finally, the GIC's #address-cells property is set to 0 to fix a problem in the PCIe interrupt-map property. * tag 'tegra-for-6.14-arm64-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Fix Tegra234 PCIe interrupt-map arm64: tegra: Disable Tegra234 sce-fabric node arm64: tegra: Fix typo in Tegra234 dce-fabric compatible arm64: tegra: Fix DMA ID for SPI2 Link: https://lore.kernel.org/r/20250110185355.4143505-3-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 664b7a5f8bb3cc0dd3531a2b032a3f89980f525a Merge: ab6efed7ec87 cec785a7f25d Author: Arnd Bergmann Date: Thu Jan 16 15:15:44 2025 +0100 Merge tag 'tegra-for-6.14-arm-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/dt ARM: tegra: Device tree fixes for v6.14-rc1 This contains a fix that makes sure the power to the USB ports is maintained during boot. This helps with booting from USB storage. * tag 'tegra-for-6.14-arm-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: nyan: Maintain power to USB ports on boot Link: https://lore.kernel.org/r/20250110185355.4143505-2-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit ab6efed7ec87ec677927158ed80a58f1addedee6 Merge: 14d773bb96e2 f5ce990af7cf Author: Arnd Bergmann Date: Thu Jan 16 15:10:03 2025 +0100 Merge tag 'arm-soc/for-6.14/devicetree-arm64' of https://github.com/Broadcom/stblinux into soc/dt This pull request contains Broadcom ARM64-based SoCs Device Tree updates for 6.14: - Dave adds the display pipeline DT nodes on BCM2712 (Raspberry Pi 5) - Rob removes some undocumented properties - Same ensures that the CFE stub area is reserved to allow secondary CPUs to be successfully brought up in Linux, also making sure that the address used in the spin table is also carved out. Finally he adds support for the Zyxel EX3510-B router using BCM4906 - Rosen converts the BCM4908 platforms to use the more flexible nvmem-layout representation * tag 'arm-soc/for-6.14/devicetree-arm64' of https://github.com/Broadcom/stblinux: arm64: dts: bcm4908: nvmem-layout conversion arm64: dts: broadcom: bcmbca: bcm4908: Add DT for Zyxel EX3510-B dt-bindings: arm64: bcmbca: Add Zyxel EX3510-B based on BCM4906 arm64: dts: broadcom: bcmbca: bcm4908: Protect cpu-release-addr arm64: dts: broadcom: bcmbca: bcm4908: Reserve CFE stub area arm64: dts: broadcom: Remove unused and undocumented properties arm64: dts: broadcom: Add DT for D-step version of BCM2712 arm64: dts: broadcom: Add display pipeline support to BCM2712 arm64: dts: broadcom: Add firmware clocks and power nodes to Pi5 DT Link: https://lore.kernel.org/r/20250109224756.3632025-2-florian.fainelli@broadcom.com Signed-off-by: Arnd Bergmann commit 14d773bb96e2f04e719efcdaad00e4d21a34a011 Merge: f1a26476649a f167292c8d13 Author: Arnd Bergmann Date: Thu Jan 16 15:06:38 2025 +0100 Merge tag 'arm-soc/for-6.14/devicetree' of https://github.com/Broadcom/stblinux into soc/dt This pull request contains Broadcom ARM-based SoCs Device Tree updates for 6.14, please pull the following: - Rob removes some unused and undocumented properties pertaining to the SPI flash controller on Broadcom boards - Linus adds a number of BCM6846 peripherals: HWRNG, watchdog, GPIO, MDIO, LED controller, DMA and then proceeds with adding support for the GEnexsis XG6846B PON router - Rosen sets the MAC address NVMEM reference on the Meraki MR26 platform * tag 'arm-soc/for-6.14/devicetree' of https://github.com/Broadcom/stblinux: ARM: dts: meraki-mr26: set mac address for gmac0 ARM: dts: broadcom: Add Genexis XG6846B DTS file dt-bindings: arm: bcmbca: Add Genexis XG6846B dt-bindings: vendor-prefixes: Add Genexis ARM: dts: bcm6846: Add ARM PL081 DMA block ARM: dts: bcm6846: Add LED controller ARM: dts: bcm6846: Add MDIO control block ARM: dts: bcm6846: Add GPIO blocks ARM: dts: bcm6846: Enable watchdog ARM: dts: bcm6846: Add iproc rng arm: dts: broadcom: Remove unused and undocumented properties Link: https://lore.kernel.org/r/20250109224756.3632025-1-florian.fainelli@broadcom.com Signed-off-by: Arnd Bergmann commit f1a26476649a7f4446ee0fa22b60c484b572f12f Merge: 36ad66238ea5 deaa14ab6b06 Author: Arnd Bergmann Date: Thu Jan 16 15:02:37 2025 +0100 Merge tag 'at91-dt-6.14-2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/dt Microchip AT91 device tree updates for v6.14 #2 This update includes: - device tree files for the SAMA7D65 SoC and its evaluation board * tag 'at91-dt-6.14-2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: microchip: add support for sama7d65_curiosity board ARM: dts: microchip: add sama7d65 SoC DT Link: https://lore.kernel.org/r/20250109164317.1154613-1-claudiu.beznea@tuxon.dev Signed-off-by: Arnd Bergmann commit 36ad66238ea50c1c288c6c9988daec735d3e1f22 Merge: 9f98a04da87b 8715c91a8365 Author: Arnd Bergmann Date: Thu Jan 16 15:01:58 2025 +0100 Merge tag 'sunxi-dt-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/dt Allwinner Device Tree changes for 6.14 - Add support for DMA engine and audio codec on F1C100s and enable audio codec on Lichee Pi Nano - Add syscon and SRAM nodes for A100 - Enable CPU DVFS for Tanix TX1 - Explicitly configure TCON0 pixel clock parent according to display output used This includes one commit shared with the clock tree dt-bindings: clock: sunxi: Export PLL_VIDEO_2X and PLL_MIPI which adds the macros for the TCON0 pixel clock parents. * tag 'sunxi-dt-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: a64: explicitly assign clock parent for TCON0 dt-bindings: clock: sunxi: Export PLL_VIDEO_2X and PLL_MIPI arm64: dts: allwinner: h313: enable DVFS for Tanix TX1 arm64: dts: allwinner: a100: Add syscon nodes dt-bindings: sram: sunxi-sram: Add A100 compatible ARM: dts: suniv: f1c100s: Activate Audio Codec for Lichee Pi Nano ARM: dts: suniv: f1c100s: Add support for Audio Codec ARM: dts: suniv: f1c100s: Add support for DMA Link: https://lore.kernel.org/r/Z36h2FwUxro8rouO@wens.tw Signed-off-by: Arnd Bergmann commit 9f98a04da87b7715c365d3239f7e2969e29dfc6e Merge: 5c9e59a05b09 90234cf9b37c Author: Arnd Bergmann Date: Thu Jan 16 14:57:23 2025 +0100 Merge tag 'mtk-dts32-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/dt mt7623: fix validation error of ir-receiver * tag 'mtk-dts32-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux: ARM: dts: mediatek: mt7623: fix IR nodename Link: https://lore.kernel.org/r/ea93d0ea-a1a0-4d36-8880-4f05c85f0c1b@gmail.com Signed-off-by: Arnd Bergmann commit 5c9e59a05b09bf3a1dcf9df1866b236d9e0c2dcc Merge: 865f5be3debe 0fb0d3602181 Author: Arnd Bergmann Date: Thu Jan 16 14:49:08 2025 +0100 Merge tag 'mtk-dts64-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/dt MediaTek ARM64 DeviceTree updates for v6.14 This adds a few cleanups, enhances support for upstreamed SoCs and machines, other than adding new ones. In particular, fixes and improvements: - MT8516 gets a few fixes for GICv2, Watchdog and I2C, and support for the Keypad controller; - MT8390 Genio 700 board gets basic audio support; - MT8365 gets an alias for its integrated ethernet controller; - MT8195 gets an important fix for system suspend: all of the machines based on this SoC and its IoT variant can now properly perform PM Suspend to RAM; - MT8188 gets support for its Mali GPU with DVFS and a fix for the OVL Hardware found in the Display Controller using the right compatible strings; - MT8186 Chromebooks can now suspend properly thanks to a fix moving the USB wakeups from XHCI to MTU3 (USB) controller; - MT8183 Chromebooks get a fix for their DMIC microphone and proper support for their second-source touchscreen; - MT7988 SoC and the BananaPi R4 board gets support for Pinctrl, eMMC/SD, Thermal, CPU DVFS, PCI-Express, and peripherals like the RT5190A PMIC, PCA9545 I2C mux, and others; - MT7986 BananaPi R3 board gets support for SATA power socket; And cleanups: - Dropped regulator-compatible property from MediaTek DTs; - Aligned thermal node names with bindings on MT8183 Kukui; - MT6397 PMIC get proper sub-node names, fixing dt validation; - The property enabling Wake-On-Lan feature changed in all of the boards and driver to match the actual meaning of it (mediatek,mac-wol now enables wol on mac instead of phy); - Compatibles for MediaTek PMIC Keypad are added to bindings and can now pass dts validation; ...and the newly added machines are: - MT8188 (Ciri) Lenovo Chromebook Duet - MT8186 (Starmie) ASUS Chromebook Enterprise CM30 - MT8186 (Chinchou) ASUS Chromebook CZ12 and CZ12 Flip * tag 'mtk-dts64-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux: (71 commits) arm64: dts: mediatek: mt8516: add keypad node arm64: dts: mediatek: add per-SoC compatibles for keypad nodes dt-bindings: mediatek,mt6779-keypad: add more compatibles arm64: dts: mediatek: mt8365-evk: Set ethernet alias dts: arm64: mediatek: mt8195: Remove MT8183 compatible for OVL dts: arm64: mediatek: mt8188: Update OVL compatible from MT8183 to MT8195 dt-bindings: display: mediatek: ovl: Modify rules for MT8195/MT8188 dt-bindings: display: mediatek: ovl: Add compatible strings for MT8188 MDP3 dt-bindings: arm: mediatek: Drop MT8192 Chromebook variants that never shipped arm64: dts: mediatek: mt8192: Drop Chromebook variants that never shipped arm64: dts: mediatek: mt7988a-bpi-r4: Add proc-supply for cpus arm64: dts: mediatek: mt7988a-bpi-r4: Add MediaTek MT6682A/RT5190A PMIC arm64: dts: mediatek: mt7988a-bpi-r4: Enable pcie arm64: dts: mediatek: mt7988a-bpi-r4: Enable pwm arm64: dts: mediatek: mt7988a-bpi-r4: Enable ssusb1 on bpi-r4 arm64: dts: mediatek: mt7988a-bpi-r4: Enable t-phy for ssusb1 arm64: dts: mediatek: mt7988a-bpi-r4: Add PCA9545 I2C Mux arm64: dts: mediatek: mt7988a-bpi-r4: Enable I2C controllers arm64: dts: mediatek: mt7988a-bpi-r4: Add default UART stdout arm64: dts: mediatek: mt7988a-bpi-r4: Enable serial0 debug uart ... Link: https://lore.kernel.org/r/20250108100826.32458-1-angelogioacchino.delregno@collabora.com Signed-off-by: Arnd Bergmann commit 865f5be3debe6bd79b0023983faad8a467435640 Merge: 6253c6357a49 dd504db5cd4a Author: Arnd Bergmann Date: Thu Jan 16 14:48:16 2025 +0100 Merge tag 'omap-for-v6.14/dt-signed' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap into soc/dt ARM: dts: ti/omap/dra7: minor updates for v6.14 * tag 'omap-for-v6.14/dt-signed' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap: ARM: dts: ti/omap: omap3-gta04: use proper touchscreen properties ARM: dts: ti: am437x-l4: remove autoidle for UART ARM: dts: ti/omap: gta04: fix pm issues caused by spi module ARM: dts: dra7: Add bus_dma_limit for l4 cfg bus Link: https://lore.kernel.org/r/7hmsg2b42q.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit 6253c6357a49d8ca85416d50ca7bcf49ed80e855 Merge: c50a33557191 f72aada7bee4 Author: Arnd Bergmann Date: Thu Jan 16 14:46:56 2025 +0100 Merge tag 'at91-dt-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/dt Microchip AT91 device tree updates for v6.14 This update includes: - power monitor support for the SAM9X75 Curiosity board (using the PAC1934 device) - fix the VDDSDMMC rail to 3.3V to avoid breaking USB (for SAMA5D27 WLSOM1 EK and SAMA5D29 Curiosity boards) - partial support for the SAMA7D65 SoC - cleanups * tag 'at91-dt-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: microchip: sam9x7: Add address/size to spi-controller nodes ARM: dts: microchip: sam9x60: Add address/size to spi-controller nodes ARM: dts: microchip: sama5d27_wlsom1_ek: Add no-1-8-v property to sdmmc0 node ARM: dts: microchip: sama5d29_curiosity: Add no-1-8-v property to sdmmc0 node ARM: dts: at91: Add sama7d65 pinmux dt-bindings: atmel-sysreg: add sama7d65 RAM and PIT dt-bindings: ARM: at91: Document Microchip SAMA7D65 Curiosity ARM: dts: microchip: sam9x75_curiosity: Add power monitor support ARM: dts: microchip: sam9x7: Move i2c address/size to dtsi Link: https://lore.kernel.org/r/20250107081424.758980-2-claudiu.beznea@tuxon.dev Signed-off-by: Arnd Bergmann commit c50a3355719189c155044fb895971a3c86963735 Merge: 608e9fe27fa3 c357e2295b78 Author: Arnd Bergmann Date: Thu Jan 16 14:45:44 2025 +0100 Merge tag 'renesas-dts-for-v6.14-tag2' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DTS updates for v6.14 (take two) - Add pin control support for the RZ/G3E SoC and the RZ/G3E SMARC Carrier-II EVK development board, - Add Image Signal Processor helper block (FCPVX and VSPX) support for the R-Car V4H SoC, - Describe odd C-PHY wiring on the White Hawk CSI/DSI sub-board, - Miscellaneous fixes and improvements. * tag 'renesas-dts-for-v6.14-tag2' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: white-hawk-csi-dsi: Define CSI-2 data line orders arm64: dts: renesas: r8a779g0: Add VSPX instances arm64: dts: renesas: r8a779g0: Add FCPVX instances arm64: dts: renesas: r9a09g047e57-smarc: Add SCIF pincontrol arm64: dts: renesas: r9a09g047: Add pincontrol node arm64: dts: renesas: r9a09g057h44-rzv2h-evk: Replace RZG2L macros dt-bindings: pinctrl: renesas: Document RZ/G3E SoC dt-bindings: pinctrl: renesas: Add alpha-numerical port support for RZ/V2H Link: https://lore.kernel.org/r/cover.1736180859.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 608e9fe27fa3f7d66d38e123a3307ef9f600bb6f Merge: fa716fe87c85 1ba1964a7f83 Author: Arnd Bergmann Date: Thu Jan 16 14:44:27 2025 +0100 Merge tag 'amlogic-arm64-dt-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/dt Amlogic ARM64 DT changes for v6.13: - remove broadcom wifi compatible from GX reference boards * tag 'amlogic-arm64-dt-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: arm64: dts: meson: remove broadcom wifi compatible from GX reference boards Link: https://lore.kernel.org/r/72d71d3f-99c3-4767-8c80-8fa7a865c846@linaro.org Signed-off-by: Arnd Bergmann commit fa716fe87c850cf81217f417dbaa85470c3ac2fb Merge: 192375416f16 3a4bb8185066 Author: Arnd Bergmann Date: Thu Jan 16 14:44:02 2025 +0100 Merge tag 'amlogic-arm-dt-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/dt Amlogic ARM DT changes for v6.14: - remove size and address cells from USB nodes * tag 'amlogic-arm-dt-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: ARM: dts: amlogic: meson: remove size and address cells from USB nodes Link: https://lore.kernel.org/r/77c645b3-0cdf-49f4-84e9-11c74074b9a8@linaro.org Signed-off-by: Arnd Bergmann commit 192375416f1639c45d4e6737e32bc260a22786bf Merge: 50e859f99d3a 3b6775857d7e Author: Arnd Bergmann Date: Thu Jan 16 14:43:26 2025 +0100 Merge tag 'sti-dt-for-v6.14-round1' of https://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into soc/dt Add and enable MALI400 support for STiH410-b2260 * tag 'sti-dt-for-v6.14-round1' of https://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: ARM: dts: st: enable the MALI gpu on the stih410-b2260 ARM: dts: st: add node for the MALI gpu on stih410.dtsi dt-bindings: gpu: mali-utgard: Add st,stih410-mali compatible Link: https://lore.kernel.org/r/f44cb1f0-4d91-4e25-8b1f-3dd9a7bed62b@foss.st.com Signed-off-by: Arnd Bergmann commit 50e859f99d3a21f6ce16442f715ce83e6ce2cce4 Merge: baba9e1db27c bd38fa3aaace Author: Arnd Bergmann Date: Thu Jan 16 14:41:30 2025 +0100 Merge tag 'imx-dt64-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX arm64 device tree change for 6.14: - Add simple-framebuffer support for imx8mn-bsh-smm-s2/pro board (Dario Binacchi) - Add LVDS compatible string for imx8mm-phg board (Fabio Estevam) - Add P3T1085 temperature sensor support for imx93-9x9-qsb board (Frank Li) - Add support for i.MX8MP based aristainetos3 boards from ABB (Heiko Schocher) - Add PCA9452 system PMIC support for imx93-14x14-evk board (Joy Zou) - Support NXP LVDS to HDMI adapter cards for imx8mp-evk board with DT overlays (Liu Ying) - A couple of changes from Markus Niebel to enable Open Drain for MDIO on imx93-tqma9352 boards - A series from Peng Fan to enable wdog3 fsl,ext-reset-output support for NXP i.MX93 boards - A couple changes from Wei Fang to add NETC support for i.MX95 * tag 'imx-dt64-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: freescale: imx93-9x9-qsb: enable fsl,ext-reset-output for wdog3 arm64: dts: freescale: imx93-14x14-evk: enable fsl,ext-reset-output for wdog3 arm64: dts: freescale: imx93-11x11-evk: enable fsl,ext-reset-output for wdog3 arm64: dts: imx95-19x19-evk: add ENETC 0 support arm64: dts: imx95: add NETC related nodes arm64: dts: imx8mm-phg: Add LVDS compatible string arm64: dts: imx93: add pca9452 support arm64: dts: imx8mn-bsh-smm-s2/pro: add simple-framebuffer arm64: dts: imx93-tqma9352-mba93xxla: enable Open Drain for MDIO arm64: dts: imx93-tqma9352-mba93xxca: enable Open Drain for MDIO arm64: dts: imx93-9x9-qsb: add temp-sensor nxp,p3t1085 arm64: dts: imx8mp-evk: Add NXP LVDS to HDMI adapter cards arm64: dts: imx8mp-skov-revb-mi1010ait-1cp1: Set "media_disp2_pix" clock rate to 70MHz arm64: dts: imx8mp: add aristainetos3 board support arm64: dts: imx8mq-zii-ultra: remove #address-cells of eeprom@a4 arm64: dts: imx: Switch to simple-audio-card,hp-det-gpios Link: https://lore.kernel.org/r/20250105095139.714590-4-shawnguo2@yeah.net Signed-off-by: Arnd Bergmann commit baba9e1db27c3fab0134e194dcd2870b127d151b Merge: e2287e93280b c7418a6e7ac9 Author: Arnd Bergmann Date: Thu Jan 16 14:40:29 2025 +0100 Merge tag 'imx-dt-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX ARM device tree change for 6.14: - Clean up TQMa7x device trees (Alexander Stein) - Correct node name pattern for mdio-gpio devices (Fabio Estevam) - Update deprecated GPIO properties for Generic ASoC Sound Card device (Geert Uytterhoeven) - Set USB dr_mode property to OTG explicitly for imx6qdl-sabresd based boards (Hui Wang) - Update MAINTAINERS entry for DH electronics DHSOM boards (Marek Vasut) - A series from Stefan Kerkmann to add phy-3p0-supply for usb phys * tag 'imx-dt-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx: Use the correct mdio pattern ARM: dts: imx6qdl-sabresd: add dr_mode to usbotg ARM: dts: imx6qdl-apalis: Change to "adi,force-bt656-4" ARM: dts: imx6sx: add phy-3p0-supply to usb phys ARM: dts: imx6sl: add phy-3p0-supply to usb phys ARM: dts: imx6qdl: add phy-3p0-supply to usb phys MAINTAINERS: Update entry for DH electronics DHSOM SoMs and boards ARM: dts: imx7[d]-mba7: add Ethernet PHY IRQ support ARM: dts: imx7-mba7: Remove duplicated power supply ARM: dts: imx7-mba7: Fix SD card vmmc-supply ARM: dts: imx7-mba7: Add 3.3V and 5.0V regulators ARM: dts: imx7-tqma7: add missing vs-supply for LM75A (rev. 01xxx) ARM: dts: imx7-tqma7: Remove superfluous status="okay" property ARM: dts: imx7-mba7: remove LVDS transmitter regulator ARM: dts: imx: Switch to {hp,mic}-det-gpios Link: https://lore.kernel.org/r/20250105095139.714590-3-shawnguo2@yeah.net Signed-off-by: Arnd Bergmann commit e2287e93280b35dda08467ccbcc7bc7815eed762 Merge: e736f2ad326a 9723142eae65 Author: Arnd Bergmann Date: Thu Jan 16 14:40:04 2025 +0100 Merge tag 'imx-bindings-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX dt-bindings change for 6.14: - Add compatibles for i.MX8MP based SoM and carrier from ABB * tag 'imx-bindings-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: fsl: Add ABB SoM and carrier Link: https://lore.kernel.org/r/20250105095139.714590-2-shawnguo2@yeah.net Signed-off-by: Arnd Bergmann commit e736f2ad326ad546eaaceee00d878683b2f3e021 Merge: 596f35f9d3cf 91e8b7cff8e9 Author: Arnd Bergmann Date: Thu Jan 16 14:39:10 2025 +0100 Merge tag 'socfpga_dts_updates_v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into soc/dt SoCFPGA DTS updates for v6.14 - Remove unused and undocumented property "snps,max-mtu" - Add gpio and spi node for Agilex5 - Add VGIC maintenance interrupt for Agilex - Use correct reset name of "stmmaceth-ocp" instead of "ahb" - Drop unused #address-cells/#size-cells in the cyclone5-mcvevk * tag 'socfpga_dts_updates_v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: altera: Remove unused and undocumented "snps,max-mtu" property arm64: dts: socfpga: agilex5: Add gpio0 node and spi dma handshake id arm64: dts: socfpga: agilex: Add VGIC maintenance interrupt arm: dts: socfpga: use reset-name "stmmaceth-ocp" instead of "ahb" ARM: dts: socfpga_cyclone5_mcvevk: Drop unused #address-cells/#size-cells Link: https://lore.kernel.org/r/20250103023012.1268627-1-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit 596f35f9d3cf2aaf334b450efdae133e27317797 Merge: d527a65d1388 4a45f8c502a8 Author: Arnd Bergmann Date: Thu Jan 16 14:38:22 2025 +0100 Merge tag 'hisi-arm64-dt-for-6.14' of https://github.com/hisilicon/linux-hisi into soc/dt ARM64: DT: HiSilicon ARM64 DT updates for v6.14 - Remove "enable-dma" and "bus-id" properties from the spi node on hi6220 * tag 'hisi-arm64-dt-for-6.14' of https://github.com/hisilicon/linux-hisi: arm64: dts: hisilicon: Remove unused and undocumented "enable-dma" and "bus-id" properties Link: https://lore.kernel.org/r/67767DCA.8060902@hisilicon.com Signed-off-by: Arnd Bergmann commit d527a65d1388594efcc327e3b7add34203891d60 Merge: 925477396d3c ba9dfa76ebb0 Author: Arnd Bergmann Date: Thu Jan 16 14:37:20 2025 +0100 Merge tag 'dt-cleanup-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt Minor improvements in ARM DTS for v6.14 1. Marvell: Use un-deprecated hp-det-gpios (no ABI impact expected). 2. SoCFPGA: Drop spidev devices which are not properly described in DTS, but are using some other compatibles. This was part of wider tree effort to fix such incorrect hardware descriptions. Important: Dropping this device node will have user-visible impact: spidev device will not register. * tag 'dt-cleanup-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: ARM: dts: socfpga: remove non-existent DAC from CycloneV devkit ARM: dts: marvell: mmp2-olpc-xo-1-75: Switch to {hp,mic}-det-gpios Link: https://lore.kernel.org/r/20241231132847.135814-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 0e7d523b5f7a23b1dc6ceceb04e31a60e9e3321d Author: Al Viro Date: Wed Jan 15 02:50:02 2025 +0000 ntsync: fix a file reference leak in drivers/misc/ntsync.c struct ntsync_obj contains a reference to struct file and that reference contributes to refcount - ntsync_alloc_obj() grabs it. Normally the object is destroyed (and reference to obj->file dropped) in ntsync_obj_release(). However, in case of ntsync_obj_get_fd() failure the object is destroyed directly by its creator. That case should also drop obj->file; plain kfree(obj) is not enough there - it ends up leaking struct file * reference. Take that logics into a helper (ntsync_free_obj()) and use it in both codepaths that destroy ntsync_obj instances. Fixes: b46271ec40a05 "ntsync: Introduce NTSYNC_IOC_CREATE_SEM" Signed-off-by: Al Viro Reviewed-by: Elizabeth Figura Link: https://lore.kernel.org/r/20250115025002.GA1977892@ZenIV Signed-off-by: Greg Kroah-Hartman drivers/misc/ntsync.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 2217573f4c8797eb5ed764a728f986aa80bd403c Author: Costa Shulyupin Date: Mon Jan 13 10:55:47 2025 +0200 scripts/tags.sh: Don't tag usages of DECLARE_BITMAP For all bitmap declarations like DECLARE_BITMAP(x, y); ctags generates multiple DECLARE_BITMAP tags for each usage because it doesn't expand the DECLARE_BITMAP macro. Configure ctags to skip generating tags for DECLARE_BITMAP in such cases. The #define DECLARE_BITMAP itself and declared bitmaps are tagged correctly. Signed-off-by: Costa Shulyupin Link: https://lore.kernel.org/r/20250113085554.649141-1-costa.shul@redhat.com Signed-off-by: Greg Kroah-Hartman scripts/tags.sh | 1 + 1 file changed, 1 insertion(+) commit 797212a81cdab676d6d0e7726b3bb1bda3fc28c5 Merge: 3fb06981ce68 4cc004716977 Author: Greg Kroah-Hartman Date: Thu Jan 16 14:01:40 2025 +0100 Merge tag 'icc-6.14-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next Pull interconnect changes from Georgi: interconnect changes for 6.14 This pull request contains the interconnect changes for the 6.14-rc1 merge window. It contains one new driver and DT documentation updates for L3 and bandwidth monitors. Driver changes: - New driver for the SM8750 platform - Add DT compatibles for QCS615 BWMON and SM8650 OSM Signed-off-by: Georgi Djakov * tag 'icc-6.14-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc: dt-bindings: interconnect: qcom,msm8998-bwmon: Add SM8750 CPU BWMONs dt-bindings: interconnect: OSM L3: Document sm8650 OSM L3 compatible dt-bindings: interconnect: qcom-bwmon: Document QCS615 bwmon compatibles interconnect: sm8750: Add missing const to static qcom_icc_desc interconnect: qcom: Add interconnect provider driver for SM8750 dt-bindings: interconnect: add interconnect bindings for SM8750 commit dcf6230555dcd0b05e8d2dd5b128dcc4b6fc04ef Author: Frederic Weisbecker Date: Wed Jan 15 00:15:07 2025 +0100 timers/migration: Simplify top level detection on group setup Having a single group on a given level is enough to know this is the top level, because a root has to have at least two children, unless that root is the only group and the children are actual CPUs. Simplify the test in tmigr_setup_groups() accordingly. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250114231507.21672-5-frederic@kernel.org kernel/time/timer_migration.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3fb06981ce68e7ef34cfcd821dd6574e5bc835d8 Merge: a68d3cbfade6 012b8276f08a Author: Greg Kroah-Hartman Date: Thu Jan 16 13:46:08 2025 +0100 Merge tag 'iio-fixes-for-6.13b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Merge from Jonathan: IIO: 2nd set of fixes for the 6.13 cycle. Given timing so late in cycle and that they are all confined to specific drivers, it is fine for these to go upstream early in the 6.14 cycle. hid-sensors - Handle processed attention channel rather than just returning an error. adi,ad3552r - Fix output ranges for ad3541r and ad3542r. - Clear the reset status flag so that we can pick up any resets during operation. adi,ad5791 - Fix a misleading dt binding example where the sense of the interrupt was reversed. adi,ad7606 - Fix some hard coded offsets that should be taking the number of channels on a particular part into account. These were missed due to some racing changes. ams,as73211 - Fix an off by one in optimized path for just reading the colour channels. bosch,bme680 - Fix type of variable passed as pointer, ensuring it works on big endian systems and doesn't expose uninitialized data. * tag 'iio-fixes-for-6.13b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: dac: ad3552r-hs: clear reset status flag iio: dac: ad3552r-common: fix ad3541/2r ranges iio: chemical: bme680: Fix uninitialized variable in __bme680_read_raw() iio: light: as73211: fix channel handling in only-color triggered buffer dt-bindings: iio: dac: ad5791: ldac gpio is active low iio: hid-sensor-prox: Fix invalid read_raw for attention iio: adc: ad7606: Fix hardcoded offset in the ADC channels commit 925477396d3c4e5a2379307ead00b1c55c49b2d1 Merge: 73a2e82123f8 e1daed030b56 Author: Arnd Bergmann Date: Thu Jan 16 13:39:42 2025 +0100 Merge tag 'dt64-cleanup-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt Minor improvements in ARM64 DTS for v6.14 1. Spreadtrum: - Correct few issues pointed out by DT schema around properties and node names. - Move fuel-gauge from DTSI to DTS, because it belongs to the board. - Use undeprecated properties, like battery-detect-gpios, already supported by Linux. 2. Uniphier: Use un-deprecated hp-det-gpios (no ABI impact expected). * tag 'dt64-cleanup-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: arm64: dts: sprd: Fix battery-detect-gpios property arm64: dts: uniphier: Switch to hp-det-gpios arm64: dts: sprd: sc9863a: reorder clocks, clock-names per bindings arm64: dts: sprd: sc9863a: fix in-ports property arm64: dts: sprd: sc2731: move fuel-gauge monitored-battery to device DTS arm64: dts: sprd: sp9860g-1h10: fix factory-internal-resistance-micro-ohms property arm64: dts: sprd: sp9860g-1h10: fix constant-charge-voltage-max-microvolt property Link: https://lore.kernel.org/r/20241231132847.135814-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 9ed145e64f0af9a22e95f79940c540affbd939e2 Author: Dave Penkler Date: Thu Jan 16 12:00:14 2025 +0100 staging: gpib: Fix inadvertent negative shift During the initial checkpatch cleanup, when removing blanks after open parentheses, a minus sign in the argument of a shift operation was deleted by mistake. This transformed a pre-decrement operation into a negation. The result of a negative shift is undefined and a warning was signalled by sparse. Restore the pre-decrement operation. Fixes: 6c52d5e3cde2 ("staging: gpib: Add common include files for GPIB drivers") Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250116110014.15577-1-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/gpib/include/amcc5920.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ee1bb64f7189ddccbd6483373d7f92c6a3b7b2c Author: Tomi Valkeinen Date: Fri Dec 20 09:29:40 2024 +0200 drm: xlnx: zynqmp_dpsub: Fix kernel doc Fix two kernel doc warnings introduced by the recent DP audio patch: - Add a doc line for the new "audio" field - Remove a reference to zynqmp_dpsub.c from zynqmp.rst, as the .c file no longer has structured comments Fixes: 3ec5c1579305 ("drm: xlnx: zynqmp_dpsub: Add DP audio support") Closes: https://lore.kernel.org/all/20241220154208.720d990b@canb.auug.org.au/ Reviewed-by: Vishal Sagar Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20241220-xilinx-dp-audio-doc-fix-v1-1-cc488996e463@ideasonboard.com (cherry picked from commit 96b5d2e807f667320c66f41ddc1c473023a73ab2) Signed-off-by: Maxime Ripard Documentation/gpu/zynqmp.rst | 2 -- drivers/gpu/drm/xlnx/zynqmp_dpsub.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) commit b44e27b4df1a1cd3fd84cf26c82156ed0301575f Merge: 0b21051a4a62 204182edb310 Author: Paolo Abeni Date: Thu Jan 16 12:14:24 2025 +0100 Merge branch 'net-stmmac-rx-performance-improvement' Furong Xu says: ==================== net: stmmac: RX performance improvement This series improves RX performance a lot, ~40% TCP RX throughput boost has been observed with DWXGMAC CORE 3.20a running on Cortex-A65 CPUs: from 2.18 Gbits/sec increased to 3.06 Gbits/sec. ==================== Link: https://patch.msgid.link/cover.1736910454.git.0x1207@gmail.com Signed-off-by: Paolo Abeni commit 204182edb3107f87a40f34affb3de8851e1c5d68 Author: Furong Xu <0x1207@gmail.com> Date: Wed Jan 15 11:27:05 2025 +0800 net: stmmac: Convert prefetch() to net_prefetch() for received frames The size of DMA descriptors is 32 bytes at most. net_prefetch() for received frames, and keep prefetch() for descriptors. This patch brings ~4.8% driver performance improvement in a TCP RX throughput test with iPerf tool on a single isolated Cortex-A65 CPU core, 2.92 Gbits/sec increased to 3.06 Gbits/sec. Suggested-by: Joe Damato Signed-off-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Yanteng Si Reviewed-by: Larysa Zaremba Reviewed-by: Joe Damato Signed-off-by: Paolo Abeni drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2a2931517c9ac482b617d56ca0b961d2f2776366 Author: Furong Xu <0x1207@gmail.com> Date: Wed Jan 15 11:27:04 2025 +0800 net: stmmac: Optimize cache prefetch in RX path Current code prefetches cache lines for the received frame first, and then dma_sync_single_for_cpu() against this frame, this is wrong. Cache prefetch should be triggered after dma_sync_single_for_cpu(). This patch brings ~2.8% driver performance improvement in a TCP RX throughput test with iPerf tool on a single isolated Cortex-A65 CPU core, 2.84 Gbits/sec increased to 2.92 Gbits/sec. Signed-off-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Alexander Lobakin Reviewed-by: Yanteng Si Signed-off-by: Paolo Abeni drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2324c78a75c54b4c49d22bb44fcccf5727ba5ef7 Author: Furong Xu <0x1207@gmail.com> Date: Wed Jan 15 11:27:03 2025 +0800 net: stmmac: Set page_pool_params.max_len to a precise size DMA engine will always write no more than dma_buf_sz bytes of a received frame into a page buffer, the remaining spaces are unused or used by CPU exclusively. Setting page_pool_params.max_len to almost the full size of page(s) helps nothing more, but wastes more CPU cycles on cache maintenance. For a standard MTU of 1500, then dma_buf_sz is assigned to 1536, and this patch brings ~16.9% driver performance improvement in a TCP RX throughput test with iPerf tool on a single isolated Cortex-A65 CPU core, from 2.43 Gbits/sec increased to 2.84 Gbits/sec. Signed-off-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Alexander Lobakin Reviewed-by: Yanteng Si Signed-off-by: Paolo Abeni drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit df542f669307918f054a17878ff6dd1ddbb2fe18 Author: Furong Xu <0x1207@gmail.com> Date: Wed Jan 15 11:27:02 2025 +0800 net: stmmac: Switch to zero-copy in non-XDP RX path Avoid memcpy in non-XDP RX path by marking all allocated SKBs to be recycled in the upper network stack. This patch brings ~11.5% driver performance improvement in a TCP RX throughput test with iPerf tool on a single isolated Cortex-A65 CPU core, from 2.18 Gbits/sec increased to 2.43 Gbits/sec. Signed-off-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Alexander Lobakin Reviewed-by: Larysa Zaremba Reviewed-by: Yanteng Si Signed-off-by: Paolo Abeni drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 26 +++++++++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) commit c859df526b203497227b2b16c9bebcede67221e4 Merge: 4f3b63e8a8a2 3e652eba244c Author: Christian Brauner Date: Wed Jan 15 11:50:29 2025 +0100 Merge patch series "lockref cleanups" Christoph Hellwig says: This series has a bunch of cosmetic cleanups for the lockref code I came up with when reading the code in preparation of adding a new user of it. * patches from https://lore.kernel.org/r/20250115094702.504610-1-hch@lst.de: gfs2: use lockref_init for qd_lockref erofs: use lockref_init for pcl->lockref dcache: use lockref_init for d_lockref lockref: add a lockref_init helper lockref: drop superfluous externs lockref: use bool for false/true returns lockref: improve the lockref_get_not_zero description lockref: remove lockref_put_not_zero Link: https://lore.kernel.org/r/20250115094702.504610-1-hch@lst.de Signed-off-by: Christian Brauner commit 3e652eba244c222b0ba95a3f6fd79315eb020f73 Author: Christoph Hellwig Date: Wed Jan 15 10:46:44 2025 +0100 gfs2: use lockref_init for qd_lockref Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250115094702.504610-9-hch@lst.de Signed-off-by: Christian Brauner fs/gfs2/quota.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6f86f1465b595864d4e4c58179f2ebcc3dbf5b62 Author: Christoph Hellwig Date: Wed Jan 15 10:46:43 2025 +0100 erofs: use lockref_init for pcl->lockref Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250115094702.504610-8-hch@lst.de Reviewed-by: Gao Xiang Signed-off-by: Christian Brauner fs/erofs/zdata.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8c32b87c4f885fab3c9b2378a3f855dbf280fbca Author: Christoph Hellwig Date: Wed Jan 15 10:46:42 2025 +0100 dcache: use lockref_init for d_lockref Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250115094702.504610-7-hch@lst.de Signed-off-by: Christian Brauner fs/dcache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 63440d1c6dd1fc782db905319dbfb4db354e54b9 Author: Christoph Hellwig Date: Wed Jan 15 10:46:41 2025 +0100 lockref: add a lockref_init helper Add a helper to initialize the lockdep, that is initialize the spinlock and set a value. Having to open code them isn't a big deal, but having an initializer feels right for a proper primitive. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250115094702.504610-6-hch@lst.de Signed-off-by: Christian Brauner include/linux/lockref.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 25d8060418b4e83e109b20f3b3931301e254b8f4 Author: Christoph Hellwig Date: Wed Jan 15 10:46:40 2025 +0100 lockref: drop superfluous externs Drop the superfluous externs from the remaining prototypes in lockref.h. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250115094702.504610-5-hch@lst.de Signed-off-by: Christian Brauner include/linux/lockref.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6d2868d5b6fca7534641440efe432cf268bd8e1b Author: Christoph Hellwig Date: Wed Jan 15 10:46:39 2025 +0100 lockref: use bool for false/true returns Replace int used as bool with the actual bool type for return values that can only be true or false. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250115094702.504610-4-hch@lst.de Signed-off-by: Christian Brauner include/linux/lockref.h | 6 +++--- lib/lockref.c | 30 ++++++++++++++---------------- 2 files changed, 17 insertions(+), 19 deletions(-) commit d60f2280a1b5b9a4796f9a13f7fdff1d0b99f718 Author: Christoph Hellwig Date: Wed Jan 15 10:46:38 2025 +0100 lockref: improve the lockref_get_not_zero description lockref_put_return returns exactly -1 and not "an error" when the lockref is dead or locked. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250115094702.504610-3-hch@lst.de Signed-off-by: Christian Brauner lib/lockref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b193fa75efffd90c054d1a7f2b5dbe29a461c14 Author: Christoph Hellwig Date: Wed Jan 15 10:46:37 2025 +0100 lockref: remove lockref_put_not_zero lockref_put_not_zero is not used anywhere, and unless I'm missing something didn't end up being used used at all. Remove it. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250115094702.504610-2-hch@lst.de Signed-off-by: Christian Brauner include/linux/lockref.h | 1 - lib/lockref.c | 28 ---------------------------- 2 files changed, 29 deletions(-) commit 4f3b63e8a8a28e3dcdcf3ff260f57a732a20b92b Author: Sentaro Onizuka Date: Tue Jan 14 00:14:00 2025 +0900 fs: Fix return type of do_mount() from long to int Fix the return type of do_mount() function from long to int to match its ac tual behavior. The function only returns int values, and all callers, inclu ding those in fs/namespace.c and arch/alpha/kernel/osf_sys.c, already treat the return value as int. This change improves type consistency across the filesystem code and aligns the function signature with its existing impleme ntation and usage. Signed-off-by: Sentaro Onizuka Link: https://lore.kernel.org/r/20250113151400.55512-1-sentaro@amazon.com Signed-off-by: Christian Brauner fs/namespace.c | 2 +- include/linux/mount.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 544786361d4b73905b05b9539c2bf401c533f0d6 Author: Marc Zyngier Date: Thu Jan 16 10:27:10 2025 +0000 KVM: arm64: nv: Fix doc header layout for timers Stephen reports that 'make htmldocs' spits out a warning ("Documentation/virt/kvm/devices/vcpu.rst:147: WARNING: Definition list ends without a blank line; unexpected unindent."). Fix it by keeping all the timer attributes on a single line. Reported-by: Stephen Rothwell Signed-off-by: Marc Zyngier Documentation/virt/kvm/devices/vcpu.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 53078a736fbc60e5d3a1e14f4cd4214003815026 Author: Luke D. Jones Date: Sat Jan 11 14:01:53 2025 +1300 HID: hid-asus: Disable OOBE mode on the ProArt P16 The new ASUS ProArt 16" laptop series come with their keyboards stuck in an Out-Of-Box-Experience mode. While in this mode most functions will not work such as LED control or Fn key combos. The correct init sequence is now done to disable this OOBE. This patch addresses only the ProArt series so far and it is unknown if there may be others, in which case a new quirk may be required. Signed-off-by: Luke D. Jones Co-developed-by: Connor Belli Signed-off-by: Connor Belli Tested-by: Jan Schmidt Signed-off-by: Jiri Kosina drivers/hid/hid-asus.c | 26 ++++++++++++++++++++++++++ include/linux/platform_data/x86/asus-wmi.h | 5 +++++ 2 files changed, 31 insertions(+) commit 01b3cb620815fc3feb90ee117d9445a5b608a9f7 Author: Viresh Kumar Date: Thu Jan 16 14:04:43 2025 +0530 rust: device: Use as_char_ptr() to avoid explicit cast Use as_char_ptr() to avoid explicit cast. Suggested-by: Alice Ryhl Signed-off-by: Viresh Kumar Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/a88cd29bf01c8fbafd5c2608357f54ea10f6e492.1737016320.git.viresh.kumar@linaro.org Signed-off-by: Greg Kroah-Hartman rust/kernel/device.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e1cd24af8ff2ad7e26e1711be3d7bd72eef24279 Author: Viresh Kumar Date: Thu Jan 16 10:56:21 2025 +0530 rust: device: Replace CString with CStr in property_present() The property_present() method expects a &CString currently and will work only with heap allocated C strings. In order to make it work with compile-time string constants too, change the argument type to &CStr. Signed-off-by: Viresh Kumar Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/e97dcbe0418cc1053fb4bcfac65cc02a0afcdf78.1737005078.git.viresh.kumar@linaro.org Signed-off-by: Greg Kroah-Hartman rust/kernel/device.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ad8ef3dfceb3c4ed2b02279d4cb9238d377a5278 Author: Christian Mayer Date: Sun Jan 12 11:44:06 2025 +0000 HID: steelseries: remove unnecessary return Remove unnecessary return in a void function. Signed-off-by: Christian Mayer Reviewed-by: Bastien Nocera Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-steelseries.c | 1 - 1 file changed, 1 deletion(-) commit 5d7c74d1057d60cffcd8e314539fce8393c33b03 Author: Christian Mayer Date: Sun Jan 12 11:44:05 2025 +0000 HID: steelseries: export model and manufacturer Export model and manufacturer with the power supply properties. This helps identifing the device in the battery overview. In the case of the Arctis 9 headset, the manufacturer is prefixed twice in the device name. Signed-off-by: Christian Mayer Reviewed-by: Bastien Nocera Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-steelseries.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 27c5438f5d25117d66aac2898bc7fc619c255b68 Author: Christian Mayer Date: Sun Jan 12 11:44:04 2025 +0000 HID: steelseries: export charging state for the SteelSeries Arctis 9 headset The Arctis 9 headset provides the information if the power cable is plugged in and charging via the battery report. This information can be exported. Signed-off-by: Christian Mayer Reviewed-by: Bastien Nocera Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-steelseries.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 6596be621703192f1930e6fe3ef4afe6cb284e72 Author: Christian Mayer Date: Sun Jan 12 11:44:03 2025 +0000 HID: steelseries: add SteelSeries Arctis 9 support Add support for the SteelSeries Arctis 9 headset. This driver will export the battery information like it already does for the Arcits 1 headset. Signed-off-by: Christian Mayer Reviewed-by: Bastien Nocera Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-steelseries.c | 64 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit 65b851a3cdcc851a65970f134811fee20ec6a454 Author: Christian Mayer Date: Sun Jan 12 11:44:02 2025 +0000 HID: steelseries: preparation for adding SteelSeries Arctis 9 support Refactor code and add calls to hid_hw_open/hid_hw_closed in preparation for adding support for the SteelSeries Arctis 9 headset. Signed-off-by: Christian Mayer Reviewed-by: Bastien Nocera Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-steelseries.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit ee10f6fcdb961e810d7b16be1285319c15c78ef6 Author: Christoph Hellwig Date: Thu Jan 16 07:01:42 2025 +0100 xfs: fix buffer lookup vs release race Since commit 298f34224506 ("xfs: lockless buffer lookup") the buffer lookup fastpath is done without a hash-wide lock (then pag_buf_lock, now bc_lock) and only under RCU protection. But this means that nothing serializes lookups against the temporary 0 reference count for buffers that are added to the LRU after dropping the last regular reference, and a concurrent lookup would fail to find them. Fix this by doing all b_hold modifications under b_lock. We're already doing this for release so this "only" ~ doubles the b_lock round trips. We'll later look into the lockref infrastructure to optimize the number of lock round trips again. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 93 ++++++++++++++++++++++++++++-------------------------- fs/xfs/xfs_buf.h | 2 +- fs/xfs/xfs_trace.h | 10 +++--- 3 files changed, 54 insertions(+), 51 deletions(-) commit 07eae0fa67ca4bbb199ad85645e0f9dfaef931cd Author: Christoph Hellwig Date: Thu Jan 16 07:01:41 2025 +0100 xfs: check for dead buffers in xfs_buf_find_insert Commit 32dd4f9c506b ("xfs: remove a superflous hash lookup when inserting new buffers") converted xfs_buf_find_insert to use rhashtable_lookup_get_insert_fast and thus an operation that returns the existing buffer when an insert would duplicate the hash key. But this code path misses the check for a buffer with a reference count of zero, which could lead to reusing an about to be freed buffer. Fix this by using the same atomic_inc_not_zero pattern as xfs_buf_insert. Fixes: 32dd4f9c506b ("xfs: remove a superflous hash lookup when inserting new buffers") Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Cc: stable@vger.kernel.org # v6.0 Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c9da9958ba14d89fdf360872c36dc89f4c70861f Author: Andras Szemzo Date: Fri Jan 10 13:39:13 2025 +0100 dt-bindings: pinctrl: sunxi: add compatible for V853 Add compatible strings for V853 family pinctrl. Signed-off-by: Andras Szemzo Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/20250110123923.270626-3-szemzo.andras@gmail.com Signed-off-by: Linus Walleij .../bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit a4b3990e01df169334ff2695d2fe494eda63a297 Author: Dr. David Alan Gilbert Date: Thu Jan 16 00:59:20 2025 +0000 genirq/generic_chip: Export irq_gc_mask_disable_and_ack_set() The recent conversion of brcmstb_l2_mask_and_ack() to irq_gc_mask_disable_and_ack_set() missed that the driver can be built as a module, but the generic function is not exported. Add the missing export. [ tglx: Converted it to a fix ] Fixes: dd1f17a9faf5 ("irqchip/irq-brcmstb-l2: Replace brcmstb_l2_mask_and_ack() by generic function") Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250116005920.626822-1-linux@treblig.org kernel/irq/generic-chip.c | 1 + 1 file changed, 1 insertion(+) commit 3ec955713d9617059d2fc8f2816d0b95ace72256 Author: Zhongqiu Han Date: Tue Dec 31 23:01:15 2024 +0800 timers: Optimize get_timer_[this_]cpu_base() If a timer is deferrable and NO_HZ_COMMON is enabled, get_timer_cpu_base() and get_timer_this_cpu_base() invoke per_cpu_ptr() and this_cpu_ptr() twice. While this seems to be cheap, get_timer_cpu_base() can be called in a loop in lock_timer_base(). Optimize the functions by updating the base index for deferrable timers and retrieving the actual base pointer once. In both cases the resulting assembly code of those helpers becomes smaller, which results in a ~30% execution time reduction for a lock_timer_base() micro bench mark. Signed-off-by: Zhongqiu Han Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/all/20241231150115.1978342-1-quic_zhonhan@quicinc.com kernel/time/timer.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit aab98e2dbd648510f8f51b83fbf4721206ccae45 Author: Dan Carpenter Date: Wed Jan 15 09:28:35 2025 +0900 ksmbd: fix integer overflows on 32 bit systems On 32bit systems the addition operations in ipc_msg_alloc() can potentially overflow leading to memory corruption. Add bounds checking using KSMBD_IPC_MAX_PAYLOAD to avoid overflow. Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/smb/server/transport_ipc.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit b2d99376c5d61eb60ffdb6c503e4b6c8f9712ddd Author: Namjae Jeon Date: Fri Jan 10 13:37:05 2025 +0900 ksmbd: browse interfaces list on FSCTL_QUERY_INTERFACE_INFO IOCTL ksmbd.mount will give each interfaces list and bind_interfaces_only flags to ksmbd server. Previously, the interfaces list was sent only when bind_interfaces_only was enabled. ksmbd server browse only interfaces list given from ksmbd.conf on FSCTL_QUERY_INTERFACE_INFO IOCTL. Signed-off-by: Namjae Jeon Signed-off-by: Steve French fs/smb/server/ksmbd_netlink.h | 3 +- fs/smb/server/server.h | 1 + fs/smb/server/smb2pdu.c | 4 +++ fs/smb/server/transport_ipc.c | 1 + fs/smb/server/transport_tcp.c | 73 +++++++++++++++++++------------------------ fs/smb/server/transport_tcp.h | 1 + 6 files changed, 41 insertions(+), 42 deletions(-) commit fe4b4188ebc29df1f082e79739a0acd0f5646b7f Author: Dr. David Alan Gilbert Date: Sun Jan 12 15:16:37 2025 +0000 ksmbd: Remove unused functions ksmbd_rpc_rap() was added in 2021 as part of commit 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers") ksmbd_vfs_posix_lock_wait_timeout() was added in 2021 as part of commit f44158485826 ("cifsd: add file operations") both have remained unused. Remove them. Signed-off-by: Dr. David Alan Gilbert Acked-by: Namjae Jeon Signed-off-by: Steve French fs/smb/server/transport_ipc.c | 25 ------------------------- fs/smb/server/transport_ipc.h | 2 -- fs/smb/server/vfs.c | 7 ------- fs/smb/server/vfs.h | 1 - 4 files changed, 35 deletions(-) commit 0b21051a4a6208c721615bb0285a035b416a4383 Merge: 707ec6279dd1 066d49c199a6 Author: Jakub Kicinski Date: Wed Jan 15 19:28:07 2025 -0800 Merge branch 'net-mlx5e-ct-add-support-for-hardware-steering' Tariq Toukan says: ==================== net/mlx5e: CT: Add support for hardware steering This series start with one more HWS patch by Yevgeny, followed by patches that add support for connection tracking in hardware steering mode. It consists of: - patch #2 hooks up the CT ops for the new mode in the right places. - patch #3 moves a function into a common file, so it can be reused. - patch #4 uses the HWS API to implement connection tracking. The main advantage of hardware steering compared to software steering is vastly improved performance when adding/removing/updating rules. Using the T-Rex traffic generator to initiate multi-million UDP flows per second, a kernel running with these patches was able to offload ~600K unique UDP flows per second, a number around ~7x larger than software steering was able to achieve on the same hardware (256-thread AMD EPYC, 512 GB RAM, ConnectX 7 b2b). ==================== Link: https://patch.msgid.link/20250114130646.1937192-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 066d49c199a66f07232fdcbe5b5f5c607e804327 Author: Cosmin Ratiu Date: Tue Jan 14 15:06:46 2025 +0200 net/mlx5e: CT: Offload connections with hardware steering rules This is modeled similar to how software steering works: - a reference-counted matcher is maintained for each combination of nat/no_nat x ipv4/ipv6 x tcp/udp/gre. - adding a rule involves finding+referencing or creating a corresponding matcher, then actually adding a rule. - updating rules is implemented using the bwc_rule update API, which can change a rule's actions without touching the match value. By using a T-Rex traffic generator to initiate multi-million UDP flows per second, a kernel running with these patches on the RX side was able to offload ~600K flows per second, which is about ~7x larger than what software steering could do on the same hardware (256-thread AMD EPYC, 512 GB RAM, ConnectX-7 b2b). Signed-off-by: Cosmin Ratiu Reviewed-by: Jianbo Liu Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250114130646.1937192-5-tariqt@nvidia.com Signed-off-by: Jakub Kicinski .../ethernet/mellanox/mlx5/core/en/tc/ct_fs_hmfs.c | 249 ++++++++++++++++++++- 1 file changed, 247 insertions(+), 2 deletions(-) commit 554f9773fdeef302a7fa92027a8684e53adc4935 Author: Cosmin Ratiu Date: Tue Jan 14 15:06:45 2025 +0200 net/mlx5e: CT: Make mlx5_ct_fs_smfs_ct_validate_flow_rule reusable This function checks whether a flow_rule has the right flow dissector keys and masks used for a connection tracking flow offload. It is currently used locally by the tc_ct smfs module, but is about to be used from another place, so this commit moves it to a better place, renames it to mlx5e_tc_ct_is_valid_flow_rule and drops the unused fs argument. Signed-off-by: Cosmin Ratiu Reviewed-by: Jianbo Liu Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250114130646.1937192-4-tariqt@nvidia.com Signed-off-by: Jakub Kicinski .../ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c | 75 +--------------------- drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 71 ++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.h | 10 +++ 3 files changed, 82 insertions(+), 74 deletions(-) commit 34eea5b12a109549c5942ba18f076ca5c9c8bc46 Author: Cosmin Ratiu Date: Tue Jan 14 15:06:44 2025 +0200 net/mlx5e: CT: Add initial support for Hardware Steering Connection tracking can offload tuple matches to the NIC either via firmware commands (when the steering mode is dmfs or offload support is disabled due to eswitch being set to legacy) or via software-managed flow steering (smfs). This commit adds stub operations for a third mode, hardware-managed flow steering. This is enabled when both CONFIG_MLX5_TC_CT and CONFIG_MLX5_HW_STEERING are enabled. Signed-off-by: Cosmin Ratiu Reviewed-by: Jianbo Liu Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250114130646.1937192-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/Makefile | 1 + .../net/ethernet/mellanox/mlx5/core/en/tc/ct_fs.h | 10 +++++ .../ethernet/mellanox/mlx5/core/en/tc/ct_fs_hmfs.c | 47 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 17 ++++++-- 4 files changed, 71 insertions(+), 4 deletions(-) commit af02dbfe37400bc456a4b25ba47015d13a2a52c8 Author: Yevgeny Kliteynik Date: Tue Jan 14 15:06:43 2025 +0200 net/mlx5: HWS, rework the check if matcher size can be increased When checking if the matcher size can be increased, check both match and action RTCs. Also, consider the increasing step - check that it won't cause the new matcher size to become unsupported. Additionally, since we're using '+ 1' for action RTC size yet again, define it as macro and use in all the required places. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250114130646.1937192-2-tariqt@nvidia.com Signed-off-by: Jakub Kicinski .../net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c | 18 ++++++++++++++++-- .../ethernet/mellanox/mlx5/core/steering/hws/matcher.c | 6 ++++-- .../ethernet/mellanox/mlx5/core/steering/hws/matcher.h | 5 +++++ 3 files changed, 25 insertions(+), 4 deletions(-) commit 707ec6279dd12b785677976c045e0b9896ca1f2e Merge: bc1e64d5403d 83419b61d187 Author: Jakub Kicinski Date: Wed Jan 15 19:17:07 2025 -0800 Merge branch 'net-reduce-rtnl-pressure-in-unregister_netdevice' Eric Dumazet says: ==================== net: reduce RTNL pressure in unregister_netdevice() One major source of RTNL contention resides in unregister_netdevice() Due to RCU protection of various network structures, and unregister_netdevice() being a synchronous function, it is calling potentially slow functions while holding RTNL. I think we can release RTNL in two points, so that three slow functions are called while RTNL can be used by other threads. v1: https://lore.kernel.org/netdev/20250107130906.098fc8d6@kernel.org/T/#m398c95f5778e1ff70938e079d3c4c43c050ad2a6 ==================== Link: https://patch.msgid.link/20250114205531.967841-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 83419b61d187ce22aa3da5ffdda850fca3a12600 Author: Eric Dumazet Date: Tue Jan 14 20:55:31 2025 +0000 net: reduce RTNL hold duration in unregister_netdevice_many_notify() (part 2) One synchronize_net() call is currently done while holding RTNL. This is source of RTNL contention in workloads adding and deleting many network namespaces per second, because synchronize_rcu() and synchronize_rcu_expedited() can use 60+ ms in some cases. For cleanup_net() use, temporarily release RTNL while calling the last synchronize_net(). This should be safe, because devices are no longer visible to other threads after unlist_netdevice() call and setting dev->reg_state to NETREG_UNREGISTERING. In any case, the new netdev_lock() / netdev_unlock() infrastructure that we are adding should allow to fix potential issues, with a combination of a per-device mutex and dev->reg_state awareness. Signed-off-by: Eric Dumazet Reviewed-by: Jesse Brandeburg Link: https://patch.msgid.link/20250114205531.967841-6-edumazet@google.com Signed-off-by: Jakub Kicinski net/core/dev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ae646f1a0bb97401bac0044bbe2a179a1e38b408 Author: Eric Dumazet Date: Tue Jan 14 20:55:30 2025 +0000 net: reduce RTNL hold duration in unregister_netdevice_many_notify() (part 1) Two synchronize_net() calls are currently done while holding RTNL. This is source of RTNL contention in workloads adding and deleting many network namespaces per second, because synchronize_rcu() and synchronize_rcu_expedited() can use 60+ ms in some cases. For cleanup_net() use, temporarily release RTNL while calling the last synchronize_net(). This should be safe, because devices are no longer visible to other threads at this point. In any case, the new netdev_lock() / netdev_unlock() infrastructure that we are adding should allow to fix potential issues, with a combination of a per-device mutex and dev->reg_state awareness. Signed-off-by: Eric Dumazet Reviewed-by: Jesse Brandeburg Link: https://patch.msgid.link/20250114205531.967841-5-edumazet@google.com Signed-off-by: Jakub Kicinski net/core/dev.c | 3 +++ 1 file changed, 3 insertions(+) commit cfa579f6665635b72d4a075fc91eb144c2b0f74e Author: Eric Dumazet Date: Tue Jan 14 20:55:29 2025 +0000 net: no longer hold RTNL while calling flush_all_backlogs() flush_all_backlogs() is called from unregister_netdevice_many_notify() as part of netdevice dismantles. This is currently called under RTNL, and can last up to 50 ms on busy hosts. There is no reason to hold RTNL at this stage, if our caller is cleanup_net() : netns are no more visible, devices are in NETREG_UNREGISTERING state and no other thread could mess our state while RTNL is temporarily released. In order to provide isolation, this patch provides a separate 'net_todo_list' for cleanup_net(). Signed-off-by: Eric Dumazet Reviewed-by: Jesse Brandeburg Link: https://patch.msgid.link/20250114205531.967841-4-edumazet@google.com Signed-off-by: Jakub Kicinski net/core/dev.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit 8a2b61e9e87936649073e287242ccdcbfb636906 Author: Eric Dumazet Date: Tue Jan 14 20:55:28 2025 +0000 net: no longer assume RTNL is held in flush_all_backlogs() flush_all_backlogs() uses per-cpu and static data to hold its temporary data, on the assumption it is called under RTNL protection. Following patch in the series will break this assumption. Use instead a dynamically allocated piece of memory. In the unlikely case the allocation fails, use a boot-time allocated memory. Signed-off-by: Eric Dumazet Reviewed-by: Jesse Brandeburg Link: https://patch.msgid.link/20250114205531.967841-3-edumazet@google.com Signed-off-by: Jakub Kicinski net/core/dev.c | 53 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 18 deletions(-) commit 0734d7c3d93cdcb8a56ce914d3c661300f24434d Author: Eric Dumazet Date: Tue Jan 14 20:55:27 2025 +0000 net: expedite synchronize_net() for cleanup_net() cleanup_net() is the single thread responsible for netns dismantles, and a serious bottleneck. Before we can get per-netns RTNL, make sure all synchronize_net() called from this thread are using rcu_synchronize_expedited(). v3: deal with CONFIG_NET_NS=n Signed-off-by: Eric Dumazet Reviewed-by: Jesse Brandeburg Link: https://patch.msgid.link/20250114205531.967841-2-edumazet@google.com Signed-off-by: Jakub Kicinski include/net/net_namespace.h | 2 ++ net/core/dev.c | 11 ++++++++++- net/core/net_namespace.c | 5 +++++ 3 files changed, 17 insertions(+), 1 deletion(-) commit bc1e64d5403d7926a3d79fdbbdf628b69f0939a2 Merge: 0b6f6593aa8c 062e78917222 Author: Jakub Kicinski Date: Wed Jan 15 19:13:36 2025 -0800 Merge branch 'net-use-netdev-lock-to-protect-napi' Jakub Kicinski says: ==================== net: use netdev->lock to protect NAPI We recently added a lock member to struct net_device, with a vague plan to start using it to protect netdev-local state, removing the need to take rtnl_lock for new configuration APIs. Lay some groundwork and use this lock for protecting NAPI APIs. v1: https://lore.kernel.org/20250114035118.110297-1-kuba@kernel.org ==================== Link: https://patch.msgid.link/20250115035319.559603-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 062e789172226f295cab660cb3546a0e478dd19f Author: Jakub Kicinski Date: Tue Jan 14 19:53:19 2025 -0800 netdev-genl: remove rtnl_lock protection from NAPI ops NAPI lifetime, visibility and config are all fully under netdev_lock protection now. Reviewed-by: Joe Damato Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115035319.559603-12-kuba@kernel.org Signed-off-by: Jakub Kicinski net/core/netdev-genl.c | 10 ---------- 1 file changed, 10 deletions(-) commit e7ed2ba757bf86a4f90ae9c4080235fc9c74d8a2 Author: Jakub Kicinski Date: Tue Jan 14 19:53:18 2025 -0800 net: protect NAPI config fields with netdev_lock() Protect the following members of netdev and napi by netdev_lock: - defer_hard_irqs, - gro_flush_timeout, - irq_suspend_timeout. The first two are written via sysfs (which this patch switches to new lock), and netdev genl which holds both netdev and rtnl locks. irq_suspend_timeout is only written by netdev genl. Reviewed-by: Joe Damato Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115035319.559603-11-kuba@kernel.org Signed-off-by: Jakub Kicinski include/linux/netdevice.h | 7 ++++--- net/core/net-sysfs.c | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) commit 53ed30800d3fd36e1e9f7ba8014b150632f714b1 Author: Jakub Kicinski Date: Tue Jan 14 19:53:17 2025 -0800 net: protect napi->irq with netdev_lock() Take netdev_lock() in netif_napi_set_irq(). All NAPI "control fields" are now protected by that lock (most of the other ones are set during napi add/del). The napi_hash_node is fully protected by the hash spin lock, but close enough for the kdoc... Reviewed-by: Joe Damato Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115035319.559603-10-kuba@kernel.org Signed-off-by: Jakub Kicinski include/linux/netdevice.h | 10 +++++++++- net/core/dev.c | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) commit 1bb86cf8f44b1c1a320566558250b1f5121f6fd3 Author: Jakub Kicinski Date: Tue Jan 14 19:53:16 2025 -0800 net: protect threaded status of NAPI with netdev_lock() Now that NAPI instances can't come and go without holding netdev->lock we can trivially switch from rtnl_lock() to netdev_lock() for setting netdev->threaded via sysfs. Note that since we do not lock netdev_lock around sysfs calls in the core we don't have to "trylock" like we do with rtnl_lock. Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115035319.559603-9-kuba@kernel.org Signed-off-by: Jakub Kicinski include/linux/netdevice.h | 13 +++++++++++-- net/core/dev.c | 2 ++ net/core/net-sysfs.c | 34 ++++++++++++++++++++++++++++++++-- 3 files changed, 45 insertions(+), 4 deletions(-) commit eeeec1d4c6930691fc59858799b8a7443d9d30ee Author: Jakub Kicinski Date: Tue Jan 14 19:53:15 2025 -0800 net: make netdev netlink ops hold netdev_lock() In prep for dropping rtnl_lock, start locking netdev->lock in netlink genl ops. We need to be using netdev->up instead of flags & IFF_UP. We can remove the RCU lock protection for the NAPI since NAPI list is protected by netdev->lock already. Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115035319.559603-8-kuba@kernel.org Signed-off-by: Jakub Kicinski net/core/dev.c | 3 ++- net/core/dev.h | 1 - net/core/netdev-genl.c | 46 +++++++++++++++++++++++++--------------------- 3 files changed, 27 insertions(+), 23 deletions(-) commit 413f0271f3966e0c73d4937963f19335af19e628 Author: Jakub Kicinski Date: Tue Jan 14 19:53:14 2025 -0800 net: protect NAPI enablement with netdev_lock() Wrap napi_enable() / napi_disable() with netdev_lock(). Provide the "already locked" flavor of the API. iavf needs the usual adjustment. A number of drivers call napi_enable() under a spin lock, so they have to be modified to take netdev_lock() first, then spin lock then call napi_enable_locked(). Protecting napi_enable() implies that napi->napi_id is protected by netdev_lock(). Acked-by: Francois Romieu # via-velocity Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115035319.559603-7-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/amd/pcnet32.c | 11 ++++++-- drivers/net/ethernet/intel/iavf/iavf_main.c | 4 +-- drivers/net/ethernet/marvell/mvneta.c | 5 +++- drivers/net/ethernet/via/via-velocity.c | 6 +++-- include/linux/netdevice.h | 11 +++----- net/core/dev.c | 41 ++++++++++++++++++++++++----- 6 files changed, 56 insertions(+), 22 deletions(-) commit 1b23cdbd2bbc4b40e21c12ae86c2781e347ff0f8 Author: Jakub Kicinski Date: Tue Jan 14 19:53:13 2025 -0800 net: protect netdev->napi_list with netdev_lock() Hold netdev->lock when NAPIs are getting added or removed. This will allow safe access to NAPI instances of a net_device without rtnl_lock. Create a family of helpers which assume the lock is already taken. Switch iavf to them, as it makes extensive use of netdev->lock, already. Reviewed-by: Joe Damato Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115035319.559603-6-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/iavf/iavf_main.c | 6 ++-- include/linux/netdevice.h | 54 +++++++++++++++++++++++++---- net/core/dev.c | 15 +++++--- 3 files changed, 60 insertions(+), 15 deletions(-) commit 5112457f3d8e41f987908266068af88ef9f3ab78 Author: Jakub Kicinski Date: Tue Jan 14 19:53:12 2025 -0800 net: add netdev->up protected by netdev_lock() Some uAPI (netdev netlink) hide net_device's sub-objects while the interface is down to ensure uniform behavior across drivers. To remove the rtnl_lock dependency from those uAPIs we need a way to safely tell if the device is down or up. Add an indication of whether device is open or closed, protected by netdev->lock. The semantics are the same as IFF_UP, but taking netdev_lock around every write to ->flags would be a lot of code churn. We don't want to blanket the entire open / close path by netdev_lock, because it will prevent us from applying it to specific structures - core helpers won't be able to take that lock from any function called by the drivers on open/close paths. So the state of the flag is "pessimistic", as in it may report false negatives, but never false positives. Reviewed-by: Joe Damato Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115035319.559603-5-kuba@kernel.org Signed-off-by: Jakub Kicinski include/linux/netdevice.h | 14 +++++++++++++- net/core/dev.c | 4 ++-- net/core/dev.h | 12 ++++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) commit 2628f4958cd4a8be2f14b611c67ef9766c5ee564 Author: Jakub Kicinski Date: Tue Jan 14 19:53:11 2025 -0800 net: add helpers for lookup and walking netdevs under netdev_lock() Add helpers for accessing netdevs under netdev_lock(). There's some careful handling needed to find the device and lock it safely, without it getting unregistered, and without taking rtnl_lock (the latter being the whole point of the new locking, after all). Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115035319.559603-4-kuba@kernel.org Signed-off-by: Jakub Kicinski net/core/dev.c | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ net/core/dev.h | 16 +++++++++ 2 files changed, 126 insertions(+) commit 5fda3f35349b6b7f22f5f5095a3821261d515075 Author: Jakub Kicinski Date: Tue Jan 14 19:53:10 2025 -0800 net: make netdev_lock() protect netdev->reg_state Protect writes to netdev->reg_state with netdev_lock(). From now on holding netdev_lock() is sufficient to prevent the net_device from getting unregistered, so code which wants to hold just a single netdev around no longer needs to hold rtnl_lock. We do not protect the NETREG_UNREGISTERED -> NETREG_RELEASED transition. We'd need to move mutex_destroy(netdev->lock) to .release, but the real reason is that trying to stop the unregistration process mid-way would be unsafe / crazy. Taking references on such devices is not safe, either. So the intended semantics are to lock REGISTERED devices. Reviewed-by: Joe Damato Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250115035319.559603-3-kuba@kernel.org Signed-off-by: Jakub Kicinski include/linux/netdevice.h | 2 +- net/core/dev.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit ebda2f0bbde540ff7da168d2837f8cfb14581e2e Author: Jakub Kicinski Date: Tue Jan 14 19:53:09 2025 -0800 net: add netdev_lock() / netdev_unlock() helpers Add helpers for locking the netdev instance, use it in drivers and the shaper code. This will make grepping for the lock usage much easier, as we extend the lock to cover more fields. Reviewed-by: Joe Damato Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/20250115035319.559603-2-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/iavf/iavf_main.c | 74 ++++++++++++++--------------- drivers/net/netdevsim/ethtool.c | 4 +- include/linux/netdevice.h | 23 ++++++++- net/shaper/shaper.c | 6 +-- 4 files changed, 63 insertions(+), 44 deletions(-) commit 0b6f6593aa8c3a05f155c12fd0e7ad33a5149c31 Author: Maciej S. Szmigiero Date: Thu Jan 9 00:33:50 2025 +0100 net: wwan: iosm: Fix hibernation by re-binding the driver around it Currently, the driver is seriously broken with respect to the hibernation (S4): after image restore the device is back into IPC_MEM_EXEC_STAGE_BOOT (which AFAIK means bootloader stage) and needs full re-launch of the rest of its firmware, but the driver restore handler treats the device as merely sleeping and just sends it a wake-up command. This wake-up command times out but device nodes (/dev/wwan*) remain accessible. However attempting to use them causes the bootloader to crash and enter IPC_MEM_EXEC_STAGE_CD_READY stage (which apparently means "a crash dump is ready"). It seems that the device cannot be re-initialized from this crashed stage without toggling some reset pin (on my test platform that's apparently what the device _RST ACPI method does). While it would theoretically be possible to rewrite the driver to tear down the whole MUX / IPC layers on hibernation (so the bootloader does not crash from improper access) and then re-launch the device on restore this would require significant refactoring of the driver (believe me, I've tried), since there are quite a few assumptions hard-coded in the driver about the device never being partially de-initialized (like channels other than devlink cannot be closed, for example). Probably this would also need some programming guide for this hardware. Considering that the driver seems orphaned [1] and other people are hitting this issue too [2] fix it by simply unbinding the PCI driver before hibernation and re-binding it after restore, much like USB_QUIRK_RESET_RESUME does for USB devices that exhibit a similar problem. Tested on XMM7360 in HP EliteBook 855 G7 both with s2idle (which uses the existing suspend / resume handlers) and S4 (which uses the new code). [1]: https://lore.kernel.org/all/c248f0b4-2114-4c61-905f-466a786bdebb@leemhuis.info/ [2]: https://github.com/xmm7360/xmm7360-pci/issues/211#issuecomment-1804139413 Reviewed-by: Sergey Ryazanov Signed-off-by: Maciej S. Szmigiero Link: https://patch.msgid.link/e60287ebdb0ab54c4075071b72568a40a75d0205.1736372610.git.mail@maciej.szmigiero.name Signed-off-by: Jakub Kicinski drivers/net/wwan/iosm/iosm_ipc_pcie.c | 56 ++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) commit 1da742e39b0e0ccd966f28f4e2cdb476fb484982 Merge: 3440fa34ad99 914639464b76 Author: Jakub Kicinski Date: Wed Jan 15 17:38:04 2025 -0800 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-01-08 (ice) This series contains updates to ice driver only. Przemek reworks implementation so that ice_init_hw() is called before ice_adapter initialization. The motivation is to have ability to act on the number of PFs in ice_adapter initialization. This is not done here but the code is also a bit cleaner. Michal adds priority to be considered when matching recipes for proper differentiation. Konrad adds devlink health reporting for firmware generated events. R Sundar utilizes string helpers over open coded versions. Jake adds implementation to utilize a lower latency interface to program PHY timer when supported. Additional information can be found on the original cover letter: https://lore.kernel.org/intel-wired-lan/20241216145453.333745-1-anton.nadezhdin@intel.com/ Karol adds and allows for different PTP delay values to be used per pin. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: Add in/out PTP pin delays ice: implement low latency PHY timer updates ice: check low latency PHY timer update firmware capability ice: add lock to protect low latency interface ice: rename TS_LL_READ* macros to REG_LL_PROXY_H_* ice: use read_poll_timeout_atomic in ice_read_phy_tstamp_ll_e810 ice: use string choice helpers ice: add fw and port health reporters ice: add recipe priority check in search ice: ice_probe: init ice_adapter after HW init ice: minor: rename goto labels from err to unroll ice: split ice_init_hw() out from ice_init_dev() ice: c827: move wait for FW to ice_init_hw() ==================== Link: https://patch.msgid.link/20250115000844.714530-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 65b3516dbe50f91d9feff77903c3d6e0d5d22f8b Author: Dario Binacchi Date: Tue Jan 14 19:19:49 2025 +0100 clk: stm32f4: support spread spectrum clock generation Support spread spectrum clock generation for the main PLL, the only one for which this functionality is available. Tested on the STM32F469I-DISCO board. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20250114182021.670435-5-dario.binacchi@amarulasolutions.com Signed-off-by: Stephen Boyd drivers/clk/clk-stm32f4.c | 143 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 140 insertions(+), 3 deletions(-) commit a1328374d81b20700909f3dfcd337b13702568d8 Author: Dario Binacchi Date: Tue Jan 14 19:19:48 2025 +0100 clk: stm32f4: use FIELD helpers to access the PLLCFGR fields Use GENMASK() along with FIELD_GET() and FIELD_PREP() helpers to access the PLLCFGR fields instead of manually masking and shifting. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20250114182021.670435-4-dario.binacchi@amarulasolutions.com Signed-off-by: Stephen Boyd drivers/clk/clk-stm32f4.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 223d32eb1001dabdb3fc278683361f61cd78b0e2 Author: Dario Binacchi Date: Tue Jan 14 19:19:47 2025 +0100 dt-bindings: clock: st,stm32-rcc: support spread spectrum clocking The addition of DT bindings for enabling and tuning spread spectrum clocking generation is available only for the main PLL of stm32f{4,7} platforms. Signed-off-by: Dario Binacchi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250114182021.670435-3-dario.binacchi@amarulasolutions.com Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/st,stm32-rcc.yaml | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit ebca39700f343c42fe37d9606980e8591801c46f Author: Dario Binacchi Date: Tue Jan 14 19:19:46 2025 +0100 dt-bindings: clock: convert stm32 rcc bindings to json-schema The patch converts st,stm32-rcc.txt to the JSON schema, but it does more than that. The old bindings, in fact, only covered the stm32f{4,7} platforms and not the stm32h7. Therefore, to avoid patch submission tests failing, it was necessary to add the corresponding compatible (i. e. st,stm32h743-rcc) and specify that, in this case, 3 are the clocks instead of the 2 required for the stm32f{4,7} platforms. Additionally, the old bindings made no mention of the st,syscfg property, which is used by both the stm32f{4,7} and the stm32h7 platforms. The patch also fixes the files referencing to the old st,stm32-rcc.txt. Signed-off-by: Dario Binacchi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250114182021.670435-2-dario.binacchi@amarulasolutions.com Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/st,stm32-rcc.txt | 138 --------------------- .../devicetree/bindings/clock/st,stm32-rcc.yaml | 108 ++++++++++++++++ .../devicetree/bindings/reset/st,stm32-rcc.txt | 2 +- include/dt-bindings/clock/stm32fx-clock.h | 2 +- 4 files changed, 110 insertions(+), 140 deletions(-) commit 3440fa34ad99d471f1085bc2f4dedeaebc310261 Author: Eric Dumazet Date: Tue Jan 14 22:10:49 2025 +0000 inet: ipmr: fix data-races Following fields of 'struct mr_mfc' can be updated concurrently (no lock protection) from ip_mr_forward() and ip6_mr_forward() - bytes - pkt - wrong_if - lastuse They also can be read from other functions. Convert bytes, pkt and wrong_if to atomic_long_t, and use READ_ONCE()/WRITE_ONCE() for lastuse. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Link: https://patch.msgid.link/20250114221049.1190631-1-edumazet@google.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | 8 +++---- include/linux/mroute_base.h | 6 ++--- net/ipv4/ipmr.c | 28 +++++++++++------------ net/ipv4/ipmr_base.c | 6 ++--- net/ipv6/ip6mr.c | 28 +++++++++++------------ 5 files changed, 38 insertions(+), 38 deletions(-) commit 3d9a9e9a77c5ebecda43b514f2b9659644b904d0 Author: Ming Lei Date: Wed Jan 15 17:26:48 2025 +0800 block: limit disk max sectors to (LLONG_MAX >> 9) Kernel `loff_t` is defined as `long long int`, so we can't support disk which size is > LLONG_MAX. There are many virtual block drivers, and hardware may report bad capacity too, so limit max sectors to (LLONG_MAX >> 9) for avoiding potential trouble. Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20250115092648.1104452-1-ming.lei@redhat.com Signed-off-by: Jens Axboe block/blk.h | 2 ++ block/genhd.c | 10 ++++++++++ 2 files changed, 12 insertions(+) commit bf38a2f766f8a4a7259d8b1debfe7ef082a3b2c9 Merge: 2248c05340a6 cfd70e3eba2b Author: Jakub Kicinski Date: Wed Jan 15 14:42:14 2025 -0800 Merge branch 'bnxt_en-implement-tcp-data-split-and-thresh-option' Taehee Yoo says: ==================== bnxt_en: implement tcp-data-split and thresh option This series implements hds-thresh ethtool command. This series also implements backend of tcp-data-split and hds-thresh ethtool command for bnxt_en driver. These ethtool commands are mandatory options for device memory TCP. NICs that use the bnxt_en driver support tcp-data-split feature named HDS(header-data-split). But there is no implementation for the HDS to enable by ethtool. Only getting the current HDS status is implemented and the HDS is just automatically enabled only when either LRO, HW-GRO, or JUMBO is enabled. The hds_threshold follows the rx-copybreak value but it wasn't changeable. Currently, bnxt_en driver enables tcp-data-split by default but not always work. There is hds_threshold value, which indicates that a packet size is larger than this value, a packet will be split into header and data. hds_threshold value has been 256, which is a default value of rx-copybreak value too. The rx-copybreak value hasn't been allowed to change so the hds_threshold too. This patchset decouples hds_threshold and rx-copybreak first. and make tcp-data-split, rx-copybreak, and hds-thresh configurable independently. But the default configuration is the same. The default value of rx-copybreak is 256 and default hds-thresh is also 256. The behavior of rx-copybreak will probably be changed in almost all drivers. If HDS is not enabled, rx-copybreak copies both header and payload from a page. But if HDS is enabled, rx-copybreak copies only header from the first page. Due to this change, it may need to disable(set to 0) rx-copybreak when the HDS is required. There are several related options. TPA(HW-GRO, LRO), JUMBO, jumbo_thresh(firmware command), and Aggregation Ring. The aggregation ring is fundamental to these all features. When gro/lro/jumbo packets are received, NIC receives the first packet from the normal ring. follow packets come from the aggregation ring. These features are working regardless of HDS. If HDS is enabled, the first packet contains the header only, and the following packets contain only payload. So, HW-GRO/LRO is working regardless of HDS. There is another threshold value, which is jumbo_thresh. This is very similar to hds_thresh, but jumbo thresh doesn't split header and data. It just split the first and following data based on length. When NIC receives 1500 sized packet, and jumbo_thresh is 256(default, but follows rx-copybreak), the first data is 256 and the following packet size is 1500-256. Before this patch, at least if one of GRO, LRO, and JUMBO flags is enabled, the Aggregation ring will be enabled. If the Aggregation ring is enabled, both hds_threshold and jumbo_thresh are set to the default value of rx-copybreak. So, GRO, LRO, JUMBO frames, they larger than 256 bytes, they will be split into header and data if the protocol is TCP or UDP. for the other protocol, jumbo_thresh works instead of hds_thresh. This means that tcp-data-split relies on the GRO, LRO, and JUMBO flags. But by this patch, tcp-data-split no longer relies on these flags. If the tcp-data-split is enabled, the Aggregation ring will be enabled. Also, hds_threshold no longer follows rx-copybreak value, it will be set to the hds-thresh value by user-space, but the default value is still 256. If the protocol is TCP or UDP and the HDS is disabled and Aggregation ring is enabled, a packet will be split into several pieces due to jumbo_thresh. When single buffer XDP is attached, tcp-data-split is automatically disabled. LRO, GRO, and JUMBO are tested with BCM57414, BCM57504 and the firmware version is 230.0.157.0. I couldn't find any specification about minimum and maximum value of hds_threshold, but from my test result, it was about 0 ~ 1023. It means, over 1023 sized packets will be split into header and data if tcp-data-split is enabled regardless of hds_treshold value. When hds_threshold is 1500 and received packet size is 1400, HDS should not be activated, but it is activated. The maximum value of hds-thresh value is 256 because it has been working. It was decided very conservatively. I checked out the tcp-data-split(HDS) works independently of GRO, LRO, JUMBO. Also, I checked out tcp-data-split should be disabled automatically when XDP is attached and disallowed to enable it again while XDP is attached. I tested ranged values from min to max for hds-thresh and rx-copybreak, and it works. hds-thresh from 0 to 256, and rx-copybreak 0 to 256. When testing this patchset, I checked skb->data, skb->data_len, and nr_frags values. By this patchset, bnxt_en driver supports a force enable tcp-data-split, but it doesn't support for disable tcp-data-split. When tcp-data-split is explicitly enabled, HDS works always. When tcp-data-split is unknown, it depends on the current configuration of LRO/GRO/JUMBO. 1/10 patch adds a new hds_config member in the ethtool_netdev_state. It indicates that what tcp-data-split value is really updated from userspace. So the driver can distinguish a passed tcp-data-split value is came from user or driver itself. 2/10 patch adds hds-thresh command in the ethtool. This threshold value indicates if a received packet size is larger than this threshold, the packet's header and payload will be split. Example: # ethtool -G hds-thresh This option can not be used when tcp-data-split is disabled or not supported. # ethtool -G enp14s0f0np0 tcp-data-split on hds-thresh 256 # ethtool -g enp14s0f0np0 Ring parameters for enp14s0f0np0: Pre-set maximums: ... Current hardware settings: ... TCP data split: on HDS thresh: 256 3/10, 4/10 add condition checks for devmem and ethtool. If tcp-data-split is disabled or threshold value is not zero, setup of devmem will be failed. Also, tcp-data-split and hds-thresh will not be changed while devmem is running. 5/10 add condition checks for netdev core. It disallows setup single buffer XDP program when tcp-data-split is enabled. 6/10 patch implements .{set, get}_tunable() in the bnxt_en. The bnxt_en driver has been supporting the rx-copybreak feature but is not configurable, Only the default rx-copybreak value has been working. So, it changes the bnxt_en driver to be able to configure the rx-copybreak value. 7/10 patch adds an implementation of tcp-data-split ethtool command. The HDS relies on the Aggregation ring, which is automatically enabled when either LRO, GRO, or large mtu is configured. So, if the Aggregation ring is enabled, HDS is automatically enabled by it. 8/10 patch adds the implementation of hds-thresh logic in the bnxt_en driver. The default value is 256, which used to be the default rx-copybreak value. 9/10 add HDS feature implementation for netdevsim. HDS feature is not common so far. Only a few NICs support this feature. There is no way to test HDS core-API unless we have proper hw NIC. In order to test HDS core-API without hw NIC, netdevsim can be used. It implements HDS control and data plane for netdevsim. 10/10 add selftest for HDS(tcp-data-split and HDS-thresh). The tcp-data-split tests are the same with `ethtool -G tcp-data-split ` HDS-thresh tests are same with `ethtool -G eth0 hds-thresh <0 - MAX>` This series is tested with BCM57504 and netdevsim. ==================== Link: https://patch.msgid.link/20250114142852.3364986-1-ap420073@gmail.com Signed-off-by: Jakub Kicinski commit cfd70e3eba2b68aa230d431e3c6ca0a1566e8d2e Author: Taehee Yoo Date: Tue Jan 14 14:28:52 2025 +0000 selftest: net-drv: hds: add test for HDS feature HDS/HDS-thresh features were updated/implemented. so add some tests for these features. HDS tests are the same with `ethtool -G eth0 tcp-data-split ` but `auto` depends on driver specification. So, it doesn't include `auto` case. HDS-thresh tests are same with `ethtool -G eth0 hds-thresh <0 - MAX>` It includes both 0 and MAX cases. It also includes exceed case, MAX + 1. Signed-off-by: Taehee Yoo Link: https://patch.msgid.link/20250114142852.3364986-11-ap420073@gmail.com Signed-off-by: Jakub Kicinski tools/testing/selftests/drivers/net/Makefile | 1 + tools/testing/selftests/drivers/net/hds.py | 120 +++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) commit f394d07b192b67a895dbed76253ce95dcbb5d17c Author: Taehee Yoo Date: Tue Jan 14 14:28:51 2025 +0000 netdevsim: add HDS feature HDS options(tcp-data-split, hds-thresh) have dependencies between other features like XDP. Basic dependencies are checked in the core API. netdevsim is very useful to check basic dependencies. The default tcp-data-split mode is UNKNOWN but netdevsim driver returns ENABLED when ethtool dumps tcp-data-split mode. The default value of HDS threshold is 0 and the maximum value is 1024. ethtool shows like this. ethtool -g eni1np1 Ring parameters for eni1np1: Pre-set maximums: ... HDS thresh: 1024 Current hardware settings: ... TCP data split: on HDS thresh: 0 ethtool -G eni1np1 tcp-data-split on hds-thresh 1024 ethtool -g eni1np1 Ring parameters for eni1np1: Pre-set maximums: ... HDS thresh: 1024 Current hardware settings: ... TCP data split: on HDS thresh: 1024 Signed-off-by: Taehee Yoo Link: https://patch.msgid.link/20250114142852.3364986-10-ap420073@gmail.com Signed-off-by: Jakub Kicinski drivers/net/netdevsim/ethtool.c | 12 +++++++++++- drivers/net/netdevsim/netdev.c | 9 +++++++++ drivers/net/netdevsim/netdevsim.h | 3 +++ 3 files changed, 23 insertions(+), 1 deletion(-) commit 6b43673a25c3666d42f5524e59aed8a3914924cc Author: Taehee Yoo Date: Tue Jan 14 14:28:50 2025 +0000 bnxt_en: add support for hds-thresh ethtool command The bnxt_en driver has configured the hds_threshold value automatically when TPA is enabled based on the rx-copybreak default value. Now the hds-thresh ethtool command is added, so it adds an implementation of hds-thresh option. Configuration of the hds-thresh is applied only when the tcp-data-split is enabled. The default value of hds-thresh is 256, which is the default value of rx-copybreak, which used to be the hds_thresh value. The maximum hds-thresh is 1023. # Example: # ethtool -G enp14s0f0np0 tcp-data-split on hds-thresh 256 # ethtool -g enp14s0f0np0 Ring parameters for enp14s0f0np0: Pre-set maximums: ... HDS thresh: 1023 Current hardware settings: ... TCP data split: on HDS thresh: 256 Tested-by: Stanislav Fomichev Tested-by: Andy Gospodarek Signed-off-by: Taehee Yoo Reviewed-by: Michael Chan Link: https://patch.msgid.link/20250114142852.3364986-9-ap420073@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 +++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 ++ drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) commit 87c8f8496a05de71dc42f5f2ed2b1ea64ea8b77d Author: Taehee Yoo Date: Tue Jan 14 14:28:49 2025 +0000 bnxt_en: add support for tcp-data-split ethtool command NICs that uses bnxt_en driver supports tcp-data-split feature by the name of HDS(header-data-split). But there is no implementation for the HDS to enable by ethtool. Only getting the current HDS status is implemented and The HDS is just automatically enabled only when either LRO, HW-GRO, or JUMBO is enabled. The hds_threshold follows rx-copybreak value. and it was unchangeable. This implements `ethtool -G tcp-data-split ` command option. The value can be and . The value is and one of LRO/GRO/JUMBO is enabled, HDS is automatically enabled and all LRO/GRO/JUMBO are disabled, HDS is automatically disabled. HDS feature relies on the aggregation ring. So, if HDS is enabled, the bnxt_en driver initializes the aggregation ring. This is the reason why BNXT_FLAG_AGG_RINGS contains HDS condition. Acked-by: Jakub Kicinski Tested-by: Stanislav Fomichev Tested-by: Andy Gospodarek Signed-off-by: Taehee Yoo Reviewed-by: Michael Chan Link: https://patch.msgid.link/20250114142852.3364986-8-ap420073@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 5 +++-- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 20 ++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 4 ++++ 4 files changed, 28 insertions(+), 3 deletions(-) commit 152f4da05aeee62cf04d61daf9789575f1df8f4e Author: Taehee Yoo Date: Tue Jan 14 14:28:48 2025 +0000 bnxt_en: add support for rx-copybreak ethtool command The bnxt_en driver supports rx-copybreak, but it couldn't be set by userspace. Only the default value(256) has worked. This patch makes the bnxt_en driver support following command. `ethtool --set-tunable rx-copybreak ` and `ethtool --get-tunable rx-copybreak`. By this patch, hds_threshol is set to the rx-copybreak value. But it will be set by `ethtool -G eth0 hds-thresh N` in the next patch. Reviewed-by: Jakub Kicinski Reviewed-by: Brett Creeley Tested-by: Stanislav Fomichev Tested-by: Andy Gospodarek Signed-off-by: Taehee Yoo Reviewed-by: Michael Chan Link: https://patch.msgid.link/20250114142852.3364986-7-ap420073@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/bnxt/bnxt.c | 28 ++++++++------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 5 ++- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 44 ++++++++++++++++++++++- 3 files changed, 63 insertions(+), 14 deletions(-) commit 2d46e481a9afc8e6b214f5c78b05374f05b8f62a Author: Taehee Yoo Date: Tue Jan 14 14:28:47 2025 +0000 net: disallow setup single buffer XDP when tcp-data-split is enabled. When a single buffer XDP is attached, NIC should guarantee only single page packets will be received. tcp-data-split feature splits packets into header and payload. single buffer XDP can't handle it properly. So attaching single buffer XDP should be disallowed when tcp-data-split is enabled. Acked-by: Jakub Kicinski Signed-off-by: Taehee Yoo Link: https://patch.msgid.link/20250114142852.3364986-6-ap420073@gmail.com Signed-off-by: Jakub Kicinski net/core/dev.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit e61779015c4a4655b31e2e1fc47a7210be9f53f3 Author: Taehee Yoo Date: Tue Jan 14 14:28:46 2025 +0000 net: ethtool: add ring parameter filtering While the devmem is running, the tcp-data-split and hds-thresh configuration should not be changed. If user tries to change tcp-data-split and threshold value while the devmem is running, it fails and shows extack message. Reviewed-by: Jakub Kicinski Tested-by: Stanislav Fomichev Reviewed-by: Mina Almasry Signed-off-by: Taehee Yoo Link: https://patch.msgid.link/20250114142852.3364986-5-ap420073@gmail.com Signed-off-by: Jakub Kicinski net/ethtool/rings.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit a08a5c9484015a88c937aa0f9eaf3efb2123c3b8 Author: Taehee Yoo Date: Tue Jan 14 14:28:45 2025 +0000 net: devmem: add ring parameter filtering If driver doesn't support ring parameter or tcp-data-split configuration is not sufficient, the devmem should not be set up. Before setup the devmem, tcp-data-split should be ON and hds-thresh value should be 0. Tested-by: Stanislav Fomichev Reviewed-by: Mina Almasry Signed-off-by: Taehee Yoo Link: https://patch.msgid.link/20250114142852.3364986-4-ap420073@gmail.com Signed-off-by: Jakub Kicinski net/core/devmem.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit eec8359f0797ef87c6ef6cbed6de08b02073b833 Author: Taehee Yoo Date: Tue Jan 14 14:28:44 2025 +0000 net: ethtool: add support for configuring hds-thresh The hds-thresh option configures the threshold value of the header-data-split. If a received packet size is larger than this threshold value, a packet will be split into header and payload. The header indicates TCP and UDP header, but it depends on driver spec. The bnxt_en driver supports HDS(Header-Data-Split) configuration at FW level, affecting TCP and UDP too. So, If hds-thresh is set, it affects UDP and TCP packets. Example: # ethtool -G hds-thresh # ethtool -G enp14s0f0np0 tcp-data-split on hds-thresh 256 # ethtool -g enp14s0f0np0 Ring parameters for enp14s0f0np0: Pre-set maximums: ... HDS thresh: 1023 Current hardware settings: ... TCP data split: on HDS thresh: 256 The default/min/max values are not defined in the ethtool so the drivers should define themself. The 0 value means that all TCP/UDP packets' header and payload will be split. Tested-by: Stanislav Fomichev Signed-off-by: Taehee Yoo Link: https://patch.msgid.link/20250114142852.3364986-3-ap420073@gmail.com Signed-off-by: Jakub Kicinski Documentation/netlink/specs/ethtool.yaml | 8 ++++++++ Documentation/networking/ethtool-netlink.rst | 10 +++++++++ include/linux/ethtool.h | 9 +++++++++ include/uapi/linux/ethtool_netlink_generated.h | 2 ++ net/ethtool/netlink.h | 2 +- net/ethtool/rings.c | 28 +++++++++++++++++++++++--- 6 files changed, 55 insertions(+), 4 deletions(-) commit 197258f0ef685ddbd534254dc79f49faa47dc93d Author: Taehee Yoo Date: Tue Jan 14 14:28:43 2025 +0000 net: ethtool: add hds_config member in ethtool_netdev_state When tcp-data-split is UNKNOWN mode, drivers arbitrarily handle it. For example, bnxt_en driver automatically enables if at least one of LRO/GRO/JUMBO is enabled. If tcp-data-split is UNKNOWN and LRO is enabled, a driver returns ENABLES of tcp-data-split, not UNKNOWN. So, `ethtool -g eth0` shows tcp-data-split is enabled. The problem is in the setting situation. In the ethnl_set_rings(), it first calls get_ringparam() to get the current driver's config. At that moment, if driver's tcp-data-split config is UNKNOWN, it returns ENABLE if LRO/GRO/JUMBO is enabled. Then, it sets values from the user and driver's current config to kernel_ethtool_ringparam. Last it calls .set_ringparam(). The driver, especially bnxt_en driver receives ETHTOOL_TCP_DATA_SPLIT_ENABLED. But it can't distinguish whether it is set by the user or just the current config. When user updates ring parameter, the new hds_config value is updated and current hds_config value is stored to old_hdsconfig. Driver's .set_ringparam() callback can distinguish a passed tcp-data-split value is came from user explicitly. If .set_ringparam() is failed, hds_config is rollbacked immediately. Suggested-by: Jakub Kicinski Reviewed-by: Jakub Kicinski Signed-off-by: Taehee Yoo Link: https://patch.msgid.link/20250114142852.3364986-2-ap420073@gmail.com Signed-off-by: Jakub Kicinski include/linux/ethtool.h | 2 ++ include/linux/netdevice.h | 1 + net/core/dev.c | 12 ++++++++++++ net/ethtool/rings.c | 12 ++++++++++++ 4 files changed, 27 insertions(+) commit 2248c05340a6aa449efa4b12fca7ce490f32bda9 Author: Kuniyuki Iwashima Date: Tue Jan 14 17:13:52 2025 +0900 net: loopback: Hold rtnl_net_lock() in blackhole_netdev_init(). blackhole_netdev is the global device in init_net. Let's hold rtnl_net_lock(&init_net) in blackhole_netdev_init(). While at it, the unnecessary dev_net_set() call is removed, which is done in alloc_netdev_mqs(). Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250114081352.47404-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski drivers/net/loopback.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7a649f39dab77b494b2b2dd38153d0ba7b037c4b Author: Alessandro Zanni Date: Tue Jan 14 01:33:16 2025 +0100 selftests/net/forwarding: teamd command not found Running "make kselftest TARGETS=net/forwarding" results in multiple ccurrences of the same error: - ./lib.sh: line 787: teamd: command not found This patch adds the variable $REQUIRE_TEAMD in every test that uses the command teamd and checks the $REQUIRE_TEAMD variable in the file "lib.sh" to skip the test if the command is not installed. Signed-off-by: Alessandro Zanni Link: https://patch.msgid.link/20250114003323.97207-1-alessandro.zanni87@gmail.com Signed-off-by: Jakub Kicinski tools/testing/selftests/drivers/net/mlxsw/rif_bridge.sh | 1 + tools/testing/selftests/drivers/net/mlxsw/rif_lag.sh | 1 + tools/testing/selftests/drivers/net/mlxsw/rif_lag_vlan.sh | 1 + tools/testing/selftests/net/forwarding/lib.sh | 4 ++++ tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q_lag.sh | 1 + tools/testing/selftests/net/forwarding/mirror_gre_lag_lacp.sh | 1 + tools/testing/selftests/net/forwarding/router_bridge_1d_lag.sh | 1 + tools/testing/selftests/net/forwarding/router_bridge_lag.sh | 1 + 8 files changed, 11 insertions(+) commit 2974e66ba0897ad7dccc0de68d493793f161649d Merge: 586b298d59e2 880630734102 Author: Jakub Kicinski Date: Wed Jan 15 14:14:15 2025 -0800 Merge branch 'eth-fbnic-add-hardware-monitoring-support' Sanman Pradhan says: ==================== eth: fbnic: Add hardware monitoring support This patch series adds hardware monitoring support to the fbnic driver. It implements support for reading temperature and voltage sensors via firmware requests, and exposes this data through the HWMON interface. The series is structured as follows: Patch 1: Adds completion infrastructure for firmware requests Patch 2: Implements TSENE sensor message handling Patch 3: Adds HWMON interface support Output: $ ls -l /sys/class/hwmon/hwmon1/ total 0 lrwxrwxrwx 1 root root 0 Sep 10 00:00 device -> ../../../0000:01:00.0 -r--r--r-- 1 root root 4096 Sep 10 00:00 in0_input -r--r--r-- 1 root root 4096 Sep 10 00:00 name lrwxrwxrwx 1 root root 0 Sep 10 00:00 subsystem -> ../../../../../../class/hwmon -r--r--r-- 1 root root 4096 Sep 10 00:00 temp1_input -rw-r--r-- 1 root root 4096 Sep 10 00:00 uevent $ cat /sys/class/hwmon/hwmon1/temp1_input 40480 $ cat /sys/class/hwmon/hwmon1/in0_input 750 ==================== Link: https://patch.msgid.link/20250114000705.2081288-1-sanman.p211993@gmail.com Signed-off-by: Jakub Kicinski commit 880630734102ba74c7a4fbb0f23894f5e30f80a0 Author: Sanman Pradhan Date: Mon Jan 13 16:07:05 2025 -0800 eth: fbnic: Add hardware monitoring support via HWMON interface This patch adds support for hardware monitoring to the fbnic driver, allowing for temperature and voltage sensor data to be exposed to userspace via the HWMON interface. The driver registers a HWMON device and provides callbacks for reading sensor data, enabling system admins to monitor the health and operating conditions of fbnic. Signed-off-by: Sanman Pradhan Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/20250114000705.2081288-4-sanman.p211993@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/meta/fbnic/Makefile | 1 + drivers/net/ethernet/meta/fbnic/fbnic.h | 4 ++ drivers/net/ethernet/meta/fbnic/fbnic_hwmon.c | 81 +++++++++++++++++++++++++++ drivers/net/ethernet/meta/fbnic/fbnic_pci.c | 3 + 4 files changed, 89 insertions(+) commit 89e6f190ae8bbef161fd400f222318b30c75f639 Author: Sanman Pradhan Date: Mon Jan 13 16:07:04 2025 -0800 eth: fbnic: hwmon: Add support for reading temperature and voltage sensors Add support for reading temperature and voltage sensor data from firmware by implementing a new TSENE message type and response parsing. This adds message handler infrastructure to transmit sensor read requests and parse responses. The sensor data will be exposed through the driver's hwmon interface. Signed-off-by: Sanman Pradhan Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/20250114000705.2081288-3-sanman.p211993@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/meta/fbnic/fbnic_fw.c | 89 +++++++++++++++++++++++++++-- drivers/net/ethernet/meta/fbnic/fbnic_fw.h | 15 +++++ drivers/net/ethernet/meta/fbnic/fbnic_mac.c | 72 +++++++++++++++++++++++ drivers/net/ethernet/meta/fbnic/fbnic_mac.h | 7 +++ 4 files changed, 179 insertions(+), 4 deletions(-) commit 378e5cc1c6c6fac10a1b7f16b8d8fe2283a61518 Author: Sanman Pradhan Date: Mon Jan 13 16:07:03 2025 -0800 eth: fbnic: hwmon: Add completion infrastructure for firmware requests Add infrastructure to support firmware request/response handling with completions. Add a completion structure to track message state including message type for matching, completion for waiting for response, and result for error propagation. Use existing spinlock to protect the writes. The data from the various response types will be added to the "union u" by subsequent commits. Signed-off-by: Sanman Pradhan Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/20250114000705.2081288-2-sanman.p211993@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/meta/fbnic/fbnic.h | 1 + drivers/net/ethernet/meta/fbnic/fbnic_fw.c | 79 ++++++++++++++++++++++++++++++ drivers/net/ethernet/meta/fbnic/fbnic_fw.h | 13 +++++ 3 files changed, 93 insertions(+) commit 586b298d59e22f93313bfbfad1d071be660bc9f0 Merge: e80ed9770712 d84ad2c0d80c Author: Jakub Kicinski Date: Wed Jan 15 14:13:36 2025 -0800 Merge branch 'net-lan969x-add-fdma-support' Daniel Machon says: ==================== net: lan969x: add FDMA support == Description: This series is the last of a multi-part series, that prepares and adds support for the new lan969x switch driver. The upstreaming efforts has been split into multiple series: 1) Prepare the Sparx5 driver for lan969x (merged) 2) Add support for lan969x (same basic features as Sparx5 provides excl. FDMA and VCAP, merged). 3) Add lan969x VCAP functionality (merged). 4) Add RGMII support (merged). --> 5) Add FDMA support. == FDMA support: The lan969x switch device uses the same FDMA engine as the Sparx5 switch device, with the same number of channels etc. This means we can utilize the newly added FDMA library, that is already in use by the lan966x and sparx5 drivers. As previous lan969x series, the FDMA implementation will hook into the Sparx5 implementation where possible, however both RX and TX handling will be done differently on lan969x and therefore requires a separate implementation of the RX and TX path. Details are in the commit description of the individual patches == Patch breakdown: Patch #1: Enable FDMA support on lan969x Patch #2: Split start()/stop() functions Patch #3: Activate TX FDMA in start() Patch #4: Ops out a few functions that differ on the two platforms Patch #5: Add FDMA implementation for lan969x v1: https://lore.kernel.org/20250109-sparx5-lan969x-switch-driver-5-v1-0-13d6d8451e63@microchip.com ==================== Link: https://patch.msgid.link/20250113-sparx5-lan969x-switch-driver-5-v2-0-c468f02fd623@microchip.com Signed-off-by: Jakub Kicinski commit d84ad2c0d80c3ee1b7d758e2c07d043fcf32d568 Author: Daniel Machon Date: Mon Jan 13 20:36:09 2025 +0100 net: lan969x: add FDMA implementation The lan969x switch device supports manual frame injection and extraction to and from the switch core, using a number of injection and extraction queues. This technique is currently supported, but delivers poor performance compared to Frame DMA (FDMA). This lan969x implementation of FDMA, hooks into the existing FDMA for Sparx5, but requires its own RX and TX handling, as lan969x does not support the same native cache coherency that Sparx5 does. Effectively, this means that we are going to use the DMA mapping API for mapping and unmapping TX buffers. The RX loop will utilize the page pool API for efficient RX handling. Other than that, the implementation is largely the same, and utilizes the FDMA library for DCB and DB handling. Some numbers: Manual injection/extraction (before this series): // iperf3 -c 1.0.1.1 [ ID] Interval Transfer Bitrate [ 5] 0.00-10.02 sec 345 MBytes 289 Mbits/sec sender [ 5] 0.00-10.06 sec 345 MBytes 288 Mbits/sec receiver FDMA (after this series): // iperf3 -c 1.0.1.1 [ ID] Interval Transfer Bitrate [ 5] 0.00-10.03 sec 1.10 GBytes 940 Mbits/sec sender [ 5] 0.00-10.07 sec 1.10 GBytes 936 Mbits/sec receiver Reviewed-by: Steen Hegelund Signed-off-by: Daniel Machon Link: https://patch.msgid.link/20250113-sparx5-lan969x-switch-driver-5-v2-5-c468f02fd623@microchip.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/sparx5/Kconfig | 1 + drivers/net/ethernet/microchip/sparx5/Makefile | 3 +- .../ethernet/microchip/sparx5/lan969x/lan969x.c | 4 + .../ethernet/microchip/sparx5/lan969x/lan969x.h | 7 + .../microchip/sparx5/lan969x/lan969x_fdma.c | 406 +++++++++++++++++++++ .../net/ethernet/microchip/sparx5/sparx5_fdma.c | 7 +- .../net/ethernet/microchip/sparx5/sparx5_main.h | 21 +- .../net/ethernet/microchip/sparx5/sparx5_packet.c | 6 + 8 files changed, 448 insertions(+), 7 deletions(-) commit 56143c52a342d0333a9b5ba12bc16dd071a1af5b Author: Daniel Machon Date: Mon Jan 13 20:36:08 2025 +0100 net: sparx5: ops out certain FDMA functions We are going to implement the RX and TX paths a bit differently on lan969x and therefore need to introduce new ops for FDMA functions: init, deinit, xmit and poll. Assign the Sparx5 equivalents for these and update the code throughout. Also add a 'struct net_device' argument to the xmit() function, as we will be needing that for lan969x. Reviewed-by: Steen Hegelund Signed-off-by: Daniel Machon Link: https://patch.msgid.link/20250113-sparx5-lan969x-switch-driver-5-v2-4-c468f02fd623@microchip.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c | 8 +++++--- drivers/net/ethernet/microchip/sparx5/sparx5_main.c | 9 +++++++-- drivers/net/ethernet/microchip/sparx5/sparx5_main.h | 9 ++++++++- drivers/net/ethernet/microchip/sparx5/sparx5_packet.c | 5 ++++- 4 files changed, 24 insertions(+), 7 deletions(-) commit cded2e0f1b0de5aa1ebd4bf42c3f1919b7adf6cd Author: Daniel Machon Date: Mon Jan 13 20:36:07 2025 +0100 net: sparx5: activate FDMA tx in start() The function sparx5_fdma_tx_activate() is responsible for configuring the TX FDMA instance and activating the channel. TX activation has previously been done in the xmit() function, when the first frame is transmitted. Now that we have separate functions for starting and stopping the FDMA, it seems reasonable to move the TX activation to the start function. This change has no implications on the functionality. Reviewed-by: Steen Hegelund Signed-off-by: Daniel Machon Link: https://patch.msgid.link/20250113-sparx5-lan969x-switch-driver-5-v2-3-c468f02fd623@microchip.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit b91dcb237c69a05b06d64e2f4ba0a74a0552b80f Author: Daniel Machon Date: Mon Jan 13 20:36:06 2025 +0100 net: sparx5: split sparx5_fdma_{start(),stop()} The two functions: sparx5_fdma_{start(),stop()} are responsible for a number of things, namely: allocation and initialization of FDMA buffers, activation FDMA channels in hardware and activation of the NAPI instance. This patch splits the buffer allocation and initialization into init and deinit functions, and the channel and NAPI activation into start and stop functions. This serves two purposes: 1) the start() and stop() functions can be reused for lan969x and 2) prepares for future MTU change support, where we must be able to stop and start the FDMA channels and NAPI instance, without free'ing and reallocating the FDMA buffers. Reviewed-by: Steen Hegelund Signed-off-by: Daniel Machon Link: https://patch.msgid.link/20250113-sparx5-lan969x-switch-driver-5-v2-2-c468f02fd623@microchip.com Signed-off-by: Jakub Kicinski .../net/ethernet/microchip/sparx5/sparx5_fdma.c | 44 +++++++++++++++++----- .../net/ethernet/microchip/sparx5/sparx5_main.c | 7 +++- .../net/ethernet/microchip/sparx5/sparx5_main.h | 2 + 3 files changed, 41 insertions(+), 12 deletions(-) commit 4a7d78c27806bc9b90560438e6aef22efd6050fd Author: Daniel Machon Date: Mon Jan 13 20:36:05 2025 +0100 net: sparx5: enable FDMA on lan969x In a previous series, we made sure that FDMA was not initialized and started on lan969x. Now that we are going to support it, undo that change. In addition, make sure the chip ID check is only applicable on Sparx5, as this is a check that is only relevant on this platform. Reviewed-by: Steen Hegelund Signed-off-by: Daniel Machon Link: https://patch.msgid.link/20250113-sparx5-lan969x-switch-driver-5-v2-1-c468f02fd623@microchip.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/microchip/sparx5/sparx5_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 87c544108b612512b254c8f79aa5c0a8546e2cc4 Author: Puranjay Mohan Date: Wed Jan 15 10:36:47 2025 +0000 bpf: Send signals asynchronously if !preemptible BPF programs can execute in all kinds of contexts and when a program running in a non-preemptible context uses the bpf_send_signal() kfunc, it will cause issues because this kfunc can sleep. Change `irqs_disabled()` to `!preemptible()`. Reported-by: syzbot+97da3d7e0112d59971de@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/67486b09.050a0220.253251.0084.GAE@google.com/ Fixes: 1bc7896e9ef4 ("bpf: Fix deadlock with rq_lock in bpf_send_signal()") Signed-off-by: Puranjay Mohan Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20250115103647.38487-1-puranjay@kernel.org Signed-off-by: Alexei Starovoitov kernel/trace/bpf_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 260d7c5e5392ac41c94152005d416172ba0a906d Author: Dzmitry Sankouski Date: Wed Jan 8 17:13:49 2025 +0300 power: supply: max17042: add max77705 fuel gauge support Add max77705 fuel gauge support. Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250108-starqltechn_integration_upstream-v14-5-f6e84ec20d96@gmail.com Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 3 +++ 1 file changed, 3 insertions(+) commit 4519e13aef44269b0f8b6694a7adeb13d7d66b14 Author: Dzmitry Sankouski Date: Wed Jan 8 17:13:46 2025 +0300 dt-bindings: power: supply: max17042: add max77705 support Add max77705 fuel gauge support. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250108-starqltechn_integration_upstream-v14-2-f6e84ec20d96@gmail.com Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/power/supply/maxim,max17042.yaml | 1 + 1 file changed, 1 insertion(+) commit df998c22321dde3f70cd3cf8c183dfd6bf64c759 Author: Dzmitry Sankouski Date: Wed Jan 8 17:13:45 2025 +0300 power: supply: add undervoltage health status property Add POWER_SUPPLY_HEALTH_UNDERVOLTAGE status for power supply to report under voltage lockout failures. Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250108-starqltechn_integration_upstream-v14-1-f6e84ec20d96@gmail.com Signed-off-by: Sebastian Reichel Documentation/ABI/testing/sysfs-class-power | 2 +- drivers/power/supply/power_supply_sysfs.c | 1 + include/linux/power_supply.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit d117b196981755a7757849fd4676e029afb43bca Author: Bjorn Helgaas Date: Mon Jan 13 17:15:57 2025 -0600 sparc/PCI: Update reference to devm_of_pci_get_host_bridge_resources() 5bd51b35c7cb ("PCI: Rework of_pci_get_host_bridge_resources() to devm_of_pci_get_host_bridge_resources()") converted and renamed of_pci_get_host_bridge_resources(). Update the comment reference to match. Link: https://lore.kernel.org/r/20250113231557.441289-5-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Acked-by: Andreas Larsson arch/sparc/kernel/pci_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbaa022917fcddad078cdef1f97a2ccdb6ce80de Author: Bjorn Helgaas Date: Mon Jan 13 17:15:56 2025 -0600 PCI: of: Simplify devm_of_pci_get_host_bridge_resources() interface Previously pci_parse_request_of_pci_ranges() supplied the default bus range to devm_of_pci_get_host_bridge_resources(), but that function is static and has no other callers, so there's no reason to complicate its interface by passing the default bus range. Drop the busno and bus_max parameters and use 0x0 and 0xff directly in devm_of_pci_get_host_bridge_resources(). Link: https://lore.kernel.org/r/20250113231557.441289-4-helgaas@kernel.org [bhelgaas: dev_warn() for invalid end of bus-range] Signed-off-by: Bjorn Helgaas drivers/pci/of.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit adda86bf46440105e2459814a1284ea63a2b7032 Author: Bjorn Helgaas Date: Mon Jan 13 17:15:55 2025 -0600 PCI: of: Drop 'No bus range found' message The typical bus range for a host bridge is [bus 00-ff], and devm_of_pci_get_host_bridge_resources() defaults to that unless DT contains a "bus-range" property. devm_of_pci_get_host_bridge_resources() previously emitted a message when there was no "bus-range" property, but that seems unnecessary for this common situation. Remove the message. Link: https://lore.kernel.org/r/20250113231557.441289-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan drivers/pci/of.c | 2 -- 1 file changed, 2 deletions(-) commit ddedc08e80c56e40615c129bdb895ba9868e0ba0 Author: Bjorn Helgaas Date: Mon Jan 13 17:15:54 2025 -0600 PCI: Unexport of_pci_parse_bus_range() of_pci_parse_bus_range() is only used in drivers/pci/of.c, so make it static and unexport it. Link: https://lore.kernel.org/r/20250113231557.441289-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring (Arm) Reviewed-by: Kuppuswamy Sathyanarayanan drivers/pci/of.c | 4 ++-- drivers/pci/pci.h | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) commit e80ed9770712f2b48f923f33c4eaacaa299ce68f Merge: 9eb8069d9940 e432ffc14b17 Author: Jakub Kicinski Date: Wed Jan 15 13:23:32 2025 -0800 Merge branch 'net-phylink-fix-pcs-without-autoneg' Russell King says: ==================== net: phylink: fix PCS without autoneg Eric Woudstra reported that a PCS attached using 2500base-X does not see link when phylink is using in-band mode, but autoneg is disabled, despite there being a valid 2500base-X signal being received. We have these settings: act_link_an_mode = MLO_AN_INBAND pcs_neg_mode = PHYLINK_PCS_NEG_INBAND_DISABLED Eric diagnosed it to phylink_decode_c37_word() setting state->link false because the full-duplex bit isn't set in the non-existent link partner advertisement word (which doesn't exist because in-band autoneg is disabled!) The test in phylink_mii_c22_pcs_decode_state() is supposed to catch this state, but since we converted PCS to use neg_mode, testing the Autoneg in the local advertisement is no longer sufficient - we need to be looking at the neg_mode, which currently isn't provided. We need to provide this via the .pcs_get_state() method, and this will require modifying all PCS implementations to add the extra argument to this method. Patch 1 uses the PCS neg_mode in phylink_mac_pcs_get_state() to correct the now obsolute usage of the Autoneg bit in the advertisement. Patch 2 passes neg_mode into the .pcs_get_state() method, and updates all users. Patch 3 adds neg_mode as an argument to the various clause 22 state decoder functions in phylink, modifying drivers to pass the neg_mode through. Patch 4 makes use of phylink_mii_c22_pcs_decode_state() rather than using the Autoneg bit in the advertising field. Patch 5 may be required for Eric's case - it ensures that we report the correct state for interface types that we support only one set of modes for when autoneg is disabled. ==================== Link: https://patch.msgid.link/Z4TbR93B-X8A8iHe@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit e432ffc14b177f2394dd7dad04eae6d5a83c61e1 Author: Russell King (Oracle) Date: Mon Jan 13 09:22:44 2025 +0000 net: phylink: provide fixed state for 1000base-X and 2500base-X When decoding clause 22 state, if in-band is disabled and using either 1000base-X or 2500base-X, rather than reporting link-down, we know the speed, and we only support full duplex. Pause modes taken from XPCS. This fixes a problem reported by Eric Woudstra. Signed-off-by: Russell King (Oracle) Reviewed-by: Maxime Chevallier Tested-by: Maxime Chevallier Link: https://patch.msgid.link/E1tXGei-000EtL-Fn@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/phy/phylink.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 60a331fff5e80a1f89260e2b1701c22e2ba08daf Author: Russell King (Oracle) Date: Mon Jan 13 09:22:39 2025 +0000 net: phylink: use neg_mode in phylink_mii_c22_pcs_decode_state() Rather than using the state of the Autoneg bit, which is unreliable with the new PCS neg mode support, use the passed neg_mode to decide whether to decode the link partner advertisement data. Signed-off-by: Russell King (Oracle) Reviewed-by: Maxime Chevallier Tested-by: Maxime Chevallier Link: https://patch.msgid.link/E1tXGed-000EtF-CN@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/phy/phylink.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 7e3cb4e874ab0dcf8b10e43e5068824bf0adcb4c Author: Russell King (Oracle) Date: Mon Jan 13 09:22:34 2025 +0000 net: phylink: pass neg_mode into c22 state decoder Pass the current neg_mode into phylink_mii_c22_pcs_get_state() and phylink_mii_c22_pcs_decode_state(). Update all users of phylink PCS that use these functions. Signed-off-by: Russell King (Oracle) Reviewed-by: Maxime Chevallier Tested-by: Maxime Chevallier Link: https://patch.msgid.link/E1tXGeY-000Et9-8g@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/freescale/fman/fman_dtsec.c | 2 +- drivers/net/ethernet/microchip/lan966x/lan966x_main.h | 2 +- drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c | 2 +- drivers/net/ethernet/microchip/lan966x/lan966x_port.c | 4 ++-- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +- drivers/net/pcs/pcs-lynx.c | 2 +- drivers/net/pcs/pcs-mtk-lynxi.c | 3 ++- drivers/net/pcs/pcs-xpcs.c | 5 +++-- drivers/net/phy/phylink.c | 7 +++++-- include/linux/phylink.h | 3 ++- 10 files changed, 19 insertions(+), 13 deletions(-) commit c6739623c91bb3d6e9b20e05afbe69a2664f2d70 Author: Russell King (Oracle) Date: Mon Jan 13 09:22:29 2025 +0000 net: phylink: pass neg_mode into .pcs_get_state() method Pass the current neg_mode into the .pcs_get_state() method. Update all users of phylink PCS. Signed-off-by: Russell King (Oracle) Reviewed-by: Maxime Chevallier Tested-by: Maxime Chevallier Link: https://patch.msgid.link/E1tXGeT-000Et3-4L@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/dsa/b53/b53_serdes.c | 4 ++-- drivers/net/dsa/mt7530.c | 2 +- drivers/net/dsa/mv88e6xxx/pcs-6185.c | 1 + drivers/net/dsa/mv88e6xxx/pcs-6352.c | 1 + drivers/net/dsa/mv88e6xxx/pcs-639x.c | 5 ++++- drivers/net/dsa/qca/qca8k-8xxx.c | 2 +- drivers/net/ethernet/cadence/macb_main.c | 3 ++- drivers/net/ethernet/freescale/fman/fman_dtsec.c | 2 +- drivers/net/ethernet/marvell/mvneta.c | 2 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 ++ drivers/net/ethernet/marvell/prestera/prestera_main.c | 1 + drivers/net/ethernet/meta/fbnic/fbnic_phylink.c | 2 +- drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c | 1 + drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c | 2 +- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 + drivers/net/pcs/pcs-lynx.c | 2 +- drivers/net/pcs/pcs-mtk-lynxi.c | 1 + drivers/net/pcs/pcs-xpcs.c | 2 +- drivers/net/phy/phylink.c | 2 +- include/linux/phylink.h | 8 ++++++-- 20 files changed, 31 insertions(+), 15 deletions(-) commit 0f1396d2465886b47d09b2b136922bb861996d01 Author: Russell King (Oracle) Date: Mon Jan 13 09:22:24 2025 +0000 net: phylink: use pcs_neg_mode in phylink_mac_pcs_get_state() As in-band AN no longer just depends on MLO_AN_INBAND + Autoneg bit, we need to take account of the pcs_neg_mode when deciding how to initialise the speed, duplex and pause state members before calling into the .pcs_neg_mode() method. Add this. Signed-off-by: Russell King (Oracle) Reviewed-by: Maxime Chevallier Tested-by: Maxime Chevallier Link: https://patch.msgid.link/E1tXGeO-000Esx-0r@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/phy/phylink.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 9eb8069d994016f86a596348f558f4ac3be72c5d Merge: 0e6f1c77ba80 540d3f8f1dac Author: Jakub Kicinski Date: Wed Jan 15 13:21:19 2025 -0800 Merge branch 'mptcp-selftests-more-debug-in-case-of-errors' Matthieu Baerts says: ==================== mptcp: selftests: more debug in case of errors Here are just a bunch of small improvements for the MPTCP selftests: Patch 1: Unify errors messages in simult_flows: print MIB and 'ss -Me'. Patch 2: Unify errors messages in sockopt: print MIB. Patch 3: Move common code to print debug info to mptcp_lib.sh. Patch 4: Use 'ss' with '-m' in case of errors. Patch 5: Remove an unused variable. Patch 6: Print only the size instead of size + filename again. ==================== Link: https://patch.msgid.link/20250114-net-next-mptcp-st-more-debug-err-v1-0-2ffb16a6cf35@kernel.org Signed-off-by: Jakub Kicinski commit 540d3f8f1daccde52ed85c9e480586387461eb86 Author: Matthieu Baerts (NGI0) Date: Tue Jan 14 19:03:16 2025 +0100 selftests: mptcp: connect: better display the files size 'du' will print the name of the file, which was already displayed before, e.g. Created /tmp/tmp.UOyy0ghfmQ (size 4703740/tmp/tmp.UOyy0ghfmQ) containing data sent by client Created /tmp/tmp.xq3zvFinGo (size 1391724/tmp/tmp.xq3zvFinGo) containing data sent by server 'stat' can be used instead, to display this instead: Created /tmp/tmp.UOyy0ghfmQ (size 4703740 B) containing data sent by client Created /tmp/tmp.xq3zvFinGo (size 1391724 B) containing data sent by server So easier to spot the file sizes. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250114-net-next-mptcp-st-more-debug-err-v1-6-2ffb16a6cf35@kernel.org Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/mptcp_connect.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b265c5a174237b33e4973bd385f24db39cc76d26 Author: Matthieu Baerts (NGI0) Date: Tue Jan 14 19:03:15 2025 +0100 selftests: mptcp: connect: remove unused variable 'cin_disconnect' is used in run_tests_disconnect(), but not 'cout_disconnect', so it is safe to drop it. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250114-net-next-mptcp-st-more-debug-err-v1-5-2ffb16a6cf35@kernel.org Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/mptcp_connect.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5fbea888f8aa0668761f6a1e9736664b3580cb65 Author: Matthieu Baerts (NGI0) Date: Tue Jan 14 19:03:14 2025 +0100 selftests: mptcp: add -m with ss in case of errors Recently, we had an issue where getting info about the memory would have helped better understanding what went wrong. Let add it just in case for later. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250114-net-next-mptcp-st-more-debug-err-v1-4-2ffb16a6cf35@kernel.org Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/mptcp_lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8c6bb011e18811175e7bd351b82286318496b334 Author: Matthieu Baerts (NGI0) Date: Tue Jan 14 19:03:13 2025 +0100 selftests: mptcp: move stats info in case of errors to lib.sh A few MPTCP selftests are using the same code to print stats in case of error. This code can then be moved to mptcp_lib.sh. No behaviour changes intended, except to print the error in red and to stderr, like most error messages. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250114-net-next-mptcp-st-more-debug-err-v1-3-2ffb16a6cf35@kernel.org Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/mptcp_connect.sh | 8 ++------ tools/testing/selftests/net/mptcp/mptcp_join.sh | 9 ++------- tools/testing/selftests/net/mptcp/mptcp_lib.sh | 21 +++++++++++++++++++++ tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 8 ++------ tools/testing/selftests/net/mptcp/simult_flows.sh | 8 ++------ 5 files changed, 29 insertions(+), 25 deletions(-) commit 3257d4cb8d5c0090a87053f16086ef1e2c32dc33 Author: Geliang Tang Date: Tue Jan 14 19:03:12 2025 +0100 selftests: mptcp: sockopt: save nstat infos Similar to the way nstat information is stored in mptcp_connect.sh and mptcp_join.sh scripts, this patch adds a similar way for mptcp_sockopt.sh and displays the nstat information when errors occur. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250114-net-next-mptcp-st-more-debug-err-v1-2-2ffb16a6cf35@kernel.org Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 894dae026bf6348766cf1951da63af6e36e4d90a Author: Matthieu Baerts (NGI0) Date: Tue Jan 14 19:03:11 2025 +0100 selftests: mptcp: simult_flows: unify errors msgs In order to unify what is printed in case of error, similar to what is done in mptcp_connect.sh and mptcp_join.sh, it is interesting to do the following modifications in simult_flows.sh: - Print the rc errors at the end of the line. - Print the MIB counters. - Use the same ss options: add -M (MPTCP sockets) and -e (detailed socket information). While at it, also print of the 'max' time only in case of success, because 'mptcp_connect.c' will already print this info in case of error, e.g.: transfer slower than expected! runtime 11948 ms, expected 11921 ms Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250114-net-next-mptcp-st-more-debug-err-v1-1-2ffb16a6cf35@kernel.org Signed-off-by: Jakub Kicinski tools/testing/selftests/net/mptcp/simult_flows.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 0e6f1c77ba808e7bf023627ae2927fa813214455 Author: Geliang Tang Date: Tue Jan 14 19:06:22 2025 +0100 mptcp: fix for setting remote ipv4mapped address Commit 1c670b39cec7 ("mptcp: change local addr type of subflow_destroy") introduced a bug in mptcp_pm_nl_subflow_destroy_doit(). ipv6_addr_set_v4mapped() should be called to set the remote ipv4 address 'addr_r.addr.s_addr' to the remote ipv6 address 'addr_r.addr6', not 'addr_l.addr.addr6', which is the local ipv6 address. Fixes: 1c670b39cec7 ("mptcp: change local addr type of subflow_destroy") Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250114-net-next-mptcp-fix-remote-addr-v1-1-debcd84ea86f@kernel.org Signed-off-by: Jakub Kicinski net/mptcp/pm_userspace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c80bed9812f249dd282dce8bc6a2ce9acb0887b9 Merge: 7a1723d3b230 21f56ad1b211 Author: Jakub Kicinski Date: Wed Jan 15 13:17:58 2025 -0800 Merge branch 'net-bcm-asp2-fix-fallout-from-phylib-eee-changes' Russell King says: ==================== net: bcm: asp2: fix fallout from phylib EEE changes This series addresses the fallout from the phylib changes in the Broadcom ASP2 driver. The first patch uses phylib's copy of the LPI timer setting, which means the driver no longer has to track this. It will be set in hardware each time the adjust_link function is called when the link is up, and will be read at initialisation time to set the current value. The second patch removes the driver's storage of tx_lpi_enabled, which has become redundant since phylib managed EEE was merged. The driver does nothing with this flag other than storing it. The last patch converts the driver to use phylib's enable_tx_lpi flag rather than trying to maintain its own copy. ==================== Link: https://patch.msgid.link/Z4aV3RmSZJ1WS3oR@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 21f56ad1b21131eb2c9c16e11ccb28f77b5addc4 Author: Russell King (Oracle) Date: Tue Jan 14 16:50:57 2025 +0000 net: bcm: asp2: convert to phylib managed EEE Convert the Broadcom ASP2 driver to use phylib managed EEE support. Signed-off-by: Russell King (Oracle) Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli Link: https://patch.msgid.link/E1tXk81-000r4x-TS@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/asp2/bcmasp.h | 3 --- .../net/ethernet/broadcom/asp2/bcmasp_ethtool.c | 31 ---------------------- drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c | 19 ++++++------- 3 files changed, 10 insertions(+), 43 deletions(-) commit df8017e8a19d72b48abfe02b8611a5c8c7f89e22 Author: Russell King (Oracle) Date: Tue Jan 14 16:50:52 2025 +0000 net: bcm: asp2: remove tx_lpi_enabled Phylib maintains a copy of tx_lpi_enabled, which will be used to populate the member when phy_ethtool_get_eee(). Therefore, writing to this member before phy_ethtool_get_eee() will have no effect. Remove it. Also remove setting our copy of info->eee.tx_lpi_enabled which becomes write-only. Signed-off-by: Russell King (Oracle) Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli Link: https://patch.msgid.link/E1tXk7w-000r4r-Pq@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/asp2/bcmasp_ethtool.c | 6 ------ 1 file changed, 6 deletions(-) commit 54033f5512191fa355422d009f32923c1cf24aab Author: Russell King (Oracle) Date: Tue Jan 14 16:50:47 2025 +0000 net: bcm: asp2: fix LPI timer handling Fix the LPI timer handling in Broadcom ASP2 driver after the phylib managed EEE patches were merged. Signed-off-by: Russell King (Oracle) Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli Link: https://patch.msgid.link/E1tXk7r-000r4l-Li@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/broadcom/asp2/bcmasp_ethtool.c | 2 -- drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) commit 27c3f0e61f19d2306527406cad233d5f5915ca1e Author: Wolfram Sang Date: Wed Jan 15 08:39:18 2025 +0100 i2c: add kdoc for the new debugfs entry of clients When adding the new debugfs entry, its kdoc equivalent was forgotten. Add it now. Fixes: d06905d68610 ("i2c: add core-managed per-client directory in debugfs") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/r/20250115163146.6c48f066@canb.auug.org.au Signed-off-by: Wolfram Sang include/linux/i2c.h | 2 ++ 1 file changed, 2 insertions(+) commit 0cd4f1f77ad4f021cd56aad00c1914583c3ddf3c Author: Dzmitry Sankouski Date: Tue Jan 7 12:31:31 2025 +0300 power: supply: max17042: add platform driver variant Maxim PMICs may include fuel gauge with additional features, which is out of single Linux power supply driver scope. For example, in max77705 PMIC fuelgauge has additional registers, like IIN_REG, VSYS_REG, ISYS_REG. Those needed to measure PMIC input current, system voltage and current respectively. Those measurements cannot be bound to any of fuelgauge properties. The solution here add and option to use max17042 driver as a MFD sub device, thus allowing any additional functionality be implemented as another sub device. This will help to reduce code duplication in MFD fuel gauge drivers. Acked-by: Krzysztof Kozlowski Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250107-b4-max17042-v6-2-3d0104ad5bc7@gmail.com Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 191 +++++++++++++++++++++++--------- 1 file changed, 141 insertions(+), 50 deletions(-) commit bed41f08e222efb6f77a3a68e847b7a1ad994e62 Author: Dzmitry Sankouski Date: Tue Jan 7 12:31:30 2025 +0300 power: supply: max17042: make interrupt shared Fuelgauge blocks often are incorporated in bigger chip, which may use only 1 line for interrupts. Make interrupt shared. Reviewed-by: Hans de Goede Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20250107-b4-max17042-v6-1-3d0104ad5bc7@gmail.com Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit d9f6642ab7ca007ab899b2a89a6b754dcabcad47 Author: Marc Zyngier Date: Wed Dec 4 15:01:45 2024 +0000 PCI: apple: Convert to {en,dis}able_device() callbacks Now that the core host-bridge infrastructure is able to give us a callback on each device being added or removed, convert the bus-notifier hack to it. Link: https://lore.kernel.org/r/20241204150145.800408-3-maz@kernel.org Signed-off-by: Marc Zyngier Signed-off-by: Bjorn Helgaas Reviewed-by: Frank Li Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/pcie-apple.c | 75 ++++++++----------------------------- 1 file changed, 15 insertions(+), 60 deletions(-) commit 477ac7b0a7984e12e8db07fe54ad64443c5f8928 Author: Marc Zyngier Date: Wed Dec 4 15:01:44 2024 +0000 PCI: host-generic: Allow {en,dis}able_device() to be provided via pci_ecam_ops In order to let host controller drivers using the host-generic infrastructure use the {en,dis}able_device() callbacks that can be used to configure sideband RID mapping hardware, provide these two callbacks as part of the pci_ecam_ops structure. Link: https://lore.kernel.org/r/20241204150145.800408-2-maz@kernel.org Signed-off-by: Marc Zyngier Signed-off-by: Bjorn Helgaas Reviewed-by: Frank Li Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/pci-host-common.c | 2 ++ include/linux/pci-ecam.h | 4 ++++ 2 files changed, 6 insertions(+) commit 81312ea9b892e2c6989cce7274eca9f437ba6cf1 Author: Krzysztof Kozlowski Date: Sat Jan 11 19:53:58 2025 +0100 power: reset: keystone: 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://lore.kernel.org/r/20250111185358.183725-1-krzysztof.kozlowski@linaro.org Signed-off-by: Sebastian Reichel drivers/power/reset/keystone-reset.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit ce4c4301728541db7e5f571a5688a3a236d9e488 Author: Frank Li Date: Tue Jan 14 15:37:09 2025 -0500 PCI: imx6: Add IOMMU and ITS MSI support for i.MX95 For the i.MX95, the configuration of a LUT is necessary to convert PCIe Requester IDs (RIDs) to StreamIDs, which are used by both IOMMU and ITS. This involves checking msi-map and iommu-map device tree properties to ensure consistent mapping of Requester IDs to the same StreamIDs. Subsequently, LUT-related registers are configured. If a msi-map isn't detected, the platform relies on DWC built-in controller for MSIs that do not need StreamIDs. Implement PCI bus callback function to handle enable_device() and disable_device() operations, setting up the LUT whenever a new PCI device is enabled. Known limitations: - If iommu-map exists in the device tree but the IOMMU controller is disabled, StreamIDs are programmed into the LUT. However, if a RID is out of range of the iommu-map, enabling the PCI device would result in a failure, although the PCI device can work without the IOMMU. - If msi-map exists in the device tree but the MSI controller is disabled, MSIs will not work. The DWC driver skips initializing the built-in MSI controller, falling back to legacy PCI INTx only. Link: https://lore.kernel.org/r/20250114-imx95_lut-v9-2-39f58dbed03a@nxp.com Signed-off-by: Frank Li [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński [bhelgaas: fix uninitialized "sid" in imx_pcie_enable_device()] Signed-off-by: Bjorn Helgaas Acked-by: Richard Zhu drivers/pci/controller/dwc/pci-imx6.c | 208 +++++++++++++++++++++++++++++++++- 1 file changed, 207 insertions(+), 1 deletion(-) commit 2d678e3e1e1564780562614ebb099a1e8cbd025f Author: Krzysztof Kozlowski Date: Tue Jan 14 21:36:11 2025 +0100 power: supply: Use str_enable_disable-like helpers Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250114203611.1013324-1-krzysztof.kozlowski@linaro.org Signed-off-by: Sebastian Reichel drivers/power/supply/88pm860x_battery.c | 4 ++-- drivers/power/supply/charger-manager.c | 3 ++- drivers/power/supply/cpcap-charger.c | 3 ++- drivers/power/supply/da9030_battery.c | 3 ++- drivers/power/supply/sbs-battery.c | 5 +++-- 5 files changed, 11 insertions(+), 7 deletions(-) commit 554d0fee8a5b09e79ec17a9c3867d4d7b7a818c0 Author: Randy Dunlap Date: Fri Jan 10 22:29:54 2025 -0800 genirq/timings: Add kernel-doc for a function parameter Add the description for @now to eliminate a kernel-doc warning. timings.c:537: warning: Function parameter or struct member 'now' not described in 'irq_timings_next_event' Signed-off-by: Randy Dunlap Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250111062954.910657-1-rdunlap@infradead.org kernel/irq/timings.c | 1 + 1 file changed, 1 insertion(+) commit f94a18249b7f9131f3ca8eacf07f21050747ebd7 Author: Thomas Gleixner Date: Tue Dec 10 11:34:17 2024 +0100 genirq: Remove IRQ_MOVE_PCNTXT and related code Now that x86 is converted over to use the IRQCHIP_MOVE_DEFERRED flags, remove IRQ*_MOVE_PCNTXT and related code. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20241210103335.626707225@linutronix.de arch/x86/Kconfig | 1 - include/linux/irq.h | 12 +----------- kernel/irq/chip.c | 14 -------------- kernel/irq/debugfs.c | 1 - kernel/irq/internals.h | 2 +- kernel/irq/settings.h | 6 ------ 6 files changed, 2 insertions(+), 34 deletions(-) commit 7d04319a05ab17ca3da188d0799af93d3213cb06 Author: Thomas Gleixner Date: Tue Dec 10 11:34:15 2024 +0100 x86/apic: Convert to IRQCHIP_MOVE_DEFERRED Instead of marking individual interrupts as safe to be migrated in arbitrary contexts, mark the interrupt chips, which require the interrupt to be moved in actual interrupt context, with the new IRQCHIP_MOVE_DEFERRED flag. This makes more sense because this is a per interrupt chip property and not restricted to individual interrupts. That flips the logic from the historical opt-out to a opt-in model. This is simpler to handle for other architectures, which default to unrestricted affinity setting. It also allows to cleanup the redundant core logic significantly. All interrupt chips, which belong to a top-level domain sitting directly on top of the x86 vector domain are marked accordingly, unless the related setup code marks the interrupts with IRQ_MOVE_PCNTXT, i.e. XEN. No functional change intended. Signed-off-by: Thomas Gleixner Reviewed-by: Steve Wahl Acked-by: Wei Liu Link: https://lore.kernel.org/all/20241210103335.563277044@linutronix.de arch/x86/Kconfig | 1 + arch/x86/hyperv/irqdomain.c | 2 +- arch/x86/kernel/apic/io_apic.c | 2 +- arch/x86/kernel/apic/msi.c | 3 ++- arch/x86/kernel/hpet.c | 8 -------- arch/x86/platform/uv/uv_irq.c | 3 --- drivers/iommu/amd/init.c | 2 +- drivers/iommu/amd/iommu.c | 1 - drivers/iommu/intel/irq_remapping.c | 1 - drivers/pci/controller/pci-hyperv.c | 1 + drivers/xen/events/events_base.c | 6 ------ 11 files changed, 7 insertions(+), 23 deletions(-) commit ff0b7ed607e779f0e109f7f24388e0ce07af2ebe Author: Kent Overstreet Date: Wed Jan 15 12:17:28 2025 -0500 bcachefs: Fix check_inode_hash_info_matches_root() Can't use memcmp() when the struct contains padding. Signed-off-by: Kent Overstreet fs/bcachefs/str_hash.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit ab9f0d04ffa9af09a8b0f44940df47c581f1cd00 Author: Krzysztof Kozlowski Date: Tue Jan 14 20:06:12 2025 +0100 clk: Use str_enable_disable-like helpers Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Reviewed-by: Florian Fainelli Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250114190612.846696-1-krzysztof.kozlowski@linaro.org Reviewed-by: Linus Walleij Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-kona.c | 3 ++- drivers/clk/clk-nomadik.c | 5 +++-- drivers/clk/clk-xgene.c | 4 ++-- drivers/clk/qcom/clk-rpmh.c | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) commit 75a7f7d6e7e10b9052d287be37f965103e1abae1 Merge: 04e97fa7dd7e 17615e421611 Author: Mark Brown Date: Wed Jan 15 19:50:01 2025 +0000 ASoC: Intel: sof_sdw: Fix DMI match entries for a Merge series from Bard Liao : Those laptops use host DMIC. Correct the DMI match entries. commit 3b7d93db450e9d8ead80d75e2a303248f1528c35 Author: Antoine Viallon Date: Tue Jan 14 23:45:14 2025 +0100 ceph: fix memory leak in ceph_mds_auth_match() We now free the temporary target path substring allocation on every possible branch, instead of omitting the default branch. In some cases, a memory leak occured, which could rapidly crash the system (depending on how many file accesses were attempted). This was detected in production because it caused a continuous memory growth, eventually triggering kernel OOM and completely hard-locking the kernel. Relevant kmemleak stacktrace: unreferenced object 0xffff888131e69900 (size 128): comm "git", pid 66104, jiffies 4295435999 hex dump (first 32 bytes): 76 6f 6c 75 6d 65 73 2f 63 6f 6e 74 61 69 6e 65 volumes/containe 72 73 2f 67 69 74 65 61 2f 67 69 74 65 61 2f 67 rs/gitea/gitea/g backtrace (crc 2f3bb450): [] __kmalloc_noprof+0x359/0x510 [] ceph_mds_check_access+0x5bf/0x14e0 [ceph] [] ceph_open+0x312/0xd80 [ceph] [] do_dentry_open+0x456/0x1120 [] vfs_open+0x79/0x360 [] path_openat+0x1de5/0x4390 [] do_filp_open+0x19c/0x3c0 [] do_sys_openat2+0x141/0x180 [] __x64_sys_open+0xe5/0x1a0 [] do_syscall_64+0xb7/0x210 [] entry_SYSCALL_64_after_hwframe+0x77/0x7f It can be triggered by mouting a subdirectory of a CephFS filesystem, and then trying to access files on this subdirectory with an auth token using a path-scoped capability: $ ceph auth get client.services [client.services] key = REDACTED caps mds = "allow rw fsname=cephfs path=/volumes/" caps mon = "allow r fsname=cephfs" caps osd = "allow rw tag cephfs data=cephfs" $ cat /proc/self/mounts services@[REDACTED].cephfs=/volumes/containers /ceph/containers ceph rw,noatime,name=services,secret=,ms_mode=prefer-crc,mount_timeout=300,acl,mon_addr=[REDACTED]:3300,recover_session=clean 0 0 $ seq 1 1000000 | xargs -P32 --replace={} touch /ceph/containers/file-{} && \ seq 1 1000000 | xargs -P32 --replace={} cat /ceph/containers/file-{} [ idryomov: combine if statements, rename rc to path_matched and make it a bool, formatting ] Cc: stable@vger.kernel.org Fixes: 596afb0b8933 ("ceph: add ceph_mds_check_access() helper") Signed-off-by: Antoine Viallon Reviewed-by: Viacheslav Dubeyko Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 2d2a46cf23788a19e5450c6f9c86ab17f596c708 Author: Dr. David Alan Gilbert Date: Sun Jan 12 16:01:32 2025 +0000 timekeeping: Remove unused ktime_get_fast_timestamps() ktime_get_fast_timestamps() was added in 2020 by commit e2d977c9f1ab ("timekeeping: Provide multi-timestamp accessor to NMI safe timekeeper") but has remained unused. Remove it. [ tglx: Fold the inline as David suggested in the submission ] Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250112160132.450209-1-linux@treblig.org include/linux/timekeeping.h | 15 --------- kernel/time/timekeeping.c | 77 +++++---------------------------------------- 2 files changed, 8 insertions(+), 84 deletions(-) commit 4477b0601471ba4fc67501b62b78aebd327fefd7 Author: Randy Dunlap Date: Fri Jan 10 22:31:56 2025 -0800 timer/migration: Fix kernel-doc warnings for union tmigr_state Use the correct kernel-doc notation for nested structs/unions to eliminate warnings: timer_migration.h:119: warning: Incorrect use of kernel-doc format: * struct - split state of tmigr_group timer_migration.h:134: warning: Function parameter or struct member 'active' not described in 'tmigr_state' timer_migration.h:134: warning: Function parameter or struct member 'migrator' not described in 'tmigr_state' timer_migration.h:134: warning: Function parameter or struct member 'seq' not described in 'tmigr_state' Signed-off-by: Randy Dunlap Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250111063156.910903-1-rdunlap@infradead.org kernel/time/timer_migration.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 4903e1ba798e4d4a9bce1eee0f0285f385d14f15 Author: Randy Dunlap Date: Fri Jan 10 22:31:48 2025 -0800 tick/broadcast: Add kernel-doc for function parameters Add kernel-doc comments for two parameters to eliminate kernel-doc warnings: tick-broadcast.c:1026: warning: Function parameter or struct member 'bc' not described in 'tick_broadcast_setup_oneshot' tick-broadcast.c:1026: warning: Function parameter or struct member 'from_periodic' not described in 'tick_broadcast_setup_oneshot' Signed-off-by: Randy Dunlap Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250111063148.910887-1-rdunlap@infradead.org kernel/time/tick-broadcast.c | 2 ++ 1 file changed, 2 insertions(+) commit da7100d3bf7d6f5c49ef493ea963766898e9b069 Author: Richard Clark Date: Tue Dec 24 15:57:03 2024 +0800 hrtimers: Update the return type of enqueue_hrtimer() The return type should be 'bool' instead of 'int' according to the calling context in the kernel, and its internal implementation, i.e. : return timerqueue_add(); which is a bool-return function. [ tglx: Adjust function arguments ] Signed-off-by: Richard Clark Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/Z2ppT7me13dtxm1a@MBC02GN1V4Q05P kernel/time/hrtimer.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 776b194116d1a484b6d04abfe4b86272f0700144 Author: Paul E. McKenney Date: Thu Dec 12 10:56:20 2024 -0800 clocksource/wdtest: Print time values for short udelay(1) When a pair of clocksource reads separated by a udelay(1) claim less than a full microsecond of elapsed time, print the measured delay as part of the splat. Signed-off-by: Paul E. McKenney Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/717a2ddf-a80f-490b-aa3a-4e4b74fa56ca@paulmck-laptop kernel/time/clocksource-wdtest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9f38e83a88979ddd630c1f80c2404ecde7854044 Author: Zhu Jun Date: Wed Dec 4 00:09:07 2024 -0800 posix-timers: Fix typo in __lock_timer() The word 'accross' is wrong, so fix it. Signed-off-by: Zhu Jun Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20241204080907.11989-1-zhujun2@cmss.chinamobile.com kernel/time/posix-timers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be7a05db4252edbffb43484b14755048fb8db710 Author: Miquel Raynal Date: Fri Jan 10 15:45:29 2025 +0100 mtd: spinand: winbond: Add support for DTR operations W25N01JW and W25N02JW support many DTR read modes in single, dual and quad configurations. DTR modes however cannot be used at 166MHz, as the bus frequency in this case must be lowered to 80MHz. Signed-off-by: Miquel Raynal drivers/mtd/nand/spi/winbond.c | 5 +++++ 1 file changed, 5 insertions(+) commit 61c7155e3fe938d4da4671b2f84e29eaf79f5f46 Author: Miquel Raynal Date: Fri Jan 10 15:45:28 2025 +0100 mtd: spinand: winbond: Add comment about naming Make the link between the core macros and the datasheet. Signed-off-by: Miquel Raynal drivers/mtd/nand/spi/winbond.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7ca288760007cab6588dc17f5b6fecf52c83a945 Author: Dan Carpenter Date: Mon Dec 2 12:07:22 2024 +0300 PCI: rockchip-ep: Fix error code in rockchip_pcie_ep_init_ob_mem() Return -ENOMEM if pci_epc_mem_alloc_addr() fails. Don't return success. Link: https://lore.kernel.org/r/Z014ylYz_xrrgI4W@stanley.mountain Fixes: 945648019466 ("PCI: rockchip-ep: Refactor rockchip_pcie_ep_probe() memory allocations") Signed-off-by: Dan Carpenter Signed-off-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński Reviewed-by: Damien Le Moal Reviewed-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel drivers/pci/controller/pcie-rockchip-ep.c | 1 + 1 file changed, 1 insertion(+) commit 500969661b0294e0442bc516a9e272e7e8561d95 Author: Anand Moon Date: Mon Dec 2 20:41:44 2024 +0530 PCI: rockchip: Refactor rockchip_pcie_disable_clocks() signature Refactor rockchip_pcie_disable_clocks() to accept a struct rockchip_pcie pointer instead of a void pointer thus improving type safety and code readability by explicitly specifying the expected data type. Link: https://lore.kernel.org/r/20241202151150.7393-4-linux.amoon@gmail.com Signed-off-by: Anand Moon Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/pcie-rockchip.c | 3 +-- drivers/pci/controller/pcie-rockchip.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit 1ea808b4d15b9bddc48af75b0668b82366b5b927 Author: Miquel Raynal Date: Fri Jan 10 15:45:27 2025 +0100 mtd: spinand: winbond: Update the *JW chip definitions W25N01JW and W25N02JW use a different technology with higher frequencies supported (up to 166MHz). There is one drawback though, the slowest READ_FROM_CACHE command cannot run above 54MHz. Because of that, we need to set a limit for these chips on the basic READ_FROM_CACHE variant. Duplicating this list is not a problem because these chips have DTR support, and the list of supported variants will diverge from all the other chips when adding support for it. Cc: stable+noautosel@kernel.org # New feature being added Signed-off-by: Miquel Raynal drivers/mtd/nand/spi/winbond.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 8586bc8d95488dfaadbc1af89ba59900d2c39119 Author: Miquel Raynal Date: Fri Jan 10 15:45:26 2025 +0100 mtd: spinand: Add support for read DTR operations Advanced SPI-NAND chips are capable of reading data much faster by leveraging DTR support. This support extends to dual and quad configurations. Create macros defining all possible read from cache DTR variants: - SPINAND_PAGE_READ_FROM_CACHE_DTR_OP - SPINAND_PAGE_READ_FROM_CACHE_X2_DTR_OP - SPINAND_PAGE_READ_FROM_CACHE_X4_DTR_OP - SPINAND_PAGE_READ_FROM_CACHE_DUALIO_DTR_OP - SPINAND_PAGE_READ_FROM_CACHE_QUADIO_DTR_OP Signed-off-by: Miquel Raynal include/linux/mtd/spinand.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 666c299be696f02c3354da104295fb94b8f65d25 Author: Miquel Raynal Date: Fri Jan 10 15:45:25 2025 +0100 mtd: spinand: Enhance the logic when picking a variant Currently the best variant picked in the first one in the list provided in the manufacturer driver. This worked well while all operations where performed at the same speed, but with the introduction of DTR transfers and per operation maximum frequencies, this no longer works correctly. Let's continue iterating over all the alternatives, even if we find a match, keeping a reference over the theoretically fastest operation. Only at the end we can tell which variant is the best. This logic happening only once at boot, the extra computing needed compared to the previous version is acceptable wrt. the expected improvements. Signed-off-by: Miquel Raynal drivers/mtd/nand/spi/core.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 7ce0d16d5802bfde4209e52ee8ad644ca1eab423 Author: Miquel Raynal Date: Fri Jan 10 15:45:24 2025 +0100 mtd: spinand: Add an optional frequency to read from cache macros While the SPINAND_PAGE_READ_FROM_CACHE_FAST_OP macro is supposed to be able to run at the flash highest supported frequency, it is not the case of the regular read from cache, which may be limited in terms of maximum frequency. Add an optional argument to this macro, which will be used to set the maximum frequency, if any. Signed-off-by: Miquel Raynal include/linux/mtd/spinand.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 18715931a5c08d199d14df116832d88dc4df48c5 Author: Anand Moon Date: Mon Dec 2 20:41:43 2024 +0530 PCI: rockchip: Simplify reset control handling by using reset_control_bulk*() function Currently, the driver acquires and asserts/deasserts the resets individually thereby making the driver complex to read. This can be simplified by using the reset_control_bulk() APIs. Use devm_reset_control_bulk_get_exclusive() API to acquire all the resets and use reset_control_bulk_{assert/deassert}() APIs to assert/deassert them in bulk. Following the recommendations in 'Rockchip RK3399 TRM v1.3 Part2': 1. Split the reset controls into two groups as per section '17.5.8.1.1 PCIe as Root Complex'. 2. Deassert the 'Pipe, MGMT Sticky, MGMT, Core' resets in groups as per section '17.5.8.1.1 PCIe as Root Complex'. This is accomplished using the reset_control_bulk APIs. Link: https://lore.kernel.org/r/20241202151150.7393-3-linux.amoon@gmail.com Co-developed-by: Dan Carpenter Signed-off-by: Anand Moon Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas [kwilczynski: squash error handling fix from https://lore.kernel.org/r/7da6ac56-af55-4436-9597-6af24df8122c@stanley.mountain] Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/pcie-rockchip.c | 150 ++++++--------------------------- drivers/pci/controller/pcie-rockchip.h | 26 ++++-- 2 files changed, 47 insertions(+), 129 deletions(-) commit 042087247835dad1ec5e39052abf022fd13c6326 Author: Miquel Raynal Date: Fri Jan 10 15:45:23 2025 +0100 mtd: spinand: Create distinct fast and slow read from cache variants So far, the SPINAND_PAGE_READ_FROM_CACHE_OP macro was taking a first argument, "fast", which was inducing the possibility to support higher bus frequencies than with the normal (slower) read from cache alternative. In practice, without frequency change on the bus, this was likely without effect, besides perhaps allowing another variant of the same command, that could run at the default highest speed. If we want to support this fully, we need to add a frequency parameter to the slowest command. But before we do that, let's drop the "fast" boolean from the macro and duplicate it, this will further help supporting having different frequencies allowed for each variant. The change is also of course propagated to all users. It has the nice effect to have all macros aligned on the same pattern. Reviewed-by: Tudor Ambarus Signed-off-by: Miquel Raynal drivers/mtd/nand/spi/alliancememory.c | 4 ++-- drivers/mtd/nand/spi/ato.c | 4 ++-- drivers/mtd/nand/spi/esmt.c | 4 ++-- drivers/mtd/nand/spi/foresee.c | 4 ++-- drivers/mtd/nand/spi/gigadevice.c | 16 ++++++++-------- drivers/mtd/nand/spi/macronix.c | 4 ++-- drivers/mtd/nand/spi/micron.c | 8 ++++---- drivers/mtd/nand/spi/paragon.c | 4 ++-- drivers/mtd/nand/spi/toshiba.c | 4 ++-- drivers/mtd/nand/spi/winbond.c | 4 ++-- drivers/mtd/nand/spi/xtx.c | 4 ++-- include/linux/mtd/spinand.h | 20 ++++++++++++++++---- 12 files changed, 46 insertions(+), 34 deletions(-) commit cd97c961681adb694922b57fe4030b95b7a8ef0a Author: Rob Herring (Arm) Date: Thu Jan 9 12:21:48 2025 -0600 mtd: hyperbus: 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) Reviewed-by: Tudor Ambarus Signed-off-by: Miquel Raynal drivers/mtd/hyperbus/hbmc-am654.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29b9415889d42e6a32ead89cf897f65696d3cb47 Author: Raphael Gallais-Pou Date: Thu Jan 9 16:52:33 2025 +0100 mtd: st_spi_fsm: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() Letting the compiler remove these functions when the kernel is built without CONFIG_PM_SLEEP support is simpler and less error prone than the use of #ifdef based kernel configuration guards. Signed-off-by: Raphael Gallais-Pou Signed-off-by: Miquel Raynal drivers/mtd/devices/st_spi_fsm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit fc4378b2fe8645d310463c2d895abd8173087b95 Merge: d0b806fc9932 e896c04890ae Author: Miquel Raynal Date: Wed Jan 15 19:07:39 2025 +0100 Merge tag 'spi-mem-dtr-2' into nand/next spi: Support DTR in spi-mem Changes to support DTR with spi-mem. commit d0b806fc9932a04dae87dbd03a2dea8114ee6996 Author: Marcus Folkesson Date: Thu Jan 9 08:58:31 2025 +0100 mtd: rawnand: davinci: add ROM supported OOB layout Add support for the OOB layout used by the ROM bootloader. The same layout is used by both Keystone [1] and OMAPL138/DA850 [2] which currently is the only users of davinci-nand. Only select this layout if the `nand-is-boot-medium` property is set. This to avoid breaking any existing devices out there. [1] https://www.ti.com/lit/ug/spruhj3/spruhj3.pdf [2] https://www.ti.com/lit/an/sprab41f/sprab41f.pdf Signed-off-by: Marcus Folkesson Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/davinci_nand.c | 45 +++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) commit a3751212a8eeece59d2018c455000f30ed7e5bb7 Author: Frank Li Date: Tue Jan 14 15:37:08 2025 -0500 PCI: Add enable_device() and disable_device() callbacks for bridges Some PCI host bridges require special handling when enabling or disabling PCI devices. For example, the i.MX95 platform has a lookup table to map Requester IDs to StreamIDs, which the SMMU and MSI controller use to identify the source of DMA accesses. Without this mapping, DMA accesses may target unintended memory, which would corrupt memory or read the wrong data. Add a host bridge enable_device() hook the imx6 driver can use to configure the Requester ID to StreamID mapping. The hardware table isn't big enough to map all possible Requester IDs, so this hook may fail if no table space is available. In that case, return failure from pci_enable_device(). It might make more sense to make pci_set_master() decline to enable bus mastering and return failure, but it currently doesn't have a way to return failure. Link: https://lore.kernel.org/r/20250114-imx95_lut-v9-1-39f58dbed03a@nxp.com Tested-by: Marc Zyngier Signed-off-by: Frank Li Signed-off-by: Bjorn Helgaas [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński Reviewed-by: Marc Zyngier Acked-by: Manivannan Sadhasivam drivers/pci/pci.c | 36 +++++++++++++++++++++++++++++++++++- include/linux/pci.h | 2 ++ 2 files changed, 37 insertions(+), 1 deletion(-) commit b198499c7d2508a76243b98e7cca992f6fd2b7f7 Author: Takashi Iwai Date: Thu Jan 2 17:43:13 2025 +0100 PCI/DPC: Quirk PIO log size for Intel Raptor Lake-P Apparently the Raptor Lake-P reference firmware configures the PIO log size correctly, but some vendor BIOSes, including at least ASUSTeK COMPUTER INC. Zenbook UX3402VA_UX3402VA, do not. Apply the quirk for Raptor Lake-P. This prevents kernel complaints like: DPC: RP PIO log size 0 is invalid and also enables the DPC driver to dump the RP PIO Log registers when DPC is triggered. Note that the bug report also mentions 8086:a76e, which has been already added by 627c6db20703 ("PCI/DPC: Quirk PIO log size for Intel Raptor Lake Root Ports"). Link: https://lore.kernel.org/r/20250102164315.7562-1-tiwai@suse.de Link: https://bugzilla.suse.com/show_bug.cgi?id=1234623 Signed-off-by: Takashi Iwai [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński drivers/pci/quirks.c | 1 + 1 file changed, 1 insertion(+) commit 336d02bc4c6bec5c3d933e5d470a94970f830957 Author: Mathieu Desnoyers Date: Tue Jan 14 09:51:32 2025 -0500 selftests/rseq: Fix handling of glibc without rseq support When porting librseq commit: commit c7b45750fa85 ("Adapt to glibc __rseq_size feature detection") from librseq to the kernel selftests, the following line was missed at the end of rseq_init(): rseq_size = get_rseq_kernel_feature_size(); which effectively leaves rseq_size initialized to -1U when glibc does not have rseq support. glibc supports rseq from version 2.35 onwards. In a following librseq commit commit c67d198627c2 ("Only set 'rseq_size' on first thread registration") to mimic the libc behavior, a new approach is taken: don't set the feature size in 'rseq_size' until at least one thread has successfully registered. This allows using 'rseq_size' in fast-paths to test for both registration status and available features. The caveat is that on libc either all threads are registered or none are, while with bare librseq it is the responsability of the user to register all threads using rseq. This combines the changes from the following librseq git commits: commit c7b45750fa85 ("Adapt to glibc __rseq_size feature detection") commit c67d198627c2 ("Only set 'rseq_size' on first thread registration") Fixes: a0cc649353bb ("selftests/rseq: Fix mm_cid test failure") Reported-by: Raghavendra Rao Ananta Signed-off-by: Mathieu Desnoyers Cc: Raghavendra Rao Ananta Cc: Shuah Khan Cc: Peter Zijlstra Cc: Boqun Feng Cc: "Paul E. McKenney" Cc: Carlos O'Donell Cc: Florian Weimer Cc: Michael Jeanson Cc: linux-kselftest@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Shuah Khan tools/testing/selftests/rseq/rseq.c | 32 +++++++++++++++++++++++++------- tools/testing/selftests/rseq/rseq.h | 9 ++++++++- 2 files changed, 33 insertions(+), 8 deletions(-) commit 73a2e82123f8ba9e53932bf112d2a25158f37b10 Merge: 9b4856c939b2 f424523b1b51 Author: Arnd Bergmann Date: Wed Jan 15 18:51:13 2025 +0100 Merge tag 'samsung-dt64-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/dt Samsung DTS ARM64 changes for v6.14 1. Exynos8895: Add UART nodes, PMU (performance) for the M2 cluster and I2C controllers in the camera block (HSI2C in CAM0-3). 2. Exynos990: Add Power Management Unit (Samsung block), PMU (performance) for M5 cluster and two clock controllers. 3. ExynosAutov920: Add watchdog and DMA controllers. 4. Google GS101: Minor fixes for phy and USB. Add USB Type-C. 5. Exynos850-e850-96 board: Drop gap in memory layout. 6. New SoC: Exynos9810. 7. New boards, all mobile phones: - Exynos9810: Samsung Galaxy S9 (SM-G960F) - Exynos990: Samsung Galaxy S20 FE (SM-G780F) Samsung Galaxy S20 5G (SM-G980F) * tag 'samsung-dt64-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (23 commits) arm64: dts: exynos8895: Add camera hsi2c nodes arm64: dts: exynos990: Add clock management unit nodes arm64: dts: exynos: gs101-oriole: add pd-disable and typec-power-opmode arm64: dts: exynos: gs101-oriole: enable Maxim max77759 TCPCi arm64: dts: exynos: Add initial support for Samsung Galaxy S9 (SM-G960F) arm64: dts: exynos: Add Exynos9810 SoC support arm64: dts: exynos850-e850-96: Specify reserved secure memory explicitly arm64: dts: exynos990: Add a PMU node for the third cluster arm64: dts: exynosautov920: Add DMA nodes arm64: dts: exynos8895: Add a PMU node for the second cluster dt-bindings: clock: samsung: Add Exynos990 SoC CMU bindings arm64: dts: exynosautov920: add watchdog DT node arm64: dts: exynos: Add initial support for Samsung Galaxy S20 (x1slte) arm64: dts: exynos: Add initial support for Samsung Galaxy S20 5G (x1s) arm64: dts: exynos: Add initial support for Samsung Galaxy S20 Series boards (x1s-common) dt-bindings: arm: samsung: samsung-boards: Add bindings for SM-G981B and SM-G980F board arm64: dts: exynos: gs101: allow stable USB phy Vbus detection arm64: dts: exynos: gs101: phy region for exynos5-usbdrd is larger MAINTAINERS: add myself and Tudor as reviewers for Google Tensor SoC arm64: dts: exynos990: Add pmu and syscon-reboot nodes ... Link: https://lore.kernel.org/r/20241231131742.134329-4-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 9b4856c939b2dbe1850f71a43031d044a898a398 Merge: 462675a5522d c95c1362e5bc Author: Arnd Bergmann Date: Wed Jan 15 18:50:39 2025 +0100 Merge tag 'thead-dt-for-v6.14' of https://github.com/pdp7/linux into soc/dt thead-dt-for-v6.14: T-HEAD Devicetrees for v6.14 Add mailbox node for the T-Head TH1520 RISC-V SoC. The mailbox bindings and driver were already merged in v6.13: b2cf36e4a2ac ("dt-bindings: mailbox: Add thead,th1520-mailbox bindings") 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver") Signed-off-by: Drew Fustini * tag 'thead-dt-for-v6.14' of https://github.com/pdp7/linux: riscv: dts: thead: Add mailbox node commit 462675a5522d42ab8e3e8aa95f8701c08192b98e Merge: 45b177c3fe02 acd33b48ce66 Author: Arnd Bergmann Date: Wed Jan 15 18:48:27 2025 +0100 Merge tag 'samsung-dt-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/dt Samsung DTS ARM changes for v6.14 Few fixes and improvements for sound on Galaxy Tab3 (Exynos4212). * tag 'samsung-dt-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: samsung: exynos4212-tab3: Drop interrupt from WM1811 codec ARM: dts: samsung: exynos4212-tab3: Add MCLK2 clock to WM1811 codec config ARM: dts: samsung: exynos4212-tab3: Fix headset mic, add jack detection Link: https://lore.kernel.org/r/20241231131742.134329-3-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit ba39e420c0e9a4a609d982d24c1bdb8b6beefb33 Author: Miao Li Date: Mon Jan 13 16:56:19 2025 +0800 usb: quirks: Add NO_LPM quirk for TOSHIBA TransMemory-Mx device TOSHIBA TransMemory-Mx is a good performence flash device, but it doesn't work well with LPM on Huawei hisi platform, so let's disable LPM to resolve the issue. Signed-off-by: Miao Li Link: https://lore.kernel.org/r/20250113085619.44371-1-limiao870622@163.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) commit d3fbbfa925c25d4d4453236173fb459ae2990265 Author: Ajith P V Date: Tue Jan 14 17:46:56 2025 +0530 staging: gpib: fix prefixing 0x with decimal output * pr_err() of request_region() in cb7210 uses 0x%u which is defective. * The config->ibbase is of u32 and correct prefix is 0x%x. * This error reported by checkpatch with below message: ERROR: Prefixing 0x with decimal output is defective Signed-off-by: Ajith P V Link: https://lore.kernel.org/r/20250114121656.30577-1-ajithpv.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/gpib/cb7210/cb7210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e2bcc16804b584bb2a2a8538a40fd3307305816 Author: Dave Penkler Date: Tue Jan 14 17:54:03 2025 +0100 staging: gpib: Use C99 syntax and make static Some drivers were still using the old syntax for initializing structs: field : value; This caused sparse to emit the following warning, for example: common/gpib_os.c:2026:1: warning: obsolete struct initializer, use C99 syntax Use C99 syntax: .field = value; Some local structs and arrays were not declared static causing sparse to emit the following warning, for example: warning: symbol 'ib_fops' was not declared. Should it be static? Declare the local structs and arrays as static. Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250114165403.16410-5-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman .../staging/gpib/agilent_82357a/agilent_82357a.c | 2 +- drivers/staging/gpib/common/gpib_os.c | 14 +++--- drivers/staging/gpib/gpio/gpib_bitbang.c | 4 +- drivers/staging/gpib/ines/ines_gpib.c | 58 +++++++++++----------- 4 files changed, 39 insertions(+), 39 deletions(-) commit b3beeeee2724b0664a2fc8682e1440d3fc31c6fe Author: Dave Penkler Date: Tue Jan 14 17:54:02 2025 +0100 staging: gpib: Avoid plain integers as NULL pointers A number of drivers were comparing request_region() with 0, others were passing 0 instead of NULL as a pointer argument. This led to the following sparse warning, for example: cb7210/cb7210.c:1043:72: warning: Using plain integer as NULL pointer Use !request_region() to test for NULL return and use NULL instead of 0 as pointer parameter. Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250114165403.16410-4-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/gpib/cb7210/cb7210.c | 6 +++--- drivers/staging/gpib/common/gpib_os.c | 2 +- drivers/staging/gpib/common/iblib.c | 2 +- drivers/staging/gpib/gpio/gpib_bitbang.c | 4 ++-- drivers/staging/gpib/ines/ines_gpib.c | 4 ++-- drivers/staging/gpib/pc2/pc2_gpib.c | 2 +- drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) commit 8e7ff4e7a2358fbbe3a5bbdb733e5cf5868cf1ff Author: Dave Penkler Date: Tue Jan 14 17:54:01 2025 +0100 staging: gpib: Use __user for user space pointers The user buffers in copy_from_user, copy_to_user and some file ops did not use the __user address space attribute. This led to the following sparse warning, for example: common/gpib_os.c:838:40: warning: incorrect type in argument 2 (different address spaces) common/gpib_os.c:838:40: expected void const [noderef] __user *from common/gpib_os.c:838:40: got void * Add the __user address space attribute where needed. Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250114165403.16410-3-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/gpib/common/gpib_os.c | 103 +++++++++++---------- drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 4 +- 2 files changed, 54 insertions(+), 53 deletions(-) commit 77b41a9342f610b90675a15aea87c8462b900404 Author: Dave Penkler Date: Tue Jan 14 17:54:00 2025 +0100 staging: gpib: Use __iomem attribute for io addresses In a number of drivers the PCI memory pointers were declared simply as void *. This caused sparse to emit the following warning, for example: agilent_82350b/agilent_82350b.c:44:58: warning: incorrect type in argument 2 (different address spaces) agilent_82350b/agilent_82350b.c:44:58: expected void volatile [noderef] __iomem *addr Declare the PCI memory pointers as void __iomem *addr. Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250114165403.16410-2-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/gpib/agilent_82350b/agilent_82350b.c | 10 +++++----- drivers/staging/gpib/agilent_82350b/agilent_82350b.h | 10 +++++----- drivers/staging/gpib/eastwood/fluke_gpib.h | 2 +- drivers/staging/gpib/fmh_gpib/fmh_gpib.h | 2 +- drivers/staging/gpib/ines/ines_gpib.c | 4 ++-- drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) commit 2485f8e8c4d543c2996ec409d98e692761e55bac Author: Thomas Weißschuh Date: Tue Jan 14 22:44:59 2025 +0100 devcoredump: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20250114-sysfs-const-bin_attr-devcoredump-v1-2-fa93be30efae@weissschuh.net Signed-off-by: Greg Kroah-Hartman drivers/base/devcoredump.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bf1ad6c869fdf972ecd80097214aa3223ccd457c Author: Thomas Weißschuh Date: Tue Jan 14 22:44:58 2025 +0100 devcoredump: Define 'struct bin_attribute' through macro The macro saves some lines of code and simplifies the constification of the attribute. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20250114-sysfs-const-bin_attr-devcoredump-v1-1-fa93be30efae@weissschuh.net Signed-off-by: Greg Kroah-Hartman drivers/base/devcoredump.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit dcfe437492e27d54f3ac491aed024da760f5c43c Author: Thinh Nguyen Date: Tue Jan 14 01:50:38 2025 +0000 usb: dwc3: gadget: Reinitiate stream for all host NoStream behavior There are too many different host behaviors when it comes to NoStream handling, and not everyone follows the USB and xHCI spec. The DWC3 driver attempts to do some guess work to interop with different hosts, but it can't cover everything. Let's keep it simple and treat every host the same: just retry on NoStream after a 100ms of no response delay. Note that some hosts cannot handle frequent retries. This may affect performance on certain defective hosts, but NoStream is a rare occurrence and interoperability is more important. Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/b92ae94c86f01f165d5f178b7767898573b6dc75.1736819308.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.h | 3 +- drivers/usb/dwc3/gadget.c | 109 ++++++++++++++++++++++++---------------------- 2 files changed, 59 insertions(+), 53 deletions(-) commit f386bfad038d07fc356df267592f5fd812c8cf3e Author: Krzysztof Kozlowski Date: Tue Jan 14 21:05:39 2025 +0100 USB: Use str_enable_disable-like helpers Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250114-str-enable-disable-usb-v1-6-c8405df47c19@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/cdns3/cdnsp-gadget.c | 13 +++++++------ drivers/usb/chipidea/host.c | 3 ++- drivers/usb/common/usb-conn-gpio.c | 3 ++- drivers/usb/core/hub.c | 10 +++++----- drivers/usb/core/port.c | 3 ++- drivers/usb/fotg210/fotg210-core.c | 5 +++-- drivers/usb/mtu3/mtu3_debugfs.c | 3 ++- drivers/usb/mtu3/mtu3_dr.c | 3 ++- drivers/usb/mtu3/mtu3_gadget.c | 3 ++- drivers/usb/musb/da8xx.c | 3 ++- drivers/usb/musb/musb_core.c | 3 ++- drivers/usb/musb/musb_dsps.c | 3 ++- drivers/usb/musb/musb_gadget.c | 3 ++- drivers/usb/musb/musb_host.c | 3 ++- drivers/usb/storage/shuttle_usbat.c | 4 ++-- drivers/usb/usbip/vhci_hcd.c | 3 ++- 16 files changed, 41 insertions(+), 27 deletions(-) commit 5b6dc50e9ed870fffbf2ae6de77b30fb0d15eab8 Author: Krzysztof Kozlowski Date: Tue Jan 14 21:05:38 2025 +0100 USB: gadget: Use str_enable_disable-like helpers Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250114-str-enable-disable-usb-v1-5-c8405df47c19@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_ecm.c | 4 ++-- drivers/usb/gadget/function/f_ncm.c | 3 ++- drivers/usb/gadget/function/u_serial.c | 3 ++- drivers/usb/gadget/legacy/inode.c | 3 ++- drivers/usb/gadget/udc/aspeed-vhub/hub.c | 3 ++- drivers/usb/gadget/udc/at91_udc.c | 3 ++- drivers/usb/gadget/udc/cdns2/cdns2-gadget.c | 13 +++++++------ drivers/usb/gadget/udc/dummy_hcd.c | 3 ++- drivers/usb/gadget/udc/fsl_udc_core.c | 3 ++- drivers/usb/gadget/udc/omap_udc.c | 3 ++- drivers/usb/gadget/udc/pxa27x_udc.c | 3 ++- 11 files changed, 27 insertions(+), 17 deletions(-) commit 2d913c1b0cac0aeacc20870000ff3cddb040e69a Author: Krzysztof Kozlowski Date: Tue Jan 14 21:05:37 2025 +0100 USB: phy: Use str_enable_disable-like helpers Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250114-str-enable-disable-usb-v1-4-c8405df47c19@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/phy-fsl-usb.c | 3 ++- drivers/usb/phy/phy-mv-usb.c | 3 ++- drivers/usb/phy/phy-tahvo.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit 13b3af26a41538e5051baedba8678eba521a27d3 Author: Krzysztof Kozlowski Date: Tue Jan 14 21:05:36 2025 +0100 USB: typec: Use str_enable_disable-like helpers Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250114-str-enable-disable-usb-v1-3-c8405df47c19@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/class.c | 7 ++++--- drivers/usb/typec/tcpm/fusb302.c | 24 +++++++++++----------- .../usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c | 3 ++- .../typec/tcpm/qcom/qcom_pmic_typec_pdphy_stub.c | 3 ++- drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c | 4 +++- drivers/usb/typec/tcpm/tcpm.c | 7 ++++--- 6 files changed, 27 insertions(+), 21 deletions(-) commit 789a1714292a0e6e87cd8fb7deedc1784bb959e3 Author: Krzysztof Kozlowski Date: Tue Jan 14 21:05:35 2025 +0100 USB: host: Use str_enable_disable-like helpers Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250114-str-enable-disable-usb-v1-2-c8405df47c19@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/host/oxu210hp-hcd.c | 3 ++- drivers/usb/host/sl811-hcd.c | 3 ++- drivers/usb/host/xhci-ring.c | 5 +++-- drivers/usb/host/xhci-tegra.c | 5 +++-- drivers/usb/host/xhci.c | 3 ++- 5 files changed, 12 insertions(+), 7 deletions(-) commit bd693544854b025765514e8948469c618000993a Author: Krzysztof Kozlowski Date: Tue Jan 14 21:05:34 2025 +0100 USB: Replace own str_plural with common one Use existing str_plural() helper from string_choices.h to reduce amount of duplicated code. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250114-str-enable-disable-usb-v1-1-c8405df47c19@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/core/config.c | 19 +++++++------------ drivers/usb/core/generic.c | 12 ++++-------- 2 files changed, 11 insertions(+), 20 deletions(-) commit e3a89cc281b60fbd39fa6c1509e80001b77fd8c1 Author: Viresh Kumar Date: Mon Jan 13 16:52:59 2025 +0530 rust: device: Add property_present() This implements Device::property_present(), which calls C APIs device_property_present() helper. The new helper will be used by Rust based cpufreq drivers. Signed-off-by: Viresh Kumar Link: https://lore.kernel.org/r/f43fe3f7b3151a89c261ad728b0f3bb2fc24caef.1736766672.git.viresh.kumar@linaro.org Signed-off-by: Greg Kroah-Hartman rust/bindings/bindings_helper.h | 1 + rust/kernel/device.rs | 7 +++++++ 2 files changed, 8 insertions(+) commit f51df260e82b81c3e8ea2ab4554926bf475d926c Merge: 677184d6e430 72bb8275a3b0 Author: Arnd Bergmann Date: Wed Jan 15 18:05:37 2025 +0100 Merge tag 'reset-for-v6.14-2' of git://git.pengutronix.de/pza/linux into soc/drivers Reset controller updates for v6.14 (v2) * Add support for A1 SoC in amlogic reset driver. * Drop aux registration helper from amlogic reset driver. * tag 'reset-for-v6.14-2' of git://git.pengutronix.de/pza/linux: reset: amlogic: aux: drop aux registration helper reset: amlogic: aux: get regmap through parent device reset: amlogic: add support for A1 SoC in auxiliary reset driver dt-bindings: reset: add bindings for A1 SoC audio reset controller clk: amlogic: axg-audio: revert reset implementation Revert "clk: Fix invalid execution of clk_set_rate" Link: https://lore.kernel.org/r/20250115170247.1303656-1-p.zabel@pengutronix.de Signed-off-by: Arnd Bergmann commit 3a53ff95b0be9a5d0ef5037e539558d0041f9a89 Author: Krzysztof Kozlowski Date: Sat Jan 11 19:42:53 2025 +0100 remoteproc: st: Use syscon_regmap_lookup_by_phandle_args Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over syscon_regmap_lookup_by_phandle() and getting the 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 Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20250111-b4-syscon-phandle-args-remoteproc-v1-5-73ed6fafa1e3@linaro.org Signed-off-by: Mathieu Poirier drivers/remoteproc/st_remoteproc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit fed4ec7442eb0e37eefae4a9602d9d93335f251c Author: Krzysztof Kozlowski Date: Sat Jan 11 19:42:52 2025 +0100 remoteproc: keystone: Use syscon_regmap_lookup_by_phandle_args Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over syscon_regmap_lookup_by_phandle() and getting the 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://lore.kernel.org/r/20250111-b4-syscon-phandle-args-remoteproc-v1-4-73ed6fafa1e3@linaro.org Signed-off-by: Mathieu Poirier drivers/remoteproc/keystone_remoteproc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 72bb8275a3b0784a817e0371c49c0110d68bb7fb Author: Jerome Brunet Date: Mon Dec 9 17:04:35 2024 +0100 reset: amlogic: aux: drop aux registration helper Having the aux registration helper along with the registered driver is not great dependency wise. It does not allow the registering driver to be properly decoupled from the registered auxiliary driver. Drop the registration helper from the amlogic auxiliary reset driver. This will be handled in the registering clock driver to start with while a more generic solution is worked on. Suggested-by: Arnd Bergmann Signed-off-by: Jerome Brunet Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20241209-meson-rst-aux-rework-v1-2-d2afb69cc72e@baylibre.com Signed-off-by: Philipp Zabel drivers/reset/amlogic/reset-meson-aux.c | 61 --------------------------------- include/soc/amlogic/reset-meson-aux.h | 23 ------------- 2 files changed, 84 deletions(-) commit ccfba09ceecc3ac1f264e680120cef01aed6e75e Author: Jerome Brunet Date: Mon Dec 9 17:04:34 2024 +0100 reset: amlogic: aux: get regmap through parent device Get regmap directly from the parent device registering the auxiliary reset driver, instead of using device data attached to the auxiliary device. This simplifies the registration a bit. Suggested-by: Stephen Boyd Signed-off-by: Jerome Brunet Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20241209-meson-rst-aux-rework-v1-1-d2afb69cc72e@baylibre.com Signed-off-by: Philipp Zabel drivers/reset/amlogic/reset-meson-aux.c | 36 +++++++++++---------------------- 1 file changed, 12 insertions(+), 24 deletions(-) commit 64de6a3fed96bad801e8ecd70140a4fc1304bdde Author: Jan Dakinevich Date: Wed Nov 13 02:00:56 2024 +0300 reset: amlogic: add support for A1 SoC in auxiliary reset driver Add support for the reset controller present in the audio clock controller of A1 SoC families, using the auxiliary bus. Signed-off-by: Jan Dakinevich Link: https://lore.kernel.org/r/20241112230056.1406222-3-jan.dakinevich@salutedevices.com Signed-off-by: Philipp Zabel drivers/reset/amlogic/reset-meson-aux.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 0d602fcfb9d2fb9d6340bc4e82047df41c7aa214 Author: Jan Dakinevich Date: Wed Nov 13 02:00:55 2024 +0300 dt-bindings: reset: add bindings for A1 SoC audio reset controller This reset controller is part of audio clock controller and handled by auxiliary reset driver. Introduced defines supposed to be used together with upcoming device tree nodes for audio clock controller fo A1 SoC. Signed-off-by: Jan Dakinevich Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20241112230056.1406222-2-jan.dakinevich@salutedevices.com Signed-off-by: Philipp Zabel .../reset/amlogic,meson-a1-audio-reset.h | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit d466887a9478780807290fec467d70143f3ab6d2 Author: Jackie Dong Date: Thu Jan 16 00:25:15 2025 +0800 ALSA: hda: Support for Ideapad hotkey mute LEDs New ideapad helper file with support for handling FN key mute LEDs. Update conexant and realtec codec to add LED support. Suggested-by: Mark Pearson Signed-off-by: Jackie Dong Link: https://patch.msgid.link/20250115162515.15026-1-xy-jackie@139.com Signed-off-by: Takashi Iwai sound/pci/hda/ideapad_hotkey_led_helper.c | 36 +++++++++++++++++++++++++++++++ sound/pci/hda/patch_conexant.c | 13 ++++++++++- sound/pci/hda/patch_realtek.c | 19 +++++++++++++++- 3 files changed, 66 insertions(+), 2 deletions(-) commit 266ce6e408c91a54f01175f496d6f2fe682900fb Author: Krzysztof Kozlowski Date: Sat Jan 11 19:42:51 2025 +0100 remoteproc: st: Simplify with dev_err_probe Use dev_err_probe() to make error code handling simpler and handle deferred probe. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20250111-b4-syscon-phandle-args-remoteproc-v1-3-73ed6fafa1e3@linaro.org Signed-off-by: Mathieu Poirier drivers/remoteproc/st_remoteproc.c | 44 +++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 24 deletions(-) commit 5cf32aff2088e650f73f6e291d96cdadd5c02c7a Merge: 10b2c8a67c4b 2737dee1067c Author: Paolo Bonzini Date: Wed Jan 15 11:51:56 2025 -0500 Merge tag 'loongarch-kvm-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson into HEAD LoongArch KVM changes for v6.14 1. Clear LLBCTL if secondary mmu mapping changed. 2. Add hypercall service support for usermode VMM. This is a really small changeset, because the Chinese New Year (Spring Festival) is coming. Happy New Year! commit 89d62bcd250125fefe48fc26490ae10a5698fb9a Merge: 208dea9107e8 336097d74c28 Author: Kalle Valo Date: Wed Jan 15 18:51:56 2025 +0200 Merge tag 'ath-next-20250114' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath ath.git patches for v6.14 This development cycle again featured multiple patchsets to ath12k to support the new 802.11be MLO feature, this time including the device grouping infrastructure, and the advertisement of MLO support to the wireless core. However the MLO feature is still considered to be incomplete. In addition, there was the usual set of bug fixes and cleanups, mostly in ath12k, but also in ath9k. commit cf1d4fdb4716c8a734431a1b99012ac55754b63d Author: Krzysztof Kozlowski Date: Sat Jan 11 19:42:50 2025 +0100 remoteproc: omap: Simplify returning syscon PTR_ERR No need to store PTR_ERR into temporary, local 'ret' variable. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250111-b4-syscon-phandle-args-remoteproc-v1-2-73ed6fafa1e3@linaro.org Signed-off-by: Mathieu Poirier drivers/remoteproc/omap_remoteproc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit bd047185432839d058d58b71751321724cc88f3a Author: Krzysztof Kozlowski Date: Sat Jan 11 19:42:49 2025 +0100 remoteproc: keystone: Simplify returning syscon PTR_ERR No need to store PTR_ERR into temporary, local 'ret' variable. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250111-b4-syscon-phandle-args-remoteproc-v1-1-73ed6fafa1e3@linaro.org Signed-off-by: Mathieu Poirier drivers/remoteproc/keystone_remoteproc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 5d1f7ee7f0b6362c9148d500aeebe49b64b64df4 Author: John Garry Date: Thu Jan 9 11:40:00 2025 +0000 block: Change blk_stack_atomic_writes_limits() unit_min check The current check in blk_stack_atomic_writes_limits() for a bottom device supporting atomic writes is to verify that limit atomic_write_unit_min is non-zero. This would cause a problem for device mapper queue limits calculation. This is because it uses a temporary queue_limits structure to stack the limits, before finally commiting the limits update. The value of atomic_write_unit_min for the temporary queue_limits structure is never evaluated and so cannot be used, so use limit atomic_write_hw_unit_min. Reviewed-by: Christoph Hellwig Signed-off-by: John Garry Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20250109114000.2299896-3-john.g.garry@oracle.com Signed-off-by: Jens Axboe block/blk-settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6564862d646e7d630929ba1ff330740bb215bdac Author: John Garry Date: Thu Jan 9 11:39:59 2025 +0000 block: Ensure start sector is aligned for stacking atomic writes For stacking atomic writes, ensure that the start sector is aligned with the device atomic write unit min and any boundary. Otherwise, we may permit misaligned atomic writes. Rework bdev_can_atomic_write() into a common helper to resuse the alignment check. There also use atomic_write_hw_unit_min, which is more proper (than atomic_write_unit_min). Fixes: d7f36dc446e89 ("block: Support atomic writes limits for stacked devices") Reviewed-by: Christoph Hellwig Signed-off-by: John Garry Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20250109114000.2299896-2-john.g.garry@oracle.com Signed-off-by: Jens Axboe block/blk-settings.c | 7 +++++-- include/linux/blkdev.h | 21 ++++++++++++--------- 2 files changed, 17 insertions(+), 11 deletions(-) commit 7c54803863002989ac979adc14847fea5c80bf4b Author: Yan Zhao Date: Mon Jan 13 10:11:38 2025 +0800 KVM: x86/mmu: Return RET_PF* instead of 1 in kvm_mmu_page_fault() Return RET_PF* (excluding RET_PF_EMULATE/RET_PF_CONTINUE/RET_PF_INVALID) instead of 1 in kvm_mmu_page_fault(). The callers of kvm_mmu_page_fault() are KVM page fault handlers (i.e., npf_interception(), handle_ept_misconfig(), __vmx_handle_ept_violation(), kvm_handle_page_fault()). They either check if the return value is > 0 (as in npf_interception()) or pass it further to vcpu_run() to decide whether to break out of the kernel loop and return to the user when r <= 0. Therefore, returning any positive value is equivalent to returning 1. Warn if r == RET_PF_CONTINUE (which should not be a valid value) to ensure a positive return value. This is a preparation to allow TDX's EPT violation handler to check the RET_PF* value and retry internally for RET_PF_RETRY. No functional changes are intended. Signed-off-by: Yan Zhao Message-ID: <20250113021138.18875-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu/mmu.c | 10 +++++++++- arch/x86/kvm/mmu/mmu_internal.h | 12 +++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) commit 208dea9107e80a33dfeb029bdb93cb53eccf005d Author: Alexis Lothoré Date: Tue Jan 14 11:45:34 2025 +0100 wifi: wilc1000: unregister wiphy only after netdev registration wiphy_unregister()/wiphy_free() has been recently decoupled from wilc_netdev_cleanup() to fix a faulty error path in sdio/spi probe functions. However this change introduced a new failure when simply loading then unloading the driver: $ modprobe wilc1000-sdio; modprobe -r wilc1000-sdio WARNING: CPU: 0 PID: 115 at net/wireless/core.c:1145 wiphy_unregister+0x904/0xc40 [cfg80211] Modules linked in: wilc1000_sdio(-) wilc1000 cfg80211 bluetooth ecdh_generic ecc CPU: 0 UID: 0 PID: 115 Comm: modprobe Not tainted 6.13.0-rc6+ #45 Hardware name: Atmel SAMA5 Call trace: unwind_backtrace from show_stack+0x18/0x1c show_stack from dump_stack_lvl+0x44/0x70 dump_stack_lvl from __warn+0x118/0x27c __warn from warn_slowpath_fmt+0xcc/0x140 warn_slowpath_fmt from wiphy_unregister+0x904/0xc40 [cfg80211] wiphy_unregister [cfg80211] from wilc_sdio_remove+0xb0/0x15c [wilc1000_sdio] wilc_sdio_remove [wilc1000_sdio] from sdio_bus_remove+0x104/0x3f0 sdio_bus_remove from device_release_driver_internal+0x424/0x5dc device_release_driver_internal from driver_detach+0x120/0x224 driver_detach from bus_remove_driver+0x17c/0x314 bus_remove_driver from sys_delete_module+0x310/0x46c sys_delete_module from ret_fast_syscall+0x0/0x1c Exception stack(0xd0acbfa8 to 0xd0acbff0) bfa0: 0044b210 0044b210 0044b24c 00000800 00000000 00000000 bfc0: 0044b210 0044b210 00000000 00000081 00000000 0044b210 00000000 00000000 bfe0: 00448e24 b6af99c4 0043ea0d aea2e12c irq event stamp: 0 hardirqs last enabled at (0): [<00000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x1c4c/0x7bec softirqs last enabled at (0): [] copy_process+0x1ca0/0x7bec softirqs last disabled at (0): [<00000000>] 0x0 The warning is triggered by the fact that there is still a wireless_device linked to the wiphy we are unregistering, due to wiphy_unregister() now being called after net device unregister (performed in wilc_netdev_cleanup()). Fix this warning by moving wiphy_unregister() after wilc_netdev_cleanup() is nominal paths (ie: driver removal). wilc_netdev_cleanup() ordering is left untouched in error paths in probe function because net device is not registered in those paths (so the warning can not trigger), yet the wiphy can still be registered, and we still some cleanup steps from wilc_netdev_cleanup(). Fixes: 1be94490b6b8 ("wifi: wilc1000: unregister wiphy only if it has been registered") Signed-off-by: Alexis Lothoré Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20250114-wilc1000_modprobe-v1-1-ad19d46f0c07@bootlin.com drivers/net/wireless/microchip/wilc1000/sdio.c | 2 +- drivers/net/wireless/microchip/wilc1000/spi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 26701574cee6777f867f89b4a5c667817e1ee0dd Author: Heiko Carstens Date: Tue Jan 7 11:28:58 2025 +0100 s390/futex: Fix FUTEX_OP_ANDN implementation The futex operation FUTEX_OP_ANDN is supposed to implement *(int *)UADDR2 &= ~OPARG; The s390 implementation just implements an AND instead of ANDN. Add the missing bitwise not operation to oparg to fix this. This is broken since nearly 19 years, so it looks like user space is not making use of this operation. Fixes: 3363fbdd6fb4 ("[PATCH] s390: futex atomic operations") Cc: stable@vger.kernel.org Signed-off-by: Heiko Carstens Acked-by: Alexander Gordeev Signed-off-by: Alexander Gordeev arch/s390/include/asm/futex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31691914c392675bdc65d1e72dd8d129a1f0014f Author: Stanislav Kinsburskii Date: Mon Oct 28 21:54:52 2024 +0000 kunit: Introduce autorun option The new option controls tests run on boot or module load. With the new debugfs "run" dentry allowing to run tests on demand, an ability to disable automatic tests run becomes a useful option in case of intrusive tests. The option is set to true by default to preserve the existent behavior. It can be overridden by either the corresponding module option or by the corresponding config build option. Link: https://lore.kernel.org/r/173015245931.4747.16419517391658830640.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net Signed-off-by: Stanislav Kinsburskii Reviewed-by: Rae Moar Acked-by: David Gow Signed-off-by: Shuah Khan include/kunit/test.h | 4 +++- lib/kunit/Kconfig | 12 ++++++++++++ lib/kunit/debugfs.c | 2 +- lib/kunit/executor.c | 21 +++++++++++++++++++-- lib/kunit/test.c | 6 ++++-- 5 files changed, 39 insertions(+), 6 deletions(-) commit bab4b2cca027fbc4effc0ef60615a35bfee96ad0 Author: Pavel Begunkov Date: Wed Jan 15 15:40:48 2025 +0000 io_uring: reuse io_should_terminate_tw() for cmds io_uring_cmd_work() rolled a hard coded version of io_should_terminate_tw() to avoid conflicts, but now it's time to converge them. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8a88dd6e4ed8e6c00c6552af0c20c9de02e458de.1736955455.git.asml.silence@gmail.com Signed-off-by: Jens Axboe io_uring/uring_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53745105efc3a865d07ca4973b12ecb63c977bb7 Author: Josh Triplett Date: Wed Jan 15 11:14:33 2025 +0200 io_uring: Factor out a function to parse restrictions Preparation for subsequent work on inherited restrictions. Signed-off-by: Josh Triplett Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/9bac2b4d1b9b9ab41c55ea3816021be847f354df.1736932318.git.josh@joshtriplett.org Signed-off-by: Jens Axboe io_uring/register.c | 64 +++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 31 deletions(-) commit 26fbd3494a7dd26269cb0817c289267dbcfdec06 Author: Mazin Al Haddad Date: Tue Dec 24 05:06:16 2024 +0300 Bluetooth: MGMT: Fix slab-use-after-free Read in mgmt_remove_adv_monitor_sync This fixes the following crash: ================================================================== BUG: KASAN: slab-use-after-free in mgmt_remove_adv_monitor_sync+0x3a/0xd0 net/bluetooth/mgmt.c:5543 Read of size 8 at addr ffff88814128f898 by task kworker/u9:4/5961 CPU: 1 UID: 0 PID: 5961 Comm: kworker/u9:4 Not tainted 6.12.0-syzkaller-10684-gf1cd565ce577 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: hci0 hci_cmd_sync_work 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 mgmt_remove_adv_monitor_sync+0x3a/0xd0 net/bluetooth/mgmt.c:5543 hci_cmd_sync_work+0x22b/0x400 net/bluetooth/hci_sync.c:332 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 16026: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x243/0x390 mm/slub.c:4314 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] mgmt_pending_new+0x65/0x250 net/bluetooth/mgmt_util.c:269 mgmt_pending_add+0x36/0x120 net/bluetooth/mgmt_util.c:296 remove_adv_monitor+0x102/0x1b0 net/bluetooth/mgmt.c:5568 hci_mgmt_cmd+0xc47/0x11d0 net/bluetooth/hci_sock.c:1712 hci_sock_sendmsg+0x7b8/0x11c0 net/bluetooth/hci_sock.c:1832 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:726 sock_write_iter+0x2d7/0x3f0 net/socket.c:1147 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 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 Freed by task 16022: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:582 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2338 [inline] slab_free mm/slub.c:4598 [inline] kfree+0x196/0x420 mm/slub.c:4746 mgmt_pending_foreach+0xd1/0x130 net/bluetooth/mgmt_util.c:259 __mgmt_power_off+0x183/0x430 net/bluetooth/mgmt.c:9550 hci_dev_close_sync+0x6c4/0x11c0 net/bluetooth/hci_sync.c:5208 hci_dev_do_close net/bluetooth/hci_core.c:483 [inline] hci_dev_close+0x112/0x210 net/bluetooth/hci_core.c:508 sock_do_ioctl+0x158/0x460 net/socket.c:1209 sock_ioctl+0x626/0x8e0 net/socket.c:1328 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 Reported-by: syzbot+479aff51bb361ef5aa18@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=479aff51bb361ef5aa18 Tested-by: syzbot+479aff51bb361ef5aa18@syzkaller.appspotmail.com Signed-off-by: Mazin Al Haddad Signed-off-by: Luiz Augusto von Dentz net/bluetooth/mgmt.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit a2fad248947d702ed3dcb52b8377c1a3ae201e44 Author: Zijun Hu Date: Mon Jan 13 22:43:23 2025 +0800 Bluetooth: qca: Fix poor RF performance for WCN6855 For WCN6855, board ID specific NVM needs to be downloaded once board ID is available, but the default NVM is always downloaded currently. The wrong NVM causes poor RF performance, and effects user experience for several types of laptop with WCN6855 on the market. Fix by downloading board ID specific NVM if board ID is available. Fixes: 095327fede00 ("Bluetooth: hci_qca: Add support for QTI Bluetooth chip wcn6855") Cc: stable@vger.kernel.org # 6.4 Signed-off-by: Zijun Hu Tested-by: Johan Hovold Reviewed-by: Johan Hovold Tested-by: Steev Klimaszewski #Thinkpad X13s Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btqca.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0f8a0013741163459fc6cf4610bb9ed2ec25fb94 Author: Hsin-chen Chuang Date: Wed Jan 8 20:24:44 2025 +0800 Bluetooth: Allow reset via sysfs Allow sysfs to trigger hdev reset. This is required to recover devices that are not responsive from userspace. Signed-off-by: Hsin-chen Chuang Signed-off-by: Luiz Augusto von Dentz net/bluetooth/hci_sysfs.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit f07d478090b0a03dda46fb45b5c6e089a8408351 Author: Hsin-chen Chuang Date: Wed Jan 8 20:24:43 2025 +0800 Bluetooth: Get rid of cmd_timeout and use the reset callback The hdev->reset is never used now and the hdev->cmd_timeout actually does reset. This patch changes the call path from hdev->cmd_timeout -> vendor_cmd_timeout -> btusb_reset -> hdev->reset , to hdev->reset -> vendor_reset -> btusb_reset Which makes it clear when we export the hdev->reset to a wider usage e.g. allowing reset from sysfs. This patch doesn't introduce any behavior change. Signed-off-by: Hsin-chen Chuang Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btmtksdio.c | 4 ++-- drivers/bluetooth/btusb.c | 18 +++++++++--------- drivers/bluetooth/hci_qca.c | 6 +++--- include/net/bluetooth/hci_core.h | 1 - net/bluetooth/hci_core.c | 4 ++-- 5 files changed, 16 insertions(+), 17 deletions(-) commit 7c393421755daf35ae1e4e0016b99f308123751a Author: Hsin-chen Chuang Date: Wed Jan 8 20:24:42 2025 +0800 Bluetooth: Remove the cmd timeout count in btusb Remove the cmd timeout count in btusb since we only ever allow one command in flight at a time. We should always reset after a single command times out. Signed-off-by: Hsin-chen Chuang Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 10 ---------- 1 file changed, 10 deletions(-) commit acdbea5e71fe955c3cdf70af7e0e43795d230947 Author: Krzysztof Kozlowski Date: Tue Jan 14 11:56:41 2025 +0100 Bluetooth: Use str_enable_disable-like helpers Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btintel.c | 17 +++++++++-------- drivers/bluetooth/btmrvl_main.c | 3 ++- drivers/bluetooth/hci_qca.c | 5 +++-- 3 files changed, 14 insertions(+), 11 deletions(-) commit a7208610761ae9b3bc109ddc493eb7c332fca5b2 Author: Hao Qin Date: Fri Jan 10 17:55:48 2025 +0800 Bluetooth: btmtk: Remove resetting mt7921 before downloading the fw Remove resetting mt7921 before downloading the fw, as it may cause command timeout when performing the reset. Signed-off-by: Hao Qin Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btmtk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5f397409f8ee5bc82901eeaf799e1cbc4f8edcf1 Author: Fedor Pchelkin Date: Wed Dec 18 00:19:59 2024 +0300 Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc A NULL sock pointer is passed into l2cap_sock_alloc() when it is called from l2cap_sock_new_connection_cb() and the error handling paths should also be aware of it. Seemingly a more elegant solution would be to swap bt_sock_alloc() and l2cap_chan_create() calls since they are not interdependent to that moment but then l2cap_chan_create() adds the soon to be deallocated and still dummy-initialized channel to the global list accessible by many L2CAP paths. The channel would be removed from the list in short period of time but be a bit more straight-forward here and just check for NULL instead of changing the order of function calls. Found by Linux Verification Center (linuxtesting.org) with SVACE static analysis tool. Fixes: 7c4f78cdb8e7 ("Bluetooth: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create()") Cc: stable@vger.kernel.org Signed-off-by: Fedor Pchelkin Reviewed-by: Kuniyuki Iwashima Signed-off-by: Luiz Augusto von Dentz net/bluetooth/l2cap_sock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 181a2631a3144cd79e40ec5c77e7153085310dd3 Author: Garrett Wilke Date: Wed Jan 8 11:22:13 2025 -0700 Bluetooth: btusb: Add RTL8851BE device 13d3:3600 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=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3600 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 Signed-off-by: Garrett Wilke Signed-off-by: Tim Crawford Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 3 +++ 1 file changed, 3 insertions(+) commit cca4fe34979a77d9df5c0acf935e9cc939fe5cd6 Author: Janaki Ramaiah Thota Date: Tue Jan 7 19:11:57 2025 +0530 dt-bindings: bluetooth: Utilize PMU abstraction for WCN6750 We are now using the on-chip PMU node for power sequencing to manage the enable/disable functionality of Bluetooth. Consequently, the inputs previously marked as required under the Bluetooth node can be removed. For instance, the enable GPIO is now managed by the PMU node with the property bt-enable-gpios. Signed-off-by: Janaki Ramaiah Thota Reviewed-by: Krzysztof Kozlowski Signed-off-by: Luiz Augusto von Dentz .../devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml | 5 ----- 1 file changed, 5 deletions(-) commit 4259cdbfc7cee53f4e9bbc4fffd7d0d2d73b26ba Author: Garrett Wilke Date: Wed Jan 8 13:01:40 2025 -0700 Bluetooth: btusb: Add MT7921e device 13d3:3576 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=04 Cnt=03 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=3576 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: Garrett Wilke Signed-off-by: Tim Crawford Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 2 ++ 1 file changed, 2 insertions(+) commit 3c15082f3567032d196e8760753373332508c2ca Author: Max Chou Date: Tue Dec 31 14:57:19 2024 +0800 Bluetooth: btrtl: check for NULL in btrtl_setup_realtek() If insert an USB dongle which chip is not maintained in ic_id_table, it will hit the NULL point accessed. Add a null point check to avoid the Kernel Oops. Fixes: b39910bb54d9 ("Bluetooth: Populate hci_set_hw_info for Intel and Realtek") Reviewed-by: Alex Lu Signed-off-by: Max Chou Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btrtl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b88655bc6593c6a7fdc1248b212d17e581c4334e Author: Charles Han Date: Fri Dec 27 17:20:46 2024 +0800 Bluetooth: btbcm: Fix NULL deref in btbcm_get_board_name() devm_kstrdup() can return a NULL pointer on failure,but this returned value in btbcm_get_board_name() is not checked. Add NULL check in btbcm_get_board_name(), to handle kernel NULL pointer dereference error. Fixes: f9183eaad915 ("Bluetooth: btbcm: Use devm_kstrdup()") Signed-off-by: Charles Han Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btbcm.c | 3 +++ 1 file changed, 3 insertions(+) commit 30209aeff75fe18cf01a63332a7a7f472877d445 Author: Cheng Jiang Date: Tue Jan 7 17:26:50 2025 +0800 Bluetooth: qca: Expand firmware-name to load specific rampatch The firmware-name property has been expanded to specify the names of NVM and rampatch firmware for certain chips, such as the QCA6698 Bluetooth chip. Although it shares the same IP core as the WCN6855, the QCA6698 has different RF components and RAM sizes, necessitating new firmware files. This change allows for the configuration of NVM and rampatch in DT. Possible configurations: firmware-name = QCA6698/hpnv21.bin, QCA6698/hpbtfw21.tlv; firmware-name = QCA6698/hpnv21, QCA6698/hpbtfw21.tlv; Signed-off-by: Cheng Jiang Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btqca.c | 82 ++++++++++++++++++++++++--------------------- drivers/bluetooth/btqca.h | 5 +-- drivers/bluetooth/hci_qca.c | 22 +++++++++--- 3 files changed, 63 insertions(+), 46 deletions(-) commit a4c5a468c6329bde7dfd46bacff2cbf5f8a8152e Author: Cheng Jiang Date: Tue Jan 7 17:26:49 2025 +0800 Bluetooth: qca: Update firmware-name to support board specific nvm Different connectivity boards may be attached to the same platform. For example, QCA6698-based boards can support either a two-antenna or three-antenna solution, both of which work on the sa8775p-ride platform. Due to differences in connectivity boards and variations in RF performance from different foundries, different NVM configurations are used based on the board ID. Therefore, in the firmware-name property, if the NVM file has an extension, the NVM file will be used. Otherwise, the system will first try the .bNN (board ID) file, and if that fails, it will fall back to the .bin file. Possible configurations: firmware-name = "QCA6698/hpnv21"; firmware-name = "QCA6698/hpnv21.bin"; Signed-off-by: Cheng Jiang Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btqca.c | 113 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 85 insertions(+), 28 deletions(-) commit 86029c6025292920bc32210ee556acb8cacffcc8 Author: Cheng Jiang Date: Tue Jan 7 17:26:48 2025 +0800 dt-bindings: net: bluetooth: qca: Expand firmware-name property Expand the firmware-name property to specify the names of NVM and rampatch firmware to load. This update will support loading specific firmware (nvm and rampatch) for certain chips, like the QCA6698 Bluetooth chip, which shares the same IP core as the WCN6855 but has different RF components and RAM sizes, requiring new firmware files. We might use different connectivity boards on the same platform. For example, QCA6698-based boards can support either a two-antenna or three-antenna solution, both of which work on the sa8775p-ride platform. Due to differences in connectivity boards and variations in RF performance from different foundries, different NVM configurations are used based on the board ID. So In firmware-name, if the NVM file has an extension, the NVM file will be used. Otherwise, the system will first try the .bNN (board ID) file, and if that fails, it will fall back to the .bin file. Possible configurations: firmware-name = "QCA6698/hpnv21.bin", "QCA6698/hpbtfw21.tlv"; firmware-name = "QCA6698/hpnv21", "QCA6698/hpbtfw21.tlv"; firmware-name = "QCA6698/hpnv21.bin"; Acked-by: Krzysztof Kozlowski Signed-off-by: Cheng Jiang Signed-off-by: Luiz Augusto von Dentz .../devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f63f401130e5c5cd0dd2f18c9df967ab75cd4732 Author: En-Wei Wu Date: Tue Dec 24 14:35:22 2024 +0800 Bluetooth: btusb: Add new VID/PID 13d3/3628 for MT7925 Add VID 13d3 & PID 3628 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=01 Prnt=01 Port=03 Cnt=03 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=3628 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: En-Wei Wu Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 2 ++ 1 file changed, 2 insertions(+) commit 45e7d389bf2e52dfc893779c611dd5cff461b590 Author: Andrew Halaney Date: Tue Dec 24 14:42:11 2024 -0600 Bluetooth: btusb: Add new VID/PID 13d3/3610 for MT7922 A new machine has a Archer AX3000 / TX55e in it, and out the box reported issues resetting hci0. It looks like this is a MT7922 from the lspci output, so treat it as a MediaTek device and use the proper callbacks. With that in place an xbox controller can be used without issue as seen below: [ 7.047388] Bluetooth: hci0: HW/SW Version: 0x008a008a, Build Time: 20241106163512 [ 9.583883] Bluetooth: hci0: Device setup in 2582842 usecs [ 9.583895] Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported. [ 9.644780] Bluetooth: hci0: AOSP extensions version v1.00 [ 9.644784] Bluetooth: hci0: AOSP quality report is supported [ 876.379876] input: Xbox Wireless Controller as /devices/virtual/misc/uhid/0005:045E:0B13.0006/input/input27 [ 876.380215] hid-generic 0005:045E:0B13.0006: input,hidraw3: BLUETOOTH HID v5.15 Gamepad [Xbox Wireless Controller] on c0:bf:be:27:de:f7 [ 876.429368] input: Xbox Wireless Controller as /devices/virtual/misc/uhid/0005:045E:0B13.0006/input/input28 [ 876.429423] microsoft 0005:045E:0B13.0006: input,hidraw3: BLUETOOTH HID v5.15 Gamepad [Xbox Wireless Controller] on c0:bf:be:27:de:f7 lspci output: root@livingroom:/home/ajhalaney/git# lspci ... 05:00.0 Network controller: MEDIATEK Corp. MT7922 802.11ax PCI Express Wireless Network Adapter and USB device: root@livingroom:/home/ajhalaney/git# cat /sys/kernel/debug/usb/devices ... T: Bus=01 Lev=01 Prnt=01 Port=10 Cnt=03 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=3610 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: Andrew Halaney Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 2 ++ 1 file changed, 2 insertions(+) commit b16b327edb4d030fb4c8fe38c7d299074d47ee3f Author: Ying Hsu Date: Fri Dec 13 12:04:22 2024 +0800 Bluetooth: btusb: add sysfs attribute to control USB alt setting When a Bluetooth raw socket is open, the HCI event related to SCO connection changes are not dispatched to the hci_event module, and the underlying Bluetooth controller's USB Interface 1 will not be updated accordingly. This patch adds `isoc_alt` sysfs attribute, allowing user space to update the alternate setting of the USB interface alternate setting as needed. Signed-off-by: Ying Hsu Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit a6587d7ed2cd8341f8a92112ac772f2c44f09824 Author: Mark Dietzer Date: Thu Dec 12 16:02:55 2024 -0800 Bluetooth: btusb: Add ID 0x2c7c:0x0130 for Qualcomm WCN785x Adds a new entry with VID 0x2c7c and PID 0x0130 to the btusb quirks table as it uses a Qualcomm WCN785x chipset The device information from /sys/kernel/debug/usb/devices is provided below: T: Bus=01 Lev=01 Prnt=01 Port=04 Cnt=05 Dev#= 7 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0130 Rev= 0.01 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA 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=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) 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=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#= 1 Alt= 7 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 65 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 65 Ivl=1ms Signed-off-by: Mark Dietzer Signed-off-by: Luiz Augusto von Dentz drivers/bluetooth/btusb.c | 2 ++ 1 file changed, 2 insertions(+) commit b05ce8896091233fb0e4bf506862abaebdd8945b Author: Dr. David Alan Gilbert Date: Mon Dec 16 01:26:36 2024 +0000 Bluetooth: hci: Remove deadcode hci_bdaddr_list_del_with_flags() was added in 2020's commit 8baaa4038edb ("Bluetooth: Add bdaddr_list_with_flags for classic whitelist") but has remained unused. hci_remove_ext_adv_instance() was added in 2020's commit eca0ae4aea66 ("Bluetooth: Add initial implementation of BIS connections") but has remained unused. Remove them. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci_core.h | 2 -- include/net/bluetooth/hci_sync.h | 1 - net/bluetooth/hci_core.c | 20 -------------------- net/bluetooth/hci_sync.c | 24 ------------------------ 4 files changed, 47 deletions(-) commit e209e5ccc5ac4b2637159ea19be95a1b16846f31 Author: Luiz Augusto von Dentz Date: Mon Nov 25 15:42:11 2024 -0500 Bluetooth: MGMT: Mark LL Privacy as stable This marks LL Privacy as stable by removing its experimental UUID and move its functionality to Device Flag (HCI_CONN_FLAG_ADDRESS_RESOLUTION) which can be set by MGMT Device Set Flags so userspace retain control of the feature. Link: https://github.com/bluez/bluez/issues/1028 Signed-off-by: Luiz Augusto von Dentz include/net/bluetooth/hci.h | 1 - include/net/bluetooth/hci_core.h | 11 ++-- net/bluetooth/hci_sync.c | 52 ++++++++------- net/bluetooth/mgmt.c | 133 +-------------------------------------- 4 files changed, 35 insertions(+), 162 deletions(-) commit 48b5bccf4d568c9d9a83efde5c46bbd33b701cc3 Merge: 80524ab28457 ad4c9a8a9803 Author: Kalle Valo Date: Wed Jan 15 17:21:32 2025 +0200 Merge tag 'mt76-for-kvalo-2025-01-14' of https://github.com/nbd168/wireless mt76 patches for 6.14 - mlo fixes for mt792x - single wiphy multiband support for mt7996 - mt7915 stability fixes commit 80524ab28457507407d19223a1589eba789c3933 Merge: 1a0d24775cde 4b6652bc6d8d Author: Kalle Valo Date: Wed Jan 15 17:20:10 2025 +0200 Merge tag 'rtw-next-2025-01-12' of https://github.com/pkshih/rtw rtw-next patches for v6.14 rtl8xxxu, rtlwifi and rtw88 fix field issues reported by users. rtw89 is ongoing to implement MLO and fix issues during the development. Major changes: rtw88: - support LED blinking rtw89: - support RTL8922AE-VS chip commit 47a836da9ca91ab95b3cf1b2218db60bd67d4514 Merge: 26a6cc10f19a 43d84701d2aa Author: Greg Kroah-Hartman Date: Wed Jan 15 16:16:16 2025 +0100 Merge tag 'thunderbolt-for-v6.14-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next Pull Thunderbolt updates from Mika: thunderbolt: Changes for v6.14 merge window This includes following USB4/Thunderbolt changes for the v6.14 merge window: - Add debugfs write capability to path config spaces. - Expose router DROM through debugfs. - Increase DPRX capabilities read timeout to support runtime suspending of graphics driver. - Handle DisplayPort tunnel activation asynchronously. - Small cleanups. All these have been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.14-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Expose router DROM through debugfs thunderbolt: Handle DisplayPort tunnel activation asynchronously thunderbolt: Rework tb_tunnel_consumed_bandwidth() thunderbolt: Move forward declarations in one place thunderbolt: Pass reason to tb_dp_resource_unavailable() thunderbolt: Drop tb_tunnel_restart() thunderbolt: Rework how tunnel->[init|deinit] hooks are called thunderbolt: Show path name in debug log when path is deactivated thunderbolt: Make tb_tunnel_one_dp() return void thunderbolt: Increase DPRX capabilities read timeout thunderbolt: Debug log an invalid config space reply just once thunderbolt: Log config space when invalid config space reply is received thunderbolt: Drop doubled empty line from ctl.h thunderbolt: debugfs: Add write capability to path config space commit 2816b0c949af89640b8dc05de53e650cbf1d55fb Author: Lukas Bulwahn Date: Fri Jan 10 13:07:36 2025 +0100 MAINTAINERS: Adjust the file entry for the qnap-mcu header Commit 998f70d1806b ("mfd: Add base driver for qnap-mcu devices") adds a file entry in MAINTAINERS referring to the file include/linux/qnap-mcu.h, whereas the file added in the commit is placed in include/linux/mfd/. Adjust the file entry to the actual location of this header file. Fixes: 998f70d1806b ("mfd: Add base driver for qnap-mcu devices") Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20250110120736.58831-1-lukas.bulwahn@redhat.com Signed-off-by: Lee Jones MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 756d4b7a873c1170b65ea1e4cf0312f0a3f9976f Author: Andrew Davis Date: Fri Jan 3 11:45:22 2025 -0600 dt-bindings: mfd: syscon: Fix ti,j784s4-acspcie-proxy-ctrl compatible This compatible was only added to the list for compatibility with older dtschema (<2024.02). Add it to the other list also so both new and old tools work. Fixes: 0d078d47cd3e ("dt-bindings: mfd: syscon: Add ti,j784s4-acspcie-proxy-ctrl compatible") Signed-off-by: Andrew Davis Reviewed-by: Siddharth Vadapalli Reviewed-by: Krzysztof Kozlowski Reviewed-by: Romain Naour Link: https://lore.kernel.org/r/20250103174524.28768-2-afd@ti.com Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + 1 file changed, 1 insertion(+) commit 476f519d1ba1671f97f657027b33d5833b9e691d Author: Andrew Davis Date: Fri Jan 3 11:45:24 2025 -0600 dt-bindings: mfd: syscon: Fix al,alpine-sysfabric-service compatible This compatible seems to be missing the last 'e', looks to be a typo when creating this file. Noticed this when diff'ing the two compatible lists (which should stay in sync). Fixes: f97b0435c857 ("dt-bindings: mfd: syscon: Split and enforce documenting MFD children") Signed-off-by: Andrew Davis Reviewed-by: Siddharth Vadapalli Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250103174524.28768-4-afd@ti.com Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/syscon.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 677184d6e4300c1aed4221960b18d9c0598e4253 Merge: 97d139585aeb eca836dfd838 Author: Arnd Bergmann Date: Wed Jan 15 15:59:24 2025 +0100 Merge tag 'samsung-drivers-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers Samsung SoC drivers for v6.14 1. Add new bindings for sysreg in Exynos8895. 2. Minor improvements in Exynos USI bindings. 3. Fix for Smatch warning in Exynos PMU syscon driver. * tag 'samsung-drivers-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: exynos-pmu: Fix uninitialized ret in tensor_set_bits_atomic() dt-bindings: soc: samsung: exynos-sysreg: add sysreg compatibles for exynos8895 dt-bindings: samsung: exynos-usi: Restrict possible samsung,mode values Link: https://lore.kernel.org/r/20250112180846.64154-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 97d139585aebd8d0d1d32b1724990aff23328e5a Merge: 5bdaf99424db 1d45a1cd9f3a Author: Arnd Bergmann Date: Wed Jan 15 15:58:01 2025 +0100 Merge tag 'qcom-drivers-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers Qualcomm driver updates for v6.14 The Qualcomm SCM drivers gains a number of fixes and improvements related to race conditions during initialization. QSEECOM and the EFI variable service therein is enabled for a few 8cx Gen 3 and X Elite boards. LLCC driver gains configuration for IPQ5424 and WRCACHE is enabled on X Elite. The BCM_TCS_CMD() macro is corrected and is cleaned up. Support for SM7225 and X 1 Plus are added to the pd-mapper. pmic_glink and the associated altmode driver are simplied using guards. socinfo is added for QCS9075 and serial number readout on MSM8916 devices is corrected. * tag 'qcom-drivers-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (29 commits) firmware: qcom: scm: add calls for wrapped key support soc: qcom: pd_mapper: Add SM7225 compatible dt-bindings: firmware: qcom,scm: Document ipq5424 SCM soc: qcom: llcc: Update configuration data for IPQ5424 dt-bindings: cache: qcom,llcc: Add IPQ5424 compatible firmware: qcom: scm: smc: Narrow 'mempool' variable scope firmware: qcom: scm: smc: Handle missing SCM device firmware: qcom: scm: Cleanup global '__scm' on probe failures firmware: qcom: scm: Fix missing read barrier in qcom_scm_get_tzmem_pool() firmware: qcom: scm: Fix missing read barrier in qcom_scm_is_available() soc: qcom: socinfo: add QCS9075 SoC ID dt-bindings: arm: qcom,ids: add SoC ID for QCS9075 soc: qcom: socinfo: Avoid out of bounds read of serial number firmware: qcom: scm: Allow QSEECOM on Huawei Matebook E Go (sc8280xp) firmware: qcom: scm: Allow QSEECOM for Windows Dev Kit 2023 firmware: qcom: scm: Allow QSEECOM for HP Omnibook X14 soc: qcom: rmtfs: constify rmtfs_class soc: qcom: rmtfs: allow building the module with COMPILE_TEST=y soc: qcom: pmic_glink_altmode: simplify locking with guard() soc: qcom: Rework BCM_TCS_CMD macro ... Link: https://lore.kernel.org/r/20250111172901.391774-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 5bdaf99424dbc0fb67f9623caecaab6a932174c9 Merge: 03c75b04eb90 31bd1f4517b6 Author: Arnd Bergmann Date: Wed Jan 15 15:57:32 2025 +0100 Merge tag 'ti-k3-maintainer-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers TI Maintainer updates for v6.14 - Maintain Programmable Real-time Unit Subsystem(PRUSS) SoC library interface header linux/pruss_driver.h * tag 'ti-k3-maintainer-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: MAINTAINERS: Add entry for linux/pruss_driver.h Link: https://lore.kernel.org/r/20250110210825.emk6zh4tfc6obv26@celestial Signed-off-by: Arnd Bergmann commit 03c75b04eb90cb254afa76d22bbed2dfadca5a7d Merge: f783d74ca6aa 836b341cc8da Author: Arnd Bergmann Date: Wed Jan 15 15:54:30 2025 +0100 Merge tag 'tegra-for-6.14-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers soc/tegra: Cleanups for v6.14-rc1 This contains debugfs error handling cleanup, a typofix and an update to the FUSE block's keepout list to properly allow reading these registers. * tag 'tegra-for-6.14-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: fuse: Update Tegra234 nvmem keepout list soc/tegra: Fix spelling error in tegra234_lookup_slave_timeout() soc/tegra: cbb: Drop unnecessary debugfs error handling Link: https://lore.kernel.org/r/20250110185355.4143505-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit f783d74ca6aa33a879fb2735a9126a7e266c6f39 Merge: 25205fe3504d c9c0036c1990 Author: Arnd Bergmann Date: Wed Jan 15 15:53:16 2025 +0100 Merge tag 'mtk-soc-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/drivers MediaTek soc driver updates for v6.14 This adds fixes avoiding iomap leaks on error paths in the MediaTek devapc driver. * tag 'mtk-soc-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux: soc: mediatek: mtk-devapc: Fix leaking IO map on driver remove soc: mediatek: mtk-devapc: Fix leaking IO map on error paths Link: https://lore.kernel.org/r/20250108100826.32458-2-angelogioacchino.delregno@collabora.com Signed-off-by: Arnd Bergmann commit 25205fe3504dd6ae967bed7dbe86fa30b2d7c6ec Merge: 14ade5aa1aee 0b4dc35529f8 Author: Arnd Bergmann Date: Wed Jan 15 15:49:31 2025 +0100 Merge tag 'imx-drivers-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/drivers i.MX drivers change for 6.14: - Add a SoC driver for i.MX9 (Alice Guo) * tag 'imx-drivers-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx: Add SoC device register for i.MX9 Link: https://lore.kernel.org/r/20250105095139.714590-1-shawnguo2@yeah.net Signed-off-by: Arnd Bergmann commit 9fe17b7466f6c1dd29bac83a7a53303b8b16410f Author: Saket Kumar Bhaskar Date: Fri Jan 10 16:01:09 2025 +0530 selftests/bpf: Fix test_xdp_adjust_tail_grow2 selftest on powerpc On powerpc cache line size is 128 bytes, so skb_shared_info must be aligned accordingly. Signed-off-by: Saket Kumar Bhaskar Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20250110103109.3670793-1-skb99@linux.ibm.com tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c | 2 ++ tools/testing/selftests/bpf/progs/test_xdp_adjust_tail_grow.c | 2 ++ 2 files changed, 4 insertions(+) commit d98bf6a6ed61a8047e199495b0887cce392f8e5b Author: Ai Chao Date: Wed Jan 15 10:28:24 2025 +0800 platform/x86: lenovo-wmi-camera: Use SW_CAMERA_LENS_COVER instead of KEY_CAMERA_ACESS Use SW_CAMERA_LENS_COVER instead of KEY_CAMERA_ACESS_ENABLE and KEY_CAMERA_ACESS_DISABLE. When the camera toggle switch was hit, the lenovo-wmi-camera driver would report an event code. Signed-off-by: Ai Chao Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250115022825.101986-1-aichao@kylinos.cn Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/lenovo-wmi-camera.c | 69 ++++++++++++++++++++------------ 1 file changed, 44 insertions(+), 25 deletions(-) commit 549fcf58cf5837d401d0de906093169b05365609 Author: Hridesh MG Date: Mon Jan 13 18:44:13 2025 +0530 platform/x86: acer-wmi: add support for Acer Nitro AN515-58 Add predator_v4 quirk for the Acer Nitro AN515-58 to enable fan speed monitoring and platform_profile handling. Signed-off-by: Hridesh MG Reviewed-by: Kurt Borja Link: https://lore.kernel.org/r/20250113-platform_profile-v4-5-23be0dff19f1@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/acer-wmi.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 191e21f1a4c3948957adc037734449f4a965dec5 Author: Hridesh MG Date: Mon Jan 13 18:44:12 2025 +0530 platform/x86: acer-wmi: use an ACPI bitmap to set the platform profile choices Currently the choices for the platform profile are hardcoded. There is an ACPI bitmap accessible via WMI that specifies the supported profiles, use this bitmap to dynamically set the choices for the platform profile. Link: https://lore.kernel.org/platform-driver-x86/ecb60ee5-3df7-4d7e-8ebf-8c162b339ade@gmx.de/ Signed-off-by: Hridesh MG Reviewed-by: Kurt Borja Link: https://lore.kernel.org/r/20250113-platform_profile-v4-4-23be0dff19f1@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/acer-wmi.c | 67 ++++++++++++++++++++++++++++++++--------- 1 file changed, 52 insertions(+), 15 deletions(-) commit 61c461a90fbfc038d9663713f293d60fcb58c41d Author: Hridesh MG Date: Mon Jan 13 18:44:11 2025 +0530 platform/x86: acer-wmi: simplify platform profile cycling Make use of platform_profile_cycle() to simplify the logic used for cycling through the different platform profiles. Also remove the unnecessary handling for AC power, as the hardware accepts different profiles regardless of whether AC is plugged in. Link: https://lore.kernel.org/platform-driver-x86/20e3ac66-b040-49a9-ab00-0adcfdaed2ff@gmx.de/ Signed-off-by: Hridesh MG Reviewed-by: Kurt Borja Link: https://lore.kernel.org/r/20250113-platform_profile-v4-3-23be0dff19f1@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/acer-wmi.c | 78 ++++++++++------------------------------- 1 file changed, 19 insertions(+), 59 deletions(-) commit cd44e09bb89d4a33514b9ec3d972f0d2d13f5cfd Author: Hridesh MG Date: Mon Jan 13 18:44:10 2025 +0530 platform/x86: acer-wmi: use new helper function for setting overclocks Migrate the OC handling in acer_toggle_turbo() to the new helper function for issuing the SetGamingMiscSetting WMI call. Reviewed-by: Kurt Borja Signed-off-by: Hridesh MG Link: https://lore.kernel.org/r/20250113-platform_profile-v4-2-23be0dff19f1@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/acer-wmi.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 2d76708c2221dde33d86aeef19f6d7d5f62148b4 Author: Hridesh MG Date: Mon Jan 13 18:44:09 2025 +0530 platform/x86: acer-wmi: use WMI calls for platform profile handling Improve the platform profile handling by using WMI calls to fetch the current platform profile instead of directly accessing it from the EC. This is beneficial because the EC address differs for certain laptops. Link: https://lore.kernel.org/platform-driver-x86/d7be714c-3103-42ee-ad15-223a3fe67f80@gmx.de/ Co-developed-by: Armin Wolf Signed-off-by: Armin Wolf Reviewed-by: Kurt Borja Signed-off-by: Hridesh MG Link: https://lore.kernel.org/r/20250113-platform_profile-v4-1-23be0dff19f1@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/acer-wmi.c | 185 ++++++++++++++++++++++++++++------------ 1 file changed, 129 insertions(+), 56 deletions(-) commit 7ba618e893a4580b04fb883aaed3f00539c3c361 Author: Illia Ostapyshyn Date: Thu Nov 14 18:39:30 2024 +0100 platform/x86: thinkpad_acpi: Add support for new phone link hotkey The F11 key on the new Lenovo Thinkpad T14 Gen 5, T16 Gen 3, and P14s Gen 5 laptops includes a symbol showing a smartphone and a laptop chained together. According to the user manual, it starts the Microsoft Phone Link software used to connect to Android/iOS devices and relay messages/calls or sync data. These laptops send the 0x1320 hkey event when the key is pressed. Map this event to the new KEY_LINK_PHONE keycode. Signed-off-by: Illia Ostapyshyn Link: https://lore.kernel.org/r/20241114173930.44983-3-illia@yshyn.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/thinkpad_acpi.c | 1 + 1 file changed, 1 insertion(+) commit 1bebc7869c99d466f819dd2cffaef0edf7d7a035 Author: Illia Ostapyshyn Date: Thu Nov 14 18:39:29 2024 +0100 Input: allocate keycode for phone linking The F11 key on the new Lenovo Thinkpad T14 Gen 5, T16 Gen 3, and P14s Gen 5 laptops includes a symbol showing a smartphone and a laptop chained together. According to the user manual, it starts the Microsoft Phone Link software used to connect to Android/iOS devices and relay messages/calls or sync data. As there are no suitable keycodes for this action, introduce a new one. Signed-off-by: Illia Ostapyshyn Acked-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20241114173930.44983-2-illia@yshyn.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen include/uapi/linux/input-event-codes.h | 1 + 1 file changed, 1 insertion(+) commit cec8c359f87c0f7c9cf63b570c0ce968b5ef62a4 Author: Armin Wolf Date: Mon Jan 13 23:13:14 2025 +0100 Input: i8042 - Add support for platform filter contexts Currently the platform filter cannot access any driver-specific state which forces drivers installing a i8042 filter to have at least some kind of global pointer for their filter. Allow callers of i8042_install_filter() to submit a context pointer which is then passed to the i8042 filter. This frees drivers from the responsibility of having to manage this global pointer themself. Also introduce a separate type for the i8042 filter (i8042_filter_t) so that the function definitions can stay compact. Tested on a Dell Inspiron 3505. Reviewed-by: Ilpo Järvinen Acked-by: Dmitry Torokhov Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20250113221314.435812-1-W_Armin@gmx.de Signed-off-by: Ilpo Järvinen drivers/input/misc/ideapad_slidebar.c | 4 ++-- drivers/input/serio/i8042.c | 17 ++++++++++------- drivers/platform/x86/asus-nb-wmi.c | 3 ++- drivers/platform/x86/asus-wmi.c | 2 +- drivers/platform/x86/asus-wmi.h | 3 +-- drivers/platform/x86/dell/dell-laptop.c | 6 +++--- drivers/platform/x86/hp/hp_accel.c | 4 ++-- drivers/platform/x86/msi-laptop.c | 6 +++--- drivers/platform/x86/panasonic-laptop.c | 4 ++-- drivers/platform/x86/toshiba_acpi.c | 4 ++-- include/linux/i8042.h | 28 ++++++++++++++++++++-------- 11 files changed, 48 insertions(+), 33 deletions(-) commit 1e4e3dff9e13e3d12d78cf742980ca731af80c7b Author: Hans de Goede Date: Mon Jan 6 13:32:59 2025 +0100 platform/x86: dell-smo8800: Add support for probing for the accelerometer i2c address Unfortunately the SMOxxxx ACPI device does not contain the i2c-address of the accelerometer. So a DMI product-name to address mapping table is used. Add support to have the kernel probe for the i2c-address for models which are not on the list. The new probing code sits behind a new probe_i2c_addr module parameter, which is disabled by default because probing might be dangerous. Link: https://lore.kernel.org/linux-i2c/4820e280-9ca4-4d97-9d21-059626161bfc@molgen.mpg.de/ Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20250106123259.45970-1-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/dell/dell-lis3lv02d.c | 56 +++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 4 deletions(-) commit 913240e47b414653d7801f6d04cffa9146a13396 Author: Shravan Kumar Ramani Date: Thu Jan 9 09:39:23 2025 -0500 Documentation/ABI: Add new sysfs field to sysfs-platform-mellanox-pmc Document newly added "count_clock" sysfs entry for the Mellanox BlueField PMC driver. Signed-off-by: Shravan Kumar Ramani Reviewed-by: David Thompson Link: https://lore.kernel.org/r/367301238efff01fc200c67bca461c0424baf95d.1736413033.git.shravankr@nvidia.com [ij: corrected KernelVersion & Date] Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Documentation/ABI/testing/sysfs-platform-mellanox-pmc | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 8e3b3e1695ebf9bcb1814130550e6ddbf5798f28 Author: Shravan Kumar Ramani Date: Thu Jan 9 09:39:22 2025 -0500 platform/mellanox: mlxbf-pmc: Add support for clock_measure performance block The HW clock_measure counter info is passed to the driver from ACPI. Create a new sub-directory for clock_measure events and provide read access to the user. Writes are blocked since the fields are RO. Signed-off-by: Shravan Kumar Ramani Reviewed-by: David Thompson Reviewed-by: Vadim Pasternak Link: https://lore.kernel.org/r/6ea0699497479dfde0a52fcb28aef55aee1bbc0b.1736413033.git.shravankr@nvidia.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/mellanox/mlxbf-pmc.c | 46 ++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 4 deletions(-) commit 5efc800975d9a66cf7e7684c07d4c1928f025972 Author: Shravan Kumar Ramani Date: Thu Jan 9 09:39:21 2025 -0500 platform/mellanox: mlxbf-pmc: Add support for monitoring cycle count Add support for programming any counter to monitor the cycle count. This will allow the user to repurpose and dedicate any of the counters in the block to counting cycles. Signed-off-by: Shravan Kumar Ramani Reviewed-by: David Thompson Reviewed-by: Vadim Pasternak Link: https://lore.kernel.org/r/bd7747897cf1ce77e2e39e271cac21684830f7e7.1736413033.git.shravankr@nvidia.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/mellanox/mlxbf-pmc.c | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 1b32401b52084d3b5b29c18b95dc0a8757cca132 Author: Shravan Kumar Ramani Date: Thu Jan 9 09:39:20 2025 -0500 Documentation/ABI: Add document for Mellanox PMC driver Document the sysfs interface for programming and monitoring the performance counters in various HW blocks of Mellanox BlueField-1, BlueField-2 and BlueField-3. Signed-off-by: Shravan Kumar Ramani Reviewed-by: David Thompson Link: https://lore.kernel.org/r/9a9e69bd99cad3ad8d1847a6e4e10aff80c6df50.1736413033.git.shravankr@nvidia.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen .../ABI/testing/sysfs-platform-mellanox-pmc | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 761bea182af6c796d1607894b96964554cfeb764 Author: Dr. David Alan Gilbert Date: Sat Dec 21 23:48:07 2024 +0000 platform/x86: intel: punit_ipc: Remove unused function intel_punit_ipc_simple_command() was added in 2015 by commit fdca4f16f57d ("platform:x86: add Intel P-Unit mailbox IPC driver") but never used. Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20241221234807.160473-1-linux@treblig.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen arch/x86/include/asm/intel_punit_ipc.h | 7 ------- drivers/platform/x86/intel/punit_ipc.c | 33 --------------------------------- 2 files changed, 40 deletions(-) commit a5ddea4f9c35349bae7934cfc9bcb3a86b93a0f8 Author: Kurt Borja Date: Sun Jan 5 10:30:06 2025 -0500 platform/x86: alienware_wmi: General cleanup of WMAX methods Reorder variable declaration from longest to shortest. Standarize show/store method names of WMAX's sysfs groups. Reviewed-by: Armin Wolf Signed-off-by: Kurt Borja Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20250105153019.19206-8-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/dell/alienware-wmi.c | 72 ++++++++++++++++--------------- 1 file changed, 37 insertions(+), 35 deletions(-) commit 61493f947220e36df6468d61f94501152ed2477c Author: Kurt Borja Date: Sun Jan 5 10:30:05 2025 -0500 platform/x86: alienware-wmi: Improve rgb-zones group creation Define zone_attrs statically and initialize zone_attribute_group with platform driver's .dev_groups. Drop match_zone() and instead pass a `location` argument to previous show/store methods to access the correct `zone` LED state. On top of that rename zone_set() -> zone_store() to be more consistent with sysfs conventions. Reviewed-by: Armin Wolf Signed-off-by: Kurt Borja Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20250105153019.19206-7-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen drivers/platform/x86/dell/alienware-wmi.c | 212 +++++++++++++++--------------- 1 file changed, 105 insertions(+), 107 deletions(-) commit f2809aa4f591d98e4c560a23d7eaca804a8afc54 Author: Raphael Gallais-Pou Date: Thu Jan 9 18:54:27 2025 +0100 ahci: st: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() Letting the compiler remove these functions when the kernel is built without CONFIG_PM_SLEEP support is simpler and less error prone than the use of #ifdef based kernel configuration guards. Signed-off-by: Raphael Gallais-Pou Reviewed-by: Niklas Cassel Link: https://lore.kernel.org/r/20250109175427.64384-1-rgallaispou@gmail.com Signed-off-by: Niklas Cassel drivers/ata/ahci_st.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 17615e4216115a0454e0f2007267a006231dcb7d Author: Simon Trimmer Date: Thu Jan 2 20:33:35 2025 +0800 ASoC: Intel: sof_sdw: Fix DMI match for Lenovo 83JX, 83MC and 83NM Update the DMI match for a Lenovo laptop to a new DMI identifier. This laptop ships with a different DMI identifier to what was expected and now has three match entries. It also has the DMICs connected to the host rather than the cs42l43 codec. Signed-off-by: Simon Trimmer Fixes: 83c062ae81e8 ("ASoC: Intel: sof_sdw: Add quirks for some new Lenovo laptops") Reviewed-by: Liam Girdwood Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://patch.msgid.link/20250102123335.256698-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit c9e05763f334845ba69494dd71d7cbfd05fd0e6e Author: Simon Trimmer Date: Thu Jan 2 20:33:34 2025 +0800 ASoC: Intel: sof_sdw: Fix DMI match for Lenovo 83LC Update the DMI match for a Lenovo laptop to the new DMI identifier. This laptop ships with a different DMI identifier to what was expected, and also has the DMICs connected to the host rather than the cs42l43 codec. Signed-off-by: Simon Trimmer Fixes: 83c062ae81e8 ("ASoC: Intel: sof_sdw: Add quirks for some new Lenovo laptops") Reviewed-by: Liam Girdwood Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://patch.msgid.link/20250102123335.256698-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown sound/soc/intel/boards/sof_sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14ade5aa1aee36ddf03c193c583a0bc9682b8727 Merge: 8de2819d07fc 3f3f0e53e9ae Author: Arnd Bergmann Date: Wed Jan 15 15:14:38 2025 +0100 Merge tag 'scmi-updates-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers Arm SCMI updates for 6.14 This mainly has 2 updates: 1. Extension of the transport properties read from devicetree to support multiple SCMI platform/server instances 2. Addition of the capability to automatically load the proper SCMI vendor protocol module. The vendor protocol selection is already provided by the SCMI core while the automatic loading of vendor protocols was not. * tag 'scmi-updates-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Add aliases to transport modules firmware: arm_scmi: Add module aliases to i.MX vendor protocols firmware: arm_scmi: Support vendor protocol modules autoloading firmware: arm_scmi: Allow transport properties for multiple instances Link: https://lore.kernel.org/r/20250102154024.2168165-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 8de2819d07fc0f2dd48d20df2a342128fb3d030c Merge: 3292e5ac4264 df8e78607d47 Author: Arnd Bergmann Date: Wed Jan 15 15:11:33 2025 +0100 Merge tag 'memory-controller-drv-ti-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers Memory controller drivers for v6.14 - TI TI AEMIF driver enhancements: some refactoring around timing parameters and finally adding plus exporting interfaces for devices using the AEMIF interface (e.g. TI Davinci NAND controller) to better configure the memory interface. The exported functions are going to be used by: drivers/mtd/nand/raw/davinci_nand.c * tag 'memory-controller-drv-ti-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: ti-aemif: Export aemif_*_cs_timings() memory: ti-aemif: Create aemif_set_cs_timings() memory: ti-aemif: Create aemif_check_cs_timings() memory: ti-aemif: Wrap CS timings into a struct memory: ti-aemif: Remove unnecessary local variables memory: ti-aemif: Store timings parameter in number of cycles - 1 Link: https://lore.kernel.org/r/20241231133534.136771-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 3292e5ac426451c71e1a4924240ff6e7149d6343 Merge: 384727c43275 b9784e5cde1f Author: Arnd Bergmann Date: Wed Jan 15 15:10:52 2025 +0100 Merge tag 'memory-controller-drv-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers Memory controller drivers for v6.14 1. OMAP GPMC: Cleanup dead code. 2. Tegra20 EMC: Fix OF reference counting when iterating over emc-tables. * tag 'memory-controller-drv-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: tegra20-emc: fix an OF node reference bug in tegra_emc_find_node_by_ram_code() memory: omap-gpmc: deadcode a pair of functions Link: https://lore.kernel.org/r/20241231133534.136771-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 384727c43275d4d389a5f5d5aec8e785ec87ddbb Merge: 220fcc13c093 1ff7d092dce0 Author: Arnd Bergmann Date: Wed Jan 15 15:10:12 2025 +0100 Merge tag 'optee-for-v6.14' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers Fix format string for printing optee build_id * tag 'optee-for-v6.14' of https://git.linaro.org/people/jens.wiklander/linux-tee: optee: fix format string for printing optee build_id Link: https://lore.kernel.org/r/20250102140102.GA3082088@rayden Signed-off-by: Arnd Bergmann commit fa8592f24944faf552c9a553ed64a3d5fe4e2cd9 Merge: 71867d16d6b2 e7177ecdd2b7 Author: Arnd Bergmann Date: Wed Jan 15 15:06:42 2025 +0100 Merge tag 'riscv-config-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/defconfig RISC-V config for v6.14 One patch, from Drew, enabling drivers in defconfig for the th1520. Signed-off-by: Conor Dooley * tag 'riscv-config-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: defconfig: enable pinctrl and dwmac support for TH1520 Link: https://lore.kernel.org/r/20250113-colt-retired-6f95df3dc197@spud Signed-off-by: Arnd Bergmann commit 71867d16d6b2cc6798a1989dddcb0676383ca41b Merge: 8dc9697921b3 1fe6c70fec8f Author: Arnd Bergmann Date: Wed Jan 15 15:05:46 2025 +0100 Merge tag 'qcom-arm64-defconfig-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/defconfig Qualcomm Arm64 defconfig updates for v6.14 Enable core drivers for SM8750, QCS8300, SA8775P, and QCS615. Enable the IPQ CMD PLL driver. Drop the 8650 display clock option, now that the driver has been consolidated with 8550. * tag 'qcom-arm64-defconfig-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: Enable Qualcomm IPQ CMN PLL clock controller arm64: defconfig: Enable basic Qualcomm SM8750 SoC drivers arm64: defconfig: remove obsolete CONFIG_SM_DISPCC_8650 arm64: defconfig: enable clock controller, interconnect and pinctrl for QCS8300 arm64: defconfig: Enable sa8775p clock controllers arm64: defconfig: enable clock controller, interconnect and pinctrl for QCS615 Link: https://lore.kernel.org/r/20250111173306.392204-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 8dc9697921b38f2fb3d23c7a658506738f0e2a3a Merge: 5eb5d4c6d4a3 06835ccec2ef Author: Arnd Bergmann Date: Wed Jan 15 15:05:12 2025 +0100 Merge tag 'v6.14-rockchip-defconfig64-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/defconfig Rockchip DRM extension for the DW-HDMI-QP controller and rfkill-gpio. * tag 'v6.14-rockchip-defconfig64-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: defconfig: Enable Rockchip extensions for Synopsys DW HDMI QP arm64: defconfig: Enable RFKILL GPIO Link: https://lore.kernel.org/r/3095859.687JKscXgg@diego Signed-off-by: Arnd Bergmann commit 5eb5d4c6d4a31319a982c43669f46099c088b5d5 Merge: 499a3dda0b17 184caba444cf Author: Arnd Bergmann Date: Wed Jan 15 15:04:38 2025 +0100 Merge tag 'ti-k3-config-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/defconfig TI K3 defconfig updates for v6.14 - Enable M4F remote proc support for AM62x based platforms such as BeaglePlay, phyboard, verdin, SK etc. * tag 'ti-k3-config-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: arm64: defconfig: Enable TI K3 M4 remoteproc driver Link: https://lore.kernel.org/r/20250110210759.fd6a3ed7q52zkpnw@rogue Signed-off-by: Arnd Bergmann commit 499a3dda0b17f7ceb568a29b9f9d2c8cfcf2a97a Merge: c036b5230248 cab316255951 Author: Arnd Bergmann Date: Wed Jan 15 15:03:52 2025 +0100 Merge tag 'mtk-defconfig-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/defconfig MediaTek soc defcofnig updates for v6.14 This enables building modules for the integrated Ethernet controllers (MediaTek STAR and MediaTek DWMAC Glue layer) found on various MediaTek SoCs, and building modules for enabling the sound card on MT8188 and DSP on MT8186. * tag 'mtk-defconfig-for-v6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux: arm64: defconfig: Enable MediaTek DWMAC arm64: defconfig: Enable sound for MT8188 arm64: defconfig: Enable MediaTek STAR Ethernet MAC Link: https://lore.kernel.org/r/20250108100826.32458-3-angelogioacchino.delregno@collabora.com Signed-off-by: Arnd Bergmann commit c036b5230248ab1c79d8e0a40720f17a36dd904c Merge: f16d91d8febf 221984deceee Author: Arnd Bergmann Date: Wed Jan 15 15:02:12 2025 +0100 Merge tag 'at91-defconfig-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/defconfig Microchip AT91 defconfig updates for v6.14 This update includes: - support for the SAMA7D65 SoC * tag 'at91-defconfig-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: configs: at91: sama7: add new SoC config Link: https://lore.kernel.org/r/20250107081424.758980-1-claudiu.beznea@tuxon.dev Signed-off-by: Arnd Bergmann commit f16d91d8febfab45a89007d8af4d81692db7845f Author: Igor Belwon Date: Tue Dec 31 14:17:39 2024 +0100 dt-bindings: soc: samsung: exynos-pmu: Add exynos990-pmu compatible Add a dt-binding compatible for the Exynos990 PMU. It's compatible with the Exynos7 PMU design. It handles system reboot, as well as other system control registers (i.e registers for the USB PHY). Signed-off-by: Igor Belwon Acked-by: Conor Dooley Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20241204145559.524932-2-igor.belwon@mentallysanemainliners.org Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20241231131742.134329-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml | 1 + 1 file changed, 1 insertion(+) commit d2ca319822e071423ab883bc8493053320b8e52c Author: André Draszik Date: Tue Dec 31 14:17:38 2024 +0100 arm64: defconfig: enable Maxim TCPCI driver Enable the Maxim max33359 as this is used by the gs101-oriole (Google Pixel 6) board. Reviewed-by: Peter Griffin Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20241203-gs101-phy-lanes-orientation-dts-v2-1-1412783a6b01@linaro.org Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20241231131742.134329-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 029625d16a44e638ea307fe09f4206c94615c2b0 Merge: 90d96a122748 2b21c2306a90 Author: Arnd Bergmann Date: Wed Jan 15 15:01:24 2025 +0100 Merge tag 'imx-defconfig-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/defconfig i.MX defconfig change for 6.14: - Enable JC42 temperature sensor driver support in imx_v6_v7_defconfig (Alexander Stein) - Enable ITE IT6263 LVDS to HDMI converter driver support in arm64 defconfig (Liu Ying) * tag 'imx-defconfig-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: defconfig: Enable ITE IT6263 driver ARM: imx_v6_v7_defconfig: enable JC42 for TQMa7x Link: https://lore.kernel.org/r/20250105095139.714590-5-shawnguo2@yeah.net Signed-off-by: Arnd Bergmann commit 90d96a1227488766332ba23f55e3aa755d13b242 Author: Patrice Chotard Date: Fri Dec 20 13:55:06 2024 +0100 ARM: configs: stm32: Remove useless flags in STM32 defconfig As stm32_defconfig is dedicated to STM32 MCUs, disable CONFIG_COMMON_CLK_STM32MP flag which is only used by STM32 MPUs. Disable CONFIG_SUSPEND, CONFIG_ADVISE_SYSCALLS, CONFIG_IO_URING CONFIG_POSIX_TIMERS, CONFIG_GCC_PLUGINS, it will reduce the kernel image size for these platforms which embed a low amount of memory. Tested on STM32F746-DISCO board which embeds 8MB of memory. Signed-off-by: Patrice Chotard Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20241220125506.3157268-5-patrice.chotard@foss.st.com Signed-off-by: Arnd Bergmann arch/arm/configs/stm32_defconfig | 6 ++++++ 1 file changed, 6 insertions(+) commit c1bfeadfd8a230c01d66d5a891011535bacb76ae Author: Patrice Chotard Date: Fri Dec 20 13:55:05 2024 +0100 ARM: configs: stm32: Remove CRYPTO in STM32 defconfig Running make savedefconfig highlights some useless flags. Since 1c92d4a0edcf ("ARM: configs: stm32: Enable MMC_ARMMMCI and EXT3_FS support") CRYPTO is selected by EXT3_FS, so CRYPTO can be removed in stm32_defconfig. Signed-off-by: Patrice Chotard Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20241220125506.3157268-4-patrice.chotard@foss.st.com Signed-off-by: Arnd Bergmann arch/arm/configs/stm32_defconfig | 1 - 1 file changed, 1 deletion(-) commit c556c3444acdc62087ed4d9637196f5c6061d7eb Author: Patrice Chotard Date: Fri Dec 20 13:55:04 2024 +0100 ARM: configs: stm32: Clean STM32 defconfig Running make savedefconfig highlights some useless flags. Since 54a48aa3d558 ("Compiler Attributes: remove CONFIG_ENABLE_MUST_CHECK") flag ENABLE_MUST_CHECK has been removed. Since 35260cf54522 ("Kconfig.debug: fix SCHED_DEBUG dependency") SCHED_DEBUG depends on DEBUG_KERNEL and PROC_FS. As PROC_FS is not set, SCHED_DEBUG reference can be removed. Since 78011042684d ("scsi: bsg: Move bsg_scsi_ops to drivers/scsi/") BLK_DEV_BSG depends on SCSI. As SCSI is not set, BLK_DEV_BSG reference can be removed. Signed-off-by: Patrice Chotard Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20241220125506.3157268-3-patrice.chotard@foss.st.com Signed-off-by: Arnd Bergmann arch/arm/configs/stm32_defconfig | 3 --- 1 file changed, 3 deletions(-) commit 8637f225c5e513433c5f926aca14cb95e59f5386 Author: Patrice Chotard Date: Fri Dec 20 13:55:03 2024 +0100 ARM: configs: stm32: Remove FLASH_MEM_BASE and FLASH_SIZE in STM32 defconfig Running make savedefconfig highlights some useless flags. Remove FLASH_MEM_BASE and FLASH_SIZE as these 2 flags are only used by CPU_ARM740T,CPU_ARM940T and CPU_ARM946E which is not the case here for CPU_V7M. Signed-off-by: Patrice Chotard Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20241220125506.3157268-2-patrice.chotard@foss.st.com Signed-off-by: Arnd Bergmann arch/arm/configs/stm32_defconfig | 2 -- 1 file changed, 2 deletions(-) commit 1a0d24775cdee2b8dc14bfa4f4418c930ab1ac57 Author: Dmitry Antipov Date: Mon Jan 13 18:54:17 2025 +0300 wifi: cfg80211: adjust allocation of colocated AP data In 'cfg80211_scan_6ghz()', an instances of 'struct cfg80211_colocated_ap' are allocated as if they would have 'ssid' as trailing VLA member. Since this is not so, extra IEEE80211_MAX_SSID_LEN bytes are not needed. Briefly tested with KUnit. Fixes: c8cb5b854b40 ("nl80211/cfg80211: support 6 GHz scanning") Signed-off-by: Dmitry Antipov Link: https://patch.msgid.link/20250113155417.552587-1-dmantipov@yandex.ru Signed-off-by: Johannes Berg net/wireless/scan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a4058dc1e7b0051b2baf604fd9db8f1f7d529600 Author: Dan Carpenter Date: Wed Jan 15 09:54:52 2025 +0300 wifi: mac80211: fix memory leak in ieee80211_mgd_assoc_ml_reconf() Free the "data" allocation before returning on this error path. Fixes: 36e05b0b8390 ("wifi: mac80211: Support dynamic link addition and removal") Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/7ad826a7-7651-48e7-9589-7d2dc17417c2@stanley.mountain Signed-off-by: Johannes Berg net/mac80211/mlme.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e436d43551764bd6ca22a1ab1e80e98939b8aec7 Author: Martin Blumenstingl Date: Tue Jan 14 22:56:17 2025 +0100 ASoC: dapm: add support for preparing streams Codec driver can implement .hw_params and/or .prepare from struct snd_soc_dai_ops. For codec-to-codec links only the former (.hw_params) callback has been called. On platforms like Amlogic Meson8/8b/8m2 the SoC's sound card (sound/soc/meson/gx-card.c) uses a codec-to-codec link for the HDMI codec output because further digital routing is required after the backend. The new DRM HDMI (audio) codec framework (which internally uses sound/soc/codecs/hdmi-codec.c) relies on the .prepare callback of the hdmi-codec to be called. Implement calls to snd_soc_dai_prepare() so the .prepare callback is called. In this case the mandatory part is the call to prepare the sink (which is the hdmi-codec on those platforms). Also call snd_soc_dai_prepare() for the source to stay consistent with the rest of the code (even though it's not strictly necessary to make the DRM HDMI codec framework work on Amlogic Meson8/8b/8m2). For platforms or sound cards without a codec-to-codec link with additional parameters (which applies to most hardware) this changes nothing as the .prepare callback is already called via snd_pcm_do_prepare() (as well as dpcm_fe_dai_prepare() and dpcm_be_dai_prepare()) on those. Suggested-by: Jerome Brunet Reviewed-by: Charles Keepax Reviewed-by: Jerome Brunet Signed-off-by: Martin Blumenstingl Link: https://patch.msgid.link/20250114215617.336105-3-martin.blumenstingl@googlemail.com Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d4e91adfc261de1454538ee6437e6014a2d1fca1 Author: Martin Blumenstingl Date: Tue Jan 14 22:56:16 2025 +0100 ASoC: soc-dai: add snd_soc_dai_prepare() and use it internally Add a new snd_soc_dai_prepare() which can be used (in an upcoming patch) by soc-dapm.c. Use this new function internally in snd_soc_pcm_dai_prepare() to avoid duplicating code. Suggested-by: Jerome Brunet Reviewed-by: Charles Keepax Reviewed-by: Jerome Brunet Signed-off-by: Martin Blumenstingl Acked-by: Kuninori Morimoto Link: https://patch.msgid.link/20250114215617.336105-2-martin.blumenstingl@googlemail.com Signed-off-by: Mark Brown include/sound/soc-dai.h | 3 +++ sound/soc/soc-dai.c | 27 +++++++++++++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) commit 04e97fa7dd7e3eda754712f92df2136acd1d9088 Author: Laurentiu Mihalcea Date: Tue Jan 14 13:43:14 2025 -0500 ASoC: simple-card-utils: fix priv->dai_props indexing As of commit cb18cd26039f ("ASoC: soc-core: do rtd->id trick at snd_soc_add_pcm_runtime()") the ID stored in the PCM runtime data can no longer be safely used to index the priv->dai_props array. This is because the ID may be modified during snd_soc_add_pcm_runtime(), thus resulting in an ID that's no longer a valid array index. To fix this, use the position of the dai_link stored inside the PCM runtime data relative to the start of the dai_link array as index into the priv->dai_props array. Signed-off-by: Laurentiu Mihalcea Acked-by: Kuninori Morimoto Link: https://patch.msgid.link/20250114184314.3583-2-laurentiumihalcea111@gmail.com Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 7 +++++++ sound/soc/generic/simple-card-utils.c | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) commit 0d30871739ab433e114b0058f08b6b1c7b816f7e Author: Mete Durlu Date: Tue Jan 14 17:03:09 2025 +0100 s390/diag: Add memory topology information via diag310 Introduce diag310 and memory topology related subcodes. Provide memory topology information obtanied from diag310 to userspace via diag ioctl. Signed-off-by: Mete Durlu Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/diag.h | 1 + arch/s390/include/asm/sclp.h | 1 + arch/s390/include/uapi/asm/diag.h | 8 ++ arch/s390/kernel/diag/Makefile | 2 +- arch/s390/kernel/diag/diag.c | 1 + arch/s390/kernel/diag/diag310.c | 276 +++++++++++++++++++++++++++++++++++++ arch/s390/kernel/diag/diag_ioctl.h | 4 + arch/s390/kernel/diag/diag_misc.c | 9 ++ drivers/s390/char/sclp_early.c | 1 + 9 files changed, 302 insertions(+), 1 deletion(-) commit f7862dfef6612b87b2ad8352c4d73886f09456d6 Author: Al Viro Date: Sun Jan 12 08:07:05 2025 +0000 saner replacement for debugfs_rename() Existing primitive has several problems: 1) calling conventions are clumsy - it returns a dentry reference that is either identical to its second argument or is an ERR_PTR(-E...); in both cases no refcount changes happen. Inconvenient for users and bug-prone; it would be better to have it return 0 on success and -E... on failure. 2) it allows cross-directory moves; however, no such caller have ever materialized and considering the way debugfs is used, it's unlikely to happen in the future. What's more, any such caller would have fun issues to deal with wrt interplay with recursive removal. It also makes the calling conventions clumsier... 3) tautological rename fails; the callers have no race-free way to deal with that. 4) new name must have been formed by the caller; quite a few callers have it done by sprintf/kasprintf/etc., ending up with considerable boilerplate. Proposed replacement: int debugfs_change_name(dentry, fmt, ...). All callers convert to that easily, and it's simpler internally. IMO debugfs_rename() should go; if we ever get a real-world use case for cross-directory moves in debugfs, we can always look into the right way to handle that. Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250112080705.141166-21-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman Documentation/filesystems/debugfs.rst | 12 +-- drivers/net/bonding/bond_debugfs.c | 9 +- drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c | 19 +--- drivers/net/ethernet/marvell/skge.c | 5 +- drivers/net/ethernet/marvell/sky2.c | 5 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +- drivers/opp/debugfs.c | 10 +- fs/debugfs/inode.c | 106 ++++++++++------------ include/linux/debugfs.h | 9 +- mm/shrinker_debug.c | 16 +--- net/hsr/hsr_debugfs.c | 9 +- net/mac80211/debugfs_netdev.c | 11 +-- net/wireless/core.c | 5 +- 13 files changed, 77 insertions(+), 145 deletions(-) commit c2a3a216c7e9ad790ba3b5972ee93eee8fe337b1 Author: Al Viro Date: Sun Jan 12 08:07:04 2025 +0000 orangefs-debugfs: don't mess with ->d_name Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250112080705.141166-20-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman fs/orangefs/orangefs-debugfs.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit f526ca6bc10498785c5e4530c8c79ac9f87df9bc Author: Al Viro Date: Sun Jan 12 08:07:03 2025 +0000 octeontx2: don't mess with ->d_parent or ->d_parent->d_name use debugfs_{create_file,get}_aux_num() instead. [and for fsck sake, don't call variables filp - especially the ones that are not even struct file *] Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250112080705.141166-19-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman .../ethernet/marvell/octeontx2/af/rvu_debugfs.c | 76 +++++++--------------- 1 file changed, 24 insertions(+), 52 deletions(-) commit f22fa721ae415cd3303117c675e451aaec7abf71 Author: Al Viro Date: Sun Jan 12 08:07:02 2025 +0000 arm_scmi: don't mess with ->d_parent->d_name Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250112080705.141166-18-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman drivers/firmware/arm_scmi/raw_mode.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f9c8dbc8292ff80c858d67c3afabec5a8adb5ab8 Author: Al Viro Date: Sun Jan 12 08:07:01 2025 +0000 slub: don't mess with ->d_name Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250112080705.141166-17-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman mm/slub.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 74e5a20c93d8bf8f88d9a808b12baf00ec2839a1 Author: Al Viro Date: Sun Jan 12 08:07:00 2025 +0000 sof-client-ipc-flood-test: don't mess with ->d_name Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250112080705.141166-16-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman sound/soc/sof/sof-client-ipc-flood-test.c | 39 ++++++++++--------------------- 1 file changed, 12 insertions(+), 27 deletions(-) commit 75a96701dc0f678d877dd9b5d624005364870472 Author: Al Viro Date: Sun Jan 12 08:06:59 2025 +0000 qat: don't mess with ->d_name use debugfs_{create_file,get}_aux_num() instead. Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250112080705.141166-15-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman .../crypto/intel/qat/qat_common/adf_tl_debugfs.c | 36 +++------------------- 1 file changed, 4 insertions(+), 32 deletions(-) commit e777ba7bbdcbb03676c5e2b5c7423bf4a4cb4b42 Author: Al Viro Date: Sun Jan 12 08:06:58 2025 +0000 xhci: don't mess with ->d_iname use debugs_{creat_file,get}_aux() instead Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250112080705.141166-14-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-debugfs.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) commit c63254a74720b5082d060d6352a4d670c8c8d171 Author: Al Viro Date: Sun Jan 12 08:06:57 2025 +0000 mtu3: don't mess wiht ->d_iname use debugfs_{create_file,get}_aux() instead. Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250112080705.141166-13-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3_debugfs.c | 40 +++++++--------------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) commit c05fc27af6db060d2640b1f4f5bbbce4d292537d Author: Al Viro Date: Sun Jan 12 08:06:56 2025 +0000 greybus/camera - stop messing with ->d_iname Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250112080705.141166-12-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/camera.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit e12a76f07e76c551e13d44b1b1e16c4819fbfc80 Author: Al Viro Date: Sun Jan 12 08:06:55 2025 +0000 mediatek: stop messing with ->d_iname use debgufs_{create_file,get}_aux_num() instead. Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250112080705.141166-11-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman drivers/phy/mediatek/phy-mtk-tphy.c | 40 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 30 deletions(-) commit 1eb87004d294867ced3ec1bd620fdff2db933227 Author: Al Viro Date: Sun Jan 12 08:06:54 2025 +0000 netdevsim: don't embed file_operations into your structs Just use debugfs_get_aux() instead of debugfs_real_fops(). Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250112080705.141166-10-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman drivers/net/netdevsim/hwstats.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit 231e9f05122b82dcb2b5ea8bb3081d4fc51a8bc4 Author: Al Viro Date: Sun Jan 12 08:06:53 2025 +0000 b43legacy: make use of debugfs_get_aux() Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250112080705.141166-9-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman drivers/net/wireless/broadcom/b43legacy/debugfs.c | 26 ++++++++++------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 86d4ef6a3915d6eea93d98082ed82adcf888a015 Author: Al Viro Date: Sun Jan 12 08:06:52 2025 +0000 b43: stop embedding struct file_operations into their objects Use debugfs_get_aux() instead. And switch to debugfs_short_fops, while we are at it... Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250112080705.141166-8-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman drivers/net/wireless/broadcom/b43/debugfs.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit a61af967992af184c2a2d6d2b234d3b8d9bf2892 Author: Al Viro Date: Sun Jan 12 08:06:51 2025 +0000 carl9170: stop embedding file_operations into their objects use debugfs_get_aux() instead; switch to debugfs_short_ops as well. Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20250112080705.141166-7-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman drivers/net/wireless/ath/carl9170/debug.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit d1433c7ba289319983ec0086dd22524721a797ef Author: Al Viro Date: Sun Jan 12 08:06:50 2025 +0000 debugfs: take debugfs_short_fops definition out of ifdef Signed-off-by: Al Viro Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20250112080705.141166-6-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman include/linux/debugfs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 12c92098932b4bbf38396e9aed0a343d35437a21 Author: Al Viro Date: Sun Jan 12 08:06:49 2025 +0000 debugfs: allow to store an additional opaque pointer at file creation Set by debugfs_create_file_aux(name, mode, parent, data, aux, fops). Plain debugfs_create_file() has it set to NULL. Accessed by debugfs_get_aux(file). Convenience macros for numeric opaque data - debugfs_create_file_aux_num and debugfs_get_aux_num, resp. Signed-off-by: Al Viro Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20250112080705.141166-5-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 6 ++++++ fs/debugfs/inode.c | 14 +++++++++----- fs/debugfs/internal.h | 1 + include/linux/debugfs.h | 27 ++++++++++++++++++++++++++- 4 files changed, 42 insertions(+), 6 deletions(-) commit 95688800eefe28240204c2a0dd2bca5bf5f7f1d9 Author: Al Viro Date: Sun Jan 12 08:06:48 2025 +0000 debugfs: don't mess with bits in ->d_fsdata The reason we need that crap is the dual use ->d_fsdata has there - it's both holding a debugfs_fsdata reference after the first debugfs_file_get() (actually, after the call of proxy ->open()) *and* it serves as a place to stash a reference to real file_operations from object creation to the first open. Oh, and it's triple use, actually - that stashed reference might be to debugfs_short_fops. Bugger that for a game of solidiers - just put the operations reference into debugfs-private augmentation of inode. And split debugfs_full_file_operations into full and short cases, so that debugfs_get_file() could tell one from another. Voila - ->d_fsdata holds NULL until the first (successful) debugfs_get_file() and a reference to struct debugfs_fsdata afterwards. Signed-off-by: Al Viro Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20250112080705.141166-4-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 58 +++++++++++++++++++++++++-------------------------- fs/debugfs/inode.c | 29 +++++++------------------- fs/debugfs/internal.h | 12 +++-------- 3 files changed, 38 insertions(+), 61 deletions(-) commit 41a0ecc0997cd40d913cce18867efd1c34c64e28 Author: Al Viro Date: Sun Jan 12 08:06:47 2025 +0000 debugfs: get rid of dynamically allocation proxy_ops All it takes is having full_proxy_open() collect the information about available methods and store it in debugfs_fsdata. Wrappers are called only after full_proxy_open() has succeeded calling debugfs_get_file(), so they are guaranteed to have ->d_fsdata already pointing to debugfs_fsdata. As the result, they can check if method is absent and bugger off early, without any atomic operations, etc. - same effect as what we'd have from NULL method. Which makes the entire proxy_fops contents unconditional, making it completely pointless - we can just put those methods (unconditionally) into debugfs_full_proxy_file_operations and forget about dynamic allocation, replace_fops, etc. Signed-off-by: Al Viro Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20250112080705.141166-3-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 113 +++++++++++++++++++++++--------------------------- fs/debugfs/internal.h | 9 ++++ 2 files changed, 61 insertions(+), 61 deletions(-) commit bacaaf833e964933c36ee571d8c0e9a87fae1a3e Author: Al Viro Date: Sun Jan 12 08:06:46 2025 +0000 debugfs: move ->automount into debugfs_inode_info ... and don't bother with debugfs_fsdata for those. Life's simpler that way... Signed-off-by: Al Viro Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20250112080705.141166-2-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman fs/debugfs/inode.c | 21 +++++---------------- fs/debugfs/internal.h | 19 +++++++++---------- 2 files changed, 14 insertions(+), 26 deletions(-) commit 268b36116f2f048d2fb0cd13aa3036705fcac068 Author: Al Viro Date: Sun Jan 12 08:06:45 2025 +0000 debugfs: separate cache for debugfs inodes Embed them into container (struct debugfs_inode_info, with nothing else in it at the moment), set the cache up, etc. Just the infrastructure changes letting us augment debugfs inodes here; adding stuff will come at the next step. Signed-off-by: Al Viro Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20250112080705.141166-1-viro@zeniv.linux.org.uk Signed-off-by: Greg Kroah-Hartman fs/debugfs/inode.c | 40 ++++++++++++++++++++++++++++++++++------ fs/debugfs/internal.h | 9 +++++++++ 2 files changed, 43 insertions(+), 6 deletions(-) commit 3f36bffab9e324873333304a0fd6c5ec8c9a10fc Author: Krzysztof Kozlowski Date: Tue Jan 14 21:36:02 2025 +0100 pinctrl: Use str_enable_disable-like helpers Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Florian Fainelli Reviewed-by: Antonio Borneo Reviewed-by: Charles Keepax Link: https://lore.kernel.org/20250114203602.1013275-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-nsp-gpio.c | 3 ++- drivers/pinctrl/cirrus/pinctrl-lochnagar.c | 3 ++- drivers/pinctrl/nomadik/pinctrl-abx500.c | 5 +++-- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 7 ++++--- drivers/pinctrl/pinctrl-amd.c | 3 ++- drivers/pinctrl/pinctrl-gemini.c | 11 ++++++----- drivers/pinctrl/pinctrl-stmfx.c | 2 +- drivers/pinctrl/qcom/pinctrl-msm.c | 3 ++- drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 3 ++- drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 3 ++- drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 3 ++- drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 10 ++++------ drivers/pinctrl/samsung/pinctrl-exynos.c | 3 ++- drivers/pinctrl/stm32/pinctrl-stm32.c | 5 +++-- 14 files changed, 37 insertions(+), 27 deletions(-) commit 33f32a06a5d7c1881311d55049c92ed80b6df828 Merge: 9e7665097f3d accabfaae094 Author: Linus Walleij Date: Wed Jan 15 12:25:13 2025 +0100 Merge tag 'renesas-pinctrl-for-v6.14-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v6.14 (take three) - Fix PFC_MASK for RZ/V2H and RZ/G3E. Signed-off-by: Linus Walleij commit e30458d690f35abb01de8b3cbc09285deb725d00 Author: David Howells Date: Tue Jan 14 14:46:03 2025 +0000 afs: Fix the fallback handling for the YFS.RemoveFile2 RPC call Fix a pair of bugs in the fallback handling for the YFS.RemoveFile2 RPC call: (1) Fix the abort code check to also look for RXGEN_OPCODE. The lack of this masks the second bug. (2) call->server is now not used for ordinary filesystem RPC calls that have an operation descriptor. Fix to use call->op->server instead. Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept") Signed-off-by: David Howells Link: https://lore.kernel.org/r/109541.1736865963@warthog.procyon.org.uk cc: Marc Dionne cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner fs/afs/yfsclient.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f1359f46f1f1305340970b5073240126fe87254f Author: Dmitry Baryshkov Date: Tue Jan 7 12:06:39 2025 +0200 drm/bridge: fix documentation for the hdmi_audio_prepare() callback Fix c&p error and change linuxdoc comment for the hdmi_audio_prepare() callback from drm_bridge_funcs to mention the callback name instead of the original prepare() callback. Fixes: 0beba3f9d366 ("drm/bridge: connector: add support for HDMI codec framework") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/linux-next/20250106174645.463927e0@canb.auug.org.au/ Acked-by: Maxime Ripard Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20250107-drm-bridge-fix-docs-v1-1-84e539e6f348@linaro.org Signed-off-by: Dmitry Baryshkov include/drm/drm_bridge.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 763d1ebec843b5048761e094281281abbd9a75f0 Author: Haiyue Wang Date: Sat Dec 28 20:15:08 2024 +0800 vdso: Correct typo in PAGE_SHIFT comment Signed-off-by: Haiyue Wang Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20241228121518.80812-1-haiyuewa@163.com include/vdso/page.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a648eb3a3f79e9736a59b28783700c2c691db419 Author: Thomas Gleixner Date: Tue Dec 10 11:34:14 2024 +0100 genirq: Provide IRQCHIP_MOVE_DEFERRED The logic of GENERIC_PENDING_IRQ is backwards for historical reasons. Most interrupt controllers allow to move the interrupt from arbitrary contexts. If GENERIC_PENDING_IRQ is enabled by an architecture to support a chip, which requires the affinity change to happen in interrupt context, all other chips have to be marked with IRQF_MOVE_PCNTXT. That's tedious and there is no real good reason for the extra flags in the irq descriptor and the irq data status fields. In fact the decision whether interrupts can be moved in arbitrary context or not is a property of the interrupt chip. To simplify adoption for RISC-V provide a new mechanism which is enabled via a config switch and allows to add a flag to irq_chip::flags to request that interrupt affinity changes are deferred. Setting the top level chip of an interrupt evaluates the flag and maps it into the existing logic. The config switch and the various PCNTXT flags are temporary until x86 is converted over to this scheme. This intermediate step also allows trivial backporting of the mechanism to plug the affinity change race of various RISC-V interrupt controllers. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20241210103335.500314436@linutronix.de include/linux/irq.h | 2 ++ kernel/irq/Kconfig | 4 ++++ kernel/irq/chip.c | 18 +++++++++++++++--- kernel/irq/debugfs.c | 1 + 4 files changed, 22 insertions(+), 3 deletions(-) commit 65d09d269fc15b4d8bbeff950ecdc4dc36a6961a Author: Thomas Gleixner Date: Tue Dec 10 11:34:12 2024 +0100 hexagon: Remove GENERIC_PENDING_IRQ leftover Commented out since 2011.... Signed-off-by: Thomas Gleixner Acked-by: Brian Cain Link: https://lore.kernel.org/all/20241210103335.437630614@linutronix.de arch/hexagon/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 5d30d6ab8c65b6caf034892aa8ae29285d0a515f Author: Thomas Gleixner Date: Tue Dec 10 11:34:10 2024 +0100 ARC: Remove GENERIC_PENDING_IRQ Nothing uses the actual functionality and the MCIP controller sets the flags which disables the deferred affinity change. The other interrupt controller does not support affinity setting at all. Signed-off-by: Thomas Gleixner Acked-by: Vineet Gupta    # arch/arc/ Link: https://lore.kernel.org/all/20241210103335.373392568@linutronix.de arch/arc/Kconfig | 1 - arch/arc/kernel/mcip.c | 2 -- 2 files changed, 3 deletions(-) commit 9620301cc27f6dc6197236a55a44fac8e64be0a1 Author: Thomas Gleixner Date: Tue Dec 10 11:20:45 2024 +0100 genirq: Remove handle_enforce_irqctx() wrapper Now that it is unconditionally available, remove the wrapper. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20241210101811.561078243@linutronix.de kernel/irq/internals.h | 5 ----- kernel/irq/irqdesc.c | 2 +- kernel/irq/resend.c | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) commit 8d187a77f04c14fb459a5301d69f733a5a1396bc Author: Thomas Gleixner Date: Tue Dec 10 11:20:43 2024 +0100 genirq: Make handle_enforce_irqctx() unconditionally available Commit 1b57d91b969c ("irqchip/gic-v2, v3: Prevent SW resends entirely") sett the flag which enforces interrupt handling in interrupt context and prevents software base resends for ARM GIC v2/v3. But it missed that the helper function which checks the flag was hidden behind CONFIG_GENERIC_PENDING_IRQ, which is not set by ARM[64]. Make the helper unconditionally available so that the enforcement actually works. Fixes: 1b57d91b969c ("irqchip/gic-v2, v3: Prevent SW resends entirely") Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20241210101811.497716609@linutronix.de kernel/irq/internals.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit ad5b205f9e022b407d91f952faddd05718be2866 Author: Lianqin Hu Date: Wed Jan 15 09:32:35 2025 +0000 ALSA: usb-audio: Add delay quirk for USB Audio Device Audio control requests that sets sampling frequency sometimes fail on this card. Adding delay between control messages eliminates that problem. usb 1-1: New USB device found, idVendor=0d8c, idProduct=0014 usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 1-1: Product: USB Audio Device usb 1-1: Manufacturer: C-Media Electronics Inc. Signed-off-by: Lianqin Hu Cc: Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/TYUPR06MB6217E94D922B9BF422A73F32D2192@TYUPR06MB6217.apcprd06.prod.outlook.com sound/usb/quirks.c | 2 ++ 1 file changed, 2 insertions(+) commit 2af257388473298898d71313cfa6092b572f2602 Author: Tianyang Zhang Date: Sat Jan 11 10:37:04 2025 +0800 irqchip/loongarch-avec: Add multi-nodes topology support avecintc_init() enables the Advanced Interrupt Controller (AVEC) of the boot CPU node, but nothing enables the AVEC on secondary nodes. Move the enablement to the CPU hotplug callback so that secondary nodes get the AVEC enabled too. In theory enabling it once per node would be sufficient, but redundant enabling does no hurt, so keep the code simple and do it unconditionally. Signed-off-by: Tianyang Zhang Signed-off-by: Thomas Gleixner Acked-by: Huacai Chen Link: https://lore.kernel.org/all/20250111023704.17285-1-zhangtianyang@loongson.cn drivers/irqchip/irq-loongarch-avec.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit e3ab1fc9354fabd65ea10ce6ca4153ef07128ad0 Author: Geert Uytterhoeven Date: Thu Dec 5 14:12:23 2024 +0100 irqchip/ts4800: Replace seq_printf() by seq_puts() Simplify "seq_printf(p, "%s", ...)" to "seq_puts(p, ...)". Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/1ba5692126804f9e1ff062ac24939b24030b4f72.1733403985.git.geert+renesas@glider.be drivers/irqchip/irq-ts4800.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8b26ae398c4577893a4c43195dba0e75af6e33f Author: Nicolas Frayer Date: Tue Dec 24 20:36:43 2024 +0100 irqchip/ti-sci-inta : Add module build support Add module build support in Kconfig for the TI SCI interrupt aggregator driver. The driver's default build is built-in and it also depends on ARCH_K3 as the driver uses some 64 bit ops and should only be built for 64-bit platforms. Signed-off-by: Nicolas Frayer Signed-off-by: Guillaume La Roque Signed-off-by: Thomas Gleixner Reviewed-by: Nishanth Menon Link: https://lore.kernel.org/all/20241224-timodules-v4-2-c5e010f58e2c@baylibre.com arch/arm64/Kconfig.platforms | 1 - drivers/irqchip/Kconfig | 3 ++- drivers/irqchip/irq-ti-sci-inta.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) commit 2d95ffaecbc2a29cf4a0fa8e63ce99ded7184991 Author: Nicolas Frayer Date: Tue Dec 24 20:36:42 2024 +0100 irqchip/ti-sci-intr: Add module build support Add module build support in Kconfig for the TI SCI interrupt router driver. This driver depends on the TI sci firmware driver which aready supports module build. Signed-off-by: Nicolas Frayer Signed-off-by: Guillaume La Roque Signed-off-by: Thomas Gleixner Reviewed-by: Nishanth Menon Link: https://lore.kernel.org/all/20241224-timodules-v4-1-c5e010f58e2c@baylibre.com arch/arm64/Kconfig.platforms | 1 - drivers/irqchip/Kconfig | 3 ++- drivers/irqchip/irq-ti-sci-intr.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) commit ceff0757f5dafb5be5205988171809c877b1d3e3 Author: HONG Yifan Date: Tue Nov 12 19:44:55 2024 +0100 kbuild: rust: add PROCMACROLDFLAGS These are flags to be passed when linking proc macros for the Rust toolchain. If unset, it defaults to $(KBUILD_HOSTLDFLAGS). This is needed because the list of flags to link hostprogs is not necessarily the same as the list of flags used to link libmacros.so. When we build proc macros, we need the latter, not the former (e.g. when using a Rust compiler binary linked to a different C library than host programs). To distinguish between the two, introduce this new variable to stand out from KBUILD_HOSTLDFLAGS used to link other host progs. Signed-off-by: HONG Yifan Link: https://lore.kernel.org/r/20241017210430.2401398-2-elsk@google.com [ v3: - `export`ed the variable. Otherwise it would not be visible in `rust/Makefile`. - Removed "additional" from the documentation and commit message, since this actually replaces the other flags, unlike other cases. - Added example of use case to documentation and commit message. Thanks Alice for the details on what Google needs! - Instead of `HOSTLDFLAGS`, used `KBUILD_HOSTLDFLAGS` as the fallback to preserve the previous behavior as much as possible, as discussed with Alice/Yifan. Thus moved the variable down too (currently we do not modify `KBUILD_HOSTLDFLAGS` elsewhere) and avoided mentioning `HOSTLDFLAGS` directly in the documentation. - Fixed documentation header formatting. - Reworded slightly. - Miguel ] Tested-by: Alice Ryhl Reviewed-by: Alice Ryhl Reviewed-by: HONG Yifan Acked-by: Masahiro Yamada Link: https://lore.kernel.org/r/20241112184455.855133-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda Documentation/kbuild/kbuild.rst | 11 +++++++++++ Makefile | 3 ++- rust/Makefile | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) commit dd1f17a9faf5359d76644236cde4cc1720f1184d Author: Dr. David Alan Gilbert Date: Tue Dec 24 00:17:27 2024 +0000 irqchip/irq-brcmstb-l2: Replace brcmstb_l2_mask_and_ack() by generic function Replace brcmstb_l2_mask_and_ack() by the generic irq_gc_mask_disable_and_ack_set(). brcmstb_l2_mask_and_ack() was added in commit 49aa6ef0b439 ("irqchip/brcmstb-l2: Remove some processing from the handler") in September 2017 with a comment saying it was actually generic and someone should add it to the generic code. commit 20608924cc2e ("genirq: generic chip: Add irq_gc_mask_disable_and_ack_set()") did that a few weeks later, however no one went back and took the brcmstb variant out. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Thomas Gleixner Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/all/20241224001727.149337-1-linux@treblig.org drivers/irqchip/irq-brcmstb-l2.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) commit 877c76dbb98b164f58d328c246ad33ec2db1030f Author: Krzysztof Kozlowski Date: Sat Jan 11 19:54:14 2025 +0100 irqchip: keystone: 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 Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250111185414.183971-1-krzysztof.kozlowski@linaro.org drivers/irqchip/irq-keystone.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 79c4b4f431bb39d6d14787f1ff458c637a72754d Author: Maxime Ripard Date: Mon Jan 13 10:26:08 2025 +0100 doc/cgroup: Fix title underline length Commit b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") introduced a new documentation file, with a shorter than expected underline. This results in a documentation build warning. Fix that underline length. Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/r/20250113154611.624256bf@canb.auug.org.au/ Acked-by: Tejun Heo Reviewed-by: Simona Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20250113092608.1349287-4-mripard@kernel.org Signed-off-by: Maxime Ripard Documentation/core-api/cgroup.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f45cdbc9e1a3f4367dc92792cb1ace2b9e133e37 Author: Maxime Ripard Date: Mon Jan 13 10:26:07 2025 +0100 drm/doc: Include new drm-compute documentation Commit b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") introduced a new documentation file, but didn't link it anywhere. It was thus triggering a documentation build warning. Make sure it's included as part of the DRM documentation. Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/r/20250113155000.4a99e7b0@canb.auug.org.au/ Acked-by: Tejun Heo Reviewed-by: Simona Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20250113092608.1349287-3-mripard@kernel.org Signed-off-by: Maxime Ripard Documentation/gpu/index.rst | 1 + 1 file changed, 1 insertion(+) commit feb85972b82c9747ebb0843f91e4c1e023b47f3d Author: Maxime Ripard Date: Mon Jan 13 10:26:06 2025 +0100 cgroup/dmem: Fix parameters documentation During the dmem cgroup development, the parameters to the dmem_cgroup_state_evict_valuable() and dmem_cgroup_try_charge() were changed, but the documentation wasn't adjusted accordingly. This results in a documentation build warning. Adjust the documentation to reflect what the final functions parameters are. Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/r/20250113160334.1f09f881@canb.auug.org.au/ Acked-by: Tejun Heo Reviewed-by: Simona Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20250113092608.1349287-2-mripard@kernel.org Signed-off-by: Maxime Ripard kernel/cgroup/dmem.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit e33b51499a0a6bcaf44824f5b6e6bc65bb75b79d Author: Maxime Ripard Date: Mon Jan 13 10:26:05 2025 +0100 cgroup/dmem: Select PAGE_COUNTER The dmem cgroup the page counting API implemented behing the PAGE_COUNTER kconfig option. However, it doesn't select it, resulting in potential build breakages. Select PAGE_COUNTER. Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501111330.3VuUx8vf-lkp@intel.com/ Acked-by: Tejun Heo Reviewed-by: Simona Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20250113092608.1349287-1-mripard@kernel.org Signed-off-by: Maxime Ripard init/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 8f52fd7a7de6097089f73bd7dad7c558ea9a8a3f Author: Jiapeng Chong Date: Tue Jan 14 14:28:04 2025 +0800 kernel/cgroup: Remove the unused variable climit Variable climit is not effectively used, so delete it. kernel/cgroup/dmem.c:302:23: warning: variable ‘climit’ set but not used. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=13512 Signed-off-by: Jiapeng Chong Acked-by: Tejun Heo Link: https://patchwork.freedesktop.org/patch/msgid/20250114062804.5092-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Maxime Ripard kernel/cgroup/dmem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d80c400f888fd14533c5ecda45340b0179f894d5 Author: Cezary Rojewski Date: Tue Jan 14 19:42:39 2025 +0100 ALSA: hda: Transfer firmware in two chunks As per specification, SDxLVI shall be at least 1 i.e.: two chunks to perform a valid transfer. This is true for the PCM transfer code but not firmware-transfer one. Technical background: - the LVI > 0 rule shall be obeyed in PCM transfer - HW permits LVI == 0 when transfer is SW-controlled (SPIB) - FW download is not a PCM transfer and is SW-controlled (SPIB) The above is the fundament which AudioDSP firmware loading functions have been built upon and worked since 2016. The presented changes are to align the loading flows and avoid rising more questions in the future. Achieve the goal by splitting snd_hdac_stream_setup_periods() into substream-dependent and -independent part. Let snd_hdac_dsp_prepare() utilize the latter so that both DSP-loading and PCM flows utilize same BLDE setup loop which already takes care of cutting the buffer based on azx_dev->period_bytes. Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250114184239.120002-1-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai sound/hda/hdac_stream.c | 63 +++++++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 26 deletions(-) commit 1aec3ed2e3e1512aba15e7e790196a44efd5f0a7 Author: Edson Juliano Drosdeck Date: Tue Jan 14 14:06:19 2025 -0300 ALSA: hda/realtek: Enable headset mic on Positivo C6400 Positivo C6400 is equipped with ALC269VB, and it needs ALC269VB_FIXUP_ASUS_ZENBOOK quirk to make its headset mic work. Also must to limits the microphone boost. Signed-off-by: Edson Juliano Drosdeck Cc: Link: https://patch.msgid.link/20250114170619.11510-1-edson.drosdeck@gmail.com Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit b1049f2d68693c80a576c4578d96774a68df2bad Author: Werner Sembach Date: Tue Jan 14 23:23:54 2025 +0100 PCI: Avoid putting some root ports into D3 on TUXEDO Sirius Gen1 commit 9d26d3a8f1b0 ("PCI: Put PCIe ports into D3 during suspend") sets the policy that all PCIe ports are allowed to use D3. When the system is suspended if the port is not power manageable by the platform and won't be used for wakeup via a PME this sets up the policy for these ports to go into D3hot. This policy generally makes sense from an OSPM perspective but it leads to problems with wakeup from suspend on the TUXEDO Sirius 16 Gen 1 with a specific old BIOS. This manifests as a system hang. On the affected Device + BIOS combination, add a quirk for the root port of the problematic controller to ensure that these root ports are not put into D3hot at suspend. This patch is based on https://lore.kernel.org/linux-pci/20230708214457.1229-2-mario.limonciello@amd.com but with the added condition both in the documentation and in the code to apply only to the TUXEDO Sirius 16 Gen 1 with a specific old BIOS and only the affected root ports. Fixes: 9d26d3a8f1b0 ("PCI: Put PCIe ports into D3 during suspend") Suggested-by: Mario Limonciello Link: https://lore.kernel.org/r/20250114222436.1075456-1-wse@tuxedocomputers.com Co-developed-by: Georg Gottleuber Signed-off-by: Georg Gottleuber Signed-off-by: Werner Sembach Signed-off-by: Krzysztof Wilczyński Cc: # 6.1+ arch/x86/pci/fixup.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 2d54d23c604dc117a2bd99f90353ab761e209384 Author: Ilpo Järvinen Date: Mon Oct 28 19:40:46 2024 +0200 PCI/sysfs: Remove unnecessary zero in initializer Providing empty initializer for an array is enough to set its elements to zero. Thus, remove the redundant 0 from the initializer. Link: https://lore.kernel.org/r/20241028174046.1736-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen Signed-off-by: Krzysztof Wilczyński drivers/pci/pci-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6e5c46d8330ce818d8056cc5b8447d210caf196 Author: Ilpo Järvinen Date: Mon Oct 28 19:40:45 2024 +0200 PCI/sysfs: Use __free() in reset_method_store() Use __free() from cleanup.h to handle freeing options in reset_method_store() as it simplifies the code flow. Link: https://lore.kernel.org/r/20241028174046.1736-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen Signed-off-by: Krzysztof Wilczyński drivers/pci/pci-sysfs.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 10269d5781337e1295816c1015dd5da49ac23cc8 Author: Ilpo Järvinen Date: Mon Oct 28 19:40:44 2024 +0200 PCI/sysfs: Move reset related sysfs code to correct file Most PCI sysfs code and structs are in a dedicated file but a few reset related things remain in pci.c. Move also them to pci-sysfs.c and drop pci_dev_reset_method_attr_is_visible() as it is 100% duplicate of pci_dev_reset_attr_is_visible(). Link: https://lore.kernel.org/r/20241028174046.1736-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen Signed-off-by: Krzysztof Wilczyński drivers/pci/pci-sysfs.c | 112 +++++++++++++++++++++++++++++++++++++++++++ drivers/pci/pci.c | 125 +----------------------------------------------- drivers/pci/pci.h | 3 +- 3 files changed, 114 insertions(+), 126 deletions(-) commit 7a1723d3b230765dc025401db8308937e4c4fb13 Merge: 5b4c2fdf72f3 d28e89244978 Author: Jakub Kicinski Date: Tue Jan 14 18:22:06 2025 -0800 Merge branch 'net-stmmac-further-eee-cleanups-and-one-fix' Russell King says: ==================== net: stmmac: further EEE cleanups (and one fix!) This series continues the EEE cleanup of the stmmac driver, and includes one fix. As mentioned in the previous series, I wasn't entirely happy with the "stmmac_disable_sw_eee_mode" name, so the first patch renames this to "stmmac_stop_sw_lpi" instead, which I think better describes what this function is doing - stopping the transmit of the LPI state because we have a packet ot send. Patch 2 corrects the priv->eee_sw_timer_en flag when EEE has been disabled. Currently upon disable, priv->eee_enabled is set false, but through the weird logic that was present prior to the previous series, priv->eee_sw_timer_en was set true. This behaviour was kept as the previous series was cleanup, not fixes. This patch fixes this. Having fixed priv->eee_sw_timer_en to actually indicate whether software timed EEE mode is being used, it becomes no longer necessary to test priv->eee_enabled in addition. Patch 3 removes the redundant test. Patch 4 also uses priv->eee_sw_timer_en before manipulating the software EEE state in the suspend method rather than using priv->eee_enabled, which brings consistency. Patch 5 provides stmmac_try_to_start_sw_lpi() which complements stmmac_stop_sw_lpi(), and allows us to move duplicated code into one location. Patch 6 splits stmmac_enable_eee_mode() - one part of this function tests whether there are any queues that have unfinished work (in other words are busy). Separate out this code into a separate function. Patch 7 also splits out the mod_timer() for the software EEE timer intoi a seperate function (the reason will be in patch 9.) Patch 8 merges the remains of stmmac_enable_eee_mode() into stmmac_try_to_start_sw_lpi(). Patch 9 fixes the delay between transmit and entering LPI. Currently, when cleaning the transmit queues, if we discover that we have finished cleaning up all queues, we immediately instruct the hardware to enter LPI mode without waiting for the LPI timer. However, we should wait for the LPI timer to expire. Therefore, the transmit cleanup path needs to call stmmac_restart_sw_lpi_timer() instead of stmmac_try_to_start_sw_lpi(). ==================== Link: https://patch.msgid.link/Z4T84SbaC4D-fN5y@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit d28e89244978ef2a91e23e83c99b5e8985ff8db2 Author: Russell King (Oracle) Date: Mon Jan 13 11:46:20 2025 +0000 net: stmmac: restart LPI timer after cleaning transmit descriptors Fix a bug in the LPI handling, where it is possible to immediately enter LPI mode after cleaning the transmit descriptors when all queues are empty rather than waiting for the LPI timeout to expire. Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1tXItg-000MBg-TW@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec8553673b1f441fa7503662679b93d0dd533985 Author: Russell King (Oracle) Date: Mon Jan 13 11:46:15 2025 +0000 net: stmmac: combine stmmac_enable_eee_mode() Combine stmmac_enable_eee_mode() with stmmac_try_to_start_sw_lpi() which makes the code easier to read and the flow more logical. We can now trivially see that if the transmit queues are busy, we (re-)start the eee_ctrl_timer. Otherwise, if the transmit path is not already in LPI mode, we ask the hardware to enter LPI mode. I believe that now we can see better what is going on here, this shows that there is a bug with the software LPI timer implementation. The LPI timer is supposed to define how long after the last transmittion completed before we start signalling LPI. However, this code structure shows that if all transmit queues are empty, and stmmac_try_to_start_sw_lpi() is called immediately after cleaning the transmit queue, we will instruct the hardware to start signalling LPI immediately. Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1tXItb-000MBa-OU@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit af5dc22bdb5fe5a20ba0cdb18b90a995ba694a54 Author: Russell King (Oracle) Date: Mon Jan 13 11:46:10 2025 +0000 net: stmmac: provide function for restarting sw LPI timer Provide a function that encapsulates restarting the software LPI timer when we have determined that the transmit path is busy, or whether the EEE parameters have changed. Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1tXItW-000MBU-KQ@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 82f2025dda761ec7193a03effaf9d48fee456618 Author: Russell King (Oracle) Date: Mon Jan 13 11:46:05 2025 +0000 net: stmmac: provide stmmac_eee_tx_busy() Extract the code which checks whether there's still work to do on any of the stmmac transmit queues. This will allow us to combine stmmac_enable_eee_mode() with stmmac_try_to_start_sw_lpi() in the next patch. Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1tXItR-000MBO-GF@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 24 +++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 0cf44bd0c118bcbbbb10f0cc740cd64db227496f Author: Russell King (Oracle) Date: Mon Jan 13 11:46:00 2025 +0000 net: stmmac: add stmmac_try_to_start_sw_lpi() There are two places which call stmmac_enable_eee_mode() and follow it immediately by modifying the expiry of priv->eee_ctrl_timer. Both code paths are trying to enable LPI mode. Remove this duplication by providing a function for this. Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1tXItM-000MBI-CX@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit c920e6402523ab43b035c913e14d7a580d815d83 Author: Russell King (Oracle) Date: Mon Jan 13 11:45:55 2025 +0000 net: stmmac: check priv->eee_sw_timer_en in suspend path The suspend path uses priv->eee_enabled when cleaning up the software timed LPI mode. Use priv->eee_sw_timer_en instead so we're consistently using a single control for software-based timer handling. Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1tXItH-000MBC-8i@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bfa9e131c9b22506d21290494e4acd67a2adf3cd Author: Russell King (Oracle) Date: Mon Jan 13 11:45:50 2025 +0000 net: stmmac: simplify TX cleanup decision for ending sw LPI mode As mentioned in "net: stmmac: correct priv->eee_sw_timer_en setting", we can simplify some fast-path tests. The transmit cleaning path checks whether EEE is enabled, the transmit path is not in LPI mode, and that we're using software timed mode. Since the above mentioned commit, checking whether EEE is enabled is no longer necessary as priv->eee_sw_timer_en will be false when EEE is disabled. Simplify this test. Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1tXItC-000MB6-54@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4fe09a0d64d528cc4576ad5c4963836175f2d38d Author: Russell King (Oracle) Date: Mon Jan 13 11:45:45 2025 +0000 net: stmmac: correct priv->eee_sw_timer_en setting If we are disabling EEE/LPI, then we should not be enabling software mode. The only time when we should is if EEE is active, and we are wanting to use software-timed EEE mode. Therefore, in the disable path of stmmac_eee_init(), ensure that priv->eee_sw_timer_en is set false as we are going to be calling del_timer_sync() on the timer. This will allow us to simplify some fast-path tests in later patches. Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1tXIt7-000MB0-0W@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 900782a029e5ca57cc1c334e27f24697b5e47db7 Author: Russell King (Oracle) Date: Mon Jan 13 11:45:39 2025 +0000 net: stmmac: rename stmmac_disable_sw_eee_mode() stmmac_disable_sw_eee_mode() was not a good choice for this functions purpose - which is to stop transmitting LPI because we want to send a packet. Rename it to stmmac_stop_sw_lpi(). Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1tXIt1-000MAu-TE@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 5b4c2fdf72f3b47dce9208473c8f52086a0c2d26 Author: 谢致邦 (XIE Zhibang) Date: Mon Jan 13 09:41:56 2025 +0000 net: ethernet: sunplus: Switch to ndo_eth_ioctl The device ioctl handler no longer calls ndo_do_ioctl, but calls ndo_eth_ioctl to handle mii ioctls since commit a76053707dbf ("dev_ioctl: split out ndo_eth_ioctl"). However, sunplus still used ndo_do_ioctl when it was introduced. So switch to ndo_eth_ioctl. Bad commit fd3040b9394c ("net: ethernet: Add driver for Sunplus SP7021") was the initial driver commit, meaning that PHY IOCTLs where never available on this driver. Therefore don't consider this as a fix. Found by code inspection. Signed-off-by: 谢致邦 (XIE Zhibang) Link: https://patch.msgid.link/tencent_8CF8A72C708E96B9C7DC1AF96FEE19AF3D05@qq.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/sunplus/spl2sw_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e178ae00566235f9bc5b0fa6fef80319078123d Merge: b6be5ba8f1c6 6e9c6882f9ef Author: Jakub Kicinski Date: Tue Jan 14 18:04:28 2025 -0800 Merge branch 'net-ethernet-simplify-few-things' Krzysztof Kozlowski says: ==================== net: ethernet: Simplify few things Few code simplifications without functional impact. Not tested on hardware. ==================== Link: https://patch.msgid.link/20250112-syscon-phandle-args-net-v1-0-3423889935f7@linaro.org Signed-off-by: Jakub Kicinski commit 6e9c6882f9ef6edcbc5585122ef318fa5d369fc9 Author: Krzysztof Kozlowski Date: Sun Jan 12 14:32:47 2025 +0100 net: stmmac: stm32: 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://patch.msgid.link/20250112-syscon-phandle-args-net-v1-5-3423889935f7@linaro.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 92ef3e4b3a5b56c6e8b332a99be3fa0b557c2f5e Author: Krzysztof Kozlowski Date: Sun Jan 12 14:32:46 2025 +0100 net: stmmac: sti: 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://patch.msgid.link/20250112-syscon-phandle-args-net-v1-4-3423889935f7@linaro.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 1e38b398b671b450dbd6a2570fcccf08f37c73e5 Author: Krzysztof Kozlowski Date: Sun Jan 12 14:32:45 2025 +0100 net: stmmac: imx: 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://patch.msgid.link/20250112-syscon-phandle-args-net-v1-3-3423889935f7@linaro.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 621c88a3927636493e22fbd2c2a51836c7a0e5e7 Author: Krzysztof Kozlowski Date: Sun Jan 12 14:32:44 2025 +0100 net: ti: am65-cpsw-nuss: 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. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20250112-syscon-phandle-args-net-v1-2-3423889935f7@linaro.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 136fff12a7591b390e46521864ca641e6e74c0e8 Author: Krzysztof Kozlowski Date: Sun Jan 12 14:32:43 2025 +0100 net: ti: icssg-prueth: Do not print physical memory addresses Debugging messages should not reveal anything about memory addresses. This also solves arm compile test warnings: drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c:1034:49: error: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Werror,-Wformat] Signed-off-by: Krzysztof Kozlowski Reviewed-by: MD Danish Anwar Link: https://patch.msgid.link/20250112-syscon-phandle-args-net-v1-1-3423889935f7@linaro.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c | 2 -- 1 file changed, 2 deletions(-) commit 0cc3cb2151f9830274e7bef39a23dc1da1ecd34a Author: Sean Christopherson Date: Fri Jan 10 16:20:22 2025 -0800 KVM: Disallow all flags for KVM-internal memslots Disallow all flags for KVM-internal memslots as all existing flags require some amount of userspace interaction to have any meaning. In addition to guarding against KVM goofs, explicitly disallowing dirty logging of KVM- internal memslots will (hopefully) allow exempting KVM-internal memslots from the KVM_MEM_MAX_NR_PAGES limit, which appears to exist purely because the dirty bitmap operations use a 32-bit index. Cc: Xiaoyao Li Cc: Claudio Imbrenda Cc: Christian Borntraeger Reviewed-by: Xiaoyao Li Reviewed-by: Claudio Imbrenda Acked-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250111002022.1230573-6-seanjc@google.com Signed-off-by: Sean Christopherson virt/kvm/kvm_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 344315e93dbc9c4733d5c9fd605ecfc46ef97180 Author: Sean Christopherson Date: Fri Jan 10 16:20:21 2025 -0800 KVM: x86: Drop double-underscores from __kvm_set_memory_region() Now that there's no outer wrapper for __kvm_set_memory_region() and it's static, drop its double-underscore prefix. No functional change intended. Cc: Tao Su Reviewed-by: Xiaoyao Li Reviewed-by: Claudio Imbrenda Acked-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250111002022.1230573-5-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/x86.c | 2 +- include/linux/kvm_host.h | 2 +- virt/kvm/kvm_main.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) commit 156bffdb2b49fc0c869bf160a57378886f5fa92d Author: Sean Christopherson Date: Fri Jan 10 16:20:20 2025 -0800 KVM: Add a dedicated API for setting KVM-internal memslots Add a dedicated API for setting internal memslots, and have it explicitly disallow setting userspace memslots. Setting a userspace memslots without a direct command from userspace would result in all manner of issues. No functional change intended. Cc: Tao Su Cc: Claudio Imbrenda Cc: Christian Borntraeger Reviewed-by: Xiaoyao Li Reviewed-by: Claudio Imbrenda Acked-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250111002022.1230573-4-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/x86.c | 2 +- include/linux/kvm_host.h | 4 ++-- virt/kvm/kvm_main.c | 15 ++++++++++++--- 3 files changed, 15 insertions(+), 6 deletions(-) commit d131f0042f466d558f7b75af5e100b62a91a5803 Author: Sean Christopherson Date: Fri Jan 10 16:20:19 2025 -0800 KVM: Assert slots_lock is held when setting memory regions Add proper lockdep assertions in __kvm_set_memory_region() and __x86_set_memory_region() instead of relying comments. Opportunistically delete __kvm_set_memory_region()'s entire function comment as the API doesn't allocate memory or select a gfn, and the "mostly for framebuffers" comment hasn't been true for a very long time. Cc: Tao Su Reviewed-by: Xiaoyao Li Reviewed-by: Claudio Imbrenda Acked-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250111002022.1230573-3-seanjc@google.com Signed-off-by: Sean Christopherson arch/x86/kvm/x86.c | 3 ++- virt/kvm/kvm_main.c | 10 ++-------- 2 files changed, 4 insertions(+), 9 deletions(-) commit f81a6d12bf8b262f4c8ce5e856a4d399d97612ee Author: Sean Christopherson Date: Fri Jan 10 16:20:18 2025 -0800 KVM: Open code kvm_set_memory_region() into its sole caller (ioctl() API) Open code kvm_set_memory_region() into its sole caller in preparation for adding a dedicated API for setting internal memslots. Oppurtunistically use the fancy new guard(mutex) to avoid a local 'r' variable. Cc: Tao Su Reviewed-by: Xiaoyao Li Reviewed-by: Claudio Imbrenda Acked-by: Christoph Schlameuss Link: https://lore.kernel.org/r/20250111002022.1230573-2-seanjc@google.com Signed-off-by: Sean Christopherson include/linux/kvm_host.h | 2 -- virt/kvm/kvm_main.c | 15 ++------------- 2 files changed, 2 insertions(+), 15 deletions(-) commit b6be5ba8f1c6b28c2daa039fd9e9df32f62852bd Author: Dr. David Alan Gilbert Date: Sun Jan 12 13:13:18 2025 +0000 socket: Remove unused kernel_sendmsg_locked The last use of kernel_sendmsg_locked() was removed in 2023 by commit dc97391e6610 ("sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES)") Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Kalesh AP Reviewed-by: Kuniyuki Iwashima Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250112131318.63753-1-linux@treblig.org Signed-off-by: Jakub Kicinski include/linux/net.h | 2 -- net/socket.c | 28 ---------------------------- 2 files changed, 30 deletions(-) commit fccebbdde2067e359f01382a72c31ed2af7acbac Author: Gwendal Grignou Date: Tue Jan 14 12:21:22 2025 -0800 platform/chrome: cros_ec_lpc: Handle EC without CRS section Fix logic to support GOOG0004 device without CRS section. Instead of failing, assume there are not memory mapped EC registers. Fixes: be4fccb5e1fb ("platform/chrome: cros_ec_lpc: Support direct EC register memory access") Signed-off-by: Gwendal Grignou Link: https://lore.kernel.org/r/20250114202122.2352277-1-gwendal@chromium.org Signed-off-by: Tzung-Bi Shih drivers/platform/chrome/cros_ec_lpc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit d6d35d0b0f4267612eb905305f3f2f7aa048bfd4 Author: Maciej Wieczor-Retman Date: Mon Dec 16 16:18:54 2024 +0100 selftests/resctrl: Discover SNC kernel support and adjust messages Resctrl selftest prints a message on test failure that Sub-Numa Clustering (SNC) could be enabled and points the user to check their BIOS settings. No actual check is performed before printing that message so it is not very accurate in pinpointing a problem. When there is SNC support for kernel's resctrl subsystem and SNC is enabled then sub node files are created for each node in the resctrlfs. The sub node files exist in each regular node's L3 monitoring directory. The reliable path to check for existence of sub node files is /sys/fs/resctrl/mon_data/mon_L3_00/mon_sub_L3_00. Add helper that checks for mon_sub_L3_00 existence. Correct old messages to account for kernel support of SNC in resctrl. Signed-off-by: Maciej Wieczor-Retman Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan tools/testing/selftests/resctrl/cmt_test.c | 4 ++-- tools/testing/selftests/resctrl/mba_test.c | 2 ++ tools/testing/selftests/resctrl/mbm_test.c | 4 ++-- tools/testing/selftests/resctrl/resctrl.h | 1 + tools/testing/selftests/resctrl/resctrlfs.c | 32 +++++++++++++++++++++++++++++ 5 files changed, 39 insertions(+), 4 deletions(-) commit a1cd99e700ec006c36c4f01be984e2a19eb3e2f1 Author: Maciej Wieczor-Retman Date: Mon Dec 16 16:18:53 2024 +0100 selftests/resctrl: Adjust effective L3 cache size with SNC enabled Sub-NUMA Cluster divides CPUs sharing an L3 cache into separate NUMA nodes. Systems may support splitting into either two, three, four or six nodes. When SNC mode is enabled the effective amount of L3 cache available for allocation is divided by the number of nodes per L3. It's possible to detect which SNC mode is active by comparing the number of CPUs that share a cache with CPU0, with the number of CPUs on node0. Detect SNC mode once and let other tests inherit that information. Update CFLAGS after including lib.mk in the Makefile so that fallthrough macro can be used. To check if SNC detection is reliable one can check the /sys/devices/system/cpu/offline file. If it's empty, it means all cores are operational and the ratio should be calculated correctly. If it has any contents, it means the detected SNC mode can't be trusted and should be disabled. Check if detection was not reliable due to offline cpus. If it was skip running tests since the results couldn't be trusted. Co-developed-by: Tony Luck Signed-off-by: Tony Luck Signed-off-by: Maciej Wieczor-Retman Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan tools/testing/selftests/resctrl/Makefile | 1 + tools/testing/selftests/resctrl/resctrl.h | 5 ++ tools/testing/selftests/resctrl/resctrl_tests.c | 9 +- tools/testing/selftests/resctrl/resctrlfs.c | 105 ++++++++++++++++++++++++ 4 files changed, 119 insertions(+), 1 deletion(-) commit 89ae64384e5886e8e7c9cc0fcc31e50f4987fae8 Author: Masami Hiramatsu (Google) Date: Tue Jan 7 21:11:16 2025 +0900 selftests/ftrace: Make uprobe test more robust against binary name Make add_remove_uprobe test case more robust against various real binary name. Current add_remove_uprobe.tc test expects the real binary of /bin/sh is '*/bin/*sh', but it does not work on busybox environment. Instead of using fixed pattern, use readlink to identify real binary name. Link: https://lore.kernel.org/r/173625187633.1383744.2840679071525852811.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Shuah Khan tools/testing/selftests/ftrace/test.d/dynevent/add_remove_uprobe.tc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 159ca65c42d90d5ab98fc31b708b12c0be2c26e0 Author: Masami Hiramatsu (Google) Date: Tue Jan 7 21:11:07 2025 +0900 selftests/ftrace: Fix to use remount when testing mount GID option Fix mount_options.tc to use remount option to mount the tracefs. Since the current implementation does not umount the tracefs, this test always fails because of -EBUSY error. Using remount option will allow us to change the mount option. Link: https://lore.kernel.org/r/173625186741.1383744.16707876180798573039.stgit@devnote2 Fixes: 8b55572e5180 ("tracing/selftests: Add tracefs mount options test") Signed-off-by: Masami Hiramatsu (Google) Cc: stable@vger.kernel.org Signed-off-by: Shuah Khan tools/testing/selftests/ftrace/test.d/00basic/mount_options.tc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 58beae2585d5a31bb27559b437630b61424834bb Author: Shivam Chaudhary Date: Sun Jan 5 14:22:55 2025 +0530 selftests: tmpfs: Add kselftest support to tmpfs Replace direct error handling with 'ksft_test_result_*' macros for better reporting. Test logs: Before change: - Without root error: unshare, errno 1 - With root No, output After change: - Without root TAP version 13 1..1 ok 2 # SKIP This test needs root to run! Totals: pass:0 fail:0 xfail:0 xpass:0 skip:1 error:0 - With root TAP version 13 1..1 ok 1 Test : Success Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0 Link: https://lore.kernel.org/r/20250105085255.124929-3-cvam0000@gmail.com Signed-off-by: Shivam Chaudhary Signed-off-by: Shuah Khan tools/testing/selftests/tmpfs/bug-link-o-tmpfile.c | 29 +++++++++++----------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 41ca14efaf850c3694ccc5abc18ba552ce1a3fce Author: Shivam Chaudhary Date: Sun Jan 5 14:22:54 2025 +0530 selftests: tmpfs: Add Test-skip if not run as root Add 'ksft_exit_skip()', if not run as root, with an appropriate Warning. Add 'ksft_print_header()' and 'ksft_set_plan()' to structure test outputs more effectively. Test logs: Before Change: - Without root error: unshare, errno 1 - With root No, output After change: - Without root TAP version 13 1..1 ok 2 # SKIP This test needs root to run! Totals: pass:0 fail:0 xfail:0 xpass:0 skip:1 error:0 - With root TAP version 13 1..1 Link: https://lore.kernel.org/r/20250105085255.124929-2-cvam0000@gmail.com Signed-off-by: Shivam Chaudhary Signed-off-by: Shuah Khan tools/testing/selftests/tmpfs/bug-link-o-tmpfile.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 02bc220dc6dc7c56edc4859bc5dd2c08b95d5fb5 Author: Dmitry V. Levin Date: Wed Jan 8 19:07:57 2025 +0200 selftests: harness: fix printing of mismatch values in __EXPECT() intptr_t and uintptr_t are not big enough types on 32-bit architectures when printing 64-bit values, resulting to the following incorrect diagnostic output: # get_syscall_info.c:209:get_syscall_info:Expected exp_args[2] (3134324433) == info.entry.args[1] (3134324433) Replace intptr_t and uintptr_t with intmax_t and uintmax_t, respectively. With this fix, the same test produces more usable diagnostic output: # get_syscall_info.c:209:get_syscall_info:Expected exp_args[2] (3134324433) == info.entry.args[1] (18446744072548908753) Link: https://lore.kernel.org/r/20250108170757.GA6723@strace.io Fixes: b5bb6d3068ea ("selftests/seccomp: fix 32-bit build warnings") Signed-off-by: Dmitry V. Levin Reviewed-by: Kees Cook Signed-off-by: Shuah Khan tools/testing/selftests/kselftest_harness.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit b6f9cd83c60ebb48f580dd0ec9e9080590ebc053 Author: Vincent Donnefort Date: Wed Dec 18 17:03:18 2024 +0000 selftests/ring-buffer: Add test for out-of-bound pgoff mapping Extend the ring-buffer mapping test coverage by checking an out-of-bound pgoff which has proven to be problematic in the past. Link: https://lore.kernel.org/r/20241218170318.2814991-1-vdonnefort@google.com Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Signed-off-by: Vincent Donnefort Signed-off-by: Shuah Khan tools/testing/selftests/ring-buffer/map_test.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 103c0b5e82fb0f7c66c410897588095e9a1f64f6 Author: Brendan Jackman Date: Fri Dec 20 16:12:41 2024 +0000 selftests/run_kselftest.sh: Fix help string for --per-test-log This is documented as --per_test_log but the argument is actually --per-test-log. Link: https://lore.kernel.org/r/20241220-per-test-log-v1-1-de5afe69fdf4@google.com Signed-off-by: Brendan Jackman Signed-off-by: Shuah Khan tools/testing/selftests/run_kselftest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9301be2ce104390d461442f1a092cd1c9c4d7b23 Author: Shivam Chaudhary Date: Tue Dec 10 18:02:12 2024 +0530 selftests: acct: Add ksft_exit_skip if not running as root If the selftest is not running as root, it should skip not fail and give an appropriate warning to the user. This patch adds ksft_exit_skip() if the test is not running as root. Logs: Before change: TAP version 13 1..1 ok 1 # SKIP This test needs root to run! After change: TAP version 13 1..1 ok 2 # SKIP This test needs root to run! Totals: pass:0 fail:0 xfail:0 xpass:0 skip:1 error:0 Link: https://lore.kernel.org/r/20241210123212.332050-1-cvam0000@gmail.com Signed-off-by: Shivam Chaudhary Signed-off-by: Shuah Khan tools/testing/selftests/acct/acct_syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a7a4e46f85ebc87853b4edc4436008d2372c3c3 Author: zhang jiao Date: Mon Dec 2 12:31:11 2024 +0800 selftests: kselftest: Fix the wrong format specifier The format specifier of "unsigned int" in printf() should be "%u", not "%d". Link: https://lore.kernel.org/r/20241202043111.3888-1-zhangjiao2@cmss.chinamobile.com Signed-off-by: zhang jiao Signed-off-by: Shuah Khan tools/testing/selftests/kselftest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8694e6a7f7dba23d3abd9f5a96f64d161704c7b1 Author: Geert Uytterhoeven Date: Thu Dec 12 10:02:56 2024 +0100 selftests: timers: clocksource-switch: Adapt progress to kselftest framework When adapting the test to the kselftest framework, a few printf() calls indicating test progress were not updated. Fix this by replacing these printf() calls by ksft_print_msg() calls. Link: https://lore.kernel.org/r/7dd4b9ab6e43268846e250878ebf25ae6d3d01ce.1733994134.git.geert+renesas@glider.be Fixes: ce7d101750ff ("selftests: timers: clocksource-switch: adapt to kselftest framework") Signed-off-by: Geert Uytterhoeven Reviewed-by: Thomas Gleixner Signed-off-by: Shuah Khan tools/testing/selftests/timers/clocksource-switch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d54d3f69b7a13f193fd537c60b0184aefc35bc24 Author: Li Zhijian Date: Wed Dec 11 08:46:25 2024 +0800 selftests/zram: gitignore output file After `make run_tests`, the git status complains: Untracked files: (use "git add ..." to include in what will be committed) zram/err.log This file will be cleaned up when execute 'make clean' Link: https://lore.kernel.org/r/20241211004625.5308-1-lizhijian@fujitsu.com Cc: Shuah Khan Signed-off-by: Li Zhijian Signed-off-by: Shuah Khan tools/testing/selftests/zram/.gitignore | 2 ++ 1 file changed, 2 insertions(+) commit 6d59d557e3ec3bde3102efdf4038ccffb848666f Author: Li Zhijian Date: Wed Dec 11 08:49:47 2024 +0800 selftests/filesystems: Add missing gitignore file Compiled binary files should be added to .gitignore 'git status' complains: Untracked files: (use "git add ..." to include in what will be committed) filesystems/statmount/statmount_test_ns Link: https://lore.kernel.org/r/20241211004947.5806-1-lizhijian@fujitsu.com Cc: Shuah Khan Cc: Christian Brauner Cc: Miklos Szeredi Cc: Josef Bacik Reviewed-by: Charlie Jenkins Tested-by: Charlie Jenkins Signed-off-by: Li Zhijian Signed-off-by: Shuah Khan tools/testing/selftests/filesystems/statmount/.gitignore | 1 + 1 file changed, 1 insertion(+) commit 74864403c578d9caa92fb9b2743a4b7aa5240e44 Author: Laura Nao Date: Tue Nov 26 10:37:10 2024 +0100 selftests: Warn about skipped tests in result summary Update the functions that print the test totals at the end of a selftest to include a warning message when skipped tests are detected. The message advises users that skipped tests may indicate missing configuration options and suggests enabling them to improve coverage. Link: https://lore.kernel.org/r/20241126093710.13314-1-laura.nao@collabora.com Signed-off-by: Laura Nao Signed-off-by: Shuah Khan tools/testing/selftests/kselftest.h | 5 +++++ tools/testing/selftests/kselftest/ksft.py | 3 +++ tools/testing/selftests/kselftest/ktap_helpers.sh | 4 ++++ 3 files changed, 12 insertions(+) commit e8731ecdd67d3d32a2e15a1eea66cfb1e4a5871a Author: Stefano Pigozzi Date: Sat Dec 7 02:23:25 2024 +0100 selftests: kselftest: Add ksft_test_result_xpass The functions ksft_test_result_pass, ksft_test_result_fail, ksft_test_result_xfail, and ksft_test_result_skip already exist and are available for use in selftests, but no XPASS equivalent is available. This adds a new function to that family that outputs XPASS, so that it's available for future test writers. Link: https://lore.kernel.org/r/20241207012325.56611-1-me@steffo.eu Signed-off-by: Stefano Pigozzi Signed-off-by: Shuah Khan tools/testing/selftests/kselftest.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit e0746bde6f820a6239628a5c17653b5c3c3d56df Author: Fangrui Song Date: Fri Dec 6 21:07:25 2024 +0800 selftests/vDSO: support DT_GNU_HASH glibc added support for DT_GNU_HASH in 2006 and DT_HASH has been obsoleted for more than one decade in many Linux distributions. Many vDSOs support DT_GNU_HASH. This patch adds selftests support. Link: https://lore.kernel.org/r/20241206130724.7944-2-xry111@xry111.site Signed-off-by: Fangrui Song Tested-by: Xi Ruoyao Signed-off-by: Xi Ruoyao # rebase Signed-off-by: Shuah Khan tools/testing/selftests/vDSO/parse_vdso.c | 110 ++++++++++++++++++++++-------- 1 file changed, 82 insertions(+), 28 deletions(-) commit eed8ecdf123e6d7874b5d3b71dab8a01747a4305 Author: zhang jiao Date: Mon Dec 2 12:58:27 2024 +0800 selftests/ipc: Remove unused variables Delete variables "msg" and "pid" that have never been used. Link: https://lore.kernel.org/r/20241202045827.4704-1-zhangjiao2@cmss.chinamobile.com Signed-off-by: zhang jiao Reviewed-by: Muhammad Usama Anjum Signed-off-by: Shuah Khan tools/testing/selftests/ipc/msgque.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 687c5e560079cf11f6e5406bfca35567bb485fdd Author: Carlos Llamas Date: Thu Dec 5 19:48:07 2024 +0000 selftest: media_tests: fix trivial UAF typo Stumbled upon this typo while looking for something else. Link: https://lore.kernel.org/lkml/20241205194829.3449669-1-cmllamas@google.com/ Cc: Shuah Khan Fixes: fe8777a8a0a1 ("selftests: add media controller regression test scripts and document") Signed-off-by: Carlos Llamas Signed-off-by: Shuah Khan tools/testing/selftests/media_tests/regression_test.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e5321ae10e1323359a5067a26dfe98b5f44cc5e6 Author: Ilpo Järvinen Date: Tue Jan 14 19:08:38 2025 +0200 PCI: Store number of supported End-End TLP Prefixes eetlp_prefix_path in the struct pci_dev tells if End-End TLP Prefixes are supported by the path or not, and the value is only calculated if CONFIG_PCI_PASID is set. The Max End-End TLP Prefixes field in the Device Capabilities Register 2 also tells how many (1-4) End-End TLP Prefixes are supported (PCIe r6.2 sec 7.5.3.15). The number of supported End-End Prefixes is useful for reading correct number of DWORDs from TLP Prefix Log register in AER capability (PCIe r6.2 sec 7.8.4.12). Replace eetlp_prefix_path with eetlp_prefix_max and determine the number of supported End-End Prefixes regardless of CONFIG_PCI_PASID so that an upcoming commit generalizing TLP Prefix Log register reading does not have to read extra DWORDs for End-End Prefixes that never will be there. The value stored into eetlp_prefix_max is directly derived from device's Max End-End TLP Prefixes and does not consider limitations imposed by bridges or the Root Port beyond supported/not supported flags. This is intentional for two reasons: 1) PCIe r6.2 spec sections 2.2.10.4 & 6.2.4.4 indicate that a TLP is malformed only if the number of prefixes exceed the number of Max End-End TLP Prefixes, which seems to be the case even if the device could never receive that many prefixes due to smaller maximum imposed by a bridge or the Root Port. If TLP parsing is later added, this distinction is significant in interpreting what is logged by the TLP Prefix Log registers and the value matching to the Malformed TLP threshold is going to be more useful. 2) TLP Prefix handling happens autonomously on a low layer and the value in eetlp_prefix_max is not programmed anywhere by the kernel (i.e., there is no limiter OS can control to prevent sending more than N TLP Prefixes). Link: https://lore.kernel.org/r/20250114170840.1633-7-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron Reviewed-by: Yazen Ghannam drivers/pci/ats.c | 2 +- drivers/pci/probe.c | 14 +++++++++----- include/linux/pci.h | 2 +- include/uapi/linux/pci_regs.h | 1 + 4 files changed, 12 insertions(+), 7 deletions(-) commit 27d41818b69699f5e23379f09998453b0ae12252 Author: Ilpo Järvinen Date: Tue Jan 14 19:08:37 2025 +0200 PCI: Use unsigned int i in pcie_read_tlp_log() Loop variable i counting from 0 upwards does not need to be signed so make it unsigned int. Link: https://lore.kernel.org/r/20250114170840.1633-6-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron drivers/pci/pcie/tlp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dbfd51ba4cb35f8cf374e824920c5705b2dfcd51 Author: Ilpo Järvinen Date: Tue Jan 14 19:08:36 2025 +0200 PCI: Use same names in pcie_read_tlp_log() prototype and definition pcie_read_tlp_log()'s prototype and function signature diverged due to changes made while applying. Make the parameters of pcie_read_tlp_log() named identically. Link: https://lore.kernel.org/r/20250114170840.1633-5-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron Reviewed-by: Yazen Ghannam drivers/pci/pcie/tlp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit ede5d5dbef6f3a1f25ee4e9d1999750827aa0640 Author: Ilpo Järvinen Date: Tue Jan 14 19:08:35 2025 +0200 PCI: Add defines for TLP Header/Prefix log sizes Add defines for AER and DPC capabilities TLP Header Logging register sizes (PCIe r6.2, sec 7.8.4 / 7.9.14) and replace literals with them. Link: https://lore.kernel.org/r/20250114170840.1633-4-ilpo.jarvinen@linux.intel.com Suggested-by: Yazen Ghannam Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas drivers/pci/pcie/dpc.c | 10 ++++++---- drivers/pci/pcie/tlp.c | 2 +- drivers/pci/quirks.c | 6 ++++-- include/linux/aer.h | 9 ++++++++- 4 files changed, 19 insertions(+), 8 deletions(-) commit a71c59269e51f9fffd97a7be199ff74478759e1c Author: Ilpo Järvinen Date: Tue Jan 14 19:08:34 2025 +0200 PCI: Move TLP Log handling to its own file TLP Log is a PCIe feature and is processed only by AER and DPC. Configwise, DPC depends AER being enabled. In lack of better place, the TLP Log handling code was initially placed into pci.c but it can be easily placed in a separate file. Move TLP Log handling code to its own file under pcie/ subdirectory and include it only when AER is enabled. Link: https://lore.kernel.org/r/20250114170840.1633-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron Reviewed-by: Yazen Ghannam drivers/pci/pci.c | 27 --------------------------- drivers/pci/pci.h | 2 +- drivers/pci/pcie/Makefile | 2 +- drivers/pci/pcie/tlp.c | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+), 29 deletions(-) commit 013525583fdd79b6b83547b937535dfd406d3cd5 Author: Ilpo Järvinen Date: Tue Jan 14 19:08:33 2025 +0200 PCI: Don't expose pcie_read_tlp_log() outside PCI subsystem pcie_read_tlp_log() was exposed by the commit 0a5a46a6a61b ("PCI/AER: Generalize TLP Header Log reading") with the intent that drivers could use it, but the PCI maintainer later decided that drivers should be encouraged to use PCI core diagnostic logging of generic AER registers rather than building their own. Drivers that currently implement their own diagnostic logging include ixgbe (ixgbe_io_error_detected()) and iwlwifi (iwl_trans_pcie_dump_regs()). Remove the unwanted EXPORT of pcie_read_tlp_log() and remove it from include/linux/aer.h. Link: https://lore.kernel.org/r/20250114170840.1633-2-ilpo.jarvinen@linux.intel.com Link: https://lore.kernel.org/all/20240322193011.GA701027@bhelgaas/ Signed-off-by: Ilpo Järvinen [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron Reviewed-by: Yazen Ghannam drivers/pci/pci.c | 1 - drivers/pci/pci.h | 4 ++++ include/linux/aer.h | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) commit 6e59bcd1e088901fe3441b2f3cfe887cdf544a4c Author: Stefan Wahren Date: Tue Dec 17 20:33:56 2024 +0100 arm64: defconfig: Enable pinctrl-based I2C mux The commit 84b1d6cc3e4c ("ARM: dts: bcm2711-rpi: Add pinctrl-based multiplexing for I2C0") introduced multiplexing for I2C on BCM2711-based Raspberry Pi boards. Unfortunately we missed to enable the necessary driver in the defconfig. Cc: Laurent Pinchart Link: https://lore.kernel.org/linux-devicetree/961b3d43-b4c9-4573-82d7-844aa129d994@notapiano/ Signed-off-by: Stefan Wahren Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20241217193356.111102-1-wahrenst@gmx.net Signed-off-by: Florian Fainelli arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit b01b59a4fa87831b8504f1e8fc553ce599e7362d Author: Christophe JAILLET Date: Sun Jan 12 15:14:50 2025 +0100 net: phy: Constify struct mdio_device_id 'struct mdio_device_id' is not modified in these drivers. Constifying these structures moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 27014 12792 0 39806 9b7e drivers/net/phy/broadcom.o After: ===== text data bss dec hex filename 27206 12600 0 39806 9b7e drivers/net/phy/broadcom.o Signed-off-by: Christophe JAILLET Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/403c381b7d9156b67ad68ffc44b8eee70c5e86a9.1736691226.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski drivers/net/phy/adin.c | 2 +- drivers/net/phy/adin1100.c | 2 +- drivers/net/phy/air_en8811h.c | 2 +- drivers/net/phy/amd.c | 2 +- drivers/net/phy/aquantia/aquantia_main.c | 2 +- drivers/net/phy/ax88796b.c | 2 +- drivers/net/phy/bcm-cygnus.c | 2 +- drivers/net/phy/bcm54140.c | 2 +- drivers/net/phy/bcm63xx.c | 2 +- drivers/net/phy/bcm7xxx.c | 2 +- drivers/net/phy/bcm84881.c | 2 +- drivers/net/phy/broadcom.c | 2 +- drivers/net/phy/cicada.c | 2 +- drivers/net/phy/cortina.c | 2 +- drivers/net/phy/davicom.c | 2 +- drivers/net/phy/dp83640.c | 2 +- drivers/net/phy/dp83822.c | 2 +- drivers/net/phy/dp83848.c | 2 +- drivers/net/phy/dp83867.c | 2 +- drivers/net/phy/dp83869.c | 2 +- drivers/net/phy/dp83tc811.c | 2 +- drivers/net/phy/dp83td510.c | 2 +- drivers/net/phy/dp83tg720.c | 2 +- drivers/net/phy/et1011c.c | 2 +- drivers/net/phy/icplus.c | 2 +- drivers/net/phy/intel-xway.c | 2 +- drivers/net/phy/lxt.c | 2 +- drivers/net/phy/marvell-88q2xxx.c | 2 +- drivers/net/phy/marvell-88x2222.c | 2 +- drivers/net/phy/marvell.c | 2 +- drivers/net/phy/marvell10g.c | 2 +- drivers/net/phy/mediatek/mtk-ge-soc.c | 2 +- drivers/net/phy/mediatek/mtk-ge.c | 2 +- drivers/net/phy/meson-gxl.c | 2 +- drivers/net/phy/micrel.c | 2 +- drivers/net/phy/microchip.c | 2 +- drivers/net/phy/microchip_t1.c | 2 +- drivers/net/phy/microchip_t1s.c | 2 +- drivers/net/phy/mscc/mscc_main.c | 2 +- drivers/net/phy/mxl-gpy.c | 2 +- drivers/net/phy/national.c | 2 +- drivers/net/phy/ncn26000.c | 2 +- drivers/net/phy/nxp-c45-tja11xx.c | 2 +- drivers/net/phy/nxp-cbtx.c | 2 +- drivers/net/phy/nxp-tja11xx.c | 2 +- drivers/net/phy/qcom/at803x.c | 2 +- drivers/net/phy/qcom/qca807x.c | 2 +- drivers/net/phy/qcom/qca808x.c | 2 +- drivers/net/phy/qcom/qca83xx.c | 2 +- drivers/net/phy/qsemi.c | 2 +- drivers/net/phy/rockchip.c | 2 +- drivers/net/phy/smsc.c | 2 +- drivers/net/phy/ste10Xp.c | 2 +- drivers/net/phy/teranetics.c | 2 +- drivers/net/phy/uPD60620.c | 2 +- drivers/net/phy/vitesse.c | 2 +- 56 files changed, 56 insertions(+), 56 deletions(-) commit 721167200493d9a62300e421a9f7f3f020b2e3d0 Merge: b56e4d660a96 33700ca45b7d Author: Jakub Kicinski Date: Tue Jan 14 14:51:36 2025 -0800 Merge branch 'net-phy-realtek-add-hwmon-support' Heiner Kallweit says: ==================== net: phy: realtek: add hwmon support This adds hwmon support for the temperature sensor on RTL822x. It's available on the standalone versions of the PHY's, and on the internal PHY's of RTL8125B(P)/RTL8125D/RTL8126. ==================== Link: https://patch.msgid.link/7319d8f9-2d6f-4522-92e8-a8a4990042fb@gmail.com Signed-off-by: Jakub Kicinski commit 33700ca45b7d2e1655d4cad95e25671e8a94e2f0 Author: Heiner Kallweit Date: Sat Jan 11 21:51:24 2025 +0100 net: phy: realtek: add hwmon support for temp sensor on RTL822x This adds hwmon support for the temperature sensor on RTL822x. It's available on the standalone versions of the PHY's, and on the integrated PHY's in RTL8125B/RTL8125D/RTL8126. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/ad6bfe9f-6375-4a00-84b4-bfb38a21bd71@gmail.com Signed-off-by: Jakub Kicinski drivers/net/phy/realtek/Kconfig | 6 +++ drivers/net/phy/realtek/Makefile | 1 + drivers/net/phy/realtek/realtek.h | 10 +++++ drivers/net/phy/realtek/realtek_hwmon.c | 79 +++++++++++++++++++++++++++++++++ drivers/net/phy/realtek/realtek_main.c | 12 +++++ 5 files changed, 108 insertions(+) commit 1416a9b2ba710d31954131c06d46f298e340aa2c Author: Heiner Kallweit Date: Sat Jan 11 21:50:19 2025 +0100 net: phy: move realtek PHY driver to its own subdirectory In preparation of adding a source file with hwmon support, move the Realtek PHY driver to its own subdirectory and rename realtek.c to realtek_main.c. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/c566551b-c915-4e34-9b33-129a6ddd6e4c@gmail.com Signed-off-by: Jakub Kicinski drivers/net/phy/Kconfig | 5 +---- drivers/net/phy/Makefile | 2 +- drivers/net/phy/realtek/Kconfig | 5 +++++ drivers/net/phy/realtek/Makefile | 3 +++ drivers/net/phy/{realtek.c => realtek/realtek_main.c} | 0 5 files changed, 10 insertions(+), 5 deletions(-) commit 3d483a10327f38595f714f9f9e9dde43a622cb0f Author: Heiner Kallweit Date: Sat Jan 11 21:49:31 2025 +0100 net: phy: realtek: add support for reading MDIO_MMD_VEND2 regs on RTL8125/RTL8126 RTL8125/RTL8126 don't support MMD access to the internal PHY, but provide a mechanism to access at least all MDIO_MMD_VEND2 registers. By exposing this mechanism standard MMD access functions can be used to access the MDIO_MMD_VEND2 registers. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/e821b302-5fe6-49ab-aabd-05da500581c0@gmail.com Signed-off-by: Jakub Kicinski drivers/net/phy/realtek.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit b56e4d660a9688ff83f5cbdc6e3ea063352d0d79 Author: Lorenzo Bianconi Date: Sun Jan 12 19:32:45 2025 +0100 net: airoha: Enforce ETS Qdisc priomap EN7581 SoC supports fixed QoS band priority where WRR queues have lowest priorities with respect to SP ones. E.g: WRR0, WRR1, .., WRRm, SP0, SP1, .., SPn Enforce ETS Qdisc priomap according to the hw capabilities. Suggested-by: Davide Caratti Signed-off-by: Lorenzo Bianconi Reviewed-by: Davide Caratti Link: https://patch.msgid.link/20250112-airoha_ets_priomap-v1-1-fb616de159ba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/mediatek/airoha_eth.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 62507e3856affdc1c90792bea89564a67f01f97c Author: Alexander Sverdlin Date: Fri Jan 10 13:57:35 2025 +0100 net: ethernet: ti: am65-cpsw: VLAN-aware CPSW only if !DSA Only configure VLAN-aware CPSW mode if no port is used as DSA CPU port. VLAN-aware mode interferes with some DSA tagging schemes and makes stacking DSA switches downstream of CPSW impossible. Previous attempts to address the issue linked below. Link: https://lore.kernel.org/netdev/20240227082815.2073826-1-s-vadapalli@ti.com/ Link: https://lore.kernel.org/linux-arm-kernel/4699400.vD3TdgH1nR@localhost/ Co-developed-by: Siddharth Vadapalli Signed-off-by: Siddharth Vadapalli Signed-off-by: Alexander Sverdlin Link: https://patch.msgid.link/20250110125737.546184-1-alexander.sverdlin@siemens.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/ti/am65-cpsw-nuss.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b1b5cff6002a1cfe806a66aede143f44e8c1a1db Author: Gerhard Engleder Date: Fri Jan 10 23:39:39 2025 +0100 tsnep: Link queues to NAPIs Use netif_queue_set_napi() to link queues to NAPI instances so that they can be queried with netlink. $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --dump queue-get --json='{"ifindex": 11}' [{'id': 0, 'ifindex': 11, 'napi-id': 9, 'type': 'rx'}, {'id': 1, 'ifindex': 11, 'napi-id': 10, 'type': 'rx'}, {'id': 0, 'ifindex': 11, 'napi-id': 9, 'type': 'tx'}, {'id': 1, 'ifindex': 11, 'napi-id': 10, 'type': 'tx'}] Additionally use netif_napi_set_irq() to also provide NAPI interrupt number to userspace. $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --do napi-get --json='{"id": 9}' {'defer-hard-irqs': 0, 'gro-flush-timeout': 0, 'id': 9, 'ifindex': 11, 'irq': 42, 'irq-suspend-timeout': 0} Providing information about queues to userspace makes sense as APIs like XSK provide queue specific access. Also XSK busy polling relies on queues linked to NAPIs. Signed-off-by: Gerhard Engleder Reviewed-by: Alexander Lobakin Link: https://patch.msgid.link/20250110223939.37490-1-gerhard@engleder-embedded.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/engleder/tsnep_main.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) commit 914639464b760a4ec659a46cc2de9a2fdc4eff5a Author: Karol Kolacinski Date: Wed Dec 4 10:46:11 2024 +0100 ice: Add in/out PTP pin delays HW can have different input/output delays for each of the pins. Currently, only E82X adapters have delay compensation based on TSPLL config and E810 adapters have constant 1 ms compensation, both cases only for output delays and the same one for all pins. E825 adapters have different delays for SDP and other pins. Those delays are also based on direction and input delays are different than output ones. This is the main reason for moving delays to pin description structure. Add a field in ice_ptp_pin_desc structure to reflect that. Delay values are based on approximate calculations of HW delays based on HW spec. Implement external timestamp (input) delay compensation. Remove existing definitions and wrappers for periodic output propagation delays. Reviewed-by: Przemek Kitszel Signed-off-by: Karol Kolacinski Reviewed-by: Simon Horman Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 82 ++++++++++++++----------- drivers/net/ethernet/intel/ice/ice_ptp.h | 2 + drivers/net/ethernet/intel/ice/ice_ptp_consts.h | 12 ---- drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 23 ------- 4 files changed, 49 insertions(+), 70 deletions(-) commit ef9a64c07294abcda51e1b6adcbf0392afe2c62d Author: Jacob Keller Date: Mon Dec 16 09:53:32 2024 -0500 ice: implement low latency PHY timer updates Programming the PHY registers in preparation for an increment value change or a timer adjustment on E810 requires issuing Admin Queue commands for each PHY register. It has been found that the firmware Admin Queue processing occasionally has delays of tens or rarely up to hundreds of milliseconds. This delay cascades to failures in the PTP applications which depend on these updates being low latency. Consider a standard PTP profile with a sync rate of 16 times per second. This means there is ~62 milliseconds between sync messages. A complete cycle of the PTP algorithm 1) Sync message (with Tx timestamp) from source 2) Follow-up message from source 3) Delay request (with Tx timestamp) from sink 4) Delay response (with Rx timestamp of request) from source 5) measure instantaneous clock offset 6) request time adjustment via CLOCK_ADJTIME systemcall The Tx timestamps have a default maximum timeout of 10 milliseconds. If we assume that the maximum possible time is used, this leaves us with ~42 milliseconds of processing time for a complete cycle. The CLOCK_ADJTIME system call is synchronous and will block until the driver completes its timer adjustment or frequency change. If the writes to prepare the PHY timers get hit by a latency spike of 50 milliseconds, then the PTP application will be delayed past the point where the next cycle should start. Packets from the next cycle may have already arrived and are waiting on the socket. In particular, LinuxPTP ptp4l may start complaining about missing an announce message from the source, triggering a fault. In addition, the clockcheck logic it uses may trigger. This clockcheck failure occurs because the timestamp captured by hardware is compared against a reading of CLOCK_MONOTONIC. It is assumed that the time when the Rx timestamp is captured and the read from CLOCK_MONOTONIC are relatively close together. This is not the case if there is a significant delay to processing the Rx packet. Newer firmware supports programming the PHY registers over a low latency interface which bypasses the Admin Queue. Instead, software writes to the REG_LL_PROXY_L and REG_LL_PROXY_H registers. Firmware reads these registers and then programs the PHY timers. Implement functions to use this interface when available to program the PHY timers instead of using the Admin Queue. This avoids the Admin Queue latency and ensures that adjustments happen within acceptable latency bounds. Co-developed-by: Karol Kolacinski Signed-off-by: Karol Kolacinski Signed-off-by: Jacob Keller Signed-off-by: Anton Nadezhdin Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 105 ++++++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 4 ++ 2 files changed, 109 insertions(+) commit a5c69d45df27de56197c1b8ce0429f780fc0ca75 Author: Jacob Keller Date: Mon Dec 16 09:53:31 2024 -0500 ice: check low latency PHY timer update firmware capability Newer versions of firmware support programming the PHY timer via the low latency interface exposed over REG_LL_PROXY_L and REG_LL_PROXY_H. Add support for checking the device capabilities for this feature. Co-developed-by: Karol Kolacinski Signed-off-by: Karol Kolacinski Signed-off-by: Jacob Keller Reviewed-by: Milena Olech Signed-off-by: Anton Nadezhdin Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_common.c | 3 +++ drivers/net/ethernet/intel/ice/ice_type.h | 2 ++ 2 files changed, 5 insertions(+) commit 50327223a8bb016cf89325af8cd2704a9edce796 Author: Jacob Keller Date: Mon Dec 16 09:53:30 2024 -0500 ice: add lock to protect low latency interface Newer firmware for the E810 devices support a 'low latency' interface to interact with the PHY without using the Admin Queue. This is interacted with via the REG_LL_PROXY_L and REG_LL_PROXY_H registers. Currently, this interface is only used for Tx timestamps. There are two different mechanisms, including one which uses an interrupt for firmware to signal completion. However, these two methods are mutually exclusive, so no synchronization between them was necessary. This low latency interface is being extended in future firmware to support also programming the PHY timers. Use of the interface for PHY timers will need synchronization to ensure there is no overlap with a Tx timestamp. The interrupt-based response complicates the locking somewhat. We can't use a simple spinlock. This would require being acquired in ice_ptp_req_tx_single_tstamp, and released in ice_ptp_complete_tx_single_tstamp. The ice_ptp_req_tx_single_tstamp function is called from the threaded IRQ, and the ice_ptp_complete_tx_single_stamp is called from the low latency IRQ, so we would need to acquire the lock with IRQs disabled. To handle this, we'll use a wait queue along with wait_event_interruptible_locked_irq in the update flows which don't use the interrupt. The interrupt flow will acquire the wait queue lock, set the ATQBAL_FLAGS_INTR_IN_PROGRESS, and then initiate the firmware low latency request, and unlock the wait queue lock. Upon receipt of the low latency interrupt, the lock will be acquired, the ATQBAL_FLAGS_INTR_IN_PROGRESS bit will be cleared, and the firmware response will be captured, and wake_up_locked() will be called on the wait queue. The other flows will use wait_event_interruptible_locked_irq() to wait until the ATQBAL_FLAGS_INTR_IN_PROGRESS is clear. This function checks the condition under lock, but does not hold the lock while waiting. On return, the lock is held, and a return of zero indicates we hold the lock and the in-progress flag is not set. This will ensure that threads which need to use the low latency interface will sleep until they can acquire the lock without any pending low latency interrupt flow interfering. Signed-off-by: Jacob Keller Reviewed-by: Milena Olech Signed-off-by: Anton Nadezhdin Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 42 +++++++++++++++++++++++------ drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 18 +++++++++++++ drivers/net/ethernet/intel/ice/ice_type.h | 10 +++++++ 3 files changed, 62 insertions(+), 8 deletions(-) commit 5b15b1f144c811a3ec145ff44dd2b41daa8a3b4f Author: Jacob Keller Date: Mon Dec 16 09:53:29 2024 -0500 ice: rename TS_LL_READ* macros to REG_LL_PROXY_H_* The TS_LL_READ macros are used as part of the low latency Tx timestamp interface. A future firmware extension will add support for performing PHY timer updates over this interface. Using TS_LL_READ as the prefix for these macros will be confusing once the interface is used for other purposes. Rename the macros, using the prefix REG_LL_PROXY_H, to better clarify that this is for the low latency interface. Additionally add macros for PF_SB_ATQBAH and PF_SB_ATQBAL registers to better clarify content of this registers as PF_SB_ATQBAH contain low part of Tx timestamp Co-developed-by: Karol Kolacinski Signed-off-by: Karol Kolacinski Signed-off-by: Jacob Keller Reviewed-by: Milena Olech Signed-off-by: Anton Nadezhdin Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp.c | 14 +++++++------- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 14 +++++++------- drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 13 ++++++++----- 3 files changed, 22 insertions(+), 19 deletions(-) commit 95aca43b4a8266f6b7f038b22a61a5f1be91df7a Author: Jacob Keller Date: Mon Dec 16 09:53:28 2024 -0500 ice: use read_poll_timeout_atomic in ice_read_phy_tstamp_ll_e810 The ice_read_phy_tstamp_ll_e810 function repeatedly reads the PF_SB_ATQBAL register until the TS_LL_READ_TS bit is cleared. This is a perfect candidate for using rd32_poll_timeout. However, the default implementation uses a sleep-based wait. Use read_poll_timeout_atomic macro which is based on the non-sleeping implementation and use it to replace the loop reading in the ice_read_phy_tstamp_ll_e810 function. Co-developed-by: Karol Kolacinski Signed-off-by: Karol Kolacinski Signed-off-by: Jacob Keller Signed-off-by: Anton Nadezhdin Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 31 +++++++++++++---------------- drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 2 +- 2 files changed, 15 insertions(+), 18 deletions(-) commit 4c9f13a654260ded93785a72050982a293871f0e Author: R Sundar Date: Sun Oct 27 19:49:07 2024 +0530 ice: use string choice helpers Use string choice helpers for better readability. Reported-by: kernel test robot Reported-by: Julia Lawall Closes: https://lore.kernel.org/r/202410121553.SRNFzc2M-lkp@intel.com/ Signed-off-by: R Sundar Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 85d6164ec56deef2e5692cf8b132115f9317cdf6 Author: Konrad Knitter Date: Wed Dec 11 12:03:57 2024 +0100 ice: add fw and port health reporters Firmware generates events for global events or port specific events. Driver shall subscribe for health status events from firmware on supported FW versions >= 1.7.6. Driver shall expose those under specific health reporter, two new reporters are introduced: - FW health reporter shall represent global events (problems with the image, recovery mode); - Port health reporter shall represent port-specific events (module failure). Firmware only reports problems when those are detected, it does not store active fault list. Driver will hold only last global and last port-specific event. Driver will report all events via devlink health report, so in case of multiple events of the same source they can be reviewed using devlink autodump feature. $ devlink health pci/0000:b1:00.3: reporter fw state healthy error 0 recover 0 auto_dump true reporter port state error error 1 recover 0 last_dump_date 2024-03-17 last_dump_time 09:29:29 auto_dump true $ devlink health diagnose pci/0000:b1:00.3 reporter port Syndrome: 262 Description: Module is not present. Possible Solution: Check that the module is inserted correctly. Port Number: 0 Tested on Intel Corporation Ethernet Controller E810-C for SFP Reviewed-by: Marcin Szycik Co-developed-by: Sharon Haroni Signed-off-by: Sharon Haroni Co-developed-by: Nicholas Nunley Signed-off-by: Nicholas Nunley Co-developed-by: Brett Creeley Signed-off-by: Brett Creeley Signed-off-by: Konrad Knitter Tested-by: Rinitha S (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/devlink/health.c | 295 +++++++++++++++++++++++- drivers/net/ethernet/intel/ice/devlink/health.h | 15 +- drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 87 +++++++ drivers/net/ethernet/intel/ice/ice_common.c | 38 +++ drivers/net/ethernet/intel/ice/ice_common.h | 2 + drivers/net/ethernet/intel/ice/ice_main.c | 3 + drivers/net/ethernet/intel/ice/ice_type.h | 5 + 7 files changed, 437 insertions(+), 8 deletions(-) commit e81e1d79a9743cd6f20429353335c42ecaf10c98 Author: Michal Swiatkowski Date: Fri Oct 11 09:03:28 2024 +0200 ice: add recipe priority check in search The new recipe should be added even if exactly the same recipe already exists with different priority. Example use case is when the rule is being added from TC tool context. It should has the highest priority, but if the recipe already exists the rule will inherit it priority. It can lead to the situation when the rule added from TC tool has lower priority than expected. The solution is to check the recipe priority when trying to find existing one. Previous recipe is still useful. Example: RID 8 -> priority 4 RID 10 -> priority 7 The difference is only in priority rest is let's say eth + mac + direction. Adding ARP + MAC_A + RX on RID 8, forward to VF0_VSI After that IP + MAC_B + RX on RID 10 (from TC tool), forward to PF0 Both will work. In case of adding ARP + MAC_A + RX on RID 8, forward to VF0_VSI ARP + MAC_A + RX on RID 10, forward to PF0. Only second one will match, but this is expected. Reviewed-by: Marcin Szycik Reviewed-by: Przemek Kitszel Signed-off-by: Michal Swiatkowski Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_switch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fb59a520bbb1055e403c831ab9ff1a88a4848847 Author: Przemek Kitszel Date: Wed Oct 2 13:50:24 2024 +0200 ice: ice_probe: init ice_adapter after HW init Move ice_adapter initialization to be after HW init, so it could use HW capabilities, like number of PFs. This is needed for devlink-resource based RSS LUT size management for PF/VF (not in this series). Reviewed-by: Marcin Szycik Signed-off-by: Przemek Kitszel Reviewed-by: Kalesh AP Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_main.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 5d5d9c2c0fb9d2028f52ed67e7db86a4be03f342 Author: Przemek Kitszel Date: Wed Oct 2 13:50:23 2024 +0200 ice: minor: rename goto labels from err to unroll Clean up goto labels after previous commit, to conform to single naming scheme in ice_probe() and ice_init_dev(). Reviewed-by: Marcin Szycik Signed-off-by: Przemek Kitszel Reviewed-by: Kalesh AP Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 4d3f59bfa2cd3193b8bbe724df0a9cd41bdc507d Author: Przemek Kitszel Date: Wed Oct 2 13:50:22 2024 +0200 ice: split ice_init_hw() out from ice_init_dev() Split ice_init_hw() call out from ice_init_dev(). Such move enables pulling the former to be even earlier on call path, what would enable moving ice_adapter init to be between the two (in subsequent commit). Such move enables ice_adapter to know about number of PFs. Do the same for ice_deinit_hw(), so the init and deinit calls could be easily mirrored. Next commit will rename unrelated goto labels to unroll prefix. Reviewed-by: Marcin Szycik Signed-off-by: Przemek Kitszel Reviewed-by: Kalesh AP Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/devlink/devlink.c | 10 +++++++++- drivers/net/ethernet/intel/ice/ice_main.c | 22 +++++++++++----------- 2 files changed, 20 insertions(+), 12 deletions(-) commit c37dd67c423308c5a58c1a6e5b53229a95e19c3f Author: Przemek Kitszel Date: Wed Oct 2 13:50:21 2024 +0200 ice: c827: move wait for FW to ice_init_hw() Move call to ice_wait_for_fw() from ice_init_dev() into ice_init_hw(), where it fits better. This requires also to move ice_wait_for_fw() to ice_common.c. ice_is_pf_c827() is now used only in ice_common.c, so it could be static. CC: Arkadiusz Kubalewski Reviewed-by: Marcin Szycik Signed-off-by: Przemek Kitszel Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen drivers/net/ethernet/intel/ice/ice_common.c | 110 +++++++++++++++++++--------- drivers/net/ethernet/intel/ice/ice_common.h | 1 - drivers/net/ethernet/intel/ice/ice_main.c | 37 ---------- 3 files changed, 75 insertions(+), 73 deletions(-) commit af2bcb5774f8b17941c6b647b333b69c09b45063 Author: Jakub Kicinski Date: Fri Jan 10 18:43:57 2025 -0800 MAINTAINERS: downgrade Ethernet NIC drivers without CI reporting Per previous change downgrade all NIC drivers (discrete, embedded, SoC components, virtual) which don't report test results to CI from Supported to Maintained. Also include all components or building blocks of NIC drivers (separate entries for "shared" code, subsystem support like PTP or entries for specific offloads etc.) Reviewed-by: Simon Horman Acked-by: Alexander Lobakin Link: https://patch.msgid.link/20250111024359.3678956-2-kuba@kernel.org Signed-off-by: Jakub Kicinski MAINTAINERS | 106 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 53 insertions(+), 53 deletions(-) commit 05baba80f2c49ca04019971e7b12b7d66e2ec192 Author: Jakub Kicinski Date: Fri Jan 10 18:43:56 2025 -0800 docs: netdev: document requirements for Supported status As announced back in April, require running upstream tests to maintain Supported status for NIC drivers: https://lore.kernel.org/20240425114200.3effe773@kernel.org Multiple vendors have been "working on it" for months. Let's make it official. Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250111024359.3678956-1-kuba@kernel.org Signed-off-by: Jakub Kicinski Documentation/process/maintainer-netdev.rst | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 4a489220aa8c9daf5f02396c28cebade9f9ab563 Author: Mike Snitzer Date: Fri Nov 15 20:41:06 2024 -0500 nfs: probe for LOCALIO when v3 client reconnects to server Re-enabling NFSv3 LOCALIO is made more complex (than NFSv4) because v3 is stateless. As such, the hueristic used to identify a LOCALIO probe point is more adhoc by nature: if/when NFSv3 client IO begins to complete again in terms of normal RPC-based NFSv3 server IO, attempt nfs_local_probe_async(). Care is taken to throttle the frequency of nfs_local_probe_async(), otherwise there could be a flood of repeat calls to nfs_local_probe_async(). The throttle is admin controlled using a new module parameter for nfsv3, e.g.: echo 512 > /sys/module/nfsv3/parameters/nfs3_localio_probe_throttle Probe for NFSv3 LOCALIO every N IO requests (512 in this case). Must be power-of-2, defaults to 0 (probing disabled). On systems that expect to use LOCALIO with NFSv3 the admin should configure the 'nfs3_localio_probe_throttle' module parameter. This commit backfills module parameter documentation in localio.rst Signed-off-by: Mike Snitzer Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker Documentation/filesystems/nfs/localio.rst | 20 +++++++++++++- fs/nfs/nfs3proc.c | 46 +++++++++++++++++++++++++++++-- fs/nfs_common/nfslocalio.c | 1 + include/linux/nfslocalio.h | 3 +- 4 files changed, 65 insertions(+), 5 deletions(-) commit 76d4cb6345da0f2cd505e552157258325bcc8bcd Author: Mike Snitzer Date: Fri Nov 15 20:41:05 2024 -0500 nfs: probe for LOCALIO when v4 client reconnects to server Introduce nfs_local_probe_async() for the NFS client to initiate if/when it reconnects with server. For NFSv4 it is a simple matter to call nfs_local_probe_async() from nfs4_do_reclaim (during NFSv4 grace). Signed-off-by: Mike Snitzer Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/client.c | 1 + fs/nfs/internal.h | 3 +++ fs/nfs/localio.c | 14 ++++++++++++++ fs/nfs/nfs4state.c | 1 + include/linux/nfs_fs_sb.h | 1 + 5 files changed, 20 insertions(+) commit 779a395189c692eec0246e7df63e2a3c0f0c8508 Author: Mike Snitzer Date: Fri Nov 15 20:41:04 2024 -0500 nfs/localio: remove redundant code and simplify LOCALIO enablement Remove nfs_local_enable and nfs_local_disable, instead use nfs_localio_enable_client and nfs_localio_disable_client. Discontinue use of the NFS_CS_LOCAL_IO bit in the nfs_client struct's cl_flags to reflect that LOCALIO is enabled; instead just test if the net member of the nfs_uuid_t struct is set. Also remove NFS_CS_LOCAL_IO. Lastly, remove trace_nfs_local_enable and trace_nfs_local_disable because comparable traces are available from nfs_localio.ko. Suggested-by: NeilBrown Signed-off-by: Mike Snitzer Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/client.c | 4 ++-- fs/nfs/internal.h | 2 -- fs/nfs/localio.c | 28 +++++----------------------- fs/nfs/nfstrace.h | 32 -------------------------------- fs/nfs_common/nfslocalio.c | 34 +++++++++++----------------------- include/linux/nfs_fs_sb.h | 1 - include/linux/nfslocalio.h | 4 ++++ 7 files changed, 22 insertions(+), 83 deletions(-) commit 0dc73141524403f979a9655b4c55d763dbcb2b88 Author: Mike Snitzer Date: Fri Nov 15 20:41:03 2024 -0500 nfs_common: add nfs_localio trace events The nfs_localio.ko now exposes /sys/kernel/tracing/events/nfs_localio with nfs_localio_enable_client and nfs_localio_disable_client events. Signed-off-by: Mike Snitzer Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs_common/Makefile | 3 ++- fs/nfs_common/localio_trace.c | 10 ++++++++ fs/nfs_common/localio_trace.h | 56 +++++++++++++++++++++++++++++++++++++++++++ fs/nfs_common/nfslocalio.c | 4 ++++ 4 files changed, 72 insertions(+), 1 deletion(-) commit 085804110aa13eac7f763d8d5cfe3a8220e35222 Author: Mike Snitzer Date: Fri Nov 15 20:41:02 2024 -0500 nfs_common: track all open nfsd_files per LOCALIO nfs_client This tracking enables __nfsd_file_cache_purge() to call nfs_localio_invalidate_clients(), upon shutdown or export change, to nfs_close_local_fh() all open nfsd_files that are still cached by the LOCALIO nfs clients associated with nfsd_net that is being shutdown. Now that the client must track all open nfsd_files there was more work than necessary being done with the global nfs_uuids_lock contended. This manifested in various RCU issues, e.g.: hrtimer: interrupt took 47969440 ns rcu: INFO: rcu_sched detected stalls on CPUs/tasks: Use nfs_uuid->lock to protect all nfs_uuid_t members, instead of nfs_uuids_lock, once nfs_uuid_is_local() adds the client to nn->local_clients. Also add 'local_clients_lock' to 'struct nfsd_net' to protect nn->local_clients. And store a pointer to spinlock in the 'list_lock' member of nfs_uuid_t so nfs_localio_disable_client() can use it to avoid taking the global nfs_uuids_lock. In combination, these split out locks eliminate the use of the single nfslocalio.c global nfs_uuids_lock in the IO paths (open and close). Also refactored associated fs/nfs_common/nfslocalio.c methods' locking to reduce work performed with spinlocks held in general. Signed-off-by: Mike Snitzer Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs_common/nfslocalio.c | 170 +++++++++++++++++++++++++++++++++------------ fs/nfsd/filecache.c | 9 +++ fs/nfsd/localio.c | 1 + fs/nfsd/netns.h | 1 + fs/nfsd/nfsctl.c | 4 +- include/linux/nfslocalio.h | 8 ++- 6 files changed, 145 insertions(+), 48 deletions(-) commit e1943f4eb8d531b0b65b22d4181c6a205226b006 Author: Mike Snitzer Date: Fri Nov 15 20:41:01 2024 -0500 nfs_common: rename nfslocalio nfs_uuid_lock to nfs_uuids_lock This global spinlock protects all nfs_uuid_t relative to the global nfs_uuids list. A later commit will split this global spinlock so prepare by renaming this lock to reflect its intended narrow scope. Signed-off-by: Mike Snitzer Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs_common/nfslocalio.c | 34 +++++++++++++++++----------------- fs/nfsd/localio.c | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) commit f9c3e1ba072d0e21e75f7033d75a134549e8ed43 Author: Mike Snitzer Date: Fri Nov 15 20:41:00 2024 -0500 nfsd: nfsd_file_acquire_local no longer returns GC'd nfsd_file Now that LOCALIO no longer leans on NFSD's filecache for caching open files (and instead uses NFS client-side open nfsd_file caching) there is no need to use NFSD filecache's GC feature. Avoiding GC will speed up nfsd_file initial opens. Signed-off-by: Mike Snitzer Reviewed-by: Jeff Layton Acked-by: Chuck Lever Signed-off-by: Anna Schumaker fs/nfsd/filecache.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit b33f7dec3a67216123312c7bb752b8f6faa1c465 Author: Mike Snitzer Date: Fri Nov 15 20:40:59 2024 -0500 nfsd: rename nfsd_serv_ prefixed methods and variables with nfsd_net_ Also update Documentation/filesystems/nfs/localio.rst accordingly and reduce the technical documentation debt that was previously captured in that document. Signed-off-by: Mike Snitzer Reviewed-by: Jeff Layton Acked-by: Chuck Lever Signed-off-by: Anna Schumaker Documentation/filesystems/nfs/localio.rst | 85 ++++++++++--------------------- fs/nfs_common/nfslocalio.c | 10 ++-- fs/nfsd/filecache.c | 2 +- fs/nfsd/localio.c | 4 +- fs/nfsd/netns.h | 11 ++-- fs/nfsd/nfssvc.c | 34 ++++++------- include/linux/nfslocalio.h | 12 ++--- 7 files changed, 66 insertions(+), 92 deletions(-) commit 39972494e318a21b3059287909fc090186dbe60a Author: Mike Snitzer Date: Fri Nov 15 20:40:58 2024 -0500 nfsd: update percpu_ref to manage references on nfsd_net Holding a reference on nfsd_net is what is required, it was never actually about ensuring nn->nfsd_serv available. Move waiting for outstanding percpu references from nfsd_destroy_serv() to nfsd_shutdown_net(). By moving it later it will be possible to invalidate localio clients during nfsd_file_cache_shutdown_net() via __nfsd_file_cache_purge(). Signed-off-by: Mike Snitzer Reviewed-by: Jeff Layton Acked-by: Chuck Lever Signed-off-by: Anna Schumaker fs/nfsd/nfssvc.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 86e00412254a717ffd5d38dc5ec0ee1cce6281b3 Author: Mike Snitzer Date: Fri Nov 15 20:40:57 2024 -0500 nfs: cache all open LOCALIO nfsd_file(s) in client This commit switches from leaning heavily on NFSD's filecache (in terms of GC'd nfsd_files) back to caching nfsd_files in the client. A later commit will add the callback mechanism needed to allow NFSD to force the NFS client to cleanup all cached nfsd_files. Add nfs_fh_localio_init() and 'struct nfs_fh_localio' to cache opened nfsd_file(s) (both a RO and RW nfsd_file is able to be opened and cached for a given nfs_fh). Update nfs_local_open_fh() to cache the nfsd_file once it is opened using __nfs_local_open_fh(). Introduce nfs_close_local_fh() to clear the cached open nfsd_files and call nfs_to_nfsd_file_put_local(). Refcounting is such that: - nfs_local_open_fh() is paired with nfs_close_local_fh(). - __nfs_local_open_fh() is paired with nfs_to_nfsd_file_put_local(). - nfs_local_file_get() is paired with nfs_local_file_put(). Signed-off-by: Mike Snitzer Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/flexfilelayout/flexfilelayout.c | 25 +++++----- fs/nfs/flexfilelayout/flexfilelayout.h | 1 + fs/nfs/inode.c | 3 ++ fs/nfs/internal.h | 4 +- fs/nfs/localio.c | 89 +++++++++++++++++++++++++++------- fs/nfs/pagelist.c | 5 +- fs/nfs/write.c | 3 +- fs/nfs_common/nfslocalio.c | 52 +++++++++++++++++++- include/linux/nfs_fs.h | 22 ++++++++- include/linux/nfslocalio.h | 16 +++--- 10 files changed, 176 insertions(+), 44 deletions(-) commit 4ee7ba40007357a48447a8cbc667480acf9a006a Author: Mike Snitzer Date: Fri Nov 15 20:40:56 2024 -0500 nfs_common: move localio_lock to new lock member of nfs_uuid_t Remove cl_localio_lock from 'struct nfs_client' in favor of adding a lock to the nfs_uuid_t struct (which is embedded in each nfs_client). Push nfs_local_{enable,disable} implementation down to nfs_common. Those methods now call nfs_localio_{enable,disable}_client. This allows implementing nfs_localio_invalidate_clients in terms of nfs_localio_disable_client. Signed-off-by: Mike Snitzer Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/client.c | 1 - fs/nfs/localio.c | 14 ++++-------- fs/nfs_common/nfslocalio.c | 55 ++++++++++++++++++++++++++++++++-------------- include/linux/nfs_fs_sb.h | 1 - include/linux/nfslocalio.h | 8 ++++++- 5 files changed, 50 insertions(+), 29 deletions(-) commit b49f049a22227df701bfbca083d6cc859496e615 Author: Mike Snitzer Date: Fri Nov 15 20:40:55 2024 -0500 nfs_common: rename functions that invalidate LOCALIO nfs_clients Rename nfs_uuid_invalidate_one_client to nfs_localio_disable_client. Rename nfs_uuid_invalidate_clients to nfs_localio_invalidate_clients. Signed-off-by: Mike Snitzer Reviewed-by: NeilBrown Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/localio.c | 2 +- fs/nfs_common/nfslocalio.c | 8 ++++---- fs/nfsd/nfsctl.c | 4 ++-- include/linux/nfslocalio.h | 5 +++-- 4 files changed, 10 insertions(+), 9 deletions(-) commit a61466315d7afca032342183a57e62d5e3a3157c Author: Mike Snitzer Date: Fri Nov 15 20:40:54 2024 -0500 nfsd: add nfsd_file_{get,put} to 'nfs_to' nfsd_localio_operations In later a commit LOCALIO must call both nfsd_file_get and nfsd_file_put to manage extra nfsd_file references. Signed-off-by: Mike Snitzer Reviewed-by: Jeff Layton Acked-by: Chuck Lever Signed-off-by: Anna Schumaker fs/nfsd/localio.c | 2 ++ include/linux/nfslocalio.h | 2 ++ 2 files changed, 4 insertions(+) commit 3feec68563dda59517f83d19123aa287a1dfd068 Author: Mike Snitzer Date: Fri Nov 15 20:40:53 2024 -0500 nfs/localio: add direct IO enablement with sync and async IO support This commit simply adds the required O_DIRECT plumbing. It doesn't address the fact that NFS doesn't ensure all writes are page aligned (nor device logical block size aligned as required by O_DIRECT). Because NFS will read-modify-write for IO that isn't aligned, LOCALIO will not use O_DIRECT semantics by default if/when an application requests the use of O_DIRECT. Allow the use of O_DIRECT semantics by: 1: Adding a flag to the nfs_pgio_header struct to allow the NFS O_DIRECT layer to signal that O_DIRECT was used by the application 2: Adding a 'localio_O_DIRECT_semantics' NFS module parameter that when enabled will cause LOCALIO to use O_DIRECT semantics (this may cause IO to fail if applications do not properly align their IO). This commit is derived from code developed by Weston Andros Adamson. Signed-off-by: Mike Snitzer Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker Documentation/filesystems/nfs/localio.rst | 13 +++++ fs/nfs/direct.c | 1 + fs/nfs/localio.c | 93 +++++++++++++++++++++++++++---- include/linux/nfs_xdr.h | 1 + 4 files changed, 98 insertions(+), 10 deletions(-) commit 220374e70b0b9d44ab5ec1106bc16caf20f94d80 Author: Tamir Duberstein Date: Sat Nov 2 08:09:49 2024 -0400 kunit: enable hardware acceleration when available Use KVM or HVF if supported by the QEMU binary and available on the system. This produces a nice improvement on my Apple M3 Pro running macOS 14.7: Before: ./tools/testing/kunit/kunit.py exec --arch arm64 [HH:MM:SS] Elapsed time: 10.145s After: ./tools/testing/kunit/kunit.py exec --arch arm64 [HH:MM:SS] Elapsed time: 1.773s Signed-off-by: Tamir Duberstein Reviewed-by: David Gow Signed-off-by: Shuah Khan tools/testing/kunit/kunit_kernel.py | 3 +++ tools/testing/kunit/qemu_configs/arm64.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit 56530007cac0630140a0846dd6110d60105a58ac Author: Tamir Duberstein Date: Sat Nov 2 08:09:48 2024 -0400 kunit: add fallback for os.sched_getaffinity Python 3.13 added os.process_cpu_count as a cross-platform alternative for the Linux-only os.sched_getaffinity. Use it when it's available and provide a fallback when it's not. This allows kunit to run on macOS. Signed-off-by: Tamir Duberstein Reviewed-by: David Gow Signed-off-by: Shuah Khan tools/testing/kunit/kunit.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit d3561c4098de9666b87630ad3f090b41e67cdd62 Author: Thorsten Blum Date: Tue Jan 14 13:41:06 2025 -0800 Input: joystick - use str_off_on() helper in sw_connect() Remove hard-coded strings by using the str_off_on() helper. Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20241202154603.1193-2-thorsten.blum@linux.dev Signed-off-by: Dmitry Torokhov drivers/input/joystick/sidewinder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7ef9bdec9a22ad48a76e0c446d54b2274eaf2fca Author: Krzysztof Kozlowski Date: Tue Jan 14 13:40:22 2025 -0800 Input: Use str_enable_disable-like helpers Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250114192701.912430-1-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov drivers/input/keyboard/dlink-dir685-touchkeys.c | 3 ++- drivers/input/keyboard/lm8323.c | 3 ++- drivers/input/misc/max77693-haptic.c | 3 ++- drivers/input/misc/regulator-haptic.c | 3 ++- drivers/input/mouse/elan_i2c_core.c | 3 ++- drivers/input/touchscreen/egalax_ts.c | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) commit 0e6dfac5f2c4e54ccbfbb46d69c0fe0dba857a6f Author: Iulia Tanasescu Date: Thu Nov 28 17:54:05 2024 +0200 Bluetooth: iso: Allow BIG re-sync A Broadcast Sink might require BIG sync to be terminated and re-established multiple times, while keeping the same PA sync handle active. This can be possible if the configuration of the listening (PA sync) socket is reset once all bound BISes are established and accepted by the user space: 1. The DEFER setup flag needs to be reset on the parent socket, to allow another BIG create sync procedure to be started on socket read. 2. The BT_SK_BIG_SYNC flag needs to be cleared on the parent socket, to allow another BIG create sync command to be sent. 3. The socket state needs to transition from BT_LISTEN to BT_CONNECTED, to mark that the listening process has completed and another one can be started if needed. Signed-off-by: Iulia Tanasescu Signed-off-by: Luiz Augusto von Dentz net/bluetooth/iso.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 63803c4a6d5f94fccc076b5e53442c747eea8d63 Merge: 652aac7ecd33 d16b34479064 Author: Jakub Kicinski Date: Tue Jan 14 13:28:15 2025 -0800 Merge branch 'tcp-add-a-new-paws_ack-drop-reason' Eric Dumazet says: ==================== tcp: add a new PAWS_ACK drop reason Current TCP_RFC7323_PAWS drop reason is too generic and can cause confusion. One common source for these drops are ACK packets coming too late. A prior packet with payload already changed tp->rcv_nxt. Add TCP_RFC7323_PAWS_ACK new drop reason, and do not generate a DUPACK for such old ACK. ==================== Link: https://patch.msgid.link/20250113135558.3180360-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit d16b34479064fcb8dbb66a72308b5034be819161 Author: Eric Dumazet Date: Mon Jan 13 13:55:58 2025 +0000 tcp: add LINUX_MIB_PAWS_OLD_ACK SNMP counter Prior patch in the series added TCP_RFC7323_PAWS_ACK drop reason. This patch adds the corresponding SNMP counter, for folks using nstat instead of tracing for TCP diagnostics. nstat -az | grep PAWSOldAck Suggested-by: Neal Cardwell Signed-off-by: Eric Dumazet Reviewed-by: Neal Cardwell Reviewed-by: Jason Xing Tested-by: Neal Cardwell Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20250113135558.3180360-4-edumazet@google.com Signed-off-by: Jakub Kicinski include/net/dropreason-core.h | 1 + include/uapi/linux/snmp.h | 1 + net/ipv4/proc.c | 1 + net/ipv4/tcp_input.c | 7 ++++--- 4 files changed, 7 insertions(+), 3 deletions(-) commit 124c4c32e9f3b4d89f5be3342897adc8db5c27b8 Author: Eric Dumazet Date: Mon Jan 13 13:55:57 2025 +0000 tcp: add TCP_RFC7323_PAWS_ACK drop reason XPS can cause reorders because of the relaxed OOO conditions for pure ACK packets. For hosts not using RFS, what can happpen is that ACK packets are sent on behalf of the cpu processing NIC interrupts, selecting TX queue A for ACK packet P1. Then a subsequent sendmsg() can run on another cpu. TX queue selection uses the socket hash and can choose another queue B for packets P2 (with payload). If queue A is more congested than queue B, the ACK packet P1 could be sent on the wire after P2. A linux receiver when processing P1 (after P2) currently increments LINUX_MIB_PAWSESTABREJECTED (TcpExtPAWSEstab) and use TCP_RFC7323_PAWS drop reason. It might also send a DUPACK if not rate limited. In order to better understand this pattern, this patch adds a new drop_reason : TCP_RFC7323_PAWS_ACK. For old ACKS like these, we no longer increment LINUX_MIB_PAWSESTABREJECTED and no longer sends a DUPACK, keeping credit for other more interesting DUPACK. perf record -e skb:kfree_skb -a perf script ... swapper 0 [148] 27475.438637: skb:kfree_skb: ... location=tcp_validate_incoming+0x4f0 reason: TCP_RFC7323_PAWS_ACK swapper 0 [208] 27475.438706: skb:kfree_skb: ... location=tcp_validate_incoming+0x4f0 reason: TCP_RFC7323_PAWS_ACK swapper 0 [208] 27475.438908: skb:kfree_skb: ... location=tcp_validate_incoming+0x4f0 reason: TCP_RFC7323_PAWS_ACK swapper 0 [148] 27475.439010: skb:kfree_skb: ... location=tcp_validate_incoming+0x4f0 reason: TCP_RFC7323_PAWS_ACK swapper 0 [148] 27475.439214: skb:kfree_skb: ... location=tcp_validate_incoming+0x4f0 reason: TCP_RFC7323_PAWS_ACK swapper 0 [208] 27475.439286: skb:kfree_skb: ... location=tcp_validate_incoming+0x4f0 reason: TCP_RFC7323_PAWS_ACK ... Signed-off-by: Eric Dumazet Reviewed-by: Neal Cardwell Reviewed-by: Kuniyuki Iwashima Reviewed-by: Jason Xing Link: https://patch.msgid.link/20250113135558.3180360-3-edumazet@google.com Signed-off-by: Jakub Kicinski include/net/dropreason-core.h | 5 +++++ net/ipv4/tcp_input.c | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) commit ea98b61bddf41e9a9308ff8f931e6077907b1587 Author: Eric Dumazet Date: Mon Jan 13 13:55:56 2025 +0000 tcp: add drop_reason support to tcp_disordered_ack() Following patch is adding a new drop_reason to tcp_validate_incoming(). Change tcp_disordered_ack() to not return a boolean anymore, but a drop reason. Change its name to tcp_disordered_ack_check() Refactor tcp_validate_incoming() to ease the code review of the following patch, and reduce indentation level. This patch is a refactor, with no functional change. Signed-off-by: Eric Dumazet Reviewed-by: Neal Cardwell Reviewed-by: Kuniyuki Iwashima Reviewed-by: Jason Xing Link: https://patch.msgid.link/20250113135558.3180360-2-edumazet@google.com Signed-off-by: Jakub Kicinski net/ipv4/tcp_input.c | 79 +++++++++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 35 deletions(-) commit 652aac7ecd33135d07df934e6cf16c23d2a8fb9b Author: Colin Ian King Date: Mon Jan 13 09:15:55 2025 +0000 net: phy: dp83822: Fix typo "outout" -> "output" There is a typo in a phydev_err message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20250113091555.23594-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski drivers/net/phy/dp83822.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 336097d74c284a7c928b723ce8690f28912da03d Author: Aditya Kumar Singh Date: Sun Jan 12 11:23:00 2025 +0530 wifi: ath12k: fix key cache handling Currently, an interface is created in the driver during channel assignment. If mac80211 attempts to set a key for an interface before this assignment, the driver caches the key. Once the interface is created, the driver installs the cached key to the hardware. This sequence is exemplified in mesh mode operation where the group key is set before channel assignment. However, in ath12k_mac_update_key_cache(), after caching the key, due to incorrect logic, it is deleted from the cache during the subsequent loop iteration. As a result, after the interface is created, the driver does not find any cached key, and the key is not installed to the hardware which is wrong. This leads to issue in mesh, where broadcast traffic is not encrypted over the air. Fix this issue by adjusting the logic of ath12k_mac_update_key_cache() properly. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3-03253.1-QCAHKSWPL_SILICONZ-29 # Nicolas Escande Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 # Nicolas Escande Fixes: 25e18b9d6b4b ("wifi: ath12k: modify ath12k_mac_op_set_key() for MLO") Signed-off-by: Aditya Kumar Singh Acked-by: Kalle Valo Tested-by: Nicolas Escande Link: https://patch.msgid.link/20250112-fix_key_cache_handling-v2-1-70e142c6153e@quicinc.com Signed-off-by: Jeff Johnson drivers/net/wireless/ath/ath12k/mac.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 4aae869847ce50da902005ce4d84505d54e739c9 Author: Karthikeyan Periyasamy Date: Sun Jan 12 12:46:30 2025 +0530 wifi: ath12k: Fix uninitialized variable access in ath12k_mac_allocate() function Currently, the uninitialized variable 'ab' is accessed in the ath12k_mac_allocate() function. Initialize 'ab' with the first radio device present in the hardware abstraction handle (ah). Additionally, move the default setting procedure from the pdev mapping iteration to the total radio calculating iteration for better code readability. Perform the maximum radio validation check for total_radio to ensure that both num_hw and radio_per_hw are validated indirectly, as these variables are derived from total_radio. This also fixes the below Smatch static checker warning. Smatch warning: ath12k_mac_allocate() error: uninitialized symbol 'ab' Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Fixes: a343d97f27f5 ("wifi: ath12k: move struct ath12k_hw from per device to group") Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Acked-by: Kalle Valo Link: https://patch.msgid.link/20250112071630.4059410-5-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson drivers/net/wireless/ath/ath12k/mac.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit 54fcdcf07baa9cb34359094f1b829b29d0845cb6 Author: Karthikeyan Periyasamy Date: Sun Jan 12 12:46:29 2025 +0530 wifi: ath12k: Remove ath12k_get_num_hw() helper function Currently, the ath12k_get_num_hw() helper function takes the device handle as an argument. Here, the number of hardware is retrieved from the group handle. Demanding the device handle from the caller is unnecessary since in some cases the group handle is already available. Additionally, there is no longer a need for multiple indirections to get the number of hardware. Therefore, remove this helper function and directly use ag->num_hw. This change also fixes the below Smatch static checker warning. Smatch warning: ath12k_mac_destroy() error: we previously assumed 'ab' could be null Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Reported-by: Dan Carpenter Closes: https://lore.kernel.org/ath12k/3e705de0-67d1-4437-97ff-4828d83ae2af@stanley.mountain/ Closes: https://scan7.scan.coverity.com/#/project-view/52682/11354?selectedIssue=1602340 Fixes: a343d97f27f5 ("wifi: ath12k: move struct ath12k_hw from per device to group") Signed-off-by: Karthikeyan Periyasamy Acked-by: Kalle Valo Acked-by: Jeff Johnson Link: https://patch.msgid.link/20250112071630.4059410-4-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson drivers/net/wireless/ath/ath12k/core.c | 20 ++++++++++++-------- drivers/net/wireless/ath/ath12k/core.h | 7 +------ drivers/net/wireless/ath/ath12k/mac.c | 8 ++++---- 3 files changed, 17 insertions(+), 18 deletions(-) commit 812a30271d48cff5edc39aeb436b3bebd558f5cf Author: Karthikeyan Periyasamy Date: Sun Jan 12 12:46:28 2025 +0530 wifi: ath12k: Refactor the ath12k_hw get helper function argument Currently, ath12k_hw is placed inside the ath12k_hw_group. However, the ath12k_hw get helper function takes the device handle and the index as parameters. Here, the index parameter is specific to the group handle. Therefore, change this helper function argument from the device handle to the group handle. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Acked-by: Kalle Valo Link: https://patch.msgid.link/20250112071630.4059410-3-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson drivers/net/wireless/ath/ath12k/core.c | 8 ++++---- drivers/net/wireless/ath/ath12k/core.h | 4 ++-- drivers/net/wireless/ath/ath12k/mac.c | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) commit 21261e4d564e866bdae810b4fb5278a3a6a1a6ed Author: Karthikeyan Periyasamy Date: Sun Jan 12 12:46:27 2025 +0530 wifi: ath12k: Refactor ath12k_hw set helper function argument Currently, ath12k_hw is placed inside the ath12k_hw_group. However, the ath12k_hw set helper function takes the device handle and the index as parameters. Here, the index parameter is specific to the group handle. Therefore, change this helper function argument from the device handle to the group handle. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Acked-by: Kalle Valo Link: https://patch.msgid.link/20250112071630.4059410-2-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson drivers/net/wireless/ath/ath12k/core.h | 4 ++-- drivers/net/wireless/ath/ath12k/mac.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 56cabb937f8f6091c231bdbc17c0d0a10130fb5d Author: Douglas Anderson Date: Thu Jan 9 12:59:58 2025 -0800 PM: sleep: Allow configuring the DPM watchdog to warn earlier than panic Allow configuring the DPM watchdog to warn about slow suspend/resume functions without causing a system panic(). This allows you to set the DPM_WATCHDOG_WARNING_TIMEOUT to something like 5 or 10 seconds to get warnings about slow suspend/resume functions that eventually succeed. Signed-off-by: Douglas Anderson Reviewed-by: Tomasz Figa Link: https://patch.msgid.link/20250109125957.v2.1.I4554f931b8da97948f308ecc651b124338ee9603@changeid [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki drivers/base/power/main.c | 24 +++++++++++++++++++----- kernel/power/Kconfig | 21 ++++++++++++++++++++- 2 files changed, 39 insertions(+), 6 deletions(-) commit 96484d21ae2775e142b23e99f90c02faef80d480 Author: Randy Dunlap Date: Fri Jan 10 22:31:07 2025 -0800 PM: sleep: convert comment from kernel-doc to plain comment Modify a non-kernel-doc comment to begin with /* instead of /** so that it does not cause a kernel-doc warning. power.h:114: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Auxiliary structure used for reading the snapshot image data and power.h:114: warning: missing initial short description on line: * Auxiliary structure used for reading the snapshot image data and Signed-off-by: Randy Dunlap Acked-by: Pavel Machek Link: https://patch.msgid.link/20250111063107.910825-1-rdunlap@infradead.org Signed-off-by: Rafael J. Wysocki kernel/power/power.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0834667545962ef1c5e8684ed32b45d9c574acd3 Author: Gautham R. Shenoy Date: Mon Jan 13 10:11:07 2025 +0530 cpufreq: ACPI: Fix max-frequency computation Commit 3c55e94c0ade ("cpufreq: ACPI: Extend frequency tables to cover boost frequencies") introduced an assumption in acpi_cpufreq_cpu_init() that the first entry in the P-state table was the nominal frequency. This assumption is incorrect. The frequency corresponding to the P0 P-State need not be the same as the nominal frequency advertised via CPPC. Since the driver is using the CPPC.highest_perf and CPPC.nominal_perf to compute the boost-ratio, it makes sense to use CPPC.nominal_freq to compute the max-frequency. CPPC.nominal_freq is advertised on platforms supporting CPPC revisions 3 or higher. Hence, fallback to using the first entry in the P-State table only on platforms that do not advertise CPPC.nominal_freq. Fixes: 3c55e94c0ade ("cpufreq: ACPI: Extend frequency tables to cover boost frequencies") Tested-by: Dhananjay Ugwekar Signed-off-by: Gautham R. Shenoy Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/20250113044107.566-1-gautham.shenoy@amd.com [ rjw: Retain reverse X-mas tree ordering of local variable declarations ] [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/acpi-cpufreq.c | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) commit 2f60f03934a50bc1fb69bb4f47a25cddd6807b0b Author: Patryk Wlazlyn Date: Fri Dec 20 13:38:34 2024 +0100 tools/power turbostat: Fix PMT mmaped file size rounding This (the old code) is just not how you round up to a page size. Noticed on a recent Intel platform. Previous ones must have been reporting sizes already aligned to a page and so the bug was missed when testing. Fixes: f0e4ed752fda ("tools/power turbostat: Add early support for PMT counters") Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4a358ba215dfefe161b5904e51e48f5f0e82652f Author: Patryk Wlazlyn Date: Wed Dec 18 11:43:32 2024 +0100 tools/power turbostat: Remove SysWatt from DISABLED_BY_DEFAULT The counter is present on most supporting Intel platforms and provides useful data to the user. There is no reason to disable the counter by default. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.8 | 2 +- tools/power/x86/turbostat/turbostat.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 22a835282b6240f38097f479ae2194bbeb0181e4 Author: Len Brown Date: Tue Dec 17 18:00:31 2024 -0500 tools/power turbostat: Add an NMI column Add an NMI column, a proper sub-set of the IRQ column. It would be preferable if the kernel exported /sys/kernel/irq/NMI/per_cpu_count. But since we are already forced to parse /proc/interrupts, noticing which row is the NMI is simple enough. Suggested-by: Artem Bityutskiy Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 54 +++++++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 6 deletions(-) commit 05c14d8fd71b9c19391d0b4d65b1c1764e1c440f Author: Len Brown Date: Tue Dec 10 09:49:45 2024 -0500 tools/power turbostat: add Busy% to "show idle" Suggested-by: Artem Bityutskiy Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 442003f3a842dc374b1c706187778c3d57b84c23 Author: Nicolin Chen Date: Tue Jan 7 09:10:04 2025 -0800 iommufd: Keep OBJ/IOCTL lists in an alphabetical order Reorder the existing OBJ/IOCTL lists. Also run clang-format for the same coding style at line wrappings. No functional change. Link: https://patch.msgid.link/r/c5e6d6e0a0bb7abc92ad26937fde19c9426bee96.1736237481.git.nicolinc@nvidia.com Reviewed-by: Lu Baolu Signed-off-by: Nicolin Chen Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/main.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit 5fb33b6797633ce60908d13dc06c54a101621845 Author: Binbin Zhou Date: Tue Jan 14 21:00:29 2025 +0800 clk: clk-loongson2: Fix the number count of clk provider Since commit 02fb4f008433 ("clk: clk-loongson2: Fix potential buffer overflow in flexible-array member access"), the clk provider register is failed. The count of `clks_num` is shown below: for (p = data; p->name; p++) clks_num++; In fact, `clks_num` represents the number of SoC clocks and should be expressed as the maximum value of the clock binding id in use (p->id + 1). Now we fix it to avoid the following error when trying to register a clk provider: [ 13.409595] of_clk_hw_onecell_get: invalid index 17 Cc: stable@vger.kernel.org Cc: Gustavo A. R. Silva Fixes: 02fb4f008433 ("clk: clk-loongson2: Fix potential buffer overflow in flexible-array member access") Signed-off-by: Binbin Zhou Link: https://lore.kernel.org/r/82e43d89a9a6791129cf8ea14f4eeb666cd87be4.1736856470.git.zhoubinbin@loongson.cn Signed-off-by: Stephen Boyd drivers/clk/clk-loongson2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 54e020bd1190c6ac461d4ba9274d6c319ee1c70f Author: Binbin Zhou Date: Tue Jan 14 21:00:28 2025 +0800 clk: clk-loongson2: Switch to use devm_clk_hw_register_fixed_rate_parent_data() Since commit 706ae6446494 ("clk: fixed-rate: add devm_clk_hw_register_fixed_rate_parent_data()"), we can use the devm_clk_hw_register_fixed_rate_parent_data() helper and from then on there is no need to manually unregister the fixed rate hw. Since clk_hw_unregister_fixed_rate() was not called before, we also fix the memory leak that was present. Signed-off-by: Binbin Zhou Link: https://lore.kernel.org/r/8733a7485619bdb791de25201a3d7984d1849c9f.1736856470.git.zhoubinbin@loongson.cn Signed-off-by: Stephen Boyd drivers/clk/clk-loongson2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d90e36f8364d99c737fe73b0c49a51dd5e749d86 Merge: 9c7ad3563229 6ca00ec47b70 Author: Jakub Kicinski Date: Tue Jan 14 11:13:34 2025 -0800 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Tariq Toukan says: ==================== mlx5-next updates 2025-01-14 The following pull-request contains mlx5 IFC updates. * 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: net/mlx5: Add nic_cap_reg and vhca_icm_ctrl registers net/mlx5: SHAMPO: Introduce new SHAMPO specific HCA caps net/mlx5: Add support for MRTCQ register net/mlx5: Update mlx5_ifc to support FEC for 200G per lane link modes ==================== Link: https://patch.msgid.link/20250114055700.1928736-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 838c0a41d7ed892de85329c199ac604611f8efe7 Author: Changhuang Liang Date: Tue Jan 14 00:13:00 2025 -0800 clk: starfive: Make _clk_get become a common helper function Introduce num_reg to store the number of clocks, this helps to make _clk_get become a common helper function which called jh71x0_clk_get(). With this, it helps to simplify the code and extend the code in the future. Signed-off-by: Changhuang Liang Link: https://lore.kernel.org/r/20250114081300.36600-1-changhuang.liang@starfivetech.com Signed-off-by: Stephen Boyd drivers/clk/starfive/clk-starfive-jh7100-audio.c | 14 ++------------ drivers/clk/starfive/clk-starfive-jh7110-aon.c | 14 ++------------ drivers/clk/starfive/clk-starfive-jh7110-isp.c | 14 ++------------ drivers/clk/starfive/clk-starfive-jh7110-stg.c | 14 ++------------ drivers/clk/starfive/clk-starfive-jh7110-sys.c | 14 ++------------ drivers/clk/starfive/clk-starfive-jh7110-vout.c | 14 ++------------ drivers/clk/starfive/clk-starfive-jh71x0.c | 12 ++++++++++++ drivers/clk/starfive/clk-starfive-jh71x0.h | 4 +++- 8 files changed, 27 insertions(+), 73 deletions(-) commit 57ea1423aaaa8753f30f35abd2997038d958ab3f Merge: 40384c840ea1 cd8b5366636b Author: Stephen Boyd Date: Tue Jan 14 10:49:22 2025 -0800 Merge tag 'v6.14-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: Real handling of the linked clocks (clocks of the interconnect port a peripheral is connected to) on rk3588 using pm-clocks, allowing us to stop marking them as critical and one more rk3588 critical clock, that the kernel cannot handle otherwise right now. * tag 'v6.14-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: rk3588: make refclko25m_ethX critical clk: rockchip: rk3588: drop RK3588_LINKED_CLK clk: rockchip: implement linked gate clock support clk: rockchip: expose rockchip_clk_set_lookup clk: rockchip: rk3588: register GATE_LINK later clk: rockchip: support clocks registered late commit ee9c69388e3bad6c595fe38f34aa1126d2d07a11 Author: Dr. David Alan Gilbert Date: Sun Jan 12 14:49:07 2025 +0000 kobject: Remove unused functions kobj_ns_initial() and kobj_ns_netlink() were adde din 2010 by commit bc451f205823 ("kobj: Add basic infrastructure for dealing with namespaces.") but have remained unused. Remove them. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20250112144907.270272-1-linux@treblig.org Signed-off-by: Greg Kroah-Hartman include/linux/kobject_ns.h | 2 -- lib/kobject.c | 24 ------------------------ 2 files changed, 26 deletions(-) commit cf4ca80650908628bf1c0c29e3fd236b1915d789 Author: Ard Biesheuvel Date: Tue Jan 7 16:18:27 2025 +0100 x86/sev: Disable ftrace branch profiling in SEV startup code Ftrace branch profiling inserts absolute references to its metadata at call sites, and this implies that this kind of instrumentation cannot be used while executing from the 1:1 mapping of memory. Therefore, disable ftrace branch profiling in the SEV startup routines, by disabling it for the entire SEV core source file. Closes: https://lore.kernel.org/oe-kbuild-all/202501072244.zZrx9864-lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov (AMD) Acked-by: Tom Lendacky Link: https://lore.kernel.org/r/20250107151826.820147-2-ardb+git@google.com arch/x86/coco/sev/core.c | 2 ++ 1 file changed, 2 insertions(+) commit e9cbc854d8b148e3491291fb615e94261970fb54 Author: Arnaldo Carvalho de Melo Date: Tue Jan 14 15:05:56 2025 -0300 perf config: Add a function to set one variable in .perfconfig To allow for setting a variable from some other tool, like with the "wallclock" patchset needs to allow the user to opt-in to having that key in the sort order for 'perf report'. Cc: Adrian Hunter Cc: Dmitriy Vyukov Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/lkml/Z4akewi7UPXpagce@x1 Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-config.c | 38 ++++++++++++++++++++++++++++++++++++++ tools/perf/util/config.h | 1 + 2 files changed, 39 insertions(+) commit 19d340a2988d4f3e673cded9dde405d727d7e248 Author: Jann Horn Date: Tue Jan 14 18:49:00 2025 +0100 io_uring/rsrc: require cloned buffers to share accounting contexts When IORING_REGISTER_CLONE_BUFFERS is used to clone buffers from uring instance A to uring instance B, where A and B use different MMs for accounting, the accounting can go wrong: If uring instance A is closed before uring instance B, the pinned memory counters for uring instance B will be decremented, even though the pinned memory was originally accounted through uring instance A; so the MM of uring instance B can end up with negative locked memory. Cc: stable@vger.kernel.org Closes: https://lore.kernel.org/r/CAG48ez1zez4bdhmeGLEFxtbFADY4Czn3CV0u9d_TMcbvRA01bg@mail.gmail.com Fixes: 7cc2a6eadcd7 ("io_uring: add IORING_REGISTER_COPY_BUFFERS method") Signed-off-by: Jann Horn Link: https://lore.kernel.org/r/20250114-uring-check-accounting-v1-1-42e4145aa743@google.com Signed-off-by: Jens Axboe io_uring/rsrc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1ab138febca6510881a0114fcfb329044fb4ed22 Author: Veronika Molnarova Date: Mon Jan 13 19:25:57 2025 +0100 perf test perftool_testsuite: Return correct value for skipping In 'perf test', a return value 2 represents that the test case was skipped. Fix this value for perftool_testsuite test cases to differentiate between skip and pass values. Signed-off-by: Veronika Molnarova Cc: Ian Rogers Cc: Namhyung Kim Link: https://lore.kernel.org/r/20250113182605.130719-3-vmolnaro@redhat.com Signed-off-by: Michael Petlan Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/base_probe/test_adding_blacklisted.sh | 2 +- tools/perf/tests/shell/base_probe/test_adding_kernel.sh | 2 +- tools/perf/tests/shell/base_probe/test_basic.sh | 2 +- tools/perf/tests/shell/base_probe/test_invalid_options.sh | 2 +- tools/perf/tests/shell/base_probe/test_line_semantics.sh | 2 +- tools/perf/tests/shell/common/init.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 5afd6d38cf52e1d8bb6659ec8263a693d1a94c2c Author: Veronika Molnarova Date: Mon Jan 13 19:25:56 2025 +0100 perf test perftool_testsuite: Add missing description Properly name the test cases of perftool_testsuite instead of the license being taken as the name for 'perf test'. Signed-off-by: Veronika Molnarova Cc: Ian Rogers Cc: Namhyung Kim Link: https://lore.kernel.org/r/20250113182605.130719-2-vmolnaro@redhat.com Signed-off-by: Michael Petlan Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/base_probe/test_adding_blacklisted.sh | 2 +- tools/perf/tests/shell/base_probe/test_adding_kernel.sh | 2 +- tools/perf/tests/shell/base_probe/test_basic.sh | 2 +- tools/perf/tests/shell/base_probe/test_invalid_options.sh | 2 +- tools/perf/tests/shell/base_probe/test_line_semantics.sh | 2 +- tools/perf/tests/shell/base_report/setup.sh | 2 +- tools/perf/tests/shell/base_report/test_basic.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit 9a7b618ef654d58d6fc988cd6027d37cbe5feb36 Author: Leo Yan Date: Mon Dec 2 11:19:58 2024 +0000 perf test record+probe_libc_inet_pton: Make test resilient The test failed back and forth due to the call chain being heavily impacted by the libc, which varies across different architectures and distros. The libc contains the symbols for "gaih_inet" and "getaddrinfo" in some cases, but not always. Moreover, these symbols can be either normal symbols or dynamic symbols, making it difficult to decide the call chain entries due to the symbols are inconsistent. To fix the issue, this commit identifies three call chain entries are always present. These entries are matched by iterating through the lines in the "perf script" result. The recording attribute max-stack is set to 4 for the possible maximum call chain depth. After: # perf test -vF pton --- start --- Pattern: ping[][0-9 \.:]+probe_libc:inet_pton: \([[:xdigit:]]+\) Matching: ping 285058 [025] 1219802.466939: probe_libc:inet_pton: (ffffa14b7cf0) Pattern: .*inet_pton\+0x[[:xdigit:]]+[[:space:]]\(/usr/lib/aarch64-linux-gnu/libc-2.31.so|inlined\)$ Matching: ping 285058 [025] 1219802.466939: probe_libc:inet_pton: (ffffa14b7cf0) Matching: ffffa14b7cf0 __GI___inet_pton+0x0 (/usr/lib/aarch64-linux-gnu/libc-2.31.so) Pattern: .*(\+0x[[:xdigit:]]+|\[unknown\])[[:space:]]\(.*/bin/ping.*\)$ Matching: ping 285058 [025] 1219802.466939: probe_libc:inet_pton: (ffffa14b7cf0) Matching: ffffa14b7cf0 __GI___inet_pton+0x0 (/usr/lib/aarch64-linux-gnu/libc-2.31.so) Matching: ffffa1488040 getaddrinfo+0xe8 (/usr/lib/aarch64-linux-gnu/libc-2.31.so) Matching: aaaab8672da4 [unknown] (/usr/bin/ping) ---- end ---- 82: probe libc's inet_pton & backtrace it with ping : Ok Closes: https://lore.kernel.org/linux-perf-users/1728978807-81116-1-git-send-email-renyu.zj@linux.alibaba.com/ Closes: https://lore.kernel.org/linux-perf-users/Z0X3AYUWkAgfPpWj@x1/T/#m57327e135b156047e37d214a0d453af6ae1e02be Reported-by: Guilherme Amadio Reported-by: Jing Zhang Reviewed-by: James Clark Signed-off-by: Leo Yan Tested-by: Thomas Richter Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Link: https://lore.kernel.org/r/20241202111958.553403-1-leo.yan@arm.com Signed-off-by: Arnaldo Carvalho de Melo .../tests/shell/record+probe_libc_inet_pton.sh | 34 ++++++++++++---------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 8e246a1b2a75e187c7d22c9aec4299057f87d19e Author: Ian Rogers Date: Tue Dec 10 22:08:31 2024 -0800 perf inject: Fix use without initialization of local variables Local variables were missing initialization and command line processing didn't provide default values. Fixes: 64eed019f3fce124 ("perf inject: Lazy build-id mmap2 event insertion") Reviewed-by: James Clark 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/20241211060831.806539-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-inject.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6804a7192a86838f276cd8e23556cca77f8bbe09 Author: James Clark Date: Wed Dec 11 08:55:24 2024 +0000 perf probe: Rename err label Rename err to out to avoid confusion because buf is still supposed to be freed in non error cases. Reviewed-by: Arnaldo Carvalho de Melo Signed-off-by: James Clark Tested-by: Namhyung Kim Acked-by: Masami Hiramatsu Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Dr. David Alan Gilbert Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20241211085525.519458-3-james.clark@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit f9c506fb69bdcfb9d7138281378129ff037f2aa1 Author: Ian Rogers Date: Thu Dec 12 09:33:54 2024 -0800 perf test stat: Avoid hybrid assumption when virtualized The cycles event will fallback to task-clock in the hybrid test when running virtualized. Change the test to not fail for this. Fixes: 65d11821910bd910 ("perf test: Add a test for default perf stat command") Reviewed-by: James Clark 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: Peter Zijlstra Link: https://lore.kernel.org/r/20241212173354.9860-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/stat.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2adbf5349ad3dd4789261157a74382d82971be26 Author: Athira Rajeev Date: Mon Dec 23 19:28:13 2024 +0530 perf record: Fix segfault with --off-cpu when debuginfo is not enabled When kernel is built without debuginfo, running 'perf record' with --off-cpu results in segfault as below: ./perf record --off-cpu -e dummy sleep 1 libbpf: kernel BTF is missing at '/sys/kernel/btf/vmlinux', was CONFIG_DEBUG_INFO_BTF enabled? libbpf: failed to find '.BTF' ELF section in /lib/modules/6.13.0-rc3+/build/vmlinux libbpf: failed to find valid kernel BTF Segmentation fault (core dumped) The backtrace pointed to: #0 0x00000000100fb17c in btf.type_cnt () #1 0x00000000100fc1a8 in btf_find_by_name_kind () #2 0x00000000100fc38c in btf.find_by_name_kind () #3 0x00000000102ee3ac in off_cpu_prepare () #4 0x000000001002f78c in cmd_record () #5 0x00000000100aee78 in run_builtin () #6 0x00000000100af3e4 in handle_internal_command () #7 0x000000001001004c in main () Code sequence is: static void check_sched_switch_args(void) { struct btf *btf = btf__load_vmlinux_btf(); const struct btf_type *t1, *t2, *t3; u32 type_id; type_id = btf__find_by_name_kind(btf, "btf_trace_sched_switch", BTF_KIND_TYPEDEF); btf__load_vmlinux_btf() fails when CONFIG_DEBUG_INFO_BTF is not enabled. Here bpf__find_by_name_kind() calls btf__type_cnt() with NULL btf value and results in segfault. To fix this, add a check to see if btf is not NULL before invoking bpf__find_by_name_kind(). Reviewed-by: Namhyung Kim Signed-off-by: Athira Rajeev Cc: Adrian Hunter Cc: Disha Goel Cc: Hari Bathini Cc: Ian Rogers Cc: Jiri Olsa Cc: Kajol Jain Cc: Madhavan Srinivasan Link: https://lore.kernel.org/r/20241223135813.8175-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/bpf_off_cpu.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8c1a106635e374dad3b0a15f1cf3f22b7a7608ac Author: Athira Rajeev Date: Fri Jan 10 15:13:24 2025 +0530 perf tests base_probe: Fix check for the count of existing probes in test_adding_kernel perftool-testsuite_probe fails in test_adding_kernel as below: Regexp not found: "probe:inode_permission_11" -- [ FAIL ] -- perf_probe :: test_adding_kernel :: force-adding probes :: second probe adding (with force) (output regexp parsing) event syntax error: 'probe:inode_permission_11' \___ unknown tracepoint Error: File /sys/kernel/tracing//events/probe/inode_permission_11 not found. Hint: Perhaps this kernel misses some CONFIG_ setting to enable this feature?. The test does the following: 1) Adds a probe point first using: $CMD_PERF probe --add $TEST_PROBE 2) Then tries to add same probe again without —force and expects it to fail. Next tries to add same probe again with —force. In this case, perf probe succeeds and adds the probe with a suffix number. Example: ./perf probe --add inode_permission Added new event: probe:inode_permission (on inode_permission) ./perf probe --add inode_permission --force Added new event: probe:inode_permission_1 (on inode_permission) ./perf probe --add inode_permission --force Added new event: probe:inode_permission_2 (on inode_permission) Each time, suffix is added to existing probe name. To get the suffix number, test cases uses: NO_OF_PROBES=`$CMD_PERF probe -l | wc -l` This will work if there is no other probe existing in the system. If there are any other probes other than kernel probes or inode_permission, ( example: any probe), "perf probe -l" will include count for other probes too. Example, in the system where this failed, already some probes were default added. So count became 10 ./perf probe -l | wc -l 10 So to be specific for "inode_permission", restrict the probe count check to that probe point alone using: NO_OF_PROBES=`$CMD_PERF probe -l $TEST_PROBE| wc -l` Similarly while removing the probe using "probe --del *", (removing all probes), check uses: ../common/check_all_lines_matched.pl "Removed event: probe:$TEST_PROBE" But if there are other probes in the system, the log will contain reference to other existing probe too. Hence change usage of check_all_lines_matched.pl to check_all_patterns_found.pl This will make sure expecting string comes in the result Signed-off-by: Athira Rajeev Acked-by: Veronika Molnarova Cc: Adrian Hunter Cc: Disha Goel Cc: Hari Bathini Cc: Ian Rogers Cc: Jiri Olsa Cc: Kajol Jain Cc: Madhavan Srinivasan Cc: Michael Petlan Cc: Namhyung Kim Link: https://lore.kernel.org/r/20250110094324.94604-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/base_probe/test_adding_kernel.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8bf18c5cefc11a32f455046091b9970f0026b499 Author: Michel Lind Date: Tue Nov 26 17:41:59 2024 -0600 perf MANIFEST: Add license files The standalone tarballs should include the license files - both the COPYING declaration as well as the text of GPLv2. Signed-off-by: Michel Lind Link: https://lore.kernel.org/r/Z0Zcx0WRqtlUYpgw@hyperscale.parallels Signed-off-by: Arnaldo Carvalho de Melo tools/perf/MANIFEST | 2 ++ 1 file changed, 2 insertions(+) commit 3178155d292b2b5f0b9f59b3777dc52e029652ba Author: James Clark Date: Fri Dec 13 17:13:12 2024 -0600 perf test brstack: Speed up running test by using tr -s instead of xargs The brstack test runs quite slowly in software models. Part of the reason is "xargs -n1" is quite inefficient in replacing spaces with newlines. While that's not noticeable on normal machines, it is on software models. Use "tr -s ' ' '\n'" instead which can do the same transformation, but is much faster. For comparison on an M1 Macbook Pro: $ time seq -s ' ' 10000 | xargs -n1 > /dev/null real 0m2.729s user 0m2.009s sys 0m0.914s $ time seq -s ' ' 10000 | tr -s ' ' '\n' | grep '.' > /dev/null real 0m0.002s user 0m0.001s sys 0m0.001s The "grep '.'" is also needed to remove any remaining blank lines. Signed-off-by: James Clark Reviewed-by: Anshuman Khandual Reviewed-by: James Clark Reviewed-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20241213231312.2640687-2-robh@kernel.org Signed-off-by: Anshuman Khandual Signed-off-by: Rob Herring [robh: Drop changing loop iterations on arm64. Squash blank line fix and redo commit msg] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/test_brstack.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7c9d9223802fbed4dee1ae301661bf346964c9d2 Author: Andreas Gruenbacher Date: Mon Jan 13 19:31:28 2025 +0100 gfs2: Truncate address space when flipping GFS2_DIF_JDATA flag Truncate an inode's address space when flipping the GFS2_DIF_JDATA flag: depending on that flag, the pages in the address space will either use buffer heads or iomap_folio_state structs, and we cannot mix the two. Reported-by: Kun Hu , Jiaji Qin Signed-off-by: Andreas Gruenbacher fs/gfs2/file.c | 1 + 1 file changed, 1 insertion(+) commit 78a5acf5433d8c675fa826da3ce8646c999f2842 Author: Cristian Ciocaltea Date: Mon Jan 13 15:36:18 2025 +0200 drm/display: hdmi: Do not read EDID on disconnected connectors The recently introduced hotplug event handler in the HDMI Connector framework attempts to unconditionally read the EDID data, leading to a bunch of non-harmful, yet quite annoying DDC/I2C related errors being reported. Ensure the operation is done only for connectors having the status connected or unknown. Additionally, perform an explicit reset of the connector information when dealing with a disconnected status. Fixes: ab716b74dc9d ("drm/display/hdmi: implement hotplug functions") Signed-off-by: Cristian Ciocaltea Link: https://patchwork.freedesktop.org/patch/msgid/20250113-hdmi-conn-edid-read-fix-v2-1-d2a0438a44ab@collabora.com Signed-off-by: Maxime Ripard drivers/gpu/drm/display/drm_hdmi_state_helper.c | 2 ++ 1 file changed, 2 insertions(+) commit e24c1551059268b37f6f40639883eafb281b8b9c Author: Qasim Ijaz Date: Mon Jan 13 22:38:20 2025 +0000 iommufd/iova_bitmap: Fix shift-out-of-bounds in iova_bitmap_offset_to_index() Resolve a UBSAN shift-out-of-bounds issue in iova_bitmap_offset_to_index() where shifting the constant "1" (of type int) by bitmap->mapped.pgshift (an unsigned long value) could result in undefined behavior. The constant "1" defaults to a 32-bit "int", and when "pgshift" exceeds 31 (e.g., pgshift = 63) the shift operation overflows, as the result cannot be represented in a 32-bit type. To resolve this, the constant is updated to "1UL", promoting it to an unsigned long type to match the operand's type. Fixes: 58ccf0190d19 ("vfio: Add an IOVA bitmap support") Link: https://patch.msgid.link/r/20250113223820.10713-1-qasdev00@gmail.com Reported-by: syzbot Closes: https://syzkaller.appspot.com/bug?extid=85992ace37d5b7b51635 Signed-off-by: Qasim Ijaz Reviewed-by: Joao Martins Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/iova_bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9df72c6acd683adf6dd23c061f3a414ec00b1f8 Author: Suraj Sonawane Date: Sun Nov 24 01:29:00 2024 +0530 iommu: iommufd: fix WARNING in iommufd_device_unbind Fix an issue detected by syzbot: WARNING in iommufd_device_unbind iommufd: Time out waiting for iommufd object to become free Resolve a warning in iommufd_device_unbind caused by a timeout while waiting for the shortterm_users reference count to reach zero. The existing 10-second timeout is insufficient in some scenarios, resulting in failures the above warning. Increase the timeout in iommufd_object_dec_wait_shortterm from 10 seconds to 60 seconds to allow sufficient time for the reference count to drop to zero. This change prevents premature timeouts and reduces the likelihood of warnings during iommufd_device_unbind. Fixes: 6f9c4d8c468c ("iommufd: Do not UAF during iommufd_put_object()") Link: https://patch.msgid.link/r/20241123195900.3176-1-surajsonawane0215@gmail.com Reported-by: syzbot+c92878e123785b1fa2db@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=c92878e123785b1fa2db Tested-by: syzbot+c92878e123785b1fa2db@syzkaller.appspotmail.com Signed-off-by: Suraj Sonawane Signed-off-by: Jason Gunthorpe drivers/iommu/iommufd/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e12b9dc6f982d1e110f87215a9114d14dbd60fbc Author: Liu Ying Date: Fri Jan 10 16:48:21 2025 +0800 drm/tests: hdmi: Add connector disablement test Atomic check should succeed when disabling a connector. Add a test case drm_test_check_disabling_connector() to make sure of this. Suggested-by: Dmitry Baryshkov Signed-off-by: Liu Ying Link: https://patchwork.freedesktop.org/patch/msgid/20250110084821.3239518-3-victor.liu@nxp.com Signed-off-by: Maxime Ripard drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 0d337b40ca1e532af42516d9e9024baad466319a Author: Liu Ying Date: Fri Jan 10 16:48:20 2025 +0800 drm/connector: hdmi: Do atomic check when necessary It's ok to pass atomic check successfully if an atomic commit tries to disable the display pipeline which the connector belongs to. That is, when the crtc or the best_encoder pointers in struct drm_connector_state are NULL, drm_atomic_helper_connector_hdmi_check() should return 0. Without the check against the NULL pointers, drm_default_rgb_quant_range() called by drm_atomic_helper_connector_hdmi_check() would dereference the NULL pointer to_match in drm_match_cea_mode(). Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 Call trace: drm_default_rgb_quant_range+0x0/0x4c (P) drm_bridge_connector_atomic_check+0x20/0x2c drm_atomic_helper_check_modeset+0x488/0xc78 drm_atomic_helper_check+0x20/0xa4 drm_atomic_check_only+0x4b8/0x984 drm_atomic_commit+0x48/0xc4 drm_framebuffer_remove+0x44c/0x530 drm_mode_rmfb_work_fn+0x7c/0xa0 process_one_work+0x150/0x294 worker_thread+0x2dc/0x3dc kthread+0x130/0x204 ret_from_fork+0x10/0x20 Fixes: 8ec116ff21a9 ("drm/display: bridge_connector: provide atomic_check for HDMI bridges") Fixes: 84e541b1e58e ("drm/sun4i: use drm_atomic_helper_connector_hdmi_check()") Fixes: 65548c8ff0ab ("drm/rockchip: inno_hdmi: Switch to HDMI connector") Signed-off-by: Liu Ying Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20250110084821.3239518-2-victor.liu@nxp.com Signed-off-by: Maxime Ripard drivers/gpu/drm/display/drm_hdmi_state_helper.c | 3 +++ 1 file changed, 3 insertions(+) commit 5c0e00a391dd0099fe95991bb2f962848d851916 Author: Borislav Petkov Date: Mon Jan 13 13:52:24 2025 +0100 APEI: GHES: Have GHES honor the panic= setting The GHES driver overrides the panic= setting by force-rebooting the system after a fatal hw error has been reported. The intent being that such an error would be reported earlier. However, this is not optimal when a hard-to-debug issue requires long time to reproduce and when that happens, the box will get rebooted after 30 seconds and thus destroy the whole hw context of when the error happened. So rip out the default GHES panic timeout and honor the global one. In the panic disabled (panic=0) case, the error will still be logged to dmesg for later inspection and if panic after a hw error is really required, then that can be controlled the usual way - use panic= on the cmdline or set it in the kernel .config's CONFIG_PANIC_TIMEOUT. Reported-by: Feng Tang Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Feng Tang Reviewed-by: Ira Weiny Link: https://patch.msgid.link/20250113125224.GFZ4UMiNtWIJvgpveU@fat_crate.local Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/ghes.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f4757d84abf523ea831dba0c136db4050d55c99f Author: Robert Richter Date: Tue Jan 7 17:19:22 2025 +0100 ACPI: PRM: Fix missing guid_t declaration in linux/prmt.h Seen the following build error: ./include/linux/prmt.h:5:27: error: unknown type name ‘guid_t’ 5 | int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer); | ^~~~~~ The include file uses guid_t but it is not declared. Include linux/uuid.h to fix this. Signed-off-by: Robert Richter Reviewed-by: Yazen Ghannam Link: https://patch.msgid.link/20250107161923.3387552-1-rrichter@amd.com Signed-off-by: Rafael J. Wysocki include/linux/prmt.h | 2 ++ 1 file changed, 2 insertions(+) commit 12080e85254fa05ff25ad2e6e74dc523621a8706 Merge: 34d813e45ecb 24c61d553302 Author: Maxime Ripard Date: Tue Jan 14 18:21:58 2025 +0100 Merge drm/drm-next into drm-misc-next-fixes drm-next has the dmem cgroup patches we need to merge fixes for. Signed-off-by: Maxime Ripard commit ea1413e5b53a8dd4fa7675edb23cdf828bbdce1e Author: Stafford Horne Date: Mon Dec 23 13:13:18 2024 +0000 rseq/selftests: Add support for OpenRISC Add support for OpenRISC in the rseq selftests. OpenRISC is 32-bit only. Tested this with: Compiler: gcc version 14.2.0 (GCC) Binutils: GNU assembler version 2.43.1 (or1k-smh-linux-gnu) using BFD version (GNU Binutils) 2.43.1.20241207 Linux: Linux buildroot 6.13.0-rc2-00005-g1fa73dd6c2d3-dirty #213 SMP Sat Dec 28 22:18:39 GMT 2024 openrisc GNU/Linux Glibc: 2024-12-13 e4e49583d9 Stafford Horne or1k: Update libm-test-ulps Signed-off-by: Stafford Horne Reviewed-by: Mathieu Desnoyers Acked-by: Shuah Khan tools/testing/selftests/rseq/param_test.c | 24 ++ tools/testing/selftests/rseq/rseq-or1k-bits.h | 412 +++++++++++++++++++++ .../selftests/rseq/rseq-or1k-thread-pointer.h | 13 + tools/testing/selftests/rseq/rseq-or1k.h | 181 +++++++++ tools/testing/selftests/rseq/rseq-thread-pointer.h | 2 + tools/testing/selftests/rseq/rseq.h | 2 + 6 files changed, 634 insertions(+) commit ca46ebffc2d2b243cc213d444e2a440489ecd4bc Author: Stafford Horne Date: Thu Dec 12 12:33:56 2024 +0000 openrisc: Add support for restartable sequences Implement support for restartable sequences on OpenRISC by doing: - Select HAVE_RSEQ in Kconfig - Call rseq_syscall() on return to userspace when CONFIG_DEBUG_RSEQ is enabled. - Call rseq_signal_deliver() to fixup the pre-signal stack frame when a signal is delivered on top of a restartable sequence critical section Cc: Michael Jeanson Signed-off-by: Stafford Horne arch/openrisc/Kconfig | 1 + arch/openrisc/kernel/entry.S | 4 ++++ arch/openrisc/kernel/signal.c | 2 ++ 3 files changed, 7 insertions(+) commit 7ce8716e2769dc08eccdf2b9385db6b0346d2f0d Author: Michael Jeanson Date: Tue Dec 10 19:58:12 2024 +0000 openrisc: Add HAVE_REGS_AND_STACK_ACCESS_API support Support for HAVE_REGS_AND_STACK_ACCESS_API needed for restartable sequences. The implementation has been copied from riscv and tested with the restartable sequences self tests. Note, pt-regs members are 'long' on openrisc which require casts for the api, someday we should try to update these to be 'unsigned long' as that's what they really are. Signed-off-by: Michael Jeanson [stafford: Updated commit message] Signed-off-by: Stafford Horne arch/openrisc/Kconfig | 1 + arch/openrisc/include/asm/ptrace.h | 73 ++++++++++++++++++++++++++++- arch/openrisc/kernel/ptrace.c | 96 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 169 insertions(+), 1 deletion(-) commit 134502abfe361784a4e04037cbb76261ab4d835b Author: Masahiro Yamada Date: Sun Dec 22 09:23:50 2024 +0900 openrisc: 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_OPENRISC_BUILTIN_DTB_NAME to CONFIG_BUILTIN_DTB_NAME. Signed-off-by: Masahiro Yamada Signed-off-by: Stafford Horne arch/openrisc/Kbuild | 1 - arch/openrisc/Kconfig | 3 ++- arch/openrisc/boot/dts/Makefile | 2 +- arch/openrisc/configs/or1klitex_defconfig | 2 +- arch/openrisc/configs/or1ksim_defconfig | 2 +- arch/openrisc/configs/simple_smp_defconfig | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 659381520a3b13403c3051516317adc02e48259b Author: Bart Van Assche Date: Wed Dec 18 13:22:46 2024 -0800 blk-mq: Move more error handling into blk_mq_submit_bio() The error handling code in blk_mq_get_new_requests() cannot be understood without knowing that this function is only called by blk_mq_submit_bio(). Hence move the code for handling blk_mq_get_new_requests() failures into blk_mq_submit_bio(). Cc: Damien Le Moal Cc: Christoph Hellwig Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20241218212246.1073149-3-bvanassche@acm.org Signed-off-by: Jens Axboe block/blk-mq.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 44e41381591dc5b4ea67a9f170b4ec85c817586e Author: Bart Van Assche Date: Wed Dec 18 13:22:45 2024 -0800 block: Reorder the request allocation code in blk_mq_submit_bio() Help the CPU branch predictor in case of a cache hit by handling the cache hit scenario first. Reviewed-by: Damien Le Moal Cc: Christoph Hellwig Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20241218212246.1073149-2-bvanassche@acm.org Signed-off-by: Jens Axboe block/blk-mq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7d6f88e76e28ac44ed003dcf80881ea6b202ec08 Merge: 295006f6e8c1 8697934682f1 Author: Martin K. Petersen Date: Tue Jan 14 11:35:50 2025 -0500 Merge patch series "Introduce support for Fabric Discovery and Login Services" Karan Tilak Kumar says: Hi Martin, reviewers, This cover letter describes the feature: add support for Fabric Discovery and Login Services (FDLS) to fnic driver. This functionality is needed to support port channel RSCN (PC-RSCN) handling and serves as a base to create FC-NVME initiators (planned later), and eCPU handling (planned later). It is used to discover the fabric and target ports associated with the fabric. It will then login to the target ports that are zoned to it. The driver uses the tport structure presented by FDLS. Port channel RSCN is a Cisco vendor specific RSCN event. It is applicable only to Cisco UCS fabrics. In cases where the eCPU in the UCS VIC (Unified Computing Services Virtual Interface Card) hangs, a fabric log out is sent to the fabric. Upon successful log out from the fabric, the IO path is failed over to a new path. Generally from a feature perspective, the code is divided into adding support for this functionality initially. Then, code has been added to modify the IO path and interfaces. Finally, support for port channel RSCN handling has been added. Here are the headers of some of the salient patches: o add headers and definitions for FDLS o add support for fabric based solicited requests and responses o add support for target based solicited requests and responses o add support for unsolicited requests and responses o add support for FDMI o add support for FIP o add functionality in fnic to support FDLS o modify IO path to use FDLS and tport o modify fnic interfaces to use FDLS o add support to handle port channel RSCN Even though the patches have been made into a series, some patches are heavier than others. But, every effort has been made to keep the purpose of each patch as a single-purpose, and to compile cleanly. All the individual patches compile cleanly. The compiler used is GCC 13.3. Some function calls have been coded as placeholders with appropriate comments to avoid compiler warnings. This patchset has been tested as a whole. Therefore, the tested-by fields have been added only to one patch in the set. I've refrained from adding tested-by to most of the patches, so as to not mislead the reviewer/reader. A brief note on the unit tests: o. Perform zone in zone out testing in a loop: remove a target port from the zone, add it to the zone in a loop. 1000+ iterations of this test have been successful. o. Configure multipathing, and run link flaps on single link. IOs drop briefly, but pick up as expected. o. Configure multipathing, and run link flaps on two links, with a 30 second delay in between. IOs drop briefly, but pick up as expected. o. Module load/unload test. o. Repeat the above tests with 1 queue and 64 queues. All tests were successful. Please consider this patch series for the next merge window. Link: https://lore.kernel.org/r/20241212020312.4786-1-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit 6b077230a1e163f01c866923915def6f73f9c390 Merge: 65880d32e1d7 3927c51e49c1 Author: Mark Brown Date: Tue Jan 14 16:35:46 2025 +0000 ASoC: fsl: Support micfil on i.MX943 Merge series from Shengjiu Wang : On i.MX943, the FIFO data address is changed and the bit width of CICOSR is changed. Add a new compatible string and update driver for these changes. commit 19b7f7c721f62b899017a633277becce57c0a070 Author: Srinivasan Shanmugam Date: Sun Jan 12 08:36:16 2025 +0530 drm/amdgpu/gfx12: Add Cleaner Shader Support for GFX12.0 GPUs This commit enables the cleaner shader feature for GFX12.0 and GFX12.0.1 GPUs. The cleaner shader is important for clearing GPU resources such as Local Data Share (LDS), Vector General Purpose Registers (VGPRs), and Scalar General Purpose Registers (SGPRs) between workloads. - This feature ensures that GPU resources are reset between workloads, preventing data leaks and ensuring accurate computation. By enabling the cleaner shader, this update enhances the security and reliability of GPU operations on GFX12.0 hardware. Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f2935a3019ea8cfaa49311ea2f7e2269be0a0d35 Author: Kent Russell Date: Wed Jan 8 10:16:44 2025 -0500 drm/amdgpu: Mark debug KFD module params as unsafe Mark options only meant to be used for debugging as unsafe so that the kernel is tainted when they are used. Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 62952a38d9bcf357d5ffc97615c48b12c9cd627c Author: Gui Chengming Date: Tue Jan 7 17:09:08 2025 +0800 drm/amdgpu: fix fw attestation for MP0_14_0_{2/3} FW attestation was disabled on MP0_14_0_{2/3}. V2: Move check into is_fw_attestation_support func. (Frank) Remove DRM_WARN log info. (Alex) Fix format. (Christian) Signed-off-by: Gui Chengming Reviewed-by: Frank.Min Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c | 4 ++++ 1 file changed, 4 insertions(+) commit def59436fb0d3ca0f211d14873d0273d69ebb405 Author: Christian König Date: Fri Dec 20 16:21:11 2024 +0100 drm/amdgpu: always sync the GFX pipe on ctx switch That is needed to enforce isolation between contexts. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 177b76a8d8e9a41ea3f9ab163e60ed28ac8e9fd1 Author: Christian König Date: Tue Jan 7 15:33:47 2025 +0100 drm/amdgpu: mark a bunch of module parameters unsafe We sometimes have people trying to use debugging options in production environments. Mark options only meant to be used for debugging as unsafe so that the kernel is tainted when they are used. Signed-off-by: Christian König Acked-by: Felix Kuehling Acked-by: Simona Vetter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e996127ec1aabecc33e405de42e7e1cbfae39315 Author: Tvrtko Ursulin Date: Wed Jan 8 18:35:11 2025 +0000 drm/amdgpu: Use DRM scheduler API in amdgpu_xcp_release_sched Lets use the existing helper instead of peeking into the structure directly. Reviewed-by: Christian König Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Danilo Krummrich Cc: Matthew Brost Cc: Philipp Stanner Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2affe2bbc997b3920045c2c434e480c81a5f9707 Author: Kenneth Feng Date: Thu Jan 9 15:58:23 2025 +0800 drm/amdgpu: disable gfxoff with the compute workload on gfx12 Disable gfxoff with the compute workload on gfx12. This is a workaround for the opencl test failure. Signed-off-by: Kenneth Feng Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 76583aac80657462267b7716bdf955b77b08ea51 Author: Mao Jinlong Date: Tue Jan 7 17:00:30 2025 +0800 dt-bindings: arm: coresight: Update the pattern of ete node name The device full name is embedded trace extension. There is no good fit in generic names list for the embedded trace extension. ETE is abbreviation of embedded trace extension and the number is the CPU number that ete is associated. Change the pattern of the node name as it won't affect any device tree node as of now. Signed-off-by: Mao Jinlong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250107090031.3319-2-quic_jinlmao@quicinc.com Signed-off-by: Rob Herring (Arm) .../devicetree/bindings/arm/arm,embedded-trace-extension.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 384669921779806105c56751abff41fa0127f93a Author: Takashi Iwai Date: Tue Jan 14 11:47:01 2025 +0100 ALSA: rawmidi: Make tied_device=0 as default / unknown In the original change, rawmidi_info.tied_device showed -1 for the unknown or untied device. But this would require the user-space to check the protocol version and judge the value conditionally, which is rather error-prone. Instead, set the tied_device = 0 to be default as unknown, and indicate the real device with the offset 1, for achieving more backward compatibility. Suggested-by: Jaroslav Kysela Link: https://patch.msgid.link/20250114104711.19197-1-tiwai@suse.de Signed-off-by: Takashi Iwai include/sound/rawmidi.h | 9 +++++++++ include/uapi/sound/asound.h | 2 +- sound/core/rawmidi.c | 1 - sound/core/ump.c | 3 +-- 4 files changed, 11 insertions(+), 4 deletions(-) commit a4e11cea277eee080d421b62e457968fd8c92a53 Author: Kent Overstreet Date: Mon Jan 13 15:41:50 2025 -0500 bcachefs: Document issue with bch_stripe layout We've got a problem with bch_stripe that is going to take an on disk format rev to fix - we can't access the block sector counts if the checksum type is unknown. Document it for now, there are a few other things to fix as well. Signed-off-by: Kent Overstreet fs/bcachefs/ec_format.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 78423deb51ed5acd2ae5e2b7212a14a0da01b39a Author: Kent Overstreet Date: Tue Dec 31 18:42:48 2024 -0500 bcachefs: Fix self healing on read error We were incorrectly checking if there'd been an io error. Signed-off-by: Kent Overstreet fs/bcachefs/io_read.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 5dd21b27121985cef0642d0cb89cfd749393b727 Author: Alan Huang Date: Thu Oct 3 03:06:33 2024 +0800 bcachefs: Pop all the transactions from the abort one The transaction is going to abort, so there will be no cycle involving this transaction anymore. Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet fs/bcachefs/btree_locking.c | 2 ++ 1 file changed, 2 insertions(+) commit b169138d482980d31207c2d1706a2be2529978cf Author: Alan Huang Date: Thu Oct 3 03:06:32 2024 +0800 bcachefs: Only abort the transactions in the cycle When the cycle doesn't involve the initiator of the cycle detection, we might choose a transaction that is not involved in the cycle to abort. It shouldn't be that since it won't break the cycle, this patch therefore chooses the transaction in the cycle to abort. Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet fs/bcachefs/btree_locking.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 6853a5e5d48b54127166291b1fc2cc7030fbcc38 Author: Alan Huang Date: Thu Oct 3 03:06:31 2024 +0800 bcachefs: Introduce lock_graph_pop_from This patch introduces a helper function called lock_graph_pop_from, it pops the graph from i. Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet fs/bcachefs/btree_locking.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit b5c3dcd0db0452b13a4799b9c2be751e75b541f9 Author: Alan Huang Date: Thu Oct 3 03:06:30 2024 +0800 bcachefs: Convert open-coded lock_graph_pop_all to helper Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet fs/bcachefs/btree_locking.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0ef9ab34f442f7236b5a84a6691959c67639f8b9 Author: Alan Huang Date: Thu Oct 10 21:21:50 2024 +0800 bcachefs: Do not allow no fail lock request to fail If the transaction chose itself as a victim before and restarted, it might request a no fail lock request this time. But it might be added to others' lock graph and be chose as the victim again, it's no longer safe without additional check. We can also convert the cycle detector to be fully RCU-based to solve that unsoundness, but the latency added to trans_put and additional memory required may not worth it. Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet fs/bcachefs/btree_locking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdc419dbf286eeaabb361d5cf5cee2cb566b6f5f Author: Alan Huang Date: Thu Sep 26 00:45:00 2024 +0800 bcachefs: Merge the condition to avoid additional invocation If the lock has been acquired and unlocked, we don't have to do clear and wakeup again, though harmless since we hold the intent lock. Merge the condition might be clearer. Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet fs/bcachefs/six.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9c13cc9c7dd7852ab5080f735f896b4e2ac7e9d4 Author: Alan Huang Date: Thu Sep 26 00:46:02 2024 +0800 Revert "bcachefs: Fix bch2_btree_node_upgrade()" This reverts commit 62448afee714354a26db8a0f3c644f58628f0792. six_lock_tryupgrade fails only if there is an intent lock held, it won't fail no matter how many read locks are held. Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet fs/bcachefs/btree_locking.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit 0b6b2dd38336d5fd49214f0e4e6495e658e3ab44 Author: Srinivasan Shanmugam Date: Thu Jan 9 21:33:51 2025 +0530 drm/amdgpu: Fix Circular Locking Dependency in AMDGPU GFX Isolation This commit addresses a circular locking dependency issue within the GFX isolation mechanism. The problem was identified by a warning indicating a potential deadlock due to inconsistent lock acquisition order. - The `amdgpu_gfx_enforce_isolation_ring_begin_use` and `amdgpu_gfx_enforce_isolation_ring_end_use` functions previously acquired `enforce_isolation_mutex` and called `amdgpu_gfx_kfd_sch_ctrl`, leading to potential deadlocks. ie., If `amdgpu_gfx_kfd_sch_ctrl` is called while `enforce_isolation_mutex` is held, and `amdgpu_gfx_enforce_isolation_handler` is called while `kfd_sch_mutex` is held, it can create a circular dependency. By ensuring consistent lock usage, this fix resolves the issue: [ 606.297333] ====================================================== [ 606.297343] WARNING: possible circular locking dependency detected [ 606.297353] 6.10.0-amd-mlkd-610-311224-lof #19 Tainted: G OE [ 606.297365] ------------------------------------------------------ [ 606.297375] kworker/u96:3/3825 is trying to acquire lock: [ 606.297385] ffff9aa64e431cb8 ((work_completion)(&(&adev->gfx.enforce_isolation[i].work)->work)){+.+.}-{0:0}, at: __flush_work+0x232/0x610 [ 606.297413] but task is already holding lock: [ 606.297423] ffff9aa64e432338 (&adev->gfx.kfd_sch_mutex){+.+.}-{3:3}, at: amdgpu_gfx_kfd_sch_ctrl+0x51/0x4d0 [amdgpu] [ 606.297725] which lock already depends on the new lock. [ 606.297738] the existing dependency chain (in reverse order) is: [ 606.297749] -> #2 (&adev->gfx.kfd_sch_mutex){+.+.}-{3:3}: [ 606.297765] __mutex_lock+0x85/0x930 [ 606.297776] mutex_lock_nested+0x1b/0x30 [ 606.297786] amdgpu_gfx_kfd_sch_ctrl+0x51/0x4d0 [amdgpu] [ 606.298007] amdgpu_gfx_enforce_isolation_ring_begin_use+0x2a4/0x5d0 [amdgpu] [ 606.298225] amdgpu_ring_alloc+0x48/0x70 [amdgpu] [ 606.298412] amdgpu_ib_schedule+0x176/0x8a0 [amdgpu] [ 606.298603] amdgpu_job_run+0xac/0x1e0 [amdgpu] [ 606.298866] drm_sched_run_job_work+0x24f/0x430 [gpu_sched] [ 606.298880] process_one_work+0x21e/0x680 [ 606.298890] worker_thread+0x190/0x350 [ 606.298899] kthread+0xe7/0x120 [ 606.298908] ret_from_fork+0x3c/0x60 [ 606.298919] ret_from_fork_asm+0x1a/0x30 [ 606.298929] -> #1 (&adev->enforce_isolation_mutex){+.+.}-{3:3}: [ 606.298947] __mutex_lock+0x85/0x930 [ 606.298956] mutex_lock_nested+0x1b/0x30 [ 606.298966] amdgpu_gfx_enforce_isolation_handler+0x87/0x370 [amdgpu] [ 606.299190] process_one_work+0x21e/0x680 [ 606.299199] worker_thread+0x190/0x350 [ 606.299208] kthread+0xe7/0x120 [ 606.299217] ret_from_fork+0x3c/0x60 [ 606.299227] ret_from_fork_asm+0x1a/0x30 [ 606.299236] -> #0 ((work_completion)(&(&adev->gfx.enforce_isolation[i].work)->work)){+.+.}-{0:0}: [ 606.299257] __lock_acquire+0x16f9/0x2810 [ 606.299267] lock_acquire+0xd1/0x300 [ 606.299276] __flush_work+0x250/0x610 [ 606.299286] cancel_delayed_work_sync+0x71/0x80 [ 606.299296] amdgpu_gfx_kfd_sch_ctrl+0x287/0x4d0 [amdgpu] [ 606.299509] amdgpu_gfx_enforce_isolation_ring_begin_use+0x2a4/0x5d0 [amdgpu] [ 606.299723] amdgpu_ring_alloc+0x48/0x70 [amdgpu] [ 606.299909] amdgpu_ib_schedule+0x176/0x8a0 [amdgpu] [ 606.300101] amdgpu_job_run+0xac/0x1e0 [amdgpu] [ 606.300355] drm_sched_run_job_work+0x24f/0x430 [gpu_sched] [ 606.300369] process_one_work+0x21e/0x680 [ 606.300378] worker_thread+0x190/0x350 [ 606.300387] kthread+0xe7/0x120 [ 606.300396] ret_from_fork+0x3c/0x60 [ 606.300406] ret_from_fork_asm+0x1a/0x30 [ 606.300416] other info that might help us debug this: [ 606.300428] Chain exists of: (work_completion)(&(&adev->gfx.enforce_isolation[i].work)->work) --> &adev->enforce_isolation_mutex --> &adev->gfx.kfd_sch_mutex [ 606.300458] Possible unsafe locking scenario: [ 606.300468] CPU0 CPU1 [ 606.300476] ---- ---- [ 606.300484] lock(&adev->gfx.kfd_sch_mutex); [ 606.300494] lock(&adev->enforce_isolation_mutex); [ 606.300508] lock(&adev->gfx.kfd_sch_mutex); [ 606.300521] lock((work_completion)(&(&adev->gfx.enforce_isolation[i].work)->work)); [ 606.300536] *** DEADLOCK *** [ 606.300546] 5 locks held by kworker/u96:3/3825: [ 606.300555] #0: ffff9aa5aa1f5d58 ((wq_completion)comp_1.1.0){+.+.}-{0:0}, at: process_one_work+0x3f5/0x680 [ 606.300577] #1: ffffaa53c3c97e40 ((work_completion)(&sched->work_run_job)){+.+.}-{0:0}, at: process_one_work+0x1d6/0x680 [ 606.300600] #2: ffff9aa64e463c98 (&adev->enforce_isolation_mutex){+.+.}-{3:3}, at: amdgpu_gfx_enforce_isolation_ring_begin_use+0x1c3/0x5d0 [amdgpu] [ 606.300837] #3: ffff9aa64e432338 (&adev->gfx.kfd_sch_mutex){+.+.}-{3:3}, at: amdgpu_gfx_kfd_sch_ctrl+0x51/0x4d0 [amdgpu] [ 606.301062] #4: ffffffff8c1a5660 (rcu_read_lock){....}-{1:2}, at: __flush_work+0x70/0x610 [ 606.301083] stack backtrace: [ 606.301092] CPU: 14 PID: 3825 Comm: kworker/u96:3 Tainted: G OE 6.10.0-amd-mlkd-610-311224-lof #19 [ 606.301109] Hardware name: Gigabyte Technology Co., Ltd. X570S GAMING X/X570S GAMING X, BIOS F7 03/22/2024 [ 606.301124] Workqueue: comp_1.1.0 drm_sched_run_job_work [gpu_sched] [ 606.301140] Call Trace: [ 606.301146] [ 606.301154] dump_stack_lvl+0x9b/0xf0 [ 606.301166] dump_stack+0x10/0x20 [ 606.301175] print_circular_bug+0x26c/0x340 [ 606.301187] check_noncircular+0x157/0x170 [ 606.301197] ? register_lock_class+0x48/0x490 [ 606.301213] __lock_acquire+0x16f9/0x2810 [ 606.301230] lock_acquire+0xd1/0x300 [ 606.301239] ? __flush_work+0x232/0x610 [ 606.301250] ? srso_alias_return_thunk+0x5/0xfbef5 [ 606.301261] ? mark_held_locks+0x54/0x90 [ 606.301274] ? __flush_work+0x232/0x610 [ 606.301284] __flush_work+0x250/0x610 [ 606.301293] ? __flush_work+0x232/0x610 [ 606.301305] ? __pfx_wq_barrier_func+0x10/0x10 [ 606.301318] ? mark_held_locks+0x54/0x90 [ 606.301331] ? srso_alias_return_thunk+0x5/0xfbef5 [ 606.301345] cancel_delayed_work_sync+0x71/0x80 [ 606.301356] amdgpu_gfx_kfd_sch_ctrl+0x287/0x4d0 [amdgpu] [ 606.301661] amdgpu_gfx_enforce_isolation_ring_begin_use+0x2a4/0x5d0 [amdgpu] [ 606.302050] ? srso_alias_return_thunk+0x5/0xfbef5 [ 606.302069] amdgpu_ring_alloc+0x48/0x70 [amdgpu] [ 606.302452] amdgpu_ib_schedule+0x176/0x8a0 [amdgpu] [ 606.302862] ? drm_sched_entity_error+0x82/0x190 [gpu_sched] [ 606.302890] amdgpu_job_run+0xac/0x1e0 [amdgpu] [ 606.303366] drm_sched_run_job_work+0x24f/0x430 [gpu_sched] [ 606.303388] process_one_work+0x21e/0x680 [ 606.303409] worker_thread+0x190/0x350 [ 606.303424] ? __pfx_worker_thread+0x10/0x10 [ 606.303437] kthread+0xe7/0x120 [ 606.303449] ? __pfx_kthread+0x10/0x10 [ 606.303463] ret_from_fork+0x3c/0x60 [ 606.303476] ? __pfx_kthread+0x10/0x10 [ 606.303489] ret_from_fork_asm+0x1a/0x30 [ 606.303512] v2: Refactor lock handling to resolve circular dependency (Alex) - Introduced a `sched_work` flag to defer the call to `amdgpu_gfx_kfd_sch_ctrl` until after releasing `enforce_isolation_mutex`. - This change ensures that `amdgpu_gfx_kfd_sch_ctrl` is called outside the critical section, preventing the circular dependency and deadlock. - The `sched_work` flag is set within the mutex-protected section if conditions are met, and the actual function call is made afterward. - This approach ensures consistent lock acquisition order. Fixes: afefd6f24502 ("drm/amdgpu: Implement Enforce Isolation Handler for KGD/KFD serialization") 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 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 3c47c2ccd5a29c78780ccfd0227a805f3873ab1c Author: Keith Busch Date: Tue Jan 14 07:35:08 2025 -0800 nvmet: fix rw control endian access Fixes: 3ec5c62cfcf060e ("nvmet: handle rw's limited retry flag") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501142128.WexgyMTv-lkp@intel.com/ Cc: Guixin Liu Signed-off-by: Keith Busch drivers/nvme/target/io-cmd-bdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a8afbe5677234ac2490438d6b8ab74ee7fb359e Merge: 40ba3c9019cc e896c04890ae Author: Mark Brown Date: Tue Jan 14 15:18:44 2025 +0000 spi-nand/spi-mem DTR support Merge series from Miquel Raynal : Here is a (big) series supposed to bring DTR support in SPI-NAND. commit 40ba3c9019ccd34d576fa14f94ef4f3bd9284c1a Author: Krzysztof Kozlowski Date: Sat Jan 11 19:54:00 2025 +0100 spi: ti-qspi: 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://patch.msgid.link/20250111185400.183760-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown drivers/spi/spi-ti-qspi.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit e896c04890aeff2292364c19632fc15d890d436c Author: Nathan Chancellor Date: Sat Jan 11 12:08:38 2025 -0700 spi: amd: Fix -Wuninitialized in amd_spi_exec_mem_op() After commit e6204f39fe3a ("spi: amd: Drop redundant check"), clang warns (or errors with CONFIG_WERROR=y): drivers/spi/spi-amd.c:695:9: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized] 695 | return ret; | ^~~ drivers/spi/spi-amd.c:673:9: note: initialize the variable 'ret' to silence this warning 673 | int ret; | ^ | = 0 1 error generated. ret is no longer set on anything other than the default switch path. Replace ret with a direct return of 0 at the end of the function and -EOPNOTSUPP in the default case to resolve the warning. Fixes: e6204f39fe3a ("spi: amd: Drop redundant check") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501112315.ugYQ7Ce7-lkp@intel.com/ Signed-off-by: Nathan Chancellor Reviewed-by: Miguel Ojeda Reviewed-by: Miquel Raynal Link: https://patch.msgid.link/20250111-spi-amd-fix-uninitialized-ret-v1-1-c66ab9f6a23d@kernel.org Signed-off-by: Mark Brown drivers/spi/spi-amd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9d0c23db26cb58c9fc6ee8817e8f9ebeb25776e5 Author: Johannes Thumshirn Date: Mon Jan 13 20:31:55 2025 +0100 btrfs: selftests: add a selftest for deleting two out of three extents Add a selftest creating three extents and then deleting two out of the three extents. Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/tests/raid-stripe-tree-tests.c | 144 ++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) commit cfda28fb706d53b332d5183d6091224289e96863 Author: Johannes Thumshirn Date: Mon Jan 13 20:31:54 2025 +0100 btrfs: selftests: add test for punching a hole into 3 RAID stripe-extents Test creating a range of three RAID stripe-extents and then punch a hole in the middle, deleting all of the middle extents and partially deleting the "book ends". Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/tests/raid-stripe-tree-tests.c | 183 ++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+) commit 27ae15b25b6e892a4161bc33c7f2b8a356318a2c Author: Johannes Thumshirn Date: Mon Jan 13 20:31:53 2025 +0100 btrfs: selftests: add selftest for punching holes into the RAID stripe extents Add a selftest for punching a hole into a RAID stripe extent. The test create an 1M extent and punches a 64k bytes long hole at offset of 32k from the start of the extent. Afterwards it verifies the start and length of both resulting new extents "left" and "right" as well as the absence of the hole. Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/tests/raid-stripe-tree-tests.c | 140 ++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) commit 1d395c3926d8996918ca29a67fe194e7088491d9 Author: Johannes Thumshirn Date: Mon Jan 13 20:31:52 2025 +0100 btrfs: selftests: test RAID stripe-tree deletion spanning two items Add a selftest for RAID stripe-tree deletion with a delete range spanning two items, so that we're punching a hole into two adjacent RAID stripe extents truncating the first and "moving" the second to the right. The following diagram illustrates the operation: |--- RAID Stripe Extent ---||--- RAID Stripe Extent ---| |----- keep -----|--- drop ---|----- keep ----| Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/tests/raid-stripe-tree-tests.c | 144 ++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) commit a0afdec2552cf1ae059d58c3ffaa83aae7ddbfe1 Author: Johannes Thumshirn Date: Mon Jan 13 20:31:51 2025 +0100 btrfs: selftests: don't split RAID extents in half The selftests for partially deleting the start or tail of RAID stripe-extents split these extents in half. This can hide errors in the calculation, so don't split the RAID stripe-extents in half but delete the first or last 16K of the 64K extents. Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/tests/raid-stripe-tree-tests.c | 44 +++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 16 deletions(-) commit d44d3d724bb24701546c92ed5f341736bc9d832e Author: Johannes Thumshirn Date: Mon Jan 13 20:31:50 2025 +0100 btrfs: selftests: check for correct return value of failed lookup Commit 5e72aabc1fff ("btrfs: return ENODATA in case RST lookup fails") changed btrfs_get_raid_extent_offset()'s return value to ENODATA in case the RAID stripe-tree lookup failed. Adjust the test cases which check for absence of a given range to check for ENODATA as return value in this case. Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/tests/raid-stripe-tree-tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc14ba10781bd2629835696b7cc1febf914768e9 Author: Johannes Thumshirn Date: Mon Jan 13 20:31:49 2025 +0100 btrfs: don't use btrfs_set_item_key_safe on RAID stripe-extents Don't use btrfs_set_item_key_safe() to modify the keys in the RAID stripe-tree, as this can lead to corruption of the tree, which is caught by the checks in btrfs_set_item_key_safe(): BTRFS info (device nvme1n1): leaf 49168384 gen 15 total ptrs 194 free space 8329 owner 12 BTRFS info (device nvme1n1): refs 2 lock_owner 1030 current 1030 [ snip ] item 105 key (354549760 230 20480) itemoff 14587 itemsize 16 stride 0 devid 5 physical 67502080 item 106 key (354631680 230 4096) itemoff 14571 itemsize 16 stride 0 devid 1 physical 88559616 item 107 key (354631680 230 32768) itemoff 14555 itemsize 16 stride 0 devid 1 physical 88555520 item 108 key (354717696 230 28672) itemoff 14539 itemsize 16 stride 0 devid 2 physical 67604480 [ snip ] BTRFS critical (device nvme1n1): slot 106 key (354631680 230 32768) new key (354635776 230 4096) ------------[ cut here ]------------ kernel BUG at fs/btrfs/ctree.c:2602! Oops: invalid opcode: 0000 [#1] PREEMPT SMP PTI CPU: 1 UID: 0 PID: 1055 Comm: fsstress Not tainted 6.13.0-rc1+ #1464 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014 RIP: 0010:btrfs_set_item_key_safe+0xf7/0x270 Code: RSP: 0018:ffffc90001337ab0 EFLAGS: 00010287 RAX: 0000000000000000 RBX: ffff8881115fd000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000001 RDI: 00000000ffffffff RBP: ffff888110ed6f50 R08: 00000000ffffefff R09: ffffffff8244c500 R10: 00000000ffffefff R11: 00000000ffffffff R12: ffff888100586000 R13: 00000000000000c9 R14: ffffc90001337b1f R15: ffff888110f23b58 FS: 00007f7d75c72740(0000) GS:ffff88813bd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa811652c60 CR3: 0000000111398001 CR4: 0000000000370eb0 Call Trace: ? __die_body.cold+0x14/0x1a ? die+0x2e/0x50 ? do_trap+0xca/0x110 ? do_error_trap+0x65/0x80 ? btrfs_set_item_key_safe+0xf7/0x270 ? exc_invalid_op+0x50/0x70 ? btrfs_set_item_key_safe+0xf7/0x270 ? asm_exc_invalid_op+0x1a/0x20 ? btrfs_set_item_key_safe+0xf7/0x270 btrfs_partially_delete_raid_extent+0xc4/0xe0 btrfs_delete_raid_extent+0x227/0x240 __btrfs_free_extent.isra.0+0x57f/0x9c0 ? exc_coproc_segment_overrun+0x40/0x40 __btrfs_run_delayed_refs+0x2fa/0xe80 btrfs_run_delayed_refs+0x81/0xe0 btrfs_commit_transaction+0x2dd/0xbe0 ? preempt_count_add+0x52/0xb0 btrfs_sync_file+0x375/0x4c0 do_fsync+0x39/0x70 __x64_sys_fsync+0x13/0x20 do_syscall_64+0x54/0x110 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f7d7550ef90 Code: RSP: 002b:00007ffd70237248 EFLAGS: 00000202 ORIG_RAX: 000000000000004a RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f7d7550ef90 RDX: 000000000000013a RSI: 000000000040eb28 RDI: 0000000000000004 RBP: 000000000000001b R08: 0000000000000078 R09: 00007ffd7023725c R10: 00007f7d75400390 R11: 0000000000000202 R12: 028f5c28f5c28f5c R13: 8f5c28f5c28f5c29 R14: 000000000040b520 R15: 00007f7d75c726c8 While the root cause of the tree order corruption isn't clear, using btrfs_duplicate_item() to copy the item and then adjusting both the key and the per-device physical addresses is a safe way to counter this problem. Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/raid-stripe-tree.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 6aa0e7cc569eb24a7a99c70ad7477d454b3ac0ca Author: Johannes Thumshirn Date: Mon Jan 13 20:31:48 2025 +0100 btrfs: implement hole punching for RAID stripe extents If the stripe extent we want to delete starts before the range we want to delete and ends after the range we want to delete we're punching a hole in the stripe extent: |--- RAID Stripe Extent ---| | keep |--- drop ---| keep | This means we need to a) truncate the existing item and b) create a second item for the remaining range. Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/ctree.c | 1 + fs/btrfs/raid-stripe-tree.c | 48 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) commit 76643119045eed639a3334370cba30c54c4074c1 Author: Johannes Thumshirn Date: Mon Jan 13 20:31:47 2025 +0100 btrfs: fix deletion of a range spanning parts two RAID stripe extents When a user requests the deletion of a range that spans multiple stripe extents and btrfs_search_slot() returns us the second RAID stripe extent, we need to pick the previous item and truncate it, if there's still a range to delete left, move on to the next item. The following diagram illustrates the operation: |--- RAID Stripe Extent ---||--- RAID Stripe Extent ---| |--- keep ---|--- drop ---| While at it, comment the trivial case of a whole item delete as well. Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/raid-stripe-tree.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 50cae2ca69561cbd9a90308ad2a14a442d230662 Author: Johannes Thumshirn Date: Mon Jan 13 20:31:46 2025 +0100 btrfs: fix tail delete of RAID stripe-extents Fix tail delete of RAID stripe-extents, if there is a range to be deleted as well after the tail delete of the extent. Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/raid-stripe-tree.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit a678543e609dfb145f0498f895bee05bbc7994a5 Author: Johannes Thumshirn Date: Mon Jan 13 20:31:45 2025 +0100 btrfs: fix front delete range calculation for RAID stripe extents When deleting the front of a RAID stripe-extent the delete code miscalculates the size on how much to pad the remaining extent part in the front. Fix the calculation so we're always having the sizes we expect. Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/raid-stripe-tree.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5a0e38eab76991562e0754a93c2c4160819efb03 Author: Johannes Thumshirn Date: Mon Jan 13 20:31:44 2025 +0100 btrfs: assert RAID stripe-extent length is always greater than 0 When modifying a RAID stripe-extent, ASSERT() that the length of the new RAID stripe-extent is always greater than 0. Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/raid-stripe-tree.c | 1 + 1 file changed, 1 insertion(+) commit 9257d8632a36d02f02a94e674238bcc1b16db8b3 Author: Johannes Thumshirn Date: Mon Jan 13 20:31:43 2025 +0100 btrfs: don't try to delete RAID stripe-extents if we don't need to Even if the RAID stripe-tree is not enabled in the filesystem, do_free_extent_accounting() still calls into btrfs_delete_raid_extent(). Check if the extent in question is on a block-group that has a profile which is used by RAID stripe-tree before attempting to delete a stripe extent. Return early if it doesn't, otherwise we're doing a unnecessary search. Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/raid-stripe-tree.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit c221a9a29d419a456503d8e930be0b3cba14d5db Author: Johannes Thumshirn Date: Mon Jan 13 20:31:42 2025 +0100 btrfs: selftests: correct RAID stripe-tree feature flag setting RAID stripe-tree is an incompatible feature not a read-only compatible, so set the incompat flag not a compat_ro one in the selftest code. Subsequent changes in btrfs_delete_raid_extent() will start checking for this flag. Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/tests/raid-stripe-tree-tests.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65880d32e1d7eb1ef03253c454fcd8f9d41aaa09 Author: Bence Csókás Date: Tue Jan 14 10:59:07 2025 +0100 ASoC: sun4i-codec: Use new devm clk and reset APIs Clean up error handling by using the new devm_ clock and reset functions. This should make it easier to add new code, as we can eliminate the "goto ladder" in probe(). Signed-off-by: Bence Csókás Link: https://patch.msgid.link/20250114095909.798559-1-csokas.bence@prolan.hu Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 42 +++++++----------------------------------- 1 file changed, 7 insertions(+), 35 deletions(-) commit 41f1d2bd4998829341cdada022ede610068a0f33 Author: Kuninori Morimoto Date: Tue Jan 14 01:06:22 2025 +0000 ASoC: soc-dapm: remove !card check from snd_soc_dapm_set_bias_level() dapm is setup by snd_soc_dapm_init(), thus dapm->card never been NULL. We don't need if (!card) check for it. Reported-by: Dan Carpenter Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/877c6ytd9t.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3927c51e49c1a45785334dc578f0b29c685619ec Author: Shengjiu Wang Date: Tue Jan 14 18:27:20 2025 +0800 ASoC: dt-bindings: fsl,micfil: Add compatible string for i.MX943 platform Add compatible string "fsl,imx943-micfil" for i.MX943 platform. The definition of register map and some register bit map is different on the i.MX943 platform. Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/20250114102720.3664667-3-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/fsl,micfil.yaml | 1 + 1 file changed, 1 insertion(+) commit eab69050450ba63a4edb17d3d1a8654d2a130786 Author: Shengjiu Wang Date: Tue Jan 14 18:27:19 2025 +0800 ASoC: fsl_micfil: Add i.MX943 platform support On i.MX943, the FIFO data address is changed to 0x20~0x3c, compared to previous version, there is a minus 4 offset, so add a new regmap configuration for it. And the bit width of CICOSR is changed to 5 bits, from bit 16th to 20th in REG_MICFIL_CTRL2 register, so update its definition header file. Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/20250114102720.3664667-2-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_micfil.c | 98 ++++++++++++++++++++++++++++++++++++---------- sound/soc/fsl/fsl_micfil.h | 2 +- 2 files changed, 78 insertions(+), 22 deletions(-) commit 9e7665097f3df8699672243bc867d536e6c0ad3b Author: Krzysztof Kozlowski Date: Tue Jan 7 13:58:34 2025 +0100 dt-bindings: pinctrl: 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: Manikandan Muralidharan Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/20250107125836.225447-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij .../bindings/pinctrl/atmel,at91rm9200-pinctrl.yaml | 72 +++++++++++----------- .../bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml | 54 ++++++++-------- .../bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml | 54 ++++++++-------- .../bindings/pinctrl/realtek,rtd1619b-pinctrl.yaml | 54 ++++++++-------- .../bindings/pinctrl/xlnx,pinctrl-zynq.yaml | 61 ++++++++---------- 5 files changed, 144 insertions(+), 151 deletions(-) commit f31f33dbb3bab572bad9fe7b849ab0dcbe6fd279 Author: Maciej S. Szmigiero Date: Mon Jan 6 18:41:15 2025 +0100 pinctrl: amd: Take suspend type into consideration which pins are non-wake Some laptops have pins which are a wake source for S0i3/S3 but which aren't a wake source for S4/S5 and which cause issues when left unmasked during hibernation (S4). For example HP EliteBook 855 G7 has pin #24 that causes instant wakeup (hibernation failure) if left unmasked (it is a wake source only for S0i3/S3). GPIO pin #24 on this platform is likely dedicated to WWAN XMM7360 modem since this pin triggers wake notify to WWAN modem's parent PCIe port. Fix this by considering a pin a wake source only if it is marked as one for the current suspend type (S0i3/S3 vs S4/S5). Since Z-wake pins only make sense at runtime these were excluded from both of suspend categories, so pins with only the Z-wake flag set are effectively treated as non-wake pins. Fixes: 2fff0b5e1a6b ("pinctrl: amd: Mask non-wake source pins with interrupt enabled at suspend") Signed-off-by: Maciej S. Szmigiero Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/d4b2d076366fdd08a0c1cd9b7ecd91dc95e07269.1736184752.git.mail@maciej.szmigiero.name Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 27 +++++++++++++++++++++------ drivers/pinctrl/pinctrl-amd.h | 7 +++---- 2 files changed, 24 insertions(+), 10 deletions(-) commit f0a4e9fa656ceb3b2e4c296cf6226798d804fa22 Author: Uwe Kleine-König Date: Mon Dec 30 16:59:49 2024 +0100 i2c: designware: Actually make use of the I2C_DW_COMMON and I2C_DW symbol namespaces DEFAULT_SYMBOL_NAMESPACE must already be defined when is included. So move the define above the include block. Fixes: fd57a3325a77 ("i2c: designware: Move exports to I2C_DW namespaces") Signed-off-by: Uwe Kleine-König Acked-by: Jarkko Nikula Acked-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-common.c | 5 +++-- drivers/i2c/busses/i2c-designware-master.c | 5 +++-- drivers/i2c/busses/i2c-designware-slave.c | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) commit 9c7ad35632297edc08d0f2c7b599137e9fb5f9ff Merge: 2b1d9116b0df 5385f1e1923c Author: Paolo Abeni Date: Tue Jan 14 13:56:36 2025 +0100 Merge branch 'arrange-pse-core-and-update-tps23881-driver' Kory Maincent says: ==================== Arrange PSE core and update TPS23881 driver This patch includes several improvements to the PSE core for better implementation and maintainability: - Move the conversion between current limit and power limit from the driver to the PSE core. - Update power and current limit checks. - Split the ethtool_get_status callback into multiple callbacks. - Fix PSE PI of_node detection. - Clean ethtool header of PSE structures. Additionally, the TPS23881 driver has been updated to support power limit and measurement features, aligning with the new PSE core functionalities. This patch series is the first part of the budget evaluation strategy support patch series sent earlier: https://lore.kernel.org/netdev/20250104161622.7b82dfdf@kmaincent-XPS-13-7390/T/#t Signed-off-by: Kory Maincent ==================== Link: https://patch.msgid.link/20250110-b4-feature_poe_arrange-v3-0-142279aedb94@bootlin.com Signed-off-by: Paolo Abeni commit 5385f1e1923ca8131eb143567d509b101a344e06 Author: Kory Maincent Date: Fri Jan 10 10:40:31 2025 +0100 net: pse-pd: Clean ethtool header of PSE structures Remove PSE-specific structures from the ethtool header to improve code modularity, maintain independent headers, and reduce incremental build time. Signed-off-by: Kory Maincent Signed-off-by: Paolo Abeni drivers/net/pse-pd/pse_core.c | 1 + include/linux/ethtool.h | 20 -------------------- include/linux/pse-pd/pse.h | 22 +++++++++++++++++++++- 3 files changed, 22 insertions(+), 21 deletions(-) commit 10276f3e1c7e7f5de9f0bba58f8a849cb195253d Author: Kory Maincent Date: Fri Jan 10 10:40:30 2025 +0100 net: pse-pd: Fix missing PI of_node description The PI of_node was not assigned in the regulator_config structure, leading to failures in resolving the correct supply when different power supplies are assigned to multiple PIs of a PSE controller. This fix ensures that the of_node is properly set in the regulator_config, allowing accurate supply resolution for each PI. Acked-by: Oleksij Rempel Signed-off-by: Kory Maincent Signed-off-by: Paolo Abeni drivers/net/pse-pd/pse_core.c | 1 + 1 file changed, 1 insertion(+) commit 7f076ce3f17334964590c2cce49a02c0851c099a Author: Kory Maincent Date: Fri Jan 10 10:40:29 2025 +0100 net: pse-pd: tps23881: Add support for power limit and measurement features Expand PSE callbacks to support the newly introduced pi_get/set_pw_limit() and pi_get_voltage() functions. These callbacks allow for power limit configuration in the TPS23881 controller. Additionally, the patch includes the pi_get_pw_class() the pi_get_actual_pw(), and the pi_get_pw_limit_ranges') callbacks providing more comprehensive PoE status reporting. Acked-by: Oleksij Rempel Signed-off-by: Kory Maincent Signed-off-by: Paolo Abeni drivers/net/pse-pd/tps23881.c | 258 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 256 insertions(+), 2 deletions(-) commit 4640a1f0d8f2246f34d6e74330d7e7d2cf75605b Author: Kory Maincent Date: Fri Jan 10 10:40:28 2025 +0100 net: pse-pd: Remove is_enabled callback from drivers The is_enabled callback is now redundant as the admin_state can be obtained directly from the driver and provides the same information. To simplify functionality, the core will handle this internally, making the is_enabled callback unnecessary at the driver level. Remove the callback from all drivers. Acked-by: Oleksij Rempel Signed-off-by: Kory Maincent Signed-off-by: Paolo Abeni drivers/net/pse-pd/pd692x0.c | 26 -------------------------- drivers/net/pse-pd/pse_core.c | 13 +++++++++++-- drivers/net/pse-pd/pse_regulator.c | 9 --------- drivers/net/pse-pd/tps23881.c | 28 ---------------------------- include/linux/pse-pd/pse.h | 3 --- 5 files changed, 11 insertions(+), 68 deletions(-) commit 3e9dbfec499807767d03592ebdf19d9c15fd495b Author: Kory Maincent Date: Fri Jan 10 10:40:27 2025 +0100 net: pse-pd: Split ethtool_get_status into multiple callbacks The ethtool_get_status callback currently handles all status and PSE information within a single function. This approach has two key drawbacks: 1. If the core requires some information for purposes other than ethtool_get_status, redundant code will be needed to fetch the same data from the driver (like is_enabled). 2. Drivers currently have access to all information passed to ethtool. New variables will soon be added to ethtool status, such as PSE ID, power domain IDs, and budget evaluation strategies, which are meant to be managed solely by the core. Drivers should not have the ability to modify these variables. To resolve these issues, ethtool_get_status has been split into multiple callbacks, with each handling a specific piece of information required by ethtool or the core. Signed-off-by: Kory Maincent Signed-off-by: Paolo Abeni drivers/net/pse-pd/pd692x0.c | 153 ++++++++++++++++++++++++++----------- drivers/net/pse-pd/pse_core.c | 83 +++++++++++++++++--- drivers/net/pse-pd/pse_regulator.c | 26 +++++-- drivers/net/pse-pd/tps23881.c | 60 +++++++++++---- include/linux/pse-pd/pse.h | 87 ++++++++++++++++++--- net/ethtool/pse-pd.c | 8 +- 6 files changed, 323 insertions(+), 94 deletions(-) commit e0a5e2bba38aa61a900934b45d6e846e0a6d7524 Author: Kory Maincent Date: Fri Jan 10 10:40:26 2025 +0100 net: pse-pd: Use power limit at driver side instead of current limit The regulator framework uses current limits, but the PSE standard and known PSE controllers rely on power limits. Instead of converting current to power within each driver, perform the conversion in the PSE core. This avoids redundancy in driver implementation and aligns better with the standard, simplifying driver development. Remove at the same time the _pse_ethtool_get_status() function which is not needed anymore. Acked-by: Oleksij Rempel Signed-off-by: Kory Maincent Signed-off-by: Paolo Abeni drivers/net/pse-pd/pd692x0.c | 45 +++++---------------- drivers/net/pse-pd/pse_core.c | 91 +++++++++++++++++++------------------------ include/linux/pse-pd/pse.h | 16 +++----- 3 files changed, 57 insertions(+), 95 deletions(-) commit f3cb3c7bea0c08e821d8e9dfd2f96acd1db7c24e Author: Kory Maincent Date: Fri Jan 10 10:40:25 2025 +0100 net: pse-pd: tps23881: Add missing configuration register after disable When setting the PWOFF register, the controller resets multiple configuration registers. This patch ensures these registers are reconfigured as needed following a disable operation. Acked-by: Oleksij Rempel Signed-off-by: Kory Maincent Signed-off-by: Paolo Abeni drivers/net/pse-pd/tps23881.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 4c2bab507eb7edc8e497e91b9b7f05d76d7e32bb Author: Kory Maincent Date: Fri Jan 10 10:40:24 2025 +0100 net: pse-pd: tps23881: Use helpers to calculate bit offset for a channel This driver frequently follows a pattern where two registers are read or written in a single operation, followed by calculating the bit offset for a specific channel. Introduce helpers to streamline this process and reduce code redundancy, making the codebase cleaner and more maintainable. Acked-by: Oleksij Rempel Signed-off-by: Kory Maincent Signed-off-by: Paolo Abeni drivers/net/pse-pd/tps23881.c | 107 +++++++++++++++++++++++++++--------------- 1 file changed, 69 insertions(+), 38 deletions(-) commit 0b567519d1152de52b29b2da2c47aa0f39a46266 Author: Kory Maincent Date: Fri Jan 10 10:40:23 2025 +0100 net: pse-pd: tps23881: Simplify function returns by removing redundant checks Cleaned up several functions in tps23881 by removing redundant checks on return values at the end of functions. These check has been removed, and the return statement now directly returns the function result, reducing the code's complexity and making it more concise. Reviewed-by: Andrew Lunn Acked-by: Oleksij Rempel Reviewed-by: Kyle Swenson Signed-off-by: Kory Maincent Signed-off-by: Paolo Abeni drivers/net/pse-pd/tps23881.c | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) commit 6e56a6d47a7fad705a1a1d088237b0858c01a770 Author: Kory Maincent Date: Fri Jan 10 10:40:22 2025 +0100 net: pse-pd: Add power limit check Checking only the current limit is not sufficient. According to the standard, voltage can reach up to 57V and current up to 1.92A, which exceeds the power limit described in the standard (99.9W). Add a power limit check to prevent this. Acked-by: Oleksij Rempel Signed-off-by: Kory Maincent Signed-off-by: Paolo Abeni drivers/net/pse-pd/pse_core.c | 3 +++ include/linux/pse-pd/pse.h | 2 ++ 2 files changed, 5 insertions(+) commit 675d0e3cacc3ae7c29294a5f6a820187f862ad8b Author: Kory Maincent Date: Fri Jan 10 10:40:21 2025 +0100 net: pse-pd: Avoid setting max_uA in regulator constraints Setting the max_uA constraint in the regulator API imposes a current limit during the regulator registration process. This behavior conflicts with preserving the maximum PI power budget configuration across reboots. Instead, compare the desired current limit to MAX_PI_CURRENT in the pse_pi_set_current_limit() function to ensure proper handling of the power budget. Acked-by: Oleksij Rempel Signed-off-by: Kory Maincent Signed-off-by: Paolo Abeni drivers/net/pse-pd/pse_core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 514dcf78afe6b99fba5e885be295356856dd424b Author: Kory Maincent Date: Fri Jan 10 10:40:20 2025 +0100 net: pse-pd: Remove unused pse_ethtool_get_pw_limit function declaration Removed the unused pse_ethtool_get_pw_limit() function declaration from pse.h. This function was declared but never implemented or used, making the declaration unnecessary. Reviewed-by: Kalesh AP Reviewed-by: Andrew Lunn Acked-by: Oleksij Rempel Reviewed-by: Kyle Swenson Signed-off-by: Kory Maincent Signed-off-by: Paolo Abeni include/linux/pse-pd/pse.h | 8 -------- 1 file changed, 8 deletions(-) commit ad4c9a8a980336450631dce8cc0799f9a8de1914 Author: Howard Hsu Date: Tue Jan 14 18:10:26 2025 +0800 wifi: mt76: mt7996: add implicit beamforming support for mt7992 The configuration of mt7992 iBF has some differences to mt7996, rework related code to make it work. Also, most of our chipsets support iBF only on HT and VHT mode, except mt7992 variant that has 5T on 5GHz band also supports iBF on HE and EHT mode. Co-developed-by: Shayne Chen Signed-off-by: Shayne Chen Signed-off-by: Howard Hsu Link: https://patch.msgid.link/20250114101026.3587702-9-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 77 ++++++++++++++-------- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 6 ++ 2 files changed, 55 insertions(+), 28 deletions(-) commit 57ccb37a906fed786055f045918abda724117aab Author: Michael-CY Lee Date: Tue Jan 14 18:10:25 2025 +0800 wifi: mt76: mt7996: fix beacon command during disabling When stopping AP, mac80211 frees beacon template before it calls driver's stop_ap operation. In other words, on the path of stopping AP, ieee80211_beacon_get_template() must returns NULL in mt7996_mcu_add_beacon(). In such case mt7996 immediately returns -EINVAL without telling FW to disable the beacon. This commit refactors mt7996_mcu_add_beacon() so that FW can be correctly informed when disabling AP interface. Co-developed-by: Shayne Chen Signed-off-by: Shayne Chen Signed-off-by: Michael-CY Lee Link: https://patch.msgid.link/20250114101026.3587702-8-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 26 ++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit da8352da1e4f476fdbf549a4efce4f3c618fde3b Author: Peter Chiu Date: Tue Jan 14 18:10:24 2025 +0800 wifi: mt76: mt7996: fix ldpc setting The non-AP interfaces would not use conf->vht_ldpc so they never set STA_CAP_VHT_LDPC even if peer-station support LDPC. Check conf->vht_ldpc only for AP interface. Without this patch, station only uses BCC to transmit packet in VHT mode. Fixes: dda423dd65c3 ("wifi: mt76: mt7996: remove mt7996_mcu_beacon_check_caps()") Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250114101026.3587702-7-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14749fe2ed360c92c1a2a76dac0b77f759234981 Author: Benjamin Lin Date: Tue Jan 14 18:10:23 2025 +0800 wifi: mt76: mt7996: fix definition of tx descriptor For mt7992 chipsets, the definition of TXD.DW6.BIT10~15 has different interpretations on different frame types. Driver only needs to fill MSDU_CNT for non-management frames. Fixes: 408566db8cad ("wifi: mt76: connac: add new definition of tx descriptor") Co-developed-by: Shayne Chen Signed-off-by: Shayne Chen Signed-off-by: Benjamin Lin Link: https://patch.msgid.link/20250114101026.3587702-6-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5b20557593d46d0687bd9c88df767830b199a4ee Author: Howard Hsu Date: Tue Jan 14 18:10:22 2025 +0800 wifi: mt76: connac: adjust phy capabilities based on band constraints Adjust HE and EHT phy capabilities based on the band constraints. For 2g band, we shall not enable the capabilities above 40MHz. Signed-off-by: Howard Hsu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250114101026.3587702-5-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac.h | 2 +- .../net/wireless/mediatek/mt76/mt76_connac_mac.c | 7 +++- drivers/net/wireless/mediatek/mt76/mt7915/init.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7925/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/init.c | 47 +++++++++++++++------- 6 files changed, 41 insertions(+), 21 deletions(-) commit 5c2a25a1ab76a2976dddc5ffd58498866f3ef7c2 Author: Benjamin Lin Date: Tue Jan 14 18:10:21 2025 +0800 wifi: mt76: mt7996: fix incorrect indexing of MIB FW event Fix wrong calculation of the channel times due to incorrect interpretation from the FW event. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: Benjamin Lin Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250114101026.3587702-4-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 45 ++++++++++++++++--------- 1 file changed, 29 insertions(+), 16 deletions(-) commit 7e3aef59a403ade5dd4ea02edc2d7138a66d74b6 Author: Howard Hsu Date: Tue Jan 14 18:10:20 2025 +0800 wifi: mt76: mt7996: fix HE Phy capability Set HE SU PPDU And HE MU PPDU With 4x HE-LTF And 0.8 us GI within HE PHY Capabilities element as 1 since hardware can support. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: Howard Hsu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250114101026.3587702-3-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/init.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2ffbdfc1bd78ba944c5754791c84f32232b513c6 Author: Howard Hsu Date: Tue Jan 14 18:10:19 2025 +0800 wifi: mt76: mt7996: fix the capability of reception of EHT MU PPDU This commit includes two changes. First, enable "EHT MU PPDU With 4x EHT-LTF And 0.8us GI" in EHT Phy capabilities element since hardware can support. Second, fix the value of "Maximum number of supported EHT LTFs" in the same element, where the previous setting of 3 in Bit 3-4 was incorrect. Fixes: 348533eb968d ("wifi: mt76: mt7996: add EHT capability init") Signed-off-by: Howard Hsu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250114101026.3587702-2-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/init.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1816ad9381e0c150e4c44ce6dd6ee2c52008a052 Author: Peter Chiu Date: Tue Jan 14 18:10:18 2025 +0800 wifi: mt76: mt7996: add max mpdu len capability Set max mpdu len to 11454 according to hardware capability. Without this patch, the max ampdu length would be 3895 and count not get expected performance. Fixes: 348533eb968d ("wifi: mt76: mt7996: add EHT capability init") Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250114101026.3587702-1-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2425dc7beaadc39c2636f97f8bdc22dc3cf88149 Author: Leon Yen Date: Fri Apr 12 16:53:57 2024 +0800 wifi: mt76: mt7921: avoid undesired changes of the preset regulatory domain Some countries have strict RF restrictions where changing the regulatory domain dynamically based on the connected AP is not acceptable. This patch disables Beacon country IE hinting when a valid country code is set from usersland (e.g., by system using iw or CRDA). Signed-off-by: Leon Yen Signed-off-by: Ming Yen Hsieh Tested-by: David Ruth Link: https://patch.msgid.link/20240412085357.13756-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/init.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 0e19942e6d1c735c95b40123de1d6e81dc2c128d Author: Quan Zhou Date: Fri Jan 3 21:53:50 2025 +0800 wifi: mt76: mt7925e: fix too long of wifi resume time The mt7925e takes a long time to resume in platform resume scenarios. This is due to the mt7925 reconfiguring the tx power for each wifi channel during resume. By streamlining the process and removing redundant power configurations, the resume time for the mt7925 can be shortened. Signed-off-by: Quan Zhou Link: https://patch.msgid.link/f075d43d87a5eefa5869baf755e9986edf735860.1735910836.git.quan.zhou@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/init.c | 5 +++++ drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 1 + drivers/net/wireless/mediatek/mt76/mt7925/main.c | 10 +++++++--- drivers/net/wireless/mediatek/mt76/mt792x.h | 2 ++ 4 files changed, 15 insertions(+), 3 deletions(-) commit 8f6571ad470feb242dcef36e53f7cf1bba03780f Author: Quan Zhou Date: Fri Jan 3 21:44:54 2025 +0800 wifi: mt76: mt7925: add handler to hif suspend/resume event When the system suspend or resume, the WiFi driver sends an hif_ctrl command to the firmware and waits for an event. Due to changes in the event format reported by the chip, the current mt7925's driver does not account for these changes, resulting in command timeout. Add flow to handle hif_ctrl event to avoid command timeout. We also exented API mt76_connac_mcu_set_hif_suspend for connac3 this time. Signed-off-by: Quan Zhou Link: https://patch.msgid.link/3a0844ff5162142c4a9f3cf7104f75076ddd3b87.1735910562.git.quan.zhou@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/main.c | 4 +- drivers/net/wireless/mediatek/mt76/mt7615/pci.c | 6 +-- drivers/net/wireless/mediatek/mt76/mt7615/sdio.c | 4 +- drivers/net/wireless/mediatek/mt76/mt7615/usb.c | 4 +- .../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 4 +- .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 3 +- drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 6 +-- drivers/net/wireless/mediatek/mt76/mt7921/sdio.c | 6 +-- drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 4 +- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 49 +++++++++++++++++++++- drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h | 20 +++++++++ drivers/net/wireless/mediatek/mt76/mt7925/pci.c | 29 +++++++++---- drivers/net/wireless/mediatek/mt76/mt7925/usb.c | 20 ++++++--- drivers/net/wireless/mediatek/mt76/mt792x.h | 2 + 14 files changed, 127 insertions(+), 34 deletions(-) commit a0f721b8d986b62b4de316444f2b2e356d17e3b5 Author: Quan Zhou Date: Fri Jan 3 21:39:43 2025 +0800 wifi: mt76: mt7925: fix CLC command timeout when suspend/resume When enter suspend/resume while in a connected state, the upper layer will trigger disconnection before entering suspend, and at the same time, it will trigger regd_notifier() and update CLC, causing the CLC event to not be received due to suspend, resulting in a command timeout. Therefore, the update of CLC is postponed until resume, to ensure data consistency and avoid the occurrence of command timeout. Signed-off-by: Quan Zhou Link: https://patch.msgid.link/bab00a2805d0533fd8beaa059222659858a9dcb5.1735910455.git.quan.zhou@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/init.c | 20 +++++++++++++++++--- drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h | 1 + drivers/net/wireless/mediatek/mt76/mt7925/pci.c | 3 +++ 3 files changed, 21 insertions(+), 3 deletions(-) commit 1b97fc8443aea01922560de9f24a6383e6eb6ae8 Author: Quan Zhou Date: Fri Jan 3 21:35:59 2025 +0800 wifi: mt76: mt7925: fix the unfinished command of regd_notifier before suspend Before entering suspend, we need to ensure that all MCU command are completed. In some cases, such as with regd_notifier, there is a chance that CLC commands, will be executed before suspend. Signed-off-by: Quan Zhou Link: https://patch.msgid.link/3af7b4e5bf7437832b016e32743657d1d55b1f9d.1735910288.git.quan.zhou@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/init.c | 4 ++++ drivers/net/wireless/mediatek/mt76/mt7925/pci.c | 3 +++ 2 files changed, 7 insertions(+) commit d07ecb4f7070e84de49e8fa4e5a83dd52716d805 Author: Peter Chiu Date: Thu Jan 9 19:04:36 2025 +0800 wifi: mt76: mt7996: fix register mapping Bypass the entry when ofs is equal to dev->reg.map[i].size. Without this patch, it would get incorrect register mapping when the CR address is located at the boundary of an entry. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: Peter Chiu Signed-off-by: Shengyu Qu Link: https://patch.msgid.link/OSZPR01MB84344FEFF53004B5CF40BCC198132@OSZPR01MB8434.jpnprd01.prod.outlook.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd1649ef966bb87053c17385ea2cfd1758f5385b Author: Peter Chiu Date: Thu Jan 9 19:04:35 2025 +0800 wifi: mt76: mt7915: fix register mapping Bypass the entry when ofs is equal to dev->reg.map[i].size. Without this patch, it would get incorrect register mapping when the CR address is located at the boundary of an entry. Fixes: cd4c314a65d3 ("mt76: mt7915: refine register definition") Signed-off-by: Peter Chiu Signed-off-by: Shengyu Qu Link: https://patch.msgid.link/OSZPR01MB843401EAA1DA6BD7AEF356F298132@OSZPR01MB8434.jpnprd01.prod.outlook.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e48da5c9ca293d775a1dd35fe26d44418dbc6715 Author: Felix Fietkau Date: Thu Jan 2 17:35:08 2025 +0100 wifi: mt76: mt7996: fix monitor mode Enable sniffer mode via MCU command in order to properly enable promiscuous mode on the device. Link: https://patch.msgid.link/20250102163508.52945-24-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/main.c | 1 + drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 21 +++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 1 + 3 files changed, 23 insertions(+) commit 69d54ce7491d046eaae05de7fb2493319a481991 Author: Felix Fietkau Date: Thu Jan 2 17:35:07 2025 +0100 wifi: mt76: mt7996: switch to single multi-radio wiphy Use generic mt76 chanctx functions and look up phy from vif link. The driver now uses only a single phy to handle multiple interfaces on different channels. This is preparation for full MLO support. Link: https://patch.msgid.link/20250102163508.52945-23-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c | 1 + drivers/net/wireless/mediatek/mt76/mt7996/init.c | 244 ++++---- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 6 +- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 651 +++++++++++++-------- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 15 +- drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 3 + drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 52 +- 7 files changed, 593 insertions(+), 379 deletions(-) commit 1f8dd5686e6578aa38e90836a275ef2ad3f27d86 Author: Felix Fietkau Date: Thu Jan 2 17:35:06 2025 +0100 wifi: mt76: mt7996: move all debugfs files to the primary phy Preparation for single-wiphy support Link: https://patch.msgid.link/20250102163508.52945-22-nbd@nbd.name Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt7996/debugfs.c | 144 +++++++++++++-------- drivers/net/wireless/mediatek/mt76/mt7996/init.c | 6 +- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 2 +- 3 files changed, 89 insertions(+), 63 deletions(-) commit a0facfc80ec12e1fe0bb2407bf9970128d167193 Author: Shayne Chen Date: Thu Jan 2 17:35:05 2025 +0100 wifi: mt76: connac: rework connac helpers Rework connac helpers related to rate and phymode. This is a preliminary patch to add MLO support for mt7996 chipsets. Co-developed-by: Bo Jiao Signed-off-by: Bo Jiao Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250102163508.52945-21-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac.h | 2 +- drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c | 16 ++++++++-------- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 6 +++--- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7925/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 16 +++++++--------- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 2 +- 7 files changed, 22 insertions(+), 24 deletions(-) commit 4b98d4aec74fb6242f3442589e9261b7c2f347cd Author: Felix Fietkau Date: Thu Jan 2 17:35:04 2025 +0100 wifi: mt76: mt7996: prepare mt7996_mcu_update_bss_color for MLO support Pass in struct mt76_vif_link in order to update the correct link. Link: https://patch.msgid.link/20250102163508.52945-20-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/main.c | 34 +++++----------------- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 6 ++-- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 3 +- 3 files changed, 13 insertions(+), 30 deletions(-) commit 96fcecd9ba81a66b2b061cdcc10da1cc1b2a9b90 Author: Felix Fietkau Date: Thu Jan 2 17:35:03 2025 +0100 wifi: mt76: connac: prepare mt76_connac_mcu_sta_basic_tlv for MLO support Pass in struct ieee80211_bss_conf in order to use link specific data. Link: https://patch.msgid.link/20250102163508.52945-19-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 12 ++++++++---- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 3 ++- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 5 +++-- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 2 +- 6 files changed, 17 insertions(+), 11 deletions(-) commit 97a1beb84c1c3a75db04279f7ceba882f94e25b4 Author: Felix Fietkau Date: Thu Jan 2 17:35:02 2025 +0100 wifi: mt76: mt7996: prepare mt7996_mcu_set_timing for MLO support Pass in struct ieee80211_bss_conf in order to use link specific data. Link: https://patch.msgid.link/20250102163508.52945-18-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 7 ++++--- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) commit c0df2f0caa8dde0d50f36649ee28a54c5079281b Author: Felix Fietkau Date: Thu Jan 2 17:35:01 2025 +0100 wifi: mt76: mt7996: prepare mt7996_mcu_set_tx for MLO support Pass in struct ieee80211_bss_conf in order to use link specific data. Link: https://patch.msgid.link/20250102163508.52945-17-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/main.c | 7 ++++--- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 9 +++++---- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 3 ++- 3 files changed, 11 insertions(+), 8 deletions(-) commit 747fe944506ff21118f627a8c05b475cc7a9f9fb Author: Felix Fietkau Date: Thu Jan 2 17:35:00 2025 +0100 wifi: mt76: mt7996: prepare mt7996_mcu_add_beacon for MLO support Pass in struct ieee80211_bss_conf. Link: https://patch.msgid.link/20250102163508.52945-16-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 4 +- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 51 +++++++++++----------- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 2 +- 4 files changed, 30 insertions(+), 29 deletions(-) commit 34a41bfbcb71f2fba26255c0552959efdcab742f Author: Felix Fietkau Date: Thu Jan 2 17:34:59 2025 +0100 wifi: mt76: mt7996: prepare mt7996_mcu_add_dev/bss_info for MLO support Add extra arguments for struct ieee80211_bss_conf and mt76_vif_link. Link: https://patch.msgid.link/20250102163508.52945-15-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/main.c | 38 ++++-- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 146 ++++++++++----------- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 11 +- 3 files changed, 99 insertions(+), 96 deletions(-) commit 0b57e944cee3d49eab33a8cf9e95b0862a90f441 Author: Felix Fietkau Date: Thu Jan 2 17:34:58 2025 +0100 wifi: mt76: mt7996: pass wcid to mt7996_mcu_sta_hdr_trans_tlv Preparation for MLO support. Link: https://patch.msgid.link/20250102163508.52945-14-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit c56d6edebc1f59afec7a59117ab50abd89879006 Author: Felix Fietkau Date: Thu Jan 2 17:34:57 2025 +0100 wifi: mt76: mt7996: use emulated hardware scan support Preparation for supporting multiple radios on a single wiphy Link: https://patch.msgid.link/20250102163508.52945-13-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/init.c | 3 +++ drivers/net/wireless/mediatek/mt76/mt7996/main.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit a8f424c1287cc79a06c21816658feea87dfcb83f Author: Felix Fietkau Date: Thu Jan 2 17:34:56 2025 +0100 wifi: mt76: add multi-radio remain_on_channel functions This allows a driver using the generic channel context functions to temporarily switch to another channel for off-channel rx/tx. Link: https://patch.msgid.link/20250102163508.52945-12-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/channel.c | 96 +++++++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mac80211.c | 3 + drivers/net/wireless/mediatek/mt76/mt76.h | 12 ++++ drivers/net/wireless/mediatek/mt76/scan.c | 2 +- 4 files changed, 112 insertions(+), 1 deletion(-) commit e411b8190fe7c969c668eedb5b01f2865c89b1af Author: Felix Fietkau Date: Thu Jan 2 17:34:55 2025 +0100 wifi: mt76: add multi-radio support to scanning code When scanning on a phy/vif combination that does not have an active link, create a temporary link in order to ensure that we have a valid wcid. Link: https://patch.msgid.link/20250102163508.52945-11-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/channel.c | 62 +++++++++++++++++++++++++++- drivers/net/wireless/mediatek/mt76/mt76.h | 6 +++ drivers/net/wireless/mediatek/mt76/scan.c | 11 ++++- 3 files changed, 77 insertions(+), 2 deletions(-) commit 716cc146d58050cb277fefefe1002d634c4379cf Author: Felix Fietkau Date: Thu Jan 2 17:34:54 2025 +0100 wifi: mt76: add multi-radio support to tx scheduling Look up the phy for each scheduled txq. Only run one scheduling loop per hw. Link: https://patch.msgid.link/20250102163508.52945-10-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/tx.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit 955e823102fe53b1d7949f9e3ab05a45fe84c316 Author: Felix Fietkau Date: Thu Jan 2 17:34:53 2025 +0100 wifi: mt76: add multi-radio support to a few core hw ops Iterate over all phys if multi-radio is supported by the driver Link: https://patch.msgid.link/20250102163508.52945-9-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 88 +++++++++++++++++++++------ 1 file changed, 68 insertions(+), 20 deletions(-) commit 38a45bead2be0bd481f3143dc4fe451cb9d09823 Author: Felix Fietkau Date: Thu Jan 2 17:34:52 2025 +0100 wifi: mt76: remove dev->wcid_phy_mask Explicitly check wcid->phy_idx instead. Reduces allocated data size. Link: https://patch.msgid.link/20250102163508.52945-8-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 3 --- drivers/net/wireless/mediatek/mt76/mt76.h | 3 +-- drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x2/phy.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7925/main.c | 1 - drivers/net/wireless/mediatek/mt76/util.c | 10 +++------- 7 files changed, 7 insertions(+), 16 deletions(-) commit 82334623af0cd2154633cdb007719a321048fafc Author: Felix Fietkau Date: Thu Jan 2 17:34:51 2025 +0100 wifi: mt76: add chanctx functions for multi-channel phy support This adds an implementation for the chanctx functions, which can be used by multi-channel capable drivers. Preparation for adding MLO support. Link: https://patch.msgid.link/20250102163508.52945-7-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/Makefile | 2 +- drivers/net/wireless/mediatek/mt76/channel.c | 250 ++++++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mac80211.c | 35 +++- drivers/net/wireless/mediatek/mt76/mt76.h | 64 ++++++- drivers/net/wireless/mediatek/mt76/scan.c | 6 + 5 files changed, 342 insertions(+), 15 deletions(-) commit 451bc9aea9a1a6fe53969e81a5cb1bd785c0d989 Author: Mingwei Zheng Date: Mon Jan 6 17:06:59 2025 -0500 pinctrl: stm32: Add check for clk_enable() Convert the driver to clk_bulk*() API. Add check for the return value of clk_bulk_enable() to catch the potential error. Fixes: 05d8af449d93 ("pinctrl: stm32: Keep pinctrl block clock enabled when LEVEL IRQ requested") Signed-off-by: Mingwei Zheng Signed-off-by: Jiasheng Jiang Reviewed-by: Antonio Borneo Link: https://lore.kernel.org/20250106220659.2640365-1-zmw12306@gmail.com Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32.c | 76 +++++++++++++++++------------------ 1 file changed, 38 insertions(+), 38 deletions(-) commit cbf5e61da66028ea30b52515dc1f1af969589bf7 Author: Felix Fietkau Date: Thu Jan 2 17:34:50 2025 +0100 wifi: mt76: initialize more wcid fields mt76_wcid_init Reduces code duplication and ensures that the phy index is always set. Link: https://patch.msgid.link/20250102163508.52945-6-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 12 ++++++++---- drivers/net/wireless/mediatek/mt76/mt76.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7603/main.c | 4 +--- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 4 +--- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 3 +-- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 5 +---- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 4 +--- drivers/net/wireless/mediatek/mt76/mt7925/main.c | 10 +++------- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 5 +---- 9 files changed, 18 insertions(+), 31 deletions(-) commit 36e02101f84735672aefaf405af2f585f4804a34 Author: Felix Fietkau Date: Thu Jan 2 17:34:49 2025 +0100 wifi: mt76: mt7996: split link specific data from struct mt7996_vif Preparation for MLO support. Link: https://patch.msgid.link/20250102163508.52945-5-nbd@nbd.name Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt7996/debugfs.c | 6 +- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 8 +- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 202 ++++++++++++--------- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 80 ++++---- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 21 ++- 5 files changed, 185 insertions(+), 132 deletions(-) commit e24646ef7eded74c68cdef20e3f0d48d14522a0b Author: Felix Fietkau Date: Thu Jan 2 17:34:48 2025 +0100 wifi: mt76: add vif link specific data structure Preparation for splitting link data from vif data for MLO support. Link: https://patch.msgid.link/20250102163508.52945-4-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76.h | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit bf18f7172aa429ec6a68852984a2e9468560c066 Author: Felix Fietkau Date: Thu Jan 2 17:34:47 2025 +0100 wifi: mt76: rename struct mt76_vif to mt76_vif_link Preparation to use it for private bss link data instead of the full vif on MLO capable devices. Link: https://patch.msgid.link/20250102163508.52945-3-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 2 +- .../net/wireless/mediatek/mt76/mt7615/pci_mac.c | 2 +- .../net/wireless/mediatek/mt76/mt76_connac_mac.c | 4 +- .../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 54 +++++++++++----------- .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 14 +++--- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 4 +- drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 4 +- drivers/net/wireless/mediatek/mt76/mt7925/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 26 +++++------ drivers/net/wireless/mediatek/mt76/mt7925/mcu.h | 2 +- drivers/net/wireless/mediatek/mt76/mt792x.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 4 +- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 4 +- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 12 ++--- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 2 +- drivers/net/wireless/mediatek/mt76/scan.c | 2 +- 20 files changed, 74 insertions(+), 74 deletions(-) commit a24f891a2f8ca8ceff3346216776a80589ea5a21 Author: Felix Fietkau Date: Thu Jan 2 17:34:46 2025 +0100 wifi: mt76: add support for allocating a phy without hw Preparation for supporting a single hw with multiple radios Link: https://patch.msgid.link/20250102163508.52945-2-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 39 +++++++++++++++++++++++---- drivers/net/wireless/mediatek/mt76/mt76.h | 2 ++ 2 files changed, 36 insertions(+), 5 deletions(-) commit 31083e38548fda815683c9a449d10ca15c655e49 Author: Felix Fietkau Date: Thu Jan 2 17:34:45 2025 +0100 wifi: mt76: add code for emulating hardware scanning Preparation for supporting multiple radios on a single wiphy on devices where firmware does not support actual hardware scanning. This is also a prerequisite for full MLO support Co-developed-by: Peter Chiu Signed-off-by: Peter Chiu Co-developed-by: Michael-CY Lee Signed-off-by: Michael-CY Lee Co-developed-by: Shayne Chen Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20250102163508.52945-1-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/Makefile | 2 +- drivers/net/wireless/mediatek/mt76/mac80211.c | 20 ++- drivers/net/wireless/mediatek/mt76/mt76.h | 20 ++- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 1 + drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 1 + drivers/net/wireless/mediatek/mt76/mt7996/main.c | 1 + drivers/net/wireless/mediatek/mt76/scan.c | 153 ++++++++++++++++++++++ 8 files changed, 189 insertions(+), 11 deletions(-) commit 387ab042ace875a7386c6a76aa85a3aa36be9d78 Author: Felix Fietkau Date: Mon Dec 30 20:42:02 2024 +0100 wifi: mt76: do not add wcid entries to sta poll list during MCU reset Fixes linked list management issues during restart, where sta entries can be recreated and reinitialized while still in the poll list, triggering kernel warnings. Link: https://patch.msgid.link/20241230194202.95065-14-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 12 ++++++++++++ drivers/net/wireless/mediatek/mt76/mt76.h | 1 + drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 7 +------ drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 12 ++---------- drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c | 6 +----- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 17 +++-------------- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 17 +++-------------- drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 17 +++-------------- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 17 +++-------------- 9 files changed, 29 insertions(+), 77 deletions(-) commit 13e2e9c6b348d337ffc75832dcccbae7ad4ef6eb Author: Felix Fietkau Date: Mon Dec 30 20:42:01 2024 +0100 wifi: mt76: mt7996: use mac80211 .sta_state op Allows adding stations before assoc, though they are not passed to the firmware yet at that point. Link: https://patch.msgid.link/20241230194202.95065-13-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/main.c | 89 +++++++++++++--------- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 6 +- drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 1 + drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 4 +- 4 files changed, 61 insertions(+), 39 deletions(-) commit cd043bbba6f9b71ebe0781d1bd2107565363c4b9 Author: Felix Fietkau Date: Mon Dec 30 20:42:00 2024 +0100 wifi: mt76: mt7915: fix omac index assignment after hardware reset Reset per-phy mac address slot mask in order to avoid leaking entries. Fixes: 8a55712d124f ("wifi: mt76: mt7915: enable full system reset support") Link: https://patch.msgid.link/20241230194202.95065-12-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 5 +++++ 1 file changed, 5 insertions(+) commit 9b60e2ae511c959024ecf6578b3fbe85cd06d7cc Author: Felix Fietkau Date: Mon Dec 30 20:41:59 2024 +0100 wifi: mt76: mt7915: firmware restart on devices with a second pcie link It seems that the firmware checks the register used for detecting matching PCIe links in order to figure out if a secondary PCIe link is enabled. Write the register again just before starting the firmware on hw reset, in order to fix an issue that left the second band unusable after restart. Fixes: 9093cfff72e3 ("mt76: mt7915: add support for using a secondary PCIe link for gen1") Link: https://patch.msgid.link/20241230194202.95065-11-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 2 ++ drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 1 + drivers/net/wireless/mediatek/mt76/mt7915/pci.c | 1 + 3 files changed, 4 insertions(+) commit e733647566ecbf7a261e583f49320855f0c33221 Author: Felix Fietkau Date: Mon Dec 30 20:41:58 2024 +0100 wifi: mt76: mt7915: hold dev->mutex while interacting with the thermal state Avoid issuing MCU calls during a hardware restart Link: https://patch.msgid.link/20241230194202.95065-10-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/init.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 82d6f1adfede540c6842173175c09b2bd3ebbe75 Author: Felix Fietkau Date: Mon Dec 30 20:41:57 2024 +0100 wifi: mt76: mt7915: ensure that only one sta entry is active per mac address When a client is roaming to a different AP interface, a duplicate wtbl entry can be created. This can lead to lost packets or aggregation issues until the old entry expires. In order to fix this issue, delete any conflicting entries from WTBL whenever a station is authorized. Link: https://patch.msgid.link/20241230194202.95065-9-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/main.c | 58 +++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) commit 228bc0e79c85269d36cc81e0288e95f2f9ba7ae1 Author: Felix Fietkau Date: Mon Dec 30 20:41:56 2024 +0100 wifi: mt76: only enable tx worker after setting the channel Avoids sending packets too early Fixes: 0b3be9d1d34e ("wifi: mt76: add separate tx scheduling queue for off-channel tx") Link: https://patch.msgid.link/20241230194202.95065-8-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1254c66356d1f424a413f31d2af499684f7a1be5 Author: Felix Fietkau Date: Mon Dec 30 20:41:55 2024 +0100 wifi: mt76: mt7915: decrease timeout for commonly issued MCU commands This allows faster recovery from firmware issues Link: https://patch.msgid.link/20241230194202.95065-7-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit e5243352a4a2ee5ab192772fdef9799068455fc5 Author: Felix Fietkau Date: Mon Dec 30 20:41:54 2024 +0100 wifi: mt76: mt7915: reduce the number of command retries The need to retry a command is really uncommon. Reduce the retries to 1 to speed up recovery from firmware issues. Link: https://patch.msgid.link/20241230194202.95065-6-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 858fd2a53877b2e8b1d991a5a861ac34a0f55ef8 Author: Felix Fietkau Date: Mon Dec 30 20:41:53 2024 +0100 wifi: mt76: mt7996: fix rx filter setting for bfee functionality Fix rx filter setting to prevent dropping NDPA frames. Without this change, bfee functionality may behave abnormally. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Link: https://patch.msgid.link/20241230194202.95065-5-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 87594d2b1a00c3e72d64e49b6203858fe8fc1876 Author: Felix Fietkau Date: Mon Dec 30 20:41:52 2024 +0100 wifi: mt76: mt7915: fix eifs value on older chipsets Use the default firmware values Link: https://patch.msgid.link/20241230194202.95065-4-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56465b6fd064eb19f3103581753334c5dabaf8da Author: Felix Fietkau Date: Mon Dec 30 20:41:51 2024 +0100 wifi: mt76: mt7915: fix slot time for 5/6GHz It should only be set to 20 for long slot time on 2.4 GHz Link: https://patch.msgid.link/20241230194202.95065-3-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6ae0eab1bf0a07dfd52a73d0cb4da2b1187dd6c6 Author: Felix Fietkau Date: Mon Dec 30 20:41:50 2024 +0100 wifi: mt76: mt7996: remove phy->monitor_vif It is unused Link: https://patch.msgid.link/20241230194202.95065-2-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/main.c | 8 -------- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 2 -- 2 files changed, 10 deletions(-) commit 7cac2827b2737e0fbebcc443b7644664d250d8ba Author: Felix Fietkau Date: Mon Dec 30 20:41:49 2024 +0100 wifi: mt76: remove mt76_calculate_default_rate() It is only used in mt76_connac2_mac_tx_rate_val, inline it there. Link: https://patch.msgid.link/20241230194202.95065-1-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 24 ---------------------- drivers/net/wireless/mediatek/mt76/mt76.h | 2 -- .../net/wireless/mediatek/mt76/mt76_connac_mac.c | 14 ++++++++++++- 3 files changed, 13 insertions(+), 27 deletions(-) commit 47d9a8ba1d7f31c674b6936b3c34ee934aa9b420 Author: Nick Morrow Date: Thu Dec 19 08:12:14 2024 -0600 wifi: mt76: mt7921u: Add VID/PID for TP-Link TXE50UH Add VID/PID 35bc/0107 for recently released TP-Link TXE50UH USB WiFi adapter. Tested-by: Shang Chieh Tseng Signed-off-by: Nick Morrow Cc: stable@vger.kernel.org Link: https://patch.msgid.link/e797f105-9ca8-41e9-96de-7d25dec09943@gmail.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 3 +++ 1 file changed, 3 insertions(+) commit 8ad8b8c2dc87fc3d34921330827914c7f2d74466 Author: Zhang Kunbo Date: Wed Dec 18 07:45:52 2024 +0000 wifi: mt76: mt7925: replace zero-length array with flexible-array member The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last, which is beneficial to cultivate a high-quality code.[2] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Zhang Kunbo Link: https://patch.msgid.link/20241218074552.3271542-1-zhangkunbo@huawei.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5190594bcec2221fbc66638789546c681efe82de Author: Allan Wang Date: Mon Dec 9 15:09:22 2024 +0800 wifi: mt76: mt7921: 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/20241209070922.28106-1-allan.wang@mediatek.com Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 2 ++ drivers/net/wireless/mediatek/mt76/mt7921/main.c | 18 ++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 21 +++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7921/mcu.h | 5 +++++ drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 4 ++++ drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 4 ++++ drivers/net/wireless/mediatek/mt76/mt792x.h | 1 + 7 files changed, 55 insertions(+) commit 8aa2f59260eb66fc80378c158922ccb741ccc491 Author: Leon Yen Date: Thu Nov 7 14:14:40 2024 +0800 wifi: mt76: mt7921: introduce CSA support Add CSA (Channel Switch Announcement) related implementation in collaboration with mac80211 to deal with dynamic channel switching. Signed-off-by: Leon Yen Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20241107061440.6545-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/main.c | 98 ++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 1 + drivers/net/wireless/mediatek/mt76/mt792x.h | 6 ++ drivers/net/wireless/mediatek/mt76/mt792x_core.c | 14 ++++ 4 files changed, 119 insertions(+) commit efeaabc5680c16e72f87888d0c8557b8a84a08f2 Author: Michael Lo Date: Wed Nov 6 09:32:21 2024 +0800 wifi: mt76: mt7925: config the dwell time by firmware To optimize the scan time of mt7925, remove the dwell time setting for the scan command and let it be controlled by the firmware as mt7921. Signed-off-by: Michael Lo Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20241106013221.18101-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 50f64e4253c57fb6de2a30a693ac7cd73711c3d4 Author: Quan Zhou Date: Fri Nov 8 20:59:40 2024 +0800 wifi: mt76: do not hold queue lock during initial rx buffer alloc In dma init or reset scene, full buffer is needed for all rx rings. Since this is very time consuming, split the function to perform initial allocation without holding the spinlock. This avoids causing excessive scheduler latency. Signed-off-by: Quan Zhou Reviewed-by: Shayne Chen Reviewed-by: Deren Wu Link: https://patch.msgid.link/57c68a7ce1dd9022fa5e06af2c53d6313f30ec83.1731069062.git.quan.zhou@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/dma.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 349460913a4d029cc37c9e3817b1903233b4a627 Author: Ming Yen Hsieh Date: Tue Dec 10 17:19:26 2024 -0800 wifi: mt76: mt7925: Properly handle responses for commands with events Properly retrieve the response for commands with events. Ensure accurate handling of event-driven commands. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Ming Yen Hsieh Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-17-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/main.c | 1 - drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) commit 816161051a039eeb1226fc85e2b38389f508906c Author: Ming Yen Hsieh Date: Tue Dec 10 17:19:25 2024 -0800 wifi: mt76: mt7925: Cleanup MLO settings post-disconnection Clean up MLO settings after disconnection. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Ming Yen Hsieh Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-16-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/main.c | 37 ++++++++++++++++++++++-- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 4 +-- drivers/net/wireless/mediatek/mt76/mt7925/mcu.h | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) commit eb2a9a12c6092a26f632468d6610497d4f0e40da Author: Ming Yen Hsieh Date: Tue Dec 10 17:19:24 2024 -0800 wifi: mt76: mt7925: Update mt7925_mcu_uni_[tx,rx]_ba for MLO Update mt7925_mcu_uni_[tx,rx]_ba for MLO support in firmware. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Ming Yen Hsieh Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-15-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/main.c | 10 ++--- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 50 ++++++++++++++++++---- drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h | 2 + 3 files changed, 48 insertions(+), 14 deletions(-) commit 28045ef2bc5bbeec4717da98bf31aca0faaccf02 Author: Ming Yen Hsieh Date: Tue Dec 10 17:19:23 2024 -0800 wifi: mt76: mt7925: Init secondary link PM state Initialize secondary link PM state. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Ming Yen Hsieh Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-14-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/main.c | 2 ++ 1 file changed, 2 insertions(+) commit 8dafab9c4116a6a4fd870be03a3d9b66771dc5a8 Author: Ming Yen Hsieh Date: Tue Dec 10 17:19:22 2024 -0800 wifi: mt76: mt7925: Update secondary link PS flow Update the power-saving flow for secondary links. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Ming Yen Hsieh Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-13-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/main.c | 7 +++++++ drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 25 +++++++----------------- drivers/net/wireless/mediatek/mt76/mt7925/mcu.h | 3 +++ drivers/net/wireless/mediatek/mt76/mt792x.h | 7 +++++-- 4 files changed, 22 insertions(+), 20 deletions(-) commit 30b721467c9c2510e26af6e78e92d7cc08a14bc4 Author: Ming Yen Hsieh Date: Tue Dec 10 17:19:21 2024 -0800 wifi: mt76: mt7925: Update mt7925_unassign_vif_chanctx for per-link BSS Update mt7925_unassign_vif_chanctx to support per-link BSS. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Ming Yen Hsieh Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-12-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 90c10286b176421068b136da51ed83059a68e322 Author: Ming Yen Hsieh Date: Tue Dec 10 17:19:20 2024 -0800 wifi: mt76: mt7925: Update mt792x_rx_get_wcid for per-link STA Update mt792x_rx_get_wcid to support per-link STA. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Ming Yen Hsieh Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-11-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt792x_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e02f6ed6a49577e29e0b1f7900fad3ed8ae870c Author: Ming Yen Hsieh Date: Tue Dec 10 17:19:19 2024 -0800 wifi: mt76: mt7925: Update mt7925_mcu_sta_update for BC in ASSOC state Update mt7925_mcu_sta_update for broadcast (BC) in the ASSOC state. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Ming Yen Hsieh Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-10-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e6803d39a8aa59e557402a541a97ee04b06c49b2 Author: Ming Yen Hsieh Date: Tue Dec 10 17:19:18 2024 -0800 wifi: mt76: Enhance mt7925_mac_link_sta_add to support MLO Enhance mt7925_mac_link_sta_add to support MLO. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Ming Yen Hsieh Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-9-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/main.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit ac03e5b82bc6b44e8ea3e7c7c624ee1445ff4e4b Author: Ming Yen Hsieh Date: Tue Dec 10 17:19:17 2024 -0800 wifi: mt76: mt7925: Enhance mt7925_mac_link_bss_add to support MLO In mt7925_mac_link_bss_add(), the mt76_connac_mcu_uni_add_dev() function must be executed only after all parameters have been properly initialized. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Ming Yen Hsieh Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-8-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/main.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 4a596010b246816d7589d8d775b83833a59e63f9 Author: Leon Yen Date: Tue Dec 10 17:19:16 2024 -0800 wifi: mt76: mt7925: Fix CNM Timeout with Single Active Link in MLO Fix CNM command timeout issue when only a single active link is available during MLO connection to fix the following kernel log error. [ 741.931030] wlan0: [link 1] local address be:90:e0:22:c4:22, AP link address 08:0c:43:7a:19:2a [ 741.931042] wlan0: [link 1] determined AP 08:0c:43:7a:19:2a to be EHT [ 741.931052] wlan0: [link 1] connecting with EHT mode, max bandwidth 160 MHz [ 741.931071] wlan0: WMM AC=0 acm=0 aifs=2 cWmin=3 cWmax=7 txop=47 uapsd=0, downgraded=0 [ 741.931076] wlan0: WMM AC=1 acm=0 aifs=2 cWmin=7 cWmax=15 txop=94 uapsd=0, downgraded=0 [ 741.931080] wlan0: WMM AC=2 acm=0 aifs=3 cWmin=15 cWmax=1023 txop=0 uapsd=0, downgraded=0 [ 741.931085] wlan0: WMM AC=3 acm=0 aifs=7 cWmin=15 cWmax=1023 txop=0 uapsd=0, downgraded=0 [ 741.931095] wlan0: moving STA 22:0c:43:7a:19:2a to state 3 [ 749.090928] mt7925e 0000:2b:00.0: Message 00020002 (seq 15) timeout [ 752.162972] mt7925e 0000:2b:00.0: Message 00020003 (seq 1) timeout [ 755.234975] mt7925e 0000:2b:00.0: Message 00020002 (seq 2) timeout [ 758.306971] mt7925e 0000:2b:00.0: Message 00020004 (seq 3) timeout Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Leon Yen Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-7-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3f0d2178aaf1ed1c017e61cde9ce8a4432c804d1 Author: Ming Yen Hsieh Date: Tue Dec 10 17:19:15 2024 -0800 wifi: mt76: mt7925: fix wrong parameter for related cmd of chan info Fix incorrect parameters for the related channel information command. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Ming Yen Hsieh Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-6-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit 4f741a2378b27a6be5e63b829cae4eb9cf2484e7 Author: allan.wang Date: Tue Dec 10 17:19:14 2024 -0800 wifi: mt76: mt7925: Fix incorrect WCID phy_idx assignment Fix incorrect WCID phy_idx assignment. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: allan.wang Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-5-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4911e4cb157cf87d5bdb3fa8e0c200032443371e Author: Ming Yen Hsieh Date: Tue Dec 10 17:19:12 2024 -0800 wifi: mt76: mt7925: Fix incorrect WCID assignment for MLO For MLO, each link must have a corresponding WCID. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Ming Yen Hsieh Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-3-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7925/main.c | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) commit 4d5427443595439c6cf5edfd9fb7224589f65b27 Author: Ming Yen Hsieh Date: Tue Dec 10 17:19:11 2024 -0800 wifi: mt76: mt7925: Fix incorrect MLD address in bss_mld_tlv for MLO support For this TLV, the address should be set to the MLD address rather than the link address. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Ming Yen Hsieh Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-2-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9e4c3a007f01f567f2a8af35decd1e3c1c151c0f Author: Sean Wang Date: Tue Dec 10 17:19:10 2024 -0800 wifi: mt76: connac: Extend mt76_connac_mcu_uni_add_dev for MLO This commit extends the `mt76_connac_mcu_uni_add_dev` function to include support for Multi-Link Operation (MLO). Additionally, backward compatibility for MT7921 is preserved, enabling seamless integration with existing setups. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Sean Wang Link: https://patch.msgid.link/20241211011926.5002-1-sean.wang@kernel.org Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 1 + drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 1 + drivers/net/wireless/mediatek/mt76/mt7921/main.c | 1 + drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 4 +++- drivers/net/wireless/mediatek/mt76/mt7925/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt792x_core.c | 3 ++- 8 files changed, 11 insertions(+), 5 deletions(-) commit 1e232a9fb1937f6f8d6846845f34f7d0bb799084 Author: Chad Monroe Date: Tue Nov 26 20:40:49 2024 +0000 wifi: mt76: mt7996: exclude tx backoff time from airtime This helps to make STA airtime counters more accurate. Signed-off-by: Chad Monroe Suggested-by: Ryder Lee Link: https://patch.msgid.link/88821d8f08e2715927939b35e630a06171962636.1732653612.git.chad@monroe.io Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/init.c | 4 ++++ drivers/net/wireless/mediatek/mt76/mt7996/regs.h | 3 +++ 2 files changed, 7 insertions(+) commit c693723bb5dba0f04c3e75703c91f733a0a637c8 Author: Chad Monroe Date: Tue Nov 26 04:52:58 2024 +0000 wifi: mt76: mt7915: exclude tx backoff time from airtime This helps to make STA airtime counters more accurate. Signed-off-by: Chad Monroe Suggested-by: Ryder Lee Link: https://patch.msgid.link/026380cec180261956b983cbdb009605867bcd8d.1732596478.git.chad@monroe.io Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/init.c | 9 +++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 9 +++++++-- drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 2 ++ drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 7 +++++++ 4 files changed, 25 insertions(+), 2 deletions(-) commit 64d571742b0ae44eee5efd51e2d4a09d7f6782fc Author: xueqin Luo Date: Mon Dec 2 11:19:17 2024 +0800 wifi: mt76: mt7915: fix overflows seen when writing limit attributes DIV_ROUND_CLOSEST() after kstrtoul() results in an overflow if a large number such as 18446744073709551615 is provided by the user. Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations. This commit was inspired by commit: 57ee12b6c514. Fixes: 02ee68b95d81 ("mt76: mt7915: add control knobs for thermal throttling") Signed-off-by: xueqin Luo Link: https://patch.msgid.link/20241202031917.23741-3-luoxueqin@kylinos.cn Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5adbc8ce5bbe7e311e2600b7d7d998a958873e98 Author: xueqin Luo Date: Mon Dec 2 11:19:16 2024 +0800 wifi: mt76: mt7996: fix overflows seen when writing limit attributes DIV_ROUND_CLOSEST() after kstrtoul() results in an overflow if a large number such as 18446744073709551615 is provided by the user. Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations. This commit was inspired by commit: 57ee12b6c514. Fixes: 6879b2e94172 ("wifi: mt76: mt7996: add thermal sensor device support") Signed-off-by: xueqin Luo Link: https://patch.msgid.link/20241202031917.23741-2-luoxueqin@kylinos.cn Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 113d469e7e23579a64b0fbb2eadf9228763092be Author: Ming Yen Hsieh Date: Thu Nov 7 13:30:05 2024 +0800 wifi: mt76: mt7925: fix the invalid ip address for arp offload The wrong ieee80211_vif will lead to get invalid ip address and the correct ieee80211_vif can be obtained from ieee80211_bss_conf. Fixes: 147324292979 ("wifi: mt76: mt7925: add link handling in the BSS_CHANGED_ARP_FILTER handler") Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20241107053005.10558-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4d264f31b3074d361f65702dd7969861bcf1c158 Author: Ming Yen Hsieh Date: Mon Nov 4 13:14:47 2024 +0800 wifi: mt76: mt7925: fix get wrong chip cap from incorrect pointer Use tlv instead of skb, because using skb will get valid data with wrong offset. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20241104051447.4286-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85bb7c10c1a013ab29d4be07559105dd843c6f7d Author: Eric-SY Chang Date: Fri Nov 1 15:43:40 2024 +0800 wifi: mt76: mt7925: fix wrong band_idx setting when enable sniffer mode Currently, sniffer mode does not support band auto, so set band_idx to the default 0. Fixes: 0cb349d742d1 ("wifi: mt76: mt7925: update mt7925_mac_link_bss_add for MLO") Signed-off-by: Eric-SY Chang Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20241101074340.26176-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 5cd0bd815c8a48862a296df9b30e0ea0da14acd3 Author: Charles Han Date: Fri Oct 25 15:55:54 2024 +0800 wifi: mt76: mt7925: fix NULL deref check in mt7925_change_vif_links In mt7925_change_vif_links() devm_kzalloc() may return NULL but this returned value is not checked. Fixes: 69acd6d910b0 ("wifi: mt76: mt7925: add mt7925_change_vif_links") Signed-off-by: Charles Han Link: https://patch.msgid.link/20241025075554.181572-1-hanchunchao@inspur.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/main.c | 2 ++ 1 file changed, 2 insertions(+) commit 6d18b668301e0a7d924a6c821b84516bc08bdafe Author: Allan Wang Date: Wed Oct 16 18:10:17 2024 +0800 wifi: mt76: introduce mt792x_config_mac_addr_list routine Add mt792x_config_mac_addr_list routine in order to set the mac address list supported by the driver. Initialize wiphy->addresses/n_addresses for mt792x driver Signed-off-by: Hao Zhang Signed-off-by: Leon Yen Signed-off-by: Allan Wang Link: https://patch.msgid.link/20241016101017.19598-1-allan.wang@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/init.c | 1 + drivers/net/wireless/mediatek/mt76/mt7925/init.c | 1 + drivers/net/wireless/mediatek/mt76/mt792x.h | 3 +++ drivers/net/wireless/mediatek/mt76/mt792x_core.c | 22 ++++++++++++++++++++++ 4 files changed, 27 insertions(+) commit 57af267d2b8f5d88485c6372761386d79c5e6a1a Author: Shayne Chen Date: Thu Oct 10 10:38:16 2024 +0200 wifi: mt76: mt7915: add module param to select 5 GHz or 6 GHz on MT7916 Due to a limitation in available memory, the MT7916 firmware can only handle either 5 GHz or 6 GHz at a time. It does not support runtime switching without a full restart. On older firmware, this accidentally worked to some degree due to missing checks, but couldn't be supported properly, because it left the 6 GHz channels uncalibrated. Newer firmware refuses to start on either band if the passed EEPROM data indicates support for both. Deal with this limitation by using a module parameter to specify the preferred band in case both are supported. Fixes: b4d093e321bd ("mt76: mt7915: add 6 GHz support") Cc: stable@vger.kernel.org Signed-off-by: Shayne Chen Link: https://patch.msgid.link/20241010083816.51880-1-nbd@nbd.name Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c | 21 +++++++++++++++++++-- drivers/net/wireless/mediatek/mt76/mt7915/init.c | 4 ++-- 2 files changed, 21 insertions(+), 4 deletions(-) commit 126a516fe30639708e759678bcb10178938cc718 Author: Christophe JAILLET Date: Sun Sep 29 21:53:40 2024 +0200 wifi: mt76: mt7915: Fix an error handling path in mt7915_add_interface() If mt76_wcid_alloc() fails, the "mt76.mutex" mutex needs to be released as done in the other error handling paths of mt7915_add_interface(). Fixes: f3049b88b2b3 ("wifi: mt76: mt7915: allocate vif wcid in the same range as stations") Signed-off-by: Christophe JAILLET Link: https://patch.msgid.link/b9d8fbfc19360bfe60b9cea1cb0f735ab3b4bc26.1727639596.git.christophe.jaillet@wanadoo.fr Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit aa566ac6b7272e7ea5359cb682bdca36d2fc7e73 Author: Michael Lo Date: Thu Aug 1 10:43:35 2024 +0800 wifi: mt76: mt7921: fix using incorrect group cipher after disconnection. To avoid incorrect cipher after disconnection, we should do the key deletion process in this case. Fixes: e6db67fa871d ("wifi: mt76: ignore key disable commands") Signed-off-by: Michael Lo Signed-off-by: Ming Yen Hsieh Tested-by: David Ruth Reviewed-by: David Ruth Link: https://patch.msgid.link/20240801024335.12981-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f1b1e133a770fcdbd89551651232b034d2f7a27a Author: WangYuli Date: Mon Jan 13 15:02:41 2025 +0800 wifi: mt76: mt76u_vendor_request: Do not print error messages when -EPROTO When initializing the network card, unplugging the device will trigger an -EPROTO error, resulting in a flood of error messages being printed frantically. The exception is printed as follows: mt76x2u 2-2.4:1.0: vendor request req:47 off:9018 failed:-71 mt76x2u 2-2.4:1.0: vendor request req:47 off:9018 failed:-71 ... It will continue to print more than 2000 times for about 5 minutes, causing the usb device to be unable to be disconnected. During this period, the usb port cannot recognize the new device because the old device has not disconnected. There may be other operating methods that cause -EPROTO, but -EPROTO is a low-level hardware error. It is unwise to repeat vendor requests expecting to read correct data. It is a better choice to treat -EPROTO and -ENODEV the same way. Similar to commit 9b0f100c1970 ("mt76: usb: process URBs with status EPROTO properly") do no schedule rx_worker for urb marked with status set -EPROTO. I also reproduced this situation when plugging and unplugging the device, and this patch is effective. Just do not vendor request again for urb marked with status set -EPROTO. Link: https://lore.kernel.org/all/531681bd-30f5-4a70-a156-bf8754b8e072@intel.com/ Link: https://lore.kernel.org/all/D4B9CC1FFC0CBAC3+20250105040607.154706-1-wangyuli@uniontech.com/ Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer") Co-developed-by: Xu Rao Signed-off-by: Xu Rao Signed-off-by: WangYuli Link: https://patch.msgid.link/9DD7DE7AAB497CB7+20250113070241.63590-1-wangyuli@uniontech.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 94467a2274238cf52729ddc7b56c372c35a740c4 Merge: cef4f1b5ba99 829356da700b Author: Linus Walleij Date: Tue Jan 14 13:30:36 2025 +0100 Merge tag 'renesas-pinctrl-for-v6.14-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v6.14 (take two) - Add support for alpha-numerical port references on the RZ/V2H SoC, - Add support for the RZ/G3E (R9A09G047) Soc. Signed-off-by: Linus Walleij commit a9ff94477836cb43d94efbd9a851213944800177 Author: Dmitry Baryshkov Date: Tue Jan 14 12:54:52 2025 +0100 ARM: 9433/2: implement cacheinfo support On ARMv7 / v7m machines read CTR and CLIDR registers to provide information regarding the cache topology. Earlier machines should describe full cache topology in the device tree. Note, this follows the ARM64 cacheinfo support and provides only minimal support required to bootstrap cache info. All useful properties should be decribed in Device Tree. Reviewed-by: Linus Walleij Signed-off-by: Dmitry Baryshkov Signed-off-by: Russell King (Oracle) arch/arm/Kconfig | 1 + arch/arm/include/asm/cache.h | 6 ++ arch/arm/kernel/Makefile | 1 + arch/arm/kernel/cacheinfo.c | 173 +++++++++++++++++++++++++++++++++++++++++++ include/linux/cacheinfo.h | 2 +- 5 files changed, 182 insertions(+), 1 deletion(-) commit 961d234779867695a7724fd4fb0a5a1bd3d4ccab Author: Dmitry Baryshkov Date: Tue Jan 14 12:54:19 2025 +0100 ARM: 9432/2: add CLIDR accessor functions Add functions to read the CLIDR, Cache Level ID Register. Reviewed-by: Linus Walleij Signed-off-by: Dmitry Baryshkov Signed-off-by: Russell King (Oracle) arch/arm/include/asm/cachetype.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 50867db066cda563902c9c203dc8f9b5a11c1e78 Author: Ard Biesheuvel Date: Thu Dec 5 14:30:52 2024 +0100 ARM: 9438/1: assembler: Drop obsolete VFP accessor fallback Now that the minimum supported binutils version is 2.25, we no longer need a workaround for binutils older than 2.24 for accessing VFP control registers from assembler. Reviewed-by: Linus Walleij Reviewed-by: Nathan Chancellor Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King (Oracle) arch/arm/Kconfig | 2 -- arch/arm/Kconfig.assembler | 6 ------ arch/arm/include/asm/vfp.h | 10 ---------- arch/arm/include/asm/vfpmacros.h | 11 ----------- arch/arm/vfp/vfpinstr.h | 22 ---------------------- 5 files changed, 51 deletions(-) commit 386f2d9d57b6f7669e5070654852807eed249450 Author: luoyifan Date: Mon Nov 25 04:14:52 2024 +0100 ARM: 9437/1: vfp: Fix typographical errors in vfpmodule.c Correct the misspellings of "noftify" (should be "notify") and "swtich" (should be "switch"). Link: https://lore.kernel.org/r/20241114011939.296230-1-luoyifan@cmss.chinamobile.com Signed-off-by: Luo Yifan Reviewed-by: Linus Walleij Signed-off-by: Russell King (Oracle) arch/arm/vfp/vfpmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c61a3d8f7a8cf0f0cbdc8459dd86782ba7285f1 Author: David Woodhouse Date: Thu Jan 9 14:04:21 2025 +0000 x86/kexec: Use typedef for relocate_kernel_fn function prototype Both i386 and x86_64 now copy the relocate_kernel() function into the control page and execute it from there, using an open-coded function pointer. Use a typedef for it instead. [ bp: Put relocate_kernel_ptr ptr arithmetic on a single line. ] Signed-off-by: David Woodhouse Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20250109140757.2841269-10-dwmw2@infradead.org arch/x86/include/asm/kexec.h | 26 +++++++++++++------------- arch/x86/kernel/machine_kexec_32.c | 7 +------ arch/x86/kernel/machine_kexec_64.c | 9 ++------- 3 files changed, 16 insertions(+), 26 deletions(-) commit e536057543791fbfa0d979f4e782933ea312c38c Author: David Woodhouse Date: Thu Jan 9 14:04:20 2025 +0000 x86/kexec: Cope with relocate_kernel() not being at the start of the page A few places in the kexec control code page make the assumption that the first instruction of relocate_kernel is at the very start of the page. To allow for Clang CFI information to be added to relocate_kernel(), as well as the general principle of removing unwarranted assumptions, fix them to use the external __relocate_kernel_start symbol that the linker adds. This means using a separate addq and subq for calculating offsets, as the assembler can no longer calculate the delta directly for itself and relocations aren't that versatile. But those values can at least be used relative to a local label to avoid absolute relocations. Turn the jump from relocate_kernel() to identity_mapped() into a real indirect 'jmp *%rsi' too, while touching it. There was no real reason for it to be a push+ret in the first place, and adding Clang CFI info will also give objtool enough visibility to start complaining 'return with modified stack frame' about it. [ bp: Massage commit message. ] Signed-off-by: David Woodhouse Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20250109140757.2841269-9-dwmw2@infradead.org arch/x86/kernel/relocate_kernel_64.S | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit dc6ffa6cd52d2cd8fa25b25e42c80faf17f5fe33 Author: Rafael J. Wysocki Date: Thu Jan 9 14:04:19 2025 +0000 kexec_core: Add and update comments regarding the KEXEC_JUMP flow The KEXEC_JUMP flow is analogous to hibernation flows occurring before and after creating an image and before and after jumping from the restore kernel to the image one, which is why it uses the same device callbacks as those hibernation flows. Add comments explaining that to the code in question and update an existing comment in it which appears a bit out of context. No functional changes. Signed-off-by: Rafael J. Wysocki Signed-off-by: David Woodhouse Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20250109140757.2841269-8-dwmw2@infradead.org kernel/kexec_core.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 2114796ca041f0d3e79e5dd165219b940b23c540 Author: David Woodhouse Date: Thu Jan 9 14:04:18 2025 +0000 x86/kexec: Mark machine_kexec() with __nocfi A recent commit caused the relocate_kernel() function to be invoked through a function pointer, but it does not have CFI information. The resulting trap occurs after the IDT and GDT have been invalidated, leading to a triple-fault if CONFIG_CFI_CLANG is enabled. Using SYM_TYPED_FUNC_START() to provide the CFI information looks like it will require a prolonged battle with objtool. And is fairly pointless anyway, as the actual signature comes from a __kcfi_typeid_… symbol emitted from the C code based on the function prototype it thinks that relocate_kernel has, rendering the check somewhat tautological. The simple fix is just to mark machine_kexec() with __nocfi. Fixes: eeebbde57113 ("x86/kexec: Invoke copy of relocate_kernel() instead of the original") Reported-by: Nathan Chancellor Suggested-by: Nathan Chancellor Signed-off-by: David Woodhouse Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20250109140757.2841269-7-dwmw2@infradead.org arch/x86/kernel/machine_kexec_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d06905d686107c8343ff71aa4f3c881cc0a9a7b9 Author: Wolfram Sang Date: Thu Jan 9 13:21:10 2025 +0100 i2c: add core-managed per-client directory in debugfs More and more I2C client drivers use debugfs entries and currently they need to manage a subdir for their files on their own. This means inconsistent naming for these subdirs and they are scattered all over the debugfs-tree as well. Not to mention the duplicated code. Let the I2C core provide and maintain a proper directory per client. Note: It was considered to save the additional pointer in 'struct i2c_client' and only provide a subdir when requested via a helper function. When sketching this approach, more and more corner cases appeared, though, so the current solution with its simple and unabiguous code was chosen. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck drivers/i2c/i2c-core-base.c | 4 ++++ include/linux/i2c.h | 1 + 2 files changed, 5 insertions(+) commit bfd74cd1fbc026f04446e67d6915c7e199c2bffd Author: Randolph Ha Date: Mon Jan 13 14:52:37 2025 -0500 i2c: Force ELAN06FA touchpad I2C bus freq to 100KHz When a 400KHz freq is used on this model of ELAN touchpad in Linux, excessive smoothing (similar to when the touchpad's firmware detects a noisy signal) is sometimes applied. As some devices' (e.g, Lenovo V15 G4) ACPI tables specify a 400KHz frequency for this device and some I2C busses (e.g, Designware I2C) default to a 400KHz freq, force the speed to 100KHz as a workaround. For future investigation: This problem may be related to the default HCNT/LCNT values given by some busses' drivers, because they are not specified in the aforementioned devices' ACPI tables, and because the device works without issues on Windows at what is expected to be a 400KHz frequency. The root cause of the issue is not known. Signed-off-by: Randolph Ha Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-acpi.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit b31addf2a08bc5c16dfd6eae8785546f3eea92b8 Author: Lad Prabhakar Date: Mon Jan 13 12:26:42 2025 +0000 i2c: riic: Add `riic_bus_barrier()` to check bus availability Introduce a new `riic_bus_barrier()` function to verify bus availability before initiating an I2C transfer. This function enhances the bus arbitration check by ensuring that the SDA and SCL lines are not held low, in addition to checking the BBSY flag using `readb_poll_timeout()`. Previously, only the BBSY flag was checked to determine bus availability. However, it is possible for the SDA line to remain low even when BBSY = 0. This new implementation performs an additional check on the SDA and SCL lines to avoid potential bus contention issues. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Tested-by: Claudiu Beznea Reviewed-by: Claudiu Beznea Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-riic.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) commit 385bb1c2678b59db201831255b524a6d7f7a25ff Author: Lad Prabhakar Date: Mon Jan 13 12:26:41 2025 +0000 i2c: riic: Use predefined macro and simplify clock tick calculation Replace the hardcoded `1000000000` with the predefined `NSEC_PER_SEC` macro for clarity. Simplify the code by introducing a `ns_per_tick` variable to store `NSEC_PER_SEC / rate`, reducing redundancy and improving readability. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Wolfram Sang Reviewed-by: Wolfram Sang Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-riic.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 9ae0e7f77cfb638c3cd4198ad1ce7a3bce9a5c2a Author: Lad Prabhakar Date: Mon Jan 13 12:26:40 2025 +0000 i2c: riic: Mark riic_irqs array as const The riic_irqs array describes the supported IRQs by the RIIC driver and does not change at runtime. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Wolfram Sang Tested-by: Claudiu Beznea Reviewed-by: Claudiu Beznea Reviewed-by: Wolfram Sang Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-riic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d9e63c3aba479ec2f669cbc410754a2b1cf38fb Author: Lad Prabhakar Date: Mon Jan 13 12:26:39 2025 +0000 i2c: riic: Make use of devres helper to request deasserted reset line Simplify the `riic_i2c_probe()` function by using the `devm_reset_control_get_optional_exclusive_deasserted()` API to request a deasserted reset line. This eliminates the need to manually deassert the reset control and the additional cleanup. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Wolfram Sang Tested-by: Claudiu Beznea Reviewed-by: Claudiu Beznea Reviewed-by: Wolfram Sang Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-riic.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 72252162258c8a0b19d5bd0bb49fe20495898d6d Author: Lad Prabhakar Date: Mon Jan 13 12:26:38 2025 +0000 i2c: riic: Use GENMASK() macro for bitmask definitions Replace raw bitmask values with the `GENMASK()` macro in the `i2c-riic` driver to improve readability and maintain consistency. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Tested-by: Claudiu Beznea Reviewed-by: Claudiu Beznea Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-riic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0094d6b70d6b4eb5084e3b7dd99ebfc94d3ca58d Author: Lad Prabhakar Date: Mon Jan 13 12:26:37 2025 +0000 i2c: riic: Use BIT macro consistently Easier to read and ensures proper types. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Tested-by: Claudiu Beznea Reviewed-by: Claudiu Beznea Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-riic.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit 279c83db24552e83caa09347358473e633e56617 Author: Lad Prabhakar Date: Mon Jan 13 12:26:36 2025 +0000 i2c: riic: Use local `dev` pointer in `dev_err_probe()` Update the `riic_init_hw()` function to use the local `dev` pointer in calls to `dev_err_probe()`. Previously, `riic_init_hw()` used `riic->adapter.dev` in error reporting. Since this function is invoked during the probe phase, the I2C adapter is not yet initialized, leading to `(null) ...` being printed in error messages. This patch fixes the issue by consistently using the local `dev` pointer, which points to `riic->adapter.dev.parent`. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Tested-by: Claudiu Beznea Reviewed-by: Claudiu Beznea Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-riic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2aa2502e8067527e36dd7a3cad81b2004614a6c Author: Lad Prabhakar Date: Mon Jan 13 12:26:35 2025 +0000 i2c: riic: Use dev_err_probe in probe and riic_init_hw functions Refactor error handling in the riic_i2c_probe() and riic_init_hw() functions by replacing multiple dev_err() calls with dev_err_probe(). Additionally, update the riic_init_hw() function to use a local `dev` pointer instead of `riic->adapter.dev` for dev_err_probe(), as the I2C adapter is not initialized at this stage. Drop the cast to (unsigned long) in the riic_init_hw() function when printing the bus frequency, and update the error message to display the frequency in Hz, improving clarity. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Tested-by: Claudiu Beznea Reviewed-by: Claudiu Beznea Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-riic.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 76dc16296124ec478ec9ac011f0b9b52462c88d5 Author: Lad Prabhakar Date: Mon Jan 13 12:26:34 2025 +0000 i2c: riic: Introduce a separate variable for IRQ Refactor the IRQ handling in riic_i2c_probe by introducing a local variable `irq` to store IRQ numbers instead of assigning them to `ret`. This change improves code readability and clarity. Suggested-by: Andy Shevchenko Signed-off-by: Lad Prabhakar Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-riic.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit eeed9150411a63dd0611490cf31fdae681427918 Author: Nathan Chancellor Date: Thu Jan 9 14:04:17 2025 +0000 x86/kexec: Fix location of relocate_kernel with -ffunction-sections After commit cb33ff9e063c ("x86/kexec: Move relocate_kernel to kernel .data section"), kernels configured with an option that uses -ffunction-sections, such as CONFIG_LTO_CLANG, crash when kexecing because the value of relocate_kernel does not match the value of __relocate_kernel_start so incorrect code gets copied via machine_kexec_prepare(). $ llvm-nm good-vmlinux &| rg relocate_kernel ffffffff83280d41 T __relocate_kernel_end ffffffff83280b00 T __relocate_kernel_start ffffffff83280b00 T relocate_kernel $ llvm-nm bad-vmlinux &| rg relocate_kernel ffffffff83266100 D __relocate_kernel_end ffffffff83266100 D __relocate_kernel_start ffffffff8120b0d8 T relocate_kernel When -ffunction-sections is enabled, TEXT_MAIN matches on '.text.[0-9a-zA-Z_]*' to coalesce the function specific functions back into .text during link time after they have been optimized. Due to the placement of TEXT_TEXT before KEXEC_RELOCATE_KERNEL in the x86 linker script, the .text.relocate_kernel section ends up in .text instead of .data. Use a second dot in the relocate_kernel section name to avoid matching on TEXT_MAIN, which matches a similar situation that happened in commit 79cd2a11224e ("x86/retpoline,kprobes: Fix position of thunk sections with CONFIG_LTO_CLANG"), which allows kexec to function properly. While .data.relocate_kernel still ends up in the .data section via DATA_MAIN -> DATA_DATA, ensure it is located with the .text.relocate_kernel section as intended by performing the same transformation. Fixes: cb33ff9e063c ("x86/kexec: Move relocate_kernel to kernel .data section") Fixes: 8dbec5c77bc3 ("x86/kexec: Add data section to relocate_kernel") Signed-off-by: Nathan Chancellor Signed-off-by: David Woodhouse Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20250109140757.2841269-6-dwmw2@infradead.org arch/x86/kernel/relocate_kernel_64.S | 6 +++--- arch/x86/kernel/vmlinux.lds.S | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 2cacf7f23a024ab1fdc603ca6a4f4c8b2de9f64e Author: David Woodhouse Date: Thu Jan 9 14:04:16 2025 +0000 x86/kexec: Fix stack and handling of re-entry point for ::preserve_context A ::preserve_context kimage can be invoked more than once, and the entry point can be different every time. When the callee returns to the kernel, it leaves the address of its entry point for next time on the stack. That being the case, one might reasonably assume that the caller would allocate space for it on the stack frame before actually performing the 'call' into the callee. Apparently not, though. Ever since the kjump code was first added in 2009, it has set up a *new* stack at the top of the swap_page scratch page, then just performed the 'call' without allocating any space for the re-entry address to be returned. It then reads the re-entry point for next time from 0(%rsp) which is actually the first qword of the page *after* the swap page, which might not exist at all! And if the callee has written to that, then it will have corrupted memory it doesn't own. Correct this by pushing the entry point of the callee onto the stack before calling it. The callee may then adjust it, or not, as it sees fit, and subsequent invocations should work correctly either way. Remove a stray push of zero to the *relocate_kernel* stack, which may have been intended for this purpose, but which was actually just noise. Also, loading the stack for the callee relied on the address of the swap page being in %r10 without ever documenting that fact. Recent code changes made that no longer true, so load it directly from the local kexec_pa_swap_page variable instead. Fixes: b3adabae8a96 ("x86/kexec: Drop page_list argument from relocate_kernel()") Signed-off-by: David Woodhouse Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20250109140757.2841269-5-dwmw2@infradead.org arch/x86/kernel/relocate_kernel_64.S | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 85d724df8c82c060dcdeb8d0de0bd986e6c37b72 Author: David Woodhouse Date: Thu Jan 9 14:04:15 2025 +0000 x86/kexec: Use correct swap page in swap_pages function The swap_pages function expects the swap page to be in %r10, but there was no documentation to that effect. Once upon a time the setup code used to load its value from a kernel virtual address and save it to an address which is accessible in the identity-mapped page tables, and *happened* to use %r10 to do so, with no comment that it was left there on *purpose* instead of just being a scratch register. Once that was no longer necessary, %r10 just holds whatever the kernel happened to leave in it. Now that the original value passed by the kernel is accessible via %rip-relative addressing, load directly from there instead of using %r10 for it. But document the other parameters that the swap_pages function *does* expect in registers. Fixes: b3adabae8a96 ("x86/kexec: Drop page_list argument from relocate_kernel()") Signed-off-by: David Woodhouse Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20250109140757.2841269-4-dwmw2@infradead.org arch/x86/kernel/relocate_kernel_64.S | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4d5f1da98f5e94ecc39d6e7a990db2efe0ae3810 Author: David Woodhouse Date: Thu Jan 9 14:04:14 2025 +0000 x86/kexec: Ensure preserve_context flag is set on return to kernel The swap_pages() function will only actually *swap*, as its name implies, if the preserve_context flag in the %r11 register is non-zero. On the way back from a ::preserve_context kexec, ensure that the %r11 register is non-zero so that the pages get swapped back. Fixes: 9e5683e2d0b5 ("x86/kexec: Only swap pages for ::preserve_context mode") Signed-off-by: David Woodhouse Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20250109140757.2841269-3-dwmw2@infradead.org arch/x86/kernel/relocate_kernel_64.S | 1 + 1 file changed, 1 insertion(+) commit d144d8a65286fb4a9f06ca80dea6e02e7d846558 Author: David Woodhouse Date: Thu Jan 9 14:04:13 2025 +0000 x86/kexec: Disable global pages before writing to control page The kernel switches to a new set of page tables during kexec. The global mappings (_PAGE_GLOBAL==1) can remain in the TLB after this switch. This is generally not a problem because the new page tables use a different portion of the virtual address space than the normal kernel mappings. The critical exception to that generalisation (and the only mapping which isn't an identity mapping) is the kexec control page itself — which was ROX in the original kernel mapping, but should be RWX in the new page tables. If there is a global TLB entry for that in its prior read-only state, it definitely needs to be flushed before attempting to write through that virtual mapping. It would be possible to just avoid writing to the virtual address of the page and defer all writes until they can be done through the identity mapping. But there's no good reason to keep the old TLB entries around, as they can cause nothing but trouble. Clear the PGE bit in %cr4 early, before storing data in the control page. Fixes: 5a82223e0743 ("x86/kexec: Mark relocate_kernel page as ROX instead of RWX") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219592 Reported-by: Nathan Chancellor Reported-by: "Ning, Hongyu" Co-developed-by: Dave Hansen Signed-off-by: Dave Hansen Signed-off-by: David Woodhouse Signed-off-by: Borislav Petkov (AMD) Tested-by: Nathan Chancellor Tested-by: "Ning, Hongyu" Link: https://lore.kernel.org/r/20250109140757.2841269-2-dwmw2@infradead.org arch/x86/kernel/relocate_kernel_64.S | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit edc4ef0e0154096d6c0cf5e06af6fc330dbad9d1 Author: Zhu Yanjun Date: Fri Jan 10 17:09:27 2025 +0100 RDMA/rxe: Fix the warning "__rxe_cleanup+0x12c/0x170 [rdma_rxe]" The Call Trace is as below: " ? show_regs.cold+0x1a/0x1f ? __rxe_cleanup+0x12c/0x170 [rdma_rxe] ? __warn+0x84/0xd0 ? __rxe_cleanup+0x12c/0x170 [rdma_rxe] ? report_bug+0x105/0x180 ? handle_bug+0x46/0x80 ? exc_invalid_op+0x19/0x70 ? asm_exc_invalid_op+0x1b/0x20 ? __rxe_cleanup+0x12c/0x170 [rdma_rxe] ? __rxe_cleanup+0x124/0x170 [rdma_rxe] rxe_destroy_qp.cold+0x24/0x29 [rdma_rxe] ib_destroy_qp_user+0x118/0x190 [ib_core] rdma_destroy_qp.cold+0x43/0x5e [rdma_cm] rtrs_cq_qp_destroy.cold+0x1d/0x2b [rtrs_core] rtrs_srv_close_work.cold+0x1b/0x31 [rtrs_server] process_one_work+0x21d/0x3f0 worker_thread+0x4a/0x3c0 ? process_one_work+0x3f0/0x3f0 kthread+0xf0/0x120 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x22/0x30 " When too many rdma resources are allocated, rxe needs more time to handle these rdma resources. Sometimes with the current timeout, rxe can not release the rdma resources correctly. Compared with other rdma drivers, a bigger timeout is used. Fixes: 215d0a755e1b ("RDMA/rxe: Stop lookup of partially built objects") Signed-off-by: Zhu Yanjun Link: https://patch.msgid.link/20250110160927.55014-1-yanjun.zhu@linux.dev Tested-by: Joe Klein Signed-off-by: Leon Romanovsky drivers/infiniband/sw/rxe/rxe_pool.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 36f998de853cfad60508dfdfb41c9c40a2245f19 Author: Marc Zyngier Date: Sun Jan 12 16:50:29 2025 +0000 KVM: arm64: nv: Apply RESx settings to sysreg reset values While we have sanitisation in place for the guest sysregs, we lack that sanitisation out of reset. So some of the fields could be evaluated and not reflect their RESx status, which sounds like a very bad idea. Apply the RESx masks to the the sysreg file in two situations: - when going via a reset of the sysregs - after having computed the RESx masks Having this separate reset phase from the actual reset handling is a bit grotty, but we need to apply this after the ID registers are final. Tested-by: Joey Gouly Reviewed-by: Joey Gouly Link: https://lore.kernel.org/r/20250112165029.1181056-3-maz@kernel.org Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_nested.h | 2 +- arch/arm64/kvm/nested.c | 9 +++++++-- arch/arm64/kvm/sys_regs.c | 5 ++++- 3 files changed, 12 insertions(+), 4 deletions(-) commit 42e6ddda4c17fa0d5120e3723d522649f8fc62fa Author: Anumula Murali Mohan Reddy Date: Tue Jan 7 15:20:53 2025 +0530 RDMA/cxgb4: Notify rdma stack for IB_EVENT_QP_LAST_WQE_REACHED event This patch sends IB_EVENT_QP_LAST_WQE_REACHED event on a QP that is in error state and associated with an SRQ. This behaviour is incorporated in flush_qp() which is called when QP transitions to error state. Supports SRQ drain functionality added by commit 844bc12e6da3 ("IB/core: add support for draining Shared receive queues") Fixes: 844bc12e6da3 ("IB/core: add support for draining Shared receive queues") Signed-off-by: Anumula Murali Mohan Reddy Signed-off-by: Potnuri Bharat Teja Link: https://patch.msgid.link/20250107095053.81007-1-anumula@chelsio.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/cxgb4/qp.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c139b6d1b4d27724987af5071177fb5f3d60c1e4 Author: Marc Zyngier Date: Sun Jan 12 16:50:28 2025 +0000 KVM: arm64: nv: Always evaluate HCR_EL2 using sanitising accessors A lot of the NV code depends on HCR_EL2.{E2H,TGE}, and we assume in places that at least HCR_EL2.E2H is invariant for a given guest. However, we make a point in *not* using the sanitising accessor that would enforce this, and are at the mercy of the guest doing stupid things. Clearly, that's not good. Rework the HCR_EL2 accessors to use __vcpu_sys_reg() instead, guaranteeing that the RESx settings get applied, specially when HCR_EL2.E2H is evaluated. This results in fewer accessors overall. Huge thanks to Joey who spent a long time tracking this bug down. Reported-by: Joey Gouly Tested-by: Joey Gouly Reviewed-by: Joey Gouly Link: https://lore.kernel.org/r/20250112165029.1181056-2-maz@kernel.org Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_emulate.h | 36 +++++++++++++++--------------------- arch/arm64/kvm/hyp/vhe/sysreg-sr.c | 4 ++-- 2 files changed, 17 insertions(+), 23 deletions(-) commit 9264cd6aa8f194753507cb6e1f444141e7c79f48 Author: Kalesh AP Date: Thu Jan 9 10:18:13 2025 -0800 RDMA/bnxt_re: Allocate dev_attr information dynamically In order to optimize the size of driver private structure, the memory for dev_attr is allocated dynamically during the chip context initialization. In order to make certain runtime decisions, store dev_attr in the qplib_res structure. Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier Link: https://patch.msgid.link/1736446693-6692-3-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/bnxt_re/bnxt_re.h | 2 +- drivers/infiniband/hw/bnxt_re/hw_counters.c | 2 +- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 38 ++++++++++++++--------------- drivers/infiniband/hw/bnxt_re/main.c | 36 +++++++++++++++++---------- drivers/infiniband/hw/bnxt_re/qplib_res.c | 7 +++--- drivers/infiniband/hw/bnxt_re/qplib_res.h | 4 +-- drivers/infiniband/hw/bnxt_re/qplib_sp.c | 4 +-- drivers/infiniband/hw/bnxt_re/qplib_sp.h | 3 +-- 8 files changed, 51 insertions(+), 45 deletions(-) commit 57e6464c221c7ffaeae784bcaa8171ffac179d3e Author: Kalesh AP Date: Thu Jan 9 10:18:12 2025 -0800 RDMA/bnxt_re: Pass the context for ulp_irq_stop ulp_irq_stop() can be invoked from a context where FW is healthy or when FW is in a reset state. In the latter case, ULP must stop all interactions with HW/FW and also with application and stack. Added a new parameter to the ulp_irq_stop() function to achieve that. Reviewed-by: Vikas Gupta Reviewed-by: Michael Chan Reviewed-by: Chandramohan Akula Reviewed-by: Pavan Chebbi Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier Link: https://patch.msgid.link/1736446693-6692-2-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/bnxt_re/main.c | 12 +++++++++++- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 5 ++++- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) commit 2b1d9116b0df5e65e78b2962942fe12672e25773 Merge: 624d7a8a9d86 161087db66d6 Author: Paolo Abeni Date: Tue Jan 14 12:17:29 2025 +0100 Merge branch 'add-multicast-filtering-support-for-vlan-interface' MD Danish Anwar says: ==================== Add Multicast Filtering support for VLAN interface This series adds Multicast filtering support for VLAN interfaces in dual EMAC and HSR offload mode for ICSSG driver. Patch 1/4 - Adds support for VLAN in dual EMAC mode Patch 2/4 - Adds MC filtering support for VLAN in dual EMAC mode Patch 3/4 - Create and export hsr_get_port_ndev() in hsr_device.c Patch 4/4 - Adds MC filtering support for VLAN in HSR mode [1] https://lore.kernel.org/all/20241216100044.577489-2-danishanwar@ti.com/ [2] https://lore.kernel.org/all/202412210336.BmgcX3Td-lkp@intel.com/#t [3] https://lore.kernel.org/all/31bb8a3e-5a1c-4c94-8c33-c0dfd6d643fb@kernel.org/ v1 https://lore.kernel.org/all/20241216100044.577489-1-danishanwar@ti.com/ v2 https://lore.kernel.org/all/20241223092557.2077526-1-danishanwar@ti.com/ v3 https://lore.kernel.org/all/20250103092033.1533374-1-danishanwar@ti.com/ ==================== Link: https://patch.msgid.link/20250110082852.3899027-1-danishanwar@ti.com Signed-off-by: Paolo Abeni commit 161087db66d6bef11679640bc894d7bf62d2e431 Author: MD Danish Anwar Date: Fri Jan 10 13:58:52 2025 +0530 net: ti: icssg-prueth: Add Support for Multicast filtering with VLAN in HSR mode Add multicast filtering support for VLAN interfaces in HSR offload mode for ICSSG driver. The driver calls vlan_for_each() API on the hsr device's ndev to get the list of available vlans for the hsr device. The driver then sync mc addr of vlan interface with a locally mainatined list emac->vlan_mcast_list[vid] using __hw_addr_sync_multiple() API. The driver then calls the sync / unsync callbacks. In the sync / unsync call back, driver checks if the vdev's real dev is hsr device or not. If the real dev is hsr device, driver gets the per port device using hsr_get_port_ndev() and then driver passes appropriate vid to FDB helper functions. Signed-off-by: MD Danish Anwar Signed-off-by: Paolo Abeni drivers/net/ethernet/ti/icssg/icssg_prueth.c | 83 +++++++++++++++++++++------- drivers/net/ethernet/ti/icssg/icssg_prueth.h | 2 + 2 files changed, 66 insertions(+), 19 deletions(-) commit 9c10dd8eed74de9e8adeb820939f8745cd566d4a Author: MD Danish Anwar Date: Fri Jan 10 13:58:51 2025 +0530 net: hsr: Create and export hsr_get_port_ndev() Create an API to get the net_device to the slave port of HSR device. The API will take hsr net_device and enum hsr_port_type for which we want the net_device as arguments. This API can be used by client drivers who support HSR and want to get the net_devcie of slave ports from the hsr device. Export this API for the same. This API needs the enum hsr_port_type to be accessible by the drivers using hsr. Move the enum hsr_port_type from net/hsr/hsr_main.h to include/linux/if_hsr.h for the same. Signed-off-by: MD Danish Anwar Signed-off-by: Paolo Abeni include/linux/if_hsr.h | 17 +++++++++++++++++ net/hsr/hsr_device.c | 13 +++++++++++++ net/hsr/hsr_main.h | 9 --------- 3 files changed, 30 insertions(+), 9 deletions(-) commit 04508d20b017326e116c6e8ef953839507c73b6d Author: MD Danish Anwar Date: Fri Jan 10 13:58:50 2025 +0530 net: ti: icssg-prueth: Add Multicast Filtering support for VLAN in MAC mode Add multicast filtering support for VLAN interfaces in dual EMAC mode for ICSSG driver. The driver uses vlan_for_each() API to get the list of available vlans. The driver then sync mc addr of vlan interface with a locally mainatined list emac->vlan_mcast_list[vid] using __hw_addr_sync_multiple() API. __hw_addr_sync_multiple() is used instead of __hw_addr_sync() to sync vdev->mc with local list because the sync_cnt for addresses in vdev->mc will already be set by the vlan_dev_set_rx_mode() [net/8021q/vlan_dev.c] and __hw_addr_sync() only syncs when the sync_cnt == 0. Whereas __hw_addr_sync_multiple() can sync addresses even if sync_cnt is not 0. Export __hw_addr_sync_multiple() so that driver can use it. Once the local list is synced, driver calls __hw_addr_sync_dev() with the local list, vdev, sync and unsync callbacks. __hw_addr_sync_dev() is used with the local maintained list as the list to synchronize instead of using __dev_mc_sync() on vdev because __dev_mc_sync() on vdev will call __hw_addr_sync_dev() on vdev->mc and sync_cnt for addresses in vdev->mc will already be set by the vlan_dev_set_rx_mode() [net/8021q/vlan_dev.c] and __hw_addr_sync_dev() only syncs if the sync_cnt of addresses in the list (vdev->mc in this case) is 0. Whereas __hw_addr_sync_dev() on local list will work fine as the sync_cnt for addresses in the local list will still be 0. Based on change in addresses in the local list, sync / unsync callbacks are invoked. In the sync / unsync API in driver, based on whether the ndev is vlan or not, driver passes appropriate vid to FDB helper functions. Signed-off-by: MD Danish Anwar Signed-off-by: Paolo Abeni drivers/net/ethernet/ti/icssg/icssg_prueth.c | 67 ++++++++++++++++++++++------ drivers/net/ethernet/ti/icssg/icssg_prueth.h | 6 +++ include/linux/netdevice.h | 3 ++ net/core/dev_addr_lists.c | 7 +-- 4 files changed, 66 insertions(+), 17 deletions(-) commit 816b02e63a759c4458edee142b721ab09c918b3d Author: MD Danish Anwar Date: Fri Jan 10 13:58:49 2025 +0530 net: ti: icssg-prueth: Add VLAN support in EMAC mode Add support for VLAN filtering in dual EMAC mode. Reviewed-by: Roger Quadros Signed-off-by: MD Danish Anwar Signed-off-by: Paolo Abeni drivers/net/ethernet/ti/icssg/icssg_prueth.c | 29 +++++++++++++--------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit 624d7a8a9d86c429a28adc6267fe460ad87a5211 Merge: a8d00668c06b 601731fc7c61 Author: Paolo Abeni Date: Tue Jan 14 12:08:24 2025 +0100 Merge tag 'nf-next-25-01-11' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next The following patchset contains a small batch of Netfilter/IPVS updates for net-next: 1) Remove unused genmask parameter in nf_tables_addchain() 2) Speed up reads from /proc/net/ip_vs_conn, from Florian Westphal. 3) Skip empty buckets in hashlimit to avoid atomic operations that results in false positive reports by syzbot with lockdep enabled, patch from Eric Dumazet. 4) Add conntrack event timestamps available via ctnetlink, from Florian Westphal. netfilter pull request 25-01-11 * tag 'nf-next-25-01-11' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: netfilter: conntrack: add conntrack event timestamp netfilter: xt_hashlimit: htable_selective_cleanup() optimization ipvs: speed up reads from ip_vs_conn proc file netfilter: nf_tables: remove the genmask parameter ==================== Link: https://patch.msgid.link/20250111230800.67349-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 16a6f4d3b558bd55b52892f2becad8f33cb62ed2 Author: Mickaël Salaün Date: Mon Jan 13 17:11:10 2025 +0100 landlock: Use scoped guards for ruleset in landlock_add_rule() Simplify error handling by replacing goto statements with automatic calls to landlock_put_ruleset() when going out of scope. This change depends on the TCP support. Cc: Konstantin Meskhidze Cc: Mikhail Ivanov Reviewed-by: Günther Noack Link: https://lore.kernel.org/r/20250113161112.452505-3-mic@digikod.net Signed-off-by: Mickaël Salaün security/landlock/syscalls.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit d32f79a59ae1a90f27735c75f9920c585e6ceb8f Author: Mickaël Salaün Date: Mon Jan 13 17:11:09 2025 +0100 landlock: Use scoped guards for ruleset Simplify error handling by replacing goto statements with automatic calls to landlock_put_ruleset() when going out of scope. This change will be easy to backport to v6.6 if needed, only the kernel.h include line conflicts. As for any other similar changes, we should be careful when backporting without goto statements. Add missing include file. Reviewed-by: Günther Noack Link: https://lore.kernel.org/r/20250113161112.452505-2-mic@digikod.net Signed-off-by: Mickaël Salaün security/landlock/ruleset.c | 22 ++++++++++------------ security/landlock/ruleset.h | 5 +++++ security/landlock/syscalls.c | 25 ++++++++----------------- 3 files changed, 23 insertions(+), 29 deletions(-) commit 25ccc75f5de6684fd6a497e44297497ccc7e0603 Author: Mickaël Salaün Date: Fri Jan 10 16:39:14 2025 +0100 landlock: Constify get_mode_access() Use __attribute_const__ for get_mode_access(). Reviewed-by: Günther Noack Link: https://lore.kernel.org/r/20250110153918.241810-2-mic@digikod.net Signed-off-by: Mickaël Salaün security/landlock/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49440290a0935f428a1e43a5ac8dc275a647ff80 Author: Mickaël Salaün Date: Fri Jan 10 16:39:13 2025 +0100 landlock: Handle weird files A corrupted filesystem (e.g. bcachefs) might return weird files. Instead of throwing a warning and allowing access to such file, treat them as regular files. Cc: Dave Chinner Cc: Kent Overstreet Cc: Paul Moore Reported-by: syzbot+34b68f850391452207df@syzkaller.appspotmail.com Closes: https://lore.kernel.org/r/000000000000a65b35061cffca61@google.com Reported-by: syzbot+360866a59e3c80510a62@syzkaller.appspotmail.com Closes: https://lore.kernel.org/r/67379b3f.050a0220.85a0.0001.GAE@google.com Reported-by: Ubisectech Sirius Closes: https://lore.kernel.org/r/c426821d-8380-46c4-a494-7008bbd7dd13.bugreport@ubisectech.com Fixes: cb2c7d1a1776 ("landlock: Support filesystem access-control") Reviewed-by: Günther Noack Link: https://lore.kernel.org/r/20250110153918.241810-1-mic@digikod.net Signed-off-by: Mickaël Salaün security/landlock/fs.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit a8d00668c06b1aef677c2dc4f91677de2531c967 Merge: 6a46e3e87b59 677d895af1cc Author: Paolo Abeni Date: Tue Jan 14 11:44:22 2025 +0100 Merge branch 'introduce-unified-and-structured-phy' Oleksij Rempel says: ==================== Introduce unified and structured PHY This patch set introduces a unified and well-structured interface for reporting PHY statistics. Instead of relying on arbitrary strings in PHY drivers, this interface provides a consistent and structured way to expose PHY statistics to userspace via ethtool. The initial groundwork for this effort was laid by Jakub Kicinski, who contributed patches to plumb PHY statistics to drivers and added support for structured statistics in ethtool. Building on Jakub's work, I tested the implementation with several PHYs, addressed a few issues, and added support for statistics in two specific PHY drivers. Most of changes are tracked in separate patches. changes v6: - drop ethtool_stat_add patch changes v5: - rebase against latest net-next ==================== Link: https://patch.msgid.link/20250110060517.711683-1-o.rempel@pengutronix.de Signed-off-by: Paolo Abeni commit 677d895af1cc3bc90c3e09d7eeb0b2cd4dd2ddff Author: Oleksij Rempel Date: Fri Jan 10 07:05:17 2025 +0100 net: phy: dp83tg720: add statistics support Add support for reporting PHY statistics in the DP83TG720 driver. This includes cumulative tracking of link loss events, transmit/receive packet counts, and error counts. Implemented functions to update and provide statistics via ethtool, with optional polling support enabled through `PHY_POLL_STATS`. Signed-off-by: Oleksij Rempel Signed-off-by: Paolo Abeni drivers/net/phy/dp83tg720.c | 161 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) commit 23bbd28729bddfe1b57c7202e285e5b431b9ab3a Author: Oleksij Rempel Date: Fri Jan 10 07:05:16 2025 +0100 net: phy: dp83td510: add statistics support Add support for reporting PHY statistics in the DP83TD510 driver. This includes cumulative tracking of transmit/receive packet counts, and error counts. Implemented functions to update and provide statistics via ethtool, with optional polling support enabled through `PHY_POLL_STATS`. Signed-off-by: Oleksij Rempel Signed-off-by: Paolo Abeni drivers/net/phy/dp83td510.c | 112 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) commit f2bc1c2655728ac00c35cfb992bdb3243ca17e7e Author: Oleksij Rempel Date: Fri Jan 10 07:05:15 2025 +0100 net: phy: introduce optional polling interface for PHY statistics Add an optional polling interface for PHY statistics to simplify driver implementation. Signed-off-by: Oleksij Rempel Signed-off-by: Paolo Abeni drivers/net/phy/phy.c | 20 ++++++++++++++++++++ include/linux/phy.h | 21 +++++++++++++++++++++ 2 files changed, 41 insertions(+) commit 7d66c74a171d6c667cbf36f4b6cf1cc98744a83c Author: Oleksij Rempel Date: Fri Jan 10 07:05:14 2025 +0100 Documentation: networking: update PHY error counter diagnostics in twisted pair guide Replace generic instructions for monitoring error counters with a procedure using the unified PHY statistics interface (`--all-groups`). Signed-off-by: Oleksij Rempel Signed-off-by: Paolo Abeni .../diagnostic/twisted_pair_layer1_diagnostics.rst | 39 ++++++++++++++++------ 1 file changed, 28 insertions(+), 11 deletions(-) commit 6167c0b6e8d7ddb6b3e5efffcac34a85f7872997 Author: Jakub Kicinski Date: Fri Jan 10 07:05:13 2025 +0100 net: ethtool: add support for structured PHY statistics Introduce a new way to report PHY statistics in a structured and standardized format using the netlink API. This new method does not replace the old driver-specific stats, which can still be accessed with `ethtool -S `. The structured stats are available with `ethtool -S --all-groups`. This new method makes it easier to diagnose problems by organizing stats in a consistent and documented way. Signed-off-by: Jakub Kicinski Signed-off-by: Oleksij Rempel Signed-off-by: Paolo Abeni Documentation/networking/ethtool-netlink.rst | 1 + include/uapi/linux/ethtool.h | 2 ++ include/uapi/linux/ethtool_netlink.h | 14 ++++++++++ net/ethtool/netlink.h | 1 + net/ethtool/stats.c | 39 +++++++++++++++++++++++++++- net/ethtool/strset.c | 5 ++++ 6 files changed, 61 insertions(+), 1 deletion(-) commit b7a2c1fe6b55364e61b4b54b991eb43a47bb1104 Author: Jakub Kicinski Date: Fri Jan 10 07:05:12 2025 +0100 net: ethtool: plumb PHY stats to PHY drivers Introduce support for standardized PHY statistics reporting in ethtool by extending the PHYLIB framework. Add the functions phy_ethtool_get_phy_stats() and phy_ethtool_get_link_ext_stats() to provide a consistent interface for retrieving PHY-level and link-specific statistics. These functions are used within the ethtool implementation to avoid direct access to the phy_device structure outside of the PHYLIB framework. A new structure, ethtool_phy_stats, is introduced to standardize PHY statistics such as packet counts, byte counts, and error counters. Drivers are updated to include callbacks for retrieving PHY and link-specific statistics, ensuring values are explicitly set only for supported fields, initialized with ETHTOOL_STAT_NOT_SET to avoid ambiguity. Signed-off-by: Jakub Kicinski Signed-off-by: Oleksij Rempel Signed-off-by: Paolo Abeni drivers/net/phy/phy.c | 43 +++++++++++++++++++++++++++++++++++++++++++ drivers/net/phy/phy_device.c | 2 ++ include/linux/ethtool.h | 23 +++++++++++++++++++++++ include/linux/phy.h | 36 ++++++++++++++++++++++++++++++++++++ include/linux/phylib_stubs.h | 42 ++++++++++++++++++++++++++++++++++++++++++ net/ethtool/linkstate.c | 5 +++-- net/ethtool/stats.c | 18 ++++++++++++++++++ 7 files changed, 167 insertions(+), 2 deletions(-) commit fe55b1d401c697c2ef126fe3ebbcaa6885fced5a Author: Oleksij Rempel Date: Fri Jan 10 07:05:11 2025 +0100 ethtool: linkstate: migrate linkstate functions to support multi-PHY setups Adapt linkstate_get_sqi() and linkstate_get_sqi_max() to take a phy_device argument directly, enabling support for setups with multiple PHYs. The previous assumption of a single PHY attached to a net_device no longer holds. Use ethnl_req_get_phydev() to identify the appropriate PHY device for the operation. Update linkstate_prepare_data() and related logic to accommodate this change, ensuring compatibility with multi-PHY configurations. Signed-off-by: Oleksij Rempel Signed-off-by: Paolo Abeni net/ethtool/linkstate.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 4e35be63c4ad880c3dba12a287a0ea196541258e Author: Christoph Hellwig Date: Mon Jan 13 15:12:19 2025 +0100 xfs: add a b_iodone callback to struct xfs_buf Stop open coding the log item completions and instead add a callback into back into the submitter. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 7 ++----- fs/xfs/xfs_buf.h | 5 +---- fs/xfs/xfs_dquot.c | 2 +- fs/xfs/xfs_inode_item.c | 2 +- fs/xfs/xfs_trans_buf.c | 8 ++++---- 5 files changed, 9 insertions(+), 15 deletions(-) commit 4f1aefd13e94bbf027f87befb2e2206ca73a5e7f Author: Christoph Hellwig Date: Mon Jan 13 15:12:18 2025 +0100 xfs: move b_li_list based retry handling to common code The dquot and inode version are very similar, which is expected given the overall b_li_list logic. The differences are that the inode version also clears the XFS_LI_FLUSHING which is defined in common but only ever set by the inode item, and that the dquot version takes the ail_lock over the list iteration. While this seems sensible given that additions and removals from b_li_list are protected by the ail_lock, log items are only added before buffer submission, and are only removed when completing the buffer, so nothing can change the list when retrying a buffer. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 12 ++++++------ fs/xfs/xfs_buf_item.h | 5 ----- fs/xfs/xfs_dquot.c | 12 ------------ fs/xfs/xfs_inode_item.c | 12 ------------ 4 files changed, 6 insertions(+), 35 deletions(-) commit 46eba93d4f582dce63dfdf506a6f2edf8f1787c8 Author: Christoph Hellwig Date: Mon Jan 13 15:12:17 2025 +0100 xfs: simplify xfsaild_resubmit_item Since commit acc8f8628c37 ("xfs: attach dquot buffer to dquot log item buffer") all buf items that use bp->b_li_list are explicitly checked for in the branch to just clears XFS_LI_FAILED. Remove the dead arm that calls xfs_clear_li_failed. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_trans_ail.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 819f29cc7be6a9d949e017ca3f5ccc772a80daef Author: Christoph Hellwig Date: Mon Jan 13 15:12:16 2025 +0100 xfs: always complete the buffer inline in xfs_buf_submit xfs_buf_submit now only completes a buffer on error, or for in-memory buftargs. There is no point in using a workqueue for the latter as the completion will just wake up the caller. Optimize this case by avoiding the workqueue roundtrip. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 6dca5abb3d10e27e919e5344ac07e057f443c318 Author: Christoph Hellwig Date: Mon Jan 13 15:12:15 2025 +0100 xfs: remove the extra buffer reference in xfs_buf_submit Nothing touches the buffer after it has been submitted now, so the need for the extra transient reference went away as well. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 5c82a471c2b71357f6319f6ec34d20691969a6ba Author: Christoph Hellwig Date: Mon Jan 13 15:12:14 2025 +0100 xfs: move invalidate_kernel_vmap_range to xfs_buf_ioend Invalidating cache lines can be fairly expensive, so don't do it in interrupt context. Note that in practice very few setup will actually do anything here as virtually indexed caches are rather uncommon, but we might as well move the call to the proper place while touching this area. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fac69ec8cd743f509129deb5feae9e3f9ebc2cc8 Author: Christoph Hellwig Date: Mon Jan 13 15:12:13 2025 +0100 xfs: simplify buffer I/O submission The code in _xfs_buf_ioapply is unnecessarily complicated because it doesn't take advantage of modern bio features. Simplify it by making use of bio splitting and chaining, that is build a single bio for the pages in the buffer using a simple loop, and then split that bio on the map boundaries for discontiguous multi-FSB buffers and chain the split bios to the main one so that there is only a single I/O completion. This not only simplifies the code to build the buffer, but also removes the need for the b_io_remaining field as buffer ownership is granted to the bio on submit of the final bio with no chance for a completion before that as well as the b_io_error field that is now superfluous because there always is exactly one completion. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 204 ++++++++++++++++--------------------------------------- fs/xfs/xfs_buf.h | 2 - 2 files changed, 60 insertions(+), 146 deletions(-) commit 8db65d312b5757fd70591382a800336dcbf091af Author: Christoph Hellwig Date: Mon Jan 13 15:12:12 2025 +0100 xfs: move in-memory buftarg handling out of _xfs_buf_ioapply No I/O to apply for in-memory buffers, so skip the function call entirely. Clean up the b_io_error initialization logic to allow for this. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 0195647abaac92f5dbd2799f64d19f316fd97b7a Author: Christoph Hellwig Date: Mon Jan 13 15:12:11 2025 +0100 xfs: move write verification out of _xfs_buf_ioapply Split the write verification logic out of _xfs_buf_ioapply into a new xfs_buf_verify_write helper called by xfs_buf_submit given that it isn't about applying the I/O and doesn't really fit in with the rest of _xfs_buf_ioapply. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 67 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 30 deletions(-) commit 72842dbc2b81c4a43203b47b1d4c1ec2aa508020 Author: Christoph Hellwig Date: Mon Jan 13 15:12:10 2025 +0100 xfs: remove xfs_buf_delwri_submit_buffers xfs_buf_delwri_submit_buffers has two callers for synchronous and asynchronous writes that share very little logic. Split out a helper for the shared per-buffer loop and otherwise open code the submission in the two callers. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 121 +++++++++++++++++++++++++------------------------------ 1 file changed, 55 insertions(+), 66 deletions(-) commit eb43b0b5cab885a9a76f5edb57020ad03eaf82b2 Author: Christoph Hellwig Date: Mon Jan 13 15:12:09 2025 +0100 xfs: simplify xfs_buf_delwri_pushbuf xfs_buf_delwri_pushbuf synchronously writes a buffer that is on a delwri list already. Instead of doing a complicated dance with the delwri and wait list, just leave them alone and open code the actual buffer write. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) commit 05b5968f33a9fccabc5cb6672afd3ce2367db99b Author: Christoph Hellwig Date: Mon Jan 13 15:12:08 2025 +0100 xfs: move xfs_buf_iowait out of (__)xfs_buf_submit There is no good reason to pass a bool argument to wait for a buffer when the callers that want that can easily just wait themselves. This means the wait moves out of the extra hold of the buffer, but as the callers of synchronous buffer I/O need to hold a reference anyway that is perfectly fine. Because all async buffer submitters ignore the error return value, and the synchronous ones catch the error condition through b_error and xfs_buf_iowait this also means the new xfs_buf_submit doesn't have to return an error code. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) commit 411ff3f7386a93d6170dbc067e3965ad472f11c6 Author: Christoph Hellwig Date: Mon Jan 13 15:12:07 2025 +0100 xfs: remove the incorrect comment about the b_pag field The rbtree root is long gone. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83e9c69dcf18bff12ed205423b91e1e1ae316998 Author: Christoph Hellwig Date: Mon Jan 13 15:12:06 2025 +0100 xfs: remove the incorrect comment above xfs_buf_free_maps The comment above xfs_buf_free_maps talks about fields not even used in the function and also doesn't add any other value. Remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 3 --- 1 file changed, 3 deletions(-) commit cbd6883ed8662073031a32f1294cdf53c8ec24a4 Author: Christoph Hellwig Date: Mon Jan 13 15:12:05 2025 +0100 xfs: fix a double completion for buffers on in-memory targets __xfs_buf_submit calls xfs_buf_ioend when b_io_remaining hits zero. For in-memory buftargs b_io_remaining is never incremented from it's initial value of 1, so this always happens. Thus the extra call to xfs_buf_ioend in _xfs_buf_ioapply causes a double completion. Fortunately __xfs_buf_submit is only used for synchronous reads on in-memory buftargs due to the peculiarities of how they work, so this is mostly harmless and just causes a little extra work to be done. Fixes: 5076a6040ca1 ("xfs: support in-memory buffer cache targets") Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Acked-by: Dave Chinner Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6a46e3e87b5964f21eb90e8abfee916141df1763 Author: Divya Koppera Date: Fri Jan 10 11:14:24 2025 +0530 net: phy: microchip_t1: depend on PTP_1588_CLOCK_OPTIONAL When microchip_t1_phy is built in and phyptp is module facing undefined reference issue. This get fixed when microchip_t1_phy made dependent on PTP_1588_CLOCK_OPTIONAL. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501090604.YEoJXCXi-lkp@intel.com Fixes: fa51199c5f34 ("net: phy: microchip_rds_ptp : Add rds ptp library for Microchip phys") Signed-off-by: Divya Koppera Reviewed-by: Simon Horman Tested-by: Simon Horman # build-tested Link: https://patch.msgid.link/20250110054424.16807-1-divya.koppera@microchip.com Signed-off-by: Paolo Abeni drivers/net/phy/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d621673033069b2360a98ea5d7a61138d3f0c13a Merge: 8834a4ec9d0f 36036a164fac Author: Wolfram Sang Date: Tue Jan 14 11:13:43 2025 +0100 Merge tag 'at24-updates-for-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-mergewindow at24 updates for v6.14-rc1 - add new compatibles for at24 variants from Giantec and Puya Semiconductor (together with a new vendor prefix) commit 8834a4ec9d0fca6e63a9b077e6476e0ccafcc297 Author: Atharva Tiwari Date: Mon Jan 13 18:27:28 2025 +0530 i2c: amd756: Remove superfluous TODO This old driver has never been used on big-endian systems, so remove the todo. Suggested-by: Andi Shyti Signed-off-by: Atharva Tiwari [wsa: reworded commit message] Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-amd756.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b967c4b9a103f80608fffb8d3145bb3fb4a3ea63 Author: Wolfram Sang Date: Tue Jan 14 11:07:03 2025 +0100 Revert "i2c: amd756: Fix endianness handling for word data" This reverts commit 70f3d3669c074efbcee32867a1ab71f5f7ead385. We concluded that removing the comments is the right thing to do. This will be done by an incremental patch. Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-amd756.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a46fe1fe0144306c7d2cf3f5d4e44a7da31847f6 Merge: 735668f8e5c9 fd4e93083129 Author: Wolfram Sang Date: Tue Jan 14 11:05:52 2025 +0100 Merge branch 'i2c/i2c-host' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-mergewindow Andi is unavailable for some time. So, I take over his work for this mergewindow. commit 575a5adf48b06a2980c9eeffedf699ed5534fade Author: Qasim Ijaz Date: Mon Jan 13 18:00:34 2025 +0000 USB: serial: quatech2: fix null-ptr-deref in qt2_process_read_urb() This patch addresses a null-ptr-deref in qt2_process_read_urb() due to an incorrect bounds check in the following: if (newport > serial->num_ports) { dev_err(&port->dev, "%s - port change to invalid port: %i\n", __func__, newport); break; } The condition doesn't account for the valid range of the serial->port buffer, which is from 0 to serial->num_ports - 1. When newport is equal to serial->num_ports, the assignment of "port" in the following code is out-of-bounds and NULL: serial_priv->current_port = newport; port = serial->port[serial_priv->current_port]; The fix checks if newport is greater than or equal to serial->num_ports indicating it is out-of-bounds. Reported-by: syzbot Closes: https://syzkaller.appspot.com/bug?extid=506479ebf12fe435d01a Fixes: f7a33e608d9a ("USB: serial: add quatech2 usb to serial driver") Cc: # 3.5 Signed-off-by: Qasim Ijaz Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/quatech2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88df16f851ad8473ae89aba36d07e76b11c798ca Author: Eric Dumazet Date: Thu Jan 9 17:18:50 2025 +0000 net: sched: calls synchronize_net() only when needed dev_deactivate_many() role is to remove the qdiscs of a network device. When/if a qdisc is dismantled, an rcu grace period is needed to make sure all outstanding qdisc enqueue are done before we proceed with a qdisc reset. Most virtual devices do not have a qdisc. We can call the expensive synchronize_net() only if needed. Note that dev_deactivate_many() does not have to deal with qdisc-less dev_queue_xmit, as an old comment was claiming. Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20250109171850.2871194-1-edumazet@google.com Signed-off-by: Paolo Abeni net/sched/sch_generic.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 51dc5312dcd929efea7647c0c0e75afa461531b5 Author: Kalesh AP Date: Tue Jan 7 08:15:52 2025 +0530 RDMA/bnxt_re: Add support to handle DCB_CONFIG_CHANGE event QP1 context in HW needs to be updated when there is a change in the default DSCP values used for RoCE traffic. Handle the event from FW and modify the dscp value used by QP1. Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier Link: https://patch.msgid.link/20250107024553.2926983-5-kalesh-anakkur.purayil@broadcom.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/bnxt_re/bnxt_re.h | 1 + drivers/infiniband/hw/bnxt_re/main.c | 104 +++++++++++++++++++++++++++++++ drivers/infiniband/hw/bnxt_re/qplib_fp.h | 1 + drivers/infiniband/hw/bnxt_re/qplib_sp.h | 1 + 4 files changed, 107 insertions(+) commit c0ad30eddc2858b97024527ffff1704306ac8fae Author: Kalesh AP Date: Tue Jan 7 08:15:51 2025 +0530 RDMA/bnxt_re: Query firmware defaults of CC params during probe Added function to query firmware default values of CC parameters during driver init. These values will be stored in driver local structure and used in subsequent patch. Signed-off-by: Selvin Xavier Signed-off-by: Kalesh AP Link: https://patch.msgid.link/20250107024553.2926983-4-kalesh-anakkur.purayil@broadcom.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/bnxt_re/bnxt_re.h | 1 + drivers/infiniband/hw/bnxt_re/main.c | 5 ++ drivers/infiniband/hw/bnxt_re/qplib_sp.c | 113 +++++++++++++++++++++++++++++++ drivers/infiniband/hw/bnxt_re/qplib_sp.h | 2 + 4 files changed, 121 insertions(+) commit 7fea327840683ebec5632cf2c942ed1940ef63bf Author: Kalesh AP Date: Tue Jan 7 08:15:50 2025 +0530 RDMA/bnxt_re: Add Async event handling support Using the option provided by Ethernet driver, register for FW Async event. During probe, while registeriung with Ethernet driver, provide the ulp hook 'ulp_async_notifier' for receiving the firmware events. Signed-off-by: Selvin Xavier Signed-off-by: Kalesh AP Link: https://patch.msgid.link/20250107024553.2926983-3-kalesh-anakkur.purayil@broadcom.com Signed-off-by: Leon Romanovsky drivers/infiniband/hw/bnxt_re/bnxt_re.h | 1 + drivers/infiniband/hw/bnxt_re/main.c | 39 +++++++++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 6 ++--- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 4 +-- 4 files changed, 44 insertions(+), 6 deletions(-) commit 3784950b7b9ed18a5991b13c57145689b620d687 Author: Qunqin Zhao Date: Tue Jan 14 16:07:00 2025 +0800 ALSA: hda: Add AZX_DCAPS_NO_TCSEL flag for Loongson HDA devices Loongson's HDA devices do not support TCSEL functionality. Signed-off-by: Qunqin Zhao Link: https://patch.msgid.link/20250114080700.23029-1-zhaoqunqin@loongson.cn Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 184fe6f2382babdc63f07315c8accea258476070 Author: Michael Chan Date: Tue Jan 7 08:15:49 2025 +0530 bnxt_en: Add ULP call to notify async events When the driver receives an async event notification from the Firmware, we make the new ulp_async_notifier() call to inform the RDMA driver that a firmware async event has been received. RDMA driver can then take necessary actions based on the event type. In the next patch, we will implement the ulp_async_notifier() callbacks in the RDMA driver. Signed-off-by: Michael Chan Signed-off-by: Selvin Xavier Signed-off-by: Kalesh AP Link: https://patch.msgid.link/20250107024553.2926983-2-kalesh-anakkur.purayil@broadcom.com Signed-off-by: Leon Romanovsky drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 28 +++++++++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 2 ++ 3 files changed, 31 insertions(+) commit f1d3ad0ac143063247643bb698917efb88c21cf1 Author: Even Xu Date: Tue Jan 14 08:37:12 2025 +0800 HID: intel-thc-hid: fix build errors in um mode Add dependency to ACPI to avoid acpi APIs missing in um mode. Signed-off-by: Even Xu Suggested-by: Srinivas Pandruvada Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501131826.sX2DubPG-lkp@intel.com Signed-off-by: Jiri Kosina drivers/hid/intel-thc-hid/Kconfig | 1 + 1 file changed, 1 insertion(+) commit accabfaae0940f9427c782bfee7340ce4c15151c Author: Lad Prabhakar Date: Fri Jan 10 22:10:45 2025 +0000 pinctrl: renesas: rzg2l: Fix PFC_MASK for RZ/V2H and RZ/G3E The PFC_MASK value for the PFC_mx registers is currently hardcoded to 0x07, which is correct for SoCs in the RZ/G2L family, but insufficient for RZ/V2H and RZ/G3E, where the mask value should be 0x0f. This discrepancy causes incorrect PFC register configuration on RZ/V2H and RZ/G3E SoCs. On RZ/G2L, the PFC_mx bitfields are also 4 bits wide, with bit 4 marked as reserved. The reserved bits are documented to read as zero and be ignored when written. Updating the PFC_MASK definition from 0x07 to 0x0f ensures compatibility with both SoC families while maintaining correct behavior on RZ/G2L. Fixes: 9bd95ac86e70 ("pinctrl: renesas: rzg2l: Add support for RZ/V2H SoC") Cc: stable@vger.kernel.org Reported-by: Hien Huynh Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250110221045.594596-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven drivers/pinctrl/renesas/pinctrl-rzg2l.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19fdc68aa7b90b1d3d600e873a3e050a39e7663d Author: Randy Dunlap Date: Tue Jan 7 15:53:09 2025 -0800 efi: sysfb_efi: fix W=1 warnings when EFI is not set A build with W=1 fails because there are code and data that are not needed or used when CONFIG_EFI is not set. Move the "#ifdef CONFIG_EFI" block to earlier in the source file so that the unused code/data are not built. drivers/firmware/efi/sysfb_efi.c:345:39: warning: ‘efifb_fwnode_ops’ defined but not used [-Wunused-const-variable=] 345 | static const struct fwnode_operations efifb_fwnode_ops = { | ^~~~~~~~~~~~~~~~ drivers/firmware/efi/sysfb_efi.c:238:35: warning: ‘efifb_dmi_swap_width_height’ defined but not used [-Wunused-const-variable=] 238 | static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/firmware/efi/sysfb_efi.c:188:35: warning: ‘efifb_dmi_system_table’ defined but not used [-Wunused-const-variable=] 188 | static const struct dmi_system_id efifb_dmi_system_table[] __initconst = { | ^~~~~~~~~~~~~~~~~~~~~~ Fixes: 15d27b15de96 ("efi: sysfb_efi: fix build when EFI is not set") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501071933.20nlmJJt-lkp@intel.com/ Cc: David Rheinsberg Cc: Hans de Goede Cc: Javier Martinez Canillas Cc: Peter Jones Cc: Simona Vetter Cc: linux-fbdev@vger.kernel.org Cc: Ard Biesheuvel Cc: linux-efi@vger.kernel.org Reviewed-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Signed-off-by: Ard Biesheuvel drivers/firmware/efi/sysfb_efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e23c96b1fe1a13078209394a292efe06767f3a4 Author: Ard Biesheuvel Date: Fri Dec 20 12:04:57 2024 +0100 efi/libstub: Use __free() helper for pool deallocations Annotate some local buffer allocations as __free(efi_pool) and simplify the associated error handling accordingly. This removes a couple of gotos and simplifies the code. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/efi-stub-helper.c | 9 ++++----- drivers/firmware/efi/libstub/efi-stub.c | 21 ++++++++++----------- drivers/firmware/efi/libstub/x86-stub.c | 16 ++++++---------- 3 files changed, 20 insertions(+), 26 deletions(-) commit ad69b0b6f9954796875ee4faf6c16c9caca21999 Author: Ard Biesheuvel Date: Thu Dec 19 15:30:39 2024 +0100 efi/libstub: Use cleanup helpers for freeing copies of the memory map The EFI stub may obtain the memory map from the firmware numerous times, and this involves doing a EFI pool allocation first, which needs to be freed after use. Streamline this using a cleanup helper, which makes the code easier to follow. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/kaslr.c | 4 +--- drivers/firmware/efi/libstub/mem.c | 20 ++++++++------------ drivers/firmware/efi/libstub/randomalloc.c | 4 +--- drivers/firmware/efi/libstub/relocate.c | 10 ++++------ drivers/firmware/efi/libstub/x86-stub.c | 11 ++++++----- 5 files changed, 20 insertions(+), 29 deletions(-) commit 90534e689d2e52202c276ade5cf1dfc13d9e116f Author: Ard Biesheuvel Date: Thu Dec 19 11:06:58 2024 +0100 efi/libstub: Simplify PCI I/O handle buffer traversal Use LocateHandleBuffer() and a __free() cleanup helper to simplify the PCI I/O handle buffer traversal code. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/pci.c | 33 +++++++-------------------------- drivers/firmware/efi/libstub/x86-stub.c | 29 ++++++----------------------- 2 files changed, 13 insertions(+), 49 deletions(-) commit b52587c5e897e91ad59a59741e8af086151e7fbc Author: Ard Biesheuvel Date: Fri Dec 20 12:00:28 2024 +0100 efi/libstub: Refactor and clean up GOP resolution picker code The EFI stub implements various ways of setting the resolution of the EFI framebuffer at boot, and this duplicates a lot of boilerplate for iterating over the supported modes and extracting the resolution and color depth. Refactor this into a single helper that takes a callback, and use it for the 'auto', 'list' and 'res' selection methods. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/gop.c | 265 ++++++++++++++----------------------- 1 file changed, 103 insertions(+), 162 deletions(-) commit 60a34085c36d6eb292c1e03bc355b1aa3a74a689 Author: Ard Biesheuvel Date: Thu Dec 19 10:37:40 2024 +0100 efi/libstub: Simplify GOP handling code Use the LocateHandleBuffer() API and a __free() function to simplify the logic that allocates a handle buffer to iterate over all GOP protocols in the EFI database. Signed-off-by: Ard Biesheuvel arch/x86/include/asm/efi.h | 3 ++ drivers/firmware/efi/libstub/efi-stub.c | 28 ++++++---------- drivers/firmware/efi/libstub/efistub.h | 9 ++++-- drivers/firmware/efi/libstub/gop.c | 57 +++++++++++---------------------- drivers/firmware/efi/libstub/x86-stub.c | 17 ++-------- 5 files changed, 40 insertions(+), 74 deletions(-) commit c14bca3f7aa94fd8d3f5e621ce5b56535ef2396b Author: Ard Biesheuvel Date: Thu Dec 19 10:53:23 2024 +0100 efi/libstub: Use C99-style for loop to traverse handle buffer Tweak the for_each_efi_handle() macro in order to avoid the need on the part of the caller to provide a loop counter variable. Also move efi_get_handle_num() to the callers, so that each occurrence can be replaced with the actual number returned by the simplified LocateHandleBuffer API. Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/efistub.h | 9 ++++----- drivers/firmware/efi/libstub/gop.c | 3 +-- drivers/firmware/efi/libstub/pci.c | 5 ++--- drivers/firmware/efi/libstub/x86-stub.c | 3 +-- 4 files changed, 8 insertions(+), 12 deletions(-) commit 144d52dd8fc83a082a275e1b663e7454d2b616a4 Author: Ard Biesheuvel Date: Thu Dec 19 10:27:08 2024 +0100 x86/efistub: Drop long obsolete UGA support UGA is the EFI graphical output protocol that preceded GOP, and has been long obsolete. Drop support for it from the x86 implementation of the EFI stub - other architectures never bothered to implement it (save for ia64) Signed-off-by: Ard Biesheuvel arch/x86/platform/efi/efi.c | 10 ---- drivers/firmware/efi/efi.c | 3 -- drivers/firmware/efi/libstub/x86-stub.c | 90 --------------------------------- include/linux/efi.h | 4 -- 4 files changed, 107 deletions(-) commit ccd582059a132f2bdc3486766ac57c24c465f471 Author: Guo Weikang Date: Thu Dec 12 18:10:00 2024 +0800 mm/early_ioremap: add null pointer checks to prevent NULL-pointer dereference The early_ioremap interface can fail and return NULL in certain cases. To prevent NULL-pointer dereference crashes, fixed issues in the acpi_extlog and copy_early_mem interfaces, improving robustness when handling early memory. Link: https://lkml.kernel.org/r/20241212101004.1544070-1-guoweikang.kernel@gmail.com Signed-off-by: Guo Weikang Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: H. Peter Anvin Cc: Ingo Molnar Cc: Ingo Molnar Cc: Jason A. Donenfeld Cc: Julian Stecklina Cc: Kevin Loughlin Cc: Len Brown Cc: Rafael J. Wysocki Cc: "Rafael J. Wysocki" Cc: Thomas Gleixner Cc: Xin Li (Intel) Signed-off-by: Andrew Morton arch/x86/kernel/setup.c | 5 ++++- drivers/acpi/acpi_extlog.c | 14 ++++++++++++++ include/asm-generic/early_ioremap.h | 2 +- mm/early_ioremap.c | 8 +++++++- 4 files changed, 26 insertions(+), 3 deletions(-) commit 8ad946eb3df4ca1a243ce412e3e95f03b4468cbe Author: Lorenzo Stoakes Date: Thu Dec 12 11:31:52 2024 +0000 mm: add comments to do_mmap(), mmap_region() and vm_mmap() It isn't always entirely clear to users the difference between do_mmap(), mmap_region() and vm_mmap(), so add comments to clarify what's going on in each. This is compounded by the fact that we actually allow callers external to mm to invoke both do_mmap() and mmap_region() (!), the latter of which is really strictly speaking an internal memory mapping implementation detail. Link: https://lkml.kernel.org/r/20241212113152.28849-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Cc: Jann Horn Cc: Liam R. Howlett Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/mmap.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- mm/util.c | 17 ++++++++++++++ 2 files changed, 95 insertions(+), 1 deletion(-) commit df31155aff025171ae90cce91492e39b2cd5869b Author: Lorenzo Stoakes Date: Thu Dec 12 11:48:41 2024 +0000 mm: assert mmap write lock held on do_mmap(), mmap_region() Both of these functions can be invoked outside of mm, so it is probably a good idea to assert that the required lock is held. Will only have an impact if CONFIG_DEBUG_VM is set, otherwise this amounts to no change at all. Link: https://lkml.kernel.org/r/20241212114841.55185-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Acked-by: Vlastimil Babka Cc: Jann Horn Cc: Liam R. Howlett Signed-off-by: Andrew Morton mm/mmap.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5d45ba8c713ce5339b2938573cd42532254645d0 Author: Lorenzo Stoakes Date: Wed Dec 11 10:53:15 2024 +0000 MAINTAINERS: update MEMORY MAPPING section Update the MEMORY MAPPING section to contain VMA logic as it makes no sense to have these two sections separate. Additionally, add files which permit changes to the attributes and/or ranges spanned by memory mappings, in essence anything which might alter the output of /proc/$pid/[s]maps. This is necessarily fuzzy, as there is not quite as good separation of concerns as we would ideally like in the kernel. However each of these files interacts with the VMA and memory mapping logic in such a way as to be inseparatable from it, and it is important that they are maintained in conjunction with it. Link: https://lkml.kernel.org/r/20241211105315.21756-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Acked-by: Vlastimil Babka Cc: David Hildenbrand Cc: Jann Horn Cc: Liam R. Howlett Signed-off-by: Andrew Morton MAINTAINERS | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 1d8f136a421f26747e58c01281cba5bffae8d289 Author: Joshua Hahn Date: Wed Dec 11 12:39:51 2024 -0800 memcg/hugetlb: remove memcg hugetlb try-commit-cancel protocol This patch fully removes the mem_cgroup_{try, commit, cancel}_charge functions, as well as their hugetlb variants. Link: https://lkml.kernel.org/r/20241211203951.764733-4-joshua.hahnjy@gmail.com Signed-off-by: Joshua Hahn Acked-by: Shakeel Butt Reviewed-by: Nhat Pham Cc: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton include/linux/memcontrol.h | 22 ---------------- mm/memcontrol.c | 65 +++------------------------------------------- 2 files changed, 3 insertions(+), 84 deletions(-) commit 991135774c0e05a4734e6d32aa03b00355e4cac9 Author: Joshua Hahn Date: Wed Dec 11 12:39:50 2024 -0800 memcg/hugetlb: introduce mem_cgroup_charge_hugetlb This patch introduces mem_cgroup_charge_hugetlb which combines the logic of mem_cgroup_hugetlb_try_charge / mem_cgroup_hugetlb_commit_charge and removes the need for mem_cgroup_hugetlb_cancel_charge. It also reduces the footprint of memcg in hugetlb code and consolidates all memcg related error paths into one. Link: https://lkml.kernel.org/r/20241211203951.764733-3-joshua.hahnjy@gmail.com Signed-off-by: Joshua Hahn Acked-by: Shakeel Butt Reviewed-by: Nhat Pham Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Signed-off-by: Andrew Morton include/linux/memcontrol.h | 7 +++++++ mm/hugetlb.c | 35 ++++++++++++++--------------------- mm/memcontrol.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 21 deletions(-) commit 4e97d64c492e1f65b4f7d14803ed580b279aaf6f Author: Joshua Hahn Date: Wed Dec 11 12:39:49 2024 -0800 memcg/hugetlb: introduce memcg_accounts_hugetlb Patch series "memcg/hugetlb: Rework memcg hugetlb charging", v3. This series cleans up memcg's hugetlb charging logic by deprecating the current memcg hugetlb try-charge + {commit, cancel} logic present in alloc_hugetlb_folio. A single function mem_cgroup_charge_hugetlb takes its place instead. This makes the code more maintainable by simplifying the error path and reduces memcg's footprint in hugetlb logic. This patch introduces a few changes in the hugetlb folio allocation error path: (a) Instead of having multiple return points, we consolidate them to two: one for reaching the memcg limit or running out of memory (-ENOMEM) and one for hugetlb allocation fails / limit being reached (-ENOSPC). (b) Previously, the memcg limit was checked before the folio is acquired, meaning the hugeTLB folio isn't acquired if the limit is reached. This patch performs the charging after the folio is reached, meaning if memcg's limit is reached, the acquired folio is freed right away. This patch builds on two earlier patch series: [2] which adds memcg hugeTLB counters, and [3] which deprecates charge moving and removes the last references to mem_cgroup_cancel_charge. The request for this cleanup can be found in [2]. [1] https://lore.kernel.org/all/20231006184629.155543-1-nphamcs@gmail.com/ [2] https://lore.kernel.org/all/20241101204402.1885383-1-joshua.hahnjy@gmail.com/ [3] https://lore.kernel.org/linux-mm/20241025012304.2473312-1-shakeel.butt@linux.dev/ This patch (of 3): This patch isolates the check for whether memcg accounts hugetlb. This condition can only be true if the memcg mount option memory_hugetlb_accounting is on, which includes hugetlb usage in memory.current. Link: https://lkml.kernel.org/r/20241211203951.764733-1-joshua.hahnjy@gmail.com Link: https://lkml.kernel.org/r/20241211203951.764733-2-joshua.hahnjy@gmail.com Signed-off-by: Joshua Hahn Acked-by: Shakeel Butt Reviewed-by: Nhat Pham Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Muchun Song Signed-off-by: Andrew Morton mm/memcontrol.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 8c6e2d122b71b8cca7b215bca1cd586a1c09999a Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Tue Dec 10 21:48:07 2024 +0900 mm/migrate: remove slab checks in isolate_movable_page() Commit 8b8817630ae8 ("mm/migrate: make isolate_movable_page() skip slab pages") introduced slab checks to prevent mis-identification of slab pages as movable kernel pages. However, after Matthew's frozen folio series, these slab checks became unnecessary as the migration logic fails to increase the reference count for frozen slab folios. Remove these redundant slab checks and associated memory barriers. Link: https://lkml.kernel.org/r/20241210124807.8584-1-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: David Hildenbrand Reviewed-by: Vlastimil Babka Acked-by: David Rientjes Cc: Christoph Lameter Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Pekka Enberg Cc: Roman Gushchin Signed-off-by: Andrew Morton mm/migrate.c | 8 -------- mm/slub.c | 4 ---- 2 files changed, 12 deletions(-) commit 15e01f3912a7b9e7e6757f03273bc79e0094b7fc Author: SeongJae Park Date: Tue Dec 10 13:50:30 2024 -0800 samples/damon/prcl: implement schemes setup Implement a proactive cold memory regions reclaiming logic of prcl sample module using DAMOS. The logic treats memory regions that not accessed at all for five or more seconds as cold, and reclaim those as soon as found. Link: https://lkml.kernel.org/r/20241210215030.85675-6-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton samples/damon/prcl.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 2aca254620a8dcbf7c8c4105eb5d9da35f95473e Author: SeongJae Park Date: Tue Dec 10 13:50:29 2024 -0800 samples/damon: introduce a skeleton of a smaple DAMON module for proactive reclamation DAMON is not only for monitoring of access patterns, but also for access-aware system operations. For the system operations, DAMON provides a feature called DAMOS (Data Access Monitoring-based Operation Schemes). There is no sample API usage of DAMOS, though. Copy the working set size estimation sample modules with changed names of the module and symbols, to use it as a skeleton for a sample module showing the DAMOS API usage. The following commit will make it proactively reclaim cold memory of the given process, using DAMOS. Link: https://lkml.kernel.org/r/20241210215030.85675-5-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton samples/Makefile | 1 + samples/damon/Kconfig | 13 ++++++ samples/damon/Makefile | 1 + samples/damon/prcl.c | 116 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 131 insertions(+) commit 65cc56d02d3a59d1c96cf159c4cd12b5afe3b6a8 Author: SeongJae Park Date: Tue Dec 10 13:50:28 2024 -0800 samples/damon/wsse: implement working set size estimation and logging Implement the DAMON-based working set size estimation logic. The logic iterates memory regions in DAMON-generated access pattern snapshot for every aggregation interval and get the total sum of the size of any region having one or higher 'nr_accesses' count. That is, it assumes any region having one or higher 'nr_accesses' to be a part of the working set. The estimated value is reported to the user by printing it to the kernel log. Link: https://lkml.kernel.org/r/20241210215030.85675-4-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton samples/damon/wsse.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit b757c6cfc696d43501632861f731412b14a7be86 Author: SeongJae Park Date: Tue Dec 10 13:50:27 2024 -0800 samples/damon/wsse: start and stop DAMON as the user requests Start running DAMON to monitor accesses of a process that the user specified via 'target_pid' parameter, when 'y' is passed to 'enable' parameter. Stop running DAMON when 'n' is passed to 'enable' parameter. Estimating the working set size from DAMON's monitoring results and reporting it to the user will be implemented by the following commit. Link: https://lkml.kernel.org/r/20241210215030.85675-3-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton samples/damon/wsse.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 19d7c3adfdd4adbd286429849ac22ce9cce32477 Author: SeongJae Park Date: Tue Dec 10 13:50:26 2024 -0800 samples: add a skeleton of a sample DAMON module for working set size estimation Patch series "mm/damon: add sample modules". Implement a proactive cold memory regions reclaiming logic of prcl sample module using DAMOS. The logic treats memory regions that not accessed at all for five or more seconds as cold, and reclaim those as soon as found. This patch (of 5): Add a skeleton for a sample DAMON static module that can be used for estimating working set size of a given process. Note that it is a static module since DAMON is not exporting symbols to loadable modules for now. It exposes two module parameters, namely 'pid' and 'enable'. 'pid' will specify the process that the module will estimate the working set size of. 'enable' will receive whether to start or stop the estimation. Because this is just a skeleton, the parameters do nothing, though. The functionalities will be implemented by following commits. Link: https://lkml.kernel.org/r/20241210215030.85675-1-sj@kernel.org Link: https://lkml.kernel.org/r/20241210215030.85675-2-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton MAINTAINERS | 1 + samples/Kconfig | 2 ++ samples/Makefile | 1 + samples/damon/Kconfig | 17 +++++++++++++ samples/damon/Makefile | 3 +++ samples/damon/wsse.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 89 insertions(+) commit 08cc4c398ed2e4ba6119990eccd952ec3de1e241 Author: Kevin Brodsky Date: Mon Dec 9 09:50:19 2024 +0000 selftests/mm: remove X permission from sigaltstack mapping There is no reason why the alternate signal stack should be mapped as RWX. Map it as RW instead. Link: https://lkml.kernel.org/r/20241209095019.1732120-15-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Aruna Ramakrishna Cc: Catalin Marinas Cc: Dave Hansen Cc: Joey Gouly Cc: Keith Lucas Cc: Ryan Roberts Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/pkey_sighandler_tests.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1c6b1d4889d72a705c9f60f9916ebabbcfe25d30 Author: Kevin Brodsky Date: Mon Dec 9 09:50:18 2024 +0000 selftests/mm: skip pkey_sighandler_tests if support is missing The pkey_sighandler_tests are bound to fail if either the kernel or CPU doesn't support pkeys. Skip the tests if pkeys support is missing. Link: https://lkml.kernel.org/r/20241209095019.1732120-14-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Aruna Ramakrishna Cc: Catalin Marinas Cc: Dave Hansen Cc: Joey Gouly Cc: Keith Lucas Cc: Ryan Roberts Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/pkey_sighandler_tests.c | 3 +++ 1 file changed, 3 insertions(+) commit 28501aa13acd8376b09a87dc5e3da02462bb0702 Author: Kevin Brodsky Date: Mon Dec 9 09:50:17 2024 +0000 selftests/mm: rename pkey register macro PKEY_ALLOW_ALL is meant to represent the pkey register value that allows all accesses (enables all pkeys). However its current naming suggests that the value applies to *one* key only (like PKEY_DISABLE_ACCESS for instance). Rename PKEY_ALLOW_ALL to PKEY_REG_ALLOW_ALL to avoid such misunderstanding. This is consistent with the PKEY_REG_ALLOW_NONE macro introduced by commit 6e182dc9f268 ("selftests/mm: Use generic pkey register manipulation"). Link: https://lkml.kernel.org/r/20241209095019.1732120-13-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Aruna Ramakrishna Cc: Catalin Marinas Cc: Dave Hansen Cc: Joey Gouly Cc: Keith Lucas Cc: Ryan Roberts Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/pkey-arm64.h | 2 +- tools/testing/selftests/mm/protection_keys.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 50910acd6f61573ac23d468f221fa06178f2bd29 Author: Kevin Brodsky Date: Mon Dec 9 09:50:16 2024 +0000 selftests/mm: use sys_pkey helpers consistently sys_pkey_alloc, sys_pkey_free and sys_mprotect_pkey are currently used in protections_keys.c, while pkey_sighandler_tests.c calls the libc wrappers directly (e.g. pkey_mprotect()). This is probably ok when using glibc (those symbols appeared a while ago), but Musl does not currently provide them. The logging in the helpers from pkey-helpers.h can also come in handy. Make things more consistent by using the sys_pkey helpers in pkey_sighandler_tests.c too. To that end their implementation is moved to a common .c file (pkey_util.c). This also enables calling is_pkeys_supported() outside of protections_keys.c, since it relies on sys_pkey_{alloc,free}. [kevin.brodsky@arm.com: fix dependency on pkey_util.c] Link: https://lkml.kernel.org/r/20241216092849.2140850-1-kevin.brodsky@arm.com Link: https://lkml.kernel.org/r/20241209095019.1732120-12-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Aruna Ramakrishna Cc: Catalin Marinas Cc: Dave Hansen Cc: Joey Gouly Cc: Keith Lucas Cc: Ryan Roberts Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/Makefile | 4 +++ tools/testing/selftests/mm/pkey-helpers.h | 2 ++ tools/testing/selftests/mm/pkey_sighandler_tests.c | 8 ++--- tools/testing/selftests/mm/pkey_util.c | 40 ++++++++++++++++++++++ tools/testing/selftests/mm/protection_keys.c | 35 ------------------- 5 files changed, 50 insertions(+), 39 deletions(-) commit b0cc298487d9fa61fb3198b2d1bd0839b3c4c95d Author: Kevin Brodsky Date: Mon Dec 9 09:50:15 2024 +0000 selftests/mm: ensure non-global pkey symbols are marked static The pkey tests define a whole lot of functions and some global variables. A few are truly global (declared in pkey-helpers.h), but the majority are file-scoped. Make sure those are labelled static. Some of the pkey_{access,write}_{allow,deny} helpers are not called, or only called when building for some architectures. Mark them __maybe_unused to suppress compiler warnings. Link: https://lkml.kernel.org/r/20241209095019.1732120-11-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Aruna Ramakrishna Cc: Catalin Marinas Cc: Dave Hansen Cc: Joey Gouly Cc: Keith Lucas Cc: Ryan Roberts Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/pkey-helpers.h | 3 + tools/testing/selftests/mm/pkey_sighandler_tests.c | 6 +- tools/testing/selftests/mm/protection_keys.c | 132 ++++++++++----------- 3 files changed, 72 insertions(+), 69 deletions(-) commit f3f555974c19ede667b1fbe67b3236beea474099 Author: Kevin Brodsky Date: Mon Dec 9 09:50:14 2024 +0000 selftests/mm: remove empty pkey helper definition Some of the functions declared in pkey-helpers.h are actually defined in protections_keys.c, meaning they can only be called from protections_keys.c. This is less than ideal, but it is hard to avoid as these helpers are themselves called from inline functions in pkey-.h. Let's at least add a comment clarifying that. We can also remove the empty definition in pkey_sighandler_tests.c: expected_pkey_fault() is not meant to be called from there. Link: https://lkml.kernel.org/r/20241209095019.1732120-10-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Aruna Ramakrishna Cc: Catalin Marinas Cc: Dave Hansen Cc: Joey Gouly Cc: Keith Lucas Cc: Ryan Roberts Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/pkey-helpers.h | 6 ++++-- tools/testing/selftests/mm/pkey_sighandler_tests.c | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) commit 21309ac2652068f45ebb78a2e7a7cd3d5417350e Author: Kevin Brodsky Date: Mon Dec 9 09:50:13 2024 +0000 selftests/mm: ensure pkey-*.h define inline functions only Headers should not define non-inline functions, as this prevents them from being included more than once in a given program. pkey-helpers.h and the arch-specific headers it includes currently define multiple such non-inline functions. In most cases those functions can simply be made inline - this patch does just that. read_ptr() is an exception as it must not be inlined. Since it is only called from protection_keys.c, we just move it there. Link: https://lkml.kernel.org/r/20241209095019.1732120-9-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Aruna Ramakrishna Cc: Catalin Marinas Cc: Dave Hansen Cc: Joey Gouly Cc: Keith Lucas Cc: Ryan Roberts Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/pkey-arm64.h | 4 ++-- tools/testing/selftests/mm/pkey-helpers.h | 8 +------- tools/testing/selftests/mm/pkey-powerpc.h | 4 ++-- tools/testing/selftests/mm/pkey-x86.h | 6 +++--- tools/testing/selftests/mm/protection_keys.c | 7 +++++++ 5 files changed, 15 insertions(+), 14 deletions(-) commit f7ed8331ecb84aaf7b6cb822182a11bf385d8c23 Author: Kevin Brodsky Date: Mon Dec 9 09:50:12 2024 +0000 selftests/mm: define types using typedef in pkey-helpers.h Using #define to define types should be avoided. Use typedef instead. Also ensure that __u* types are actually defined by including . Link: https://lkml.kernel.org/r/20241209095019.1732120-8-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Aruna Ramakrishna Cc: Catalin Marinas Cc: Dave Hansen Cc: Joey Gouly Cc: Keith Lucas Cc: Ryan Roberts Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/pkey-helpers.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 31fdc9657bbc9a3245bce4cd8b51bcc243b6cb97 Author: Kevin Brodsky Date: Mon Dec 9 09:50:11 2024 +0000 selftests/mm: remove unused pkey helpers Commit 5f23f6d082a9 ("x86/pkeys: Add self-tests") introduced a number of helpers and functions that don't seem to have ever been used. Let's remove them. Link: https://lkml.kernel.org/r/20241209095019.1732120-7-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Aruna Ramakrishna Cc: Catalin Marinas Cc: Dave Hansen Cc: Joey Gouly Cc: Keith Lucas Cc: Ryan Roberts Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/pkey-helpers.h | 34 ---------------------------- tools/testing/selftests/mm/protection_keys.c | 34 ---------------------------- 2 files changed, 68 deletions(-) commit 46036188ea1f5266df23a6149dea0df1c77cd1c7 Author: Kevin Brodsky Date: Mon Dec 9 09:50:10 2024 +0000 selftests/mm: build with -O2 The mm kselftests are currently built with no optimisation (-O0). It's unclear why, and besides being obviously suboptimal, this also prevents the pkeys tests from working as intended. Let's build all the tests with -O2. [kevin.brodsky@arm.com: silence unused-result warnings] Link: https://lkml.kernel.org/r/20250107170110.2819685-1-kevin.brodsky@arm.com Link: https://lkml.kernel.org/r/20241209095019.1732120-6-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Aruna Ramakrishna Cc: Catalin Marinas Cc: Dave Hansen Cc: Joey Gouly Cc: Keith Lucas Cc: Ryan Roberts Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 71384f84cbbe7660023b01c1a0fa9cc7dbc487a7 Author: Kevin Brodsky Date: Mon Dec 9 09:50:09 2024 +0000 selftests/mm: fix -Warray-bounds warnings in pkey_sighandler_tests GCC doesn't like dereferencing a pointer set to 0x1 (when building at -O2): pkey_sighandler_tests.c:166:9: warning: array subscript 0 is outside array bounds of 'int[0]' [-Warray-bounds=] 166 | *(int *) (0x1) = 1; | ^~~~~~~~~~~~~~ cc1: note: source object is likely at address zero Using NULL instead seems to make it happy. This should make no difference in practice (SIGSEGV with SEGV_MAPERR will be the outcome regardless), we just need to update the expected si_addr. [kevin.brodsky@arm.com: fix clang dereferencing-null issue] Link: https://lkml.kernel.org/r/20241218153615.2267571-1-kevin.brodsky@arm.com Link: https://lkml.kernel.org/r/20241209095019.1732120-5-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Aruna Ramakrishna Cc: Catalin Marinas Cc: Dave Hansen Cc: Joey Gouly Cc: Keith Lucas Cc: Ryan Roberts Cc: Shuah Khan Cc: kernel test robot Signed-off-by: Andrew Morton tools/testing/selftests/mm/pkey_sighandler_tests.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 5b6b2799f617b3259d551980fa94f290d96bc593 Author: Kevin Brodsky Date: Mon Dec 9 09:50:08 2024 +0000 selftests/mm: fix strncpy() length GCC complains (with -O2) that the length is equal to the destination size, which is indeed invalid. Subtract 1 from the size of the array to leave room for '\0'. Link: https://lkml.kernel.org/r/20241209095019.1732120-4-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Aruna Ramakrishna Cc: Catalin Marinas Cc: Dave Hansen Cc: Joey Gouly Cc: Keith Lucas Cc: Ryan Roberts Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/write_to_hugetlbfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 516fb516383ef39d881d116c6447826356883ad0 Author: Kevin Brodsky Date: Mon Dec 9 09:50:07 2024 +0000 selftests/mm: fix -Wmaybe-uninitialized warnings A few -Wmaybe-uninitialized warnings show up when building the mm tests with -O2. None of them looks worrying; silence them by initialising the problematic variables. Link: https://lkml.kernel.org/r/20241209095019.1732120-3-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Cc: Aruna Ramakrishna Cc: Catalin Marinas Cc: Dave Hansen Cc: Joey Gouly Cc: Keith Lucas Cc: Ryan Roberts Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/ksm_tests.c | 2 +- tools/testing/selftests/mm/mremap_test.c | 2 +- tools/testing/selftests/mm/soft-dirty.c | 2 +- tools/testing/selftests/mm/uffd-unit-tests.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 8e36b2945e7057d956b5eb4a91cbf42eb5b26148 Author: Kevin Brodsky Date: Mon Dec 9 09:50:06 2024 +0000 selftests/mm: fix condition in uffd_move_test_common() Patch series "pkeys kselftests improvements". This series brings various cleanups and fixes for the mm (mostly pkeys) kselftests. The original goal was to make the pkeys tests work out of the box and without build warning - it turned out to be more involved than expected. The most important change is enabling -O2 when building all mm kselftests (patch 5). This is actually needed for the pkeys tests to run successfully (see gcc command line at the top of protection_keys.c and pkey_sighandler_tests.c), and seems to have no negative impact on the other tests. It certainly can't hurt performance! The following patches address a few obvious issues in the pkeys tests (unused code, bad scope for functions/variables, etc.) and finally make a couple of small improvements. There is one ugliness that this series does not fix: some functions in pkey-.h call functions that are actually defined in protection_keys.c. For instance, expect_fault_on_read_execonly_key() in pkey-x86.h calls expected_pkey_fault(). This means that other test programs that use pkey-helpers.h (namely pkey_sighandler_tests) would fail to link if they called such functions defined in pkey-.h. Fixing this would require a more comprehensive reorganisation of the pkey-* headers, which doesn't seem worth it (patch 9 adds a comment to pkey-helpers.h to clarify the situation). Some more details on the patches: - Patch 1 is an unrelated fix that was revealed by inspecting a warning. It seems fairly harmless though, so I thought I'd just post it as part of this series. - Patch 2-5 fix various warnings that come up by building the mm tests at -O2 and finally enable -O2. - Patch 6-12 are various cleanups for the pkeys tests. Patch 11 in particular enables is_pkeys_supported() to be called from outside protection_keys.c (patch 13 relies on this). - Patch 13-14 are small improvements to pkey_sighandler_tests.c. Many thanks to Ryan Roberts for checking that the mm tests still run fine on arm64 with those patches applied. I've also checked that the pkeys tests run fine on arm64 and x86. This patch (of 14): area_src and area_dst are saved at the beginning of the function if chunk_size > page_size. The intention is quite clearly to restore them at the end based on the same condition, but step_size is considered instead of chunk_size. Considering that step_size is a number of pages, the condition is likely to be false. Use the same condition as when saving so that the globals are restored as intended. Link: https://lkml.kernel.org/r/20241209095019.1732120-1-kevin.brodsky@arm.com Link: https://lkml.kernel.org/r/20241209095019.1732120-2-kevin.brodsky@arm.com Fixes: a2bf6a9ca805 ("selftests/mm: add UFFDIO_MOVE ioctl test") Signed-off-by: Kevin Brodsky Cc: Aruna Ramakrishna Cc: Catalin Marinas Cc: Dave Hansen Cc: Joey Gouly Cc: Keith Lucas Cc: Ryan Roberts Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/uffd-unit-tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a684d59a323834c7483a40e21b75d14063771c58 Author: David Hildenbrand Date: Thu Dec 5 10:05:08 2024 +0100 mm/memory_hotplug: don't use __GFP_HARDWALL when migrating pages via memory offlining We'll migrate pages allocated by other context; respecting the cpuset of the memory offlining context when allocating a migration target does not make sense. Drop the __GFP_HARDWALL by using GFP_KERNEL. Note that in an ideal world, migration code could figure out the cpuset of the original context and take that into consideration. Link: https://lkml.kernel.org/r/20241205090508.2095225-3-david@redhat.com Signed-off-by: David Hildenbrand Suggested-by: Vlastimil Babka Reviewed-by: Vlastimil Babka Acked-by: Oscar Salvador Cc: Zi Yan Signed-off-by: Andrew Morton mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f58498b72638262bd1b8d63143c5cf71761d57b7 Author: David Hildenbrand Date: Thu Dec 5 10:05:07 2024 +0100 mm/page_alloc: don't use __GFP_HARDWALL when migrating pages via alloc_contig*() Patch series "mm: don't use __GFP_HARDWALL when migrating remote pages". __GFP_HARDWALL means that we will be respecting the cpuset of the caller when allocating a page. However, when we are migrating remote allocations (pages allocated from other context), the cpuset of the current context is irrelevant. For memory offlining + alloc_contig_*(), this is rather obvious. There might be other such page migration users, let's start with the obvious ones. This patch (of 2): We'll migrate pages allocated by other contexts; respecting the cpuset of the alloc_contig*() caller when allocating a migration target does not make sense. Drop the __GFP_HARDWALL. Note that in an ideal world, migration code could figure out the cpuset of the original context and take that into consideration. Link: https://lkml.kernel.org/r/20241205090508.2095225-1-david@redhat.com Link: https://lkml.kernel.org/r/20241205090508.2095225-2-david@redhat.com Signed-off-by: David Hildenbrand Suggested-by: Vlastimil Babka Reviewed-by: Vlastimil Babka Reviewed-by: Oscar Salvador Cc: Zi Yan Signed-off-by: Andrew Morton mm/page_alloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fa5d61791117177e4c6aa87f7d3c170fa6f1f43b Author: Muhammad Usama Anjum Date: Mon Dec 9 23:56:24 2024 +0500 selftests/mm: mremap_test: Remove unused variable and type mismatches Remove unused variable and fix type mismatches. Link: https://lkml.kernel.org/r/20241209185624.2245158-5-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum Signed-off-by: Andrew Morton tools/testing/selftests/mm/mremap_test.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 8fee0d5c4888477c6c71143e58aabf1f5c5fe498 Author: Muhammad Usama Anjum Date: Mon Dec 9 23:56:23 2024 +0500 selftests/mm: mseal_test: remove unused variables Fix following warnings: - Remove unused variables and fix following warnings: Link: https://lkml.kernel.org/r/20241209185624.2245158-4-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum Signed-off-by: Andrew Morton tools/testing/selftests/mm/mseal_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 43448e5bbbad1fb168b728b8a7c0058ab1397375 Author: Muhammad Usama Anjum Date: Mon Dec 9 23:56:22 2024 +0500 selftests/mm: pagemap_ioctl: Fix types mismatches shown by compiler options Fix following warnings caught by compiler: - There are several type mismatches among different variables. - Remove unused variable warnings. Link: https://lkml.kernel.org/r/20241209185624.2245158-3-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum Signed-off-by: Andrew Morton tools/testing/selftests/mm/pagemap_ioctl.c | 108 ++++++++++++++++------------- tools/testing/selftests/mm/vm_util.c | 2 +- 2 files changed, 59 insertions(+), 51 deletions(-) commit 2f3577d16c8644455f215abb3c2f77aa32b967b1 Author: Muhammad Usama Anjum Date: Mon Dec 9 23:56:21 2024 +0500 selftests/mm: thp_settings: remove const from return type Patch series "selftest/mm: Remove warnings found by adding compiler flags". Recently, I reviewed a patch on the mm/kselftest mailing list about a test which had obvious type mismatch fix in it. It was strange why that wasn't caught during development and when patch was accepted. This led me to discover that those extra compiler options to catch these warnings aren't being used. When I added them, I found tens of warnings in just mm suite. In this series, I'm fixing those warnings in a few files. More fixes will be sent later. This patch (of 4): Remove cost from the return type as it is ignored anyways and generates the warning: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] Link: https://lkml.kernel.org/r/20241209185624.2245158-1-usama.anjum@collabora.com Link: https://lkml.kernel.org/r/20241209185624.2245158-2-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum Cc: David Hildenbrand Cc: Ryan Roberts Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/thp_settings.c | 4 ++-- tools/testing/selftests/mm/thp_settings.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit b487c02430104a2df7ecee8dabaf3b3b66e536bf Author: Jeff Xu Date: Fri Dec 6 19:48:39 2024 +0000 mseal: remove can_do_mseal() No code logic change. can_do_mseal() is called exclusively by mseal.c, and mseal.c is compiled only when CONFIG_64BIT flag is set in makefile. Therefore, it is unnecessary to have 32 bit stub function in the header file, remove this function and merge the logic into do_mseal(). Link: https://lkml.kernel.org/r/20241206013934.2782793-1-jeffxu@google.com Link: https://lkml.kernel.org/r/20241206194839.3030596-2-jeffxu@google.com Signed-off-by: Jeff Xu Reviewed-by: Lorenzo Stoakes Cc: Jorge Lucangeli Obes Cc: Kees Cook Cc: Liam R. Howlett Cc: Pedro Falcato Cc: Randy Dunlap Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/internal.h | 16 ---------------- mm/mseal.c | 6 +++--- 2 files changed, 3 insertions(+), 19 deletions(-) commit 052ccfbcc6cd87fe678b0ab27cc0715cb3aefb21 Author: Guillaume Morin Date: Fri Dec 6 22:28:36 2024 +0100 mm/hugetlb: support FOLL_FORCE|FOLL_WRITE Eric reported that PTRACE_POKETEXT fails when applications use hugetlb for mapping text using huge pages. Before commit 1d8d14641fd9 ("mm/hugetlb: support write-faults in shared mappings"), PTRACE_POKETEXT worked by accident, but it was buggy and silently ended up mapping pages writable into the page tables even though VM_WRITE was not set. In general, FOLL_FORCE|FOLL_WRITE does currently not work with hugetlb. Let's implement FOLL_FORCE|FOLL_WRITE properly for hugetlb, such that what used to work in the past by accident now properly works, allowing applications using hugetlb for text etc. to get properly debugged. This change might also be required to implement uprobes support for hugetlb [1]. [1] https://lore.kernel.org/lkml/ZiK50qob9yl5e0Xz@bender.morinfr.org/ Link: https://lkml.kernel.org/r/Z1NshNfWuzUCPebA@bender.morinfr.org Signed-off-by: Guillaume Morin Cc: Muchun Song Cc: Andrew Morton Cc: Peter Xu Cc: David Hildenbrand Cc: Eric Hagberg Signed-off-by: Andrew Morton mm/gup.c | 91 +++++++++++++++++++++++++++++------------------------------- mm/hugetlb.c | 17 ++++++------ 2 files changed, 53 insertions(+), 55 deletions(-) commit fa00b8ef1803fe133b4897c25227aa0d298dd093 Author: Lorenzo Stoakes Date: Fri Dec 6 21:28:46 2024 +0000 mm: perform all memfd seal checks in a single place We no longer actually need to perform these checks in the f_op->mmap() hook any longer. We already moved the operation which clears VM_MAYWRITE on a read-only mapping of a write-sealed memfd in order to work around the restrictions imposed by commit 5de195060b2e ("mm: resolve faulty mmap_region() error path behaviour"). There is no reason for us not to simply go ahead and additionally check to see if any pre-existing seals are in place here rather than defer this to the f_op->mmap() hook. By doing this we remove more logic from shmem_mmap() which doesn't belong there, as well as doing the same for hugetlbfs_file_mmap(). We also remove dubious shared logic in mm.h which simply does not belong there either. It makes sense to do these checks at the earliest opportunity, we know these are shmem (or hugetlbfs) mappings whose relevant VMA flags will not change from the invoking do_mmap() so there is simply no need to wait. This also means the implementation of further memfd seal flags can be done within mm/memfd.c and also have the opportunity to modify VMA flags as necessary early in the mapping logic. [lorenzo.stoakes@oracle.com: fix typos in !memfd inline stub] Link: https://lkml.kernel.org/r/7dee6c5d-480b-4c24-b98e-6fa47dbd8a23@lucifer.local Link: https://lkml.kernel.org/r/20241206212846.210835-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Tested-by: Isaac J. Manjarres Cc: Hugh Dickins Cc: Jann Horn Cc: Kalesh Singh Cc: Liam R. Howlett Cc: Muchun Song Cc: Vlastimil Babka Cc: Jeff Xu Signed-off-by: Andrew Morton fs/hugetlbfs/inode.c | 5 ----- include/linux/memfd.h | 23 +++++++++++---------- include/linux/mm.h | 55 --------------------------------------------------- mm/memfd.c | 44 ++++++++++++++++++++++++++++++++++++++++- mm/mmap.c | 12 ++++++++--- mm/shmem.c | 6 ------ 6 files changed, 63 insertions(+), 82 deletions(-) commit 24bd843b1d1017ffc479246c7fc17537eb180763 Author: Lorenzo Stoakes Date: Fri Dec 6 22:50:36 2024 +0000 mm: enforce __must_check on VMA merge and split It is of critical importance to check the return results on VMA merge (and split), failure to do so can result in use-after-free's. This bug has recurred, so have the compiler enforce this check to prevent any future repetition. Link: https://lkml.kernel.org/r/20241206225036.273103-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Acked-by: Vlastimil Babka Cc: Jann Horn Signed-off-by: Andrew Morton mm/vma.c | 8 +++++--- mm/vma.h | 26 +++++++++++++++----------- 2 files changed, 20 insertions(+), 14 deletions(-) commit 79dc2bff4d8d36f04d7683916eb6d4eb9ea04da4 Author: Andrew Morton Date: Mon Dec 9 18:20:01 2024 -0800 mm/damon/tests/vaddr-kunit.h: reduce stack consumption After "mm: move per-vma lock into vm_area_struct" we're hitting mm/damon/tests/vaddr-kunit.h: In function 'damon_test_three_regions_in_vmas': mm/damon/tests/vaddr-kunit.h:92:1: error: the frame size of 3280 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Fix by moving all those vmas off the stack. [akpm@linux-foundation.org: fix build] Closes: https://lkml.kernel.org/r/20241209170829.11311e70@canb.auug.org.au Reported-by: Stephen Rothwell Reviewed-by: SeongJae Park Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton mm/damon/tests/vaddr-kunit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f030e32e4499942a223677169d006085d8c57ce Author: Suren Baghdasaryan Date: Fri Nov 22 09:44:16 2024 -0800 mm: introduce mmap_lock_speculate_{try_begin|retry} Add helper functions to speculatively perform operations without read-locking mmap_lock, expecting that mmap_lock will not be write-locked and mm is not modified from under us. [akpm@linux-foundation.org: use read_seqcount_retry() in mmap_lock_speculate_retry(), per Wei Yang] Link: https://lkml.kernel.org/r/20241122174416.1367052-3-surenb@google.com Suggested-by: Peter Zijlstra Signed-off-by: Suren Baghdasaryan Reviewed-by: Liam R. Howlett Cc: Christian Brauner Cc: David Hildenbrand Cc: David Howells Cc: Davidlohr Bueso Cc: Hillf Danton Cc: Hugh Dickins Cc: Jann Horn Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Lorenzo Stoakes Cc: Mateusz Guzik Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Minchan Kim Cc: Oleg Nesterov Cc: Pasha Tatashin Cc: Paul E. McKenney Cc: Peter Xu Cc: Shakeel Butt Cc: Sourav Panda Cc: Vlastimil Babka Cc: Wei Yang Signed-off-by: Andrew Morton include/linux/mmap_lock.h | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) commit e5e7fb278e5924f29ceab42bbbb891cde528f7cc Author: Suren Baghdasaryan Date: Fri Nov 22 09:44:15 2024 -0800 mm: convert mm_lock_seq to a proper seqcount Convert mm_lock_seq to be seqcount_t and change all mmap_write_lock variants to increment it, in-line with the usual seqcount usage pattern. This lets us check whether the mmap_lock is write-locked by checking mm_lock_seq.sequence counter (odd=locked, even=unlocked). This will be used when implementing mmap_lock speculation functions. As a result vm_lock_seq is also change to be unsigned to match the type of mm_lock_seq.sequence. Link: https://lkml.kernel.org/r/20241122174416.1367052-2-surenb@google.com Suggested-by: Peter Zijlstra Signed-off-by: Suren Baghdasaryan Reviewed-by: Liam R. Howlett Cc: Christian Brauner Cc: David Hildenbrand Cc: David Howells Cc: Davidlohr Bueso Cc: Hillf Danton Cc: Hugh Dickins Cc: Jann Horn Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Lorenzo Stoakes Cc: Mateusz Guzik Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Minchan Kim Cc: Oleg Nesterov Cc: Pasha Tatashin Cc: Paul E. McKenney Cc: Peter Xu Cc: Shakeel Butt Cc: Sourav Panda Cc: Vlastimil Babka Cc: Wei Yang Signed-off-by: Andrew Morton include/linux/mm.h | 12 ++++----- include/linux/mm_types.h | 7 +++-- include/linux/mmap_lock.h | 55 ++++++++++++++++++++++++++-------------- kernel/fork.c | 5 +--- mm/init-mm.c | 2 +- tools/testing/vma/vma.c | 4 +-- tools/testing/vma/vma_internal.h | 4 +-- 7 files changed, 53 insertions(+), 36 deletions(-) commit dba4761a3e40433a8d9e434d515ecbae19b3dcb1 Author: Suren Baghdasaryan Date: Fri Nov 22 09:44:14 2024 -0800 seqlock: add raw_seqcount_try_begin Add raw_seqcount_try_begin() to opens a read critical section of the given seqcount_t if the counter is even. This enables eliding the critical section entirely if the counter is odd, instead of doing the speculation knowing it will fail. Link: https://lkml.kernel.org/r/20241122174416.1367052-1-surenb@google.com Signed-off-by: Suren Baghdasaryan Reviewed-by: David Hildenbrand Reviewed-by: Liam R. Howlett Suggested-by: Peter Zijlstra Cc: Christian Brauner Cc: David Howells Cc: Davidlohr Bueso Cc: Hillf Danton Cc: Hugh Dickins Cc: Jann Horn Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Lorenzo Stoakes Cc: Mateusz Guzik Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Minchan Kim Cc: Oleg Nesterov Cc: Pasha Tatashin Cc: Paul E. McKenney Cc: Peter Xu Cc: Shakeel Butt Cc: Sourav Panda Cc: Vlastimil Babka Cc: Wei Yang Signed-off-by: Andrew Morton include/linux/seqlock.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit a474d84359d1a25feae2aafacf35dcaa196fe5f3 Author: Guo Weikang Date: Thu Dec 5 17:45:21 2024 +0800 mm/shmem: refactor to reuse vfs_parse_monolithic_sep for option parsing shmem_parse_options() is refactored to use vfs_parse_monolithic_sep() with a custom separator function, shmem_next_opt(). This eliminates redundant logic for parsing comma-separated options and ensures consistency with other kernel code that uses the same interface. The vfs_parse_monolithic_sep() helper was introduced in commit e001d1447cd4 ("fs: factor out vfs_parse_monolithic_sep() helper"). Link: https://lkml.kernel.org/r/20241205094521.1244678-1-guoweikang.kernel@gmail.com Signed-off-by: Guo Weikang Cc: Amir Goldstein Cc: Hugh Dickins Signed-off-by: Andrew Morton mm/shmem.c | 65 ++++++++++++++++++++++++++------------------------------------ 1 file changed, 27 insertions(+), 38 deletions(-) commit 19b65ffae985c16da237edccae324bcbf1a5408e Author: Lorenzo Stoakes Date: Thu Dec 5 19:07:48 2024 +0000 selftests/mm: add fork CoW guard page test When we fork anonymous pages, apply a guard page then remove it, the previous CoW mapping is cleared. This might not be obvious to an outside observer without taking some time to think about how the overall process functions, so document that this is the case through a test, which also usefully asserts that the behaviour is as we expect. This is grouped with other, more important, fork tests that ensure that guard pages are correctly propagated on fork. Fix a typo in a nearby comment at the same time. [ryan.roberts@arm.com: static process_madvise() wrapper for guard-pages] Link: https://lkml.kernel.org/r/20250107142937.1870478-1-ryan.roberts@arm.com Link: https://lkml.kernel.org/r/20241205190748.115656-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Signed-off-by: Ryan Roberts Reviewed-by: Liam R. Howlett Cc: Jann Horn Cc: Shuah Khan Cc: Vlastimil Babka Cc: Ryan Roberts Signed-off-by: Andrew Morton tools/testing/selftests/mm/guard-pages.c | 83 +++++++++++++++++++++++++++++-- tools/testing/selftests/mm/run_vmtests.sh | 5 ++ 2 files changed, 85 insertions(+), 3 deletions(-) commit 67c8b11bd58aee4644c9a6e495d0c234771e9175 Author: Wenchao Hao Date: Mon Dec 2 20:47:30 2024 +0800 mm: add per-order mTHP swap-in fallback/fallback_charge counters Currently, large folio swap-in is supported, but we lack a method to analyze their success ratio. Similar to anon_fault_fallback, we introduce per-order mTHP swpin_fallback and swpin_fallback_charge counters for calculating their success ratio. The new counters are located at: /sys/kernel/mm/transparent_hugepage/hugepages-/stats/ swpin_fallback swpin_fallback_charge Link: https://lkml.kernel.org/r/20241202124730.2407037-1-haowenchao22@gmail.com Signed-off-by: Wenchao Hao Reviewed-by: Barry Song Reviewed-by: Lance Yang Cc: Baolin Wang Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Matthew Wilcox Cc: Peter Xu Cc: Ryan Roberts Cc: Usama Arif Signed-off-by: Andrew Morton Documentation/admin-guide/mm/transhuge.rst | 10 ++++++++++ include/linux/huge_mm.h | 2 ++ mm/huge_memory.c | 6 ++++++ mm/memory.c | 2 ++ 4 files changed, 20 insertions(+) commit 4817f70c25b63ee5e6fd42d376700c058ae16a96 Author: Qi Zheng Date: Wed Dec 4 19:09:51 2024 +0800 x86: select ARCH_SUPPORTS_PT_RECLAIM if X86_64 Now, x86 has fully supported the CONFIG_PT_RECLAIM feature, and reclaiming PTE pages is profitable only on 64-bit systems, so select ARCH_SUPPORTS_PT_RECLAIM if X86_64. Link: https://lkml.kernel.org/r/841c1f35478d5354872d307888979c9e20de9c09.1733305182.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Catalin Marinas Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Mel Gorman Cc: Muchun Song Cc: Peter Xu Cc: Will Deacon Cc: Zach O'Keefe Cc: Dan Carpenter Signed-off-by: Andrew Morton arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 718b13861d2256ac95d65b892953282a63faf240 Author: Qi Zheng Date: Wed Dec 4 19:09:50 2024 +0800 x86: mm: free page table pages by RCU instead of semi RCU Now, if CONFIG_MMU_GATHER_RCU_TABLE_FREE is selected, the page table pages will be freed by semi RCU, that is: - batch table freeing: asynchronous free by RCU - single table freeing: IPI + synchronous free In this way, the page table can be lockless traversed by disabling IRQ in paths such as fast GUP. But this is not enough to free the empty PTE page table pages in paths other that munmap and exit_mmap path, because IPI cannot be synchronized with rcu_read_lock() in pte_offset_map{_lock}(). In preparation for supporting empty PTE page table pages reclaimation, let single table also be freed by RCU like batch table freeing. Then we can also use pte_offset_map() etc to prevent PTE page from being freed. Like pte_free_defer(), we can also safely use ptdesc->pt_rcu_head to free the page table pages: - The pt_rcu_head is unioned with pt_list and pmd_huge_pte. - For pt_list, it is used to manage the PGD page in x86. Fortunately tlb_remove_table() will not be used for free PGD pages, so it is safe to use pt_rcu_head. - For pmd_huge_pte, it is used for THPs, so it is safe. After applying this patch, if CONFIG_PT_RECLAIM is enabled, the function call of free_pte() is as follows: free_pte pte_free_tlb __pte_free_tlb ___pte_free_tlb paravirt_tlb_remove_table tlb_remove_table [!CONFIG_PARAVIRT, Xen PV, Hyper-V, KVM] [no-free-memory slowpath:] tlb_table_invalidate tlb_remove_table_one __tlb_remove_table_one [frees via RCU] [fastpath:] tlb_table_flush tlb_remove_table_free [frees via RCU] native_tlb_remove_table [CONFIG_PARAVIRT on native] tlb_remove_table [see above] Link: https://lkml.kernel.org/r/0287d442a973150b0e1019cc406e6322d148277a.1733305182.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Catalin Marinas Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Mel Gorman Cc: Muchun Song Cc: Peter Xu Cc: Will Deacon Cc: Zach O'Keefe Cc: Dan Carpenter Signed-off-by: Andrew Morton arch/x86/include/asm/tlb.h | 20 ++++++++++++++++++++ arch/x86/kernel/paravirt.c | 7 +++++++ arch/x86/mm/pgtable.c | 10 +++++++++- include/linux/mm_types.h | 4 +++- mm/mmu_gather.c | 9 ++++++++- 5 files changed, 47 insertions(+), 3 deletions(-) commit 6375e95f381e3dc85065b6f74263a61522736203 Author: Qi Zheng Date: Wed Dec 4 19:09:49 2024 +0800 mm: pgtable: reclaim empty PTE page in madvise(MADV_DONTNEED) Now in order to pursue high performance, applications mostly use some high-performance user-mode memory allocators, such as jemalloc or tcmalloc. These memory allocators use madvise(MADV_DONTNEED or MADV_FREE) to release physical memory, but neither MADV_DONTNEED nor MADV_FREE will release page table memory, which may cause huge page table memory usage. The following are a memory usage snapshot of one process which actually happened on our server: VIRT: 55t RES: 590g VmPTE: 110g In this case, most of the page table entries are empty. For such a PTE page where all entries are empty, we can actually free it back to the system for others to use. As a first step, this commit aims to synchronously free the empty PTE pages in madvise(MADV_DONTNEED) case. We will detect and free empty PTE pages in zap_pte_range(), and will add zap_details.reclaim_pt to exclude cases other than madvise(MADV_DONTNEED). Once an empty PTE is detected, we first try to hold the pmd lock within the pte lock. If successful, we clear the pmd entry directly (fast path). Otherwise, we wait until the pte lock is released, then re-hold the pmd and pte locks and loop PTRS_PER_PTE times to check pte_none() to re-detect whether the PTE page is empty and free it (slow path). For other cases such as madvise(MADV_FREE), consider scanning and freeing empty PTE pages asynchronously in the future. The following code snippet can show the effect of optimization: mmap 50G while (1) { for (; i < 1024 * 25; i++) { touch 2M memory madvise MADV_DONTNEED 2M } } As we can see, the memory usage of VmPTE is reduced: before after VIRT 50.0 GB 50.0 GB RES 3.1 MB 3.1 MB VmPTE 102640 KB 240 KB [zhengqi.arch@bytedance.com: fix uninitialized symbol 'ptl'] Link: https://lkml.kernel.org/r/20241206112348.51570-1-zhengqi.arch@bytedance.com Link: https://lore.kernel.org/linux-mm/224e6a4e-43b5-4080-bdd8-b0a6fb2f0853@stanley.mountain/ Link: https://lkml.kernel.org/r/92aba2b319a734913f18ba41e7d86a265f0b84e2.1733305182.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Mel Gorman Cc: Muchun Song Cc: Peter Xu Cc: Peter Zijlstra Cc: Will Deacon Cc: Zach O'Keefe Cc: Dan Carpenter Signed-off-by: Andrew Morton include/linux/mm.h | 1 + mm/Kconfig | 15 ++++++++++++ mm/Makefile | 1 + mm/internal.h | 19 +++++++++++++++ mm/madvise.c | 7 +++++- mm/memory.c | 21 ++++++++++++++-- mm/pt_reclaim.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 132 insertions(+), 3 deletions(-) commit 2686d514c345243e06dba40298a13c7803400a61 Author: Qi Zheng Date: Wed Dec 4 19:09:48 2024 +0800 mm: make zap_pte_range() handle full within-PMD range In preparation for reclaiming empty PTE pages, this commit first makes zap_pte_range() to handle the full within-PMD range, so that we can more easily detect and free PTE pages in this function in subsequent commits. Link: https://lkml.kernel.org/r/76c95ee641da7808cd66d642ab95841df4048295.1733305182.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Reviewed-by: Jann Horn Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Mel Gorman Cc: Muchun Song Cc: Peter Xu Cc: Peter Zijlstra Cc: Will Deacon Cc: Zach O'Keefe Cc: Dan Carpenter Signed-off-by: Andrew Morton mm/memory.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4059971c79fc47d27bf773bd372077cdf47236d9 Author: Qi Zheng Date: Wed Dec 4 19:09:47 2024 +0800 mm: do_zap_pte_range: return any_skipped information to the caller Let the caller of do_zap_pte_range() know whether we skip zap ptes or reinstall uffd-wp ptes through any_skipped parameter, so that subsequent commits can use this information in zap_pte_range() to detect whether the PTE page can be reclaimed. Link: https://lkml.kernel.org/r/59f33ec9f74e9f058ed319b0bfadd76b0f7adf9b.1733305182.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Mel Gorman Cc: Muchun Song Cc: Peter Xu Cc: Peter Zijlstra Cc: Will Deacon Cc: Zach O'Keefe Cc: Dan Carpenter Signed-off-by: Andrew Morton mm/memory.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) commit 735fad44b5a86edf0fe65a8e8d43595bd1cf1d58 Author: Qi Zheng Date: Wed Dec 4 19:09:46 2024 +0800 mm: zap_install_uffd_wp_if_needed: return whether uffd-wp pte has been re-installed In some cases, we'll replace the none pte with an uffd-wp swap special pte marker when necessary. Let's expose this information to the caller through the return value, so that subsequent commits can use this information to detect whether the PTE page is empty. Link: https://lkml.kernel.org/r/9d4516554724eda87d6576468042a1741c475413.1733305182.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Mel Gorman Cc: Muchun Song Cc: Peter Xu Cc: Peter Zijlstra Cc: Will Deacon Cc: Zach O'Keefe Cc: Dan Carpenter Signed-off-by: Andrew Morton include/linux/mm_inline.h | 11 +++++++---- mm/memory.c | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 8 deletions(-) commit 45fec1e595145f1ee22fe8ebc087cf30ba0f03ea Author: Qi Zheng Date: Wed Dec 4 19:09:45 2024 +0800 mm: skip over all consecutive none ptes in do_zap_pte_range() Skip over all consecutive none ptes in do_zap_pte_range(), which helps optimize away need_resched() + force_break + incremental pte/addr increments etc. Link: https://lkml.kernel.org/r/8ecffbf990afd1c8ccc195a2ec321d55f0923908.1733305182.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Suggested-by: David Hildenbrand Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Dave Hansen Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Mel Gorman Cc: Muchun Song Cc: Peter Xu Cc: Peter Zijlstra Cc: Will Deacon Cc: Zach O'Keefe Cc: Dan Carpenter Signed-off-by: Andrew Morton mm/memory.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit 117cdb05e32dc60d0dec04bc73e47ebabc1b383a Author: Qi Zheng Date: Wed Dec 4 19:09:44 2024 +0800 mm: introduce do_zap_pte_range() This commit introduces do_zap_pte_range() to actually zap the PTEs, which will help improve code readability and facilitate secondary checking of the processed PTEs in the future. No functional change. Link: https://lkml.kernel.org/r/c3fd16807f83bb7d7a376cc6de023a9f5ead17da.1733305182.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Reviewed-by: Jann Horn Acked-by: David Hildenbrand Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Dave Hansen Cc: David Rientjes Cc: Hugh Dickins Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Mel Gorman Cc: Muchun Song Cc: Peter Xu Cc: Peter Zijlstra Cc: Will Deacon Cc: Zach O'Keefe Cc: Dan Carpenter Signed-off-by: Andrew Morton mm/memory.c | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) commit fabc0e8dac5badeff0c5a6a0c1958490bdc80fc1 Author: Qi Zheng Date: Wed Dec 4 19:09:43 2024 +0800 mm: introduce zap_nonpresent_ptes() Similar to zap_present_ptes(), let's introduce zap_nonpresent_ptes() to handle non-present ptes, which can improve code readability. No functional change. Link: https://lkml.kernel.org/r/009ca882036d9c7a9f815489cfeafe0bdb79d62d.1733305182.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Reviewed-by: Jann Horn Acked-by: David Hildenbrand Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Dave Hansen Cc: David Rientjes Cc: Hugh Dickins Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Mel Gorman Cc: Muchun Song Cc: Peter Xu Cc: Peter Zijlstra Cc: Will Deacon Cc: Zach O'Keefe Cc: Dan Carpenter Signed-off-by: Andrew Morton mm/memory.c | 136 ++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 73 insertions(+), 63 deletions(-) commit dd95d2782a251637f60c068ac7aeb3eebf57ae3b Author: Qi Zheng Date: Wed Dec 4 19:09:42 2024 +0800 mm: userfaultfd: recheck dst_pmd entry in move_pages_pte() In move_pages_pte(), since dst_pte needs to be none, the subsequent pte_same() check cannot prevent the dst_pte page from being freed concurrently, so we also need to abtain dst_pmdval and recheck pmd_same(). Otherwise, once we support empty PTE page reclaimation for anonymous pages, it may result in moving the src_pte page into the dts_pte page that is about to be freed by RCU. [zhengqi.arch@bytedance.com: remove WARN_ON_ONCE()s] Link: https://lkml.kernel.org/r/20241210084156.89877-1-zhengqi.arch@bytedance.com Link: https://lkml.kernel.org/r/8108c262757fc492626f3a2ffc44b775f2710e16.1733305182.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Jann Horn Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Mel Gorman Cc: Muchun Song Cc: Peter Xu Cc: Peter Zijlstra Cc: Will Deacon Cc: Zach O'Keefe Cc: Dan Carpenter Signed-off-by: Andrew Morton mm/userfaultfd.c | 55 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 20 deletions(-) commit 6c18ec9af86ce96245324dd0cd5067dcfb026508 Author: Qi Zheng Date: Wed Dec 4 19:09:41 2024 +0800 mm: khugepaged: recheck pmd state in retract_page_tables() Patch series "synchronously scan and reclaim empty user PTE pages", v4. Previously, we tried to use a completely asynchronous method to reclaim empty user PTE pages [1]. After discussing with David Hildenbrand, we decided to implement synchronous reclaimation in the case of madvise(MADV_DONTNEED) as the first step. So this series aims to synchronously free the empty PTE pages in madvise(MADV_DONTNEED) case. We will detect and free empty PTE pages in zap_pte_range(), and will add zap_details.reclaim_pt to exclude cases other than madvise(MADV_DONTNEED). In zap_pte_range(), mmu_gather is used to perform batch tlb flushing and page freeing operations. Therefore, if we want to free the empty PTE page in this path, the most natural way is to add it to mmu_gather as well. Now, if CONFIG_MMU_GATHER_RCU_TABLE_FREE is selected, mmu_gather will free page table pages by semi RCU: - batch table freeing: asynchronous free by RCU - single table freeing: IPI + synchronous free But this is not enough to free the empty PTE page table pages in paths other that munmap and exit_mmap path, because IPI cannot be synchronized with rcu_read_lock() in pte_offset_map{_lock}(). So we should let single table also be freed by RCU like batch table freeing. As a first step, we supported this feature on x86_64 and selectd the newly introduced CONFIG_ARCH_SUPPORTS_PT_RECLAIM. For other cases such as madvise(MADV_FREE), consider scanning and freeing empty PTE pages asynchronously in the future. Note: issues related to TLB flushing are not new to this series and are tracked in the separate RFC patch [3]. And more context please refer to this thread [4]. [1]. https://lore.kernel.org/lkml/cover.1718267194.git.zhengqi.arch@bytedance.com/ [2]. https://lore.kernel.org/lkml/cover.1727332572.git.zhengqi.arch@bytedance.com/ [3]. https://lore.kernel.org/lkml/20240815120715.14516-1-zhengqi.arch@bytedance.com/ [4]. https://lore.kernel.org/lkml/6f38cb19-9847-4f70-bbe7-06881bb016be@bytedance.com/ This patch (of 11): In retract_page_tables(), the lock of new_folio is still held, we will be blocked in the page fault path, which prevents the pte entries from being set again. So even though the old empty PTE page may be concurrently freed and a new PTE page is filled into the pmd entry, it is still empty and can be removed. So just refactor the retract_page_tables() a little bit and recheck the pmd state after holding the pmd lock. Link: https://lkml.kernel.org/r/cover.1733305182.git.zhengqi.arch@bytedance.com Link: https://lkml.kernel.org/r/70a51804cd19d44ccaf031825d9fb6eaf92f2bad.1733305182.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Suggested-by: Jann Horn Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: Hugh Dickins Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Mel Gorman Cc: Muchun Song Cc: Peter Xu Cc: Peter Zijlstra Cc: Will Deacon Cc: Zach O'Keefe Cc: Dan Carpenter Signed-off-by: Andrew Morton Documentation/mm/process_addrs.rst | 4 ++++ mm/khugepaged.c | 45 ++++++++++++++++++++++++++------------ 2 files changed, 35 insertions(+), 14 deletions(-) commit d8fd84dd4ce72e371a6604809e25e16e24b997d4 Author: David Hildenbrand Date: Wed Dec 4 16:31:00 2024 +0100 mm/hugetlb: don't map folios writable without VM_WRITE when copying during fork() If we have to trigger a hugetlb folio copy during fork() because the anon folio might be pinned, we currently unconditionally create a writable PTE. However, the VMA might not have write permissions (VM_WRITE) at that point. Fix it by checking the VMA for VM_WRITE. Make the code less error prone by moving checking for VM_WRITE into make_huge_pte(), and letting callers only specify whether we should try making it writable. A simple reproducer that longterm-pins the folios using liburing to then mprotect(PROT_READ) the folios befor fork() [1] results in: Before: [FAIL] access should not have worked After: [PASS] access did not work as expected [1] https://gitlab.com/davidhildenbrand/scratchspace/-/raw/main/reproducers/hugetlb-mkwrite-fork.c This is rather a corner case, so stable might not be warranted. Link: https://lkml.kernel.org/r/20241204153100.1967364-1-david@redhat.com Fixes: 4eae4efa2c29 ("hugetlb: do early cow when page pinned on src mm") Signed-off-by: David Hildenbrand Acked-by: Peter Xu Cc: Muchun Song Cc: Guillaume Morin Signed-off-by: Andrew Morton mm/hugetlb.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit d0f14f7ee0e2d5df447d54487ae0c3aee5a7208f Author: Koichiro Den Date: Thu Dec 5 01:55:03 2024 +0900 hugetlb: prioritize surplus allocation from current node Previously, surplus allocations triggered by mmap were typically made from the node where the process was running. On a page fault, the area was reliably dequeued from the hugepage_freelists for that node. However, since commit 003af997c8a9 ("hugetlb: force allocating surplus hugepages on mempolicy allowed nodes"), dequeue_hugetlb_folio_vma() may fall back to other nodes unnecessarily even if there is no MPOL_BIND policy, causing folios to be dequeued from nodes other than the current one. Also, allocating from the node where the current process is running is likely to result in a performance win, as mmap-ing processes often touch the area not so long after allocation. This change minimizes surprises for users relying on the previous behavior while maintaining the benefit introduced by the commit. So, prioritize the node the current process is running on when possible. Link: https://lkml.kernel.org/r/20241204165503.628784-1-koichiro.den@canonical.com Signed-off-by: Koichiro Den Acked-by: Aristeu Rozanski Cc: Aristeu Rozanski Cc: David Hildenbrand Cc: Muchun Song Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/hugetlb.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit d5ea5e5e50dffd13fccedb690a0a1f27be56191a Author: Jan Kara Date: Wed Dec 4 19:10:16 2024 +0100 readahead: properly shorten readahead when falling back to do_page_cache_ra() When we succeed in creating some folios in page_cache_ra_order() but then need to fallback to single page folios, we don't shorten the amount to read passed to do_page_cache_ra() by the amount we've already read. This then results in reading more and also in placing another readahead mark in the middle of the readahead window which confuses readahead code. Fix the problem by properly reducing number of pages to read. Unlike previous attempt at this fix (commit 7c877586da31) which had to be reverted, we are now careful to check there is indeed something to read so that we don't submit negative-sized readahead. Link: https://lkml.kernel.org/r/20241204181016.15273-3-jack@suse.cz Signed-off-by: Jan Kara Cc: Matthew Wilcox Signed-off-by: Andrew Morton mm/readahead.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 7a1eb89f79188ec32599064eca7c14d42260760a Author: Jan Kara Date: Wed Dec 4 19:10:15 2024 +0100 readahead: don't shorten readahead window in read_pages() Patch series "readahead: Reintroduce fix for improper RA window sizing". This small patch series reintroduces a fix of readahead window confusion (and thus read throughput reduction) when page_cache_ra_order() ends up failing due to folios already present in the page cache. After thinking about this for a while I have ended up with a dumb fix that just rechecks if we have something to read before calling do_page_cache_ra(). This fixes the problem reported in [1]. I still think it doesn't make much sense to update readahead window size in read_pages() so patch 1 removes that but the real fix in patch 2 does not depend on it. [1] https://lore.kernel.org/all/49648605-d800-4859-be49-624bbe60519d@gmail.com This patch (of 2): When ->readahead callback doesn't read all requested pages, read_pages() shortens the readahead window (ra->size). However we don't know why pages were not read and what appropriate window size is. So don't try to secondguess the filesystem. If it needs different readahead window, it should set it manually similarly as during expansion the filesystem can use readahead_expand(). Link: https://lkml.kernel.org/r/20241204181016.15273-1-jack@suse.cz Link: https://lkml.kernel.org/r/20241204181016.15273-2-jack@suse.cz Signed-off-by: Jan Kara Cc: Matthew Wilcox Signed-off-by: Andrew Morton mm/readahead.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 1fb4315b0c6f97c7ddc8aff0fe13aa442a69efc1 Author: David Hildenbrand Date: Tue Dec 3 10:47:32 2024 +0100 powernv/memtrace: use __GFP_ZERO with alloc_contig_pages() alloc_contig_pages()->alloc_contig_range() now supports __GFP_ZERO, so let's use that instead to resolve our TODO. Link: https://lkml.kernel.org/r/20241203094732.200195-7-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Christophe Leroy Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Vishal Moola (Oracle) Cc: Zi Yan Signed-off-by: Andrew Morton arch/powerpc/platforms/powernv/memtrace.c | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) commit 7b755570064fcb9cde37afd48f6bc65151097ba7 Author: David Hildenbrand Date: Tue Dec 3 10:47:31 2024 +0100 mm/page_alloc: forward the gfp flags from alloc_contig_range() to post_alloc_hook() In the __GFP_COMP case, we already pass the gfp_flags to prep_new_page()->post_alloc_hook(). However, in the !__GFP_COMP case, we essentially pass only hardcoded __GFP_MOVABLE to post_alloc_hook(), preventing some action modifiers from being effective.. Let's pass our now properly adjusted gfp flags there as well. This way, we can now support __GFP_ZERO for alloc_contig_*(). As a side effect, we now also support __GFP_SKIP_ZERO and__GFP_ZEROTAGS; but we'll keep the more special stuff (KASAN, NOLOCKDEP) disabled for now. It's worth noting that with __GFP_ZERO, we might unnecessarily zero pages when we have to release part of our range using free_contig_range() again. This can be optimized in the future, if ever required; the caller we'll be converting (powernv/memtrace) next won't trigger this. Link: https://lkml.kernel.org/r/20241203094732.200195-6-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Vlastimil Babka Reviewed-by: Oscar Salvador Cc: Christophe Leroy Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Vishal Moola (Oracle) Cc: Zi Yan Signed-off-by: Andrew Morton mm/page_alloc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit f6037a4a686523dee1967ef7620349822e019ff8 Author: David Hildenbrand Date: Tue Dec 3 10:47:30 2024 +0100 mm/page_alloc: sort out the alloc_contig_range() gfp flags mess It's all a bit complicated for alloc_contig_range(). For example, we don't support many flags, so let's start bailing out on unsupported ones -- ignoring the placement hints, as we are already given the range to allocate. While we currently set cc.gfp_mask, in __alloc_contig_migrate_range() we simply create yet another GFP mask whereby we ignore the reclaim flags specify by the caller. That looks very inconsistent. Let's clean it up, constructing the gfp flags used for compaction/migration exactly once. Update the documentation of the gfp_mask parameter for alloc_contig_range() and alloc_contig_pages(). Link: https://lkml.kernel.org/r/20241203094732.200195-5-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Zi Yan Reviewed-by: Vlastimil Babka Reviewed-by: Oscar Salvador Cc: Christophe Leroy Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton mm/page_alloc.c | 48 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) commit 2202f51e9215bf9601402d6aa09e10c1dbb2a72d Author: David Hildenbrand Date: Tue Dec 3 10:47:29 2024 +0100 mm/page_alloc: make __alloc_contig_migrate_range() static The single user is in page_alloc.c. Link: https://lkml.kernel.org/r/20241203094732.200195-4-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Zi Yan Reviewed-by: Vlastimil Babka Reviewed-by: Oscar Salvador Reviewed-by: Vishal Moola (Oracle) Cc: Christophe Leroy Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Naveen N Rao Cc: Nicholas Piggin Signed-off-by: Andrew Morton mm/internal.h | 4 ---- mm/page_alloc.c | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) commit b9e40605daa94ae1817ceb5ce9e9b34093c6d850 Author: David Hildenbrand Date: Tue Dec 3 10:47:28 2024 +0100 mm/page_isolation: don't pass gfp flags to start_isolate_page_range() The parameter is unused, so let's stop passing it. Link: https://lkml.kernel.org/r/20241203094732.200195-3-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Zi Yan Reviewed-by: Vlastimil Babka Reviewed-by: Oscar Salvador Reviewed-by: Vishal Moola (Oracle) Cc: Christophe Leroy Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Naveen N Rao Cc: Nicholas Piggin Signed-off-by: Andrew Morton include/linux/page-isolation.h | 2 +- mm/memory_hotplug.c | 3 +-- mm/page_alloc.c | 2 +- mm/page_isolation.c | 4 +--- 4 files changed, 4 insertions(+), 7 deletions(-) commit b7bc81e83bb40143ab4b8c5879054c32009f53d2 Author: David Hildenbrand Date: Tue Dec 3 10:47:27 2024 +0100 mm/page_isolation: don't pass gfp flags to isolate_single_pageblock() Patch series "mm/page_alloc: gfp flags cleanups for alloc_contig_*()", v2. Let's clean up the gfp flags handling, and support __GFP_ZERO, such that we can finally remove the TODO in memtrace code. This patch (of 6): The flags are no longer used, we can stop passing them to isolate_single_pageblock(). Link: https://lkml.kernel.org/r/20241203094732.200195-1-david@redhat.com Link: https://lkml.kernel.org/r/20241203094732.200195-2-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Zi Yan Reviewed-by: Vlastimil Babka Reviewed-by: Oscar Salvador Reviewed-by: Vishal Moola (Oracle) Cc: Christophe Leroy Cc: David Hildenbrand Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Naveen N Rao Cc: Nicholas Piggin Signed-off-by: Andrew Morton mm/page_isolation.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit dd467f92db404ca2e061889ad1b6dd6221390222 Author: David Hildenbrand Date: Tue Dec 3 11:20:50 2024 +0100 mm/memory_hotplug: move debug_pagealloc_map_pages() into online_pages_range() In the near future, we want to have a single way to handover PageOffline pages to the buddy, whereby they could have: (a) Never been exposed to the buddy before: kept PageOffline when onlining the memory block. (b) Been allocated from the buddy, for example using alloc_contig_range() to then be set PageOffline, Let's start by making generic_online_page()->__free_pages_core() less special compared to ordinary page freeing (e.g., free_contig_range()), and perform the debug_pagealloc_map_pages() call unconditionally, even when the online callback might decide to keep the pages offline. All pages are already initialized with PageOffline, so nobody touches them either way. Link: https://lkml.kernel.org/r/20241203102050.223318-1-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Oscar Salvador Signed-off-by: Andrew Morton mm/memory_hotplug.c | 10 +++++++++- mm/page_alloc.c | 6 ------ 2 files changed, 9 insertions(+), 7 deletions(-) commit bef5418d1f3dee46bee1198d0c4a9c7c63fc2514 Author: Lorenzo Stoakes Date: Tue Dec 3 18:05:12 2024 +0000 mm/vma: move __vm_munmap() to mm/vma.c This was arbitrarily left in mmap.c it makes no sense being there, move it to vma.c to render it testable. Link: https://lkml.kernel.org/r/5e5e81807c54dfbe363edb2d431eb3d7a37fcdba.1733248985.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Cc: Al Viro Cc: Christian Brauner Cc: Eric W. Biederman Cc: Jan Kara Cc: Jann Horn Cc: Kees Cook Cc: Liam R. Howlett Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/mmap.c | 18 ------------------ mm/vma.c | 18 ++++++++++++++++++ mm/vma.h | 2 ++ tools/testing/vma/vma_internal.h | 9 +++++++++ 4 files changed, 29 insertions(+), 18 deletions(-) commit a9d1f3f2d7fecbc465bd4b16343a2ff8499cc558 Author: Lorenzo Stoakes Date: Tue Dec 3 18:05:11 2024 +0000 mm/vma: move stack expansion logic to mm/vma.c We build on previous work making expand_downwards() an entirely internal function. This logic is subtle and so it is highly useful to get it into vma.c so we can then userland unit test. We must additionally move acct_stack_growth() to vma.c as it is a helper function used by both expand_downwards() and expand_upwards(). We are also then able to mark anon_vma_interval_tree_pre_update_vma() and anon_vma_interval_tree_post_update_vma() static as these are no longer used by anything else. Link: https://lkml.kernel.org/r/0feb104eff85922019d4fb29280f3afb130c5204.1733248985.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Cc: Al Viro Cc: Christian Brauner Cc: Eric W. Biederman Cc: Jan Kara Cc: Jann Horn Cc: Kees Cook Cc: Liam R. Howlett Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/mmap.c | 205 ----------------------------- mm/vma.c | 269 ++++++++++++++++++++++++++++++++++----- mm/vma.h | 12 +- tools/testing/vma/vma.c | 5 + tools/testing/vma/vma_internal.h | 62 +++++++++ 5 files changed, 310 insertions(+), 243 deletions(-) commit 7a5714991872f0a4805cc6004a5bff19a71d0459 Author: Lorenzo Stoakes Date: Tue Dec 3 18:05:10 2024 +0000 mm: abstract get_arg_page() stack expansion and mmap read lock Right now fs/exec.c invokes expand_downwards(), an otherwise internal implementation detail of the VMA logic in order to ensure that an arg page can be obtained by get_user_pages_remote(). In order to be able to move the stack expansion logic into mm/vma.c to make it available to userland testing we need to find an alternative approach here. We do so by providing the mmap_read_lock_maybe_expand() function which also helpfully documents what get_arg_page() is doing here and adds an additional check against VM_GROWSDOWN to make explicit that the stack expansion logic is only invoked when the VMA is indeed a downward-growing stack. This allows expand_downwards() to become a static function. Importantly, the VMA referenced by mmap_read_maybe_expand() must NOT be currently user-visible in any way, that is place within an rmap or VMA tree. It must be a newly allocated VMA. This is the case when exec invokes this function. Link: https://lkml.kernel.org/r/5295d1c70c58e6aa63d14be68d4e1de9fa1c8e6d.1733248985.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Cc: Al Viro Cc: Christian Brauner Cc: Eric W. Biederman Cc: Jan Kara Cc: Jann Horn Cc: Kees Cook Cc: Liam R. Howlett Cc: Vlastimil Babka Signed-off-by: Andrew Morton fs/exec.c | 14 +++----------- include/linux/mm.h | 5 ++--- mm/mmap.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 58 insertions(+), 15 deletions(-) commit c7c643d98590bdc0531877079cd0825f7d33a848 Author: Lorenzo Stoakes Date: Tue Dec 3 18:05:09 2024 +0000 mm/vma: move unmapped_area() internals to mm/vma.c We want to be able to unit test the unmapped area logic, so move it to mm/vma.c. The wrappers which invoke this remain in place in mm/mmap.c. In addition, naturally, update the existing test code to enable this to be compiled in userland. Link: https://lkml.kernel.org/r/53a57a52a64ea54e9d129d2e2abca3a538022379.1733248985.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Cc: Al Viro Cc: Christian Brauner Cc: Eric W. Biederman Cc: Jan Kara Cc: Jann Horn Cc: Kees Cook Cc: Liam R. Howlett Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/mmap.c | 109 --------------------------------------- mm/vma.c | 109 +++++++++++++++++++++++++++++++++++++++ mm/vma.h | 3 ++ tools/testing/vma/vma.c | 6 +++ tools/testing/vma/vma_internal.h | 59 +++++++++++++++++++++ 5 files changed, 177 insertions(+), 109 deletions(-) commit 7d344babac9984a33dcb701469568a868ada1a30 Author: Lorenzo Stoakes Date: Tue Dec 3 18:05:08 2024 +0000 mm/vma: move brk() internals to mm/vma.c Patch series "mm/vma: make more mmap logic userland testable". This series carries on the work started in previous series and continued in commit 52956b0d7fb9 ("mm: isolate mmap internal logic to mm/vma.c"), moving the remainder of memory mapping implementation details logic into mm/vma.c allowing the bulk of the mapping logic to be unit tested. It is highly useful to do so, as this means we can both fundamentally test this core logic, and introduce regression tests to ensure any issues previously resolved do not recur. Vitally, this includes the do_brk_flags() function, meaning we have both core means of userland mapping memory now testable. Performance testing was performed after this change given the brk() system call's sensitivity to change, and no performance regression was observed. The stack expansion logic is also moved into mm/vma.c, which necessitates a change in the API exposed to the exec code, removing the invocation of the expand_downwards() function used in get_arg_page() and instead adding mmap_read_lock_maybe_expand() to wrap this. This patch (of 5): Now we have moved mmap_region() internals to mm/vma.c, making it available to userland testing, it makes sense to do the same with brk(). This continues the pattern of VMA heavy lifting being done in mm/vma.c in an environment where it can be subject to straightforward unit and regression testing, with other VMA-adjacent files becoming wrappers around this functionality. [lorenzo.stoakes@oracle.com: add missing personality header import] Link: https://lkml.kernel.org/r/2a717265-985f-45eb-9257-8b2857088ed4@lucifer.local Link: https://lkml.kernel.org/r/cover.1733248985.git.lorenzo.stoakes@oracle.com Link: https://lkml.kernel.org/r/3d24b9e67bb0261539ca921d1188a10a1b4d4357.1733248985.git.lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes Cc: Al Viro Cc: Christian Brauner Cc: Eric W. Biederman Cc: Jan Kara Cc: Jann Horn Cc: Kees Cook Cc: Liam R. Howlett Cc: Vlastimil Babka Signed-off-by: Andrew Morton mm/mmap.c | 85 +--------------------------------------- mm/vma.c | 82 ++++++++++++++++++++++++++++++++++++++ mm/vma.h | 3 ++ mm/vma_internal.h | 1 + tools/testing/vma/vma_internal.h | 22 +++++++++++ 5 files changed, 109 insertions(+), 84 deletions(-) commit 6025ea5abbe5d813d6a41c78e6ea14259fb503f4 Author: gaoxiang17 Date: Fri Sep 20 20:20:30 2024 +0800 mm/page_alloc: add some detailed comments in can_steal_fallback [akpm@linux-foundation.org: tweak grammar, fit to 80 cols] Link: https://lkml.kernel.org/r/20240920122030.159751-1-gxxa03070307@gmail.com Signed-off-by: gaoxiang17 Signed-off-by: Andrew Morton mm/page_alloc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5f1c8108e7ad510456733d143b8ffc4e2408b1a1 Author: Nihar Chaithanya Date: Fri Oct 11 17:15:38 2024 +0530 mm:kasan: fix sparse warnings: Should it be static? Yes, when making the global variables kasan_ptr_result and kasan_int_result as static volatile, the warnings are removed and the variable and assignments are retained, but when just static is used I understand that it might be optimized. Add a fix making the global varaibles - static volatile, removing the warnings: mm/kasan/kasan_test.c:36:6: warning: symbol 'kasan_ptr_result' was not declared. Should it be static? mm/kasan/kasan_test.c:37:5: warning: symbol 'kasan_int_result' was not declared. Should it be static? Link: https://lkml.kernel.org/r/20241011114537.35664-1-niharchaithanya@gmail.com Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312261010.o0lRiI9b-lkp@intel.com/ Signed-off-by: Nihar Chaithanya Reviewed-by: Dmitry Vyukov Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Shuah Khan Signed-off-by: Andrew Morton mm/kasan/kasan_test_c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21641bd9a7a7ce0360106a5a8e5b89a4fc74529d Author: Nicholas Piggin Date: Mon Nov 4 11:23:18 2024 -0300 lazy tlb: fix hotplug exit race with MMU_LAZY_TLB_SHOOTDOWN CPU unplug first calls __cpu_disable(), and that's where powerpc calls cleanup_cpu_mmu_context(), which clears this CPU from mm_cpumask() of all mms in the system. However this CPU may still be using a lazy tlb mm, and its mm_cpumask bit will be cleared from it. The CPU does not switch away from the lazy tlb mm until arch_cpu_idle_dead() calls idle_task_exit(). If that user mm exits in this window, it will not be subject to the lazy tlb mm shootdown and may be freed while in use as a lazy mm by the CPU that is being unplugged. cleanup_cpu_mmu_context() could be moved later, but it looks better to move the lazy tlb mm switching earlier. The problem with doing the lazy mm switching in idle_task_exit() is explained in commit bf2c59fce4074 ("sched/core: Fix illegal RCU from offline CPUs"), which added a wart to switch away from the mm but leave it set in active_mm to be cleaned up later. So instead, switch away from the lazy tlb mm at sched_cpu_wait_empty(), which is the last hotplug state before teardown (CPUHP_AP_SCHED_WAIT_EMPTY). This CPU will never switch to a user thread from this point, so it has no chance to pick up a new lazy tlb mm. This removes the lazy tlb mm handling wart in CPU unplug. With this, idle_task_exit() is not needed anymore and can be cleaned up. This leaves the prototype alone, to be cleaned after this change. herton: took the suggestions from https://lore.kernel.org/all/87jzvyprsw.ffs@tglx/ and made adjustments on the initial patch proposed by Nicholas. Link: https://lkml.kernel.org/r/20230524060455.147699-1-npiggin@gmail.com Link: https://lore.kernel.org/all/20230525205253.E2FAEC433EF@smtp.kernel.org/ Link: https://lkml.kernel.org/r/20241104142318.3295663-1-herton@redhat.com Fixes: 2655421ae69f ("lazy tlb: shoot lazies, non-refcounting lazy tlb mm reference handling scheme") Signed-off-by: Nicholas Piggin Signed-off-by: Herton R. Krzesinski Suggested-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Michael Ellerman Signed-off-by: Andrew Morton include/linux/sched/hotplug.h | 4 ---- kernel/cpu.c | 9 +++++---- kernel/sched/core.c | 22 +++++++++++++++------- 3 files changed, 20 insertions(+), 15 deletions(-) commit 7318f95ba40bed454d1e20f27e821198d3def4e5 Author: Wei Yang Date: Wed Nov 13 03:16:16 2024 +0000 maple_tree: only root node could be deficient Each level's rightmost node should have (max == ULONG_MAX). This means current validation skips the right most node on each level. Only the root node may be below the minimum data threshold. Link: https://lkml.kernel.org/r/20241113031616.10530-4-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: Liam R. Howlett Cc: Sidhartha Kumar Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton lib/maple_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c38279d4071992151321b0239c8896baa6563baf Author: Wei Yang Date: Wed Nov 13 03:16:15 2024 +0000 maple_tree: add a test check deficient node Add a test to assert when resulting a deficient node on splitting. We can achieve this by build a tree with two nodes. With the left node with consecutive data from 0 and leave some room for the final insert to locate in left node. And the right node a full node to force the split happens on the left node. Link: https://lkml.kernel.org/r/20241113031616.10530-3-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: Liam R. Howlett Cc: Sidhartha Kumar Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton lib/test_maple_tree.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 4f6a6bed0bfef4b966f076f33eb4f5547226056a Author: Wei Yang Date: Wed Nov 13 03:16:14 2024 +0000 maple_tree: simplify split calculation Patch series "simplify split calculation", v3. This patch (of 3): The current calculation for splitting nodes tries to enforce a minimum span on the leaf nodes. This code is complex and never worked correctly to begin with, due to the min value being passed as 0 for all leaves. The calculation should just split the data as equally as possible between the new nodes. Note that b_end will be one more than the data, so the left side is still favoured in the calculation. The current code may also lead to a deficient node by not leaving enough data for the right side of the split. This issue is also addressed with the split calculation change. [Liam.Howlett@Oracle.com: rephrase the change log] Link: https://lkml.kernel.org/r/20241113031616.10530-1-richard.weiyang@gmail.com Link: https://lkml.kernel.org/r/20241113031616.10530-2-richard.weiyang@gmail.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Wei Yang Reviewed-by: Liam R. Howlett Cc: Sidhartha Kumar Cc: Lorenzo Stoakes Cc: Signed-off-by: Andrew Morton lib/maple_tree.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit 146ca40193ff8381f75d1ec3129d6f40dd333601 Author: Roman Gushchin Date: Fri Nov 15 19:02:29 2024 +0000 mm: swap_cgroup: get rid of __lookup_swap_cgroup() Because swap_cgroup map is now virtually contiguous, swap_cgroup_record() can be simplified, which eliminates a need to use __lookup_swap_cgroup(). Now as __lookup_swap_cgroup() is really trivial and is used only once, it can be inlined. Link: https://lkml.kernel.org/r/20241115190229.676440-2-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton mm/swap_cgroup.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit 8eb92ed254e5353f38e4a664dc5fa70c8ec95d1a Author: Roman Gushchin Date: Fri Nov 15 19:02:28 2024 +0000 mm: swap_cgroup: allocate swap_cgroup map using vcalloc() Currently swap_cgroup's map is constructed as a vmalloc()'s-based array of pointers to individual struct pages. This brings an unnecessary complexity into the code. This patch turns the swap_cgroup's map into a single space allocated by vcalloc(). [akpm@linux-foundation.org: s/vfree/kvfree/, per Shakeel] Link: https://lkml.kernel.org/r/20241115190229.676440-1-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton mm/swap_cgroup.c | 83 +++++++++----------------------------------------------- 1 file changed, 13 insertions(+), 70 deletions(-) commit 3472f639c692b28e7de345e90519430ad6ce2362 Author: Keren Sun Date: Fri Nov 15 15:57:44 2024 -0800 mm: remove the non-useful else after a break in a if statement Remove the else block since there is already a break in the statement of if (iter->oom_lock), just set iter->oom_lock true after the if block ends. Link: https://lkml.kernel.org/r/20241115235744.1419580-4-kerensun@google.com Signed-off-by: Keren Sun Reviewed-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Shakeel Butt Signed-off-by: Andrew Morton mm/memcontrol-v1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 91478b238e584d0ec1ea8c58ef46e4e14d58e526 Author: Keren Sun Date: Fri Nov 15 15:57:43 2024 -0800 mm: remove unnecessary whitespace before a quoted newline Remove whitespaces before newlines for strings in pr_warn_once() Link: https://lkml.kernel.org/r/20241115235744.1419580-3-kerensun@google.com Signed-off-by: Keren Sun Reviewed-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Shakeel Butt Signed-off-by: Andrew Morton mm/memcontrol-v1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 55c1d6a40148a1c963adc46f502a66964bce2024 Author: Keren Sun Date: Fri Nov 15 15:57:42 2024 -0800 mm: prefer 'unsigned int' to bare use of 'unsigned' Patch series "mm: fix format issues and param types" Change the param 'mode' from type 'unsigned' to 'unsigned int' in memcg_event_wake() and memcg_oom_wake_function(), and for the param 'nid' in VM_BUG_ON(). Link: https://lkml.kernel.org/r/20241115235744.1419580-2-kerensun@google.com Signed-off-by: Keren Sun Acked-by: Shakeel Butt Reviewed-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton mm/memcontrol-v1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a977273b857e6169adca74a47dd9a3dea41f184d Author: Jeff Xu Date: Sat Nov 16 00:50:58 2024 +0000 selftest/mm: remove seal_elf Remove seal_elf, which is a demo of mseal, we no longer need this. Link: https://lkml.kernel.org/r/20241116005058.69091-1-jeffxu@chromium.org Signed-off-by: Jeff Xu Signed-off-by: Andrew Morton tools/testing/selftests/mm/.gitignore | 1 - tools/testing/selftests/mm/Makefile | 1 - tools/testing/selftests/mm/seal_elf.c | 137 ---------------------------------- 3 files changed, 139 deletions(-) commit f2760364add9996b8937ae388c8035ea1f242440 Author: Wei Yang Date: Sat Nov 16 01:48:05 2024 +0000 maple_tree: we don't set offset to MAPLE_NODE_SLOTS on error When mas_anode_descend() not find gap, it sets -EBUSY instead of setting offset to MAPLE_NODE_SLOTS. Link: https://lkml.kernel.org/r/20241116014805.11547-4-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Sidhartha Kumar Signed-off-by: Andrew Morton lib/maple_tree.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit f5bd418727856b104d6dcb43b144381c31250383 Author: Wei Yang Date: Sat Nov 16 01:48:04 2024 +0000 maple_tree: not possible to be a root node after loop Empty tree and single entry tree is handled else whether, so the maple tree here must be a tree with nodes. If the height is 1 and we found the gap, it will jump to *done* since it is also a leaf. If the height is more than one, and there may be an available range, we will descend the tree, which is not root anymore. If there is no available range, we will set error and return. This means the check for root node here is not necessary. Link: https://lkml.kernel.org/r/20241116014805.11547-3-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Sidhartha Kumar Signed-off-by: Andrew Morton lib/maple_tree.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 5f8db8d428807e52c816610e8acea576f856eb6d Author: Wei Yang Date: Sat Nov 16 01:48:03 2024 +0000 maple_tree: index has been checked to be smaller than pivot Patch series "mas_anode_descend() related cleanup". Some cleanup related to mas_anode_descend(). This patch (of 3): At the beginning of loop, it has checked the range is in lower bounds. Link: https://lkml.kernel.org/r/20241116014805.11547-1-richard.weiyang@gmail.com Link: https://lkml.kernel.org/r/20241116014805.11547-2-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Sidhartha Kumar Signed-off-by: Andrew Morton lib/maple_tree.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 1168b2bec7660f5146de7b14c14b52417e900d18 Author: Dr. David Alan Gilbert Date: Sat Nov 16 15:14:46 2024 +0000 filemap: remove unused folio_add_wait_queue folio_add_wait_queue() has been unused since 2021's commit 850cba069c26 ("cachefiles: Delete the cachefiles driver pending rewrite") Remove it. Link: https://lkml.kernel.org/r/20241116151446.95555-1-linux@treblig.org Signed-off-by: Dr. David Alan Gilbert Reviewed-by: David Hildenbrand Reviewed-by: Vishal Moola (Oracle) Signed-off-by: Andrew Morton include/linux/pagemap.h | 5 ----- mm/filemap.c | 19 ------------------- 2 files changed, 24 deletions(-) commit c58c4d244ec5f60e60f7eb3c1583c507b4ef585a Author: guanjing Date: Sun Nov 17 15:12:31 2024 +0800 selftests: mm: fix conversion specifiers in transact_test() Lots of incorrect conversion specifiers. Fix them. Link: https://lkml.kernel.org/r/20241117071231.177864-1-guanjing@cmss.chinamobile.com Fixes: 46fd75d4a3c9 ("selftests: mm: add pagemap ioctl tests") Signed-off-by: guanjing Reviewed-by: Muhammad Usama Anjum Signed-off-by: Andrew Morton tools/testing/selftests/mm/pagemap_ioctl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit da80f4ffb0dbee2419ac04f23aad0533658f1523 Author: Alice Ryhl Date: Fri Nov 29 14:58:25 2024 +0000 list_lru: expand list_lru_add() docs with info about sublists The documentation for list_lru_add() and list_lru_del() has not been updated since lru lists were originally introduced by commit a38e40824844 ("list: add a new LRU list type"). Back then, list_lru stored all of the items in a single list, but the implementation has since been expanded to use many sublists internally. Thus, update the docs to mention that the requirements about not using the item with several lists at the same time also applies not using different sublists. Also mention that list_lru items are reparented when the memcg is deleted as discussed on the LKML [1]. Also fix incorrect use of 'Return value:' which should be 'Return:'. Link: https://lore.kernel.org/all/Z0eXrllVhRI9Ag5b@dread.disaster.area/ [1] Link: https://lkml.kernel.org/r/20241129-list_lru_memcg_docs-v2-1-e285ff1c481b@google.com Signed-off-by: Alice Ryhl Reviewed-by: Dave Chinner Acked-by: Muchun Song Reviewed-by: Nhat Pham Cc: Johannes Weiner Cc: Michal Hocko Cc: Qi Zheng Cc: Roman Gushchin Cc: Shakeel Butt Signed-off-by: Andrew Morton include/linux/list_lru.h | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) commit 58d534c8c6aa5c5f09fbcb162afb85b91f200560 Author: Petr Tesarik Date: Tue Nov 19 12:37:39 2024 +0100 mm/rodata_test: verify test data is unchanged, rather than non-zero Verify that the test variable holds the initialization value, rather than any non-zero value. Link: https://lkml.kernel.org/r/386ffda192eb4a26f68c526c496afd48a5cd87ce.1732016064.git.ptesarik@suse.com Signed-off-by: Petr Tesarik Reviewed-by: Kees Cook Cc: Jinbum Park Signed-off-by: Andrew Morton mm/rodata_test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit db27ad8b0209e892a9b6294aadcf9d756f41a656 Author: Petr Tesarik Date: Tue Nov 19 12:37:38 2024 +0100 mm/rodata_test: use READ_ONCE() to read const variable Patch series "Fix mm/rodata_test", v2. Make sure that the test actually reads the read-only memory location. Verify that the variable contains the expected value rather than any non-zero value. This patch (of 2): The C compiler may optimize away the memory read of a const variable if its value is known at compile time. In particular, GCC14 with -O2 generates no code at all for test 1, and it generates the following x86_64 instructions for test 3: cmpl $195, 4(%rsp) je .L14 That is, it replaces the read of rodata_test_data with an immediate value and compares it to the value of the local variable "zero". Use READ_ONCE() to undo any such compiler optimizations and enforce a memory read. Link: https://lkml.kernel.org/r/cover.1732016064.git.ptesarik@suse.com Link: https://lkml.kernel.org/r/2a66dee010151b25cb143efb39091ef7530aa00a.1732016064.git.ptesarik@suse.com Fixes: 2959a5f726f6 ("mm: add arch-independent testcases for RODATA") Signed-off-by: Petr Tesarik Reviewed-by: Kees Cook Cc: Jinbum Park Signed-off-by: Andrew Morton mm/rodata_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 255ff62d1586e63b6a461f0d89088d60d54d9814 Author: Baolin Wang Date: Thu Nov 28 15:40:44 2024 +0800 docs: tmpfs: drop 'fadvise()' from the documentation Drop 'fadvise()' from the doc, since fadvise() has no HUGEPAGE advise currently. Link: https://lkml.kernel.org/r/3a10bb49832f6d9827dc2c76aec0bf43a892876b.1732779148.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Reviewed-by: Barry Song Acked-by: David Hildenbrand Cc: Daniel Gomez Cc: Hugh Dickins Cc: Kefeng Wang Cc: Lance Yang Cc: Matthew Wilcox Cc: Ryan Roberts Signed-off-by: Andrew Morton Documentation/admin-guide/mm/transhuge.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5a4550c96bb5e55b64776ec7c1e8966d7177089a Author: David Hildenbrand Date: Thu Nov 28 15:40:43 2024 +0800 docs: tmpfs: update the large folios policy for tmpfs and shmem Update the large folios policy for tmpfs and shmem. Link: https://lkml.kernel.org/r/9b7418af30e300d1eb05721b81d79074d0bb0ec9.1732779148.git.baolin.wang@linux.alibaba.com Signed-off-by: David Hildenbrand Signed-off-by: Baolin Wang Cc: Barry Song Cc: Daniel Gomez Cc: Hugh Dickins Cc: Kefeng Wang Cc: Lance Yang Cc: Matthew Wilcox Cc: Ryan Roberts Signed-off-by: Andrew Morton Documentation/admin-guide/mm/transhuge.rst | 58 +++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 17 deletions(-) commit d635ccdb435caa1d25fa9b0ac0d21414cfb13f0a Author: Baolin Wang Date: Thu Nov 28 15:40:42 2024 +0800 mm: shmem: add a kernel command line to change the default huge policy for tmpfs Now the tmpfs can allow to allocate any sized large folios, and the default huge policy is still preferred to be 'never'. Due to tmpfs not behaving like other file systems in some cases as previously explained by David[1]: : I think I raised this in the past, but tmpfs/shmem is just like any : other file system .. except it sometimes really isn't and behaves much : more like (swappable) anonymous memory. (or mlocked files) : : There are many systems out there that run without swap enabled, or with : extremely minimal swap (IIRC until recently kubernetes was completely : incompatible with swapping). Swap can even be disabled today for shmem : using a mount option. : : That's a big difference to all other file systems where you are : guaranteed to have backend storage where you can simply evict under : memory pressure (might temporarily fail, of course). : : I *think* that's the reason why we have the "huge=" parameter that also : controls the THP allocations during page faults (IOW possible memory : over-allocation). Maybe also because it was a new feature, and we only : had a single THP size. Thus adding a new command line to change the default huge policy will be helpful to use the large folios for tmpfs, which is similar to the 'transparent_hugepage_shmem' cmdline for shmem. [1] https://lore.kernel.org/all/cbadd5fe-69d5-4c21-8eb8-3344ed36c721@redhat.com/ Link: https://lkml.kernel.org/r/ff390b2656f0d39649547f8f2cbb30fcb7e7be2d.1732779148.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Cc: Barry Song Cc: Daniel Gomez Cc: David Hildenbrand Cc: Hugh Dickins Cc: Kefeng Wang Cc: Lance Yang Cc: Matthew Wilcox Cc: Ryan Roberts Signed-off-by: Andrew Morton Documentation/admin-guide/kernel-parameters.txt | 7 +++++++ Documentation/admin-guide/mm/transhuge.rst | 6 ++++++ mm/shmem.c | 23 ++++++++++++++++++++++- 3 files changed, 35 insertions(+), 1 deletion(-) commit acd7ccb284b86da1b2e3233a6826fe933844fc06 Author: Baolin Wang Date: Thu Nov 28 15:40:41 2024 +0800 mm: shmem: add large folio support for tmpfs Add large folio support for tmpfs write and fallocate paths matching the same high order preference mechanism used in the iomap buffered IO path as used in __filemap_get_folio(). Add shmem_mapping_size_orders() to get a hint for the orders of the folio based on the file size which takes care of the mapping requirements. Traditionally, tmpfs only supported PMD-sized large folios. However nowadays with other file systems supporting any sized large folios, and extending anonymous to support mTHP, we should not restrict tmpfs to allocating only PMD-sized large folios, making it more special. Instead, we should allow tmpfs can allocate any sized large folios. Considering that tmpfs already has the 'huge=' option to control the PMD-sized large folios allocation, we can extend the 'huge=' option to allow any sized large folios. The semantics of the 'huge=' mount option are: huge=never: no any sized large folios huge=always: any sized large folios huge=within_size: like 'always' but respect the i_size huge=advise: like 'always' if requested with madvise() Note: for tmpfs mmap() faults, due to the lack of a write size hint, still allocate the PMD-sized huge folios if huge=always/within_size/advise is set. Moreover, the 'deny' and 'force' testing options controlled by '/sys/kernel/mm/transparent_hugepage/shmem_enabled', still retain the same semantics. The 'deny' can disable any sized large folios for tmpfs, while the 'force' can enable PMD sized large folios for tmpfs. Link: https://lkml.kernel.org/r/035bf55fbdebeff65f5cb2cdb9907b7d632c3228.1732779148.git.baolin.wang@linux.alibaba.com Co-developed-by: Daniel Gomez Signed-off-by: Daniel Gomez Signed-off-by: Baolin Wang Cc: Barry Song Cc: David Hildenbrand Cc: Hugh Dickins Cc: Kefeng Wang Cc: Lance Yang Cc: Matthew Wilcox Cc: Ryan Roberts Signed-off-by: Andrew Morton mm/shmem.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 81 insertions(+), 18 deletions(-) commit 736bbc68255fd451d26353a255f15ad347c26132 Author: Baolin Wang Date: Thu Nov 28 15:40:40 2024 +0800 mm: shmem: change shmem_huge_global_enabled() to return huge order bitmap Change the shmem_huge_global_enabled() to return the suitable huge order bitmap, and return 0 if huge pages are not allowed. This is a preparation for supporting various huge orders allocation of tmpfs in the following patches. No functional changes. Link: https://lkml.kernel.org/r/9dce1cfad3e9c1587cf1a0ea782ddbebd0e92984.1732779148.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Acked-by: David Hildenbrand Cc: Barry Song Cc: Daniel Gomez Cc: Hugh Dickins Cc: Kefeng Wang Cc: Lance Yang Cc: Matthew Wilcox Cc: Ryan Roberts Signed-off-by: Andrew Morton mm/shmem.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit da243c5479add600bdd58c910c9fae3355b4f026 Author: Baolin Wang Date: Thu Nov 28 15:40:39 2024 +0800 mm: factor out the order calculation into a new helper Patch series "Support large folios for tmpfs", v3. Traditionally, tmpfs only supported PMD-sized large folios. However nowadays with other file systems supporting any sized large folios, and extending anonymous to support mTHP, we should not restrict tmpfs to allocating only PMD-sized large folios, making it more special. Instead, we should allow tmpfs can allocate any sized large folios. Considering that tmpfs already has the 'huge=' option to control the PMD-sized large folios allocation, we can extend the 'huge=' option to allow any sized large folios. The semantics of the 'huge=' mount option are: huge=never: no any sized large folios huge=always: any sized large folios huge=within_size: like 'always' but respect the i_size huge=advise: like 'always' if requested with madvise() Note: for tmpfs mmap() faults, due to the lack of a write size hint, still allocate the PMD-sized large folios if huge=always/within_size/advise is set. Moreover, the 'deny' and 'force' testing options controlled by '/sys/kernel/mm/transparent_hugepage/shmem_enabled', still retain the same semantics. The 'deny' can disable any sized large folios for tmpfs, while the 'force' can enable PMD sized large folios for tmpfs. This patch (of 6): Factor out the order calculation into a new helper, which can be reused by shmem in the following patch. Link: https://lkml.kernel.org/r/cover.1732779148.git.baolin.wang@linux.alibaba.com Link: https://lkml.kernel.org/r/5505f9ea50942820c1924d1803bfdd3a524e54f6.1732779148.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Suggested-by: Matthew Wilcox Reviewed-by: Barry Song Reviewed-by: David Hildenbrand Reviewed-by: Daniel Gomez Cc: Hugh Dickins Cc: Kefeng Wang Cc: Lance Yang Cc: Ryan Roberts Signed-off-by: Andrew Morton include/linux/pagemap.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit d40797d6720e861196e848f3615bb09dae5be7ce Author: Peter Zijlstra Date: Fri Nov 22 16:54:51 2024 +0100 kasan: make kasan_record_aux_stack_noalloc() the default behaviour kasan_record_aux_stack_noalloc() was introduced to record a stack trace without allocating memory in the process. It has been added to callers which were invoked while a raw_spinlock_t was held. More and more callers were identified and changed over time. Is it a good thing to have this while functions try their best to do a locklessly setup? The only downside of having kasan_record_aux_stack() not allocate any memory is that we end up without a stacktrace if stackdepot runs out of memory and at the same stacktrace was not recorded before To quote Marco Elver from https://lore.kernel.org/all/CANpmjNPmQYJ7pv1N3cuU8cP18u7PP_uoZD8YxwZd4jtbof9nVQ@mail.gmail.com/ | I'd be in favor, it simplifies things. And stack depot should be | able to replenish its pool sufficiently in the "non-aux" cases | i.e. regular allocations. Worst case we fail to record some | aux stacks, but I think that's only really bad if there's a bug | around one of these allocations. In general the probabilities | of this being a regression are extremely small [...] Make the kasan_record_aux_stack_noalloc() behaviour default as kasan_record_aux_stack(). [bigeasy@linutronix.de: dressed the diff as patch] Link: https://lkml.kernel.org/r/20241122155451.Mb2pmeyJ@linutronix.de Fixes: 7cb3007ce2da ("kasan: generic: introduce kasan_record_aux_stack_noalloc()") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior Reported-by: syzbot+39f85d612b7c20d8db48@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/67275485.050a0220.3c8d68.0a37.GAE@google.com Reviewed-by: Andrey Konovalov Reviewed-by: Marco Elver Reviewed-by: Waiman Long Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Ben Segall Cc: Boqun Feng Cc: Christoph Lameter Cc: David Rientjes Cc: Dietmar Eggemann Cc: Dmitry Vyukov Cc: Frederic Weisbecker Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Ingo Molnar Cc: Jann Horn Cc: Joel Fernandes (Google) Cc: Joonsoo Kim Cc: Josh Triplett Cc: Juri Lelli Cc: Cc: Lai Jiangshan Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Mathieu Desnoyers Cc: Mel Gorman Cc: Neeraj Upadhyay Cc: Paul E. McKenney Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt Cc: syzkaller-bugs@googlegroups.com Cc: Tejun Heo Cc: Thomas Gleixner Cc: Uladzislau Rezki (Sony) Cc: Valentin Schneider Cc: Vincent Guittot Cc: Vincenzo Frascino Cc: Vlastimil Babka Cc: Zqiang Signed-off-by: Andrew Morton include/linux/kasan.h | 2 -- include/linux/task_work.h | 3 --- kernel/irq_work.c | 2 +- kernel/rcu/tiny.c | 2 +- kernel/rcu/tree.c | 4 ++-- kernel/sched/core.c | 2 +- kernel/task_work.c | 14 +------------- kernel/workqueue.c | 2 +- mm/kasan/generic.c | 18 ++++++------------ mm/slub.c | 2 +- 10 files changed, 14 insertions(+), 37 deletions(-) commit 773fc6ab7102c39da78b3f1fb2ad6f1a59850030 Author: Chin Yik Ming Date: Wed Nov 20 18:50:41 2024 +0800 mm/memory: fix a comment typo in lock_mm_and_find_vma() s/equivalend/equivalent/ Link: https://lkml.kernel.org/r/20241120105041.2394283-1-yikming2222@gmail.com Signed-off-by: Chin Yik Ming Signed-off-by: Andrew Morton mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afeac03c48bc57eb9b38cdfa6db53cc3edb66bce Author: Jiale Yang <295107659@qq.com> Date: Wed Nov 20 11:01:35 2024 +0000 mm: change type of cma_area_count to unsigned int Prefer 'unsigned int' over plain 'unsigned'. Also make it consistent with mm/cma.c Link: https://lkml.kernel.org/r/tencent_1E5E3AA25C261196D8C1F7097F130E382008@qq.com Signed-off-by: Jiale Yang <295107659@qq.com> Signed-off-by: Andrew Morton mm/cma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20f3ab257211594c110c43e71c31bd25ba31e851 Author: Qi Zheng Date: Fri Nov 22 15:36:52 2024 +0800 mm: pgtable: make ptep_clear() non-atomic In the generic ptep_get_and_clear() implementation, it is just a simple combination of ptep_get() and pte_clear(). But for some architectures (such as x86 and arm64, etc), the hardware will modify the A/D bits of the page table entry, so the ptep_get_and_clear() needs to be overwritten and implemented as an atomic operation to avoid contention, which has a performance cost. The commit d283d422c6c4 ("x86: mm: add x86_64 support for page table check") adds the ptep_clear() on the x86, and makes it call ptep_get_and_clear() when CONFIG_PAGE_TABLE_CHECK is enabled. The page table check feature does not actually care about the A/D bits, so only ptep_get() + pte_clear() should be called. But considering that the page table check is a debug option, this should not have much of an impact. But then the commit de8c8e52836d ("mm: page_table_check: add hooks to public helpers") changed ptep_clear() to unconditionally call ptep_get_and_clear(), so that the CONFIG_PAGE_TABLE_CHECK check can be put into the page table check stubs (in include/linux/page_table_check.h). This also cause performance loss to the kernel without CONFIG_PAGE_TABLE_CHECK enabled, which doesn't make sense. Currently ptep_clear() is only used in debug code and in khugepaged collapse paths, which are fairly expensive. So the cost of an extra atomic RMW operation does not matter. But this may be used for other paths in the future. After all, for the present pte entry, we need to call ptep_clear() instead of pte_clear() to ensure that PAGE_TABLE_CHECK works properly. So to be more precise, just calling ptep_get() and pte_clear() in the ptep_clear(). Link: https://lkml.kernel.org/r/20241122073652.54030-1-zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Reviewed-by: Pasha Tatashin Reviewed-by: Jann Horn Reviewed-by: Muchun Song Acked-by: David Hildenbrand Cc: Jason Gunthorpe Cc: Lorenzo Stoakes Cc: Peter Xu Cc: Ryan Roberts Cc: Tong Tiangen Signed-off-by: Andrew Morton include/linux/pgtable.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit cec1312a84f2d03534b8240a51b46a213a9ac3f7 Author: Li Zhijian Date: Mon Nov 25 14:40:36 2024 +0800 selftests/mm: add a few missing gitignore files Compiled binary files should be added to .gitignore 'git status' complains: Untracked files: (use "git add ..." to include in what will be committed) mm/hugetlb_dio mm/pkey_sighandler_tests_32 mm/pkey_sighandler_tests_64 Link: https://lkml.kernel.org/r/20241125064036.413536-1-lizhijian@fujitsu.com Signed-off-by: Li Zhijian Reviewed-by: John Hubbard Cc: Donet Tom Cc: Shuah Khan Signed-off-by: Andrew Morton tools/testing/selftests/mm/.gitignore | 3 +++ 1 file changed, 3 insertions(+) commit 3658cb16e243b3582bf5f84a68742268617cfbe6 Author: Pintu Kumar Date: Fri Nov 22 23:05:58 2024 +0530 mm/hugetlb_cgroup: avoid useless return in void function The return statement at the end of void function is unnecessary. Just remove it as part of cleanup. Link: https://lkml.kernel.org/r/20241122173558.20670-1-quic_pintu@quicinc.com Signed-off-by: Pintu Kumar Cc: Pintu Agarwal Cc: Shuah Khan Signed-off-by: Andrew Morton mm/hugetlb_cgroup.c | 1 - 1 file changed, 1 deletion(-) commit 9023691d75f29fde884f6e243bcdad6a9dbadb19 Author: Shakeel Butt Date: Mon Nov 25 09:16:17 2024 -0800 mm: mmap_lock: optimize mmap_lock tracepoints We are starting to deploy mmap_lock tracepoint monitoring across our fleet and the early results showed that these tracepoints are consuming significant amount of CPUs in kernfs_path_from_node when enabled. It seems like the kernel is trying to resolve the cgroup path in the fast path of the locking code path when the tracepoints are enabled. In addition for some application their metrics are regressing when monitoring is enabled. The cgroup path resolution can be slow and should not be done in the fast path. Most userspace tools, like bpftrace, provides functionality to get the cgroup path from cgroup id, so let's just trace the cgroup id and the users can use better tools to get the path in the slow path. Link: https://lkml.kernel.org/r/20241125171617.113892-1-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Reviewed-by: Yosry Ahmed Acked-by: Vlastimil Babka Acked-by: Roman Gushchin Reviewed-by: Axel Rasmussen Cc: Johannes Weiner Cc: Matthew Wilcox Cc: Michal Hocko Cc: Muchun Song Cc: Steven Rostedt Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton include/linux/memcontrol.h | 22 ++++++++++++++++++ include/trace/events/mmap_lock.h | 32 ++++++++++++------------- mm/mmap_lock.c | 50 +++------------------------------------- 3 files changed, 40 insertions(+), 64 deletions(-) commit 66539952627c891d8d73cdd619d1937b6b3f66c7 Author: Honggyu Kim Date: Mon Jan 13 22:40:34 2025 -0800 mm/damon/core: remove duplicate list_empty quota->goals check damos_set_effective_quota() checks quota contidions but there are some duplicate checks for quota->goals inside. This patch reduces one of if statement to simplify the esz calculation logic by setting esz as ULONG_MAX by default. Link: https://lkml.kernel.org/r/20241125184307.41746-1-sj@kernel.org Signed-off-by: Honggyu Kim Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton mm/damon/core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 9aec2fb0fd5ed3b90665a9a289fff7fa7a6e1fc7 Author: Matthew Wilcox (Oracle) Date: Mon Nov 25 21:01:47 2024 +0000 slab: allocate frozen pages Since slab does not use the page refcount, it can allocate and free frozen pages, saving one atomic operation per free. Link: https://lkml.kernel.org/r/20241125210149.2976098-16-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Vlastimil Babka Cc: David Hildenbrand Cc: Mel Gorman Cc: Miaohe Lin Cc: Muchun Song Signed-off-by: Andrew Morton mm/slub.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 642975242e328620ac136d6e02aceb253e9ee460 Author: Matthew Wilcox (Oracle) Date: Mon Nov 25 21:01:46 2024 +0000 mm/mempolicy: add alloc_frozen_pages() Provide an interface to allocate pages from the page allocator without incrementing their refcount. This saves an atomic operation on free, which may be beneficial to some users (eg slab). Link: https://lkml.kernel.org/r/20241125210149.2976098-15-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski Reviewed-by: Vlastimil Babka Cc: David Hildenbrand Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Mel Gorman Cc: Miaohe Lin Cc: Muchun Song Signed-off-by: Andrew Morton mm/internal.h | 12 ++++++++++++ mm/mempolicy.c | 49 ++++++++++++++++++++++++++++++++----------------- 2 files changed, 44 insertions(+), 17 deletions(-) commit 49249a2a5eeb912e66951dfe9a5924eb0dd14d50 Author: Matthew Wilcox (Oracle) Date: Mon Nov 25 21:01:45 2024 +0000 mm/page_alloc: add __alloc_frozen_pages() Defer the initialisation of the page refcount to the new __alloc_pages() wrapper and turn the old __alloc_pages() into __alloc_frozen_pages(). Link: https://lkml.kernel.org/r/20241125210149.2976098-14-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Acked-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Mel Gorman Cc: Miaohe Lin Cc: Muchun Song Cc: William Kucharski Signed-off-by: Andrew Morton mm/internal.h | 4 ++++ mm/page_alloc.c | 18 ++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) commit c972106db3550f7757c1f984ed9852d69cf1fd69 Author: Matthew Wilcox (Oracle) Date: Mon Nov 25 21:01:44 2024 +0000 mm/page_alloc: move set_page_refcounted() to end of __alloc_pages() Remove some code duplication by calling set_page_refcounted() at the end of __alloc_pages() instead of after each call that can allocate a page. That means that we free a frozen page if we've exceeded the allowed memcg memory. Link: https://lkml.kernel.org/r/20241125210149.2976098-13-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Reviewed-by: Vlastimil Babka Cc: David Hildenbrand Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Mel Gorman Cc: Miaohe Lin Cc: Muchun Song Cc: William Kucharski Signed-off-by: Andrew Morton mm/page_alloc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit a88de400e3d22035a9bf6e818808013ccccfe410 Author: Matthew Wilcox (Oracle) Date: Mon Nov 25 21:01:43 2024 +0000 mm/page_alloc: move set_page_refcounted() to callers of __alloc_pages_slowpath() In preparation for allocating frozen pages, stop initialising the page refcount in __alloc_pages_slowpath(). Link: https://lkml.kernel.org/r/20241125210149.2976098-12-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Reviewed-by: Vlastimil Babka Cc: David Hildenbrand Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Mel Gorman Cc: Miaohe Lin Cc: Muchun Song Cc: William Kucharski Signed-off-by: Andrew Morton mm/page_alloc.c | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) commit 30fdb6df4cb3641de4c5be9b87f3a2a1fe2fe72c Author: Matthew Wilcox (Oracle) Date: Mon Nov 25 21:01:42 2024 +0000 mm/page_alloc: move set_page_refcounted() to callers of __alloc_pages_direct_reclaim() In preparation for allocating frozen pages, stop initialising the page refcount in __alloc_pages_direct_reclaim(). Link: https://lkml.kernel.org/r/20241125210149.2976098-11-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Reviewed-by: Vlastimil Babka Cc: David Hildenbrand Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Mel Gorman Cc: Miaohe Lin Cc: Muchun Song Cc: William Kucharski Signed-off-by: Andrew Morton mm/page_alloc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8e4c8a9702e79be37a42cd883e1008f18fe56959 Author: Matthew Wilcox (Oracle) Date: Mon Nov 25 21:01:41 2024 +0000 mm/page_alloc: move set_page_refcounted() to callers of __alloc_pages_direct_compact() In preparation for allocating frozen pages, stop initialising the page refcount in __alloc_pages_direct_compact(). Link: https://lkml.kernel.org/r/20241125210149.2976098-10-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Reviewed-by: Vlastimil Babka Cc: David Hildenbrand Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Mel Gorman Cc: Miaohe Lin Cc: Muchun Song Cc: William Kucharski Signed-off-by: Andrew Morton mm/page_alloc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit df544c5eef4082d83713188b4de89e3ab2ed6772 Author: Matthew Wilcox (Oracle) Date: Mon Nov 25 21:01:40 2024 +0000 mm/page_alloc: move set_page_refcounted() to callers of __alloc_pages_may_oom() In preparation for allocating frozen pages, stop initialising the page refcount in __alloc_pages_may_oom(). Link: https://lkml.kernel.org/r/20241125210149.2976098-9-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Reviewed-by: Vlastimil Babka Cc: David Hildenbrand Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Mel Gorman Cc: Miaohe Lin Cc: Muchun Song Cc: William Kucharski Signed-off-by: Andrew Morton mm/page_alloc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 4c9017cc4c59627720b198e22757e17f67dc3590 Author: Matthew Wilcox (Oracle) Date: Mon Nov 25 21:01:39 2024 +0000 mm/page_alloc: move set_page_refcounted() to callers of __alloc_pages_cpuset_fallback() In preparation for allocating frozen pages, stop initialising the page refcount in __alloc_pages_cpuset_fallback(). Link: https://lkml.kernel.org/r/20241125210149.2976098-8-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Reviewed-by: Vlastimil Babka Cc: David Hildenbrand Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Mel Gorman Cc: Miaohe Lin Cc: Muchun Song Cc: William Kucharski Signed-off-by: Andrew Morton mm/page_alloc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit efabfe1420f5245938871a9578160f32277c8e21 Author: Matthew Wilcox (Oracle) Date: Mon Nov 25 21:01:38 2024 +0000 mm/page_alloc: move set_page_refcounted() to callers of get_page_from_freelist() In preparation for allocating frozen pages, stop initialising the page refcount in get_page_from_freelist(). Link: https://lkml.kernel.org/r/20241125210149.2976098-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Reviewed-by: Vlastimil Babka Cc: David Hildenbrand Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Mel Gorman Cc: Miaohe Lin Cc: Muchun Song Cc: William Kucharski Signed-off-by: Andrew Morton mm/page_alloc.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit ee66e9c34fd3aeab3a7c2cda300f852aa5363609 Author: Matthew Wilcox (Oracle) Date: Mon Nov 25 21:01:37 2024 +0000 mm/page_alloc: move set_page_refcounted() to callers of prep_new_page() In preparation for allocating frozen pages, stop initialising the page refcount in prep_new_page(). Link: https://lkml.kernel.org/r/20241125210149.2976098-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Acked-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Mel Gorman Cc: Miaohe Lin Cc: Muchun Song Cc: William Kucharski Signed-off-by: Andrew Morton mm/page_alloc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 8fd10a892a8db797fffb59a9a60bce23a56eef46 Author: Matthew Wilcox (Oracle) Date: Mon Nov 25 21:01:36 2024 +0000 mm/page_alloc: move set_page_refcounted() to callers of post_alloc_hook() In preparation for allocating frozen pages, stop initialising the page refcount in post_alloc_hook(). Link: https://lkml.kernel.org/r/20241125210149.2976098-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Miaohe Lin Reviewed-by: Zi Yan Acked-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Mel Gorman Cc: Muchun Song Cc: William Kucharski Signed-off-by: Andrew Morton mm/compaction.c | 2 ++ mm/internal.h | 3 +-- mm/page_alloc.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) commit 520128a1d1f06657cf52d7d87252ea9a10729256 Author: Matthew Wilcox (Oracle) Date: Mon Nov 25 21:01:35 2024 +0000 mm/page_alloc: export free_frozen_pages() instead of free_unref_page() We already have the concept of "frozen pages" (eg page_ref_freeze()), so let's not complicate things by also having the concept of "unref pages". Link: https://lkml.kernel.org/r/20241125210149.2976098-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Reviewed-by: William Kucharski Reviewed-by: Miaohe Lin Reviewed-by: Muchun Song Reviewed-by: Zi Yan Reviewed-by: Vlastimil Babka Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Mel Gorman Signed-off-by: Andrew Morton mm/internal.h | 2 +- mm/page_alloc.c | 18 +++++++++--------- mm/page_frag_cache.c | 6 +++--- mm/swap.c | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) commit 38558b2460d7881a3de3bdc31a23fa7034384d00 Author: Matthew Wilcox (Oracle) Date: Mon Nov 25 21:01:34 2024 +0000 mm: make alloc_pages_mpol() static All callers outside mempolicy.c now use folio_alloc_mpol() thanks to Kefeng's cleanups, so we can remove this as a visible symbol. And also remove the alloc_hooks for alloc_pages_mpol(), since all users in mempolicy.c are using the nonprof version. Link: https://lkml.kernel.org/r/20241125210149.2976098-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Acked-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Mel Gorman Cc: Miaohe Lin Cc: Muchun Song Cc: William Kucharski Signed-off-by: Andrew Morton include/linux/gfp.h | 8 -------- mm/mempolicy.c | 8 ++++---- 2 files changed, 4 insertions(+), 12 deletions(-) commit d4056386aefdcd0637f9bb2bd52279af043f0381 Author: Matthew Wilcox (Oracle) Date: Mon Nov 25 21:01:33 2024 +0000 mm/page_alloc: cache page_zone() result in free_unref_page() Patch series "Allocate and free frozen pages", v3. Slab does not need to use the page refcount at all, and it can avoid an atomic operation on page free. Hugetlb wants to delay setting the refcount until it has assembled a complete gigantic page. We already have the ability to freeze a page (safely reduce its reference count to 0), so this patchset adds APIs to allocate and free pages which are in a frozen state. This patchset is also a step towards the Glorious Future in which struct page doesn't have a refcount; the users which need a refcount will have one in their per-allocation memdesc. This patch (of 15): Save 17 bytes of text by calculating page_zone() once instead of twice. Link: https://lkml.kernel.org/r/20241125210149.2976098-1-willy@infradead.org Link: https://lkml.kernel.org/r/20241125210149.2976098-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Miaohe Lin Reviewed-by: Muchun Song Acked-by: Mel Gorman Reviewed-by: Zi Yan Acked-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: William Kucharski Signed-off-by: Andrew Morton mm/page_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bfc1d1782984903457b2707d05a35b24ce5fbea1 Author: Donet Tom Date: Tue Nov 26 09:56:54 2024 -0600 mm: migrate: remove unused argument vma from migrate_misplaced_folio() Commit ee86814b0562 ("mm/migrate: move NUMA hinting fault folio isolation + checks under PTL") removed the code that had used the vma argument in migrate_misplaced_folio. Since the vma argument was no longer used in migrate_misplaced_folio, this patch removes it. Link: https://lkml.kernel.org/r/20241126155655.466186-1-donettom@linux.ibm.com Signed-off-by: Donet Tom Reviewed-by: Baolin Wang Reviewed-by: Zi Yan Acked-by: David Hildenbrand Cc: Ritesh Harjani (IBM) Signed-off-by: Andrew Morton include/linux/migrate.h | 6 ++---- mm/huge_memory.c | 2 +- mm/memory.c | 2 +- mm/migrate.c | 3 +-- 4 files changed, 5 insertions(+), 8 deletions(-) commit a882dd92de83f7d1634dbde6f1d065d6ac73546e Author: Alice Ryhl Date: Wed Nov 27 13:53:29 2024 +0000 mm/zswap: add LRU_STOP to comment about dropping the lru lock This function has been able to return LRU_STOP since commit b49547ade38a ("mm/zswap: stop lru list shrinking when encounter warm region"). To reduce confusion, update the comment to also list LRU_STOP as an option. Link: https://lkml.kernel.org/r/20241127-lru-stop-comment-v1-1-f54a7cba9429@google.com Signed-off-by: Alice Ryhl Acked-by: Johannes Weiner Reviewed-by: Chengming Zhou Cc: Alice Ryhl Cc: Nhat Pham Cc: Yosry Ahmed Signed-off-by: Andrew Morton mm/zswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 002ebb925e2fcf150b0e346a960060ea4789ff01 Author: Wei Yang Date: Mon Nov 25 02:41:56 2024 +0000 maple_tree: use mas_next_slot() directly The loop condition makes sure (mas.last < max), so we can directly use mas_next_slot() here. Since no other use of mas_next_entry(), it is removed. Link: https://lkml.kernel.org/r/20241125024156.26093-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: Liam R. Howlett Cc: Sidhartha Kumar Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton lib/maple_tree.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) commit 878d87fc6877bc6989b40bb02c4c2ce58be51a6b Author: Eric Biggers Date: Sun Jan 5 11:34:16 2025 -0800 crypto: skcipher - call cond_resched() directly In skcipher_walk_done(), instead of calling crypto_yield() which requires a translation between flags, just call cond_resched() directly. This has the same effect. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/skcipher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8b13c2239d8b65604b7a0ff18c2eb74b531c4c06 Author: Eric Biggers Date: Sun Jan 5 11:34:15 2025 -0800 crypto: skcipher - optimize initializing skcipher_walk fields The helper functions like crypto_skcipher_blocksize() take in a pointer to a tfm object, but they actually return properties of the algorithm. As the Linux kernel is compiled with -fno-strict-aliasing, the compiler has to assume that the writes to struct skcipher_walk could clobber the tfm's pointer to its algorithm. Thus it gets repeatedly reloaded in the generated code. Therefore, replace the use of these helper functions with staightforward accesses to the struct fields. Note that while *users* of the skcipher and aead APIs are supposed to use the helper functions, this particular code is part of the API *implementation* in crypto/skcipher.c, which already accesses the algorithm struct directly in many cases. So there is no reason to prefer the helper functions here. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/skcipher.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit f2489456fe54757098d967c1362c637da0be08a9 Author: Eric Biggers Date: Sun Jan 5 11:34:14 2025 -0800 crypto: skcipher - clean up initialization of skcipher_walk::flags - Initialize SKCIPHER_WALK_SLEEP in a consistent way, and check for atomic=true at the same time as CRYPTO_TFM_REQ_MAY_SLEEP. Technically atomic=true only needs to apply after the first step, but it is very rarely used. We should optimize for the common case. So, check 'atomic' alongside CRYPTO_TFM_REQ_MAY_SLEEP. This is more efficient. - Initialize flags other than SKCIPHER_WALK_SLEEP to 0 rather than preserving them. No caller actually initializes the flags, which makes it impossible to use their original values for anything. Indeed, that does not happen and all meaningful flags get overridden anyway. It may have been thought that just clearing one flag would be faster than clearing all flags, but that's not the case as the former is a read-write operation whereas the latter is just a write. - Move the explicit clearing of SKCIPHER_WALK_SLOW, SKCIPHER_WALK_COPY, and SKCIPHER_WALK_DIFF into skcipher_walk_done(), since it is now only needed on non-first steps. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/skcipher.c | 39 +++++++++++++-------------------------- 1 file changed, 13 insertions(+), 26 deletions(-) commit d97d0668e8bb976aa66d75a93da2f707ed4e4de4 Author: Eric Biggers Date: Sun Jan 5 11:34:13 2025 -0800 crypto: skcipher - fold skcipher_walk_skcipher() into skcipher_walk_virt() Fold skcipher_walk_skcipher() into skcipher_walk_virt() which is its only remaining caller. No change in behavior. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/skcipher.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 24300d282f7e60ee407c7a6ec8e316b8b9fd570d Author: Eric Biggers Date: Sun Jan 5 11:34:12 2025 -0800 crypto: skcipher - remove redundant check for SKCIPHER_WALK_SLOW In skcipher_walk_done(), remove the check for SKCIPHER_WALK_SLOW because it is always true. All other flags (and lack thereof) were checked earlier in the function, leaving SKCIPHER_WALK_SLOW as the only remaining possibility. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/skcipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a22a2316be227f8d85a6c8abe4bd568bfeb0233c Author: Eric Biggers Date: Sun Jan 5 11:34:11 2025 -0800 crypto: skcipher - remove redundant clamping to page size In the case where skcipher_walk_next() allocates a bounce page, that page by definition has size PAGE_SIZE. The number of bytes to copy 'n' is guaranteed to fit in it, since earlier in the function it was clamped to be at most a page. Therefore remove the unnecessary logic that tried to clamp 'n' again to fit in the bounce page. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/skcipher.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 807c8018f5c90b10e172caf3858999cf3754fe7f Author: Eric Biggers Date: Sun Jan 5 11:34:10 2025 -0800 crypto: skcipher - remove unnecessary page alignment of bounce buffer In the slow path of skcipher_walk where it uses a slab bounce buffer for the data and/or IV, do not bother to avoid crossing a page boundary in the part(s) of this buffer that are used, and do not bother to allocate extra space in the buffer for that purpose. The buffer is accessed only by virtual address, so pages are irrelevant for it. This logic may have been present due to the physical address support in skcipher_walk, but that has now been removed. Or it may have been present to be consistent with the fast path that currently does not hand back addresses that span pages, but that behavior is a side effect of the pages being "mapped" one by one and is not actually a requirement. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/skcipher.c | 62 ++++++++++++++----------------------------------------- 1 file changed, 15 insertions(+), 47 deletions(-) commit e71778c95a804ba641e1407b3a5e49bcae791f3a Author: Eric Biggers Date: Sun Jan 5 11:34:09 2025 -0800 crypto: skcipher - document skcipher_walk_done() and rename some vars skcipher_walk_done() has an unusual calling convention, and some of its local variables have unclear names. Document it and rename variables to make it a bit clearer what is going on. No change in behavior. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/skcipher.c | 50 ++++++++++++++++++++++++++------------ include/crypto/internal/skcipher.h | 2 +- 2 files changed, 35 insertions(+), 17 deletions(-) commit 42c5675c2f5baca8bb16d2f183e05339256d207c Author: Eric Biggers Date: Sun Jan 5 11:23:37 2025 -0800 crypto: omap - switch from scatter_walk to plain offset The omap driver was using struct scatter_walk, but only to maintain an offset, rather than iterating through the virtual addresses of the data contained in the scatterlist which is what scatter_walk is intended for. Make it just use a plain offset instead. This is simpler and avoids using struct scatter_walk in a way that is not well supported. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu drivers/crypto/omap-aes.c | 34 ++++++++++++++-------------------- drivers/crypto/omap-aes.h | 6 ++---- drivers/crypto/omap-des.c | 40 ++++++++++++++++------------------------ 3 files changed, 32 insertions(+), 48 deletions(-) commit ee3c9c7e27a68c66490c65141a0c9c5b1fd87695 Author: Eric Biggers Date: Sun Jan 5 11:21:10 2025 -0800 crypto: powerpc/p10-aes-gcm - simplify handling of linear associated data p10_aes_gcm_crypt() is abusing the scatter_walk API to get the virtual address for the first source scatterlist element. But this code is only built for PPC64 which is a !HIGHMEM platform, and it can read past a page boundary from the address returned by scatterwalk_map() which means it already assumes the address is from the kernel's direct map. Thus, just use sg_virt() instead to get the same result in a simpler way. Cc: Christophe Leroy Cc: Danny Tsen Cc: Michael Ellerman Cc: Naveen N Rao Cc: Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/powerpc/crypto/aes-gcm-p10-glue.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 1742b0a0e4668763066fab5fa76d071c1ac92648 Author: Krzysztof Kozlowski Date: Sat Jan 4 21:55:02 2025 +0100 crypto: bcm - Drop unused setting of local 'ptr' variable spum_cipher_req_init() assigns 'spu_hdr' to local 'ptr' variable and later increments 'ptr' over specific fields like it was meant to point to pieces of message for some purpose. However the code does not read 'ptr' at all thus this entire iteration over 'spu_hdr' seams pointless. Reported by clang W=1 build: drivers/crypto/bcm/spu.c:839:6: error: variable 'ptr' set but not used [-Werror,-Wunused-but-set-variable] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu drivers/crypto/bcm/spu.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 061b27e37238d374d8a6954b22d9c5d07c5db574 Author: Yang Shen Date: Fri Jan 3 18:21:38 2025 +0800 crypto: hisilicon/qm - support new function communication On the HiSilicon accelerators drivers, the PF/VFs driver can send messages to the VFs/PF by writing hardware registers, and the VFs/PF driver receives messages from the PF/VFs by reading hardware registers. To support this feature, a new version id is added, different communication mechanism are used based on different version id. Signed-off-by: Yang Shen Signed-off-by: Weili Qian Signed-off-by: Herbert Xu drivers/crypto/hisilicon/hpre/hpre_main.c | 1 - drivers/crypto/hisilicon/qm.c | 233 ++++++++++++++++++++++-------- drivers/crypto/hisilicon/sec2/sec_main.c | 1 - drivers/crypto/hisilicon/zip/zip_main.c | 1 - include/linux/hisi_acc_qm.h | 3 + 5 files changed, 178 insertions(+), 61 deletions(-) commit a268231678b08eee776797007e05619a5375cbb3 Author: Thorsten Blum Date: Mon Dec 30 12:36:54 2024 +0100 crypto: proc - Use str_yes_no() and str_no_yes() helpers Remove hard-coded strings by using the str_yes_no() and str_no_yes() helpers. Remove unnecessary curly braces. Signed-off-by: Thorsten Blum Signed-off-by: Herbert Xu crypto/proc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit a833fb852e96c778bff1d14866f1db2c346b3d2e Merge: afc664987ab3 3fc44ca44d7c Author: Jakub Kicinski Date: Mon Jan 13 19:24:32 2025 -0800 Merge branch 'mlx5-hw-managed-flow-steering-in-fs-core-level' Tariq Toukan says: ==================== mlx5 HW-Managed Flow Steering in FS core level This patchset by Moshe follows Yevgeny's patchsets [1][2] on subject "HW-Managed Flow Steering in mlx5 driver". As introduced there in HW managed Flow Steering mode (HWS) the driver is configuring steering rules directly to the HW using WQs with a special new type of WQE (Work Queue Element). This way we can reach higher rule insertion/deletion rate with much lower CPU utilization compared to SW Managed Flow Steering (SWS). This patchset adds API to manage namespace, flow tables, flow groups and prepare FTE (Flow Table Entry) rules. It also adds caching and pool mechanisms for HWS actions to allow sharing of steering actions among different rules. The implementation of this API in FS layer, allows FS core to use HW Managed Flow Steering in addition to the existing FW or SW Managed Flow Steering. Patch 13 of this series adds support for configuring HW Managed Flow Steering mode through devlink param, similar to configuring SW Managed Flow Steering mode: # devlink dev param set pci/0000:08:00.0 name flow_steering_mode \ cmode runtime value hmfs In addition, the series contains 2 HWS patches from Yevgeny that implement flow update support. [1] https://lore.kernel.org/netdev/20240903031948.78006-1-saeed@kernel.org/ [2] https://lore.kernel.org/all/20250102181415.1477316-1-tariqt@nvidia.com/ ==================== Link: https://patch.msgid.link/20250109160546.1733647-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 3fc44ca44d7c6c9296e9926dd3d99a74694bcb6e Author: Yevgeny Kliteynik Date: Thu Jan 9 18:05:46 2025 +0200 net/mlx5: HWS, update flow - support through bigger action RTC This patch is the second part of update flow implementation. Instead of using two action RTCs, we use the same RTC which is twice the size of what was required before the update flow support. This way we always allocate STEs from the same RTC (same pool), which means that update is done similar to how create is done. The bigger size allows us to allocate and write new STEs, and later free the old (pre-update) STEs. Similar to rule creation, STEs are written in reverse order: - write action STEs, while match STE is still pointing to the old action STEs - overwrite the match STE with the new one, which now is pointing to the new action STEs Old action STEs can be freed only once we got completion on the writing of the new match STE. To implement this we added new rule states: UPDATING/UPDATED. Rule is moved to UPDATING state in the beginning of the update flow. Once all completions are received, rule is moved to UPDATED state. At this point old action STEs are freed and rule goes back to CREATED state. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Vlad Dogaru Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250109160546.1733647-16-tariqt@nvidia.com Signed-off-by: Jakub Kicinski .../mellanox/mlx5/core/steering/hws/matcher.c | 10 ++- .../mellanox/mlx5/core/steering/hws/rule.c | 88 ++++++++++++---------- .../mellanox/mlx5/core/steering/hws/rule.h | 15 +++- .../mellanox/mlx5/core/steering/hws/send.c | 20 +++-- 4 files changed, 80 insertions(+), 53 deletions(-) commit ab6912ff6558a504d9a02c01333ef8f4247681ad Author: Yevgeny Kliteynik Date: Thu Jan 9 18:05:45 2025 +0200 net/mlx5: HWS, update flow - remove the use of dual RTCs This patch is the first part of update flow implementation. Update flow should support rules with single STE (match STE only), as well as rules with multiple STEs (match STE plus action STEs). Supporting the rules with single STE is straightforward: we just overwrite the STE, which is an atomic operation. Supporting the rules with action STEs is a more complicated case. The existing implementation uses two action RTCs per matcher and alternates between the two for each update request. This implementation was unnecessarily complex and lead to some unhandled edge cases, so the support for rule update with multiple STEs wasn't really functional. This patch removes this code, and the next patch adds implementation of a different approach. Note that after applying this patch and before applying the next patch we still have support for update rule with single STE (only match STE w/o action STEs), but update will fail for rules with action STEs. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Vlad Dogaru Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250109160546.1733647-15-tariqt@nvidia.com Signed-off-by: Jakub Kicinski .../mellanox/mlx5/core/steering/hws/debug.c | 10 +- .../mellanox/mlx5/core/steering/hws/internal.h | 1 - .../mellanox/mlx5/core/steering/hws/matcher.c | 170 ++++++++------------- .../mellanox/mlx5/core/steering/hws/matcher.h | 8 +- .../mellanox/mlx5/core/steering/hws/rule.c | 73 ++------- .../mellanox/mlx5/core/steering/hws/rule.h | 3 +- 6 files changed, 81 insertions(+), 184 deletions(-) commit 9fc43b5e3933a7e5924ba83d7561399d439de5bb Author: Moshe Shemesh Date: Thu Jan 9 18:05:44 2025 +0200 net/mlx5: fs, add HWS to steering mode options Add HW Steering mode to mlx5 devlink param of steering mode options. Signed-off-by: Moshe Shemesh Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250109160546.1733647-14-tariqt@nvidia.com Signed-off-by: Jakub Kicinski Documentation/networking/devlink/mlx5.rst | 3 ++ drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 50 +++++++++++++++------- .../mellanox/mlx5/core/steering/hws/fs_hws.c | 5 +++ .../mellanox/mlx5/core/steering/hws/fs_hws.h | 7 +++ 4 files changed, 49 insertions(+), 16 deletions(-) commit c09cf80ed2994277fa0fd19f08a2a5688153b931 Author: Moshe Shemesh Date: Thu Jan 9 18:05:43 2025 +0200 net/mlx5: fs, add HWS get capabilities Add API function get capabilities to HW Steering flow commands. Signed-off-by: Moshe Shemesh Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250109160546.1733647-13-tariqt@nvidia.com Signed-off-by: Jakub Kicinski .../net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 866e50321256359921adfe948051c7263ad60b15 Author: Moshe Shemesh Date: Thu Jan 9 18:05:42 2025 +0200 net/mlx5: fs, set create match definer to not supported by HWS Currently HW Steering does not support the API functions of create and destroy match definer. Return not supported error in case requested. Signed-off-by: Moshe Shemesh Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250109160546.1733647-12-tariqt@nvidia.com Signed-off-by: Jakub Kicinski .../net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 8e2e08a6d1e01e748bbc2f1e9c20612c1278d423 Author: Moshe Shemesh Date: Thu Jan 9 18:05:41 2025 +0200 net/mlx5: fs, add support for dest vport HWS action Add support for HW Steering action of vport destination. Add dest vport actions cache. Hold action in cache per vport / vport and vhca_id. Add action to cache on demand and remove on namespace closure to reduce actions creation and destroy. Signed-off-by: Moshe Shemesh Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250109160546.1733647-11-tariqt@nvidia.com Signed-off-by: Jakub Kicinski .../mellanox/mlx5/core/steering/hws/fs_hws.c | 63 ++++++++++++++++++++++ .../mellanox/mlx5/core/steering/hws/fs_hws.h | 2 + 2 files changed, 65 insertions(+) commit 2ec6786ad0a6be59ffd6cada5507a2b0b4bb0a08 Author: Moshe Shemesh Date: Thu Jan 9 18:05:40 2025 +0200 net/mlx5: fs, add HWS fte API functions Add create, destroy and update fte API functions for adding, removing and updating flow steering rules in HW Steering mode. Get HWS actions according to required rule, use actions from pool whenever possible. Signed-off-by: Moshe Shemesh Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250109160546.1733647-10-tariqt@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 5 +- .../mellanox/mlx5/core/steering/hws/fs_hws.c | 549 +++++++++++++++++++++ .../mellanox/mlx5/core/steering/hws/fs_hws.h | 13 + 3 files changed, 566 insertions(+), 1 deletion(-) commit 3fd62e943aebe72dc309177b874bdf6d0315165e Author: Moshe Shemesh Date: Thu Jan 9 18:05:39 2025 +0200 net/mlx5: fs, add dest table cache Add cache of destination flow table HWS action per HWS table. For each flow table created cache a destination action towards this table. The cached action will be used on the downstream patch whenever a rule requires such action. Signed-off-by: Moshe Shemesh Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250109160546.1733647-9-tariqt@nvidia.com Signed-off-by: Jakub Kicinski .../mellanox/mlx5/core/steering/hws/fs_hws.c | 68 +++++++++++++++++++++- .../mellanox/mlx5/core/steering/hws/fs_hws.h | 1 + 2 files changed, 66 insertions(+), 3 deletions(-) commit b581f4266928d3b5d1bbe711e39623d9a1696091 Author: Moshe Shemesh Date: Thu Jan 9 18:05:38 2025 +0200 net/mlx5: fs, manage flow counters HWS action sharing by refcount Multiple flow counters can utilize a single Hardware Steering (HWS) action for Hardware Steering rules. Given that these counter bulks are not exclusively created for Hardware Steering, but also serve purposes such as statistics gathering and other steering modes, it's more efficient to create the HWS action only when it's first needed by a Hardware Steering rule. This approach allows for better resource management through the use of a reference count, rather than automatically creating an HWS action for every bulk of flow counters. Signed-off-by: Moshe Shemesh Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250109160546.1733647-8-tariqt@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 36 +++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/fs_counters.c | 37 ++++------------- .../mellanox/mlx5/core/steering/hws/fs_hws_pools.c | 47 ++++++++++++++++++++++ .../mellanox/mlx5/core/steering/hws/fs_hws_pools.h | 3 ++ 4 files changed, 94 insertions(+), 29 deletions(-) commit b36315ca69cb39c839c98a31cae27b266481b0ac Author: Moshe Shemesh Date: Thu Jan 9 18:05:37 2025 +0200 net/mlx5: fs, add HWS modify header API function Add modify header alloc and dealloc API functions to provide modify header actions for steering rules. Use fs hws pools to get actions from shared bulks of modify header actions. Signed-off-by: Moshe Shemesh Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250109160546.1733647-7-tariqt@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 1 + .../mellanox/mlx5/core/steering/hws/fs_hws.c | 120 +++++++++++++++ .../mellanox/mlx5/core/steering/hws/fs_hws.h | 2 + .../mellanox/mlx5/core/steering/hws/fs_hws_pools.c | 165 +++++++++++++++++++++ .../mellanox/mlx5/core/steering/hws/fs_hws_pools.h | 22 +++ 5 files changed, 310 insertions(+) commit aecd9d1020e3c6d29ecc9efccbcee7863e83c517 Author: Moshe Shemesh Date: Thu Jan 9 18:05:36 2025 +0200 net/mlx5: fs, add HWS packet reformat API function Add packet reformat alloc and dealloc API functions to provide packet reformat actions for steering rules. Add HWS action pools for each of the following packet reformat types: - decapl3: decapsulate l3 tunnel to l2 - encapl2: encapsulate l2 to tunnel l2 - encapl3: encapsulate l2 to tunnel l3 - insert_hdr: insert header In addition cache remove header action for remove vlan header as this is currently the only use case of remove header action in the driver. Signed-off-by: Moshe Shemesh Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250109160546.1733647-6-tariqt@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/Makefile | 1 + drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 1 + .../net/ethernet/mellanox/mlx5/core/fs_counters.c | 5 +- drivers/net/ethernet/mellanox/mlx5/core/fs_pool.c | 5 +- drivers/net/ethernet/mellanox/mlx5/core/fs_pool.h | 5 +- .../mellanox/mlx5/core/steering/hws/fs_hws.c | 293 ++++++++++++++++++++- .../mellanox/mlx5/core/steering/hws/fs_hws.h | 12 + .../mellanox/mlx5/core/steering/hws/fs_hws_pools.c | 238 +++++++++++++++++ .../mellanox/mlx5/core/steering/hws/fs_hws_pools.h | 48 ++++ include/linux/mlx5/mlx5_ifc.h | 1 + 10 files changed, 598 insertions(+), 11 deletions(-) commit c7e62a788a98387f8ccc34c8b9c0ba2d144e7d16 Author: Moshe Shemesh Date: Thu Jan 9 18:05:35 2025 +0200 net/mlx5: fs, add HWS actions pool The HW Steering actions pool will help utilize the option in HW Steering to share steering actions among different rules. Create pool on root namespace creation and add few HW Steering actions that don't depend on the steering rule itself and thus can be shared between rules, created on same namespace: tag, pop_vlan, push_vlan, drop, decap l2. Signed-off-by: Moshe Shemesh Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250109160546.1733647-5-tariqt@nvidia.com Signed-off-by: Jakub Kicinski .../mellanox/mlx5/core/steering/hws/fs_hws.c | 58 ++++++++++++++++++++++ .../mellanox/mlx5/core/steering/hws/fs_hws.h | 9 ++++ 2 files changed, 67 insertions(+) commit 4160405f6c4dfbf34addbad83e1134deb6f56392 Author: Moshe Shemesh Date: Thu Jan 9 18:05:34 2025 +0200 net/mlx5: fs, add HWS flow group API functions Add API functions to create and destroy HW Steering flow groups. Each flow group consists of a Backward Compatible (BWC) HW Steering matcher which holds the flow group match criteria. Signed-off-by: Moshe Shemesh Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250109160546.1733647-4-tariqt@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 5 ++- .../mellanox/mlx5/core/steering/hws/fs_hws.c | 42 ++++++++++++++++++++++ .../mellanox/mlx5/core/steering/hws/fs_hws.h | 4 +++ 3 files changed, 50 insertions(+), 1 deletion(-) commit 0f3ecf5c57d86585ac4cfd20b512463bb6835dc5 Author: Moshe Shemesh Date: Thu Jan 9 18:05:33 2025 +0200 net/mlx5: fs, add HWS flow table API functions Add API functions to create, modify and destroy HW Steering flow tables. Modify table enables change, connect or disconnect default miss table. Add update root flow table API function. Signed-off-by: Moshe Shemesh Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250109160546.1733647-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 5 +- .../mellanox/mlx5/core/steering/hws/fs_hws.c | 113 +++++++++++++++++++++ .../mellanox/mlx5/core/steering/hws/fs_hws.h | 5 + 3 files changed, 122 insertions(+), 1 deletion(-) commit cbfdefc44194bf67843f9000cf3f81fb019fcdfb Author: Moshe Shemesh Date: Thu Jan 9 18:05:32 2025 +0200 net/mlx5: fs, add HWS root namespace functions Add flow steering commands structure for HW steering. Implement create, destroy and set peer HW steering root namespace functions. Signed-off-by: Moshe Shemesh Reviewed-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20250109160546.1733647-2-tariqt@nvidia.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx5/core/Makefile | 4 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 9 +++- .../mellanox/mlx5/core/steering/hws/fs_hws.c | 56 ++++++++++++++++++++++ .../mellanox/mlx5/core/steering/hws/fs_hws.h | 25 ++++++++++ 4 files changed, 90 insertions(+), 4 deletions(-) commit afc664987ab318c227ebc0f639f5afc921aaf674 Author: Jakub Kicinski Date: Fri Jan 10 23:13:39 2025 -0800 eth: iavf: extend the netdev_lock usage iavf uses the netdev->lock already to protect shapers. In an upcoming series we'll try to protect NAPI instances with netdev->lock. We need to modify the protection a bit. All NAPI related calls in the driver need to be consistently under the lock. This will allow us to easily switch to a "we already hold the lock" NAPI API later. register_netdevice(), OTOH, must not be called under the netdev_lock() as we do not intend to have an "already locked" version of this call. Link: https://patch.msgid.link/20250111071339.3709071-1-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/ethernet/intel/iavf/iavf_main.c | 53 ++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 8 deletions(-) commit 37adf101f6f72be4a658ec019912dce67c81660e Author: Jakub Kicinski Date: Sun Jan 12 16:34:56 2025 -0800 net: cleanup init_dummy_netdev_core() init_dummy_netdev_core() used to cater to net_devices which did not come from alloc_netdev_mqs(). Since that's no longer supported remove the init logic which duplicates alloc_netdev_mqs(). While at it rename back to init_dummy_netdev(). Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250113003456.3904110-2-kuba@kernel.org Signed-off-by: Jakub Kicinski net/core/dev.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit f835bdae716751fa20451508150e5fdd5f5b2be3 Author: Jakub Kicinski Date: Sun Jan 12 16:34:55 2025 -0800 net: remove init_dummy_netdev() init_dummy_netdev() can initialize statically declared or embedded net_devices. Such netdevs did not come from alloc_netdev_mqs(). After recent work by Breno, there are the only two cases where we have do that. Switch those cases to alloc_netdev_mqs() and delete init_dummy_netdev(). Dealing with static netdevs is not worth the maintenance burden. Reviewed-by: Alexander Lobakin Reviewed-by: Matthieu Baerts (NGI0) Reviewed-by: Joe Damato Link: https://patch.msgid.link/20250113003456.3904110-1-kuba@kernel.org Signed-off-by: Jakub Kicinski include/linux/netdevice.h | 1 - net/core/dev.c | 22 ---------------------- net/mptcp/protocol.c | 8 +++++--- net/xfrm/xfrm_input.c | 9 ++++++--- 4 files changed, 11 insertions(+), 29 deletions(-) commit b1b62d6d332e09a2125c830c809c2622164ec35b Author: Donald Hunter Date: Sat Jan 11 15:48:03 2025 +0000 tools/net/ynl: ethtool: support spec load from install location Replace hard-coded paths for spec and schema with lookup functions so that ethtool.py will work in-tree or when installed. Signed-off-by: Donald Hunter Link: https://patch.msgid.link/20250111154803.7496-2-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski tools/net/ynl/pyynl/ethtool.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2ff80cefb77b70aa860ecf3c69f50e3f4cce439b Author: Donald Hunter Date: Sat Jan 11 15:48:02 2025 +0000 tools/net/ynl: add support for --family and --list-families Add a --family option to ynl to specify the spec by family name instead of file path, with support for searching in-tree and system install location and a --list-families option to show the available families. ./tools/net/ynl/pyynl/cli.py --family rt_addr --dump getaddr Signed-off-by: Donald Hunter Link: https://patch.msgid.link/20250111154803.7496-1-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski tools/net/ynl/pyynl/cli.py | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) commit 7c125d5b767b14af1861893e9338fe797d20dca2 Author: Jakub Kicinski Date: Fri Jan 10 18:47:42 2025 -0800 can: grcan: move napi_enable() from under spin lock I don't see any reason why napi_enable() needs to be under the lock, only reason I could think of is if the IRQ also took this lock but it doesn't. napi_enable() will soon need to sleep. Acked-by: Vincent Mailhol Reviewed-by: Francois Romieu Acked-by: Marc Kleine-Budde Link: https://patch.msgid.link/20250111024742.3680902-1-kuba@kernel.org Signed-off-by: Jakub Kicinski drivers/net/can/grcan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6e702e6aba84c73617d767285de5bc6270706026 Author: Raphael Gallais-Pou Date: Thu Jan 9 16:58:42 2025 +0100 net: stmmac: sti: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() Letting the compiler remove these functions when the kernel is built without CONFIG_PM_SLEEP support is simpler and less error prone than the use of #ifdef based kernel configuration guards. Signed-off-by: Raphael Gallais-Pou Reviewed-by: Simon Horman Reviewed-by: Yanteng Si Link: https://patch.msgid.link/20250109155842.60798-1-rgallaispou@gmail.com Signed-off-by: Jakub Kicinski drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit a4b6539038c1aa1ae871aacf6e41b566c3613993 Author: Guangguan Wang Date: Sat Jan 4 22:32:01 2025 +0800 net/smc: fix data error when recvmsg with MSG_PEEK flag When recvmsg with MSG_PEEK flag, the data will be copied to user's buffer without advancing consume cursor and without reducing the length of rx available data. Once the expected peek length is larger than the value of bytes_to_rcv, in the loop of do while in smc_rx_recvmsg, the first loop will copy bytes_to_rcv bytes of data from the position local_tx_ctrl.cons, the second loop will copy the min(bytes_to_rcv, read_remaining) bytes from the position local_tx_ctrl.cons again because of the lacking of process with advancing consume cursor and reducing the length of available data. So do the subsequent loops. The data copied in the second loop and the subsequent loops will result in data error, as it should not be copied if no more data arrives and it should be copied from the position advancing bytes_to_rcv bytes from the local_tx_ctrl.cons if more data arrives. This issue can be reproduce by the following python script: server.py: import socket import time server_ip = '0.0.0.0' server_port = 12346 server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket.bind((server_ip, server_port)) server_socket.listen(1) print('Server is running and listening for connections...') conn, addr = server_socket.accept() print('Connected by', addr) while True: data = conn.recv(1024) if not data: break print('Received request:', data.decode()) conn.sendall(b'Hello, client!\n') time.sleep(5) conn.sendall(b'Hello, again!\n') conn.close() client.py: import socket server_ip = '' server_port = 12346 resp=b'Hello, client!\nHello, again!\n' client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client_socket.connect((server_ip, server_port)) request = 'Hello, server!' client_socket.sendall(request.encode()) peek_data = client_socket.recv(len(resp), socket.MSG_PEEK | socket.MSG_WAITALL) print('Peeked data:', peek_data.decode()) client_socket.close() Fixes: 952310ccf2d8 ("smc: receive data from RMBE") Reported-by: D. Wythe Signed-off-by: Guangguan Wang Link: https://patch.msgid.link/20250104143201.35529-1-guangguan.wang@linux.alibaba.com Signed-off-by: Jakub Kicinski net/smc/af_smc.c | 2 +- net/smc/smc_rx.c | 37 +++++++++++++++++++++---------------- net/smc/smc_rx.h | 8 ++++---- 3 files changed, 26 insertions(+), 21 deletions(-) commit 26cdda544479341d73512f5cf9cf4bab080c11c9 Author: Liao Chen Date: Tue Sep 3 13:23:11 2024 +0000 PCI: mvebu: Enable module autoloading Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Link: https://lore.kernel.org/r/20240903132311.961646-1-liaochen4@huawei.com Signed-off-by: Liao Chen Signed-off-by: Krzysztof Wilczyński Reviewed-by: Andrew Lunn drivers/pci/controller/pci-mvebu.c | 1 + 1 file changed, 1 insertion(+) commit c141ecc3cecd764799e17c8251026336cab86800 Author: Rob Herring (Arm) Date: Thu Jan 9 13:42:06 2025 -0600 of: Warn when of_property_read_bool() is used on non-boolean properties The use of of_property_read_bool() for non-boolean properties is deprecated. The primary use of it was to test property presence, but that has been replaced in favor of of_property_present(). With those uses now fixed, add a warning to discourage new ones. Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250109-dt-type-warnings-v1-2-0150e32e716c@kernel.org Signed-off-by: Rob Herring (Arm) drivers/of/property.c | 26 ++++++++++++++++++++++++++ include/linux/of.h | 25 +++++++------------------ 2 files changed, 33 insertions(+), 18 deletions(-) commit bb3914101f704a8282f65238d6b021d216efc608 Author: Rob Herring (Arm) Date: Thu Jan 9 13:42:05 2025 -0600 device property: Split property reading bool and presence test ops The fwnode/device property API currently implement (fwnode|device)_property_read_bool() with (fwnode|device)_property_present(). That does not allow having different behavior depending on the backend. Specifically, the usage of (fwnode|device)_property_read_bool() on non-boolean properties is deprecated on DT. In order to add a warning on this deprecated use, these 2 APIs need separate ops for the backend. Acked-by: Greg Kroah-Hartman Reviewed-by: Krzysztof Kozlowski Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20250109-dt-type-warnings-v1-1-0150e32e716c@kernel.org Signed-off-by: Rob Herring (Arm) drivers/acpi/property.c | 1 + drivers/base/property.c | 38 ++++++++++++++++++++++++++++++++++++++ drivers/base/swnode.c | 1 + drivers/of/property.c | 7 +++++++ include/linux/fwnode.h | 3 +++ include/linux/of.h | 4 +++- include/linux/property.h | 15 +++------------ 7 files changed, 56 insertions(+), 13 deletions(-) commit de7323f6fc10f36307895ce604585a539d1cc89a Author: Zijun Hu Date: Thu Jan 9 21:27:04 2025 +0800 of/fdt: Check fdt_get_mem_rsv() error in early_init_fdt_scan_reserved_mem() early_init_fdt_scan_reserved_mem() invoks fdt_get_mem_rsv(), and it will use uninitialized variables @base and @size once the callee suffers error. Fix by checking fdt_get_mem_rsv() error as other callers do. Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-13-db8a72415b8c@quicinc.com Signed-off-by: Rob Herring (Arm) drivers/of/fdt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ab7eeb7b43b0c3887c9811f34d157dec6343c8e4 Author: Zijun Hu Date: Thu Jan 9 21:27:03 2025 +0800 of: reserved-memory: Move an assignment to effective place in __reserved_mem_alloc_size() The assignment '@base = 0' in __reserved_mem_alloc_size() is meaningless since @base was already initialized to 0. Move the assignment to effective and proper place. Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-12-db8a72415b8c@quicinc.com Signed-off-by: Rob Herring (Arm) drivers/of/of_reserved_mem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 29091a52562bca4d6e678dd8f0085dac119d6a21 Author: Zijun Hu Date: Thu Jan 9 21:27:01 2025 +0800 of: reserved-memory: Do not make kmemleak ignore freed address early_init_dt_alloc_reserved_memory_arch() will free address @base when suffers memblock_mark_nomap() error, but it still makes kmemleak ignore the freed address @base via kmemleak_ignore_phys(). That is unnecessary, besides, also causes unnecessary warning messages: kmemleak_ignore_phys() -> make_black_object() -> paint_ptr() -> kmemleak_warn() // warning message here. Fix by avoiding kmemleak_ignore_phys() when suffer the error. Fixes: 658aafc8139c ("memblock: exclude MEMBLOCK_NOMAP regions from kmemleak") Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-10-db8a72415b8c@quicinc.com Signed-off-by: Rob Herring (Arm) drivers/of/of_reserved_mem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 267b21d0bef8e67dbe6c591c9991444e58237ec9 Author: Zijun Hu Date: Thu Jan 9 21:27:00 2025 +0800 of: reserved-memory: Fix using wrong number of cells to get property 'alignment' According to DT spec, size of property 'alignment' is based on parent node’s #size-cells property. But __reserved_mem_alloc_size() wrongly uses @dt_root_addr_cells to get the property obviously. Fix by using @dt_root_size_cells instead of @dt_root_addr_cells. Fixes: 3f0c82066448 ("drivers: of: add initialization code for dynamic reserved memory") Cc: stable@vger.kernel.org Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-9-db8a72415b8c@quicinc.com Signed-off-by: Rob Herring (Arm) drivers/of/of_reserved_mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bfe257f9780d8f77045a7da6ec959ee0659d2f98 Author: Christian Marangi Date: Tue Jan 14 00:10:05 2025 +0100 clk: en7523: Add clock for eMMC for EN7581 Add clock for eMMC for EN7581. This is used to give info of the current eMMC source clock and to switch it from 200MHz or 150MHz. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20250113231030.6735-5-ansuelsmth@gmail.com Signed-off-by: Stephen Boyd drivers/clk/clk-en7523.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 82108ad3285f58f314ad41398f44017c7dbe44de Author: Christian Marangi Date: Tue Jan 14 00:10:04 2025 +0100 dt-bindings: clock: add ID for eMMC for EN7581 Add ID for eMMC for EN7581. This is to control clock selection of eMMC between 200MHz and 150MHz. Signed-off-by: Christian Marangi Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250113231030.6735-4-ansuelsmth@gmail.com Signed-off-by: Stephen Boyd include/dt-bindings/clock/en7523-clk.h | 2 ++ 1 file changed, 2 insertions(+) commit 02d3b7557ce28c373ea1e925ae16ab5988284313 Author: Christian Marangi Date: Tue Jan 14 00:10:03 2025 +0100 dt-bindings: clock: drop NUM_CLOCKS define for EN7581 Drop NUM_CLOCKS define for EN7581 include. This is not a binding and should not be placed here. Value is derived internally in the user driver. Signed-off-by: Christian Marangi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250113231030.6735-3-ansuelsmth@gmail.com Signed-off-by: Stephen Boyd include/dt-bindings/clock/en7523-clk.h | 2 -- 1 file changed, 2 deletions(-) commit e4a9748e7103c47e575459db2b6a77d14f34da2b Author: Christian Marangi Date: Tue Jan 14 00:10:02 2025 +0100 clk: en7523: Rework clock handling for different clock numbers Airoha EN7581 SoC have additional clock compared to EN7523 but current driver permits to only support up to EN7523 clock numbers. To handle this, rework the clock handling and permit to declare the clocks number in match_data and alloca clk_data based on the compatible match_data. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20250113231030.6735-2-ansuelsmth@gmail.com Signed-off-by: Stephen Boyd drivers/clk/clk-en7523.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 24728b70b036ab63557c4524640010816b4ab155 Merge: 40384c840ea1 60fe18237f72 Author: Shuah Khan Date: Mon Jan 13 16:19:12 2025 -0700 Merge tag 'nolibc-20250113-for-6.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc into nolibc nolibc changes for 6.14 Changes ------- * Test riscv32 support * Print an error message if toolchain for run-tests.sh is missing commit 3d6f25870d172e2b5f27dd829bbe567d5fe8ea31 Author: John B. Wyatt IV Date: Wed Jan 8 17:18:44 2025 -0500 pm: cpupower: Add missing residency header changes in cpuidle.h to SWIG "tools/cpupower: display residency value in idle-info" added a new function to cpuidle.h. This patch adds them to the bindings. Link: https://lore.kernel.org/linux-pm/20240809083728.266697-1-aboorvad@linux.ibm.com/ Tested by compiling both libcpupower and the headers; running the test script that does not use the functions as a basic sanity test. Link: https://lore.kernel.org/r/20250108221852.30771-1-jwyatt@redhat.com Signed-off-by: "John B. Wyatt IV" Signed-off-by: "John B. Wyatt IV" Signed-off-by: Shuah Khan tools/power/cpupower/bindings/python/raw_pylibcpupower.swg | 2 ++ 1 file changed, 2 insertions(+) commit c80dd3fc45d573458bc763d599d97c82cf5dc212 Author: Filipe Xavier Date: Tue Jan 7 16:25:39 2025 -0300 rust: uaccess: generalize userSliceReader to support any Vec The UserSliceReader::read_all function is currently restricted to use only Vec with the kmalloc allocator. However, there is no reason for this limitation. This patch generalizes the function to accept any Vec regardless of the allocator used. There's a use-case for a KVVec in Binder to avoid maximum sizes for a certain array. Link: https://github.com/Rust-for-Linux/linux/issues/1136 Signed-off-by: Filipe Xavier Reviewed-by: Alice Ryhl Reviewed-by: Boqun Feng Link: https://lore.kernel.org/r/20250107-gen-userslice-readall-alloc-v2-1-d7fe4d19241a@gmail.com [ Reflowed and slightly reworded title. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/uaccess.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c27e705cb2b71769dbb4bb1bee1920d2fa01a597 Author: Alice Ryhl Date: Wed Nov 20 06:46:05 2024 -0500 rust: kernel: add improved version of `ForeignOwnable::borrow_mut` Previously, the `ForeignOwnable` trait had a method called `borrow_mut` that was intended to provide mutable access to the inner value. However, the method accidentally made it possible to change the address of the object being modified, which usually isn't what we want. (And when we want that, it can be done by calling `from_foreign` and `into_foreign`, like how the old `borrow_mut` was implemented.) In this patch, we introduce an alternate definition of `borrow_mut` that solves the previous problem. Conceptually, given a pointer type `P` that implements `ForeignOwnable`, the `borrow_mut` method gives you the same kind of access as an `&mut P` would, except that it does not let you change the pointer `P` itself. This is analogous to how the existing `borrow` method provides the same kind of access to the inner value as an `&P`. Note that for types like `Arc`, having an `&mut Arc` only gives you immutable access to the inner `T`. This is because mutable references assume exclusive access, but there might be other handles to the same reference counted value, so the access isn't exclusive. The `Arc` type implements this by making `borrow_mut` return the same type as `borrow`. Signed-off-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Benno Lossin Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Andreas Hindborg Signed-off-by: Tamir Duberstein Acked-by: Danilo Krummrich Link: https://lore.kernel.org/r/20241120-borrow-mut-v6-6-80dbadd00951@gmail.com [ Updated to `crate::ffi::`. Reworded title slightly. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/alloc/kbox.rs | 21 ++++++++++++++ rust/kernel/sync/arc.rs | 7 +++++ rust/kernel/types.rs | 71 ++++++++++++++++++++++++++++++++++++++--------- 3 files changed, 86 insertions(+), 13 deletions(-) commit c6b97538c2c0f4de5902b5bb78eb89bd34219df9 Author: Tamir Duberstein Date: Wed Nov 20 06:46:04 2024 -0500 rust: kernel: reorder `ForeignOwnable` items `{into,from}_foreign` before `borrow` is slightly more logical. This removes an inconsistency with `kbox.rs` which already uses this ordering. Reviewed-by: Alice Ryhl Reviewed-by: Andreas Hindborg Signed-off-by: Tamir Duberstein Link: https://lore.kernel.org/r/20241120-borrow-mut-v6-5-80dbadd00951@gmail.com [ Reworded title slightly. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/sync/arc.rs | 18 +++++++++--------- rust/kernel/types.rs | 20 ++++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) commit 14686571a914833e38eef0f907202f58df4ffcd2 Author: Tamir Duberstein Date: Wed Nov 20 06:46:03 2024 -0500 rust: kernel: change `ForeignOwnable` pointer to mut It is slightly more convenient to operate on mut pointers, and this also properly conveys the desired ownership semantics of the trait. Reviewed-by: Alice Ryhl Reviewed-by: Andreas Hindborg Signed-off-by: Tamir Duberstein Acked-by: Danilo Krummrich Link: https://lore.kernel.org/r/20241120-borrow-mut-v6-4-80dbadd00951@gmail.com [ Reworded title slightly. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/alloc/kbox.rs | 16 ++++++++-------- rust/kernel/miscdevice.rs | 2 +- rust/kernel/sync/arc.rs | 10 +++++----- rust/kernel/types.rs | 14 +++++++------- 4 files changed, 21 insertions(+), 21 deletions(-) commit 5d385a356f628bd4a1d9f403588272d9626e3245 Author: Tamir Duberstein Date: Wed Nov 20 06:46:02 2024 -0500 rust: arc: split unsafe block, add missing comment The new SAFETY comment style is taken from existing comments in `deref` and `drop. Reviewed-by: Alice Ryhl Reviewed-by: Andreas Hindborg Signed-off-by: Tamir Duberstein Link: https://lore.kernel.org/r/20241120-borrow-mut-v6-3-80dbadd00951@gmail.com Signed-off-by: Miguel Ojeda rust/kernel/sync/arc.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit aa991a2a819535a0014e1159b455b64e3db87510 Author: Tamir Duberstein Date: Wed Nov 20 06:46:01 2024 -0500 rust: types: avoid `as` casts Replace `as` casts with `cast{,_mut}` calls which are a bit safer. In one instance, remove an unnecessary `as` cast without replacement. Reviewed-by: Alice Ryhl Reviewed-by: Andreas Hindborg Signed-off-by: Tamir Duberstein Acked-by: Danilo Krummrich Link: https://lore.kernel.org/r/20241120-borrow-mut-v6-2-80dbadd00951@gmail.com Signed-off-by: Miguel Ojeda rust/kernel/alloc/kbox.rs | 8 ++++---- rust/kernel/sync/arc.rs | 9 +++++---- rust/kernel/types.rs | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) commit c6340da3d254ee491fc113d4dc5566bea7bebdf3 Author: Tamir Duberstein Date: Wed Nov 20 06:46:00 2024 -0500 rust: arc: use `NonNull::new_unchecked` There is no need to check (and panic on violations of) the safety requirements on `ForeignOwnable` functions. Avoiding the check is consistent with the implementation of `ForeignOwnable` for `Box`. Reviewed-by: Alice Ryhl Reviewed-by: Andreas Hindborg Signed-off-by: Tamir Duberstein Link: https://lore.kernel.org/r/20241120-borrow-mut-v6-1-80dbadd00951@gmail.com Signed-off-by: Miguel Ojeda rust/kernel/sync/arc.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 47cb6bf7860ce33bdd000198f8b65cf9fb3324b4 Author: Xiangfei Ding Date: Wed Dec 4 04:47:49 2024 +0800 rust: use derive(CoercePointee) on rustc >= 1.84.0 The `kernel` crate relies on both `coerce_unsized` and `dispatch_from_dyn` unstable features. Alice Ryhl has proposed [1] the introduction of the unstable macro `SmartPointer` to reduce such dependence, along with a RFC patch [2]. Since Rust 1.81.0 this macro, later renamed to `CoercePointee` in Rust 1.84.0 [3], has been fully implemented with the naming discussion resolved. This feature is now on track to stabilization in the language. In order to do so, we shall start using this macro in the `kernel` crate to prove the functionality and utility of the macro as the justification of its stabilization. This patch makes this switch in such a way that the crate remains backward compatible with older Rust compiler versions, via the new Kconfig option `RUSTC_HAS_COERCE_POINTEE`. A minimal demonstration example is added to the `samples/rust/rust_print_main.rs` module. Link: https://rust-lang.github.io/rfcs/3621-derive-smart-pointer.html [1] Link: https://lore.kernel.org/all/20240823-derive-smart-pointer-v1-1-53769cd37239@google.com/ [2] Link: https://github.com/rust-lang/rust/pull/131284 [3] Signed-off-by: Xiangfei Ding Reviewed-by: Fiona Behrens Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20241203205050.679106-2-dingxiangfei2009@gmail.com [ Fixed version to 1.84. Renamed option to `RUSTC_HAS_COERCE_POINTEE` to match `CC_HAS_*` ones. Moved up new config option, closer to the `CC_HAS_*` ones. Simplified Kconfig line. Fixed typos and slightly reworded example and commit. Added Link to PR. - Miguel ] Signed-off-by: Miguel Ojeda init/Kconfig | 3 +++ rust/kernel/alloc.rs | 2 +- rust/kernel/lib.rs | 7 ++++--- rust/kernel/list/arc.rs | 9 ++++++--- rust/kernel/sync/arc.rs | 15 +++++++++++---- samples/rust/rust_print_main.rs | 18 ++++++++++++++++++ 6 files changed, 43 insertions(+), 11 deletions(-) commit 91da5a24144e5a82bf88c5f72068cf1628198668 Author: Jimmy Ostler Date: Thu Dec 19 22:25:33 2024 -0800 rust: alloc: add doctest for `ArrayLayout::new()` Add a rustdoc example and Kunit test to the `ArrayLayout` struct's `ArrayLayout::new()` function. This patch depends on the first patch in this series in order for the KUnit test to compile. Suggested-by: Boqun Feng Link: https://github.com/Rust-for-Linux/linux/issues/1131 Reviewed-by: Danilo Krummrich Signed-off-by: Jimmy Ostler Link: https://lore.kernel.org/r/f1564da5bcaa6be87aee312767a1d1694a03d1b7.1734674670.git.jtostler1@gmail.com [ Added periods to example comments. Reworded title. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/alloc/layout.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 59d5846594e9f82c11af72151de7cef3f325dd4b Author: Jimmy Ostler Date: Thu Dec 19 22:25:32 2024 -0800 rust: init: update `stack_try_pin_init` examples Change documentation imports to use `kernel::alloc::AllocError`, because `KBox::new()` now returns that, instead of the `core`'s `AllocError`. Reviewed-by: Danilo Krummrich Signed-off-by: Jimmy Ostler Link: https://lore.kernel.org/r/ec8badbe94c5e78f22315325a7f2ae96129d6a65.1734674670.git.jtostler1@gmail.com [ Fixed formatting of imports (still unordered). Slightly reworded commit. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/init.rs | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 7871c612cade8943694cc254740a374e3fb42a7c Author: Jimmy Ostler Date: Thu Dec 19 22:25:31 2024 -0800 rust: error: import `kernel`'s `LayoutError` instead of `core`'s Import the internal (`kernel::alloc`) version of `LayoutError` instead of the `core::alloc` one. In particular, this results in switching the type in the existing `From for Error` implementation. Acked-by: Danilo Krummrich Signed-off-by: Jimmy Ostler Link: https://lore.kernel.org/r/fe58a02189e8804a9eabdd01cb1927d4c491d79c.1734674670.git.jtostler1@gmail.com [ Reworded commit. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/error.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b6357e26865a25650e49c4eb5abe6ef57ae4ede1 Author: Daniel Sedlak Date: Sat Nov 23 10:50:31 2024 +0100 rust: str: replace unwraps with question mark operators Simplify the error handling by replacing unwraps with the question mark operator. Furthermore, unwraps can convey a wrong impression that unwrapping is fine in general, thus this patch removes this unwrapping. Suggested-by: Miguel Ojeda Link: https://lore.kernel.org/rust-for-linux/CANiq72nsK1D4NuQ1U7NqMWoYjXkqQSj4QuUEL98OmFbq022Z9A@mail.gmail.com/ Reviewed-by: Alice Ryhl Signed-off-by: Daniel Sedlak Link: https://lore.kernel.org/r/20241123095033.41240-5-daniel@sedlak.dev [ Slightly reworded commit. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/str.rs | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 57c1ccc7e71a2f08ef0c1c525408195fb606bc36 Author: Daniel Sedlak Date: Sat Nov 23 10:50:30 2024 +0100 rust: page: remove unnecessary helper function from doctest Doctests in `page.rs` contained a helper function `dox` which acted as a wrapper for using the `?` operator. However, this is not needed because doctests are implicitly wrapped in function see [1]. Link: https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html#using--in-doc-tests [1] Suggested-by: Dirk Behme Suggested-by: Miguel Ojeda Link: https://lore.kernel.org/rust-for-linux/459782fe-afca-4fe6-8ffb-ba7c7886de0a@de.bosch.com/ Reviewed-by: Alice Ryhl Reviewed-by: Tamir Duberstein Signed-off-by: Daniel Sedlak Link: https://lore.kernel.org/r/20241123095033.41240-4-daniel@sedlak.dev [ Fixed typo in SoB. Slightly reworded commit. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/page.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3a518544829630d172b067be8697e018e258c445 Author: Daniel Sedlak Date: Sat Nov 23 10:50:29 2024 +0100 rust: rbtree: remove unwrap in asserts Remove `unwrap` in asserts and replace it with `Option::Some` matching. By doing it this way, the examples are more descriptive, so it disambiguates the return type of the `get(...)` and `next(...)`, because the `unwrap(...)` can also be called on `Result`. Signed-off-by: Daniel Sedlak Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20241123095033.41240-3-daniel@sedlak.dev [ Reworded title slightly. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/rbtree.rs | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 7eeb0e7a50b8f13094f164c126ca9c0d75241d35 Author: Daniel Sedlak Date: Sat Nov 23 10:50:28 2024 +0100 rust: init: replace unwraps with question mark operators Use `?` operator in the doctests. Since it is in the examples, using unwraps can convey a wrong impression that unwrapping is fine in general, thus this patch removes this unwrapping. Suggested-by: Miguel Ojeda Link: https://lore.kernel.org/rust-for-linux/CANiq72nsK1D4NuQ1U7NqMWoYjXkqQSj4QuUEL98OmFbq022Z9A@mail.gmail.com/ Signed-off-by: Daniel Sedlak Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20241123095033.41240-2-daniel@sedlak.dev [ Reworded commit slightly. - Miguel ] Signed-off-by: Miguel Ojeda rust/kernel/init.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a13030fd194c88961be4679f87a1380f1bda0ebe Author: Bui Quang Minh Date: Mon Jan 13 23:03:31 2025 +0700 io_uring: simplify the SQPOLL thread check when cancelling requests In io_uring_try_cancel_requests, we check whether sq_data->thread == current to determine if the function is called by the SQPOLL thread to do iopoll when IORING_SETUP_SQPOLL is set. This check can race with the SQPOLL thread termination. io_uring_cancel_generic is used in 2 places: io_uring_cancel_generic and io_ring_exit_work. In io_uring_cancel_generic, we have the information whether the current is SQPOLL thread already. And the SQPOLL thread never reaches io_ring_exit_work. So to avoid the racy check, this commit adds a boolean flag to io_uring_try_cancel_requests to determine if the caller is SQPOLL thread. Reported-by: syzbot+3c750be01dab672c513d@syzkaller.appspotmail.com Reported-by: Li Zetao Reviewed-by: Li Zetao Signed-off-by: Bui Quang Minh Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/20250113160331.44057-1-minhquangbui99@gmail.com Signed-off-by: Jens Axboe io_uring/io_uring.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 4cc004716977beab6242bca385326c84db127256 Merge: 94f51cbb34e3 d071b81f9467 Author: Georgi Djakov Date: Tue Jan 14 00:13:23 2025 +0200 Merge branch 'icc-sm8750' into icc-next Add interconnect support for SM8750 SoC. The Qualcomm Technologies, Inc. SM8750 SoC is the latest in the line of consumer mobile device SoCs. * icc-sm8750 dt-bindings: interconnect: add interconnect bindings for SM8750 interconnect: qcom: Add interconnect provider driver for SM8750 interconnect: sm8750: Add missing const to static qcom_icc_desc Link: https://lore.kernel.org/r/20241204-sm8750_master_interconnects-v3-0-3d9aad4200e9@quicinc.com Signed-off-by: Georgi Djakov commit 94f51cbb34e3b7a96f2b297b3056039edf447694 Author: Shivnandan Kumar Date: Mon Jan 13 13:08:17 2025 -0800 dt-bindings: interconnect: qcom,msm8998-bwmon: Add SM8750 CPU BWMONs Document the SM8750 BWMONs, which has one instance per cluster of BWMONv4. Signed-off-by: Shivnandan Kumar Signed-off-by: Melody Olvera Link: https://lore.kernel.org/r/20250113-sm8750_bwmon_master-v1-1-f082da3a3308@quicinc.com Signed-off-by: Georgi Djakov Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml | 1 + 1 file changed, 1 insertion(+) commit 58589c6a6e9ed8781eb8876ece5f4ef4c8dc3eed Author: Dr. David Alan Gilbert Date: Sun Dec 15 02:23:56 2024 +0000 rtc: Remove hpet_rtc_dropped_irq() hpet_rtc_dropped_irq() has been unused since commit f52ef24be21a ("rtc/alpha: remove legacy rtc driver") Remove it in rtc, and x86 hpet code. Signed-off-by: Dr. David Alan Gilbert Acked-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20241215022356.181625-1-linux@treblig.org Signed-off-by: Alexandre Belloni arch/x86/include/asm/hpet.h | 1 - arch/x86/kernel/hpet.c | 6 ------ drivers/rtc/rtc-cmos.c | 5 ----- 3 files changed, 12 deletions(-) commit 3a43cd19f1b8d3f57f835ae50cc869f07902c062 Author: Drew Fustini Date: Fri Dec 27 19:48:04 2024 -0800 clk: thead: Fix cpu2vp_clk for TH1520 AP_SUBSYS clocks cpu2vp_clk is a gate but was mistakenly in th1520_div_clks[] instead of th1520_gate_clks[]. Fixes: ae81b69fd2b1 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks") Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20241228034802.1573554-1-dfustini@tenstorrent.com Signed-off-by: Stephen Boyd drivers/clk/thead/clk-th1520-ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 037705e94bf6e1810b7f9dc077d0e23292229e74 Author: Drew Fustini Date: Mon Jan 13 12:31:25 2025 -0800 clk: thead: Add CLK_IGNORE_UNUSED to fix TH1520 boot Add the CLK_IGNORE_UNUSED flag to apb_pclk, cpu2peri_x2h_clk, perisys_apb2_hclk and perisys_apb3_hclk. Without this flag, the boot hangs after "clk: Disabling unused clocks" unless clk_ignore_unused is in the kernel cmdline. Fixes: ae81b69fd2b1 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks") Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20250113-th1520-clk_ignore_unused-v1-2-0b08fb813438@tenstorrent.com Signed-off-by: Stephen Boyd drivers/clk/thead/clk-th1520-ap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a826e53fd78c7f07b8ff83446c44b227b2181920 Author: Drew Fustini Date: Mon Jan 13 12:31:24 2025 -0800 clk: thead: Fix clk gate registration to pass flags Modify the call to devm_clk_hw_register_gate_parent_data() to actually pass the clk flags from hw.init instead of just 0. This is necessary to allow individual clk gates to specify their own clk flags. Fixes: ae81b69fd2b1 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks") Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20250113-th1520-clk_ignore_unused-v1-1-0b08fb813438@tenstorrent.com Signed-off-by: Stephen Boyd drivers/clk/thead/clk-th1520-ap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 830d8062d25581cf0beaa334486eea06834044da Author: Sergio Paracuellos Date: Wed Jan 8 10:36:36 2025 +0100 clk: ralink: mtmips: remove duplicated 'xtal' clock for Ralink SoC RT3883 Ralink SoC RT3883 has already 'xtal' defined as a base clock so there is no need to redefine it again in fixed clocks section. Hence, remove the duplicate one from there. Fixes: d34db686a3d7 ("clk: ralink: mtmips: fix clocks probe order in oldest ralink SoCs") Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20250108093636.265033-1-sergio.paracuellos@gmail.com Signed-off-by: Stephen Boyd drivers/clk/ralink/clk-mtmips.c | 1 - 1 file changed, 1 deletion(-) commit 900360094903e47e836bd2be3b344a82f190ec51 Author: Colin Ian King Date: Sun Jan 12 21:39:47 2025 +0000 clk: ep93xx: make const read-only arrays static Don't populate the const read-only arrays on the stack at run time, instead make them static. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20250112213947.8524-1-colin.i.king@gmail.com Signed-off-by: Stephen Boyd drivers/clk/clk-ep93xx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fa10b2df312fecce72dc9d0704b8c921ece753be Author: Colin Ian King Date: Thu Sep 12 14:47:07 2024 +0100 clk: lmk04832: make read-only const arrays static Don't populate the read-only const arrays pll2_p and dclk_div_adj on the stack at run time, instead make them static. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20240912134707.590224-1-colin.i.king@gmail.com Signed-off-by: Stephen Boyd drivers/clk/clk-lmk04832.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 60fe18237f72e3a186127658452dbb0992113cf7 Author: Thomas Weißschuh Date: Sat Dec 21 15:44:33 2024 +0100 selftests/nolibc: add configurations for riscv32 nolibc already supports riscv32. Wire it up in the testsuite. Link: https://lore.kernel.org/r/20241221-nolibc-rv32-v1-6-d9ef6dab7c63@weissschuh.net Signed-off-by: Thomas Weißschuh tools/testing/selftests/nolibc/Makefile | 5 +++++ tools/testing/selftests/nolibc/run-tests.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) commit a47b4b9fbaa157e8957ea712d63d559625503ad9 Author: Thomas Weißschuh Date: Sat Dec 21 15:44:32 2024 +0100 selftests/nolibc: rename riscv to riscv64 riscv32 support is about the be added. To keep the naming clear and consistent with other architectures rename riscv to riscv64, as that is what it actually represents. Link: https://lore.kernel.org/r/20241221-nolibc-rv32-v1-5-d9ef6dab7c63@weissschuh.net Signed-off-by: Thomas Weißschuh tools/testing/selftests/nolibc/Makefile | 6 ++++++ tools/testing/selftests/nolibc/run-tests.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 349afc8a52f86643a32381879e4033f4fbaae88a Author: Thomas Weißschuh Date: Sat Dec 21 15:44:31 2024 +0100 selftests/nolibc: skip tests for unimplemented syscalls The riscv32 architecture is missing many of the older syscalls. Instead of providing wrappers for everything at once, introducing a lot of complexity, skip the tests for those syscalls for now. Link: https://lore.kernel.org/r/20241221-nolibc-rv32-v1-4-d9ef6dab7c63@weissschuh.net Signed-off-by: Thomas Weißschuh tools/testing/selftests/nolibc/nolibc-test.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 4c7f09ab79b1348c619b118a2235d88a57e79af3 Author: Thomas Weißschuh Date: Sat Dec 21 15:44:30 2024 +0100 selftests/nolibc: use a pipe to in vfprintf tests Not all architectures implement lseek(), for example riscv32 only implements llseek() which is not equivalent to normal lseek(). Remove the need for lseek() by using a pipe instead. Link: https://lore.kernel.org/r/20241221-nolibc-rv32-v1-3-d9ef6dab7c63@weissschuh.net Signed-off-by: Thomas Weißschuh tools/testing/selftests/nolibc/nolibc-test.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit a0bc8947ac731ff95a56e0c1737e69e8c56d5b78 Author: Thomas Weißschuh Date: Sat Dec 21 15:44:29 2024 +0100 selftests/nolibc: use waitid() over waitpid() Newer archs like riscv32 don't provide waitpid() anymore. Switch to waitid() which is available everywhere. Link: https://lore.kernel.org/r/20241221-nolibc-rv32-v1-2-d9ef6dab7c63@weissschuh.net Signed-off-by: Thomas Weißschuh tools/testing/selftests/nolibc/nolibc-test.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 7f89bc51101ca676530ee017931ae2a01ff54381 Author: Thomas Weißschuh Date: Sat Dec 21 15:44:28 2024 +0100 tools/nolibc: add support for waitid() waitid() is the modern variant of the family of wait-like syscalls. Some architectures have dropped support for wait(), wait4() and waitpid() but all of them support waitid(). It is more flexible and easier to use than the older ones. Link: https://lore.kernel.org/r/20241221-nolibc-rv32-v1-1-d9ef6dab7c63@weissschuh.net Signed-off-by: Thomas Weißschuh tools/include/nolibc/sys.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit abdd4c8ea7d75308315a15cfb97d2eabfb4d052b Author: Anand Moon Date: Mon Dec 2 20:41:42 2024 +0530 PCI: rockchip: Simplify clock handling by using clk_bulk*() functions Currently, the driver acquires clocks and prepare/enable/disable/unprepare the clocks individually thereby making the driver complex to read. The driver can be simplified by using the clk_bulk*() APIs. Use: - devm_clk_bulk_get_all() API to acquire all the clocks - clk_bulk_prepare_enable() to prepare/enable clocks - clk_bulk_disable_unprepare() APIs to disable/unprepare them in bulk Link: https://lore.kernel.org/r/20241202151150.7393-2-linux.amoon@gmail.com Signed-off-by: Anand Moon Signed-off-by: Lorenzo Pieralisi [bhelgaas: squash error handling fix from https://lore.kernel.org/r/20250106153041.55267-1-linux.amoon@gmail.com] Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/pcie-rockchip.c | 66 +++++----------------------------- drivers/pci/controller/pcie-rockchip.h | 7 ++-- 2 files changed, 11 insertions(+), 62 deletions(-) commit 6e31b759b076eebb4184117234f0c4eb9e4bc460 Author: Jeongjun Park Date: Sat Jan 11 01:26:12 2025 +0900 ring-buffer: Make reading page consistent with the code logic In the loop of __rb_map_vma(), the 's' variable is calculated from the same logic that nr_pages is and they both come from nr_subbufs. But the relationship is not obvious and there's a WARN_ON_ONCE() around the 's' variable to make sure it never becomes equal to nr_subbufs within the loop. If that happens, then the code is buggy and needs to be fixed. The 'page' variable is calculated from cpu_buffer->subbuf_ids[s] which is an array of 'nr_subbufs' entries. If the code becomes buggy and 's' becomes equal to or greater than 'nr_subbufs' then this will be an out of bounds hit before the WARN_ON() is triggered and the code exiting safely. Make the 'page' initialization consistent with the code logic and assign it after the out of bounds check. Link: https://lore.kernel.org/20250110162612.13983-1-aha310510@gmail.com Signed-off-by: Jeongjun Park [ sdr: rewrote change log ] Signed-off-by: Steven Rostedt (Google) kernel/trace/ring_buffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fd46bc0e0bb3c6607363bd23f2b3c2a73dc75d66 Author: Damien Le Moal Date: Mon Dec 16 22:34:04 2024 +0900 PCI: rockchip: Add missing fields descriptions for struct rockchip_pcie_ep When compiling the Rockchip endpoint driver with -W=1, the following warnings can be seen in the output: drivers/pci/controller/pcie-rockchip-ep.c:59: warning: Function parameter or struct member 'perst_irq' not described in 'rockchip_pcie_ep' drivers/pci/controller/pcie-rockchip-ep.c:59: warning: Function parameter or struct member 'perst_asserted' not described in 'rockchip_pcie_ep' drivers/pci/controller/pcie-rockchip-ep.c:59: warning: Function parameter or struct member 'link_up' not described in 'rockchip_pcie_ep' drivers/pci/controller/pcie-rockchip-ep.c:59: warning: Function parameter or struct member 'link_training' not described in 'rockchip_pcie_ep' Fix these warnings by adding the missing field descriptions in struct rockchip_pcie_ep kernel-doc comment. Fixes: a7137cbf6bd5 ("PCI: rockchip-ep: Handle PERST# signal in EP mode") Fixes: bd6e61df4b2e ("PCI: rockchip-ep: Improve link training") Link: https://lore.kernel.org/r/20241216133404.540736-1-dlemoal@kernel.org Reported-by: Bjorn Helgaas Signed-off-by: Damien Le Moal Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/pcie-rockchip-ep.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0568c6ebf072d913c437dbb5271f889a5e329007 Author: Vincent Donnefort Date: Wed Jan 8 11:45:25 2025 +0000 ring-buffer: Check for empty ring-buffer with rb_num_of_entries() Currently there are two ways of identifying an empty ring-buffer. One relying on the current status of the commit / reader page (rb_per_cpu_empty()) and the other on the write and read counters (rb_num_of_entries() used in rb_get_reader_page()). with rb_num_of_entries(). This intends to ease later introduction of ring-buffer writers which are out of the kernel control and with whom, the only information available is through the meta-page counters. Link: https://lore.kernel.org/20250108114536.627715-2-vdonnefort@google.com Signed-off-by: Vincent Donnefort Signed-off-by: Steven Rostedt (Google) kernel/trace/ring_buffer.c | 59 +++++++++++----------------------------------- 1 file changed, 14 insertions(+), 45 deletions(-) commit 9d499259db0cc5a31e212570c2cf945ad117b900 Merge: 292284f2be46 365865b7d746 Author: Mark Brown Date: Mon Jan 13 20:08:47 2025 +0000 ASoC: extra format on each DAI Merge series from Kuninori Morimoto : Current clock provider/consumer setting is set by dai_link->dai_fmt, and it is Codec base on Sound Card driver (= SND_SOC_DAIFMT_CBx_CFx). Current CPU/Codec drivers are already based on its own base (= SND_SOC_DAIFMT_Bx_Fx). So, Codec clock setting uses dai_link->dai_fmt as-is, and CPU side clock setting is created from Codec base setting by flipping. Because of this, we can't set both CPU/Codec clock consumer for example. To solve this issue, this patch-set adds new ext_fmt on each DAI. It can keep compatible with legacy style. 1. SND_SOC_DAIFMT_FORMAT_MASK 2. SND_SOC_DAIFMT_CLOCK 3. SND_SOC_DAIFMT_INV 4. SND_SOC_DAIFMT_CLOCK_PROVIDER dai_fmt : dai_link->dai_fmt = common settings ext_fmt : each DAI settings Legacy dai_fmt includes 1, 2, 3, 4 New style dai_fmt includes 1, 2, 3 ext_fmt includes 4 Audio-Graph-Card2 will use this new style by this patch-set. By this patch, Card2 default behavior (= no "clock-master / frame-master" settings on DT) will be changed, but no drivers are using it. In case of no DAI has "clock-master / frame-master" property on DT, it will be... Legacy CPU : provider (because flipped from Codec) Codec: consumer New style CPU : consumer Codec: consumer One note is that Simple-Card, Audio-Graph-Card don't implement this new style to keep compatiblily. In Overlay case, port order can be random, so we shouldn't use get_next() function to get next port. commit e32dcdb0af9f31aab05e20f950c2871378082569 Author: Mark Harmstone Date: Fri Jan 10 17:23:52 2025 +0000 btrfs: add io_uring interface for encoded writes Add an io_uring interface for encoded writes, with the same parameters as the BTRFS_IOC_ENCODED_WRITE ioctl. As with the encoded reads code, there's a test program for this at https://github.com/maharmstone/io_uring-encoded, and I'll get this worked into an fstest. How io_uring works is that it initially calls btrfs_uring_cmd with the IO_URING_F_NONBLOCK flag set, and if we return -EAGAIN it tries again in a kthread with the flag cleared. Ideally we'd honour this and call try_lock etc., but there's still a lot of work to be done to create non-blocking versions of all the functions in our write path. Instead, just validate the input in btrfs_uring_encoded_write() on the first pass and return -EAGAIN, with a view to properly optimizing the optimistic path later on. Signed-off-by: Mark Harmstone Signed-off-by: David Sterba fs/btrfs/ioctl.c | 128 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) commit 4f7caaa2f92b47e9d27d85f8a60bb7634becd669 Author: Masami Hiramatsu (Google) Date: Wed Jan 1 01:00:14 2025 +0900 bpf: Use ftrace_get_symaddr() for kprobe_multi probes Add ftrace_get_entry_ip() which is only for ftrace based probes, and use it for kprobe multi probes because they are based on fprobe which uses ftrace instead of kprobes. Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Alan Maguire Cc: Mark Rutland Link: https://lore.kernel.org/173566081414.878879.10631096557346094362.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) kernel/trace/bpf_trace.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit c72deb03ff0426596c69c294afa1572d2748c589 Author: Hongbo Li Date: Tue Jan 7 13:18:41 2025 +0000 bcachefs: bcachefs_metadata_version_directory_size This adds another metadata version for accounting directory size. For the new version of the filesystem, when new subdirectory items are created or deleted, the parent directory's size will change accordingly. For the old version of the existed file system, running fsck will automatically upgrade the metadata version, and it will do the check and recalculationg of the directory size. Signed-off-by: Hongbo Li Signed-off-by: Kent Overstreet fs/bcachefs/bcachefs_format.h | 3 ++- fs/bcachefs/fsck.c | 41 +++++++++++++++++++++++++++++++++++++++++ fs/bcachefs/sb-downgrade.c | 5 ++++- fs/bcachefs/sb-errors_format.h | 3 ++- 4 files changed, 49 insertions(+), 3 deletions(-) commit e614a6c52d32c9c7ff545ca842eb2de4aeb1d2d9 Author: Hongbo Li Date: Tue Jan 7 13:18:40 2025 +0000 bcachefs: make directory i_size meaningful The isize of directory is 0 in bcachefs if the directory is empty. With more child dirents created, its size ought to change. Many other filesystems changed as that (ie. xfs and btrfs). And many of them changed as the size of child dirent name. Although the directory size may not seem to convey much, we can still give it some meaning. The formula of dentry size as follow: occupied_size = 40 + ALIGN(9 + namelen, 8) Signed-off-by: Hongbo Li Signed-off-by: Kent Overstreet fs/bcachefs/dirent.h | 5 +++++ fs/bcachefs/fs-common.c | 11 +++++++++++ fs/bcachefs/fs.c | 13 ++++++++----- 3 files changed, 24 insertions(+), 5 deletions(-) commit a500acaab6db4fc8693a5ccd01ce4f5cb1053c33 Merge: 5bc55a333a2f f3253b23535f Author: Rafael J. Wysocki Date: Mon Jan 13 20:48:34 2025 +0100 Merge tag 'devfreq-next-for-6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux Merge devfreq updates for 6.14 from Chanwoo Choi: "- Call of_node_put() only once in devfreq_event_get_edev_by_phandle() on devfreq-event.c - Remove unused function parameter of exynos_bus_parse_of() on exynos-bus.c" * tag 'devfreq-next-for-6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: exynos: remove unused function parameter PM / devfreq: event: Call of_node_put() only once in devfreq_event_get_edev_by_phandle() commit 2e03358be78b65d28b66e17aca9e0c8700b0df78 Author: Michael Kelley Date: Mon Jan 13 06:56:45 2025 -0800 Documentation: hyperv: Add overview of guest VM hibernation Add documentation on how hibernation works in a guest VM on Hyper-V. Describe how VMBus devices and the VMBus itself are hibernated and resumed, along with various limitations. Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/20250113145645.1320942-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20250113145645.1320942-1-mhklinux@outlook.com> Documentation/virt/hyperv/hibernation.rst | 336 ++++++++++++++++++++++++++++++ Documentation/virt/hyperv/index.rst | 1 + 2 files changed, 337 insertions(+) commit 087b4083d3f9d202266debc6b684b0662c96f51b Author: Andre Przywara Date: Fri Oct 25 11:56:20 2024 +0100 clk: sunxi-ng: h616: Reparent CPU clock during frequency changes The H616 user manual recommends to re-parent the CPU clock during frequency changes of the PLL, and recommends PLL_PERI0(1X), which runs at 600 MHz. Also it asks to disable and then re-enable the PLL lock bit, after the factor changes have been applied. Add clock notifiers for the PLL and the CPU mux clock, using the existing notifier callbacks, and tell them to use mux 4 (the PLL_PERI0(1X) source), and bit 29 (the LOCK_ENABLE) bit. The existing code already follows the correct algorithms. Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20241025105620.1891596-1-andre.przywara@arm.com Tested-by: Evgeny Boger Reviewed-by: Chen-Yu Tsai Signed-off-by: Stephen Boyd drivers/clk/sunxi-ng/ccu-sun50i-h616.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit c84c2424932d18cf3888adfe9bd16f95dc5d9fd4 Author: zangyangyang1 Date: Mon Jan 13 11:05:18 2025 +0800 f2fs: fix using wrong 'submitted' value in f2fs_write_cache_pages When f2fs_write_single_data_page fails, f2fs_write_cache_pages will use the last 'submitted' value incorrectly, which will cause 'nwritten' and 'wbc->nr_to_write' calculation errors Signed-off-by: zangyangyang1 Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/compress.c | 1 + fs/f2fs/data.c | 1 + 2 files changed, 2 insertions(+) commit e53c568f4603e997426712146dce0bc194c1db12 Author: Yi Sun Date: Mon Dec 23 16:10:43 2024 +0800 f2fs: add parameter @len to f2fs_invalidate_blocks() New function can process some consecutive blocks at a time. Function f2fs_invalidate_blocks()->down_write() and up_write() are very time-consuming, so if f2fs_invalidate_blocks() can process consecutive blocks at one time, it will save a lot of time. Signed-off-by: Yi Sun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/compress.c | 4 ++-- fs/f2fs/f2fs.h | 3 ++- fs/f2fs/file.c | 8 ++++---- fs/f2fs/node.c | 4 ++-- fs/f2fs/segment.c | 32 +++++++++++++++++++++++++------- 5 files changed, 35 insertions(+), 16 deletions(-) commit 292284f2be46514ed07e7b3e3350329f656c4f62 Merge: 8eb27b5758e6 a1a771e5f1e3 Author: Mark Brown Date: Mon Jan 13 18:33:14 2025 +0000 ASoC: fsl: Support MQS on i.MX943 Merge series from Shengjiu Wang : There are two MQS instances on the i.MX943 platform. The definition of bit positions in the control register are different. In order to support these MQS modules, define two compatible strings to distinguish them. commit 49fd4e34751e90e6df009b70cd0659dc839e7ca8 Author: Zichen Xie Date: Wed Dec 18 00:13:12 2024 +0800 NFS: Fix potential buffer overflowin nfs_sysfs_link_rpc_client() name is char[64] where the size of clnt->cl_program->name remains unknown. Invoking strcat() directly will also lead to potential buffer overflow. Change them to strscpy() and strncat() to fix potential issues. Signed-off-by: Zichen Xie Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker fs/nfs/sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bb504321b96550f9a351920e169de141a3f4c6a1 Author: Dai Ngo Date: Tue Nov 19 13:43:23 2024 -0800 SUNRPC: display total RPC tasks for RPC client Display the total number of RPC tasks, including tasks waiting on workqueue and wait queues, for rpc_clnt. Signed-off-by: Dai Ngo Signed-off-by: Anna Schumaker net/sunrpc/clnt.c | 7 +++++-- net/sunrpc/debugfs.c | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) commit e0537c9f828dc9500e5ffc9211099c495b72f402 Author: Dai Ngo Date: Tue Nov 19 13:43:22 2024 -0800 SUNRPC: only put task on cl_tasks list after the RPC call slot is reserved. Under heavy write load, we've seen the cl_tasks list grows to millions of entries. Even though the list is extremely long, the system still runs fine until the user wants to get the information of all active RPC tasks by doing: When this happens, tasks_start acquires the cl_lock to walk the cl_tasks list, returning one entry at a time to the caller. The cl_lock is held until all tasks on this list have been processed. While the cl_lock is held, completed RPC tasks have to spin wait in rpc_task_release_client for the cl_lock. If there are millions of entries in the cl_tasks list it will take a long time before tasks_stop is called and the cl_lock is released. The spin wait tasks can use up all the available CPUs in the system, preventing other jobs to run, this causes the system to temporarily lock up. This patch fixes this problem by delaying inserting the RPC task on the cl_tasks list until the RPC call slot is reserved. This limits the length of the cl_tasks to the number of call slots available in the system. Signed-off-by: Dai Ngo Signed-off-by: Anna Schumaker include/linux/sunrpc/clnt.h | 1 + net/sunrpc/clnt.c | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) commit 5542b0b57d8a004e17a4cb583805d8e689bbdc0f Merge: 40384c840ea1 5e419033b5cb Author: Stephen Boyd Date: Mon Jan 13 10:25:43 2025 -0800 Merge tag 'qcom-clk-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into clk-qcom Pull Qualcomm clk driver updates from Bjorn Andersson: - Support for various Qualcomm clk controllers: IPQ CMN PLL, SM6115 LPASS, SM750 global, tcsr, rpmh, and display. X Plus GPU and global. QCS615 rpmh and MSM8937 and MSM8940 RPM. - Support for Qualcomm Pongo and Taycan Alpha PLLs - Describe Qualcomm X Elite Titan GDSC relationships - Mark Qualcomm SM8550 and SM8650 PCIe GDSCs and X Elite USB GDSC as retention/on - Allow Qualcomm SDM845 general purpose clk to have arbitrary frequencies - Add Qualcomm IPQ5424 NoC-related interconnect clks * tag 'qcom-clk-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (63 commits) clk: qcom: Select CLK_X1E80100_GCC in config CLK_X1P42100_GPUCC dt-bindings: clock: move qcom,x1e80100-camcc to its own file clk: qcom: smd-rpm: Add clocks for MSM8940 dt-bindings: clock: qcom,rpmcc: Add MSM8940 compatible clk: qcom: smd-rpm: Add clocks for MSM8937 dt-bindings: clock: qcom,rpmcc: Add MSM8937 compatible clk: qcom: ipq5424: Use icc-clk for enabling NoC related clocks dt-bindings: interconnect: Add Qualcomm IPQ5424 support clk: qcom: Add SM6115 LPASSCC dt-bindings: clock: Add Qualcomm SM6115 LPASS clock controller clk: qcom: gcc-sdm845: Do not use shared clk_ops for QUPs clk: qcom: gcc-sdm845: Add general purpose clock ops clk: qcom: clk-rcg2: split __clk_rcg2_configure function clk: qcom: clk-rcg2: document calc_rate function clk: qcom: gcc-x1e80100: Do not turn off usb_2 controller GDSC clk: qcom: ipq5424: add gcc_xo_clk dt-bindings: clock: qcom: gcc-ipq5424: add gcc_xo_clk macro dt-bindings: clock: qcom: gcc-ipq5424: remove apss_dbg clock macro clk: qcom: ipq5424: remove apss_dbg clock dt-bindings: clock: qcom,sdm845-camcc: add sdm670 compatible ... commit 987ce79b5242c048acae3a0c1feaae0a353d5cde Author: Randy Dunlap Date: Fri Jan 10 22:31:36 2025 -0800 sched_ext: fix kernel-doc warnings Use the correct function parameter names and function names. Use the correct kernel-doc comment format for struct sched_ext_ops to eliminate a bunch of warnings. ext.c:1418: warning: Excess function parameter 'include_dead' description in 'scx_task_iter_next_locked' ext.c:7261: warning: expecting prototype for scx_bpf_dump(). Prototype was for scx_bpf_dump_bstr() instead ext.c:7352: warning: Excess function parameter 'flags' description in 'scx_bpf_cpuperf_set' ext.c:3150: warning: Function parameter or struct member 'in_fi' not described in 'scx_prio_less' ext.c:4711: warning: Function parameter or struct member 'dur_s' not described in 'scx_softlockup' ext.c:4775: warning: Function parameter or struct member 'bypass' not described in 'scx_ops_bypass' ext.c:7453: warning: Function parameter or struct member 'idle_mask' not described in 'scx_bpf_put_idle_cpumask' ext.c:209: warning: Incorrect use of kernel-doc format: * select_cpu - Pick the target CPU for a task which is being woken up ext.c:236: warning: Incorrect use of kernel-doc format: * enqueue - Enqueue a task on the BPF scheduler ext.c:251: warning: Incorrect use of kernel-doc format: * dequeue - Remove a task from the BPF scheduler ext.c:267: warning: Incorrect use of kernel-doc format: * dispatch - Dispatch tasks from the BPF scheduler and/or user DSQs ext.c:290: warning: Incorrect use of kernel-doc format: * tick - Periodic tick ext.c:300: warning: Incorrect use of kernel-doc format: * runnable - A task is becoming runnable on its associated CPU ext.c:327: warning: Incorrect use of kernel-doc format: * running - A task is starting to run on its associated CPU ext.c:335: warning: Incorrect use of kernel-doc format: * stopping - A task is stopping execution ext.c:346: warning: Incorrect use of kernel-doc format: * quiescent - A task is becoming not runnable on its associated CPU ext.c:366: warning: Incorrect use of kernel-doc format: * yield - Yield CPU ext.c:381: warning: Incorrect use of kernel-doc format: * core_sched_before - Task ordering for core-sched ext.c:399: warning: Incorrect use of kernel-doc format: * set_weight - Set task weight ext.c:408: warning: Incorrect use of kernel-doc format: * set_cpumask - Set CPU affinity ext.c:418: warning: Incorrect use of kernel-doc format: * update_idle - Update the idle state of a CPU ext.c:439: warning: Incorrect use of kernel-doc format: * cpu_acquire - A CPU is becoming available to the BPF scheduler ext.c:449: warning: Incorrect use of kernel-doc format: * cpu_release - A CPU is taken away from the BPF scheduler ext.c:461: warning: Incorrect use of kernel-doc format: * init_task - Initialize a task to run in a BPF scheduler ext.c:476: warning: Incorrect use of kernel-doc format: * exit_task - Exit a previously-running task from the system ext.c:485: warning: Incorrect use of kernel-doc format: * enable - Enable BPF scheduling for a task ext.c:494: warning: Incorrect use of kernel-doc format: * disable - Disable BPF scheduling for a task ext.c:504: warning: Incorrect use of kernel-doc format: * dump - Dump BPF scheduler state on error ext.c:512: warning: Incorrect use of kernel-doc format: * dump_cpu - Dump BPF scheduler state for a CPU on error ext.c:524: warning: Incorrect use of kernel-doc format: * dump_task - Dump BPF scheduler state for a runnable task on error ext.c:535: warning: Incorrect use of kernel-doc format: * cgroup_init - Initialize a cgroup ext.c:550: warning: Incorrect use of kernel-doc format: * cgroup_exit - Exit a cgroup ext.c:559: warning: Incorrect use of kernel-doc format: * cgroup_prep_move - Prepare a task to be moved to a different cgroup ext.c:574: warning: Incorrect use of kernel-doc format: * cgroup_move - Commit cgroup move ext.c:585: warning: Incorrect use of kernel-doc format: * cgroup_cancel_move - Cancel cgroup move ext.c:597: warning: Incorrect use of kernel-doc format: * cgroup_set_weight - A cgroup's weight is being changed ext.c:611: warning: Incorrect use of kernel-doc format: * cpu_online - A CPU became online ext.c:620: warning: Incorrect use of kernel-doc format: * cpu_offline - A CPU is going offline ext.c:633: warning: Incorrect use of kernel-doc format: * init - Initialize the BPF scheduler ext.c:638: warning: Incorrect use of kernel-doc format: * exit - Clean up after the BPF scheduler ext.c:648: warning: Incorrect use of kernel-doc format: * dispatch_max_batch - Max nr of tasks that dispatch() can dispatch ext.c:653: warning: Incorrect use of kernel-doc format: * flags - %SCX_OPS_* flags ext.c:658: warning: Incorrect use of kernel-doc format: * timeout_ms - The maximum amount of time, in milliseconds, that a ext.c:667: warning: Incorrect use of kernel-doc format: * exit_dump_len - scx_exit_info.dump buffer length. If 0, the default ext.c:673: warning: Incorrect use of kernel-doc format: * hotplug_seq - A sequence number that may be set by the scheduler to ext.c:682: warning: Incorrect use of kernel-doc format: * name - BPF scheduler's name ext.c:689: warning: Function parameter or struct member 'select_cpu' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'enqueue' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'dequeue' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'dispatch' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'tick' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'runnable' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'running' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'stopping' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'quiescent' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'yield' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'core_sched_before' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'set_weight' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'set_cpumask' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'update_idle' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'cpu_acquire' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'cpu_release' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'init_task' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'exit_task' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'enable' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'disable' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'dump' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'dump_cpu' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'dump_task' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'cgroup_init' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'cgroup_exit' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'cgroup_prep_move' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'cgroup_move' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'cgroup_cancel_move' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'cgroup_set_weight' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'cpu_online' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'cpu_offline' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'init' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'exit' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'dispatch_max_batch' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'flags' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'timeout_ms' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'exit_dump_len' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'hotplug_seq' not described in 'sched_ext_ops' ext.c:689: warning: Function parameter or struct member 'name' not described in 'sched_ext_ops' Signed-off-by: Randy Dunlap Cc: Tejun Heo Cc: David Vernet Cc: Changwoo Min Cc: Ingo Molnar Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Acked-by: Andrea Righi Signed-off-by: Tejun Heo kernel/sched/ext.c | 87 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 45 insertions(+), 42 deletions(-) commit f56c1b6db5f33c4490484a384d2efd8bdcd45663 Author: Neil Armstrong Date: Fri Jan 10 16:21:18 2025 +0100 dt-bindings: interconnect: OSM L3: Document sm8650 OSM L3 compatible Document the OSM L3 found in the Qualcomm SM8650 platform. Signed-off-by: Neil Armstrong Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250110-topic-sm8650-ddr-bw-scaling-v1-1-041d836b084c@linaro.org Signed-off-by: Georgi Djakov Documentation/devicetree/bindings/interconnect/qcom,osm-l3.yaml | 1 + 1 file changed, 1 insertion(+) commit 576a67fbec3d3888568c84f6a6c84121af6b4905 Author: Lijuan Gao Date: Wed Dec 18 18:39:38 2024 +0800 dt-bindings: interconnect: qcom-bwmon: Document QCS615 bwmon compatibles Document QCS615 BWMONs, which includes one BWMONv4 instance for CPU to LLCC path bandwidth monitoring and one BWMONv5 instance for LLCC to DDR path bandwidth monitoring. Signed-off-by: Lijuan Gao Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20241218-add_bwmon_support_for_qcs615-v1-1-680d798a19e5@quicinc.com Signed-off-by: Georgi Djakov Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml | 2 ++ 1 file changed, 2 insertions(+) commit d071b81f946739bd484ec6cec46cc3901d903879 Author: Krzysztof Kozlowski Date: Thu Jan 9 17:46:30 2025 +0100 interconnect: sm8750: Add missing const to static qcom_icc_desc The statically allocated 'struct qcom_icc_desc' is not modified by the driver and like all other instances should be const. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250109164630.175093-1-krzysztof.kozlowski@linaro.org Signed-off-by: Georgi Djakov drivers/interconnect/qcom/sm8750.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 943e5f85600708c348f7b23d3c1cff1cf9763032 Author: Thomas Weißschuh Date: Sun Dec 22 21:15:55 2024 +0100 mtd: spi-nor: sysfs: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh Acked-by: Pratyush Yadav Signed-off-by: Pratyush Yadav Link: https://lore.kernel.org/r/20241222-sysfs-const-bin_attr-mtd-v1-1-ee13140a4e9b@weissschuh.net drivers/mtd/spi-nor/sysfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 08c035da54a3d4e7d52beeea2378ce022a6f40d1 Author: Miguel Ojeda Date: Sun Jan 12 16:29:46 2025 +0100 docs: submitting-patches: clarify that signers may use their discretion on tags Tags are really appreciated by maintainers in general, since it means someone is willing to put their name on a commit, be it as a reviewer, tester, etc. However, signers (i.e. submitters carrying tags from previous versions and maintainers applying patches) may need to take or drop tags, on a case-by-case basis, for different reasons. Yet this is not explicitly spelled out in the documentation, thus there may be instances [1] where contributors may feel unwelcome. Thus, to clarify, state this clearly. Link: https://lore.kernel.org/rust-for-linux/CAEg-Je-h4NitWb2ErFGCOqt0KQfXuyKWLhpnNHCdRzZdxi018Q@mail.gmail.com/ [1] Suggested-by: Dan Williams Acked-by: Shuah Khan Acked-by: Dan Williams Signed-off-by: Miguel Ojeda Acked-by: Greg Kroah-Hartman Acked-by: Krzysztof Kozlowski Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250112152946.761150-4-ojeda@kernel.org Documentation/process/submitting-patches.rst | 4 ++++ 1 file changed, 4 insertions(+) commit 25fb101385f7abf6d24ae92cd8f8c84882d1e942 Author: Miguel Ojeda Date: Sun Jan 12 16:29:45 2025 +0100 docs: submitting-patches: clarify difference between Acked-by and Reviewed-by Newcomers to the kernel need to learn the different tags that are used in commit messages and when to apply them. Acked-by is sometimes misunderstood, since the documentation did not really clarify (up to the previous commit) when it should be used, especially compared to Reviewed-by. The previous commit already clarified who the usual providers of Acked-by tags are, with examples. Thus provide a clarification paragraph for the comparison with Reviewed-by, and give a couple examples reusing the cases given above, in the previous commit. Acked-by: Shuah Khan Acked-by: Dan Williams Signed-off-by: Miguel Ojeda Acked-by: Greg Kroah-Hartman Acked-by: Krzysztof Kozlowski Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250112152946.761150-3-ojeda@kernel.org Documentation/process/submitting-patches.rst | 6 ++++++ 1 file changed, 6 insertions(+) commit cd9123eeb2245a1d63d3677118322bf2fc0d4a23 Author: Miguel Ojeda Date: Sun Jan 12 16:29:44 2025 +0100 docs: submitting-patches: clarify Acked-by and introduce "# Suffix" Acked-by is typically used by maintainers. However, sometimes it is useful to be able to accept the tag from other stakeholders that may not have done a deep technical review or may not be kernel developers. For instance: - People with domain knowledge, such as the original author of the code being modified. - Userspace-side reviewers for a kernel uAPI patch, like in DRM -- see Documentation/gpu/drm-uapi.rst: > The userspace-side reviewer should also provide an Acked-by on the > kernel uAPI patch indicating that they believe the proposed uAPI > is sound and sufficiently documented and validated for userspace's > consumption. - Key users of a feature, such as in [1]. Thus clarify that Acked-by may be used by other stakeholders (but most commonly by maintainers). Since, in these cases, it may be confusing why an Acked-by is/was provided, allow and suggest to provide a "# Suffix" explaining it. The "# Suffix" for Acked-by is already being used to clarify what part of the patch a maintainer is acknowledging, thus also mention "# Suffix" in the relevant paragraph. Link: https://lore.kernel.org/rust-for-linux/CANiq72m4fea15Z0fFZauz8N2madkBJ0G7Dc094OwoajnXmROOA@mail.gmail.com/ [1] Acked-by: Shuah Khan Acked-by: Dan Williams Signed-off-by: Miguel Ojeda Reviewed-by: Neal Gompa Acked-by: Greg Kroah-Hartman Acked-by: Krzysztof Kozlowski Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250112152946.761150-2-ojeda@kernel.org Documentation/process/submitting-patches.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit f80aaf40e2c96285e9d8f0f81053a515675ade27 Author: Greg Kroah-Hartman Date: Fri Jan 10 09:41:01 2025 +0100 Documentation: bug-hunting.rst: remove odd contact information At the bottom of the bug-hunting.rst file there is a "signature" which doesn't seem to make much sense. It seems to predate git, and perhaps was from an earlier bug report that got copied into the document, but now makes no sense so remove it. Cc: greg@wind.rmcc.com Cc: Jonathan Corbet Cc: Alex Shi Cc: Yanteng Si Cc: Hu Haowen <2023002089@link.tyut.edu.cn> Signed-off-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/2025011005-resistant-uncork-9814@gregkh Documentation/admin-guide/bug-hunting.rst | 9 --------- Documentation/translations/zh_CN/admin-guide/bug-hunting.rst | 9 --------- Documentation/translations/zh_TW/admin-guide/bug-hunting.rst | 10 ---------- 3 files changed, 28 deletions(-) commit a2f80991e5ef78ee3ef47f01b85496e02e95de93 Author: zhangwei Date: Fri Jan 10 18:04:04 2025 +0800 docs/zh_CN: Add sak index Chinese translation Translate lwn/Documentation/security/sak.rst into Chinese Update the translation through commit 4d3beaa06d35 ("docs: security: move some books to it and update") Reviewed-by: Yanteng Si Reviewed-by: Alex Shi Signed-off-by: zhangwei Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20250110100405.2225-1-zhangwei@cqsoftware.com.cn .../translations/zh_CN/security/index.rst | 2 +- Documentation/translations/zh_CN/security/sak.rst | 86 ++++++++++++++++++++++ 2 files changed, 87 insertions(+), 1 deletion(-) commit e7b94c5c6f3b6435206f0e4ef7c5aa4eceae42f9 Merge: 170e086ad399 c9b39e51a301 Author: Jens Axboe Date: Mon Jan 13 10:30:33 2025 -0700 Merge tag 'md-6.14-20250113' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux into for-6.14/block Pull MD updates from Song: "1. Reintroduce md-linear, by Yu Kuai. 2. md-bitmap refactor and fix, by Yu Kuai. 3. Replace kmap_atomic with kmap_local_page, by David Reaver." * tag 'md-6.14-20250113' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux: md/md-bitmap: move bitmap_{start, end}write to md upper layer md/raid5: implement pers->bitmap_sector() md: add a new callback pers->bitmap_sector() md/md-bitmap: remove the last parameter for bimtap_ops->endwrite() md/md-bitmap: factor behind write counters out from bitmap_{start/end}write() md: Replace deprecated kmap_atomic() with kmap_local_page() md: reintroduce md-linear commit 170e086ad3997f816d1f551f178a03a626a130b7 Author: Jens Axboe Date: Mon Jan 13 10:27:54 2025 -0700 nvme: fix bogus kzalloc() return check in nvme_init_effects_log() nvme_init_effects_log() returns failure when kzalloc() is successful, which is obviously wrong and causes failures to boot. Correct the check. Fixes: d4a95adeabc6 ("nvme: Add error path for xa_store in nvme_init_effects") Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9b39e51a301af677a1faaab75567077ce902178 Merge: 4fa91616c078 cd5fc6533818 Author: Song Liu Date: Mon Jan 13 08:57:25 2025 -0800 Merge branch 'md-6.14-bitmap' into md-6.14 Move bitmap_{start, end}write calls to md layer. These changes help address hangs in bitmap_startwrite([1],[2]). [1] https://lore.kernel.org/all/CAJpMwyjmHQLvm6zg1cmQErttNNQPDAAXPKM3xgTjMhbfts986Q@mail.gmail.com/ [2] https://lore.kernel.org/all/ADF7D720-5764-4AF3-B68E-1845988737AA@flyingcircus.io/ * md-6.14-bitmap: md/md-bitmap: move bitmap_{start, end}write to md upper layer md/raid5: implement pers->bitmap_sector() md: add a new callback pers->bitmap_sector() md/md-bitmap: remove the last parameter for bimtap_ops->endwrite() md/md-bitmap: factor behind write counters out from bitmap_{start/end}write() commit a76539b293677c5c163b9285b0cd8dd420d33989 Author: Denis Kirjanov Date: Mon Jan 13 12:28:46 2025 +0300 hwmon: pmbus: dps920ab: Add ability to instantiate through i2c Add support for instantiating the Delta DPS920AB PSU through I2C on systems without devicetree support. Signed-off-by: Denis Kirjanov Link: https://lore.kernel.org/r/20250113092846.10786-1-kirjanov@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/dps920ab.c | 7 +++++++ 1 file changed, 7 insertions(+) commit cd5fc653381811f1e0ba65f5d169918cab61476f Author: Yu Kuai Date: Thu Jan 9 09:51:45 2025 +0800 md/md-bitmap: move bitmap_{start, end}write to md upper layer There are two BUG reports that raid5 will hang at bitmap_startwrite([1],[2]), root cause is that bitmap start write and end write is unbalanced, it's not quite clear where, and while reviewing raid5 code, it's found that bitmap operations can be optimized. For example, for a 4 disks raid5, with chunksize=8k, if user issue a IO (0 + 48k) to the array: ┌────────────────────────────────────────────────────────────┐ │chunk 0 │ │ ┌────────────┬─────────────┬─────────────┬────────────┼ │ sh0 │A0: 0 + 4k │A1: 8k + 4k │A2: 16k + 4k │A3: P │ │ ┼────────────┼─────────────┼─────────────┼────────────┼ │ sh1 │B0: 4k + 4k │B1: 12k + 4k │B2: 20k + 4k │B3: P │ ┼──────┴────────────┴─────────────┴─────────────┴────────────┼ │chunk 1 │ │ ┌────────────┬─────────────┬─────────────┬────────────┤ │ sh2 │C0: 24k + 4k│C1: 32k + 4k │C2: P │C3: 40k + 4k│ │ ┼────────────┼─────────────┼─────────────┼────────────┼ │ sh3 │D0: 28k + 4k│D1: 36k + 4k │D2: P │D3: 44k + 4k│ └──────┴────────────┴─────────────┴─────────────┴────────────┘ Before this patch, 4 stripe head will be used, and each sh will attach bio for 3 disks, and each attached bio will trigger bitmap_startwrite() once, which means total 12 times. - 3 times (0 + 4k), for (A0, A1 and A2) - 3 times (4 + 4k), for (B0, B1 and B2) - 3 times (8 + 4k), for (C0, C1 and C3) - 3 times (12 + 4k), for (D0, D1 and D3) After this patch, md upper layer will calculate that IO range (0 + 48k) is corresponding to the bitmap (0 + 16k), and call bitmap_startwrite() just once. Noted that this patch will align bitmap ranges to the chunks, for example, if user issue a IO (0 + 4k) to array: - Before this patch, 1 time (0 + 4k), for A0; - After this patch, 1 time (0 + 8k) for chunk 0; Usually, one bitmap bit will represent more than one disk chunk, and this doesn't have any difference. And even if user really created a array that one chunk contain multiple bits, the overhead is that more data will be recovered after power failure. Also remove STRIPE_BITMAP_PENDING since it's not used anymore. [1] https://lore.kernel.org/all/CAJpMwyjmHQLvm6zg1cmQErttNNQPDAAXPKM3xgTjMhbfts986Q@mail.gmail.com/ [2] https://lore.kernel.org/all/ADF7D720-5764-4AF3-B68E-1845988737AA@flyingcircus.io/ Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20250109015145.158868-6-yukuai1@huaweicloud.com Signed-off-by: Song Liu drivers/md/md.c | 29 ++++++++++++++++++++++++++++ drivers/md/md.h | 2 ++ drivers/md/raid1.c | 4 ---- drivers/md/raid10.c | 3 --- drivers/md/raid5-cache.c | 2 -- drivers/md/raid5.c | 50 ++++++------------------------------------------ drivers/md/raid5.h | 3 --- 7 files changed, 37 insertions(+), 56 deletions(-) commit 9c89f604476cf15c31fbbdb043cff7fbf1dbe0cb Author: Yu Kuai Date: Thu Jan 9 09:51:44 2025 +0800 md/raid5: implement pers->bitmap_sector() Bitmap is used for the whole array for raid1/raid10, hence IO for the array can be used directly for bitmap. However, bitmap is used for underlying disks for raid5, hence IO for the array can't be used directly for bitmap. Implement pers->bitmap_sector() for raid5 to convert IO ranges from the array to the underlying disks. Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20250109015145.158868-5-yukuai1@huaweicloud.com Signed-off-by: Song Liu drivers/md/raid5.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 0c984a283a3ea3f10bebecd6c57c1d41b2e4f518 Author: Yu Kuai Date: Thu Jan 9 09:51:43 2025 +0800 md: add a new callback pers->bitmap_sector() This callback will be used in raid5 to convert io ranges from array to bitmap. Signed-off-by: Yu Kuai Reviewed-by: Xiao Ni Link: https://lore.kernel.org/r/20250109015145.158868-4-yukuai1@huaweicloud.com Signed-off-by: Song Liu drivers/md/md.h | 3 +++ 1 file changed, 3 insertions(+) commit 4f0e7d0e03b7b80af84759a9e7cfb0f81ac4adae Author: Yu Kuai Date: Thu Jan 9 09:51:42 2025 +0800 md/md-bitmap: remove the last parameter for bimtap_ops->endwrite() For the case that IO failed for one rdev, the bit will be mark as NEEDED in following cases: 1) If badblocks is set and rdev is not faulty; 2) If rdev is faulty; Case 1) is useless because synchronize data to badblocks make no sense. Case 2) can be replaced with mddev->degraded. Also remove R1BIO_Degraded, R10BIO_Degraded and STRIPE_DEGRADED since case 2) no longer use them. Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20250109015145.158868-3-yukuai1@huaweicloud.com Signed-off-by: Song Liu drivers/md/md-bitmap.c | 19 ++++++++++--------- drivers/md/md-bitmap.h | 2 +- drivers/md/raid1.c | 26 +++----------------------- drivers/md/raid1.h | 1 - drivers/md/raid10.c | 23 +++-------------------- drivers/md/raid10.h | 1 - drivers/md/raid5-cache.c | 3 +-- drivers/md/raid5.c | 15 +++------------ drivers/md/raid5.h | 1 - 9 files changed, 21 insertions(+), 70 deletions(-) commit 08c50142a128dcb2d7060aa3b4c5db8837f7a46a Author: Yu Kuai Date: Thu Jan 9 09:51:41 2025 +0800 md/md-bitmap: factor behind write counters out from bitmap_{start/end}write() behind_write is only used in raid1, prepare to refactor bitmap_{start/end}write(), there are no functional changes. Signed-off-by: Yu Kuai Reviewed-by: Xiao Ni Link: https://lore.kernel.org/r/20250109015145.158868-2-yukuai1@huaweicloud.com Signed-off-by: Song Liu drivers/md/md-bitmap.c | 57 ++++++++++++++++++++++++++++++------------------ drivers/md/md-bitmap.h | 7 ++++-- drivers/md/raid1.c | 12 +++++----- drivers/md/raid10.c | 6 ++--- drivers/md/raid5-cache.c | 3 +-- drivers/md/raid5.c | 11 +++++----- 6 files changed, 56 insertions(+), 40 deletions(-) commit ecf1cf1c58c17a2eda046787b73baba2ac547c16 Author: Peter Korsgaard Date: Mon Jan 13 14:51:18 2025 +0100 hwmon: (pwm-fan) Default to the Maximum cooling level if provided The pwm-fan driver uses full PWM (255) duty cycle at startup, which may not always be desirable because of noise or power consumption peaks. The driver optionally accept a list of "cooling-levels" for the thermal subsystem. If provided, use the PWM value corresponding to the maximum cooling level rather than the full level as the initial PWM setting. Signed-off-by: Peter Korsgaard Link: https://lore.kernel.org/r/20250113135118.3994998-1-peter@korsgaard.com [groeck: Dropped double empty line] Signed-off-by: Guenter Roeck drivers/hwmon/pwm-fan.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit fd10f08cb57b891a9bc7cef4ffb26772d91bebf5 Author: Will Deacon Date: Mon Jan 13 16:34:00 2025 +0000 Documentation: arm64: Remove stale and redundant virtual memory diagrams The arm64 'memory.rst' file tries to document the virtual memory map and the translation procedure for a couple of kernel configurations. Unfortunately, the virtual memory map changes relatively frequently and we support considerably more configurations than we did when the docs were introduced (e.g. we now have support for 16KiB pages and 52-bit addressing). Furthermore, the Arm ARM is the definitive resource for the translation procedure and so there's little point in duplicating part of that information in the kernel documentation. Rather than continue trying (and failing) to maintain these diagrams, let's rip them out. The kernel page-table can be dumped using CONFIG_PTDUMP_DEBUGFS if necesssary. Link: https://lore.kernel.org/r/20250102065554.1533781-1-sangmoon.kim@samsung.com Reported-by: Sangmoon Kim Signed-off-by: Will Deacon Documentation/arch/arm64/memory.rst | 65 ------------------------------------- 1 file changed, 65 deletions(-) commit 6cdbd84dc42b5f7e61c0aed67596efa0f4406a20 Author: Shiju Jose Date: Sat Jan 11 09:17:56 2025 +0000 cxl/test: Update test code for event records to CXL spec rev 3.1 Update test code for General Media, DRAM, Memory Module Event Records to CXL spec rev 3.1. Reviewed-by: Jonathan Cameron Reviewed-by: Ira Weiny Tested-by: Jonathan Cameron Signed-off-by: Shiju Jose Link: https://patch.msgid.link/20250111091756.1682-7-shiju.jose@huawei.com Signed-off-by: Dave Jiang tools/testing/cxl/test/mem.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 4c6e20eb564e0d77497f452ab1ae1b40b1de3ab7 Author: Shiju Jose Date: Sat Jan 11 09:17:55 2025 +0000 cxl/events: Update Memory Module Event Record to CXL spec rev 3.1 CXL spec 3.1 section 8.2.9.2.1.3 Table 8-47, Memory Module Event Record has updated with following new fields and new info for Device Event Type and Device Health Information fields. 1. Validity Flags 2. Component Identifier 3. Device Event Sub-Type Update the Memory Module event record and Memory Module trace event for the above spec changes. The new fields are inserted in logical places. Example trace print of cxl_memory_module trace event, cxl_memory_module: memdev=mem3 host=0000:0f:00.0 serial=3 log=Fatal : \ time=371709344709 uuid=fe927475-dd59-4339-a586-79bab113b774 len=128 \ flags='0x1' handle=2 related_handle=0 maint_op_class=0 \ maint_op_sub_class=0 : event_type='Temperature Change' \ event_sub_type='Unsupported Config Data' \ health_status='MAINTENANCE_NEEDED|REPLACEMENT_NEEDED' \ media_status='All Data Loss in Event of Power Loss' as_life_used=0x3 \ as_dev_temp=Normal as_cor_vol_err_cnt=Normal as_cor_per_err_cnt=Normal \ life_used=8 device_temp=3 dirty_shutdown_cnt=33 cor_vol_err_cnt=25 \ cor_per_err_cnt=45 validity_flags='COMPONENT|COMPONENT PLDM FORMAT' \ comp_id=03 74 c5 08 9a 1a 0b fc d2 7e 2f 31 9b 3c 81 4d \ comp_id_pldm_valid_flags='Resource ID' \ pldm_entity_id=0x00 pldm_resource_id=fc d2 7e 2f Reviewed-by: Jonathan Cameron Reviewed-by: Ira Weiny Signed-off-by: Shiju Jose Link: https://patch.msgid.link/20250111091756.1682-6-shiju.jose@huawei.com Signed-off-by: Dave Jiang drivers/cxl/core/trace.h | 62 +++++++++++++++++++++++++++++++++++++++++------- include/cxl/event.h | 9 ++++--- 2 files changed, 60 insertions(+), 11 deletions(-) commit 24ec41f7c7b22d668443c1581b3b8f8aceed18f9 Author: Shiju Jose Date: Sat Jan 11 09:17:54 2025 +0000 cxl/events: Update DRAM Event Record to CXL spec rev 3.1 CXL spec 3.1 section 8.2.9.2.1.2 Table 8-46, DRAM Event Record has updated with following new fields and new types for Memory Event Type, Transaction Type and Validity Flags fields. 1. Component Identifier 2. Sub-channel 3. Advanced Programmable Corrected Memory Error Threshold Event Flags 4. Corrected Memory Error Count at Event 5. Memory Event Sub-Type Update DRAM events record and DRAM trace event for the above spec changes. The new fields are inserted in logical places. Includes trivial consistency of white space improvements. Example trace print of cxl_dram trace event, cxl_dram: memdev=mem0 host=0000:0f:00.0 serial=3 log=Informational : \ time=54799339519 uuid=601dcbb3-9c06-4eab-b8af-4e9bfb5c9624 len=128 \ flags='0x1' handle=1 related_handle=0 maint_op_class=1 \ maint_op_sub_class=3 : dpa=18680 dpa_flags='' \ descriptor='UNCORRECTABLE_EVENT|THRESHOLD_EVENT' type='Data Path Error' \ sub_type='Media Link CRC Error' transaction_type='Internal Media Scrub' \ channel=3 rank=17 nibble_mask=3b00b2 bank_group=7 bank=11 row=2 \ column=77 cor_mask=21 00 00 00 00 00 00 00 2c 00 00 00 00 00 00 00 37 00 \ 00 00 00 00 00 00 42 00 00 00 00 00 00 00 validity_flags='CHANNEL|RANK|NIBBLE|\ BANK GROUP|BANK|ROW|COLUMN|CORRECTION MASK|COMPONENT|COMPONENT PLDM FORMAT' \ comp_id=01 74 c5 08 9a 1a 0b fc d2 7e 2f 31 9b 3c 81 4d \ comp_id_pldm_valid_flags='PLDM Entity ID' pldm_entity_id=74 c5 08 9a 1a 0b \ pldm_resource_id=0x00 hpa=ffffffffffffffff region= \ region_uuid=00000000-0000-0000-0000-000000000000 sub_channel=5 \ cme_threshold_ev_flags='Corrected Memory Errors in Multiple Media Components|\ Exceeded Programmable Threshold' cvme_count=148 Reviewed-by: Jonathan Cameron Reviewed-by: Davidlohr Bueso Signed-off-by: Shiju Jose Reviewed-by: Ira Weiny Link: https://patch.msgid.link/20250111091756.1682-5-shiju.jose@huawei.com Signed-off-by: Dave Jiang drivers/cxl/core/trace.h | 72 ++++++++++++++++++++++++++++++++++++------------ include/cxl/event.h | 9 ++++-- 2 files changed, 61 insertions(+), 20 deletions(-) commit ae8341313058f76f3ce4169c780af4cf5cb05e1e Author: Shiju Jose Date: Sat Jan 11 09:17:53 2025 +0000 cxl/events: Update General Media Event Record to CXL spec rev 3.1 CXL spec rev 3.1 section 8.2.9.2.1.1 Table 8-45, General Media Event Record has updated with following new fields and new types for Memory Event Type and Transaction Type fields. 1. Advanced Programmable Corrected Memory Error Threshold Event Flags 2. Corrected Memory Error Count at Event 3. Memory Event Sub-Type The format of component identifier has changed (CXL spec 3.1 section 8.2.9.2.1 Table 8-44). Update the general media event record and general media trace event for the above spec changes. The new fields are inserted in logical places. Example trace log of cxl_general_media trace event, cxl_general_media: memdev=mem0 host=0000:0f:00.0 serial=3 log=Fatal : \ time=156831237413 uuid=fbcd0a77-c260-417f-85a9-088b1621eba6 len=128 \ flags='0x1' handle=1 related_handle=0 maint_op_class=2 \ maint_op_sub_class=4 : dpa=30d40 dpa_flags='' \ descriptor='UNCORRECTABLE_EVENT|THRESHOLD_EVENT|POISON_LIST_OVERFLOW' \ type='TE State Violation' sub_type='Media Link Command Training Error' \ transaction_type='Host Inject Poison' channel=3 rank=33 device=5 \ validity_flags='CHANNEL|RANK|DEVICE|COMPONENT|COMPONENT PLDM FORMAT' \ comp_id=03 74 c5 08 9a 1a 0b fc d2 7e 2f 31 9b 3c 81 4d \ comp_id_pldm_valid_flags='PLDM Entity ID | Resource ID' \ pldm_entity_id=74 c5 08 9a 1a 0b pldm_resource_id=fc d2 7e 2f \ hpa=ffffffffffffffff region= \ region_uuid=00000000-0000-0000-0000-000000000000 \ cme_threshold_ev_flags='Corrected Memory Errors in Multiple Media \ Components|Exceeded Programmable Threshold' cme_count=120 Reviewed-by: Jonathan Cameron Reviewed-by: Davidlohr Bueso Reviewed-by: Ira Weiny Signed-off-by: Shiju Jose Link: https://patch.msgid.link/20250111091756.1682-4-shiju.jose@huawei.com Signed-off-by: Dave Jiang drivers/cxl/core/trace.h | 90 +++++++++++++++++++++++++++++++++++++++++------- include/cxl/event.h | 7 ++-- 2 files changed, 83 insertions(+), 14 deletions(-) commit 8166675850165f3d7cf3e33519515656e5c72bfc Author: Shiju Jose Date: Sat Jan 11 09:17:52 2025 +0000 cxl/events: Add Component Identifier formatting for CXL spec rev 3.1 Add Component Identifier formatting for CXL spec rev 3.1, Section 8.2.9.2.1, Table 8-44. Examples for Component Identifier format in trace log, validity_flags='CHANNEL|RANK|DEVICE|COMPONENT|COMPONENT PLDM FORMAT' \ comp_id=03 74 c5 08 9a 1a 0b fc d2 7e 2f 31 9b 3c 81 4d \ comp_id_pldm_valid_flags='PLDM Entity ID | Resource ID' \ pldm_entity_id=74 c5 08 9a 1a 0b pldm_resource_id=fc d2 7e 2f \ validity_flags='COMPONENT|COMPONENT PLDM FORMAT' \ comp_id=02 74 c5 08 9a 1a 0b fc d2 7e 2f 31 9b 3c 81 4d \ comp_id_pldm_valid_flags='Resource ID' \ pldm_entity_id=0x00 pldm_resource_id=fc d2 7e 2f If the validity flags for component ID/component ID format or PLDM ID or resource ID are not set, then pldm_entity_id=0x00 or pldm_resource_id=0x00 would be printed. Component identifier formatting is used in the subsequent patches. Reviewed-by: Jonathan Cameron Reviewed-by: Ira Weiny Signed-off-by: Shiju Jose Link: https://patch.msgid.link/20250111091756.1682-3-shiju.jose@huawei.com Signed-off-by: Dave Jiang drivers/cxl/core/trace.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 5e31e3477f1661ebbbec1cbf141f91ad3cffafc3 Author: Shiju Jose Date: Sat Jan 11 09:17:51 2025 +0000 cxl/events: Update Common Event Record to CXL spec rev 3.1 CXL spec 3.1 section 8.2.9.2.1 Table 8-42, Common Event Record format has updated with Maintenance Operation Subclass information. Add updates for the above spec change in the CXL events record and CXL common trace event implementations. Reviewed-by: Jonathan Cameron Reviewed-by: Davidlohr Bueso Reviewed-by: Ira Weiny Signed-off-by: Shiju Jose Reviewed-by: Fan Ni Link: https://patch.msgid.link/20250111091756.1682-2-shiju.jose@huawei.com Signed-off-by: Dave Jiang drivers/cxl/core/trace.h | 13 +++++++++---- include/cxl/event.h | 3 ++- 2 files changed, 11 insertions(+), 5 deletions(-) commit ecdc475e0707c98c2a89da8d0024b3ea2924ef9b Author: Linus Torvalds Date: Mon Jan 13 08:23:28 2025 -0800 vsnprintf: fix the number base for non-numeric formats Commit 8d4826cc8a8a ("vsnprintf: collapse the number format state into one single state") changed the format specification decoding to be a bit more straightforward but in the process ended up also resetting the number base to zero for formats that aren't clearly numerical. Now, the number base obviously doesn't matter for something like '%s', so this wasn't all that obvious. But some of our specialized pointer extension formatting (ie, things like "print out IPv6 address") did up depending on the default base-10 setting, and when they then tried to print out numbers in "base zero", things didn't work out so well. Most pointer formatting (including things like the default raw hex value conversion) didn't have this issue, because they used helpers that explicitly set the base. Reported-and-tested-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202501131352.e226f995-lkp@intel.com Fixes: 8d4826cc8a8a ("vsnprintf: collapse the number format state into one single state") Signed-off-by: Linus Torvalds lib/vsprintf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2d2b61ae38bd91217ea7cc5bc700a2b9e75b3937 Author: Tiwei Bie Date: Mon Jan 13 23:32:18 2025 +0800 um: Remove unused asm/archparam.h header This header is no longer used after the removal of fixmap support in commit 5bfc4a3a0af3 ("um: Remove obsolete fixmap support"). Signed-off-by: Tiwei Bie Link: https://patch.msgid.link/20250113153218.3331321-3-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg arch/x86/um/asm/archparam.h | 20 -------------------- 1 file changed, 20 deletions(-) commit 3e9807aa6481304c5e992c4451976ab02c58f5ec Author: Tiwei Bie Date: Mon Jan 13 23:32:17 2025 +0800 um: Include missing headers in asm/pgtable.h Formerly, asm/pgtable.h relied on the implicit inclusion of asm/page.h and linux/mm_types.h via asm/fixmap.h. With the removal of asm/fixmap.h, these headers need to be included explicitly in asm/pgtable.h now. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501131814.E6CxjulL-lkp@intel.com/ Fixes: 5bfc4a3a0af3 ("um: Remove obsolete fixmap support") Signed-off-by: Tiwei Bie Link: https://patch.msgid.link/20250113153218.3331321-2-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg arch/um/include/asm/pgtable.h | 3 +++ 1 file changed, 3 insertions(+) commit 8eb27b5758e6fb6d1881413e3f1159c579ac48b3 Author: Thorsten Blum Date: Mon Jan 13 01:10:01 2025 +0100 ASoC: codecs: Use ARRAY_SIZE() to calculate PEB2466_TLV_SIZE Use the ARRAY_SIZE() macro to calculate PEB2466_TLV_SIZE and improve the code's readability. Signed-off-by: Thorsten Blum Acked-by: Herve Codina Link: https://patch.msgid.link/20250113001001.400669-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown sound/soc/codecs/peb2466.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7299cc06fe4ab2ac26af73ac5fecd35a28fef527 Author: Thorsten Blum Date: Tue Jan 7 12:08:59 2025 +0100 ASoC: SOF: Intel: Use str_yes_no() to improve bdw_dump() Remove hard-coded strings by using the str_yes_no() helper function. Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20250107110900.3716-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown sound/soc/sof/intel/bdw.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b239cbc7b078ff9c8b218c6191550ae28763fdaa Author: Takahiro Kuwano Date: Thu Dec 19 16:06:16 2024 +0900 mtd: spi-nor: spansion: Add support for S28HL02GT Infineon S28HL02GT is 3.0V, 2Gb Flash device with Octal interface. It has the same functionalities with S28HS02GT. Link: https://www.infineon.com/dgdl/Infineon-S28HS02GT_S28HS04GT_S28HL02GT_S28HL04GT_2Gb_4Gb_SEMPER_Flash_Octal_interface_1.8V_3.0V-DataSheet-v01_00-EN.pdf?fileId=8ac78c8c7e7124d1017f0631e33714d9 Signed-off-by: Takahiro Kuwano Reviewed-by: Tudor Ambarus [pratyush@kernel.org: add comment with flash name] Signed-off-by: Pratyush Yadav Link: https://lore.kernel.org/r/dc6aa706253a5200ff0c0d4523c2540312575c01.1734588106.git.Takahiro.Kuwano@infineon.com drivers/mtd/spi-nor/spansion.c | 5 +++++ 1 file changed, 5 insertions(+) commit 78bc75e16e03822218bcbae0578fdf988af39ffd Author: Takahiro Kuwano Date: Thu Dec 19 16:06:15 2024 +0900 mtd: spi-nor: spansion: Add support for S28HL256T Infineon S28HL256T is 3.0V, 256Mb Flash device with Octal interface. It has the same functionalities with S28HS256T(1.8V). Link: https://www.infineon.com/dgdl/Infineon-S28HS256T_S28HL256T_256Mb_SEMPER_Flash_Octal_interface_1_8V_3-DataSheet-v02_00-EN.pdf?fileId=8ac78c8c8fc2dd9c018fc66787aa0657 Signed-off-by: Takahiro Kuwano Reviewed-by: Tudor Ambarus [pratyush@kernel.org: add comment with flash name] Signed-off-by: Pratyush Yadav Link: https://lore.kernel.org/r/f052b04693f1100e725e076fd8a0ae339f8002c4.1734588106.git.Takahiro.Kuwano@infineon.com drivers/mtd/spi-nor/spansion.c | 5 +++++ 1 file changed, 5 insertions(+) commit ef262847122b7589d0a1056ab79c688645e2da21 Author: Tudor Ambarus Date: Thu Dec 19 09:20:04 2024 +0000 mtd: spi-nor: extend description of size member of struct flash_info We use the size as an indicator whether to parse SFDP or not. We don't introduce a dedicated member for SFDP parsing because we'd like to keep the struct size at a minimum, as it's used for every flash declaration. Ideally we won't have flash entries at all, but there are still flash parameters that aren't defined by SFDP, thus we need to statically specify them. Signed-off-by: Tudor Ambarus Reviewed-by: Miquel Raynal Reviewed-by: Michael Walle Signed-off-by: Pratyush Yadav Link: https://lore.kernel.org/r/20241219-spi-nor-flash-info-size-desc-v1-1-6b53cf011027@linaro.org drivers/mtd/spi-nor/core.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 4fa91616c078c203f1ab6c43f9524b7e352c8217 Author: David Reaver Date: Wed Jan 8 11:21:30 2025 -0800 md: Replace deprecated kmap_atomic() with kmap_local_page() kmap_atomic() is deprecated and should be replaced with kmap_local_page() [1][2]. kmap_local_page() is faster in kernels with HIGHMEM enabled, can take page faults, and allows preemption. According to [2], this is safe as long as the code between kmap_atomic() and kunmap_atomic() does not implicitly depend on disabling page faults or preemption. It appears to me that none of the call sites in this patch depend on disabling page faults or preemption; they are all mapping a page to simply extract some information from it or print some debug info. [1] https://lwn.net/Articles/836144/ [2] https://docs.kernel.org/mm/highmem.html#temporary-virtual-mappings Signed-off-by: David Reaver Link: https://lore.kernel.org/r/20250108192131.46843-1-me@davidreaver.com Signed-off-by: Song Liu drivers/md/md-bitmap.c | 42 +++++++++++++++++++++--------------------- drivers/md/raid5-cache.c | 16 ++++++++-------- 2 files changed, 29 insertions(+), 29 deletions(-) commit 127186cfb184eaccdfe948e6da66940cfa03efc5 Author: Yu Kuai Date: Thu Jan 2 19:28:41 2025 +0800 md: reintroduce md-linear THe md-linear is removed by commit 849d18e27be9 ("md: Remove deprecated CONFIG_MD_LINEAR") because it has been marked as deprecated for a long time. However, md-linear is used widely for underlying disks with different size, sadly we didn't know this until now, and it's true useful to create partitions and assemble multiple raid and then append one to the other. People have to use dm-linear in this case now, however, they will prefer to minimize the number of involved modules. Fixes: 849d18e27be9 ("md: Remove deprecated CONFIG_MD_LINEAR") Cc: stable@vger.kernel.org Signed-off-by: Yu Kuai Acked-by: Coly Li Acked-by: Mike Snitzer Link: https://lore.kernel.org/r/20250102112841.1227111-1-yukuai1@huaweicloud.com Signed-off-by: Song Liu drivers/md/Kconfig | 13 ++ drivers/md/Makefile | 2 + drivers/md/md-autodetect.c | 8 +- drivers/md/md-linear.c | 354 +++++++++++++++++++++++++++++++++++++++++ drivers/md/md.c | 2 +- include/uapi/linux/raid/md_p.h | 2 +- include/uapi/linux/raid/md_u.h | 2 + 7 files changed, 379 insertions(+), 4 deletions(-) commit 1931cd769a087cfea2f2e1f74769001a7a3be9f1 Author: Krzysztof Kozlowski Date: Sat Jan 11 19:54:09 2025 +0100 mmc: hi3798mv200: 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://lore.kernel.org/all/20250111185410.183896-1-krzysztof.kozlowski@linaro.org>/ Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc-hi3798mv200.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 57a217f193f3b77161a307dd9963ac19d66a17d1 Author: Rob Herring (Arm) Date: Thu Jan 9 09:52:54 2025 -0600 mmc: 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. Reviewed-by: Haibo Chen Reviewed-by: Dragan Simic Acked-by: Adrian Hunter Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/all/20250109155255.3438450-1-robh@kernel.org/ Signed-off-by: Ulf Hansson drivers/mmc/host/mxcmmc.c | 8 ++++---- drivers/mmc/host/sdhci-esdhc-imx.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 9fb4267a759ce50e633a56df6dfdb32bafc24203 Author: Marc Zyngier Date: Mon Jan 13 15:19:52 2025 +0000 KVM: arm64: Fix selftests after sysreg field name update Fix KVM selftests that check for EL0's 64bit-ness, and use a now removed definition. Kindly point them at the new one. Reported-by: Mark Brown Signed-off-by: Marc Zyngier tools/testing/selftests/kvm/aarch64/aarch32_id_regs.c | 2 +- tools/testing/selftests/kvm/aarch64/set_id_regs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 344af27715ddbf357cf76978d674428b88f8e92d Author: Christophe Leroy Date: Mon Jan 13 09:37:24 2025 +0100 select: Fix unbalanced user_access_end() While working on implementing user access validation on powerpc I got the following warnings on a pmac32_defconfig build: CC fs/select.o fs/select.o: warning: objtool: sys_pselect6+0x1bc: redundant UACCESS disable fs/select.o: warning: objtool: sys_pselect6_time32+0x1bc: redundant UACCESS disable On powerpc/32s, user_read_access_begin/end() are no-ops, but the failure path has a user_access_end() instead of user_read_access_end() which means an access end without any prior access begin. Replace that user_access_end() by user_read_access_end(). Fixes: 7e71609f64ec ("pselect6() and friends: take handling the combined 6th/7th args into helper") Signed-off-by: Christophe Leroy Link: https://lore.kernel.org/r/a7139e28d767a13e667ee3c79599a8047222ef36.1736751221.git.christophe.leroy@csgroup.eu Signed-off-by: Christian Brauner fs/select.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 285035a8dac5777422268176e373161618ec00b3 Author: Ivaylo Ivanov Date: Sun Jan 5 18:13:39 2025 +0200 dt-bindings: mmc: samsung,exynos-dw-mshc: add specific compatible for exynos8895 Add samsung,exynos8895-dw-mshc-smu specific compatible to the bindings documentation. Since Samsung, as usual, likes reusing devices from older designs, use the samsung,exynos7-dw-mshc-smu compatible. Signed-off-by: Ivaylo Ivanov Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/all/20250105161344.420749-2-ivo.ivanov.ivanov1@gmail.com/ Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml | 1 + 1 file changed, 1 insertion(+) commit bf50aca633bb5de5901b831bbac0e6b678d61a3f Author: Qu Wenruo Date: Thu Dec 12 16:44:03 2024 +1030 btrfs: remove the unused locked_folio parameter from btrfs_cleanup_ordered_extents() The function btrfs_cleanup_ordered_extents() is only called in error handling path, and the last caller with a @locked_folio parameter was removed to fix a bug in the btrfs_run_delalloc_range() error handling. There is no need to pass @locked_folio parameter anymore. Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 42 ++---------------------------------------- 1 file changed, 2 insertions(+), 40 deletions(-) commit 975a6a8855f45729a0fbfe2a8f2df2d3faef2a97 Author: Qu Wenruo Date: Thu Dec 12 16:44:02 2024 +1030 btrfs: add extra error messages for delalloc range related errors All the error handling bugs I hit so far are all -ENOSPC from either: - cow_file_range() - run_delalloc_nocow() - submit_uncompressed_range() Previously when those functions failed, there was no error message at all, making the debugging much harder. So here we introduce extra error messages for: - cow_file_range() - run_delalloc_nocow() - submit_uncompressed_range() - writepage_delalloc() when btrfs_run_delalloc_range() failed - extent_writepage() when extent_writepage_io() failed One example of the new debug error messages is the following one: run fstests generic/750 at 2024-12-08 12:41:41 BTRFS: device fsid 461b25f5-e240-4543-8deb-e7c2bd01a6d3 devid 1 transid 8 /dev/mapper/test-scratch1 (253:4) scanned by mount (2436600) BTRFS info (device dm-4): first mount of filesystem 461b25f5-e240-4543-8deb-e7c2bd01a6d3 BTRFS info (device dm-4): using crc32c (crc32c-arm64) checksum algorithm BTRFS info (device dm-4): forcing free space tree for sector size 4096 with page size 65536 BTRFS info (device dm-4): using free-space-tree BTRFS warning (device dm-4): read-write for sector size 4096 with page size 65536 is experimental BTRFS info (device dm-4): checking UUID tree BTRFS error (device dm-4): cow_file_range failed, root=363 inode=412 start=503808 len=98304: -28 BTRFS error (device dm-4): run_delalloc_nocow failed, root=363 inode=412 start=503808 len=98304: -28 BTRFS error (device dm-4): failed to run delalloc range, root=363 ino=412 folio=458752 submit_bitmap=11-15 start=503808 len=98304: -28 Which shows an error from cow_file_range() which is called inside a nocow write attempt, along with the extra bitmap from writepage_delalloc(). Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 15 +++++++++++++++ fs/btrfs/inode.c | 12 ++++++++++++ 2 files changed, 27 insertions(+) commit 61d730731b47eeee42ad11fc71e145d269acab8d Author: Qu Wenruo Date: Thu Dec 12 16:44:01 2024 +1030 btrfs: subpage: dump the involved bitmap when ASSERT() failed For btrfs_folio_assert_not_dirty() and btrfs_folio_set_lock(), we call bitmap_test_range_all_zero() to ensure the involved range has no dirty/lock bit already set. However with my recent enhanced delalloc range error handling, I was hitting the ASSERT() inside btrfs_folio_set_lock(), and it turns out that some error handling path is not properly updating the folio flags. So add some extra dumping for the ASSERTs to dump the involved bitmap to help debug. Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/subpage.c | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) commit 396294d1afee65a203d6cabd843d0782e5d7388e Author: Qu Wenruo Date: Thu Dec 12 16:44:00 2024 +1030 btrfs: subpage: fix the bitmap dump of the locked flags We're dumping the locked bitmap into the @checked_bitmap variable, printing incorrect values during debug. Thankfully even during my development I haven't hit a case where I need to dump the locked bitmap. But for the sake of consistency, fix it by dupping the locked bitmap into @locked_bitmap variable for output. Fixes: 75258f20fb70 ("btrfs: subpage: dump extra subpage bitmaps for debug") Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/subpage.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c2b47df81c8e20a8e8cd94f0d7df211137ae94ed Author: Qu Wenruo Date: Thu Dec 12 16:43:59 2024 +1030 btrfs: do proper folio cleanup when run_delalloc_nocow() failed [BUG] With CONFIG_DEBUG_VM set, test case generic/476 has some chance to crash with the following VM_BUG_ON_FOLIO(): BTRFS error (device dm-3): cow_file_range failed, start 1146880 end 1253375 len 106496 ret -28 BTRFS error (device dm-3): run_delalloc_nocow failed, start 1146880 end 1253375 len 106496 ret -28 page: refcount:4 mapcount:0 mapping:00000000592787cc index:0x12 pfn:0x10664 aops:btrfs_aops [btrfs] ino:101 dentry name(?):"f1774" flags: 0x2fffff80004028(uptodate|lru|private|node=0|zone=2|lastcpupid=0xfffff) page dumped because: VM_BUG_ON_FOLIO(!folio_test_locked(folio)) ------------[ cut here ]------------ kernel BUG at mm/page-writeback.c:2992! Internal error: Oops - BUG: 00000000f2000800 [#1] SMP CPU: 2 UID: 0 PID: 3943513 Comm: kworker/u24:15 Tainted: G OE 6.12.0-rc7-custom+ #87 Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE Hardware name: QEMU KVM Virtual Machine, BIOS unknown 2/2/2022 Workqueue: events_unbound btrfs_async_reclaim_data_space [btrfs] pc : folio_clear_dirty_for_io+0x128/0x258 lr : folio_clear_dirty_for_io+0x128/0x258 Call trace: folio_clear_dirty_for_io+0x128/0x258 btrfs_folio_clamp_clear_dirty+0x80/0xd0 [btrfs] __process_folios_contig+0x154/0x268 [btrfs] extent_clear_unlock_delalloc+0x5c/0x80 [btrfs] run_delalloc_nocow+0x5f8/0x760 [btrfs] btrfs_run_delalloc_range+0xa8/0x220 [btrfs] writepage_delalloc+0x230/0x4c8 [btrfs] extent_writepage+0xb8/0x358 [btrfs] extent_write_cache_pages+0x21c/0x4e8 [btrfs] btrfs_writepages+0x94/0x150 [btrfs] do_writepages+0x74/0x190 filemap_fdatawrite_wbc+0x88/0xc8 start_delalloc_inodes+0x178/0x3a8 [btrfs] btrfs_start_delalloc_roots+0x174/0x280 [btrfs] shrink_delalloc+0x114/0x280 [btrfs] flush_space+0x250/0x2f8 [btrfs] btrfs_async_reclaim_data_space+0x180/0x228 [btrfs] process_one_work+0x164/0x408 worker_thread+0x25c/0x388 kthread+0x100/0x118 ret_from_fork+0x10/0x20 Code: 910a8021 a90363f7 a9046bf9 94012379 (d4210000) ---[ end trace 0000000000000000 ]--- [CAUSE] The first two lines of extra debug messages show the problem is caused by the error handling of run_delalloc_nocow(). E.g. we have the following dirtied range (4K blocksize 4K page size): 0 16K 32K |//////////////////////////////////////| | Pre-allocated | And the range [0, 16K) has a preallocated extent. - Enter run_delalloc_nocow() for range [0, 16K) Which found range [0, 16K) is preallocated, can do the proper NOCOW write. - Enter fallback_to_fow() for range [16K, 32K) Since the range [16K, 32K) is not backed by preallocated extent, we have to go COW. - cow_file_range() failed for range [16K, 32K) So cow_file_range() will do the clean up by clearing folio dirty, unlock the folios. Now the folios in range [16K, 32K) is unlocked. - Enter extent_clear_unlock_delalloc() from run_delalloc_nocow() Which is called with PAGE_START_WRITEBACK to start page writeback. But folios can only be marked writeback when it's properly locked, thus this triggered the VM_BUG_ON_FOLIO(). Furthermore there is another hidden but common bug that run_delalloc_nocow() is not clearing the folio dirty flags in its error handling path. This is the common bug shared between run_delalloc_nocow() and cow_file_range(). [FIX] - Clear folio dirty for range [@start, @cur_offset) Introduce a helper, cleanup_dirty_folios(), which will find and lock the folio in the range, clear the dirty flag and start/end the writeback, with the extra handling for the @locked_folio. - Introduce a helper to clear folio dirty, start and end writeback - Introduce a helper to record the last failed COW range end This is to trace which range we should skip, to avoid double unlocking. - Skip the failed COW range for the error handling CC: stable@vger.kernel.org Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/inode.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++---- fs/btrfs/subpage.h | 13 ++++++++ 2 files changed, 102 insertions(+), 6 deletions(-) commit 06f364284794f149d2abc167c11d556cf20c954b Author: Qu Wenruo Date: Thu Dec 12 16:43:58 2024 +1030 btrfs: do proper folio cleanup when cow_file_range() failed [BUG] When testing with COW fixup marked as BUG_ON() (this is involved with the new pin_user_pages*() change, which should not result new out-of-band dirty pages), I hit a crash triggered by the BUG_ON() from hitting COW fixup path. This BUG_ON() happens just after a failed btrfs_run_delalloc_range(): BTRFS error (device dm-2): failed to run delalloc range, root 348 ino 405 folio 65536 submit_bitmap 6-15 start 90112 len 106496: -28 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent_io.c:1444! Internal error: Oops - BUG: 00000000f2000800 [#1] SMP CPU: 0 UID: 0 PID: 434621 Comm: kworker/u24:8 Tainted: G OE 6.12.0-rc7-custom+ #86 Hardware name: QEMU KVM Virtual Machine, BIOS unknown 2/2/2022 Workqueue: events_unbound btrfs_async_reclaim_data_space [btrfs] pc : extent_writepage_io+0x2d4/0x308 [btrfs] lr : extent_writepage_io+0x2d4/0x308 [btrfs] Call trace: extent_writepage_io+0x2d4/0x308 [btrfs] extent_writepage+0x218/0x330 [btrfs] extent_write_cache_pages+0x1d4/0x4b0 [btrfs] btrfs_writepages+0x94/0x150 [btrfs] do_writepages+0x74/0x190 filemap_fdatawrite_wbc+0x88/0xc8 start_delalloc_inodes+0x180/0x3b0 [btrfs] btrfs_start_delalloc_roots+0x174/0x280 [btrfs] shrink_delalloc+0x114/0x280 [btrfs] flush_space+0x250/0x2f8 [btrfs] btrfs_async_reclaim_data_space+0x180/0x228 [btrfs] process_one_work+0x164/0x408 worker_thread+0x25c/0x388 kthread+0x100/0x118 ret_from_fork+0x10/0x20 Code: aa1403e1 9402f3ef aa1403e0 9402f36f (d4210000) ---[ end trace 0000000000000000 ]--- [CAUSE] That failure is mostly from cow_file_range(), where we can hit -ENOSPC. Although the -ENOSPC is already a bug related to our space reservation code, let's just focus on the error handling. For example, we have the following dirty range [0, 64K) of an inode, with 4K sector size and 4K page size: 0 16K 32K 48K 64K |///////////////////////////////////////| |#######################################| Where |///| means page are still dirty, and |###| means the extent io tree has EXTENT_DELALLOC flag. - Enter extent_writepage() for page 0 - Enter btrfs_run_delalloc_range() for range [0, 64K) - Enter cow_file_range() for range [0, 64K) - Function btrfs_reserve_extent() only reserved one 16K extent So we created extent map and ordered extent for range [0, 16K) 0 16K 32K 48K 64K |////////|//////////////////////////////| |<- OE ->|##############################| And range [0, 16K) has its delalloc flag cleared. But since we haven't yet submit any bio, involved 4 pages are still dirty. - Function btrfs_reserve_extent() returns with -ENOSPC Now we have to run error cleanup, which will clear all EXTENT_DELALLOC* flags and clear the dirty flags for the remaining ranges: 0 16K 32K 48K 64K |////////| | | | | Note that range [0, 16K) still has its pages dirty. - Some time later, writeback is triggered again for the range [0, 16K) since the page range still has dirty flags. - btrfs_run_delalloc_range() will do nothing because there is no EXTENT_DELALLOC flag. - extent_writepage_io() finds page 0 has no ordered flag Which falls into the COW fixup path, triggering the BUG_ON(). Unfortunately this error handling bug dates back to the introduction of btrfs. Thankfully with the abuse of COW fixup, at least it won't crash the kernel. [FIX] Instead of immediately unlocking the extent and folios, we keep the extent and folios locked until either erroring out or the whole delalloc range finished. When the whole delalloc range finished without error, we just unlock the whole range with PAGE_SET_ORDERED (and PAGE_UNLOCK for !keep_locked cases), with EXTENT_DELALLOC and EXTENT_LOCKED cleared. And the involved folios will be properly submitted, with their dirty flags cleared during submission. For the error path, it will be a little more complex: - The range with ordered extent allocated (range (1)) We only clear the EXTENT_DELALLOC and EXTENT_LOCKED, as the remaining flags are cleaned up by btrfs_mark_ordered_io_finished()->btrfs_finish_one_ordered(). For folios we finish the IO (clear dirty, start writeback and immediately finish the writeback) and unlock the folios. - The range with reserved extent but no ordered extent (range(2)) - The range we never touched (range(3)) For both range (2) and range(3) the behavior is not changed. Now even if cow_file_range() failed halfway with some successfully reserved extents/ordered extents, we will keep all folios clean, so there will be no future writeback triggered on them. CC: stable@vger.kernel.org Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/inode.c | 63 +++++++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 33 deletions(-) commit e494e451611a3de6ae95f99e8339210c157d70fb Author: Randy Dunlap Date: Fri Jan 10 22:27:58 2025 -0800 partitions: ldm: remove the initial kernel-doc notation Remove the file's first comment describing what the file is. This comment is not in kernel-doc format so it causes a kernel-doc warning. ldm.h:13: warning: expecting prototype for ldm(). Prototype was for _FS_PT_LDM_H_() instead Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Randy Dunlap Cc: Richard Russon (FlatCap) Cc: linux-ntfs-dev@lists.sourceforge.net Cc: Jens Axboe Link: https://lore.kernel.org/r/20250111062758.910458-1-rdunlap@infradead.org Signed-off-by: Jens Axboe block/partitions/ldm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f403034e8afd12ed6ea5de64f0adda3d90e67c9d Author: Randy Dunlap Date: Fri Jan 10 22:27:48 2025 -0800 blk-cgroup: rwstat: fix kernel-doc warnings in header file Correct the function parameters to eliminate kernel-doc warnings: blk-cgroup-rwstat.h:63: warning: Function parameter or struct member 'opf' not described in 'blkg_rwstat_add' blk-cgroup-rwstat.h:63: warning: Excess function parameter 'op' description in 'blkg_rwstat_add' blk-cgroup-rwstat.h:91: warning: Function parameter or struct member 'result' not described in 'blkg_rwstat_read' Signed-off-by: Randy Dunlap Cc: Tejun Heo Cc: Josef Bacik Cc: Jens Axboe Cc: cgroups@vger.kernel.org Link: https://lore.kernel.org/r/20250111062748.910442-1-rdunlap@infradead.org Signed-off-by: Jens Axboe block/blk-cgroup-rwstat.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4fa5c37012d71f6a39c4286ffabb9466f1728ba3 Author: Randy Dunlap Date: Fri Jan 10 22:27:36 2025 -0800 blk-cgroup: fix kernel-doc warnings in header file Correct the function parameters and function names to eliminate kernel-doc warnings: blk-cgroup.h:238: warning: Function parameter or struct member 'bio' not described in 'bio_issue_as_root_blkg' blk-cgroup.h:248: warning: bad line: blk-cgroup.h:279: warning: expecting prototype for blkg_to_pdata(). Prototype was for blkg_to_pd() instead blk-cgroup.h:296: warning: expecting prototype for pdata_to_blkg(). Prototype was for pd_to_blkg() instead Signed-off-by: Randy Dunlap Cc: Tejun Heo Cc: Josef Bacik Cc: Jens Axboe Cc: cgroups@vger.kernel.org Link: https://lore.kernel.org/r/20250111062736.910383-1-rdunlap@infradead.org Signed-off-by: Jens Axboe block/blk-cgroup.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b1bb6fc06b5e196546c4f7ef32b128c8ea91836c Author: Charlie Jenkins Date: Fri Jan 10 11:22:51 2025 -0800 perf tools mips: Fix mips syscall generation The mips syscall generation was still based on the old method. Delete the Makefile since it is no longer needed with the new method of generation. Reported-by: Arnaldo Carvalho de Melo Fixes: 619ffe669496a288 ("perf tools mips: Use generic syscall scripts") Signed-off-by: Charlie Jenkins 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/20250110-perf_fix_mips-v1-1-4e661c3b710a@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/mips/Makefile | 18 ------------------ 1 file changed, 18 deletions(-) commit 8337b029f788272f5273887ccefb8226404658ce Author: Ming Lei Date: Tue Oct 29 09:19:41 2024 +0800 nbd: fix partial sending nbd driver sends request header and payload with multiple call of sock_sendmsg, and partial sending can't be avoided. However, nbd driver returns BLK_STS_RESOURCE to block core in this situation. This way causes one issue: request->tag may change in the next run of nbd_queue_rq(), but the original old tag has been sent as part of header cookie, this way confuses nbd driver reply handling, since the real request can't be retrieved any more with the obsolete old tag. Fix it by retrying sending directly in per-socket work function, meantime return BLK_STS_OK to block layer core. Cc: vincent.chen@sifive.com Cc: Leon Schuermann Cc: Bart Van Assche Reported-by: Kevin Wolf Signed-off-by: Ming Lei Tested-by: Kevin Wolf Reviewed-by: Kevin Wolf Link: https://lore.kernel.org/r/20241029011941.153037-1-ming.lei@redhat.com Signed-off-by: Jens Axboe drivers/block/nbd.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 85 insertions(+), 10 deletions(-) commit 05cd60e4d0716ecc1a8027ae782c25522292d6ef Author: James Clark Date: Wed Jan 8 14:29:00 2025 +0000 perf tests arm_spe: Add test for discard mode Add a test that checks that there were no AUX or AUXTRACE events recorded when discard mode is used. Reviewed-by: Yeoreum Yun Signed-off-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Graham Woodward Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Michael Petlan Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Rob Herring Cc: Thomas Richter Cc: Veronika Molnarova Cc: Will Deacon Link: https://lore.kernel.org/r/20250108142904.401139-6-james.clark@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/test_arm_spe.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 7c0be4ead1f8f5f8be0803f347de0de81e3b8e1c Author: Ming Lei Date: Mon Jan 13 09:58:33 2025 +0800 block: mark GFP_NOIO around sysfs ->store() sysfs ->store is called with queue freezed, meantime we have several ->store() callbacks(update_nr_requests, wbt, scheduler) to allocate memory with GFP_KERNEL which may run into direct reclaim code path, then potential deadlock can be caused. Fix the issue by marking NOIO around sysfs ->store() Reported-by: Thomas Hellström Cc: stable@vger.kernel.org Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Link: https://lore.kernel.org/r/20250113015833.698458-1-ming.lei@redhat.com Link: https://lore.kernel.org/linux-block/Z4RkemI9f6N5zoEF@fedora/T/#mc774c65eeca5c024d29695f9ac6152b87763f305 Signed-off-by: Jens Axboe block/blk-sysfs.c | 3 +++ 1 file changed, 3 insertions(+) commit 9c3164ea7e28a4a03c45868a089e98148bd51edf Author: James Clark Date: Wed Jan 8 14:28:59 2025 +0000 perf tools arm-spe: Don't allocate buffer or tracking event in discard mode The buffer will never be written to so don't bother allocating it. The tracking event is also not required. Reviewed-by: Yeoreum Yun Signed-off-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Graham Woodward Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Michael Petlan Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Rob Herring Cc: Thomas Richter Cc: Veronika Molnarova Cc: Will Deacon Link: https://lore.kernel.org/r/20250108142904.401139-5-james.clark@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm64/util/arm-spe.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 23a65c5e8b18c01de31f8b849cb3fbaaacaffe5b Author: James Clark Date: Wed Jan 8 14:28:58 2025 +0000 perf tools arm-spe: Pull out functions for aux buffer and tracking setup These won't be used in the next commit in discard mode, so put them in their own functions. No functional changes intended. Reviewed-by: Yeoreum Yun Signed-off-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Graham Woodward Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Michael Petlan Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Rob Herring Cc: Thomas Richter Cc: Veronika Molnarova Cc: Will Deacon Link: https://lore.kernel.org/r/20250108142904.401139-4-james.clark@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm64/util/arm-spe.c | 83 ++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 32 deletions(-) commit 1734514560ad810352ab745b668330b85c0d4d40 Author: Zijun Hu Date: Thu Jan 9 21:26:59 2025 +0800 of: Remove a duplicated code block address.c has a same code block with fdt_address.c. Remove a copy by moving the duplicated code block into of_private.h. Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-8-db8a72415b8c@quicinc.com Signed-off-by: Rob Herring (Arm) drivers/of/address.c | 21 +++------------------ drivers/of/fdt_address.c | 21 ++++----------------- drivers/of/of_private.h | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+), 35 deletions(-) commit a7858d5c36cae52eaf3048490b05c0b19086073b Author: Qu Wenruo Date: Thu Dec 12 16:43:57 2024 +1030 btrfs: fix error handling of submit_uncompressed_range() [BUG] If we failed to compress the range, or cannot reserve a large enough data extent (e.g. too fragmented free space), we will fall back to submit_uncompressed_range(). But inside submit_uncompressed_range(), run_delalloc_cow() can also fail due to -ENOSPC or any other error. In that case there are 3 bugs in the error handling: 1) Double freeing for the same ordered extent This can lead to crash due to ordered extent double accounting 2) Start/end writeback without updating the subpage writeback bitmap 3) Unlock the folio without clear the subpage lock bitmap Both bugs 2) and 3) will crash the kernel if the btrfs block size is smaller than folio size, as the next time the folio gets writeback/lock updates, subpage will find the bitmap already have the range set, triggering an ASSERT(). [CAUSE] Bug 1) happens in the following call chain: submit_uncompressed_range() |- run_delalloc_cow() | |- cow_file_range() | |- btrfs_reserve_extent() | Failed with -ENOSPC or whatever error | |- btrfs_clean_up_ordered_extents() | |- btrfs_mark_ordered_io_finished() | Which cleans all the ordered extents in the async_extent range. | |- btrfs_mark_ordered_io_finished() Which cleans the folio range. The finished ordered extents may not be immediately removed from the ordered io tree, as they are removed inside a work queue. So the second btrfs_mark_ordered_io_finished() may find the finished but not-yet-removed ordered extents, and double free them. Furthermore, the second btrfs_mark_ordered_io_finished() is not subpage compatible, as it uses fixed folio_pos() with PAGE_SIZE, which can cover other ordered extents. Bugs 2) and 3) are more straightforward, btrfs just calls folio_unlock(), folio_start_writeback() and folio_end_writeback(), other than the helpers which handle subpage cases. [FIX] For bug 1) since the first btrfs_cleanup_ordered_extents() call is handling the whole range, we should not do the second btrfs_mark_ordered_io_finished() call. And for the first btrfs_cleanup_ordered_extents(), we no longer need to pass the @locked_page parameter, as we are already in the async extent context, thus will never rely on the error handling inside btrfs_run_delalloc_range(). So just let the btrfs_clean_up_ordered_extents() handle every folio equally. For bug 2) we should not even call folio_start_writeback()/folio_end_writeback() anymore. As the error handling protocol, cow_file_range() should clear dirty flag and start/finish the writeback for the whole range passed in. For bug 3) just change the folio_unlock() to btrfs_folio_end_lock() helper. Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/inode.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 295adaf455bec573fd730b887a072d07861b03c0 Author: Miri Korenblit Date: Thu Jan 2 16:20:09 2025 +0200 wifi: mac80211: avoid double free in auth/assoc timeout In case of authentication/association timeout (as detected in ieee80211_iface_work->ieee80211_sta_work), ieee80211_destroy_auth_data is called. At the beginning of it, the pointer to ifmgd::auth_data memory is copied to a local variable. If iface_work is queued again during the execution of the current one, and then the driver is flushing the wiphy_works (for its needs), ieee80211_destroy_auth_data will run again and free auth_data. Then when the execution of the original worker continues, the previously copied pointer will be freed, causing a kernel bug: kernel BUG at mm/slub.c:553! (double free) Same for association timeout (just with ieee80211_destroy_assoc_data and ifmgd::assoc_data) Fix this by NULLifying auth/assoc data right after we copied the pointer to it. That way, even in the scenario above, the code will not handle the same timeout twice. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250102161730.0c3f7f781096.I2b458fb53291b06717077a815755288a81274756@changeid Signed-off-by: Johannes Berg net/mac80211/mlme.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b9caeea95c41d46d2051595ff4c293ac48f66d6a Author: Johannes Berg Date: Thu Jan 2 16:20:08 2025 +0200 wifi: mac80211: ibss: mark IBSS left before leaving Mark that we left the IBSS before actually leaving (which requires calling the driver). Otherwise, it's possible to have the driver do some work flushing etc. while leaving, and then get into the work trying to join again while all data is being destroyed. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.81a6c12b304c.I8484f768371e128152a84aa164854cca9ec1066b@changeid Signed-off-by: Johannes Berg net/mac80211/ibss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3bf18e9916cbdb5a015d96b43bc9961b864fa8c4 Author: Johannes Berg Date: Thu Jan 2 16:20:07 2025 +0200 wifi: mac80211: ibss: stop transmit when merging IBSS We disable the carrier, but that doesn't immediately take effect, and as such a concurrent transmit can go into the driver while drv_leave_ibss() is happening and confuse it. Synchronize to avoid that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.83b58167e80e.I538751fbe1b4302d20f6ed80afb024bca6a2dbf5@changeid Signed-off-by: Johannes Berg net/mac80211/ibss.c | 1 + 1 file changed, 1 insertion(+) commit aa3ce3f8fafa0b8fb062f28024855ea8cb3f3450 Author: Johannes Berg Date: Thu Jan 2 16:20:06 2025 +0200 wifi: mac80211: don't flush non-uploaded STAs If STA state is pre-moved to AUTHORIZED (such as in IBSS scenarios) and insertion fails, the station is freed. In this case, the driver never knew about the station, so trying to flush it is unexpected and may crash. Check if the sta was uploaded to the driver before and fix this. Fixes: d00800a289c9 ("wifi: mac80211: add flush_sta method") Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.e3d10970a7c7.I491bbcccc46f835ade07df0640a75f6ed92f20a3@changeid Signed-off-by: Johannes Berg net/mac80211/driver-ops.h | 3 +++ 1 file changed, 3 insertions(+) commit 6bd9a087c8035626e7bfb6b678c9e036b8b26038 Author: Benjamin Berg Date: Thu Jan 2 16:20:05 2025 +0200 wifi: mac80211: set key link ID to the deflink one When in non-MLO mode, the key ID was set to -1 even for keys that are not pairwise. Change the link ID to be the link ID of the deflink in this case so that drivers do not need to special cases for this. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.0c066f084677.I4a5c288465e75119edb6a0df90dddf6f30d14a02@changeid Signed-off-by: Johannes Berg include/net/mac80211.h | 2 +- net/mac80211/cfg.c | 11 ++++++++--- net/mac80211/key.c | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) commit e3d91a681cb5bcf283bc9c8647ba56aede69a38a Author: Benjamin Berg Date: Thu Jan 2 16:20:04 2025 +0200 wifi: mac80211: pass correct link ID on assoc The link ID passed to drv_mgd_complete_tx when handling the association response was not set. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.2b06504ecaef.Ifb94e9375b910de6cdd2e5865d8cb3ab9790b314@changeid Signed-off-by: Johannes Berg net/mac80211/mlme.c | 2 ++ 1 file changed, 2 insertions(+) commit 63a59880ec116cebb8a01ead28b1b23c3846ebb9 Author: Johannes Berg Date: Thu Jan 2 16:20:03 2025 +0200 wifi: iwlwifi: simplify nested if checks In the absence of (an) else clause(s), "if (a) if (b)" is equivalent to "if (a && b)", so simplify the code a bit. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.7ddc9cb1ea50.If18bd94706d6c821e34c38a4704bf85dca6207b2@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/binding.c | 7 +++---- drivers/net/wireless/intel/iwlwifi/mvm/link.c | 5 ++--- drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) commit bb54c93bd37541424505281e09fffe75ab3357e9 Author: Johannes Berg Date: Thu Jan 2 16:20:02 2025 +0200 wifi: nl80211: simplify nested if checks In the absence of (an) else clause(s), "if (a) if (b)" is equivalent to "if (a && b)", so simplify the code a bit. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.c8bf7338aa64.Ie49dcc1ba44b507d91d5a9d8bd538d7ac2e46c54@changeid Signed-off-by: Johannes Berg net/wireless/nl80211.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 24711d60f8492a30622e419cee643d59264ea939 Author: Ilan Peer Date: Thu Jan 2 16:20:01 2025 +0200 wifi: mac80211: Support parsing EPCS ML element Add support for parsing an ML element of type EPCS priority access, which can optionally be included in EHT protected action frames used to configure EPCS. Signed-off-by: Ilan Peer Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.5afdf65cff46.I0ffa30b40fbad47bc5b608b5fd46047a8c44e904@changeid Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 2 ++ net/mac80211/parse.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit 19aa842dcbb5860509b7e1b7745dbae0b791f6c4 Author: Ilan Peer Date: Thu Jan 2 16:20:00 2025 +0200 wifi: mac80211: Fix common size calculation for ML element When the ML type is EPCS the control bitmap is reserved, the length is always 7 and is captured by the 1st octet after the control. Fixes: 0f48b8b88aa9 ("wifi: ieee80211: add definitions for multi-link element") Signed-off-by: Ilan Peer Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.5790376754a7.I381208cbb72b1be2a88239509294099e9337e254@changeid Signed-off-by: Johannes Berg include/linux/ieee80211.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 904c277342936b75ae55999d87abacd4c1ab1fd3 Author: Ilan Peer Date: Thu Jan 2 16:19:59 2025 +0200 wifi: cfg80211: Add support for controlling EPCS Add support for configuring Emergency Preparedness Communication Services (EPCS) for station mode. Signed-off-by: Ilan Peer Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.ea54ac94445c.I11d750188bc0871e13e86146a3b5cc048d853e69@changeid Signed-off-by: Johannes Berg include/net/cfg80211.h | 10 ++++++++ include/uapi/linux/nl80211.h | 9 +++++++ net/wireless/nl80211.c | 60 ++++++++++++++++++++++++++++++++++++++++++++ net/wireless/rdev-ops.h | 15 +++++++++++ net/wireless/trace.h | 34 +++++++++++++++++++++++++ 5 files changed, 128 insertions(+) commit 36e05b0b83903e2d85b3675d10ac8b5eced54377 Author: Ilan Peer Date: Thu Jan 2 16:19:58 2025 +0200 wifi: mac80211: Support dynamic link addition and removal Add support for adding and removing station links: - Adding links is done asynchronously, i.e., first an ML reconfiguration action frame is sent to the AP requesting to add links, and only when the AP replies, links which were added successfully by the AP are added locally. - Removing links is done synchronously, i.e., the links are removed before sending the ML reconfiguration action frame to the AP (to avoid using this links after the AP MLD removed them but before the station got the ML reconfiguration response). In case the AP replies with a status indicating that a link removal was not successful, disconnect (as this should not happen an is an indication that something might be wrong on the AP MLD). Signed-off-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.ec0492a8dd21.I2869686642bbc0f86c40f284ebf7e6f644b551ab@changeid Signed-off-by: Johannes Berg include/linux/ieee80211.h | 11 + net/mac80211/cfg.c | 13 + net/mac80211/ieee80211_i.h | 15 + net/mac80211/iface.c | 4 + net/mac80211/mlme.c | 757 ++++++++++++++++++++++++++++++++++++++++++++- net/mac80211/rx.c | 12 + 6 files changed, 811 insertions(+), 1 deletion(-) commit fa2b73bfecdfcba59eaca5fd7a182ea2f07a2240 Author: Ilan Peer Date: Thu Jan 2 16:19:57 2025 +0200 wifi: mac80211: Pull link space calculation to a function Pull the calculation of the size needed for a link in an association request frame to a function, so it could also be used during the construction of other frames as well, e.g., ML link configuration request frame. Signed-off-by: Ilan Peer Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.ac16adfa39d4.I9e28c2fcd5ca252341c817fc03ea8df7b807fcbf@changeid Signed-off-by: Johannes Berg net/mac80211/mlme.c | 84 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 31 deletions(-) commit 136a4e82bc8e34ea37024b88c8a3cff67ae84038 Author: Ilan Peer Date: Thu Jan 2 16:19:56 2025 +0200 wifi: mac80211: Refactor adding association elements Instead of always using 'sdata->u.mgd.assoc_data' have the association data be passed as an argument. This will later allow to use the same functionality for adding links to the current association. Signed-off-by: Ilan Peer Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.191f58f2bba7.I6baa6e2989a39937234ff91d7db5ff1359a6bb30@changeid Signed-off-by: Johannes Berg net/mac80211/mlme.c | 73 ++++++++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 35 deletions(-) commit 65c1c041798484da54cbad5fb5833b81694c43cf Author: Ilan Peer Date: Thu Jan 2 16:19:55 2025 +0200 wifi: cfg80211: Add support for dynamic addition/removal of links Add support for requesting dynamic addition/removal of links to the current MLO association. Signed-off-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.cef23352f2a2.I79c849974c494cb1cbf9e1b22a5d2d37395ff5ac@changeid Signed-off-by: Johannes Berg include/net/cfg80211.h | 45 ++++++++++++++++++++++++ include/uapi/linux/nl80211.h | 10 ++++++ net/wireless/core.h | 4 +++ net/wireless/mlme.c | 77 ++++++++++++++++++++++++++++++++++++++++ net/wireless/nl80211.c | 84 ++++++++++++++++++++++++++++++++++++++++++++ net/wireless/nl80211.h | 3 ++ net/wireless/rdev-ops.h | 19 ++++++++++ net/wireless/trace.h | 44 +++++++++++++++++++++++ 8 files changed, 286 insertions(+) commit 720fa448f5a7498ac7749432e551b930f11a15ad Author: Ilan Peer Date: Thu Jan 2 16:19:54 2025 +0200 wifi: nl80211: Split the links handling of an association request And move it to a separate function so it could later be reused for dynamic addition of links. Signed-off-by: Ilan Peer Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.1e9c1873796a.I27a51c8c1d455f0a6d5b59f93f2c9ac49282febb@changeid Signed-off-by: Johannes Berg net/wireless/nl80211.c | 151 +++++++++++++++++++++++++------------------------ 1 file changed, 76 insertions(+), 75 deletions(-) commit fa2a71a3b9ed1a333f1bed30ffe758cc150a399a Author: Ilan Peer Date: Thu Jan 2 16:19:53 2025 +0200 wifi: ieee80211: Add some missing MLO related definitions As a preparation to support ML reconfiguration request and response, add additional ML reconfiguration definitions required to support the flow. See Section 9.4.2.321.4 in Draft P802.11be_D6.0. Signed-off-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250102161730.4970ca10ebfd.Ibe7f6108cd0e04b8c739a8e35a4f485f664a17e6@changeid Signed-off-by: Johannes Berg include/linux/ieee80211.h | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit 22159143ff99883667f340998cfbb52b4aaac14c Author: Nicolas Escande Date: Thu Jan 9 17:10:40 2025 +0100 wifi: nl80211: fix nl80211_start_radar_detection return value Since the wiphy_guard changes, rdev_start_radar_detection's return value in nl80211_start_radar_detection is ignored and we always returned 0. Fixes: f42d22d3f796 ("wifi: cfg80211: define and use wiphy guard") Signed-off-by: Nicolas Escande Link: https://patch.msgid.link/20250109161040.325742-1-nico.escande@gmail.com Signed-off-by: Johannes Berg net/wireless/nl80211.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit 9add053591ed9d126b6f071236e33e762c439fa8 Author: Kavita Kavita Date: Thu Jan 9 10:34:09 2025 +0530 wifi: cfg80211: skip regulatory for punctured subchannels The kernel performs several regulatory checks for AP mode in nl80211/cfg80211. These checks include radar detection, verification of whether the sub-channel is disabled, and an examination to determine if the channel is a DFS channel (both DFS usable and DFS available). These checks are performed across a frequency range, examining each sub-channel. However, these checks are also performed on subchannels that have been punctured which should not be examined as they are not in use. This leads to the issue where the AP stops because one of the 20 MHz sub-channels is disabled or radar detected on the channel, even when the sub-channel is punctured. To address this issue, add a condition check wherever regulatory checks exist for AP mode in nl80211/cfg80211. This check identifies punctured channels and, upon finding them, skips the regulatory checks for those channels. Co-developed-by: Manaswini Paluri Signed-off-by: Manaswini Paluri Signed-off-by: Kavita Kavita Link: https://patch.msgid.link/20250109050409.25351-1-quic_kkavita@quicinc.com Signed-off-by: Johannes Berg net/wireless/chan.c | 370 +++++++++++++++++----------------------------------- 1 file changed, 123 insertions(+), 247 deletions(-) commit 3aaa1a5a9a2ceeb32afa6ea4110a92338a863c33 Author: Andy Strohman Date: Tue Jan 7 10:44:31 2025 +0000 wifi: mac80211: fix tid removal during mesh forwarding With change (wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces), a non-zero TID assignment is lost during slow path mesh forwarding. Prior to this change, ieee80211_rx_h_mesh_fwding() left the TID intact in the header. As a result of this header corruption, packets belonging to non-zero TIDs will get treating as belonging TID 0 by functions such as ieee80211_get_tid(). While this miscategorization by itself is an issue, there are additional ramifications due to the fact that skb->priority still reflects the mesh forwarded packet's ingress (correct) TID. The mt7915 driver inspects the TID recorded within skb->priority and relays this to the hardware/radio during TX. The radio firmware appears to react to this by changing the sequence control header, but it does not also ensure/correct the TID in the QoS control header. As a result, the receiver will see packets with sequence numbers corresponding to the wrong TID. The receiver of the forwarded packet will see TID 0 in QoS control but a sequence number corresponding to the correct (different) TID in sequence control. This causes data stalls for TID 0 until the TID 0 sequence number advances past what the receiver believes it should be due to this bug. Mesh routing mpath changes cause a brief transition from fast path forwarding to slow path forwarding. Since this bug only affects the slow path forwarding, mpath changes bring opportunity for the bug to be triggered. In the author's case, he was experiencing TID 0 data stalls after mpath changes on an intermediate mesh node. These observed stalls may be specific to mediatek radios. But the inconsistency between the packet header and skb->priority may cause problems for other drivers as well. Regardless if this causes connectivity issues on other radios, this change is necessary in order transmit (forward) the packet on the correct TID and to have a consistent view a packet's TID within mac80211. Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces") Signed-off-by: Andy Strohman Link: https://patch.msgid.link/20250107104431.446775-1-andrew@andrewstrohman.com Signed-off-by: Johannes Berg net/mac80211/rx.c | 1 + 1 file changed, 1 insertion(+) commit 14d00d7629639406b865ea392ed39d743f5d4aed Author: Miri Korenblit Date: Tue Dec 31 13:59:15 2024 +0200 wifi: iwlwifi: rename iwl_datapath_monitor_notif::mac_id to link_id The FW really sends the link_id here. Rename it, while leaving a FIXME in iwlmvm. Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20241231135726.a3d07be17fb1.Ib8a623af099b9b0f2b8d552fca546c476a69a82d@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/api/datapath.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit c0cf30bb83a25eb004118686b34e622cac5feb88 Author: Johannes Berg Date: Tue Dec 31 13:59:14 2024 +0200 wifi: iwlwifi: pcie: make iwl_pcie_d3_complete_suspend() static The function is only used in the same file, so it can trivially be static. Do that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241231135726.c09d2251824c.Ibcfbb4bbe27a0767a1da4a5897b2b0f70193dc3d@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 2 -- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) commit d8434525ac488f4ca5da4118727f3daf706cb14f Author: Johannes Berg Date: Tue Dec 31 13:59:13 2024 +0200 wifi: iwlwifi: pcie: make _iwl_trans_pcie_gen2_stop_device() static This function isn't used outside the file it's implemented in, so make it static. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241231135726.060c01653d4e.I3f0675b3977e474b633ff10965fe6512f34ae593@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 1 - drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 44b1c90c91c4f8b9dabaad80cbbeb9a35c47172b Author: Anjaneyulu Date: Tue Dec 31 13:59:12 2024 +0200 wifi: iwlwifi: mvm: remove unused tas_rsp variable optimize local variable usage in iwl_dbgfs_tas_get_status_read(). Signed-off-by: Anjaneyulu Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241231135726.fab845da5c6f.Ica84a4c0df33db9c9b6baef28893bb42e1f367b7@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5111f9d3bfdd551488d2d69ac5ab3570b4629567 Author: Anjaneyulu Date: Tue Dec 31 13:59:11 2024 +0200 wifi: iwlwifi: mvm: handle version 3 GET_TAS_STATUS notification Add a check to ensure only version-3 of GET_TAS_STATUS notification is allowed. Signed-off-by: Anjaneyulu Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241231135726.1d571ac80957.Ia48b1cf5585a2a9f9c461e80f5a0ba2bb16c3af4@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5f4656610edb27c84d9e3378aea9024bf8d723ab Author: Anjaneyulu Date: Tue Dec 31 13:59:10 2024 +0200 wifi: iwlwifi: extend TAS_CONFIG cmd support for v5 Extend TAS_CONFIG to send exact data read from bios to firmware without filtering/altering bios data. This enables driver becoming purely a pipe for TAS features. Signed-off-by: Anjaneyulu Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241231135726.f46d58e7cfd1.Ifd81e632fa3e7039b8d139ee0d1c24e09669dff5@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 46 ++++++----- .../net/wireless/intel/iwlwifi/fw/api/nvm-reg.h | 42 +++++++++- drivers/net/wireless/intel/iwlwifi/fw/regulatory.c | 35 +++++---- drivers/net/wireless/intel/iwlwifi/fw/regulatory.h | 29 ++++--- drivers/net/wireless/intel/iwlwifi/fw/uefi.c | 28 +++---- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 90 ++++++++++++++-------- 6 files changed, 169 insertions(+), 101 deletions(-) commit d1f9e5e9ed1b98e82562632bb12edb52fc23ddf1 Author: Johannes Berg Date: Tue Dec 31 13:59:09 2024 +0200 wifi: iwlwifi: remove Mr/Ms radio This radio never shipped, so we don't need to have it in the code. Remove the configurations and a few lines of code for it. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241231135726.9f984db3efa0.I5a39ec951430e765bdea49ff150dd41af5e911f3@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/cfg/ax210.c | 12 ------------ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 - drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 1 - drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 3 --- 4 files changed, 17 deletions(-) commit 9621358038eae92d8e0b8222bdef0704fcec519a Author: Anjaneyulu Date: Tue Dec 31 13:59:08 2024 +0200 wifi: iwlwifi: add WIKO to PPAG approved list Add WIKO to the list of the OEMs that are allowed to use the PPAG feature Signed-off-by: Anjaneyulu Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241231135726.d2ba5aee512a.I529cfefabd04c64d801895d6a274e3225a952090@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/regulatory.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2a42868d58c15f6819fd5f3c803522190db07184 Author: Johannes Berg Date: Tue Dec 31 13:59:07 2024 +0200 wifi: iwlwifi: mvm: support EMLSR on WH/PE Unlike FM which only supported EMLSR on B-step and later, here it can be supported starting from A-step. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241231135726.65a3b822e002.I4d6f10e02686f1cc159121cf702d6b747cab5b8a@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 5337d4c4e122e01d90741af448abdaf5d142c21c Author: Johannes Berg Date: Tue Dec 31 13:59:06 2024 +0200 wifi: iwlwifi: config: unify fw/pnvm MODULE_FIRMWARE All newer devices now require PNVM files, so don't list them separately but simply generate the relevant MODULE_FIRMWARE() declarations together. This simplifies the code and adds a large number of missing PVNM declarations. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241231135726.302e521e08e9.I782513432d3dcbf801e8262522ded95302548e1c@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/cfg/ax210.c | 38 ++++++------------------- drivers/net/wireless/intel/iwlwifi/cfg/bz.c | 31 +++++--------------- drivers/net/wireless/intel/iwlwifi/cfg/sc.c | 36 ++++++----------------- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 4 +++ 4 files changed, 28 insertions(+), 81 deletions(-) commit 9eca1abfb45d7c7efea1dd61911f5f42711000d9 Author: Johannes Berg Date: Tue Dec 31 13:59:05 2024 +0200 wifi: iwlwifi: mvm: improve/fix chanctx min_def use logic There are two cases in which the min_def isn't used: a) if FILS will be enabled b) if FTM responder is enabled Both of these apply to AP mode only, but for FILS we're not checking that right now. Change the code to iterate the interfaces and links using the channel context, and check for AP mode for both, not just for FTM responder. In the case of iwl_mvm_enable_fils() this might also fix an issue where FILS is enabled for an IBSS network that happens to be started on 6 GHz, though that's not very likely to be possible due to regulatory. However for RX OMI bandwidth reduction the driver needs to use the min_def in client mode as well, in order to actually reduce bandwidth when it requested that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241231135726.7b91025e103d.I4c99c03fd32363d574ab5e34798b6099401f0729@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 5 +-- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 44 ++++++++++++++--------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 13 ++----- 3 files changed, 34 insertions(+), 28 deletions(-) commit 9a2f13c40c635ef1d822cdb67c911ddbf96ada04 Author: Johannes Berg Date: Tue Dec 31 13:59:04 2024 +0200 wifi: iwlwifi: implement reset escalation If the normal reset methods don't work well, attempt to escalate to ever increasing methods. TOP reset will only be available for SC (and presumably higher) devices, and still needs to be filled in. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241231135726.804e005403d8.I9558f09cd68eec16b02373b1e47adafd28fdffa3@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 1 + drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 160 ++++++++++++++++++++---- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 6 + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 8 ++ 4 files changed, 152 insertions(+), 23 deletions(-) commit 9673c35486d4736eb98132bafc8aaf47ccc9933e Author: Johannes Berg Date: Tue Dec 31 13:59:03 2024 +0200 wifi: iwlwifi: implement product reset for TOP errors The TOP is a shared (between BT and WiFi) hardware component, and if it has an error we need to reset the whole device, i.e. both BT and WiFi. This is achieved by calling a specific ACPI DSM (device-specific method) with the right arguments before doing a reset via the object referenced by _PRR. Since this is needed here, but a function reset will always do better than just re-enumerating the bus in case of errors, we can always try to at least do a function reset and do the full product reset only when needed for TOP errors. Also, for some Bz and Sc devices where BT is PCIe/IOSF as well, find the BT device and unbind that device as well so the BT driver can recover from the reset that's going to happen, rather than having to somehow detect that the device was reset. Also add - currently unused - the function reset mode, this is going to get used in the upcoming escalation model. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241231135726.5b0f846d3e13.Ia14ccac38ac3d48adf5f341b17c7e34ccc41c065@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 6 +- drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 33 ++- drivers/net/wireless/intel/iwlwifi/iwl-debug.h | 3 +- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 11 +- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 3 +- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 3 + drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 3 + drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 4 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 261 ++++++++++++++++++++- 9 files changed, 309 insertions(+), 18 deletions(-) commit 61863fab1d30067c7713d08b6273ed53a08da25c Author: Emmanuel Grumbach Date: Tue Dec 31 13:59:02 2024 +0200 wifi: iwlwifi: get the max number of links from the firmware The firmware advertises the maximum number of links. Use it. Signed-off-by: Emmanuel Grumbach Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20241231135726.5eb29510f2b4.I7f35f61987c2ee905960ee476df6803632b0feb8@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/file.h | 1 + drivers/net/wireless/intel/iwlwifi/fw/img.h | 3 ++- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) commit 41fff83fe6cd2ced23d52e18fb13cee9ce2b68ba Author: Johannes Berg Date: Tue Dec 31 13:59:01 2024 +0200 wifi: iwlwifi: pcie: check for WiAMT/CSME presence In order to know whether or not a product reset can safely be done (without risking locking up the system completely), check for ME presence with the known methods. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241231135726.0ac9173f1f37.Id83b80b61548b8f4f01e96a356dafe063543c4ac@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 1 + drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 4 +++ drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 6 ++++ drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 45 ++++++++++++++++++++++++++ 4 files changed, 56 insertions(+) commit 3a0168626c138734490bc52c4105ce8e79d2f923 Author: Kees Cook Date: Mon Dec 30 10:36:14 2024 -0800 wifi: cfg80211: Move cfg80211_scan_req_add_chan() n_channels increment earlier Since adding __counted_by(n_channels) to struct cfg80211_scan_request, anything adding to the channels array must increment n_channels first. Move n_channels increment earlier. Reported-by: John Rowley Closes: https://lore.kernel.org/stable/1815535c709ba9d9.156c6a5c9cdf6e59.b249b6b6a5ee4634@localhost.localdomain/ Fixes: aa4ec06c455d ("wifi: cfg80211: use __counted_by where appropriate") Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Link: https://patch.msgid.link/20241230183610.work.680-kees@kernel.org Signed-off-by: Johannes Berg net/wireless/scan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7553477cbfd784b128297f9ed43751688415bbaa Author: Johannes Berg Date: Mon Dec 30 09:14:07 2024 +0100 wifi: mac80211: prohibit deactivating all links In the internal API this calls this is a WARN_ON, but that should remain since internally we want to know about bugs that may cause this. Prevent deactivating all links in the debugfs write directly. Reported-by: syzbot+0c5d8e65f23569a8ffec@syzkaller.appspotmail.com Fixes: 3d9011029227 ("wifi: mac80211: implement link switching") Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20241230091408.505bd125c35a.Ic3c1f9572b980a952a444cad62b09b9c6721732b@changeid Signed-off-by: Johannes Berg net/mac80211/debugfs_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bf334beb3496da3c3fbf3daf3856f7eec70dacc Author: Qu Wenruo Date: Thu Dec 12 16:43:56 2024 +1030 btrfs: fix double accounting race when extent_writepage_io() failed [BUG] If submit_one_sector() failed inside extent_writepage_io() for sector size < page size cases (e.g. 4K sector size and 64K page size), then we can hit double ordered extent accounting error. This should be very rare, as submit_one_sector() only fails when we failed to grab the extent map, and such extent map should exist inside the memory and has been pinned. [CAUSE] For example we have the following folio layout: 0 4K 32K 48K 60K 64K |//| |//////| |///| Where |///| is the dirty range we need to writeback. The 3 different dirty ranges are submitted for regular COW. Now we hit the following sequence: - submit_one_sector() returned 0 for [0, 4K) - submit_one_sector() returned 0 for [32K, 48K) - submit_one_sector() returned error for [60K, 64K) - btrfs_mark_ordered_io_finished() called for the whole folio This will mark the following ranges as finished: * [0, 4K) * [32K, 48K) Both ranges have their IO already submitted, this cleanup will lead to double accounting. * [60K, 64K) That's the correct cleanup. The only good news is, this error is only theoretical, as the target extent map is always pinned, thus we should directly grab it from memory, other than reading it from the disk. [FIX] Instead of calling btrfs_mark_ordered_io_finished() for the whole folio range, which can touch ranges we should not touch, instead move the error handling inside extent_writepage_io(). So that we can cleanup exact sectors that ought to be submitted but failed. This provides much more accurate cleanup, avoiding the double accounting. CC: stable@vger.kernel.org # 5.15+ Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) commit cef4f1b5ba99a964cd6dd248bb373520573c972f Author: Parthiban Nallathambi Date: Fri Dec 27 16:37:57 2024 +0530 pinctrl: sunxi: add missed lvds pins for a100/a133 lvds, lcd, dsi all shares the same GPIO D bank and lvds0 data 3 lines and lvds1 pins are missed, add them. Signed-off-by: Parthiban Nallathambi Link: https://lore.kernel.org/20241227-a133-display-support-v1-10-13b52f71fb14@linumiz.com Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun50i-a100.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 11cc69abb0b714a11d66421619637a9c98f221e3 Author: Benjamin Berg Date: Wed Jan 1 07:05:38 2025 +0200 wifi: mac80211: tests: add utility to create sdata skeleton Some functions that should be tested may expect an sdata object that is configured to a basic degree. Add setup code to create such an object for use by tests. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.12eeefd3c98b.I6e8c2b8374d4305f16675524ca30621e089b6fb0@changeid Signed-off-by: Johannes Berg net/mac80211/tests/Makefile | 2 +- net/mac80211/tests/util.c | 313 ++++++++++++++++++++++++++++++++++++++++++++ net/mac80211/tests/util.h | 36 +++++ 3 files changed, 350 insertions(+), 1 deletion(-) commit 708d06b33b97329bd499ff92908c96670a94a510 Author: Benjamin Berg Date: Wed Jan 1 07:05:37 2025 +0200 wifi: mac80211: also verify requirements in EXT_SUPP_RATES Parse both the Supported Rates and BSS Membership Selectors as well as the extended version of the tag when verifying whether we support all features. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.f1840f19afa7.I12e3a0e634ce7014f5067256d9a6215fec6bf165@changeid Signed-off-by: Johannes Berg net/mac80211/mlme.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 8ee0b202d0242d6b00cbf4d2f052578475008a36 Author: Benjamin Berg Date: Wed Jan 1 07:05:36 2025 +0200 wifi: mac80211: verify BSS membership selectors and basic rates We should not attempt a connection if the BSS we are connecting to requires support for a basic rate or other feature using the BSS membership selector. Add a check verifying this. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.e58a0f34c798.Ifeb3bfd7b157ffa2ccdb20ca1cba6cf068fd117d@changeid Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 4 + net/mac80211/mlme.c | 193 ++++++++++++++++++++++++++++++--------------- 2 files changed, 132 insertions(+), 65 deletions(-) commit f6d2e5abf154da59ccb3bcac23438f2230c8948a Author: Benjamin Berg Date: Wed Jan 1 07:05:35 2025 +0200 wifi: nl80211: permit userspace to pass supported selectors Currently the SAE_H2E selector already exists, which needs to be implemented by the SME. As new such selectors might be added in the future, add a feature to permit userspace to report a selector as supported. If not given, the kernel should assume that userspace does support SAE_H2E. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.fe67b871cc39.Ieb98390328927e998e612345a58b6dbc00b0e3a2@changeid Signed-off-by: Johannes Berg include/net/cfg80211.h | 12 ++++++++++++ include/uapi/linux/nl80211.h | 9 +++++++++ net/wireless/nl80211.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) commit 931cf025cc721f39d8490f712ead6bde7e42e890 Author: Benjamin Berg Date: Wed Jan 1 07:05:34 2025 +0200 wifi: mac80211: parse BSS selectors and unknown rates Doing so enables further checking whether we are implementing the requested features. Also allow passing in NULL for more parameters as they may not be needed by the caller. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.76433fd3d69f.I94e8718de26ab32282b60ae257b8c6c334b7c528@changeid Signed-off-by: Johannes Berg net/mac80211/mlme.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 98934687f8a871ea2bf90be6590daddd1a130cdd Author: Benjamin Berg Date: Wed Jan 1 07:05:33 2025 +0200 wifi: mac80211: skip all known membership selectors The GLK and EPD Selectors are also not rates, so add a new macro for the minimum value of a selector and test against that instead of the entire list. Also fix the typo in the EPD selector define. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.2c19a2dc53db.If187b7d93d8b43a6c70e422c837b7636538fb358@changeid Signed-off-by: Johannes Berg include/linux/ieee80211.h | 4 +++- net/mac80211/mlme.c | 9 ++------- 2 files changed, 5 insertions(+), 8 deletions(-) commit 2e3de34f5ceebdccd9464e7400986d2131915465 Author: Benjamin Berg Date: Wed Jan 1 07:05:31 2025 +0200 wifi: mac80211: log link information in ieee80211_determine_chan_mode ieee80211_determine_chan_mode is called for each link and if there is a downgrade, then it is interesting to know on which link it happened. Pass through the link_id where relevant and use the new link_id_info macro instead of sdata_info so that the link ID is printed when relevant. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.d400da710fc4.I64775ec914603d3c7b0c6ea14b507c0370c11622@changeid Signed-off-by: Johannes Berg net/mac80211/debug.h | 10 +++++++++- net/mac80211/mlme.c | 30 +++++++++++++++++------------- 2 files changed, 26 insertions(+), 14 deletions(-) commit 29968432874bb03f7dcaea602efb7d00e7c33b0c Author: Benjamin Berg Date: Wed Jan 1 07:05:30 2025 +0200 wifi: mac80211: fix typo in HE MCS check It printed the AP RX MCS value instead of the TX one. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.743c7c1914f4.I1e5888ac6c8324d078fe91d01da31daa76d0e328@changeid Signed-off-by: Johannes Berg net/mac80211/mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c30e9a8558815888e94f9890c9adcad09135ffd4 Author: Benjamin Berg Date: Wed Jan 1 07:05:29 2025 +0200 wifi: mac80211: Remove unused basic_rates variable The basic_rates variable was passed to mesh_sta_info_init as an out parameter even though the result is not used. Passing NULL instead is safe here, so do that. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.23a86a9bad0c.If79bc2c1c98d01cfb4c7e93c18b198fe6c6ea44c@changeid Signed-off-by: Johannes Berg net/mac80211/mesh_plink.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 00e3daadfe1046fae06960d9ff9d0497b35c1e89 Author: Emmanuel Grumbach Date: Wed Jan 1 07:05:28 2025 +0200 wifi: mac80211: improve stop/wake queue tracing Add the refcount. This can be useful when we want to understand why a queue stays stopped after it is woken. Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.bd320c6e6702.I6ae0f19d922aea1f28236d72bf260acac428fc02@changeid Signed-off-by: Johannes Berg net/mac80211/trace.h | 22 ++++++++++++++-------- net/mac80211/util.c | 10 ++++++---- 2 files changed, 20 insertions(+), 12 deletions(-) commit 2bf502251b3ba0734aad81317d62e13389b89a5d Author: Johannes Berg Date: Wed Jan 1 07:05:27 2025 +0200 wifi: cfg80211: check extended MLD capa/ops in assoc Check that additionally extended MLD capa/ops for the MLD is consistent, i.e. the same value is reported by all affiliated APs/links. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.e29f42c7ae21.Ib2cdce608321ad154e4b13103cc315c3e3cb6b2b@changeid Signed-off-by: Johannes Berg include/linux/ieee80211.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ net/wireless/mlme.c | 7 +++++++ 2 files changed, 51 insertions(+) commit 993ace39efd08e8dc29635eca9884adea344401e Author: Johannes Berg Date: Wed Jan 1 07:05:26 2025 +0200 wifi: cfg80211: scan: skip duplicate RNR entries There really shouldn't be duplicate entries when we give the list to the driver, and since we already have a list it's easy to avoid. While at it, remove the unnecessary allocation there. Signed-off-by: Johannes Berg Reviewed-by: Ilan Peer Reviewed-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.b0012c70f503.Id6fcad979434c1437340aa283abae2906345cca1@changeid Signed-off-by: Johannes Berg net/wireless/scan.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 69f9556556b2812e9a63099582306b2b940e704d Author: Johannes Berg Date: Wed Jan 1 07:05:25 2025 +0200 wifi: mac80211: mlme: improve messages from config_bw() The ieee80211_config_bw() function is called in different contexts: during association with the association response and during beacon tracking with the beacon. This can be a bit misleading, so disambiguate the messages for those. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.ee574cf7553b.Ie7c78877d20b5e9de4cce3cf8e4f1b9e0c7ee005@changeid Signed-off-by: Johannes Berg net/mac80211/mlme.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit f52de501d111ae2a90e43ad910d22e0c83a87e94 Author: Johannes Berg Date: Wed Jan 1 07:05:24 2025 +0200 wifi: mac80211: reject per-band vendor elements with MLO The MLME code doesn't currently handle adding vendor elements correctly with multi-link due to element inheritance. Simply prevent that for now completely, if someone needs it we can fix this later. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.bb82d3aaf6ef.Ib30573d0666430a3d7a905e513dfc661edf0bf65@changeid Signed-off-by: Johannes Berg net/mac80211/main.c | 5 +++++ 1 file changed, 5 insertions(+) commit dfd5b5b5b725aa033e88b02adc3980a3fcf361d0 Author: Miri Korenblit Date: Wed Jan 1 07:05:23 2025 +0200 wifi: mac80211: clarify key idx documententaion ieee80211_key_conf::keyidx s in range 0-7, ano not 0-3. Make this clear in the documentation. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20250101070249.4e414710fba7.Ib739c40dd5aa6ed148c3151220eb38d8a9e238de@changeid Signed-off-by: Johannes Berg include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3219371d61694354e4079d244c136e352fab805 Author: Emmanuel Grumbach Date: Wed Jan 1 07:05:22 2025 +0200 wifi: mac80211: remove an unneeded check in Rx Coverity pointed out that __ieee80211_rx_h_amsdu() checks if rx->sta is NULL before dereferencing it but not always. Since rx->sta can't be NULL at this point, just remove the check to avoid confusion Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.033096029d0a.I0923387246a6152f589d278f27f27bce52daee79@changeid Signed-off-by: Johannes Berg net/mac80211/rx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit da7f40c05c16ea35afef41f64a22689b2d974b14 Author: Johannes Berg Date: Wed Jan 1 07:05:21 2025 +0200 wifi: mac80211: add some support for RX OMI power saving In order to save power, it can be desirable to change the RX operating mode using OMI to reduce the bandwidth. As the handshake must be done in the HTC+ field, it cannot be done by mac80211 directly, so expose functions to the driver to request and finalize the necessary updates. Note that RX OMI really only changes what the peer (AP) will transmit to us, but in order to use it to actually save some power (by reducing the listen bandwidth) we also update rate scaling and then the channel context's mindef accordingly. The updates are split into two in order to sequence them correctly, when reducing bandwidth first reduce the rate scaling and thus TX, then send OMI, then reduce the listen bandwidth (chandef); when increasing bandwidth this is the other way around. This also requires tracking in different variables which part is applicable already. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250101070249.2c1a1934bd73.I4e90fd503504e37f9eac5bdae62e3f07e7071275@changeid Signed-off-by: Johannes Berg include/net/mac80211.h | 46 +++++++++++++++++++ net/mac80211/chan.c | 7 +++ net/mac80211/he.c | 119 +++++++++++++++++++++++++++++++++++++++++++++++- net/mac80211/sta_info.c | 18 ++++++++ net/mac80211/sta_info.h | 7 +++ net/mac80211/trace.h | 98 +++++++++++++++++++++++++++++++++++++++ net/mac80211/vht.c | 33 ++++++++++++-- 7 files changed, 323 insertions(+), 5 deletions(-) commit 1b8e2e7fc053b2f6eab7f903b9f4bac6333f0ddc Author: Jilin Yuan Date: Sun Dec 29 16:44:52 2024 +0200 wifi: iwlwifi: fw: fix repeated words in comments Delete the redundant word 'for'. Signed-off-by: Jilin Yuan Link: https://msgid.link/20220709140036.48913-1-yuanjilin@cdjrlc.com Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20241229164246.2981c3b5a40e.I96ebda41f230d453d4bc0afb01ac43011c13a182@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/paging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa4b132a9eb1b41a0fa009ee89f3c013001225d8 Author: Miri Korenblit Date: Sun Dec 29 16:44:51 2024 +0200 wifi: iwlwifi: mvm: Fix duplicated 'the' in comment The double `the' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20241229164246.76502dda646b.I0a1d012eaa1cd8d39430cde981cae8c4cc058442@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5705795641588daebe111720f3886c6493c36e4 Author: Jason Wang Date: Sun Dec 29 16:44:50 2024 +0200 wifi: iwlwifi: mvm: Fix duplicated 'if' in comment The double `if' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Link: https://msgid.link/20220811115958.8423-1-wangborong@cdjrlc.com Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20241229164246.9d8c224e9d4c.Iaacfbd1e9432f31d5d7d037ad925aadbb0d5c4d6@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81a6f4540df9b770078f7189290d281718f11419 Author: Minjie Du Date: Sun Dec 29 16:44:49 2024 +0200 wifi: iwlwifi: Remove a duplicate assignment in iwl_dbgfs_amsdu_len_write() Delete a duplicate statement from this function implementation. Signed-off-by: Minjie Du Link: https://msgid.link/20230705114934.16523-1-duminjie@vivo.com Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20241229164246.b1b0dadc2e9e.Ie57cbe8039b9f388632141447ac910b6fcc3d0c0@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 1 - 1 file changed, 1 deletion(-) commit 88db6449930f0c247ec4324cdf0d8c554e44b442 Author: Miri Korenblit Date: Sun Dec 29 16:44:48 2024 +0200 wifi: iwlwifi: mvm: Use helper function IS_ERR_OR_NULL() Use IS_ERR_OR_NULL() instead of open-coding it to simplify the code. Signed-off-by: Ruan Jinjie Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241229164246.d3423626d981.I3b4cc7f19d1bfecdb2e6a4eba8da1c7a41461115@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/tdls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit eb5940010d3904634241ce6967f5fb1cb1526fc2 Author: shitao Date: Sun Dec 29 16:44:47 2024 +0200 wifi: iwlwifi: Fix spelling typo in comment Fix spelling typo in iwl-context-info.h comment. Reported-by: k2ci Signed-off-by: shitao Link: https://msgid.link/20231212093424.3104329-1-shitao@kylinos.cn Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241229164246.c79c132f811b.Ie07a0007b96359b3552878e23c4b9efeb07bba8d@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/iwl-context-info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42986665305c386d984d59af64781e79c1f8fabc Author: Deming Wang Date: Sun Dec 29 16:44:46 2024 +0200 wifi: iwlwifi: api: remove the double word Remove the duplicate "the". Signed-off-by: Deming Wang Link: https://msgid.link/20240318054853.2352-1-wangdeming@inspur.com Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20241229164246.7b385f337e46.Iae60151e718f344098058b0e4fa6f6c1e43cb414@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/api/tx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ce67f8bf1ce11549c055bd64fa382c511c1af9b Author: Miri Korenblit Date: Sun Dec 29 16:44:45 2024 +0200 wifi: iwlwifi: mvm: fix iwl_ssid_exist() check iwl_ssid_exist() seems to check if a given ssid/ssid_len already exists in a given array ssid_list. Correctly compare the ssid to the SSID of each array element (with a matching SSID length) to better remove duplicates. Signed-off-by: Bjoern A. Zeeb Sponsored by: The FreeBSD Foundation Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Reviewed-by: Daniel Gabay Link: https://patch.msgid.link/20241229164246.4471cd3d8dba.Iab8409b22bf6f01d05571ecef1e97dd3c8b1cc75@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 703f341e9931791634eb2d10941d281ca3928815 Author: Juan José Arboleda Date: Sun Dec 29 16:44:44 2024 +0200 wifi: iwlwifi: mvm: Improve code style in pointer declarations The changes ensure that there is a space between the `u8` type and the `*` character as preferred by the guidelines. This change is purely stylistic and do not affect the functionality of the code. Signed-off-by: Juan José Arboleda Link: https://msgid.link/10b6d4945675cada713e819f7bd6782a66a1c0d2.1724103043.git.soyjuanarbol@gmail.com Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20241229164246.f09a200be4f8.Ia564ae1c59136bd3c2864ccfb3a244b3257dcd5f@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/power.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit daf4574ccafd985eeaf25fb7adf23c71b14ac374 Author: Gan Jie Date: Sun Dec 29 16:44:43 2024 +0200 wifi: iwlwifi: fw: fix typo 'adderss' Fix typo 'adderss' to 'address'. Signed-off-by: Gan Jie Link: https://msgid.link/20241101143052.1531-1-ganjie182@gmail.com Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20241229164246.ad8978ee5673.I388e314a4be8333192b3994f43efa5dbd3ac715d@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/error-dump.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79f4b6934dbd7dd6741726ba004a15e25380b8cc Author: Emmanuel Grumbach Date: Sun Dec 29 16:44:42 2024 +0200 wifi: iwlwifi: mvm: remove unneeded NULL pointer checks Smatch reported that we dereference the data pointer to calculate the expected length before we check it's not NULL. While this is true (and hence needs to be fixed), this will never happen because the data pointer comes from struct iwl_rx_packet object which has the following layout: struct iwl_rx_packet { __le32 len_n_flags; struct iwl_cmd_header hdr; u8 data[]; } __packed; So, if the pointer to iwl_rx_packet is valid, data will be valid as well. Remove the NULL pointer check on 'data' to avoid confusing smatch. Also remove the check from similar functions in the same flow that were cargo cult copy-pasted. Fixes: 4635e6eaa0fe ("wifi: iwlwifi: mvm: support new versions of the wowlan APIs") Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202411210812.0eLaonw3-lkp@intel.com/ Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241229164246.c8ce6e041e4b.I4dc19289e3f3807386768c846e08be3ea322cd15@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 16b2092c4b26ddc266bf23f1d1c46cd032355b69 Author: Johannes Berg Date: Sun Dec 29 16:44:41 2024 +0200 wifi: iwlwifi: mvm: fix AP STA comparison This should be comparing the AP STA, not the deflink firmware STA ID. Correct the implementation so that statistics can be requested for the AP, but not for other stations that may end up with the firmware STA ID matching 0 in the deflink, or so. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241229164246.08b05aca37cf.Iba1a6a637a758691f710dc4f3f03bd1d960fb087@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c734445faf9a3c3cdb42c240e8687d5555d806c Author: Emmanuel Grumbach Date: Sun Dec 29 16:44:39 2024 +0200 wifi: iwlwifi: cleanup unused variable in trans.h Remove unused fields from the transport API. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241229164246.1d04ce18a0ec.Ibfac364163b55b52196d30ff2b43945c5aa804a9@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 4 ---- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 3 --- 2 files changed, 7 deletions(-) commit 76260267ba26a6e513acefa5e7de1200fbeb5b5d Author: Daniel Gabay Date: Sun Dec 29 16:44:38 2024 +0200 wifi: iwlwifi: mvm: don't count mgmt frames as MPDU When handling TX_CMD notification, for mgmt frames tid is equal to IWL_MAX_TID_COUNT, so with the current logic we'll count that as MPDU, fix that. Fixes: ec0d43d26f2c ("wifi: iwlwifi: mvm: Activate EMLSR based on traffic volume") Signed-off-by: Daniel Gabay Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241229164246.80b119bb5d08.I31b1e8ba25cce15819225e5ac80332e4eaa20c13@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 014ca1ac648481e84968ef77874cc10a7660a83e Author: Johannes Berg Date: Sun Dec 29 16:44:37 2024 +0200 wifi: iwlwifi: fw: api: tdls: remove MVM_ from name The API isn't really MVM specific, it's just the firmware API. Remove the "MVM_" from the name here as well, as we've already done in many other places. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241229164246.66e17791c392.I6998e263973c26c1e22b4f470b974a519011b29a@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/api/tdls.h | 8 ++++---- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit cf704a7624f99eb2ffca1a16c69183e85544a613 Author: Miri Korenblit Date: Sun Dec 29 16:44:36 2024 +0200 wifi: iwlwifi: mvm: avoid NULL pointer dereference When iterating over the links of a vif, we need to make sure that the pointer is valid (in other words - that the link exists) before dereferncing it. Use for_each_vif_active_link that also does the check. Fixes: 2b7ee1a10a72 ("wifi: iwlwiif: mvm: handle the new BT notif") Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20241229164246.31d41f7d3eab.I7fb7036a0b187c1636b01970207259cb2327952c@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/coex.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 7e44bd09f7cdb05a669362847c98dc9d3bfa13ab Author: Miri Korenblit Date: Sat Dec 28 22:34:19 2024 +0200 wifi: iwlwifi: bump FW API to 96 for BZ/SC devices Start supporting API version 96 for new devices. Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241228223206.4028b66f4563.I5d5caf4bffeabcab72a69c2b31445e7bee4a94b6@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/cfg/bz.c | 2 +- drivers/net/wireless/intel/iwlwifi/cfg/sc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c866a9852398fe74f3db14154e667fa8eb6da082 Author: Johannes Berg Date: Sat Dec 28 22:34:18 2024 +0200 wifi: iwlwifi: mvm: fix add stream vs. restart race My recent restart related work has made this race more likely to happen and we've now noticed it, but it seems that it was always possible. The race is that the add stream work can be scheduled just before a restart is scheduled and then execute before the restart, accessing the device while it's doing the restart and not accessible. To fix this, check if the device is restarting and abort the work in that case. Reschedule it after the restart as well. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241228223206.9c30af039b4d.I1a32936776f8ba5e83dda0a68ffc2722d9d37950@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 ++++ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit 9e28fcabce7070ab73782dea1452fee871f562a0 Author: Emmanuel Grumbach Date: Sat Dec 28 22:34:17 2024 +0200 wifi: iwlwifi: move fw_dbg_collect to fw debugfs This debugfs hook really belongs to the firmware handling code and then we can use it across different op_modes. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241228223206.d31f5994c6a6.Ibe3bc7a25e2bbf7a575287e19db58833bb3e6b9e@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/debugfs.c | 19 +++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 18 ------------------ 2 files changed, 19 insertions(+), 18 deletions(-) commit 3e0e91e22c29b70f4d61b9655770648c73c23db4 Author: Yedidya Benshimol Date: Sat Dec 28 22:34:16 2024 +0200 wifi: iwlwifi: api: remove version number from latest stored_beacon_notif By convention the newest version of a command/notification structure is named with out the _ver_# suffix. Apply to stored_beacon_notif. Signed-off-by: Yedidya Benshimol Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241228223206.e2140aa3c65b.Ie851bdda6df02dcc352bf765a3ec6bdac45c65a2@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/api/offload.h | 8 ++++---- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 80e96206a3ef348fbd658d98f2f43149c36df8bc Author: Miri Korenblit Date: Sat Dec 28 22:34:15 2024 +0200 wifi: iwlwifi: avoid memory leak A caller of iwl_acpi_get_dsm_object must free the returned object. iwl_acpi_get_dsm_integer returns immediately without freeing it if the expected size is more than 8 bytes. Fix that. Note that with the current code this will never happen, since the caller of iwl_acpi_get_dsm_integer already checks that the expected size if either 1 or 4 bytes, so it can't exceed 8 bytes. While at it, print the DSM value instead of the return value, as this was the intention in the first place. Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241228223206.bf61eaab99f8.Ibdc5df02f885208c222456d42c889c43b7e3b2f7@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit f24501c928a5afc60ef4a13e7b8fd4d2bcd6acb4 Author: Miri Korenblit Date: Sat Dec 28 22:34:14 2024 +0200 wifi: iwlwifi: mark that we support TX_CMD_API_S_VER_10 Usually each struct that represent an API needs to have a comment specifying all the versions of the API that this struct corresponds to. iwl_tx_cmd_gen3 was long supporting also version 10. Say that. Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20241228223206.83d681dc9cf7.I355270fb20b23978d9402cb70caf52a0108b8cd4@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/api/tx.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a2ba52b3a933ec97fde22ac6e50313e24177c832 Author: Somashekhar(Som) Date: Sat Dec 28 22:34:12 2024 +0200 wifi: iwlwifi: add channel_load_not_by_us in iwl_mvm_phy_ctxt Adding channel_load_not_by_us in the mvm phy context. Signed-off-by: Somashekhar(Som) Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241228223206.7c7f3ebebadf.Ifac005cf1e3b02cba0861eb19bfd8099957faad9@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 2 ++ 2 files changed, 3 insertions(+) commit 049412e7329653048a617d5a879ef118b9181130 Author: Somashekhar(Som) Date: Sat Dec 28 22:34:11 2024 +0200 wifi: iwlwifi: add mapping of prph register crf for PE RF In blank OTP, we get the CRF type from a peripheral register, support it for PE CRF Signed-off-by: Somashekhar(Som) Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241228223206.a8899d585a6e.I9d9b223c75d5370811220291c62c364967c0acc3@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 1 + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 3 +++ 2 files changed, 4 insertions(+) commit 20eccf4ac9c7679d9682662a2d11360cd9ddba9c Author: Somashekhar(Som) Date: Sat Dec 28 22:34:10 2024 +0200 wifi: iwlwifi: Allow entering EMLSR for more band combinations Enter EMLSR only when two bands are different. EMLSR should be allowed when one of the link is LB. Signed-off-by: Somashekhar(Som) Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241228223206.ec659168eeb7.I403f61f0e827c14cf2b245f48e1736559f17c476@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/link.c | 5 ++--- drivers/net/wireless/intel/iwlwifi/mvm/tests/links.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) commit 5f36bb50d29e941d129a5cf1ab0e2c25e6607286 Author: Johannes Berg Date: Sat Dec 28 22:34:09 2024 +0200 wifi: iwlwifi: iwl-drv: refactor image loading a bit Refactor some parts of the image loading to be able to extend the code for external FSEQ image loading more easily. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241228223206.224ac6599bbe.Iadc1974d633eec09797522f7d3fa543ea18bd7f6@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 78 ++++++++++++---------------- 1 file changed, 33 insertions(+), 45 deletions(-) commit 4c83e41c3f842ea6849dd3f902df23764f9e3340 Author: Daniel Gabay Date: Sat Dec 28 22:34:08 2024 +0200 wifi: iwlwifi: Remove MVM prefix from TX API macros These are not mvm specific. Signed-off-by: Daniel Gabay Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241228223206.1b235ec5354e.If99a38b1f0d7e42ea4ee3907e6c395846c4aa9b0@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/api/tx.h | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit ee3f2566c85df025e8f5bdfcae503a727342a767 Author: Johannes Berg Date: Sat Dec 28 22:34:07 2024 +0200 wifi: iwlwifi: rename bits in config/boot control register The register 0x000 is now really boot control, and some of the old bit names were (even for old hardware) not reflecting the names on the hardware side; rename them in the driver to align the naming. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241228223206.6f25be160619.I3ffc9601e99dc414a9ae54a0d90c9d20c0253da5@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/dvm/eeprom.c | 8 ++++---- drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 15 ++++++++------- drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 6 +++--- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 18 +++++++++--------- 4 files changed, 24 insertions(+), 23 deletions(-) commit 1dde1f316d476e863cbd74ccecd6301fe6d9b37e Author: Emmanuel Grumbach Date: Sat Dec 28 22:34:06 2024 +0200 wifi: iwlwifi: move fw_ver debugfs to firmware runtime This is really where it belongs. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241228223206.98bdc5e62828.Iee7a8365dd63ebf580d324f90e1e04466d8ef5d5@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/debugfs.c | 23 ++++++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 32 ------------------------ 2 files changed, 22 insertions(+), 33 deletions(-) commit 5970442592aae455eb45d7e099b9dcfdb88d4c1b Author: Miri Korenblit Date: Sat Dec 28 22:34:05 2024 +0200 wifi: iwlwifi: mld: make iwl_mvm_find_ie_offset a iwlwifi util This is needed also for more opmodes, and is really not opmode dependent. Make it a iwlwifi util. Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20241228223206.a36373eefbf2.Ib1f305b78508c98934f6000720d6455c88a860cb@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/iwl-utils.h | 20 ++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 7 ++-- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 48 ++++++++--------------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 - 4 files changed, 40 insertions(+), 36 deletions(-) commit 0f28cc081f0e49c7bf749828313b3c73cf13d6c1 Author: Johannes Berg Date: Fri Dec 27 10:01:12 2024 +0200 wifi: iwlwifi: iwl_fw_error_collect() is always called sync Since iwl_fw_error_collect() is now always called with the sync argument set to true, to collect data synchronously, remove the argument from it entirely. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.08f515513e88.I780a557743ca7f029f46a1cc75d0799542e39d83@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 7391b2a4f7dbb7be7dd763bc87506c10f570a8d3 Author: Johannes Berg Date: Fri Dec 27 10:01:11 2024 +0200 wifi: iwlwifi: rework firmware error handling In order to later add the ability to do deeper resets of the device when it crashes, first restructure the firmware error handling. Instead of having just a single nic_error() method that handles all, split it: - nic_error() just handles and prints the error itself, - dump_error() synchronously creates an error dump, and - sw_reset() will be called to request doing a SW reset. This changes the architecture so that the transport is now responsible for deciding how to do the reset, and therefore the handling of reprobe if error occurs during reconfig moves there, which necessitates adding a method there that notifies the transport that the recovery was completed. Actually introducing the model under which deeper resets can be done will be in future patches. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.6d4f741ae907.I96a9243e7877808ed6d1bff6967c15d6c24882f0@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c | 11 ++ drivers/net/wireless/intel/iwlwifi/dvm/main.c | 27 ++-- drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h | 53 +++++++- drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 109 +++++++++++++++- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 56 +++++++- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 143 ++++++++------------- .../net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 11 +- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 1 + drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 1 + 10 files changed, 312 insertions(+), 101 deletions(-) commit 2d15d213e3d83108f1e29a80b230f9adb8b6e0c9 Author: Johannes Berg Date: Fri Dec 27 10:01:10 2024 +0200 wifi: iwlwifi: mvm: restart device through NMI When some channel context manipulations fail, the device is going to be restarted to try to recover. Make this go through a real FW restart via an NMI so the transport is aware of it and can later handle escalation, and to make it easier to restructure the code later. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.96b732029d20.I2e729f402db58a76cea620b6f62a02da49a10b48@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) commit 14eef4e2355920eea8c20424f9260a266f81f650 Author: Johannes Berg Date: Fri Dec 27 10:01:09 2024 +0200 wifi: iwlwifi: unify cmd_queue_full() into nic_error() Except for some special handling in DVM, error dump and some message behaviour, cmd_queue_full and nic_error are equivalent now. Unify by giving a special error type, so DVM can continue to differentiate. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.0222183504aa.Ie29cef75fbd91b64a43619bc36bd5b29c5b9f957@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/dvm/main.c | 22 +++++++++------------- drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h | 10 ++-------- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 17 +++++------------ drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 3 ++- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 3 ++- 5 files changed, 20 insertions(+), 35 deletions(-) commit 99baaf924a30b240622a42fdab0fff3ffa8138cc Author: Johannes Berg Date: Fri Dec 27 10:01:08 2024 +0200 wifi: iwlwifi: mvm: clean up FW restart a bit Approximately three years ago, in commit ddb6b76b6f96 ("iwlwifi: yoyo: support TLV-based firmware reset"), the code was (likely erroneously) changed to no longer treat error interrupts as firmware errors. As a result, this meant that the fw_restart counter was only applied in case of command queue being stuck, which never seems to happen. Also, there's no longer any way to set the mvm->fw_restart to a value that doesn't match exactly the module parameter behaviour. Instead of trying to fix this, simply remove the logic that limits the number of restarts, it's clearly unused. However, restore the logic that restart isn't unconditional, by checking the module parameter. Since the "fw_error" argument to iwl_mvm_nic_restart() is now always true (except in the "never happens" case of CMD queue stuck), just remove it too and treat command queue stuck the same way as everything else. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.b0489daf323c.I0cd3233b2214c5f06e059f746041b19d08647e40@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 7 ------- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 4 ---- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 4 +--- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 19 ++++++++----------- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 4 ++-- 6 files changed, 13 insertions(+), 29 deletions(-) commit 7ad788afe1435acb46c4e323709e0ca816913e8b Author: Johannes Berg Date: Fri Dec 27 10:01:07 2024 +0200 wifi: iwlwifi: mvm: remove STARTING state Now that the retry loop only happens when timeouts occur and firmware errors are different, we no longer need the STARTING state with all the infrastructure for it. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.c55d73436521.I08e9f6a71d56f86872bca4d4e3048faa113a7120@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 9 +-------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 --- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 3 --- 3 files changed, 1 insertion(+), 14 deletions(-) commit 98b724d9f305d74408c3516279a901a8b054d085 Author: Johannes Berg Date: Fri Dec 27 10:01:06 2024 +0200 wifi: iwlwifi: mvm: restrict MAC start retry to timeouts We had reverted the retry loop removal because of an issue with PNVM loading, but that issue manifests as timeouts. Since the retries aren't needed in other cases, only do them when there were timeouts while starting, not other errors. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.98201c79f66d.I5d7e12b219d533c6a77741ec5863984d35711f48@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29ce03e6d2d3de1c79fa83552e2282d7e9d37694 Author: Johannes Berg Date: Fri Dec 27 10:01:05 2024 +0200 wifi: iwlwifi: restrict driver retry loops to timeouts We had reverted the retry loop removal because of an issue with PNVM loading, but that issue manifests as timeouts. Since the retry loops aren't needed in other cases, only do them when there were timeouts while loading, not other errors. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.a21bf40b0fd3.I70166e460906d6d183359889d7543b9c587b7182@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8b0fc79f9e5b49a1ab27b53edc64d9ffbceeb312 Author: Johannes Berg Date: Fri Dec 27 10:01:04 2024 +0200 wifi: iwlwifi: return ERR_PTR from opmode start() In order to restrict the retry loops for timeouts, first pass the error code up using ERR_PTR(). This of course requires all existing functions to be updated accordingly. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.3fe5031d5784.I7307996c91dac69619ff9c616b8a077423fac19f@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/dvm/main.c | 34 +++++++++++++++++---------- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 24 +++++++++++++------ 3 files changed, 40 insertions(+), 20 deletions(-) commit 8c4c0485de3453c2dc27a0e1c84890afee1c4527 Author: Johannes Berg Date: Fri Dec 27 10:01:03 2024 +0200 wifi: iwlwifi: context-info: add kernel-doc markers These comments have kernel-doc markup and were meant to be handled as such, add the right /** marker to them. Add missing entries where needed. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.c5c04b641479.I702b8122d307a0d9d09df038cda10be063f7f2d7@changeid Signed-off-by: Johannes Berg .../wireless/intel/iwlwifi/iwl-context-info-gen3.h | 25 ++++++++++-------- .../net/wireless/intel/iwlwifi/iwl-context-info.h | 30 ++++++++++++++-------- 2 files changed, 34 insertions(+), 21 deletions(-) commit 7d89d78039c76cae77edb62c10b44932b984031b Author: Somashekhar(Som) Date: Fri Dec 27 10:01:02 2024 +0200 wifi: iwlwifi: interpret STEP URM BIOS configuration For certain platforms, it may necessary to use the STEP in URM (ultra reliable mode.) Read the necessary flags from the BIOS (ACPI or UEFI) and indicate the chosen mode to the firmware in the context info. Whether or not URM really was configured is already read back later, to adjust capabilities accordingly. Signed-off-by: Somashekhar(Som) Signed-off-by: Johannes Berg Reviewed-by: Daniel Gabay Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.b30024905de3.If3c578af2c15f8005bbe71499bc4091348ed7bb0@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 34 ++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 16 ++++++++++ drivers/net/wireless/intel/iwlwifi/fw/regulatory.c | 1 + drivers/net/wireless/intel/iwlwifi/fw/regulatory.h | 23 +++++++++++++++ drivers/net/wireless/intel/iwlwifi/fw/uefi.c | 26 +++++++++++++++++ drivers/net/wireless/intel/iwlwifi/fw/uefi.h | 23 +++++++++++++++ .../wireless/intel/iwlwifi/iwl-context-info-gen3.h | 15 ++++++++-- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 5 ++++ drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 + .../wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c | 8 +++++ 10 files changed, 150 insertions(+), 2 deletions(-) commit 80c2b651fe7fc82e1d1b3e4f9651095896a095f0 Author: Johannes Berg Date: Fri Dec 27 10:01:01 2024 +0200 wifi: iwlwifi: fw: read STEP table from correct UEFI var This variable exists for the "common" (WiFi/BT) GUID, not the WiFi-only GUID. Fix that by passing the GUID to the function. A short-cut for the wifi-only version remains so not all code must be updated. However, rename the GUID defines to be clearer. Fixes: 09b4c35d73a5 ("wifi: iwlwifi: mvm: Support STEP equalizer settings from BIOS.") Signed-off-by: Johannes Berg Reviewed-by: Daniel Gabay Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.89a5ad921b6d.Idae95a70ff69d2ba1b610e8eced826961ce7de98@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/uefi.c | 44 +++++++++++++++++++--------- 1 file changed, 30 insertions(+), 14 deletions(-) commit 72dad8e377afa50435940adfb697e070d3556670 Author: Qu Wenruo Date: Thu Dec 12 16:43:55 2024 +1030 btrfs: fix double accounting race when btrfs_run_delalloc_range() failed [BUG] When running btrfs with block size (4K) smaller than page size (64K, aarch64), there is a very high chance to crash the kernel at generic/750, with the following messages: (before the call traces, there are 3 extra debug messages added) BTRFS warning (device dm-3): read-write for sector size 4096 with page size 65536 is experimental BTRFS info (device dm-3): checking UUID tree hrtimer: interrupt took 5451385 ns BTRFS error (device dm-3): cow_file_range failed, root=4957 inode=257 start=1605632 len=69632: -28 BTRFS error (device dm-3): run_delalloc_nocow failed, root=4957 inode=257 start=1605632 len=69632: -28 BTRFS error (device dm-3): failed to run delalloc range, root=4957 ino=257 folio=1572864 submit_bitmap=8-15 start=1605632 len=69632: -28 ------------[ cut here ]------------ WARNING: CPU: 2 PID: 3020984 at ordered-data.c:360 can_finish_ordered_extent+0x370/0x3b8 [btrfs] CPU: 2 UID: 0 PID: 3020984 Comm: kworker/u24:1 Tainted: G OE 6.13.0-rc1-custom+ #89 Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE Hardware name: QEMU KVM Virtual Machine, BIOS unknown 2/2/2022 Workqueue: events_unbound btrfs_async_reclaim_data_space [btrfs] pc : can_finish_ordered_extent+0x370/0x3b8 [btrfs] lr : can_finish_ordered_extent+0x1ec/0x3b8 [btrfs] Call trace: can_finish_ordered_extent+0x370/0x3b8 [btrfs] (P) can_finish_ordered_extent+0x1ec/0x3b8 [btrfs] (L) btrfs_mark_ordered_io_finished+0x130/0x2b8 [btrfs] extent_writepage+0x10c/0x3b8 [btrfs] extent_write_cache_pages+0x21c/0x4e8 [btrfs] btrfs_writepages+0x94/0x160 [btrfs] do_writepages+0x74/0x190 filemap_fdatawrite_wbc+0x74/0xa0 start_delalloc_inodes+0x17c/0x3b0 [btrfs] btrfs_start_delalloc_roots+0x17c/0x288 [btrfs] shrink_delalloc+0x11c/0x280 [btrfs] flush_space+0x288/0x328 [btrfs] btrfs_async_reclaim_data_space+0x180/0x228 [btrfs] process_one_work+0x228/0x680 worker_thread+0x1bc/0x360 kthread+0x100/0x118 ret_from_fork+0x10/0x20 ---[ end trace 0000000000000000 ]--- BTRFS critical (device dm-3): bad ordered extent accounting, root=4957 ino=257 OE offset=1605632 OE len=16384 to_dec=16384 left=0 BTRFS critical (device dm-3): bad ordered extent accounting, root=4957 ino=257 OE offset=1622016 OE len=12288 to_dec=12288 left=0 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 BTRFS critical (device dm-3): bad ordered extent accounting, root=4957 ino=257 OE offset=1634304 OE len=8192 to_dec=4096 left=0 CPU: 1 UID: 0 PID: 3286940 Comm: kworker/u24:3 Tainted: G W OE 6.13.0-rc1-custom+ #89 Hardware name: QEMU KVM Virtual Machine, BIOS unknown 2/2/2022 Workqueue: btrfs_work_helper [btrfs] (btrfs-endio-write) pstate: 404000c5 (nZcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : process_one_work+0x110/0x680 lr : worker_thread+0x1bc/0x360 Call trace: process_one_work+0x110/0x680 (P) worker_thread+0x1bc/0x360 (L) worker_thread+0x1bc/0x360 kthread+0x100/0x118 ret_from_fork+0x10/0x20 Code: f84086a1 f9000fe1 53041c21 b9003361 (f9400661) ---[ end trace 0000000000000000 ]--- Kernel panic - not syncing: Oops: Fatal exception SMP: stopping secondary CPUs SMP: failed to stop secondary CPUs 2-3 Dumping ftrace buffer: (ftrace buffer empty) Kernel Offset: 0x275bb9540000 from 0xffff800080000000 PHYS_OFFSET: 0xffff8fbba0000000 CPU features: 0x100,00000070,00801250,8201720b [CAUSE] The above warning is triggered immediately after the delalloc range failure, this happens in the following sequence: - Range [1568K, 1636K) is dirty 1536K 1568K 1600K 1636K 1664K | |/////////|////////| | Where 1536K, 1600K and 1664K are page boundaries (64K page size) - Enter extent_writepage() for page 1536K - Enter run_delalloc_nocow() with locked page 1536K and range [1568K, 1636K) This is due to the inode having preallocated extents. - Enter cow_file_range() with locked page 1536K and range [1568K, 1636K) - btrfs_reserve_extent() only reserved two extents The main loop of cow_file_range() only reserved two data extents, Now we have: 1536K 1568K 1600K 1636K 1664K | |<-->|<--->|/|///////| | 1584K 1596K Range [1568K, 1596K) has an ordered extent reserved. - btrfs_reserve_extent() failed inside cow_file_range() for file offset 1596K This is already a bug in our space reservation code, but for now let's focus on the error handling path. Now cow_file_range() returned -ENOSPC. - btrfs_run_delalloc_range() do error cleanup <<< ROOT CAUSE Call btrfs_cleanup_ordered_extents() with locked folio 1536K and range [1568K, 1636K) Function btrfs_cleanup_ordered_extents() normally needs to skip the ranges inside the folio, as it will normally be cleaned up by extent_writepage(). Such split error handling is already problematic in the first place. What's worse is the folio range skipping itself, which is not taking subpage cases into consideration at all, it will only skip the range if the page start >= the range start. In our case, the page start < the range start, since for subpage cases we can have delalloc ranges inside the folio but not covering the folio. So it doesn't skip the page range at all. This means all the ordered extents, both [1568K, 1584K) and [1584K, 1596K) will be marked as IOERR. And these two ordered extents have no more pending ios, they are marked finished, and *QUEUED* to be deleted from the io tree. - extent_writepage() do error cleanup Call btrfs_mark_ordered_io_finished() for the range [1536K, 1600K). Although ranges [1568K, 1584K) and [1584K, 1596K) are finished, the deletion from io tree is async, it may or may not happen at this time. If the ranges have not yet been removed, we will do double cleaning on those ranges, triggering the above ordered extent warnings. In theory there are other bugs, like the cleanup in extent_writepage() can cause double accounting on ranges that are submitted asynchronously (compression for example). But that's much harder to trigger because normally we do not mix regular and compression delalloc ranges. [FIX] The folio range split is already buggy and not subpage compatible, it was introduced a long time ago where subpage support was not even considered. So instead of splitting the ordered extents cleanup into the folio range and out of folio range, do all the cleanup inside writepage_delalloc(). - Pass @NULL as locked_folio for btrfs_cleanup_ordered_extents() in btrfs_run_delalloc_range() - Skip the btrfs_cleanup_ordered_extents() if writepage_delalloc() failed So all ordered extents are only cleaned up by btrfs_run_delalloc_range(). - Handle the ranges that already have ordered extents allocated If part of the folio already has ordered extent allocated, and btrfs_run_delalloc_range() failed, we also need to cleanup that range. Now we have a concentrated error handling for ordered extents during btrfs_run_delalloc_range(). Fixes: d1051d6ebf8e ("btrfs: Fix error handling in btrfs_cleanup_ordered_extents") CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 59 ++++++++++++++++++++++++++++++++++++++++++---------- fs/btrfs/inode.c | 3 +-- 2 files changed, 49 insertions(+), 13 deletions(-) commit 365865b7d7467aea9767ea18670198921bcada7c Author: Kuninori Morimoto Date: Mon Jan 6 05:49:49 2025 +0000 ASoC: audio-graph-card2: Use extra format on each DAI Current ASoC is using dai_link->dai_fmt to set DAI format for both CPU/Codec. But because it is using same settings, and SND_SOC_DAIFMT_CLOCK_PROVIDER is flipped for CPU, we can't set both CPU/Codec as clock consumer, for example. To solve this issue, this patch uses extra format for each DAI which can keep compatibility with legacy system, 1. SND_SOC_DAIFMT_FORMAT_MASK 2. SND_SOC_DAIFMT_CLOCK 3. SND_SOC_DAIFMT_INV 4. SND_SOC_DAIFMT_CLOCK_PROVIDER Legacy dai_fmt includes 1, 2, 3, 4 New idea dai_fmt includes 1, 2, 3 ext_fmt includes 4 Signed-off-by: Kuninori Morimoto Tested-by: Stephen Gordon Link: https://patch.msgid.link/87pll0o5j6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card2.c | 76 ++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 32 deletions(-) commit 24410f499e808884cc91239dc16013e5bee8779a Author: Kuninori Morimoto Date: Mon Jan 6 05:49:45 2025 +0000 ASoC: soc-core: Enable to use extra format on each DAI Current ASoC is using dai_link->dai_fmt to set DAI format for both CPU/Codec. But because it is using same settings, and SND_SOC_DAIFMT_CLOCK_PROVIDER is flipped for CPU, we can't set both CPU/Codec as clock consumer, for example. To solve this issue, this patch enable to use extra format for each DAI which can keep compatibility with legacy system, 1. SND_SOC_DAIFMT_FORMAT_MASK 2. SND_SOC_DAIFMT_CLOCK 3. SND_SOC_DAIFMT_INV 4. SND_SOC_DAIFMT_CLOCK_PROVIDER Legacy dai_fmt includes 1, 2, 3, 4 New idea dai_fmt includes 1, 2, 3 ext_fmt includes 4 Signed-off-by: Kuninori Morimoto Tested-by: Stephen Gordon Link: https://patch.msgid.link/87r05go5ja.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown include/sound/soc.h | 11 +++++++++++ sound/soc/soc-core.c | 27 +++++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) commit 85dc053c87bcc32afd8e5cbf20a649dc24e93d24 Author: Kuninori Morimoto Date: Mon Jan 6 05:49:41 2025 +0000 ASoC: audio-graph-card2: use of_graph_get_port_by_id() at graph_get_next_multi_ep() Audio Graph Card2 is assuming "port" are necessarily in order, but there is no guarantee in case of overlay. Use of_graph_get_port_by_id() instead to handle it correctly. Signed-off-by: Kuninori Morimoto Tested-by: Stephen Gordon Link: https://patch.msgid.link/87sepwo5jf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card2.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit c8903242bcb119660232c9cbf336fea3737d1a60 Author: Kuninori Morimoto Date: Mon Jan 6 05:49:33 2025 +0000 ASoC: soc-core: return 0 if np was NULL on snd_soc_daifmt_parse_clock_provider_raw() snd_soc_daifmt_parse_clock_provider_raw() might be called with NULL np. Return 0 in such case. Signed-off-by: Kuninori Morimoto Tested-by: Stephen Gordon Link: https://patch.msgid.link/87ttaco5jm.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/soc-core.c | 3 +++ 1 file changed, 3 insertions(+) commit 2518a0e1b878042f9afa45ae063e544a16efc1a3 Author: Kuninori Morimoto Date: Mon Jan 6 05:49:28 2025 +0000 ASoC: simple-card: use __free(device_node) for device node simple-card handles many type of device_node, thus need to use of_node_put() in many place. Let's use __free(device_node) and avoid it. Signed-off-by: Kuninori Morimoto Tested-by: Stephen Gordon Link: https://patch.msgid.link/87v7uso5js.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 58 ++++++++++++----------------------------- 1 file changed, 17 insertions(+), 41 deletions(-) commit c8a1dccf449eb71b23b6c04ff6b40db568d7cf92 Author: Kuninori Morimoto Date: Mon Jan 6 05:49:18 2025 +0000 ASoC: audio-graph-card: use __free(device_node) for device node audio-graph-card handles many type of device_node, thus need to use of_node_put() in many place. Let's use __free(device_node) and avoid it. Signed-off-by: Kuninori Morimoto Tested-by: Stephen Gordon Link: https://patch.msgid.link/87wmf8o5k1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card.c | 48 +++++++++++------------------------- 1 file changed, 14 insertions(+), 34 deletions(-) commit 5f281c3e82b1203c40cf6ead009ffb5b09db056b Author: Kuninori Morimoto Date: Mon Jan 6 05:49:07 2025 +0000 ASoC: audio-graph-card2: use __free(device_node) for device node audio-graph-card2 handles many type of device_node, thus need to use of_node_put() in many place. Let's use __free(device_node) and avoid it. Signed-off-by: Kuninori Morimoto Tested-by: Stephen Gordon Link: https://patch.msgid.link/87y0zoo5kc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card2.c | 173 +++++++++++----------------------- 1 file changed, 54 insertions(+), 119 deletions(-) commit d5a4d7f10fcdcae952f7d5c603c61795c0abb7a7 Author: Maxim Kochetkov Date: Thu Dec 19 07:22:27 2024 +0300 ASoC: codecs: nau8824: fix max volume for Speaker output There is no audio output if Speaker volume is set above 25. According to datasheet Rev 2.5 maximum allowed value for the Speaker output is 0b11001 (25) 0x6D CLASSD_GAIN_1/ 0x6E CLASSD_GAIN_2: Left/Right Channel Class-D Driver Gain For DAC Left/Right Input (Step size is 1dB.) 00000 = Mute (DEFAULT) 00001 = 0dB 00002 = 1dB ... 11000 = 23dB 11001 = 24dB So adjust this value in accordance with the datasheet. Signed-off-by: Maxim Kochetkov Link: https://patch.msgid.link/20241219042227.7075-1-fido_max@inbox.ru Signed-off-by: Mark Brown sound/soc/codecs/nau8824.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9752b55035b161e40220b9ec8fae6e363a601996 Merge: afd69d5c4a10 4a324970faba Author: Jens Axboe Date: Mon Jan 13 07:12:15 2025 -0700 Merge tag 'nvme-6.14-2025-01-12' of git://git.infradead.org/nvme into for-6.14/block Pull NVMe updates from Keith: "nvme updates for Linux 6.14 - Target support for PCI-Endpoint transport (Damien) - TCP IO queue spreading fixes (Sagi, Chaitanya) - Target handling for "limited retry" flags (Guixen) - Poll type fix (Yongsoo) - Xarray storage error handling (Keisuke) - Host memory buffer free size fix on error (Francis)" * tag 'nvme-6.14-2025-01-12' of git://git.infradead.org/nvme: (25 commits) nvme-pci: use correct size to free the hmb buffer nvme: Add error path for xa_store in nvme_init_effects nvme-pci: fix comment typo Documentation: Document the NVMe PCI endpoint target driver nvmet: New NVMe PCI endpoint function target driver nvmet: Implement arbitration feature support nvmet: Implement interrupt config feature support nvmet: Implement interrupt coalescing feature support nvmet: Implement host identifier set feature support nvmet: Introduce get/set_feature controller operations nvmet: Do not require SGL for PCI target controller commands nvmet: Add support for I/O queue management admin commands nvmet: Introduce nvmet_sq_create() and nvmet_cq_create() nvmet: Introduce nvmet_req_transfer_len() nvmet: Improve nvmet_alloc_ctrl() interface and implementation nvme: Add PCI transport type nvmet: Add drvdata field to struct nvmet_ctrl nvmet: Introduce nvmet_get_cmd_effects_admin() nvmet: Export nvmet_update_cc() and nvmet_cc_xxx() helpers nvmet: Add vendor_id and subsys_vendor_id subsystem attributes ... commit 9d9b72472631262b35157f1a650f066c0e11c2bb Author: Mirsad Todorovac Date: Tue Dec 17 23:58:12 2024 +0100 xfs/libxfs: replace kmalloc() and memcpy() with kmemdup() The source static analysis tool gave the following advice: ./fs/xfs/libxfs/xfs_dir2.c:382:15-22: WARNING opportunity for kmemdup → 382 args->value = kmalloc(len, 383 GFP_KERNEL | __GFP_NOLOCKDEP | __GFP_RETRY_MAYFAIL); 384 if (!args->value) 385 return -ENOMEM; 386 → 387 memcpy(args->value, name, len); 388 args->valuelen = len; 389 return -EEXIST; Replacing kmalloc() + memcpy() with kmemdump() doesn't change semantics. Original code works without fault, so this is not a bug fix but proposed improvement. Link: https://lwn.net/Articles/198928/ Fixes: 94a69db2367ef ("xfs: use __GFP_NOLOCKDEP instead of GFP_NOFS") Fixes: 384f3ced07efd ("[XFS] Return case-insensitive match for dentry cache") Fixes: 2451337dd0439 ("xfs: global error sign conversion") Cc: Carlos Maiolino Cc: Darrick J. Wong Cc: Chandan Babu R Cc: Dave Chinner Cc: linux-xfs@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: "Darrick J. Wong" Signed-off-by: Mirsad Todorovac Signed-off-by: Carlos Maiolino fs/xfs/libxfs/xfs_dir2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 183d988ae9e7ada9d7d4333e2289256e74a5ab5b Author: Christoph Hellwig Date: Mon Jan 13 05:31:20 2025 +0100 xfs: constify feature checks They will eventually be needed to be const for zoned growfs, but even now having such simpler helpers as const as possible is a good thing. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino fs/xfs/libxfs/xfs_rtgroup.c | 2 +- fs/xfs/scrub/scrub.h | 2 +- fs/xfs/xfs_mount.h | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) commit dd324cb79e54d3a61621f09c346ee050315a4d2e Author: Christoph Hellwig Date: Mon Jan 13 05:32:59 2025 +0100 xfs: refactor xfs_fs_statfs Split out helpers for data, rt data and inode related information, and assigning f_bavail once instead of in three places. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino fs/xfs/xfs_qm_bhv.c | 1 - fs/xfs/xfs_super.c | 132 +++++++++++++++++++++++++++++++--------------------- 2 files changed, 78 insertions(+), 55 deletions(-) commit 72843ca62417a0587ca98791b172e4c3b3f8d3a8 Author: Christoph Hellwig Date: Mon Jan 13 05:32:58 2025 +0100 xfs: don't take m_sb_lock in xfs_fs_statfs The only non-constant value read under m_sb_lock in xfs_fs_statfs is sb_dblocks, and it could become stale right after dropping the lock anyway. Remove the thus pointless lock section. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino fs/xfs/xfs_super.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f4752daf472b52a376f38243436c67b188a5eddf Author: Christoph Hellwig Date: Mon Jan 13 05:26:26 2025 +0100 xfs: fix the comment above xfs_discard_endio pagb_lock has been replaced with eb_lock. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino fs/xfs/xfs_discard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09f7680dea8760d48dd5b8b5288a388fec122275 Author: Long Li Date: Mon Dec 23 19:45:11 2024 +0800 xfs: remove bp->b_error check in xfs_attr3_root_inactive The b_error check right after xfs_trans_get_buf() is redundant: 1) If the buffer is found in transaction via xfs_trans_buf_item_match(), any corrupted metadata error would have already been exposed during previous reads like xfs_da3_node_read(). 2) If the buffer is obtained via xfs_buf_get_map(): - It's called without XBF_READ flag, so won't return buffer with b_error set, since xfs_buf_get_map() will clear it anyway. - Buffer found in cache normally won't have error since previous reads had checked it, unless someone corrupts the buffer and the AIL pushes it out to disk while the buffer's unlocked. But in this case, AIL will shut down the log. Remove this redundant check to simplify the code, make the code consistent with most other xfs_trans_get_buf() callers in XFS. Signed-off-by: Long Li Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino fs/xfs/xfs_attr_inactive.c | 5 ----- 1 file changed, 5 deletions(-) commit adcaff355bd8abb9b5097cc72339fb9cbf2eefda Author: Long Li Date: Mon Dec 23 19:45:10 2024 +0800 xfs: remove redundant update for ticket->t_curr_res in xfs_log_ticket_regrant The current reservation of the log ticket has already been updated a few lines above in xfs_log_ticket_regrant(), so there is no need to update it again. This is just a code cleanup with no functional changes. Signed-off-by: Long Li Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino fs/xfs/xfs_log.c | 2 -- 1 file changed, 2 deletions(-) commit 99fc33d16b2405cbc753fd30f93cd413d7d1b5fd Author: Long Li Date: Mon Dec 9 19:42:41 2024 +0800 xfs: clean up xfs_end_ioend() to reuse local variables Use already initialized local variables 'offset' and 'size' instead of accessing ioend members directly in xfs_setfilesize() call. This is just a code cleanup with no functional changes. Signed-off-by: Long Li Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino fs/xfs/xfs_aops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efebe42d95fbba91dca6e3e32cb9e0612eb56de5 Author: Long Li Date: Sat Jan 11 15:05:44 2025 +0800 xfs: fix mount hang during primary superblock recovery failure When mounting an image containing a log with sb modifications that require log replay, the mount process hang all the time and stack as follows: [root@localhost ~]# cat /proc/557/stack [<0>] xfs_buftarg_wait+0x31/0x70 [<0>] xfs_buftarg_drain+0x54/0x350 [<0>] xfs_mountfs+0x66e/0xe80 [<0>] xfs_fs_fill_super+0x7f1/0xec0 [<0>] get_tree_bdev_flags+0x186/0x280 [<0>] get_tree_bdev+0x18/0x30 [<0>] xfs_fs_get_tree+0x1d/0x30 [<0>] vfs_get_tree+0x2d/0x110 [<0>] path_mount+0xb59/0xfc0 [<0>] do_mount+0x92/0xc0 [<0>] __x64_sys_mount+0xc2/0x160 [<0>] x64_sys_call+0x2de4/0x45c0 [<0>] do_syscall_64+0xa7/0x240 [<0>] entry_SYSCALL_64_after_hwframe+0x76/0x7e During log recovery, while updating the in-memory superblock from the primary SB buffer, if an error is encountered, such as superblock corruption occurs or some other reasons, we will proceed to out_release and release the xfs_buf. However, this is insufficient because the xfs_buf's log item has already been initialized and the xfs_buf is held by the buffer log item as follows, the xfs_buf will not be released, causing the mount thread to hang. xlog_recover_do_primary_sb_buffer xlog_recover_do_reg_buffer xlog_recover_validate_buf_type xfs_buf_item_init(bp, mp) The solution is straightforward, we simply need to allow it to be handled by the normal buffer write process. The filesystem will be shutdown before the submission of buffer_list in xlog_do_recovery_pass(), ensuring the correct release of the xfs_buf as follows: xlog_do_recovery_pass error = xlog_recover_process xlog_recover_process_data xlog_recover_process_ophdr xlog_recovery_process_trans ... xlog_recover_buf_commit_pass2 error = xlog_recover_do_primary_sb_buffer //Encounter error and return if (error) goto out_writebuf ... out_writebuf: xfs_buf_delwri_queue(bp, buffer_list) //add bp to list return error ... if (!list_empty(&buffer_list)) if (error) xlog_force_shutdown(log, SHUTDOWN_LOG_IO_ERROR); //shutdown first xfs_buf_delwri_submit(&buffer_list); //submit buffers in list __xfs_buf_submit if (bp->b_mount->m_log && xlog_is_shutdown(bp->b_mount->m_log)) xfs_buf_ioend_fail(bp) //release bp correctly Fixes: 6a18765b54e2 ("xfs: update the file system geometry after recoverying superblock buffers") Cc: stable@vger.kernel.org # v6.12 Signed-off-by: Long Li Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino fs/xfs/xfs_buf_item_recover.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 471511d6ef7d00b40e65902ff47acfc194c6a952 Author: Christoph Hellwig Date: Mon Jan 6 10:50:31 2025 +0100 xfs: remove the t_magic field in struct xfs_trans The t_magic field is only ever assigned to, but never read. Remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino fs/xfs/xfs_trans.c | 2 -- fs/xfs/xfs_trans.h | 1 - 2 files changed, 3 deletions(-) commit 415dee1e06da431f3d314641ceecb9018bb6fa53 Author: Christoph Hellwig Date: Mon Jan 6 10:50:30 2025 +0100 xfs: remove XFS_ILOG_NONCORE XFS_ILOG_NONCORE is not used in the kernel code or xfsprogs, remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino fs/xfs/libxfs/xfs_log_format.h | 6 ------ 1 file changed, 6 deletions(-) commit 23ebf63925989adbe4c4277c8e9b04e0a37f6005 Author: Christoph Hellwig Date: Mon Jan 6 10:50:29 2025 +0100 xfs: mark xfs_dir_isempty static And return bool instead of a boolean condition as int. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino fs/xfs/libxfs/xfs_dir2.c | 6 +++--- fs/xfs/libxfs/xfs_dir2.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) commit 156d1c389c543c4620dd86ad8636ecb224be0376 Merge: a938bbe4739f 155debbe7e62 Author: Carlos Maiolino Date: Mon Jan 13 14:54:52 2025 +0100 Merge tag 'realtime-reflink_2024-12-23' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into for-next xfs: reflink on the realtime device [v6.2 05/14] This patchset enables use of the file data block sharing feature (i.e. reflink) on the realtime device. It follows the same basic sequence as the realtime rmap series -- first a few cleanups; then introduction of the new btree format and inode fork format. Next comes enabling CoW and remapping for the rt device; new scrub, repair, and health reporting code; and at the end we implement some code to lengthen write requests so that rt extents are always CoWed fully. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: "Darrick J. Wong" commit a938bbe4739f8ffb0797f963324d207f789329c8 Merge: 8a092f440e03 c2358439af37 Author: Carlos Maiolino Date: Mon Jan 13 14:54:41 2025 +0100 Merge tag 'realtime-rmap_2024-12-23' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into for-next xfs: realtime reverse-mapping support [v6.2 04/14] This is the latest revision of a patchset that adds to XFS kernel support for reverse mapping for the realtime device. This time around I've fixed some of the bitrot that I've noticed over the past few months, and most notably have converted rtrmapbt to use the metadata inode directory feature instead of burning more space in the superblock. At the beginning of the set are patches to implement storing B+tree leaves in an inode root, since the realtime rmapbt is rooted in an inode, unlike the regular rmapbt which is rooted in an AG block. Prior to this, the only btree that could be rooted in the inode fork was the block mapping btree; if all the extent records fit in the inode, format would be switched from 'btree' to 'extents'. The next few patches enhance the reverse mapping routines to handle the parts that are specific to rtgroups -- adding the new btree type, adding a new log intent item type, and wiring up the metadata directory tree entries. Finally, implement GETFSMAP with the rtrmapbt and scrub functionality for the rtrmapbt and rtbitmap and online fsck functionality. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: "Darrick J. Wong" commit 8a092f440e0326a74a008566fef794fc891bdeda Merge: 9a2ce7254c1e 05290bd5c623 Author: Carlos Maiolino Date: Mon Jan 13 14:54:33 2025 +0100 Merge tag 'reserve-rt-metadata-space_2024-12-23' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into for-next xfs: enable in-core block reservation for rt metadata [v6.2 03/14] In preparation for adding reverse mapping and refcounting to the realtime device, enhance the metadir code to reserve free space for btree shape changes as delayed allocation blocks. This enables us to pre-allocate space for the rmap and refcount btrees in the same manner as we do for the data device counterparts, which is how we avoid ENOSPC failures when space is low but we've already committed to a COW operation. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: "Darrick J. Wong" commit 9a2ce7254c1ee252c9c7aa2d7d71b45ee31c862a Merge: 69bf6cd7f38d 2f63b20b7a26 Author: Carlos Maiolino Date: Mon Jan 13 14:54:23 2025 +0100 Merge tag 'btree-ifork-records_2024-12-23' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into for-next xfs: refactor btrees to support records in inode root [v6.2 02/14] Amend the btree code to support storing btree rcords in the inode root, because the current bmbt code does not support this. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: "Darrick J. Wong" commit 69bf6cd7f38d090f3fec92565af88f3b9b180354 Merge: 111d36d62787 1aacd3fac248 Author: Carlos Maiolino Date: Mon Jan 13 14:54:14 2025 +0100 Merge tag 'xfs-6.13-fixes_2024-12-23' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into for-next xfs: bug fixes for 6.13 [01/14] Bug fixes for 6.13. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: "Darrick J. Wong" commit 311473984c56dfa6cadfec9690f0b5c372ea15fc Author: David Sterba Date: Thu Jan 9 11:24:51 2025 +0100 btrfs: async-thread: rename DFT_THRESHOLD to DEFAULT_THRESHOLD Rename the macro so it's obvious what it means. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/async-thread.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ef8c0047aac932bd62a86cc3d5d66d328154fffe Author: David Sterba Date: Thu Jan 9 11:24:45 2025 +0100 btrfs: remove redundant variables from __process_folios_contig() and lock_delalloc_folios() Same pattern in both functions, we really only use index, start_index is redundant. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 248c4ff3935252a82504c55cfd3592e413575bd0 Author: David Sterba Date: Thu Jan 9 11:24:43 2025 +0100 btrfs: split waiting from read_extent_buffer_pages(), drop parameter wait There are only 2 WAIT_* values left for wait parameter, we can encode this to the function name if the waiting functionality is split. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/disk-io.c | 2 +- fs/btrfs/extent_io.c | 27 +++++++++++++++++---------- fs/btrfs/extent_io.h | 7 ++++--- 3 files changed, 22 insertions(+), 14 deletions(-) commit db9eef2ea8633714ccdcb224f13ca3f3b5ed62cc Author: David Sterba Date: Thu Jan 9 11:24:40 2025 +0100 btrfs: remove unused define WAIT_PAGE_LOCK for extent io Last use was in the readahead code that got removed by f26c9238602856 ("btrfs: remove reada infrastructure"). Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.h | 1 - 1 file changed, 1 deletion(-) commit f8e0b8f9c2796474db532c83959993b4ee28c4ef Author: David Sterba Date: Thu Jan 9 11:24:38 2025 +0100 btrfs: unwrap folio locking helpers Another conversion to folio API, use the folio locking directly instead of back and forth page <-> folio conversions. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 549a88acbe544cebd41011e56b4ac5ef2ae79e7c Author: David Sterba Date: Thu Jan 9 11:24:35 2025 +0100 btrfs: change return type to bool type of check_eb_alignment() The check function pattern is supposed to return true/false, currently there's only one error code. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a43caf82a103ea9fa8af2630119f1c018db06bb4 Author: David Sterba Date: Thu Jan 9 11:24:29 2025 +0100 btrfs: switch grab_extent_buffer() to folios Use the folio API, remove page_folio/folio_page conversions. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit cc8f51a3550a77427449c2b7a64281c72073a412 Author: David Sterba Date: Thu Jan 9 11:24:27 2025 +0100 btrfs: rename btrfs_release_extent_buffer_pages() to mention folios Continue page to folio updates, sync what the function does with it's name. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a722c72bef93449d9093fa33d9c29eb3b348f164 Author: David Sterba Date: Thu Jan 9 11:24:24 2025 +0100 btrfs: open code __free_extent_buffer() Using the kmem cache freeing directly is clear enough, we don't need to wrap it. All the users are in the same file. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit b6160baed37916b6b315b2ab868a265600e03b2a Author: David Sterba Date: Thu Jan 9 11:24:22 2025 +0100 btrfs: drop one time used local variable in end_bbio_meta_write() Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 075adeeb9204359e8232aeccf8b3c350ff6d9ff4 Author: David Sterba Date: Thu Jan 9 11:24:19 2025 +0100 btrfs: make wait_on_extent_buffer_writeback() static inline The simple helper can be inlined, no need for the separate function. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 6 ------ fs/btrfs/extent_io.h | 7 ++++++- 2 files changed, 6 insertions(+), 7 deletions(-) commit 011a9a1f244656cc3cbde47edba2b250f794d440 Author: David Sterba Date: Thu Jan 9 11:24:17 2025 +0100 btrfs: use btrfs_inode in extent_writepage() As extent_writepage() is internal helper we should use our inode type, so change it from struct inode. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 06de96faf795b5c276a3be612da6b08c6112e747 Author: David Sterba Date: Thu Jan 9 11:24:15 2025 +0100 btrfs: rename __get_extent_map() and pass btrfs_inode The double underscore naming scheme does not apply here, there's only only get_extent_map(). As the definition is changed also pass the struct btrfs_inode. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 3a1c46dbc9856a286808170b58c35ff5f50afa30 Author: David Sterba Date: Thu Jan 9 11:24:12 2025 +0100 btrfs: open code set_page_extent_mapped() The function set_page_extent_mapped() is now a simple wrapper so use the folio helper. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 5 ----- fs/btrfs/extent_io.h | 1 - fs/btrfs/free-space-cache.c | 2 +- fs/btrfs/relocation.c | 2 +- 4 files changed, 2 insertions(+), 8 deletions(-) commit 2b41599bff1714df957c82821b8b17113ea44054 Author: David Sterba Date: Thu Jan 9 11:24:10 2025 +0100 btrfs: rename __unlock_for_delalloc() and drop underscores Drop the leading underscores in '__unlock_for_delalloc()' and rename it to 'unlock_delalloc_folio()'. This also ensures naming parity with 'lock_delalloc_folios()'. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent_io.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 2a1e8378dc3814e37deee2be495600da0c98b175 Author: David Sterba Date: Thu Jan 9 11:24:07 2025 +0100 btrfs: use SECTOR_SIZE defines in btrfs_issue_discard() Use the existing define for single sector size. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6d67ff1c0be3c04e01c6b20a0c8286e99df05b2d Author: David Sterba Date: Thu Jan 9 11:24:01 2025 +0100 btrfs: remove stray comment about SRCU The subvol_srcu was removed in c75e839414d361 ("btrfs: kill the subvol_srcu") years ago. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/disk-io.h | 3 --- 1 file changed, 3 deletions(-) commit 5f14eb12a3be1628809141759e46c381925b5ef1 Author: David Sterba Date: Thu Jan 9 11:23:59 2025 +0100 btrfs: drop unused parameter fs_info to btrfs_delete_delayed_insertion_item() Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2fa07d7a0f0084d9777f076a154ad10e759ba731 Author: Jing Xia Date: Tue Sep 3 13:40:12 2024 +0800 btrfs: pass write-hint for buffered IO Commit 449813515d3e ("block, fs: Restore the per-bio/request data lifetime fields") restored write-hint support in btrfs. But that is applicable only for direct IO. This patch supports passing write-hint for buffered IO from btrfs file system to block layer by filling bi_write_hint of struct bio in alloc_new_bio(). There's an ongoing discussion which devices can use that, https://lore.kernel.org/all/20240910150200.6589-6-joshi.k@samsung.com, in SCSI there's support using sd_group_number() and sd_setup_rw32_cmnd(). The hint goes from the application directly to the block device so it's up to the application to set up everything properly to utilize the different hint classes. Link: https://lore.kernel.org/all/20240910150200.6589-6-joshi.k@samsung.com Reviewed-by: Johannes Thumshirn Signed-off-by: Jing Xia [ Add more context and use case. ] Signed-off-by: David Sterba fs/btrfs/extent_io.c | 1 + 1 file changed, 1 insertion(+) commit 3681dbe0afeef3946b71a7af05e31375d6e70b90 Author: Anand Jain Date: Thu Jan 2 02:06:39 2025 +0800 btrfs: print read policy on module load Print the read read policy if set as module parameter (with CONFIG_BTRFS_EXPERIMENTAL). Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/super.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e426286cfa6f85e51006f6151b309a395ada6540 Author: Anand Jain Date: Thu Jan 2 02:06:38 2025 +0800 btrfs: configure read policy via module parameter For testing purposes allow to configure the read policy via module parameter from the beginning. Available only with CONFIG_BTRFS_EXPERIMENTAL Examples: - Set the RAID1 balancing method to round-robin with a custom min_contig_read of 4k: $ modprobe btrfs read_policy=round-robin:4096 - Set the round-robin balancing method with the default min_contiguous_read: $ modprobe btrfs read_policy=round-robin - Set the "devid" balancing method, defaulting to the latest device: $ modprobe btrfs read_policy=devid Signed-off-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/super.c | 5 +++++ fs/btrfs/sysfs.c | 31 ++++++++++++++++++++++++++++++- fs/btrfs/sysfs.h | 6 ++++++ fs/btrfs/volumes.c | 15 ++++++++++++++- 4 files changed, 55 insertions(+), 2 deletions(-) commit bb4715e967cf3b2eb8550eda73886208f1fc805d Author: Anand Jain Date: Thu Jan 2 02:06:37 2025 +0800 btrfs: print status of experimental mode when loading module Commit c9c49e8f157e ("btrfs: split out CONFIG_BTRFS_EXPERIMENTAL from CONFIG_BTRFS_DEBUG") introduces a way to enable or disable experimental features, print its status during module load, like: Btrfs loaded, experimental=on, debug=on, assert=on, zoned=yes, fsverity=yes Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/super.c | 3 +++ 1 file changed, 3 insertions(+) commit c86aae73bd5882e4a6b4e1b6ed448ea902551f80 Author: Anand Jain Date: Thu Jan 2 02:06:36 2025 +0800 btrfs: add read policy to set a preferred device Add read policy that will force all reads to go to the given device (specified by devid) on the RAID1 profiles. This will be used for testing, e.g. to read from stale device. Users may find other use cases. Can be set in sysfs, the value format is "devid:" to the file /sys/fs/btrfs/FSID/read_policy Signed-off-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/sysfs.c | 31 ++++++++++++++++++++++++++++++- fs/btrfs/volumes.c | 17 +++++++++++++++++ fs/btrfs/volumes.h | 5 +++++ 3 files changed, 52 insertions(+), 1 deletion(-) commit 6d7a9154955e50c0b991063c65f86ab24796754e Author: Anand Jain Date: Thu Jan 2 02:06:35 2025 +0800 btrfs: introduce RAID1 round-robin read balancing Add round-robin read policy that balances reads over available devices (all RAID1 block group profiles). Switch to the next devices is done after a number of blocks is read, which is 256K by default and is configurable in sysfs. The format is "round-robin:" and can be set in file /sys/fs/btrfs/FSID/read_policy Signed-off-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/sysfs.c | 48 +++++++++++++++++++++++++++++++++++++++- fs/btrfs/volumes.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/volumes.h | 13 +++++++++++ 3 files changed, 125 insertions(+), 1 deletion(-) commit 22fb0d99c90583e5b32a2a54e614bce221d31a8a Author: Anand Jain Date: Thu Jan 2 02:06:34 2025 +0800 btrfs: add tracking of read blocks for read policy Track number of read blocks in the whole filesystem. The counter is initialized when devices are opened. The counter is increased at btrfs_submit_dev_bio() if the stats tracking is enabled (depends on the read policy). Stats tracking is disabled by default and is enabled through fs_devices::collect_fs_stats when required. The code is not under the EXPERIMENTAL define, as stats can be expanded to include write counts and other performance counters, with the user interface independent of its internal use. This is an in-memory-only feature, not related to the dev error stats. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/bio.c | 8 ++++++++ fs/btrfs/disk-io.c | 5 +++++ fs/btrfs/fs.h | 3 +++ fs/btrfs/volumes.h | 2 ++ 4 files changed, 18 insertions(+) commit b6bed20ed398f71069bfd2cd769bb91fa15859b5 Author: Anand Jain Date: Thu Jan 2 02:06:33 2025 +0800 btrfs: sysfs: handle value associated with read balancing policy Enable specifying additional configuration values along the RAID1 balancing read policy in a single input string. Update btrfs_read_policy_to_enum() to parse and handle a value associated with the policy in the format "policy:value", the value part if present is converted to 64-bit integer. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/sysfs.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 38cae63137d5e13dc3c2ba88c4f393be4a6bf4bb Author: Anand Jain Date: Thu Jan 2 02:06:32 2025 +0800 btrfs: sysfs: add btrfs_read_policy_to_enum() helper and refactor read policy store Introduce btrfs_read_policy_to_enum() helper to simplify the conversion of a string read policy to its corresponding enum value. This reduces duplication and improves code clarity in btrfs_read_policy_store(). The parameter is copied locally to allow modification, enabling the separation of the method and its value. This prepares for the addition of more functionality in subsequent patches. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/sysfs.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 83be7f8b9c24bd040a348577c7c84fd08911707f Author: Anand Jain Date: Thu Jan 2 02:06:31 2025 +0800 btrfs: sysfs: refactor output formatting in btrfs_read_policy_show() Refactor the logic in btrfs_read_policy_show() for easier extension with more balancing methods. Streamline the space and bracket handling around the active policy without altering the functional output. This is in preparation to add more methods. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/sysfs.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit a5019b70704a8cbea4c295ae7a61abd87300ff29 Author: Anand Jain Date: Thu Jan 2 02:06:30 2025 +0800 btrfs: initialize fs_devices->fs_info earlier in btrfs_init_devices_late() Currently, fs_devices->fs_info is initialized in btrfs_init_devices_late(), but this occurs too late for find_live_mirror(), which is invoked by load_super_root() much earlier than btrfs_init_devices_late(). Fix this by moving the initialization to open_ctree(), before load_super_root(). Reviewed-by: Naohiro Aota Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 1 + fs/btrfs/volumes.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) commit 74973b45a69b8f805e12e50cf85fa2ad500754f0 Author: Filipe Manana Date: Wed Dec 18 13:04:01 2024 +0000 btrfs: xattr: remove unnecessary call to btrfs_mark_buffer_dirty() The call to btrfs_mark_buffer_dirty() at btrfs_setxattr() is not necessary as we have a path setup for writing with btrfs_search_slot() having a 'cow' argument set to 1. This just makes the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove it. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/xattr.c | 1 - 1 file changed, 1 deletion(-) commit 1ca4e15f41f2e3ad99016b3b13b3713af9f40eb2 Author: Filipe Manana Date: Wed Dec 18 13:02:59 2024 +0000 btrfs: volumes: remove unnecessary calls to btrfs_mark_buffer_dirty() We have several places explicitly calling btrfs_mark_buffer_dirty() but that is not necessarily since the target leaf came from a path that was obtained for a btree search function that modifies the btree, something like btrfs_insert_empty_item() or anything else that ends up calling btrfs_search_slot() with a value of 1 for its 'cow' argument. These just make the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove them. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/volumes.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit c9a4390707c8b6a6f022526a5618e76d24bc6cb2 Author: Filipe Manana Date: Wed Dec 18 12:59:51 2024 +0000 btrfs: uuid-tree: remove unnecessary call to btrfs_mark_buffer_dirty() The call to btrfs_mark_buffer_dirty() at btrfs_uuid_tree_add() is not necessary as we have a path setup for writing with btrfs_search_slot() having a 'cow' argument set to 1 (through btrfs_insert_empty_item()). This just makes the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove it. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/uuid-tree.c | 2 -- 1 file changed, 2 deletions(-) commit 65733e8d6cc334565891719ed6bc9239695d63d9 Author: Filipe Manana Date: Wed Dec 18 12:57:56 2024 +0000 btrfs: root-tree: remove unnecessary calls to btrfs_mark_buffer_dirty() We have several places explicitly calling btrfs_mark_buffer_dirty() but that is not necessarily since the target leaf came from a path that was obtained for a btree search function that modifies the btree, something like btrfs_insert_empty_item() or anything else that ends up calling btrfs_search_slot() with a value of 1 for its 'cow' argument. These just make the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove them. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/root-tree.c | 2 -- 1 file changed, 2 deletions(-) commit 5a8293a1cc466e2effce6fd3a61880acea37adf2 Author: Filipe Manana Date: Wed Dec 18 12:56:38 2024 +0000 btrfs: relocation: remove unnecessary calls to btrfs_mark_buffer_dirty() We have several places explicitly calling btrfs_mark_buffer_dirty() but that is not necessarily since the target leaf came from a path that was obtained for a btree search function that modifies the btree, something like btrfs_insert_empty_item() or anything else that ends up calling btrfs_search_slot() with a value of 1 for its 'cow' argument. These just make the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove them. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/relocation.c | 7 ------- 1 file changed, 7 deletions(-) commit bdf1660b221abb8660a809ab8de6b6b0e6ff0320 Author: Filipe Manana Date: Wed Dec 18 12:52:28 2024 +0000 btrfs: raid-stripe-tree: remove unnecessary call to btrfs_mark_buffer_dirty() The call to btrfs_mark_buffer_dirty() at update_raid_extent_item() is not necessary as we have a path setup for writing with btrfs_search_slot() having a 'cow' argument set to 1. This just makes the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove it. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/raid-stripe-tree.c | 1 - 1 file changed, 1 deletion(-) commit d74a36f37e29b6457c8405ed85c5d426c2afd077 Author: Filipe Manana Date: Wed Dec 18 12:51:20 2024 +0000 btrfs: qgroup: remove unnecessary calls to btrfs_mark_buffer_dirty() We have several places explicitly calling btrfs_mark_buffer_dirty() but that is not necessarily since the target leaf came from a path that was obtained for a btree search function that modifies the btree, something like btrfs_insert_empty_item() or anything else that ends up calling btrfs_search_slot() with a value of 1 for its 'cow' argument. These just make the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove them. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/qgroup.c | 18 ------------------ 1 file changed, 18 deletions(-) commit bd25bf9dcd3c3d57a22a04bd73845911d33e3ac1 Author: Filipe Manana Date: Wed Dec 18 12:48:39 2024 +0000 btrfs: ioctl: remove unnecessary call to btrfs_mark_buffer_dirty() The call to btrfs_mark_buffer_dirty() at btrfs_ioctl_default_subvol() is not necessary as we have a path setup for writing with btrfs_search_slot() having a 'cow' argument set to 1. This just makes the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove it. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/ioctl.c | 1 - 1 file changed, 1 deletion(-) commit 212e5f5cb8e34c93b7d50ed59421a82ad9e53caf Author: Filipe Manana Date: Wed Dec 18 12:47:23 2024 +0000 btrfs: inode-item: remove unnecessary calls to btrfs_mark_buffer_dirty() We have several places explicitly calling btrfs_mark_buffer_dirty() but that is not necessarily since the target leaf came from a path that was obtained for a btree search function that modifies the btree, something like btrfs_insert_empty_item() or anything else that ends up calling btrfs_search_slot() with a value of 1 for its 'cow' argument. These just make the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove them. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/inode-item.c | 5 ----- 1 file changed, 5 deletions(-) commit 5c7763312c17a44b6ff3590ababca31429842bd6 Author: Filipe Manana Date: Wed Dec 18 12:46:03 2024 +0000 btrfs: inode: remove unnecessary calls to btrfs_mark_buffer_dirty() We have several places explicitly calling btrfs_mark_buffer_dirty() but that is not necessarily since the target leaf came from a path that was obtained for a btree search function that modifies the btree, something like btrfs_insert_empty_item() or anything else that ends up calling btrfs_search_slot() with a value of 1 for its 'cow' argument. These just make the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove them. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/inode.c | 5 ----- 1 file changed, 5 deletions(-) commit 038d6999ec9fa54c87915f372f98a179197aeb8d Author: Filipe Manana Date: Wed Dec 18 12:44:10 2024 +0000 btrfs: free-space-cache: remove unnecessary calls to btrfs_mark_buffer_dirty() We have several places explicitly calling btrfs_mark_buffer_dirty() but that is not necessarily since the target leaf came from a path that was obtained for a btree search function that modifies the btree, something like btrfs_insert_empty_item() or anything else that ends up calling btrfs_search_slot() with a value of 1 for its 'cow' argument. These just make the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove them. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/free-space-cache.c | 3 --- 1 file changed, 3 deletions(-) commit 5e887b5071e9ec2c934bb7839e153483433e5f9f Author: Filipe Manana Date: Wed Dec 18 12:42:21 2024 +0000 btrfs: file-item: remove unnecessary calls to btrfs_mark_buffer_dirty() We have several places explicitly calling btrfs_mark_buffer_dirty() but that is not necessarily since the target leaf came from a path that was obtained for a btree search function that modifies the btree, something like btrfs_insert_empty_item() or anything else that ends up calling btrfs_search_slot() with a value of 1 for its 'cow' argument. These just make the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove them. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/file-item.c | 3 --- 1 file changed, 3 deletions(-) commit 49c318e4f7ebdb6316cf8a504aeb3cf21bb986c7 Author: Filipe Manana Date: Wed Dec 18 12:41:17 2024 +0000 btrfs: file: remove unnecessary calls to btrfs_mark_buffer_dirty() We have several places explicitly calling btrfs_mark_buffer_dirty() but that is not necessarily since the target leaf came from a path that was obtained for a btree search function that modifies the btree, something like btrfs_insert_empty_item() or anything else that ends up calling btrfs_search_slot() with a value of 1 for its 'cow' argument. These just make the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove them. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/file.c | 11 ----------- 1 file changed, 11 deletions(-) commit 4866812020a27dee7cb8e94dc9e13a2793ae966a Author: Filipe Manana Date: Wed Dec 18 12:36:21 2024 +0000 btrfs: dir-item: remove unnecessary calls to btrfs_mark_buffer_dirty() We have several places explicitly calling btrfs_mark_buffer_dirty() but that is not necessarily since the target leaf came from a path that was obtained for a btree search function that modifies the btree, something like btrfs_insert_empty_item() or anything else that ends up calling btrfs_search_slot() with a value of 1 for its 'cow' argument. These just make the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove them. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/dir-item.c | 2 -- 1 file changed, 2 deletions(-) commit 7caa86c44b81c177f51715ea89cfcc0c4bd85622 Author: Filipe Manana Date: Wed Dec 18 12:33:50 2024 +0000 btrfs: dev-replace: remove unnecessary call to btrfs_mark_buffer_dirty() The call to btrfs_mark_buffer_dirty() at btrfs_run_dev_replace() is not necessary as we have a path setup for writing with btrfs_search_slot() having a 'cow' argument set to 1. This just makes the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove it. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 3 --- 1 file changed, 3 deletions(-) commit a81ae6c31d6431a7d6a7c9c9c6bfcecaa6b68917 Author: Filipe Manana Date: Wed Dec 18 12:26:42 2024 +0000 btrfs: delayed-inode: remove unnecessary call to btrfs_mark_buffer_dirty() The call to btrfs_mark_buffer_dirty() at __btrfs_update_delayed_inode() is not necessary as we have a path setup for writing with btrfs_search_slot() having a 'cow' argument set to 1. This just makes the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove it. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 1 - 1 file changed, 1 deletion(-) commit ca9d907645d361519a2719573c0174517655458a Author: Filipe Manana Date: Wed Dec 18 12:21:15 2024 +0000 btrfs: block-group: remove unnecessary calls to btrfs_mark_buffer_dirty() We have several places explicitly calling btrfs_mark_buffer_dirty() but that is not necessarily since the target leaf came from a path that was obtained for a btree search function that modifies the btree, something like btrfs_insert_empty_item() or anything else that ends up calling btrfs_search_slot() with a value of 1 for its 'cow' argument. These just make the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove them. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/block-group.c | 2 -- 1 file changed, 2 deletions(-) commit 1440fd2757ff63cf1d457bc640e51a685c4e4c5b Author: Filipe Manana Date: Wed Dec 18 12:19:10 2024 +0000 btrfs: extent-tree: remove unnecessary calls to btrfs_mark_buffer_dirty() We have several places explicitly calling btrfs_mark_buffer_dirty() but that is not necessarily since the target leaf came from a path that was obtained for a btree search function that modifies the btree, something like btrfs_insert_empty_item() or anything else that ends up calling btrfs_search_slot() with a value of 1 for its 'cow' argument. These just make the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove them. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 10 ---------- 1 file changed, 10 deletions(-) commit 63eb2223872faebf4e9df3fe31f8e02fdcfa5d99 Author: Filipe Manana Date: Wed Dec 18 12:10:56 2024 +0000 btrfs: free-space-tree: remove unnecessary calls to btrfs_mark_buffer_dirty() We have several places explicitly calling btrfs_mark_buffer_dirty() but that is not necessarily since the target leaf came from a path that was obtained for a btree search function that modifies the btree, something ike btrfs_insert_empty_item() or anything else that ends up calling btrfs_search_slot() with a value of 1 for its 'cow' argument. These just make the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove them. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/free-space-tree.c | 5 ----- 1 file changed, 5 deletions(-) commit 8787c36c630c3c732f071488aba3dc5fd3594c23 Author: Filipe Manana Date: Wed Dec 18 12:02:16 2024 +0000 btrfs: tree-log: remove unnecessary calls to btrfs_mark_buffer_dirty() We have several places explicitly calling btrfs_mark_buffer_dirty() but that is not necessarily since the target leaf came from a path that was obtained for a btree search function that modifies the btree, something like btrfs_insert_empty_item() or anything else that ends up calling btrfs_search_slot() with a value of 1 for its 'cow' argument. These just make the code more verbose, confusing and add a little extra overhead and well as increase the module's text size, so remove them. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/tree-log.c | 4 ---- 1 file changed, 4 deletions(-) commit 097a7eef61bd0366a822418b2ba074942eb00744 Author: Filipe Manana Date: Mon Jan 6 12:09:50 2025 +0000 btrfs: uncollapse transaction aborts during renames During renames we are grouping transaction aborts that can be due to a failure of one of several function calls. While this makes the code less verbose, it makes it harder to debug as we end up not knowing from which function call we got an error. So change this to trigger a transaction abort after each function call failure, so that when we get a transaction abort message we know exactly which function call failed, helping us to debug issues. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 74 +++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 22 deletions(-) commit 2a9bb78cfd367fdeff74f15b1e98969912292d9e Author: Qu Wenruo Date: Sat Dec 21 16:15:19 2024 +1030 btrfs: validate system chunk array at btrfs_validate_super() Currently btrfs_validate_super() only does a very basic check on the array chunk size (not too large than the available space, but not too small to contain no chunk). The more comprehensive checks (the regular chunk checks and size check inside the system chunk array) are all done inside btrfs_read_sys_array(). It's not a big deal, but it also means we do not do any validation on the system chunk array at super block writeback time either. Do the following modification to centralize the system chunk array checks into btrfs_validate_super(): - Make chunk_err() helper accept stack chunk pointer If @leaf parameter is NULL, then the @chunk pointer will be a pointer to the chunk item, other than the offset inside the leaf. And since @leaf can be NULL, add a new @fs_info parameter for that case. - Make btrfs_check_chunk_valid() handle stack chunk pointer The same as chunk_err(), a new @fs_info parameter, and if @leaf is NULL, then @chunk will be a pointer to a stack chunk. If @chunk is NULL, then all needed btrfs_chunk members will be read using the stack helper instead of the leaf helper. This means we need to read out all the needed member at the beginning of the function. Furthermore, at super block read time, fs_info->sectorsize is not yet initialized, we need one extra @sectorsize parameter to grab the correct sectorsize. - Introduce a helper validate_sys_chunk_array() * Validate the disk key. * Validate the size before we access the full chunk items. * Do the full chunk item validation. - Call validate_sys_chunk_array() at btrfs_validate_super() - Simplify the checks inside btrfs_read_sys_array() Now the checks will be converted to an ASSERT(). - Simplify the checks inside read_one_chunk() Now that all chunk items inside system chunk array and chunk tree are verified, there is no need to verify them again inside read_one_chunk(). This change has the following advantages: - More comprehensive checks at write time And unlike the sys_chunk_array read routine, this time we do not need to allocate a dummy extent buffer to do the check. All the checks done here require no new memory allocation. - Slightly improved readability when iterating the system chunk array Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 67 ++++++++++++++++++++++++++++++++++ fs/btrfs/tree-checker.c | 96 +++++++++++++++++++++++++++---------------------- fs/btrfs/tree-checker.h | 7 ++-- fs/btrfs/volumes.c | 73 +++++++------------------------------ 4 files changed, 139 insertions(+), 104 deletions(-) commit 4e4d058e21294d8062bab0285ed456f711793990 Author: Roger L. Beckermeyer III Date: Wed Dec 18 08:28:55 2024 +1030 btrfs: update tree_insert() to use rb helpers Update tree_insert() to use rb_find_add_cached(). add cmp_refs_node in rb_find_add_cached() to compare. Since we're here, also make comp_data_refs() and comp_refs() accept both parameters as const. Signed-off-by: Roger L. Beckermeyer III Reviewed-by: Qu Wenruo Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/delayed-ref.c | 45 ++++++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) commit 287373c701e6d0ba93a7f21e979ed1bc25a02016 Author: Roger L. Beckermeyer III Date: Wed Dec 18 08:28:54 2024 +1030 btrfs: update btrfs_add_chunk_map() to use rb helpers Update btrfs_add_chunk_map() to use rb_find_add_cached(). Signed-off-by: Roger L. Beckermeyer III Reviewed-by: Qu Wenruo Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) commit 0877597dc347169bed19e3e8282bbdce2593d16f Author: Roger L. Beckermeyer III Date: Wed Dec 18 08:28:53 2024 +1030 btrfs: update __btrfs_add_delayed_item() to use rb helper Update __btrfs_add_delayed_item() to use rb_find_add_cached(). Signed-off-by: Roger L. Beckermeyer III Reviewed-by: Qu Wenruo Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) commit 14ae60c71221d3ec64482476262e5b9eb4494be4 Author: Roger L. Beckermeyer III Date: Wed Dec 18 08:28:52 2024 +1030 btrfs: update prelim_ref_insert() to use rb helpers Update prelim_ref_insert() to use rb_find_add_cached(). There is a special change that the existing prelim_ref_compare() is called with the first parameter as the existing ref in the rbtree. But the newer rb_find_add_cached() expects the cmp() function to have the first parameter as the to-be-added node, thus the new helper prelim_ref_rb_add_cmp() need to adapt this new order. Signed-off-by: Roger L. Beckermeyer III Reviewed-by: Qu Wenruo Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/backref.c | 79 +++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 40 deletions(-) commit 372484f2c27c5ebd2b37d6c7d3f92678fc8c07af Author: Roger L. Beckermeyer III Date: Wed Dec 18 08:28:51 2024 +1030 btrfs: update btrfs_add_block_group_cache() to use rb helper Update fs/btrfs/block-group.c to use rb_find_add_cached(). Suggested-by: Josef Bacik Signed-off-by: Roger L. Beckermeyer III Reviewed-by: Qu Wenruo Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/block-group.c | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) commit 90dde9a13c0020ce140bc8d27c1f4c48a070cc97 Author: Roger L. Beckermeyer III Date: Wed Dec 18 08:28:50 2024 +1030 rbtree: add rb_find_add_cached() to rbtree.h Adds rb_find_add_cached() as a helper function for use with red-black trees. Used in btrfs to reduce boilerplate code. And since it's a new helper, the cmp() function will require both parameter to be const rb_node pointers. Suggested-by: Josef Bacik Signed-off-by: Roger L. Beckermeyer III Acked-by: Peter Zijlstra (Intel) Reviewed-by: Qu Wenruo Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba include/linux/rbtree.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 57e421867b7aa60783dac3d4caf97af74263f5f5 Author: Wolfram Sang Date: Tue Dec 17 08:05:43 2024 +0100 btrfs: don't include linux/rwlock_types.h directly The header clearly states that it does not want to be included directly, only via linux/spinlock_types.h. Drop this as we can simply use the spinlock.h which is already included. Signed-off-by: Wolfram Sang Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/fs.h | 1 - 1 file changed, 1 deletion(-) commit 882af9f13e830c0a4ef696bb72cd5998a5067a93 Author: Qu Wenruo Date: Thu Dec 19 15:04:08 2024 +1030 btrfs: handle free space tree rebuild in multiple transactions During free space tree rebuild, we're holding a transaction handle for the whole rebuild process. This can lead to blocked task warning, e.g. btrfs-transaction kthread (which is already created before btrfs_start_pre_rw_mount()) can be waked up to join and commit the current transaction. But the free space tree rebuild process may need to go through thousands block groups, this will block btrfs-transaction kthread for a long time. Fix the problem by calling btrfs_should_end_transaction() after each block group, so that we won't hold the transaction handle too long. And since the free-space-tree rebuild can be split into multiple transactions, we need to consider the safety when the rebuild process is interrupted. Thankfully since we only set the FREE_SPACE_TREE compat_ro flag without FREE_SPACE_TREE_VALID flag, even if the rebuild is interrupted, on the next RW mount, we will still go rebuild the free space tree, by deleting any items we have and re-starting the rebuild from scratch. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/free-space-tree.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6a2b3d7a36df2c7a7ad3a8ef00bc4ea194221c02 Author: Filipe Manana Date: Tue Dec 17 12:00:39 2024 +0000 btrfs: use uuid_is_null() to verify if an uuid is empty At btrfs_is_empty_uuid() we have our custom code to check if an uuid is empty, however there a kernel uuid library that has a function named uuid_is_null() which does the same and probably more efficient. So change btrfs_is_empty_uuid() to use uuid_is_null(), which is almost a directly replacement, it just wraps the necessary casting since our uuid types are u8 arrays while the uuid kernel library uses the uuid_t type, which is just a typedef of an u8 array of 16 elements as well. Also since the function is now to trivial, make it a static inline function in fs.h. Suggested-by: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/fs.c | 9 --------- fs/btrfs/fs.h | 5 ++++- 2 files changed, 4 insertions(+), 10 deletions(-) commit de9c8265b763f98b4b8f7f13acf4888285ac5a47 Author: Filipe Manana Date: Mon Dec 16 16:36:19 2024 +0000 btrfs: remove pointless comment from ctree.h It's pointless to have a comment above the prototype declarations of btrfs_ctree_init() and btrfs_ctree_exit() mentioning that they are declared in ctree.c. This is from the old days when ctree.h was used to place anything that didn't fit in any other file. So remove it. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 - 1 file changed, 1 deletion(-) commit 07174a34295767389383fd4e27da2a41ebb6966e Author: Filipe Manana Date: Mon Dec 16 16:29:45 2024 +0000 btrfs: move extent-tree function declarations out of ctree.h We have 3 functions that have their prototypes declared in ctree.h but they are defined at extent-tree.c and they are unrelated to the btree data structure. Move the prototypes out of ctree.h and into extent-tree.h. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 5 ----- fs/btrfs/extent-tree.h | 4 ++++ fs/btrfs/free-space-cache.c | 2 +- fs/btrfs/volumes.c | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) commit 378f25d3fc429ad001fa686f615df5c0f9cd47e1 Author: Filipe Manana Date: Mon Dec 16 16:22:54 2024 +0000 btrfs: move btrfs_alloc_write_mask() into fs.h Currently btrfs_alloc_write_mask() is defined in ctree.h but it's not related at all to the btree data structure, so move it into fs.h. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 6 ------ fs/btrfs/fs.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) commit a4545b74e2de98989c1d14bc48c52c2f9fa734b6 Author: Filipe Manana Date: Mon Dec 16 16:18:35 2024 +0000 btrfs: move BTRFS_BYTES_TO_BLKS() into fs.h Currently BTRFS_BYTES_TO_BLKS() is defined in ctree.h but it's not related at all to the btree data structure, so move it into fs.h. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 --- fs/btrfs/fs.h | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) commit 2205302298af2036e9c164fca025ba7a1ab2c816 Author: Filipe Manana Date: Mon Dec 16 12:58:09 2024 +0000 btrfs: move the folio ordered helpers from ctree.h into fs.h The folio ordered helper macros are defined at ctree.h but this is not the best place since ctree.{h,c} is all about the btree data structure implementation and not a generic module. So move these macros into the fs.h header. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 8 -------- fs/btrfs/fs.h | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) commit a5b3f117daead61c3c9c88cd1159d38fa4ad1362 Author: Filipe Manana Date: Mon Dec 16 12:27:07 2024 +0000 btrfs: move btrfs_is_empty_uuid() from ioctl.c into fs.c It's a generic helper not specific to ioctls and used in several places, so move it out from ioctl.c and into fs.c. While at it change its return type from int to bool and declare the loop variable in the loop itself. This also slightly reduces the module's size. Before this change: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1781492 161037 16920 1959449 1de619 fs/btrfs/btrfs.ko After this change: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1781340 161037 16920 1959297 1de581 fs/btrfs/btrfs.ko Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/fs.c | 9 +++++++++ fs/btrfs/fs.h | 2 ++ fs/btrfs/ioctl.c | 11 ----------- fs/btrfs/ioctl.h | 1 - 4 files changed, 11 insertions(+), 12 deletions(-) commit 0b93369104ac5f65721793e038cafa4b3e58fdba Author: Filipe Manana Date: Mon Dec 16 12:10:19 2024 +0000 btrfs: move the exclusive operation functions into fs.c The declarations for the exclusive operation functions are located at fs.h but their definitions are in ioctl.c, which doesn't make much sense since (most of them) are used in several files other than ioctl.c. Since they are used in several files and they are generic enough, move them out of ioctl.c and into fs.c, even the ones that are currently only used at ioctl.c, for the sake of having them all in the same C file. This also reduces the module's size. Before this change: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1782094 161045 16920 1960059 1de87b fs/btrfs/btrfs.ko After this change: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1781492 161037 16920 1959449 1de619 fs/btrfs/btrfs.ko Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/fs.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/ioctl.c | 80 ------------------------------------------------------- 2 files changed, 81 insertions(+), 80 deletions(-) commit a6f0bcf9b190219fa2686247dfc99a44e597aa11 Author: Filipe Manana Date: Mon Dec 16 11:38:30 2024 +0000 btrfs: move csum related functions from ctree.c into fs.c The ctree module is about the implementation of the btree data structure and not a place holder for generic filesystem things like the csum algorithm details. Move the functions related to the csum algorithm details away from ctree.c and into fs.c, which is a far better place for them. Also fix missing punctuation in comments and change one multiline comment to a single line comment since everything fits in under 80 characters. For some reason this also slightly reduces the module's size. Before this change: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1782126 161045 16920 1960091 1de89b fs/btrfs/btrfs.ko After this change: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1782094 161045 16920 1960059 1de87b fs/btrfs/btrfs.ko Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.c | 51 --------------------------------------------------- fs/btrfs/ctree.h | 6 ------ fs/btrfs/fs.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/fs.h | 6 ++++++ 4 files changed, 55 insertions(+), 57 deletions(-) commit b815a78e17b9dd90398561ec7d91891d95f25301 Author: Filipe Manana Date: Mon Dec 16 11:26:35 2024 +0000 btrfs: move abort_should_print_stack() to transaction.h The function abort_should_print_stack() is declared in transaction.h but its definition is in ctree.c, which doesn't make sense since ctree.c is the btree implementation and the function is related to the transaction code. Move its definition into transaction.h as an inline function since it's a very short and trivial function, and also add the 'btrfs_' prefix into its name. This change also reduces the module size. Before this change: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1783148 161137 16920 1961205 1decf5 fs/btrfs/btrfs.ko After this change: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1782126 161045 16920 1960091 1de89b fs/btrfs/btrfs.ko Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.c | 16 ---------------- fs/btrfs/transaction.h | 18 ++++++++++++++++-- 2 files changed, 16 insertions(+), 18 deletions(-) commit 63e5f9df7cac7a5bf5da9ce6c36364d74be85f55 Author: Johannes Thumshirn Date: Mon Dec 16 09:10:41 2024 +0100 btrfs: pass btrfs_io_geometry to is_single_device_io Now that we have the stripe tree decision saved in struct btrfs_io_geometry we can pass it into is_single_device_io() and get rid of another call to btrfs_need_raid_stripe_tree_update(). Signed-off-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/volumes.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 9c48bcec47c8dd36b66ce1363c29c6a39612f7ad Author: Johannes Thumshirn Date: Mon Dec 16 09:10:40 2024 +0100 btrfs: cache RAID stripe tree decision in btrfs_io_context Cache the decision if a particular I/O needs to update RAID stripe tree entries in struct btrfs_io_context. Signed-off-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/bio.c | 3 +-- fs/btrfs/volumes.c | 1 + fs/btrfs/volumes.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) commit 68ab9825a6a9677b6eab07666750e3fbc006b000 Author: Johannes Thumshirn Date: Mon Dec 16 09:10:39 2024 +0100 btrfs: cache stripe tree usage in struct btrfs_io_geometry Cache the return of btrfs_need_stripe_tree_update() in struct btrfs_io_geometry starting from btrfs_map_block(). Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 88694f74f4853b01dae678fb8d5f2c46948ae620 Author: Filipe Manana Date: Tue Dec 10 11:51:11 2024 +0000 btrfs: add assertions and comment about path expectations to btrfs_cross_ref_exist() We should always call check_delayed_ref() with a path having a locked leaf from the extent tree where either the extent item is located or where it should be located in case it doesn't exist yet (when there's a pending unflushed delayed ref to do it), as we need to lock any existing delayed ref head while holding such leaf locked in order to avoid races with flushing delayed references, which could make us think an extent is not shared when it really is. So add some assertions and a comment about such expectations to btrfs_cross_ref_exist(), which is the only caller of check_delayed_ref(). Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 25 +++++++++++++++++++++++++ fs/btrfs/locking.h | 5 +++++ 2 files changed, 30 insertions(+) commit 2747c555958448eb32fc953b28798c1b55df4e1d Author: Filipe Manana Date: Tue Dec 10 11:41:33 2024 +0000 btrfs: add function comment for check_committed_ref() There are some not immediately obvious details about the operation of check_committed_ref(), namely that when it returns 0 it must return with the path having a locked leaf from the extent tree that contains the extent's extent item, so that we can later check for delayed refs when calling check_delayed_ref() in a way that doesn't race with a task running delayed references. For similar reasons, it must also return with a locked leaf when the extent item is not found, and that leaf is where the extent item should be located, because we may have delayed references that are going to create the extent item. Also document that the function can return false positives in order to not be too slow, and that the most important is to not return false negatives. So add a function comment to check_committed_ref(). Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 9e0d43ea4e69aee29ab58f9cd8c90d2c807c862a Author: Filipe Manana Date: Mon Dec 9 16:59:23 2024 +0000 btrfs: simplify arguments for btrfs_cross_ref_exist() Instead of passing a root and an objectid which matches an inode number, pass the inode instead, since the root is always the root associated to the inode and the objectid is the number of that inode. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 22 ++++++++++++---------- fs/btrfs/extent-tree.h | 3 +-- fs/btrfs/inode.c | 3 +-- 3 files changed, 14 insertions(+), 14 deletions(-) commit adf7da3f261cee646a488d46f2086d6e98e72f57 Author: Filipe Manana Date: Mon Dec 9 16:24:30 2024 +0000 btrfs: simplify return logic at check_committed_ref() Instead of setting the value to return in a local variable 'ret' and then jumping into a label named 'out' that does nothing but return that value, simplify everything by getting rid of the label and directly returning a value. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 78cdfba85df90fe0eb507f2fe86eba7c8f51fe4c Author: Filipe Manana Date: Mon Dec 9 16:07:12 2024 +0000 btrfs: avoid redundant call to get inline ref type at check_committed_ref() At check_committed_ref() we are calling btrfs_get_extent_inline_ref_type() twice, once before we check if have an inline extent owner ref (for simple qgroups) and then once again sometime after that check. This second call is redundant when we have simple quotas disabled or we found an inline ref that is not of the owner ref type. So avoid this second call unless we have simple quotas enabled and found an owner ref, saving a function call that does inline ref validation again. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f000a87fbfe6522a6f43d44d1dfc6af157ce476 Author: Filipe Manana Date: Mon Dec 9 15:52:13 2024 +0000 btrfs: remove the snapshot check from check_committed_ref() At check_committed_ref() we have this check to see if the data extent was created in a generation lower than or equals to the generation where the last snapshot for the root was created, and if so we return immediately with 1, since it's very likely the extent is shared, referenced by other root. The only call chain for check_committed_ref() is the following: can_nocow_file_extent() btrfs_cross_ref_exist() check_committed_ref() And we already do that snapshot check at can_nocow_file_extent(), before we call btrfs_cross_ref_exist(). This makes the check done at check_committed_ref() redundant, so remove it. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 8 -------- 1 file changed, 8 deletions(-) commit 6c440755244e0044b3de37c3e5b334e46b4d93a6 Author: Filipe Manana Date: Mon Dec 9 14:54:51 2024 +0000 btrfs: remove no longer needed strict argument from can_nocow_extent() All callers of can_nocow_extent() now pass a value of false for its 'strict' argument, making it redundant. So remove the argument from can_nocow_extent() as well as can_nocow_file_extent(), btrfs_cross_ref_exist() and check_committed_ref(), because this argument was used just to influence the behavior of check_committed_ref(). Also remove the 'strict' field from struct can_nocow_file_extent_args, which is now always false as well, as its value is taken from the argument to can_nocow_extent(). Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/direct-io.c | 3 +-- fs/btrfs/extent-tree.c | 15 ++++++--------- fs/btrfs/extent-tree.h | 2 +- fs/btrfs/file.c | 2 +- fs/btrfs/inode.c | 11 +++-------- 6 files changed, 13 insertions(+), 22 deletions(-) commit 4016358e852861d3a84a41fb3adea540443f7c96 Author: Johannes Thumshirn Date: Thu Dec 12 13:56:06 2024 +0100 btrfs: remove unused variable length in btrfs_insert_one_raid_extent() Remove the variable length in btrfs_insert_one_raid_extent() as it is unused. Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/raid-stripe-tree.c | 4 ---- 1 file changed, 4 deletions(-) commit d0f038104fa37380e2a725e669508e43d0c503e9 Author: Qu Wenruo Date: Tue Dec 10 15:23:06 2024 +1030 btrfs: output the reason for open_ctree() failure There is a recent ML report that mounting a large fs backed by hardware RAID56 controller (with one device missing) took too much time, and systemd seems to kill the mount attempt. In that case, the only error message is: BTRFS error (device sdj): open_ctree failed There is no reason on why the failure happened, making it very hard to understand the reason. At least output the error number (in the particular case it should be -EINTR) to provide some clue. Link: https://lore.kernel.org/linux-btrfs/9b9c4d2810abcca2f9f76e32220ed9a90febb235.camel@scientia.org/ Reported-by: Christoph Anton Mitterer Cc: stable@vger.kernel.org Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a883120b2d19630d3be56bc9649a71299ccbf95d Author: Qu Wenruo Date: Thu Nov 7 14:35:07 2024 +1030 btrfs: open-code btrfs_copy_from_user() The function btrfs_copy_from_user() handles the folio dirtying for buffered write. The original design is to allow that function to handle multiple folios, but since commit c87c299776e4 ("btrfs: make buffered write to copy one page a time") there is no need to support multiple folios. So here open-code btrfs_copy_from_user() to copy_folio_from_iter_atomic() and flush_dcache_folio() calls. The short-copy check and revert are still kept as-is. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/file.c | 66 ++++++++++++++++----------------------------------------- 1 file changed, 18 insertions(+), 48 deletions(-) commit c0def46dec9c547679a25fe7552c4bcbec0b0dd2 Author: Qu Wenruo Date: Mon Nov 11 07:29:07 2024 +1030 btrfs: improve the warning and error message for btrfs_remove_qgroup() [WARNING] There are several warnings about the recently introduced qgroup auto-removal that it triggers WARN_ON() for the non-zero rfer/excl numbers, e.g: ------------[ cut here ]------------ WARNING: CPU: 67 PID: 2882 at fs/btrfs/qgroup.c:1854 btrfs_remove_qgroup+0x3df/0x450 CPU: 67 UID: 0 PID: 2882 Comm: btrfs-cleaner Kdump: loaded Not tainted 6.11.6-300.fc41.x86_64 #1 RIP: 0010:btrfs_remove_qgroup+0x3df/0x450 Call Trace: btrfs_qgroup_cleanup_dropped_subvolume+0x97/0xc0 btrfs_drop_snapshot+0x44e/0xa80 btrfs_clean_one_deleted_snapshot+0xc3/0x110 cleaner_kthread+0xd8/0x130 kthread+0xd2/0x100 ret_from_fork+0x34/0x50 ret_from_fork_asm+0x1a/0x30 ---[ end trace 0000000000000000 ]--- BTRFS warning (device sda): to be deleted qgroup 0/319 has non-zero numbers, rfer 258478080 rfer_cmpr 258478080 excl 0 excl_cmpr 0 [CAUSE] Although the root cause is still unclear, as if qgroup is consistent a fully dropped subvolume (with extra transaction committed) should lead to all zero numbers for the qgroup. My current guess is the subvolume drop triggered the new subtree drop threshold thus marked qgroup inconsistent, then rescan cleared it but some corner case is not properly handled during subvolume dropping. But at least for this particular case, since it's only the rfer/excl not properly reset to 0, and qgroup is already marked inconsistent, there is nothing to be worried for the end users. The user space tool utilizing qgroup would queue a rescan to handle everything, so the kernel wanring is a little overkilled. [ENHANCEMENT] Enhance the warning inside btrfs_remove_qgroup() by: - Only do WARN() if CONFIG_BTRFS_DEBUG is enabled As explained the kernel can handle inconsistent qgroups by simply do a rescan, there is nothing to bother the end users. - Treat the reserved space leak the same as non-zero numbers By outputting the values and trigger a WARN() if it's a debug build. So far I haven't experienced any case related to reserved space so I hope we will never need to bother them. Fixes: 839d6ea4f86d ("btrfs: automatically remove the subvolume qgroup") Link: https://github.com/kdave/btrfs-progs/issues/922 Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/qgroup.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit f974bc3c9ac0025b89195d605ed8543763232eeb Author: Josef Bacik Date: Thu Oct 3 11:43:12 2024 -0400 btrfs: remove detached list from struct btrfs_backref_cache We don't ever look at this list, remove it. Reviewed-by: Boris Burkov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/backref.c | 2 -- fs/btrfs/backref.h | 2 -- fs/btrfs/relocation.c | 1 - 3 files changed, 5 deletions(-) commit b61e0eb0374299ab5fdd5a767f2759907dc41e1e Author: Josef Bacik Date: Thu Oct 3 11:43:11 2024 -0400 btrfs: remove the ->lowest and ->leaves members from struct btrfs_backref_node Before we were keeping all of our nodes on various lists in order to make sure everything got cleaned up correctly. We used node->lowest to indicate that node->lower was linked into the cache->leaves list. Now that we do cleanup based on the rb-tree both the list and the flag are useless, so delete them both. Reviewed-by: Boris Burkov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/backref.c | 19 ------------------- fs/btrfs/backref.h | 4 ---- fs/btrfs/relocation.c | 7 ------- 3 files changed, 30 deletions(-) commit 29e74a12a31456ee29d83ea83a545767111517de Author: Josef Bacik Date: Thu Oct 3 11:43:10 2024 -0400 btrfs: simplify btrfs_backref_release_cache() We rely on finding all our nodes on the various lists in the backref cache, when they are all also in the rbtree. Instead just search through the rbtree and free everything. Reviewed-by: Boris Burkov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/backref.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) commit 4eb8064dc9230a2f58c9df13d59e53265b0cc8e6 Author: Josef Bacik Date: Thu Oct 3 11:43:09 2024 -0400 btrfs: do not handle non-shareable roots in backref cache Now that we handle relocation for non-shareable roots without using the backref cache, remove the ->cowonly field from the backref nodes and update the handling to throw an error. Reviewed-by: Boris Burkov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/backref.c | 50 +++++++++++++++++++++++--------------------------- fs/btrfs/backref.h | 2 -- fs/btrfs/relocation.c | 2 +- 3 files changed, 24 insertions(+), 30 deletions(-) commit 46bb6765d31138abe436b37a4f271895f7751bf2 Author: Josef Bacik Date: Thu Oct 3 11:43:08 2024 -0400 btrfs: don't build backref tree for COW-only blocks We already determine the owner for any blocks we find when we're relocating, and for COW-only blocks (and the data reloc tree) we COW down to the block and call it good enough. However we still build a whole backref tree for them, even though we're not going to use it, and then just don't put these blocks in the cache. Rework the code to check if the block belongs to a COW-only root or the data reloc root, and then just cow down to the block, skipping the backref cache generation. Reviewed-by: Boris Burkov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/relocation.c | 92 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 73 insertions(+), 19 deletions(-) commit 0097422c0dfe0a943cf879777cabf299bb6258f7 Author: Josef Bacik Date: Thu Oct 3 11:43:07 2024 -0400 btrfs: remove clone_backref_node() from relocation Since we no longer maintain backref cache across transactions, and this is only called when we're creating the reloc root for a newly created snapshot in the transaction critical section, we will end up doing a bunch of work that will just get thrown away when we start the transaction in the relocation loop. Delete this code as it no longer does anything for us. Reviewed-by: Boris Burkov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/relocation.c | 91 +-------------------------------------------------- 1 file changed, 1 insertion(+), 90 deletions(-) commit 551d04a32a9e0b498c44e545ec27ed4553c59305 Author: Josef Bacik Date: Thu Oct 3 11:43:06 2024 -0400 btrfs: simplify loop in select_reloc_root() We have this setup as a loop, but in reality we will never walk back up the backref tree, if we do then it's a bug. Get rid of the loop and handle the case where we have node->new_bytenr set at all. Previous check was only if node->new_bytenr != root->node->start, but if it did then we would hit the WARN_ON() and walk back up the tree. Instead we want to just return error if ->new_bytenr is set, and then do the normal updating of the node for the reloc root and carry on. Reviewed-by: Boris Burkov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/relocation.c | 135 ++++++++++++++++++++------------------------------ 1 file changed, 55 insertions(+), 80 deletions(-) commit cb7de8ee9c50d86c7ea0f48c6bf50bab84613f22 Author: Josef Bacik Date: Thu Oct 3 11:43:05 2024 -0400 btrfs: add a comment for new_bytenr in backref_cache_node Add a comment for this field so we know what it is used for. Previously we used it to update the backref cache, so people may mistakenly think it is useless, but in fact exists to make sure the backref cache makes sense. Reviewed-by: Boris Burkov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/backref.h | 6 ++++++ 1 file changed, 6 insertions(+) commit b1d4d5d1d8cf42a97e2e2bb7e7c2a965cef78dc4 Author: Josef Bacik Date: Thu Oct 3 11:43:04 2024 -0400 btrfs: remove the changed list for backref cache Now that we're not updating the backref cache when we switch transids we can remove the changed list. We're going to keep the new_bytenr field because it serves as a good sanity check for the backref cache and relocation, and can prevent us from making extent tree corruption worse. Reviewed-by: Boris Burkov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/backref.c | 2 -- fs/btrfs/backref.h | 2 -- fs/btrfs/relocation.c | 22 ++++++++-------------- 3 files changed, 8 insertions(+), 18 deletions(-) commit 6a4730b325aaa48f7a5d5ba97aff0a955e2d9cec Author: Josef Bacik Date: Thu Oct 3 11:43:03 2024 -0400 btrfs: convert BUG_ON in btrfs_reloc_cow_block() to proper error handling This BUG_ON is meant to catch backref cache problems, but these can arise from either bugs in the backref cache or corruption in the extent tree. Fix it to be a proper error. Reviewed-by: Boris Burkov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/relocation.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 5324c4e10e9c2ce307a037e904c0d9671d7137d9 Author: Hao-ran Zheng Date: Tue Dec 3 15:56:51 2024 +0800 btrfs: fix data race when accessing the inode's disk_i_size at btrfs_drop_extents() A data race occurs when the function `insert_ordered_extent_file_extent()` and the function `btrfs_inode_safe_disk_i_size_write()` are executed concurrently. The function `insert_ordered_extent_file_extent()` is not locked when reading inode->disk_i_size, causing `btrfs_inode_safe_disk_i_size_write()` to cause data competition when writing inode->disk_i_size, thus affecting the value of `modify_tree`. The specific call stack that appears during testing is as follows: ============DATA_RACE============ btrfs_drop_extents+0x89a/0xa060 [btrfs] insert_reserved_file_extent+0xb54/0x2960 [btrfs] insert_ordered_extent_file_extent+0xff5/0x1760 [btrfs] btrfs_finish_one_ordered+0x1b85/0x36a0 [btrfs] btrfs_finish_ordered_io+0x37/0x60 [btrfs] finish_ordered_fn+0x3e/0x50 [btrfs] btrfs_work_helper+0x9c9/0x27a0 [btrfs] process_scheduled_works+0x716/0xf10 worker_thread+0xb6a/0x1190 kthread+0x292/0x330 ret_from_fork+0x4d/0x80 ret_from_fork_asm+0x1a/0x30 ============OTHER_INFO============ btrfs_inode_safe_disk_i_size_write+0x4ec/0x600 [btrfs] btrfs_finish_one_ordered+0x24c7/0x36a0 [btrfs] btrfs_finish_ordered_io+0x37/0x60 [btrfs] finish_ordered_fn+0x3e/0x50 [btrfs] btrfs_work_helper+0x9c9/0x27a0 [btrfs] process_scheduled_works+0x716/0xf10 worker_thread+0xb6a/0x1190 kthread+0x292/0x330 ret_from_fork+0x4d/0x80 ret_from_fork_asm+0x1a/0x30 ================================= The main purpose of the check of the inode's disk_i_size is to avoid taking write locks on a btree path when we have a write at or beyond EOF, since in these cases we don't expect to find extent items in the root to drop. However if we end up taking write locks due to a data race on disk_i_size, everything is still correct, we only add extra lock contention on the tree in case there's concurrency from other tasks. If the race causes us to not take write locks when we actually need them, then everything is functionally correct as well, since if we find out we have extent items to drop and we took read locks (modify_tree set to 0), we release the path and retry again with write locks. Since this data race does not affect the correctness of the function, it is a harmless data race, use data_race() to check inode->disk_i_size. Reviewed-by: Filipe Manana Signed-off-by: Hao-ran Zheng Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6f0da564c668a9565c81c61c06b32e8ed981ec3 Author: Johannes Thumshirn Date: Sun Dec 1 21:48:53 2024 -0800 btrfs: don't BUG_ON() in btrfs_drop_extents() btrfs_drop_extents() calls BUG_ON() in case the counter of to be deleted extents is greater than 0. But all of these code paths can handle errors, so there's no need to crash the kernel. Instead WARN() that the condition has been met and gracefully bail out. Reviewed-by: Filipe Manana Reviewed-by: Qu Wenruo Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba fs/btrfs/file.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit 453a73c3069a268c3c4dd00695fc2a95f7880438 Author: Naohiro Aota Date: Thu Nov 14 17:04:29 2024 +0900 btrfs: zoned: reclaim unused zone by zone resetting On the zoned mode, once used and freed region is still not reusable after the freeing. The underlying zone needs to be reset before reusing. Btrfs resets a zone when it removes a block group, and then new block group is allocated on the zones to reuse the zones. But, it is sometime too late to catch up with a write side. This commit introduces a new space-info reclaim method ZONE_RESET. That will pick a block group from the unused list and reset its zone to reuse the zone_unusable space. It is faster than removing the block group and re-creating a new block group on the same zones. For the first implementation, the ZONE_RESET is only applied to a block group whose region is fully zone_unusable. Reclaiming partial zone_unusable block group could be implemented later. Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/space-info.c | 28 +++++++++- fs/btrfs/space-info.h | 5 ++ fs/btrfs/zoned.c | 124 +++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/zoned.h | 7 +++ include/trace/events/btrfs.h | 3 +- 5 files changed, 164 insertions(+), 3 deletions(-) commit 7de9ca1f30b7002a237e3119a8a4a54f26988b92 Author: Naohiro Aota Date: Thu Nov 14 17:04:28 2024 +0900 btrfs: drop fs_info argument from btrfs_update_space_info_*() Since commit e1e577aafe41 ("btrfs: store fs_info in space_info"), we have the fs_info in a space_info. So, we can drop fs_info argument from btrfs_update_space_info_*. There is no behavior change. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/block-group.c | 16 ++++++---------- fs/btrfs/block-rsv.c | 10 +++------- fs/btrfs/delalloc-space.c | 2 +- fs/btrfs/delayed-ref.c | 5 ++--- fs/btrfs/extent-tree.c | 10 +++------- fs/btrfs/inode.c | 2 +- fs/btrfs/space-info.c | 14 +++++--------- fs/btrfs/space-info.h | 9 ++++----- fs/btrfs/transaction.c | 3 +-- 9 files changed, 26 insertions(+), 45 deletions(-) commit 3704db1013232465ee3db742dc31853c44daf68c Author: Naohiro Aota Date: Thu Nov 14 17:04:27 2024 +0900 btrfs: factor out btrfs_return_free_space() Factor out a part of unpin_extent_range() that returns space back to the space info, prioritizing global block reserve. Also, move the "len" variable into the loop to clarify we don't need to carry it beyond an iteration. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 25 ++++--------------------- fs/btrfs/space-info.c | 29 +++++++++++++++++++++++++++++ fs/btrfs/space-info.h | 1 + 3 files changed, 34 insertions(+), 21 deletions(-) commit bfcf6d04f8ee817b2cb7c238e0a14392a3245f45 Author: Allison Karlitskaya Date: Tue Nov 26 16:23:31 2024 +0100 btrfs: handle FS_IOC_READ_VERITY_METADATA ioctl Commit 146054090b08 ("btrfs: initial fsverity support") introduced fs-verity support for btrfs, but didn't add support for FS_IOC_READ_VERITY_METADATA to directly query the Merkle tree, descriptor and signature blocks for fs-verity enabled files. Add the (trival) implementation: we just need to wire it through to the fs-verity code, the same way as is done in the other two filesystems which support this ioctl (ext4, f2fs). The fs-verity code already has access to the required data. This is also safe to backport to older stable trees (5.15+) if needed. Signed-off-by: Allison Karlitskaya Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ioctl.c | 2 ++ 1 file changed, 2 insertions(+) commit d0ad40d730ef30e51d3ec4e3b8c9b6691053354a Author: Colin Ian King Date: Wed Nov 13 13:00:12 2024 +0000 btrfs: send: remove redundant assignments to variable ret The variable ret is being initialized to zero and also later re-assigned to zero. In both cases the assignment is redundant since the value is never read after the assignment and hence they can be removed. Signed-off-by: Colin Ian King Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/send.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 27602f1d1b6edfad7694b9979b86860e0bc00b36 Author: Qu Wenruo Date: Mon Nov 25 09:13:24 2024 +1030 btrfs: use PTR_ERR() instead of PTR_ERR_OR_ZERO() for btrfs_get_extent() The function btrfs_get_extent() will only return an PTR_ERR() or a valid extent map pointer. It will not return NULL. Thus the usage of PTR_ERR_OR_ZERO() inside submit_one_sector() is not needed, use plain PTR_ERR() instead, and that is the only usage of PTR_ERR_OR_ZERO() after btrfs_get_extent(). Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b34879d97e27b74e8e933463f5e9073d9d39821 Author: Josef Bacik Date: Thu Nov 14 10:03:34 2024 -0500 btrfs: selftests: add delayed ref self test cases The recent fix for a stupid mistake I made uncovered the fact that we don't have adequate testing in the delayed refs code, as it took a pretty extensive and long running stress test to uncover something that a unit test would have uncovered right away. Fix this by adding a delayed refs self test suite. This will validate that the btrfs_ref transformation does the correct thing, that we do the correct thing when merging delayed refs, and that we get the delayed refs in the order that we expect. These are all crucial to how the delayed refs operate. I introduced various bugs (including the original bug) into the delayed refs code to validate that these tests caught all of the shenanigans that I could think of. Reviewed-by: Boris Burkov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/Makefile | 2 +- fs/btrfs/delayed-ref.c | 13 +- fs/btrfs/tests/btrfs-tests.c | 18 + fs/btrfs/tests/btrfs-tests.h | 6 + fs/btrfs/tests/delayed-refs-tests.c | 1015 +++++++++++++++++++++++++++++++++++ 5 files changed, 1050 insertions(+), 4 deletions(-) commit 5473aeedffa49e036d9d313148e3fa96af85c0a6 Author: Josef Bacik Date: Wed Nov 13 13:20:37 2024 -0500 btrfs: move select_delayed_ref() and export it This helper is how we select the delayed ref to run once we've selected the delayed ref head. I need this exported to add a unit test for delayed refs, and it's more natural home is in delayed-ref.c. Rename it to btrfs_select_delayed_ref and move it into delayed-ref.c. Reviewed-by: Boris Burkov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/delayed-ref.c | 26 ++++++++++++++++++++++++++ fs/btrfs/delayed-ref.h | 1 + fs/btrfs/extent-tree.c | 26 +------------------------- 3 files changed, 28 insertions(+), 25 deletions(-) commit f73780e772c06901e99b2ad114b7f0f3fbe73ad4 Author: Zijun Hu Date: Thu Jan 9 21:26:57 2025 +0800 of: property: Avoiding using uninitialized variable @imaplen in parse_interrupt_map() parse_interrupt_map() will use uninitialized variable @imaplen if fails to get property 'interrupt-map'. Fix by using the variable after successfully getting the property. Fixes: e7985f43609c ("of: property: Fix fw_devlink handling of interrupt-map") Signed-off-by: Zijun Hu Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-6-db8a72415b8c@quicinc.com Signed-off-by: Rob Herring (Arm) drivers/of/property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2737dee1067c2fc02256b2b15dab158c5e840568 Author: Bibo Mao Date: Mon Jan 13 21:37:17 2025 +0800 LoongArch: KVM: Add hypercall service support for usermode VMM Some VMMs provides special hypercall service in usermode, KVM should not handle the usermode hypercall service, thus pass it to usermode, let the usermode VMM handle it. Here a new code KVM_HCALL_CODE_USER_SERVICE is added for the user-mode hypercall service, KVM lets all six registers visible to usermode VMM. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen arch/loongarch/include/asm/kvm_host.h | 1 + arch/loongarch/include/asm/kvm_para.h | 3 +++ arch/loongarch/include/asm/kvm_vcpu.h | 1 + arch/loongarch/include/uapi/asm/kvm_para.h | 1 + arch/loongarch/kvm/exit.c | 30 ++++++++++++++++++++++++++++++ arch/loongarch/kvm/vcpu.c | 7 ++++++- 6 files changed, 42 insertions(+), 1 deletion(-) commit 4d38d0416ece7bab532e89a49f988a9954f12ee9 Author: Bibo Mao Date: Mon Jan 13 21:37:17 2025 +0800 LoongArch: KVM: Clear LLBCTL if secondary mmu mapping is changed LLBCTL is a separated guest CSR register from host, host exception ERET instruction will clear the host LLBCTL CSR register, and guest exception will clear the guest LLBCTL CSR register. VCPU0 atomic64_fetch_add_unless VCPU1 atomic64_fetch_add_unless ll.d %[p], %[c] beq %[p], %[u], 1f Here secondary mmu mapping is changed, host hpa page is replaced with a new page. And VCPU1 will execute atomic instruction on the new page. ll.d %[p], %[c] beq %[p], %[u], 1f add.d %[rc], %[p], %[a] sc.d %[rc], %[c] add.d %[rc], %[p], %[a] sc.d %[rc], %[c] LLBCTL is set on VCPU0 and it represents the memory is not modified by other VCPUs, sc.d will modify the memory directly. So clear WCLLB of the guest LLBCTL register when mapping is the changed. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen arch/loongarch/kvm/main.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit a1a771e5f1e31e4764d9a225c02e93969d3f5389 Author: Shengjiu Wang Date: Mon Jan 13 17:03:21 2025 +0800 ASoC: dt-bindings: fsl,mqs: Add compatible string for i.MX943 platform There are two MQS instances on the i.MX943 platform. The definition of bit positions in the control register are different. In order to support these MQS modules, define two compatible strings to distinguish them. As one instance is in the always-on domain, another is in the wakeup domain, so the compatible strings are "fsl,imx943-aonmix-mqs", "fsl,imx943-wakeupmix-mqs". Signed-off-by: Shengjiu Wang Reviewed-by: Daniel Baluta Link: https://patch.msgid.link/20250113090321.3193464-3-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/fsl,mqs.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 6f490e6b2c34792e363685bacb48a759e7e40cd1 Author: Shengjiu Wang Date: Mon Jan 13 17:03:20 2025 +0800 ASoC: fsl_mqs: Add i.MX943 platform support There are two MQS instances on the i.MX943 platform. The definition of bit positions in the control register are different. In order to support these MQS modules, define two compatible strings to distinguish them. On i.MX943 one instance is in Always-on mix, another is in Wakeup-mix. Signed-off-by: Shengjiu Wang Reviewed-by: Daniel Baluta Link: https://patch.msgid.link/20250113090321.3193464-2-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/fsl/fsl_mqs.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 7d9da040575b343085287686fa902a5b2d43c7ca Author: Chengming Zhou Date: Fri Dec 27 06:19:41 2024 +0000 psi: Fix race when task wakes up before psi_sched_switch() adjusts flags When running hackbench in a cgroup with bandwidth throttling enabled, following PSI splat was observed: psi: inconsistent task state! task=1831:hackbench cpu=8 psi_flags=14 clear=0 set=4 When investigating the series of events leading up to the splat, following sequence was observed: [008] d..2.: sched_switch: ... ==> next_comm=hackbench next_pid=1831 next_prio=120 ... [008] dN.2.: dequeue_entity(task delayed): task=hackbench pid=1831 cfs_rq->throttled=0 [008] dN.2.: pick_task_fair: check_cfs_rq_runtime() throttled cfs_rq on CPU8 # CPU8 goes into newidle balance and releases the rq lock ... # CPU15 on same LLC Domain is trying to wakeup hackbench(pid=1831) [015] d..4.: psi_flags_change: psi: task state: task=1831:hackbench cpu=8 psi_flags=14 clear=0 set=4 final=14 # Splat (cfs_rq->throttled=1) [015] d..4.: sched_wakeup: comm=hackbench pid=1831 prio=120 target_cpu=008 # Task has woken on a throttled hierarchy [008] d..2.: sched_switch: prev_comm=hackbench prev_pid=1831 prev_prio=120 prev_state=S ==> ... psi_dequeue() relies on psi_sched_switch() to set the correct PSI flags for the blocked entity, however, with the introduction of DELAY_DEQUEUE, the block task can wakeup when newidle balance drops the runqueue lock during __schedule(). If a task wakes before psi_sched_switch() adjusts the PSI flags, skip any modifications in psi_enqueue() which would still see the flags of a running task and not a blocked one. Instead, rely on psi_sched_switch() to do the right thing. Since the status returned by try_to_block_task() may no longer be true by the time schedule reaches psi_sched_switch(), check if the task is blocked or not using a combination of task_on_rq_queued() and p->se.sched_delayed checks. [ prateek: Commit message, testing, early bailout in psi_enqueue() ] Fixes: 152e11f6df29 ("sched/fair: Implement delayed dequeue") # 1a6151017ee5 Signed-off-by: Chengming Zhou Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Chengming Zhou Link: https://lore.kernel.org/r/20241227061941.2315-1-kprateek.nayak@amd.com kernel/sched/core.c | 6 +++--- kernel/sched/stats.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) commit a6fd16148fdd7e9da143037106956a3447c247a8 Author: Yafang Shao Date: Fri Jan 3 10:24:08 2025 +0800 sched, psi: Don't account irq time if sched_clock_irqtime is disabled sched_clock_irqtime may be disabled due to the clock source. When disabled, irq_time_read() won't change over time, so there is nothing to account. We can save iterating the whole hierarchy on every tick and context switch. Signed-off-by: Yafang Shao Signed-off-by: Yafang Shao Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Michal Koutný Acked-by: Johannes Weiner Link: https://lore.kernel.org/r/20250103022409.2544-4-laoar.shao@gmail.com kernel/sched/psi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 763a744e24a8cfbcc13f699dcdae13a627b8588e Author: Yafang Shao Date: Fri Jan 3 10:24:07 2025 +0800 sched: Don't account irq time if sched_clock_irqtime is disabled sched_clock_irqtime may be disabled due to the clock source, in which case IRQ time should not be accounted. Let's add a conditional check to avoid unnecessary logic. Signed-off-by: Yafang Shao Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Michal Koutný Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20250103022409.2544-3-laoar.shao@gmail.com kernel/sched/core.c | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) commit 8722903cbb8f0d51057fbf9ef1c680756b74119e Author: Yafang Shao Date: Fri Jan 3 10:24:06 2025 +0800 sched: Define sched_clock_irqtime as static key Since CPU time accounting is a performance-critical path, let's define sched_clock_irqtime as a static key to minimize potential overhead. Signed-off-by: Yafang Shao Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Michal Koutný Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20250103022409.2544-2-laoar.shao@gmail.com kernel/sched/cputime.c | 16 +++++++--------- kernel/sched/sched.h | 13 +++++++++++++ 2 files changed, 20 insertions(+), 9 deletions(-) commit 3229adbe787534b43430f92e10175c9b77f2d27c Author: K Prateek Nayak Date: Mon Dec 23 04:34:06 2024 +0000 sched/fair: Do not compute overloaded status unnecessarily during lb Only set sg_overloaded when computing sg_lb_stats() at the highest sched domain since rd->overloaded status is updated only when load balancing at the highest domain. While at it, move setting of sg_overloaded below idle_cpu() check since an idle CPU can never be overloaded. Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Reviewed-by: Shrikanth Hegde Link: https://lore.kernel.org/r/20241223043407.1611-8-kprateek.nayak@amd.com kernel/sched/fair.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 0ac1ee9ebfb7fa2af4a267fe0e8fa275ba8ec6fc Author: K Prateek Nayak Date: Mon Dec 23 04:34:05 2024 +0000 sched/fair: Do not compute NUMA Balancing stats unnecessarily during lb Aggregate nr_numa_running and nr_preferred_running when load balancing at NUMA domains only. While at it, also move the aggregation below the idle_cpu() check since an idle CPU cannot have any preferred tasks. Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Shrikanth Hegde Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20241223043407.1611-7-kprateek.nayak@amd.com kernel/sched/fair.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit e1bc02646527fc1ed74f00eb599b2b74d49671c7 Author: K Prateek Nayak Date: Mon Dec 23 04:34:04 2024 +0000 x86/topology: Use x86_sched_itmt_flags for PKG domain unconditionally x86_sched_itmt_flags() returns SD_ASYM_PACKING if ITMT support is enabled by the system. Without ITMT support being enabled, it returns 0 similar to current x86_die_flags() on non-Hybrid systems (!X86_HYBRID_CPU and !X86_FEATURE_AMD_HETEROGENEOUS_CORES) On Intel systems that enable ITMT support, either the MC domain coincides with the PKG domain, or in case of multiple MC groups within a PKG domain, either Sub-NUMA Cluster (SNC) is enabled or the processor features Hybrid core layout (X86_HYBRID_CPU) which leads to three distinct possibilities: o If PKG and MC domains coincide, PKG domain is degenerated by sd_parent_degenerate() when building sched domain topology. o If SNC is enabled, PKG domain is never added since "x86_has_numa_in_package" is set and the topology will instead contain NODE and NUMA domains. o On X86_HYBRID_CPU which contains multiple MC groups within the PKG, the PKG domain requires x86_sched_itmt_flags(). Thus, on Intel systems that contains multiple MC groups within the PKG and enables ITMT support, the PKG domain requires x86_sched_itmt_flags(). In all other cases PKG domain is either never added or is degenerated. Thus, returning x86_sched_itmt_flags() unconditionally at PKG domain on Intel systems should not lead to any functional changes. On AMD systems with multiple LLCs (MC groups) within a PKG domain, enabling ITMT support requires setting SD_ASYM_PACKING to the PKG domain since the core rankings are assigned PKG-wide. Core rankings on AMD processors is currently set by the amd-pstate driver when Preferred Core feature is supported. A subset of systems that support Preferred Core feature can be detected using X86_FEATURE_AMD_HETEROGENEOUS_CORES however, this does not cover all the systems that support Preferred Core ranking. Detecting Preferred Core support on AMD systems requires inspecting CPPC Highest Perf on all present CPUs and checking if it differs on at least one CPU. Previous suggestion to use a synthetic feature to detect Preferred Core support [1] was found to be non-trivial to implement since BSP alone cannot detect if Preferred Core is supported and by the time AP comes up, alternatives are patched and setting a X86_FEATURE_* then is not possible. Since x86 processors enabling ITMT support that consists multiple non-NUMA MC groups within a PKG requires SD_ASYM_PACKING flag set at the PKG domain, return x86_sched_itmt_flags unconditionally for the PKG domain. Since x86_die_flags() would have just returned x86_sched_itmt_flags() after the change, remove the unnecessary wrapper and pass x86_sched_itmt_flags() directly as the flags function. Fixes: f3a052391822 ("cpufreq: amd-pstate: Enable amd-pstate preferred core support") Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Tim Chen Link: https://lore.kernel.org/r/20241223043407.1611-6-kprateek.nayak@amd.com arch/x86/kernel/smpboot.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 537e247879589f6bace747e3479e4abf42dbbbdc Author: K Prateek Nayak Date: Mon Dec 23 04:34:03 2024 +0000 x86/topology: Remove x86_smt_flags and use cpu_smt_flags directly x86_*_flags() wrappers were introduced with commit d3d37d850d1d ("x86/sched: Add SD_ASYM_PACKING flags to x86 ITMT CPU") to add x86_sched_itmt_flags() in addition to the default domain flags for SMT and MC domain. commit 995998ebdebd ("x86/sched: Remove SD_ASYM_PACKING from the SMT domain flags") removed the ITMT flags for SMT domain but not the x86_smt_flags() wrappers which directly returns cpu_smt_flags(). Remove x86_smt_flags() and directly use cpu_smt_flags() to derive the flags for SMT domain. No functional changes intended. Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Tim Chen Link: https://lore.kernel.org/r/20241223043407.1611-5-kprateek.nayak@amd.com arch/x86/kernel/smpboot.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit d04013a4b21bd5a4e10c42f71ed1e5e299cacdfe Author: K Prateek Nayak Date: Mon Dec 23 04:34:02 2024 +0000 x86/itmt: Move the "sched_itmt_enabled" sysctl to debugfs "sched_itmt_enabled" was only introduced as a debug toggle for any funky ITMT behavior. Move the sysctl controlled from "/proc/sys/kernel/sched_itmt_enabled" to debugfs at "/sys/kernel/debug/x86/sched_itmt_enabled" with a notable change that a cat on the file will return "Y" or "N" instead of "1" or "0" to indicate that feature is enabled or disabled respectively. Either "0" or "N" (or any string that kstrtobool() interprets as false) can be written to the file will disable the feature, and writing either "1" or "Y" (or any string that kstrtobool() interprets as true) will enable it back when the platform supports ITMT ranking. Since ITMT is x86 specific (and PowerPC uses SD_ASYM_PACKING too), the toggle was moved to "/sys/kernel/debug/x86/" as opposed to "/sys/kernel/debug/sched/" Suggested-by: Peter Zijlstra Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Tim Chen Link: https://lore.kernel.org/r/20241223043407.1611-4-kprateek.nayak@amd.com arch/x86/kernel/itmt.c | 56 ++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 29 deletions(-) commit fc1055d5334f1808e3e445592a83f31624b953f1 Author: K Prateek Nayak Date: Mon Dec 23 04:34:01 2024 +0000 x86/itmt: Use guard() for itmt_update_mutex Use guard() for itmt_update_mutex which avoids the extra mutex_unlock() in the bailout and return paths. Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Tim Chen Link: https://lore.kernel.org/r/20241223043407.1611-3-kprateek.nayak@amd.com arch/x86/kernel/itmt.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) commit 2f6f726bdda5f24227de10bc599038e0ca0d65f4 Author: K Prateek Nayak Date: Mon Dec 23 04:34:00 2024 +0000 x86/itmt: Convert "sysctl_sched_itmt_enabled" to boolean In preparation to move "sysctl_sched_itmt_enabled" to debugfs, convert the unsigned int to bool since debugfs readily exposes boolean fops primitives (debugfs_read_file_bool, debugfs_write_file_bool) which can streamline the conversion. Since the current ctl_table initializes extra1 and extra2 to SYSCTL_ZERO and SYSCTL_ONE respectively, the value of "sysctl_sched_itmt_enabled" can only be 0 or 1 and this datatype conversion should not cause any functional changes. Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Tim Chen Link: https://lore.kernel.org/r/20241223043407.1611-2-kprateek.nayak@amd.com arch/x86/include/asm/topology.h | 4 ++-- arch/x86/kernel/itmt.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 873199d27bb25889ab7ccca03c8f30c67f18ae52 Author: Hao Jia Date: Mon Dec 23 17:14:46 2024 +0800 sched/core: Prioritize migrating eligible tasks in sched_balance_rq() When the PLACE_LAG scheduling feature is enabled and dst_cfs_rq->nr_queued is greater than 1, if a task is ineligible (lag < 0) on the source cpu runqueue, it will also be ineligible when it is migrated to the destination cpu runqueue. Because we will keep the original equivalent lag of the task in place_entity(). So if the task was ineligible before, it will still be ineligible after migration. So in sched_balance_rq(), we prioritize migrating eligible tasks, and we soft-limit ineligible tasks, allowing them to migrate only when nr_balance_failed is non-zero to avoid load-balancing trying very hard to balance the load. Below are some benchmark test results. From my test results, this patch shows a slight improvement on hackbench. Benchmark ========= All of the benchmarks are done inside a normal cpu cgroup in a clean environment with cpu turbo disabled, and test machine is: Single NUMA machine model is 13th Gen Intel(R) Core(TM) i7-13700, 12 Core/24 HT. Based on master b86545e02e8c. Results ======= hackbench-process-pipes vanilla patched Amean 1 0.5837 ( 0.00%) 0.5733 ( 1.77%) Amean 4 1.4423 ( 0.00%) 1.4503 ( -0.55%) Amean 7 2.5147 ( 0.00%) 2.4773 ( 1.48%) Amean 12 3.9347 ( 0.00%) 3.8880 ( 1.19%) Amean 21 5.3943 ( 0.00%) 5.3873 ( 0.13%) Amean 30 6.7840 ( 0.00%) 6.6660 ( 1.74%) Amean 48 9.8313 ( 0.00%) 9.6100 ( 2.25%) Amean 79 15.4403 ( 0.00%) 14.9580 ( 3.12%) Amean 96 18.4970 ( 0.00%) 17.9533 ( 2.94%) hackbench-process-sockets vanilla patched Amean 1 0.6297 ( 0.00%) 0.6223 ( 1.16%) Amean 4 2.1517 ( 0.00%) 2.0887 ( 2.93%) Amean 7 3.6377 ( 0.00%) 3.5670 ( 1.94%) Amean 12 6.1277 ( 0.00%) 5.9290 ( 3.24%) Amean 21 10.0380 ( 0.00%) 9.7623 ( 2.75%) Amean 30 14.1517 ( 0.00%) 13.7513 ( 2.83%) Amean 48 24.7253 ( 0.00%) 24.2287 ( 2.01%) Amean 79 43.9523 ( 0.00%) 43.2330 ( 1.64%) Amean 96 54.5310 ( 0.00%) 53.7650 ( 1.40%) tbench4 Throughput vanilla patched Hmean 1 255.97 ( 0.00%) 275.01 ( 7.44%) Hmean 2 511.60 ( 0.00%) 544.27 ( 6.39%) Hmean 4 996.70 ( 0.00%) 1006.57 ( 0.99%) Hmean 8 1646.46 ( 0.00%) 1649.15 ( 0.16%) Hmean 16 2259.42 ( 0.00%) 2274.35 ( 0.66%) Hmean 32 4725.48 ( 0.00%) 4735.57 ( 0.21%) Hmean 64 4411.47 ( 0.00%) 4400.05 ( -0.26%) Hmean 96 4284.31 ( 0.00%) 4267.39 ( -0.39%) Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Hao Jia Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20241223091446.90208-1-jiahao.kernel@gmail.com kernel/sched/fair.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 8061b9f5e111a3012f8b691e5b75dd81eafbb793 Author: David Rientjes Date: Thu Jan 9 16:24:33 2025 -0800 sched/debug: Change need_resched warnings to pr_err need_resched warnings, if enabled, are treated as WARNINGs. If kernel.panic_on_warn is enabled, then this causes a kernel panic. It's highly unlikely that a panic is desired for these warnings, only a stack trace is normally required to debug and resolve. Thus, switch need_resched warnings to simply be a printk with an associated stack trace so they are no longer in scope for panic_on_warn. Signed-off-by: David Rientjes Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Madadi Vineeth Reddy Acked-by: Josh Don Link: https://lkml.kernel.org/r/e8d52023-5291-26bd-5299-8bb9eb604929@google.com kernel/sched/debug.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 2cf9ac40073ddb6a70dd5ef94f1cf45501b696ed Author: Vincent Guittot Date: Sat Jan 11 10:14:09 2025 +0100 sched/fair: Encapsulate set custom slice in a __setparam_fair() function Similarly to dl, create a __setparam_fair() function to set parameters related to fair class and move it in the fair.c file. No functional changes expected Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Phil Auld Link: https://lore.kernel.org/r/20250110144656.484601-1-vincent.guittot@linaro.org kernel/sched/fair.c | 19 +++++++++++++++++++ kernel/sched/sched.h | 2 ++ kernel/sched/syscalls.c | 16 +++------------- 3 files changed, 24 insertions(+), 13 deletions(-) commit 5d808c78d97251af1d3a3e4f253e7d6c39fd871e Author: Tianchen Ding Date: Tue Dec 31 13:50:20 2024 +0800 sched: Fix race between yield_to() and try_to_wake_up() We met a SCHED_WARN in set_next_buddy(): __warn_printk set_next_buddy yield_to_task_fair yield_to kvm_vcpu_yield_to [kvm] ... After a short dig, we found the rq_lock held by yield_to() may not be exactly the rq that the target task belongs to. There is a race window against try_to_wake_up(). CPU0 target_task blocking on CPU1 lock rq0 & rq1 double check task_rq == p_rq, ok woken to CPU2 (lock task_pi & rq2) task_rq = rq2 yield_to_task_fair (w/o lock rq2) In this race window, yield_to() is operating the task w/o the correct lock. Fix this by taking task pi_lock first. Fixes: d95f41220065 ("sched: Add yield_to(task, preempt) functionality") Signed-off-by: Tianchen Ding Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20241231055020.6521-1-dtcccc@linux.alibaba.com kernel/sched/syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67256c9a9432013ca255ea6a54512fa589c07ef8 Author: Emmanuel Grumbach Date: Fri Dec 27 10:00:59 2024 +0200 wifi: iwlwifi: mvm: rename iwl_dev_tx_power_common::mac_context_id This is becoming the link_id. Since this makes no difference on non-MLD devices, just rename to link_id for all the APIs that use the common structure. Starting from command 9, feed the link_id to the firmware instead of the mac id. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.f1155e713201.I753900d10e82f339cf9679ed403027d38dc1fd58@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/api/power.h | 8 +++++--- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 18 +++++++++++++----- 2 files changed, 18 insertions(+), 8 deletions(-) commit 83bb3633a2ce16be2043bac2316aa34530d2f271 Author: Benjamin Berg Date: Fri Dec 27 10:00:58 2024 +0200 wifi: iwlwifi: mvm: skip short statistics window when updating EMLSR The statistics are not synchronized with the time that we enter EMLSR. This means that we can receive the statistic notification just after having cleared the counters, causing us to immediately exit EMLSR again. Fix this by checking that most of the time for the window has passed. If that is not the case, ignore this window and wait for the next notification. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.0eb0f2044535.Ic2af92737ccfc873f3b6c228704238ebb9f983ca@changeid Signed-off-by: Johannes Berg .../net/wireless/intel/iwlwifi/mvm/mld-mac80211.c | 36 ---------------------- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 16 ++++++++++ 2 files changed, 16 insertions(+), 36 deletions(-) commit 193aa7eee2975fec7b5e224a53862c36b5500bd8 Author: Johannes Berg Date: Fri Dec 27 10:00:57 2024 +0200 wifi: iwlwifi: mvm: remove warning on unallocated BAID Due to the firmware allocating the BAID, we can only install the data structure after the BAID is valid from the firmware's point of view. As a result, the firmware can start sending frame release notifications to the driver immediately. This isn't supposed to happen by protocol, since the peer STA is not expected to use the blockack session until the AddBA has a response. However, firmware doesn't know that, our RX path can't know when it was, so simply don't WARN in this case but only have a debug message. Since the BAID comes from firmware, also use IWL_FW_CHECK() instead of a warning for the validity check. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.4360f2b9e185.I447f9a5fc6dfdc78ec238200338e2da040ee7e61@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit a3092c99b95e223678be31711a889890cf02ab35 Author: Johannes Berg Date: Fri Dec 27 10:00:56 2024 +0200 wifi: iwlwifi: differentiate NIC error types Instead of differentiating only sync/async, differentiate the type of error, and document that only reset handshake timeout (IWL_ERR_TYPE_RESET_HS_TIMEOUT) needs sync handling. The special sync handling is somewhat temporary, the idea is to later split the nic_error() method into error dump, synchronizing the dump, and SW reset methods, and the type is mostly in order to unify command queue full handling into that new architecture as well. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241227095718.aed9c9e4fac0.I2288042bec4728a75b61cb7f6ded5214bfa3ce85@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/dvm/main.c | 3 ++- drivers/net/wireless/intel/iwlwifi/iwl-io.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h | 24 ++++++++++++++++++---- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 5 +++-- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 11 ++++------ drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 2 +- .../net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 2 +- 7 files changed, 32 insertions(+), 17 deletions(-) commit aa93ca6f652f6fec2a13cd79d6200912e40c8101 Author: Dr. David Alan Gilbert Date: Thu Dec 26 17:01:19 2024 +0000 wifi: mac80211: Remove unused ieee80211_smps_is_restrictive The last use of ieee80211_smps_is_restrictive() was removed in 2020 by commit 52b4810bed83 ("mac80211: Remove support for changing AP SMPS mode") Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://patch.msgid.link/20241226170119.108947-1-linux@treblig.org Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 2 -- net/mac80211/util.c | 25 ------------------------- 2 files changed, 27 deletions(-) commit 7ceae9b73f05f0a58540e11a48d629a506806893 Author: Daniel Gabay Date: Thu Jan 2 16:39:18 2025 +0200 wifi: iwlwifi: mvm: Move TSO code to shared utility Move TSO segment logic from mvm to the iwlwifi level, as this code is not opmode-dependent and can be shared with the mld driver. Signed-off-by: Daniel Gabay Link: https://patch.msgid.link/20250102163748.56efefb9566e.Ib7188572f18afb31840d193a348c17c9b292c7af@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/Makefile | 1 + drivers/net/wireless/intel/iwlwifi/iwl-utils.c | 85 ++++++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-utils.h | 36 +++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 82 ++----------------------- 4 files changed, 127 insertions(+), 77 deletions(-) commit 526cd9cd423888d3d2708cfc9aa452aafdf20ef1 Author: Anjaneyulu Date: Thu Dec 26 17:44:56 2024 +0200 wifi: iwlwifi: mvm: add UHB canada support in GET_TAS_STATUS cmd resp dump UHB canada is enabled or not based on firmware capability. Signed-off-by: Anjaneyulu Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241226174257.dfd6b8893322.I196393dc3c9c28882f90b43a821a2d76a5c9a046@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/api/debug.h | 6 +++++- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) commit 01c0e9c804413563c71fb2f74b040c212ee2efe3 Author: Anjaneyulu Date: Thu Dec 26 17:44:55 2024 +0200 wifi: iwlwifi: mvm: add UHB canada support in TAS_CONFIG cmd extend TAS table support to revision 2 for getting UHB canada enablement from BIOS and send to firmware via TAS_CONFIG cmd based on firmware capability. While on it fixed kernel-doc for struct iwl_tas_config_cmd_v4. Signed-off-by: Anjaneyulu Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241226174257.0b1d92ad59b8.Ib80f8514a64fc2800a2a20131e730c2bd9c4c4af@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 6 +++--- drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h | 15 ++++++++++++--- drivers/net/wireless/intel/iwlwifi/fw/file.h | 2 ++ drivers/net/wireless/intel/iwlwifi/fw/regulatory.c | 7 ++++++- drivers/net/wireless/intel/iwlwifi/fw/regulatory.h | 10 ++++++---- drivers/net/wireless/intel/iwlwifi/fw/uefi.c | 7 +++++-- drivers/net/wireless/intel/iwlwifi/fw/uefi.h | 3 ++- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 4 ++++ 8 files changed, 40 insertions(+), 14 deletions(-) commit 1532c5d67d97cacbe83dd9b7f74b8844ee42b2e6 Author: Daniel Gabay Date: Thu Dec 26 17:44:54 2024 +0200 wifi: iwlwifi: mvm: Use IWL_FW_CHECK() for BAR notif size validation Use IWL_FW_CHECK() for BAR notification size validation, improving diagnostics with a clear error message on failure. Signed-off-by: Daniel Gabay Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241226174257.913d5d476929.I8cd62f45bacc088c309b0152fc392dc2579e82e0@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9b45ba3976945e8d53f2dd40541a66c690f12286 Author: Somashekhar(Som) Date: Thu Dec 26 17:44:53 2024 +0200 wifi: iwlwifi: pcie: Add support for new device ids Add support for new device-ids 0x2730 and 0x272F. Signed-off-by: Somashekhar(Som) Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20241226174257.6a0db60436e7.I50a66544dde6c88acd9abe4b31badab96ef04cfc@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/Makefile | 2 +- drivers/net/wireless/intel/iwlwifi/cfg/dr.c | 167 ++++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 10 ++ drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 16 +++ 4 files changed, 194 insertions(+), 1 deletion(-) commit a968fc0218b242fdabede5e39be2ff7273e405a7 Author: Emmanuel Grumbach Date: Thu Dec 26 17:44:52 2024 +0200 wifi: iwlwifi: add a new NMI type 0x88 is not a regular firmware crash but a PREG NMI which means that we access a place we're not supposed to. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241226174257.596dfc97f6b1.Iec765d5fe12ac74c6ee0035e9cb62b98c11639cb@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/img.c | 2 ++ 1 file changed, 2 insertions(+) commit 2afb0b9b957b11637c8bbb817a72e07051dae032 Author: Daniel Gabay Date: Thu Dec 26 17:44:50 2024 +0200 wifi: iwlwifi: mvm: Check BAR packet size before accessing data Validate the BAR frame release size before using its fields to avoid potential invalid memory access. Signed-off-by: Daniel Gabay Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241226174257.72161a6c07c3.I4887bad2355213b201fca2da1836c9a3203ab42d@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit b1e8102a4048003097c7054cbc00bbda91a5ced7 Author: Miri Korenblit Date: Thu Dec 26 17:44:49 2024 +0200 wifi: iwlwifi: support BIOS override for 5G9 in CA also in LARI version 8 Commit 6b3e87cc0ca5 ("iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD cmd v9") added a few bits to iwl_lari_config_change_cmd::oem_unii4_allow_bitmap if the FW has LARI version >= 9. But we also need to send those bits for version 8 if the FW is capable of this feature (indicated with capability bits) Add the FW capability bit, and set the additional bits in the cmd when the version is 8 and the FW capability bit is set. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20241226174257.dc5836f84514.I1e38f94465a36731034c94b9811de10cb6ee5921@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/file.h | 3 +++ drivers/net/wireless/intel/iwlwifi/fw/regulatory.c | 14 ++++++++++---- drivers/net/wireless/intel/iwlwifi/fw/regulatory.h | 11 +++++------ 3 files changed, 18 insertions(+), 10 deletions(-) commit a581a0287c8d3348ced3c3e7f4a7100d89769b7a Author: Miri Korenblit Date: Thu Dec 26 17:44:48 2024 +0200 wifi: iwlwifi: support BIOS override for UNII4 in CA/US also in LARI versions < 12 Commit ef7ddf4e2f94 ("iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v12") added a few bits to iwl_lari_config_change_cmd::chan_state_active_bitmap if the FW has LARI version >= 12. But we also need to send those bits for version 8-11 if the FW is capable of this feature (indicated with capability bits) Add the FW capability bit, and set the additional bits in the cmd when the version is 8 and the FW capability bit is set. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20241226174257.672651ad849c.I67a00d9544c48ad964f8e998ebe8c168071c3d01@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/file.h | 5 +++-- drivers/net/wireless/intel/iwlwifi/fw/regulatory.c | 8 +++++++- 2 files changed, 10 insertions(+), 3 deletions(-) commit 09bdddd3ed2ed2bfaf4bfd35138775faceb6a7b7 Author: Miri Korenblit Date: Thu Dec 26 17:44:47 2024 +0200 wifi: iwlwifi: bump FW API to 95 for BZ/SC devices Start supporting API version 95 for new devices. Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241226174257.d5b73c1e9e17.I121e155b0c1fdfb7fbac934bb2f84fe0e1d13ba0@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/cfg/bz.c | 2 +- drivers/net/wireless/intel/iwlwifi/cfg/sc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f8f13ea27fffff51ee257171a8604f944c876fd4 Author: Benjamin Berg Date: Thu Dec 26 17:44:46 2024 +0200 wifi: iwlwifi: mvm: log error for failures after D3 We only logged an error in the fast resume path. However, as the hardware is being restarted it makes sense to log an error to make it easier to understand what is happening. Add a new error message into the normal resume path and update the error in the fast resume path to match. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241226174257.df1e451d4928.Ibe286bc010ad7fecebba5650097e16ed22a654e4@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 74f0b2db1f00fd375c0b5c3ea1a2283be876b51b Author: Anjaneyulu Date: Thu Dec 26 17:44:45 2024 +0200 wifi: iwlwifi: mvm: update documentation for iwl_nvm_channel_flags Enhance the documentation for the enum iwl_nvm_channel_flags to provide better clarity for NVM_CHANNEL_IBSS and NVM_CHANNEL_ACTIVE flags Signed-off-by: Anjaneyulu Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241226174257.d4018e62b2bd.Ie20fe3408bcc358078e3e5bf38edeb6b951c9a40@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cbde1f22108d53085d33025ed610571aff154d68 Author: Daniel Gabay Date: Thu Dec 26 17:44:44 2024 +0200 wifi: iwlwifi: Remove mvm prefix from iwl_mvm_compressed_ba_notif This is not MVM specific. Signed-off-by: Daniel Gabay Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20241226174257.9b35dfce796b.Ie61e17a488f6a34bcbe814dd89a138fe1f55585c@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/api/commands.h | 2 +- drivers/net/wireless/intel/iwlwifi/fw/api/tx.h | 20 ++++++++++---------- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 5 ++--- 3 files changed, 13 insertions(+), 14 deletions(-) commit 122b95012b3b800e6fb496a8247794ba93745c8d Author: Somashekhar(Som) Date: Thu Dec 26 17:44:43 2024 +0200 wifi: mvm: Request periodic system statistics earlier Currently driver requests periodic statistics after entering EMLSR. This means that when not in EMLSR, link selection decisions will be done based on old statistics, from the association time. Request periodic statistics already at association instead, Signed-off-by: Somashekhar(Som) Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241226174257.4ca59fe0e060.Ic46280aad4dc7087a7d6d0773b86c255133cb7d6@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 ---- drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c | 15 ++++++++------- 2 files changed, 8 insertions(+), 11 deletions(-) commit afff7cee11890af50987131352767f9bb614cbd6 Author: Yedidya Benshimol Date: Thu Dec 26 17:44:42 2024 +0200 wifi: iwlwifi: remove mvm from session protection cmd's name As the session protection command will be used in mld, it shouldn't be associated by name to mvm Signed-off-by: Yedidya Benshimol Link: https://patch.msgid.link/20241226174257.0cd9ae2499b6.If228310b0578e5da88ccb28ff8dceb56e1c61b27@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/api/mac-cfg.h | 2 +- drivers/net/wireless/intel/iwlwifi/fw/api/time-event.h | 16 ++++++++-------- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-) commit 61dcfa8c2a8f6c53ce77b2c832b82990754b2aa9 Author: Michael-CY Lee Date: Wed Dec 25 15:37:25 2024 +0800 wifi: cfg80211: copy multi-link element from the multi-link probe request's frame body to the generated elements According to Draft P802.11be_D7.0 clause 35.3.4.2, if a multi-link request requests an MLD with which an AP corresponding to the nontransmitted BSSID, the corresponding multi-link probe response shall carry a basic multi-mink element of that MLD in the frame body of the multi-link probe response, whose location is outside of the Multiple BSSID element carried in the frame. Therefore additional handing is needed for parsing multi-link probe response and generating the merged elements so that the MLD in the frame body can be correctly copied to the generated elements. Otherwise, the nontransmitted BSS looks like non-MLD. Signed-off-by: Money Wang Signed-off-by: Michael-CY Lee Link: https://patch.msgid.link/20241225073725.847062-1-michael-cy.lee@mediatek.com Signed-off-by: Johannes Berg net/wireless/scan.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 58c131f08851b24f90142b09230c6bf72e2219ac Author: Miri Korenblit Date: Tue Dec 24 19:27:31 2024 +0200 wifi: iwlwifi: mvm: cleanup iwl_mvm_sta_del Now it neither sets the ret argument or return something else than false. Cleanup this function to be void and to not receive the ret argument. This also allows to get rid of the sta_in_fw parameter in iwl_mvm_mld_free_sta_link. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20241224192322.ecebfa16c62c.Ia1cc352b871593be4f51cb3db98f9eedd5267857@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 27 +++++++---------------- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 9 +++----- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 7 +++--- 4 files changed, 15 insertions(+), 30 deletions(-) commit 687a7c8a722743526b4fe45fc75c6999990480ab Author: Miri Korenblit Date: Tue Dec 24 19:27:30 2024 +0200 wifi: mac80211: change disassoc sequence a bit Currently, the sequence goes like this (among others): 1. flush all stations (including the AP ones) -> this will tell the drivers to remove the stations 2. notify the driver the vif is not associated. Which means that in between 1 and 2, the state is that the vif is associated, but there is no AP station, which makes no sense, and may be problematic for some drivers (for example iwlwifi) Change the sequence to: 1. flush the TDLS stations 2. move the AP station to IEEE80211_STA_NONE 3. notify the driver about the vif being unassociated 4. flush the AP station In order to not break other drivers, add a vif flag to indicate whether the driver wants to new sequence or not. If the flag is not set, then things will be done in the old sequence. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20241224192322.996ad1be6cb3.I7815d33415aa1d65c0120b54be7a15a45388f807@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 29 ++---------------- .../net/wireless/intel/iwlwifi/mvm/mld-mac80211.c | 35 ++-------------------- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 5 ---- include/net/mac80211.h | 4 +++ net/mac80211/mlme.c | 24 +++++++++++++-- 5 files changed, 30 insertions(+), 67 deletions(-) commit a10723ced430de1b45572d84c0e4bcf5b671380c Author: Miri Korenblit Date: Tue Dec 24 19:27:29 2024 +0200 wifi: mac80211: add an option to filter a sta from being flushed Sometimes we might want to flush only part of the stations of a vif, for example only the TDLS ones. To allow this, add a do_not_flush_sta argument to __sta_info_flush, which in turn, will not flush this station. Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20241224192322.535e1fcca192.Icecf7f443bf98c9535ce8ec03b24d0d17dfbc28e@changeid Signed-off-by: Johannes Berg net/mac80211/cfg.c | 2 +- net/mac80211/sta_info.c | 5 ++++- net/mac80211/sta_info.h | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) commit 52674ee2f30c10e1f8c90ec9df36db926a536a0b Author: Miri Korenblit Date: Tue Dec 24 19:27:28 2024 +0200 wifi: iwlwifi: mvm: send the right link id in iwl_mvm_sta_del we call iwl_mvm_sec_key_remove_ap with link id 0, when it might actually be something else, causing us to skip all the keys. Since the call to iwl_mvm_sec_key_remove_ap was mostly skipped (because for STA mode we are not removing the ap sta immediately, but later when the vif is set to unassocicated), this was fine. The other call to iwl_mvm_sec_key_remove_ap, when we actually do remove the ap sta, was called with the right link id. So the bug didn't happen so far. Now that mac80211 is going to change such that we can immediately remove the ap sta, the call to iwl_mvm_sec_key_remove_ap with link id 0 will not be skipped, so no key will be removed, and then when mac80211 eventually tells us to remove that keys, we no longer have the sta ids for them. Simply pass the right link id to iwl_mvm_sec_key_remove_ap. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20241224192322.db7a5f551492.I79fe16a14fa0bb20751ba2526c3195fef39ef772@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2e564d86a09532bf54fbd6b48059df5dcf6e1ca4 Author: Miri Korenblit Date: Tue Dec 24 19:27:27 2024 +0200 wifi: iwlwifi: mvm: remove pre-mld code from mld path This code is only relevant for older devices, that are not supporting mld, so shouldn't be in iwl_mvm_sta_del, which is common to both pre-mld and mld. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20241224192322.a665d16a3857.I840b00a7b38f3967ec5e75ff6a85e756f4d82437@changeid Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 42 +++++++++++++--------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit efbb0fed0250be2bd79dfc01b727beee3c0fc42d Author: Rolf Eike Beer Date: Thu Dec 19 11:22:25 2024 +0100 wifi: iwlwifi: fix documentation about initial values in station table The inverse value is stored in the table, make the documentation match the code. Signed-off-by: Rolf Eike Beer Acked-by: Miri Korenblit Link: https://patch.msgid.link/2008554.usQuhbGJ8B@devpool47.emlix.com Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98d1e33b092ba9ddc430c9b8f14aaf3a79330b00 Author: Dr. David Alan Gilbert Date: Tue Dec 24 01:32:56 2024 +0000 wifi: mac80211: Clean up debugfs_key deadcode The last use of ieee80211_debugfs_key_sta_del() was removed in 2007 by commit 11a843b7e160 ("[MAC80211]: rework key handling") The last use of ieee80211_debugfs_key_add_mgmt_default() was removed in 2010 by commit f7e0104c1a4e ("mac80211: support separate default keys") The last use of ieee80211_debugfs_key_add_beacon_default() was removed in 2020 by commit e5473e80d467 ("mac80211: Support BIGTK configuration for Beacon protection") Remove them. Signed-off-by: Dr. David Alan Gilbert Link: https://patch.msgid.link/20241224013257.185742-2-linux@treblig.org Signed-off-by: Johannes Berg net/mac80211/debugfs_key.c | 47 ---------------------------------------------- net/mac80211/debugfs_key.h | 15 --------------- 2 files changed, 62 deletions(-) commit 235f238402194a78ac5fb882a46717eac817e5d1 Author: Michael Guralnik Date: Mon Jan 6 20:27:10 2025 +0200 RDMA/mlx5: Fix indirect mkey ODP page count Restrict the check for the number of pages handled during an ODP page fault to direct mkeys. Perform the check right after handling the page fault and don't propagate the number of handled pages to callers. Indirect mkeys and their associated direct mkeys can have different start addresses. As a result, the calculation of the number of pages to handle for an indirect mkey may not match the actual page fault handling done on the direct mkey. For example: A 4K sized page fault on a KSM mkey that has a start address that is not aligned to a page will result a calculation that assumes the number of pages required to handle are 2. While the underlying MTT might be aligned will require fetching only a single page. Thus, do the calculation and compare number of pages handled only per direct mkey. Fixes: db570d7deafb ("IB/mlx5: Add ODP support to MW") Signed-off-by: Michael Guralnik Reviewed-by: Artemy Kovalyov Link: https://patch.msgid.link/86c483d9e75ce8fe14e9ff85b62df72b779f8ab1.1736187990.git.leon@kernel.org Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/odp.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit d8b4bf4ea04dd96fe43f6010c614149aba4c9b91 Author: Randy Dunlap Date: Fri Jan 10 22:30:08 2025 -0800 kthread: modify kernel-doc function name to match code kthread.c:1073: warning: expecting prototype for kthread_create_worker(). Prototype was for kthread_create_worker_on_node() instead Fixes: 41f70d8e1634 ("kthread: Unify kthread_create_on_cpu() and kthread_create_worker_on_cpu() automatic format") Signed-off-by: Randy Dunlap Cc: Frederic Weisbecker Cc: Andrew Morton Signed-off-by: Frederic Weisbecker kernel/kthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ed54896b6bd444223092cab361b0785932119ab Author: Quan Zhou Date: Thu Jul 18 21:49:09 2024 +0800 wifi: mt76: mt7921: fix a potential scan no APs In multi-channel scenarios, the granted channel must be aborted before station remove. Otherwise, the firmware will be put into a wrong state, resulting in have chance to make subsequence scan no APs. With this patch, the granted channel will be always aborted before station remove. Signed-off-by: Quan Zhou Reviewed-by: Sean Wang Tested-by: David Ruth Reviewed-by: David Ruth Link: https://patch.msgid.link/1ac1ae779db86d4012199a24ea2ca74050ed4af6.1721300411.git.quan.zhou@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7921/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 512e26db3565b310052dc2b8975ac7c973bf8ab6 Author: Ben Greear Date: Mon Sep 9 14:12:38 2024 -0700 wifi: mt76: Fix EHT NSS radiotap reporting. Wireshark and iwlwifi use zero-based NSS reporting, adjust mt76 to do the same. Signed-off-by: Ben Greear Link: https://patch.msgid.link/20240909211238.3237111-2-greearb@candelatech.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e016239fcb9802e58dc059b85e0fb25ac1777df4 Author: Ben Greear Date: Mon Sep 9 14:12:37 2024 -0700 wifi: mt76: mt7996: Add eht radiotap tlv This duplicates what the 7925 driver is doing, wireshark seems to at least mostly decode it as expected. Signed-off-by: Ben Greear Link: https://patch.msgid.link/20240909211238.3237111-1-greearb@candelatech.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit f21b77cb556296116b1cce1d62295d13e35da574 Author: Nicolas Cavallari Date: Fri Sep 27 10:53:17 2024 +0200 wifi: mt76: mt7915: Fix mesh scan on MT7916 DBDC commit c4f075582304 ("wifi: mt76: mt7915: fix command timeout in AP stop period") changes the behavior of mt7915_bss_info_changed() in mesh mode when enable_beacon becomes false: it calls mt7915_mcu_add_bss_info(..., false) and mt7915_mcu_add_sta(..., false) while the previous code didn't. These sends mcu commands that apparently confuse the firmware. This breaks scanning while in mesh mode on AsiaRF MT7916 DBDC-based cards: scanning works but no mesh frames get sent afterwards and the firmware seems to be hosed. It breaks on MT7916 DBDC but not on MT7915 DBDC. Fixes: c4f075582304 ("wifi: mt76: mt7915: fix command timeout in AP stop period") Signed-off-by: Nicolas Cavallari Link: https://patch.msgid.link/20240927085350.4594-1-nicolas.cavallari@green-communications.fr Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7915/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 458417efd5f9e7450eec65c9546c7bcc7efd7306 Author: Shen Lichuan Date: Wed Sep 11 11:42:43 2024 +0800 wifi: mt76: mt7615: Convert comma to semicolon To ensure code clarity and prevent potential errors, it's advisable to employ the ';' as a statement separator, except when ',' are intentionally used for specific purposes. Signed-off-by: Shen Lichuan Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20240911034243.31596-1-shenlichuan@vivo.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/sdio_mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/usb_mcu.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 08fa656c91fd5fdf47ba393795b9c0d1e97539ed Author: Dan Carpenter Date: Wed Sep 11 10:43:03 2024 +0300 wifi: mt76: mt7925: fix off by one in mt7925_load_clc() This comparison should be >= instead of > to prevent an out of bounds read and write. Fixes: 9679ca7326e5 ("wifi: mt76: mt7925: fix a potential array-index-out-of-bounds issue for clc") Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/84bf5dd2-2fe3-4410-a7af-ae841e41082a@stanley.mountain Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbce6136da0a40f62ea22361e7d13f6a502c20ad Author: Leon Yen Date: Mon Sep 16 14:01:57 2024 +0800 wifi: mt76: mt7921s: fix a potential firmware freeze during startup The maximum command quota of the firmware may be exceeded because the command to retrieve the quota setting has not been taken into account. This patch considers not only the quota usage of the command retrieving quota settings but also limits the total quota usage. Signed-off-by: Leon Yen Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20240916060157.10157-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76.h | 1 + drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 5 ++++- drivers/net/wireless/mediatek/mt76/sdio_txrx.c | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) commit 5a569e90162a37364f22d9f0ff9d2added7b3ee5 Author: Hao Zhang Date: Thu Sep 19 16:17:13 2024 +0800 wifi: mt76: mt792x: add P2P_DEVICE support Regist the NL80211_IFTYPE_P2P_DEVICE to support p2p device for mt792x chips Signed-off-by: Hao Zhang Signed-off-by: allan.wang Signed-off-by: Ming Yen Hsieh Link: https://patch.msgid.link/20240919081713.23787-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 3 +++ drivers/net/wireless/mediatek/mt76/mt792x_core.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit 569dd75b71471e63caf4a0302e042f9c2dafe970 Author: StanleyYP Wang Date: Thu Sep 26 11:24:40 2024 +0800 wifi: mt76: mt7996: set correct background radar capability Some of the variants do not support background radar, so add a helper to report background radar capability. Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Tested-by: Daniel Golle Link: https://patch.msgid.link/20240926032440.15978-3-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/init.c | 7 ++++--- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) commit e8cb33ad546a908f6c6a7c382b0fdf1a0c743af6 Author: Shayne Chen Date: Thu Sep 26 11:24:39 2024 +0800 wifi: mt76: mt7996: add support for more variants Current varaints supported: - mt7996 chipset: tri-band, 4+4+4 NSS, eFEM - mt7992 chipset: dual-band, 4+4 NSS, eFEM This patch adds support for the following variants: - mt7996 chipset: - tri-band, 4+4+4 NSS, iFEM - tri-band, 2+3+3 NSS, eFEM - tri-band, 2+3+3 NSS, iFEM - mt7992 chipset: - dual-band, 4+4 NSS, iFEM - dual-band, 4+4 NSS, with band0 iFEM and band1 eFEM - dual-band, 2+3 NSS, eFEM - dual-band, 2+3 NSS, iFEM Co-developed-by: StanleyYP Wang Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Tested-by: Daniel Golle Link: https://patch.msgid.link/20240926032440.15978-2-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c | 206 +++++++++++++++------ drivers/net/wireless/mediatek/mt76/mt7996/eeprom.h | 2 + drivers/net/wireless/mediatek/mt76/mt7996/init.c | 78 ++++++++ drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 16 +- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 46 ++++- drivers/net/wireless/mediatek/mt76/mt7996/regs.h | 9 + 6 files changed, 289 insertions(+), 68 deletions(-) commit 0da2e410705e87c75d0f96d73c4a563746cc2709 Author: Shayne Chen Date: Thu Sep 26 11:24:38 2024 +0800 wifi: mt76: mt7996: extend flexibility of mt7996_mcu_get_eeprom() Support passing customized buffer pointer and length to mt7996_mcu_get_eeprom(). This is the preparation for adding more variants support which needs to prefetch FEM module from efuse, and also fixes potential OOB issue when reading the last efuse block. Co-developed-by: StanleyYP Wang Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Tested-by: Daniel Golle Link: https://patch.msgid.link/20240926032440.15978-1-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c | 9 +++++++-- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 14 ++++++++++---- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) commit d08a1049659aa91784306b7244116e71f569e5a0 Author: Even Xu Date: Mon Jan 13 16:50:47 2025 +0800 HID: intel-thc-hid: intel-quicki2c: fix potential memory corruption Use U32 to get value from ACPI and explicitly cast to U16. Fixes: 5282e45ccbfa ("HID: intel-thc-hid: intel-quicki2c: Add THC QuickI2C ACPI interfaces") Signed-off-by: Even Xu Link: https://patch.msgid.link/20250113085047.2100403-1-even.xu@intel.com Signed-off-by: Benjamin Tissoires drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0b0d62fa73f22884e1ddd4ed6e288f959ad116ae Author: Dan Carpenter Date: Mon Jan 13 09:15:41 2025 +0300 HID: intel-thc-hid: intel-thc: Fix error code in thc_i2c_subip_init() Return -ENOMEM if the allocation fails. Don't return success. Fixes: 4228966def88 ("HID: intel-thc-hid: intel-thc: Add THC I2C config interfaces") Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/eb4ea363-c3b7-4988-9ff5-5ed74bf47620@stanley.mountain Signed-off-by: Benjamin Tissoires drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2da76e9e12c35f635ca90a223844c279c511a0dd Author: Randy Dunlap Date: Fri Jan 10 22:32:57 2025 -0800 mm/slab: fix kernel-doc func param names Use corrected function parameter names to eliminate kernel-doc warnings: slab.h:142: warning: Function parameter or struct member 's' not described in 'slab_folio' slab.h:142: warning: Excess function parameter 'slab' description in 'slab_folio' slab.h:168: warning: Function parameter or struct member 's' not described in 'slab_page' slab.h:168: warning: Excess function parameter 'slab' description in 'slab_page' Signed-off-by: Randy Dunlap Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Cc: Andrew Morton Acked-by: David Rientjes Signed-off-by: Vlastimil Babka mm/slab.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b2bc1b1a77c0ffc2f51e90b1112d7f5530e4d15c Author: Heiko Carstens Date: Fri Dec 13 13:27:34 2024 +0100 s390/bitops: Provide optimized arch_test_bit() Provide an optimized arch_test_bit() implementation which makes use of flag output constraint. This generates slightly better code: bloat-o-meter: add/remove: 51/19 grow/shrink: 450/2444 up/down: 25198/-49136 (-23938) Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/bitops.h | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit 8cae8e0afb2f1f6879efa6899b6323171c3bd990 Author: Heiko Carstens Date: Fri Dec 13 13:27:33 2024 +0100 s390/bitops: Switch to generic bitops The generic bitops implementation is nearly identical to the s390 implementation therefore switch to the generic variant. This results in a small kernel image size decrease. This is because for the generic variant the nr parameter for most bitops functions is of type unsigned int while the s390 variant uses unsigned long. bloat-o-meter: add/remove: 670/670 grow/shrink: 167/209 up/down: 21440/-21792 (-352) Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/bitops.h | 181 +---------------------------------------- 1 file changed, 3 insertions(+), 178 deletions(-) commit 061a5e4ac36dac35bb4dfd6a6054c5657b953881 Author: Sven Schnelle Date: Wed Jan 8 15:27:06 2025 +0100 s390/ebcdic: Fix length decrement in codepage_convert() The inline assembly uses the ahi instruction to decrement and test whether more than 256 bytes are left for conversion. But the nr variable passed is of type unsigned long. Therefore use aghi. Signed-off-by: Sven Schnelle Reported-by: Jens Remus Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/ebcdic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a0f62a3009be6515f5863970994a350a938ac52 Author: Sven Schnelle Date: Wed Jan 8 15:27:05 2025 +0100 s390/ebcdic: Fix length check in codepage_convert() The current code compares whether the nr argument is less or equal to zero. As nr is of type unsigned long, this isn't correct. Fix this by just testing for zero. This is also reported by checkpatch: unsignedLessThanZero: Checking if unsigned expression 'nr--' is less than zero. Reported-by: Jens Remus Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/ebcdic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94446b4dcbbee79ff18173435950b2d1a7513c1b Author: Sven Schnelle Date: Wed Jan 8 15:27:04 2025 +0100 s390/ebcdic: Use exrl instead of ex exrl is present in all machines currently supported, therefore prefer it over ex. This saves one instruction and doesn't need an additional register to hold the address of the target instruction. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/ebcdic.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 90c5515dcb9c824db244f42a98c765bd0542f109 Author: Sven Schnelle Date: Wed Jan 8 15:27:03 2025 +0100 s390/amode31: Use exrl instead of ex exrl is present in all machines currently supported, therefore prefer it over ex. This saves one instruction and doesn't need an additional register to hold the address of the target instruction. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/kernel/text_amode31.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a88c26bb8e04ee5f2678225c0130a5fbc08eef85 Author: Sven Schnelle Date: Wed Jan 8 15:27:02 2025 +0100 s390/stackleak: Use exrl instead of ex in __stackleak_poison() exrl is present in all machines currently supported, therefore prefer it over ex. This saves one instruction and doesn't need an additional register to hold the address of the target instruction. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/include/asm/processor.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 745600ed696593436d2b69211a3d85b588ee18d8 Author: Sven Schnelle Date: Wed Jan 8 15:27:01 2025 +0100 s390/lib: Use exrl instead of ex in xor functions exrl is present in all machines currently supported, therefore prefer it over ex. This saves one instruction and doesn't need an additional register to hold the address of the target instruction. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/lib/xor.c | 61 +++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 32 deletions(-) commit 9988df07dbe1ca8282f5ae95f1b534f91bab73fc Author: Mete Durlu Date: Wed Jan 8 11:31:27 2025 +0100 s390/topology: Improve topology detection Add early polarization detection instead of assuming horizontal polarization. Signed-off-by: Mete Durlu Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev arch/s390/kernel/topology.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6758bd0692e25b7c58ff0b3e47fbefe75be177af Author: Fabio Estevam Date: Sun Jan 12 10:40:27 2025 -0300 dt-bindings: rtc: mxc: Document fsl,imx31-rtc imx31.dtsi uses the following RTC compatible: compatible = "fsl,imx31-rtc", "fsl,imx21-rtc"; Document 'fsl,imx31-rtc' to fix the following dt-schema warning: 'fsl,imx31-rtc' is not one of ['fsl,imx1-rtc', 'fsl,imx21-rtc'] Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20250112134027.1013213-1-festevam@gmail.com Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/rtc/rtc-mxc.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 3f76ba88c3fda18dd71296aa87e775e56c29a3d5 Author: Krzysztof Kozlowski Date: Sat Jan 11 19:54:05 2025 +0100 rtc: stm32: 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://lore.kernel.org/r/20250111185405.183824-1-krzysztof.kozlowski@linaro.org Signed-off-by: Alexandre Belloni drivers/rtc/rtc-stm32.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit b0fa00fe38f673c986633c11087274deeb7ce7b0 Author: Sander Vanheule Date: Tue Jan 7 21:16:20 2025 +0100 gpio: regmap: Use generic request/free ops Set the gpiochip request and free ops to the generic implementations. This way a user can provide a gpio-ranges property defined for a pinmux, easing muxing of gpio functions. Provided that the pin controller implementents the pinmux op .gpio_request_enable(), pins will automatically be muxed to their GPIO function when requested. Signed-off-by: Sander Vanheule Acked-by: Michael Walle Link: https://lore.kernel.org/r/20250107201621.12467-1-sander@svanheule.net Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-regmap.c | 2 ++ 1 file changed, 2 insertions(+) commit 3c838184407f3e0b28cd86a7275ffc2f9e790efa Author: Uwe Kleine-König Date: Thu Jan 9 10:08:03 2025 +0100 gpio: altera: Drop .mapped_irq from driver data struct altera_gpio_chip::mapped_irq is only used in the driver's probe function. So it's enough if mapped_irq is a local variable, and can be dropped from driver data. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20250109090802.3763275-2-u.kleine-koenig@baylibre.com Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-altera.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 65b3aacff639e4670533042c587498196d036a03 Author: J. Neuschäfer Date: Thu Jan 2 19:31:54 2025 +0100 gpio: mpc8xxx: Add MPC8314 support GPIO input, output, and interrupts have been tested on a MPC8314E board. Signed-off-by: J. Neuschäfer Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250102-mpc83xx-v1-13-86f78ba2a7af@posteo.net Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-mpc8xxx.c | 1 + 1 file changed, 1 insertion(+) commit b7c1336e2ecaba2faccebaa98dbff64d57c31727 Author: J. Neuschäfer Date: Thu Jan 2 19:31:52 2025 +0100 dt-bindings: gpio: fsl,qoriq-gpio: Add compatible string fsl,mpc8314-gpio This is for the MPC831{4,5}{,E} SoCs. Signed-off-by: J. Neuschäfer Reviewed-by: Linus Walleij Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250102-mpc83xx-v1-11-86f78ba2a7af@posteo.net Signed-off-by: Bartosz Golaszewski Documentation/devicetree/bindings/gpio/fsl,qoriq-gpio.yaml | 1 + 1 file changed, 1 insertion(+) commit 267f2c5662e3fd8891bca01f71bc1c258e293206 Author: J. Neuschäfer Date: Tue Dec 24 09:02:12 2024 +0100 dt-bindings: gpio: fairchild,74hc595: Document chip select vs. latch clock From looking at the data sheets, it is not obvious that CS# and latch clock can be treated at the same, but doing so works fine and saves the hassle of (1) trying to specify a SPI device without CS, and (2) adding another property to drive the latch clock[1]. [1]: https://lore.kernel.org/lkml/20241213-gpio74-v1-2-fa2c089caf41@posteo.net/ Signed-off-by: J. Neuschäfer Reviewed-by: Linus Walleij Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20241224-gpio74-v2-3-bbcf14183191@posteo.net Signed-off-by: Bartosz Golaszewski .../devicetree/bindings/gpio/fairchild,74hc595.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 29da3e8748f97dcf01498b00d42a3e7574ece80b Author: Bartosz Golaszewski Date: Thu Jan 2 13:15:30 2025 +0100 power: sequencing: qcom-wcn: explain why we need the WLAN_EN GPIO hack With the recent rework of the PCI power control code, the workaround for the wlan-enable GPIO - where we don't set a default (low) state in the power sequencing driver, but instead request the pin as-is - should no longer be needed but some platforms still fail to probe the WLAN controller. This is caused by the Qcom PCIe controller and needs a workaround in the controller driver so add a FIXME to eventually remove the hack from this driver once this is done. Link: https://lore.kernel.org/r/20250102121530.26993-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski drivers/power/sequencing/pwrseq-qcom-wcn.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 2d2da5a4c1b4509f6f7e5a8db015cd420144beb4 Author: King Dix Date: Thu Jan 9 08:50:18 2025 +0800 PCI: rcar-ep: Fix incorrect variable used when calling devm_request_mem_region() The rcar_pcie_parse_outbound_ranges() uses the devm_request_mem_region() macro to request a needed resource. A string variable that lives on the stack is then used to store a dynamically computed resource name, which is then passed on as one of the macro arguments. This can lead to undefined behavior. Depending on the current contents of the memory, the manifestations of errors may vary. One possible output may be as follows: $ cat /proc/iomem 30000000-37ffffff : 38000000-3fffffff : Sometimes, garbage may appear after the colon. In very rare cases, if no NULL-terminator is found in memory, the system might crash because the string iterator will overrun which can lead to access of unmapped memory above the stack. Thus, fix this by replacing outbound_name with the name of the previously requested resource. With the changes applied, the output will be as follows: $ cat /proc/iomem 30000000-37ffffff : memory2 38000000-3fffffff : memory3 Fixes: 2a6d0d63d999 ("PCI: rcar: Add endpoint mode support") Link: https://lore.kernel.org/r/tencent_DBDCC19D60F361119E76919ADAB25EC13C06@qq.com Tested-by: Lad Prabhakar Signed-off-by: King Dix [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński Reviewed-by: Lad Prabhakar Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/pcie-rcar-ep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15fa0621d7b389effbf09e94b765e828f931f8c0 Author: Thorsten Blum Date: Sun Jan 12 11:06:55 2025 +0100 platform/chrome: cros_usbpd_logger: Use str_enabled_disabled() helper Remove hard-coded strings by using the str_enabled_disabled() helper function. Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20250112100655.55741-2-thorsten.blum@linux.dev Signed-off-by: Tzung-Bi Shih drivers/platform/chrome/cros_usbpd_logger.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 17bd5e4dc96c953257eadce111d7b6ef458c6187 Author: Douglas Anderson Date: Fri Dec 20 14:52:05 2024 -0800 PCI: mediatek-gen3: Enable async probe by default The mediatek-gen3 driver can run its probe routine fairly slow on some hardware, which adds to the total time it takes for the system start up. Thus, turn on async mode for the probe to avoid blocking the rest of the system. Link: https://lore.kernel.org/r/20241220145205.1.Ibf2563896c3b1fc133bb46d3fc96ad0041763922@changeid Signed-off-by: Douglas Anderson [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/pcie-mediatek-gen3.c | 1 + 1 file changed, 1 insertion(+) commit 491cb9c5084790aafa02e843349492c284373231 Author: Lorenzo Bianconi Date: Thu Jan 9 00:30:45 2025 +0100 PCI: mediatek-gen3: Avoid PCIe resetting via PERST# for Airoha EN7581 SoC Airoha EN7581 has a hw bug asserting/releasing PERST# signal causing occasional PCIe link down issues. In order to overcome the problem, PERST# signal is not asserted/released during device probe or suspend/resume phase and the PCIe block is reset using en7523_reset_assert() and en7581_pci_enable(). Introduce flags field in the mtk_gen3_pcie_pdata struct in order to specify per-SoC capabilities. Link: https://lore.kernel.org/r/20250109-pcie-en7581-rst-fix-v4-1-4a45c89fb143@kernel.org Tested-by: Hui Ma Signed-off-by: Lorenzo Bianconi Signed-off-by: Krzysztof Wilczyński drivers/pci/controller/pcie-mediatek-gen3.c | 59 ++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 18 deletions(-) commit c98bee18d0a094e37100c85effe5e161418f8644 Author: Lorenzo Bianconi Date: Wed Jan 8 10:50:44 2025 +0100 PCI: mediatek-gen3: Rely on msleep() in mtk_pcie_en7581_power_up() Since mtk_pcie_en7581_power_up() runs in non-atomic context, rely on msleep() routine instead of mdelay(). Link: https://lore.kernel.org/r/20250108-pcie-en7581-fixes-v6-5-21ac939a3b9b@kernel.org Signed-off-by: Lorenzo Bianconi Signed-off-by: Krzysztof Wilczyński Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/pcie-mediatek-gen3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90d4e466c9ea2010f33880a36317a8486ccbe082 Author: Lorenzo Bianconi Date: Wed Jan 8 10:50:43 2025 +0100 PCI: mediatek-gen3: Move reset delay in mtk_pcie_en7581_power_up() Airoha EN7581 has a hw bug asserting/releasing PCIE_PE_RSTB signal causing occasional PCIe link down issues. In order to overcome the problem, PCIe block is reset using REG_PCI_CONTROL (0x88) and REG_RESET_CONTROL (0x834) registers available in the clock module running clk_bulk_prepare_enable() in mtk_pcie_en7581_power_up(). In order to make the code more readable, move the wait for the time needed to complete the PCIe reset from en7581_pci_enable() to mtk_pcie_en7581_power_up(). Reduce reset timeout from 250ms to the standard PCIE_T_PVPERL_MS value (100ms) since it has no impact on the driver behavior. Link: https://lore.kernel.org/r/20250108-pcie-en7581-fixes-v6-4-21ac939a3b9b@kernel.org Signed-off-by: Lorenzo Bianconi Signed-off-by: Krzysztof Wilczyński Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Manivannan Sadhasivam Acked-by: Stephen Boyd drivers/clk/clk-en7523.c | 1 - drivers/pci/controller/pcie-mediatek-gen3.c | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 0c9d2d2ef0d916b490a9222ed20ff4616fca876d Author: Lorenzo Bianconi Date: Wed Jan 8 10:50:42 2025 +0100 PCI: mediatek-gen3: Add comment about initialization order in mtk_pcie_en7581_power_up() Add a comment in mtk_pcie_en7581_power_up() to clarify, unlike the other MediaTek Gen3 controllers, the Airoha EN7581 requires PHY initialization and power-on before PHY reset deassert. Link: https://lore.kernel.org/r/20250108-pcie-en7581-fixes-v6-3-21ac939a3b9b@kernel.org Signed-off-by: Lorenzo Bianconi Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam Reviewed-by: AngeloGioacchino Del Regno drivers/pci/controller/pcie-mediatek-gen3.c | 4 ++++ 1 file changed, 4 insertions(+) commit e4c7dfd953f7618f0ccb70d87c1629634f306fab Author: Lorenzo Bianconi Date: Wed Jan 8 10:50:41 2025 +0100 PCI: mediatek-gen3: Move reset/assert callbacks in .power_up() In order to make the code more readable, the reset_control_bulk_assert() function for PHY reset lines is moved to make it pair with reset_control_bulk_deassert() in mtk_pcie_power_up() and mtk_pcie_en7581_power_up(). The same change is done for reset_control_assert() used to assert MAC reset line. Introduce PCIE_MTK_RESET_TIME_US macro for the time needed to complete PCIe reset on MediaTek controller. Link: https://lore.kernel.org/r/20250108-pcie-en7581-fixes-v6-2-21ac939a3b9b@kernel.org Signed-off-by: Lorenzo Bianconi Signed-off-by: Krzysztof Wilczyński Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/pcie-mediatek-gen3.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 0e7a622da17da0042294860cdb7a2fac091d25b1 Author: Lorenzo Bianconi Date: Wed Jan 8 10:50:40 2025 +0100 PCI: mediatek-gen3: Rely on clk_bulk_prepare_enable() in mtk_pcie_en7581_power_up() Replace clk_bulk_prepare() and clk_bulk_enable() with clk_bulk_prepare_enable() in mtk_pcie_en7581_power_up() routine. Link: https://lore.kernel.org/r/20250108-pcie-en7581-fixes-v6-1-21ac939a3b9b@kernel.org Signed-off-by: Lorenzo Bianconi Signed-off-by: Krzysztof Wilczyński Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Manivannan Sadhasivam drivers/pci/controller/pcie-mediatek-gen3.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 2f83e38a095f8bf7c6029883d894668b03b9bd93 Author: Günther Noack Date: Fri Jan 10 14:21:22 2025 +0000 tty: Permit some TIOCL_SETSEL modes without CAP_SYS_ADMIN With this, processes without CAP_SYS_ADMIN are able to use TIOCLINUX with subcode TIOCL_SETSEL, in the selection modes TIOCL_SETPOINTER, TIOCL_SELCLEAR and TIOCL_SELMOUSEREPORT. TIOCL_SETSEL was previously changed to require CAP_SYS_ADMIN, as this IOCTL let callers change the selection buffer and could be used to simulate keypresses. These three TIOCL_SETSEL selection modes, however, are safe to use, as they do not modify the selection buffer. This fixes a mouse support regression that affected Emacs (invisible mouse cursor). Cc: stable Link: https://lore.kernel.org/r/ee3ec63269b43b34e1c90dd8c9743bf8@finder.org Fixes: 8d1b43f6a6df ("tty: Restrict access to TIOCLINUX' copy-and-paste subcommands") Signed-off-by: Günther Noack Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20250110142122.1013222-1-gnoack@google.com Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/selection.c | 14 ++++++++++++++ drivers/tty/vt/vt.c | 2 -- 2 files changed, 14 insertions(+), 2 deletions(-) commit b06f388994500297bb91be60ffaf6825ecfd2afe Author: Sean Anderson Date: Fri Jan 10 16:38:22 2025 -0500 tty: xilinx_uartps: split sysrq handling lockdep detects the following circular locking dependency: CPU 0 CPU 1 ========================== ============================ cdns_uart_isr() printk() uart_port_lock(port) console_lock() cdns_uart_console_write() if (!port->sysrq) uart_port_lock(port) uart_handle_break() port->sysrq = ... uart_handle_sysrq_char() printk() console_lock() The fixed commit attempts to avoid this situation by only taking the port lock in cdns_uart_console_write if port->sysrq unset. However, if (as shown above) cdns_uart_console_write runs before port->sysrq is set, then it will try to take the port lock anyway. This may result in a deadlock. Fix this by splitting sysrq handling into two parts. We use the prepare helper under the port lock and defer handling until we release the lock. Fixes: 74ea66d4ca06 ("tty: xuartps: Improve sysrq handling") Signed-off-by: Sean Anderson Cc: stable@vger.kernel.org # c980248179d: serial: xilinx_uartps: Use port lock wrappers Acked-by: John Ogness Link: https://lore.kernel.org/r/20250110213822.2107462-1-sean.anderson@linux.dev Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 568bfce07873fb07086ca239c0e321ef5d8088f1 Merge: 422c9727b07f 5bc55a333a2f Author: Greg Kroah-Hartman Date: Mon Jan 13 06:46:26 2025 +0100 Merge 6.13-rc7 into tty-next We need the serial driver fixes in here to build on top of. Signed-off-by: Greg Kroah-Hartman commit d43f18d94795aa9aacb110a60bc4df76e112f77f Author: Dave Penkler Date: Sat Jan 11 17:15:48 2025 +0100 staging: gpib: Add missing mutex unlock in ni usb driver When the buffer allocation for return data in ni_usb_write() fails we were returning without unlocking the addressed_transfer_lock. Add the unlock call. This was detected by smatch: New smatch warnings: drivers/staging/gpib/ni_usb/ni_usb_gpib.c:837 ni_usb_write() warn: inconsistent returns '&ni_priv->addressed_transfer_lock'. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202412201550.9NCO57Ye-lkp@intel.com/ Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250111161548.27601-1-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/gpib/ni_usb/ni_usb_gpib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 55eb3c3a6388420afda1374b353717de32ae9573 Author: Dave Penkler Date: Sat Jan 11 17:14:57 2025 +0100 staging: gpib: Add missing mutex unlock in agilent usb driver When no matching product id was found in the attach function the driver returned without unlocking the agilent_82357a_hotplug_lock mutex. Add the unlock call. This was detected by smatch: smatch warnings: drivers/staging/gpib/agilent_82357a/agilent_82357a.c:1381 agilent_82357a_attach() warn: inconsistent returns 'global &agilent_82357a_hotplug_lock'. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202412210143.WJhYzXfD-lkp@intel.com/ Fixes: 4c41fe886a56 ("staging: gpib: Add Agilent/Keysight 82357x USB GPIB driver") Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250111161457.27556-1-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/gpib/agilent_82357a/agilent_82357a.c | 1 + 1 file changed, 1 insertion(+) commit 95cfc75234534b117fa5762696f0cd4a29243796 Author: Dave Penkler Date: Sat Jan 11 17:05:14 2025 +0100 staging: gpib: Modernize gpib_interface_t initialization and make static All interface drivers were using the old style initialization of this struct field : value; This generated the followng sparse warning, for example: agilent_82357a/agilent_82357a.c:1492:1: warning: obsolete struct initializer, use C99 syntax Change the initialization to use the C99 syntax .field = value; This also resolves the checkpatch constraint of no indentation These structs were also not declared as static, unnecessarily polluting the symbol namespace and generating the following sparse warnings, for example: agilent_82357a/agilent_82357a.c:1465:18: warning: symbol 'agilent_82357a_gpib_interface' was not declared. Should it be static? Declare them as static and remove any conflicting extern declarations in the corresponding include files. Signed-off-by: Dave Penkler Link: https://lore.kernel.org/r/20250111160514.26954-1-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman .../staging/gpib/agilent_82350b/agilent_82350b.c | 100 ++-- .../staging/gpib/agilent_82350b/agilent_82350b.h | 2 - .../staging/gpib/agilent_82357a/agilent_82357a.c | 56 +-- drivers/staging/gpib/cb7210/cb7210.c | 464 +++++++++--------- drivers/staging/gpib/cb7210/cb7210.h | 5 - drivers/staging/gpib/cec/cec.h | 4 - drivers/staging/gpib/cec/cec_gpib.c | 52 +-- drivers/staging/gpib/eastwood/fluke_gpib.c | 150 +++--- drivers/staging/gpib/fmh_gpib/fmh_gpib.c | 208 ++++----- drivers/staging/gpib/gpio/gpib_bitbang.c | 50 +- drivers/staging/gpib/hp_82335/hp82335.c | 52 +-- drivers/staging/gpib/hp_82335/hp82335.h | 3 - drivers/staging/gpib/hp_82341/hp_82341.c | 102 ++-- drivers/staging/gpib/hp_82341/hp_82341.h | 2 - drivers/staging/gpib/ines/ines.h | 7 - drivers/staging/gpib/ines/ines_gpib.c | 364 +++++++-------- drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 54 +-- drivers/staging/gpib/ni_usb/ni_usb_gpib.c | 54 +-- drivers/staging/gpib/pc2/pc2_gpib.c | 208 ++++----- drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 520 ++++++++++----------- 20 files changed, 1217 insertions(+), 1240 deletions(-) commit 9125aa208a17cbbd3fdcc7953bb41d2d2fd35df0 Author: Sandeep Salwan Date: Fri Jan 10 18:38:34 2025 -0500 staging: gpib: Remove commented-out debug code Code cleanup. This code has some debug code which is commented out. Delete it. Signed-off-by: Sandeep Salwan Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20250110233834.64147-1-salwansandeep5@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/gpib/agilent_82350b/agilent_82350b.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b37333c8657cfece16b2fb0ba3fef2cb481a0a19 Merge: e7cd121cbf1b 5bc55a333a2f Author: Greg Kroah-Hartman Date: Mon Jan 13 06:42:54 2025 +0100 Merge 6.13-rc7 into staging next We need the gpib changes in here as well to build on top of. Signed-off-by: Greg Kroah-Hartman commit dd19f4116ec330bc985e1a85a66b8dd0f2dca20d Merge: 8ff656643d30 5bc55a333a2f Author: Greg Kroah-Hartman Date: Mon Jan 13 06:40:34 2025 +0100 Merge 6.13-rc7 into driver-core-next We need the debugfs / driver-core fixes in here as well for testing and to build on top of. Signed-off-by: Greg Kroah-Hartman commit a68d3cbfade64392507302f3a920113b60dc811f Author: Randy Dunlap Date: Fri Jan 10 22:32:30 2025 -0800 memstick: core: fix kernel-doc notation Use the correct kernel-doc format for function parameters (':' instead of '-') to eliminate kernel-doc warnings. Add some "Returns:" notations to functions. memstick.c:206: warning: Function parameter or struct member 'host' not described in 'memstick_detect_change' memstick.c:222: warning: Function parameter or struct member 'host' not described in 'memstick_next_req' memstick.c:222: warning: Function parameter or struct member 'mrq' not described in 'memstick_next_req' memstick.c:248: warning: Function parameter or struct member 'host' not described in 'memstick_new_req' memstick.c:265: warning: Function parameter or struct member 'mrq' not described in 'memstick_init_req_sg' memstick.c:265: warning: Function parameter or struct member 'tpc' not described in 'memstick_init_req_sg' memstick.c:265: warning: Function parameter or struct member 'sg' not described in 'memstick_init_req_sg' memstick.c:295: warning: Function parameter or struct member 'mrq' not described in 'memstick_init_req' memstick.c:295: warning: Function parameter or struct member 'tpc' not described in 'memstick_init_req' memstick.c:295: warning: Function parameter or struct member 'buf' not described in 'memstick_init_req' memstick.c:295: warning: Function parameter or struct member 'length' not described in 'memstick_init_req' memstick.c:366: warning: Function parameter or struct member 'card' not described in 'memstick_set_rw_addr' memstick.c:513: warning: Function parameter or struct member 'host' not described in 'memstick_add_host' memstick.c:549: warning: Function parameter or struct member 'host' not described in 'memstick_remove_host' memstick.c:571: warning: Function parameter or struct member 'host' not described in 'memstick_free_host' memstick.c:582: warning: Function parameter or struct member 'host' not described in 'memstick_suspend_host' memstick.c:594: warning: Function parameter or struct member 'host' not described in 'memstick_resume_host' Signed-off-by: Randy Dunlap Cc: Maxim Levitsky Cc: Alex Dubov Cc: Ulf Hansson Cc: linux-mmc@vger.kernel.org Link: https://lore.kernel.org/r/20250111063230.910945-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman drivers/memstick/core/memstick.c | 46 +++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 19 deletions(-) commit 73656a6ab6d428102eb5aaa9599b5fcba4a2501f Author: Randy Dunlap Date: Fri Jan 10 22:28:51 2025 -0800 intel_th: core: fix kernel-doc warnings Correct the function parameters based on a previous code patch to eliminate kernel-doc warnings. drivers/hwtracing/intel_th/core.c:866: warning: Function parameter or struct member 'drvdata' not described in 'intel_th_alloc' drivers/hwtracing/intel_th/core.c:866: warning: Function parameter or struct member 'ndevres' not described in 'intel_th_alloc' drivers/hwtracing/intel_th/core.c:866: warning: Excess function parameter 'irq' description in 'intel_th_alloc' Fixes: 62a593022c32 ("intel_th: Communicate IRQ via resource") Signed-off-by: Randy Dunlap Cc: Alexander Shishkin Link: https://lore.kernel.org/r/20250111062851.910530-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 48dc1c3608befa1ede8465805ca5cbc2ddf5df8a Author: Carlos Llamas Date: Fri Jan 10 17:50:50 2025 +0000 binder: log transaction code on failure When a transaction fails, log the 'tr->code' to help indentify the problematic userspace call path. This additional information will simplify debugging efforts. Cc: Steven Moreland Signed-off-by: Carlos Llamas Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20250110175051.2656975-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit be887fcad3f18031232eabcb398d009a3fc3ef61 Merge: 44cefdf1cc6d 5bc55a333a2f Author: Greg Kroah-Hartman Date: Mon Jan 13 06:17:49 2025 +0100 Merge 6.13-rc4 into char-misc-next We need the IIO fixes in here as well, and it resolves a merge conflict in: drivers/iio/adc/ti-ads1119.c Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman commit 26a6cc10f19a058c24cbe3be2a4a10048e66d9c9 Author: Zijun Hu Date: Sun Jan 12 18:33:52 2025 +0800 usb: phy: Remove API devm_usb_put_phy() Static devm_usb_phy_match() is only called by API devm_usb_put_phy(), and the API has no caller now. Remove the API and the static function. Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20250112-remove_api-v1-1-49cc8f792ac9@quicinc.com Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/driver-model/devres.rst | 1 - drivers/usb/phy/phy.c | 26 ------------------------ include/linux/usb/phy.h | 5 ----- 3 files changed, 32 deletions(-) commit 2eb3da037c2c20fa30bc502bc092479b2a1aaae2 Author: Jos Wang Date: Sun Jan 5 21:52:45 2025 +0800 usb: typec: tcpm: set SRC_SEND_CAPABILITIES timeout to PD_T_SENDER_RESPONSE As PD2.0 spec ("8.3.3.2.3 PE_SRC_Send_Capabilities state"), after the Source receives the GoodCRC Message from the Sink in response to the Source_Capabilities message, it should start the SenderResponseTimer, after the timer times out, the state machine transitions to the HARD_RESET state. Fixes: f0690a25a140 ("staging: typec: USB Type-C Port Manager (tcpm)") Cc: stable@vger.kernel.org Signed-off-by: Jos Wang Reviewed-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20250105135245.7493-1-joswang1221@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2919c4a3d883361105185f9d2f658e1a4545a1a7 Merge: 594c82329eef 5bc55a333a2f Author: Greg Kroah-Hartman Date: Mon Jan 13 06:11:06 2025 +0100 Merge 6.13-rc7 into usb-next We need the USB fixes in here as well for testing. Signed-off-by: Greg Kroah-Hartman commit f65c64f311ee2f1ddc1eb395ed8b20e6b9d14e85 Author: Wang Yaxin Date: Fri Dec 20 17:31:05 2024 +0800 delayacct: add delay min to record delay peak Delay accounting can now calculate the average delay of processes, detect the overall system load, and also record the 'delay max' to identify potential abnormal delays. However, 'delay min' can help us identify another useful delay peak. By comparing the difference between 'delay max' and 'delay min', we can understand the optimization space for latency, providing a reference for the optimization of latency performance. Use case ========= bash-4.4# ./getdelays -d -t 242 print delayacct stats ON TGID 242 CPU count real total virtual total delay total delay average delay max delay min 39 156000000 156576579 2111069 0.054ms 0.212296ms 0.031307ms IO count delay total delay average delay max delay min 0 0 0.000ms 0.000000ms 0.000000ms SWAP count delay total delay average delay max delay min 0 0 0.000ms 0.000000ms 0.000000ms RECLAIM count delay total delay average delay max delay min 0 0 0.000ms 0.000000ms 0.000000ms THRASHING count delay total delay average delay max delay min 0 0 0.000ms 0.000000ms 0.000000ms COMPACT count delay total delay average delay max delay min 0 0 0.000ms 0.000000ms 0.000000ms WPCOPY count delay total delay average delay max delay min 156 11215873 0.072ms 0.207403ms 0.033913ms IRQ count delay total delay average delay max delay min 0 0 0.000ms 0.000000ms 0.000000ms Link: https://lkml.kernel.org/r/20241220173105906EOdsPhzjMLYNJJBqgz1ga@zte.com.cn Co-developed-by: Wang Yong Signed-off-by: Wang Yong Co-developed-by: xu xin Signed-off-by: xu xin Signed-off-by: Wang Yaxin Co-developed-by: Kun Jiang Signed-off-by: Kun Jiang Cc: Balbir Singh Cc: David Hildenbrand Cc: Fan Yu Cc: Peilin He Cc: tuqiang Cc: ye xingchen Cc: Yunkai Zhang Signed-off-by: Andrew Morton Documentation/accounting/delay-accounting.rst | 32 ++++++++++---------- include/linux/delayacct.h | 7 +++++ include/linux/sched.h | 3 ++ include/uapi/linux/taskstats.h | 8 +++++ kernel/delayacct.c | 32 +++++++++++++++----- kernel/sched/stats.h | 4 +++ tools/accounting/getdelays.c | 42 ++++++++++++++++----------- 7 files changed, 88 insertions(+), 40 deletions(-) commit 7e70433c2bf542e10c6e40084d8adb7325dc71cb Author: Yafang Shao Date: Thu Dec 19 10:34:52 2024 +0800 drivers: remove get_task_comm() and print task comm directly Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Link: https://lkml.kernel.org/r/20241219023452.69907-6-laoar.shao@gmail.com Signed-off-by: Yafang Shao Reviewed-by: Jiri Slaby (For tty) Reviewed-by: Lyude Paul (For nouveau) Cc: Oded Gabbay Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: David Airlie Cc: Simona Vetter Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: "André Almeida" Cc: Andy Shevchenko Cc: Borislav Petkov (AMD) Cc: Darren Hart Cc: Dave Hansen Cc: Davidlohr Bueso Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Morris Cc: Johannes Berg Cc: Kalle Valo Cc: Kees Cook Cc: Linus Torvalds Cc: Paul Moore Cc: Peter Zijlstra Cc: Petr Mladek Cc: "Serge E. Hallyn" Cc: Thomas Gleixner Cc: Vineet Gupta Signed-off-by: Andrew Morton drivers/accel/habanalabs/common/context.c | 3 +-- drivers/accel/habanalabs/common/habanalabs_ioctl.c | 11 +++-------- drivers/gpu/drm/i915/display/intel_display_driver.c | 6 ++---- drivers/gpu/drm/nouveau/nouveau_chan.c | 4 +--- drivers/gpu/drm/nouveau/nouveau_drm.c | 5 ++--- drivers/tty/tty_io.c | 3 +-- 6 files changed, 10 insertions(+), 22 deletions(-) commit 7c58ed44bd399277c4a14fcb4e447e1da39870d3 Author: Yafang Shao Date: Thu Dec 19 10:34:51 2024 +0800 security: remove get_task_comm() and print task comm directly Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Link: https://lkml.kernel.org/r/20241219023452.69907-5-laoar.shao@gmail.com Signed-off-by: Yafang Shao Reviewed-by: Paul Moore Acked-by: Kees Cook Cc: James Morris Cc: "Serge E. Hallyn" Cc: "André Almeida" Cc: Andy Shevchenko Cc: Borislav Petkov (AMD) Cc: Danilo Krummrich Cc: Darren Hart Cc: Dave Hansen Cc: David Airlie Cc: Davidlohr Bueso Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jani Nikula Cc: Jiri Slaby Cc: Johannes Berg Cc: Joonas Lahtinen Cc: Kalle Valo Cc: Karol Herbst Cc: Linus Torvalds Cc: Lyude Paul Cc: Oded Gabbay Cc: Peter Zijlstra Cc: Petr Mladek Cc: Rodrigo Vivi Cc: Simona Vetter Cc: Thomas Gleixner Cc: Tvrtko Ursulin Cc: Vineet Gupta Signed-off-by: Andrew Morton security/yama/yama_lsm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b619c7ac21853558d08a40a31132950bfecc9383 Author: Yafang Shao Date: Thu Dec 19 10:34:50 2024 +0800 net: remove get_task_comm() and print task comm directly Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Link: https://lkml.kernel.org/r/20241219023452.69907-4-laoar.shao@gmail.com Signed-off-by: Yafang Shao Cc: Johannes Berg Cc: "André Almeida" Cc: Andy Shevchenko Cc: Borislav Petkov (AMD) Cc: Danilo Krummrich Cc: Darren Hart Cc: Dave Hansen Cc: David Airlie Cc: Davidlohr Bueso Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Morris Cc: Jani Nikula Cc: Jiri Slaby Cc: Joonas Lahtinen Cc: Kalle Valo Cc: Karol Herbst Cc: Kees Cook Cc: Linus Torvalds Cc: Lyude Paul Cc: Oded Gabbay Cc: Paul Moore Cc: Peter Zijlstra Cc: Petr Mladek Cc: Rodrigo Vivi Cc: "Serge E. Hallyn" Cc: Simona Vetter Cc: Thomas Gleixner Cc: Tvrtko Ursulin Cc: Vineet Gupta Signed-off-by: Andrew Morton net/wireless/wext-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 52cd5c4b592ce7a7f1317bf50983afa777432bcf Author: Yafang Shao Date: Thu Dec 19 10:34:49 2024 +0800 arch: remove get_task_comm() and print task comm directly Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Link: https://lkml.kernel.org/r/20241219023452.69907-3-laoar.shao@gmail.com Signed-off-by: Yafang Shao Cc: Vineet Gupta Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: "André Almeida" Cc: Andy Shevchenko Cc: Danilo Krummrich Cc: Darren Hart Cc: David Airlie Cc: Davidlohr Bueso Cc: Greg Kroah-Hartman Cc: James Morris Cc: Jani Nikula Cc: Jiri Slaby Cc: Johannes Berg Cc: Joonas Lahtinen Cc: Kalle Valo Cc: Karol Herbst Cc: Kees Cook Cc: Linus Torvalds Cc: Lyude Paul Cc: Oded Gabbay Cc: Paul Moore Cc: Peter Zijlstra Cc: Petr Mladek Cc: Rodrigo Vivi Cc: "Serge E. Hallyn" Cc: Simona Vetter Cc: Tvrtko Ursulin Signed-off-by: Andrew Morton arch/arc/kernel/unaligned.c | 5 ++--- arch/x86/kernel/vm86_32.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) commit b6dcdb06c064b520a3f406bfdc4d64510cf84108 Author: Yafang Shao Date: Thu Dec 19 10:34:48 2024 +0800 kernel: remove get_task_comm() and print task comm directly Patch series "Remove get_task_comm() and print task comm directly", v2. Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. This patch (of 5): Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Link: https://lkml.kernel.org/r/20241219023452.69907-1-laoar.shao@gmail.com Link: https://lkml.kernel.org/r/20241219023452.69907-2-laoar.shao@gmail.com Signed-off-by: Yafang Shao Cc: Serge Hallyn Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Darren Hart Cc: Davidlohr Bueso Cc: "André Almeida" Cc: Andy Shevchenko Cc: Borislav Petkov (AMD) Cc: Kalle Valo Cc: Linus Torvalds Cc: Petr Mladek Cc: Danilo Krummrich Cc: Dave Hansen Cc: David Airlie Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: James Morris Cc: Jani Nikula Cc: Jiri Slaby Cc: Johannes Berg Cc: Joonas Lahtinen Cc: Karol Herbst Cc: Kees Cook Cc: Lyude Paul Cc: Oded Gabbay Cc: Paul Moore Cc: Rodrigo Vivi Cc: Simona Vetter Cc: Tvrtko Ursulin Cc: Vineet Gupta Signed-off-by: Andrew Morton kernel/capability.c | 8 ++------ kernel/futex/waitwake.c | 3 +-- 2 files changed, 3 insertions(+), 8 deletions(-) commit 78346c34d20f571d6495aa50c735653c730b94ad Author: Dominik Karol Piątkowski Date: Fri Dec 20 18:12:12 2024 +0000 kasan: fix typo in kasan_poison_new_object documentation Fix presumed copy-paste typo of kasan_poison_new_object documentation referring to kasan_unpoison_new_object. No functional changes. Link: https://lkml.kernel.org/r/20241220181205.9663-1-dominik.karol.piatkowski@protonmail.com Fixes: 1ce9a0523938 ("kasan: rename and document kasan_(un)poison_object_data") ta") Signed-off-by: Dominik Karol Piątkowski Reviewed-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton include/linux/kasan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41c761dede6e865c679e8be42a266a70302630d6 Author: Ariel Otilibili Date: Thu Dec 19 10:21:12 2024 +0100 lib/inflate.c: remove dead code This is a follow up from a discussion in Xen: The if-statement tests that `res` is non-zero; meaning the case zero is never reached. Link: https://lore.kernel.org/all/7587b503-b2ca-4476-8dc9-e9683d4ca5f0@suse.com/ Link: https://lkml.kernel.org/r/20241219092615.644642-2-ariel.otilibili-anieli@eurecom.fr Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Ariel Otilibili Suggested-by: Jan Beulich Cc: Andrew Cooper Cc: Anthony PERARD Cc: Michal Orzel Cc: Julien Grall Cc: Roger Pau Monné Cc: Stefano Stabellini Signed-off-by: Andrew Morton lib/inflate.c | 2 -- 1 file changed, 2 deletions(-) commit 052e97d9b7716a690a638da130b8d4522aabfc4f Author: Martin Kepplinger Date: Wed Dec 18 12:36:38 2024 +0000 init: fix removal warning for deprecated initrd loading This won't be removed in 2021, no matter how hard we try. Link: https://lkml.kernel.org/r/20241218123638.34907-1-martink@posteo.de Signed-off-by: Martin Kepplinger Cc: Christoph Hellwig Cc: Joel Granados Signed-off-by: Andrew Morton init/do_mounts_initrd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 123f5d5ff28a6a5bef0c8c77953648da84c39d3e Author: Matthew Wilcox (Oracle) Date: Mon Dec 16 16:12:50 2024 +0000 iov_iter: remove setting of page->index Nothing actually checks page->index, so just remove it. Link: https://lkml.kernel.org/r/20241216161253.37687-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: David Howells Signed-off-by: Andrew Morton lib/kunit_iov_iter.c | 3 --- 1 file changed, 3 deletions(-) commit e7606f4a03d5c84a32a7a2ada4270279079ee1fc Author: Mark Tinguely Date: Thu Dec 5 17:16:51 2024 +0000 ocfs2: support large folios in ocfs2_write_zero_page() Remove assumptions that a folio is PAGE_SIZE. Link: https://lkml.kernel.org/r/20241205171653.3179945-24-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2ebe9efc3f455876489ad6ed65b9bf4db292dd35 Author: Mark Tinguely Date: Thu Dec 5 17:16:50 2024 +0000 ocfs2: support large folios in ocfs2_zero_cluster_folios() Remove assumptions that a folio is one page in size. Link: https://lkml.kernel.org/r/20241205171653.3179945-23-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/alloc.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 9d063ebc7f830a8203535e8e45516f4c05deb307 Author: Matthew Wilcox (Oracle) Date: Thu Dec 5 17:16:49 2024 +0000 ocfs2: remove ocfs2_start_walk_page_trans() prototype This function no longer exists. Link: https://lkml.kernel.org/r/20241205171653.3179945-22-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Cc: Mark Tinguely Signed-off-by: Andrew Morton fs/ocfs2/aops.h | 5 ----- 1 file changed, 5 deletions(-) commit d254824ef15dbb67978d4a069d2535cfb913c8f7 Author: Matthew Wilcox (Oracle) Date: Thu Dec 5 17:16:48 2024 +0000 ocfs2: use a folio in ocfs2_fast_symlink_read_folio() Use folio_end_read() instead of SetPageUptodate() and unlock_page(). Use memcpy_to_folio() instead of open-coding a kmap_atomic() sequence. Link: https://lkml.kernel.org/r/20241205171653.3179945-21-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Cc: Mark Tinguely Signed-off-by: Andrew Morton fs/ocfs2/symlink.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 03902e65616e18efc944c21ca1b871813875b257 Author: Matthew Wilcox (Oracle) Date: Thu Dec 5 17:16:47 2024 +0000 ocfs2: convert ocfs2_read_inline_data() to take a folio All callers now have a folio, so pass it in. We can use folio_fill_tail() instead of open-coding it. Saves a call to compound_head(). Link: https://lkml.kernel.org/r/20241205171653.3179945-20-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Cc: Mark Tinguely Signed-off-by: Andrew Morton fs/ocfs2/alloc.c | 2 +- fs/ocfs2/aops.c | 20 ++++++-------------- fs/ocfs2/aops.h | 2 +- 3 files changed, 8 insertions(+), 16 deletions(-) commit 602f206a7cd3cbf9f80888cdc210806a8fb27ff0 Author: Mark Tinguely Date: Thu Dec 5 17:16:46 2024 +0000 ocfs2: convert ocfs2_map_and_dirty_page() to ocfs2_map_and_dirty_folio() All callers now have a folio, so skip the folio->page->folio conversion. Link: https://lkml.kernel.org/r/20241205171653.3179945-19-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/alloc.c | 17 ++++++++--------- fs/ocfs2/alloc.h | 6 +++--- fs/ocfs2/refcounttree.c | 5 ++--- 3 files changed, 13 insertions(+), 15 deletions(-) commit 395ea2ab463087629b254657378f92b24f9a8fb2 Author: Mark Tinguely Date: Thu Dec 5 17:16:45 2024 +0000 ocfs2: convert ocfs2_duplicate_clusters_by_page() to use a folio Retrieve folios from the page cache, not pages, and use a folio throughout this function. Removes seven calls to compound_head(). Link: https://lkml.kernel.org/r/20241205171653.3179945-18-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/refcounttree.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit 9a5e08652dc4bea7de6495d84855439769208eab Author: Mark Tinguely Date: Thu Dec 5 17:16:44 2024 +0000 ocfs2: use an array of folios instead of an array of pages The ocfs2_zero_cluster_folios() / ocfs2_grab_folios() / ocfs2_grab_eof_folios() family of functions pass around an array of pages. Convert them to pass around an array of folios. This removes the last caller of ocfs2_unlock_and_free_pages(), so delete it. Link: https://lkml.kernel.org/r/20241205171653.3179945-17-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/alloc.c | 98 ++++++++++++++++++++++++++++---------------------------- fs/ocfs2/alloc.h | 2 -- fs/ocfs2/aops.c | 13 -------- fs/ocfs2/aops.h | 1 - 4 files changed, 49 insertions(+), 65 deletions(-) commit 4d434f53746a6c7cd2e18b3c2fcc109bf99094d9 Author: Mark Tinguely Date: Thu Dec 5 17:16:43 2024 +0000 ocfs2: convert ocfs2_clear_page_regions() to ocfs2_clear_folio_regions() Pass in and use the folio instead of its page. Link: https://lkml.kernel.org/r/20241205171653.3179945-16-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/aops.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 0313500d5d21778be60fdd699a18aedb6ac34a28 Author: Mark Tinguely Date: Thu Dec 5 17:16:42 2024 +0000 ocfs2: convert ocfs2_map_page_blocks() to ocfs2_map_folio_blocks() All callers now have a folio, so pass it in instead of converting folio->page->folio. Link: https://lkml.kernel.org/r/20241205171653.3179945-15-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/alloc.c | 2 +- fs/ocfs2/aops.c | 18 ++++++++---------- fs/ocfs2/aops.h | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) commit b04d305df1171448df5e87802c4d1f1022cc5784 Author: Mark Tinguely Date: Thu Dec 5 17:16:41 2024 +0000 ocfs2: use a folio in ocfs2_map_and_dirty_page() Convert the incoming page to a folio and use it throughout the function. Removes a couple of calls to compound_head(). Link: https://lkml.kernel.org/r/20241205171653.3179945-14-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/alloc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 38bfefaa12c68709dd01a9658d791c1b1511480f Author: Mark Tinguely Date: Thu Dec 5 17:16:40 2024 +0000 ocfs2: use a folio in ocfs2_prepare_page_for_write() Update to the new APIs. Removes a few page->folio conversions. Link: https://lkml.kernel.org/r/20241205171653.3179945-13-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/aops.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 1b426db11ba812a7805c4911a9629922781f52f1 Author: Mark Tinguely Date: Thu Dec 5 17:16:39 2024 +0000 ocfs2: use a folio in ocfs2_write_end_nolock() Remove an access to page->index. Remove some PAGE_SIZE assumptions. Link: https://lkml.kernel.org/r/20241205171653.3179945-12-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/aops.c | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit ecee61651d8f5cf65a60a6dfc50d7eab7502a392 Author: Mark Tinguely Date: Thu Dec 5 17:16:38 2024 +0000 ocfs2: convert ocfs2_write_failure() to use a folio Remove the folio->page conversion and just use the folio. Link: https://lkml.kernel.org/r/20241205171653.3179945-11-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/aops.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 7e119cff9d0a21e39e53c7d27addc31f4b8c0000 Author: Mark Tinguely Date: Thu Dec 5 17:16:37 2024 +0000 ocfs2: convert w_pages to w_folios Pass around an array of folios instead of an array of pages. Removes a few calls to compound_head(). Link: https://lkml.kernel.org/r/20241205171653.3179945-10-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/aops.c | 118 ++++++++++++++++++++++++++++++-------------------------- fs/ocfs2/aops.h | 1 + 2 files changed, 65 insertions(+), 54 deletions(-) commit 57ea4b89209929abcae298603236c89771e29086 Author: Mark Tinguely Date: Thu Dec 5 17:16:36 2024 +0000 ocfs2: convert ocfs2_inode_lock_with_page() to ocfs2_inode_lock_with_folio() Saves a hidden call to compound_head(). Link: https://lkml.kernel.org/r/20241205171653.3179945-9-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/aops.c | 2 +- fs/ocfs2/dlmglue.c | 18 ++++++++---------- fs/ocfs2/dlmglue.h | 6 ++---- 3 files changed, 11 insertions(+), 15 deletions(-) commit 7654ed889943ee8eb4c5d7a07ce0e86301f1da79 Author: Mark Tinguely Date: Thu Dec 5 17:16:35 2024 +0000 ocfs2: convert ocfs2_readpage_inline() to take a folio Save a couple of calls to compound_head() by using a folio throughout this function. Link: https://lkml.kernel.org/r/20241205171653.3179945-8-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/aops.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b4f3b496dc2f1dd455f6d425ea0976d1ed96766c Author: Matthew Wilcox (Oracle) Date: Thu Dec 5 17:16:34 2024 +0000 ocfs2: pass mmap_folio around instead of mmap_page Saves a few hidden calls to compound_head() and accesses to page->mapping. Link: https://lkml.kernel.org/r/20241205171653.3179945-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Cc: Mark Tinguely Signed-off-by: Andrew Morton fs/ocfs2/aops.c | 37 ++++++++++++++++++------------------- fs/ocfs2/aops.h | 6 +++--- fs/ocfs2/mmap.c | 2 +- 3 files changed, 22 insertions(+), 23 deletions(-) commit e981f18e6d32716186410f848a96b6710d08a862 Author: Mark Tinguely Date: Thu Dec 5 17:16:33 2024 +0000 ocfs2: use a folio in ocfs2_write_begin_inline() Retrieve a folio from the page cache instead of a page and use that folio throught the function. Saves a couple of calls to compound_head(). Link: https://lkml.kernel.org/r/20241205171653.3179945-6-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/aops.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 0fad0a824e5cbe0920f119c7151dd594186687ef Author: Mark Tinguely Date: Thu Dec 5 17:16:32 2024 +0000 ocfs2: use a folio in ocfs2_zero_new_buffers() Convert to the new APIs, saving at least one hidden call to compound_head(). Link: https://lkml.kernel.org/r/20241205171653.3179945-5-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/aops.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 5290687ae320ea81db2689e92d3737904963bf86 Author: Mark Tinguely Date: Thu Dec 5 17:16:31 2024 +0000 ocfs2: convert w_target_page to w_target_folio Pass a folio around instead of a page. Saves a few hidden calls to compound_head() and removes a call to kmap_atomic(). Link: https://lkml.kernel.org/r/20241205171653.3179945-4-willy@infradead.org Signed-off-by: Mark Tinguely Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/aops.c | 63 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 32 deletions(-) commit 3d9e356f0285325936486ab36e7b034ac471f244 Author: Matthew Wilcox (Oracle) Date: Thu Dec 5 17:16:30 2024 +0000 ocfs2: convert ocfs2_page_mkwrite() to use a folio Pass the folio into __ocfs2_page_mkwrite() and use it throughout. Does not attempt to support large folios. Link: https://lkml.kernel.org/r/20241205171653.3179945-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Cc: Mark Tinguely Signed-off-by: Andrew Morton fs/ocfs2/mmap.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2b4c2094da6d84e69b843dd3317902e977bf64bd Author: Matthew Wilcox (Oracle) Date: Thu Dec 5 17:16:29 2024 +0000 ocfs2: handle a symlink read error correctly Patch series "Convert ocfs2 to use folios". Mark did a conversion of ocfs2 to use folios and sent it to me as a giant patch for review ;-) So I've redone it as individual patches, and credited Mark for the patches where his code is substantially the same. It's not a bad way to do it; his patch had some bugs and my patches had some bugs. Hopefully all our bugs were different from each other. And hopefully Mark likes all the changes I made to his code! This patch (of 23): If we can't read the buffer, be sure to unlock the page before returning. Link: https://lkml.kernel.org/r/20241205171653.3179945-1-willy@infradead.org Link: https://lkml.kernel.org/r/20241205171653.3179945-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Cc: Mark Tinguely Cc: Signed-off-by: Andrew Morton fs/ocfs2/symlink.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 78188dd1d24b9d4cd78431feaa13120cfa37ca6a Author: pangliyuan Date: Tue Dec 10 17:08:42 2024 +0800 Squashfs: don't allocate fragment caches more than fragments Sometimes the actual number of fragments in image is between 0 and SQUASHFS_CACHED_FRAGMENTS, which cause additional fragment caches to be allocated. Sets the number of fragment caches to the minimum of fragments and SQUASHFS_CACHED_FRAGMENTS. Link: https://lkml.kernel.org/r/20241210090842.160853-1-pangliyuan1@huawei.com Signed-off-by: pangliyuan Reviewed-by: Phillip Lougher Cc: Signed-off-by: Andrew Morton fs/squashfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0fafc9e1563fbacb92b19ccbde5b8e73280d34b7 Author: Luis Felipe Hernandez Date: Thu Dec 12 23:26:50 2024 -0500 lib/math: add int_sqrt test suite Adds test suite for integer based square root function. The test suite is designed to verify the correctness of the int_sqrt() math library function. Link: https://lkml.kernel.org/r/20241213042701.1037467-1-luis.hernandez093@gmail.com Signed-off-by: Luis Felipe Hernandez Reviewed-by: Kuan-Wei Chiu Cc: David Gow Cc: Ricardo B. Marliere Cc: Shuah Khan Signed-off-by: Andrew Morton lib/Kconfig.debug | 15 ++++++++++ lib/math/Makefile | 1 + lib/math/tests/Makefile | 1 + lib/math/tests/int_sqrt_kunit.c | 66 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 83 insertions(+) commit eb7a18ebd6c72c11494215da603474099b4455af Author: Tamir Duberstein Date: Tue Nov 5 08:03:42 2024 -0400 XArray: minor documentation improvements - Replace "they" with "you" where "you" is used in the preceding sentence fragment. - Mention `xa_erase` in discussion of multi-index entries. Split this into a separate sentence. - Add "call" parentheses on "xa_store" for consistency and linkification. - Add caveat that `xa_store` and `xa_erase` are not equivalent in the presence of `XA_FLAGS_ALLOC`. Link: https://lkml.kernel.org/r/20241105-xarray-documentation-v5-1-8e1702321b41@gmail.com Signed-off-by: Tamir Duberstein Acked-by: Randy Dunlap Reviewed-by: Bagas Sanjaya Cc: Jonathan Corbet Cc: Matthew Wilcox Signed-off-by: Andrew Morton Documentation/core-api/xarray.rst | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 876a5b25d54d2fbc67c3a80abbde097b321f7710 Author: Daniel Yang Date: Fri Nov 15 00:00:17 2024 -0800 ocfs2: replace deprecated simple_strtol with kstrtol simple_strtol() ignores overflows and has an awkward interface for error checking. Replace with the recommended kstrtol function leads to clearer error checking and safer conversions. Link: https://lkml.kernel.org/r/20241115080018.5372-1-danielyangkang@gmail.com Signed-off-by: Daniel Yang Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Signed-off-by: Andrew Morton fs/ocfs2/cluster/heartbeat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a0f8a9a9636e19a11ab80db4a45fb80a230c6c5a Author: Dmitry Antipov Date: Fri Nov 15 18:10:13 2024 +0300 ocfs2: miscellaneous spelling fixes Correct spelling here and there as suggested by codespell. Link: https://lkml.kernel.org/r/20241115151013.1404929-1-dmantipov@yandex.ru Signed-off-by: Dmitry Antipov Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Signed-off-by: Andrew Morton fs/ocfs2/alloc.c | 10 +++++----- fs/ocfs2/aops.c | 2 +- fs/ocfs2/cluster/heartbeat.c | 2 +- fs/ocfs2/cluster/masklog.h | 2 +- fs/ocfs2/cluster/quorum.c | 6 +++--- fs/ocfs2/cluster/tcp.c | 8 ++++---- fs/ocfs2/dlm/dlmapi.h | 2 +- fs/ocfs2/dlm/dlmrecovery.c | 6 +++--- fs/ocfs2/dlmglue.c | 12 ++++++------ fs/ocfs2/inode.c | 4 ++-- fs/ocfs2/ioctl.c | 2 +- fs/ocfs2/journal.c | 2 +- fs/ocfs2/move_extents.c | 8 ++++---- fs/ocfs2/ocfs2_fs.h | 8 ++++---- fs/ocfs2/ocfs2_ioctl.h | 2 +- fs/ocfs2/ocfs2_lockid.h | 2 +- fs/ocfs2/refcounttree.c | 6 +++--- fs/ocfs2/reservations.h | 4 ++-- fs/ocfs2/stack_o2cb.c | 2 +- fs/ocfs2/stackglue.h | 2 +- fs/ocfs2/super.c | 2 +- fs/ocfs2/xattr.c | 10 +++++----- 22 files changed, 52 insertions(+), 52 deletions(-) commit 08de555ae59a8b062f3d84a5f5684129584dd4c6 Author: Daniel Yang Date: Sun Nov 17 13:52:18 2024 -0800 ocfs2: heartbeat: replace simple_strtoul with kstrtoul simple_strtoul() is deprecated due to ignoring overflows and also requires clunkier error checking. Replacing with kstrtoul() leads to safer code and cleaner error checking. Link: https://lkml.kernel.org/r/20241117215219.4012-1-danielyangkang@gmail.com Signed-off-by: Daniel Yang Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Signed-off-by: Andrew Morton fs/ocfs2/cluster/heartbeat.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 386ca64d2466e84d7cffac2828f2b55356f45e58 Author: Thorsten Blum Date: Tue Nov 26 12:47:26 2024 +0100 alpha: remove duplicate included header file Remove duplicate included header file asm/fpu.h Link: https://lkml.kernel.org/r/20241126114728.139029-1-thorsten.blum@linux.dev Signed-off-by: Thorsten Blum Cc: Alexander Viro Cc: Arnd Bergmann Cc: Kent Overstreet Cc: Matt Turner Cc: Pasha Tatashin Cc: Richard Henderson Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton arch/alpha/lib/fpreg.c | 1 - 1 file changed, 1 deletion(-) commit f3a6101b00ad6426488c80d4fc472aee8df93aaa Author: Pratyush Mittal Date: Sat Nov 23 02:29:29 2024 -0800 lib/rhashtable: fix the typo for preemptible Fix the spelling of the mis-spelled word Link: https://lkml.kernel.org/r/20241123102929.11660-1-pratyushmittal@gmail.com Signed-off-by: Pratyush Mittal Signed-off-by: Andrew Morton lib/rhashtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51f8bd6db591689fa1c67628b4cfe9778e76be6d Author: Mateusz Guzik Date: Tue Nov 19 15:35:26 2024 +0100 get_task_exe_file: check PF_KTHREAD locklessly Same thing as 8ac5dc66599c ("get_task_mm: check PF_KTHREAD lockless") Nowadays PF_KTHREAD is sticky and it was never protected by ->alloc_lock. Move the PF_KTHREAD check outside of task_lock() section to make this code more understandable. Link: https://lkml.kernel.org/r/20241119143526.704986-1-mjguzik@gmail.com Signed-off-by: Mateusz Guzik Acked-by: Oleg Nesterov Signed-off-by: Andrew Morton kernel/fork.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 93b6bd40688ba17225ba8c5f28e8ccb713359b05 Author: Shivam Chaudhary Date: Wed Dec 11 21:19:03 2024 +0530 kernel-wide: add explicity||explicitly to spelling.txt Correct the spelling dictionary so that future instances will be caught by checkpatch, and fix the instances found. Link: https://lkml.kernel.org/r/20241211154903.47027-1-cvam0000@gmail.com Signed-off-by: Shivam Chaudhary Cc: Al Viro Cc: Christophe Leroy Cc: Dennis Dalessandro Cc: Jason Gunthorpe Cc: Leon Romanovsky Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Shivam Chaudhary Cc: Colin Ian King Signed-off-by: Andrew Morton arch/powerpc/kvm/book3s_hv.c | 2 +- drivers/infiniband/hw/hfi1/iowait.h | 2 +- drivers/infiniband/hw/usnic/usnic_abi.h | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c | 2 +- drivers/scsi/cxlflash/superpipe.c | 2 +- scripts/spelling.txt | 1 + tools/testing/selftests/pidfd/pidfd_test.c | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) commit 9be53fe697eccf45e5c37e10ffd399eeca5eb489 Author: Eric Sandeen Date: Mon Oct 28 09:41:15 2024 -0500 ocfs2: convert to the new mount API Convert ocfs2 to the new mount API. Link: https://lkml.kernel.org/r/20241028144443.609151-3-sandeen@redhat.com Signed-off-by: Eric Sandeen Reviewed-by: Goldwyn Rodrigues Tested-by: Goldwyn Rodrigues Acked-by: Joseph Qi Tested-by: Joseph Qi Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton fs/ocfs2/ocfs2_trace.h | 20 +- fs/ocfs2/super.c | 589 ++++++++++++++++++++++--------------------------- 2 files changed, 277 insertions(+), 332 deletions(-) commit 94e0c289020a2abafc6bfbb473b51857eed00943 Author: Eric Sandeen Date: Mon Oct 28 09:41:14 2024 -0500 dlmfs: convert to the new mount API Patch series "ocfs2, dlmfs: convert to the new mount API". This patch (of 2): Convert dlmfs to the new mount API. Link: https://lkml.kernel.org/r/20241028144443.609151-1-sandeen@redhat.com Link: https://lkml.kernel.org/r/20241028144443.609151-2-sandeen@redhat.com Signed-off-by: Eric Sandeen Reviewed-by: Goldwyn Rodrigues Tested-by: Goldwyn Rodrigues Acked-by: Joseph Qi Tested-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Signed-off-by: Andrew Morton fs/ocfs2/dlmfs/dlmfs.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 3c16fc0c913a62d4ed52be1b31519f8837086187 Author: Yunhui Cui Date: Tue Dec 10 17:52:38 2024 +0800 watchdog: output this_cpu when printing hard LOCKUP When printing "Watchdog detected hard LOCKUP on cpu", also output the detecting CPU. It's more intuitive. Link: https://lkml.kernel.org/r/20241210095238.63444-1-cuiyunhui@bytedance.com Signed-off-by: Yunhui Cui Reviewed-by: Douglas Anderson Cc: Bitao Hu Cc: Joel Granados Cc: John Ogness Cc: Liu Song Cc: Song Liu Cc: Thomas Weißschuh Signed-off-by: Andrew Morton kernel/watchdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6ca5bbcfd9f8d8a4b35a651d865536fb63e8e0d Author: Easwar Hariharan Date: Tue Dec 10 22:02:50 2024 +0000 ALSA: line6: 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-19-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton sound/usb/line6/toneport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d072c0ba332e2ecdf30c4b0a9de475fa778a8fb Author: Easwar Hariharan Date: Tue Dec 10 22:02:49 2024 +0000 livepatch: 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-18-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Reviewed-by: Christophe Leroy Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton samples/livepatch/livepatch-callbacks-busymod.c | 3 +-- samples/livepatch/livepatch-shadow-fix1.c | 3 +-- samples/livepatch/livepatch-shadow-mod.c | 15 +++++---------- 3 files changed, 7 insertions(+), 14 deletions(-) commit f5ea0319ef4f05afe24645cbec9155c2b44d5174 Author: Easwar Hariharan Date: Tue Dec 10 22:02:48 2024 +0000 ceph: 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-17-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton fs/ceph/quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3b5acec8c849205c56b956df7b6f75d9853d2e8 Author: Easwar Hariharan Date: Tue Dec 10 22:02:47 2024 +0000 staging: vc04_services: 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-16-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eefdb1941fce1b56d42b186da12793d94b4bd9cf Author: Easwar Hariharan Date: Tue Dec 10 22:02:46 2024 +0000 bluetooth: mgmt: 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-15-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton net/bluetooth/mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b29425972c5234a59b6fb634125420ed74266377 Author: Easwar Hariharan Date: Tue Dec 10 22:02:45 2024 +0000 wifi: ath11k: 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-14-ddfefd7e9f2a@linux.microsoft.com Acked-by: Jeff Johnson Signed-off-by: Easwar Hariharan Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton drivers/net/wireless/ath/ath11k/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d1a26adec3b1b3bcdd2793157dd3de0eddc3f5a Author: Easwar Hariharan Date: Tue Dec 10 22:02:43 2024 +0000 xen/blkback: 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-12-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton drivers/block/xen-blkback/blkback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d69f4c972984cdbed0e1d89397206100499a879 Author: Easwar Hariharan Date: Tue Dec 10 22:02:42 2024 +0000 scsi: pm8001: 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-11-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton drivers/scsi/pm8001/pm8001_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38b2ea18aaff18f6066a3f1a145797b09bf65d29 Author: Easwar Hariharan Date: Tue Dec 10 22:02:41 2024 +0000 scsi: arcmsr: 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-10-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton drivers/scsi/arcmsr/arcmsr_hba.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84bbaeb0eda3da7fba1284c93dfb15f2417db838 Author: Easwar Hariharan Date: Tue Dec 10 22:02:40 2024 +0000 scsi: lpfc: 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-9-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton drivers/scsi/lpfc/lpfc_init.c | 18 +++++++++--------- drivers/scsi/lpfc/lpfc_nportdisc.c | 8 ++++---- drivers/scsi/lpfc/lpfc_nvme.c | 2 +- drivers/scsi/lpfc/lpfc_sli.c | 4 ++-- drivers/scsi/lpfc/lpfc_vmid.c | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) commit b4aa02fbefb81525567f39aa60e1c5c23cbe4434 Author: Easwar Hariharan Date: Tue Dec 10 22:02:39 2024 +0000 drm/xe: convert timeout 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-8-ddfefd7e9f2a@linux.microsoft.com Reviewed-by: Thomas Hellström Signed-off-by: Easwar Hariharan Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton drivers/gpu/drm/xe/xe_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2cd5986ebcd911cc97cd3e14439dd6f9ad82923 Author: Easwar Hariharan Date: Tue Dec 10 22:02:38 2024 +0000 accel/habanalabs: 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-7-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton drivers/accel/habanalabs/common/device.c | 2 +- drivers/accel/habanalabs/common/habanalabs_drv.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit 84c398ce2a1c032224337128247d0b8ce986fcef Author: Easwar Hariharan Date: Tue Dec 10 22:02:37 2024 +0000 mm: kmemleak: 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-6-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton mm/kmemleak.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1969392adf4a1b0771a2a5aa0b757ef7e4f799cf Author: Easwar Hariharan Date: Tue Dec 10 22:02:36 2024 +0000 powerpc/papr_scm: 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-5-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Reviewed-by: Christophe Leroy Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton arch/powerpc/platforms/pseries/papr_scm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ad2abf9e12c6e81e6cb218d6cf3ab4e01430852 Author: Easwar Hariharan Date: Tue Dec 10 22:02:35 2024 +0000 s390: kernel: convert timeouts to use secs_to_jiffies() Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the values here are 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) [agordeev@linux.ibm.com: simplify cmm_set_timer()] Link: https://lkml.kernel.org/r/Z2G1ZPL2cAlQOYlF@li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-4-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Signed-off-by: Alexander Gordeev Acked-by: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton arch/s390/kernel/lgr.c | 2 +- arch/s390/kernel/time.c | 4 ++-- arch/s390/kernel/topology.c | 2 +- arch/s390/mm/cmm.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 75c2d6399baa16781f3821ac702cffbdba5d85dd Author: Easwar Hariharan Date: Tue Dec 10 22:02:34 2024 +0000 arm: pxa: convert timeouts to use 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-3-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton arch/arm/mach-pxa/sharpsl_pm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 551dbd1ec7ff10e06ec077eb264cec0c971b66eb Author: Easwar Hariharan Date: Tue Dec 10 22:02:33 2024 +0000 coccinelle: misc: add secs_to_jiffies script This script finds and suggests conversions of timeout patterns that result in seconds-denominated timeouts to use the new secs_to_jiffies() API in include/linux/jiffies.h for better readability. Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-2-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Suggested-by: Anna-Maria Behnsen Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Signed-off-by: Andrew Morton scripts/coccinelle/misc/secs_to_jiffies.cocci | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit e0835baf62546745843ac4ff8d721b1b3eb15733 Author: Easwar Hariharan Date: Tue Dec 10 22:02:32 2024 +0000 netfilter: conntrack: cleanup timeout definitions Patch series "Converge on using secs_to_jiffies()", v3. This is a series that follows up on my previous series to introduce secs_to_jiffies() and convert a few initial users.[1] In the review for that series, Anna-Maria requested converting other users with Coccinelle. [2] This is part 1 that converts users of msecs_to_jiffies() that use the multiply pattern of either of: - msecs_to_jiffies(N*1000), or - msecs_to_jiffies(N*MSEC_PER_SEC) where N is a constant, to avoid the multiplication. The entire conversion is made with Coccinelle in the script added in patch 2. Some changes suggested by Coccinelle have been deferred to later parts that will address other possible variant patterns. [1] https://lore.kernel.org/all/20241030-open-coded-timeouts-v3-0-9ba123facf88@linux.microsoft.com/ [2] https://lore.kernel.org/all/8734kngfni.fsf@somnus/ This patch (of 19): None of the higher order definitions are used anymore, so remove definitions for minutes, hours, and days timeouts. Convert the seconds denominated timeouts to secs_to_jiffies() Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-1-ddfefd7e9f2a@linux.microsoft.com Signed-off-by: Easwar Hariharan Cc: Alexander Gordeev Cc: Andrew Lunn Cc: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Daniel Mack Cc: David Airlie Cc: David S. Miller Cc: Dick Kennedy Cc: Eric Dumazet Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Haojian Zhuang Cc: Heiko Carstens Cc: Ilya Dryomov Cc: Jack Wang Cc: Jakub Kicinski Cc: James Bottomley Cc: James Smart Cc: Jaroslav Kysela Cc: Jeff Johnson Cc: Jens Axboe Cc: Jeroen de Borst Cc: Jiri Kosina Cc: Joe Lawrence Cc: Johan Hedberg : Cc: Josh Poimboeuf Cc: Jozsef Kadlecsik Cc: Julia Lawall Cc: Kalle Valo Cc: Louis Peens Cc: Lucas De Marchi Cc: Luiz Augusto von Dentz Cc: Maarten Lankhorst Cc: Madhavan Srinivasan Cc: Marcel Holtmann : Cc: Martin K. Petersen Cc: Maxime Ripard Cc: Michael Ellerman Cc: Miroslav Benes Cc: Naveen N Rao Cc: Nicholas Piggin Cc: Nicolas Palix Cc: Oded Gabbay Cc: Ofir Bitton Cc: Pablo Neira Ayuso Cc: Paolo Abeni Cc: Petr Mladek Cc: Praveen Kaligineedi Cc: Ray Jui Cc: Robert Jarzmik Cc: Rodrigo Vivi Cc: Roger Pau Monné Cc: Russell King Cc: Scott Branden Cc: Shailend Chand Cc: Simona Vetter Cc: Simon Horman Cc: Sven Schnelle Cc: Takashi Iwai Cc: Thomas Hellström Cc: Thomas Zimmermann Cc: Vasily Gorbik Cc: Xiubo Li Cc: Jeff Johnson Signed-off-by: Andrew Morton net/netfilter/nf_conntrack_proto_sctp.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit e9bc360b105c2042db30c36ed1c5ca48dcc7f84b Author: Akinobu Mita Date: Sun Dec 8 23:24:15 2024 +0900 fault-inject: use prandom where cryptographically secure randomness is not needed Currently get_random*() is used to determine the probability of fault injection, but cryptographically secure random numbers are not required. There is no big problem in using prandom instead of get_random*() to determine the probability of fault injection, and it also avoids acquiring a spinlock, which is unsafe in some contexts. [akpm@linux-foundation.org: tweak and reflow comment] Link: https://lore.kernel.org/lkml/20241129120939.GG35539@noisy.programming.kicks-ass.net Link: https://lkml.kernel.org/r/20241208142415.205960-1-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Suggested-by: Peter Zijlstra Cc: Peter Zijlstra Cc: Masami Hiramatsu Signed-off-by: Andrew Morton lib/fault-inject.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 3735c5225b97cb57745afd151904d08847b09cc7 Author: Tamir Duberstein Date: Wed Dec 4 13:41:06 2024 -0500 checkpatch: check return of `git_commit_info` Avoid string concatenation with an undefined variable when a reference to a missing commit is contained in a `Fixes` tag. Given this patch: : From: Tamir Duberstein : Subject: Test patch : Date: Fri, 25 Oct 2024 19:30:51 -0400 : : This is a test patch. : : Fixes: deadbeef111 : Signed-off-by: Tamir Duberstein : --- /dev/null : +++ b/new-file : @@ -0,0 +1 @@ : +Test. Before: WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("")' - ie: 'Fixes: ("commit title")' WARNING: Unknown commit id 'deadbeef111', maybe rebased or not pulled? Use of uninitialized value $cid in concatenation (.) or string at scripts/checkpatch.pl line 3242. After: WARNING: Unknown commit id 'deadbeef111', maybe rebased or not pulled? This patch also reduce duplication slightly. [akpm@linux-foundation.org: s/12 chars of sha1/12+ chars of sha1/, per Jon] Link: https://lkml.kernel.org/r/87o70kt232.fsf@trenco.lwn.net Link: https://lkml.kernel.org/r/20241204-checkpatch-missing-commit-v1-1-68b34c94944e@gmail.com Signed-off-by: Tamir Duberstein <tamird@gmail.com> Cc: Andy Whitcroft <apw@canonical.com> Cc: Dwaipayan Ray <dwaipayanray1@gmail.com> Cc: Joe Perches <joe@perches.com> Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> scripts/checkpatch.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f49b42d415a32faee6bc08923821f432f64a4e90 Author: MengEn Sun <mengensun@tencent.com> Date: Fri Dec 6 12:13:47 2024 +0800 ucounts: move kfree() out of critical zone protected by ucounts_lock Although kfree is a non-sleep function, it is possible to enter a long chain of calls probabilistically, so it looks better to move kfree from alloc_ucounts() out of the critical zone of ucounts_lock. Link: https://lkml.kernel.org/r/1733458427-11794-1-git-send-email-mengensun@tencent.com Signed-off-by: MengEn Sun <mengensun@tencent.com> Reviewed-by: YueHong Wu <yuehongwu@tencent.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Andrei Vagin <avagin@google.com> Cc: Joel Granados <joel.granados@kernel.org> Cc: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> kernel/ucount.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c7bb5cf9fc4e95dff4a3a34b1d14363a6eebdc84 Author: Tamir Duberstein <tamird@gmail.com> Date: Thu Dec 5 10:11:26 2024 -0500 xarray: port tests to kunit Minimally rewrite the XArray unit tests to use kunit. This integrates nicely with existing kunit tools which produce nicer human-readable output compared to the existing machinery. Running the xarray tests before this change requires an obscure invocation ``` tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1 \ --kconfig_add CONFIG_TEST_XARRAY=y --raw_output=all nothing ``` which on failure produces ``` BUG at check_reserve:513 ... XArray: 6782340 of 6782364 tests passed ``` and exits 0. Running the xarray tests after this change requires a simpler invocation ``` tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1 \ xarray ``` which on failure produces (colors omitted) ``` [09:50:53] ====================== check_reserve ====================== [09:50:53] [FAILED] param-0 [09:50:53] # check_reserve: EXPECTATION FAILED at lib/test_xarray.c:536 [09:50:53] xa_erase(xa, 12345678) != NULL ... [09:50:53] # module: test_xarray [09:50:53] # xarray: pass:26 fail:3 skip:0 total:29 [09:50:53] # Totals: pass:28 fail:3 skip:0 total:31 [09:50:53] ===================== [FAILED] xarray ====================== ``` and exits 1. Use of richer kunit assertions is intentionally omitted to reduce the scope of the change. [akpm@linux-foundation.org: fix cocci warning] Link: https://lore.kernel.org/oe-kbuild-all/202412081700.YXB3vBbg-lkp@intel.com/ Link: https://lkml.kernel.org/r/20241205-xarray-kunit-port-v1-1-ee44bc7aa201@gmail.com Signed-off-by: Tamir Duberstein <tamird@gmail.com> Cc: Bill Wendling <morbo@google.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Justin Stitt <justinstitt@google.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Naveen N Rao <naveen@kernel.org> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> arch/m68k/configs/amiga_defconfig | 1 - arch/m68k/configs/apollo_defconfig | 1 - arch/m68k/configs/atari_defconfig | 1 - arch/m68k/configs/bvme6000_defconfig | 1 - arch/m68k/configs/hp300_defconfig | 1 - arch/m68k/configs/mac_defconfig | 1 - arch/m68k/configs/multi_defconfig | 1 - arch/m68k/configs/mvme147_defconfig | 1 - arch/m68k/configs/mvme16x_defconfig | 1 - arch/m68k/configs/q40_defconfig | 1 - arch/m68k/configs/sun3_defconfig | 1 - arch/m68k/configs/sun3x_defconfig | 1 - arch/powerpc/configs/ppc64_defconfig | 1 - lib/Kconfig.debug | 18 +- lib/Makefile | 2 +- lib/test_xarray.c | 671 ++++++++++++++++++++--------------- 16 files changed, 410 insertions(+), 294 deletions(-) commit 7a77edf45a05615775d1e423a7309b9f06e866ec Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Thu Dec 5 14:20:44 2024 +0100 include: update references to include/asm-<arch> "include/asm-<arch>" was replaced by "arch/<arch>/include/asm" a long time ago. Link: https://lkml.kernel.org/r/541258219b0441fa1da890e2f8458a7ac18c2ef9.1733404444.git.geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Andy Whitcroft <apw@canonical.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Dwaipayan Ray <dwaipayanray1@gmail.com> Cc: Joe Perches <joe@perches.com> Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Yury Norov <yury.norov@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> include/asm-generic/syscall.h | 2 +- include/linux/bitmap.h | 2 +- include/linux/types.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 10d2711105bd0da774f57bdcd272021b8c453bd3 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Thu Dec 5 14:20:42 2024 +0100 checkpatch: update reference to include/asm-<arch> Patch series "Update reference to include/asm-<arch>". Despite "include/asm-<arch>" having been replaced by "arch/<arch>/include/asm" 15 years ago, there are still several references left. This patch series updates the most visible ones. This patch (of 3): "include/asm-<arch>" was replaced by "arch/<arch>/include/asm" a long time ago. Link: https://lkml.kernel.org/r/cover.1733404444.git.geert+renesas@glider.be Link: https://lkml.kernel.org/r/2c4a75726a976d117055055b68a31c40dcab044e.1733404444.git.geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Andy Whitcroft <apw@canonical.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Dwaipayan Ray <dwaipayanray1@gmail.com> Cc: Joe Perches <joe@perches.com> Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Yury Norov <yury.norov@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5cf6b0d170fe57da66bc0456bfae4c6aa106860 Author: zhang jiao <zhangjiao2@cmss.chinamobile.com> Date: Tue Dec 3 10:05:50 2024 +0800 tools/accounting/procacct: fix minor errors The logfile option was documented but not working. Add it and optimized the while loop. Link: https://lkml.kernel.org/r/20241203020550.3145-1-zhangjiao2@cmss.chinamobile.com Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com> Reviewed-by: Dr. Thomas Orgis <thomas.orgis@uni-hamburg.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> tools/accounting/procacct.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 658eb5ab916ddc92f294dbce8e3d449470be9f86 Author: Wang Yaxin <wang.yaxin@zte.com.cn> Date: Tue Dec 3 16:48:48 2024 +0800 delayacct: add delay max to record delay peak Introduce the use cases of delay max, which can help quickly detect potential abnormal delays in the system and record the types and specific details of delay spikes. Problem ======== Delay accounting can track the average delay of processes to show system workload. However, when a process experiences a significant delay, maybe a delay spike, which adversely affects performance, getdelays can only display the average system delay over a period of time. Yet, average delay is unhelpful for diagnosing delay peak. It is not even possible to determine which type of delay has spiked, as this information might be masked by the average delay. Solution ========= the 'delay max' can display delay peak since the system's startup, which can record potential abnormal delays over time, including the type of delay and the maximum delay. This is helpful for quickly identifying crash caused by delay. Use case ========= bash# ./getdelays -d -p 244 print delayacct stats ON PID 244 CPU count real total virtual total delay total delay average delay max 68 192000000 213676651 705643 0.010ms 0.306381ms IO count delay total delay average delay max 0 0 0.000ms 0.000000ms SWAP count delay total delay average delay max 0 0 0.000ms 0.000000ms RECLAIM count delay total delay average delay max 0 0 0.000ms 0.000000ms THRASHING count delay total delay average delay max 0 0 0.000ms 0.000000ms COMPACT count delay total delay average delay max 0 0 0.000ms 0.000000ms WPCOPY count delay total delay average delay max 235 15648284 0.067ms 0.263842ms IRQ count delay total delay average delay max 0 0 0.000ms 0.000000ms [wang.yaxin@zte.com.cn: update docs and fix some spelling errors] Link: https://lkml.kernel.org/r/20241213192700771XKZ8H30OtHSeziGqRVMs0@zte.com.cn Link: https://lkml.kernel.org/r/20241203164848805CS62CQPQWG9GLdQj2_BxS@zte.com.cn Co-developed-by: Wang Yong <wang.yong12@zte.com.cn> Signed-off-by: Wang Yong <wang.yong12@zte.com.cn> Co-developed-by: xu xin <xu.xin16@zte.com.cn> Signed-off-by: xu xin <xu.xin16@zte.com.cn> Co-developed-by: Wang Yaxin <wang.yaxin@zte.com.cn> Signed-off-by: Wang Yaxin <wang.yaxin@zte.com.cn> Signed-off-by: Kun Jiang <jiang.kun2@zte.com.cn> Cc: Balbir Singh <bsingharora@gmail.com> Cc: David Hildenbrand <david@redhat.com> Cc: Fan Yu <fan.yu9@zte.com.cn> Cc: Peilin He <he.peilin@zte.com.cn> Cc: tuqiang <tu.qiang35@zte.com.cn> Cc: Yang Yang <yang.yang29@zte.com.cn> Cc: ye xingchen <ye.xingchen@zte.com.cn> Cc: Yunkai Zhang <zhang.yunkai@zte.com.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Documentation/accounting/delay-accounting.rst | 42 +++++++++---------- include/linux/delayacct.h | 7 ++++ include/linux/sched.h | 3 ++ include/uapi/linux/taskstats.h | 9 ++++ kernel/delayacct.c | 37 ++++++++++++----- kernel/sched/stats.h | 5 ++- tools/accounting/getdelays.c | 59 +++++++++++++++------------ 7 files changed, 105 insertions(+), 57 deletions(-) commit 1e1857230c4879ae6ec37e1dbcbf6ce6217056b5 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Thu Oct 17 23:34:49 2024 +0800 kernel/resource: simplify API __devm_release_region() implementation Simplify __devm_release_region() implementation by dedicated API devres_release() which have below advantages than current __release_region() + devres_destroy(): It is simpler if __devm_release_region() is undoing what __devm_request_region() did, otherwise, it can avoid wrong and undesired __release_region(). Link: https://lkml.kernel.org/r/20241017-release_region_fix-v1-1-84a3e8441284@quicinc.com Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> kernel/resource.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 79ada2ae66153e285b3717ee4d4a56c8e517c1fa Author: Tamir Duberstein <tamird@gmail.com> Date: Tue Nov 12 14:25:37 2024 -0500 xarray: extract helper from __xa_{insert,cmpxchg} Reduce code duplication by extracting a static inline function. This function is identical to __xa_cmpxchg with the exception that it does not coerce zero entries to null on the return path. [tamird@gmail.com: fix __xa_erase()] Link: https://lkml.kernel.org/r/CAJ-ks9kN_qddZ3Ne5d=cADu5POC1rHd4rQcbVSD_spnZOrLLZg@mail.gmail.com Link: https://lkml.kernel.org/r/20241112-xarray-insert-cmpxchg-v1-2-dc2bdd8c4136@gmail.com Signed-off-by: Tamir Duberstein <tamird@gmail.com> Cc: Alice Ryhl <aliceryhl@google.com> Cc: Andreas Hindborg <a.hindborg@kernel.org> Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> lib/xarray.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) commit 74e2712b14e35a200ba24b0b99e56a2d91499ff0 Author: Tamir Duberstein <tamird@gmail.com> Date: Tue Nov 12 14:25:36 2024 -0500 xarray: extract xa_zero_to_null Patch series "xarray: extract __xa_cmpxchg_raw". This series reduces duplication between __xa_cmpxchg and __xa_insert by extracting a new function that does not coerce zero entries to null on the return path. The new function may be used by the upcoming Rust xarray abstraction in its reservation API where it is useful to tell the difference between zero entries and null slots. This patch (of 2): Reduce code duplication by extracting a static inline function that returns its argument if it is non-zero and NULL otherwise. This changes xas_result to check for errors before checking for zero but this cannot change the behavior of existing callers: - __xa_erase: passes the result of xas_store(_, NULL) which cannot fail. - __xa_store: passes the result of xas_store(_, entry) which may fail. xas_store calls xas_create when entry is not NULL which returns NULL on error, which is immediately checked. This should not change observable behavior. - __xa_cmpxchg: passes the result of xas_load(_) which might be zero. This would previously return NULL regardless of the outcome of xas_store but xas_store cannot fail if xas_load returns zero because there is no need to allocate memory. - xa_store_range: same as __xa_erase. Link: https://lkml.kernel.org/r/20241112-xarray-insert-cmpxchg-v1-0-dc2bdd8c4136@gmail.com Link: https://lkml.kernel.org/r/20241112-xarray-insert-cmpxchg-v1-1-dc2bdd8c4136@gmail.com Signed-off-by: Tamir Duberstein <tamird@gmail.com> Cc: Alice Ryhl <aliceryhl@google.com> Cc: Andreas Hindborg <a.hindborg@kernel.org> Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> lib/xarray.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 4093676f8358be23ee5536b8a32dda381862a3cb Author: Colin Ian King <colin.i.king@gmail.com> Date: Wed Nov 13 10:21:06 2024 +0000 scripts/spelling.txt: add more spellings to spelling.txt Add some of the more common spelling mistakes and typos that I've found while fixing up spelling mistakes in the kernel over the past year. Link: https://lkml.kernel.org/r/20241113102106.1163050-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> scripts/spelling.txt | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit b9da6f70e07200798b08b620896da4ebdfe10c98 Author: Kuan-Wei Chiu <visitorckw@gmail.com> Date: Sat Nov 30 02:12:22 2024 +0800 Documentation/core-api: min_heap: add author information As with other documentation files, author information is added to min_heap.rst, providing contact details for any questions regarding the Min Heap API or the document itself. Link: https://lkml.kernel.org/r/20241129181222.646855-5-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Cc: Ching-Chun (Jim) Huang <jserv@ccns.ncku.edu.tw> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Documentation/core-api/min_heap.rst | 2 ++ 1 file changed, 2 insertions(+) commit 2ad0546deb0214e385dbf33bb7a5e26c0dda3ad1 Author: Kuan-Wei Chiu <visitorckw@gmail.com> Date: Sat Nov 30 02:12:21 2024 +0800 lib min_heap: add brief introduction to Min Heap API A short description of the Min Heap API is added to the min_heap.h, explaining its purpose for managing min-heaps and emphasizing the use of macro wrappers instead of direct function calls. For more details, users are directed to the documentation at Documentation/core-api/min_heap.rst. Link: https://lkml.kernel.org/r/20241129181222.646855-4-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Cc: Ching-Chun (Jim) Huang <jserv@ccns.ncku.edu.tw> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> include/linux/min_heap.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 93aa1b5c1722b697ecc4eae490fdb55c0f3cfe22 Author: Kuan-Wei Chiu <visitorckw@gmail.com> Date: Sat Nov 30 02:12:20 2024 +0800 lib/test_min_heap: use inline min heap variants to reduce attack vector To address concerns about increasing the attack vector, remove the select MIN_HEAP dependency from TEST_MIN_HEAP in Kconfig.debug. Additionally, all min heap test function calls in lib/test_min_heap.c are replaced with their inline variants. By exclusively using inline variants, we eliminate the need to enable CONFIG_MIN_HEAP for testing purposes. Link: https://lore.kernel.org/lkml/CAMuHMdVO5DPuD9HYWBFqKDHphx7+0BEhreUxtVC40A=8p6VAhQ@mail.gmail.com Link: https://lkml.kernel.org/r/20241129181222.646855-3-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ching-Chun (Jim) Huang <jserv@ccns.ncku.edu.tw> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> lib/Kconfig.debug | 1 - lib/test_min_heap.c | 30 +++++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-) commit ec01e9d001fef6278df1900df4207c70166095b4 Author: Kuan-Wei Chiu <visitorckw@gmail.com> Date: Sat Nov 30 02:12:19 2024 +0800 lib min_heap: improve type safety in min_heap macros by using container_of Patch series "lib min_heap: Improve min_heap safety, testing, and documentation". Improve the min heap implementation by enhancing type safety with container_of, reducing the attack vector by replacing test function calls with inline variants, and adding a brief API introduction in min_heap.h. It also includes author information in Documentation/core-api/min_heap.rst. This patch (of 4): The current implementation of min_heap macros uses explicit casting to min_heap_char *, which prevents the compiler from detecting incorrect pointer types. This can lead to errors if non-min_heap pointers are passed inadvertently. To enhance safety, replace all explicit casts to min_heap_char * with the use of container_of(&(_heap)->nr, min_heap_char, nr). This approach ensures that the _heap parameter is indeed a min_heap_char-compatible structure, allowing the compiler to catch improper usages. Link: https://lkml.kernel.org/r/20241129181222.646855-1-visitorckw@gmail.com Link: https://lore.kernel.org/lkml/CAMuHMdVO5DPuD9HYWBFqKDHphx7+0BEhreUxtVC40A=8p6VAhQ@mail.gmail.com Link: https://lkml.kernel.org/r/20241129181222.646855-2-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ching-Chun (Jim) Huang <jserv@ccns.ncku.edu.tw> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> include/linux/min_heap.h | 61 +++++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 26 deletions(-) commit 352fafe97784e81a10a7c74bd508f71a19b53c2a Author: Charles Han <hanchunchao@inspur.com> Date: Fri Jan 10 16:42:37 2025 +0800 firewire: test: Fix potential null dereference in firewire kunit test kunit_kzalloc() may return a NULL pointer, dereferencing it without NULL check may lead to NULL dereference. Add a NULL check for test_state. Fixes: 1c8506d62624 ("firewire: test: add test of device attributes for simple AV/C device") Signed-off-by: Charles Han <hanchunchao@inspur.com> Link: https://lore.kernel.org/r/20250110084237.8877-1-hanchunchao@inspur.com Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> drivers/firewire/device-attribute-test.c | 2 ++ 1 file changed, 2 insertions(+) commit 24c61d553302ee49e9c21dd251275ba8c36dcfe4 Merge: c3d590f8ba04 866e43b945bf Author: Dave Airlie <airlied@redhat.com> Date: Mon Jan 13 11:14:06 2025 +1000 Merge tag 'drm-msm-next-2025-01-07' of gitlab.freedesktop.org:drm/msm into drm-next Updates for v6.14 MDSS: - properly described UBWC registers - added SM6150 (aka QCS615) support MDP4: - several small fixes DPU: - added SM6150 (aka QCS615) support - enabled wide planes if virtual planes are enabled (by using two SSPPs for a single plane) - fixed modes filtering for platforms w/o 3DMux - fixed DSPP DSPP_2 / _3 links on several platforms - corrected DSPP definitions on SDM670 - added CWB hardware blocks support - added VBIF to DPU snapshots - dropped struct dpu_rm_requirements DP: - reworked DP audio support DSI: - added SM6150 (aka QCS615) support GPU: - Print GMU core fw version - GMU bandwidth voting for a740 and a750 - Expose uche trap base via uapi - UAPI error reporting Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rob Clark <robdclark@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGsutUu4ff6OpXNXxqf1xaV0rV6oV23VXNRiF0_OEfe72Q@mail.gmail.com commit c3d590f8ba0474bb77b91efc49f9ed91a8181f97 Merge: 0dc853865ab5 812a33a65d00 Author: Dave Airlie <airlied@redhat.com> Date: Mon Jan 13 11:13:05 2025 +1000 Merge tag 'amd-drm-next-6.14-2025-01-10' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.14-2025-01-10: amdgpu: - Fix max surface handling in DC - clang fixes - DCN 3.5 fixes - DCN 4.0.1 fixes - DC CRC fixes - DML updates - DSC fixes - PSR fixes - DC add some divide by 0 checks - SMU13 updates - SR-IOV fixes - RAS fixes - Cleaner shader support for gfx10.3 dGPUs - fix drm buddy trim handling - SDMA engine reset updates _ Fix RB bitmap setup - Fix doorbell ttm cleanup - Add CEC notifier support - DPIA updates - MST fixes amdkfd: - Shader debugger fixes - Trap handler cleanup - Cleanup includes - Eviction fence wq fix Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250110172731.2960668-1-alexander.deucher@amd.com commit 0dc853865ab52c88c20cd7917f91553dcd768e50 Merge: 255e094a300a 6a04bb5a2046 Author: Dave Airlie <airlied@redhat.com> Date: Mon Jan 13 11:07:31 2025 +1000 Merge tag 'drm-xe-next-2025-01-10' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next Driver Changes: - SRIOV VF: Avoid reading inaccessible registers (Jakub, Marcin) - Introduce RPa frequency information (Rodrigo) - Remove unnecessary force wakes on SLPC code (Vinay) - Fix all typos in xe (Nitin) - Adding steering info support for GuC register lists (Jesus) - Remove unused xe_pciids.h harder, add missing PCI ID (Jani) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/Z4E0tlTAA6MZ7PF2@intel.com commit 2a388ff22d2cbfc5cbd628ef085bdcd3b7dc64f5 Author: Michal Simek <michal.simek@amd.com> Date: Wed Nov 27 17:01:22 2024 +0100 rtc: zynqmp: Fix optional clock name property Clock description in DT binding introduced by commit f69060c14431 ("dt-bindings: rtc: zynqmp: Add clock information") is talking about "rtc" clock name but driver is checking "rtc_clk" name instead. Because clock is optional property likely in was never handled properly by the driver. Fixes: 07dcc6f9c762 ("rtc: zynqmp: Add calibration set and get support") Signed-off-by: Michal Simek <michal.simek@amd.com> Cc: stable@kernel.org Reviewed-by: Peter Korsgaard <peter@korsgaard.com> Link: https://lore.kernel.org/r/cd5f0c9d01ec1f5a240e37a7e0d85b8dacb3a869.1732723280.git.michal.simek@amd.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> drivers/rtc/rtc-zynqmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 09471d8f5b390883eaf21b917c4bf3ced1b8a1df Author: Ming Wang <wangming01@loongson.cn> Date: Thu Dec 5 19:43:07 2024 +0800 rtc: loongson: clear TOY_MATCH0_REG in loongson_rtc_isr() The TOY_MATCH0_REG should be cleared to 0 in the RTC interrupt handler, otherwise the interrupt cannot be cleared, which will cause the loongson_rtc_isr() to be triggered multiple times. The previous code cleared TOY_MATCH0_REG in the loongson_rtc_handler(), which is an ACPI interrupt. This did not prevent loongson_rtc_isr() from being triggered multiple times. This commit moves the clearing of TOY_MATCH0_REG to the loongson_rtc_isr() to ensure that the interrupt is properly cleared. Fixes: 1b733a9ebc3d ("rtc: Add rtc driver for the Loongson family chips") Signed-off-by: Ming Wang <wangming01@loongson.cn> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Reviewed-by: Keguang Zhang <keguang.zhang@gmail.com> # on LS1B Tested-by: Keguang Zhang <keguang.zhang@gmail.com> Link: https://lore.kernel.org/r/20241205114307.1891418-1-wangming01@loongson.cn Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> drivers/rtc/rtc-loongson.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 3ab8c5ed4f84fa20cd16794fe8dc31f633fbc70c Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Wed Dec 18 20:34:58 2024 +0100 rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM read The nvmem interface supports variable buffer sizes, while the regmap interface operates with fixed-size storage. If an nvmem client uses a buffer size less than 4 bytes, regmap_read will write out of bounds as it expects the buffer to point at an unsigned int. Fix this by using an intermediary unsigned int to hold the value. Fixes: fadfd092ee91 ("rtc: pcf85063: add nvram support") Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.kernel.org/r/20241218-rtc-pcf85063-stack-corruption-v1-1-12fd0ee0f046@pengutronix.de Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> drivers/rtc/rtc-pcf85063.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 09c4a610153286cef54d4f0c85398f4e32fc227e Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Wed Dec 11 12:32:34 2024 +0300 rtc: tps6594: Fix integer overflow on 32bit systems The problem is this multiply in tps6594_rtc_set_offset() tmp = offset * TICKS_PER_HOUR; The "tmp" variable is an s64 but "offset" is a long in the (-277774)-277774 range. On 32bit systems a long can hold numbers up to approximately two billion. The number of TICKS_PER_HOUR is really large, (32768 * 3600) or roughly a hundred million. When you start multiplying by a hundred million it doesn't take long to overflow the two billion mark. Probably the safest way to fix this is to change the type of TICKS_PER_HOUR to long long because it's such a large number. Fixes: 9f67c1e63976 ("rtc: tps6594: Add driver for TPS6594 RTC") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/1074175e-5ecb-4e3d-b721-347d794caa90@stanley.mountain Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> drivers/rtc/rtc-tps6594.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5eb6d3561f6cb6d59887be6da764417e437f6afa Author: Defa Li <defa.li@mediatek.com> Date: Thu Dec 12 17:17:53 2024 +0800 i3c: master: Improve initialization of numbered I2C adapters Add logic to initialize I2C adapters with a specific ID if available, improving device identification and configuration. For mixed buses, in addition to the i3c alias, an i2c alias can be added to assign a fixed bus number to the i2c adapter. This allows an alias node such as: aliases { i2c2 = &mixed_bus_a, i3c2 = &mixed_bus_a, i3c4 = &mixed_bus_b, }; /* assigned "i3c-2" and "i2c-2" */ mixed_bus_a: i3c-master { }; If there is no i2c alias for a mixed bus, the i2c adapter numbers will remain as is and will be assigned starting after the highest fixed bus number. /* assigned "i3c-4" and likely assigned "i2c-3" */ mixed_bus_b: i3c-master { }; Signed-off-by: Defa Li <defa.li@mediatek.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20241212091818.8591-1-defa.li@mediatek.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> drivers/i3c/master.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit b266e0d4dac00eecdfaf50ec3f708fd0c3b39637 Author: Frank Li <Frank.Li@nxp.com> Date: Wed Jan 8 17:55:33 2025 -0500 i3c: master: Fix missing 'ret' assignment in set_speed() Fix a probe failure in the i3c master driver that occurs when no i3c devices are connected to the bus. The issue arises in `i3c_master_bus_init()` where the `ret` value is not updated after calling `master->ops->set_speed()`. If no devices are present, `ret` remains set to `I3C_ERROR_M2`, causing the code to incorrectly proceed to `err_bus_cleanup`. Cc: stable@vger.kernel.org Fixes: aef79e189ba2 ("i3c: master: support to adjust first broadcast address speed") Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20250108225533.915334-1-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> drivers/i3c/master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e8c732357ce0abe6251120d65f1ddbe5bc939fd Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Tue Jan 7 10:02:03 2025 +0100 i3c: cdns: use parity8 helper instead of open coding it The kernel has now a generic helper for getting parity with easier to understand semantics. Make use of it. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20250107090204.6593-6-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> drivers/i3c/master/i3c-master-cdns.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e55905a3f33c5a87166ec5a1b1cb5cb0abc273ee Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Tue Jan 7 10:02:02 2025 +0100 i3c: mipi-i3c-hci: use parity8 helper instead of open coding it The kernel has now a generic helper for getting parity with easier to understand semantics. Make use of it. Here, it also fixes a bug because the correct algorithm is using XOR ('^=') instead of ADD ('+='). Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Link: https://lore.kernel.org/r/20250107090204.6593-5-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> drivers/i3c/master/mipi-i3c-hci/dat_v1.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit e89cc14e96a99c93516c97dd10211313d3a7c4ff Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Tue Jan 7 10:02:01 2025 +0100 i3c: dw: use parity8 helper instead of open coding it The kernel has now a generic helper for getting parity with easier to understand semantics. Make use of it. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20250107090204.6593-4-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> drivers/i3c/master/dw-i3c-master.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 32a8d362b51577e2b44d21410ff4eae7643b7448 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Tue Jan 7 10:02:00 2025 +0100 hwmon: (spd5118) Use generic parity calculation Make use of the new generic helper for calculating the parity. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Kuan-Wei Chiu <visitorckw@gmail.com> Link: https://lore.kernel.org/r/20250107090204.6593-3-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> drivers/hwmon/spd5118.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit c320592f3f2a1e6a4e69e5db8e76fc66934a0a78 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Tue Jan 7 10:01:59 2025 +0100 bitops: add generic parity calculation for u8 There are multiple open coded implementations for getting the parity of a byte in the kernel, even using different approaches. Take the pretty efficient version from SPD5118 driver and make it generally available by putting it into the bitops header. As long as there is just one parity calculation helper, the creation of a distinct 'parity.h' header was discarded. Also, the usage of hweight8() for architectures having a popcnt instruction is postponed until a use case within hot paths is desired. The motivation for this patch is the frequent use of odd parity in the I3C specification and to simplify drivers there. Changes compared to the original SPD5118 version are the addition of kernel documentation, switching the return type from bool to int, and renaming the argument of the function. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Yury Norov <yury.norov@gmail.com> Reviewed-by: Kuan-Wei Chiu <visitorckw@gmail.com> Tested-by: Kuan-Wei Chiu <visitorckw@gmail.com> Link: https://lore.kernel.org/r/20250107090204.6593-2-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> include/linux/bitops.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 30bb1ce71215645fa6a92f4fa8cbb8f58db68f12 Author: Jarkko Nikula <jarkko.nikula@linux.intel.com> Date: Tue Dec 31 13:59:04 2024 +0200 i3c: mipi-i3c-hci: Add support for MIPI I3C HCI on PCI bus Add a glue code for the MIPI I3C HCI on PCI bus with Intel Panther Lake I3C controller PCI IDs. MIPI I3C HCI on Intel platforms has additional logic around the MIPI I3C HCI core logic. Those together create so called I3C slice on PCI bus. Intel specific initialization code does a reset cycle to the I3C slice before probing the MIPI I3C HCI part. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Link: https://lore.kernel.org/r/20241231115904.620052-2-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> drivers/i3c/master/Kconfig | 11 ++ drivers/i3c/master/mipi-i3c-hci/Makefile | 1 + drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c | 148 +++++++++++++++++++++ 3 files changed, 160 insertions(+) commit ccdb2e0e3b00d13df90ac7a0524dd855173f1171 Author: Jarkko Nikula <jarkko.nikula@linux.intel.com> Date: Tue Dec 31 13:59:03 2024 +0200 i3c: mipi-i3c-hci: Add Intel specific quirk to ring resuming MIPI I3C HCI on Intel hardware requires a quirk where ring needs to stop and set to run again after resuming the halted controller. This is not expected from the MIPI I3C HCI specification and is Intel specific. Add this quirk to generic aborted transfer handling and execute it only when ring is not in running state after a transfer error and attempted controller resume. This is the case on Intel hardware. It is not fully clear to me what is the ring running state in generic hardware in such case. I would expect if ring is not running, then stop request is a no-op and run request is either required or does the same what controller resume would do. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Link: https://lore.kernel.org/r/20241231115904.620052-1-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> drivers/i3c/master/mipi-i3c-hci/dma.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit a0a8306c823986c43ea58be13e8b366999a93cb2 Author: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org> Date: Mon Dec 2 10:29:26 2024 +0100 m68k: coldfire: Use proper clock rate for timers The DMA and PIT timers are clocked at fsys/2. Fix it. While at it, fix the comment naming for DMA timers (duplicated tmr.2). Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org> Signed-off-by: Greg Ungerer <gerg@kernel.org> arch/m68k/coldfire/m5441x.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 0d2c022ffa7ccbd5bed5b18eefbda7ef2df4f81f Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Thu Dec 19 23:03:37 2024 +0100 i3c: fix kdoc parameter description for module_i3c_i2c_driver() A typo mentioned I3C when it should have been I2C. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20241219220338.10315-1-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> include/linux/i3c/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b75439c945b94dd8a2b645355bdb56f948052601 Author: Pei Xiao <xiaopei01@kylinos.cn> Date: Wed Nov 27 18:35:11 2024 +0800 i3c: dw: Fix use-after-free in dw_i3c_master driver due to race condition In dw_i3c_common_probe, &master->hj_work is bound with dw_i3c_hj_work. And dw_i3c_master_irq_handler can call dw_i3c_master_irq_handle_ibis function to start the work. If we remove the module which will call dw_i3c_common_remove to make cleanup, it will free master->base through i3c_master_unregister while the work mentioned above will be used. The sequence of operations that may lead to a UAF bug is as follows: CPU0 CPU1 | dw_i3c_hj_work dw_i3c_common_remove | i3c_master_unregister(&master->base) | device_unregister(&master->dev) | device_release | //free master->base | | i3c_master_do_daa(&master->base) | //use master->base Fix it by ensuring that the work is canceled before proceeding with the cleanup in dw_i3c_common_remove. Fixes: 1dd728f5d4d4 ("i3c: master: Add driver for Synopsys DesignWare IP") Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Acked-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com> Link: https://lore.kernel.org/r/bfc49c9527be5b513e7ceafeba314ca40a5be4bc.1732703537.git.xiaopei01@kylinos.cn Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> drivers/i3c/master/dw-i3c-master.c | 1 + 1 file changed, 1 insertion(+) commit 4a324970fabad503260973cd588609f3a26baab9 Author: Francis Pravin <francis.p@samsung.com> Date: Fri Jan 10 05:21:37 2025 +0530 nvme-pci: use correct size to free the hmb buffer dev->host_mem_size value is updated only after the successful buffer allocation of hmb descriptor. Otherwise, it may have some undefined value. So, use the correct size to free the hmb buffer when the hmb descriptor buffer allocation failed. Signed-off-by: Francis Pravin <francis.p@samsung.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/host/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d4a95adeabc6b5a39405e49c6d5ed14dd83682c4 Author: Keisuke Nishimura <keisuke.nishimura@inria.fr> Date: Mon Dec 16 16:27:20 2024 +0100 nvme: Add error path for xa_store in nvme_init_effects The xa_store() may fail due to memory allocation failure because there is no guarantee that the index NVME_CSI_NVM is already used. This fix introduces a new function to handle the error path. Fixes: cc115cbe12d9 ("nvme: always initialize known command effects") Signed-off-by: Keisuke Nishimura <keisuke.nishimura@inria.fr> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/host/core.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit e4a0a3058de85bc623f1ba90eec68f239d0a11b2 Author: Baruch Siach <baruch@tkos.co.il> Date: Sun Dec 8 13:34:32 2024 +0200 nvme-pci: fix comment typo envent -> event. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 255e094a300a207d1848e3268773b2dbd4c8f2ac Merge: 39388d53c57b 6f0572fa8fd6 Author: Dave Airlie <airlied@redhat.com> Date: Mon Jan 13 08:04:59 2025 +1000 Merge tag 'drm-intel-gt-next-2025-01-10' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Driver Changes: - More robust engine resets on Haswell and older (Nitin) - Dead code removal (David) - Selftest, logging and tracing improvements (Sk, Nitin, Sebastian, Apoorva) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/Z4DidoEACFu7D6iG@jlahtine-mobl.ger.corp.intel.com commit 3a48b38f48433accfc4e90409d88b9876ed74c8a Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Sun Jan 12 14:46:34 2025 +0100 fbdev: omapfb: 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 <krzysztof.kozlowski@linaro.org> Signed-off-by: Helge Deller <deller@gmx.de> drivers/video/fbdev/omap2/omapfb/dss/dispc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 65ea3b4d383649cc6682abc9fdc60eb9b3b34a34 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Sun Jan 12 14:46:33 2025 +0100 fbdev: omapfb: Use of_property_present() to test existence of DT property of_property_read_bool() should be used only on boolean properties. Cc: Rob Herring <robh@kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Helge Deller <deller@gmx.de> drivers/video/fbdev/omap2/omapfb/dss/dispc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed3f274b864b318274e05d035f5be0aed6f00477 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Sun Jan 12 16:41:42 2025 +0100 fbdev: sm501fb: Use str_enabled_disabled() helper in sm501fb_init_fb() Remove hard-coded strings by using the str_enabled_disabled() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Helge Deller <deller@gmx.de> drivers/video/fbdev/sm501fb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 74a2594a2767e890348ef4cfe64b7908d00d5353 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Sun Jan 12 11:51:28 2025 +0100 hwmon: (asus_atk0110) Use str_enabled_disabled() and str_enable_disable() helpers Remove hard-coded strings by using the str_enabled_disabled() and str_enable_disable() helper functions. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://lore.kernel.org/r/20250112105128.86653-2-thorsten.blum@linux.dev [groeck: Fixed subject and continuation line alignments] Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/asus_atk0110.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit c8571eab11131cce6dcce76b3345c1524e074071 Author: Joel Stanley <joel@jms.id.au> Date: Fri Jan 10 22:17:36 2025 +1030 hwmon: Fix help text for aspeed-g6-pwm-tach The help text has the wrong module name mentioned, and the capitalisation of the title is inconsistent. Fixes: 7e1449cd15d1 ("hwmon: (aspeed-g6-pwm-tacho): Support for ASPEED g6 PWM/Fan tach") Signed-off-by: Joel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/20250110114737.64035-1-joel@jms.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 012b8276f08a67b9f2e2fd0f35363ae4a75e5267 Author: Angelo Dureghello <adureghello@baylibre.com> Date: Wed Jan 8 18:29:16 2025 +0100 iio: dac: ad3552r-hs: clear reset status flag Clear reset status flag, to keep error status register clean after reset (ad3552r manual, rev B table 38). Reset error flag was left to 1, so debugging registers, the "Error Status Register" was dirty (0x01). It is important to clear this bit, so if there is any reset event over normal working mode, it is possible to detect it. Fixes: 0b4d9fe58be8 ("iio: dac: ad3552r: add high-speed platform driver") Signed-off-by: Angelo Dureghello <adureghello@baylibre.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250108-wip-bl-ad3552r-axi-v0-iio-testing-carlos-v2-2-2dac02f04638@baylibre.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/ad3552r-hs.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1e758b613212b6964518a67939535910b5aee831 Author: Angelo Dureghello <adureghello@baylibre.com> Date: Wed Jan 8 18:29:15 2025 +0100 iio: dac: ad3552r-common: fix ad3541/2r ranges Fix ad3541/2r voltage ranges to be as per ad3542r datasheet, rev. C, table 38 (page 57). The wrong ad354xr ranges was generating erroneous Vpp output. In more details: - fix wrong number of ranges, they are 5 ranges, not 6, - remove non-existent 0-3V range, - adjust order, since ad3552r_find_range() get a wrong index, producing a wrong Vpp as output. Retested all the ranges on real hardware, EVALAD3542RFMCZ: adi,output-range-microvolt (fdt): <(000000) (2500000)>; ok (Rfbx1, switch 10) <(000000) (5000000)>; ok (Rfbx1, switch 10) <(000000) (10000000)>; ok (Rfbx1, switch 10) <(-5000000) (5000000)>; ok (Rfbx2, switch +/- 5) <(-2500000) (7500000)>; ok (Rfbx2, switch -2.5/7.5) Fixes: 8f2b54824b28 ("drivers:iio:dac: Add AD3552R driver support") Signed-off-by: Angelo Dureghello <adureghello@baylibre.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250108-wip-bl-ad3552r-axi-v0-iio-testing-carlos-v2-1-2dac02f04638@baylibre.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/ad3552r-common.c | 5 ++--- drivers/iio/dac/ad3552r.h | 8 +++----- 2 files changed, 5 insertions(+), 8 deletions(-) commit 20eb1fae4145bc45717aa8a6d05fcd6a64ed856a Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Wed Jan 8 12:37:22 2025 +0300 iio: chemical: bme680: Fix uninitialized variable in __bme680_read_raw() The bme680_read_temp() function takes a pointer to s16 but we're passing an int pointer to it. This will not work on big endian systems and it also means that the other 16 bits are uninitialized. Pass an s16 type variable. Fixes: f51171ce2236 ("iio: chemical: bme680: Add SCALE and RAW channels") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://patch.msgid.link/4addb68c-853a-49fc-8d40-739e78db5fa1@stanley.mountain Cc: <stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/chemical/bme680_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 44cefdf1cc6d1b912eca6004012e587174e32eeb Merge: 6d699ca16548 29904a40127c Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Sun Jan 12 13:57:24 2025 +0100 Merge tag 'mhi-for-v6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Pull MHI update from Manivannan: MHI Host ======== - Free the "img_info::mhi_buf" in the error path of mhi_alloc_bhie_table() to avoid memory leak. - Add support for Qualcomm X100 5G RAN Accelerator card with relevant channel and event config. - Enable MSI-X if the endpoint supports. * tag 'mhi-for-v6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: host: pci_generic: Enable MSI-X if the endpoint supports bus: mhi: host: pci_generic: Add support for QDU100 device bus: mhi: host: Free mhi_buf vector inside mhi_alloc_bhie_table() commit aaf69eff6cdb8613ff1f6a520821f769dc92f969 Author: James Clark <james.clark@linaro.org> Date: Mon Jan 6 14:24:42 2025 +0000 coresight: Pass guest TRFCR value to KVM Currently the userspace and kernel filters for guests are never set, so no trace will be generated for them. Add support for tracing guests by passing the desired TRFCR value to KVM so it can be applied to the guest. By writing either E1TRE or E0TRE, filtering on either guest kernel or guest userspace is also supported. And if both E1TRE and E0TRE are cleared when exclude_guest is set, that option is supported too. This change also brings exclude_host support which is difficult to add as a separate commit without excess churn and resulting in no trace at all. cpu_prohibit_trace() gets moved to TRBE because the ETM driver doesn't need the read, it already has the base TRFCR value. TRBE only needs the read to disable it and then restore. Testing ======= The addresses were counted with the following: $ perf report -D | grep -Eo 'EL2|EL1|EL0' | sort | uniq -c Guest kernel only: $ perf record -e cs_etm//Gk -a -- true 535 EL1 1 EL2 Guest user only (only 5 addresses because the guest runs slowly in the model): $ perf record -e cs_etm//Gu -a -- true 5 EL0 Host kernel only: $ perf record -e cs_etm//Hk -a -- true 3501 EL2 Host userspace only: $ perf record -e cs_etm//Hu -a -- true 408 EL0 1 EL2 Signed-off-by: James Clark <james.clark@arm.com> Link: https://lore.kernel.org/r/20250106142446.628923-8-james.clark@linaro.org Signed-off-by: Marc Zyngier <maz@kernel.org> drivers/hwtracing/coresight/coresight-etm4x-core.c | 49 ++++++++++++++++++---- drivers/hwtracing/coresight/coresight-etm4x.h | 2 +- drivers/hwtracing/coresight/coresight-priv.h | 3 ++ .../coresight/coresight-self-hosted-trace.h | 9 ---- drivers/hwtracing/coresight/coresight-trbe.c | 10 +++++ 5 files changed, 56 insertions(+), 17 deletions(-) commit 054b88391bbe2e470c5484cb91622238314344fb Author: James Clark <james.clark@linaro.org> Date: Mon Jan 6 14:24:41 2025 +0000 KVM: arm64: Support trace filtering for guests For nVHE, switch the filter value in and out if the Coresight driver asks for it. This will support filters for guests when sinks other than TRBE are used. For VHE, just write the filter directly to TRFCR_EL1 where trace can be used even with TRBE sinks. Signed-off-by: James Clark <james.clark@linaro.org> Link: https://lore.kernel.org/r/20250106142446.628923-7-james.clark@linaro.org Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 2 ++ arch/arm64/kvm/debug.c | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) commit a665e3bc88081dd65642d83fc22a1abdb6a901bc Author: James Clark <james.clark@linaro.org> Date: Mon Jan 6 14:24:40 2025 +0000 KVM: arm64: coresight: Give TRBE enabled state to KVM Currently in nVHE, KVM has to check if TRBE is enabled on every guest switch even if it was never used. Because it's a debug feature and is more likely to not be used than used, give KVM the TRBE buffer status to allow a much simpler and faster do-nothing path in the hyp. Protected mode now disables trace regardless of TRBE (because trfcr_while_in_guest is always 0), which was not previously done. However, it continues to flush whenever the buffer is enabled regardless of the filter status. This avoids the hypothetical case of a host that had disabled the filter but not flushed which would arise if only doing the flush when the filter was enabled. Signed-off-by: James Clark <james.clark@linaro.org> Link: https://lore.kernel.org/r/20250106142446.628923-6-james.clark@linaro.org Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 9 ++++ arch/arm64/kvm/debug.c | 32 ++++++++++++-- arch/arm64/kvm/hyp/nvhe/debug-sr.c | 63 +++++++++++++++++----------- drivers/hwtracing/coresight/coresight-trbe.c | 3 ++ 4 files changed, 79 insertions(+), 28 deletions(-) commit a2b579c41fe9c295804abd167751f9fdc73c7006 Author: James Clark <james.clark@linaro.org> Date: Mon Jan 6 14:24:39 2025 +0000 coresight: trbe: Remove redundant disable call trbe_drain_and_disable_local() just clears TRBLIMITR and drains. TRBLIMITR is already cleared on the next line after this call, so replace it with only drain. This is so we can make a kvm call that has a preempt enabled warning from set_trbe_disabled() in the next commit, where trbe_reset_local() is called from a preemptible hotplug path. Signed-off-by: James Clark <james.clark@linaro.org> Link: https://lore.kernel.org/r/20250106142446.628923-5-james.clark@linaro.org Signed-off-by: Marc Zyngier <maz@kernel.org> drivers/hwtracing/coresight/coresight-trbe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c382ee674c8b5005798606267d660cf995218b18 Author: James Clark <james.clark@linaro.org> Date: Mon Jan 6 14:24:38 2025 +0000 arm64/sysreg/tools: Move TRFCR definitions to sysreg Convert TRFCR to automatic generation. Add separate definitions for ELx and EL2 as TRFCR_EL1 doesn't have CX. This also mirrors the previous definition so no code change is required. Also add TRFCR_EL12 which will start to be used in a later commit. Unfortunately, to avoid breaking the Perf build with duplicate definition errors, the tools copy of the sysreg.h header needs to be updated at the same time rather than the usual second commit. This is because the generated version of sysreg (arch/arm64/include/generated/asm/sysreg-defs.h), is currently shared and tools/ does not have its own copy. Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: James Clark <james.clark@arm.com> Signed-off-by: James Clark <james.clark@linaro.org> Link: https://lore.kernel.org/r/20250106142446.628923-4-james.clark@linaro.org Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/sysreg.h | 12 ------------ arch/arm64/tools/sysreg | 36 +++++++++++++++++++++++++++++++++++ tools/arch/arm64/include/asm/sysreg.h | 12 ------------ 3 files changed, 36 insertions(+), 24 deletions(-) commit 38138762faffeb923d9f49efbcc09884f1530786 Author: James Clark <james.clark@linaro.org> Date: Mon Jan 6 14:24:37 2025 +0000 tools: arm64: Update sysreg.h header files Created with the following: cp include/linux/kasan-tags.h tools/include/linux/ cp arch/arm64/include/asm/sysreg.h tools/arch/arm64/include/asm/ Update the tools copy of sysreg.h so that the next commit to add a new register doesn't have unrelated changes in it. Because the new version of sysreg.h includes kasan-tags.h, that file also now needs to be copied into tools. Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: James Clark <james.clark@arm.com> Signed-off-by: James Clark <james.clark@linaro.org> Link: https://lore.kernel.org/r/20250106142446.628923-3-james.clark@linaro.org Signed-off-by: Marc Zyngier <maz@kernel.org> tools/arch/arm64/include/asm/sysreg.h | 398 +++++++++++++++++++++++++++++++++- tools/include/linux/kasan-tags.h | 15 ++ 2 files changed, 405 insertions(+), 8 deletions(-) commit 6d699ca165480fc3f637d8c3395e768c7de3a926 Merge: b8ae08db7a31 577a66e2e634 Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Sun Jan 12 13:45:22 2025 +0100 Merge tag 'iio-for-6.14a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Pull IIO updaate from Jonathan: IIO: 1st set of new device support, features and cleanup for 6.14 Fairly quiet cycle. Usual mix of new drivers, device support in existing drivers, features and more general rework and cleanup. There are a few late breaking or long standing but complex fixes in here as well. There is one expected merge conflict due to an upstream fix touching neighboring code in ti-ads1119. The trivial resolution is the right one with the result ending up as: struct { s16 sample; aligned_s64 timestamp; } scan; New device support ================== adi,ad4000 - Add support for many Pulsar ADC devices: AD7685, AD7686, AD7687, AD7688, AD7690, AD7691, AD7693, AD7942, AD7946, AD7980, AD7982, AD7983, AD7984, AD7988-1 and AD7988-5 ADCs. Generally similar to the AD4000 series but with lower sampling rates and no configuration registers. Includes addition of timestamp channels. adi,adis16480 - Add support for ADIS16486, ADIS16487 and ADIS16489 IMUs. Required a few tweaks to existing driver and addition of tables. kionix,kx022a - Add support for KX134ACR-LBZ accelerometer that is similar to the KX132ACR-LBZ but with a wider (+-64G) sensor range. - Add support for KX134-1211 accelerometer that is similar to the KX132-1211 but with a wider (+-16G) sensor range. nxp,fxls8962af - Add support for fxls8974cf and fxls8967af accelerometers, Both are compatible with fxls8962af but with different device IDs which are used in presence checks. renesas,rzg2l - Add support for Renesas RZ/GS3 SoC ADCs (various driver refactors precede this to allow for chip differences). rohm,bd79704 - New driver for this 6 channel DAC. st,mpu6050 - Support he IAM20380 which is effectively a cut down IAM20608 IMU with only a gyroscope (no accelerometer). st,stm-timmer-trigger - Add support for ADC trigger use case for the STM32MP25 SOC. Do not support the counter functionality in this driver as that is handled by the counter subsystem. ti,opt4060 - New driver for this RGBW color sensor. Driver drop =========== rohm,bu20008 - Drop as decision was made to not mass produce this light sensor after Matti had done all the work to get a driver upstream. Features ======== adi,ad_sigma_delta library + ad7124 - Allow for GPIO to check interrupt status, enabling this device on more platforms that don't obey prior (non general) assumptions on how the interrupt chips work. - Allow variation in reset sequence length allowing chip specific optimizations rather than always using worst case. adi,ad7124 - Add temperature channel support. adi,ad7173 - Add support calibration modes for this family of ADCs. adi,adxl345 - Binding update to allow specification of which interrupt line is connected (or none). - Support interrupts and FIFO based data capture. bosch,bme680 - Add regulators support. Note this required a new binding doc rather than use of trivial-devices - Runtime PM support. microchip,pac1921 - Add ACPI support including _DSM for shunt value and label. renesas,rzg2l - Enable runtime autosuspend. - Add suspend and resume support. tyhx,hx9023s - Add loading of a firmware file used to set defaults for some configuration registers. vishay,veml6030 - Support triggered buffers allowing efficient data capture at higher speeds. - Add regmap cache to reduce access to device. Cleanup and minor fixes ======================= cross-tree - Another batch of conversions to devm_regulator_get_enable_read_voltage() helper and related conversions to full devm that this enables. - Various patches using guard() to allow early returns and simpler code flow. - Various conversions from s64 timestamp __aligned(8) to aligned_s64 type. Includes a few cleanups where this unsigned and it should have been signed. - Fix up some missing types for drive-open-drain in dt-binding docs. core - Add missing documentation for iio_dmaengine_buffer_setup_ext() - Add check that all buffers passed to iio_read_channel_ext_info() and iio_read_channel_label() are page sized and page aligned. Done this way because the callbacks are almost always only used to fill sysfs attributes. The check covers the tiny percentage of cases where use is made of this data in a consumer driver. - Mark scan_timestamp memory of struct iio_dev private ensuring no drivers change the value which belongs to the IIO core. documentation - Various missing ABI docs added. - ABI docs made to use Y consistently as the wildcard for channel number. - Combine duplicate in_currentY_raw entries in ABI docs. iio-mux - Fix alignment of buffers passed to iio_channel_read_ext_info(). adi,ad_sigma_delta library - Respect keep_cs_asserted flag in read path. - Close a race condition around irq enabling and disabling. - Use explicit unsigned int in place of unsigned. adi,ad6695 - Move dt-binding header under adc sub-directory and fix include path in dt example. adi,ad7124 - Check number of channels in DT doesn't exceed what the driver can handle. - Check input specified in DT are possible. - Improved error reporting during probe. adi,ad7173 - Drop unused structure element. adi,ad7293 - Ensure power is turned on before resetting. adi,adxl345 - Some documentation simplification and parameter renames. - Add a function than unifies handling of power up and power down. - Add defines to have a complete set of registers defined. - Add missing \n to end of error messages. amlogic,meson_saradc - Simplify handling of the REG11 register access. awinic,aw96104 - Constify iio_info structure. bosch,bmp085 - Add to dt-binding to indicate devices support SPI. bosch,bmp280 - Use sizeof() to replace a somewhat magic 2. - Rename sleep related variables so the unit is included and use fsleep() to replace usleep_range() calls. bosch,bno055 - Constify struct bin_attribute capella,cm3232 - Reset device before checking hardware ID inline with suggested flow from datasheet. diolan,dln2 - Simplify zeroing of structure used to gather up data by just clearing the whole thing before writing rather than trying to clear out he padding after write. freescale,vf610 - Use devm_ and dev_error_probe() to simplify code and allow dropping of explicit remove() callback. invensense,timestamp library - Use a cast to remove possibility of integer overflow. kionix,kx022a - Increase reset delay a little. maxim,max1363 - Use a buffer of sufficient size in iio_priv() rather than allocating variable sized buffer at use time. microchip,mcp4725 - Replace of_property_read_bool() with of_property_present() for detecting presence of regulator which is obviously not a bool. nxp,fxls8962af - Add wakeup-source property to the dt binding to allow these sensors to wake the system up from suspend. - Enable finer grained build when not all bus types need to be supported. renesas,rzg2l - Use dev_err_probe(), improving handling of probe errors and simplifying code. - Convert to devm_ based cleanup. - Remove unnecessary runtime PM complexity as clocks are managed through PM domains. - Switch pm_ptr() removing need for __maybe_unused markings. - use read_poll_timeout() to replace open coded equivalent. samsung, ssp_sensors - Simplify code by always providing timestamp whether or not it is enabled. st,lsm6dsx - Avoid need to include linux/i3c/master by using i3cdev_to_dev() to get to the contained struct device. st,stm32-timer-trigger - Check for clk_enable() fails. vishay,veml6030 - Use new gts-helper functions and fix the _scale attribute to take into account changes in gain and integration time. Various other typo fixes in variable names + documentation and help text. A few whitespace cleanup patches. * tag 'iio-for-6.14a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (142 commits) iio: iio-mux: kzalloc instead of devm_kzalloc to ensure page alignment iio: adc: ad7625: Add ending newlines to error messages iio: accel: adxl345: complete the list of defines iio: accel: adxl345: add FIFO with watermark events iio: accel: adxl345: initialize FIFO delay value for SPI iio: accel: adxl345: introduce interrupt handling iio: light: veml3235: fix scale to conform to ABI iio: gts-helper: add helpers to ease searches of gain_sel and new_gain iio: light: veml3235: extend regmap to add cache iio: light: veml3235: fix code style dt-bindings: iio: accel: adxl345: add interrupt-names dt-bindings: iio: accel: adxl345: make interrupts not a required property dt-bindings: iio: imu: bmi323: add boolean type for drive-open-drain dt-bindings: iio: imu: bmi270: add boolean type for drive-open-drain dt-bindings: iio: imu: bmi160: add boolean type for drive-open-drain iio: adc: meson: simplify MESON_SAR_ADC_REG11 register access iio: adc: meson: use tabs instead of spaces for some REG11 bit fields iio: adc: meson: fix voltage reference selection field name typo iio: adc: rockchip: correct alignment of timestamp iio: imu: inv_icm42600: switch timestamp type from int64_t __aligned(8) to aligned_s64 ... commit b8ae08db7a317c988b28c3ffc45d81af36e8ae40 Merge: 25e7eded884a 7041ed0dde83 Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Sun Jan 12 13:44:27 2025 +0100 Merge tag 'extcon-next-for-6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Pull extcon updates from Chanwoo: Update extcon next for v6.14 Detailed description for this pull request: - Fix null pointer check of memory allocation on extcon-rtk-type-c.c. - Add EXTCON subsystem documentation including the detailed description/example. - Drop unneeded init of struct i2c_device_id:driver_data on extcon-fsa9480/pth5150.c. * tag 'extcon-next-for-6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: extcon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Documentation: extcon: add documentation for Extcon subsystem extcon: realtek: fix NULL deref check in extcon_rtk_type_c_probe commit 25e7eded884a5597d64b0f5c6d99706f1147019c Merge: e966eae72762 56e14a21cee4 Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Sun Jan 12 13:41:43 2025 +0100 Merge tag 'coresight-next-v6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next Pull coresight updates from Suzuki: coresight: Updates for Linux v6.14 Coresight self-hosted tracing subsystem updates for v6.14 includes: - Support for static traceid allocation for devices - Support for impdef, static trace filtering in Qualcomm replicators - Miscellaneous fixes Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> * tag 'coresight-next-v6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux: coresight-tpda: Optimize the function of reading element size coresight: Add support for trace filtering by source coresight: Add a helper to check if a device is source dt-bindings: arm: qcom,coresight-static-replicator: Add property for source filtering coresight: Fix dsb_mode_store() unsigned val is never less than zero coresight: dummy: Add static trace id support for dummy source coresight: Add support to get static id for system trace sources dt-bindings: arm: Add arm,static-trace-id for coresight dummy source coresight: Drop atomics in connection refcounts Coresight: Narrow down the matching range of tpdm commit 3ab4a3199c782eae9b683b952f3ec5a766e4a096 Author: Takashi Iwai <tiwai@suse.de> Date: Fri Jan 10 16:59:41 2025 +0100 ALSA: seq: Notify UMP EP and FB changes So far we notify the sequencer client and port changes upon UMP FB changes, but those aren't really corresponding to the UMP updates. e.g. when a FB info gets updated, it's not notified but done only when some of sequencer port attribute is changed. This is no ideal behavior. This patch adds the two new sequencer event types for notifying the UMP EP and FB changes via the announce port. The new event takes snd_seq_ev_ump_notify type data, which is compatible with snd_seq_addr (where the port number is replaced with the block number). The events are sent when the EP and FB info gets updated explicitly via ioctl, or the backend UMP receives the corresponding UMP messages. The sequencer protocol version is bumped to 1.0.5 along with it. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250110155943.31578-9-tiwai@suse.de Documentation/sound/designs/midi-2.0.rst | 7 ++++++ include/sound/ump.h | 1 + include/uapi/sound/asequencer.h | 12 +++++++++- sound/core/seq/seq_clientmgr.c | 10 ++++++++ sound/core/seq/seq_system.h | 10 ++++++++ sound/core/seq/seq_ump_client.c | 40 ++++++++++++++++++++++++++++++-- sound/core/ump.c | 23 +++++++++++++++--- 7 files changed, 97 insertions(+), 6 deletions(-) commit 10a29de13bbc7ca92ae85184cf2f966c4ce3b69b Author: Takashi Iwai <tiwai@suse.de> Date: Fri Jan 10 16:59:40 2025 +0100 ALSA: seq: Allow system notification in atomic Currently the system notification helper assumes only the non-atomic delivery. For allowing an event delivery in non-atomic context, add the atomic flag to the helper function. This is a preliminary change for the support of UMP EP/FB notification. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250110155943.31578-8-tiwai@suse.de sound/core/seq/seq_clientmgr.c | 2 +- sound/core/seq/seq_system.c | 9 +++++---- sound/core/seq/seq_system.h | 21 +++++++++++++-------- 3 files changed, 19 insertions(+), 13 deletions(-) commit aca565359596c5998cab1cc72f61aa83b3ccd152 Author: Takashi Iwai <tiwai@suse.de> Date: Fri Jan 10 16:59:39 2025 +0100 ALSA: ump: Update rawmidi name per EP name update The rawmidi name string should be updated dynamically when the device receives the UMP EP name update, too. Both the core and legacy rawmidi names are updated. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250110155943.31578-7-tiwai@suse.de sound/core/ump.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) commit 85e8d66f30f967cda91b3ee6dfcb0a0c2391e612 Author: Takashi Iwai <tiwai@suse.de> Date: Fri Jan 10 16:59:38 2025 +0100 ALSA: ump: Copy safe string name to rawmidi The UMP helper didn't set up the rawmidi name string by itself but left it to the driver. But since the only user (USB MIDI2 driver) picks up the UMP info name string to the rawmidi name as default, it's better to set up in the UMP core side. Meanwhile, UMP receives the EP name string from the device, and it might contain garbage letters. We should purify the string to be usable for the kernel as done previously for UMP Group names. This implements the copy of the UMP info name string into the rawmidi name at the creation of UMP EP object in a safe way to strip the non-ASCII or non-printable characters. Also, change the reference from the legacy rawmidi and other places to rawmidi name field instead of ump info; this assures the sane strings. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250110155943.31578-6-tiwai@suse.de sound/core/ump.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit e3f035edadcc1c5901311c03d098bc3dedc5c525 Author: Takashi Iwai <tiwai@suse.de> Date: Fri Jan 10 16:59:37 2025 +0100 ALSA: ump: Copy FB name string more safely The UMP group names are referred as the corresponding sequencer port names, hence they should be proper ASCII strings. OTOH, the UMP group names are composed from the UMP FB strings that are received from the device; i.e. a device may give some bogus letters and we can't trust them fully. To assure that the group names consist of the proper ASCII strings, replace the normal string copy and append operations with special ones that strip the non-printable letters. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250110155943.31578-5-tiwai@suse.de sound/core/ump.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) commit 7bb49d2e8b52adace88249d9dece41e36af3bba0 Author: Takashi Iwai <tiwai@suse.de> Date: Fri Jan 10 16:59:36 2025 +0100 ALSA: rawmidi: Bump protocol version to 2.0.5 Bump the protocol version to 2.0.5, as we extended the rawmidi ABI for the new tied_device info and the substream inactive flag. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250110155943.31578-4-tiwai@suse.de include/uapi/sound/asound.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8fefed73a952a33521ad416fb39683abd87454b Author: Takashi Iwai <tiwai@suse.de> Date: Fri Jan 10 16:59:35 2025 +0100 ALSA: rawmidi: Show substream activity in info ioctl The UMP legacy rawmidi may turn on/off the substream dynamically depending on the UMP Function Block information. So far, there was no direct way to know whether the substream is disabled (inactive) or not; at most one can take a look at the substream name string or try to open and get -ENODEV. This patch extends the rawmidi info ioctl to show the current inactive state of the given substream. When the selected substream is inactive, info flags field contains the new bit flag SNDRV_RAWMIDI_INFO_STREAM_INACTIVE. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250110155943.31578-3-tiwai@suse.de Documentation/sound/designs/midi-2.0.rst | 6 ++++++ include/sound/rawmidi.h | 1 + include/uapi/sound/asound.h | 1 + sound/core/rawmidi.c | 2 ++ sound/core/ump.c | 9 +++++---- 5 files changed, 15 insertions(+), 4 deletions(-) commit bdf46443f350dd5d226fd528a5a5954ff762f591 Author: Takashi Iwai <tiwai@suse.de> Date: Fri Jan 10 16:59:34 2025 +0100 ALSA: rawmidi: Expose the tied device number in info ioctl The UMP legacy rawmidi is derived from the UMP rawmidi, but currently there is no way to know which device is involved in other side. This patch extends the rawmidi info ioctl to show the tied device number. As default it stores -1, indicating that no tied device. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250110155943.31578-2-tiwai@suse.de Documentation/sound/designs/midi-2.0.rst | 5 +++++ include/sound/rawmidi.h | 1 + include/uapi/sound/asound.h | 5 ++++- sound/core/rawmidi.c | 2 ++ sound/core/ump.c | 3 +++ 5 files changed, 15 insertions(+), 1 deletion(-) commit 6f91d31d47c57953da68e1a91240ae2543b00172 Author: Quentin Perret <qperret@google.com> Date: Fri Jan 10 12:19:36 2025 +0000 KVM: arm64: Drop pkvm_mem_transition for host/hyp donations Simplify the __pkvm_host_donate_hyp() and pkvm_hyp_donate_host() paths by not using the pkvm_mem_transition machinery. As the last users of this, also remove all the now unused code. No functional changes intended. Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20250110121936.1559655-4-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/nvhe/mem_protect.c | 285 ++++------------------------------ 1 file changed, 32 insertions(+), 253 deletions(-) commit 7cbf7c37718e67f2c994d4ed4ca7128fe06a4f60 Author: Quentin Perret <qperret@google.com> Date: Fri Jan 10 12:19:35 2025 +0000 KVM: arm64: Drop pkvm_mem_transition for host/hyp sharing Simplify the __pkvm_host_{un}share_hyp() paths by not using the pkvm_mem_transition machinery. As there are the last users of the do_share()/do_unshare(), remove all the now-unused code as well. No functional changes intended. Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20250110121936.1559655-3-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/nvhe/mem_protect.c | 319 ++++------------------------------ 1 file changed, 34 insertions(+), 285 deletions(-) commit 7a0688832f580e5f4eda2dd92b4806fb4348f9c6 Author: Quentin Perret <qperret@google.com> Date: Fri Jan 10 12:19:34 2025 +0000 KVM: arm64: Drop pkvm_mem_transition for FF-A Simplify the __pkvm_host_{un}share_ffa() paths by using {check,set}_page_state_range(). No functional changes intended. Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20250110121936.1559655-2-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/nvhe/mem_protect.c | 36 ++++++++++------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) commit 60f20d82c1f9258ab295cee6c3ac37f0b01fc578 Merge: fce886a60207 e96d8b80afd3 Author: Marc Zyngier <maz@kernel.org> Date: Sun Jan 12 10:46:17 2025 +0000 Merge branch 'kvmarm-fixes-6.13-3' commit e880b16efb78f9c7449239a76814aeb015daf2a1 Merge: d0670128d42f 4e26de25d2b6 Author: Marc Zyngier <maz@kernel.org> Date: Sun Jan 12 10:40:10 2025 +0000 Merge branch kvm-arm64/pkvm-fixed-features-6.14 into kvmarm-master/next * kvm-arm64/pkvm-fixed-features-6.14: (24 commits) : . : Complete rework of the pKVM handling of features, catching up : with the rest of the code deals with it these days. : Patches courtesy of Fuad Tabba. From the cover letter: : : "This patch series uses the vm's feature id registers to track the : supported features, a framework similar to nested virt to set the : trap values, and removes the need to store cptr_el2 per vcpu in : favor of setting its value when traps are activated, as VHE mode : does." : : This branch drags the arm64/for-next/cpufeature branch to solve : ugly conflicts in -next. : . KVM: arm64: Fix FEAT_MTE in pKVM KVM: arm64: Use kvm_vcpu_has_feature() directly for struct kvm KVM: arm64: Convert the SVE guest vcpu flag to a vm flag KVM: arm64: Remove PtrAuth guest vcpu flag KVM: arm64: Fix the value of the CPTR_EL2 RES1 bitmask for nVHE KVM: arm64: Refactor kvm_reset_cptr_el2() KVM: arm64: Calculate cptr_el2 traps on activating traps KVM: arm64: Remove redundant setting of HCR_EL2 trap bit KVM: arm64: Remove fixed_config.h header KVM: arm64: Rework specifying restricted features for protected VMs KVM: arm64: Set protected VM traps based on its view of feature registers KVM: arm64: Fix RAS trapping in pKVM for protected VMs KVM: arm64: Initialize feature id registers for protected VMs KVM: arm64: Use KVM extension checks for allowed protected VM capabilities KVM: arm64: Remove KVM_ARM_VCPU_POWER_OFF from protected VMs allowed features in pKVM KVM: arm64: Move checking protected vcpu features to a separate function KVM: arm64: Group setting traps for protected VMs by control register KVM: arm64: Consolidate allowed and restricted VM feature checks arm64/sysreg: Get rid of CPACR_ELx SysregFields arm64/sysreg: Convert *_EL12 accessors to Mapping ... Signed-off-by: Marc Zyngier <maz@kernel.org> # Conflicts: # arch/arm64/kvm/fpsimd.c # arch/arm64/kvm/hyp/nvhe/pkvm.c commit d0670128d42fa170bf8ba878cd23504c5c5cccc7 Merge: b7bf7c87bb44 fce886a60207 Author: Marc Zyngier <maz@kernel.org> Date: Sun Jan 12 10:37:15 2025 +0000 Merge branch kvm-arm64/pkvm-np-guest into kvmarm-master/next * kvm-arm64/pkvm-np-guest: : . : pKVM support for non-protected guests using the standard MM : infrastructure, courtesy of Quentin Perret. From the cover letter: : : "This series moves the stage-2 page-table management of non-protected : guests to EL2 when pKVM is enabled. This is only intended as an : incremental step towards a 'feature-complete' pKVM, there is however a : lot more that needs to come on top. : : With that series applied, pKVM provides near-parity with standard KVM : from a functional perspective all while Linux no longer touches the : stage-2 page-tables itself at EL1. The majority of mm-related KVM : features work out of the box, including MMU notifiers, dirty logging, : RO memslots and things of that nature. There are however two gotchas: : : - We don't support mapping devices into guests: this requires : additional hypervisor support for tracking the 'state' of devices, : which will come in a later series. No device assignment until then. : : - Stage-2 mappings are forced to page-granularity even when backed by a : huge page for the sake of simplicity of this series. I'm only aiming : at functional parity-ish (from userspace's PoV) for now, support for : HP can be added on top later as a perf improvement." : . KVM: arm64: Plumb the pKVM MMU in KVM KVM: arm64: Introduce the EL1 pKVM MMU KVM: arm64: Introduce __pkvm_tlb_flush_vmid() KVM: arm64: Introduce __pkvm_host_mkyoung_guest() KVM: arm64: Introduce __pkvm_host_test_clear_young_guest() KVM: arm64: Introduce __pkvm_host_wrprotect_guest() KVM: arm64: Introduce __pkvm_host_relax_guest_perms() KVM: arm64: Introduce __pkvm_host_unshare_guest() KVM: arm64: Introduce __pkvm_host_share_guest() KVM: arm64: Introduce __pkvm_vcpu_{load,put}() KVM: arm64: Add {get,put}_pkvm_hyp_vm() helpers KVM: arm64: Make kvm_pgtable_stage2_init() a static inline function KVM: arm64: Pass walk flags to kvm_pgtable_stage2_relax_perms KVM: arm64: Pass walk flags to kvm_pgtable_stage2_mkyoung KVM: arm64: Move host page ownership tracking to the hyp vmemmap KVM: arm64: Make hyp_page::order a u8 KVM: arm64: Move enum pkvm_page_state to memory.h KVM: arm64: Change the layout of enum pkvm_page_state Signed-off-by: Marc Zyngier <maz@kernel.org> # Conflicts: # arch/arm64/kvm/arm.c commit b7bf7c87bb445d3d3e92e1f826e73c8bb1b52301 Merge: 78d4f34e2115 c4a6ed854559 Author: Marc Zyngier <maz@kernel.org> Date: Sun Jan 12 10:36:00 2025 +0000 Merge branch kvm-arm64/debug-6.14 into kvmarm-master/next * kvm-arm64/debug-6.14: : . : Large rework of the debug code to make it a bit less horrid, : courtesy of Oliver Upton. From the original cover letter: : : "The debug code has become a bit difficult to reason about, especially : all the hacks and bandaids for state tracking + trap configuration. : : This series reworks the entire mess around using a single enumeration to : track the state of the debug registers (free, guest-owned, host-owned), : using that to drive trap configuration and save/restore. : : On top of that, this series wires most of the implementation into vCPU : load/put rather than the main KVM_RUN loop. This has been a long time : coming for VHE, as a lot of the trap configuration and EL1 state gets : loaded into hardware at that point anyway. : : The save/restore of the debug registers is simplified quite a bit as : well. KVM will now restore the registers for *any* access rather than : just writes, and keep doing so until the next vcpu_put() instead of : dropping it on the floor after the next exception." : . KVM: arm64: Promote guest ownership for DBGxVR/DBGxCR reads KVM: arm64: Fold DBGxVR/DBGxCR accessors into common set KVM: arm64: Avoid reading ID_AA64DFR0_EL1 for debug save/restore KVM: arm64: nv: Honor MDCR_EL2.TDE routing for debug exceptions KVM: arm64: Manage software step state at load/put KVM: arm64: Don't hijack guest context MDSCR_EL1 KVM: arm64: Compute MDCR_EL2 at vcpu_load() KVM: arm64: Reload vCPU for accesses to OSLAR_EL1 KVM: arm64: Use debug_owner to track if debug regs need save/restore KVM: arm64: Remove vestiges of debug_ptr KVM: arm64: Remove debug tracepoints KVM: arm64: Select debug state to save/restore based on debug owner KVM: arm64: Clean up KVM_SET_GUEST_DEBUG handler KVM: arm64: Evaluate debug owner at vcpu_load() KVM: arm64: Write MDCR_EL2 directly from kvm_arm_setup_mdcr_el2() KVM: arm64: Move host SME/SVE tracking flags to host data KVM: arm64: Track presence of SPE/TRBE in kvm_host_data instead of vCPU KVM: arm64: Get rid of __kvm_get_mdcr_el2() and related warts KVM: arm64: Drop MDSCR_EL1_DEBUG_MASK Signed-off-by: Marc Zyngier <maz@kernel.org> commit 6ca00ec47b70acb7a06cf5c79f6bec6074cef008 Author: Akiva Goldberger <agoldberger@nvidia.com> Date: Thu Jan 9 22:42:31 2025 +0200 net/mlx5: Add nic_cap_reg and vhca_icm_ctrl registers Add nic_cap_reg and vhca_icm_ctrl registers interfaces for exposing ICM consumption. Signed-off-by: Akiva Goldberger <agoldberger@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250109204231.1809851-5-tariqt@nvidia.com Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> include/linux/mlx5/driver.h | 2 ++ include/linux/mlx5/mlx5_ifc.h | 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) commit df75ad562a6f9ae6add42d56e228aa973b421421 Author: Saeed Mahameed <saeedm@nvidia.com> Date: Thu Jan 9 22:42:30 2025 +0200 net/mlx5: SHAMPO: Introduce new SHAMPO specific HCA caps Read and cache SHAMPO specific caps for header data split capabilities. Will be used in downstream patch. Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250109204231.1809851-4-tariqt@nvidia.com Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/fw.c | 6 ++++++ drivers/net/ethernet/mellanox/mlx5/core/main.c | 5 +++++ include/linux/mlx5/device.h | 4 ++++ include/linux/mlx5/mlx5_ifc.h | 20 +++++++++++++++++++- 4 files changed, 34 insertions(+), 1 deletion(-) commit e2685ef5f56295249bf98bc6603d3c092fe0ce56 Author: Jianbo Liu <jianbol@nvidia.com> Date: Thu Jan 9 22:42:29 2025 +0200 net/mlx5: Add support for MRTCQ register Management Real Time Clock Query (MRTCQ) register is used to query hardware clock identity. Signed-off-by: Jianbo Liu <jianbol@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250109204231.1809851-3-tariqt@nvidia.com Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> include/linux/mlx5/driver.h | 1 + include/linux/mlx5/mlx5_ifc.h | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) commit 387bef82d0b4afd4c7430b52c4971649a5cf3b06 Author: Jianbo Liu <jianbol@nvidia.com> Date: Thu Jan 9 22:42:28 2025 +0200 net/mlx5: Update mlx5_ifc to support FEC for 200G per lane link modes Add FEC admin and override related fields in PPLM, and the bit in PCAM to indicate those fields are supported. Signed-off-by: Jianbo Liu <jianbol@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250109204231.1809851-2-tariqt@nvidia.com Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> include/linux/mlx5/mlx5_ifc.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 4b6652bc6d8d5fb0648b3a7a16ef8af4e0345bcd Author: Bitterblue Smith <rtl8821cerfe2@gmail.com> Date: Wed Jan 8 13:41:23 2025 +0200 wifi: rtw88: Add support for LED blinking Register a struct led_classdev with the kernel's LED subsystem and create a throughput-based trigger for it. Then mac80211 makes the LED blink. Tested with Tenda U12 (RTL8812AU), Tenda U9 (RTL8811CU), TP-Link Archer T2U Nano (RTL8811AU), TP-Link Archer T3U Plus (RTL8812BU), Edimax EW-7611UCB (RTL8821AU), LM842 (RTL8822CU). Also tested with devices which don't have LEDs: the laptop's internal RTL8822CE and a no-name RTL8723DU. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/6c43451f-ab2f-4e76-ac6e-ff5a18dd981d@gmail.com drivers/net/wireless/realtek/rtw88/Makefile | 2 + drivers/net/wireless/realtek/rtw88/led.c | 73 +++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw88/led.h | 25 +++++++++ drivers/net/wireless/realtek/rtw88/main.c | 12 ++++- drivers/net/wireless/realtek/rtw88/main.h | 5 ++ drivers/net/wireless/realtek/rtw88/reg.h | 12 +++++ drivers/net/wireless/realtek/rtw88/rtw8812a.c | 17 +++++++ drivers/net/wireless/realtek/rtw88/rtw8821a.c | 26 ++++++++++ drivers/net/wireless/realtek/rtw88/rtw8821c.c | 19 +++++++ drivers/net/wireless/realtek/rtw88/rtw8822b.c | 19 +++++++ drivers/net/wireless/realtek/rtw88/rtw8822c.c | 19 +++++++ 11 files changed, 227 insertions(+), 2 deletions(-) commit fb2fcfbe5eef9ae26b0425978435ae1308951e51 Author: Fiona Klute <fiona.klute@gmx.de> Date: Mon Jan 6 15:54:34 2025 +0200 wifi: rtw88: sdio: Fix disconnection after beacon loss This is the equivalent of commit 28818b4d871b ("wifi: rtw88: usb: Fix disconnection after beacon loss") for SDIO chips. Tested on Pinephone (RTL8723CS), random disconnections became rare, instead of a frequent nuisance. Cc: stable@vger.kernel.org Signed-off-by: Fiona Klute <fiona.klute@gmx.de> Tested-by: Vasily Khoruzhick <anarsoul@gmail.com> # Tested on Pinebook Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250106135434.35936-1-fiona.klute@gmx.de drivers/net/wireless/realtek/rtw88/sdio.c | 2 ++ 1 file changed, 2 insertions(+) commit a806a8160a0fcaff368bb510c8a52eff37faf727 Author: Vasily Khoruzhick <anarsoul@gmail.com> Date: Thu Jan 2 23:50:53 2025 -0800 wifi: rtw88: 8703b: Fix RX/TX issues Fix 3 typos in 8703b driver. 2 typos in calibration routines are not fatal and do not seem to have any impact, just fix them to match vendor driver. However the last one in rtw8703b_set_channel_bb() clears too many bits in REG_OFDM0_TX_PSD_NOISE, causing TX and RX issues (neither rate goes above MCS0-MCS1). Vendor driver clears only 2 most significant bits. With the last typo fixed, the driver is able to reach MCS7 on Pinebook Cc: stable@vger.kernel.org Fixes: 9bb762b3a957 ("wifi: rtw88: Add definitions for 8703b chip") Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Tested-by: Fiona Klute <fiona.klute@gmx.de> Tested-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250103075107.1337533-1-anarsoul@gmail.com drivers/net/wireless/realtek/rtw88/rtw8703b.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5ad483955acc85dc91b88c7b76dc1429e8ba33bc Author: Bitterblue Smith <rtl8821cerfe2@gmail.com> Date: Wed Jan 1 18:27:35 2025 +0200 wifi: rtw88: Delete rf_type member of struct rtw_sta_info It's not used for anything. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/b80f7904-c6b4-4d12-a5f9-69ab9b965732@gmail.com drivers/net/wireless/realtek/rtw88/main.c | 9 ++------- drivers/net/wireless/realtek/rtw88/main.h | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) commit 5b1b9545262b5126a3c2776e7e64ff29765cbe6e Author: Bitterblue Smith <rtl8821cerfe2@gmail.com> Date: Wed Jan 1 18:16:32 2025 +0200 wifi: rtw88: Add USB PHY configuration Add some extra configuration for USB devices. Currently only RTL8822BU version (cut) D needs this. The new code makes use of the existing usb3_param_8822b array from rtw8822b.c. A user reported that TP-Link Archer T3U in USB 3 mode was randomly disconnecting from USB: [ 26.036502] usb 2-2: new SuperSpeed USB device number 3 using xhci_hcd ... [ 27.576491] usb 2-2: USB disconnect, device number 3 [ 28.621528] usb 2-2: new SuperSpeed USB device number 4 using xhci_hcd ... [ 45.984521] usb 2-2: USB disconnect, device number 4 ... [ 46.845585] usb 2-2: new SuperSpeed USB device number 5 using xhci_hcd ... [ 94.400380] usb 2-2: USB disconnect, device number 5 ... [ 95.590421] usb 2-2: new SuperSpeed USB device number 6 using xhci_hcd This patch fixes that. Link: https://github.com/lwfinger/rtw88/issues/262 Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/9d312b14-0146-4be8-9c50-ef432234db50@gmail.com drivers/net/wireless/realtek/rtw88/reg.h | 10 +++++ drivers/net/wireless/realtek/rtw88/usb.c | 68 ++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) commit 456ad3210a88745acb00a3222dc6533531a372b6 Author: Ping-Ke Shih <pkshih@realtek.com> Date: Wed Jan 8 10:09:55 2025 +0800 wifi: rtw89: 8922ae: add variant info to support RTL8922AE-VS RTL8922AE-VS is a variant of RTL8922AE, which is supported by firmware version after 0.35.54.0 and only can support up to MCS11. Add a variant struct to describe these requirements accordingly. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250108020955.14668-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/Kconfig | 6 ++++-- drivers/net/wireless/realtek/rtw89/core.c | 18 +++++++++++++----- drivers/net/wireless/realtek/rtw89/core.h | 12 +++++++++++- drivers/net/wireless/realtek/rtw89/fw.c | 25 +++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/mac.c | 9 ++++++++- drivers/net/wireless/realtek/rtw89/pci.c | 2 +- drivers/net/wireless/realtek/rtw89/phy.c | 10 +++++++++- drivers/net/wireless/realtek/rtw89/phy.h | 4 ++++ drivers/net/wireless/realtek/rtw89/rtw8851be.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852ae.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852be.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852bte.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852ce.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8922a.c | 6 ++++++ drivers/net/wireless/realtek/rtw89/rtw8922a.h | 1 + drivers/net/wireless/realtek/rtw89/rtw8922ae.c | 16 +++++++++++++++- 16 files changed, 102 insertions(+), 12 deletions(-) commit 3f0e6890890a5f4316c5ed39c74ee678fc6114f5 Author: Ping-Ke Shih <pkshih@realtek.com> Date: Wed Jan 8 10:09:54 2025 +0800 wifi: rtw89: read hardware capabilities part 1 via firmware command Firmware after version 0.35.51.0 defines and exports more hardware capabilities, which driver will consider reported QAM field as EHT MCS capability to register hardware. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250108020955.14668-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 1 + drivers/net/wireless/realtek/rtw89/fw.c | 1 + drivers/net/wireless/realtek/rtw89/fw.h | 16 ++++++ drivers/net/wireless/realtek/rtw89/mac.c | 87 +++++++++++++++++++++++++++---- 4 files changed, 95 insertions(+), 10 deletions(-) commit ba4bb0402c60e945c4c396c51f0acac3c3e3ea5c Author: Ping-Ke Shih <pkshih@realtek.com> Date: Tue Jan 7 19:42:54 2025 +0800 wifi: rtw89: fix race between cancel_hw_scan and hw_scan completion The rtwdev->scanning flag isn't protected by mutex originally, so cancel_hw_scan can pass the condition, but suddenly hw_scan completion unset the flag and calls ieee80211_scan_completed() that will free local->hw_scan_req. Then, cancel_hw_scan raises null-ptr-deref and use-after-free. Fix it by moving the check condition to where protected by mutex. KASAN: null-ptr-deref in range [0x0000000000000088-0x000000000000008f] CPU: 2 PID: 6922 Comm: kworker/2:2 Tainted: G OE Hardware name: LENOVO 2356AD1/2356AD1, BIOS G7ETB6WW (2.76 ) 09/10/2019 Workqueue: events cfg80211_conn_work [cfg80211] RIP: 0010:rtw89_fw_h2c_scan_offload_be+0xc33/0x13c3 [rtw89_core] Code: 00 45 89 6c 24 1c 0f 85 23 01 00 00 48 8b 85 20 ff ff ff 48 8d RSP: 0018:ffff88811fd9f068 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: ffff88811fd9f258 RCX: 0000000000000001 RDX: 0000000000000011 RSI: 0000000000000001 RDI: 0000000000000089 RBP: ffff88811fd9f170 R08: 0000000000000000 R09: 0000000000000000 R10: ffff88811fd9f108 R11: 0000000000000000 R12: ffff88810e47f960 R13: 0000000000000000 R14: 000000000000ffff R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8881d6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007531dfca55b0 CR3: 00000001be296004 CR4: 00000000001706e0 Call Trace: <TASK> ? show_regs+0x61/0x73 ? __die_body+0x20/0x73 ? die_addr+0x4f/0x7b ? exc_general_protection+0x191/0x1db ? asm_exc_general_protection+0x27/0x30 ? rtw89_fw_h2c_scan_offload_be+0xc33/0x13c3 [rtw89_core] ? rtw89_fw_h2c_scan_offload_be+0x458/0x13c3 [rtw89_core] ? __pfx_rtw89_fw_h2c_scan_offload_be+0x10/0x10 [rtw89_core] ? do_raw_spin_lock+0x75/0xdb ? __pfx_do_raw_spin_lock+0x10/0x10 rtw89_hw_scan_offload+0xb5e/0xbf7 [rtw89_core] ? _raw_spin_unlock+0xe/0x24 ? __mutex_lock.constprop.0+0x40c/0x471 ? __pfx_rtw89_hw_scan_offload+0x10/0x10 [rtw89_core] ? __mutex_lock_slowpath+0x13/0x1f ? mutex_lock+0xa2/0xdc ? __pfx_mutex_lock+0x10/0x10 rtw89_hw_scan_abort+0x58/0xb7 [rtw89_core] rtw89_ops_cancel_hw_scan+0x120/0x13b [rtw89_core] ieee80211_scan_cancel+0x468/0x4d0 [mac80211] ieee80211_prep_connection+0x858/0x899 [mac80211] ieee80211_mgd_auth+0xbea/0xdde [mac80211] ? __pfx_ieee80211_mgd_auth+0x10/0x10 [mac80211] ? cfg80211_find_elem+0x15/0x29 [cfg80211] ? is_bss+0x1b7/0x1d7 [cfg80211] ieee80211_auth+0x18/0x27 [mac80211] cfg80211_mlme_auth+0x3bb/0x3e7 [cfg80211] cfg80211_conn_do_work+0x410/0xb81 [cfg80211] ? __pfx_cfg80211_conn_do_work+0x10/0x10 [cfg80211] ? __kasan_check_read+0x11/0x1f ? psi_group_change+0x8bc/0x944 ? __kasan_check_write+0x14/0x22 ? mutex_lock+0x8e/0xdc ? __pfx_mutex_lock+0x10/0x10 ? __pfx___radix_tree_lookup+0x10/0x10 cfg80211_conn_work+0x245/0x34d [cfg80211] ? __pfx_cfg80211_conn_work+0x10/0x10 [cfg80211] ? update_cfs_rq_load_avg+0x3bc/0x3d7 ? sched_clock_noinstr+0x9/0x1a ? sched_clock+0x10/0x24 ? sched_clock_cpu+0x7e/0x42e ? newidle_balance+0x796/0x937 ? __pfx_sched_clock_cpu+0x10/0x10 ? __pfx_newidle_balance+0x10/0x10 ? __kasan_check_read+0x11/0x1f ? psi_group_change+0x8bc/0x944 ? _raw_spin_unlock+0xe/0x24 ? raw_spin_rq_unlock+0x47/0x54 ? raw_spin_rq_unlock_irq+0x9/0x1f ? finish_task_switch.isra.0+0x347/0x586 ? __schedule+0x27bf/0x2892 ? mutex_unlock+0x80/0xd0 ? do_raw_spin_lock+0x75/0xdb ? __pfx___schedule+0x10/0x10 process_scheduled_works+0x58c/0x821 worker_thread+0x4c7/0x586 ? __kasan_check_read+0x11/0x1f kthread+0x285/0x294 ? __pfx_worker_thread+0x10/0x10 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x29/0x6f ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1b/0x30 </TASK> Fixes: 895907779752 ("rtw89: 8852a: add ieee80211_ops::hw_scan") Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250107114254.6769-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/mac80211.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 35642ba31dc4a1816a20191e90156a9e329beb10 Author: Zong-Zhe Yang <kevin_yang@realtek.com> Date: Fri Jan 3 15:44:12 2025 +0800 wifi: rtw89: mcc: consider time limits not divisible by 1024 For each MCC role, time limits, including max_tob_us, max_toa_us, and mac_dur_us, are calculated if there are NoA attributes. The relation between these time limits is "max_dur_us = max_tob_us + max_toa_us". Then, the unit is converted from us to TU. However, originally, each time limit was divided by 1024 independently. It missed to consider the cases that max_tob_us or max_toa_us is not divisible by 1024. It causes the result breaks "max_dur (TU) = max_tob (TU) + max_toa (TU)". Finally, when MCC calculates pattern parameters based on these kinds of time limits, it might not perform well. Fixes: b09df09b55fb ("wifi: rtw89: mcc: initialize start flow") Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250103074412.124066-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/chan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ab452d458fd060644ce62c604baa2fe444a6822 Author: Ping-Ke Shih <pkshih@realtek.com> Date: Fri Jan 3 10:51:26 2025 +0800 wifi: rtw89: pci: treat first receiving part as first segment for 8922AE For early chips, the RX BD info contains FS/LS bits for first/last segments of a receiving packet. For 8922AE, the FS bit should be ignored, or it may throw warning: rtw89_8922ae 0000:1a:00.0: skb should not be ready before first segment start To have compatible logic, FS determined by what pending skb is existing (!new) or not. Since we expect every single receiving packet in single one segment, enlarge 4 bytes for RX BD info, and add a debug message to note if RX buffer is possibly smaller than expected size. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250103025126.15378-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/pci.c | 12 +++++++++--- drivers/net/wireless/realtek/rtw89/pci.h | 4 +++- drivers/net/wireless/realtek/rtw89/rtw8851be.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852ae.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852be.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852bte.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852ce.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8922ae.c | 1 + 8 files changed, 18 insertions(+), 4 deletions(-) commit 2f7667675df1b40b73ecc53b4b8c3189b1e5f2c1 Author: Chih-Kang Chang <gary.chang@realtek.com> Date: Fri Jan 3 10:45:00 2025 +0800 wifi: rtw89: avoid to init mgnt_entry list twice when WoWLAN failed If WoWLAN failed in resume flow, the rtw89_ops_add_interface() triggered without removing the interface first. Then the mgnt_entry list init again, causing the list_empty() check in rtw89_chanctx_ops_assign_vif() useless, and list_add_tail() again. Therefore, we have added a check to prevent double adding of the list. rtw89_8852ce 0000:01:00.0: failed to check wow status disabled rtw89_8852ce 0000:01:00.0: wow: failed to check disable fw ready rtw89_8852ce 0000:01:00.0: wow: failed to swap to normal fw rtw89_8852ce 0000:01:00.0: failed to disable wow rtw89_8852ce 0000:01:00.0: failed to resume for wow -110 rtw89_8852ce 0000:01:00.0: MAC has already powered on i2c_hid_acpi i2c-ILTK0001:00: PM: acpi_subsys_resume+0x0/0x60 returned 0 after 284705 usecs list_add corruption. prev->next should be next (ffff9d9719d82228), but was ffff9d9719f96030. (prev=ffff9d9719f96030). ------------[ cut here ]------------ kernel BUG at lib/list_debug.c:34! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI CPU: 2 PID: 6918 Comm: kworker/u8:19 Tainted: G U O Hardware name: Google Anraggar/Anraggar, BIOS Google_Anraggar.15217.514.0 03/25/2024 Workqueue: events_unbound async_run_entry_fn RIP: 0010:__list_add_valid_or_report+0x9f/0xb0 Code: e8 56 89 ff ff 0f 0b 48 c7 c7 3e fc e0 96 48 89 c6 e8 45 89 ff ... RSP: 0018:ffffa51b42bbbaf0 EFLAGS: 00010246 RAX: 0000000000000075 RBX: ffff9d9719d82ab0 RCX: 13acb86e047a4400 RDX: 3fffffffffffffff RSI: 0000000000000000 RDI: 00000000ffffdfff RBP: ffffa51b42bbbb28 R08: ffffffff9768e250 R09: 0000000000001fff R10: ffffffff9765e250 R11: 0000000000005ffd R12: ffff9d9719f95c40 R13: ffff9d9719f95be8 R14: ffff9d97081bfd78 R15: ffff9d9719d82060 FS: 0000000000000000(0000) GS:ffff9d9a6fb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007e7d029a4060 CR3: 0000000345e38000 CR4: 0000000000750ee0 PKRU: 55555554 Call Trace: <TASK> ? __die_body+0x68/0xb0 ? die+0xaa/0xd0 ? do_trap+0x9f/0x170 ? __list_add_valid_or_report+0x9f/0xb0 ? __list_add_valid_or_report+0x9f/0xb0 ? handle_invalid_op+0x69/0x90 ? __list_add_valid_or_report+0x9f/0xb0 ? exc_invalid_op+0x3c/0x50 ? asm_exc_invalid_op+0x16/0x20 ? __list_add_valid_or_report+0x9f/0xb0 rtw89_chanctx_ops_assign_vif+0x1f9/0x210 [rtw89_core cbb375c44bf28564ce479002bff66617a25d9ac1] ? __mutex_unlock_slowpath+0xa0/0xf0 rtw89_ops_assign_vif_chanctx+0x4b/0x90 [rtw89_core cbb375c44bf28564ce479002bff66617a25d9ac1] drv_assign_vif_chanctx+0xa7/0x1f0 [mac80211 6efaad16237edaaea0868b132d4f93ecf918a8b6] ieee80211_reconfig+0x9cb/0x17b0 [mac80211 6efaad16237edaaea0868b132d4f93ecf918a8b6] ? __pfx_wiphy_resume+0x10/0x10 [cfg80211 572d03acaaa933fe38251be7fce3b3675284b8ed] ? dev_printk_emit+0x51/0x70 ? _dev_info+0x6e/0x90 wiphy_resume+0x89/0x180 [cfg80211 572d03acaaa933fe38251be7fce3b3675284b8ed] ? __pfx_wiphy_resume+0x10/0x10 [cfg80211 572d03acaaa933fe38251be7fce3b3675284b8ed] dpm_run_callback+0x37/0x1e0 device_resume+0x26d/0x4b0 ? __pfx_dpm_watchdog_handler+0x10/0x10 async_resume+0x1d/0x30 async_run_entry_fn+0x29/0xd0 worker_thread+0x397/0x970 kthread+0xed/0x110 ? __pfx_worker_thread+0x10/0x10 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x38/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1b/0x30 </TASK> Fixes: 68ec751b2881 ("wifi: rtw89: chan: manage active interfaces") Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250103024500.14990-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/mac80211.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b2658bf4d7f2f2e37ae9d2463ecc40618f587834 Author: Po-Hao Huang <phhuang@realtek.com> Date: Tue Dec 31 08:48:10 2024 +0800 wifi: rtw89: correct header conversion rule for MLO only Header conversion should only be used with MLO connections. Otherwise P2P connection fails due to wrong probe responses sent. Fix it accordingly. Fixes: b8499664fca9 ("wifi: rtw89: Add header conversion for MLO connections") Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241231004811.8646-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 9 ++++++++- drivers/net/wireless/realtek/rtw89/core.h | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) commit e4790b3e314a4814f1680a5dc552031fb199b878 Author: Zong-Zhe Yang <kevin_yang@realtek.com> Date: Tue Dec 31 08:48:09 2024 +0800 wifi: rtw89: chan: fix soft lockup in rtw89_entity_recalc_mgnt_roles() During rtw89_entity_recalc_mgnt_roles(), there is a normalizing process which will re-order the list if an entry with target pattern is found. And once one is found, should have aborted the list_for_each_entry. But, `break` just aborted the inner for-loop. The outer list_for_each_entry still continues. Normally, only the first entry will match the target pattern, and the re-ordering will change nothing, so there won't be soft lockup. However, in some special cases, soft lockup would happen. Fix it by `goto fill` to break from the list_for_each_entry. The following is a sample of kernel log for this problem. watchdog: BUG: soft lockup - CPU#1 stuck for 26s! [wpa_supplicant:2055] [...] RIP: 0010:rtw89_entity_recalc ([...] chan.c:392 chan.c:479) rtw89_core [...] Fixes: 68ec751b2881 ("wifi: rtw89: chan: manage active interfaces") Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241231004811.8646-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/chan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e47f0a5898540eb19b953708707887d4b3020645 Author: Zong-Zhe Yang <kevin_yang@realtek.com> Date: Tue Dec 31 08:48:08 2024 +0800 wifi: rtw89: fix proceeding MCC with wrong scanning state after sequence changes When starting/proceeding MCC, it will abort an ongoing hw scan process. In the proceeding cases, it unexpectedly tries to abort a non-exist hw scan process. Then, a trace shown at the bottom will happen. This problem is caused by a previous commit which changed some call sequence inside rtw89_hw_scan_complete() to fix some coex problems. These changes lead to our scanning flag was not cleared when proceeding MCC. To keep the fixes on coex, and resolve the problem here, re-consider the related call sequence. The known sequence requirements are listed below. * the old sequence: A. notify coex B. clear scanning flag C. proceed chanctx C-1. set channel C-2. proceed MCC (the problem: A needs to be after C-1) * the current sequence: C. proceed chanctx C-1. set channel C-2. proceed MCC A. notify coex B. clear scanning flag (the problem: C-2 needs to be after B) So, now let hw scan caller pass a callback to proceed chanctx if needed. Then, the new sequence will be like the below. C-1. set channel A. notify coex B. clear scanning flag C-2. proceed MCC The following is the kernel log for the problem in current sequence. rtw89_8852be 0000:04:00.0: rtw89_hw_scan_offload failed ret -110 ------------[ cut here ]------------ [...] CPU: 2 PID: 3991 Comm: kworker/u16:0 Tainted: G OE 6.6.17 #3 Hardware name: LENOVO 2356AD1/2356AD1, BIOS G7ETB3WW (2.73 ) 11/28/2018 Workqueue: events_unbound wiphy_work_cancel [cfg80211] RIP: 0010:ieee80211_sched_scan_stopped+0xaea/0xd80 [mac80211] Code: 9c 24 d0 11 00 00 49 39 dd 0f 85 46 ff ff ff 4c 89 e7 e8 09 2d RSP: 0018:ffffb27783643d48 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff8a2280964bc0 RSI: 0000000000000000 RDI: ffff8a23df580900 RBP: ffffb27783643d88 R08: 0000000000000001 R09: 0000000000000400 R10: 0000000000000000 R11: 0000000000008268 R12: ffff8a23df580900 R13: ffff8a23df581b00 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8a258e680000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f26a0654000 CR3: 000000002ea2e002 CR4: 00000000001706e0 Call Trace: <TASK> ? show_regs+0x68/0x70 ? ieee80211_sched_scan_stopped+0xaea/0xd80 [mac80211] ? __warn+0x8f/0x150 ? ieee80211_sched_scan_stopped+0xaea/0xd80 [mac80211] ? report_bug+0x1f5/0x200 ? handle_bug+0x46/0x80 ? exc_invalid_op+0x19/0x70 ? asm_exc_invalid_op+0x1b/0x20 ? ieee80211_sched_scan_stopped+0xaea/0xd80 [mac80211] ieee80211_scan_work+0x14a/0x650 [mac80211] ? __queue_work+0x10f/0x410 wiphy_work_cancel+0x2fb/0x310 [cfg80211] process_scheduled_works+0x9d/0x390 ? __pfx_worker_thread+0x10/0x10 worker_thread+0x15b/0x2d0 ? __pfx_worker_thread+0x10/0x10 kthread+0x108/0x140 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x3c/0x60 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1b/0x30 </TASK> ---[ end trace 0000000000000000 ]--- Fixes: f16c40acd319 ("wifi: rtw89: Fix TX fail with A2DP after scanning") Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241231004811.8646-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/chan.c | 26 ++++++++++++++++++-- drivers/net/wireless/realtek/rtw89/chan.h | 9 ++++++- drivers/net/wireless/realtek/rtw89/core.c | 2 +- drivers/net/wireless/realtek/rtw89/fw.c | 40 +++++++++++++++++++++++++------ 4 files changed, 66 insertions(+), 11 deletions(-) commit 875aec2357cd22d412226e4134d1106248b0eb9d Author: Brian Norris <briannorris@chromium.org> Date: Fri Dec 13 10:08:23 2024 -0800 kunit: platform: Resolve 'struct completion' warning If the <kunit/platform_device.h> header is included in a test without certain other headers, it produces compiler warnings like: In file included from [...] ../include/kunit/platform_device.h:15:57: warning: ‘struct completion’ declared inside parameter list will not be visible outside of this definition or declaration 15 | struct completion *x); | ^~~~~~~~~~ Add a 'struct completion' forward declaration to resolve this. Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> include/kunit/platform_device.h | 1 + 1 file changed, 1 insertion(+) commit 7d0da8f862340c5f42f0062b8560b8d0971a6ac4 Author: Lorenzo Bianconi <lorenzo@kernel.org> Date: Tue Jan 7 23:26:28 2025 +0100 net: airoha: Fix channel configuration for ETS Qdisc Limit ETS QoS channel to AIROHA_NUM_QOS_CHANNELS in airoha_tc_setup_qdisc_ets() in order to align the configured channel to the value set in airoha_dev_select_queue(). Fixes: 20bf7d07c956 ("net: airoha: Add sched ETS offload support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Link: https://patch.msgid.link/20250107-airoha-ets-fix-chan-v1-1-97f66ed3a068@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mediatek/airoha_eth.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 10bc9761d12e440656062ef78cd889bbfa827dcf Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Wed Jan 8 12:26:06 2025 +0300 net/smc: delete pointless divide by one Here "buf" is a void pointer so sizeof(*buf) is one. Doing a divide by one makes the code less readable. Delete it. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Link: https://patch.msgid.link/ee1a790b-f874-4512-b3ae-9c45f99dc640@stanley.mountain Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/smc/smc_core.c | 2 +- net/smc/smc_rx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c5a965701866e53be00b2412aae2c3833b0197ca Author: Dimitri Fedrau <dima.fedrau@gmail.com> Date: Tue Jan 7 09:23:04 2025 +0100 net: phy: dp83822: Add support for PHY LEDs on DP83822 The DP83822 supports up to three configurable Light Emitting Diode (LED) pins: LED_0, LED_1 (GPIO1), COL (GPIO2) and RX_D3 (GPIO3). Several functions can be multiplexed onto the LEDs for different modes of operation. LED_0 and COL (GPIO2) use the MLED function. MLED can be routed to only one of these two pins at a time. Add minimal LED controller driver supporting the most common uses with the 'netdev' trigger. Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20250107-dp83822-leds-v2-1-5b260aad874f@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/dp83822.c | 277 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 275 insertions(+), 2 deletions(-) commit bbe658d6580251d1832d408fa8a71ec254dc4416 Author: Uladzislau Rezki (Sony) <urezki@gmail.com> Date: Thu Dec 12 19:02:08 2024 +0100 mm/slab: Move kvfree_rcu() into SLAB Move kvfree_rcu() functionality to the slab_common.c file. The reason to have kvfree_rcu() functionality as part of SLAB is that there is a clear trend and need of closer integration. One of the recent example is creating a barrier function for SLAB caches. Another reason is to prevent of having several implementations of RCU machinery for reclaiming objects after a GP. As future steps, it can be more integrated(easier) with SLAB internals. Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> Acked-by: Hyeonggon Yoo <hyeonggon.yoo@sk.com> Tested-by: Hyeonggon Yoo <hyeonggon.yoo@sk.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz> include/linux/rcupdate.h | 1 - include/linux/slab.h | 1 + kernel/rcu/tree.c | 879 ---------------------------------------------- mm/slab_common.c | 880 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 881 insertions(+), 880 deletions(-) commit c18bcd85cea7f71ff956056347df87e559c3ad0f Author: Uladzislau Rezki (Sony) <urezki@gmail.com> Date: Thu Dec 12 19:02:07 2024 +0100 rcu/kvfree: Adjust a shrinker name Rename "rcu-kfree" to "slab-kvfree-rcu" since it goes to the slab_common.c file soon. Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> Acked-by: Hyeonggon Yoo <hyeonggon.yoo@sk.com> Tested-by: Hyeonggon Yoo <hyeonggon.yoo@sk.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz> kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba5cac52d0446f3d606a0c74a6856bcef88a6331 Author: Uladzislau Rezki (Sony) <urezki@gmail.com> Date: Thu Dec 12 19:02:06 2024 +0100 rcu/kvfree: Adjust names passed into trace functions Currently trace functions are supplied with "rcu_state.name" member which is located in the structure. The problem is that the "rcu_state" structure variable is local and can not be accessed from another place. To address this, this preparation patch passes "slab" string as a first argument. Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> Acked-by: Hyeonggon Yoo <hyeonggon.yoo@sk.com> Tested-by: Hyeonggon Yoo <hyeonggon.yoo@sk.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz> kernel/rcu/tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d824ed707ba257e508d83126cf1127ce2fd98139 Author: Uladzislau Rezki (Sony) <urezki@gmail.com> Date: Thu Dec 12 19:02:05 2024 +0100 rcu/kvfree: Move some functions under CONFIG_TINY_RCU Currently when a tiny RCU is enabled, the tree.c file is not compiled, thus duplicating function names do not conflict with each other. Because of moving of kvfree_rcu() functionality to the SLAB, we have to reorder some functions and place them together under CONFIG_TINY_RCU macro definition. Therefore, those functions name will not conflict when a kernel is compiled for CONFIG_TINY_RCU flavor. Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> Acked-by: Hyeonggon Yoo <hyeonggon.yoo@sk.com> Tested-by: Hyeonggon Yoo <hyeonggon.yoo@sk.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz> kernel/rcu/tree.c | 90 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 43 deletions(-) commit 0f52b4db4f91320569311b97a1a14a18fb8ff256 Author: Uladzislau Rezki (Sony) <urezki@gmail.com> Date: Thu Dec 12 19:02:04 2024 +0100 rcu/kvfree: Initialize kvfree_rcu() separately Introduce a separate initialization of kvfree_rcu() functionality. For such purpose a kfree_rcu_batch_init() is renamed to a kvfree_rcu_init() and it is invoked from the main.c right after rcu_init() is done. Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> Acked-by: Hyeonggon Yoo <hyeonggon.yoo@sk.com> Tested-by: Hyeonggon Yoo <hyeonggon.yoo@sk.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz> include/linux/rcupdate.h | 1 + init/main.c | 1 + kernel/rcu/tree.c | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) commit 594c82329eef335ad90f5276ae0d2dff4d6d2668 Author: WangYuli <wangyuli@uniontech.com> Date: Tue Jan 7 21:38:54 2025 +0800 usb: host: xhci-plat: Assign shared_hcd->rsrc_start When inserting a USB device, examining hcd->rsrc_start can be helpful in identifying which hcd is mounted, as the physical address represented here is typically unique. The following code snippet demonstrates this: struct usb_hcd *hcd = bus_to_hcd(udev->bus); unsigned long long usb_hcd_addr = (unsigned long long)hcd->rsrc_start; However, this approach has limitations now. For USB hosts with an MMIO interface, the effectiveness of this method is restricted to USB 2.0. Because commit 3429e91a661e ("usb: host: xhci: add platform driver support") assigned res->start to hcd->rsrc_start. But shared_hcd->rsrc_start remains unassigned, which is also necessary in certain scenarios. Fixes: 3429e91a661e ("usb: host: xhci: add platform driver support") Co-developed-by: Xu Rao <raoxu@uniontech.com> Signed-off-by: Xu Rao <raoxu@uniontech.com> Signed-off-by: WangYuli <wangyuli@uniontech.com> Link: https://lore.kernel.org/r/186B9F56972457B4+20250107133854.172309-1-wangyuli@uniontech.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/host/xhci-plat.c | 2 ++ 1 file changed, 2 insertions(+) commit 7d3934884babcfb1252c4296e0060c7a0749a429 Author: Rob Herring (Arm) <robh@kernel.org> Date: Thu Jan 9 11:07:47 2025 -0600 usb: dwc3: omap: Fix devm_regulator_get_optional() error handling Commit 533561a8aad5 ("usb: dwc3: omap: Use devm_regulator_get_optional()") assumed NULL was returned, but devm_regulator_get_optional() returns -ENODEV rather than NULL like other *_get_optional() functions. Fixes: 533561a8aad5 ("usb: dwc3: omap: Use devm_regulator_get_optional()") Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/20250109170748.3852439-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/dwc3/dwc3-omap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e84a7da8c5d6675be203876fd51c3897aaaf207d Author: Raphael Gallais-Pou <rgallaispou@gmail.com> Date: Thu Jan 9 16:20:55 2025 +0100 usb: dwc3: st: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() Letting the compiler remove these functions when the kernel is built without CONFIG_PM_SLEEP support is simpler and less error prone than the use of #ifdef based kernel configuration guards. Signed-off-by: Raphael Gallais-Pou <rgallaispou@gmail.com> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/20250109152055.52931-1-rgallaispou@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/dwc3/dwc3-st.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a266462b937beba065e934a563efe13dd246a164 Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Thu Jan 9 09:16:38 2025 +0900 usb: dwc3-am62: Fix an OF node leak in phy_syscon_pll_refclk() phy_syscon_pll_refclk() leaks an OF node obtained by of_parse_phandle_with_fixed_args(), thus add an of_node_put() call. Cc: stable <stable@kernel.org> Fixes: e8784c0aec03 ("drivers: usb: dwc3: Add AM62 USB wrapper driver") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/20250109001638.70033-1-joe@pf.is.s.u-tokyo.ac.jp Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/dwc3/dwc3-am62.c | 1 + 1 file changed, 1 insertion(+) commit e3a9bd247cddfb6fa0c29c2361f70b76c359eaa0 Author: Ray Chi <raychi@google.com> Date: Mon Jan 6 16:22:37 2025 +0800 usb: dwc3: Skip resume if pm_runtime_set_active() fails When the system begins to enter suspend mode, dwc3_suspend() is called by PM suspend. There is a problem that if someone interrupt the system suspend process between dwc3_suspend() and pm_suspend() of its parent device, PM suspend will be canceled and attempt to resume suspended devices so that dwc3_resume() will be called. However, dwc3 and its parent device (like the power domain or glue driver) may already be suspended by runtime PM in fact. If this sutiation happened, the pm_runtime_set_active() in dwc3_resume() will return an error since parent device was suspended. This can lead to unexpected behavior if DWC3 proceeds to execute dwc3_resume_common(). EX. RPM suspend: ... -> dwc3_runtime_suspend() -> rpm_suspend() of parent device ... PM suspend: ... -> dwc3_suspend() -> pm_suspend of parent device ^ interrupt, so resume suspended device ... <- dwc3_resume() <-/ ^ pm_runtime_set_active() returns error To prevent the problem, this commit will skip dwc3_resume_common() and return the error if pm_runtime_set_active() fails. Fixes: 68c26fe58182 ("usb: dwc3: set pm runtime active before resume common") Cc: stable <stable@kernel.org> Signed-off-by: Ray Chi <raychi@google.com> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/20250106082240.3822059-1-raychi@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/dwc3/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a181c8ef0b745cdb61151c710f0880d00b8442b7 Author: Stephen Boyd <swboyd@chromium.org> Date: Thu Jan 9 14:06:53 2025 -0800 usb: typec: cros-ec-ucsi: Mark cros_ucsi_ops static/const This structure isn't used outside this file and can be marked const so that it gets moved to read-only memory. Cc: Pavan Holla <pholla@chromium.org> Cc: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Cc: Łukasz Bartosik <ukaszb@chromium.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Łukasz Bartosik <ukaszb@chromium.org> Link: https://lore.kernel.org/r/20250109220655.1677506-3-swboyd@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/ucsi/cros_ec_ucsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ec7cac600ee761ed3fa9fb52a164b1a5507b280 Author: Stephen Boyd <swboyd@chromium.org> Date: Thu Jan 9 14:06:52 2025 -0800 usb: typec: cros-ec-ucsi: Add newlines to printk messages These printks need newlines. Add them and convert to dev_err_probe() in cros_ucsi_probe() to simplify code. Cc: Pavan Holla <pholla@chromium.org> Cc: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Cc: Łukasz Bartosik <ukaszb@chromium.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Łukasz Bartosik <ukaszb@chromium.org> Link: https://lore.kernel.org/r/20250109220655.1677506-2-swboyd@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/ucsi/cros_ec_ucsi.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit 653e11eae27436cd8b95d232de4c38d2a2f7bf34 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Tue Jan 7 14:10:13 2025 +0100 dt-bindings: usb: 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 <krzysztof.kozlowski@linaro.org> Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com> Acked-by: Andrew Jeffery <andrew@codeconstruct.com.au> # aspeed,usb-vhub.yaml Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Acked-by: Thierry Reding <treding@nvidia.com> Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com> # ti,tusb73x0-pci.yaml Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> # brcm,bdc.yaml Acked-by: Benjamin Bara <benjamin.bara@skidata.com> # cypress,hx3.yaml Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> # renesas Link: https://lore.kernel.org/r/20250107131015.246461-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> .../devicetree/bindings/usb/aspeed,usb-vhub.yaml | 44 +++++++++++----------- .../devicetree/bindings/usb/brcm,bdc.yaml | 14 +++---- .../devicetree/bindings/usb/cypress,hx3.yaml | 24 ++++++------ Documentation/devicetree/bindings/usb/dwc2.yaml | 4 +- .../devicetree/bindings/usb/fcs,fsa4480.yaml | 20 +++++----- .../bindings/usb/intel,keembay-dwc3.yaml | 32 ++++++++-------- .../devicetree/bindings/usb/ite,it5205.yaml | 18 ++++----- .../devicetree/bindings/usb/maxim,max3420-udc.yaml | 28 +++++++------- .../bindings/usb/nvidia,tegra210-xusb.yaml | 4 +- .../bindings/usb/renesas,rzv2m-usb3drd.yaml | 36 +++++++++--------- .../devicetree/bindings/usb/renesas,usb3-peri.yaml | 24 ++++++------ .../devicetree/bindings/usb/ti,hd3ss3220.yaml | 38 +++++++++---------- .../devicetree/bindings/usb/ti,tusb73x0-pci.yaml | 6 +-- .../devicetree/bindings/usb/ti,usb8020b.yaml | 20 +++++----- .../devicetree/bindings/usb/ti,usb8041.yaml | 16 ++++---- 15 files changed, 164 insertions(+), 164 deletions(-) commit 4e26de25d2b617e12bba98e11393fdf7c27885f9 Merge: b7f345fbc32a e5ecedcd7cc2 Author: Marc Zyngier <maz@kernel.org> Date: Mon Jan 6 17:48:19 2025 +0000 Merge remote-tracking branch 'arm64/for-next/cpufeature' into kvm-arm64/pkvm-fixed-features-6.14 Merge arm64/for-next/cpufeature to solve extensive conflicts caused by the CPACR_ELx->CPACR_EL1 repainting. Signed-off-by: Marc Zyngier <maz@kernel.org> commit 04e4ec98e405102edf54c3e40fd9bb031e4ac5bb Author: Masahiro Yamada <masahiroy@kernel.org> Date: Sun Dec 22 09:04:13 2024 +0900 MIPS: migrate to generic rule for built-in DTBs Commit 654102df2ac2 ("kbuild: add generic support for built-in boot DTBs") introduced generic support for built-in DTBs. Select GENERIC_BUILTIN_DTB and BUILTIN_DTB_ALL when the built-in DTB support is enabled. DTBs compiled under arch/mips/boot/dts/ will be wrapped by the generic rule in scripts/Makefile.vmlinux. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> arch/mips/Kconfig | 2 ++ arch/mips/Makefile | 3 --- arch/mips/boot/dts/Makefile | 2 -- arch/mips/boot/dts/brcm/Makefile | 2 -- arch/mips/boot/dts/cavium-octeon/Makefile | 2 -- arch/mips/boot/dts/ingenic/Makefile | 2 -- arch/mips/boot/dts/lantiq/Makefile | 2 -- arch/mips/boot/dts/loongson/Makefile | 2 -- arch/mips/boot/dts/mscc/Makefile | 3 --- arch/mips/boot/dts/mti/Makefile | 2 -- arch/mips/boot/dts/pic32/Makefile | 2 -- arch/mips/boot/dts/ralink/Makefile | 2 -- 12 files changed, 2 insertions(+), 24 deletions(-) commit f3253b23535fda2436b2d5a3172260a75ca64091 Author: Jeongjun Park <aha310510@gmail.com> Date: Sat Jan 11 02:35:20 2025 +0900 PM / devfreq: exynos: remove unused function parameter exynos_bus_parse_of() still declares a parameter struct device_node that is not used yet. This parameter is unnecessary and should be removed. Signed-off-by: Jeongjun Park <aha310510@gmail.com> drivers/devfreq/exynos-bus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit bc7584e009c39375294794f7ca751a6b2622c425 Author: Ism Hong <ism.hong@gmail.com> Date: Mon Jan 6 19:52:27 2025 +0800 mips: fix shmctl/semctl/msgctl syscall for o32 The commit 275f22148e87 ("ipc: rename old-style shmctl/semctl/msgctl syscalls") switched various architectures to use sys_old_*ctl() with ipc_parse_version, including mips n32/n64. However, for mips o32, commit 0d6040d46817 ("arch: add split IPC system calls where needed") added separate IPC syscalls without properly using the old-style handlers. This causes applications using uClibc-ng to fail with -EINVAL when calling semctl/shmctl/msgctl with IPC_64 flag, as uClibc-ng uses the syscall numbers from kernel headers to determine whether to use the IPC multiplexer or split syscalls. In contrast, glibc is unaffected as it uses a unified feature test macro __ASSUME_DIRECT_SYSVIPC_SYSCALLS (disabled for mips-o32) to make this decision. Fix this by switching the o32 ABI entries for semctl, shmctl and msgctl to use the old-style handlers, matching the behavior of other architectures and fixing compatibility with uClibc-ng. Signed-off-by: Ism Hong <ism.hong@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> arch/mips/kernel/syscalls/syscall_o32.tbl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 42a39e4aa59a10aa4afdc14194f3ee63d2db94e1 Author: Mateusz Jończyk <mat.jonczyk@o2.pl> Date: Sun Jan 5 22:18:06 2025 +0100 mips/math-emu: fix emulation of the prefx instruction Currently, installation of Debian 12.8 for mipsel fails on machines without an FPU [1]. This is caused by the fact that zstd (which is used for initramfs compression) executes the prefx instruction, which is not emulated properly by the kernel. The prefx (Prefetch Indexed) instruction fetches data from memory into the cache without any side effects. Though functionally unrelated, it requires an FPU [2]. Bytecode format of this instruction ends on "001111" binary: (prefx instruction format) & 0x0000003f = 0x0000000f The code in fpux_emu() runs like so: #define MIPSInst(x) x #define MIPSInst_FMA_FFMT(x) (MIPSInst(x) & 0x00000007) #define MIPSInst_FUNC(x) (MIPSInst(x) & 0x0000003f) enum cop1x_func { ..., pfetch_op = 0x0f, ... }; ... switch (MIPSInst_FMA_FFMT(ir)) { ... case 0x3: if (MIPSInst_FUNC(ir) != pfetch_op) return SIGILL; /* ignore prefx operation */ break; default: return SIGILL; } That snippet above contains a logic error and the if (MIPSInst_FUNC(ir) != pfetch_op) comparison always fires. When MIPSInst_FUNC(ir) is equal to pfetch_op, ir must end on 001111 binary. In this case, MIPSInst_FMA_FFMT(ir) must be equal to 0x7, which does not match that case label. This causes emulation failure for the prefx instruction. Fix it. This has been broken by commit 919af8b96c89 ("MIPS: Make definitions of MIPSInst_FMA_{FUNC,FMTM} consistent with MIPS64 manual") which modified the MIPSInst_FMA_FFMT macro without updating the users. Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl> Cc: stable@vger.kernel.org # after 3 weeks Cc: Dengcheng Zhu <dzhu@wavecomp.com> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: Ming Wang <wangming01@loongson.cn> Cc: Tiezhu Yang <yangtiezhu@loongson.cn> Fixes: 919af8b96c89 ("MIPS: Make definitions of MIPSInst_FMA_{FUNC,FMTM} consistent with MIPS64 manual") [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1091858 [2] MIPS Architecture For Programmers Volume II-A: The MIPS32 Instruction Set Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> arch/mips/math-emu/cp1emu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0088d4a08d1d9b3afc7e7c5734d367afb2530ff Author: Kexy Biscuit <kexybiscuit@aosc.io> Date: Sat Jan 11 01:22:09 2025 +0800 MIPS: Loongson: Add comments for interface_info Clarify meanings of members of interface_info, especially for .size, which does not define the ROM size. Suggested-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Kexy Biscuit <kexybiscuit@aosc.io> Acked-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> arch/mips/include/asm/mach-loongson64/boot_param.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bd2212d658d7659b9d83c7e2f3a06789d4db1e90 Author: Kexy Biscuit <kexybiscuit@aosc.io> Date: Sat Jan 11 01:22:08 2025 +0800 MIPS: Loongson64: remove ROM Size unit in boardinfo Per Appendix A.7 in Q/LS 0013-2014 (龙芯CPU开发系统固件与内核接口规范 V2.2, lit. Loongson DevSys Firmware Kernel Interface Specification V2.2), interface_info.size is size of this interface, not size of the LEFI BIOS ROM. In any case, the BIOS ROM Size just cannot be several kilobytes (KB) on Loongson64 LEFI platforms. Reported-by: Mingcong Bai <jeffbai@aosc.io> Suggested-by: Icenowy Zheng <uwu@icenowy.me> Fixes: 6c1bfbd9df8c ("MIPS: Loongson64: Add /sys/firmware/lefi/boardinfo") Cc: stable@vger.kernel.org Signed-off-by: Kexy Biscuit <kexybiscuit@aosc.io> Acked-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> arch/mips/loongson64/boardinfo.c | 2 -- 1 file changed, 2 deletions(-) commit 02bba947e47bea83e7ef9f664e3dc3b5a657b3b0 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Thu Jan 9 22:55:23 2025 +0100 MIPS: traps: Use str_enabled_disabled() in parity_protection_init() Remove hard-coded strings by using the str_enabled_disabled() helper function. Use pr_info() instead of printk(KERN_INFO) to silence multiple checkpatch warnings. Suggested-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> arch/mips/kernel/traps.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit ddd068d81445b17ac0bed084dfeb9e58b4df3ddd Author: WangYuli <wangyuli@uniontech.com> Date: Sat Jan 4 22:47:08 2025 +0800 MIPS: ftrace: Declare ftrace_get_parent_ra_addr() as static Declare ftrace_get_parent_ra_addr() as static to suppress clang compiler warning that 'no previous prototype'. This function is not intended to be called from other parts. Fix follow error with clang-19: arch/mips/kernel/ftrace.c:251:15: error: no previous prototype for function 'ftrace_get_parent_ra_addr' [-Werror,-Wmissing-prototypes] 251 | unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long | ^ arch/mips/kernel/ftrace.c:251:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 251 | unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long | ^ | static 1 error generated. Signed-off-by: WangYuli <wangyuli@uniontech.com> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> arch/mips/kernel/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 078b831638e1aa06dd7ffa9f244c8ac6b2995561 Author: Xi Ruoyao <xry111@xry111.site> Date: Mon Dec 23 17:20:41 2024 +0800 Revert "MIPS: csrc-r4k: Select HAVE_UNSTABLE_SCHED_CLOCK if SMP && 64BIT" This reverts commit 426fa8e4fe7bb914b5977cbce453a9926bf5b2e6. The commit has caused two issues on Loongson 3A4000: 1. The timestamp in dmesg become erratic, like: [3.736957] amdgpu 0000:04:00.0: ... ... [3.748895] [drm] Initialized amdgpu ... ... [18446744073.381141] amdgpu 0000:04:00:0: ... ... [1.613326] igb 0000:03:00.0 enp3s0: ... ... 2. More seriously, some workloads (for example, the test stdlib/test-cxa_atexit2 in the Glibc test suite) triggers an RCU stall and hang the system with a high probably (4 hangs out of 5 tests). Revert this commit to use jiffie on Loongson MIPS systems and fix these issues for now. The root cause may need more investigation. Cc: stable@vger.kernel.org # 6.11+ Cc: Jiaxun Yang <jiaxun.yang@flygoat.com> Cc: Icenowy Zheng <icenowy@aosc.io> Signed-off-by: Xi Ruoyao <xry111@xry111.site> Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> arch/mips/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 3398b1b8111d3b7a0cf8c3296320cf265fa56541 Author: liujing <liujing@cmss.chinamobile.com> Date: Wed Dec 4 17:23:38 2024 +0800 MIPS: Fix the wrong format specifier Make a minor change to eliminate a static checker warning. The type of cpu is unsigned int, so the correct format specifier should be %u instead of %d. Signed-off-by: liujing <liujing@cmss.chinamobile.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> arch/mips/kernel/cevt-bcm1480.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0dbec352f8251be24e30ff67c20183022feaa840 Author: Rong Xu <xur@google.com> Date: Tue Dec 3 09:34:31 2024 -0800 MIPS: Add a blank line after __HEAD Add a blank line after __HEAD in the text section. The __HEAD symbol was added in commit 52892ed6b03a ("MIPS: Place __kernel_entry at the beginning of text section"). Signed-off-by: Rong Xu <xur@google.com> Suggested-by: Maciej W. Rozycki <macro@orcam.me.uk> ---Changelog-- Added suggested-by. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> arch/mips/kernel/head.S | 1 + 1 file changed, 1 insertion(+) commit b4fdedd9f045668516291961a71ba7cdfb284907 Author: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Date: Mon Dec 2 16:39:36 2024 +0100 MIPS: kernel: Rename read/write_c0_ecc to read/writec0_errctl CP0 register 26 is used as ECC register for legacy cores, but newer cores (MIPS32/MIPS64) use it as an ErrCtl register. Since the kernel only uses CP0 26 as ErrCtl register rename the access functions to the more fitting name. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Reviewed-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> arch/mips/include/asm/mipsregs.h | 4 ++-- arch/mips/kernel/mips-mt.c | 7 +++---- arch/mips/kernel/spram.c | 4 ---- arch/mips/kernel/traps.c | 32 ++++++++++++++++---------------- 4 files changed, 21 insertions(+), 26 deletions(-) commit a7f1fa5564be565bd4bc18875bb46ffd0c01d292 Author: Mark Rutland <mark.rutland@arm.com> Date: Thu Jan 9 16:38:36 2025 -0600 KVM: arm64: Explicitly handle BRBE traps as UNDEFINED The Branch Record Buffer Extension (BRBE) adds a number of system registers and instructions which we don't currently intend to expose to guests. Our existing logic handles this safely, but this could be improved with some explicit handling of BRBE. KVM currently hides BRBE from guests: the cpufeature code's ftr_id_aa64dfr0[] table doesn't have an entry for the BRBE field, and so this will be zero in the sanitised value of ID_AA64DFR0 exposed to guests via read_sanitised_id_aa64dfr0_el1(). KVM currently traps BRBE usage from guests: the default configuration of the fine-grained trap controls HDFGRTR_EL2.{nBRBDATA,nBRBCTL,nBRBIDR} and HFGITR_EL2.{nBRBINJ_nBRBIALL} cause these to be trapped to EL2. Well-behaved guests shouldn't try to use the registers or instructions, but badly-behaved guests could use these, resulting in unnecessary warnings from KVM before it injects an UNDEF, e.g. | kvm [197]: Unsupported guest access at: 401c98 | { Op0( 2), Op1( 1), CRn( 9), CRm( 0), Op2( 0), func_read }, | kvm [197]: Unsupported guest access at: 401d04 | { Op0( 2), Op1( 1), CRn( 9), CRm( 0), Op2( 1), func_read }, | kvm [197]: Unsupported guest access at: 401d70 | { Op0( 2), Op1( 1), CRn( 9), CRm( 2), Op2( 0), func_read }, | kvm [197]: Unsupported guest access at: 401ddc | { Op0( 2), Op1( 1), CRn( 9), CRm( 1), Op2( 0), func_read }, | kvm [197]: Unsupported guest access at: 401e48 | { Op0( 2), Op1( 1), CRn( 9), CRm( 1), Op2( 1), func_read }, | kvm [197]: Unsupported guest access at: 401eb4 | { Op0( 2), Op1( 1), CRn( 9), CRm( 1), Op2( 2), func_read }, | kvm [197]: Unsupported guest access at: 401f20 | { Op0( 2), Op1( 1), CRn( 9), CRm( 0), Op2( 2), func_read }, | kvm [197]: Unsupported guest access at: 401f8c | { Op0( 1), Op1( 1), CRn( 7), CRm( 2), Op2( 4), func_write }, | kvm [197]: Unsupported guest access at: 401ff8 | { Op0( 1), Op1( 1), CRn( 7), CRm( 2), Op2( 5), func_write }, As with other features that we know how to handle, these warnings aren't particularly interesting, and we can simply treat these as UNDEFINED without any warning. Add the necessary fine-grained undef configuration to make this happen, as suggested by Marc Zyngier: https://lore.kernel.org/linux-arm-kernel/86r0czk6wd.wl-maz@kernel.org/ At the same time, update read_sanitised_id_aa64dfr0_el1() to hide BRBE from guests, as we do for SPE. This will prevent accidentally exposing BRBE to guests if/when ftr_id_aa64dfr0[] gains a BRBE entry. Cc: Anshuman Khandual <anshuman.khandual@arm.com> Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20250109223836.419240-1-robh@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/sys_regs.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit dea8838128c580cc6b563c901576b580f93a703e Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Fri Jan 10 23:53:09 2025 +0100 KVM: arm64: vgic: Use str_enabled_disabled() in vgic_v3_probe() Remove hard-coded strings by using the str_enabled_disabled() helper function. Suggested-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20250110225310.369980-2-thorsten.blum@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/vgic/vgic-v3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7dc8f809b87dd55271ccbbd6043df1490ec5066a Merge: 21520e74ba45 c1a6911485b0 Author: Jakub Kicinski <kuba@kernel.org> Date: Fri Jan 10 22:46:08 2025 -0800 Merge tag 'linux-can-next-for-6.14-20250110' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2025-01-10 Pierre-Henry Moussay adds PIC64GX compatibility to the DT bindings for Microchip's mpfs-can IP core. The next 3 patches are by Sean Nyekjaer and target the tcan4x5x driver. First the DT bindings is converted to DT schema, then nWKRQ voltage selection is added to the driver. Dario Binacchi's patch for the sun4i_can makes the driver more consistent by adding a likely() to the driver. Another patch by Sean Nyekjaer for the tcan4x5x driver gets rid of a false error message. Charan Pedumuru converts the atmel-can DT bindings to DT schema. The next 2 patches are by Oliver Hartkopp. The first one maps Oliver's former mail addresses to a dedicated CAN mail address. The second one assigns net/sched/em_canid.c additionally to the CAN maintainers. Ariel Otilibili's patch removes dead code from the CAN dev helper. The next 3 patches are by Sean Nyekjaer and add HW standby support to the tcan4x5x driver. A patch by Dario Binacchi fixes the DT bindings for the st,stm32-bxcan driver. The last 4 patches are by Jimmy Assarsson and target the kvaser_usb and the kvaser_pciefd driver: error statistics are improved and CAN_CTRLMODE_BERR_REPORTING is added. * tag 'linux-can-next-for-6.14-20250110' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: can: kvaser_pciefd: Add support for CAN_CTRLMODE_BERR_REPORTING can: kvaser_pciefd: Update stats and state even if alloc_can_err_skb() fails can: kvaser_usb: Add support for CAN_CTRLMODE_BERR_REPORTING can: kvaser_usb: Update stats and state even if alloc_can_err_skb() fails dt-bindings: can: st,stm32-bxcan: fix st,gcan property type can: m_can: call deinit/init callback when going into suspend/resume can: tcan4x5x: add deinit callback to set standby mode can: m_can: add deinit callback can: dev: can_get_state_str(): Remove dead code MAINTAINERS: assign em_canid.c additionally to CAN maintainers mailmap: add an entry for Oliver Hartkopp dt-bindings: net: can: atmel: Convert to json schema can: tcan4x5x: get rid of false clock errors can: sun4i_can: continue to use likely() to check skb can: tcan4x5x: add option for selecting nWKRQ voltage dt-bindings: can: tcan4x5x: Document the ti,nwkrq-voltage-vio option dt-bindings: can: convert tcan4x5x.txt to DT schema dt-bindings: can: mpfs: add PIC64GX CAN compatibility ==================== Link: https://patch.msgid.link/20250110112712.3214173-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 60a6002432448bb3f291d80768ae98d62efc9c77 Author: Al Viro <viro@zeniv.linux.org.uk> Date: Sat Jan 11 01:37:44 2025 -0500 hostfs: fix string handling in __dentry_name() strcpy() should not be used with destination potentially overlapping the source; what's more, strscpy() in there is pointless - we already know the amount we want to copy; might as well use memcpy(). Fixes: c278e81b8a02 "hostfs: Remove open coded strcpy()" Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/hostfs/hostfs_kern.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) commit 2bf66e66d2e6feece6175ec09ec590a0a8563bdd Author: Michael Ellerman <mpe@ellerman.id.au> Date: Wed Dec 18 22:43:47 2024 +1100 selftests/powerpc: Fix argument order to timer_sub() Commit c814bf958926 ("powerpc/selftests: Use timersub() for gettimeofday()"), got the order of arguments to timersub() wrong, leading to a negative time delta being reported, eg: test: gettimeofday tags: git_version:v6.12-rc5-409-gdddf291c3030 time = -3.297781 success: gettimeofday The correct order is minuend, subtrahend, which in this case is end, start. Which gives: test: gettimeofday tags: git_version:v6.12-rc5-409-gdddf291c3030-dirty time = 3.300650 success: gettimeofday Fixes: c814bf958926 ("powerpc/selftests: Use timersub() for gettimeofday()") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241218114347.428108-1-mpe@ellerman.id.au tools/testing/selftests/powerpc/benchmarks/gettimeofday.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 200f22fa48a8c670a1ba66d18d810c51055e6ae9 Author: Michael Ellerman <mpe@ellerman.id.au> Date: Wed Dec 18 22:31:59 2024 +1100 powerpc/prom_init: Use IS_ENABLED() Use IS_ENABLED() for the device tree checks, so that more code is checked by the compiler without having to build all the different configurations. Suggested-by: Rob Herring <robh@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241218113159.422821-1-mpe@ellerman.id.au arch/powerpc/kernel/prom_init.c | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) commit 8f70caad82e9c088ed93b4fea48d941ab6441886 Author: Gaurav Batra <gbatra@linux.ibm.com> Date: Fri Dec 6 15:00:39 2024 -0600 powerpc/pseries/iommu: IOMMU incorrectly marks MMIO range in DDW Power Hypervisor can possibily allocate MMIO window intersecting with Dynamic DMA Window (DDW) range, which is over 32-bit addressing. These MMIO pages needs to be marked as reserved so that IOMMU doesn't map DMA buffers in this range. The current code is not marking these pages correctly which is resulting in LPAR to OOPS while booting. The stack is at below BUG: Unable to handle kernel data access on read at 0xc00800005cd40000 Faulting instruction address: 0xc00000000005cdac Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Modules linked in: af_packet rfkill ibmveth(X) lpfc(+) nvmet_fc nvmet nvme_keyring crct10dif_vpmsum nvme_fc nvme_fabrics nvme_core be2net(+) nvme_auth rtc_generic nfsd auth_rpcgss nfs_acl lockd grace sunrpc fuse configfs ip_tables x_tables xfs libcrc32c dm_service_time ibmvfc(X) scsi_transport_fc vmx_crypto gf128mul crc32c_vpmsum dm_mirror dm_region_hash dm_log dm_multipath dm_mod sd_mod scsi_dh_emc scsi_dh_rdac scsi_dh_alua t10_pi crc64_rocksoft_generic crc64_rocksoft sg crc64 scsi_mod Supported: Yes, External CPU: 8 PID: 241 Comm: kworker/8:1 Kdump: loaded Not tainted 6.4.0-150600.23.14-default #1 SLE15-SP6 b44ee71c81261b9e4bab5e0cde1f2ed891d5359b Hardware name: IBM,9080-M9S POWER9 (raw) 0x4e2103 0xf000005 of:IBM,FW950.B0 (VH950_149) hv:phyp pSeries Workqueue: events work_for_cpu_fn NIP: c00000000005cdac LR: c00000000005e830 CTR: 0000000000000000 REGS: c00001400c9ff770 TRAP: 0300 Not tainted (6.4.0-150600.23.14-default) MSR: 800000000280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 24228448 XER: 00000001 CFAR: c00000000005cdd4 DAR: c00800005cd40000 DSISR: 40000000 IRQMASK: 0 GPR00: c00000000005e830 c00001400c9ffa10 c000000001987d00 c00001400c4fe800 GPR04: 0000080000000000 0000000000000001 0000000004000000 0000000000800000 GPR08: 0000000004000000 0000000000000001 c00800005cd40000 ffffffffffffffff GPR12: 0000000084228882 c00000000a4c4f00 0000000000000010 0000080000000000 GPR16: c00001400c4fe800 0000000004000000 0800000000000000 c00000006088b800 GPR20: c00001401a7be980 c00001400eff3800 c000000002a2da68 000000000000002b GPR24: c0000000026793a8 c000000002679368 000000000000002a c0000000026793c8 GPR28: 000008007effffff 0000080000000000 0000000000800000 c00001400c4fe800 NIP [c00000000005cdac] iommu_table_reserve_pages+0xac/0x100 LR [c00000000005e830] iommu_init_table+0x80/0x1e0 Call Trace: [c00001400c9ffa10] [c00000000005e810] iommu_init_table+0x60/0x1e0 (unreliable) [c00001400c9ffa90] [c00000000010356c] iommu_bypass_supported_pSeriesLP+0x9cc/0xe40 [c00001400c9ffc30] [c00000000005c300] dma_iommu_dma_supported+0xf0/0x230 [c00001400c9ffcb0] [c00000000024b0c4] dma_supported+0x44/0x90 [c00001400c9ffcd0] [c00000000024b14c] dma_set_mask+0x3c/0x80 [c00001400c9ffd00] [c0080000555b715c] be_probe+0xc4/0xb90 [be2net] [c00001400c9ffdc0] [c000000000986f3c] local_pci_probe+0x6c/0x110 [c00001400c9ffe40] [c000000000188f28] work_for_cpu_fn+0x38/0x60 [c00001400c9ffe70] [c00000000018e454] process_one_work+0x314/0x620 [c00001400c9fff10] [c00000000018f280] worker_thread+0x2b0/0x620 [c00001400c9fff90] [c00000000019bb18] kthread+0x148/0x150 [c00001400c9fffe0] [c00000000000ded8] start_kernel_thread+0x14/0x18 There are 2 issues in the code 1. The index is "int" while the address is "unsigned long". This results in negative value when setting the bitmap. 2. The DMA offset is page shifted but the MMIO range is used as-is (64-bit address). MMIO address needs to be page shifted as well. Fixes: 3c33066a2190 ("powerpc/kernel/iommu: Add new iommu_table_in_use() helper") Signed-off-by: Gaurav Batra <gbatra@linux.ibm.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241206210039.93172-1-gbatra@linux.ibm.com arch/powerpc/kernel/iommu.c | 2 +- arch/powerpc/platforms/pseries/iommu.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) commit 1196bdce3d107194dd15f508602871ffb7ff2d0b Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon Dec 30 19:29:00 2024 -0500 SUNRPC: Document validity guarantees of the pointer returned by reserve_space A subtlety of this API is that if the @nbytes region traverses a page boundary, the next __xdr_commit_encode will shift the data item in the XDR encode buffer. This makes the returned pointer point to something else, leading to unexpected behavior. There are a few cases where the caller saves the returned pointer and then later uses it to insert a computed value into an earlier part of the stream. This can be safe only if either: - the data item is guaranteed to be in the XDR buffer's head, and thus is not ever going to be near a page boundary, or - the data item is no larger than 4 octets, since XDR alignment rules require all data items to start on 4-octet boundaries But that safety is only an artifact of the current implementation. It would be less brittle if these "safe" uses were eventually replaced. Reviewed-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> net/sunrpc/xdr.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4163ee711cf141ada9e884a94e6e329431547fd7 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon Dec 30 19:28:56 2024 -0500 NFSD: Insulate nfsd4_encode_fattr4() from page boundaries in the encode buffer Commit ab04de60ae1c ("NFSD: Optimize nfsd4_encode_fattr()") replaced the use of write_bytes_to_xdr_buf() because it's expensive and the data items to be encoded are already properly aligned. However, there's no guarantee that the pointer returned from xdr_reserve_space() will still point to the correct reserved space in the encode buffer after one or more intervening calls to xdr_reserve_space(). It just happens to work with the current implementation of xdr_reserve_space(). This commit effectively reverts the optimization. Reviewed-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4xdr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b786caa65d4baa73257487e27ebab9004dc768d1 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon Dec 30 19:28:59 2024 -0500 NFSD: Insulate nfsd4_encode_secinfo() from page boundaries in the encode buffer There's no guarantee that the pointer returned from xdr_reserve_space() will still point to the correct reserved space in the encode buffer after one or more intervening calls to xdr_reserve_space(). It just happens to work with the current implementation of xdr_reserve_space(). Reviewed-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4xdr.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 825562bc7d5948723511046686217829dbeb067f Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon Dec 30 19:28:58 2024 -0500 NFSD: Refactor nfsd4_do_encode_secinfo() again Extract the code that encodes the secinfo4 union data type to clarify the logic. The removed warning is pretty well obscured and thus probably not terribly useful. Reviewed-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4xdr.c | 65 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 31 deletions(-) commit 201cb2048a926b041f80cbd7331de77b87867940 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon Dec 30 19:28:57 2024 -0500 NFSD: Insulate nfsd4_encode_readlink() from page boundaries in the encode buffer There's no guarantee that the pointer returned from xdr_reserve_space() will still point to the correct reserved space in the encode buffer after one or more intervening calls to xdr_reserve_space(). It just happens to work with the current implementation of xdr_reserve_space(). Reviewed-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4xdr.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 26ea81638fa0fb9c02b76775301995722368356a Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon Dec 30 19:28:55 2024 -0500 NFSD: Insulate nfsd4_encode_read_plus_data() from page boundaries in the encode buffer Commit eeadcb757945 ("NFSD: Simplify READ_PLUS") replaced the use of write_bytes_to_xdr_buf(), copying what was in nfsd4_encode_read() at the time. However, the current code will corrupt the encoded data if the XDR data items that are reserved early and then poked into the XDR buffer later happen to fall on a page boundary in the XDR encoding buffer. __xdr_commit_encode can shift encoded data items in the encoding buffer so that pointers returned from xdr_reserve_space() no longer address the same part of the encoding stream. Fixes: eeadcb757945 ("NFSD: Simplify READ_PLUS") Reviewed-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4xdr.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit c9fc7772bacb28a8bd8efb08399c5af7217fbbb7 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon Dec 30 19:28:54 2024 -0500 NFSD: Insulate nfsd4_encode_read_plus() from page boundaries in the encode buffer Commit eeadcb757945 ("NFSD: Simplify READ_PLUS") replaced the use of write_bytes_to_xdr_buf(), copying what was in nfsd4_encode_read() at the time. However, the current code will corrupt the encoded data if the XDR data items that are reserved early and then poked into the XDR buffer later happen to fall on a page boundary in the XDR encoding buffer. __xdr_commit_encode can shift encoded data items in the encoding buffer so that pointers returned from xdr_reserve_space() no longer address the same part of the encoding stream. Fixes: eeadcb757945 ("NFSD: Simplify READ_PLUS") Reviewed-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4xdr.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 1a861150bd6a69ea14da7a0d752da2b442e6a5dc Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon Dec 30 19:28:53 2024 -0500 NFSD: Insulate nfsd4_encode_read() from page boundaries in the encode buffer Commit 28d5bc468efe ("NFSD: Optimize nfsd4_encode_readv()") replaced the use of write_bytes_to_xdr_buf() because it's expensive and the data items to be encoded are already properly aligned. However, the current code will corrupt the encoded data if the XDR data items that are reserved early and then poked into the XDR buffer later happen to fall on a page boundary in the XDR encoding buffer. __xdr_commit_encode can shift encoded data items in the encoding buffer so that pointers returned from xdr_reserve_space() no longer address the same part of the encoding stream. This isn't an issue for splice reads because the reserved encode buffer areas must fall in the XDR buffers header for the splice to work without error. For vectored reads, however, there is a possibility of send buffer corruption in rare cases. Fixes: 28d5bc468efe ("NFSD: Optimize nfsd4_encode_readv()") Reviewed-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4xdr.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit ef3675b45bcb6c17cabbbde620c6cea52ffb21ac Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon Dec 30 19:28:52 2024 -0500 NFSD: Encode COMPOUND operation status on page boundaries J. David reports an odd corruption of a READDIR reply sent to a FreeBSD client. xdr_reserve_space() has to do a special trick when the @nbytes value requests more space than there is in the current page of the XDR buffer. In that case, xdr_reserve_space() returns a pointer to the start of the next page, and then the next call to xdr_reserve_space() invokes __xdr_commit_encode() to copy enough of the data item back into the previous page to make that data item contiguous across the page boundary. But we need to be careful in the case where buffer space is reserved early for a data item whose value will be inserted into the buffer later. One such caller, nfsd4_encode_operation(), reserves 8 bytes in the encoding buffer for each COMPOUND operation. However, a READDIR result can sometimes encode file names so that there are only 4 bytes left at the end of the current XDR buffer page (though plenty of pages are left to handle the remaining encoding tasks). If a COMPOUND operation follows the READDIR result (say, a GETATTR), then nfsd4_encode_operation() will reserve 8 bytes for the op number (9) and the op status (usually NFS4_OK). In this weird case, xdr_reserve_space() returns a pointer to byte zero of the next buffer page, as it assumes the data item will be copied back into place (in the previous page) on the next call to xdr_reserve_space(). nfsd4_encode_operation() writes the op num into the buffer, then saves the next 4-byte location for the op's status code. The next xdr_reserve_space() call is part of GETATTR encoding, so the op num gets copied back into the previous page, but the saved location for the op status continues to point to the wrong spot in the current XDR buffer page because __xdr_commit_encode() moved that data item. After GETATTR encoding is complete, nfsd4_encode_operation() writes the op status over the first XDR data item in the GETATTR result. The NFS4_OK status code (0) makes it look like there are zero items in the GETATTR's attribute bitmask. The patch description of commit 2825a7f90753 ("nfsd4: allow encoding across page boundaries") [2014] remarks that NFSD "can't handle a new operation starting close to the end of a page." This bug appears to be one reason for that remark. Reported-by: J David <j.david.lists@gmail.com> Closes: https://lore.kernel.org/linux-nfs/3998d739-c042-46b4-8166-dbd6c5f0e804@oracle.com/T/#t Tested-by: Rick Macklem <rmacklem@uoguelph.ca> Reviewed-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Cc: stable@vger.kernel.org Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4xdr.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 002ec8f1c69d3722a033eaf45102ba747ae80e94 Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:51 2025 +0900 Documentation: Document the NVMe PCI endpoint target driver Add a documentation file (Documentation/nvme/nvme-pci-endpoint-target.rst) for the new NVMe PCI endpoint target driver. This provides an overview of the driver requirements, capabilities and limitations. A user guide describing how to setup a NVMe PCI endpoint device using this driver is also provided. This document is made accessible also from the PCI endpoint documentation using a link. Furthermore, since the existing nvme documentation was not accessible from the top documentation index, an index file is added to Documentation/nvme and this index listed as "NVMe Subsystem" in the "Storage interfaces" section of the subsystem API index. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> Documentation/PCI/endpoint/index.rst | 1 + Documentation/PCI/endpoint/pci-nvme-function.rst | 13 + Documentation/nvme/index.rst | 12 + Documentation/nvme/nvme-pci-endpoint-target.rst | 368 +++++++++++++++++++++++ Documentation/subsystem-apis.rst | 1 + 5 files changed, 395 insertions(+) commit 0faa0fe6f90ea59b10d1b0f15ce0eb0c18eff186 Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:50 2025 +0900 nvmet: New NVMe PCI endpoint function target driver Implement a PCI target driver using the PCI endpoint framework. This requires hardware with a PCI controller capable of executing in endpoint mode. The PCI endpoint framework is used to set up a PCI endpoint function and its BAR compatible with a NVMe PCI controller. The framework is also used to map local memory to the PCI address space to execute MMIO accesses for retrieving NVMe commands from submission queues and posting completion entries to completion queues. If supported, DMA is used for command retreival and command data transfers, based on the PCI address segments indicated by the command using either PRPs or SGLs. The NVMe target driver relies on the NVMe target core code to execute all commands isssued by the host. The PCI target driver is mainly responsible for the following: - Initialization and teardown of the endpoint device and its backend PCI target controller. The PCI target controller is created using a subsystem and a port defined through configfs. The port used must be initialized with the "pci" transport type. The target controller is allocated and initialized when the PCI endpoint is started by binding it to the endpoint PCI device (nvmet_pci_epf_epc_init() function). - Manage the endpoint controller state according to the PCI link state and the actions of the host (e.g. checking the CC.EN register) and propagate these actions to the PCI target controller. Polling of the controller enable/disable is done using a delayed work scheduled every 5ms (nvmet_pci_epf_poll_cc() function). This work is started whenever the PCI link comes up (nvmet_pci_epf_link_up() notifier function) and stopped when the PCI link comes down (nvmet_pci_epf_link_down() notifier function). nvmet_pci_epf_poll_cc() enables and disables the PCI controller using the functions nvmet_pci_epf_enable_ctrl() and nvmet_pci_epf_disable_ctrl(). The controller admin queue is created using nvmet_pci_epf_create_cq(), which calls nvmet_cq_create(), and nvmet_pci_epf_create_sq() which uses nvmet_sq_create(). nvmet_pci_epf_disable_ctrl() always resets the PCI controller to its initial state so that nvmet_pci_epf_enable_ctrl() can be called again. This ensures correct operation if, for instance, the host reboots causing the PCI link to be temporarily down. - Manage the controller admin and I/O submission queues using local memory. Commands are obtained from submission queues using a work item that constantly polls the doorbells of all submissions queues (nvmet_pci_epf_poll_sqs() function). This work is started whenever the controller is enabled (nvmet_pci_epf_enable_ctrl() function) and stopped when the controller is disabled (nvmet_pci_epf_disable_ctrl() function). When new commands are submitted by the host, DMA transfers are used to retrieve the commands. - Initiate the execution of all admin and I/O commands using the target core code, by calling a requests execute() function. All commands are individually handled using a per-command work item (nvmet_pci_epf_iod_work() function). A command overall execution includes: initializing a struct nvmet_req request for the command, using nvmet_req_transfer_len() to get a command data transfer length, parse the command PRPs or SGLs to get the PCI address segments of the command data buffer, retrieve data from the host (if the command is a write command), call req->execute() to execute the command and transfer data to the host (for read commands). - Handle the completions of commands as notified by the ->queue_response() operation of the PCI target controller (nvmet_pci_epf_queue_response() function). Completed commands are added to a list of completed command for their CQ. Each CQ list of completed command is processed using a work item (nvmet_pci_epf_cq_work() function) which posts entries for the completed commands in the CQ memory and raise an IRQ to the host to signal the completion. IRQ coalescing is supported as mandated by the NVMe base specification for PCI controllers. Of note is that completion entries are transmitted to the host using MMIO, after mapping the completion queue memory to the host PCI address space. Unlike for retrieving commands from SQs, DMA is not used as it degrades performance due to the transfer serialization needed (which delays completion entries transmission). The configuration of a NVMe PCI endpoint controller is done using configfs. First the NVMe PCI target controller configuration must be done to set up a subsystem and a port with the "pci" addr_trtype attribute. The subsystem can be setup using a file or block device backed namespace or using a passthrough NVMe device. After this, the PCI endpoint can be configured and bound to the PCI endpoint controller to start the NVMe endpoint controller. In order to not overcomplicate this initial implementation of an endpoint PCI target controller driver, protection information is not for now supported. If the PCI controller port and namespace are configured with protection information support, an error will be returned when the controller is created and initialized when the endpoint function is started. Protection information support will be added in a follow-up patch series. Using a Rock5B board (Rockchip RK3588 SoC, PCI Gen3x4 endpoint controller) with a target PCI controller setup with 4 I/O queues and a null_blk block device as a namespace, the maximum performance using fio was measured at 131 KIOPS for random 4K reads and up to 2.8 GB/S throughput. Some data points are: Rnd read, 4KB, QD=1, 1 job : IOPS=16.9k, BW=66.2MiB/s (69.4MB/s) Rnd read, 4KB, QD=32, 1 job : IOPS=78.5k, BW=307MiB/s (322MB/s) Rnd read, 4KB, QD=32, 4 jobs: IOPS=131k, BW=511MiB/s (536MB/s) Seq read, 512KB, QD=32, 1 job : IOPS=5381, BW=2691MiB/s (2821MB/s) The NVMe PCI endpoint target driver is not intended for production use. It is a tool for learning NVMe, exploring existing features and testing implementations of new NVMe features. Co-developed-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/Kconfig | 11 + drivers/nvme/target/Makefile | 2 + drivers/nvme/target/pci-epf.c | 2591 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 2604 insertions(+) commit a0ed77d4c9a7745ac5dca35d563d6096787ae942 Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:49 2025 +0900 nvmet: Implement arbitration feature support NVMe base specification v2.1 mandates support for the arbitration feature (NVME_FEAT_ARBITRATION). Introduce the data structure struct nvmet_feat_arbitration to define the high, medium and low priority weight fields and the arbitration burst field of this feature and implement the functions nvmet_get_feat_arbitration() and nvmet_set_feat_arbitration() functions to get and set these fields. Since there is no generic way to implement support for the arbitration feature, these functions respectively use the controller get_feature() and set_feature() operations to process the feature with the help of the controller driver. If the controller driver does not implement these operations and a get feature command or a set feature command for this feature is received, the command is failed with an invalid field error. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/admin-cmd.c | 51 +++++++++++++++++++++++++++++++++++++++-- drivers/nvme/target/nvmet.h | 7 ++++++ 2 files changed, 56 insertions(+), 2 deletions(-) commit f1ecd491b6e71d598172f29d9c6c8735b81d2566 Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:48 2025 +0900 nvmet: Implement interrupt config feature support The NVMe base specifications v2.1 mandate supporting the interrupt config feature (NVME_FEAT_IRQ_CONFIG) for PCI controllers. Introduce the data structure struct nvmet_feat_irq_config to define the coalescing disabled (cd) and interrupt vector (iv) fields of this feature and implement the functions nvmet_get_feat_irq_config() and nvmet_set_feat_irq_config() functions to get and set these fields. These functions respectively use the controller get_feature() and set_feature() operations to fill and handle the fields of struct nvmet_feat_irq_config. Support for this feature is prohibited for fabrics controllers. If a get feature command or a set feature command for this feature is received for a fabrics controller, the command is failed with an invalid field error. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/admin-cmd.c | 54 +++++++++++++++++++++++++++++++++++++++-- drivers/nvme/target/nvmet.h | 5 ++++ 2 files changed, 57 insertions(+), 2 deletions(-) commit 89b94a6cbeff4f184fc1ec3b9563b371ee617511 Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:47 2025 +0900 nvmet: Implement interrupt coalescing feature support The NVMe base specifications v2.1 mandate Supporting the interrupt coalescing feature (NVME_FEAT_IRQ_COALESCE) for PCI controllers. Introduce the data structure struct nvmet_feat_irq_coalesce to define the time and threshold (thr) fields of this feature and implement the functions nvmet_get_feat_irq_coalesce() and nvmet_set_feat_irq_coalesce() to get and set this feature. These functions respectively use the controller get_feature() and set_feature() operations to fill and handle the fields of struct nvmet_feat_irq_coalesce. While the Linux kernel nvme driver does not use this feature and thus will not complain if it is not implemented, other major OSes fail initializing the NVMe device if this feature support is missing. Support for this feature is prohibited for fabrics controllers. If a get feature or set feature command for this feature is received for a fabrics controller, the command is failed with an invalid field error. Suggested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/admin-cmd.c | 53 +++++++++++++++++++++++++++++++++++++++-- drivers/nvme/target/nvmet.h | 10 ++++++++ 2 files changed, 61 insertions(+), 2 deletions(-) commit 2f2b20fad973d00169d24f5338eb1bf0a42e8218 Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:46 2025 +0900 nvmet: Implement host identifier set feature support The NVMe specifications mandate support for the host identifier set_features for controllers that also supports reservations. Satisfy this requirement by implementing handling of the NVME_FEAT_HOST_ID feature for the nvme_set_features command. This implementation is for now effective only for PCI target controllers. For other controller types, the set features command is failed with a NVME_SC_CMD_SEQ_ERROR status as before. As noted in the code, 128 bits host identifiers are supported since the NVMe base specifications version 2.1 indicate in section 5.1.25.1.28.1 that "The controller may support a 64-bit Host Identifier...". The RHII (Reservations and Host Identifier Interaction) bit of the controller attribute (ctratt) field of the identify controller data is also set to indicate that a host ID of "0" is supported but that the host ID must be a non-zero value to use reservations. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/admin-cmd.c | 35 +++++++++++++++++++++++++++++++---- include/linux/nvme.h | 1 + 2 files changed, 32 insertions(+), 4 deletions(-) commit 08461535a9cd9757dadbae0ee3f3bbdd6e66ba09 Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:45 2025 +0900 nvmet: Introduce get/set_feature controller operations The implementation of some features cannot always be done generically by the target core code. Arbitraion and IRQ coalescing features are examples of such features: their implementation must be provided (at least partially) by the target controller driver. Introduce the set_feature() and get_feature() controller fabrics operations (in struct nvmet_fabrics_ops) to allow supporting such features. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/nvmet.h | 4 ++++ 1 file changed, 4 insertions(+) commit 1ad8630ffa95ae48b2a9a079d124de452569f2f8 Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:44 2025 +0900 nvmet: Do not require SGL for PCI target controller commands Support for SGL is optional for the PCI transport. Modify nvmet_req_init() to not require the NVME_CMD_SGL_METABUF command flag to be set if the target controller transport type is NVMF_TRTYPE_PCI. In addition to this, the NVMe base specification v2.1 mandate that all admin commands use PRP, that is, have CDW0.PSDT cleared to 0. Modify nvmet_parse_admin_cmd() to check this. Finally, modify nvmet_check_transfer_len() and nvmet_check_data_len_lte() to return the appropriate error status depending on the command using SGL or PRP. Since for fabrics nvmet_req_init() checks that a command uses SGL, always, this change affects only PCI target controllers. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/admin-cmd.c | 5 +++++ drivers/nvme/target/core.c | 27 +++++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) commit 60d3cd856114cb51f2f0ba6570d25085c55671f8 Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:43 2025 +0900 nvmet: Add support for I/O queue management admin commands The I/O submission queue management admin commands (nvme_admin_delete_sq, nvme_admin_create_sq, nvme_admin_delete_cq, and nvme_admin_create_cq) are mandatory admin commands for I/O controllers using the PCI transport, that is, support for these commands is mandatory for a a PCI target I/O controller. Implement support for these commands by adding the functions nvmet_execute_delete_sq(), nvmet_execute_create_sq(), nvmet_execute_delete_cq() and nvmet_execute_create_cq() to set as the execute method of requests for these commands. These functions will return an invalid opcode error for any controller that is not a PCI target controller. Support for the I/O queue management commands is also reported in the command effect log of PCI target controllers (using nvmet_get_cmd_effects_admin()). Each management command is backed by a controller fabric operation that can be defined by a PCI target controller driver to setup I/O queues using nvmet_sq_create() and nvmet_cq_create() or delete I/O queues using nvmet_sq_destroy(). As noted in a comment in nvmet_execute_create_sq(), we do not yet support sharing a single CQ between multiple SQs. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/admin-cmd.c | 165 +++++++++++++++++++++++++++++++++++++++- drivers/nvme/target/nvmet.h | 8 ++ 2 files changed, 170 insertions(+), 3 deletions(-) commit 1eb380caf5275bba1d3d6182dde1fd740f331743 Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:42 2025 +0900 nvmet: Introduce nvmet_sq_create() and nvmet_cq_create() Introduce the new functions nvmet_sq_create() and nvmet_cq_create() to allow a target driver to initialize and setup admin and IO queues directly, without needing to execute connect fabrics commands. The helper functions nvmet_check_cqid() and nvmet_check_sqid() are implemented to check the correctness of SQ and CQ IDs when nvmet_sq_create() and nvmet_cq_create() are called. nvmet_sq_create() and nvmet_cq_create() are primarily intended for use with PCI target controller drivers and thus are not well integrated with the current queue creation of fabrics controllers using the connect command. These fabrices drivers are not modified to use these functions. This simple implementation of SQ and CQ management for PCI target controller drivers does not allow multiple SQs to share the same CQ, similarly to other fabrics transports. This is a specification violation. A more involved set of changes will follow to add support for this required completion queue sharing feature. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/core.c | 83 +++++++++++++++++++++++++++++++++++++++++++++ drivers/nvme/target/nvmet.h | 6 ++++ 2 files changed, 89 insertions(+) commit 43043c9b97258a008b3402cfbbf1c5d82151c77f Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:41 2025 +0900 nvmet: Introduce nvmet_req_transfer_len() Add the new function nvmet_req_transfer_len() to parse a request command to extract the transfer length of the command. This function implementation relies on multiple helper functions for parsing I/O commands (nvmet_io_cmd_transfer_len()), admin commands (nvmet_admin_cmd_data_len()) and fabrics connect commands (nvmet_connect_cmd_data_len). Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/admin-cmd.c | 21 +++++++++++++++++ drivers/nvme/target/core.c | 37 +++++++++++++++++++++++++++++ drivers/nvme/target/discovery.c | 14 +++++++++++ drivers/nvme/target/fabrics-cmd-auth.c | 14 +++++++++-- drivers/nvme/target/fabrics-cmd.c | 43 ++++++++++++++++++++++++++++++++++ drivers/nvme/target/nvmet.h | 8 +++++++ 6 files changed, 135 insertions(+), 2 deletions(-) commit 6202783184bf063c57efb8d83ce0adaf8da11090 Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:40 2025 +0900 nvmet: Improve nvmet_alloc_ctrl() interface and implementation Introduce struct nvmet_alloc_ctrl_args to define the arguments for the function nvmet_alloc_ctrl() to avoid the need for passing a pointer to a struct nvmet_req as an argument. This new data structure aggregates together the arguments that were passed to nvmet_alloc_ctrl() (subsysnqn, hostnqn and kato), together with the struct nvmet_req fields used by nvmet_alloc_ctrl(), that is, the fields port, p2p_client, and ops as input and the result and error_loc fields as output, as well as a status field. nvmet_alloc_ctrl() is also changed to return a pointer to the allocated and initialized controller structure instead of a status code, as the status is now returned through the status field of struct nvmet_alloc_ctrl_args. The function nvmet_setup_p2p_ns_map() is changed to not take a pointer to a struct nvmet_req as argument, instead, directly specify the p2p_client device pointer needed as argument. The code in nvmet_execute_admin_connect() that initializes a new target controller after allocating it is moved into nvmet_alloc_ctrl(). The code that sets up an admin queue for the controller (and the call to nvmet_install_queue()) remains in nvmet_execute_admin_connect(). Finally, nvmet_alloc_ctrl() is also exported to allow target drivers to use this function directly to allocate and initialize a new controller structure without the need to rely on a fabrics connect command request. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/core.c | 83 +++++++++++++++++++++++++-------------- drivers/nvme/target/fabrics-cmd.c | 58 ++++++++++++--------------- drivers/nvme/target/nvmet.h | 18 +++++++-- 3 files changed, 94 insertions(+), 65 deletions(-) commit 200adac75888182c09027e9b7852507dabd87034 Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:39 2025 +0900 nvme: Add PCI transport type Define the transport type NVMF_TRTYPE_PCI for PCI endpoint targets. This transport type is defined using the value 0 which is reserved in the NVMe base specifications v2.1 (Figure 294). Given that struct nvmet_port are zeroed out on creation, to avoid having this transsport type becoming the new default, nvmet_referral_make() and nvmet_ports_make() are modified to initialize a port discovery address transport type field (disc_addr.trtype) to NVMF_TRTYPE_MAX. Any port using this transport type is also skipped and not reported in the discovery log page (nvmet_execute_disc_get_log_page()). The helper function nvmet_is_pci_ctrl() is also introduced to check if a target controller uses the PCI transport. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/configfs.c | 4 ++++ drivers/nvme/target/discovery.c | 3 +++ drivers/nvme/target/nvmet.h | 5 +++++ include/linux/nvme.h | 1 + 4 files changed, 13 insertions(+) commit 35c593e5303c7f1f389728b4115cfd0f4d8c30ae Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:38 2025 +0900 nvmet: Add drvdata field to struct nvmet_ctrl Allow a target driver to attach private data to a target controller by adding the new field drvdata to struct nvmet_ctrl. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/nvmet.h | 2 ++ 1 file changed, 2 insertions(+) commit 1ee4531054863eeba38cc0e94ac9c23560a83e96 Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:37 2025 +0900 nvmet: Introduce nvmet_get_cmd_effects_admin() In order to have a logically better organized implementation of the effects log page, split out reporting the supported admin commands from nvmet_get_cmd_effects_nvm() into the new function nvmet_get_cmd_effects_admin(). Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/admin-cmd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 15e9d26445441a0c05ee14bef7ba752088f66a0c Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:36 2025 +0900 nvmet: Export nvmet_update_cc() and nvmet_cc_xxx() helpers Make the function nvmet_update_cc() available to target drivers by exporting it. To also facilitate the manipulation of the cc register bits, move the inline helper functions nvmet_cc_en(), nvmet_cc_css(), nvmet_cc_mps(), nvmet_cc_ams(), nvmet_cc_shn(), nvmet_cc_iosqes(), and nvmet_cc_iocqes() from core.c to nvmet.h so that these functions can be reused in target controller drivers. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/core.c | 36 +----------------------------------- drivers/nvme/target/nvmet.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 35 deletions(-) commit 5d4f4ea8fa2992eaf7040aab2f87e8dc849387fd Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:35 2025 +0900 nvmet: Add vendor_id and subsys_vendor_id subsystem attributes Define the new vendor_id and subsys_vendor_id configfs attribute for target subsystems. These attributes are respectively reported as the vid field and as the ssvid field of the identify controller data of a target controllers using the subsystem for which these attributes are set. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/admin-cmd.c | 5 ++--- drivers/nvme/target/configfs.c | 45 +++++++++++++++++++++++++++++++++++++++++ drivers/nvme/target/nvmet.h | 2 ++ 3 files changed, 49 insertions(+), 3 deletions(-) commit 30e77e0fbec6940ecc5c79ffe0f076c54cf5a8d9 Author: Damien Le Moal <dlemoal@kernel.org> Date: Sat Jan 4 13:59:34 2025 +0900 nvme: Move opcode string helper functions declarations Move the declaration of all helper functions converting NVMe command opcodes and status codes into strings from drivers/nvme/host/nvme.h into include/linux/nvme.h, together with the commands definitions. This allows NVMe target drivers to call these functions without having to include a host header file. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/host/nvme.h | 39 --------------------------------------- include/linux/nvme.h | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 39 deletions(-) commit 002bb02729dc7f5a9b356e98e672262ca432b861 Author: Yongsoo Joo <ysjoo@kookmin.ac.kr> Date: Mon Dec 23 01:05:17 2024 +0000 nvme: change return type of nvme_poll_cq() to bool The nvme_poll_cq() function currently returns the number of CQEs found, However, only one caller, nvme_poll(), requires a boolean value to check whether any CQE was completed. The other callers do not use the return value at all. To better reflect its usage, update the return type of nvme_poll_cq() from int to bool. Signed-off-by: Yongsoo Joo <ysjoo@kookmin.ac.kr> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/host/pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ac32057acc7f3d7a238dafaa9b2aa2bc9750080e Author: Keisuke Nishimura <keisuke.nishimura@inria.fr> Date: Fri Dec 20 13:00:47 2024 +0100 nvme: Add error check for xa_store in nvme_get_effects_log The xa_store() may fail due to memory allocation failure because there is no guarantee that the index csi is already used. This fix adds an error check of the return value of xa_store() in nvme_get_effects_log(). Fixes: 1cf7a12e09aa ("nvme: use an xarray to lookup the Commands Supported and Effects log") Signed-off-by: Keisuke Nishimura <keisuke.nishimura@inria.fr> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/host/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 32193789878c259e39b97bd0c0f2f0ccbe5cb8a8 Author: Sagi Grimberg <sagi@grimberg.me> Date: Sat Jan 4 23:27:11 2025 +0200 nvme-tcp: Fix I/O queue cpu spreading for multiple controllers Since day-1 we are assigning the queue io_cpu very naively. We always base the queue id (controller scope) and assign it its matching cpu from the online mask. This works fine when the number of queues match the number of cpu cores. The problem starts when we have less queues than cpu cores. First, we should take into account the mq_map and select a cpu within the cpus that are assigned to this queue by the mq_map in order to minimize cross numa cpu bouncing. Second, even worse is that we don't take into account multiple controllers may have assigned queues to a given cpu. As a result we may simply compund more and more queues on the same set of cpus, which is suboptimal. We fix this by introducing global per-cpu counters that tracks the number of queues assigned to each cpu, and we select the least used cpu based on the mq_map and the per-cpu counters, and assign it as the queue io_cpu. The behavior for a single controller is slightly optimized by selecting better cpu candidates by consulting with the mq_map, and multiple controllers are spreading queues among cpu cores much better, resulting in lower average cpu load, and less likelihood to hit hotspots. Note that the accounting is not 100% perfect, but we don't need to be, we're simply putting our best effort to select the best candidate cpu core that we find at any given point. Another byproduct is that every controller reset/reconnect may change the queues io_cpu mapping, based on the current LRU accounting scheme. Here is the baseline queue io_cpu assignment for 4 controllers, 2 queues per controller, and 4 cpus on the host: nvme1: queue 0: using cpu 0 nvme1: queue 1: using cpu 1 nvme2: queue 0: using cpu 0 nvme2: queue 1: using cpu 1 nvme3: queue 0: using cpu 0 nvme3: queue 1: using cpu 1 nvme4: queue 0: using cpu 0 nvme4: queue 1: using cpu 1 And this is the fixed io_cpu assignment: nvme1: queue 0: using cpu 0 nvme1: queue 1: using cpu 2 nvme2: queue 0: using cpu 1 nvme2: queue 1: using cpu 3 nvme3: queue 0: using cpu 0 nvme3: queue 1: using cpu 2 nvme4: queue 0: using cpu 1 nvme4: queue 1: using cpu 3 Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver") Suggested-by: Hannes Reinecke <hare@kernel.org> Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Christoph Hellwig <hch@lst.de> [fixed kbuild reported errors] Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/host/tcp.c | 70 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 13 deletions(-) commit 21520e74ba454c549f4f732d014f180f8c0c041c Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Jan 9 16:49:24 2025 -0800 net: hide the definition of dev_get_by_napi_id() There are no module callers of dev_get_by_napi_id(), and commit d1cacd747768 ("netdev: prevent accessing NAPI instances from another namespace") proves that getting NAPI by id needs to be done with care. So hide dev_get_by_napi_id(). Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Joe Damato <jdamato@fastly.com> Link: https://patch.msgid.link/20250110004924.3212260-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/linux/netdevice.h | 1 - net/core/dev.c | 2 -- net/core/dev.h | 1 + net/socket.c | 2 ++ 4 files changed, 3 insertions(+), 3 deletions(-) commit af3525d41001431e3d170214170dfe7dd73435b9 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Jan 9 16:45:04 2025 -0800 net: warn during dump if NAPI list is not sorted Dump continuation depends on the NAPI list being sorted. Broken netlink dump continuation may be rare and hard to debug so add a warning if we notice the potential problem while walking the list. Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Reviewed-by: Joe Damato <jdamato@fastly.com> Link: https://patch.msgid.link/20250110004505.3210140-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/core/netdev-genl.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 460b52835e60605cbb31710e8d290ee27b3e412b Author: Alexander Sverdlin <alexander.sverdlin@siemens.com> Date: Thu Jan 9 22:42:13 2025 +0100 net: ethernet: ti: cpsw: fix the comment regarding VLAN-aware ALE In all 3 cases (cpsw, cpsw-new, am65-cpsw) ALE is being configured in VLAN-aware mode, while the comment states the opposite. Seems to be a typo copy-pasted from one driver to another. Fix the commend which has been puzzling some people (including me) for at least a decade. Link: https://lore.kernel.org/linux-arm-kernel/4699400.vD3TdgH1nR@localhost/ Link: https://lore.kernel.org/netdev/0106ce78-c83f-4552-a234-1bf7a33f1ed1@kernel.org/ Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250109214219.123767-1-alexander.sverdlin@siemens.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +- drivers/net/ethernet/ti/cpsw.c | 2 +- drivers/net/ethernet/ti/cpsw_new.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 06cc8786516f65bf0171402bfc2a4db6818b380b Author: Sabrina Dubroca <sd@queasysnail.net> Date: Thu Jan 9 23:30:54 2025 +0100 tls: skip setting sk_write_space on rekey syzbot reported a problem when calling setsockopt(SO_SNDBUF) after a rekey. SO_SNDBUF calls sk_write_space, ie tls_write_space, which then calls the original socket's sk_write_space, saved in ctx->sk_write_space. Rekeys should skip re-assigning ctx->sk_write_space, so we don't end up with tls_write_space calling itself. Fixes: 47069594e67e ("tls: implement rekey for TLS1.3") Reported-by: syzbot+6ac73b3abf1b598863fa@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/676d231b.050a0220.2f3838.0461.GAE@google.com/ Tested-by: syzbot+6ac73b3abf1b598863fa@syzkaller.appspotmail.com Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Link: https://patch.msgid.link/ffdbe4de691d1c1eead556bbf42e33ae215304a7.1736436785.git.sd@queasysnail.net Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/tls/tls_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit b493f881aaa70ac63a448267bd447ad1eb2b16a1 Author: Li RongQing <lirongqing@baidu.com> Date: Thu Jan 9 19:10:57 2025 +0800 net: ethtool: Use hwprov under rcu_read_lock hwprov should be protected by rcu_read_lock to prevent possible UAF Fixes: 4c61d809cf60 ("net: ethtool: Fix suspicious rcu_dereference usage") Signed-off-by: Li RongQing <lirongqing@baidu.com> Acked-by: Kory Maincent <kory.maincent@bootlin.com> diff with v1: move and use err varialbe, instead of define a new variable net/ethtool/common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Link: https://patch.msgid.link/20250109111057.4746-1-lirongqing@baidu.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/ethtool/common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8d460ac783802170b8ab72a1ceb932c42d99cf0a Merge: 676cfca2bcea 08ac69b24507 Author: Jakub Kicinski <kuba@kernel.org> Date: Fri Jan 10 18:10:29 2025 -0800 Merge branch 'ipvlan-support-bonding-events' Etienne Champetier says: ==================== ipvlan: Support bonding events ==================== Link: https://patch.msgid.link/20250109032819.326528-1-champetier.etienne@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 08ac69b24507ab06871c18adc421c9d4f1008c61 Author: Etienne Champetier <champetier.etienne@gmail.com> Date: Wed Jan 8 22:28:19 2025 -0500 selftests: bonding: add ipvlan over bond testing This rework bond_macvlan.sh into bond_macvlan_ipvlan.sh We only test bridge mode for macvlan and l2 mode ]# ./bond_macvlan_ipvlan.sh TEST: active-backup/macvlan_bridge: IPv4: client->server [ OK ] ... TEST: active-backup/ipvlan_l2: IPv4: client->server [ OK ] ... TEST: balance-tlb/macvlan_bridge: IPv4: client->server [ OK ] ... TEST: balance-tlb/ipvlan_l2: IPv4: client->server [ OK ] ... TEST: balance-alb/macvlan_bridge: IPv4: client->server [ OK ] ... TEST: balance-alb/ipvlan_l2: IPv4: client->server [ OK ] ... Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com> Link: https://patch.msgid.link/20250109032819.326528-3-champetier.etienne@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../testing/selftests/drivers/net/bonding/Makefile | 2 +- .../selftests/drivers/net/bonding/bond_macvlan.sh | 99 ---------------------- .../drivers/net/bonding/bond_macvlan_ipvlan.sh | 96 +++++++++++++++++++++ tools/testing/selftests/drivers/net/bonding/config | 1 + 4 files changed, 98 insertions(+), 100 deletions(-) commit e79a98e68b96a94d6d997ddbfb92e3969bfa2dfb Author: Etienne Champetier <champetier.etienne@gmail.com> Date: Wed Jan 8 22:28:18 2025 -0500 ipvlan: Support bonding events This allows ipvlan to function properly on top of bonds using active-backup mode. This was implemented for macvlan in 2014 in commit 4c9912556867 ("macvlan: Support bonding events"). Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com> Link: https://patch.msgid.link/20250109032819.326528-2-champetier.etienne@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ipvlan/ipvlan_main.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 676cfca2bcea6629a25df08b60551d6d5b588f52 Merge: 7b24f164cf00 1655a2279971 Author: Jakub Kicinski <kuba@kernel.org> Date: Fri Jan 10 17:51:04 2025 -0800 Merge branch 'net-stmmac-clean-up-and-fix-eee-implementation' Russell King says: ==================== net: stmmac: clean up and fix EEE implementation This is a rework of stmmac's EEE support in light of the addition of EEE management to phylib. It's slightly more than 15 patches, but I think it makes sense to be so. Patch 1 adds configuration of the receive clock phy_eee_rx_clock_stop() (which was part of another series, but is necessary for this patch set.) Patch 2 converts stmmac to use phylib's tracking of tx_lpi_timer. Patch 3 corrects the data type used for things involving the LPI timer. The user API uses u32, so stmmac should do too, rather than blindly converting it to "int". eee_timer is left for patch 4. Patch 4 (new) uses an unsigned int for eee_timer. Patch 5 makes stmmac EEE state depend on phylib's enable_tx_lpi flag, thus using phylib's resolution of EEE state. Patch 6 removes redundant code from the ethtool EEE operations. Patch 7 removes some redundant code in stmmac_disable_eee_mode() and renames it to stmmac_disable_sw_eee_mode() to better reflect its purpose. Patch 8 removes the driver private tx_lpi_enabled, which is managed by phylib since patch 4. Patch 9 removes the dependence of EEE error statistics on the EEE enable state, instead depending on whether EEE is supported by the hardware. Patch 10 removes phy_init_eee(), instead using phy_eee_rx_clock_stop() to configure whether the PHY may stop the receive clock. Patch 11 removes priv->eee_tw_timer, which is only ever set to one value at probe time, effectively it is a constant. Hence this is unnecessary complexity. Patch 12 moves priv->eee_enabled into stmmac_eee_init(), and placing it under the protection of priv->lock, except when EEE is not supported (where it becomes constant-false.) Patch 13 moves priv->eee_active also into stmmac_eee_init(), so the indication whether EEE should be enabled or not is passed in to this function. Since both priv->eee_enabled and priv->eee_active are assigned true/false values, they should be typed "bool". Make it sew in patch 14. No Singer machine required. Patch 15 moves the initialisation of priv->eee_ctrl_timer to the probe function - it makes no sense to re-initialise the timer each time we want to start using it. Patch 16 removes the unnecessary EEE handling in the driver tear-down method. The core net code will have brought the interface down already, meaning EEE has already been disabled. Patch 17 reorganises the code to split the hardware LPI timer control paths from the software LPI timer paths. Patch 18 works on this further by eliminating stmmac_lpi_entry_timer_config() and making direct calls to the new functions. This reveals a potential bug where priv->eee_sw_timer_en is set true when EEE is disabled. This is not addressed in this series, but will be in a future separate patch - so that if fixing that causes a regression, it can be handled separately. ==================== Link: https://patch.msgid.link/Z36sHIlnExQBuFJE@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 1655a2279971c6f8195b52695fe92bad9aec365c Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:49:00 2025 +0000 net: stmmac: remove stmmac_lpi_entry_timer_config() Remove stmmac_lpi_entry_timer_config(), setting priv->eee_sw_timer_en at the original call sites, and calling the appropriate stmmac_xxx_hw_lpi_timer() function. No functional change. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZEq-0002LQ-PC@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 17f47da103a6a12a3d4ab5db9245435d7f49b174 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:48:55 2025 +0000 net: stmmac: split hardware LPI timer control Provide stmmac_disable_hw_lpi_timer() and stmmac_enable_hw_lpi_timer() to control the hardware transmit LPI timer. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZEl-0002LK-LA@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 27af08164247dfbe4371ee485366b851232e80e5 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:48:50 2025 +0000 net: stmmac: remove unnecessary EEE handling in stmmac_release() phylink_stop() will cause phylink to call the mac_link_down() operation before phylink_stop() returns. As mac_link_down() will call stmmac_eee_init(false), this will set both priv->eee_active and priv->eee_enabled to be false, deleting the eee_ctrl_timer if priv->eee_enabled was previously set. As stmmac_release() calls phylink_stop() before checking whether priv->eee_enabled is true, this is a condition that can never be satisfied, and thus the code within this if() block will never be executed. Remove it. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZEg-0002LE-HH@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 ----- 1 file changed, 5 deletions(-) commit 84f2776e391943ccae074f5232e54799f36ce73b Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:48:45 2025 +0000 net: stmmac: move setup of eee_ctrl_timer to stmmac_dvr_probe() Move the initialisation of the EEE software timer to the probe function as it is unnecessary to do this each time we enable software LPI. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZEb-0002L8-DJ@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cfd49e5fc30ce96cbaa220406db373cf9565dbe2 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:48:40 2025 +0000 net: stmmac: use boolean for eee_enabled and eee_active priv->eee_enabled and priv->eee_active are both assigned using boolean values. Type them as bool rather than int. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZEW-0002L2-9w@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1797dd4e3e8ee6d7e55b46630454887595a972a5 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:48:35 2025 +0000 net: stmmac: move priv->eee_active into stmmac_eee_init() Since all call sites of stmmac_eee_init() assign priv->eee_active immediately before, pass this state into stmmac_eee_init() and assign priv->eee_active within this function. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZER-0002Kv-5O@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 0a900ea89a0cdf2a09e987663192ab5e0a28544e Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:48:30 2025 +0000 net: stmmac: move priv->eee_enabled into stmmac_eee_init() All call sites for stmmac_eee_init() assign the return code to priv->eee_enabled. Rather than having this coded at each call site, move the assignment inside stmmac_eee_init(). Since stmmac_init_eee() takes priv->lock before checking the state of priv->eee_enabled, move the assignment within the locked region. Also, stmmac_suspend() checks the state of this member under the lock. While two concurrent calls to stmmac_init_eee() aren't possible, there is a possibility that stmmac_suspend() may run concurrently with a change of priv->eee_enabled unless we modify it under the lock. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZEM-0002Kq-2Z@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 2914a5cd811ac0f4e7c3b5db5a5d43041636f8dc Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:48:24 2025 +0000 net: stmmac: remove priv->eee_tw_timer priv->eee_tw_timer is only assigned during initialisation to a constant value (STMMAC_DEFAULT_TWT_LS) and then never changed. Remove priv->eee_tw_timer, and instead use STMMAC_DEFAULT_TWT_LS for both uses in stmmac_eee_init(). Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZEG-0002Kk-VH@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 - drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 9 +++------ 2 files changed, 3 insertions(+), 7 deletions(-) commit a3242177d9f215e5d13e69fdb279a5ce2237ba84 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:48:19 2025 +0000 net: stmmac: convert to use phy_eee_rx_clock_stop() Convert stmmac to use phy_eee_rx_clock_stop() to set the PHY receive clock stop in LPI setting, rather than calling the legacy phy_init_eee() function. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZEB-0002Ke-RZ@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 517dc0450675f1bc16a805e6dfe16129ada88e6c Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:48:14 2025 +0000 net: stmmac: report EEE error statistics if EEE is supported Report the number of EEE error statistics in the xstats even when EEE is not enabled in hardware, but is supported. The PHY maintains this counter even when EEE is not enabled. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZE6-0002KY-Nx@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 865ff410a071c61061c244a599a36058e65ebbff Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:48:09 2025 +0000 net: stmmac: remove priv->tx_lpi_enabled Through using phylib's EEE state, priv->tx_lpi_enabled has become a write-only variable. Remove it. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZE1-0002KS-K1@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 - drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 -- 2 files changed, 3 deletions(-) commit e40dd46d2fc587ef9d9b3b7e640e81187263f240 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:48:04 2025 +0000 net: stmmac: clean up stmmac_disable_eee_mode() stmmac_disable_eee_mode() is now only called from stmmac_xmit() when both priv->tx_path_in_lpi_mode and priv->eee_sw_timer_en are true. Therefore: if (!priv->eee_sw_timer_en) in stmmac_disable_eee_mode() will never be true, so this is dead code. Remove it, and rename the function to indicate that it now only deals with software based EEE mode. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZDw-0002KL-Gg@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 80fada6c0d3efc4c55eaef187a4041d30c31e568 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:47:59 2025 +0000 net: stmmac: remove redundant code from ethtool EEE ops Setting edata->tx_lpi_enabled in stmmac_ethtool_op_get_eee() gets overwritten by phylib, so there's no point setting this. In stmmac_ethtool_op_set_eee(), now that stmmac is using the result of phylib's evaluation of EEE, there is no need to handle anything in the ethtool EEE ops other than calling through to the appropriate phylink function, which will pass on to phylib the users request. As stmmac_disable_eee_mode() is now no longer called from outside stmmac_main.c, make it static. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZDr-0002KF-Cv@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 - drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 9 --------- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 3 files changed, 1 insertion(+), 11 deletions(-) commit beb1e0148e6da2534113245cebdfcbb2381b6bca Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:47:54 2025 +0000 net: stmmac: make EEE depend on phy->enable_tx_lpi Make stmmac EEE depend on phylib's evaluation of user settings and PHY negotiation, as indicated by phy->enable_tx_lpi. This will ensure when phylib has evaluated that the user has disabled LPI, phy_init_eee() will not be called, and priv->eee_active will be false, causing LPI/EEE to be disabled. This is an interim measure - phy_init_eee() will be removed in a later patch. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZDm-0002K9-9w@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e19a351b22d585086d16cbc6ea7c613fb12e2da Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:47:49 2025 +0000 net: stmmac: use unsigned int for eee_timer Since eee_timer is used to initialise priv->tx_lpi_timer, this also should be unsigned to avoid a negative number being interpreted as a very large positive number. Note that this makes the check for negative numbers passed in as a module parameter redundant, and passing a negative number will now produce a large delay rather than the default. Since the default is used without an argument, passing a negative number would be quite obscure. However, if users do, then this will need to be revisited. Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZDh-0002K3-6y@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit bba9f4765515d45b3fd71ebf4a622e830b412f45 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:47:44 2025 +0000 net: stmmac: use correct type for tx_lpi_timer The ethtool interface uses u32 for tx_lpi_timer, and so does phylib. Use u32 to store this internally within stmmac rather than "int" which could misinterpret large values. Correct "value" in dwmac4_set_eee_lpi_entry_timer() to use u32 rather than int, which is derived from tx_lpi_timer. Even though this path won't be used with values larger than STMMAC_ET_MAX, this brings consistency of type usage to the stmmac code for this variable. We leave eee_timer unchanged for now, with the assumption that values up to INT_MAX will safely fit in a u32. Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZDc-0002Jx-3b@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 4 ++-- drivers/net/ethernet/stmicro/stmmac/hwif.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) commit 1991819debaa22ee75f4163f3b17f9e545f3ae98 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:47:38 2025 +0000 net: stmmac: move tx_lpi_timer tracking to phylib When stmmac_ethtool_op_get_eee() is called, stmmac sets the tx_lpi_timer and tx_lpi_enabled members, and then calls into phylink and thus phylib. phylib overwrites these members. phylib will also cause a link down/link up transition when settings that impact the MAC have been changed. Convert stmmac to use the tx_lpi_timer setting in struct phy_device, updating priv->tx_lpi_timer each time when the link comes up, rather than trying to maintain this user setting itself. We initialise the phylib tx_lpi_timer setting by doing a get_ee-modify-set_eee sequence with the last known priv->tx_lpi_timer value. In order for this to work correctly, we also need this member to be initialised earlier. As stmmac_eee_init() is no longer called outside of stmmac_main.c, make it static. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZDW-0002Jr-W3@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 - .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 14 +------------- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 21 ++++++++++++++++----- 3 files changed, 17 insertions(+), 19 deletions(-) commit cf337105ad38564d7855151889a7315da73119d0 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Wed Jan 8 16:47:33 2025 +0000 net: phy: add configuration of rx clock stop mode Add a function to allow configuration of the PCS's clock stop enable bit, used to configure whether the xMII receive clock can be stopped during LPI mode. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZDR-0002Jl-Ry@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phy.c | 27 ++++++++++++++++++++++----- include/linux/phy.h | 1 + 2 files changed, 23 insertions(+), 5 deletions(-) commit be339ddf9e393f5da78a71ae6c2a407fdc04d6be Merge: 95ad526edebc 3e99fa9fab19 Author: Martin KaFai Lau <martin.lau@kernel.org> Date: Fri Jan 10 16:04:09 2025 -0800 Merge branch 'selftests-bpf-migrate-test_xdp_redirect-sh-to-test_progs' Bastien Curutchet says: ==================== This patch series continues the work to migrate the *.sh tests into prog_tests. test_xdp_redirect.sh tests the XDP redirections done through bpf_redirect(). These XDP redirections are already tested by prog_tests/xdp_do_redirect.c but IMO it doesn't cover the exact same code path because xdp_do_redirect.c uses bpf_prog_test_run_opts() to trigger redirections of 'fake packets' while test_xdp_redirect.sh redirects packets coming from the network. Also, the test_xdp_redirect.sh script tests the redirections with both SKB and DRV modes while xdp_do_redirect.c only tests the DRV mode. The patch series adds two new test cases in prog_tests/xdp_do_redirect.c to replace the test_xdp_redirect.sh script. ==================== Link: https://patch.msgid.link/20250110-xdp_redirect-v2-0-b8f3ae53e894@bootlin.com Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> commit 3e99fa9fab1951400599cf67abb11a9c90564e48 Author: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com> Date: Fri Jan 10 10:21:11 2025 +0100 selftests/bpf: Migrate test_xdp_redirect.c to test_xdp_do_redirect.c prog_tests/xdp_do_redirect.c is the only user of the BPF programs located in progs/test_xdp_do_redirect.c and progs/test_xdp_redirect.c. There is no need to keep both files with such close names. Move test_xdp_redirect.c contents to test_xdp_do_redirect.c and remove progs/test_xdp_redirect.c Signed-off-by: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://patch.msgid.link/20250110-xdp_redirect-v2-3-b8f3ae53e894@bootlin.com .../selftests/bpf/prog_tests/xdp_do_redirect.c | 7 +++--- .../selftests/bpf/progs/test_xdp_do_redirect.c | 12 ++++++++++ .../selftests/bpf/progs/test_xdp_redirect.c | 26 ---------------------- 3 files changed, 15 insertions(+), 30 deletions(-) commit a94df601091ffcee576925973b51ce8838851d26 Author: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com> Date: Fri Jan 10 10:21:10 2025 +0100 selftests/bpf: Migrate test_xdp_redirect.sh to xdp_do_redirect.c test_xdp_redirect.sh can't be used by the BPF CI. Migrate test_xdp_redirect.sh into a new test case in xdp_do_redirect.c. It uses the same network topology and the same BPF programs located in progs/test_xdp_redirect.c and progs/xdp_dummy.c. Remove test_xdp_redirect.sh and its Makefile entry. Signed-off-by: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://patch.msgid.link/20250110-xdp_redirect-v2-2-b8f3ae53e894@bootlin.com tools/testing/selftests/bpf/Makefile | 1 - .../selftests/bpf/prog_tests/xdp_do_redirect.c | 165 +++++++++++++++++++++ tools/testing/selftests/bpf/test_xdp_redirect.sh | 79 ---------- 3 files changed, 165 insertions(+), 80 deletions(-) commit 2c6c5c7c1ad18761c399ef3376f5320eb13f92eb Author: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com> Date: Fri Jan 10 10:21:09 2025 +0100 selftests/bpf: test_xdp_redirect: Rename BPF sections SEC("redirect_to_111") and SEC("redirect_to_222") can't be loaded by the __load() helper. Rename both sections SEC("xdp") so it can be interpreted by the __load() helper in upcoming patch. Update the test_xdp_redirect.sh to use the program name instead of the section name to load the BPF program. Signed-off-by: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Reviewed-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Link: https://patch.msgid.link/20250110-xdp_redirect-v2-1-b8f3ae53e894@bootlin.com tools/testing/selftests/bpf/progs/test_xdp_redirect.c | 4 ++-- tools/testing/selftests/bpf/test_xdp_redirect.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 94d57442e56d2ad2ca20d096040b8ae6f216a921 Author: Anuj Gupta <anuj20.g@samsung.com> Date: Thu Dec 5 11:51:09 2024 +0530 io_uring: expose read/write attribute capability After commit 9a213d3b80c0, we can pass additional attributes along with read/write. However, userspace doesn't know that. Add a new feature flag IORING_FEAT_RW_ATTR, to notify the userspace that the kernel has this ability. Signed-off-by: Anuj Gupta <anuj20.g@samsung.com> Reviewed-by: Li Zetao <lizetao1@huawei.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Tested-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/20241205062109.1788-1-anuj20.g@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk> include/uapi/linux/io_uring.h | 1 + io_uring/io_uring.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 8697934682f1873b7b1cb9cc61b81edf042c9272 Author: Arun Easi <aeasi@cisco.com> Date: Fri Jan 10 01:19:56 2025 -0800 scsi: fnic: Propagate SCSI error code from fnic_scsi_drv_init() Propagate scsi_add_host() error instead of returning -1. Suggested-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Signed-off-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20250110091956.17749-1-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fnic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54428671aac88dd11074c47cb7e7726e41d40f4a Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Fri Jan 10 01:19:24 2025 -0800 scsi: fnic: Test for memory allocation failure and return error code Fix kernel test robot warning. Test for memory allocation failure, and free memory for queues allocated in a multiqueue and non-multiqueue scenario. Return appropriate error code. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/r/202412312347.FE4ZgEoM-lkp@intel.com/ Reported-by: Julia Lawall <julia.lawall@inria.fr> Closes: https://lore.kernel.org/r/202412312347.FE4ZgEoM-lkp@intel.com/ Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Reviewed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20250110091924.17729-1-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fnic_main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 3986001ca11ec630d631467d788aac513c61cb52 Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Fri Jan 10 01:18:42 2025 -0800 scsi: fnic: Return appropriate error code from failure of scsi drv init Return appropriate error code from fnic_probe caused by failure of fnic_scsi_drv_init. Fix bug report. Suggested-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Reviewed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20250110091842.17711-1-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fnic_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7dbe3aa2f3f83949174b64860dadfaeec3454cff Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Fri Jan 10 01:17:46 2025 -0800 scsi: fnic: Return appropriate error code for mem alloc failure Return appropriate error code from fnic_probe when memory create slab pool fails. Fix bug report. Suggested-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Reviewed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20250110091746.17671-1-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fnic_main.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 0620efe789a73586b5b3ed38b27d1b69b2150958 Author: Arun Easi <aeasi@cisco.com> Date: Fri Jan 10 01:16:55 2025 -0800 scsi: fnic: Remove always-true IS_FNIC_FCP_INITIATOR macro IS_FNIC_FCP_INITIATOR macro is not applicable at this time. Delete the macro. Suggested-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Signed-off-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20250110091655.17643-1-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fdls_disc.c | 85 +++++++++++++++++-------------------------- drivers/scsi/fnic/fnic.h | 2 - drivers/scsi/fnic/fnic_main.c | 14 +++---- 3 files changed, 39 insertions(+), 62 deletions(-) commit 8ccc5947f5d1608f7217cdbee532c7fc2431f7c9 Author: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com> Date: Wed Jan 8 10:39:16 2025 +0530 scsi: fnic: Fix use of uninitialized value in debug message The oxid variable in fdls_process_abts_req() was only being initialized inside the if (tport) block, but was being used in a debug print statement after that block. If tport was NULL, oxid would remain uninitialized. Move the oxid initialization to happen at declaration using FNIC_STD_GET_OX_ID(fchdr). Fixes: f828af44b8dd ("scsi: fnic: Add support for unsolicited requests and responses") Closes: https://scan7.scan.coverity.com/#/project-view/52337/11354?selectedIssue=1602772 Signed-off-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com> Link: https://lore.kernel.org/r/20250108050916.52721-1-dheeraj.linuxdev@gmail.com Reviewed-by: Karan Tilak Kumar <kartilak@cisco.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fdls_disc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 17789f8a5b81356fc83cf20de899fc351679574e Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Tue Jan 7 16:35:19 2025 +0300 scsi: fnic: Delete incorrect debugfs error handling Debugfs functions are not supposed to require error checking and, in fact, adding checks would normally lead to the driver refusing to load when CONFIG_DEBUGFS is disabled. What saves us here is that this code checks for NULL instead of error pointers so the error checking is all dead code. Delete it. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/a5c237cd-449b-4f9d-bcff-6285fb7c28d1@stanley.mountain Reviewed-by: Karan Tilak Kumar <kartilak@cisco.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fnic_debugfs.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) commit bab8551e33f7f5e8743ccb49be41fe3228178e8a Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Mon Jan 6 14:44:51 2025 -0800 scsi: fnic: Remove unnecessary else to fix warning in FDLS FIP Implement review comments from Martin: Remove unnecessary else from fip.c to fix a warning. Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Reviewed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20250106224451.3597-3-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fip.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 6cfba11510d6f4d0e863fc0fa939c7a983cf13bd Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Mon Jan 6 14:44:50 2025 -0800 scsi: fnic: Remove extern definition from .c files Implement review comments from Martin: Remove extern definition of fnic_fip_queue from .c files Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Reviewed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20250106224451.3597-2-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fip.c | 2 -- drivers/scsi/fnic/fip.h | 2 ++ drivers/scsi/fnic/fnic_fcs.c | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) commit 5b6179d4b661e3c22ffa5f3fe2523bad4cd01983 Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Mon Jan 6 14:44:49 2025 -0800 scsi: fnic: Remove unnecessary else and unnecessary break in FDLS Incorporate review comments from Martin: Remove unnecessary else and unnecessary break to fix warnings in the FDLS code. Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Reviewed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20250106224451.3597-1-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fdls_disc.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 295006f6e8c17212d3098811166e29627d19e05c Author: Guixin Liu <kanie@linux.alibaba.com> Date: Tue Jan 7 10:20:32 2025 +0800 scsi: mpi3mr: Fix possible crash when setting up bsg fails If bsg_setup_queue() fails, the bsg_queue is assigned a non-NULL value. Consequently, in mpi3mr_bsg_exit(), the condition "if(!mrioc->bsg_queue)" will not be satisfied, preventing execution from entering bsg_remove_queue(), which could lead to the following crash: BUG: kernel NULL pointer dereference, address: 000000000000041c Call Trace: <TASK> mpi3mr_bsg_exit+0x1f/0x50 [mpi3mr] mpi3mr_remove+0x6f/0x340 [mpi3mr] pci_device_remove+0x3f/0xb0 device_release_driver_internal+0x19d/0x220 unbind_store+0xa4/0xb0 kernfs_fop_write_iter+0x11f/0x200 vfs_write+0x1fc/0x3e0 ksys_write+0x67/0xe0 do_syscall_64+0x38/0x80 entry_SYSCALL_64_after_hwframe+0x78/0xe2 Fixes: 4268fa751365 ("scsi: mpi3mr: Add bsg device support") Signed-off-by: Guixin Liu <kanie@linux.alibaba.com> Link: https://lore.kernel.org/r/20250107022032.24006-1-kanie@linux.alibaba.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/mpi3mr/mpi3mr_app.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1e95c798d8a7f70965f0f88d4657b682ff0ec75f Author: Guixin Liu <kanie@linux.alibaba.com> Date: Wed Dec 18 09:42:14 2024 +0800 scsi: ufs: bsg: Set bsg_queue to NULL after removal Currently, this does not cause any issues, but I believe it is necessary to set bsg_queue to NULL after removing it to prevent potential use-after-free (UAF) access. Signed-off-by: Guixin Liu <kanie@linux.alibaba.com> Link: https://lore.kernel.org/r/20241218014214.64533-3-kanie@linux.alibaba.com Reviewed-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/ufs/core/ufs_bsg.c | 1 + 1 file changed, 1 insertion(+) commit fcf247deb3c3e1c6be5774e3fa03bbd018eff1a9 Author: Guixin Liu <kanie@linux.alibaba.com> Date: Wed Dec 18 09:42:13 2024 +0800 scsi: ufs: bsg: Delete bsg_dev when setting up bsg fails We should remove the bsg device when bsg_setup_queue() fails to release the resources. Fixes: df032bf27a41 ("scsi: ufs: Add a bsg endpoint that supports UPIUs") Signed-off-by: Guixin Liu <kanie@linux.alibaba.com> Link: https://lore.kernel.org/r/20241218014214.64533-2-kanie@linux.alibaba.com Reviewed-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/ufs/core/ufs_bsg.c | 1 + 1 file changed, 1 insertion(+) commit 98b37881b7492ae9048ad48260cc8a6ee9eb39fd Author: Kai Mäkisara <Kai.Makisara@kolumbus.fi> Date: Mon Dec 16 13:37:55 2024 +0200 scsi: st: Don't set pos_unknown just after device recognition Commit 9604eea5bd3a ("scsi: st: Add third party poweron reset handling") in v6.6 added new code to handle the Power On/Reset Unit Attention (POR UA) sense data. This was in addition to the existing method. When this Unit Attention is received, the driver blocks attempts to read, write and some other operations because the reset may have rewinded the tape. Because of the added code, also the initial POR UA resulted in blocking operations, including those that are used to set the driver options after the device is recognized. Also, reading and writing are refused, whereas they succeeded before this commit. Add code to not set pos_unknown to block operations if the POR UA is received from the first test_ready() call after the st device has been created. This restores the behavior before v6.6. Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi> Link: https://lore.kernel.org/r/20241216113755.30415-1-Kai.Makisara@kolumbus.fi Fixes: 9604eea5bd3a ("scsi: st: Add third party poweron reset handling") CC: stable@vger.kernel.org Closes: https://lore.kernel.org/linux-scsi/2201CF73-4795-4D3B-9A79-6EE5215CF58D@kolumbus.fi/ Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/st.c | 6 ++++++ drivers/scsi/st.h | 1 + 2 files changed, 7 insertions(+) commit 77a4157ac75c67d1793c972f172dae215ccc75ad Author: wangdicheng <wangdicheng@kylinos.cn> Date: Fri Dec 6 15:19:26 2024 +0800 scsi: aic7xxx: Fix build 'aicasm' warning When building with CONFIG_AIC7XXX_BUILD_FIRMWARE=y or CONFIG_AIC79XX_BUILD_FIRMWARE=y, the warning messages are as follows: aicasm_gram.tab.c:1722:16: warning: implicit declaration of function ‘yylex’ [-Wimplicit-function-declaration] aicasm_macro_gram.c:68:25: warning: implicit declaration of function ‘mmlex’ [-Wimplicit-function-declaration] aicasm_scan.l:417:6: warning: implicit declaration of function ‘mm_switch_to_buffer’ aicasm_scan.l:418:6: warning: implicit declaration of function ‘mmparse’ aicasm_scan.l:421:6: warning: implicit declaration of function ‘mm_delete_buffer’ The solution is to add the corresponding function declaration to the corresponding file. Signed-off-by: wangdicheng <wangdicheng@kylinos.cn> Signed-off-by: huanglei <huanglei@kylinos.cn> Link: https://lore.kernel.org/r/20241206071926.63832-1-wangdich9700@163.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/aic7xxx/aicasm/aicasm_gram.y | 1 + drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y | 1 + drivers/scsi/aic7xxx/aicasm/aicasm_scan.l | 3 +++ 3 files changed, 5 insertions(+) commit a72eaa175656836a32e94004ea05598409e2f2fd Author: Dmitry Antipov <dmantipov@yandex.ru> Date: Thu Jan 9 11:07:03 2025 +0300 wifi: ath9k: cleanup ath9k_hw_get_nf_hist_mid() In 'ath9k_hw_get_nf_hist_mid()', prefer 'memcpy()' and 'sort()' over an ad-hoc things. Briefly tested as a separate module. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk> Link: https://patch.msgid.link/20250109080703.106692-1-dmantipov@yandex.ru Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath9k/calib.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 95ad526edebcb3a68429315c81024ffc4ec0980a Author: Daniel Xu <dxu@dxuuu.xyz> Date: Thu Jan 9 16:42:29 2025 -0700 veristat: Document verifier log dumping capability `-vl2` is a useful combination of flags to dump the entire verification log. This is helpful when making changes to the verifier, as you can see what it thinks program one instruction at a time. This was more or less a hidden feature before. Document it so others can discover it. Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/d57bbcca81e06ae8dcdadaedb99a48dced67e422.1736466129.git.dxu@dxuuu.xyz tools/testing/selftests/bpf/veristat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit defac894af93cb347fae0520fe8f14ca36f6fe87 Author: Christoph Werle <christoph.werle@longjmp.de> Date: Wed Jan 8 23:09:37 2025 +0100 bpftool: Fix control flow graph segfault during edge creation If the last instruction of a control flow graph building block is a BPF_CALL, an incorrect edge with e->dst set to NULL is created and results in a segfault during graph output. Ensure that BPF_CALL as last instruction of a building block is handled correctly and only generates a single edge unlike actual BPF_JUMP* instructions. Signed-off-by: Christoph Werle <christoph.werle@longjmp.de> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Tested-by: Quentin Monnet <qmo@kernel.org> Reviewed-by: Quentin Monnet <qmo@kernel.org> Link: https://lore.kernel.org/bpf/20250108220937.1470029-1-christoph.werle@longjmp.de tools/bpf/bpftool/cfg.c | 1 + 1 file changed, 1 insertion(+) commit 815940bb7db7b37d058d76a575827287eebe39ce Author: Avri Altman <avri.altman@wdc.com> Date: Fri Jan 3 10:02:04 2025 +0200 scsi: Revert "scsi: ufs: core: Probe for EXT_IID support" This reverts commit 6e1d850acff9477ae4c18a73c19ef52841ac2010. Although added a while ago, to date no one make use of ext_iid, specifically incorporates it in the upiu header. Therefore, remove it as it is currently unused and not serving any purpose. Signed-off-by: Avri Altman <avri.altman@wdc.com> Link: https://lore.kernel.org/r/20250103080204.63951-1-avri.altman@wdc.com Cc: Can Guo <quic_cang@quicinc.com> Cc: Asutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/ufs/core/ufshcd.c | 33 --------------------------------- include/ufs/ufs.h | 5 ----- include/ufs/ufshcd.h | 2 -- include/ufs/ufshci.h | 5 ----- 4 files changed, 45 deletions(-) commit d2138eab8cde61e0e6f62d0713e45202e8457d6d Author: Easwar Hariharan <eahariha@linux.microsoft.com> Date: Tue Jan 7 17:28:40 2025 +0000 scsi: storvsc: Ratelimit warning logs to prevent VM denial of service If there's a persistent error in the hypervisor, the SCSI warning for failed I/O can flood the kernel log and max out CPU utilization, preventing troubleshooting from the VM side. Ratelimit the warning so it doesn't DoS the VM. Closes: https://github.com/microsoft/WSL/issues/9173 Signed-off-by: Easwar Hariharan <eahariha@linux.microsoft.com> Link: https://lore.kernel.org/r/20250107-eahariha-ratelimit-storvsc-v1-1-7fc193d1f2b0@linux.microsoft.com Reviewed-by: Michael Kelley <mhklinux@outlook.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/storvsc_drv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 37d061e1ace17a376eda34b10dde28b144296534 Author: John Garry <john.g.garry@oracle.com> Date: Tue Jan 7 15:33:25 2025 +0000 scsi: scsi_debug: Constify sdebug_driver_template It's better to have sdebug_driver_template as const, so update the probe path to set the shost members directly after allocation and make that change. Signed-off-by: John Garry <john.g.garry@oracle.com> Link: https://lore.kernel.org/r/20250107153325.1689432-1-john.g.garry@oracle.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_debug.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 39388d53c57be95eafb0ce1d81d0ec6bd2f6f42d Merge: f6001870edea dfe6aa163c3b Author: Dave Airlie <airlied@redhat.com> Date: Sat Jan 11 07:20:22 2025 +1000 Merge tag 'cgroup-dmem-drm-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-next DMEM cgroup pull request This introduces a new cgroup controller to limit the device memory. Notable users would be DRM, dma-buf heaps, or v4l2. This pull request is based on the series developped by Maarten Lankhorst, Friedrich Vock, and I: https://lore.kernel.org/all/20241204134410.1161769-1-dev@lankhorst.se/ Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <mripard@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250110-cryptic-warm-mandrill-b71f5d@houat commit c3a8b2bfda3c70b43d1bb637ceaf99621d6776d9 Merge: 9d89551994a4 8d097444982d Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Fri Jan 10 22:17:31 2025 +0100 Merge tag 'linux-cpupower-6.14-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shuah/linux Merge cpupower utility updates for 6.14 from Shuah Khan: "Several fixes, cleanups and AMD support enhancements: - fix TSC MHz calculation - Add install and uninstall options to bindings makefile - Add header changes for cpufreq.h to SWIG bindings - selftests/cpufreq: gitignore output files and clean them in make clean - Remove spurious return statement - Add support for parsing 'enabled' or 'disabled' strings from table - Add support for amd-pstate preferred core rankings - Don't try to read frequency from hardware when kernel uses aperf mperf - Add support for showing energy performance preference - Don't fetch maximum latency when EPP is enabled - Adjust whitespace for amd-pstate specific prints - Fix cross compilation - revise is_valid flag handling for idle_monitor" * tag 'linux-cpupower-6.14-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shuah/linux: pm: cpupower: Add header changes for cpufreq.h to SWIG bindings pm: cpupower: Add install and uninstall options to bindings makefile cpupower: Adjust whitespace for amd-pstate specific prints cpupower: Don't fetch maximum latency when EPP is enabled cpupower: Add support for showing energy performance preference cpupower: Don't try to read frequency from hardware when kernel uses aperfmperf cpupower: Add support for amd-pstate preferred core rankings cpupower: Add support for parsing 'enabled' or 'disabled' strings from table cpupower: Remove spurious return statement cpupower: fix TSC MHz calculation cpupower: revise is_valid flag handling for idle_monitor pm: cpupower: Makefile: Fix cross compilation selftests/cpufreq: gitignore output files and clean them in make clean commit a43796b5201270b258b7a418c41816ec03393ce5 Author: Yonghong Song <yonghong.song@linux.dev> Date: Thu Jan 9 09:40:28 2025 -0800 selftests/bpf: Add a test for kprobe multi with unique_match Add a kprobe multi subtest to test kprobe multi unique_match option. Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20250109174028.3368967-1-yonghong.song@linux.dev .../selftests/bpf/prog_tests/kprobe_multi_test.c | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit e2b0bda62d549d9dcbc11f5371c6a41c8c4f54b0 Author: Yonghong Song <yonghong.song@linux.dev> Date: Thu Jan 9 09:40:23 2025 -0800 libbpf: Add unique_match option for multi kprobe Jordan reported an issue in Meta production environment where func try_to_wake_up() is renamed to try_to_wake_up.llvm.<hash>() by clang compiler at lto mode. The original 'kprobe/try_to_wake_up' does not work any more since try_to_wake_up() does not match the actual func name in /proc/kallsyms. There are a couple of ways to resolve this issue. For example, in attach_kprobe(), we could do lookup in /proc/kallsyms so try_to_wake_up() can be replaced by try_to_wake_up.llvm.<hach>(). Or we can force users to use bpf_program__attach_kprobe() where they need to lookup /proc/kallsyms to find out try_to_wake_up.llvm.<hach>(). But these two approaches requires extra work by either libbpf or user. Luckily, suggested by Andrii, multi kprobe already supports wildcard ('*') for symbol matching. In the above example, 'try_to_wake_up*' can match to try_to_wake_up() or try_to_wake_up.llvm.<hash>() and this allows bpf prog works for different kernels as some kernels may have try_to_wake_up() and some others may have try_to_wake_up.llvm.<hash>(). The original intention is to kprobe try_to_wake_up() only, so an optional field unique_match is added to struct bpf_kprobe_multi_opts. If the field is set to true, the number of matched functions must be one. Otherwise, the attachment will fail. In the above case, multi kprobe with 'try_to_wake_up*' and unique_match preserves user functionality. Reported-by: Jordan Rome <linux@jordanrome.com> Suggested-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20250109174023.3368432-1-yonghong.song@linux.dev tools/lib/bpf/libbpf.c | 13 ++++++++++++- tools/lib/bpf/libbpf.h | 4 +++- 2 files changed, 15 insertions(+), 2 deletions(-) commit 8bf10dfd7d0d8c0e6cdda176c461b3c5eba022ca Merge: d102c6d589c2 3b2f56860b05 Author: Martin K. Petersen <martin.petersen@oracle.com> Date: Fri Jan 10 15:20:30 2025 -0500 Merge branch '6.13/scsi-fixes' into 6.14/scsi-staging Pull in fixes branch to resolve merge conflict in ufs-qcom.c. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> commit d102c6d589c29c220fd11808381df11a4501647f Author: Randy Dunlap <rdunlap@infradead.org> Date: Sat Dec 21 13:25:39 2024 -0800 scsi: documentation: Corrections for struct updates Update scsi_mid_low_api.rst for changes to struct scsi_host and struct scsi_cmnd. struct scsi_host: - no_async_abort is gone - drop sh_list w/ no replacement - change my_devices to __devices struct scsi_cmnd: - removed 'done' (now in struct scsi_driver); use scsi_done() or scsi_done_direct() callbacks - change previous request_bufflen to scsi_bufflen() - change previous use_sg field to scsi_dma_map() or scsi_sg_count() - change previous request_buffer field to reference to 'usg_sg' text [mkp: removed more obsolete stuff] Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20241221212539.1314560-1-rdunlap@infradead.org Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> Cc: Martin K. Petersen <martin.petersen@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Documentation/scsi/scsi_mid_low_api.rst | 67 +++++++++------------------------ 1 file changed, 18 insertions(+), 49 deletions(-) commit defb7541dac0e0da862421297685425ab9ee89b2 Author: Randy Dunlap <rdunlap@infradead.org> Date: Tue Dec 17 16:07:48 2024 -0800 scsi: driver-api: documentation: Change what is added to docbook For scsi_devinfo.c, use :export: so that exported symbols are put into the docbook. Drop :internal: -- they aren't needed in the docbook. For scsi_proc.c, drop :internal:. This will cause all documented private (as is already done) and exported symbols to be added to the docbook. For scsi_scan.c, switch from :internal: to :export: so that exported symbols are put into the generated docbook. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20241218000748.932850-1-rdunlap@infradead.org Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> Cc: Martin K. Petersen <martin.petersen@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Documentation/driver-api/scsi.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d4842e578771bc907511c424492513aa5c224082 Author: Randy Dunlap <rdunlap@infradead.org> Date: Thu Dec 12 12:52:17 2024 -0800 scsi: transport: sas: spi: Fix kernel-doc for exported functions Fix kernel-doc for sas_port_alloc(), sas_port_alloc_num(), and spi_dv_device(). This allows them to be part of the SCSI driver-api docbook. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20241212205217.597844-6-rdunlap@infradead.org CC: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> CC: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_transport_sas.c | 10 ++++++---- drivers/scsi/scsi_transport_spi.c | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) commit d2f4084c5273bf2f1486fa2e055a7da8efb20de8 Author: Randy Dunlap <rdunlap@infradead.org> Date: Thu Dec 12 12:52:16 2024 -0800 scsi: scsi_scan: Add kernel-doc for exported function Add kernel-doc for scsi_add_device() since it is exported. This allows it to be part of the SCSI driver-api docbook. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20241212205217.597844-5-rdunlap@infradead.org CC: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> CC: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_scan.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 39d2112ab7c8050642fdc2830a0a3edc5337827f Author: Randy Dunlap <rdunlap@infradead.org> Date: Thu Dec 12 12:52:15 2024 -0800 scsi: scsi_lib: Add kernel-doc for exported functions Add kernel-doc for scsi_failures_reset_retries() and scsi_alloc_request() since these are exported. This allows them to be part of the SCSI driver-api docbook. Fix kernel-doc comments for scsi_vpd_tpg_id() [add kernel-doc for one parameter and fix a typo]. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20241212205217.597844-4-rdunlap@infradead.org CC: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> CC: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_lib.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit f52a04fcf8b088a4761d0dbf33188cd0fd36749a Author: Randy Dunlap <rdunlap@infradead.org> Date: Thu Dec 12 12:52:14 2024 -0800 scsi: scsi_ioctl: Add kernel-doc for exported functions Add kernel-doc for scsi_set_medium_removal(), scsi_cmd_allowed(), and scsi_ioctl_block_when_processing_errors() since these are exported. This allows them to be part of the SCSI driver-api docbook. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20241212205217.597844-3-rdunlap@infradead.org CC: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> CC: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_ioctl.c | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) commit 20b98768c2e743df7648476521818600ac4a86ef Author: Randy Dunlap <rdunlap@infradead.org> Date: Thu Dec 12 12:52:13 2024 -0800 scsi: scsi_error: Add kernel-doc for exported functions Convert scsi_report_bus_reset() and scsi_report_device_reset() to kernel-doc since they are exported. This allows them to be part of the driver-api/scsi.rst docbook. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20241212205217.597844-2-rdunlap@infradead.org CC: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> CC: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_error.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit f647dc6512efa88bd1a3dc2444a9d1ea170f4045 Author: Rajat Soni <quic_rajson@quicinc.com> Date: Wed Dec 18 09:27:11 2024 +0530 wifi: ath12k: Support pdev Puncture Stats Add support to request pdev puncture stats from firmware through HTT stats type 46. These stats give the count of number of subbands used in different wifi standards. Sample output: ------------- echo 46 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats HTT_PDEV_PUNCTURE_STATS_TLV: mac_id = 0 tx_ofdm_su_last_used_pattern_mask = 0x00000001 tx_ofdm_su_num_subbands_used_cnt_01 = 217 tx_ofdm_su_num_subbands_used_cnt_02 = 0 tx_ofdm_su_num_subbands_used_cnt_03 = 0 ..... HTT_PDEV_PUNCTURE_STATS_TLV: mac_id = 0 tx_ax_dl_mu_ofdma_last_used_pattern_mask = 0x00000000 tx_ax_dl_mu_ofdma_num_subbands_used_cnt_01 = 0 tx_ax_dl_mu_ofdma_num_subbands_used_cnt_02 = 0 tx_ax_dl_mu_ofdma_num_subbands_used_cnt_03 = 0 ..... HTT_PDEV_PUNCTURE_STATS_TLV: mac_id = 0 tx_be_dl_mu_ofdma_last_used_pattern_mask = 0x00000000 tx_be_dl_mu_ofdma_num_subbands_used_cnt_01 = 0 tx_be_dl_mu_ofdma_num_subbands_used_cnt_02 = 0 tx_be_dl_mu_ofdma_num_subbands_used_cnt_03 = 0 ..... HTT_PDEV_PUNCTURE_STATS_TLV: mac_id = 0 rx_ax_ul_mu_ofdma_last_used_pattern_mask = 0x00000000 rx_ax_ul_mu_ofdma_num_subbands_used_cnt_01 = 0 rx_ax_ul_mu_ofdma_num_subbands_used_cnt_02 = 0 rx_ax_ul_mu_ofdma_num_subbands_used_cnt_03 = 0 ..... HTT_PDEV_PUNCTURE_STATS_TLV: mac_id = 0 rx_be_ul_mu_ofdma_last_used_pattern_mask = 0x00000000 rx_be_ul_mu_ofdma_num_subbands_used_cnt_01 = 0 rx_be_ul_mu_ofdma_num_subbands_used_cnt_02 = 0 rx_be_ul_mu_ofdma_num_subbands_used_cnt_03 = 0 ..... Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Rajat Soni <quic_rajson@quicinc.com> Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241218035711.2573584-3-quic_rdevanat@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> .../net/wireless/ath/ath12k/debugfs_htt_stats.c | 101 +++++++++++++++++++++ .../net/wireless/ath/ath12k/debugfs_htt_stats.h | 38 ++++++++ 2 files changed, 139 insertions(+) commit 89699f029cd42ddf913a201c917ce4f7b213b068 Author: Roopni Devanathan <quic_rdevanat@quicinc.com> Date: Wed Dec 18 09:27:10 2024 +0530 wifi: ath12k: Support AST Entry Stats Add support to request Address Search Table(AST) entries stats from firmware through HTT stats type 41. These stats give AST entries related information such as software peer id, MAC address, pdev id, vdev, id, next hop, etc. Sample output: ------------- echo 41 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats HTT_AST_ENTRY_TLV: ast_index = 10 mac_addr = 00:00:00:01:00:00 sw_peer_id = 0 pdev_id = 3 vdev_id = 255 next_hop = 0 mcast = 0 monitor_direct = 0 mesh_sta = 0 mec = 0 intra_bss = 0 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241218035711.2573584-2-quic_rdevanat@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> .../net/wireless/ath/ath12k/debugfs_htt_stats.c | 56 ++++++++++++++++++++++ .../net/wireless/ath/ath12k/debugfs_htt_stats.h | 18 +++++++ drivers/net/wireless/ath/ath12k/dp.h | 12 +++++ 3 files changed, 86 insertions(+) commit 3f482f2434753a0647dc8753a127f86878348458 Author: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com> Date: Thu Nov 28 16:39:49 2024 +0530 wifi: ath12k: Support Transmit Buffer OFDMA Stats Add support to request OFDMA stats of transmit buffers from firmware through HTT stats type 32. These stats give information about NDPA, NDP, BRP and steering mechanisms. Note: WCN7850 firmware version - WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 does not support HTT stats type 32. Sample output: ------------- echo 32 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats HTT_TXBF_OFDMA_AX_NDPA_STATS_TLV: ax_ofdma_ndpa_queued = 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, 15:0, 16:0, 17:0, 18:0, 19:0, 20:0, 21:0, 22:0, 23:0, 24:0, 25:0, 26:0, 27:0, 28:0, 29:0, 30:0, 31:0, 32:0, 33:0, 34:0, 35:0, 36:0, 37:0 ax_ofdma_ndpa_tried = 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, 15:0, 16:0, 17:0, 18:0, 19:0, 20:0, 21:0, 22:0, 23:0, 24:0, 25:0, 26:0, 27:0, 28:0, 29:0, 30:0, 31:0, 32:0, 33:0, 34:0, 35:0, 36:0, 37:0 ..... HTT_TXBF_OFDMA_AX_NDP_STATS_TLV: ax_ofdma_ndp_queued = 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, 15:0, 16:0, 17:0, 18:0, 19:0, 20:0, 21:0, 22:0, 23:0, 24:0, 25:0, 26:0, 27:0, 28:0, 29:0, 30:0, 31:0, 32:0, 33:0, 34:0, 35:0, 36:0, 37:0 ax_ofdma_ndp_tried = 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, 15:0, 16:0, 17:0, 18:0, 19:0, 20:0, 21:0, 22:0, 23:0, 24:0, 25:0, 26:0, 27:0, 28:0, 29:0, 30:0, 31:0, 32:0, 33:0, 34:0, 35:0, 36:0, 37:0 ..... HTT_TXBF_OFDMA_AX_BRP_STATS_TLV: ax_ofdma_brpoll_queued = 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, 15:0, 16:0, 17:0, 18:0, 19:0, 20:0, 21:0, 22:0, 23:0, 24:0, 25:0, 26:0, 27:0, 28:0, 29:0, 30:0, 31:0, 32:0, 33:0, 34:0, 35:0, 36:0, 37:0 ax_ofdma_brpoll_tied = 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, 15:0, 16:0, 17:0, 18:0, 19:0, 20:0, 21:0, 22:0, 23:0, 24:0, 25:0, 26:0, 27:0, 28:0, 29:0, 30:0, 31:0, 32:0, 33:0, 34:0, 35:0, 36:0, 37:0 ..... HTT_TXBF_OFDMA_AX_STEER_STATS_TLV: ax_ofdma_num_ppdu_steer = 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, 15:0, 16:0, 17:0, 18:0, 19:0, 20:0, 21:0, 22:0, 23:0, 24:0, 25:0, 26:0, 27:0, 28:0, 29:0, 30:0, 31:0, 32:0, 33:0, 34:0, 35:0, 36:0, 37:0 ax_ofdma_num_usrs_prefetch = 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, 15:0, 16:0, 17:0, 18:0, 19:0, 20:0, 21:0, 22:0, 23:0, 24:0, 25:0, 26:0, 27:0, 28:0, 29:0, 30:0, 31:0, 32:0, 33:0, 34:0, 35:0, 36:0, 37:0 ..... HTT_TXBF_OFDMA_AX_STEER_MPDU_STATS_TLV: rbo_steer_mpdus_tried = 0 rbo_steer_mpdus_failed = 0 sifs_steer_mpdus_tried = 0 sifs_steer_mpdus_failed = 0 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00214-QCAHKSWPL_SILICONZ-1 Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com> Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com> Acked-by: Jeff Johnson <jjohnson@kernel.org> Link: https://patch.msgid.link/20241128110949.3672364-3-quic_rdevanat@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> .../net/wireless/ath/ath12k/debugfs_htt_stats.c | 250 +++++++++++++++++++++ .../net/wireless/ath/ath12k/debugfs_htt_stats.h | 67 ++++++ 2 files changed, 317 insertions(+) commit c9f6ee2701d798c2b79b8557b842da7b106fcd5c Author: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com> Date: Thu Nov 28 16:39:48 2024 +0530 wifi: ath12k: Support Transmit Rate Buffer Stats Add support to request transmit rate buffer stats from firmware through HTT stats type 31. These stats give information such as MCS, NSS and bandwidth of transmit and input buffer. Sample output: ------------- echo 31 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats HTT_STATS_PDEV_TX_RATE_TXBF_STATS: Legacy OFDM Rates: 6 Mbps: 0, 9 Mbps: 0, 12 Mbps: 0, 18 Mbps: 0 24 Mbps: 0, 36 Mbps: 0, 48 Mbps: 0, 54 Mbps: 0 tx_ol_mcs = 0:0, 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 tx_ibf_mcs = 0:0, 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 tx_txbf_mcs = 0:0, 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 tx_ol_nss = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0 tx_ibf_nss = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0 tx_txbf_nss = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0 tx_ol_bw = 0:0, 1:0, 2:0, 3:0, 4:0 half_tx_ol_bw = 0:0, 1:0, 2:0, 3:0, 4:0 quarter_tx_ol_bw = 0:0, 1:0, 2:0, 3:0, 4:0 tx_ibf_bw = 0:0, 1:0, 2:0, 3:0, 4:0 half_tx_ibf_bw = 0:0, 1:0, 2:0, 3:0, 4:0 quarter_tx_ibf_bw = 0:0, 1:0, 2:0, 3:0, 4:0 tx_txbf_bw = 0:0, 1:0, 2:0, 3:0, 4:0 half_tx_txbf_bw = 0:0, 1:0, 2:0, 3:0, 4:0 quarter_tx_txbf_bw = 0:0, 1:0, 2:0, 3:0, 4:0 HTT_STATS_PDEV_TXBF_FLAG_RETURN_STATS: TXBF_reason_code_stats: 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00214-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: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com> Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Acked-by: Jeff Johnson <jjohnson@kernel.org> Link: https://patch.msgid.link/20241128110949.3672364-2-quic_rdevanat@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> .../net/wireless/ath/ath12k/debugfs_htt_stats.c | 95 ++++++++++++++++++++++ .../net/wireless/ath/ath12k/debugfs_htt_stats.h | 32 ++++++++ 2 files changed, 127 insertions(+) commit 62addc6dbf3644272c064c16076221bf4f633f25 Author: Changwoo Min <changwoo@igalia.com> Date: Thu Jan 9 22:14:56 2025 +0900 sched_ext: Use time helpers in BPF schedulers Modify the BPF schedulers to use time helpers defined in common.bpf.h Signed-off-by: Changwoo Min <changwoo@igalia.com> Acked-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org> tools/sched_ext/scx_central.bpf.c | 7 +------ tools/sched_ext/scx_flatcg.bpf.c | 21 ++++++++------------- tools/sched_ext/scx_simple.bpf.c | 9 ++------- 3 files changed, 11 insertions(+), 26 deletions(-) commit 0f130bc341d09a82ad23e7fc59d4306528c4c4ce Author: Changwoo Min <changwoo@igalia.com> Date: Thu Jan 9 22:14:55 2025 +0900 sched_ext: Replace bpf_ktime_get_ns() to scx_bpf_now() In the BPF schedulers that use bpf_ktime_get_ns() -- scx_central and scx_flatcg, replace bpf_ktime_get_ns() calls to scx_bpf_now(). Signed-off-by: Changwoo Min <changwoo@igalia.com> Acked-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org> tools/sched_ext/scx_central.bpf.c | 4 ++-- tools/sched_ext/scx_flatcg.bpf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit d07be814fc7165cb804317c99228243382e81188 Author: Changwoo Min <changwoo@igalia.com> Date: Thu Jan 9 22:14:54 2025 +0900 sched_ext: Add time helpers for BPF schedulers The following functions are added for BPF schedulers: - time_delta(after, before) - time_after(a, b) - time_before(a, b) - time_after_eq(a, b) - time_before_eq(a, b) - time_in_range(a, b, c) - time_in_range_open(a, b, c) Signed-off-by: Changwoo Min <changwoo@igalia.com> Acked-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org> tools/sched_ext/include/scx/common.bpf.h | 94 ++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit 2e1ce39fde7caacc98bc0472d15e8c641dfb31bf Author: Changwoo Min <changwoo@igalia.com> Date: Thu Jan 9 22:14:53 2025 +0900 sched_ext: Add scx_bpf_now() for BPF scheduler scx_bpf_now() is added to the header files so the BPF scheduler can use it. Signed-off-by: Changwoo Min <changwoo@igalia.com> Acked-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org> tools/sched_ext/include/scx/common.bpf.h | 1 + tools/sched_ext/include/scx/compat.bpf.h | 5 +++++ 2 files changed, 6 insertions(+) commit 3a9910b5904d29c566e3ff9290990b519827ba75 Author: Changwoo Min <changwoo@igalia.com> Date: Thu Jan 9 22:14:52 2025 +0900 sched_ext: Implement scx_bpf_now() Returns a high-performance monotonically non-decreasing clock for the current CPU. The clock returned is in nanoseconds. It provides the following properties: 1) High performance: Many BPF schedulers call bpf_ktime_get_ns() frequently to account for execution time and track tasks' runtime properties. Unfortunately, in some hardware platforms, bpf_ktime_get_ns() -- which eventually reads a hardware timestamp counter -- is neither performant nor scalable. scx_bpf_now() aims to provide a high-performance clock by using the rq clock in the scheduler core whenever possible. 2) High enough resolution for the BPF scheduler use cases: In most BPF scheduler use cases, the required clock resolution is lower than the most accurate hardware clock (e.g., rdtsc in x86). scx_bpf_now() basically uses the rq clock in the scheduler core whenever it is valid. It considers that the rq clock is valid from the time the rq clock is updated (update_rq_clock) until the rq is unlocked (rq_unpin_lock). 3) Monotonically non-decreasing clock for the same CPU: scx_bpf_now() guarantees the clock never goes backward when comparing them in the same CPU. On the other hand, when comparing clocks in different CPUs, there is no such guarantee -- the clock can go backward. It provides a monotonically *non-decreasing* clock so that it would provide the same clock values in two different scx_bpf_now() calls in the same CPU during the same period of when the rq clock is valid. An rq clock becomes valid when it is updated using update_rq_clock() and invalidated when the rq is unlocked using rq_unpin_lock(). Let's suppose the following timeline in the scheduler core: T1. rq_lock(rq) T2. update_rq_clock(rq) T3. a sched_ext BPF operation T4. rq_unlock(rq) T5. a sched_ext BPF operation T6. rq_lock(rq) T7. update_rq_clock(rq) For [T2, T4), we consider that rq clock is valid (SCX_RQ_CLK_VALID is set), so scx_bpf_now() calls during [T2, T4) (including T3) will return the rq clock updated at T2. For duration [T4, T7), when a BPF scheduler can still call scx_bpf_now() (T5), we consider the rq clock is invalid (SCX_RQ_CLK_VALID is unset at T4). So when calling scx_bpf_now() at T5, we will return a fresh clock value by calling sched_clock_cpu() internally. Also, to prevent getting outdated rq clocks from a previous scx scheduler, invalidate all the rq clocks when unloading a BPF scheduler. One example of calling scx_bpf_now(), when the rq clock is invalid (like T5), is in scx_central [1]. The scx_central scheduler uses a BPF timer for preemptive scheduling. In every msec, the timer callback checks if the currently running tasks exceed their timeslice. At the beginning of the BPF timer callback (central_timerfn in scx_central.bpf.c), scx_central gets the current time. When the BPF timer callback runs, the rq clock could be invalid, the same as T5. In this case, scx_bpf_now() returns a fresh clock value rather than returning the old one (T2). [1] https://github.com/sched-ext/scx/blob/main/scheds/c/scx_central.bpf.c Signed-off-by: Changwoo Min <changwoo@igalia.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org> kernel/sched/core.c | 6 ++++- kernel/sched/ext.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++- kernel/sched/sched.h | 25 ++++++++++++++++-- 3 files changed, 101 insertions(+), 4 deletions(-) commit ea9b2626271f4e82f329ba52503dd5193fe656e9 Author: Changwoo Min <changwoo@igalia.com> Date: Thu Jan 9 22:14:51 2025 +0900 sched_ext: Relocate scx_enabled() related code scx_enabled() will be used in scx_rq_clock_update/invalidate() in the following patch, so relocate the scx_enabled() related code to the proper location. Signed-off-by: Changwoo Min <changwoo@igalia.com> Acked-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org> kernel/sched/sched.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 836b341cc8dab680acc06a7883bfeea89680b689 Author: Kartik Rajput <kkartik@nvidia.com> Date: Wed Nov 27 11:40:53 2024 +0530 soc/tegra: fuse: Update Tegra234 nvmem keepout list Various Nvidia userspace applications and tests access following fuse via Fuse nvmem interface: * odmid * odminfo * boot_security_info * public_key_hash * reserved_odm0 * reserved_odm1 * reserved_odm2 * reserved_odm3 * reserved_odm4 * reserved_odm5 * reserved_odm6 * reserved_odm7 * odm_lock * pk_h1 * pk_h2 * revoke_pk_h0 * revoke_pk_h1 * security_mode * system_fw_field_ratchet0 * system_fw_field_ratchet1 * system_fw_field_ratchet2 * system_fw_field_ratchet3 * optin_enable Update tegra234_fuse_keepouts list to allow reading these fuse from nvmem sysfs interface. Signed-off-by: Kartik Rajput <kkartik@nvidia.com> Link: https://lore.kernel.org/r/20241127061053.16775-1-kkartik@nvidia.com Signed-off-by: Thierry Reding <treding@nvidia.com> drivers/soc/tegra/fuse/fuse-tegra30.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit c475b68155942cc2142aca02f3fc19f6e730f17e Author: liujing <liujing@cmss.chinamobile.com> Date: Mon Dec 9 13:51:48 2024 +0800 soc/tegra: Fix spelling error in tegra234_lookup_slave_timeout() Fix spelling error in tegra234_lookup_slave_timeout(). Signed-off-by: liujing <liujing@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241209055148.3749-1-liujing@cmss.chinamobile.com Signed-off-by: Thierry Reding <treding@nvidia.com> drivers/soc/tegra/cbb/tegra234-cbb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b615fbd70fce8582d92b3bdbbf3c9b80cadcfb55 Author: Brad Griffis <bgriffis@nvidia.com> Date: Fri Dec 13 23:56:02 2024 +0000 arm64: tegra: Fix Tegra234 PCIe interrupt-map For interrupt-map entries, the DTS specification requires that #address-cells is defined for both the child node and the interrupt parent. For the PCIe interrupt-map entries, the parent node ("gic") has not specified #address-cells. The existing layout of the PCIe interrupt-map entries indicates that it assumes that #address-cells is zero for this node. Explicitly set #address-cells to zero for "gic" so that it complies with the device tree specification. NVIDIA EDK2 works around this issue by assuming #address-cells is zero in this scenario, but that workaround is being removed and so this update is needed or else NVIDIA EDK2 cannot successfully parse the device tree and the board cannot boot. Fixes: ec142c44b026 ("arm64: tegra: Add P2U and PCIe controller nodes to Tegra234 DT") Signed-off-by: Brad Griffis <bgriffis@nvidia.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20241213235602.452303-1-bgriffis@nvidia.com Signed-off-by: Thierry Reding <treding@nvidia.com> arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit ac0ac75189a4d6a29a2765a7adbb62bc6cc650c7 Author: Jiachen Zhang <me@jcix.top> Date: Thu Jan 9 23:22:19 2025 +0800 perf report: Fix misleading help message about --demangle The wrong help message may mislead users. This commit fixes it. Fixes: 328ccdace8855289 ("perf report: Add --no-demangle option") Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Jiachen Zhang <me@jcix.top> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20250109152220.1869581-1-me@jcix.top Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 510f0247cdac26dfc2fed6e712f3cb616da49b5c Author: Namhyung Kim <namhyung@kernel.org> Date: Wed Jan 8 13:00:15 2025 -0800 perf ftrace: Fix display for range of the first bucket When min_latency is not given, it prints 0 - 0. It should be 0 - 1. Before: $ sudo ./perf ftrace latency -a -T do_futex sleep 1 # DURATION | COUNT | GRAPH | 0 - 0 us | 321 | ########### | ... After: $ sudo ./perf ftrace latency -a -T do_futex sleep 1 # DURATION | COUNT | GRAPH | 0 - 1 us | 699 | ############ | ... Fixes: 08b875b6bf608589 ("perf ftrace latency: Introduce --min-latency to narrow down into a latency range") Reviewed-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Tested-by: Gabriele Monaco <gmonaco@redhat.com Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20250108210015.1188531-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd01b985c52a964ed5b193972e475481fefa0f45 Author: Namhyung Kim <namhyung@kernel.org> Date: Wed Jan 8 13:00:14 2025 -0800 perf ftrace: Check min/max latency only with bucket range It's an optional feature and remains 0 when bucket range is not given. And it makes the histogram goes to the last entry always because any latency (num) is greater than or equal to 0. Before: $ sudo ./perf ftrace latency -a -T do_futex sleep 1 # DURATION | COUNT | GRAPH | 0 - 0 us | 0 | | 1 - 2 us | 0 | | 2 - 4 us | 0 | | 4 - 8 us | 0 | | 8 - 16 us | 0 | | 16 - 32 us | 0 | | 32 - 64 us | 0 | | 64 - 128 us | 0 | | 128 - 256 us | 0 | | 256 - 512 us | 0 | | 512 - 1024 us | 0 | | 1 - 2 ms | 0 | | 2 - 4 ms | 0 | | 4 - 8 ms | 0 | | 8 - 16 ms | 0 | | 16 - 32 ms | 0 | | 32 - 64 ms | 0 | | 64 - 128 ms | 0 | | 128 - 256 ms | 0 | | 256 - 512 ms | 0 | | 512 - 1024 ms | 0 | | 1 - ... s | 1353 | ############################################## | After: $ sudo ./perf ftrace latency -a -T do_futex sleep 1 # DURATION | COUNT | GRAPH | 0 - 0 us | 321 | ########### | 1 - 2 us | 132 | #### | 2 - 4 us | 202 | ####### | 4 - 8 us | 188 | ###### | 8 - 16 us | 16 | | 16 - 32 us | 12 | | 32 - 64 us | 30 | # | 64 - 128 us | 98 | ### | 128 - 256 us | 53 | # | 256 - 512 us | 57 | ## | 512 - 1024 us | 9 | | 1 - 2 ms | 9 | | 2 - 4 ms | 1 | | 4 - 8 ms | 98 | ### | 8 - 16 ms | 5 | | 16 - 32 ms | 7 | | 32 - 64 ms | 32 | # | 64 - 128 ms | 10 | | 128 - 256 ms | 10 | | 256 - 512 ms | 2 | | 512 - 1024 ms | 0 | | 1 - ... s | 0 | | Fixes: 690a052a6d85c530 ("perf ftrace latency: Add --max-latency option") Reviewed-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Tested-by: Gabriele Monaco <gmonaco@redhat.com Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20250108210015.1188531-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-ftrace.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit e4c00c9b1f70cd11792ff5b825899a6ee0234a62 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Thu Jan 9 21:26:52 2025 +0800 of: Correct child specifier used as input of the 2nd nexus node API of_parse_phandle_with_args_map() will use wrong input for nexus node Nexus_2 as shown below: Node_1 Nexus_1 Nexus_2 &Nexus_1,arg_1 -> arg_1,&Nexus_2,arg_2' -> &Nexus_2,arg_2 -> arg_2,... map-pass-thru=<...> Nexus_1's output arg_2 should be used as input of Nexus_2, but the API wrongly uses arg_2' instead which != arg_2 due to Nexus_1's map-pass-thru. Fix by always making @match_array point to @initial_match_array into which to store nexus output. Fixes: bd6f2fd5a1d5 ("of: Support parsing phandle argument lists through a nexus node") Cc: stable@vger.kernel.org Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-1-db8a72415b8c@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> drivers/of/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 272f8a6d625a0cf7fba9c5af5202edc84dee326c Author: Matthew Maurer <mmaurer@google.com> Date: Fri Jan 3 17:37:04 2025 +0000 Documentation/kbuild: Document storage of symbol information Document where exported and imported symbols are kept, format options, and limitations. Signed-off-by: Matthew Maurer <mmaurer@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Documentation/kbuild/modules.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit e8639b7ef0f871753b4262ec0eacd3da29eebcee Author: Matthew Maurer <mmaurer@google.com> Date: Fri Jan 3 17:37:03 2025 +0000 modpost: Allow extended modversions without basic MODVERSIONS If you know that your kernel modules will only ever be loaded by a newer kernel, you can disable BASIC_MODVERSIONS to save space. This also allows easy creation of test modules to see how tooling will respond to modules that only have the new format. Signed-off-by: Matthew Maurer <mmaurer@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> kernel/module/Kconfig | 15 +++++++++++++++ scripts/Makefile.modpost | 1 + scripts/mod/modpost.c | 9 +++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) commit b709eb872e19a19607bbb6d2975bc264d59735cf Author: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Date: Fri Jan 3 15:31:51 2025 +0000 perf: map pages in advance We are adjusting struct page to make it smaller, removing unneeded fields which correctly belong to struct folio. Two of those fields are page->index and page->mapping. Perf is currently making use of both of these. This is unnecessary. This patch eliminates this. Perf establishes its own internally controlled memory-mapped pages using vm_ops hooks. The first page in the mapping is the read/write user control page, and the rest of the mapping consists of read-only pages. The VMA is backed by kernel memory either from the buddy allocator or vmalloc depending on configuration. It is intended to be mapped read/write, but because it has a page_mkwrite() hook, vma_wants_writenotify() indicates that it should be mapped read-only. When a write fault occurs, the provided page_mkwrite() hook, perf_mmap_fault() (doing double duty handing faults as well) uses the vmf->pgoff field to determine if this is the first page, allowing for the desired read/write first page, read-only rest mapping. For this to work the implementation has to carefully work around faulting logic. When a page is write-faulted, the fault() hook is called first, then its page_mkwrite() hook is called (to allow for dirty tracking in file systems). On fault we set the folio's mapping in perf_mmap_fault(), this is because when do_page_mkwrite() is subsequently invoked, it treats a missing mapping as an indicator that the fault should be retried. We also set the folio's index so, given the folio is being treated as faux user memory, it correctly references its offset within the VMA. This explains why the mapping and index fields are used - but it's not necessary. We preallocate pages when perf_mmap() is called for the first time via rb_alloc(), and further allocate auxiliary pages via rb_aux_alloc() as needed if the mapping requires it. This allocation is done in the f_ops->mmap() hook provided in perf_mmap(), and so we can instead simply map all the memory right away here - there's no point in handling (read) page faults when we don't demand page nor need to be notified about them (perf does not). This patch therefore changes this logic to map everything when the mmap() hook is called, establishing a PFN map. It implements vm_ops->pfn_mkwrite() to provide the required read/write vs. read-only behaviour, which does not require the previously implemented workarounds. While it is not ideal to use a VM_PFNMAP here, doing anything else will result in the page_mkwrite() hook need to be provided, which requires the same page->mapping hack this patch seeks to undo. It will also result in the pages being treated as folios and placed on the rmap, which really does not make sense for these mappings. Semantically it makes sense to establish this as some kind of special mapping, as the pages are managed by perf and are not strictly user pages, but currently the only means by which we can do so functionally while maintaining the required R/W and R/O behaviour is a PFN map. There should be no change to actual functionality as a result of this change. Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20250103153151.124163-1-lorenzo.stoakes@oracle.com kernel/events/core.c | 118 ++++++++++++++++++++++++++++++-------------- kernel/events/ring_buffer.c | 19 +------ 2 files changed, 82 insertions(+), 55 deletions(-) commit 6d642735cdb6cdb814d2b6c81652caa53ce04842 Author: Kan Liang <kan.liang@linux.intel.com> Date: Wed Jan 8 06:30:17 2025 -0800 perf/x86/intel/uncore: Support more units on Granite Rapids The same CXL PMONs support is also avaiable on GNR. Apply spr_uncore_cxlcm and spr_uncore_cxldp to GNR as well. The other units were broken on early HW samples, so they were ignored in the early enabling patch. The issue has been fixed and verified on the later production HW. Add UPI, B2UPI, B2HOT, PCIEX16 and PCIEX8 for GNR. Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Eric Hu <eric.hu@intel.com> Link: https://lkml.kernel.org/r/20250108143017.1793781-2-kan.liang@linux.intel.com arch/x86/events/intel/uncore_snbep.c | 48 ++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 16 deletions(-) commit 3f710be02ea648001ba18fb2c9fa7765e743dec2 Author: Kan Liang <kan.liang@linux.intel.com> Date: Wed Jan 8 06:30:16 2025 -0800 perf/x86/intel/uncore: Clean up func_id The below warning may be triggered on GNR when the PCIE uncore units are exposed. WARNING: CPU: 4 PID: 1 at arch/x86/events/intel/uncore.c:1169 uncore_pci_pmu_register+0x158/0x190 The current uncore driver assumes that all the devices in the same PMU have the exact same devfn. It's true for the previous platforms. But it doesn't work for the new PCIE uncore units on GNR. The assumption doesn't make sense. There is no reason to limit the devices from the same PMU to the same devfn. Also, the current code just throws the warning, but still registers the device. The WARN_ON_ONCE() should be removed. The func_id is used by the later event_init() to check if a event->pmu has valid devices. For cpu and mmio uncore PMUs, they are always valid. For pci uncore PMUs, it's set when the PMU is registered. It can be replaced by the pmu->registered. Clean up the func_id. Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Eric Hu <eric.hu@intel.com> Link: https://lkml.kernel.org/r/20250108143017.1793781-1-kan.liang@linux.intel.com arch/x86/events/intel/uncore.c | 20 +++++++------------- arch/x86/events/intel/uncore.h | 1 - arch/x86/events/intel/uncore_snb.c | 2 +- 3 files changed, 8 insertions(+), 15 deletions(-) commit cb4ccc70344c3dc29a5d0045361a4f0959bc5a6b Author: Jiri Slaby (SUSE) <jirislaby@kernel.org> Date: Thu Jan 9 12:47:03 2025 +0100 MAINTAINERS: Add static_call_inline.c to STATIC BRANCH/CALL Commit 8fd4ddda2f49 ("static_call: Don't make __static_call_return0 static") split static_call.c and created static_call_inline.c. This was not reflected in MAINTAINERS. Fix it by changing the MAINTAINERS line to be a glob: static_call*.c. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20250109114703.426577-1-jirislaby@kernel.org MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a937f384c9da493e526ad896ef4e8054526d2941 Author: Peter Zijlstra <peterz@infradead.org> Date: Mon Jan 6 11:26:48 2025 +0100 cleanup, tags: Create tags for the cleanup primitives Oleg reported that it is hard to find the definition of things like: __free(argv) without having to do 'git grep "DEFINE_FREE(argv,"'. Add tag generation for the various macros in cleanup.h. Notably 'DEFINE_FREE(argv, ...)' will now generate a 'cleanup_argv' tag, while all the others, eg. 'DEFINE_GUARD(mutex, ...)' will generate 'class_mutex' like tags. Reported-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20250106102647.GB20870@noisy.programming.kicks-ass.net scripts/tags.sh | 7 +++++++ 1 file changed, 7 insertions(+) commit 812a33a65d00e3d813f5ed2c9923569acd0b445c Author: Ryan Seto <ryanseto@amd.com> Date: Mon Jan 6 11:44:48 2025 -0500 drm/amd/display: 3.2.316 This version brings along following fixes: - Add some feature for secure display - Add replay desync error count tracking and reset - Update chip_cap defines and usage - Remove unnecessary eDP power down - Fix some stuttering/corruption issue on PSR panel - Cleanup and refactoring DML2.1 Acked-by: Wayne Lin <wayne.lin@amd.com> Reviewed-by: Martin Leung <martin.leung@amd.com> Signed-off-by: Ryan Seto <ryanseto@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ae47e971b9add8f7b8f8d55ac5f407f6f346758 Author: Charlene Liu <Charlene.Liu@amd.com> Date: Tue Nov 26 12:09:25 2024 -0500 drm/amd/display: avoid reset DTBCLK at clock init [why & how] this is to init to HW real DTBCLK. and use real HW DTBCLK status to update internal logic state Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Martin Leung <martin.leung@amd.com> Signed-off-by: Charlene Liu <Charlene.Liu@amd.com> Signed-off-by: Ausef Yousof <Ausef.Yousof@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 230dced3e2b712017c03ce0afb3f8c48d8af20ee Author: Peichen Huang <PeiChen.Huang@amd.com> Date: Wed Dec 25 15:51:34 2024 +0800 drm/amd/display: improve dpia pre-train [WHY] We see unstable DP LL 4.2.1.3 test result with dpia pre-train. It is because the outbox interrupt mechanism can not handle HPD immediately and require some improvement. [HOW] 1. not enable link if hpd_pending is true. 2. abort pre-train if training failed and hpd_pending is true. 3. check if 2 lane supported when it is alt mode Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Reviewed-by: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com> Signed-off-by: Peichen Huang <PeiChen.Huang@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c | 5 +++-- drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 9 +++++++++ .../gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c | 8 ++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) commit ec6d8d49f44b4d0cbf8674f81374ea4df04228da Author: Austin Zheng <Austin.Zheng@amd.com> Date: Fri Dec 20 12:35:20 2024 -0500 drm/amd/display: Apply DML21 Patches [Why & How] Add several DML21 fixes Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Signed-off-by: Austin Zheng <Austin.Zheng@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 107 +++++++++++++++++++-- .../dml21/src/dml2_core/dml2_core_shared_types.h | 6 +- .../dc/dml2/dml21/src/dml2_core/dml2_core_utils.c | 2 +- .../dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.c | 6 +- .../dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 10 +- .../dml2/dml21/src/dml2_top/dml2_top_interfaces.c | 1 - .../dc/dml2/dml21/src/dml2_top/dml2_top_legacy.c | 6 ++ .../dc/dml2/dml21/src/dml2_top/dml2_top_soc15.c | 1 + .../dc/dml2/dml21/src/dml2_top/dml2_top_soc15.h | 1 + .../dml21/src/inc/dml2_internal_shared_types.h | 2 - 10 files changed, 124 insertions(+), 18 deletions(-) commit a2b5a9956269f4c1a09537177f18ab0229fe79f7 Author: Tom Chung <chiahsuan.chung@amd.com> Date: Tue Oct 1 17:13:07 2024 +0800 drm/amd/display: Use HW lock mgr for PSR1 [Why] Without the dmub hw lock, it may cause the lock timeout issue while do modeset on PSR1 eDP panel. [How] Allow dmub hw lock for PSR1. Reviewed-by: Sun peng Li <sunpeng.li@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0524dd3a4f0e462067a3fcd13b7c5086f9dc1ece Author: Dennis Chan <dennis.chan@amd.com> Date: Mon Sep 23 10:12:05 2024 +0800 drm/amd/display: Revised for Replay Pseudo vblank control [why & how] Revised Replay Full screen video Pseudo vblank control. Reviewed-by: Allen Li <allen.li@amd.com> Signed-off-by: Dennis Chan <dennis.chan@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc_types.h | 4 ++-- drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 4 ++-- drivers/gpu/drm/amd/display/modules/power/power_helpers.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 4e5a9bcc9b6aa3c11c7649c8e9727d662f069af8 Author: Robin Chen <robin.chen@amd.com> Date: Wed Dec 25 13:29:31 2024 +0800 drm/amd/display: Add a new flag for replay low hz [Why & How] Add a new flag in replay_config to indicate the replay low hz status. Reviewed-by: Allen Li <allen.li@amd.com> Signed-off-by: Robin Chen <robin.chen@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc_types.h | 2 ++ 1 file changed, 2 insertions(+) commit 92d100378c4b2e7f566518a1c60ce990a845ed26 Author: Karthi Kandasamy <karthi.kandasamy@amd.com> Date: Fri Dec 20 08:46:45 2024 +0100 drm/amd/display: Remove unused read_ono_state function from Hwss module [Why] The functions read_ono_state are no longer in use and have been identified as redundant. Removing them helps streamline the codebase and improve maintainability by eliminating unnecessary code. [How] These unused functions were removed from Hwss module, ensuring that no functionality is affected, and the code is simplified. Reviewed-by: Martin Leung <martin.leung@amd.com> Signed-off-by: Karthi Kandasamy <karthi.kandasamy@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 85 ---------------------- .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 2 - 2 files changed, 87 deletions(-) commit 4caacd1671b7a013ad04cd8b6398f002540bdd4d Author: Leo Li <sunpeng.li@amd.com> Date: Wed Dec 11 12:06:24 2024 -0500 drm/amd/display: Do not elevate mem_type change to full update [Why] There should not be any need to revalidate bandwidth on memory placement change, since the fb is expected to be pinned to DCN-accessable memory before scanout. For APU it's DRAM, and DGPU, it's VRAM. However, async flips + memory type change needs to be rejected. [How] Do not set lock_and_validation_needed on mem_type change. Instead, reject an async_flip request if the crtc's buffer(s) changed mem_type. This may fix stuttering/corruption experienced with PSR SU and PSR1 panels, if the compositor allocates fbs in both VRAM carveout and GTT and flips between them. Fixes: a7c0cad0dc06 ("drm/amd/display: ensure async flips are only accepted for fast updates") Reviewed-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 29 ++++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) commit fd85b6b7bc53409d0be82763419bdcdaa48f2c91 Merge: 89b37e499296 226d6cb3cb79 Author: Mark Brown <broonie@kernel.org> Date: Fri Jan 10 17:09:28 2025 +0000 spi: Add spi_mem_calc_op_duration() helper Merge series from Miquel Raynal <miquel.raynal@bootlin.com>: Add a spi_mem_calc_op_duration() helper commit aa6713fa2046f4c09bf3013dd1420ae15603ca6f Author: Leo Li <sunpeng.li@amd.com> Date: Mon Dec 9 12:58:33 2024 -0500 drm/amd/display: Do not wait for PSR disable on vbl enable [Why] Outside of a modeset/link configuration change, we should not have to wait for the panel to exit PSR. Depending on the panel and it's state, it may take multiple frames for it to exit PSR. Therefore, waiting in all scenarios may cause perceived stuttering, especially in combination with faster vblank shutdown. [How] PSR1 disable is hooked up to the vblank enable event, and vice versa. In case of vblank enable, do not wait for panel to exit PSR, but still wait in all other cases. We also avoid a call to unnecessarily change power_opts on disable - this ends up sending another command to dmcub fw. When testing against IGT, some crc tests like kms_plane_alpha_blend and amd_hotplug were failing due to CRC timeouts. This was found to be caused by the early return before HW has fully exited PSR1. Fix this by first making sure we grab a vblank reference, then waiting for panel to exit PSR1, before programming hw for CRC generation. Fixes: 58a261bfc967 ("drm/amd/display: use a more lax vblank enable policy for older ASICs") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3743 Reviewed-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 25 ++++++++++------ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 2 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 35 ++++++++++++++++++++-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.h | 3 +- 6 files changed, 54 insertions(+), 17 deletions(-) commit f5860c88cdfe7300d08c1aef881bba0cac369e34 Author: Yiling Chen <yi-ling.chen2@amd.com> Date: Fri Dec 20 17:12:54 2024 +0800 drm/amd/display: Remove unnecessary eDP power down [why] When first time of link training is fail, eDP would be powered down and would not be powered up for next retry link training. It causes that all of retry link linking would be fail. [how] We has extracted both power up and down sequence from enable/disable link output function before DCN32. We remov eDP power down in dcn32_disable_link_output(). Reviewed-by: Charlene Liu <charlene.liu@amd.com> Signed-off-by: Yiling Chen <yi-ling.chen2@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c7ccfc0d4241a834c25a9a9e1e78b388b4445d23 Author: Nicholas Susanto <Nicholas.Susanto@amd.com> Date: Thu Dec 19 14:15:37 2024 -0500 Revert "drm/amd/display: Enable urgent latency adjustments for DCN35" Revert commit 284f141f5ce5 ("drm/amd/display: Enable urgent latency adjustments for DCN35") [Why & How] Urgent latency increase caused 2.8K OLED monitor caused it to block this panel support P0. Reverting this change does not reintroduce the netflix corruption issue which it fixed. Fixes: 284f141f5ce5 ("drm/amd/display: Enable urgent latency adjustments for DCN35") Reviewed-by: Charlene Liu <charlene.liu@amd.com> Signed-off-by: Nicholas Susanto <Nicholas.Susanto@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ea943991d09a8d5cdddec5356d2694bd8060f69 Author: Dillon Varone <dillon.varone@amd.com> Date: Thu Dec 12 17:01:34 2024 -0500 drm/amd/display: Add SMU interface to get UMC count for dcn401 [WHY&HOW] BIOS table will not always contain accurate UMC channel info when harvesting is enabled, so get the correct info from SMU. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/display/dc/clk_mgr/dcn401/dalsmc.h | 4 +- .../amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c | 9 ++++ .../dc/clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.c | 14 ++++++ .../dc/clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.h | 1 + .../dc/dml2/dml21/dml21_translation_helper.c | 9 +++- .../display/dc/resource/dcn401/dcn401_resource.c | 54 +++++++++++++--------- 6 files changed, 65 insertions(+), 26 deletions(-) commit e2c4c6c10542ccfe4a0830bb6c9fd5b177b7bbb7 Author: Alex Hung <alex.hung@amd.com> Date: Tue Dec 17 11:51:58 2024 -0700 drm/amd/display: Initialize denominator defaults to 1 [WHAT & HOW] Variables, used as denominators and maybe not assigned to other values, should be initialized to non-zero to avoid DIVIDE_BY_ZERO, as reported by Coverity. Reviewed-by: Austin Zheng <austin.zheng@amd.com> Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 44cea2bb9c872594e538412eb9c780b391eb112c Author: Wayne Lin <Wayne.Lin@amd.com> Date: Thu Oct 31 15:57:40 2024 +0800 drm/amd/display: Extend secure display to support DisplayCRC mode [Why] For the legacy secure display, it involves PSP + DMUB to confgiure and retrieve the CRC/ROI result. Have requirement to support mode which all handled by driver only. [How] Add another "DisplayCRC" mode, which doesn't involve PSP + DMUB. All things are handled by the driver only Reviewed-by: HaoPing Liu <haoping.liu@amd.com> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 56 +++++++++++++++------- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h | 9 ++++ 2 files changed, 49 insertions(+), 16 deletions(-) commit b6fcc3867d746c181d253b110236985b9b2ee2aa Author: Wayne Lin <Wayne.Lin@amd.com> Date: Fri Dec 6 13:51:46 2024 +0800 drm/amd/display: Add support to configure CRC window on specific CRC instance [Why] Have the need to specify the CRC window on specific CRC engine. dc_stream_configure_crc() today calculates CRC on crc engine 0 only and always resets CRC engine at first. [How] Add index parameter to dc_stream_configure_crc() for selecting the desired crc engine. Additionally, add another parameter to specify whether to skip the default reset of crc engine. Reviewed-by: HaoPing Liu <haoping.liu@amd.com> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 11 +- drivers/gpu/drm/amd/display/dc/dc_stream.h | 4 +- .../display/dc/dce110/dce110_timing_generator.c | 169 ++++++++++++++------- .../display/dc/dce120/dce120_timing_generator.c | 90 +++++++---- .../drm/amd/display/dc/inc/hw/timing_generator.h | 3 + .../gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.c | 86 +++++++---- .../gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.c | 101 +++++++++--- 8 files changed, 329 insertions(+), 137 deletions(-) commit 4a9a918545455a5979c6232fcf61ed3d8f0db3ae Author: Wayne Lin <Wayne.Lin@amd.com> Date: Mon Dec 9 15:25:35 2024 +0800 drm/amd/display: Reduce accessing remote DPCD overhead [Why] Observed frame rate get dropped by tool like glxgear. Even though the output to monitor is 60Hz, the rendered frame rate drops to 30Hz lower. It's due to code path in some cases will trigger dm_dp_mst_is_port_support_mode() to read out remote Link status to assess the available bandwidth for dsc maniplation. Overhead of keep reading remote DPCD is considerable. [How] Store the remote link BW in mst_local_bw and use end-to-end full_pbn as an indicator to decide whether update the remote link bw or not. Whenever we need the info to assess the BW, visit the stored one first. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3720 Fixes: fa57924c76d9 ("drm/amd/display: Refactor function dm_dp_mst_is_port_support_mode()") Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jerry Zuo <jerry.zuo@amd.com> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 ++ .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 34 ++++++++++++++++------ 2 files changed, 27 insertions(+), 9 deletions(-) commit a04d9534a8a75b2806c5321c387be450c364b55e Author: Wayne Lin <Wayne.Lin@amd.com> Date: Tue Dec 10 11:17:55 2024 +0800 drm/amd/display: Validate mdoe under MST LCT=1 case as well [Why & How] Currently in dm_dp_mst_is_port_support_mode(), when valdidating mode under dsc decoding at the last DP link config, we only validate the case when there is an UFP. However, if the MSTB LCT=1, there is no UFP. Under this case, use root_link_bw_in_kbps as the available bw to compare. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3720 Fixes: fa57924c76d9 ("drm/amd/display: Refactor function dm_dp_mst_is_port_support_mode()") Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jerry Zuo <jerry.zuo@amd.com> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 63ab80d9ac0adae2066b140ec30481ba4648140d Author: Rafal Ostrowski <rostrows@amd.com> Date: Tue Dec 17 15:50:10 2024 +0100 drm/amd/display: DML2.1 Post-Si Cleanup [Why] There are a few cleanup and refactoring tasks that need to be done with the DML2.1 wrapper and DC interface to remove dependencies on legacy structures and N-1 prototypes. [How] Implemented pipe_ctx->global_sync. Implemented new functions to use pipe_ctx->hubp_regs and pipe_ctx->global_sync: - hubp_setup2 - hubp_setup_interdependent2 - Several other new functions for DCN 4.01 to support newer structures Removed dml21_update_pipe_ctx_dchub_regs Removed dml21_extract_legacy_watermark_set Removed dml21_populate_pipe_ctx_dlg_param Removed outdated dcn references in DML2.1 wrapper. Reviewed-by: Austin Zheng <austin.zheng@amd.com> Reviewed-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Rafal Ostrowski <rostrows@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 16 +- .../dc/dml2/dml21/dml21_translation_helper.c | 77 --- .../dc/dml2/dml21/dml21_translation_helper.h | 2 - .../drm/amd/display/dc/dml2/dml21/dml21_utils.c | 129 +--- .../drm/amd/display/dc/dml2/dml21/dml21_utils.h | 8 +- .../drm/amd/display/dc/dml2/dml21/dml21_wrapper.c | 8 - .../dc/dml2/dml21/inc/bounding_boxes/dcn3_soc_bb.h | 401 ----------- drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c | 14 +- .../drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c | 92 +-- .../drm/amd/display/dc/hubp/dcn401/dcn401_hubp.h | 35 +- .../drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 257 +++---- .../drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.h | 17 +- .../gpu/drm/amd/display/dc/hwss/dcn35/dcn35_init.c | 4 + .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 746 ++++++++++++++++++++- .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 9 +- .../drm/amd/display/dc/hwss/dcn401/dcn401_init.c | 10 +- drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h | 12 + drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 + drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 11 + .../gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.c | 1 - .../amd/display/dc/resource/dcn10/dcn10_resource.c | 8 +- .../amd/display/dc/resource/dcn10/dcn10_resource.h | 1 + .../amd/display/dc/resource/dcn20/dcn20_resource.c | 3 +- .../display/dc/resource/dcn201/dcn201_resource.c | 3 +- .../amd/display/dc/resource/dcn21/dcn21_resource.c | 1 + .../amd/display/dc/resource/dcn30/dcn30_resource.c | 1 + .../display/dc/resource/dcn301/dcn301_resource.c | 3 +- .../display/dc/resource/dcn302/dcn302_resource.c | 1 + .../display/dc/resource/dcn303/dcn303_resource.c | 1 + .../amd/display/dc/resource/dcn31/dcn31_resource.c | 1 + .../display/dc/resource/dcn314/dcn314_resource.c | 1 + .../display/dc/resource/dcn315/dcn315_resource.c | 1 + .../display/dc/resource/dcn316/dcn316_resource.c | 1 + .../amd/display/dc/resource/dcn32/dcn32_resource.c | 1 + .../display/dc/resource/dcn321/dcn321_resource.c | 1 + .../amd/display/dc/resource/dcn35/dcn35_resource.c | 1 + .../display/dc/resource/dcn351/dcn351_resource.c | 1 + .../display/dc/resource/dcn401/dcn401_resource.c | 6 + 38 files changed, 1077 insertions(+), 810 deletions(-) commit 00d53a0d8aa863d8202c932185bd7495766bd654 Author: Michael Strauss <michael.strauss@amd.com> Date: Fri Nov 15 11:23:50 2024 -0500 drm/amd/display: Update chip_cap defines and usage [WHY] The defines have also been updated with prefix AMD_ and atomfirmware.h has been temporarily updated with both sets of defines to allow the transition. This update is being made to standardize workaround chip_cap flags, in order to support more workaround flags in the future. [HOW] Updated EXT_DISPLAY_PATH_CAPS__DP_FIXED_VS_EN define, the flag is now an enum masked by EXT_DISPLAY_PATH_CAPS__EXT_CHIP_MASK. All checks for DP_FIXED_VS_EN are now performed by masking with EXT_CHIP_MASK and checking for an exact match rather than the previous bitwise AND check. Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Signed-off-by: Michael Strauss <michael.strauss@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 9 +++++---- .../gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c | 4 ++-- .../dc/link/hwss/link_hwss_dio_fixed_vs_pe_retimer.c | 2 +- drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 14 +++++++------- drivers/gpu/drm/amd/display/dc/link/link_factory.c | 2 +- drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c | 2 +- .../drm/amd/display/dc/link/protocols/link_dp_capability.c | 2 +- .../gpu/drm/amd/display/dc/link/protocols/link_dp_phy.c | 2 +- .../drm/amd/display/dc/link/protocols/link_dp_training.c | 4 ++-- 9 files changed, 21 insertions(+), 20 deletions(-) commit 3606115ba8b888e6932725899518738d700d56d8 Author: Taimur Hassan <Syed.Hassan@amd.com> Date: Sun Dec 15 01:00:48 2024 -0500 drm/amd/display: [FW Promotion] Release 0.0.248.0 Refactoring some flags for replay Acked-by: Wayne Lin <wayne.lin@amd.com> Signed-off-by: Taimur Hassan <Syed.Hassan@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 7d8a4bffe5d1b9bb4fcba3fce0d2ccfb22c2cfca Author: Jack Chang <jack.chang@amd.com> Date: Mon Dec 16 15:02:08 2024 +0800 drm/amd/display: Add replay desync error count tracking and reset functionality [Why & How] Build-up get/reset desync error count interface and implement the functions. Reviewed-by: ChunTao Tso <chuntao.tso@amd.com> Reviewed-by: Robin Chen <robin.chen@amd.com> Signed-off-by: Jack Chang <jack.chang@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc_types.h | 2 ++ drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c | 3 +++ drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 5 +++++ drivers/gpu/drm/amd/display/modules/power/power_helpers.h | 1 + 4 files changed, 11 insertions(+) commit 59fb2d0697de0fa9e48b98414420f5a59ca5583c Author: Sung Lee <Sung.Lee@amd.com> Date: Wed Dec 11 16:27:42 2024 -0500 drm/amd/display: Log Hard Min Clocks and Phantom Pipe Status [WHY] On entering/exiting idle power, certain parameters would be very useful to know for power profiling purposes. [HOW] This commit adds certain hard min clocks and pipe types to log output on idle optimization enter/exit. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Sung Lee <Sung.Lee@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/display/dc/core/dc.c | 22 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 3 +++ 3 files changed, 41 insertions(+) commit abc0ad6d08440761b199988c329ad7ac83f41c9b Author: Gabe Teeger <Gabe.Teeger@amd.com> Date: Fri Dec 13 15:15:00 2024 -0500 drm/amd/display: Limit Scaling Ratio on DCN3.01 [why] Underflow and flickering was occuring due to high scaling ratios when resizing videos. [how] Limit the scaling ratios by increasing the max scaling factor Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Gabe Teeger <Gabe.Teeger@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d477e39532d725b1cdb3c8005c689c74ffbf3b94 Author: Alex Deucher <alexander.deucher@amd.com> Date: Wed Jan 8 15:17:12 2025 -0500 drm/amdgpu/smu13: update powersave optimizations Only apply when compute profile is selected. This is the only supported configuration. Selecting other profiles can lead to performane degradations. Reviewed-by: Kenneth Feng <kenneth.feng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 7594874227e1b046e08799bd4d965494c861a573 Author: Kun Liu <Kun.Liu2@amd.com> Date: Wed Jan 8 17:18:49 2025 +0800 drm/amd/display: add CEC notifier to amdgpu driver This patch adds the cec_notifier feature to amdgpu driver. The changes will allow amdgpu driver code to notify EDID and HPD changes to an eventual CEC adapter. Signed-off-by: Kun Liu <Kun.Liu2@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/Kconfig | 2 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 76 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 6 ++ .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 66 ++++++++++++++++++- drivers/gpu/drm/amd/include/amd_shared.h | 5 ++ 5 files changed, 154 insertions(+), 1 deletion(-) commit 067cdf020329a07dd8ee1574c3086998343b1b2b Author: Eugen Hristev <eugen.hristev@linaro.org> Date: Fri Jan 10 14:57:14 2025 +0200 pstore/zone: avoid dereferencing zero sized ptr after init zones In psz_init_zones, if the requested area has a total_size less than record_size, kcalloc will be called with c == 0 and will return ZERO_SIZE_PTR. Further, this will lead to an oops. With this patch, in this scenario, it will look like this : [ 6.865545] pstore_zone: total size : 28672 Bytes [ 6.865547] pstore_zone: kmsg size : 65536 Bytes [ 6.865549] pstore_zone: pmsg size : 0 Bytes [ 6.865551] pstore_zone: console size : 0 Bytes [ 6.865553] pstore_zone: ftrace size : 0 Bytes [ 6.872095] pstore_zone: zone dmesg total_size too small [ 6.878234] pstore_zone: alloc zones failed Signed-off-by: Eugen Hristev <eugen.hristev@linaro.org> Link: https://lore.kernel.org/r/20250110125714.2594719-1-eugen.hristev@linaro.org Signed-off-by: Kees Cook <kees@kernel.org> fs/pstore/zone.c | 5 +++++ 1 file changed, 5 insertions(+) commit 55cf2f4b945f6a6416cc2524ba740b83cc9af25a Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Wed Dec 4 15:07:15 2024 +0300 binfmt_flat: Fix integer overflow bug on 32 bit systems Most of these sizes and counts are capped at 256MB so the math doesn't result in an integer overflow. The "relocs" count needs to be checked as well. Otherwise on 32bit systems the calculation of "full_data" could be wrong. full_data = data_len + relocs * sizeof(unsigned long); Fixes: c995ee28d29d ("binfmt_flat: prevent kernel dammage from corrupted executable headers") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Nicolas Pitre <npitre@baylibre.com> Link: https://lore.kernel.org/r/5be17f6c-5338-43be-91ef-650153b975cb@stanley.mountain Signed-off-by: Kees Cook <kees@kernel.org> fs/binfmt_flat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7579790915387396e26041ceafbc07348658edef Author: Cezary Rojewski <cezary.rojewski@intel.com> Date: Fri Jan 10 12:33:25 2025 +0100 ALSA: hda: Fix compilation of snd_hdac_adsp_xxx() helpers The snd_hdac_adsp_xxx() wrap snd_hdac_reg_xxx() helpers to simplify register access for AudioDSP drivers e.g.: the avs-driver. Byte- and word-variants of said helps do not expand to bare readx/writex() operations but functions instead and, due to pointer type incompatibility, cause compilation to fail. As the macros are utilized by the avs-driver alone, relocate the code introduced with commit c19bd02e9029 ("ALSA: hda: Add helper macros for DSP capable devices") into the avs/ directory and update it to operate on 'adev' i.e.: the avs-driver-context directly to fix the issue. Fixes: c19bd02e9029 ("ALSA: hda: Add helper macros for DSP capable devices") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20250110113326.3809897-2-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de> include/sound/hdaudio_ext.h | 45 ----------------------------------------- sound/soc/intel/avs/apl.c | 1 + sound/soc/intel/avs/cnl.c | 1 + sound/soc/intel/avs/registers.h | 45 +++++++++++++++++++++++++++++++++++++++++ sound/soc/intel/avs/skl.c | 1 + 5 files changed, 48 insertions(+), 45 deletions(-) commit fc7d5e3210ae083a29ce224ffce18eaf3d1c645a Author: Matthew Maurer <mmaurer@google.com> Date: Fri Jan 3 17:37:02 2025 +0000 modpost: Produce extended MODVERSIONS information Generate both the existing modversions format and the new extended one when running modpost. Presence of this metadata in the final .ko is guarded by CONFIG_EXTENDED_MODVERSIONS. We no longer generate an error on long symbols in modpost if CONFIG_EXTENDED_MODVERSIONS is set, as they can now be appropriately encoded in the extended section. These symbols will be skipped in the previous encoding. An error will still be generated if CONFIG_EXTENDED_MODVERSIONS is not set. Reviewed-by: Sami Tolvanen <samitolvanen@google.com> Signed-off-by: Matthew Maurer <mmaurer@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> kernel/module/Kconfig | 10 ++++++++ scripts/Makefile.modpost | 1 + scripts/mod/modpost.c | 62 ++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 69 insertions(+), 4 deletions(-) commit 54ac1ac8edeb74ff87fc880d1ee58785bdcbe323 Author: Matthew Maurer <mmaurer@google.com> Date: Fri Jan 3 17:37:01 2025 +0000 modules: Support extended MODVERSIONS info Adds a new format for MODVERSIONS which stores each field in a separate ELF section. This initially adds support for variable length names, but could later be used to add additional fields to MODVERSIONS in a backwards compatible way if needed. Any new fields will be ignored by old user tooling, unlike the current format where user tooling cannot tolerate adjustments to the format (for example making the name field longer). Since PPC munges its version records to strip leading dots, we reproduce the munging for the new format. Other architectures do not appear to have architecture-specific usage of this information. Reviewed-by: Sami Tolvanen <samitolvanen@google.com> Signed-off-by: Matthew Maurer <mmaurer@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> arch/powerpc/kernel/module_64.c | 24 ++++++++++- kernel/module/internal.h | 11 +++++ kernel/module/main.c | 92 +++++++++++++++++++++++++++++++++++++---- kernel/module/version.c | 45 ++++++++++++++++++++ 4 files changed, 162 insertions(+), 10 deletions(-) commit 8c6d7b417f0fe69d7e29501db801838a54c6764b Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:40 2025 +0000 Documentation/kbuild: Add DWARF module versioning Add documentation for gendwarfksyms changes, and the kABI stability features that can be useful for distributions even though they're not used in mainline kernels. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Documentation/kbuild/gendwarfksyms.rst | 308 +++++++++++++++++++++++++++++++++ Documentation/kbuild/index.rst | 1 + 2 files changed, 309 insertions(+) commit 9c3681f9b9fd12cdbc4a542df599f1837512f3d5 Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:39 2025 +0000 kbuild: Add gendwarfksyms as an alternative to genksyms When MODVERSIONS is enabled, allow selecting gendwarfksyms as the implementation, but default to genksyms. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> kernel/module/Kconfig | 22 ++++++++++++++++++++++ scripts/Makefile | 2 +- scripts/Makefile.build | 35 +++++++++++++++++++++++++++++------ 3 files changed, 52 insertions(+), 7 deletions(-) commit d7476f24c9aa93d02ef3fd8d587a6114387b7667 Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:38 2025 +0000 export: Add __gendwarfksyms_ptr_ references to exported symbols With gendwarfksyms, we need each TU where the EXPORT_SYMBOL() macro is used to also contain DWARF type information for the symbols it exports. However, as a TU can also export external symbols and compilers may choose not to emit debugging information for symbols not defined in the current TU, the missing types will result in missing symbol versions. Stand-alone assembly code also doesn't contain type information for exported symbols, so we need to compile a temporary object file with asm-prototypes.h instead, and similarly need to ensure the DWARF in the temporary object file contains the necessary types. To always emit type information for external exports, add explicit __gendwarfksyms_ptr_<symbol> references to them in EXPORT_SYMBOL(). gendwarfksyms will use the type information for __gendwarfksyms_ptr_* if needed. Discard the pointers from the final binary to avoid further bloat. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> include/linux/export.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit fa624569b70d8015775592ae7e2c514009367541 Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:37 2025 +0000 gendwarfksyms: Add support for symbol type pointers The compiler may choose not to emit type information in DWARF for external symbols. Clang, for example, does this for symbols not defined in the current TU. To provide a way to work around this issue, add support for __gendwarfksyms_ptr_<symbol> pointers that force the compiler to emit the necessary type information in DWARF also for the missing symbols. Example usage: #define GENDWARFKSYMS_PTR(sym) \ static typeof(sym) *__gendwarfksyms_ptr_##sym __used \ __section(".discard.gendwarfksyms") = &sym; extern int external_symbol(void); GENDWARFKSYMS_PTR(external_symbol); Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/gendwarfksyms/dwarf.c | 55 +++++++++++++++++++++++++++++- scripts/gendwarfksyms/examples/symbolptr.c | 33 ++++++++++++++++++ scripts/gendwarfksyms/gendwarfksyms.h | 7 ++++ scripts/gendwarfksyms/symbols.c | 27 +++++++++++++++ 4 files changed, 121 insertions(+), 1 deletion(-) commit a93694188127a5f7ba3baa2f98b275ce388a5246 Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:36 2025 +0000 gendwarfksyms: Add support for reserved and ignored fields Distributions that want to maintain a stable kABI need the ability to make ABI compatible changes to kernel data structures without affecting symbol versions, either because of LTS updates or backports. With genksyms, developers would typically hide these changes from version calculation with #ifndef __GENKSYMS__, which would result in the symbol version not changing even though the actual type has changed. When we process precompiled object files, this isn't an option. Change union processing to recognize field name prefixes that allow the user to ignore the union completely during symbol versioning with a __kabi_ignored prefix in a field name, or to replace the type of a placeholder field using a __kabi_reserved field name prefix. For example, assume we want to add a new field to an existing alignment hole in a data structure, and ignore the new field when calculating symbol versions: struct struct1 { int a; /* a 4-byte alignment hole */ unsigned long b; }; To add `int n` to the alignment hole, we can add a union that includes a __kabi_ignored field that causes gendwarfksyms to ignore the entire union: struct struct1 { int a; union { char __kabi_ignored_0; int n; }; unsigned long b; }; With --stable, both structs produce the same symbol version. Alternatively, when a distribution expects future modification to a data structure, they can explicitly add reserved fields: struct struct2 { long a; long __kabi_reserved_0; /* reserved for future use */ }; To take the field into use, we can again replace it with a union, with one of the fields keeping the __kabi_reserved name prefix to indicate the original type: struct struct2 { long a; union { long __kabi_reserved_0; struct { int b; int v; }; }; Here gendwarfksyms --stable replaces the union with the type of the placeholder field when calculating versions. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/gendwarfksyms/dwarf.c | 248 ++++++++++++++++++++++++++++++- scripts/gendwarfksyms/examples/kabi.h | 87 +++++++++++ scripts/gendwarfksyms/examples/kabi_ex.c | 16 ++ scripts/gendwarfksyms/examples/kabi_ex.h | 199 +++++++++++++++++++++++++ scripts/gendwarfksyms/gendwarfksyms.h | 9 ++ 5 files changed, 558 insertions(+), 1 deletion(-) commit 936cf61c3ef5d6dad714d6c01a85704027dddeb9 Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:35 2025 +0000 gendwarfksyms: Add support for kABI rules Distributions that want to maintain a stable kABI need the ability to make ABI compatible changes to kernel without affecting symbol versions, either because of LTS updates or backports. With genksyms, developers would typically hide these changes from version calculation with #ifndef __GENKSYMS__, which would result in the symbol version not changing even though the actual type has changed. When we process precompiled object files, this isn't an option. To support this use case, add a --stable command line flag that gates kABI stability features that are not needed in mainline kernels, but can be useful for distributions, and add support for kABI rules, which can be used to restrict gendwarfksyms output. The rules are specified as a set of null-terminated strings stored in the .discard.gendwarfksyms.kabi_rules section. Each rule consists of four strings as follows: "version\0type\0target\0value" The version string ensures the structure can be changed in a backwards compatible way. The type string indicates the type of the rule, and target and value strings contain rule-specific data. Initially support two simple rules: 1. Declaration-only types A type declaration can change into a full definition when additional includes are pulled in to the TU, which changes the versions of any symbol that references the type. Add support for defining declaration-only types whose definition is not expanded during versioning. 2. Ignored enumerators It's possible to add new enum fields without changing the ABI, but as the fields are included in symbol versioning, this would change the versions. Add support for ignoring specific fields. 3. Overridden enumerator values Add support for overriding enumerator values when calculating versions. This may be needed when the last field of the enum is used as a sentinel and new fields must be added before it. Add examples for using the rules under the examples/ directory. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/gendwarfksyms/Makefile | 1 + scripts/gendwarfksyms/dwarf.c | 25 ++- scripts/gendwarfksyms/examples/kabi.h | 70 +++++++ scripts/gendwarfksyms/examples/kabi_ex.c | 14 ++ scripts/gendwarfksyms/examples/kabi_ex.h | 64 ++++++ scripts/gendwarfksyms/gendwarfksyms.c | 11 +- scripts/gendwarfksyms/gendwarfksyms.h | 14 ++ scripts/gendwarfksyms/kabi.c | 336 +++++++++++++++++++++++++++++++ 8 files changed, 531 insertions(+), 4 deletions(-) commit 71378888018833a1cdcbf72f1e95d7c010542d8b Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:34 2025 +0000 gendwarfksyms: Add symbol versioning Calculate symbol versions from the fully expanded type strings in type_map, and output the versions in a genksyms-compatible format. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/gendwarfksyms/Makefile | 2 +- scripts/gendwarfksyms/dwarf.c | 25 ++++++- scripts/gendwarfksyms/gendwarfksyms.c | 10 ++- scripts/gendwarfksyms/gendwarfksyms.h | 13 +++- scripts/gendwarfksyms/symbols.c | 53 +++++++++++++++ scripts/gendwarfksyms/types.c | 122 +++++++++++++++++++++++++++++++++- 6 files changed, 216 insertions(+), 9 deletions(-) commit ab4439981f8549b013f4ea0b274b7c77c88ab4bc Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:33 2025 +0000 gendwarfksyms: Add symtypes output Add support for producing genksyms-style symtypes files. Process die_map to find the longest expansions for each type, and use symtypes references in type definitions. The basic file format is similar to genksyms, with two notable exceptions: 1. Type names with spaces (common with Rust) in references are wrapped in single quotes. E.g.: s#'core::result::Result<u8, core::num::error::ParseIntError>' 2. The actual type definition is the simple parsed DWARF format we output with --dump-dies, not the preprocessed C-style format genksyms produces. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/gendwarfksyms/Makefile | 1 + scripts/gendwarfksyms/die.c | 11 ++ scripts/gendwarfksyms/dwarf.c | 1 + scripts/gendwarfksyms/gendwarfksyms.c | 33 +++- scripts/gendwarfksyms/gendwarfksyms.h | 19 ++ scripts/gendwarfksyms/symbols.c | 4 +- scripts/gendwarfksyms/types.c | 363 ++++++++++++++++++++++++++++++++++ 7 files changed, 429 insertions(+), 3 deletions(-) commit d2ffdc1c9a0ee71b30e25fbe3e2a37bf4c146085 Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:32 2025 +0000 gendwarfksyms: Add die_map debugging Debugging the DWARF processing can be somewhat challenging, so add more detailed debugging output for die_map operations. Add the --dump-die-map flag, which adds color coded tags to the output for die_map changes. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/gendwarfksyms/dwarf.c | 15 +++++++++++++++ scripts/gendwarfksyms/gendwarfksyms.c | 7 +++++++ scripts/gendwarfksyms/gendwarfksyms.h | 13 +++++++++++++ 3 files changed, 35 insertions(+) commit f936c129fd4c3ce495768374ea48e5b736655046 Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:31 2025 +0000 gendwarfksyms: Limit structure expansion Expand each structure type only once per exported symbol. This is necessary to support self-referential structures, which would otherwise result in infinite recursion, and it's sufficient for catching ABI changes. Types defined in .c files are opaque to external users and thus cannot affect the ABI. Consider type definitions in .c files to be declarations to prevent opaque types from changing symbol versions. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/gendwarfksyms/Makefile | 1 + scripts/gendwarfksyms/cache.c | 51 ++++++++++++++ scripts/gendwarfksyms/dwarf.c | 125 +++++++++++++++++++++++++++++++--- scripts/gendwarfksyms/gendwarfksyms.h | 46 +++++++++++++ 4 files changed, 215 insertions(+), 8 deletions(-) commit f6bb92455a5e5b2241d2e1f3e240c5fc036c55cb Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:30 2025 +0000 gendwarfksyms: Expand structure types Recursively expand DWARF structure types, i.e. structs, unions, and enums. Also include relevant DWARF attributes in type strings to encode structure layout, for example. Example output with --dump-dies: subprogram ( formal_parameter structure_type &str { member pointer_type { base_type u8 byte_size(1) encoding(7) } data_ptr data_member_location(0) , member base_type usize byte_size(8) encoding(7) length data_member_location(8) } byte_size(16) alignment(8) msg ) -> base_type void Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/gendwarfksyms/dwarf.c | 138 +++++++++++++++++++++++++++++++++- scripts/gendwarfksyms/gendwarfksyms.h | 5 ++ 2 files changed, 141 insertions(+), 2 deletions(-) commit c772f1d1eaac608c083ee79fd5cfbe879958eb3e Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:29 2025 +0000 gendwarfksyms: Expand array_type Add support for expanding DW_TAG_array_type, and the subrange type indicating array size. Example source code: const char *s[34]; Output with --dump-dies: variable array_type[34] { pointer_type { const_type { base_type char byte_size(1) encoding(6) } } byte_size(8) } Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/gendwarfksyms/dwarf.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 220a0857f3a89e0dce3fc7c38d981df41c4537a7 Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:28 2025 +0000 gendwarfksyms: Expand subroutine_type Add support for expanding DW_TAG_subroutine_type and the parameters in DW_TAG_formal_parameter. Use this to also expand subprograms. Example output with --dump-dies: subprogram ( formal_parameter pointer_type { const_type { base_type char byte_size(1) encoding(6) } } ) -> base_type unsigned long byte_size(8) encoding(7) Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/gendwarfksyms/dwarf.c | 84 +++++++++++++++++++++++++++++++++-- scripts/gendwarfksyms/gendwarfksyms.h | 4 ++ 2 files changed, 85 insertions(+), 3 deletions(-) commit 06b8b036ab9c1e70a562705a398bcd271e0b5ebf Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:27 2025 +0000 gendwarfksyms: Expand type modifiers and typedefs Add support for expanding DWARF type modifiers, such as pointers, const values etc., and typedefs. These types all have DW_AT_type attribute pointing to the underlying type, and thus produce similar output. Also add linebreaks and indentation to debugging output to make it more readable. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/gendwarfksyms/die.c | 12 +++++++ scripts/gendwarfksyms/dwarf.c | 67 +++++++++++++++++++++++++++++++++++ scripts/gendwarfksyms/gendwarfksyms.h | 5 +++ 3 files changed, 84 insertions(+) commit 0c1c76274e88c420779c3aea077f9812bd16edaa Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:26 2025 +0000 gendwarfksyms: Add a cache for processed DIEs Basic types in DWARF repeat frequently and traversing the DIEs using libdw is relatively slow. Add a simple hashtable based cache for the processed DIEs. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/gendwarfksyms/Makefile | 1 + scripts/gendwarfksyms/die.c | 143 ++++++++++++++++++++++++++++++++++ scripts/gendwarfksyms/dwarf.c | 136 +++++++++++++++++++++++--------- scripts/gendwarfksyms/gendwarfksyms.c | 6 ++ scripts/gendwarfksyms/gendwarfksyms.h | 63 ++++++++++++++- 5 files changed, 308 insertions(+), 41 deletions(-) commit 5b7780e86857f70249df2c4f8982cad3ba931eee Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:25 2025 +0000 gendwarfksyms: Expand base_type Start making gendwarfksyms more useful by adding support for expanding DW_TAG_base_type types and basic DWARF attributes. Example: $ echo loops_per_jiffy | \ scripts/gendwarfksyms/gendwarfksyms \ --debug --dump-dies vmlinux.o ... gendwarfksyms: process_symbol: loops_per_jiffy variable base_type unsigned long byte_size(8) encoding(7) ... Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/gendwarfksyms/dwarf.c | 160 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) commit e982abf43749529687dd1d07fa4f495902910cf2 Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:24 2025 +0000 gendwarfksyms: Add address matching The compiler may choose not to emit type information in DWARF for all aliases, but it's possible for each alias to be exported separately. To ensure we find type information for the aliases as well, read {section, address} tuples from the symbol table and match symbols also by address. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/gendwarfksyms/gendwarfksyms.c | 2 + scripts/gendwarfksyms/gendwarfksyms.h | 13 +++ scripts/gendwarfksyms/symbols.c | 161 ++++++++++++++++++++++++++++++++++ 3 files changed, 176 insertions(+) commit f28568841ae0a0dd48dfc5400aaebedf10a54d10 Author: Sami Tolvanen <samitolvanen@google.com> Date: Fri Jan 3 20:45:23 2025 +0000 tools: Add gendwarfksyms Add a basic DWARF parser, which uses libdw to traverse the debugging information in an object file and looks for functions and variables. In follow-up patches, this will be expanded to produce symbol versions for CONFIG_MODVERSIONS from DWARF. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> MAINTAINERS | 7 ++ kernel/module/Kconfig | 8 ++ scripts/Makefile | 1 + scripts/gendwarfksyms/.gitignore | 2 + scripts/gendwarfksyms/Makefile | 8 ++ scripts/gendwarfksyms/dwarf.c | 166 ++++++++++++++++++++++++++++++++++ scripts/gendwarfksyms/gendwarfksyms.c | 128 ++++++++++++++++++++++++++ scripts/gendwarfksyms/gendwarfksyms.h | 95 +++++++++++++++++++ scripts/gendwarfksyms/symbols.c | 98 ++++++++++++++++++++ 9 files changed, 513 insertions(+) commit 55e6502ef7114688e294e6835cf1635f4f1ba214 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Tue Jan 7 14:11:11 2025 +0100 dt-bindings: interrupt-controller: ti,omap4-wugen-mpu: Add file extension Add TXT file extension so the format of binding will be explicit (we have also bindins in YAML). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250107131111.246969-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org> .../interrupt-controller/{ti,omap4-wugen-mpu => ti,omap4-wugen-mpu.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit 94edc3cee989784eeccfaab4db4eff84de17f714 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Tue Jan 7 14:11:08 2025 +0100 dt-bindings: interrupt-controller: 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 <krzysztof.kozlowski@linaro.org> Acked-by: Andrew Jeffery <andrew@codeconstruct.com.au> # aspeed,ast2400-vic.yaml Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/20250107131108.246898-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org> .../interrupt-controller/aspeed,ast2400-vic.yaml | 10 ++++---- .../interrupt-controller/brcm,bcm7120-l2-intc.yaml | 30 +++++++++++----------- 2 files changed, 20 insertions(+), 20 deletions(-) commit 52659fab5a4a040162471fe91023134c29c83daa Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Tue Jan 7 13:58:51 2025 +0100 dt-bindings: display: 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 <krzysztof.kozlowski@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # msm Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> # renesas Link: https://lore.kernel.org/r/20250107125854.227233-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org> .../bindings/display/amlogic,meson-dw-hdmi.yaml | 8 +- .../display/bridge/fsl,imx8mp-hdmi-tx.yaml | 32 +++--- .../bindings/display/bridge/samsung,mipi-dsim.yaml | 72 ++++++------- .../bindings/display/mediatek/mediatek,aal.yaml | 52 ++++----- .../bindings/display/msm/dsi-controller-main.yaml | 118 ++++++++++----------- .../bindings/display/msm/dsi-phy-10nm.yaml | 48 ++++----- .../bindings/display/msm/dsi-phy-14nm.yaml | 34 +++--- .../bindings/display/msm/dsi-phy-20nm.yaml | 36 +++---- .../bindings/display/msm/dsi-phy-28nm.yaml | 34 +++--- .../bindings/display/msm/dsi-phy-7nm.yaml | 34 +++--- .../bindings/display/msm/qcom,sa8775p-mdss.yaml | 7 +- .../devicetree/bindings/display/renesas,cmm.yaml | 12 +-- 12 files changed, 243 insertions(+), 244 deletions(-) commit 226d6cb3cb799aae46d0dd19a521133997d9db11 Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Fri Jan 10 15:45:22 2025 +0100 spi: spi-mem: Estimate the time taken by operations In the SPI-NAND layer, we currently make list of operation variants from the fastest one to the slowest and there is a bit of logic in the core to go over them and pick the first one that is supported by the controller, ie. the fastest one among the supported ops. This kind of logic only works if all operations run at the same frequency, but as soon as we introduce per operation max frequencies it is not longer as obvious which operation will be faster, especially since it also depends on the PCB/controller frequency limitation. One way to make this choice more clever is to go over all the variants and for each of them derive an indicator which will help derive the theoretical best. In this case, we derive a theoretical duration for the entire operation and we take the smallest one. Add a helper that parses the spi-mem operation and returns this value. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20250110-winbond-6-11-rc1-quad-support-v3-20-7ab4bd56cf6e@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-mem.c | 30 ++++++++++++++++++++++++++++++ include/linux/spi/spi-mem.h | 1 + 2 files changed, 31 insertions(+) commit e966eae72762ecfdbdb82627e2cda48845b9dd66 Author: Ekansh Gupta <quic_ekangupt@quicinc.com> Date: Fri Jan 10 13:42:39 2025 +0000 misc: fastrpc: Fix copy buffer page size For non-registered buffer, fastrpc driver copies the buffer and pass it to the remote subsystem. There is a problem with current implementation of page size calculation which is not considering the offset in the calculation. This might lead to passing of improper and out-of-bounds page size which could result in memory issue. Calculate page start and page end using the offset adjusted address instead of absolute address. Fixes: 02b45b47fbe8 ("misc: fastrpc: fix remote page size calculation") Cc: stable@kernel.org Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20250110134239.123603-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/fastrpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6ca4ea1f88a06a04ed7b2c9c6bf9f00833b68214 Author: Ekansh Gupta <quic_ekangupt@quicinc.com> Date: Fri Jan 10 13:42:38 2025 +0000 misc: fastrpc: Fix registered buffer page address For registered buffers, fastrpc driver sends the buffer information to remote subsystem. There is a problem with current implementation where the page address is being sent with an offset leading to improper buffer address on DSP. This is leads to functional failures as DSP expects base address in page information and extracts offset information from remote arguments. Mask the offset and pass the base page address to DSP. This issue is observed is a corner case when some buffer which is registered with fastrpc framework is passed with some offset by user and then the DSP implementation tried to read the data. As DSP expects base address and takes care of offsetting with remote arguments, passing an offsetted address will result in some unexpected data read in DSP. All generic usecases usually pass the buffer as it is hence is problem is not usually observed. If someone tries to pass offsetted buffer and then tries to compare data at HLOS and DSP end, then the ambiguity will be observed. Fixes: 80f3afd72bd4 ("misc: fastrpc: consider address offset before sending to DSP") Cc: stable@kernel.org Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20250110134239.123603-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/fastrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 637c20002dc8c347001292664055bfbf56544ec6 Author: Anandu Krishnan E <quic_anane@quicinc.com> Date: Fri Jan 10 13:42:37 2025 +0000 misc: fastrpc: Deregister device nodes properly in error scenarios During fastrpc_rpmsg_probe, if secure device node registration succeeds but non-secure device node registration fails, the secure device node deregister is not called during error cleanup. Add proper exit paths to ensure proper cleanup in case of error. Fixes: 3abe3ab3cdab ("misc: fastrpc: add secure domain support") Cc: stable@kernel.org Signed-off-by: Anandu Krishnan E <quic_anane@quicinc.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20250110134239.123603-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/fastrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31507fc2ad36e0071751a710449db19c85d82a7f Author: Jennifer Berringer <jberring@redhat.com> Date: Mon Dec 30 14:19:01 2024 +0000 nvmem: core: improve range check for nvmem_cell_write() When __nvmem_cell_entry_write() is called for an nvmem cell that does not need bit shifting, it requires that the len parameter exactly matches the nvmem cell size. However, when the nvmem cell has a nonzero bit_offset, it was skipping this check. Accepting values of len larger than the cell size results in nvmem_cell_prepare_write_buffer() trying to write past the end of a heap buffer that it allocates. Add a check to avoid that problem and instead return -EINVAL when len doesn't match the number of bits expected by the nvmem cell when bit_offset is nonzero. This check uses cell->nbits in order to allow providing the smaller size to cells that are shifted into another byte by bit_offset. For example, a cell with nbits=8 and nonzero bit_offset would have bytes=2 but should accept a 1-byte write here, although no current callers depend on this. Fixes: 69aba7948cbe ("nvmem: Add a simple NVMEM framework for consumers") Cc: stable@vger.kernel.org Signed-off-by: Jennifer Berringer <jberring@redhat.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230141901.263976-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/nvmem/core.c | 2 ++ 1 file changed, 2 insertions(+) commit e88f516ea417c71bb3702603ac6af9e95338cfa6 Author: Luca Weiss <luca.weiss@fairphone.com> Date: Mon Dec 30 14:19:00 2024 +0000 nvmem: qcom-spmi-sdam: Set size in struct nvmem_config Let the nvmem core know what size the SDAM is, most notably this fixes the size of /sys/bus/nvmem/devices/spmi_sdam*/nvmem being '0' and makes user space work with that file. ~ # hexdump -C -s 64 /sys/bus/nvmem/devices/spmi_sdam2/nvmem 00000040 02 01 00 00 04 00 00 00 00 00 00 00 00 00 00 00 |................| 00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000080 Fixes: 40ce9798794f ("nvmem: add QTI SDAM driver") Cc: stable@vger.kernel.org Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230141901.263976-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/nvmem/qcom-spmi-sdam.c | 1 + 1 file changed, 1 insertion(+) commit 1b2cb4d0b5b6a9d9fe78470704309ec75f8a1c3a Author: Sascha Hauer <s.hauer@pengutronix.de> Date: Mon Dec 30 14:18:59 2024 +0000 nvmem: imx-ocotp-ele: set word length to 1 The ELE hardware internally has a word length of 4. However, among other things we store MAC addresses in the ELE OCOTP. With a length of 6 bytes these are naturally unaligned to the word length. Therefore we must support unaligned reads in reg_read() and indeed it works properly when reg_read() is called via nvmem_reg_read(). Setting the word size to 4 has the only visible effect that doing unaligned reads from userspace via bin_attr_nvmem_read() do not work because they are rejected by that function. Given that we have to abstract from word accesses to byte accesses in the driver, set the word size to 1. This allows bytewise accesses from userspace to be able to test what the driver has to support anyway. Fixes: 22e9e6fcfb50 ("nvmem: imx: support i.MX93 OCOTP") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: stable <stable@kernel.org> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230141901.263976-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/nvmem/imx-ocotp-ele.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 391b06ecb63e6eacd054582cb4eb738dfbf5eb77 Author: Sascha Hauer <s.hauer@pengutronix.de> Date: Mon Dec 30 14:18:58 2024 +0000 nvmem: imx-ocotp-ele: fix MAC address byte order According to the i.MX93 Fusemap the two MAC addresses are stored in words 315 to 317 like this: 315 MAC1_ADDR_31_0[31:0] 316 MAC1_ADDR_47_32[47:32] MAC2_ADDR_15_0[15:0] 317 MAC2_ADDR_47_16[31:0] This means the MAC addresses are stored in reverse byte order. We have to swap the bytes before passing them to the upper layers. The storage format is consistent to the one used on i.MX6 using imx-ocotp driver which does the same byte swapping as introduced here. With this patch the MAC address on my i.MX93 TQ board correctly reads as 00:d0:93:6b:27:b8 instead of b8:27:6b:93:d0:00. Fixes: 22e9e6fcfb50 ("nvmem: imx: support i.MX93 OCOTP") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: stable <stable@kernel.org> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230141901.263976-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/nvmem/imx-ocotp-ele.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 3c9e2cb6cecf65f7501004038c5d1ed85fb7db84 Author: Sascha Hauer <s.hauer@pengutronix.de> Date: Mon Dec 30 14:18:57 2024 +0000 nvmem: imx-ocotp-ele: fix reading from non zero offset In imx_ocotp_reg_read() the offset comes in as bytes and not as words. This means we have to divide offset by 4 to get to the correct word offset. Also the incoming offset might not be word aligned. In order to read from the OCOTP the driver aligns down the previous word boundary and reads from there. This means we have to skip this alignment offset from the temporary buffer when copying the data to the output buffer. Fixes: 22e9e6fcfb50 ("nvmem: imx: support i.MX93 OCOTP") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: stable <stable@kernel.org> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230141901.263976-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/nvmem/imx-ocotp-ele.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 343aa1e289e8e3dba5e3d054c4eb27da7b4e1ecc Author: Sascha Hauer <s.hauer@pengutronix.de> Date: Mon Dec 30 14:18:56 2024 +0000 nvmem: imx-ocotp-ele: simplify read beyond device check Do the read beyond device check on function entry in bytes instead of 32bit words which is easier to follow. Fixes: 22e9e6fcfb50 ("nvmem: imx: support i.MX93 OCOTP") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: stable <stable@kernel.org> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230141901.263976-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/nvmem/imx-ocotp-ele.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5bd97a54da956ecf88992ea459dc0cccacc72c6d Author: Lukas Bulwahn <lukas.bulwahn@redhat.com> Date: Fri Jan 10 11:50:00 2025 +0100 pps: adjust references to actual name of uapi header file Commit 86b525bed275 ("drivers pps: add PPS generators support") adds a file entry in MAINTAINERS and a reference in the ioctl-number documentation referring to the file pps-gen.h, whereas the file added in this commit is named pps_gen.h. Adjust the two references to the actual name of the uapi header file. While at it, put the entry in MAINTAINERS at the right place for alphabetical ordering. Fixes: 86b525bed275 ("drivers pps: add PPS generators support") Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com> Link: https://lore.kernel.org/r/20250110105000.56228-1-lukas.bulwahn@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/userspace-api/ioctl/ioctl-number.rst | 2 +- MAINTAINERS | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e364374369b365351ad8ad69a10b5f7861f24bcd Author: Alyssa Ross <hi@alyssa.is> Date: Thu Jan 9 20:38:07 2025 +0100 VMCI: fix reference to ioctl-number.rst There has never been an ioctl-number.h — this must have been a typo for ioctl-number.txt (which later become ioctl-number.rst). At the time this comment was written, the note didn't actually end up appearing anywhere, but I fixed the omission from ioctl-number.rst in 0a8e4dc1d353 ("Documentation: ioctl: document 0x07 ioctl code"). Fixes: 20259849bb1a ("VMCI: Some header and config files.") Signed-off-by: Alyssa Ross <hi@alyssa.is> Link: https://lore.kernel.org/r/re3xng4uwull2cu53xnu5dtv3wlstfiv3v7rmbwtw2qbvj5mo3@q45iujse5ovc Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> include/linux/vmw_vmci_defs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4cabaa0517a9c6157ef5e953825dcd1907ff4d69 Author: David Reaver <me@davidreaver.com> Date: Wed Jan 8 19:59:02 2025 -0800 virtio: console: Replace deprecated kmap_atomic with kmap_local_page kmap_atomic() is deprecated and should be replaced with kmap_local_page() [1][2]. kmap_local_page() is faster in kernels with HIGHMEM enabled, can take page faults, and allows preemption. According to [2], this replacement is safe as long as the code between kmap_atomic() and kunmap_atomic() does not implicitly depend on disabling page faults or preemption. In this patch, the only thing happening between mapping and unmapping the page is a memcpy, and I don't suspect it depends on disabling page faults or preemption. [1] https://lwn.net/Articles/836144/ [2] https://docs.kernel.org/mm/highmem.html#temporary-virtual-mappings Signed-off-by: David Reaver <me@davidreaver.com> Reviewed-by: Amit Shah <amit@kernel.org> Link: https://lore.kernel.org/r/20250109035904.168345-1-me@davidreaver.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/char/virtio_console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a01f6287c244f35eeec11ca932d09061181eed8c Author: Bastien Curutchet <bastien.curutchet@bootlin.com> Date: Wed Jan 8 16:30:12 2025 +0100 pps: clients: gpio: Bypass edge's direction check when not needed In the IRQ handler, the GPIO's state is read to verify the direction of the edge that triggered the interruption before generating the PPS event. If a pulse is too short, the GPIO line can reach back its original state before this verification and the PPS event is lost. This check is needed when info->capture_clear is set because it needs interruptions on both rising and falling edges. When info->capture_clear is not set, interruption is triggered by one edge only so this check can be omitted. Add a warning if irq_handler is left without triggering any PPS event. Bypass the edge's direction verification when info->capture_clear is not set. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Acked-by: Rodolfo Giometti <giometti@enneenne.com> Link: https://lore.kernel.org/r/20250108153012.514925-1-bastien.curutchet@bootlin.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/pps/clients/pps-gpio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 422c9727b07f9f86e2ec11c56622e566221591cc Author: John Ogness <john.ogness@linutronix.de> Date: Tue Jan 7 22:33:02 2025 +0106 serial: 8250: Revert "drop lockdep annotation from serial8250_clear_IER()" The 8250 driver no longer depends on @oops_in_progress and will no longer violate the port->lock locking constraints. This reverts commit 3d9e6f556e235ddcdc9f73600fdd46fe1736b090. Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20250107212702.169493-7-john.ogness@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/8250/8250_port.c | 3 +++ 1 file changed, 3 insertions(+) commit b63e6f60eab45b16a1bf734fef9035a4c4187cd5 Author: John Ogness <john.ogness@linutronix.de> Date: Tue Jan 7 22:33:01 2025 +0106 serial: 8250: Switch to nbcon console Implement the necessary callbacks to switch the 8250 console driver to perform as an nbcon console. Add implementations for the nbcon console callbacks: ->write_atomic() ->write_thread() ->device_lock() ->device_unlock() and add CON_NBCON to the initial @flags. All register access in the callbacks are within unsafe sections. The ->write_atomic() and ->write_thread() callbacks allow safe handover/takeover per byte and add a preceding newline if they take over from another context mid-line. For the ->write_atomic() callback, a new irq_work is used to defer modem control since it may be called from a context that does not allow waking up tasks. Note: A new __serial8250_clear_IER() is introduced for direct clearing of UART_IER. This will allow to restore the lockdep check to serial8250_clear_IER() in a follow-up commit. Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Tested-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20250107212702.169493-6-john.ogness@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/8250/8250_core.c | 35 ++++++- drivers/tty/serial/8250/8250_port.c | 180 +++++++++++++++++++++++++++++------- include/linux/serial_8250.h | 13 ++- 3 files changed, 187 insertions(+), 41 deletions(-) commit 910ef438e93cd2ceb70c72caea418710d648feef Author: John Ogness <john.ogness@linutronix.de> Date: Tue Jan 7 22:33:00 2025 +0106 serial: 8250: Provide flag for IER toggling for RS485 For RS485 mode, if SER_RS485_RX_DURING_TX is not available, the console ->write() callback needs to enable/disable Tx. It does this by calling the ->rs485_start_tx() and ->rs485_stop_tx() callbacks. However, some of these callbacks also disable/enable interrupts and makes power management calls. This causes 2 problems for console writing: 1. A console write can occur in contexts that are illegal for pm_runtime_*(). It is not even necessary for console writing to use pm_runtime_*() because a console already does this in serial8250_console_setup() and serial8250_console_exit(). 2. The console ->write() callback already handles disabling/enabling the interrupts by properly restoring the previous IER value. Add an argument @toggle_ier to the ->rs485_start_tx() and ->rs485_stop_tx() callbacks to specify if they may disable/enable receive interrupts while using pm_runtime_*(). Console writing will not allow the toggling. For all call sites other than console writing there is no functional change. Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20250107212702.169493-5-john.ogness@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/8250/8250.h | 4 ++-- drivers/tty/serial/8250/8250_bcm2835aux.c | 4 ++-- drivers/tty/serial/8250/8250_omap.c | 2 +- drivers/tty/serial/8250/8250_port.c | 26 +++++++++++++++----------- include/linux/serial_8250.h | 4 ++-- 5 files changed, 22 insertions(+), 18 deletions(-) commit 95a1b409ba08b602bf4464786ac74d21ae0acbf3 Author: John Ogness <john.ogness@linutronix.de> Date: Tue Jan 7 22:32:59 2025 +0106 serial: 8250: Use high-level writing function for FIFO Currently serial8250_console_fifo_write() directly writes into the UART_TX register rather than using the high-level function serial8250_console_putchar(). This is because serial8250_console_putchar() waits for the holding register to become empty, which would defeat the purpose of the FIFO code. Move the LSR_THRE waiting to a new function serial8250_console_wait_putchar() so that the FIFO code can use serial8250_console_putchar(). This will be particularly important for a follow-up commit, where output bytes are inspected to track newlines. This is only refactoring and has no functional change. Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20250107212702.169493-4-john.ogness@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/8250/8250_port.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 8d5cfb1fe5d8692b2de79b3831445be982167531 Author: John Ogness <john.ogness@linutronix.de> Date: Tue Jan 7 22:32:58 2025 +0106 serial: 8250: Use frame time to determine timeout Rather than using a hard-coded per-character Tx-timeout of 10ms, use the frame time to determine a timeout value. The value is doubled to ensure that a timeout is only hit during unexpected circumstances. Since the frame time may not be available during early printing, the previous 10ms value is kept as a fallback. Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20250107212702.169493-3-john.ogness@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/8250/8250_port.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit d91f98be26510f5f81ec66425bb0306d1ccd571a Author: John Ogness <john.ogness@linutronix.de> Date: Tue Jan 7 22:32:57 2025 +0106 serial: 8250: Adjust the timeout for FIFO mode After a console has written a record into UART_TX, it uses wait_for_xmitr() to wait until the data has been sent out before returning. However, wait_for_xmitr() will timeout after 10ms, regardless if the data has been transmitted or not. For single bytes, this timeout is sufficient even at very slow baud rates, such as 1200bps. However, when FIFO mode is used, there may be 64 bytes pushed into the FIFO at once. At a baud rate of 115200bps, the 10ms timeout is still sufficient. But when using lower baud rates (such as 57600bps), the timeout is _not_ sufficient. This causes longer lines to be cut off, resulting in lost and horribly misformatted output on the console. When using FIFO mode, take the number of bytes into account to determine an appropriate maximum timeout. Increasing the timeout does not affect performance since ideally the timeout never occurs. Fixes: 8f3631f0f6eb ("serial/8250: Use fifo in 8250 console driver") Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Wander Lairson Costa <wander@redhat.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20250107212702.169493-2-john.ogness@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/8250/8250_port.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) commit ac753e1f38a114cf9e46b9824f43d09cb637f43d Author: Rob Herring (Arm) <robh@kernel.org> Date: Thu Jan 9 12:20:52 2025 -0600 tty: atmel_serial: 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. As of_property_present() returns a boolean, use that directly and simplify the code a bit while we're here. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Acked-by: Richard Genoud <richard.genoud@bootlin.com> Reviewed-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20250109182053.3970547-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/atmel_serial.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 104c1b9dde9d859dd01bd2d71a2755a2fae43e15 Author: Andre Werner <andre.werner@systec-electronic.com> Date: Fri Jan 10 08:31:04 2025 +0100 serial: sc16is7xx: Add polling mode if no IRQ pin is available Fall back to polling mode if no interrupt is configured because there is no possibility to connect the interrupt pin. If "interrupts" property is missing in devicetree the driver uses a delayed worker to pull the state of interrupt status registers. Signed-off-by: Andre Werner <andre.werner@systec-electronic.com> Link: https://lore.kernel.org/r/20250110073104.1029633-2-andre.werner@systec-electronic.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/sc16is7xx.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 4dd7c9d94806dd4f96d91a06e34f3142e386a534 Author: Andre Werner <andre.werner@systec-electronic.com> Date: Fri Jan 10 08:31:03 2025 +0100 dt-bindings: serial: sc16is7xx: Add description for polling mode Polling mode is enabled if the "interrupts" property is missing. Thus, this commit deletes "interrupts" entry from "required" section and adds a description for the fallback to polling mode at the "interrupts" entry. Signed-off-by: Andre Werner <andre.werner@systec-electronic.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250110073104.1029633-1-andre.werner@systec-electronic.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/devicetree/bindings/serial/nxp,sc16is7xx.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2b6b523ce8d02b9a33e1d88ad0d669e150a6ef6f Author: Robert Marko <robert.marko@sartura.hr> Date: Wed Jan 8 14:09:28 2025 +0100 tty: serial: atmel: make it selectable for ARCH_LAN969X LAN969x uses the Atmel serial, so make it selectable for ARCH_LAN969X. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20250108131045.40642-3-robert.marko@sartura.hr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6dd1de91e7a62bfd3878992c1db6e1d443022c76 Author: Jiri Slaby (SUSE) <jirislaby@kernel.org> Date: Fri Jan 10 12:52:28 2025 +0100 tty: mips_ejtag_fdc: fix one more u8 warning The LKP robot complains about: drivers/tty/mips_ejtag_fdc.c:1224:31: error: incompatible pointer types passing 'const char *[1]' to parameter of type 'const u8 **' (aka 'const unsigned char **') Fix this by turning the missing pieces (fetch from kgdbfdc_wbuf) to u8 too. Note the filling part (kgdbfdc_write_char()) already receives and stores u8 to kgdbfdc_wbuf. Fixes: ce7cbd9a6c81 ("tty: mips_ejtag_fdc: use u8 for character pointers") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202501101327.oGdWbmuk-lkp@intel.com/ Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20250110115228.603980-1-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/mips_ejtag_fdc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52e7d1f7c2fdd1592ab2cc48edd7ca583cabe93e Author: Vishnu Sankar <vishnuocv@gmail.com> Date: Fri Jan 10 23:14:09 2025 +0900 HID: lenovo: Fix undefined platform_profile_cycle in ThinkPad X12 keyboard patch The commit "HID: lenovo: Support for ThinkPad-X12-TAB-1/2 Kbd Fn keys" introduced an issue where the CI failed with the following error: ERROR: modpost: "platform_profile_cycle" [drivers/hid/hid-lenovo.ko] undefined! This issue occurs because platform_profile_cycle is used without ensuring the kernel is configured with CONFIG_ACPI_PLATFORM_PROFILE. To address this, this patch adds conditional support for platform profile management to the Fn+F8 key handling. The functionality for platform_profile_cycle is now included only when CONFIG_ACPI_PLATFORM_PROFILE is enabled in the kernel configuration. This ensures compatibility with kernels that do not include the ACPI platform profile feature, resolving the CI build issue. Signed-off-by: Vishnu Sankar <vishnuocv@gmail.com> Signed-off-by: Vishnu Sankar <vsankar@lenovo.com> Suggested-by: Benjamin Tissoires <bentiss@kernel.org> Suggested-by: Jiri Kosina <jikos@kernel.org> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-lenovo.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit e7cd121cbf1bec05e50335f82d4aa7d8fa700538 Author: 谢致邦 (XIE Zhibang) <Yeking@Red54.com> Date: Thu Jan 9 13:20:48 2025 +0000 staging: rtl8723bs: Remove ioctl interface Wireless drivers should not use the ioctl interface, so remove this interface for the rtl8723bs driver. (found by code inspection) Signed-off-by: 谢致邦 (XIE Zhibang) <Yeking@Red54.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/tencent_E4A835D41FF1F35C7BDFCF4EA0136D548F06@qq.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/rtl8723bs/Makefile | 1 - drivers/staging/rtl8723bs/include/osdep_intf.h | 2 - drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 1286 ------------------------ drivers/staging/rtl8723bs/os_dep/os_intfs.c | 1 - 4 files changed, 1290 deletions(-) commit abea0cbfba5848d11b6364e82df4864fd0bfa683 Author: Rob Herring (Arm) <robh@kernel.org> Date: Thu Jan 9 12:22:02 2025 -0600 ASoC: simple-card: Drop unnecessary "dai-tdm-slot-width-map" property presence check It doesn't matter whether "dai-tdm-slot-width-map" is not present or there is some other issue parsing it in of_property_count_elems_of_size() causing an error. Drop the presence check and rely on of_property_count_elems_of_size() error return if not present. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/20250109182202.3971965-2-robh@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/generic/simple-card-utils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 89b37e49929653b7c350aac7fb2b96a052533015 Merge: 5e56618e1593 f0006897a96c Author: Mark Brown <broonie@kernel.org> Date: Fri Jan 10 15:01:33 2025 +0000 spi-nand/spi-mem DTR support Merge series from Miquel Raynal <miquel.raynal@bootlin.com>: Here is a (big) series supposed to bring DTR support in SPI-NAND. commit 4c334c68804a3296009d92c121ee56a7fe19ea87 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Fri Jan 10 11:11:00 2025 +0100 KVM: SVM: Use str_enabled_disabled() helper in svm_hardware_setup() Remove hard-coded strings by using the str_enabled_disabled() helper function. Suggested-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://lore.kernel.org/r/20250110101100.272312-2-thorsten.blum@linux.dev Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/svm/svm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b08e02045002e0412441d5243b0ee1a9bfc3952b Author: Jens Axboe <axboe@kernel.dk> Date: Tue Jan 7 11:07:47 2025 -0700 io_uring/rw: don't gate retry on completion context nvme multipath reports that they see spurious -EAGAIN bubbling back to userspace, which is caused by how they handle retries internally through a kworker. However, any data that needs preserving or importing for a read/write request has always been done so at prep time, and we can sanely skip this check. Reported-by: "Haeuptle, Michael" <michael.haeuptle@hpe.com> Link: https://lore.kernel.org/io-uring/DS7PR84MB31105C2C63CFA47BE8CBD6EE95102@DS7PR84MB3110.NAMPRD84.PROD.OUTLOOK.COM/ Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/rw.c | 6 ------ 1 file changed, 6 deletions(-) commit d803d123948feffbd992213e144df224097f82b0 Author: Jens Axboe <axboe@kernel.dk> Date: Tue Jan 7 10:59:35 2025 -0700 io_uring/rw: handle -EAGAIN retry at IO completion time Rather than try and have io_read/io_write turn REQ_F_REISSUE into -EAGAIN, catch the REQ_F_REISSUE when the request is otherwise considered as done. This is saner as we know this isn't happening during an actual submission, and it removes the need to randomly check REQ_F_REISSUE after read/write submission. If REQ_F_REISSUE is set, __io_submit_flush_completions() will skip over this request in terms of posting a CQE, and the regular request cleaning will ensure that it gets reissued via io-wq. Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/io_uring.c | 15 ++++++++-- io_uring/rw.c | 80 +++++++++++++++++------------------------------------ 2 files changed, 38 insertions(+), 57 deletions(-) commit 9ac273ae3dc296905b4d61e4c8e7a25592f6d183 Author: Jens Axboe <axboe@kernel.dk> Date: Tue Jan 7 09:52:54 2025 -0700 io_uring/rw: use io_rw_recycle() from cleanup path Cleanup should always have the uring lock held, it's safe to recycle from here. Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/rw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ba113ecad81a5167854d6ca05ea19a63eca1c4a3 Author: James Clark <james.clark@linaro.org> Date: Wed Jan 8 14:28:57 2025 +0000 perf docs: arm_spe: Document new discard mode Document the flag along with PMU events to hint what it's used for and give an example with other useful options to get minimal output. Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com> Signed-off-by: James Clark <james.clark@linaro.org> Link: https://lore.kernel.org/r/20250108142904.401139-3-james.clark@linaro.org Signed-off-by: Will Deacon <will@kernel.org> tools/perf/Documentation/perf-arm-spe.txt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit d28d95bc63cb4cb55f968f0fb4bf55b816087ca2 Author: James Clark <james.clark@linaro.org> Date: Wed Jan 8 14:28:56 2025 +0000 perf: arm_spe: Add format option for discard mode FEAT_SPEv1p2 (optional from Armv8.6) adds a discard mode that allows all SPE data to be discarded rather than written to memory. Add a format bit for this mode. If the mode isn't supported, the format bit isn't published and attempts to use it will result in -EOPNOTSUPP. Allocating an aux buffer is still allowed even though it won't be written to so that old tools continue to work, but updated tools can choose to skip this step. Signed-off-by: James Clark <james.clark@linaro.org> Reviewd-by: Yeoreum Yun <yeoreum.yun@arm.com> Link: https://lore.kernel.org/r/20250108142904.401139-2-james.clark@linaro.org Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/arm_spe_pmu.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 8ff656643d3075154419680470dbfdbd6092e31f Author: Danilo Krummrich <dakr@kernel.org> Date: Tue Jan 7 13:25:11 2025 +0100 rust: devres: remove action in `Devres::drop` So far `DevresInner` is kept alive, even if `Devres` is dropped until the devres callback is executed to avoid a WARN() when the action has been released already. With the introduction of devm_remove_action_nowarn() we can remove the action in `Devres::drop`, handle the case where the action has been released already and hence also free `DevresInner`. Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20250107122609.8135-2-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> rust/kernel/devres.rs | 47 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) commit f1725160fd28a2e65e47166637aa44856a1a7f89 Author: Danilo Krummrich <dakr@kernel.org> Date: Tue Jan 7 13:25:10 2025 +0100 devres: add devm_remove_action_nowarn() devm_remove_action() warns if the action to remove does not exist (anymore). The Rust devres abstraction, however, has a use-case to call devm_remove_action() at a point where it can't be guaranteed that the corresponding action hasn't been released yet. In particular, an instance of `Devres<T>` may be dropped after the action has been released. So far, `Devres<T>` worked around this by keeping the inner type alive. Hence, add devm_remove_action_nowarn(), which returns an error code if the action has been removed already. A subsequent patch uses devm_remove_action_nowarn() to remove the action when `Devres<T>` is dropped. Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20250107122609.8135-1-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/devres.c | 23 ++++++++++++++++++----- include/linux/device.h | 18 +++++++++++++++++- 2 files changed, 35 insertions(+), 6 deletions(-) commit 6d2478a103a8238c5382f8a318735aa75d49803a Author: Abhijit Gangurde <abhijit.gangurde@amd.com> Date: Tue Dec 3 14:14:09 2024 +0530 cdx: disable cdx bus from bus shutdown callback disable cdx bus when bus shutdown is called. Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com> Link: https://lore.kernel.org/r/20241203084409.2747897-2-abhijit.gangurde@amd.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/cdx/cdx.c | 3 +++ 1 file changed, 3 insertions(+) commit 235b630eda072d7e7b102ab346d6b8a2c028a772 Author: Sean Rhodes <sean@starlabs.systems> Date: Tue Nov 19 08:58:15 2024 +0000 drivers/card_reader/rtsx_usb: Restore interrupt based detection This commit reintroduces interrupt-based card detection previously used in the rts5139 driver. This functionality was removed in commit 00d8521dcd23 ("staging: remove rts5139 driver code"). Reintroducing this mechanism fixes presence detection for certain card readers, which with the current driver, will taken approximately 20 seconds to enter S3 as `mmc_rescan` has to be frozen. Fixes: 00d8521dcd23 ("staging: remove rts5139 driver code") Cc: stable@vger.kernel.org Cc: Arnd Bergmann <arnd@arndb.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sean Rhodes <sean@starlabs.systems> Link: https://lore.kernel.org/r/20241119085815.11769-1-sean@starlabs.systems Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/cardreader/rtsx_usb.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 827ed8b1590d4d29dae837283d606709ffeebe37 Author: Heiner Kallweit <hkallweit1@gmail.com> Date: Thu Dec 19 22:48:17 2024 +0100 drivers: core: remove device_link argument from class_compat_[create|remove]_link After 7e722083fcc3 ("i2c: Remove I2C_COMPAT config symbol and related code") there's no caller left passing a non-null device_link argument. So remove this argument to simplify the code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/db49131d-fd79-4f23-93f2-0ab541a345fa@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/class.c | 31 +++---------------------------- drivers/vfio/mdev/mdev_core.c | 4 ++-- include/linux/device/class.h | 6 ++---- 3 files changed, 7 insertions(+), 34 deletions(-) commit f554b68eafb6d28c23e3b3f029db363894b72378 Author: Kunwu Chan <chentao@kylinos.cn> Date: Fri Aug 23 16:14:44 2024 +0800 ARM: riscpc: make ecard_bus_type constant Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type a const *"), the driver core can properly handle constant struct bus_type, move the ecard_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Kunwu Chan <chentao@kylinos.cn> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20240823081444.150976-1-kunwu.chan@linux.dev Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> arch/arm/include/asm/ecard.h | 2 +- arch/arm/mach-rpc/ecard.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit afd69d5c4a1049230fa91c9b54fdd8132f755503 Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 08:37:38 2025 +0100 loop: remove the use_dio field in struct loop_device This field duplicate the LO_FLAGS_DIRECT_IO flag in lo_flags. Remove it to have a single source of truth about using direct I/O. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250110073750.1582447-9-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/loop.c | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) commit 0cd719aa63def1d57316e8e903f01f4af0641a46 Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 08:37:37 2025 +0100 loop: don't freeze the queue in loop_update_dio All callers of loop_update_dio except for loop_configure already have the queue frozen, and loop_configure works on an unbound device. Remove the superfluous recursive freezing in loop_update_dio and add asserts for the locking and freezing state instead. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250110073750.1582447-8-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/loop.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3a693110afd7127400cc9f779c885f01cf16d0f2 Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 08:37:36 2025 +0100 loop: allow loop_set_status to re-enable direct I/O Unlike all other calls of (__)loop_update_dio, loop_set_status never looks at the O_DIRECT flag of the backing file, and thus doesn't re-enable direct I/O on an O_DIRECT backing file if e.g. the new block size would allow it. Fix that and remove the need for the separate __loop_update_dio flag. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250110073750.1582447-7-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/loop.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit dc909525daec7c7c5d628683c99d26e281c1a7bb Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 08:37:35 2025 +0100 loop: open code the direct I/O flag update in loop_set_dio loop_set_dio is different from the other (__)loop_update_dio callers in that it doesn't take any implicit conditions into account and wants to update the direct I/O flag to the user passed in value and fail if that can't be done. Open code the logic here to prepare for simplifying the other direct I/O flag updates and to make the error handling less convoluted. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250110073750.1582447-6-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/loop.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 09ccf5549d7809671af34774bb30c8f935d6ed2b Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 08:37:34 2025 +0100 loop: only write back pagecache when starting to to use direct I/O There is no point in doing an fdatasync to write out pages when switching away from direct I/O, as there won't be any. The writeback is only needed when switching to direct I/O, which would have to invalidate the pagecache less efficiently from the I/O path. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250110073750.1582447-5-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/loop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 781fc49a0e5c111b1a210bd1b3499c89bb21cd81 Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 08:37:33 2025 +0100 loop: create a lo_can_use_dio helper Factor out a part of __loop_update_dio in preparation for further refactoring. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250110073750.1582447-4-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/loop.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 4155adb01e7406653f6b01aaca916a59567cfbfa Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 08:37:32 2025 +0100 loop: update commands in loop_set_status still referring to transfers The concept of transfers is gone since commit 47e9624616c8 ("block: remove support for cryptoloop and the xor transfer"). Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250110073750.1582447-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/loop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ae074d07a0e5c05769f1a9a2faa260c36d69465e Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 08:37:31 2025 +0100 loop: move updating lo_flags out of loop_set_status_from_info While loop_configure simplify assigns the flags passed in by userspace, loop_set_status only looks at the two changeable flags, and currently has to do a complicate dance to implement that. Move assign lo->lo_flags out of loop_set_status_from_info into the callers and thus drastically simplify the lo_flags handling in loop_set_status. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250110073750.1582447-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/loop.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit b03732a9c0db91522914185739505d92d3b0d816 Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 06:47:19 2025 +0100 loop: fix queue freeze vs limits lock order Match the locking order used by the core block code by only freezing the queue after taking the limits lock using the queue_limits_commit_update_frozen helper and document the callers that do not freeze the queue at all. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Link: https://lore.kernel.org/r/20250110054726.1499538-12-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/loop.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit b38c8be255e89ffcdeb817407222d2de0b573a41 Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 06:47:18 2025 +0100 loop: refactor queue limits updates Replace loop_reconfigure_limits with a slightly less encompassing loop_update_limits that expects the caller to acquire and commit the queue limits to prepare for sorting out the freeze vs limits lock ordering. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Link: https://lore.kernel.org/r/20250110054726.1499538-11-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/loop.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit 1233751f7df722435bb93e928d64334db260b90d Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 06:47:17 2025 +0100 usb-storage: fix queue freeze vs limits lock order Match the locking order used by the core block code by only freezing the queue after taking the limits lock using the queue_limits_commit_update_frozen helper. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Link: https://lore.kernel.org/r/20250110054726.1499538-10-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/usb/storage/scsiglue.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f3dec61d7544a90685f1dd9a87fd4afc751996d0 Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 06:47:16 2025 +0100 nbd: fix queue freeze vs limits lock order Match the locking order used by the core block code by only freezing the queue after taking the limits lock using the queue_limits_commit_update_frozen helper. This also allows removes the need for the separate __nbd_set_size helper, so remove it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Link: https://lore.kernel.org/r/20250110054726.1499538-9-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/nbd.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 473106dd3aa964a62314d858f6602c95e40e6270 Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 06:47:15 2025 +0100 nvme: fix queue freeze vs limits lock order Match the locking order used by the core block code by only freezing the queue after taking the limits lock. Unlike most queue updates this does not use the queue_limits_commit_update_frozen helper as the nvme driver want the queue frozen for more than just the limits update. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Link: https://lore.kernel.org/r/20250110054726.1499538-8-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/nvme/host/core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c99f66e4084a62a2cc401c4704a84328aeddc9ec Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 06:47:14 2025 +0100 block: fix queue freeze vs limits lock order in sysfs store methods queue_attr_store() always freezes a device queue before calling the attribute store operation. For attributes that control queue limits, the store operation will also lock the queue limits with a call to queue_limits_start_update(). However, some drivers (e.g. SCSI sd) may need to issue commands to a device to obtain limit values from the hardware with the queue limits locked. This creates a potential ABBA deadlock situation if a user attempts to modify a limit (thus freezing the device queue) while the device driver starts a revalidation of the device queue limits. Avoid such deadlock by not freezing the queue before calling the ->store_limit() method in struct queue_sysfs_entry and instead use the queue_limits_commit_update_frozen helper to freeze the queue after taking the limits lock. This also removes taking the sysfs lock for the store_limit method as it doesn't protect anything here, but creates even more nesting. Hopefully it will go away from the actual sysfs methods entirely soon. (commit log adapted from a similar patch from Damien Le Moal) Fixes: ff956a3be95b ("block: use queue_limits_commit_update in queue_discard_max_store") Fixes: 0327ca9d53bf ("block: use queue_limits_commit_update in queue_max_sectors_store") Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Link: https://lore.kernel.org/r/20250110054726.1499538-7-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-sysfs.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit a16230649ce27f8ac7dd8a5b079d9657aa96de16 Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 06:47:13 2025 +0100 block: add a store_limit operations for sysfs entries De-duplicate the code for updating queue limits by adding a store_limit method that allows having common code handle the actual queue limits update. Note that this is a pure refactoring patch and does not address the existing freeze vs limits lock order problem in the refactored code, which will be addressed next. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Link: https://lore.kernel.org/r/20250110054726.1499538-6-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-sysfs.c | 128 ++++++++++++++++++++++++++---------------------------- 1 file changed, 61 insertions(+), 67 deletions(-) commit d432c817c21a48c3baaa0d28e4d3e74b6aa238a0 Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 06:47:12 2025 +0100 block: don't update BLK_FEAT_POLL in __blk_mq_update_nr_hw_queues When __blk_mq_update_nr_hw_queues changes the number of tag sets, it might have to disable poll queues. Currently it does so by adjusting the BLK_FEAT_POLL, which is a bit against the intent of features that describe hardware / driver capabilities, but more importantly causes nasty lock order problems with the broadly held freeze when updating the number of hardware queues and the limits lock. Fix this by leaving BLK_FEAT_POLL alone, and instead check for the number of poll queues in the bio submission and poll handlers. While this adds extra work to the fast path, the variables are in cache lines used by these operations anyway, so it should be cheap enough. Fixes: 8023e144f9d6 ("block: move the poll flag to queue_limits") Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Link: https://lore.kernel.org/r/20250110054726.1499538-5-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-core.c | 7 +++---- block/blk-mq.c | 26 +++++--------------------- block/blk-mq.h | 6 ++++++ block/blk-sysfs.c | 9 ++++++++- 4 files changed, 22 insertions(+), 26 deletions(-) commit 958148a6ac061a9a80a184ea678a5fa872d0c56f Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 06:47:11 2025 +0100 block: check BLK_FEAT_POLL under q_usage_count Otherwise feature reconfiguration can race with I/O submission. Also drop the bio_clear_polled in the error path, as the flag does not matter for instant error completions, it is a left over from when we allowed polled I/O to proceed unpolled in this case. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20250110054726.1499538-4-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-core.c | 22 ++++++++++++---------- block/blk-mq.c | 12 ++++++++++-- 2 files changed, 22 insertions(+), 12 deletions(-) commit aa427d7b73b196f657d6d2cf0e94eff6b883fdef Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 06:47:10 2025 +0100 block: add a queue_limits_commit_update_frozen helper Add a helper that freezes the queue, updates the queue limits and unfreezes the queue and convert all open coded versions of that to the new helper. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Link: https://lore.kernel.org/r/20250110054726.1499538-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-integrity.c | 4 +--- block/blk-settings.c | 24 ++++++++++++++++++++++++ block/blk-zoned.c | 7 +------ drivers/block/virtio_blk.c | 4 +--- drivers/scsi/sd.c | 17 +++++------------ drivers/scsi/sr.c | 5 +---- include/linux/blkdev.h | 2 ++ 7 files changed, 35 insertions(+), 28 deletions(-) commit 9c96821b44f893fb63f021a28625d3b32c68e8b3 Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 10 06:47:09 2025 +0100 block: fix docs for freezing of queue limits updates queue_limits_commit_update is the function that needs to operate on a frozen queue, not queue_limits_start_update. Update the kerneldoc comments to reflect that. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Link: https://lore.kernel.org/r/20250110054726.1499538-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-settings.c | 3 ++- include/linux/blkdev.h | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 51796f5e2960130fe53e9a71d07152622d5e024c Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Sun Jan 5 16:34:09 2025 +0800 driver core: Move two simple APIs for finding child device to header The following two APIs are for finding child device, and both only have one line code in function body. device_find_child_by_name() device_find_any_child() Move them to header as static inline function. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250105-class_fix-v6-8-3a2f1768d4d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/core.c | 32 -------------------------------- include/linux/device.h | 32 +++++++++++++++++++++++++++++--- 2 files changed, 29 insertions(+), 35 deletions(-) commit 767b74e0d1fc7890a94d1770acf05a442474bd87 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Sun Jan 5 16:34:08 2025 +0800 driver core: Introduce device_iter_t for device iterating APIs There are several for_each APIs which has parameter with type below: int (*fn)(struct device *dev, void *data) They iterate over various device lists and call @fn() for each device with caller provided data @*data, and they usually need to modify @*data. Give the type an dedicated typedef with advantages shown below: typedef int (*device_iter_t)(struct device *dev, void *data) - Shorter API declarations and definitions - Prevent further for_each APIs from using bad parameter type So introduce device_iter_t and apply it to various existing APIs below: bus_for_each_dev() (class|driver)_for_each_device() device_for_each_child(_reverse|_reverse_from)(). Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250105-class_fix-v6-7-3a2f1768d4d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/bus.c | 2 +- drivers/base/class.c | 2 +- drivers/base/core.c | 6 +++--- drivers/base/driver.c | 2 +- include/linux/device.h | 6 +++--- include/linux/device/bus.h | 7 +++++-- include/linux/device/class.h | 4 ++-- include/linux/device/driver.h | 2 +- 8 files changed, 17 insertions(+), 14 deletions(-) commit 523c6b3ed7702a638e0f8fd02708a7ed4f938269 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Sun Jan 5 16:34:07 2025 +0800 driver core: Correct API device_for_each_child_reverse_from() prototype For API device_for_each_child_reverse_from(..., const void *data, int (*fn)(struct device *dev, const void *data)) - Type of @data is const pointer, and means caller's data @*data is not allowed to be modified, but that usually is not proper for such non finding device iterating API. - Types for both @data and @fn are not consistent with all other for_each device iterating APIs device_for_each_child(_reverse)(), bus_for_each_dev() and (driver|class)_for_each_device(). Correct its prototype by removing const from parameter types, then adapt for various existing usages. An dedicated typedef device_iter_t will be introduced as @fn() type for various for_each device interating APIs later. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250105-class_fix-v6-6-3a2f1768d4d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/core.c | 4 ++-- drivers/cxl/core/hdm.c | 2 +- drivers/cxl/core/region.c | 2 +- include/linux/device.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) commit 037116a6cca3e4dbc97905b6e254e8fe7475d502 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Sun Jan 5 16:34:06 2025 +0800 driver core: Correct parameter check for API device_for_each_child_reverse_from() device_for_each_child_reverse_from() checks (!parent->p) for its parameter @parent, and that is not consistent with other APIs of its cluster as shown below: device_for_each_child_reverse_from() // check (!parent->p) device_for_each_child_reverse() // check (!parent || !parent->p) device_for_each_child() // same above device_find_child() // same above Correct the API's parameter @parent check by (!parent || !parent->p). Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250105-class_fix-v6-5-3a2f1768d4d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab017a15fdb2222002cdc6bdf86699fb21a0721a Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Sun Jan 5 16:34:05 2025 +0800 driver core: Rename declaration parameter name for API device_find_child() cluster For APIs: device_find_child() device_for_each_child() device_for_each_child_reverse() Their declaration has parameter name 'dev', but their defination changes the name to 'parent'. Rename declaration name to defination 'parent' to make both have the same name. Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250105-class_fix-v6-4-3a2f1768d4d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> include/linux/device.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3f58ee540d190e9c52b91e055683d15c8ed81112 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Sun Jan 5 16:34:04 2025 +0800 driver core: Move true expression out of if condition in 3 device finding APIs For bus_find_device(), driver_find_device(), and device_find_child(), all of their function body have pattern below: { struct klist_iter i; struct device *dev; ... while ((dev = next_device(&i))) if (match(dev, data) && get_device(dev)) break; ... } The expression 'get_device(dev)' in the if condition always returns true since @dev != NULL. Move the expression to if body to make logic of these APIs more clearer. Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250105-class_fix-v6-3-3a2f1768d4d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/bus.c | 7 +++++-- drivers/base/core.c | 7 +++++-- drivers/base/driver.c | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) commit d1248436cbef1f924c04255367ff4845ccd9025e Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Sun Jan 5 16:34:03 2025 +0800 blk-cgroup: Fix class @block_class's subsystem refcount leakage blkcg_fill_root_iostats() iterates over @block_class's devices by class_dev_iter_(init|next)(), but does not end iterating with class_dev_iter_exit(), so causes the class's subsystem refcount leakage. Fix by ending the iterating with class_dev_iter_exit(). Fixes: ef45fe470e1e ("blk-cgroup: show global disk stats in root cgroup io.stat") Reviewed-by: Michal Koutný <mkoutny@suse.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: stable@vger.kernel.org Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250105-class_fix-v6-2-3a2f1768d4d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> block/blk-cgroup.c | 1 + 1 file changed, 1 insertion(+) commit e128f82f7006991c99a58114f70ef61e937b1ac1 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Sun Jan 5 16:34:02 2025 +0800 driver core: class: Fix wild pointer dereferences in API class_dev_iter_next() There are a potential wild pointer dereferences issue regarding APIs class_dev_iter_(init|next|exit)(), as explained by below typical usage: // All members of @iter are wild pointers. struct class_dev_iter iter; // class_dev_iter_init(@iter, @class, ...) checks parameter @class for // potential class_to_subsys() error, and it returns void type and does // not initialize its output parameter @iter, so caller can not detect // the error and continues to invoke class_dev_iter_next(@iter) even if // @iter still contains wild pointers. class_dev_iter_init(&iter, ...); // Dereference these wild pointers in @iter here once suffer the error. while (dev = class_dev_iter_next(&iter)) { ... }; // Also dereference these wild pointers here. class_dev_iter_exit(&iter); Actually, all callers of these APIs have such usage pattern in kernel tree. Fix by: - Initialize output parameter @iter by memset() in class_dev_iter_init() and give callers prompt by pr_crit() for the error. - Check if @iter is valid in class_dev_iter_next(). Fixes: 7b884b7f24b4 ("driver core: class.c: convert to only use class_to_subsys") Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250105-class_fix-v6-1-3a2f1768d4d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/class.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 896be785015c0e0ba73442f73b8d4d9f5ccfc54c Author: Ricardo B. Marliere <ricardo.marliere@suse.com> Date: Wed Sep 4 11:17:23 2024 -0300 bus: fsl-mc: constify the struct device_type usage Since commit aed65af1cc2f ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move all the device_type variables used in the bus to be constant structures as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ricardo B. Marliere <ricardo.marliere@suse.com> Link: https://lore.kernel.org/r/20240904-class_cleanup-fsl-mc-bus-v2-1-83fa25cbdc68@suse.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/bus/fsl-mc/fsl-mc-bus.c | 36 ++++++++++++++++++------------------ include/linux/fsl/mc.h | 30 +++++++++++++++--------------- 2 files changed, 33 insertions(+), 33 deletions(-) commit ff5e0c847042bdde7efd550c722c614ad57715b3 Author: Ekansh Gupta <quic_ekangupt@quicinc.com> Date: Fri Jan 10 13:43:08 2025 +0000 misc: fastrpc: Rename tgid and pid to client_id The information passed as request tgid and pid is actually the client id of the process. This client id is used as an identifier by DSP to identify the DSP PD corresponding to the process. Currently process tgid is getting passed as the identifier which is getting replaced by a custom client id. Rename the data which uses this client id. Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20250110134308.123739-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/fastrpc.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit 37d56e0fb08e1f806de638b7dc8edff329cb683d Author: Ekansh Gupta <quic_ekangupt@quicinc.com> Date: Fri Jan 10 13:43:07 2025 +0000 misc: fastrpc: Add support for multiple PD from one process Memory intensive applications(which requires more tha 4GB) that wants to offload tasks to DSP might have to split the tasks to multiple user PD to make the resources available. For every call to DSP, fastrpc driver passes the process tgid which works as an identifier for the DSP to enqueue the tasks to specific PD. With current design, if any process opens device node more than once and makes PD init request, same tgid will be passed to DSP which will be considered a bad request and this will result in failure as the same identifier cannot be used for multiple DSP PD. Assign and pass a client ID to DSP which would be assigned during device open and will be dependent on the index of session allocated for the PD. This will allow the same process to open the device more than once and spawn multiple dynamic PD for ease of processing. Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20250110134308.123739-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/fastrpc.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit a56fece7f302ff1eb49535e66bdd5d03ced0ca20 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Fri Jan 3 16:30:43 2025 +0900 genksyms: use uint32_t instead of unsigned long for calculating CRC Currently, 'unsigned long' is used for intermediate variables when calculating CRCs. The size of 'long' differs depending on the architecture: it is 32 bits on 32-bit architectures and 64 bits on 64-bit architectures. The CRC values generated by genksyms represent the compatibility of exported symbols. Therefore, reproducibility is important. In other words, we need to ensure that the output is the same when the kernel source is identical, regardless of whether genksyms is running on a 32-bit or 64-bit build machine. Fortunately, the output from genksyms is not affected by the build machine's architecture because only the lower 32 bits of the 'unsigned long' variables are used. To make it even clearer that the CRC calculation is independent of the build machine's architecture, this commit explicitly uses the fixed-width type, uint32_t. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/genksyms/genksyms.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 2759bd908f3cc8d286e1fa64ec7ee7f5d1124837 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Fri Jan 3 16:30:42 2025 +0900 genksyms: use generic macros for hash table implementation Use macros provided by hashtable.h Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/genksyms/genksyms.c | 32 ++++++++++++-------------------- scripts/genksyms/genksyms.h | 4 +++- 2 files changed, 15 insertions(+), 21 deletions(-) commit 2480f53f21b21eb24a33815d4623f54fdb30cf27 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Fri Jan 3 16:30:41 2025 +0900 genksyms: refactor the return points in the for-loop in __add_symbol() free_list() must be called before returning from this for-loop. Swap 'break' and the combination of free_list() and 'return'. This reduces the code and minimizes the risk of introducing memory leaks in future changes. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/genksyms/genksyms.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit f034d186bf9e2857079815e5490e2810a1a287a6 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Fri Jan 3 16:30:40 2025 +0900 genksyms: reduce the indentation in the for-loop in __add_symbol() To improve readability, reduce the indentation as follows: - Use 'continue' earlier when the symbol does not match - flip !sym->is_declared to flatten the if-else chain No functional changes are intended. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/genksyms/genksyms.c | 63 +++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 33 deletions(-) commit be2fa44b5180a1f021efb40c55fdf63c249c3209 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Fri Jan 3 16:30:39 2025 +0900 genksyms: fix memory leak when the same symbol is read from *.symref file When a symbol that is already registered is read again from *.symref file, __add_symbol() removes the previous one from the hash table without freeing it. [Test Case] $ cat foo.c #include <linux/export.h> void foo(void); void foo(void) {} EXPORT_SYMBOL(foo); $ cat foo.symref foo void foo ( void ) foo void foo ( void ) When a symbol is removed from the hash table, it must be freed along with its ->name and ->defn members. However, sym->name cannot be freed because it is sometimes shared with node->string, but not always. If sym->name and node->string share the same memory, free(sym->name) could lead to a double-free bug. To resolve this issue, always assign a strdup'ed string to sym->name. Fixes: 64e6c1e12372 ("genksyms: track symbol checksum changes") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/genksyms/genksyms.c | 8 ++++++-- scripts/genksyms/genksyms.h | 2 +- scripts/genksyms/parse.y | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) commit 45c9c4101d3d2fdfa00852274bbebba65fcc3cf2 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Fri Jan 3 16:30:38 2025 +0900 genksyms: fix memory leak when the same symbol is added from source When a symbol that is already registered is added again, __add_symbol() returns without freeing the symbol definition, making it unreachable. The following test cases demonstrate different memory leak points. [Test Case 1] Forward declaration with exactly the same definition $ cat foo.c #include <linux/export.h> void foo(void); void foo(void) {} EXPORT_SYMBOL(foo); [Test Case 2] Forward declaration with a different definition (e.g. attribute) $ cat foo.c #include <linux/export.h> void foo(void); __attribute__((__section__(".ref.text"))) void foo(void) {} EXPORT_SYMBOL(foo); [Test Case 3] Preserving an overridden symbol (compile with KBUILD_PRESERVE=1) $ cat foo.c #include <linux/export.h> void foo(void); void foo(void) { } EXPORT_SYMBOL(foo); $ cat foo.symref override foo void foo ( int ) The memory leaks in Test Case 1 and 2 have existed since the introduction of genksyms into the kernel tree. [1] The memory leak in Test Case 3 was introduced by commit 5dae9a550a74 ("genksyms: allow to ignore symbol checksum changes"). When multiple init_declarators are reduced to an init_declarator_list, the decl_spec must be duplicated. Otherwise, the following Test Case 4 would result in a double-free bug. [Test Case 4] $ cat foo.c #include <linux/export.h> extern int foo, bar; int foo, bar; EXPORT_SYMBOL(foo); In this case, 'foo' and 'bar' share the same decl_spec, 'int'. It must be unshared before being passed to add_symbol(). [1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=46bd1da672d66ccd8a639d3c1f8a166048cca608 Fixes: 5dae9a550a74 ("genksyms: allow to ignore symbol checksum changes") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/genksyms/genksyms.c | 3 +++ scripts/genksyms/parse.y | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) commit 5963913bb57f15f198361bc7f1389c756b98f25f Author: Masahiro Yamada <masahiroy@kernel.org> Date: Sun Dec 29 00:45:29 2024 +0900 modpost: zero-pad CRC values in modversion_info array I do not think the '#' flag is useful here because adding the explicit '0x' is clearer. Add the '0' flag to zero-pad the CRC values. This change gives better alignment in the generated *.mod.c files. There is no impact to the compiled modules. [Before] $ grep -A5 modversion_info fs/efivarfs/efivarfs.mod.c static const struct modversion_info ____versions[] __used __section("__versions") = { { 0x907d14d, "blocking_notifier_chain_register" }, { 0x53d3b64, "simple_inode_init_ts" }, { 0x65487097, "__x86_indirect_thunk_rax" }, { 0x122c3a7e, "_printk" }, [After] $ grep -A5 modversion_info fs/efivarfs/efivarfs.mod.c static const struct modversion_info ____versions[] __used __section("__versions") = { { 0x0907d14d, "blocking_notifier_chain_register" }, { 0x053d3b64, "simple_inode_init_ts" }, { 0x65487097, "__x86_indirect_thunk_rax" }, { 0x122c3a7e, "_printk" }, Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/mod/modpost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1cd9502ee9275c6176a7312863f939cca9506114 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Sun Dec 29 00:45:28 2024 +0900 module: get symbol CRC back to unsigned Commit 71810db27c1c ("modversions: treat symbol CRCs as 32 bit quantities") changed the CRC fields to s32 because the __kcrctab and __kcrctab_gpl sections contained relative references to the actual CRC values stored in the .rodata section when CONFIG_MODULE_REL_CRCS=y. Commit 7b4537199a4a ("kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS") removed this complexity. Now, the __kcrctab and __kcrctab_gpl sections directly contain the CRC values in all cases. The genksyms tool outputs unsigned 32-bit CRC values, so u32 is preferred over s32. No functional changes are intended. Regardless of this change, the CRC value is assigned to the u32 variable 'crcval' before the comparison, as seen in kernel/module/version.c: crcval = *crc; It was previously mandatory (but now optional) in order to avoid sign extension because the following line previously compared 'unsigned long' and 's32': if (versions[i].crc == crcval) return 1; versions[i].crc is still 'unsigned long' for backward compatibility. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> include/linux/module.h | 4 ++-- kernel/module/internal.h | 10 +++++----- kernel/module/main.c | 2 +- kernel/module/version.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) commit ad2091dee019a68145610081a75fae3b90f0c44d Author: Rolf Eike Beer <eb@emlix.com> Date: Thu Dec 19 08:20:34 2024 +0100 kconfig: qconf: use preferred form of QString API A QString constructed from a character literal of length 0, i.e. "", is not "null" for historical reasons. This does not matter here so use the preferred method isEmpty() instead. Also directly construct empty QString objects instead of passing in an empty character literal that has to be parsed into an empty object first. Signed-off-by: Rolf Eike Beer <eb@emlix.com> Link: https://doc.qt.io/qt-6/qstring.html#distinction-between-null-and-empty-strings Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/kconfig/qconf.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 41a00051283e301f7e0009626ddf591542e30161 Author: HONG Yifan <elsk@google.com> Date: Wed Dec 18 20:20:11 2024 +0000 kheaders: prevent `find` from seeing perl temp files Symptom: The command find ... | xargs ... perl -i occasionally triggers error messages like the following, with the build still succeeding: Can't open <redacted>/kernel/.tmp_dir/include/dt-bindings/clock/XXNX4nW9: No such file or directory. Analysis: With strace, the root cause has been identified to be `perl -i` creating temporary files inside ${tmpdir}, which causes `find` to see the temporary files and emit the names. `find` is likely implemented with readdir. POSIX `readdir` says: If a file is removed from or added to the directory after the most recent call to opendir() or rewinddir(), whether a subsequent call to readdir() returns an entry for that file is unspecified. So if the libc that `find` links against choose to return that entry in readdir(), a possible sequence of events is the following: 1. find emits foo.h 2. xargs executes `perl -i foo.h` 3. perl (pid=100) creates temporary file `XXXXXXXX` 4. find sees file `XXXXXXXX` and emit it 5. PID 100 exits, cleaning up the temporary file `XXXXXXXX` 6. xargs executes `perl -i XXXXXXXX` 7. perl (pid=200) tries to read the file, but it doesn't exist any more. ... triggering the error message. One can reproduce the bug with the following command (assuming PWD contains the list of headers in kheaders.tar.xz) for i in $(seq 100); do find -type f -print0 | xargs -0 -P8 -n1 perl -pi -e 'BEGIN {undef $/;}; s/\/\*((?!SPDX).)*?\*\///smg;'; done With a `find` linking against musl libc, the error message is emitted 6/100 times. The fix: This change stores the results of `find` before feeding them into xargs. find and xargs will no longer be able to see temporary files that perl creates after this change. Signed-off-by: HONG Yifan <elsk@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> kernel/gen_kheaders.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 82a1978d0fdc28e561bc4d98ea155dd322f33c19 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Wed Dec 18 19:37:08 2024 +0900 kheaders: use 'tar' instead of 'cpio' for copying files The 'cpio' command is used solely for copying header files to the temporary directory. However, there is no strong reason to use 'cpio' for this purpose. For example, scripts/package/install-extmod-build uses the 'tar' command to copy files. This commit replaces the use of 'cpio' with 'tar' because 'tar' is already used in this script to generate kheaders_data.tar.xz anyway. Performance-wide, there is no significant difference between 'cpio' and 'tar'. [Before] $ rm -fr kheaders; mkdir kheaders $ time sh -c ' for f in include arch/x86/include do find "$f" -name "*.h" done | cpio --quiet -pd kheaders ' real 0m0.148s user 0m0.021s sys 0m0.140s [After] $ rm -fr kheaders; mkdir kheaders $ time sh -c ' for f in include arch/x86/include do find "$f" -name "*.h" done | tar -c -f - -T - | tar -xf - -C kheaders ' real 0m0.098s user 0m0.024s sys 0m0.131s Revert commit 69ef0920bdd3 ("Docs: Add cpio requirement to changes.rst") because 'cpio' is not used anywhere else during the kernel build. Please note that the built-in initramfs is created by the in-tree tool, usr/gen_init_cpio, so it does not rely on the external 'cpio' command at all. Remove 'cpio' from the package build dependencies as well. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Documentation/process/changes.rst | 6 ------ kernel/gen_kheaders.sh | 13 ++----------- scripts/package/PKGBUILD | 1 - scripts/package/mkdebian | 2 +- 4 files changed, 3 insertions(+), 19 deletions(-) commit fd2a118c483472f8862cc46981a5230414cd0e67 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Wed Dec 18 19:37:07 2024 +0900 kheaders: rename the 'cpio_dir' variable to 'tmpdir' The next commit will get rid of the use of 'cpio' command, as there is no strong reason to use it just for copying files. Before that, this commit renames the 'cpio_dir' variable to 'tmpdir'. No functional changes are intended. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> kernel/gen_kheaders.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit de0cae9273841ca019e438192d08b7358a002973 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Wed Dec 18 19:37:06 2024 +0900 kheaders: avoid unnecessary process forks of grep Exclude include/generated/{utsversion.h,autoconf.h} by using the -path option to reduce the cost of forking new processes. No functional changes are intended. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> kernel/gen_kheaders.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 41e86fe7ebe9eaf18c394145cc91b08b5ec932a8 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Wed Dec 18 19:37:05 2024 +0900 kheaders: exclude include/generated/utsversion.h from kheaders_data.tar.xz CONFIG_IKHEADERS has a reproducibility issue because the contents of kernel/kheaders_data.tar.xz can vary depending on how you build the kernel. If you build the kernel with CONFIG_IKHEADERS enabled from a pristine state, the tarball does not include include/generated/utsversion.h. $ make -s mrproper $ make -s defconfig $ scripts/config -e CONFIG_IKHEADERS $ make -s $ tar Jtf kernel/kheaders_data.tar.xz | grep utsversion However, if you build the kernel with CONFIG_IKHEADERS disabled first and then enable it later, the tarball does include include/generated/utsversion.h. $ make -s mrproper $ make -s defconfig $ make -s $ scripts/config -e CONFIG_IKHEADERS $ make -s $ tar Jtf kernel/kheaders_data.tar.xz | grep utsversion ./include/generated/utsversion.h It is not predictable whether a stale include/generated/utsversion.h remains when kheaders_data.tar.xz is generated. For better reproducibility, include/generated/utsversions.h should always be omitted. It is not necessary for the kheaders anyway. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> kernel/gen_kheaders.sh | 4 ++++ 1 file changed, 4 insertions(+) commit 1f937a4bcb0472015818f30f4d3c5546d3f09933 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Tue Dec 10 19:24:41 2024 +0900 kbuild: suppress stdout from merge_config for silent builds merge_config does not respect the Make's -s (--silent) option. Let's sink the stdout from merge_config for silent builds. This commit does not cater to the direct invocation of merge_config.sh (e.g. arch/mips/Makefile). Reported-by: Leon Romanovsky <leon@kernel.org> Closes: https://lore.kernel.org/all/e534ce33b0e1060eb85ece8429810f087b034c88.1733234008.git.leonro@nvidia.com/ Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: Leon Romanovsky <leon@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org> scripts/Makefile.defconf | 13 +++++++------ scripts/kconfig/Makefile | 4 +++- 2 files changed, 10 insertions(+), 7 deletions(-) commit 5f73e7d0386d970a7d0e9de5a58d53114de85033 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Tue Dec 10 19:06:17 2024 +0900 kbuild: refactor cross-compiling linux-headers package Since commit 13b25489b6f8 ("kbuild: change working directory to external module directory with M="), when cross-building host programs for the linux-headers package, the "Entering directory" and "Leaving directory" messages appear multiple times, and each object path shown is relative to the working directory. This makes it difficult to track which objects are being rebuilt. In hindsight, using the external module build (M=) was not a good idea. This commit simplifies the script by leveraging the run-command target, resulting in a cleaner build log again. [Before] $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bindeb-pkg [ snip ] Rebuilding host programs with aarch64-linux-gnu-gcc... make[5]: Entering directory '/home/masahiro/linux' make[6]: Entering directory '/home/masahiro/linux/debian/linux-headers-6.13.0-rc1+/usr/src/linux-headers-6.13.0-rc1+' HOSTCC scripts/kallsyms HOSTCC scripts/sorttable HOSTCC scripts/asn1_compiler make[6]: Leaving directory '/home/masahiro/linux/debian/linux-headers-6.13.0-rc1+/usr/src/linux-headers-6.13.0-rc1+' make[5]: Leaving directory '/home/masahiro/linux' make[5]: Entering directory '/home/masahiro/linux' make[6]: Entering directory '/home/masahiro/linux/debian/linux-headers-6.13.0-rc1+/usr/src/linux-headers-6.13.0-rc1+' HOSTCC scripts/basic/fixdep HOSTCC scripts/mod/modpost.o HOSTCC scripts/mod/file2alias.o HOSTCC scripts/mod/sumversion.o HOSTCC scripts/mod/symsearch.o HOSTLD scripts/mod/modpost make[6]: Leaving directory '/home/masahiro/linux/debian/linux-headers-6.13.0-rc1+/usr/src/linux-headers-6.13.0-rc1+' make[5]: Leaving directory '/home/masahiro/linux' [After] $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bindeb-pkg [ snip ] HOSTCC debian/linux-headers-6.13.0-rc1+/usr/src/linux-headers-6.13.0-rc1+/scripts/basic/fixdep HOSTCC debian/linux-headers-6.13.0-rc1+/usr/src/linux-headers-6.13.0-rc1+/scripts/kallsyms HOSTCC debian/linux-headers-6.13.0-rc1+/usr/src/linux-headers-6.13.0-rc1+/scripts/sorttable HOSTCC debian/linux-headers-6.13.0-rc1+/usr/src/linux-headers-6.13.0-rc1+/scripts/asn1_compiler HOSTCC debian/linux-headers-6.13.0-rc1+/usr/src/linux-headers-6.13.0-rc1+/scripts/mod/modpost.o HOSTCC debian/linux-headers-6.13.0-rc1+/usr/src/linux-headers-6.13.0-rc1+/scripts/mod/file2alias.o HOSTCC debian/linux-headers-6.13.0-rc1+/usr/src/linux-headers-6.13.0-rc1+/scripts/mod/sumversion.o HOSTCC debian/linux-headers-6.13.0-rc1+/usr/src/linux-headers-6.13.0-rc1+/scripts/mod/symsearch.o HOSTLD debian/linux-headers-6.13.0-rc1+/usr/src/linux-headers-6.13.0-rc1+/scripts/mod/modpost Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/package/install-extmod-build | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) commit ac2c30f98f28a6606af89ce44bff77af5d558fe8 Author: Johannes Schauer Marin Rodrigues <josch@mister-muffin.de> Date: Tue Dec 3 17:17:35 2024 +0100 kbuild: deb-pkg: allow hooks also in /usr/share/kernel By passing an additional directory to run-parts, allow Debian and its derivatives to ship maintainer scripts in /usr while at the same time allowing the local admin to override or disable them by placing hooks of the same name in /etc. This adds support for the mechanism described in the UAPI Configuration Files Specification for kernel hooks. The same idea is also used by udev, systemd or modprobe for their config files. https://uapi-group.org/specifications/specs/configuration_files_specification/ This functionality relies on run-parts 5.21 or later. It is the responsibility of packages installing hooks into /usr/share/kernel to also declare a Depends: debianutils (>= 5.21). KDEB_HOOKDIR can be used to change the list of directories that is searched. By default, /etc/kernel and /usr/share/kernel are hook directories. Since the list of directories in KDEB_HOOKDIR is separated by spaces, the paths must not contain the space character themselves. Signed-off-by: Johannes Schauer Marin Rodrigues <josch@mister-muffin.de> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/package/builddeb | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit d9ecb92b4fbbbb0a9993017da8d044541ca35886 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Tue Dec 3 22:59:58 2024 +0900 kbuild: deb-pkg: do not include empty hook directories The linux-image package currently includes empty hook directories (/etc/kernel/{pre,post}{inst,rm}.d/ by default). These directories were perhaps intended as a fail-safe in case no hook scripts exist there. However, they are really unnecessary because the run-parts command is already guarded by the following check: test -d ${debhookdir}/${script}.d && run-parts ... The only difference is that the run-parts command either runs for empty directories (resulting in a no-op) or is skipped entirely. The maintainer scripts will succeed without these dummy directories. The linux-image packages from the Debian kernel do not contain /etc/kernel/*.d/, either. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> scripts/package/builddeb | 2 -- 1 file changed, 2 deletions(-) commit 74c033b6aa650ea7280221a9e57b7318a120978c Author: Arnaldo Carvalho de Melo <acme@kernel.org> Date: Tue Nov 26 17:43:18 2024 -0300 perf MANIFEST: Add arch/*/include/uapi/asm/bpf_perf_event.h to the perf tarball Needed to build tools/lib/bpf/ on various arches other than x86_64, notably arm64 when using the perf tarballs generated by: $ make help | grep perf- perf-tar-src-pkg - Build the perf source tarball with no compression perf-targz-src-pkg - Build the perf source tarball with gzip compression perf-tarbz2-src-pkg - Build the perf source tarball with bz2 compression perf-tarxz-src-pkg - Build the perf source tarball with xz compression perf-tarzst-src-pkg - Build the perf source tarball with zst compression $ Building with BPF support was opt-in in perf for a long time, and testing it via the tarball main kernel Makefile targets in an architecture other than x86_64 was an odd case. I had noticed this at some point earlier this year while cross building perf to some arches, including arm64, but it fell thru the cracks, see the Link tag below. Fix it now by adding those arch/*/include/uapi/asm/bpf_perf_event.h files to the MANIFEST file used in building the perf source tarball. Tested with: perfbuilder@number:~$ time dm debian:experimental-x-arm64 1 21.60 debian:experimental-x-arm64 : Ok aarch64-linux-gnu-gcc (Debian 14.1.0-5) 14.1.0 flex 2.6.4 BUILD_TARBALL_HEAD=d31a974f6edc576f84c35be9526fec549a3b3520 $ $ git log --oneline -1 d31a974f6edc576f84c35be9526fec549a3b3520 d31a974f6edc576f (HEAD -> perf-tools-next) perf MANIFEST: Add arch/*/include/uapi/asm/bpf_perf_event.h to the perf tarball $ That was previously failing: perfbuilder@number:~$ grep debian:experimental-x-arm64 dm.log.old/summary 19 4.80 debian:experimental-x-arm64 : FAIL gcc version 14.1.0 (Debian 14.1.0-5) $ perfbuilder@number:~$ grep -B6 'Error 1' dm.log.old/debian:experimental-x-arm64 In file included from /git/perf-6.12.0-rc6/tools/include/uapi/linux/bpf_perf_event.h:11, from libbpf.c:36: /git/perf-6.12.0-rc6/tools/include/uapi/asm/bpf_perf_event.h:2:10: fatal error: ../../arch/arm64/include/uapi/asm/bpf_perf_event.h: No such file or directory 2 | #include "../../arch/arm64/include/uapi/asm/bpf_perf_event.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[4]: *** [/git/perf-6.12.0-rc6/tools/build/Makefile.build:105: /tmp/build/perf/libbpf/staticobjs/libbpf.o] Error 1 perfbuilder@number:~$ Closes: https://lore.kernel.org/all/Z0UNRCRYKunbDYxP@hyperscale.parallels Fixes: 9eea8fafe33eb708 ("libbpf: fix __arg_ctx type enforcement for perf_event programs") Reported-by: Michel Lind <michel@michel-slm.name> Tested-by: Michel Lind <michel@michel-slm.name> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: 317c11923cf676437456e44a7f408d4ce589a9c0.camel@michel-slm.name Link: https://lore.kernel.org/bpf/ZfyEgoG3JFiOs2Fs@x1/ Link: https://lore.kernel.org/r/Z0Yy5u42Q1hWoEzz@x1 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/MANIFEST | 1 + 1 file changed, 1 insertion(+) commit e5e34e999597df3d596ae7bea81aa8f4df4fbfb7 Author: Yoshihiro Furudera <fj5100bi@fujitsu.com> Date: Tue Dec 17 06:57:51 2024 +0000 perf vendor events arm64: Add FUJITSU-MONAKA PMU event Add PMU events for FUJITSU-MONAKA. And, also updated common-and-microarch.json and recommended.json. FUJITSU-MONAKA Specification URL: https://github.com/fujitsu/FUJITSU-MONAKA Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Akio Kakuno <fj3333bs@aa.jp.fujitsu.com> Signed-off-by: Yoshihiro Furudera <fj5100bi@fujitsu.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ilkka Koskinen <ilkka@os.amperecomputing.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jing Zhang <renyu.zj@linux.alibaba.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linux.dev> Cc: Lucas Stach <l.stach@pengutronix.de> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Cc: Xu Yang <xu.yang_2@nxp.com> Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20241217065751.1448755-1-fj5100bi@fujitsu.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> .../arch/arm64/common-and-microarch.json | 715 +++++++++++++++++++++ .../arch/arm64/fujitsu/monaka/core-imp-def.json | 6 + .../arm64/fujitsu/monaka/cycle_accounting.json | 122 ++++ .../arch/arm64/fujitsu/monaka/energy.json | 17 + .../arch/arm64/fujitsu/monaka/exception.json | 42 ++ .../arch/arm64/fujitsu/monaka/fp_operation.json | 209 ++++++ .../arch/arm64/fujitsu/monaka/gcycle.json | 97 +++ .../arch/arm64/fujitsu/monaka/general.json | 10 + .../pmu-events/arch/arm64/fujitsu/monaka/hwpf.json | 52 ++ .../arch/arm64/fujitsu/monaka/l1d_cache.json | 113 ++++ .../arch/arm64/fujitsu/monaka/l1i_cache.json | 52 ++ .../arch/arm64/fujitsu/monaka/l2_cache.json | 160 +++++ .../arch/arm64/fujitsu/monaka/l3_cache.json | 159 +++++ .../arch/arm64/fujitsu/monaka/ll_cache.json | 10 + .../arch/arm64/fujitsu/monaka/memory.json | 10 + .../arch/arm64/fujitsu/monaka/pipeline.json | 208 ++++++ .../pmu-events/arch/arm64/fujitsu/monaka/pmu.json | 10 + .../arch/arm64/fujitsu/monaka/retired.json | 30 + .../arch/arm64/fujitsu/monaka/spec_operation.json | 171 +++++ .../arch/arm64/fujitsu/monaka/stall.json | 94 +++ .../pmu-events/arch/arm64/fujitsu/monaka/sve.json | 254 ++++++++ .../pmu-events/arch/arm64/fujitsu/monaka/tlb.json | 362 +++++++++++ .../arch/arm64/fujitsu/monaka/trace.json | 18 + tools/perf/pmu-events/arch/arm64/mapfile.csv | 1 + tools/perf/pmu-events/arch/arm64/recommended.json | 5 + 25 files changed, 2927 insertions(+) commit 876e80cf83d10585df6ee1e353cfbf562f9a930e Author: Namhyung Kim <namhyung@kernel.org> Date: Wed Dec 18 14:04:53 2024 -0800 perf tools: Fixup end address of modules In machine__create_module(), it reads /proc/modules to get a list of modules in the system. The file shows the start address (of text) and the size of the module so it uses the info to reconstruct system memory maps for symbol resolution. But module memory consists of multiple segments and they can be scaterred. Currently perf tools assume they are contiguous and see some overlaps. This can confuse the tool when it finds a map containing a given address. As we mostly care about the function symbols in the text segment, it can fixup the size or end address of modules when there's an overlap. We can use maps__fixup_end() which updates the end address using the start address of the next map. Ideally it should be able to track other segments (like data/rodata), but that would require some changes in /proc/modules IMHO. Reported-by: Blake Jones <blakejones@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Daniel Gomez <da.gomez@samsung.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Luis Chamberlain <mcgrof@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Petr Pavlu <petr.pavlu@suse.com> Cc: Sami Tolvanen <samitolvanen@google.com> Link: https://lore.kernel.org/r/20241218220453.203069-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/machine.c | 2 ++ 1 file changed, 2 insertions(+) commit 8c2eafbbfd782d6ad270ca2de21b529ac57de0f4 Author: Namhyung Kim <namhyung@kernel.org> Date: Thu Jan 2 12:32:51 2025 -0800 perf symbol: Prefer non-label symbols with same address When there are more than one symbols at the same address, it needs to choose which one is better. In choose_best_symbol() it didn't check the type of symbols. It's possible to have labels in other symbols and in that case, it would be better to pick the actual symbol over the labels. To minimize the possible impact on other symbols, I only check NOTYPE symbols specifically. $ readelf -sW vmlinux | grep -e __do_softirq -e __softirqentry_text_start 105089: ffffffff82000000 814 FUNC GLOBAL DEFAULT 1 __do_softirq 111954: ffffffff82000000 0 NOTYPE GLOBAL DEFAULT 1 __softirqentry_text_start The commit 77b004f4c5c3c90b tried to do the same by not giving the size to the label symbols but it seems there's some label-only symbols in asm code. Let's restore the original code and choose the right symbol using type of the symbols. Fixes: 77b004f4c5c3c90b ("perf symbol: Do not fixup end address of labels") Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Link: http://lore.kernel.org/lkml/Z3b-DqBMnNb4ucEm@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/symbol.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 368781025a1133d7f9550358ba421994118608f7 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 19:17:54 2024 -0800 perf symbol-elf: Avoid a weak cxx_demangle_sym function cxx_demangle_sym is weak in case demangle-cxx.c replaces the definition in symbol-elf.c. When demangle-cxx.c is built HAVE_CXA_DEMANGLE_SUPPORT is defined, as such the define can be used to avoid a weak symbol. As weak symbols are outside of the C standard their use can lead to strange behaviors, in particular with LTO, as well as causing issues to be hidden at link time. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241119031754.1021858-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/symbol-elf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4f90ed0ae36ac2c223d312a2cd767714196b1455 Author: Namhyung Kim <namhyung@kernel.org> Date: Thu Jan 2 12:12:47 2025 -0800 perf trace: Fix unaligned access for augmented args Some version of compilers reported unaligned accesses in perf trace when undefined-behavior sanitizer is on. I found that it uses raw data in the sample directly and assuming it's properly aligned. Unlike other sample fields, the raw data is not 8-byte aligned because there's a size field (u32) before the actual data. So I added a static buffer in syscall__augmented_args() and return it instead. This is not ideal but should work well as perf trace is single-threaded. A better approach would be aligning the raw data by adding a 4-byte data before the augmented args but I'm afraid it'd break the backward compatibility. Committer testing: To build with the undefined behaviour sanitizer: $ make CC=clang EXTRA_CFLAGS=-fsanitize=undefined -C tools/perf Checking if the resulting binary is instrumented: root@number:~# nm ~/bin/perf | grep ubsan | wc -l 113 root@number:~# nm ~/bin/perf | grep ubsan | tail -5 000000000043d5b0 t _ZN7__ubsanL19UBsanOnDeadlySignalEiPvS0_ 000000000043ce50 T _ZNK7__ubsan5Value12getSIntValueEv 000000000043cf40 T _ZNK7__ubsan5Value12getUIntValueEv 000000000043d140 T _ZNK7__ubsan5Value13getFloatValueEv 000000000043cfd0 T _ZNK7__ubsan5Value19getPositiveIntValueEv root@number:~# Now running something that will access timespec, as reported in the Closes URL: root@number:~# perf trace --max-events=1 -e *nano* sleep 1.1 trace/beauty/timespec.c:10:64: runtime error: member access within misaligned address 0x7fc583cfb2a4 for type 'struct augmented_arg', which requires 8 byte alignment 0x7fc583cfb2a4: note: pointer points here 99 99 11 00 10 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 e1 f5 05 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior trace/beauty/timespec.c:10:64 <SNIP> As Namhyung said we need to make the raw_data to be 64-bit aligned, probably we need to add a PERF_SAMPLE_ALIGNED_RAW with a 64-bit raw_size instead of the current u32 done at kernel/events/core.c, perf_output_sample(), that perf_output_put(handle, raw->size) where raw->size is an u32 and then the raw_data is always 64-bit unaligned... After the patch: root@number:~# perf trace -e *nano* sleep 1.1 0.000 (1100.064 ms): sleep/1984224 clock_nanosleep(rqtp: { .tv_sec: 1, .tv_nsec: 100000001 }, rmtp: 0x7fff5b3fe970) = 0 root@number:~# Closes: https://lore.kernel.org/r/Z2STgyD1p456Qqhg@google.com Reviewed-by: Howard Chu <howardchu95@gmail.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20250102201248.790841-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-trace.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 0ba2022410fc1acf67f958474d666c0d35addcc7 Author: James Clark <james.clark@linaro.org> Date: Tue Jan 7 16:59:30 2025 +0000 perf test: Mark remaining probe tests as exclusive Probes are global and other probe tests are already exclusive. These two tests can throw warnings when run at the same time so mark them as exclusive too: $ perf test -vvv 81 79 79: perftool-testsuite_probe: --- start --- test child forked, pid 46419 ../common/init.sh: line 137: /sys/kernel/debug/tracing/uprobe_events: Device or resource busy Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: James Clark <james.clark@linaro.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Link: https://lore.kernel.org/r/20250107165933.292225-1-james.clark@linaro.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/shell/perftool-testsuite_probe.sh | 2 +- tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3cc550f5bbcf54abeeae400b33f618407a0c99f0 Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:31 2025 -0800 perf tools: Remove dependency on libaudit All architectures now support HAVE_SYSCALL_TABLE_SUPPORT, so the flag is no longer needed. With the removal of the flag, the related GENERIC_SYSCALL_TABLE can also be removed. libaudit was only used as a fallback for when HAVE_SYSCALL_TABLE_SUPPORT was not defined, so libaudit is also no longer needed for any architecture. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Guo Ren <guoren@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-16-7543b5293098@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Documentation/admin-guide/workload-tracing.rst | 2 +- tools/build/feature/Makefile | 4 -- tools/build/feature/test-libaudit.c | 11 ------ tools/perf/Documentation/perf-check.txt | 2 - tools/perf/Makefile.config | 31 +-------------- tools/perf/Makefile.perf | 15 -------- tools/perf/builtin-check.c | 2 - tools/perf/builtin-help.c | 2 - tools/perf/builtin-trace.c | 30 --------------- tools/perf/perf.c | 6 +-- tools/perf/tests/make | 7 +--- tools/perf/util/env.c | 6 +-- tools/perf/util/generate-cmdlist.sh | 4 +- tools/perf/util/syscalltbl.c | 52 -------------------------- tools/perf/util/syscalltbl.h | 1 - 15 files changed, 11 insertions(+), 164 deletions(-) commit 00d1bfae1b9618c4986c1d175d916011ed084fa4 Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:30 2025 -0800 perf tools s390: Use generic syscall table scripts Use the generic scripts to generate headers from the syscall table instead of the custom ones for s390. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Guo Ren <guoren@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-15-7543b5293098@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.config | 6 +--- tools/perf/Makefile.perf | 2 +- tools/perf/arch/s390/Makefile | 21 -------------- tools/perf/arch/s390/entry/syscalls/Kbuild | 2 ++ .../arch/s390/entry/syscalls/Makefile.syscalls | 5 ++++ tools/perf/arch/s390/entry/syscalls/mksyscalltbl | 32 ---------------------- tools/perf/arch/s390/include/syscall_table.h | 2 ++ tools/perf/util/syscalltbl.c | 6 +--- 8 files changed, 12 insertions(+), 64 deletions(-) commit 4c02c7e0a2194f2d0292746df2d2be1076b61cf9 Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:29 2025 -0800 perf tools powerpc: Use generic syscall table scripts Use the generic scripts to generate headers from the syscall table instead of the custom ones for powerpc. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Guo Ren <guoren@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-14-7543b5293098@rivosinc.com Link: https://lore.kernel.org/lkml/20250110100505.78d81450@canb.auug.org.au [ Stephen Rothwell noticed on linux-next that the powerpc build for perf was broken and ...] Link: https://lore.kernel.org/lkml/20250109-perf_powerpc_spu-v1-1-c097fc43737e@rivosinc.com [ ... Charlie fixed it up and asked for it to be squashed to avoid breaking bisection. ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.config | 3 +- tools/perf/Makefile.perf | 2 +- tools/perf/arch/powerpc/Makefile | 25 -------------- tools/perf/arch/powerpc/entry/syscalls/Kbuild | 3 ++ .../arch/powerpc/entry/syscalls/Makefile.syscalls | 6 ++++ .../perf/arch/powerpc/entry/syscalls/mksyscalltbl | 39 ---------------------- tools/perf/arch/powerpc/include/syscall_table.h | 8 +++++ tools/perf/util/syscalltbl.c | 8 ----- 8 files changed, 19 insertions(+), 75 deletions(-) commit 178902bf44f2755f68e47f669ae6d8e9135cdb26 Merge: 40384c840ea1 30bca65bbbae Author: Christian Brauner <brauner@kernel.org> Date: Fri Jan 10 14:54:14 2025 +0100 Merge patch series "afs: Dynamic root improvements" David Howells <dhowells@redhat.com> says: Here are some patches to make a number of improvements to the AFS dynamic root: (1) Create an /afs/.<cell> mountpoint to match the /afs/<cell> mountpoint when a cell is created. (2) Add some more checks on cell names proposed by the user to prevent dodgy symlink bodies from being created. Also prevent rootcell from being altered once set to simplify the locking. (3) Change the handling of /afs/@cell from being a dentry name substitution at lookup time to making it a symlink to the current cell name and also provide a /afs/.@cell symlink to point to the dotted cell mountpoint. * patches from https://lore.kernel.org/r/20250107183454.608451-1-dhowells@redhat.com: afs: Make /afs/@cell and /afs/.@cell symlinks afs: Add rootcell checks afs: Make /afs/.<cell> as well as /afs/<cell> mountpoints Link: https://lore.kernel.org/r/20250107183454.608451-1-dhowells@redhat.com Signed-off-by: Christian Brauner <brauner@kernel.org> commit 30bca65bbbae13f32ee4f2897c55a496ea8132cf Author: David Howells <dhowells@redhat.com> Date: Tue Jan 7 18:34:51 2025 +0000 afs: Make /afs/@cell and /afs/.@cell symlinks Make /afs/@cell a symlink in the /afs dynamic root to match what other AFS clients do rather than doing a substitution in the dentry name. This has the bonus of being tab-expandable also. Further, provide a /afs/.@cell symlink to point to the dotted cell share. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20250107183454.608451-4-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/dynroot.c | 177 +++++++++++++++++++++++++++++++++------------ include/trace/events/afs.h | 2 + 2 files changed, 131 insertions(+), 48 deletions(-) commit 3e914febd79a8d1a78ee6e67ff3fa4214d6d1d57 Author: David Howells <dhowells@redhat.com> Date: Tue Jan 7 18:34:50 2025 +0000 afs: Add rootcell checks Add some checks for the validity of the cell name. It's may get put into a symlink, so preclude it containing any slashes or "..". Also disallow starting/ending with a dot. This makes /afs/@cell/ as a symlink less of a security risk. Also disallow multiple setting of /proc/net/afs/rootcell for any given network namespace. Once set, the value may not be changed. This makes it easier to only create /afs/@cell and /afs/.@cell if there's a rootcell. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20250107183454.608451-3-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/cell.c | 8 ++++++++ fs/afs/proc.c | 8 +++++++- 2 files changed, 15 insertions(+), 1 deletion(-) commit 92f08e9d3cf0f8005ac6fcb931e3c388efc3ac49 Author: David Howells <dhowells@redhat.com> Date: Tue Jan 7 18:34:49 2025 +0000 afs: Make /afs/.<cell> as well as /afs/<cell> mountpoints When a cell is instantiated, automatically create an /afs/.<cell> mountpoint to match the /afs/<cell> mountpoint to match other AFS clients. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20250107183454.608451-2-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/cell.c | 13 ++++++++----- fs/afs/dynroot.c | 52 +++++++++++++++++++++++++++++++++------------------- 2 files changed, 41 insertions(+), 24 deletions(-) commit d00f343a63e9e40b0193ad908ad410b981574545 Author: Rob Herring (Arm) <robh@kernel.org> Date: Thu Jan 9 09:28:10 2025 -0600 MAINTAINERS: Add perf list for drivers/perf/ drivers/perf/ contains drivers for the perf subsystem, so it makes sense that the perf list, linux-perf-users@vger.kernel.org, should be included for perf drivers. Cc: Will Deacon <will@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: James Clark <james.clark@linaro.org> Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20250109152811.3402943-1-robh@kernel.org Signed-off-by: Will Deacon <will@kernel.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 965e9bbe025e02ddea3f34bdcb5757411593f43e Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Thu Jan 9 11:46:34 2025 +0100 arm64: Remove duplicate included header The header asm/unistd_compat_32.h is included whether CONFIG_COMPAT is defined or not. Include it only once and remove the following make includecheck warning: asm/unistd_compat_32.h is included more than once Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20250109104636.124507-2-thorsten.blum@linux.dev Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/include/asm/seccomp.h | 1 - 1 file changed, 1 deletion(-) commit 4575353d82e253ac14bb0d3fc2034bfad2f2e64e Author: Oliver Upton <oliver.upton@linux.dev> Date: Tue Dec 17 13:20:33 2024 -0800 drivers/perf: apple_m1: Map generic branch events Map the generic perf events for branch prediction stats to the corresponding hardware events. Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Tested-by: Janne Grunau <j@jannau.net> Link: https://lore.kernel.org/r/20241217212048.3709204-4-oliver.upton@linux.dev Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/apple_m1_cpu_pmu.c | 2 ++ 1 file changed, 2 insertions(+) commit 1f3dc29d2445c89c85e451c02e41a8e0cd22423c Author: Will Deacon <will@kernel.org> Date: Fri Jan 10 13:18:55 2025 +0000 iommu/arm-smmu-v3: Add missing #include of linux/string_choices.h Commit f2c77f6e41e6 ("iommu/arm-smmu-v3: Use str_read_write helper w/ logs") introduced a call to str_read_write() in the SMMUv3 driver but without an explicit #include of <linux/string_choices.h>. This breaks the build for custom configurations where CONFIG_ACPI=n: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:1909:4: error: call to undeclared function 'str_read_write'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 1909 | str_read_write(evt->read), | ^ Add the missing #include. Link: https://lore.kernel.org/r/d07e82a4-2880-4ae3-961b-471bfa7ac6c4@samsung.com Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Fixes: f2c77f6e41e6 ("iommu/arm-smmu-v3: Use str_read_write helper w/ logs") Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 1 + 1 file changed, 1 insertion(+) commit 7420a7e8672d8878e8911fb70025b07d865b6fe5 Merge: 851daf833e87 857a61c2ce74 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Fri Jan 10 14:17:22 2025 +0100 Merge tag 'amd-pstate-v6.14-2025-01-07' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux Merge amd-pstate changes for 6.14 from Mario Limonciello: "Fix a regression with preferred core rankings not being used. Fix a precision issue with frequency calculation." * tag 'amd-pstate-v6.14-2025-01-07' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux: cpufreq/amd-pstate: Refactor max frequency calculation cpufreq/amd-pstate: Fix prefcore rankings commit 8221712a174ad83e36489c414c26619010f4e348 Author: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Date: Mon Jan 6 12:34:02 2025 -0800 wifi: brcmfmac: Add missing Return: to function documentation Running 'scripts/kernel-doc -Wall -Werror -none' flagged the following kernel-doc issues: drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:823: warning: No description found for return value of 'brcmf_apsta_add_vif' drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:907: warning: No description found for return value of 'brcmf_mon_add_vif' drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:7419: warning: No description found for return value of 'brcmf_setup_ifmodes' Add the missing 'Return:' tags to the kernel-doc of these functions. Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20250106-brcmfmac-kdoc-v1-1-ed72196e21a1@oss.qualcomm.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 83ed80dd25f6ed8db5d0751a9a49a22d1bc9a8bc Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Dec 26 01:13:55 2024 +0000 wifi: iwlegacy: Remove unused il_get_single_channel_number() THe last use of il_get_single_channel_number() was removed in 2011 by commit dd6d2a8aef69 ("iwlegacy: remove reset rf infrastructure") when it was still called iwl_legacy_get_single_channel_number. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241226011355.135417-3-linux@treblig.org drivers/net/wireless/intel/iwlegacy/common.c | 31 ---------------------------- drivers/net/wireless/intel/iwlegacy/common.h | 1 - 2 files changed, 32 deletions(-) commit 413859e909a425a04a221240e1066e48cd2220a2 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Dec 26 01:13:54 2024 +0000 wifi: iwlegacy: Remove unused il3945_calc_db_from_ratio() The last use of il3945_calc_db_from_ratio() was removed in 2010 by commit ed1b6e99b5e6 ("iwlwifi: remove noise reporting") when it was still called iwl3945_calc_db_from_ratio(). Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241226011355.135417-2-linux@treblig.org drivers/net/wireless/intel/iwlegacy/3945-mac.c | 38 -------------------------- drivers/net/wireless/intel/iwlegacy/3945.h | 1 - 2 files changed, 39 deletions(-) commit 280c8b39050bc19fe78ca259d68328dd23bc9599 Author: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr> Date: Sat Dec 21 13:39:32 2024 +0100 wifi: rt2x00: Remove unused rfval values The intention here is not clear but as this was already tested and matches vendor driver it's better not to change behavior even if it looks suspicious. So just remove the unused values. Coverity-ID: 1525307 Signed-off-by: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> [kvalo@kernel.org: write commit message] Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241221124445.1094460-2-ariel.otilibili-anieli@eurecom.fr drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 6 ------ 1 file changed, 6 deletions(-) commit 1e5f6771c247b28135307058d2cfe3b0153733dc Author: Steven Rostedt <rostedt@goodmis.org> Date: Fri Jan 10 07:54:59 2025 -0500 scripts/sorttable: Use a structure of function pointers for elf helpers Instead of having a series of function pointers that gets assigned to the Elf64 or Elf32 versions, put them all into a single structure and use that. Add the helper function that chooses the structure into the macros that build the different versions of the elf functions. Link: https://lore.kernel.org/all/CAHk-=wiafEyX7UgOeZgvd6fvuByE5WXUPh9599kwOc_d-pdeug@mail.gmail.com/ Cc: bpf <bpf@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Zheng Yejian <zhengyejian1@huawei.com> Cc: Martin Kelly <martin.kelly@crowdstrike.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Link: https://lore.kernel.org/20250110075459.13d4b94c@gandalf.local.home Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> scripts/sorttable.c | 175 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 118 insertions(+), 57 deletions(-) commit 082d9e263af8de68f0c34f67b251818205160f6e Author: Stefan Dösinger <stefan@codeweavers.com> Date: Mon Jan 6 20:09:58 2025 +0300 wifi: brcmfmac: Check the return value of of_property_read_string_index() Somewhen between 6.10 and 6.11 the driver started to crash on my MacBookPro14,3. The property doesn't exist and 'tmp' remains uninitialized, so we pass a random pointer to devm_kstrdup(). The crash I am getting looks like this: BUG: unable to handle page fault for address: 00007f033c669379 PF: supervisor read access in kernel mode PF: error_code(0x0001) - permissions violation PGD 8000000101341067 P4D 8000000101341067 PUD 101340067 PMD 1013bb067 PTE 800000010aee9025 Oops: Oops: 0001 [#1] SMP PTI CPU: 4 UID: 0 PID: 827 Comm: (udev-worker) Not tainted 6.11.8-gentoo #1 Hardware name: Apple Inc. MacBookPro14,3/Mac-551B86E5744E2388, BIOS 529.140.2.0.0 06/23/2024 RIP: 0010:strlen+0x4/0x30 Code: f7 75 ec 31 c0 c3 cc cc cc cc 48 89 f8 c3 cc cc cc cc 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa <80> 3f 00 74 14 48 89 f8 48 83 c0 01 80 38 00 75 f7 48 29 f8 c3 cc RSP: 0018:ffffb4aac0683ad8 EFLAGS: 00010202 RAX: 00000000ffffffea RBX: 00007f033c669379 RCX: 0000000000000001 RDX: 0000000000000cc0 RSI: 00007f033c669379 RDI: 00007f033c669379 RBP: 00000000ffffffea R08: 0000000000000000 R09: 00000000c0ba916a R10: ffffffffffffffff R11: ffffffffb61ea260 R12: ffff91f7815b50c8 R13: 0000000000000cc0 R14: ffff91fafefffe30 R15: ffffb4aac0683b30 FS: 00007f033ccbe8c0(0000) GS:ffff91faeed00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f033c669379 CR3: 0000000107b1e004 CR4: 00000000003706f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ? __die+0x23/0x70 ? page_fault_oops+0x149/0x4c0 ? raw_spin_rq_lock_nested+0xe/0x20 ? sched_balance_newidle+0x22b/0x3c0 ? update_load_avg+0x78/0x770 ? exc_page_fault+0x6f/0x150 ? asm_exc_page_fault+0x26/0x30 ? __pfx_pci_conf1_write+0x10/0x10 ? strlen+0x4/0x30 devm_kstrdup+0x25/0x70 brcmf_of_probe+0x273/0x350 [brcmfmac] Signed-off-by: Stefan Dösinger <stefan@codeweavers.com> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20250106170958.3595-1-stefan@codeweavers.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 996c934c8c196144af386c4385f61fcd5349af28 Author: Andreas Kemnade <andreas@kemnade.info> Date: Sat Jan 4 20:55:07 2025 +0100 wifi: wlcore: fix unbalanced pm_runtime calls If firmware boot failes, runtime pm is put too often: [12092.708099] wlcore: ERROR firmware boot failed despite 3 retries [12092.708099] wl18xx_driver wl18xx.1.auto: Runtime PM usage count underflow! Fix that by redirecting all error gotos before runtime_get so that runtime is not put. Fixes: c40aad28a3cf ("wlcore: Make sure firmware is initialized in wl1271_op_add_interface()") Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reviewed-by: Michael Nemanov <michael.nemanov@ti.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20250104195507.402673-1-akemnade@kernel.org drivers/net/wireless/ti/wlcore/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit af10dd16655339a48178221fc4b73fbf171dd739 Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Fri Dec 20 05:14:58 2024 +0000 hostfs: Convert to writepages If we add a migrate_folio operation, we can convert the writepage operation to writepages. 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) <willy@infradead.org> Link: https://patch.msgid.link/20241220051500.1919389-1-willy@infradead.org Signed-off-by: Johannes Berg <johannes.berg@intel.com> fs/hostfs/hostfs_kern.c | 54 +++++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 29 deletions(-) commit 579e7fd383ff3f7a4f685489f8fe18cfd8659074 Author: Benjamin Berg <benjamin.berg@intel.com> Date: Tue Dec 17 21:49:06 2024 +0100 um: rtc: use RTC time when calculating the alarm The kernel realtime and the current RTC time may have a (small) offset. Should the kernel time be slightly in the future, then the timeout is zero. This is problematic in time-travel mode, as a zero timeout can be correctly configured and time never advances. Replace the kernel realtime read with a read of the actual persistent RTC clock. Also, for time-travel, calculate the exact nanoseconds needed for the clock to advance. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Co-developed-by: Avraham Stern <avraham.stern@intel.com> Link: https://patch.msgid.link/20241217204906.1408011-1-benjamin@sipsolutions.net Signed-off-by: Johannes Berg <johannes.berg@intel.com> arch/um/drivers/rtc_kern.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 7ee1e43a5f493a1332af3ac668cc2a87515c1622 Author: Tiwei Bie <tiwei.btw@antgroup.com> Date: Thu Nov 28 16:31:37 2024 +0800 um: Remove unused user_context function It's no longer used since commit 6aa802ce6acc ("uml: throw out CHOOSE_MODE"). Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20241128083137.2219830-10-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> arch/um/kernel/process.c | 8 -------- arch/x86/um/shared/sysdep/ptrace.h | 2 -- 2 files changed, 10 deletions(-) commit c5e78b8d408add9d3562c7c44a727336ecb5d48b Author: Tiwei Bie <tiwei.btw@antgroup.com> Date: Thu Nov 28 16:31:36 2024 +0800 um: Remove unused THREAD_NAME_LEN macro It's no longer used since commit 42fda66387da ("uml: throw out CONFIG_MODE_TT"). Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20241128083137.2219830-9-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> arch/um/os-Linux/main.c | 1 - 1 file changed, 1 deletion(-) commit 3c68810e150b80b9282e854142922b39489a54a5 Author: Tiwei Bie <tiwei.btw@antgroup.com> Date: Thu Nov 28 16:31:35 2024 +0800 um: Remove unused PGD_BOUND macro It's no longer used since commit 11100b1dfb6e ("uml: delete unused code"). Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20241128083137.2219830-8-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> arch/um/os-Linux/main.c | 1 - 1 file changed, 1 deletion(-) commit 0c5258efd69b73bd12f3e68cfe72e1396fdb857c Author: Tiwei Bie <tiwei.btw@antgroup.com> Date: Thu Nov 28 16:31:34 2024 +0800 um: Mark setup_env_path as __init It's only invoked during boot from main(). Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20241128083137.2219830-7-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> arch/um/os-Linux/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2fdfd779717bf1d4bb569c7cb64502143144cad Author: Tiwei Bie <tiwei.btw@antgroup.com> Date: Thu Nov 28 16:31:33 2024 +0800 um: Mark install_fatal_handler as __init It's only invoked during boot from main(). Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20241128083137.2219830-6-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> arch/um/os-Linux/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0c76bc82d4544bde874497e830b2c9fa04bafe1 Author: Tiwei Bie <tiwei.btw@antgroup.com> Date: Thu Nov 28 16:31:32 2024 +0800 um: Mark set_stklim as __init It's only invoked during boot from main(). Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20241128083137.2219830-5-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> arch/um/os-Linux/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae62ae7994a0f453b1566d04ec090cf1bd534675 Author: Tiwei Bie <tiwei.btw@antgroup.com> Date: Thu Nov 28 16:31:31 2024 +0800 um: Mark get_top_address as __init It's only invoked during boot from linux_main(). Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20241128083137.2219830-4-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> arch/um/kernel/um_arch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bcd89fd8f5f6caf440a52aa3822316f12bc0732d Author: Tiwei Bie <tiwei.btw@antgroup.com> Date: Thu Nov 28 16:31:30 2024 +0800 um: Mark parse_cache_line as __init It's only invoked during boot from get_host_cpu_features(). Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20241128083137.2219830-3-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> arch/um/kernel/um_arch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 70240b5d1f5be2a9d37e43e6dc355d07681d2bbc Author: Tiwei Bie <tiwei.btw@antgroup.com> Date: Thu Nov 28 16:31:29 2024 +0800 um: Mark parse_host_cpu_flags as __init It's only invoked during boot from get_host_cpu_features(). Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20241128083137.2219830-2-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> arch/um/kernel/um_arch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1be94490b6b8a06ff14cd23fda8714e6ec37cdfb Author: Alexis Lothoré <alexis.lothore@bootlin.com> Date: Mon Dec 23 16:46:48 2024 +0100 wifi: wilc1000: unregister wiphy only if it has been registered There is a specific error path in probe functions in wilc drivers (both sdio and spi) which can lead to kernel panic, as this one for example when using SPI: Unable to handle kernel paging request at virtual address 9f000000 when read [9f000000] *pgd=00000000 Internal error: Oops: 5 [#1] ARM Modules linked in: wilc1000_spi(+) crc_itu_t crc7 wilc1000 cfg80211 bluetooth ecdh_generic ecc CPU: 0 UID: 0 PID: 106 Comm: modprobe Not tainted 6.13.0-rc3+ #22 Hardware name: Atmel SAMA5 PC is at wiphy_unregister+0x244/0xc40 [cfg80211] LR is at wiphy_unregister+0x1c0/0xc40 [cfg80211] [...] wiphy_unregister [cfg80211] from wilc_netdev_cleanup+0x380/0x494 [wilc1000] wilc_netdev_cleanup [wilc1000] from wilc_bus_probe+0x360/0x834 [wilc1000_spi] wilc_bus_probe [wilc1000_spi] from spi_probe+0x15c/0x1d4 spi_probe from really_probe+0x270/0xb2c really_probe from __driver_probe_device+0x1dc/0x4e8 __driver_probe_device from driver_probe_device+0x5c/0x140 driver_probe_device from __driver_attach+0x220/0x540 __driver_attach from bus_for_each_dev+0x13c/0x1a8 bus_for_each_dev from bus_add_driver+0x2a0/0x6a4 bus_add_driver from driver_register+0x27c/0x51c driver_register from do_one_initcall+0xf8/0x564 do_one_initcall from do_init_module+0x2e4/0x82c do_init_module from load_module+0x59a0/0x70c4 load_module from init_module_from_file+0x100/0x148 init_module_from_file from sys_finit_module+0x2fc/0x924 sys_finit_module from ret_fast_syscall+0x0/0x1c The issue can easily be reproduced, for example by not wiring correctly a wilc device through SPI (and so, make it unresponsive to early SPI commands). It is due to a recent change decoupling wiphy allocation from wiphy registration, however wilc_netdev_cleanup has not been updated accordingly, letting it possibly call wiphy unregister on a wiphy which has never been registered. Fix this crash by moving wiphy_unregister/wiphy_free out of wilc_netdev_cleanup, and by adjusting error paths in both drivers Fixes: fbdf0c5248dc ("wifi: wilc1000: Register wiphy after reading out chipid") Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241223-wilc_fix_probe_error_path-v1-1-91fa7bd8e5b6@bootlin.com drivers/net/wireless/microchip/wilc1000/netdev.c | 2 -- drivers/net/wireless/microchip/wilc1000/sdio.c | 9 +++++++-- drivers/net/wireless/microchip/wilc1000/spi.c | 9 +++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) commit 06e0e6295957592cfceaa21124a49b55c98470c9 Author: Tiwei Bie <tiwei.btw@antgroup.com> Date: Thu Nov 28 16:19:39 2024 +0800 um: Count iomem_size only once in physmem calculation When calculating max_physmem, we've already factored in the space used by iomem. We don't need to subtract it again. Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20241128081939.2216246-4-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> arch/um/kernel/um_arch.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5bfc4a3a0af3dcf53516e5f0dd9a2649bcd05bad Author: Tiwei Bie <tiwei.btw@antgroup.com> Date: Thu Nov 28 16:19:38 2024 +0800 um: Remove obsolete fixmap support It was added to support highmem. But since the highmem support has been removed by commit a98a6d864d3b ("um: Remove broken highmem support"), it is no longer needed. Remove it to simplify the code. Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20241128081939.2216246-3-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> arch/um/include/asm/fixmap.h | 56 ------------------------------------------- arch/um/include/asm/pgtable.h | 5 +--- arch/um/kernel/mem.c | 15 ++++-------- 3 files changed, 5 insertions(+), 71 deletions(-) commit aa36314c2d08c47fe835e60c6cf72bf5d0ed4d68 Author: Tiwei Bie <tiwei.btw@antgroup.com> Date: Thu Nov 28 16:19:37 2024 +0800 um: Remove unused MODULES_LEN macro It's not used anywhere. And its definition doesn't seem right. Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20241128081939.2216246-2-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> arch/um/include/asm/pgtable.h | 1 - 1 file changed, 1 deletion(-) commit 89aca45f26879dfbbf8374c425c4811f69cfc2df Author: Shayne Chen <shayne.chen@mediatek.com> Date: Mon Oct 7 21:51:33 2024 +0800 wifi: mt76: mt7996: fix invalid interface combinations Setting beacon_int_min_gcd and NL80211_IFTYPE_ADHOC in the same interface combination is invalid, which will trigger the following warning trace and get error returned from wiphy_register(). [ 10.080325] Call trace: [ 10.082761] wiphy_register+0xc4/0x76c [cfg80211] [ 10.087465] ieee80211_register_hw+0x800/0xac4 [mac80211] [ 10.092868] mt76_register_device+0x16c/0x2c0 [mt76] [ 10.097829] mt7996_register_device+0x740/0x844 [mt7996e] Fix this by removing unused adhoc iftype. Fixes: 948f65249868 ("wifi: mt76: mt7996: advertize beacon_int_min_gcd") Reported-by: Frank Wunderlich <frank-w@public-files.de> Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Tested-By: Frank Wunderlich <frank-w@public-files.de> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241007135133.5336-1-shayne.chen@mediatek.com drivers/net/wireless/mediatek/mt76/mt7996/init.c | 3 --- 1 file changed, 3 deletions(-) commit bf2aa7df2687a24ebb52cec4a24443121ac3126d Author: Alice Ryhl <aliceryhl@google.com> Date: Fri Jan 10 10:14:59 2025 +0000 miscdevice: rust: use build_error! macro instead of function The function called build_error is an implementation detail of the macro of the same name. Thus, update miscdevice to use the macro rather than the function. See [1] for more information on this. These use the macro with the kernel:: prefix as it has not yet been added to the prelude. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Link: https://lore.kernel.org/r/20250110162828.38614c1b@canb.auug.org.au Link: https://lore.kernel.org/all/20241123222849.350287-2-ojeda@kernel.org/ [1] Signed-off-by: Alice Ryhl <aliceryhl@google.com> Acked-by: Miguel Ojeda <ojeda@kernel.org> Link: https://lore.kernel.org/r/20250110101459.536726-1-aliceryhl@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> rust/kernel/miscdevice.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 078bf9438a31567e2c0587159ccefde835fb1ced Author: Zichen Xie <zichenxie0106@gmail.com> Date: Wed Nov 27 21:29:56 2024 -0600 samples/landlock: Fix possible NULL dereference in parse_path() malloc() may return NULL, leading to NULL dereference. Add a NULL check. Fixes: ba84b0bf5a16 ("samples/landlock: Add a sandbox manager example") Signed-off-by: Zichen Xie <zichenxie0106@gmail.com> Link: https://lore.kernel.org/r/20241128032955.11711-1-zichenxie0106@gmail.com [mic: Simplify fix] Signed-off-by: Mickaël Salaün <mic@digikod.net> samples/landlock/sandboxer.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b665ee5f08df401a9e4a68e7d5f662d3f72ba1e1 Author: Ba Jing <bajing@cmss.chinamobile.com> Date: Mon Nov 18 12:24:07 2024 +0800 selftests/landlock: Remove unused macros in ptrace_test.c After reviewing the code, it was found that these macros are never referenced in the code. Just remove them. Signed-off-by: Ba Jing <bajing@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241118042407.12900-1-bajing@cmss.chinamobile.com [mic: Reword subject] Signed-off-by: Mickaël Salaün <mic@digikod.net> tools/testing/selftests/landlock/ptrace_test.c | 2 -- 1 file changed, 2 deletions(-) commit f79e6eb84d4d2bff99e3ca6c1f140b2af827e904 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Mon Jan 6 14:48:01 2025 +0100 samples/vfs/mountinfo: Use __u64 instead of uint64_t On 32-bit (e.g. arm32, m68k): samples/vfs/mountinfo.c: In function ‘dump_mountinfo’: samples/vfs/mountinfo.c:145:29: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=] 145 | printf("0x%lx 0x%lx 0x%llx ", mnt_ns_id, mnt_id, buf->mnt_parent_id); | ~~^ ~~~~~~~~~ | | | | long unsigned int uint64_t {aka long long unsigned int} | %llx samples/vfs/mountinfo.c:145:35: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=] 145 | printf("0x%lx 0x%lx 0x%llx ", mnt_ns_id, mnt_id, buf->mnt_parent_id); | ~~^ ~~~~~~ | | | | long unsigned int uint64_t {aka long long unsigned int} | %llx Just using "%llx" instead of "%lx" is not sufficient, as uint64_t is "long unsigned int" on some 64-bit platforms like arm64. Hence also replace "uint64_t" by "__u64", which matches what most other samples are already using. Fixes: d95e49bf8bcdc7c1 ("samples: add a mountinfo program to demonstrate statmount()/listmount()") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20250106134802.1019911-1-geert+renesas@glider.be Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> samples/vfs/mountinfo.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) commit c1a6911485b022e093c589c295a953ff744112b9 Merge: 7e0c2f136d1b 9d92fda0e2ad Author: Marc Kleine-Budde <mkl@pengutronix.de> Date: Fri Jan 10 11:32:43 2025 +0100 Merge patch series "can: kvaser_usb: Update stats and state even if alloc_can_err_skb() fails" This series improves the the kvaser_usb and the kvaser_pciefd driver. Update the error statistics, even if allocation of error skb fails and add support for CAN_CTRLMODE_BERR_REPORTING. Link: https://patch.msgid.link/20241230142645.128244-1-extja@kvaser.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> commit 9d92fda0e2ad8840a50216a13b7308a4b50a94b3 Author: Jimmy Assarsson <extja@kvaser.com> Date: Mon Dec 30 15:26:45 2024 +0100 can: kvaser_pciefd: Add support for CAN_CTRLMODE_BERR_REPORTING Add support for CAN_CTRLMODE_BERR_REPORTING, allowing Bus Error Reporting to be enabled or disabled. Previously, Bus Error Reporting was always active. Co-developed-by: Alison Below <alisonbelow@gmail.com> Signed-off-by: Alison Below <alisonbelow@gmail.com> Signed-off-by: Jimmy Assarsson <extja@kvaser.com> Link: https://patch.msgid.link/20241230142645.128244-4-extja@kvaser.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> drivers/net/can/kvaser_pciefd.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) commit e048c5e55fbc8d884825b1951b38b7a59d88377a Author: Jimmy Assarsson <extja@kvaser.com> Date: Mon Dec 30 15:26:44 2024 +0100 can: kvaser_pciefd: Update stats and state even if alloc_can_err_skb() fails Ensure statistics, error counters, and CAN state are updated consistently, even when alloc_can_err_skb() fails during state changes or error message frame reception. Signed-off-by: Jimmy Assarsson <extja@kvaser.com> Link: https://patch.msgid.link/20241230142645.128244-3-extja@kvaser.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> drivers/net/can/kvaser_pciefd.c | 52 ++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 0dfa617c3f77cfb48a80b1043e3fb6085bd358fc Author: Jimmy Assarsson <extja@kvaser.com> Date: Mon Dec 30 15:26:43 2024 +0100 can: kvaser_usb: Add support for CAN_CTRLMODE_BERR_REPORTING Add support for CAN_CTRLMODE_BERR_REPORTING, allowing Bus Error Reporting to be enabled or disabled. Previously, Bus Error Reporting was always active. Signed-off-by: Jimmy Assarsson <extja@kvaser.com> Link: https://patch.msgid.link/20241230142645.128244-2-extja@kvaser.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 3 ++- drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 29 +++++++++++++---------- drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 13 ++++++---- 3 files changed, 26 insertions(+), 19 deletions(-) commit 3749637b71b0b081e468730320edc45ea64ef5b9 Author: Jimmy Assarsson <extja@kvaser.com> Date: Mon Dec 30 15:26:42 2024 +0100 can: kvaser_usb: Update stats and state even if alloc_can_err_skb() fails Ensure statistics, error counters, and CAN state are updated consistently, even when alloc_can_err_skb() fails during state changes or error message frame reception. Signed-off-by: Jimmy Assarsson <extja@kvaser.com> Link: https://patch.msgid.link/20241230142645.128244-1-extja@kvaser.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 124 +++++++++------------- drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 31 ++---- 2 files changed, 60 insertions(+), 95 deletions(-) commit 7e0c2f136d1be33e5e950747f3a5f312977fff4b Author: Dario Binacchi <dario.binacchi@amarulasolutions.com> Date: Sat Dec 28 16:00:30 2024 +0100 dt-bindings: can: st,stm32-bxcan: fix st,gcan property type The SRAM memory shared pointed to by the st,gcan property is unique, so we don't need an array of phandles. Fixes: e43250c0ac81 ("dt-bindings: net: can: add STM32 bxcan DT bindings") Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20241228150043.3926696-1-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d844dff425c7c98578436cf5d244fb81396a9fdb Merge: d50c837675a9 ad1ddb3bfb0c Author: Marc Kleine-Budde <mkl@pengutronix.de> Date: Fri Jan 10 11:05:46 2025 +0100 Merge patch series "can: tcan4x5x/m_can: use standby mode when down and in suspend" Sean Nyekjaer <sean@geanix.com> says: When downing the tcan4x5x there is no reason to keep the tcan4x5x in "normal" mode and waste power. So set standby mode when the interface is down and normal mode when interface is up. Also when going into suspend, set the tcan4x5x into standby mode. The tcan4x5x can still be used as a wake-source when in standby as low power RX is enabled. Link: https://patch.msgid.link/20241122-tcan-standby-v3-0-90bafaf5eccd@geanix.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> commit ad1ddb3bfb0c9193eb19d4788192904350c7e51a Author: Sean Nyekjaer <sean@geanix.com> Date: Fri Nov 22 15:52:24 2024 +0100 can: m_can: call deinit/init callback when going into suspend/resume m_can user like the tcan4x5x device, can go into standby mode. Low power RX mode is enabled to allow wake on can. Signed-off-by: Sean Nyekjaer <sean@geanix.com> Link: https://patch.msgid.link/20241122-tcan-standby-v3-3-90bafaf5eccd@geanix.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> drivers/net/can/m_can/m_can.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit a1366314703a93ef6a4538790cc3a5f6538c9e22 Author: Sean Nyekjaer <sean@geanix.com> Date: Fri Nov 22 15:52:23 2024 +0100 can: tcan4x5x: add deinit callback to set standby mode At Vsup 12V, standby mode will save 7-8mA, when the interface is down. Signed-off-by: Sean Nyekjaer <sean@geanix.com> Link: https://patch.msgid.link/20241122-tcan-standby-v3-2-90bafaf5eccd@geanix.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> drivers/net/can/m_can/tcan4x5x-core.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit baa8aaf79768b72eb7a181c476ca0291613f59e6 Author: Sean Nyekjaer <sean@geanix.com> Date: Fri Nov 22 15:52:22 2024 +0100 can: m_can: add deinit callback This is added in preparation for calling standby mode in the tcan4x5x driver or other users of m_can. For the tcan4x5x; If Vsup 12V, standby mode will save 7-8mA, when the interface is down. Signed-off-by: Sean Nyekjaer <sean@geanix.com> Link: https://patch.msgid.link/20241122-tcan-standby-v3-1-90bafaf5eccd@geanix.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> drivers/net/can/m_can/m_can.c | 7 +++++++ drivers/net/can/m_can/m_can.h | 1 + 2 files changed, 8 insertions(+) commit bb2e0fb1e6aa9f737d6e0cbcf6494c51180e6d6d Author: Geert Uytterhoeven <geert@linux-m68k.org> Date: Wed Jan 8 18:22:00 2025 +0100 m68k: libgcc: Fix lvalue abuse in umul_ppmm() lib/muldi3.c:53:28: warning: asm output is not an lvalue lib/muldi3.c:53:28: warning: asm output is not an lvalue lib/muldi3.c:53:28: error: not addressable lib/muldi3.c:53:28: warning: generating address of non-lvalue (11) lib/muldi3.c:53:28: warning: generating address of non-lvalue (11) Fix the lvalue warnings by replacing the casts on the output operands by intermediate variables of the right type. Fix the "not addressable" error by replacing the cast on the second input operand by an intermediate variable, too. Treat the other input operand the same for consistency. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202501030516.uZrwnuQQ-lkp@intel.com/ Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer <gerg@linux-m68k.org> Link: https://lore.kernel.org/c408cfb85bfde8929dcaa4ebea29ade4e1452d8e.1736356696.git.geert@linux-m68k.org arch/m68k/include/asm/libgcc.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 6847b00c3c85fffff15f29e030a2fa489bdde88b Author: Gerhard Engleder <gerhard@engleder-embedded.com> Date: Sat Dec 14 22:57:59 2024 +0100 misc: keba: Fix kernfs warning on module unload Unloading the cp500 module leads to the following warning: kernfs: can not remove 'eeprom', no directory WARNING: CPU: 1 PID: 1610 at fs/kernfs/dir.c:1683 kernfs_remove_by_name_ns+0xb1/0xc0 The parent I2C device of the nvmem devices is freed before the nvmem devices. The reference to the nvmem devices is put by devm after cp500_remove(), but at this time the parent I2C device does not exist anymore as the I2C controller and its devices have already been freed in cp500_remove(). Thus, nvmem tries to remove an entry from an already deleted directory. Free nvmem devices before I2C controller auxiliary device. Signed-off-by: Gerhard Engleder <eg@keba.com> Link: https://lore.kernel.org/r/20241214215759.60811-1-gerhard@engleder-embedded.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/keba/cp500.c | 69 ++++++++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 24 deletions(-) commit 2d390e063464f91cb071dfa5495868ba6b120d8a Author: Ricardo Ribalda <ribalda@chromium.org> Date: Fri Nov 29 18:29:44 2024 +0000 misc: Kconfig: Make MCHP_LAN966X_PCI depend on OF_OVERLAY Drivers should depend on configurations that can be user-configurable instead of selecting them. Without this patch, OF cannot be disabled this way: make allyesconfig scripts/config -d OF make olddefconfig Which is a typical test in CI systems like media-ci. Now that we are at it, remove the dependency on OF, it will come automatically from OF_OVERLAY. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://lore.kernel.org/r/20241129-lan966x-depend-v2-1-72bb9397f421@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7b24f164cf005b9649138ef6de94aaac49c9f3d1 Merge: 9007d911f6d2 7082a6dc84eb Author: David S. Miller <davem@davemloft.net> Date: Fri Jan 10 09:15:17 2025 +0000 Merge tag 'ipsec-next-2025-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== ipsec-next-2025-01-09 1) Implement the AGGFRAG protocol and basic IP-TFS (RFC9347) functionality. From Christian Hopps. 2) Support ESN context update to hardware for TX. From Jianbo Liu. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit c1ecb860a48d0bf56b0fc8391c5d59b0c3b42516 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 22 21:20:50 2024 +0100 firmware_loader: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Russ Weight <russ.weight@linux.dev> Link: https://lore.kernel.org/r/20241222-sysfs-const-bin_attr-firmware-v1-1-c35e56bfb4eb@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/firmware_loader/sysfs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 2a8d6abdf5cfdc7df934968f2e8292d050f20b20 Author: Randy Dunlap <rdunlap@infradead.org> Date: Fri Nov 29 18:35:54 2024 -0800 devcoredump: cleanup some comments Correct a spello, remove an extra space between words, and fix one kernel-doc warning: drivers/base/devcoredump.c:292: warning: No description found for return value of 'devcd_read_from_sgtable' Fixes: 522566376a3f ("devcoredump: add scatterlist support") Fixes: 01daccf74832 ("devcoredump : Serialize devcd_del work") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Rafael J. Wysocki <rafael@kernel.org> Cc: Aviya Erenfeld <aviya.erenfeld@intel.com> Cc: Mukesh Ojha <quic_mojha@quicinc.com> Link: https://lore.kernel.org/r/20241130023554.538820-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/devcoredump.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7685ad5f08d9297f5a3d30b1818391ac94813171 Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Thu Dec 5 09:56:05 2024 +0100 mux: constify mux class All class functions used here take a const pointer to the class structure so we can make the struct itself constant. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20241205085605.9501-1-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/mux/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9007d911f6d2a99d3dd1dbf2097de35727cc665a Author: Rob Herring (Arm) <robh@kernel.org> Date: Thu Jan 9 12:21:17 2025 -0600 net: dsa: qca8k: 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) <robh@kernel.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/qca/qca8k-8xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a04bb5a2046067681257d5dd69a724856c8fbcb Author: Jani Nikula <jani.nikula@intel.com> Date: Thu Jan 9 12:50:32 2025 +0200 drm/xe: remove unused xe_pciids.h harder, add missing PCI ID Commit 493454445c95 ("drm/xe: switch to common PCI ID macros") removed xe_pciids.h via drm-intel-next. In the mean time, commit ae78ec0a52c4 ("drm/xe/ptl: Add another PTL PCI ID") added to xe_pciids.h via drm-xe-next. The two commits were merged in commit 8f109f287fdc ("Merge drm/drm-next into drm-xe-next"), but xe_pciids.h wasn't removed, and the PCI ID wasn't added to pciids.h. Remove xe_pciids.h, and add the PCI ID to pciids.h. Cc: Matt Atwood <matthew.s.atwood@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Fixes: 8f109f287fdc ("Merge drm/drm-next into drm-xe-next") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Closes: https://lore.kernel.org/r/20241125120921.1bbc1930@canb.auug.org.au Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250109105032.2585416-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> include/drm/intel/pciids.h | 3 +- include/drm/intel/xe_pciids.h | 235 ------------------------------------------ 2 files changed, 2 insertions(+), 236 deletions(-) commit dfe6aa163c3b3780add4392d93b686b399ceb591 Author: Maarten Lankhorst <dev@lankhorst.se> Date: Wed Dec 4 14:44:04 2024 +0100 drm/xe: Implement cgroup for vram Add vram based cgroup eviction to Xe. Most hardware with VRAM uses TTM for its management, and can be similarly trivially enabled. Co-developed-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/20241204134410.1161769-5-dev@lankhorst.se Signed-off-by: Maxime Ripard <mripard@kernel.org> drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2b624a2c18656ea32e0849e7bc0018ba3c97ca64 Author: Maarten Lankhorst <dev@lankhorst.se> Date: Wed Dec 4 14:44:03 2024 +0100 drm/ttm: Handle cgroup based eviction in TTM cgroup resource allocation has to be handled in TTM, so -EAGAIN from cgroups can be converted into -ENOSPC, and the limitcg can be properly evicted in ttm code. When hitting a resource limit through -EAGAIN, the cgroup for which the limit is hit is also returned. This allows eviction to delete only from cgroups which are a subgroup of the current cgroup. The returned CSS is used to determine if eviction is valuable for a given resource, and allows TTM to only target specific resources to lower memory usage. Co-developed-by: Friedrich Vock <friedrich.vock@gmx.de> Signed-off-by: Friedrich Vock <friedrich.vock@gmx.de> Co-developed-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/20241204134410.1161769-4-dev@lankhorst.se Signed-off-by: Maxime Ripard <mripard@kernel.org> drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 18 ++++---- drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c | 4 +- drivers/gpu/drm/ttm/tests/ttm_resource_test.c | 2 +- drivers/gpu/drm/ttm/ttm_bo.c | 52 ++++++++++++++++++++---- drivers/gpu/drm/ttm/ttm_resource.c | 23 ++++++++++- include/drm/ttm/ttm_resource.h | 12 +++++- 6 files changed, 89 insertions(+), 22 deletions(-) commit a6e208736587648fc1eb8a4d832d90427586f367 Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Mon Dec 2 19:17:03 2024 +0100 uio: uio_dmem_genirq: check the return value of devm_kasprintf() devm_kasprintf() can fail so check its return value and bail-out on no memory. Fixes: 52e2dc2ce2d8 ("uio: Convert a few more users to using %pOFn instead of device_node.name") Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20241202181703.28546-1-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/uio/uio_dmem_genirq.c | 2 ++ 1 file changed, 2 insertions(+) commit efc7ae3f249a6aa2de8f6bec56a2314badfd340a Author: Angus Chen <angus.chen@jaguarmicro.com> Date: Tue Nov 26 20:42:58 2024 +0800 uio: Fix return value of poll The return type of __poll_t can't be negative, -EIO will be translate to __poll_t,and will return to caller. Fixes: beafc54c4e2f ("UIO: Add the User IO core code") Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com> Link: https://lore.kernel.org/r/20241126124259.1367-1-angus.chen@jaguarmicro.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/uio/uio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a111aee82a8298343cdd2e1b95cc9b1dd68c4558 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Fri Jan 10 00:05:19 2025 +0100 ALSA: sb: Use str_enabled_disabled() helper in info_read() Remove hard-coded strings by using the str_enabled_disabled() helper function. Suggested-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20250109230521.237162-2-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/isa/sb/sb16_csp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1bc1965e4f6f8b64721e7b4e0eab3b632ae606c8 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Thu Jan 9 23:38:08 2025 +0100 ALSA: emu10k1: Use str_yes_no() helper Remove hard-coded strings by using the str_yes_no() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20250109223809.198582-2-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/emu10k1/emuproc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4204e3bf63c4b68968fd557f05fed32c99e2b18a Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Jan 4 12:10:25 2025 -0500 bcachefs: check_unreachable_inodes is not actually PASS_ONLINE yet check_unreachable_inodes does work in online mode, with the one caveat that it assumes check_dirents has also run - and check_dirents is not PASS_ONLINE yet. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/recovery_passes_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae153f2e11eea89bc1203c33f304939190b88614 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Jan 4 12:09:52 2025 -0500 bcachefs: Don't use BTREE_ITER_cached when walking alloc btree during fsck No need to pull the whole alloc btree into the btree key cache. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 15734b5e6f8dfd44df08ecc1d846540476b7f7de Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Dec 31 15:59:02 2024 -0500 bcachefs: Check for dirents to overwritten inodes This fixes various "dirent to missing inode" errors. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fsck.c | 38 ++++++++++++++++++++++++++++++++++---- fs/bcachefs/sb-errors_format.h | 3 ++- 2 files changed, 36 insertions(+), 5 deletions(-) commit d3d0fac57d4679024199706a2aa6d2a4a477bfa3 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Dec 29 09:37:15 2024 -0500 bcachefs: bch2_btree_iter_peek_slot() handles navigating to nonexistent depth Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 4 ++++ 1 file changed, 4 insertions(+) commit bd5b09727f3d13bb3c782b5f05041c69784e7fe9 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Dec 31 12:58:23 2024 -0500 bcachefs: Don't set btree_path to updtodate if we don't fill This fixes various locking asserts, and a null ptr deref in bch2_btree_iter_peek_path(). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_key_cache.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit cf67f46641abd71ec9c1e4b55481928c50975804 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Dec 30 16:22:59 2024 -0500 bcachefs: __bch2_btree_pos_to_text() Factor out a version of bch2_btree_pos_to_text() that doesn't take a pointer to a in-memory btree node, to be used for btree node scrub. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_cache.c | 16 +++++++++++----- fs/bcachefs/btree_cache.h | 2 ++ 2 files changed, 13 insertions(+), 5 deletions(-) commit 0a46ea9d4693d960fda990acf7b0230cb417306e Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Dec 30 15:31:14 2024 -0500 bcachefs: printbuf_reset() handles tabstops Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/printbuf.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 5906dcb9937d2664db39598b65729a252eaf4aaf Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Dec 31 09:55:09 2024 -0500 bcachefs: Silence read-only errors when deleting snapshots Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/snapshot.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 8b1f46bff38f075b8d4071e7ac1edecb441fd53c Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Dec 28 19:57:04 2024 -0500 bcachefs: Dropped superblock write is no longer a fatal error Just emit a warning if errors=continue or fix_safe. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/super-io.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 8cfdc6ce1f785278ae2a1cf58e62d125986797fc Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Dec 25 12:19:08 2024 -0500 bcachefs: bch2_trans_node_drop() Factor out a small common helper. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 13 +++++++++++++ fs/bcachefs/btree_iter.h | 1 + fs/bcachefs/btree_update_interior.c | 17 +++-------------- 3 files changed, 17 insertions(+), 14 deletions(-) commit 0971a72c3d1a8be44f54e72096c7d1fc5fbe512e Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Dec 24 05:40:17 2024 -0500 bcachefs: bch2_trans_unlock_write() New helper for dropping all write locks; which is distinct from the helper the transaction commit path uses, which is faster and only touches updates. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_locking.c | 11 +++++++++++ fs/bcachefs/btree_locking.h | 1 + fs/bcachefs/btree_trans_commit.c | 6 +++--- 3 files changed, 15 insertions(+), 3 deletions(-) commit e1911d7a69b88f02f0f1542a25f714574153f196 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Dec 24 05:57:30 2024 -0500 bcachefs: btree_node_unlock() can now drop write locks Prep work for reworking btree node locking during interior btree updates. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_locking.h | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit 9a5232ef0a9f9dcc8d1645b361296772b03a3525 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Dec 21 02:33:53 2024 -0500 bcachefs: six locks: write locks can now be held recursively This is needed for the interior update locking rework, where we'll be holding node write locks for the duration of the update - which is needed for synchronizing with online check_allocations. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/six.c | 17 ++++++++++++----- fs/bcachefs/six.h | 1 + 2 files changed, 13 insertions(+), 5 deletions(-) commit 8f3aaa5d5d4e915c2486eafca84840d04b517b72 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Dec 25 06:32:41 2024 -0500 bcachefs: bch2_fs_btree_gc_init() Now returns errors, prep work for check_allocations_done_lock Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_gc.c | 11 +++++++++-- fs/bcachefs/btree_gc.h | 4 +++- fs/bcachefs/super.c | 6 ++---- 3 files changed, 14 insertions(+), 7 deletions(-) commit cb3f34982c9dfccf1aadde4e69043c7da3107c92 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Dec 24 16:57:24 2024 -0500 bcachefs: Assert that btree write buffer only touches the right btrees More asserts, more better. Also, clean up the per-btree flags a bit. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs_format.h | 48 +++++++++++++++++++++++++++------------- fs/bcachefs/btree_types.h | 39 ++++++++++++++++++++------------ fs/bcachefs/btree_write_buffer.c | 2 ++ 3 files changed, 60 insertions(+), 29 deletions(-) commit bdedae70f51f570381095a59740d6a9df1262668 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Dec 24 05:16:56 2024 -0500 bcachefs: bch2_inum_path() now crosses subvolumes correctly The dirent that points to a subvolume root is in the parent subvolume. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fs-common.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ce9a21713bfd9744ae4cbfef1b4d8bc895ab7283 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Dec 24 05:11:46 2024 -0500 bcachefs: bch2_inum_path() no longer returns an error for disconnected inums bch2_inum_path() should work even if the filesystem is corrupted - we don't want it to cause fsck to fail. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fs-common.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 6adc5af50a5401a19c1f23b3ed2ebfd3a0d8cdc6 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Dec 21 02:55:03 2024 -0500 bcachefs: btree_path_very_locks(): verify lock seq If the btree_path's lock seq is wrong, the next bch2_trans_relock() operation is guaranteed to fail and we take an unnecessary transaction restart. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_locking.c | 3 +++ 1 file changed, 3 insertions(+) commit f908eacc34c7e8092bd47b7fcf5741943d3b734c Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Dec 21 04:14:28 2024 -0500 bcachefs: fix bch2_btree_key_cache_drop() When evicting, we shouldn't leave a pointer to the key cache entry lying around - that screws up btree path asserts we're adding. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_key_cache.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit bc6fce7870ceda943fdc8451d42407dacb1519e3 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Dec 21 03:31:00 2024 -0500 bcachefs: bch2_btree_node_write_trans() Avoiding screwing up path->lock_seq. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_io.c | 32 ++++++++++++++++++++++++++++++-- fs/bcachefs/btree_io.h | 6 ++++-- fs/bcachefs/btree_locking.h | 19 ++++++++++++------- fs/bcachefs/btree_trans_commit.c | 2 +- fs/bcachefs/btree_update_interior.c | 16 ++++++++-------- 5 files changed, 55 insertions(+), 20 deletions(-) commit 4bd06f07bcb5c472b7d7a90e6ee890bd0900b3e1 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Dec 20 04:46:00 2024 -0500 bcachefs: Fixes for snapshot_tree.master_subvol Ensure that snapshot_tree.master_subvol is cleared when we delete the master subvolume in a tree of snapshots, and allow for snapshot trees that don't have a master subvolume in fsck. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/snapshot.c | 12 +++++++----- fs/bcachefs/subvolume.c | 50 +++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 47 insertions(+), 15 deletions(-) commit b5e4cd0871db885de05d531e8e72fa6059d81bd4 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Dec 20 23:56:42 2024 -0500 bcachefs: Don't rely on snapshot_tree.master_subvol for reattaching Previously, fsck used the snapshot tree's master subvol for finding the root inode number - but the master subvol might have been deleting, and setting a new one should be a user operation; meaning we can't rely on it existing. Fortunately, for finding the root inode number in a tree of snapshots, finding any associated subvolume works. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/errcode.h | 1 + fs/bcachefs/fsck.c | 52 ++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 46 insertions(+), 7 deletions(-) commit 45414083913f68cb7586924767a3fb2cc7710352 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Dec 20 05:20:01 2024 -0500 bcachefs: bch2_kvmalloc() Add a version of kvmalloc() that doesn't have the INT_MAX limit; large filesystems do hit this. We'll want to get rid of the in-memory bucket gens array, but we're not there quite yet. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/buckets.c | 6 +++--- fs/bcachefs/util.h | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) commit fa3e5135e4e7bfb38598a58caf592c940eff4b03 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Dec 16 16:41:25 2024 -0500 bcachefs: Fix assert for online fsck We can't check if we're racing with fsck ending until mark_lock is held. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/disk_accounting.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cf3da2d627037a0848e25dbaeaedfadfe534c7c4 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Dec 16 13:58:02 2024 -0500 bcachefs: Handle -BCH_ERR_need_mark_replicas in gc Locking considerations (possibly no longer relevant?) mean that when an accounting update needs a new superblock replicas entry to be created, it's deferred to the transaction commit error path. But accounting updates for gc/fcsk aren't done from the transaction commit path - so we need to handle -BCH_ERR_btree_insert_need_mark_replicas locally. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/disk_accounting.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 861cd0f60624440b51e3ff14b04055b59c13d1e4 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Jun 8 17:01:31 2024 -0400 bcachefs: Write lock btree node in key cache fills this addresses a key cache coherency bug Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_key_cache.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit baf13d83441b8c25fcb09097ec629a8388d1c505 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Dec 15 02:24:30 2024 -0500 bcachefs: kill __bch2_btree_iter_flags() bch2_btree_iter_flags() now takes a level parameter; this fixes a bug where using a node iterator on a leaf wouldn't set BTREE_ITER_with_key_cache, leading to fun cache coherency bugs. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 7 +++++-- fs/bcachefs/btree_iter.h | 28 +++++++++++----------------- 2 files changed, 16 insertions(+), 19 deletions(-) commit 30e32692d6b898338db26f6caf6fef295ce7ec68 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Dec 15 02:03:11 2024 -0500 bcachefs: Drop redundant "read error" call from btree_gc The btree node read error path already calls topology error, so this is entirely redundant, and we're not specific enough about our error codes - this was triggering for bucket_ref_update() errors. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_gc.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 6542afe299eaa1be530caa56c455492f470896cb Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Dec 15 01:52:54 2024 -0500 bcachefs: Drop racy warning Checking for writing past i_size after unlocking the folio and clearing the dirty bit is racy, and we already check it at the start. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fs-io-buffered.c | 9 --------- 1 file changed, 9 deletions(-) commit 0475c7639edf3282783b04913889d2a6369d541e Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Dec 12 00:55:48 2024 -0500 bcachefs: better check_bp_exists() error message Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d01ea14da718f7c30520c8498a7ba952b099ad83 Author: Hongbo Li <lihongbo22@huawei.com> Date: Tue Nov 12 16:15:47 2024 +0800 bcachefs: add counter_flags for counters In bcachefs, io_read and io_write counter record the amount of data which has been read and written. They increase in unit of sector, so to display correctly, they need to be shifted to the left by the size of a sector. Other counters like io_move, move_extent_{read, write, finish} also have this problem. In order to support different unit, we add extra column to mark the counter type by using TYPE_COUNTER and TYPE_SECTORS in BCH_PERSISTENT_COUNTERS(). Fixes: 1c6fdbd8f246 ("bcachefs: Initial commit") Signed-off-by: Hongbo Li <lihongbo22@huawei.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/sb-counters_format.h | 165 ++++++++++++++++++++------------------- fs/bcachefs/sysfs.c | 9 ++- 2 files changed, 93 insertions(+), 81 deletions(-) commit 3db3084a86c3690e4b50b8579b0b1bbc29897375 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Dec 10 14:19:30 2024 -0500 bcachefs: bcachefs_metadata_version_autofix_errors It's time to make self healing the default: change the error action for old filesystems to fix_safe, matching the default for current filesystems. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs_format.h | 3 ++- fs/bcachefs/recovery.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit df448ca355ce84d62993166294f75517e4128598 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Dec 1 21:44:38 2024 -0500 bcachefs: bcachefs_metadata_version_persistent_inode_cursors Persistent cursors for inode allocation. A free inodes btree would add substantial overhead to inode allocation and freeing - a "next num to allocate" cursor is always going to be faster. We just need it to be persistent, to avoid scanning the inodes btree from the start on startup. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs.h | 3 - fs/bcachefs/bcachefs_format.h | 10 +++- fs/bcachefs/btree_update.c | 2 +- fs/bcachefs/inode.c | 120 ++++++++++++++++++++++++++++------------ fs/bcachefs/inode.h | 10 ++++ fs/bcachefs/inode_format.h | 14 ++++- fs/bcachefs/logged_ops.c | 5 +- fs/bcachefs/logged_ops_format.h | 5 +- fs/bcachefs/opts.h | 10 ++-- fs/bcachefs/sb-errors_format.h | 3 +- fs/bcachefs/super-io.c | 5 ++ fs/bcachefs/super.c | 7 +-- 12 files changed, 135 insertions(+), 59 deletions(-) commit f6001870edeabf0f7bc0460303d0cdbb9f0b3bc4 Merge: 6ec692d6a5f3 9d89551994a4 Author: Dave Airlie <airlied@redhat.com> Date: Fri Jan 10 14:24:17 2025 +1000 Merge tag 'v6.13-rc6' into drm-next This backmerges Linux 6.13-rc6 this is need for the newer pulls. Signed-off-by: Dave Airlie <airlied@redhat.com> commit 25cc469d6d344f5772e9fb6a5cf9d82a690afe68 Author: Heiner Kallweit <hkallweit1@gmail.com> Date: Tue Jan 7 21:13:44 2025 +0100 net: phy: micrel: use helper phy_disable_eee Use helper phy_disable_eee() instead of setting phylib-internal bitmap eee_broken_modes directly. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/5e19eebe-121e-4a41-b36d-a35631279dd8@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/micrel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 523875466b990b7dc0b7ee2c9f7f85c14fc260f7 Merge: 14ea4cd1b191 daea6d23cd2f Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Jan 9 18:06:38 2025 -0800 Merge branch 'netconsole-selftest-for-userdata-overflow' Breno Leitao says: ==================== netconsole: selftest for userdata overflow Implement comprehensive testing for netconsole userdata entry handling, demonstrating correct behavior when creating maximum entries and preventing unauthorized overflow. Refactor existing test infrastructure to support modular, reusable helper functions that validate strict entry limit enforcement. Also, add a warning if update_userdata() sees more than MAX_USERDATA_ITEMS entries. This shouldn't happen and it is a bug that shouldn't be silently ignored. v2: https://lore.kernel.org/20250103-netcons_overflow_test-v2-0-a49f9be64c21@debian.org v1: https://lore.kernel.org/20241204-netcons_overflow_test-v1-0-a85a8d0ace21@debian.org ==================== Link: https://patch.msgid.link/20250108-netcons_overflow_test-v3-0-3d85eb091bec@debian.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit daea6d23cd2f99a0c70e871a27d473f3ad48845b Author: Breno Leitao <leitao@debian.org> Date: Wed Jan 8 03:50:28 2025 -0800 netconsole: selftest: verify userdata entry limit Add a new selftest for netconsole that tests the userdata entry limit functionality. The test performs two key verifications: 1. Create MAX_USERDATA_ITEMS (16) userdata entries successfully 2. Confirm that attempting to create an additional userdata entry fails The selftest script uses the netcons library and checks the behavior by attempting to create entries beyond the maximum allowed limit. Signed-off-by: Breno Leitao <leitao@debian.org> Tested-by: Simon Horman <horms@kernel.org> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250108-netcons_overflow_test-v3-4-3d85eb091bec@debian.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> MAINTAINERS | 2 +- tools/testing/selftests/drivers/net/Makefile | 1 + .../selftests/drivers/net/netcons_overflow.sh | 67 ++++++++++++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) commit 7dcb65351b30500a759c857590b73b98c05ac7fd Author: Breno Leitao <leitao@debian.org> Date: Wed Jan 8 03:50:27 2025 -0800 netconsole: selftest: Delete all userdata keys Modify the cleanup function to remove all userdata keys created during the test, instead of just deleting a single predefined key. This ensures a more thorough cleanup of temporary resources. Move the KEY_PATH variable definition inside the set_user_data function to reduce global variables and improve encapsulation. The KEY_PATH variable is now dynamically created when setting user data. This change has no effect on the current test, while improving an upcoming test that would create several userdata entries. Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250108-netcons_overflow_test-v3-3-3d85eb091bec@debian.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 61f51cc6defeb0faad1f60f1dbc41613e93f31da Author: Breno Leitao <leitao@debian.org> Date: Wed Jan 8 03:50:26 2025 -0800 netconsole: selftest: Split the helpers from the selftest Split helper functions from the netconsole basic test into a separate library file to enable reuse across different netconsole tests. This change only moves the existing helper functions to lib/sh/lib_netcons.sh while preserving the same test functionality. The helpers provide common functions for: - Setting up network namespaces and interfaces - Managing netconsole dynamic targets - Setting user data - Handling test dependencies - Cleanup operations Do not make any change in the code, other than the mechanical separation. Signed-off-by: Breno Leitao <leitao@debian.org> Tested-by: Simon Horman <horms@kernel.org> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250108-netcons_overflow_test-v3-2-3d85eb091bec@debian.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> MAINTAINERS | 1 + tools/testing/selftests/drivers/net/Makefile | 1 + .../selftests/drivers/net/lib/sh/lib_netcons.sh | 225 +++++++++++++++++++++ .../testing/selftests/drivers/net/netcons_basic.sh | 218 +------------------- 4 files changed, 228 insertions(+), 217 deletions(-) commit e51c7478d23bb484d414fc036cd1ff57afe31b67 Author: Breno Leitao <leitao@debian.org> Date: Wed Jan 8 03:50:25 2025 -0800 netconsole: Warn if MAX_USERDATA_ITEMS limit is exceeded netconsole configfs helpers doesn't allow the creation of more than MAX_USERDATA_ITEMS items. Add a warning when netconsole userdata update function attempts sees more than MAX_USERDATA_ITEMS entries. Replace silent ignore mechanism with WARN_ON_ONCE() to highlight potential misuse during development and debugging. Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250108-netcons_overflow_test-v3-1-3d85eb091bec@debian.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/netconsole.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ec692d6a5f3ab916133e2c25fa9925862210de0 Merge: 4695a9cc964e 6bde14ba5f7e Author: Dave Airlie <airlied@redhat.com> Date: Fri Jan 10 10:54:29 2025 +1000 Merge tag 'drm-etnaviv-next-2025-01-08' of https://git.pengutronix.de/git/lst/linux into drm-next - cleanups - add fdinfo memory support - add explicit reset handling Signed-off-by: Dave Airlie <airlied@redhat.com> From: Lucas Stach <l.stach@pengutronix.de> Link: https://patchwork.freedesktop.org/patch/msgid/41c1e476c6014010247d164ac8d21bd6f922cce1.camel@pengutronix.de commit f285d995743269aa9f893e5e9a1065604137c1f6 Author: Roman Kisel <romank@linux.microsoft.com> Date: Wed Jan 8 14:21:38 2025 -0800 hyperv: Do not overlap the hvcall IO areas in hv_vtl_apicid_to_vp_id() The Top-Level Functional Specification for Hyper-V, Section 3.6 [1, 2], disallows overlapping of the input and output hypercall areas, and hv_vtl_apicid_to_vp_id() overlaps them. Use the output hypercall page of the current vCPU for the hypercall. [1] https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/tlfs/hypercall-interface [2] https://github.com/MicrosoftDocs/Virtualization-Documentation/tree/main/tlfs Reported-by: Michael Kelley <mhklinux@outlook.com> Closes: https://lore.kernel.org/lkml/SN6PR02MB4157B98CD34781CC87A9D921D40D2@SN6PR02MB4157.namprd02.prod.outlook.com/ Signed-off-by: Roman Kisel <romank@linux.microsoft.com> Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com> Reviewed-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> Link: https://lore.kernel.org/r/20250108222138.1623703-6-romank@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20250108222138.1623703-6-romank@linux.microsoft.com> arch/x86/hyperv/hv_vtl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07412e1f163de6567f5f4a2c8a44ae96a2a05422 Author: Roman Kisel <romank@linux.microsoft.com> Date: Wed Jan 8 14:21:37 2025 -0800 hyperv: Do not overlap the hvcall IO areas in get_vtl() The Top-Level Functional Specification for Hyper-V, Section 3.6 [1, 2], disallows overlapping of the input and output hypercall areas, and get_vtl(void) does overlap them. Use the output hypercall page of the current vCPU for the hypercall. [1] https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/tlfs/hypercall-interface [2] https://github.com/MicrosoftDocs/Virtualization-Documentation/tree/main/tlfs Fixes: 8387ce06d70b ("x86/hyperv: Set Virtual Trust Level in VMBus init message") Signed-off-by: Roman Kisel <romank@linux.microsoft.com> Reviewed-by: Tianyu Lan <tiala@microsoft.com> Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com> Link: https://lore.kernel.org/r/20250108222138.1623703-5-romank@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20250108222138.1623703-5-romank@linux.microsoft.com> arch/x86/hyperv/hv_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9263abc7fd5d753dbf4cd4bf994bcf9c8c999918 Author: Roman Kisel <romank@linux.microsoft.com> Date: Wed Jan 8 14:21:36 2025 -0800 hyperv: Enable the hypercall output page for the VTL mode Due to the hypercall page not being allocated in the VTL mode, the code resorts to using a part of the input page. Allocate the hypercall output page in the VTL mode thus enabling it to use it for output and share code with dom0. Signed-off-by: Roman Kisel <romank@linux.microsoft.com> Reviewed-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> Link: https://lore.kernel.org/r/20250108222138.1623703-4-romank@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20250108222138.1623703-4-romank@linux.microsoft.com> drivers/hv/hv_common.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 1da602ec36a3e208c070ec23895e84cbb621a12e Author: Jacob Pan <jacob.pan@linux.microsoft.com> Date: Tue Jan 7 10:09:18 2025 -0800 hv_balloon: Fallback to generic_online_page() for non-HV hot added mem The Hyper-V balloon driver installs a custom callback for handling page onlining operations performed by the memory hotplug subsystem. This custom callback is global, and overrides the default callback (generic_online_page) that Linux otherwise uses. The custom callback properly handles memory that is hot-added by the balloon driver as part of a Hyper-V hot-add region. But memory can also be hot-added directly by a device driver for a vPCI device, particularly GPUs. In such a case, the custom callback installed by the balloon driver runs, but won't find the page in its hot-add region list and doesn't online it, which could cause driver initialization failures. Fix this by having the balloon custom callback run generic_online_page() when the page isn't part of a Hyper-V hot-add region, thereby doing the default Linux behavior. This allows device driver hot-adds to work properly. Similar cases are handled the same way in the virtio-mem driver. Suggested-by: Vikram Sethi <vsethi@nvidia.com> Tested-by: Michael Frohlich <mfrohlich@microsoft.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Signed-off-by: Jacob Pan <jacob.pan@linux.microsoft.com> Link: https://lore.kernel.org/r/20250107180918.1053933-1-jacob.pan@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20250107180918.1053933-1-jacob.pan@linux.microsoft.com> drivers/hv/hv_balloon.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit fcf5203e289ca0ef75a18ce74a9eb716f7f1f569 Author: John Starks <jostarks@microsoft.com> Date: Thu Jan 2 13:07:11 2025 +0000 Drivers: hv: vmbus: Log on missing offers if any When resuming from hibernation, log any channels that were present before hibernation but now are gone. In general, the boot-time devices configured for a resuming VM should be the same as the devices in the VM at the time of hibernation. It's uncommon for the configuration to have been changed such that offers are missing. Changing the configuration violates the rules for hibernation anyway. The cleanup of missing channels is not straight-forward and dependent on individual device driver functionality and implementation, so it can be added in future with separate changes. Signed-off-by: John Starks <jostarks@microsoft.com> Co-developed-by: Naman Jain <namjain@linux.microsoft.com> Signed-off-by: Naman Jain <namjain@linux.microsoft.com> Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com> Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Link: https://lore.kernel.org/r/20250102130712.1661-3-namjain@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20250102130712.1661-3-namjain@linux.microsoft.com> drivers/hv/vmbus_drv.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 113386ca981c3997db6b83272c7ecf47456aeddb Author: Naman Jain <namjain@linux.microsoft.com> Date: Thu Jan 2 13:07:10 2025 +0000 Drivers: hv: vmbus: Wait for boot-time offers during boot and resume Channel offers are requested during VMBus initialization and resume from hibernation. Add support to wait for all boot-time channel offers to be delivered and processed before returning from vmbus_request_offers. This is in analogy to a PCI bus not returning from probe until it has scanned all devices on the bus. Without this, user mode can race with VMBus initialization and miss channel offers. User mode has no way to work around this other than sleeping for a while, since there is no way to know when VMBus has finished processing boot-time offers. With this added functionality, remove earlier logic which keeps track of count of offered channels post resume from hibernation. Once all offers delivered message is received, no further boot-time offers are going to be received. Consequently, logic to prevent suspend from happening after previous resume had missing offers, is also removed. Co-developed-by: John Starks <jostarks@microsoft.com> Signed-off-by: John Starks <jostarks@microsoft.com> Signed-off-by: Naman Jain <namjain@linux.microsoft.com> Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com> Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Link: https://lore.kernel.org/r/20250102130712.1661-2-namjain@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20250102130712.1661-2-namjain@linux.microsoft.com> drivers/hv/channel_mgmt.c | 61 +++++++++++++++++++++++++++++++++++------------ drivers/hv/connection.c | 4 ++-- drivers/hv/hyperv_vmbus.h | 14 +++-------- drivers/hv/vmbus_drv.c | 16 ------------- 4 files changed, 51 insertions(+), 44 deletions(-) commit 5fa1da972fcf503df4fa188a673cd5d09b60b090 Author: Naman Jain <namjain@linux.microsoft.com> Date: Thu Jan 2 14:52:43 2025 +0000 uio_hv_generic: Add a check for HV_NIC for send, receive buffers setup Receive and send buffer allocation was originally introduced to support DPDK's networking use case. These buffer sizes were further increased to meet DPDK performance requirements. However, these large buffers are unnecessary for any other UIO use cases. Restrict the allocation of receive and send buffers only for HV_NIC device type, saving 47 MB of memory per device. While at it, fix some of the syntax related issues in the touched code which are reported by "--strict" option of checkpatch. Signed-off-by: Naman Jain <namjain@linux.microsoft.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Link: https://lore.kernel.org/r/20250102145243.2088-1-namjain@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20250102145243.2088-1-namjain@linux.microsoft.com> drivers/uio/uio_hv_generic.c | 86 ++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 43 deletions(-) commit 4f6b64f3d3d96fb3796614362c64a4b73ddf3f7a Author: Michael Kelley <mhklinux@outlook.com> Date: Wed Oct 2 20:53:31 2024 -0700 iommu/hyper-v: Don't assume cpu_possible_mask is dense Current code gets the APIC IDs for CPUs numbered 255 and lower. This code assumes cpu_possible_mask is dense, which is not true in the general case per [1]. If cpu_possible_mask contains holes, num_possible_cpus() is less than nr_cpu_ids, so some CPUs might get skipped. Furthermore, getting the APIC ID of a CPU that isn't in cpu_possible_mask is invalid. However, the configurations that Hyper-V provides to guest VMs on x86 hardware, in combination with how x86 code assigns Linux CPU numbers, *does* always produce a dense cpu_possible_mask. So the dense assumption is not currently causing failures. But for robustness against future changes in how cpu_possible_mask is populated, update the code to no longer assume dense. The correct approach is to determine the range to scan based on nr_cpu_ids, and skip any CPUs that are not in the cpu_possible_mask. [1] https://lore.kernel.org/lkml/SN6PR02MB4157210CC36B2593F8572E5ED4692@SN6PR02MB4157.namprd02.prod.outlook.com/ Signed-off-by: Michael Kelley <mhklinux@outlook.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20241003035333.49261-4-mhklinux@outlook.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20241003035333.49261-4-mhklinux@outlook.com> drivers/iommu/hyperv-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 16b18fdf6bc7292ae0edbf33d2d693af3240e49d Author: Michael Kelley <mhklinux@outlook.com> Date: Wed Oct 2 20:53:30 2024 -0700 Drivers: hv: Don't assume cpu_possible_mask is dense Current code allocates the hv_vp_index array with size num_possible_cpus(). This code assumes cpu_possible_mask is dense, which is not true in the general case per [1]. If cpu_possible_mask is sparse, the array might be indexed by a value beyond the size of the array. However, the configurations that Hyper-V provides to guest VMs on x86 and ARM64 hardware, in combination with how architecture specific code assigns Linux CPU numbers, *does* always produce a dense cpu_possible_mask. So the dense assumption is not currently causing failures. But for robustness against future changes in how cpu_possible_mask is populated, update the code to no longer assume dense. The correct approach is to allocate and initialize the array using size "nr_cpu_ids". While this leaves unused array entries corresponding to holes in cpu_possible_mask, the holes are assumed to be minimal and hence the amount of memory wasted by unused entries is minimal. Using nr_cpu_ids also reduces initialization time, in that the loop to initialize the array currently rescans cpu_possible_mask on each iteration. This is n-squared in the number of CPUs, which could be significant for large CPU counts. [1] https://lore.kernel.org/lkml/SN6PR02MB4157210CC36B2593F8572E5ED4692@SN6PR02MB4157.namprd02.prod.outlook.com/ Signed-off-by: Michael Kelley <mhklinux@outlook.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20241003035333.49261-3-mhklinux@outlook.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20241003035333.49261-3-mhklinux@outlook.com> drivers/hv/hv_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a7ae41cd808557c1d4e21c4295578fffcba0eb34 Author: Michael Kelley <mhklinux@outlook.com> Date: Wed Oct 2 20:53:29 2024 -0700 x86/hyperv: Don't assume cpu_possible_mask is dense Current code allocates the hv_vp_assist_page array with size num_possible_cpus(). This code assumes cpu_possible_mask is dense, which is not true in the general case per [1]. If cpu_possible_mask is sparse, the array might be indexed by a value beyond the size of the array. However, the configurations that Hyper-V provides to guest VMs on x86 hardware, in combination with how x86 code assigns Linux CPU numbers, *does* always produce a dense cpu_possible_mask. So the dense assumption is not currently causing failures. But for robustness against future changes in how cpu_possible_mask is populated, update the code to no longer assume dense. The correct approach is to allocate the array with size "nr_cpu_ids". While this leaves unused array entries corresponding to holes in cpu_possible_mask, the holes are assumed to be minimal and hence the amount of memory wasted by unused entries is minimal. [1] https://lore.kernel.org/lkml/SN6PR02MB4157210CC36B2593F8572E5ED4692@SN6PR02MB4157.namprd02.prod.outlook.com/ Signed-off-by: Michael Kelley <mhklinux@outlook.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20241003035333.49261-2-mhklinux@outlook.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20241003035333.49261-2-mhklinux@outlook.com> arch/x86/hyperv/hv_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 962a4c7ea87884ed44ff48213f00cd5114c357e9 Author: Nuno Das Neves <nunodasneves@linux.microsoft.com> Date: Mon Nov 25 15:24:44 2024 -0800 hyperv: Remove the now unused hyperv-tlfs.h files Remove all hyperv-tlfs.h files. These are no longer included anywhere. hyperv/hvhdk.h serves the same role, but with an easier path for adding new definitions. Remove the relevant lines in MAINTAINERS. Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com> Link: https://lore.kernel.org/r/1732577084-2122-6-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <1732577084-2122-6-git-send-email-nunodasneves@linux.microsoft.com> MAINTAINERS | 3 - arch/arm64/include/asm/hyperv-tlfs.h | 71 --- arch/x86/include/asm/hyperv-tlfs.h | 811 -------------------------------- include/asm-generic/hyperv-tlfs.h | 883 ----------------------------------- 4 files changed, 1768 deletions(-) commit ef5a3c92a81a1a892ae9edf949625beb68b4bd43 Author: Nuno Das Neves <nunodasneves@linux.microsoft.com> Date: Mon Nov 25 15:24:43 2024 -0800 hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h Switch to using hvhdk.h everywhere in the kernel. This header includes all the new Hyper-V headers in include/hyperv, which form a superset of the definitions found in hyperv-tlfs.h. This makes it easier to add new Hyper-V interfaces without being restricted to those in the TLFS doc (reflected in hyperv-tlfs.h). To be more consistent with the original Hyper-V code, the names of some definitions are changed slightly. Update those where needed. Update comments in mshyperv.h files to point to include/hyperv for adding new definitions. Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com> Signed-off-by: Roman Kisel <romank@linux.microsoft.com> Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com> Link: https://lore.kernel.org/r/1732577084-2122-5-git-send-email-nunodasneves@linux.microsoft.com Link: https://lore.kernel.org/r/20250108222138.1623703-3-romank@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> arch/arm64/hyperv/hv_core.c | 2 +- arch/arm64/hyperv/mshyperv.c | 4 ++-- arch/arm64/include/asm/mshyperv.h | 7 +++---- arch/x86/hyperv/hv_init.c | 20 ++++++++++---------- arch/x86/hyperv/hv_proc.c | 2 +- arch/x86/hyperv/nested.c | 2 +- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/include/asm/mshyperv.h | 2 +- arch/x86/include/asm/svm.h | 2 +- arch/x86/kernel/cpu/mshyperv.c | 2 +- arch/x86/kvm/vmx/hyperv_evmcs.h | 2 +- arch/x86/kvm/vmx/vmx_onhyperv.h | 2 +- drivers/clocksource/hyperv_timer.c | 2 +- drivers/hv/hv_balloon.c | 4 ++-- drivers/hv/hv_common.c | 2 +- drivers/hv/hv_kvp.c | 2 +- drivers/hv/hv_snapshot.c | 2 +- drivers/hv/hyperv_vmbus.h | 2 +- include/asm-generic/mshyperv.h | 7 +++---- include/clocksource/hyperv_timer.h | 2 +- include/linux/hyperv.h | 2 +- net/vmw_vsock/hyperv_transport.c | 6 +++--- 22 files changed, 39 insertions(+), 41 deletions(-) commit e68bda71a2384e4463c96bac958912b4c5e58502 Author: Nuno Das Neves <nunodasneves@linux.microsoft.com> Date: Mon Nov 25 15:24:42 2024 -0800 hyperv: Add new Hyper-V headers in include/hyperv These headers contain definitions for regular Hyper-V guests (as in hyperv-tlfs.h), as well as interfaces for more privileged guests like the root partition (aka Dom0). These files are derived from headers exported from Hyper-V, rather than being derived from the TLFS document. (Although, to preserve compatibility with existing Linux code, some definitions are copied directly from hyperv-tlfs.h too). The new files follow a naming convention according to their original use: - hdk "host development kit" - gdk "guest development kit" With postfix "_mini" implying userspace-only headers, and "_ext" for extended hypercalls. The use of multiple files and their original names is primarily to keep the provenance of exactly where they came from in Hyper-V code, which is helpful for manual maintenance and extension of these definitions. Microsoft maintainers importing new definitions should take care to put them in the right file. However, Linux kernel code that uses any of the definitions need not be aware of the multiple files or assign any meaning to the new names. Linux kernel code should always just include hvhdk.h Note the new headers contain both arm64 and x86_64 definitions. Some are guarded by #ifdefs, and some are instead prefixed with the architecture, e.g. hv_x64_*. These conventions are kept from Hyper-V code as another tactic to simplify the process of importing and maintaining the definitions, rather than splitting them up into their own files in arch/x86/ and arch/arm64/. These headers are a step toward importing headers directly from Hyper-V in the future, similar to Xen public files in include/xen/interface/. Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Signed-off-by: Roman Kisel <romank@linux.microsoft.com> Link: https://lore.kernel.org/r/1732577084-2122-4-git-send-email-nunodasneves@linux.microsoft.com Link: https://lore.kernel.org/r/20250108222138.1623703-2-romank@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> MAINTAINERS | 5 + include/hyperv/hvgdk.h | 308 ++++++++++ include/hyperv/hvgdk_ext.h | 46 ++ include/hyperv/hvgdk_mini.h | 1348 +++++++++++++++++++++++++++++++++++++++++++ include/hyperv/hvhdk.h | 733 +++++++++++++++++++++++ include/hyperv/hvhdk_mini.h | 311 ++++++++++ 6 files changed, 2751 insertions(+) commit 14ea4cd1b19162888f629c4ce1ba268c683b0f12 Merge: dd3e8f8b9b01 c77cd47cee04 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Jan 9 16:11:47 2025 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR (net-6.13-rc7). Conflicts: a42d71e322a8 ("net_sched: sch_cake: Add drop reasons") 737d4d91d35b ("sched: sch_cake: add bounds checks to host bulk flow fairness counts") Adjacent changes: drivers/net/ethernet/meta/fbnic/fbnic.h 3a856ab34726 ("eth: fbnic: add IRQ reuse support") 95978931d55f ("eth: fbnic: Revert "eth: fbnic: Add hardware monitoring support via HWMON interface"") Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 0730422bced5e8325fb6806d9a80bb10673588e6 Author: Tamir Duberstein <tamird@gmail.com> Date: Mon Dec 16 10:54:22 2024 -0500 rust: use host dylib naming convention to support macOS Because the `macros` crate exposes procedural macros, it must be compiled as a dynamic library (so it can be loaded by the compiler at compile-time). Before this change the resulting artifact was always named `libmacros.so`, which works on hosts where this matches the naming convention for dynamic libraries. However the proper name on macOS would be `libmacros.dylib`. This turns out to matter even when the dependency is passed with a path (`--extern macros=path/to/libmacros.so` rather than `--extern macros`) because rustc uses the file name to infer the type of the library (see link). This is because there's no way to specify both the path to and the type of the external library via CLI flags. The compiler could speculatively parse the file to determine its type, but it does not do so today. This means that libraries that match neither rustc's naming convention for static libraries nor the platform's naming convention for dynamic libraries are *rejected*. The only solution I've found is to follow the host platform's naming convention. This patch does that by querying the compiler to determine the appropriate name for the artifact. This allows the kernel to build with CONFIG_RUST=y on macOS. Link: https://github.com/rust-lang/rust/blob/d829780/compiler/rustc_metadata/src/locator.rs#L728-L752 Tested-by: Daniel Gomez <da.gomez@samsung.com> Co-developed-by: Fiona Behrens <me@kloenk.dev> Signed-off-by: Fiona Behrens <me@kloenk.dev> Signed-off-by: Tamir Duberstein <tamird@gmail.com> Tested-by: Andreas Hindborg <a.hindborg@kernel.org> Link: https://lore.kernel.org/r/20241216-b4-dylib-host-macos-v7-1-cfc507681447@gmail.com [ Added `MAKEFLAGS=`s to avoid jobserver warnings. Removed space. Reworded title. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> .gitignore | 1 + Makefile | 2 +- rust/Makefile | 22 ++++++++++++---------- scripts/generate_rust_analyzer.py | 15 +++++++++++---- 4 files changed, 25 insertions(+), 15 deletions(-) commit 927054606d08d95827f854246293f8379480ed15 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Jan 9 23:30:11 2025 +0900 tracing/kprobes: Simplify __trace_kprobe_create() by removing gotos Simplify __trace_kprobe_create() by removing gotos. Link: https://lore.kernel.org/all/173643301102.1514810.6149004416601259466.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_kprobe.c | 97 +++++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 48 deletions(-) commit 7dcc35207890451519c9ca4cf4207ac2be84fc83 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Jan 9 23:29:59 2025 +0900 tracing: Use __free() for kprobe events to cleanup Use __free() in trace_kprobe.c to cleanup code. Link: https://lore.kernel.org/all/173643299989.1514810.2924926552980462072.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_kprobe.c | 62 +++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 33 deletions(-) commit 4af0532a0f4799d5944ea966c10890dcb4390d19 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Jan 9 23:29:48 2025 +0900 tracing: Use __free() in trace_probe for cleanup Use __free() in trace_probe to cleanup some gotos. Link: https://lore.kernel.org/all/173643298860.1514810.7267350121047606213.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_probe.c | 51 ++++++++++++++++------------------------------ 1 file changed, 17 insertions(+), 34 deletions(-) commit bef8e6afaa512e8cc9444566edd215c884bcf582 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Mon Dec 9 11:42:04 2024 +0900 kprobes: Remove remaining gotos Remove remaining gotos from kprobes.c to clean up the code. This does not use cleanup macros, but changes code flow for avoiding gotos. Link: https://lore.kernel.org/all/173371212474.480397.5684523564137819115.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> kernel/kprobes.c | 63 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 32 deletions(-) commit 5e5b8b49335971b68b54afeb0e7ded004945af07 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Mon Dec 9 11:41:52 2024 +0900 kprobes: Remove unneeded goto Remove unneeded gotos. Since the labels referred by these gotos have only one reference for each, we can replace those gotos with the referred code. Link: https://lore.kernel.org/all/173371211203.480397.13988907319659165160.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> kernel/kprobes.c | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) commit a35fb2bcaeadfb0f522bb573d307c50205d0e740 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Mon Dec 9 11:41:38 2024 +0900 kprobes: Use guard for rcu_read_lock Use guard(rcu) for rcu_read_lock so that it can remove unneeded gotos and make it more structured. Link: https://lore.kernel.org/all/173371209846.480397.3852648910271029695.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> kernel/kprobes.c | 66 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 30 deletions(-) commit 54c79390119d24c1704202a64a997e1c99893b47 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Mon Dec 9 11:41:26 2024 +0900 kprobes: Use guard() for external locks Use guard() for text_mutex, cpu_read_lock, and jump_label_lock in the kprobes. Link: https://lore.kernel.org/all/173371208663.480397.7535769878667655223.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> kernel/kprobes.c | 209 ++++++++++++++++++++++++------------------------------- 1 file changed, 90 insertions(+), 119 deletions(-) commit e2b6e5e4877ac898b61338dc20491cd837af79b2 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Mon Dec 9 11:41:11 2024 +0900 jump_label: Define guard() for jump_label_lock Link: https://lore.kernel.org/all/173371207108.480397.12818384744149153972.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> include/linux/jump_label.h | 3 +++ 1 file changed, 3 insertions(+) commit 4e83017e4c229d7fa368d6974fd06aa59aeef04f Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Sat Nov 30 01:48:30 2024 +0900 tracing/eprobe: Adopt guard() and scoped_guard() Use guard() or scoped_guard() in eprobe events for critical sections rather than discrete lock/unlock pairs. Link: https://lore.kernel.org/all/173289890996.73724.17421347964110362029.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> kernel/trace/trace_eprobe.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) commit f8821732dcf066b7b6bf4b8bc98abe8f8fcda021 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Sat Nov 30 01:48:19 2024 +0900 tracing/uprobe: Adopt guard() and scoped_guard() Use guard() or scoped_guard() in uprobe events for critical sections rather than discrete lock/unlock pairs. Link: https://lore.kernel.org/all/173289889911.73724.12457932738419630525.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> kernel/trace/trace_uprobe.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 2cba0070cd0cf25f7f7cfee3447beba8106f682f Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Sat Nov 30 01:48:08 2024 +0900 tracing/kprobe: Adopt guard() and scoped_guard() Use guard() or scoped_guard() in kprobe events for critical sections rather than discrete lock/unlock pairs. Link: https://lore.kernel.org/all/173289888883.73724.6586200652276577583.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> kernel/trace/trace_kprobe.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 587e8e6d640bcf89a4bf29745a3c3fdfe8379ae0 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Sat Nov 30 01:47:58 2024 +0900 kprobes: Adopt guard() and scoped_guard() Use guard() or scoped_guard() for critical sections rather than discrete lock/unlock pairs. Link: https://lore.kernel.org/all/173289887835.73724.608223217359025939.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> kernel/kprobes.c | 205 ++++++++++++++++++++++++------------------------------- 1 file changed, 89 insertions(+), 116 deletions(-) commit 1703abb4dead917ec7e6d9ccb4c13632a6f0994d Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Date: Sun Dec 8 23:26:49 2024 +0900 kprobes: Reduce preempt disable scope in check_kprobe_access_safe() Commit a189d0350f387 ("kprobes: disable preempt for module_text_address() and kernel_text_address()") introduced a preempt_disable() region to protect against concurrent module unloading. However this region also includes the call to jump_label_text_reserved() which takes a long time; up to 400us, iterating over approx 6000 jump tables. The scope protected by preempt_disable() is largen than necessary. core_kernel_text() does not need to be protected as it does not interact with module code at all. Only the scope from __module_text_address() to try_module_get() needs to be protected. By limiting the critical section to __module_text_address() and try_module_get() the function responsible for the latency spike remains preemptible. This works fine even when !CONFIG_MODULES as in that case try_module_get() will always return true and that block can be optimized away. Limit the critical section to __module_text_address() and try_module_get(). Use guard(preempt)() for easier error handling. While at it also remove a spurious *probed_mod = NULL in an error path. On errors the output parameter is never inspected by the caller. Some error paths were clearing the parameters, some didn't. Align them for clarity. Link: https://lore.kernel.org/all/20241121-kprobes-preempt-v1-1-fd581ee7fcbb@linutronix.de/ Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> kernel/kprobes.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 516b0138003647181654a5c8022399bba5a0136a Author: Povilas Kanapickas <povilas@radix.lt> Date: Thu Jan 9 23:07:00 2025 +0200 hwmon: (dell-smm) Add Dell XPS 9370 to fan control whitelist Add the Dell XPS 9370 to the fan control whitelist to allow for manual fan control. Signed-off-by: Povilas Kanapickas <povilas@radix.lt> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Acked-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/6e6b7a47-d0e3-4c5a-8be2-dfc58852da8e@radix.lt Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/dell-smm-hwmon.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 06835ccec2efb71d54a810265e8ef69b1011608e Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Date: Mon Dec 2 22:00:57 2024 +0200 arm64: defconfig: Enable Rockchip extensions for Synopsys DW HDMI QP Enable Rockchip specific extensions for Synopsys DesignWare HDMI Quad-Pixel (QP) driver. This is needed to provide HDMI output support for the boards based on RK3588 SoC. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://lore.kernel.org/r/20241202-dw-hdmi-qp-rk-defconfig-v1-1-38757fc053d0@collabora.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 893b4ea693f1ae236cb2f6a94b489d6569933520 Author: Nicolas Dufresne <nicolas.dufresne@collabora.com> Date: Wed Dec 18 11:31:30 2024 -0500 arm64: defconfig: Enable RFKILL GPIO Enable as a module the RFKILL GPIO driver. This is needed to power WiFi and Bluetooth radio on various RK3588 board. Without this module, rfkill will report the switch has hard blocked, which prevents using the WiFi or Bluetooth feature. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Link: https://lore.kernel.org/r/20241218-rk3588-rfkill-gpio-config-v1-1-dfdf464f97d4@collabora.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 4401565fe92be6ee54a68ea58d80a4076007d5eb Author: Miguel Ojeda <ojeda@kernel.org> Date: Sat Nov 23 23:28:49 2024 +0100 rust: add `build_error!` to the prelude The sibling `build_assert!` is already in the prelude, it makes sense that a "core"/"language" facility like this is part of the prelude and users should not be defining their own one (thus there should be no risk of future name collisions and we would want to be aware of them anyway). Thus add `build_error!` into the prelude. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20241123222849.350287-3-ojeda@kernel.org [ Applied the change to the new miscdevice cases. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> rust/kernel/block/mq/operations.rs | 3 ++- rust/kernel/build_assert.rs | 1 - rust/kernel/miscdevice.rs | 4 ++-- rust/kernel/net/phy.rs | 18 +++++++++--------- rust/kernel/prelude.rs | 2 +- rust/macros/lib.rs | 8 ++++---- 6 files changed, 18 insertions(+), 18 deletions(-) commit 614724e780f587c8321f027ca539b39f32796406 Author: Miguel Ojeda <ojeda@kernel.org> Date: Sat Nov 23 23:28:48 2024 +0100 rust: kernel: move `build_error` hidden function to prevent mistakes Users were using the hidden exported `kernel::build_error` function instead of the intended `kernel::build_error!` macro, e.g. see the previous commit. To force to use the macro, move it into the `build_assert` module, thus making it a compilation error and avoiding a collision in the same "namespace". Using the function now would require typing the module name (which is hidden), not just a single character. Now attempting to use the function will trigger this error with the right suggestion by the compiler: error[E0423]: expected function, found macro `kernel::build_error` --> samples/rust/rust_minimal.rs:29:9 | 29 | kernel::build_error(); | ^^^^^^^^^^^^^^^^^^^ not a function | help: use `!` to invoke the macro | 29 | kernel::build_error!(); | + An alternative would be using an alias, but it would be more complex and moving it into the module seems right since it belongs there and reduces the amount of code at the crate root. Keep the `#[doc(hidden)]` inside `build_assert` in case the module is not hidden in the future. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20241123222849.350287-2-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org> rust/kernel/build_assert.rs | 11 +++++++---- rust/kernel/lib.rs | 6 ++---- 2 files changed, 9 insertions(+), 8 deletions(-) commit 15f2f9313a394f97fb9443271721e9ff1c8d4be4 Author: Miguel Ojeda <ojeda@kernel.org> Date: Sat Nov 23 23:28:47 2024 +0100 rust: use the `build_error!` macro, not the hidden function Code and some examples were using the function, rather than the macro. The macro is what is documented. Thus move users to the macro. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20241123222849.350287-1-ojeda@kernel.org [ Applied the change to the new miscdevice cases. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> rust/kernel/block/mq/operations.rs | 2 +- rust/kernel/miscdevice.rs | 4 ++-- rust/kernel/net/phy.rs | 18 +++++++++--------- rust/macros/lib.rs | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) commit 2a87f8b075ea0ba33d3809aee7980c019f920bd6 Author: Miguel Ojeda <ojeda@kernel.org> Date: Sat Nov 23 19:06:38 2024 +0100 rust: kbuild: run Clippy for `rusttest` code Running Clippy for `rusttest` code is useful to catch issues there too, even if the code is not as critical. In the future, this code may also run in kernelspace and could be copy-pasted. Thus it is useful to keep it under the same standards. For instance, it will now make us add `// SAFETY` comments. It also makes everything more consistent. Thus clean the few issues spotted by Clippy and start running it. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20241123180639.260191-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org> rust/Makefile | 8 ++++---- rust/kernel/str.rs | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) commit f0915acd1fc6060a35e3f18673072671583ff0be Author: Miguel Ojeda <ojeda@kernel.org> Date: Sat Nov 23 23:23:45 2024 +0100 rust: give Clippy the minimum supported Rust version Clippy's lints may avoid emitting a suggestion to use a language or library feature that is not supported by the minimum supported version, if given by the `msrv` field in the configuration file. For instance, Clippy should not suggest using `let ... else` in a lint if the MSRV did not implement that syntax. If the MSRV is not provided, Clippy will assume all features are available. Thus enable it with the minimum Rust version the kernel supports. Note that there is currently a small disadvantage in doing so: since we still use unstable features that nevertheless work in the range of versions we support (e.g. `#[expect(...)]`), we lose suggestions for those. However, over time we will stop using unstable features (especially language and library ones) as it is our goal, thus, in the end, we will want to have the `msrv` set. Rust is also considering adding a similar feature in `rustc` too, which we should probably enable if it becomes available [2]. Link: https://github.com/rust-lang/rust-clippy/blob/8298da72e7b81fa30c515631b40fc4c0845948cb/clippy_utils/src/msrvs.rs#L20 [1] Link: https://github.com/rust-lang/compiler-team/issues/772 [2] Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20241123222345.346976-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org> .clippy.toml | 2 ++ 1 file changed, 2 insertions(+) commit c23d1f7e15d11d6ae6c70824e04ba9ed0299de0a Author: Miguel Ojeda <ojeda@kernel.org> Date: Mon Dec 9 22:25:44 2024 +0100 rust: document `bindgen` 0.71.0 regression `bindgen` 0.71.0 regressed [1] on the "`--version` requires header" issue which appeared in 0.69.0 first [2] and was fixed in 0.69.1. It has been fixed again in 0.71.1 [3]. Thus document it so that, when we upgrade the minimum past 0.69.0 in the future, we do not forget that we cannot remove the workaround until we arrive at 0.71.1 at least. Link: https://github.com/rust-lang/rust-bindgen/issues/3039 [1] Link: https://github.com/rust-lang/rust-bindgen/issues/2677 [2] Link: https://github.com/rust-lang/rust-bindgen/blob/main/CHANGELOG.md#v0711-2024-12-09 [3] Reviewed-by: Fiona Behrens <me@kloenk.dev> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20241209212544.1977065-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org> init/Kconfig | 6 ++++-- scripts/rust_is_available.sh | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit 983833061d9599a534e44fd6d335080d1a0ba985 Author: Joel Stanley <joel@jms.id.au> Date: Wed Jan 8 23:14:59 2025 +1030 arm64: dts: qcom: x1e80100-romulus: Update firmware nodes Other x1e machines use _dtbs.elf for these firmwares, which matches the filenames shipped by Windows. Fixes: 09d77be56093 ("arm64: dts: qcom: Add support for X1-based Surface Laptop 7 devices") Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250108124500.44011-1-joel@jms.id.au Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ebe82df46fba0f0fe45d7e03ddf5ca0f6e758a06 Author: Shimrra Shai <shimrrashai@gmail.com> Date: Mon Dec 16 15:41:52 2024 -0600 arm64: dts: rockchip: add DTs for Firefly ITX-3588J and its Core-3588J SoM Add the device tree and Makefile update. Signed-off-by: Shimrra Shai <shimrrashai@gmail.com> Link: https://lore.kernel.org/r/20241216214152.58387-3-shimrrashai@gmail.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/Makefile | 1 + .../dts/rockchip/rk3588-firefly-core-3588j.dtsi | 443 +++++++++++++ .../boot/dts/rockchip/rk3588-firefly-itx-3588j.dts | 702 +++++++++++++++++++++ 3 files changed, 1146 insertions(+) commit 8886252102bd774656d19423b7d85e1ddd78f9c0 Author: Shimrra Shai <shimrrashai@gmail.com> Date: Mon Dec 16 15:41:51 2024 -0600 dt-bindings: arm: rockchip: Add Firefly ITX-3588J board Document board compatible bindings. Signed-off-by: Shimrra Shai <shimrrashai@gmail.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241216214152.58387-2-shimrrashai@gmail.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> Documentation/devicetree/bindings/arm/rockchip.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 5f42297d5902d9f4ede87370d373e05a09b7a26e Author: Cody Eksal <masterr3c0rd@epochal.quest> Date: Thu Oct 31 04:02:24 2024 -0300 dt-bindings: opp: h6: Add A100 operating points The A100, similar to the H6 and H616, use an NVMEM value to determine speed binnings. The method used is similar to that of the H6. However, the information is stored at a slightly different bit offset. Add a new compatible for the A100. Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20241031070232.1793078-12-masterr3c0rd@epochal.quest Signed-off-by: Rob Herring (Arm) <robh@kernel.org> .../devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml | 1 + 1 file changed, 1 insertion(+) commit c600d252dc52ffc29982ee6873b6eee064193752 Author: Jimmy Hon <honyuenkwun@gmail.com> Date: Wed Jan 8 23:16:17 2025 -0600 arm64: dts: rockchip: Add Orange Pi 5 Max board The RK3588 Single Board Computer includes - eMMC - microSD - UART - 2 PWM LEDs - RTC - RTL8125 network controller on PCIe 2.0x1. - M.2 M-key connector routed to PCIe 3.0x4 - PWM controlled heat sink fan. - 2 USB2 ports - lower USB3 port - upper USB3 port with OTG capability - Mali GPU - SPI NOR flash - Mask Rom button - Analog audio using es8388 codec via the headset jack and onboard mic - HDMI0 - HDMI1 the vcc5v0_usb30 regulator shares the same enable gpio pin as the vcc5v0_usb20 regulator. The Orange Pi 5 Max and Orange Pi 5 Ultra are both credit-card sized boards with similar layout, so these boards will share a common dtsi. The 5 Max has an extra HDMI0 while the 5 Ultra has a HDMI IN instead. Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com> Link: https://lore.kernel.org/r/20250109051619.1825-4-honyuenkwun@gmail.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/Makefile | 1 + .../dts/rockchip/rk3588-orangepi-5-compact.dtsi | 151 +++++++++++++++++++++ .../boot/dts/rockchip/rk3588-orangepi-5-max.dts | 60 ++++++++ .../arm64/boot/dts/rockchip/rk3588-orangepi-5.dtsi | 8 ++ 4 files changed, 220 insertions(+) commit 6327f2d83dce514d43134dedb766df000420b779 Author: Jimmy Hon <honyuenkwun@gmail.com> Date: Wed Jan 8 23:16:16 2025 -0600 dt-bindings: arm: rockchip: Add Xunlong Orange Pi 5 Max Add devicetree binding for the Xunlong Orange Pi 5 Max board. The Orange Pi 5 Max is a single board computer powered by the Rockchip RK3588 similar to the Orange Pi 5 Plus. Acked-by: Conor Dooley <conor.dooley@microchip.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com> Link: https://lore.kernel.org/r/20250109051619.1825-3-honyuenkwun@gmail.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> Documentation/devicetree/bindings/arm/rockchip.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ea63f4666e483b48a49d9774d8c680f81165ff06 Author: Jimmy Hon <honyuenkwun@gmail.com> Date: Wed Jan 8 23:16:15 2025 -0600 arm64: dts: rockchip: refactor common rk3588-orangepi-5.dtsi Orange Pi now has multiple SBCs using the RK3588. Refactor the common parts of the Orange Pi 5 Plus DTS so it can be shared with the 5 Max and the 5 Ultra. Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com> Link: https://lore.kernel.org/r/20250109051619.1825-2-honyuenkwun@gmail.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> .../boot/dts/rockchip/rk3588-orangepi-5-plus.dts | 855 ++------------------- .../arm64/boot/dts/rockchip/rk3588-orangepi-5.dtsi | 797 +++++++++++++++++++ 2 files changed, 862 insertions(+), 790 deletions(-) commit 4695a9cc964e57a61e05d1ad67f23cd039b6d94c Merge: 9cc3e4e9f4ba 15133582465f Author: Dave Airlie <airlied@redhat.com> Date: Fri Jan 10 08:03:51 2025 +1000 Merge tag 'drm-intel-next-2025-01-07' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Driver Changes: - Some DG2 refactor to fix DG2 bugs when operating with certain CPUs (Raag) - Use hw support for min/interim ddb allocation for async flip (Vinod) - More general code refactor to allow full display separation (Jani) - Expose dsc sink max slice count via debugfs (Swati) - Fix C10 pll programming sequence (Suraj) - Fix DG1 power gate sequence (Rodrigo) - Use preemption timeout on selftest cleanup (Janusz) - DP DSC related fixes (Ankit) - Fix HDCP compliance test (Suraj) - Clean and Optimise mtl_ddi_prepare_link_retrain (Suraj) - Adjust Added Wake Time with PKG_C_LATENCY (Animesh) - Enabling uncompressed 128b/132b UHBR SST (Jani) - Handle hdmi connector init failures, and no HDMI/DP cases (Jani) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/Z31_WPbBoHkwgEA9@intel.com commit 85b73415fde558549491f03218a907261c0f11fc Author: Victor Zhao <Victor.Zhao@amd.com> Date: Mon Jan 6 18:42:11 2025 +0800 drm/amdgpu: fill the ucode bo during psp resume for SRIOV refill the ucode bo during psp resume for SRIOV, otherwise ucode load will fail after VM hibernation and fb clean. Signed-off-by: Victor Zhao <Victor.Zhao@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 9814626751de427e99ec9df77d6c29f7668fd105 Author: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Date: Sat Jan 4 14:05:36 2025 +0530 drm/amdgpu/gfx10: Enable cleaner shader for GFX10.3.2/10.3.4/10.3.5 GPUs Enable the cleaner shader for GFX10.3.2/10.3.4/10.3.5 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.2/10.3.4/10.3.5 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: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 3 +++ 1 file changed, 3 insertions(+) commit 86bde64cb7957be393f84e5d35fb8dfc91e4ae7e Author: Jonathan Kim <jonathan.kim@amd.com> Date: Wed Jan 8 14:39:58 2025 -0500 drm/amdgpu: fix gpu recovery disable with per queue reset Per queue reset should be bypassed when gpu recovery is disabled with module parameter. Fixes: ee0a469cf917 ("drm/amdkfd: support per-queue reset on gfx9") Signed-off-by: Jonathan Kim <jonathan.kim@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 6 ++++++ 1 file changed, 6 insertions(+) commit edec9b0690906f37024b0dc74a0a924006a2ff07 Author: Jiang Liu <gerry@linux.alibaba.com> Date: Wed Jan 8 21:59:53 2025 +0800 drm/amdgpu: wrong array index to get ip block for PSP The adev->ip_blocks array is not indexed by AMD_IP_BLOCK_TYPE_xxx, instead we should call amdgpu_device_ip_get_ip_block() to get the corresponding IP block oject. Fix some checkpatch issues (Alex) Signed-off-by: Jiang Liu <gerry@linux.alibaba.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 60a2c0c12b644450e420ffc42291d1eb248bacb7 Author: Jiang Liu <gerry@linux.alibaba.com> Date: Mon Dec 23 00:27:21 2024 +0800 drm/amdgpu: tear down ttm range manager for doorbell in amdgpu_ttm_fini() Tear down ttm range manager for doorbell in function amdgpu_ttm_fini(), to avoid memory leakage. Fixes: 792b84fb9038 ("drm/amdgpu: initialize ttm for doorbells") Signed-off-by: Jiang Liu <gerry@linux.alibaba.com> Signed-off-by: Kent Russell <kent.russell@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 + 1 file changed, 1 insertion(+) commit 6b34d0328b51b7bc226290916c56242549062983 Author: Tim Huang <tim.huang@amd.com> Date: Mon Jan 6 13:30:06 2025 +0800 drm/amdgpu: fix incorrect number of active RBs for gfx12 The RB bitmap should be global active RB bitmap & active RB bitmap based on active SA. Signed-off-by: Tim Huang <tim.huang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 4a60c55b3b0f147acc95c350c11f2db4d4828d36 Author: Tim Huang <tim.huang@amd.com> Date: Thu Jan 2 18:20:18 2025 +0800 drm/amdgpu: fix incorrect active RB bitmap in setup RBs The RB bitmap width per SA may be 0x1 for some ASICs. Use the actual bitmap of SA instead of 0x3 to determine the active RB bitmap. Signed-off-by: Tim Huang <tim.huang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 62498e797aeb2bfa92a823ee1a8253f96d1cbe3f Author: Jay Cornwall <jay.cornwall@amd.com> Date: Wed Oct 2 16:12:35 2024 -0500 drm/amdkfd: Move gfx12 trap handler to separate file gfx12 derivatives will have substantially different trap handler implementations from gfx10/gfx11. Add a separate source file for gfx12+ and remove unneeded conditional code. No functional change. v2: Revert copyright date to 2018, minor comment fixes Signed-off-by: Jay Cornwall <jay.cornwall@amd.com> Reviewed-by: Lancelot Six <lancelot.six@amd.com> Cc: Jonathan Kim <jonathan.kim@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx10.asm | 202 +--- .../gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx12.asm | 1126 ++++++++++++++++++++ 2 files changed, 1127 insertions(+), 201 deletions(-) commit 6ec6cd9acbaa844391a1f75a824a3a9d18978fcb Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Wed Jan 8 12:41:28 2025 +0300 drm/amdgpu: Fix shift type in amdgpu_debugfs_sdma_sched_mask_set() The "mask" and "val" variables are type u64. The problem is that the BIT() macros are type unsigned long which is just 32 bits on 32bit systems. It's unlikely that people will be using this driver on 32bit kernels and even if they did we only use the lower AMDGPU_MAX_SDMA_INSTANCES (16) bits. So this bug does not affect anything in real life. Still, for correctness sake, u64 bit masks should use BIT_ULL(). Fixes: d2e3961ae371 ("drm/amdgpu: add amdgpu_sdma_sched_mask debugfs") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/d39a9325-87a4-4543-b6ec-1c61fca3a6fc@stanley.mountain Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7e672e6f85b92fe3285f7a379121d48b067337d Author: Jesse Zhang <jesse.zhang@amd.com> Date: Mon Jan 6 10:17:49 2025 +0800 drm/amdgpu: enable gfx12 queue reset flag Enable the kgq and kcq queue reset flag Signed-off-by: Jesse Zhang <jesse.zhang@amd.com> Reviewed-by: Tim Huang <tim.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit e4479aecf6581af81bc0908575447878d2a07e01 Author: Nathan Chancellor <nathan@kernel.org> Date: Thu Dec 19 16:46:35 2024 -0700 drm/amd/display: Increase sanitizer frame larger than limit when compile testing with clang Commit 24909d9ec7c3 ("drm/amd/display: Overwriting dualDPP UBF values before usage") added a new warning in dml2/display_mode_core.c when building allmodconfig with clang: drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/display_mode_core.c:6268:13: error: stack frame size (3128) exceeds limit (3072) in 'dml_prefetch_check' [-Werror,-Wframe-larger-than] 6268 | static void dml_prefetch_check(struct display_mode_lib_st *mode_lib) | ^ Commit be4e3509314a ("drm/amd/display: DML21 Reintegration For Various Fixes") introduced one in dml2_core/dml2_core_dcn4_calcs.c with the same configuration: drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c:7236:13: error: stack frame size (3256) exceeds limit (3072) in 'dml_core_mode_support' [-Werror,-Wframe-larger-than] 7236 | static bool dml_core_mode_support(struct dml2_core_calcs_mode_support_ex *in_out_params) | ^ In the case of the first warning, the stack usage was already at the limit at the parent change, so the offending change was rather innocuous. In the case of the second warning, there was a rather dramatic increase in stack usage compared to the parent: drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c:7032:13: error: stack frame size (2696) exceeds limit (2048) in 'dml_core_mode_support' [-Werror,-Wframe-larger-than] 7032 | static bool dml_core_mode_support(struct dml2_core_calcs_mode_support_ex *in_out_params) | ^ This is an unfortunate interaction between an issue with stack slot reuse in LLVM that gets exacerbated by sanitization (which gets enabled with all{mod,yes}config) and function calls using a much higher number of parameters than is typical in the kernel, necessitating passing most of these values on the stack. While it is possible that there should be source code changes to address these warnings, this code is difficult to modify for various reasons, as has been noted in other changes that have occurred for similar reasons, such as commit 6740ec97bcdb ("drm/amd/display: Increase frame warning limit with KASAN or KCSAN in dml2"). Increase the frame larger than limit when compile testing with clang and the sanitizers enabled to avoid this breakage in all{mod,yes}config, as they are commonly used and valuable testing targets. While it is not the best to hide this issue, it is not really relevant when compile testing, as the sanitizers are commonly stressful on optimizations and they are only truly useful at runtime, which COMPILE_TEST states will not occur with the current build. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412121748.chuX4sap-lkp@intel.com/ Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dml2/Makefile | 4 ++++ 1 file changed, 4 insertions(+) commit da5c9677d267efdc3ead8440b638ece30dc93b16 Author: Jesse Zhang <jesse.zhang@amd.com> Date: Mon Dec 16 17:20:52 2024 +0800 drm/amdgpu/pm: Implement SDMA queue reset for different asic Implement sdma queue reset by SMU_MSG_ResetSDMA2 Signed-off-by: Jesse Zhang <jesse.zhang@amd.com> Suggested-by: Tim Huang <tim.huang@amd.com> Reviewed-by: Tim Huang <tim.huang@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 30 ++++++++++++++++------ 1 file changed, 22 insertions(+), 8 deletions(-) commit c8fd3a74c72f3dc05d49850922dbce594875c444 Author: Jesse Zhang <jesse.zhang@amd.com> Date: Mon Dec 16 16:53:49 2024 +0800 drm/amdgpu/pm: add definition PPSMC_MSG_ResetSDMA2 add the PPSMC_MSG_ResetSDMA2 definition for smu 13.0.6 Signed-off-by: Jesse Zhang <jesse.zhang@amd.com> Reviewed-by: Tim Huang <tim.huang@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_ppsmc.h | 1 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 ++- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) commit 39b0fa29f60db2a8b1563bcd147e46548e54292c Author: Jesse Zhang <jesse.zhang@amd.com> Date: Fri Dec 13 19:19:45 2024 +0800 drm/amdgpu/sdma4.4.2: add apu support in sdma queue reset Remove apu check in sdma queue reset. Signed-off-by: Jesse Zhang <jesse.zhang@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd3e8f8b9b011e31534fd5bb463e011ccccd9bbd Merge: 93e505a300aa e5ad1d98234a Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Jan 9 12:53:29 2025 -0800 Merge branch 'tools-ynl-add-install-target' Jan Stancek says: ==================== tools: ynl: add install target This series adds an install target for ynl. The python code is moved to a subdirectory, so it can be used as a package with flat layout, as well as directly from the tree. To try the install as a non-root user you can run: $ mkdir /tmp/myroot $ make DESTDIR=/tmp/myroot install $ PATH="/tmp/myroot/usr/bin:$PATH" PYTHONPATH="$(ls -1d /tmp/myroot/usr/lib/python*/site-packages)" ynl --help Proposed install layout is described in last patch. ==================== Link: https://patch.msgid.link/cover.1736343575.git.jstancek@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit e5ad1d98234a028dadc3c5b811201399887358c1 Author: Jan Stancek <jstancek@redhat.com> Date: Wed Jan 8 14:56:17 2025 +0100 tools: ynl: add main install target This will install C library, specs, rsts and pyynl. The initial structure is: $ mkdir /tmp/myroot $ make DESTDIR=/tmp/myroot install /usr /usr/lib64 /usr/lib64/libynl.a /usr/lib/python3.XX/site-packages/pyynl/* /usr/lib/python3.XX/site-packages/pyynl-0.0.1.dist-info/* /usr/bin /usr/bin/ynl /usr/bin/ynl-ethtool /usr/include/ynl/*.h /usr/share /usr/share/doc /usr/share/doc/ynl /usr/share/doc/ynl/*.rst /usr/share/ynl /usr/share/ynl/genetlink-c.yaml /usr/share/ynl/genetlink-legacy.yaml /usr/share/ynl/genetlink.yaml /usr/share/ynl/netlink-raw.yaml /usr/share/ynl/specs /usr/share/ynl/specs/devlink.yaml /usr/share/ynl/specs/dpll.yaml /usr/share/ynl/specs/ethtool.yaml /usr/share/ynl/specs/fou.yaml /usr/share/ynl/specs/handshake.yaml /usr/share/ynl/specs/mptcp_pm.yaml /usr/share/ynl/specs/netdev.yaml /usr/share/ynl/specs/net_shaper.yaml /usr/share/ynl/specs/nfsd.yaml /usr/share/ynl/specs/nftables.yaml /usr/share/ynl/specs/nlctrl.yaml /usr/share/ynl/specs/ovs_datapath.yaml /usr/share/ynl/specs/ovs_flow.yaml /usr/share/ynl/specs/ovs_vport.yaml /usr/share/ynl/specs/rt_addr.yaml /usr/share/ynl/specs/rt_link.yaml /usr/share/ynl/specs/rt_neigh.yaml /usr/share/ynl/specs/rt_route.yaml /usr/share/ynl/specs/rt_rule.yaml /usr/share/ynl/specs/tcp_metrics.yaml /usr/share/ynl/specs/tc.yaml /usr/share/ynl/specs/team.yaml Signed-off-by: Jan Stancek <jstancek@redhat.com> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Reviewed-by: Joe Damato <jdamato@fastly.com> Link: https://patch.msgid.link/c882688d751295c7f35c7d4eba104cd5174a0861.1736343575.git.jstancek@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/net/ynl/Makefile | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 1b038af9f75284d8ea2b8ca5a2a3106c5ac3f232 Author: Jan Stancek <jstancek@redhat.com> Date: Wed Jan 8 14:56:16 2025 +0100 tools: ynl: add install target for generated content Generate docs using ynl_gen_rst and add install target for headers, specs and generates rst files. Factor out SPECS_DIR since it's repeated many times. Signed-off-by: Jan Stancek <jstancek@redhat.com> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/645c68e3d201f1ef4276e3daddfe06262a0c2804.1736343575.git.jstancek@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/net/ynl/generated/.gitignore | 1 + tools/net/ynl/generated/Makefile | 49 ++++++++++++++++++++++++++++++++------ 2 files changed, 43 insertions(+), 7 deletions(-) commit a12afefa2eabf435cb1683752b11b9cc2a42502a Author: Jan Stancek <jstancek@redhat.com> Date: Wed Jan 8 14:56:15 2025 +0100 tools: ynl: add initial pyproject.toml for packaging Add pyproject.toml and define authors, dependencies and user-facing scripts. This will be used later by pip to install python code. Signed-off-by: Jan Stancek <jstancek@redhat.com> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/b184b43340f08aef97387bfd7f2b2cd9b015c343.1736343575.git.jstancek@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/net/ynl/pyproject.toml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit ab88c2b3739a3d839b04f57d9ee0d6b1dc311cc8 Author: Jan Stancek <jstancek@redhat.com> Date: Wed Jan 8 14:56:14 2025 +0100 tools: ynl: move python code to separate sub-directory Move python code to a separate directory so it can be packaged as a python module. Updates existing references in selftests and docs. Also rename ynl-gen-[c|rst] to ynl_gen_[c|rst], avoid dashes as these prevent easy imports for entrypoints. Signed-off-by: Jan Stancek <jstancek@redhat.com> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/a4151bad0e6984e7164d395125ce87fd2e048bf1.1736343575.git.jstancek@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Documentation/Makefile | 2 +- Documentation/networking/multi-pf-netdev.rst | 4 ++-- Documentation/networking/napi.rst | 4 ++-- Documentation/networking/netlink_spec/readme.txt | 2 +- Documentation/userspace-api/netlink/intro-specs.rst | 8 ++++---- tools/net/ynl/Makefile | 2 ++ tools/net/ynl/generated/Makefile | 2 +- tools/net/ynl/lib/.gitignore | 1 - tools/net/ynl/lib/Makefile | 1 - tools/net/ynl/pyynl/.gitignore | 2 ++ tools/net/ynl/pyynl/__init__.py | 0 tools/net/ynl/{ => pyynl}/cli.py | 0 tools/net/ynl/{ => pyynl}/ethtool.py | 0 tools/net/ynl/{ => pyynl}/lib/__init__.py | 0 tools/net/ynl/{ => pyynl}/lib/nlspec.py | 0 tools/net/ynl/{ => pyynl}/lib/ynl.py | 0 tools/net/ynl/{ynl-gen-c.py => pyynl/ynl_gen_c.py} | 0 tools/net/ynl/{ynl-gen-rst.py => pyynl/ynl_gen_rst.py} | 0 tools/net/ynl/ynl-regen.sh | 2 +- tools/testing/selftests/net/lib/py/ynl.py | 4 ++-- tools/testing/selftests/net/ynl.mk | 3 ++- 21 files changed, 20 insertions(+), 17 deletions(-) commit 93e505a300aa4314995f14a2083d0df97a0d80e3 Author: Jakub Kicinski <kuba@kernel.org> Date: Wed Jan 8 12:07:58 2025 -0800 tools: ynl-gen-c: improve support for empty nests Empty nests are the same size as a flag at the netlink level (just a 4 byte nlattr without a payload). They are sometimes useful in case we want to only communicate a presence of something but may want to add more details later. This may be the case in the upcoming io_uring ZC patches, for example. Improve handling of nested empty structs. We already support empty structs since a lot of netlink replies are empty, but for nested ones we need minor tweaks to avoid pointless empty lines and unused variables. Acked-by: Stanislav Fomichev <sdf@fomichev.me> Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Link: https://patch.msgid.link/20250108200758.2693155-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/net/ynl/ynl-gen-c.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 02f1a5911550bd6b39526d18282b10d441e04ed1 Author: Huisong Li <lihuisong@huawei.com> Date: Thu Jan 9 16:17:08 2025 +0800 hwmon: (acpi_power_meter) Fix update the power trip points on failure The power trip points maintained in local should not be updated when '_PTP' method fails to evaluate. Signed-off-by: Huisong Li <lihuisong@huawei.com> Link: https://lore.kernel.org/r/20250109081708.27366-3-lihuisong@huawei.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/acpi_power_meter.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 7532e68f5d8f05353765d7585a791a14985d68b7 Author: Huisong Li <lihuisong@huawei.com> Date: Thu Jan 9 16:17:07 2025 +0800 hwmon: (acpi_power_meter) Fix uninitialized variables The 'power1_alarm' attribute uses the 'power' and 'cap' in the acpi_power_meter_resource structure. Currently, these two fields are just updated when user query 'power' and 'cap' attribute. If user directly query the 'power1_alarm' attribute without queryng above two attributes, driver will use uninitialized variables to judge. So this patch adds the setting of alarm state and update 'cap' in the notification callback and update 'power' and 'cap' if needed to show the real alarm state. Signed-off-by: Huisong Li <lihuisong@huawei.com> Link: https://lore.kernel.org/r/20250109081708.27366-2-lihuisong@huawei.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/acpi_power_meter.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) commit c909e68f81279cb5147c6f4a7ecf80e4c6c19b04 Author: Heiner Kallweit <hkallweit1@gmail.com> Date: Thu Jan 9 20:53:55 2025 +0100 hwmon: (core) Use device name as a fallback in devm_hwmon_device_register_with_info A number of network PHY drivers use the following code: name = devm_hwmon_sanitize_name(dev, dev_name(dev)); if (IS_ERR(name)) return PTR_ERR(name); devm_hwmon_device_register_with_info(dev, name, ..); Make this a generic fallback option and use the device name if no name is provided to devm_hwmon_device_register_with_info(). This would allow to simplify the affected drivers. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/1ebe6961-6445-4408-bfb4-b56173af9db5@gmail.com [groeck: Update API document] Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/hwmon/hwmon-kernel-api.rst | 3 ++- drivers/hwmon/hwmon.c | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit a3116a403e89e4d4e0992395ecaba3b44a217c83 Merge: 75f01bf61072 8e0644e5398b Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Jan 9 12:27:10 2025 -0800 Merge branch 'enic-set-link-speed-only-after-link-up' John Daley says: ==================== enic: Set link speed only after link up ==================== Link: https://patch.msgid.link/20250107214159.18807-1-johndale@cisco.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 8e0644e5398be53f44e9c23c6d57ef367b1ad2a2 Author: John Daley <johndale@cisco.com> Date: Tue Jan 7 13:41:59 2025 -0800 enic: Fix typo in comment in table indexed by link speed The RX adaptive interrupt moderation table is indexed by link speed range, where the last row of the table is the catch-all for all link speeds greater than 10Gbps. The comment said 10 - 40Gbps, but since there are now adapters with link speeds than 40Gbps, the comment is now wrong and should indicate it applies to all speeds greater than 10Gbps. Co-developed-by: Nelson Escobar <neescoba@cisco.com> Signed-off-by: Nelson Escobar <neescoba@cisco.com> Co-developed-by: Satish Kharat <satishkh@cisco.com> Signed-off-by: Satish Kharat <satishkh@cisco.com> Signed-off-by: John Daley <johndale@cisco.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Link: https://patch.msgid.link/20250107214159.18807-4-johndale@cisco.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/cisco/enic/enic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 238d77d110f7b54b483bf2b67038d43a7b51800c Author: John Daley <johndale@cisco.com> Date: Tue Jan 7 13:41:58 2025 -0800 enic: Obtain the Link speed only after the link comes up The link speed is obtained in the RX adaptive coalescing function. It was being called at probe time when the link may not be up. Change the call to run after the Link comes up. The impact of not getting the correct link speed was that the low end of the adaptive interrupt range was always being set to 0 which could have caused a slight increase in the number of RX interrupts. Co-developed-by: Nelson Escobar <neescoba@cisco.com> Signed-off-by: Nelson Escobar <neescoba@cisco.com> Co-developed-by: Satish Kharat <satishkh@cisco.com> Signed-off-by: Satish Kharat <satishkh@cisco.com> Signed-off-by: John Daley <johndale@cisco.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Link: https://patch.msgid.link/20250107214159.18807-3-johndale@cisco.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/cisco/enic/enic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af2ccc6908f7c2156532de16f8446992b74e74a2 Author: John Daley <johndale@cisco.com> Date: Tue Jan 7 13:41:57 2025 -0800 enic: Move RX coalescing set function Move the function used for setting the RX coalescing range to before the function that checks the link status. It needs to be called from there instead of from the probe function. There is no functional change. Co-developed-by: Nelson Escobar <neescoba@cisco.com> Signed-off-by: Nelson Escobar <neescoba@cisco.com> Co-developed-by: Satish Kharat <satishkh@cisco.com> Signed-off-by: Satish Kharat <satishkh@cisco.com> Signed-off-by: John Daley <johndale@cisco.com> Link: https://patch.msgid.link/20250107214159.18807-2-johndale@cisco.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/cisco/enic/enic_main.c | 60 ++++++++++++++--------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 75f01bf6107221b66145d45a38fe772b9b6703c6 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Wed Jan 8 13:02:42 2025 +0100 dt-bindings: net: qcom,ipa: Use recommended MBN firmware format in DTS example All Qualcomm firmwares uploaded to linux-firmware are in MBN format, instead of split MDT. No functional changes, just correct the DTS example so people will not rely on unaccepted files. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Alex Elder <elder@kernel.org> Link: https://patch.msgid.link/20250108120242.156201-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Documentation/devicetree/bindings/net/qcom,ipa.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0006897a96c736623ddeb9b68c3880eb5cdebe7 Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:06:04 2024 +0100 spi: spi-mem: Create macros for DTR operation We do have macros for defining command, address, dummy and data cycles. We also have a .dtr flag that implies sampling the bus on both edges, but there are currently no macros enabling it. We might make use of such macros, so let's create: - SPI_MEM_DTR_OP_CMD - SPI_MEM_DTR_OP_ADDR - SPI_MEM_DTR_OP_DUMMY - SPI_MEM_DTR_OP_DATA_OUT - SPI_MEM_DTR_OP_DATA_OUT Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-19-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> include/linux/spi/spi-mem.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit d1f85873d2d62d6980e68d21d3a21f20b0664cc3 Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:06:03 2024 +0100 spi: spi-mem: Reorder spi-mem macro assignments Follow the order in which all the `struct spi_mem_op` members are defined. This is purely aesthetics, there is no functional change. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-18-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> include/linux/spi/spi-mem.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 30eb2e6e78225f92f04a2325c6fd77fe8f5b4aab Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:06:02 2024 +0100 spi: zynqmp-gqspi: Support per spi-mem operation frequency switches Every ->exec_op() call correctly configures the spi bus speed to the maximum allowed frequency for the memory using the constant spi default parameter. Since we can now have per-operation constraints, let's use the value that comes from the spi-mem operation structure instead. In case there is no specific limitation for this operation, the default spi device value will be given anyway. The per-operation frequency capability is thus advertised to the spi-mem core. Cc: Michal Simek <michal.simek@amd.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-17-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-zynqmp-gqspi.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 9a68f6c8d6cfddeac7c5874528ed04e50a1cb579 Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:06:01 2024 +0100 spi: zynq-qspi: Support per spi-mem operation frequency switches Every ->exec_op() call correctly configures the spi bus speed to the maximum allowed frequency for the memory using the constant spi default parameter. Since we can now have per-operation constraints, let's use the value that comes from the spi-mem operation structure instead. In case there is no specific limitation for this operation, the default spi device value will be given anyway. The per-operation frequency capability is thus advertised to the spi-mem core. Cc: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-16-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-zynq-qspi.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit b2fac3192919dd07e7ce30558e34abd7e07dde77 Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:06:00 2024 +0100 spi: spi-ti-qspi: Support per spi-mem operation frequency switches Every ->exec_op() call correctly configures the spi bus speed to the maximum allowed frequency for the memory using the constant spi default parameter. Since we can now have per-operation constraints, let's use the value that comes from the spi-mem operation structure instead. In case there is no specific limitation for this operation, the default spi device value will be given anyway. The per-operation frequency capability is thus advertised to the spi-mem core. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-15-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-ti-qspi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 1a206344218cc15ad8f321e3abab3f3d36ab639f Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:05:59 2024 +0100 spi: spi-sn-f-ospi: Support per spi-mem operation frequency switches Every ->exec_op() call correctly configures the spi bus speed to the maximum allowed frequency for the memory using the constant spi default parameter. Since we can now have per-operation constraints, let's use the value that comes from the spi-mem operation structure instead. In case there is no specific limitation for this operation, the default spi device value will be given anyway. The per-operation frequency capability is thus advertised to the spi-mem core. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-14-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-sn-f-ospi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d3f35dd3ad968256ed1080e3ea2022f947861cff Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:05:58 2024 +0100 spi: rockchip-sfc: Support per spi-mem operation frequency switches Every ->exec_op() call correctly configures the spi bus speed to the maximum allowed frequency for the memory using the constant spi default parameter. Since we can now have per-operation constraints, let's use the value that comes from the spi-mem operation structure instead. In case there is no specific limitation for this operation, the default spi device value will be given anyway. The per-operation frequency capability is thus advertised to the spi-mem core. Cc: Han Xu <han.xu@nxp.com> Cc: Haibo Chen <haibo.chen@nxp.com> Cc: Yogesh Gaur <yogeshgaur.83@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-13-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-rockchip-sfc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 26851cf65ffca2d3a8d529a125e54cf0084d69e7 Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:05:57 2024 +0100 spi: nxp-fspi: Support per spi-mem operation frequency switches Every ->exec_op() call correctly configures the spi bus speed to the maximum allowed frequency for the memory using the constant spi default parameter. Since we can now have per-operation constraints, let's use the value that comes from the spi-mem operation structure instead. In case there is no specific limitation for this operation, the default spi device value will be given anyway. The per-operation frequency capability is thus advertised to the spi-mem core. Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-12-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-nxp-fspi.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 67707cb094f134f5b3931eefbedbb9ca7e3209d0 Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:05:56 2024 +0100 spi: mxic: Support per spi-mem operation frequency switches Every ->exec_op() call correctly configures the spi bus speed to the maximum allowed frequency for the memory using the constant spi default parameter. Since we can now have per-operation constraints, let's use the value that comes from the spi-mem operation structure instead. In case there is no specific limitation for this operation, the default spi device value will be given anyway. The per-operation frequency capability is thus advertised to the spi-mem core. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-11-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-mxic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 13fd04b53053bbfa741a0f2a781837ab80e485f6 Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:05:55 2024 +0100 spi: mt65xx: Support per spi-mem operation frequency switches Every ->exec_op() call correctly configures the spi bus speed to the maximum allowed frequency for the memory using the constant spi default parameter. Since we can now have per-operation constraints, let's use the value that comes from the spi-mem operation structure instead. In case there is no specific limitation for this operation, the default spi device value will be given anyway. The per-operation frequency capability is thus advertised to the spi-mem core. Cc: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-10-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-mt65xx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 13529647743d906ed3cf991f1d77727e7ff1fb6f Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:05:54 2024 +0100 spi: microchip-core-qspi: Support per spi-mem operation frequency switches Every ->exec_op() call correctly configures the spi bus speed to the maximum allowed frequency for the memory using the constant spi default parameter. Since we can now have per-operation constraints, let's use the value that comes from the spi-mem operation structure instead. In case there is no specific limitation for this operation, the default spi device value will be given anyway. This controller however performed a frequency check, which is also observed during the ->check_op() phase. The per-operation frequency capability is thus advertised to the spi-mem core. Cc: Conor Dooley <conor.dooley@microchip.com> Cc: Daire McNamara <daire.mcnamara@microchip.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-9-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-microchip-core-qspi.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit 2438db5253eb17a7c0ccb15aea4252a150dda057 Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:05:53 2024 +0100 spi: fsl-qspi: Support per spi-mem operation frequency switches Every ->exec_op() call correctly configures the spi bus speed to the maximum allowed frequency for the memory using the constant spi default parameter. Since we can now have per-operation constraints, let's use the value that comes from the spi-mem operation structure instead. In case there is no specific limitation for this operation, the default spi device value will be given anyway. The per-operation frequency capability is thus advertised to the spi-mem core. Cc: Han Xu <han.xu@nxp.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-8-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-fsl-qspi.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit eee7bc9e7ade6f7ac17d9ec02887cd5509ba9427 Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:05:52 2024 +0100 spi: dw: Support per spi-mem operation frequency switches Every ->exec_op() call correctly configures the spi bus speed to the maximum allowed frequency for the memory using the constant spi default parameter. Since we can now have per-operation constraints, let's use the value that comes from the spi-mem operation structure instead. In case there is no specific limitation for this operation, the default spi device value will be given anyway. The per-operation frequency capability is thus advertised to the spi-mem core. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-7-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-dw-core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 06e9f5a1f6ba774d8942a168d3ec5ed5a008fbcb Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:05:51 2024 +0100 spi: cadence-qspi: Support per spi-mem operation frequency switches Every ->exec_op() call correctly configures the spi bus speed to the maximum allowed frequency for the memory using the constant spi default parameter. Since we can now have per-operation constraints, let's use the value that comes from the spi-mem operation structure instead. In case there is no specific limitation for this operation, the default spi device value will be given anyway. The per-operation frequency capability is thus advertised to the spi-mem core. Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-6-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-cadence-quadspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5baa189789e8894c58eacc7803e3c163c1d0fc0a Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:05:50 2024 +0100 spi: amlogic-spifc-a1: Support per spi-mem operation frequency switches Every ->exec_op() call correctly configures the spi bus speed to the maximum allowed frequency for the memory using the constant spi default parameter. Since we can now have per-operation constraints, let's use the value that comes from the spi-mem operation structure instead. In case there is no specific limitation for this operation, the default spi device value will be given anyway. The per-operation frequency capability is thus advertised to the spi-mem core. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-5-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-amlogic-spifc-a1.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit e6204f39fe3a7b4538815a2d778b601bd543649e Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:05:49 2024 +0100 spi: amd: Drop redundant check Both spi and spi-mem cores already take care of checking the minimum and maximum speed for transfers depending on the controller capabilities. There is no reason to repeat this check in controller drivers. Once this possible error condition removed from the function, it makes no longer sense to return an int. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-4-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-amd.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit d0e5faccb229b1dacc4c9fa11f6df33bb1fdabd8 Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:05:48 2024 +0100 spi: amd: Support per spi-mem operation frequency switches Every ->exec_op() call correctly configures the spi bus speed to the maximum allowed frequency for the memory using the constant spi default parameter. Since we can now have per-operation constraints, let's use the value that comes from the spi-mem operation structure instead. In case there is no specific limitation for this operation, the default spi device value will be given anyway. This controller however performed a frequency check, which is also observed during the ->check_op() phase. The per-operation frequency capability is thus advertised to the spi-mem core. Cc: Sanjay R Mehta <sanju.mehta@amd.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-3-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-amd.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 1248c9b8d54120950fda10fbeb98fb8932b4d45c Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:05:47 2024 +0100 spi: spi-mem: Add a new controller capability There are spi devices with multiple frequency limitations depending on the invoked command. We probably do not want to afford running at the lowest supported frequency all the time, so if we want to get the most of our hardware, we need to allow per-operation frequency limitations. Among all the SPI memory controllers, I believe all are capable of changing the spi frequency on the fly. Some of the drivers do not make any frequency setup though. And some others will derive a per chip prescaler value which will be used forever. Actually changing the frequency on the fly is something new in Linux, so we need to carefully flag the drivers which do and do not support it. A controller capability is created for that, and the presence for this capability will always be checked before accepting such pattern. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-2-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-mem.c | 6 ++++++ include/linux/spi/spi-mem.h | 2 ++ 2 files changed, 8 insertions(+) commit 0fefeade90e74bc8f40ab0e460f483565c492e28 Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 18:05:46 2024 +0100 spi: spi-mem: Extend spi-mem operations with a per-operation maximum frequency In the spi subsystem, the bus frequency is derived as follows: - the controller may expose a minimum and maximum operating frequency - the hardware description, through the spi peripheral properties, advise what is the maximum acceptable frequency from a device/wiring point of view. Transfers must be observed at a frequency which fits both (so in practice, the lowest maximum). Actually, this second point mixes two information and already takes the lowest frequency among: - what the spi device is capable of (what is written in the component datasheet) - what the wiring allows (electromagnetic sensibility, crossovers, terminations, antenna effect, etc). This logic works until spi devices are no longer capable of sustaining their highest frequency regardless of the operation. Spi memories are typically subject to such variation. Some devices are capable of spitting their internally stored data (essentially in read mode) at a very fast rate, typically up to 166MHz on Winbond SPI-NAND chips, using "fast" commands. However, some of the low-end operations, such as regular page read-from-cache commands, are more limited and can only be executed at 54MHz at most. This is currently a problem in the SPI-NAND subsystem. Another situation, even if not yet supported, will be with DTR commands, when the data is latched on both edges of the clock. The same chips as mentioned previously are in this case limited to 80MHz. Yet another example might be continuous reads, which, under certain circumstances, can also run at most at 104 or 120MHz. As a matter of fact, the "one frequency per chip" policy is outdated and more fine grain configuration is needed: we need to allow per-operation frequency limitations. So far, all datasheets I encountered advertise a maximum default frequency, which need to be lowered for certain specific operations. So based on the current infrastructure, we can still expect firmware (device trees in general) to continued advertising the same maximum speed which is a mix between the PCB limitations and the chip maximum capability, and expect per-operation lower frequencies when this is relevant. Add a `struct spi_mem_op` member to carry this information. Not providing this field explicitly from upper layers means that there is no further constraint and the default spi device maximum speed will be carried instead. The SPI_MEM_OP() macro is also expanded with an optional frequency argument, because virtually all operations can be subject to such a limitation, and this will allow for a smooth and discrete transition. For controller drivers which do not implement the spi-mem interface, the per-transfer speed is also set acordingly to a lower (than the maximum default) speed when relevant. Acked-by: Pratyush Yadav <pratyush@kernel.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20241224-winbond-6-11-rc1-quad-support-v2-1-ad218dbc406f@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/mtd/nand/spi/core.c | 2 ++ drivers/spi/spi-mem.c | 28 ++++++++++++++++++++++++++++ include/linux/spi/spi-mem.h | 12 +++++++++++- 3 files changed, 41 insertions(+), 1 deletion(-) commit fcf22a957ff82c7b1020cc6e72a0f1616763fb76 Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Mon Dec 30 15:24:00 2024 +0100 doc: module: DEFAULT_SYMBOL_NAMESPACE must be defined before #includes The definition of EXPORT_SYMBOL et al depends on DEFAULT_SYMBOL_NAMESPACE. So DEFAULT_SYMBOL_NAMESPACE must already be available when <linux/export.h> is parsed. Also when defined that early there is no need for an #undef, so drop that from the usage example. Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/linux-i2c/Z09bp9uMzwXRLXuF@smile.fi.intel.com/ Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/3dd7ff6fa0a636de86e091286016be8c90e03631.1733305665.git.ukleinek@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241230142357.3203913-6-u.kleine-koenig@baylibre.com Documentation/core-api/symbol-namespaces.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3008178ef3714c41dee1d49191cfc66726f680d9 Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Mon Dec 30 15:23:59 2024 +0100 doc: module: Fix documented type of namespace Since commit cdd30ebb1b9f ("module: Convert symbol namespace to string literal") the namespace has to be a string. Fix accordingly. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/6fe15069c01b31aaa68c6224bec2df9f4a449858.1733305665.git.ukleinek@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241230142357.3203913-5-u.kleine-koenig@baylibre.com Documentation/core-api/symbol-namespaces.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 769b83735d84022142b0d6c120f08c377fed9df5 Author: Lubomir Rintel <lrintel@redhat.com> Date: Tue Dec 31 20:02:40 2024 +0100 Documentation/kernel-parameters: Fix a reference to vga-softcursor.rst A very minor oversight that dates all the way back to rst migration in commit 9d85025b0418 ("docs-rst: create an user's manual book"). Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241231190240.417446-1-lkundrak@v3.sk Documentation/admin-guide/kernel-parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24ed44aa06eaafd1323cbe9190b306bef142707d Author: Yuxian Mao <maoyuxian@cqsoftware.com.cn> Date: Thu Jan 2 18:44:04 2025 +0800 docs/zh_CN: Add landlock index Chinese translation Translate lwn/Documentation/security/landlock.rst into Chinese. Update the translation through commit dad2f2071516 ("landlock: Fix grammar issues in documentation") Signed-off-by: Yuxian Mao <maoyuxian@cqsoftware.com.cn> Reviewed-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250102104406.17600-1-maoyuxian@cqsoftware.com.cn .../translations/zh_CN/security/index.rst | 2 +- .../translations/zh_CN/security/landlock.rst | 123 +++++++++++++++++++++ 2 files changed, 124 insertions(+), 1 deletion(-) commit e0439977134288507fc9a0d6135f98e485969a3d Author: Li Zhijian <lizhijian@fujitsu.com> Date: Fri Jan 3 08:43:58 2025 +0800 Documentation: Fix typo localmodonfig -> localmodconfig It's noticed when I myself made the same spelling mistake while searching for localmodconfig Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> Reviewed-by: Thorsten Leemhuis <linux@leemhuis.info> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250103004358.1310121-1-lizhijian@fujitsu.com Documentation/admin-guide/quickly-build-trimmed-linux.rst | 2 +- Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a883764111c07a3653973215f48651b9104fa162 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Tue Jan 7 09:44:28 2025 +0100 overlayfs.rst: Fix and improve grammar - Correct "in a way the" to "in a way that", - Add a comma to improve readability. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/cf07f705d63f04ebf7ba4ecafdc9ab6f63960e3d.1736239148.git.geert+renesas@glider.be Documentation/filesystems/overlayfs.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 84eac6d478c00f8f9101f91716ea3866d2fc1e54 Author: Rob Herring (Arm) <robh@kernel.org> Date: Thu Jan 9 12:23:00 2025 -0600 ASoC: 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) <robh@kernel.org> Link: https://patch.msgid.link/20250109182303.3973082-1-robh@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl-asoc-card.c | 2 +- sound/soc/fsl/imx-audmux.c | 2 +- sound/soc/fsl/imx-card.c | 2 +- sound/soc/fsl/imx-rpmsg.c | 2 +- sound/soc/generic/simple-card-utils.c | 4 ++-- sound/soc/intel/keembay/kmb_platform.c | 2 +- sound/soc/mediatek/common/mtk-soundcard-driver.c | 4 ++-- sound/soc/qcom/common.c | 6 +++--- sound/soc/qcom/sc7180.c | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) commit ee5a1321df90891d59d83b7c9d5b6c5b755d059d Author: Jesus Narvaez <jesus.narvaez@intel.com> Date: Thu Dec 12 11:01:00 2024 -0800 drm/xe/guc: Adding steering info support for GuC register lists The guc_mmio_reg interface supports steering, but it is currently not implemented. This will allow the GuC to control steering of MMIO registers after save-restore and avoid reading from fused off MCR register instances. Fixes: 9c57bc08652a ("drm/xe/lnl: Drop force_probe requirement") Signed-off-by: Jesus Narvaez <jesus.narvaez@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241212190100.3768068-1-jesus.narvaez@intel.com drivers/gpu/drm/xe/xe_gt_mcr.c | 6 +++--- drivers/gpu/drm/xe/xe_gt_mcr.h | 4 ++++ drivers/gpu/drm/xe/xe_guc_ads.c | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) commit 908c1257e5dfb4280bb41f290e15205c3baddaf7 Author: zhangwei <zhangwei@cqsoftware.com.cn> Date: Wed Jan 8 14:04:47 2025 +0800 docs/zh_CN: Add siphash index Chinese translation Translate lwn/Documentation/security/siphash.rst into Chinese Update the translation through commit 12fe434314c8 ("Documentation: siphash: Fix typo in the name of offsetofend macro") Reviewed-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: zhangwei <zhangwei@cqsoftware.com.cn> Reviewed-by: Yanteng Si <siyanteng@linux.dev> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/0af3d9b8be0e5166f74bd36fd6b040767f767fce.1736315479.git.zhangwei@cqsoftware.com.cn .../translations/zh_CN/security/index.rst | 2 +- .../translations/zh_CN/security/siphash.rst | 195 +++++++++++++++++++++ 2 files changed, 196 insertions(+), 1 deletion(-) commit ef3d720f869397ba1ad22fed2746421d4f35c158 Author: Shuo Zhao <zhaoshuo@cqsoftware.com.cn> Date: Wed Jan 8 15:57:38 2025 +0800 docs/zh_CN: Add security IMA-templates Chinese translation Translate .../security/IMA-templates.rst into Chinese. Update the translation through commit 398c42e2c46c ("ima: support fs-verity file digest based version 3 signatures"). Reviewed-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250108075740.19342-1-zhaoshuo@cqsoftware.com.cn .../translations/zh_CN/security/IMA-templates.rst | 97 ++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit d996d56d1254ad95642c4b0740e5ceaf56b65bb3 Author: Shuo Zhao <zhaoshuo@cqsoftware.com.cn> Date: Wed Jan 8 16:01:35 2025 +0800 docs/zh_CN: Add security digsig Chinese translation Translate .../security/digsig.rst into Chinese. Update the translation through commit d56b699d76d1 ("Documentation: Fix typos") Reviewed-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn> Reviewed-by: Yanteng Si <siyanteng@linux.dev> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250108080136.19398-1-zhaoshuo@cqsoftware.com.cn .../translations/zh_CN/security/digsig.rst | 103 +++++++++++++++++++++ .../translations/zh_CN/security/index.rst | 2 +- 2 files changed, 104 insertions(+), 1 deletion(-) commit 8c28c4993f117e03130a51160229bde7ad388240 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Tue Dec 17 08:13:26 2024 +0100 rtc: use boolean values with device_init_wakeup() device_init_wakeup() second argument is a bool type. Use proper boolean values when calling it to match the type and to produce unambiguous code which is easier to understand. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Link: https://lore.kernel.org/r/20241217071331.3607-2-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> drivers/rtc/rtc-88pm80x.c | 2 +- drivers/rtc/rtc-88pm860x.c | 2 +- drivers/rtc/rtc-amlogic-a4.c | 6 +++--- drivers/rtc/rtc-armada38x.c | 2 +- drivers/rtc/rtc-as3722.c | 2 +- drivers/rtc/rtc-at91rm9200.c | 2 +- drivers/rtc/rtc-at91sam9.c | 2 +- drivers/rtc/rtc-cadence.c | 2 +- drivers/rtc/rtc-cmos.c | 2 +- drivers/rtc/rtc-cpcap.c | 2 +- drivers/rtc/rtc-cros-ec.c | 2 +- drivers/rtc/rtc-da9055.c | 2 +- drivers/rtc/rtc-ds3232.c | 2 +- drivers/rtc/rtc-isl1208.c | 2 +- drivers/rtc/rtc-jz4740.c | 2 +- drivers/rtc/rtc-loongson.c | 4 ++-- drivers/rtc/rtc-lp8788.c | 2 +- drivers/rtc/rtc-lpc32xx.c | 2 +- drivers/rtc/rtc-max77686.c | 2 +- drivers/rtc/rtc-max8925.c | 2 +- drivers/rtc/rtc-max8997.c | 2 +- drivers/rtc/rtc-meson-vrtc.c | 2 +- drivers/rtc/rtc-mpc5121.c | 2 +- drivers/rtc/rtc-mt6397.c | 2 +- drivers/rtc/rtc-mv.c | 4 ++-- drivers/rtc/rtc-mxc.c | 2 +- drivers/rtc/rtc-mxc_v2.c | 2 +- drivers/rtc/rtc-omap.c | 2 +- drivers/rtc/rtc-palmas.c | 2 +- drivers/rtc/rtc-pic32.c | 2 +- drivers/rtc/rtc-pm8xxx.c | 2 +- drivers/rtc/rtc-pxa.c | 2 +- drivers/rtc/rtc-rc5t583.c | 2 +- drivers/rtc/rtc-rc5t619.c | 2 +- drivers/rtc/rtc-renesas-rtca3.c | 2 +- drivers/rtc/rtc-rk808.c | 2 +- drivers/rtc/rtc-s3c.c | 2 +- drivers/rtc/rtc-s5m.c | 2 +- drivers/rtc/rtc-sa1100.c | 2 +- drivers/rtc/rtc-sc27xx.c | 4 ++-- drivers/rtc/rtc-sh.c | 2 +- drivers/rtc/rtc-spear.c | 4 ++-- drivers/rtc/rtc-sun6i.c | 2 +- drivers/rtc/rtc-sunplus.c | 4 ++-- drivers/rtc/rtc-tegra.c | 2 +- drivers/rtc/rtc-test.c | 2 +- drivers/rtc/rtc-tps6586x.c | 2 +- drivers/rtc/rtc-tps65910.c | 2 +- drivers/rtc/rtc-twl.c | 2 +- drivers/rtc/rtc-wm831x.c | 2 +- drivers/rtc/rtc-wm8350.c | 2 +- drivers/rtc/rtc-xgene.c | 4 ++-- drivers/rtc/rtc-zynqmp.c | 4 ++-- 53 files changed, 62 insertions(+), 62 deletions(-) commit 7e24ec93aecd12e33d31e38e5af4625553bbc727 Author: Yu-Chun Lin <eleanor15x@gmail.com> Date: Fri Jan 10 01:15:47 2025 +0800 ASoC: amd: Add ACPI dependency to fix build error As reported by the kernel test robot, the following error occurs: sound/soc/amd/yc/acp6x-mach.c: In function 'acp6x_probe': >> sound/soc/amd/yc/acp6x-mach.c:573:15: error: implicit declaration of function 'acpi_evaluate_integer'; did you mean 'acpi_evaluate_object'? [-Werror=implicit-function-declaration] 573 | ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status); | ^~~~~~~~~~~~~~~~~~~~~ | acpi_evaluate_object cc1: some warnings being treated as errors The function 'acpi_evaluate_integer' and its prototype in 'acpi_bus.h' are only available when 'CONFIG_ACPI' is enabled. Add a 'depends on ACPI' directive in Kconfig to ensure proper compilation. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202501090345.pBIDRTym-lkp@intel.com/ Signed-off-by: Yu-Chun Lin <eleanor15x@gmail.com> Link: https://patch.msgid.link/20250109171547.362412-1-eleanor15x@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/amd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7158c61afdcff436d087a093b45f599bb8805434 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Tue Dec 3 17:25:05 2024 +0100 rtc: RTC_DRV_SPEAR should not default to y when compile-testing Merely enabling compile-testing should not enable additional functionality. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Link: https://lore.kernel.org/r/7b8eefe3b0150101ba01c3ea55e45aa3134059ba.1733243007.git.geert+renesas@glider.be Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> drivers/rtc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75fd04f276de31cc59419fda169232d097fbf291 Author: Nitin Gote <nitin.r.gote@intel.com> Date: Mon Jan 6 15:56:46 2025 +0530 drm/xe: Fix all typos in xe Fix all typos in files of xe, reported by codespell tool. Signed-off-by: Nitin Gote <nitin.r.gote@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Reviewed-by: Stuart Summers <stuart.summers@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250106102646.1400146-2-nitin.r.gote@intel.com Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> drivers/gpu/drm/xe/Kconfig.debug | 4 ++-- drivers/gpu/drm/xe/abi/guc_capture_abi.h | 2 +- drivers/gpu/drm/xe/abi/guc_klvs_abi.h | 6 +++--- drivers/gpu/drm/xe/regs/xe_reg_defs.h | 2 +- drivers/gpu/drm/xe/tests/xe_mocs.c | 2 +- drivers/gpu/drm/xe/xe_bb.c | 2 +- drivers/gpu/drm/xe/xe_bo.c | 8 ++++---- drivers/gpu/drm/xe/xe_bo_doc.h | 2 +- drivers/gpu/drm/xe/xe_devcoredump.c | 2 +- drivers/gpu/drm/xe/xe_device.c | 2 +- drivers/gpu/drm/xe/xe_drm_client.c | 2 +- drivers/gpu/drm/xe/xe_exec.c | 2 +- drivers/gpu/drm/xe/xe_ggtt.c | 2 +- drivers/gpu/drm/xe/xe_gt.h | 2 +- drivers/gpu/drm/xe/xe_gt_mcr.c | 2 +- drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 2 +- drivers/gpu/drm/xe/xe_guc_capture.c | 2 +- drivers/gpu/drm/xe/xe_guc_capture_types.h | 4 ++-- drivers/gpu/drm/xe/xe_guc_ct.c | 4 ++-- drivers/gpu/drm/xe/xe_guc_submit.c | 2 +- drivers/gpu/drm/xe/xe_hmm.c | 2 +- drivers/gpu/drm/xe/xe_migrate.c | 2 +- drivers/gpu/drm/xe/xe_pci.c | 4 ++-- drivers/gpu/drm/xe/xe_pcode.c | 2 +- drivers/gpu/drm/xe/xe_pm.c | 2 +- drivers/gpu/drm/xe/xe_pt.c | 2 +- drivers/gpu/drm/xe/xe_rtp.h | 4 ++-- drivers/gpu/drm/xe/xe_uc_fw_types.h | 2 +- drivers/gpu/drm/xe/xe_vm.c | 4 ++-- 29 files changed, 40 insertions(+), 40 deletions(-) commit c3ad22ad34f81a8906dba02ea8cc9756d2ce7b50 Author: Kory Maincent (Dent Project) <kory.maincent@bootlin.com> Date: Thu Jan 9 11:18:07 2025 +0100 regulator: core: Resolve supply using of_node from regulator_config Previously, the regulator core resolved its supply only from the parent device or its children, ignoring the of_node specified in the regulator_config structure. This behavior causes issues in scenarios where multiple regulator devices are registered for components described as children of a controller, each with their own specific regulator supply. For instance, in a PSE controller with multiple PIs (Power Interfaces), each PI may have a distinct regulator supply. However, the regulator core would incorrectly use the PSE controller node or its first child to look up the regulator supply, rather than the node specified by the regulator_config->of_node for the PI. This update modifies the behavior to prioritize the of_node in regulator_config for resolving the supply. This ensures correct resolution of the power supply for each device. If no supply is found in the provided of_node, the core falls back to searching within the parent device as before. Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Link: https://patch.msgid.link/20250109-b4-feature_poe_arrange-v2-13-55ded947b510@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/regulator/core.c | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) commit 9c0e29b9957e407af6197ff1fb48f365a9b0c248 Merge: fd688ce125a4 dd2395162c07 Author: Mark Brown <broonie@kernel.org> Date: Thu Jan 9 16:50:34 2025 +0000 ASoC: remove disable_route_checks Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: ASoC framwork has disable_route_checks flag. Intel is the last user of it, but it seems it exists in dead code. So we can remove it. commit b48f2f75ff7635a5e519563be3bc41b921bba2e9 Author: Takashi Iwai <tiwai@suse.de> Date: Thu Jan 9 17:23:17 2025 +0100 ALSA: rme9652: Simplify with str_yes_no() Use the standard helper for simplifying the code. Merely cleanup, no behavior change. Link: https://patch.msgid.link/20250109162318.9172-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/rme9652/rme9652.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 550033fd0373986f18f70e3404c0005fd2cdf7cb Author: Takashi Iwai <tiwai@suse.de> Date: Thu Jan 9 17:23:16 2025 +0100 ALSA: hda/realtek: Simplify with str_yes_no() Use the standard helper for simplifying the code. Merely cleanup, no behavior change. Link: https://patch.msgid.link/20250109162318.9172-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22eb23b8a7b2536a475ac87244ee4ab50764eccd Author: Christian Brauner <brauner@kernel.org> Date: Thu Dec 19 14:59:14 2024 +0100 fs: remove useless lockdep assertion mnt_ns_release() can run asynchronously via call_rcu() so hitting that lockdep assertion means someone else already grabbed the mnt_ns_tree_lock and causes a false positive. That assertion has likely always been wrong. call_rcu() just makes it more likely to hit. Link: https://lore.kernel.org/r/Z2PlT5rcRTIhCpft@ly-workstation Link: https://lore.kernel.org/r/20241219-darben-quietschen-b6e1d80327bb@brauner Reported-by: Lai, Yi <yi1.lai@linux.intel.com> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/namespace.c | 2 -- 1 file changed, 2 deletions(-) commit 7f9bfafc5f496cf2222659890477d0408455369e Author: Christian Brauner <brauner@kernel.org> Date: Tue Dec 17 13:21:55 2024 +0100 fs: use xarray for old mount id While the ida does use the xarray internally we can use it explicitly which allows us to increment the unique mount id under the xa lock. This allows us to remove the atomic as we're now allocating both ids in one go. Link: https://lore.kernel.org/r/20241217-erhielten-regung-44bb1604ca8f@brauner Signed-off-by: Christian Brauner <brauner@kernel.org> fs/namespace.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 87fc11ae7ae9da7250d56aaad305dcb5bca7cfeb Merge: c7bb042031b4 3ab8a0b2a0ff Author: Christian Brauner <brauner@kernel.org> Date: Tue Dec 17 09:04:55 2024 +0100 Merge patch series "fs: tweak mntns iteration" Christian Brauner <brauner@kernel.org> says: Make finding the last or first mount to start iterating the mount namespace from an O(1) operation and add selftests for iterating the mount table starting from the first and last mount. * patches from https://lore.kernel.org/r/20241215-vfs-6-14-mount-work-v1-0-fd55922c4af8@kernel.org: selftests: add listmount() iteration tests fs: cache first and last mount fs: kill MNT_ONRB Link: https://lore.kernel.org/r/20241215-vfs-6-14-mount-work-v1-0-fd55922c4af8@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> commit 3ab8a0b2a0ff1038412cd644b51714e35970f415 Author: Christian Brauner <brauner@kernel.org> Date: Sun Dec 15 21:17:07 2024 +0100 selftests: add listmount() iteration tests Add a forward and backward iteration test for listmount(). Link: https://lore.kernel.org/r/20241215-vfs-6-14-mount-work-v1-3-fd55922c4af8@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> .../selftests/filesystems/statmount/Makefile | 2 +- .../filesystems/statmount/listmount_test.c | 66 ++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) commit 2ce23285d704f6a8d90207ae8f115f5db93d3541 Author: Christian Brauner <brauner@kernel.org> Date: Sun Dec 15 21:17:06 2024 +0100 fs: cache first and last mount Speed up listmount() by caching the first and last node making retrieval of the first and last mount of each mount namespace O(1). Link: https://lore.kernel.org/r/20241215-vfs-6-14-mount-work-v1-2-fd55922c4af8@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/mount.h | 13 +++++++++++-- fs/namespace.c | 17 +++++++++++++---- 2 files changed, 24 insertions(+), 6 deletions(-) commit c7bb042031b4890b1c5e733dd1ef6484565d174a Merge: bd3207363200 75d0dd101fbf Author: Christian Brauner <brauner@kernel.org> Date: Fri Dec 13 20:31:52 2024 +0100 Merge patch series "fs: lockless mntns lookup" Christian Brauner <brauner@kernel.org> says: Currently we take the read lock when looking for a mount namespace to list mounts in. We can make this lockless. The simple search case can just use a sequence counter to detect concurrent changes to the rbtree. For walking the list of mount namespaces sequentially via nsfs we keep a separate rcu list as rb_prev() and rb_next() aren't usable safely with rcu. Since creating mount namespaces is a relatively rare event compared with querying mounts in a foreign mount namespace this is worth it. Once libmount and systemd pick up this mechanism to list mounts in foreign mount namespaces this will be used very frequently. * patches from https://lore.kernel.org/r/20241213-work-mount-rbtree-lockless-v3-0-6e3cdaf9b280@kernel.org: samples: add test-list-all-mounts selftests: remove unneeded include selftests: add tests for mntns iteration seltests: move nsfs into filesystems subfolder fs: simplify rwlock to spinlock fs: lockless mntns lookup for nsfs rculist: add list_bidir_{del,prev}_rcu() fs: lockless mntns rbtree lookup fs: add mount namespace to rbtree late mount: remove inlude/nospec.h include Link: https://lore.kernel.org/r/20241213-work-mount-rbtree-lockless-v3-0-6e3cdaf9b280@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> commit 75d0dd101fbf0173f046bf55a8d583aa8d6a1ce5 Author: Christian Brauner <brauner@kernel.org> Date: Fri Dec 13 00:03:49 2024 +0100 samples: add test-list-all-mounts Add a sample program illustrating how to list all mounts in all mount namespaces. Link: https://lore.kernel.org/r/20241213-work-mount-rbtree-lockless-v3-10-6e3cdaf9b280@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> samples/vfs/.gitignore | 1 + samples/vfs/Makefile | 2 +- samples/vfs/test-list-all-mounts.c | 235 +++++++++++++++++++++++++++++++++++++ 3 files changed, 237 insertions(+), 1 deletion(-) commit d3238e8944e2bd1d6a006d35850e86fa80469751 Author: Christian Brauner <brauner@kernel.org> Date: Fri Dec 13 00:03:48 2024 +0100 selftests: remove unneeded include The pidfd header will be included in a sample program and this pulls in all the mount definitions that would be causing problems. Link: https://lore.kernel.org/r/20241213-work-mount-rbtree-lockless-v3-9-6e3cdaf9b280@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> tools/testing/selftests/pidfd/pidfd.h | 1 - 1 file changed, 1 deletion(-) commit 9d87b1067382be1ede395c9246ff1ee0519f0c64 Author: Christian Brauner <brauner@kernel.org> Date: Fri Dec 13 00:03:47 2024 +0100 selftests: add tests for mntns iteration Test that forward and backward iteration works correctly. Link: https://lore.kernel.org/r/20241213-work-mount-rbtree-lockless-v3-8-6e3cdaf9b280@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> .../testing/selftests/filesystems/nsfs/.gitignore | 1 + tools/testing/selftests/filesystems/nsfs/Makefile | 2 +- .../selftests/filesystems/nsfs/iterate_mntns.c | 149 +++++++++++++++++++++ 3 files changed, 151 insertions(+), 1 deletion(-) commit cae73d3bdce5dc6cdbf454fcc37a6fb2f025151e Author: Christian Brauner <brauner@kernel.org> Date: Fri Dec 13 00:03:46 2024 +0100 seltests: move nsfs into filesystems subfolder I'm going to be adding new tests for it and it belongs under filesystem selftests. Link: https://lore.kernel.org/r/20241213-work-mount-rbtree-lockless-v3-7-6e3cdaf9b280@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> tools/testing/selftests/{ => filesystems}/nsfs/.gitignore | 0 tools/testing/selftests/{ => filesystems}/nsfs/Makefile | 2 +- tools/testing/selftests/{ => filesystems}/nsfs/config | 0 tools/testing/selftests/{ => filesystems}/nsfs/owner.c | 0 tools/testing/selftests/{ => filesystems}/nsfs/pidns.c | 0 5 files changed, 1 insertion(+), 1 deletion(-) commit e7c8dde36818ffa101045cfc887c49cd631048ee Author: Christian Brauner <brauner@kernel.org> Date: Fri Dec 13 00:03:45 2024 +0100 fs: simplify rwlock to spinlock We're not taking the read_lock() anymore now that all lookup is lockless. Just use a simple spinlock. Link: https://lore.kernel.org/r/20241213-work-mount-rbtree-lockless-v3-6-6e3cdaf9b280@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/namespace.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 4368898b271ad4ea3b6ae64f5cd16486a6d65430 Author: Christian Brauner <brauner@kernel.org> Date: Fri Dec 13 00:03:44 2024 +0100 fs: lockless mntns lookup for nsfs We already made the rbtree lookup lockless for the simple lookup case. However, walking the list of mount namespaces via nsfs still happens with taking the read lock blocking concurrent additions of new mount namespaces pointlessly. Plus, such additions are rare anyway so allow lockless lookup of the previous and next mount namespace by keeping a separate list. This also allows to make some things simpler in the code. Link: https://lore.kernel.org/r/20241213-work-mount-rbtree-lockless-v3-5-6e3cdaf9b280@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/mount.h | 13 ++++--------- fs/namespace.c | 42 +++++++++++++++++++++++++++++------------- fs/nsfs.c | 5 +---- 3 files changed, 34 insertions(+), 26 deletions(-) commit 67d676bb135cd4de9647616e73cfd059ef57c9a6 Author: Christian Brauner <brauner@kernel.org> Date: Fri Dec 13 00:03:43 2024 +0100 rculist: add list_bidir_{del,prev}_rcu() Currently there is no primitive for retrieving the previous list member. To do this we need a new deletion primitive that doesn't poison the prev pointer and a corresponding retrieval helper. Note that it is not valid to ues both list_del_rcu() and list_bidir_del_rcu() on the same list. Link: https://lore.kernel.org/r/20241213-work-mount-rbtree-lockless-v3-4-6e3cdaf9b280@kernel.org Reviewed-by: Paul E. McKenney <paulmck@kernel.org> Reviewed-by: Jeff Layton <jlayton@kernel.org> Suggested-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> include/linux/rculist.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 5dcbd85d35515532c93b337a3f8be54937aeea8a Author: Christian Brauner <brauner@kernel.org> Date: Fri Dec 13 00:03:42 2024 +0100 fs: lockless mntns rbtree lookup Currently we use a read-write lock but for the simple search case we can make this lockless. Creating a new mount namespace is a rather rare event compared with querying mounts in a foreign mount namespace. Once this is picked up by e.g., systemd to list mounts in another mount in it's isolated services or in containers this will be used a lot so this seems worthwhile doing. Link: https://lore.kernel.org/r/20241213-work-mount-rbtree-lockless-v3-3-6e3cdaf9b280@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/mount.h | 5 ++- fs/namespace.c | 116 ++++++++++++++++++++++++++++++++++----------------------- 2 files changed, 74 insertions(+), 47 deletions(-) commit bd32073632008979e39ab063acc252a5ce49efe9 Merge: 40384c840ea1 056d33137bf9 Author: Christian Brauner <brauner@kernel.org> Date: Sun Dec 22 11:22:18 2024 +0100 Merge patch series "fs: listmount()/statmount() fix and sample program" Jeff Layton <jlayton@kernel.org> says: We had some recent queries internally asking how to use the new statmount() and listmount() interfaces. I was doing some other work in this area, so I whipped up this tool. My hope is that this will represent something of a "rosetta stone" for how to translate between mountinfo and statmount(), and an example for other people looking to use the new interfaces. It may also be possible to use this as the basis for a listmount() and statmount() testcase. We can call this program, and compare its output to the mountinfo file. The second patch adds security mount options to the existing mnt_opts in the statmount() interface, which I think is the final missing piece here. The alternative to doing that would be to add a new string field for that, but I'm not sure that's worthwhile. * patches from https://lore.kernel.org/r/20241115-statmount-v2-0-cd29aeff9cbb@kernel.org: fs: prepend statmount.mnt_opts string with security_sb_mnt_opts() samples: add a mountinfo program to demonstrate statmount()/listmount() Link: https://lore.kernel.org/r/20241115-statmount-v2-0-cd29aeff9cbb@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> commit 144acef3334eb664fae4a2e1e35fdd693fc07d4e Author: Christian Brauner <brauner@kernel.org> Date: Fri Dec 13 00:03:41 2024 +0100 fs: add mount namespace to rbtree late There's no point doing that under the namespace semaphore it just gives the false impression that it protects the mount namespace rbtree and it simply doesn't. Link: https://lore.kernel.org/r/20241213-work-mount-rbtree-lockless-v3-2-6e3cdaf9b280@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 056d33137bf9364456ee70aa265ccbb948daee49 Author: Jeff Layton <jlayton@kernel.org> Date: Fri Nov 15 10:35:53 2024 -0500 fs: prepend statmount.mnt_opts string with security_sb_mnt_opts() Currently these mount options aren't accessible via statmount(). The read handler for /proc/#/mountinfo calls security_sb_show_options() to emit the security options after emitting superblock flag options, but before calling sb->s_op->show_options. Have statmount_mnt_opts() call security_sb_show_options() before calling ->show_options. Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://lore.kernel.org/r/20241115-statmount-v2-2-cd29aeff9cbb@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/namespace.c | 4 ++++ 1 file changed, 4 insertions(+) commit 62b8dee925023ed2a2b417dea657e3e3e57c4117 Author: Christian Brauner <brauner@kernel.org> Date: Fri Dec 13 00:03:40 2024 +0100 mount: remove inlude/nospec.h include It's not needed, so remove it. Link: https://lore.kernel.org/r/20241213-work-mount-rbtree-lockless-v3-1-6e3cdaf9b280@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/namespace.c | 1 - 1 file changed, 1 deletion(-) commit c6640d46dc5a31ee7363545530836c10b9ddb9de Author: Jeff Layton <jlayton@kernel.org> Date: Fri Nov 15 10:35:52 2024 -0500 samples: add a mountinfo program to demonstrate statmount()/listmount() Add a new "mountinfo" sample userland program that demonstrates how to use statmount() and listmount() to get at the same info that /proc/pid/mountinfo provides. The output of the program tries to mimic the mountinfo procfile contents. With the -p flag, it can be pointed at an arbitrary pid to print out info about its mount namespace. With the -r flag it will attempt to walk all of the namespaces under the pid's mount namespace and dump out mount info from all of them. Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://lore.kernel.org/r/20241115-statmount-v2-1-cd29aeff9cbb@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> samples/vfs/.gitignore | 1 + samples/vfs/Makefile | 2 +- samples/vfs/mountinfo.c | 274 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 276 insertions(+), 1 deletion(-) commit 619ffe669496a28802b04195a4df32213f4e3bdd Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:28 2025 -0800 perf tools mips: Use generic syscall scripts Use the generic scripts to generate headers from the syscall table for mips. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Guo Ren <guoren@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-13-7543b5293098@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.config | 3 +- tools/perf/Makefile.perf | 2 +- tools/perf/arch/mips/entry/syscalls/Kbuild | 2 ++ .../arch/mips/entry/syscalls/Makefile.syscalls | 5 ++++ tools/perf/arch/mips/entry/syscalls/mksyscalltbl | 32 ---------------------- tools/perf/arch/mips/include/syscall_table.h | 2 ++ tools/perf/util/syscalltbl.c | 4 --- 7 files changed, 11 insertions(+), 39 deletions(-) commit fa70857a27e5aafaeada26e7c709b2cbfbeede81 Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:27 2025 -0800 perf tools loongarch: Use syscall table loongarch uses a syscall table, use that in perf instead of using unistd.h. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Guo Ren <guoren@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-12-7543b5293098@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.config | 3 +- tools/perf/Makefile.perf | 2 +- tools/perf/arch/loongarch/Makefile | 22 ----------- tools/perf/arch/loongarch/entry/syscalls/Kbuild | 2 + .../loongarch/entry/syscalls/Makefile.syscalls | 3 ++ .../arch/loongarch/entry/syscalls/mksyscalltbl | 45 ---------------------- tools/perf/arch/loongarch/include/syscall_table.h | 2 + tools/perf/util/syscalltbl.c | 4 -- 8 files changed, 9 insertions(+), 74 deletions(-) commit cb8197db8c09d7e17a71821ce4076e13ac7f5c70 Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:26 2025 -0800 perf tools arm64: Use syscall table arm64 uses a syscall table, use that in perf instead of using unistd.h. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Guo Ren <guoren@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-11-7543b5293098@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.config | 3 +- tools/perf/Makefile.perf | 2 +- tools/perf/arch/arm64/Makefile | 22 - tools/perf/arch/arm64/entry/syscalls/Kbuild | 3 + .../arch/arm64/entry/syscalls/Makefile.syscalls | 6 + tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | 46 -- .../perf/arch/arm64/entry/syscalls/syscall_32.tbl | 476 +++++++++++++++++++++ .../perf/arch/arm64/entry/syscalls/syscall_64.tbl | 1 + tools/perf/arch/arm64/include/syscall_table.h | 8 + tools/perf/check-headers.sh | 2 + tools/perf/util/syscalltbl.c | 4 - 11 files changed, 498 insertions(+), 75 deletions(-) commit fd688ce125a4ff5cc2b6be1184dc17c9f342db37 Merge: 82a0a3e6f8c0 0b12850ddfb0 Author: Mark Brown <broonie@kernel.org> Date: Thu Jan 9 15:55:24 2025 +0000 ASoC: Intel: avs: Fixes and cleanups Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: A set of loosely connected changes, fixing few outstanding issues as well as improving readability of the existing code. The fixes lead the series, first five patches. The goal is to make sure proper read() is used when accessing the registers, probe() and remove() sequences for HDAudio streaming are synced, minimal AudioDSP firmware version points to correct values and recent additions to the topology are parsed properly. The only patch that points to 'new functionality' is: ASoC: Intel: avs: Update ASRC definition as with the struct definition updates, one can utilize the ASRC module in both streaming directions now (previously limited to Capture). Everything else either improves the logging or provides comments vital for long-term maintenance of the code. commit 02f2d58f235ddcf8bc33c084cff84fd685a1be11 Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:25 2025 -0800 perf tools parisc: Support syscall header parisc uses a syscall table, use that in perf instead of requiring libaudit. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Guo Ren <guoren@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-10-7543b5293098@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.perf | 2 +- tools/perf/arch/parisc/entry/syscalls/Kbuild | 3 + .../arch/parisc/entry/syscalls/Makefile.syscalls | 6 + tools/perf/arch/parisc/entry/syscalls/syscall.tbl | 463 +++++++++++++++++++++ tools/perf/arch/parisc/include/syscall_table.h | 8 + tools/perf/check-headers.sh | 1 + 6 files changed, 482 insertions(+), 1 deletion(-) commit bb4f8428913814abc30b41a5dba7daade8acc436 Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:24 2025 -0800 perf tools alpha: Support syscall header alpha uses a syscall table, use that in perf instead of requiring libaudit. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Guo Ren <guoren@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-9-7543b5293098@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.perf | 2 +- tools/perf/arch/alpha/entry/syscalls/Kbuild | 2 + .../arch/alpha/entry/syscalls/Makefile.syscalls | 5 + tools/perf/arch/alpha/entry/syscalls/syscall.tbl | 504 +++++++++++++++++++++ tools/perf/arch/alpha/include/syscall_table.h | 2 + tools/perf/check-headers.sh | 1 + 6 files changed, 515 insertions(+), 1 deletion(-) commit a874d1f6f107685af28ddca01dbe26846935d960 Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:23 2025 -0800 perf tools x86: Use generic syscall scripts Use the generic scripts to generate headers from the syscall table for both 32- and 64-bit x86. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Guo Ren <guoren@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-8-7543b5293098@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.config | 3 +- tools/perf/Makefile.perf | 2 +- tools/perf/arch/x86/Build | 1 - tools/perf/arch/x86/Makefile | 25 ------------- tools/perf/arch/x86/entry/syscalls/Kbuild | 3 ++ .../perf/arch/x86/entry/syscalls/Makefile.syscalls | 6 ++++ tools/perf/arch/x86/entry/syscalls/syscalltbl.sh | 42 ---------------------- tools/perf/arch/x86/include/syscall_table.h | 8 +++++ tools/perf/util/syscalltbl.c | 10 +----- 9 files changed, 20 insertions(+), 80 deletions(-) commit 24f122dc0993dd1d6bfb3ef94c4e7b6701f8839d Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:22 2025 -0800 perf tools xtensa: Support syscall header xtensa uses a syscall table, use that in perf instead of requiring libaudit. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Guo Ren <guoren@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-7-7543b5293098@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.perf | 2 +- tools/perf/arch/xtensa/entry/syscalls/Kbuild | 2 + .../arch/xtensa/entry/syscalls/Makefile.syscalls | 4 + tools/perf/arch/xtensa/entry/syscalls/syscall.tbl | 439 +++++++++++++++++++++ tools/perf/arch/xtensa/include/syscall_table.h | 2 + tools/perf/check-headers.sh | 1 + 6 files changed, 449 insertions(+), 1 deletion(-) commit 1f44829e5e8b95e9590fbf642139605c7b0d594f Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:21 2025 -0800 perf tools sparc: Support syscall headers sparc uses a syscall table, use that in perf instead of requiring libaudit. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Guo Ren <guoren@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-6-7543b5293098@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.perf | 2 +- tools/perf/arch/sparc/entry/syscalls/Kbuild | 3 + .../arch/sparc/entry/syscalls/Makefile.syscalls | 5 + tools/perf/arch/sparc/entry/syscalls/syscall.tbl | 514 +++++++++++++++++++++ tools/perf/arch/sparc/include/syscall_table.h | 8 + tools/perf/check-headers.sh | 1 + 6 files changed, 532 insertions(+), 1 deletion(-) commit 430a6dfe41d329001a1edf2338cff8ac5ce841d4 Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:20 2025 -0800 perf tools sh: Support syscall headers sh uses a syscall table, use that in perf instead of requiring libaudit. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Guo Ren <guoren@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-5-7543b5293098@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.perf | 2 +- tools/perf/arch/sh/entry/syscalls/Kbuild | 2 + .../perf/arch/sh/entry/syscalls/Makefile.syscalls | 4 + tools/perf/arch/sh/entry/syscalls/syscall.tbl | 472 +++++++++++++++++++++ tools/perf/arch/sh/include/syscall_table.h | 2 + tools/perf/check-headers.sh | 1 + 6 files changed, 482 insertions(+), 1 deletion(-) commit 9605665a64a7d5deadf9d7fa31c5cc058ffa4590 Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:19 2025 -0800 perf tools arm: Support syscall headers arm uses a syscall table, use that in perf instead of requiring libaudit. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Guo Ren <guoren@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-4-7543b5293098@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.perf | 2 +- tools/perf/arch/arm/entry/syscalls/Kbuild | 4 + .../perf/arch/arm/entry/syscalls/Makefile.syscalls | 2 + tools/perf/arch/arm/entry/syscalls/syscall.tbl | 483 +++++++++++++++++++++ tools/perf/arch/arm/include/syscall_table.h | 2 + tools/perf/check-headers.sh | 1 + 6 files changed, 493 insertions(+), 1 deletion(-) commit c68825eed9ba84c82d3673f776bb83f570b3ccba Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:18 2025 -0800 perf tools csky: Support generic syscall headers csky uses the generic syscall table, use that in perf instead of requiring libaudit. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Acked-by: Guo Ren <guoren@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-3-7543b5293098@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.perf | 2 +- tools/perf/arch/csky/entry/syscalls/Kbuild | 2 ++ tools/perf/arch/csky/entry/syscalls/Makefile.syscalls | 3 +++ tools/perf/arch/csky/include/syscall_table.h | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) commit 26db6722566bbbba9b184548fa4493123e800e9d Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:17 2025 -0800 perf tools arc: Support generic syscall headers Arc uses the generic syscall table, use that in perf instead of requiring libaudit. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Guo Ren <guoren@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-2-7543b5293098@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.config | 2 +- tools/perf/Makefile.perf | 3 ++- tools/perf/arch/arc/entry/syscalls/Kbuild | 2 ++ tools/perf/arch/arc/entry/syscalls/Makefile.syscalls | 3 +++ tools/perf/arch/arc/include/syscall_table.h | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) commit 4a73aff8c5e2a156bb841f022df51c27e8104ac8 Author: Charlie Jenkins <charlie@rivosinc.com> Date: Wed Jan 8 18:36:16 2025 -0800 perf tools: Create generic syscall table support Currently each architecture in perf independently generates syscall headers. Adapt the work that has gone into unifying syscall header implementations in the kernel to work with perf tools. Introduce this framework with riscv at first. riscv previously relied on libaudit, but with this change, perf tools for riscv no longer needs this external dependency. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Brauner <brauner@kernel.org> Cc: Guo Ren <guoren@kernel.org> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-1-7543b5293098@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/build/Build.include | 2 + tools/perf/Makefile.config | 11 +- tools/perf/Makefile.perf | 4 + tools/perf/arch/riscv/Makefile | 22 -- tools/perf/arch/riscv/entry/syscalls/Kbuild | 2 + .../arch/riscv/entry/syscalls/Makefile.syscalls | 4 + tools/perf/arch/riscv/entry/syscalls/mksyscalltbl | 47 --- tools/perf/arch/riscv/include/syscall_table.h | 8 + tools/perf/check-headers.sh | 1 + tools/perf/scripts/Makefile.syscalls | 61 +++ tools/perf/scripts/syscalltbl.sh | 86 +++++ tools/perf/util/syscalltbl.c | 8 +- tools/scripts/syscall.tbl | 409 +++++++++++++++++++++ 13 files changed, 588 insertions(+), 77 deletions(-) commit fd4e9308312972d5bd11fe1d8c032b95b44748cb Author: Patrick Höhn <hoehnp@gmx.de> Date: Tue Mar 12 20:31:31 2024 +0100 i2c: i801: Add lis3lv02d for Dell Precision M6800 On the Dell Precision M6800/OXD1M5, BIOS A26 06/13/2029, Linux prints the warning below. i801_smbus 0000:00:1f.4: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration Following the same suggestions by Wolfram Sang as for the Dell Precision 3540 [1], the accelerometer can be successfully found on I2C bus 0 at address 0x29. $ echo lis3lv02d 0x29 | sudo tee /sys/bus/i2c/devices/i2c-0/new_device lis3lv02d 0x29 $ dmesg | tail -5 [1185.385204] lis3lv02d_i2c 0-0029: supply Vdd not found, using dummy regulator [1185.385235] lis3lv02d_i2c 0-0029: supply Vdd_IO not found, using dummy regulator [1185.399689] lis3lv02d: 8 bits 3DC sensor found [1185.449391] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input371 [1185.449577] i2c i2c-0: new_device: Instantiated device lis3lv02d at 0x29 So, the device has that accelerometer. Add the I2C address to the mapping list, and test it successfully on the device. [1]: https://lore.kernel.org/linux-i2c/97708c11-ac85-fb62-2c8e-d37739ca826f@molgen.mpg.de/ Signed-off-by: Patrick Höhn <hoehnp@gmx.de> Acked-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20240312193132.26518-1-hoehnp@gmx.de Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-i801.c | 1 + 1 file changed, 1 insertion(+) commit 65cba48d295216d0636ee835631142099374d905 Author: Philipp Stanner <pstanner@redhat.com> Date: Thu Nov 21 20:56:25 2024 +0100 i2c: i801: Remove unnecessary PCI function call Since the changes in commit f748a07a0b64 ("PCI: Remove legacy pcim_release()") all pcim_enable_device() does is set up a callback that disables the device from being disabled from driver detach. The function pcim_pin_device() prevents said disabling. pcim_enable_device(), therefore, sets up an action that is removed immediately afterwards by pcim_pin_device(). Replace pcim_enable_device() with pci_enable_device() and remove the unnecessary call to pcim_pin_device(). Signed-off-by: Philipp Stanner <pstanner@redhat.com> Link: https://lore.kernel.org/r/20241121195624.144839-2-pstanner@redhat.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-i801.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 3948b4a9bbbb7366b277d9adfcee77b270482749 Author: Sebastian Reichel <sebastian.reichel@collabora.com> Date: Tue Dec 10 17:24:04 2024 +0100 arm64: dts: rockchip: add WLAN to rk3588-evb1 controller The RK3588 EVB1 has an onboard AP6275P WLAN/BT module. This adds support for the WLAN side, which is connected to the second PCIe bus. The Bluetooth side is connected to UART and handled separately. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20241210162452.116767-1-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts | 82 ++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit cd8b5366636bdff0449b789fb2d33abb20804255 Author: Heiko Stuebner <heiko.stuebner@cherry.de> Date: Sat Dec 14 23:48:19 2024 +0100 clk: rockchip: rk3588: make refclko25m_ethX critical Ethernet phys normally need a 25MHz refclk input. On a lot of boards this is done with a dedicated 25MHz crystal. But the rk3588 CRU also provides a means for that via the refclko25m_ethX clock outputs that can be used for that function. The mdio bus normally probes devices on the bus at runtime, by reading specific phy registers. This requires the phy to be running and thus also being supplied by its reference clock. While there exist the possibility and dt-binding to declare these input clocks for each phy in the phy-dt-node, this is only relevant _after_ the phy has been detected and during the drivers probe-run. This results in a chicken-and-egg-problem. The refclks in the CRU are running on boot of course, but phy-probing can very well happen after clk_disable_unused has run. In the past I tried to make clock-handling part of the mdio bus code [0] but that wasn't very well received, due to it being specific to OF and clocks with the consensus being that resources needed for detection need to be enabled before. So to make probing ethernet phys using the internal refclks possible, make those 2 clocks critical. [0] https://lore.kernel.org/netdev/13590315.F0gNSz5aLb@diego/T/ Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de> Link: https://lore.kernel.org/r/20241214224820.200665-1-heiko@sntech.de Signed-off-by: Heiko Stuebner <heiko@sntech.de> drivers/clk/rockchip/clk-rk3588.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cf40ebb2ed9fde24195260637e00e47a6f0e7c15 Merge: 40384c840ea1 468210ec76e1 Author: Christian Brauner <brauner@kernel.org> Date: Thu Jan 9 16:23:26 2025 +0100 Merge patch series "add STATX_DIO_READ_ALIGN v3" Christoph Hellwig <hch@lst.de> says: File systems that write out of place usually require different alignment for direct I/O writes than what they can do for reads. This series tries to address this by adding yet another statx field. * patches from https://lore.kernel.org/r/20250109083109.1441561-1-hch@lst.de: xfs: report larger dio alignment for COW inodes xfs: report the correct read/write dio alignment for reflinked inodes xfs: cleanup xfs_vn_getattr fs: add STATX_DIO_READ_ALIGN fs: reformat the statx definition Link: https://lore.kernel.org/r/20250109083109.1441561-1-hch@lst.de Signed-off-by: Christian Brauner <brauner@kernel.org> commit 468210ec76e155bbc53f8fc41b2bd5e26a2f6d20 Author: Christoph Hellwig <hch@lst.de> Date: Thu Jan 9 09:31:05 2025 +0100 xfs: report larger dio alignment for COW inodes For I/O to reflinked blocks we always need to write an entire new file system block, and the code enforces the file system block alignment for the entire file if it has any reflinked blocks. Mirror the larger value reported in the statx in the dio_offset_align in the xfs-specific XFS_IOC_DIOINFO ioctl for the same reason. Don't bother adding a new field for the read alignment to this legacy ioctl as all new users should use statx instead. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250109083109.1441561-6-hch@lst.de Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/xfs/xfs_ioctl.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 7422bbd030210fbdc011acfd6f0f15b966fd2b46 Author: Christoph Hellwig <hch@lst.de> Date: Thu Jan 9 09:31:04 2025 +0100 xfs: report the correct read/write dio alignment for reflinked inodes For I/O to reflinked blocks we always need to write an entire new file system block, and the code enforces the file system block alignment for the entire file if it has any reflinked blocks. Use the new STATX_DIO_READ_ALIGN flag to report the asymmetric read vs write alignments for reflinked files. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250109083109.1441561-5-hch@lst.de Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/xfs/xfs_iops.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 7e17483c7b151ed64f8959278def2fea164526f5 Author: Christoph Hellwig <hch@lst.de> Date: Thu Jan 9 09:31:03 2025 +0100 xfs: cleanup xfs_vn_getattr Split the two bits of optional statx reporting into their own helpers so that they are self-contained instead of deeply indented in the main getattr handler. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250109083109.1441561-4-hch@lst.de Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/xfs/xfs_iops.c | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) commit 7ed6cbe0f8caa6ee38a2dc8f1b925acb904cc01f Author: Christoph Hellwig <hch@lst.de> Date: Thu Jan 9 09:31:02 2025 +0100 fs: add STATX_DIO_READ_ALIGN Add a separate dio read align field, as many out of place write file systems can easily do reads aligned to the device sector size, but require bigger alignment for writes. This is usually papered over by falling back to buffered I/O for smaller writes and doing read-modify-write cycles, but performance for this sucks, so applications benefit from knowing the actual write alignment. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250109083109.1441561-3-hch@lst.de Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/stat.c | 1 + include/linux/stat.h | 1 + include/uapi/linux/stat.h | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) commit 8fc7e23a9bd851e6997d3ea2ea1c3475b91862d3 Author: Christoph Hellwig <hch@lst.de> Date: Thu Jan 9 09:31:01 2025 +0100 fs: reformat the statx definition The comments after the declaration are becoming rather unreadable with long enough comments. Move them into lines of their own. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250109083109.1441561-2-hch@lst.de Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> include/uapi/linux/stat.h | 95 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 72 insertions(+), 23 deletions(-) commit 9d241b06802c6c2176ae7aa4f9f17f8a577ed337 Author: Jakob Unterwurzacher <jakobunt@gmail.com> Date: Fri Dec 13 10:54:58 2024 +0100 arm64: dts: rockchip: increase gmac rx_delay on rk3399-puma During mass manufacturing, we noticed the mmc_rx_crc_error counter, as reported by "ethtool -S eth0 | grep mmc_rx_crc_error", to increase above zero during nuttcp speedtests. Most of the time, this did not affect the achieved speed, but it prompted this investigation. Cycling through the rx_delay range on six boards (see table below) of various ages shows that there is a large good region from 0x12 to 0x35 where we see zero crc errors on all tested boards. The old rx_delay value (0x10) seems to have always been on the edge for the KSZ9031RNX that is usually placed on Puma. Choose "rx_delay = 0x23" to put us smack in the middle of the good region. This works fine as well with the KSZ9131RNX PHY that was used for a small number of boards during the COVID chip shortages. Board S/N PHY rx_delay good region --------- --- -------------------- Puma TT0069903 KSZ9031RNX 0x11 0x35 Puma TT0157733 KSZ9031RNX 0x11 0x35 Puma TT0681551 KSZ9031RNX 0x12 0x37 Puma TT0681156 KSZ9031RNX 0x10 0x38 Puma 17496030079 KSZ9031RNX 0x10 0x37 (Puma v1.2 from 2017) Puma TT0681720 KSZ9131RNX 0x02 0x39 (alternative PHY used in very few boards) Intersection of good regions = 0x12 0x35 Middle of good region = 0x23 Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM") Cc: stable@vger.kernel.org Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Tested-by: Quentin Schulz <quentin.schulz@cherry.de> # Puma v2.1 and v2.3 with KSZ9031 Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@cherry.de> Link: https://lore.kernel.org/r/20241213-puma_rx_delay-v4-1-8e8e11cc6ed7@cherry.de Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ca11da6e8a7b578c28dcecc31237791955c62fc Author: Dragan Simic <dsimic@manjaro.org> Date: Wed Dec 11 21:40:52 2024 +0100 arm64: dts: rockchip: Delete redundant RK3328 GMAC stability fixes Since the commit 8a469ee35606 ("arm64: dts: rockchip: Add txpbl node for RK3399/RK3328"), having "snps,txpbl" properties defined as Ethernet stability fixes in RK3328-based board dts(i) files is redundant, because that commit added the required fix to the RK3328 SoC dtsi, so let's delete them. It has been determined that the Ethernet stability fixes no longer require "snps,rxpbl", "snps,aal" and "snps,force_thresh_dma_mode" properties, [1][2] out of which the last two also induce performance penalties, so let's delete these properties from the relevant RK3328-based board dts(i) files. This commit completes the removal of these redundant "snps,*" DT properties that was started by a patch from Peter Geis. [3] [1] https://lore.kernel.org/linux-rockchip/CAMdYzYpj3d7Rq0O0QjV4r6HEf_e07R0QAhPT2NheZdQV3TnQ6g@mail.gmail.com/ [2] https://lore.kernel.org/linux-rockchip/CAMdYzYpnx=pHJ+oqshgfZFp=Mfqp3TcMmEForqJ+s9KuhkgnqA@mail.gmail.com/ [3] https://lore.kernel.org/linux-rockchip/20241210013010.81257-7-pgwipeout@gmail.com/ Cc: Peter Geis <pgwipeout@gmail.com> Acked-by: Peter Geis <pgwipeout@gmail.com> Signed-off-by: Dragan Simic <dsimic@manjaro.org> Link: https://lore.kernel.org/r/fe05ecccc9fe27a678ad3e700ea022429f659724.1733943615.git.dsimic@manjaro.org Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/rk3328-a1.dts | 1 - arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2.dtsi | 1 - arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dtsi | 1 - arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts | 3 --- arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 1 - 5 files changed, 7 deletions(-) commit e9cdd7d6cf2a5031a968dc21f4f566101b602150 Author: Sebastian Reichel <sebastian.reichel@collabora.com> Date: Wed Dec 11 17:58:54 2024 +0100 clk: rockchip: rk3588: drop RK3588_LINKED_CLK With the proper GATE_LINK support, we no longer need to keep the linked clocks always on. Thus it's time to drop the CLK_IS_CRITICAL flag for them. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20241211165957.94922-6-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> drivers/clk/rockchip/clk-rk3588.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit c62fa612cfa66ab58ab215e5afc95c43c613b513 Author: Sebastian Reichel <sebastian.reichel@collabora.com> Date: Wed Dec 11 17:58:53 2024 +0100 clk: rockchip: implement linked gate clock support Recent Rockchip SoCs have a new hardware block called Native Interface Unit (NIU), which gates clocks to devices behind them. These clock gates will only have a running output clock when all of the following conditions are met: 1. the parent clock is enabled 2. the enable bit is set correctly 3. the linked clock is enabled To handle them this code registers them as a normal gate type clock, which takes care of condition 1 + 2. The linked clock is handled by using runtime PM clocks. Handling it via runtime PM requires setting up a struct device for each of these clocks with a driver attached to use the correct runtime PM operations. Thus the complete handling of these clocks has been moved into its own driver. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20241211165957.94922-5-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-rk3588.c | 23 +---------- drivers/clk/rockchip/clk.c | 52 ++++++++++++++++++++++++ drivers/clk/rockchip/clk.h | 25 ++++++++++++ drivers/clk/rockchip/gate-link.c | 85 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 165 insertions(+), 21 deletions(-) commit fe0fb6675fa48cade97d8bcd46226479c4a704df Author: Sebastian Reichel <sebastian.reichel@collabora.com> Date: Wed Dec 11 17:58:52 2024 +0100 clk: rockchip: expose rockchip_clk_set_lookup Move rockchip_clk_add_lookup to clk.h, so that it can be used by sub-devices with their own driver. These might also have to do a lookup, so rename the function to rockchip_clk_set_lookup and add a matching rockchip_clk_get_lookup. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20241211165957.94922-4-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> drivers/clk/rockchip/clk.c | 14 ++++---------- drivers/clk/rockchip/clk.h | 12 ++++++++++++ 2 files changed, 16 insertions(+), 10 deletions(-) commit 33af96244a66f855baa43d424844bb437c79c30c Author: Sebastian Reichel <sebastian.reichel@collabora.com> Date: Wed Dec 11 17:58:51 2024 +0100 clk: rockchip: rk3588: register GATE_LINK later The proper GATE_LINK implementation will use runtime PM to handle the linked gate clocks, which requires device context. Currently all clocks are registered early via CLK_OF_DECLARE, which is before the kernel knows about devices. Moving the full clocks registration to the probe routine does not work, since the clocks needed for timers must be registered early. To work around this issue, most of the clock tree is registered early, but GATE_LINK clocks are handled in the probe routine. Since the resets are not needed early either, they have also been moved to the probe routine. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20241211165957.94922-3-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> drivers/clk/rockchip/clk-rk3588.c | 66 ++++++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 8 deletions(-) commit 9e89f02da718bc912f7f253b58804d4a52efed30 Author: Sebastian Reichel <sebastian.reichel@collabora.com> Date: Wed Dec 11 17:58:50 2024 +0100 clk: rockchip: support clocks registered late When some clocks are registered late and some clocks are registered early we need to make sure the late registered clocks report probe defer until the final registration has happened. But we do not want to keep reporting probe defer after the late registration has happened. Also not all Rockchip SoCs have late registered clocks and may not need to report probe defer at all. This restructures code a bit, so that there is a new function rockchip_clk_init_early(), which should be used for initializing the CRU structure on SoCs making use of late initialization in addition to the early init. These platforms should call rockchip_clk_finalize() once all clocks have been registered. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> [added EXPORT_SYMBOL_GPL(rockchip_clk_finalize) to match the early function] Link: https://lore.kernel.org/r/20241211165957.94922-2-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> drivers/clk/rockchip/clk.c | 36 ++++++++++++++++++++++++++++++++---- drivers/clk/rockchip/clk.h | 3 +++ 2 files changed, 35 insertions(+), 4 deletions(-) commit 11c668db098507207d55c5d6e04cc34a55288636 Merge: a3b3d2dc3895 eb721f117e7d Author: Paolo Abeni <pabeni@redhat.com> Date: Thu Jan 9 15:33:10 2025 +0100 Merge branch 'net-make-sure-we-retain-napi-ordering-on-netdev-napi_list' Jakub Kicinski says: ==================== net: make sure we retain NAPI ordering on netdev->napi_list I promised Eric to remove the rtnl protection of the NAPI list, when I sat down to implement it over the break I realized that the recently added NAPI ID retention will break the list ordering assumption we have in netlink dump. The ordering used to happen "naturally", because we'd always add NAPIs that the head of the list, and assign a new monotonically increasing ID. Before the first patch of this series we'd still only add at the head of the list but now the newly added NAPI may inherit from its config an ID lower than something else already on the list. The fix is in the first patch, the rest is netdevsim churn to test it. I'm posting this for net-next, because AFAICT the problem can't be triggered in net, given the very limited queue API adoption. v2: - [patch 2] allocate the array with kcalloc() instead of kvcalloc() - [patch 2] set GFP_KERNEL_ACCOUNT when allocating queues - [patch 6] don't null-check page pool before page_pool_destroy() - [patch 6] controled -> controlled - [patch 7] change mode to 0200 - [patch 7] reorder removal to be inverse of add - [patch 7] fix the spaces vs tabs v1: https://lore.kernel.org/20250103185954.1236510-1-kuba@kernel.org ==================== Link: https://patch.msgid.link/20250107160846.2223263-1-kuba@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com> commit eb721f117e7d43b561e81dd878c4acfa2de13ee2 Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Jan 7 08:08:46 2025 -0800 selftests: net: test listing NAPI vs queue resets Test listing netdevsim NAPIs before and after a single queue has been reset (and NAPIs re-added). Start from resetting the middle queue because edge cases (first / last) may actually be less likely to trigger bugs. # ./tools/testing/selftests/net/nl_netdev.py KTAP version 1 1..4 ok 1 nl_netdev.empty_check ok 2 nl_netdev.lo_check ok 3 nl_netdev.page_pool_check ok 4 nl_netdev.napi_list_check # Totals: pass:4 fail:0 xfail:0 xpass:0 skip:0 error:0 Reviewed-by: Willem de Bruijn <willemb@google.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> tools/testing/selftests/net/nl_netdev.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 6917d207b469ee81e6dc7f8ccca29c234a16916d Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Jan 7 08:08:45 2025 -0800 netdevsim: add debugfs-triggered queue reset Support triggering queue reset via debugfs for an upcoming test. Reviewed-by: Willem de Bruijn <willemb@google.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Mina Almasry <almasrymina@google.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/netdevsim/netdev.c | 55 +++++++++++++++++++++++++++++++++++++++ drivers/net/netdevsim/netdevsim.h | 1 + 2 files changed, 56 insertions(+) commit 5bc8e8dbef27b73bd7b6d1fd5108b4fd4c6d469f Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Jan 7 08:08:44 2025 -0800 netdevsim: add queue management API support Add queue management API support. We need a way to reset queues to test NAPI reordering, the queue management API provides a handy scaffolding for that. Reviewed-by: Willem de Bruijn <willemb@google.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Mina Almasry <almasrymina@google.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/netdevsim/netdev.c | 134 ++++++++++++++++++++++++++++++++++---- drivers/net/netdevsim/netdevsim.h | 2 + 2 files changed, 124 insertions(+), 12 deletions(-) commit a565dd04a120c03891b6fb504f342159b446f463 Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Jan 7 08:08:43 2025 -0800 netdevsim: add queue alloc/free helpers We'll need the code to allocate and free queues in the queue management API, factor it out. Reviewed-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/netdevsim/netdev.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) commit 915c82f842f955429e347a53ce005604ad421343 Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Jan 7 08:08:42 2025 -0800 netdevsim: allocate rqs individually Make nsim->rqs an array of pointers and allocate them individually so that we can swap them out one by one. Reviewed-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/netdevsim/netdev.c | 49 +++++++++++++++++++++++++-------------- drivers/net/netdevsim/netdevsim.h | 2 +- 2 files changed, 32 insertions(+), 19 deletions(-) commit 00adf88b186fa09a0b4005bdcf440aa2f926a75b Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Jan 7 08:08:41 2025 -0800 netdevsim: support NAPI config Link the NAPI instances to their configs. This will be needed to test that NAPI config doesn't break list ordering. Reviewed-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/netdevsim/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b7bdc7fab5703ddff677a82c1de7b3ac500974f Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Jan 7 08:08:40 2025 -0800 netdev: define NETDEV_INTERNAL Linus suggested during one of past maintainer summits (in context of a DMA_BUF discussion) that symbol namespaces can be used to prevent unwelcome but in-tree code from using all exported functions. Create a namespace for netdev. Export netdev_rx_queue_restart(), drivers may want to use it since it gives them a simple and safe way to restart a queue to apply config changes. But it's both too low level and too actively developed to be used outside netdev. Reviewed-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Documentation/networking/netdevices.rst | 10 ++++++++++ net/core/netdev_rx_queue.c | 1 + 2 files changed, 11 insertions(+) commit d6c7b03497eef8b66bf0b5572881359913e39787 Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Jan 7 08:08:39 2025 -0800 net: make sure we retain NAPI ordering on netdev->napi_list Netlink code depends on NAPI instances being sorted by ID on the netdev list for dump continuation. We need to be able to find the position on the list where we left off if dump does not fit in a single skb, and in the meantime NAPI instances can come and go. This was trivially true when we were assigning a new ID to every new NAPI instance. Since we added the NAPI config API, we try to retain the ID previously used for the same queue, but still add the new NAPI instance at the start of the list. This is fine if we reset the entire netdev and all NAPIs get removed and added back. If driver replaces a NAPI instance during an operation like DEVMEM queue reset, or recreates a subset of NAPI instances in other ways we may end up with broken ordering, and therefore Netlink dumps with either missing or duplicated entries. At this stage the problem is theoretical. Only two drivers support queue API, bnxt and gve. gve recreates NAPIs during queue reset, but it doesn't support NAPI config. bnxt supports NAPI config but doesn't recreate instances during reset. We need to save the ID in the config as soon as it is assigned because otherwise the new NAPI will not know what ID it will get at enable time, at the time it is being added. Reviewed-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/core/dev.c | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) commit 7e365c7e2cc587ac90c346a52156a6b08845d909 Author: James Bottomley <James.Bottomley@HansenPartnership.com> Date: Mon Jan 6 18:35:22 2025 -0800 efivarfs: make variable_is_present use dcache lookup Instead of searching the variable entry list for a variable, use the dcache lookup functions to find it instead. Also add an efivarfs_ prefix to the function now it is no longer static. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> fs/efivarfs/internal.h | 2 ++ fs/efivarfs/super.c | 29 +++++++++++++++++++++++++++++ fs/efivarfs/vars.c | 26 ++------------------------ 3 files changed, 33 insertions(+), 24 deletions(-) commit 1aba87f92d471222a89a5e7c27497489d37c67e1 Author: James Bottomley <James.Bottomley@HansenPartnership.com> Date: Mon Jan 6 18:35:21 2025 -0800 efivarfs: add helper to convert from UC16 name and GUID to utf8 name These will be used by a later patch to check for uniqueness on initial EFI variable iteration. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> fs/efivarfs/internal.h | 1 + fs/efivarfs/super.c | 17 +++-------------- fs/efivarfs/vars.c | 25 +++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 14 deletions(-) commit c57b6e1d8a5c133dd5f6293de262701a55d11335 Author: James Bottomley <James.Bottomley@HansenPartnership.com> Date: Mon Jan 6 18:35:20 2025 -0800 efivarfs: remove unused efi_variable.Attributes and efivar_entry.kobj These fields look to be remnants of older code: Attributes was likely meant to stash the variable attributes, but doesn't because we always read them from the variable store and kobj was likely left over from an older iteration of code where we manually created the objects instead of using a filesystem. [ ardb: these fields were used by the sysfs based 'efivars' precursor to efivarfs, which was removed in commit 0f5b2c69a4cb ("efi: vars: Remove deprecated 'efivars' sysfs interface") ] Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> fs/efivarfs/internal.h | 2 -- fs/efivarfs/super.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit dd2395162c07e4102fc83878dc394ff63f2eaae8 Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Thu Jan 9 00:14:41 2025 +0000 ASoC: remove disable_route_checks No driver is using disable_route_checks, let's remove it. Because snd_soc_dapm_add_routes() itself will indicate detail error when failed, this patch removes duplicate dev_err() not only dev_warn() in error case. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Suggested-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Tested-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/87tta8268e.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> include/sound/soc.h | 1 - sound/soc/soc-core.c | 29 ++++------------------------- sound/soc/soc-topology.c | 12 ++---------- 3 files changed, 6 insertions(+), 36 deletions(-) commit 61aff2da3e63a43f22e60aa1bc57026ce07d189e Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Thu Jan 9 00:14:34 2025 +0000 ASoC: intel: remove disable_route_checks It sets disable_route_checks flag after checking that parent driver isn't SOF, but skylake driver was removed, so it is dead code. We can remove last user of disable_route_checks. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Suggested-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Tested-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/87v7uo268m.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/boards/skl_hda_dsp_generic.c | 2 -- 1 file changed, 2 deletions(-) commit 601731fc7c6111bbca49ce3c9499c2e4d426079d Author: Florian Westphal <fw@strlen.de> Date: Fri Nov 15 14:46:09 2024 +0100 netfilter: conntrack: add conntrack event timestamp Nadia Pinaeva writes: I am working on a tool that allows collecting network performance metrics by using conntrack events. Start time of a conntrack entry is used to evaluate seen_reply latency, therefore the sooner it is timestamped, the better the precision is. In particular, when using this tool to compare the performance of the same feature implemented using iptables/nftables/OVS it is crucial to have the entry timestamped earlier to see any difference. At this time, conntrack events can only get timestamped at recv time in userspace, so there can be some delay between the event being generated and the userspace process consuming the message. There is sys/net/netfilter/nf_conntrack_timestamp, which adds a 64bit timestamp (ns resolution) that records start and stop times, but its not suited for this either, start time is the 'hashtable insertion time', not 'conntrack allocation time'. There is concern that moving the start-time moment to conntrack allocation will add overhead in case of flooding, where conntrack entries are allocated and released right away without getting inserted into the hashtable. Also, even if this was changed it would not with events other than new (start time) and destroy (stop time). Pablo suggested to add new CTA_TIMESTAMP_EVENT, this adds this feature. The timestamp is recorded in case both events are requested and the sys/net/netfilter/nf_conntrack_timestamp toggle is enabled. Reported-by: Nadia Pinaeva <n.m.pinaeva@gmail.com> Suggested-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> include/net/netfilter/nf_conntrack_ecache.h | 12 +++++++++++ include/uapi/linux/netfilter/nfnetlink_conntrack.h | 1 + net/netfilter/nf_conntrack_ecache.c | 23 ++++++++++++++++++++ net/netfilter/nf_conntrack_netlink.c | 25 ++++++++++++++++++++++ 4 files changed, 61 insertions(+) commit 74d4d7c64d89aaf3e08aa06a6967dbc540b72c06 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Sat Jan 4 15:19:58 2025 +0100 soc/tegra: cbb: Drop unnecessary debugfs error handling Kernel coding style expects all drivers to ignore debugfs errors. Partially because it is purely for debugging, not for important user interfaces. Simplify the code by dropping unnecessary probe failuring and error message on debugfs failures, which also fixes incorrect usage IS_ERR_OR_NULL() and Smatch warning: drivers/soc/tegra/cbb/tegra-cbb.c:80 tegra_cbb_err_debugfs_init() warn: passing zero to 'PTR_ERR' Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250104141958.115911-1-krzysztof.kozlowski@linaro.org Signed-off-by: Thierry Reding <treding@nvidia.com> drivers/soc/tegra/cbb/tegra-cbb.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit a5e6fc0a10fe280989f1367a3b4f8047c7d00ea6 Author: Sumit Gupta <sumitg@nvidia.com> Date: Wed Dec 18 00:07:37 2024 +0000 arm64: tegra: Disable Tegra234 sce-fabric node Access to safety cluster engine (SCE) fabric registers was blocked by firewall after the introduction of Functional Safety Island in Tegra234. After that, any access by software to SCE registers is correctly resulting in the internal bus error. However, when CPUs try accessing the SCE-fabric registers to print error info, another firewall error occurs as the fabric registers are also firewall protected. This results in a second error to be printed. Disable the SCE fabric node to avoid printing the misleading error. The first error info will be printed by the interrupt from the fabric causing the actual access. Cc: stable@vger.kernel.org Fixes: 302e154000ec ("arm64: tegra: Add node for CBB 2.0 on Tegra234") Signed-off-by: Sumit Gupta <sumitg@nvidia.com> Signed-off-by: Ivy Huang <yijuh@nvidia.com> Reviewed-by: Brad Griffis <bgriffis@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Link: https://lore.kernel.org/r/20241218000737.1789569-3-yijuh@nvidia.com Signed-off-by: Thierry Reding <treding@nvidia.com> arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 604120fd9e9df50ee0e803d3c6e77a1f45d2c58e Author: Sumit Gupta <sumitg@nvidia.com> Date: Wed Dec 18 00:07:36 2024 +0000 arm64: tegra: Fix typo in Tegra234 dce-fabric compatible The compatible string for the Tegra DCE fabric is currently defined as 'nvidia,tegra234-sce-fabric' but this is incorrect because this is the compatible string for SCE fabric. Update the compatible for the DCE fabric to correct the compatible string. This compatible needs to be correct in order for the interconnect to catch things such as improper data accesses. Cc: stable@vger.kernel.org Fixes: 302e154000ec ("arm64: tegra: Add node for CBB 2.0 on Tegra234") Signed-off-by: Sumit Gupta <sumitg@nvidia.com> Signed-off-by: Ivy Huang <yijuh@nvidia.com> Reviewed-by: Brad Griffis <bgriffis@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Link: https://lore.kernel.org/r/20241218000737.1789569-2-yijuh@nvidia.com Signed-off-by: Thierry Reding <treding@nvidia.com> arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 346bf459db26325c09ed841fdfd6678de1b1cb3a Author: Akhil R <akhilrajeev@nvidia.com> Date: Fri Dec 6 16:22:00 2024 +0530 arm64: tegra: Fix DMA ID for SPI2 DMA ID for SPI2 is '16'. Update the incorrect value in the devicetree. Fixes: bb9667d8187b ("arm64: tegra: Add SPI device tree nodes for Tegra234") Signed-off-by: Akhil R <akhilrajeev@nvidia.com> Link: https://lore.kernel.org/r/20241206105201.53596-1-akhilrajeev@nvidia.com Signed-off-by: Thierry Reding <treding@nvidia.com> arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03b3e82a78c32c7e4542c33fcd863028cddd9331 Author: Alexander Gordeev <agordeev@linux.ibm.com> Date: Tue Jan 7 08:40:06 2025 +0100 s390/tlb: Add missing TLB range adjustment While converting to generic mmu_gather with commit 9de7d833e370 ("s390/tlb: Convert to generic mmu_gather") __tlb_adjust_range() is called from pte|pmd|p4d_free_tlb(), but not for pud_free_tlb(). __tlb_adjust_range() adjusts the span of TLB range to be flushed, but s390 does not make use of it. Thus, this change is only for consistency. Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/tlb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f0572fa8fd6758f7a0ed2e96b429cb5b4323e12 Author: Nitin Gote <nitin.r.gote@intel.com> Date: Fri Jan 3 11:56:51 2025 +0530 drm/i915/gt: Prefer IS_ENABLED() instead of defined() on config option Use IS_ENABLED() instead of defined() for checking whether a kconfig option is enabled. Signed-off-by: Nitin Gote <nitin.r.gote@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250103062651.798249-2-nitin.r.gote@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3b3d2dc389568a77d0e25da17203e3616218e93 Author: Eric Dumazet <edumazet@google.com> Date: Tue Jan 7 14:47:01 2025 +0000 net: hsr: remove synchronize_rcu() from hsr_add_port() A synchronize_rcu() was added by mistake in commit c5a759117210 ("net/hsr: Use list_head (and rcu) instead of array for slave devices.") RCU does not mandate to observe a grace period after list_add_tail_rcu(). Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250107144701.503884-1-edumazet@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/hsr/hsr_slave.c | 1 - 1 file changed, 1 deletion(-) commit 2170a1f091486c2b5726a43c97a7d4b72073811c Author: Eric Dumazet <edumazet@google.com> Date: Tue Jan 7 14:43:42 2025 +0000 net: no longer reset transport_header in __netif_receive_skb_core() In commit 66e4c8d95008 ("net: warn if transport header was not set") I added a debug check in skb_transport_header() to detect if a caller expects the transport_header to be set to a meaningful value by a prior code path. Unfortunately, __netif_receive_skb_core() resets the transport header to the same value than the network header, defeating this check in receive paths. Pretending the transport and network headers are the same is usually wrong. This patch removes this reset for CONFIG_DEBUG_NET=y builds to let fuzzers and CI find bugs. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250107144342.499759-1-edumazet@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/core/dev.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0b12850ddfb0032376ef1be10b5b46be00bba4d4 Author: Cezary Rojewski <cezary.rojewski@intel.com> Date: Thu Jan 9 13:22:16 2025 +0100 ASoC: Intel: avs: Add missing includes The debugfs file utilizes string helpers such as parse_int_array_user() yet does not include the header. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-14-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/avs/debugfs.c | 1 + 1 file changed, 1 insertion(+) commit ef724707788325a53ffa4cf58fceb94654e4793a Author: Cezary Rojewski <cezary.rojewski@intel.com> Date: Thu Jan 9 13:22:15 2025 +0100 ASoC: Intel: avs: Adjust IPC traces The firmware status and the firmware error registers are 4-bytes wide. Update trace macros and their usage to reflect that. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-13-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/avs/ipc.c | 25 +++++++++++++++---------- sound/soc/intel/avs/trace.h | 38 ++++++++++++++++++++------------------ 2 files changed, 35 insertions(+), 28 deletions(-) commit 3eede0fc99c684df6f3f35866761036dabf89d05 Author: Cezary Rojewski <cezary.rojewski@intel.com> Date: Thu Jan 9 13:22:14 2025 +0100 ASoC: Intel: avs: Adjust DSP status register names Both status and error are "codes". Update the wording to make code cohesive. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-12-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/avs/loader.c | 12 ++++++------ sound/soc/intel/avs/registers.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit aea305d28551bc213aab3a41a0f59412247ae2b4 Author: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Date: Thu Jan 9 13:22:13 2025 +0100 ASoC: Intel: avs: Update ASRC definition To support ASRC for playback streams, update its descriptor. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-11-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/avs/messages.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 480d9bb9cfb7b774b22cf82ff21903eb50d64cb9 Author: Cezary Rojewski <cezary.rojewski@intel.com> Date: Thu Jan 9 13:22:12 2025 +0100 ASoC: Intel: avs: Improve logging of firmware loading Crucial debug information regarding the ROM/firmware status and last known error code is missing in the code loading functions. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/avs/loader.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 0ca529926c5d9d0a3c0b1609fb7034ab870e4770 Author: Cezary Rojewski <cezary.rojewski@intel.com> Date: Thu Jan 9 13:22:11 2025 +0100 ASoC: Intel: avs: Clearly state assumptions of hw_params() There are no NULL-checks for fe/be_hw_params as there is an implicit assumption that framework opens valid DPCMs only. State that clearly. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/avs/pcm.c | 2 ++ 1 file changed, 2 insertions(+) commit 94aa347d34e079859a5378272c9452c728e4183a Author: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Date: Thu Jan 9 13:22:10 2025 +0100 ASoC: Intel: avs: Add MODULE_FIRMWARE to inform about FW MODULE_FIRMWARE macro adds hint to module information about which FW is expected to be present on file system. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/avs/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 33228036ff655ebed1bc4bde9c9b6329b569b27b Author: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Date: Thu Jan 9 13:22:09 2025 +0100 ASoC: Intel: avs: Print IPC error messages in lower layer It is preferred to send error message in handler itself instead of leaving it to caller. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/avs/loader.c | 8 ++------ sound/soc/intel/avs/messages.c | 22 ++++++++++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) commit e3146775f05d18c667a2e26082da3ac105f87d9f Author: Cezary Rojewski <cezary.rojewski@intel.com> Date: Thu Jan 9 13:22:08 2025 +0100 ASoC: Intel: avs: Update hda component teardown sequences If case of failure cleanup recently created DAI and while at it, adjust the remove() operation to match operation order of the probe() function. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/avs/pcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e9ca3db9f01a7ce91ceab35cd5fa52f0c5aca174 Author: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Date: Thu Jan 9 13:22:07 2025 +0100 ASoC: Intel: avs: Fix init-config parsing When parsing init configs correct token should be looked up. Fixes: 1b4217ebbb3e ("ASoC: Intel: avs: Add topology parsing support for initial config") Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/avs/topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cf4d74256fe103ece7b2647550e6c063048e5682 Author: Cezary Rojewski <cezary.rojewski@intel.com> Date: Thu Jan 9 13:22:06 2025 +0100 ASoC: Intel: avs: Fix theoretical infinite loop While 'stack_dump_size' is a u32 bitfield of 16 bits, u32 has a bigger upper bound than the type u16 of loop counter 'offset' what in theory may lead to infinite loop condition. Found out by Coverity static analyzer. Fixes: c8c960c10971 ("ASoC: Intel: avs: APL-based platforms support") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/avs/apl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbda5c35b88794f6e5efe1b5b20044b0b3a340d4 Author: Cezary Rojewski <cezary.rojewski@intel.com> Date: Thu Jan 9 13:22:05 2025 +0100 ASoC: Intel: avs: Fix the minimum firmware version numbers For few TGL-based platforms the minor version number for AudioDSP firmware is incorrect forcing users to utilize ignore_fw_version module parameter. Fixes: 5acb19ecd198 ("ASoC: Intel: avs: TGL-based platforms support") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/avs/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit bca0fa5f6b5e96c03daac1ed62b1e5c5057a2048 Author: Cezary Rojewski <cezary.rojewski@intel.com> Date: Thu Jan 9 13:22:04 2025 +0100 ASoC: Intel: avs: Do not readq() u32 registers Register reporting ROM status is 4-bytes wide. Fixes: 092cf7b26a48 ("ASoC: Intel: avs: Code loading over HDA") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/avs/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d8c354a56e9f6b420ad8eeee6db5c0d1b0ccc78 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Tue Jan 7 13:56:13 2025 +0100 dt-bindings: net: 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 <krzysztof.kozlowski@linaro.org> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> # for net/can Reviewed-by: Roger Quadros <rogerq@kernel.org> # for ti,k3-am654-* Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> # net/brcm,* Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://patch.msgid.link/20250107125613.211478-1-krzysztof.kozlowski@linaro.org Signed-off-by: Paolo Abeni <pabeni@redhat.com> .../bindings/net/amlogic,meson-dwmac.yaml | 14 ++-- .../devicetree/bindings/net/asix,ax88178.yaml | 4 +- .../devicetree/bindings/net/brcm,bcmgenet.yaml | 32 ++++---- .../bindings/net/brcm,mdio-mux-iproc.yaml | 50 ++++++------ .../devicetree/bindings/net/can/bosch,c_can.yaml | 10 +-- .../bindings/net/can/microchip,mcp2510.yaml | 18 ++--- .../devicetree/bindings/net/stm32-dwmac.yaml | 94 +++++++++++----------- .../devicetree/bindings/net/ti,davinci-mdio.yaml | 10 +-- .../bindings/net/ti,k3-am654-cpsw-nuss.yaml | 20 ++--- .../devicetree/bindings/net/ti,k3-am654-cpts.yaml | 38 ++++----- .../bindings/net/wireless/marvell,sd8787.yaml | 19 +++-- 11 files changed, 154 insertions(+), 155 deletions(-) commit 5e56618e1593a9eb9d72dc9433ac7a02a6c48c8f Author: Alexander Dahl <ada@thorsis.com> Date: Thu Jan 9 10:48:43 2025 +0100 spi: atmel-quadspi: Update to current device naming terminology For v6.9 the spi subsystem changed the terminology to host and target devices, see commit 99769a52464d ("spi: Update the "master/slave" terminology in documentation") for reference. Support for SAMA7G5 was forward ported recently from an old vendor branch before that terminology change, so naming for the new struct member is adapted to follow the current scheme. Signed-off-by: Alexander Dahl <ada@thorsis.com> Link: https://patch.msgid.link/20250109094843.36014-1-ada@thorsis.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/atmel-quadspi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 636ee5781d259258dc9425a5552be1ffa458633c Author: Christophe Leroy <christophe.leroy@csgroup.eu> Date: Thu Jan 9 07:51:45 2025 +0100 spi: fsl-spi: Remove display of virtual address The following appears in kernel log at boot: fsl_spi b01004c0.spi: at 0x(ptrval) (irq = 51), QE mode This is useless, so remove the display of that virtual address and display the MMIO address instead, just like serial core does. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Link: https://patch.msgid.link/8a37a960ff084dfdb9233849c00714e9317ae6a5.1736405336.git.christophe.leroy@csgroup.eu Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-fsl-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33d97a07b3ae6fa713919de4e1864ca04fff8f80 Author: Yuyang Huang <yuyanghuang@google.com> Date: Tue Jan 7 20:43:55 2025 +0900 netlink: add IPv6 anycast join/leave notifications This change introduces a mechanism for notifying userspace applications about changes to IPv6 anycast addresses via netlink. It includes: * Addition and deletion of IPv6 anycast addresses are reported using RTM_NEWANYCAST and RTM_DELANYCAST. * A new netlink group (RTNLGRP_IPV6_ACADDR) for subscribing to these notifications. This enables user space applications(e.g. ip monitor) to efficiently track anycast addresses through netlink messages, improving metrics collection and system monitoring. It also unlocks the potential for advanced anycast management in user space, such as hardware offload control and fine grained network control. Cc: Maciej Żenczykowski <maze@google.com> Cc: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: Yuyang Huang <yuyanghuang@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://patch.msgid.link/20250107114355.1766086-1-yuyanghuang@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> include/net/addrconf.h | 3 +++ include/uapi/linux/rtnetlink.h | 8 +++++++- net/ipv6/addrconf.c | 6 +++--- net/ipv6/anycast.c | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 4 deletions(-) commit 1d334211aa60560cdc3995b183e601c44cf722b5 Author: Kurt Borja <kuurtb@gmail.com> Date: Sun Jan 5 10:30:04 2025 -0500 platform/x86: alienware-wmi: Improve hdmi_mux, amplifier and deepslp group creation Devices with hdmi_mux, amplifier or deepslp quirks create a sysfs group for each available feature. To accomplish this, helper create/remove functions were called on module init, but they had the following problems: - Create helpers called remove helpers on failure, which in turn tried to remove the sysfs group that failed to be created - If group creation failed mid way, previous successfully created groups were not cleaned up - Module exit only removed hdmi_mux group To improve this, drop all helpers and let the platform driver manage these sysfs groups, while controlling visibility with their respective quirks. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Kurt Borja <kuurtb@gmail.com> Link: https://lore.kernel.org/r/20250105153019.19206-6-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/dell/alienware-wmi.c | 114 ++++++++++-------------------- 1 file changed, 38 insertions(+), 76 deletions(-) commit f3f6728766c3f3695dea5d63ec60bdd516c2ace8 Author: Kurt Borja <kuurtb@gmail.com> Date: Sun Jan 5 10:30:03 2025 -0500 platform/x86: alienware-wmi: Modify parse_rgb() signature parse_rgb() now takes struct color_platform instead of struct platform_zone to support upcoming refactor. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Signed-off-by: Kurt Borja <kuurtb@gmail.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20250105153019.19206-5-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/dell/alienware-wmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 99675d25dc82479f513be9dffc98badd2954e0fb Author: Kurt Borja <kuurtb@gmail.com> Date: Sun Jan 5 10:30:02 2025 -0500 platform/x86: alienware-wmi: Move Lighting Control State Place Lighting Control State logic next to other attributes of the same sysfs group. While at it, rename: store_control_state() -> lighting_control_state_store() show_control_state() -> lighting_control_state_show() Replace DEVICE_ATTR() with DEVICE_ATTR_RW() and do a general style cleanup. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Signed-off-by: Kurt Borja <kuurtb@gmail.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20250105153019.19206-4-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/dell/alienware-wmi.c | 74 ++++++++++++++++--------------- 1 file changed, 39 insertions(+), 35 deletions(-) commit 2d0a368c34c0676657aaedd3aa641f3e5bf54e3a Author: Kurt Borja <kuurtb@gmail.com> Date: Sun Jan 5 10:30:01 2025 -0500 platform/x86: alienware-wmi: Remove unnecessary check at module exit Module initialization fails if platform device fails to register so it's always not NULL at exit. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Kurt Borja <kuurtb@gmail.com> Link: https://lore.kernel.org/r/20250105153019.19206-3-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/dell/alienware-wmi.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit c85b516b44d21e9cf751c4f73a6c235ed170d887 Author: Armin Wolf <W_Armin@gmx.de> Date: Tue Jan 7 18:56:52 2025 +0100 platform/x86: acer-wmi: Add support for Acer Predator PH16-72 Add the Acer Predator PT16-72 to acer_quirks to provide support for the turbo button and predator_v4 interfaces. Tested-by: Eric Johnsten <ejohnsten@gmail.com> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20250107175652.3171-1-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/acer-wmi.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 6af39604c788d9df0ca697bab603202cf74c1a8c Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Jan 4 00:05:14 2025 +0100 platform/x86: firmware_attributes_class: Drop lifecycle functions There are no users left. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Link: https://lore.kernel.org/r/20250104-firmware-attributes-simplify-v1-6-949f9709e405@weissschuh.net Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/firmware_attributes_class.c | 13 ------------- drivers/platform/x86/firmware_attributes_class.h | 2 -- 2 files changed, 15 deletions(-) commit 501d2f0e78951b9a933bbff73404b25aec45f389 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Jan 4 00:05:13 2025 +0100 platform/x86: dell-sysman: Directly use firmware_attributes_class The usage of the lifecycle functions is not necessary anymore. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Link: https://lore.kernel.org/r/20250104-firmware-attributes-simplify-v1-5-949f9709e405@weissschuh.net Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 63f8c058036057644f095123a35895cd11639b88 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Jan 4 00:05:12 2025 +0100 platform/x86: hp-bioscfg: Directly use firmware_attributes_class The usage of the lifecycle functions is not necessary anymore. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Link: https://lore.kernel.org/r/20250104-firmware-attributes-simplify-v1-4-949f9709e405@weissschuh.net Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/hp/hp-bioscfg/bioscfg.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 55922403807a12d4f96c67ba01a920edfb6f2633 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Jan 4 00:05:11 2025 +0100 platform/x86: think-lmi: Directly use firmware_attributes_class The usage of the lifecycle functions is not necessary anymore. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Link: https://lore.kernel.org/r/20250104-firmware-attributes-simplify-v1-3-949f9709e405@weissschuh.net Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/think-lmi.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit d03cfde56f5cf9ec50b4cf099a42bf056fc80ddd Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Jan 4 00:05:10 2025 +0100 platform/x86: firmware_attributes_class: Simplify API The module core already guarantees that a module can only be unloaded after all other modules using its symbols have been unloaded. As it's already the responsibility of the drivers using firmware_attributes_class to clean up their devices before unloading, the lifetime of the firmware_attributes_class can be bound to the lifetime of the module. This enables the direct usage of firmware_attributes_class from the drivers, without having to go through the lifecycle functions, leading to simplifications for both the subsystem and its users. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Link: https://lore.kernel.org/r/20250104-firmware-attributes-simplify-v1-2-949f9709e405@weissschuh.net Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/firmware_attributes_class.c | 40 +++++++++--------------- drivers/platform/x86/firmware_attributes_class.h | 1 + 2 files changed, 15 insertions(+), 26 deletions(-) commit d0eee1be379204d2ee6cdb09bd98b3fd0165b6d3 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Jan 4 00:05:09 2025 +0100 platform/x86: firmware_attributes_class: Move include linux/device/class.h The header firmware_attributes_class.h uses 'struct class'. It should also include the necessary dependency header. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Link: https://lore.kernel.org/r/20250104-firmware-attributes-simplify-v1-1-949f9709e405@weissschuh.net Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/firmware_attributes_class.c | 1 - drivers/platform/x86/firmware_attributes_class.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) commit 053c409951db96ca3043e568572b940a99d2464f Author: Nitin Joshi <nitjoshi@gmail.com> Date: Tue Jan 7 11:15:07 2025 +0900 platform/x86: thinkpad-acpi: replace strcpy with strscpy strcpy() performs no bounds checking on the destination buffer. This could result in linear overflows beyond the end of the buffer, leading to all kinds of misbehaviors.[1] [1]: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy Signed-off-by: Nitin Joshi <nitjoshi@gmail.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Link: https://lore.kernel.org/r/20250107021507.4786-1-nitjoshi@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/thinkpad_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 595c4b67249330bed1c936f6e2c8e8784f9f08ca Merge: 98e45f0d7b99 600c8f24319c Author: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Date: Thu Jan 9 13:39:19 2025 +0200 Merge branch 'intel-sst' of https://github.com/spandruvada/linux-kernel into review-ilpo-next commit 98e45f0d7b99ceac029913ce3a161154a8c4c4a7 Author: Hridesh MG <hridesh699@gmail.com> Date: Wed Jan 1 14:57:29 2025 +0530 docs: platform/x86: wmi: mention tool for invoking WMI methods Add a reference to WMIExplorer, a tool useful for inspecting and invoking WMI methods on Windows. This can assist developers in testing and understanding WMI device functionality when porting drivers to Linux. Signed-off-by: Hridesh MG <hridesh699@gmail.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20250101092730.87160-1-hridesh699@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Documentation/wmi/driver-development-guide.rst | 4 ++++ 1 file changed, 4 insertions(+) commit b246bd32a34c1b0d80670e60e4e4102be6366191 Author: Andre Przywara <andre.przywara@arm.com> Date: Wed Jan 8 16:43:59 2025 +0000 Revert "mfd: axp20x: Allow multiple regulators" As Chris and Vasily reported, the attempt to support multiple AXP PMICs in one system [1] breaks some of the battery and charging functionality on devices with AXP PMICs. The reason is that the drivers now fail to get the correct IIO channel for the ADC component, as the current code seems to rely on the zero-based enumeration of the regulator devices. A fix is possible, but not trivial, as it requires some rework in the AXP MFD driver, which cannot be fully reviewed or tested in time for the 6.13 release. So revert this patch for now, to avoid regressions on battery powered devices. This patch was really only necessary for devices with two PMICs, support for which is not mainline yet anyway, so we don't lose any functionality. This reverts commit e37ec32188701efa01455b9be42a392adab06ce4. [1] https://lore.kernel.org/linux-sunxi/20241007001408.27249-4-andre.przywara@arm.com/ Reported-by: Chris Morgan <macroalpha82@gmail.com> Closes: https://lore.kernel.org/linux-sunxi/675489c1.050a0220.8d73f.6e90@mx.google.com/ Reported-by: Vasily Khoruzhick <anarsoul@gmail.com> Closes: https://lore.kernel.org/linux-sunxi/CA+E=qVf8_9gn0y=mcdKXvj2PFoHT2eF+JN=CmtTNdRGaSnpgKg@mail.gmail.com/ Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20250108164359.2609078-1-andre.przywara@arm.com Signed-off-by: Lee Jones <lee@kernel.org> drivers/mfd/axp20x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cce179c655dad321882110d93210f389add9fd2f Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Date: Tue Dec 17 20:46:27 2024 +0530 platform/x86/amd/pmf: Get SRA sensor data from AMD SFH driver The AMD SFH driver includes APIs to export SRA sensor data. This data is utilized by the AMD PMF driver to transmit SRA data to the PMF TA, enabling the AMD PMF driver to implement the output actions specified by the PMF TA. Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com> Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Jiri Kosina <jkosina@suse.com> Link: https://lore.kernel.org/r/20241217151627.757477-3-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/amd/pmf/pmf.h | 18 +++++++++++++- drivers/platform/x86/amd/pmf/spc.c | 51 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) commit d1c444b47100d81a4b8c84aa3ac1c8159c22066a Author: Basavaraj Natikar <basavaraj.natikar@amd.com> Date: Tue Dec 17 20:46:26 2024 +0530 HID: amd_sfh: Add support to export device operating states Add support to export device operating states, such as laptop placement, platform types and propagate this data to AMD PMF driver for use in actions. To retrieve the device operating states data, SRA sensor support need to be enabled in AMD SFH driver. So add support to enable the SRA sensor. Also, remove explicit assignments to sensor_index enum. Co-developed-by: Akshata MukundShetty <akshata.mukundshetty@amd.com> Signed-off-by: Akshata MukundShetty <akshata.mukundshetty@amd.com> Signed-off-by: Basavaraj Natikar <basavaraj.natikar@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Jiri Kosina <jkosina@suse.com> Link: https://lore.kernel.org/r/20241217151627.757477-2-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/hid/amd-sfh-hid/amd_sfh_common.h | 1 + drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c | 22 +++++++++++++ drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c | 38 ++++++++++++++++++++++ drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.h | 24 ++++++++++++-- include/linux/amd-pmf-io.h | 15 +++++++++ 5 files changed, 98 insertions(+), 2 deletions(-) commit e61e6c415ba9ff2b32bb6780ce1b17d1d76238f1 Author: Vadim Fedorenko <vadim.fedorenko@linux.dev> Date: Tue Jan 7 02:48:12 2025 -0800 net/mlx5: use do_aux_work for PHC overflow checks The overflow_work is using system wq to do overflow checks and updates for PHC device timecounter, which might be overhelmed by other tasks. But there is dedicated kthread in PTP subsystem designed for such things. This patch changes the work queue to proper align with PTP subsystem and to avoid overloading system work queue. The adjfine() function acts the same way as overflow check worker, we can postpone ptp aux worker till the next overflow period after adjfine() was called. Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Vadim Fedorenko <vadfed@meta.com> Acked-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250107104812.380225-1-vadfed@meta.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> .../net/ethernet/mellanox/mlx5/core/lib/clock.c | 24 ++++++++++++---------- include/linux/mlx5/driver.h | 1 - 2 files changed, 13 insertions(+), 12 deletions(-) commit 5640fd07b90ed43225704fecfbbda9d402dba1cf Merge: a38509fd5cdc 9d89551994a4 Author: Mark Brown <broonie@kernel.org> Date: Thu Jan 9 11:22:28 2025 +0000 spi: Merge up v6.13-rc6 This fixes the i.MX6 and newer Meson platforms in my CI. commit e62de01008bd6581788aa155ada043cba0261332 Author: Furong Xu <0x1207@gmail.com> Date: Tue Jan 7 15:54:48 2025 +0800 net: stmmac: Unexport stmmac_rx_offset() from stmmac.h stmmac_rx_offset() is referenced in stmmac_main.c only, let's move it to stmmac_main.c. Drop the inline keyword by the way, it is better to let the compiler to decide. Compile tested only. No functional change intended. Signed-off-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20250107075448.4039925-1-0x1207@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/ethernet/stmicro/stmmac/stmmac.h | 8 -------- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) commit aba4f736fc5553b936808ccdfd3ce21ee3ec7ae0 Author: Kever Yang <kever.yang@rock-chips.com> Date: Tue Dec 24 17:49:18 2024 +0800 dt-bindings: mfd: syscon: Add rk3562 QoS register compatible Document rk3562 compatible for QoS registers. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Link: https://lore.kernel.org/r/20241224094920.3821861-16-kever.yang@rock-chips.com Signed-off-by: Lee Jones <lee@kernel.org> Documentation/devicetree/bindings/mfd/syscon.yaml | 2 ++ 1 file changed, 2 insertions(+) commit ba5095ebbc7a83965ac049a50fa493d7c751f19b Author: Rob Herring (Arm) <robh@kernel.org> Date: Tue Dec 17 12:11:42 2024 -0600 mfd: syscon: Allow syscon nodes without a "syscon" compatible of_syscon_register_regmap() was added for nodes which need a custom regmap setup. It's not really correct for those nodes to claim they are compatible with "syscon" as the default handling likely doesn't work in those cases. If device_node_get_regmap() happens to be called first, then of_syscon_register() will be called and an incorrect regmap will be created (barring some other error). That may lead to unknown results in the worst case. In the best case, of_syscon_register_regmap() will fail with -EEXIST. This problem remains unless these cases drop "syscon" (an ABI issue) or we exclude them using their specific compatible. ATM, there is only one user: "google,gs101-pmu" There are also cases of adding "syscon" compatible to existing nodes after the fact in order to register the syscon. That presents a potential DT ABI problem. Instead, if there's a kernel change needing a syscon for a node, then it should be possible to allow the kernel to register a syscon without a DT change. That's only possible by using of_syscon_register_regmap() currently, but in the future we may want to support a match list for cases which don't need a custom regmap. With this change, the lookup functions will succeed for any node registered by of_syscon_register_regmap() regardless of whether the node compatible contains "syscon". Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Tested-by: Will McVicker <willmcvicker@google.com> Reviewed-by: Pankaj Dubey <pankaj.dubey@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241217-syscon-fixes-v2-3-4f56d750541d@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> drivers/mfd/syscon.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 26769582bf353ae613f5113a1414ff3a80e08264 Author: Rob Herring (Arm) <robh@kernel.org> Date: Tue Dec 17 12:11:41 2024 -0600 mfd: syscon: Remove the platform driver support The platform driver is dead code. It is not used by DT platforms since commit bdb0066df96e ("mfd: syscon: Decouple syscon interface from platform devices") which said: For non-DT based platforms, this patch keeps syscon platform driver structure so that syscon can be probed and such non-DT based drivers can use syscon_regmap_lookup_by_pdev API and access regmap handles. Once all users of "syscon_regmap_lookup_by_pdev" migrated to DT based, we can completely remove platform driver of syscon, and keep only helper functions to get regmap handles. The last user of syscon_regmap_lookup_by_pdevname() was removed in 2018. syscon_regmap_lookup_by_pdevname() was then removed in 2019, but that commit failed to remove the rest of the platform driver. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Tested-by: Will McVicker <willmcvicker@google.com> Acked-by: Liviu Dudau <liviu.dudau@arm.com> Reviewed-by: Pankaj Dubey <pankaj.dubey@samsung.com> Tested-by: Pankaj Dubey <pankaj.dubey@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241217-syscon-fixes-v2-2-4f56d750541d@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> drivers/mfd/syscon.c | 66 ------------------------------------ drivers/mfd/vexpress-sysreg.c | 1 - include/linux/platform_data/syscon.h | 9 ----- 3 files changed, 76 deletions(-) commit 805f7aaf7fee14a57b56af01d270edf6c10765e8 Author: Rob Herring (Arm) <robh@kernel.org> Date: Tue Dec 17 12:11:40 2024 -0600 mfd: syscon: Fix race in device_node_get_regmap() It is possible for multiple, simultaneous callers calling device_node_get_regmap() with the same node to fail to find an entry in the syscon_list. There is a period of time while the first caller is calling of_syscon_register() that subsequent callers also fail to find an entry in the syscon_list and then call of_syscon_register() a second time. Fix this by keeping the lock held until after of_syscon_register() completes and adds the node to syscon_list. Convert the spinlock to a mutex as many of the functions called in of_syscon_register() such as kzalloc() and of_clk_get() may sleep. Fixes: bdb0066df96e ("mfd: syscon: Decouple syscon interface from platform devices") Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Tested-by: Will McVicker <willmcvicker@google.com> Tested-by: Pankaj Dubey <pankaj.dubey@samsung.com> Reviewed-by: Pankaj Dubey <pankaj.dubey@samsung.com> Link: https://lore.kernel.org/r/20241217-syscon-fixes-v2-1-4f56d750541d@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> drivers/mfd/syscon.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit daefd7fbd544671ad0b9c2a815d7f5e3d2f0365c Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 22 21:04:50 2024 +0100 leds: triggers: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241222-sysfs-const-bin_attr-led-v1-1-ecc5212a31fa@weissschuh.net Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/led-class.c | 6 +++--- drivers/leds/led-triggers.c | 4 ++-- drivers/leds/leds.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit b11bff90f2ad52c5c55c822ecd20326619a73898 Author: ChunHao Lin <hau@realtek.com> Date: Tue Jan 7 14:43:55 2025 +0800 r8169: add support for RTL8125BP rev.b Add support for RTL8125BP rev.b. Its XID is 0x689. This chip supports DASH and its dash type is "RTL_DASH_25_BP". Signed-off-by: ChunHao Lin <hau@realtek.com> Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/20250107064355.104711-1-hau@realtek.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/ethernet/realtek/r8169.h | 1 + drivers/net/ethernet/realtek/r8169_main.c | 30 +++++++++++++++++++++++++ drivers/net/ethernet/realtek/r8169_phy_config.c | 23 +++++++++++++++++++ 3 files changed, 54 insertions(+) commit 417cad5dc782096350e6a967ee5dd3417a19a24e Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Fri Dec 20 17:53:46 2024 +0900 leds: cht-wcove: Use devm_led_classdev_register() to avoid memory leak cht_wc_leds_probe() leaks memory when the second led_classdev_register() call in the for-loop fails as it does not call the cleanup function led_classdev_unregister() on the first device. Avoid this leak by calling devm_led_classdev_register(). Fixes: 047da762b9a9 ("leds: Add Intel Cherry Trail Whiskey Cove PMIC LED driver") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Link: https://lore.kernel.org/r/20241220085346.533675-1-joe@pf.is.s.u-tokyo.ac.jp Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/leds-cht-wcove.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit b55689c0a9b14ba873de662408b0ee298c307a35 Author: Charan Pedumuru <charan.pedumuru@microchip.com> Date: Thu Dec 19 11:12:50 2024 +0530 dt-bindings: mfd: atmel: Convert to YAML schema Changes during conversion: The text binding is misleading, add a fallback `atmel,at91sam9260-gpbr` for both `microchip,sam9x60-gpbr` and `microchip,sam9x7-gpbr` which is missing in old binding and `microchip,sam9x60-gpbr` is not a fallback for `microchip,sam9x7-gpbr`. Signed-off-by: Charan Pedumuru <charan.pedumuru@microchip.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241219-gpbr-v1-1-e19a562ebf81@microchip.com Signed-off-by: Lee Jones <lee@kernel.org> .../bindings/mfd/atmel,at91sam9260-gpbr.yaml | 44 ++++++++++++++++++++++ .../devicetree/bindings/mfd/atmel-gpbr.txt | 18 --------- 2 files changed, 44 insertions(+), 18 deletions(-) commit e14d879292b0f7755c0d51b82a19b30859bb080a Author: Alexander Sverdlin <alexander.sverdlin@siemens.com> Date: Wed Dec 18 22:08:27 2024 +0100 leds: lp8864: Add support for Texas Instruments LP8864, LP8864S, LP8866 LED-backlights Add driver for TI LP8864, LP8864S, LP8866 4/6 channel LED-backlight drivers with I2C interface. Link: https://www.ti.com/lit/gpn/lp8864-q1 Link: https://www.ti.com/lit/gpn/lp8864s-q1 Link: https://www.ti.com/lit/gpn/lp8866-q1 Link: https://www.ti.com/lit/gpn/lp8866s-q1 Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Link: https://lore.kernel.org/r/20241218210829.73191-3-alexander.sverdlin@siemens.com Signed-off-by: Lee Jones <lee@kernel.org> MAINTAINERS | 7 ++ drivers/leds/Kconfig | 12 ++ drivers/leds/Makefile | 1 + drivers/leds/leds-lp8864.c | 296 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 316 insertions(+) commit 4842603e671cabdfc994a6481da36fb07358d583 Author: Charan Pedumuru <charan.pedumuru@microchip.com> Date: Wed Dec 18 09:24:54 2024 +0530 dt-bindings: mfd: atmel,at91sam9260: Convert to YAML schema Changes during conversion: Add a missing fallback `atmel,at91sam9x5-matrix` for `microchip,sam9x60-matrix` which is not defined in the text binding. Signed-off-by: Charan Pedumuru <charan.pedumuru@microchip.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241218-matrix-v2-1-f3a8809ee5cd@microchip.com Signed-off-by: Lee Jones <lee@kernel.org> .../bindings/mfd/atmel,at91sam9260-matrix.yaml | 52 ++++++++++++++++++++++ .../devicetree/bindings/mfd/atmel-matrix.txt | 26 ----------- 2 files changed, 52 insertions(+), 26 deletions(-) commit efd435a808d9f7c4d71822119e0ebce1b843d1a7 Author: Alexander Sverdlin <alexander.sverdlin@siemens.com> Date: Wed Dec 18 22:06:30 2024 +0100 dt-bindings: leds: Convert LP8860 into YAML format Convert Texas Instruments' LP8860 LED driver bindings into YAML format. Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Acked-by: Andrew Davis <afd@ti.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241218210631.72997-1-alexander.sverdlin@siemens.com Signed-off-by: Lee Jones <lee@kernel.org> .../devicetree/bindings/leds/leds-lp8860.txt | 50 ------------ .../devicetree/bindings/leds/ti,lp8860.yaml | 90 ++++++++++++++++++++++ 2 files changed, 90 insertions(+), 50 deletions(-) commit 939757aafeb9c266dda37657ee5f7a73ffd35ae2 Author: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk> Date: Wed Dec 18 18:33:59 2024 +0000 leds: Add LED1202 I2C driver The output current can be adjusted separately for each channel by 8-bit analog (current sink input) and 12-bit digital (PWM) dimming control. The LED1202 implements 12 low-side current generators with independent dimming control. Internal volatile memory allows the user to store up to 8 different patterns, each pattern is a particular output configuration in terms of PWM duty-cycle (on 4096 steps). Analog dimming (on 256 steps) is per channel but common to all patterns. Each device tree LED node will have a corresponding entry in /sys/class/leds with the label name. The brightness property corresponds to the per channel analog dimming, while the patterns[1-8] to the PWM dimming control. Signed-off-by: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk> Link: https://lore.kernel.org/r/20241218183401.41687-4-vicentiu.galanopulo@remote-tech.co.uk Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/Kconfig | 10 ++ drivers/leds/Makefile | 1 + drivers/leds/leds-st1202.c | 416 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 427 insertions(+) commit 599b92fd0efa8b7c43e7f58c9dd0f7951f7cbf09 Author: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk> Date: Wed Dec 18 18:33:58 2024 +0000 dt-bindings: leds: Add LED1202 LED Controller The LED1202 is a 12-channel low quiescent current LED driver with: * Supply range from 2.6 V to 5 V * 20 mA current capability per channel * 1.8 V compatible I2C control interface * 8-bit analog dimming individual control * 12-bit local PWM resolution * 8 programmable patterns If the led node is present in the controller then the channel is set to active. Signed-off-by: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241218183401.41687-3-vicentiu.galanopulo@remote-tech.co.uk Signed-off-by: Lee Jones <lee@kernel.org> .../devicetree/bindings/leds/st,led1202.yaml | 132 +++++++++++++++++++++ 1 file changed, 132 insertions(+) commit 132e6687a118cedda0f59ada4af5ce42d0d05043 Author: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk> Date: Wed Dec 18 18:33:57 2024 +0000 Documentation:leds: Add leds-st1202.rst Add usage for sysfs hw_pattern entry for leds-st1202 Signed-off-by: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk> Link: https://lore.kernel.org/r/20241218183401.41687-2-vicentiu.galanopulo@remote-tech.co.uk Signed-off-by: Lee Jones <lee@kernel.org> Documentation/leds/index.rst | 1 + Documentation/leds/leds-st1202.rst | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit 735668f8e5c99698100e9df1e296f76a51c3c83a Author: Heiner Kallweit <hkallweit1@gmail.com> Date: Tue Jan 7 21:24:29 2025 +0100 i2c: core: Allocate temp client on the stack in i2c_detect The temp client is used only in scope of this function, so there's no benefit in dynamic allocation. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> drivers/i2c/i2c-core-base.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 54932d72544dc38d6771597523cca78b1729a442 Merge: 034f1cc9f02b 46b155acbf4e Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Thu Jan 9 10:56:57 2025 +0100 Merge tag 'fpga-for-6.14-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.14-rc1 - Peter's change fixes SRIOV problems for Intel DFL device. 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 <yilun.xu@intel.com> * tag 'fpga-for-6.14-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: fpga: dfl: destroy/recreate feature platform device on port release/assign fpga: dfl: drop unneeded get_device() and put_device() of feature device fpga: dfl: remove unneeded function build_info_create_dev() fpga: dfl: allocate platform device after feature device data fpga: dfl: store platform device id in feature device data fpga: dfl: store platform device name in feature device data fpga: dfl: store MMIO resources in feature device data fpga: dfl: convert features from flexible array member to separate array fpga: dfl: factor out feature device data from platform device data fpga: dfl: factor out feature device registration fpga: dfl: refactor internal DFL APIs to take/return feature device data fpga: dfl: store FIU type in feature platform data fpga: dfl: factor out feature data creation from build_info_commit_dev() fpga: dfl: pass feature platform data instead of device as argument fpga: dfl: afu: define local pointer to feature device fpga: dfl: afu: use parent device to log errors on port enable/disable fpga: dfl: return platform data from dfl_fpga_inode_to_feature_dev_data() fpga: dfl: omit unneeded argument pdata from dfl_feature_instance_init() commit 81b82147e7114ed78c819d1157db45b5b848a7d6 Author: Stanislav Jakubek <stano.jakubek@gmail.com> Date: Mon Dec 16 11:13:24 2024 +0100 dt-bindings: mfd: sprd,sc2731: Reference sprd,sc2731-efuse bindings Directly reference the sc2731-efuse bindings to simplify the schema. Remove the duplicate example from the efuse bindings. While at it, add the "pmic_adc" label that was missed during the initial YAML conversion. Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> Link: https://lore.kernel.org/r/Z1_9ROiI2ZHKsbAD@standask-GA-A55M-S2HP Signed-off-by: Lee Jones <lee@kernel.org> .../devicetree/bindings/mfd/sprd,sc2731.yaml | 12 ++------- .../bindings/nvmem/sprd,sc2731-efuse.yaml | 29 ---------------------- 2 files changed, 2 insertions(+), 39 deletions(-) commit 034f1cc9f02b1e53ce24c9009c31aa2f18df8b64 Merge: b580b17d06d5 d31679f42e19 Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Thu Jan 9 10:56:11 2025 +0100 Merge tag 'socfpga_firmware_update_for_v6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into char-misc-next Dinh writes: SoCFPGA Firmware update for v6.14 - Use kthread_run_on_cpu() * tag 'socfpga_firmware_update_for_v6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: firmware: stratix10-svc: Use kthread_run_on_cpu() commit 09a897432637aa0b99545ce13d57760cf0cb09d1 Author: Shree Ramamoorthy <s-ramamoorthy@ti.com> Date: Tue Dec 17 14:49:35 2024 -0600 mfd: tps65219: Remove unused macros & add regmap.h These macros are not used by the driver, and the structs are accounted for with the addition of the linux/regmap.h file. Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com> Link: https://lore.kernel.org/r/20241217204935.1012106-3-s-ramamoorthy@ti.com Signed-off-by: Lee Jones <lee@kernel.org> include/linux/mfd/tps65219.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 6891e88dfbbcd897b381dbc464211bf31a854509 Author: Shree Ramamoorthy <s-ramamoorthy@ti.com> Date: Tue Dec 17 14:49:34 2024 -0600 mfd: tps65219: Use MFD_CELL macros Use MFD_CELL macro helpers instead of plain struct properties, which makes the code shorter with the common defined MFD cell attributes. Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com> Link: https://lore.kernel.org/r/20241217204935.1012106-2-s-ramamoorthy@ti.com Signed-off-by: Lee Jones <lee@kernel.org> drivers/mfd/tps65219.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit b580b17d06d5c6e1188263d73bd21922601cfed3 Merge: df7b2f206a9e 419a40cc2bdd Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Thu Jan 9 10:54:19 2025 +0100 Merge tag 'w1-drv-6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux-w1 into char-misc-next Krzysztof writes: 1-Wire bus drivers for v6.14 1. ds2482: Add support for handling the VCC regulator supply and three more minor improvements/cleanups. 2. Constify 'struct bin_attribute' in all drivers. 3. W1 core: use sysfs_emit() instead of sprintf(), as preferred coding style. * tag 'w1-drv-6.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux-w1: w1: core: use sysfs_emit() instead of sprintf() w1: ds28e04: Constify 'struct bin_attribute' w1: ds2805: Constify 'struct bin_attribute' w1: ds2781: Constify 'struct bin_attribute' w1: ds2780: Constify 'struct bin_attribute' w1: ds2438: Constify 'struct bin_attribute' w1: ds2433: Constify 'struct bin_attribute' w1: ds2431: Constify 'struct bin_attribute' w1: ds2430: Constify 'struct bin_attribute' w1: ds2413: Constify 'struct bin_attribute' w1: ds2408: Constify 'struct bin_attribute' w1: ds2406: Constify 'struct bin_attribute' w1: Constify 'struct bin_attribute' w1: ds2482: Fix datasheet URL w1: ds2482: Add regulator support w1: ds2482: switch to devm_kzalloc() from kzalloc() dt-bindings: w1: ds2482: Add vcc-supply property commit 7fd9d28d1a6b1bab4559e472e3d552b5c77e08bb Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 15 14:21:39 2024 +0100 i2c: slave-eeprom: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> drivers/i2c/i2c-slave-eeprom.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 18032c6bc0e204c8f836b09707ef671991e4fe87 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Dec 28 09:43:43 2024 +0100 btf: Switch module BTF attribute to sysfs_bin_attr_simple_read() The generic function from the sysfs core can replace the custom one. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/r/20241228-sysfs-const-bin_attr-simple-v2-3-7c6f3f1767a3@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> kernel/bpf/btf.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 42369b9a1ecf777ab2f6075747ecfb825db4552b Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Dec 28 09:43:42 2024 +0100 btf: Switch vmlinux BTF attribute to sysfs_bin_attr_simple_read() The generic function from the sysfs core can replace the custom one. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/r/20241228-sysfs-const-bin_attr-simple-v2-2-7c6f3f1767a3@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> kernel/bpf/sysfs_btf.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 3675a926feefdf3afabea12f806f31ea582065e5 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Dec 28 09:43:41 2024 +0100 sysfs: constify bin_attribute argument of sysfs_bin_attr_simple_read() Most users use this function through the BIN_ATTR_SIMPLE* macros, they can handle the switch transparently. Also adapt the two non-macro users in the same change. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com> Reviewed-by: Mahesh Salgaonkar <mahesh@linux.ibm.com> Tested-by: Aditya Gupta <adityag@linux.ibm.com> Link: https://lore.kernel.org/r/20241228-sysfs-const-bin_attr-simple-v2-1-7c6f3f1767a3@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> arch/powerpc/platforms/powernv/opal.c | 2 +- fs/sysfs/file.c | 2 +- include/linux/sysfs.h | 4 ++-- kernel/module/sysfs.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit c7571e1a675d0b2827c3b8338d3a9b56ad580121 Author: Colin Ian King <colin.i.king@gmail.com> Date: Thu Aug 22 17:07:49 2024 +0100 HID: uclogic: make const read-only array touch_ring_model_params_buf static Don't populate the const read-only array touch_ring_model_params_buf on the stack at run time, instead make it static const. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-uclogic-params.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0563ee35ae2c9cfb0c6a7b2c0ddf7d9372bb8a98 Author: Nikunj A Dadhania <nikunj@amd.com> Date: Mon Jan 6 18:16:33 2025 +0530 x86/sev: Add the Secure TSC feature for SNP guests Now that all the required plumbing is done for enabling Secure TSC, add it to the SNP features present list. Signed-off-by: Nikunj A Dadhania <nikunj@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Tested-by: Peter Gonda <pgonda@google.com> Link: https://lore.kernel.org/r/20250106124633.1418972-14-nikunj@amd.com arch/x86/boot/compressed/sev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cc4f952427aaa44ecfd92542e10a65cce67bd6f4 Author: Vicki Pfau <vi@endrift.com> Date: Wed Dec 25 18:34:24 2024 -0800 HID: hid-steam: Make sure rumble work is canceled on removal When a force feedback command is sent from userspace, work is scheduled to pass this data to the controller without blocking userspace itself. However, in theory, this work might not be properly canceled if the controller is removed at the exact right time. This patch ensures the work is properly canceled when the device is removed. Signed-off-by: Vicki Pfau <vi@endrift.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-steam.c | 1 + 1 file changed, 1 insertion(+) commit c4c123504a65583e3689b3de04a61dc5272e453a Author: Even Xu <even.xu@intel.com> Date: Thu Dec 26 09:35:27 2024 +0800 HID: Wacom: Add PCI Wacom device support Add PCI device ID of wacom device into driver support list. Signed-off-by: Even Xu <even.xu@intel.com> Tested-by: Tatsunosuke Tobita <tatsunosuke.tobita@wacom.com> Reviewed-by: Ping Cheng <ping.cheng@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/wacom_wac.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5f420e8215c6642998900315f25608d831d93da7 Author: Even Xu <even.xu@intel.com> Date: Mon Jan 6 10:31:51 2025 +0800 HID: intel-thc-hid: intel-quicki2c: Add PM implementation Implement THC QuickI2C driver power management callbacks. Co-developed-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> .../intel-thc-hid/intel-quicki2c/pci-quicki2c.c | 233 +++++++++++++++++++++ .../intel-thc-hid/intel-quicki2c/quicki2c-dev.h | 8 + .../intel-thc-hid/intel-quicki2c/quicki2c-hid.c | 8 + 3 files changed, 249 insertions(+) commit 66b59bfce6d93ddedb532a56eb5339c144f56c09 Author: Even Xu <even.xu@intel.com> Date: Mon Jan 6 10:31:50 2025 +0800 HID: intel-thc-hid: intel-quicki2c: Complete THC QuickI2C driver Fully implement QuickI2C driver probe/remove callbacks, interrupt handler, integrate HIDI2C protocol, enumerate HID device and register HID device. Co-developed-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> .../intel-thc-hid/intel-quicki2c/pci-quicki2c.c | 273 +++++++++++++++++++++ .../intel-thc-hid/intel-quicki2c/quicki2c-dev.h | 6 + .../intel-quicki2c/quicki2c-protocol.c | 27 ++ .../intel-quicki2c/quicki2c-protocol.h | 1 + 4 files changed, 307 insertions(+) commit 6fc761385bcf62b235b6b48b1db32e2558a7904a Author: Even Xu <even.xu@intel.com> Date: Mon Jan 6 10:31:49 2025 +0800 HID: intel-thc-hid: intel-quicki2c: Add HIDI2C protocol implementation Intel QuickI2C driver uses THC hardware to accelerate HID over I2C (HIDI2C) protocol flow. This patch implements all data flows described in HID over I2C protocol SPEC by using THC hardware layer APIs. HID over I2C SPEC: https://learn.microsoft.com/en-us/previous-versions/windows/hardware/design/dn642101(v=vs.85) Co-developed-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/intel-thc-hid/Makefile | 1 + .../intel-thc-hid/intel-quicki2c/quicki2c-dev.h | 6 + .../intel-thc-hid/intel-quicki2c/quicki2c-hid.c | 18 +- .../intel-quicki2c/quicki2c-protocol.c | 197 +++++++++++++++++++++ .../intel-quicki2c/quicki2c-protocol.h | 19 ++ include/linux/hid-over-i2c.h | 73 ++++++++ 6 files changed, 313 insertions(+), 1 deletion(-) commit 5282e45ccbfa91524944a32d40386c54fdd4d145 Author: Even Xu <even.xu@intel.com> Date: Mon Jan 6 10:31:48 2025 +0800 HID: intel-thc-hid: intel-quicki2c: Add THC QuickI2C ACPI interfaces Add functions to query QuickI2C ACPI DSM/DSD parameters and use these APIs to access all QuickI2C ACPI resources. Co-developed-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> .../intel-thc-hid/intel-quicki2c/pci-quicki2c.c | 190 +++++++++++++++++++++ .../intel-thc-hid/intel-quicki2c/quicki2c-dev.h | 107 ++++++++++++ 2 files changed, 297 insertions(+) commit ba38d7f87f159c94f947d5b8336f763ec760d4ea Author: Even Xu <even.xu@intel.com> Date: Mon Jan 6 10:31:47 2025 +0800 HID: intel-thc-hid: intel-quicki2c: Add THC QuickI2C driver hid layer Add HID Low level driver callbacks and hid probe function to register QucikI2C as a HID driver, and external touch device as a HID device. Co-developed-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/intel-thc-hid/Makefile | 1 + .../intel-thc-hid/intel-quicki2c/quicki2c-dev.h | 11 ++ .../intel-thc-hid/intel-quicki2c/quicki2c-hid.c | 142 +++++++++++++++++++++ .../intel-thc-hid/intel-quicki2c/quicki2c-hid.h | 14 ++ include/linux/hid-over-i2c.h | 44 +++++++ 5 files changed, 212 insertions(+) commit 61bb2714dc3a110940fbe85846c887bfdd5d6e83 Author: Even Xu <even.xu@intel.com> Date: Mon Jan 6 10:31:46 2025 +0800 HID: intel-thc-hid: intel-quicki2c: Add THC QuickI2C driver skeleton Create intel-quicki2c folder and add Kconfig and Makefile for THC QuickI2C driver. Add basic device structure, definitions and probe/remove functions for QuickI2C driver. Co-developed-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/intel-thc-hid/Kconfig | 11 + drivers/hid/intel-thc-hid/Makefile | 3 + .../intel-thc-hid/intel-quicki2c/pci-quicki2c.c | 270 +++++++++++++++++++++ .../intel-thc-hid/intel-quicki2c/quicki2c-dev.h | 48 ++++ 4 files changed, 332 insertions(+) commit 6912aaf3fd24b38c5837aed3107924e1bdc4a32c Author: Even Xu <even.xu@intel.com> Date: Mon Jan 6 10:31:45 2025 +0800 HID: intel-thc-hid: intel-quickspi: Add PM implementation Implement THC QuickSPI driver power management callbacks. Co-developed-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> .../intel-thc-hid/intel-quickspi/pci-quickspi.c | 246 +++++++++++++++++++++ .../intel-thc-hid/intel-quickspi/quickspi-dev.h | 8 + .../intel-thc-hid/intel-quickspi/quickspi-hid.c | 8 + 3 files changed, 262 insertions(+) commit 4138f21115aec3ebae7805ec3407c72d93558023 Author: Xinpeng Sun <xinpeng.sun@intel.com> Date: Mon Jan 6 10:31:44 2025 +0800 HID: intel-thc-hid: intel-quickspi: Complete THC QuickSPI driver Fully implement QuickSPI driver probe/remove callbacks, interrupt handler, integrate HIDSPI protocol, enumerate HID device and register HID device. Co-developed-by: Even Xu <even.xu@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> .../intel-thc-hid/intel-quickspi/pci-quickspi.c | 265 +++++++++++++++++++++ .../intel-quickspi/quickspi-protocol.c | 3 + 2 files changed, 268 insertions(+) commit 9d8d51735a3af40b722346931a6a1e50227df4b5 Author: Even Xu <even.xu@intel.com> Date: Mon Jan 6 10:31:43 2025 +0800 HID: intel-thc-hid: intel-quickspi: Add HIDSPI protocol implementation Intel QuickSPI driver uses THC hardware to accelerate HID over SPI (HIDSPI) protocol flow. This patch implements all data flows described in HID over SPI protocol SPEC by using THC hardware layer APIs. HID over SPI SPEC: https://www.microsoft.com/download/details.aspx?id=103325 Co-developed-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/intel-thc-hid/Makefile | 1 + .../intel-thc-hid/intel-quickspi/quickspi-dev.h | 38 ++ .../intel-thc-hid/intel-quickspi/quickspi-hid.c | 17 +- .../intel-quickspi/quickspi-protocol.c | 411 +++++++++++++++++++++ .../intel-quickspi/quickspi-protocol.h | 25 ++ include/linux/hid-over-spi.h | 118 ++++++ 6 files changed, 609 insertions(+), 1 deletion(-) commit 7cb06f08ef13499105d6fe85706baf34467b43a8 Author: Even Xu <even.xu@intel.com> Date: Mon Jan 6 10:31:42 2025 +0800 HID: intel-thc-hid: intel-quickspi: Add THC QuickSPI ACPI interfaces Add functions to query QuickSPI ACPI DSD parameters and provide APIs for DSM method accessing. Co-developed-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> .../intel-thc-hid/intel-quickspi/pci-quickspi.c | 189 +++++++++++++++++++++ .../intel-thc-hid/intel-quickspi/quickspi-dev.h | 54 ++++++ 2 files changed, 243 insertions(+) commit 4751113f24048f96cb696ff8d939e38530dcdfc1 Author: Even Xu <even.xu@intel.com> Date: Mon Jan 6 10:31:41 2025 +0800 HID: intel-thc-hid: intel-quickspi: Add THC QuickSPI driver hid layer Add HID Low level driver callbacks and hid probe function to register QucikSPI as a HID driver, and external touch device as a HID device. Co-developed-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/intel-thc-hid/Makefile | 1 + .../intel-thc-hid/intel-quickspi/quickspi-dev.h | 11 ++ .../intel-thc-hid/intel-quickspi/quickspi-hid.c | 142 +++++++++++++++++++++ .../intel-thc-hid/intel-quickspi/quickspi-hid.h | 14 ++ include/linux/hid-over-spi.h | 37 ++++++ 5 files changed, 205 insertions(+) commit c8f3027dd2a5b34021eb9cced4ad8c2599797175 Author: Xinpeng Sun <xinpeng.sun@intel.com> Date: Mon Jan 6 10:31:40 2025 +0800 HID: intel-thc-hid: intel-quickspi: Add THC QuickSPI driver skeleton Create intel-quickspi folder and add Kconfig and Makefile for THC QuickSPI driver. Add basic device structure, definitions and probe/remove functions for QuickSPI driver. Co-developed-by: Even Xu <even.xu@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/intel-thc-hid/Kconfig | 11 + drivers/hid/intel-thc-hid/Makefile | 3 + .../intel-thc-hid/intel-quickspi/pci-quickspi.c | 287 +++++++++++++++++++++ .../intel-thc-hid/intel-quickspi/quickspi-dev.h | 61 +++++ 4 files changed, 362 insertions(+) commit 4228966def884c6e34b85cdc7118c5d013e1718f Author: Even Xu <even.xu@intel.com> Date: Mon Jan 6 10:31:39 2025 +0800 HID: intel-thc-hid: intel-thc: Add THC I2C config interfaces Add I2C bus related APIs to initialize I2C sub-system parameters, such as bus speed, slave address, address bit. As I2C sub-system hasn't auto register save and restore support, provide APIs to do it manually. Co-developed-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> .../hid/intel-thc-hid/intel-thc/intel-thc-dev.c | 281 +++++++++++++++++++++ .../hid/intel-thc-hid/intel-thc/intel-thc-dev.h | 7 + drivers/hid/intel-thc-hid/intel-thc/intel-thc-hw.h | 129 ++++++++++ 3 files changed, 417 insertions(+) commit f02bcabad00be442d7319189a23b919604865e10 Author: Xinpeng Sun <xinpeng.sun@intel.com> Date: Mon Jan 6 10:31:38 2025 +0800 HID: intel-thc-hid: intel-thc: Add THC SPI config interfaces Add SPI bus related APIs to configure SPI operation parameters, such as port type, bus frequency, bus IO mode, read/write OPcode, and slave register addresses. Co-developed-by: Even Xu <even.xu@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> .../hid/intel-thc-hid/intel-thc/intel-thc-dev.c | 229 +++++++++++++++++++++ .../hid/intel-thc-hid/intel-thc/intel-thc-dev.h | 7 + drivers/hid/intel-thc-hid/intel-thc/intel-thc-hw.h | 52 +++++ 3 files changed, 288 insertions(+) commit 4e682ea6d60e1438a2a6b8984c90fcc59ecdcd5a Author: Xinpeng Sun <xinpeng.sun@intel.com> Date: Mon Jan 6 10:31:37 2025 +0800 HID: intel-thc-hid: intel-thc: Add THC interrupt handler Add common interrupt handler to clear interrupt status and return interrupt type to caller for future handling. Co-developed-by: Even Xu <even.xu@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> .../hid/intel-thc-hid/intel-thc/intel-thc-dev.c | 259 +++++++++++++++++++++ .../hid/intel-thc-hid/intel-thc/intel-thc-dev.h | 27 +++ 2 files changed, 286 insertions(+) commit e86df90779436d5572e8d4980249494b51f9f2a1 Author: Xinpeng Sun <xinpeng.sun@intel.com> Date: Mon Jan 6 10:31:36 2025 +0800 HID: intel-thc-hid: intel-thc: Add THC LTR interfaces THC supports LTR configuration and runtimely mode switching. There are two LTR modes: Active LTR and Low Power LTR. THC hardware layer provides APIs for LTR configuration and mode switching. Co-developed-by: Even Xu <even.xu@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> .../hid/intel-thc-hid/intel-thc/intel-thc-dev.c | 114 +++++++++++++++++++++ .../hid/intel-thc-hid/intel-thc/intel-thc-dev.h | 3 + drivers/hid/intel-thc-hid/intel-thc/intel-thc-hw.h | 21 ++++ 3 files changed, 138 insertions(+) commit a688404b2e20f00cce6d0a2b888ef4ca9154e144 Author: Even Xu <even.xu@intel.com> Date: Mon Jan 6 10:31:35 2025 +0800 HID: intel-thc-hid: intel-thc: Add THC DMA interfaces As THC PIO only has 64 bytes FIFO length, THC DMAs are introduced to send/receive large data packets. THC has three types of DMA channels: Read DMA channel (RxDMA), Write DMA channel (TxDMA) and Software DMA (SWDMA). In addition to basic DMA functions, THC RxDMA also includes an auto hardware sequence which can handle external touch device's interrupt automatically without software involved. THC RxDMA channel usually is used for handling touch input reports. THC TxDMA is very similar with general IO TxDMA, and usually is used for sending command/request to exteranl touch device. THC SWDMA can perform read, write followed by read operation according to different configurations. Unlike RxDMA triggered by bus activity, SWDMA can be triggered by SW driver at any time, for example: - Retrieving an input report without interrupt - Sending command followed by reading response THC DMA operation flow includes 4 steps: 1. Allocate DMA buffers 2. Configure opcode, fill PRD table with DMA buffers, enable DMA channel 3. Wait for completion, read out DMA buffers and update buffer pointers 4. Stop DMA and release DMA buffers THC Hardware layer driver provides APIs for all above DMA Steps. Co-developed-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/intel-thc-hid/Makefile | 1 + .../hid/intel-thc-hid/intel-thc/intel-thc-dev.c | 8 + .../hid/intel-thc-hid/intel-thc/intel-thc-dev.h | 18 + .../hid/intel-thc-hid/intel-thc/intel-thc-dma.c | 969 +++++++++++++++++++++ .../hid/intel-thc-hid/intel-thc/intel-thc-dma.h | 146 ++++ 5 files changed, 1142 insertions(+) commit 86f5f4abe799ac8cd9f28346818781fd9bdb642f Author: Xinpeng Sun <xinpeng.sun@intel.com> Date: Mon Jan 6 10:31:34 2025 +0800 HID: intel-thc-hid: intel-thc: Add APIs for interrupt Add THC interrupt operation interfaces, such as interrupt configure, global interrupt enable/disable, external touch device GPIO interrupt quiesce and unquiesce. Co-developed-by: Even Xu <even.xu@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> .../hid/intel-thc-hid/intel-thc/intel-thc-dev.c | 223 +++++++++++++++++++++ .../hid/intel-thc-hid/intel-thc/intel-thc-dev.h | 5 + drivers/hid/intel-thc-hid/intel-thc/intel-thc-hw.h | 17 ++ 3 files changed, 245 insertions(+) commit e584b13571845783d916294bc201a5e2278e5d7e Author: Xinpeng Sun <xinpeng.sun@intel.com> Date: Mon Jan 6 10:31:33 2025 +0800 HID: intel-thc-hid: intel-thc: Add THC PIO operation APIs THC PIO (programmed I/O) operations are very similar with general SPI/I2C read/write operation to access external slave device on the bus through internal FIFO. THC PIO operations are split into 4 steps: 1. prepare: configure hardware with correct opcode, slave address, and fill the PIO FIFO 2. start: set start bit to issue a bus send/receive 3. wait: wait for bus sending/receiving completion 4. complete: check send/receive data in FIFO and return Co-developed-by: Even Xu <even.xu@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> .../hid/intel-thc-hid/intel-thc/intel-thc-dev.c | 245 +++++++++++++++++++++ .../hid/intel-thc-hid/intel-thc/intel-thc-dev.h | 24 ++ drivers/hid/intel-thc-hid/intel-thc/intel-thc-hw.h | 23 ++ 3 files changed, 292 insertions(+) commit 050427e3abcf1959eafa876d2ca9f687878f9c7a Author: Xinpeng Sun <xinpeng.sun@intel.com> Date: Mon Jan 6 10:31:32 2025 +0800 HID: intel-thc-hid: intel-thc: Add THC registers definition Add THC Hardware register definitions and descriptions. Co-developed-by: Even Xu <even.xu@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/intel-thc-hid/intel-thc/intel-thc-hw.h | 639 +++++++++++++++++++++ 1 file changed, 639 insertions(+) commit 1b2d05384c29625816fb4b2b8d9c29e6f357fd8d Author: Xinpeng Sun <xinpeng.sun@intel.com> Date: Mon Jan 6 10:31:31 2025 +0800 HID: intel-thc-hid: Add basic THC driver skeleton Create intel-thc-hid folder and add Kconfig and Makefile for THC drivers. Add basic THC device context structure, definitions and related initialization APIs for THC Hardware layer driver. Also initialize regmap struct for future THC registers access. Co-developed-by: Even Xu <even.xu@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> MAINTAINERS | 6 + drivers/hid/Kconfig | 2 + drivers/hid/Makefile | 2 + drivers/hid/intel-thc-hid/Kconfig | 20 ++ drivers/hid/intel-thc-hid/Makefile | 11 ++ .../hid/intel-thc-hid/intel-thc/intel-thc-dev.c | 219 +++++++++++++++++++++ .../hid/intel-thc-hid/intel-thc/intel-thc-dev.h | 25 +++ 7 files changed, 285 insertions(+) commit df3a78d8a862f1ed48f186f62397e37eeb74d0e3 Author: Even Xu <even.xu@intel.com> Date: Mon Jan 6 10:31:30 2025 +0800 HID: THC: Add documentation Add Documentation/hid/intel-thc-hid.rst file to provide hardware and software detail for intel THC drivers. Co-developed-by: Sun Xinpeng <xinpeng.sun@intel.com> Signed-off-by: Sun Xinpeng <xinpeng.sun@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> Documentation/hid/index.rst | 1 + Documentation/hid/intel-thc-hid.rst | 568 ++++++++++++++++++++++++++++++++++++ 2 files changed, 569 insertions(+) commit b8842f202feceb94a96afae6764aa2e898d2c34e Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 25 01:55:09 2024 +0000 HID: intel-ish-hid: Remove unused ishtp_cl_get_tx_* ishtp_cl_get_tx_free_buffer_size() and ishtp_cl_get_tx_free_rings() were added in 2018 by commit 18c0b5467498 ("HID: intel_ish-hid: Enhance API to get ring buffer sizes") but have remained unused. Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/intel-ish-hid/ishtp/client.c | 19 ------------------- drivers/hid/intel-ish-hid/ishtp/client.h | 2 -- 2 files changed, 21 deletions(-) commit 6657d899ce35a313d7e0e7ddc0988aa80d304ca8 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 25 01:55:08 2024 +0000 HID: intel-ish-hid: Remove unused ishtp_cl_tx_empty ishtp_cl_tx_empty() was added in 2018 by commit a1c40ce62fd2 ("HID: intel-ish-hid: ishtp: add helper functions for client buffer operation") but has remained unused. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/intel-ish-hid/ishtp/client-buffers.c | 21 --------------------- include/linux/intel-ish-client-if.h | 1 - 2 files changed, 22 deletions(-) commit c59c46cade19eaf9f3a35d4ff5b32733055da2b0 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 25 01:55:07 2024 +0000 HID: intel-ish-hid: Remove unused ishtp_dev_state_str ishtp_dev_state_str() was added in 2016 by commit 3703f53b99e4 ("HID: intel_ish-hid: ISH Transport layer") but has never been used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/intel-ish-hid/ishtp/init.c | 30 ----------------------------- drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h | 1 - 2 files changed, 31 deletions(-) commit 64f2657b579343cf923aa933f08074e6258eb07b Author: Alan Stern <stern@rowland.harvard.edu> Date: Tue Dec 31 14:23:12 2024 -0500 HID: core: Fix assumption that Resolution Multipliers must be in Logical Collections A report in 2019 by the syzbot fuzzer was found to be connected to two errors in the HID core associated with Resolution Multipliers. One of the errors was fixed by commit ea427a222d8b ("HID: core: Fix deadloop in hid_apply_multiplier."), but the other has not been fixed. This error arises because hid_apply_multipler() assumes that every Resolution Multiplier control is contained in a Logical Collection, i.e., there's no way the routine can ever set multiplier_collection to NULL. This is in spite of the fact that the function starts with a big comment saying: * "The Resolution Multiplier control must be contained in the same * Logical Collection as the control(s) to which it is to be applied. ... * If no Logical Collection is * defined, the Resolution Multiplier is associated with all * controls in the report." * HID Usage Table, v1.12, Section 4.3.1, p30 * * Thus, search from the current collection upwards until we find a * logical collection... The comment and the code overlook the possibility that none of the collections found may be a Logical Collection. The fix is to set the multiplier_collection pointer to NULL if the collection found isn't a Logical Collection. Reported-by: syzbot+ec5f884c4a135aa0dbb9@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/000000000000109c040597dc5843@google.com/ Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Peter Hutterer <peter.hutterer@who-t.net> Fixes: 5a4abb36f312 ("HID: core: process the Resolution Multiplier") Cc: stable@vger.kernel.org Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-core.c | 2 ++ 1 file changed, 2 insertions(+) commit 80818fdc068eaab729bb793d790ae9fd053f7053 Author: Terry Tritton <terry.tritton@linaro.org> Date: Fri Dec 20 19:23:18 2024 +0000 HID: fix generic desktop D-Pad controls The addition of the "System Do Not Disturb" event code caused the Generic Desktop D-Pad configuration to be skipped. This commit allows both to be configured without conflicting with each other. Fixes: 22d6d060ac77 ("input: Add support for "Do Not Disturb"") Signed-off-by: Terry Tritton <terry.tritton@linaro.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Carlos Llamas <cmllamas@google.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-input.c | 37 +++++++++++++++++-------------------- include/linux/hid.h | 1 + 2 files changed, 18 insertions(+), 20 deletions(-) commit 84c9d2a968c8276f1ceddaa1526c803263eae2b4 Author: Vishnu Sankar <vishnuocv@gmail.com> Date: Wed Dec 18 23:33:09 2024 +0900 HID: lenovo: Support for ThinkPad-X12-TAB-1/2 Kbd Fn keys Fn Keys like Mic mute, Power Modes/Airplane mode,Selective screenshot/Pickup Phone, KBD Backlight and star/Favourites is emitted as HID raw events in X12 Tab1 and Tab2. This support has been added. Thinkpad X12 TAB 2 and TAB 1 Folio keyboard's raw events will get detected as Fn keys with this patch. Default fn_lock state for these Keyboards are OFF. Other than these changes, we follow TP10UKBD's processes. Tested on X12 Tab 2. Signed-off-by: Vishnu Sankar <vishnuocv@gmail.com> Signed-off-by: Vishnu Sankar <vsankar@lenovo.com> Suggested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-lenovo.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 98 insertions(+), 1 deletion(-) commit b5e65ae557da9fd17b08482ee44ee108ba636182 Author: Youwan Wang <youwan@nfschina.com> Date: Mon Dec 16 10:18:01 2024 +0800 HID: multitouch: Add quirk for Hantick 5288 touchpad This device sometimes doesn't send touch release signals when moving from >=2 fingers to <2 fingers. Using MT_QUIRK_NOT_SEEN_MEANS_UP instead of MT_QUIRK_ALWAYS_VALID makes sure that no touches become stuck. Signed-off-by: Enze Xie <enze@nfschina.com> Signed-off-by: Youwan Wang <youwan@nfschina.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-multitouch.c | 5 +++++ 1 file changed, 5 insertions(+) commit 03ece95097007805c5a8d3fcb904556469608563 Author: Ryan McClelland <rymcclel@gmail.com> Date: Wed Dec 11 18:26:48 2024 -0800 HID: nintendo: add support for md/gen 6B controller The NSO MD/GEN 6B was a Japan-only controller released which has 6 buttons on the face of the controller. This adds support for this controller. It still enumerates just like the 3B controller, but will use extra bits in it's report for the 3 extra controllers. This also changes the events reported to match the letter on the controller for the NSO MD/GEN controller. The VID/PID it reports is the same as the 3B controller. This also removes a comment on the N64 Controllers which didn't mean anything. Signed-off-by: Ryan McClelland <rymcclel@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/Kconfig | 2 +- drivers/hid/hid-nintendo.c | 16 ++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) commit d2c342334141521cc5a0439bd66ff35da8bc5aad Author: Jason Gerecke <jason.gerecke@wacom.com> Date: Tue Dec 10 13:00:59 2024 -0800 HID: wacom: Status luminance properties should set brightness of all LEDs The wacom driver has (deprecated) sysfs properties `status0_luminance` and `status1_luminance` that are used to control the low- and high- level brightness values (llv and hlv) of the status LEDs. These two properties had an effect on /all/ of the status LEDs. After our driver switched to exposing each status LED individually through the LED class, this behavior changed. These controls started having only a temporary effect on the currently-lit LED. If a trigger changed the current LED, the driver would switch the brightness back to the llv/hlv values stored per-LED. (The code's current behavior of updating the "global" e.g. `wacom->led.llv` values has essentially no effect because those values are only used at initialization time). This commit restores the original behavior by ensuring these properties update the per-LED brightness for all LEDs. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/wacom_sys.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 4f4ab4bcd5de770b3ed0e00a6dfeac548b2c8340 Author: Jason Gerecke <jason.gerecke@wacom.com> Date: Tue Dec 10 13:00:58 2024 -0800 HID: wacom: Improve behavior of non-standard LED brightness values Assigning a non-standard brightness value to an LED can cause the value to slowly drift downward over time as the effects of integer division accumulate. Each time that an LED is triggered, a series of set and get calls occur. For example, if we assume a tablet with max_hlv = 100, then when brightness is set to "200" through sysfs, the hlv value written to hardware will be `200*100/255 = 78`. If the LED trigger is later activated, the hlv value will be used to determine the brightness: `78*255/100 = 198`. This lower brightness then used to set the brightness of the next LED. However, `198*100/255 = 77`, so the next LED ends up slightly dimmer. Each subsequent trigger activation will cause the brightness to continue drifting down until we reach a point where the result of integer divsion does not introduce any new error. This commit corrects the issue by being more careful about how we handle scaling between the two ranges (0..max_{h,l}lv) and (0..LED_FULL). Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/wacom.h | 8 ++++++++ drivers/hid/wacom_sys.c | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) commit 50420d7c79c37a3efe4010ff9b1bb14bc61ebccf Author: Karol Przybylski <karprzy7@gmail.com> Date: Thu Dec 5 23:22:21 2024 +0100 HID: hid-thrustmaster: Fix warning in thrustmaster_probe by adding endpoint check syzbot has found a type mismatch between a USB pipe and the transfer endpoint, which is triggered by the hid-thrustmaster driver[1]. There is a number of similar, already fixed issues [2]. In this case as in others, implementing check for endpoint type fixes the issue. [1] https://syzkaller.appspot.com/bug?extid=040e8b3db6a96908d470 [2] https://syzkaller.appspot.com/bug?extid=348331f63b034f89b622 Fixes: c49c33637802 ("HID: support for initialization of some Thrustmaster wheels") Reported-by: syzbot+040e8b3db6a96908d470@syzkaller.appspotmail.com Tested-by: syzbot+040e8b3db6a96908d470@syzkaller.appspotmail.com Signed-off-by: Karol Przybylski <karprzy7@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-thrustmaster.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 86b05bb2d4a1e4774dafa89c3b0ecbf8f4335cf3 Author: 你 言言 <soragoto@soragoto.io> Date: Mon Dec 2 06:06:56 2024 +0000 HID: magicmouse: Update device name for Apple Magic Trackpad Updated the device name for Apple Magic Trackpad USB-C when connected via Bluetooth. This change ensures the correct recognition of the 2024 USB-C trackpad and improves user experience. Signed-off-by: Qingyan Li <soragoto@soragoto.io> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-magicmouse.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c9b5be909e6595547ed5d45aef39fd65948aa342 Author: Damien Le Moal <dlemoal@kernel.org> Date: Mon Jan 6 14:14:47 2025 +0900 ahci: Introduce ahci_ignore_port() helper libahci and AHCI drivers may ignore some ports if the port is invalid (its ID does not correspond to a valid physical port) or if the user explicitly requested the port to be ignored with the mask_port_map ahci module parameter. Such port that shall be ignored can be identified by checking that the bit corresponding to the port ID is not set in the mask_port_map field of struct ahci_host_priv. E.g. code such as: "if (!(hpriv->mask_port_map & (1 << portid)))". Replace all direct use of the mask_port_map field to detect such port with the new helper inline function ahci_ignore_port() to make the code more readable/easier to understand. The comment describing the mask_port_map field of struct ahci_host_priv is also updated to be more accurate. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Niklas Cassel <cassel@kernel.org> drivers/ata/ahci.h | 13 ++++++++++++- drivers/ata/ahci_brcm.c | 2 +- drivers/ata/ahci_ceva.c | 4 ++-- drivers/ata/libahci_platform.c | 6 +++--- 4 files changed, 18 insertions(+), 7 deletions(-) commit 9cc3e4e9f4ba6a090e3b4869fea8f292b98309ac Merge: 0739b8ba8227 6acea03f98f5 Author: Dave Airlie <airlied@redhat.com> Date: Thu Jan 9 18:46:42 2025 +1000 Merge tag 'drm-xe-next-2025-01-07' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next UAPI Changes: - OA new property: 'unblock after N reports' (Ashutosh) i915 display Changes: - UHBR rates for Thunderbolt (Kahola) Driver Changes: - IRQ related fixes and improvements (Ilia) - Revert some changes that break a mesa debug tool (John) - Fix migration issues (Nirmoy) - Enable GuC's WA_DUAL_QUEUE for newer platforms (Daniele) - Move shrink test out of xe_bo (Nirmoy) - SRIOV PF: Use correct function to check LMEM provisioning (Michal) - Fix a false-positive "Missing outer runtime PM protection" warning (Rodrigo) - Make GSCCS disabling message less alarming (Daniele) - Fix DG1 power gate sequence (Rodrigo) - Xe files fixes (Lucas) - Fix a potential TP_printk UAF (Thomas) - OA Fixes (Umesh) - Fix tlb invalidation when wedging (Lucas) - Documentation fix (Lucas) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/Z31579j3V3XCPFaK@intel.com commit 0739b8ba82276f6caac3e544eb6cc21c16d1ca9e Merge: ae7f6d59ef8c 938fbb16aba8 Author: Dave Airlie <airlied@redhat.com> Date: Thu Jan 9 15:48:33 2025 +1000 Merge tag 'drm-misc-next-2025-01-06' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for 6.14: UAPI Changes: - Clarify drm memory stats documentation Cross-subsystem Changes: Core Changes: - sched: Documentation fixes, Driver Changes: - amdgpu: Track BO memory stats at runtime - amdxdna: Various fixes - hisilicon: New HIBMC driver - bridges: - Provide default implementation of atomic_check for HDMI bridges - it605: HDCP improvements, MCCS Support Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <mripard@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250106-augmented-kakapo-of-action-0cf000@houat commit ae7f6d59ef8ca7de9a02320eb03b200ed76cde5e Merge: 9cc06dbaf437 ba5811562988 Author: Dave Airlie <airlied@redhat.com> Date: Thu Jan 9 15:47:24 2025 +1000 Merge tag 'mediatek-drm-next-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next Mediatek DRM Next for Linux 6.14 1. dp: Add sdp path reset 2. dp: Support flexible length of DP calibration data Signed-off-by: Dave Airlie <airlied@redhat.com> From: Chun-Kuang Hu <chunkuang.hu@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20250104125538.111118-1-chunkuang.hu@kernel.org commit 31eae6d995870211348345521e4865c2816478f5 Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Jan 6 18:29:32 2025 -0800 selftests: drv-net: test drivers sleeping in ndo_get_stats64 Most of our tests use rtnetlink to read device stats, so they don't expose the drivers much to paths in which device stats are read under RCU. Add tests which hammer profcs reads to make sure drivers: - don't sleep while reporting stats, - can handle parallel reads, - can handle device going down while reading. Set ifname on the env class in NetDrvEnv, we already do that in NetDrvEpEnv. KTAP version 1 1..7 ok 1 stats.check_pause ok 2 stats.check_fec ok 3 stats.pkt_byte_sum ok 4 stats.qstat_by_ifindex ok 5 stats.check_down ok 6 stats.procfs_hammer # completed up/down cycles: 6 ok 7 stats.procfs_downup_hammer # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:0 error:0 Reviewed-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20250107022932.2087744-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/selftests/drivers/net/lib/py/env.py | 1 + tools/testing/selftests/drivers/net/stats.py | 94 ++++++++++++++++++++++- tools/testing/selftests/net/lib/py/ksft.py | 5 ++ 3 files changed, 97 insertions(+), 3 deletions(-) commit e8ec1c94866a44723c8ab1c90942503f3402ede8 Merge: bfaac2a0b9e5 d86088e2c35d Author: Alexei Starovoitov <ast@kernel.org> Date: Wed Jan 8 18:06:37 2025 -0800 Merge branch 'bpf-reduce-the-use-of-migrate_-disable-enable' Hou Tao says: ==================== The use of migrate_{disable|enable} pair in BPF is mainly due to the introduction of bpf memory allocator and the use of per-CPU data struct in its internal implementation. The caller needs to disable migration before invoking the alloc or free APIs of bpf memory allocator, and enable migration after the invocation. The main users of bpf memory allocator are various kind of bpf maps in which the map values or the special fields in the map values are allocated by using bpf memory allocator. At present, the running context for bpf program has already disabled migration explictly or implictly, therefore, when these maps are manipulated in bpf program, it is OK to not invoke migrate_disable() and migrate_enable() pair. Howevers, it is not always the case when these maps are manipulated through bpf syscall, therefore many migrate_{disable|enable} pairs are added when the map can either be manipulated by BPF program or BPF syscall. The initial idea of reducing the use of migrate_{disable|enable} comes from Alexei [1]. I turned it into a patch set that archives the goals through the following three methods: 1. remove unnecessary migrate_{disable|enable} pair when the BPF syscall path also disables migration, it is OK to remove the pair. Patch #1~#3 fall into this category, while patch #4~#5 are partially included. 2. move the migrate_{disable|enable} pair from inner callee to outer caller Instead of invoking migrate_disable() in the inner callee, invoking migrate_disable() in the outer caller to simplify reasoning about when migrate_disable() is needed. Patch #4~#5 and patch #6~#19 belongs to this category. 3. add cant_migrate() check in the inner callee Add cant_migrate() check in the inner callee to ensure the guarantee that migration is disabled is not broken. Patch #1~#5, #13, #16~#19 also belong to this category. Please check the individual patches for more details. Comments are always welcome. Change Log: v2: * sqaush the ->map_free related patches (#10~#12, #15) into one patch * remove unnecessary cant_migrate() checks. v1: https://lore.kernel.org/bpf/20250106081900.1665573-1-houtao@huaweicloud.com ==================== Link: https://patch.msgid.link/20250108010728.207536-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> commit d86088e2c35de1eeaae757e49f697f8f42b288fa Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:28 2025 +0800 bpf: Remove migrate_{disable|enable} from bpf_selem_free() bpf_selem_free() has the following three callers: (1) bpf_local_storage_update It will be invoked through ->map_update_elem syscall or helpers for storage map. Migration has already been disabled in these running contexts. (2) bpf_sk_storage_clone It has already disabled migration before invoking bpf_selem_free(). (3) bpf_selem_free_list bpf_selem_free_list() has three callers: bpf_selem_unlink_storage(), bpf_local_storage_update() and bpf_local_storage_destroy(). The callers of bpf_selem_unlink_storage() includes: storage map ->map_delete_elem syscall, storage map delete helpers and bpf_local_storage_map_free(). These contexts have already disabled migration when invoking bpf_selem_unlink() which invokes bpf_selem_unlink_storage() and bpf_selem_free_list() correspondingly. bpf_local_storage_update() has been analyzed as the first caller above. bpf_local_storage_destroy() is invoked when freeing the local storage for the kernel object. Now cgroup, task, inode and sock storage have already disabled migration before invoking bpf_local_storage_destroy(). After the analyses above, it is safe to remove migrate_{disable|enable} from bpf_selem_free(). Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-17-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/bpf_local_storage.c | 2 -- 1 file changed, 2 deletions(-) commit 7b984359e097f30e392e4eee29be7445fc391f29 Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:27 2025 +0800 bpf: Remove migrate_{disable|enable} from bpf_local_storage_free() bpf_local_storage_free() has three callers: 1) bpf_local_storage_alloc() Its caller must have disabled migration. 2) bpf_local_storage_destroy() Its four callers (bpf_{cgrp|inode|task|sk}_storage_free()) have already invoked migrate_disable() before invoking bpf_local_storage_destroy(). 3) bpf_selem_unlink() Its callers include: cgrp/inode/task/sk storage ->map_delete_elem callbacks, bpf_{cgrp|inode|task|sk}_storage_delete() helpers and bpf_local_storage_map_free(). All of these callers have already disabled migration before invoking bpf_selem_unlink(). Therefore, it is OK to remove migrate_{disable|enable} pair from bpf_local_storage_free(). Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-16-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/bpf_local_storage.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 4855a75ebf485f74b06ba85b16b71c4b71a4086d Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:26 2025 +0800 bpf: Remove migrate_{disable|enable} from bpf_local_storage_alloc() These two callers of bpf_local_storage_alloc() are the same as bpf_selem_alloc(): bpf_sk_storage_clone() and bpf_local_storage_update(). The running contexts of these two callers have already disabled migration, therefore, there is no need to add extra migrate_{disable|enable} pair in bpf_local_storage_alloc(). Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-15-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/bpf_local_storage.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 2269b32ab00e1be663b838a1eed14408cb9ba677 Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:25 2025 +0800 bpf: Remove migrate_{disable|enable} from bpf_selem_alloc() bpf_selem_alloc() has two callers: (1) bpf_sk_storage_clone_elem() bpf_sk_storage_clone() has already disabled migration before invoking bpf_sk_storage_clone_elem(). (2) bpf_local_storage_update() Its callers include: cgrp/task/inode/sock storage ->map_update_elem() callbacks and bpf_{cgrp|task|inode|sk}_storage_get() helpers. These running contexts have already disabled migration Therefore, there is no need to add extra migrate_{disable|enable} pair in bpf_selem_alloc(). Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-14-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/bpf_local_storage.c | 2 -- 1 file changed, 2 deletions(-) commit 6a52b965ab6f56293dce316f382db3a9a66f0c9f Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:24 2025 +0800 bpf: Remove migrate_{disable,enable} in bpf_cpumask_release() When BPF program invokes bpf_cpumask_release(), the migration must have been disabled. When bpf_cpumask_release_dtor() invokes bpf_cpumask_release(), the caller bpf_obj_free_fields() also has disabled migration, therefore, it is OK to remove the unnecessary migrate_{disable|enable} pair in bpf_cpumask_release(). Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-13-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/cpumask.c | 2 -- 1 file changed, 2 deletions(-) commit 1d2dbe7120e89090ed4f6be03d6fbadfbfff59bf Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:23 2025 +0800 bpf: Remove migrate_{disable|enable} in bpf_obj_free_fields() The callers of bpf_obj_free_fields() have already guaranteed that the migration is disabled, therefore, there is no need to invoke migrate_{disable,enable} pair in bpf_obj_free_fields()'s underly implementation. This patch removes unnecessary migrate_{disable|enable} pairs from bpf_obj_free_fields() and its callees: bpf_list_head_free() and bpf_rb_root_free(). Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-12-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/helpers.c | 4 ---- kernel/bpf/syscall.c | 2 -- 2 files changed, 6 deletions(-) commit 4b7e7cd1c105cc5881f4054805dfbb92aa24eb78 Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:22 2025 +0800 bpf: Disable migration before calling ops->map_free() The freeing of all map elements may invoke bpf_obj_free_fields() to free the special fields in the map value. Since these special fields may be allocated from bpf memory allocator, migrate_{disable|enable} pairs are necessary for the freeing of these special fields. To simplify reasoning about when migrate_disable() is needed for the freeing of these special fields, let the caller to guarantee migration is disabled before invoking bpf_obj_free_fields(). Therefore, disabling migration before calling ops->map_free() to simplify the freeing of map values or special fields allocated from bpf memory allocator. After disabling migration in bpf_map_free(), there is no need for additional migration_{disable|enable} pairs in these ->map_free() callbacks. Remove these redundant invocations. The migrate_{disable|enable} pairs in the underlying implementation of bpf_obj_free_fields() will be removed by the following patch. Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-11-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/bpf_local_storage.c | 8 ++------ kernel/bpf/hashtab.c | 6 ++---- kernel/bpf/range_tree.c | 2 -- kernel/bpf/syscall.c | 8 +++++++- 4 files changed, 11 insertions(+), 13 deletions(-) commit 090d7f2e640b265335ac0a5a8e09a99f7f28f567 Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:21 2025 +0800 bpf: Disable migration in bpf_selem_free_rcu bpf_selem_free_rcu() calls bpf_obj_free_fields() to free the special fields in map value (e.g., kptr). Since kptrs may be allocated from bpf memory allocator, migrate_{disable|enable} pairs are necessary for the freeing of these kptrs. To simplify reasoning about when migrate_disable() is needed for the freeing of these dynamically-allocated kptrs, let the caller to guarantee migration is disabled before invoking bpf_obj_free_fields(). Therefore, the patch adds migrate_{disable|enable} pair in bpf_selem_free_rcu(). The migrate_{disable|enable} pairs in the underlying implementation of bpf_obj_free_fields() will be removed by the following patch. Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-10-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/bpf_local_storage.c | 3 +++ 1 file changed, 3 insertions(+) commit dfccfc47bde53f5df5bf42486d12a8a2ecdcea60 Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:20 2025 +0800 bpf: Disable migration when cloning sock storage bpf_sk_storage_clone() will call bpf_selem_free() to free the clone element when the allocation of new sock storage fails. bpf_selem_free() will call check_and_free_fields() to free the special fields in the element. Since the allocated element is not visible to bpf syscall or bpf program when bpf_local_storage_alloc() fails, these special fields in the element must be all zero when invoking bpf_selem_free(). To be uniform with other callers of bpf_selem_free(), disabling migration when cloning sock storage. Adding migrate_{disable|enable} pair also benefits the potential switching from kzalloc to bpf memory allocator for sock storage. Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-9-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> net/core/bpf_sk_storage.c | 2 ++ 1 file changed, 2 insertions(+) commit 7d1032d1e3031ef38d1a360380d755f75cb639b8 Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:19 2025 +0800 bpf: Disable migration when destroying sock storage When destroying sock storage, it invokes bpf_local_storage_destroy() to remove all storage elements saved in the sock storage. The destroy procedure will call bpf_selem_free() to free the element, and bpf_selem_free() calls bpf_obj_free_fields() to free the special fields in map value (e.g., kptr). Since kptrs may be allocated from bpf memory allocator, migrate_{disable|enable} pairs are necessary for the freeing of these kptrs. To simplify reasoning about when migrate_disable() is needed for the freeing of these dynamically-allocated kptrs, let the caller to guarantee migration is disabled before invoking bpf_obj_free_fields(). Therefore, the patch adds migrate_{disable|enable} pair in bpf_sock_storage_free(). The migrate_{disable|enable} pairs in the underlying implementation of bpf_obj_free_fields() will be removed by The following patch. Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-8-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> net/core/bpf_sk_storage.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit e319cdc8956645b6e29a3809924647953500b7e1 Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:18 2025 +0800 bpf: Disable migration when destroying inode storage When destroying inode storage, it invokes bpf_local_storage_destroy() to remove all storage elements saved in the inode storage. The destroy procedure will call bpf_selem_free() to free the element, and bpf_selem_free() calls bpf_obj_free_fields() to free the special fields in map value (e.g., kptr). Since kptrs may be allocated from bpf memory allocator, migrate_{disable|enable} pairs are necessary for the freeing of these kptrs. To simplify reasoning about when migrate_disable() is needed for the freeing of these dynamically-allocated kptrs, let the caller to guarantee migration is disabled before invoking bpf_obj_free_fields(). Therefore, the patch adds migrate_{disable|enable} pair in bpf_inode_storage_free(). The migrate_{disable|enable} pairs in the underlying implementation of bpf_obj_free_fields() will be removed by the following patch. Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-7-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/bpf_inode_storage.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 9e6c958b546692fcdd0da2c2c3b2ac1da6e0233f Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:17 2025 +0800 bpf: Remove migrate_{disable|enable} from bpf_task_storage_lock helpers Three callers of bpf_task_storage_lock() are ->map_lookup_elem, ->map_update_elem, ->map_delete_elem from bpf syscall. BPF syscall for these three operations of task storage has already disabled migration. Another two callers are bpf_task_storage_get() and bpf_task_storage_delete() helpers which will be used by BPF program. Two callers of bpf_task_storage_trylock() are bpf_task_storage_get() and bpf_task_storage_delete() helpers. The running contexts of these helpers have already disabled migration. Therefore, it is safe to remove migrate_{disable|enable} from task storage lock helpers for these call sites. However, bpf_task_storage_free() also invokes bpf_task_storage_lock() and its running context doesn't disable migration, therefore, add the missed migrate_{disable|enable} in bpf_task_storage_free(). Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-6-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/bpf_task_storage.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 25dc65f75b08281a42823673d1751c82618ce7a3 Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:16 2025 +0800 bpf: Remove migrate_{disable|enable} from bpf_cgrp_storage_lock helpers Three callers of bpf_cgrp_storage_lock() are ->map_lookup_elem, ->map_update_elem, ->map_delete_elem from bpf syscall. BPF syscall for these three operations of cgrp storage has already disabled migration. Two call sites of bpf_cgrp_storage_trylock() are bpf_cgrp_storage_get(), and bpf_cgrp_storage_delete() helpers. The running contexts of these helpers have already disabled migration. Therefore, it is safe to remove migrate_disable() for these callers. However, bpf_cgrp_storage_free() also invokes bpf_cgrp_storage_lock() and its running context doesn't disable migration. Therefore, also add the missed migrate_{disabled|enable} in bpf_cgrp_storage_free(). Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-5-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/bpf_cgrp_storage.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 53f2ba0b1cc087a597b43e63d35f355e9348bd61 Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:15 2025 +0800 bpf: Remove migrate_{disable|enable} in htab_elem_free htab_elem_free() has two call-sites: delete_all_elements() has already disabled migration, free_htab_elem() is invoked by other 4 functions: __htab_map_lookup_and_delete_elem, __htab_map_lookup_and_delete_batch, htab_map_update_elem and htab_map_delete_elem. BPF syscall has already disabled migration before invoking ->map_update_elem, ->map_delete_elem, and ->map_lookup_and_delete_elem callbacks for hash map. __htab_map_lookup_and_delete_batch() also disables migration before invoking free_htab_elem(). ->map_update_elem() and ->map_delete_elem() of hash map may be invoked by BPF program and the running context of BPF program has already disabled migration. Therefore, it is safe to remove the migration_{disable|enable} pair in htab_elem_free() Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-4-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/hashtab.c | 2 -- 1 file changed, 2 deletions(-) commit ea5b229630a631ee6a72e1f58bc40029efc1daf8 Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:14 2025 +0800 bpf: Remove migrate_{disable|enable} in ->map_for_each_callback BPF program may call bpf_for_each_map_elem(), and it will call the ->map_for_each_callback callback of related bpf map. Considering the running context of bpf program has already disabled migration, remove the unnecessary migrate_{disable|enable} pair in the implementations of ->map_for_each_callback. To ensure the guarantee will not be voilated later, also add cant_migrate() check in the implementations. Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-3-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/arraymap.c | 6 ++---- kernel/bpf/hashtab.c | 11 +++++------ 2 files changed, 7 insertions(+), 10 deletions(-) commit 1b1a01db17af7a44cae8d8d7d7a18dbb056be40f Author: Hou Tao <houtao1@huawei.com> Date: Wed Jan 8 09:07:13 2025 +0800 bpf: Remove migrate_{disable|enable} from LPM trie Both bpf program and bpf syscall may invoke ->update or ->delete operation for LPM trie. For bpf program, its running context has already disabled migration explicitly through (migrate_disable()) or implicitly through (preempt_disable() or disable irq). For bpf syscall, the migration is disabled through the use of bpf_disable_instrumentation() before invoking the corresponding map operation callback. Therefore, it is safe to remove the migrate_{disable|enable){} pair from LPM trie. Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250108010728.207536-2-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/lpm_trie.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit e4b6b665df815b4841e71b72f06446884e8aad40 Author: Aaro Koskinen <aaro.koskinen@iki.fi> Date: Thu Jan 2 20:19:51 2025 +0200 fbdev: omap: use threaded IRQ for LCD DMA When using touchscreen and framebuffer, Nokia 770 crashes easily with: BUG: scheduling while atomic: irq/144-ads7846/82/0x00010000 Modules linked in: usb_f_ecm g_ether usb_f_rndis u_ether libcomposite configfs omap_udc ohci_omap ohci_hcd CPU: 0 UID: 0 PID: 82 Comm: irq/144-ads7846 Not tainted 6.12.7-770 #2 Hardware name: Nokia 770 Call trace: unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x54/0x5c dump_stack_lvl from __schedule_bug+0x50/0x70 __schedule_bug from __schedule+0x4d4/0x5bc __schedule from schedule+0x34/0xa0 schedule from schedule_preempt_disabled+0xc/0x10 schedule_preempt_disabled from __mutex_lock.constprop.0+0x218/0x3b4 __mutex_lock.constprop.0 from clk_prepare_lock+0x38/0xe4 clk_prepare_lock from clk_set_rate+0x18/0x154 clk_set_rate from sossi_read_data+0x4c/0x168 sossi_read_data from hwa742_read_reg+0x5c/0x8c hwa742_read_reg from send_frame_handler+0xfc/0x300 send_frame_handler from process_pending_requests+0x74/0xd0 process_pending_requests from lcd_dma_irq_handler+0x50/0x74 lcd_dma_irq_handler from __handle_irq_event_percpu+0x44/0x130 __handle_irq_event_percpu from handle_irq_event+0x28/0x68 handle_irq_event from handle_level_irq+0x9c/0x170 handle_level_irq from generic_handle_domain_irq+0x2c/0x3c generic_handle_domain_irq from omap1_handle_irq+0x40/0x8c omap1_handle_irq from generic_handle_arch_irq+0x28/0x3c generic_handle_arch_irq from call_with_stack+0x1c/0x24 call_with_stack from __irq_svc+0x94/0xa8 Exception stack(0xc5255da0 to 0xc5255de8) 5da0: 00000001 c22fc620 00000000 00000000 c08384a8 c106fc00 00000000 c240c248 5dc0: c113a600 c3f6ec30 00000001 00000000 c22fc620 c5255df0 c22fc620 c0279a94 5de0: 60000013 ffffffff __irq_svc from clk_prepare_lock+0x4c/0xe4 clk_prepare_lock from clk_get_rate+0x10/0x74 clk_get_rate from uwire_setup_transfer+0x40/0x180 uwire_setup_transfer from spi_bitbang_transfer_one+0x2c/0x9c spi_bitbang_transfer_one from spi_transfer_one_message+0x2d0/0x664 spi_transfer_one_message from __spi_pump_transfer_message+0x29c/0x498 __spi_pump_transfer_message from __spi_sync+0x1f8/0x2e8 __spi_sync from spi_sync+0x24/0x40 spi_sync from ads7846_halfd_read_state+0x5c/0x1c0 ads7846_halfd_read_state from ads7846_irq+0x58/0x348 ads7846_irq from irq_thread_fn+0x1c/0x78 irq_thread_fn from irq_thread+0x120/0x228 irq_thread from kthread+0xc8/0xe8 kthread from ret_from_fork+0x14/0x28 As a quick fix, switch to a threaded IRQ which provides a stable system. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Helge Deller <deller@gmx.de> drivers/video/fbdev/omap/lcd_dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit de124b61e179e690277116e6be512e4f422b5dd8 Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Wed Jan 8 10:15:37 2025 +0900 fbdev: omapfb: Fix an OF node leak in dss_of_port_get_parent_device() dss_of_port_get_parent_device() leaks an OF node reference when i >= 2 and struct device_node *np is present. Since of_get_next_parent() obtains a reference of the returned OF node, call of_node_put() before returning NULL. This was found by an experimental verifier that I am developing, and no runtime test was able to be performed due to that lack of actual devices. Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Helge Deller <deller@gmx.de> drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 1 + 1 file changed, 1 insertion(+) commit 021e111ed08d135963fe3e13d8264b82b2a147dc Author: Shixiong Ou <oushixiong@kylinos.cn> Date: Fri Jan 3 11:26:33 2025 +0800 fbdev: efifb: Change the return value type to void efifb_setup() doesn't need to return a value. Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn> Signed-off-by: Helge Deller <deller@gmx.de> drivers/video/fbdev/efifb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1d45a1cd9f3ae849db868e07e5fee5e5b37eff55 Author: Gaurav Kashyap <quic_gaurkash@quicinc.com> Date: Thu Dec 12 20:19:51 2024 -0800 firmware: qcom: scm: add calls for wrapped key support Add helper functions for the SCM calls required to support hardware-wrapped inline storage encryption keys. These SCM calls manage wrapped keys via Qualcomm's Hardware Key Manager (HWKM), which can only be accessed from TrustZone. QCOM_SCM_ES_GENERATE_ICE_KEY and QCOM_SCM_ES_IMPORT_ICE_KEY create a new long-term wrapped key, with the former making the hardware generate the key and the latter importing a raw key. QCOM_SCM_ES_PREPARE_ICE_KEY converts the key to ephemerally-wrapped form so that it can be used for inline storage encryption. These are planned to be wired up to new ioctls via the blk-crypto framework; see the proposed documentation for the hardware-wrapped keys feature for more information. Similarly there's also QCOM_SCM_ES_DERIVE_SW_SECRET which derives a "software secret" from an ephemerally-wrapped key and will be wired up to the corresponding operation in the blk_crypto_profile. These will all be used by the ICE driver in drivers/soc/qcom/ice.c. [EB: merged related patches, fixed error handling, fixed naming, fixed docs for size parameters, fixed qcom_scm_has_wrapped_key_support(), improved comments, improved commit message.] Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Eric Biggers <ebiggers@google.com> Link: https://lore.kernel.org/r/20241213041958.202565-9-ebiggers@kernel.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/firmware/qcom/qcom_scm.c | 214 +++++++++++++++++++++++++++++++++ drivers/firmware/qcom/qcom_scm.h | 4 + include/linux/firmware/qcom/qcom_scm.h | 8 ++ 3 files changed, 226 insertions(+) commit 3259ff4eff330f8451e8f569951752f5aea38405 Author: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Date: Mon Dec 16 11:41:19 2024 -0800 drm/xe/slpc: Remove unnecessary force wakes FORCEWAKE_ALL is not needed when we are trying to read the cur_freq, we just need to wake up the GT domain. We also do not need a force wake to for a H2G query to obtain min frequency. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241216194119.3017792-1-vinay.belgaumkar@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/xe_guc_pc.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) commit 46316370e9257647d81c13782a6201a2256d6f1d Author: Stephan Gerhold <stephan@gerhold.net> Date: Thu Nov 14 23:07:18 2024 +0100 arm64: dts: qcom: msm8916-samsung-serranove: Add display panel Add the Samsung S6E88A0-AMS427AP24 panel to the device tree for the Samsung Galaxy S4 Mini Value Edition. By default the panel displays everything horizontally flipped, so add "flip-horizontal" to the panel node to correct that. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Co-developed-by: Jakob Hauser <jahau@rocketmail.com> Signed-off-by: Jakob Hauser <jahau@rocketmail.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241114220718.12248-1-jahau@rocketmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../boot/dts/qcom/msm8916-samsung-serranove.dts | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 9eb81b31ab62cfaa243c6fe948b9f7cfdfdad666 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Tue Nov 26 11:22:51 2024 +0100 arm64: dts: qcom: sm8650: Add 'global' interrupt to the PCIe RC nodes Qcom PCIe RC controllers are capable of generating 'global' SPI interrupt to the host CPUs. This interrupt can be used by the device driver to identify events such as PCIe link specific events, safety events, etc... Hence, add it to the PCIe RC node along with the existing MSI interrupts. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20241126-topic-sm8x50-pcie-global-irq-v1-3-4049cfccd073@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8650.dtsi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 3e14b14ec8b94c954d8d09230686cdaf5162f3ce Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Tue Nov 26 11:22:50 2024 +0100 arm64: dts: qcom: sm8550: Add 'global' interrupt to the PCIe RC nodes Qcom PCIe RC controllers are capable of generating 'global' SPI interrupt to the host CPUs. This interrupt can be used by the device driver to identify events such as PCIe link specific events, safety events, etc... Hence, add it to the PCIe RC node along with the existing MSI interrupts. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20241126-topic-sm8x50-pcie-global-irq-v1-2-4049cfccd073@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8550.dtsi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 6888a9559053cd3ee6a116f34edba8d2793b5697 Author: Rob Herring (Arm) <robh@kernel.org> Date: Fri Nov 15 13:34:34 2024 -0600 arm64: dts: qcom: Remove unused and undocumented properties Remove properties which are both unused in the kernel and undocumented. Most likely they are leftovers from downstream. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241115193435.3618831-1-robh@kernel.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/msm8994-msft-lumia-octagon.dtsi | 5 ----- arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 1 - 2 files changed, 6 deletions(-) commit cddaf231361d83a0605d51a8b70855eb57a58131 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Fri Nov 15 11:20:54 2024 +0100 arm64: dts: qcom: sdm450-lenovo-tbx605f: add DSI panel nodes Add the necessary nodes to enable the DSI panel on the Lenovo Smart Tab M10 tablet. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241115-topic-sdm450-upstream-lab-ibb-v1-2-8a8e74befbfe@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sdm450-lenovo-tbx605f.dts | 97 ++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit f8ed8fd08426df23037fd73e9f1c3cfdef827769 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Fri Nov 15 11:20:53 2024 +0100 arm64: dts: qcom: pmi8950: add LAB-IBB nodes Add the PMI8950 LAB-IBB regulator nodes, with the PMI8998 compatible as fallback. The LAB-IBB regulators are used as panels supplies on existing phones or tablets. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241115-topic-sdm450-upstream-lab-ibb-v1-1-8a8e74befbfe@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/pmi8950.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 8e6854efd4738d3c9e6fdfeff8df726d454d4c7d Author: Luca Weiss <luca.weiss@fairphone.com> Date: Fri Dec 20 09:39:44 2024 +0100 soc: qcom: pd_mapper: Add SM7225 compatible The Qualcomm SM7225 is practically identical to SM6350, so add an entry using that data. Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> Link: https://lore.kernel.org/r/20241220-pd-mapper-sm7225-v1-1-68f85a87288d@fairphone.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/soc/qcom/qcom_pd_mapper.c | 1 + 1 file changed, 1 insertion(+) commit 542243af7182efaeaf6d0f4643f7de437541a9af Author: Eugen Hristev <eugen.hristev@linaro.org> Date: Wed Jan 1 13:19:21 2025 +0200 pstore/blk: trivial typo fixes Fix trivial typos in comments. Fixes: 2a03ddbde1e1 ("pstore/blk: Move verify_size() macro out of function") Fixes: 17639f67c1d6 ("pstore/blk: Introduce backend for block devices") Signed-off-by: Eugen Hristev <eugen.hristev@linaro.org> Link: https://lore.kernel.org/r/20250101111921.850406-1-eugen.hristev@linaro.org Signed-off-by: Kees Cook <kees@kernel.org> fs/pstore/blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b6f4f8c7690cf117ac40837a870d4d309c23c899 Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Wed Dec 4 19:44:16 2024 +0530 arm64: dts: qcom: ipq5424: enable the download mode support Enable support for download mode to collect RAM dumps in case of system crash, facilitating post mortem analysis. Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241204141416.1352545-3-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/ipq5424.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 2561c1377d4153ad1e31878eaa9b6a8d2975a71a Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Wed Dec 4 19:06:27 2024 +0530 arm64: dts: qcom: ipq5424: add scm node Add an scm node to interact with the secure world. Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241204133627.1341760-3-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/ipq5424.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 6cf5e9a6d260c117dc1dbcb0bf781ddb4ad5393a Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Wed Dec 4 19:06:26 2024 +0530 dt-bindings: firmware: qcom,scm: Document ipq5424 SCM Document the scm compatible for ipq5424 SoC. Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241204133627.1341760-2-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/firmware/qcom,scm.yaml | 1 + 1 file changed, 1 insertion(+) commit 37c3ddfe5238d88b6ec091ecdf967848bce067c2 Author: Maxim Levitsky <mlevitsk@redhat.com> Date: Thu Dec 19 17:10:34 2024 -0500 KVM: VMX: read the PML log in the same order as it was written Intel's PRM specifies that the CPU writes to the PML log 'backwards' or in other words, it first writes entry 511, then entry 510 and so on. I also confirmed on the bare metal that the CPU indeed writes the entries in this order. KVM on the other hand, reads the entries in the opposite order, from the last written entry and towards entry 511 and dumps them in this order to the dirty ring. Usually this doesn't matter, except for one complex nesting case: KVM reties the instructions that cause MMU faults. This might cause an emulated PML log entry to be visible to L1's hypervisor before the actual memory write was committed. This happens when the L0 MMU fault is followed directly by the VM exit to L1, for example due to a pending L1 interrupt or due to the L1's 'PML log full' event. This problem doesn't have a noticeable real-world impact because this write retry is not much different from the guest writing to the same page multiple times, which is also not reflected in the dirty log. The users of the dirty logging only rely on correct reporting of the clean pages, or in other words they assume that if a page is clean, then no writes were committed to it since the moment it was marked clean. However KVM has a kvm_dirty_log_test selftest, a test that tests both the clean and the dirty pages vs the memory contents, and can fail if it detects a dirty page which has an old value at the offset 0 which the test writes. To avoid failure, the test has a workaround for this specific problem: The test skips checking memory that belongs to the last dirty ring entry, which it has seen, relying on the fact that as long as memory writes are committed in-order, only the last entry can belong to a not yet committed memory write. However, since L1's KVM is reading the PML log in the opposite direction that L0 wrote it, the last dirty ring entry often will be not the last entry written by the L0. To fix this, switch the order in which KVM reads the PML log. Note that this issue is not present on the bare metal, because on the bare metal, an update of the A/D bits of a present entry, PML logging and the actual memory write are all done by the CPU without any hypervisor intervention and pending interrupt evaluation, thus once a PML log and/or vCPU kick happens, all memory writes that are in the PML log are committed to memory. The only exception to this rule is when the guest hits a not present EPT entry, in which case KVM first reads (backward) the PML log, dumps it to the dirty ring, and *then* sets up a SPTE entry with A/D bits set, and logs this to the dirty ring, thus making the entry be the last one in the dirty ring. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241219221034.903927-3-mlevitsk@redhat.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/vmx/vmx.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit ae81ce936ff945f149dc17f18cb05c33e2146b13 Author: Maxim Levitsky <mlevitsk@redhat.com> Date: Thu Dec 19 17:10:33 2024 -0500 KVM: VMX: refactor PML terminology Rename PML_ENTITY_NUM to PML_LOG_NR_ENTRIES Add PML_HEAD_INDEX to specify the first entry that CPU writes. No functional change intended. Suggested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241219221034.903927-2-mlevitsk@redhat.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/vmx/main.c | 2 +- arch/x86/kvm/vmx/nested.c | 2 +- arch/x86/kvm/vmx/vmx.c | 10 +++++----- arch/x86/kvm/vmx/vmx.h | 5 ++++- 4 files changed, 11 insertions(+), 8 deletions(-) commit a9a5e0bdc5a77a7c662ad4be0ad661f0b0d5e99d Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Tue Jan 7 09:38:57 2025 +0100 hardening: Document INIT_STACK_ALL_PATTERN behavior with GCC The help text for INIT_STACK_ALL_PATTERN documents the patterns used by Clang, but lacks documentation for GCC. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/293d29d6a0d1823165be97285c1bc73e90ee9db8.1736239070.git.geert+renesas@glider.be Signed-off-by: Kees Cook <kees@kernel.org> security/Kconfig.hardening | 1 + 1 file changed, 1 insertion(+) commit 4d141e444e26f12c1bacfc39f66ab8de04deac1b Author: Gao Shiyuan <gaoshiyuan@baidu.com> Date: Fri Jan 3 23:38:14 2025 +0800 KVM: VMX: Fix comment of handle_vmx_instruction() Fix a goof in handle_vmx_instruction()'s comment where it references the non-existent nested_vmx_setup(); the function that overwrites the exit handlers is nested_vmx_hardware_setup(). Note, this isn't a case of a stale comment, e.g. due to the function being renamed. The comment has always been wrong. Fixes: e4027cfafd78 ("KVM: nVMX: Set callbacks for nested functions during hardware setup") Signed-off-by: Gao Shiyuan <gaoshiyuan@baidu.com> Link: https://lore.kernel.org/r/20250103153814.73903-1-gaoshiyuan@baidu.com [sean: massage changelog] Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5fd06847320bed445fc1e77f9066ecdaf1efbec Author: Costas Argyris <costas.argyris@amd.com> Date: Thu Jan 2 15:40:50 2025 +0000 KVM: VMX: Reinstate __exit attribute for vmx_exit() Tag vmx_exit() with __exit now that it's no longer used by vmx_init(). Commit a7b9020b06ec ("x86/l1tf: Handle EPT disabled state proper") dropped the "__exit" attribute from vmx_exit() because vmx_init() was changed to call vmx_exit(). However, commit e32b120071ea ("KVM: VMX: Do _all_ initialization before exposing /dev/kvm to userspace") changed vmx_init() to call __vmx_exit() instead of the "full" vmx_exit(). This made it possible to mark vmx_exit() as "__exit" again, as it originally was, and enjoy the benefits that it provides (the function can be discarded from memory in situations where it cannot be called, like the module being built-in or module unloading being disabled in the kernel). Signed-off-by: Costas Argyris <costas.argyris@amd.com> Link: https://lore.kernel.org/r/20250102154050.2403-1-costas.argyris@amd.com [sean: massage changelog] Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 800173cf7560e00c5e2587cba00ce3384cf13532 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Fri Dec 27 10:44:51 2024 +0100 KVM: SVM: Use str_enabled_disabled() helper in sev_hardware_setup() Remove hard-coded strings by using the str_enabled_disabled() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Pavan Kumar Paluri <papaluri@amd.com> Reviewed-by: Nikunj A Dadhania <nikunj@amd.com> Link: https://lore.kernel.org/r/20241227094450.674104-2-thorsten.blum@linux.dev Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/svm/sev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4c20cd4cee929aef89118ac8820cefab427c6ae1 Author: Sean Christopherson <seanjc@google.com> Date: Fri Dec 20 17:16:47 2024 -0800 KVM: x86: Avoid double RDPKRU when loading host/guest PKRU Use the raw wrpkru() helper when loading the guest/host's PKRU on switch to/from guest context, as the write_pkru() wrapper incurs an unnecessary rdpkru(). In both paths, KVM is guaranteed to have performed RDPKRU since the last possible write, i.e. KVM has a fresh cache of the current value in hardware. This effectively restores KVM's behavior to that of KVM prior to commit c806e88734b9 ("x86/pkeys: Provide *pkru() helpers"), which renamed the raw helper from __write_pkru() => wrpkru(), and turned __write_pkru() into a wrapper. Commit 577ff465f5a6 ("x86/fpu: Only write PKRU if it is different from current") then added the extra RDPKRU to avoid an unnecessary WRPKRU, but completely missed that KVM already optimized away pointless writes. Reported-by: Adrian Hunter <adrian.hunter@intel.com> Fixes: 577ff465f5a6 ("x86/fpu: Only write PKRU if it is different from current") Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20241221011647.3747448-1-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d6470627f5840057ae4d94ed070ec23457cb60d6 Author: Liam Ni <zhiguangni01@gmail.com> Date: Wed Jan 8 14:05:19 2025 -0800 KVM: x86: Use LVT_TIMER instead of an open coded literal Use LVT_TIMER instead of the literal '0' to clean up the apic_lvt_mask lookup when emulating handling writes to APIC_LVTT. No functional change intended. Signed-off-by: Liam Ni <zhiguangni01@gmail.com> [sean: manually regenerate patch (whitespace damaged), massage changelog] Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/lapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e18b099672160698dfbd7c3c82e03e011c907e6 Author: Linus Walleij <linus.walleij@linaro.org> Date: Wed Jan 8 22:52:44 2025 +0100 pinctrl: mediatek: Drop mtk_pinconf_bias_set_pd() This function is unused and causing compile errors, delete it. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Link: https://lore.kernel.org/linux-next/20250106164630.4447cd0d@canb.auug.org.au/ Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 4b92b79c5645b21e529caa65100e4797d3d4c87c Author: Willy Tarreau <w@1wt.eu> Date: Sun Sep 8 12:00:12 2024 +0200 selftests/nolibc: run-tests.sh: detect missing toolchain The script tries to resolve the path to the current toolchain using realpath, which fails in case it's not installed, and since it's run under -e, it doesn't have the opportunity to display a help message. Let's detect the absence of the required toolchain before running that command and provide a friendlier message when this happens. Link: https://lore.kernel.org/all/ZtlQbpgpn9OQOPyI@1wt.eu/ Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> tools/testing/selftests/nolibc/run-tests.sh | 7 +++++++ 1 file changed, 7 insertions(+) commit c6aac2fa77a3221f2ed0484bf019030f0749d863 Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Fri Dec 20 10:29:36 2024 -0500 drm/xe: Introduce the RPa information RPa is the Achievable frequency, defined by PCODE at runtime based on multiple running conditions. v2: Remove RPA_MASK from i915 file Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241220152936.623627-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/regs/xe_regs.h | 4 +++ drivers/gpu/drm/xe/xe_gt_freq.c | 15 ++++++++++ drivers/gpu/drm/xe/xe_guc_pc.c | 53 ++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/xe/xe_guc_pc.h | 1 + drivers/gpu/drm/xe/xe_guc_pc_types.h | 2 ++ 5 files changed, 73 insertions(+), 2 deletions(-) commit 6bfb4c571b8896df479e6b82a241ea7055ec4b55 Author: Ian Rogers <irogers@google.com> Date: Tue Jan 7 21:15:11 2025 -0800 perf test cpumap: Avoid use-after-free following merge Previously cpu maps in the test weren't modified by calls to the cpu map API, however, perf_cpu_map__merge was modified so the left hand argument was updated. In the test this meant the maps copy of the "two" map was put/deleted in the merge meaning when accessed via maps, the pointer was stale and to the put/deleted memory. To fix this add an extra layer of indirection to the maps array, so the updated value of two is accessed. Fixes: a9d2217556f7745e ("libperf cpumap: Refactor perf_cpu_map__merge()") Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20250108051511.1720369-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/cpumap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9c64c7c658265f93350aedf77c6b4055ebd71688 Author: Dmitry Vyukov <dvyukov@google.com> Date: Wed Jan 8 08:02:28 2025 +0100 perf llvm-add2line: Remove unused symbol_conf.h include Remove unused symbol_conf.h include. First, it's just unused. Second, it's problematic since this is a C++ file, and most perf headers don't compile as C++. So if any other includes are added to symbol_conf.h, it may break the build. Signed-off-by: Dmitriy Vyukov <dvyukov@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20250108070248.237943-1-dvyukov@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/llvm-c-helpers.cpp | 1 - 1 file changed, 1 deletion(-) commit 58f4f294b358861adaee68dfd19da1060058ec27 Author: James Clark <james.clark@linaro.org> Date: Mon Jan 6 16:42:58 2025 +0000 perf test trace_btf_general: Fix shellcheck warning Shellcheck versions < v0.7.2 can't follow this path so add the helper to fix the following warning: tests/shell/trace_btf_general.sh line 8: . "$(dirname $0)"/lib/probe.sh ^--------------------------^ SC1090: Can't follow non-constant source. Use a directive to specify location. Fixes: 0255338d69754a02 ("perf trace: Add tests for BTF general augmentation") Signed-off-by: James Clark <james.clark@linaro.org> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20250106164300.734202-1-james.clark@linaro.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/shell/trace_btf_general.sh | 1 + 1 file changed, 1 insertion(+) commit 64a7617efd5ae1d57a75e464d7134eec947c3fe3 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Fri Dec 6 17:48:28 2024 -0300 perf namespaces: Fixup the nsinfo__in_pidns() return type, its bool When adding support for refconunt checking a cut'n'paste made this function, that is just an accessor to a bool member of 'struct nsinfo', return a pid_t, when that member is a boolean, fix it. Fixes: bcaf0a97858de7ab ("perf namespaces: Add functions to access nsinfo") Reported-by: Francesco Nigro <fnigro@redhat.com> Reported-by: Ilan Green <igreen@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Clark Williams <williams@redhat.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Yonatan Goldschmidt <yonatan.goldschmidt@granulate.io> Link: https://lore.kernel.org/r/20241206204828.507527-6-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/namespaces.c | 2 +- tools/perf/util/namespaces.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 74833e37dfc6ff38e0708d613337828fe2a552a3 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Fri Dec 6 17:48:27 2024 -0300 perf jitdump: Fixup in_pidns member when java agent and 'perf record' are not in the same pidns When running 'perf record' outside a container and the java agent inside a container the jit_repipe_code_load() and friends will emit PERF_RECORD_MMAP2 entries for the jitdump records and will check if we need to fixup the pid/tid: nspid = jr->load.pid; pid = jr_entry_pid(jd, jr); tid = jr_entry_tid(jd, jr); The jr_entry_pid() function looks if we're in the same pidns: static pid_t jr_entry_pid(struct jit_buf_desc *jd, union jr_entry *jr) { if (jd->nsi && nsinfo__in_pidns(jd->nsi)) return nsinfo__tgid(jd->nsi); return jr->load.pid; } But since the thread, populated from perf.data records, try to figure out if in the same pidns by actually trying, on the system where 'perf inject' is running to open a procfs file (a bug that remains to be fixed), assuming that if it is not possible that is because that thread terminated and thus we can't get its namespace info and tolerates nsinfo__init() failing, noting only that that namespace can't be entered, so don't even try. But we can kinda get at least that info (thread->nsinfo->in_pidns) from the data in the perf.data file, namely the pid and tid in the PERF_RECORD_MMAP2 for the jit-<PID>.dump file generated from the java agent, if the PERF_RECORD_MMAP2->pid is the same as what is in the jitdump file, then we're in the same namespace, otherwise we need to use the PERF_RECORD_MMAP2->pid. This all has to be revamped for this jitdump + running perf from outside, as the meaning of in_pidns is being abused, the initialization of nsinfo->pid with the value coming from the PERF_RECORD_MMAP2 data is wrong as it is the pid _outside_ the container since perf was running there. The hack in this patch at least produces the expected result in this scenario by following the assumptions in the current codebase for finding maps and for generating the PERF_RECORD_MMAP2 for the ELF files synthesized from the jitdump records in jit_repipe_code_load(), etc.s Reported-by: Francesco Nigro <fnigro@redhat.com> Reported-by: Ilan Green <igreen@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Clark Williams <williams@redhat.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Yonatan Goldschmidt <yonatan.goldschmidt@granulate.io> Link: https://lore.kernel.org/r/20241206204828.507527-5-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/jitdump.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 9c6a585d257f6845731f4e36b45fe42b5c3162f5 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Fri Dec 6 17:48:26 2024 -0300 perf namespaces: Introduce nsinfo__set_in_pidns() When we're processing a perf.data file we will, for every thread in that file do a machine__findnew_thread(machine, pid, tid) that when that pid is seen for the first time will create a 'struct thread' representing it. That in turn will call nsinfo__new() -> nsinfo__init() and there it will assume we're running live, which is wrong and will need to be addressed in a followup patch. The nsinfo__new() assumes that if we can't access that thread it has already finished and will ignore the -1 return from nsinfo__init(), just taking notes to avoid trying to enter in that namespace, since it isn't there anymore, a race. When doing this from 'perf inject', tho, we can fill in parts of that nsinfo from what we get from the PERF_RECORD_MMAP2 (pid, tid) and in the jitdump file name, that has the form of jit-<PID>.dump. So if the pid in the jitdump file name is not the one in the PERF_RECORD_MMAP2, we can assume that its the pid of the process _inside_ the namespace, and that perf was runing outside that namespace. This will be done in the following patch. Reported-by: Francesco Nigro <fnigro@redhat.com> Reported-by: Ilan Green <igreen@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Clark Williams <williams@redhat.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Yonatan Goldschmidt <yonatan.goldschmidt@granulate.io> Link: https://lore.kernel.org/r/20241206204828.507527-4-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/namespaces.c | 5 +++++ tools/perf/util/namespaces.h | 1 + 2 files changed, 6 insertions(+) commit f523347ba6b63eaa814f26b056006796243af322 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Fri Dec 6 17:48:25 2024 -0300 perf jitdump: Accept jitdump mmaps emitted from inside containers When the java agent is running inside a container it will emit mmaps with the format: ⬢ [acme@toolbox a]$ perf report -D | grep PERF_RECORD_MMAP | grep \.dump 0 0x15c400 [0x90]: PERF_RECORD_MMAP2 3308868/3308868: [0x7fb8de6cb000(0x1000) @ 0 08:14 3222905945 0]: r-xp /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jit-1.dump ⬢ [acme@toolbox a]$ Since perf is running from outside the container it sees the pid 3308868 in PERF_RECORD_MMAP2, while the agent saw the pid of the profiled app inside the container, 1. The previous validation was: if (pid && pid2 != nsinfo__nstgid(nsi)) pid2 at this point is '1' (/jit-1.dump), so it considers this as a malformed jitdump mmap and refuses to process it. The test ends up as: if (3308868 && 1 != 3308868) which is true and the jitdump is not processed. Since 1 in the container namespace is really 3308868 in the namespace that perf is running, consider this a valid mmap. We need to make perf realize this and behave accordingly, for now checking instead: if (pid && pid2 && pid != nsinfo__nstgid(nsi)) Translating to: if (3308868 && 1 && 3308868 != 3308868) Will make the jitdump mmap to be considered valid and processed. The jitdump is described in: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/Documentation/jitdump-specification.txt Now we end up with the expected flurry of MMAPs, one per jitted function transformed into a little ELF file that should then be processable by the other perf features, like code annotation: [acme@toolbox a]$ echo $JITDUMPDIR /tmp/.debug/jit [acme@toolbox a]$ First use 'perf inject': ⬢ [acme@toolbox a]$ time perf inject -i perf.data -o acme-perf-injected.data -j Then look at the PERF_RECORD_MMAP events in the result file, that went thru the JIT map file: ⬢ [acme@toolbox a]$ ls -la /tmp/*.map -rw-r--r--. 1 acme acme 2989559 Nov 27 16:11 /tmp/perf-3308868.map [acme@toolbox a]$ It is a symbol table: ⬢ [acme@toolbox a]$ head /tmp/*.map 0x00007fb8bda5c1a0 0x00000000000000d0 java.lang.String java.lang.module.ModuleDescriptor.name() 0x00007fb8bda5c4a0 0x0000000000000178 int java.lang.StringLatin1.hashCode(byte[]) 0x00007fb8bda5c9a0 0x00000000000000d0 java.lang.String org.springframework.boot.context.config.ConfigDataLocation.getValue() 0x00007fb8bda5cca0 0x00000000000000d0 java.lang.module.ModuleDescriptor java.lang.module.ModuleReference.descriptor() 0x00007fb8bda5cfa0 0x00000000000000d0 java.lang.Object java.util.KeyValueHolder.getKey() 0x00007fb8bda5d2a0 0x00000000000000d0 java.lang.Object java.util.KeyValueHolder.getValue() 0x00007fb8bda5d5a0 0x0000000000000218 boolean jdk.internal.misc.Unsafe.compareAndSetReference(java.lang.Object, long, java.lang.Object, java.lang.Object) 0x00007fb8bda5d9a0 0x00000000000001f0 boolean jdk.internal.misc.Unsafe.compareAndSetLong(java.lang.Object, long, long, long) 0x00007fb8bda5dda0 0x00000000000001f8 void java.lang.System.arraycopy(java.lang.Object, int, java.lang.Object, int, int) 0x00007fb8bda5e1a0 0x00000000000001e8 int java.lang.Object.hashCode() ⬢ [acme@toolbox a]$ As specified in: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/Documentation/jit-interface.txt This was collected from inside the container, so came as /tmp/perf-1.map. To make perf, running outside the container to use it we need to copy it to /tmp/perf-3308868.map. This is another logic that has to be added to perf to work on this scenario of running outside the container but processing things created by the hava agent running inside the container. With all this in place we get to: ⬢ [acme@toolbox a]$ perf report -D -i acme-perf-injected.data | \ grep PERF_RECORD_MMAP > /tmp/acme-perf-injected.data.mmaps ; \ wc -l /tmp/acme-perf-injected.data.mmaps 44182 /tmp/acme-perf-injected.data.mmaps ⬢ [acme@toolbox a]$ tail /tmp/acme-perf-injected.data.mmaps 1030266786574466 0x7bc9e0 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0ceb1c0(0x8d0) @ 0x80 00:2c 238715 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43989.so 1030266795288774 0x7bca78 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0cecc00(0x7e8) @ 0x80 00:2c 238716 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43990.so 1030266895967339 0x7bcb10 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0cee500(0x3328) @ 0x80 00:2c 238717 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43991.so 1030266915748306 0x7bcba8 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0aae0a0(0x138) @ 0x80 00:2c 238718 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43992.so 1030267185851220 0x7bcc40 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0cf61e0(0x3b50) @ 0x80 00:2c 238719 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43993.so 1030267231364524 0x7bccd8 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0cfea80(0x14a0) @ 0x80 00:2c 238720 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43994.so 1030267425498831 0x7bcd70 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c054b4a0(0x338) @ 0x80 00:2c 238721 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43995.so 1030267506147888 0x7bce08 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0a995c0(0x1e8) @ 0x80 00:2c 238722 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43996.so 1030268112586116 0x7bcea0 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0d02520(0x258) @ 0x80 00:2c 238723 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43997.so 1030269435398150 0x7bcf38 [0x98]: PERF_RECORD_MMAP2 1/78: [0x7fb8c0d02dc0(0x278) @ 0x80 00:2c 238724 1]: --xs /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43998.so ⬢ [acme@toolbox a]$ And if we look at those tiny ELF files generated by the jitdump code used by 'perf inject' we see: ⬢ [acme@toolbox a]$ file /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43989.so /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43989.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=790591db95a77d644657dfe5058658b200000000, with debug_info, not stripped ⬢ [acme@toolbox a]$ file /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43990.so /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43990.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=762f932acbee53a22638bf4c2b86780200000000, with debug_info, not stripped ⬢ [acme@toolbox a]$ ⬢ [acme@toolbox a]$ ls -la /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43989.so /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43990.so -rw-r--r--. 1 acme acme 9432 Nov 29 10:56 /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43989.so -rw-r--r--. 1 acme acme 7504 Nov 29 10:56 /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43990.so ⬢ [acme@toolbox a]$ And: ⬢ [acme@toolbox a]$ objdump -dS /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43990.so | head -20 /tmp/.debug/jit/java-jit-20241126.XXTxEIOn/jitted-1-43990.so: file format elf64-x86-64 Disassembly of section .text: 0000000000000080 <Lredacted/REDACTED/REDACTED/logging/RedactedRedacted;Redacted(Lredacted/REDACTED/REDACTED/redactedRedacted/Redacted;)V>: 80: 44 8b 56 08 mov 0x8(%rsi),%r10d 84: 49 c1 e2 03 shl $0x3,%r10 88: 49 3b c2 cmp %r10,%rax 8b: 0f 85 6f 15 83 fc jne fffffffffc831600 <Lredacted/REDACTED/REDACTED/redacted/RedactedRedactedRedacted;Redacted(Lredacted/Redacted/Redacted/redactedRedacted/Redacted;)V+0xfffffffffc831580> 91: 66 66 90 data16 xchg %ax,%ax 94: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) 9b: 00 9c: 66 66 66 90 data16 data16 xchg %ax,%ax a0: 89 84 24 00 c0 fe ff mov %eax,-0x14000(%rsp) a7: 55 push %rbp a8: 48 8b ec mov %rsp,%rbp ab: 48 83 ec 40 sub $0x40,%rsp af: 48 89 34 24 mov %rsi,(%rsp) ⬢ [acme@toolbox a]$ The thing now being investigated is why we can't annotate anything here, maybe that JITDUMPDIR is getting in the way: ⬢ [acme@toolbox a]$ perf annotate --stdio2 -i acme-perf-injected.data 'java.lang.String com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer.findSymbol(char[], int, int, int)' Error: Couldn't annotate java.lang.String com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer.findSymbol(char[], int, int, int): Internal error: Invalid -1 error code ⬢ [acme@toolbox a]$ In the tests I performed while merging this patch: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6d518ac7be6223811ab947897273b1bbef846180 It works, but then there was no JITDUMPDIR involved: /home/acme/.debug/jit/java-jit-20241127.XXF1SRgN/jitted-3912413-4191.so ⬢ [acme@toolbox perf-tools-next]$ perf report --call-graph none --no-child -i perf-injected.data | grep jitted- | head 1.36% java jitted-3912413-54.so [.] Interpreter 0.30% C1 CompilerThre jitted-3912413-1.so [.] flush_icache_stub 0.18% java jitted-3912413-4184.so [.] org.apache.fop.fo.properties.PropertyMaker.get(int, org.apache.fop.fo.PropertyList, boolean, boolean) 0.18% java jitted-3912413-4177.so [.] org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(org.apache.fop.layoutmgr.LayoutContext, int) 0.13% java jitted-3912413-3845.so [.] java.text.DecimalFormat.subformatNumber(java.lang.StringBuffer, java.text.Format$FieldDelegate, boolean, boolean, int, int, int, int) 0.11% java jitted-3912413-4191.so [.] org.apache.fop.fo.FObj.addChildNode(org.apache.fop.fo.FONode) 0.09% java jitted-3912413-2418.so [.] org.apache.fop.fo.XMLWhiteSpaceHandler.handleWhiteSpace() 0.08% Reference Handl jitted-3912413-54.so [.] Interpreter 0.08% java jitted-3912413-3326.so [.] org.apache.xmlgraphics.fonts.Glyphs.stringToGlyph(java.lang.String) 0.08% java jitted-3912413-3953.so [.] org.apache.fop.layoutmgr.BreakingAlgorithm.considerLegalBreak(org.apache.fop.layoutmgr.KnuthElement, int) ⬢ [acme@toolbox perf-tools-next]$ And then: ⬢ [acme@toolbox perf-tools-next]$ perf annotate --stdio2 -i perf-injected.data 'org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(org.apache.fop.layoutmgr.LayoutContext, int)' | head -20 Samples: 8 of event 'cpu_atom/cycles/Pu', 4000 Hz, Event count (approx.): 8112794, [percent: local period] org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(org.apache.fop.layoutmgr.LayoutContext, int)() /home/acme/.debug/jit/java-jit-20241127.XXF1SRgN/jitted-3912413-4177.so Percent 0x80 <org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(org.apache.fop.layoutmgr.LayoutContext, int)>: nop movl 0x8(%rsi),%r10d cmpl 0x8(%rax),%r10d → jne 0 movl %eax,-0x14000(%rsp) pushq %rbp subq $0xb0,%rsp nop cmpl $0x3,0x20(%r15) ↓ jne 7037 2e: movl %ecx,0x28(%rsp) movq %rdx,%rbp movl 0x64(%rdx),%ebx cmpb $0x0,0x38(%r15) ↓ jne 3a44 movq %rsi,0x30(%rsp) 48: movq 0x30(%rsp),%r10 ⬢ [acme@toolbox perf-tools-next]$ No source code nor line numbers, that I saw in another build of perf for RHEL9, for the same workload described in the cset above (a publicly available java benchmark), so something to investigate on perf upstream running on fedora, maybe some quirk with the jdk used when building perf for RHEL 9 and for Fedora 40. A related patch that should have make this all work is: "perf inject jit: Add namespaces support" https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=67dec926931448d688efb5fe34f7b5a22470fc0a But we still need to polish this some more, maybe there are differences in the agent used in NodeJS with --perf-prof and the jvmti one we're using. Hopefully describing all the steps while we investigate this case will help us improve perf support for profiling JITed environments running in containers while profiling from inside and outside it. Reported-by: Francesco Nigro <fnigro@redhat.com> Reported-by: Ilan Green <igreen@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Clark Williams <williams@redhat.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Yonatan Goldschmidt <yonatan.goldschmidt@granulate.io> Link: https://lore.kernel.org/r/20241206204828.507527-3-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/jitdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73bbf3b0fbba9aa27fef07a1fbd837661a863f03 Author: Nikunj A Dadhania <nikunj@amd.com> Date: Mon Jan 6 18:16:30 2025 +0530 x86/tsc: Init the TSC for Secure TSC guests Use the GUEST_TSC_FREQ MSR to discover the TSC frequency instead of relying on kvm-clock based frequency calibration. Override both CPU and TSC frequency calibration callbacks with securetsc_get_tsc_khz(). Since the difference between CPU base and TSC frequency does not apply in this case, the same callback is being used. [ bp: Carve out from https://lore.kernel.org/r/20250106124633.1418972-11-nikunj@amd.com ] Signed-off-by: Nikunj A Dadhania <nikunj@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20250106124633.1418972-11-nikunj@amd.com arch/x86/coco/sev/core.c | 21 +++++++++++++++++++++ arch/x86/include/asm/sev.h | 2 ++ arch/x86/kernel/tsc.c | 4 ++++ 3 files changed, 27 insertions(+) commit 7a93786c306296f15e728b1dbd949a319e4e3d19 Author: Christophe Leroy <christophe.leroy@csgroup.eu> Date: Wed Jan 8 10:15:24 2025 +0100 perf machine: Don't ignore _etext when not a text symbol Depending on how vmlinux.lds is written, _etext might be the very first data symbol instead of the very last text symbol. Don't require it to be a text symbol, accept any symbol type. Comitter notes: See the first Link for further discussion, but it all boils down to this: --- # grep -e _stext -e _etext -e _edata /proc/kallsyms c0000000 T _stext c08b8000 D _etext So there is no _edata and _etext is not text $ ppc-linux-objdump -x vmlinux | grep -e _stext -e _etext -e _edata c0000000 g .head.text 00000000 _stext c08b8000 g .rodata 00000000 _etext c1378000 g .sbss 00000000 _edata --- Fixes: ed9adb2035b5be58 ("perf machine: Read also the end of the kernel") Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: linuxppc-dev@lists.ozlabs.org Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Song Liu <songliubraving@fb.com> Link: https://lore.kernel.org/r/b3ee1994d95257cb7f2de037c5030ba7d1bed404.1736327613.git.christophe.leroy@csgroup.eu Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dae29277fddaaf6670d17dfcbb916a2ca29c912f Author: Christophe Leroy <christophe.leroy@csgroup.eu> Date: Wed Jan 8 10:54:20 2025 +0100 perf maps: Fix display of kernel symbols Since commit 659ad3492b913c90 ("perf maps: Switch from rbtree to lazily sorted array for addresses"), perf doesn't display anymore kernel symbols on powerpc, allthough it still detects them as kernel addresses. # Overhead Command Shared Object Symbol # ........ .......... ............. ...................................... # 80.49% Coeur main [unknown] [k] 0xc005f0f8 3.91% Coeur main gau [.] engine_loop.constprop.0.isra.0 1.72% Coeur main [unknown] [k] 0xc005f11c 1.09% Coeur main [unknown] [k] 0xc01f82c8 0.44% Coeur main libc.so.6 [.] epoll_wait 0.38% Coeur main [unknown] [k] 0xc0011718 0.36% Coeur main [unknown] [k] 0xc01f45c0 This is because function maps__find_next_entry() now returns current entry instead of next entry, leading to kernel map end address getting mis-configured with its own start address instead of the start address of the following map. Fix it by really taking the next entry, also make sure that entry follows current one by making sure entries are sorted. Fixes: 659ad3492b913c90 ("perf maps: Switch from rbtree to lazily sorted array for addresses") Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com> Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/2ea4501209d5363bac71a6757fe91c0747558a42.1736329923.git.christophe.leroy@csgroup.eu Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/maps.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c738a34417b6087e2b27ac1494fef12e37057f93 Author: Namhyung Kim <namhyung@kernel.org> Date: Tue Jan 7 14:43:52 2025 -0800 perf test: Update ftrace test to use --graph-opts I found it failed on machines with limited memory because 16M byte per-cpu buffer is too big. The reason it added the option is not to miss tracing data. Thus we can limit the data size by reducing the function call depth instead of increasing the buffer size to handle the whole data. As it used the same option in the test_ftrace_trace() and it was able to find the sleep function, it should work with the profile subcommand. Get rid of other grep commands which might be affected by the depth change. Reported-by: Thomas Richter <tmricht@linux.ibm.com> Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Gordeev <agordeev@linux.ibm.com> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sumanth Korikkar <sumanthk@linux.ibm.com> Cc: Vasily Gorbik <gor@linux.ibm.com> Link: https://lore.kernel.org/r/20250107224352.1128669-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/shell/ftrace.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit e5f2024cb997cd974582ecb5c6344729db508a24 Author: Namhyung Kim <namhyung@kernel.org> Date: Tue Jan 7 14:43:51 2025 -0800 perf ftrace profile: Add --graph-opts option Like trace subcommand, it should be able to pass some options to control the tracing behavior for the function graph tracer. But some options are limited in order to maintain the internal behavior. For example, it can limit the function call depth like below: # perf ftrace profile --graph-opts depth=5 -- myprog Committer testing: root@number:~# perf ftrace profile --graph-opts thresh=1000 -- sleep 1 # Total (us) Avg (us) Max (us) Count Function 1001419.301 500709.650 1000032.000 2 x64_sys_call 1000032.000 1000032.000 1000032.000 1 __x64_sys_clock_nanosleep 1000032.000 1000032.000 1000032.000 1 common_nsleep 1000031.000 1000031.000 1000031.000 1 do_nanosleep 1000031.000 1000031.000 1000031.000 1 hrtimer_nanosleep 1000024.000 1000024.000 1000024.000 1 schedule 1387.208 1387.208 1387.208 1 __x64_sys_execve 1386.691 1386.691 1386.691 1 do_execveat_common.isra.0 1334.170 1334.170 1334.170 1 bprm_execve 1258.413 1258.413 1258.413 1 load_elf_binary 1123.068 1123.068 1123.068 1 begin_new_exec 1113.550 1113.550 1113.550 1 mmput 1109.237 1109.237 1109.237 1 exit_mmap root@number:~# perf ftrace profile --graph-opts thresh=1200 -- sleep 1 # Total (us) Avg (us) Max (us) Count Function 1001448.204 500724.102 1000018.000 2 x64_sys_call 1000017.000 1000017.000 1000017.000 1 __x64_sys_clock_nanosleep 1000017.000 1000017.000 1000017.000 1 common_nsleep 1000017.000 1000017.000 1000017.000 1 hrtimer_nanosleep 1000016.000 1000016.000 1000016.000 1 do_nanosleep 1000012.000 1000012.000 1000012.000 1 schedule 1430.112 1430.112 1430.112 1 __x64_sys_execve 1429.581 1429.581 1429.581 1 do_execveat_common.isra.0 1376.289 1376.289 1376.289 1 bprm_execve 1301.743 1301.743 1301.743 1 load_elf_binary root@number:~# Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20250107224352.1128669-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Documentation/perf-ftrace.txt | 8 ++++++++ tools/perf/builtin-ftrace.c | 4 ++++ 2 files changed, 12 insertions(+) commit 86a12b92a97326e17a621a8f759089a3beab8f3c Author: Namhyung Kim <namhyung@kernel.org> Date: Tue Jan 7 14:43:50 2025 -0800 perf ftrace: Display latency statistics at the end Sometimes users also want to see average latency as well as histogram. Display latency statistics like avg, max, min at the end. $ sudo ./perf ftrace latency -ab -T synchronize_rcu -- ... # DURATION | COUNT | GRAPH | 0 - 1 us | 0 | | 1 - 2 us | 0 | | 2 - 4 us | 0 | | 4 - 8 us | 0 | | 8 - 16 us | 0 | | 16 - 32 us | 0 | | 32 - 64 us | 0 | | 64 - 128 us | 0 | | 128 - 256 us | 0 | | 256 - 512 us | 0 | | 512 - 1024 us | 0 | | 1 - 2 ms | 0 | | 2 - 4 ms | 0 | | 4 - 8 ms | 0 | | 8 - 16 ms | 1 | ##### | 16 - 32 ms | 7 | ######################################## | 32 - 64 ms | 0 | | 64 - 128 ms | 0 | | 128 - 256 ms | 0 | | 256 - 512 ms | 0 | | 512 - 1024 ms | 0 | | 1 - ... s | 0 | | # statistics (in usec) total time: 171832 avg time: 21479 max time: 30906 min time: 15869 count: 8 Committer testing: root@number:~# perf ftrace latency -nab --bucket-range 100 --max-latency 512 -T switch_mm_irqs_off sleep 1 # DURATION | COUNT | GRAPH | 0 - 100 ns | 314 | ## | 100 - 200 ns | 1843 | ############# | 200 - 300 ns | 1390 | ########## | 300 - 400 ns | 844 | ###### | 400 - 500 ns | 480 | ### | 500 - 512 ns | 315 | ## | 512 - ... ns | 16 | | # statistics (in nsec) total time: 2448936 avg time: 387 max time: 3285 min time: 82 count: 6328 root@number:~# Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20250107224352.1128669-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-ftrace.c | 14 +++++++++++++- tools/perf/util/bpf_ftrace.c | 12 +++++++++++- tools/perf/util/bpf_skel/func_latency.bpf.c | 19 +++++++++++++++++++ tools/perf/util/ftrace.h | 6 ++++-- 4 files changed, 47 insertions(+), 4 deletions(-) commit 05efa0ab0115d32882fc516aa5c99199f35412f1 Author: Ian Rogers <irogers@google.com> Date: Wed Nov 6 00:30:05 2024 +0000 perf evsel: Improve the evsel__open_strerror() for EBUSY The existing EBUSY strerror message is: The sys_perf_event_open() syscall returned with 16 (Device or resource busy) for event (intel_bts//). "dmesg | grep -i perf" may provide additional information. The dmesg won't be useful. What is more useful is knowing what processes are potentially using the PMU, which some procfs scanning can reveal. When parallel testing tests/shell/stat_all_pmu.sh this yields: Testing intel_bts// Error: The PMU intel_bts counters are busy and in use by another process. Possible processes: 2585882 perf list 2585902 perf list -j -o /tmp/__perf_test.list_output.json.KF9MY 2585904 perf list 2585911 perf record -e task-clock --filter period > 1 -o /dev/null --quiet true 2585912 perf list 2585915 perf list 2586042 /tmp/perf/perf record -asdg -e cpu-clock -o /tmp/perftool-testsuite_report.dIF/perf_report/perf.data -- sleep 2 2589078 perf record -g -e task-clock:u -o - perf test -w noploop 2589148 /tmp/perf/perf record --control=fifo:control,ack -e cpu-clock -m 1 sleep 10 2589379 perf --buildid-dir /tmp/perf.debug.Umx record --buildid-all -o /tmp/perf.data.YBm /tmp/perf.ex.MD5.ZQW 2589568 perf record -o /tmp/__perf_test.program.mtcZH/perf.data --branch-filter any,save_type,u -- perf test -w brstack 2589649 perf record --per-thread -o /tmp/__perf_test.perf.data.5d3dc perf test -w thloop 2589898 perf record -o /tmp/perf-test-script.BX2b27Dcnj/pp-perf.data --sample-cpu uname Which gets a little closer to finding the issue. Committer testing: root@number:~# root@number:~# grep -m1 "model name" /proc/cpuinfo model name : Intel(R) Core(TM) i7-14700K root@number:~# Before: root@number:~# perf stat -e intel_bts// & [1] 197954 root@number:~# perf test "perf all PMU test" 124: perf all PMU test : FAILED! root@number:~# perf test -v "perf all PMU test" |& tail Testing i915/vecs0-busy/ Testing i915/vecs0-sema/ Testing i915/vecs0-wait/ Testing intel_bts// Unexpected signal in main Error: The sys_perf_event_open() syscall returned with 16 (Device or resource busy) for event (intel_bts//). "dmesg | grep -i perf" may provide additional information. ---- end(-1) ---- 124: perf all PMU test : FAILED! root@number:~# After: root@number:~# perf stat -e intel_bts// & [1] 200195 root@number:~# perf test "perf all PMU test" 123: perf all PMU test : FAILED! root@number:~# perf test -v "perf all PMU test" |& tail Testing i915/vecs0-wait/ Testing intel_bts// Unexpected signal in main Error: The PMU intel_bts counters are busy and in use by another process. Possible processes: 200195 perf stat -e intel_bts// 2319766 /root/bin/perf top --stdio ---- end(-1) ---- 123: perf all PMU test : FAILED! root@number:~# Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Chun-Tse Shao <ctshao@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Weilin Wang <weilin.wang@intel.com> Cc: Ze Gao <zegao2021@gmail.com> Change-Id: Ie1ed8688286c44e8f44a35e98fed8be3e2a344df Link: https://lore.kernel.org/r/20241106003007.2112584-1-ctshao@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/evsel.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) commit b031fe8351cd5b2c7c7d3c85c036910b9e5817a2 Author: Randy Dunlap <rdunlap@infradead.org> Date: Mon May 13 12:24:39 2024 -0700 perf Documentation: Clarify sysfs event names characters Specify that perf event names in sysfs must not contain mixed lower and upper case characters and that they may contain numbers, ".", "_", or "-" as well. Fixes: 785623ee855e893d ("perf Document: Sysfs event names must be lower or upper case") Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Kan Liang <kan.liang@linux.intel.com> Link: https://lore.kernel.org/r/20240513192439.18473-1-rdunlap@infradead.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> .../ABI/testing/sysfs-bus-event_source-devices-events | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit d52af4b8c6645d362ebaad5693c319e7c03e4bea Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Mon Jan 6 16:48:17 2025 -0300 perf tests shell task_analyzer: Run this test exclusively When running in the now default parallel mode this test has been frequently failing, while when running exclusively, on a quiet system, it passes. Since its expectations were established when serial testing was the norm, mark it as exclusive to get this kind of resunt: root@x1:~# perf test 106 106: perf script task-analyzer tests : Ok root@x1:~# set -o vi root@x1:~# perf stat --null --repeat 10 perf test 106 106: perf script task-analyzer tests : Ok 106: perf script task-analyzer tests : Ok 106: perf script task-analyzer tests : Ok 106: perf script task-analyzer tests : Ok 106: perf script task-analyzer tests : Ok 106: perf script task-analyzer tests : Ok 106: perf script task-analyzer tests : Ok 106: perf script task-analyzer tests : Ok 106: perf script task-analyzer tests : Ok 106: perf script task-analyzer tests : Ok Performance counter stats for 'perf test 106' (10 runs): 4.8872 +- 0.0179 seconds time elapsed ( +- 0.37% ) root@x1:~# Cc: Aditya Gupta <adityag@linux.ibm.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/shell/test_task_analyzer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f9ad973b0958834d19cd9aee00ef3b316e01b27 Author: Charlie Jenkins <charlie@rivosinc.com> Date: Thu Dec 19 13:44:25 2024 -0800 perf tests code-reading: Handle change in objdump output from binutils >= 2.41 on riscv After binutils commit e43d876 which was first included in binutils 2.41, riscv no longer supports dumping in the middle of instructions. Increase the objdump window by 2-bytes to ensure that any instruction that sits on the boundary of the specified stop-address is not cut in half. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Bill Wendling <morbo@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Justin Stitt <justinstitt@google.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: linux-riscv@lists.infradead.org Link: https://lore.kernel.org/r/20241219-perf_fix_riscv_obj_reading-v3-1-a7d644dcfa50@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/code-reading.c | 92 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) commit 058b38ccd2af9e5c95590b018e8425fa148d7aca Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Thu Jan 2 16:50:39 2025 -0300 perf top: Don't complain about lack of vmlinux when not resolving some kernel samples Recently we got a case where a kernel sample wasn't being resolved due to a bug that was not setting the end address on kernel functions implemented in assembly (see Link: tag), and then those were not being found by machine__resolve() -> map__find_symbol(). So we ended up with: # perf top --stdio PerfTop: 0 irqs/s kernel: 0% exact: 0% lost: 0/0 drop: 0/0 [cycles/P] ----------------------------------------------------------------------- Warning: A vmlinux file was not found. Kernel samples will not be resolved. ^Z [1]+ Stopped perf top --stdio # But then resolving all other kernel symbols. So just fixup the logic to only print that warning when there are no symbols in the kernel map. Fixes: d88205db9caa0e9d ("perf dso: Add dso__has_symbols() method") Reviewed-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Link: https://lore.kernel.org/lkml/Z3buKhcCsZi3_aGb@x1 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7efd2297090254e925f048b150f9d16e7d43b37 Merge: 40384c840ea1 48806be08636 Author: Stephen Boyd <sboyd@kernel.org> Date: Wed Jan 8 12:01:46 2025 -0800 Merge tag 'clk-imx-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux into clk-imx Pull i.MX clk driver updates from Abel Vesa: - Fix the i.MX8MP clkout1/2 support by using sys_plln_out instead of sys_plln as parents - Add 208 MHz and 416 MHz entries to the PLL1416x - Fix the i.MX93 provider by adding the SPDIF IPG clock - Fix the i.MX93 xcvr DT node clocks by using SPDIF IRP clock instead of BUS_WAKEUP - Filter out LVDS, MIPI DSI, PXP, FLEXIO and MU clocks to i.MX93 only * tag 'clk-imx-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux: clk: imx: Apply some clks only for i.MX93 arm64: dts: imx93: Use IMX93_CLK_SPDIF_IPG as SPDIF IPG clock clk: imx93: Add IMX93_CLK_SPDIF_IPG clock dt-bindings: clock: imx93: Add SPDIF IPG clk clk: imx: pll14xx: Add 208 MHz and 416 MHz entries for PLL1416x clk: imx8mp: Fix clkout1/2 support commit 214e7a51f7c12c45decbd8fa37e437b09af7b14e Merge: 40384c840ea1 383ca7bee8a9 Author: Stephen Boyd <sboyd@kernel.org> Date: Wed Jan 8 11:57:24 2025 -0800 Merge tag 'sunxi-clk-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull Allwinner clk driver updates from Chen-Yu Tsai: Instead of forcing a particular clock parent for TCON0 on the A64, the decision is left to the device tree. Which clock parent gets assigned depends on which display output is used. If the wrong parent is assigned, the display doesn't work. Patches include adding the clock parents to the DT binding (which is shared with the DT tree), removing the now redundant macros from the clock driver, and stop forcing a particular clock parent in the driver. * tag 'sunxi-clk-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: a64: stop force-selecting PLL-MIPI as TCON0 parent clk: sunxi-ng: a64: drop redundant CLK_PLL_VIDEO0_2X and CLK_PLL_MIPI dt-bindings: clock: sunxi: Export PLL_VIDEO_2X and PLL_MIPI commit 590a094e7bd2e5a10c392f13cd86489e1eb3ac86 Merge: e24b15d4704d 16414720045d Author: Stephen Boyd <sboyd@kernel.org> Date: Wed Jan 8 11:56:01 2025 -0800 Merge tag 'sunxi-clk-fixes-for-6.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-fixes Pull an Allwinner clk driver fix from Chen-Yu Tsai: Only one patch, accidentally left out of the 6.13 pull request. The patch enables automatic clk reparenting for MMC clocks on A100, thereby fixing MMC support. * tag 'sunxi-clk-fixes-for-6.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: a100: enable MMC clock reparenting commit f7c848431632598ff9bce57a659db6af60d75b39 Author: Mike Marshall <hubcap@omnibond.com> Date: Wed Jan 8 14:21:08 2025 -0500 orangefs: fix a oob in orangefs_debug_write I got a syzbot report: slab-out-of-bounds Read in orangefs_debug_write... several people suggested fixes, I tested Al Viro's suggestion and made this patch. Signed-off-by: Mike Marshall <hubcap@omnibond.com> Reported-by: syzbot+fc519d7875f2d9186c1f@syzkaller.appspotmail.com fs/orangefs/orangefs-debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e24b15d4704dcb73920c3d18a6157abd18df08c1 Author: Lubomir Rintel <lkundrak@v3.sk> Date: Tue Dec 31 20:03:35 2024 +0100 clk: mmp2: call pm_genpd_init() only after genpd.name is set Setting the genpd's struct device's name with dev_set_name() is happening within pm_genpd_init(). If it remains NULL, things can blow up later, such as when crafting the devfs hierarchy for the power domain: Unable to handle kernel NULL pointer dereference at virtual address 00000000 when read ... Call trace: strlen from start_creating+0x90/0x138 start_creating from debugfs_create_dir+0x20/0x178 debugfs_create_dir from genpd_debug_add.part.0+0x4c/0x144 genpd_debug_add.part.0 from genpd_debug_init+0x74/0x90 genpd_debug_init from do_one_initcall+0x5c/0x244 do_one_initcall from kernel_init_freeable+0x19c/0x1f4 kernel_init_freeable from kernel_init+0x1c/0x12c kernel_init from ret_from_fork+0x14/0x28 Bisecting tracks this crash back to commit 899f44531fe6 ("pmdomain: core: Add GENPD_FLAG_DEV_NAME_FW flag"), which exchanges use of genpd->name with dev_name(&genpd->dev) in genpd_debug_add.part(). Fixes: 899f44531fe6 ("pmdomain: core: Add GENPD_FLAG_DEV_NAME_FW flag") Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Cc: stable@vger.kernel.org # v6.12+ Link: https://lore.kernel.org/r/20241231190336.423172-1-lkundrak@v3.sk Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/clk/mmp/pwr-island.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81ffbd224e5f926bf8df01d6107db9c8779f7d57 Author: Yi Sun <yi.sun@unisoc.com> Date: Mon Dec 23 16:10:42 2024 +0800 f2fs: update_sit_entry_for_release() supports consecutive blocks. This function can process some consecutive blocks at a time. When using update_sit_entry() to release consecutive blocks, ensure that the consecutive blocks belong to the same segment. Because after update_sit_entry_for_realese(), @segno is still in use in update_sit_entry(). Signed-off-by: Yi Sun <yi.sun@unisoc.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/segment.c | 75 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 30 deletions(-) commit 66baee2b886d72ab6be11a08d4c7897f9612e25b Author: Yi Sun <yi.sun@unisoc.com> Date: Mon Dec 23 16:10:41 2024 +0800 f2fs: introduce update_sit_entry_for_release/alloc() No logical changes, just for cleanliness. Signed-off-by: Yi Sun <yi.sun@unisoc.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/segment.c | 162 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 93 insertions(+), 69 deletions(-) commit cf5817ce66f6c75452027af243689da780dbddb4 Author: Jaegeuk Kim <jaegeuk@kernel.org> Date: Tue Jan 7 02:26:34 2025 +0000 f2fs: don't call block truncation for aliased file This patch should avoid the below warning which does not corrupt the metadata tho. [ 51.508120][ T253] F2FS-fs (dm-59): access invalid blkaddr:36 [ 51.508156][ T253] __f2fs_is_valid_blkaddr+0x330/0x384 [ 51.508162][ T253] f2fs_is_valid_blkaddr_raw+0x10/0x24 [ 51.508163][ T253] f2fs_truncate_data_blocks_range+0x1ec/0x438 [ 51.508177][ T253] f2fs_remove_inode_page+0x8c/0x148 [ 51.508194][ T253] f2fs_evict_inode+0x230/0x76c Fixes: 128d333f0dff ("f2fs: introduce device aliasing file") Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/node.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 91b587ba79e1b68bb718d12b0758dbcdab4e9cb7 Author: Daniel Lee <chullee@google.com> Date: Fri Dec 20 15:41:31 2024 -0800 f2fs: Introduce linear search for dentries This patch addresses an issue where some files in case-insensitive directories become inaccessible due to changes in how the kernel function, utf8_casefold(), generates case-folded strings from the commit 5c26d2f1d3f5 ("unicode: Don't special case ignorable code points"). F2FS uses these case-folded names to calculate hash values for locating dentries and stores them on disk. Since utf8_casefold() can produce different output across kernel versions, stored hash values and newly calculated hash values may differ. This results in affected files no longer being found via the hash-based lookup. To resolve this, the patch introduces a linear search fallback. If the initial hash-based search fails, F2FS will sequentially scan the directory entries. Fixes: 5c26d2f1d3f5 ("unicode: Don't special case ignorable code points") Link: https://bugzilla.kernel.org/show_bug.cgi?id=219586 Signed-off-by: Daniel Lee <chullee@google.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/dir.c | 53 ++++++++++++++++++++++++++++++++++++++--------------- fs/f2fs/f2fs.h | 6 ++++-- fs/f2fs/inline.c | 5 +++-- 3 files changed, 45 insertions(+), 19 deletions(-) commit d217b5cea488c0f644c189f91b636aeefa12deb9 Author: Yi Sun <yi.sun@unisoc.com> Date: Mon Nov 4 11:45:42 2024 +0800 f2fs: add parameter @len to f2fs_invalidate_internal_cache() New function can process some consecutive blocks at a time. Signed-off-by: Yi Sun <yi.sun@unisoc.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/data.c | 2 +- fs/f2fs/f2fs.h | 6 +++--- fs/f2fs/gc.c | 2 +- fs/f2fs/segment.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) commit 3d56fbb1f03f2abf8c806aee14df2f462350dfba Author: Yi Sun <yi.sun@unisoc.com> Date: Mon Nov 4 11:45:41 2024 +0800 f2fs: expand f2fs_invalidate_compress_page() to f2fs_invalidate_compress_pages_range() New function f2fs_invalidate_compress_pages_range() adds the @len parameter. So it can process some consecutive blocks at a time. Signed-off-by: Yi Sun <yi.sun@unisoc.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/compress.c | 5 +++-- fs/f2fs/f2fs.h | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) commit 6df2d9553e168fe32dd49873dd254a63ca913307 Author: Bastien Curutchet <bastien.curutchet@bootlin.com> Date: Fri Jan 3 09:13:49 2025 +0100 mtd: rawnand: davinci: Reduce polling interval in NAND_OP_WAITRDY_INSTR For each NAND_OP_WAITRDY_INSTR operation, the NANDFSR register is polled only once every 100 us to check for the EMA_WAIT pin. This isn't frequent enough and causes delays in NAND accesses. Set the polling interval to 5 us. It increases the page read speed reported by flash_speed by ~30% (~10% on page writes). Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/raw/davinci_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9371866799d67a80be0ea9e01bd41987db22f26 Author: Md Sadre Alam <quic_mdalam@quicinc.com> Date: Mon Jan 6 18:45:58 2025 +0530 mtd: rawnand: qcom: Fix build issue on x86 architecture Fix a buffer overflow issue in qcom_clear_bam_transaction by using struct_group to group related fields and avoid FORTIFY_SOURCE warnings. On x86 architecture, the following error occurs due to warnings being treated as errors: In function ‘fortify_memset_chk’, inlined from ‘qcom_clear_bam_transaction’ at drivers/mtd/nand/qpic_common.c:88:2: ./include/linux/fortify-string.h:480:25: error: call to ‘__write_overflow_field’ declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning] 480 | __write_overflow_field(p_size_field, size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LD [M] drivers/mtd/nand/nandcore.o CC [M] drivers/w1/masters/mxc_w1.o cc1: all warnings being treated as errors This patch addresses the issue by grouping the related fields in struct bam_transaction using struct_group and updating the memset call accordingly. Fixes: 8c52932da5e6 ("mtd: rawnand: qcom: cleanup qcom_nandc driver") Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/qpic_common.c | 2 +- include/linux/mtd/nand-qpic-common.h | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) commit bfaac2a0b9e59b595f08606e7762bee50f01a074 Author: Jiri Olsa <jolsa@kernel.org> Date: Mon Jan 6 18:50:48 2025 +0100 selftests/bpf: Add kprobe session recursion check test Adding kprobe.session probe to bpf_kfunc_common_test that misses bpf program execution due to recursion check and making sure it increases the program missed count properly. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20250106175048.1443905-2-jolsa@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/prog_tests/missed.c | 1 + tools/testing/selftests/bpf/progs/missed_kprobe_recursion.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 2ebadb60cb36f2ee74bf83930fc73a5ceeb935fc Author: Jiri Olsa <jolsa@kernel.org> Date: Mon Jan 6 18:50:47 2025 +0100 bpf: Return error for missed kprobe multi bpf program execution When kprobe multi bpf program can't be executed due to recursion check, we currently return 0 (success) to fprobe layer where it's ignored for standard kprobe multi probes. For kprobe session the success return value will make fprobe layer to install return probe and try to execute it as well. But the return session probe should not get executed, because the entry part did not run. FWIW the return probe bpf program most likely won't get executed, because its recursion check will likely fail as well, but we don't need to run it in the first place.. also we can make this clear and obvious. It also affects missed counts for kprobe session program execution, which are now doubled (extra count for not executed return probe). Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Link: https://lore.kernel.org/r/20250106175048.1443905-1-jolsa@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/trace/bpf_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca3c4f646a9fc7d23b30c70e6663eaa38ac746af Author: Pu Lehui <pulehui@huawei.com> Date: Sat Jan 4 01:39:46 2025 +0000 bpf: Move out synchronize_rcu_tasks_trace from mutex CS Commit ef1b808e3b7c ("bpf: Fix UAF via mismatching bpf_prog/attachment RCU flavors") resolved a possible UAF issue in uprobes that attach non-sleepable bpf prog by explicitly waiting for a tasks-trace-RCU grace period. But, in the current implementation, synchronize_rcu_tasks_trace is included within the mutex critical section, which increases the length of the critical section and may affect performance. So let's move out synchronize_rcu_tasks_trace from mutex CS. Signed-off-by: Pu Lehui <pulehui@huawei.com> Reviewed-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20250104013946.1111785-1-pulehui@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/trace/bpf_trace.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit b8b1e30016260aba338a65fdcc2bfd50933c6f0a Author: Soma Nakata <soma.nakata@somane.sakura.ne.jp> Date: Tue Jan 7 08:15:35 2025 +0900 bpf: Fix range_tree_set() error handling range_tree_set() might fail and return -ENOMEM, causing subsequent `bpf_arena_alloc_pages` to fail. Add the error handling. Signed-off-by: Soma Nakata <soma.nakata@somane.sakura.ne.jp> Acked-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20250106231536.52856-1-soma.nakata@somane.sakura.ne.jp Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/arena.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit bab18c7db44d3aa6c84450095451580922359c7a Author: Ihor Solodrai <ihor.solodrai@pm.me> Date: Tue Jan 7 23:58:18 2025 +0000 selftests/bpf: add -std=gnu11 to BPF_CFLAGS and CFLAGS Latest versions of GCC BPF use C23 standard by default. This causes compilation errors in vmlinux.h due to bool types declarations. Add -std=gnu11 to BPF_CFLAGS and CFLAGS. This aligns with the version of the standard used when building the kernel currently [1]. For more details see the discussions at [2] and [3]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Makefile#n465 [2] https://lore.kernel.org/bpf/EYcXjcKDCJY7Yb0GGtAAb7nLKPEvrgWdvWpuNzXm2qi6rYMZDixKv5KwfVVMBq17V55xyC-A1wIjrqG3aw-Imqudo9q9X7D7nLU2gWgbN0w=@pm.me/ [3] https://lore.kernel.org/bpf/20250106202715.1232864-1-ihor.solodrai@pm.me/ CC: Jose E. Marchesi <jose.marchesi@oracle.com> Signed-off-by: Ihor Solodrai <ihor.solodrai@pm.me> Link: https://lore.kernel.org/r/20250107235813.2964472-1-ihor.solodrai@pm.me Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 29904a40127ca5df120bcbcab444ea725926b075 Author: Vivek Pernamitta <quic_vpernami@quicinc.com> Date: Wed Jan 8 21:52:07 2025 +0530 bus: mhi: host: pci_generic: Enable MSI-X if the endpoint supports Enable MSI-X if the endpoint supports. Signed-off-by: Vivek Pernamitta <quic_vpernami@quicinc.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20250108-msix-v2-1-dc4466922350@quicinc.com [mani: added pci_generic prefix to subject] Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> drivers/bus/mhi/host/pci_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 788bd792c74a3d1ddd0e49f5ddd68102dbbbe351 Author: Nuno Sa <nuno.sa@analog.com> Date: Wed Jan 8 16:44:23 2025 +0000 hwmon: (pmbus/max15301) Add support for MAX15303 The MAX15303 is a full-featured, flexible, efficient, 6A digital point-of-load (PoL) controller with integrated switching MOSFETs. It contains advanced power management and telemetry features. Tested-by: Robin Getz <rgetz503@gmail.com> Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20250108-dev-max15303-v1-1-9154eb2c9d9e@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/hwmon/max15301.rst | 8 ++++++++ drivers/hwmon/pmbus/Kconfig | 2 +- drivers/hwmon/pmbus/max15301.c | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) commit 8044c589767456af2061ca03468aa6a295da1925 Author: Frederic Weisbecker <frederic@kernel.org> Date: Fri Sep 27 00:49:08 2024 +0200 rcu: Use kthread preferred affinity for RCU exp kworkers Now that kthreads have an infrastructure to handle preferred affinity against CPU hotplug and housekeeping cpumask, convert RCU exp workers to use it instead of handling all the constraints by itself. Acked-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> kernel/rcu/tree.c | 105 ++++++++++-------------------------------------------- 1 file changed, 19 insertions(+), 86 deletions(-) commit b04e317b522630b46f78ee62ecbdc5734e8d43de Author: Frederic Weisbecker <frederic@kernel.org> Date: Fri Sep 27 00:49:07 2024 +0200 treewide: Introduce kthread_run_worker[_on_cpu]() kthread_create() creates a kthread without running it yet. kthread_run() creates a kthread and runs it. On the other hand, kthread_create_worker() creates a kthread worker and runs it. This difference in behaviours is confusing. Also there is no way to create a kthread worker and affine it using kthread_bind_mask() or kthread_affine_preferred() before starting it. Consolidate the behaviours and introduce kthread_run_worker[_on_cpu]() that behaves just like kthread_run(). kthread_create_worker[_on_cpu]() will now only create a kthread worker without starting it. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> arch/x86/kvm/i8254.c | 2 +- crypto/crypto_engine.c | 2 +- drivers/cpufreq/cppc_cpufreq.c | 2 +- drivers/gpu/drm/drm_vblank_work.c | 2 +- .../gpu/drm/i915/gem/selftests/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/gt/selftest_execlists.c | 2 +- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 2 +- drivers/gpu/drm/i915/gt/selftest_slpc.c | 2 +- drivers/gpu/drm/i915/selftests/i915_request.c | 8 ++-- drivers/gpu/drm/msm/disp/msm_disp_snapshot.c | 2 +- drivers/gpu/drm/msm/msm_atomic.c | 2 +- drivers/gpu/drm/msm/msm_gpu.c | 2 +- drivers/gpu/drm/msm/msm_kms.c | 2 +- .../media/platform/chips-media/wave5/wave5-vpu.c | 2 +- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/ethernet/intel/ice/ice_dpll.c | 2 +- drivers/net/ethernet/intel/ice/ice_gnss.c | 2 +- drivers/net/ethernet/intel/ice/ice_ptp.c | 2 +- drivers/platform/chrome/cros_ec_spi.c | 2 +- drivers/ptp/ptp_clock.c | 2 +- drivers/spi/spi.c | 2 +- drivers/usb/typec/tcpm/tcpm.c | 2 +- drivers/vdpa/vdpa_sim/vdpa_sim.c | 2 +- drivers/watchdog/watchdog_dev.c | 2 +- fs/erofs/zdata.c | 2 +- include/linux/kthread.h | 48 ++++++++++++++++++---- kernel/kthread.c | 31 ++++---------- kernel/rcu/tree.c | 4 +- kernel/sched/ext.c | 2 +- kernel/workqueue.c | 2 +- net/dsa/tag_ksz.c | 2 +- net/dsa/tag_ocelot_8021q.c | 2 +- net/dsa/tag_sja1105.c | 2 +- 33 files changed, 83 insertions(+), 66 deletions(-) commit 41f70d8e16349c65abdc0dd88a7d0ab94e5ce639 Author: Frederic Weisbecker <frederic@kernel.org> Date: Fri Sep 27 00:49:06 2024 +0200 kthread: Unify kthread_create_on_cpu() and kthread_create_worker_on_cpu() automatic format kthread_create_on_cpu() uses the CPU argument as an implicit and unique printf argument to add to the format whereas kthread_create_worker_on_cpu() still relies on explicitly passing the printf arguments. This difference in behaviour is error prone and doesn't help standardizing per-CPU kthread names. Unify the behaviours and convert kthread_create_worker_on_cpu() to use the printf behaviour of kthread_create_on_cpu(). Signed-off-by: Frederic Weisbecker <frederic@kernel.org> fs/erofs/zdata.c | 2 +- include/linux/kthread.h | 21 +++++++++++++----- kernel/kthread.c | 59 +++++++++++++++++++++++++++++-------------------- 3 files changed, 52 insertions(+), 30 deletions(-) commit db7ee3cb620b2cec5a5f44767ab93cb4eb80d961 Author: Frederic Weisbecker <frederic@kernel.org> Date: Fri Sep 27 00:49:05 2024 +0200 rcu: Use kthread preferred affinity for RCU boost Now that kthreads have an infrastructure to handle preferred affinity against CPU hotplug and housekeeping cpumask, convert RCU boost to use it instead of handling all the constraints by itself. Acked-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> kernel/rcu/tree.c | 27 +++++++++++++++++++-------- kernel/rcu/tree_plugin.h | 11 ++--------- 2 files changed, 21 insertions(+), 17 deletions(-) commit 4d13f4304fa43471bfea101658a11feec7b28ac0 Author: Frederic Weisbecker <frederic@kernel.org> Date: Fri Sep 27 00:49:04 2024 +0200 kthread: Implement preferred affinity Affining kthreads follow either of four existing different patterns: 1) Per-CPU kthreads must stay affine to a single CPU and never execute relevant code on any other CPU. This is currently handled by smpboot code which takes care of CPU-hotplug operations. 2) Kthreads that _have_ to be affine to a specific set of CPUs and can't run anywhere else. The affinity is set through kthread_bind_mask() and the subsystem takes care by itself to handle CPU-hotplug operations. 3) Kthreads that prefer to be affine to a specific NUMA node. That preferred affinity is applied by default when an actual node ID is passed on kthread creation, provided the kthread is not per-CPU and no call to kthread_bind_mask() has been issued before the first wake-up. 4) Similar to the previous point but kthreads have a preferred affinity different than a node. It is set manually like any other task and CPU-hotplug is supposed to be handled by the relevant subsystem so that the task is properly reaffined whenever a given CPU from the preferred affinity comes up. Also care must be taken so that the preferred affinity doesn't cross housekeeping cpumask boundaries. Provide a function to handle the last usecase, mostly reusing the current node default affinity infrastructure. kthread_affine_preferred() is introduced, to be used just like kthread_bind_mask(), right after kthread creation and before the first wake up. The kthread is then affine right away to the cpumask passed through the API if it has online housekeeping CPUs. Otherwise it will be affine to all online housekeeping CPUs as a last resort. As with node affinity, it is aware of CPU hotplug events such that: * When a housekeeping CPU goes up that is part of the preferred affinity of a given kthread, the related task is re-affined to that preferred affinity if it was previously running on the default last resort online housekeeping set. * When a housekeeping CPU goes down while it was part of the preferred affinity of a kthread, the running task is migrated (or the sleeping task is woken up) automatically by the scheduler to other housekeepers within the preferred affinity or, as a last resort, to all housekeepers from other nodes. Acked-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> include/linux/kthread.h | 1 + kernel/kthread.c | 68 ++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 62 insertions(+), 7 deletions(-) commit c6a566f6c1b4d5dff659acd221f95a72923f4085 Author: Frederic Weisbecker <frederic@kernel.org> Date: Fri Sep 27 00:49:03 2024 +0200 mm: Create/affine kswapd to its preferred node kswapd is dedicated to a specific node. As such it wants to be preferrably affine to it, memory and CPUs-wise. Use the proper kthread API to achieve that. As a bonus it takes care of CPU-hotplug events and CPU-isolation on its behalf. Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> mm/vmscan.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 54880b5a2b5ea6d32dd970125b9b1b033b86ae93 Author: Frederic Weisbecker <frederic@kernel.org> Date: Fri Sep 27 00:49:02 2024 +0200 mm: Create/affine kcompactd to its preferred node Kcompactd is dedicated to a specific node. As such it wants to be preferrably affine to it, memory and CPUs-wise. Use the proper kthread API to achieve that. As a bonus it takes care of CPU-hotplug events and CPU-isolation on its behalf. Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> mm/compaction.c | 43 +++---------------------------------------- 1 file changed, 3 insertions(+), 40 deletions(-) commit d1a89197589c4a77468298ef2b14ff4084c4ea29 Author: Frederic Weisbecker <frederic@kernel.org> Date: Fri Sep 27 00:49:01 2024 +0200 kthread: Default affine kthread to its preferred NUMA node Kthreads attached to a preferred NUMA node for their task structure allocation can also be assumed to run preferrably within that same node. A more precise affinity is usually notified by calling kthread_create_on_cpu() or kthread_bind[_mask]() before the first wakeup. For the others, a default affinity to the node is desired and sometimes implemented with more or less success when it comes to deal with hotplug events and nohz_full / CPU Isolation interactions: - kcompactd is affine to its node and handles hotplug but not CPU Isolation - kswapd is affine to its node and ignores hotplug and CPU Isolation - A bunch of drivers create their kthreads on a specific node and don't take care about affining further. Handle that default node affinity preference at the generic level instead, provided a kthread is created on an actual node and doesn't apply any specific affinity such as a given CPU or a custom cpumask to bind to before its first wake-up. This generic handling is aware of CPU hotplug events and CPU isolation such that: * When a housekeeping CPU goes up that is part of the node of a given kthread, the related task is re-affined to that own node if it was previously running on the default last resort online housekeeping set from other nodes. * When a housekeeping CPU goes down while it was part of the node of a kthread, the running task is migrated (or the sleeping task is woken up) automatically by the scheduler to other housekeepers within the same node or, as a last resort, to all housekeepers from other nodes. Acked-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> include/linux/cpuhotplug.h | 1 + kernel/kthread.c | 106 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 106 insertions(+), 1 deletion(-) commit 5eacb68a358503cb350eaf68599a0d6caef569ab Author: Frederic Weisbecker <frederic@kernel.org> Date: Fri Sep 27 00:49:00 2024 +0200 kthread: Make sure kthread hasn't started while binding it Make sure the kthread is sleeping in the schedule_preempt_disabled() call before calling its handler when kthread_bind[_mask]() is called on it. This provides a sanity check verifying that the task is not randomly blocked later at some point within its function handler, in which case it could be just concurrently awaken, leaving the call to do_set_cpus_allowed() without any effect until the next voluntary sleep. Rely on the wake-up ordering to ensure that the newly introduced "started" field returns the expected value: TASK A TASK B ------ ------ READ kthread->started wake_up_process(B) rq_lock() ... rq_unlock() // RELEASE schedule() rq_lock() // ACQUIRE // schedule task B rq_unlock() WRITE kthread->started Similarly, writing kthread->started before subsequent voluntary sleeps will be visible after calling wait_task_inactive() in __kthread_bind_mask(), reporting potential misuse of the API. Upcoming patches will make further use of this facility. Acked-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> kernel/kthread.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3a5446612a3f2579c751ddb77c5e16b9a0d47001 Author: Frederic Weisbecker <frederic@kernel.org> Date: Fri Sep 27 00:48:59 2024 +0200 sched,arm64: Handle CPU isolation on last resort fallback rq selection When a kthread or any other task has an affinity mask that is fully offline or unallowed, the scheduler reaffines the task to all possible CPUs as a last resort. This default decision doesn't mix up very well with nohz_full CPUs that are part of the possible cpumask but don't want to be disturbed by unbound kthreads or even detached pinned user tasks. Make the fallback affinity setting aware of nohz_full. Suggested-by: Michal Hocko <mhocko@suse.com> Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> arch/arm64/include/asm/cpufeature.h | 1 + arch/arm64/include/asm/mmu_context.h | 14 +++++++++++--- arch/arm64/kernel/cpufeature.c | 5 +++++ include/linux/mmu_context.h | 1 + kernel/sched/core.c | 2 +- 5 files changed, 19 insertions(+), 4 deletions(-) commit 4a1567b466ecaa411cfe54c82009de7899e96171 Author: Frederic Weisbecker <frederic@kernel.org> Date: Fri Oct 25 00:12:59 2024 +0200 arm64: Exclude nohz_full CPUs from 32bits el0 support Nohz full CPUs are not a desirable fallback target to run 32bits el0 applications. If present, prefer a set of housekeeping CPUs that can do the job instead. Otherwise just don't support el0 32 bits. Should the need arise, appropriate support can be introduced in the future. Suggested-by: Will Deacon <will@kernel.org> Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Documentation/arch/arm64/asymmetric-32bit.rst | 8 ++++++++ arch/arm64/kernel/cpufeature.c | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) commit 53036937a101b5faeaf98e7438555fa854a1a844 Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Tue Jan 7 10:58:56 2025 +0100 m68k: vga: Fix I/O defines Including m68k's <asm/raw_io.h> in vga.h on nommu platforms results in conflicting defines with io_no.h for various I/O macros from the __raw_read and __raw_write families. An example error is In file included from arch/m68k/include/asm/vga.h:12, from include/video/vga.h:22, from include/linux/vgaarb.h:34, from drivers/video/aperture.c:12: >> arch/m68k/include/asm/raw_io.h:39: warning: "__raw_readb" redefined 39 | #define __raw_readb in_8 | In file included from arch/m68k/include/asm/io.h:6, from include/linux/io.h:13, from include/linux/irq.h:20, from include/asm-generic/hardirq.h:17, from ./arch/m68k/include/generated/asm/hardirq.h:1, from include/linux/hardirq.h:11, from include/linux/interrupt.h:11, from include/linux/trace_recursion.h:5, from include/linux/ftrace.h:10, from include/linux/kprobes.h:28, from include/linux/kgdb.h:19, from include/linux/fb.h:6, from drivers/video/aperture.c:5: arch/m68k/include/asm/io_no.h:16: note: this is the location of the previous definition 16 | #define __raw_readb(addr) \ | Include <asm/io.h>, which avoids raw_io.h on nommu platforms. Also change the defined values of some of the read/write symbols in vga.h to __raw_read/__raw_write as the raw_in/raw_out symbols are not generally available. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202501071629.DNEswlm8-lkp@intel.com/ Fixes: 5c3f968712ce ("m68k/video: Create <asm/vga.h>") Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: Helge Deller <deller@gmx.de> Cc: stable@vger.kernel.org # v3.5+ Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/20250107095912.130530-1-tzimmermann@suse.de Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> arch/m68k/include/asm/vga.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 738fa3feb2e38bb603616093ff2e089f5bf8e103 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 13:30:54 2024 +0100 zorro: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/20241216-sysfs-const-bin_attr-zorro-v1-1-220a38d49507@weissschuh.net Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> drivers/zorro/zorro-sysfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f6031436a27c49123d0113444a726348c8f35d10 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Fri Dec 6 12:56:32 2024 +0100 m68k: atari: Use str_on_off() helper in atari_nvram_proc_read() Remove hard-coded strings by using the str_on_off() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/20241206115634.47332-2-thorsten.blum@linux.dev Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> arch/m68k/atari/nvram.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 184caba444cfd4b90231de7d071b9966c115c29f Author: Hari Nagalla <hnagalla@ti.com> Date: Fri Aug 2 10:21:09 2024 -0500 arm64: defconfig: Enable TI K3 M4 remoteproc driver Some K3 platform devices (AM64x, AM62x) have a Cortex M4 core. Build the M4 remote proc driver as a module for these platforms. Signed-off-by: Hari Nagalla <hnagalla@ti.com> Signed-off-by: Andrew Davis <afd@ti.com> Tested-by: Wadim Egorov <w.egorov@phytec.de> Link: https://lore.kernel.org/r/20240802152109.137243-10-afd@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 5532b8a9ce0e80514e37a1e082824934663580a3 Author: Vibhore Vardhan <vibhore@ti.com> Date: Tue Dec 31 14:44:19 2024 +0530 arm64: dts: ti: k3-am62a-wakeup: Configure ti-sysc for wkup_uart0 Similar to the TI K3-AM62x SoC commit ce27f7f9e328c8582a169f97f1466976561f1 ("arm64: dts: ti: k3-am62-wakeup: Configure ti-sysc for wkup_uart0"), The devices in the wkup domain are capable of waking up the system from suspend. We can configure the wkup domain devices in a generic way using the ti-sysc interconnect target module driver like we have done with the earlier TI SoCs. As ti-sysc manages the SYSCONFIG related registers independent of the child hardware device, the wake-up configuration is also set even if wkup_uart0 is reserved by sysfw. The wkup_uart0 device has interconnect target module register mapping like dra7 wkup uart. There is a 1 MB interconnect target range with one uart IP block in the target module. The power domain and clock affects the whole interconnect target module. Note we change the functional clock name to follow the ti-sysc binding and use "fck" instead of "fclk". Also note that we need to disable the target module reset as noted by Markus. Otherwise the sysfw using wkup_uart0 can get confused on some devices leading to boot time issues such as mbox timeouts. Signed-off-by: Vibhore Vardhan <vibhore@ti.com> Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com> [d-gole@ti.com: Reworded the entire commit message] Signed-off-by: Dhruva Gole <d-gole@ti.com> Link: https://lore.kernel.org/r/20241231-am62a-dt-ti-sysc-wkup-v1-1-a9b0d18a2649@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 36 +++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 7 deletions(-) commit 998ad09ad3b0ef1776fcb988af4916a062b92cc1 Author: Udit Kumar <u-kumar1@ti.com> Date: Thu Jan 2 16:08:14 2025 +0530 arm64: dts: ti: k3-j722s-evm: Enable PMIC Add support for TPS6522x PMIC family on wakeup I2C0 bus. This device provides regulators (bucks and LDOs), along with GPIOs, and monitors SOC's MCU error signal. Signed-off-by: Udit Kumar <u-kumar1@ti.com> Link: https://lore.kernel.org/r/20250102103814.102499-1-u-kumar1@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 88 +++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) commit ff7b5e93f16ab68231fd039a33fea8c67fd25955 Author: Dasnavis Sabiya <sabiya.d@ti.com> Date: Wed Jan 8 09:59:46 2025 +0100 arm64: dts: ti: k3-am69-sk: Add USB SuperSpeed support AM69 SK board has two stacked USB3 connectors: 1. USB3 (Stacked TypeA + TypeC) 2. USB3 TypeA Hub interfaced through TUSB8041. The board uses SERDES0 Lane 3 for USB3 IP. So update the SerDes lane info for PCIe and USB. Add the pin mux data and enable USB 3.0 support with its respective SERDES settings. Signed-off-by: Dasnavis Sabiya <sabiya.d@ti.com> Signed-off-by: Enric Balletbo i Serra <eballetb@redhat.com> Reviewed-by: Roger Quadros <rogerq@kernel.org> Link: https://lore.kernel.org/r/20250108-am69sk-dt-usb-v3-1-bb4981534754@redhat.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am69-sk.dts | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit eb2008a8fcd243fcb7d646bdf1909349b3faec6d Author: Francesco Valla <francesco@valla.it> Date: Sun Jan 5 17:26:30 2025 +0100 arm64: dts: ti: k3-am625-beagleplay: Fix DP83TD510E reset time The reset deassert time for the DP83TD510E is incorrectly set to 60000us, while the datasheet states that the minimum time required after an hard reset is 30us (while 60ms is the time required for the Power-On Reset after supply stabilization). The error probably arose from the two timings being indicated by the same symbol (T2). Lower the required time to 35us, aligning it to the value required for the PHY to complete the reset AND to be able to accept the RMII master clock. This saves ~60ms on boot if the MDIO driver is built-in. Signed-off-by: Francesco Valla <francesco@valla.it> Link: https://lore.kernel.org/r/20250105162630.243899-1-francesco@valla.it Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2b69180431968250bf3c0c581155f1b37d057c1 Author: Josua Mayer <josua@solid-run.com> Date: Wed Jan 1 13:30:22 2025 +0100 arm64: dts: ti: k3-am642-hummingboard-t: Convert overlay to board dts SolidRun HummingBoard-T has two options for M.2 connector, supporting either PCI-E or USB-3.1 Gen 1 - depending on configuration of a mux on the serdes lane. The required configurations in device-tree were modeled as overlays. The USB-3.1 overlay uses /delete-property/ to unset a boolean property on the usb controller limiting it to USB-2.0 by default. Overlays can not delete a property from the base dtb, therefore this overlay is at this time useless. Convert both overlays into full dts by including the base board dts. While the pcie overlay was functional, both are converted for a consistent user experience when selecting between the two mutually exclusive configurations. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Closes: https://lore.kernel.org/linux-devicetree/CAMuHMdXTgpTnJ9U7egC2XjFXXNZ5uiY1O+WxNd6LPJW5Rs5KTw@mail.gmail.com Fixes: bbef42084cc1 ("arm64: dts: ti: hummingboard-t: add overlays for m.2 pci-e and usb-3") Signed-off-by: Josua Mayer <josua@solid-run.com> Link: https://lore.kernel.org/r/20250101-am64-hb-fix-overlay-v2-1-78143f5da28c@solid-run.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/Makefile | 4 ---- ...gboard-t-pcie.dtso => k3-am642-hummingboard-t-pcie.dts} | 14 ++++++++------ ...gboard-t-usb3.dtso => k3-am642-hummingboard-t-usb3.dts} | 13 ++++++++----- 3 files changed, 16 insertions(+), 15 deletions(-) commit b09cc758bc015a100b440d5c70098aebd0ddcd43 Author: Siddharth Vadapalli <s-vadapalli@ti.com> Date: Thu Dec 5 16:20:36 2024 +0530 arm64: dts: ti: k3-am69-sk: Add overlay for PCIE0 Endpoint Mode Add overlay to enable the PCIE0 instance of PCIe on AM69-SK in Endpoint mode of operation. Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Link: https://lore.kernel.org/r/20241205105041.749576-5-s-vadapalli@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/Makefile | 4 ++ arch/arm64/boot/dts/ti/k3-am69-sk-pcie0-ep.dtso | 53 +++++++++++++++++++++++++ 2 files changed, 57 insertions(+) commit 58efed5800e901cf9b320c56e8879878f09b8291 Author: Siddharth Vadapalli <s-vadapalli@ti.com> Date: Thu Dec 5 16:20:35 2024 +0530 arm64: dts: ti: k3-am68-sk-base-board: Add overlay for PCIE1 Endpoint Mode Add overlay to enable the PCIE1 instance of PCIe on AM68-SK-Base-Board in Endpoint mode of operation. PCIE1 on AM68-SK-Base-Board supports x2 Lane operation unlike its counterpart on J721S2-EVM which supports x1 Lane. Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Link: https://lore.kernel.org/r/20241205105041.749576-4-s-vadapalli@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/Makefile | 4 ++ .../dts/ti/k3-am68-sk-base-board-pcie1-ep.dtso | 53 ++++++++++++++++++++++ 2 files changed, 57 insertions(+) commit c3015d4540a47ced846bf973e5a473fb4181662a Author: Siddharth Vadapalli <s-vadapalli@ti.com> Date: Thu Dec 5 16:20:34 2024 +0530 arm64: dts: ti: k3-j721e-evm: Add overlay for PCIE1 Endpoint Mode Add overlay to enable the PCIE1 instance of PCIe on J721E-EVM in Endpoint mode of operation. Additionally, in order to support both PCIE0 and PCIE1 in Endpoint Mode of operation, enable applying device-tree overlays on "k3-j721e-evm-pcie0-ep.dtb", thereby allowing the overlay for PCIE1 in Endpoint mode to be applied on the aforementioned DTB. Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Link: https://lore.kernel.org/r/20241205105041.749576-3-s-vadapalli@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/Makefile | 5 +++ arch/arm64/boot/dts/ti/k3-j721e-evm-pcie1-ep.dtso | 53 +++++++++++++++++++++++ 2 files changed, 58 insertions(+) commit a7543eaeb31544b9c3f6248cac8189aa1480c0f5 Author: Siddharth Vadapalli <s-vadapalli@ti.com> Date: Thu Dec 5 16:20:33 2024 +0530 arm64: dts: ti: Makefile: Fix typo "k3-j7200-evm-pcie1-ep.dtbo" The list of "dtbs" should contain the resultant "dtb" formed by applying the "dtbo" overlay on the base "dtb", rather than the "dtbo" itself. Hence, change "k3-j7200-evm-pcie1-ep.dtbo" to "k3-j7200-evm-pcie1-ep.dtb" in the list of "dtbs". Fixes: f43ec89bbc83 ("arm64: dts: ti: k3-j7200-evm: Add overlay for PCIE1 Endpoint Mode") Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Link: https://lore.kernel.org/r/20241205105041.749576-2-s-vadapalli@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4b7779abc6633677e6edb79e2809f4f61fde157 Author: Zhen Lei <thunder.leizhen@huawei.com> Date: Tue Oct 15 09:40:53 2024 +0800 media: nuvoton: Fix an error check in npcm_video_ece_init() When function of_find_device_by_node() fails, it returns NULL instead of an error code. So the corresponding error check logic should be modified to check whether the return value is NULL and set the error code to be returned as -ENODEV. Fixes: 46c15a4ff1f4 ("media: nuvoton: Add driver for NPCM video capture and encoding engine") Cc: stable@vger.kernel.org Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Link: https://lore.kernel.org/r/20241015014053.669-1-thunder.leizhen@huawei.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/nuvoton/npcm-video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c36b9ad1a8add3c114e25fe167efa217a813b0c7 Author: Desnes Nunes <desnesn@redhat.com> Date: Thu Sep 19 14:27:55 2024 -0300 media: dvb-usb-v2: af9035: fix ISO C90 compilation error on af9035_i2c_master_xfer This fixes a 'ISO C90 forbids mixed declarations and code' compilation error on af9035_i2c_master_xfer, which is caused by the sanity check added on user controlled msg[i], before declaring the demodulator register. Fixes: 7bf744f2de0a ("media: dvb-usb-v2: af9035: Fix null-ptr-deref in af9035_i2c_master_xfer") Signed-off-by: Desnes Nunes <desnesn@redhat.com> Link: https://lore.kernel.org/r/20240919172755.196907-1-desnesn@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/dvb-usb-v2/af9035.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit df7b2f206a9e5b47a4f47344b751fa9b8fa3c78a Author: Rengarajan S <rengarajan.s@microchip.com> Date: Thu Dec 5 19:19:56 2024 +0530 misc: microchip: pci1xxxx: Add push-pull drive support for GPIO Add support to configure GPIO pins for push-pull drive mode. Signed-off-by: Rengarajan S <rengarajan.s@microchip.com> Link: https://lore.kernel.org/r/20241205134956.1493091-1-rengarajan.s@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c | 3 +++ 1 file changed, 3 insertions(+) commit 154916f4b59dc2228caad5fc98e9e6a7e1a84e19 Author: Lukas Bulwahn <lukas.bulwahn@redhat.com> Date: Wed Jan 8 13:52:07 2025 +0100 scripts/spdxcheck: Handle license identifiers in Jinja comments Commit 4b132aacb076 ("tools: Add xdrgen") adds a tool, which uses Jinja template files, i.e., files with the j2 file extension, for its lightweight code generation. These template files for this tool have proper headers with the SPDX License information, which are included as Jinja comments by enclosing the text with '{#' and '#}'. Sofar, the spdxcheck script does not support to properly parse this license information in Jinja comments and it reports back with 'Invalid token: #}'. Parse Jinja comments properly by stripping the known Jinja comment suffix. Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com> Link: https://lore.kernel.org/r/20250108125207.57486-1-lukas.bulwahn@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> scripts/spdxcheck.py | 3 +++ 1 file changed, 3 insertions(+) commit 634d34e856ca0123f96613ffaf1852a1d3b46880 Author: Thomas Gleixner <tglx@linutronix.de> Date: Fri Nov 29 11:37:45 2024 +0100 scripts/spdxcheck: Parse j2 comments correctly j2 files use '#}' as comment closure, which trips up the SPDX parser: tools/.../definition.j2: 1:36 Invalid token: #} Handle those comments correctly by removing the closure. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/878qt2xr46.ffs@tglx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> scripts/spdxcheck.py | 3 +++ 1 file changed, 3 insertions(+) commit f2c77f6e41e68e1b24c165acbf6d4da6b3117e23 Author: Pranjal Shrivastava <praan@google.com> Date: Tue Jan 7 16:51:00 2025 +0000 iommu/arm-smmu-v3: Use str_read_write helper w/ logs Adopt the `str_read_write` helper in event logging as suggested by the coccinelle tool. Signed-off-by: Pranjal Shrivastava <praan@google.com> Reviewed-by: Nicolin Chen <nicolinc@nvidia.com> Link: https://lore.kernel.org/all/20250107130053.GC6991@willie-the-truck/ Link: https://lore.kernel.org/r/20250107165100.1093357-1-praan@google.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1edec22457e6fabc5450a6eea7fdc0e1b6dab31 Author: Jeremy Linton <jeremy.linton@arm.com> Date: Fri Dec 20 12:12:36 2024 -0600 arm64: rsi: Add automatic arm-cca-guest module loading The TSM module provides guest identification and attestation when a guest runs in CCA realm mode. By creating a dummy platform device, let's ensure the module is automatically loaded. The udev daemon loads the TSM module after it receives a device addition event. Once that happens, it can be used earlier in the boot process to decrypt the rootfs. Signed-off-by: Jeremy Linton <jeremy.linton@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Steven Price <steven.price@arm.com> Link: https://lore.kernel.org/r/20241220181236.172060-2-jeremy.linton@arm.com Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/include/asm/rsi.h | 2 ++ arch/arm64/kernel/rsi.c | 15 +++++++++++++++ drivers/virt/coco/arm-cca-guest/arm-cca-guest.c | 8 ++++++++ 3 files changed, 25 insertions(+) commit 94794b5ce4d90ab134b0b101a02fddf6e74c437d Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Thu Sep 5 12:25:05 2024 +0100 media: platform: rzg2l-cru: rzg2l-video: Fix the comment in rzg2l_cru_start_streaming_vq() Replace "buffer." -> "buffer", for consistency with rest of the comment blocks in rzg2l_cru_start_streaming_vq(). Reported-by: Pavel Machek <pavel@denx.de> Closes: https://lore.kernel.org/all/ZtWNFuw70nkB37EK@duo.ucw.cz/ Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20240905112508.160560-1-biju.das.jz@bp.renesas.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6b24cc3e267c11c3965a052bf07dd24a8ee07af Author: Apoorva Singh <apoorva.singh@intel.com> Date: Fri Dec 27 16:59:20 2024 +0530 drm/i915/gt: Prevent uninitialized pointer reads Initialize rq to NULL to prevent uninitialized pointer reads. Signed-off-by: Apoorva Singh <apoorva.singh@intel.com> Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241227112920.1547592-1-apoorva.singh@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/i915/gt/selftest_migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8600640d21cf90f3c5c4f06a5b214fbe4be9a74a Author: Mark Brown <broonie@kernel.org> Date: Tue Jan 7 22:59:45 2025 +0000 kselftest/arm64: Add 2024 dpISA extensions to hwcap test Add coverage of the hwcaps for the 2024 dpISA extensions to the hwcap test. We don't actually test SIGILL generation for CMPBR since the need to branch makes it a pain to generate and the SIGILL detection would be unreliable anyway. Since this should be very unusual we provide a stub function rather than supporting a missing test. The sigill functions aren't well sorted in the file so the ordering is a bit random. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20250107-arm64-2024-dpisa-v5-5-7578da51fc3d@kernel.org Signed-off-by: Will Deacon <will@kernel.org> tools/testing/selftests/arm64/abi/hwcap.c | 235 +++++++++++++++++++++++++++++- 1 file changed, 233 insertions(+), 2 deletions(-) commit fd22af17a458d98c14cebd00091cebf69b954b40 Author: Mark Brown <broonie@kernel.org> Date: Tue Jan 7 22:59:44 2025 +0000 KVM: arm64: Allow control of dpISA extensions in ID_AA64ISAR3_EL1 ID_AA64ISAR3_EL1 is currently marked as unallocated in KVM but does have a number of bitfields defined in it. Expose FPRCVT and FAMINMAX, two simple instruction only extensions to guests. Reviewed-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20250107-arm64-2024-dpisa-v5-4-7578da51fc3d@kernel.org Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/kvm/sys_regs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 819935464cb2f72fff8dfbbf95cf2726d4a66388 Author: Mark Brown <broonie@kernel.org> Date: Tue Jan 7 22:59:43 2025 +0000 arm64/hwcap: Describe 2024 dpISA extensions to userspace The 2024 dpISA introduces a number of architecture features all of which only add new instructions so only require the addition of hwcaps and ID register visibility. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20250107-arm64-2024-dpisa-v5-3-7578da51fc3d@kernel.org Signed-off-by: Will Deacon <will@kernel.org> Documentation/arch/arm64/elf_hwcaps.rst | 50 +++++++++++++++++++++++++++++++++ arch/arm64/include/asm/hwcap.h | 15 ++++++++++ arch/arm64/include/uapi/asm/hwcap.h | 15 ++++++++++ arch/arm64/kernel/cpufeature.c | 31 ++++++++++++++++++++ arch/arm64/kernel/cpuinfo.c | 15 ++++++++++ 5 files changed, 126 insertions(+) commit 47e4717eb6fc5fc7d5437bd096885e0e85d3cea3 Author: Mark Brown <broonie@kernel.org> Date: Tue Jan 7 22:59:42 2025 +0000 arm64/sysreg: Update ID_AA64SMFR0_EL1 to DDI0601 2024-12 DDI0601 2024-12 introduces SME 2.2 as well as a few new optional features, update sysreg to reflect the changes in ID_AA64SMFR0_EL1 enumerating them. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20250107-arm64-2024-dpisa-v5-2-7578da51fc3d@kernel.org Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/tools/sysreg | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit 064737920bdbca86df91b96aed256e88018fef3a Author: Marc Zyngier <maz@kernel.org> Date: Tue Jan 7 22:59:41 2025 +0000 arm64: Filter out SVE hwcaps when FEAT_SVE isn't implemented The hwcaps code that exposes SVE features to userspace only considers ID_AA64ZFR0_EL1, while this is only valid when ID_AA64PFR0_EL1.SVE advertises that SVE is actually supported. The expectations are that when ID_AA64PFR0_EL1.SVE is 0, the ID_AA64ZFR0_EL1 register is also 0. So far, so good. Things become a bit more interesting if the HW implements SME. In this case, a few ID_AA64ZFR0_EL1 fields indicate *SME* features. And these fields overlap with their SVE interpretations. But the architecture says that the SME and SVE feature sets must match, so we're still hunky-dory. This goes wrong if the HW implements SME, but not SVE. In this case, we end-up advertising some SVE features to userspace, even if the HW has none. That's because we never consider whether SVE is actually implemented. Oh well. Fix it by restricting all SVE capabilities to ID_AA64PFR0_EL1.SVE being non-zero. The HWCAPS documentation is amended to reflect the actually checks performed by the kernel. Fixes: 06a916feca2b ("arm64: Expose SVE2 features for userspace") Reported-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: Will Deacon <will@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: stable@vger.kernel.org Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20250107-arm64-2024-dpisa-v5-1-7578da51fc3d@kernel.org Signed-off-by: Will Deacon <will@kernel.org> Documentation/arch/arm64/elf_hwcaps.rst | 39 +++++++++++++++++++++----------- arch/arm64/kernel/cpufeature.c | 40 ++++++++++++++++++++++----------- 2 files changed, 53 insertions(+), 26 deletions(-) commit 138a99ca4e20fa1e17b4e59fa053981913702d6d Author: Johan Hovold <johan@kernel.org> Date: Wed Jan 8 11:15:18 2025 +0100 USB: serial: ch341: use fix-width types consistently Use Linux fix-width types consistently and drop a related unnecessary cast. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org> drivers/usb/serial/ch341.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 82a0a3e6f8c02b3236b55e784a083fa4ee07c321 Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Wed Jan 8 12:28:46 2025 +0300 ASoC: renesas: rz-ssi: Add a check for negative sample_space My static checker rule complains about this code. The concern is that if "sample_space" is negative then the "sample_space >= runtime->channels" condition will not work as intended because it will be type promoted to a high unsigned int value. strm->fifo_sample_size is SSI_FIFO_DEPTH (32). The SSIFSR_TDC_MASK is 0x3f. Without any further context it does seem like a reasonable warning and it can't hurt to add a check for negatives. Cc: stable@vger.kernel.org Fixes: 03e786bd4341 ("ASoC: sh: Add RZ/G2L SSIF-2 driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/e07c3dc5-d885-4b04-a742-71f42243f4fd@stanley.mountain Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/renesas/rz-ssi.c | 2 ++ 1 file changed, 2 insertions(+) commit 9c3d68ce5dee76f30b23ca29b2be4774e291f7f1 Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Wed Jan 8 03:05:52 2025 +0000 ASoC: soc-card: remove card check only snd_soc_card_set_bias_level() and snd_soc_card_set_bias_level_post() are checking "card" in the function, like below int snd_soc_card_set_bias_level(...) { ... => if (card && card->xxx) ret = card->xxxx(...); ... } But it should already have been an error if "card" was NULL. remove "card" NULL check here. Otherwise it will get waring on smatch without this patch. This is prepare for error check cleanup. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87msg2knsg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/soc-card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 33bb2d16063bd105acd99075a6161761ab510e33 Author: Yuxue Liu <yuxue.liu@jaguarmicro.com> Date: Tue Dec 3 10:37:43 2024 +0800 vdpa/vp_vdpa: implement kick_vq_with_data callback Implement the kick_vq_with_data vDPA callback. On kick, we pass the next available data to the hardware by writing it in the kick offset. Signed-off-by: Yuxue Liu <yuxue.liu@jaguarmicro.com> Message-Id: <20241203023743.1757-1-yuxue.liu@jaguarmicro.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> drivers/vdpa/virtio_pci/vp_vdpa.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 302b49daf0c75cafd0719eadf09127abf5a69e50 Author: zhang jiao <zhangjiao2@cmss.chinamobile.com> Date: Wed Nov 20 13:49:20 2024 +0800 virtio_balloon: Use outer variable 'page' There is no need to define a local variable 'page', just use outer variable 'page'. Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com> Message-Id: <20241120054920.35291-1-zhangjiao2@cmss.chinamobile.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Gavin Shan <gshan@redhat.com> drivers/virtio/virtio_balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2859e1ac3110f2d428a794bda26ea0d90b2254c6 Author: Michael Riesch <michael.riesch@wolfvision.net> Date: Wed Dec 18 11:43:12 2024 +0100 arm64: dts: rockchip: enable hdmi out audio on wolfvision pf5 Enable HDMI out audio on the WolfVision PF5 mainboard. Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> Link: https://lore.kernel.org/r/20241218-b4-wolfvision-pf5-update-v1-2-1d1959858708@wolfvision.net Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/rk3568-wolfvision-pf5.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 11d07966c83f5eccf6b927cb32862aef58488e23 Author: Michael Riesch <michael.riesch@wolfvision.net> Date: Wed Dec 18 11:43:11 2024 +0100 arm64: dts: rockchip: fix num-channels property of wolfvision pf5 mic The Rockchip RK3568 PDM block always considers stereo inputs. Therefore, the number of channels must be always an even number, even if a single mono microphone is attached. Fixes: 0be29f76633a ("arm64: dts: rockchip: add wolfvision pf5 mainboard") Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> Link: https://lore.kernel.org/r/20241218-b4-wolfvision-pf5-update-v1-1-1d1959858708@wolfvision.net Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/rk3568-wolfvision-pf5.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0cc356ce96d92155d98570f08e1229c509d2263c Author: Anton Kirilov <anton.kirilov@arm.com> Date: Thu Dec 19 11:25:32 2024 +0000 arm64: dts: rockchip: Enable the USB 3.0 port on NanoPi R6C/R6S Enable the USB 3.0 port on FriendlyElec NanoPi R6C/R6S boards. Signed-off-by: Anton Kirilov <anton.kirilov@arm.com> Link: https://lore.kernel.org/r/20241219112532.482891-1-anton.kirilov@arm.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit c301e1fefc2d6c83a2beb47e9cdd7b59a90b0067 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:35:11 2024 -0600 ntsync: No longer depend on BROKEN. f5b335dc025cfee90957efa90dc72fada0d5abb4 ("misc: ntsync: mark driver as "broken" to prevent from building") was committed to avoid the driver being used while only part of its functionality was released. Since the rest of the functionality has now been committed, revert this. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20241213193511.457338-31-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 6b695a75ff908fa03d4108d837dcaf590cb42492 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:35:10 2024 -0600 docs: ntsync: Add documentation for the ntsync uAPI. Add an overall explanation of the driver architecture, and complete and precise specification for its intended behaviour. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-30-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/userspace-api/index.rst | 1 + Documentation/userspace-api/ntsync.rst | 385 +++++++++++++++++++++++++++++++++ 2 files changed, 386 insertions(+) commit 79d42d9d6d827ba90b9ebe7f78972992b7a0e7af Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:35:09 2024 -0600 maintainers: Add an entry for ntsync. Add myself as maintainer, supported by CodeWeavers. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20241213193511.457338-29-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit a22860e57b54e9b55028243764f7899fe7c4ae4b Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:35:08 2024 -0600 selftests: ntsync: Add a stress test for contended waits. Test a more realistic usage pattern, and one with heavy contention, in order to actually exercise ntsync's internal synchronization. This test has several threads in a tight loop acquiring a mutex, modifying some shared data, and then releasing the mutex. At the end we check if the data is consistent. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-28-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> tools/testing/selftests/drivers/ntsync/ntsync.c | 72 +++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit c52b9cb13fd1bd03199c3e5c58c5b7fcaa82d459 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:35:07 2024 -0600 selftests: ntsync: Add some tests for wakeup signaling via alerts. Expand the alert tests to cover alerting a thread mid-wait, to test that the relevant scheduling logic works correctly. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-27-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> tools/testing/selftests/drivers/ntsync/ntsync.c | 62 +++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit dd914e0d07423c172cd8fdcf25e1ee92485a95cf Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:35:06 2024 -0600 selftests: ntsync: Add tests for alertable waits. Test the "alert" functionality of NTSYNC_IOC_WAIT_ALL and NTSYNC_IOC_WAIT_ANY, when a wait is woken with an alert and when it is woken by an object. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-26-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> tools/testing/selftests/drivers/ntsync/ntsync.c | 167 +++++++++++++++++++++++- 1 file changed, 164 insertions(+), 3 deletions(-) commit a2e5a8cea74502cef32ffadb9796df0073513181 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:35:05 2024 -0600 selftests: ntsync: Add some tests for wakeup signaling with events. Expand the contended wait tests, which previously only covered events and semaphores, to cover events as well. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-25-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> tools/testing/selftests/drivers/ntsync/ntsync.c | 145 +++++++++++++++++++++++- 1 file changed, 141 insertions(+), 4 deletions(-) commit b4e4dd5d2f7002b9a4b5dbc750b64d45cc7e5245 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:35:04 2024 -0600 selftests: ntsync: Add some tests for auto-reset event state. Test event-specific ioctls NTSYNC_IOC_EVENT_SET, NTSYNC_IOC_EVENT_RESET, NTSYNC_IOC_EVENT_PULSE, NTSYNC_IOC_EVENT_READ for auto-reset events, and waiting on auto-reset events. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-24-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> tools/testing/selftests/drivers/ntsync/ntsync.c | 56 +++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit d2083b5f51a2977cbe91d9f05dd2d1c6307f5bd8 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:35:03 2024 -0600 selftests: ntsync: Add some tests for manual-reset event state. Test event-specific ioctls NTSYNC_IOC_EVENT_SET, NTSYNC_IOC_EVENT_RESET, NTSYNC_IOC_EVENT_PULSE, NTSYNC_IOC_EVENT_READ for manual-reset events, and waiting on manual-reset events. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-23-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> tools/testing/selftests/drivers/ntsync/ntsync.c | 86 +++++++++++++++++++++++++ 1 file changed, 86 insertions(+) commit 72a651c13159247e051754c04b008f1d7f40b7a6 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:35:02 2024 -0600 selftests: ntsync: Add some tests for wakeup signaling with WINESYNC_IOC_WAIT_ALL. Test contended "wait-for-all" waits, to make sure that scheduling and wakeup logic works correctly, and that the wait only exits once objects are all simultaneously signaled. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-22-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> tools/testing/selftests/drivers/ntsync/ntsync.c | 91 +++++++++++++++++++++++++ 1 file changed, 91 insertions(+) commit f23279852ad53c463442c952acb5a1df71b2e737 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:35:01 2024 -0600 selftests: ntsync: Add some tests for wakeup signaling with WINESYNC_IOC_WAIT_ANY. Test contended "wait-for-any" waits, to make sure that scheduling and wakeup logic works correctly. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-21-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> tools/testing/selftests/drivers/ntsync/ntsync.c | 143 ++++++++++++++++++++++++ 1 file changed, 143 insertions(+) commit d168f68939a978b3b1276bd841596e1fc563797b Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:35:00 2024 -0600 selftests: ntsync: Add some tests for NTSYNC_IOC_WAIT_ALL. Test basic synchronous functionality of NTSYNC_IOC_WAIT_ALL, and when objects are considered simultaneously signaled. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-20-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> tools/testing/selftests/drivers/ntsync/ntsync.c | 93 ++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 2 deletions(-) commit 4455456958aa2006a3df287b2ab1a0d1e130be3c Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:59 2024 -0600 selftests: ntsync: Add some tests for NTSYNC_IOC_WAIT_ANY. Test basic synchronous functionality of NTSYNC_IOC_WAIT_ANY, when objects are considered signaled or not signaled, and how they are affected by a successful wait. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-19-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> tools/testing/selftests/drivers/ntsync/ntsync.c | 114 ++++++++++++++++++++++++ 1 file changed, 114 insertions(+) commit ae071aef1486be85b6fc2d219368900ff4d55408 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:58 2024 -0600 selftests: ntsync: Add some tests for mutex state. Test mutex-specific ioctls NTSYNC_IOC_MUTEX_UNLOCK and NTSYNC_IOC_MUTEX_READ, and waiting on mutexes. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-18-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> tools/testing/selftests/drivers/ntsync/ntsync.c | 187 ++++++++++++++++++++++++ 1 file changed, 187 insertions(+) commit 7f853a252cdefa9f574c2dce4f9f38a7c10d6b5a Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:57 2024 -0600 selftests: ntsync: Add some tests for semaphore state. Wine has tests for its synchronization primitives, but these are more accessible to kernel developers, and also allow us to test some edge cases that Wine does not care about. This patch adds tests for semaphore-specific ioctls NTSYNC_IOC_SEM_POST and NTSYNC_IOC_SEM_READ, and waiting on semaphores. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-17-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> tools/testing/selftests/Makefile | 1 + tools/testing/selftests/drivers/ntsync/.gitignore | 1 + tools/testing/selftests/drivers/ntsync/Makefile | 7 ++ tools/testing/selftests/drivers/ntsync/config | 1 + tools/testing/selftests/drivers/ntsync/ntsync.c | 145 ++++++++++++++++++++++ 5 files changed, 155 insertions(+) commit a138179a59d47690b069fbded1be12f47648ef07 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:56 2024 -0600 ntsync: Introduce alertable waits. NT waits can optionally be made "alertable". This is a special channel for thread wakeup that is mildly similar to SIGIO. A thread has an internal single bit of "alerted" state, and if a thread is alerted while an alertable wait, the wait will return a special value, consume the "alerted" state, and will not consume any of its objects. Alerts are implemented using events; the user-space NT emulator is expected to create an internal ntsync event for each thread and pass that event to wait functions. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20241213193511.457338-16-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ntsync.c | 70 +++++++++++++++++++++++++++++++++++++++------ include/uapi/linux/ntsync.h | 3 +- 2 files changed, 63 insertions(+), 10 deletions(-) commit e864071a630cfbbd55251e7b45461003f4f79877 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:55 2024 -0600 ntsync: Introduce NTSYNC_IOC_EVENT_READ. This corresponds to the NT syscall NtQueryEvent(). This returns the signaled state of the event and whether it is manual-reset. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-15-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ntsync.c | 24 ++++++++++++++++++++++++ include/uapi/linux/ntsync.h | 1 + 2 files changed, 25 insertions(+) commit 0b3c31449d28c83c0b8a8a7be569aa30d70b7764 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:54 2024 -0600 ntsync: Introduce NTSYNC_IOC_MUTEX_READ. This corresponds to the NT syscall NtQueryMutant(). This returns the recursion count, owner, and abandoned state of the mutex. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-14-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ntsync.c | 26 ++++++++++++++++++++++++++ include/uapi/linux/ntsync.h | 1 + 2 files changed, 27 insertions(+) commit a948f4177c3cce5f27648696da95c62c0253a099 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:53 2024 -0600 ntsync: Introduce NTSYNC_IOC_SEM_READ. This corresponds to the NT syscall NtQuerySemaphore(). This returns the current count and maximum count of the semaphore. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-13-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ntsync.c | 24 ++++++++++++++++++++++++ include/uapi/linux/ntsync.h | 1 + 2 files changed, 25 insertions(+) commit 12b29d3008e6bd5118af716ae2971fe6823b117a Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:52 2024 -0600 ntsync: Introduce NTSYNC_IOC_EVENT_PULSE. This corresponds to the NT syscall NtPulseEvent(). This wakes up any waiters as if the event had been set, but does not set the event, instead resetting it if it had been signalled. Thus, for a manual-reset event, all waiters are woken, whereas for an auto-reset event, at most one waiter is woken. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20241213193511.457338-12-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ntsync.c | 8 ++++++-- include/uapi/linux/ntsync.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) commit bbb9797514b20c316314b78a439f87fd16b7c509 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:51 2024 -0600 ntsync: Introduce NTSYNC_IOC_EVENT_RESET. This corresponds to the NT syscall NtResetEvent(). This sets the event to the unsignaled state, and returns its previous state. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20241213193511.457338-11-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ntsync.c | 24 ++++++++++++++++++++++++ include/uapi/linux/ntsync.h | 1 + 2 files changed, 25 insertions(+) commit 2dcba6fc15a442b1cf1df8cdd0da12f20db38c43 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:50 2024 -0600 ntsync: Introduce NTSYNC_IOC_EVENT_SET. This corresponds to the NT syscall NtSetEvent(). This sets the event to the signaled state, and returns its previous state. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-10-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ntsync.c | 27 +++++++++++++++++++++++++++ include/uapi/linux/ntsync.h | 1 + 2 files changed, 28 insertions(+) commit 4c7404b9c2b572b42dc63bfde5e862290dab53b5 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:49 2024 -0600 ntsync: Introduce NTSYNC_IOC_CREATE_EVENT. This correspond to the NT syscall NtCreateEvent(). An NT event holds a single bit of state denoting whether it is signaled or unsignaled. There are two types of events: manual-reset and automatic-reset. When an automatic-reset event is acquired via a wait function, its state is reset to unsignaled. Manual-reset events are not affected by wait functions. Whether the event is manual-reset, and its initial state, are specified at creation time. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-9-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ntsync.c | 59 +++++++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/ntsync.h | 6 +++++ 2 files changed, 65 insertions(+) commit ecc2ee361466e4a22e95b1c27d90f8cbd4f22e93 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:48 2024 -0600 ntsync: Introduce NTSYNC_IOC_MUTEX_KILL. This does not correspond to any NT syscall. Rather, when a thread dies, it should be called by the NT emulator for each mutex, with the TID of the dying thread. NT mutexes are robust (in the pthread sense). When an NT thread dies, any mutexes it owned are immediately released. Acquisition of those mutexes by other threads will return a special value indicating that the mutex was abandoned, like EOWNERDEAD returned from pthread_mutex_lock(), and EOWNERDEAD is indeed used here for that purpose. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-8-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ntsync.c | 61 +++++++++++++++++++++++++++++++++++++++++++-- include/uapi/linux/ntsync.h | 1 + 2 files changed, 60 insertions(+), 2 deletions(-) commit 31ca7bb8e8539b454414a2c4f8ad643c939cb0cf Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:47 2024 -0600 ntsync: Introduce NTSYNC_IOC_MUTEX_UNLOCK. This corresponds to the NT syscall NtReleaseMutant(). This syscall decrements the mutex's recursion count by one, and returns the previous value. If the mutex is not owned by the current task, the function instead fails and returns -EPERM. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-7-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ntsync.c | 53 +++++++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/ntsync.h | 1 + 2 files changed, 54 insertions(+) commit 5bc2479a3585be35ea32e431bc82282bbf5a5d5b Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:46 2024 -0600 ntsync: Introduce NTSYNC_IOC_CREATE_MUTEX. This corresponds to the NT syscall NtCreateMutant(). An NT mutex is recursive, with a 32-bit recursion counter. When acquired via NtWaitForMultipleObjects(), the recursion counter is incremented by one. The OS records the thread which acquired it. The OS records the thread which acquired it. However, in order to keep this driver self-contained, the owning thread ID is managed by user-space, and passed as a parameter to all relevant ioctls. The initial owner and recursion count, if any, are specified when the mutex is created. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-6-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ntsync.c | 74 +++++++++++++++++++++++++++++++++++++++++++-- include/uapi/linux/ntsync.h | 9 +++++- 2 files changed, 79 insertions(+), 4 deletions(-) commit cdbb997822806cc1071619b67aef485bb2b921b1 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:45 2024 -0600 ntsync: Introduce NTSYNC_IOC_WAIT_ALL. This is similar to NTSYNC_IOC_WAIT_ANY, but waits until all of the objects are simultaneously signaled, and then acquires all of them as a single atomic operation. Because acquisition of multiple objects is atomic, some complex locking is required. We cannot simply spin-lock multiple objects simultaneously, as that may disable preëmption for a problematically long time. Instead, modifying any object which may be involved in a wait-all operation takes a device-wide sleeping mutex, "wait_all_lock", instead of the normal object spinlock. Because wait-for-all is a rare operation, in order to optimize wait-for-any, this lock is only taken when necessary. "all_hint" is used to mark objects which are involved in a wait-for-all operation, and if an object is not, only its spinlock is taken. The locking scheme used here was written by Peter Zijlstra. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-5-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ntsync.c | 336 ++++++++++++++++++++++++++++++++++++++++++-- include/uapi/linux/ntsync.h | 1 + 2 files changed, 323 insertions(+), 14 deletions(-) commit b4a7b5fe3f5149fa35278807e0dc13ddb093f4b8 Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:44 2024 -0600 ntsync: Introduce NTSYNC_IOC_WAIT_ANY. This corresponds to part of the functionality of the NT syscall NtWaitForMultipleObjects(). Specifically, it implements the behaviour where the third argument (wait_any) is TRUE, and it does not handle alertable waits. Those features have been split out into separate patches to ease review. This patch therefore implements the wait/wake infrastructure which comprises the core of ntsync's functionality. NTSYNC_IOC_WAIT_ANY is a vectored wait function similar to poll(). Unlike poll(), it "consumes" objects when they are signaled. For semaphores, this means decreasing one from the internal counter. At most one object can be consumed by this function. This wait/wake model is fundamentally different from that used anywhere else in the kernel, and for that reason ntsync does not use any existing infrastructure, such as futexes, kernel mutexes or semaphores, or wait_event(). Up to 64 objects can be waited on at once. As soon as one is signaled, the object with the lowest index is consumed, and that index is returned via the "index" field. A timeout is supported. The timeout is passed as a u64 nanosecond value, which represents absolute time measured against either the MONOTONIC or REALTIME clock (controlled by the flags argument). If U64_MAX is passed, the ioctl waits indefinitely. This ioctl validates that all objects belong to the relevant device. This is not necessary for any technical reason related to NTSYNC_IOC_WAIT_ANY, but will be necessary for NTSYNC_IOC_WAIT_ALL introduced in the following patch. Some padding fields are added for alignment and for fields which will be added in future patches (split out to ease review). Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-4-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ntsync.c | 247 +++++++++++++++++++++++++++++++++++++++++++- include/uapi/linux/ntsync.h | 14 +++ 2 files changed, 260 insertions(+), 1 deletion(-) commit 5ec43d6b0328a2383525a2b90306c9077480e0bf Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:43 2024 -0600 ntsync: Rename NTSYNC_IOC_SEM_POST to NTSYNC_IOC_SEM_RELEASE. Use the more common "release" terminology, which is also the term used by NT, instead of "post" (which is used by POSIX). Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-3-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ntsync.c | 10 +++++----- include/uapi/linux/ntsync.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit d75abf2f9f2e584633bd1072267a2ff25deb422b Author: Elizabeth Figura <zfigura@codeweavers.com> Date: Fri Dec 13 13:34:42 2024 -0600 ntsync: Return the fd from NTSYNC_IOC_CREATE_SEM. Simplify the user API a bit by returning the fd as return value from the ioctl instead of through the argument pointer. Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://lore.kernel.org/r/20241213193511.457338-2-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ntsync.c | 7 ++----- include/uapi/linux/ntsync.h | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) commit def35da76073fcf43c2fae4942ebe55b60dc84a6 Author: Costa Shulyupin <costa.shul@redhat.com> Date: Mon Dec 9 10:29:57 2024 +0200 scripts/tags.sh: Tag timer definitions For timer definitions like DEFINE_TIMER(mytimer, mytimer_handler); ctags generates tags `DEFINE_TIMER` and skips `mytimer` because it doesn't expand the DEFINE_TIMER macro. Configure ctags to generate tag for `mytimer` ans skip the `DEFINE_TIMER` tag in such cases. Signed-off-by: Costa Shulyupin <costa.shul@redhat.com> Link: https://lore.kernel.org/r/20241209083004.911013-2-costa.shul@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> scripts/tags.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 37df9043329b8292d53789c19e05faf7f3ae5ae8 Author: Vimal Agrawal <vimal.agrawal@sophos.com> Date: Mon Oct 21 13:39:26 2024 +0000 misc:minor basic kunit tests basic kunit tests for misc minor Signed-off-by: Vimal Agrawal <vimal.agrawal@sophos.com> Reviewed-by: Dirk VanDerMerwe <dirk.vandermerwe@sophos.com> Link: https://lore.kernel.org/r/20241021133926.23774-1-vimal.agrawal@sophos.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/Makefile | 1 + drivers/misc/misc_minor_kunit.c | 69 +++++++++++++++++++++++++++++++++++++++++ lib/Kconfig.debug | 11 +++++++ 3 files changed, 81 insertions(+) commit 6d04d2b554b14ae6c428a9c60b6c85f1e5c89f68 Author: Vimal Agrawal <vimal.agrawal@sophos.com> Date: Mon Oct 21 13:38:12 2024 +0000 misc: misc_minor_alloc to use ida for all dynamic/misc dynamic minors misc_minor_alloc was allocating id using ida for minor only in case of MISC_DYNAMIC_MINOR but misc_minor_free was always freeing ids using ida_free causing a mismatch and following warn: > > WARNING: CPU: 0 PID: 159 at lib/idr.c:525 ida_free+0x3e0/0x41f > > ida_free called for id=127 which is not allocated. > > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ... > > [<60941eb4>] ida_free+0x3e0/0x41f > > [<605ac993>] misc_minor_free+0x3e/0xbc > > [<605acb82>] misc_deregister+0x171/0x1b3 misc_minor_alloc is changed to allocate id from ida for all minors falling in the range of dynamic/ misc dynamic minors Fixes: ab760791c0cf ("char: misc: Increase the maximum number of dynamic misc devices to 1048448") Signed-off-by: Vimal Agrawal <vimal.agrawal@sophos.com> Reviewed-by: Dirk VanDerMerwe <dirk.vandermerwe@sophos.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20241021133812.23703-1-vimal.agrawal@sophos.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/char/misc.c | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) commit 567a311d0a1a433f1e5bff508f3eb7ebfa189aa3 Author: Alyssa Ross <hi@alyssa.is> Date: Fri Dec 20 00:29:57 2024 +0100 VMCI: remove unused ioctl definitions IOCTL_VMCI_SOCKETS_VERSION and IOCTL_VMCI_SOCKETS_GET_AF_VALUE were never implemented, because VSOCK ended up being implemented as a generic mechanism with a static AF value. Likewise, IOCTL_VMCI_SOCKETS_GET_LOCAL_CID ended up being implemented as IOCTL_VM_SOCKETS_GET_LOCAL_CID. This isn't a UAPI header, so it should be fine to remove the unused values. I've left a comment noting IOCTL_VM_SOCKETS_GET_LOCAL_CID is in the VMCI range to avoid unintentional reuse. Signed-off-by: Alyssa Ross <hi@alyssa.is> Acked-by: Vishnu Dasa <vishnu.dasa@broadcom.com> Link: https://lore.kernel.org/r/fzdcrz4yfedokmbm22h2iwsluix4jwejwaltuwcdr6kz3yu6eu@nue5xc6ayevo Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> include/linux/vmw_vmci_defs.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2a8f84b5b1b6a76dea8c3bccb95370076cddbba0 Author: Carlos Llamas <cmllamas@google.com> Date: Mon Jan 6 19:26:07 2025 +0000 binder: fix kernel-doc warning of 'file' member The 'struct file' member in 'binder_task_work_cb' definition was renamed to 'file' between patch versions but its kernel-doc reference kept the old name 'fd'. Update the naming to fix the W=1 build warning. Cc: Todd Kjos <tkjos@google.com> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202501031535.erbln3A2-lkp@intel.com/ Signed-off-by: Carlos Llamas <cmllamas@google.com> Acked-by: Todd Kjos <tkjos@google.com> Link: https://lore.kernel.org/r/20250106192608.1107362-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12d909cac1e1c4147cc3417fee804ee12fc6b984 Author: Li Li <dualli@google.com> Date: Wed Dec 18 13:29:34 2024 -0800 binderfs: add new binder devices to binder_devices When binderfs is not enabled, the binder driver parses the kernel config to create all binder devices. All of the new binder devices are stored in the list binder_devices. When binderfs is enabled, the binder driver creates new binder devices dynamically when userspace applications call BINDER_CTL_ADD ioctl. But the devices created in this way are not stored in the same list. This patch fixes that. Signed-off-by: Li Li <dualli@google.com> Acked-by: Carlos Llamas <cmllamas@google.com> Link: https://lore.kernel.org/r/20241218212935.4162907-2-dualli@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/android/binder.c | 5 +++++ drivers/android/binder_internal.h | 11 +++++++++-- drivers/android/binderfs.c | 2 ++ 3 files changed, 16 insertions(+), 2 deletions(-) commit b3b9b3cccb32a6df2f3f9f3177b06de628939cb7 Author: Rodolfo Giometti <giometti@enneenne.com> Date: Fri Nov 8 08:31:15 2024 +0100 Documentation ABI: add PPS generators documentation This patch adds the documentation for the ABI between the Linux kernel and userspace regarding the PPS generators. Signed-off-by: Rodolfo Giometti <giometti@enneenne.com> Link: https://lore.kernel.org/r/20241108073115.759039-5-giometti@enneenne.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/ABI/testing/sysfs-pps-gen | 43 +++++++++++++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 44 insertions(+) commit b14aea0ce0c78db53f2a42c8595d51c63cf0079a Author: Rodolfo Giometti <giometti@enneenne.com> Date: Fri Nov 8 08:31:14 2024 +0100 Documentation pps.rst: add PPS generators documentation This patch adds some examples about how to register a new PPS generator in the system, and how to manage it. Signed-off-by: Rodolfo Giometti <giometti@enneenne.com> Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com> Link: https://lore.kernel.org/r/20241108073115.759039-4-giometti@enneenne.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/driver-api/pps.rst | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 580afe4acbd40ddeca5f2edc2bca7f7ab6999fc8 Author: Rodolfo Giometti <giometti@enneenne.com> Date: Fri Nov 8 08:31:13 2024 +0100 drivers pps/generators: add dummy PPS generator This dummy PPS generator can be used for debugging and documentation purposes. Signed-off-by: Rodolfo Giometti <giometti@enneenne.com> Link: https://lore.kernel.org/r/20241108073115.759039-3-giometti@enneenne.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/pps/generators/Kconfig | 9 ++++ drivers/pps/generators/Makefile | 1 + drivers/pps/generators/pps_gen-dummy.c | 96 ++++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+) commit 86b525bed2758878e788c9fb6b8fb281fd61bdb0 Author: Rodolfo Giometti <giometti@enneenne.com> Date: Fri Nov 8 08:31:12 2024 +0100 drivers pps: add PPS generators support Sometimes one needs to be able not only to catch PPS signals but to produce them also. For example, running a distributed simulation, which requires computers' clock to be synchronized very tightly. This patch adds PPS generators class in order to have a well-defined interface for these devices. Signed-off-by: Rodolfo Giometti <giometti@enneenne.com> Link: https://lore.kernel.org/r/20241108073115.759039-2-giometti@enneenne.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/userspace-api/ioctl/ioctl-number.rst | 1 + MAINTAINERS | 1 + drivers/pps/Makefile | 3 +- drivers/pps/generators/Kconfig | 13 +- drivers/pps/generators/Makefile | 3 + drivers/pps/generators/pps_gen.c | 344 +++++++++++++++++++++ drivers/pps/generators/sysfs.c | 75 +++++ include/linux/pps_gen_kernel.h | 78 +++++ include/uapi/linux/pps_gen.h | 37 +++ 9 files changed, 553 insertions(+), 2 deletions(-) commit bd266303f7a44bd033f9580ce4ef161684aaf468 Author: David Jander <david@protonic.nl> Date: Thu Dec 19 13:34:57 2024 +0100 arm64: dts: rockchip: Add FRAM MB85RS128TY to rk3568-mecsbc The board features a Fujitsu MB85RS128TY FRAM chip connected to spi0 CS 0. Add support for the MB85RS128TY to the device tree. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Jonas Rebmann <jre@pengutronix.de> Link: https://lore.kernel.org/r/20241219-mb85rs128ty-mecsbc-v1-2-77a0e851ef19@pengutronix.de Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/rk3568-mecsbc.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 60f7293a3da9eb1d8127cb8e331ddfc4ed605ff8 Author: David Jander <david@protonic.nl> Date: Thu Dec 19 13:34:56 2024 +0100 arm64: dts: rockchip: Remove unused i2c2 node from rk3568-mecsbc One of the pins of i2c2 is actually in use as chip select 0 for spi0. The chip select 0 is used for an FRAM chip, which will be added in the next patch. Remove the i2c2 node from the rk3568-mecsbc device tree. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Jonas Rebmann <jre@pengutronix.de> Link: https://lore.kernel.org/r/20241219-mb85rs128ty-mecsbc-v1-1-77a0e851ef19@pengutronix.de Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/rk3568-mecsbc.dts | 6 ------ 1 file changed, 6 deletions(-) commit e2ee8a440869281620fbcacdca6e13cbeebcc1be Author: Jagan Teki <jagan@edgeble.ai> Date: Sat Dec 21 20:47:58 2024 +0530 arm64: dts: rockchip: Fix PCIe3 handling for Edgeble-6TOPS Modules The Edgeble 6TOPS modules has configured the PCIe3.0 with - 2 lanes on Port1 of pcie3x2 controller for M.2 M-Key - 2 lanes on Port0 of pcie3x4 controller for B and E-Key The, current DT uses opposite controller nodes that indeed uses incorrect reset, regulator nodes. The configuration also uses refclk oscillator that need to enable explicitly in DT to avoid the probe hang on while reading DBI. So, this patch fixes all these essential issues and make this PCIe work properly. Issues fixed are, - Fix the associate controller nodes for M and B, E-Key - Fix the reset gpio handlings - Fix the regulator handlings and naming convensions - Support pcie_refclk oscillator Fixes: 92eaee21abbd ("arm64: dts: rockchip: Add Edgeble NCM6A-IO M.2 B-Key, E-Key") Fixes: 5d85d4c7e03b ("arm64: dts: rockchip: Add Edgeble NCM6A-IO M.2 M-Key") Reported-by: Mitchell Ma <machuang@radxa.com> Co-developed-by: Mitchell Ma <machuang@radxa.com> Signed-off-by: Jagan Teki <jagan@edgeble.ai> Link: https://lore.kernel.org/r/20241221151758.345257-1-jagan@edgeble.ai Signed-off-by: Heiko Stuebner <heiko@sntech.de> .../boot/dts/rockchip/rk3588-edgeble-neu6a-io.dtsi | 81 ++++++++++++++++------ 1 file changed, 59 insertions(+), 22 deletions(-) commit 90234cf9b37c57201a24b78c217a91a8af774109 Author: Rafał Miłecki <rafal@milecki.pl> Date: Mon Jun 17 11:46:33 2024 +0200 ARM: dts: mediatek: mt7623: fix IR nodename Fix following validation error: arch/arm/boot/dts/mediatek/mt7623a-rfb-emmc.dtb: cir@10013000: $nodename:0: 'cir@10013000' does not match '^ir(-receiver)?(@[a-f0-9]+)?$' from schema $id: http://devicetree.org/schemas/media/mediatek,mt7622-cir.yaml# Fixes: 91044f38dae7 ("arm: dts: mt7623: add ir nodes to the mt7623.dtsi file") Cc: linux-media@vger.kernel.org Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Link: https://lore.kernel.org/r/20240617094634.23173-1-zajec5@gmail.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> arch/arm/boot/dts/mediatek/mt7623.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9be4171219b659a8f0fa0a7913af2c6ab20c714e Author: FUKAUMI Naoki <naoki@radxa.com> Date: Thu Dec 26 02:46:30 2024 +0000 arm64: dts: rockchip: Add Radxa E52C Radxa E52C[1] is a compact network computer based on the Rockchip RK3582 SoC: - Dual Cortex-A76 and quad Cortex-A55 CPU - 5TOPS NPU - 2GB/4GB/8GB LPDDR4 RAM - 16GB/32GB/64GB on-board eMMC - microSD card slot - USB 3.0 Type-A HOST port - USB Type-C debug port - USB Type-C power port (5V only) - 2x 2.5GbE ports [1] https://radxa.com/products/network-computer/e52c Signed-off-by: FUKAUMI Naoki <naoki@radxa.com> Link: https://lore.kernel.org/r/20241226024630.13702-3-naoki@radxa.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/Makefile | 1 + arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts | 743 +++++++++++++++++++++ 2 files changed, 744 insertions(+) commit ddf021193879f54bb8fd9acdcf467b24229a553e Author: FUKAUMI Naoki <naoki@radxa.com> Date: Thu Dec 26 02:46:29 2024 +0000 dt-bindings: arm: rockchip: Add Radxa E52C Add devicetree binding for the Radxa E52C. Radxa E52C is a compact network computer based on the Rockchip RK3582 SoC. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com> Link: https://lore.kernel.org/r/20241226024630.13702-2-naoki@radxa.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> Documentation/devicetree/bindings/arm/rockchip.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 309caeef4381e8777f65030dccabc71456650269 Merge: c51187903fe4 9d89551994a4 Author: Mark Brown <broonie@kernel.org> Date: Wed Jan 8 11:58:49 2025 +0000 ASoC: Merge up v6.13-rc6 This helps several of my boards in CI. commit bfbc663d2733a42d93143a91659e82c8a13f5a36 Author: Ivan Sergeev <ivan8215145640@gmail.com> Date: Mon Jan 6 23:50:55 2025 +0300 arm64: dts: rockchip: Add BigTreeTech CB2 and Pi2 BigTreeTech CB2 and Pi2 share a lot of hardware configuration, so a common dtsi file was used to define common nodes and properties. This is similar to how BigTreeTech CB1 and Pi are implemented. Signed-off-by: Ivan Sergeev <ivan8215145640@gmail.com> Link: https://lore.kernel.org/r/20250106-bigtreetech-cb2-v7-2-565567e2c0a4@gmail.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/Makefile | 2 + .../dts/rockchip/rk3566-bigtreetech-cb2-manta.dts | 10 + .../boot/dts/rockchip/rk3566-bigtreetech-cb2.dtsi | 904 +++++++++++++++++++++ .../boot/dts/rockchip/rk3566-bigtreetech-pi2.dts | 10 + 4 files changed, 926 insertions(+) commit 570e4d121ac4e1dd80ddeaec6956020692f6ddc5 Author: jieqing.wang <standback@126.com> Date: Thu Dec 1 13:27:05 2022 +0800 media: fix secfeed undefined when filter alloc fail In dvb_dmxdev_filter_start, when secfeed allocate secfilter fail. the secfeed of current dmxfilter, need set to NULL; Instead of call start_filtering, which already handled in dvb_dmxdev_feed_restart Signed-off-by: jieqing.wang <standback@126.com> Link: https://lore.kernel.org/r/20221201052705.2313911-1-standback@126.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/dvb-core/dmxdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b989531e0bd7704dc837e37f8d16bbc921e6cf6c Author: Yongji Xie <xieyongji@bytedance.com> Date: Tue Nov 19 15:42:38 2024 +0800 vduse: relicense under GPL-2.0 OR BSD-3-Clause Dual-license the vduse kernel header file to dual GPL-2.0 OR BSD-3-Clause license to make it possible to ship it with DPDK (under BSD-3-Clause) for older distros. Signed-off-by: Yongji Xie <xieyongji@bytedance.com> Message-Id: <20241119074238.38299-1-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> include/uapi/linux/vduse.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a623c642b4066a5cea751ef52ab109b65e8afb5 Author: Ivan Sergeev <ivan8215145640@gmail.com> Date: Mon Jan 6 23:50:54 2025 +0300 dt-bindings: arm: rockchip: Add BigTreeTech CB2 and Pi2 BigTreeTech CB2 and Pi2 are Rockchip RK3566 based boards Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Ivan Sergeev <ivan8215145640@gmail.com> Link: https://lore.kernel.org/r/20250106-bigtreetech-cb2-v7-1-565567e2c0a4@gmail.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> Documentation/devicetree/bindings/arm/rockchip.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 38f9e4b905a00047a96fbdc6cefe9ceb4dae34c3 Author: Kalesh Singh <kaleshsingh@google.com> Date: Mon Nov 11 16:32:50 2024 -0800 arm64: kvm: Introduce nvhe stack size constants Refactor nvhe stack code to use NVHE_STACK_SIZE/SHIFT constants, instead of directly using PAGE_SIZE/SHIFT. This makes the code a bit easier to read, without introducing any functional changes. Cc: Marc Zyngier <maz@kernel.org> Cc: Mark Brown <broonie@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Will Deacon <will@kernel.org> Signed-off-by: Kalesh Singh <kaleshsingh@google.com> Link: https://lore.kernel.org/r/20241112003336.1375584-1-kaleshsingh@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/memory.h | 5 ++++- arch/arm64/include/asm/stacktrace/nvhe.h | 2 +- arch/arm64/kvm/arm.c | 18 +++++++++--------- arch/arm64/kvm/hyp/nvhe/host.S | 4 ++-- arch/arm64/kvm/hyp/nvhe/mm.c | 12 ++++++------ arch/arm64/kvm/hyp/nvhe/stacktrace.c | 4 ++-- arch/arm64/kvm/mmu.c | 12 ++++++------ arch/arm64/kvm/stacktrace.c | 6 +++--- 8 files changed, 33 insertions(+), 30 deletions(-) commit 68344037b764401f751c66661c53334ea1e15324 Author: Vincent Donnefort <vdonnefort@google.com> Date: Tue Jan 7 11:28:21 2025 +0000 KVM: arm64: Fix nVHE stacktrace VA bits mask The hypervisor VA space size depends on both the ID map's (IDMAP_VA_BITS) and the kernel stage-1 (VA_BITS). However, the hypervisor stacktrace decoding is solely relying on VA_BITS. This is especially an issue when VA_BITS < IDMAP_VA_BITS (i.e. VA_BITS is 39-bit): the hypervisor may have addresses bigger than the stacktrace is masking. Align this mask with hyp_va_bits. Signed-off-by: Vincent Donnefort <vdonnefort@google.com> Link: https://lore.kernel.org/r/20250107112821.416591-1-vdonnefort@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_mmu.h | 2 ++ arch/arm64/kvm/mmu.c | 3 +++ arch/arm64/kvm/stacktrace.c | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) commit a15d12f36eb78692d5c3ebd8a5db7fddf3ea160c Author: Chen-Yu Tsai <wens@csie.org> Date: Sat Dec 21 00:12:40 2024 +0800 arm64: dts: rockchip: Enable USB 3.0 ports on orangepi-5-plus The Orange Pi 5 Plus has its first USB 3.0 interface on the SoC wired directly to the USB type C port next to the MASKROM button, and the second interface wired to a USB 3.0 hub which in turn is connected to the USB 3.0 host ports on the board, as well as the USB 2.0 connection on the M.2 E-key slot. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Ondrej Jirman <megi@xff.cz> Link: https://lore.kernel.org/r/20241220161240.109253-1-wens@kernel.org Signed-off-by: Heiko Stuebner <heiko@sntech.de> .../boot/dts/rockchip/rk3588-orangepi-5-plus.dts | 133 +++++++++++++++++++++ 1 file changed, 133 insertions(+) commit b53864811b35247193856a45567d416b8341ae7d Author: Alexey Charkov <alchark@gmail.com> Date: Wed Jan 8 13:09:08 2025 +0400 arm64: dts: rockchip: Add H96 Max V58 TV Box based on RK3588 SoC H96 Max V58 is a compact Rockchip RK3588 based device that ships with Android and is meant for use as a TV connected media box. Its hardware includes: - Rockchip RK3588 SoC with a small aluminium heatsink - 4GB or 8GB LPDDR4 RAM - 32GB or 64GB eMMC 5.1 storage (HS400) - Onboard AP6275P wireless module providing 802.11ax 2x2 MIMO WiFi over PCIe connection and Bluetooth 5.3 over UART with two external detachable antennas - 1x GbE using the onboard GMAC and an RTL8211F PHY - 1x USB 2.0 Type-A (also serves as the Maskrom port) - 1x USB 3.0 Type-A - 1x HDMI 2.1 output - 1x optical SPDIF output - LED line display ("88:88" digits plus icons) driven by an FD6551 IC connected over bitbanged I2C (not yet enabled here) - GPIO connected CIR receiver - Single Rockchip RK806-1 PMIC - 12x onboard ambient LEDs lighting up the bottom of the device - 5v DCIN using a standard round 5.5mm connector Signed-off-by: Alexey Charkov <alchark@gmail.com> Link: https://lore.kernel.org/r/20250108-rk3588-h96-max-v58-v2-3-522301b905d6@gmail.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/Makefile | 1 + .../arm64/boot/dts/rockchip/rk3588-h96-max-v58.dts | 802 +++++++++++++++++++++ 2 files changed, 803 insertions(+) commit 6e9efe826b02ccd68700be691ce9addbd5c81e40 Author: Alexey Charkov <alchark@gmail.com> Date: Wed Jan 8 13:09:06 2025 +0400 dt-bindings: arm: rockchip: Add H96 Max V58 TV box Add Devicetree binding for H96 Max V58: a compact Rockchip RK3588 based device that ships with Android and is meant for use as a TV connected media box. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Alexey Charkov <alchark@gmail.com> Link: https://lore.kernel.org/r/20250108-rk3588-h96-max-v58-v2-1-522301b905d6@gmail.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit f135a1a07352b848d3d39557413dd1cd3716d930 Author: Kever Yang <kever.yang@rock-chips.com> Date: Tue Jan 7 15:49:11 2025 +0800 arm64: dts: rockchip: Add rk3576 evb1 board RK3576 EVB1 board features: - Rockchip RK3576 - PMIC: RK806-2x2pcs+DiscretePower - RAM: LPDDR4/4x 2pcsx 32bit - ROM: eMMC5.1 + UFS - LAN x 2 - HDMI TX - SD card slot - PCIe2 slot Add support for pmic, eMMC, SD-card, ADC-KEY, PCIE and GMAC. NOTE: The board has a hardware mux design for - PCIe slot(pcie1) - USB3 host(usb_drd1_dwc3) and default state is switch to USB3. To enable PCIe slot: - hardware: Switch the mux to PCIe side; - dts: disable usb_drd1_dwc3 and enable pcie1; Signed-off-by: Liang Chen <cl@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Link: https://lore.kernel.org/r/20250107074911.550057-8-kever.yang@rock-chips.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/Makefile | 1 + arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dts | 731 +++++++++++++++++++++++ 2 files changed, 732 insertions(+) commit b7f345fbc32afab0f0b03c71c7eaf48b9a0ad7ed Author: Vladimir Murzin <vladimir.murzin@arm.com> Date: Mon Jan 6 11:24:21 2025 +0000 KVM: arm64: Fix FEAT_MTE in pKVM Make sure we do not trap access to Allocation Tags. Fixes: b56680de9c64 ("KVM: arm64: Initialize trap register values in hyp in pKVM") Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Reviewed-by: Oliver Upton <oliver.upton@linux.dev> Reviewed-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20250106112421.65355-1-vladimir.murzin@arm.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/nvhe/pkvm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e8440c1e2d23a9ca5e0af1a18be637cbd5a5d44f Author: Mostafa Saleh <smostafa@google.com> Date: Fri Oct 25 09:32:59 2024 +0000 Documentation: Update the behaviour of "kvm-arm.mode" Commit 5053c3f0519c ("KVM: arm64: Use hVHE in pKVM by default on CPUs with VHE support") modified the behaviour of "kvm-arm.mode=protected" without the updating the kernel parameters doc. Update it to match the current implementation. Also, update required architecture version for nested virtualization as suggested by Marc. Cc: Will Deacon <will@kernel.org> Cc: Marc Zyngier <maz@kernel.org> Signed-off-by: Mostafa Saleh <smostafa@google.com> Link: https://lore.kernel.org/r/20241025093259.2216093-1-smostafa@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> Documentation/admin-guide/kernel-parameters.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 79821b907f8d7fbc991554fc940075dc1b29a0f4 Author: Yazen Ghannam <yazen.ghannam@amd.com> Date: Fri Dec 6 16:12:06 2024 +0000 x86/amd_node: Use defines for SMN register offsets There are more than one SMN index/data pair available for software use. The register offsets are different, but the protocol is the same. Use defines for the SMN offset values and allow the index/data offsets to be passed to the read/write helper function. This eases code reuse with other SMN users in the kernel. Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241206161210.163701-14-yazen.ghannam@amd.com arch/x86/kernel/amd_node.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 77466b798d59d6761501ff36094cf430d3876549 Author: Yazen Ghannam <yazen.ghannam@amd.com> Date: Fri Dec 6 16:12:05 2024 +0000 x86/amd_node: Remove dependency on AMD_NB Cache the root devices locally so that there are no more dependencies on AMD_NB. Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241206161210.163701-13-yazen.ghannam@amd.com arch/x86/kernel/amd_node.c | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) commit 35df797665cb69e68a3a99e499e75e73efbd4f77 Author: Yazen Ghannam <yazen.ghannam@amd.com> Date: Fri Dec 6 16:12:04 2024 +0000 x86/amd_node: Update __amd_smn_rw() error paths Use guard(mutex) and convert PCI error codes to common ones. Suggested-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241206161210.163701-12-yazen.ghannam@amd.com arch/x86/kernel/amd_node.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit d6caeafaa324e6aba5ed2ca1a416340c2fd061a2 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Fri Dec 6 16:12:03 2024 +0000 x86/amd_nb: Move SMN access code to a new amd_node driver SMN access was bolted into amd_nb mostly as convenience. This has limitations though that require incurring tech debt to keep it working. Move SMN access to the newly introduced AMD Node driver. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> # pdx86 Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> # PMF, PMC Link: https://lore.kernel.org/r/20241206161210.163701-11-yazen.ghannam@amd.com MAINTAINERS | 1 + arch/x86/include/asm/amd_nb.h | 3 -- arch/x86/include/asm/amd_node.h | 3 ++ arch/x86/kernel/amd_nb.c | 89 ----------------------------------- arch/x86/kernel/amd_node.c | 90 ++++++++++++++++++++++++++++++++++++ arch/x86/pci/fixup.c | 4 +- drivers/edac/Kconfig | 1 + drivers/edac/amd64_edac.c | 1 + drivers/hwmon/Kconfig | 2 +- drivers/hwmon/k10temp.c | 2 +- drivers/platform/x86/amd/pmc/Kconfig | 2 +- drivers/platform/x86/amd/pmc/pmc.c | 3 +- drivers/platform/x86/amd/pmf/Kconfig | 2 +- drivers/platform/x86/amd/pmf/core.c | 2 +- drivers/ras/amd/atl/Kconfig | 1 + drivers/ras/amd/atl/internal.h | 1 + 16 files changed, 107 insertions(+), 100 deletions(-) commit 7dd57db495d49c004fffc77265ffbaccf340aa20 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Fri Dec 6 16:12:02 2024 +0000 x86/amd_nb, hwmon: (k10temp): Simplify amd_pci_dev_to_node_id() amd_pci_dev_to_node_id() tries to find the AMD node ID of a device by searching and counting devices. The AMD node ID of an AMD node device is simply its slot number minus the AMD node 0 slot number. Simplify this function and move it to k10temp.c. [ Yazen: Update commit message and simplify function. ] Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Co-developed-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Acked-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20241206161210.163701-10-yazen.ghannam@amd.com arch/x86/include/asm/amd_nb.h | 17 ----------------- drivers/hwmon/k10temp.c | 5 +++++ 2 files changed, 5 insertions(+), 17 deletions(-) commit 49b96fc0dddc7b3a01c6707fcaad06fc520402ac Author: Yazen Ghannam <yazen.ghannam@amd.com> Date: Tue Jan 7 22:28:42 2025 +0000 x86/amd_nb: Simplify function 3 search Use the newly introduced helper function to look up "function 3". Drop unused PCI IDs and code. Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20250107222847.3300430-8-yazen.ghannam@amd.com arch/x86/kernel/amd_nb.c | 46 +--------------------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) commit bc7b2e629e0c9251ba96d864a30d34d1497b1b1b Author: Yazen Ghannam <yazen.ghannam@amd.com> Date: Tue Jan 7 22:28:41 2025 +0000 x86/amd_nb: Use topology info to get AMD node count Currently, the total AMD node count is determined by searching and counting CPU/node devices using PCI IDs. However, AMD node information is already available through topology CPUID/MSRs. The recent topology rework has made this info easier to access. Replace the node counting code with a simple product of topology info. Every node/northbridge is expected to have a 'misc' device. Clear everything out if a 'misc' device isn't found on a node. Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20250107222847.3300430-7-yazen.ghannam@amd.com arch/x86/include/asm/amd_node.h | 5 +++++ arch/x86/kernel/amd_nb.c | 22 +++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) commit 40a5f6ffdfc8f8ed0d8c535dfa3733b31c66a88c Author: Yazen Ghannam <yazen.ghannam@amd.com> Date: Fri Dec 6 16:11:59 2024 +0000 x86/amd_nb: Simplify root device search The "root" device search was introduced to support SMN access for Zen systems. This device represents a PCIe root complex. It is not the same as the "CPU/node" devices found at slots 0x18-0x1F. There may be multiple PCIe root complexes within an AMD node. Such is the case with server or High-end Desktop (HEDT) systems, etc. Therefore it is not enough to assume "root <-> AMD node" is a 1-to-1 association. Currently, this is handled by skipping "extra" root complexes during the search. However, the hardware provides the PCI bus number of an AMD node's root device. Use the hardware info to get the root device's bus and drop the extra search code and PCI IDs. Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241206161210.163701-7-yazen.ghannam@amd.com arch/x86/include/asm/amd_node.h | 1 + arch/x86/kernel/amd_nb.c | 80 +++-------------------------------------- arch/x86/kernel/amd_node.c | 56 +++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 76 deletions(-) commit 962f1970a32430ce6c75ea23cbc59d68346481fd Author: Yazen Ghannam <yazen.ghannam@amd.com> Date: Fri Dec 6 16:11:58 2024 +0000 x86/amd_nb: Simplify function 4 search Use the newly added helper function to look up a CPU/Node function to find "function 4" devices. Thus, avoid the need to regularly add new PCI IDs for basic discovery. The unique PCI IDs are still useful in case of quirks or functional changes. And they should be used only in such a manner. Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241206161210.163701-6-yazen.ghannam@amd.com arch/x86/include/asm/amd_nb.h | 2 +- arch/x86/kernel/amd_nb.c | 66 ++----------------------------------------- 2 files changed, 4 insertions(+), 64 deletions(-) commit e6e6e5e85116b8587ab2dff7cd6ab3e082859ce7 Author: Yazen Ghannam <yazen.ghannam@amd.com> Date: Fri Dec 6 16:11:57 2024 +0000 x86: Start moving AMD node functionality out of AMD_NB The "AMD Node" concept spans many families of systems and applies to a number of subsystems and drivers. Currently, the AMD Northbridge code is overloaded with AMD node functionality. However, the node concept is broader than just northbridges. Start files to host common AMD node functions and definitions. Include a helper to find an AMD node device function based on the convention described in AMD documentation. Anything that needs node functionality should include this rather than amd_nb.h. The AMD_NB code will be reduced to only northbridge-specific code needed for legacy systems. Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241206161210.163701-5-yazen.ghannam@amd.com MAINTAINERS | 7 +++++++ arch/x86/Kconfig | 4 ++++ arch/x86/include/asm/amd_node.h | 27 +++++++++++++++++++++++++++ arch/x86/kernel/Makefile | 1 + arch/x86/kernel/amd_node.c | 34 ++++++++++++++++++++++++++++++++++ 5 files changed, 73 insertions(+) commit e13f51b51814e2527c51998d2dae594ef9cb633a Author: Yazen Ghannam <yazen.ghannam@amd.com> Date: Fri Dec 6 16:11:56 2024 +0000 x86/amd_nb: Clean up early_is_amd_nb() The check for early_is_amd_nb() is only useful for systems with GART or the NB_CFG register. Zen-based systems (both AMD and Hygon) have neither, so return early for them. Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241206161210.163701-4-yazen.ghannam@amd.com arch/x86/kernel/amd_nb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit bee9e840609cc67d0a7d82f22a2130fb7a0a766d Author: Yazen Ghannam <yazen.ghannam@amd.com> Date: Fri Dec 6 16:11:55 2024 +0000 x86/amd_nb: Restrict init function to AMD-based systems The code implicitly operates on AMD-based systems by matching on PCI IDs. However, the use of these IDs is going away. Add an explicit CPU vendor check instead of relying on PCI IDs. Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241206161210.163701-3-yazen.ghannam@amd.com arch/x86/kernel/amd_nb.c | 4 ++++ 1 file changed, 4 insertions(+) commit 88dc3756ece1d19ab0aa85ceb6ffb4e5f9318ae1 Author: Kever Yang <kever.yang@rock-chips.com> Date: Tue Jan 7 15:49:10 2025 +0800 dt-bindings: arm: rockchip: Add rk3576 evb1 board Add device tree documentation for rk3576-evb1-v10. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20250107074911.550057-7-kever.yang@rock-chips.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit ffd07673f08a03ff5532212ebbd98fbfd0dac00e Author: Kever Yang <kever.yang@rock-chips.com> Date: Tue Jan 7 15:49:09 2025 +0800 dt-bindings: arm: rockchip: Sort for boards not in correct order The board entries should be sort in correct order by the description string. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20250107074911.550057-6-kever.yang@rock-chips.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> .../devicetree/bindings/arm/rockchip.yaml | 54 +++++++++++----------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 23ec57a32da448cb3415d6abad3457b14c69af25 Author: Frank Wang <frank.wang@rock-chips.com> Date: Tue Jan 7 15:49:08 2025 +0800 arm64: dts: rockchip: add usb related nodes for rk3576 This adds USB and USB-PHY related nodes for RK3576 SoC. Signed-off-by: Frank Wang <frank.wang@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Link: https://lore.kernel.org/r/20250107074911.550057-5-kever.yang@rock-chips.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/rk3576.dtsi | 133 +++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) commit ddbf63b25866a4a58222d763f9f2d29c309e00e8 Author: Kever Yang <kever.yang@rock-chips.com> Date: Tue Jan 7 15:49:05 2025 +0800 arm64: dts: rockchip: Add rk3576 naneng combphy nodes rk3576 has two naneng combo phys: - combophy0 is used for one of pcie and sata; - combophy1 is used for one of pcie, sata and usb3; Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Link: https://lore.kernel.org/r/20250107074911.550057-2-kever.yang@rock-chips.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/rk3576.dtsi | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 35478bc369a67b703a079ee123c6e58290114aae Author: Lode Willems <me@lodewillems.com> Date: Wed Dec 18 18:25:05 2024 +0100 USB: serial: ch341: add hardware flow control RTS/CTS This adds support for enabling and disabling RTS/CTS hardware flow control. Tested using CH341A and CH340E. Fixes part of the following bug report: Link: https://bugzilla.kernel.org/show_bug.cgi?id=197109 Signed-off-by: Lode Willems <me@lodewillems.com> [ johan: prepare index argument once, drop casts ] Signed-off-by: Johan Hovold <johan@kernel.org> drivers/usb/serial/ch341.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit a34c9fac85b2fe9d2a4191b3d5cc3a459823124e Author: Frank Wunderlich <frank-w@public-files.de> Date: Fri Jan 3 11:37:22 2025 +0100 arm64: dts: marvell: drop additional phy-names for sata Commit facbe7092f8a ("arm64: dts: marvell: Drop undocumented SATA phy names") drops some phy-names from devicetrees but misses some. Drop them too. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> arch/arm64/boot/dts/marvell/armada-8040-db.dts | 2 -- arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi | 2 -- 2 files changed, 4 deletions(-) commit 30023876aef49935da115d51c8cbea8746d8c6fa Author: Frank Wunderlich <frank-w@public-files.de> Date: Fri Jan 3 11:37:21 2025 +0100 arm64: dts: marvell: only enable complete sata nodes The ahci-platform binding requires phys/target-supply property. After converting the binding to yaml the following files reporting "'anyOf' conditional failed" on sata@540000: sata-port@0 armada-7040-db.dts armada-8040-clearfog-gt-8k.dts armada-8040-mcbin.dts armada-8040-mcbin-singleshot.dts cn9130-db.dts cn9130-db-B.dts cn9131-db.dts cn9131-db-B.dts cn9132-db.dts cn9132-db-B.dts the following files reporting 'anyOf' conditional failed on sata@540000: sata-port@1 cn9132-db.dts cn9132-db-B.dts cn9130-crb-B.dts 'phys' is a required property 'target-supply' is a required property >From schema: Documentation/devicetree/bindings/ata/ahci-platform.yaml This is caused by defining sata-ports incomplete in armada-cp11x.dtsi and overriding only a subset of ports with the needed phys/target-supply property. Fix this by disabling the node-templates and enabling the needed nodes. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> arch/arm64/boot/dts/marvell/armada-7040-db.dts | 1 + arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts | 2 ++ arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dts | 1 + arch/arm64/boot/dts/marvell/armada-8040-db.dts | 3 +++ arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-8040-puzzle-m801.dts | 2 ++ arch/arm64/boot/dts/marvell/armada-cp11x.dtsi | 2 ++ arch/arm64/boot/dts/marvell/cn9130-crb-B.dts | 1 + arch/arm64/boot/dts/marvell/cn9131-db.dtsi | 1 + arch/arm64/boot/dts/marvell/cn9132-db.dtsi | 1 + 10 files changed, 15 insertions(+) commit a3e72548282405056e9f8f8e9f5daba132c38bc4 Author: Nuno Das Neves <nunodasneves@linux.microsoft.com> Date: Mon Nov 25 15:24:41 2024 -0800 hyperv: Clean up unnecessary #includes Remove includes of linux/hyperv.h, mshyperv.h, and hyperv-tlfs.h where they are not used. Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> Acked-by: Wei Liu <wei.liu@kernel.org> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com> Link: https://lore.kernel.org/r/1732577084-2122-3-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <1732577084-2122-3-git-send-email-nunodasneves@linux.microsoft.com> arch/arm64/hyperv/hv_core.c | 1 - arch/x86/hyperv/hv_apic.c | 1 - arch/x86/hyperv/hv_init.c | 1 - arch/x86/hyperv/hv_proc.c | 1 - arch/x86/hyperv/ivm.c | 1 - arch/x86/hyperv/mmu.c | 1 - arch/x86/include/asm/kvm_host.h | 1 - arch/x86/include/asm/mshyperv.h | 1 - arch/x86/mm/pat/set_memory.c | 2 -- 9 files changed, 10 deletions(-) commit 9696d9ae016573568dfd65dd2a92d6e8d277b25b Author: Nuno Das Neves <nunodasneves@linux.microsoft.com> Date: Mon Nov 25 15:24:40 2024 -0800 hyperv: Move hv_connection_id to hyperv-tlfs.h This definition is in the wrong file; it is part of the TLFS doc. Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> Acked-by: Wei Liu <wei.liu@kernel.org> Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Link: https://lore.kernel.org/r/1732577084-2122-2-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <1732577084-2122-2-git-send-email-nunodasneves@linux.microsoft.com> include/asm-generic/hyperv-tlfs.h | 9 +++++++++ include/linux/hyperv.h | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 09cdb973afa7a18ce8e66807daff94609cc4b8a4 Author: Josua Mayer <josua@solid-run.com> Date: Tue Nov 19 18:33:08 2024 +0100 arm64: dts: marvell: cn9131-cf-solidwan: fix cp1 comphy links Marvell CN913x platforms use common phy framework for configuring and linking serdes lanes according to their usage. Each CP (X) features 5 serdes lanes (Y) represented by cpX_comphyY nodes. CN9131 SolidWAN uses CP1 serdes lanes 3 and 5 for eth1 and eth2 of CP1 respectively. Devicetree however wrongly links from these ports to the comphy of CP0. Replace the wrong links to cp0_comphy with cp1_comphy inside cp1_eth1, cp1_eth2. Fixes: 1280840d2030 ("arm64: dts: add description for solidrun cn9131 solidwan board") Signed-off-by: Josua Mayer <josua@solid-run.com> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> arch/arm64/boot/dts/marvell/cn9131-cf-solidwan.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 78dcad6daa405b8a939cd08f6ccd6c4e2cb50a9c Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Tue Jan 7 13:58:30 2025 +0100 dt-bindings: pwm: 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 <krzysztof.kozlowski@linaro.org> Acked-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20250107125831.225068-1-krzysztof.kozlowski@linaro.org Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org> Documentation/devicetree/bindings/pwm/adi,axi-pwmgen.yaml | 8 ++++---- Documentation/devicetree/bindings/pwm/brcm,bcm7038-pwm.yaml | 8 ++++---- Documentation/devicetree/bindings/pwm/brcm,kona-pwm.yaml | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) commit 2be952ee5f05997e1302d020021312a0fcefe7b4 Author: Takashi Iwai <tiwai@suse.de> Date: Tue Jan 7 16:56:35 2025 +0100 ALSA: firewire: Simplify with str_on_off() Use the standard helper str_on_off() to simplify the code. Only code refactoring, no behavior change. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://patch.msgid.link/20250107155641.4435-6-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/firewire/fireface/ff-protocol-former.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c7bba42ebc3da56e64d4aec4c4a31dd454e05fd Author: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Date: Wed Nov 27 14:29:50 2024 +0200 arm64: dts: qcom: sm8250: Fix interrupt types of camss interrupts Qualcomm IP catalog says that all CAMSS interrupts is edge rising, fix it in the CAMSS device tree node for sm8250 SoC. Fixes: 30325603b910 ("arm64: dts: qcom: sm8250: camss: Add CAMSS block definition") Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Link: https://lore.kernel.org/r/20241127122950.885982-7-vladimir.zapolskiy@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8250.dtsi | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit cb96722b728e81ad97f5b5b20dea64cd294a5452 Author: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Date: Wed Nov 27 14:29:49 2024 +0200 arm64: dts: qcom: sdm845: Fix interrupt types of camss interrupts Qualcomm IP catalog says that all CAMSS interrupts is edge rising, fix it in the CAMSS device tree node for sdm845 SoC. Fixes: d48a6698a6b7 ("arm64: dts: qcom: sdm845: Add CAMSS ISP node") Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Link: https://lore.kernel.org/r/20241127122950.885982-6-vladimir.zapolskiy@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sdm845.dtsi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit b08535cd41c27b4f32319b5bff754c9da6dc2205 Author: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Date: Wed Nov 27 14:29:48 2024 +0200 arm64: dts: qcom: sc8280xp: Fix interrupt type of camss interrupts Qualcomm IP catalog says that all CAMSS interrupts are edge rising, fix it in the CAMSS device tree node for sc8280xp SoC. Fixes: 5994dd60753e ("arm64: dts: qcom: sc8280xp: camss: Add CAMSS block definition") Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Tested-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241127122950.885982-5-vladimir.zapolskiy@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 40 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 46ee6177b76736b49b1f34bec1244e4996fd199c Author: Krishna Kurapati <quic_kriskura@quicinc.com> Date: Thu Nov 14 11:21:52 2024 +0530 arm64: dts: qcom: qcs8300-ride: Enable USB controllers Enable primary USB controller on QCS8300 Ride platform. The primary USB controller is made "peripheral", as this is intended to be connected to a host for debugging use cases. For using the controller in host mode, changing the dr_mode and adding appropriate pinctrl nodes to provide vbus would be sufficient. Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241114055152.1562116-3-quic_kriskura@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8300-ride.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit ceb39e1ea327a96cdd9fcc54c65664f0659cd9b7 Author: Krishna Kurapati <quic_kriskura@quicinc.com> Date: Thu Nov 14 11:21:51 2024 +0530 arm64: dts: qcom: qcs8300: Add support for usb nodes Add support for USB controllers on QCS8300. The second controller is only High Speed capable. Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241114055152.1562116-2-quic_kriskura@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 187 ++++++++++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) commit 795255cb4cd4388cac930e3bb3524e1ca84dd0bf Author: Imran Shaik <quic_imrashai@quicinc.com> Date: Thu Nov 14 16:35:55 2024 +0530 arm64: dts: qcom: qcs8300: Add support for clock controllers Add support for GPU, Video, Camera and Display clock controllers on Qualcomm QCS8300 platform. Signed-off-by: Imran Shaik <quic_imrashai@quicinc.com> Link: https://lore.kernel.org/r/20241114-qcs8300-mm-cc-dt-patch-v1-1-7a974508c736@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 59 +++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 5e419033b5cb20f9150bfec15dc6cdf10049e654 Author: Lukas Bulwahn <lukas.bulwahn@redhat.com> Date: Tue Jan 7 11:47:28 2025 +0100 clk: qcom: Select CLK_X1E80100_GCC in config CLK_X1P42100_GPUCC Commit 99c21c7ca642 ("clk: qcom: Add X1P42100 GPUCC driver") adds the config definition CLK_X1P42100_GPUCC. This config definition selects the non-existing config CLK_X1E8010_GCC. Note that the config for the X1E80100 Global Clock Controller is CLK_X1E80100_GCC. Assuming this was just a minor typo in the number, i.e., 8010 instead of 80100, change the definition to select the existing config CLK_X1E80100_GCC, similarly to the definitions for three configs CLK_X1E80100_{CAMCC,DISPCC,GPUCC}. Fixes: 99c21c7ca642 ("clk: qcom: Add X1P42100 GPUCC driver") Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com> Link: https://lore.kernel.org/r/20250107104728.23098-1-lukas.bulwahn@redhat.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01c2253a0fbdccb58cd79d4ff9ab39964bfb4474 Author: Christian Göttsche <cgzones@googlemail.com> Date: Mon Dec 16 17:40:07 2024 +0100 selinux: make more use of str_read() when loading the policy Simplify the call sites, and enable future string validation in a single place. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> [PM: subject tweak] Signed-off-by: Paul Moore <paul@paul-moore.com> security/selinux/ss/conditional.c | 10 ++-------- security/selinux/ss/policydb.c | 22 ++++++++-------------- security/selinux/ss/policydb.h | 2 ++ 3 files changed, 12 insertions(+), 22 deletions(-) commit 749153636643aaa793f14e84e864fdaf5ed0620d Author: Christian Göttsche <cgzones@googlemail.com> Date: Mon Dec 16 17:40:06 2024 +0100 selinux: avoid unnecessary indirection in struct level_datum Store the owned member of type struct mls_level directly in the parent struct instead of an extra heap allocation. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Signed-off-by: Paul Moore <paul@paul-moore.com> security/selinux/ss/mls.c | 6 +++--- security/selinux/ss/policydb.c | 19 ++++++------------- security/selinux/ss/policydb.h | 2 +- 3 files changed, 10 insertions(+), 17 deletions(-) commit f07586160fd5492f8d48e7667e7a5d8797aa5090 Author: Christian Göttsche <cgzones@googlemail.com> Date: Mon Dec 16 17:40:05 2024 +0100 selinux: use known type instead of void pointer Improve type safety and readability by using the known type. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Signed-off-by: Paul Moore <paul@paul-moore.com> security/selinux/ss/avtab.c | 8 ++-- security/selinux/ss/avtab.h | 9 ++-- security/selinux/ss/conditional.c | 12 +++--- security/selinux/ss/conditional.h | 6 +-- security/selinux/ss/ebitmap.c | 4 +- security/selinux/ss/ebitmap.h | 5 ++- security/selinux/ss/policydb.c | 91 ++++++++++++++++++++------------------- security/selinux/ss/policydb.h | 16 +++---- 8 files changed, 77 insertions(+), 74 deletions(-) commit 83e7e18eed6e06cd1ce82fa4b9c9a05c24f7a80b Author: Christian Göttsche <cgzones@googlemail.com> Date: Mon Dec 16 17:40:04 2024 +0100 selinux: rename comparison functions for clarity The functions context_cmp(), mls_context_cmp() and ebitmap_cmp() are not traditional C style compare functions returning -1, 0, and 1 for less than, equal, and greater than; they only return whether their arguments are equal. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Signed-off-by: Paul Moore <paul@paul-moore.com> security/selinux/ss/context.c | 2 +- security/selinux/ss/context.h | 14 +++++++------- security/selinux/ss/ebitmap.c | 8 ++++---- security/selinux/ss/ebitmap.h | 2 +- security/selinux/ss/mls_types.h | 2 +- security/selinux/ss/services.c | 2 +- security/selinux/ss/sidtab.c | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) commit 5e99b81f48cd565a5341c921e62fd09184d6bb72 Author: Christian Göttsche <cgzones@googlemail.com> Date: Mon Dec 16 17:40:02 2024 +0100 selinux: rework match_ipv6_addrmask() Constify parameters, add size hints, and simplify control flow. According to godbolt the same assembly is generated. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Signed-off-by: Paul Moore <paul@paul-moore.com> security/selinux/ss/services.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 90903085101107b06158d2407bb2a6045af6dead Author: Christian Göttsche <cgzones@googlemail.com> Date: Mon Dec 16 17:40:01 2024 +0100 selinux: constify and reconcile function parameter names Align the parameter names between declarations and definitions, and constify read-only parameters. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> [PM: tweak the subject line] Signed-off-by: Paul Moore <paul@paul-moore.com> security/selinux/include/conditional.h | 2 +- security/selinux/include/security.h | 4 ++-- security/selinux/ss/avtab.h | 2 +- security/selinux/ss/services.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) commit 046b85a993a19c992da317b2c19e168d1da795af Author: Christian Göttsche <cgzones@googlemail.com> Date: Mon Dec 16 17:40:00 2024 +0100 selinux: avoid using types indicating user space interaction Integer types starting with a double underscore, like __u32, are intended for usage of variables interacting with user-space. Just use the plain variant. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Signed-off-by: Paul Moore <paul@paul-moore.com> security/selinux/hooks.c | 2 +- security/selinux/ss/policydb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9d8d094fa307a93674d9126bd05adbda8b3c0011 Author: Christian Göttsche <cgzones@googlemail.com> Date: Mon Dec 16 17:39:59 2024 +0100 selinux: supply missing field initializers Please clang by supplying the missing field initializers in the secclass_map variable and sel_fill_super() function. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> [PM: tweak subj and commit description] Signed-off-by: Paul Moore <paul@paul-moore.com> security/selinux/include/classmap.h | 2 +- security/selinux/selinuxfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4acda8edefa1ce66d3de845f1c12745721cd14c3 Author: Steven Rostedt <rostedt@goodmis.org> Date: Sun Jan 5 11:22:25 2025 -0500 scripts/sorttable: Get start/stop_mcount_loc from ELF file directly The get_mcount_loc() does a cheesy trick to find the start_mcount_loc and stop_mcount_loc values. That trick is: file_start = popen(" grep start_mcount System.map | awk '{print $1}' ", "r"); and file_stop = popen(" grep stop_mcount System.map | awk '{print $1}' ", "r"); Those values are stored in the Elf symbol table. Use that to capture those values. Using the symbol table is more efficient and more robust. The above could fail if another variable had "start_mcount" or "stop_mcount" as part of its name. Cc: bpf <bpf@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Zheng Yejian <zhengyejian1@huawei.com> Cc: Martin Kelly <martin.kelly@crowdstrike.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/20250105162346.817157047@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> scripts/sorttable.c | 95 +++++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 50 deletions(-) commit 58d87678a0f46c6120904b4326aaf5ebf4454c69 Author: Steven Rostedt <rostedt@goodmis.org> Date: Tue Jan 7 22:32:17 2025 -0500 scripts/sorttable: Move code from sorttable.h into sorttable.c Instead of having the main code live in a header file and included twice with MACROs that define the Elf structures for 64 bit or 32 bit, move the code in the C file now that the Elf structures are defined in a union that has both. All accesses to the Elf structure fields are done through helper function pointers. If the file being parsed if for a 64 bit architecture, all the helper functions point to the 64 bit versions to retrieve the Elf fields. The same is true if the architecture is 32 bit, where the function pointers will point to the 32 bit helper functions. Note, when the value of a field can be either 32 bit or 64 bit, a 64 bit is always returned, as it works for the 32 bit code as well. This makes the code easier to read and maintain, and it now all exists in sorttable.c and sorttable.h may be removed. Cc: bpf <bpf@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Zheng Yejian <zhengyejian1@huawei.com> Cc: Martin Kelly <martin.kelly@crowdstrike.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Link: https://lore.kernel.org/20250107223217.6f7f96a5@gandalf.local.home Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> scripts/sorttable.c | 473 ++++++++++++++++++++++++++++++++++++++++++++++++-- scripts/sorttable.h | 485 ---------------------------------------------------- 2 files changed, 460 insertions(+), 498 deletions(-) commit 1b649e6ab8dc9188d82c64069493afe66ca0edad Author: Steven Rostedt <rostedt@goodmis.org> Date: Sun Jan 5 11:22:23 2025 -0500 scripts/sorttable: Use uint64_t for mcount sorting The mcount sorting defines uint_t to uint64_t on 64bit architectures and uint32_t on 32bit architectures. It can work with just using uint64_t as that will hold the values of both, and they are not used to point into the ELF file. sizeof(uint_t) is used for defining the size of the mcount_loc section. Instead of using a type, define long_size and use that instead. This will allow the header code to be moved into the C file as generic functions and not need to include sorttable.h twice, once for 64bit and once for 32bit. Cc: bpf <bpf@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Zheng Yejian <zhengyejian1@huawei.com> Cc: Martin Kelly <martin.kelly@crowdstrike.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/20250105162346.373528925@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> scripts/sorttable.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 17bed33ac12f011f4695059960e1b1d6457229a7 Author: Steven Rostedt <rostedt@goodmis.org> Date: Sun Jan 5 11:22:22 2025 -0500 scripts/sorttable: Add helper functions for Elf_Sym In order to remove the double #include of sorttable.h for 64 and 32 bit to create duplicate functions, add helper functions for Elf_Sym. This will create a function pointer for each helper that will get assigned to the appropriate function to handle either the 64bit or 32bit version. This also removes the last references of etype and _r() macros from the sorttable.h file as their references are now just defined in the appropriate architecture version of the helper functions. All read functions now exist in the helper functions which makes it easier to maintain, as the helper functions define the necessary architecture sizes. Cc: bpf <bpf@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Zheng Yejian <zhengyejian1@huawei.com> Cc: Martin Kelly <martin.kelly@crowdstrike.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/20250105162346.185740651@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> scripts/sorttable.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ scripts/sorttable.h | 30 ++++++++++++++++-------------- 2 files changed, 63 insertions(+), 14 deletions(-) commit 67afb7f504400e5b4e5ff895459fbb3eb63d4450 Author: Steven Rostedt <rostedt@goodmis.org> Date: Sun Jan 5 11:22:21 2025 -0500 scripts/sorttable: Add helper functions for Elf_Shdr In order to remove the double #include of sorttable.h for 64 and 32 bit to create duplicate functions, add helper functions for Elf_Shdr. This will create a function pointer for each helper that will get assigned to the appropriate function to handle either the 64bit or 32bit version. This also moves the _r()/r() wrappers for the Elf_Shdr references that handle endian and size differences between the different architectures, into the helper function and out of the open code which is more error prone. Cc: bpf <bpf@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Zheng Yejian <zhengyejian1@huawei.com> Cc: Martin Kelly <martin.kelly@crowdstrike.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/20250105162345.940924221@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> scripts/sorttable.c | 42 ++++++++++++++++++++++++++++++++++ scripts/sorttable.h | 66 ++++++++++++++++++++++++++++++++++------------------- 2 files changed, 85 insertions(+), 23 deletions(-) commit 1dfb59a228dde59ad7d99b2fa2104e90004995c7 Author: Steven Rostedt <rostedt@goodmis.org> Date: Sun Jan 5 11:22:20 2025 -0500 scripts/sorttable: Add helper functions for Elf_Ehdr In order to remove the double #include of sorttable.h for 64 and 32 bit to create duplicate functions, add helper functions for Elf_Ehdr. This will create a function pointer for each helper that will get assigned to the appropriate function to handle either the 64bit or 32bit version. This also moves the _r()/r() wrappers for the Elf_Ehdr references that handle endian and size differences between the different architectures, into the helper function and out of the open code which is more error prone. Cc: bpf <bpf@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Zheng Yejian <zhengyejian1@huawei.com> Cc: Martin Kelly <martin.kelly@crowdstrike.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/20250105162345.736369526@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> scripts/sorttable.c | 25 +++++++++++++++++++++++++ scripts/sorttable.h | 20 ++++++++++++++++---- 2 files changed, 41 insertions(+), 4 deletions(-) commit 200d015e73b4da69bcd8212a7c58695452b12bad Author: Steven Rostedt <rostedt@goodmis.org> Date: Sun Jan 5 11:22:19 2025 -0500 scripts/sorttable: Convert Elf_Sym MACRO over to a union In order to remove the double #include of sorttable.h for 64 and 32 bit to create duplicate functions for both, replace the Elf_Sym macro with a union that defines both Elf64_Sym and Elf32_Sym, with field e64 for the 64bit version, and e32 for the 32bit version. It can then use the macro etype to get the proper value. This will eventually be replaced with just single functions that can handle both 32bit and 64bit ELF parsing. Cc: bpf <bpf@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Zheng Yejian <zhengyejian1@huawei.com> Cc: Martin Kelly <martin.kelly@crowdstrike.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/20250105162345.528626969@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> scripts/sorttable.c | 5 +++++ scripts/sorttable.h | 25 ++++++++++++++----------- 2 files changed, 19 insertions(+), 11 deletions(-) commit 545f6cf8f4c9a268e0bab2637f1d279679befdbf Author: Steven Rostedt <rostedt@goodmis.org> Date: Sun Jan 5 11:22:18 2025 -0500 scripts/sorttable: Replace Elf_Shdr Macro with a union In order to remove the double #include of sorttable.h for 64 and 32 bit to create duplicate functions for both, replace the Elf_Shdr macro with a union that defines both Elf64_Shdr and Elf32_Shdr, with field e64 for the 64bit version, and e32 for the 32bit version. It can then use the macro etype to get the proper value. This will eventually be replaced with just single functions that can handle both 32bit and 64bit ELF parsing. Cc: bpf <bpf@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Zheng Yejian <zhengyejian1@huawei.com> Cc: Martin Kelly <martin.kelly@crowdstrike.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/20250105162345.339462681@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> scripts/sorttable.c | 10 ++++++++ scripts/sorttable.h | 74 +++++++++++++++++++++++++++++------------------------ 2 files changed, 51 insertions(+), 33 deletions(-) commit 157fb5b3cfd2cb5950314f926a76e567fc1921c5 Author: Steven Rostedt <rostedt@goodmis.org> Date: Sun Jan 5 11:22:17 2025 -0500 scripts/sorttable: Convert Elf_Ehdr to union In order to remove the double #include of sorttable.h for 64 and 32 bit to create duplicate functions for both, replace the Elf_Ehdr macro with a union that defines both Elf64_Ehdr and Elf32_Ehdr, with field e64 for the 64bit version, and e32 for the 32bit version. Then a macro etype can be used instead to get to the proper value. This will eventually be replaced with just single functions that can handle both 32bit and 64bit ELF parsing. Cc: bpf <bpf@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Zheng Yejian <zhengyejian1@huawei.com> Cc: Martin Kelly <martin.kelly@crowdstrike.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/20250105162345.148224465@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> scripts/sorttable.c | 36 ++++++++++++++++++++---------------- scripts/sorttable.h | 12 ++++++------ 2 files changed, 26 insertions(+), 22 deletions(-) commit 7ffc0d0819f438779ed592e2e2e3576f43ce14f0 Author: Steven Rostedt <rostedt@goodmis.org> Date: Sun Jan 5 11:22:16 2025 -0500 scripts/sorttable: Make compare_extable() into two functions Instead of having the compare_extable() part of the sorttable.h header where it get's defined twice, since it is a very simple function, just define it twice in sorttable.c, and then it can use the proper read functions for the word size and endianess and the Elf_Addr macro can be removed from sorttable.h. Also add a micro optimization. Instead of: if (a < b) return -1; if (a > b) return 1; return 0; That can be shorten to: if (a < b) return -1; return a > b; Cc: bpf <bpf@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Zheng Yejian <zhengyejian1@huawei.com> Cc: Martin Kelly <martin.kelly@crowdstrike.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/20250105162344.945299671@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> scripts/sorttable.c | 20 ++++++++++++++++++++ scripts/sorttable.h | 14 -------------- 2 files changed, 20 insertions(+), 14 deletions(-) commit 66990c003306c240d570b3ba274ec4f68cf18c91 Author: Steven Rostedt <rostedt@goodmis.org> Date: Sun Jan 5 11:22:15 2025 -0500 scripts/sorttable: Have the ORC code use the _r() functions to read The ORC code reads the section information directly from the file. This currently works because the default read function is for 64bit little endian machines. But if for some reason that ever changes, this will break. Instead of having a surprise breakage, use the _r() functions that will read the values from the file properly. Cc: bpf <bpf@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Zheng Yejian <zhengyejian1@huawei.com> Cc: Martin Kelly <martin.kelly@crowdstrike.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/20250105162344.721480386@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> scripts/sorttable.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6f2c2f93a190467cebd6ebd03feb49514fead5ca Author: Steven Rostedt <rostedt@goodmis.org> Date: Sun Jan 5 11:22:14 2025 -0500 scripts/sorttable: Remove unneeded Elf_Rel The code had references to initialize the Elf_Rel relocation tables, but it was never used. Remove it. Cc: bpf <bpf@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Zheng Yejian <zhengyejian1@huawei.com> Cc: Martin Kelly <martin.kelly@crowdstrike.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/20250105162344.515342233@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> scripts/sorttable.h | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) commit 4f48a28b37d594dab38092514a42ae9f4b781553 Author: Steven Rostedt <rostedt@goodmis.org> Date: Sun Jan 5 11:22:13 2025 -0500 scripts/sorttable: Remove unused write functions The code of sorttable.h was copied from the recordmcount.h which defined various write functions for different sizes (2, 4, 8 byte lengths). But sorttable only uses the 4 byte writes. Remove the extra versions as they are not used. Cc: bpf <bpf@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Zheng Yejian <zhengyejian1@huawei.com> Cc: Martin Kelly <martin.kelly@crowdstrike.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/20250105162344.314385504@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> scripts/sorttable.c | 26 -------------------------- 1 file changed, 26 deletions(-) commit 28b24394c6e9a3166fcb4480cba054562526657c Author: Steven Rostedt <rostedt@goodmis.org> Date: Sun Jan 5 11:22:12 2025 -0500 scripts/sorttable: Remove unused macro defines The code of sorttable.h was copied from the recordmcount.h which defined a bunch of Elf MACROs so that they could be used between 32bit and 64bit functions. But there's several MACROs that sorttable.h does not use but was copied over. Remove them to clean up the code. Cc: bpf <bpf@vger.kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Zheng Yejian <zhengyejian1@huawei.com> Cc: Martin Kelly <martin.kelly@crowdstrike.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/20250105162344.128870118@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> scripts/sorttable.h | 27 --------------------------- 1 file changed, 27 deletions(-) commit 6e8637db89bf138a0533b5442d9a0b02afa5e3e8 Author: Mao Jinlong <quic_jinlmao@quicinc.com> Date: Tue Jan 7 17:00:31 2025 +0800 arm64: dts: qcom: sm8450: Add coresight nodes Add coresight components on Qualcomm SM8450 Soc. The components include TMC ETF/ETR, ETE, STM, TPDM, CTI. Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com> Link: https://lore.kernel.org/r/20250107090031.3319-3-quic_jinlmao@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8450.dtsi | 726 +++++++++++++++++++++++++++++++++++ 1 file changed, 726 insertions(+) commit 1fe6c70fec8fd8c823afee66467f85f028b0d22c Author: Luo Jie <quic_luoj@quicinc.com> Date: Fri Jan 3 15:31:36 2025 +0800 arm64: defconfig: Enable Qualcomm IPQ CMN PLL clock controller The CMN PLL hardware block is available in the Qualcomm IPQ SoC such as IPQ9574 and IPQ5332. It provides fixed rate output clocks to Ethernet related hardware blocks such as external Ethernet PHY or switch. This driver is initially being enabled for IPQ9574. All boards based on IPQ9574 SoC will require to include this driver in the build. This CMN PLL hardware block does not provide any other specific function on the IPQ SoC other than enabling output clocks to Ethernet related devices. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Luo Jie <quic_luoj@quicinc.com> Link: https://lore.kernel.org/r/20250103-qcom_ipq_cmnpll-v8-3-c89fb4d4849d@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 7ec95ff9abf499b4775148db92528feb4e8ff1ee Author: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Date: Thu Jan 2 16:32:07 2025 +0000 dt-bindings: clock: move qcom,x1e80100-camcc to its own file Add an x1e80100 camcc binding. x1e80100 has two power-domain parents unlike other similar camcc controllers. Differentiate the new structure into a unique camcc definition. Other similar camcc controller setups can then be easily added to this one. Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Link: https://lore.kernel.org/r/20250102-b4-linux-next-24-11-18-dtsi-x1e80100-camss-v3-2-cb66d55d20cc@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../bindings/clock/qcom,sm8450-camcc.yaml | 2 - .../bindings/clock/qcom,x1e80100-camcc.yaml | 74 ++++++++++++++++++++++ 2 files changed, 74 insertions(+), 2 deletions(-) commit 0ee878729f0bbe3a206002c02d31e7d964958d8f Author: Daniil Titov <daniilt971@gmail.com> Date: Tue Dec 31 17:00:52 2024 +0100 clk: qcom: smd-rpm: Add clocks for MSM8940 MSM8940 has mostly the same rpm clocks as MSM8953, but lacks RF_CLK3. Signed-off-by: Daniil Titov <daniilt971@gmail.com> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> Link: https://lore.kernel.org/r/20241231-rpmcc-v1-4-1212df9b2042@mainlining.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-smd-rpm.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit ec2514d5379ddbe4191f81d99c8fe6a235d0e802 Author: Daniil Titov <daniilt971@gmail.com> Date: Tue Dec 31 17:00:51 2024 +0100 dt-bindings: clock: qcom,rpmcc: Add MSM8940 compatible Document the qcom,rpmcc-msm8940 compatible. Signed-off-by: Daniil Titov <daniilt971@gmail.com> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20241231-rpmcc-v1-3-1212df9b2042@mainlining.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 19024d7c5ddd90afd49b04967c7d922587c91728 Author: Daniil Titov <daniilt971@gmail.com> Date: Tue Dec 31 17:00:50 2024 +0100 clk: qcom: smd-rpm: Add clocks for MSM8937 MSM8937 has mostly the same rpm clocks as MSM8953, but lacks RF_CLK3 and IPA_CLK. Signed-off-by: Daniil Titov <daniilt971@gmail.com> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> Link: https://lore.kernel.org/r/20241231-rpmcc-v1-2-1212df9b2042@mainlining.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-smd-rpm.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 40106d4facbf0bd788126b2b82b25447b1b508d6 Author: Daniil Titov <daniilt971@gmail.com> Date: Tue Dec 31 17:00:49 2024 +0100 dt-bindings: clock: qcom,rpmcc: Add MSM8937 compatible Document the qcom,rpmcc-msm8937 compatible. Signed-off-by: Daniil Titov <daniilt971@gmail.com> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20241231-rpmcc-v1-1-1212df9b2042@mainlining.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml | 2 ++ 1 file changed, 2 insertions(+) commit ec2f548e1a92f49f765e2bce14ceed34698514fc Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Date: Tue Dec 31 18:32:23 2024 +0530 arm64: dts: qcom: sa8775p: Fix the size of 'addr_space' regions For both the controller instances, size of the 'addr_space' region should be 0x1fe00000 as per the hardware memory layout. Otherwise, endpoint drivers cannot request even reasonable BAR size of 1MB. Cc: stable@vger.kernel.org # 6.11 Fixes: c5f5de8434ec ("arm64: dts: qcom: sa8775p: Add ep pcie1 controller node") Fixes: 1924f5518224 ("arm64: dts: qcom: sa8775p: Add ep pcie0 controller node") Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20241231130224.38206-2-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sa8775p.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4b120ef62ed653f4bc05e5f68832d2d2ac548b60 Author: Sayali Lokhande <quic_sayalil@quicinc.com> Date: Mon Dec 16 17:54:39 2024 +0800 arm64: dts: qcom: qcs615-ride: Enable UFS node Enable UFS on the Qualcomm QCS615 Ride platform. Signed-off-by: Sayali Lokhande <quic_sayalil@quicinc.com> Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Co-developed-by: Xin Liu <quic_liuxin@quicinc.com> Signed-off-by: Xin Liu <quic_liuxin@quicinc.com> Link: https://lore.kernel.org/r/20241216095439.531357-4-quic_liuxin@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615-ride.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit a6a9d10e796957aefbc4c8d53ed7673714e83b31 Author: Sayali Lokhande <quic_sayalil@quicinc.com> Date: Mon Dec 16 17:54:38 2024 +0800 arm64: dts: qcom: qcs615: add UFS node Add the UFS Host Controller node and its PHY for QCS615 SoC. Signed-off-by: Sayali Lokhande <quic_sayalil@quicinc.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Co-developed-by: Xin Liu <quic_liuxin@quicinc.com> Signed-off-by: Xin Liu <quic_liuxin@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241216095439.531357-3-quic_liuxin@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615.dtsi | 113 +++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) commit 170f3d2c065ecb9757ed4e155e463aa25fd1eef9 Author: Varadarajan Narayanan <quic_varada@quicinc.com> Date: Fri Dec 13 16:28:08 2024 +0530 clk: qcom: ipq5424: Use icc-clk for enabling NoC related clocks Use the icc-clk framework to enable few clocks to be able to create paths and use the peripherals connected on those NoCs. Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Link: https://lore.kernel.org/r/20241213105808.674620-2-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/gcc-ipq5424.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 2e1c78bf674024375de6eea33e113acc3473d2e2 Author: Varadarajan Narayanan <quic_varada@quicinc.com> Date: Fri Dec 13 16:28:07 2024 +0530 dt-bindings: interconnect: Add Qualcomm IPQ5424 support Add master/slave ids for Qualcomm IPQ5424 Network-On-Chip interfaces. This will be used by the gcc-ipq5424 driver for providing interconnect services using the icc-clk framework. Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213105808.674620-1-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> include/dt-bindings/interconnect/qcom,ipq5424.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit b076b995e225b0e9c345b015a182352221334c3e Author: Konrad Dybcio <konradybcio@kernel.org> Date: Thu Dec 12 00:25:51 2024 +0000 clk: qcom: Add SM6115 LPASSCC SM6115 (and its derivatives or similar SoCs) has an LPASS clock controller block which provides audio-related resets. Add the required code to support them. [alexey.klimov] fixed compilation errors after rebase, slightly changed the commit message Cc: Konrad Dybcio <konradybcio@kernel.org> Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Link: https://lore.kernel.org/r/20241212002551.2902954-3-alexey.klimov@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/Kconfig | 9 +++++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/lpasscc-sm6115.c | 85 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) commit 030de8eafdcbc3d6c087bddb5450aea2b29520e5 Author: Konrad Dybcio <konradybcio@kernel.org> Date: Thu Dec 12 00:25:50 2024 +0000 dt-bindings: clock: Add Qualcomm SM6115 LPASS clock controller SM6115 (and its derivatives or similar SoCs) has an LPASS clock controller block which provides audio-related resets. Add bindings for it. Cc: Konrad Dybcio <konradybcio@kernel.org> Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> [alexey.klimov slightly changed the commit message] Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Link: https://lore.kernel.org/r/20241212002551.2902954-2-alexey.klimov@linaro.org [bjorn: Adjusted Konrad's address] Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../bindings/clock/qcom,sm6115-lpasscc.yaml | 46 ++++++++++++++++++++++ include/dt-bindings/clock/qcom,sm6115-lpasscc.h | 15 +++++++ 2 files changed, 61 insertions(+) commit 113d52bdc820da14dc0694bb5c57b3cda7ceea30 Author: Varadarajan Narayanan <quic_varada@quicinc.com> Date: Mon Nov 18 10:58:39 2024 +0530 arm64: dts: qcom: ipq5424: Add USB controller and phy nodes The IPQ5424 SoC has both USB2.0 and USB3.0 controllers. The USB3.0 can connect to either of USB2.0 or USB3.0 phy and operate in the respective mode. Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241118052839.382431-7-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 66 ++++++++++++ arch/arm64/boot/dts/qcom/ipq5424.dtsi | 159 ++++++++++++++++++++++++++++ 2 files changed, 225 insertions(+) commit 9e2ca54195af42bf2b52a5c6349e0a751b1828b1 Author: Varadarajan Narayanan <quic_varada@quicinc.com> Date: Thu Nov 21 10:49:35 2024 +0530 arm64: dts: qcom: ipq5424: Add LLCC/system-cache-controller Add a DT node for Last level cache (aka. system cache) controller which provides control over the last level cache present on IPQ5424 SoCs. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Link: https://lore.kernel.org/r/20241121051935.1055222-4-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/ipq5424.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit c88c323b610a6048b87c5d9fff69659678f69924 Author: Varadarajan Narayanan <quic_varada@quicinc.com> Date: Thu Nov 21 10:49:34 2024 +0530 soc: qcom: llcc: Update configuration data for IPQ5424 The 'broadcast' register space is present only in chipsets that have multiple instances of LLCC IP. Since IPQ5424 has only one instance, both the LLCC and LLCC_BROADCAST points to the same register space. Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241121051935.1055222-3-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/soc/qcom/llcc-qcom.c | 57 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) commit f35a4397bec51509aa08c109041428958621d5f5 Author: Varadarajan Narayanan <quic_varada@quicinc.com> Date: Thu Nov 21 10:49:33 2024 +0530 dt-bindings: cache: qcom,llcc: Add IPQ5424 compatible Document the Last Level Cache Controller on IPQ5424. The 'broadcast' register space is present only in chipsets that have multiple instances of LLCC IP. Since IPQ5424 has only one instance, both the LLCC and LLCC_BROADCAST points to the same register space. Hence, allow only '1' reg & reg-names entry for IPQ5424. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Link: https://lore.kernel.org/r/20241121051935.1055222-2-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../devicetree/bindings/cache/qcom,llcc.yaml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 7bf1659bad4e9413cdba132ef9cbd0caa9cabcc4 Merge: acafa84ff374 605237372a53 Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Jan 7 18:16:02 2025 -0800 Merge branch 'intel-wired-lan-driver-updates-2025-01-06-igb-igc-ixgbe-ixgbevf-i40e-fm10k' Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2025-01-06 (igb, igc, ixgbe, ixgbevf, i40e, fm10k) For igb: Sriram Yagnaraman and Kurt Kanzenbach add support for AF_XDP zero-copy. Original cover letter: The first couple of patches adds helper functions to prepare for AF_XDP zero-copy support which comes in the last couple of patches, one each for Rx and TX paths. As mentioned in v1 patchset [0], I don't have access to an actual IGB device to provide correct performance numbers. I have used Intel 82576EB emulator in QEMU [1] to test the changes to IGB driver. The tests use one isolated vCPU for RX/TX and one isolated vCPU for the xdp-sock application [2]. Hope these measurements provide at the least some indication on the increase in performance when using ZC, especially in the TX path. It would be awesome if someone with a real IGB NIC can test the patch. AF_XDP performance using 64 byte packets in Kpps. Benchmark: XDP-SKB XDP-DRV XDP-DRV(ZC) rxdrop 220 235 350 txpush 1.000 1.000 410 l2fwd 1.000 1.000 200 AF_XDP performance using 1500 byte packets in Kpps. Benchmark: XDP-SKB XDP-DRV XDP-DRV(ZC) rxdrop 200 210 310 txpush 1.000 1.000 410 l2fwd 0.900 1.000 160 [0]: https://lore.kernel.org/intel-wired-lan/20230704095915.9750-1-sriram.yagnaraman@est.tech/ [1]: https://www.qemu.org/docs/master/system/devices/igb.html [2]: https://github.com/xdp-project/bpf-examples/tree/master/AF_XDP-example Subsequent changes and information can be found here: https://lore.kernel.org/intel-wired-lan/20241018-b4-igb_zero_copy-v9-0-da139d78d796@linutronix.de/ Yue Haibing converts use of ERR_PTR return to traditional error code which resolves a smatch warning. For igc: Song Yoong Siang allows for the XDP program to be hot-swapped. Yue Haibing converts use of ERR_PTR return to traditional error code which resolves a smatch warning. Joe Damato adds sets IRQ and queues to NAPI instances to allow for reporting via netdev-genl API. For ixgbe: Yue Haibing converts use of ERR_PTR return to traditional error code which resolves a smatch warning. For ixgbevf: Yue Haibing converts use of ERR_PTR return to traditional error code which resolves a smatch warning. For i40e: Alex implements "mdd-auto-reset-vf" private flag to automatically reset VFs when encountering an MDD event. For fm10k: Dr. David Alan Gilbert removes an unused function. ==================== Link: https://patch.msgid.link/20250106221929.956999-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 605237372a539750bf8097073e3868f19dd05566 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Mon Jan 6 14:19:23 2025 -0800 intel/fm10k: Remove unused fm10k_iov_msg_mac_vlan_pf fm10k_iov_msg_mac_vlan_pf() has been unused since 2017's commit 1f5c27e52857 ("fm10k: use the MAC/VLAN queue for VF<->PF MAC/VLAN requests") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250106221929.956999-16-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 120 ---------------------------- drivers/net/ethernet/intel/fm10k/fm10k_pf.h | 2 - 2 files changed, 122 deletions(-) commit b65969856d4f98fa9142c107e3f6c9ab4b6c71cf Author: Joe Damato <jdamato@fastly.com> Date: Mon Jan 6 14:19:22 2025 -0800 igc: Link queues to NAPI instances Link queues to NAPI instances via netdev-genl API so that users can query this information with netlink. Handle a few cases in the driver: 1. Link/unlink the NAPIs when XDP is enabled/disabled 2. Handle IGC_FLAG_QUEUE_PAIRS enabled and disabled Example output when IGC_FLAG_QUEUE_PAIRS is enabled: $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --dump queue-get --json='{"ifindex": 2}' [{'id': 0, 'ifindex': 2, 'napi-id': 8193, 'type': 'rx'}, {'id': 1, 'ifindex': 2, 'napi-id': 8194, 'type': 'rx'}, {'id': 2, 'ifindex': 2, 'napi-id': 8195, 'type': 'rx'}, {'id': 3, 'ifindex': 2, 'napi-id': 8196, 'type': 'rx'}, {'id': 0, 'ifindex': 2, 'napi-id': 8193, 'type': 'tx'}, {'id': 1, 'ifindex': 2, 'napi-id': 8194, 'type': 'tx'}, {'id': 2, 'ifindex': 2, 'napi-id': 8195, 'type': 'tx'}, {'id': 3, 'ifindex': 2, 'napi-id': 8196, 'type': 'tx'}] Since IGC_FLAG_QUEUE_PAIRS is enabled, you'll note that the same NAPI ID is present for both rx and tx queues at the same index, for example index 0: {'id': 0, 'ifindex': 2, 'napi-id': 8193, 'type': 'rx'}, {'id': 0, 'ifindex': 2, 'napi-id': 8193, 'type': 'tx'}, To test IGC_FLAG_QUEUE_PAIRS disabled, a test system was booted using the grub command line option "maxcpus=2" to force igc_set_interrupt_capability to disable IGC_FLAG_QUEUE_PAIRS. Example output when IGC_FLAG_QUEUE_PAIRS is disabled: $ lscpu | grep "On-line CPU" On-line CPU(s) list: 0,2 $ ethtool -l enp86s0 | tail -5 Current hardware settings: RX: n/a TX: n/a Other: 1 Combined: 2 $ cat /proc/interrupts | grep enp 144: [...] enp86s0 145: [...] enp86s0-rx-0 146: [...] enp86s0-rx-1 147: [...] enp86s0-tx-0 148: [...] enp86s0-tx-1 1 "other" IRQ, and 2 IRQs for each of RX and Tx, so we expect netlink to report 4 IRQs with unique NAPI IDs: $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --dump napi-get --json='{"ifindex": 2}' [{'id': 8196, 'ifindex': 2, 'irq': 148}, {'id': 8195, 'ifindex': 2, 'irq': 147}, {'id': 8194, 'ifindex': 2, 'irq': 146}, {'id': 8193, 'ifindex': 2, 'irq': 145}] Now we examine which queues these NAPIs are associated with, expecting that since IGC_FLAG_QUEUE_PAIRS is disabled each RX and TX queue will have its own NAPI instance: $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --dump queue-get --json='{"ifindex": 2}' [{'id': 0, 'ifindex': 2, 'napi-id': 8193, 'type': 'rx'}, {'id': 1, 'ifindex': 2, 'napi-id': 8194, 'type': 'rx'}, {'id': 0, 'ifindex': 2, 'napi-id': 8195, 'type': 'tx'}, {'id': 1, 'ifindex': 2, 'napi-id': 8196, 'type': 'tx'}] Signed-off-by: Joe Damato <jdamato@fastly.com> Reviewed-by: Vitaly Lifshits <vitaly.lifshits@intel.com> Tested-by: Avigail Dahan <avigailx.dahan@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250106221929.956999-15-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/igc/igc.h | 2 ++ drivers/net/ethernet/intel/igc/igc_main.c | 56 ++++++++++++++++++++++++++----- drivers/net/ethernet/intel/igc/igc_xdp.c | 2 ++ 3 files changed, 51 insertions(+), 9 deletions(-) commit 1a63399c13fe557e791e73468e90b3484faa1e84 Author: Joe Damato <jdamato@fastly.com> Date: Mon Jan 6 14:19:21 2025 -0800 igc: Link IRQs to NAPI instances Link IRQs to NAPI instances via netdev-genl API so that users can query this information with netlink. Compare the output of /proc/interrupts (noting that IRQ 128 is the "other" IRQ which does not appear to have a NAPI instance): $ cat /proc/interrupts | grep enp86s0 | cut --delimiter=":" -f1 128 129 130 131 132 The output from netlink shows the mapping of NAPI IDs to IRQs (again noting that 128 is absent as it is the "other" IRQ): $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --dump napi-get --json='{"ifindex": 2}' [{'defer-hard-irqs': 0, 'gro-flush-timeout': 0, 'id': 8196, 'ifindex': 2, 'irq': 132}, {'defer-hard-irqs': 0, 'gro-flush-timeout': 0, 'id': 8195, 'ifindex': 2, 'irq': 131}, {'defer-hard-irqs': 0, 'gro-flush-timeout': 0, 'id': 8194, 'ifindex': 2, 'irq': 130}, {'defer-hard-irqs': 0, 'gro-flush-timeout': 0, 'id': 8193, 'ifindex': 2, 'irq': 129}] Signed-off-by: Joe Damato <jdamato@fastly.com> Reviewed-by: Vitaly Lifshits <vitaly.lifshits@intel.com> Tested-by: Avigail Dahan <avigailx.dahan@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250106221929.956999-14-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/igc/igc_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 07af482e646539d3cc12bc85040fe02f39ae3761 Author: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Date: Mon Jan 6 14:19:20 2025 -0800 i40e: add ability to reset VF for Tx and Rx MDD events Implement "mdd-auto-reset-vf" priv-flag to handle Tx and Rx MDD events for VFs. This flag is also used in other network adapters like ICE. Usage: - "on" - The problematic VF will be automatically reset if a malformed descriptor is detected. - "off" - The problematic VF will be disabled. In cases where a VF sends malformed packets classified as malicious, it can cause the Tx queue to freeze, rendering it unusable for several minutes. When an MDD event occurs, this new implementation allows for a graceful VF reset to quickly restore operational state. Currently, VF queues are disabled if an MDD event occurs. This patch adds the ability to reset the VF if a Tx or Rx MDD event occurs. It also includes MDD event logging throttling to avoid dmesg pollution and unifies the format of Tx and Rx MDD messages. Note: Standard message rate limiting functions like dev_info_ratelimited() do not meet our requirements. Custom rate limiting is implemented, please see the code for details. Co-developed-by: Jan Sokolowski <jan.sokolowski@intel.com> Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com> Co-developed-by: Padraig J Connolly <padraig.j.connolly@intel.com> Signed-off-by: Padraig J Connolly <padraig.j.connolly@intel.com> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Reviewed-by: Michal Schmidt <mschmidt@redhat.com> Tested-by: Rafal Romanowski <rafal.romanowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250106221929.956999-13-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../device_drivers/ethernet/intel/i40e.rst | 12 +++ drivers/net/ethernet/intel/i40e/i40e.h | 4 +- drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 + drivers/net/ethernet/intel/i40e/i40e_main.c | 107 ++++++++++++++++++--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 11 ++- 7 files changed, 123 insertions(+), 17 deletions(-) commit 35f715cb77c3cb6e2033e71bf518b30705ab95ba Author: Yue Haibing <yuehaibing@huawei.com> Date: Mon Jan 6 14:19:19 2025 -0800 ixgbevf: Fix passing 0 to ERR_PTR in ixgbevf_run_xdp() ixgbevf_run_xdp() converts customed xdp action to a negative error code with the sk_buff pointer type which be checked with IS_ERR in ixgbevf_clean_rx_irq(). Remove this error pointer handing instead use plain int return value. Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Yue Haibing <yuehaibing@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250106221929.956999-12-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit c824125cbb181507d2c5488232399d0767e143c7 Author: Yue Haibing <yuehaibing@huawei.com> Date: Mon Jan 6 14:19:18 2025 -0800 ixgbe: Fix passing 0 to ERR_PTR in ixgbe_run_xdp() ixgbe_run_xdp() converts customed xdp action to a negative error code with the sk_buff pointer type which be checked with IS_ERR in ixgbe_clean_rx_irq(). Remove this error pointer handing instead use plain int return value. Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Yue Haibing <yuehaibing@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250106221929.956999-11-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 8ae94669b1f3aca9079095415544f3e8b0e60e7e Author: Yue Haibing <yuehaibing@huawei.com> Date: Mon Jan 6 14:19:17 2025 -0800 igb: Fix passing 0 to ERR_PTR in igb_run_xdp() igb_run_xdp() converts customed xdp action to a negative error code with the sk_buff pointer type which be checked with IS_ERR in igb_clean_rx_irq(). Remove this error pointer handing instead use plain int return value. Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Yue Haibing <yuehaibing@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250106221929.956999-10-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/igb/igb_main.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 8b6237e1f4d405737237882a19ee5f316763dff7 Author: Yue Haibing <yuehaibing@huawei.com> Date: Mon Jan 6 14:19:16 2025 -0800 igc: Fix passing 0 to ERR_PTR in igc_xdp_run_prog() igc_xdp_run_prog() converts customed xdp action to a negative error code with the sk_buff pointer type which be checked with IS_ERR in igc_clean_rx_irq(). Remove this error pointer handing instead use plain int return value to fix this smatch warnings: drivers/net/ethernet/intel/igc/igc_main.c:2533 igc_xdp_run_prog() warn: passing zero to 'ERR_PTR' Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Yue Haibing <yuehaibing@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Avigail Dahan <avigailx.dahan@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250106221929.956999-9-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/igc/igc_main.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 484d3675f2aa7710a4092411a203b719486e8666 Author: Song Yoong Siang <yoong.siang.song@intel.com> Date: Mon Jan 6 14:19:15 2025 -0800 igc: Allow hot-swapping XDP program Currently, the driver would always close and reopen the network interface when setting/removing the XDP program, regardless of the presence of XDP resources. This could cause unnecessary disruptions. To avoid this, introduces a check to determine if there is a need to close and reopen the interface, allowing for seamless hot-swapping of XDP programs. Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com> Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Tested-by: Avigail Dahan <avigailx.dahan@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250106221929.956999-8-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/igc/igc_xdp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f8e284a02afc9797d5f626fc7dfb6f7d381d4e77 Author: Sriram Yagnaraman <sriram.yagnaraman@ericsson.com> Date: Mon Jan 6 14:19:14 2025 -0800 igb: Add AF_XDP zero-copy Tx support Add support for AF_XDP zero-copy transmit path. A new TX buffer type IGB_TYPE_XSK is introduced to indicate that the Tx frame was allocated from the xsk buff pool, so igb_clean_tx_ring() and igb_clean_tx_irq() can clean the buffers correctly based on type. igb_xmit_zc() performs the actual packet transmit when AF_XDP zero-copy is enabled. We share the TX ring between slow path, XDP and AF_XDP zero-copy, so we use the netdev queue lock to ensure mutual exclusion. Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> [Kurt: Set olinfo_status in igb_xmit_zc() so that frames are transmitted, Use READ_ONCE() for xsk_pool and check Tx disabled and carrier in igb_xmit_zc(), Add FIXME for RS bit] Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250106221929.956999-7-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/igb/igb.h | 2 + drivers/net/ethernet/intel/igb/igb_main.c | 61 +++++++++++++++++++++++++----- drivers/net/ethernet/intel/igb/igb_xsk.c | 63 +++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+), 10 deletions(-) commit 2c6196013f84651772388a86dfd4bb033d0c0d45 Author: Sriram Yagnaraman <sriram.yagnaraman@ericsson.com> Date: Mon Jan 6 14:19:13 2025 -0800 igb: Add AF_XDP zero-copy Rx support Add support for AF_XDP zero-copy receive path. When AF_XDP zero-copy is enabled, the rx buffers are allocated from the xsk buff pool using igb_alloc_rx_buffers_zc(). Use xsk_pool_get_rx_frame_size() to set SRRCTL rx buf size when zero-copy is enabled. Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> [Kurt: Port to v6.12 and provide napi_id for xdp_rxq_info_reg(), RCT, remove NETDEV_XDP_ACT_XSK_ZEROCOPY, update NTC handling, READ_ONCE() xsk_pool, likelyfy for XDP_REDIRECT case] Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de> Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250106221929.956999-6-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/igb/igb.h | 6 + drivers/net/ethernet/intel/igb/igb_main.c | 79 ++++++-- drivers/net/ethernet/intel/igb/igb_xsk.c | 294 +++++++++++++++++++++++++++++- 3 files changed, 360 insertions(+), 19 deletions(-) commit 0fe7cce6000c0976e3cd3e2d8cd4c9f1f24a55a3 Author: Kurt Kanzenbach <kurt@linutronix.de> Date: Mon Jan 6 14:19:12 2025 -0800 igb: Add XDP finalize and stats update functions Move XDP finalize and Rx statistics update into separate functions. This way, they can be reused by the XDP and XDP/ZC code later. Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de> Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250106221929.956999-5-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/igb/igb.h | 3 ++ drivers/net/ethernet/intel/igb/igb_main.c | 54 ++++++++++++++++++++----------- 2 files changed, 38 insertions(+), 19 deletions(-) commit 80f6ccf9f1160ba26cfa4bf90f3cced6f2d12268 Author: Sriram Yagnaraman <sriram.yagnaraman@ericsson.com> Date: Mon Jan 6 14:19:11 2025 -0800 igb: Introduce XSK data structures and helpers Add the following ring flag: - IGB_RING_FLAG_TX_DISABLED (when xsk pool is being setup) Add a xdp_buff array for use with XSK receive batch API, and a pointer to xsk_pool in igb_adapter. Add enable/disable functions for TX and RX rings. Add enable/disable functions for XSK pool. Add xsk wakeup function. None of the above functionality will be active until NETDEV_XDP_ACT_XSK_ZEROCOPY is advertised in netdev->xdp_features. Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> [Kurt: Add READ/WRITE_ONCE(), synchronize_net(), remove IGB_RING_FLAG_AF_XDP_ZC] Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250106221929.956999-4-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/igb/Makefile | 2 +- drivers/net/ethernet/intel/igb/igb.h | 13 +- drivers/net/ethernet/intel/igb/igb_main.c | 9 ++ drivers/net/ethernet/intel/igb/igb_xsk.c | 207 ++++++++++++++++++++++++++++++ 4 files changed, 229 insertions(+), 2 deletions(-) commit 6dc75fc230eceedada4adf8c2857636a9dbd00a8 Author: Sriram Yagnaraman <sriram.yagnaraman@ericsson.com> Date: Mon Jan 6 14:19:10 2025 -0800 igb: Introduce igb_xdp_is_enabled() Introduce igb_xdp_is_enabled() to check if an XDP program is assigned to the device. Use that wherever xdp_prog is read and evaluated. Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> [Kurt: Split patches and use READ_ONCE()] Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de> Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250106221929.956999-3-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/igb/igb.h | 5 +++++ drivers/net/ethernet/intel/igb/igb_main.c | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit f70b864ccc84a024c765306e95e8e390834c263d Author: Sriram Yagnaraman <sriram.yagnaraman@ericsson.com> Date: Mon Jan 6 14:19:09 2025 -0800 igb: Remove static qualifiers Remove static qualifiers on the following functions to be able to call from XSK specific file that is added in the later patches: - igb_xdp_tx_queue_mapping() - igb_xdp_ring_update_tail() - igb_clean_tx_ring() - igb_clean_rx_ring() - igb_xdp_xmit_back() - igb_process_skb_fields() While at it, inline igb_xdp_tx_queue_mapping() and igb_xdp_ring_update_tail(). These functions are small enough and used in XDP hot paths. Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> [Kurt: Split patches, inline small XDP functions] Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de> Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250106221929.956999-2-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/igb/igb.h | 29 ++++++++++++++++++++++++ drivers/net/ethernet/intel/igb/igb_main.c | 37 +++++-------------------------- 2 files changed, 35 insertions(+), 31 deletions(-) commit be4fccb5e1fb5c732f2868b9a278e71d9be0283c Author: Gwendal Grignou <gwendal@chromium.org> Date: Tue Jan 7 09:45:14 2025 -0800 platform/chrome: cros_ec_lpc: Support direct EC register memory access Add support to access EC memory region HOST command and ACPI memory region directly. The memory region comes from the CRS ACPI resource descriptor. The driver retrieves the memory information by adding a resource walker for the CRS region. If a memory region is found, it is mapped and the driver uses a new set of read/write primitives to access the EC doorbell and external registers. Once the memory is mapped, it belongs to the driver: grep GOOG0004 /proc/iomem     fe0b0000-fe0bffff : GOOG0004:00 We can verify the communication is established checking the EC version, or monitoring the commands using the cros-ec kernel tracer. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20250107174514.2748108-3-gwendal@chromium.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> drivers/platform/chrome/cros_ec_lpc.c | 121 ++++++++++++++++++++++++++++------ 1 file changed, 100 insertions(+), 21 deletions(-) commit 58517215304b6113beaa3a319ed19cdd9f8fbcc1 Author: Gwendal Grignou <gwendal@chromium.org> Date: Tue Jan 7 09:45:13 2025 -0800 platform/chrome: cros_ec_lpc: Merge lpc_driver_ops into ec private structure Remove cros_ec_lpc_ops global variable, since EC specific info can be stored in the device private structure, introduced in commit e4dbf9d65e4218 ("platform/chrome: cros_ec_lpc: add a "quirks" system"). Add ec_lpc pointer to read/write function to be able to access ec specific data. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20250107174514.2748108-2-gwendal@chromium.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> drivers/platform/chrome/cros_ec_lpc.c | 86 +++++++++++++++++------------------ 1 file changed, 41 insertions(+), 45 deletions(-) commit acafa84ff3749314a2d52c33b740df80e3127ad5 Merge: d8c2e5f33ace 6ffdbb93a59c Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Jan 7 18:07:55 2025 -0800 Merge branch 'tools-ynl-decode-link-types-present-in-tests' Jakub Kicinski says: ==================== tools: ynl: decode link types present in tests Using a kernel built for the net selftest target to run drivers/net tests currently fails, because the net kernel automatically spawns a handful of tunnel devices which YNL can't decode. Fill in those missing link types in rt_link. We need to extend subset support a bit for it to work. v1: https://lore.kernel.org/20250105012523.1722231-1-kuba@kernel.org ==================== Link: https://patch.msgid.link/20250107022820.2087101-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 6ffdbb93a59c60ee18bebd9acdbbca91e6bf0e64 Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Jan 6 18:28:20 2025 -0800 netlink: specs: rt_link: decode ip6tnl, vti and vti6 link attrs Some of our tests load vti and ip6tnl so not being able to decode the link attrs gets in the way of using Python YNL for testing. Decode link attributes for ip6tnl, vti and vti6. ip6tnl uses IFLA_IPTUN_FLAGS as u32, while ipv4 and sit expect a u16 attribute, so we have a (first?) subset type override... Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20250107022820.2087101-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Documentation/netlink/specs/rt_link.yaml | 87 ++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) commit 7aae6505351e4c9fc2f3108d16fd06ce76f4b475 Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Jan 6 18:28:19 2025 -0800 tools: ynl: print some information about attribute we can't parse When parsing throws an exception one often has to figure out which attribute couldn't be parsed from first principles. For families with large message parsing trees like rtnetlink guessing the attribute can be hard. Print a bit of information as the exception travels out, e.g.: # when dumping rt links Error decoding 'flags' from 'linkinfo-ip6tnl-attrs' Error decoding 'data' from 'linkinfo-attrs' Error decoding 'linkinfo' from 'link-attrs' Traceback (most recent call last): File "/home/kicinski/linux/./tools/net/ynl/cli.py", line 119, in <module> main() File "/home/kicinski/linux/./tools/net/ynl/cli.py", line 100, in main reply = ynl.dump(args.dump, attrs) File "/home/kicinski/linux/tools/net/ynl/lib/ynl.py", line 1064, in dump return self._op(method, vals, dump=True) File "/home/kicinski/linux/tools/net/ynl/lib/ynl.py", line 1058, in _op return self._ops(ops)[0] File "/home/kicinski/linux/tools/net/ynl/lib/ynl.py", line 1045, in _ops rsp_msg = self._decode(decoded.raw_attrs, op.attr_set.name) File "/home/kicinski/linux/tools/net/ynl/lib/ynl.py", line 738, in _decode subdict = self._decode(NlAttrs(attr.raw), attr_spec['nested-attributes'], search_attrs) File "/home/kicinski/linux/tools/net/ynl/lib/ynl.py", line 763, in _decode decoded = self._decode_sub_msg(attr, attr_spec, search_attrs) File "/home/kicinski/linux/tools/net/ynl/lib/ynl.py", line 714, in _decode_sub_msg subdict = self._decode(NlAttrs(attr.raw, offset), msg_format.attr_set) File "/home/kicinski/linux/tools/net/ynl/lib/ynl.py", line 749, in _decode decoded = attr.as_scalar(attr_spec['type'], attr_spec.byte_order) File "/home/kicinski/linux/tools/net/ynl/lib/ynl.py", line 147, in as_scalar return format.unpack(self.raw)[0] struct.error: unpack requires a buffer of 2 bytes The Traceback is what we would previously see, the "Error..." messages are new. We print a message per level (in the stack order). Printing single combined message gets tricky quickly given sub-messages etc. Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20250107022820.2087101-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/net/ynl/lib/ynl.py | 74 +++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 35 deletions(-) commit 69072db934dfc7a566d4eb1fac04146e97ab365f Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Jan 6 18:28:18 2025 -0800 tools: ynl: correctly handle overrides of fields in subset We stated in documentation [1] and previous discussions [2] that the need for overriding fields in members of subsets is anticipated. Implement it. Since each attr is now a new object we need to make sure that the modifications are propagated. Specifically C codegen wants to annotate which attrs are used in requests and replies to generate the right validation artifacts. [1] https://docs.kernel.org/next/userspace-api/netlink/specs.html#subset-of [2] https://lore.kernel.org/netdev/20231004171350.1f59cd1d@kernel.org/ Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250107022820.2087101-2-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/net/ynl/lib/nlspec.py | 5 ++++- tools/net/ynl/ynl-gen-c.py | 26 ++++++++++++++++++++++---- 2 files changed, 26 insertions(+), 5 deletions(-) commit d8c2e5f33acec38cf478c509c65646d029cc378e Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Jan 6 09:46:20 2025 -0800 if_vlan: fix kdoc warnings While merging net to net-next I noticed that the kdoc above __vlan_get_protocol_offset() has the wrong function name. Fix that and all the other kdoc warnings in this file. Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250106174620.1855269-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/linux/if_vlan.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit fed88c2cd7fba4ae2d6b5fd8d891585cb2499a41 Merge: aca14bbc878b 2fa8b4383d24 Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Jan 7 18:06:19 2025 -0800 Merge branch 'net-dsa-cleanup-eee-part-2' Russell King says: ==================== net: dsa: cleanup EEE (part 2) This is part 2 of the DSA EEE cleanups, removing what has become dead code as a result of the EEE management phylib now does. Patch 1 removes the useless setting of tx_lpi parameters in the ksz driver. Patch 2 does the same for mt753x. Patch 3 removes the DSA core code that calls the get_mac_eee() operation. This needs to be done before removing the implementations because doing otherwise would cause dsa_user_get_eee() to return -EOPNOTSUPP. Patches 4..8 remove the trivial get_mac_eee() implementations from DSA drivers. Patch 9 finally removes the get_mac_eee() method from struct dsa_switch_ops. ==================== Link: https://patch.msgid.link/Z3vDwwsHSxH5D6Pm@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 2fa8b4383d24c1c788528ed4377d9f07c6c10227 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Mon Jan 6 11:59:24 2025 +0000 net: dsa: remove get_mac_eee() method The get_mac_eee() is no longer called by the core DSA code, nor are there any implementations of this method. Remove it. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tUllU-007UzL-KV@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/dsa.h | 2 -- 1 file changed, 2 deletions(-) commit d19be79a67b32b74a436e7cb2a712f3c75c5ea35 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Mon Jan 6 11:59:19 2025 +0000 net: dsa: qca: remove qca8k_get_mac_eee() qca8k_get_mac_eee() is no longer called by the core DSA code. Remove it. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tUllP-007UzF-Gk@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/qca/qca8k-8xxx.c | 1 - drivers/net/dsa/qca/qca8k-common.c | 7 ------- drivers/net/dsa/qca/qca8k.h | 1 - 3 files changed, 9 deletions(-) commit d3889a3d1351aa4990b7b70d2c3da73a7b690b3f Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Mon Jan 6 11:59:14 2025 +0000 net: dsa: mv88e6xxx: remove mv88e6xxx_get_mac_eee() mv88e6xxx_get_mac_eee() is no longer called by the core DSA code. Remove it. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tUllK-007Uz9-D7@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/mv88e6xxx/chip.c | 8 -------- 1 file changed, 8 deletions(-) commit 9e66e8ebe7a98be3f7ce5c4c5702f53b96677784 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Mon Jan 6 11:59:09 2025 +0000 net: dsa: mt753x: remove ksz_get_mac_eee() mt753x_get_mac_eee() is no longer called by the core DSA code. Remove it. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Chester A. Unal <chester.a.unal@arinc9.com> Link: https://patch.msgid.link/E1tUllF-007Uz3-95@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/mt7530.c | 7 ------- 1 file changed, 7 deletions(-) commit e2d1b8090b69af793178713f1851706394739410 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Mon Jan 6 11:59:04 2025 +0000 net: dsa: ksz: remove ksz_get_mac_eee() ksz_get_mac_eee() is no longer called by the core DSA code. Remove it. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tUllA-007Uyx-4o@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/microchip/ksz_common.c | 7 ------- 1 file changed, 7 deletions(-) commit 08cef9e1b08313f1ad0fdc16340e55bc75a5e2dc Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Mon Jan 6 11:58:59 2025 +0000 net: dsa: b53/bcm_sf2: remove b53_get_mac_eee() b53_get_mac_eee() is no longer called by the core DSA code. Remove it. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tUll5-007Uyr-1U@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/b53/b53_common.c | 7 ------- drivers/net/dsa/b53/b53_priv.h | 1 - drivers/net/dsa/bcm_sf2.c | 1 - 3 files changed, 9 deletions(-) commit 60c6e3a59299361a1057b0b61d8b0495f6eb7cf7 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Mon Jan 6 11:58:53 2025 +0000 net: dsa: no longer call ds->ops->get_mac_eee() All implementations of get_mac_eee() now just return zero without doing anything useful. Remove the call to this method in preparation to removing the method from each DSA driver. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tUlkz-007Uyl-UA@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/dsa/user.c | 8 -------- 1 file changed, 8 deletions(-) commit 22cedc609759edf414c519ae8242dd5461f4c4cd Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Mon Jan 6 11:58:48 2025 +0000 net: dsa: mt753x: remove setting of tx_lpi parameters dsa_user_get_eee() calls the DSA switch get_mac_eee() method followed by phylink_ethtool_get_eee(), which goes on to call phy_ethtool_get_eee(). This overwrites all members of the passed ethtool_keee, which means anything written by the DSA switch get_mac_eee() method will be discarded. Remove setting any members in mt753x_get_mac_eee(). Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Chester A. Unal <chester.a.unal@arinc9.com> Link: https://patch.msgid.link/E1tUlku-007Uyc-RP@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/mt7530.c | 6 ------ 1 file changed, 6 deletions(-) commit 0945a7b442200f908a8e2f67ba22ccfa77b3598e Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Mon Jan 6 11:58:43 2025 +0000 net: dsa: ksz: remove setting of tx_lpi parameters dsa_user_get_eee() calls the DSA switch get_mac_eee() method followed by phylink_ethtool_get_eee(), which goes on to call phy_ethtool_get_eee(). This overwrites all members of the passed ethtool_keee, which means anything written by the DSA switch get_mac_eee() method will be discarded. Remove setting any members in ksz_get_mac_eee(). Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tUlkp-007UyW-OR@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/microchip/ksz_common.c | 8 -------- 1 file changed, 8 deletions(-) commit aca14bbc878bb04218b1f1b173b018902e6e44f0 Merge: 4ce1aeece911 7fb1073300a2 Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Jan 7 17:49:24 2025 -0800 Merge branch 'net-hold-per-netns-rtnl-during-netdev-notifier-registration' Kuniyuki Iwashima says: ==================== net: Hold per-netns RTNL during netdev notifier registration. This series adds per-netns RTNL for registration of the global and per-netns netdev notifiers. v1: https://lore.kernel.org/netdev/20250104063735.36945-1-kuniyu@amazon.com/ ==================== Link: https://patch.msgid.link/20250106070751.63146-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 7fb1073300a2ea8bd03b2fc7d5a591192e48ea24 Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Mon Jan 6 16:07:51 2025 +0900 net: Hold rtnl_net_lock() in (un)?register_netdevice_notifier_dev_net(). (un)?register_netdevice_notifier_dev_net() hold RTNL before triggering the notifier for all netdev in the netns. Let's convert the RTNL to rtnl_net_lock(). Note that move_netdevice_notifiers_dev_net() is assumed to be (but not yet) protected by per-netns RTNL of both src and dst netns; we need to convert wireless and hyperv drivers that call dev_change_net_namespace(). Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Link: https://patch.msgid.link/20250106070751.63146-4-kuniyu@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/core/dev.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit ca779f40654a046613ea812126055f161844f17b Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Mon Jan 6 16:07:50 2025 +0900 net: Hold rtnl_net_lock() in (un)?register_netdevice_notifier_net(). (un)?register_netdevice_notifier_net() hold RTNL before triggering the notifier for all netdev in the netns. Let's convert the RTNL to rtnl_net_lock(). Note that the per-netns netdev notifier is protected by per-netns RTNL. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Link: https://patch.msgid.link/20250106070751.63146-3-kuniyu@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/core/dev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit a239e0625097bccdd4065390952fe9e6d0fdf02b Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Mon Jan 6 16:07:49 2025 +0900 net: Hold __rtnl_net_lock() in (un)?register_netdevice_notifier(). (un)?register_netdevice_notifier() hold pernet_ops_rwsem and RTNL, iterate all netns, and trigger the notifier for all netdev. Let's hold __rtnl_net_lock() before triggering the notifier. Note that we will need protection for netdev_chain when RTNL is removed. (e.g. blocking_notifier conversion [0] with a lockdep annotation [1]) Link: https://lore.kernel.org/netdev/20250104063735.36945-2-kuniyu@amazon.com/ [0] Link: https://lore.kernel.org/netdev/20250105075957.67334-1-kuniyu@amazon.com/ [1] Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Link: https://patch.msgid.link/20250106070751.63146-2-kuniyu@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/core/dev.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 4ce1aeece911c7fe3ac6afb96dbc2c6ef20da639 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Sun Jan 5 12:28:47 2025 +0000 ixgbevf: Remove unused ixgbevf_hv_mbx_ops The const struct ixgbevf_hv_mbx_ops was added in 2016 as part of commit c6d45171d706 ("ixgbevf: Support Windows hosts (Hyper-V)") but has remained unused. The functions it references are still referenced elsewhere. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20250105122847.27341-1-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 1 - drivers/net/ethernet/intel/ixgbevf/mbx.c | 12 ------------ 2 files changed, 13 deletions(-) commit 1b960cd19311c0bb653afa3633aaa9ef8edcfdde Author: Eric Dumazet <edumazet@google.com> Date: Sun Jan 5 09:09:24 2025 +0000 net: watchdog: rename __dev_watchdog_up() and dev_watchdog_down() In commit d7811e623dd4 ("[NET]: Drop tx lock in dev_watchdog_up") dev_watchdog_up() became a simple wrapper for __netdev_watchdog_up() Herbert also said : "In 2.6.19 we can eliminate the unnecessary __dev_watchdog_up and replace it with dev_watchdog_up." This patch consolidates things to have only two functions, with a common prefix. - netdev_watchdog_up(), exported for the sake of one freescale driver. This replaces __netdev_watchdog_up() and dev_watchdog_up(). - netdev_watchdog_down(), static to net/sched/sch_generic.c This replaces dev_watchdog_down(). Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Reviewed-by: Jason Xing <kerneljasonxing@gmail.com> Link: https://patch.msgid.link/20250105090924.1661822-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/freescale/ucc_geth.c | 2 +- include/linux/netdevice.h | 2 +- net/core/dev.c | 2 +- net/sched/sch_generic.c | 33 +++++++++++++------------------ 4 files changed, 17 insertions(+), 22 deletions(-) commit f760a4bb5e927a133dcd75f7b69ccae2a331e42c Author: Amit Pundir <amit.pundir@linaro.org> Date: Mon Dec 9 23:19:12 2024 +0530 clk: qcom: gcc-sdm845: Do not use shared clk_ops for QUPs Similar to the earlier fixes meant for sm8x50 and x1e platforms, we have to stop using the shared clk ops for sdm845 QUPs as well. As Stephen Boyd pointed out in earlier fixes, there wasn't a problem to mark QUP clks shared until we started parking shared RCGs at clk registration time in commit 01a0a6cc8cfd ("clk: qcom: Park shared RCGs upon registration"). Parking at init is actually harmful to the UART when earlycon is used. If the device is pumping out data while the frequency changes and we see garbage on the serial console until the driver can probe and actually set a proper frequency. This patch reverts the QUP clk sharing ops part of commit 06391eddb60a ("clk: qcom: Add Global Clock controller (GCC) driver for SDM845"), so that the QUPs on sdm845 don't get parked during clk registration and break UART operations. Fixes: 01a0a6cc8cfd ("clk: qcom: Park shared RCGs upon registration") Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Link: https://lore.kernel.org/r/20241209174912.2526928-1-amit.pundir@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/gcc-sdm845.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 3540bba855b4b422e8b977d11aa8173ccb4f089d Author: Sathishkumar Muruganandam <quic_murugana@quicinc.com> Date: Mon Sep 9 13:00:49 2024 +0530 wifi: ath12k: fix tx power, max reg power update to firmware Currently, when the vdev start WMI cmd is sent from host, vdev related parameters such as max_reg_power, max_power, and max_antenna_gain are multiplied by 2 before being sent to the firmware. This is incorrect because the firmware uses 1 dBm steps for power calculations. This leads to incorrect power values being used in the firmware and radio, potentially causing incorrect behavior. Fix the update of max_reg_power, max_power, and max_antenna_gain values in the ath12k_mac_vdev_start_restart function, ensuring accurate power settings in the firmware by sending these values as-is, without multiplication. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00214-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: Sathishkumar Muruganandam <quic_murugana@quicinc.com> Signed-off-by: Santhosh Ramesh <quic_santrame@quicinc.com> Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20240909073049.3423035-1-quic_santrame@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/mac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2d64da9ed5d8cee44a11ed3872dbfa6a914ee2b2 Author: Ramya Gnanasekar <quic_rgnanase@quicinc.com> Date: Thu Dec 19 11:08:45 2024 -0800 wifi: ath12k: set flag for mgmt no-ack frames in Tx completion IEEE80211_TX_STAT_NOACK_TRANSMITTED flag signifies that frame was successfully transmitted without any errors when no-ack is requested. In WMI Tx management completion path, driver is not setting IEEE80211_TX_STAT_NOACK_TRANSMITTED flag for the frames with IEEE80211_TX_CTL_NO_ACK. Without this flag, the management frame statistics will not track such frames. Add IEEE80211_TX_STAT_NOACK_TRANSMITTED flag as part of the flags in skb transmit information when WMI is processing Tx completion for management frames. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Ramya Gnanasekar <quic_rgnanase@quicinc.com> Signed-off-by: Muna Sinada <quic_msinada@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241219190845.605116-1-quic_msinada@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/wmi.c | 3 +++ 1 file changed, 3 insertions(+) commit 9035756c18852cf39eeb11b625db094a2c9a4bb9 Author: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com> Date: Wed Dec 18 09:31:49 2024 +0530 wifi: ath12k: Include MLO memory in firmware coredump collection The current firmware coredump collection in ath12k does not include the MLO_GLOBAL_MEM_REGION_TYPE memory. This memory region is essential for debugging issues related to Multi-Link Operation (MLO). Hence, add support to include MLO_GLOBAL_MEM_REGION_TYPE memory in firmware coredump collection. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241218040149.4041728-1-quic_rajkbhag@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/coredump.c | 3 +++ drivers/net/wireless/ath/ath12k/coredump.h | 1 + 2 files changed, 4 insertions(+) commit 40562e84e262dcc1c7226a0094761f6b5eec8153 Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Wed Dec 18 09:11:34 2024 +0530 wifi: ath12k: handle radar detection with MLO ieee80211_radar_detected() expects the driver to pass a channel context configuration during MLO. This is used to identify exactly which link detected the radar. Add support to pass this to mac80211. Since the link arvif is not known in the WMI event, introduce a helper iterator API, ath12k_mac_get_any_chanctx_conf_iter(), to get the channel context configuration. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241218-ath12k_mlo_dfs-v1-3-058e783bcfc7@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/mac.c | 11 +++++++++++ drivers/net/wireless/ath/ath12k/mac.h | 8 ++++++++ drivers/net/wireless/ath/ath12k/wmi.c | 12 +++++++++++- 3 files changed, 30 insertions(+), 1 deletion(-) commit 11b86e2ce94278332af8da9c0b560a15c17efd26 Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Wed Dec 18 09:11:33 2024 +0530 wifi: ath12k: fix CAC running state during virtual interface start Currently, the DFS CAC time and the usable state of the primary channel in the channel definition are used to set the CAC_RUNNING flag for the ath12k radio structure. However, this approach is flawed because there are channel definitions where the primary channel is not a DFS channel, but the secondary channel is. For example, in 5 GHz band, channel 36 with 160 MHz bandwidth. In such cases, the flag is not set correctly and hence places where this flag is tested will not operate as expected. For example, Rx packets will not be dropped. To fix this issue, use the cfg80211_chandef_dfs_usable() function from cfg80211, which returns true if at least one channel is in a usable state. This will ensure the CAC_RUNNING flag is set properly. Additionally, update the CAC running debug log message to include the CAC time in milliseconds and also print the center frequency segment 1. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241218-ath12k_mlo_dfs-v1-2-058e783bcfc7@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/mac.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit d31241cbd9c5d74eb19192e57806e9c9ee3378f7 Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Wed Dec 18 09:11:32 2024 +0530 wifi: ath12k: rename CAC_RUNNING flag Rename the flag ATH12K_CAC_RUNNING to ATH12K_FLAG_CAC_RUNNING to correct the naming inconsistency in the enum ath12k_dev_flags. No functionality changes. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241218-ath12k_mlo_dfs-v1-1-058e783bcfc7@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.h | 2 +- drivers/net/wireless/ath/ath12k/dp_rx.c | 6 +++--- drivers/net/wireless/ath/ath12k/mac.c | 8 ++++---- drivers/net/wireless/ath/ath12k/wmi.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) commit 3540adcccc7179d243216bf488532a62c37d9007 Author: Patrick Williams <patrick@stwcx.xyz> Date: Tue Jan 7 11:27:25 2025 -0500 ARM: dts: aspeed: yosemite4: adjust secondary flash name Meta (Facebook) has a preference for all of our secondary flash chips to be labelled "alt-bmc" for consistency of userspace tools deal with updates. Bletchley, Harma, Minerva, and Catalina all follow this convention but for some reason Yosemite4 is different. Adjust the label in the dts to match the other platforms. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Link: https://patch.msgid.link/20250107162726.232402-1-patrick@stwcx.xyz Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8a6531164e54cea6df4d82f1770451f68945972 Merge: a1942da8a387 058268e23fca Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Jan 7 15:39:09 2025 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2025-01-07 We've added 7 non-merge commits during the last 32 day(s) which contain a total of 11 files changed, 190 insertions(+), 103 deletions(-). The main changes are: 1) Migrate the test_xdp_meta.sh BPF selftest into test_progs framework, from Bastien Curutchet. 2) Add ability to configure head/tailroom for netkit devices, from Daniel Borkmann. 3) Fixes and improvements to the xdp_hw_metadata selftest, from Song Yoong Siang. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: selftests/bpf: Extend netkit tests to validate set {head,tail}room netkit: Add add netkit {head,tail}room to rt_link.yaml netkit: Allow for configuring needed_{head,tail}room selftests/bpf: Migrate test_xdp_meta.sh into xdp_context_test_run.c selftests/bpf: test_xdp_meta: Rename BPF sections selftests/bpf: Enable Tx hwtstamp in xdp_hw_metadata selftests/bpf: Actuate tx_metadata_len in xdp_hw_metadata ==================== Link: https://patch.msgid.link/20250107130908.143644-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit d406b354df909155ff0122acf80f3bc7410fa27e Merge: eb708cd631a8 5bc493bf0c37 Author: Mark Brown <broonie@kernel.org> Date: Tue Jan 7 23:28:07 2025 +0000 Expand SoundWire MBQ register map support Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>: The current SDCA MBQ (Multi-Byte Quantities) register map only supports 16-bit types, add support for more sizes and then update the rt722 driver to use the new support. We also add support for the deferring feature of MBQs to allow hardware to indicate it is not currently ready to service a read/write. Afraid I don't have hardware to test the rt722 change so it is only build tested, but I thought it good to include a change to demonstrate the new features in use. commit 70b8e6e3226fe2ae514a324ff0c64f074f6f419b Author: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Date: Wed Dec 11 07:42:11 2024 +0100 drm/xe/vf: Don't apply Wa_22019338487 for VF Don't use Wa_22019338487 for VF. Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Cc: Adam Miszczak <adam.miszczak@linux.intel.com> Cc: Jakub Kolakowski <jakub1.kolakowski@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Lukasz Laguna <lukasz.laguna@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Michal Winiarski <michal.winiarski@intel.com> Cc: Narasimha C V <narasimha.c.v@intel.com> Cc: Piotr Piorkowski <piotr.piorkowski@intel.com> Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com> Cc: Tomasz Lis <tomasz.lis@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211064211.781820-4-marcin.bernatowicz@linux.intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com> drivers/gpu/drm/xe/xe_wa_oob.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2e52eb73d9914d8e1bebfe98a9e1991d63c12d0 Author: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Date: Wed Dec 11 07:42:10 2024 +0100 drm/xe/rtp: Add match helper to omit SR-IOV VF device Add a match helper that allows the application of a workaround when the device is not an SR-IOV VF (Virtual Function) device. Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Cc: Adam Miszczak <adam.miszczak@linux.intel.com> Cc: Jakub Kolakowski <jakub1.kolakowski@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Lukasz Laguna <lukasz.laguna@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Michal Winiarski <michal.winiarski@intel.com> Cc: Narasimha C V <narasimha.c.v@intel.com> Cc: Piotr Piorkowski <piotr.piorkowski@intel.com> Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com> Cc: Tomasz Lis <tomasz.lis@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211064211.781820-3-marcin.bernatowicz@linux.intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com> drivers/gpu/drm/xe/xe_rtp.c | 5 +++++ drivers/gpu/drm/xe/xe_rtp.h | 11 +++++++++++ 2 files changed, 16 insertions(+) commit 40fbc59e7c6d48d406274433601124d9d495090a Author: Jakub Kolakowski <jakub1.kolakowski@intel.com> Date: Wed Dec 11 07:42:09 2024 +0100 drm/xe/vf: Don't check has flat ccs in bios on VF Don't check for flat ccs from VF-level as VF does not have direct access to the register. If the BIOS disables FlatCCS support (a use-case that will nearly never be used) and the has_flat_ccs flag is set, there shouldn't be any functional impact. The hardware will drop writes to the CCS region, and reads from the CCS region will always return 0. For the native case, the flag is disabled if the BIOS disables it to avoid unnecessary overhead in buffer object (BO) creation and migration. Signed-off-by: Jakub Kolakowski <jakub1.kolakowski@intel.com> Suggested-by: Piotr Piórkowski <piotr.piorkowski@intel.com> Cc: Adam Miszczak <adam.miszczak@linux.intel.com> Cc: Jakub Kolakowski <jakub1.kolakowski@intel.com> Cc: Lukasz Laguna <lukasz.laguna@intel.com> Cc: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Michal Winiarski <michal.winiarski@intel.com> Cc: Narasimha C V <narasimha.c.v@intel.com> Cc: Piotr Piorkowski <piotr.piorkowski@intel.com> Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com> Cc: Tomasz Lis <tomasz.lis@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211064211.781820-2-marcin.bernatowicz@linux.intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com> drivers/gpu/drm/xe/xe_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4262df2a69c32a0bce87d75342f6f8e3a535d7cb Author: Carlos Song <carlos.song@nxp.com> Date: Fri Dec 27 16:47:36 2024 +0800 i2c: imx-lpi2c: make controller available until the system enters suspend_noirq() and from resume_noirq(). This is a general i2c controller feature. Some I2C devices may need the I2C controller to remain active during resume_noirq() or suspend_noirq(). If the controller is autosuspended, there is no way to wake it up once runtime PM disabled (in suspend_late()). During system resume, the I2C controller will be available only after runtime PM is re-enabled (in resume_early()). However, this may be too late for some devices. Wake up the controller in the suspend() callback while runtime PM is still enabled. The I2C controller will remain available until the suspend_noirq() callback (pm_runtime_force_suspend()) is called. During resume, the I2C controller can be restored by the resume_noirq() callback (pm_runtime_force_resume()). Finally, the resume() callback re-enables autosuspend. As a result, the I2C controller can remain available until the system enters suspend_noirq() and from resume_noirq(). Signed-off-by: Carlos Song <carlos.song@nxp.com> Link: https://lore.kernel.org/r/20241227084736.1323943-1-carlos.song@nxp.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-imx-lpi2c.c | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) commit e1b967ee22551683c82f0a899e8264d03960c7df Author: Alexander Stein <alexander.stein@ew.tq-group.com> Date: Tue Jan 7 10:49:42 2025 +0100 dt-bindings: samsung,mipi-dsim: Add imx7d specific compatible This add a imx7(d) specific compatible which is compatible to imx8mm. This silences the dtbs_check warning: arch/arm/boot/dts/nxp/imx/imx7s-mba7.dtb: dsi@30760000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx7d-mipi-dsim', 'fsl,imx8mm-mipi-dsim'] is too long Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20250107094943.518474-3-alexander.stein@ew.tq-group.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> .../devicetree/bindings/display/bridge/samsung,mipi-dsim.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dd504db5cd4a4bb48e8b96159e23ece89bb54d90 Author: Andreas Kemnade <andreas@kemnade.info> Date: Thu Dec 5 21:44:13 2024 +0100 ARM: dts: ti/omap: omap3-gta04: use proper touchscreen properties Specify the dimensions of the touchscreen propertly so that no userspace configuration is needed for it. Tested with x11 and weston on Debian bookworm. What is in now is some debris from earlier tries to handle scaling in kernel: https://lore.kernel.org/linux-input/cover.1482936802.git.hns@goldelico.com/ Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Link: https://lore.kernel.org/r/20241205204413.2466775-3-akemnade@kernel.org Signed-off-by: Kevin Hilman <khilman@baylibre.com> arch/arm/boot/dts/ti/omap/omap3-gta04.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8abbc711da605e530a0f06bed7feb76df35e99f7 Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Wed Dec 11 11:23:37 2024 +0100 i2c: davinci: use generic device property accessors Don't use generic OF APIs if the generic device-level ones will do. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Link: https://lore.kernel.org/r/20241211102337.37956-3-brgl@bgdev.pl Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-davinci.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 7d2b31f833b7faf2f17f9d54cf3820367ba85a23 Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Wed Dec 11 11:23:36 2024 +0100 i2c: davinci: order includes alphabetically For better readability order included headers alphabetically. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Link: https://lore.kernel.org/r/20241211102337.37956-2-brgl@bgdev.pl Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-davinci.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit b04ce63859793e3439b394976b8d29e785d4d69a Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Wed Dec 11 11:23:35 2024 +0100 i2c: davinci: kill platform data There are no more board file users of this driver. The platform data structure is only used internally. Two of the four fields it stores are not used at all anymore. Pull the remainder into the driver data struct and shrink code by removing parts that are now dead code. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20241211102337.37956-1-brgl@bgdev.pl Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-davinci.c | 84 +++++++------------------------ include/linux/platform_data/i2c-davinci.h | 26 ---------- 2 files changed, 19 insertions(+), 91 deletions(-) commit 3623e1024efc00ca83820e3d78a6dbf3d982d0f2 Author: Judith Mendez <jm@ti.com> Date: Fri Dec 20 16:35:23 2024 -0600 ARM: dts: ti: am437x-l4: remove autoidle for UART According to the TRM [0] in 21.5.1.42 UART_SYSC Register, the autoidle bit should not be set for UART, so remove the appropriate SYSC_OMAP2_AUTOIDLE flag. [0] https://www.ti.com/lit/ug/spruhl7i/spruhl7i.pdf Signed-off-by: Judith Mendez <jm@ti.com> Reviewed-by: Sukrut Bellary <sbellary@baylibre.com> Link: https://lore.kernel.org/r/20241220223523.2125278-1-jm@ti.com Signed-off-by: Kevin Hilman <khilman@baylibre.com> arch/arm/boot/dts/ti/omap/am437x-l4.dtsi | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 0cfbd7805fe13406500e6a6f2aa08f198d5db4bd Author: Andreas Kemnade <andreas@kemnade.info> Date: Wed Dec 4 18:41:52 2024 +0100 ARM: dts: ti/omap: gta04: fix pm issues caused by spi module Despite CM_IDLEST1_CORE and CM_FCLKEN1_CORE behaving normal, disabling SPI leads to messages like when suspending: Powerdomain (core_pwrdm) didn't enter target state 0 and according to /sys/kernel/debug/pm_debug/count off state is not entered. That was not connected to SPI during the discussion of disabling SPI. See: https://lore.kernel.org/linux-omap/20230122100852.32ae082c@aktux/ The reason is that SPI is per default in slave mode. Linux driver will turn it to master per default. It slave mode, the powerdomain seems to be kept active if active chip select input is sensed. Fix that by explicitly disabling the SPI3 pins which used to be muxed by the bootloader since they are available on an optionally fitted header which would require dtb overlays anyways. Fixes: a622310f7f01 ("ARM: dts: gta04: fix excess dma channel usage") CC: stable@vger.kernel.org Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reviewed-by: Roger Quadros <rogerq@kernel.org> Link: https://lore.kernel.org/r/20241204174152.2360431-1-andreas@kemnade.info Signed-off-by: Kevin Hilman <khilman@baylibre.com> arch/arm/boot/dts/ti/omap/omap3-gta04.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 70f3d3669c074efbcee32867a1ab71f5f7ead385 Author: Atharva Tiwari <evepolonium@gmail.com> Date: Wed Jan 1 16:04:22 2025 +0530 i2c: amd756: Fix endianness handling for word data Ensure correct handling of "endianness" for word-sized data in amd756_access - Convert word data into little-endian using cpu_to_le16 - Convert word data from little-endian to cpu native format using le16_to_cpu This fixes poteential issues on big-endian systems and ensure proper byte ordering for SMBus word transacitions Signed-off-by: Atharva Tiwari <evepolonium@gmail.com> Link: https://lore.kernel.org/r/20250101103422.30523-1-evepolonium@gmail.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-amd756.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1ee867e465c1b0216ec02d4c0d334c4e89919cec Author: Carlos Song <carlos.song@nxp.com> Date: Mon Dec 30 11:38:46 2024 +0800 i2c: imx-lpi2c: add target mode support LPI2C support master controller and target controller enabled simultaneously. Both controllers share the same SDA/SCL lines and interrupt source but has a separate control and status registers. When target is enabled and an interrupt has been triggered, target register status will be checked to determine IRQ source. Then enter the corresponding interrupt handler function of master or target to handle the interrupt event. This patch supports basic target data read/write operations in 7-bit target address. LPI2C target mode can be enabled by using I2C slave backend. I2C slave backend behaves like a standard I2C client. For simple use and test, Linux I2C slave EEPROM backend can be used. Signed-off-by: Carlos Song <carlos.song@nxp.com> Link: https://lore.kernel.org/r/20241230033846.2302500-1-carlos.song@nxp.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-imx-lpi2c.c | 251 ++++++++++++++++++++++++++++++++++++- 1 file changed, 247 insertions(+), 4 deletions(-) commit febe15218072eee5361a36f4510711a7cf7403e1 Author: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Date: Fri Dec 27 13:11:34 2024 +0000 dt-bindings: i2c: qcom-cci: Document x1e80100 compatible Add the x1e80100 CCI device string compatible. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241227-b4-linux-next-24-11-18-dtsi-x1e80100-camss-v2-1-06fdd5a7d5bb@linaro.org Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 494fed6809585b8386072cf96ef2426e7a7c6326 Author: Andi Shyti <andi.shyti@kernel.org> Date: Fri Dec 27 23:32:30 2024 +0100 i2c: qcom-geni: Simplify error handling in probe function Avoid repeating the error handling pattern: geni_se_resources_off(&gi2c->se); clk_disable_unprepare(gi2c->core_clk); return; Introduce a single 'goto' exit label for cleanup in case of errors. While there are currently two distinct exit points, there is no overlap in their handling, allowing both branches to coexist cleanly. Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Link: https://lore.kernel.org/r/20241227223230.462395-3-andi.shyti@kernel.org Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-qcom-geni.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit bfb3ddfdc5fb7904ba5c7870cfec9efabc9a4f83 Author: Andi Shyti <andi.shyti@kernel.org> Date: Fri Dec 27 23:32:29 2024 +0100 i2c: qcom-geni: Use dev_err_probe in the probe function Replace classical dev_err with dev_err_probe in the probe function for better error reporting. Also, use dev_err_probe in cases where the error number is clear (e.g., -EIO or -EINVAL) to maintain consistency. Additionally, remove redundant logging to simplify the code. Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Acked-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com> Link: https://lore.kernel.org/r/20241227223230.462395-2-andi.shyti@kernel.org Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-qcom-geni.c | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) commit f8cef982c2ee2ba1042e72d5d33dd1be2de313dd Author: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Date: Sat Dec 28 13:15:09 2024 +0200 i2c: exynos5: Add support for Exynos8895 SoC Exynos8895 functioning logic mostly follows I2C_TYPE_EXYNOS7, but timing and temp calculations are slightly different according to the following logic: FPCLK / FI2C = (CLK_DIV + 1) * (TSCLK_L + TSCLK_H + 2) + 2 * ((FLT_CYCLE + 3) - (FLT_CYCLE + 3) % (CLK_DIV + 1)) temp := (FPCLK / FI2C) - (FLT_CYCLE + 3) * 2 Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Link: https://lore.kernel.org/r/20241228111509.896502-3-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-exynos5.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) commit 01aa028151380556a46225d840898fd4c590119f Author: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Date: Sat Dec 28 13:15:08 2024 +0200 dt-bindings: i2c: exynos5: Add samsung,exynos8895-hsi2c compatible Add samsung,exynos8895-hsi2c dedicated compatible for representing I2C of Exynos8895 SoC. Since there are I2C buses that aren't implemented as a part of USIv1 blocks, they only require a single clock. Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20241228111509.896502-2-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml | 1 + 1 file changed, 1 insertion(+) commit a09c8b3f9047959e60dde90c51dcca17f66778c1 Author: Carlos Song <carlos.song@nxp.com> Date: Mon Nov 25 22:29:09 2024 +0800 i2c: imx-lpi2c: add eDMA mode support for LPI2C Add eDMA mode support for LPI2C. There are some differences between TX DMA mode and RX DMA mode. LPI2C MTDR register is Controller Transmit Data Register. When lpi2c send data, it is tx cmd register and tx data fifo. When lpi2c receive data, it is just a rx cmd register. LPI2C MRDR register is Controller Receive Data Register, received data are stored in this. MTDR[8:10] is CMD field and MTDR[0:7] is DATA filed. +-----------+-------------------------------+ | C M D | D A T A | +---+---+---+---+---+---+---+---+---+---+---+ | 10| 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +---+---+---+---+---+---+---+---+---+---+---+ MRDR is Controller Receive Data Register. MRDR[0:7] is DATA filed. +-------------------------------+ | D A T A | +---+---+---+---+---+---+---+---+ | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +---+---+---+---+---+---+---+---+ When the LPI2C controller needs to send data, tx cmd and 8-bit data should be written into MTDR: CMD: 000b: Transmit the value in DATA[7:0]. DATA: 8-bit data. If lpi2c controller needs to send N 8-bit data, just write N times (CMD(W) + DATA(u8)) to MTDR. When the LPI2C controller needs to receive data, rx cmd should be written into MTDR, the received data will be stored in the MRDR. MTDR(CMD): 001b: Receive (DATA[7:0] + 1) 8-bit data. MTDR(DATA): byte counter. MRDR(DATA): 8-bit data. So when lpi2c controller needs to receive N 8-bit data, 1. N <= 256: Write 1 time (CMD(R) + BYTE COUNT(N-1)) into MTDR and receive data from MRDR. 2. N > 256: Write N/256 times (CMD(R) + BYTE COUNT(255)) + 1 time (CMD(R) + BYTE COUNT(N%256)) into MTDR and receive data from MRDR. Due to these differences, when lpi2c is in DMA TX mode, only enable TX channel to send data. But when lpi2c is in DMA RX mode, TX and RX channel are both enabled, TX channel is used to send RX cmd and RX channel is used to receive data. Signed-off-by: Carlos Song <carlos.song@nxp.com> Signed-off-by: Frank Li <frank.li@nxp.com> Link: https://lore.kernel.org/r/20241125142909.1613245-1-carlos.song@nxp.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-imx-lpi2c.c | 524 ++++++++++++++++++++++++++++++++++++- 1 file changed, 517 insertions(+), 7 deletions(-) commit 525defdb608a153108c434e127b0bd1d83a5d8c1 Author: Chen Ni <nichen@iscas.ac.cn> Date: Tue Nov 26 10:38:39 2024 +0800 i2c: isch: 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 <nichen@iscas.ac.cn> Link: https://lore.kernel.org/r/20241126023839.251922-1-nichen@iscas.ac.cn Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-isch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e22daca457d5bec579f62ba84e826a51c26cce31 Author: Manikanta Guntupalli <manikanta.guntupalli@amd.com> Date: Tue Dec 10 15:22:42 2024 +0530 i2c: xiic: Add atomic transfer support Rework the read and write code paths in the driver to support operation in atomic contexts. Similar changes have been implemented in other drivers, including: commit 3a5ee18d2a32 ("i2c: imx: implement master_xfer_atomic callback") commit 445094c8a9fb ("i2c: exynos5: add support for atomic transfers") commit ede2299f7101 ("i2c: tegra: Support atomic transfers") commit fe402bd09049 ("i2c: meson: implement the master_xfer_atomic callback") Signed-off-by: Manikanta Guntupalli <manikanta.guntupalli@amd.com> Acked-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/20241210095242.1982770-3-manikanta.guntupalli@amd.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-xiic.c | 239 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 206 insertions(+), 33 deletions(-) commit 2ee409c6a12d74cd1b16ca3690baa7d5ffffeb7d Author: Manikanta Guntupalli <manikanta.guntupalli@amd.com> Date: Tue Dec 10 15:22:41 2024 +0530 i2c: xiic: Relocate xiic_i2c_runtime_suspend and xiic_i2c_runtime_resume to facilitate atomic mode Relocate xiic_i2c_runtime_suspend and xiic_i2c_runtime_resume functions to avoid prototype statements in atomic mode changes. Signed-off-by: Manikanta Guntupalli <manikanta.guntupalli@amd.com> Acked-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/20241210095242.1982770-2-manikanta.guntupalli@amd.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-xiic.c | 46 +++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit f524707b44c96254c045dfbfe998f1a33e8595f5 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Tue Dec 3 17:19:50 2024 +0100 i2c: I2C_BRCMSTB should not default to y when compile-testing Merely enabling compile-testing should not enable additional functionality. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/36b2923241f285595f43bb9565da352fd366c63e.1733242595.git.geert+renesas@glider.be Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d51ac5b9b4e175abda13617a48639406d3ed7b1 Author: Andi Shyti <andi.shyti@kernel.org> Date: Tue Dec 10 23:16:41 2024 +0100 i2c: nomadik: Enable compile testing for the Nomadik driver The AMBA bus header files do not generate compilation errors even when the AMBA bus is not enabled in Kconfig via ARM_AMBA. This allows the Nomadik driver to be compiled for testing purposes with the COMPILE_TEST option enabled. Cc: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20241210221641.2661577-1-andi.shyti@kernel.org Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 567ef9035f820ecd3e6fcc142003f396848b31f7 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Mon Dec 16 20:24:34 2024 +0000 dt-bindings: i2c: renesas,riic: Document the R9A09G047 support Document support for the I2C Bus Interface (RIIC) found in the Renesas RZ/G3E (R9A09G047) SoC. This IP is compatible with Renesas RZ/V2H (R9A09G057) RIIC IP. Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20241216202436.185773-1-biju.das.jz@bp.renesas.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Documentation/devicetree/bindings/i2c/renesas,riic.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d9a13c08f88d696218a44658f290b1b433e787b6 Author: Carlos Song <carlos.song@nxp.com> Date: Thu Dec 26 14:25:21 2024 +0800 i2c: imx: support DMA defer probing Return -EPROBE_DEFER when dma_request_slave_channel() because DMA driver have not ready yet. Move i2c_imx_dma_request() before registering I2C adapter to avoid infinite loop of .probe() calls to the same driver, see "e8c220fac415 Revert "i2c: imx: improve the error handling in i2c_imx_dma_request()"" and "Documentation/driver-api/driver-model/driver.rst". Use CPU mode to avoid stuck registering i2c adapter when DMA resources are unavailable. Signed-off-by: Carlos Song <carlos.song@nxp.com> Signed-off-by: Clark Wang <xiaoning.wang@nxp.com> Acked-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.kernel.org/r/20241226062521.1004809-1-carlos.song@nxp.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-imx.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 8b56f98b28e6238bcfe00de743b4361d26a7f980 Author: Charles Boyer <Charles.Boyer@fii-usa.com> Date: Thu Dec 19 17:08:59 2024 +0800 i2c: npcm: Enable slave in eob interrupt Nuvoton slave enable was in user space API call master_xfer, so it is subject to delays from the OS scheduler. If the BMC is not enabled for slave mode in time for master to send response, then it will NAK the address match. Then the PLDM request timeout occurs. If the slave enable is moved to the EOB interrupt service routine, then the BMC can be ready in slave mode by the time it needs to receive a response. Signed-off-by: Charles Boyer <Charles.Boyer@fii-usa.com> Signed-off-by: Vivekanand Veeracholan <vveerach@google.com> Signed-off-by: Tyrone Ting <kfting@nuvoton.com> Reviewed-by: Tali Perry <tali.perry1@gmail.com> Link: https://lore.kernel.org/r/20241219090859.18722-5-kfting@nuvoton.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-npcm7xx.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6ddc9132bc42a7dfcaca0cce4ff0f94e69bc5114 Author: Tyrone Ting <kfting@nuvoton.com> Date: Thu Dec 19 17:08:58 2024 +0800 i2c: npcm: use i2c frequency table Modify i2c frequency from table parameters for NPCM i2c modules. Supported frequencies are: 1. 100KHz 2. 400KHz 3. 1MHz The original equations were tested on a variety of chips and base clocks. Since we added devices that use higher frequencies of the module we saw that there is a mismatch between the equation and the actual results on the bus itself, measured on scope. Meanwhile, the equations were not accurate to begin with. They are an approximation of the ideal value. The ideal value is calculated per frequency of the core module. So instead of using the equations we did an optimization per module frequency, verified on a device. Most of the work was focused on the rise time of the SCL and SDA, which depends on external load of the bus and PU. Different PCB designs, or specifically to this case: the number and type of targets on the bus, impact the required values for the timing registers. Users can recalculate the numbers for each bus and get an even better optimization, but our users chose not to. We manually picked values per frequency that match the entire valid range of targets (from 1 to max number). Then we check against the AMR described in SMB spec and make sure that none of the values is exceeding. This process was led by the chip architect and included a lot of testing. Signed-off-by: Tyrone Ting <kfting@nuvoton.com> Reviewed-by: Tali Perry <tali.perry1@gmail.com> Link: https://lore.kernel.org/r/20241219090859.18722-4-kfting@nuvoton.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-npcm7xx.c | 374 ++++++++++++++++++++++++++++++--------- 1 file changed, 288 insertions(+), 86 deletions(-) commit 862dd4f7733a694b12ad9e023ce639e9c21d6abd Author: Tyrone Ting <kfting@nuvoton.com> Date: Thu Dec 19 17:08:57 2024 +0800 i2c: npcm: Assign client address earlier for `i2c_recover_bus()` Store the client address earlier since it might get called in the i2c_recover_bus() logic flow at the early stage of npcm_i2c_master_xfer(). Signed-off-by: Tyrone Ting <kfting@nuvoton.com> Reviewed-by: Tali Perry <tali.perry1@gmail.com> Link: https://lore.kernel.org/r/20241219090859.18722-3-kfting@nuvoton.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-npcm7xx.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 4a34b9bf5f6f3f3ed910863fd1b4741a62864d4b Author: Tyrone Ting <kfting@nuvoton.com> Date: Thu Dec 19 17:08:56 2024 +0800 i2c: npcm: Modify timeout evaluation mechanism The users want to connect a lot of masters on the same bus. This timeout is used to determine the time it takes to take bus ownership. The transactions are very long, so waiting 35ms is not enough. Increase the timeout and treat it as the total timeout, including retries. The total timeout is 2 seconds now. The i2c core layer will have chances to retry to call the i2c driver transfer function if the i2c driver reports that the bus is busy and returns -EAGAIN. Signed-off-by: Tyrone Ting <kfting@nuvoton.com> Reviewed-by: Tali Perry <tali.perry1@gmail.com> Link: https://lore.kernel.org/r/20241219090859.18722-2-kfting@nuvoton.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-npcm7xx.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 576eba03c99435380d155e5f71d5d7603b9178f6 Author: Carlos Song <carlos.song@nxp.com> Date: Mon Dec 23 11:43:43 2024 +0800 i2c: imx: switch different pinctrl state in different system power status Switch different pinctrl state in different system power status. Signed-off-by: Carlos Song <carlos.song@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.kernel.org/r/20241223034343.544002-1-carlos.song@nxp.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-imx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 358025ac091e5a54f9819b33ee9c7cb07c55ee5d Author: Carlos Song <carlos.song@nxp.com> Date: Mon Nov 25 22:21:08 2024 +0800 i2c: imx: make controller available until system suspend_noirq() and from resume_noirq() Put runtime PM to resume state between suspend() and suspend_noirq(), resume_noirq() and resume(), because some I2C devices need the controller on to perform communication during this period. The controller can't be woken up once runtime pm is disabled and in runtime autosuspended state. The problem can be easily reproduced on the I.MX8MQ platform: the PMIC needs to be used to enable regulator when the system resumes. When the PMIC uses the I2C controller, I2C runtime pm has not been enabled, so in i2c xfer(), pm_runtime_resume_and_get() will return an error, which causes data transfer to fail. Therefore, regulators cannot be enabled and system resume hangs. Here is resume error log: [ 53.888902] galcore 38000000.gpu3d: PM: calling genpd_resume_noirq @ 529, parent: platform [ 53.897203] i2c_imx_xfer, pm_runtime_resume_and_get is -13 [ 53.902713] imx-pgc imx-pgc-domain.5: failed to enable regulator: -EACCES [ 53.909518] galcore 38000000.gpu3d: PM: genpd_resume_noirq returned 0 after 12331 usecs [ 53.917545] mxc_hantro 38300000.vpu: PM: calling genpd_resume_noirq @ 529, parent: soc@0 [ 53.925659] i2c_imx_xfer, pm_runtime_resume_and_get is -13 [ 53.931157] imx-pgc imx-pgc-domain.6: failed to enable regulator: -EACCES I.MX8MQ system resume normally after applying the fix. Here is resume log: [ 71.068807] galcore 38000000.gpu3d: PM: calling genpd_resume_noirq @ 530, parent: platform [ 71.077103] i2c_imx_xfer, pm_runtime_resume_and_get is 0 [ 71.083578] galcore 38000000.gpu3d: PM: genpd_resume_noirq returned 0 after 6490 usecs [ 71.091526] mxc_hantro 38300000.vpu: PM: calling genpd_resume_noirq @ 530, parent: soc@0 [ 71.099638] i2c_imx_xfer, pm_runtime_resume_and_get is 0 [ 71.106091] mxc_hantro 38300000.vpu: PM: genpd_resume_noirq returned 0 after 6458 usecs Signed-off-by: Carlos Song <carlos.song@nxp.com> Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20241125142108.1613016-1-carlos.song@nxp.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-imx.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit cf30675e4d0631eac6634b2ae3f77b7b0eafe447 Author: Carlos Song <carlos.song@nxp.com> Date: Mon Nov 25 22:15:21 2024 +0800 i2c: imx: fix divide by zero warning Add "i2c_clk_rate / 2" check to avoid "divide by zero warning". i2c_clk_rate may be zero if i2c clock is disabled. Signed-off-by: Carlos Song <carlos.song@nxp.com> Signed-off-by: Clark Wang <xiaoning.wang@nxp.com> Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-imx.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 440ae6f03098133014daa9dd1390afaa8ad530fa Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Mon Dec 2 09:26:58 2024 +0100 i2c: keba: drop check because i2c_unregister_device() is NULL safe No need to check the argument of i2c_unregister_device() because the function itself does it. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> drivers/i2c/busses/i2c-keba.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 0a2a98f691f2c57db5bb321e68787cb1de29c7dd Author: Nikunj A Dadhania <nikunj@amd.com> Date: Mon Jan 6 18:16:29 2025 +0530 x86/sev: Mark the TSC in a secure TSC guest as reliable In SNP guest environment with Secure TSC enabled, unlike other clock sources (such as HPET, ACPI timer, APIC, etc), the RDTSC instruction is handled without causing a VM exit, resulting in minimal overhead and jitters. Even when the host CPU's TSC is tampered with, the Secure TSC enabled guest keeps on ticking forward. Hence, mark Secure TSC as the only reliable clock source, bypassing unstable calibration. [ bp: Massage. ] Signed-off-by: Nikunj A Dadhania <nikunj@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Tested-by: Peter Gonda <pgonda@google.com> Link: https://lore.kernel.org/r/20250106124633.1418972-10-nikunj@amd.com arch/x86/mm/mem_encrypt_amd.c | 3 +++ 1 file changed, 3 insertions(+) commit eef679a4b52e35be3b4a982a7f42bcc16054ec62 Author: Nikunj A Dadhania <nikunj@amd.com> Date: Mon Jan 6 18:16:28 2025 +0530 x86/sev: Prevent RDTSC/RDTSCP interception for Secure TSC enabled guests The hypervisor should not be intercepting RDTSC/RDTSCP when Secure TSC is enabled. A #VC exception will be generated if the RDTSC/RDTSCP instructions are being intercepted. If this should occur and Secure TSC is enabled, guest execution should be terminated as the guest cannot rely on the TSC value provided by the hypervisor. Signed-off-by: Nikunj A Dadhania <nikunj@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Tested-by: Peter Gonda <pgonda@google.com> Link: https://lore.kernel.org/r/20250106124633.1418972-9-nikunj@amd.com arch/x86/coco/sev/shared.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 38cc6495cdec18a448b9e1de45fedce4118833a2 Author: Nikunj A Dadhania <nikunj@amd.com> Date: Mon Jan 6 18:16:27 2025 +0530 x86/sev: Prevent GUEST_TSC_FREQ MSR interception for Secure TSC enabled guests The hypervisor should not be intercepting GUEST_TSC_FREQ MSR(0xcOO10134) when Secure TSC is enabled. A #VC exception will be generated otherwise. If this should occur and Secure TSC is enabled, terminate guest execution. Signed-off-by: Nikunj A Dadhania <nikunj@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Link: https://lore.kernel.org/r/20250106124633.1418972-8-nikunj@amd.com arch/x86/coco/sev/core.c | 10 +++++++++- arch/x86/include/asm/msr-index.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) commit 0f0502b8865c0a4c402e73aeb0fb406acc19d0d2 Author: Nikunj A Dadhania <nikunj@amd.com> Date: Mon Jan 6 18:16:26 2025 +0530 x86/sev: Change TSC MSR behavior for Secure TSC enabled guests Secure TSC enabled guests should not write to the MSR_IA32_TSC (0x10) register as the subsequent TSC value reads are undefined. On AMD, MSR_IA32_TSC is intercepted by the hypervisor by default. MSR_IA32_TSC read/write accesses should not exit to the hypervisor for such guests. Accesses to MSR_IA32_TSC need special handling in the #VC handler for the guests with Secure TSC enabled. Writes to MSR_IA32_TSC should be ignored and flagged once with a warning, and reads of MSR_IA32_TSC should return the result of the RDTSC instruction. [ bp: Massage commit message. ] Suggested-by: Borislav Petkov (AMD) <bp@alien8.de> Signed-off-by: Nikunj A Dadhania <nikunj@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Link: https://lore.kernel.org/r/20250106124633.1418972-7-nikunj@amd.com arch/x86/coco/sev/core.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit 5bc493bf0c37c157bf2eb364e55a1c6f8bc43a69 Author: Charles Keepax <ckeepax@opensource.cirrus.com> Date: Tue Jan 7 15:44:06 2025 +0000 regmap: sdw-mbq: Add support for SDCA deferred controls The SDCA specification allows for controls to be deferred. In the case of a deferred control the device will return COMMAND_IGNORED to the 8-bit operation that would cause the value to commit. Which is the final 8-bits on a write, or the first 8-bits on a read. In the case of receiving a defer, the regmap will poll the SDCA function busy bit, after which the transaction will be retried, returning an error if the function busy does not clear within a chip specific timeout. Since this is common SDCA functionality which is the 99% use-case for MBQs it makes sense to incorporate this functionality into the register map. If no MBQ configuration is specified, the behaviour will default to the existing behaviour. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250107154408.814455-5-ckeepax@opensource.cirrus.com Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Signed-off-by: Mark Brown <broonie@kernel.org> drivers/base/regmap/regmap-sdw-mbq.c | 129 +++++++++++++++++++++++++++++++---- include/linux/regmap.h | 15 ++++ 2 files changed, 130 insertions(+), 14 deletions(-) commit fdd9ef3dce98e035d21c17fac587cb6e3c7706fd Author: Charles Keepax <ckeepax@opensource.cirrus.com> Date: Tue Jan 7 15:44:05 2025 +0000 regmap: sdw-mbq: Add support for further MBQ register sizes SoundWire MBQ register maps typically contain a variety of register sizes, which doesn't map ideally to the regmap abstraction which expects register maps to have a consistent size. Currently the MBQ register map only allows 16-bit registers to be defined, however this leads to complex CODEC driver implementations with an 8-bit register map and a 16-bit MBQ, every control will then have a custom get and put handler that allows them to access different register maps. Further more 32-bit MBQ quantities are not currently supported. Add support for additional MBQ sizes and to avoid the complexity of multiple register maps treat the val_size as a maximum size for the register map. Within the regmap use an ancillary callback to determine how many bytes to actually read/write to the hardware for a specific register. In the case that no callback is defined the behaviour defaults back to the existing behaviour of a fixed size register map. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250107154408.814455-4-ckeepax@opensource.cirrus.com Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Signed-off-by: Mark Brown <broonie@kernel.org> drivers/base/regmap/regmap-sdw-mbq.c | 114 +++++++++++++++++++++++++++++------ include/linux/regmap.h | 47 ++++++++++++++- 2 files changed, 139 insertions(+), 22 deletions(-) commit b21468e83b787ab31aa9df8f429d2ca61def0cc9 Author: Charles Keepax <ckeepax@opensource.cirrus.com> Date: Tue Jan 7 15:44:04 2025 +0000 ASoC: SDCA: Update list of entity_0 controls Update the list of entity_0 controls to better match version v1.0 of the SDCA specification. Remove both INTSTAT_CLEAR and INT_ENABLE as these are no longer used, and add some missing controls and bits into the enum. Also rename the SDCA_CONTROL prefix to SDCA_CTL because this better matches the macros in the sdw_registers.h header, and the names can get quite long so saving a few characters is definitely a plus. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250107154408.814455-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> include/sound/sdca_function.h | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) commit 7b16e60b31202254c62a29f5c709ffb42684b6f9 Author: Charles Keepax <ckeepax@opensource.cirrus.com> Date: Tue Jan 7 15:44:03 2025 +0000 soundwire: SDCA: Add additional SDCA address macros Compliment the existing macro to construct an SDCA control address with macros to extract the constituent parts, and validation of such an address. Also update the masks for the original macro to use GENMASK to make mental comparisons with the included comment on the address format easier. Acked-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250107154408.814455-2-ckeepax@opensource.cirrus.com Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Signed-off-by: Mark Brown <broonie@kernel.org> include/linux/soundwire/sdw_registers.h | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 7681f64e6404edbca2f67501c98d596e5c307993 Author: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com> Date: Mon Jan 6 13:59:37 2025 +0530 clk: clocking-wizard: calculate dividers fractional parts Calculate dividers fractional parts to optimally modulate output frequency. Clocking wizard supports having multiplier m and divisors d and o. Currently the fractional parts of m and o are not utilised. For the pixel clock usecases a higher accuracy is needed.. Adding support for m and o to have fractional values. Co-developed-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com> Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com> Tested-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com> Link: https://lore.kernel.org/r/20250106082937.29555-1-shubhrajyoti.datta@amd.com Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/clk/xilinx/clk-xlnx-clock-wizard.c | 121 ++++++++++++++++------------- 1 file changed, 69 insertions(+), 52 deletions(-) commit b00b08a59674eacc77848d852d7c37de485add81 Author: Rohit Visavalia <rohit.visavalia@amd.com> Date: Mon Jan 6 20:40:38 2025 -0800 dt-bindings: clock: xilinx: Add reset GPIO for VCU It is marked as optional as some of the ZynqMP designs are having vcu_reset (reset pin of VCU IP) driven by proc_sys_reset, proc_sys_reset is another PL IP driven by the PS pl_reset. So, here the VCU reset is not driven by axi_gpio or PS GPIO so there will be no GPIO entry. Signed-off-by: Rohit Visavalia <rohit.visavalia@amd.com> Link: https://lore.kernel.org/r/20250107044038.100945-3-rohit.visavalia@amd.com Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org> Documentation/devicetree/bindings/clock/xlnx,vcu.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit b51adc77557a15c1598bd70365bee253d16a306b Author: Rohit Visavalia <rohit.visavalia@xilinx.com> Date: Mon Jan 6 20:40:37 2025 -0800 dt-bindings: clock: xilinx: Convert VCU bindings to dtschema Convert AMD (Xilinx) VCU bindings to yaml format. Additional changes: - move xlnx_vcu DT binding to clock from soc following commit a2fe7baa27a4 ("clk: xilinx: move xlnx_vcu clock driver from soc") - corrected clock sequence as per xilinx device-tree generator Signed-off-by: Rohit Visavalia <rohit.visavalia@xilinx.com> Link: https://lore.kernel.org/r/20250107044038.100945-2-rohit.visavalia@amd.com Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org> .../devicetree/bindings/clock/xlnx,vcu.yaml | 55 ++++++++++++++++++++++ .../devicetree/bindings/soc/xilinx/xlnx,vcu.txt | 26 ---------- 2 files changed, 55 insertions(+), 26 deletions(-) commit a73bca3d9cc0a27dd7061a55841a1d752ec7365a Author: Shizhao Chen <shichen@redhat.com> Date: Tue Jan 7 23:52:19 2025 +0800 sched_ext: Add option -l in selftest runner to list all available tests The selftest runner currently allows selecting tests via the -t option. This patch adds a new -l option that lists all available tests, providing users with an overview of the tests they can choose from. This enhancement is especially useful for scripting and automation purposes, making it easier to discover and run tests. Signed-off-by: Shizhao Chen <shichen@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org> tools/testing/selftests/sched_ext/runner.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 83f6c3dea942d1f2032cfc67edf30cd448fd54ad Merge: 39a72b4fedd0 e91609f1c3b0 Author: Stephen Boyd <sboyd@kernel.org> Date: Tue Jan 7 11:42:23 2025 -0800 Merge tag 'renesas-clk-for-v6.14-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 support for the RZ/G3E (R9A09G047) SoC - Add Module Stop (MSTOP) support on RZ/V2H - Add Image Signal Processor helper block (FCPVX and VSPX) clocks on R-Car V4H SoC - Add System Controller (SYS) reset and Generic Interrupt Controller (GIC) clock and reset entries on RZ/V2H * tag 'renesas-clk-for-v6.14-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: dt-bindings: clock: renesas,r9a08g045-vbattb: Fix include guard clk: renesas: r9a09g057: Add clock and reset entries for GIC clk: renesas: r9a09g057: Add reset entry for SYS clk: renesas: r8a779g0: Add VSPX clocks clk: renesas: r8a779g0: Add FCPVX clocks clk: renesas: r9a09g047: Add I2C clocks/resets clk: renesas: r9a09g047: Add CA55 core clocks clk: renesas: rzv2h: Add support for RZ/G3E SoC clk: renesas: rzv2h: Add MSTOP support dt-bindings: clock: renesas: Document RZ/G3E SoC CPG dt-bindings: soc: renesas: Document RZ/G3E SMARC SoM and Carrier-II EVK dt-bindings: soc: renesas: Document Renesas RZ/G3E SoC variants commit 765ea12f8ae0c20bba02ef6472402644efb7c3b0 Merge: 40384c840ea1 9a497710cab9 Author: Stephen Boyd <sboyd@kernel.org> Date: Tue Jan 7 11:37:05 2025 -0800 Merge tag 'clk-microchip-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into clk-microchip Pull Microchip clk driver updates from Claudiu Beznea: - Support for the SAMA7D65 SoC - Clock IDs for for the slow clock controller * tag 'clk-microchip-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: clk: at91: sama7d65: add sama7d65 pmc driver dt-bindings: clock: Add SAMA7D65 PMC compatible string dt-bindings: clocks: atmel,at91sam9x5-sckc: add sama7d65 clk: at91: sckc: Use SCKC_{TD, MD}_SLCK IDs for clk32k clocks dt-bindings: clk: at91: Add clock IDs for the slow clock controller commit 85b60ca9ad2c94661acf86a0c11278246cc5ea86 Author: Nikunj A Dadhania <nikunj@amd.com> Date: Mon Jan 6 18:16:25 2025 +0530 x86/sev: Add Secure TSC support for SNP guests Add support for Secure TSC in SNP-enabled guests. Secure TSC allows guests to securely use RDTSC/RDTSCP instructions, ensuring that the parameters used cannot be altered by the hypervisor once the guest is launched. Secure TSC-enabled guests need to query TSC information from the AMD Security Processor. This communication channel is encrypted between the AMD Security Processor and the guest, with the hypervisor acting merely as a conduit to deliver the guest messages to the AMD Security Processor. Each message is protected with AEAD (AES-256 GCM). [ bp: Zap a stray newline over amd_cc_platform_has() while at it, simplify CC_ATTR_GUEST_SNP_SECURE_TSC check ] Signed-off-by: Nikunj A Dadhania <nikunj@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20250106124633.1418972-6-nikunj@amd.com arch/x86/coco/core.c | 4 +- arch/x86/coco/sev/core.c | 107 ++++++++++++++++++++++++++++++++++++++ arch/x86/include/asm/sev-common.h | 1 + arch/x86/include/asm/sev.h | 21 ++++++++ arch/x86/include/asm/svm.h | 6 ++- arch/x86/mm/mem_encrypt.c | 2 + include/linux/cc_platform.h | 8 +++ 7 files changed, 146 insertions(+), 3 deletions(-) commit 456f3000f82571697d23c255c451cfcfb5c9ae75 Author: Niravkumar L Rabara <niravkumar.l.rabara@intel.com> Date: Tue Jan 7 18:51:29 2025 +0800 dt-bindings: soc: altera: convert socfpga-system.txt to yaml Convert socfpga-system.txt to altr,socfpga-sys-mgr.yaml and move to soc directory. Add platform names in description for clarity. ARM(32-bit) platforms Cyclone5, Arria5 and Arria10 is using "altr,sys-mgr" compatible, while ARM64 is using "altr,sys-mgr-s10" compatible. Removed "cpu1-start-addr" for ARM64 as it is not required. Signed-off-by: Niravkumar L Rabara <niravkumar.l.rabara@intel.com> Link: https://lore.kernel.org/r/20250107105129.2784203-1-niravkumar.l.rabara@intel.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> .../bindings/arm/altera/socfpga-system.txt | 25 ----------- .../bindings/soc/altera/altr,sys-mgr.yaml | 51 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 25 deletions(-) commit c51187903fe4523fd7f521662c1ae1f1f3174036 Merge: 8227c7510b56 be947cc0cbbb Author: Mark Brown <broonie@kernel.org> Date: Tue Jan 7 18:50:45 2025 +0000 ASoC: codecs: Add aw88083 amplifier driver Merge series from wangweidong.a@awinic.com: Add the awinic,aw88083 property to support the aw88083 chip. The driver is for amplifiers aw88083 of Awinic Technology Corporation. The AW88083 is an intelligent digital audio amplifier with low noise. commit 8227c7510b56460e9ecf1acf4e5150da7070ab6c Merge: 5d085b25ae98 f1a92bb81a6c Author: Mark Brown <broonie@kernel.org> Date: Tue Jan 7 18:50:41 2025 +0000 Minor debugging improvements Merge series from Stephen Gordon <gordoste@iinet.net.au>: Some minor tweaks to debugging for dai_links. commit bff7165da9c1961e44b2fd6c8f80c8704184ae11 Author: Sunil V L <sunilvl@ventanamicro.com> Date: Fri Jan 3 09:21:22 2025 +0530 ACPI: tables: Use string choice helpers Use str_enabled_disabled string helpers for better readability and to fix cocci warning. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/r/202501010947.0e3GVHNa-lkp@intel.com/ Reported-by: Julia Lawall <julia.lawall@inria.fr> Closes: https://lore.kernel.org/r/202501010947.0e3GVHNa-lkp@intel.com/ Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Link: https://patch.msgid.link/20250103035122.50315-1-sunilvl@ventanamicro.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/acpi/tables.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit deaa14ab6b0610d052597c3f6114c3d9f0dc4c6c Author: Romain Sioen <romain.sioen@microchip.com> Date: Tue Jan 7 09:07:27 2025 -0700 ARM: dts: microchip: add support for sama7d65_curiosity board Add device tree support for the SAMA7D65 Curiosity board. Update the Makefile to include the new device tree file. uart6 is related to flexcom6, hence not sorted in alphabetical order. Signed-off-by: Romain Sioen <romain.sioen@microchip.com> Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com> Link: https://lore.kernel.org/r/20250107160850.120537-6-Ryan.Wanner@microchip.com [claudiu.beznea: moved chosen node after alias for aphanumerically sortage, added a space in front of <PIN_PD19__FLEXCOM6_IO1> for alignment] Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> arch/arm/boot/dts/microchip/Makefile | 3 + .../boot/dts/microchip/at91-sama7d65_curiosity.dts | 89 ++++++++++++++++++++++ 2 files changed, 92 insertions(+) commit 261dcfad1b59efd0e77b014ff963b6fe1ada260b Author: Ryan Wanner <Ryan.Wanner@microchip.com> Date: Tue Jan 7 09:07:26 2025 -0700 ARM: dts: microchip: add sama7d65 SoC DT Add Device Tree for sama7d65 SoC. Co-developed-by: Dharma Balasubiramani <dharma.b@microchip.com> Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com> Co-developed-by: Romain Sioen <romain.sioen@microchip.com> Signed-off-by: Romain Sioen <romain.sioen@microchip.com> Co-developed-by: Varshini Rajendran <varshini.rajendran@microchip.com> Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/20250107160850.120537-5-Ryan.Wanner@microchip.com [claudiu.beznea: dropped comma typo from copyright, dropped space in front of slow_xtal node, dropped empty space after slow_xtal node] Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> arch/arm/boot/dts/microchip/sama7d65.dtsi | 144 ++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) commit 15133582465fe19252eb1dd90c4570bb42e795ab Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Dec 31 18:27:40 2024 +0200 drm/i915/display: convert global state to struct intel_display Going forward, struct intel_display is the main display device structure. Convert intel_global_state.[ch] to it. This allows us to make intel_pmdemand.c completely independent of i915_drv.h. Cc: Gustavo Sousa <gustavo.sousa@intel.com> Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/2b5e743b285a86a59ee87085727847c758c8d552.1735662324.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_bw.c | 3 +- drivers/gpu/drm/i915/display/intel_cdclk.c | 3 +- .../gpu/drm/i915/display/intel_display_driver.c | 4 +-- drivers/gpu/drm/i915/display/intel_global_state.c | 42 +++++++++++----------- drivers/gpu/drm/i915/display/intel_global_state.h | 6 ++-- drivers/gpu/drm/i915/display/intel_pmdemand.c | 6 ++-- drivers/gpu/drm/i915/display/skl_watermark.c | 3 +- 7 files changed, 33 insertions(+), 34 deletions(-) commit 445fc685498bbb2e319394a016f9d39541ea6d68 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Dec 31 18:27:39 2024 +0200 drm/i915/pmdemand: convert to struct intel_display Going forward, struct intel_display is the main display device structure. Convert pmdemand to it. Cc: Gustavo Sousa <gustavo.sousa@intel.com> Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/c1d92e9490013d5aba50fc1d1ebc0ee18e82cf7e.1735662324.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> .../gpu/drm/i915/display/intel_display_driver.c | 4 +- drivers/gpu/drm/i915/display/intel_display_power.c | 4 +- drivers/gpu/drm/i915/display/intel_modeset_setup.c | 17 ++- drivers/gpu/drm/i915/display/intel_pmdemand.c | 160 ++++++++++----------- drivers/gpu/drm/i915/display/intel_pmdemand.h | 14 +- 5 files changed, 101 insertions(+), 98 deletions(-) commit 0a08320bfa385ec73e92a37e96e090ecc9a5027f Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Dec 31 18:27:38 2024 +0200 drm/i915/pmdemand: make struct intel_pmdemand_state opaque Only intel_pmdemand.c should look inside the struct intel_pmdemand_state. Indeed, this is already the case. Finish the job and make struct intel_pmdemand_state opaque, preventing any direct pokes at the guts of it in the future. Cc: Gustavo Sousa <gustavo.sousa@intel.com> Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/bc5f418785ecd51454761e9a55f21340470a92e3.1735662324.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_pmdemand.c | 28 ++++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_pmdemand.h | 34 ++++----------------------- 2 files changed, 32 insertions(+), 30 deletions(-) commit eb18e25b60f7f7f51a63cd99a177a924ba1f4fba Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Dec 31 18:27:37 2024 +0200 drm/i915/pmdemand: convert to_intel_pmdemand_state() to a function In preparation for making struct intel_pmdemand_state an opaque type, convert to_intel_pmdemand_state() to a function. Cc: Gustavo Sousa <gustavo.sousa@intel.com> Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/10324781f9f7eae5a92506aaa7a40403efd345dd.1735662324.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_pmdemand.c | 5 +++++ drivers/gpu/drm/i915/display/intel_pmdemand.h | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) commit 555c6e9b03c15edfd4020a8aa5ae7efc142c44e8 Author: Yicong Yang <yangyicong@hisilicon.com> Date: Mon Dec 23 20:51:34 2024 +0800 drivers/perf: hisi: Set correct IRQ affinity for PMUs with no association For PMUs with no association, the hisi_pmu->on_cpu is initialized according to the NUMA locality but use a wrong CPU for the interrupt affinity. The CPU selected from cpumask_local_spread() can be different from the CPU by the cpuhp callback. Fix this by setting the IRQ affinity to hisi_pmu->on_cpu. Fixes: 6cd137088fdf ("drivers/perf: hisi: Refactor the detection of associated CPUs") Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20241223125134.57885-1-yangyicong@huawei.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/hisilicon/hisi_uncore_pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 898b72fa44f5739d22016ec5ff6697ba4ac4464d Author: Dzmitry Sankouski <dsankouski@gmail.com> Date: Mon Nov 18 13:15:21 2024 +0300 clk: qcom: gcc-sdm845: Add general purpose clock ops SDM845 has "General Purpose" clocks that can be muxed to SoC pins to clock various external devices. Those clocks may be used as e.g. PWM sources for external peripherals. GPCLK can in theory have arbitrary value depending on the use case, so the concept of frequency tables, used in rcg2 clock driver, is not efficient, because it allows only defined frequencies. Introduce clk_rcg2_gp_ops, which automatically calculate clock mnd values for arbitrary clock rate. The calculation done as follows: - upon determine rate request, we calculate m/n/pre_div as follows: - find parent(from our client's assigned-clock-parent) rate - find scaled rates by dividing rates on its greatest common divisor - assign requested scaled rate to m - factorize scaled parent rate, put multipliers to n till max value (determined by mnd_width) - validate calculated values with *_width: - if doesn't fit, delete divisor and multiplier by 2 until fit - return determined rate Limitations: - The driver doesn't select a parent clock (it may be selected by client in device tree with assigned-clocks, assigned-clock-parents properties) Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Link: https://lore.kernel.org/r/20241118-starqltechn_integration_upstream-v8-3-ac8e36a3aa65@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-rcg.h | 1 + drivers/clk/qcom/clk-rcg2.c | 146 ++++++++++++++++++++++++++++++++++++++++++ drivers/clk/qcom/gcc-sdm845.c | 11 +--- 3 files changed, 150 insertions(+), 8 deletions(-) commit faddad527c82714dede83d932b4d31f7e38c1766 Author: Dzmitry Sankouski <dsankouski@gmail.com> Date: Mon Nov 18 13:15:20 2024 +0300 clk: qcom: clk-rcg2: split __clk_rcg2_configure function __clk_rcg2_configure function does 2 things - configures parent and mnd values. In order to be able to add new clock options, we should split. Move __clk_rcg2_configure logic on 2 functions: - __clk_rcg2_configure_parent which configures clock parent - __clk_rcg2_configure_mnd which configures mnd values __clk_rcg2_configure delegates to mentioned functions. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Link: https://lore.kernel.org/r/20241118-starqltechn_integration_upstream-v8-2-ac8e36a3aa65@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-rcg2.c | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) commit cef0523dd2ff65cc95cb747a348ce018f22f4d95 Author: Dzmitry Sankouski <dsankouski@gmail.com> Date: Mon Nov 18 13:15:19 2024 +0300 clk: qcom: clk-rcg2: document calc_rate function Update calc_rate docs to reflect, that pre_div is not pure divisor, but a register value, and requires conversion. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Link: https://lore.kernel.org/r/20241118-starqltechn_integration_upstream-v8-1-ac8e36a3aa65@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-rcg2.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit d3c7c48d004f6c8d892f39b5d69884fd0fe98c81 Author: Mark Brown <broonie@kernel.org> Date: Tue Dec 17 21:59:48 2024 +0000 arm64/sme: Move storage of reg_smidr to __cpuinfo_store_cpu() In commit 892f7237b3ff ("arm64: Delay initialisation of cpuinfo_arm64::reg_{zcr,smcr}") we moved access to ZCR, SMCR and SMIDR later in the boot process in order to ensure that we don't attempt to interact with them if SVE or SME is disabled on the command line. Unfortunately when initialising the boot CPU in init_cpu_features() we work on a copy of the struct cpuinfo_arm64 for the boot CPU used only during boot, not the percpu copy used by the sysfs code. The expectation of the feature identification code was that the ID registers would be read in __cpuinfo_store_cpu() and the values not modified by init_cpu_features(). The main reason for the original change was to avoid early accesses to ZCR on practical systems that were seen shipping with SVE reported in ID registers but traps enabled at EL3 and handled as fatal errors, SME was rolled in due to the similarity with SVE. Since then we have removed the early accesses to ZCR and SMCR in commits: abef0695f9665c3d ("arm64/sve: Remove ZCR pseudo register from cpufeature code") 391208485c3ad50f ("arm64/sve: Remove SMCR pseudo register from cpufeature code") so only the SMIDR_EL1 part of the change remains. Since SMIDR_EL1 is only trapped via FEAT_IDST and not the SME trap it is less likely to be affected by similar issues, and the factors that lead to issues with SVE are less likely to apply to SME. Since we have not yet seen practical SME systems that need to use a command line override (and are only just beginning to see SME systems at all) and the ID register read is much more likely to be safe let's just store SMIDR_EL1 along with all the other ID register reads in __cpuinfo_store_cpu(). This issue wasn't apparent when testing on emulated platforms that do not report values in SMIDR_EL1. Fixes: 892f7237b3ff ("arm64: Delay initialisation of cpuinfo_arm64::reg_{zcr,smcr}") Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20241217-arm64-fix-boot-cpu-smidr-v3-1-7be278a85623@kernel.org Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/kernel/cpufeature.c | 13 ------------- arch/arm64/kernel/cpuinfo.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 13 deletions(-) commit adc52dd4078067fabf1431036ba180eafd8a7eee Author: John Erasmus Mari Geronimo <johnerasmusmari.geronimo@analog.com> Date: Mon Jan 6 21:17:40 2025 +0800 hwmon: (pmbus/adm1275) add adm1273 support Add support for adm1273 which is similar to adm1275 and other chips of the series. Signed-off-by: John Erasmus Mari Geronimo <johnerasmusmari.geronimo@analog.com> Link: https://lore.kernel.org/r/20250106131740.305988-3-johnerasmusmari.geronimo@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/hwmon/adm1275.rst | 28 ++++++++++++++++++---------- drivers/hwmon/pmbus/Kconfig | 2 +- drivers/hwmon/pmbus/adm1275.c | 10 ++++++---- 3 files changed, 25 insertions(+), 15 deletions(-) commit 2b2b62a91196d32fa488c719cf9d1f5001b92c1e Author: John Erasmus Mari Geronimo <johnerasmusmari.geronimo@analog.com> Date: Mon Jan 6 21:17:39 2025 +0800 dt-bindings: hwmon: adm1275: add adm1273 Add support for the adm1273 Hot-Swap Controller and Digital Power and Energy Monitor Signed-off-by: John Erasmus Mari Geronimo <johnerasmusmari.geronimo@analog.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250106131740.305988-2-johnerasmusmari.geronimo@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 9ab2601dc4c145279dc518bca00349dc1abe77ed Author: Zhenhua Huang <quic_zhenhuah@quicinc.com> Date: Thu Jan 2 15:40:47 2025 +0800 arm64: mm: Test for pmd_sect() in vmemmap_check_pmd() Commit 2045a3b8911b ("mm/sparse-vmemmap: generalise vmemmap_populate_hugepages()") introduces the vmemmap_check_pmd() while does not verify if the entry is a section mapping, as is already done for Loongarch & X86. The update includes a check for pmd_sect(). Only if pmd_sect() returns true, further vmemmap population for the addr is skipped. Signed-off-by: Zhenhua Huang <quic_zhenhuah@quicinc.com> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Link: https://lore.kernel.org/r/20250102074047.674156-1-quic_zhenhuah@quicinc.com Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/mm/mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 80c3e28528ff9f269937fcfe73895213a2e14905 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Sun Dec 29 22:24:39 2024 +0900 selftests/tracing: Add hist poll() support test Add a testcase for poll() on hist file. This introduces a helper binary to the ftracetest, because there is no good way to reliably execute poll() on hist file. Cc: Shuah Khan <shuah@kernel.org> Cc: Tom Zanussi <zanussi@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/173547867935.569911.10127126796879854182.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> tools/testing/selftests/ftrace/Makefile | 2 + tools/testing/selftests/ftrace/poll.c | 74 ++++++++++++++++++++++ .../ftrace/test.d/trigger/trigger-hist-poll.tc | 74 ++++++++++++++++++++++ 3 files changed, 150 insertions(+) commit fe2169f556a1dd06e81ecab4ec25ce19f3f99cbd Author: Anshuman Khandual <anshuman.khandual@arm.com> Date: Tue Jan 7 07:25:29 2025 +0530 arm64/mm: Replace open encodings with PXD_TABLE_BIT [pgd|p4d]_bad() helpers have open encodings for their respective table bits which can be replaced with corresponding macros. This makes things clearer, thus improving their readability as well. Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Link: https://lore.kernel.org/r/20250107015529.798319-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/include/asm/pgtable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 169226583097ee52089e2268c09e3dc241e7a972 Author: Anshuman Khandual <anshuman.khandual@arm.com> Date: Tue Jan 7 08:00:16 2025 +0530 arm64/mm: Rename pte_mkpresent() as pte_mkvalid() pte_present() is no longer synonymous with pte_valid() as it also tests for pte_present_invalid() as well. Hence pte_mkpresent() is misleading, because all that does is make an entry mapped, via setting PTE_VALID. Hence rename the helper as pte_mkvalid() which reflects its functionality appropriately. Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/20250107023016.829416-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/include/asm/pgtable.h | 2 +- arch/arm64/mm/trans_pgd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 66fc6f521a0b91051ce6968a216a30bc52267bf8 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Fri Dec 27 13:08:07 2024 +0900 tracing/hist: Support POLLPRI event for poll on histogram Since POLLIN will not be flushed until the hist file is read, the user needs to repeatedly read() and poll() on the hist file for monitoring the event continuously. But the read() is somewhat redundant when the user is only monitoring for event updates. Add POLLPRI poll event on the hist file so the event returns when a histogram is updated after open(), poll() or read(). Thus it is possible to wait for the next event without having to issue a read(). Cc: Shuah Khan <shuah@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/173527248770.464571.2536902137325258133.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Reviewed-by: Tom Zanussi <zanussi@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_events_hist.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 256e6937e48a14cc5ea02ce9e4e0fbb4463c4464 Author: Yuanfang Zhang <quic_yuanfang@quicinc.com> Date: Tue Jan 7 16:48:26 2025 +0800 arm64: dts: qcom: sm8650: Add coresight nodes Add coresight components: Funnel, ETE and ETF for SM8650. Signed-off-by: Yuanfang Zhang <quic_yuanfang@quicinc.com> Link: https://lore.kernel.org/r/20250107-sm8650-cs-dt-v4-1-2113b18754ea@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8650.dtsi | 166 +++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) commit 1bd13edbbed6e7e396f1aab92b224a4775218e68 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Fri Dec 27 13:07:57 2024 +0900 tracing/hist: Add poll(POLLIN) support on hist file Add poll syscall support on the `hist` file. The Waiter will be waken up when the histogram is updated with POLLIN. Currently, there is no way to wait for a specific event in userspace. So user needs to peek the `trace` periodicaly, or wait on `trace_pipe`. But it is not a good idea to peek at the `trace` for an event that randomly happens. And `trace_pipe` is not coming back until a page is filled with events. This allows a user to wait for a specific event on the `hist` file. User can set a histogram trigger on the event which they want to monitor and poll() on its `hist` file. Since this poll() returns POLLIN, the next poll() will return soon unless a read() happens on that hist file. NOTE: To read the hist file again, you must set the file offset to 0, but just for monitoring the event, you may not need to read the histogram. Cc: Shuah Khan <shuah@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/173527247756.464571.14236296701625509931.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Reviewed-by: Tom Zanussi <zanussi@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> include/linux/trace_events.h | 14 ++++++++ kernel/trace/trace_events.c | 14 ++++++++ kernel/trace/trace_events_hist.c | 70 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 95 insertions(+), 3 deletions(-) commit ef0a0757bbeac9aedff66464c6fba2d896cfe343 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Jan 3 15:52:39 2025 +0200 drm/i915/dp: compute config for 128b/132b SST w/o DSC Enable basic 128b/132b SST functionality without compression. Reuse intel_dp_mtp_tu_compute_config() to figure out the TU after we've determined we need to use an UHBR rate. It's slightly complicated as the M/N computation is done in different places in MST and SST paths, so we need to avoid trashing the values later for UHBR. If uncompressed UHBR fails, we drop to compressed non-UHBR, which is quite likely to fail as well. We still lack 128b/132b SST+DSC. We need mst_master_transcoder also for 128b/132b SST. Use cpu_transcoder directly. Enhanced framing is "don't care" for 128b/132b link. v2: mst_master_transcoder, enhanced framing (Imre) Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/084e4e05bf25a5dd396dd391014943d42b11c88d.1735912293.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 34 +++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit 79a6734cd56e70e22d557acbfc62ab36c835fa8f Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Jan 3 15:52:38 2025 +0200 drm/i915/ddi: disable trancoder port select for 128b/132b SST 128b/1232b SST will have mst_master_transcoder set and matching cpu_transcoder. Ensure disable also for 128b/132b SST. Reviewed-by: Imre Deak <imre.deak@intel.com> Co-developed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/eaf705b3490d828ba33e85f40a7794d58de7c5ad.1735912293.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 40d489fac0e82e3f758b17d775355f514a6ec970 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Jan 3 15:52:37 2025 +0200 drm/i915/ddi: handle 128b/132b SST in intel_ddi_read_func_ctl() We'll only ever get here in MST mode from MST stream encoders; the primary encoder's ->get_config() won't be called when we've detected it's MST. v2: Read mst_master_transcoder in 128b/132b SST path (Imre) Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/436854c0bb6ab5c14c3d3837694ea60ac2fbaba2.1735912293.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 35d2e4b7564994e69583e12b0a0d74521657faeb Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Jan 3 15:52:36 2025 +0200 drm/i915/ddi: start distinguishing 128b/132b SST and MST at state readout We'll want to distinguish 128b/132b SST and MST modes at state readout. There's a catch, though. From the hardware perspective, 128b/132b SST and MST programming are pretty much the same. And we can't really ask the sink at this point. If we have more than one transcoder in 128b/132b mode associated with the port, we can safely assume it's MST. But for MST with only a single stream enabled, we are pretty much out of luck. Let's fall back to looking at the software state, i.e. intel_dp->is_mst. It should be fine for the state checker, but for hardware takeover at probe, we'll have to trust the GOP has only enabled SST. TODO: Not sure how this *or* our current code handles 128b/132b enabled by GOP. Cc: Imre Deak <imre.deak@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/119a773a0d4d74ad204435e462f8d12cb0ea4128.1735912293.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) commit 591b9170b7bcf29632c0e36eef825972a33e5afa Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Jan 3 15:52:35 2025 +0200 drm/i915/ddi: enable ACT handling for 128b/132b SST Add ACT handling for 128b/132b SST enable/disable. This is preparation for enabling 128b/132b SST. This path is not reachable yet. v2: - Check for !is_hdmi (Imre) - Add disable sequence (Imre) Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/b0226471f9445d988917cee49dbbd93a1493f3c7.1735912293.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit a9efb7e2f72e5f5835b942aaadcd5d730d0ad673 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Jan 3 15:52:34 2025 +0200 drm/i915/ddi: initialize 128b/132b SST DP2 VFREQ registers Write the DP2 specific VFREQ registers. This is preparation for enabling 128b/132b SST. This path is not reachable yet. v2: Check for !is_hdmi (Imre) Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/7d90547e9ce01642b722efca0bf81cadb754e790.1735912293.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit aedeed4af6fdd23426a6cec09c3e5872003e4a07 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Jan 7 11:54:14 2025 +0200 drm/i915/ddi: write payload for 128b/132b SST Write the payload allocation table for 128b/132b SST. Use VCPID 1 and start from slot 0, with dp_m_n.tu slots. This is preparation for enabling 128b/132b SST. This path is not reachable yet. Indeed, we don't yet compute TU for 128b/132b SST. v2: Handle drm_dp_dpcd_write_payload() failures (Imre) v3: Include drm_dp_helper.h (kernel test robot) Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250107095414.1244286-1-jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 01708578ae83d16ce9a89fc5d412a135481d1e62 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Jan 3 15:52:32 2025 +0200 drm/i915/ddi: 128b/132b SST also needs DP_TP_CTL_MODE_MST It's not very clearly specified, and the hardware bit is ill-named, but 128b/132b SST also needs the MST mode set in the DP_TP_CTL register. This is preparation for enabling 128b/132b SST. This path is not reachable yet. Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/b29fbba8c979a8bab2bf03088610fe408faaf704.1735912293.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2f82724a3e86927a09a285358bef2369f4c3504a Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Jan 3 15:52:31 2025 +0200 drm/i915/ddi: enable 128b/132b TRANS_DDI_FUNC_CTL mode for UHBR SST 128b/132b SST needs 128b/132b mode enabled in the TRANS_DDI_FUNC_CTL register. This is preparation for enabling 128b/132b SST. This path is not reachable yet. v2: Use the MST path instead of SST to also set transport select (Imre) Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/122ebeadf4bf0870fc26b7d12abdff88f4be8799.1735912293.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f6971d7427c2b235a2aa30d986343a3523cbe974 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Jan 3 15:52:30 2025 +0200 drm/i915/mst: adapt intel_dp_mtp_tu_compute_config() for 128b/132b SST Handle 128b/132b SST in intel_dp_mtp_tu_compute_config(). The remote bandwidth overhead and time slot allocation are only relevant for MST; SST only needs the local bandwidth and a check that 64 slots isn't exceeded. Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/b59c94b0aac2c073b0306c0a0040b26330f94260.1735912293.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_dp_mst.c | 109 ++++++++++++++++------------ 1 file changed, 61 insertions(+), 48 deletions(-) commit 1ed21a66ecb7005ab80132643cce99e0addea5dd Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Jan 3 15:52:29 2025 +0200 drm/i915/mst: split out a helper for figuring out the TU Extract intel_dp_mtp_tu_compute_config() for figuring out the TU. Move the link configuration and mst state access to the callers. This will be easier to adapt to 128b/132b SST. v2: Don't add SST stuff here yet Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/c3ea8370c9bd3cdc579159e68a63f4ed2fadc66a.1735912293.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_dp_mst.c | 53 +++++++++++++++++++---------- drivers/gpu/drm/i915/display/intel_dp_mst.h | 7 ++++ 2 files changed, 42 insertions(+), 18 deletions(-) commit 0dcc5c6a02abf95a918abff9a540f1618291624c Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Jan 3 15:52:28 2025 +0200 drm/i915/mst: remove crtc_state->pbn The crtc_state->pbn member is only used as a temporary variable within mst_stream_find_vcpi_slots_for_bpp(). Remove it as unnecessary. Suggested-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/726aaadbd425057dfd854e42417bcf8d69b769d3.1735912293.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display_types.h | 2 -- drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) commit 643b06e29ec00b6e32f69af5ce4aaf1220fdf5f9 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Jan 3 15:52:27 2025 +0200 drm/i915/mst: change return value of mst_stream_find_vcpi_slots_for_bpp() The callers of mst_stream_find_vcpi_slots_for_bpp() don't need the returned slots for anything. On the contrary, they need to jump through hoops to just distinguish between success and failure. Just return 0 instead of slots from mst_stream_find_vcpi_slots_for_bpp() for success, and simplify the callers. There's a pointless ret local variable that we can drop in the process. Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/7b3671a548c893b1bb62151d41f90bb8ce842ccc.1735912293.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_dp_mst.c | 52 ++++++++++------------------- 1 file changed, 18 insertions(+), 34 deletions(-) commit d7cde2e6bc76d724394f4bb858453c004efe9fcc Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Jan 3 15:52:26 2025 +0200 drm/i915/mst: drop connector parameter from intel_dp_mst_compute_m_n() intel_dp_mst_compute_m_n() doesn't need the connector. Remove the parameter. Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/eec2e9a2e2dc3d166ac94bb9de691246a14d3945.1735912293.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2f6ba896cef8a8a138567f727467fb7edd438257 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Jan 3 15:52:25 2025 +0200 drm/i915/mst: drop connector parameter from intel_dp_mst_bw_overhead() intel_dp_mst_bw_overhead() doesn't need the connector. Remove the parameter. Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/e1379aca0748e392d8a232135b823deec783e829.1735912293.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 79cb1fad39fad0ace231aeb8d5e6b016d562dd83 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Jan 3 15:52:24 2025 +0200 drm/mst: remove mgr parameter and debug logging from drm_dp_get_vc_payload_bw() The struct drm_dp_mst_topology_mgr *mgr parameter is only used for debug logging in case the passed in link rate or lane count are zero. There's no further error checking as such, and the function returns 0. There should be no case where the parameters are zero. The returned value is generally used as a divisor, and if we were hitting this, we'd be seeing division by zero. Just remove the debug logging altogether, along with the mgr parameter, so that the function can be used in non-MST contexts without the topology manager. v2: Also remove drm_dp_mst_helper_tests_init as unnecessary (Imre) Cc: Imre Deak <imre.deak@intel.com> Cc: Lyude Paul <lyude@redhat.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Acked-by: Maxime Ripard <mripard@kernel.org> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/72d77e7a7fe69c784e9df048b7e6f250fd7599e4.1735912293.git.jani.nikula@intel.com drivers/gpu/drm/display/drm_dp_mst_topology.c | 10 ++-------- drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 +-- drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 +-- drivers/gpu/drm/tests/drm_dp_mst_helper_test.c | 17 +---------------- include/drm/display/drm_dp_mst_helper.h | 3 +-- 5 files changed, 6 insertions(+), 30 deletions(-) commit 680421056216efe727ff4ed48f481691d5873b9e Author: Abel Vesa <abel.vesa@linaro.org> Date: Tue Jan 7 15:15:16 2025 +0200 arm64: dts: qcom: x1e80100: Fix usb_2 controller interrupts Back when the CRD support was brought up, the usb_2 controller didn't have anything connected to it in order to test it properly, so it was never enabled. On the Lenovo ThinkPad T14s, the usb_2 controller has the fingerprint controller connected to it. So enabling it, proved that the interrupts lines were wrong from the start. Fix both the pwr_event and the DWC ctrl_irq lines, according to documentation. Fixes: 4af46b7bd66f ("arm64: dts: qcom: x1e80100: Add USB nodes") Cc: stable@vger.kernel.org # 6.9 Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Tested-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20250107-x1e80100-fix-usb2-controller-irqs-v1-1-4689aa9852a7@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5b451930fdeea4e4987d3cc1c4a44da85d0b8b9f Author: Abel Vesa <abel.vesa@linaro.org> Date: Tue Jan 7 15:35:07 2025 +0200 arm64: dts: qcom: x1e78100-t14s: Enable fingerprint reader On Lenovo ThinkPad T14s, the fingerprint reader placed in the power button is connected via the usb_2 controller. The controller has only a USB 2.0 PHY which is then connected via a NXP PTN3222 eUSB2 repeater, which in turn is connected to the Goodix fingerprint reader. So enable all the usb_2 controller and PHY nodes, set dual-role mode to host and describe the eUSB2 repeater in order to get the fingerprint reader discovered. Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Tested-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20250107-x1e80100-t14-enable-fingerprint-sensor-v1-1-8fd911d39ad1@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 87be7b32e4847dfddbe44f6ea281afbabafd08d5 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Tue Jan 7 16:54:52 2025 +0100 arm64: defconfig: Enable basic Qualcomm SM8750 SoC drivers Enable necessary drivers for booting Qualcomm SM8750 based boards like MTP8750 and QRD8750. The clock controller (GCC), interconnect and pinctrl drivers are considered necessary for early boot debugging, e.g. via serial console, thus make them built-in. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20250107155452.389154-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/configs/defconfig | 5 +++++ 1 file changed, 5 insertions(+) commit d26c4ad3fa53e76a602a9974ade171c8399f2a29 Author: Abel Vesa <abel.vesa@linaro.org> Date: Tue Jan 7 17:55:23 2025 +0200 clk: qcom: gcc-x1e80100: Do not turn off usb_2 controller GDSC Allowing the usb_2 controller GDSC to be turned off during system suspend renders the controller unable to resume. So use PWRSTS_RET_ON instead in order to make sure this the GDSC doesn't go down. Fixes: 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100") Cc: stable@vger.kernel.org # 6.8 Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Tested-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20250107-x1e80100-clk-gcc-fix-usb2-gdsc-pwrsts-v1-1-e15d1a5e7d80@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/gcc-x1e80100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22bec11a569983f39c6061cb82279e7de9e3bdfc Author: Steven Rostedt <rostedt@goodmis.org> Date: Mon Jan 6 11:11:43 2025 -0500 tracing: Fix using ret variable in tracing_set_tracer() When the function tracing_set_tracer() switched over to using the guard() infrastructure, it did not need to save the 'ret' variable and would just return the value when an error arised, instead of setting ret and jumping to an out label. When CONFIG_TRACER_SNAPSHOT is enabled, it had code that expected the "ret" variable to be initialized to zero and had set 'ret' while holding an arch_spin_lock() (not used by guard), and then upon releasing the lock it would check 'ret' and exit if set. But because ret was only set when an error occurred while holding the locks, 'ret' would be used uninitialized if there was no error. The code in the CONFIG_TRACER_SNAPSHOT block should be self contain. Make sure 'ret' is also set when no error occurred. Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/20250106111143.2f90ff65@gandalf.local.home Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202412271654.nJVBuwmF-lkp@intel.com/ Fixes: d33b10c0c73ad ("tracing: Switch trace.c code over to use guard()") Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> kernel/trace/trace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e6a4fcf51b2974240d5ddd801de10e811d3a2f0d Author: Takashi Iwai <tiwai@suse.de> Date: Tue Jan 7 16:56:37 2025 +0100 ALSA: hda: Simplify with str_enable_disable() Use the standard helper str_enable_disable() to simplify the code. Only code refactoring, no behavior change. Link: https://patch.msgid.link/20250107155641.4435-8-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/hda/hdac_component.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit a0f70af79d16cc3c630d66eb33cd8643399f312b Author: Takashi Iwai <tiwai@suse.de> Date: Tue Jan 7 16:56:36 2025 +0100 ALSA: seq: oss: Simplify with str_enabled_disabled() Use the standard helper str_enabled_disabled() to simplify the code. Only code refactoring, no behavior change. Link: https://patch.msgid.link/20250107155641.4435-7-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/core/seq/oss/seq_oss_device.h | 4 ---- sound/core/seq/oss/seq_oss_init.c | 6 ------ sound/core/seq/oss/seq_oss_synth.c | 4 ++-- 3 files changed, 2 insertions(+), 12 deletions(-) commit b3344ddb78e16e629a397ab67fd20c9ec7662f75 Author: Takashi Iwai <tiwai@suse.de> Date: Tue Jan 7 16:56:34 2025 +0100 ALSA: emu10k1: Simplify with str_on_off() Use the standard helper str_on_off() to simplify the code. Only code refactoring, no behavior change. Link: https://patch.msgid.link/20250107155641.4435-5-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/emu10k1/emuproc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7eb4317c5ae78aff88ddf2a0c8ee8f8d7c84c170 Author: Takashi Iwai <tiwai@suse.de> Date: Tue Jan 7 16:56:33 2025 +0100 ALSA: hdspm: Simplify with str_on_off() Use the standard helper str_on_off() to simplify the code. Only code refactoring, no behavior change. Link: https://patch.msgid.link/20250107155641.4435-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/rme9652/hdspm.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit feeeebaabf93af3ccc3a2cc4488058d239779f34 Author: Takashi Iwai <tiwai@suse.de> Date: Tue Jan 7 16:56:32 2025 +0100 ALSA: sonicvibes: Simplify with str_off_on() Use the standard helper str_off_on() to simplify the code. Only code refactoring, no behavior change. Link: https://patch.msgid.link/20250107155641.4435-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/sonicvibes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7d67e713b505d9c0d317bf3253dc507c8aabdf0 Author: Takashi Iwai <tiwai@suse.de> Date: Tue Jan 7 16:56:31 2025 +0100 ALSA: trident: Simplify with str_on_off() Use the standard helper str_on_off() to simplify the code. Only code refactoring, no behavior change. Link: https://patch.msgid.link/20250107155641.4435-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/trident/trident_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d7cfd75ba0d3ee70f546d5c402f9cce02280b0d5 Author: Jie Gan <quic_jiegan@quicinc.com> Date: Thu Dec 5 13:49:03 2024 +0800 arm64: dts: qcom: x1e80100: Add coresight nodes Add following coresight components for x1e80100 platform. It includes CTI, dummy sink, dynamic Funnel, Replicator, STM, TPDM, TPDA and TMC ETF. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Tested-by: Yushan Li <quic_yushli@quicinc.com> Signed-off-by: Jie Gan <quic_jiegan@quicinc.com> Link: https://lore.kernel.org/r/20241205054904.535465-1-quic_jiegan@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100.dtsi | 1453 ++++++++++++++++++++++++++++++++ 1 file changed, 1453 insertions(+) commit 787cb3b4c434adf117236e0ba23280264e73f90e Author: Yijie Yang <quic_yijiyang@quicinc.com> Date: Fri Dec 6 09:35:05 2024 +0800 arm64: dts: qcom: qcs8300-ride: enable ethernet0 Enable the SerDes PHY on qcs8300-ride. Add the MDC and MDIO pin functions for ethernet0 on qcs8300-ride. Enable the ethernet port on qcs8300-ride. Signed-off-by: Yijie Yang <quic_yijiyang@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241206-dts_qcs8300-v5-2-422e4fda292d@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8300-ride.dts | 112 ++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) commit 86d32baddc7bac85f42eb917baff9914131dd393 Author: Yijie Yang <quic_yijiyang@quicinc.com> Date: Fri Dec 6 09:35:04 2024 +0800 arm64: dts: qcom: qcs8300: add the first 2.5G ethernet Add the node for the first ethernet interface on qcs8300 platform. Add the internal SGMII/SerDes PHY node as well. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Yijie Yang <quic_yijiyang@quicinc.com> Link: https://lore.kernel.org/r/20241206-dts_qcs8300-v5-1-422e4fda292d@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit ce4b3c48e4725a28b4e52802fdfb963f176801bc Author: Jingyi Wang <quic_jingyw@quicinc.com> Date: Fri Dec 6 14:41:13 2024 +0800 arm64: dts: qcom: qcs8300: Add capacity and DPC properties The "capacity-dmips-mhz" and "dynamic-power-coefficient" are used to build Energy Model which in turn is used by EAS to take placement decisions. So add it to QCS8300 SoC. Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241206-qcs8300_dpc-v1-1-af2e8e6d3da9@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 5d085b25ae9843b4865360986ab288332bb01e21 Author: Derek Fang <derek.fang@realtek.com> Date: Wed Dec 25 17:43:07 2024 +0800 ASoC: rt5682: Support the ALC5682I-VE codec The ALC5682I-VD and ALC5682I-VE use the same I2C codec driver with different calibration settings. This patch aims to handle their differences. Signed-off-by: Derek Fang <derek.fang@realtek.com> Link: https://patch.msgid.link/20241225094307.3678837-1-derek.fang@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/rt5682-i2c.c | 6 ++++++ sound/soc/codecs/rt5682.c | 12 ++++++++++-- sound/soc/codecs/rt5682.h | 2 ++ 3 files changed, 18 insertions(+), 2 deletions(-) commit 6f0f335b73a9264050e031879ad04c551c05959c Merge: baad97ed29be d678c63534ed Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Jan 7 18:07:54 2025 +0200 Merge drm/drm-next into drm-intel-next Backmerge to get the DRM DP payload and ACT helpers to drm-intel-next. Signed-off-by: Jani Nikula <jani.nikula@intel.com> commit 3ec5c62cfcf060e9ea533cd3901f5d03b26ddc24 Author: Guixin Liu <kanie@linux.alibaba.com> Date: Mon Dec 9 09:53:44 2024 +0800 nvmet: handle rw's limited retry flag In some scenarios, some multipath software setup places the REQ_FAILFAST_DEV flag on I/O to prevent retries and immediately switch to other paths for issuing I/O commands. This will reflect on the NVMe read and write commands with the limited retry flag. However, the current NVMe target side does not handle the limited retry flag, and the target's underlying driver still retries the I/O. This will result in the I/O not being quickly switched to other paths, ultimately leading to increased I/O latency. When the nvme target receive an rw command with limited retry flag, handle it in block backend by setting the REQ_FAILFAST_DEV flag to bio. Signed-off-by: Guixin Liu <kanie@linux.alibaba.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Keith Busch <kbusch@kernel.org> drivers/nvme/target/io-cmd-bdev.c | 3 +++ 1 file changed, 3 insertions(+) commit e91609f1c3b0ce06d80b1b3bd0e6b942782be016 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Tue Jan 7 09:37:29 2025 +0100 dt-bindings: clock: renesas,r9a08g045-vbattb: Fix include guard Add the missing "RENESAS" part to the include guard. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/34953d1e9f472e4f29533ed06cf092dd3c0d1178.1736238939.git.geert+renesas@glider.be include/dt-bindings/clock/renesas,r9a08g045-vbattb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 92d6254f58120011c93610b4cb7def214409731d Author: Thomas Weißschuh <linux@weissschuh.net> Date: Thu Dec 5 18:07:31 2024 +0100 sysfs: constify macro BIN_ATTRIBUTE_GROUPS() As there is only one in-tree user, avoid a transition phase and switch that user in the same commit. As there are some interdependencies between the constness of the different symbols in the s390 driver, covert the whole driver at once. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241205-sysfs-const-bin_attr-groups_macro-v1-1-ac5e855031e8@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/s390/cio/chp.c | 28 ++++++++++++++-------------- include/linux/sysfs.h | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) commit 05031de3359855b5b00ebe58daa4563768405fa1 Author: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Date: Thu Jan 2 18:18:39 2025 +0000 clk: renesas: r9a09g057: Add clock and reset entries for GIC Add clock and reset entries for GIC. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20250102181839.352599-7-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/r9a09g057-cpg.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7e3557b4dd929aee5961417575893a990650e84e Author: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Date: Thu Jan 2 18:18:38 2025 +0000 clk: renesas: r9a09g057: Add reset entry for SYS Add the missing reset entry for the `SYS` module in the clock driver. The corresponding core clock entry for `SYS` is already present. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20250102181839.352599-6-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/r9a09g057-cpg.c | 1 + 1 file changed, 1 insertion(+) commit 7088d2d7e9a58a972d8c07b4d74837f3c524f2f4 Author: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com> Date: Fri Dec 20 10:14:40 2024 +0100 clk: renesas: r8a779g0: Add VSPX clocks Add the VSPX modules clock for Renesas R-Car V4H (R8A779G0) SoC. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com> Link: https://lore.kernel.org/20241220-rcar-v4h-vspx-v4-3-7dc1812585ad@ideasonboard.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/r8a779g0-cpg-mssr.c | 2 ++ 1 file changed, 2 insertions(+) commit c5a870087827bcf83cb06758d3e3b547790a6ad8 Author: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com> Date: Fri Dec 20 10:14:38 2024 +0100 clk: renesas: r8a779g0: Add FCPVX clocks Add the FCPVX modules clock for Renesas R-Car V4H (R8A779G0) SoC. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com> Link: https://lore.kernel.org/20241220-rcar-v4h-vspx-v4-1-7dc1812585ad@ideasonboard.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/r8a779g0-cpg-mssr.c | 2 ++ 1 file changed, 2 insertions(+) commit 29ebc6197403c643f389b59ba334e5bb53457103 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Mon Dec 16 12:00:24 2024 +0000 clk: renesas: r9a09g047: Add I2C clocks/resets Add I2C{0..8} clock and reset entries. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241216120029.143944-3-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/r9a09g047-cpg.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 3baf0273c0627b7e6029304166df17e07c6796fb Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Fri Dec 13 12:35:42 2024 +0000 clk: renesas: r9a09g047: Add CA55 core clocks Add CA55 core clocks which are derived from PLLCA55. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/20241213123550.289193-4-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/r9a09g047-cpg.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit bb6a9aaf670735d6583c76073ec41190f5404dc5 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Fri Dec 13 12:35:41 2024 +0000 clk: renesas: rzv2h: Add support for RZ/G3E SoC The clock structure for RZ/G3E is almost identical to RZ/V2H SoC with more IP blocks compared to RZ/V2H. For eg: VSPI, LVDS, DPI and LCDC1 are present only on the RZ/G3E SoC. Add minimal clock and reset entries required to boot the Renesas RZ/G3E SMARC EVK and binds it with the RZ/V2H CPG core driver. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/20241213123550.289193-3-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/Kconfig | 7 ++- drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/r9a09g047-cpg.c | 102 ++++++++++++++++++++++++++++++++++++ drivers/clk/renesas/rzv2h-cpg.c | 6 +++ drivers/clk/renesas/rzv2h-cpg.h | 1 + 5 files changed, 116 insertions(+), 1 deletion(-) commit 6b4a095cd537aade8c0e2dc1c17067e451a0cca1 Merge: 9b6e63a777ea 25458fdd39a1 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Tue Jan 7 17:00:45 2025 +0100 Merge tag 'renesas-r9a09g047-dt-binding-defs-tag1' into renesas-clk-for-v6.14 Renesas RZ/G3E DT Binding Definitions DT bindings and binding definitions for the Renesas RZ/G3E (R9A09G047) SoC, shared by driver and DT source files. commit 9b6e63a777ea5fb85bf24f9cb5ba902eed4f1f2f Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Fri Dec 13 12:35:40 2024 +0000 clk: renesas: rzv2h: Add MSTOP support Add MSTOP support to control buses for the individual units on RZ/V2H. Use per-bit (instead of group-based) configuration and atomic counters, to ensure precise control over individual MSTOP bits, and to prevent issues with shared dependencies between module clocks. Co-developed-by: Biju Das <biju.das.jz@bp.renesas.com> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Co-developed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241213123550.289193-2-biju.das.jz@bp.renesas.com Link: https://lore.kernel.org/20250102181839.352599-2-prabhakar.mahadev-lad.rj@bp.renesas.com Link: https://lore.kernel.org/20250102181839.352599-3-prabhakar.mahadev-lad.rj@bp.renesas.com Link: https://lore.kernel.org/20250102181839.352599-4-prabhakar.mahadev-lad.rj@bp.renesas.com Link: https://lore.kernel.org/20250102181839.352599-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/r9a09g057-cpg.c | 155 ++++++++++++++++++++++++------------ drivers/clk/renesas/rzv2h-cpg.c | 146 ++++++++++++++++++++++++++++----- drivers/clk/renesas/rzv2h-cpg.h | 30 +++++-- 3 files changed, 252 insertions(+), 79 deletions(-) commit 7c9bf0305662da44676e5a75d1941cecd0dd73be Author: Thomas Weißschuh <linux@weissschuh.net> Date: Thu Dec 5 17:43:27 2024 +0100 MAINTAINERS: add include/linux/sysfs.h include/linux/sysfs.h is maintained as part of "DRIVER CORE, KOBJECT, DEBUGFS AND SYSFS. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241205-sysfs-maintainers-v1-1-53694b690d67@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 0f9e1f3a6e1e873bc70c7a47870a18c05647360e Author: Thomas Weißschuh <linux@weissschuh.net> Date: Thu Nov 21 17:48:47 2024 +0100 kernel/ksysfs.c: simplify bin_attribute definition The notes attribute can be implemented in terms of BIN_ATTR_SIMPLE(). This saves memory at runtime and is a preparation for the constification of struct bin_attribute. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241121-sysfs-const-bin_attr-ksysfs-v1-1-972faced149d@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> kernel/ksysfs.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) commit 9cc06dbaf437010fba67fc8adb371d39197e75d7 Merge: d678c63534ed e7f0a3a6f733 Author: Simona Vetter <simona.vetter@ffwll.ch> Date: Tue Jan 7 16:51:19 2025 +0100 Merge tag 'drm-intel-next-2024-12-11' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Core Changes: - drm/print: add drm_print_hex_dump() Driver Changes: - HDCP fixes and updates for Xe3lpd and for HDCP 1.4 (Suraj) - Add dedicated lock for each sideband (Jani) - New GSC FW for ARL-H and ARL-U (Daniele) - Add support for 3 VDSC engines 12 slices (Ankit) - Sanitize MBUS joining (Ville) - Fixes in DP MST (Imre) - Stop using pixel_format_from_register_bits() to parse VBT (Ville) - Declutter CDCLK code (Ville) - PSR clean up and fixes (Jouni, Jani, Animesh) - DMC wakelock - Fixes and enablement for Xe3_LPD (Gustavo) - Demote source OUI read/write failure logging to debug (Jani) - Potential boot oops fix and some general cleanups (Ville) - Scaler code cleanups (Ville) - More conversion towards struct intel_display and general cleanups (Jani) - Limit max compressed bpp to 18 when forcing DSC (Ankit) - Start to reconcile i915's and xe's display power mgt sequences (Rodrigo) - Some correction in the DP Link Training sequence (Arun) - Avoid setting YUV420_MODE in PIPE_MISC on Xe3lpd (Ankit) - MST and DDI cleanups and refactoring (Jani) - Fixed an typo in i915_gem_gtt.c (Zhang) - Try to make DPT shrinkable again (Ville) - Try to fix CPU MMIO fails during legacy LUT updates (Ville) - Some PPS cleanups (Ville, Jani) - Use seq buf for printing rates (Jani) - Flush DMC wakelock release work at the end of runtime suspend (Gustavo) - Fix NULL pointer dereference in capture_engine (Eugene) - Fix memory leak by correcting cache object name in error handler (Jiasheng) - Small refactor in WM/DPKGC for modifying latency programmed into PKG_C_LATENCY (Suraj) - Add drm_printer based hex dumper and use it (Jani) - Move g4x code to specific g4x functions (Jani) Signed-off-by: Simona Vetter <simona.vetter@ffwll.ch> From: Rodrigo Vivi <rodrigo.vivi@intel.com> [sima: conflict in intel_dp_mst.c due to conversion to drm_connector_dynamic_init that landed through drm-misc] Link: https://patchwork.freedesktop.org/patch/msgid/Z1n4VhatZpvT5xKs@intel.com commit 425970f94b3c761564f65289e37953ffe9445d93 Author: Antonio Quartulli <antonio@mandelbit.com> Date: Tue Jan 7 16:21:48 2025 +0100 MAINTAINERS: mailmap: add entries for Antonio Quartulli Update MAINTAINERS and link my various emails to my company email address in .mailmap. Signed-off-by: Antonio Quartulli <antonio@mandelbit.com> Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> .mailmap | 7 +++++++ MAINTAINERS | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) commit aff028a8192d056d346541c5fc7d88c0eb43412c Author: Rob Clark <robdclark@chromium.org> Date: Tue Dec 10 08:51:21 2024 -0800 iommu/io-pgtable-arm: Add way to debug pgtable walk Add an io-pgtable method to walk the pgtable returning the raw PTEs that would be traversed for a given iova access. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Mostafa Saleh <smostafa@google.com> Link: https://lore.kernel.org/r/20241210165127.600817-4-robdclark@gmail.com [will: Removed 'arm_lpae_io_pgtable_walk_data::level' per Mostafa] Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/io-pgtable-arm.c | 23 +++++++++++++++++++++++ include/linux/io-pgtable.h | 11 +++++++++++ 2 files changed, 34 insertions(+) commit d9e589e6ad73e5e13f8ed5df9a3e4049001a95c1 Author: Rob Clark <robdclark@chromium.org> Date: Tue Dec 10 08:51:20 2024 -0800 iommu/io-pgtable-arm: Re-use the pgtable walk for iova_to_phys Re-use the generic pgtable walk path. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Mostafa Saleh <smostafa@google.com> Link: https://lore.kernel.org/r/20241210165127.600817-3-robdclark@gmail.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/io-pgtable-arm.c | 74 +++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 37 deletions(-) commit 821500d5c59737708b0959a6c71328ae5ba070ca Author: Rob Clark <robdclark@chromium.org> Date: Tue Dec 10 08:51:19 2024 -0800 iommu/io-pgtable-arm: Make pgtable walker more generic We can re-use this basic pgtable walk logic in a few places. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Mostafa Saleh <smostafa@google.com> Link: https://lore.kernel.org/r/20241210165127.600817-2-robdclark@gmail.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/io-pgtable-arm.c | 67 +++++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 24 deletions(-) commit 76b26917e4ff9545b321730cd3b64fdd2e043769 Author: Selvin Xavier <selvin.xavier@broadcom.com> Date: Tue Jan 7 01:01:59 2025 -0800 MAINTAINERS: Update the bnxt_re maintainers Adding Kalesh to the bnxt_re maintainers list Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/1736240519-2491-1-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit d66e21d59ed0e043e68ef8c6541c1e9f1a962614 Author: Mark Brown <broonie@kernel.org> Date: Wed Dec 11 01:02:51 2024 +0000 arm64/sysreg: Update ID_AA64ISAR2_EL1 to DDI0601 2024-09 DDI0601 2024-09 introduces new features which are enumerated via ID_AA64ISAR2_EL1, update the sysreg file to reflect these updates. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241211-arm64-2024-dpisa-v4-6-0fd403876df2@kernel.org Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/tools/sysreg | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9a43ee86434970fcb259eeea766820b607f868be Author: Mark Brown <broonie@kernel.org> Date: Wed Dec 11 01:02:49 2024 +0000 arm64/sysreg: Update ID_AA64ZFR0_EL1 to DDI0601 2024-09 DDI0601 2024-09 introduces SVE 2.2 as well as a few new optional features, update sysreg to reflect the changes in ID_AA64ZFR0_EL1 enumerating them. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241211-arm64-2024-dpisa-v4-4-0fd403876df2@kernel.org Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/tools/sysreg | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 12b5ff517a19b77abb3f1cb082a0e0124307fb53 Author: Mark Brown <broonie@kernel.org> Date: Wed Dec 11 01:02:48 2024 +0000 arm64/sysreg: Update ID_AA64FPFR0_EL1 to DDI0601 2024-09 DDI0601 2024-09 defines two new feature flags in ID_AA64FPFR0_EL1 describing new FP8 operations, describe them in sysreg. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241211-arm64-2024-dpisa-v4-3-0fd403876df2@kernel.org Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/tools/sysreg | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 054339beae58ad7a401ba99095991d7434f01ad6 Author: Mark Brown <broonie@kernel.org> Date: Wed Dec 11 01:02:47 2024 +0000 arm64/sysreg: Update ID_AA64ISAR3_EL1 to DDI0601 2024-09 DDI0601 2024-09 defines several new feature flags in ID_AA64ISAR3_EL1, update our description in sysreg to reflect these. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241211-arm64-2024-dpisa-v4-2-0fd403876df2@kernel.org Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/tools/sysreg | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 1ad9a56442a06298fc8e5a982d1ca6d04f84fe44 Author: Mark Brown <broonie@kernel.org> Date: Wed Dec 11 01:02:46 2024 +0000 arm64/sysreg: Update ID_AA64PFR2_EL1 to DDI0601 2024-09 DDI0601 2024-09 defines a new feature flags in ID_AA64PFR2_EL1 describing support for injecting UNDEF exceptions, update sysreg to include this. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241211-arm64-2024-dpisa-v4-1-0fd403876df2@kernel.org Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/tools/sysreg | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 83d8c79aa958e37724ed9c14dc7d0f66a48ad864 Author: Quan Nguyen <quan@os.amperecomputing.com> Date: Tue Jan 7 10:47:34 2025 +0700 ipmi: ssif_bmc: Fix new request loss when bmc ready for a response Cosmo found that when there is a new request comes in while BMC is ready for a response, the complete_response(), which is called to complete the pending response, would accidentally clear out that new request and force ssif_bmc to move back to abort state again. This commit is to address that issue. Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver") Reported-by: Cosmo Chou <chou.cosmo@gmail.com> Closes: https://lore.kernel.org/lkml/20250101165431.2113407-1-chou.cosmo@gmail.com/ Signed-off-by: Quan Nguyen <quan@os.amperecomputing.com> Message-ID: <20250107034734.1842247-1-quan@os.amperecomputing.com> Signed-off-by: Corey Minyard <corey@minyard.net> drivers/char/ipmi/ssif_bmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6143cc1d9e5503074b1ed41a5721f1c2da083f62 Author: Melody Olvera <quic_molvera@quicinc.com> Date: Wed Dec 4 14:53:37 2024 -0800 dt-bindings: interrupt-controller: qcom,pdc: Document SM8750 PDC Document the PDC block on the SM8750 SoC. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Link: https://lore.kernel.org/r/20241204-sm8750_master_pdc-v1-1-3a06cb62a28f@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml | 1 + 1 file changed, 1 insertion(+) commit 5cf8f938bf5ca441a02a3bbf6ef772963aa387b3 Author: Christian Kujau <lists@nerdbynature.de> Date: Mon Jan 6 16:32:05 2025 +0100 vbox: Enable VBOXGUEST and VBOXSF_FS on ARM64 Now that VirtualBox is able to run as a host on arm64 (e.g. the Apple M3 processors) we can enable VBOXSF_FS (and in turn VBOXGUEST) for this architecture. Tested with various runs of bonnie++ and dbench on an Apple MacBook Pro with the latest Virtualbox 7.1.4 r165100 installed. Signed-off-by: Christian Kujau <lists@nerdbynature.de> Link: https://lore.kernel.org/r/7384d96c-2a77-39b0-2306-90129bae9342@nerdbynature.de Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Christian Brauner <brauner@kernel.org> drivers/virt/vboxguest/Kconfig | 2 +- fs/vboxsf/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1737aaefa33555b38d3fe11191490df9e9df81cd Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Tue Dec 31 00:26:35 2024 +0530 staging: gpib: tnt4882: Handle gpib_register_driver() errors The error value from the init_ni_gpib_cs() function is not returned and the previous registering functions are not unregistered. The function gpib_register_driver() can fail and similar to pcmcia_register_driver() function failing, the previous registering functions are not unregistered. Unregister the gpib and pci register functions if the subsequent gpib or pcmcia register functions fail and return the error value. Add pr_err() statements indicating the fail and the error value. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-16-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 106 ++++++++++++++++++++++++---- 1 file changed, 93 insertions(+), 13 deletions(-) commit 942b483ef3db0a74910b7c7f500bd0ed063767e0 Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Tue Dec 31 00:26:34 2024 +0530 staging: gpib: pc2: Handle gpib_register_driver() errors The function gpib_register_driver() can fail, resulting in a semi-registered module and does not return an error value if it fails. Unregister the previous gpib registering functions if subsequent gpib_register_driver() fail and return the error value. Add pr_err() statements indicating the fail and error value. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-15-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/pc2/pc2_gpib.c | 38 +++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) commit 635ddb8ccdbde0d917b0a7448b0fd9d6cc27a2a9 Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Tue Dec 31 00:26:33 2024 +0530 staging: gpib: ni_usb: Handle gpib_register_driver() errors The usb_register() function can fail and returns an error value which is not returned. The function gpib_register_driver() can also fail which can result in semi-registered module. In case gpib_register_driver() fails unregister the previous usb driver registering function. Return the error value if gpib_register_driver() or usb_register() functions fail. Add pr_err() statements indicating the fail and error value. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-14-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/ni_usb/ni_usb_gpib.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit e3f4b64edb242ba59095b57f54df64ccecc67aac Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Tue Dec 31 00:26:32 2024 +0530 staging: gpib: lpvo_usb: Return error value from gpib_register_driver() The function gpib_register_driver() can fail and does not return an error value if it fails. Return the error value if gpib_register_driver() fails. Add pr_err() statement indicating the fail and error value. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-13-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 26098b787c3fd1de6ab40d26b6283c4a5e24543a Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Tue Dec 31 00:26:31 2024 +0530 staging: gpib: ines: Handle gpib_register_driver() errors The function ines_pcmcia_init_module() can be replaced by calling pcmcia_register_driver() directly. The error value from this function is not returned and the previous registering functions are not unregistered. The function gpib_register_driver() can fail and similar to pcmcia_register_driver() function failing, the previous registering functions are not unregistered. Replace cb_pcmcia_init_module() with pcmcia_register_driver(). Unregister the gpib and pci register functions if the subsequent gpib or pcmcia register functions fail and return the error value. Add pr_err() statements indicating the fail and error value. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-12-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/ines/ines_gpib.c | 94 +++++++++++++++++++++++++++-------- 1 file changed, 73 insertions(+), 21 deletions(-) commit 44aaeb2c0843ea37f6235c173d2e8f8df3be1704 Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Tue Dec 31 00:26:30 2024 +0530 staging: gpib: hp_82341: Handle gpib_register_driver() errors The function gpib_register_driver() can fail, resulting in a semi-registered module and does not return an error value if it fails. Return the error value if the first gpib_register_driver() fails and if the second gpib_register_driver() fails unregister the first gpib_register_driver() and return the error value. Add pr_err() statements indicating the fail and the error value. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-11-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/hp_82341/hp_82341.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 4e12a0928978451f92f6c10f71ef251a082acb3f Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Tue Dec 31 00:26:29 2024 +0530 staging: gpib: hp_82335: Return error value from gpib_register_driver() The function gpib_register_driver() can fail and does not return an error value if it fails. Return the error value if gpib_register_driver() fails. Add pr_err() statement indicating the fail and also the error value. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-10-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/hp_82335/hp82335.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 908ff8d49e725c6b29aa9fc2dbfd10fa87223492 Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Tue Dec 31 00:26:28 2024 +0530 staging: gpib: gpio: Return error value from gpib_register_driver() The function gpib_register_driver() can fail and does not return an error value if it fails. Return the error value if gpib_register_driver() fails. Add pr_err() statement indicating the fail and also the error value. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-9-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/gpio/gpib_bitbang.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 10ca8c3b51f7ad557fdd1953eaad8b5a91774ecd Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Tue Dec 31 00:26:27 2024 +0530 staging: gpib: fmh: Handle gpib_register_driver() errors The function gpib_register_driver() can fail, resulting in a semi-registered module and does not return an error value if it fails. Unregister the previous platform driver, pci and gpib registering functions if subsequent gpib_register_driver() fail and return the error value. Add pr_err() statements indicating the fail and also the error value. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-8-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/fmh_gpib/fmh_gpib.c | 47 ++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 8 deletions(-) commit cf95c0c4e06353e647520132bb90e1c2fea1ffb7 Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Tue Dec 31 00:26:26 2024 +0530 staging: gpib: fluke: Handle gpib_register_driver() errors The function gpib_register_driver() can fail, resulting in a semi-registered module and does not return an error value if it fails. Unregister the previous platform driver and gpib registering functions if subsequent gpib_register_driver() fail and return the error value. Add pr_err() statements indicating the fail and the error value. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-7-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/eastwood/fluke_gpib.c | 32 +++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) commit f07296bc75ba01bd260b8f805725b2217750b7e3 Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Tue Dec 31 00:26:25 2024 +0530 staging: gpib: cec: Handle gpib_register_driver() errors The function gpib_register_driver() can fail and result in a semi-registered module and does not return an error value if it fails. Unregister the pci registering function in case gpib_register_driver() fails and return the error value. Add pr_err() statements indicating the fail and also the error value. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-6-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/cec/cec_gpib.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 65aff9b75bbda0d9f71130d3be2f3f76db193966 Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Tue Dec 31 00:26:24 2024 +0530 staging: gpib: cb7210: Handle gpib_register_driver() errors The function cb_pcmcia_init_module() can be replaced by calling pcmcia_register_driver() directly. The error value from this function is not returned and the previous registering functions are not unregistered. The function gpib_register_driver() can fail and similar to pcmcia_register_driver() function failing, the previous registering functions are not unregistered. Replace cb_pcmcia_init_module() with pcmcia_register_driver(). Unregister the gpib and pci register functions if the subsequent gpib or pcmcia register functions fail and return the error value. Add pr_err() statements to indicate the fail and also the error value. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-5-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/cb7210/cb7210.c | 116 +++++++++++++++++++++++++++-------- 1 file changed, 90 insertions(+), 26 deletions(-) commit 9e43ebc613e2adb9b9e900e11a4099e104b61f2d Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Tue Dec 31 00:26:23 2024 +0530 staging: gpib: agilent_82357a: Handle gpib_register_driver() errors The usb_register() function can fail and returns an error value which is not returned. The function gpib_register_driver() can also fail which can result in semi-registered module. In case gpib_register_driver() fails unregister the previous usb driver registering function. Return the error value if gpib_register_driver() or usb_register() functions fail. Add pr_err when registering driver fails also indicating the error value. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-4-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/agilent_82357a/agilent_82357a.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit f546fa464031423be3dbebc966ad4703f985c9d5 Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Tue Dec 31 00:26:22 2024 +0530 staging: gpib: agilent_82350b: Handle gpib_register_driver() errors The function gpib_register_driver() can fail which can result in semi-registered module. In case gpib_register_driver() fails unregister the previous gpib and pci registering functions, return the error value. Add pr_err() when registering driver fails also indicate the error value. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-3-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> .../staging/gpib/agilent_82350b/agilent_82350b.c | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit e999bd2a897e7d70fa1fca6b80873529532322fe Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Tue Dec 31 00:26:21 2024 +0530 staging: gpib: Modify gpib_register_driver() to return error if it fails The function gpib_register_driver() can fail if kmalloc() fails, but it doesn't return any error if that happens. Modify the function to return error i.e int. Return the appropriate error code if it fails. Remove the pr_info() statement. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-2-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/common/gpib_os.c | 7 ++++--- drivers/staging/gpib/include/gpibP.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) commit 92c58adcee0f978d8e921718c79a1e5a92fa0967 Author: Rob Herring (Arm) <robh@kernel.org> Date: Fri Jan 3 15:24:48 2025 -0600 dt-bindings: memory-controller: qca,ath79-ddr-controller: Drop consumer from example Normal practice is examples only show what the binding document defines and doesn't include consumers in a provider example (or vice-versa). The "qca,ddr-wb-channel-interrupts" and "qca,ddr-wb-channels" properties are also not yet documented by a schema, so avoid (not yet enabled) warnings on them by dropping the interrupt-controller node from the example. Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20250103212448.2852884-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org> .../bindings/memory-controllers/qca,ath79-ddr-controller.yaml | 7 ------- 1 file changed, 7 deletions(-) commit 157660a581462912c70e267119e0549e25ad3bc0 Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Date: Fri Nov 11 13:01:49 2022 +0100 dt-bindings: sram: qcom,imem: Document MSM8976 Add compatible for MSM8976 IMEM. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20221111120156.48040-5-angelogioacchino.delregno@collabora.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Documentation/devicetree/bindings/sram/qcom,imem.yaml | 1 + 1 file changed, 1 insertion(+) commit fed79caaf76542cff6f9e62cfd40791ef09cf57a Author: Rayyan Ansari <rayyan.ansari@linaro.org> Date: Tue Jul 16 14:38:02 2024 +0100 dt-bindings: thermal: qcom-tsens: Document ipq6018 temperature sensor Document the ipq6018 temperature sensor, which is used in ipq6018.dtsi and is compatible with the ipq8074 temperature sensor. Signed-off-by: Rayyan Ansari <rayyan.ansari@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240716133803.82907-1-rayyan.ansari@linaro.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 1 + 1 file changed, 1 insertion(+) commit 715e36194d6a0c04b7b57f8085952a90f2415d76 Author: Jingyi Wang <quic_jingyw@quicinc.com> Date: Wed Sep 11 16:03:15 2024 +0800 dt-bindings: qcom,pdc: document QCS8300 Power Domain Controller Document Power Domain Controller for Qualcomm QCS8300. PDC is included in QCS8300 SoC. This controller acts as an interrupt controller, enabling the detection of interrupts when the GIC is non-operational. Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240911-qcs8300_binding-v2-1-de8641b3eaa1@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml | 1 + 1 file changed, 1 insertion(+) commit 9a3c545b61ca574868cf624b1fb7ed5d66e86bd3 Author: Lijuan Gao <quic_lijuang@quicinc.com> Date: Mon Nov 4 17:10:09 2024 +0800 dt-bindings: qcom,pdc: document QCS615 Power Domain Controller Add a compatible for the Power Domain Controller on QCS615 platform. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com> Link: https://lore.kernel.org/r/20241104-add_initial_support_for_qcs615-v5-2-9dde8d7b80b0@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml | 1 + 1 file changed, 1 insertion(+) commit fffe003fc209a3c1f3d07be7e860fed4e51c4c00 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Tue Jan 7 13:58:58 2025 +0100 ASoC: dt-bindings: 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 touching the lines do other non-functional changes: replace raw number with proper define for GPIO flag and use generic node name. No functional changes here, but saves some comments during reviews of new patches built on existing code. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250107125901.227995-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org> .../devicetree/bindings/sound/adi,ssm2518.yaml | 20 +++++++----- .../devicetree/bindings/sound/everest,es71x4.yaml | 10 +++--- .../devicetree/bindings/sound/everest,es7241.yaml | 19 ++++++----- .../devicetree/bindings/sound/fsl,easrc.yaml | 32 +++++++++--------- .../devicetree/bindings/sound/fsl,xcvr.yaml | 34 +++++++++---------- .../bindings/sound/intel,keembay-i2s.yaml | 32 +++++++++--------- .../bindings/sound/neofidelity,ntp8918.yaml | 26 ++++++++------- .../devicetree/bindings/sound/ti,pcm6240.yaml | 32 +++++++++--------- .../devicetree/bindings/sound/ti,tas2562.yaml | 30 +++++++++-------- .../devicetree/bindings/sound/ti,tas2770.yaml | 34 ++++++++++--------- .../devicetree/bindings/sound/ti,tas2781.yaml | 38 ++++++++++++---------- .../devicetree/bindings/sound/ti,tas27xx.yaml | 34 ++++++++++--------- .../devicetree/bindings/sound/ti,tas57xx.yaml | 36 ++++++++++---------- 13 files changed, 197 insertions(+), 180 deletions(-) commit c79a39dc8d060b9e64e8b0fa9d245d44befeefbe Author: Calvin Owens <calvin@wbinvd.org> Date: Mon Nov 11 20:13:29 2024 -0800 pps: Fix a use-after-free On a board running ntpd and gpsd, I'm seeing a consistent use-after-free in sys_exit() from gpsd when rebooting: pps pps1: removed ------------[ cut here ]------------ kobject: '(null)' (00000000db4bec24): is not initialized, yet kobject_put() is being called. WARNING: CPU: 2 PID: 440 at lib/kobject.c:734 kobject_put+0x120/0x150 CPU: 2 UID: 299 PID: 440 Comm: gpsd Not tainted 6.11.0-rc6-00308-gb31c44928842 #1 Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT) pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : kobject_put+0x120/0x150 lr : kobject_put+0x120/0x150 sp : ffffffc0803d3ae0 x29: ffffffc0803d3ae0 x28: ffffff8042dc9738 x27: 0000000000000001 x26: 0000000000000000 x25: ffffff8042dc9040 x24: ffffff8042dc9440 x23: ffffff80402a4620 x22: ffffff8042ef4bd0 x21: ffffff80405cb600 x20: 000000000008001b x19: ffffff8040b3b6e0 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 696e6920746f6e20 x14: 7369203a29343263 x13: 205d303434542020 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000 x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000 x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000 x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000 Call trace: kobject_put+0x120/0x150 cdev_put+0x20/0x3c __fput+0x2c4/0x2d8 ____fput+0x1c/0x38 task_work_run+0x70/0xfc do_exit+0x2a0/0x924 do_group_exit+0x34/0x90 get_signal+0x7fc/0x8c0 do_signal+0x128/0x13b4 do_notify_resume+0xdc/0x160 el0_svc+0xd4/0xf8 el0t_64_sync_handler+0x140/0x14c el0t_64_sync+0x190/0x194 ---[ end trace 0000000000000000 ]--- ...followed by more symptoms of corruption, with similar stacks: refcount_t: underflow; use-after-free. kernel BUG at lib/list_debug.c:62! Kernel panic - not syncing: Oops - BUG: Fatal exception This happens because pps_device_destruct() frees the pps_device with the embedded cdev immediately after calling cdev_del(), but, as the comment above cdev_del() notes, fops for previously opened cdevs are still callable even after cdev_del() returns. I think this bug has always been there: I can't explain why it suddenly started happening every time I reboot this particular board. In commit d953e0e837e6 ("pps: Fix a use-after free bug when unregistering a source."), George Spelvin suggested removing the embedded cdev. That seems like the simplest way to fix this, so I've implemented his suggestion, using __register_chrdev() with pps_idr becoming the source of truth for which minor corresponds to which device. But now that pps_idr defines userspace visibility instead of cdev_add(), we need to be sure the pps->dev refcount can't reach zero while userspace can still find it again. So, the idr_remove() call moves to pps_unregister_cdev(), and pps_idr now holds a reference to pps->dev. pps_core: source serial1 got cdev (251:1) <...> pps pps1: removed pps_core: unregistering pps1 pps_core: deallocating pps1 Fixes: d953e0e837e6 ("pps: Fix a use-after free bug when unregistering a source.") Cc: stable@vger.kernel.org Signed-off-by: Calvin Owens <calvin@wbinvd.org> Reviewed-by: Michal Schmidt <mschmidt@redhat.com> Link: https://lore.kernel.org/r/a17975fd5ae99385791929e563f72564edbcf28f.1731383727.git.calvin@wbinvd.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/pps/clients/pps-gpio.c | 4 +- drivers/pps/clients/pps-ktimer.c | 4 +- drivers/pps/clients/pps-ldisc.c | 6 +- drivers/pps/clients/pps_parport.c | 4 +- drivers/pps/kapi.c | 10 +-- drivers/pps/kc.c | 10 +-- drivers/pps/pps.c | 127 ++++++++++++++++++++------------------ drivers/ptp/ptp_ocp.c | 2 +- include/linux/pps_kernel.h | 3 +- 9 files changed, 87 insertions(+), 83 deletions(-) commit a1942da8a38717ddd9b4c132f59e1657c85c1432 Author: Ted Chen <znscnchen@gmail.com> Date: Sat Jan 4 16:38:46 2025 +0800 bridge: Make br_is_nd_neigh_msg() accept pointer to "const struct sk_buff" The skb_buff struct in br_is_nd_neigh_msg() is never modified. Mark it as const. Signed-off-by: Ted Chen <znscnchen@gmail.com> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/20250104083846.71612-1-znscnchen@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/bridge/br_arp_nd_proxy.c | 2 +- net/bridge/br_private.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3e35c3e725de97f7870ef414cd5d6de7945d4fe7 Author: Bibek Kumar Patro <quic_bibekkum@quicinc.com> Date: Thu Dec 12 20:44:02 2024 +0530 iommu/arm-smmu: Add ACTLR data and support for qcom_smmu_500 Add ACTLR data table for qcom_smmu_500 including corresponding data entry and set prefetch value by way of a list of compatible strings. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Bibek Kumar Patro <quic_bibekkum@quicinc.com> Link: https://lore.kernel.org/r/20241212151402.159102-6-quic_bibekkum@quicinc.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 9fe18d825a5854f1ed6d6f91b45190d3a20f9f23 Author: Bibek Kumar Patro <quic_bibekkum@quicinc.com> Date: Thu Dec 12 20:44:01 2024 +0530 iommu/arm-smmu: Introduce ACTLR custom prefetcher settings Currently in Qualcomm SoCs the default prefetch is set to 1 which allows the TLB to fetch just the next page table. MMU-500 features ACTLR register which is implementation defined and is used for Qualcomm SoCs to have a custom prefetch setting enabling TLB to prefetch the next set of page tables accordingly allowing for faster translations. ACTLR value is unique for each SMR (Stream matching register) and stored in a pre-populated table. This value is set to the register during context bank initialisation. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Bibek Kumar Patro <quic_bibekkum@quicinc.com> Link: https://lore.kernel.org/r/20241212151402.159102-5-quic_bibekkum@quicinc.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 33 ++++++++++++++++++++++++++++++ drivers/iommu/arm/arm-smmu/arm-smmu-qcom.h | 1 + 2 files changed, 34 insertions(+) commit 7f2ef1bfc758f0f206eac863ff8ee417d5bb1493 Author: Bibek Kumar Patro <quic_bibekkum@quicinc.com> Date: Thu Dec 12 20:44:00 2024 +0530 iommu/arm-smmu: Add support for PRR bit setup Add an adreno-smmu-priv interface for drm/msm to call into arm-smmu-qcom and initiate the "Partially Resident Region" (PRR) bit setup or reset sequence as per request. This will be used by GPU to setup the PRR bit and related configuration registers through adreno-smmu private interface instead of directly poking the smmu hardware. Suggested-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Bibek Kumar Patro <quic_bibekkum@quicinc.com> Link: https://lore.kernel.org/r/20241212151402.159102-4-quic_bibekkum@quicinc.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 52 ++++++++++++++++++++++++++++++ drivers/iommu/arm/arm-smmu/arm-smmu.h | 2 ++ include/linux/adreno-smmu-priv.h | 7 ++++ 3 files changed, 61 insertions(+) commit ac515df1091a3c1cec25ead4d842fbb4635f90cd Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Tue Jan 7 13:08:06 2025 +0100 ALSA: ens137x: Use str_on_off() helper in snd_ensoniq_proc_read() Remove hard-coded strings by using the str_on_off() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20250107120809.4393-1-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/ens1370.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 445d7a8ed90e1725d148f2ce0f87d3ef3dd5f7ff Author: Bibek Kumar Patro <quic_bibekkum@quicinc.com> Date: Thu Dec 12 20:43:59 2024 +0530 iommu/arm-smmu: Refactor qcom_smmu structure to include single pointer qcom_smmu_match_data is static and constant so refactor qcom_smmu to store single pointer to qcom_smmu_match_data instead of replicating multiple child members of the same and handle the further dereferences in the places that want them. Suggested-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Bibek Kumar Patro <quic_bibekkum@quicinc.com> Link: https://lore.kernel.org/r/20241212151402.159102-3-quic_bibekkum@quicinc.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c | 2 +- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 2 +- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit ef4144b1b47dba61ebf19b9567013afdba5225dd Author: Bibek Kumar Patro <quic_bibekkum@quicinc.com> Date: Thu Dec 12 20:43:58 2024 +0530 iommu/arm-smmu: Re-enable context caching in smmu reset operation Default MMU-500 reset operation disables context caching in prefetch buffer. It is however expected for context banks using the ACTLR register to retain their prefetch value during reset and runtime suspend. Add config 'ARM_SMMU_MMU_500_CPRE_ERRATA' to gate this errata workaround in default MMU-500 reset operation which defaults to 'Y' and provide option to disable workaround for context caching in prefetch buffer as and when needed. Suggested-by: Will Deacon <will@kernel.org> Signed-off-by: Bibek Kumar Patro <quic_bibekkum@quicinc.com> Link: https://lore.kernel.org/r/20241212151402.159102-2-quic_bibekkum@quicinc.com Signed-off-by: Will Deacon <will@kernel.org> Documentation/arch/arm64/silicon-errata.rst | 3 ++- drivers/iommu/Kconfig | 12 ++++++++++++ drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 5 +++-- 3 files changed, 17 insertions(+), 3 deletions(-) commit 04ced323ef70b89151f010f359be710357de2dac Merge: 2f4f8893e07a 00fb9823939e Author: Paolo Abeni <pabeni@redhat.com> Date: Tue Jan 7 13:45:58 2025 +0100 Merge branch 'dev-hold-per-netns-rtnl-in-register-netdev' Kuniyuki Iwashima says: ==================== dev: Hold per-netns RTNL in register_netdev(). Patch 1 adds rtnl_net_lock_killable() and Patch 2 uses it in register_netdev() and converts it and unregister_netdev() to per-netns RTNL. With this and the netdev notifier series [0], ASSERT_RTNL_NET() for NETDEV_REGISTER [1] wasn't fired on a simplest QEMU setup like e1000 + x86_64_defconfig + CONFIG_DEBUG_NET_SMALL_RTNL. [0]: https://lore.kernel.org/netdev/20250104063735.36945-1-kuniyu@amazon.com/ [1]: ---8<--- diff --git a/net/core/rtnl_net_debug.c b/net/core/rtnl_net_debug.c index f406045cbd0e..c0c30929002e 100644 --- a/net/core/rtnl_net_debug.c +++ b/net/core/rtnl_net_debug.c @@ -21,7 +21,6 @@ static int rtnl_net_debug_event(struct notifier_block *nb, case NETDEV_DOWN: case NETDEV_REBOOT: case NETDEV_CHANGE: - case NETDEV_REGISTER: case NETDEV_UNREGISTER: case NETDEV_CHANGEMTU: case NETDEV_CHANGEADDR: @@ -60,19 +59,10 @@ static int rtnl_net_debug_event(struct notifier_block *nb, ASSERT_RTNL(); break; - /* Once an event fully supports RTNL_NET, move it here - * and remove "if (0)" below. - * - * case NETDEV_XXX: - * ASSERT_RTNL_NET(net); - * break; - */ - } - - /* Just to avoid unused-variable error for dev and net. */ - if (0) + case NETDEV_REGISTER: ASSERT_RTNL_NET(net); + break; + } return NOTIFY_DONE; } ---8<--- ==================== Link: https://patch.msgid.link/20250104082149.48493-1-kuniyu@amazon.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> commit 00fb9823939ea39b553985b1b3f5377dc2386d63 Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Sat Jan 4 17:21:49 2025 +0900 dev: Hold per-netns RTNL in (un)?register_netdev(). Let's hold per-netns RTNL of dev_net(dev) in register_netdev() and unregister_netdev(). Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/core/dev.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 7bd72a4aa226c3ef752bcd6b33c54f6e85efcc60 Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Sat Jan 4 17:21:48 2025 +0900 rtnetlink: Add rtnl_net_lock_killable(). rtnl_lock_killable() is used only in register_netdev() and will be converted to per-netns RTNL. Let's unexport it and add the corresponding helper. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> include/linux/rtnetlink.h | 6 ++++++ net/core/rtnetlink.c | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) commit 2f4f8893e07a58073b250ca1f07163efdca87ba9 Author: Mohsin Bashir <mohsin.bashr@gmail.com> Date: Fri Jan 3 17:53:16 2025 -0800 eth: fbnic: update fbnic_poll return value In cases where the work done is less than the budget, `fbnic_poll` is returning 0. This affects the tracing of `napi_poll`. Following is a snippet of before and after result from `napi_poll` tracepoint. Instead, returning the work done improves the manual tracing. Before: @[10]: 1 ... @[64]: 208175 @[0]: 2128008 After: @[56]: 86 @[48]: 222 ... @[5]: 1885756 @[6]: 1933841 Signed-off-by: Mohsin Bashir <mohsin.bashr@gmail.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Link: https://patch.msgid.link/20250104015316.3192946-1-mohsin.bashr@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9c0036c1990da8d2dd33563e327e05a775fcf10 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Sat Jan 4 15:20:12 2025 +0100 soc: mediatek: mtk-devapc: Fix leaking IO map on driver remove Driver removal should fully clean up - unmap the memory. Fixes: 0890beb22618 ("soc: mediatek: add mt6779 devapc driver") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250104142012.115974-2-krzysztof.kozlowski@linaro.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> drivers/soc/mediatek/mtk-devapc.c | 1 + 1 file changed, 1 insertion(+) commit c0eb059a4575ed57f265d9883a5203799c19982c Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Sat Jan 4 15:20:11 2025 +0100 soc: mediatek: mtk-devapc: Fix leaking IO map on error paths Error paths of mtk_devapc_probe() should unmap the memory. Reported by Smatch: drivers/soc/mediatek/mtk-devapc.c:292 mtk_devapc_probe() warn: 'ctx->infra_base' from of_iomap() not released on lines: 277,281,286. Fixes: 0890beb22618 ("soc: mediatek: add mt6779 devapc driver") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250104142012.115974-1-krzysztof.kozlowski@linaro.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> drivers/soc/mediatek/mtk-devapc.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 7082a6dc84ebba9dbdf65727b5bc4af92a2d31d3 Author: Jianbo Liu <jianbol@nvidia.com> Date: Thu Dec 19 14:37:30 2024 +0200 net/mlx5e: Update TX ESN context for IPSec hardware offload ESN context must be synced between software and hardware for both RX and TX. As the call to xfrm_dev_state_advance_esn() is added for TX, this patch add the missing logic for TX. So the update is also checked on every packet sent, to see if need to trigger ESN update worker. Signed-off-by: Jianbo Liu <jianbol@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 40 ++++++++-------------- 1 file changed, 15 insertions(+), 25 deletions(-) commit 373b79af3a209e25e011c5980cb59ed3252fa2f0 Author: Jianbo Liu <jianbol@nvidia.com> Date: Thu Dec 19 14:37:29 2024 +0200 xfrm: Support ESN context update to hardware for TX Previously xfrm_dev_state_advance_esn() was added for RX only. But it's possible that ESN context also need to be synced to hardware for TX, so call it for outbound in this patch. Signed-off-by: Jianbo Liu <jianbol@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Documentation/networking/xfrm_device.rst | 3 ++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 3 +++ net/xfrm/xfrm_replay.c | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) commit 0fb0d360218129f00b76f13e30b86321b64e36f6 Author: Val Packett <val@packett.cool> Date: Wed Dec 25 16:26:21 2024 -0300 arm64: dts: mediatek: mt8516: add keypad node Add a keypad matrix node for the MT8516/MT8167 SoC. Signed-off-by: Val Packett <val@packett.cool> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241225192631.25017-4-val@packett.cool Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8516.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6139d9e9e397dc9711cf10f8f548a8f9da3b5323 Author: Val Packett <val@packett.cool> Date: Wed Dec 25 16:26:20 2024 -0300 arm64: dts: mediatek: add per-SoC compatibles for keypad nodes The mt6779-keypad binding specifies using a compatible for the actual SoC before the generic MT6779 one. Fixes: a8013418d35c ("arm64: dts: mediatek: mt8183: add keyboard node") Fixes: 6ff945376556 ("arm64: dts: mediatek: Initial mt8365-evk support") Signed-off-by: Val Packett <val@packett.cool> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241225192631.25017-3-val@packett.cool Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8183.dtsi | 3 ++- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 3b19239ad4201123a2bc05af5859f5d75a30a49e Author: Val Packett <val@packett.cool> Date: Wed Dec 25 16:26:19 2024 -0300 dt-bindings: mediatek,mt6779-keypad: add more compatibles Add compatibles for SoCs using this device (mt8183, mt8365, mt8516). Signed-off-by: Val Packett <val@packett.cool> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241225192631.25017-2-val@packett.cool Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 798e949b63e2ff05cca813e2de3eeb3f4bba470c Author: Sjoerd Simons <sjoerd@collabora.com> Date: Mon Jan 6 09:57:31 2025 +0100 arm64: dts: mediatek: mt8365-evk: Set ethernet alias Configure an the ethernet alias to match the ethernet controller (even if it's off by default). This allows e.g. u-boot to configure the mac address on boot properly Signed-off-by: Sjoerd Simons <sjoerd@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20250106085737.227622-1-sjoerd@collabora.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 1 + 1 file changed, 1 insertion(+) commit ce3dbc46d7e30a84b8e99c730e3172dd5efbf094 Author: Jason-JH.Lin <jason-jh.lin@mediatek.com> Date: Fri Dec 20 02:15:31 2024 +0800 dts: arm64: mediatek: mt8195: Remove MT8183 compatible for OVL The OVL hardware capabilities have changed starting from MT8195, making the MT8183 compatible no longer applicable. Therefore, it is necessary to remove the MT8183 compatible for OVL. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com> Fixes: b852ee68fd72 ("arm64: dts: mt8195: Add display node for vdosys0") Link: https://lore.kernel.org/r/20241219181531.4282-5-jason-jh.lin@mediatek.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8195.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a1a08590d371fc6327efc8b60d8bc1831f23fb4 Author: Jason-JH.Lin <jason-jh.lin@mediatek.com> Date: Fri Dec 20 02:15:30 2024 +0800 dts: arm64: mediatek: mt8188: Update OVL compatible from MT8183 to MT8195 The OVL hardware capabilities have changed starting from MT8195, making the MT8183 compatible no longer applicable. Therefore, it is necessary to update the OVL compatible from MT8183 to MT8195. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com> Fixes: 7075b21d1a8e ("arm64: dts: mediatek: mt8188: Add display nodes for vdosys0") Link: https://lore.kernel.org/r/20241219181531.4282-4-jason-jh.lin@mediatek.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8188.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5086c55a95bef952950732cf0fa20d16c3a5cf64 Author: Hsiao Chien Sung <shawn.sung@mediatek.com> Date: Fri Dec 20 02:15:29 2024 +0800 dt-bindings: display: mediatek: ovl: Modify rules for MT8195/MT8188 Modify rules for both MT8195 and MT8188. Hardware capabilities include color formats and AFBC are changed since MT8195, stop using the settings of MT8183. Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com> Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com> Acked-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> Link: https://lore.kernel.org/r/20241219181531.4282-3-jason-jh.lin@mediatek.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> .../devicetree/bindings/display/mediatek/mediatek,ovl.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 4726336c6b44693314b02e07925eabc2dea5e361 Author: Jason-JH.Lin <jason-jh.lin@mediatek.com> Date: Fri Dec 20 02:15:28 2024 +0800 dt-bindings: display: mediatek: ovl: Add compatible strings for MT8188 MDP3 Add compatible strings for the MDP3 OVL hardware components in MediaTek's MT8188 SoC and it is compatible with the existing MT8195 MDP OVL components. Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com> Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Acked-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241219181531.4282-2-jason-jh.lin@mediatek.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Documentation/devicetree/bindings/display/mediatek/mediatek,ovl.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 5c9f4bc4b6730d21b436085b302869f572695f0b Author: Chen-Yu Tsai <wenst@chromium.org> Date: Tue Dec 24 16:48:37 2024 +0800 dt-bindings: arm: mediatek: Drop MT8192 Chromebook variants that never shipped The Hayato rev5 sku2 and Spherion rev4 variants were designed in anticipation of shortages of the headphone codec. This never happened. As far as our records show: the variants were never produced or shipped, and no such devices were deployed to any lab. Drop them. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241224084839.2904335-1-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Documentation/devicetree/bindings/arm/mediatek.yaml | 11 ----------- 1 file changed, 11 deletions(-) commit 0cea8dcb58e2ad83cb8a5be57640b4ef30c133f8 Author: Chen-Yu Tsai <wenst@chromium.org> Date: Tue Dec 24 16:48:38 2024 +0800 arm64: dts: mediatek: mt8192: Drop Chromebook variants that never shipped The Hayato rev5 sku2 and Spherion rev4 variants were designed in anticipation of shortages of the headphone codec. This never happened. As far as our records show: the variants were never produced or shipped, and no such devices were deployed to any lab. Drop them. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://lore.kernel.org/r/20241224084839.2904335-2-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/Makefile | 2 - .../dts/mediatek/mt8192-asurada-hayato-r5-sku2.dts | 65 ------------------ .../dts/mediatek/mt8192-asurada-spherion-r4.dts | 78 ---------------------- 3 files changed, 145 deletions(-) commit 607cc6e9b5f10f5f41b1cca6efc5405272136013 Author: Frank Wunderlich <frank-w@public-files.de> Date: Fri Dec 20 17:38:36 2024 +0100 arm64: dts: mediatek: mt7988a-bpi-r4: Add proc-supply for cpus Add proc-supply property to cpus on Bananapi R4 board. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241220163838.114786-3-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 16 ++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 8 ++++---- 2 files changed, 20 insertions(+), 4 deletions(-) commit 285cbdd9f52526842986ecb77b8f35788299a5f8 Author: Frank Wunderlich <frank-w@public-files.de> Date: Fri Dec 20 17:38:35 2024 +0100 arm64: dts: mediatek: mt7988a-bpi-r4: Add MediaTek MT6682A/RT5190A PMIC Bananapi R4 Board contains a MT6682A pmic which is compatible to rt5190a. Add its node to the i2 controller. The BananaPi R4 board has a MediaTek MT6682A PMIC, a rebrand of the Richtek RT5190A chip, connected to the I2C0 bus. Add the relevant node and, while at it, also configure the regulators from this PMIC that are used on this board. Only Buck2/Buck3 voltage can be controlled by software. BUCK4 input is 5V from BUCK1 output, and the resistor (mapped to RP30/RP31 on BPI-R4) configures BUCK4 output to 1.8V. LDO input is 3.3V from 3.3VD, and the resistor (mapped to RP38/RP40 on BPI-R4) configures LDO output to 1.8V. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241220163838.114786-2-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> .../boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 8b74b1acba92fc64962b48a777317cf4ed2af9c5 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:36 2024 +0100 arm64: dts: mediatek: mt7988a-bpi-r4: Enable pcie Enable the pci controllers on BPI-R4. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-23-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> .../boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 20 ++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 8 ++++---- 2 files changed, 24 insertions(+), 4 deletions(-) commit 6c7ab311939c1187b591ef938c10fa33648743c9 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:35 2024 +0100 arm64: dts: mediatek: mt7988a-bpi-r4: Enable pwm Enable pwm on Bananapi R4 board. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-22-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 4 ++++ arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 85445d88d1f96d9d53b4571feeb0e97a466a0d59 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:34 2024 +0100 arm64: dts: mediatek: mt7988a-bpi-r4: Enable ssusb1 on bpi-r4 Enable usb on Bananapi R4 board. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-21-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 4 ++++ arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit b1e011c7b5800d256293d649fbf2335da2474704 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:33 2024 +0100 arm64: dts: mediatek: mt7988a-bpi-r4: Enable t-phy for ssusb1 Bananapi R4 uses t-phy for usb. Enable its node at board level. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-20-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 4 ++++ arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 572c02e687ba803bd17498218eaa21aeaebe3b97 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:32 2024 +0100 arm64: dts: mediatek: mt7988a-bpi-r4: Add PCA9545 I2C Mux Bananapi R4 uses an i2c multiplexer for SFP slots, rtc and eeprom. Add its node to the right i2c controller. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-19-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> .../boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit faf97571ae83a8db3eb74109275d217514d2b474 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:31 2024 +0100 arm64: dts: mediatek: mt7988a-bpi-r4: Enable I2C controllers Enable the I2C0, I2C2 controllers found on the BananaPi R4 board. Both controllers are not accessible from user and having fixed spare devices. I2C0 have a pmic connected, I2C2 is used with I2C-multiplexer for e.g. SFP cages. The missing I2C1 is connected to GPIO header which can have either GPIO mode or I2C mode. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-18-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 12 ++++++++++++ arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) commit 2f2f9a4a2bc647e397e74f276f02eb0b82de39e8 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:30 2024 +0100 arm64: dts: mediatek: mt7988a-bpi-r4: Add default UART stdout Add chosen node on Bananapi R4 board with stdout and default bootargs. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-17-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 54df2f1e0ad1ae1bd11d254143a3d66c1c83a0be Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:29 2024 +0100 arm64: dts: mediatek: mt7988a-bpi-r4: Enable serial0 debug uart Enable the debug uart on Bananapi R4 board. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-16-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 4 ++++ arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 3687df2792bee54a13b797d2897b6650028564f3 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:28 2024 +0100 arm64: dts: mediatek: mt7988a-bpi-r4: Add thermal configuration Add additional thermal trips to Bananapi R4 board. SoC only contains the critical trip. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-15-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> .../boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 714a80ced07ac495513153840169a0d3b107d294 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:27 2024 +0100 arm64: dts: mediatek: mt7988a-bpi-r4: Add dt overlays for sd + emmc Bananapi R4 can use the mmc controller either with sd card or the onboard emmc. The used device is selected through hardware-switches and probed in bootloader. Add devicetree overlays for both mmc configurations. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-14-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/Makefile | 3 ++ .../dts/mediatek/mt7988a-bananapi-bpi-r4-emmc.dtso | 33 ++++++++++++++++++++++ .../dts/mediatek/mt7988a-bananapi-bpi-r4-sd.dtso | 31 ++++++++++++++++++++ 3 files changed, 67 insertions(+) commit 6e647beeb22124c5407b06037caa2cc7556dc0c3 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:26 2024 +0100 arm64: dts: mediatek: mt7988a-bpi-r4: Add fixed regulators for 1v8 and 3v3 Add regulator nodes used for mmc to Bananapi R4 board. This board has 1 MMC controller used for SDMMC and eMMC where only one can be used at one time, selected by hardware switches. SD uses 3v3 for both supplies and emmc uses both regulators. So defining both regulators in board dts and referencing them in the dt overlay. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-13-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> .../boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 6a4601d80778e6ee6fde5412ee83e3e6c8f98453 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:25 2024 +0100 arm64: dts: mediatek: mt7988a-bpi-r4: Enable watchdog Enable the watchdog on Bananapi R4 board. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-12-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 4 ++++ 1 file changed, 4 insertions(+) commit fda61ffb3a40a87da97feb95d0315458120a8353 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:24 2024 +0100 arm64: dts: mediatek: mt7988: Add pcie nodes Add pcie controllers for mt7988. Reuse mt7986 compatible. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-11-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 152 ++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) commit f693e6ba55ae98eeb226d0bef0fd37fcae4435a3 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:23 2024 +0100 arm64: dts: mediatek: mt7988: Add t-phy for ssusb1 USB controller needs phys for working properly. On mt7988 ssusb0 uses a xs-phy, ssusb uses t-phy. For now add the t-phy for ssusb1. We can reuse the mt7986 compatible here. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-10-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 32c21f43147201a38bae30b7194d8528238a16d9 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:22 2024 +0100 arm64: dts: mediatek: mt7988: Disable usb controllers by default The controllers should be enabled at board level if used. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-9-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 343855d29b5c76e6d98a6539e2c087542298bb8c Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:21 2024 +0100 arm64: dts: mediatek: mt7988: Add CPU OPP table for clock scaling Add operating points defining frequency/voltages of cpu cores. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-8-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit b87cf19876c85e515a0ab28c957c30133c34fdc6 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:20 2024 +0100 arm64: dts: mediatek: mt7988: Add mcu-sys node for cpu In preparation for adding support for CPU DVFS and clock tables for it, add the MCUSYS clock controller node. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-7-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit e14b49db0087aa5d72f736d7306220ff2e3777f5 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:19 2024 +0100 arm64: dts: mediatek: mt7988: Add missing clock-div property for i2c I2C binding requires clock-div property. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Fixes: 660c230bf302 ("arm64: dts: mediatek: mt7988: add I2C controllers") Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-6-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit c26964fb5b6d395ddee624f6ced5891afabbccb2 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:18 2024 +0100 arm64: dts: mediatek: mt7988: Add thermal-zone Add basic thermal-zone node. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-5-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 6a47514804e0e9607568c32b55c57bb5edd10d13 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:17 2024 +0100 arm64: dts: mediatek: mt7988: Add lvts node Add Low Voltage Thermal Sensor (LVTS) node for mt7988 SoC. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-4-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 206994e3b636ae5ce39657f81e39f81ac874eb89 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:16 2024 +0100 arm64: dts: mediatek: mt7988: Add mmc support Add devicetree node for MMC controller. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-3-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 69b2d44b91504d837e3687fdbffc0b5ad66ebdb5 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 10:12:15 2024 +0100 arm64: dts: mediatek: mt7988: Add reserved memory Add memory range handled by ATF to not be touched by linux kernel. ATF is SoC specific and not board-specific so add it to mt7988.dtsi. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217091238.16032-2-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 1497f14d8bbc0a4631da3045861e97318e238746 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 09:54:30 2024 +0100 arm64: dts: mediatek: mt7988a-bpi-r4: Add pinctrl subnodes for bpi-r4 Add board specific pinctrl configurations on Bananapi R4. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217085435.9586-6-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> .../boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 189 +++++++++++++++++++++ 1 file changed, 189 insertions(+) commit 7d887c0c9f89310c43387425ccee9be10bf6c665 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 09:54:29 2024 +0100 arm64: dts: mediatek: mt7988: Add pinctrl support Add mt7988a pinctrl node. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241217085435.9586-5-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 54 +++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit a83678be5ea152dca98791956f7bf2a0e899e3ad Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Tue Jan 7 02:13:54 2025 +0100 ASoC: madera: Use str_enabled_disabled() helper function Remove hard-coded strings by using the str_enabled_disabled() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250107011355.2035-1-thorsten.blum@linux.dev Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/madera.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 097691b019f7bd0459bad9612ce1828dc5284bbc Merge: 912d6f669725 ef1ca9271313 Author: Paolo Abeni <pabeni@redhat.com> Date: Tue Jan 7 12:32:53 2025 +0100 Merge branch 'net-airoha-add-qdisc-offload-support' Lorenzo Bianconi says: ==================== net: airoha: Add Qdisc offload support Introduce support for ETS and HTB Qdisc offload available on the Airoha EN7581 ethernet controller. ==================== Link: https://patch.msgid.link/20250103-airoha-en7581-qdisc-offload-v1-0-608a23fa65d5@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com> commit ef1ca9271313b4ea7b03de69576aacef1e78f381 Author: Lorenzo Bianconi <lorenzo@kernel.org> Date: Fri Jan 3 13:17:05 2025 +0100 net: airoha: Add sched HTB offload support Introduce support for HTB Qdisc offload available in the Airoha EN7581 ethernet controller. EN7581 can offload only one level of HTB leafs. Each HTB leaf represents a QoS channel supported by EN7581 SoC. The typical use-case is creating a HTB leaf for QoS channel to rate limit the egress traffic and attach an ETS Qdisc to each HTB leaf in order to enforce traffic prioritization. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/ethernet/mediatek/airoha_eth.c | 288 ++++++++++++++++++++++++++++- 1 file changed, 287 insertions(+), 1 deletion(-) commit 20bf7d07c956e5c7a22d3076c599cbb7a6054917 Author: Lorenzo Bianconi <lorenzo@kernel.org> Date: Fri Jan 3 13:17:04 2025 +0100 net: airoha: Add sched ETS offload support Introduce support for ETS Qdisc offload available on the Airoha EN7581 ethernet controller. In order to be effective, ETS Qdisc must configured as leaf of a HTB Qdisc (HTB Qdisc offload will be added in the following patch). ETS Qdisc available on EN7581 ethernet controller supports at most 8 concurrent bands (QoS queues). We can enable an ETS Qdisc for each available QoS channel. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/ethernet/mediatek/airoha_eth.c | 196 ++++++++++++++++++++++++++++- 1 file changed, 195 insertions(+), 1 deletion(-) commit 2b288b81560b94958cd68bbe54673e55a1730c95 Author: Lorenzo Bianconi <lorenzo@kernel.org> Date: Fri Jan 3 13:17:03 2025 +0100 net: airoha: Introduce ndo_select_queue callback Airoha EN7581 SoC supports 32 Tx DMA rings used to feed packets to QoS channels. Each channels supports 8 QoS queues where the user can apply QoS scheduling policies. In a similar way, the user can configure hw rate shaping for each QoS channel. Introduce ndo_select_queue callback in order to select the tx queue based on QoS channel and QoS queue. In particular, for dsa device select QoS channel according to the dsa user port index, rely on port id otherwise. Select QoS queue based on the skb priority. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/ethernet/mediatek/airoha_eth.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit 5f795590380476f1c9b7ed0ac945c9b0269dc23a Author: Lorenzo Bianconi <lorenzo@kernel.org> Date: Fri Jan 3 13:17:02 2025 +0100 net: airoha: Enable Tx drop capability for each Tx DMA ring This is a preliminary patch in order to enable hw Qdisc offloading. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/ethernet/mediatek/airoha_eth.c | 4 ++++ 1 file changed, 4 insertions(+) commit c5aa327e10b194884a9c9001a751f6e4703bc3e3 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Wed Dec 11 10:25:09 2024 +0100 media: dt-bindings: trivial white-space and example cleanup Minor cleanups without funcitonal impact: - There should not be an empty blank line after SPDX tag, - Convention is to indent DTS examples in coding style with 2- or 4-space indentation (4 is preferred), - Drop unused labels in DTS examples. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../bindings/media/allwinner,sun50i-h6-vpu-g2.yaml | 1 - .../bindings/media/amlogic,meson-ir-tx.yaml | 1 - .../devicetree/bindings/media/amphion,vpu.yaml | 1 - .../devicetree/bindings/media/fsl,imx6ull-pxp.yaml | 1 - .../bindings/media/mediatek,vcodec-decoder.yaml | 1 - .../bindings/media/mediatek,vcodec-encoder.yaml | 1 - .../media/mediatek,vcodec-subdev-decoder.yaml | 1 - .../bindings/media/microchip,sama5d4-vdec.yaml | 19 +++++----- .../devicetree/bindings/media/nxp,imx8mq-vpu.yaml | 41 +++++++++++----------- .../bindings/media/qcom,msm8916-camss.yaml | 1 - .../bindings/media/qcom,msm8996-camss.yaml | 1 - .../bindings/media/qcom,sdm660-camss.yaml | 1 - .../bindings/media/qcom,sdm845-camss.yaml | 1 - .../bindings/media/qcom,sm8250-camss.yaml | 1 - .../bindings/media/rockchip,rk3568-vepu.yaml | 1 - .../devicetree/bindings/media/rockchip-vpu.yaml | 31 ++++++++-------- 16 files changed, 44 insertions(+), 60 deletions(-) commit 80aa73ef569f93af92803523667e824b64d07a73 Author: Lukas Bulwahn <lukas.bulwahn@redhat.com> Date: Fri Dec 13 07:00:11 2024 +0100 MAINTAINERS: repair file entry in MEDIA DRIVERS FOR STM32 - CSI Commit dcb0f4c16be5 ("media: stm32: csi: addition of the STM32 CSI driver") adds a new driver at drivers/media/platform/st/stm32/stm32-csi.c, but creates a new MAINTAINERS section MEDIA DRIVERS FOR STM32 - CSI with a file entry pointing to drivers/media/platform/stm32/stm32-csi.c. Note that the file entry is missing the ‘st’ directory in its path. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Repair this file entry in MEDIA DRIVERS FOR STM32 - CSI. Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com> Reviewed-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45ef22b6b58c347e72c0658132f7885a653f45e6 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 15 15:21:45 2024 +0100 media: solo6x10: Use const 'struct bin_attribute' callback The sysfs core now provides callback variants that explicitly take a const pointer. Use them so the non-const variants can be removed. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/pci/solo6x10/solo6x10-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db6efc57b086f5748405a9d1230f359cbac36e1d Author: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr> Date: Sat Dec 21 02:46:50 2024 +0100 media: saa7164: Remove unused values Coverity-IDs: 1269155, 1269156 Signed-off-by: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/pci/saa7164/saa7164-vbi.c | 2 -- 1 file changed, 2 deletions(-) commit 094f5c315f756b19198e6c401aa821ac0e868750 Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Tue Dec 24 12:54:11 2024 +0900 staging: media: imx: fix OF node leak in imx_media_add_of_subdevs() imx_media_add_of_subdevs() calls of_parse_phandle() and passes the obtained node to imx_media_of_add_csi(). The passed node is used in v4l2_async_nf_add_fwnode(), which increments the refcount of the node. Therefore, while the current implementation only releases the node when imx_media_of_add_csi() fails, but should always release it. Call of_node_put() right after imx_media_of_add_csi(). Fixes: dee747f88167 ("media: imx: Don't register IPU subdevs/links if CSI port missing") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/staging/media/imx/imx-media-of.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 9f2ce86a2c271b0ad4aa0af4a983fcadb1594c38 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 25 18:44:53 2024 +0000 media: platform: exynos4-is: Remove unused __is_get_frame_size The last use of __is_get_frame_size() was removed in 2013 by commit 5cfaad64d88a ("[media] exynos4-is: Fix format propagation on FIMC-IS-ISP subdev") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/samsung/exynos4-is/fimc-is-param.c | 9 --------- drivers/media/platform/samsung/exynos4-is/fimc-is-param.h | 1 - 2 files changed, 10 deletions(-) commit 1221989555db711578a327a9367f1be46500cb48 Author: Edward Adam Davis <eadavis@qq.com> Date: Sun Dec 29 18:50:39 2024 +0800 media: vidtv: Fix a null-ptr-deref in vidtv_mux_stop_thread syzbot report a null-ptr-deref in vidtv_mux_stop_thread. [1] If dvb->mux is not initialized successfully by vidtv_mux_init() in the vidtv_start_streaming(), it will trigger null pointer dereference about mux in vidtv_mux_stop_thread(). Adjust the timing of streaming initialization and check it before stopping it. [1] KASAN: null-ptr-deref in range [0x0000000000000128-0x000000000000012f] CPU: 0 UID: 0 PID: 5842 Comm: syz-executor248 Not tainted 6.13.0-rc4-syzkaller-00012-g9b2ffa6148b1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 RIP: 0010:vidtv_mux_stop_thread+0x26/0x80 drivers/media/test-drivers/vidtv/vidtv_mux.c:471 Code: 90 90 90 90 66 0f 1f 00 55 53 48 89 fb e8 82 2e c8 f9 48 8d bb 28 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 02 7e 3b 0f b6 ab 28 01 00 00 31 ff 89 ee e8 RSP: 0018:ffffc90003f2faa8 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff87cfb125 RDX: 0000000000000025 RSI: ffffffff87d120ce RDI: 0000000000000128 RBP: ffff888029b8d220 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000003 R12: ffff888029b8d188 R13: ffffffff8f590aa0 R14: ffffc9000581c5c8 R15: ffff888029a17710 FS: 00007f7eef5156c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7eef5e635c CR3: 0000000076ca6000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> vidtv_stop_streaming drivers/media/test-drivers/vidtv/vidtv_bridge.c:209 [inline] vidtv_stop_feed+0x151/0x250 drivers/media/test-drivers/vidtv/vidtv_bridge.c:252 dmx_section_feed_stop_filtering+0x90/0x160 drivers/media/dvb-core/dvb_demux.c:1000 dvb_dmxdev_feed_stop.isra.0+0x1ee/0x270 drivers/media/dvb-core/dmxdev.c:486 dvb_dmxdev_filter_stop+0x22a/0x3a0 drivers/media/dvb-core/dmxdev.c:559 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+0x3f8/0xb60 fs/file_table.c:450 task_work_run+0x14e/0x250 kernel/task_work.c:239 get_signal+0x1d3/0x2610 kernel/signal.c:2790 arch_do_signal_or_restart+0x90/0x7e0 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+0x150/0x2a0 kernel/entry/common.c:218 do_syscall_64+0xda/0x250 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Reported-by: syzbot+5e248227c80a3be8e96a@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=5e248227c80a3be8e96a Signed-off-by: Edward Adam Davis <eadavis@qq.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/test-drivers/vidtv/vidtv_bridge.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit fbb5298bf1a7b71723cd2bb193642429ceb0fb84 Author: Lubomir Rintel <lkundrak@v3.sk> Date: Tue Dec 31 20:04:34 2024 +0100 media: mmp: Bring back registration of the device In commit 4af65141e38e ("media: marvell: cafe: Register V4L2 device earlier"), a call to v4l2_device_register() was moved away from mccic_register() into its caller, marvell/cafe's cafe_pci_probe(). This is not the only caller though -- there's also marvell/mmp. Add v4l2_device_register() into mmpcam_probe() to unbreak the MMP camera driver, in a fashion analogous to what's been done to the Cafe driver. Same for the teardown path. Fixes: 4af65141e38e ("media: marvell: cafe: Register V4L2 device earlier") Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Cc: stable@vger.kernel.org # v6.6+ Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/marvell/mmp-driver.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit d76bf5267a6bcf25b95dfa1e71da0d3af3435682 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Dec 17 12:00:24 2024 +0200 media: cec: include linux/debugfs.h and linux/seq_file.h where needed Having cec.h include linux/debugfs.h leads to all users of all cec headers include and depend on debugfs.h and its dependencies for no reason. Drop the include from cec.h, and include debugfs.h and seq_file.h where needed. Sort all the modified include lists while at it. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/cec/core/cec-adap.c | 5 +++-- drivers/media/cec/core/cec-core.c | 5 +++-- drivers/media/cec/core/cec-pin-error-inj.c | 3 ++- drivers/media/cec/core/cec-pin.c | 3 ++- drivers/media/cec/platform/cec-gpio/cec-gpio.c | 7 ++++--- include/media/cec.h | 1 - 6 files changed, 14 insertions(+), 10 deletions(-) commit 9229b53f9758c74cda145489cece0cd885b65877 Author: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Date: Sun Dec 15 00:33:58 2024 +0000 Revert "media: qcom: camss: Restructure camss_link_entities" This reverts commit cc1ecabe67d92a2da0b0402f715598e8dbdc3b9e. This commit has a basic flaw in that it relies on camss->res->csid_num as a control to index the array camss->vfe[i]. Testing on a platform where csid_num > vfe_num showed this bug up. camss->vfe should only be indexed by camss->res->vfe_num. Since this commit is meant to make the code be more readable reverting will simply restore the previous correct bounds checking. We can make another pass at making camss_link_entities look prettier but, for now we should zap the bug introduced. Fixes: cc1ecabe67d9 ("media: qcom: camss: Restructure camss_link_entities") Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/qcom/camss/camss.c | 155 ++++++++++-------------------- 1 file changed, 52 insertions(+), 103 deletions(-) commit 4a495b97b273fee77a8d77c579ebdd0d0d77f87c Author: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Date: Sat Dec 28 17:01:00 2024 +0200 tty: n_gsm: Fix control dlci ADM mode processing Currently, code retries n2 times to open control dlci in ABM mode before switching to ADM mode, but only if DM has been received. This contradicts to the comment that dlci is switched to control mode unconditionally if DLCI_OPENING retries time out. Also, it does not make sense to continue trying once DM has received. Change the logic to switch to ADM mode upon DM received. That way control channel state will change to DLCI_OPEN way faster. Fix the misleading comment while at it. Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20241228150100.100354-3-ivo.g.dimitrov.75@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/n_gsm.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e2e4025bc5461258a48cb331107c5b55b3c787d3 Author: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Date: Sat Dec 28 17:00:59 2024 +0200 tty: n_gsm: wait until channel 0 is ready Currently code does not wait for channel 0 open sequence to complete before pushing data to the other channels. Also, if userland opens tty, it will receive EL2NSYNC. Both issues result in hard to predict initialization sequence and possible userland failures. Fix that by waiting channel 0 open sequence to complete before attempting opening of the other channels. Also, if tty open() is attempted while channel 0 is opening, wait until sequence is complete before returning to userland. Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20241228150100.100354-2-ivo.g.dimitrov.75@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/n_gsm.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) commit d78a89990986a4d7d34313d3f58f8596b8ae1222 Author: Sherry Sun <sherry.sun@nxp.com> Date: Tue Jan 7 15:48:34 2025 +0800 tty: serial: fsl_lpuart: flush RX and TX FIFO when lpuart shutdown Need to flush UART RX and TX FIFO when lpuart is shutting down to make sure restore a clean data transfer environment. Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Link: https://lore.kernel.org/r/20250107074834.3115230-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/fsl_lpuart.c | 5 +++++ 1 file changed, 5 insertions(+) commit 79d65fda55cf1a6dac96a69913cd2294a3d8948a Author: Sherry Sun <sherry.sun@nxp.com> Date: Fri Jan 3 15:11:54 2025 +0800 tty: serial: fsl_lpuart: increase maximum uart_nr to 12 Some SoCs like the i.MX943 have aliases for up to 12 UARTs, need to increase UART_NR from 8 to 12 to support lpuart9-12 to avoid initialization failures. Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Link: https://lore.kernel.org/r/20250103071154.3070924-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/fsl_lpuart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 893930143440eb5e3ea8f69cb51ab2e61e15c4e1 Author: Ard Biesheuvel <ardb@kernel.org> Date: Mon Jan 6 16:57:46 2025 +0100 x86/sev: Don't hang but terminate on failure to remap SVSM CA Commit 09d35045cd0f ("x86/sev: Avoid WARN()s and panic()s in early boot code") replaced a panic() that could potentially hit before the kernel is even mapped with a deadloop, to ensure that execution does not proceed when the condition in question hits. As Tom suggests, it is better to terminate and return to the hypervisor in this case, using a newly invented failure code to describe the failure condition. Suggested-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Link: https://lore.kernel.org/all/9ce88603-20ca-e644-2d8a-aeeaf79cde69@amd.com arch/x86/coco/sev/core.c | 4 ++-- arch/x86/include/asm/sev-common.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) commit e1a51c2bf4b3b20868a0e6e9520b11639bd363f1 Author: Danilo Krummrich <dakr@kernel.org> Date: Fri Jan 3 17:46:03 2025 +0100 rust: driver: address soundness issue in `RegistrationOps` The `RegistrationOps` trait holds some obligations to the caller and implementers. While being documented, the trait and the corresponding functions haven't been marked as unsafe. Hence, markt the trait and functions unsafe and add the corresponding safety comments. This patch does not include any fuctional changes. Reported-by: Gary Guo <gary@garyguo.net> Closes: https://lore.kernel.org/rust-for-linux/20241224195821.3b43302b.gary@garyguo.net/ Signed-off-by: Danilo Krummrich <dakr@kernel.org> Reviewed-by: Gary Guo <gary@garyguo.net> Link: https://lore.kernel.org/r/20250103164655.96590-4-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> rust/kernel/driver.rs | 25 ++++++++++++++++++++----- rust/kernel/pci.rs | 8 +++++--- rust/kernel/platform.rs | 8 +++++--- 3 files changed, 30 insertions(+), 11 deletions(-) commit 9b880189327b9727640147253f3236ec5b3f704f Author: Danilo Krummrich <dakr@kernel.org> Date: Fri Jan 3 17:46:02 2025 +0100 rust: io: move module entry to its correct location The module entry of `io` falsely ended up in the "use" block instead of the "mod" block, hence move it to its correct location. Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20250103164655.96590-3-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> rust/kernel/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e16820fe538e1d36a3bc5aab42f7d2c9d14d0fe Author: Danilo Krummrich <dakr@kernel.org> Date: Fri Jan 3 17:46:01 2025 +0100 rust: pci: do not depend on CONFIG_PCI_MSI The PCI abstractions do not actually depend on CONFIG_PCI_MSI; it also breaks drivers that only depend on CONFIG_PCI, hence drop it. While at it, move the module entry to its correct location. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202501030744.4ucqC1cB-lkp@intel.com/ Fixes: 1bd8b6b2c5d3 ("rust: pci: add basic PCI device / driver abstractions") Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20250103164655.96590-2-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> rust/kernel/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 912d6f6697251b0024e56ed24b7873b4800822e7 Author: Willem de Bruijn <willemb@google.com> Date: Fri Jan 3 06:31:14 2025 -0500 selftests/net: packetdrill: report benign debug flakes as xfail A few recently added packetdrill tests that are known time sensitive (e.g., because testing timestamping) occasionally fail in debug mode: https://netdev.bots.linux.dev/contest.html?executor=vmksft-packetdrill-dbg These failures are well understood. Correctness of the tests is verified in non-debug mode. Continue running in debug mode also, to keep coverage with debug instrumentation. But, only in debug mode, mark these tests with well understood timing issues as XFAIL (known failing) rather than FAIL when failing. Introduce an allow list xfail_list with known cases. Expand the ktap infrastructure with XFAIL support. Fixes: eab35989cc37 ("selftests/net: packetdrill: import tcp/fast_recovery, tcp/nagle, tcp/timestamping") Reported-by: Jakub Kicinski <kuba@kernel.org> Closes: https://lore.kernel.org/netdev/20241218100013.0c698629@kernel.org/ Signed-off-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20250103113142.129251-1-willemdebruijn.kernel@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> tools/testing/selftests/kselftest/ktap_helpers.sh | 15 ++++++++++++-- .../selftests/net/packetdrill/ksft_runner.sh | 23 +++++++++++++++++----- 2 files changed, 31 insertions(+), 7 deletions(-) commit 1e0b23b5d2d18b2bd2c66d8214072d700a8c350d Author: Nikunj A Dadhania <nikunj@amd.com> Date: Mon Jan 6 18:16:24 2025 +0530 x86/sev: Relocate SNP guest messaging routines to common code At present, the SEV guest driver exclusively handles SNP guest messaging. All routines for sending guest messages are embedded within it. To support Secure TSC, SEV-SNP guests must communicate with the AMD Security Processor during early boot. However, these guest messaging functions are not accessible during early boot since they are currently part of the guest driver. Hence, relocate the core SNP guest messaging functions to SEV common code and provide an API for sending SNP guest messages. No functional change, but just an export symbol added for snp_send_guest_request() and dropped the export symbol on snp_issue_guest_request() and made it static. Signed-off-by: Nikunj A Dadhania <nikunj@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Link: https://lore.kernel.org/r/20250106124633.1418972-5-nikunj@amd.com arch/x86/coco/sev/core.c | 294 +++++++++++++++++++++++++++++++- arch/x86/include/asm/sev.h | 14 +- drivers/virt/coco/sev-guest/sev-guest.c | 292 ------------------------------- 3 files changed, 298 insertions(+), 302 deletions(-) commit 51cfbed198ca4aa140babde816387db0e71f09e7 Author: Furong Xu <0x1207@gmail.com> Date: Fri Jan 3 17:37:33 2025 +0800 net: stmmac: Set dma_sync_size to zero for discarded frames If a frame is going to be discarded by driver, this frame is never touched by driver and the cache lines never become dirty obviously, page_pool_recycle_direct() wastes CPU cycles on unnecessary calling of page_pool_dma_sync_for_device() to sync entire frame. page_pool_put_page() with sync_size setting to 0 is the proper method. Signed-off-by: Furong Xu <0x1207@gmail.com> Link: https://patch.msgid.link/20250103093733.3872939-1-0x1207@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5529418d05079384af4dbbb6f6156344c2ffce2 Author: Nikunj A Dadhania <nikunj@amd.com> Date: Mon Jan 6 18:16:23 2025 +0530 x86/sev: Carve out and export SNP guest messaging init routines Currently, the sev-guest driver is the only user of SNP guest messaging. All routines for initializing SNP guest messaging are implemented within the sev-guest driver and are not available during early boot. In preparation for adding Secure TSC guest support, carve out APIs to allocate and initialize the guest messaging descriptor context and make it part of coco/sev/core.c. As there is no user of sev_guest_platform_data anymore, remove the structure. Signed-off-by: Nikunj A Dadhania <nikunj@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Link: https://lore.kernel.org/r/20250106124633.1418972-4-nikunj@amd.com arch/x86/Kconfig | 1 + arch/x86/coco/sev/core.c | 183 +++++++++++++++++++++++++++++-- arch/x86/include/asm/sev.h | 13 ++- drivers/virt/coco/sev-guest/Kconfig | 1 - drivers/virt/coco/sev-guest/sev-guest.c | 185 ++++---------------------------- 5 files changed, 208 insertions(+), 175 deletions(-) commit 864884a0c29cc610a859b5210158112fd8675fe1 Author: Nikunj A Dadhania <nikunj@amd.com> Date: Mon Jan 6 18:16:22 2025 +0530 virt: sev-guest: Replace GFP_KERNEL_ACCOUNT with GFP_KERNEL Replace GFP_KERNEL_ACCOUNT with GFP_KERNEL in the sev-guest driver code. GFP_KERNEL_ACCOUNT is typically used for accounting untrusted userspace allocations. After auditing the sev-guest code, the following changes are necessary: * snp_init_crypto(): Use GFP_KERNEL as this is a trusted device probe path. Retain GFP_KERNEL_ACCOUNT in the following cases for robustness and specific path requirements: * alloc_shared_pages(): Although all allocations are limited, retain GFP_KERNEL_ACCOUNT for future robustness. * get_report() and get_ext_report(): These functions are on the unlocked ioctl path and should continue using GFP_KERNEL_ACCOUNT. Suggested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Nikunj A Dadhania <nikunj@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20250106124633.1418972-3-nikunj@amd.com drivers/virt/coco/sev-guest/sev-guest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1aa46c83bc4cd08a519819233f432a0fce5119b Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:54:43 2024 +0100 s390/pkey: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Tested-by: Holger Dengler <dengler@linux.ibm.com> Reviewed-by: Holger Dengler <dengler@linux.ibm.com> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-s390-v1-5-be01f66bfcf7@weissschuh.net Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> drivers/s390/crypto/pkey_sysfs.c | 128 +++++++++++++++++++-------------------- 1 file changed, 64 insertions(+), 64 deletions(-) commit 81ad38a66bdfcf51153632deaad305adce887fca Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:54:42 2024 +0100 s390/sclp: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-s390-v1-4-be01f66bfcf7@weissschuh.net Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> drivers/s390/char/sclp_config.c | 4 ++-- drivers/s390/char/sclp_sd.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit ef37c669b71e67bfe948e5f33f7ea040df08eddd Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:54:41 2024 +0100 s390/pci: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-s390-v1-3-be01f66bfcf7@weissschuh.net Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/pci/pci_sysfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 77977da798c0f97de649c5430bf721a02cb45fcc Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:54:40 2024 +0100 s390/ipl: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-s390-v1-2-be01f66bfcf7@weissschuh.net Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/kernel/ipl.c | 142 ++++++++++++++++++++++++------------------------- 1 file changed, 71 insertions(+), 71 deletions(-) commit 221ce94b1ac56bacde9c55409080838c1b575d3b Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:54:39 2024 +0100 s390/crypto/cpacf: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Tested-by: Finn Callies <fcallies@linux.ibm.com> Reviewed-by: Holger Dengler <dengler@linux.ibm.com> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-s390-v1-1-be01f66bfcf7@weissschuh.net Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/kernel/cpacf.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit baad97ed29be7280aca21ae6ea5d482983336e15 Author: Animesh Manna <animesh.manna@intel.com> Date: Mon Jan 6 15:14:08 2025 +0530 drm/i915/display: Adjust Added Wake Time with PKG_C_LATENCY Increase the PKG_C_LATENCY Pkg C Latency field by the added wake time. v1: Initial version. v2: Rebase and cosmetic changes. v3: - Place latency adjustment early to accommodate round-up. [Suraj] - Modify commit description and cosmetic change. [Suraj] WA: 22020432604 Cc: Suraj Kandpal <suraj.kandpal@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250106094408.1011063-1-animesh.manna@intel.com drivers/gpu/drm/i915/display/skl_watermark.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit acf5d49aaf862333a7139adff52a6b153af2853a Author: Zhenzhong Duan <zhenzhong.duan@intel.com> Date: Tue Jan 7 10:17:46 2025 +0800 iommu/vt-d: Link cache tags of same iommu unit together Cache tag invalidation requests for a domain are accumulated until a different iommu unit is found when traversing the cache_tags linked list. But cache tags of same iommu unit can be distributed in the linked list, this make batched flush less efficient. E.g., one device backed by iommu0 is attached to a domain in between two devices attaching backed by iommu1. Group cache tags together for same iommu unit in cache_tag_assign() to maximize the performance of batched flush. Co-developed-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/r/20241219054358.8654-1-zhenzhong.duan@intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/intel/cache.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit cf08ca81d08a04b3b304e8fb4e052f323a09783d Author: Lu Baolu <baolu.lu@linux.intel.com> Date: Tue Jan 7 10:17:45 2025 +0800 iommu/vt-d: Draining PRQ in sva unbind path when FPD bit set When a device uses a PASID for SVA (Shared Virtual Address), it's possible that the PASID entry is marked as non-present and FPD bit set before the device flushes all ongoing DMA requests and removes the SVA domain. This can occur when an exception happens and the process terminates before the device driver stops DMA and calls the iommu driver to unbind the PASID. There's no need to drain the PRQ in the mm release path. Instead, the PRQ will be drained in the SVA unbind path. But in such case, intel_pasid_tear_down_entry() only checks the presence of the pasid entry and returns directly. Add the code to clear the FPD bit and drain the PRQ. Fixes: c43e1ccdebf2 ("iommu/vt-d: Drain PRQs when domain removed from RID") Suggested-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Link: https://lore.kernel.org/r/20241217024240.139615-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/intel/pasid.c | 22 +++++++++++++++++++++- drivers/iommu/intel/pasid.h | 6 ++++++ 2 files changed, 27 insertions(+), 1 deletion(-) commit c2206299401b23bed9ef87f561d6f85f9351aa84 Author: Lu Baolu <baolu.lu@linux.intel.com> Date: Tue Jan 7 10:17:44 2025 +0800 iommu/vt-d: Remove iommu cap audit The capability audit code was introduced by commit <ad3d19029979> "iommu/vt-d: Audit IOMMU Capabilities and add helper functions", aiming to verify the consistency of capabilities across all IOMMUs for supported features. Nowadays, all the kAPIs of the iommu subsystem have evolved to be device oriented, in preparation for supporting heterogeneous IOMMU architectures. There is no longer a need to require capability consistence among IOMMUs for any feature. Remove the iommu cap audit code to make the driver align with the design in the iommu core. Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Link: https://lore.kernel.org/r/20241216071828.22962-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/intel/Makefile | 2 +- drivers/iommu/intel/cap_audit.c | 217 ------------------------------------ drivers/iommu/intel/cap_audit.h | 131 ---------------------- drivers/iommu/intel/iommu.c | 9 -- drivers/iommu/intel/irq_remapping.c | 8 -- 5 files changed, 1 insertion(+), 366 deletions(-) commit de1dda7e0b60c52204c623f288021b2a22636126 Author: Jason Gunthorpe <jgg@ziepe.ca> Date: Tue Jan 7 10:17:43 2025 +0800 iommu/vt-d: Remove domain_alloc_paging() This is duplicated by intel_iommu_domain_alloc_paging_flags(), just remove it. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Yi Liu <yi.l.liu@intel.com> Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com> Link: https://lore.kernel.org/r/0-v1-b101d00c5ee5+17645-vtd_paging_flags_jgg@nvidia.com Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/intel/iommu.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 60f030f7418d3f1d94f2fb207fe3080e1844630b Author: Kees Bakker <kees@ijzerbout.nl> Date: Tue Jan 7 10:17:42 2025 +0800 iommu/vt-d: Avoid use of NULL after WARN_ON_ONCE There is a WARN_ON_ONCE to catch an unlikely situation when domain_remove_dev_pasid can't find the `pasid`. In case it nevertheless happens we must avoid using a NULL pointer. Signed-off-by: Kees Bakker <kees@ijzerbout.nl> Link: https://lore.kernel.org/r/20241218201048.E544818E57E@bout3.ijzerbout.nl Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/intel/iommu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8234177d2027e52126e40472fe5807f4e94b19a3 Author: Nikunj A Dadhania <nikunj@amd.com> Date: Mon Jan 6 18:16:21 2025 +0530 virt: sev-guest: Remove is_vmpck_empty() helper Remove is_vmpck_empty() which uses a local array allocation to check if the VMPCK is empty and replace it with memchr_inv() to directly determine if the VMPCK is empty without additional memory allocation. [ bp: Massage commit message. ] Suggested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Nikunj A Dadhania <nikunj@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20250106124633.1418972-2-nikunj@amd.com drivers/virt/coco/sev-guest/sev-guest.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 939bc3e4d996ba2eebc5a9d8a8cf785cd17b1f93 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Fri Jan 3 08:44:24 2025 +0530 drm/i915/dp: Return early if dsc is required but not supported Currently, when bandwidth is insufficient for a given mode, we attempt to use DSC. This is indicated by a debug print, followed by a check for DSC support. The debug message states that we are trying DSC, but DSC might not be supported, which can give an incorrect picture in the logs if we bail out later. Correct the order for both DP and DP MST to: - Check if DSC is required and supported, and return early if DSC is not supported. - Print a debug message to indicate that DSC will be tried next. Suggested-by: Jani Nikula <jani.nikula@linux.intel.com> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250103031424.1732774-1-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 8 +++++--- drivers/gpu/drm/i915/display/intel_dp_mst.c | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) commit f69ccbc50a12417c74ddf891d3958ddf609f171c Author: Chin-Yen Lee <timlee@realtek.com> Date: Wed Dec 25 20:28:04 2024 +0800 wifi: rtw89: pci: disable PCI completion timeout control Realtek's chips follow suggestion of PCIe spec to design the max timeout of PCI completion, but some PCIe host reply too slow to meet it and lead PCI AER. Disable PCI completion timeout function via PCI configuration to avoid the AER. Signed-off-by: Chin-Yen Lee <timlee@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241225122804.10214-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/pci.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1d38eb7f7b26261a0b642f6e0923269c7c000a97 Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Tue Jan 7 14:44:53 2025 +0900 OPP: OF: Fix an OF node leak in _opp_add_static_v2() _opp_add_static_v2() leaks the obtained OF node reference when _of_opp_alloc_required_opps() fails. Add an of_node_put() call in the error path. Fixes: 3466ea2cd6b6 ("OPP: Don't drop opp->np reference while it is still in use") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/opp/of.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a80d1ad44487eb2e1e5a71cd7a2d1ccf8200d091 Author: Ninad Palsule <ninad@linux.ibm.com> Date: Tue Dec 17 11:35:35 2024 -0600 ARM: dts: aspeed: system1: Use crps PSU driver The system1 uses Intel common redundant (crps185) power supplies so move to correct new crps driver. Signed-off-by: Ninad Palsule <ninad@linux.ibm.com> Link: https://patch.msgid.link/20241217173537.192331-5-ninad@linux.ibm.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a045a189f425e073ea5d6427ee66252eb990ed92 Author: John Audia <therealgraysky@proton.me> Date: Wed Jan 1 08:27:59 2025 -0500 hwmon: (nct6683) Add another customer ID for MSI The new customer ID was found on a MPG X870E CARBON WIFI (MS-7E49) with a NCT6687D chip. Signed-off-by: John Audia <therealgraysky@proton.me> [groeck: Resolved conflicts in Documentation/hwmon/nct6683.rst] Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/hwmon/nct6683.rst | 1 + drivers/hwmon/nct6683.c | 3 +++ 2 files changed, 4 insertions(+) commit 46c61cbeb82f8a4e6354a692d2be1a35cb0bde29 Author: Mykyta Yatsenko <yatsenko@meta.com> Date: Mon Jan 6 14:43:21 2025 +0000 selftests/bpf: Handle prog/attach type comparison in veristat Implemented handling of prog type and attach type stats comparison in veristat. To test this change: ``` ./veristat pyperf600.bpf.o -o csv > base1.csv ./veristat pyperf600.bpf.o -o csv > base2.csv ./veristat -C base2.csv base1.csv -o csv ...,raw_tracepoint,raw_tracepoint,MATCH, ...,cgroup_inet_ingress,cgroup_inet_ingress,MATCH ``` Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Tested-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/bpf/20250106144321.32337-1-mykyta.yatsenko5@gmail.com tools/testing/selftests/bpf/veristat.c | 37 ++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) commit 49afc040f4d707a4149a05180edc42bc590641a4 Author: Nihar Chaithanya <niharchaithanya@gmail.com> Date: Sat Jan 4 22:49:15 2025 +0530 octeontx2-pf: mcs: Remove dead code and semi-colon from rsrc_name() Every case in the switch-block ends with return statement, and the default: branch handles the cases where rsrc_type is invalid and returns "Unknown", this makes the return statement at the end of the function unreachable and redundant. The semi-colon is not required after the switch-block's curly braces. Remove the semi-colon after the switch-block's curly braces and the return statement at the end of the function. This issue was reported by Coverity Scan. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://patch.msgid.link/20250104171905.13293-1-niharchaithanya@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 21a8a77abb4c5b472072a2f695f89a98c8af1654 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Sat Jan 4 15:20:43 2025 +0100 nfc: st21nfca: Drop unneeded null check in st21nfca_tx_work() Variable 'info' is obtained via container_of() of struct work_struct, so it cannot be NULL. Simplify the code and solve Smatch warning: drivers/nfc/st21nfca/dep.c:119 st21nfca_tx_work() warn: can 'info' even be NULL? Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250104142043.116045-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/nfc/st21nfca/dep.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit a4332f6c791e1d70bf025ac51afa968607b9812b Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Mon Dec 9 15:27:59 2024 +0100 firmware: qcom: scm: smc: Narrow 'mempool' variable scope Only part of the __scm_smc_call() function uses 'mempool' variable, so narrow the scope to make it more readable. Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241209-qcom-scm-missing-barriers-and-all-sort-of-srap-v2-6-9061013c8d92@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/firmware/qcom/qcom_scm-smc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 94f48ecf0a538019ca2025e0b0da391f8e7cc58c Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Mon Dec 9 15:27:58 2024 +0100 firmware: qcom: scm: smc: Handle missing SCM device Commit ca61d6836e6f ("firmware: qcom: scm: fix a NULL-pointer dereference") makes it explicit that qcom_scm_get_tzmem_pool() can return NULL, therefore its users should handle this. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20241209-qcom-scm-missing-barriers-and-all-sort-of-srap-v2-5-9061013c8d92@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/firmware/qcom/qcom_scm-smc.c | 3 +++ 1 file changed, 3 insertions(+) commit 1e76b546e6fca7eb568161f408133904ca6bcf4f Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Mon Dec 9 15:27:57 2024 +0100 firmware: qcom: scm: Cleanup global '__scm' on probe failures If SCM driver fails the probe, it should not leave global '__scm' variable assigned, because external users of this driver will assume the probe finished successfully. For example TZMEM parts ('__scm->mempool') are initialized later in the probe, but users of it (__scm_smc_call()) rely on the '__scm' variable. This fixes theoretical NULL pointer exception, triggered via introducing probe deferral in SCM driver with call trace: qcom_tzmem_alloc+0x70/0x1ac (P) qcom_tzmem_alloc+0x64/0x1ac (L) qcom_scm_assign_mem+0x78/0x194 qcom_rmtfs_mem_probe+0x2d4/0x38c platform_probe+0x68/0xc8 Fixes: 40289e35ca52 ("firmware: qcom: scm: enable the TZ mem allocator") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241209-qcom-scm-missing-barriers-and-all-sort-of-srap-v2-4-9061013c8d92@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/firmware/qcom/qcom_scm.c | 42 +++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) commit b628510397b5cafa1f5d3e848a28affd1c635302 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Mon Dec 9 15:27:55 2024 +0100 firmware: qcom: scm: Fix missing read barrier in qcom_scm_get_tzmem_pool() Commit 2e4955167ec5 ("firmware: qcom: scm: Fix __scm and waitq completion variable initialization") introduced a write barrier in probe function to store global '__scm' variable. We all known barriers are paired (see memory-barriers.txt: "Note that write barriers should normally be paired with read or address-dependency barriers"), therefore accessing it from concurrent contexts requires read barrier. Previous commit added such barrier in qcom_scm_is_available(), so let's use that directly. Lack of this read barrier can result in fetching stale '__scm' variable value, NULL, and dereferencing it. Note that barrier in qcom_scm_is_available() satisfies here the control dependency. Fixes: ca61d6836e6f ("firmware: qcom: scm: fix a NULL-pointer dereference") Fixes: 449d0d84bcd8 ("firmware: qcom: scm: smc: switch to using the SCM allocator") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241209-qcom-scm-missing-barriers-and-all-sort-of-srap-v2-2-9061013c8d92@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/firmware/qcom/qcom_scm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0a744cceebd0480cb39587b3b1339d66a9d14063 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Mon Dec 9 15:27:54 2024 +0100 firmware: qcom: scm: Fix missing read barrier in qcom_scm_is_available() Commit 2e4955167ec5 ("firmware: qcom: scm: Fix __scm and waitq completion variable initialization") introduced a write barrier in probe function to store global '__scm' variable. It also claimed that it added a read barrier, because as we all known barriers are paired (see memory-barriers.txt: "Note that write barriers should normally be paired with read or address-dependency barriers"), however it did not really add it. The offending commit used READ_ONCE() to access '__scm' global which is not a barrier. The barrier is needed so the store to '__scm' will be properly visible. This is most likely not fatal in current driver design, because missing read barrier would mean qcom_scm_is_available() callers will access old value, NULL. Driver does not support unbinding and does not correctly handle probe failures, thus there is no risk of stale or old pointer in '__scm' variable. However for code correctness, readability and to be sure that we did not mess up something in this tricky topic of SMP barriers, add a read barrier for accessing '__scm'. Change also comment from useless/obvious what does barrier do, to what is expected: which other parts of the code are involved here. Fixes: 2e4955167ec5 ("firmware: qcom: scm: Fix __scm and waitq completion variable initialization") Cc: stable@vger.kernel.org Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241209-qcom-scm-missing-barriers-and-all-sort-of-srap-v2-1-9061013c8d92@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/firmware/qcom/qcom_scm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3c89a986bb99406dc2191115a2f2d5cffb14ae5e Merge: 7c7ea7056aaa d74ee6e197a2 Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Jan 6 16:33:44 2025 -0800 Merge branch 'mlx5-hardware-steering-part-2' Tariq Toukan says: ==================== mlx5 Hardware Steering part 2 This series contain HWS code cleanups, enhancements, bug fixes, and additions. Note that some of these patches are fixing bugs in existing code, but we submit them without 'Fixes' tag to avoid the unnecessary burden for stable releases, as HWS still couldn't be enabled. Patches 1-5: HWS, various code cleanups and enhancements Patches 6-14: HWS, various bug fixes and additions Patch 15: HWS, setting timeout on polling ==================== Link: https://patch.msgid.link/20250102181415.1477316-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit d74ee6e197a2c2c5b1697d737ccdcaf8cc6c199e Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Jan 2 20:14:14 2025 +0200 net/mlx5: HWS, set timeout on polling for completion Consolidate BWC polling for completion into one function and set a time limit on the loop that polls for completion. This can happen only if there is some issue with FW/PCI/HW, such as FW being stuck, PCI issue, etc. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Itamar Gozlan <igozlan@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250102181415.1477316-16-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../ethernet/mellanox/mlx5/core/steering/hws/bwc.c | 26 +++++++++++++--------- .../ethernet/mellanox/mlx5/core/steering/hws/bwc.h | 2 ++ 2 files changed, 18 insertions(+), 10 deletions(-) commit 663e61225c4019441cd5c9d3cc35dfc293271482 Author: Vlad Dogaru <vdogaru@nvidia.com> Date: Thu Jan 2 20:14:13 2025 +0200 net/mlx5: HWS, support flow sampler destination Since sampler isn't currently supported via HWS, use a FW island that forwards any packets to the supplied sampler. Signed-off-by: Vlad Dogaru <vdogaru@nvidia.com> Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250102181415.1477316-15-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../mellanox/mlx5/core/steering/hws/action.c | 52 +++++++++++++++++++++- .../mellanox/mlx5/core/steering/hws/action.h | 3 ++ .../ethernet/mellanox/mlx5/core/steering/hws/cmd.c | 6 +++ 3 files changed, 60 insertions(+), 1 deletion(-) commit 85ab9ea32548c0fff1c8e07b4fbfc185f615f9f1 Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Jan 2 20:14:12 2025 +0200 net/mlx5: HWS, use the right size when writing arg data When writing arg data, wrong size was used - fixing this. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Itamar Gozlan <igozlan@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250102181415.1477316-14-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pat_arg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a105db854cf2e495caaa17f00ac0321b503def9b Author: Vlad Dogaru <vdogaru@nvidia.com> Date: Thu Jan 2 20:14:11 2025 +0200 net/mlx5: HWS, handle returned error value in pool alloc Handle all negative return values as errors, not just -1. The code previously treated -ENOMEM (and potentially other negative values) as valid segment numbers, leading to incorrect behavior. This fix ensures that any negative return value is treated as an error. Signed-off-by: Vlad Dogaru <vdogaru@nvidia.com> Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250102181415.1477316-13-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit be482f1d10da781db9445d2753c1e3f1fd82babf Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Jan 2 20:14:10 2025 +0200 net/mlx5: HWS, fix definer's HWS_SET32 macro for negative offset When bit offset for HWS_SET32 macro is negative, UBSAN complains about the shift-out-of-bounds: UBSAN: shift-out-of-bounds in drivers/net/ethernet/mellanox/mlx5/core/steering/hws/definer.c:177:2 shift exponent -8 is negative Fixes: 74a778b4a63f ("net/mlx5: HWS, added definers handling") Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Erez Shitrit <erezsh@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250102181415.1477316-12-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/steering/hws/definer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f851d1702dcd1b7124aef1680a091ff3f2ef791 Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Jan 2 20:14:09 2025 +0200 net/mlx5: HWS, separate SQ that HWS uses from the usual traffic SQs Mark the HWS SQ as 'non_wire' so that 'Flow Update' flow won't mix with network traffic. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Itamar Gozlan <igozlan@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250102181415.1477316-11-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c | 1 + 1 file changed, 1 insertion(+) commit 61fb92701b8ac9174857c417cfa988adc24e32c2 Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Jan 2 20:14:08 2025 +0200 net/mlx5: HWS, num_of_rules counter on matcher should be atomic Rule counter in matcher's struct is used in two places: 1. As heuristics to decide when the number of rules have crossed a certain percentage threshold and the matcher should be resized. We don't mind here if the number will be off by 1-2 due to concurrency. 2. When destroying matcher, the counter value is checked and the user is warned if it is not 0. Here we lock all the queues, so the counter will be correct. We don't need to always have *exact* number, but we do need this number to not be corrupted, which is what is happening when the counter isn't atomic, due to update by different threads. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Erez Shitrit <erezsh@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250102181415.1477316-10-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c | 17 +++++++++++------ .../net/ethernet/mellanox/mlx5/core/steering/hws/bwc.h | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) commit 05e3c287b98795cf01d829d29841179cef3fb9ce Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Jan 2 20:14:07 2025 +0200 net/mlx5: HWS, reduce memory consumption of a matcher struct Instead of having a large array of action templates allocated with kmalloc, have smaller array and allocate it with kvmalloc. The size of the array represents the max number of AT attach operations for the same matcher. This number is not expected to be very high. In any case, when the limit is reached, the next attempt to attach new AT will result in creation of a new matcher and moving all the rules to this matcher. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Erez Shitrit <erezsh@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250102181415.1477316-9-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.h | 8 +++++++- drivers/net/ethernet/mellanox/mlx5/core/steering/hws/matcher.c | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) commit ad4da6cc36ace35d80a292bfeaac49e63e9e26eb Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Jan 2 20:14:06 2025 +0200 net/mlx5: HWS, remove wrong deletion of the miss table list Remove wrong cleanup of the old miss table list and simplify the error flow in the function. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Reviewed-by: Itamar Gozlan <igozlan@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250102181415.1477316-8-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/steering/hws/table.c | 6 ------ 1 file changed, 6 deletions(-) commit 1ce840c7a659aa53a31ef49f0271b4fd0dc10296 Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Jan 2 20:14:05 2025 +0200 net/mlx5: HWS, change error flow on matcher disconnect Currently, when firmware failure occurs during matcher disconnect flow, the error flow of the function reconnects the matcher back and returns an error, which continues running the calling function and eventually frees the matcher that is being disconnected. This leads to a case where we have a freed matcher on the matchers list, which in turn leads to use-after-free and eventual crash. This patch fixes that by not trying to reconnect the matcher back when some FW command fails during disconnect. Note that we're dealing here with FW error. We can't overcome this problem. This might lead to bad steering state (e.g. wrong connection between matchers), and will also lead to resource leakage, as it is the case with any other error handling during resource destruction. However, the goal here is to allow the driver to continue and not crash the machine with use-after-free error. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Signed-off-by: Itamar Gozlan <igozlan@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250102181415.1477316-7-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../mellanox/mlx5/core/steering/hws/matcher.c | 24 ++++++++-------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit cc611ab6c712eaa1ed3fd4321d91e66cfe3245a3 Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Jan 2 20:14:04 2025 +0200 net/mlx5: HWS, add error message on failure to move rules Add error message for failure to move rules from old matcher to new one during rehash. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Itamar Gozlan <igozlan@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250102181415.1477316-6-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit c86963aae5b83a865a552408b40e743c3610bd9f Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Jan 2 20:14:03 2025 +0200 net/mlx5: HWS, simplify allocations as we support only FDB In pools, STCs and actions: no need to allocate array for various table types, as HWS is used to manage only FDB flow tables. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Erez Shitrit <erezsh@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250102181415.1477316-5-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../mellanox/mlx5/core/steering/hws/action.c | 107 ++++++++++----------- .../mellanox/mlx5/core/steering/hws/action.h | 2 +- .../ethernet/mellanox/mlx5/core/steering/hws/cmd.c | 2 +- .../mellanox/mlx5/core/steering/hws/context.c | 29 ++---- .../mellanox/mlx5/core/steering/hws/context.h | 4 +- .../mellanox/mlx5/core/steering/hws/debug.c | 36 +++---- .../mellanox/mlx5/core/steering/hws/matcher.c | 4 +- .../mellanox/mlx5/core/steering/hws/rule.c | 2 +- .../mellanox/mlx5/core/steering/hws/table.c | 13 ++- 9 files changed, 87 insertions(+), 112 deletions(-) commit 0a1ef807a403b2f386a571133eb35e25c6511808 Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Jan 2 20:14:02 2025 +0200 net/mlx5: HWS, denote how refcounts are protected Some HWS structs have refcounts that are just u32. Comment how they are protected and add '__must_hold()' annotation where applicable. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Erez Shitrit <erezsh@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250102181415.1477316-4-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.h | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/steering/hws/definer.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pat_arg.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/steering/hws/table.c | 3 ++- 5 files changed, 7 insertions(+), 6 deletions(-) commit 0647f27a5facedf6842c67b9909a23f577bd3d08 Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Jan 2 20:14:01 2025 +0200 net/mlx5: HWS, remove implementation of unused FW commands Remove functions that manage alias objects - they are not used. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Itamar Gozlan <igozlan@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250102181415.1477316-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../ethernet/mellanox/mlx5/core/steering/hws/cmd.c | 67 ---------------------- .../ethernet/mellanox/mlx5/core/steering/hws/cmd.h | 11 ---- 2 files changed, 78 deletions(-) commit 020ca0abae4c1f69e71507981844fe99ae154424 Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Jan 2 20:14:00 2025 +0200 net/mlx5: HWS, remove the use of duplicated structs Remove definition in HWS of structs that are already defined in mlx5_ifc.h, and fix the usage of these structs. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Itamar Gozlan <igozlan@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250102181415.1477316-2-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../ethernet/mellanox/mlx5/core/steering/hws/cmd.c | 20 +++++------ .../ethernet/mellanox/mlx5/core/steering/hws/prm.h | 42 ---------------------- 2 files changed, 10 insertions(+), 52 deletions(-) commit d966ee051ebf97e973ea9e84a7f98ab1906510a2 Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Tue Dec 10 12:11:10 2024 +0530 clk: qcom: ipq5424: add gcc_xo_clk The gcc_xo_clk is required for the functionality of the WiFi copy engine block. Therefore, add the gcc_xo_clk in gcc driver. Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Link: https://lore.kernel.org/r/20241210064110.130466-3-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/gcc-ipq5424.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit a8b56cb27d47ecba7b26041c05fe423130ee7a24 Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Tue Dec 10 12:11:09 2024 +0530 dt-bindings: clock: qcom: gcc-ipq5424: add gcc_xo_clk macro The GCC_XO_CLK is required for the functionality of the WiFi copy engine block. Therefore, add the GCC_XO_CLK macro. Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241210064110.130466-2-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> include/dt-bindings/clock/qcom,ipq5424-gcc.h | 1 + 1 file changed, 1 insertion(+) commit 82db707eb97d96f6460730a65be9cb2f9b3a4959 Author: Lijuan Gao <quic_lijuang@quicinc.com> Date: Wed Dec 11 17:35:46 2024 +0800 arm64: dts: qcom: qcs615: Add CPU capacity and DPC properties Add "capacity-dmips-mhz" and "dynamic-power-coefficient" to the QCS615 SoC. They are used to build the energy model, which in turn is used by EAS to take placement decisions. Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241211-add_cpu_capacity_and_dpc_properties-v1-1-03aaee023a77@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7c7ea7056aaac4f0a70dadd25b093da6ed7e6e05 Merge: 4475d56145f3 2410719cdd49 Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Jan 6 16:26:16 2025 -0800 Merge branch 'net-pcs-add-supported_interfaces-bitmap-for-pcs' Russell King says: ==================== net: pcs: add supported_interfaces bitmap for PCS This series adds supported_interfaces for PCS, which gives MAC code a way to determine the interface modes that the PCS supports without having to implement functions such as xpcs_get_interfaces(), or workarounds such as in https://lore.kernel.org/20241213090526.71516-3-maxime.chevallier@bootlin.com Patch 1 adds the new bitmask to struct phylink_pcs, and code within phylink to validate that the PCS returned by the MAC driver supports the interface mode - but only if this bitmask is non-empty. Patch 2 through 4 fills in the interface modes for XPCS, Mediatek LynxI and Lynx PCS. Patch 5 adds support to stmmac to make use of this bitmask when filling in phylink_config.supported_interfaces, eliminating the call to xpcs_get_interfaces. As xpcs_get_interfaces() is now unused outside of pcs-xpcs.c, patch 6 makes this function static and removes it from the header file. ==================== Link: https://patch.msgid.link/Z3fG9oTY9F9fCYHv@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 2410719cdd49d9b062e87dddaf5ec990edafc6e3 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Fri Jan 3 11:16:56 2025 +0000 net: pcs: xpcs: make xpcs_get_interfaces() static xpcs_get_interfaces() should no longer be used outside of the XPCS code, so make it static. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/E1tTffk-007Roi-JM@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/pcs/pcs-xpcs.c | 3 +-- include/linux/pcs/pcs-xpcs.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit d13cefbb108e2e3362587b93ab5adc31c6a8589e Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Fri Jan 3 11:16:51 2025 +0000 net: stmmac: use PCS supported_interfaces Use the PCS' supported_interfaces member to build the MAC level supported_interfaces bitmap. Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tTfff-007Roc-Ff@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit b0f88c1b9a539dc91b83ac90345999273ee7dfd0 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Fri Jan 3 11:16:46 2025 +0000 net: pcs: lynx: fill in PCS supported_interfaces Fill in the new PCS supported_interfaces member with the interfaces that Lynx supports. Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tTffa-007RoV-Bo@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/pcs/pcs-lynx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b87d4ee16bb4f6335032839a1173d8bb177939a9 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Fri Jan 3 11:16:41 2025 +0000 net: pcs: mtk-lynxi: fill in PCS supported_interfaces Fill in the new PCS supported_interfaces member with the interfaces that the Mediatek LynxI supports. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Acked-by: Daniel Golle <daniel@makrotopia.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/E1tTffV-007RoP-8D@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/pcs/pcs-mtk-lynxi.c | 4 ++++ 1 file changed, 4 insertions(+) commit 906909fabb81dedf93a786c2d7247cab12e0a232 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Fri Jan 3 11:16:36 2025 +0000 net: pcs: xpcs: fill in PCS supported_interfaces Fill in the new PCS supported_interfaces member with the interfaces that XPCS supports. Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tTffQ-007RoJ-4u@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/pcs/pcs-xpcs.c | 2 ++ 1 file changed, 2 insertions(+) commit fbb9a9d263a68f60a16c8ba5a51d6198d67171cd Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Fri Jan 3 11:16:31 2025 +0000 net: phylink: add support for PCS supported_interfaces bitmap Add support for the PCS to specify which interfaces it supports, which can be used by MAC drivers to build the main supported_interfaces bitmap. Phylink also validates that the PCS returned by the MAC driver supports the interface that the MAC was asked for. An empty supported_interfaces bitmap from the PCS indicates that it does not provide this information, and we handle that appropriately. Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tTffL-007RoD-1Y@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phylink.c | 11 +++++++++++ include/linux/phylink.h | 3 +++ 2 files changed, 14 insertions(+) commit 5f440a7b003e16e0303ec46bc433fbdb3a334664 Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Thu Dec 12 14:08:25 2024 +0100 arm64: dts: qcom: x1e80100-qcp: Enable external DP support Now that the FSUSB42 USB switches are described, enable support for DP on the three USB-C ports of the X1E80100 QCP. It supports up to 4 lanes, but for now we need to limit this to 2 lanes due to limitations in the USB/DP combo PHY driver. The same limitation also exists on other boards upstream. Co-developed-by: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241212-x1e80100-qcp-dp-v1-3-37cb362a0dfe@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit a07aea2174f2dfde580c6b67feb38a4e4c0df696 Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Thu Dec 12 14:08:24 2024 +0100 arm64: dts: qcom: x1e80100-qcp: Add FSUSB42 USB switches Unlike most X1E boards, the QCP does not have Parade PS8830 retimers on the three USB-C ports. Instead, there are FSUSB42 USB switches for each port that handle orientation switching for the SBU lines. The overall setup is similar to the gpio-sbu-mux defined for sc8280xp-crd and the ThinkPad X13s. Co-developed-by: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241212-x1e80100-qcp-dp-v1-2-37cb362a0dfe@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 154 ++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) commit 7ec7e327286182c65d0b5b81dff498d620fe9e8c Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Thu Dec 12 23:19:37 2024 +0100 arm64: dts: qcom: sc8280xp: Fix up remoteproc register space sizes Make sure the remoteproc reg ranges reflect the entire register space they refer to. Since they're unused by the driver, there's no functional change. Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform") Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Link: https://lore.kernel.org/r/20241212-topic-8280_rproc_reg-v1-1-bd1c696e91b0@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 47d178caac3ec13f5f472afda25fcfdfaa00d0da Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:54:12 2024 +0100 arm64: dts: qcom: sm6115: Fix ADSP memory base and length The address space in ADSP PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB): 0x0a40_0000 with length of 0x4040. 0x0ab0_0000, value used so far, is the SSC_QUPV3 block, so entierly unrelated. Correct the base address and length, which should have no functional impact on Linux users, because PAS loader does not use this address space at all. Cc: stable@vger.kernel.org Fixes: 96ce9227fdbc ("arm64: dts: qcom: sm6115: Add remoteproc nodes") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-23-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm6115.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 846f49c3f01680f4af3043bf5b7abc9cf71bb42d Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:54:11 2024 +0100 arm64: dts: qcom: sm6115: Fix CDSP memory length The address space in MPSS/Modem PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB) which has a length of 0x4040. Value of 0x100000 covers entire Touring/CDSP memory block seems to big here. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Cc: stable@vger.kernel.org Fixes: 96ce9227fdbc ("arm64: dts: qcom: sm6115: Add remoteproc nodes") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-22-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm6115.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 472d65e7cb591c8379dd6f40561f96be73a46f0f Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:54:10 2024 +0100 arm64: dts: qcom: sm6115: Fix MPSS memory length The address space in MPSS/Modem PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x100 was copied from older DTS, but it grew since then. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Cc: stable@vger.kernel.org Fixes: 96ce9227fdbc ("arm64: dts: qcom: sm6115: Add remoteproc nodes") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-21-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm6115.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a27f0e1869e992e4107e2af8ec348e1a3b9d4d5 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:54:09 2024 +0100 arm64: dts: qcom: sdx75: Fix MPSS memory length The address space in MPSS/Modem PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x4040 was copied from older DTS, but it grew since then. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Cc: stable@vger.kernel.org Fixes: 41c72f36b286 ("arm64: dts: qcom: sdx75: Add remoteproc node") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-20-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sdx75.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 918e71ba0c08c3d609ad69067854b0f675c4a253 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:54:08 2024 +0100 arm64: dts: qcom: sm6375: Fix MPSS memory base and length The address space in MPSS/Modem PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB): 0x0608_0000 with length of 0x10000. 0x0600_0000, value used so far, is the main region of Modem. Correct the base address and length, which should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: 31cc61104f68 ("arm64: dts: qcom: sm6375: Add modem nodes") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-19-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm6375.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c9f7f341e896836c99709421a23bae5f53039aab Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:54:07 2024 +0100 arm64: dts: qcom: sm6375: Fix CDSP memory base and length The address space in CDSP PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB): 0x0b30_0000 with length of 0x10000. 0x0b00_0000, value used so far, is the main region of CDSP. Correct the base address and length, which should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: fe6fd26aeddf ("arm64: dts: qcom: sm6375: Add ADSP&CDSP") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-18-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm6375.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bf4dda83da27b7efc49326ebb82cbd8b3e637c38 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:54:06 2024 +0100 arm64: dts: qcom: sm6375: Fix ADSP memory length The address space in ADSP (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB) which has a length of 0x10000. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: fe6fd26aeddf ("arm64: dts: qcom: sm6375: Add ADSP&CDSP") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-17-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm6375.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd8d83de9cc9ecfb1f9a12bc838041c4eb4d10bd Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:54:05 2024 +0100 arm64: dts: qcom: sm6350: Fix MPSS memory length The address space in MPSS/Modem PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x4040 was copied from older DTS, but it grew since then. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: 489be59b635b ("arm64: dts: qcom: sm6350: Add MPSS nodes") Cc: stable@vger.kernel.org Tested-by: Luca Weiss <luca.weiss@fairphone.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-16-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0805a864459a29831577d2a47165afebe338faf Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:54:04 2024 +0100 arm64: dts: qcom: sm6350: Fix ADSP memory length The address space in ADSP (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB) which has a length of 0x10000. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: efc33c969f23 ("arm64: dts: qcom: sm6350: Add ADSP nodes") Cc: stable@vger.kernel.org Tested-by: Luca Weiss <luca.weiss@fairphone.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-15-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3de1bf12c6bfb9a92f0803941ecae39b08470446 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:54:03 2024 +0100 arm64: dts: qcom: x1e80100: Fix CDSP memory length The address space in CDSP PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x1400000 was copied from older DTS, but it does not look accurate at all. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: 5f2a9cd4b104 ("arm64: dts: qcom: x1e80100: Add ADSP/CDSP remoteproc nodes") Cc: stable@vger.kernel.org Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-14-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a003077366946a5ed1adab6d177efb2ab59e815 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:54:02 2024 +0100 arm64: dts: qcom: x1e80100: Fix ADSP memory base and length The address space in ADSP PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB): 0x0680_0000 with length of 0x10000. 0x3000_0000, value used so far, is the main region of CDSP and was simply copied from other/older DTS. Correct the base address and length, which also moves the node to different place to keep things sorted by unit address. The diff looks big, but only the unit address and "reg" property were changed. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: 5f2a9cd4b104 ("arm64: dts: qcom: x1e80100: Add ADSP/CDSP remoteproc nodes") Cc: stable@vger.kernel.org Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-13-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100.dtsi | 274 ++++++++++++++++----------------- 1 file changed, 137 insertions(+), 137 deletions(-) commit d4fa87daf3dd39d6bd4b69613e22bfb43c737831 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:54:01 2024 +0100 arm64: dts: qcom: sm8650: Fix MPSS memory length The address space in MPSS/Modem PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x4040 was copied from older DTS, but it grew since then. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: 10e024671295 ("arm64: dts: qcom: sm8650: add interconnect dependent device nodes") Cc: stable@vger.kernel.org Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-12-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8650.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aca0053f051625a224c2e802a0e88755770819e4 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:54:00 2024 +0100 arm64: dts: qcom: sm8650: Fix CDSP memory length The address space in CDSP PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x1400000 was copied from older DTS, but it does not look accurate at all. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: 10e024671295 ("arm64: dts: qcom: sm8650: add interconnect dependent device nodes") Cc: stable@vger.kernel.org Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-11-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8650.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6ddc5c37323f7875c2533cc4949be58d15e430a Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:53:59 2024 +0100 arm64: dts: qcom: sm8650: Fix ADSP memory base and length The address space in ADSP PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB): 0x0680_0000 with length of 0x10000. 0x3000_0000, value used so far, is the main region of CDSP. Downstream DTS uses 0x0300_0000, which is oddly similar to 0x3000_0000, yet quite different and points to unused area. Correct the base address and length, which also moves the node to different place to keep things sorted by unit address. The diff looks big, but only the unit address and "reg" property were changed. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: 10e024671295 ("arm64: dts: qcom: sm8650: add interconnect dependent device nodes") Cc: stable@vger.kernel.org Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-10-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8650.dtsi | 296 +++++++++++++++++------------------ 1 file changed, 148 insertions(+), 148 deletions(-) commit 8ef227e93a513d431f9345f23cd4d2d65607b985 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:53:58 2024 +0100 arm64: dts: qcom: sm8550: Fix MPSS memory length The address space in MPSS/Modem PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x4040 was copied from older DTS, but it grew since then. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: d0c061e366ed ("arm64: dts: qcom: sm8550: add adsp, cdsp & mdss nodes") Cc: stable@vger.kernel.org Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-9-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8550.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b2570e1e43e4acd0fcb98c6489736fe1c67b222 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:53:57 2024 +0100 arm64: dts: qcom: sm8550: Fix CDSP memory length The address space in CDSP PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x1400000 was copied from older DTS, but it does not look accurate at all. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: d0c061e366ed ("arm64: dts: qcom: sm8550: add adsp, cdsp & mdss nodes") Cc: stable@vger.kernel.org Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-8-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8550.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6a8f54bc2af555738322783ba1e990c2ae7f443 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:53:56 2024 +0100 arm64: dts: qcom: sm8550: Fix ADSP memory base and length The address space in ADSP PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB): 0x0680_0000 with length of 0x10000. 0x3000_0000, value used so far, is the main region of CDSP. Downstream DTS uses 0x0300_0000, which is oddly similar to 0x3000_0000, yet quite different and points to unused area. Correct the base address and length, which also moves the node to different place to keep things sorted by unit address. The diff looks big, but only the unit address and "reg" property were changed. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: d0c061e366ed ("arm64: dts: qcom: sm8550: add adsp, cdsp & mdss nodes") Cc: stable@vger.kernel.org Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-7-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8550.dtsi | 262 +++++++++++++++++------------------ 1 file changed, 131 insertions(+), 131 deletions(-) commit fa6442e87ab7c4a58c0b5fc64aab1aacc8034712 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:53:55 2024 +0100 arm64: dts: qcom: sm8450: Fix MPSS memory length The address space in MPSS/Modem PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x4040 was copied from older DTS, but it grew since then. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: 1172729576fb ("arm64: dts: qcom: sm8450: Add remoteproc enablers and instances") Cc: stable@vger.kernel.org Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-6-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3751fe2cba2a9fba2204ef62102bc4bb027cec7b Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:53:54 2024 +0100 arm64: dts: qcom: sm8450: Fix CDSP memory length The address space in CDSP PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x1400000 was copied from older DTS, but it does not look accurate at all. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: 1172729576fb ("arm64: dts: qcom: sm8450: Add remoteproc enablers and instances") Cc: stable@vger.kernel.org Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-5-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13c96bee5d5e5b61a9d8d000c9bb37bb9a2a0551 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:53:53 2024 +0100 arm64: dts: qcom: sm8450: Fix ADSP memory base and length The address space in ADSP PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB): 0x0300_0000 with length of 0x10000, which also matches downstream DTS. 0x3000_0000, value used so far, was in datasheet is the region of CDSP. Correct the base address and length, which also moves the node to different place to keep things sorted by unit address. The diff looks big, but only the unit address and "reg" property were changed. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: 1172729576fb ("arm64: dts: qcom: sm8450: Add remoteproc enablers and instances") Cc: stable@vger.kernel.org Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-4-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8450.dtsi | 212 +++++++++++++++++------------------ 1 file changed, 106 insertions(+), 106 deletions(-) commit da1937dec9cd986e685b6a429b528a4cbc7b1603 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:53:52 2024 +0100 arm64: dts: qcom: sm8350: Fix MPSS memory length The address space in MPSS/Modem PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x4040 was copied from older DTS, but it grew since then. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: 177fcf0aeda2 ("arm64: dts: qcom: sm8350: Add remoteprocs") Cc: stable@vger.kernel.org Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-3-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8350.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4afd8ba453b6e82245b9068868c72c831aec84e Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:53:51 2024 +0100 arm64: dts: qcom: sm8350: Fix CDSP memory base and length The address space in CDSP PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB): 0x0a30_0000 with length of 0x10000. 0x9890_0000, value used so far, was copied from downstream DTS, is in the middle of RAM/DDR space and downstream DTS describes the PIL loader, which is a bit different interface. Datasheet says that one of the main CDSP address spaces is 0x0980_0000, which is oddly similar to 0x9890_0000, but quite different. Assume existing value (thus downstream DTS) is not really describing the intended CDSP PAS region. Correct the base address and length, which also moves the node to different place to keep things sorted by unit address. The diff looks big, but only the unit address and "reg" property were changed. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: 177fcf0aeda2 ("arm64: dts: qcom: sm8350: Add remoteprocs") Cc: stable@vger.kernel.org Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-2-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8350.dtsi | 218 +++++++++++++++++------------------ 1 file changed, 109 insertions(+), 109 deletions(-) commit f9ba85566ddd5a3db8fa291aaecd70c4e55a3732 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Dec 13 15:53:50 2024 +0100 arm64: dts: qcom: sm8350: Fix ADSP memory base and length The address space in ADSP PAS (Peripheral Authentication Service) remoteproc node should point to the QDSP PUB address space (QDSP6...SS_PUB): 0x0300_0000 with length of 0x10000. 0x1730_0000, value used so far, was copied from downstream DTS, is in the middle of unused space and downstream DTS describes the PIL loader, which is a bit different interface. Assume existing value (thus downstream DTS) is not really describing the intended ADSP PAS region. Correct the base address and length, which also moves the node to different place to keep things sorted by unit address. The diff looks big, but only the unit address and "reg" property were changed. This should have no functional impact on Linux users, because PAS loader does not use this address space at all. Fixes: 177fcf0aeda2 ("arm64: dts: qcom: sm8350: Add remoteprocs") Cc: stable@vger.kernel.org Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-1-2e0036fccd8d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8350.dtsi | 272 +++++++++++++++++------------------ 1 file changed, 136 insertions(+), 136 deletions(-) commit 50f54d4fa3f4827d824b971485b0691e0985d0ba Author: Yuanjie Yang <quic_yuanjiey@quicinc.com> Date: Tue Dec 17 18:10:17 2024 +0800 arm64: dts: qcom: qcs615-ride: enable SDHC1 and SDHC2 Enable SDHC1 and SDHC2 on the Qualcomm QCS615 Ride platform. Signed-off-by: Yuanjie Yang <quic_yuanjiey@quicinc.com> Link: https://lore.kernel.org/r/20241217101017.2933587-3-quic_yuanjiey@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615-ride.dts | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 8009de059f8693142c651980cef07668917971c2 Author: Yuanjie Yang <quic_yuanjiey@quicinc.com> Date: Tue Dec 17 18:10:16 2024 +0800 arm64: dts: qcom: qcs615: add SDHC1 and SDHC2 Add SDHC1 and SDHC2 support to the QCS615 Ride platform. Signed-off-by: Yuanjie Yang <quic_yuanjiey@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241217101017.2933587-2-quic_yuanjiey@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615.dtsi | 211 +++++++++++++++++++++++++++++++++++ 1 file changed, 211 insertions(+) commit 46e6075287e68e1d3d0ea8ecda610064636e0854 Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Tue Dec 17 17:09:09 2024 +0530 dt-bindings: clock: qcom: gcc-ipq5424: remove apss_dbg clock macro The gcc_apss_dbg clk is access protected by trust zone, and accessing it results in a kernel crash. Therefore remove the gcc_apss_dbg_clk macro. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Link: https://lore.kernel.org/r/20241217113909.3522305-3-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> include/dt-bindings/clock/qcom,ipq5424-gcc.h | 1 - 1 file changed, 1 deletion(-) commit 5051b61d769ecc02b218499c35bee4cc1c38b7dc Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Tue Dec 17 17:09:08 2024 +0530 clk: qcom: ipq5424: remove apss_dbg clock The gcc_apss_dbg clk is access protected by trust zone, and accessing it results in a kernel crash. Therefore remove the gcc_apss_dbg_clk from the gcc driver. Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Link: https://lore.kernel.org/r/20241217113909.3522305-2-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/gcc-ipq5424.c | 19 ------------------- 1 file changed, 19 deletions(-) commit bf6aa2d6935cc86b5eee67cdb8edef53fb6374cd Author: Richard Acayan <mailingradian@gmail.com> Date: Wed Dec 18 18:17:31 2024 -0500 dt-bindings: clock: qcom,sdm845-camcc: add sdm670 compatible The camera clocks on SDM670 and SDM845 have no significant differences that would require a change in the clock controller driver. The only difference is the clock frequency at each level of the power domains, which is not specified in the clock driver. There should still be a compatible specific to the SoC, so add the compatible for SDM670 with the SDM845 compatible as fallback. Link: https://android.googlesource.com/kernel/msm/+/d4dc50c0a9291bd99895d4844f973421c047d267/drivers/clk/qcom/camcc-sdm845.c#2048 Suggested-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Suggested-by: Konrad Dybcio <konradybcio@kernel.org> Link: https://lore.kernel.org/linux-arm-msm/7d26a62b-b898-4737-bd53-f49821e3b471@linaro.org Signed-off-by: Richard Acayan <mailingradian@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241218231729.270137-8-mailingradian@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/clock/qcom,sdm845-camcc.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9620f54844241a5f8cd16e963fe164433cc226e4 Author: Richard Acayan <mailingradian@gmail.com> Date: Wed Dec 18 18:17:34 2024 -0500 arm64: dts: qcom: sdm670: add camcc The camera clock controller on SDM670 controls the clocks that drive the camera subsystem. The clocks are the same as on SDM845. Add the camera clock controller for SDM670. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Richard Acayan <mailingradian@gmail.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241218231729.270137-11-mailingradian@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sdm670.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c57c39ee522d873db2cb23486581a8269c389cfe Author: Lijuan Gao <quic_lijuang@quicinc.com> Date: Thu Dec 19 15:59:48 2024 +0800 arm64: dts: qcom: correct gpio-ranges for QCS8300 Correct the gpio-ranges for the QCS8300 TLMM pin controller to include GPIOs 0-132 and the UFS_RESET pin for primary UFS memory reset. Fixes: 7be190e4bdd2 ("arm64: dts: qcom: add QCS8300 platform") Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241219-correct_gpio_ranges-v2-6-19af8588dbd0@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80c82827327d80bde8fc96ebd4e637d0454062db Author: Lijuan Gao <quic_lijuang@quicinc.com> Date: Thu Dec 19 15:59:47 2024 +0800 arm64: dts: qcom: correct gpio-ranges for QCS615 Correct the gpio-ranges for the QCS615 TLMM pin controller to include GPIOs 0-122 and the UFS_RESET pin for primary UFS memory reset. Fixes: 8e266654a2fe ("arm64: dts: qcom: add QCS615 platform") Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241219-correct_gpio_ranges-v2-5-19af8588dbd0@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4475d56145f368d065b05da3a5599d5620ca9408 Author: Eric Dumazet <edumazet@google.com> Date: Fri Jan 3 10:11:48 2025 +0000 net: hsr: remove one synchronize_rcu() from hsr_del_port() Use kfree_rcu() instead of synchronize_rcu()+kfree(). This might allow syzbot to fuzz HSR a bit faster... Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250103101148.3594545-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/hsr/hsr_main.h | 1 + net/hsr/hsr_slave.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) commit e9f7da0776fb4f64fa2a17ece8b2205f8e9cc1b2 Merge: 40384c840ea1 ee46245564a8 Author: Stephen Boyd <sboyd@kernel.org> Date: Mon Jan 6 16:08:39 2025 -0800 Merge tag 'socfpga_clk_update_for_v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into clk-socfpga Pull a SoCFPGA clk driver update from Dinh Nguyen: - Optimize local variables in clk_pll_recalc_rate() for Arria10 * tag 'socfpga_clk_update_for_v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: clk: socfpga: arria10: Optimize local variables in clk_pll_recalc_rate() commit 672daf24866bf002d0a7f2dca61e770a570e8cc3 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:12:16 2024 +0200 clk: qcom: mmcc-msm8960: handle LVDS clock On APQ8064 the DSI2_PIXEL_SRC clock can be used either to drive the second DSI host or to drive the LCDC controller. Add LVDS PLL as possible source to the clock and LVDS output clock. The DSI2_PIXEL_SRC clock has separate path to be used for the LVDS clock. To represent both DSI and LVDS clocks properly, add intermediate clock which toggles the enable bit and make DSI2_PIXEL_CLK clock just check for the HALT bit. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-apq8064-fix-mmcc-v1-4-c95d2e2bf143@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/mmcc-msm8960.c | 61 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 4 deletions(-) commit a34d21d89c85e8bb72ecd83b7cde2cba1aa718f4 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:12:15 2024 +0200 clk: qcom: rcg: add 1/1 pixel clock ratio LVDS clocks require 1:1 ration support in the table used by clk_rcg_pixel_ops. Add corresponding divider to the table. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-apq8064-fix-mmcc-v1-3-c95d2e2bf143@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-rcg.c | 1 + 1 file changed, 1 insertion(+) commit 0a0693fb2642604b4e14390dbf792f36e3485aaa Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:12:14 2024 +0200 dt-bindings: clock: qcom,mmcc-msm8960: add LCDC-related clocks APQ8064 / MSM8960 have separate LVDS / LCDC clock, driving the MDP4 LCD controller. Add corresponding indices to clock controller bindings. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241224-apq8064-fix-mmcc-v1-2-c95d2e2bf143@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> include/dt-bindings/clock/qcom,mmcc-msm8960.h | 2 ++ 1 file changed, 2 insertions(+) commit 2b5add606ceac9fe4ea84ecd34351427b5602893 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:12:13 2024 +0200 dt-bindings: clock: qcom,mmcc: support LVDS PLL input for apq8064 APQ8064 / MSM8960 have separate LVDS PLL driving the LVDS / LCDC clock. Add corresponding input to clock controller bindings. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241224-apq8064-fix-mmcc-v1-1-c95d2e2bf143@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/clock/qcom,mmcc.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 4bb53051c92448537ad4cf194f6cd19556a843aa Author: Md Sadre Alam <quic_mdalam@quicinc.com> Date: Thu Dec 26 17:15:00 2024 +0530 arm64: dts: qcom: ipq5332: update TRNG compatible RNG hardware versions greater than 3.0 are Truly Random Number Generators (TRNG). In IPQ5332, the RNGblock is a TRNG. This patch corrects the compatible property which correctly describes the hardware without making any functional changes Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> Link: https://lore.kernel.org/r/20241226114500.2623804-5-quic_mdalam@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/ipq5332.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3d6e8c68c3a69e09036c823fe27111665744ca5 Author: Md Sadre Alam <quic_mdalam@quicinc.com> Date: Thu Dec 26 17:14:59 2024 +0530 arm64: dts: qcom: ipq9574: update TRNG compatible RNG hardware versions greater than 3.0 are Truly Random Number Generators (TRNG). In IPQ9574, the RNGblock is a TRNG. This patch corrects the compatible property which correctly describes the hardware without making any functional changes Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> Link: https://lore.kernel.org/r/20241226114500.2623804-4-quic_mdalam@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/ipq9574.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ae7df37528744ce4606456e084698a9e33254e2 Author: Md Sadre Alam <quic_mdalam@quicinc.com> Date: Thu Dec 26 17:14:58 2024 +0530 arm64: dts: qcom: ipq5424: add TRNG node Add TRNG (Truly Random Number Generator) node for ipq5424 Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> Link: https://lore.kernel.org/r/20241226114500.2623804-3-quic_mdalam@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/ipq5424.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 7b115b623545650407e3f262ee9cdd8a778a9fdf Author: Wasim Nazir <quic_wasimn@quicinc.com> Date: Sun Dec 29 20:53:28 2024 +0530 soc: qcom: socinfo: add QCS9075 SoC ID Update soc_id table for the Qualcomm QCS9075 SoC to represent qcs9075 machine. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Wasim Nazir <quic_wasimn@quicinc.com> Link: https://lore.kernel.org/r/20241229152332.3068172-3-quic_wasimn@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/soc/qcom/socinfo.c | 1 + 1 file changed, 1 insertion(+) commit cee3947b1aed42f71f99ce4e5d1410ee8670621a Author: Wasim Nazir <quic_wasimn@quicinc.com> Date: Sun Dec 29 20:53:27 2024 +0530 dt-bindings: arm: qcom,ids: add SoC ID for QCS9075 Add the unique ID for Qualcomm QCS9075 SoC. This value is used to differentiate the SoC across qcom targets. Acked-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Wasim Nazir <quic_wasimn@quicinc.com> Link: https://lore.kernel.org/r/20241229152332.3068172-2-quic_wasimn@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> include/dt-bindings/arm/qcom,ids.h | 1 + 1 file changed, 1 insertion(+) commit 95fc45d1dea8e1253f8ec58abc5befb71553d666 Author: Eric Dumazet <edumazet@google.com> Date: Fri Jan 3 21:05:14 2025 +0000 ax25: rcu protect dev->ax25_ptr syzbot found a lockdep issue [1]. We should remove ax25 RTNL dependency in ax25_setsockopt() This should also fix a variety of possible UAF in ax25. [1] WARNING: possible circular locking dependency detected 6.13.0-rc3-syzkaller-00762-g9268abe611b0 #0 Not tainted ------------------------------------------------------ syz.5.1818/12806 is trying to acquire lock: ffffffff8fcb3988 (rtnl_mutex){+.+.}-{4:4}, at: ax25_setsockopt+0xa55/0xe90 net/ax25/af_ax25.c:680 but task is already holding lock: ffff8880617ac258 (sk_lock-AF_AX25){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1618 [inline] ffff8880617ac258 (sk_lock-AF_AX25){+.+.}-{0:0}, at: ax25_setsockopt+0x209/0xe90 net/ax25/af_ax25.c:574 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (sk_lock-AF_AX25){+.+.}-{0:0}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 lock_sock_nested+0x48/0x100 net/core/sock.c:3642 lock_sock include/net/sock.h:1618 [inline] ax25_kill_by_device net/ax25/af_ax25.c:101 [inline] ax25_device_event+0x24d/0x580 net/ax25/af_ax25.c:146 notifier_call_chain+0x1a5/0x3f0 kernel/notifier.c:85 __dev_notify_flags+0x207/0x400 dev_change_flags+0xf0/0x1a0 net/core/dev.c:9026 dev_ifsioc+0x7c8/0xe70 net/core/dev_ioctl.c:563 dev_ioctl+0x719/0x1340 net/core/dev_ioctl.c:820 sock_do_ioctl+0x240/0x460 net/socket.c:1234 sock_ioctl+0x626/0x8e0 net/socket.c:1339 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 -> #0 (rtnl_mutex){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x1ac/0xee0 kernel/locking/mutex.c:735 ax25_setsockopt+0xa55/0xe90 net/ax25/af_ax25.c:680 do_sock_setsockopt+0x3af/0x720 net/socket.c:2324 __sys_setsockopt net/socket.c:2349 [inline] __do_sys_setsockopt net/socket.c:2355 [inline] __se_sys_setsockopt net/socket.c:2352 [inline] __x64_sys_setsockopt+0x1ee/0x280 net/socket.c:2352 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 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_AX25); lock(rtnl_mutex); lock(sk_lock-AF_AX25); lock(rtnl_mutex); *** DEADLOCK *** 1 lock held by syz.5.1818/12806: #0: ffff8880617ac258 (sk_lock-AF_AX25){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1618 [inline] #0: ffff8880617ac258 (sk_lock-AF_AX25){+.+.}-{0:0}, at: ax25_setsockopt+0x209/0xe90 net/ax25/af_ax25.c:574 stack backtrace: CPU: 1 UID: 0 PID: 12806 Comm: syz.5.1818 Not tainted 6.13.0-rc3-syzkaller-00762-g9268abe611b0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: <TASK> __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_circular_bug+0x13a/0x1b0 kernel/locking/lockdep.c:2074 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2206 check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x1ac/0xee0 kernel/locking/mutex.c:735 ax25_setsockopt+0xa55/0xe90 net/ax25/af_ax25.c:680 do_sock_setsockopt+0x3af/0x720 net/socket.c:2324 __sys_setsockopt net/socket.c:2349 [inline] __do_sys_setsockopt net/socket.c:2355 [inline] __se_sys_setsockopt net/socket.c:2352 [inline] __x64_sys_setsockopt+0x1ee/0x280 net/socket.c:2352 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 RIP: 0033:0x7f7b62385d29 Fixes: c433570458e4 ("ax25: fix a use-after-free in ax25_fillin_cb()") Reported-by: syzbot <syzkaller@googlegroups.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com> Link: https://patch.msgid.link/20250103210514.87290-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/linux/netdevice.h | 2 +- include/net/ax25.h | 10 +++++----- net/ax25/af_ax25.c | 12 ++++++------ net/ax25/ax25_dev.c | 4 ++-- net/ax25/ax25_ip.c | 3 ++- net/ax25/ax25_out.c | 22 +++++++++++++++++----- net/ax25/ax25_route.c | 2 ++ 7 files changed, 35 insertions(+), 20 deletions(-) commit 22cf4fae6660b6e1a583a41cbf84e3046ca9ccd0 Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Mon Dec 30 20:59:35 2024 +0100 soc: qcom: socinfo: Avoid out of bounds read of serial number On MSM8916 devices, the serial number exposed in sysfs is constant and does not change across individual devices. It's always: db410c:/sys/devices/soc0$ cat serial_number 2644893864 The firmware used on MSM8916 exposes SOCINFO_VERSION(0, 8), which does not have support for the serial_num field in the socinfo struct. There is an existing check to avoid exposing the serial number in that case, but it's not correct: When checking the item_size returned by SMEM, we need to make sure the *end* of the serial_num is within bounds, instead of comparing with the *start* offset. The serial_number currently exposed on MSM8916 devices is just an out of bounds read of whatever comes after the socinfo struct in SMEM. Fix this by changing offsetof() to offsetofend(), so that the size of the field is also taken into account. Cc: stable@vger.kernel.org Fixes: efb448d0a3fc ("soc: qcom: Add socinfo driver") Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241230-qcom-socinfo-serialno-oob-v1-1-9b7a890da3da@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/soc/qcom/socinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3bab40d5961453545ef39aeb5198d2e718c9693 Author: Prashanth K <quic_prashk@quicinc.com> Date: Tue Dec 31 13:39:32 2024 +0530 ARM: dts: qcom: sdx55: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On older targets like SM8150/SM8250/SM8350, there have been throughput issues seen during tethering use cases. 3. On targets like SDX75, intermittent disconnects were observed with certain cables due to impedence variations. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231080932.3149448-3-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 5c876b8609026770c63700c21055452fa5641e53 Author: Prashanth K <quic_prashk@quicinc.com> Date: Tue Dec 31 13:39:31 2024 +0530 ARM: dts: qcom: sdx65: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On older targets like SM8150/SM8250/SM8350, there have been throughput issues seen during tethering use cases. 3. On targets like SDX75, intermittent disconnects were observed with certain cables due to impedence variations. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231080932.3149448-2-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm/boot/dts/qcom/qcom-sdx65.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit de517118c5d3482411fd88141093fa838bc0af77 Author: Ethan Carter Edwards <ethan@ethancedwards.com> Date: Mon Dec 30 05:28:58 2024 +0000 clk: ti: use kcalloc() instead of kzalloc() Use 2-factor multiplication argument form kcalloc() instead of kzalloc(). Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com> Link: https://lore.kernel.org/r/xfjn4wqrhukvi45dkgkbulamq3242eijn7567vxwaxznh4ebdr@waat7u3l2mhi Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/clk/ti/mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit caa508a38ee570c9eaa2f4bea3929712a39815df Author: Dario Binacchi <dario.binacchi@amarulasolutions.com> Date: Tue Dec 31 16:01:41 2024 +0100 dt-bindings: clock: st,stm32mp1-rcc: complete the reference path All other paths referenced in the file follow a scheme starting from the Linux root. The patch adjusts the single file that deviated from this scheme, making it consistent with the others. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Link: https://lore.kernel.org/r/20241231150144.4035938-2-dario.binacchi@amarulasolutions.com Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org> Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5dcc2804d1173462eddfba14874fce0d3bc4dbb Author: Dario Binacchi <dario.binacchi@amarulasolutions.com> Date: Tue Dec 31 16:01:40 2024 +0100 dt-bindings: clock: st,stm32mp1-rcc: fix reference paths The path of the two files was wrong even at the time they were added. Let's fix them so they can be correctly referenced. Fixes: 722dc8a1d5c8 ("dt-bindings: rcc: stm32: add new compatible for STM32MP13 SoC") Fixes: 20107d7328cc ("dt-bindings: rcc: Convert stm32mp1 rcc bindings to json-schema") Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Link: https://lore.kernel.org/r/20241231150144.4035938-1-dario.binacchi@amarulasolutions.com Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org> Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14b77dc81213b35a7028d2cb52389473665b6d48 Author: Luca Weiss <luca.weiss@fairphone.com> Date: Fri Jan 3 12:12:01 2025 +0100 arm64: dts: qcom: qcm6490-fairphone-fp5: 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_l6p, the same supply that powers VCC of all the EEPROMs. Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250103-fp5-cam-eeprom-v1-5-88dee1b36f8e@fairphone.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit f8cc045b9db0d571f1fbd27de5e84b92d4319255 Author: Luca Weiss <luca.weiss@fairphone.com> Date: Fri Jan 3 12:12:00 2025 +0100 arm64: dts: qcom: qcm6490-fairphone-fp5: Prefix regulator-fixed label Add the common vreg_ prefix to the labels of the regulator-fixed. Also make sure the nodes are sorted alphabetically. Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250103-fp5-cam-eeprom-v1-4-88dee1b36f8e@fairphone.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 60 +++++++++++----------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 70c325ef6c979e5308edd7ef04077ceb6659d340 Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Fri Jan 3 12:07:08 2025 +0530 arm64: dts: qcom: ipq5424: configure spi0 node for rdp466 Enable the SPI0 node and configure the associated gpio pins. Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Link: https://lore.kernel.org/r/20250103063708.3256467-3-quic_mmanikan@quicinc.com [bjorn: Reorder nodes alphabetically] Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit dc39d7fa601b6d75cf8b0355f744465b723cadb1 Author: Andreas Kemnade <andreas@kemnade.info> Date: Sun Jan 5 18:08:54 2025 +0100 dt-bindings: clock: ti: Convert composite.txt to json-schema Convert the OMAP gate clock device tree binding to json-schema. Specify the creator of the original binding as a maintainer. Choose GPL-only license because original binding was also GPL. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Link: https://lore.kernel.org/r/20250105170854.408875-3-andreas@kemnade.info Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org> .../devicetree/bindings/clock/ti/composite.txt | 55 --------------- .../bindings/clock/ti/ti,composite-clock.yaml | 82 ++++++++++++++++++++++ 2 files changed, 82 insertions(+), 55 deletions(-) commit 524ba3abe726fd7207f1d187429f7ce552d6758e Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Fri Jan 3 12:07:07 2025 +0530 arm64: dts: qcom: ipq5424: add spi nodes Serial engines 4 and 5 on the IPQ5424 support SPI. Serial engine 4 is exclusively dedicated to SPI, whereas serial engine 5 is firmware based and supports SPI, I2C, and UART. The SPI instance operates on serial engine 4, designated as spi0, and on serial engine 5, designated as spi1. Add both the spi0 and spi1 nodes. Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250103063708.3256467-2-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/ipq5424.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit be7638a0d594a2be29f08799101a1ebe5d78256a Author: Andreas Kemnade <andreas@kemnade.info> Date: Sun Jan 5 18:08:53 2025 +0100 dt-bindings: clock: ti: Convert gate.txt to json-schema Convert the OMAP gate clock device tree binding to json-schema. Specify the creator of the original binding as a maintainer. Choose GPL-only license because original binding was also GPL. Clean up the examples during conversion to meet modern standards and remove examples with no additional value. Due to usage in code and existing devicetree binding, add the ti,set-rate-parent property. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Link: https://lore.kernel.org/r/20250105170854.408875-2-andreas@kemnade.info Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org> .../devicetree/bindings/clock/ti/gate.txt | 105 ----------------- .../bindings/clock/ti/ti,gate-clock.yaml | 125 +++++++++++++++++++++ 2 files changed, 125 insertions(+), 105 deletions(-) commit f81715a4c87c3b75ca2640bb61b6c66506061a64 Author: Luo Jie <quic_luoj@quicinc.com> Date: Fri Jan 3 15:31:35 2025 +0800 clk: qcom: Add CMN PLL clock controller driver for IPQ SoC The CMN PLL clock controller supplies clocks to the hardware blocks that together make up the Ethernet function on Qualcomm IPQ SoCs and to GCC. The driver is initially supported for IPQ9574 SoC. The CMN PLL clock controller expects a reference input clock from the on-board Wi-Fi block acting as clock source. The input reference clock needs to be configured to one of the supported clock rates. The controller supplies a number of fixed-rate output clocks. For the IPQ9574, there is one output clock of 353 MHZ to PPE (Packet Process Engine) hardware block, three 50 MHZ output clocks and an additional 25 MHZ output clock supplied to the connected Ethernet devices. The PLL also supplies a 24 MHZ clock as XO and a 32 KHZ sleep clock to GCC, and one 31.25 MHZ clock to PCS. Signed-off-by: Luo Jie <quic_luoj@quicinc.com> Acked-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250103-qcom_ipq_cmnpll-v8-2-c89fb4d4849d@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/ipq-cmn-pll.c | 435 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 445 insertions(+) commit 050b312654523aac9495eae3cf7bfa868fd981ce Author: Luo Jie <quic_luoj@quicinc.com> Date: Fri Jan 3 15:31:38 2025 +0800 arm64: dts: qcom: ipq9574: Update xo_board_clk to use fixed factor clock xo_board_clk is fixed to 24 MHZ, which is routed from WiFi output clock 48 MHZ (also being the reference clock of CMN PLL) divided 2 by analog block routing channel. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Luo Jie <quic_luoj@quicinc.com> Link: https://lore.kernel.org/r/20250103-qcom_ipq_cmnpll-v8-5-c89fb4d4849d@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi | 7 ++++++- arch/arm64/boot/dts/qcom/ipq9574.dtsi | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) commit 758aa2d7e3c0acfe9c952a1cbe6416ec6130c2a1 Author: Luo Jie <quic_luoj@quicinc.com> Date: Fri Jan 3 15:31:37 2025 +0800 arm64: dts: qcom: ipq9574: Add CMN PLL node The CMN PLL clock controller allows selection of an input clock rate from a defined set of input clock rates. It in-turn supplies fixed rate output clocks to the hardware blocks that provide the ethernet functions such as PPE (Packet Process Engine) and connected switch or PHY, and to GCC. The reference clock of CMN PLL is routed from XO to the CMN PLL through the internal WiFi block. .XO (48 MHZ or 96 MHZ)-->WiFi (multiplier/divider)-->48 MHZ to CMN PLL. The reference input clock from WiFi to CMN PLL is fully controlled by the bootstrap pins which select the XO frequency (48 MHZ or 96 MHZ). Based on this frequency, the divider in the internal Wi-Fi block is automatically configured by hardware (1 for 48 MHZ, 2 for 96 MHZ), to ensure output clock to CMN PLL is 48 MHZ. Signed-off-by: Luo Jie <quic_luoj@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250103-qcom_ipq_cmnpll-v8-4-c89fb4d4849d@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi | 17 +++++++++++++++- arch/arm64/boot/dts/qcom/ipq9574.dtsi | 26 +++++++++++++++++++++++- 2 files changed, 41 insertions(+), 2 deletions(-) commit a53c9b278add48d132bdcb716d27c9ad55bb86b5 Merge: 9875adffb87d c0f1cbf79509 Author: Bjorn Andersson <andersson@kernel.org> Date: Mon Jan 6 17:42:27 2025 -0600 Merge branch '20250103-qcom_ipq_cmnpll-v8-1-c89fb4d4849d@quicinc.com' into arm64-for-6.14 Merge the IPQ CMN PLL clock binding from its topic branch to gain access to the clock constants. commit 62ede76a7bd228a8389880792d133b8693b4cb68 Merge: f1080d8dab0f c0f1cbf79509 Author: Bjorn Andersson <andersson@kernel.org> Date: Mon Jan 6 17:41:49 2025 -0600 Merge branch '20250103-qcom_ipq_cmnpll-v8-1-c89fb4d4849d@quicinc.com' into clk-for-6.14 Merge the IPQ CMN PLL clock binding through a topic branch to make it available to DeviceTree source branches as well. commit c0f1cbf795095c21b92a46fa1dc47a7b787ce538 Author: Luo Jie <quic_luoj@quicinc.com> Date: Fri Jan 3 15:31:34 2025 +0800 dt-bindings: clock: qcom: Add CMN PLL clock controller for IPQ SoC The CMN PLL controller provides clocks to networking hardware blocks and to GCC on Qualcomm IPQ9574 SoC. It receives input clock from the on-chip Wi-Fi, and produces output clocks at fixed rates. These output rates are predetermined, and are unrelated to the input clock rate. The primary purpose of CMN PLL is to supply clocks to the networking hardware such as PPE (packet process engine), PCS and the externally connected switch or PHY device. The CMN PLL block also outputs fixed rate clocks to GCC, such as 24 MHZ as XO clock and 32 KHZ as sleep clock supplied to GCC. Signed-off-by: Luo Jie <quic_luoj@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250103-qcom_ipq_cmnpll-v8-1-c89fb4d4849d@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../bindings/clock/qcom,ipq9574-cmn-pll.yaml | 77 ++++++++++++++++++++++ include/dt-bindings/clock/qcom,ipq-cmn-pll.h | 22 +++++++ 2 files changed, 99 insertions(+) commit 9875adffb87da5c40f4013e55104f5e2fc071c2a Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Mon Dec 30 13:44:49 2024 +0100 arm64: dts: qcom: sm8150-microsoft-surface-duo: fix typos in da7280 properties The dlg,const-op-mode & dlg,periodic-op-mode were mis-names with twice the "dlg," prefix, drop one to match the bindings. This fixes: sm8150-microsoft-surface-duo.dtb: da7280@4a: 'dlg,const-op-mode' is a required property from schema $id: http://devicetree.org/schemas/input/dlg,da7280.yaml# m8150-microsoft-surface-duo.dtb: da7280@4a: 'dlg,periodic-op-mode' is a required property from schema $id: http://devicetree.org/schemas/input/dlg,da7280.yaml# sm8150-microsoft-surface-duo.dtb: da7280@4a: 'dlg,dlg,const-op-mode', 'dlg,dlg,periodic-op-mode' do not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/input/dlg,da7280.yaml# With the dlg,da7280.yaml converted from dlg,da7280.txt at [1]. [1] https://lore.kernel.org/all/20241206-topic-misc-da7280-convert-v2-1-1c3539f75604@linaro.org/ Fixes: d1f781db47a8 ("arm64: dts: qcom: add initial device-tree for Microsoft Surface Duo") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241230-topic-misc-dt-fixes-v4-6-1e6880e9dda3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8150-microsoft-surface-duo.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 092febd32a99800902f865ed86b83314faa9c7e4 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Mon Dec 30 13:44:48 2024 +0100 arm64: dts: qcom: sc7180: fix psci power domain node names Rename the psci power domain node names to match the bindings. This Fixes: sc7180-acer-aspire1.dts: psci: 'cpu-cluster0', 'cpu0', 'cpu1', 'cpu2', 'cpu3', 'cpu4', 'cpu5', 'cpu6', 'cpu7' do not match any of the regexes: '^power-domain-', 'pinctrl-[0-9]+' Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241230-topic-misc-dt-fixes-v4-5-1e6880e9dda3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sc7180.dtsi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 9180b38d706c29ed212181a77999c35ae9ff6879 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Mon Dec 30 13:44:47 2024 +0100 arm64: dts: qcom: sc7180-trogdor-pompom: rename 5v-choke thermal zone Rename the 5v-choke thermal zone to satisfy the bindings. This fixes: sc7180-trogdor-pompom-r2-lte.dts: thermal-zones: '5v-choke-thermal' does not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,10}-thermal$', 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/thermal/thermal-zones.yaml# Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241230-topic-misc-dt-fixes-v4-4-1e6880e9dda3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa09de104d421e7ff8d8cde9af98568ce62a002c Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Mon Dec 30 13:44:46 2024 +0100 arm64: dts: qcom: sc7180-trogdor-quackingstick: add missing avee-supply The bindings requires the avee-supply, use the same regulator as the avdd (positive voltage) which would also provide the negative voltage by definition. The fixes: sc7180-trogdor-quackingstick-r0.dts: panel@0: 'avee-supply' is a required property from schema $id: http://devicetree.org/schemas/display/panel/boe,tv101wum-nl6.yaml# Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241230-topic-misc-dt-fixes-v4-3-1e6880e9dda3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sc7180-trogdor-quackingstick.dtsi | 1 + 1 file changed, 1 insertion(+) commit 80b47f14d5433068dd6738c9e6e17ff6648bae41 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Mon Dec 30 13:44:45 2024 +0100 arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: remove disabled ov7251 camera The ov7251node has bindings check errors in the endpoint, and the camera node was disabled since the beginning. Even when switching the node to okay, the endpoint description to the csiphy is missing along with the csiphy parameters. Drop the ov7251 camera entirely until it's properly described. This obviously fixes: sdm845-db845c-navigation-mezzanine.dtso: camera@60: port:endpoint:data-lanes: [0, 1] is too long from schema $id: http://devicetree.org/schemas/media/i2c/ovti,ov7251.yaml# Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241230-topic-misc-dt-fixes-v4-2-1e6880e9dda3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../qcom/sdm845-db845c-navigation-mezzanine.dtso | 42 ---------------------- 1 file changed, 42 deletions(-) commit abb00f0fbf31d71b9f725e58d6a29634175f28a8 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Mon Dec 30 13:44:44 2024 +0100 arm64: dts: qcom: qcm6490-shift-otter: remove invalid orientation-switch The orientation-switch property is not documented in the PHY bindings, remove it. This fixes: qcm6490-shift-otter.dts: phy@88e3000: 'orientation-switch' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/phy/qcom,usb-snps-femto-v2.yaml# Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241230-topic-misc-dt-fixes-v4-1-1e6880e9dda3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts | 2 -- 1 file changed, 2 deletions(-) commit ad455e48bba7f21bb5108406da0854cf8dede8ea Author: Aaro Koskinen <aaro.koskinen@iki.fi> Date: Wed Jan 1 14:12:15 2025 +0200 ARM: omap1: Fix up the Retu IRQ on Nokia 770 The Retu IRQ is off by one, as a result the power button does not work. Fix it. Fixes: 084b6f216778 ("ARM: omap1: Fix up the Nokia 770 board device IRQs") Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/Z3UxH_fOzuftjnuX@darkstar.musicnaut.iki.fi Signed-off-by: Kevin Hilman <khilman@baylibre.com> arch/arm/mach-omap1/board-nokia770.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 643cc5ca01ce462f2e2856eda60400e9a7052bb9 Author: Andreas Kemnade <andreas@kemnade.info> Date: Sun Dec 29 15:44:59 2024 +0100 ARM: omap2plus_defconfig: enable charger of TWL603X Enable the newly-added charger of TWL603X in the defconfig since it is used by the Epson Moverio BT200. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reviewed-by: Roger Quadros <rogerq@kernel.org> Link: https://lore.kernel.org/r/20241229144459.9742-1-andreas@kemnade.info Signed-off-by: Kevin Hilman <khilman@baylibre.com> arch/arm/configs/omap2plus_defconfig | 1 + 1 file changed, 1 insertion(+) commit b7fdfac3f372b9d633cca6c1c54878118c8a5932 Author: Prashanth K <quic_prashk@quicinc.com> Date: Tue Dec 31 13:41:15 2024 +0530 arm64: dts: qcom: sc8180x: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On QCS6490-Rb3Gen2 Vision kit, ADB connection is heavily unstable when U1/U2 is enabled. Often when link enters U2, there is a re- enumeration seen and device is unusable for many use cases. 3. On QCS8300/QCS9100, it is observed that when Link enters U2, when the cable is disconnected and reconnected to host PC in HS, there is no link status change interrupt seen and the plug-in in HS doesn't show up a bus reset and enumeration failure happens. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-18-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sc8180x.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 49cfd97a335acbbdc9737e471a8ea3cbcea6c476 Author: Prashanth K <quic_prashk@quicinc.com> Date: Tue Dec 31 13:41:14 2024 +0530 arm64: dts: qcom: sc8280xp: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On QCS6490-Rb3Gen2 Vision kit, ADB connection is heavily unstable when U1/U2 is enabled. Often when link enters U2, there is a re- enumeration seen and device is unusable for many use cases. 3. On QCS8300/QCS9100, it is observed that when Link enters U2, when the cable is disconnected and reconnected to host PC in HS, there is no link status change interrupt seen and the plug-in in HS doesn't show up a bus reset and enumeration failure happens. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-17-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit f70a41cefdd457d21198aeb5a062b98fddf780b3 Author: Prashanth K <quic_prashk@quicinc.com> Date: Tue Dec 31 13:41:13 2024 +0530 arm64: dts: qcom: qdu1000: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On QCS6490-Rb3Gen2 Vision kit, ADB connection is heavily unstable when U1/U2 is enabled. Often when link enters U2, there is a re- enumeration seen and device is unusable for many use cases. 3. On QCS8300/QCS9100, it is observed that when Link enters U2, when the cable is disconnected and reconnected to host PC in HS, there is no link status change interrupt seen and the plug-in in HS doesn't show up a bus reset and enumeration failure happens. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-16-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qdu1000.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 9555a30e5f5d6fe97eed96907e867dc7543e1ccf Author: Prashanth K <quic_prashk@quicinc.com> Date: Tue Dec 31 13:41:12 2024 +0530 arm64: dts: qcom: x1e80100: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On QCS6490-Rb3Gen2 Vision kit, ADB connection is heavily unstable when U1/U2 is enabled. Often when link enters U2, there is a re- enumeration seen and device is unusable for many use cases. 3. On QCS8300/QCS9100, it is observed that when Link enters U2, when the cable is disconnected and reconnected to host PC in HS, there is no link status change interrupt seen and the plug-in in HS doesn't show up a bus reset and enumeration failure happens. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-15-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 69336441c3c2dec512ed9c46d977c6587ebc795a Author: Prashanth K <quic_prashk@quicinc.com> Date: Tue Dec 31 13:41:11 2024 +0530 arm64: dts: qcom: sc7180: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On QCS6490-Rb3Gen2 Vision kit, ADB connection is heavily unstable when U1/U2 is enabled. Often when link enters U2, there is a re- enumeration seen and device is unusable for many use cases. 3. On QCS8300/QCS9100, it is observed that when Link enters U2, when the cable is disconnected and reconnected to host PC in HS, there is no link status change interrupt seen and the plug-in in HS doesn't show up a bus reset and enumeration failure happens. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-14-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit fc492c79faac5b44cb548578e35467873391094c Author: Prashanth K <quic_prashk@quicinc.com> Date: Tue Dec 31 13:41:10 2024 +0530 arm64: dts: qcom: qcs404: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On QCS6490-Rb3Gen2 Vision kit, ADB connection is heavily unstable when U1/U2 is enabled. Often when link enters U2, there is a re- enumeration seen and device is unusable for many use cases. 3. On QCS8300/QCS9100, it is observed that when Link enters U2, when the cable is disconnected and reconnected to host PC in HS, there is no link status change interrupt seen and the plug-in in HS doesn't show up a bus reset and enumeration failure happens. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-13-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs404.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit cd2a6747583b441ad898834d3dd246ed271ad35d Author: Prashanth K <quic_prashk@quicinc.com> Date: Tue Dec 31 13:41:09 2024 +0530 arm64: dts: qcom: sdx75: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On older targets like SM8150/SM8250/SM8350, there have been throughput issues seen during tethering use cases. 3. On targets like SDX75, intermittent disconnects were observed with certain cables due to impedence variations. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-12-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sdx75.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit c6b3c16f2c627a487653bc52d99b05a2bc453dc0 Author: Prashanth K <quic_prashk@quicinc.com> Date: Tue Dec 31 13:41:08 2024 +0530 arm64: dts: qcom: sdm845: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On older targets like SM8150/SM8250/SM8350, there have been throughput issues seen during tethering use cases. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-11-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 10b4593ba0f8b410d946d587828e6cae8f7cc78b Author: Prashanth K <quic_prashk@quicinc.com> Date: Tue Dec 31 13:41:07 2024 +0530 arm64: dts: qcom: sdm630: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On older targets like SM8150/SM8250/SM8350, there have been throughput issues seen during tethering use cases. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-10-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sdm630.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 1052c4c63639ade18bfa2902371fd5e6c44b01e4 Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Date: Tue Dec 31 13:41:06 2024 +0530 arm64: dts: qcom: sa8775p: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On QCS6490-Rb3Gen2 Vision kit, ADB connection is heavily unstable when U1/U2 is enabled. Often when link enters U2, there is a re- enumeration seen and device is unusable for many use cases. 3. On QCS8300/QCS9100, it is observed that when Link enters U2, when the cable is disconnected and reconnected to host PC in HS, there is no link status change interrupt seen and the plug-in in HS doesn't show up a bus reset and enumeration failure happens. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Link: https://lore.kernel.org/r/20241231081115.3149850-9-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sa8775p.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 0a13ba449afd4158cc981ff8b53d5c62aa34b377 Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Date: Tue Dec 31 13:41:05 2024 +0530 arm64: dts: qcom: sc7280: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On QCS6490-Rb3Gen2 Vision kit, ADB connection is heavily unstable when U1/U2 is enabled. Often when link enters U2, there is a re- enumeration seen and device is unusable for many use cases. 3. On QCS8300/QCS9100, it is observed that when Link enters U2, when the cable is disconnected and reconnected to host PC in HS, there is no link status change interrupt seen and the plug-in in HS doesn't show up a bus reset and enumeration failure happens. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-8-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sc7280.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 8e252c3e4500eb8708de1d6e9ebead55a78a5d5d Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Date: Tue Dec 31 13:41:04 2024 +0530 arm64: dts: qcom: sm6350: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On older targets like SM8150/SM8250/SM8350, there have been throughput issues seen during tethering use cases. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-7-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 06fcb653237b91e4befed93254b7c53e0d6139dc Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Date: Tue Dec 31 13:41:03 2024 +0530 arm64: dts: qcom: sm8250: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On older targets like SM8150/SM8250/SM8350, there have been throughput issues seen during tethering use cases. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-6-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8250.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 2c1cf4b8cd8b4c574f1e367fd7f4fd44c1a1169a Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Date: Tue Dec 31 13:41:02 2024 +0530 arm64: dts: qcom: sm6125: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On older targets like SM8150/SM8250/SM8350, there have been throughput issues seen during tethering use cases. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-5-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 20f36ce4db5b544de640b5e47ac656fdd97b4896 Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Date: Tue Dec 31 13:41:01 2024 +0530 arm64: dts: qcom: sm8150: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On older targets like SM8150/SM8250/SM8350, there have been throughput issues seen during tethering use cases. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-4-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8150.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit f9a963fc2510d32916e2e730c1b326c2ab3d312e Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Date: Tue Dec 31 13:41:00 2024 +0530 arm64: dts: qcom: sm8450: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On older targets like SM8150/SM8250/SM8350, there have been throughput issues seen during tethering use cases. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-3-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 8582f8cee2f015ff4b8c5df3221917f3878f4c2a Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Date: Tue Dec 31 13:40:59 2024 +0530 arm64: dts: qcom: sm8350: Disable USB U1/U2 entry Disable U1 and U2 power-saving states to improve stability of USB. These low-power link states, designed to reduce power consumption during idle periods, can cause issues in latency-sensitive or high throughput use cases. Over the years, some of the issues seen are as follows: 1. In device mode of operation, when UVC is active, enabling U1/U2 is sometimes causing packets drops due to delay in entry/exit of intermittent these low power states. These packet drops are often reflected as missed isochronous transfers, as the controller wasn't able to send packet in that microframe interval and hence glitches are seen on the final transmitted video output. 2. On older targets like SM8150/SM8250/SM8350, there have been throughput issues seen during tethering use cases. Disabling these intermittent power states enhances device stability without affecting power usage. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Signed-off-by: Prashanth K <quic_prashk@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241231081115.3149850-2-quic_prashk@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8350.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 3f9f5cd005f5b5243eaa2647d40b9857fa1a901d Author: Guillaume Nault <gnault@redhat.com> Date: Thu Jan 2 17:34:18 2025 +0100 sctp: Prepare sctp_v4_get_dst() to dscp_t conversion. Define inet_sk_dscp() to get a dscp_t value from struct inet_sock, so that sctp_v4_get_dst() can easily set ->flowi4_tos from a dscp_t variable. For the SCTP_DSCP_SET_MASK case, we can just use inet_dsfield_to_dscp() to get a dscp_t value. Then, when converting ->flowi4_tos from __u8 to dscp_t, we'll just have to drop the inet_dscp_to_dsfield() conversion function. Signed-off-by: Guillaume Nault <gnault@redhat.com> Acked-by: Xin Long <lucien.xin@gmail.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/1a645f4a0bc60ad18e7c0916642883ce8a43c013.1735835456.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/inet_sock.h | 6 ++++++ net/sctp/protocol.c | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) commit 286bb9985f369c47eaa84f27ef6993bab51a41e3 Merge: 71ecb1a6b3d2 c75889081366 Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Jan 6 13:32:46 2025 -0800 Merge branch 'igc-deadcoding' Dr. David Alan Gilbert says: ==================== igc deadcoding This set removes some functions that are entirely unused and have been since ~2018. ==================== Link: https://patch.msgid.link/20250102174142.200700-1-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit f44275e7155dc310d36516fc25be503da099781c Author: Ihor Solodrai <ihor.solodrai@pm.me> Date: Mon Jan 6 20:17:31 2025 +0000 selftests/bpf: add -fno-strict-aliasing to BPF_CFLAGS Following the discussion at [1], set -fno-strict-aliasing flag for all BPF object build rules. Remove now unnecessary <test>-CFLAGS variables. [1] https://lore.kernel.org/bpf/20250106185447.951609-1-ihor.solodrai@pm.me/ CC: Jose E. Marchesi <jose.marchesi@oracle.com> Signed-off-by: Ihor Solodrai <ihor.solodrai@pm.me> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/r/20250106201728.1219791-1-ihor.solodrai@pm.me Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/Makefile | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) commit c758890813665edca9b66e020c52646c84b7b694 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Jan 2 17:41:42 2025 +0000 igc: Remove unused igc_read/write_pcie_cap_reg The last uses of igc_read_pcie_cap_reg() and igc_write_pcie_cap_reg() were removed in 2019 by commit 16ecd8d9af26 ("igc: Remove the obsolete workaround") Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250102174142.200700-4-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/igc/igc_hw.h | 3 --- drivers/net/ethernet/intel/igc/igc_main.c | 25 ------------------------- 2 files changed, 28 deletions(-) commit 121c3c6bc661039104119a18ad0730540b353eaf Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Jan 2 17:41:41 2025 +0000 igc: Remove unused igc_read/write_pci_cfg wrappers igc_read_pci_cfg() and igc_write_pci_cfg were added in 2018 as part of commit 146740f9abc4 ("igc: Add support for PF") but have remained unused. Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250102174142.200700-3-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/igc/igc_hw.h | 2 -- drivers/net/ethernet/intel/igc/igc_main.c | 14 -------------- 2 files changed, 16 deletions(-) commit b37dba891b17703bd249b4b7a8c4eb04482e2692 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Jan 2 17:41:40 2025 +0000 igc: Remove unused igc_acquire/release_nvm igc_acquire_nvm() and igc_release_nvm() were added in 2018 as part of commit ab4056126813 ("igc: Add NVM support") but never used. Remove them. The igc_1225.c has it's own specific implementations. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250102174142.200700-2-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/igc/igc_nvm.c | 50 -------------------------------- drivers/net/ethernet/intel/igc/igc_nvm.h | 2 -- 2 files changed, 52 deletions(-) commit 71ecb1a6b3d2894cf759b41808d7b5286f829d1f Merge: 3e5908172c05 47ea5d4e6f40 Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Jan 6 13:31:52 2025 -0800 Merge branch 'i40e-deadcoding' Dr. David Alan Gilbert says: ==================== i40e deadcoding This is a bunch of deadcoding of functions that are entirely uncalled in the i40e driver. Build tested only. ==================== Link: https://patch.msgid.link/20250102173717.200359-1-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 47ea5d4e6f40446eddaf308eed942a3d3a9397e9 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Jan 2 17:37:17 2025 +0000 i40e: Remove unused i40e_dcb_hw_get_num_tc The last useof i40e_dcb_hw_get_num_tc() was removed in 2022 by commit fe20371578ef ("Revert "i40e: Fix reset bw limit when DCB enabled with 1 TC"") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250102173717.200359-10-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/i40e/i40e_dcb.c | 13 ------------- drivers/net/ethernet/intel/i40e/i40e_dcb.h | 1 - 2 files changed, 14 deletions(-) commit d424b93f35a61dc1147ef816cb3ae151395af656 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Jan 2 17:37:16 2025 +0000 i40e: Remove unused i40e_asq_send_command_v2 i40e_asq_send_command_v2() was added in 2022 by commit 74073848b0d7 ("i40e: Add new versions of send ASQ command functions") but hasn't been used. Remove it. (The _atomic_v2 version of the function is used, so leave it). Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250102173717.200359-9-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/i40e/i40e_adminq.c | 10 ---------- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 7 ------- 2 files changed, 17 deletions(-) commit a324484ac855a6770c6e7220b2ce09810a625f75 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Jan 2 17:37:15 2025 +0000 i40e: Remove unused i40e_commit_partition_bw_setting i40e_commit_partition_bw_setting() was added in 2017 by commit 4fc8c6763957 ("i40e: genericize the partition bandwidth control") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250102173717.200359-8-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/i40e/i40e.h | 1 - drivers/net/ethernet/intel/i40e/i40e_main.c | 83 ----------------------------- 2 files changed, 84 deletions(-) commit 38dfb07d9a65dd408bc50f0cc8e49a5381bc40f5 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Jan 2 17:37:14 2025 +0000 i40e: Remove unused i40e_del_filter The last use of i40e_del_filter() was removed in 2016 by commit 9569a9a4547d ("i40e: when adding or removing MAC filters, correctly handle VLANs") Remove it. Fix up a comment that referenced it. Note: The __ version of this function is still used. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250102173717.200359-7-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/i40e/i40e.h | 1 - drivers/net/ethernet/intel/i40e/i40e_main.c | 28 ++-------------------------- 2 files changed, 2 insertions(+), 27 deletions(-) commit 3eb24a9e0af3a336da8af0bf37140203f742b493 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Jan 2 17:37:13 2025 +0000 i40e: Remove unused i40e_get_cur_guaranteed_fd_count The last use of i40e_get_cur_guaranteed_fd_count() was removed in 2015 by commit 04294e38a451 ("i40e: FD filters flush policy changes") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250102173717.200359-6-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/i40e/i40e.h | 1 - drivers/net/ethernet/intel/i40e/i40e_main.c | 13 ------------- 2 files changed, 14 deletions(-) commit 81d6bb2012e1d6410bc88dcb331113126a13a6ee Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Jan 2 17:37:12 2025 +0000 i40e: Deadcode profile code i40e_add_pinfo_to_list() was added in 2017 by commit 1d5c960c5ef5 ("i40e: new AQ commands") i40e_find_section_in_profile() was added in 2019 by commit cdc594e00370 ("i40e: Implement DDP support in i40e driver") Neither have been used. Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250102173717.200359-5-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/i40e/i40e_common.c | 72 ------------------------ drivers/net/ethernet/intel/i40e/i40e_prototype.h | 8 --- 2 files changed, 80 deletions(-) commit 8cc51e28ecce4c8b3a96d7802b543553d11f682c Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Jan 2 17:37:11 2025 +0000 i40e: Remove unused i40e_(read|write)_phy_register i40e_read_phy_register() and i40e_write_phy_register() were added in 2016 by commit f62ba91458b5 ("i40e: Add functions which apply correct PHY access method for read and write operation") but haven't been used. Remove them. (There are more specific _clause* variants of these functions that are still used.) Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250102173717.200359-4-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/i40e/i40e_common.c | 78 ------------------------ drivers/net/ethernet/intel/i40e/i40e_prototype.h | 4 -- 2 files changed, 82 deletions(-) commit 39cabb01d26d2d27bd4794c62e67349d86f8b1df Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Jan 2 17:37:10 2025 +0000 i40e: Remove unused i40e_blink_phy_link_led i40e_blink_phy_link_led() was added in 2016 by commit fd077cd3399b ("i40e: Add functions to blink led on 10GBaseT PHY") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250102173717.200359-3-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/i40e/i40e_common.c | 74 ------------------------ drivers/net/ethernet/intel/i40e/i40e_prototype.h | 4 -- 2 files changed, 78 deletions(-) commit 59ec698d01ebb5bae4865f6083bb9f398e39d63b Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Jan 2 17:37:09 2025 +0000 i40e: Deadcode i40e_aq_* i40e_aq_add_mirrorrule(), i40e_aq_delete_mirrorrule() and i40e_aq_set_vsi_vlan_promisc() were added in 2016 by commit 7bd6875bef70 ("i40e: APIs to Add/remove port mirroring rules") but haven't been used. They were the last user of i40e_mirrorrule_op(). i40e_aq_rearrange_nvm() was added in 2018 by commit f05798b4ff82 ("i40e: Add AQ command for rearrange NVM structure") but hasn't been used. i40e_aq_restore_lldp() was added in 2019 by commit c65e78f87f81 ("i40e: Further implementation of LLDP") but hasn't been used. Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250102173717.200359-2-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/i40e/i40e_common.c | 234 ----------------------- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 17 -- 2 files changed, 251 deletions(-) commit 36036a164fac96727ed724a388dae38d2f5f21c1 Author: Luca Weiss <luca.weiss@fairphone.com> Date: Fri Jan 3 12:11:59 2025 +0100 dt-bindings: eeprom: at24: Add compatible for Puya P24C256C Add the compatible for an 256Kb EEPROM from Puya. Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20250103-fp5-cam-eeprom-v1-3-88dee1b36f8e@fairphone.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Documentation/devicetree/bindings/eeprom/at24.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit eace9d83c831c44b4f63beec18774fe4a46d12cc Author: Luca Weiss <luca.weiss@fairphone.com> Date: Fri Jan 3 12:11:58 2025 +0100 dt-bindings: vendor-prefixes: Add Puya Semiconductor (Shanghai) Co., Ltd. Add the vendor prefix for a manufacturer of EEPROM chips among others. Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20250103-fp5-cam-eeprom-v1-2-88dee1b36f8e@fairphone.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 56d4ef115cc51b1fe7de1e695923126923c9f9bf Author: Luca Weiss <luca.weiss@fairphone.com> Date: Fri Jan 3 12:11:57 2025 +0100 dt-bindings: eeprom: at24: Add compatible for Giantec GT24P128F Add the compatible for another 128Kb EEPROM from Giantec. Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20250103-fp5-cam-eeprom-v1-1-88dee1b36f8e@fairphone.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Documentation/devicetree/bindings/eeprom/at24.yaml | 1 + 1 file changed, 1 insertion(+) commit 6c9c97387be1bf4a5881fe1a6cd00acd4322f283 Author: Kent Russell <kent.russell@amd.com> Date: Thu Jan 2 09:21:46 2025 -0500 drm/amdgpu: Remove unnecessary NULL check container_of cannot return NULL, so it is unnecessary to check for NULL after gem_to_amdgpu_bo, which is just a container_of call Signed-off-by: Kent Russell <kent.russell@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 24a1b66752bb646f2905b6d952a712e61155c9ca Author: Asad Kamal <asad.kamal@amd.com> Date: Fri Nov 22 18:00:19 2024 +0800 drm/amd/pm: Fill max mem bw & total app clk counter Fill max memory bandwidth and total app clock counter to metrics v1_7 v2: Remove unnecessary check v3: Add app clock counter support for apu Signed-off-by: Asad Kamal <asad.kamal@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 6caf95b771047dac1cf0f520e0e93aa0e84f59ed Author: Asad Kamal <asad.kamal@amd.com> Date: Fri Nov 22 16:50:56 2024 +0800 drm/amd/pm: Update SMUv13.0.6 PMFW headers Update pmfw headers for smuv13.0.6 to pmfw version 85.121 Signed-off-by: Asad Kamal <asad.kamal@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 3318ba94e56b9183d0304577c74b33b6b01ce516 Author: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com> Date: Tue Dec 10 12:50:08 2024 +0530 drm/amdgpu: Add a lock when accessing the buddy trim function When running YouTube videos and Steam games simultaneously, the tester found a system hang / race condition issue with the multi-display configuration setting. Adding a lock to the buddy allocator's trim function would be the solution. <log snip> [ 7197.250436] general protection fault, probably for non-canonical address 0xdead000000000108 [ 7197.250447] RIP: 0010:__alloc_range+0x8b/0x340 [amddrm_buddy] [ 7197.250470] Call Trace: [ 7197.250472] <TASK> [ 7197.250475] ? show_regs+0x6d/0x80 [ 7197.250481] ? die_addr+0x37/0xa0 [ 7197.250483] ? exc_general_protection+0x1db/0x480 [ 7197.250488] ? drm_suballoc_new+0x13c/0x93d [drm_suballoc_helper] [ 7197.250493] ? asm_exc_general_protection+0x27/0x30 [ 7197.250498] ? __alloc_range+0x8b/0x340 [amddrm_buddy] [ 7197.250501] ? __alloc_range+0x109/0x340 [amddrm_buddy] [ 7197.250506] amddrm_buddy_block_trim+0x1b5/0x260 [amddrm_buddy] [ 7197.250511] amdgpu_vram_mgr_new+0x4f5/0x590 [amdgpu] [ 7197.250682] amdttm_resource_alloc+0x46/0xb0 [amdttm] [ 7197.250689] ttm_bo_alloc_resource+0xe4/0x370 [amdttm] [ 7197.250696] amdttm_bo_validate+0x9d/0x180 [amdttm] [ 7197.250701] amdgpu_bo_pin+0x15a/0x2f0 [amdgpu] [ 7197.250831] amdgpu_dm_plane_helper_prepare_fb+0xb2/0x360 [amdgpu] [ 7197.251025] ? try_wait_for_completion+0x59/0x70 [ 7197.251030] drm_atomic_helper_prepare_planes.part.0+0x2f/0x1e0 [ 7197.251035] drm_atomic_helper_prepare_planes+0x5d/0x70 [ 7197.251037] drm_atomic_helper_commit+0x84/0x160 [ 7197.251040] drm_atomic_nonblocking_commit+0x59/0x70 [ 7197.251043] drm_mode_atomic_ioctl+0x720/0x850 [ 7197.251047] ? __pfx_drm_mode_atomic_ioctl+0x10/0x10 [ 7197.251049] drm_ioctl_kernel+0xb9/0x120 [ 7197.251053] ? srso_alias_return_thunk+0x5/0xfbef5 [ 7197.251056] drm_ioctl+0x2d4/0x550 [ 7197.251058] ? __pfx_drm_mode_atomic_ioctl+0x10/0x10 [ 7197.251063] amdgpu_drm_ioctl+0x4e/0x90 [amdgpu] [ 7197.251186] __x64_sys_ioctl+0xa0/0xf0 [ 7197.251190] x64_sys_call+0x143b/0x25c0 [ 7197.251193] do_syscall_64+0x7f/0x180 [ 7197.251197] ? srso_alias_return_thunk+0x5/0xfbef5 [ 7197.251199] ? amdgpu_display_user_framebuffer_create+0x215/0x320 [amdgpu] [ 7197.251329] ? drm_internal_framebuffer_create+0xb7/0x1a0 [ 7197.251332] ? srso_alias_return_thunk+0x5/0xfbef5 Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com> Fixes: 4a5ad08f5377 ("drm/amdgpu: Add address alignment support to DCC buffers") Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c901693f368f99a858bd410576427adc6a518612 Author: Zhu Lingshan <lingshan.zhu@amd.com> Date: Mon Jul 29 19:28:36 2024 +0800 drm/amdkfd: always include uapi header in priv.h The header usr/linux/kfd_ioctl.h is a duplicate of uapi/linux/kfd_ioctl.h. And it is actually not a file in the source code tree. Ideally, the usr version should be updated whenever the source code is recompiled. However, I have noticed a discrepancy between the two headers even after rebuilding the kernel. This commit modifies kfd_priv.h to always include the header from uapi to ensure the latest changes are reflected. We should always include the source code header other than the duplication. Signed-off-by: Zhu Lingshan <lingshan.zhu@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b11179e1878fafcc5c63de726d1b6b8b281e8e9 Author: Prike Liang <Prike.Liang@amd.com> Date: Mon Dec 16 16:37:58 2024 +0800 drm/amdgpu: reduce RLC safe mode request for gfx clock gating The driver can only request one time for the power safe mode instead of polling and disabling the power feature each time prior to program the GFX clock gating control registers. This update will reduce the latency on the GFX clock gating entry. Signed-off-by: Prike Liang <Prike.Liang@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 12 ++++-------- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 14 ++------------ 2 files changed, 6 insertions(+), 20 deletions(-) commit a5d258a00b41143d9c64880eed35799d093c4782 Author: Aurabindo Pillai <aurabindo.pillai@amd.com> Date: Thu Jan 2 13:12:24 2025 -0500 Revert "drm/amd/display: Optimize cursor position updates" This reverts commit 88c7c56d07c108ed4de319c8dba44aa4b8a38dd1. SW and HW state are not always matching in some cases causing cursor to be disabled. Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Reviewed-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c | 7 +++---- drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c | 6 ++---- drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c | 8 +++----- drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c | 10 ++++------ 4 files changed, 12 insertions(+), 19 deletions(-) commit 8b248b90450776c2b59c4a372cb9520e25ff010b Author: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Date: Wed Nov 6 07:49:00 2024 +0530 drm/amdgpu/gfx10: Add cleaner shader for GFX10.3.0 This commit adds the cleaner shader microcode for GFX10.3.0 GPUs. The cleaner shader is a piece of GPU code that is used to clear or initialize certain GPU resources, such as Local Data Share (LDS), Vector General Purpose Registers (VGPRs), and Scalar General Purpose Registers (SGPRs). Clearing these resources is important for ensuring data isolation between different workloads running on the GPU. Without the cleaner shader, residual data from a previous workload could potentially be accessed by a subsequent workload, leading to data leaks and incorrect computation results. The cleaner shader microcode is represented as an array of 32-bit words (`gfx_10_3_0_cleaner_shader_hex`). This array is the binary representation of the cleaner shader code, which is written in a low-level GPU instruction set. When the cleaner shader feature is enabled, the AMDGPU driver loads this array into a specific location in the GPU memory. The GPU then reads this memory location to fetch and execute the cleaner shader instructions. The cleaner shader is executed automatically by the GPU at the end of each workload, before the next workload starts. This ensures that all GPU resources are in a clean state before the start of each workload. This addition is part of the cleaner shader feature implementation. The cleaner shader feature helps resource utilization by cleaning up GPU resources after they are used. It also enhances security and reliability by preventing data leaks between workloads. Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 15 +++ .../gpu/drm/amd/amdgpu/gfx_v10_0_cleaner_shader.h | 56 ++++++++++ .../drm/amd/amdgpu/gfx_v10_3_0_cleaner_shader.asm | 124 +++++++++++++++++++++ 3 files changed, 195 insertions(+) commit 03cc84b102d1a832e8dfc59344346dedcebcdf42 Author: Kun Liu <Kun.Liu2@amd.com> Date: Fri Dec 27 11:43:22 2024 +0800 drm/amd/pm: fix BUG: scheduling while atomic atomic scheduling will be triggered in interrupt handler for AC/DC mode switch as following backtrace. Call Trace: <IRQ> dump_stack_lvl __schedule_bug __schedule schedule schedule_preempt_disabled __mutex_lock smu_cmn_send_smc_msg_with_param smu_v13_0_irq_process amdgpu_irq_dispatch amdgpu_ih_process amdgpu_irq_handler __handle_irq_event_percpu handle_irq_event handle_edge_irq __common_interrupt common_interrupt </IRQ> <TASK> asm_common_interrupt Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Kenneth Feng <kenneth.feng@amd.com> Signed-off-by: Kun Liu <Kun.Liu2@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 ++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 12 ++++++------ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) commit 9095567bc31bd404be54b0616bdb705011ee2cd9 Author: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Date: Fri Dec 13 16:46:42 2024 +0530 drm/amdgpu: Fix error handling in amdgpu_ras_add_bad_pages It ensures that appropriate error codes are returned when an error condition is detected Fixes the below; drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2849 amdgpu_ras_add_bad_pages() warn: missing error code here? 'amdgpu_umc_pages_in_a_row()' failed. drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2884 amdgpu_ras_add_bad_pages() warn: missing error code here? 'amdgpu_ras_mca2pa()' failed. v2: s/-EIO/-EINVAL, retained the use of -EINVAL from amdgpu_umc_pages_in_a_row & and amdgpu_ras_mca2pa_by_idx, when the RAS context is not initialized or the convert_ras_err_addr function is unavailable. (Thomas) V3: Returning 0 as the absence of eh_data is acceptable. (Tao) Fixes: a8d133e625ce ("drm/amdgpu: parse legacy RAS bad page mixed with new data in various NPS modes") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Cc: YiPeng Chai <yipeng.chai@amd.com> Cc: Tao Zhou <tao.zhou1@amd.com> Cc: Hawking Zhang <Hawking.Zhang@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 2774ef7625adb5fb9e9265c26a59dca7b8fd171e Author: Zhu Lingshan <lingshan.zhu@amd.com> Date: Wed Dec 11 11:51:13 2024 +0800 drm/amdkfd: wq_release signals dma_fence only when available kfd_process_wq_release() signals eviction fence by dma_fence_signal() which wanrs if dma_fence is NULL. kfd_process->ef is initialized by kfd_process_device_init_vm() through ioctl. That means the fence is NULL for a new created kfd_process, and close a kfd_process right after open it will trigger the warning. This commit conditionally signals the eviction fence in kfd_process_wq_release() only when it is available. [ 503.660882] WARNING: CPU: 0 PID: 9 at drivers/dma-buf/dma-fence.c:467 dma_fence_signal+0x74/0xa0 [ 503.782940] Workqueue: kfd_process_wq kfd_process_wq_release [amdgpu] [ 503.789640] RIP: 0010:dma_fence_signal+0x74/0xa0 [ 503.877620] Call Trace: [ 503.880066] <TASK> [ 503.882168] ? __warn+0xcd/0x260 [ 503.885407] ? dma_fence_signal+0x74/0xa0 [ 503.889416] ? report_bug+0x288/0x2d0 [ 503.893089] ? handle_bug+0x53/0xa0 [ 503.896587] ? exc_invalid_op+0x14/0x50 [ 503.900424] ? asm_exc_invalid_op+0x16/0x20 [ 503.904616] ? dma_fence_signal+0x74/0xa0 [ 503.908626] kfd_process_wq_release+0x6b/0x370 [amdgpu] [ 503.914081] process_one_work+0x654/0x10a0 [ 503.918186] worker_thread+0x6c3/0xe70 [ 503.921943] ? srso_alias_return_thunk+0x5/0xfbef5 [ 503.926735] ? srso_alias_return_thunk+0x5/0xfbef5 [ 503.931527] ? __kthread_parkme+0x82/0x140 [ 503.935631] ? __pfx_worker_thread+0x10/0x10 [ 503.939904] kthread+0x2a8/0x380 [ 503.943132] ? __pfx_kthread+0x10/0x10 [ 503.946882] ret_from_fork+0x2d/0x70 [ 503.950458] ? __pfx_kthread+0x10/0x10 [ 503.954210] ret_from_fork_asm+0x1a/0x30 [ 503.958142] </TASK> [ 503.960328] ---[ end trace 0000000000000000 ]--- Fixes: 967d226eaae8 ("dma-buf: add WARN_ON() illegal dma-fence signaling") Signed-off-by: Zhu Lingshan <lingshan.zhu@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdkfd/kfd_process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 62bf9fe6fab01a3f7355931fd9472b3d3ef6a3b2 Author: yfeng1 <yfeng1@amd.com> Date: Wed Dec 25 23:36:09 2024 -0500 drm/amdgpu: Fix for MEC SJT FW Load Fail on VF Users might switch to ROCM build does not include MEC SJT FW and driver needs to consider this case.w Signed-off-by: yfeng1 <yfeng1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit da968c3ce459442e83b021d73417b9402c8b14c5 Author: Martin Leung <Martin.Leung@amd.com> Date: Mon Dec 16 09:08:04 2024 -0500 drm/amd/display: Promote DC to 3.2.315 This version brings along the following: - Add Interface to Dump DSC Caps from dm - Add DP required HBlank size calc to link interface - Add 6bpc RGB case for dcn32 output bpp calculations - Add VC for VESA Aux Backlight Control - Add support for setting multiple CRC windows in dc - Clean up SPL code and outdated interfaces in dcn401_clk_mgr - Disable replay and psr while VRR is enabled - Fix PSR-SU not support but still call the amdgpu_dm_psr_enable - Implement Replay Low Hz Visual Confirm - Extend dc_stream_get_crc to support 2nd crc engine - Update power gating logic for DCN35 hw Reviewed-by: Roman Li <roman.li@amd.com> Signed-off-by: Martin Leung <Martin.Leung@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e36774f1664b758f7094095a91fd9ca2d32cf96 Author: Wayne Lin <Wayne.Lin@amd.com> Date: Wed Sep 25 14:24:43 2024 +0800 drm/amd/display: Extend capability to get multiple ROI CRCs [Why & How] We already extend our dm, dc and dmub to support setting of multiple CRC instances, now extend the capability to return back the ROI/CRC pair result from psp by specifying activated ROI instances. Reviewed-by: HaoPing Liu <haoping.liu@amd.com> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 36 +++++++++++++++++----- 1 file changed, 29 insertions(+), 7 deletions(-) commit d566fc42c0d33fea79bd8896ae6e77df67ae1ac8 Author: Iswara Nagulendran <Iswara.Nagulendran@amd.com> Date: Wed Dec 11 17:19:42 2024 -0500 drm/amd/display: Add VC for VESA Aux Backlight Control [WHY] There is no way to distinguish the static backlight control type being used and the VABC support without the use of a debugger or reading DPCD registers. [HOW] Add Visual Confirm support for VESA Aux-based Backlight Control. Reviewed-by: Harry Vanzylldejong <harry.vanzylldejong@amd.com> Signed-off-by: Iswara Nagulendran <Iswara.Nagulendran@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++ .../gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 38 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h | 6 ++-- 4 files changed, 44 insertions(+), 3 deletions(-) commit 41c18333d4b72d7eebf113b976c65a6af39a180e Author: Samson Tam <Samson.Tam@amd.com> Date: Thu Dec 12 17:38:15 2024 -0500 drm/amd/display: Clean up SPL code [Why & How] Use helper functions for checking formats Apply cositing offset in rotation case Reviewed-by: Navid Assadian <navid.assadian@amd.com> Signed-off-by: Samson Tam <Samson.Tam@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 88 ++++++++++++++--------------- 1 file changed, 43 insertions(+), 45 deletions(-) commit f6e09701c3eb2ccb8cb0518e0b67f1c69742a4ec Author: Roman Li <Roman.Li@amd.com> Date: Fri Dec 13 13:51:07 2024 -0500 drm/amd/display: Add check for granularity in dml ceil/floor helpers [Why] Wrapper functions for dcn_bw_ceil2() and dcn_bw_floor2() should check for granularity is non zero to avoid assert and divide-by-zero error in dcn_bw_ functions. [How] Add check for granularity 0. Cc: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Roman Li <Roman.Li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 79a57f9479de9c6fc3a8c4f50e7c853a134f9b41 Author: George Shen <george.shen@amd.com> Date: Thu Dec 12 16:17:22 2024 -0500 drm/amd/display: Add 6bpc RGB case for dcn32 output bpp calculations [Why] Current DCN32 calculation doesn't consider RGB 6bpc for the DP case. This results in an invalid output bpp being calculated when DSC is not enabled in the configuration, failing the mode validation. [How] Add special case to handle 6bpc RGB in the output bpp calculation. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: George Shen <george.shen@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 4 ++++ 1 file changed, 4 insertions(+) commit d7879340e987b3056b8ae39db255b6c19c170a0d Author: Tom Chung <chiahsuan.chung@amd.com> Date: Thu Dec 5 23:20:45 2024 +0800 drm/amd/display: Disable replay and psr while VRR is enabled [Why] Replay and PSR will cause some video corruption while VRR is enabled. [How] 1. Disable the Replay and PSR while VRR is enabled. 2. Change the amdgpu_dm_crtc_vrr_active() parameter to const. Because the function will only read data from dm_crtc_state. Reviewed-by: Sun peng Li <sunpeng.li@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) commit f765e7ce0417f8dc38479b4b495047c397c16902 Author: Tom Chung <chiahsuan.chung@amd.com> Date: Thu Dec 5 23:08:28 2024 +0800 drm/amd/display: Fix PSR-SU not support but still call the amdgpu_dm_psr_enable [Why] The enum DC_PSR_VERSION_SU_1 of psr_version is 1 and DC_PSR_VERSION_UNSUPPORTED is 0xFFFFFFFF. The original code may has chance trigger the amdgpu_dm_psr_enable() while psr version is set to DC_PSR_VERSION_UNSUPPORTED. [How] Modify the condition to psr->psr_version == DC_PSR_VERSION_SU_1 Reviewed-by: Sun peng Li <sunpeng.li@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1619d4168b9797b80a2bc323f886f4181848acb3 Author: George Shen <george.shen@amd.com> Date: Mon Dec 9 11:23:42 2024 -0500 drm/amd/display: Add HBlank reduction DPCD write to DPMS sequence [Why] Certain small HBlank timings may not have a large enough HBlank to support audio when low bpp DSC is enabled. HBlank expansion by the source can solve this problem, but requires the branch/sink to support HBlank reduction. [How] Update DPMS sequence to call DM to perform DPCD write to enable HBlank reduction on the branch/sink. Add stub in dm_helpers to be implemented later. Reviewed-by: Michael Strauss <michael.strauss@amd.com> Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Signed-off-by: George Shen <george.shen@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 ++++++ drivers/gpu/drm/amd/display/dc/dm_helpers.h | 5 +++++ drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 17 +++++++++++++++++ 3 files changed, 28 insertions(+) commit 787e7be0c9fb1202124dd3f2dea0d39738f91bee Author: Aric Cyr <Aric.Cyr@amd.com> Date: Tue Dec 10 18:38:15 2024 -0500 drm/amd/display: Optimize cursor position updates [why] Updating the cursor enablement register can be a slow operation and accumulates when high polling rate cursors cause frequent updates asynchronously to the cursor position. [how] Since the cursor enable bit is cached there is no need to update the enablement register if there is no change to it. This removes the read-modify-write from the cursor position programming path in HUBP and DPP, leaving only the register writes. Reviewed-by: Josip Pavic <josip.pavic@amd.com> Signed-off-by: Aric Cyr <Aric.Cyr@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c | 7 ++++--- drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c | 6 ++++-- drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c | 8 +++++--- drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c | 10 ++++++---- 4 files changed, 19 insertions(+), 12 deletions(-) commit de5d7a8802eac4e22ed95d2d959907ebc4aad3ac Author: Samson Tam <Samson.Tam@amd.com> Date: Tue Dec 10 15:32:17 2024 -0500 drm/amd/display: fix init_adj offset for cositing in SPL [Why & How] init_adj offset is applied when cosited not interstitial Adjust cositing offset in SPL Reviewed-by: Jun Lei <jun.lei@amd.com> Signed-off-by: Samson Tam <Samson.Tam@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) commit c7c703e433cebe9147ae7a7ed9e4247d797c7f00 Author: Karthi Kandasamy <karthi.kandasamy@amd.com> Date: Mon Dec 2 11:47:30 2024 +0100 drm/amd/display: Ensure correct GFX tiling info passed to DML [Why] To ensure DML validation receives the correct tiling information, such as swizzle mode or array mode, based on the active GFX format [How] - For new GFX format passed swizzle_mode to DML. - For legacy GFX format passed array_mode to DML. - Dynamically determined the appropriate tiling info based on the active GFX format. [Description] This commit ensures that the correct GFX tiling information is passed to DML. Depending on the active GFX format, the appropriate tiling info is passed to DML. This change accommodates the different GFX formats supported by latest platforms, ensuring compatibility and proper DML validation. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Karthi Kandasamy <karthi.kandasamy@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 +++ .../amd/display/dc/dml2/dml21/dml21_translation_helper.c | 16 +++++++++++++--- .../drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 9 ++++++++- .../drm/amd/display/dc/resource/dcn35/dcn35_resource.h | 1 + .../drm/amd/display/dc/resource/dcn351/dcn351_resource.c | 2 +- .../drm/amd/display/dc/resource/dcn401/dcn401_resource.c | 1 + 6 files changed, 27 insertions(+), 5 deletions(-) commit 080950cbdd8309110eab93b76f0caf53be0d5120 Author: Karthi Kandasamy <karthi.kandasamy@amd.com> Date: Wed Nov 20 13:30:11 2024 +0100 drm/amd/display: Update dc_tiling_info union to structure [WHY] The `dc_tiling_info` union previously did not have a field to specify the active GFX format, assuming only one format would be used per DCN version. from DCN4+, support for switching between different GFX formats is introduced, requiring a way to track which format is currently in use. [HOW] Updated the `dc_tiling_info` union to include a new field that explicitly indicates the currently used GFX format. This allows the system to determine the active GFX format and take the correct programming path accordingly. [Description] The union `dc_tiling_info` has been updated to support multiple GFX formats by adding a new field for identifying the active format. This update ensures that the correct programming path is followed based on the selected format. All references to `dc_tiling_info` in the codebase have been updated to reflect the new structure. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Karthi Kandasamy <karthi.kandasamy@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 14 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.h | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 4 +- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 176 +++++++++++---------- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 10 +- .../drm/amd/display/dc/dce110/dce110_mem_input_v.c | 8 +- .../gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c | 4 +- .../gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.h | 4 +- .../gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c | 4 +- .../gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.h | 2 +- .../drm/amd/display/dc/hubp/dcn201/dcn201_hubp.c | 2 +- .../gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c | 4 +- .../gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.h | 4 +- .../gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c | 2 +- .../gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.h | 2 +- .../drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c | 4 +- .../drm/amd/display/dc/hubp/dcn401/dcn401_hubp.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 4 +- 20 files changed, 136 insertions(+), 124 deletions(-) commit e8b19ffea957651b9eab296634115b72f95e86ca Author: Brandon Syu <Brandon.Syu@amd.com> Date: Fri Dec 6 09:50:22 2024 +0800 drm/amd/display: modify init dc_power_state [why] initialize the power state for dc use, but dc_set_power_state it not called at D3. It would cause can't recognize last power state [how] remove initialize the power state for dc use, it is not necessary. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Brandon Syu <Brandon.Syu@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ---- 1 file changed, 4 deletions(-) commit 44063dbcdbd8abf172b8cc30e18d7e2948e9d699 Author: Peichen Huang <PeiChen.Huang@amd.com> Date: Wed Dec 4 15:20:10 2024 +0800 drm/amd/display: have pretrain for dpia [WHY] We like to have pretrain for dpia link so that dp and dp tunneling have aligned behavior. The Main difficult for dpia pretrain is that encoder can not get corresponded dpia port when link detection in current implementation. [HOW] 1. create enable/disable dpia output functions for dcn35 encoder and have dpia_id and other necessary info as inputs. 2. dcn35 dpia use the new functions to enable/disable output. 3. have a option to enable/disable the change. Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Reviewed-by: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com> Signed-off-by: Peichen Huang <PeiChen.Huang@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc.h | 4 +- .../display/dc/dio/dcn35/dcn35_dio_link_encoder.c | 80 ++++++++++++++++++++++ .../display/dc/dio/dcn35/dcn35_dio_link_encoder.h | 18 +++++ .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 8 +++ .../drm/amd/display/dc/link/hwss/link_hwss_dio.c | 4 +- .../drm/amd/display/dc/link/hwss/link_hwss_dpia.c | 61 ++++++++++++++++- .../drm/amd/display/dc/link/hwss/link_hwss_dpia.h | 3 + .../gpu/drm/amd/display/dc/link/link_detection.c | 3 +- drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 3 +- .../dc/link/protocols/link_dp_irq_handler.c | 3 +- 10 files changed, 180 insertions(+), 7 deletions(-) commit 5acacec88aa01ab31f40b5ee167e61826946b75f Author: Dennis.Chan <Dennis.Chan@amd.com> Date: Mon Dec 2 10:52:36 2024 +0800 drm/amd/display: Implement Replay Low Hz Visual Confirm [why] Add new Visual confirm color for Replay Low Hz. Reviewed-by: Robin Chen <robin.chen@amd.com> Signed-off-by: Dennis.Chan <Dennis.Chan@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc_types.h | 11 ++-- .../dc/link/protocols/link_dp_irq_handler.c | 2 + drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 64 +++++++++++++++++++++- 3 files changed, 72 insertions(+), 5 deletions(-) commit 9eaf3abef7f7d69512aa4ae070ccad4b92229903 Author: Fangzhi Zuo <Jerry.Zuo@amd.com> Date: Mon Dec 9 15:14:44 2024 -0500 drm/amd/display: Add Interface to Dump DSC Caps from dm No common dsc params found between encoder and decoder is one of the reason that could prevent dsc from properly enabled. Dump the params to a specific timing to help locate possible invalid dsc params in either encoder or decoder side. Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc_dsc.h | 5 ++++ drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 45 +++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) commit 9c980a85de752af504b0c3fb5235d3c0d4599e95 Author: Aurabindo Pillai <aurabindo.pillai@amd.com> Date: Tue Dec 10 18:22:58 2024 +0000 drm/amd/display: Add guards around MAX/MIN MAX/MIN macros maybe defined already, hence add a guard around them to prevent errors that complain about redefinition like: drivers/gpu/drm/amd/amdgpu/../dal-dev/modules/hdcp/hdcp_ddc.c:31: error: "MIN" redefined [-Werror] 31 | #define MIN(a, b) ((a) < (b) ? (a) : (b)) | In file included from ./include/linux/kernel.h:28, from ./include/linux/cpumask.h:11, from ./include/linux/smp.h:13, from ./include/linux/lockdep.h:14, from ./include/linux/spinlock.h:63, from ./include/linux/mmzone.h:8, from ./include/linux/gfp.h:7, from ./include/linux/slab.h:16, from drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:37, from drivers/gpu/drm/amd/amdgpu/../display/modules/inc/mod_hdcp.h:29, from drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp.h:29, from drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_ddc.c:29: ./include/linux/minmax.h:329: note: this is the location of the previous definition 329 | #define MIN(a,b) __cmp(min,a,b) | cc1: all warnings being treated as errors Reviewed-by: Sun peng Li <sunpeng.li@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 2 ++ 1 file changed, 2 insertions(+) commit d2916cf411e18b72a1325ea98a90cf0c9367e78c Author: Natanel Roizenman <Natanel.Roizenman@amd.com> Date: Tue Dec 10 12:04:04 2024 -0500 drm/amd/display: correct type mismatches in comparisons in DML2 [Why] Comparisons were made between unsigned char and unsigned int. [How] Corrected by changing variable types. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Natanel Roizenman <Natanel.Roizenman@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 12 ++++----- .../dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.c | 6 ++--- .../dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 30 +++++++++++----------- 3 files changed, 24 insertions(+), 24 deletions(-) commit 9a45ad15a1e26477fb870afb2b4d674c635cd57c Author: Wayne Lin <Wayne.Lin@amd.com> Date: Mon Jul 22 18:29:25 2024 +0800 drm/amd/display: Adjust dm to use supported interfaces for setting multiple crc windows [Why & How] We actually have the capability to calculate independent CRC for 2 crc window at the same time. Extend dm with the capability by having array to configure/maintain multiple crc windows. Add the flexibility but use 1st CRC instance only for now. Can change to use the 2nd CRC instance if needed. Reviewed-by: HaoPing Liu <haoping.liu@amd.com> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 ++- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 176 +++++++++++++++------ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h | 23 ++- .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 31 ++-- .../amd/display/amdgpu_dm/amdgpu_dm_irq_params.h | 4 +- 5 files changed, 185 insertions(+), 72 deletions(-) commit 10008a962b2d46e9672a89359d5740fa5c8fc9d7 Author: Wayne Lin <Wayne.Lin@amd.com> Date: Tue Jul 23 15:01:05 2024 +0800 drm/amd/display: Extend dc_stream_get_crc to support 2nd crc engine [Why & How] Since now we can set multiple crc windows for secure display, add a new input parameter for dc_stream_get_crc to indicate to fetch crc from which crc engine. Reviewed-by: HaoPing Liu <haoping.liu@amd.com> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 5 ++-- drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 + .../display/dc/dce110/dce110_timing_generator.c | 32 +++++++++++++++----- .../display/dc/dce110/dce110_timing_generator.h | 2 +- .../display/dc/dce120/dce120_timing_generator.c | 34 ++++++++++++++++------ drivers/gpu/drm/amd/display/dc/inc/hw/optc.h | 2 +- .../drm/amd/display/dc/inc/hw/timing_generator.h | 2 +- .../gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.c | 33 ++++++++++++++++----- .../gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.h | 19 ++++++++++++ 10 files changed, 101 insertions(+), 31 deletions(-) commit a2b5668bdb3c4100c2cbd4af046eacc6dafa30c3 Author: Wayne Lin <Wayne.Lin@amd.com> Date: Fri Jul 19 15:57:33 2024 +0800 drm/amd/display: Add support for setting multiple CRC windows in dc [Why & How] Have to support multiple CRC windows setting to dmub. Add new dmub forward functions for supporting/forwarding multiple crc windows setting to dmub. Reviewed-by: HaoPing Liu <haoping.liu@amd.com> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/core/dc.c | 62 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc_stream.h | 5 +++ drivers/gpu/drm/amd/display/dc/dc_types.h | 7 ++++ 3 files changed, 74 insertions(+) commit bce2dc009436c096641601385afcf085cfad4967 Author: George Shen <george.shen@amd.com> Date: Mon Dec 9 10:57:31 2024 -0500 drm/amd/display: Add expanded HBlank field to dc_crtc_timing [Why] For DP HBlank expansion/reduction, the HBlank parameters of the original EDID timing needs to be notified to the sink in order for the timing to be reduced back to the original HBlank size. [How] Add parameter in dc_crtc_timing to track the increased HBlank. Reviewed-by: Michael Strauss <michael.strauss@amd.com> Signed-off-by: George Shen <george.shen@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 3 +++ 1 file changed, 3 insertions(+) commit 3ed56d9e8f483994bc5697b59057ab2adf4750ed Author: George Shen <george.shen@amd.com> Date: Mon Dec 9 10:29:31 2024 -0500 drm/amd/display: Add DP required HBlank size calc to link interface [Why] Some features, such as HBlank expansion/reduction, needs to know how much HBlank is required to support basic audio. [How] Add interface to link to calculate required HBlank size for a given link + timing combination to support basic audio (i.e. 2-channel 48KHz). Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Signed-off-by: George Shen <george.shen@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/display/dc/core/dc_link_exports.c | 8 + drivers/gpu/drm/amd/display/dc/dc.h | 18 +++ drivers/gpu/drm/amd/display/dc/inc/link.h | 4 + drivers/gpu/drm/amd/display/dc/link/link_factory.c | 1 + .../gpu/drm/amd/display/dc/link/link_validation.c | 179 +++++++++++++++++++++ .../gpu/drm/amd/display/dc/link/link_validation.h | 5 + 6 files changed, 215 insertions(+) commit e79cba63de318faa80804701563e58d880c2c492 Author: George Shen <george.shen@amd.com> Date: Wed Dec 4 18:10:18 2024 -0500 drm/amd/display: Parse RECEIVE_PORT0_CAP capabilities from DPCD [Why] DPCD register RECEIVE_PORT0_CAP contains HBlank expansion/reduction capabilities of a DP device. These capabilities are required to enable HBlank expansion/reduction logic. [How] Read raw RECEIVE_PORT0_CAP register values and store parsed fields. Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Signed-off-by: George Shen <george.shen@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc.h | 8 ++++++++ drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 16 ++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc_types.h | 8 ++++++++ .../amd/display/dc/link/protocols/link_dp_capability.c | 5 +++++ 4 files changed, 37 insertions(+) commit f0aece43ee75b48cc6846a66973565ddcce59c91 Author: Dillon Varone <dillon.varone@amd.com> Date: Mon Dec 9 12:21:51 2024 -0500 drm/amd/display: Cleanup outdated interfaces in dcn401_clk_mgr [WHY&HOW] - Remove legacy update clocks sequence - FCLK P-State allow message is not required Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c | 240 ++------------------- drivers/gpu/drm/amd/display/dc/dc.h | 1 - 2 files changed, 17 insertions(+), 224 deletions(-) commit 149bacfe9c59e9ebf2815aaade2823676b4a6739 Author: Yihan Zhu <Yihan.Zhu@amd.com> Date: Thu Dec 5 14:28:51 2024 -0500 drm/amd/display: power up all gating blocks when releasing hw DCN35 [WHY & HOW] Driver disable will deallocate framebuffer to reset IPS state, this will cause IPS start with INIT state to blindly power gate ONO region to break power sequence. All the gating blocks should be powered up when releasing hw to ensure all the power optimizations are identical to pre-OS. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Duncan Ma <duncan.ma@amd.com> Signed-off-by: Yihan Zhu <Yihan.Zhu@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 34 ++++++++++++++++++++++ .../drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.h | 2 ++ .../gpu/drm/amd/display/dc/hwss/dcn35/dcn35_init.c | 1 + 3 files changed, 37 insertions(+) commit 86f955b7934612faaeafdb0373c16ad472a0a8db Author: Yihan Zhu <Yihan.Zhu@amd.com> Date: Tue Dec 3 15:22:26 2024 -0500 drm/amd/display: update sequential pg logic DCN35 [WHY & HOW] No check for HUBP/DPP power gating when DSC instance is still running. Avoid HUBP/DPP to power gate when corresponding DSC block is still running in the power gating calculation. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Duncan Ma <duncan.ma@amd.com> Signed-off-by: Yihan Zhu <Yihan.Zhu@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5b231f5bc9ff02ec5737f2ec95cdf15ac95088e9 Author: Jesse.zhang@amd.com <Jesse.zhang@amd.com> Date: Wed Dec 18 18:23:52 2024 +0800 drm/amdkfd: fixed page fault when enable MES shader debugger Initialize the process context address before setting the shader debugger. [ 260.781212] amdgpu 0000:03:00.0: amdgpu: [gfxhub] page fault (src_id:0 ring:32 vmid:0 pasid:0) [ 260.781236] amdgpu 0000:03:00.0: amdgpu: in page starting at address 0x0000000000000000 from client 10 [ 260.781255] amdgpu 0000:03:00.0: amdgpu: GCVM_L2_PROTECTION_FAULT_STATUS:0x00040A40 [ 260.781270] amdgpu 0000:03:00.0: amdgpu: Faulty UTCL2 client ID: CPC (0x5) [ 260.781284] amdgpu 0000:03:00.0: amdgpu: MORE_FAULTS: 0x0 [ 260.781296] amdgpu 0000:03:00.0: amdgpu: WALKER_ERROR: 0x0 [ 260.781308] amdgpu 0000:03:00.0: amdgpu: PERMISSION_FAULTS: 0x4 [ 260.781320] amdgpu 0000:03:00.0: amdgpu: MAPPING_ERROR: 0x0 [ 260.781332] amdgpu 0000:03:00.0: amdgpu: RW: 0x1 [ 260.782017] amdgpu 0000:03:00.0: amdgpu: [gfxhub] page fault (src_id:0 ring:32 vmid:0 pasid:0) [ 260.782039] amdgpu 0000:03:00.0: amdgpu: in page starting at address 0x0000000000000000 from client 10 [ 260.782058] amdgpu 0000:03:00.0: amdgpu: GCVM_L2_PROTECTION_FAULT_STATUS:0x00040A41 [ 260.782073] amdgpu 0000:03:00.0: amdgpu: Faulty UTCL2 client ID: CPC (0x5) [ 260.782087] amdgpu 0000:03:00.0: amdgpu: MORE_FAULTS: 0x1 [ 260.782098] amdgpu 0000:03:00.0: amdgpu: WALKER_ERROR: 0x0 [ 260.782110] amdgpu 0000:03:00.0: amdgpu: PERMISSION_FAULTS: 0x4 [ 260.782122] amdgpu 0000:03:00.0: amdgpu: MAPPING_ERROR: 0x0 [ 260.782137] amdgpu 0000:03:00.0: amdgpu: RW: 0x1 [ 260.782155] amdgpu 0000:03:00.0: amdgpu: [gfxhub] page fault (src_id:0 ring:32 vmid:0 pasid:0) [ 260.782166] amdgpu 0000:03:00.0: amdgpu: in page starting at address 0x0000000000000000 from client 10 Fixes: 438b39ac74e2 ("drm/amdkfd: pause autosuspend when creating pdd") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3849 Signed-off-by: Jesse Zhang <jesse.zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 89ec0f57a7ace427f89f3ba803a54e4b9f84e161 Author: Kyle Deng <quic_chunkaid@quicinc.com> Date: Fri Oct 18 15:34:15 2024 +0800 dt-bindings: mailbox: qcom,apcs-kpss-global: Document the qcs615 APSS Add compatible for the Qualcomm qcs615 mailbox block. QCS615 mailbox is compatible with SDM845 use fallback for it. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Kyle Deng <quic_chunkaid@quicinc.com> Link: https://lore.kernel.org/r/20241018073417.2338864-2-quic_chunkaid@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml | 1 + 1 file changed, 1 insertion(+) commit 38a498a28112de661d45fe4de47edc0c82c70816 Author: Lijuan Gao <quic_lijuang@quicinc.com> Date: Thu Sep 12 10:54:41 2024 +0800 dt-bindings: nvmem: qfprom: Add compatible for QCS615 Document compatible for QFPROM used on QCS615. It's compatible with generic QFPROM fallback. Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com> Link: https://lore.kernel.org/all/20240912-add_qfprom_compatible_for_qcs615-v1-1-9ef2e26c14ee@quicinc.com/ Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + 1 file changed, 1 insertion(+) commit 859a7db4c7db84b06ca7fc9c60eb45a130c8fbec Merge: 2532608530ea 87091dd986db Author: Alexei Starovoitov <ast@kernel.org> Date: Mon Jan 6 10:59:50 2025 -0800 Merge branch 'bpf-allow-bpf_for-bpf_repeat-while-holding-spin' Emil Tsalapatis says: ==================== In BPF programs, kfunc calls while holding a lock are not allowed because kfuncs may sleep by default. The exception to this rule are the functions in special_kfunc_list, which are guaranteed to not sleep. The bpf_iter_num_* functions used by the bpf_for and bpf_repeat macros make no function calls themselves, and as such are guaranteed to not sleep. Add them to special_kfunc_list to allow them within BPF spinlock critical sections. Signed-off-by: Emil Tsalapatis (Meta) <emil@etsalapatis.com> ==================== Link: https://patch.msgid.link/20250104202528.882482-1-emil@etsalapatis.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> commit 87091dd986db51406e64dd5e8c9d22617c66c6af Author: Emil Tsalapatis <emil@etsalapatis.com> Date: Sat Jan 4 15:25:28 2025 -0500 selftests/bpf: test bpf_for within spin lock section Add a selftest to ensure BPF for loops within critical sections are accepted by the verifier. Signed-off-by: Emil Tsalapatis (Meta) <emil@etsalapatis.com> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/r/20250104202528.882482-3-emil@etsalapatis.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> .../selftests/bpf/progs/verifier_spin_lock.c | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 512816403ece6cbb67de3af359643384111a9647 Author: Emil Tsalapatis <emil@etsalapatis.com> Date: Sat Jan 4 15:25:27 2025 -0500 bpf: Allow bpf_for/bpf_repeat calls while holding a spinlock Add the bpf_iter_num_* kfuncs called by bpf_for in special_kfunc_list, and allow the calls even while holding a spin lock. Signed-off-by: Emil Tsalapatis (Meta) <emil@etsalapatis.com> Reviewed-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/r/20250104202528.882482-2-emil@etsalapatis.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/verifier.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 382d7efc14a38baa8b8b91115891ef00fe5a5076 Author: Andrea Righi <arighi@nvidia.com> Date: Mon Jan 6 08:20:34 2025 +0100 sched_ext: Include remaining task time slice in error state dump Report the remaining time slice when dumping task information during an error exit. This information can be useful for tracking incorrect or excessively long time slices in schedulers that implement dynamic time slice logic. Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org> kernel/sched/ext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4975ac5353395978a7dc49a656adbe6ef9ad063 Author: Andrea Righi <arighi@nvidia.com> Date: Mon Jan 6 18:03:09 2025 +0100 sched_ext: update scx_bpf_dsq_insert() doc for SCX_DSQ_LOCAL_ON With commit 5b26f7b920f7 ("sched_ext: Allow SCX_DSQ_LOCAL_ON for direct dispatches"), scx_bpf_dsq_insert() can use SCX_DSQ_LOCAL_ON for direct dispatch from ops.enqueue() to target the local DSQ of any CPU. Update the documentation accordingly. Fixes: 5b26f7b920f7 ("sched_ext: Allow SCX_DSQ_LOCAL_ON for direct dispatches") Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org> Documentation/scheduler/sched-ext.rst | 6 +++--- kernel/sched/ext.c | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) commit 539808eef79b1f86fbaf08a57ef4383fde9fc8cc Author: Jingyi Wang <quic_jingyw@quicinc.com> Date: Wed Sep 25 15:21:37 2024 +0800 dt-bindings: remoteproc: qcom,sa8775p-pas: Document QCS8300 remoteproc Document the components used to boot the ADSP, CDSP and GPDSP on the Qualcomm QCS8300 SoC. Use fallback to indicate the compatibility of the remoteproc on the QCS8300 with that on the SA8775P. Co-developed-by: Xin Liu <quic_liuxin@quicinc.com> Signed-off-by: Xin Liu <quic_liuxin@quicinc.com> Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240925-qcs8300_remoteproc_binding-v3-1-21b0c52b142b@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> .../bindings/remoteproc/qcom,sa8775p-pas.yaml | 44 +++++++++++++++------- 1 file changed, 30 insertions(+), 14 deletions(-) commit d9071ecb313940fe1d8827fef48bbf9fdaf28a4c Author: Andrea Righi <arighi@nvidia.com> Date: Sat Jan 4 10:00:09 2025 +0100 sched_ext: idle: small CPU iteration refactoring Replace the loop to check if all SMT CPUs are idle with cpumask_subset(). This simplifies the code and slightly improves efficiency, while preserving the original behavior. Note that idle_masks.smt handling remains racy, which is acceptable as it serves as an optimization and is self-correcting. Suggested-and-reviewed-by: Yury Norov <yury.norov@gmail.com> Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org> kernel/sched/ext.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b3db0b5356ff573d4e48b1306dd9a785d679f9b0 Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Wed Nov 20 11:22:47 2024 +0530 dt-bindings: watchdog: Document Qualcomm IPQ5424 Add devicetree binding for watchdog present on Qualcomm IPQ5424 SoC. Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20241120055248.657813-2-quic_mmanikan@quicinc.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org> Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml | 1 + 1 file changed, 1 insertion(+) commit 143981aa63f33d469a55a55fd9fb81cd90109672 Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Sun Jan 5 20:17:18 2025 +0900 watchdog: rti_wdt: Fix an OF node leak in rti_wdt_probe() rti_wdt_probe() does not release the OF node reference obtained by of_parse_phandle(). Add a of_node_put() call. This was found by an experimental verification tool that I am developing. Due to the lack of the actual device, no runtime test was able to be performed. Fixes: f20ca595ae23 ("watchdog:rit_wdt: Add support for WDIOF_CARDRESET") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20250105111718.4184192-1-joe@pf.is.s.u-tokyo.ac.jp Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org> drivers/watchdog/rti_wdt.c | 1 + 1 file changed, 1 insertion(+) commit 7da5fc3408f3165e8a7dfb0d15b934aa3531082a Author: Luca Ceresoli <luca.ceresoli@bootlin.com> Date: Mon Dec 30 18:35:58 2024 +0100 watchdog: max77620: fix excess field in kerneldoc The wdt_info does not exist in the struct being documented. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412281555.YMBF9azh-lkp@intel.com/ Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20241230-max77620_wdt-kerneldoc-fix-v1-1-8a3211818993@bootlin.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org> drivers/watchdog/max77620_wdt.c | 1 - 1 file changed, 1 deletion(-) commit d8d2803f559de4280c2829ad557ff60b26f24497 Author: Lad Prabhakar <prabhakar.csengg@gmail.com> Date: Fri Dec 13 19:28:58 2024 +0000 watchdog: sp805_wdt: Drop documentation of non-existent `status` member Remove the documentation for the `status` field in the `sp805_wdt` structure, as the field does not exist. Signed-off-by: Lad Prabhakar <prabhakar.csengg@gmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20241213192858.916377-1-prabhakar.csengg@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org> drivers/watchdog/sp805_wdt.c | 1 - 1 file changed, 1 deletion(-) commit 1f2b24a524fc20a7e893981c1a2e12d080e90ee6 Author: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Date: Fri Dec 13 17:11:57 2024 +0000 watchdog: rzv2h_wdt: Use local `dev` pointer in probe Update the `rzv2h_wdt_probe()` function to consistently use the local `dev` pointer, which is already extracted from `&pdev->dev`. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20241213171157.898934-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org> drivers/watchdog/rzv2h_wdt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 651b5fde35d67a2f669d2c0f5e1b702cac3400b2 Author: Marcus Folkesson <marcus.folkesson@gmail.com> Date: Tue Dec 10 16:24:41 2024 +0100 watchdog: da9052_wdt: add support for bootstatus bits Enable support for these bootstatus bits: WDIOF_CARDRESET WDIOF_OVERHEAT WDIOF_POWERUNDER Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20241210-da9052-wdt-v2-2-95a5756e9ac8@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org> drivers/watchdog/da9052_wdt.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 3322d53fdab8eedf01a9bca45dbf010566922e3c Author: Mike Crowe <mac@mcrowe.com> Date: Tue Dec 3 09:57:44 2024 +0000 watchdog: sp805: Report correct timeleft at maximum sp805_wdt::load_val is of type unsigned int. When the interrupt is inactive wdt_timeleft adds one to the value, and then adds that to the value used to calculate the time remaining. Unfortunately it's not unlikely that load_val contains LOAD_MAX, which is 0xFFFFFFFF and wraps to zero when one is added to it, resulting in the time left being understated by about 21.7s. Fix this by ensuring the addition happens as 64-bit. Signed-off-by: Mike Crowe <mac@mcrowe.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20241203095744.3001795-1-mac@mcrowe.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org> drivers/watchdog/sp805_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a569e299f2be13e5e0f487930455b55a9cb4874 Author: Alexander Sverdlin <alexander.sverdlin@siemens.com> Date: Tue Nov 26 08:36:43 2024 +0100 watchdog: rti: Fix off-by-one in heartbeat recovery According to AM62x TRM WDT period is (RTIDWDPRLD + 1) * (2^13) / RTICLK1, Fix the heartbeat recovery. In practice this doesn't affect rounded heatbeat in seconds, but it does correct 4% of error in milliseconds, for, say, default 60s heartbeat. This affects last_ping calculation. Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20241126073646.126752-1-alexander.sverdlin@siemens.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org> drivers/watchdog/rti_wdt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4b0447261b21efcb888e84ec1b37cf6436981874 Author: Peter Korsgaard <peter@korsgaard.com> Date: Thu Jan 2 18:04:29 2025 +0100 hwmon: (pwm-fan): Make use of device properties everywhere Commit 255ab27a0743 ("hwmon: (pwm-fan) Introduce start from stopped state handling") added two of_property_read_u32() calls after the driver was reworked to use device_property_* in commit dfd977d85b15 ("hwmon: (pwm-fan) Make use of device properties"), so convert those as well. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Reviewed-by: Marek Vasut <marex@denx.de> Link: https://lore.kernel.org/r/20250102170429.791912-1-peter@korsgaard.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/pwm-fan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8c8df9bd3851978c2645f1a3837230adef82fe0e Author: Beleswar Padhi <b-padhi@ti.com> Date: Thu Dec 19 16:35:45 2024 +0530 remoteproc: k3-r5: Add devm action to release tsp Use a device lifecycle managed action to release tsp ti_sci_proc handle. This helps prevent mistakes like releasing out of order in cleanup functions and forgetting to release on error paths. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20241219110545.1898883-6-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> drivers/remoteproc/ti_k3_r5_remoteproc.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 6a02becf4b42f1664d9443e7d2049dd4e31e5ff5 Author: Melody Olvera <quic_molvera@quicinc.com> Date: Wed Dec 4 15:18:06 2024 -0800 arm64: dts: qcom: sm8750: Add MTP and QRD boards Add MTP and QRD dts files for SM8750 describing board clocks, regulators, gpio keys, etc. Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241204-sm8750_master_dt-v3-6-4d5a8269950b@quicinc.com [bjorn: Polished subject] Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/Makefile | 2 + arch/arm64/boot/dts/qcom/sm8750-mtp.dts | 794 ++++++++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sm8750-qrd.dts | 792 +++++++++++++++++++++++++++++++ 3 files changed, 1588 insertions(+) commit 7f9738e0a8dbd78d47b95981792dee013f28981c Author: Melody Olvera <quic_molvera@quicinc.com> Date: Wed Dec 4 15:18:05 2024 -0800 arm64: dts: qcom: sm8750: Add pmic dtsi Add pmic dtsi file for SM8750 SoC describing the pmics and their thermal zones. Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241204-sm8750_master_dt-v3-5-4d5a8269950b@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8750-pmics.dtsi | 188 +++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) commit 068c3d3c83be47fe933679d6cf6f324f60941176 Author: Melody Olvera <quic_molvera@quicinc.com> Date: Wed Dec 4 15:18:04 2024 -0800 arm64: dts: qcom: Add base SM8750 dtsi Add the base dtsi for the SM8750 SoC describing the CPUs, GCC and RPMHCC clock controllers, geni UART, interrupt controller, TLMM, reserved memory, interconnects, and SMMU. Co-developed-by: Taniya Das <quic_tdas@quicinc.com> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Co-developed-by: Jishnu Prakash <quic_jprakash@quicinc.com> Signed-off-by: Jishnu Prakash <quic_jprakash@quicinc.com> Co-developed-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com> Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241204-sm8750_master_dt-v3-4-4d5a8269950b@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8750.dtsi | 2907 ++++++++++++++++++++++++++++++++++ 1 file changed, 2907 insertions(+) commit 2cf3496e50f308d80142bad85946a3a3ad7d7248 Author: Melody Olvera <quic_molvera@quicinc.com> Date: Wed Dec 4 15:18:03 2024 -0800 arm64: dts: qcom: Add PMIH0108 PMIC Add descriptions of PMIH0108 PMIC used on SM8750 platforms. Signed-off-by: Jishnu Prakash <quic_jprakash@quicinc.com> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241204-sm8750_master_dt-v3-3-4d5a8269950b@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/pmih0108.dtsi | 68 ++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 167466c07085d76ce41989edb0a9598f37b56185 Author: Melody Olvera <quic_molvera@quicinc.com> Date: Wed Dec 4 15:18:02 2024 -0800 arm64: dts: qcom: Add PMD8028 PMIC Add descriptions of PMD8028 PMIC used on SM8750 platforms. Signed-off-by: Jishnu Prakash <quic_jprakash@quicinc.com> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241204-sm8750_master_dt-v3-2-4d5a8269950b@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/pmd8028.dtsi | 62 +++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 5202bca52a6b48bf51500e302dca24d722c40990 Author: Melody Olvera <quic_molvera@quicinc.com> Date: Wed Dec 4 15:18:01 2024 -0800 dt-bindings: arm: qcom: Document SM8750 SoC and boards Document the SM8750 SoC binding and the boards which use it. Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241204-sm8750_master_dt-v3-1-4d5a8269950b@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/arm/qcom.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit c298af2a6df43829280cb4da32402bed1ab161b4 Merge: 05d5d3840b2d 2102773c6078 Author: Bjorn Andersson <andersson@kernel.org> Date: Mon Jan 6 10:41:37 2025 -0600 Merge branch 'icc-sm8750' of https://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into arm64-for-6.14 Merge SM8750 interconnect binding from topic branch, to gain access to interconnect constants. commit de182d2f5ca0801425919f38ec955033c09c601d Author: Beleswar Padhi <b-padhi@ti.com> Date: Thu Dec 19 16:35:44 2024 +0530 remoteproc: k3-r5: Use devm_rproc_add() helper Use device lifecycle managed devm_rproc_add() helper function. This helps prevent mistakes like deleting out of order in cleanup functions and forgetting to delete on all error paths. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20241219110545.1898883-5-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> drivers/remoteproc/ti_k3_r5_remoteproc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 05d5d3840b2d52619ffb79e60ab58e30a7f86037 Merge: fabdaa29f581 8817c21a45b6 4f1a62e2b396 Author: Bjorn Andersson <andersson@kernel.org> Date: Mon Jan 6 10:36:43 2025 -0600 Merge branches '20241204-sm8750_master_clks-v3-0-1a8f31a53a86@quicinc.com' and '20250106-sm8750-dispcc-v2-1-6f42beda6317@linaro.org' into arm64-for-6.14 Merge SM8750 gcc, tcsr and display clock bindings from topic branches, to gain access to clock constants. commit f1080d8dab0f1f83c47850a71c32833c768e3666 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Mon Jan 6 14:44:31 2025 +0100 clk: qcom: dispcc-sm8750: Add SM8750 Display clock controller Add driver for Display clock controller (DISPCC) in Qualcomm SM8750. The device has several differences against SM8650, including new Pongo PLLs and different clock parents, thus no compatibility or driver re-usage. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250106-sm8750-dispcc-v2-3-6f42beda6317@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/Kconfig | 11 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/dispcc-sm8750.c | 1963 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 1975 insertions(+) commit 1adc528937c62324f319ca02d6827a865beafd0b Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Mon Jan 6 14:44:30 2025 +0100 clk: qcom: clk-alpha-pll: Add Pongo PLL Add support for Pongo type of PLL clocks, used in Qualcomm SM8750 SoC. Notable difference comparing to other PLLs is the need for calibration for internally generated clock followed by wait_for_pll(). This is done in configure call and at this time clocks are not yet registered, thus wait_for_pll() cannot use clk_hw_get_name. Locking during this calibration requires much more time, thus increase the timeout in wait_for_pll(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250106-sm8750-dispcc-v2-2-6f42beda6317@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-alpha-pll.c | 165 ++++++++++++++++++++++++++++++++++++++- drivers/clk/qcom/clk-alpha-pll.h | 6 ++ 2 files changed, 170 insertions(+), 1 deletion(-) commit 9d46289f18bdfd7de8346e670fe0b67909bb750b Merge: 806761852608 4f1a62e2b396 Author: Bjorn Andersson <andersson@kernel.org> Date: Mon Jan 6 10:30:24 2025 -0600 Merge branch '20250106-sm8750-dispcc-v2-1-6f42beda6317@linaro.org' into clk-for-6.14 Merge SM8750 display clock controller bindings through topic branch, to make available to DeviceTree source branch as well. commit 4f1a62e2b3961946a924c093bc2bdd44a2a46c9d Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Mon Jan 6 14:44:29 2025 +0100 dt-bindings: clock: qcom,sm8550-dispcc: Add SM8750 DISPCC Add bindings for the Qualcomm SM8750 Display Clock Controller (DISPCC). Bindings are similar to existing SM8550 and SM8650 (same clock inputs), but the clock hierarchy is quite different and these are not compatible devices. The binding header was copied from downstream sources, so I retained original copyrights. Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250106-sm8750-dispcc-v2-1-6f42beda6317@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../bindings/clock/qcom,sm8550-dispcc.yaml | 4 +- include/dt-bindings/clock/qcom,sm8750-dispcc.h | 112 +++++++++++++++++++++ 2 files changed, 115 insertions(+), 1 deletion(-) commit 806761852608ebc4d924c2e1c031fb72dcb33ed0 Author: Taniya Das <quic_tdas@quicinc.com> Date: Wed Dec 4 11:37:20 2024 -0800 clk: qcom: Add TCSR clock driver for SM8750 The TCSR clock controller found on SM8750 provides refclks for PCIE, USB and UFS. Add clock driver for it. Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Link: https://lore.kernel.org/r/20241204-sm8750_master_clks-v3-8-1a8f31a53a86@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/Kconfig | 8 +++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/tcsrcc-sm8750.c | 141 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+) commit 3267c774f3ff61fc945a7531b2ae6784c37cd14f Author: Taniya Das <quic_tdas@quicinc.com> Date: Wed Dec 4 11:37:18 2024 -0800 clk: qcom: Add support for GCC on SM8750 Add support for GCC for SM8750 platform. Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241204-sm8750_master_clks-v3-6-1a8f31a53a86@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gcc-sm8750.c | 3274 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 3284 insertions(+) commit 745d755b8551319a100adafc6e776a2766102ea9 Author: Taniya Das <quic_tdas@quicinc.com> Date: Wed Dec 4 11:37:16 2024 -0800 clk: qcom: clk-alpha-pll: Add support for controlling Taycan PLLs Add clock ops for Taycan PLL, add the register offsets for supporting the PLL. Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Link: https://lore.kernel.org/r/20241204-sm8750_master_clks-v3-4-1a8f31a53a86@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-alpha-pll.c | 14 ++++++++++++++ drivers/clk/qcom/clk-alpha-pll.h | 7 +++++++ 2 files changed, 21 insertions(+) commit c035a9e265dd80a018cfde0fd07ceca9e1d07c98 Author: Taniya Das <quic_tdas@quicinc.com> Date: Wed Dec 4 11:37:15 2024 -0800 clk: qcom: rpmh: Add support for SM8750 rpmh clocks Add the RPMH clocks present in SM8750 SoC. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241204-sm8750_master_clks-v3-3-1a8f31a53a86@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-rpmh.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit d7df7a718fd661960f268ef353fdca66fc693f3d Author: Taniya Das <quic_tdas@quicinc.com> Date: Wed Dec 4 11:37:14 2024 -0800 clk: qcom: rpmh: Sort the match table alphabetically Update the match table for SC7280 to sort it in alphabetical order. Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241204-sm8750_master_clks-v3-2-1a8f31a53a86@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-rpmh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6badb455ae983f4b2b7e91e3083db64765662a6c Author: Taniya Das <quic_tdas@quicinc.com> Date: Wed Dec 4 11:37:13 2024 -0800 dt-bindings: clock: qcom-rpmhcc: Add RPMHCC for SM8750 Update the documentation for clock rpmh driver on SM8750 SoCs. Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Link: https://lore.kernel.org/r/20241204-sm8750_master_clks-v3-1-1a8f31a53a86@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml | 1 + 1 file changed, 1 insertion(+) commit 4188e516854fcb0072fce6fbb55c9ffbdfc5f8e7 Merge: 88d9dca36aac 8817c21a45b6 Author: Bjorn Andersson <andersson@kernel.org> Date: Mon Jan 6 10:27:11 2025 -0600 Merge branch '20241204-sm8750_master_clks-v3-0-1a8f31a53a86@quicinc.com' into clk-for-6.14 Merge the SM8750 GCC and TCSR clock bindings through topic branch, to allow merging into DeviceTree source branch as well. commit 8817c21a45b62c17f18417efbd0b04a3805a1e23 Author: Taniya Das <quic_tdas@quicinc.com> Date: Wed Dec 4 11:37:19 2024 -0800 dt-bindings: clock: qcom: Document the SM8750 TCSR Clock Controller Add bindings documentation for the SM8750 Clock Controller. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Link: https://lore.kernel.org/r/20241204-sm8750_master_clks-v3-7-1a8f31a53a86@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../devicetree/bindings/clock/qcom,sm8550-tcsr.yaml | 2 ++ include/dt-bindings/clock/qcom,sm8750-tcsr.h | 15 +++++++++++++++ 2 files changed, 17 insertions(+) commit 42b00f445616335becee9142c0f7ef7abfee5c61 Author: Taniya Das <quic_tdas@quicinc.com> Date: Wed Dec 4 11:37:17 2024 -0800 dt-bindings: clock: qcom: Add SM8750 GCC Add device tree bindings for the global clock controller on Qualcomm SM8750 platform. Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241204-sm8750_master_clks-v3-5-1a8f31a53a86@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../devicetree/bindings/clock/qcom,sm8750-gcc.yaml | 62 ++++++ include/dt-bindings/clock/qcom,sm8750-gcc.h | 226 +++++++++++++++++++++ 2 files changed, 288 insertions(+) commit 7b0af165e2d4b612de5c40daa586d3b9a40b3af6 Author: Maxime Ripard <mripard@kernel.org> Date: Wed Dec 4 14:44:02 2024 +0100 drm/drv: Add drmm managed registration helper for dmem cgroups. Drivers will need to register dmem regions at probe time, so let's give them a drm-managed helper. Signed-off-by: Maarten Lankhorst <dev@lankhorst.se> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/20241204134410.1161769-3-dev@lankhorst.se Signed-off-by: Maxime Ripard <mripard@kernel.org> drivers/gpu/drm/drm_drv.c | 32 ++++++++++++++++++++++++++++++++ include/drm/drm_drv.h | 5 +++++ 2 files changed, 37 insertions(+) commit b168ed458ddecc176f3b9a1f4bcd83d7a4541c14 Author: Maarten Lankhorst <dev@lankhorst.se> Date: Wed Dec 4 15:31:11 2024 +0100 kernel/cgroup: Add "dmem" memory accounting cgroup This code is based on the RDMA and misc cgroup initially, but now uses page_counter. It uses the same min/low/max semantics as the memory cgroup as a result. There's a small mismatch as TTM uses u64, and page_counter long pages. In practice it's not a problem. 32-bits systems don't really come with >=4GB cards and as long as we're consistently wrong with units, it's fine. The device page size may not be in the same units as kernel page size, and each region might also have a different page size (VRAM vs GART for example). The interface is simple: - Call dmem_cgroup_register_region() - Use dmem_cgroup_try_charge to check if you can allocate a chunk of memory, use dmem_cgroup__uncharge when freeing it. This may return an error code, or -EAGAIN when the cgroup limit is reached. In that case a reference to the limiting pool is returned. - The limiting cs can be used as compare function for dmem_cgroup_state_evict_valuable. - After having evicted enough, drop reference to limiting cs with dmem_cgroup_pool_state_put. This API allows you to limit device resources with cgroups. You can see the supported cards in /sys/fs/cgroup/dmem.capacity You need to echo +dmem to cgroup.subtree_control, and then you can partition device memory. Co-developed-by: Friedrich Vock <friedrich.vock@gmx.de> Signed-off-by: Friedrich Vock <friedrich.vock@gmx.de> Co-developed-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/20241204143112.1250983-1-dev@lankhorst.se Signed-off-by: Maxime Ripard <mripard@kernel.org> Documentation/admin-guide/cgroup-v2.rst | 58 ++- Documentation/core-api/cgroup.rst | 9 + Documentation/core-api/index.rst | 1 + Documentation/gpu/drm-compute.rst | 54 ++ include/linux/cgroup_dmem.h | 66 +++ include/linux/cgroup_subsys.h | 4 + include/linux/page_counter.h | 2 +- init/Kconfig | 10 + kernel/cgroup/Makefile | 1 + kernel/cgroup/dmem.c | 861 ++++++++++++++++++++++++++++++++ mm/page_counter.c | 4 +- 11 files changed, 1060 insertions(+), 10 deletions(-) commit a572439f7143db5ea8446b7d755a16dfb12da7c7 Author: Beleswar Padhi <b-padhi@ti.com> Date: Thu Dec 19 16:35:43 2024 +0530 remoteproc: k3-r5: Use devm_ioremap_wc() helper Use a device lifecycle managed ioremap helper function. This helps prevent mistakes like unmapping out of order in cleanup functions and forgetting to unmap on all error paths. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20241219110545.1898883-4-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> drivers/remoteproc/ti_k3_r5_remoteproc.c | 38 +++++++------------------------- 1 file changed, 8 insertions(+), 30 deletions(-) commit f2e3d0d70986b1f135963dc28462fce4e65c0fc4 Author: Beleswar Padhi <b-padhi@ti.com> Date: Thu Dec 19 16:35:42 2024 +0530 remoteproc: k3-r5: Use devm_kcalloc() helper Use a device lifecycle managed action to free memory. This helps prevent mistakes like freeing out of order in cleanup functions and forgetting to free on error paths. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20241219110545.1898883-3-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> drivers/remoteproc/ti_k3_r5_remoteproc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 972361e397797320a624d1a5b457520c10ab4a28 Author: Beleswar Padhi <b-padhi@ti.com> Date: Thu Dec 19 16:35:41 2024 +0530 remoteproc: k3-r5: Add devm action to release reserved memory Use a device lifecycle managed action to release reserved memory. This helps prevent mistakes like releasing out of order in cleanup functions and forgetting to release on error paths. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20241219110545.1898883-2-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> drivers/remoteproc/ti_k3_r5_remoteproc.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit c357e2295b7880b1d9d365c3389f06ef2eb464d0 Author: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Date: Mon Jan 6 11:44:58 2025 +0100 arm64: dts: renesas: white-hawk-csi-dsi: Define CSI-2 data line orders The second CSI-2 C-PHY data-lanes have different line orders (BCA) than the two other data-lanes (ABC) for both connected CSI-2 receivers, describe this in the device tree. This has worked in the past as the R-Car CSI-2 driver did not have documentation for the line order configuration, hence magic values were written to the registers for this specific setup. Now the registers involved are documented, the hardware description as well as the driver needs to be updated. Note that the numerical values will be replaced by symbolic values later. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20250106104458.3596109-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/white-hawk-csi-dsi.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 978a7876a1e38a3734b2ecb93874debf7463dd28 Author: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com> Date: Fri Dec 20 10:14:41 2024 +0100 arm64: dts: renesas: r8a779g0: Add VSPX instances Add device nodes for the VSPX instances on R-Car V4H (R8A779G0) SoC. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com> Link: https://lore.kernel.org/20241220-rcar-v4h-vspx-v4-4-7dc1812585ad@ideasonboard.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit e163f098a34cb9ce99f2b66c325caa06e00129cb Author: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com> Date: Fri Dec 20 10:14:39 2024 +0100 arm64: dts: renesas: r8a779g0: Add FCPVX instances Add device nodes for the FCPVX instances on R-Car V4H (R8A779G0) SoC. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com> Link: https://lore.kernel.org/20241220-rcar-v4h-vspx-v4-2-7dc1812585ad@ideasonboard.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 9e269561b363038d573a69755c9eeabc9258837f Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Mon Dec 16 19:53:17 2024 +0000 arm64: dts: renesas: r9a09g047e57-smarc: Add SCIF pincontrol Add device node for SCIF pincontrol. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/20241216195325.164212-8-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 2532608530eab68207e384053fae7db7f35256ee Author: Christophe Leroy <christophe.leroy@csgroup.eu> Date: Mon Jan 6 10:15:31 2025 +0100 bpf/tests: Add 32 bits only long conditional jump tests Commit f1517eb790f9 ("bpf/tests: Expand branch conversion JIT test") introduced "Long conditional jump tests" but due to those tests making use of 64 bits DIV and MOD, they don't get jited on powerpc/32, leading to the long conditional jump test being skiped for unrelated reason. Add 4 new tests that are restricted to 32 bits ALU so that the jump tests can also be performed on platforms that do no support 64 bits operations. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/609f87a2d84e032c8d9ccb9ba7aebef893698f1e.1736154762.git.christophe.leroy@csgroup.eu lib/test_bpf.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 58 insertions(+), 6 deletions(-) commit e021e6cbfb5a695968afb6619828929a97e4a83a Author: Yunxiang Li <Yunxiang.Li@amd.com> Date: Thu Jan 2 13:50:13 2025 -0500 vfio/pci: Expose setup ROM at ROM bar when needed If ROM bar is missing for any reason, we can fallback to using pdev->rom to expose the ROM content to the guest. This fixes some passthrough use cases where the upstream bridge does not have enough address window. Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com> Link: https://lore.kernel.org/r/20250102185013.15082-3-Yunxiang.Li@amd.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com> drivers/vfio/pci/vfio_pci_config.c | 4 ++++ drivers/vfio/pci/vfio_pci_core.c | 34 ++++++++++++++++++---------------- drivers/vfio/pci/vfio_pci_rdwr.c | 22 ++++++++++++++++------ 3 files changed, 38 insertions(+), 22 deletions(-) commit c5a8b5d740ef3dde319562d2e969888b4b8dfdd8 Author: Yunxiang Li <Yunxiang.Li@amd.com> Date: Thu Jan 2 13:50:12 2025 -0500 vfio/pci: Remove shadow ROM specific code paths After commit 0c0e0736acad ("PCI: Set ROM shadow location in arch code, not in PCI core"), the shadow ROM works the same as regular ROM BARs so these code paths are no longer needed. Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com> Link: https://lore.kernel.org/r/20250102185013.15082-2-Yunxiang.Li@amd.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com> drivers/vfio/pci/vfio_pci_config.c | 8 ++------ drivers/vfio/pci/vfio_pci_core.c | 10 ++-------- drivers/vfio/pci/vfio_pci_rdwr.c | 3 --- 3 files changed, 4 insertions(+), 17 deletions(-) commit b44a06bd28f2732393c2019e3ae0e593ef76c867 Author: Ramesh Thomas <ramesh.thomas@intel.com> Date: Tue Dec 10 05:19:38 2024 -0800 vfio/pci: Remove #ifdef iowrite64 and #ifdef ioread64 Remove the #ifdef iowrite64 and #ifdef ioread64 checks around calls to 64 bit IO access. Since default implementations have been enabled, the checks are not required. Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20241210131938.303500-3-ramesh.thomas@intel.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com> drivers/vfio/pci/vfio_pci_rdwr.c | 12 ------------ 1 file changed, 12 deletions(-) commit 2b938e3db335e3670475e31a722c2bee34748c5a Author: Ramesh Thomas <ramesh.thomas@intel.com> Date: Tue Dec 10 05:19:37 2024 -0800 vfio/pci: Enable iowrite64 and ioread64 for vfio pci Definitions of ioread64 and iowrite64 macros in asm/io.h called by vfio pci implementations are enclosed inside check for CONFIG_GENERIC_IOMAP. They don't get defined if CONFIG_GENERIC_IOMAP is defined. Include linux/io-64-nonatomic-lo-hi.h to define iowrite64 and ioread64 macros when they are not defined. io-64-nonatomic-lo-hi.h maps the macros to generic implementation in lib/iomap.c. The generic implementation does 64 bit rw if readq/writeq is defined for the architecture, otherwise it would do 32 bit back to back rw. Note that there are two versions of the generic implementation that differs in the order the 32 bit words are written if 64 bit support is not present. This is not the little/big endian ordering, which is handled separately. This patch uses the lo followed by hi word ordering which is consistent with current back to back implementation in the vfio/pci code. Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20241210131938.303500-2-ramesh.thomas@intel.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com> drivers/vfio/pci/vfio_pci_rdwr.c | 1 + 1 file changed, 1 insertion(+) commit 844b8cdc681612ff24df62cdefddeab5772fadf1 Author: Yu Kuai <yukuai3@huawei.com> Date: Fri Jan 3 17:28:59 2025 +0800 nbd: don't allow reconnect after disconnect Following process can cause nbd_config UAF: 1) grab nbd_config temporarily; 2) nbd_genl_disconnect() flush all recv_work() and release the initial reference: nbd_genl_disconnect nbd_disconnect_and_put nbd_disconnect flush_workqueue(nbd->recv_workq) if (test_and_clear_bit(NBD_RT_HAS_CONFIG_REF, ...)) nbd_config_put -> due to step 1), reference is still not zero 3) nbd_genl_reconfigure() queue recv_work() again; nbd_genl_reconfigure config = nbd_get_config_unlocked(nbd) if (!config) -> succeed if (!test_bit(NBD_RT_BOUND, ...)) -> succeed nbd_reconnect_socket queue_work(nbd->recv_workq, &args->work) 4) step 1) release the reference; 5) Finially, recv_work() will trigger UAF: recv_work nbd_config_put(nbd) -> nbd_config is freed atomic_dec(&config->recv_threads) -> UAF Fix the problem by clearing NBD_RT_BOUND in nbd_genl_disconnect(), so that nbd_genl_reconfigure() will fail. Fixes: b7aa3d39385d ("nbd: add a reconfigure netlink command") Reported-by: syzbot+6b0df248918b92c33e6a@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/675bfb65.050a0220.1a2d0d.0006.GAE@google.com/ Signed-off-by: Yu Kuai <yukuai3@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250103092859.3574648-1-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/nbd.c | 1 + 1 file changed, 1 insertion(+) commit 2530766492ec7726582bcde44575ec3ff7487cd2 Author: Yang Erkun <yangerkun@huawei.com> Date: Wed Dec 25 14:59:08 2024 +0800 nfsd: fix UAF when access ex_uuid or ex_stats We can access exp->ex_stats or exp->ex_uuid in rcu context(c_show and e_show). All these resources should be released using kfree_rcu. Fix this by using call_rcu, clean them all after a rcu grace period. ================================================================== BUG: KASAN: slab-use-after-free in svc_export_show+0x362/0x430 [nfsd] Read of size 1 at addr ff11000010fdc120 by task cat/870 CPU: 1 UID: 0 PID: 870 Comm: cat Not tainted 6.12.0-rc3+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.1-2.fc37 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x53/0x70 print_address_description.constprop.0+0x2c/0x3a0 print_report+0xb9/0x280 kasan_report+0xae/0xe0 svc_export_show+0x362/0x430 [nfsd] c_show+0x161/0x390 [sunrpc] seq_read_iter+0x589/0x770 seq_read+0x1e5/0x270 proc_reg_read+0xe1/0x140 vfs_read+0x125/0x530 ksys_read+0xc1/0x160 do_syscall_64+0x5f/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e Allocated by task 830: kasan_save_stack+0x20/0x40 kasan_save_track+0x14/0x30 __kasan_kmalloc+0x8f/0xa0 __kmalloc_node_track_caller_noprof+0x1bc/0x400 kmemdup_noprof+0x22/0x50 svc_export_parse+0x8a9/0xb80 [nfsd] cache_do_downcall+0x71/0xa0 [sunrpc] cache_write_procfs+0x8e/0xd0 [sunrpc] proc_reg_write+0xe1/0x140 vfs_write+0x1a5/0x6d0 ksys_write+0xc1/0x160 do_syscall_64+0x5f/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e Freed by task 868: kasan_save_stack+0x20/0x40 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x60 __kasan_slab_free+0x37/0x50 kfree+0xf3/0x3e0 svc_export_put+0x87/0xb0 [nfsd] cache_purge+0x17f/0x1f0 [sunrpc] nfsd_destroy_serv+0x226/0x2d0 [nfsd] nfsd_svc+0x125/0x1e0 [nfsd] write_threads+0x16a/0x2a0 [nfsd] nfsctl_transaction_write+0x74/0xa0 [nfsd] vfs_write+0x1a5/0x6d0 ksys_write+0xc1/0x160 do_syscall_64+0x5f/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: ae74136b4bb6 ("SUNRPC: Allow cache lookups to use RCU protection rather than the r/w spinlock") Signed-off-by: Yang Erkun <yangerkun@huawei.com> Reviewed-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/export.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit ce32496ec1abe866225f2e2005ceda68cf4c7bf4 Author: Christoph Hellwig <hch@lst.de> Date: Mon Jan 6 09:35:11 2025 +0100 block: simplify tag allocation policy selection Use a plain BLK_MQ_F_* flag to select the round robin tag selection instead of overlaying an enum with just two possible values into the flags space. Doing so allows adding a BLK_MQ_F_MAX sentinel for simplified overflow checking in the messy debugfs helpers. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: John Garry <john.g.garry@oracle.com> Link: https://lore.kernel.org/r/20250106083531.799976-5-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-mq-debugfs.c | 25 ++++--------------------- block/blk-mq-tag.c | 5 ++--- block/blk-mq.c | 3 +-- block/blk-mq.h | 2 +- drivers/ata/ahci.h | 2 +- drivers/ata/pata_macio.c | 2 +- drivers/ata/sata_mv.c | 2 +- drivers/ata/sata_nv.c | 4 ++-- drivers/ata/sata_sil24.c | 1 - drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +- drivers/scsi/scsi_lib.c | 4 ++-- include/linux/blk-mq.h | 22 +++++++--------------- include/linux/libata.h | 4 ++-- include/scsi/scsi_host.h | 6 ++++-- 14 files changed, 29 insertions(+), 55 deletions(-) commit 1b10f0b603c066d81327c163a23c19f01e112366 Author: Yang Erkun <yangerkun@huawei.com> Date: Wed Dec 25 14:59:07 2024 +0800 SUNRPC: no need get cache ref when protected by rcu rcu_read_lock/rcu_read_unlock has already provide protection for the pointer we will reference when we call c_show. Therefore, there is no need to obtain a cache reference to help protect cache_head. Additionally, the .put such as expkey_put/svc_export_put will invoke dput, which can sleep and break rcu. Stop get cache reference to fix them all. Fixes: ae74136b4bb6 ("SUNRPC: Allow cache lookups to use RCU protection rather than the r/w spinlock") Suggested-by: NeilBrown <neilb@suse.de> Signed-off-by: Yang Erkun <yangerkun@huawei.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> net/sunrpc/cache.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit e7602bb4f3a1234df8b75728ac3260bcb8242612 Author: Christoph Hellwig <hch@lst.de> Date: Mon Jan 6 09:35:10 2025 +0100 block: remove BLK_MQ_F_NO_SCHED The only queues that really can't support a scheduler are those that do not have a gendisk associated with them, and thus can't be used for non-passthrough commands. In addition to those null_blk can optionally set the flag, which is a bad odd. Replace the null_blk usage with BLK_MQ_F_NO_SCHED_BY_DEFAULT to keep the expected semantics and then remove BLK_MQ_F_NO_SCHED as the non-disk queues never call into elevator_init_mq or blk_register_queue which adds the sysfs attributes. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250106083531.799976-4-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-mq-debugfs.c | 1 - block/bsg-lib.c | 2 +- block/elevator.c | 20 -------------------- drivers/block/null_blk/main.c | 4 ++-- drivers/nvme/host/apple.c | 1 - drivers/nvme/host/core.c | 1 - drivers/ufs/core/ufshcd.c | 1 - include/linux/blk-mq.h | 2 -- 8 files changed, 3 insertions(+), 29 deletions(-) commit c224edca7af028828e2ad866b61d731b5e72b46d Author: Yang Erkun <yangerkun@huawei.com> Date: Wed Dec 25 14:59:06 2024 +0800 nfsd: no need get cache ref when protected by rcu rcu_read_lock/rcu_read_unlock has already provide protection for the pointer we will reference when we call e_show. Therefore, there is no need to obtain a cache reference to help protect cache_head. Additionally, the .put such as expkey_put/svc_export_put will invoke dput, which can sleep and break rcu. Stop get cache reference to fix them all. Fixes: ae74136b4bb6 ("SUNRPC: Allow cache lookups to use RCU protection rather than the r/w spinlock") Suggested-by: NeilBrown <neilb@suse.de> Signed-off-by: Yang Erkun <yangerkun@huawei.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/export.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 68ed45122249083bf45593ed635474282583352c Author: Christoph Hellwig <hch@lst.de> Date: Mon Jan 6 09:35:09 2025 +0100 block: remove blk_mq_init_bitmaps The little work done in blk_mq_init_bitmaps is easier done in the only caller. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: John Garry <john.g.garry@oracle.com> Link: https://lore.kernel.org/r/20250106083531.799976-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-mq-tag.c | 38 ++++++++++++-------------------------- block/blk-mq.h | 3 --- 2 files changed, 12 insertions(+), 29 deletions(-) commit 6783811569aef24b949992bd5c4e6eaac02a0c30 Author: Christoph Hellwig <hch@lst.de> Date: Mon Jan 6 09:35:08 2025 +0100 block: better split mq vs non-mq code in add_disk_fwnode Add a big conditional for blk-mq vs not mq at the beginning of add_disk_fwnode so that elevator_init_mq is only called for blk-mq disks, and add checks that the right methods or set or not set based on the queue type. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250106083531.799976-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> block/genhd.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 2f55dbe4e2072c9e99298c6f37473778a98c9107 Author: Yang Erkun <yangerkun@huawei.com> Date: Wed Dec 25 14:59:05 2024 +0800 SUNRPC: introduce cache_check_rcu to help check in rcu context This is a prepare patch to add cache_check_rcu, will use it with follow patch. Suggested-by: NeilBrown <neilb@suse.de> Signed-off-by: Yang Erkun <yangerkun@huawei.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> include/linux/sunrpc/cache.h | 2 ++ net/sunrpc/cache.c | 41 ++++++++++++++++++++++++++--------------- 2 files changed, 28 insertions(+), 15 deletions(-) commit cb80ecf75ac38df30cea1163563391ef7e76a24e Author: Olga Kornievskaia <okorniev@redhat.com> Date: Thu Dec 19 16:57:48 2024 -0500 NFSD: add cb opcode to WARN_ONCE on failed callback It helps to know what kind of callback happened that triggered the WARN_ONCE in nfsd4_cb_done() function in diagnosing what can set an uncommon state where both cb_status and tk_status are set at the same time. Signed-off-by: Olga Kornievskaia <okorniev@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4callback.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1b3e26a5ccbfc2f85bda1930cc278e313165e353 Author: Olga Kornievskaia <okorniev@redhat.com> Date: Thu Dec 19 15:12:04 2024 -0500 NFSD: fix decoding in nfs4_xdr_dec_cb_getattr If a client were to send an error to a CB_GETATTR call, the code erronously continues to try decode past the error code. It ends up returning BAD_XDR error to the rpc layer and then in turn trigger a WARN_ONCE in nfsd4_cb_done() function. Fixes: 6487a13b5c6b ("NFSD: add support for CB_GETATTR callback") Signed-off-by: Olga Kornievskaia <okorniev@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4callback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35e34642b5996df91e2879d59f726df6072c82f9 Author: NeilBrown <neilb@suse.de> Date: Thu Dec 12 08:47:09 2024 +1100 nfsd: add shrinker to reduce number of slots allocated per session Add a shrinker which frees unused slots and may ask the clients to use fewer slots on each session. We keep a global count of the number of freeable slots, which is the sum of one less than the current "target" slots in all sessions in all clients in all net-namespaces. This number is reported by the shrinker. When the shrinker is asked to free some, we call xxx on each session in a round-robin asking each to reduce the slot count by 1. This will reduce the "target" so the number reported by the shrinker will reduce immediately. The memory will only be freed later when the client confirmed that it is no longer needed. We use a global list of sessions and move the "head" to after the last session that we asked to reduce, so the next callback from the shrinker will move on to the next session. This pressure should be applied "evenly" across all sessions over time. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4state.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++---- fs/nfsd/state.h | 1 + 2 files changed, 73 insertions(+), 5 deletions(-) commit fc8738c68d0bbf5033dd98b4f63d277ecbd49fd7 Author: NeilBrown <neilb@suse.de> Date: Thu Dec 12 08:47:08 2024 +1100 nfsd: add support for freeing unused session-DRC slots Reducing the number of slots in the session slot table requires confirmation from the client. This patch adds reduce_session_slots() which starts the process of getting confirmation, but never calls it. That will come in a later patch. Before we can free a slot we need to confirm that the client won't try to use it again. This involves returning a lower cr_maxrequests in a SEQUENCE reply and then seeing a ca_maxrequests on the same slot which is not larger than we limit we are trying to impose. So for each slot we need to remember that we have sent a reduced cr_maxrequests. To achieve this we introduce a concept of request "generations". Each time we decide to reduce cr_maxrequests we increment the generation number, and record this when we return the lower cr_maxrequests to the client. When a slot with the current generation reports a low ca_maxrequests, we commit to that level and free extra slots. We use an 16 bit generation number (64 seems wasteful) and if it cycles we iterate all slots and reset the generation number to avoid false matches. When we free a slot we store the seqid in the slot pointer so that it can be restored when we reactivate the slot. The RFC can be read as suggesting that the slot number could restart from one after a slot is retired and reactivated, but also suggests that retiring slots is not required. So when we reactive a slot we accept with the next seqid in sequence, or 1. When decoding sa_highest_slotid into maxslots we need to add 1 - this matches how it is encoded for the reply. se_dead is moved in struct nfsd4_session to remove a hole. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4state.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++------ fs/nfsd/nfs4xdr.c | 5 +-- fs/nfsd/state.h | 6 +++- fs/nfsd/xdr4.h | 2 -- 4 files changed, 92 insertions(+), 15 deletions(-) commit 60aa6564317db29ea72b6db821b5bbb45f1e879d Author: NeilBrown <neilb@suse.de> Date: Thu Dec 12 08:47:07 2024 +1100 nfsd: allocate new session-based DRC slots on demand. If a client ever uses the highest available slot for a given session, attempt to allocate more slots so there is room for the client to use them if wanted. GFP_NOWAIT is used so if there is not plenty of free memory, failure is expected - which is what we want. It also allows the allocation while holding a spinlock. Each time we increase the number of slots by 20% (rounded up). This allows fairly quick growth while avoiding excessive over-shoot. We would expect to stablise with around 10% more slots available than the client actually uses. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4state.c | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) commit 601c8cb349c2d9a3a6cea6f53e0bf838e2e60893 Author: NeilBrown <neilb@suse.de> Date: Thu Dec 12 08:47:06 2024 +1100 nfsd: add session slot count to /proc/fs/nfsd/clients/*/info Each client now reports the number of slots allocated in each session. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4state.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit b5fba969a2e445e2f36b699582d8410478a99374 Author: NeilBrown <neilb@suse.de> Date: Thu Dec 12 08:47:05 2024 +1100 nfsd: remove artificial limits on the session-based DRC Rather than guessing how much space it might be safe to use for the DRC, simply try allocating slots and be prepared to accept failure. The first slot for each session is allocated with GFP_KERNEL which is unlikely to fail. Subsequent slots are allocated with the addition of __GFP_NORETRY which is expected to fail if there isn't much free memory. This is probably too aggressive but clears the way for adding a shrinker interface to free extra slots when memory is tight. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4state.c | 94 +++++++++-------------------------------------------- fs/nfsd/nfsd.h | 3 -- fs/nfsd/nfssvc.c | 32 ------------------ 3 files changed, 16 insertions(+), 113 deletions(-) commit 0b6e14242630ad5f65839b23400bd67c5166e2b4 Author: NeilBrown <neilb@suse.de> Date: Thu Dec 12 08:47:04 2024 +1100 nfsd: use an xarray to store v4.1 session slots Using an xarray to store session slots will make it easier to change the number of active slots based on demand, and removes an unnecessary limit. To achieve good throughput with a high-latency server it can be helpful to have hundreds of concurrent writes, which means hundreds of slots. So increase the limit to 2048 (twice what the Linux client will currently use). This limit is only a sanity check, not a hard limit. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4state.c | 28 ++++++++++++++++++---------- fs/nfsd/state.h | 9 ++++++--- 2 files changed, 24 insertions(+), 13 deletions(-) commit a4b853f183a19a88ad635f9ae8ba97e7cb377a23 Author: NeilBrown <neilb@suse.de> Date: Mon Dec 9 11:41:27 2024 +1100 sunrpc: remove all connection limit configuration Now that the connection limit only apply to unconfirmed connections, there is no need to configure it. So remove all the configuration and fix the number of unconfirmed connections as always 64 - which is now given a name: XPT_MAX_TMP_CONN Signed-off-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/lockd/svc.c | 8 -------- fs/nfsd/netns.h | 6 ------ fs/nfsd/nfsctl.c | 42 ----------------------------------------- fs/nfsd/nfssvc.c | 5 ----- include/linux/sunrpc/svc.h | 4 ---- include/linux/sunrpc/svc_xprt.h | 6 ++++++ net/sunrpc/svc_xprt.c | 8 +------- 7 files changed, 7 insertions(+), 72 deletions(-) commit eccbbc7c00a5aae5e704d4002adfaf4c3fa4b30d Author: NeilBrown <neilb@suse.de> Date: Mon Dec 9 11:41:26 2024 +1100 nfsd: don't use sv_nrthreads in connection limiting calculations. The heuristic for limiting the number of incoming connections to nfsd currently uses sv_nrthreads - allowing more connections if more threads were configured. A future patch will allow number of threads to grow dynamically so that there will be no need to configure sv_nrthreads. So we need a different solution for limiting connections. It isn't clear what problem is solved by limiting connections (as mentioned in a code comment) but the most likely problem is a connection storm - many connections that are not doing productive work. These will be closed after about 6 minutes already but it might help to slow down a storm. This patch adds a per-connection flag XPT_PEER_VALID which indicates that the peer has presented a filehandle for which it has some sort of access. i.e the peer is known to be trusted in some way. We now only count connections which have NOT been determined to be valid. There should be relative few of these at any given time. If the number of non-validated peer exceed a limit - currently 64 - we close the oldest non-validated peer to avoid having too many of these useless connections. Note that this patch significantly changes the meaning of the various configuration parameters for "max connections". The next patch will remove all of these. Signed-off-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfs/callback.c | 4 ---- fs/nfs/callback_xdr.c | 1 + fs/nfsd/netns.h | 4 ++-- fs/nfsd/nfsfh.c | 2 ++ include/linux/sunrpc/svc.h | 2 +- include/linux/sunrpc/svc_xprt.h | 16 ++++++++++++++++ net/sunrpc/svc_xprt.c | 32 ++++++++++++++++---------------- 7 files changed, 38 insertions(+), 23 deletions(-) commit de71d4e211eddb670b285a0ea477a299601ce1ca Author: Scott Mayhew <smayhew@redhat.com> Date: Tue Dec 10 07:25:54 2024 -0500 nfsd: fix legacy client tracking initialization Get rid of the nfsd4_legacy_tracking_ops->init() call in check_for_legacy_methods(). That will be handled in the caller (nfsd4_client_tracking_init()). Otherwise, we'll wind up calling nfsd4_legacy_tracking_ops->init() twice, and the second time we'll trigger the BUG_ON() in nfsd4_init_recdir(). Fixes: 74fd48739d04 ("nfsd: new Kconfig option for legacy client tracking") Reported-by: Jur van der Burg <jur@avtware.com> Link: https://bugzilla.kernel.org/show_bug.cgi?id=219580 Signed-off-by: Scott Mayhew <smayhew@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4recover.c | 1 - 1 file changed, 1 deletion(-) commit 6f035c99acd6ef6b875ac4ac28e6117e60db8f89 Author: Chuck Lever <chuck.lever@oracle.com> Date: Fri Dec 6 16:36:33 2024 -0500 NFSD: Clean up unused variable @sb should have been removed by commit 7e64c5bc497c ("NLM/NFSD: Fix lock notifications for async-capable filesystems"). Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4state.c | 2 -- 1 file changed, 2 deletions(-) commit 6e1d75f778d644d02147d8e61ca2cef033ce045d Author: NeilBrown <neilb@suse.de> Date: Fri Dec 6 13:55:53 2024 +1100 sunrpc/svc: use store_release_wake_up() svc_thread_init_status() contains an open-coded store_release_wake_up(). It is cleaner to use that function directly rather than needing to remember the barrier. Signed-off-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> include/linux/sunrpc/svc.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 935fee5d5ba8073b223a9cc9906a62950f0e13ed Author: NeilBrown <neilb@suse.de> Date: Fri Dec 6 13:55:52 2024 +1100 nfsd: use new wake_up_var interfaces. The wake_up_var interface is fragile as barriers are sometimes needed. There are now new interfaces so that most wake-ups can use an interface that is guaranteed to have all barriers needed. This patch changes the wake up on cl_cb_inflight to use atomic_dec_and_wake_up(). It also changes the wake up on rp_locked to use store_release_wake_up(). This involves changing rp_locked from atomic_t to int. Signed-off-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/nfs4callback.c | 3 +-- fs/nfsd/nfs4state.c | 16 ++++++---------- fs/nfsd/state.h | 2 +- 3 files changed, 8 insertions(+), 13 deletions(-) commit 19d97ac5aabec2e253fd40d110ecbe326040d917 Author: Chen Hanxiao <chenhx.fnst@fujitsu.com> Date: Fri Nov 22 10:18:25 2024 +0800 nfsd: trace: remove redundant stateid even deleg_recall Since commit e56dc9e2949e ("nfsd: remove fault injection code") remove all nfsd_recall_delegations codes, we don't need trace_nfsd_deleg_recall any more. Signed-off-by: Chen Hanxiao <chenhx.fnst@fujitsu.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> fs/nfsd/trace.h | 1 - 1 file changed, 1 deletion(-) commit b7175e24d6acf79d9f3af9ce9d3d50de1fa748ec Author: Christoph Hellwig <hch@lst.de> Date: Mon Jan 6 09:15:29 2025 +0100 block: add a dma mapping iterator blk_rq_map_sg is maze of nested loops. Untangle it by creating an iterator that returns [paddr,len] tuples for DMA mapping, and then implement the DMA logic on top of this. This not only removes code at the source level, but also generates nicer binary code: $ size block/blk-merge.o.* text data bss dec hex filename 10001 432 0 10433 28c1 block/blk-merge.o.new 10317 468 0 10785 2a21 block/blk-merge.o.old Last but not least it will be used as a building block for a new DMA mapping helper that doesn't rely on struct scatterlist. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250106081609.798289-1-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-merge.c | 177 +++++++++++++++++++++--------------------------------- 1 file changed, 70 insertions(+), 107 deletions(-) commit 2caca8fc7aad9ea9a6ea3ed26ed146b1e5f06fab Author: Christoph Hellwig <hch@lst.de> Date: Mon Jan 6 09:14:37 2025 +0100 block: use page_to_phys in bvec_phys Use page_to_phys instead of open coding it now that it is available in an architecture independent way. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250106081437.798213-1-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> include/linux/bvec.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit fa47906ff358a5865b7be2356a5a1d1e58dd17d8 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon Jan 6 06:31:11 2025 -0800 vsnprintf: fix up kerneldoc for argument name changes Stephen Rothwell reports that I missed fixing up the documentation when the argument names changed in commit 938df695e98d ("vsprintf: associate the format state with the format pointer"), resulting in htmldoc warnings like lib/vsprintf.c:2760: warning: Function parameter or struct member 'fmt_str' not described in 'vsnprintf' lib/vsprintf.c:2760: warning: Excess function parameter 'fmt' description in 'vsnprintf' ... which I didn't notice because the doc build takes longer than the whole "real" kernel build for me, so I never bother (and judging by the other warnings, pretty much nobody else does either). I guess the bigger issues won't be fixed until the doc build is much faster (narrator: "That isn's in the cards") but at least linux-next finds the new cases. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Fixes: 938df695e98d ("vsprintf: associate the format state with the format pointer") Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/vsprintf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8c21f88407d230543435445903cfbb4d05b7b339 Author: Peilin Ye <yepeilin@google.com> Date: Fri Jan 3 02:04:18 2025 +0000 bpf, arm64: Emit A64_{ADD,SUB}_I when possible in emit_{lse,ll_sc}_atomic() Currently in emit_{lse,ll_sc}_atomic(), if there is an offset, we add it to the base address by doing e.g.: if (off) { emit_a64_mov_i(1, tmp, off, ctx); emit(A64_ADD(1, tmp, tmp, dst), ctx); [...] As pointed out by Xu, we can use emit_a64_add_i() (added in the previous patch) instead, which tries to combine the above into a single A64_ADD_I or A64_SUB_I when possible. Suggested-by: Xu Kuohai <xukuohai@huaweicloud.com> Signed-off-by: Peilin Ye <yepeilin@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Xu Kuohai <xukuohai@huawei.com> Link: https://lore.kernel.org/bpf/9ad3034a62361d91a99af24efa03f48c4c9e13ea.1735868489.git.yepeilin@google.com arch/arm64/net/bpf_jit_comp.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 66bb58ac06c229f213ff974aebc453f1ac6dde09 Author: Peilin Ye <yepeilin@google.com> Date: Fri Jan 3 02:03:42 2025 +0000 bpf, arm64: Factor out emit_a64_add_i() As suggested by Xu, factor out emit_a64_add_i() for later use. No functional change. Suggested-by: Xu Kuohai <xukuohai@huaweicloud.com> Signed-off-by: Peilin Ye <yepeilin@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Xu Kuohai <xukuohai@huawei.com> Link: https://lore.kernel.org/bpf/fedbaca80e6d8bd5bcba1ac5320dfbbdab14472e.1735868489.git.yepeilin@google.com arch/arm64/net/bpf_jit_comp.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 0a5807219a862ea1e250c665325b9bffb5940de0 Author: Peilin Ye <yepeilin@google.com> Date: Fri Jan 3 02:02:53 2025 +0000 bpf, arm64: Simplify if logic in emit_lse_atomic() Delete that unnecessary outer if clause. No functional change. Signed-off-by: Peilin Ye <yepeilin@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Xu Kuohai <xukuohai@huawei.com> Link: https://lore.kernel.org/bpf/e8520e5503a489e2dea8526077976ae5a0ab1849.1735868489.git.yepeilin@google.com arch/arm64/net/bpf_jit_comp.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 73b9075f334f5debf28646884a320b796b27768d Author: Jiayuan Chen <mrpre@163.com> Date: Tue Dec 24 15:59:57 2024 +0800 selftests/bpf: Avoid generating untracked files when running bpf selftests Currently, when we run the BPF selftests with the following command: make -C tools/testing/selftests TARGETS=bpf SKIP_TARGETS="" The command generates untracked files and directories with make version less than 4.4: ''' Untracked files: (use "git add <file>..." to include in what will be committed) tools/testing/selftests/bpfFEATURE-DUMP.selftests tools/testing/selftests/bpffeature/ ''' We lost slash after word "bpf". The reason is slash appending code is as follow: ''' OUTPUT := $(OUTPUT)/ $(eval include ../../../build/Makefile.feature) OUTPUT := $(patsubst %/,%,$(OUTPUT)) ''' This way of assigning values to OUTPUT will never be effective for the variable OUTPUT provided via the command argument [1] and BPF makefile is called from parent Makfile(tools/testing/selftests/Makefile) like: ''' all: ... $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET ''' According to GNU make, we can use override Directive to fix this issue [2]. [1] https://www.gnu.org/software/make/manual/make.html#Overriding [2] https://www.gnu.org/software/make/manual/make.html#Override-Directive Fixes: dc3a8804d790 ("selftests/bpf: Adapt OUTPUT appending logic to lower versions of Make") Signed-off-by: Jiayuan Chen <mrpre@163.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/bpf/20241224075957.288018-1-mrpre@163.com tools/testing/selftests/bpf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 210afa1598de32070faac2c7a33db6006c8408be Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Mon Dec 16 22:06:28 2024 +0000 media: venus: Remove unused hfi_core_ping() hfi_core_ping() was added by 2017's commit 09c2845e8fe4 ("[media] media: venus: hfi: add Host Firmware Interface (HFI)") but has remained unused. Remove it. It was the only caller of the ->core_ping member of hfi_ops, so remove it, and the venus_core_ping that it pointed to. Note I've left pky_sys_ping which seems to be the lowest level definition of the command. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/qcom/venus/hfi.c | 23 ----------------------- drivers/media/platform/qcom/venus/hfi.h | 2 -- drivers/media/platform/qcom/venus/hfi_venus.c | 11 ----------- 3 files changed, 36 deletions(-) commit 459997e8990d9cdf7fb126057c31ec0ca8ff66ca Author: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Date: Mon Dec 30 17:00:35 2024 +0000 media: dt-bindings: qcom-venus: Deprecate video-decoder and video-encoder where applicable For the list of yaml files here the video-decoder and video-encoder nodes provide nothing more than configuration input for the driver. These entries do not in fact impart hardware specific data and should be deprecated. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../devicetree/bindings/media/qcom,msm8916-venus.yaml | 12 ++---------- .../devicetree/bindings/media/qcom,sc7180-venus.yaml | 12 ++---------- .../devicetree/bindings/media/qcom,sc7280-venus.yaml | 12 ++---------- .../devicetree/bindings/media/qcom,sdm845-venus-v2.yaml | 12 ++---------- .../devicetree/bindings/media/qcom,sm8250-venus.yaml | 12 ++---------- 5 files changed, 10 insertions(+), 50 deletions(-) commit 354846c3e9c98e174439fa83efbd2ddea099acc4 Author: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Date: Mon Dec 30 17:00:34 2024 +0000 media: venus: Populate video encoder/decoder nodename entries Populate encoder and decoder node-name entries for the upstream parts. Once done the compat="video-encoder" and compat="video-decoder" in the dtsi can be dropped though the venus driver will continue to favour DT declared video-encoder/video-decoder declarations over static declarations for compatibility. Tested-by: Renjiang Han <quic_renjiang@quicinc.com> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/qcom/venus/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 687bfbba5a1cb15cee51519c210141ed1c4b0ec7 Author: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Date: Mon Dec 30 17:00:33 2024 +0000 media: venus: Add support for static video encoder/decoder declarations Add resource structure data and probe() logic to support static declarations of encoder and decoder. Right now we rely on video encoder/decoder selection happening in the dtb but, this goes against the remit of device tree which is supposed to describe hardware, not select functional logic in Linux drivers. Provide two strings in the venus resource structure enc_nodename and dec_nodename. When set the venus driver will create an OF entry in-memory consistent with: dec_nodename { compat = "video-decoder"; }; and/or enc_nodename { compat = "video-encoder"; }; This will allow us to reuse the existing driver scheme of relying on compat names maintaining compatibility with old dtb files. dec_nodename can be "video-decoder" or "video0" enc_nodename can be "video-encoder" or "video1" This change relies on of_changeset() API as a result select OF_DYNAMIC will be added to venus/Kconfig Tested-by: Renjiang Han <quic_renjiang@quicinc.com> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/qcom/venus/Kconfig | 1 + drivers/media/platform/qcom/venus/core.c | 95 ++++++++++++++++++++++++++++++- drivers/media/platform/qcom/venus/core.h | 4 ++ 3 files changed, 99 insertions(+), 1 deletion(-) commit daa7031a31ce184e7b98fdaf7fb25aba5a7ea04f Author: Sergey Senozhatsky <senozhatsky@chromium.org> Date: Tue Dec 24 16:24:06 2024 +0900 media: venus: match instance creation and destruction order Match order of instances' initialization in venc_open()/vdec_close() and order of destruction in venus_common_close(). Suggested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/qcom/venus/vdec.c | 18 +++++++++--------- drivers/media/platform/qcom/venus/venc.c | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) commit df4ff47448fe0d392b29868e8398e3b0e587514d Author: Sergey Senozhatsky <senozhatsky@chromium.org> Date: Tue Dec 24 16:24:05 2024 +0900 media: venus: destroy hfi session after m2m_ctx release This partially reverts commit that made hfi_session_destroy() the first step of vdec/venc close(). The reason being is a regression report when, supposedly, encode/decoder is closed with still active streaming (no ->stop_streaming() call before close()) and pending pkts, so isr_thread cannot find instance and fails to process those pending pkts. This was the idea behind the original patch - make it impossible to use instance under destruction, because this is racy, but apparently there are uses cases that depend on that unsafe pattern. Return to the old (unsafe) behaviour for the time being (until a better fix is found). Fixes: 45b1a1b348ec ("media: venus: sync with threaded IRQ during inst destruction") Cc: stable@vger.kernel.org Reported-by: Nathan Hebert <nhebert@google.com> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/qcom/venus/core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 8977b561216c7e693d61c6442657e33f134bfeb5 Author: Junxian Huang <huangjunxian6@hisilicon.com> Date: Mon Jan 6 19:12:11 2025 +0800 RDMA/hns: Clean up the legacy CONFIG_INFINIBAND_HNS hns driver used to support hip06 and hip08 devices with CONFIG_INFINIBAND_HNS_HIP06 and CONFIG_INFINIBAND_HNS_HIP08 respectively, which both depended on CONFIG_INFINIBAND_HNS. But we no longer provide support for hip06 and only support hip08 and higher since the commit in fixes line, so there is no need to have CONFIG_INFINIBAND_HNS any more. Remove it and only keep CONFIG_INFINIBAND_HNS_HIP08. Fixes: 38d220882426 ("RDMA/hns: Remove support for HIP06") Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Link: https://patch.msgid.link/20250106111211.3945051-1-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/Makefile | 2 +- drivers/infiniband/hw/hns/Kconfig | 20 +++++--------------- drivers/infiniband/hw/hns/Makefile | 9 +++------ 3 files changed, 9 insertions(+), 22 deletions(-) commit 81468c4058a62e84e475433b83b3edc613294f5e Author: Li Zhijian <lizhijian@fujitsu.com> Date: Mon Jan 6 08:45:16 2025 +0800 RDMA/rtrs: Add missing deinit() call A warning is triggered when repeatedly connecting and disconnecting the rnbd: list_add corruption. prev->next should be next (ffff88800b13e480), but was ffff88801ecd1338. (prev=ffff88801ecd1340). WARNING: CPU: 1 PID: 36562 at lib/list_debug.c:32 __list_add_valid_or_report+0x7f/0xa0 Workqueue: ib_cm cm_work_handler [ib_cm] RIP: 0010:__list_add_valid_or_report+0x7f/0xa0 ? __list_add_valid_or_report+0x7f/0xa0 ib_register_event_handler+0x65/0x93 [ib_core] rtrs_srv_ib_dev_init+0x29/0x30 [rtrs_server] rtrs_ib_dev_find_or_add+0x124/0x1d0 [rtrs_core] __alloc_path+0x46c/0x680 [rtrs_server] ? rtrs_rdma_connect+0xa6/0x2d0 [rtrs_server] ? rcu_is_watching+0xd/0x40 ? __mutex_lock+0x312/0xcf0 ? get_or_create_srv+0xad/0x310 [rtrs_server] ? rtrs_rdma_connect+0xa6/0x2d0 [rtrs_server] rtrs_rdma_connect+0x23c/0x2d0 [rtrs_server] ? __lock_release+0x1b1/0x2d0 cma_cm_event_handler+0x4a/0x1a0 [rdma_cm] cma_ib_req_handler+0x3a0/0x7e0 [rdma_cm] cm_process_work+0x28/0x1a0 [ib_cm] ? _raw_spin_unlock_irq+0x2f/0x50 cm_req_handler+0x618/0xa60 [ib_cm] cm_work_handler+0x71/0x520 [ib_cm] Commit 667db86bcbe8 ("RDMA/rtrs: Register ib event handler") introduced a new element .deinit but never used it at all. Fix it by invoking the `deinit()` to appropriately unregister the IB event handler. Cc: Jinpu Wang <jinpu.wang@ionos.com> Fixes: 667db86bcbe8 ("RDMA/rtrs: Register ib event handler") Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> Link: https://patch.msgid.link/20250106004516.16611-1-lizhijian@fujitsu.com Acked-by: Jack Wang <jinpu.wang@ionos.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/ulp/rtrs/rtrs.c | 3 +++ 1 file changed, 3 insertions(+) commit 802a9f8792c4b4f81f36e90302067bf55ababed7 Author: Yonatan Nachum <ynachum@amazon.com> Date: Sun Jan 5 13:14:21 2025 +0000 RDMA/efa: Align interrupt related fields to same type There is a lot of implicit casting of interrupt related fields. Use u32 as common type since this is what the device use as type for max supported EQs and what IB core expects in num_comp_vectors field. Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com> Reviewed-by: Michael Margolin <mrgolin@amazon.com> Signed-off-by: Yonatan Nachum <ynachum@amazon.com> Link: https://patch.msgid.link/20250105131421.29030-1-ynachum@amazon.com Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/efa/efa.h | 8 ++++---- drivers/infiniband/hw/efa/efa_com.h | 6 +++--- drivers/infiniband/hw/efa/efa_main.c | 19 +++++++------------ 3 files changed, 14 insertions(+), 19 deletions(-) commit a38509fd5cdc125ef54562760a05c68ebd4812bc Author: Bence Csókás <csokas.bence@prolan.hu> Date: Thu Dec 19 15:28:51 2024 +0100 spi: atmel-quadspi: Use devm_ clock management Clean up error handling by using the new devm_ clock handling functions. This should make it easier to add new code, as we can eliminate the "goto ladder" in probe(). Signed-off-by: Bence Csókás <csokas.bence@prolan.hu> Link: https://patch.msgid.link/20241219142851.430959-1-csokas.bence@prolan.hu Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/atmel-quadspi.c | 42 +++++++++++------------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) commit af103eb7d7d881cf6ff7414242bce2d8e394cc32 Author: Jon Lin <jon.lin@rock-chips.com> Date: Thu Dec 19 22:22:16 2024 +0800 spi: rockchip-sfc: Support sclk_x2 version SFC after version 8 supports dtr mode, so the IO is the binary output of the controller clock. Signed-off-by: Jon Lin <jon.lin@rock-chips.com> Link: https://patch.msgid.link/20241219142216.2123065-1-jon.lin@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-rockchip-sfc.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 1e293574c6f5d5d87acd7d64415eae055d0672e7 Author: Santhosh Kumar K <s-k6@ti.com> Date: Thu Jan 2 17:35:44 2025 +0530 spi: cadence-quadspi: Enable SPI_TX_QUAD Enable the SPI_TX_QUAD mode bit in the host->mode_bits to support data transmission over four lines to improve the performance. Tested the functionality on AM62Lx EVM (W25N01JW) in 1S-4S-4S mode. Signed-off-by: Santhosh Kumar K <s-k6@ti.com> Link: https://patch.msgid.link/20250102120544.1407152-1-s-k6@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-cadence-quadspi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit be92ab2de0ee1a13291c3b47b2d7eb24d80c0a2c Author: Bence Csókás <csokas.bence@prolan.hu> Date: Thu Dec 19 10:12:58 2024 +0100 spi: atmel-qspi: Memory barriers after memory-mapped I/O The QSPI peripheral control and status registers are accessible via the SoC's APB bus, whereas MMIO transactions' data travels on the AHB bus. Microchip documentation and even sample code from Atmel emphasises the need for a memory barrier before the first MMIO transaction to the AHB-connected QSPI, and before the last write to its registers via APB. This is achieved by the following lines in `atmel_qspi_transfer()`: /* Dummy read of QSPI_IFR to synchronize APB and AHB accesses */ (void)atmel_qspi_read(aq, QSPI_IFR); However, the current documentation makes no mention to synchronization requirements in the other direction, i.e. after the last data written via AHB, and before the first register access on APB. In our case, we were facing an issue where the QSPI peripheral would cease to send any new CSR (nCS Rise) interrupts, leading to a timeout in `atmel_qspi_wait_for_completion()` and ultimately this panic in higher levels: ubi0 error: ubi_io_write: error -110 while writing 63108 bytes to PEB 491:128, written 63104 bytes After months of extensive research of the codebase, fiddling around the debugger with kgdb, and back-and-forth with Microchip, we came to the conclusion that the issue is probably that the peripheral is still busy receiving on AHB when the LASTXFER bit is written to its Control Register on APB, therefore this write gets lost, and the peripheral still thinks there is more data to come in the MMIO transfer. This was first formulated when we noticed that doubling the write() of QSPI_CR_LASTXFER seemed to solve the problem. Ultimately, the solution is to introduce memory barriers after the AHB-mapped MMIO transfers, to ensure ordering. Fixes: d5433def3153 ("mtd: spi-nor: atmel-quadspi: Add spi-mem support to atmel-quadspi") Cc: Hari.PrasathGE@microchip.com Cc: Mahesh.Abotula@microchip.com Cc: Marco.Cardellini@microchip.com Cc: stable@vger.kernel.org # c0a0203cf579: ("spi: atmel-quadspi: Create `atmel_qspi_ops`"...) Cc: stable@vger.kernel.org # 6.x.y Signed-off-by: Bence Csókás <csokas.bence@prolan.hu> Link: https://patch.msgid.link/20241219091258.395187-1-csokas.bence@prolan.hu Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/atmel-quadspi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit dddca3b2fc676113c58b04aaefe84bfb958ac83e Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Sat Jan 4 17:04:53 2025 +0900 regulator: of: Implement the unwind path of of_regulator_match() of_regulator_match() does not release the OF node reference in the error path, resulting in an OF node leak. Therefore, call of_node_put() on the obtained nodes before returning the EINVAL error. Since it is possible that some drivers call this function and do not exit on failure, such as s2mps11_pmic_driver, clear the init_data and of_node in the error path. This was reported by an experimental verification tool that I am developing. As I do not have access to actual devices nor the QEMU board configuration to test drivers that call this function, no runtime test was able to be performed. Fixes: 1c8fa58f4750 ("regulator: Add generic DT parsing for regulators") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Link: https://patch.msgid.link/20250104080453.2153592-1-joe@pf.is.s.u-tokyo.ac.jp Signed-off-by: Mark Brown <broonie@kernel.org> drivers/regulator/of_regulator.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 530e5ada1c8efb8bac7dad668f4176260d13d4da Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Wed Dec 18 00:30:43 2024 +0000 ASoC: dt-bindings: renesas,rsnd: remove post-init-providers property commit f8da001ae7a ("ASoC: audio-graph-card2: Purge absent supplies for device tree nodes") marks multi/dpcm/c2c nodes as no suppliers. We no longer need to use post-init-providers property to break fw_devlink cycle (And no one is using it yet). Let's remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/87ikrhrfws.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 6 ------ 1 file changed, 6 deletions(-) commit c0641be588c22fdcecdb1e90a64803047d4441f8 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Mon Dec 30 09:57:15 2024 +0100 ASoC: SOF: Intel: Use str_yes_no() helper in atom_dump() Remove hard-coded strings by using the str_yes_no() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/20241230085717.785718-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sof/intel/atom.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit be947cc0cbbb0985d60a77aed709460a46eb3d0b Author: Weidong Wang <wangweidong.a@awinic.com> Date: Tue Dec 31 20:56:10 2024 +0800 ASoC: codecs: Add aw88083 amplifier driver The driver is for amplifiers aw88083 of Awinic Technology Corporation. The AW88083 is an intelligent digital audio amplifier with low noise. Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Link: https://patch.msgid.link/20241231125610.465614-3-wangweidong.a@awinic.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/Kconfig | 2 +- sound/soc/codecs/aw88081.c | 333 +++++++++++++++++++++++++++++++++++++-------- sound/soc/codecs/aw88081.h | 43 ++++++ 3 files changed, 321 insertions(+), 57 deletions(-) commit e7b73981380cefc9ed6261e3b53c37c327cab189 Author: Weidong Wang <wangweidong.a@awinic.com> Date: Tue Dec 31 20:56:09 2024 +0800 ASoC: dt-bindings: Add schema for "awinic,aw88083" Add the awinic,aw88083 property to support the aw88083 chip. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Link: https://patch.msgid.link/20241231125610.465614-2-wangweidong.a@awinic.com Signed-off-by: Mark Brown <broonie@kernel.org> Documentation/devicetree/bindings/sound/awinic,aw88395.yaml | 2 ++ 1 file changed, 2 insertions(+) commit f1a92bb81a6cf9ae9a50d175be8b396bfabcb487 Author: Stephen Gordon <gordoste@iinet.net.au> Date: Mon Jan 6 16:06:59 2025 +1100 ASoC: simple_card: Show if link is unidirectional It is handy to know whether the link has playback-only/capture-only flags when debugging. Signed-off-by: Stephen Gordon <gordoste@iinet.net.au> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/20250106050659.57924-3-gordoste@iinet.net.au Signed-off-by: Mark Brown <broonie@kernel.org> include/sound/simple_card_utils.h | 4 ++++ 1 file changed, 4 insertions(+) commit 8c588fe965d95fd2d18e1a1d55489b9237eeddfe Author: Stephen Gordon <gordoste@iinet.net.au> Date: Mon Jan 6 16:06:58 2025 +1100 ASoC: simple_card: Improve debugging messages These fields are from the dai_link, not the dai. Signed-off-by: Stephen Gordon <gordoste@iinet.net.au> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/20250106050659.57924-2-gordoste@iinet.net.au Signed-off-by: Mark Brown <broonie@kernel.org> include/sound/simple_card_utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 08ae2487b202ff92b1c6393f18630895f39460bf Author: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Date: Mon Jan 6 21:25:00 2025 +0900 tomoyo: automatically use patterns for several situations in learning mode The "file_pattern" keyword was used for automatically recording patternized pathnames when using the learning mode. This keyword was removed in TOMOYO 2.4 because it is impossible to predefine all possible pathname patterns. However, since the numeric part of proc:/$PID/ , pipe:[$INO] and socket:[$INO] has no meaning except $PID == 1, automatically replacing the numeric part with \$ pattern helps reducing frequency of restarting the learning mode due to hitting the quota. Since replacing one digit with \$ pattern requires enlarging string buffer, and several programs access only $PID == 1, replace only two or more digits with \$ pattern. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> security/tomoyo/common.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 5bb494d5cbb9a3403ba8b1c8bc145b42fc119078 Author: Gao Shiyuan <gaoshiyuan@baidu.com> Date: Sat Jan 4 00:58:08 2025 +0800 iommu/amd: remove return value of amd_iommu_detect The return value of amd_iommu_detect is not used, so remove it and is consistent with other iommu detect functions. Signed-off-by: Gao Shiyuan <gaoshiyuan@baidu.com> Reviewed-by: Vasant Hegde <vasant.hegde@amd.com> Link: https://lore.kernel.org/r/20250103165808.80939-1-gaoshiyuan@baidu.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/amd/init.c | 10 ++++------ include/linux/amd-iommu.h | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) commit afc0cbc6e25b37dc9ba11d415ea6858902a7f04b Author: Zhang Heng <zhangheng@kylinos.cn> Date: Fri Jan 3 19:30:59 2025 +0800 iommu/msm: Use helper function devm_clk_get_prepared() Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare() can now be replaced by devm_clk_get_prepared() when driver prepares the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare the clocks explicitly. Signed-off-by: Zhang Heng <zhangheng@kylinos.cn> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20250103113059.463033-1-zhangheng@kylinos.cn Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/msm_iommu.c | 51 ++++++++++------------------------------------- 1 file changed, 11 insertions(+), 40 deletions(-) commit 77a44196abfb39e183be554003e9ee76d95edab1 Author: Xu Lu <luxu.kernel@bytedance.com> Date: Fri Jan 3 17:32:20 2025 +0800 iommu/riscv: Add shutdown function for iommu driver This commit supplies shutdown callback for iommu driver. The shutdown callback resets necessary registers so that newly booted kernel can pass riscv_iommu_init_check() after kexec. Also, the shutdown callback resets iommu mode to bare instead of off so that new kernel can still use PCIE devices even when CONFIG_RISCV_IOMMU is not enabled. Signed-off-by: Xu Lu <luxu.kernel@bytedance.com> Link: https://lore.kernel.org/r/20250103093220.38106-3-luxu.kernel@bytedance.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/riscv/iommu-pci.c | 8 ++++++++ drivers/iommu/riscv/iommu-platform.c | 6 ++++++ drivers/iommu/riscv/iommu.c | 6 ++++-- drivers/iommu/riscv/iommu.h | 1 + 4 files changed, 19 insertions(+), 2 deletions(-) commit 8d8d3752c0a4f7fb072352837cbdbf57c02df239 Author: Xu Lu <luxu.kernel@bytedance.com> Date: Fri Jan 3 17:32:19 2025 +0800 iommu/riscv: Empty iommu queue before enabling it Changing cqen/fqen/pqen from 0 to 1 sets the cqh/fqt/pqt registers to 0. But the cqt/fqh/pqh registers are left unmodified. This commit resets cqt/fqh/pqh registers to ensure corresponding queues are empty before being enabled during initialization. Signed-off-by: Xu Lu <luxu.kernel@bytedance.com> Link: https://lore.kernel.org/r/20250103093220.38106-2-luxu.kernel@bytedance.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/riscv/iommu.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 5a0751fc9eab152d20808623bf64c86ee83df976 Author: Andy Yan <andy.yan@rock-chips.com> Date: Tue Dec 31 17:31:50 2024 +0800 dt-bindings: iommu: rockchip: Add Rockchip RK3576 Just like RK3588, RK3576 is compatible to the existing rk3568 binding. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241231093154.252595-1-andyshrk@163.com Signed-off-by: Joerg Roedel <jroedel@suse.de> Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml | 1 + 1 file changed, 1 insertion(+) commit 3b6775857d7e8ec8887f632ad26351f2f9d826a8 Author: Alain Volmat <avolmat@me.com> Date: Sun Oct 6 20:42:51 2024 +0000 ARM: dts: st: enable the MALI gpu on the stih410-b2260 Enable the GPU on the stih410-b2260 board. Signed-off-by: Alain Volmat <avolmat@me.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> arch/arm/boot/dts/st/stih410-b2260.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 0c0214df28f0dba8de084cb4dedc0c459dfbc083 Author: Jan Kara <jack@suse.cz> Date: Mon Jan 6 12:08:42 2025 +0100 fanotify: Fix crash in fanotify_init(2) The rrror handling in fanotify_init(2) is buggy and overwrites 'fd' before calling put_unused_fd() leading to possible access beyond the end of fd bitmap. Fix it. Reported-by: syzbot+6a3aa63412255587b21b@syzkaller.appspotmail.com Fixes: ebe559609d78 ("fs: get rid of __FMODE_NONOTIFY kludge") Signed-off-by: Jan Kara <jack@suse.cz> fs/notify/fanotify/fanotify_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00d6da87b1e2cd92bc78e7964c8f20cc80b7c0e5 Author: Alain Volmat <avolmat@me.com> Date: Sun Oct 6 20:42:50 2024 +0000 ARM: dts: st: add node for the MALI gpu on stih410.dtsi Add the entry for the GPU (Mali400) on the stih410.dtsi Signed-off-by: Alain Volmat <avolmat@me.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> arch/arm/boot/dts/st/stih410.dtsi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 0deaca4cad2d071762269130a5cdc73a51c0dc12 Author: Alain Volmat <avolmat@me.com> Date: Sun Oct 6 20:42:49 2024 +0000 dt-bindings: gpu: mali-utgard: Add st,stih410-mali compatible ST STiH410 SoC has a Mali400. Add a compatible for it. Signed-off-by: Alain Volmat <avolmat@me.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml | 1 + 1 file changed, 1 insertion(+) commit ab2fd4a0ca26f3b4a7764f51ed3326ab89ab3213 Author: Guoniu.zhou <guoniu.zhou@nxp.com> Date: Sat Oct 12 16:47:33 2024 +0800 media: nxp: imx8-isi: Add i.MX8ULP support Add ISI support for i.MX8ULP. Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20241012084732.1036652-2-guoniu.zhou@oss.nxp.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c | 14 ++++++++++++++ drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h | 1 + 2 files changed, 15 insertions(+) commit 288517a3c6c92d8d6ced2ff742c8e74f9d846d55 Author: Guoniu.zhou <guoniu.zhou@nxp.com> Date: Sat Oct 12 16:47:35 2024 +0800 dt-bindings: media: nxp,imx8-isi: Add i.MX8ULP ISI compatible string Add the compatible string support for i.MX8ULP ISI. Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20241012084732.1036652-3-guoniu.zhou@oss.nxp.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 7b12ab055edef2f51733d155617a401a05237bcc Author: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Date: Tue Sep 24 13:33:04 2024 +0300 media: nxp: imx8-isi: fix v4l2-compliance test errors Running the v4l2-compliance (1.27.0-5208, SHA: af114250d48d) on the m2m device fails on the MMAP streaming tests, with the following messages: fail: v4l2-test-buffers.cpp(240): g_field() == V4L2_FIELD_ANY fail: v4l2-test-buffers.cpp(1508): buf.qbuf(node) Apparently, the driver does not properly set the field member of vb2_v4l2_buffer struct, returning the default V4L2_FIELD_ANY value which is against the guidelines. Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver") Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20240924103304.124085-1-laurentiu.palcu@oss.nxp.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 3 +++ 1 file changed, 3 insertions(+) commit eca836dfd8386b32f1aae60f8e323218ac6a0b75 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Sat Jan 4 14:56:05 2025 +0100 soc: samsung: exynos-pmu: Fix uninitialized ret in tensor_set_bits_atomic() If tensor_set_bits_atomic() is called with a mask of 0 the function will just iterate over its bit, not perform any updates and return stack value of 'ret'. Also reported by smatch: drivers/soc/samsung/exynos-pmu.c:129 tensor_set_bits_atomic() error: uninitialized symbol 'ret'. Fixes: 0b7c6075022c ("soc: samsung: exynos-pmu: Add regmap support for SoCs that protect PMU regs") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250104135605.109209-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/soc/samsung/exynos-pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34d813e45ecb8e84f7154509b1acf7dda57ef09f Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Jan 4 09:58:28 2025 +0200 drm/display: hdmi-state-helper: add drm_display_mode declaration Add forward-declaration for the struct drm_display_mode, missed in the commit 47368ab437fd ("drm/display: hdmi: add generic mode_valid helper") Fixes: 47368ab437fd ("drm/display: hdmi: add generic mode_valid helper") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20250104-hdmi-state-display-mode-v1-1-3c06d36e726f@linaro.org Signed-off-by: Maxime Ripard <mripard@kernel.org> include/drm/display/drm_hdmi_state_helper.h | 1 + 1 file changed, 1 insertion(+) commit 058268e23fcadc2bdb9297c6dff3a010c70f9762 Author: Daniel Borkmann <daniel@iogearbox.net> Date: Sat Dec 21 00:46:58 2024 +0100 selftests/bpf: Extend netkit tests to validate set {head,tail}room Extend the netkit selftests to specify and validate the {head,tail}room on the netdevice: # ./vmtest.sh -- ./test_progs -t netkit [...] ./test_progs -t netkit [ 1.174147] bpf_testmod: loading out-of-tree module taints kernel. [ 1.174585] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel [ 1.422307] tsc: Refined TSC clocksource calibration: 3407.983 MHz [ 1.424511] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fc3e5084, max_idle_ns: 440795359833 ns [ 1.428092] clocksource: Switched to clocksource tsc #363 tc_netkit_basic:OK #364 tc_netkit_device:OK #365 tc_netkit_multi_links:OK #366 tc_netkit_multi_opts:OK #367 tc_netkit_neigh_links:OK #368 tc_netkit_pkt_type:OK #369 tc_netkit_scrub:OK Summary: 7/0 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://lore.kernel.org/bpf/20241220234658.490686-3-daniel@iogearbox.net tools/testing/selftests/bpf/prog_tests/tc_netkit.c | 49 ++++++++++++++-------- tools/testing/selftests/bpf/progs/test_tc_link.c | 15 +++++++ 2 files changed, 46 insertions(+), 18 deletions(-) commit cc529a33d559cc75eb7250a4f4e2b9e431761312 Author: Daniel Borkmann <daniel@iogearbox.net> Date: Sat Dec 21 00:46:57 2024 +0100 netkit: Add add netkit {head,tail}room to rt_link.yaml Add netkit {head,tail}room attribute support to the rt_link.yaml spec file. Example: # ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_link.yaml \ --do getlink --json '{"ifname": "nk0"}' --output-json | jq [...] "linkinfo": { "kind": "netkit", "data": { "primary": 0, "policy": "forward", "mode": "l3", "scrub": "default", "headroom": 0, "tailroom": 0, "peer-policy": "forward", "peer-scrub": "default" } }, [...] Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://lore.kernel.org/bpf/20241220234658.490686-2-daniel@iogearbox.net Documentation/netlink/specs/rt_link.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit b9ed315d3c4c0c294a4348edb6874d489bac47fa Author: Daniel Borkmann <daniel@iogearbox.net> Date: Sat Dec 21 00:46:56 2024 +0100 netkit: Allow for configuring needed_{head,tail}room Allow the user to configure needed_{head,tail}room for both netkit devices. The idea is similar to 163e529200af ("veth: implement ndo_set_rx_headroom") with the difference that the two parameters can be specified upon device creation. By default the current behavior stays as is which is needed_{head,tail}room is 0. In case of Cilium, for example, the netkit devices are not enslaved into a bridge or openvswitch device (rather, BPF-based redirection is used out of tcx), and as such these parameters are not propagated into the Pod's netns via peer device. Given Cilium can run in vxlan/geneve tunneling mode (needed_headroom) and/or be used in combination with WireGuard (needed_{head,tail}room), allow the Cilium CNI plugin to specify these two upon netkit device creation. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://lore.kernel.org/bpf/20241220234658.490686-1-daniel@iogearbox.net drivers/net/netkit.c | 66 +++++++++++++++++++++++++------------- include/uapi/linux/if_link.h | 2 ++ tools/include/uapi/linux/if_link.h | 2 ++ 3 files changed, 47 insertions(+), 23 deletions(-) commit 173876aa5d4b8d27b99a4288e2501771fd0c9422 Author: Suraj Kandpal <suraj.kandpal@intel.com> Date: Fri Jan 3 10:47:05 2025 +0530 drm/i915/ddi: Optimize mtl_port_buf_ctl_program A small optimization and cleanup for mtl_port_buf_ctl_program function which lets use intel_de_rmw instead of a intel_de_read and intel_de_write. Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250103051705.145161-3-suraj.kandpal@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 2fcde2fbec74c91fb6a724f44cced67a6837b647 Author: Suraj Kandpal <suraj.kandpal@intel.com> Date: Fri Jan 3 10:47:04 2025 +0530 drm/i915/dp: Use intel_display instead of drm_i915_private Use intel display instead of drm_i915_private in mtl_ddi_prepare_link_retrain & mtl_port_buf_ctl_program functions. Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250103051705.145161-2-suraj.kandpal@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 600258d555f0710b9c47fb78d2d80a4aecd608cc Author: Alexandre Cassen <acassen@corp.free.fr> Date: Thu Jan 2 12:11:11 2025 +0200 xfrm: delete intermediate secpath entry in packet offload mode Packets handled by hardware have added secpath as a way to inform XFRM core code that this path was already handled. That secpath is not needed at all after policy is checked and it is removed later in the stack. However, in the case of IP forwarding is enabled (/proc/sys/net/ipv4/ip_forward), that secpath is not removed and packets which already were handled are reentered to the driver TX path with xfrm_offload set. The following kernel panic is observed in mlx5 in such case: mlx5_core 0000:04:00.0 enp4s0f0np0: Link up mlx5_core 0000:04:00.1 enp4s0f1np1: Link up Initializing XFRM netlink socket IPsec XFRM device driver BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor instruction fetch in kernel mode #PF: error_code(0x0010) - not-present page PGD 0 P4D 0 Oops: Oops: 0010 [#1] PREEMPT SMP CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.13.0-rc1-alex #3 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1.1 04/01/2014 RIP: 0010:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 0018:ffffb87380003800 EFLAGS: 00010206 RAX: ffff8df004e02600 RBX: ffffb873800038d8 RCX: 00000000ffff98cf RDX: ffff8df00733e108 RSI: ffff8df00521fb80 RDI: ffff8df001661f00 RBP: ffffb87380003850 R08: ffff8df013980000 R09: 0000000000000010 R10: 0000000000000002 R11: 0000000000000002 R12: ffff8df001661f00 R13: ffff8df00521fb80 R14: ffff8df00733e108 R15: ffff8df011faf04e FS: 0000000000000000(0000) GS:ffff8df46b800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 0000000106384000 CR4: 0000000000350ef0 Call Trace: <IRQ> ? show_regs+0x63/0x70 ? __die_body+0x20/0x60 ? __die+0x2b/0x40 ? page_fault_oops+0x15c/0x550 ? do_user_addr_fault+0x3ed/0x870 ? exc_page_fault+0x7f/0x190 ? asm_exc_page_fault+0x27/0x30 mlx5e_ipsec_handle_tx_skb+0xe7/0x2f0 [mlx5_core] mlx5e_xmit+0x58e/0x1980 [mlx5_core] ? __fib_lookup+0x6a/0xb0 dev_hard_start_xmit+0x82/0x1d0 sch_direct_xmit+0xfe/0x390 __dev_queue_xmit+0x6d8/0xee0 ? __fib_lookup+0x6a/0xb0 ? internal_add_timer+0x48/0x70 ? mod_timer+0xe2/0x2b0 neigh_resolve_output+0x115/0x1b0 __neigh_update+0x26a/0xc50 neigh_update+0x14/0x20 arp_process+0x2cb/0x8e0 ? __napi_build_skb+0x5e/0x70 arp_rcv+0x11e/0x1c0 ? dev_gro_receive+0x574/0x820 __netif_receive_skb_list_core+0x1cf/0x1f0 netif_receive_skb_list_internal+0x183/0x2a0 napi_complete_done+0x76/0x1c0 mlx5e_napi_poll+0x234/0x7a0 [mlx5_core] __napi_poll+0x2d/0x1f0 net_rx_action+0x1a6/0x370 ? atomic_notifier_call_chain+0x3b/0x50 ? irq_int_handler+0x15/0x20 [mlx5_core] handle_softirqs+0xb9/0x2f0 ? handle_irq_event+0x44/0x60 irq_exit_rcu+0xdb/0x100 common_interrupt+0x98/0xc0 </IRQ> <TASK> asm_common_interrupt+0x27/0x40 RIP: 0010:pv_native_safe_halt+0xb/0x10 Code: 09 c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 22 0f 1f 84 00 00 00 00 00 90 eb 07 0f 00 2d 7f e9 36 00 fb 40 00 83 ff 07 77 21 89 ff ff 24 fd 88 3d a1 bd 0f 21 f8 RSP: 0018:ffffffffbe603de8 EFLAGS: 00000202 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000f92f46680 RDX: 0000000000000037 RSI: 00000000ffffffff RDI: 00000000000518d4 RBP: ffffffffbe603df0 R08: 000000cd42e4dffb R09: ffffffffbe603d70 R10: 0000004d80d62680 R11: 0000000000000001 R12: ffffffffbe60bf40 R13: 0000000000000000 R14: 0000000000000000 R15: ffffffffbe60aff8 ? default_idle+0x9/0x20 arch_cpu_idle+0x9/0x10 default_idle_call+0x29/0xf0 do_idle+0x1f2/0x240 cpu_startup_entry+0x2c/0x30 rest_init+0xe7/0x100 start_kernel+0x76b/0xb90 x86_64_start_reservations+0x18/0x30 x86_64_start_kernel+0xc0/0x110 ? setup_ghcb+0xe/0x130 common_startup_64+0x13e/0x141 </TASK> Modules linked in: esp4_offload esp4 xfrm_interface xfrm6_tunnel tunnel4 tunnel6 xfrm_user xfrm_algo binfmt_misc intel_rapl_msr intel_rapl_common kvm_amd ccp kvm input_leds serio_raw qemu_fw_cfg sch_fq_codel dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua efi_pstore ip_tables x_tables autofs4 raid10 raid456 async_raid6_recov async_memcpy async_pq raid6_pq async_xor xor async_tx libcrc32c raid1 raid0 mlx5_core crct10dif_pclmul crc32_pclmul polyval_clmulni polyval_generic ghash_clmulni_intel sha256_ssse3 sha1_ssse3 ahci mlxfw i2c_i801 libahci i2c_mux i2c_smbus psample virtio_rng pci_hyperv_intf aesni_intel crypto_simd cryptd CR2: 0000000000000000 ---[ end trace 0000000000000000 ]--- RIP: 0010:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 0018:ffffb87380003800 EFLAGS: 00010206 RAX: ffff8df004e02600 RBX: ffffb873800038d8 RCX: 00000000ffff98cf RDX: ffff8df00733e108 RSI: ffff8df00521fb80 RDI: ffff8df001661f00 RBP: ffffb87380003850 R08: ffff8df013980000 R09: 0000000000000010 R10: 0000000000000002 R11: 0000000000000002 R12: ffff8df001661f00 R13: ffff8df00521fb80 R14: ffff8df00733e108 R15: ffff8df011faf04e FS: 0000000000000000(0000) GS:ffff8df46b800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 0000000106384000 CR4: 0000000000350ef0 Kernel panic - not syncing: Fatal exception in interrupt Kernel Offset: 0x3b800000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]--- Fixes: 5958372ddf62 ("xfrm: add RX datapath protection for IPsec packet offload mode") Signed-off-by: Alexandre Cassen <acassen@corp.free.fr> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> include/net/xfrm.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit fcf73e20cd1fe60c3ba5f9626f1e8f9cd4511edf Author: Suraj Kandpal <suraj.kandpal@intel.com> Date: Fri Jan 3 14:15:17 2025 +0530 Revert "drm/i915/hdcp: Don't enable HDCP1.4 directly from check_link" This reverts commit 483f7d94a0453564ad9295288c0242136c5f36a0. This needs to be reverted since HDCP even after updating the connector state HDCP property we don't reenable HDCP until the next commit in which the CP Property is set causing compliance to fail. --v2 -Fix build issue [Dnyaneshwar] Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250103084517.239998-1-suraj.kandpal@intel.com drivers/gpu/drm/i915/display/intel_hdcp.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 8c87215dd3a2c814dcffc0bafe8c80c8f98f2574 Author: Josua Mayer <josua@solid-run.com> Date: Wed Jan 1 13:13:33 2025 +0100 ata: libahci_platform: support non-consecutive port numbers So far ahci_platform relied on number of child nodes in firmware to allocate arrays and expected port numbers to start from 0 without holes. This number of ports is then set in private structure for use when configuring phys and regulators. Some platforms may not use every port of an ahci controller. E.g. SolidRUN CN9130 Clearfog uses only port 1 but not port 0, leading to the following errors during boot: [ 1.719476] ahci f2540000.sata: invalid port number 1 [ 1.724562] ahci f2540000.sata: No port enabled Update all accessesors of ahci_host_priv phys and target_pwrs arrays to support holes. Access is gated by hpriv->mask_port_map which has a bit set for each enabled port. Update ahci_platform_get_resources to ignore holes in the port numbers and enable ports defined in firmware by their reg property only. When firmware does not define children it is assumed that there is exactly one port, using index 0. Signed-off-by: Josua Mayer <josua@solid-run.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Damien Le Moal <dlemoal@kernel.org> drivers/ata/ahci_brcm.c | 3 +++ drivers/ata/ahci_ceva.c | 6 ++++++ drivers/ata/libahci_platform.c | 40 ++++++++++++++++++++++++++++++++++------ 3 files changed, 43 insertions(+), 6 deletions(-) commit df78050d1a1338dd3e07db959b42c2d03969ed30 Author: Gwendal Grignou <gwendal@chromium.org> Date: Thu Jan 2 13:04:56 2025 -0800 platform/chrome: Update ChromeOS EC command tracing Mechanically update tracing with new command: sed -n 's/^#define \(EC_CMD_[[:alnum:]_]*\)\s.*/\tTRACE_SYMBOL(\1), \\/p' include/linux/platform_data/cros_ec_commands.h Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20250102210456.2399245-1-gwendal@chromium.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> drivers/platform/chrome/cros_ec_trace.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 714d87c90a766e6917f7d69f618b864d350f09d3 Author: Tanya Agarwal <tanyaagarwal25699@gmail.com> Date: Sun Jan 5 12:35:38 2025 +0530 lockdown: initialize local array before use to quiet static analysis The static code analysis tool "Coverity Scan" pointed the following details out for further development considerations: CID 1486102: Uninitialized scalar variable (UNINIT) uninit_use_in_call: Using uninitialized value *temp when calling strlen. Signed-off-by: Tanya Agarwal <tanyaagarwal25699@gmail.com> [PM: edit/reformat the description, subject line] Signed-off-by: Paul Moore <paul@paul-moore.com> security/lockdown/lockdown.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95f1c1e98db36ddb9ea79e5c61ec11ec43ebbbaf Author: Eric Dumazet <edumazet@google.com> Date: Fri Dec 6 11:38:39 2024 +0000 netfilter: xt_hashlimit: htable_selective_cleanup() optimization I have seen syzbot reports hinting at xt_hashlimit abuse: [ 105.783066][ T4331] xt_hashlimit: max too large, truncated to 1048576 [ 105.811405][ T4331] xt_hashlimit: size too large, truncated to 1048576 And worker threads using up to 1 second per htable_selective_cleanup() invocation. [ 269.734496][ C1] [<ffffffff81547180>] ? __local_bh_enable_ip+0x1a0/0x1a0 [ 269.734513][ C1] [<ffffffff817d75d0>] ? lockdep_hardirqs_on_prepare+0x740/0x740 [ 269.734533][ C1] [<ffffffff852e71ff>] ? htable_selective_cleanup+0x25f/0x310 [ 269.734549][ C1] [<ffffffff817dcd30>] ? __lock_acquire+0x2060/0x2060 [ 269.734567][ C1] [<ffffffff817f058a>] ? do_raw_spin_lock+0x14a/0x370 [ 269.734583][ C1] [<ffffffff852e71ff>] ? htable_selective_cleanup+0x25f/0x310 [ 269.734599][ C1] [<ffffffff81547147>] __local_bh_enable_ip+0x167/0x1a0 [ 269.734616][ C1] [<ffffffff81546fe0>] ? _local_bh_enable+0xa0/0xa0 [ 269.734634][ C1] [<ffffffff852e71ff>] ? htable_selective_cleanup+0x25f/0x310 [ 269.734651][ C1] [<ffffffff852e71ff>] htable_selective_cleanup+0x25f/0x310 [ 269.734670][ C1] [<ffffffff815b3cc9>] ? process_one_work+0x7a9/0x1170 [ 269.734685][ C1] [<ffffffff852e57db>] htable_gc+0x1b/0xa0 [ 269.734700][ C1] [<ffffffff815b3cc9>] ? process_one_work+0x7a9/0x1170 [ 269.734714][ C1] [<ffffffff815b3dc9>] process_one_work+0x8a9/0x1170 [ 269.734733][ C1] [<ffffffff815b3520>] ? worker_detach_from_pool+0x260/0x260 [ 269.734749][ C1] [<ffffffff810201c7>] ? _raw_spin_lock_irq+0xb7/0xf0 [ 269.734763][ C1] [<ffffffff81020110>] ? _raw_spin_lock_irqsave+0x100/0x100 [ 269.734777][ C1] [<ffffffff8159d3df>] ? wq_worker_sleeping+0x5f/0x270 [ 269.734800][ C1] [<ffffffff815b53c7>] worker_thread+0xa47/0x1200 [ 269.734815][ C1] [<ffffffff81020010>] ? _raw_spin_lock+0x40/0x40 [ 269.734835][ C1] [<ffffffff815c9f2a>] kthread+0x25a/0x2e0 [ 269.734853][ C1] [<ffffffff815b4980>] ? worker_clr_flags+0x190/0x190 [ 269.734866][ C1] [<ffffffff815c9cd0>] ? kthread_blkcg+0xd0/0xd0 [ 269.734885][ C1] [<ffffffff81027b1a>] ret_from_fork+0x3a/0x50 We can skip over empty buckets, avoiding the lockdep penalty for debug kernels, and avoid atomic operations on non debug ones. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> net/netfilter/xt_hashlimit.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 178883fd039d38a708cc56555489533d9a9c07df Author: Florian Westphal <fw@strlen.de> Date: Tue Dec 3 12:08:30 2024 +0100 ipvs: speed up reads from ip_vs_conn proc file Reading is very slow because ->start() performs a linear re-scan of the entire hash table until it finds the successor to the last dumped element. The current implementation uses 'pos' as the 'number of elements to skip, then does linear iteration until it has skipped 'pos' entries. Store the last bucket and the number of elements to skip in that bucket instead, so we can resume from bucket b directly. before this patch, its possible to read ~35k entries in one second, but each read() gets slower as the number of entries to skip grows: time timeout 60 cat /proc/net/ip_vs_conn > /tmp/all; wc -l /tmp/all real 1m0.007s user 0m0.003s sys 0m59.956s 140386 /tmp/all Only ~100k more got read in remaining the remaining 59s, and did not get nowhere near the 1m entries that are stored at the time. after this patch, dump completes very quickly: time cat /proc/net/ip_vs_conn > /tmp/all; wc -l /tmp/all real 0m2.286s user 0m0.004s sys 0m2.281s 1000001 /tmp/all Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> net/netfilter/ipvs/ip_vs_conn.c | 50 +++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 22 deletions(-) commit 938fbb16aba8f7b88e0fdcf56f315a5bbad41aad Author: Andy Yan <andy.yan@rock-chips.com> Date: Tue Dec 31 17:07:44 2024 +0800 drm/rockchip: vop2: Support 32x8 superblock afbc This is the only afbc format supported by the upcoming VOP for rk3576. Add support for it. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Tested-by: Michael Riesch <michael.riesch@wolfvision.net> # on RK3568 Tested-by: Detlev Casanova <detlev.casanova@collabora.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241231090802.251787-2-andyshrk@163.com drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 39b771a85f6bb8a3c7643765c676055b7bbb2604 Author: Andy Yan <andy.yan@rock-chips.com> Date: Tue Dec 31 17:18:41 2024 +0800 dt-bindings: soc: rockchip: add rk3576 hdptxphy grf syscon Add hdptxphy grf syscon compatibles for rk3576. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241231091841.252103-1-andyshrk@163.com Signed-off-by: Heiko Stuebner <heiko@sntech.de> Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 1 + 1 file changed, 1 insertion(+) commit c84f0f4f49d81645f49c3269fdcc3b84ce61e795 Author: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Date: Sat Jan 4 11:45:19 2025 +0530 RDMA/bnxt_re: Fix to drop reference to the mmap entry in case of error In the error handling path of bnxt_re_mmap(), driver should invoke rdma_user_mmap_entry_put() to free the reference of mmap entry in case the error happens after rdma_user_mmap_entry_get was called. Fixes: ea2224857882 ("RDMA/bnxt_re: Update alloc_page uapi for pacing") Reviewed-by: Saravanan Vajravel <saravanan.vajravel@broadcom.com> Reviewed-by: Kashyap Desai <kashyap.desai@broadcom.com> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/20250104061519.2540178-1-kalesh-anakkur.purayil@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/bnxt_re/ib_verbs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit da0a090a3c6220772801b791845e408ae7579914 Author: tuqiang <tu.qiang35@zte.com.cn> Date: Mon Nov 25 20:26:34 2024 +0800 netfilter: nf_tables: remove the genmask parameter The genmask parameter is not used within the nf_tables_addchain function body. It should be removed to simplify the function parameter list. Signed-off-by: tuqiang <tu.qiang35@zte.com.cn> Signed-off-by: Jiang Kun <jiang.kun2@zte.com.cn> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> net/netfilter/nf_tables_api.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 38405d3825d883b9e6ae680c14b530f79709533e Author: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Date: Sat Jan 4 18:29:13 2025 +0200 dt-bindings: soc: samsung: exynos-sysreg: add sysreg compatibles for exynos8895 Exynos8895 has four different SYSREG controllers, add dedicated compatibles for them to the documentation. They also require clocks. Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250104162915.332005-2-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> .../devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7ece8b3ca3a6424b220e2a83bd4d625bf5bcb8c8 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Jan 3 09:25:49 2025 +0100 dt-bindings: samsung: exynos-usi: Restrict possible samsung,mode values "samsung,mode" property defines the desired mode of the serial engine (e.g. I2C or SPI) and only few values are allowed/used by Linux driver. Cc: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20250103082549.19419-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml | 1 + 1 file changed, 1 insertion(+) commit 43d84701d2aa147eab39b529919ffaf35f724bbb Author: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Sat Dec 21 14:52:43 2024 +0200 thunderbolt: Expose router DROM through debugfs Router DROM contains information that might be usable for development and debugging purposes. For example when new entries are added to the USB4 spec it is useful to be able to look for them without need to change the kernel. For this reason expose the DROM through debugfs. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> drivers/thunderbolt/debugfs.c | 2 ++ drivers/thunderbolt/eeprom.c | 78 ++++++++++++++++++++++++------------------- drivers/thunderbolt/tb.h | 5 +++ 3 files changed, 51 insertions(+), 34 deletions(-) commit f09ff307c7299392f1c88f763299e24bc99811c7 Author: Leo Stone <leocstone@gmail.com> Date: Tue Dec 17 10:26:57 2024 -0800 safesetid: check size of policy writes syzbot attempts to write a buffer with a large size to a sysfs entry with writes handled by handle_policy_update(), triggering a warning in kmalloc. Check the size specified for write buffers before allocating. Reported-by: syzbot+4eb7a741b3216020043a@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=4eb7a741b3216020043a Signed-off-by: Leo Stone <leocstone@gmail.com> [PM: subject tweak] Signed-off-by: Paul Moore <paul@paul-moore.com> security/safesetid/securityfs.c | 3 +++ 1 file changed, 3 insertions(+) commit 3b44cd0998678b55a0df20b514bca0e298f4ff48 Author: Casey Schaufler <casey@schaufler-ca.com> Date: Fri Dec 20 14:02:46 2024 -0800 net: corrections for security_secid_to_secctx returns security_secid_to_secctx() returns the size of the new context, whereas previous versions provided that via a pointer parameter. Correct the type of the value returned in nfqnl_get_sk_secctx() and the check for error in netlbl_unlhsh_add(). Add an error check. Fixes: 2d470c778120 ("lsm: replace context+len with lsm_context") Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: Paul Moore <paul@paul-moore.com> net/netfilter/nfnetlink_queue.c | 12 +++++++----- net/netlabel/netlabel_unlabeled.c | 6 +++--- 2 files changed, 10 insertions(+), 8 deletions(-) commit b00083aed484a2885bc92c6a7a85d7952c101d75 Author: Christian Göttsche <cgzones@googlemail.com> Date: Mon Nov 25 11:59:23 2024 +0100 lsm: rename variable to avoid shadowing The function dump_common_audit_data() contains two variables with the name comm: one declared at the top and one nested one. Rename the nested variable to improve readability and make future refactorings of the function less error prone. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> [PM: description long line removal, line wrap cleanup, merge fuzz] Signed-off-by: Paul Moore <paul@paul-moore.com> security/lsm_audit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b0966c7c816a0be9a34cdf4fb16fdb89560af623 Author: Christian Göttsche <cgzones@googlemail.com> Date: Mon Nov 25 11:59:24 2024 +0100 lsm: constify function parameters The functions print_ipv4_addr() and print_ipv6_addr() are called with string literals and do not modify these parameters internally. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> [PM: cleaned up the description to remove long lines] Signed-off-by: Paul Moore <paul@paul-moore.com> security/lsm_audit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 241d6a66404c975415fd0facaf70d61b37248f50 Author: Colin Ian King <colin.i.king@gmail.com> Date: Tue Nov 12 12:45:32 2024 +0000 security: remove redundant assignment to return variable In the case where rc is equal to EOPNOTSUPP it is being reassigned a new value of zero that is never read. The following continue statement loops back to the next iteration of the lsm_for_each_hook loop and rc is being re-assigned a new value from the call to getselfattr. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Serge Hallyn <serge@hallyn.com> [PM: subj tweak] Signed-off-by: Paul Moore <paul@paul-moore.com> security/security.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3e5908172c05ab1511f2a6719b806d6eda6e1715 Merge: 356939999438 bddfe23be8f8 Author: Jakub Kicinski <kuba@kernel.org> Date: Sat Jan 4 17:00:53 2025 -0800 Merge tag 'ieee802154-for-net-next-2025-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan-next Stefan Schmidt says: ==================== pull-request: ieee802154-next 2025-01-03 Leo Stone provided a documatation fix to improve the grammar. David Gilbert spotted a non-used fucntion we can safely remove. * tag 'ieee802154-for-net-next-2025-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan-next: net: mac802154: Remove unused ieee802154_mlme_tx_one Documentation: ieee802154: fix grammar ==================== Link: https://patch.msgid.link/20250103154605.440478-1-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 02ee5d69e3baf2796ba75b928fcbc9cf7884c5e9 Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 3 08:33:58 2025 +0100 block: remove blk_rq_bio_prep There is not real point in a helper just to assign three values to four fields, especially when the surrounding code is working on the neighbor fields directly. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Link: https://lore.kernel.org/r/20250103073417.459715-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-map.c | 10 ++++++---- block/blk-mq.c | 4 +++- include/linux/blk-mq.h | 8 -------- 3 files changed, 9 insertions(+), 13 deletions(-) commit 6aeb4f836480617be472de767c4cb09c1060a067 Author: Christoph Hellwig <hch@lst.de> Date: Fri Jan 3 08:33:57 2025 +0100 block: remove bio_add_pc_page Lift bio_split_rw_at into blk_rq_append_bio so that it validates the hardware limits. With this all passthrough callers can simply add bio_add_page to build the bio and delay checking for exceeding of limits to this point instead of doing it for each page. While this looks like adding a new expensive loop over all bio_vecs, blk_rq_append_bio is already doing that just to counter the number of segments. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Link: https://lore.kernel.org/r/20250103073417.459715-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> block/bio.c | 107 ++------------------------------- block/blk-map.c | 118 +++++++++---------------------------- block/blk.h | 8 --- drivers/nvme/target/passthru.c | 18 +++--- drivers/nvme/target/zns.c | 3 +- drivers/target/target_core_pscsi.c | 6 +- include/linux/bio.h | 2 - 7 files changed, 48 insertions(+), 214 deletions(-) commit 7ccbe076d987598b04b4b9c9b61f042291f9cc77 Author: Mickaël Salaün <mic@digikod.net> Date: Fri Nov 22 15:33:31 2024 +0100 lsm: Only build lsm_audit.c if CONFIG_SECURITY and CONFIG_AUDIT are set When CONFIG_AUDIT is set, its CONFIG_NET dependency is also set, and the dev_get_by_index and init_net symbols (used by dump_common_audit_data) are found by the linker. dump_common_audit_data() should then failed to build when CONFIG_NET is not set. However, because the compiler is smart, it knows that audit_log_start() always return NULL when !CONFIG_AUDIT, and it doesn't build the body of common_lsm_audit(). As a side effect, dump_common_audit_data() is not built and the linker doesn't error out because of missing symbols. Let's only build lsm_audit.o when CONFIG_SECURITY and CONFIG_AUDIT are both set, which is checked with the new CONFIG_HAS_SECURITY_AUDIT. ipv4_skb_to_auditdata() and ipv6_skb_to_auditdata() are only used by Smack if CONFIG_AUDIT is set, so they don't need fake implementations. Because common_lsm_audit() is used in multiple places without CONFIG_AUDIT checks, add a fake implementation. Link: https://lore.kernel.org/r/20241122143353.59367-2-mic@digikod.net Cc: Casey Schaufler <casey@schaufler-ca.com> Cc: James Morris <jmorris@namei.org> Cc: Paul Moore <paul@paul-moore.com> Cc: Serge E. Hallyn <serge@hallyn.com> Signed-off-by: Mickaël Salaün <mic@digikod.net> Signed-off-by: Paul Moore <paul@paul-moore.com> include/linux/lsm_audit.h | 14 ++++++++++++++ security/Kconfig | 5 +++++ security/Makefile | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) commit 3569399994384f7e409a560910613edc2ad4a779 Author: Furong Xu <0x1207@gmail.com> Date: Fri Dec 20 16:07:26 2024 +0800 net: stmmac: TSO: Simplify the code flow of DMA descriptor allocations The TCP Segmentation Offload (TSO) engine is an optional function in DWMAC cores, it is implemented for dwmac4 and dwxgmac2 only, ancient dwmac100 and dwmac1000 are not supported by hardware. Current driver code checks priv->dma_cap.tsoen which is read from MAC_HW_Feature1 register to determine if TSO is enabled in hardware configurations, if (!priv->dma_cap.tsoen) driver never sets NETIF_F_TSO for net_device. This patch never affects dwmac100/dwmac1000 and their stmmac_desc_ops: ndesc_ops/enh_desc_ops, since TSO is never supported by them two. The DMA AXI address width of DWMAC cores can be configured to 32-bit/40-bit/48-bit, then the format of DMA transmit descriptors get a little different between 32-bit and 40-bit/48-bit. Current driver code checks priv->dma_cap.addr64 to use certain format with certain configuration. This patch converts the format of DMA transmit descriptors on dwmac4 and dwxgmac2 that the DMA AXI address width is configured to 32-bit (as described by function comments of stmmac_tso_xmit() in current code) to a more generic format (see updated function comments after this patch) which is actually already used on 40-bit/48-bit platforms to provide better compatibility and make code flow cleaner in TSO TX routine. Another interesting finding, struct stmmac_desc_ops is a common abstract interface to maintain descriptors, we should avoid the direct assignment of descriptor members (e.g. desc->des0), stmmac_set_desc_addr() is the proper method yet. This patch tries to improve this by the way. Tested and verified on: DWMAC CORE 5.00a with 32-bit DMA AXI address width DWMAC CORE 5.10a with 32-bit DMA AXI address width DWXGMAC CORE 3.20a with 40-bit DMA AXI address width Signed-off-by: Furong Xu <0x1207@gmail.com> Link: https://patch.msgid.link/20241220080726.1733837-1-0x1207@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 60 +++++++++-------------- 1 file changed, 24 insertions(+), 36 deletions(-) commit a003c38d9bbbacd26b2354795bddb8d25631b0b5 Author: Daniel Golle <daniel@makrotopia.org> Date: Thu Jan 2 12:41:21 2025 +0000 net: pcs: pcs-mtk-lynxi: correctly report in-band status capabilities Neither does the LynxI PCS support QSGMII, nor is in-band-status supported in 2500Base-X mode. Fix the pcs_inband_caps() method accordingly. Fixes: 520d29bdda86 ("net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method") Signed-off-by: Daniel Golle <daniel@makrotopia.org> Link: https://patch.msgid.link/Z3aJccb1vW14aukg@pidgin.makrotopia.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/pcs/pcs-mtk-lynxi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 577a66e2e634f712384c57a98f504c44ea4b47da Author: Matteo Martelli <matteomartelli3@gmail.com> Date: Mon Dec 2 16:11:08 2024 +0100 iio: iio-mux: kzalloc instead of devm_kzalloc to ensure page alignment During channel configuration, the iio-mux driver allocates a page with devm_kzalloc(PAGE_SIZE) to read channel ext_info. However, the resulting buffer points to an offset of the page due to the devres header sitting at the beginning of the allocated area. This leads to failure in the provider driver when sysfs_emit* helpers are used to format the ext_info attributes. Switch to plain kzalloc version. The devres version is not strictly necessary as the buffer is only accessed during the channel configuration phase. Rely on __free cleanup to deallocate the buffer. Also, move the ext_info handling into a new function to have the page buffer definition and assignment in one statement as suggested by cleanup documentation. Signed-off-by: Matteo Martelli <matteomartelli3@gmail.com> Fixes: 7ba9df54b091 ("iio: multiplexer: new iio category and iio-mux driver") Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241202-iio-kmalloc-align-v1-2-aa9568c03937@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/multiplexer/iio-mux.c | 84 +++++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 38 deletions(-) commit f5ab868af55ff58f7783d08d674bb373cb672210 Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Mon Dec 30 16:10:31 2024 +0100 iio: adc: ad7625: Add ending newlines to error messages Error messages passed to dev_err_probe() are supposed to end in "\n". Fix accordingly. Fixes: b7ffd0fa65e9 ("iio: adc: ad7625: add driver") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Tested-by: Trevor Gamblin <tgamblin@baylibre.com> Link: https://patch.msgid.link/20241230151030.3207529-2-u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad7625.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f9eb0571811ecc91821690c55dbf3ecfc37a5e85 Author: Lothar Rubusch <l.rubusch@gmail.com> Date: Sat Dec 28 23:29:49 2024 +0000 iio: accel: adxl345: complete the list of defines Having interrupts events and FIFO available allows to evaluate the sensor events. Cover the list of interrupt based sensor events. Keep them in the header file for readability. Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com> Link: https://patch.msgid.link/20241228232949.72487-5-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/adxl345.h | 54 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 6 deletions(-) commit cf04212d1fe750c625bf853bf7dc84cdf7cc1e75 Author: Lothar Rubusch <l.rubusch@gmail.com> Date: Sat Dec 28 23:29:48 2024 +0000 iio: accel: adxl345: add FIFO with watermark events Add a basic setup for FIFO with configurable watermark. Add a handler for watermark interrupt events and extend the channel for the scan_index needed for the iio channel. The sensor is configurable to use a FIFO_BYPASSED mode or a FIFO_STREAM mode. For the FIFO_STREAM mode now a watermark can be configured, or disabled by setting 0. Further features require a working FIFO setup. Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com> Link: https://patch.msgid.link/20241228232949.72487-4-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/adxl345.h | 26 +++- drivers/iio/accel/adxl345_core.c | 308 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 323 insertions(+), 11 deletions(-) commit af38b0f6912846611170a262def745cfcc644eee Author: Lothar Rubusch <l.rubusch@gmail.com> Date: Sat Dec 28 23:29:47 2024 +0000 iio: accel: adxl345: initialize FIFO delay value for SPI Add the possibility to delay FIFO access when SPI is used. According to the datasheet this is needed for the adxl345. When initialization happens over SPI the need for delay is to be signalized, and the delay will be used. Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com> Link: https://patch.msgid.link/20241228232949.72487-3-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/adxl345.h | 1 + drivers/iio/accel/adxl345_core.c | 11 +++++++++++ drivers/iio/accel/adxl345_i2c.c | 2 +- drivers/iio/accel/adxl345_spi.c | 7 +++++-- 4 files changed, 18 insertions(+), 3 deletions(-) commit e2e6d241486eec2688c9224c583570d5c746ad15 Author: Lothar Rubusch <l.rubusch@gmail.com> Date: Sat Dec 28 23:29:46 2024 +0000 iio: accel: adxl345: introduce interrupt handling Add the possibility to claim an interrupt. Init the state structure with an interrupt line obtained from the DT. The adxl345 can use two different interrupt lines for event handling. Only one is used. Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com> Link: https://patch.msgid.link/20241228232949.72487-2-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/adxl345_core.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 82e1cedeb8186cc019bad83d6bf06a9c475d7b13 Author: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Mon Dec 30 16:13:53 2024 +0100 iio: light: veml3235: fix scale to conform to ABI The current scale is not ABI-compliant as it is just the sensor gain instead of the value that acts as a multiplier to be applied to the raw value (there is no offset). Use the iio-gts helpers to obtain the proper scale values according to the gain and integration time to match the resolution tables from the datasheet. When at it, use 'scale' instead of 'gain' consistently for the get/set functions to avoid misunderstandings. Fixes: c5a23f80c164 ("iio: light: add support for veml3235") Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20241230-veml3235_scale-v3-2-48a5795e2f64@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/light/Kconfig | 1 + drivers/iio/light/veml3235.c | 237 +++++++++++++++++++++++-------------------- 2 files changed, 130 insertions(+), 108 deletions(-) commit 7716d085531bf797c882ed67eda184ac58a387a8 Author: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Mon Dec 30 16:13:52 2024 +0100 iio: gts-helper: add helpers to ease searches of gain_sel and new_gain This helper functions reduce the burden in the drivers that want to fetch a gain and time selector for a given scale or a new optimal gain. The former is currently achieved by calling iio_gts_find_gain_sel_for_scale_using_time() for the current time selector, and then iterating over the rest of time selectors if the gain selector was not found. The latter requires a combination of multiple iio-gts helpers to find the new gain, look for an optimal gain if there was no exact match, and set a minimum gain if the optimal gain is not in the range of available gains. Provide simpler workflows by means of functions that address common patterns in the users of the iio-gts helpers. Acked-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20241230-veml3235_scale-v3-1-48a5795e2f64@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/industrialio-gts-helper.c | 77 +++++++++++++++++++++++++++++++++++ include/linux/iio/iio-gts-helper.h | 6 +++ 2 files changed, 83 insertions(+) commit 383ca7bee8a93be9ff5a072936981c2710d2856b Author: Vasily Khoruzhick <anarsoul@gmail.com> Date: Fri Jan 3 23:37:00 2025 -0800 clk: sunxi-ng: a64: stop force-selecting PLL-MIPI as TCON0 parent Stop force-selecting PLL-MIPI as TCON0 parent, since it breaks video output on Pinebook that uses RGB to eDP bridge. Partially revert commit ca1170b69968 ("clk: sunxi-ng: a64: force select PLL_MIPI in TCON0 mux"), while still leaving CLK_SET_RATE_NO_REPARENT flag set, since we do not want the clock to be reparented. The issue is that apparently different TCON0 outputs require a different clock, or the mux might be selecting the output type. I did an experiment: I manually configured PLL_MIPI and PLL_VIDEO0_2X to the same clock rate and flipped the switch with devmem. Experiment clearly showed that whenever PLL_MIPI is selected as TCON0 clock parent, the video output stops working. Therefore, TCON0 clock parent corresponding to the output type must be assigned in the device tree. Fixes: ca1170b69968 ("clk: sunxi-ng: a64: force select PLL_MIPI in TCON0 mux") Reviewed-by: Dragan Simic <dsimic@manjaro.org> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Tested-by: Frank Oltmanns <frank@oltmanns.dev> # on PinePhone Tested-by: Stuart Gathman <stuart@gathman.org> # on OG Pinebook Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Link: https://patch.msgid.link/20250104074035.1611136-5-anarsoul@gmail.com Signed-off-by: Chen-Yu Tsai <wens@csie.org> drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 8715c91a836502929c637c76a26335ede8818acf Author: Vasily Khoruzhick <anarsoul@gmail.com> Date: Fri Jan 3 23:36:59 2025 -0800 arm64: dts: allwinner: a64: explicitly assign clock parent for TCON0 TCON0 seems to need a different clock parent depending on output type. For RGB it has to be PLL-VIDEO0-2X, while for DSI it has to be PLL-MIPI, so select it explicitly. Video output doesn't work if incorrect clock is assigned. On my Pinebook I manually configured PLL-VIDEO0-2X and PLL-MIPI to the same rate, and while video output works fine with PLL-VIDEO0-2X, it doesn't work at all (as in no picture) with PLL-MIPI. Fixes: ca1170b69968 ("clk: sunxi-ng: a64: force select PLL_MIPI in TCON0 mux") Reviewed-by: Dragan Simic <dsimic@manjaro.org> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Tested-by: Frank Oltmanns <frank@oltmanns.dev> # on PinePhone Tested-by: Stuart Gathman <stuart@gathman.org> # on OG Pinebook Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Link: https://patch.msgid.link/20250104074035.1611136-4-anarsoul@gmail.com Signed-off-by: Chen-Yu Tsai <wens@csie.org> arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 2 ++ arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts | 2 ++ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 2 ++ 3 files changed, 6 insertions(+) commit dbfda1fdf2f8232ea778b25025e8b8def7d2d3af Merge: 300d7208ed78 9897831de614 Author: Chen-Yu Tsai <wens@csie.org> Date: Sat Jan 4 20:16:32 2025 +0800 Merge branch 'sunxi/shared-clk-ids-for-6.14' into sunxi/dt-for-6.14 commit 0f368cb7ef103f284f75e962c4c89da5aa8ccec7 Author: Vasily Khoruzhick <anarsoul@gmail.com> Date: Fri Jan 3 23:36:58 2025 -0800 clk: sunxi-ng: a64: drop redundant CLK_PLL_VIDEO0_2X and CLK_PLL_MIPI Drop redundant CLK_PLL_VIDEO0_2X and CLK_PLL.MIPI. These are now defined in dt-bindings/clock/sun50i-a64-ccu.h Fixes: ca1170b69968 ("clk: sunxi-ng: a64: force select PLL_MIPI in TCON0 mux") Reviewed-by: Dragan Simic <dsimic@manjaro.org> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Tested-by: Frank Oltmanns <frank@oltmanns.dev> # on pinephone Tested-by: Stuart Gathman <stuart@gathman.org> # on OG pinebook Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Link: https://patch.msgid.link/20250104074035.1611136-3-anarsoul@gmail.com Signed-off-by: Chen-Yu Tsai <wens@csie.org> drivers/clk/sunxi-ng/ccu-sun50i-a64.h | 2 -- 1 file changed, 2 deletions(-) commit 9897831de614f1d8d5184547f0e7bf7665eed436 Author: Vasily Khoruzhick <anarsoul@gmail.com> Date: Fri Jan 3 23:36:57 2025 -0800 dt-bindings: clock: sunxi: Export PLL_VIDEO_2X and PLL_MIPI Export PLL_VIDEO_2X and PLL_MIPI, these will be used to explicitly select TCON0 clock parent in dts Fixes: ca1170b69968 ("clk: sunxi-ng: a64: force select PLL_MIPI in TCON0 mux") Reviewed-by: Dragan Simic <dsimic@manjaro.org> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Tested-by: Frank Oltmanns <frank@oltmanns.dev> # on PinePhone Tested-by: Stuart Gathman <stuart@gathman.org> # on OG Pinebook Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://patch.msgid.link/20250104074035.1611136-2-anarsoul@gmail.com Signed-off-by: Chen-Yu Tsai <wens@csie.org> include/dt-bindings/clock/sun50i-a64-ccu.h | 2 ++ 1 file changed, 2 insertions(+) commit 558aff7a63f67dc4723a4deed419a2dfd0fb14f2 Author: Zhao Qunqin <zhaoqunqin@loongson.cn> Date: Thu Dec 19 20:48:46 2024 +0800 EDAC: Add an EDAC driver for the Loongson memory controller Add ECC support for Loongson SoC DDR controller. This driver reports single bit errors (CE) only. Only ACPI firmware is supported. [ bp: Document what last_ce_count is for. ] Signed-off-by: Zhao Qunqin <zhaoqunqin@loongson.cn> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Link: https://lore.kernel.org/r/20241219124846.1876-1-zhaoqunqin@loongson.cn Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> MAINTAINERS | 6 ++ arch/loongarch/Kconfig | 1 + drivers/edac/Kconfig | 8 +++ drivers/edac/Makefile | 1 + drivers/edac/loongson_edac.c | 157 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 173 insertions(+) commit a0634b457eca16b21a4525bc40cd2db80f52dadc Merge: 40384c840ea1 b9b588f22a0c Author: Christian Brauner <brauner@kernel.org> Date: Sat Jan 4 10:15:58 2025 +0100 Merge patch series "Improve simple directory offset wrap behavior" Chuck Lever <chuck.lever@oracle.com> says: The purpose of this series is to construct a set of upstream fixes that can be backported to v6.6 to address CVE-2024-46701. In response to a reported failure of libhugetlbfs-test.32bit.gethugepagesizes: https://lore.kernel.org/linux-fsdevel/f996eec0-30e1-4fbf-a936-49f3bedc09e9@oracle.com/T/#t I've narrowed the range of directory offset values returned by simple_offset_add() to 3 .. (S32_MAX - 1) on all platforms. This means the allocation behavior is identical on 32-bit systems, 64-bit systems, and 32-bit user space on 64-bit kernels. The new range still permits over 2 billion concurrent entries per directory. * patches from https://lore.kernel.org/r/20241228175522.1854234-1-cel@kernel.org: libfs: Use d_children list to iterate simple_offset directories libfs: Replace simple_offset end-of-directory detection Revert "libfs: fix infinite directory reads for offset dir" Revert "libfs: Add simple_offset_empty()" libfs: Return ENOSPC when the directory offset range is exhausted Link: https://lore.kernel.org/r/20241228175522.1854234-1-cel@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> commit b9b588f22a0c049a14885399e27625635ae6ef91 Author: Chuck Lever <chuck.lever@oracle.com> Date: Sat Dec 28 12:55:21 2024 -0500 libfs: Use d_children list to iterate simple_offset directories The mtree mechanism has been effective at creating directory offsets that are stable over multiple opendir instances. However, it has not been able to handle the subtleties of renames that are concurrent with readdir. Instead of using the mtree to emit entries in the order of their offset values, use it only to map incoming ctx->pos to a starting entry. Then use the directory's d_children list, which is already maintained properly by the dcache, to find the next child to emit. One of the sneaky things about this is that when the mtree-allocated offset value wraps (which is very rare), looking up ctx->pos++ is not going to find the next entry; it will return NULL. Instead, by following the d_children list, the offset values can appear in any order but all of the entries in the directory will be visited eventually. Note also that the readdir() is guaranteed to reach the tail of this list. Entries are added only at the head of d_children, and readdir walks from its current position in that list towards its tail. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Link: https://lore.kernel.org/r/20241228175522.1854234-6-cel@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/libfs.c | 84 +++++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 26 deletions(-) commit 68a3a65003145644efcbb651e91db249ccd96281 Author: Chuck Lever <chuck.lever@oracle.com> Date: Sat Dec 28 12:55:20 2024 -0500 libfs: Replace simple_offset end-of-directory detection According to getdents(3), the d_off field in each returned directory entry points to the next entry in the directory. The d_off field in the last returned entry in the readdir buffer must contain a valid offset value, but if it points to an actual directory entry, then readdir/getdents can loop. This patch introduces a specific fixed offset value that is placed in the d_off field of the last entry in a directory. Some user space applications assume that the EOD offset value is larger than the offsets of real directory entries, so the largest valid offset value is reserved for this purpose. This new value is never allocated by simple_offset_add(). When ->iterate_dir() returns, getdents{64} inserts the ctx->pos value into the d_off field of the last valid entry in the readdir buffer. When it hits EOD, offset_readdir() sets ctx->pos to the EOD offset value so the last entry is updated to point to the EOD marker. When trying to read the entry at the EOD offset, offset_readdir() terminates immediately. It is worth noting that using a Maple tree for directory offset value allocation does not guarantee a 63-bit range of values -- on platforms where "long" is a 32-bit type, the directory offset value range is still 0..(2^31 - 1). For broad compatibility with 32-bit user space, the largest tmpfs directory cookie value is now S32_MAX. Fixes: 796432efab1e ("libfs: getdents() should return 0 after reaching EOD") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Link: https://lore.kernel.org/r/20241228175522.1854234-5-cel@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/libfs.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) commit b662d858131da9a8a14e68661656989b14dbf113 Author: Chuck Lever <chuck.lever@oracle.com> Date: Sat Dec 28 12:55:19 2024 -0500 Revert "libfs: fix infinite directory reads for offset dir" The current directory offset allocator (based on mtree_alloc_cyclic) stores the next offset value to return in octx->next_offset. This mechanism typically returns values that increase monotonically over time. Eventually, though, the newly allocated offset value wraps back to a low number (say, 2) which is smaller than other already- allocated offset values. Yu Kuai <yukuai3@huawei.com> reports that, after commit 64a7ce76fb90 ("libfs: fix infinite directory reads for offset dir"), if a directory's offset allocator wraps, existing entries are no longer visible via readdir/getdents because offset_readdir() stops listing entries once an entry's offset is larger than octx->next_offset. These entries vanish persistently -- they can be looked up, but will never again appear in readdir(3) output. The reason for this is that the commit treats directory offsets as monotonically increasing integer values rather than opaque cookies, and introduces this comparison: if (dentry2offset(dentry) >= last_index) { On 64-bit platforms, the directory offset value upper bound is 2^63 - 1. Directory offsets will monotonically increase for millions of years without wrapping. On 32-bit platforms, however, LONG_MAX is 2^31 - 1. The allocator can wrap after only a few weeks (at worst). Revert commit 64a7ce76fb90 ("libfs: fix infinite directory reads for offset dir") to prepare for a fix that can work properly on 32-bit systems and might apply to recent LTS kernels where shmem employs the simple_offset mechanism. Reported-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Link: https://lore.kernel.org/r/20241228175522.1854234-4-cel@kernel.org Reviewed-by: Yang Erkun <yangerkun@huawei.com> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/libfs.c | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) commit d7bde4f27ceef3dc6d72010a20d4da23db835a32 Author: Chuck Lever <chuck.lever@oracle.com> Date: Sat Dec 28 12:55:18 2024 -0500 Revert "libfs: Add simple_offset_empty()" simple_empty() and simple_offset_empty() perform the same task. The latter's use as a canary to find bugs has not found any new issues. A subsequent patch will remove the use of the mtree for iterating directory contents, so revert back to using a similar mechanism for determining whether a directory is indeed empty. Only one such mechanism is ever needed. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Link: https://lore.kernel.org/r/20241228175522.1854234-3-cel@kernel.org Reviewed-by: Yang Erkun <yangerkun@huawei.com> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/libfs.c | 32 -------------------------------- include/linux/fs.h | 1 - mm/shmem.c | 4 ++-- 3 files changed, 2 insertions(+), 35 deletions(-) commit 903dc9c43a155e0893280c7472d4a9a3a83d75a6 Author: Chuck Lever <chuck.lever@oracle.com> Date: Sat Dec 28 12:55:17 2024 -0500 libfs: Return ENOSPC when the directory offset range is exhausted Testing shows that the EBUSY error return from mtree_alloc_cyclic() leaks into user space. The ERRORS section of "man creat(2)" says: > EBUSY O_EXCL was specified in flags and pathname refers > to a block device that is in use by the system > (e.g., it is mounted). ENOSPC is closer to what applications expect in this situation. Note that the normal range of simple directory offset values is 2..2^63, so hitting this error is going to be rare to impossible. Fixes: 6faddda69f62 ("libfs: Add directory operations for stable offsets") Cc: stable@vger.kernel.org # v6.9+ Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Yang Erkun <yangerkun@huawei.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Link: https://lore.kernel.org/r/20241228175522.1854234-2-cel@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/libfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6a4ef7a2ff4dfdb7b345b13bd74fc68fe351bb45 Merge: aaec5a95d596 15858da53542 Author: Christian Brauner <brauner@kernel.org> Date: Sat Jan 4 09:56:42 2025 +0100 Merge patch series "fix reading ESP during coredump" Nam Cao <namcao@linutronix.de> says: In /proc/PID/stat, there is the kstkesp field which is the stack pointer of a thread. While the thread is active, this field reads zero. But during a coredump, it should have a valid value. However, at the moment, kstkesp is zero even during coredump. The first commit fixes this problem, and the second commit adds a selftest to detect if this problem appears again in the future. * patches from https://lore.kernel.org/r/cover.1735805772.git.namcao@linutronix.de: selftests: coredump: Add stackdump test fs/proc: do_task_stat: Fix ESP not readable during coredump Link: https://lore.kernel.org/r/cover.1735805772.git.namcao@linutronix.de Signed-off-by: Christian Brauner <brauner@kernel.org> commit aaec5a95d59615523db03dd53c2052f0a87beea7 Author: Oleg Nesterov <oleg@redhat.com> Date: Thu Jan 2 15:07:15 2025 +0100 pipe_read: don't wake up the writer if the pipe is still full wake_up(pipe->wr_wait) makes no sense if pipe_full() is still true after the reading, the writer sleeping in wait_event(wr_wait, pipe_writable()) will check the pipe_writable() == !pipe_full() condition and sleep again. Only wake the writer if we actually released a pipe buf, and the pipe was full before we did so. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Link: https://lore.kernel.org/all/20241229135737.GA3293@redhat.com/ Link: https://lore.kernel.org/r/20250102140715.GA7091@redhat.com Reported-by: WangYuli <wangyuli@uniontech.com> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/pipe.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 15858da53542360931a457f32bcdc4287d13731f Author: Nam Cao <namcao@linutronix.de> Date: Thu Jan 2 09:22:57 2025 +0100 selftests: coredump: Add stackdump test Add a test which checks that the kstkesp field in /proc/pid/stat can be read for all threads of a coredumping process. For full details including the motivation for this test and how it works, see the README file added by this commit. Reviewed-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Nam Cao <namcao@linutronix.de> Link: https://lore.kernel.org/r/50e737b6576208566d14efcf1934fe840de6b1f4.1735805772.git.namcao@linutronix.de Signed-off-by: Christian Brauner <brauner@kernel.org> tools/testing/selftests/coredump/Makefile | 7 + tools/testing/selftests/coredump/README.rst | 50 +++++++ tools/testing/selftests/coredump/stackdump | 14 ++ tools/testing/selftests/coredump/stackdump_test.c | 151 ++++++++++++++++++++++ 4 files changed, 222 insertions(+) commit d2fc0ed52a284a13a16c914bc83b0b8733f55a4a Merge: ec052fae814d af6505e5745b Author: Christian Brauner <brauner@kernel.org> Date: Sat Jan 4 09:37:42 2025 +0100 Merge branch 'vfs-6.14.uncached_buffered_io' Bring in the VFS changes for uncached buffered io. Signed-off-by: Christian Brauner <brauner@kernel.org> commit ab251dacfbae28772c897f068a4184f478189ff2 Author: Nam Cao <namcao@linutronix.de> Date: Thu Jan 2 09:22:56 2025 +0100 fs/proc: do_task_stat: Fix ESP not readable during coredump The field "eip" (instruction pointer) and "esp" (stack pointer) of a task can be read from /proc/PID/stat. These fields can be interesting for coredump. However, these fields were disabled by commit 0a1eb2d474ed ("fs/proc: Stop reporting eip and esp in /proc/PID/stat"), because it is generally unsafe to do so. But it is safe for a coredumping process, and therefore exceptions were made: - for a coredumping thread by commit fd7d56270b52 ("fs/proc: Report eip/esp in /prod/PID/stat for coredumping"). - for all other threads in a coredumping process by commit cb8f381f1613 ("fs/proc/array.c: allow reporting eip/esp for all coredumping threads"). The above two commits check the PF_DUMPCORE flag to determine a coredump thread and the PF_EXITING flag for the other threads. Unfortunately, commit 92307383082d ("coredump: Don't perform any cleanups before dumping core") moved coredump to happen earlier and before PF_EXITING is set. Thus, checking PF_EXITING is no longer the correct way to determine threads in a coredumping process. Instead of PF_EXITING, use PF_POSTCOREDUMP to determine the other threads. Checking of PF_EXITING was added for coredumping, so it probably can now be removed. But it doesn't hurt to keep. Fixes: 92307383082d ("coredump: Don't perform any cleanups before dumping core") Cc: stable@vger.kernel.org Cc: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Kees Cook <kees@kernel.org> Signed-off-by: Nam Cao <namcao@linutronix.de> Link: https://lore.kernel.org/r/d89af63d478d6c64cc46a01420b46fd6eb147d6f.1735805772.git.namcao@linutronix.de Signed-off-by: Christian Brauner <brauner@kernel.org> fs/proc/array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af6505e5745b9f3a670de405b08b73573343c15c Author: Jens Axboe <axboe@kernel.dk> Date: Fri Dec 20 08:47:45 2024 -0700 fs: add RWF_DONTCACHE iocb and FOP_DONTCACHE file_operations flag If a file system supports uncached buffered IO, it may set FOP_DONTCACHE and enable support for RWF_DONTCACHE. If RWF_DONTCACHE is attempted without the file system supporting it, it'll get errored with -EOPNOTSUPP. Signed-off-by: Jens Axboe <axboe@kernel.dk> Link: https://lore.kernel.org/r/20241220154831.1086649-8-axboe@kernel.dk Signed-off-by: Christian Brauner <brauner@kernel.org> include/linux/fs.h | 14 +++++++++++++- include/uapi/linux/fs.h | 6 +++++- 2 files changed, 18 insertions(+), 2 deletions(-) commit 2ea9ec5d2c207a41d523f8804053cee00fe50763 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 03:48:02 2024 +0200 drm/vc4: hdmi: use drm_atomic_helper_connector_hdmi_hotplug() Use the helper function to update the connector's information. This makes sure that HDMI-related events are handled in a generic way. Currently it is limited to the HDMI state reporting to the sound system. Acked-by: Maxime Ripard <mripard@kernel.org> Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241224-drm-bridge-hdmi-connector-v10-10-dc89577cd438@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/vc4/vc4_hdmi.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit b4fa0800760c20fe34318a1079687526fc323572 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 03:48:01 2024 +0200 drm/vc4: hdmi: stop rereading EDID in get_modes() The vc4_hdmi_connector_detect_ctx() via vc4_hdmi_handle_hotplug() already reads EDID and propagates it to the drm_connector. Stop rereading EDID as a part of the .get_modes() callback and just update the list of modes. This matches the behaviour of the i915 driver. Acked-by: Maxime Ripard <mripard@kernel.org> Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241224-drm-bridge-hdmi-connector-v10-9-dc89577cd438@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/vc4/vc4_hdmi.c | 21 --------------------- 1 file changed, 21 deletions(-) commit 9640f1437a88d8c617ff5523f1f9dc8c3ff29121 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 03:48:00 2024 +0200 drm/vc4: hdmi: switch to using generic HDMI Codec infrastructure Drop driver-specific implementation and use the generic HDMI Codec framework in order to implement the HDMI audio support. Acked-by: Maxime Ripard <mripard@kernel.org> Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241224-drm-bridge-hdmi-connector-v10-8-dc89577cd438@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/vc4/Kconfig | 1 + drivers/gpu/drm/vc4/vc4_hdmi.c | 74 +++++++++++------------------------------- drivers/gpu/drm/vc4/vc4_hdmi.h | 2 -- 3 files changed, 20 insertions(+), 57 deletions(-) commit 4b5a79d7f4d5c34120c6f2e8836bc8ad3a43594c Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 03:47:59 2024 +0200 drm/bridge_connector: hook drm_atomic_helper_connector_hdmi_hotplug() Extend drm_bridge_connector code to read the EDID and use it to update connector status if the bridge chain implements HDMI bridge. Performing it from the generic location minimizes individual bridge's code and enforces standard behaviour from all corresponding drivers. Reviewed-by: Maxime Ripard <mripard@kernel.org> Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241224-drm-bridge-hdmi-connector-v10-7-dc89577cd438@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/display/drm_bridge_connector.c | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit ab716b74dc9dd4903b9006f473137e1aa624af56 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 03:47:58 2024 +0200 drm/display/hdmi: implement hotplug functions The HDMI Connectors need to perform a variety of tasks when the HDMI connector state changes. Such tasks include setting or invalidating CEC address, notifying HDMI codec driver, updating scrambler data, etc. Implementing such tasks in a driver-specific callbacks is error prone. Start implementing the generic helper function (currently handling only the HDMI Codec framework) to be used by drivers utilizing HDMI Connector framework. Reviewed-by: Maxime Ripard <mripard@kernel.org> Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241224-drm-bridge-hdmi-connector-v10-6-dc89577cd438@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/display/Kconfig | 1 + drivers/gpu/drm/display/drm_hdmi_state_helper.c | 57 +++++++++++++++++++++++++ include/drm/display/drm_hdmi_state_helper.h | 5 +++ include/drm/drm_connector.h | 16 +++++++ 4 files changed, 79 insertions(+) commit c054aa1bf529a2fa13546b25231d16bb0fd87ca2 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 03:47:57 2024 +0200 drm/bridge: lt9611: switch to using the DRM HDMI codec framework Make the Lontium LT9611 DSI-to-HDMI bridge driver use the DRM HDMI Codec framework. This enables programming of Audio InfoFrames using the HDMI Connector interface and also enables support for the missing features, including the ELD retrieval and better hotplug support. Reviewed-by: Maxime Ripard <mripard@kernel.org> Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241224-drm-bridge-hdmi-connector-v10-5-dc89577cd438@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/bridge/lontium-lt9611.c | 170 +++++++++++++------------------- 1 file changed, 68 insertions(+), 102 deletions(-) commit 0beba3f9d366c6df10e5b080fc99c45ac17248ed Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 03:47:56 2024 +0200 drm/bridge: connector: add support for HDMI codec framework Add necessary glue code to be able to use new HDMI codec framework from the DRM bridge drivers. The drm_bridge implements a limited set of the hdmi_codec_ops interface, with the functions accepting both drm_connector and drm_bridge instead of just a generic void pointer. This framework is integrated with the DRM HDMI Connector framework, but can also be used for DisplayPort connectors. Reviewed-by: Maxime Ripard <mripard@kernel.org> Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241224-drm-bridge-hdmi-connector-v10-4-dc89577cd438@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/display/Kconfig | 1 + drivers/gpu/drm/display/drm_bridge_connector.c | 99 ++++++++++++++++++++++++-- include/drm/drm_bridge.h | 74 +++++++++++++++++++ 3 files changed, 170 insertions(+), 4 deletions(-) commit baf616647fe6f857a0cf2187197de31e9bb17a71 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 03:47:55 2024 +0200 drm/connector: implement generic HDMI audio helpers Several DRM drivers implement HDMI codec support (despite its name it applies to both HDMI and DisplayPort drivers). Implement generic framework to be used by these drivers. This removes a requirement to implement get_eld() callback and provides default implementation for codec's plug handling. Acked-by: Maxime Ripard <mripard@kernel.org> Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241224-drm-bridge-hdmi-connector-v10-3-dc89577cd438@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/display/Kconfig | 6 + drivers/gpu/drm/display/Makefile | 2 + drivers/gpu/drm/display/drm_hdmi_audio_helper.c | 190 ++++++++++++++++++++++++ drivers/gpu/drm/drm_connector.c | 5 + include/drm/display/drm_hdmi_audio_helper.h | 22 +++ include/drm/drm_connector.h | 116 +++++++++++++++ 6 files changed, 341 insertions(+) commit bb1d67bf82fbd2c550fa637e0b8a966ee81a293b Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 03:47:54 2024 +0200 ASoC: hdmi-codec: move no_capture_mute to struct hdmi_codec_pdata The no_capture_mute flag might differ from platform to platform, especially in the case of the wrapping implementations, like the upcoming DRM HDMI Codec framework. Move the flag next to all other flags in struct hdmi_codec_pdata. Acked-by: Mark Brown <broonie@kernel.org> Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241224-drm-bridge-hdmi-connector-v10-2-dc89577cd438@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/bridge/ite-it66121.c | 2 +- drivers/gpu/drm/bridge/sii902x.c | 2 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- drivers/gpu/drm/i2c/tda998x_drv.c | 2 +- drivers/gpu/drm/mediatek/mtk_dp.c | 2 +- drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 +- drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +- drivers/gpu/drm/sti/sti_hdmi.c | 2 +- include/sound/hdmi-codec.h | 4 +--- sound/soc/codecs/hdmi-codec.c | 2 +- 10 files changed, 10 insertions(+), 12 deletions(-) commit 6af45d7df1099ccac634b36f8cdfa32fbca8c1d1 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 03:47:53 2024 +0200 ASoC: hdmi-codec: pass data to get_dai_id too The upcoming DRM connector HDMI codec implementation is going to use codec-specific data in the .get_dai_id to get drm_connector. Pass data to the callback, as it is done with other hdmi_codec_ops callbacks. Acked-by: Mark Brown <broonie@kernel.org> Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241224-drm-bridge-hdmi-connector-v10-1-dc89577cd438@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 3 ++- drivers/gpu/drm/bridge/analogix/anx7625.c | 3 ++- drivers/gpu/drm/bridge/lontium-lt9611.c | 3 ++- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 3 ++- drivers/gpu/drm/bridge/sii902x.c | 3 ++- drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 3 ++- include/sound/hdmi-codec.h | 3 ++- sound/soc/codecs/hdmi-codec.c | 2 +- 8 files changed, 15 insertions(+), 8 deletions(-) commit 857a61c2ce74e30fc3b10bc89d68ddd8d05b188c Author: Naresh Solanki <naresh.solanki@9elements.com> Date: Fri Dec 20 01:48:32 2024 +0530 cpufreq/amd-pstate: Refactor max frequency calculation The previous approach introduced roundoff errors during division when calculating the boost ratio. This, in turn, affected the maximum frequency calculation, often resulting in reporting lower frequency values. For example, on the Glinda SoC based board with the following parameters: max_perf = 208 nominal_perf = 100 nominal_freq = 2600 MHz The Linux kernel previously calculated the frequency as: freq = ((max_perf * 1024 / nominal_perf) * nominal_freq) / 1024 freq = 5405 MHz // Integer arithmetic. With the updated formula: freq = (max_perf * nominal_freq) / nominal_perf freq = 5408 MHz This change ensures more accurate frequency calculations by eliminating unnecessary shifts and divisions, thereby improving precision. Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com> [ML: trim the changelog from commit message] Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241219201833.2750998-1-naresh.solanki@9elements.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit fee7aaee11f52c231f886d3232c1c20a6a830e45 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Thu Jan 2 13:22:44 2025 -0800 accel/amdxdna: Declare npu6_dev_priv as static Fix sparse warning: symbol 'npu6_dev_priv' was not declared. Should it be static? Fixes: 273b5176ac17 ("accel/amdxdna: Add RyzenAI-npu6 support") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412311819.9mz11Uak-lkp@intel.com/ Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250102212244.1586340-7-lizhi.hou@amd.com drivers/accel/amdxdna/npu6_regs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b5bcf64a65b36e91b6bead03de1df6f2705ad94 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Thu Jan 2 13:22:43 2025 -0800 accel/amdxdna: Add __user to second parameter of aie2_query_status The second parameter of aie2_query_status() is a userspace pointer. Declaring it as 'char __user *' to fix sparse warning. Fixes: 850d71f6bf4c ("accel/amdxdna: Add query functions") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412311655.YBvq2wJb-lkp@intel.com/ Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250102212244.1586340-6-lizhi.hou@amd.com drivers/accel/amdxdna/aie2_pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72e487b47d249f9226093b1c8eefba06c32803ef Author: Lizhi Hou <lizhi.hou@amd.com> Date: Thu Jan 2 13:22:42 2025 -0800 accel/amdxdna: Declare force_cmdlist as static Fix sparse warning: symbol 'force_cmdlist' was not declared. Should it be static? Fixes: aac243092b70 ("accel/amdxdna: Add command execution") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412311448.GKQj7uPZ-lkp@intel.com/ Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250102212244.1586340-5-lizhi.hou@amd.com drivers/accel/amdxdna/aie2_ctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f74400529488906dd0c57a4d1520a639bfd91d8 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Thu Jan 2 13:22:41 2025 -0800 accel/amdxdna: Use rcu_access_pointer for __rcu pointer Use rcu_access_pointer for pid in struct drm_file. This fixes sparse warning. Fixes: be462c97b7df ("accel/amdxdna: Add hardware context") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412311210.LfeHTzLw-lkp@intel.com/ Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250102212244.1586340-4-lizhi.hou@amd.com drivers/accel/amdxdna/amdxdna_pci_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c199310be29a08ad1c0b178fdace7e5a8d2d6515 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Thu Jan 2 13:22:40 2025 -0800 accel/amdxdna: Declare aie2_max_col as static Fix the sparse warning: symbol 'aie2_max_col' was not declared. Should it be static? Fixes: c88d3325ae69 ("accel/amdxdna: Add hardware resource solver") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412311028.x2UtcSHm-lkp@intel.com/ Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250102212244.1586340-3-lizhi.hou@amd.com drivers/accel/amdxdna/aie2_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c8cfec3fcc4fe53f2bd87ec91ef31df4fa6dc0d Author: Lizhi Hou <lizhi.hou@amd.com> Date: Thu Jan 2 13:22:39 2025 -0800 accel/amdxdna: Declare mailbox register base as __iomem pointer Declare mailbox ringbuf_base and mbox_base as 'void __iomem *' to fix sparse warnings: cast removes address space '__iomem' of expression incorrect type in argument 2 (different address spaces) Fixes: b87f920b9344 ("accel/amdxdna: Support hardware mailbox") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412310857.syD1sXXO-lkp@intel.com/ Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250102212244.1586340-2-lizhi.hou@amd.com drivers/accel/amdxdna/aie2_pci.c | 4 ++-- drivers/accel/amdxdna/amdxdna_mailbox.c | 24 ++++++++++++------------ drivers/accel/amdxdna/amdxdna_mailbox.h | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) commit 71486e48370e8902e0816bba8b51a22871e5e653 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Thu Jan 2 13:22:38 2025 -0800 accel/amdxdna: Declare npu device profile as static variables Declare the variables as static to fix the sparse warnings: symbol 'npu5_dev_priv' was not declared. Should it be static? symbol 'npu1_dev_priv' was not declared. Should it be static? symbol 'npu4_dev_priv' was not declared. Should it be static? symbol 'npu2_dev_priv' was not declared. Should it be static? Fixes: 8c9ff1b181ba ("accel/amdxdna: Add a new driver for AMD AI Engine") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412310648.dtMHgGem-lkp@intel.com/ Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250102212244.1586340-1-lizhi.hou@amd.com drivers/accel/amdxdna/npu1_regs.c | 2 +- drivers/accel/amdxdna/npu2_regs.c | 2 +- drivers/accel/amdxdna/npu4_regs.c | 2 +- drivers/accel/amdxdna/npu5_regs.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 7fa4817340161a34d5b4ca39e96d6318d37c1d3a Author: Eric Biggers <ebiggers@google.com> Date: Fri Dec 27 14:48:29 2024 -0800 crypto: ahash - make hash walk functions private to ahash.c Due to the removal of the Niagara2 SPU driver, crypto_hash_walk_first(), crypto_hash_walk_done(), crypto_hash_walk_last(), and struct crypto_hash_walk are now only used in crypto/ahash.c. Therefore, make them all private to crypto/ahash.c. I.e. un-export the two functions that were exported, make the functions static, and move the struct definition to the .c file. As part of this, move the functions to earlier in the file to avoid needing to add forward declarations. Signed-off-by: Eric Biggers <ebiggers@google.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> crypto/ahash.c | 158 +++++++++++++++++++++++------------------ include/crypto/internal/hash.h | 23 ------ 2 files changed, 87 insertions(+), 94 deletions(-) commit 9ff6e943bce67d125781fe4780a5d6f072dc44c0 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Fri Dec 27 23:32:01 2024 +0100 padata: fix sysfs store callback check padata_sysfs_store() was copied from padata_sysfs_show() but this check was not adapted. Today there is no attribute which can fail this check, but if there is one it may as well be correct. Fixes: 5e017dc3f8bc ("padata: Added sysfs primitives to padata subsystem") Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> kernel/padata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 730f67d8b826d95bef74f255ee604ece9c94e48f Author: Eric Biggers <ebiggers@google.com> Date: Fri Dec 27 14:08:02 2024 -0800 crypto: keywrap - remove unused keywrap algorithm The keywrap (kw) algorithm has no in-tree user. It has never had an in-tree user, and the patch that added it provided no justification for its inclusion. Even use of it via AF_ALG is impossible, as it uses a weird calling convention where part of the ciphertext is returned via the IV buffer, which is not returned to userspace in AF_ALG. It's also unclear whether any new code in the kernel that does key wrapping would actually use this algorithm. It is controversial in the cryptographic community due to having no clearly stated security goal, no security proof, poor performance, and only a 64-bit auth tag. Later work (https://eprint.iacr.org/2006/221) suggested that the goal is deterministic authenticated encryption. But there are now more modern algorithms for this, and this is not the same as key wrapping, for which a regular AEAD such as AES-GCM usually can be (and is) used instead. Therefore, remove this unused code. There were several special cases for this algorithm in the self-tests, due to its weird calling convention. Remove those too. Cc: Stephan Mueller <smueller@chronox.de> Signed-off-by: Eric Biggers <ebiggers@google.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # m68k Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> arch/m68k/configs/amiga_defconfig | 1 - arch/m68k/configs/apollo_defconfig | 1 - arch/m68k/configs/atari_defconfig | 1 - arch/m68k/configs/bvme6000_defconfig | 1 - arch/m68k/configs/hp300_defconfig | 1 - arch/m68k/configs/mac_defconfig | 1 - arch/m68k/configs/multi_defconfig | 1 - arch/m68k/configs/mvme147_defconfig | 1 - arch/m68k/configs/mvme16x_defconfig | 1 - arch/m68k/configs/q40_defconfig | 1 - arch/m68k/configs/sun3_defconfig | 1 - arch/m68k/configs/sun3x_defconfig | 1 - arch/mips/configs/decstation_64_defconfig | 1 - arch/mips/configs/decstation_defconfig | 1 - arch/mips/configs/decstation_r4k_defconfig | 1 - arch/s390/configs/debug_defconfig | 1 - arch/s390/configs/defconfig | 1 - crypto/Kconfig | 8 - crypto/Makefile | 1 - crypto/keywrap.c | 319 ----------------------------- crypto/testmgr.c | 20 +- crypto/testmgr.h | 39 ---- 22 files changed, 1 insertion(+), 403 deletions(-) commit 2890601f54c7f3365cc2a860889d5d5fba55c106 Author: Eric Biggers <ebiggers@google.com> Date: Thu Dec 26 11:43:08 2024 -0800 crypto: vmac - remove unused VMAC algorithm Remove the vmac64 template, as it has no known users. It also continues to have longstanding bugs such as alignment violations (see https://lore.kernel.org/r/20241226134847.6690-1-evepolonium@gmail.com/). This code was added in 2009 by commit f1939f7c5645 ("crypto: vmac - New hash algorithm for intel_txt support"). Based on the mention of intel_txt support in the commit title, it seems it was added as a prerequisite for the contemporaneous patch "intel_txt: add s3 userspace memory integrity verification" (https://lore.kernel.org/r/4ABF2B50.6070106@intel.com/). In the design proposed by that patch, when an Intel Trusted Execution Technology (TXT) enabled system resumed from suspend, the "tboot" trusted executable launched the Linux kernel without verifying userspace memory, and then the Linux kernel used VMAC to verify userspace memory. However, that patch was never merged, as reviewers had objected to the design. It was later reworked into commit 4bd96a7a8185 ("x86, tboot: Add support for S3 memory integrity protection") which made tboot verify the memory instead. Thus the VMAC support in Linux was never used. No in-tree user has appeared since then, other than potentially the usual components that allow specifying arbitrary hash algorithms by name, namely AF_ALG and dm-integrity. However there are no indications that VMAC is being used with these components. Debian Code Search and web searches for "vmac64" (the actual algorithm name) do not return any results other than the kernel itself, suggesting that it does not appear in any other code or documentation. Explicitly grepping the source code of the usual suspects (libell, iwd, cryptsetup) finds no matches either. Before 2018, the vmac code was also completely broken due to using a hardcoded nonce and the wrong endianness for the MAC. It was then fixed by commit ed331adab35b ("crypto: vmac - add nonced version with big endian digest") and commit 0917b873127c ("crypto: vmac - remove insecure version with hardcoded nonce"). These were intentionally breaking changes that changed all the computed MAC values as well as the algorithm name ("vmac" to "vmac64"). No complaints were ever received about these breaking changes, strongly suggesting the absence of users. The reason I had put some effort into fixing this code in 2018 is because it was used by an out-of-tree driver. But if it is still needed in that particular out-of-tree driver, the code can be carried in that driver instead. There is no need to carry it upstream. Cc: Atharva Tiwari <evepolonium@gmail.com> Cc: Shane Wang <shane.wang@intel.com> Signed-off-by: Eric Biggers <ebiggers@google.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # m68k Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> arch/arm/configs/pxa_defconfig | 1 - arch/loongarch/configs/loongson3_defconfig | 1 - arch/m68k/configs/amiga_defconfig | 1 - arch/m68k/configs/apollo_defconfig | 1 - arch/m68k/configs/atari_defconfig | 1 - arch/m68k/configs/bvme6000_defconfig | 1 - arch/m68k/configs/hp300_defconfig | 1 - arch/m68k/configs/mac_defconfig | 1 - arch/m68k/configs/multi_defconfig | 1 - arch/m68k/configs/mvme147_defconfig | 1 - arch/m68k/configs/mvme16x_defconfig | 1 - arch/m68k/configs/q40_defconfig | 1 - arch/m68k/configs/sun3_defconfig | 1 - arch/m68k/configs/sun3x_defconfig | 1 - arch/mips/configs/bigsur_defconfig | 1 - arch/mips/configs/decstation_64_defconfig | 1 - arch/mips/configs/decstation_defconfig | 1 - arch/mips/configs/decstation_r4k_defconfig | 1 - arch/mips/configs/ip27_defconfig | 1 - arch/mips/configs/ip30_defconfig | 1 - arch/s390/configs/debug_defconfig | 1 - arch/s390/configs/defconfig | 1 - crypto/Kconfig | 10 - crypto/Makefile | 1 - crypto/tcrypt.c | 4 - crypto/testmgr.c | 6 - crypto/testmgr.h | 153 ------- crypto/vmac.c | 696 ----------------------------- 28 files changed, 892 deletions(-) commit eb680160cfc7f90b6221c7e8e26f83faffd3a82b Author: Md Sadre Alam <quic_mdalam@quicinc.com> Date: Thu Dec 26 17:14:57 2024 +0530 dt-bindings: crypto: qcom,prng: document ipq9574, ipq5424 and ipq5322 Document ipq9574, ipq5424 and ipq5322 compatible for the True Random Number Generator. Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Documentation/devicetree/bindings/crypto/qcom,prng.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 8f904adef62d9bd91dc8952eaf3004b5998cf4da Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Mon Dec 23 08:54:11 2024 +0100 crypto: fips - Use str_enabled_disabled() helper in fips_enable() Remove hard-coded strings by using the str_enabled_disabled() helper function. Use pr_info() instead of printk(KERN_INFO) to silence a checkpatch warning. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> crypto/fips.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 385f186aba3d2f7122b71d6d4c7e236b9d4e8003 Merge: 3fff5da4ca21 aba74e639f8d Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 5 11:48:58 2024 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR (net-6.13-rc6). No conflicts. Adjacent changes: include/linux/if_vlan.h f91a5b808938 ("af_packet: fix vlan_get_protocol_dgram() vs MSG_PEEK") 3f330db30638 ("net: reformat kdoc return statements") Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 5b0417b8bb1bc25bf4d10255ecea9bb8892ac3cb Author: Yassine Oudjana <y.oudjana@protonmail.com> Date: Fri Oct 18 11:10:44 2024 +0300 dt-bindings: mfd: mediatek: mt6397: Add bindings for MT6328 Add compatible strings for the MT6328 PMIC. Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241018081050.23592-3-y.oudjana@protonmail.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml | 1 + Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml | 2 ++ 2 files changed, 3 insertions(+) commit 51ce1cd60d30e599361ebb4f187517c61af17ace Author: Dirk Behme <dirk.behme@de.bosch.com> Date: Tue Oct 29 06:40:41 2024 +0100 docs: dt: unittest: Correct SELFTEST to UNITTEST The Kconfig switch is CONFIG_OF_UNITTEST. Not OF_SELFTEST. Correct this. While at it replace the outdated file list with a link to the directory as proposed by Rob Herring. Cc: Gaurav Minocha <gaurav.minocha.os@gmail.com> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com> Link: https://lore.kernel.org/r/20241029054042.958775-1-dirk.behme@de.bosch.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Documentation/devicetree/of_unittest.rst | 12 +++++------- Documentation/translations/zh_CN/devicetree/of_unittest.rst | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) commit 6acea03f98f5d0028cae1d9d4c60914bfdfb6d27 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Thu Jan 2 16:11:11 2025 -0800 drm/xe: Remove "graphics tile" from kernel doc Avoid using "graphics tile" to refer to GT since it's ambiguous: it's **part** of a tile and there's also "media gt". In several places it's documented as "GT structure", so just follow it. Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250103001111.331684-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_exec_queue_types.h | 2 +- drivers/gpu/drm/xe/xe_gt_stats.c | 4 ++-- drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 12 ++++++------ drivers/gpu/drm/xe/xe_hw_engine_types.h | 2 +- drivers/gpu/drm/xe/xe_hw_fence_types.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) commit 5001ef3af8f2c972d6fd9c5221a8457556f8bea6 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Thu Jan 2 16:11:10 2025 -0800 drm/xe: Fix tlb invalidation when wedging If GuC fails to load, the driver wedges, but in the process it tries to do stuff that may not be initialized yet. This moves the xe_gt_tlb_invalidation_init() to be done earlier: as its own doc says, it's a software-only initialization and should had been named with the _early() suffix. Move it to be called by xe_gt_init_early(), so the locks and seqno are initialized, avoiding a NULL ptr deref when wedging: xe 0000:03:00.0: [drm] *ERROR* GT0: load failed: status: Reset = 0, BootROM = 0x50, UKernel = 0x00, MIA = 0x00, Auth = 0x01 xe 0000:03:00.0: [drm] *ERROR* GT0: firmware signature verification failed xe 0000:03:00.0: [drm] *ERROR* CRITICAL: Xe has declared device 0000:03:00.0 as wedged. ... BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 9 UID: 0 PID: 3908 Comm: modprobe Tainted: G U W 6.13.0-rc4-xe+ #3 Tainted: [U]=USER, [W]=WARN Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-S ADP-S DDR5 UDIMM CRB, BIOS ADLSFWI1.R00.3275.A00.2207010640 07/01/2022 RIP: 0010:xe_gt_tlb_invalidation_reset+0x75/0x110 [xe] This can be easily triggered by poking the GuC binary to force a signature failure. There will still be an extra message, xe 0000:03:00.0: [drm] *ERROR* GT0: GuC mmio request 0x4100: no reply 0x4100 but that's better than a NULL ptr deref. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3956 Fixes: 7dbe8af13c18 ("drm/xe: Wedge the entire device") Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250103001111.331684-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_gt.c | 8 ++++---- drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 4 ++-- drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) commit ab7f44e96791230a9b08e2609557d3a38a4bc247 Merge: 987040d4601e 5c7fb203d0db Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Fri Jan 3 21:18:50 2025 +0100 Merge tag 'renesas-r9a09g047-dt-binding-defs-tag2' into renesas-dts-for-v6.14 Renesas RZ/G3E Pin Control DT Binding Definitions Pin control DT bindings and binding definitions for the Renesas RZ/G3E (R9A09G047) SoC, shared by driver and DT source files. commit 987040d4601e98e32c53837ef76aad115c4966f7 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Mon Dec 16 19:53:16 2024 +0000 arm64: dts: renesas: r9a09g047: Add pincontrol node Add pincontrol node to RZ/G3E ("R9A09G047") SoC DTSI. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/20241216195325.164212-7-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 6e526427fa78439cc8045068d78df1d8cd911213 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Mon Dec 16 19:53:15 2024 +0000 arm64: dts: renesas: r9a09g057h44-rzv2h-evk: Replace RZG2L macros Replace RZG2L_* macros with RZV2H_* macros, so that we can define port names in alpha-numeric. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/20241216195325.164212-6-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> .../boot/dts/renesas/r9a09g057h44-rzv2h-evk.dts | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) commit 482926625cc3a7c7072b821d6c2abdf181b29e7b Merge: acb247afab5b 3e4863d24818 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Fri Jan 3 21:18:10 2025 +0100 Merge tag 'renesas-r9a09g057-dt-binding-defs-tag2' into renesas-dts-for-v6.14 Renesas RZ/V2H Pin Control DT Binding Definitions Pin control DT binding definitions for the Renesas RZ/V2H (R9A09G057) SoC, shared by driver and DT source files. commit 829356da700bbe07e13b4403997bf8c5aac64660 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Mon Dec 16 19:53:14 2024 +0000 pinctrl: renesas: rzg2l: Add support for RZ/G3E SoC Add pinctrl driver support for RZ/G3E SoC. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241216195325.164212-5-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/pinctrl/renesas/Kconfig | 1 + drivers/pinctrl/renesas/pinctrl-rzg2l.c | 173 ++++++++++++++++++++++++++++++++ 2 files changed, 174 insertions(+) commit 75ea9cf9b8acf62fcf877106b2f15ab0ea468376 Merge: 0ce66380a7c7 5c7fb203d0db Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Fri Jan 3 21:09:11 2025 +0100 Merge tag 'renesas-r9a09g047-dt-binding-defs-tag2' into renesas-pinctrl-for-v6.14 Renesas RZ/G3E Pin Control DT Binding Definitions Pin control DT bindings and binding definitions for the Renesas RZ/G3E (R9A09G047) SoC, shared by driver and DT source files. commit 0ce66380a7c7566c91d4a159751d5801280957c1 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Mon Dec 16 19:53:13 2024 +0000 pinctrl: renesas: rzg2l: Update r9a09g057_variable_pin_cfg table Currently r9a09g057_variable_pin_cfg table uses port 11 instead of port PB as mentioned in the hardware manual. Update the r9a09g057_variable_pin_cfg table with alpha-numeric port names to match with the hardware manual. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241216195325.164212-4-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/pinctrl/renesas/pinctrl-rzg2l.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 4180ca622483d6a93462bf0b171cbb3666af67e0 Merge: 03fc60cd8e7b 3e4863d24818 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Fri Jan 3 21:08:55 2025 +0100 Merge tag 'renesas-r9a09g057-dt-binding-defs-tag2' into renesas-pinctrl-for-v6.14 Renesas RZ/V2H Pin Control DT Binding Definitions Pin control DT binding definitions for the Renesas RZ/V2H (R9A09G057) SoC, shared by driver and DT source files. commit 5c7fb203d0dbfbfeed51991a4f98499b245634a7 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Mon Dec 16 19:53:12 2024 +0000 dt-bindings: pinctrl: renesas: Document RZ/G3E SoC Add documentation for the pin controller found on the Renesas RZ/G3E (R9A09G047) SoC. The RZ/G3E PFC is similar to the RZ/V2H SoC but has more pins(P00-PS3). Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241216195325.164212-3-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> .../bindings/pinctrl/renesas,rzg2l-pinctrl.yaml | 7 ++-- .../pinctrl/renesas,r9a09g047-pinctrl.h | 41 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) commit 3e4863d24818a41db42b4f2680715f204657839e Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Mon Dec 16 19:53:11 2024 +0000 dt-bindings: pinctrl: renesas: Add alpha-numerical port support for RZ/V2H RZ/V2H has ports P0-P9 and PA-PB. Add support for defining alpha-numerical ports in DT using RZV2H_* macros. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241216195325.164212-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> .../pinctrl/renesas,r9a09g057-pinctrl.h | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit c2398e6d5f16e15598d3a37e17107fea477e3f91 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Fri Jan 3 09:51:25 2025 +0100 ps3disk: Do not use dev->bounce_size before it is set dev->bounce_size is only initialized after it is used to set the queue limits. Fix this by using BOUNCE_SIZE instead. Fixes: a7f18b74dbe17162 ("ps3disk: pass queue_limits to blk_mq_alloc_disk") Reported-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Closes: https://lore.kernel.org/39256db9-3d73-4e86-a49b-300dfd670212@gmail.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/06988f959ea6885b8bd7fb3b9059dd54bc6bbad7.1735894216.git.geert+renesas@glider.be Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/ps3disk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 457ef47c08d2979f3e59ce66267485c3faed70c8 Author: Yang Erkun <yangerkun@huawei.com> Date: Mon Dec 9 19:04:35 2024 +0800 block: retry call probe after request_module in blk_request_module Set kernel config: CONFIG_BLK_DEV_LOOP=m CONFIG_BLK_DEV_LOOP_MIN_COUNT=0 Do latter: mknod loop0 b 7 0 exec 4<> loop0 Before commit e418de3abcda ("block: switch gendisk lookup to a simple xarray"), lookup_gendisk will first use base_probe to load module loop, and then the retry will call loop_probe to prepare the loop disk. Finally open for this disk will success. However, after this commit, we lose the retry logic, and open will fail with ENXIO. Block device autoloading is deprecated and will be removed soon, but maybe we should keep open success until we really remove it. So, give a retry to fix it. Fixes: e418de3abcda ("block: switch gendisk lookup to a simple xarray") Suggested-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Yang Erkun <yangerkun@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20241209110435.3670985-1-yangerkun@huaweicloud.com Signed-off-by: Jens Axboe <axboe@kernel.dk> block/genhd.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 041d61ad66ea0d88890264e96e8f81437a33a9cf Author: Hermes Wu <hermes.wu@ite.com.tw> Date: Mon Dec 30 18:51:28 2024 +0800 drm/bridge: it6505: add I2C functionality on AUX DisplayPort AUX protocol supports I2C transport which is capable of reading EDID or supports MCCS. In drm_dp_helper, drm_dp_i2c_xfer() packs I2C requests into a sequence of AUX requests. it6505_aux_i2c_operation() is implemented to match drm_dp_i2c_xfer() operactions. it6505_aux_i2c_transfer() adds I2C functionality for it6505_aux_transfer(). Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Hermes Wu <hermes.wu@ite.com.tw> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241230-v7-upstream-v7-10-e0fdd4844703@ite.corp-partner.google.com drivers/gpu/drm/bridge/ite-it6505.c | 177 +++++++++++++++++++++++++++++++++++- 1 file changed, 175 insertions(+), 2 deletions(-) commit 9f9eef9ec1a2b57d95a86fe81df758e8253a7766 Author: Hermes Wu <hermes.wu@ite.com.tw> Date: Mon Dec 30 18:51:27 2024 +0800 drm/bridge: it6505: fix HDCP CTS KSV list wait timer HDCP must disabled encryption and restart authentication after waiting KSV for 5s. The original method uses a counter in a waitting loop that may wait much longer than it is supposed to. Use time_after() for KSV wait timeout. Signed-off-by: Hermes Wu <hermes.wu@ite.com.tw> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241230-v7-upstream-v7-9-e0fdd4844703@ite.corp-partner.google.com drivers/gpu/drm/bridge/ite-it6505.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 0989c02c7a5c887c70afeae80c64d0291624e1a7 Author: Hermes Wu <hermes.wu@ite.com.tw> Date: Mon Dec 30 18:51:26 2024 +0800 drm/bridge: it6505: fix HDCP CTS compare V matching When HDCP negotiation with a repeater device. Checking SHA V' matching must retry 3 times before restarting HDCP. Signed-off-by: Hermes Wu <hermes.wu@ite.com.tw> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241230-v7-upstream-v7-8-e0fdd4844703@ite.corp-partner.google.com drivers/gpu/drm/bridge/ite-it6505.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) commit aa97239300e3f2a9ecbccf7ebfa240860bdddafb Author: Hermes Wu <hermes.wu@ite.com.tw> Date: Mon Dec 30 18:51:25 2024 +0800 drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100. When running the HDCP CTS test with UNIGRAF DPR-100. KSV list must be read from DP_AUX_HDCP_KSV_FIFO in an AUX request, and can not separate with multiple read requests. The AUX operation command "CMD_AUX_GET_KSV_LIST" reads the KSV list with AUX FIFO and is able to read DP_AUX_HDCP_KSV_FIFO in an AUX request. Add it6505_get_ksvlist() which uses CMD_AUX_GET_KSV_LIST operation to read the KSV list. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Hermes Wu <hermes.wu@ite.com.tw> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241230-v7-upstream-v7-7-e0fdd4844703@ite.corp-partner.google.com drivers/gpu/drm/bridge/ite-it6505.c | 48 +++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 12 deletions(-) commit 8c01b0bae2f9e58f2fee0e811cb90d8331986554 Author: Hermes Wu <hermes.wu@ite.com.tw> Date: Mon Dec 30 18:51:24 2024 +0800 drm/bridge: it6505: fix HDCP encryption when R0 ready When starting HDCP authentication, HDCP encryption should be enabled when R0'is checked. Change encryption enables time at R0' ready. The hardware HDCP engine trigger is changed and the repeater KSV fails will restart HDCP. Signed-off-by: Hermes Wu <hermes.wu@ite.com.tw> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241230-v7-upstream-v7-6-e0fdd4844703@ite.corp-partner.google.com drivers/gpu/drm/bridge/ite-it6505.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 0fd2ff47d8c207fa3173661de04bb9e8201c0ad2 Author: Hermes Wu <hermes.wu@ite.com.tw> Date: Mon Dec 30 18:51:23 2024 +0800 drm/bridge: it6505: fix HDCP Bstatus check When HDCP is activated, a DisplayPort source receiving CP_IRQ from the sink shall check Bstatus from DPCD and process the corresponding value Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Hermes Wu <hermes.wu@ite.com.tw> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241230-v7-upstream-v7-5-e0fdd4844703@ite.corp-partner.google.com drivers/gpu/drm/bridge/ite-it6505.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 85597bc0d70c287ba41f17d14d3d857a38a3d727 Author: Hermes Wu <hermes.wu@ite.com.tw> Date: Mon Dec 30 18:51:22 2024 +0800 drm/bridge: it6505: Change definition MAX_HDCP_DOWN_STREAM_COUNT A HDCP source device shall support max downstream to 127 devices. Change definition MAX_HDCP_DOWN_STREAM_COUNT to 127 KSVs shall save for DRM blocked devices check. This results in struct it6505 growth by ~0.5 KiB. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Hermes Wu <hermes.wu@ite.com.tw> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241230-v7-upstream-v7-4-e0fdd4844703@ite.corp-partner.google.com drivers/gpu/drm/bridge/ite-it6505.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 235d9bf8a1e1c0a0cf1340c40567e6b4f2b742c6 Author: Hermes Wu <hermes.wu@ite.com.tw> Date: Mon Dec 30 18:51:21 2024 +0800 drm/bridge: it6505: add AUX operation for HDCP KSV list read HDCP KSV list readback can choose to use AUX FIFO or general data register. For some DisplayPort devices, the KSV list must be read in 5 byte boundaries. The original AUX read command does not support these devices. The AUX command operation control register "REG_AUX_CMD_REQ" uses b[3:0] as AUX operacion control, and b[7:4] are status bits and read only. To change KSV read operation uses "CMD_AUX_NATIVE_READ" from using the data registers to using AUX FIFO. The extended command "CMD_AUX_GET_KSV_LIST" is added as "CMD_AUX_NATIVE_READ" with the 0x10 flag which selects AUX FIFO mode. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Hermes Wu <hermes.wu@ite.com.tw> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241230-v7-upstream-v7-3-e0fdd4844703@ite.corp-partner.google.com drivers/gpu/drm/bridge/ite-it6505.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit d0c97a51cdef2badc8d17f6edfbc0bdc0ba92065 Author: Hermes Wu <hermes.wu@ite.com.tw> Date: Mon Dec 30 18:51:20 2024 +0800 drm/bridge: it6505: improve AUX operation for edid read The original AUX operation using data registers is limited to 4 bytes. The AUX operation command CMD_AUX_I2C_EDID_READ uses AUX FIFO and is capable of reading 16 bytes. This improves the speed of EDID read. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Hermes Wu <hermes.wu@ite.com.tw> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241230-v7-upstream-v7-2-e0fdd4844703@ite.corp-partner.google.com drivers/gpu/drm/bridge/ite-it6505.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit c14870218c14532b0f0a7805b96a4d3c92d06fb2 Author: Hermes Wu <hermes.wu@ite.com.tw> Date: Mon Dec 30 18:51:19 2024 +0800 drm/bridge: it6505: Change definition of AUX_FIFO_MAX_SIZE The hardware AUX FIFO is 16 bytes Change definition of AUX_FIFO_MAX_SIZE to 16 Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Hermes Wu <hermes.wu@ite.com.tw> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241230-v7-upstream-v7-1-e0fdd4844703@ite.corp-partner.google.com drivers/gpu/drm/bridge/ite-it6505.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96ea081ed52bf077cad6d00153b6fba68e510767 Author: Martin KaFai Lau <martin.lau@kernel.org> Date: Fri Dec 20 12:18:18 2024 -0800 bpf: Reject struct_ops registration that uses module ptr and the module btf_id is missing There is a UAF report in the bpf_struct_ops when CONFIG_MODULES=n. In particular, the report is on tcp_congestion_ops that has a "struct module *owner" member. For struct_ops that has a "struct module *owner" member, it can be extended either by the regular kernel module or by the bpf_struct_ops. bpf_try_module_get() will be used to do the refcounting and different refcount is done based on the owner pointer. When CONFIG_MODULES=n, the btf_id of the "struct module" is missing: WARN: resolve_btfids: unresolved symbol module Thus, the bpf_try_module_get() cannot do the correct refcounting. Not all subsystem's struct_ops requires the "struct module *owner" member. e.g. the recent sched_ext_ops. This patch is to disable bpf_struct_ops registration if the struct_ops has the "struct module *" member and the "struct module" btf_id is missing. The btf_type_is_fwd() helper is moved to the btf.h header file for this test. This has happened since the beginning of bpf_struct_ops which has gone through many changes. The Fixes tag is set to a recent commit that this patch can apply cleanly. Considering CONFIG_MODULES=n is not common and the age of the issue, targeting for bpf-next also. Fixes: 1611603537a4 ("bpf: Create argument information for nullable arguments.") Reported-by: Robert Morris <rtm@csail.mit.edu> Closes: https://lore.kernel.org/bpf/74665.1733669976@localhost/ Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Tested-by: Eduard Zingerman <eddyz87@gmail.com> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/r/20241220201818.127152-1-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org> include/linux/btf.h | 5 +++++ kernel/bpf/bpf_struct_ops.c | 21 +++++++++++++++++++++ kernel/bpf/btf.c | 5 ----- 3 files changed, 26 insertions(+), 5 deletions(-) commit d35fb3121a36170bba951c529847a630440e4174 Author: Yazen Ghannam <yazen.ghannam@amd.com> Date: Fri Dec 6 16:11:54 2024 +0000 x86/mce/amd: Remove shared threshold bank plumbing Legacy AMD systems include an integrated Northbridge that is represented by MCA bank 4. This is the only non-core MCA bank in legacy systems. The Northbridge is physically shared by all the CPUs within an AMD "Node". However, in practice the "shared" MCA bank can only by managed by a single CPU within that AMD Node. This is known as the "Node Base Core" (NBC). For example, only the NBC will be able to read the MCA bank 4 registers; they will be Read-as-Zero for other CPUs. Also, the MCA Thresholding interrupt will only signal the NBC; the other CPUs will not receive it. This is enforced by hardware, and it should not be managed by software. The current AMD Thresholding code attempts to deal with the "shared" MCA bank by micromanaging the bank's sysfs kobjects. However, this does not follow the intended kobject use cases. It is also fragile, and it has caused bugs in the past. Modern AMD systems do not need this shared MCA bank support, and it should not be needed on legacy systems either. Remove the shared threshold bank code. Also, move the threshold struct definitions to mce/amd.c, since they are no longer needed in amd_nb.c. Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241206161210.163701-2-yazen.ghannam@amd.com arch/x86/Kconfig | 2 +- arch/x86/include/asm/amd_nb.h | 31 ----------- arch/x86/kernel/cpu/mce/amd.c | 127 +++++++++--------------------------------- 3 files changed, 27 insertions(+), 133 deletions(-) commit 2a51c327d4a4a2eb62d67f4ea13a17efd0f25c5c Author: Bui Quang Minh <minhquangbui99@gmail.com> Date: Fri Jan 3 22:04:11 2025 +0700 io_uring/rsrc: simplify the bvec iter count calculation As we don't use iov_iter_advance() but our own logic in io_import_fixed(), we can remove the logic that over-sets the iter's count to len + offset then adjusts it later to len. This helps to make the code cleaner. Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com> Link: https://lore.kernel.org/r/20250103150412.12549-1-minhquangbui99@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/rsrc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5d95e3c154e14385ca69ff7a41b297b61e75c364 Author: Rob Herring (Arm) <robh@kernel.org> Date: Mon Nov 4 13:06:35 2024 -0600 drm: 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) <robh@kernel.org> Reviewed-by: Dragan Simic <dsimic@manjaro.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104190636.274926-1-robh@kernel.org Signed-off-by: Rob Herring <robh@kernel.org> drivers/gpu/drm/bridge/ite-it66121.c | 2 +- drivers/gpu/drm/bridge/sii902x.c | 2 +- drivers/gpu/drm/drm_panel.c | 2 +- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit fd604ae6c261c5a56bb977ae99f875bbd7264a3f Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Jan 2 08:12:04 2025 -0600 cpufreq/amd-pstate: Fix prefcore rankings commit 50a062a76200 ("cpufreq/amd-pstate: Store the boost numerator as highest perf again") updated the value stored for highest perf to no longer store the highest perf value but instead the boost numerator. This is a fixed value for systems with preferred cores and not appropriate for use ITMT rankings. Update the value used for ITMT rankings to be the preferred core ranking. Reported-and-tested-by: Sebastian <sobrus@gmail.com> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219640 Fixes: 50a062a76200 ("cpufreq/amd-pstate: Store the boost numerator as highest perf again") Reviewed-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com> Link: https://lore.kernel.org/r/20250102141204.3413202-1-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7687c66c18c66d4ccd9949c6f641c0e7b5773483 Author: Brian Norris <briannorris@chromium.org> Date: Fri Dec 13 10:08:23 2024 -0800 kunit: platform: Resolve 'struct completion' warning If the <kunit/platform_device.h> header is included in a test without certain other headers, it produces compiler warnings like: In file included from [...] ../include/kunit/platform_device.h:15:57: warning: ‘struct completion’ declared inside parameter list will not be visible outside of this definition or declaration 15 | struct completion *x); | ^~~~~~~~~~ Add a 'struct completion' forward declaration to resolve this. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412241958.dbAImJsA-lkp@intel.com/ Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-by: David Gow <davidgow@google.com> Link: https://lore.kernel.org/r/20241213180841.3023843-1-briannorris@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> include/kunit/platform_device.h | 1 + 1 file changed, 1 insertion(+) commit 866e43b945bf98f8e807dfa45eca92f931f3a032 Author: Rob Clark <robdclark@chromium.org> Date: Mon Dec 30 08:00:33 2024 -0800 drm/msm: UAPI error reporting Debugging incorrect UAPI usage tends to be a bit painful, so add a helper macro to make it easier to add debug logging which can be enabled at runtime via drm.debug. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/630578/ drivers/gpu/drm/msm/adreno/adreno_gpu.c | 21 +++++------ drivers/gpu/drm/msm/msm_drv.c | 2 +- drivers/gpu/drm/msm/msm_drv.h | 7 ++++ drivers/gpu/drm/msm/msm_gem_submit.c | 64 ++++++++++++++------------------- drivers/gpu/drm/msm/msm_submitqueue.c | 2 +- 5 files changed, 47 insertions(+), 49 deletions(-) commit 19dbdbfb747ad7afed88dc7661697744ce192d3b Author: Colin Ian King <colin.i.king@gmail.com> Date: Tue Nov 12 18:22:18 2024 +0000 drm/msm/a5xx: remove null pointer check on pdev The call chain on a5xx_gpu_init is such that pdev is not going to be null, so the null check on pdev can be removed. This also cleans up a static analysis warning where pdev is dereferenced before the null check which cannot actually occur. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/624180/ Signed-off-by: Rob Clark <robdclark@chromium.org> drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 5 ----- 1 file changed, 5 deletions(-) commit 3a47f4b439beb98e955d501c609dfd12b7836d61 Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Fri Nov 15 17:50:08 2024 +0300 drm/msm/gem: prevent integer overflow in msm_ioctl_gem_submit() The "submit->cmd[i].size" and "submit->cmd[i].offset" variables are u32 values that come from the user via the submit_lookup_cmds() function. This addition could lead to an integer wrapping bug so use size_add() to prevent that. Fixes: 198725337ef1 ("drm/msm: fix cmdstream size check") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/624696/ Signed-off-by: Rob Clark <robdclark@chromium.org> drivers/gpu/drm/msm/msm_gem_submit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7a637e5e27a68fd52327a80136d5d0184c43888f Author: Danylo Piliaiev <danylo.piliaiev@gmail.com> Date: Tue Dec 3 10:59:20 2024 +0100 drm/msm: Expose uche trap base via uapi This adds MSM_PARAM_UCHE_TRAP_BASE that will be used by Mesa implementation for VK_KHR_shader_clock and GL_ARB_shader_clock. Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Patchwork: https://patchwork.freedesktop.org/patch/627036/ Signed-off-by: Rob Clark <robdclark@chromium.org> drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 6 ++++-- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 10 ++++++---- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 12 +++++++----- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 +++ drivers/gpu/drm/msm/adreno/adreno_gpu.h | 2 ++ include/uapi/drm/msm_drm.h | 1 + 6 files changed, 23 insertions(+), 11 deletions(-) commit 855e9d0fbb0aa1150d350b7185d840edd85dfb0e Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Tue Dec 17 15:51:18 2024 +0100 drm/msm: adreno: enable GMU bandwidth for A740 and A750 Now all the DDR bandwidth voting via the GPU Management Unit (GMU) is in place, declare the Bus Control Modules (BCMs) and the corresponding parameters in the GPU info struct. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629401/ Signed-off-by: Rob Clark <robdclark@chromium.org> drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 7047e655a5679250fce9d8afac3f87c0bb4af621 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Tue Dec 17 15:51:17 2024 +0100 drm/msm: adreno: find bandwidth index of OPP and set it along freq index The Adreno GPU Management Unit (GMU) can also scale the DDR Bandwidth along the Frequency and Power Domain level, until now we left the OPP core scale the OPP bandwidth via the interconnect path. In order to enable bandwidth voting via the GPU Management Unit (GMU), when an opp is set by devfreq we also look for the corresponding bandwidth index in the previously generated bw_table and pass this value along the frequency index to the GMU. The GMU also takes another vote called AB which is a 16bit quantized value of the floor bandwidth against the maximum supported bandwidth. The AB is calculated with a default 25% of the bandwidth like the downstream implementation too inform the GMU firmware the minimal quantity of bandwidth we require for this OPP. Only pass the AB vote starting from A750 GPUs. Since we now vote for all resources via the GMU, setting the OPP is no more needed, so we can completely skip calling dev_pm_opp_set_opp() in this situation. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/629397/ Signed-off-by: Rob Clark <robdclark@chromium.org> drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 39 +++++++++++++++++++++++++++++++-- drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 2 +- drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 6 ++--- drivers/gpu/drm/msm/adreno/a6xx_hfi.h | 5 +++++ drivers/gpu/drm/msm/adreno/adreno_gpu.h | 5 +++++ 5 files changed, 51 insertions(+), 6 deletions(-) commit 8c1b9451d96b972d0c3b5a5df777dc21bf191b36 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Tue Dec 17 15:51:16 2024 +0100 drm/msm: adreno: dynamically generate GMU bw table The Adreno GPU Management Unit (GMU) can also scale the ddr bandwidth along the frequency and power domain level, but for now we statically fill the bw_table with values from the downstream driver. Only the first entry is used, which is a disable vote, so we currently rely on scaling via the linux interconnect paths. Let's dynamically generate the bw_table with the vote values previously calculated from the OPPs. Those entries will then be used by the GMU when passing the appropriate bandwidth level while voting for a gpu frequency. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/629396/ Signed-off-by: Rob Clark <robdclark@chromium.org> drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 48 ++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) commit ff4a7f6bff527491b8a937ae4633b7066ce301f2 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Tue Dec 17 15:51:15 2024 +0100 drm/msm: adreno: add plumbing to generate bandwidth vote table for GMU The Adreno GPU Management Unit (GMU) can also scale DDR Bandwidth along the Frequency and Power Domain level, but by default we leave the OPP core scale the interconnect ddr path. While scaling via the interconnect path was sufficient, newer GPUs like the A750 requires specific vote paremeters and bandwidth to achieve full functionality. In order to calculate vote values used by the GPU Management Unit (GMU), we need to parse all the possible OPP Bandwidths and create a vote value to be sent to the appropriate Bus Control Modules (BCMs) declared in the GPU info struct. This vote value is called IB, while on the other side the GMU also takes another vote called AB which is a 16bit quantized value of the floor bandwidth against the maximum supported bandwidth. The AB vote will be calculated later when setting the frequency. The vote array will then be used to dynamically generate the GMU bw_table sent during the GMU power-up. Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/629395/ Signed-off-by: Rob Clark <robdclark@chromium.org> drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 147 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 13 +++ drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 1 + 3 files changed, 161 insertions(+) commit 5b0619539c109325cdc516a2c1aded57262ec51b Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Tue Dec 17 15:51:14 2024 +0100 drm/msm: adreno: add defines for gpu & gmu frequency table sizes Even if the code uses ARRAY_SIZE() to fill those tables, it's still a best practice to not use magic values for tables in structs. Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629393/ Signed-off-by: Rob Clark <robdclark@chromium.org> drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 280807dd46920c560bce7cf3dd80f3ed375b75cf Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Thu Dec 19 23:36:56 2024 +0100 drm/msm/a6xx: Print GMU core firmware version at boot Log the version for informational purposes, such as for keeping track of possible GMU fw-related failures in crash / CI logs. Intentionally not implemented on the if (gmu->legacy) codepath, as these registers seem not to be used on there. Downstream additionally warns if the firmware version is too old for a given GPU, but we already pair the binary to a given GPU, so let's not go there at the moment. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/629934/ Signed-off-by: Rob Clark <robdclark@chromium.org> drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bb5acdeae4088297444db1a197f0c66908ba2e56 Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Thu Dec 19 23:36:55 2024 +0100 drm/msm: registers: Add GMU FW version register Add a register that contains the GMU core firmware version on non- legacy (non-sdm845-family) SoCs. The name is guesstimated based on what it does downstream, but it'll do. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/629932/ Signed-off-by: Rob Clark <robdclark@chromium.org> drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml | 5 +++++ 1 file changed, 5 insertions(+) commit 4785ed362a24d4f37ee0eb4403f587fee886f8da Author: Mimi Zohar <zohar@linux.ibm.com> Date: Fri Dec 27 08:28:32 2024 -0500 ima: ignore suffixed policy rule comments Lines beginning with '#' in the IMA policy are comments and are ignored. Instead of placing the rule and comment on separate lines, allow the comment to be suffixed to the IMA policy rule. Reviewed-by: Petr Vorel <pvorel@suse.cz> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com> security/integrity/ima/ima_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7eef7c8bac9a31f12ae19369582bc25971bc8fe1 Author: Mimi Zohar <zohar@linux.ibm.com> Date: Thu Dec 26 21:27:42 2024 -0500 ima: limit the builtin 'tcb' dont_measure tmpfs policy rule With a custom policy similar to the builtin IMA 'tcb' policy [1], arch specific policy, and a kexec boot command line measurement policy rule, the kexec boot command line is not measured due to the dont_measure tmpfs rule. Limit the builtin 'tcb' dont_measure tmpfs policy rule to just the "func=FILE_CHECK" hook. Depending on the end users security threat model, a custom policy might not even include this dont_measure tmpfs rule. Note: as a result of this policy rule change, other measurements might also be included in the IMA-measurement list that previously weren't included. [1] https://ima-doc.readthedocs.io/en/latest/ima-policy.html#ima-tcb Reviewed-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com> security/integrity/ima/ima_policy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c5fb51b71788926feef0d07f30c8af1d5e4af1a6 Merge: a5463629299b b44b9bc7cab2 Author: Rob Clark <robdclark@chromium.org> Date: Fri Jan 3 07:13:45 2025 -0800 Merge remote-tracking branch 'pm/opp/linux-next' into HEAD Merge pm/opp tree to get dev_pm_opp_get_bw() Signed-off-by: Rob Clark <robdclark@chromium.org> commit 0094014be0cd75273ef7f2934c17fb8cffd4db6e Author: Alan Song <syfmark114@163.com> Date: Mon Dec 30 14:57:06 2024 +0800 x86/ioapic: Remove a stray tab in the IO-APIC type string The type "physic al" should be "physical". [ bp: Massage commit message. ] Fixes: 54cd3795b471 ("x86/ioapic: Cleanup guarded debug printk()s") Signed-off-by: Alan Song <syfmark114@163.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241230065706.16789-1-syfmark114@163.com arch/x86/kernel/apic/io_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 600c8f24319cebe671a70722df99b8006daebe21 Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Date: Wed Nov 20 08:35:40 2024 -0800 tools/power/x86/intel-speed-select: v1.21 release This version has one fix: - Fix restoring TRL after SST-TF disable Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> tools/power/x86/intel-speed-select/isst-config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 991c8aacfb6e3088027b8c776ad31d2c093905b8 Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Date: Wed Nov 20 08:26:15 2024 -0800 tools/power/x86/intel-speed-select: Fix TRL restore after SST-TF disable When SST-TF is disabled, the TRL (Turbo Ratio Limit) of config level 0 is getting restored. But the TRL of current level should be restored which may not be config level 0. This is caused by a bug in treating config level as TRL level. So arguments needs to be swapped. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> tools/power/x86/intel-speed-select/isst-core-tpmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28876859288d85c15079641b7c96b5f4077a2ff6 Author: Heiko Stuebner <heiko@sntech.de> Date: Thu Nov 7 12:47:12 2024 +0100 arm64: dts: rockchip: set hdd led labels on QNAP-TS433 The automatically generated names for the LEDs from color and function do not match nicely for the 4 hdds, so set them manually per the label property to also match the LEDs generated from the MCU. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20241107114712.538976-10-heiko@sntech.de arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts | 4 ++++ 1 file changed, 4 insertions(+) commit e09a1f000f613bca2b609105b1e679e6e6369fbe Author: Heiko Stuebner <heiko@sntech.de> Date: Thu Nov 7 12:47:11 2024 +0100 arm64: dts: rockchip: hook up the MCU on the QNAP TS433 The MCU is an important part of the device functionality. It provides functionality like fan-control, more leds, etc and even more important without it, the NAS-device cannot even fully turned off. Hook up the serial device to its uart and hook into the thermal management to control the fan according to the cpu temperature. While the MCU also provides a temperature sensor for the case, this one is just polled and does not provide functionality for handling trip points in hardware, so a lot of polling would be involved. As the cpu is only cooled passively in these devices, it's temperature rising will indicate the temperature level of the system just earlier. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20241107114712.538976-9-heiko@sntech.de arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 26c100232b09ced0857306ac9831a4fa9c9aa231 Author: Jonas Karlman <jonas@kwiboo.se> Date: Tue Nov 19 23:08:36 2024 +0000 arm64: dts: rockchip: Fix sdmmc access on rk3308-rock-s0 v1.1 boards BootROM leave GPIO4_D6 configured as SDMMC_PWREN function and DW MCI driver set PRWEN high on MMC_POWER_UP and low on MMC_POWER_OFF. Similarly U-Boot also set PRWEN high before accessing mmc. However, HW revision prior to v1.2 must pull GPIO4_D6 low to access sdmmc. For HW revision v1.2 the state of GPIO4_D6 has no impact. Model an always-on active low fixed regulator using GPIO4_D6 to fix use of sdmmc on older HW revisions of the board. Fixes: adeb5d2a4ba4 ("arm64: dts: rockchip: Add Radxa ROCK S0") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Link: https://lore.kernel.org/r/20241119230838.4137130-1-jonas@kwiboo.se Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 3cfe39b3a845593a485ab1c716615979004ef9f6 Author: Heiner Kallweit <hkallweit1@gmail.com> Date: Fri Nov 1 23:11:39 2024 +0100 i2c: Replace list-based mechanism for handling userspace-created clients Similar to the list of auto-detected clients, we can also replace the list of userspace-created clients with flagging such client devices. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> [wsa: fixed description of the new flag; reordered new code in 'device_store' to have single exit point; fixed whitespace errors; folded cleanup patch into this one] Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> drivers/i2c/i2c-core-base.c | 61 ++++++++++++++++----------------------------- include/linux/i2c.h | 7 +----- 2 files changed, 23 insertions(+), 45 deletions(-) commit 56a50667cbcfaf95eea9128d5676af94e54b51a8 Author: Heiner Kallweit <hkallweit1@gmail.com> Date: Fri Nov 1 23:09:51 2024 +0100 i2c: Replace list-based mechanism for handling auto-detected clients So far a list is used to track auto-detected clients per driver. The same functionality can be achieved much simpler by flagging auto-detected clients. Two notes regarding the usage of driver_for_each_device: In our case it can't fail, however the function is annotated __must_check. So a little workaround is needed to avoid a compiler warning. Then we may remove nodes from the list over which we iterate. This is safe, see the explanation at the beginning of lib/klist.c. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> [wsa: fixed description of the new flag] Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> drivers/i2c/i2c-core-base.c | 52 ++++++++++++++------------------------------- include/linux/i2c.h | 3 +-- 2 files changed, 17 insertions(+), 38 deletions(-) commit 60be800603ff81d43b2fbb3c067bbef49f7d8414 Author: Heiner Kallweit <hkallweit1@gmail.com> Date: Fri Nov 1 23:07:14 2024 +0100 ALSA: ppc: Remove i2c client removal hack The i2c_driver.clients list is internal to I2C core and is going to be removed. No driver should access it. Unregister the i2c client explicitly before deleting the i2c driver. Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> sound/ppc/keywest.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 3fff5da4ca2164bb4d0f1e6cd33f6eb8a0e73e50 Author: Octavian Purdila <tavip@google.com> Date: Mon Dec 30 12:56:47 2024 -0800 team: prevent adding a device which is already a team device lower Prevent adding a device which is already a team device lower, e.g. adding veth0 if vlan1 was already added and veth0 is a lower of vlan1. This is not useful in practice and can lead to recursive locking: $ ip link add veth0 type veth peer name veth1 $ ip link set veth0 up $ ip link set veth1 up $ ip link add link veth0 name veth0.1 type vlan protocol 802.1Q id 1 $ ip link add team0 type team $ ip link set veth0.1 down $ ip link set veth0.1 master team0 team0: Port device veth0.1 added $ ip link set veth0 down $ ip link set veth0 master team0 ============================================ WARNING: possible recursive locking detected 6.13.0-rc2-virtme-00441-ga14a429069bb #46 Not tainted -------------------------------------------- ip/7684 is trying to acquire lock: ffff888016848e00 (team->team_lock_key){+.+.}-{4:4}, at: team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973) but task is already holding lock: ffff888016848e00 (team->team_lock_key){+.+.}-{4:4}, at: team_add_slave (drivers/net/team/team_core.c:1147 drivers/net/team/team_core.c:1977) other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(team->team_lock_key); lock(team->team_lock_key); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by ip/7684: stack backtrace: CPU: 3 UID: 0 PID: 7684 Comm: ip Not tainted 6.13.0-rc2-virtme-00441-ga14a429069bb #46 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: <TASK> dump_stack_lvl (lib/dump_stack.c:122) print_deadlock_bug.cold (kernel/locking/lockdep.c:3040) __lock_acquire (kernel/locking/lockdep.c:3893 kernel/locking/lockdep.c:5226) ? netlink_broadcast_filtered (net/netlink/af_netlink.c:1548) lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5851) ? team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973) ? trace_lock_acquire (./include/trace/events/lock.h:24 (discriminator 2)) ? team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973) ? lock_acquire (kernel/locking/lockdep.c:5822) ? team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973) __mutex_lock (kernel/locking/mutex.c:587 kernel/locking/mutex.c:735) ? team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973) ? team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973) ? fib_sync_up (net/ipv4/fib_semantics.c:2167) ? team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973) team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973) notifier_call_chain (kernel/notifier.c:85) call_netdevice_notifiers_info (net/core/dev.c:1996) __dev_notify_flags (net/core/dev.c:8993) ? __dev_change_flags (net/core/dev.c:8975) dev_change_flags (net/core/dev.c:9027) vlan_device_event (net/8021q/vlan.c:85 net/8021q/vlan.c:470) ? br_device_event (net/bridge/br.c:143) notifier_call_chain (kernel/notifier.c:85) call_netdevice_notifiers_info (net/core/dev.c:1996) dev_open (net/core/dev.c:1519 net/core/dev.c:1505) team_add_slave (drivers/net/team/team_core.c:1219 drivers/net/team/team_core.c:1977) ? __pfx_team_add_slave (drivers/net/team/team_core.c:1972) do_set_master (net/core/rtnetlink.c:2917) do_setlink.isra.0 (net/core/rtnetlink.c:3117) Reported-by: syzbot+3c47b5843403a45aef57@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=3c47b5843403a45aef57 Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device") Signed-off-by: Octavian Purdila <tavip@google.com> Reviewed-by: Hangbin Liu <liuhangbin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/team/team_core.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 0ab6ea261c1fe4edbf4d99dfe65d8ebaae905092 Author: Baihan Li <libaihan@huawei.com> Date: Fri Jan 3 17:38:24 2025 +0800 drm/hisilicon/hibmc: add dp module in hibmc To support DP interface displaying in hibmc driver. Add a encoder and connector for DP modual. The HPD function and get_edid function will be add in next series, so temporarily using 1024x768 as default in hibmc_dp_connector_get_modes() Signed-off-by: Baihan Li <libaihan@huawei.com> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Tian Tao <tiantao6@hisilicon.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250103093824.1963816-6-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/hisilicon/hibmc/Makefile | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c | 118 ++++++++++++++++++++++++ drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 14 +++ drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 5 + 4 files changed, 138 insertions(+), 1 deletion(-) commit 587013d72c1a217ced9f42a9a08c8013052cabfc Author: Baihan Li <libaihan@huawei.com> Date: Fri Jan 3 17:38:23 2025 +0800 drm/hisilicon/hibmc: refactored struct hibmc_drm_private Refactored struct hibmc_drm_private to separate VGA module from generic struct. Signed-off-by: Baihan Li <libaihan@huawei.com> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Tian Tao <tiantao6@hisilicon.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250103093824.1963816-5-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 16 ++++----- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c | 41 ++++++++++++------------ drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 20 ++++++------ 3 files changed, 38 insertions(+), 39 deletions(-) commit 94ee73ee30208f3d92b2f2a4f7d3346ba56245bf Author: Baihan Li <libaihan@huawei.com> Date: Fri Jan 3 17:38:22 2025 +0800 drm/hisilicon/hibmc: add dp hw moduel in hibmc driver Build a dp level that hibmc driver can enable dp by calling their functions. Signed-off-by: Baihan Li <libaihan@huawei.com> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Tian Tao <tiantao6@hisilicon.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250103093824.1963816-4-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/hisilicon/hibmc/Makefile | 2 +- drivers/gpu/drm/hisilicon/hibmc/dp/dp_config.h | 19 +++ drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c | 220 +++++++++++++++++++++++++ drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h | 28 ++++ drivers/gpu/drm/hisilicon/hibmc/dp/dp_reg.h | 41 +++++ 5 files changed, 309 insertions(+), 1 deletion(-) commit 54063d86e0369f53f180137e5e889bc19cd9015b Author: Baihan Li <libaihan@huawei.com> Date: Fri Jan 3 17:38:21 2025 +0800 drm/hisilicon/hibmc: add dp link moduel in hibmc drivers Add link training process functions in this moduel. Signed-off-by: Baihan Li <libaihan@huawei.com> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Tian Tao <tiantao6@hisilicon.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250103093824.1963816-3-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/hisilicon/hibmc/Makefile | 2 +- drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h | 21 ++ drivers/gpu/drm/hisilicon/hibmc/dp/dp_link.c | 332 +++++++++++++++++++++++++++ drivers/gpu/drm/hisilicon/hibmc/dp/dp_reg.h | 8 + 4 files changed, 362 insertions(+), 1 deletion(-) commit 057e77972556aed4a0f1eed7eeb85024d0a22ba1 Author: Baihan Li <libaihan@huawei.com> Date: Fri Jan 3 17:38:20 2025 +0800 drm/hisilicon/hibmc: add dp aux in hibmc drivers Add dp aux read/write functions. They are basic functions and will be used later. Signed-off-by: Baihan Li <libaihan@huawei.com> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Tian Tao <tiantao6@hisilicon.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250103093824.1963816-2-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/hisilicon/hibmc/Makefile | 3 +- drivers/gpu/drm/hisilicon/hibmc/dp/dp_aux.c | 164 +++++++++++++++++++++++++++ drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h | 42 +++++++ drivers/gpu/drm/hisilicon/hibmc/dp/dp_reg.h | 27 +++++ 4 files changed, 235 insertions(+), 1 deletion(-) commit 60a43ecbd59decb77b31c09a73f09e1d4f4d1c4c Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Dec 30 16:14:45 2024 +0200 drm/i915/ddi: only call shutdown hooks for valid encoders DDI might be HDMI or DP only, leaving the other encoder uninitialized. Calling the shutdown hook on an uninitialized encoder may lead to a NULL pointer dereference. Check the encoder types (and thus validity via the DP output_reg or HDMI hdmi_reg checks) before calling the hooks. Reported-and-tested-by: Sergey Senozhatsky <senozhatsky@chromium.org> Closes: https://lore.kernel.org/r/20241031105145.2140590-1-senozhatsky@chromium.org Cc: Sergey Senozhatsky <senozhatsky@chromium.org> Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/8b197c50e7f3be2bbc07e3935b21e919815015d5.1735568047.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_ddi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit efa43b751637c0e16a92e1787f1d8baaf56dafba Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Dec 30 16:14:44 2024 +0200 drm/i915/display: add intel_encoder_is_hdmi() Similar to intel_encoder_is_dp() and friends. Cc: Sergey Senozhatsky <senozhatsky@chromium.org> Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Tested-by: Sergey Senozhatsky <senozhatsky@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/e6bf9e01deb5d0d8b566af128a762d1313638847.1735568047.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_display_types.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 8ea07e294ea2d046e16fa98e37007edcd4b9525d Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Dec 30 16:14:43 2024 +0200 drm/i915/ddi: gracefully handle errors from intel_ddi_init_hdmi_connector() Errors from intel_ddi_init_hdmi_connector() can just mean "there's no HDMI" while we'll still want to continue with DP only. Handle the errors gracefully, but don't propagate. Clear the hdmi_reg which is used as a proxy to indicate the HDMI is initialized. v2: Gracefully handle but do not propagate Cc: Sergey Senozhatsky <senozhatsky@chromium.org> Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Reported-and-tested-by: Sergey Senozhatsky <senozhatsky@chromium.org> Closes: https://lore.kernel.org/r/20241031105145.2140590-1-senozhatsky@chromium.org Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> # v1 Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/d72cb54ac7cc5ca29b3b9d70e4d368ea41643b08.1735568047.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_ddi.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 7603ba81225c815d2ceb4ad52f13e8df4b9d03cc Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Dec 30 16:14:42 2024 +0200 drm/i915/hdmi: add error handling in g4x_hdmi_init() Handle encoder and connector init failures in g4x_hdmi_init(). This is similar to g4x_dp_init(). Cc: Sergey Senozhatsky <senozhatsky@chromium.org> Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Reported-and-tested-by: Sergey Senozhatsky <senozhatsky@chromium.org> Closes: https://lore.kernel.org/r/20241031105145.2140590-1-senozhatsky@chromium.org Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/cafae7bf1f9ffb8f6a1d7a508cd2ce7dcf06fef7.1735568047.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/g4x_hdmi.c | 35 ++++++++++++++++++++++----------- drivers/gpu/drm/i915/display/g4x_hdmi.h | 5 +++-- 2 files changed, 26 insertions(+), 14 deletions(-) commit 7fb56536fa37e23bc291d31c10e575d500f4fda7 Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Dec 30 16:14:41 2024 +0200 drm/i915/hdmi: propagate errors from intel_hdmi_init_connector() Propagate errors from intel_hdmi_init_connector() to be able to handle them at callers. This is similar to intel_dp_init_connector(). Cc: Sergey Senozhatsky <senozhatsky@chromium.org> Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Reported-and-tested-by: Sergey Senozhatsky <senozhatsky@chromium.org> Closes: https://lore.kernel.org/r/20241031105145.2140590-1-senozhatsky@chromium.org Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/cdaf9e32cc4880c46e120933438c37b4d87be12e.1735568047.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_hdmi.c | 10 ++++++---- drivers/gpu/drm/i915/display/intel_hdmi.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) commit e1980a977686d46dbf45687f7750f1c50d1d6cf8 Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Dec 30 16:14:40 2024 +0200 drm/i915/ddi: change intel_ddi_init_{dp, hdmi}_connector() return type The caller doesn't actually need the returned struct intel_connector; it's stored in the ->attached_connector of intel_dp and intel_hdmi. Switch to returning an int with 0 for success and negative errors codes to be able to indicate success even when we don't have a connector. Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Tested-by: Sergey Senozhatsky <senozhatsky@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/8ef7fe838231919e85eaead640c51ad3e4550d27.1735568047.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_ddi.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit cf7da549cf7235ea6c5b29cc547a05dbdeb3ef08 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Tue Dec 24 21:05:11 2024 +0800 usb: typec: class: Remove both cable_match() and partner_match() cable_match(), as matching function of device_find_child(), matches a device with device type @typec_cable_dev_type, and its task can be simplified by the recently introduced API device_match_type(). partner_match() is similar with cable_match() but with a different device type @typec_partner_dev_type. Remove both functions and use the API plus respective device type instead. Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-12-6623037414d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/class.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit 6a6fef929d2828ad2e5e5b03b369eb07c19c61a6 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Tue Dec 24 21:05:10 2024 +0800 cxl/pmem: Remove is_cxl_nvdimm_bridge() Remove is_cxl_nvdimm_bridge() which has no caller now. Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-11-6623037414d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/cxl/core/pmem.c | 6 ------ drivers/cxl/cxl.h | 1 - 2 files changed, 7 deletions(-) commit 98d4a843437401429fea1c1957d5cce242f5e4c4 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Tue Dec 24 21:05:09 2024 +0800 cxl/pmem: Replace match_nvdimm_bridge() with API device_match_type() Static match_nvdimm_bridge(), as matching function of device_find_child() matches a device with device type @cxl_nvdimm_bridge_type, and its task can be simplified by the recently introduced API device_match_type(). Replace match_nvdimm_bridge() usage with device_match_type(). Reviewed-by: Alison Schofield <alison.schofield@intel.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-10-6623037414d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/cxl/core/pmem.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit adf908c965798c33d1148393927a7c0c5d08053c Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Tue Dec 24 21:05:08 2024 +0800 driver core: Introduce an device matching API device_match_type() Introduce device_match_type() for purposes below: - Test if a device matches with a specified device type. - As argument of various device finding APIs to find a device with specified type. device_find_child() will use it to simplify operations later. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-9-6623037414d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/core.c | 6 ++++++ include/linux/device/bus.h | 1 + 2 files changed, 7 insertions(+) commit 6687f282e98b2236cad827fc7dba7393b7ef57f1 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Tue Dec 24 21:05:07 2024 +0800 gpio: sim: Remove gpio_sim_dev_match_fwnode() gpio_sim_dev_match_fwnode() is a simple wrapper of API device_match_fwnode(). Remove the needless wrapper and use the API instead. Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-8-6623037414d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/gpio/gpio-sim.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 989e2b3569bf7eed912144ba86aab003c6cf858c Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Tue Dec 24 21:05:06 2024 +0800 slimbus: core: Remove of_slim_match_dev() static of_slim_match_dev() has same function as API device_match_of_node(). Remove the former and use the later instead. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-7-6623037414d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/slimbus/core.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 6890fdc856014d731708d684a7c6f9dafec17d60 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Tue Dec 24 21:05:05 2024 +0800 driver core: Remove match_any() Static match_any() is now exactly same as API device_match_any(). Remove the former and use the later instead. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-6-6623037414d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/core.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit d784b43c2d8bf24c2c80ef45ccbc41588945c415 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Tue Dec 24 21:05:04 2024 +0800 driver core: Simplify API device_find_child_by_name() implementation Simplify device_find_child_by_name() implementation by both existing API device_find_child() and device_match_name(). Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-5-6623037414d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/core.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit f1e8bf56320a7fb32095b6c51b707459361b403b Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Tue Dec 24 21:05:03 2024 +0800 driver core: Constify API device_find_child() and adapt for various usages Constify the following API: struct device *device_find_child(struct device *dev, void *data, int (*match)(struct device *dev, void *data)); To : struct device *device_find_child(struct device *dev, const void *data, device_match_t match); typedef int (*device_match_t)(struct device *dev, const void *data); with the following reasons: - Protect caller's match data @*data which is for comparison and lookup and the API does not actually need to modify @*data. - Make the API's parameters (@match)() and @data have the same type as all of other device finding APIs (bus|class|driver)_find_device(). - All kinds of existing device match functions can be directly taken as the API's argument, they were exported by driver core. Constify the API and adapt for various existing usages. BTW, various subsystem changes are squashed into this commit to meet 'git bisect' requirement, and this commit has the minimal and simplest changes to complement squashing shortcoming, and that may bring extra code improvement. Reviewed-by: Alison Schofield <alison.schofield@intel.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Uwe Kleine-König <ukleinek@kernel.org> # for drivers/pwm Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-4-6623037414d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> arch/sparc/kernel/vio.c | 6 +++--- drivers/base/core.c | 6 +++--- drivers/block/sunvdc.c | 6 +++--- drivers/bus/fsl-mc/dprc-driver.c | 4 ++-- drivers/cxl/core/pci.c | 4 ++-- drivers/cxl/core/pmem.c | 2 +- drivers/cxl/core/region.c | 21 ++++++++++++--------- drivers/firewire/core-device.c | 4 ++-- drivers/firmware/arm_scmi/bus.c | 4 ++-- drivers/firmware/efi/dev-path-parser.c | 4 ++-- drivers/gpio/gpio-sim.c | 2 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 +- drivers/hwmon/hwmon.c | 2 +- drivers/media/pci/mgb4/mgb4_core.c | 4 ++-- drivers/nvdimm/bus.c | 2 +- drivers/pwm/core.c | 2 +- drivers/rpmsg/rpmsg_core.c | 4 ++-- drivers/scsi/qla4xxx/ql4_os.c | 3 ++- drivers/scsi/scsi_transport_iscsi.c | 10 +++++----- drivers/slimbus/core.c | 8 ++++---- drivers/thunderbolt/retimer.c | 2 +- drivers/thunderbolt/xdomain.c | 2 +- drivers/tty/serial/serial_core.c | 4 ++-- drivers/usb/typec/class.c | 8 ++++---- include/linux/device.h | 4 ++-- include/scsi/scsi_transport_iscsi.h | 4 ++-- net/dsa/dsa.c | 2 +- tools/testing/cxl/test/cxl.c | 2 +- 28 files changed, 66 insertions(+), 62 deletions(-) commit e9451ab968bb34f2b37fdd91c376d5f36c4745ee Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Tue Dec 24 21:05:02 2024 +0800 bus: fsl-mc: Constify fsl_mc_device_match() fsl_mc_device_match() does not modify caller's inputs. To prepare for constifying API device_find_child() later. Constify this comparison function by simply changing its parameter types to const pointer. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-3-6623037414d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/bus/fsl-mc/dprc-driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 064aa528bbc5da6530283a761fbb905d52b04916 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Tue Dec 24 21:05:01 2024 +0800 slimbus: core: Constify slim_eaddr_equal() bool slim_eaddr_equal(struct slim_eaddr *a, struct slim_eaddr *b) does not modify @*a or @*b. To prepare for constifying API device_find_child() later. Constify this comparison function by simply changing its parameter type to 'const struct slim_eaddr *'. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-2-6623037414d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/slimbus/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a7512bda7c176553536a5775fa9540223eef3c1f Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Tue Dec 24 21:05:00 2024 +0800 libnvdimm: Replace namespace_match() with device_find_child_by_name() Simplify nd_namespace_store() implementation by using device_find_child_by_name(). Reviewed-by: Alison Schofield <alison.schofield@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-1-6623037414d4@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/nvdimm/claim.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit f1a2241778d9627f8b41829c6ca0735b683a9c68 Author: Pavan Holla <pholla@chromium.org> Date: Tue Dec 31 13:10:47 2024 +0000 usb: typec: ucsi: Implement ChromeOS UCSI driver Implementation of a UCSI transport driver for ChromeOS. This driver will be loaded if the ChromeOS EC implements a PPM. Signed-off-by: Pavan Holla <pholla@chromium.org> Co-developed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Co-developed-by: Łukasz Bartosik <ukaszb@chromium.org> Signed-off-by: Łukasz Bartosik <ukaszb@chromium.org> Link: https://lore.kernel.org/r/20241231131047.1757434-3-ukaszb@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 7 + drivers/usb/typec/ucsi/Kconfig | 13 ++ drivers/usb/typec/ucsi/Makefile | 1 + drivers/usb/typec/ucsi/cros_ec_ucsi.c | 337 ++++++++++++++++++++++++++++++++++ 4 files changed, 358 insertions(+) commit 401d07d530bfaf7131d6ab9acd32ff12b9a6ddf1 Author: Pavan Holla <pholla@chromium.org> Date: Tue Dec 31 13:10:46 2024 +0000 platform/chrome: Update ChromeOS EC header for UCSI Add EC host commands for reading and writing UCSI structures in the EC. The corresponding kernel driver is cros-ec-ucsi. Also update PD events supported by the EC. Acked-by: Tzung-Bi Shih <tzungbi@kernel.org> Signed-off-by: Pavan Holla <pholla@chromium.org> Signed-off-by: Łukasz Bartosik <ukaszb@chromium.org> Link: https://lore.kernel.org/r/20241231131047.1757434-2-ukaszb@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> include/linux/platform_data/cros_ec_commands.h | 28 +++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 533561a8aad566a5e2d50f9f069feadc682931f7 Author: Rob Herring (Arm) <robh@kernel.org> Date: Tue Dec 31 10:44:56 2024 -0600 usb: dwc3: omap: Use devm_regulator_get_optional() The 'vbus-supply' regulator is optional, so use devm_regulator_get_optional() instead of checking for property presence first. While here, rework the error handling to use dev_err_probe() which handles deferred probe correctly without an error message. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241231164456.262581-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/dwc3/dwc3-omap.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit dedab674428f8a99468a4864c067128ba9ea83a6 Author: Hongyu Xie <xiehongyu1@kylinos.cn> Date: Tue Dec 31 09:36:41 2024 +0800 usb: cdns3: remove redundant if branch cdns->role_sw->dev->driver_data gets set in routines showing below, cdns_init sw_desc.driver_data = cdns; cdns->role_sw = usb_role_switch_register(dev, &sw_desc); dev_set_drvdata(&sw->dev, desc->driver_data); In cdns_resume, cdns->role = cdns_role_get(cdns->role_sw); //line redundant struct cdns *cdns = usb_role_switch_get_drvdata(sw); dev_get_drvdata(&sw->dev) return dev->driver_data return cdns->role; "line redundant" equals to, cdns->role = cdns->role; So fix this if branch. Signed-off-by: Hongyu Xie <xiehongyu1@kylinos.cn> Acked-by: Peter Chen <peter.chen@kernel.org> Link: https://lore.kernel.org/r/20241231013641.23908-1-xiehongyu1@kylinos.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/cdns3/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 30e037ad7eb44bcf56fb1a845cc718d50c363310 Author: Benjamin Block <bblock@linux.ibm.com> Date: Wed Apr 5 16:28:34 2023 +0200 s390/qdio: Move memory alloc/pointer arithmetic for slib and sl into one place Instead of distributing the memory allocation and pointer arithmetic to place slib and sl on the page that is allocated for them over multiple functions and comments, move both into the same context directly next to each other, so that the knowledge of how this is done is immediately visible. The actual layout in memory doesn't change with this, just the structure of the code to achieve it. Signed-off-by: Benjamin Block <bblock@linux.ibm.com> Reviewed-by: Steffen Maier <maier@linux.ibm.com> Reviewed-by: Alexandra Winter <wintera@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> drivers/s390/cio/qdio.h | 7 +++---- drivers/s390/cio/qdio_setup.c | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) commit efd34db6e6813c6e573f34353ce4ad5e81f56dbd Author: Benjamin Block <bblock@linux.ibm.com> Date: Tue Apr 4 20:33:59 2023 +0200 s390/cio: Use array indices instead of pointer arithmetic ccw_device_get_ciw() already uses array indices to iterate over the vector of CIWs, but then switches to pointer arithmetic when returning the one it found. Change this to make it more consistent. Signed-off-by: Benjamin Block <bblock@linux.ibm.com> Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> drivers/s390/cio/device_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc3d4402a09cf072a56945e615fc587f8c1bec04 Author: Benjamin Block <bblock@linux.ibm.com> Date: Thu Mar 23 17:40:41 2023 +0100 s390/qdio: Rename feature flag aif_osa to aif_qdio This feature is not only utilized by OSA, but by QDIO in general. Clear up possible confusions. Signed-off-by: Benjamin Block <bblock@linux.ibm.com> Reviewed-by: Steffen Maier <maier@linux.ibm.com> Acked-by: Alexandra Winter <wintera@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/css_chars.h | 2 +- drivers/s390/cio/qdio.h | 2 +- drivers/s390/cio/qdio_setup.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit d6d458d42e1e1544a18f37f1d5c840e00d5261b9 Author: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Tue Aug 20 08:56:02 2024 +0300 thunderbolt: Handle DisplayPort tunnel activation asynchronously Sometimes setting up a DisplayPort tunnel may take quite long time. The reason is that the graphics driver (DPRX) is expected to issue read of certain monitor capabilities over the AUX channel and the "suggested" timeout from VESA is 5 seconds. If there is no graphics driver loaded this does not happen and currently we timeout and tear the tunnel down. The reason for this is that at least Intel discrete USB4 controllers do not send plug/unplug events about whether the DisplayPort cable from the GPU to the controller is connected or not, so in order to "release" the DisplayPort OUT adapter (the one that has monitor connected) we must tear the tunnel down after this timeout has been elapsed. In typical cases there is always graphics driver loaded, and also all the cables are connected but for instance in Intel graphics CI they only load the graphics driver after the system is fully booted up. This makes the driver to tear down the DisplayPort tunnel. To help this case we allow passing bigger or indefinite timeout through a new module parameter (dprx_timeout). To keep the driver bit more responsive during that time we change the way DisplayPort tunnels get activated. We first do the normal tunnel setup and then run the polling of DPRX capabilities read completion in a separate worker. This also makes the driver to accept bandwidth requests to already established DisplayPort tunnels more responsive. If the tunnel still fails to establish we will tear it down and remove the DisplayPort IN adapter from the dp_resource list to avoid using it again (unless we get hotplug to that adapter). Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> drivers/thunderbolt/tb.c | 174 ++++++++++++++++------ drivers/thunderbolt/test.c | 90 ++++++------ drivers/thunderbolt/tunnel.c | 341 ++++++++++++++++++++++++++++--------------- drivers/thunderbolt/tunnel.h | 47 +++++- 4 files changed, 444 insertions(+), 208 deletions(-) commit a70cd9cddeb2836377547efa9d76b391556ae687 Author: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Mon Aug 26 15:04:27 2024 +0300 thunderbolt: Rework tb_tunnel_consumed_bandwidth() Rework to avoid the goto as it only makes it confusing. Move logging to happen at the end so we can see all the tunnels this is being called. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> drivers/thunderbolt/tunnel.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 5ae367748f157355f0fab2662917e8800eb21d41 Author: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Mon Aug 26 14:50:22 2024 +0300 thunderbolt: Move forward declarations in one place Sometimes we need to have these but move them into one place so that the code is bit more understanable. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> drivers/thunderbolt/tb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4d99f982e9857356a1173e5549606b0259eba428 Author: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Mon Aug 26 14:53:02 2024 +0300 thunderbolt: Pass reason to tb_dp_resource_unavailable() Since we are going to call this also when DisplayPort tunnel establishment fails it is useful to have the reason logged. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> drivers/thunderbolt/tb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit cab96faacf53d0497c440b50a4801d70c2937930 Author: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Tue Aug 20 09:48:24 2024 +0300 thunderbolt: Drop tb_tunnel_restart() It is pretty much the same as tb_tunnel_activate() excepts does check for already activated paths. This is not needed anymore and makes it more streamlined so drop tb_tunnel_restart() in favour of tb_tunnel_activate(). Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> drivers/thunderbolt/tb.c | 4 ++-- drivers/thunderbolt/tunnel.c | 27 +++------------------------ drivers/thunderbolt/tunnel.h | 1 - 3 files changed, 5 insertions(+), 27 deletions(-) commit ae765788936d9833647f02add49e9564345021cc Author: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Tue Aug 20 08:03:20 2024 +0300 thunderbolt: Rework how tunnel->[init|deinit] hooks are called The way these are called is not exactly symmetric as it is supposed to be: the former is called when tunnel is being activated and the latter is called when it is being released (not when it is being de-activated). Furthermore host-to-host (DMA) tunnels are abusing the ->deinit hook to clear out the credits. This makes it quite hard to follow what is being called and when. For these reasons rework the two "init" hooks to be called symmetrically and rename them accordingly. For the DMA one, add a new hook that is specifically used to run clean up for the tunnel when its memory is being released. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> drivers/thunderbolt/tunnel.c | 37 ++++++++++++++++++++----------------- drivers/thunderbolt/tunnel.h | 13 +++++++++---- 2 files changed, 29 insertions(+), 21 deletions(-) commit 693b5bb6f6e567e4743e0df182a0844be539e381 Author: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Mon Aug 26 10:47:32 2024 +0300 thunderbolt: Show path name in debug log when path is deactivated Similarly as we do when activating the path. Helps in debugging. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> drivers/thunderbolt/path.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a674b83db9f75971ed28966d856ff340609e68bf Author: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Tue Aug 20 11:37:16 2024 +0300 thunderbolt: Make tb_tunnel_one_dp() return void The boolean return value is never used so we can make this return void instead. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> drivers/thunderbolt/tb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 58b4af9c43ca6b0f2508ff0537ea46438359b970 Author: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Wed Aug 28 15:07:54 2024 +0300 thunderbolt: Increase DPRX capabilities read timeout Some graphics drivers such as i915 support runtime power management and if there is nothing connected at the moment they will runtime suspend to save power. At least i915 is polling for new connections every 10 seconds if the hardware does support sending PME. To allow i915 and other graphics from detect the just established DisplayPort tunnel allow the DPRX capabilities read to take up to 12 seconds. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> drivers/thunderbolt/tunnel.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c55017a0608e96e525e66fba500139dcdb5ee16e Author: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Mon Sep 2 11:17:13 2024 +0300 thunderbolt: Debug log an invalid config space reply just once These can mess up the debug log if a router does not implement the config space register blocks fully and we are reading registers through debugfs. To avoid this, just log it once. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> drivers/thunderbolt/ctl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit cfdfdb1a2f74275a14b7d18764d218e73818106f Author: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Mon Sep 2 11:14:37 2024 +0300 thunderbolt: Log config space when invalid config space reply is received For debugging purposes helps to see the config space that was being accessed. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> drivers/thunderbolt/ctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 939ae02b2a90d7a7e2b9bdb2711e884c7042f20e Author: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Mon Aug 26 10:46:16 2024 +0300 thunderbolt: Drop doubled empty line from ctl.h No functional changes. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> drivers/thunderbolt/ctl.h | 1 - 1 file changed, 1 deletion(-) commit 398da8e64321db638aa0f3b11d841e2d1b0fc4b4 Author: Gil Fine <gil.fine@linux.intel.com> Date: Mon Nov 11 22:52:11 2024 +0200 thunderbolt: debugfs: Add write capability to path config space Currently debugfs interface allows writing of router, adapter and counters config spaces but not for paths. However, it can be useful during debugging to modify path config space so for this reason add this support to the debugfs interface as well. Signed-off-by: Gil Fine <gil.fine@linux.intel.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> drivers/thunderbolt/debugfs.c | 65 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 10 deletions(-) commit 9b6442a3bdd7e0d528122d63c24bd57f6cb05671 Author: Vitaliy Shevtsov <v.shevtsov@maxima.ru> Date: Wed Dec 25 01:45:30 2024 +0000 ipmi: make ipmi_destroy_user() return void Return value of ipmi_destroy_user() has no meaning, because it's always zero and callers can do nothing with it. And in most cases it's not checked. So make this function return void. This also will eliminate static code analyzer warnings such as unreachable code/redundant comparison when the return value is checked against non-zero value. Found by Linux Verification Center (linuxtesting.org) with Svace. Signed-off-by: Vitaliy Shevtsov <v.shevtsov@maxima.ru> Message-ID: <20241225014532.20091-1-v.shevtsov@maxima.ru> Signed-off-by: Corey Minyard <corey@minyard.net> drivers/char/ipmi/ipmi_devintf.c | 5 +---- drivers/char/ipmi/ipmi_msghandler.c | 4 +--- drivers/char/ipmi/ipmi_poweroff.c | 6 +----- drivers/char/ipmi/ipmi_watchdog.c | 5 +---- include/linux/ipmi.h | 2 +- 5 files changed, 5 insertions(+), 17 deletions(-) commit 88d9dca36aac9659446be1e569d8fbe3462b5741 Author: Satya Priya Kakitapalli <quic_skakitap@quicinc.com> Date: Fri Dec 20 15:20:48 2024 +0530 clk: qcom: gcc-mdm9607: Fix cmd_rcgr offset for blsp1_uart6 rcg Fix cmd_rcgr offset for blsp1_uart6_apps_clk_src on mdm9607 platform. Fixes: 48b7253264ea ("clk: qcom: Add MDM9607 GCC driver") Cc: stable@vger.kernel.org Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241220095048.248425-1-quic_skakitap@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/gcc-mdm9607.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94c16fd4df9089931f674fb9aaec41ea20b0fd7a Author: Mathieu Othacehe <othacehe@gnu.org> Date: Fri Dec 27 10:59:22 2024 +0100 net: dwmac-imx: add imx93 clock input support in RMII mode If the rmii_refclk_ext boolean is set, configure the ENET QOS TX_CLK pin direction to input. Otherwise, it defaults to output. That mirrors what is already happening for the imx8mp in the imx8mp_set_intf_mode function. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Link: https://patch.msgid.link/20241227095923.4414-1-othacehe@gnu.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 5df7ca0b827dac9fc44b42a4b695adcaa6d07ffb Author: Yu Tian <tianyu2@kernelsoft.com> Date: Tue Dec 31 10:36:10 2024 +0800 ipv4: remove useless arg The "struct sock *sk" parameter in ip_rcv_finish_core is unused, which leads the compiler to optimize it out. As a result, the "struct sk_buff *skb" parameter is passed using x1. And this make kprobe hard to use. Signed-off-by: Yu Tian <tianyu2@kernelsoft.com> Link: https://patch.msgid.link/20241231023610.1657926-1-tianyu2@kernelsoft.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/ipv4/ip_input.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit bb70b0d48d8eab20644ca0101fedfe23f8a26c59 Author: Parav Pandit <parav@nvidia.com> Date: Tue Dec 24 20:37:06 2024 +0200 devlink: Improve the port attributes description Current PF number description is vague, sometimes interpreted as some PF index. VF number in the PCI specification starts at 1; however in kernel, it starts at 0 for representor model. Improve the description of devlink port attributes PF, VF and SF numbers with these details. Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com> Reviewed-by: Shay Drory <shayd@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Parav Pandit <parav@nvidia.com> Link: https://patch.msgid.link/20241224183706.26571-1-parav@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/devlink.h | 11 ++++++----- net/devlink/port.c | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) commit be16b46f9ebd3270a4c4da81e5d7bb34b6f43384 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 22 21:08:20 2024 +0100 ptp: ocp: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Link: https://patch.msgid.link/20241222-sysfs-const-bin_attr-ptp-v1-1-5c1f3ee246fb@weissschuh.net Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/ptp/ptp_ocp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit c83ca5a4df7cf0ce9ccc25e8481043e05aed6ad0 Author: Heiner Kallweit <hkallweit1@gmail.com> Date: Fri Dec 20 23:02:06 2024 +0100 net: phy: fix phy_disable_eee genphy_c45_write_eee_adv() becomes a no-op if phydev->supported_eee is cleared. That's not what we want because this function is still needed to clear the EEE advertisement register(s). Fill phydev->eee_broken_modes instead to ensure that userspace can't re-enable EEE advertising. Fixes: b55498ff14bd ("net: phy: add phy_disable_eee") Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/57e2ae5f-4319-413c-b5c4-ebc8d049bc23@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phy_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8cd5ba3d3fc9a26d4b3873e0696bcb1adb0769a5 Merge: 2f0ffa57f698 0ebb1e9e1b12 Author: Linus Walleij <linus.walleij@linaro.org> Date: Fri Jan 3 01:48:03 2025 +0100 Merge tag 'samsung-pinctrl-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung into devel Samsung pinctrl drivers changes for v6.14 Two fixes for very old issues around error handling and also one cleanup. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> commit a3a8799165ff83bb764fd800c6559c3cba0ddac3 Author: Hans de Goede <hdegoede@redhat.com> Date: Sat Dec 21 13:51:40 2024 +0100 platform/x86: dell-laptop: Use power_supply_charge_types_show/_parse() helpers Make battery_modes a map between tokens and enum power_supply_charge_type values instead of between tokens and strings and use the new power_supply_charge_types_show/_parse() helpers for show()/store() to ensure that things are handled in the same way as in other drivers. This also changes battery_supported_modes to be a bitmap of charge-types (enum power_supply_charge_type values) rather then a bitmap of indices into battery_modes[]. Reviewed-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20241221125140.345776-2-hdegoede@redhat.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/platform/x86/dell/dell-laptop.c | 54 +++++++++++++++------------------ 1 file changed, 25 insertions(+), 29 deletions(-) commit 9c2fb0c2a10f62291987f71de71b3dd32ab7ea36 Merge: 40384c840ea1 bdd03ebf721f Author: Stephen Boyd <sboyd@kernel.org> Date: Thu Jan 2 13:22:47 2025 -0800 Merge tag 'samsung-clk-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into clk-samsung Pull Samsung clk driver updates from Krzysztof Kozlowski: - Add clock controller driver for Exynos990 SoC * tag 'samsung-clk-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: clk: samsung: Introduce Exynos990 clock controller driver clk: samsung: clk-pll: Add support for pll_{0717x, 0718x, 0732x} dt-bindings: clock: samsung: Add Exynos990 SoC CMU bindings commit 192faebeb9c35f9c34eeaf5227e616f3cc8099a0 Author: Frederic Weisbecker <frederic@kernel.org> Date: Fri Sep 27 00:48:57 2024 +0200 lib: test_objpool: Use kthread_run_on_cpu() Use the proper API instead of open coding it. Reviewed-by: Matt Wu <wuqiang.matt@bytedance.com> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> lib/test_objpool.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 294fca60223ad2b87dfc5df03a95f044a2cd61a1 Author: Frederic Weisbecker <frederic@kernel.org> Date: Fri Sep 27 00:48:56 2024 +0200 kallsyms: Use kthread_run_on_cpu() Use the proper API instead of open coding it. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> kernel/kallsyms_selftest.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 76f99fc1566d99bc263249996240df5511c73819 Author: Frederic Weisbecker <frederic@kernel.org> Date: Fri Sep 27 00:48:55 2024 +0200 soc/qman: test: Use kthread_run_on_cpu() Use the proper API instead of open coding it. However it looks like kthreads here could be replaced by the use of a per-cpu workqueue instead. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> drivers/soc/fsl/qbman/qman_test_stash.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8f22f904b25b71c9e3e613e70944d818b203d6dc Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Wed Dec 11 18:03:12 2024 -0800 scsi: fnic: Increment driver version Increment driver version to 1.8.0.0 Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Tested-by: Karan Tilak Kumar <kartilak@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-16-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fnic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d26bfcf1d2e829d37ef7f2b506b95e46f25f993 Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Wed Dec 11 18:03:11 2024 -0800 scsi: fnic: Add support to handle port channel RSCN Add support to handle port channel RSCN. Port channel RSCN is a Cisco vendor specific RSCN event. It is applicable only to Cisco UCS fabrics. If there's a change in the port channel configuration, an RCSN is sent to fnic. This is used to serially reset the scsi initiator fnics so that there's no all paths down scenario. The affected fnics are added to a list that are reset with a small time gap between them. Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-15-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fdls_disc.c | 56 ++++++++++++++++++++++++++++++++++++------- drivers/scsi/fnic/fnic.h | 25 +++++++++++++++++++ drivers/scsi/fnic/fnic_fcs.c | 36 ++++++++++++++++++++++++++++ drivers/scsi/fnic/fnic_main.c | 30 +++++++++++++++++++++++ 4 files changed, 138 insertions(+), 9 deletions(-) commit 7e6886b705fd8b338dbd4b7492bd45f0259cc55f Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Wed Dec 11 18:03:10 2024 -0800 scsi: fnic: Code cleanup Replace existing host structure with fnic host. Add headers from scsi to support new functionality. Remove unused code and declarations. Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-14-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fdls_disc.c | 664 +++++++++++++++++++-------------------- drivers/scsi/fnic/fip.c | 92 +++--- drivers/scsi/fnic/fip.h | 2 +- drivers/scsi/fnic/fnic.h | 13 +- drivers/scsi/fnic/fnic_debugfs.c | 2 +- drivers/scsi/fnic/fnic_fcs.c | 125 ++++---- drivers/scsi/fnic/fnic_isr.c | 28 +- drivers/scsi/fnic/fnic_main.c | 67 ++-- drivers/scsi/fnic/fnic_scsi.c | 241 +++++++------- 9 files changed, 611 insertions(+), 623 deletions(-) commit a8650a5eaaf123572a7b2d6b1fe9f6b000b6b6a6 Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Wed Dec 11 18:03:09 2024 -0800 scsi: fnic: Add stats and related functionality Add statistics and related functionality for FDLS. Add supporting functions to display stats. Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-13-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fdls_disc.c | 32 +++++++++++++++-- drivers/scsi/fnic/fnic_fdls.h | 6 ++-- drivers/scsi/fnic/fnic_main.c | 34 +++++++++++++++++- drivers/scsi/fnic/fnic_scsi.c | 19 ++++++++-- drivers/scsi/fnic/fnic_stats.h | 45 +++++++++++++++++++++++- drivers/scsi/fnic/fnic_trace.c | 79 ++++++++++++++++++++++++++++++++++++------ 6 files changed, 196 insertions(+), 19 deletions(-) commit 9243626c211e4d6f5add84c5a7b141e94a2e7222 Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Wed Dec 11 18:03:08 2024 -0800 scsi: fnic: Modify fnic interfaces to use FDLS Modify fnic driver interfaces to use FDLS and supporting functions. Refactor code in fnic_probe and fnic_remove. Get fnic from shost_priv. Add error handling in stats processing functions. Modify some print statements. Add support to do module unload cleanup. Use placeholder functions/modify function declarations to not break compilation. Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Co-developed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Arun Easi <aeasi@cisco.com> Co-developed-by: Karan Tilak Kumar <kartilak@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-12-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fnic.h | 14 +- drivers/scsi/fnic/fnic_attrs.c | 12 +- drivers/scsi/fnic/fnic_debugfs.c | 28 ++- drivers/scsi/fnic/fnic_fcs.c | 16 ++ drivers/scsi/fnic/fnic_main.c | 498 +++++++++++++++++++++------------------ drivers/scsi/fnic/fnic_res.c | 30 ++- drivers/scsi/fnic/fnic_scsi.c | 39 +++ drivers/scsi/fnic/fnic_stats.h | 2 + drivers/scsi/fnic/fnic_trace.c | 6 + 9 files changed, 398 insertions(+), 247 deletions(-) commit 6335be1c5009f888367db095a0442cdb256980f8 Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Wed Dec 11 18:03:07 2024 -0800 scsi: fnic: Modify IO path to use FDLS Modify IO path to use FDLS. Add helper functions to process IOs. Remove unused template functions. Clean up obsolete code. Refactor old function definitions. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202410210147.fQp7tYeb-lkp@intel.com/ Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Reviewed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-11-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fnic.h | 19 +- drivers/scsi/fnic/fnic_io.h | 3 + drivers/scsi/fnic/fnic_main.c | 10 +- drivers/scsi/fnic/fnic_scsi.c | 839 ++++++++++++++++++++++++----------------- drivers/scsi/fnic/fnic_stats.h | 2 - 5 files changed, 504 insertions(+), 369 deletions(-) commit 9cf9fe2f3ec5dad8b459267a9e977c0b7811b3f8 Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Wed Dec 11 18:03:06 2024 -0800 scsi: fnic: Add functionality in fnic to support FDLS Add interfaces in fnic to use FDLS services. Modify link up and link down functionality to use FDLS. Replace existing interfaces to handle new functionality provided by FDLS. Modify data types of some data members to handle new functionality. Add processing of tports and handling of tports. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202409292037.ZYWZwIK6-lkp@intel.com/ Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Co-developed-by: Gian Carlo Boffa <gcboffa@cisco.com> Signed-off-by: Gian Carlo Boffa <gcboffa@cisco.com> Co-developed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Signed-off-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Co-developed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Arun Easi <aeasi@cisco.com> Co-developed-by: Karan Tilak Kumar <kartilak@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-10-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fdls_disc.c | 75 ++++++- drivers/scsi/fnic/fip.c | 27 ++- drivers/scsi/fnic/fnic.h | 20 +- drivers/scsi/fnic/fnic_fcs.c | 482 +++++++++++++++++++++++++++++------------- drivers/scsi/fnic/fnic_main.c | 11 +- drivers/scsi/fnic/fnic_scsi.c | 127 +++++++++-- 6 files changed, 568 insertions(+), 174 deletions(-) commit 098585aa8acab3fcd46ce908af84ef168f5ccab6 Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Wed Dec 11 18:03:05 2024 -0800 scsi: fnic: Add and integrate support for FIP Add and integrate support for FCoE Initialization (protocol) FIP. This protocol will be exercised on Cisco UCS rack servers. Add support to specifically print FIP related debug messages. Replace existing definitions to handle new data structures. Clean up old and obsolete definitions. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202409291955.FcMZfNSt-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202412081904.pXwdx15J-lkp@intel.com/ Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Co-developed-by: Gian Carlo Boffa <gcboffa@cisco.com> Signed-off-by: Gian Carlo Boffa <gcboffa@cisco.com> Co-developed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Signed-off-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Co-developed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Arun Easi <aeasi@cisco.com> Co-developed-by: Karan Tilak Kumar <kartilak@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-9-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/Makefile | 1 + drivers/scsi/fnic/fip.c | 983 ++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/fnic/fip.h | 157 +++++++ drivers/scsi/fnic/fnic.h | 23 +- drivers/scsi/fnic/fnic_fcs.c | 853 +++++------------------------------- drivers/scsi/fnic/fnic_fip.h | 48 --- drivers/scsi/fnic/fnic_main.c | 48 +-- 7 files changed, 1289 insertions(+), 824 deletions(-) commit 09c1e6ab4ab2a107d96f119950dc330e446dc2b0 Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Wed Dec 11 18:03:04 2024 -0800 scsi: fnic: Add and integrate support for FDMI Add support for Fabric-Device Management Interface (FDMI) by introducing PCI device IDs for Cisco Hardware. Introduce a module parameter to enable/disable FDMI support. Integrate support for FDMI. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202406110734.p2v8dq9v-lkp@intel.com/ Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Co-developed-by: Gian Carlo Boffa <gcboffa@cisco.com> Signed-off-by: Gian Carlo Boffa <gcboffa@cisco.com> Co-developed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Signed-off-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Co-developed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Arun Easi <aeasi@cisco.com> Co-developed-by: Karan Tilak Kumar <kartilak@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-8-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fdls_disc.c | 658 ++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/fnic/fnic.h | 1 + drivers/scsi/fnic/fnic_main.c | 19 +- 3 files changed, 676 insertions(+), 2 deletions(-) commit 2c77081969ee00ec31abda0cf6a26bc269f12ab2 Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Wed Dec 11 18:03:03 2024 -0800 scsi: fnic: Add Cisco hardware model names Add model IDs for Cisco VIC. Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Co-developed-by: Gian Carlo Boffa <gcboffa@cisco.com> Signed-off-by: Gian Carlo Boffa <gcboffa@cisco.com> Co-developed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Signed-off-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Co-developed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Arun Easi <aeasi@cisco.com> Co-developed-by: Karan Tilak Kumar <kartilak@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-7-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/Makefile | 3 +- drivers/scsi/fnic/fnic.h | 71 ++++++++++++++++ drivers/scsi/fnic/fnic_main.c | 10 +++ drivers/scsi/fnic/fnic_pci_subsys_devid.c | 131 ++++++++++++++++++++++++++++++ 4 files changed, 214 insertions(+), 1 deletion(-) commit f828af44b8ddef3500fda70ef1f6daffe97db36b Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Wed Dec 11 18:03:02 2024 -0800 scsi: fnic: Add support for unsolicited requests and responses Add support for unsolicited requests and responses. Add support to accept and reject frames. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202409291705.MugERX98-lkp@intel.com/ Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Co-developed-by: Gian Carlo Boffa <gcboffa@cisco.com> Signed-off-by: Gian Carlo Boffa <gcboffa@cisco.com> Co-developed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Signed-off-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Co-developed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Arun Easi <aeasi@cisco.com> Co-developed-by: Karan Tilak Kumar <kartilak@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-6-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fdls_disc.c | 683 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 683 insertions(+) commit b5a57f153bdf772ed41ef286826cef7a1c52f433 Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Wed Dec 11 18:03:01 2024 -0800 scsi: fnic: Add support for target based solicited requests and responses Add support for target based solicited requests and responses. Add support for tport definitions and processing. Add support for restarting the IT nexus. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202406120146.xchlZbqX-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202412081427.SlsFIJY4-lkp@intel.com/ Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Co-developed-by: Gian Carlo Boffa <gcboffa@cisco.com> Signed-off-by: Gian Carlo Boffa <gcboffa@cisco.com> Co-developed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Signed-off-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Co-developed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Arun Easi <aeasi@cisco.com> Co-developed-by: Karan Tilak Kumar <kartilak@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-5-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fdls_disc.c | 1535 ++++++++++++++++++++++++++++++++++++++--- drivers/scsi/fnic/fnic.h | 6 + drivers/scsi/fnic/fnic_fdls.h | 2 +- 3 files changed, 1454 insertions(+), 89 deletions(-) commit a63e78eb2b0f654b138abfc323f6bd7573e26145 Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Wed Dec 11 18:03:00 2024 -0800 scsi: fnic: Add support for fabric based solicited requests and responses Add fdls_disc.c to support fabric based solicited requests and responses. Clean up obsolete code but keep the function template so as to not break compilation. Remove duplicate definitions from header files. Modify definitions of data members. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202406112309.8GiDUvIM-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202406120201.VakI9Dly-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202412080837.2JU0r2Ny-lkp@intel.com/ Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Co-developed-by: Gian Carlo Boffa <gcboffa@cisco.com> Signed-off-by: Gian Carlo Boffa <gcboffa@cisco.com> Co-developed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Signed-off-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Co-developed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Arun Easi <aeasi@cisco.com> Co-developed-by: Karan Tilak Kumar <kartilak@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-4-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/Makefile | 1 + drivers/scsi/fnic/fdls_disc.c | 2180 +++++++++++++++++++++++++++++++++++++++++ drivers/scsi/fnic/fnic.h | 104 +- drivers/scsi/fnic/fnic_fcs.c | 421 ++++---- drivers/scsi/fnic/fnic_fdls.h | 1 - drivers/scsi/fnic/fnic_io.h | 11 - drivers/scsi/fnic/fnic_main.c | 60 +- drivers/scsi/fnic/fnic_scsi.c | 6 +- 8 files changed, 2592 insertions(+), 192 deletions(-) commit d859d05ceb3dbb5b7c294b7073fef64507681901 Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Wed Dec 11 18:02:59 2024 -0800 scsi: fnic: Add headers and definitions for FDLS Add headers and definitions for FDLS (Fabric Discovery and Login Services). Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Co-developed-by: Gian Carlo Boffa <gcboffa@cisco.com> Signed-off-by: Gian Carlo Boffa <gcboffa@cisco.com> Co-developed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Signed-off-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Co-developed-by: Arun Easi <aeasi@cisco.com> Signed-off-by: Arun Easi <aeasi@cisco.com> Co-developed-by: Karan Tilak Kumar <kartilak@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-3-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fdls_fc.h | 253 ++++++++++++++++++++++++ drivers/scsi/fnic/fnic_fdls.h | 433 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 686 insertions(+) commit e2813fc27d274747fa6e204e135e3c89cc6426a3 Author: Karan Tilak Kumar <kartilak@cisco.com> Date: Wed Dec 11 18:02:58 2024 -0800 scsi: fnic: Replace shost_printk() with dev_info()/dev_err() Sending host information to shost_printk() prior to host initialization in fnic is unnecessary. Replace shost_printk() and a printk() prior to this initialization with dev_info() and dev_err() accordingly. Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-2-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fnic_main.c | 84 +++++++++++++++---------------------------- drivers/scsi/fnic/fnic_res.c | 69 ++++++++++++----------------------- 2 files changed, 51 insertions(+), 102 deletions(-) commit 00aab2f236f25f3dc3c88eee1b8ccb0cbcae3f99 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Thu Jan 2 13:01:34 2025 +0100 kyber: constify sysfs attributes The elevator core now allows instances of 'struct elv_fs_entry' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20250102-sysfs-const-attr-elevator-v1-4-9837d2058c60@weissschuh.net Signed-off-by: Jens Axboe <axboe@kernel.dk> block/kyber-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c40f9f6ac59f949b6cbf10903fa2aae76efffa20 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Thu Jan 2 13:01:33 2025 +0100 block, bfq: constify sysfs attributes The elevator core now allows instances of 'struct elv_fs_entry' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20250102-sysfs-const-attr-elevator-v1-3-9837d2058c60@weissschuh.net Signed-off-by: Jens Axboe <axboe@kernel.dk> block/bfq-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8686e1dedac7190d2f148b23e4f1ac69d2e37d6b Author: Thomas Weißschuh <linux@weissschuh.net> Date: Thu Jan 2 13:01:32 2025 +0100 block: mq-deadline: Constify sysfs attributes The elevator core now allows instances of 'struct elv_fs_entry' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20250102-sysfs-const-attr-elevator-v1-2-9837d2058c60@weissschuh.net Signed-off-by: Jens Axboe <axboe@kernel.dk> block/mq-deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 044792cda05a97ae1da330771ec2140ae86439ec Author: Thomas Weißschuh <linux@weissschuh.net> Date: Thu Jan 2 13:01:31 2025 +0100 elevator: Enable const sysfs attributes The elevator core does not need to modify the sysfs attributes added by the elevators. Reflect this in the types, so the attributes can be moved into read-only memory. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20250102-sysfs-const-attr-elevator-v1-1-9837d2058c60@weissschuh.net Signed-off-by: Jens Axboe <axboe@kernel.dk> block/elevator.c | 8 ++++---- block/elevator.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 29081c21a7064cdbf29295d07f0e44776280918e Author: Bart Van Assche <bvanassche@acm.org> Date: Mon Dec 16 10:48:52 2024 -0800 scsi: scsi_debug: Skip host/bus reset settle delay Skip the reset settle delay during error handling since the scsi_debug driver doesn't need this delay. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20241216184852.2626339-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_debug.c | 1 + 1 file changed, 1 insertion(+) commit 2f84d072bdcb7d6ec66cc4d0de9f37a3dc394cd2 Author: Alejandro Lucero <alucerop@amd.com> Date: Tue Dec 3 16:21:12 2024 +0000 cxl/pci: Add CXL Type 1/2 support to cxl_dvsec_rr_decode() In cxl_dvsec_rr_decode() the pci driver expects to retrieve a cxlds, struct cxl_dev_state, from the driver_data field of struct device. While that works for Type 3, drivers for Type 1/2 devices may not put a cxlds in the driver_data field. In preparation for supporting Type 1/2 devices, replace parameter 'struct device' with 'struct cxl_dev_state' in cxl_dvsec_rr_decode(). Remove the unused parameter 'cxl_port' in cxl_dvsec_rr_decode(). Signed-off-by: Alejandro Lucero <alucerop@amd.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Link: https://patch.msgid.link/20241203162112.5088-1-alucerop@amd.com Signed-off-by: Dave Jiang <dave.jiang@intel.com> drivers/cxl/core/pci.c | 6 +++--- drivers/cxl/cxl.h | 3 ++- drivers/cxl/port.c | 2 +- tools/testing/cxl/test/mock.c | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) commit c8e88de1b44e58cacdef41ea9aaa78fca35f1357 Author: Dan Williams <dan.j.williams@intel.com> Date: Wed Jan 31 00:30:21 2024 -0800 ACPI/HMAT: Move HMAT messages to pr_debug() The HMAT messages printed at boot, beyond being noisy, can also print details for nodes that are not yet enabled. The primary method to consume HMAT details is via sysfs, and the sysfs interface gates what is emitted by whether the node is online or not. Hide the messages by default by moving them from "info" to "debug" log level. Otherwise, these prints are just a pretty-print way to dump the ACPI HMAT table. It has always been the case that post-analysis was required for these messages to map proximity-domains to Linux NUMA nodes, and as Priya points out that analysis also needs to consider whether the proximity domain is marked "enabled" in the SRAT. Reported-by: Priya Autee <priya.v.autee@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/170668982094.318782.2963631284830500182.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com> drivers/acpi/numa/hmat.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit ebbf01f9f4e6b4100655567266d96d893df14362 Merge: 1edc2a60e199 ea4f2219dd40 Author: Martin K. Petersen <martin.petersen@oracle.com> Date: Thu Jan 2 15:08:42 2025 -0500 Merge patch series "scsi: Constify 'struct bin_attribute'" Thomas Weißschuh <linux@weissschuh.net> says: The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-scsi-v1-0-f0a5e54b3437@weissschuh.net Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> commit ea4f2219dd40c14fa8dbb5a3288482830a0bc03e Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 12:29:18 2024 +0100 scsi: qla4xxx: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-scsi-v1-11-f0a5e54b3437@weissschuh.net Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/qla4xxx/ql4_attr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 06a9ceb95f860bd4dc931ed7b9e6cf9333564e3c Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 12:29:17 2024 +0100 scsi: qla2xxx: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-scsi-v1-10-f0a5e54b3437@weissschuh.net Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/qla2xxx/qla_attr.c | 80 ++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 40 deletions(-) commit f9d0a8450ee3a945c6ba14624ff4034d155351f1 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 12:29:16 2024 +0100 scsi: qedi: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-scsi-v1-9-f0a5e54b3437@weissschuh.net Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/qedi/qedi_dbg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8116aa2898b01fb17df346cce9e477ab8538c4c Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 12:29:15 2024 +0100 scsi: qedf: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-scsi-v1-8-f0a5e54b3437@weissschuh.net Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/qedf/qedf_attr.c | 10 +++++----- drivers/scsi/qedf/qedf_dbg.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit f6af41ff6671d354e2909351d97f4071d7e321ac Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 12:29:14 2024 +0100 scsi: ipr: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-scsi-v1-7-f0a5e54b3437@weissschuh.net Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/ipr.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 4594a1f827d4a8e2a96f114d7f2afa2171561e09 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 12:29:13 2024 +0100 scsi: lpfc: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-scsi-v1-6-f0a5e54b3437@weissschuh.net Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/lpfc/lpfc_attr.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit af58c759836b7272236e8ef4773e0926d686a135 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 12:29:12 2024 +0100 scsi: ibmvfc: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-scsi-v1-5-f0a5e54b3437@weissschuh.net Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/ibmvscsi/ibmvfc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 61e2d41cafc68ba73dc7d403528d6a9fcc25c39e Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 12:29:11 2024 +0100 scsi: esas2r: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-scsi-v1-4-f0a5e54b3437@weissschuh.net Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/esas2r/esas2r.h | 12 ++++++------ drivers/scsi/esas2r/esas2r_main.c | 32 ++++++++++++++++---------------- 2 files changed, 22 insertions(+), 22 deletions(-) commit 3e72fc051d4cf2f0b5d3bb67f6586e1fad713b5b Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 12:29:10 2024 +0100 scsi: arcmsr: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-scsi-v1-3-f0a5e54b3437@weissschuh.net Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/arcmsr/arcmsr_attr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1cf448bd2e6ab15ab89a36f304c4fbddad0f76b9 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 12:29:09 2024 +0100 scsi: 3w-sas: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-scsi-v1-2-f0a5e54b3437@weissschuh.net Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/3w-sas.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e4dab5d1ded3a9315951a3d662af4b0238b780c3 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 12:29:08 2024 +0100 scsi: core: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-scsi-v1-1-f0a5e54b3437@weissschuh.net Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_sysfs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 1edc2a60e199711d5d006ad44b8febb6f269ddc3 Merge: 850f814b01a5 62297838de61 Author: Martin K. Petersen <martin.petersen@oracle.com> Date: Thu Jan 2 15:02:19 2025 -0500 Merge patch series "Update lpfc to revision 14.4.0.7" Justin Tee <justintee8345@gmail.com> says: Update lpfc to revision 14.4.0.7 This patch set contains fixes related to smatch, clean up of obsolete code and global spinlocks, changes to ADISC and LS_RJT handling, and support for large fw object reads used in proprietary applications. The patches were cut against Martin's 6.14/scsi-queue tree. Link: https://lore.kernel.org/r/20241212233309.71356-1-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> commit 62297838de618785b670d49a18de82f638d13200 Author: Justin Tee <justin.tee@broadcom.com> Date: Thu Dec 12 15:33:09 2024 -0800 scsi: lpfc: Copyright updates for 14.4.0.7 patches Update copyrights to 2024 for files modified in the 14.4.0.7 patch set. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20241212233309.71356-11-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/lpfc/lpfc_bsg.h | 2 +- drivers/scsi/lpfc/lpfc_hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit eb20870852438de23a38195c5e890ad57156f00a Author: Justin Tee <justin.tee@broadcom.com> Date: Thu Dec 12 15:33:08 2024 -0800 scsi: lpfc: Update lpfc version to 14.4.0.7 Update lpfc version to 14.4.0.7 Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20241212233309.71356-10-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3103af831c8fb8177ffe766971aa74e0fcec1fe1 Author: Justin Tee <justin.tee@broadcom.com> Date: Thu Dec 12 15:33:07 2024 -0800 scsi: lpfc: Add support for large fw object application layer reads Current lpfc bsg implementation allows a maximum fw read object size of 30KB. Implementation and support for read object mailbox commands for fw objects larger than 30KB are now required for proprietary applications. Thus, update the lpfc_sli_config_emb0_subsys structure and its associated submission and completion paths to accommodate for an alternative form of read object command that supports large fw objects. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20241212233309.71356-9-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/lpfc/lpfc_bsg.c | 210 ++++++++++++++++++++++++++++++++++++++++-- drivers/scsi/lpfc/lpfc_bsg.h | 17 +++- drivers/scsi/lpfc/lpfc_scsi.c | 6 ++ 3 files changed, 224 insertions(+), 9 deletions(-) commit 91b91309db02c44cd244a1c86f928b4e49422eff Author: Justin Tee <justin.tee@broadcom.com> Date: Thu Dec 12 15:33:06 2024 -0800 scsi: lpfc: Update definition of firmware configuration mbox cmds There are unused fields in mailbox commands that query for firmware configuration information. As such, update the struct definitions by correcting the name of certain fields and removing the unused fields. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20241212233309.71356-8-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/lpfc/lpfc_hw4.h | 85 +++++++++++++------------------------------ drivers/scsi/lpfc/lpfc_init.c | 7 +--- drivers/scsi/lpfc/lpfc_sli4.h | 2 - 3 files changed, 28 insertions(+), 66 deletions(-) commit 3f8f9f16f844a1124da2f3ce674deaf08921fb3a Author: Justin Tee <justin.tee@broadcom.com> Date: Thu Dec 12 15:33:05 2024 -0800 scsi: lpfc: Change lpfc_nodelist save_flags member into a bitmask In attempt to reduce the amount of unnecessary ndlp->lock acquisitions in the lpfc driver, change save_flags into an unsigned long bitmask and use clear_bit/test_bit bitwise atomic APIs instead of reliance on ndlp->lock for synchronization. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20241212233309.71356-7-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/lpfc/lpfc_ct.c | 6 ++---- drivers/scsi/lpfc/lpfc_disc.h | 10 +++++----- drivers/scsi/lpfc/lpfc_els.c | 12 +++--------- drivers/scsi/lpfc/lpfc_hbadisc.c | 13 ++----------- drivers/scsi/lpfc/lpfc_init.c | 4 ++-- drivers/scsi/lpfc/lpfc_scsi.c | 19 ++++++++----------- drivers/scsi/lpfc/lpfc_vport.c | 22 +++++++++++----------- 7 files changed, 33 insertions(+), 53 deletions(-) commit 06dbe31e8950b1effb2e0ff98d1162416c406e95 Author: Justin Tee <justin.tee@broadcom.com> Date: Thu Dec 12 15:33:04 2024 -0800 scsi: lpfc: Add handling for LS_RJT reason explanation authentication required When a LS_RJT is received with reason explanation authentication required, current driver logic is to retry the PLOGI up to 48 times. In the worse case scenario, 48 retries can take longer than dev_loss_tmo and if there is an RSCN received indicating an authentication requirement change, the driver may miss processing it. Fix by adding logic to specifically handle reason explanation authentication required and set the max retry count to 8 times. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20241212233309.71356-6-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/lpfc/lpfc_els.c | 26 ++++++++++++++++++++++++++ drivers/scsi/lpfc/lpfc_hw.h | 1 + 2 files changed, 27 insertions(+) commit ee80d8c2d4ccebed1015f6c9ba6a07c85e149785 Author: Justin Tee <justin.tee@broadcom.com> Date: Thu Dec 12 15:33:03 2024 -0800 scsi: lpfc: Modify handling of ADISC based on ndlp state and RPI registration In lpfc_check_adisc, remove the requirement that the ndlp object must have been RPI registered. Whether or not the ndlp is RPI registered is unrelated to verifying that the received ADISC is intended for that ndlp rport object. After ADISC receipt, there's no need to put the ndlp state into NPR. Let the cmpl routines from the actions taken earlier in ADISC handling set the proper ndlp state. Also, refactor when a RESUME_RPI mailbox command should be sent. It should only be sent if the RPI registered flag is set. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20241212233309.71356-5-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/lpfc/lpfc_nportdisc.c | 43 +++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 19 deletions(-) commit bb33b07ac6e3fede9b54cd8bf83a66dbdc6afe89 Author: Justin Tee <justin.tee@broadcom.com> Date: Thu Dec 12 15:33:02 2024 -0800 scsi: lpfc: Delete NLP_TARGET_REMOVE flag due to obsolete usage Remove the NLP_TARGET_REMOVE flag as its usage is obsolete. The current framework is to rely on the lpfc_dev_loss_tmo_callbk from upper layer to notify final ndlp kref release. There's no need to specifically set NLP_EVT_DEVICE_RM when a LOGO completes. The dev_loss_tmo_callbk is responsible for the final kref put. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20241212233309.71356-4-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/lpfc/lpfc_disc.h | 1 - drivers/scsi/lpfc/lpfc_els.c | 17 +---------------- drivers/scsi/lpfc/lpfc_nportdisc.c | 10 ++++++---- 3 files changed, 7 insertions(+), 21 deletions(-) commit 17cb5e986e7aec3f4f599636e0775a4133690b4d Author: Justin Tee <justin.tee@broadcom.com> Date: Thu Dec 12 15:33:01 2024 -0800 scsi: lpfc: Restrict the REG_FCFI MAM field to FCoE adapters only Qualify setting the REG_FCFI MAM field to FCoE adapters only by keying off HBA_FCOE_MODE phba->hba_flag. The field is not applicable to FC adapters. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20241212233309.71356-3-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/lpfc/lpfc_mbox.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1ff0f95ade41d1f56ecad091e35baec6f479241c Author: Justin Tee <justin.tee@broadcom.com> Date: Thu Dec 12 15:33:00 2024 -0800 scsi: lpfc: Redefine incorrect type in lpfc_create_device_data() Fix smatch warning by redefining local variable memory_flags from int to gfp_t. lpfc_scsi.c: warning: incorrect type in argument 2 (different base types) lpfc_scsi.c: expected restricted gfp_t [usertype] gfp_mask lpfc_scsi.c: got int memory_flags Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20241212233309.71356-2-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/lpfc/lpfc_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit affd1c83e090133a3d1750916c7911b20f8911c0 Author: Marc Zyngier <maz@kernel.org> Date: Tue Dec 17 14:23:20 2024 +0000 KVM: arm64: nv: Document EL2 timer API Acked-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241217142321.763801-13-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> Documentation/virt/kvm/devices/vcpu.rst | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 0bc9a9e85fcf4ffb69846b961273fde4eb0d03ab Author: Marc Zyngier <maz@kernel.org> Date: Tue Dec 17 14:23:19 2024 +0000 KVM: arm64: Work around x1e's CNTVOFF_EL2 bogosity It appears that on Qualcomm's x1e CPU, CNTVOFF_EL2 doesn't really work, specially with HCR_EL2.E2H=1. A non-zero offset results in a screaming virtual timer interrupt, to the tune of a few 100k interrupts per second on a 4 vcpu VM. This is also evidenced by this CPU's inability to correctly run any of the timer selftests. The only case this doesn't break is when this register is set to 0, which breaks VM migration. When HCR_EL2.E2H=0, the timer seems to behave normally, and does not result in an interrupt storm. As a workaround, use the fact that this CPU implements FEAT_ECV, and trap all accesses to the virtual timer and counter, keeping CNTVOFF_EL2 set to zero, and emulate accesses to CVAL/TVAL/CTL and the counter itself, fixing up the timer to account for the missing offset. And if you think this is disgusting, you'd probably be right. Acked-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241217142321.763801-12-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/cputype.h | 2 ++ arch/arm64/kernel/cpu_errata.c | 8 ++++++ arch/arm64/kernel/image-vars.h | 3 ++ arch/arm64/kvm/arch_timer.c | 58 ++++++++++++++++++++++++++++++++++++-- arch/arm64/kvm/hyp/nvhe/timer-sr.c | 16 ++++++++--- arch/arm64/kvm/sys_regs.c | 3 +- arch/arm64/tools/cpucaps | 1 + include/kvm/arm_arch_timer.h | 7 +++++ 8 files changed, 90 insertions(+), 8 deletions(-) commit d1e37a50e1d781201768c89314532f6ab87e5a42 Author: Marc Zyngier <maz@kernel.org> Date: Tue Dec 17 14:23:18 2024 +0000 KVM: arm64: nv: Sanitise CNTHCTL_EL2 Inject some sanity in CNTHCTL_EL2, ensuring that we don't handle more than we advertise to the guest. Acked-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241217142321.763801-11-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 2 +- arch/arm64/kvm/nested.c | 15 +++++++++++++++ include/clocksource/arm_arch_timer.h | 2 ++ 3 files changed, 18 insertions(+), 1 deletion(-) commit 479428cc3dc99bbe28954b62b053b22accbfd1fd Author: Marc Zyngier <maz@kernel.org> Date: Tue Dec 17 14:23:17 2024 +0000 KVM: arm64: nv: Propagate CNTHCTL_EL2.EL1NV{P,V}CT bits Allow a guest hypervisor to trap accesses to CNT{P,V}CT_EL02 by propagating these trap bits to the host trap configuration. Acked-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241217142321.763801-10-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/arch_timer.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c271269e3570766724820bcb76a144125dead272 Author: Marc Zyngier <maz@kernel.org> Date: Tue Dec 17 14:23:16 2024 +0000 KVM: arm64: nv: Add trap routing for CNTHCTL_EL2.EL1{NVPCT,NVVCT,TVT,TVCT} For completeness, fun, and cerebral meltdown, add the virtualisation related traps to the counter and timers. Acked-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241217142321.763801-9-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/emulate-nested.c | 58 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) commit b86fc215dc26d8e1bb274f0a7990b5deab740ac8 Author: Marc Zyngier <maz@kernel.org> Date: Tue Dec 17 14:23:15 2024 +0000 KVM: arm64: Handle counter access early in non-HYP context We already deal with CNTPCT_EL0 accesses in non-HYP context. Let's add CNTVCT_EL0 as a good measure. This is also an opportunity to simplify things and make it plain that this code is only for non-HYP context handling. Acked-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241217142321.763801-8-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/include/hyp/switch.h | 34 ++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 9b3b2f00291e1abd54bff345761a7fadd8df4daa Author: Marc Zyngier <maz@kernel.org> Date: Tue Dec 17 14:23:14 2024 +0000 KVM: arm64: nv: Accelerate EL0 counter accesses from hypervisor context Similarly to handling the physical timer accesses early when FEAT_ECV causes a trap, we try to handle the physical counter without returning to the general sysreg handling. More surprisingly, we introduce something similar for the virtual counter. Although this isn't necessary yet, it will prove useful on systems that have a broken CNTVOFF_EL2 implementation. Yes, they exist. Acked-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241217142321.763801-7-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/vhe/switch.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 338f8ea51944d02ea29eadb3d5fa9196e74a100d Author: Marc Zyngier <maz@kernel.org> Date: Tue Dec 17 14:23:13 2024 +0000 KVM: arm64: nv: Accelerate EL0 timer read accesses when FEAT_ECV in use Although FEAT_ECV allows us to correctly emulate the timers, it also reduces performances pretty badly. Mitigate this by emulating the CTL/CVAL register reads in the inner run loop, without returning to the general kernel. Acked-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241217142321.763801-6-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/arch_timer.c | 21 +------ arch/arm64/kvm/hyp/include/hyp/switch.h | 5 ++ arch/arm64/kvm/hyp/vhe/switch.c | 99 +++++++++++++++++++++++++++++++++ include/kvm/arm_arch_timer.h | 15 +++++ 4 files changed, 122 insertions(+), 18 deletions(-) commit 2cd2a77f9c32f1eaf599fb72cbcd0394938a8b58 Author: Marc Zyngier <maz@kernel.org> Date: Tue Dec 17 14:23:12 2024 +0000 KVM: arm64: nv: Use FEAT_ECV to trap access to EL0 timers Although FEAT_NV2 makes most things fast, it also makes it impossible to correctly emulate the timers, as the sysreg accesses are redirected to memory. FEAT_ECV addresses this by giving a hypervisor the ability to trap the EL02 sysregs as well as the virtual timer. Add the required trap setting to make use of the feature, allowing us to elide the ugly resync in the middle of the run loop. Acked-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241217142321.763801-5-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/arch_timer.c | 36 +++++++++++++++++++++++++++++++++--- include/clocksource/arm_arch_timer.h | 2 ++ 2 files changed, 35 insertions(+), 3 deletions(-) commit cc45963cbf6334d2b9078f06efef9864639cddd0 Author: Marc Zyngier <maz@kernel.org> Date: Tue Dec 17 14:23:11 2024 +0000 KVM: arm64: nv: Publish emulated timer interrupt state in the in-memory state With FEAT_NV2, the EL0 timer state is entirely stored in memory, meaning that the hypervisor can only provide a very poor emulation. The only thing we can really do is to publish the interrupt state in the guest view of CNT{P,V}_CTL_EL0, and defer everything else to the next exit. Only FEAT_ECV will allow us to fix it, at the cost of extra trapping. Suggested-by: Chase Conklin <chase.conklin@arm.com> Suggested-by: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com> Acked-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241217142321.763801-4-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/arch_timer.c | 21 +++++++++++++++++++++ arch/arm64/kvm/arm.c | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) commit 4bad3068cfa9fc38dd767441871e0edab821105b Author: Marc Zyngier <maz@kernel.org> Date: Tue Dec 17 14:23:10 2024 +0000 KVM: arm64: nv: Sync nested timer state with FEAT_NV2 Emulating the timers with FEAT_NV2 is a bit odd, as the timers can be reconfigured behind our back without the hypervisor even noticing. In the VHE case, that's an actual regression in the architecture... Co-developed-by: Christoffer Dall <christoffer.dall@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@arm.com> Acked-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241217142321.763801-3-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/arch_timer.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ arch/arm64/kvm/arm.c | 3 +++ include/kvm/arm_arch_timer.h | 1 + 3 files changed, 48 insertions(+) commit b59dbb91f7636a89b54ab8fff756afe320ba6549 Author: Marc Zyngier <maz@kernel.org> Date: Tue Dec 17 14:23:09 2024 +0000 KVM: arm64: nv: Add handling of EL2-specific timer registers Add the required handling for EL2 and EL02 registers, as well as EL1 registers used in the E2H context. This includes handling the virtual timer accesses when CNTHCTL_EL2.EL1TVT or CNTHCTL_EL2.EL1TVCT are set. Acked-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241217142321.763801-2-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/sysreg.h | 4 + arch/arm64/kvm/sys_regs.c | 143 +++++++++++++++++++++++++++++++++++ include/clocksource/arm_arch_timer.h | 2 + 3 files changed, 149 insertions(+) commit 850f814b01a54cf844225c6c45016a29fccceab4 Author: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr> Date: Fri Dec 13 23:57:29 2024 +0100 scsi: myrb: Remove dead code * reported by Coverity ID 1602240 * ldev_info is always true, therefore the branch statement is never called. Fixes: 081ff398c56c ("scsi: myrb: Add Mylex RAID controller (block interface)") Cc: Hannes Reinecke <hare@kernel.org> Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> Cc: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr> Link: https://lore.kernel.org/r/20241213225852.62741-2-ariel.otilibili-anieli@eurecom.fr Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/myrb.c | 2 -- 1 file changed, 2 deletions(-) commit ad7c3c0cb8f61d6d5a48b83e62ca4a9fd2f26153 Author: Paul Menzel <pmenzel@molgen.mpg.de> Date: Thu Dec 12 23:18:12 2024 +0100 scsi: mpt3sas: Set ioc->manu_pg11.EEDPTagMode directly to 1 Currently, the code does: if (x == 0) { x &= ~0x3; x |= 0x1; } Zeroing bits 0 and 1 of a variable that is 0 is not necessary. So directly set the variable to 1. Cc: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Fixes: f92363d12359 ("[SCSI] mpt3sas: add new driver supporting 12GB SAS") Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Link: https://lore.kernel.org/r/20241212221817.78940-2-pmenzel@molgen.mpg.de Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/mpt3sas/mpt3sas_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 09ecc187ebde77ebbfc444b2c08192024e2dc6a4 Author: Paul Menzel <pmenzel@molgen.mpg.de> Date: Thu Dec 12 23:18:11 2024 +0100 scsi: mpt3sas: Add details to EEDPTagMode error message Linux 5.15 logs the error below mpt3sas_cm0: overriding NVDATA EEDPTagMode setting on a Dell PowerEdge T440 with the card below. 5e:00.0 Serial Attached SCSI controller [0107]: Broadcom / LSI SAS3008 PCI-Express Fusion-MPT SAS-3 [1000:0097] (rev 02) It’s not clear to a user what this error is about. As a first step to improve this, add the values to the error message. Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Link: https://lore.kernel.org/r/20241212221817.78940-1-pmenzel@molgen.mpg.de Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c13b10a754bc49d92dd562e78e2d950546f5bc40 Author: Siddharth Menon <simeddon@gmail.com> Date: Tue Dec 10 09:32:02 2024 +0530 scsi: esp: Fix variable typo Renamed ESP_CONGIG4_TEST to ESP_CONFIG4_TEST Signed-off-by: Siddharth Menon <simeddon@gmail.com> Link: https://lore.kernel.org/r/20241210040202.11112-1-simeddon@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/esp_scsi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 409f21010d92a9a5c3b66bacd3b853f4d71ca26c Author: Eric Biggers <ebiggers@google.com> Date: Thu Dec 12 20:19:47 2024 -0800 scsi: ufs: crypto: Remove ufs_hba_variant_ops::program_key There are no longer any implementations of ufs_hba_variant_ops::program_key, so remove it. As a result, ufshcd_program_key() no longer can return an error, so also clean it up to return void. Signed-off-by: Eric Biggers <ebiggers@google.com> Link: https://lore.kernel.org/r/20241213041958.202565-5-ebiggers@kernel.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/ufs/core/ufshcd-crypto.c | 20 ++++++-------------- include/ufs/ufshcd.h | 3 --- 2 files changed, 6 insertions(+), 17 deletions(-) commit 30b32c647cf309d8fc70ba068a2918033e3a1bc4 Author: Eric Biggers <ebiggers@google.com> Date: Thu Dec 12 20:19:46 2024 -0800 scsi: ufs: qcom: Convert to use UFSHCD_QUIRK_CUSTOM_CRYPTO_PROFILE By default the UFS core is responsible for initializing the blk_crypto_profile, but Qualcomm platforms have their own way of programming and evicting crypto keys. So currently ufs_hba_variant_ops::program_key is used to redirect control flow from ufshcd_program_key(). This has worked until now, but it's a bit of a hack, given that the key (and algorithm ID etc.) ends up being converted from blk_crypto_key => ufs_crypto_cfg_entry => SCM call parameters, where the intermediate ufs_crypto_cfg_entry step is unnecessary. Taking a similar approach with the upcoming wrapped key support, the implementation of which is similarly platform-specific, would require adding four new methods to ufs_hba_variant_ops, changing program_key to take the struct blk_crypto_key, and adding a new UFSHCD_CAP_* flag to indicate support for wrapped keys. This patch takes a different approach. It changes ufs-qcom to use the existing UFSHCD_QUIRK_CUSTOM_CRYPTO_PROFILE which was recently added for ufs-exynos. This allows it to override the full blk_crypto_profile, eliminating the need for the existing ufs_hba_variant_ops::program_key and the hooks that would have been needed for wrapped key support. It does require a bit of duplicated code to read the crypto capability registers, but it's worth the simplification in design with ufs-qcom and ufs-exynos now using the same method to customize the crypto profile, and it makes it much easier to add wrapped key support. Tested-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> # sm8650 Signed-off-by: Eric Biggers <ebiggers@google.com> Link: https://lore.kernel.org/r/20241213041958.202565-4-ebiggers@kernel.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/ufs/host/ufs-qcom.c | 91 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 72 insertions(+), 19 deletions(-) commit 75d0c649eca47af21533d9636723574116fe6987 Author: Eric Biggers <ebiggers@google.com> Date: Thu Dec 12 20:19:45 2024 -0800 scsi: ufs: crypto: Add ufs_hba_from_crypto_profile() Add a helper function that encapsulates a container_of expression. For now there are two users but soon there will be more. Tested-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> # sm8650 Signed-off-by: Eric Biggers <ebiggers@google.com> Link: https://lore.kernel.org/r/20241213041958.202565-3-ebiggers@kernel.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/ufs/core/ufshcd-crypto.c | 6 ++---- include/ufs/ufshcd.h | 8 ++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) commit 7a0905caf5665be41094a6ceb5e9d2524de4627a Author: Eric Biggers <ebiggers@google.com> Date: Mon Dec 9 19:08:39 2024 -0800 scsi: ufs: qcom: Fix crypto key eviction Commit 56541c7c4468 ("scsi: ufs: ufs-qcom: Switch to the new ICE API") introduced an incorrect check of the algorithm ID into the key eviction path, and thus qcom_ice_evict_key() is no longer ever called. Fix it. Fixes: 56541c7c4468 ("scsi: ufs: ufs-qcom: Switch to the new ICE API") Cc: stable@vger.kernel.org Cc: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Eric Biggers <ebiggers@google.com> Link: https://lore.kernel.org/r/20241210030839.1118805-1-ebiggers@kernel.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/ufs/host/ufs-qcom.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 5d10344ab65271eab7607a2cef0ddbfc4720d133 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Mon Dec 23 18:02:18 2024 +0000 scsi: isci: Remove unused isci_remote_device_reset_complete() isci_remote_device_reset_complete() last use was removed in 2012 by commit 14aaa9f0a318 ("isci: Redesign device suspension, abort, cleanup.") Remove it. It was the last user of sci_remote_device_reset_complete(). Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://lore.kernel.org/r/20241223180218.50426-1-linux@treblig.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/isci/remote_device.c | 29 ----------------------------- drivers/scsi/isci/remote_device.h | 17 ----------------- 2 files changed, 46 deletions(-) commit 6e67b32087e34965bbcd421251ba42a8e5667669 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Mon Dec 23 18:01:10 2024 +0000 scsi: iscsi: Remove unused iscsi_create_session() iscsi_create_session() last use was removed in 2008 by commit 756135215ec7 ("[SCSI] iscsi: remove session and host binding in libiscsi") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://lore.kernel.org/r/20241223180110.50266-1-linux@treblig.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_transport_iscsi.c | 27 --------------------------- include/scsi/scsi_transport_iscsi.h | 4 ---- 2 files changed, 31 deletions(-) commit 4d43d350a4b0ec987fe1d2f106f409a125a1a466 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Sun Dec 22 21:35:24 2024 +0000 scsi: target: Remove unused functions The functions: iscsit_check_unsolicited_dataout() iscsit_fail_session() iscsit_create_conn_recovery_datain_values() iscsit_create_conn_recovery_dataout_values() iscsit_tpg_dump_params() iscsit_print_session_params() were all added in 2011 by commit e48354ce078c ("iscsi-target: Add iSCSI fabric support for target v4.1") but have remained unused. Remove them. Having deleted them, the functions: iscsi_print_params() iscsi_dump_conn_ops() iscsi_dump_sess_ops() are also unused. Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://lore.kernel.org/r/20241222213524.270735-1-linux@treblig.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/target/iscsi/iscsi_target.c | 15 ------- drivers/target/iscsi/iscsi_target.h | 1 - drivers/target/iscsi/iscsi_target_erl2.c | 48 --------------------- drivers/target/iscsi/iscsi_target_erl2.h | 2 - drivers/target/iscsi/iscsi_target_parameters.c | 48 --------------------- drivers/target/iscsi/iscsi_target_parameters.h | 3 -- drivers/target/iscsi/iscsi_target_tpg.c | 5 --- drivers/target/iscsi/iscsi_target_tpg.h | 1 - drivers/target/iscsi/iscsi_target_util.c | 58 -------------------------- drivers/target/iscsi/iscsi_target_util.h | 2 - 10 files changed, 183 deletions(-) commit a9dcee18a2200ee6c273ef9e0915b83179cc2ff3 Author: Randy Dunlap <rdunlap@infradead.org> Date: Thu Dec 19 13:49:28 2024 -0800 scsi: documentation: scsi_eh: updates for EH changes SCSI_SOFTIRQ and scsi_softirq() are no longer used. Change to block layer equivalents. scsi_setup_cmd_retry() has been deleted. Remove references to it. SCSI_EH_CANCEL_CMD has been deleted. Remove references to it. scsi_eh_abort_cmds() has been deleted. Remove references to it. [mkp: fixed START STOP UNIT] Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20241219214928.1170302-1-rdunlap@infradead.org Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> Cc: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Documentation/scsi/scsi_eh.rst | 46 +++++++++--------------------------------- 1 file changed, 9 insertions(+), 37 deletions(-) commit faaf18d3f353963a9d9b4c59fabb67b6f86f7946 Author: Frederic Weisbecker <frederic@kernel.org> Date: Wed Dec 11 16:40:18 2024 +0100 scsi: qedi: Use kthread_create_on_cpu() Use the proper API instead of open coding it. However it looks like qedi_percpu_io_thread() kthread could be replaced by the use of a high prio workqueue instead. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/r/20241211154035.75565-6-frederic@kernel.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/qedi/qedi_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f33f1a88cf0f379c5b8bf180a72f0217efa0422f Author: Frederic Weisbecker <frederic@kernel.org> Date: Wed Dec 11 16:40:17 2024 +0100 scsi: bnx2i: Use kthread_create_on_cpu() Use the proper API instead of open coding it. However it looks like bnx2i_percpu_io_thread() kthread could be replaced by the use of a high prio workqueue instead. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/r/20241211154035.75565-5-frederic@kernel.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/bnx2i/bnx2i_init.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 0d19b96cf159ca9b0a96275cad9e41adb2726889 Author: Frederic Weisbecker <frederic@kernel.org> Date: Wed Dec 11 16:40:16 2024 +0100 scsi: bnx2fc: Use kthread_create_on_cpu() Use the proper API instead of open coding it. However it looks like bnx2fc_percpu_io_thread() kthread could be replaced by the use of a high prio workqueue instead. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/r/20241211154035.75565-4-frederic@kernel.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 40417789bad6222404d50a35266ed7726954378b Author: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Date: Tue Dec 10 12:30:28 2024 +0100 scsi: MAINTAINERS: Remove myself as isci driver maintainer I'm leaving Intel and I could not find a new maintainer for this so mark it as orphan. Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Link: https://lore.kernel.org/r/20241210113028.13810-1-artur.paszkiewicz@intel.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 208a55c4818cda2b57a92f4f99a2886a2b002eec Author: Chuanhong Guo <gch981213@gmail.com> Date: Mon Dec 23 11:43:49 2024 +0800 dt-bindings: vendor-prefixes: add Siflower Shanghai Siflower Communication Co. is a manufacturer for home router SoCs. Add a vendor prefix for it. Link: http://www.siflower.com.cn/en Signed-off-by: Chuanhong Guo <gch981213@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241223034350.215375-1-gch981213@gmail.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 31bd1f4517b651e132fae7cbb5f63b190015da94 Author: MD Danish Anwar <danishanwar@ti.com> Date: Fri Dec 20 15:35:08 2024 +0530 MAINTAINERS: Add entry for linux/pruss_driver.h include/linux/pruss_driver.h is an orphan file. Add entry for this in the MAINTAINERS file. Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Link: https://lore.kernel.org/r/20241220100508.1554309-3-danishanwar@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 6b51892b31fe83fe7cc8cf69e4bf7721cf08951b Author: Anurag Dutta <a-dutta@ti.com> Date: Wed Nov 27 13:26:44 2024 +0530 arm64: dts: ti: k3-j7200: Add node to disable loopback connection CTRLMMR_MCU_SPI1_CTRL register controls if MCU_SPI1 is directly connected to SPI3 in the MAIN Domain (default) or if MCU_SPI1 and SPI3 are independently pinned out. By default, the field SPI1_LINKDIS (Bit 0) is set to 0h. In order to disable the direct connection, the SPI1_LINKDIS (Bit 0) needs to be set to 1h. Model this functionality as a "reg-mux" device and based on the idle-state property, enable/disable the connection bewtween MCU_SPI1 and MAIN_SPI3. The register field description has been referred from J7200 TRM [1] (Table 5-517. CTRLMMR_MCU_SPI1_CTRL Register Field Descriptions). [1] https://www.ti.com/lit/pdf/spruiu1 Signed-off-by: Anurag Dutta <a-dutta@ti.com> Link: https://lore.kernel.org/r/20241127075644.210759-1-a-dutta@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts | 4 ++++ arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi | 7 +++++++ 2 files changed, 11 insertions(+) commit b48888c9c4af15fcaa57076aeff6c48c90809bc5 Author: Thomas Richard <thomas.richard@bootlin.com> Date: Mon Dec 30 10:49:00 2024 +0100 arm64: dts: ti: k3-j784s4: Use ti,j7200-padconf compatible Like on j7200, pinctrl contexts shall be saved and restored during suspend-to-ram. So use ti,j7200-padconf compatible. Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> Link: https://lore.kernel.org/r/20241230-j784s4-s2r-pinctrl-v2-1-35039fafe2ca@bootlin.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi | 6 +++--- .../boot/dts/ti/k3-j784s4-j742s2-mcu-wakeup-common.dtsi | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) commit 3cc7633cab8b55a77c86aae3349d83ab1e13a5bb Author: Siddharth Vadapalli <s-vadapalli@ti.com> Date: Fri Dec 20 11:15:16 2024 +0530 arm64: dts: ti: k3-am62p-j722s-common-main: Enable USB0 for DFU boot Add the "bootph-all" property to the "usb0" device-tree node. This is required for the USB0 instance of USB to be functional at all stages of USB DFU boot. Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Reviewed-by: Roger Quadros <rogerq@kernel.org> Link: https://lore.kernel.org/r/20241220054550.153360-1-s-vadapalli@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 1 + 1 file changed, 1 insertion(+) commit 6f0232577e260cdbc25508e27bb0b75ade7e7ebc Author: Bryan Brattlof <bb@ti.com> Date: Tue Dec 10 14:59:25 2024 -0600 arm64: dts: ti: k3-am62a: Remove duplicate GICR reg The GIC Redistributor control range is mapped twice. Remove the extra entry from the reg range. Fixes: 5fc6b1b62639 ("arm64: dts: ti: Introduce AM62A7 family of SoCs") Reported-by: Bin Liu <b-liu@ti.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Link: https://lore.kernel.org/r/20241210-am62-gic-fixup-v1-2-758b4d5b4a0a@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 1 - 1 file changed, 1 deletion(-) commit 72c691d77ea5d0c4636fd3e9f0ad80d813c7d1a7 Author: Bryan Brattlof <bb@ti.com> Date: Tue Dec 10 14:59:24 2024 -0600 arm64: dts: ti: k3-am62: Remove duplicate GICR reg The GIC Redistributor control register range is mapped twice. Remove the extra entry from the reg range. Fixes: f1d17330a5be ("arm64: dts: ti: Introduce base support for AM62x SoC") Reported-by: Bin Liu <b-liu@ti.com> Signed-off-by: Bryan Brattlof <bb@ti.com> Link: https://lore.kernel.org/r/20241210-am62-gic-fixup-v1-1-758b4d5b4a0a@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 1 - 1 file changed, 1 deletion(-) commit 89d8dbee6d1860c69039d8859003808b5e90266c Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 11:41:14 2024 -0600 arm64: dts: ti: k3-am67a-beagley-ai: Add remote processor nodes Add nodes for the R5F and C7x cores on the SoC. This includes the mailbox and memory carveouts used by these remote cores. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20241203174114.94751-2-afd@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts | 158 +++++++++++++++++++++++++ 1 file changed, 158 insertions(+) commit 61c1c774d33a5305f5440380d2be5e23464cd3de Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 11:41:13 2024 -0600 arm64: dts: ti: k3-am62p: Enable Mailbox nodes at the board level Mailbox nodes defined in the top-level J722s/AM62p SoC dtsi files are incomplete and may not be functional unless they are extended with a chosen interrupt and connection to a remote processor. Disable the Mailbox nodes in the dtsi files and only enable the ones that are actually used on a given board. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20241203174114.94751-1-afd@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 4 ++++ arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 4 ++++ 2 files changed, 8 insertions(+) commit 17d0723c6cf841ebaf510eaf9bb1ebf4991d6e9d Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 10:40:31 2024 -0600 arm64: dts: ti: k3-am625-sk: Remove M4 mailbox node redefinition This node is already defined in the included k3-am62x-sk-common.dtsi. Remove this redefinition. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20241203164031.20211-1-afd@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am625-sk.dts | 7 ------- 1 file changed, 7 deletions(-) commit 9442f963098f1eb9d1565fdd694e506d0c2c6f45 Author: Bhavya Kapoor <b-kapoor@ti.com> Date: Tue Nov 5 14:42:24 2024 +0530 arm64: dts: ti: k3-j722s-evm: Enable support for mcu_i2c0 Enable support for mcu_i2c0 and add pinmux required to bring out the mcu_i2c0 signals on 40-pin RPi expansion header on the J722S EVM. Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com> Signed-off-by: Shreyash Sinha <s-sinha@ti.com> Reviewed-by: Prasanth Babu Mantena <p-mantena@ti.com> Link: https://lore.kernel.org/r/20241105091224.23453-1-b-kapoor@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ba5811562988652d88de7503b3bd12da063ae729 Author: Fei Shao <fshao@chromium.org> Date: Wed Dec 4 22:25:38 2024 +0800 drm/mediatek: dp: Support flexible length of DP calibration data The DP calibration data is stored in nvmem cells, and the data layout is described in the `mtk_dp_efuse_fmt` arrays for each platform. There is no guarantee that the data is always a 4-length u32 cell array. For example, MT8188 has a data length of 3, preventing it from passing the preliminary check and undergoing calibration. Update the logic to support flexible data lengths. Specifically, we validate the length returned from `nvmem_cell_read()` against the platform-specific efuse format. If out-of-bound access is detected, fall back to the default calibration values. This likely indicates an error in either the efuse data length described in DT or the efuse format within the driver. Signed-off-by: Fei Shao <fshao@chromium.org> Reviewed-by: CK Hu <ck.hu@mediatek.com> Link: https://patchwork.kernel.org/project/dri-devel/patch/20241204142626.158395-1-fshao@chromium.org/ Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> drivers/gpu/drm/mediatek/mtk_dp.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 88fca61ba5e2ecd0552b9dea2500a16da12d0106 Author: José Roberto de Souza <jose.souza@intel.com> Date: Fri Dec 27 10:32:19 2024 -0800 Revert "drm/xe: Force write completion of MI_STORE_DATA_IMM" This reverts commit 1460bb1fef9ccf7390af0d74a15252442fd6effd. In all places the MI_STORE_DATA_IMM are not followed by a read of the same memory address in the same batch buffer and the posted writes are flushed with PIPE_CONTROL or MI_FLUSH_DW in xe_ring_ops.c functions so there is no need to set this register. Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Fixes: 1460bb1fef9c ("drm/xe: Force write completion of MI_STORE_DATA_IMM") Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241227183230.101334-1-jose.souza@intel.com drivers/gpu/drm/xe/instructions/xe_mi_commands.h | 13 ++++++------- drivers/gpu/drm/xe/xe_migrate.c | 11 +++-------- drivers/gpu/drm/xe/xe_ring_ops.c | 6 ++---- 3 files changed, 11 insertions(+), 19 deletions(-) commit 28596f0dbf2452a6629026cf4bd9763f2456be64 Author: Chintan Vankar <c-vankar@ti.com> Date: Thu Nov 14 22:23:31 2024 +0530 arm64: dts: ti: k3-am62x-sk-common: Add bootph-all property in cpsw_mac_syscon node Ethernet boot requires CPSW node to be present starting from R5 SPL stage. Add bootph-all property in CPSW MAC's eFuse node cpsw_mac_syscon to enable this node during SPL stage along with later boot stages so that CPSW port will get static MAC address. Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com> Signed-off-by: Chintan Vankar <c-vankar@ti.com> Link: https://lore.kernel.org/r/20241114165331.1279065-1-c-vankar@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 99b863d2e87210c70354a1c75cc5bcc7a3afdc01 Author: Ard Biesheuvel <ardb@kernel.org> Date: Wed Jan 1 12:51:20 2025 +0100 x86/sev: Disable UBSAN on SEV code that may execute very early Clang 14 and older may emit UBSAN instrumentation into code that is inlined into functions marked with __no_sanitize_undefined¹. This may result in faults when the code is executed very early, which may be the case for functions annotated as __head. Now that this requirement is strictly enforced, the build will fail in this case with the following message Absolute reference to symbol '.data' not permitted in .head.text Work around this by disabling UBSAN instrumentation on all SEV core code. ¹ https://lore.kernel.org/r/20250101024348.GA1828419@ax162 [ bp: Add a footnote with Nathan's detailed explanation and a Fixes tag ] Fixes: 3b6f99a94b04 ("x86/boot: Disable UBSAN in early boot code") Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20250101115119.114584-2-ardb@kernel.org arch/x86/coco/sev/Makefile | 3 +++ 1 file changed, 3 insertions(+) commit f72aada7bee42c4b43a272ef58bc4c9e1caa53d4 Author: Mihai Sain <mihai.sain@microchip.com> Date: Wed Dec 18 10:03:33 2024 +0200 ARM: dts: microchip: sam9x7: Add address/size to spi-controller nodes Since these properties are common for all spi subnodes, add them to SoC dtsi instead of board dts. Signed-off-by: Mihai Sain <mihai.sain@microchip.com> Link: https://lore.kernel.org/r/20241218080333.2225-3-mihai.sain@microchip.com Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> arch/arm/boot/dts/microchip/sam9x7.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit f0127f66528f550815320188e08ceb26f5f2f81b Author: Mihai Sain <mihai.sain@microchip.com> Date: Wed Dec 18 10:03:32 2024 +0200 ARM: dts: microchip: sam9x60: Add address/size to spi-controller nodes Since these properties are common for all spi subnodes, add them to SoC dtsi instead of board dts. Signed-off-by: Mihai Sain <mihai.sain@microchip.com> Link: https://lore.kernel.org/r/20241218080333.2225-2-mihai.sain@microchip.com Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> arch/arm/boot/dts/microchip/sam9x60.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 4d9e5965df04c0adf260c3009c55d5fe240f7286 Author: Cristian Birsan <cristian.birsan@microchip.com> Date: Tue Nov 19 18:01:07 2024 +0200 ARM: dts: microchip: sama5d27_wlsom1_ek: Add no-1-8-v property to sdmmc0 node Add no-1-8-v property to sdmmc0 node to keep VDDSDMMC power rail at 3.3V. This property will stop the LDO regulator from switching to 1.8V when the MMC core detects an UHS SD Card. VDDSDMMC power rail is used by all the SDMMC interface pins in GPIO mode (PA0 - PA13). On this board, PA10 is used as GPIO to enable the power switch controlling USB Vbus for the USB Host. The change is needed to fix the PA10 voltage level to 3.3V instead of 1.8V. Fixes: 5d4c3cfb63fe ("ARM: dts: at91: sama5d27_wlsom1: add SAMA5D27 wlsom1 and wlsom1-ek") Suggested-by: Mihai Sain <mihai.sain@microchip.com> Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com> Tested-by: Andrei Simion <andrei.simion@microchip.com> Link: https://lore.kernel.org/r/20241119160107.598411-3-cristian.birsan@microchip.com Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1_ek.dts | 1 + 1 file changed, 1 insertion(+) commit c21c23a0f2e9869676eff0d53fb89e151e14c873 Author: Cristian Birsan <cristian.birsan@microchip.com> Date: Tue Nov 19 18:01:06 2024 +0200 ARM: dts: microchip: sama5d29_curiosity: Add no-1-8-v property to sdmmc0 node Add no-1-8-v property to sdmmc0 node to keep VDDSDMMC power rail at 3.3V. This property will stop the LDO regulator from switching to 1.8V when the MMC core detects an UHS SD Card. VDDSDMMC power rail is used by all the SDMMC interface pins in GPIO mode (PA0 - PA13). On this board, PA6 is used as GPIO to enable the power switch controlling USB Vbus for the USB Host. The change is needed to fix the PA6 voltage level to 3.3V instead of 1.8V. Fixes: d85c4229e925 ("ARM: dts: at91: sama5d29_curiosity: Add device tree for sama5d29_curiosity board") Suggested-by: Mihai Sain <mihai.sain@microchip.com> Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com> Tested-by: Andrei Simion <andrei.simion@microchip.com> Link: https://lore.kernel.org/r/20241119160107.598411-2-cristian.birsan@microchip.com Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> arch/arm/boot/dts/microchip/at91-sama5d29_curiosity.dts | 1 + 1 file changed, 1 insertion(+) commit 747800ee7fdf80533538318608ae922f8b3d0069 Author: Ryan Wanner <Ryan.Wanner@microchip.com> Date: Fri Dec 6 12:59:55 2024 -0700 ARM: dts: at91: Add sama7d65 pinmux Add sama7d65 pin descriptions. Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/a8f880b89cd4470526a2955a0b6aaaaa24ba65b8.1733505542.git.Ryan.Wanner@microchip.com Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> arch/arm/boot/dts/microchip/sama7d65-pinfunc.h | 947 +++++++++++++++++++++++++ 1 file changed, 947 insertions(+) commit 452d18c78a469cd18b3f7bc7bc9427f9af390f7e Author: Ryan Wanner <Ryan.Wanner@microchip.com> Date: Fri Dec 20 14:07:14 2024 -0700 ARM: at91: add new SoC sama7d65 Add new SoC from at91 family: sama7d65 Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/aafa6115adc52d30bc83206f8fab5964d4dd7fb7.1734723585.git.Ryan.Wanner@microchip.com Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> arch/arm/mach-at91/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 220043b06fded9909bdf62e3355396eff0bb8a52 Author: Patrisious Haddad <phaddad@nvidia.com> Date: Mon Dec 30 16:14:04 2024 +0200 RDMA/mlx5: Fix link status down event for MPV The commit below prevented MPV from unloading correctly due to blocking the netdev down event, allow sending the event for MPV mode to maintain proper unload flow. Fixes: 379013776222 ("RDMA/mlx5: Handle link status event only for LAG device") Signed-off-by: Patrisious Haddad <phaddad@nvidia.com> Reviewed-by: Maor Gottlieb <maorg@nvidia.com> Link: https://patch.msgid.link/d7731478e456f61255af798a7fd4e64b006ddebb.1735567976.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/mlx5/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2762eab6d4140781840f253f9a04b8627017248b Author: Isaac Scott <isaac.scott@ideasonboard.com> Date: Tue Dec 17 11:13:51 2024 +0000 media: uvcvideo: Add Kurokesu C1 PRO camera Add support for the Kurokesu C1 PRO camera. This camera experiences the same issues faced by the Sonix Technology Co. 292A IPC AR0330. As such, enable the UVC_QUIRK_MJPEG_NO_EOF quirk for this device to prevent frames from being erroneously dropped. Signed-off-by: Isaac Scott <isaac.scott@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_driver.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 81f8c0e138c43610cf09b8d2a533068aa58e538e Author: Isaac Scott <isaac.scott@ideasonboard.com> Date: Thu Nov 28 14:51:44 2024 +0000 media: uvcvideo: Add new quirk definition for the Sonix Technology Co. 292a camera The Sonix Technology Co. 292A camera (which uses an AR0330 sensor), can produce MJPEG and H.264 streams concurrently. When doing so, it drops the last packets of MJPEG frames every time the H.264 stream generates a key frame. Set the UVC_QUIRK_MJPEG_NO_EOF quirk to work around the issue. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Isaac Scott <isaac.scott@ideasonboard.com> Link: https://lore.kernel.org/r/20241128145144.61475-3-isaac.scott@ideasonboard.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_driver.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c2eda35e675b6ea4a0a21a4b1167b121571a9036 Author: Isaac Scott <isaac.scott@ideasonboard.com> Date: Thu Nov 28 14:51:43 2024 +0000 media: uvcvideo: Implement dual stream quirk to fix loss of usb packets Some cameras, such as the Sonix Technology Co. 292A, exhibit issues when running two parallel streams, causing USB packets to be dropped when an H.264 stream posts a keyframe while an MJPEG stream is running simultaneously. This occasionally causes the driver to erroneously output two consecutive JPEG images as a single frame. To fix this, we inspect the buffer, and trigger a new frame when we find an SOI. Signed-off-by: Isaac Scott <isaac.scott@ideasonboard.com> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://lore.kernel.org/r/20241128145144.61475-2-isaac.scott@ideasonboard.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_video.c | 27 ++++++++++++++++++++++++++- drivers/media/usb/uvc/uvcvideo.h | 1 + 2 files changed, 27 insertions(+), 1 deletion(-) commit 9001d515443518d72222ba4d58e247696b625071 Author: Takashi Iwai <tiwai@suse.de> Date: Wed Jan 1 13:55:47 2025 +0100 ALSA: seq: Make dependency on UMP clearer CONFIG_SND_SEQ_UMP_CLIENT is a Kconfig for a sequencer client corresponding to the UMP rawmidi, while we have another major knob CONFIG_SND_SEQ_UMP that specifies whether the sequencer core supports UMP packets or not. Strictly speaking both of them are independent, but practically seen, it makes no sense to enable CONFIG_SND_SEQ_UMP_CLIENT without UMP support itself. This patch makes such an implicit dependency clearer. Now CONFIG_SND_SEQ_UMP_CLIENT depends on both CONFIG_SND_UMP and CONFIG_SND_SEQ_UMP. Meanwhile, CONFIG_SND_SEQ_UMP is enabled as default when CONFIG_SND_UMP is set. Fixes: 81fd444aa371 ("ALSA: seq: Bind UMP device") Link: https://patch.msgid.link/20250101125548.25961-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/core/seq/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a6a035a83c104694fcec87da1304cb94513c7609 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 22 21:30:25 2024 +0100 of: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241222-sysfs-const-bin_attr-of-v1-1-99cc2e8c2a55@weissschuh.net Signed-off-by: Rob Herring (Arm) <robh@kernel.org> drivers/of/kobj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ead0db14c7266c34b1f8a6db6e15e2f4100a9e9e Author: Borislav Petkov (AMD) <bp@alien8.de> Date: Tue Dec 31 13:58:56 2024 +0100 x86/microcode/AMD: Remove ret local var in early_apply_microcode() No functional changes. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> arch/x86/kernel/cpu/microcode/amd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 78e0aadbd4c6807a06a9d25bc190fe515d3f3c42 Author: Borislav Petkov (AMD) <bp@alien8.de> Date: Mon Nov 18 17:17:24 2024 +0100 x86/microcode/AMD: Have __apply_microcode_amd() return bool This is the natural thing to do anyway. No functional changes. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> arch/x86/kernel/cpu/microcode/amd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d8317f3d8e6b412ff51ea66f1de2b2f89835f811 Author: Nikolay Borisov <nik.borisov@suse.com> Date: Fri Oct 18 18:51:50 2024 +0300 x86/microcode/AMD: Make __verify_patch_size() return bool The result of that function is in essence boolean, so simplify to return the result of the relevant expression. It also makes it follow the convention used by __verify_patch_section(). No functional changes. Signed-off-by: Nikolay Borisov <nik.borisov@suse.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241018155151.702350-3-nik.borisov@suse.com arch/x86/kernel/cpu/microcode/amd.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit db80b2efa0377bf6e7d422fd7e6605481b3a0ee4 Author: Nikolay Borisov <nik.borisov@suse.com> Date: Fri Oct 18 18:51:51 2024 +0300 x86/microcode/AMD: Remove bogus comment from parse_container() The function doesn't return an equivalence ID, remove the false comment. Signed-off-by: Nikolay Borisov <nik.borisov@suse.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241018155151.702350-4-nik.borisov@suse.com arch/x86/kernel/cpu/microcode/amd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a85c08aaa665b5436d325f6d7138732a0e1315ce Author: Nikolay Borisov <nik.borisov@suse.com> Date: Fri Oct 18 18:51:49 2024 +0300 x86/microcode/AMD: Return bool from find_blobs_in_containers() Instead of open-coding the check for size/data move it inside the function and make it return a boolean indicating whether data was found or not. No functional changes. [ bp: Write @ret in find_blobs_in_containers() only on success. ] Signed-off-by: Nikolay Borisov <nik.borisov@suse.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241018155151.702350-2-nik.borisov@suse.com arch/x86/kernel/cpu/microcode/amd.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 20ce9ded8c596d046813762e362929dfbcb28567 Author: Takashi Iwai <tiwai@suse.de> Date: Tue Dec 31 12:55:18 2024 +0100 ALSA: seq: oss: Send fragmented SysEx messages immediately The recent bug report spotted on the old OSS sequencer code that tries to combine incoming SysEx messages to a single sequencer event. This is good, per se, but it has more demerits: - The sysex message delivery is delayed until the very last event - The use of internal buffer forced the serialization The recent fix in commit 0179488ca992 ("ALSA: seq: oss: Fix races at processing SysEx messages") addressed the latter, but a better fix is to handle the sysex messages immediately, i.e. just send each incoming fragmented sysex message as is. And this patch implements that. This resulted in a significant cleanup as well. Note that the only caller of snd_seq_oss_synth_sysex() is snd_seq_oss_process_event(), and all its callers dispatch the event immediately, so we can just put the passed buffer pointer to the event record to be handled. Reported-and-tested-by: Kun Hu <huk23@m.fudan.edu.cn> Link: https://lore.kernel.org/2B7E93E4-B13A-4AE4-8E87-306A8EE9BBB7@m.fudan.edu.cn Link: https://patch.msgid.link/20241231115523.15796-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/core/seq/oss/seq_oss_device.h | 1 - sound/core/seq/oss/seq_oss_synth.c | 80 +++++++------------------------------ 2 files changed, 14 insertions(+), 67 deletions(-) commit 41d11d6e1aa167ae8c4849905b338b60db98be44 Merge: 1b2ff639ff0c 7b509910b3ad Author: Takashi Iwai <tiwai@suse.de> Date: Tue Dec 31 12:44:33 2024 +0100 Merge branch 'for-linus' into for-next Pull 6.13 devel branch for further development of sequencer stuff. Signed-off-by: Takashi Iwai <tiwai@suse.de> commit 053d18057e6292462f1b3f9460dd0c1e34609f67 Author: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Date: Thu Dec 12 22:01:02 2024 +0800 x86/mce: Remove the redundant mce_hygon_feature_init() Get HYGON to directly call mce_amd_feature_init() and remove the redundant mce_hygon_feature_init(). Suggested-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Sohil Mehta <sohil.mehta@intel.com> Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com> Link: https://lore.kernel.org/r/20241212140103.66964-7-qiuxu.zhuo@intel.com arch/x86/include/asm/mce.h | 2 -- arch/x86/kernel/cpu/mce/core.c | 8 ++------ 2 files changed, 2 insertions(+), 8 deletions(-) commit 359d7a98e3e3f88dbf45411427b284bb3bbbaea5 Author: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Date: Thu Dec 12 22:01:01 2024 +0800 x86/mce: Convert family/model mixed checks to VFM-based checks Convert family/model mixed checks to VFM-based checks to make the code more compact. Simplify. [ bp: Drop the "what" from the commit message - it should be visible from the diff alone. ] Suggested-by: Sohil Mehta <sohil.mehta@intel.com> Suggested-by: Dave Hansen <dave.hansen@intel.com> Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tony Luck <tony.luck@intel.com> Reviewed-by: Sohil Mehta <sohil.mehta@intel.com> Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com> Link: https://lore.kernel.org/r/20241212140103.66964-6-qiuxu.zhuo@intel.com arch/x86/kernel/cpu/mce/core.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 51a12c28bb9a043e9444db5bd214b00ec161a639 Author: Tony Luck <tony.luck@intel.com> Date: Thu Dec 12 22:01:00 2024 +0800 x86/mce: Break up __mcheck_cpu_apply_quirks() Split each vendor specific part into its own helper function. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Sohil Mehta <sohil.mehta@intel.com> Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com> Tested-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Link: https://lore.kernel.org/r/20241212140103.66964-5-qiuxu.zhuo@intel.com arch/x86/kernel/cpu/mce/core.c | 168 ++++++++++++++++++++++------------------- 1 file changed, 92 insertions(+), 76 deletions(-) commit 285c72be944089e333ae5f49211b38e460f9528d Author: Sven Eckelmann <sven@narfation.org> Date: Tue Dec 31 10:31:29 2024 +0100 mailmap: add entries for Sven Eckelmann Map the defunc mail addresses to the currently used mail address (listed in MAINTAINERS). Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> .mailmap | 5 +++++ 1 file changed, 5 insertions(+) commit 1f5f7ff46435226f34112e0d179f6cbd9eb30b04 Author: Simon Wunderlich <sw@simonwunderlich.de> Date: Tue Dec 31 10:31:29 2024 +0100 mailmap: add entries for Simon Wunderlich Map the defunc mail addresses to the currently used mail address (listed in MAINTAINERS). Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> .mailmap | 5 +++++ 1 file changed, 5 insertions(+) commit 7bce3f75189c1c2d7b43af8184b284d783e51375 Author: Marek Lindner <marek.lindner@mailbox.org> Date: Fri Dec 27 10:19:12 2024 +0100 MAINTAINERS: update email address of Marek Linder Signed-off-by: Marek Lindner <marek.lindner@mailbox.org> Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> .mailmap | 2 ++ Documentation/networking/batman-adv.rst | 2 +- MAINTAINERS | 2 +- net/batman-adv/main.h | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) commit dfa94ce54f4139c893b9c4ec17df6f7c6a7515d3 Author: Pei Xiao <xiaopei01@kylinos.cn> Date: Mon Dec 30 15:16:55 2024 +0800 bpf: Use refcount_t instead of atomic_t for mmap_count Use an API that resembles more the actual use of mmap_count. Found by cocci: kernel/bpf/arena.c:245:6-25: WARNING: atomic_dec_and_test variation before object free at line 249. Fixes: b90d77e5fd78 ("bpf: Fix remap of arena.") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412292037.LXlYSHKl-lkp@intel.com/ Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Link: https://lore.kernel.org/r/6ecce439a6bc81adb85d5080908ea8959b792a50.1735542814.git.xiaopei01@kylinos.cn Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/arena.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d62c2f0d82753a05133411b1e242baf31f4ef68e Author: Jens Axboe <axboe@kernel.dk> Date: Mon Dec 30 17:34:41 2024 -0700 io_uring: ensure io_queue_deferred() is out-of-line This is not the hot path, it's a slow path. Yet the locking for it is in the hot path, and __cold does not prevent it from being inlined. Move the locking to the function itself, and mark it noinline as well to avoid it polluting the icache of the hot path. Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/io_uring.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 654a3381e3b4df5ab1b87e21b5d9ffd979362cd1 Author: Lorenzo Pieralisi <lpieralisi@kernel.org> Date: Mon Dec 23 12:59:01 2024 +0100 bpf: Remove unused MT_ENTRY define The range tree introduction removed the need for maple tree usage but missed removing the MT_ENTRY defined value that was used to mark maple tree allocated entries. Remove the MT_ENTRY define. Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org> Link: https://lore.kernel.org/r/20241223115901.14207-1-lpieralisi@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/arena.c | 2 -- 1 file changed, 2 deletions(-) commit 9468f39ba478d001f2603ce5bf0e1ab4b97452b8 Author: Mahe Tardy <mahe.tardy@gmail.com> Date: Fri Dec 20 15:22:18 2024 +0000 selftests/bpf: fix veristat comp mode with new stats Commit 82c1f13de315 ("selftests/bpf: Add more stats into veristat") introduced new stats, added by default in the CSV output, that were not added to parse_stat_value, used in parse_stats_csv which is used in comparison mode. Thus it broke comparison mode altogether making it fail with "Unrecognized stat #7" and EINVAL. One quirk is that PROG_TYPE and ATTACH_TYPE have been transformed to strings using libbpf_bpf_prog_type_str and libbpf_bpf_attach_type_str respectively. Since we might not want to compare those string values, we just skip the parsing in this patch. We might want to translate it back to the enum value or compare the string value directly. Fixes: 82c1f13de315 ("selftests/bpf: Add more stats into veristat") Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com> Tested-by: Mykyta Yatsenko<yatsenko@meta.com> Link: https://lore.kernel.org/r/20241220152218.28405-1-mahe.tardy@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/veristat.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 4a24035964b706f5937d3128dcd9677b170b766f Author: Thomas Weißschuh <linux@weissschuh.net> Date: Thu Dec 19 22:41:41 2024 +0100 bpf: Fix holes in special_kfunc_list if !CONFIG_NET If the function is not available its entry has to be replaced with BTF_ID_UNUSED instead of skipped. Otherwise the list doesn't work correctly. Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com> Closes: https://lore.kernel.org/lkml/CAADnVQJQpVziHzrPCCpGE5=8uzw2OkxP8gqe1FkJ6_XVVyVbNw@mail.gmail.com/ Fixes: 00a5acdbf398 ("bpf: Fix configuration-dependent BTF function references") Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20241219-bpf-fix-special_kfunc_list-v1-1-d9d50dd61505@weissschuh.net Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/verifier.c | 3 +++ 1 file changed, 3 insertions(+) commit 34ea973dd4577bbf480e5cbaa8dd2668182a389c Merge: 1846dd8e3a3e 75137d9ebe9e Author: Alexei Starovoitov <ast@kernel.org> Date: Mon Dec 30 14:49:42 2024 -0800 Merge branch 'bpf-verifier-improve-precision-of-bpf_mul' Matan Shachnai says: ==================== This patch-set aims to improve precision of BPF_MUL and add testcases to illustrate precision gains using signed and unsigned bounds. Changes from v1: - Fixed typo made in patch. Changes from v2: - Added signed multiplication to BPF_MUL. - Added test cases to exercise BPF_MUL. - Reordered patches in the series. Changes from v3: - Coding style fixes. ==================== Link: https://patch.msgid.link/20241218032337.12214-1-m.shachnai@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> commit 75137d9ebe9e75358e859fda37fa1ca9f05c1a59 Author: Matan Shachnai <m.shachnai@gmail.com> Date: Tue Dec 17 22:23:35 2024 -0500 selftests/bpf: Add testcases for BPF_MUL The previous commit improves precision of BPF_MUL. Add tests to exercise updated BPF_MUL. Signed-off-by: Matan Shachnai <m.shachnai@gmail.com> Link: https://lore.kernel.org/r/20241218032337.12214-3-m.shachnai@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> .../testing/selftests/bpf/progs/verifier_bounds.c | 134 +++++++++++++++++++++ 1 file changed, 134 insertions(+) commit 9aa0ebde0014f01a8ca82adcbf43b92345da0d50 Author: Matan Shachnai <m.shachnai@gmail.com> Date: Tue Dec 17 22:23:34 2024 -0500 bpf, verifier: Improve precision of BPF_MUL This patch improves (or maintains) the precision of register value tracking in BPF_MUL across all possible inputs. It also simplifies scalar32_min_max_mul() and scalar_min_max_mul(). As it stands, BPF_MUL is composed of three functions: case BPF_MUL: tnum_mul(); scalar32_min_max_mul(); scalar_min_max_mul(); The current implementation of scalar_min_max_mul() restricts the u64 input ranges of dst_reg and src_reg to be within [0, U32_MAX]: /* Both values are positive, so we can work with unsigned and * copy the result to signed (unless it exceeds S64_MAX). */ if (umax_val > U32_MAX || dst_reg->umax_value > U32_MAX) { /* Potential overflow, we know nothing */ __mark_reg64_unbounded(dst_reg); return; } This restriction is done to avoid unsigned overflow, which could otherwise wrap the result around 0, and leave an unsound output where umin > umax. We also observe that limiting these u64 input ranges to [0, U32_MAX] leads to a loss of precision. Consider the case where the u64 bounds of dst_reg are [0, 2^34] and the u64 bounds of src_reg are [0, 2^2]. While the multiplication of these two bounds doesn't overflow and is sound [0, 2^36], the current scalar_min_max_mul() would set the entire register state to unbounded. Importantly, we update BPF_MUL to allow signed bound multiplication (i.e. multiplying negative bounds) as well as allow u64 inputs to take on values from [0, U64_MAX]. We perform signed multiplication on two bounds [a,b] and [c,d] by multiplying every combination of the bounds (i.e. a*c, a*d, b*c, and b*d) and checking for overflow of each product. If there is an overflow, we mark the signed bounds unbounded [S64_MIN, S64_MAX]. In the case of no overflow, we take the minimum of these products to be the resulting smin, and the maximum to be the resulting smax. The key idea here is that if there’s no possibility of overflow, either when multiplying signed bounds or unsigned bounds, we can safely multiply the respective bounds; otherwise, we set the bounds that exhibit overflow (during multiplication) to unbounded. if (check_mul_overflow(*dst_umax, src_reg->umax_value, dst_umax) || (check_mul_overflow(*dst_umin, src_reg->umin_value, dst_umin))) { /* Overflow possible, we know nothing */ *dst_umin = 0; *dst_umax = U64_MAX; } ... Below, we provide an example BPF program (below) that exhibits the imprecision in the current BPF_MUL, where the outputs are all unbounded. In contrast, the updated BPF_MUL produces a bounded register state: BPF_LD_IMM64(BPF_REG_1, 11), BPF_LD_IMM64(BPF_REG_2, 4503599627370624), BPF_ALU64_IMM(BPF_NEG, BPF_REG_2, 0), BPF_ALU64_IMM(BPF_NEG, BPF_REG_2, 0), BPF_ALU64_REG(BPF_AND, BPF_REG_1, BPF_REG_2), BPF_LD_IMM64(BPF_REG_3, 809591906117232263), BPF_ALU64_REG(BPF_MUL, BPF_REG_3, BPF_REG_1), BPF_MOV64_IMM(BPF_REG_0, 1), BPF_EXIT_INSN(), Verifier log using the old BPF_MUL: func#0 @0 0: R1=ctx() R10=fp0 0: (18) r1 = 0xb ; R1_w=11 2: (18) r2 = 0x10000000000080 ; R2_w=0x10000000000080 4: (87) r2 = -r2 ; R2_w=scalar() 5: (87) r2 = -r2 ; R2_w=scalar() 6: (5f) r1 &= r2 ; R1_w=scalar(smin=smin32=0,smax=umax=smax32=umax32=11,var_off=(0x0; 0xb)) R2_w=scalar() 7: (18) r3 = 0xb3c3f8c99262687 ; R3_w=0xb3c3f8c99262687 9: (2f) r3 *= r1 ; R1_w=scalar(smin=smin32=0,smax=umax=smax32=umax32=11,var_off=(0x0; 0xb)) R3_w=scalar() ... Verifier using the new updated BPF_MUL (more precise bounds at label 9) func#0 @0 0: R1=ctx() R10=fp0 0: (18) r1 = 0xb ; R1_w=11 2: (18) r2 = 0x10000000000080 ; R2_w=0x10000000000080 4: (87) r2 = -r2 ; R2_w=scalar() 5: (87) r2 = -r2 ; R2_w=scalar() 6: (5f) r1 &= r2 ; R1_w=scalar(smin=smin32=0,smax=umax=smax32=umax32=11,var_off=(0x0; 0xb)) R2_w=scalar() 7: (18) r3 = 0xb3c3f8c99262687 ; R3_w=0xb3c3f8c99262687 9: (2f) r3 *= r1 ; R1_w=scalar(smin=smin32=0,smax=umax=smax32=umax32=11,var_off=(0x0; 0xb)) R3_w=scalar(smin=0,smax=umax=0x7b96bb0a94a3a7cd,var_off=(0x0; 0x7fffffffffffffff)) ... Finally, we proved the soundness of the new scalar_min_max_mul() and scalar32_min_max_mul() functions. Typically, multiplication operations are expensive to check with bitvector-based solvers. We were able to prove the soundness of these functions using Non-Linear Integer Arithmetic (NIA) theory. Additionally, using Agni [2,3], we obtained the encodings for scalar32_min_max_mul() and scalar_min_max_mul() in bitvector theory, and were able to prove their soundness using 8-bit bitvectors (instead of 64-bit bitvectors that the functions actually use). In conclusion, with this patch, 1. We were able to show that we can improve the overall precision of BPF_MUL. We proved (using an SMT solver) that this new version of BPF_MUL is at least as precise as the current version for all inputs and more precise for some inputs. 2. We are able to prove the soundness of the new scalar_min_max_mul() and scalar32_min_max_mul(). By leveraging the existing proof of tnum_mul [1], we can say that the composition of these three functions within BPF_MUL is sound. [1] https://ieeexplore.ieee.org/abstract/document/9741267 [2] https://link.springer.com/chapter/10.1007/978-3-031-37709-9_12 [3] https://people.cs.rutgers.edu/~sn349/papers/sas24-preprint.pdf Co-developed-by: Harishankar Vishwanathan <harishankar.vishwanathan@gmail.com> Signed-off-by: Harishankar Vishwanathan <harishankar.vishwanathan@gmail.com> Co-developed-by: Srinivas Narayana <srinivas.narayana@rutgers.edu> Signed-off-by: Srinivas Narayana <srinivas.narayana@rutgers.edu> Co-developed-by: Santosh Nagarakatte <santosh.nagarakatte@rutgers.edu> Signed-off-by: Santosh Nagarakatte <santosh.nagarakatte@rutgers.edu> Signed-off-by: Matan Shachnai <m.shachnai@gmail.com> Link: https://lore.kernel.org/r/20241218032337.12214-2-m.shachnai@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/verifier.c | 80 +++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 44 deletions(-) commit 1846dd8e3a3e28f58e72cadbf4d81f374e63a085 Author: Daniel Xu <dxu@dxuuu.xyz> Date: Mon Dec 30 14:31:22 2024 -0700 libbpf: Set MFD_NOEXEC_SEAL when creating memfd Starting from 105ff5339f49 ("mm/memfd: add MFD_NOEXEC_SEAL and MFD_EXEC") and until 1717449b4417 ("memfd: drop warning for missing exec-related flags"), the kernel would print a warning if neither MFD_NOEXEC_SEAL nor MFD_EXEC is set in memfd_create(). If libbpf runs on on a kernel between these two commits (eg. on an improperly backported system), it'll trigger this warning. To avoid this warning (and also be more secure), explicitly set MFD_NOEXEC_SEAL. But since libbpf can be run on potentially very old kernels, leave a fallback for kernels without MFD_NOEXEC_SEAL support. Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> Link: https://lore.kernel.org/r/6e62c2421ad7eb1da49cbf16da95aaaa7f94d394.1735594195.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/lib/bpf/libbpf.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit c46945c9cac8437a674edb9d8fbe71511fb4acee Author: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Date: Thu Dec 12 22:00:59 2024 +0800 x86/mce: Make four functions return bool Make those functions whose callers only care about success or failure return a boolean value for better readability. Also, update the call sites accordingly as the polarities of all the return values have been flipped. No functional changes. Suggested-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Sohil Mehta <sohil.mehta@intel.com> Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com> Link: https://lore.kernel.org/r/20241212140103.66964-4-qiuxu.zhuo@intel.com arch/x86/kernel/cpu/mce/core.c | 12 ++++++------ arch/x86/kernel/cpu/mce/genpool.c | 29 ++++++++++++++--------------- arch/x86/kernel/cpu/mce/internal.h | 4 ++-- 3 files changed, 22 insertions(+), 23 deletions(-) commit 64a668fbea1b6ec06ddca66d09cc49352f063342 Author: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Date: Thu Dec 12 22:00:58 2024 +0800 x86/mce/threshold: Remove the redundant this_cpu_dec_return() The 'storm' variable points to this_cpu_ptr(&storm_desc). Access the 'stormy_bank_count' field through the 'storm' to avoid calling this_cpu_*() on the same per-CPU variable twice. This minor optimization reduces the text size by 16 bytes. $ size threshold.o.* text data bss dec hex filename 1395 1664 0 3059 bf3 threshold.o.old 1379 1664 0 3043 be3 threshold.o.new No functional changes intended. Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tony Luck <tony.luck@intel.com> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com> Reviewed-by: Sohil Mehta <sohil.mehta@intel.com> Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com> Link: https://lore.kernel.org/r/20241212140103.66964-3-qiuxu.zhuo@intel.com arch/x86/kernel/cpu/mce/threshold.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6c346760a52afaf7d75991c16ee4d70d6270d06 Author: Boshi Yu <boshiyu@linux.alibaba.com> Date: Thu Dec 26 16:41:11 2024 +0800 RDMA/erdma: Support create_ah/destroy_ah in non-sleepable contexts The RDMA CM module might invoke erdma_create_ah() or erdma_destroy_ah() in a non-sleepable context. Both of these functions will call the erdma_post_cmd_wait(), which can potentially sleep and occasionally lead to a hard lockup. Therefore, post the create_ah and destroy_ah commands in polling mode if the RDMA_CREATE_AH_SLEEPABLE and RDMA_DESTROY_AH_SLEEPABLE flags are not set, respectively. Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com> Signed-off-by: Boshi Yu <boshiyu@linux.alibaba.com> Link: https://patch.msgid.link/20241226084141.74823-5-boshiyu@linux.alibaba.com Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/erdma/erdma_verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 26981e688ca896e9310e1918d104a79cb140ce85 Author: Boshi Yu <boshiyu@linux.alibaba.com> Date: Thu Dec 26 16:41:10 2024 +0800 RDMA/erdma: Support non-sleeping erdma_post_cmd_wait() Several scenarios require posting commands to the cmdq in a non-sleepable context. For example, the cm_alloc_msg() might call erdma_create_ah() while still holding a spinlock. So we add support for non-sleeping erdma_post_cmd_wait(). Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com> Signed-off-by: Boshi Yu <boshiyu@linux.alibaba.com> Link: https://patch.msgid.link/20241226084141.74823-4-boshiyu@linux.alibaba.com Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/erdma/erdma.h | 4 +-- drivers/infiniband/hw/erdma/erdma_cmdq.c | 26 +++++++++--------- drivers/infiniband/hw/erdma/erdma_eq.c | 6 +++-- drivers/infiniband/hw/erdma/erdma_main.c | 7 ++--- drivers/infiniband/hw/erdma/erdma_qp.c | 8 +++--- drivers/infiniband/hw/erdma/erdma_verbs.c | 44 ++++++++++++++++++++----------- 6 files changed, 54 insertions(+), 41 deletions(-) commit 3761e0ad79c137d61baf5f1518e4795f35fe8159 Author: Boshi Yu <boshiyu@linux.alibaba.com> Date: Thu Dec 26 16:41:09 2024 +0800 RDMA/erdma: Fix incorrect response returned from query_qp The erdma_post_cmd_wait() function returns the cmdq response only when both resp0 and resp1 are not NULL. Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com> Signed-off-by: Boshi Yu <boshiyu@linux.alibaba.com> Link: https://patch.msgid.link/20241226084141.74823-3-boshiyu@linux.alibaba.com Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/erdma/erdma_verbs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 67831baff0d7a7ae12bba80c721fffacfab82e89 Author: Boshi Yu <boshiyu@linux.alibaba.com> Date: Thu Dec 26 16:41:08 2024 +0800 RDMA/erdma: Add missing fields to the erdma_device_ops_rocev2 Set the query_ah field to the erdma_create_ah() function and set the size_ib_ah field to the size of struct erdma_ah. Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com> Signed-off-by: Boshi Yu <boshiyu@linux.alibaba.com> Link: https://patch.msgid.link/20241226084141.74823-2-boshiyu@linux.alibaba.com Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/erdma/erdma_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 123c13f10ed3627ba112172d8bd122a72cae226d Author: Michael Margolin <mrgolin@amazon.com> Date: Wed Dec 25 13:15:48 2024 +0000 RDMA/efa: Reset device on probe failure Make sure the device is being reset on driver exit whatever the reason is, to keep the device aligned and allow it to close shared resources (e.g. admin queue). Reviewed-by: Firas Jahjah <firasj@amazon.com> Reviewed-by: Yonatan Nachum <ynachum@amazon.com> Signed-off-by: Michael Margolin <mrgolin@amazon.com> Link: https://patch.msgid.link/20241225131548.15155-1-mrgolin@amazon.com Reviewed-by: Gal Pressman <gal.pressman@linux.dev> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/efa/efa_main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 6356f18f09dc0781650c4f128ea48745fa48c415 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Thu Dec 5 19:16:34 2024 +0100 Align git commit ID abbreviation guidelines and checks The guidelines for git commit ID abbreviation are inconsistent: some places state to use 12 characters exactly, while other places recommend 12 characters or more. The same issue is present in the checkpatch.pl script. E.g. Documentation/dev-tools/checkpatch.rst says: **GIT_COMMIT_ID** The proper way to reference a commit id is: commit <12+ chars of sha1> ("<title line>") However, scripts/checkpatch.pl has two different checks: one warning check accepting 12 characters exactly: # Check Fixes: styles is correct Please use correct Fixes: style 'Fixes: <12 chars of sha1> (\"<title line>\")' and a second error check accepting 12-40 characters: # Check for git id commit length and improperly formed commit descriptions # A correctly formed commit description is: # commit <SHA-1 hash length 12+ chars> ("Complete commit subject") Please use git commit description style 'commit <12+ chars of sha1> Hence patches containing commit IDs with more than 12 characters are flagged by checkpatch, and sometimes rejected by maintainers or reviewers. This is becoming more important with the growth of the repository, as git may decide to use more characters in case of local conflicts. Fix this by settling on at least 12 characters, in both the documentation and in the checkpatch.pl script. Fixes: bd17e036b495bebb ("checkpatch: warn for non-standard fixes tag style") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/1c244040bf6ce304656e31036e5178b4b9dfb719.1733421037.git.geert+renesas@glider.be Signed-off-by: Jonathan Corbet <corbet@lwn.net> Documentation/process/maintainer-tip.rst | 2 +- Documentation/process/submitting-patches.rst | 8 ++++---- scripts/checkpatch.pl | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit 3f997cbf676b304f927aab9c43adfcb7b32cbc56 Author: Ahmad Fatoum <a.fatoum@pengutronix.de> Date: Fri Dec 20 10:09:34 2024 +0100 docs: process: submitting-patches: split canonical patch format section To make it easier to reference specific parts of the patch format, let's add some headings for different parts. Doing that, it becomes clear that backtraces in commit message is out of place being after Reply-To Headers, so move it next to the commit message body subsubsection. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.kernel.org/r/20241220-submitting-patches-imperative-v1-1-ee874c1859b3@pengutronix.de Signed-off-by: Jonathan Corbet <corbet@lwn.net> Documentation/process/submitting-patches.rst | 56 +++++++++++++++++----------- 1 file changed, 34 insertions(+), 22 deletions(-) commit 7f15d4abf925f33015fb62973ce2ddb45ce04bb9 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Fri Dec 20 16:57:39 2024 +0000 cpu: Remove unused init_cpu_online The last use of init_cpu_online() was removed by the commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Yury Norov <yury.norov@gmail.com> include/linux/cpumask.h | 1 - kernel/cpu.c | 5 ----- 2 files changed, 6 deletions(-) commit f9d2ee3f51d60100c10d4db64da4413f69e81993 Author: Nathan Chancellor <nathan@kernel.org> Date: Sat Nov 23 19:30:19 2024 -0700 riscv: Always inline bitops When building allmodconfig + ThinLTO with certain versions of clang, arch_set_bit() may not be inlined, resulting in a modpost warning: WARNING: modpost: vmlinux: section mismatch in reference: arch_set_bit+0x58 (section: .text.arch_set_bit) -> numa_nodes_parsed (section: .init.data) acpi_numa_rintc_affinity_init() calls arch_set_bit() via __node_set() with numa_nodes_parsed, which is marked as __initdata. If arch_set_bit() is not inlined, modpost will flag that it is being called with data that will be freed after init. As acpi_numa_rintc_affinity_init() is marked as __init, there is not actually a functional issue here. However, the bitop functions should be marked as __always_inline, so that they work consistently for init and non-init code, which the comment in include/linux/nodemask.h alludes to. This matches s390 and x86's implementations. Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Yury Norov <yury.norov@gmail.com> arch/riscv/include/asm/bitops.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 4463a445a64b719e6f501d80dcc5872dde42eb73 Author: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Date: Thu Nov 14 02:18:33 2024 +0900 linux/bits.h: simplify GENMASK_INPUT_CHECK() In GENMASK_INPUT_CHECK(), __builtin_choose_expr(__is_constexpr((l) > (h)), (l) > (h), 0) is the exact expansion of: const_true((l) > (h)) Apply const_true() to simplify GENMASK_INPUT_CHECK(). CC: Linus Torvalds <torvalds@linux-foundation.org> CC: Rasmus Villemoes <linux@rasmusvillemoes.dk> CC: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Reviewed-by: Yury Norov <yury.norov@gmail.com>, Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Yury Norov <yury.norov@gmail.com> include/linux/bits.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4f3d1be4c2f8a22470f3625cbc778ba2e2130def Author: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Date: Thu Nov 14 02:18:32 2024 +0900 compiler.h: add const_true() __builtin_constant_p() is known for not always being able to produce constant expression [1] which led to the introduction of __is_constexpr() [2]. Because of its dependency on __builtin_constant_p(), statically_true() suffers from the same issues. For example: void foo(int a) { /* fail on GCC */ BUILD_BUG_ON_ZERO(statically_true(a)); /* fail on both clang and GCC */ static char arr[statically_true(a) ? 1 : 2]; } For the same reasons why __is_constexpr() was created to cover __builtin_constant_p() edge cases, __is_constexpr() can be used to resolve statically_true() limitations. Note that, somehow, GCC is not always able to fold this: __is_constexpr(x) && (x) It is OK in BUILD_BUG_ON_ZERO() but not in array declarations nor in static_assert(): void bar(int a) { /* success */ BUILD_BUG_ON_ZERO(__is_constexpr(a) && (a)); /* fail on GCC */ static char arr[__is_constexpr(a) && (a) ? 1 : 2]; /* fail on GCC */ static_assert(__is_constexpr(a) && (a)); } Encapsulating the expression in a __builtin_choose_expr() switch resolves all these failed tests. Define a new const_true() macro which, by making use of the __builtin_choose_expr() and __is_constexpr(x) combo, always produces a constant expression. It should be noted that statically_true() is the only one able to fold tautological expressions in which at least one on the operands is not a constant expression. For example: statically_true(true || var) statically_true(var == var) statically_true(var * 0 + 1) statically_true(!(var * 8 % 4)) always evaluates to true, whereas all of these would be false under const_true() if var is not a constant expression [3]. For this reason, usage of const_true() should be the exception. Reflect in the documentation that const_true() is less powerful and that statically_true() is the overall preferred solution. [1] __builtin_constant_p cannot resolve to const when optimizing Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19449 [2] commit 3c8ba0d61d04 ("kernel.h: Retain constant expression output for max()/min()") Link: https://git.kernel.org/torvalds/c/3c8ba0d61d04 [3] https://godbolt.org/z/c61PMxqbK CC: Linus Torvalds <torvalds@linux-foundation.org> CC: Rasmus Villemoes <linux@rasmusvillemoes.dk> CC: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Reviewed-by: Yury Norov <yury.norov@gmail.com>, Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Yury Norov <yury.norov@gmail.com> include/linux/compiler.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 7cc8cd8c54079494700b26195c0abd98e80560f8 Author: Yuehui Zhao <zhaoyuehui@cqsoftware.com.cn> Date: Thu Dec 19 14:30:35 2024 +0800 docs/zh_CN: Add security lsm Chinese translation Translate .../security/lsm.rst into Chinese. Update the translation through commit 6d2ed653185b ("lsm: move hook comments docs to security/security.c") Signed-off-by: Yuehui Zhao <zhaoyuehui@cqsoftware.com.cn> Reviewed-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/d7582527ff42abf20b56ca6b145bfb91873c9ded.1734575890.git.zhaoyuehui@cqsoftware.com.cn .../translations/zh_CN/security/index.rst | 3 +- Documentation/translations/zh_CN/security/lsm.rst | 95 ++++++++++++++++++++++ 2 files changed, 97 insertions(+), 1 deletion(-) commit 8c2388d9cfad5224e967ce684438debc9b6f2887 Author: Yuehui Zhao <zhaoyuehui@cqsoftware.com.cn> Date: Thu Dec 19 14:30:34 2024 +0800 docs/zh_CN: Add security index Chinese translation Translate .../security/index.rst into Chinese. Reviewed-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Yuehui Zhao <zhaoyuehui@cqsoftware.com.cn> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/89ad67b4b4e12a52581cfa0f87f194e1aee3e526.1734575890.git.zhaoyuehui@cqsoftware.com.cn .../translations/zh_CN/security/index.rst | 33 ++++++++++++++++++++++ .../translations/zh_CN/subsystem-apis.rst | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) commit 6b228cfc52a6e9b7149cf51e247076963d6561cd Author: Kurt Borja <kuurtb@gmail.com> Date: Tue Dec 24 09:01:33 2024 -0500 alienware-wmi: Use devm_platform_profile_register() Replace platform_profile_register() with it's device managed version. Drop remove_thermal_profile() because it's no longer needed. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Signed-off-by: Kurt Borja <kuurtb@gmail.com> Link: https://lore.kernel.org/r/20241224140131.30362-5-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/dell/alienware-wmi.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit c416a3fed78b9b1d93755d2c5d8104769559c4cb Merge: 03f8e0e05510 b651ea8a44aa Author: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Date: Mon Dec 30 20:21:09 2024 +0200 Merge branch 'platform-drivers-x86-platform-profile' into for-next commit da3ecf00ffc7b169b9a31a1218bbb52aa19d8df7 Author: Vegard Nossum <vegard.nossum@oracle.com> Date: Sat Dec 21 23:22:14 2024 +0100 scripts/kernel-doc: fix identifier parsing regex John wrote: > kernel-doc gets confused by code like the following: > > /** > * define HOMA_MIN_DEFAULT_PORT - The 16-bit port space is divided into > * two nonoverlapping regions. Ports 1-32767 are reserved exclusively > * for well-defined server ports. The remaining ports are used for client > * ports; these are allocated automatically by Homa. Port 0 is reserved. > */ > #define HOMA_MIN_DEFAULT_PORT 0x8000 > > It seems to use the last "-" on the line (the one in "16-bit") rather > than the first one, so it produces the following false error message: > > homa.h:50: warning: expecting prototype for HOMA_MIN_DEFAULT_PORT - > The 16(). Prototype was for HOMA_MIN_DEFAULT_PORT() instead > > There are similar problems if there is a ":" later on the line. The problem is the regex for the identifier, which is a greedy /.*/ that matches everything up to the last - or : (i.e. $decl_end). Fix it by tightening up this regex and not matching those characters as part of the identifier. Link: https://lore.kernel.org/all/CAGXJAmzfRzE=A94NT5ETtj3bZc-=2oLg-9E5Kjh4o_-iuw1q8g@mail.gmail.com/ Reported-by: John Ousterhout <ouster@cs.stanford.edu> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241221222214.1969823-1-vegard.nossum@oracle.com scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c845cb8dbd2e1a804babfd13648026c3a7cfbc0b Author: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Date: Thu Dec 12 22:00:57 2024 +0800 x86/mce: Make several functions return bool Make several functions that return 0 or 1 return a boolean value for better readability. No functional changes are intended. Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tony Luck <tony.luck@intel.com> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com> Reviewed-by: Sohil Mehta <sohil.mehta@intel.com> Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com> Link: https://lore.kernel.org/r/20241212140103.66964-2-qiuxu.zhuo@intel.com arch/x86/include/asm/mce.h | 4 ++-- arch/x86/kernel/cpu/mce/amd.c | 10 +++++----- arch/x86/kernel/cpu/mce/core.c | 22 +++++++++++----------- arch/x86/kernel/cpu/mce/intel.c | 9 +++++---- 4 files changed, 23 insertions(+), 22 deletions(-) commit 288bba2f4c8be1e1b9c8bc2e087ce677faf9918a Author: Borislav Petkov (AMD) <bp@alien8.de> Date: Fri Nov 22 22:07:07 2024 +0100 x86/cpufeatures: Remove "AMD" from the comments to the AMD-specific leaf 0x8000001f.EAX is an AMD-specific leaf so there's no need to have "AMD" in almost every feature's comment. Zap it and make the text more readable this way. No functional changes. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241122210707.12742-1-bp@kernel.org arch/x86/include/asm/cpufeatures.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1146f7429f610d51b886402f1f7a43faa08d814a Author: Borislav Petkov (AMD) <bp@alien8.de> Date: Mon Dec 2 13:04:16 2024 +0100 Documentation/kernel-parameters: Fix a typo in kvm.enable_virt_at_load text s/lode/load/ Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241202120416.6054-5-bp@kernel.org Documentation/admin-guide/kernel-parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 716f86b523d8ec3c17015ee0b03135c7aa6f2f08 Author: Borislav Petkov (AMD) <bp@alien8.de> Date: Wed Nov 13 13:28:33 2024 +0100 KVM: x86: Advertise SRSO_USER_KERNEL_NO to userspace SRSO_USER_KERNEL_NO denotes whether the CPU is affected by SRSO across user/kernel boundaries. Advertise it to guest userspace. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com> Link: https://lore.kernel.org/r/20241202120416.6054-3-bp@kernel.org arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 877818802c3e970f67ccb53012facc78bef5f97a Author: Borislav Petkov (AMD) <bp@alien8.de> Date: Mon Nov 11 17:22:08 2024 +0100 x86/bugs: Add SRSO_USER_KERNEL_NO support If the machine has: CPUID Fn8000_0021_EAX[30] (SRSO_USER_KERNEL_NO) -- If this bit is 1, it indicates the CPU is not subject to the SRSO vulnerability across user/kernel boundaries. have it fall back to IBPB on VMEXIT only, in the case it is going to run VMs: Speculative Return Stack Overflow: Mitigation: IBPB on VMEXIT only Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com> Link: https://lore.kernel.org/r/20241202120416.6054-2-bp@kernel.org arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/bugs.c | 4 ++++ arch/x86/kernel/cpu/common.c | 1 + 3 files changed, 6 insertions(+) commit 148b88be249ade3fa6a5033912e5aad0660d1b18 Author: anish kumar <yesanishhere@gmail.com> Date: Mon Dec 30 14:33:54 2024 +0000 MAINTAINERS: add slimbus documentation In the commit 202318d37613d264e30d71cc32ef442492d6d279 slimbus documentation was added but it missed the update in this file. Currently get_maintainer script is missing the main maintainer. Signed-off-by: anish kumar <yesanishhere@gmail.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230143354.266154-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 97e16f68b80344251fb1f5c60941177fac503a32 Author: Julia Lawall <Julia.Lawall@inria.fr> Date: Mon Dec 30 14:33:53 2024 +0000 slimbus: messaging: Reorganize kerneldoc parameter names Reorganize kerneldoc parameter names to match the parameter order in the function header. Problems identified using Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230143354.266154-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/slimbus/messaging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bddfe23be8f84e66b1920140a6e11400fae4f74a Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 25 01:24:23 2024 +0000 net: mac802154: Remove unused ieee802154_mlme_tx_one ieee802154_mlme_tx_one() was added in 2022 by commit ddd9ee7cda12 ("net: mac802154: Introduce a synchronous API for MLME commands") but has remained unused. Remove it. Note, there's still a ieee802154_mlme_tx_one_locked() variant that is used. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Acked-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/20241225012423.439229-1-linux@treblig.org Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org> net/mac802154/ieee802154_i.h | 3 --- net/mac802154/tx.c | 13 ------------- 2 files changed, 16 deletions(-) commit f22a51b0a7cdfbaf57eb6dfe034f457360b5e003 Author: Jingyi Wang <quic_jingyw@quicinc.com> Date: Mon Dec 30 14:30:35 2024 +0000 dt-bindings: nvmem: qfprom: Add compatible for QCS8300 Document QFPROM compatible for Qualcomm QCS8300. It provides access functions for QFPROM data to rest of the drivers via nvmem interface. Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230143035.265518-12-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + 1 file changed, 1 insertion(+) commit 12a1c0b36bbfd9be939b34d5b40133cc3f3be644 Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Mon Dec 30 14:30:34 2024 +0000 dt-bindings: nvmem: Add compatible for IPQ5424 Document the QFPROM block found on IPQ5424 Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230143035.265518-11-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + 1 file changed, 1 insertion(+) commit b79541b7803f5e376386af82427afbe2b3a3875b Author: Barnabás Czémán <barnabas.czeman@mainlining.org> Date: Mon Dec 30 14:30:33 2024 +0000 dt-bindings: nvmem: Add compatible for MS8917 Document the QFPROM block found on MSM8917. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230143035.265518-10-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + 1 file changed, 1 insertion(+) commit dab202366689b4499fb2e96b4f4658ea48b8d8e0 Author: Peng Fan <peng.fan@nxp.com> Date: Mon Dec 30 14:30:32 2024 +0000 MAINTAINERS: Update nvmem section Include include/dt-bindings/nvmem into nvmem section Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230143035.265518-9-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 6afcaef38d4df444dcb3eaab4823a2c5d0f0b43a Author: Théo Lebrun <theo.lebrun@bootlin.com> Date: Mon Dec 30 14:30:31 2024 +0000 MIPS: mobileye: eyeq5: add bootloader config reserved memory Add a new reserved-memory node, containing bootloader config with MAC addresses for both ethernet instances of the SoC. Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230143035.265518-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> arch/mips/boot/dts/mobileye/eyeq5.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 7e606c311f7067f8360556c612eed4b23995d74e Author: Théo Lebrun <theo.lebrun@bootlin.com> Date: Mon Dec 30 14:30:30 2024 +0000 nvmem: rmem: add CRC validation for Mobileye EyeQ5 NVMEM Mobileye EyeQ5 has a non-volatile memory region which gets used to store MAC addresses. Its format includes a prefix 12-byte header and a suffix 4-byte CRC. Add an optional ->checksum() callback inside match data; it runs CRC32 onto the content. Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230143035.265518-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/nvmem/rmem.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit e44f5a619f5ee17eeca2653468b7cd14d3737dc6 Author: Théo Lebrun <theo.lebrun@bootlin.com> Date: Mon Dec 30 14:30:29 2024 +0000 nvmem: rmem: remove unused struct rmem::size field The private structure used by the rmem driver contains a `size` field that is unused. Remove it. Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230143035.265518-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/nvmem/rmem.c | 2 -- 1 file changed, 2 deletions(-) commit 9c1d9de52b64c353bd387f7fc264bc747a40e1f9 Author: Théo Lebrun <theo.lebrun@bootlin.com> Date: Mon Dec 30 14:30:28 2024 +0000 nvmem: rmem: make ->reg_read() straight forward code memory_read_from_buffer() is a weird choice; it: - is made for iteration with ppos a pointer. - does futile error checking in our case. - does NOT ensure we read exactly N bytes. Replace it by: 1. A check that (offset + bytes) lands inside the region and, 2. a plain memcpy(). Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230143035.265518-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/nvmem/rmem.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 6fdbc7b9aa20b1db47d13a5f2a4d31fb2f8f3822 Author: Théo Lebrun <theo.lebrun@bootlin.com> Date: Mon Dec 30 14:30:27 2024 +0000 nvmem: specify ->reg_read/reg_write() expected return values Both ->reg_read() and ->reg_write() return values are not easy to deduce. Explicit that they should return zero on success (and negative values otherwise). Such callbacks, in some alternative world, could return the number of bytes in the success case. That would be translated to errors in the nvmem core because of checks like: ret = nvmem->reg_write(nvmem->priv, offset, val, bytes); if (ret) { // error case } This mistake is not just theoretical, see commit 28b008751aa2 ("nvmem: rmem: Fix return value of rmem_read()"). Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230143035.265518-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> include/linux/nvmem-provider.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 62b467c65a7edbd4caac2214ec12da99e19e445e Author: Théo Lebrun <theo.lebrun@bootlin.com> Date: Mon Dec 30 14:30:26 2024 +0000 dt-bindings: nvmem: rmem: Add mobileye,eyeq5-bootloader-config On Mobileye EyeQ5, the bootloader will put MAC addresses into memory. Declare that as reserved memory to be used by the kernel, exposing nvmem cells. That region has a 12-byte header and a 4-byte trailing CRC. Acked-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230143035.265518-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/devicetree/bindings/nvmem/rmem.yaml | 1 + 1 file changed, 1 insertion(+) commit 78dc14daf481a26b4da0e1ed7d9e1eb9112a0ba7 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 30 14:30:25 2024 +0000 nvmem: core: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Also adapt the dynamic sysfs cell logic to handle the const attributes. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20241230143035.265518-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/nvmem/core.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit 9241459b3cc2e66252d32bef88e858dcf9c7c487 Author: Vivek Pernamitta <quic_vpernami@quicinc.com> Date: Thu Dec 12 17:27:27 2024 +0530 bus: mhi: host: pci_generic: Add support for QDU100 device Add MHI controller configuration for QDU100 device. The Qualcomm X100 5G RAN Accelerator card is designed to enhance Open vRAN servers by offloading CPUs from intensive 5G baseband functions. Link: https://docs.qualcomm.com/bundle/publicresource/87-79371-1_REV_A_Qualcomm_X100_5G_RAN_Accelerator_Card_Product_Brief.pdf Signed-off-by: Vivek Pernamitta <quic_vpernami@quicinc.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20241212-qdu100_us-v5-1-3349fb23512a@quicinc.com Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> drivers/bus/mhi/host/pci_generic.c | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 1b2ff639ff0cb999285d90c57d3f856b91c2aea6 Author: Takashi Iwai <tiwai@suse.de> Date: Mon Dec 30 12:49:02 2024 +0100 ALSA: Align the syntax of iov_iter helpers with standard ones We introduced a couple of helpers for copying iomem over iov_iter, and the functions were formed like the former copy_from/to_user(), and the return value was adjusted to 0/-EFAULT, which made the code transition a bit easier at that time. OTOH, the standard copy_from/to_iter() functions have different argument orders and the return value, and this difference can be confusing. It's not only confusing but dangerous; actually I did write a wrong code due to that once :-< For reducing the confusion, this patch changes the syntax of those helpers to align with the standard copy_from/to_iter(). The argument order is changed and the return value is the size of copied bytes. The callers of those functions are updated accordingly, too. Link: https://patch.msgid.link/20241230114903.4959-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> include/sound/pcm.h | 7 ++++--- sound/core/memory.c | 41 ++++++++++++++++++++++++++--------------- sound/pci/nm256/nm256.c | 8 ++++++-- sound/pci/rme32.c | 13 ++++++++----- sound/pci/rme96.c | 13 ++++++++----- sound/soc/qcom/lpass-platform.c | 6 ++++-- 6 files changed, 56 insertions(+), 32 deletions(-) commit 3a4bb81850662bebab74f1ad27071652b1825d58 Author: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Date: Thu Dec 26 23:03:52 2024 +0100 ARM: dts: amlogic: meson: remove size and address cells from USB nodes The only board that actually requires these properties is meson8b-odroidc1.dts but that already sets it on it's own. Drop these properties from meson.dtsi because otherwise they can cause dtc warnings: /soc/usb@c9040000: unnecessary #address-cells/#size-cells without "ranges", "dma-ranges" or child "reg" property Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241226220352.965505-1-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> arch/arm/boot/dts/amlogic/meson.dtsi | 4 ---- 1 file changed, 4 deletions(-) commit 55ad333de0f80bc0caee10c6c27196cdcf8891bb Author: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> Date: Mon Dec 30 10:34:08 2024 +0300 fs/ntfs3: Unify inode corruption marking with _ntfs_bad_inode() Also reworked error handling in a couple of places. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> fs/ntfs3/attrib.c | 4 ++-- fs/ntfs3/dir.c | 2 +- fs/ntfs3/frecord.c | 12 +++++++----- fs/ntfs3/fsntfs.c | 6 +++++- fs/ntfs3/index.c | 6 ++---- fs/ntfs3/inode.c | 3 +++ 6 files changed, 20 insertions(+), 13 deletions(-) commit 2afd4d267e6dbaec8d3ccd4f5396cb84bc67aa2e Author: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> Date: Mon Dec 30 10:33:34 2024 +0300 fs/ntfs3: Mark inode as bad as soon as error detected in mi_enum_attr() Extended the `mi_enum_attr()` function interface with an additional parameter, `struct ntfs_inode *ni`, to allow marking the inode as bad as soon as an error is detected. Reported-by: syzbot+73d8fc29ec7cba8286fa@syzkaller.appspotmail.com Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> fs/ntfs3/attrib.c | 11 ++++---- fs/ntfs3/frecord.c | 59 +++++++++++++++++++++------------------- fs/ntfs3/ntfs_fs.h | 21 ++++++++------- fs/ntfs3/record.c | 79 +++++++++++++++++++++++++++++------------------------- 4 files changed, 90 insertions(+), 80 deletions(-) commit bd38fa3aaaceb371cf92f115c905579024b9feac Author: Peng Fan <peng.fan@nxp.com> Date: Tue Dec 24 20:33:38 2024 +0800 arm64: dts: freescale: imx93-9x9-qsb: enable fsl,ext-reset-output for wdog3 The WDOG_B is connected to external PMIC, so set "fsl,ext-reset-output" to enable triggering PMIC reset. Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit 74c9497b26d6d96b31e727e7ec8bee77fcfb75fb Author: Peng Fan <peng.fan@nxp.com> Date: Tue Dec 24 20:33:37 2024 +0800 arm64: dts: freescale: imx93-14x14-evk: enable fsl,ext-reset-output for wdog3 The WDOG_B is connected to external PMIC, so set "fsl,ext-reset-output" to enable triggering PMIC reset. Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit 4fc7028e2c130a4f840efb0156675ef70ff06029 Author: Peng Fan <peng.fan@nxp.com> Date: Tue Dec 24 20:33:36 2024 +0800 arm64: dts: freescale: imx93-11x11-evk: enable fsl,ext-reset-output for wdog3 The WDOG_B is connected to external PMIC, so set "fsl,ext-reset-output" to enable triggering PMIC reset. Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit af79caa83f6aa41e9092292a2ba7f701e57353ec Author: Atish Patra <atishp@rivosinc.com> Date: Tue Dec 24 13:04:55 2024 -0800 RISC-V: KVM: Add new exit statstics for redirected traps Currently, kvm doesn't delegate the few traps such as misaligned load/store, illegal instruction and load/store access faults because it is not expected to occur in the guest very frequently. Thus, kvm gets a chance to act upon it or collect statistics about it before redirecting the traps to the guest. Collect both guest and host visible statistics during the traps. Enable them so that both guest and host can collect the stats about them if required. Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Atish Patra <atishp@rivosinc.com> Link: https://lore.kernel.org/r/20241224-kvm_guest_stat-v2-3-08a77ac36b02@rivosinc.com Signed-off-by: Anup Patel <anup@brainfault.org> arch/riscv/include/asm/kvm_host.h | 5 +++++ arch/riscv/kvm/vcpu.c | 7 ++++++- arch/riscv/kvm/vcpu_exit.c | 5 +++++ 3 files changed, 16 insertions(+), 1 deletion(-) commit 2f15b5eaff79b70b004b0aae79dee62d3b3abda0 Author: Atish Patra <atishp@rivosinc.com> Date: Tue Dec 24 13:04:54 2024 -0800 RISC-V: KVM: Update firmware counters for various events SBI PMU specification defines few firmware counters which can be used by the guests to collect the statstics about various traps occurred in the host. Update these counters whenever a corresponding trap is taken Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Atish Patra <atishp@rivosinc.com> Link: https://lore.kernel.org/r/20241224-kvm_guest_stat-v2-2-08a77ac36b02@rivosinc.com Signed-off-by: Anup Patel <anup@brainfault.org> arch/riscv/kvm/vcpu_exit.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit 51c58956732bb20c5782dea1b2966270827e3aa2 Author: Quan Zhou <zhouquan@iscas.ac.cn> Date: Tue Dec 24 13:04:53 2024 -0800 RISC-V: KVM: Redirect instruction access fault trap to guest The M-mode redirects an unhandled instruction access fault trap back to S-mode when not delegating it to VS-mode(hedeleg). However, KVM running in HS-mode terminates the VS-mode software when back from M-mode. The KVM should redirect the trap back to VS-mode, and let VS-mode trap handler decide the next step. Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn> Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Atish Patra <atishp@rivosinc.com> Link: https://lore.kernel.org/r/20241224-kvm_guest_stat-v2-1-08a77ac36b02@rivosinc.com Signed-off-by: Anup Patel <anup@brainfault.org> arch/riscv/kvm/vcpu_exit.c | 1 + 1 file changed, 1 insertion(+) commit 144dfe4017bfe13cc2d459c2c4a7a4dc832c100c Author: Quan Zhou <zhouquan@iscas.ac.cn> Date: Mon Dec 2 11:22:12 2024 +0800 KVM: riscv: selftests: Add Svvptc/Zabha/Ziccrse exts to get-reg-list test The KVM RISC-V allows Svvptc/Zabha/Ziccrse extensions for Guest/VM so add them to get-reg-list test. Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/35163f0443993a942e0a021c6006bc5d2f0f5d5f.1732854096.git.zhouquan@iscas.ac.cn Signed-off-by: Anup Patel <anup@brainfault.org> tools/testing/selftests/kvm/riscv/get-reg-list.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 79be257b579e72ae7c5aeb942700a449d467405f Author: Quan Zhou <zhouquan@iscas.ac.cn> Date: Mon Dec 2 11:22:01 2024 +0800 RISC-V: KVM: Allow Ziccrse extension for Guest/VM Extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Ziccrse extension for Guest/VM. Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/d10e746d165074174f830aa3d89bf3c92017acee.1732854096.git.zhouquan@iscas.ac.cn Signed-off-by: Anup Patel <anup@brainfault.org> arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/vcpu_onereg.c | 2 ++ 2 files changed, 3 insertions(+) commit 679e132c0ae2c34b425f32fb1a59fc04c6dc87cb Author: Quan Zhou <zhouquan@iscas.ac.cn> Date: Mon Dec 2 11:21:49 2024 +0800 RISC-V: KVM: Allow Zabha extension for Guest/VM Extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zabha extension for Guest/VM. Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/4074feb27819e23bab05b0fd6441a38bf0b6a5e2.1732854096.git.zhouquan@iscas.ac.cn Signed-off-by: Anup Patel <anup@brainfault.org> arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/vcpu_onereg.c | 2 ++ 2 files changed, 3 insertions(+) commit 0f891585971648a07e8b0c155e5b3eb697601d9d Author: Quan Zhou <zhouquan@iscas.ac.cn> Date: Mon Dec 2 11:21:38 2024 +0800 RISC-V: KVM: Allow Svvptc extension for Guest/VM Extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Svvptc extension for Guest/VM. Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/133509ffe5783b62cf95e8f675cc3e327bee402e.1732854096.git.zhouquan@iscas.ac.cn Signed-off-by: Anup Patel <anup@brainfault.org> arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/vcpu_onereg.c | 2 ++ 2 files changed, 3 insertions(+) commit cc57f6cbef65c796a5661decaeffe3f5de397d19 Author: Andrew Jones <ajones@ventanamicro.com> Date: Thu Oct 17 09:45:41 2024 +0200 KVM: riscv: selftests: Add SBI SUSP to get-reg-list test KVM supports SBI SUSP, so add it to the get-reg-list test. Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20241017074538.18867-6-ajones@ventanamicro.com Signed-off-by: Anup Patel <anup@brainfault.org> tools/testing/selftests/kvm/riscv/get-reg-list.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 023c15151fbb65f8dde23e28af1d6d4382404d58 Author: Andrew Jones <ajones@ventanamicro.com> Date: Thu Oct 17 09:45:40 2024 +0200 RISC-V: KVM: Add SBI system suspend support Implement a KVM SBI SUSP extension handler. The handler only validates the system suspend entry criteria and prepares for resuming in the appropriate state at the resume_addr (as specified by the SBI spec), but then it forwards the call to the VMM where any system suspend behavior may be implemented. Since VMM support is needed, KVM disables the extension by default. Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20241017074538.18867-5-ajones@ventanamicro.com Signed-off-by: Anup Patel <anup@brainfault.org> arch/riscv/include/asm/kvm_vcpu_sbi.h | 1 + arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/Makefile | 1 + arch/riscv/kvm/vcpu_sbi.c | 4 ++ arch/riscv/kvm/vcpu_sbi_system.c | 73 +++++++++++++++++++++++++++++++++++ 5 files changed, 80 insertions(+) commit 025cf78938c22a02ba7f8aae3f46186e59cfc3af Author: Wei Fang <wei.fang@nxp.com> Date: Thu Dec 19 14:13:40 2024 +0800 arm64: dts: imx95-19x19-evk: add ENETC 0 support Add ENETC 0 (1G ethernet port) support for i.MX95-19x19-EVK board. In addition, because all ENETC instances share MDIO bus, so enable EMDIO at the same time. Signed-off-by: Wei Fang <wei.fang@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/boot/dts/freescale/imx95-19x19-evk.dts | 52 +++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 4511acd9eb3c52efa0252cdd7e6438ab3073bfaa Author: Wei Fang <wei.fang@nxp.com> Date: Thu Dec 19 14:13:39 2024 +0800 arm64: dts: imx95: add NETC related nodes Add NETC related nodes for i.MX95. Signed-off-by: Wei Fang <wei.fang@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/boot/dts/freescale/imx95.dtsi | 93 ++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit c7418a6e7ac9bca66a8a49793cbfa5a45c01bcbb Author: Fabio Estevam <festevam@denx.de> Date: Tue Dec 17 21:02:32 2024 -0300 ARM: dts: imx: Use the correct mdio pattern mdio-gpio is not a valid pattern according to mdio-gpio.yaml. Use the generic 'mdio' name to fix the following dt-schema warnings: 'mdio-gpio' does not match '^mdio(-(bus|external))?(@.+|-([0-9]+))?$' Signed-off-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm/boot/dts/nxp/imx/imx51-zii-rdu1.dts | 2 +- arch/arm/boot/dts/nxp/imx/imx51-zii-scu2-mezz.dts | 2 +- arch/arm/boot/dts/nxp/imx/imx6q-bx50v3.dtsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit c62f6e2755aa2aa165997f3cdf8a1323e27a5155 Author: Hui Wang <hui.wang@canonical.com> Date: Mon Dec 16 12:07:22 2024 +0800 ARM: dts: imx6qdl-sabresd: add dr_mode to usbotg Currently there are 3 type of boards (imx6q|imx6qp|imx6dl-sabresd) based on imx6qdl-sabresd.dtsi, they all do not set the dr_mode for usbotg device node. The chipidea usb driver will configure it to otg mode by default if the dr_mode is not set, but some testcases need to parse the dr_mode from DT and decide the follow-up test strategy, here set the dr_mode to otg explicitly for these 3 imx6qdl-sabresd based boards. Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm/boot/dts/nxp/imx/imx6qdl-sabresd.dtsi | 1 + 1 file changed, 1 insertion(+) commit 0dbdaba234bbd0dec2448b3f931b48c2214d6237 Author: Fabio Estevam <festevam@denx.de> Date: Tue Dec 10 07:57:05 2024 -0300 arm64: dts: imx8mm-phg: Add LVDS compatible string The imx8mm-phg board has an AUO G084SN05 V9 8.4" 800x600 LVDS panel. Improve the devicetree description by passing the LVDS compatible string to fix the following dt-schema warning: imx8mm-phg.dtb: panel: compatible:0: 'panel-lvds' is not one of ['admatec,9904379', 'auo,b101ew05', 'auo,g084sn05', 'chunghwa,claa070wp03xg','edt,etml0700z9ndha', 'hannstar,hsd101pww2', 'hydis,hv070wx2-1e0', 'jenson,bl-jt60050-01a', 'tbs,a711-panel'] ... Signed-off-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/boot/dts/freescale/imx8mm-phg.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f424523b1b516b3f0984feeb1d8218e904d17a97 Author: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Date: Sat Dec 21 17:28:03 2024 +0200 arm64: dts: exynos8895: Add camera hsi2c nodes Add nodes for hsi2c1-4 (CAM0-3), which allows using them. Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Link: https://lore.kernel.org/r/20241221152803.1663820-1-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/exynos8895.dtsi | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 72f6ec2ba8061ac9e911a83b91e3f180f996d981 Author: Igor Belwon <igor.belwon@mentallysanemainliners.org> Date: Tue Dec 24 04:33:36 2024 +0100 arm64: dts: exynos990: Add clock management unit nodes Add CMU nodes for: - cmu_top: provides clocks for other blocks - cmu_hsi0: provides clocks for usb31 Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org> Link: https://lore.kernel.org/r/20241224-cmu-v3-1-33ca24b2413c@mentallysanemainliners.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/exynos990.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit f6735dc5bc0f6b6d3552dfbc563da2a247d587d2 Merge: 817473b6ddaf 5feae3e79dbe Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Mon Dec 30 08:23:22 2024 +0100 Merge branch 'for-v6.14/dt-bindings-clk-samsung' into next/dt64 commit 3fea8d144923857a99f4f22d264cc26008d04969 Author: Joy Zou <joy.zou@nxp.com> Date: Thu Dec 5 11:51:13 2024 -0500 arm64: dts: imx93: add pca9452 support Support pca9452 on imx93-14x14-evk. Signed-off-by: Joy Zou <joy.zou@nxp.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts | 83 +++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit 44b3dacb2bdae0c4078f4c7c9ae4531b5aa946a8 Author: Dario Binacchi <dario.binacchi@amarulasolutions.com> Date: Thu Dec 5 17:26:04 2024 +0100 arm64: dts: imx8mn-bsh-smm-s2/pro: add simple-framebuffer Add a simple-framebuffer node for U-Boot to further fill and activate. Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> .../dts/freescale/imx8mn-bsh-smm-s2-display.dtsi | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 315d7f301e234b99c1b9619f0b14cf288dc7c33f Author: Markus Niebel <Markus.Niebel@ew.tq-group.com> Date: Thu Dec 5 16:07:29 2024 +0100 arm64: dts: imx93-tqma9352-mba93xxla: enable Open Drain for MDIO The board has a pull-up resistor for MDIO pin per PHY design guide. When MDIO is idle, it needs to be high and open drain is better to be used here for power saving. Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9015397c2f2d9d327c0cf88d74e39c4858cb4912 Author: Markus Niebel <Markus.Niebel@ew.tq-group.com> Date: Thu Dec 5 16:07:28 2024 +0100 arm64: dts: imx93-tqma9352-mba93xxca: enable Open Drain for MDIO The board has a pull-up resistor for MDIO pin per PHY design guide. When MDIO is idle, it needs to be high and open drain is better to be used here for power saving. Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxca.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8be3e47826ec8de8fa45a3f5bc25004cf2fa0a48 Author: Fabio Estevam <festevam@denx.de> Date: Mon Dec 2 10:14:23 2024 -0300 ARM: dts: imx6qdl-apalis: Change to "adi,force-bt656-4" According to adv7180.yaml, the correct property name is "adi,force-bt656-4". Update it accordingly to fix several dt-schema warnings: adv7280@21: 'adv,force-bt656-4' does not match any of the regexes: ... imx6qdl-apalis.dtsi is the only in-tree kernel user of this property. BSD does have a adv7180 driver, so should not be impacted. Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e05956dbe6f49fc85b2a7518e6626a6bd7b6aada Author: Stefan Kerkmann <s.kerkmann@pengutronix.de> Date: Tue Nov 26 10:22:15 2024 +0100 ARM: dts: imx6sx: add phy-3p0-supply to usb phys The integrated usb phys are supplied by the 3p0 regulator, which has a voltage range of 2.625V to 3.4V. Thus the min and max values are corrected and the regulator added as a proper supply for the usb phys. This fixes the following warnings during the probe of the mxs_phy driver: mxs_phy 20c9000.usbphy: supply phy-3p0 not found, using dummy regulator mxs_phy 20ca000.usbphy: supply phy-3p0 not found, using dummy regulator The regulator handling was introduced by commit `966d73152078 (usb: phy: mxs: enable regulator phy-3p0 to improve signal qualilty, 2024-07-26)`. Signed-off-by: Stefan Kerkmann <s.kerkmann@pengutronix.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm/boot/dts/nxp/imx/imx6sx.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6c53709d2bb0ce669eb722fbd884a22491762e6b Author: Stefan Kerkmann <s.kerkmann@pengutronix.de> Date: Tue Nov 26 10:22:14 2024 +0100 ARM: dts: imx6sl: add phy-3p0-supply to usb phys The integrated usb phys are supplied by the 3p0 regulator, which has a voltage range of 2.625V to 3.4V. Thus the min and max values are corrected and the regulator added as a proper supply for the usb phys. This fixes the following warnings during the probe of the mxs_phy driver: mxs_phy 20c9000.usbphy: supply phy-3p0 not found, using dummy regulator mxs_phy 20ca000.usbphy: supply phy-3p0 not found, using dummy regulator The 3p0 regulator handling was introduced by commit 966d73152078 ("usb: phy: mxs: enable regulator phy-3p0 to improve signal qualilty")`. Signed-off-by: Stefan Kerkmann <s.kerkmann@pengutronix.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm/boot/dts/nxp/imx/imx6sl.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 92021d3e86aa40432da46cadd4e3f324272596fa Author: Stefan Kerkmann <s.kerkmann@pengutronix.de> Date: Tue Nov 26 10:22:13 2024 +0100 ARM: dts: imx6qdl: add phy-3p0-supply to usb phys The integrated usb phys are supplied by the 3p0 regulator, which has a voltage range of 2.625V to 3.4V. Thus the min and max values are corrected and the regulator added as a proper supply for the usb phys. This fixes the following warnings during the probe of the mxs_phy driver: mxs_phy 20c9000.usbphy: supply phy-3p0 not found, using dummy regulator mxs_phy 20ca000.usbphy: supply phy-3p0 not found, using dummy regulator The 3p0 regulator handling was introduced by commit 966d73152078 ("usb: phy: mxs: enable regulator phy-3p0 to improve signal qualilty")`. Signed-off-by: Stefan Kerkmann <s.kerkmann@pengutronix.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm/boot/dts/nxp/imx/imx6qdl.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fb1e493426d4da77a1d192fffa4dc55fc4ad5741 Author: Rob Barnes <robbarnes@google.com> Date: Wed Dec 18 01:57:59 2024 +0000 platform/chrome: cros_ec_lpc: Only check for events on MKBP notifies Only check EC for MKBP events when the ACPI notify value indicates the notify is due to an MKBP host event. This reduces unnecessary queries to the EC. Notify value 0x80 is reserved for devices specific notifies. It is used by many devices to indicate various events. It's only used by cros_ec for MKBP events. Signed-off-by: Rob Barnes <robbarnes@google.com> Link: https://lore.kernel.org/r/20241218015759.3558830-1-robbarnes@google.com Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> drivers/platform/chrome/cros_ec_lpc.c | 2 +- include/linux/platform_data/cros_ec_proto.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 6fcbc55a6afb21ccfaa4de1426b22a5e25331506 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 15 14:29:15 2024 +0100 platform/chrome: cros_ec_vbc: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241215-sysfs-const-bin_attr-chrome-v1-1-92249c4bc295@weissschuh.net Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> drivers/platform/chrome/cros_ec_vbc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 033fceedca9178f137ee5f6652e0f734199b1c96 Author: Tzung-Bi Shih <tzungbi@kernel.org> Date: Fri Dec 6 03:14:05 2024 +0000 dt-bindings: cros-ec: Remove google,cros-kbd-led-backlight After applying 4c03a44e2668 ("arm64: dts: mediatek: mt8195-cherry: Remove keyboard-backlight node"), there are no users for using the OF match. Instead, the device is added via drivers/mfd/cros_ec_dev.c by 970c3a6b7aa3 ("mfd: cros_ec: Register keyboard backlight subdevice"). Remove the DT bindings. Acked-by: Rob Herring (Arm) <robh@kernel.org> Acked-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20241206031405.1711996-3-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> .../chrome/google,cros-kbd-led-backlight.yaml | 36 ---------------------- .../devicetree/bindings/mfd/google,cros-ec.yaml | 3 -- 2 files changed, 39 deletions(-) commit 3a1d61dc32022ab15f168391d2120d4fcc2d048e Author: Tzung-Bi Shih <tzungbi@kernel.org> Date: Fri Dec 6 03:14:04 2024 +0000 platform/chrome: cros_kbd_led_backlight: Remove OF match After applying 4c03a44e2668 ("arm64: dts: mediatek: mt8195-cherry: Remove keyboard-backlight node"), there are no users for using the OF match. Instead, the device is added via drivers/mfd/cros_ec_dev.c by 970c3a6b7aa3 ("mfd: cros_ec: Register keyboard backlight subdevice"). Remove the OF match. Link: https://lore.kernel.org/r/20241206031405.1711996-2-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> drivers/platform/chrome/cros_kbd_led_backlight.c | 62 +++++------------------- 1 file changed, 11 insertions(+), 51 deletions(-) commit dce2f5b5da23389f838a22a7c149b717da93d9fe Author: Dawid Niedzwiecki <dawidn@google.com> Date: Fri Dec 6 09:15:14 2024 +0000 platform/chrome: cros_ec_proto: remove unnecessary retries Remove the retry of the get protocol info command. It is not needed anymore, because RWSIG continue command is send before start of the probing. That assures the EC device is ready in RW and there is no need to try again because FPMCU is not fully booted. Signed-off-by: Dawid Niedzwiecki <dawidn@google.com> Link: https://lore.kernel.org/r/20241206091514.2538350-3-dawidn@google.com Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> drivers/platform/chrome/cros_ec_proto.c | 9 --------- 1 file changed, 9 deletions(-) commit 5ffa0dbfdc9fc05acae02d5b0dc766ec778569ac Author: Dawid Niedzwiecki <dawidn@google.com> Date: Fri Dec 6 09:15:13 2024 +0000 platform/chrome: cros_ec: jump to RW before probing There are EC devices, like FPMCU, that use RWSIG as a method of authenticating RW section. After the authentication succeeds, EC device waits some time before jumping to RW. EC can be probed before the jump, which means there is a time window after jump to RW in which EC won't respond, because it is not initialized. It can cause a communication errors after probing. To avoid such problems, send the RWSIG continue command first, which skips waiting for the jump to RW. Send the command more times, to make sure EC is ready in RW before the start of the actual probing process. If a EC device doesn't support the RWSIG, it will respond with invalid command error code and probing will continue as usual. Signed-off-by: Dawid Niedzwiecki <dawidn@google.com> Link: https://lore.kernel.org/r/20241206091514.2538350-2-dawidn@google.com Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> drivers/platform/chrome/cros_ec.c | 5 +++ drivers/platform/chrome/cros_ec_i2c.c | 3 +- drivers/platform/chrome/cros_ec_ishtp.c | 2 +- drivers/platform/chrome/cros_ec_lpc.c | 2 +- drivers/platform/chrome/cros_ec_proto.c | 60 +++++++++++++++++++++++++++++ drivers/platform/chrome/cros_ec_rpmsg.c | 2 +- drivers/platform/chrome/cros_ec_spi.c | 2 +- drivers/platform/chrome/cros_ec_uart.c | 2 +- include/linux/platform_data/cros_ec_proto.h | 2 + 9 files changed, 74 insertions(+), 6 deletions(-) commit cfa842c80c99966db06f5ee7ec03e7d513965247 Author: Tzung-Bi Shih <tzungbi@kernel.org> Date: Wed Nov 20 15:03:59 2024 +0000 platform/chrome: cros_kbd_led_backlight: remove unneeded if-statement Remove an unneeded if-statement. Also s/error/err/. Link: https://lore.kernel.org/r/20241120150359.1522694-1-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> drivers/platform/chrome/cros_kbd_led_backlight.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 93b3a45645f13290745ef58bf99ad0877af29381 Author: Bitterblue Smith <rtl8821cerfe2@gmail.com> Date: Mon Dec 23 17:01:57 2024 +0200 wifi: rtl8xxxu: Fix RTL8188EU firmware upload block size A user reports that the firmware upload consistently fails when it's uploaded in chunks of 128 bytes, but it works when uploaded in chunks of 196 bytes. The official driver uses 196 bytes also. Link: https://github.com/a5a5aa555oo/rtl8xxxu/issues/2 Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/cba8e2f2-32c4-4174-90ba-0219f29dbdde@gmail.com drivers/net/wireless/realtek/rtl8xxxu/8188e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2927cb7b3b4ffd56d08749a673a463853f743205 Author: Zong-Zhe Yang <kevin_yang@realtek.com> Date: Thu Dec 19 09:45:45 2024 +0800 wifi: rtw89: debug: print regd for QATAR/UK/THAILAND The regd enum was extended for these countries. But, the dbgfs doesn't recognize them yet. So, add them. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241219014545.9157-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/debug.c | 3 +++ 1 file changed, 3 insertions(+) commit f8bcfb2076331388c794e6cd1800132cac6fd965 Author: Chih-Kang Chang <gary.chang@realtek.com> Date: Thu Dec 19 09:45:11 2024 +0800 wifi: rtw89: adjust thermal protection step and more RTL8852BE-VT ID To have better tuning of TX duty for fields usage, adjust thermal protection step to 5, then TX duty reduce to 75% at most. Add RTL8852BE-VT ID to enable this function by the way. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241219014511.9056-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 2 +- drivers/net/wireless/realtek/rtw89/rtw8852bte.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit 0a1584ec3dd947ce31d031122f7f57dd1a8f5a0e Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Fri Dec 27 11:37:54 2024 +0000 drm/i915: Remove unused intel_ring_cacheline_align The last use of intel_ring_cacheline_align() was removed in 2017 by commit afa8ce5b3080 ("drm/i915: Nuke legacy flip queueing code") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Tvrtko Ursulin <tursulin@igalia.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241227113754.25871-3-tursulin@igalia.com drivers/gpu/drm/i915/gt/intel_ring.c | 24 ------------------------ drivers/gpu/drm/i915/gt/intel_ring.h | 1 - 2 files changed, 25 deletions(-) commit 64420d2f3e3bf3e72c4a56f806711fb93faf1feb Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Fri Dec 27 11:37:53 2024 +0000 drm/i915: Remove unused intel_huc_suspend intel_huc_suspend() was added in 2022 by commit 27536e03271d ("drm/i915/huc: track delayed HuC load with a fence") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Tvrtko Ursulin <tursulin@igalia.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241227113754.25871-2-tursulin@igalia.com drivers/gpu/drm/i915/gt/uc/intel_huc.c | 13 ------------- drivers/gpu/drm/i915/gt/uc/intel_huc.h | 1 - 2 files changed, 14 deletions(-) commit bc6b027e6d735bde7622f3bbf809de5b911b49e9 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Fri Dec 27 11:37:52 2024 +0000 drm/i915: Remove deadcode i915_active_acquire_for_context() was added in 2020 by commit 5d9341370f57 ("drm/i915: Export a preallocate variant of i915_active_acquire()") but has never been used. The last use of __i915_gem_object_is_lmem() was removed in 2021 by commit ff20afc4cee7 ("drm/i915: Update error capture code to avoid using the current vma state") Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Tvrtko Ursulin <tursulin@igalia.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241227113754.25871-1-tursulin@igalia.com drivers/gpu/drm/i915/gem/i915_gem_lmem.c | 23 ----------------------- drivers/gpu/drm/i915/gem/i915_gem_lmem.h | 2 -- drivers/gpu/drm/i915/i915_active.c | 18 ------------------ drivers/gpu/drm/i915/i915_active.h | 1 - 4 files changed, 44 deletions(-) commit c0cf3530098bc13578bd4d0692351a2c4a57425d Author: Andrea Righi <arighi@nvidia.com> Date: Sat Dec 28 11:06:33 2024 +0100 sched_ext: idle: introduce check_builtin_idle_enabled() helper Minor refactoring to add a helper function for checking if the built-in idle CPU selection policy is enabled. Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org> kernel/sched/ext.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 02f034dcbf3dcb0989e638fdc00d10984dc2278b Author: Andrea Righi <arighi@nvidia.com> Date: Sat Dec 28 11:04:11 2024 +0100 sched_ext: idle: clarify comments Add a comments to clarify about the usage of cpumask_intersects(). Moreover, update scx_select_cpu_dfl() description clarifying that the final step of the idle selection logic involves searching for any idle CPU in the system that the task can use. Reviewed-by: Yury Norov <yury.norov@gmail.com> Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org> kernel/sched/ext.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9cf9aceed21e3f08c94108bd688e812effce4423 Author: Andrea Righi <arighi@nvidia.com> Date: Sat Dec 28 11:02:50 2024 +0100 sched_ext: idle: use assign_cpu() to update the idle cpumask Use the assign_cpu() helper to set or clear the CPU in the idle mask, based on the idle condition. Acked-by: Yury Norov <yury.norov@gmail.com> Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org> kernel/sched/ext.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 59c50511f7a8ecded211656425c9b92e31329333 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Aug 2 20:27:38 2023 -0400 bcachefs: bcachefs_metadata_version_inode_depth This adds a new inode field, bi_depth, for directory inodes: this allows us to make the check_directory_structure pass much more efficient. Currently, to ensure the filesystem is fully connect and has no loops, for every directory we follow backpointers until we find the root. But by adding a depth counter, it sufficies to only check the parent of each directory, and check that the parent's bi_depth is smaller. (fsck doesn't require that bi_depth = parent->bi_depth + 1; if a rename causes bi_depth off, but the chain to the root is still strictly decreasing, then the algorithm still works and there's no need for fsck to fixup the bi_depth fields). We've already checked backpointers, so we know that every directory (excluding the root)has a valid parent: if bi_depth is always decreasing, every chain must terminate, and terminate at the root directory. bi_depth will not necessarily be correct when fsck runs, due to directory renames - we can't change bi_depth on every child directory when renaming a directory. That's ok; fsck will silently fix the bi_depth field as needed, and future fsck runs will be much faster. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs_format.h | 3 +- fs/bcachefs/fs-common.c | 13 ++++++ fs/bcachefs/fsck.c | 94 ++++++++++++++++++++++++++++++++++--------- fs/bcachefs/inode.h | 14 +++++++ fs/bcachefs/inode_format.h | 3 +- 5 files changed, 105 insertions(+), 22 deletions(-) commit 80c6352c2c98bc7b399ce94ae7e54b5b36aad731 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 20 02:12:21 2024 -0400 bcachefs: Option changes now get propagated to reflinked data Now that bch2_move_get_io_opts() re-propagates changed inode io options to bch_extent_rebalance, we can properly suport changing IO path options for reflinked data. Changing a per-file IO path option, either via the xattr interface or via the BCHFS_IOC_REINHERIT_ATTRS ioctl, will now trigger a scan (the inode number is marked as needing a scan, via bch2_set_rebalance_needs_scan()), and rebalance will use bch2_move_data(), which will walk the inode number and pick up the new options. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/move.c | 51 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 7 deletions(-) commit ea4f9e75ecfb1203980716d6306de3f8789a049e Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Nov 6 23:16:24 2024 -0500 bcachefs: bcachefs_metadata_version_reflink_p_may_update_opts Previously, io path option changes on a file would be picked up automatically and applied to existing data - but not for reflinked data, as we had no way of doing this safely. A user may have had permission to copy (and reflink) a given file, but not write to it, and if so they shouldn't be allowed to change e.g. nr_replicas or other options. This uses the incompat feature mechanism in the previous patch to add a new incompatible flag to bch_reflink_p, indicating whether a given reflink pointer may propagate io path option changes back to the indirect extent. In this initial patch we're only setting it for the source extents. We'd like to set it for the destination in a reflink copy, when the user has write access to the source, but that requires mnt_idmap which is not curretly plumbed up to remap_file_range. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs_format.h | 3 ++- fs/bcachefs/fs-io.c | 9 ++++++++- fs/bcachefs/reflink.c | 18 +++++++++++++++--- fs/bcachefs/reflink.h | 3 ++- fs/bcachefs/reflink_format.h | 2 ++ 5 files changed, 29 insertions(+), 6 deletions(-) commit a36d8f0e0e3d427ffafae30694587efffda16f7c Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Nov 11 21:50:29 2024 -0500 bcachefs: BCH_SB_VERSION_INCOMPAT We've been getting away from feature bits: they don't have any kind of ordering, and thus it's possible for people to enable weird combinations of features that were never tested or intended to be run. Much better to just give every new feature, compatible or incompatible, a version number. Additionally, we probably won't ever rev the major version number: major version numbers represent incompatible versions, but that doesn't really fit with how we actually roll out incompatible features - we need a better way of rolling out incompatible features. So, this patch adds two new superblock fields: - BCH_SB_VERSION_INCOMPAT - BCH_SB_VERSION_INCOMPAT_ALLOWED BCH_SB_VERSION_INCOMPAT_ALLOWED indicates that incompatible features up to version number x are allowed to be used without user prompting, but it does not by itself deny old versions from mounting. BCH_SB_VERSION_INCOMPAT does deny old versions from mounting, and must be <= BCH_SB_VERSION_INCOMPAT_ALLOWED. BCH_SB_VERSION_INCOMPAT will only be set when a codepath attempts to use an incompatible feature, so as to not unnecessarily break compatibility with old versions. bch2_request_incompat_feature() is the new interface to check if an incompatible feature may be used. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs.h | 2 ++ fs/bcachefs/bcachefs_format.h | 24 +++++++++++-------- fs/bcachefs/recovery.c | 27 ++++++++++++++++++---- fs/bcachefs/super-io.c | 54 ++++++++++++++++++++++++++++++++++++++++--- fs/bcachefs/super-io.h | 19 ++++++++++++--- 5 files changed, 106 insertions(+), 20 deletions(-) commit d884cf189a92881c02fa22b2318bf8fcbbd61297 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 14 20:47:32 2024 -0500 bcachefs: Only run check_backpointers_to_extents in debug mode The backpointers passes, check_backpointers_to_extents() and check_extents_to_backpointers() are the most expensive fsck passes. Now that we're running the same check and repair code when using a backpointer at runtime (via bch2_backpointer_get_key()) that fsck does, there's no reason fsck needs to - except to verify that the filesystem really has no errors in debug mode. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/recovery_passes_types.h | 92 ++++++++++++++++++++----------------- fs/bcachefs/sb-errors_format.h | 4 +- 2 files changed, 51 insertions(+), 45 deletions(-) commit 7611d6b5d1c12e2210c6f1283232fcb16b685de1 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Dec 10 14:04:39 2024 -0500 bcachefs: better backpointer_target_not_found() error message Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit c2c2a4d6420bbfd584aa5e159a6f78b7b5124fd7 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Nov 12 03:46:31 2024 -0500 bcachefs: bch2_backpointer_get_key() now repairs dangling backpointers Continuing on with the self healing theme, we should be running any check and repair code at runtime that we can - instead of declaring the filesystemt inconsistent. This will also let us skip running the backpointers -> extents fsck pass except in debug mode. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 70 +++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 42 deletions(-) commit c738866e47ef2e4d543698f0ab370ffe2b7e0d59 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Nov 15 16:31:54 2024 -0500 bcachefs: check_extents_to_backpointers() now only checks buckets with mismatches Instead of walking every extent and every backpointer it points to, first sum up backpointers in each bucket and check for mismatches, and only look for missing backpointers if mismatches were detected, and only check extents in those buckets. This is a major fsck scalability improvement, since the two backpointers passes (backpointers -> extents and extents -> backpointers) are the most expensive fsck passes by far. Additionally, to speed up the upgrade for backpointer bucket gens, or in situations when we have to rebuild alloc info, add a special case for when no backpointers are found in a bucket - don't check each individual backpointer (in particular, avoiding the write buffer flushes), just recreate them. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 339 ++++++++++++++++++++++++++++++++++++++++++--- fs/bcachefs/bcachefs.h | 3 + fs/bcachefs/btree_cache.c | 1 - fs/bcachefs/errcode.h | 1 + 4 files changed, 325 insertions(+), 19 deletions(-) commit 056cae1c00b9773aa69791f4703262f690c28cdb Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 14 22:13:29 2024 -0500 bcachefs: Add write buffer flush param to backpointer_get_key() In an upcoming patch bch2_backpointer_get_key() will be repairing when it finds a dangling backpointer; it will need to flush the btree write buffer before it can definitively say there's an error. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 12 +++++++----- fs/bcachefs/backpointers.h | 5 +++-- fs/bcachefs/ec.c | 14 ++++++++++---- fs/bcachefs/move.c | 8 ++++++-- 4 files changed, 26 insertions(+), 13 deletions(-) commit 7171b1fd270e22a157e1a51bb684154bc146ab6f Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Nov 17 18:37:41 2024 -0500 bcachefs: kill __bch2_extent_ptr_to_bp() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.h | 18 +++--------------- fs/bcachefs/buckets.c | 7 +++---- 2 files changed, 6 insertions(+), 19 deletions(-) commit aca7a26f7f47f0290e00250c6ad53a7814584159 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Nov 17 23:58:21 2024 -0500 bcachefs: bch2_extent_ptr_to_bp() no longer depends on device bch_backpointer no longer contains the bucket_offset field, it's just a direct LBA mapping (with low bits to account for compressed extent splitting), so we don't need to refer to the device to construct it anymore. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 26 ++++---------------------- fs/bcachefs/backpointers.h | 17 ++++++----------- fs/bcachefs/buckets.c | 7 ++++--- 3 files changed, 14 insertions(+), 36 deletions(-) commit ba9752e5f43637096d636abb934b8172fc23ea62 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Nov 29 17:41:43 2024 -0500 bcachefs: bcachefs_metadata_version_disk_accounting_big_endian Fix sort order for disk accounting keys, in order to fix a regression on mount times. The typetag is now the most significant byte of the key, meaning disk accounting keys of the same type now sort together. This lets us skip over disk accounting keys that aren't mirrored in memory when reading accounting at startup, instead of having them interleaved with other counter types. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs_format.h | 3 ++- fs/bcachefs/disk_accounting.c | 22 +++++++++++++++++----- fs/bcachefs/disk_accounting.h | 18 +++++++++++------- fs/bcachefs/sb-downgrade.c | 14 ++++++++++++-- fs/bcachefs/util.h | 9 +++++++++ 5 files changed, 51 insertions(+), 15 deletions(-) commit ebdca072683844e04fe8bd31f64745554b9119d4 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Nov 16 23:53:07 2024 -0500 bcachefs: bcachefs_metadata_version_backpointer_bucket_gen New on disk format version: backpointers new include the generation number of the bucket they refer to, and the obsolete bucket_offset field (no longer needed because we no longer store backpointers in alloc keys) is gone. This is an expensive forced upgrade - hopefully the last; we have to run the extents_to_backpointers recovery pass to regenerate backpointers. It's a forced incompatible upgrade because the alternative would've been permamently making backpointers bigger, and as one of the biggest btrees (along with the extents btree) that's not an ideal option. It's worth it though, because this allows us to make the check_extents_to_backpointers pass drastically cheaper: an upcoming patch changes it to sum up backpointers in a bucket and check the sum against the sector counts for that bucket, only looking for missing backpointers if they don't match (and then only for specific buckets). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 27 +++++---------------------- fs/bcachefs/backpointers.h | 2 +- fs/bcachefs/bcachefs_format.h | 6 ++++-- fs/bcachefs/sb-downgrade.c | 15 +++++++++++++-- 4 files changed, 23 insertions(+), 27 deletions(-) commit 6679e363f44121ec07e9daeb0c78464df410bc47 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Dec 13 05:58:34 2024 -0500 bcachefs: bch2_btree_path_peek_slot() doesn't return errors Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 07c1a6fa901dc478a2685614399dedece910d6f5 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Dec 13 05:43:00 2024 -0500 bcachefs: trace_key_cache_fill Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_key_cache.c | 10 ++++++++++ fs/bcachefs/trace.h | 27 ++++++++++++++++++++++----- 2 files changed, 32 insertions(+), 5 deletions(-) commit 17d678bcdd839be6e85cc637b9ac9e672be9a270 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Dec 12 04:00:40 2024 -0500 bcachefs: Log message in journal for snapshot deletion Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/snapshot.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 54c9b92fc7c0ffe7662eeb7f4874f885a15e5d1a Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Dec 12 00:44:28 2024 -0500 bcachefs: bch2_trans_log_msg() Export a helper for logging to the journal when we're already in a transaction context. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_update.c | 13 ++++++++++--- fs/bcachefs/btree_update.h | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) commit d0855e210675b8018f4e89ca77cbfa133bce3a71 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Dec 12 04:03:32 2024 -0500 bcachefs: Kill snapshot_t->equiv Now entirely dead code. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/snapshot.c | 108 +++++------------------------------------- fs/bcachefs/snapshot.h | 15 ------ fs/bcachefs/subvolume_types.h | 1 - 3 files changed, 13 insertions(+), 111 deletions(-) commit b651ea8a44aab69f71c5ebeec7e472b03f1b2ca2 Author: Kurt Borja <kuurtb@gmail.com> Date: Tue Dec 24 09:01:32 2024 -0500 ACPI: platform_profile: Add devm_platform_profile_register() Platform profile's lifetime is usually tied to a device's lifetime, therefore add a device managed version of platform_profile_register(). Signed-off-by: Kurt Borja <kuurtb@gmail.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20241224140131.30362-4-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 29 +++++++++++++++++++++++++++++ include/linux/platform_profile.h | 1 + 2 files changed, 30 insertions(+) commit 9a497710cab94140762bcfbd9b6dc2c45f30678b Author: Ryan Wanner <Ryan.Wanner@microchip.com> Date: Fri Dec 20 14:07:09 2024 -0700 clk: at91: sama7d65: add sama7d65 pmc driver Add clock support for SAMA7D65 SoC. Increase maximum number of valid master clocks. The PMC for the SAMA7D65 requires 9 master clocks. Increase maximum amount of PLLs to 9 to support SAMA7D65 SoC PLL requirements. Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/549fa8590fe9b4380e413f8eed87392f28754395.1734723585.git.Ryan.Wanner@microchip.com [claudiu.beznea: sorted alphanumerically the Makefile entries, reorder the code for resource cleanup in sama7d65_pmc_setup()] Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> drivers/clk/at91/Makefile | 1 + drivers/clk/at91/clk-master.c | 2 +- drivers/clk/at91/clk-sam9x60-pll.c | 2 +- drivers/clk/at91/pmc.c | 1 + drivers/clk/at91/sama7d65.c | 1375 ++++++++++++++++++++++++++++++++++++ 5 files changed, 1379 insertions(+), 2 deletions(-) commit 33bd6465275a11d4dbeceb9fe1b439d54e14fafe Author: Antonio Riccio <linux@ariccio.me> Date: Thu Dec 26 10:38:31 2024 +0000 staging: vme_user: vme_tsi148.c: avoid parenthesis line ending Adhere to Linux Kernel coding style. Reported by checkpatch CHECK: Lines should not end with a '(' Signed-off-by: Antonio Riccio <linux@ariccio.me> Link: https://lore.kernel.org/r/Z20yIvcQOGHMfufx@stream-circuit Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/vme_user/vme_tsi148.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit acd33b48ce663c7e293b11cd77df7ea702ca34f6 Author: Artur Weber <aweber.kernel@gmail.com> Date: Fri Aug 16 09:51:02 2024 +0200 ARM: dts: samsung: exynos4212-tab3: Drop interrupt from WM1811 codec This was initially copied from the Midas DTSI, but there is no proof that the same interrupt is also used on the Tab 3. The pin listed as the interrupt here is GPIO_HDMI_CEC on the Midas, but for the Tab 3 it is the headset button GPIO - GPIO_EAR_SEND_END. Drop the interrupt, since there is no proof that it is used. Signed-off-by: Artur Weber <aweber.kernel@gmail.com> Link: https://lore.kernel.org/r/20240816-midas-audio-tab3-v2-5-48ee7f2293b3@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi | 2 -- 1 file changed, 2 deletions(-) commit d15cc681ba79fdc722d4aa7a83e572850cf5f64a Author: Artur Weber <aweber.kernel@gmail.com> Date: Fri Aug 16 09:51:01 2024 +0200 ARM: dts: samsung: exynos4212-tab3: Add MCLK2 clock to WM1811 codec config In the schematics, the MCLK2 pin is shown as connected to CODEC_CLK32K, which is derived from the same 32KHZ_PMIC clock as Bluetooth/WiFi and GPS clocks. 32KHZ_PMIC is connected to the BTCLK pin, represented in mainline as S2MPS11_CLK_BT. Add the MCLK2 clock to the WM1811 codec clock property to properly describe the hardware. Signed-off-by: Artur Weber <aweber.kernel@gmail.com> Link: https://lore.kernel.org/r/20240816-midas-audio-tab3-v2-4-48ee7f2293b3@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2c3c373555460b79a6a201c87230d32b211f8323 Author: Artur Weber <aweber.kernel@gmail.com> Date: Fri Aug 16 09:51:00 2024 +0200 ARM: dts: samsung: exynos4212-tab3: Fix headset mic, add jack detection Set up headset mic bias regulator and add the necessary properties to the samsung,midas-audio node to allow for headset jack detection. Signed-off-by: Artur Weber <aweber.kernel@gmail.com> Link: https://lore.kernel.org/r/20240816-midas-audio-tab3-v2-3-48ee7f2293b3@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit ba9dfa76ebb030df6b605e16239a8052c3c02171 Author: Conor Dooley <conor.dooley@microchip.com> Date: Wed Jul 17 10:37:56 2024 +0100 ARM: dts: socfpga: remove non-existent DAC from CycloneV devkit There is no Rohm DAC on the CycloneV devkit according to the online documentation for it that I could find, and it definitely does not have a dh2228fv as this device does not actually exist! Remove the DAC node from the devicetree as it is not acceptable to pretend to have a device on a board in order to bind the spidev driver in Linux. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240717-partake-antivirus-3347e415fb7d@spud Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_socdk.dts | 6 ------ 1 file changed, 6 deletions(-) commit 817473b6ddaf9eb5f2bc7d6dce9fa13a921477a0 Author: André Draszik <andre.draszik@linaro.org> Date: Tue Dec 3 12:40:28 2024 +0000 arm64: dts: exynos: gs101-oriole: add pd-disable and typec-power-opmode When the serial console is enabled, we need to disable power delivery since serial uses the SBU1/2 pins and appears to confuse the TCPCI, resulting in endless interrupts. For now, change the DT such that the serial console continues working. Note1: We can not have both typec-power-opmode and new-source-frs-typec-current active at the same time, as otherwise DT binding checks complain. Note2: When using a downstream DT, the Pixel boot-loader will modify the DT accordingly before boot, but for this upstream DT it doesn't know where to find the TCPCI node. The intention is for this commit to be reverted once an updated Pixel boot-loader becomes available. Signed-off-by: André Draszik <andre.draszik@linaro.org> Link: https://lore.kernel.org/r/20241203-gs101-phy-lanes-orientation-dts-v2-5-1412783a6b01@linaro.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/google/gs101-oriole.dts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ddbf40d8ce4a6b35821d0a0453370ec1422d915b Author: André Draszik <andre.draszik@linaro.org> Date: Tue Dec 3 12:40:27 2024 +0000 arm64: dts: exynos: gs101-oriole: enable Maxim max77759 TCPCi On Pixel 6 (and Pro), a max77759 companion PMIC for USB Type-C applications is used, which contains four functional blocks (at distinct I2C addresses): * top (including GPIO) * charger * fuel gauge * TCPCi While in the same package, TCPCi and Fuel Gauge have separate I2C addresses, interrupt lines and interrupt status registers and can be treated independently. The TCPCi is required to detect and handle connector orientation in Pixel's USB PHY driver, and to configure the USB controller's role (host vs device). This change adds the TCPCi part as it can be independent and doesn't need a top-level MFD. Signed-off-by: André Draszik <andre.draszik@linaro.org> Reviewed-by: Peter Griffin <peter.griffin@linaro.org> Tested-by: Peter Griffin <peter.griffin@linaro.org> Link: https://lore.kernel.org/r/20241203-gs101-phy-lanes-orientation-dts-v2-4-1412783a6b01@linaro.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/google/gs101-oriole.dts | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) commit 1e63e3c4f54cf4320b1651557542a5913ccb0c42 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Sun Dec 29 00:38:48 2024 +0100 ALSA: AC97: Use str_on_off() helper in snd_ac97_proc_read_main() Remove hard-coded strings by using the str_on_off() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20241228233849.686755-2-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/ac97/ac97_proc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1d720a2d4fe45efa62c73b2af279dc7db709c06d Author: Yongzhen Zhang <zhangyongzhen@kylinos.cn> Date: Mon Dec 23 16:47:26 2024 +0800 ALSA: hda/realtek: Add a comment for alc_fixup_inv_dmic() alc_fixup_inv_dmic() has an empty comment line above it, add a comment here. Signed-off-by: Yongzhen Zhang <zhangyongzhen@kylinos.cn> Link: https://patch.msgid.link/20241223084726.146805-1-zhangyongzhen@kylinos.cn Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/hda/patch_realtek.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 627f3c41ca005398cf1e86a312c5043147ec7ea6 Author: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Tue Dec 24 11:59:02 2024 +0100 iio: light: veml3235: extend regmap to add cache The configuration and ID registers are not volatile and are not affected by read operations (i.e. not precious), making them suitable to be cached in order to reduce the number of accesses to the device. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20241224-veml3235_scale-v2-3-2e1286846c77@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/light/veml3235.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 1a5a4b8fdbc90927864d51bef135efc501936ebc Author: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Tue Dec 24 11:59:01 2024 +0100 iio: light: veml3235: fix code style Trivial fixes to drop double spacings. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20241224-veml3235_scale-v2-2-2e1286846c77@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/light/veml3235.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ebf0aa3ed1dc94f2f66e19e5ea320eeacbbd518f Author: Lothar Rubusch <l.rubusch@gmail.com> Date: Wed Dec 25 18:13:34 2024 +0000 dt-bindings: iio: accel: adxl345: add interrupt-names Add interrupt-names INT1 and INT2 for the two interrupt lines of the sensor. When one of the two interrupt lines is connected, the interrupt as its interrupt-name, need to be declared in the devicetree. The driver then configures the sensor to indicate its events on either INT1 or INT2. If no interrupt is configured, then no interrupt-name should be configured, and vice versa. In this case the sensor runs in FIFO BYPASS mode. This allows sensor measurements, but none of the sensor events. Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20241225181338.69672-4-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 9f2223e3423a967a8b8c52e072c18b6c6e59a550 Author: Lothar Rubusch <l.rubusch@gmail.com> Date: Wed Dec 25 18:13:33 2024 +0000 dt-bindings: iio: accel: adxl345: make interrupts not a required property Remove interrupts from the list of required properties. The ADXL345 does not need interrupts for basic accelerometer functionality. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com> Link: https://patch.msgid.link/20241225181338.69672-3-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml | 1 - 1 file changed, 1 deletion(-) commit ad953dc844529a8605cf8a9368deed1d2f3027ff Author: Vasileios Amoiridis <vassilisamir@gmail.com> Date: Fri Dec 20 00:47:45 2024 +0100 dt-bindings: iio: imu: bmi323: add boolean type for drive-open-drain Add missing type description "boolean" for the drive-open-drain property. Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20241219234745.58723-4-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/devicetree/bindings/iio/imu/bosch,bmi323.yaml | 1 + 1 file changed, 1 insertion(+) commit 890faa294bfd9231c22367ead9a573119539fa2d Author: Vasileios Amoiridis <vassilisamir@gmail.com> Date: Fri Dec 20 00:47:44 2024 +0100 dt-bindings: iio: imu: bmi270: add boolean type for drive-open-drain Add missing type description "boolean" for the drive-open-drain property. Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Reviewed-by: Alex Lanzano <lanzano.alex@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20241219234745.58723-3-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/devicetree/bindings/iio/imu/bosch,bmi270.yaml | 1 + 1 file changed, 1 insertion(+) commit f1f57c1ef198985bd6ec3b0a8b3711883379d530 Author: Vasileios Amoiridis <vassilisamir@gmail.com> Date: Fri Dec 20 00:47:43 2024 +0100 dt-bindings: iio: imu: bmi160: add boolean type for drive-open-drain Add missing type description "boolean" for the drive-open-drain property. Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20241219234745.58723-2-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml | 1 + 1 file changed, 1 insertion(+) commit 4467dfddc555d66d34e29f064c086663f81d1fd4 Author: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Date: Tue Dec 24 15:29:41 2024 +0100 iio: adc: meson: simplify MESON_SAR_ADC_REG11 register access Simply check the max_register value to decide whether MESON_SAR_ADC_REG11 is present on the current IP revision. This allows dropping two additional bool fields from struct meson_sar_adc_param which previously had to be manually kept in sync. No functional changes intended. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://patch.msgid.link/20241224142941.97759-4-martin.blumenstingl@googlemail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/meson_saradc.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) commit a61e9c4fa2e852a40dd87ce3a38266c90a16d178 Author: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Date: Tue Dec 24 15:29:40 2024 +0100 iio: adc: meson: use tabs instead of spaces for some REG11 bit fields This makes them consistent with the rest of the driver. No functional changes. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://patch.msgid.link/20241224142941.97759-3-martin.blumenstingl@googlemail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/meson_saradc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 65233d03f6cf8f1b97788167fa8710c66c1d91fc Author: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Date: Tue Dec 24 15:29:39 2024 +0100 iio: adc: meson: fix voltage reference selection field name typo The field should be called "vref_voltage", without a typo in the word voltage. No functional changes intended. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://patch.msgid.link/20241224142941.97759-2-martin.blumenstingl@googlemail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/meson_saradc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ec2253b064b4b1b074a5a2e0ca0f89fcec323418 Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:29:11 2024 +0000 iio: adc: rockchip: correct alignment of timestamp I assume this device is only used on architectures where a 8 byte integer type is always 8 byte aligned. However, I would prefer IIO drivers to never make that assumption as the code gets copied into new drivers which are not so tightly couple to one driver and those can run on architectures that align these types to only 4 bytes in which case this structure may be 4 byte to small leading to a buffer overrun. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-21-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/rockchip_saradc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27e6ddf291b1c05bfcc3534e8212ed6c46447c60 Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:29:09 2024 +0000 iio: imu: inv_icm42600: switch timestamp type from int64_t __aligned(8) to aligned_s64 The vast majority of IIO drivers use aligned_s64 for the type of the timestamp field. It is not a bug to use int64_t and until this series iio_push_to_buffers_with_timestamp() took and int64_t timestamp, it is inconsistent. This change is to remove that inconsistency and ensure there is one obvious choice for future drivers. Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-19-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c | 2 +- drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit beac9d1b74929acf31dfdb9f076ac78e75d59e3b Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:29:08 2024 +0000 iio: chemical: scd4x: switch timestamp type from int64_t __aligned(8) to aligned_s64 The vast majority of IIO drivers use aligned_s64 for the type of the timestamp field. It is not a bug to use int64_t and until this series iio_push_to_buffers_with_timestamp() took and int64_t timestamp, it is inconsistent. This change is to remove that inconsistency and ensure there is one obvious choice for future drivers. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-18-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/chemical/scd4x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee13a020ac80768b5045685cc1c514fe2d28da17 Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:29:07 2024 +0000 iio: adc: ti-lmp92064: Switch timestamp type from int64_t __aligned(8) to aligned_s64 The vast majority of IIO drivers use aligned_s64 for the type of the timestamp field. It is not a bug to use int64_t and until this series iio_push_to_buffers_with_timestamp() took and int64_t timestamp, it is inconsistent. This change is to remove that inconsistency and ensure there is one obvious choice for future drivers. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-17-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ti-lmp92064.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ed45bc333b4211ac250df6e7e7b848c4c62750b Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:29:05 2024 +0000 iio: accel: bma220: Use aligned_s64 instead of open coding alignment. Use this new type to both slightly simplify the code and avoid confusing static analysis tools. Mostly this series is about consistency to avoid this code pattern getting copied into more drivers. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-15-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/bma220_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cfb4cd058d067cc087d02b6caba449d695e9a17 Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:29:04 2024 +0000 iio: adc: Use aligned_s64 instead of open coding alignment. Use this new type to both slightly simplify the code and avoid confusing static analysis tools. Mostly this series is about consistency to avoid this code pattern getting copied into more drivers. Acked-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-14-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad4000.c | 2 +- drivers/iio/adc/max1118.c | 2 +- drivers/iio/adc/max11410.c | 2 +- drivers/iio/adc/mcp3911.c | 2 +- drivers/iio/adc/pac1921.c | 2 +- drivers/iio/adc/rtq6056.c | 2 +- drivers/iio/adc/ti-adc081c.c | 2 +- drivers/iio/adc/ti-adc084s021.c | 2 +- drivers/iio/adc/ti-ads1015.c | 2 +- drivers/iio/adc/ti-ads1119.c | 2 +- drivers/iio/adc/ti-ads131e08.c | 2 +- drivers/iio/adc/ti-tsc2046.c | 2 +- drivers/iio/adc/vf610_adc.c | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) commit eb3176b7417642c3a56f6c80fa3a581fa21008ad Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:29:03 2024 +0000 iio: chemical: Use aligned_s64 instead of open coding alignment. Use this new type to both slightly simplify the code and avoid confusing static analysis tools. Mostly this series is about consistency to avoid this code pattern getting copied into more drivers. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-13-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/chemical/ccs811.c | 2 +- drivers/iio/chemical/ens160_core.c | 2 +- drivers/iio/chemical/scd30_core.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 5532cd9d1d3a1e764b558a8053644ec0fd4cf52a Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:29:02 2024 +0000 iio: gyro: Use aligned_s64 instead of open coding alignment. Use this new type to both slightly simplify the code and avoid confusing static analysis tools. Mostly this series is about consistency to avoid this code pattern getting copied into more drivers. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-12-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/gyro/adxrs290.c | 2 +- drivers/iio/gyro/bmg160_core.c | 2 +- drivers/iio/gyro/itg3200_buffer.c | 2 +- drivers/iio/gyro/mpu3050-core.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 15fd16d2969d48b7540f4aa1cfa20ea7fb05c0f5 Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:29:01 2024 +0000 iio: humidity: Use aligned_s64 instead of open coding alignment. Use this new type to both slightly simplify the code and avoid confusing static analysis tools. Mostly this series is about consistency to avoid this code pattern getting copied into more drivers. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-11-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/humidity/am2315.c | 2 +- drivers/iio/humidity/hdc100x.c | 2 +- drivers/iio/humidity/hts221.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit f3477faedf5499c3dd8713609f0537352122399e Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:29:00 2024 +0000 iio: imu: Use aligned_s64 instead of open coding alignment. Use this new type to both slightly simplify the code and avoid confusing static analysis tools. Mostly this series is about consistency to avoid this code pattern getting copied into more drivers. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-10-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/imu/bmi323/bmi323_core.c | 2 +- drivers/iio/imu/bno055/bno055.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a801016da0bbb955acf1a551584790e3816bb4db Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:28:59 2024 +0000 iio: light: Use aligned_s64 instead of open coding alignment. Use this new type to both slightly simplify the code and avoid confusing static analysis tools. Mostly this series is about consistency to avoid this code pattern getting copied into more drivers. Acked-By: Matti Vaittinen <mazziesaccount@gmail.com> #For bu27034, rpr0521 Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-9-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/light/adjd_s311.c | 2 +- drivers/iio/light/as73211.c | 2 +- drivers/iio/light/bh1745.c | 2 +- drivers/iio/light/isl29125.c | 2 +- drivers/iio/light/ltr501.c | 2 +- drivers/iio/light/max44000.c | 2 +- drivers/iio/light/rohm-bu27034.c | 2 +- drivers/iio/light/rpr0521.c | 2 +- drivers/iio/light/st_uvis25.h | 2 +- drivers/iio/light/tcs3414.c | 2 +- drivers/iio/light/tcs3472.c | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) commit 8d7940857f914d5c6270d5718a96e5dabdedcbad Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:28:58 2024 +0000 iio: magnetometer: Use aligned_s64 instead of open coding alignment. Use this new type to both slightly simplify the code and avoid confusing static analysis tools. Mostly this series is about consistency to avoid this code pattern getting copied into more drivers. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-8-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/magnetometer/af8133j.c | 2 +- drivers/iio/magnetometer/ak8974.c | 2 +- drivers/iio/magnetometer/ak8975.c | 2 +- drivers/iio/magnetometer/bmc150_magn.c | 2 +- drivers/iio/magnetometer/hmc5843.h | 2 +- drivers/iio/magnetometer/mag3110.c | 2 +- drivers/iio/magnetometer/yamaha-yas530.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit adfaea544ea645b24b0cd692be1d1f2b6cd26677 Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:28:57 2024 +0000 iio: pressure: Use aligned_s64 instead of open coding alignment. Use this new type to both slightly simplify the code and avoid confusing static analysis tools. Mostly this series is about consistency to avoid this code pattern getting copied into more drivers. Acked-By: Matti Vaittinen <mazziesaccount@gmail.com> #for the BD1390 Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-7-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/pressure/hsc030pa.h | 2 +- drivers/iio/pressure/ms5611_core.c | 2 +- drivers/iio/pressure/rohm-bm1390.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 8ee2a74efff70e8d79a93e4f4347a347d19b95cd Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:28:56 2024 +0000 iio: proximity: Use aligned_s64 instead of open coding alignment. Use this new type to both slightly simplify the code and avoid confusing static analysis tools. Mostly this series is about consistency to avoid this code pattern getting copied into more drivers. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-6-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/proximity/as3935.c | 2 +- drivers/iio/proximity/hx9023s.c | 2 +- drivers/iio/proximity/mb1232.c | 2 +- drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 2 +- drivers/iio/proximity/srf08.c | 2 +- drivers/iio/proximity/sx_common.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit bfca85fa9630309dcf60fe5b0b54e0b09f085053 Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:28:55 2024 +0000 iio: resolver: ad2s1210: Use aligned_s64 instead of open coding alignment. Use this new type to both slightly simplify the code and avoid confusing static analysis tools. Mostly this series is about consistency to avoid this code pattern getting copied into more drivers. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-5-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/resolver/ad2s1210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b11f6916df7fb39efcd45b4cfc77efcd0471b0e6 Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:28:54 2024 +0000 iio: temperature: tmp006: Use aligned_s64 instead of open coding alignment. Use this new type to both slightly simplify the code and avoid confusing static analysis tools. Mostly this series is about consistency to avoid this code pattern getting copied into more drivers. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-4-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/temperature/tmp006.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b54068b5934a871f1895adc5e5ca4355781eeb7 Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:28:53 2024 +0000 io: adc: ina2xx-adc: Fix sign and use aligned_s64 for timestamp. Whilst it doesn't actually make any difference because the code that fills this field doesn't care, timestamps are all signed. Use the new aligned_s64 instead of open coding alignment to avoid confusing static analyzers and give slightly cleaner code. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-3-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ina2xx-adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bed883e4f040419e79621e214127381de941973e Author: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Sun Dec 15 18:28:52 2024 +0000 iio: adc: ad7944: Fix sign and use aligned_s64 for timestamp. Whilst it doesn't actually make any difference because the code that fills this field doesn't care, timestamps are all signed. Use the new aligned_s64 instead of open coding alignment to avoid confusing static analyzers and give slightly cleaner code. Reviewed-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-2-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad7944.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5fd1849c684e60e9d0a5adcc937507676f6920f Author: David Lechner <dlechner@baylibre.com> Date: Thu Dec 19 13:25:23 2024 -0600 iio: ABI: combine current input sections Combine two duplicate sections describing in_currentY_raw. This went unnoticed until we renamed in_currentX_raw to in_currentY_raw and the kernel test robot found the duplication. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412200256.OB5Hmw5Q-lkp@intel.com/ Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241219-iio-abi-combine-current-input-sections-v1-1-8dcd8221d469@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/ABI/testing/sysfs-bus-iio | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit e2f9d754fc5b5dcb53a0df627f386b63f8ba2d68 Author: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Date: Fri Dec 20 10:59:21 2024 +0100 iio: trigger: stm32-timer: add support for stm32mp25 Add support for STM32MP25 SoC. Use newly introduced compatible to handle this new HW variant. Add TIM20 trigger definitions that can be used by the stm32 analog-to-digital converter. Use compatible data to identify it. As the counter framework is now superseding the deprecated IIO counter interface (IIO_COUNT), don't support it. Only register IIO trigger devices for ADC usage. So, make the valids_table a cfg option. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Link: https://patch.msgid.link/20241220095927.1122782-4-fabrice.gasnier@foss.st.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/trigger/stm32-timer-trigger.c | 21 +++++++++++++++++++-- include/linux/iio/timer/stm32-timer-trigger.h | 6 ++++++ 2 files changed, 25 insertions(+), 2 deletions(-) commit e9ed97be4fccd44beae4347eed38ea801c5d814d Author: Yasin Lee <yasin.lee.x@gmail.com> Date: Mon Dec 16 15:59:40 2024 +0800 iio: proximity: hx9023s: Added firmware file parsing functionality Configuration information is now prioritized from the firmware file. If the firmware file is missing or fails to parse, the driver falls back to using the default configuration list for writing the settings. Signed-off-by: Yasin Lee <yasin.lee.x@gmail.com> Link: https://patch.msgid.link/20241216-hx9023s-firmware-20241209-v2-1-ce1b0a1121d0@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/proximity/hx9023s.c | 93 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 86 insertions(+), 7 deletions(-) commit 0b9c8583b144be3ad3e48f661315fab64566a065 Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Thu Dec 19 13:39:55 2024 +0200 MAINTAINERS: Add maintainer for ROHM BD79703 Add undersigned as a maintainer for the ROHM BD79703 DAC driver. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://patch.msgid.link/5e99d4153b61a0d62174b8bde2ba6ae49da1e970.1734608215.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) commit af6aca656a85d250c3f39569266301035f023d23 Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Thu Dec 19 13:39:37 2024 +0200 iio: dac: Support ROHM BD79703 DAC The ROHM BD79703 is a 6 channel digital to analog converter. Based on the data-sheet examples the hardware would support setting the DAC word without changing the actual output. The data-sheet is not too specific on how the enabling the output of new voltage set by DAC should be done - hence this is not implemented by the driver. The BD79703 would also support two specific "PULL_DOWN" modes. These aren't currently supported by the driver either. Add a very basic support for controlling the channel outputs one-by-one. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://patch.msgid.link/bc77d7b979ca28408a216f597082fcd94ec63be7.1734608215.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/Kconfig | 8 ++ drivers/iio/dac/Makefile | 1 + drivers/iio/dac/rohm-bd79703.c | 162 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 171 insertions(+) commit f6ed0ca1d9c30de7f46a795ed0101a2fda9cef6d Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Thu Dec 19 13:39:11 2024 +0200 dt-bindings: Add ROHM BD79703 The ROHM BD79703 is a 8-bit, 6 channel DAC. Describe the dt-bindings. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/51ed31c494ea7385940b59500e8592d12558e291.1734608215.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> .../devicetree/bindings/iio/dac/rohm,bd79703.yaml | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 898918d67399bb73d6af1503038623a610d294a2 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 15 16:21:24 2024 +0100 iio: imu: bno055: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://patch.msgid.link/20241215-sysfs-const-bin_attr-iio-v1-1-a5801212482e@weissschuh.net Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/imu/bno055/bno055.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9351bbb1b022227644022850bf2160b04e970195 Author: Vasileios Amoiridis <vassilisamir@gmail.com> Date: Sat Dec 14 20:14:21 2024 +0100 iio: core: mark scan_timestamp as __private Since there are no more direct accesses to the indio_dev->scan_timestamp value, it can be marked as __private and use the macro ACCESS_PRIVATE() in order to access it. Like this, static checkers will be able to inform in case someone tries to either write to the value, or read its value directly. Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://patch.msgid.link/20241214191421.94172-5-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/industrialio-buffer.c | 2 +- include/linux/iio/buffer.h | 2 +- include/linux/iio/iio.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 6d0981f964768f05f812db732465936d92a4a461 Author: Vasileios Amoiridis <vassilisamir@gmail.com> Date: Sat Dec 14 20:14:20 2024 +0100 iio: common: ssp_sensors: drop conditional optimization for simplicity Drop conditional in favor of always calculating the timestamp value. This simplifies the code and allows to drop usage of internal private variable "scan_timestamp" of the struct iio_dev. Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://patch.msgid.link/20241214191421.94172-4-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/common/ssp_sensors/ssp_iio.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 45e3146d75424392e1cbc057e2b560785de82806 Author: Vasileios Amoiridis <vassilisamir@gmail.com> Date: Sat Dec 14 20:14:19 2024 +0100 iio: adc: max1363: Use a small fixed size buffer to replace dynamic allocation Drop the recurrent allocation of the data buffer from the trigger handler and put it in the iio_priv(). This way, the maximum amount of channels is always allocated in favor of simpler code and drop of usage of the internal private variable "scan_timestamp" of the struct iio_dev. Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://patch.msgid.link/20241214191421.94172-3-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/max1363.c | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) commit 6fcabe62de98bdd7a20c2b46992e90caf8fdd28a Author: Vasileios Amoiridis <vassilisamir@gmail.com> Date: Sat Dec 14 20:14:18 2024 +0100 iio: adc: dln2-adc: zero full struct instead of just the padding Drop a minor optimization of zeroing the padding between data and timestamp and zero the whole structure. This is done in favor of simpler code, and in order to drop the usage of the internal private variable "scan_timestamp" of the struct iio_dev. Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://patch.msgid.link/20241214191421.94172-2-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/dln2-adc.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit 88ff5304f63035e69e4d7571d67dfeee78511e34 Author: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Sun Dec 15 22:18:21 2024 +0100 iio: ABI: document in_illuminance_hardwaregain This attribute is used for the vl6180 (see vl6180.c), but it is still not documented. Add it to the _hardwaregain list. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20241215-iio_abi_in_illuminance_hardwaregain-v1-1-d94a59efb937@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/ABI/testing/sysfs-bus-iio | 1 + 1 file changed, 1 insertion(+) commit 84b6b55584d2fe6f4e85bcde2967bdde37577e50 Author: David Lechner <dlechner@baylibre.com> Date: Mon Dec 16 15:44:03 2024 -0600 iio: dac: ad7293: enable power before reset Change the order of regulator enable and reset so that power supplies are turned on before touching the reset line. Generally, chips should have the VDRIVE supply enabled before applying voltage on any pins. While we are at it, remove the voltage level checks. If the power supplies are not supplying the correct voltage, this is a hardware design problem, not a software problem. Signed-off-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://patch.msgid.link/20241216-iio-regulator-cleanup-round-6-v2-1-9482164b68cb@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/ad7293.c | 68 +++++++----------------------------------------- 1 file changed, 9 insertions(+), 59 deletions(-) commit 6ade82946f4c0925600124ee0a999fb6cdaa58bd Author: David Lechner <dlechner@baylibre.com> Date: Mon Dec 16 17:29:36 2024 -0600 iio: ABI: use Y consistently as channel number Change X to Y when referring to channel number in the ABI documentation. There were only a few cases using X (and one using Z). By far, most documented attributes are using Y for the channel number placeholder. For consistency, we should follow the same convention throughout. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241216-doc-iio-use-voltagey-consistently-v1-1-9e34a72133bc@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/ABI/testing/sysfs-bus-iio | 50 ++++++++++++++++----------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit 25d4851dda719ceb26514b73b48fc6319c0432b7 Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Wed Dec 18 10:17:15 2024 +0200 iio: dac: ad5624r: Drop docs of missing members The documentation for struct ad5624r_state contains members that are (no longer?) part of the structure. Remove unnecessary docs. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://patch.msgid.link/Z2KFC7ZBwmM69Qb4@mva-rohm Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/ad5624r.h | 2 -- 1 file changed, 2 deletions(-) commit 0c6db4506ad0259c0decc1eafeb8a6f98487f23a Author: Per-Daniel Olsson <perdaniel.olsson@axis.com> Date: Wed Dec 18 11:48:36 2024 +0100 iio: light: Add support for TI OPT4060 color sensor Add support for Texas Instruments OPT4060 RGBW Color sensor. Signed-off-by: Per-Daniel Olsson <perdaniel.olsson@axis.com> Link: https://patch.msgid.link/20241218104836.2784523-3-perdaniel.olsson@axis.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/ABI/testing/sysfs-bus-iio | 7 + Documentation/iio/index.rst | 1 + Documentation/iio/opt4060.rst | 61 ++ drivers/iio/light/Kconfig | 13 + drivers/iio/light/Makefile | 1 + drivers/iio/light/opt4060.c | 1343 +++++++++++++++++++++++++++++++ 6 files changed, 1426 insertions(+) commit 8354dc89242c6c811996536c8d95f9eb97f9f9f1 Author: Per-Daniel Olsson <perdaniel.olsson@axis.com> Date: Wed Dec 18 11:48:35 2024 +0100 dt-bindings: iio: light: Document TI OPT4060 RGBW sensor Add devicetree bindings for the OPT4060 RGBW color sensor. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Per-Daniel Olsson <perdaniel.olsson@axis.com> Link: https://patch.msgid.link/20241218104836.2784523-2-perdaniel.olsson@axis.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> .../devicetree/bindings/iio/light/ti,opt4060.yaml | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit e439c72499a06090fb1aaf627a5187cc30f9b571 Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Wed Dec 18 12:48:09 2024 +0100 iio: adc: ad_sigma_delta: Use `unsigned int` instead of plain `unsigned` This fixes a checkpatch warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' #70: FILE: drivers/iio/adc/ad_sigma_delta.c:253: + unsigned status_reg; Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20241218114809.1378063-2-u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad_sigma_delta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4358b76480211199c7ce5cfc90963c2a465702fa Author: Vasileios Amoiridis <vassilisamir@gmail.com> Date: Tue Dec 10 00:38:45 2024 +0100 dt-bindings: iio: pressure: bmp085: Add SPI interface The BMP{2,3,5}80 and BME280 devices have an SPI interface, so include it in the device-tree. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://patch.msgid.link/20241209233845.29539-2-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> .../devicetree/bindings/iio/pressure/bmp085.yaml | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit a497ac9924bb6004532e54ac87eea710d49620b1 Author: Lothar Rubusch <l.rubusch@gmail.com> Date: Fri Dec 13 21:19:03 2024 +0000 iio: accel: adxl345: add function to switch measuring mode Replace the powerup / powerdown functions by a generic function to put the sensor in STANDBY, or MEASURE mode. When configuring the FIFO for several features of the accelerometer, it is recommended to put measuring in STANDBY mode. Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com> Link: https://patch.msgid.link/20241213211909.40896-2-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/adxl345_core.c | 41 ++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) commit 4ebd9a5ca478673cfbb38795cc5b3adb4f35fe04 Author: Kanchana P Sridhar <kanchana.p.sridhar@intel.com> Date: Sat Dec 21 14:07:07 2024 -0800 crypto: iaa - Fix IAA disabling that occurs when sync_mode is set to 'async' With the latest mm-unstable, setting the iaa_crypto sync_mode to 'async' causes crypto testmgr.c test_acomp() failure and dmesg call traces, and zswap being unable to use 'deflate-iaa' as a compressor: echo async > /sys/bus/dsa/drivers/crypto/sync_mode [ 255.271030] zswap: compressor deflate-iaa not available [ 369.960673] INFO: task cryptomgr_test:4889 blocked for more than 122 seconds. [ 369.970127] Not tainted 6.13.0-rc1-mm-unstable-12-16-2024+ #324 [ 369.977411] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 369.986246] task:cryptomgr_test state:D stack:0 pid:4889 tgid:4889 ppid:2 flags:0x00004000 [ 369.986253] Call Trace: [ 369.986256] <TASK> [ 369.986260] __schedule+0x45c/0xfa0 [ 369.986273] schedule+0x2e/0xb0 [ 369.986277] schedule_timeout+0xe7/0x100 [ 369.986284] ? __prepare_to_swait+0x4e/0x70 [ 369.986290] wait_for_completion+0x8d/0x120 [ 369.986293] test_acomp+0x284/0x670 [ 369.986305] ? __pfx_cryptomgr_test+0x10/0x10 [ 369.986312] alg_test_comp+0x263/0x440 [ 369.986315] ? sched_balance_newidle+0x259/0x430 [ 369.986320] ? __pfx_cryptomgr_test+0x10/0x10 [ 369.986323] alg_test.part.27+0x103/0x410 [ 369.986326] ? __schedule+0x464/0xfa0 [ 369.986330] ? __pfx_cryptomgr_test+0x10/0x10 [ 369.986333] cryptomgr_test+0x20/0x40 [ 369.986336] kthread+0xda/0x110 [ 369.986344] ? __pfx_kthread+0x10/0x10 [ 369.986346] ret_from_fork+0x2d/0x40 [ 369.986355] ? __pfx_kthread+0x10/0x10 [ 369.986358] ret_from_fork_asm+0x1a/0x30 [ 369.986365] </TASK> This happens because the only async polling without interrupts that iaa_crypto currently implements is with the 'sync' mode. With 'async', iaa_crypto calls to compress/decompress submit the descriptor and return -EINPROGRESS, without any mechanism in the driver to poll for completions. Hence callers such as test_acomp() in crypto/testmgr.c or zswap, that wrap the calls to crypto_acomp_compress() and crypto_acomp_decompress() in synchronous wrappers, will block indefinitely. Even before zswap can notice this problem, the crypto testmgr.c's test_acomp() will fail and prevent registration of "deflate-iaa" as a valid crypto acomp algorithm, thereby disallowing the use of "deflate-iaa" as a zswap compress (zswap will fall-back to the default compressor in this case). To fix this issue, this patch modifies the iaa_crypto sync_mode set function to treat 'async' equivalent to 'sync', so that the correct and only supported driver async polling without interrupts implementation is enabled, and zswap can use 'deflate-iaa' as the compressor. Hence, with this patch, this is what will happen: echo async > /sys/bus/dsa/drivers/crypto/sync_mode cat /sys/bus/dsa/drivers/crypto/sync_mode sync There are no crypto/testmgr.c test_acomp() errors, no call traces and zswap can use 'deflate-iaa' without any errors. The iaa_crypto documentation has also been updated to mention this caveat with 'async' and what to expect with this fix. True iaa_crypto async polling without interrupts is enabled in patch "crypto: iaa - Implement batch_compress(), batch_decompress() API in iaa_crypto." [1] which is under review as part of the "zswap IAA compress batching" patch-series [2]. Until this is merged, we would appreciate it if this current patch can be considered for a hotfix. [1]: https://patchwork.kernel.org/project/linux-mm/patch/20241221063119.29140-5-kanchana.p.sridhar@intel.com/ [2]: https://patchwork.kernel.org/project/linux-mm/list/?series=920084 Fixes: 09646c98d ("crypto: iaa - Add irq support for the crypto async interface") Signed-off-by: Kanchana P Sridhar <kanchana.p.sridhar@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Documentation/driver-api/crypto/iaa/iaa-crypto.rst | 9 ++++++++- drivers/crypto/intel/iaa/iaa_crypto_main.c | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) commit de662429f3362dcc0647dd16879214efa4373d9d Author: Herbert Xu <herbert@gondor.apana.org.au> Date: Sat Dec 21 22:52:27 2024 +0800 crypto: lib/aesgcm - Reduce stack usage in libaesgcm_init The stack frame in libaesgcm_init triggers a size warning on x86-64. Reduce it by making buf static. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> lib/crypto/aesgcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87c5d7f5e5938f713bde4e7435e6b207372a7f8e Author: Gabriele Monaco <gmonaco@redhat.com> Date: Fri Dec 27 15:47:52 2024 +0100 verification/dot2k: Implement event type detection Currently dot2k treats all events equally and registers them with a general da_handle_event. This is however just part of the work because some events are necessary to understand when the monitor is entering the initial state. Specifically, the da_handle_start_event takes care of setting the monitor in the initial state and da_handle_start_run_event also registers the current event in the newly enabled monitor. da_handle_start_event can be used on events that only lead to the initial state (as it is currently done in the example monitors), while da_handle_start_run_event could be used on events that are only valid from the initial one. Failing to set at least one of those functions to handle events makes the monitor useless, since it will never be activated. This patch adapts dot2k to parse the events that surely lead to the initial state and set da_handle_start_event for those, if no such event is found but some events are only valid in the initial event, we instead set da_handle_start_run_event (it isn't necessary to set both). We still add a comment to warn the user to make sure this change is matching the model definition. Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> Link: https://lore.kernel.org/20241227144752.362911-9-gmonaco@redhat.com Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> tools/verification/dot2/automata.py | 32 ++++++++++++++++++++++++++++++++ tools/verification/dot2/dot2k.py | 11 +++++++++-- 2 files changed, 41 insertions(+), 2 deletions(-) commit de6f45c2dd226269fe9886290a139533c817c5bc Author: Gabriele Monaco <gmonaco@redhat.com> Date: Fri Dec 27 15:47:51 2024 +0100 verification/dot2k: Auto patch current kernel source dot2k suggests a list of changes to the kernel tree while adding a monitor: edit tracepoints header, Makefile, Kconfig and moving the monitor folder. Those changes can be easily run automatically. Add a flag to dot2k to alter the kernel source. The kernel source directory can be either assumed from the PWD, or from the running kernel, if installed. This feature works best if the kernel tree is a git repository, so that its easier to make sure there are no unintended changes. The main RV files (e.g. Makefile) have now a comment placeholder that can be useful for manual editing (e.g. to know where to add new monitors) and it is used by the script to append the required lines. We also slightly adapt the file handling functions in dot2k: __open_file is now called __read_file and also closes the file before returning the content; __create_file is now a more general __write_file, we no longer return on FileExistsError (not thrown while opening), a new __create_file simply calls __write_file specifying the monitor folder in the path. Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> Link: https://lore.kernel.org/20241227144752.362911-8-gmonaco@redhat.com Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/rv/Kconfig | 2 +- kernel/trace/rv/Makefile | 1 + kernel/trace/rv/rv_trace.h | 2 + tools/verification/dot2/dot2k | 5 ++- tools/verification/dot2/dot2k.py | 92 ++++++++++++++++++++++++++++++++++------ 5 files changed, 86 insertions(+), 16 deletions(-) commit 9c6cfe80980056042f1f80d65c74806021708989 Author: Gabriele Monaco <gmonaco@redhat.com> Date: Fri Dec 27 15:47:50 2024 +0100 verification/dot2k: Simplify manual steps in monitor creation This patch reduces and simplifies the manual steps still needed in creating a new RV monitor. It extends the dot2k script to create a tracepoint snippet and a Kconfig file for the newly generated monitor. Those files can be kept in the monitor's directory but shall be included in the main tracepoint header and Kconfig. Together with the checklist, dot2k now suggests the lines to add to those files for inclusion and the Makefile line to compile the new monitor: Writing the monitor into the directory monitor_name Almost done, checklist - Edit the monitor_name/monitor_name.c to add the instrumentation - Edit kernel/trace/rv/rv_trace.h: Add this line where other tracepoints are included and DA_MON_EVENTS_ID is defined: #include <monitors/monitor_name/monitor_name_trace.h> - Edit kernel/trace/rv/Makefile: Add this line where other monitors are included: obj-$(CONFIG_RV_MON_MONITOR_NAME) += monitors/monitor_name/monitor_name.o - Edit kernel/trace/rv/Kconfig: Add this line where other monitors are included: source "kernel/trace/rv/monitors/monitor_name/Kconfig" - Move monitor_name/ to the kernel's monitor directory (kernel/trace/rv/monitors) Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> Link: https://lore.kernel.org/20241227144752.362911-7-gmonaco@redhat.com Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> tools/verification/dot2/dot2k | 8 +-- tools/verification/dot2/dot2k.py | 86 +++++++++++++++++++++++++ tools/verification/dot2/dot2k_templates/Kconfig | 6 ++ tools/verification/dot2/dot2k_templates/main.c | 2 +- tools/verification/dot2/dot2k_templates/trace.h | 13 ++++ 5 files changed, 110 insertions(+), 5 deletions(-) commit bc3d482dcc062963e7dc20565be2a887e5fc9a2d Author: Gabriele Monaco <gmonaco@redhat.com> Date: Fri Dec 27 15:47:49 2024 +0100 rv: Simplify manual steps in monitor creation While creating a new monitor in RV, besides generating code from dot2k, there are a few manual steps which can be tedious and error prone, like adding the tracepoints, makefile lines and kconfig. This patch restructures the existing monitors to keep some files in the monitor's folder itself, which can be automatically generated by future versions of dot2k. Monitors have now their own Kconfig and tracepoint snippets. For simplicity, the main tracepoint definition, is moved to the RV directory, it defines only the tracepoint classes and includes the monitor-specific tracepoints, which reside in the monitor directory. Tracepoints and Kconfig no longer need to be copied and adapted from existing ones but only need to be included in the main files. The Makefile remains untouched since there's little advantage in having a separated Makefile for each monitor with a single line and including it in the main RV Makefile. Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> Link: https://lore.kernel.org/20241227144752.362911-6-gmonaco@redhat.com Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/rv/Kconfig | 25 ++-------------------- kernel/trace/rv/Makefile | 2 ++ kernel/trace/rv/monitors/wip/Kconfig | 12 +++++++++++ kernel/trace/rv/monitors/wip/wip.c | 2 +- kernel/trace/rv/monitors/wip/wip_trace.h | 15 +++++++++++++ kernel/trace/rv/monitors/wwnr/Kconfig | 11 ++++++++++ kernel/trace/rv/monitors/wwnr/wwnr.c | 2 +- kernel/trace/rv/monitors/wwnr/wwnr_trace.h | 16 ++++++++++++++ kernel/trace/rv/rv.c | 2 +- .../events/rv.h => kernel/trace/rv/rv_trace.h | 24 +++++---------------- 10 files changed, 66 insertions(+), 45 deletions(-) commit 64b3e5f0d45329bc593e13b64dcdcf836da006cd Author: Gabriele Monaco <gmonaco@redhat.com> Date: Fri Dec 27 15:47:48 2024 +0100 verification/dot2k: Add support for name and description options The dot2k command includes options to set a model name with -n and a description with -D, however those are not used in practice. This patch allows to specify a custom model name (by default the name of the dot file without extension) and a description which overrides the one in the C file. Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> Link: https://lore.kernel.org/20241227144752.362911-5-gmonaco@redhat.com Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> tools/verification/dot2/automata.py | 4 ++-- tools/verification/dot2/dot2c.py | 4 ++-- tools/verification/dot2/dot2k | 6 +----- tools/verification/dot2/dot2k.py | 8 +++++--- tools/verification/dot2/dot2k_templates/main.c | 4 ++-- 5 files changed, 12 insertions(+), 14 deletions(-) commit 91f3407e13b89b7391ebc5b6143fd22edd901041 Author: Gabriele Monaco <gmonaco@redhat.com> Date: Fri Dec 27 15:47:47 2024 +0100 verification/dot2k: More robust template variables The dot2k templates currently have variables that are automatically filled by the script marked as an uppercase VARIABLE. This requires some care while adding new variables to avoid using valid keywords and get them unexpectedly substituted. This patch switches the variables to the %%VARIABLE%% notation to make the pattern substitution more robust. Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> Link: https://lore.kernel.org/20241227144752.362911-4-gmonaco@redhat.com Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> tools/verification/dot2/dot2k.py | 14 ++++---- tools/verification/dot2/dot2k_templates/main.c | 50 +++++++++++++------------- 2 files changed, 32 insertions(+), 32 deletions(-) commit fabdaa29f58124a30569008d419282d9ef9cc082 Author: Abel Vesa <abel.vesa@linaro.org> Date: Fri Dec 27 14:58:36 2024 +0200 arm64: dts: qcom: x1e80100: Fix interconnect tags for SDHC nodes The CPU-to-SDHC interconnect path for the SDHC_2 needs to have the active-only tags. The tags are missing entirely on for the SDHC_4 controller interconnect paths. Fix all tags for both controllers. Fixes: ffb21c1e19b1 ("arm64: dts: qcom: x1e80100: Describe the SDHC controllers") Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Link: https://lore.kernel.org/r/20241227-b4-x1e80100-qcp-sdhc-fixes-v1-1-cd971f7f0955@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100.dtsi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit ca08e071c59d96cb1db19b20ba70e9db7b9d5791 Author: Gabriele Monaco <gmonaco@redhat.com> Date: Fri Dec 27 15:47:46 2024 +0100 verification/dot2k: Unify main.c templates dot2k has 3 templates, one per monitor type, but the only difference among them is the `DECLARE_DA_MON_*` call, keeping 3 almost identical templates requires more work whenever we introduce a change. This patch removes the 3 dot2k templates and replaces them with a generic one, we then adjust the model type from the script. Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> Link: https://lore.kernel.org/20241227144752.362911-3-gmonaco@redhat.com Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> tools/verification/dot2/dot2k.py | 7 +- .../dot2/dot2k_templates/{main_global.c => main.c} | 2 +- .../dot2/dot2k_templates/main_per_cpu.c | 91 ---------------------- .../dot2/dot2k_templates/main_per_task.c | 91 ---------------------- 4 files changed, 7 insertions(+), 184 deletions(-) commit 6c432b56a16a0727561211a137f37ec47f96f1d0 Author: Gabriele Monaco <gmonaco@redhat.com> Date: Fri Dec 27 15:47:45 2024 +0100 verification/dot2k: Fix template directory detection dot2k can be run as installed (e.g. make install) or from the kernel tree. In the former case it looks for templates in a known location; in the latter, the PWD has to be `<linux>/tools/verification` to properly import python modules. The current version looks for the template in a wrong directory in this latter case. This patch adjusts the directory where dot2k looks for templates if run from the kernel tree (i.e. not installed). Additionally we fix a few simple pylint warnings in boolean expressions. Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> Link: https://lore.kernel.org/20241227144752.362911-2-gmonaco@redhat.com Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> tools/verification/dot2/dot2k.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit c5f71916146033f9aba108075ff7087022075fd6 Author: Jens Axboe <axboe@kernel.dk> Date: Fri Dec 27 09:49:32 2024 -0700 io_uring/rw: always clear ->bytes_done on io_async_rw setup A previous commit mistakenly moved the clearing of the in-progress byte count into the section that's dependent on having a cached iovec or not, but it should be cleared for any IO. If not, then extra bytes may be added at IO completion time, causing potentially weird behavior like over-reporting the amount of IO done. Fixes: d7f11616edf5 ("io_uring/rw: Allocate async data through helper") Reported-by: kernel test robot <oliver.sang@intel.com> Closes: https://lore.kernel.org/oe-lkp/202412271132.a09c3500-lkp@intel.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/rw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21adbcaa8007f5e584d26bebb46ec46bfbbbd330 Author: Jens Axboe <axboe@kernel.dk> Date: Tue Dec 17 12:43:49 2024 -0700 io_uring/rw: use NULL for rw->free_iovec assigment It's a pointer, don't use 0 for that. sparse throws a warning for that, as the kernel test robot noticed. Fixes: d7f11616edf5 ("io_uring/rw: Allocate async data through helper") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412180253.YML3qN4d-lkp@intel.com/ Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/rw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1143be17d7acb02a7c4dba6169a33534983f4960 Author: Jens Axboe <axboe@kernel.dk> Date: Tue Dec 17 07:44:25 2024 -0700 io_uring/rw: don't mask in f_iocb_flags A previous commit changed overwriting kiocb->ki_flags with ->f_iocb_flags with masking it in. This breaks for retry situations, where we don't necessarily want to retain previously set flags, like IOCB_NOWAIT. The use case needs IOCB_HAS_METADATA to be persistent, but the change makes all flags persistent, which is an issue. Add a request flag to track whether the request has metadata or not, as that is persistent across issues. Fixes: 59a7d12a7fb5 ("io_uring: introduce attributes for read/write and PI support") Signed-off-by: Jens Axboe <axboe@kernel.dk> include/linux/io_uring_types.h | 3 +++ io_uring/rw.c | 18 +++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) commit ce9464081d5168ee0f279d6932ba82260a5b97c4 Author: Gabriel Krisman Bertazi <krisman@suse.de> Date: Mon Dec 16 15:46:15 2024 -0500 io_uring/msg_ring: Drop custom destructor kfree can handle slab objects nowadays. Drop the extra callback and just use kfree. Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://lore.kernel.org/r/20241216204615.759089-10-krisman@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/io_uring.c | 4 ++-- io_uring/msg_ring.c | 7 ------- io_uring/msg_ring.h | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) commit ef623a647f423c0d96aa75797cec182e3c5ba47d Author: Gabriel Krisman Bertazi <krisman@suse.de> Date: Mon Dec 16 15:46:14 2024 -0500 io_uring: Move old async data allocation helper to header There are two remaining uses of the old async data allocator that do not rely on the alloc cache. I don't want to make them use the new allocator helper because that would require a if(cache) check, which will result in dead code for the cached case (for callers passing a cache, gcc can't prove the cache isn't NULL, and will therefore preserve the check. Since this is an inline function and just a few lines long, keep a second helper to deal with cases where we don't have an async data cache. No functional change intended here. This is just moving the helper around and making it inline. Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://lore.kernel.org/r/20241216204615.759089-9-krisman@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/io_uring.c | 13 ------------- io_uring/io_uring.h | 12 ++++++++++++ io_uring/timeout.c | 5 ++--- io_uring/waitid.c | 4 ++-- 4 files changed, 16 insertions(+), 18 deletions(-) commit d7f11616edf59b255f1302040604f584535876c7 Author: Gabriel Krisman Bertazi <krisman@suse.de> Date: Mon Dec 16 15:46:13 2024 -0500 io_uring/rw: Allocate async data through helper This abstract away the cache details. Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://lore.kernel.org/r/20241216204615.759089-8-krisman@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/rw.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit f49a85371d8c1b44650ce660652a2fe305d3ddf6 Author: Gabriel Krisman Bertazi <krisman@suse.de> Date: Mon Dec 16 15:46:12 2024 -0500 io_uring/net: Allocate msghdr async data through helper This abstracts away the cache details. Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://lore.kernel.org/r/20241216204615.759089-7-krisman@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/net.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit e9447dc0b18db40f7c9807f8d0a218f0fa07517f Author: Gabriel Krisman Bertazi <krisman@suse.de> Date: Mon Dec 16 15:46:11 2024 -0500 io_uring/uring_cmd: Allocate async data through generic helper This abstracts away the cache details and simplify the code. Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://lore.kernel.org/r/20241216204615.759089-6-krisman@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/uring_cmd.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) commit 1210872918ef9feff60c9f5a4d3246372b732eae Author: Gabriel Krisman Bertazi <krisman@suse.de> Date: Mon Dec 16 15:46:10 2024 -0500 io_uring/poll: Allocate apoll with generic alloc_cache helper This abstracts away the cache details to simplify the code. Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://lore.kernel.org/r/20241216204615.759089-5-krisman@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/poll.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit b2846567060638a85724579781fc4a3ca6f137e4 Author: Gabriel Krisman Bertazi <krisman@suse.de> Date: Mon Dec 16 15:46:09 2024 -0500 io_uring/futex: Allocate ifd with generic alloc_cache helper Instead of open-coding the allocation, use the generic alloc_cache helper. Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://lore.kernel.org/r/20241216204615.759089-4-krisman@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/futex.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 49f7a3098cc2406c9cf60d595f4a148d6780bce6 Author: Gabriel Krisman Bertazi <krisman@suse.de> Date: Mon Dec 16 15:46:08 2024 -0500 io_uring: Add generic helper to allocate async data This helper replaces io_alloc_async_data by using the folded allocation. Do it in a header to allow the compiler to decide whether to inline. Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://lore.kernel.org/r/20241216204615.759089-3-krisman@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/io_uring.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 26f2d6de41795a931d1c16950114dbcf55dfbd75 Author: Celeste Liu <coelacanthushex@gmail.com> Date: Tue Sep 10 20:51:07 2024 +0800 riscv: defconfig: drop RT_GROUP_SCHED=y Commit ba6cfef057e1 ("riscv: enable Docker requirements in defconfig") introduced it because of Docker, but Docker has removed this requirement since [1] (2023-04-19). For cgroup v1, if turned on, and there's any cgroup in the "cpu" hierarchy it needs an RT budget assigned, otherwise the processes in it will not be able to get RT at all. The problem with RT group scheduling is that it requires the budget assigned but there's no way we could assign a default budget, since the values to assign are both upper and lower time limits, are absolute, and need to be sum up to < 1 for each individal cgroup. That means we cannot really come up with values that would work by default in the general case.[2] For cgroup v2, it's almost unusable as well. If it turned on, the cpu controller can only be enabled when all RT processes are in the root cgroup. But it will lose the benefits of cgroup v2 if all RT process were placed in the same cgroup. Red Hat, Gentoo, Arch Linux and Debian all disable it. systemd also doesn't support it.[3] [1]: https://github.com/moby/moby/commit/005150ed69c540fb0b5323e0f2208608c1204536 [2]: https://bugzilla.redhat.com/show_bug.cgi?id=1229700 [3]: https://github.com/systemd/systemd/issues/13781#issuecomment-549164383 Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Signed-off-by: Celeste Liu <CoelacanthusHex@gmail.com> Acked-by: Charlie Jenkins <charlie@rivosinc.com> Link: https://lore.kernel.org/r/20240910-fix-riscv-rt_group_sched-v3-1-486e75e5ae6d@gmail.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> arch/riscv/configs/defconfig | 1 - 1 file changed, 1 deletion(-) commit d9377941f2732d2f6f53ec9520321a19c687717a Author: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Date: Fri Dec 27 13:23:03 2024 +0000 clk: qcom: camcc-x1e80100: Set titan_top_gdsc as the parent GDSC of subordinate GDSCs The Titan TOP GDSC is the parent GDSC for all other GDSCs in the CAMCC block. None of the subordinate blocks will switch on without the parent GDSC switched on. Fixes: 76126a5129b5 ("clk: qcom: Add camcc clock driver for x1e80100") Acked-by: Rajendra Nayak <quic_rjendra@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Link: https://lore.kernel.org/r/20241227-b4-linux-next-24-12-16-titan-top-gdsc-v1-1-c96ef62fc307@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/camcc-x1e80100.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 2f0ffa57f6989aa2f3db7f999dec305eba7521c9 Author: Steven Liu <steven.liu@rock-chips.com> Date: Tue Dec 24 17:36:20 2024 +0800 pinctrl: rockchip: add rk3562 support Add support for the 5 GPIO banks in the rk3562. Signed-off-by: Steven Liu <steven.liu@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/20241224093620.3815705-1-kever.yang@rock-chips.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/pinctrl-rockchip.c | 200 ++++++++++++++++++++++++++++++++++++- drivers/pinctrl/pinctrl-rockchip.h | 3 +- 2 files changed, 200 insertions(+), 3 deletions(-) commit 1dc7fd41e8dc64c4cdc2d6247857653d47f6fbbd Author: Kever Yang <kever.yang@rock-chips.com> Date: Tue Dec 24 17:35:22 2024 +0800 dt-bindings: pinctrl: Add rk3562 pinctrl support Add the compatible string for the rk3562 SoC. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/20241224093522.3815562-1-kever.yang@rock-chips.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml | 1 + 1 file changed, 1 insertion(+) commit 001d7ef8e37074d2a2bce3a7210911a28f4530b7 Author: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com> Date: Tue Dec 24 14:14:41 2024 +0530 pinctrl: Fix the clean up on pinconf_apply_setting failure When some client does devm_pinctrl_get() followed by pinctrl_select_state() that does pinmux first successfully and later during config setting it sets the wrong drive strenght to the pin due to which pinconf_apply_setting fails. Currently, on failure during config setting is implemented as if pinmux has failed for one of the pin but that does not seem right and need to undo the pinmux for all the pin if config setting fails. Current commit does a bit refactor to reuse the code and tries to clean up mux setting on config setting failure. Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com> Link: https://lore.kernel.org/20241224084441.515870-1-mukesh.ojha@oss.qualcomm.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/core.c | 50 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) commit 8d097444982d7b23a5396169dc9d2923a59b5a79 Author: John B. Wyatt IV <jwyatt@redhat.com> Date: Tue Dec 24 01:23:28 2024 -0500 pm: cpupower: Add header changes for cpufreq.h to SWIG bindings "cpupower: Add support for showing energy performance preference" added two new functions to cpufreq.h. This patch adds them to the bindings. Link: https://lore.kernel.org/linux-pm/8dc731c3-6586-4265-ae6a-d93ed219a963@linuxfoundation.org/T/#t Tested by compiling both libcpupower and the headers; running the test script that does not use the functions as a basic sanity test. Link: https://lore.kernel.org/r/20241224062329.39606-1-jwyatt@redhat.com Signed-off-by: "John B. Wyatt IV" <jwyatt@redhat.com> Signed-off-by: "John B. Wyatt IV" <sageofredondo@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> tools/power/cpupower/bindings/python/raw_pylibcpupower.swg | 3 +++ 1 file changed, 3 insertions(+) commit 16414720045de30945b8d14b7907e0cbf81a4b49 Author: Cody Eksal <masterr3c0rd@epochal.quest> Date: Fri Nov 8 20:37:37 2024 -0400 clk: sunxi-ng: a100: enable MMC clock reparenting While testing the MMC nodes proposed in [1], it was noted that mmc0/1 would fail to initialize, with "mmc: fatal err update clk timeout" in the kernel logs. A closer look at the clock definitions showed that the MMC MPs had the "CLK_SET_RATE_NO_REPARENT" flag set. No reason was given for adding this flag in the first place, and its original purpose is unknown, but it doesn't seem to make sense and results in severe limitations to MMC speeds. Thus, remove this flag from the 3 MMC MPs. [1] https://msgid.link/20241024170540.2721307-10-masterr3c0rd@epochal.quest Fixes: fb038ce4db55 ("clk: sunxi-ng: add support for the Allwinner A100 CCU") Cc: stable@vger.kernel.org Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Link: https://patch.msgid.link/20241109003739.3440904-1-masterr3c0rd@epochal.quest Signed-off-by: Chen-Yu Tsai <wens@csie.org> drivers/clk/sunxi-ng/ccu-sun50i-a100.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f097a36ef88d693edcf4962ff594e3012c6e0277 Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Date: Tue Dec 24 14:16:19 2024 +0530 dt-bindings: usb: qcom,dwc3: Add QCS615 to USB DWC3 bindings Update dt-bindings to add primary controller of QCS615 to USB DWC3 controller list. Although this controller has a QUSB2 Phy, it belongs to a generation of SoCs like SDM670/SDM845/SM6350 where DP/DM is used for wakeup instead of qusb2_phy interrupt. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241224084621.4139021-2-krishna.kurapati@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 63f0abcb47bb6f9281d021c780fcd8c93d15a3f5 Author: Gordon Ou <gordon.xwj@gmail.com> Date: Tue Dec 24 14:23:36 2024 +0800 USB: usbip: Update USB/IP OP_REP_IMPORT documentation. This is to correct the mistaken byte offset of the field bDeviceClass in OP_REP_IMPORT documentation. The previous field bcdDevice has length 2 and the offset for bDeviceClass should be 0x138 + 2 = 0x13A instead of 0x139. Offsets for subsequent fields are also affected and fixed in this patch. Signed-off-by: Gordon Ou <gordon.xwj@gmail.com> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://lore.kernel.org/r/20241224062336.63215-1-gordon.xwj@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/usb/usbip_protocol.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit da31486bf2348078b6542eeed152caca74154bd5 Author: Pei Xiao <xiaopei01@kylinos.cn> Date: Fri Dec 27 16:54:50 2024 +0800 usb: typec: ucsi: make yoga_c630_ucsi_ops be static sparse warnings: drivers/usb/typec/ucsi/ucsi_yoga_c630.c:101:30: sparse: sparse: symbol 'yoga_c630_ucsi_ops' was not declared. Should it be static? Add static to fix sparse warnings. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412102033.J4vZNaaR-lkp@intel.com/ Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Link: https://lore.kernel.org/r/cefe3bc20b2ddaee2a0924ba32243f035e92a025.1735289530.git.xiaopei01@kylinos.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/ucsi/ucsi_yoga_c630.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a95c9e10ff8b52b78d1268bf20f218479ca1d58 Author: Mathias Nyman <mathias.nyman@linux.intel.com> Date: Fri Dec 27 14:01:42 2024 +0200 xhci: Add missing capability definition bits Add capability bits for the xHC Capability Parameters 2 (HCCPARAMS2) register described in xHCI specification section 5.3.9 bit 7 Extended TBC TRB Status Capability (ETC_TSC) bit 8 Get/Set Extended Property Capability (GSC) bit 9 Virtualization Based Trusted I/O Capability (VTC) Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20241227120142.1035206-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/host/xhci-caps.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 3ac820f9d422fb3b8a130b94e0e2a2cf429fcca1 Author: Mathias Nyman <mathias.nyman@linux.intel.com> Date: Fri Dec 27 14:01:41 2024 +0200 xhci: Add command completion parameter support xHC hosts can pass 24 bits of data with a command completion event TRB as the completion code only uses 8 bits of the 32 bit status field. Only Configure Endpoint, and Get Extended Property commands utilize this "command completion parameter" 24 bit field. For other command completion events the xHC should keep it RsvdZ. Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20241227120142.1035206-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/host/xhci-ring.c | 10 ++++++---- drivers/usb/host/xhci.h | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) commit 1e0a19912adb68a4b2b74fd77001c96cd83eb073 Author: Michal Pecio <michal.pecio@gmail.com> Date: Fri Dec 27 14:01:40 2024 +0200 usb: xhci: Fix NULL pointer dereference on certain command aborts If a command is queued to the final usable TRB of a ring segment, the enqueue pointer is advanced to the subsequent link TRB and no further. If the command is later aborted, when the abort completion is handled the dequeue pointer is advanced to the first TRB of the next segment. If no further commands are queued, xhci_handle_stopped_cmd_ring() sees the ring pointers unequal and assumes that there is a pending command, so it calls xhci_mod_cmd_timer() which crashes if cur_cmd was NULL. Don't attempt timer setup if cur_cmd is NULL. The subsequent doorbell ring likely is unnecessary too, but it's harmless. Leave it alone. This is probably Bug 219532, but no confirmation has been received. The issue has been independently reproduced and confirmed fixed using a USB MCU programmed to NAK the Status stage of SET_ADDRESS forever. Everything continued working normally after several prevented crashes. Link: https://bugzilla.kernel.org/show_bug.cgi?id=219532 Fixes: c311e391a7ef ("xhci: rework command timeout and cancellation,") CC: stable@vger.kernel.org Signed-off-by: Michal Pecio <michal.pecio@gmail.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20241227120142.1035206-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/host/xhci-ring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d157a2bcf99c028b134e1e6b53d8af64d0396c66 Author: Mathias Nyman <mathias.nyman@linux.intel.com> Date: Fri Dec 27 14:01:39 2024 +0200 xhci: dbgtty: Improve performance by handling received data immediately. Improve dbc transfer rate performance by copying the received data to the tty buffer directly in the request complete callback function if possible. Only defer it in case there is already pending deferred work, tty is throttled, or we fail copy the data to the tty buffer The request complete callback is already called by a workqueue. This is part 3/3 of a dbc performance improvement series that roughly triples dbc performace when using adb push and pull over dbc. Max/min push rate after patches is 210/118 MB/s, pull rate 171/133 MB/s, tested with large files (300MB-9GB) by Łukasz Bartosik Cc: Łukasz Bartosik <ukaszb@chromium.org> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20241227120142.1035206-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/host/xhci-dbgtty.c | 98 ++++++++++++++++++++++++++++-------------- 1 file changed, 65 insertions(+), 33 deletions(-) commit 03e3d9c2bd85cda941b3cf78e895c1498ac05c5f Author: Mathias Nyman <mathias.nyman@linux.intel.com> Date: Fri Dec 27 14:01:38 2024 +0200 xhci: dbc: Improve performance by removing delay in transfer event polling. Queue event polling work with 0 delay in case there are pending transfers queued up. This is part 2 of a 3 part series that roughly triples dbc performace when using adb push and pull over dbc. Max/min push rate after patches is 210/118 MB/s, pull rate 171/133 MB/s, tested with large files (300MB-9GB) by Łukasz Bartosik First performance improvement patch was commit 31128e7492dc ("xhci: dbc: add dbgtty request to end of list once it completes") Cc: Łukasz Bartosik <ukaszb@chromium.org> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20241227120142.1035206-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/host/xhci-dbgcap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4ee0acff5b9909644e6b2cb7fb977f877f916c0 Author: Frank Wunderlich <frank-w@public-files.de> Date: Tue Dec 17 09:54:28 2024 +0100 dt-bindings: pinctrl: add binding for MT7988 SoC This adds bindings for MT7988 pinctrl driver. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/20241217085435.9586-4-linux@fw-web.de Signed-off-by: Linus Walleij <linus.walleij@linaro.org> .../bindings/pinctrl/mediatek,mt7988-pinctrl.yaml | 575 +++++++++++++++++++++ 1 file changed, 575 insertions(+) commit 08bec851118226cc8c4397692542b855de2e0d73 Author: Daniel Golle <daniel@makrotopia.org> Date: Tue Dec 17 09:54:27 2024 +0100 pinctrl: mediatek: add MT7988 pinctrl driver Add pinctrl driver for the MediaTek MT7988 SoC. Signed-off-by: Sam Shih <sam.shih@mediatek.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org> [correctly initialise for the function_desc structure] Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/20241217085435.9586-3-linux@fw-web.de Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/mediatek/Kconfig | 7 + drivers/pinctrl/mediatek/Makefile | 1 + drivers/pinctrl/mediatek/pinctrl-mt7988.c | 1556 +++++++++++++++++++++++++++++ 3 files changed, 1564 insertions(+) commit 1673d720b7e2862a5ff1994922558b7427f8a56b Author: Daniel Golle <daniel@makrotopia.org> Date: Tue Dec 17 09:54:26 2024 +0100 pinctrl: mediatek: add support for MTK_PULL_PD_TYPE The MediaTek MT7988 SoC got some pins which only got configurable pull-down but unlike previous designs there is no pull-up option. Add new type MTK_PULL_PD_TYPE to support configuring such pins. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/20241217085435.9586-2-linux@fw-web.de Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 73 ++++++++++++++++++++---- drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h | 1 + 2 files changed, 63 insertions(+), 11 deletions(-) commit 1caf6149c3bf41a2ee07869449c4ea1ec8bbc2f8 Author: Alexey Klimov <alexey.klimov@linaro.org> Date: Tue Nov 12 02:53:06 2024 +0000 arm64: dts: qcom: qrb4210-rb2: add HDMI audio playback support Add sound node and dsp-related piece to enable HDMI audio playback support on Qualcomm QRB4210 RB2 board. That is the only sound output supported for now. The audio playback is verified using the following commands: amixer -c0 cset iface=MIXER,name='SEC_MI2S_RX Audio Mixer MultiMedia1' 1 aplay -D hw:0,0 /usr/share/sounds/alsa/Front_Center.wav Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Link: https://lore.kernel.org/r/20241112025306.712122-5-alexey.klimov@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 59 ++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 6624d17a8142776e43bcd632c227ebf0bbe9d590 Author: Alexey Klimov <alexey.klimov@linaro.org> Date: Tue Nov 12 02:53:05 2024 +0000 arm64: dts: qcom: sm4250: add LPASS LPI pin controller Add the Low Power Audio SubSystem Low Power Island (LPASS LPI) pin controller device node required for audio subsystem on Qualcomm QRB4210 RB2. QRB4210 is based on sm4250 which has a slightly different lpass pin controller comparing to sm6115. While at this, also add description of lpi_i2s2 pins (active state) required for audio playback via HDMI. Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Link: https://lore.kernel.org/r/20241112025306.712122-4-alexey.klimov@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm4250.dtsi | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 4541a5f11e59015d2f4b39864e421bf9e804097d Author: Alexey Klimov <alexey.klimov@linaro.org> Date: Tue Nov 12 02:53:04 2024 +0000 arm64: dts: qcom: sm6115: add LPASS LPI pin controller Add the Low Power Audio SubSystem Low Power Island (LPASS LPI) pin controller device node required for audio subsystem on Qualcomm QRB4210 RB2. Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241112025306.712122-3-alexey.klimov@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm6115.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit c722e3ce278826f29a2a8500d685130dd0b6a297 Author: Alexey Klimov <alexey.klimov@linaro.org> Date: Tue Nov 12 02:53:03 2024 +0000 arm64: dts: qcom: sm6115: add apr and its services Add apr (asynchronous packet router) node and its associated services required to enable audio on QRB4210 RB2 platform. Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Link: https://lore.kernel.org/r/20241112025306.712122-2-alexey.klimov@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm6115.dtsi | 72 ++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit ff2b76ae689b71e2d7a2e70bfd8d71537c39164d Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Mon Nov 4 15:42:04 2024 +0100 arm64: dts: qcom: sm8650: Fix CDSP context banks unit addresses There is a mismatch between 'reg' property and unit address for last there CDSP compute context banks. Current values were taken as-is from downstream source. Considering that 'reg' is used by Linux driver as SID of context bank and that least significant bytes of IOMMU value match the 'reg', assume the unit-address is wrong and needs fixing. This also won't have any practical impact, except adhering to Devicetree spec. Fixes: dae8cdb0a9e1 ("arm64: dts: qcom: sm8650: Add three missing fastrpc-compute-cb nodes") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241104144204.114279-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8650.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1474149c4209943b37a2c01b82f07ba39465e5fe Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Sat Oct 26 12:58:13 2024 +0200 clk: qcom: Make GCC_8150 depend on QCOM_GDSC Like all other non-ancient Qualcomm clock drivers, QCOM_GDSC is required, as the GCC driver defines and instantiates a bunch of GDSCs. Add the missing dependency. Reported-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Closes: https://lore.kernel.org/linux-arm-msm/ab85f2ae-6c97-4fbb-a15b-31cc9e1f77fc@linaro.org/ Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Link: https://lore.kernel.org/r/20241026-topic-8150gcc_kconfig-v1-1-3772013d8804@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 7ec041bd2715df2da4ab19c403c27d58d173c7c0 Author: Krishna chaitanya chundru <quic_krichai@quicinc.com> Date: Wed Jul 19 12:50:17 2023 +0530 ARM: dts: qcom: sdx55: Add CPU PCIe EP interconnect path Add cpu-pcie interconnect path for PCIe EP to sdx55 platform. Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/1689751218-24492-4-git-send-email-quic_krichai@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 84d2ae7c09d93949fc9e9fe57bdb78a2f3fa24aa Author: Krishna chaitanya chundru <quic_krichai@quicinc.com> Date: Wed Jul 19 12:50:16 2023 +0530 ARM: dts: qcom: sdx65: Add PCIe EP interconnect path Add pcie-mem & cpu-pcie interconnect path ifor PCIe EP to sdx65 platform. Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com> Link: https://lore.kernel.org/r/1689751218-24492-3-git-send-email-quic_krichai@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm/boot/dts/qcom/qcom-sdx65.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit a21fde626f775288aa62c6a5ae07f7e55c2b18c4 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:20 2024 +0200 arm64: dts: qcom: q[dr]u1000: move board clocks to qdu1000.dtsi file The QDU1000 and QRU1000 devices define XO and clocks completely in the board files, despite qdu1000.dtsi file referencing them directly. Follow the example of other platforms and move clock definitions to the qdu1000.dtsi file. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-21-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qdu1000-idp.dts | 14 -------------- arch/arm64/boot/dts/qcom/qdu1000.dtsi | 14 ++++++++++++++ arch/arm64/boot/dts/qcom/qru1000-idp.dts | 14 -------------- 3 files changed, 14 insertions(+), 28 deletions(-) commit 55cc39c70d95460fbe08d2518e53a7f8870e1657 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:19 2024 +0200 arm64: dts: qcom: sdm670: move board clocks to sdm670.dtsi file The SDM670 devices define XO and clocks completely in the board files, despite sdm670.dtsi file referencing them directly. Follow the example of other platforms and move clock definitions to the sdm670.dtsi file. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-20-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts | 14 -------------- arch/arm64/boot/dts/qcom/sdm670.dtsi | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) commit aacd8c54b391c9e26a31483cf40f8837ffcfbdee Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:18 2024 +0200 arm64: dts: qcom: sc8180x: drop extra XO clock frequencies sc8180x.dtsi already defines 38.4 MHz clock frequency for the XO clock. Drop duplicate overrides from Primus and Lenovo Flex 5G DT files. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-19-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts | 4 ---- arch/arm64/boot/dts/qcom/sc8180x-primus.dts | 4 ---- 2 files changed, 8 deletions(-) commit 67e25a3e12d128336114a5d1572e055a8bd33129 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:17 2024 +0200 arm64: dts: qcom: x1e80100: correct sleep clock frequency The X1E80100 platform uses PMK8550 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: af16b00578a7 ("arm64: dts: qcom: Add base X1E80100 dtsi and the QCP dts") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-18-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 448db0ba6ad2aafee2cbd91b491246749f6a6abc Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:16 2024 +0200 arm64: dts: qcom: sm8650: correct sleep clock frequency The SM8650 platform uses PMK8550 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: 6fbdb3c1fac7 ("arm64: dts: qcom: sm8650: add initial SM8650 MTP dts") Fixes: a834911d50c1 ("arm64: dts: qcom: sm8650: add initial SM8650 QRD dts") Fixes: 01061441029e ("arm64: dts: qcom: sm8650: add support for the SM8650-HDK board") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-17-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8650-hdk.dts | 2 +- arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 2 +- arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit e59334a088c3e722c0a287d4616af997f46c985e Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:15 2024 +0200 arm64: dts: qcom: sm8550: correct sleep clock frequency The SM8550 platform uses PMK8550 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: 0b12da4e28d8 ("arm64: dts: qcom: add base AIM300 dtsi") Fixes: b5e25ded2721 ("arm64: dts: qcom: sm8550: add support for the SM8550-HDK board") Fixes: 71342fb91eae ("arm64: dts: qcom: Add base SM8550 MTP dts") Fixes: d228efe88469 ("arm64: dts: qcom: sm8550-qrd: add QRD8550") Fixes: ba2c082a401f ("arm64: dts: qcom: sm8550: Add support for Samsung Galaxy Z Fold5") Fixes: 39c596304e44 ("arm64: dts: qcom: Add SM8550 Xperia 1 V") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-16-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8550-aim300.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8550-hdk.dts | 2 +- arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 2 +- arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 2 +- arch/arm64/boot/dts/qcom/sm8550-samsung-q5q.dts | 2 +- arch/arm64/boot/dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit c375ff3b887abf376607d4769c1114c5e3b6ea72 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:14 2024 +0200 arm64: dts: qcom: sm8450: correct sleep clock frequency The SM8450 platform uses PMK8350 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: 5188049c9b36 ("arm64: dts: qcom: Add base SM8450 DTSI") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-15-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4cc8c75cfc5d06084a31da2ff67e477565f0cae Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:13 2024 +0200 arm64: dts: qcom: sm8350: correct sleep clock frequency The SM8350 platform uses PMK8350 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: b7e8f433a673 ("arm64: dts: qcom: Add basic devicetree support for SM8350 SoC") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-14-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8350.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75420e437eed69fa95d1d7c339dad86dea35319a Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:12 2024 +0200 arm64: dts: qcom: sm8250: correct sleep clock frequency The SM8250 platform uses PM8150 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: 9ff8b0591fcf ("arm64: dts: qcom: sm8250: use the right clock-freqency for sleep-clk") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-13-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 223382c94f1f07c475d39713e4c058401480b441 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:11 2024 +0200 arm64: dts: qcom: sm6375: correct sleep clock frequency The SM6375 platform uses PM6125 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: 59d34ca97f91 ("arm64: dts: qcom: Add initial device tree for SM6375") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-12-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm6375.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3c547e1507862f0e4d46432b665c5c6e61e14d6 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:10 2024 +0200 arm64: dts: qcom: sm6125: correct sleep clock frequency The SM6125 platform uses PM6125 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: cff4bbaf2a2d ("arm64: dts: qcom: Add support for SM6125") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-11-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 158e67cf3619dbb5b9914bb364889041f4b90eea Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:09 2024 +0200 arm64: dts: qcom: sm4450: correct sleep clock frequency The SM4450 platform uses PM4450 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: 7a1fd03e7410 ("arm64: dts: qcom: Adds base SM4450 DTSI") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-10-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm4450.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8021da9ddc65fa041e12ea1e0ff2dfce5c926eb Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:08 2024 +0200 arm64: dts: qcom: sdx75: correct sleep clock frequency The SDX75 platform uses PMK8550 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: 9181bb939984 ("arm64: dts: qcom: Add SDX75 platform and IDP board support") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-9-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sdx75.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6ccdca14eac545320ab03d6ca91ca343e7372e5 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:07 2024 +0200 arm64: dts: qcom: sc7280: correct sleep clock frequency The SC7280 platform uses PMK8350 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: 7a1f4e7f740d ("arm64: dts: qcom: sc7280: Add basic dts/dtsi files for sc7280 soc") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-8-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fb01ef4907e3888c2002d71bf66ef52eb0fa634 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:06 2024 +0200 arm64: dts: qcom: sar2130p: correct sleep clock frequency The SAR2130P platform uses PM8150 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: be9115bfe5bf ("arm64: dts: qcom: sar2130p: add support for SAR2130P") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-7-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sar2130p.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 298192f365a343d84e9d2755e47bebebf0cfb82e Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:05 2024 +0200 arm64: dts: qcom: qrb4210-rb2: correct sleep clock frequency Qualcomm RB2 board uses PM6125 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: 8d58a8c0d930 ("arm64: dts: qcom: Add base qrb4210-rb2 board dts") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-6-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5546604e034b6c383b65676ff8615b346897eccd Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:04 2024 +0200 arm64: dts: qcom: q[dr]u1000: correct sleep clock frequency The Q[DR]U1000 platforms use PM8150 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: d1f2cfe2f669 ("arm64: dts: qcom: Add base QDU1000/QRU1000 IDP DTs") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-5-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qdu1000-idp.dts | 2 +- arch/arm64/boot/dts/qcom/qru1000-idp.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1473ff0b69de68b23ce9874548cdabc64d72725e Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:03 2024 +0200 arm64: dts: qcom: qcs404: correct sleep clock frequency The QCS40x platforms use PMS405 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: 9181bb939984 ("arm64: dts: qcom: Add SDX75 platform and IDP board support") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-4-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs404.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4148d869d47d8c86da0291dd95d411a5ebe90c8 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:02 2024 +0200 arm64: dts: qcom: msm8994: correct sleep clock frequency The MSM8994 platform uses PM8994/6 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: feeaf56ac78d ("arm64: dts: msm8994 SoC and Huawei Angler (Nexus 6P) support") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-3-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/msm8994.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c775f586cde4fca3c5591c43b6dc8b243bc304c Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:01 2024 +0200 arm64: dts: qcom: msm8939: correct sleep clock frequency The MSM8939 platform uses PM8916 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: 61550c6c156c ("arm64: dts: qcom: Add msm8939 SoC") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-2-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/msm8939.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f088b921890cef28862913e5627bb2e2b5f82125 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 24 12:17:00 2024 +0200 arm64: dts: qcom: msm8916: correct sleep clock frequency The MSM8916 platform uses PM8916 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition. Fixes: f4fb6aeafaaa ("arm64: dts: qcom: msm8916: Add fixed rate on-board oscillators") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224-fix-board-clocks-v3-1-e9b08fbeadd3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33f1722eb86e45320a3dd7b3d42f6593a1d595c2 Author: Gabor Juhos <j4g8y7@gmail.com> Date: Mon Oct 21 19:32:48 2024 +0200 clk: qcom: clk-alpha-pll: fix alpha mode configuration Commit c45ae598fc16 ("clk: qcom: support for alpha mode configuration") added support for configuring alpha mode, but it seems that the feature was never working in practice. The value of the alpha_{en,mode}_mask members of the configuration gets added to the value parameter passed to the regmap_update_bits() function, however the same values are not getting applied to the bitmask. As the result, the respective bits in the USER_CTL register are never modifed which leads to improper configuration of several PLLs. The following table shows the PLL configurations where the 'alpha_en_mask' member is set and which are passed as a parameter for the clk_alpha_pll_configure() function. In the table the 'expected rate' column shows the rate the PLL should run at with the given configuration, and the 'real rate' column shows the rate the PLL runs at actually. The real rates has been verified on hardwareOn IPQ* platforms, on other platforms, those are computed values only. file pll expected rate real rate dispcc-qcm2290.c disp_cc_pll0 768.0 MHz 768.0 MHz dispcc-sm6115.c disp_cc_pll0 768.0 MHz 768.0 MHz gcc-ipq5018.c ubi32_pll 1000.0 MHz != 984.0 MHz gcc-ipq6018.c nss_crypto_pll 1200.0 MHz 1200.0 MHz gcc-ipq6018.c ubi32_pll 1497.6 MHz != 1488.0 MHz gcc-ipq8074.c nss_crypto_pll 1200.0 MHz != 1190.4 MHz gcc-qcm2290.c gpll11 532.0 MHz != 518.4 MHz gcc-qcm2290.c gpll8 533.2 MHz != 518.4 MHz gcc-qcs404.c gpll3 921.6 MHz 921.6 MHz gcc-sm6115.c gpll11 600.0 MHz != 595.2 MHz gcc-sm6115.c gpll8 800.0 MHz != 787.2 MHz gpucc-sdm660.c gpu_cc_pll0 800.0 MHz != 787.2 MHz gpucc-sdm660.c gpu_cc_pll1 740.0 MHz != 729.6 MHz gpucc-sm6115.c gpu_cc_pll0 1200.0 MHz != 1190.4 MHz gpucc-sm6115.c gpu_cc_pll1 640.0 MHz != 633.6 MHz gpucc-sm6125.c gpu_pll0 1020.0 MHz != 1017.6 MHz gpucc-sm6125.c gpu_pll1 930.0 MHz != 921.6 MHz mmcc-sdm660.c mmpll8 930.0 MHz != 921.6 MHz mmcc-sdm660.c mmpll5 825.0 MHz != 806.4 MHz As it can be seen from the above, there are several PLLs which are configured incorrectly. Change the code to apply both 'alpha_en_mask' and 'alpha_mode_mask' values to the bitmask in order to configure the alpha mode correctly. Applying the 'alpha_en_mask' fixes the initial rate of the PLLs showed in the table above. Since the 'alpha_mode_mask' is not used by any driver currently, that part of the change causes no functional changes. Cc: stable@vger.kernel.org Fixes: c45ae598fc16 ("clk: qcom: support for alpha mode configuration") Signed-off-by: Gabor Juhos <j4g8y7@gmail.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Tested-by: Gabor Juhos <j4g8y7@gmail.com> Link: https://lore.kernel.org/r/20241021-fix-alpha-mode-config-v1-1-f32c254e02bc@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-alpha-pll.c | 2 ++ 1 file changed, 2 insertions(+) commit 9fa33cbca3d2842f1f47ed4e5f6574e611dae32b Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Oct 26 20:59:41 2024 +0300 arm64: dts: qcom: sm8650: correct MDSS interconnects SM8650 lists two interconnects for the display subsystem, mdp0-mem (between MDP and LLCC) and mdp1-mem (between LLCC and EBI, memory). The second interconnect is a misuse. mdpN-mem paths should be used for several outboud MDP interconnects rather than the path between LLCC and memory. This kind of misuse can result in bandwidth underflows, possibly degrading picture quality as the required memory bandwidth is divided between all mdpN-mem paths (and LLCC-EBI should not be a part of such division). Drop the second path and use direct MDP-EBI path for mdp0-mem until we support separate MDP-LLCC and LLCC-EBI paths. Fixes: 10e024671295 ("arm64: dts: qcom: sm8650: add interconnect dependent device nodes") Cc: stable@kernel.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241026-fix-sm8x50-mdp-icc-v2-2-fd8ddf755acc@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8650.dtsi | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b8591df49cde459e3b84cdc0517d7bf92053d244 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Oct 26 20:59:40 2024 +0300 arm64: dts: qcom: sm8550: correct MDSS interconnects SM8550 lists two interconnects for the display subsystem, mdp0-mem (between MDP and LLCC) and mdp1-mem (between LLCC and EBI, memory). The second interconnect is a misuse. mdpN-mem paths should be used for several outboud MDP interconnects rather than the path between LLCC and memory. This kind of misuse can result in bandwidth underflows, possibly degrading picture quality as the required memory bandwidth is divided between all mdpN-mem paths (and LLCC-EBI should not be a part of such division). Drop the second path and use direct MDP-EBI path for mdp0-mem until we support separate MDP-LLCC and LLCC-EBI paths. Fixes: d7da51db5b81 ("arm64: dts: qcom: sm8550: add display hardware devices") Cc: stable@kernel.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241026-fix-sm8x50-mdp-icc-v2-1-fd8ddf755acc@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8550.dtsi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 320f7a476c5fe79f50d00c75debfd9f63a0e713f Author: Gabor Juhos <j4g8y7@gmail.com> Date: Mon Oct 28 19:48:19 2024 +0100 clk: qcom: dispcc-sm6115: remove alpha values from disp_cc_pll0_config Since both the 'alpha' and 'alpha_hi' members of the configuration is initialized (the latter is implicitly) with zero values, the output rate of the PLL will be the same whether alpha mode is enabled or not. Remove the initialization of the alpha* members to make it clear that the alpha mode is not required to get the desired output rate. Despite that enabling alpha mode is not needed for the initial configuration, the set_rate() op might require that it is enabled already. In this particular case however, the clk_alpha_pll_set_rate() function will get reset the ALPHA_EN bit when the PLL's rate changes, so dropping 'alpha_en_mask' is safe. No functional changes intended, compile tested only. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com> Link: https://lore.kernel.org/r/20241028-alpha-mode-cleanup-v2-5-9bc6d712bd76@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/dispcc-sm6115.c | 2 -- 1 file changed, 2 deletions(-) commit b9286a91b59fe9c7f8e231fce8e51df3b1442f6b Author: Gabor Juhos <j4g8y7@gmail.com> Date: Mon Oct 28 19:48:18 2024 +0100 clk: qcom: dispcc-qcm2290: remove alpha values from disp_cc_pll0_config Since both the 'alpha' and 'alpha_hi' members of the configuration is initialized (the latter is implicitly) with zero values, the output rate of the PLL will be the same whether alpha mode is enabled or not. Remove the initialization of the alpha* members to make it clear that the alpha mode is not required to get the desired output rate. Despite that enabling alpha mode is not needed for the initial configuration, the set_rate() op might require that it is enabled already. In this particular case however, the clk_alpha_pll_set_rate() function will get reset the ALPHA_EN bit when the PLL's rate changes, so dropping 'alpha_en_mask' is safe. No functional changes intended, compile tested only. Signed-off-by: Gabor Juhos <j4g8y7@gmail.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241028-alpha-mode-cleanup-v2-4-9bc6d712bd76@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/dispcc-qcm2290.c | 2 -- 1 file changed, 2 deletions(-) commit 5d11fd2a919b153c68cda42c175b4e45668654a9 Author: Gabor Juhos <j4g8y7@gmail.com> Date: Mon Oct 28 19:48:17 2024 +0100 clk: qcom: gcc-ipq6018: remove alpha values from NSS Crypto PLL's config Since both the 'alpha' and 'alpha_hi' members of the configuration is initialized with zero values, the output rate of the PLL will be the same whether alpha mode is enabled or not. Remove the initialization of the alpha* members to make it clear that alpha mode is not required to get the desired output rate. Despite that enabling alpha mode is not needed for the initial configuration, the set_rate() op might require that it is enabled already. In this particular case however, the clk_alpha_pll_set_rate() function will get reset the ALPHA_EN bit when the PLL's rate changes, so dropping 'alpha_en_mask' is safe. While at it, also add a comment to indicate the frequency the PLL runs at with the current configuration. No functional changes, the PLL runs at 1.2 GHz both before and after the change. Tested on Xiaomi Mi Router AX1800 (IPQ6018, out-of-tree board). Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com> Link: https://lore.kernel.org/r/20241028-alpha-mode-cleanup-v2-3-9bc6d712bd76@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/gcc-ipq6018.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 41c5ebfb9b4b42b1479f16a50d96146fa945abce Author: Gabor Juhos <j4g8y7@gmail.com> Date: Mon Oct 28 19:48:16 2024 +0100 clk: qcom: apps-ipq-pll: drop 'alpha_en_mask' from IPQ5332 PLL config Since neither 'alpha' nor 'alpha_hi' is defined in the configuration, those will be initialized with zero values implicitly. By using zero alpha values, the output rate of the PLL will be the same whether alpha mode is enabled or not. Remove the superfluous initialization of the 'alpha_en_mask' member to make it clear that enabling alpha mode is not required to get the desired output rate. Despite that enabling alpha mode is not needed for the initial configuration, the set_rate() op might require that it is enabled already. In this particular case however, the clk_alpha_pll_stromer_plus_set_rate() function will get reset the ALPHA_EN bit when the PLL's rate changes, so dropping 'alpha_en_mask' is safe. While at it, also add a comment to indicate the frequency the PLL runs at with the current configuration. No functional changes, the initial rate of the PLL is the same both before and after the patch. Tested on Xiaomi Router BE3600 2.5G (IPQ5312, out-of-tree board). Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com> Link: https://lore.kernel.org/r/20241028-alpha-mode-cleanup-v2-2-9bc6d712bd76@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/apss-ipq-pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e632d9c33d8a4f0d8f98e69b56bd2f2145d91c4 Author: Gabor Juhos <j4g8y7@gmail.com> Date: Mon Oct 28 19:48:15 2024 +0100 clk: qcom: apss-ipq-pll: drop 'alpha_en_mask' from IPQ5018 PLL config Since neither 'alpha' nor 'alpha_hi' is defined in the configuration, those will be initialized with zero values implicitly. By using zero alpha values, the output rate of the PLL will be the same whether alpha mode is enabled or not. Remove the superfluous initialization of the 'alpha_en_mask' member to make it clear that enabling alpha mode is not required to get the desired output rate. Despite that enabling alpha mode is not needed for the initial configuration, the set_rate() op might require that it is enabled already. In this particular case however, the clk_alpha_pll_stromer_set_rate() function will get reset the ALPHA_EN bit when the PLL's rate changes, so dropping 'alpha_en_mask' is safe. No functional changes, the initial rate of the PLL is the same both before and after the patch. Tested on TP-Link Archer AX55 v1 (IPQ5018). Signed-off-by: Gabor Juhos <j4g8y7@gmail.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241028-alpha-mode-cleanup-v2-1-9bc6d712bd76@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/apss-ipq-pll.c | 1 - 1 file changed, 1 deletion(-) commit f17a2293d0ed99ed4f5c6886ee6dd847da99a728 Author: Jingyi Wang <quic_jingyw@quicinc.com> Date: Thu Oct 31 15:14:38 2024 +0800 arm64: dts: qcom: qcs8300: Add LLCC support for QCS8300 Add Last Level Cache Controller node on the QCS8300 platform. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com> Link: https://lore.kernel.org/r/20241031-qcs8300_llcc-v3-3-bb56952cb83b@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 09d8a3ef91f69f3d1275d5a615ce13526c183e69 Author: Jingyi Wang <quic_jingyw@quicinc.com> Date: Fri Nov 1 14:44:46 2024 +0800 arm64: dts: qcom: qcs8300: Add PMU support for QCS8300 Add Performance Monitoring Unit(PMU) nodes on the QCS8300 platform. Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241101-qcs8300_pmu-v1-1-3f3d744a3482@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 63c21d61b46197b6295e12dbf29adff29c18ae2c Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Tue Dec 17 15:51:20 2024 +0100 arm64: dts: qcom: sm8650: add interconnect and opp-peak-kBps for GPU Each GPU OPP requires a specific peak DDR bandwidth, let's add those to each OPP and also the related interconnect path. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241217-topic-sm8x50-gpu-bw-vote-v6-7-1adaf97e7310@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8650.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 1ba40079267930643eade4282258562085d4319d Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Tue Dec 17 15:51:19 2024 +0100 arm64: dts: qcom: sm8550: add interconnect and opp-peak-kBps for GPU Each GPU OPP requires a specific peak DDR bandwidth, let's add those to each OPP and also the related interconnect path. Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241217-topic-sm8x50-gpu-bw-vote-v6-6-1adaf97e7310@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8550.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b8993bd786c1681ce0aa65b7a04159bf712c1e21 Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Date: Wed Dec 18 20:12:57 2024 +0800 arm64: dts: qcom: qcs615-ride: Enable secondary USB controller on QCS615 Ride Enable secondary USB controller on QCS615 Ride platform. The secondary USB controller is made "host", as it is a Type-A port. Secondary USB controller of QCS615 Ride has Type-A port exposed for connecting peripheral. The VBUS to the peripheral is provided by TPS2549IRTERQ1 regulator connected to the port. The regulator has an enable pin controlled by PM8150. Model it as fixed regulator and keep it Always-On at boot, since the regulator is GPIO controlled regulator. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Co-developed-by: Song Xue <quic_songxue@quicinc.com> Signed-off-by: Song Xue <quic_songxue@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241218-add_usb_host_mode_for_qcs615-v3-2-d9d29fe39a4b@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615-ride.dts | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 2be96096148f1a8c51e4ac99753b41f4d532b99c Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Date: Wed Dec 18 20:12:56 2024 +0800 arm64: dts: qcom: qcs615: Add support for secondary USB node on QCS615 Add support for secondary USB controller and its high-speed phy on QCS615. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Co-developed-by: Song Xue <quic_songxue@quicinc.com> Signed-off-by: Song Xue <quic_songxue@quicinc.com> Link: https://lore.kernel.org/r/20241218-add_usb_host_mode_for_qcs615-v3-1-d9d29fe39a4b@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615.dtsi | 78 ++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) commit 7fb88e0d4dc1a40a29d49b603faa1484334c60f3 Author: Luca Weiss <luca.weiss@fairphone.com> Date: Fri Dec 20 09:55:01 2024 +0100 arm64: dts: qcom: sm7225-fairphone-fp4: Drop extra qcom,msm-id value The ID 434 is for SM6350 while 459 is for SM7225. Fairphone 4 is only SM7225, so drop the unused 434 entry. Fixes: 4cbea668767d ("arm64: dts: qcom: sm7225: Add device tree for Fairphone 4") Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241220-fp4-msm-id-v1-1-2b75af02032a@fairphone.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4cdb196f182d2fbe336c968228be00d8c3fed05 Author: Luca Weiss <luca.weiss@fairphone.com> Date: Fri Dec 20 10:03:31 2024 +0100 clk: qcom: dispcc-sm6350: Add missing parent_map for a clock If a clk_rcg2 has a parent, it should also have parent_map defined, otherwise we'll get a NULL pointer dereference when calling clk_set_rate like the following: [ 3.388105] Call trace: [ 3.390664] qcom_find_src_index+0x3c/0x70 (P) [ 3.395301] qcom_find_src_index+0x1c/0x70 (L) [ 3.399934] _freq_tbl_determine_rate+0x48/0x100 [ 3.404753] clk_rcg2_determine_rate+0x1c/0x28 [ 3.409387] clk_core_determine_round_nolock+0x58/0xe4 [ 3.421414] clk_core_round_rate_nolock+0x48/0xfc [ 3.432974] clk_core_round_rate_nolock+0xd0/0xfc [ 3.444483] clk_core_set_rate_nolock+0x8c/0x300 [ 3.455886] clk_set_rate+0x38/0x14c Add the parent_map property for the clock where it's missing and also un-inline the parent_data as well to keep the matching parent_map and parent_data together. Fixes: 837519775f1d ("clk: qcom: Add display clock controller driver for SM6350") Cc: stable@vger.kernel.org Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241220-sm6350-parent_map-v1-2-64f3d04cb2eb@fairphone.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/dispcc-sm6350.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 96fe1a7ee477d701cfc98ab9d3c730c35d966861 Author: Luca Weiss <luca.weiss@fairphone.com> Date: Fri Dec 20 10:03:30 2024 +0100 clk: qcom: gcc-sm6350: Add missing parent_map for two clocks If a clk_rcg2 has a parent, it should also have parent_map defined, otherwise we'll get a NULL pointer dereference when calling clk_set_rate like the following: [ 3.388105] Call trace: [ 3.390664] qcom_find_src_index+0x3c/0x70 (P) [ 3.395301] qcom_find_src_index+0x1c/0x70 (L) [ 3.399934] _freq_tbl_determine_rate+0x48/0x100 [ 3.404753] clk_rcg2_determine_rate+0x1c/0x28 [ 3.409387] clk_core_determine_round_nolock+0x58/0xe4 [ 3.421414] clk_core_round_rate_nolock+0x48/0xfc [ 3.432974] clk_core_round_rate_nolock+0xd0/0xfc [ 3.444483] clk_core_set_rate_nolock+0x8c/0x300 [ 3.455886] clk_set_rate+0x38/0x14c Add the parent_map property for two clocks where it's missing and also un-inline the parent_data as well to keep the matching parent_map and parent_data together. Fixes: 131abae905df ("clk: qcom: Add SM6350 GCC driver") Cc: stable@vger.kernel.org Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241220-sm6350-parent_map-v1-1-64f3d04cb2eb@fairphone.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/gcc-sm6350.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 1401ae5c28a259f684ccba7b460884b88f863596 Author: Pengyu Luo <mitltlatltl@gmail.com> Date: Sat Dec 21 00:05:30 2024 +0800 arm64: dts: qcom: sc8280xp: Add Huawei Matebook E Go (sc8280xp) Add an initial devicetree for the Huawei Matebook E Go, which is based on sc8280xp. There are 3 variants, Huawei released first 2 at the same time. Huawei Matebook E Go LTE(sc8180x), codename should be gaokun2. Huawei Matebook E Go(sc8280xp@3.0GHz), codename is gaokun3. Huawei Matebook E Go 2023(sc8280xp@2.69GHz). We add support for the latter two variants. This work started by Tianyu Gao and Xuecong Chen, they made the devicetree based on existing work(i.e. the Lenovo X13s and the Qualcomm CRD), it can boot with framebuffer. Original work: https://github.com/matalama80td3l/matebook-e-go-boot-works/blob/main/dts/sc8280xp-huawei-matebook-e-go.dts Later, I got my device, I continue their work. Supported features: - adsp - bluetooth (connect issue) - charge (with a lower power) - framebuffer - gpu - keyboard (via internal USB) - pcie devices (wifi and nvme, no modem) - speakers and microphones - tablet mode switch - touchscreen - usb - volume key and power key Some key features not supported yet: - battery and charger information report (EC driver required) - built-in display (cannot enable backlight yet) - charging thresholds control (EC driver required) - camera - LID switch detection (EC driver required) - USB Type-C altmode (EC driver required) - USB Type-C PD (EC driver required) I have finished the EC driver, once this series are upstreamed, I will submit a series of patches to enable EC support. Co-developed-by: Tianyu Gao <gty0622@gmail.com> Signed-off-by: Tianyu Gao <gty0622@gmail.com> Co-developed-by: Xuecong Chen <chenxuecong2009@outlook.com> Signed-off-by: Xuecong Chen <chenxuecong2009@outlook.com> Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com> Link: https://lore.kernel.org/r/20241220160530.444864-4-mitltlatltl@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sc8280xp-huawei-gaokun3.dts | 1318 ++++++++++++++++++++ 2 files changed, 1319 insertions(+) commit f99c52954a82601d4d46677e9399e87c8b6c1bb3 Author: Pengyu Luo <mitltlatltl@gmail.com> Date: Sat Dec 21 00:05:28 2024 +0800 dt-bindings: arm: qcom: Document Huawei Matebook E Go (sc8280xp) Add compatible for the SC8280XP-based Huawei Matebook E Go, using its codename, gaokun3, which means it is the 3rd gen gaokun. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com> Link: https://lore.kernel.org/r/20241220160530.444864-2-mitltlatltl@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) commit f900709e38f40440daf0d878b70adfa358ccf115 Author: Pengyu Luo <mitltlatltl@gmail.com> Date: Sat Dec 21 00:05:29 2024 +0800 firmware: qcom: scm: Allow QSEECOM on Huawei Matebook E Go (sc8280xp) Add the SC8280XP-based Huawei Matebook E Go (sc8280xp) to the allowlist. Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com> Link: https://lore.kernel.org/r/20241220160530.444864-3-mitltlatltl@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/firmware/qcom/qcom_scm.c | 1 + 1 file changed, 1 insertion(+) commit 26633b5820569a5e7bb29d713e978107f4a2bd94 Author: Barnabás Czémán <barnabas.czeman@mainlining.org> Date: Sat Dec 21 00:40:51 2024 +0100 arm64: dts: qcom: Add Xiaomi Redmi 5A Add initial support for Xiaomi Redmi 5A (riva). Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> Link: https://lore.kernel.org/r/20241221-msm8917-v11-4-901a74db4805@mainlining.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts | 333 +++++++++++++++++++++++ 2 files changed, 334 insertions(+) commit 88efce82a55d61df76e2fc4bdc68459c0b3b7581 Author: Barnabás Czémán <barnabas.czeman@mainlining.org> Date: Sat Dec 21 00:40:50 2024 +0100 dt-bindings: arm: qcom: Add Xiaomi Redmi 5A Document Xiaomi Remi 5A (riva). Add qcom,msm8917 for msm-id, board-id allow-list. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> Link: https://lore.kernel.org/r/20241221-msm8917-v11-3-901a74db4805@mainlining.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/arm/qcom.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 7f18b1ea7987ff232bc53a830d0aa81ea31d762f Author: Otto Pflüger <otto.pflueger@abscue.de> Date: Sat Dec 21 00:40:49 2024 +0100 arm64: dts: qcom: Add initial support for MSM8917 Add initial support for MSM8917 SoC. Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de> [reword commit, rebase, fix schema errors] Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> Link: https://lore.kernel.org/r/20241221-msm8917-v11-2-901a74db4805@mainlining.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/msm8917.dtsi | 1954 +++++++++++++++++++++++++++++++++ 1 file changed, 1954 insertions(+) commit 89f6e0251d3a84aef8380f03009ac1bf182ec206 Author: Dang Huynh <danct12@riseup.net> Date: Sat Dec 21 00:40:48 2024 +0100 arm64: dts: qcom: Add PM8937 PMIC The PM8937 features integrated peripherals like ADC, GPIO controller, MPPs, PON keys and others. Add the device tree so that any boards with this PMIC can use it. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Dang Huynh <danct12@riseup.net> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> Link: https://lore.kernel.org/r/20241221-msm8917-v11-1-901a74db4805@mainlining.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/pm8937.dtsi | 150 +++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) commit 4861ba7cf5a49969dee258dda2bf8d4e819135d1 Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Tue Dec 10 10:07:39 2024 +0100 arm64: dts: qcom: x1e80100-qcp: Fix USB QMP PHY supplies On the X1E80100 QCP, &vreg_l3e_1p2 only powers &usb_mp_qmpphy0/1 (i.e. USBSS_3 and USBSS_4). The QMP PHYs for USB_0, USB_1 and USB_2 are actually powered by &vreg_l2j_1p2. Cc: stable@vger.kernel.org Fixes: 20676f7819d7 ("arm64: dts: qcom: x1e80100-qcp: Fix USB PHYs regulators") Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241210-x1e80100-usb-qmp-supply-fix-v1-8-0adda5d30bbd@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c0562f51b177d49829a378b5aeda73f78c60d0fc Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Tue Dec 10 10:07:38 2024 +0100 arm64: dts: qcom: x1e80100-microsoft-romulus: Fix USB QMP PHY supplies On the X1E80100 CRD, &vreg_l3e_1p2 only powers &usb_mp_qmpphy0/1 (i.e. USBSS_3 and USBSS_4). The QMP PHYs for USB_0, USB_1 and USB_2 are actually powered by &vreg_l2j_1p2. Since x1e80100-microsoft-romulus mostly just mirrors the power supplies from the x1e80100-crd device tree, assume that the fix also applies here. Cc: stable@vger.kernel.org Fixes: 09d77be56093 ("arm64: dts: qcom: Add support for X1-based Surface Laptop 7 devices") Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241210-x1e80100-usb-qmp-supply-fix-v1-7-0adda5d30bbd@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6ba8e1b8242d27dd83ed4ce58a104c709e72f45f Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Tue Dec 10 10:07:37 2024 +0100 arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Fix USB QMP PHY supplies On the X1E80100 CRD, &vreg_l3e_1p2 only powers &usb_mp_qmpphy0/1 (i.e. USBSS_3 and USBSS_4). The QMP PHYs for USB_0, USB_1 and USB_2 are actually powered by &vreg_l2j_1p2. Since x1e80100-lenovo-yoga-slim7x mostly just mirrors the power supplies from the x1e80100-crd device tree, assume that the fix also applies here. Cc: stable@vger.kernel.org Fixes: 45247fe17db2 ("arm64: dts: qcom: x1e80100: add Lenovo Thinkpad Yoga slim 7x devicetree") Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241210-x1e80100-usb-qmp-supply-fix-v1-6-0adda5d30bbd@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 26a1b22aaf0c6f5128f8d0242caf3d983d5a2836 Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Tue Dec 10 10:07:36 2024 +0100 arm64: dts: qcom: x1e80100-dell-xps13-9345: Fix USB QMP PHY supplies On the X1E80100 CRD, &vreg_l3e_1p2 only powers &usb_mp_qmpphy0/1 (i.e. USBSS_3 and USBSS_4). The QMP PHYs for USB_0, USB_1 and USB_2 are actually powered by &vreg_l2j_1p2. Since x1e80100-dell-xps13-9345 mostly just mirrors the power supplies from the x1e80100-crd device tree, assume that the fix also applies here. Cc: stable@vger.kernel.org Fixes: f5b788d0e8cd ("arm64: dts: qcom: Add support for X1-based Dell XPS 13 9345") Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Tested-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241210-x1e80100-usb-qmp-supply-fix-v1-5-0adda5d30bbd@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 789209dd08124da448bfa7524b21049a04d98f83 Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Tue Dec 10 10:07:35 2024 +0100 arm64: dts: qcom: x1e80100-crd: Fix USB QMP PHY supplies On the X1E80100 CRD, &vreg_l3e_1p2 only powers &usb_mp_qmpphy0/1 (i.e. USBSS_3 and USBSS_4). The QMP PHYs for USB_0, USB_1 and USB_2 are actually powered by &vreg_l2j_1p2. Cc: stable@vger.kernel.org Fixes: ae5cee8e7349 ("arm64: dts: qcom: x1e80100-crd: Fix USB PHYs regulators") Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241210-x1e80100-usb-qmp-supply-fix-v1-4-0adda5d30bbd@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bf5e9aa844ca74e9c202d8de2ce7390d24ec38a4 Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Tue Dec 10 10:07:34 2024 +0100 arm64: dts: qcom: x1e80100-asus-vivobook-s15: Fix USB QMP PHY supplies On the X1E80100 CRD, &vreg_l3e_1p2 only powers &usb_mp_qmpphy0/1 (i.e. USBSS_3 and USBSS_4). The QMP PHYs for USB_0, USB_1 and USB_2 are actually powered by &vreg_l2j_1p2. Since x1e80100-asus-vivobook-s15 mostly just mirrors the power supplies from the x1e80100-crd device tree, assume that the fix also applies here. Cc: stable@vger.kernel.org Fixes: d0e2f8f62dff ("arm64: dts: qcom: Add device tree for ASUS Vivobook S 15") Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Tested-by: Maud Spierings <maud_spierings@hotmail.com> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241210-x1e80100-usb-qmp-supply-fix-v1-3-0adda5d30bbd@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6efc01b75f819a2988aa9392f93a4d6501871525 Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Tue Dec 10 10:07:33 2024 +0100 arm64: dts: qcom: x1e78100-lenovo-thinkpad-t14s: Fix USB QMP PHY supplies On the X1E80100 CRD, &vreg_l3e_1p2 only powers &usb_mp_qmpphy0/1 (i.e. USBSS_3 and USBSS_4). The QMP PHYs for USB_0, USB_1 and USB_2 are actually powered by &vreg_l2j_1p2. Since x1e78100-lenovo-thinkpad-t14s mostly just mirrors the power supplies from the x1e80100-crd device tree, assume that the fix also applies here. Cc: stable@vger.kernel.org Fixes: 7d1cbe2f4985 ("arm64: dts: qcom: Add X1E78100 ThinkPad T14s Gen 6") Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241210-x1e80100-usb-qmp-supply-fix-v1-2-0adda5d30bbd@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21aceb8153dfb5560655e01192304db670959c88 Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Tue Dec 10 10:07:32 2024 +0100 arm64: dts: qcom: x1e001de-devkit: Fix USB QMP PHY supplies On the X1E80100 CRD, &vreg_l3e_1p2 only powers &usb_mp_qmpphy0/1 (i.e. USBSS_3 and USBSS_4). The QMP PHYs for USB_0, USB_1 and USB_2 are actually powered by &vreg_l2j_1p2. Since x1e001de-devkit mostly just mirrors the power supplies from the x1e80100-crd device tree, assume that the fix also applies here. Cc: stable@vger.kernel.org Fixes: 7b8a31e82b87 ("arm64: dts: qcom: Add X1E001DE Snapdragon Devkit for Windows") Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241210-x1e80100-usb-qmp-supply-fix-v1-1-0adda5d30bbd@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e001de-devkit.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 235aff9707ba2fa0761ebe6d1b886fcd39869583 Author: Maud Spierings <maud_spierings@hotmail.com> Date: Wed Dec 4 13:26:38 2024 +0100 arm64: dts: qcom: x1e80100-vivobook-s15: Add lid switch Add the lid switch for the Asus vivobook s15 Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Maud Spierings <maud_spierings@hotmail.com> Link: https://lore.kernel.org/r/20241204-asus_qcom_display-v6-2-91079cd8234e@hotmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../boot/dts/qcom/x1e80100-asus-vivobook-s15.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 9861aefc51102c8f4b419b57af451b63af0dd79c Author: Maud Spierings <maud_spierings@hotmail.com> Date: Wed Dec 4 13:26:37 2024 +0100 arm64: dts: qcom: x1e80100-vivobook-s15: Use the samsung,atna33xc20 panel driver The Asus vivobook s15 uses the ATNA56AC03 panel. This panel is controlled by the atna33xc20 driver instead of the generic edp-panel driver Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Maud Spierings <maud_spierings@hotmail.com> Link: https://lore.kernel.org/r/20241204-asus_qcom_display-v6-1-91079cd8234e@hotmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../boot/dts/qcom/x1e80100-asus-vivobook-s15.dts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 89aa5925d201b90a48416784831916ca203658f9 Author: Anastasia Belova <abelova@astralinux.ru> Date: Tue Dec 3 11:42:31 2024 +0300 clk: qcom: clk-rpmh: prevent integer overflow in recalc_rate aggr_state and unit fields are u32. The result of their multiplication may not fit in this type. Add explicit casting to prevent overflow. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 04053f4d23a4 ("clk: qcom: clk-rpmh: Add IPA clock support") Cc: stable@vger.kernel.org # 5.4+ Signed-off-by: Anastasia Belova <abelova@astralinux.ru> Link: https://lore.kernel.org/r/20241203084231.6001-1-abelova@astralinux.ru Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-rpmh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16a7fed117140b2f604250f5a116d10638c4417e Author: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Date: Mon Dec 2 20:59:47 2024 +0100 arm64: dts: qcom: sc8280xp-blackrock: dt definition for WDK2023 Device tree for the Microsoft Windows Dev Kit 2023. This work is based on the initial work of Merck Hung <merckhung@gmail.com>. Original work: https://github.com/merckhung/linux_ms_dev_kit/blob/ms-dev-kit-2023-v6.3.0/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-dev-kit-2023.dts The Windows Dev Kit 2023 is a nice little desktop based on sc8280xp. Link: https://learn.microsoft.com/en-us/windows/arm/dev-kit/ Supported features: - USB type-c and type-a ports - minidp connector - built-in r8152 Ethernet adapter - PCIe devices - nvme - ath11k WiFi (WCN6855) - WCN6855 Bluetooth - A690 GPU - ADSP and CDSP - GPIO keys - Audio definition (works via USB) Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241202-jg-blackrock-for-upstream-v9-3-385bb46ca122@oldschoolsolutions.biz Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sc8280xp-microsoft-blackrock.dts | 1325 ++++++++++++++++++++ 2 files changed, 1326 insertions(+) commit 4e65a0642255b75aa5668043f902856cbb79a547 Author: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Date: Mon Dec 2 20:59:45 2024 +0100 dt-bindings: arm: qcom: Add Microsoft Windows Dev Kit 2023 Add compatible values for the Microsoft Windows Dev Kit (WDK2023) with its codename "blackrock". The Dev kit is a small desktop box based on the mainboard of the Surface pro 9 5G, intended for developers to test/build arm64-based Windows software. Link: https://learn.microsoft.com/en-us/windows/arm/dev-kit/ Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Link: https://lore.kernel.org/r/20241202-jg-blackrock-for-upstream-v9-1-385bb46ca122@oldschoolsolutions.biz Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) commit 96ac79829ccd7e86ef87eb2d27736608665f5dfd Author: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Date: Mon Dec 2 20:59:46 2024 +0100 firmware: qcom: scm: Allow QSEECOM for Windows Dev Kit 2023 add "microsoft,blackrock" as compatible device for QSEECOM This is required to get access to efivars and uefi boot loader support. Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Link: https://lore.kernel.org/r/20241202-jg-blackrock-for-upstream-v9-2-385bb46ca122@oldschoolsolutions.biz Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/firmware/qcom/qcom_scm.c | 1 + 1 file changed, 1 insertion(+) commit 6f18b8d4142c3174e08136f0b1ce400441d53330 Author: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Date: Mon Dec 2 20:41:31 2024 +0100 arm64: dts: qcom: x1e80100-hp-x14: dt for HP Omnibook X Laptop 14 Introduce device tree for the HP Omnibook X Laptop 14-fe0750ng (hp-omnibook-x14). It is a Laptop based on the Qualcomm Snapdragon X Elite SoC. There seem to be other SKUs, some with Wifi-7 (WCN7850) instead of Wifi-6E (WCN6855). This dt explicitly supports WCN6855, I haven't found a good way yet to describe both. PDF link: https://www8.hp.com/h20195/V2/GetPDF.aspx/c08989140 Supported features: - Keyboard (no function keys though) - Display - PWM brightness control (works via brightnessctl) - Touchpad - Touchscreen - PCIe ports (pcie4, pcie6a) - USB type-c, type-a - WCN6855 Wifi-6E - WCN6855 Bluetooth - ADSP and CDSP - X1 GPU - GPIO Keys (Lid switch) - Audio definition (works via USB) Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241202-hp-omnibook-x14-v3-3-0fcd96483723@oldschoolsolutions.biz Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/x1e80100-hp-omnibook-x14.dts | 1693 ++++++++++++++++++++ 2 files changed, 1694 insertions(+) commit 6ba121febf852718afa48d0ca062a74fa7cafe1c Author: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Date: Mon Dec 2 20:41:29 2024 +0100 dt-bindings: arm: qcom: Add HP Omnibook X 14 Add compatible values for the HP Omnibook X Laptop 14-fe0750ng, using "hp,omnibook-x14" The laptop is based on the Snapdragon X Elite (x1e80100) SoC. PDF link: https://www8.hp.com/h20195/V2/GetPDF.aspx/c08989140 Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Link: https://lore.kernel.org/r/20241202-hp-omnibook-x14-v3-1-0fcd96483723@oldschoolsolutions.biz Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) commit 85b4b74ba904c9e5825c99dec8c6bef25222abc4 Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Mon Oct 7 20:22:26 2024 +0200 arm64: dts: qcom: x1e80100: Add uart14 Add the uart14 instance for X1E80100 (typically used for Bluetooth). Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Tested-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241007-x1e80100-pwrseq-qcp-v1-2-f7166510ab17@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100.dtsi | 53 ++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit c8327bb53b8728510aee62833d3d7ee44b54de13 Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Mon Oct 7 20:22:25 2024 +0200 arm64: dts: qcom: x1e80100: Add QUP power domains and OPPs Add the power domains and OPP tables to all the QUP-related UART/I2C/SPI nodes to ensure that we vote for the necessary performance states. Similar to sm8350.dtsi, the OPPs depend on the QUP instance. The first two instances in each geniqup group need &rpmhpd_opp_svs starting at 120MHz, the others already starting at 100MHz. I2C always runs at a lower clock frequency and therefore uses a fixed vote. Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Tested-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241007-x1e80100-pwrseq-qcp-v1-1-f7166510ab17@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100.dtsi | 178 +++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) commit 7d467c1b62d0b432df837da24dc023104a184b83 Author: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Date: Mon Dec 2 20:41:30 2024 +0100 firmware: qcom: scm: Allow QSEECOM for HP Omnibook X14 add "hp,omnibook-x14" as compatible device for QSEECOM This is required to get access to efivars and uefi boot loader support. Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Link: https://lore.kernel.org/r/20241202-hp-omnibook-x14-v3-2-0fcd96483723@oldschoolsolutions.biz Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/firmware/qcom/qcom_scm.c | 1 + 1 file changed, 1 insertion(+) commit eb9fc0f32f9b4e8b7984c276c1ed6f61d39ef630 Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Mon Dec 2 10:49:03 2024 +0100 soc: qcom: rmtfs: constify rmtfs_class The rmtfs class object is never modified and can be made constant. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20241202094903.18388-2-brgl@bgdev.pl Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/soc/qcom/rmtfs_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9020afe40e8752c6db905e895e9002a83255e7b Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Mon Dec 2 10:49:02 2024 +0100 soc: qcom: rmtfs: allow building the module with COMPILE_TEST=y Make it possible to build the module when COMPILE_TEST is enabled for better build coverage. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20241202094903.18388-1-brgl@bgdev.pl Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/soc/qcom/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09cd0cb290d5a86fac28210e0387d507ddcb97b9 Author: Tingguo Cheng <quic_tingguoc@quicinc.com> Date: Mon Dec 2 17:37:24 2024 +0800 arm64: dts: qcom: qcs615-ride: Enable PMIC peripherals Enable PMIC and PMIC peripherals for qcs615-ride board. Signed-off-by: Tingguo Cheng <quic_tingguoc@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241202-adds-spmi-pmic-peripherals-for-qcs615-v6-3-bdd306b4940d@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615-ride.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 87ca44ab7f1c02cf56f04f808c3d382acfec0ec0 Author: Tingguo Cheng <quic_tingguoc@quicinc.com> Date: Mon Dec 2 17:37:23 2024 +0800 arm64: dts: qcom: move pon reboot-modes from pm8150.dtsi to board files Reboot modes were originally managed by PMIC pon driver on mobile/IoT platforms, such as sm8150,sm8250,qdu1000... But recently, QCS615 is going to adopt PSCI to manage linux reboot modes, which involves firm wares to co-work with. In this case, reboot-modes should be removed from pon dts node to avoid conflicting. This implies that reboot modes go with devices rather than PMICs as well. Signed-off-by: Tingguo Cheng <quic_tingguoc@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241202-adds-spmi-pmic-peripherals-for-qcs615-v6-2-bdd306b4940d@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/pm8150.dtsi | 2 -- arch/arm64/boot/dts/qcom/qdu1000-idp.dts | 5 +++++ arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 5 +++++ arch/arm64/boot/dts/qcom/qru1000-idp.dts | 5 +++++ arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 5 +++++ arch/arm64/boot/dts/qcom/sm8150-microsoft-surface-duo.dts | 5 +++++ arch/arm64/boot/dts/qcom/sm8150-mtp.dts | 5 +++++ arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano.dtsi | 5 +++++ arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 5 +++++ arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 5 +++++ arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 5 +++++ arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 5 +++++ arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts | 5 +++++ 13 files changed, 60 insertions(+), 2 deletions(-) commit 27554e2bef4d70841c4d20d96c673de51edb353c Author: Tingguo Cheng <quic_tingguoc@quicinc.com> Date: Mon Dec 2 17:37:22 2024 +0800 arm64: dts: qcom: qcs615: Adds SPMI support Add the SPMI bus Arbiter node for the PMIC on QCS615 platforms. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Tingguo Cheng <quic_tingguoc@quicinc.com> Link: https://lore.kernel.org/r/20241202-adds-spmi-pmic-peripherals-for-qcs615-v6-1-bdd306b4940d@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 9f53c3611960a97d2b71825477e96fd8c2fbb050 Author: Abel Vesa <abel.vesa@linaro.org> Date: Mon Dec 2 11:23:18 2024 +0200 arm64: dts: qcom: x1e78100-qcp: Enable Type-A USB ports labeled 3 and 4/6 The X Elite QCP board has 3 USB-A ports. The ones labed as USB3 and USB4/6 are both connected to the 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 these two redrivers and enable each pair of PHYs along with the USB controller, all in order to enable support for these 2 USB-A ports. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Link: https://lore.kernel.org/r/20241202-x1e80100-qcp-t14-enable-usb-type-a-ports-v2-2-7360ed65c769@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 86 +++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) commit ffbf3a8be76613d83c41de40312235cb7cb2cbe4 Author: Abel Vesa <abel.vesa@linaro.org> Date: Mon Dec 2 11:23:17 2024 +0200 arm64: dts: qcom: x1e78100-t14s: Enable support for both Type-A USB ports The Thinkpad T14s 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. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Link: https://lore.kernel.org/r/20241202-x1e80100-qcp-t14-enable-usb-type-a-ports-v2-1-7360ed65c769@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) commit c910544d2234709660d60f80345c285616e73b1c Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Fri Nov 29 23:12:48 2024 +0100 arm64: dts: qcom: msm8994: Describe USB interrupts Previously the interrupt lanes were not described, fix that. Fixes: d9be0bc95f25 ("arm64: dts: qcom: msm8994: Add USB support") Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Tested-by: Petr Vorel <petr.vorel@gmail.com> Link: https://lore.kernel.org/r/20241129-topic-qcom_usb_dtb_fixup-v1-4-cba24120c058@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/msm8994.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9cb9c9f4e1380da317a056afd26d66a835c5796c Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Fri Nov 29 23:12:47 2024 +0100 arm64: dts: qcom: msm8996: Fix up USB3 interrupts Add the missing interrupt lines and fix qusb2_phy being an impostor of hs_phy_irq. This happens to also fix warnings such as: usb@6af8800: interrupt-names: ['hs_phy_irq', 'ss_phy_irq'] is too short Fixes: 4753492de9df ("arm64: dts: qcom: msm8996: Add usb3 interrupts") Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241129-topic-qcom_usb_dtb_fixup-v1-3-cba24120c058@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/msm8996.dtsi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 09b428453219d470475d0d6447c954bf63b95705 Author: Rob Herring (Arm) <robh@kernel.org> Date: Fri Nov 15 13:33:59 2024 -0600 arm64: dts: ti: Remove unused and undocumented "ti,(rx|tx)-fifo-depth" properties Remove "ti,(rx|tx)-fifo-depth" properties which are both unused in the kernel and undocumented. Most likely they are leftovers from downstream. There are similar properties, but DP83867_PHYCR_FIFO_DEPTH_4_B_NIB represents the default value so adding them is not necessary. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241115193359.3618020-1-robh@kernel.org Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am642-tqma64xxl-mbax4xxl.dts | 6 ------ 1 file changed, 6 deletions(-) commit 25aadf5039fe8920835fb1452db08afa27a0edd9 Author: MD Danish Anwar <danishanwar@ti.com> Date: Wed Nov 13 16:39:55 2024 +0530 arm64: dts: ti: k3-am64-main: Switch ICSSG clock to core clock ICSSG has 7 available clocks per instance. Add all the cloks to ICSSG nodes. ICSSG currently uses ICSSG_ICLK (clk id 20) which operates at 250MHz. Switch ICSSG clock to ICSSG_CORE clock (clk id 0) which operates at 333MHz. ICSSG_CORE clock will help get the most out of ICSSG as more cycles are needed to fully support all ICSSG features. This commit also changes assigned-clock-parents of coreclk-mux to ICSSG_CORE clock from ICSSG_ICLK. Performance update in dual mac mode With ICSSG_CORE Clk @ 333MHz Tx throughput - 934 Mbps Rx throughput - 914 Mbps, With ICSSG_ICLK clk @ 250MHz, Tx throughput - 920 Mbps Rx throughput - 706 Mbps Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Tested-by: Wadim Egorov <w.egorov@phytec.de> Reviewed-by: Roger Quadros <rogerq@kernel.org> Link: https://lore.kernel.org/r/20241113110955.3876045-3-danishanwar@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit f7ed5ae30cf395d92a3e1e3c843fa86ce96167b8 Author: MD Danish Anwar <danishanwar@ti.com> Date: Wed Nov 13 16:39:54 2024 +0530 dt-bindings: soc: ti: pruss: Add clocks for ICSSG The ICSSG module has 7 clocks for each instance. These clocks are ICSSG0_CORE_CLK, ICSSG0_IEP_CLK, ICSSG0_ICLK, ICSSG0_UART_CLK, RGMII_MHZ_250_CLK, RGMII_MHZ_50_CLK and RGMII_MHZ_5_CLK These clocks are described in AM64x TRM Section 6.4.3 Table 6-398. Add these clocks to the dt binding of ICSSG. Link: https://www.ti.com/lit/pdf/spruim2 (AM64x TRM) Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Reviewed-by: Roger Quadros <rogerq@kernel.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241113110955.3876045-2-danishanwar@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 95fee3009461f4a65247db677f445fbd67776019 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Thu Aug 22 18:48:50 2024 +0200 soc: qcom: pmic_glink_altmode: simplify locking with guard() Simplify error handling (less gotos) over locks with guard(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240822164853.231087-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/soc/qcom/pmic_glink_altmode.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit fbf7cfa3ea986e5bf426748aa8afa386df61456f Author: Richard Acayan <mailingradian@gmail.com> Date: Tue Aug 6 17:44:58 2024 -0400 arm64: dts: qcom: sdm670-google-sargo: enable gpu Enable the A615 GPU and GMU for the Pixel 3a. It has zap firmware, so add that in as well. Signed-off-by: Richard Acayan <mailingradian@gmail.com> Link: https://lore.kernel.org/r/20240806214452.16406-11-mailingradian@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit cd89483a1327c0317a655cca1daf9521c7ec7529 Author: Richard Acayan <mailingradian@gmail.com> Date: Tue Aug 6 17:44:57 2024 -0400 arm64: dts: qcom: sdm670: add gpu The Snapdragon 670 has the Adreno A615 GPU. Add it along with its device tree dependencies. Signed-off-by: Richard Acayan <mailingradian@gmail.com> Link: https://lore.kernel.org/r/20240806214452.16406-10-mailingradian@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sdm670.dtsi | 180 +++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) commit 9be2923ff9641d6491b8ea43791382966505435f Author: Ross Burton <ross.burton@arm.com> Date: Fri Dec 13 16:12:58 2024 +0000 arm64: defconfig: remove obsolete CONFIG_SM_DISPCC_8650 This option was removed from the Kconfig in commit 802b83205519 ("clk: qcom: fold dispcc-sm8650 info dispcc-sm8550") but it was not removed from the defconfig. Fixes: 802b83205519 ("clk: qcom: fold dispcc-sm8650 info dispcc-sm8550") Signed-off-by: Ross Burton <ross.burton@arm.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241213-clkmaster-v1-1-dcbf7fad37b1@arm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/configs/defconfig | 1 - 1 file changed, 1 deletion(-) commit 0f43254763b3a1635866d06593858ff86313b9ae Author: Jie Gan <quic_jiegan@quicinc.com> Date: Thu Dec 19 10:42:08 2024 +0800 arm64: dts: qcom: qcs8300: Add coresight nodes Add following coresight components for QCS8300 platform. It includes CTI, dummy sink, dynamic Funnel, Replicator, STM, TPDM, TPDA and TMC ETF. Signed-off-by: Jie Gan <quic_jiegan@quicinc.com> Acked-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241219024208.3462358-1-quic_jiegan@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 1695 +++++++++++++++++++++++++++++++++ 1 file changed, 1695 insertions(+) commit 12805b0f998cb65f5c728bf93876f9603fe58477 Author: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Date: Tue Dec 3 12:12:29 2024 +0100 arm64: dts: qcom: x1e78100-t14s: add sound support Add support for audio on Lenovo T14s laptop, coming with two speakers, audio jack and two digital microphones. This is very early work, not yet complete: 1. 2x speakers: work OK. 2. 2x digital microphones: work OK. 3. Headset (audio jack) recording: does not work. 4. Headphones playback (audio jack): channels are intermixed. [krzysztof: correct DMIC routing and vamacro pinctrl, re-order nodes, add commit msg] Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Co-developed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241203111229.48967-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts | 183 +++++++++++++++++++++ 1 file changed, 183 insertions(+) commit 57039a27658a1e7ca1c60fe7e381092c609e4bc7 Author: Jingyi Wang <quic_jingyw@quicinc.com> Date: Tue Dec 3 17:27:13 2024 +0800 arm64: defconfig: enable clock controller, interconnect and pinctrl for QCS8300 Enable clock controller, interconnect and pinctrl for Qualcomm QCS8300 platform to boot QCS8300 RIDE board to UART console. The serial engine depends on gcc, interconnect and pinctrl. Since the serial console driver is only available as built-in, so these configs needs be built-in for the UART device to probe and register the console. Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com> Link: https://lore.kernel.org/r/20241203-qcs8300_initial_dtsi-v4-2-d7c953484024@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 0a41157c5a988520debb656325722f401163eca3 Author: Andrew Halaney <ahalaney@redhat.com> Date: Wed Nov 13 10:15:17 2024 +0100 arm64: dts: ti: k3-am69-sk: Mark tps659413 regulators as bootph-all In order for the MCU domain to access this PMIC, a regulator needs to be marked appropriately otherwise it is not seen by SPL and therefore not configured. This is necessary if the MCU domain is to program the TPS6594 MCU ESM state machine, which is required to wire up the watchdog in a manner that will reset the board. Signed-off-by: Andrew Halaney <ahalaney@redhat.com> Reviewed-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Udit Kumar <u-kumar1@ti.com> Signed-off-by: Enric Balletbo i Serra <eballetb@redhat.com> Link: https://lore.kernel.org/r/20241113-b4-j784s4-tps6594-bootph-v4-2-102ddaa1bdc6@redhat.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am69-sk.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0cd578054e7107cab921ff0c24f4ac6d14d3661b Author: Andrew Halaney <ahalaney@redhat.com> Date: Wed Nov 13 10:15:16 2024 +0100 arm64: dts: ti: k3-j784s4-evm: Mark tps659413 regulators as bootph-all In order for the MCU domain to access this PMIC, a regulator needs to be marked appropriately otherwise it is not seen by SPL and therefore not configured. This is necessary if the MCU domain is to program the TPS6594 MCU ESM state machine, which is required to wire up the watchdog in a manner that will reset the board. Signed-off-by: Andrew Halaney <ahalaney@redhat.com> Reviewed-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Udit Kumar <u-kumar1@ti.com> Signed-off-by: Enric Balletbo i Serra <eballetb@redhat.com> Link: https://lore.kernel.org/r/20241113-b4-j784s4-tps6594-bootph-v4-1-102ddaa1bdc6@redhat.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-j784s4-j742s2-evm-common.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 527f884d2d94981016e181dcbd4c4b5bf597c0ad Author: Siddharth Vadapalli <s-vadapalli@ti.com> Date: Thu Dec 5 17:31:29 2024 +0530 arm64: dts: ti: k3-am62x-sk-common: Support SoC wakeup using USB1 wakeup After the SoC has entered the Deep Sleep mode, USB1 can be used to wakeup the SoC based on USB events triggered by USB devices. This requires that the pin corresponding to the Type-A connector remains pulled up even after the SoC has entered the Deep Sleep mode. Hence, enable Deep Sleep pullup / pulldown selection for the USB1_DRVVBUS pin and set its Deep Sleep state to PULL_UP. Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Link: https://lore.kernel.org/r/20241205120134.754664-3-s-vadapalli@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 325aa0f6b36eab0fe7d7efdb49b55cf7d664424a Author: Siddharth Vadapalli <s-vadapalli@ti.com> Date: Thu Dec 5 17:31:28 2024 +0530 arm64: dts: ti: k3-pinctrl: Introduce deep sleep macros The behavior of pins in deep sleep mode can be configured by programming the corresponding bits in the respective Pad Configuration register. Add macros to support this. Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Link: https://lore.kernel.org/r/20241205120134.754664-2-s-vadapalli@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-pinctrl.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 94a7666e3eb9f52f0097c0ca6fb093f5f20d4462 Author: Anurag Dutta <a-dutta@ti.com> Date: Mon Nov 4 17:42:41 2024 +0530 arm64: dts: ti: k3-j784s4: Fix clock IDs for MCSPI instances The clock IDs for multiple MCSPI instances across wakeup domain in J784s4 are incorrect when compared with documentation [1]. Fix the clock IDs to their appropriate values. [1] https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j784s4/clocks.html Signed-off-by: Anurag Dutta <a-dutta@ti.com> Link: https://lore.kernel.org/r/20241104121241.102027-1-a-dutta@ti.com Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 80ad23c4032c6b2afe225c866b9496472965b9ed Author: Wadim Egorov <w.egorov@phytec.de> Date: Fri Nov 1 14:14:27 2024 +0100 arm64: dts: ti: am62-phyboard-lyra: Provide a vcc-supply for the I2C EEPROM Add the missing vcc-supply property to the EEPROM node which resolves the following warning: at24 1-0051: supply vcc not found, using dummy regulator Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Link: https://lore.kernel.org/r/20241101131427.3815341-4-w.egorov@phytec.de Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra.dtsi | 1 + 1 file changed, 1 insertion(+) commit 4ffe12ccae4ab20e5dc41dc428f909467ed7cc4d Author: Wadim Egorov <w.egorov@phytec.de> Date: Fri Nov 1 14:14:26 2024 +0100 arm64: dts: ti: k3-am62-phycore-som: Define vcc-supply for I2C EEPROM Specify the regulator for the EEPROM supply voltage and associate it with the EEPROM device. This resolves the following warning: at24 0-0050: supply vcc not found, using dummy regulator Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Link: https://lore.kernel.org/r/20241101131427.3815341-3-w.egorov@phytec.de Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am62-phycore-som.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 2a0418ac48d3083e2b209242237abef84497d19f Author: Wadim Egorov <w.egorov@phytec.de> Date: Fri Nov 1 14:14:25 2024 +0100 arm64: dts: ti: k3-am62x-phyboard-lyra: Add HDMI bridge regulators Specify I/0 voltage & core supply regulators used by the SII902x HDMI bridge and make them known to the bridge. This resolves the following warning: sii902x 1-0039: supply iovcc not found, using dummy regulator sii902x 1-0039: supply cvcc12 not found, using dummy regulator Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Link: https://lore.kernel.org/r/20241101131427.3815341-2-w.egorov@phytec.de Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit a4b422390be3c4147db6d97b016adecb3573635d Author: Wadim Egorov <w.egorov@phytec.de> Date: Fri Nov 1 14:14:24 2024 +0100 arm64: dts: ti: k3-am62x-phyboard-lyra: Set RGB input to 16-bit for HDMI bridge The phyBOARD-Lyra connects only 16 pins to the SII902x HDMI bridge's RGB input. The default 24-bit setting causes incorrect color output. Update to 16-bit to match the hardware configuration. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Link: https://lore.kernel.org/r/20241101131427.3815341-1-w.egorov@phytec.de Signed-off-by: Nishanth Menon <nm@ti.com> arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra.dtsi | 1 + 1 file changed, 1 insertion(+) commit cc47b123159dbad9c8a7e977e977e410de090418 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Mar 10 22:34:38 2023 +0200 arm64: dts: qcom: sm8350-hdk: enable IPA Although the HDK has no radio, the IPA part is still perfectly usable (altough it doesn't register any real networking devices). Enable it to make it possible to test IPA on this platform. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20230310203438.1585701-1-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit 2bc56fdae1ba3fc80ee37a648346abc5f152357d Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:15:14 2024 +0900 ftrace: Add ftrace_get_symaddr to convert fentry_ip to symaddr This introduces ftrace_get_symaddr() which tries to convert fentry_ip passed by ftrace or fgraph callback to symaddr without calling kallsyms API. It returns the symbol address or 0 if it fails to convert it. Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/173519011487.391279.5450806886342723151.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412061423.K79V55Hd-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202412061804.5VRzF14E-lkp@intel.com/ Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> arch/arm64/include/asm/ftrace.h | 2 ++ arch/arm64/kernel/ftrace.c | 63 +++++++++++++++++++++++++++++++++++++++++ arch/x86/include/asm/ftrace.h | 21 ++++++++++++++ include/linux/ftrace.h | 13 +++++++++ 4 files changed, 99 insertions(+) commit 54b6b4a3d499b51c8ad5d3a6c8ad0f40dbc6f1ee Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:15:04 2024 +0900 Documentation: probes: Update fprobe on function-graph tracer Update fprobe documentation for the new fprobe on function-graph tracer. This includes some bahvior changes and pt_regs to ftrace_regs interface change. Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/173519010442.391279.10732749889346824783.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Documentation/trace/fprobe.rst | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) commit 0c2dd44d3f9b1e6959cd201e2192cd55636d7bbb Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:14:54 2024 +0900 selftests/ftrace: Add a test case for repeating register/unregister fprobe This test case repeats define and undefine the fprobe dynamic event to ensure that the fprobe does not cause any issue with such operations. Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/173519009398.391279.4625924605120064761.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> .../test.d/dynevent/add_remove_fprobe_repeat.tc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 91fce23a08f6f8cc827b865d1870b7c39bf10455 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:14:43 2024 +0900 selftests: ftrace: Remove obsolate maxactive syntax check Since the fprobe event does not support maxactive anymore, stop testing the maxactive syntax error checking. Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/173519008333.391279.10184048816208739987.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> .../testing/selftests/ftrace/test.d/dynevent/fprobe_syntax_errors.tc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a2224559cbba1db3a998dd100c60c85a1d078ad6 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:14:32 2024 +0900 tracing/fprobe: Remove nr_maxactive from fprobe Remove depercated fprobe::nr_maxactive. This involves fprobe events to rejects the maxactive number. Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/173519007257.391279.946804046982289337.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> include/linux/fprobe.h | 2 -- kernel/trace/trace_fprobe.c | 43 ++++++------------------------------------- 2 files changed, 6 insertions(+), 39 deletions(-) commit b5fa903b7f7c7ffc07430d1380936f72aaf09068 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:14:17 2024 +0900 fprobe: Add fprobe_header encoding feature Fprobe store its data structure address and size on the fgraph return stack by __fprobe_header. But most 64bit architecture can combine those to one unsigned long value because 4 MSB in the kernel address are the same. With this encoding, fprobe can consume less space on ret_stack. This introduces asm/fprobe.h to define arch dependent encode/decode macros. Note that since fprobe depends on CONFIG_HAVE_FUNCTION_GRAPH_FREGS, currently only arm64, loongarch, riscv, s390 and x86 are supported. Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Acked-by: Heiko Carstens <hca@linux.ibm.com> # s390 Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Will Deacon <will@kernel.org> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: WANG Xuerui <kernel@xen0n.name> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: Alexander Gordeev <agordeev@linux.ibm.com> Cc: Christian Borntraeger <borntraeger@linux.ibm.com> Cc: Sven Schnelle <svens@linux.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: x86@kernel.org Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/173519005783.391279.5307910947400277525.stgit@devnote2 Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> arch/arm64/include/asm/Kbuild | 1 + arch/loongarch/include/asm/fprobe.h | 12 ++++++++++ arch/riscv/include/asm/Kbuild | 1 + arch/s390/include/asm/fprobe.h | 10 ++++++++ arch/x86/include/asm/Kbuild | 1 + include/asm-generic/fprobe.h | 46 +++++++++++++++++++++++++++++++++++++ kernel/trace/fprobe.c | 29 +++++++++++++++++++++++ 7 files changed, 100 insertions(+) commit 4346ba1604093305a287e08eb465a9c15ba05b80 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:13:59 2024 +0900 fprobe: Rewrite fprobe on function-graph tracer Rewrite fprobe implementation on function-graph tracer. Major API changes are: - 'nr_maxactive' field is deprecated. - This depends on CONFIG_DYNAMIC_FTRACE_WITH_ARGS or !CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS, and CONFIG_HAVE_FUNCTION_GRAPH_FREGS. So currently works only on x86_64. - Currently the entry size is limited in 15 * sizeof(long). - If there is too many fprobe exit handler set on the same function, it will fail to probe. Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Acked-by: Heiko Carstens <hca@linux.ibm.com> # s390 Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: WANG Xuerui <kernel@xen0n.name> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Naveen N Rao <naveen@kernel.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: Alexander Gordeev <agordeev@linux.ibm.com> Cc: Christian Borntraeger <borntraeger@linux.ibm.com> Cc: Sven Schnelle <svens@linux.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: x86@kernel.org Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Link: https://lore.kernel.org/173519003970.391279.14406792285453830996.stgit@devnote2 Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> arch/arm64/include/asm/ftrace.h | 6 + arch/loongarch/include/asm/ftrace.h | 6 + arch/powerpc/include/asm/ftrace.h | 6 + arch/riscv/include/asm/ftrace.h | 5 + arch/s390/include/asm/ftrace.h | 6 + arch/x86/include/asm/ftrace.h | 6 + include/linux/fprobe.h | 58 +++- kernel/trace/Kconfig | 8 +- kernel/trace/fprobe.c | 637 ++++++++++++++++++++++++++---------- lib/test_fprobe.c | 45 --- 10 files changed, 538 insertions(+), 245 deletions(-) commit 7495e179b478801433cec3cc4a82d2dcea35bf06 Author: Sven Schnelle <svens@linux.ibm.com> Date: Thu Dec 26 14:13:48 2024 +0900 s390/tracing: Enable HAVE_FTRACE_GRAPH_FUNC Add ftrace_graph_func() which is required for fprobe to access registers. This also eliminates the need for calling prepare_ftrace_return() from ftrace_caller(). Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/173519002875.391279.7060964632119674159.stgit@devnote2 Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> arch/s390/Kconfig | 1 + arch/s390/include/asm/ftrace.h | 5 +++++ arch/s390/kernel/entry.h | 1 - arch/s390/kernel/ftrace.c | 48 ++++++++++++------------------------------ arch/s390/kernel/mcount.S | 11 ---------- 5 files changed, 20 insertions(+), 46 deletions(-) commit a762e9267dca843ced943ec24f20e110ba7c8431 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:13:34 2024 +0900 ftrace: Add CONFIG_HAVE_FTRACE_GRAPH_FUNC Add CONFIG_HAVE_FTRACE_GRAPH_FUNC kconfig in addition to ftrace_graph_func macro check. This is for the other feature (e.g. FPROBE) which requires to access ftrace_regs from fgraph_ops::entryfunc() can avoid compiling if the fgraph can not pass the valid ftrace_regs. Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: WANG Xuerui <kernel@xen0n.name> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Naveen N Rao <naveen@kernel.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: x86@kernel.org Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/173519001472.391279.1174901685282588467.stgit@devnote2 Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> arch/arm64/Kconfig | 1 + arch/loongarch/Kconfig | 1 + arch/powerpc/Kconfig | 1 + arch/riscv/Kconfig | 1 + arch/x86/Kconfig | 1 + kernel/trace/Kconfig | 5 +++++ 6 files changed, 10 insertions(+) commit 8e2759da9378120a53078077a44b5a4f6dc95018 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:13:24 2024 +0900 bpf: Enable kprobe_multi feature if CONFIG_FPROBE is enabled Enable kprobe_multi feature if CONFIG_FPROBE is enabled. The pt_regs is converted from ftrace_regs by ftrace_partial_regs(), thus some registers may always returns 0. But it should be enough for function entry (access arguments) and exit (access return value). Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/173519000417.391279.14011193569589886419.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Acked-by: Florent Revest <revest@chromium.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/bpf_trace.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 0566cefe73b9a6ea38357b428d27460db032a03d Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:13:13 2024 +0900 tracing/fprobe: Enable fprobe events with CONFIG_DYNAMIC_FTRACE_WITH_ARGS Allow fprobe events to be enabled with CONFIG_DYNAMIC_FTRACE_WITH_ARGS. With this change, fprobe events mostly use ftrace_regs instead of pt_regs. Note that if the arch doesn't enable HAVE_FTRACE_REGS_HAVING_PT_REGS, fprobe events will not be able to be used from perf. Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/173518999352.391279.13332699755290175168.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> include/linux/ftrace.h | 17 +++++++ kernel/trace/Kconfig | 1 - kernel/trace/trace_fprobe.c | 108 +++++++++++++++++++++++++--------------- kernel/trace/trace_probe_tmpl.h | 2 +- 4 files changed, 86 insertions(+), 42 deletions(-) commit d5d01b71996ec03af51b3c0736c92d0fc89703b5 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:12:59 2024 +0900 tracing: Add ftrace_fill_perf_regs() for perf event Add ftrace_fill_perf_regs() which should be compatible with the perf_fetch_caller_regs(). In other words, the pt_regs returned from the ftrace_fill_perf_regs() must satisfy 'user_mode(regs) == false' and can be used for stack tracing. Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Acked-by: Will Deacon <will@kernel.org> Acked-by: Heiko Carstens <hca@linux.ibm.com> # s390 Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Naveen N Rao <naveen@kernel.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: Alexander Gordeev <agordeev@linux.ibm.com> Cc: Christian Borntraeger <borntraeger@linux.ibm.com> Cc: Sven Schnelle <svens@linux.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: x86@kernel.org Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/173518997908.391279.15910334347345106424.stgit@devnote2 Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> arch/arm64/include/asm/ftrace.h | 7 +++++++ arch/powerpc/include/asm/ftrace.h | 7 +++++++ arch/s390/include/asm/ftrace.h | 6 ++++++ arch/x86/include/asm/ftrace.h | 7 +++++++ include/linux/ftrace.h | 31 +++++++++++++++++++++++++++++++ 5 files changed, 58 insertions(+) commit b9b55c8912ce1e5555715d126486bdd63ddfeaec Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:12:47 2024 +0900 tracing: Add ftrace_partial_regs() for converting ftrace_regs to pt_regs Add ftrace_partial_regs() which converts the ftrace_regs to pt_regs. This is for the eBPF which needs this to keep the same pt_regs interface to access registers. Thus when replacing the pt_regs with ftrace_regs in fprobes (which is used by kprobe_multi eBPF event), this will be used. If the architecture defines its own ftrace_regs, this copies partial registers to pt_regs and returns it. If not, ftrace_regs is the same as pt_regs and ftrace_partial_regs() will return ftrace_regs::regs. Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Acked-by: Florent Revest <revest@chromium.org> Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Link: https://lore.kernel.org/173518996761.391279.4987911298206448122.stgit@devnote2 Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> arch/arm64/include/asm/ftrace.h | 13 +++++++++++++ arch/riscv/include/asm/ftrace.h | 14 ++++++++++++++ include/linux/ftrace.h | 17 +++++++++++++++++ 3 files changed, 44 insertions(+) commit 762abbc0d09f7ae123c82d315eb1a961c1a2cf7b Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:12:31 2024 +0900 fprobe: Use ftrace_regs in fprobe exit handler Change the fprobe exit handler to use ftrace_regs structure instead of pt_regs. This also introduce HAVE_FTRACE_REGS_HAVING_PT_REGS which means the ftrace_regs is including the pt_regs so that ftrace_regs can provide pt_regs without memory allocation. Fprobe introduces a new dependency with that. Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Acked-by: Heiko Carstens <hca@linux.ibm.com> # s390 Cc: Huacai Chen <chenhuacai@kernel.org> Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: bpf <bpf@vger.kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: WANG Xuerui <kernel@xen0n.name> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: Alexander Gordeev <agordeev@linux.ibm.com> Cc: Christian Borntraeger <borntraeger@linux.ibm.com> Cc: Sven Schnelle <svens@linux.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: x86@kernel.org Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Song Liu <song@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: KP Singh <kpsingh@kernel.org> Cc: Matt Bobrowski <mattbobrowski@google.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: Eduard Zingerman <eddyz87@gmail.com> Cc: Yonghong Song <yonghong.song@linux.dev> Cc: John Fastabend <john.fastabend@gmail.com> Cc: Stanislav Fomichev <sdf@fomichev.me> Cc: Hao Luo <haoluo@google.com> Cc: Andrew Morton <akpm@linux-foundation.org> Link: https://lore.kernel.org/173518995092.391279.6765116450352977627.stgit@devnote2 Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> arch/loongarch/Kconfig | 1 + arch/s390/Kconfig | 1 + arch/x86/Kconfig | 1 + include/linux/fprobe.h | 2 +- include/linux/ftrace.h | 6 ++++++ kernel/trace/Kconfig | 7 +++++++ kernel/trace/bpf_trace.c | 6 +++++- kernel/trace/fprobe.c | 3 ++- kernel/trace/trace_fprobe.c | 6 +++++- lib/test_fprobe.c | 6 +++--- samples/fprobe/fprobe_example.c | 2 +- 11 files changed, 33 insertions(+), 8 deletions(-) commit 46bc082388560a95e3649b698a4675e5ea3262e6 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:12:20 2024 +0900 fprobe: Use ftrace_regs in fprobe entry handler This allows fprobes to be available with CONFIG_DYNAMIC_FTRACE_WITH_ARGS instead of CONFIG_DYNAMIC_FTRACE_WITH_REGS, then we can enable fprobe on arm64. Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/173518994037.391279.2786805566359674586.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Acked-by: Florent Revest <revest@chromium.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> include/linux/fprobe.h | 2 +- kernel/trace/Kconfig | 3 ++- kernel/trace/bpf_trace.c | 10 +++++++--- kernel/trace/fprobe.c | 3 ++- kernel/trace/trace_fprobe.c | 11 ++++++++--- lib/test_fprobe.c | 4 ++-- samples/fprobe/fprobe_example.c | 2 +- 7 files changed, 23 insertions(+), 12 deletions(-) commit 2ca8c112c9676e2394d76760db78ffddf21d93b5 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:12:09 2024 +0900 fgraph: Pass ftrace_regs to retfunc Pass ftrace_regs to the fgraph_ops::retfunc(). If ftrace_regs is not available, it passes a NULL instead. User callback function can access some registers (including return address) via this ftrace_regs. Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/173518992972.391279.14055405490327765506.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> include/linux/ftrace.h | 3 ++- kernel/trace/fgraph.c | 16 +++++++++++----- kernel/trace/ftrace.c | 3 ++- kernel/trace/trace.h | 3 ++- kernel/trace/trace_functions_graph.c | 7 ++++--- kernel/trace/trace_irqsoff.c | 3 ++- kernel/trace/trace_sched_wakeup.c | 3 ++- kernel/trace/trace_selftest.c | 3 ++- 8 files changed, 27 insertions(+), 14 deletions(-) commit a3ed4157b7d89800a0008de0c9e46a438a5c3745 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:11:55 2024 +0900 fgraph: Replace fgraph_ret_regs with ftrace_regs Use ftrace_regs instead of fgraph_ret_regs for tracing return value on function_graph tracer because of simplifying the callback interface. The CONFIG_HAVE_FUNCTION_GRAPH_RETVAL is also replaced by CONFIG_HAVE_FUNCTION_GRAPH_FREGS. Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Acked-by: Heiko Carstens <hca@linux.ibm.com> Acked-by: Will Deacon <will@kernel.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: WANG Xuerui <kernel@xen0n.name> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: Alexander Gordeev <agordeev@linux.ibm.com> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Christian Borntraeger <borntraeger@linux.ibm.com> Cc: Sven Schnelle <svens@linux.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: x86@kernel.org Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/173518991508.391279.16635322774382197642.stgit@devnote2 Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> arch/arm64/Kconfig | 1 + arch/arm64/include/asm/ftrace.h | 23 ++++++----------------- arch/arm64/kernel/asm-offsets.c | 12 ------------ arch/arm64/kernel/entry-ftrace.S | 32 ++++++++++++++++++-------------- arch/loongarch/Kconfig | 2 +- arch/loongarch/include/asm/ftrace.h | 26 ++++---------------------- arch/loongarch/kernel/asm-offsets.c | 12 ------------ arch/loongarch/kernel/mcount.S | 17 ++++++++++------- arch/loongarch/kernel/mcount_dyn.S | 14 +++++++------- arch/riscv/Kconfig | 2 +- arch/riscv/include/asm/ftrace.h | 26 +++++--------------------- arch/riscv/kernel/mcount.S | 24 +++++++++++++----------- arch/s390/Kconfig | 2 +- arch/s390/include/asm/ftrace.h | 24 +++++++----------------- arch/s390/kernel/asm-offsets.c | 6 ------ arch/s390/kernel/mcount.S | 12 ++++++------ arch/x86/Kconfig | 2 +- arch/x86/include/asm/ftrace.h | 20 -------------------- arch/x86/kernel/ftrace_32.S | 13 +++++++------ arch/x86/kernel/ftrace_64.S | 17 +++++++++-------- include/linux/ftrace.h | 12 +++++++++--- include/linux/ftrace_regs.h | 2 ++ kernel/trace/Kconfig | 4 ++-- kernel/trace/fgraph.c | 21 +++++++++------------ 24 files changed, 119 insertions(+), 207 deletions(-) commit 41705c4262aaca49b8d9fe9b24fe048dc6c2b301 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Thu Dec 26 14:11:40 2024 +0900 fgraph: Pass ftrace_regs to entryfunc Pass ftrace_regs to the fgraph_ops::entryfunc(). If ftrace_regs is not available, it passes a NULL instead. User callback function can access some registers (including return address) via this ftrace_regs. Note that the ftrace_regs can be NULL when the arch does NOT define: HAVE_DYNAMIC_FTRACE_WITH_ARGS or HAVE_DYNAMIC_FTRACE_WITH_REGS. More specifically, if HAVE_DYNAMIC_FTRACE_WITH_REGS is defined but not the HAVE_DYNAMIC_FTRACE_WITH_ARGS, and the ftrace ops used to register the function callback does not set FTRACE_OPS_FL_SAVE_REGS. In this case, ftrace_regs can be NULL in user callback. Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: WANG Xuerui <kernel@xen0n.name> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Naveen N Rao <naveen@kernel.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: x86@kernel.org Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/173518990044.391279.17406984900626078579.stgit@devnote2 Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> arch/arm64/kernel/ftrace.c | 15 +++++++++++- arch/loongarch/kernel/ftrace_dyn.c | 10 +++++++- arch/powerpc/kernel/trace/ftrace.c | 2 +- arch/powerpc/kernel/trace/ftrace_64_pg.c | 10 +++++--- arch/riscv/kernel/ftrace.c | 17 ++++++++++++- arch/x86/kernel/ftrace.c | 42 +++++++++++++++++++++----------- include/linux/ftrace.h | 17 ++++++++++--- kernel/trace/fgraph.c | 20 +++++++++------ kernel/trace/ftrace.c | 3 ++- kernel/trace/trace.h | 3 ++- kernel/trace/trace_functions_graph.c | 3 ++- kernel/trace/trace_irqsoff.c | 3 ++- kernel/trace/trace_sched_wakeup.c | 3 ++- kernel/trace/trace_selftest.c | 8 +++--- 14 files changed, 114 insertions(+), 42 deletions(-) commit cff6d93eab00bacf8b6bffdef775fc2de0273c96 Author: Alice Ryhl <aliceryhl@google.com> Date: Thu Dec 12 13:12:37 2024 +0000 tracepoint: Reduce duplication of __DO_TRACE_CALL The logic for invoking __DO_TRACE_CALL was extracted to a static inline function called __rust_do_trace_##name so that Rust can call it directly. This logic does not include the static branch, to avoid a function call when the tracepoint is disabled. Since the C code needs to perform the same logic after checking the static key, this logic is currently duplicated. Thus, remove this duplication by having C call the static inline function too. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/20241212131237.1988409-1-aliceryhl@google.com Signed-off-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> include/linux/tracepoint.h | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 9e49ca756d207f4313fb7af48648a67da8e4e250 Author: Steven Rostedt <rostedt@goodmis.org> Date: Fri Dec 20 10:33:13 2024 -0500 tracing/string: Create and use __free(argv_free) in trace_dynevent.c The function dyn_event_release() uses argv_split() which must be freed via argv_free(). It contains several error paths that do a goto out to call argv_free() for cleanup. This makes the code complex and error prone. Create a new __free() directive __free(argv_free) that will call argv_free() for data allocated with argv_split(), and use it in the dyn_event_release() function. Cc: Kees Cook <kees@kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Andy Shevchenko <andy@kernel.org> Cc: linux-hardening@vger.kernel.org Link: https://lore.kernel.org/20241220103313.4a74ec8e@gandalf.local.home Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> include/linux/string.h | 3 +++ kernel/trace/trace_dynevent.c | 23 +++++++---------------- 2 files changed, 10 insertions(+), 16 deletions(-) commit 08b767317192e7a20d6d95ff7eca6d9bbc48c192 Author: Steven Rostedt <rostedt@goodmis.org> Date: Thu Dec 19 15:12:12 2024 -0500 tracing: Switch trace_stat.c code over to use guard() There are a couple functions in trace_stat.c that have "goto out" or equivalent on error in order to release locks that were taken. This can be error prone or just simply make the code more complex. Switch every location that ends with unlocking a mutex on error over to using the guard(mutex)() infrastructure to let the compiler worry about releasing locks. This makes the code easier to read and understand. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/20241219201346.870318466@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_stat.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 6c05353e4ff5875807f1a00f8d95e68b3d1e4d7f Author: Steven Rostedt <rostedt@goodmis.org> Date: Wed Dec 25 17:25:42 2024 -0500 tracing: Switch trace_stack.c code over to use guard() The function stack_trace_sysctl() uses a goto on the error path to jump to the mutex_unlock() code. Replace the logic to use guard() and let the compiler worry about it. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/20241225222931.684913592@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_stack.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 930d2b32c0af6895ba4c6ca6404e7f7b6dc214ed Author: Steven Rostedt <rostedt@goodmis.org> Date: Wed Dec 25 17:25:41 2024 -0500 tracing: Switch trace_osnoise.c code over to use guard() and __free() The osnoise_hotplug_workfn() grabs two mutexes and cpu_read_lock(). It has various gotos to handle unlocking them. Switch them over to guard() and let the compiler worry about it. The osnoise_cpus_read() has a temporary mask_str allocated and there's some gotos to make sure it gets freed on error paths. Switch that over to __free() to let the compiler worry about it. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/20241225222931.517329690@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_osnoise.c | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) commit a2e27e1bb19eb7c1790af7c8b6f7298ec524c1bb Author: Steven Rostedt <rostedt@goodmis.org> Date: Thu Dec 19 15:12:09 2024 -0500 tracing: Switch trace_events_synth.c code over to use guard() There are a couple functions in trace_events_synth.c that have "goto out" or equivalent on error in order to release locks that were taken. This can be error prone or just simply make the code more complex. Switch every location that ends with unlocking a mutex on error over to using the guard(mutex)() infrastructure to let the compiler worry about releasing locks. This makes the code easier to read and understand. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/20241219201346.371082515@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_events_synth.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 076796f74eac6eec2da6168836ff6baa8d878297 Author: Steven Rostedt <rostedt@goodmis.org> Date: Thu Dec 19 15:12:08 2024 -0500 tracing: Switch trace_events_filter.c code over to use guard() There are a couple functions in trace_events_filter.c that have "goto out" or equivalent on error in order to release locks that were taken. This can be error prone or just simply make the code more complex. Switch every location that ends with unlocking a mutex on error over to using the guard(mutex)() infrastructure to let the compiler worry about releasing locks. This makes the code easier to read and understand. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/20241219201346.200737679@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_events_filter.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit 63c72641683891c5087c77e9ae7a8b43433214e7 Author: Steven Rostedt <rostedt@goodmis.org> Date: Fri Dec 20 11:06:21 2024 -0500 tracing: Switch trace_events_trigger.c code over to use guard() There are a few functions in trace_events_trigger.c that have "goto out" or equivalent on error in order to release locks that were taken. This can be error prone or just simply make the code more complex. Switch every location that ends with unlocking a mutex on error over to using the guard(mutex)() infrastructure to let the compiler worry about releasing locks. This makes the code easier to read and understand. Also use __free() for free a temporary buffer in event_trigger_regex_write(). Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/20241220110621.639d3bc8@gandalf.local.home Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_events_trigger.c | 67 +++++++++++++------------------------ 1 file changed, 23 insertions(+), 44 deletions(-) commit 2b36a97aeeb71b1e4a48bfedc7f21f44aeb1e6fb Author: Steven Rostedt <rostedt@goodmis.org> Date: Thu Dec 19 15:12:05 2024 -0500 tracing: Switch trace_events_hist.c code over to use guard() There are a couple functions in trace_events_hist.c that have "goto out" or equivalent on error in order to release locks that were taken. This can be error prone or just simply make the code more complex. Switch every location that ends with unlocking a mutex on error over to using the guard(mutex)() infrastructure to let the compiler worry about releasing locks. This makes the code easier to read and understand. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/20241219201345.694601480@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_events_hist.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) commit 59980d9b0b2dbe8945734162bb3014eac8b885bd Author: Steven Rostedt <rostedt@goodmis.org> Date: Thu Dec 19 15:12:04 2024 -0500 tracing: Switch trace_events.c code over to use guard() There are several functions in trace_events.c that have "goto out;" or equivalent on error in order to release locks that were taken. This can be error prone or just simply make the code more complex. Switch every location that ends with unlocking a mutex on error over to using the guard(mutex)() infrastructure to let the compiler worry about releasing locks. This makes the code easier to read and understand. Some locations did some simple arithmetic after releasing the lock. As this causes no real overhead for holding a mutex while processing the file position (*ppos += cnt;) let the lock be held over this logic too. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/20241219201345.522546095@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_events.c | 103 ++++++++++++++++---------------------------- 1 file changed, 38 insertions(+), 65 deletions(-) commit 4b8d63e5b61dc2ee7958fb36d41c643f56de0d4d Author: Steven Rostedt <rostedt@goodmis.org> Date: Thu Dec 19 15:12:03 2024 -0500 tracing: Simplify event_enable_func() goto_reg logic Currently there's an "out_reg:" label that gets jumped to if there's no parameters to process. Instead, make it a proper "if (param) { }" block as there's not much to do for the parameter processing, and remove the "out_reg:" label. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/20241219201345.354746196@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_events.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit c949dfb97443b0aee0cfe138049a17e66bbc62e9 Author: Steven Rostedt <rostedt@goodmis.org> Date: Thu Dec 19 15:12:02 2024 -0500 tracing: Simplify event_enable_func() goto out_free logic The event_enable_func() function allocates the data descriptor early in the function just to assign its data->count value via: kstrtoul(number, 0, &data->count); This makes the code more complex as there are several error paths before the data descriptor is actually used. This means there needs to be a goto out_free; to clean it up. Use a local variable "count" to do the update and move the data allocation just before it is used. This removes the "out_free" label as the data can be freed on the failure path of where it is used. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/20241219201345.190820140@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_events.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit cad1d5bd2cb9921189749b5d796026c768f56236 Author: Steven Rostedt <rostedt@goodmis.org> Date: Thu Dec 19 15:12:01 2024 -0500 tracing: Have event_enable_write() just return error on error The event_enable_write() function is inconsistent in how it returns errors. Sometimes it updates the ppos parameter and sometimes it doesn't. Simplify the code to just return an error or the count if there isn't an error. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/20241219201345.025284170@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_events.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit d1e27ee9c6f21ccbb3f2d910171427ceb66a0af1 Author: Steven Rostedt <rostedt@goodmis.org> Date: Thu Dec 19 15:12:00 2024 -0500 tracing: Return -EINVAL if a boot tracer tries to enable the mmiotracer at boot The mmiotracer is not set to be enabled at boot up from the kernel command line. If the boot command line tries to enable that tracer, it will fail to be enabled. The return code is currently zero when that happens so the caller just thinks it was enabled. Return -EINVAL in this case. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/20241219201344.854254394@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d33b10c0c73adca00f72bf4a153a07b7f5f34715 Author: Steven Rostedt <rostedt@goodmis.org> Date: Tue Dec 24 22:14:13 2024 -0500 tracing: Switch trace.c code over to use guard() There are several functions in trace.c that have "goto out;" or equivalent on error in order to release locks or free values that were allocated. This can be error prone or just simply make the code more complex. Switch every location that ends with unlocking a mutex or freeing on error over to using the guard(mutex)() and __free() infrastructure to let the compiler worry about releasing locks. This makes the code easier to read and understand. There's one place that should probably return an error but instead return 0. This does not change the return as the only changes are to do the conversion without changing the logic. Fixing that location will have to come later. Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Link: https://lore.kernel.org/20241224221413.7b8c68c3@batman.local.home Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace.c | 266 ++++++++++++++++++--------------------------------- 1 file changed, 94 insertions(+), 172 deletions(-) commit ed60738a9b7ede4a4ae797d90be7fde3e10a36c7 Author: James Clark <james.clark@linaro.org> Date: Tue Nov 12 16:00:45 2024 +0000 perf stat: Document and clarify outstate members Not all of these are "state" so separate them into two sections. Rename and document to make all clearer. Signed-off-by: James Clark <james.clark@linaro.org> Tested-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241112160048.951213-6-james.clark@linaro.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/stat-display.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit dd566687ef33995b54d040765c7400812841db35 Author: James Clark <james.clark@linaro.org> Date: Tue Nov 12 16:00:44 2024 +0000 perf stat: Document and simplify interval timestamps Rename 'prefix' to 'timestamp' because that's all it does, except in iostat mode where it's slightly overloaded, but still includes a timestamp. This reveals a problem with iostat and JSON mode so document this. Make it more explicit that these are printed in interval mode by changing 'if (prefix)' to 'if (interval)' which reveals an unnecessary 'else if (... && !interval)' which can be removed. Signed-off-by: James Clark <james.clark@linaro.org> Tested-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241112160048.951213-5-james.clark@linaro.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/arch/x86/util/iostat.c | 4 ++++ tools/perf/util/stat-display.c | 45 ++++++++++++++++++--------------------- 2 files changed, 25 insertions(+), 24 deletions(-) commit d226f434fb924d1b95999a8775c37d4804a22f57 Author: James Clark <james.clark@linaro.org> Date: Tue Nov 12 16:00:43 2024 +0000 perf stat: Remove empty new_line_metric function Despite the name new_line_metric doesn't make a new line, it actually does nothing. Change it to NULL to avoid confusion. Signed-off-by: James Clark <james.clark@linaro.org> Tested-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241112160048.951213-4-james.clark@linaro.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/stat-display.c | 13 ++++--------- tools/perf/util/stat-shadow.c | 5 +++-- 2 files changed, 7 insertions(+), 11 deletions(-) commit 9f1df75509bc16f63e6b956ea7145b437cdef3e0 Author: James Clark <james.clark@linaro.org> Date: Tue Nov 12 16:00:42 2024 +0000 perf stat: Also hide metric-units from JSON when event didn't run We decided to hide NULL metric-units rather than showing it as "(null)" when a dependent event for a metric doesn't exist. But on hybrid systems if the process doesn't hit a PMU you get an empty string metric unit instead. To make it consistent change all empty strings to NULL. Note that metric-threshold is already hidden in this case without this change. Where a process only runs on cpu_core and never hits cpu_atom: Before: $ perf stat -j -- true ... {"counter-value" : "<not counted>", "unit" : "", "event" : "cpu_atom/branch-misses/", "event-runtime" : 0, "pcnt-running" : 0.00, "metric-value" : "0.000000", "metric-unit" : ""} {"counter-value" : "6326.000000", "unit" : "", "event" : "cpu_core/branch-misses/", "event-runtime" : 293786, "pcnt-running" : 100.00, "metric-value" : "3.553394", "metric-unit" : "of all branches", "metric-threshold" : "good"} ... After: ... {"counter-value" : "<not counted>", "unit" : "", "event" : "cpu_atom/branch-misses/", "event-runtime" : 0, "pcnt-running" : 0.00} {"counter-value" : "5778.000000", "unit" : "", "event" : "cpu_core/branch-misses/", "event-runtime" : 282240, "pcnt-running" : 100.00, "metric-value" : "3.226797", "metric-unit" : "of all branches", "metric-threshold" : "good"} ... Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: James Clark <james.clark@linaro.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Tested-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241112160048.951213-3-james.clark@linaro.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/stat-display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 967364894e61b15819a0c11231512ecd5a46b503 Author: James Clark <james.clark@linaro.org> Date: Tue Nov 12 16:00:41 2024 +0000 perf stat: Fix trailing comma when there is no metric unit Now that printing metric-value and metric-unit is optional, print_running_json() shouldn't add the comma in case it becomes trailing. Replace all manual JSON comma stuff with a json_out() function that uses the existing os->first tracking and auto inserts a comma if it's needed. Update the test to handle that two of the fields can be missing. This fixes the following test failure on Cortex A57 where the branch misses metric is missing a required event: $ perf test -vvv "json output" 106: perf stat JSON output linter: --- start --- test child forked, pid 665682 Checking json output: no args Test failed for input: {"counter-value" : "3112.000000", "unit" : "", "event" : "armv8_pmuv3_1/branch-misses/", "event-runtime" : 20699340, "pcnt-running" : 100.00, } ... json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 12 column 144 (char 2109) ---- end(-1) ---- 106: perf stat JSON output linter : FAILED! Fixes: e1cc918b6cfd1206 ("perf stat: Drop metric-unit if unit is NULL") Signed-off-by: James Clark <james.clark@linaro.org> Tested-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241112160048.951213-2-james.clark@linaro.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> .../perf/tests/shell/lib/perf_json_output_lint.py | 14 +- tools/perf/util/stat-display.c | 177 +++++++++++---------- 2 files changed, 104 insertions(+), 87 deletions(-) commit 00c640595e130eeba973858033db7488dbacd2a3 Author: Howard Chu <howardchu95@gmail.com> Date: Sun Dec 15 11:07:11 2024 -0800 perf docs: Add documentation for --force-btf option The --force-btf option is intended for debugging purposes and is currently undocumented. Add documentation for it. Committer notes: We need a follow up patch expanding on what can be done via BTF and what isn't possible and thus needs further work to convert kernel C source code into tables that can then be associated with syscall integer args and struct members, as discussed in: https://lore.kernel.org/all/20241215190712.787847-3-howardchu95@gmail.com/T/#mcfbba653200775c59c730705229a49b34a153db7 Signed-off-by: Howard Chu <howardchu95@gmail.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/r/20241215190712.787847-3-howardchu95@gmail.com Link: https://lore.kernel.org/all/20241215190712.787847-3-howardchu95@gmail.com/T/#mcfbba653200775c59c730705229a49b34a153db7 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Documentation/perf-trace.txt | 5 +++++ 1 file changed, 5 insertions(+) commit 0255338d69754a021f239605a51e3a72d36294bb Author: Howard Chu <howardchu95@gmail.com> Date: Sun Dec 15 11:07:10 2024 -0800 perf trace: Add tests for BTF general augmentation Currently, we only have 'perf trace' augmentation tests for enum arguments. This patch adds tests for more general syscall arguments, such as struct pointers, strings, and buffers. These tests utilize the 'perf config' system to configure 'the perf trace' output, as suggested by Arnaldo Carvalho de Melo <acme@kernel.org>. Committer testing: root@number:~# perf test "BTF general" 109: perf trace BTF general tests : Ok root@number:~# perf test -v "BTF general" 109: perf trace BTF general tests : Ok root@number:~# perf test -vv "BTF general" 109: perf trace BTF general tests: --- start --- test child forked, pid 1410451 Checking if vmlinux BTF exists Testing perf trace's string augmentation Testing perf trace's buffer augmentation Testing perf trace's struct augmentation ---- end(0) ---- 109: perf trace BTF general tests : Ok root@number:~# It still fails sometimes, for instance when tested with: root@number:~# perf stat --null -r 10 perf test "BTF general" 109: perf trace BTF general tests : Ok 109: perf trace BTF general tests : Ok 109: perf trace BTF general tests : Ok 109: perf trace BTF general tests : Ok 109: perf trace BTF general tests : FAILED! 109: perf trace BTF general tests : Ok 109: perf trace BTF general tests : Ok 109: perf trace BTF general tests : FAILED! 109: perf trace BTF general tests : Ok 109: perf trace BTF general tests : Ok Performance counter stats for 'perf test BTF general' (10 runs): 2.148 +- 0.293 seconds time elapsed ( +- 13.63% ) root@number:~# But we can go on from here and fix things up with followup patches. Suggested-by: Arnaldo Carvalho de Melo <acme@kernel.org> Signed-off-by: Howard Chu <howardchu95@gmail.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/r/20241215190712.787847-2-howardchu95@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/shell/trace_btf_general.sh | 93 +++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit 48806be086360846bb308c5ee21fcab8405a3da7 Author: Peng Fan <peng.fan@nxp.com> Date: Wed Dec 25 08:14:43 2024 +0800 clk: imx: Apply some clks only for i.MX93 Enable the LVDS gate, MIPI DSI, PXP, FLEXIO and MU only for i.MX93, because i.MX91 does not support them. Update enet clk entry format to align with others. Fixes: a27bfff88dd2 ("clk: imx: add i.MX91 clk") Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Abel Vesa <abel.vesa@linaro.org> Link: https://lore.kernel.org/r/20241225001443.883131-1-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa <abel.vesa@linaro.org> drivers/clk/imx/clk-imx93.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 570b890e66334f283710af36feb2115f16c7a27c Author: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Tue Nov 19 09:58:05 2024 +0800 arm64: dts: imx93: Use IMX93_CLK_SPDIF_IPG as SPDIF IPG clock IMX93_CLK_BUS_WAKEUP is not accurate IPG clock, which missed the clock gate part. IMX93_CLK_SPDIF_IPG is the correct clock. Fixes: 1c4a4f7362fd ("arm64: dts: imx93: Add audio device nodes") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Acked-by: Shawn Guo <shawnguo@kernel.org> Link: https://lore.kernel.org/r/20241119015805.3840606-4-shengjiu.wang@nxp.com Signed-off-by: Abel Vesa <abel.vesa@linaro.org> arch/arm64/boot/dts/freescale/imx93.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a7853544482e2336b5b8bb9a4b964f9d687f290 Author: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Tue Nov 19 09:58:04 2024 +0800 clk: imx93: Add IMX93_CLK_SPDIF_IPG clock Split IMX93_CLK_SPDIF_IPG from IMX93_CLK_SPDIF_GATE because the IMX93_CLK_SPDIF_GATE controls the gate of IPG clock and root clock. Without this change, disabling IMX93_CLK_SPDIF_GATE would also disable the IPG clock, causing register access failures. Fixes: 1c4a4f7362fd ("arm64: dts: imx93: Add audio device nodes") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20241119015805.3840606-3-shengjiu.wang@nxp.com Signed-off-by: Abel Vesa <abel.vesa@linaro.org> drivers/clk/imx/clk-imx93.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 32e9dea2645fa10dfa08b4e333918affaf1e4de5 Author: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Tue Nov 19 09:58:03 2024 +0800 dt-bindings: clock: imx93: Add SPDIF IPG clk Add SPDIF IPG clk. The SPDIF IPG clock and root clock share same clock gate. Fixes: 1c4a4f7362fd ("arm64: dts: imx93: Add audio device nodes") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241119015805.3840606-2-shengjiu.wang@nxp.com Signed-off-by: Abel Vesa <abel.vesa@linaro.org> include/dt-bindings/clock/imx93-clock.h | 1 + 1 file changed, 1 insertion(+) commit b7f67545ca9fa13f6e12debd68a92c1c664e2e3b Author: Marek Vasut <marex@denx.de> Date: Tue Nov 12 02:37:35 2024 +0100 clk: imx: pll14xx: Add 208 MHz and 416 MHz entries for PLL1416x The PLL1416x is used to implement SYS_PLL3 on i.MX8MP and can be used to drive CLKOUTn clock. Add 208 MHz and 416 MHz entries to the PLL so they can be generated by the PLL and used to produce e.g. 13 MHz or 26 MHz on CLKOUTn output. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20241112013805.333798-1-marex@denx.de Signed-off-by: Abel Vesa <abel.vesa@linaro.org> drivers/clk/imx/clk-pll14xx.c | 2 ++ 1 file changed, 2 insertions(+) commit a9b7c84d22fb1687d63ca2a386773015cf59436b Author: Marek Vasut <marex@denx.de> Date: Tue Nov 12 02:36:54 2024 +0100 clk: imx8mp: Fix clkout1/2 support The CLKOUTn may be fed from PLL1/2/3, but the PLL1/2/3 has to be enabled first by setting PLL_CLKE bit 11 in CCM_ANALOG_SYS_PLLn_GEN_CTRL register. The CCM_ANALOG_SYS_PLLn_GEN_CTRL bit 11 is modeled by plln_out clock. Fix the clock tree and place the clkout1/2 under plln_sel instead of plain plln to let the clock subsystem correctly control the bit 11 and enable the PLL in case the CLKOUTn is supplied by PLL1/2/3. Fixes: 43896f56b59e ("clk: imx8mp: add clkout1/2 support") Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20241112013718.333771-1-marex@denx.de Signed-off-by: Abel Vesa <abel.vesa@linaro.org> drivers/clk/imx/clk-imx8mp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8b14c0648673439fb736b68096804314b934653b Author: Jianhua Lu <lujianhua000@gmail.com> Date: Sun Dec 1 21:57:16 2024 +0800 arm64: dts: qcom: sm8250-xiaomi-elish: Add bluetooth node Add bluetooth node and this bluetooth module is connected to uart. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Jianhua Lu <lujianhua000@gmail.com> Link: https://lore.kernel.org/r/20241201135716.141691-3-lujianhua000@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 1993f0255347c98b133d90e4150a4ce5f32646c4 Author: Jianhua Lu <lujianhua000@gmail.com> Date: Sun Dec 1 21:57:15 2024 +0800 arm64: dts: qcom: sm8250-xiaomi-elish: Add wifi node Add wifi node and this wifi module is connected to PCIe port. The following is qca6390 probe message: ath11k_pci 0000:01:00.0: Adding to iommu group 12 ath11k_pci 0000:01:00.0: BAR 0 [mem 0x60400000-0x604fffff 64bit]: assigned ath11k_pci 0000:01:00.0: enabling device (0000 -> 0002) ath11k_pci 0000:01:00.0: MSI vectors: 32 ath11k_pci 0000:01:00.0: qca6390 hw2.0 ath11k_pci 0000:01:00.0: chip_id 0x0 chip_family 0xb board_id 0xff soc_id 0xffffffff ath11k_pci 0000:01:00.0: fw_version 0x10121492 fw_build_timestamp 2021-11-04 11:23 fw_build_id Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Jianhua Lu <lujianhua000@gmail.com> Link: https://lore.kernel.org/r/20241201135716.141691-2-lujianhua000@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 6e4ec5f6940d8ae38ffe23c7f2f7da9de57d0cc1 Author: Jianhua Lu <lujianhua000@gmail.com> Date: Sun Dec 1 21:57:14 2024 +0800 arm64: dts: qcom: sm8250-xiaomi-elish: Add qca6390-pmu node Add qca6390-pmu node, which is used to manage power supply sequence for wifi and bluetooth on sm8250 soc based devices. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Jianhua Lu <lujianhua000@gmail.com> Link: https://lore.kernel.org/r/20241201135716.141691-1-lujianhua000@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) commit 86348c7587f556d3f0a3f117c3f5b91a69c39df6 Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Thu Nov 7 22:14:23 2024 +0100 arm64: dts: qcom: sa8775p: Use valid node names for GPI DMAs As pointed out by Intel's robot, the node name doesn't adhere to dt-bindings. Fix errors like this one: qcs9100-ride.dtb: qcom,gpi-dma@800000: $nodename:0: 'qcom,gpi-dma@800000' does not match '^dma-controller(@.*)?$' Fixes: 34d17ccb5db8 ("arm64: dts: qcom: sa8775p: Add GPI configuration") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202411080206.vFLRjIBZ-lkp@intel.com/ Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241107-topic-sa8775_dma-v1-1-eb633e07b007@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sa8775p.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9767920a7a1abfbc5af69460e110c9114de2f7e5 Author: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com> Date: Mon Nov 25 16:27:47 2024 +0530 arm64: dts: qcom: sa8775p-ride: Enable Display Port The Qualcomm SA8775P platform comes with 2 DisplayPort controllers for each mdss. edp0 and edp1 correspond to the DP controllers of mdss0, whereas edp2 and edp3 correspond to the DP controllers of mdss1. This change enables only the DP controllers, DPTX0 and DPTX1 alongside their corresponding PHYs of mdss0, which have been validated. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241125105747.6595-3-quic_mukhopad@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi | 80 ++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit e1e3e5673f8d7748cdb1068ca002c1c37039d3c1 Author: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com> Date: Mon Nov 25 16:27:46 2024 +0530 arm64: dts: qcom: sa8775p: add DisplayPort device nodes Add device tree nodes for the DPTX0 and DPTX1 controllers with their corresponding PHYs found on Qualcomm SA8775P SoC. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com> Link: https://lore.kernel.org/r/20241125105747.6595-2-quic_mukhopad@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sa8775p.dtsi | 220 +++++++++++++++++++++++++++++++++- 1 file changed, 219 insertions(+), 1 deletion(-) commit cc9d29aad876d83e752a1da6dc978088b248427e Author: Yuvaraj Ranganathan <quic_yrangana@quicinc.com> Date: Mon Nov 25 12:28:01 2024 +0530 arm64: dts: qcom: qcs8300: enable the inline crypto engine Add an ICE node to qcs8300 SoC description and enable it by adding a phandle to the UFS node. Signed-off-by: Yuvaraj Ranganathan <quic_yrangana@quicinc.com> Link: https://lore.kernel.org/r/20241125065801.1751256-3-quic_yrangana@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit f1b359bdf0a51cc6a0a57279fa44b81d23ec28eb Author: Yuvaraj Ranganathan <quic_yrangana@quicinc.com> Date: Mon Nov 25 12:13:17 2024 +0530 arm64: dts: qcom: qcs8300: add TRNG node The qcs8300 SoC has a True Random Number Generator, add the node with the correct compatible set. Signed-off-by: Yuvaraj Ranganathan <quic_yrangana@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241125064317.1748451-3-quic_yrangana@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 507aae9a3549cd173d8ca5e896706e4ca92c15ad Author: Petr Vorel <petr.vorel@gmail.com> Date: Sat Nov 23 23:17:08 2024 +0100 arm64: dts: qcom: msm8994-angler: Enable power key, volume up/down Signed-off-by: Petr Vorel <petr.vorel@gmail.com> Link: https://lore.kernel.org/r/20241123221708.862901-1-petr.vorel@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../boot/dts/qcom/msm8994-huawei-angler-rev-101.dts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 825b203296a845a1093722062ac6e5b655825704 Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Thu Nov 21 10:49:51 2024 +0530 arm64: dts: qcom: ipq5424: Add watchdog node Add the watchdog node for IPQ5424 SoC. Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Link: https://lore.kernel.org/r/20241121051951.1776250-3-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/ipq5424.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit ac92750c0395045023d9cfe3de5dec3c96504edc Author: Ling Xu <quic_lxu5@quicinc.com> Date: Tue Nov 19 17:36:35 2024 +0530 arm64: dts: qcom: qcs8300: Add ADSP and CDSP0 fastrpc nodes Add ADSP and CDSP0 fastrpc nodes for QCS8300 platform. Signed-off-by: Ling Xu <quic_lxu5@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241119120635.687936-1-quic_lxu5@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 73 +++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit 2705bce5b4c45e2a0a354ec4df937d2803241cd8 Author: Eugen Hristev <eugen.hristev@linaro.org> Date: Fri Nov 29 16:24:46 2024 +0200 soc: qcom: Rework BCM_TCS_CMD macro Reworked BCM_TCS_CMD macro in order to fix warnings from sparse: drivers/clk/qcom/clk-rpmh.c:270:28: warning: restricted __le32 degrades to integer drivers/clk/qcom/clk-rpmh.c:270:28: warning: restricted __le32 degrades to integer While at it, used u32_encode_bits which made the code easier to follow and removed unnecessary shift definitions. The use of cpu_to_le32 was wrong and thus removed. Signed-off-by: Eugen Hristev <eugen.hristev@linaro.org> Reviewed-by: Stephen Boyd <sboyd@kernel.org> Link: https://lore.kernel.org/r/20241129142446.407443-1-eugen.hristev@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> include/soc/qcom/tcs.h | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 9b01fc6bb1fca6ab2b7edb04b55bf106cf489118 Author: Maud Spierings <maud_spierings@hotmail.com> Date: Sat Nov 16 14:44:39 2024 +0100 firmware: qcom: scm: Allow QSEECOM on the asus vivobook s15 Add the asus vivobook s15 to the compatible list to allow access to efivars Signed-off-by: Maud Spierings <maud_spierings@hotmail.com> Link: https://lore.kernel.org/r/20241116-add_asus_qcom_scm-v1-1-5aa2b0fb52bd@hotmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/firmware/qcom/qcom_scm.c | 1 + 1 file changed, 1 insertion(+) commit 736f50489e08ba7329a9e828c35a2358968dacf0 Author: Maulik Shah <quic_mkshah@quicinc.com> Date: Tue Nov 12 16:31:51 2024 +0530 arm64: dts: qcom: sa8775p: Add CPUs to psci power domain Commit 4f79d0deae37 ("arm64: dts: qcom: sa8775p: add CPU idle states") already added cpu and cluster idle-states but have not added CPU devices to psci power domain without which idle states do not get detected. Add CPUs to psci power domain. Fixes: 4f79d0deae37 ("arm64: dts: qcom: sa8775p: add CPU idle states") Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20241112-sa8775p_cpuidle-v1-1-66ff3ba72464@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sa8775p.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 44d2a252698effd2f247a31492c10e1290903474 Author: Richard Acayan <mailingradian@gmail.com> Date: Mon Nov 11 21:40:54 2024 -0500 arm64: dts: qcom: sdm670-google-sargo: add flash leds The Pixel 3a has two identical flash LEDs. Add them together. Signed-off-by: Richard Acayan <mailingradian@gmail.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241112024050.669578-9-mailingradian@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 9b2955bae7025190c8d15983b37554da96e43e21 Author: Richard Acayan <mailingradian@gmail.com> Date: Mon Nov 11 21:40:53 2024 -0500 arm64: dts: qcom: pm660l: add flash leds The PM660L has support for QPNP flash LEDs. Add them to the device tree. Signed-off-by: Richard Acayan <mailingradian@gmail.com> Link: https://lore.kernel.org/r/20241112024050.669578-8-mailingradian@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/pm660l.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit a8d18df5a5a114f948a3526537de2de276c9fa7d Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Fri Nov 8 22:41:18 2024 +0100 arm64: dts: qcom: sa8775p: Use a SoC-specific compatible for GPI DMA The commit adding these nodes did not use a SoC-specific node, fix that to comply with bindings guidelines. Fixes: 34d17ccb5db8 ("arm64: dts: qcom: sa8775p: Add GPI configuration") Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241108-topic-sa8775_dma2-v1-2-1d3b0d08d153@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sa8775p.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2f39d2d46c73ad14d43950753b0437879e41af86 Author: Mahadevan <quic_mahap@quicinc.com> Date: Sat Oct 19 21:14:57 2024 +0530 arm64: dts: qcom: sa8775p: add display dt nodes for MDSS0 and DPU Add devicetree changes to enable MDSS0 display-subsystem its display-controller(DPU) for Qualcomm SA8775P platform. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Mahadevan <quic_mahap@quicinc.com> Link: https://lore.kernel.org/r/20241019-patchv3_1-v5-5-d2fb72c9a845@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sa8775p.dtsi | 89 +++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit 727dc481e50a4de846c49d6ef761616f299d127b Author: Taniya Das <quic_tdas@quicinc.com> Date: Fri Oct 25 14:22:54 2024 +0530 arm64: dts: qcom: sa8775p: Add support for clock controllers Add support for video, camera, display0 and display1 clock controllers on SA8775P. The dispcc1 will be enabled based on board requirements. Reviewed-by: Jagadeesh Kona <quic_jkona@quicinc.com> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241025-sa8775p-mm-v4-resend-patches-v6-2-329a2cac09ae@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sa8775p.dtsi | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 30f7dfd2c4899630becf477447e8bbe92683d2c6 Author: Taniya Das <quic_tdas@quicinc.com> Date: Fri Oct 25 14:22:53 2024 +0530 arm64: dts: qcom: sa8775p: Update sleep_clk frequency Fix the sleep_clk frequency is 32000 on SA8775P. Fixes: 603f96d4c9d0 ("arm64: dts: qcom: add initial support for qcom sa8775p-ride") Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Link: https://lore.kernel.org/r/20241025-sa8775p-mm-v4-resend-patches-v6-1-329a2cac09ae@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abc0c29f5e49f9190b2bb987cd894b5be9cb7469 Author: Rakesh Kota <quic_kotarake@quicinc.com> Date: Thu Oct 17 17:58:58 2024 +0530 arm64: dts: qcom: qcm6490-idp: Allow UFS regulators load/mode setting The UFS driver expects to be able to set load (and by extension, mode) on its supply regulators. Add the necessary properties to make that possible. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Rakesh Kota <quic_kotarake@quicinc.com> Link: https://lore.kernel.org/r/20241017122858.3664474-1-quic_kotarake@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcm6490-idp.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 02e784c5023232c48c6ec79b52ac8929d4e4db34 Author: Marek Vasut <marex@denx.de> Date: Sun Oct 6 04:19:48 2024 +0200 arm64: dts: qcom: msm8996-xiaomi-gemini: Fix LP5562 LED1 reg property The LP5562 led@1 reg property should likely be set to 1 to match the unit. Fix it. Fixes: 4ac46b3682c5 ("arm64: dts: qcom: msm8996: xiaomi-gemini: Add support for Xiaomi Mi 5") Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241006022012.366601-1-marex@denx.de Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 703b23b802be6432059ad2b56cbee943f7c25865 Author: Konrad Dybcio <quic_kdybcio@quicinc.com> Date: Fri Oct 4 20:33:43 2024 -0700 arm64: dts: qcom: qcs6490-rb3gen2: Configure onboard LEDs RB3 Gen2 has a trio of LEDs connected to the PM8350C's Light Pulse Generator. Describe them. Use the "red channel" as a panic indicator by default. Signed-off-by: Konrad Dybcio <quic_kdybcio@quicinc.com> [bjorn: Corrected colors] Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241004-rb3gen2-leds-v1-2-437cdbb4f6c0@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 25262976260e63564adc40c6c9cc02fc8918e2fa Author: Konrad Dybcio <quic_kdybcio@quicinc.com> Date: Fri Oct 4 20:33:42 2024 -0700 arm64: dts: qcom: pmk8350: Add more SDAM slices The downstream tree described more SDAM slices on the PMIC. Some of them are actually required by other peripherals, whereas other are nice to add for hardware description purposes. Add them in. Signed-off-by: Konrad Dybcio <quic_kdybcio@quicinc.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241004-rb3gen2-leds-v1-1-437cdbb4f6c0@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/pmk8350.dtsi | 72 +++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 39d6dcf67fe955eadd787052a8963837be801794 Author: Taniya Das <quic_tdas@quicinc.com> Date: Tue Oct 22 17:22:53 2024 +0530 clk: qcom: gcc: Add support for QCS615 GCC clocks Add the global clock controller support for QCS615 SoC. Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Reviewed-by: Imran Shaik <quic_imrashai@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241022-qcs615-clock-driver-v4-4-3d716ad0d987@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gcc-qcs615.c | 3034 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 3044 insertions(+) commit 42a1905a10d622ab0a4ff564b0117444f4384c35 Author: Taniya Das <quic_tdas@quicinc.com> Date: Tue Oct 22 17:22:51 2024 +0530 clk: qcom: rpmhcc: Add support for QCS615 Clocks Add the RPMHCC clocks required for QCS615 SoC. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Link: https://lore.kernel.org/r/20241022-qcs615-clock-driver-v4-2-3d716ad0d987@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-rpmh.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 94465062260063143ab806cdd16d5e183643343d Author: Taniya Das <quic_tdas@quicinc.com> Date: Tue Oct 22 17:22:50 2024 +0530 dt-bindings: clock: qcom-rpmhcc: Add RPMHCC bindings for QCS615 Add bindings and update documentation for clock rpmh driver on QCS615 SoCs. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Link: https://lore.kernel.org/r/20241022-qcs615-clock-driver-v4-1-3d716ad0d987@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml | 1 + 1 file changed, 1 insertion(+) commit 8592294dfc7b46c7b964f453d64e90e6c1137090 Author: Taniya Das <quic_tdas@quicinc.com> Date: Thu Oct 24 23:22:55 2024 +0530 arm64: defconfig: Enable sa8775p clock controllers Enable the SA8775P video, camera and display clock controllers to enable the video, camera and display functionalities on Qualcomm QCS9100 ride and ride rev3 boards. Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241024-defconfig_sa8775p_clock_controllers-v2-1-a9e1cdaed785@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 20b6d8a7b9bdced0c5f9a4887dbf123dd8e334c0 Author: Yuyu Li <liyuyu6@huawei.com> Date: Fri Nov 22 18:53:08 2024 +0800 RDMA/hns: Support fast path for link-down events dispatching hns3 NIC driver can directly notify the RoCE driver about link status events bypassing the netdev notifier. This can provide more timely event dispatching for ULPs. Signed-off-by: Yuyu Li <liyuyu6@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 379013776222e296645f39a689c57edc5f13b5be Author: Yuyu Li <liyuyu6@huawei.com> Date: Fri Nov 22 18:53:07 2024 +0800 RDMA/mlx5: Handle link status event only for LAG device The link status events of non-LAG devices are now handled in ib_core, so only LAG device events need to be handled in driver. Signed-off-by: Yuyu Li <liyuyu6@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/mlx5/main.c | 3 +++ 1 file changed, 3 insertions(+) commit e89fd16278fda644fc7e3a6870d814d294be05b9 Author: Yuyu Li <liyuyu6@huawei.com> Date: Fri Nov 22 18:53:06 2024 +0800 RDMA/pvrdma: Support report_port_event() ops In addition to dispatching event, some private stuffs need to be done in this driver's link status event handler. Implement the new report_port_event() ops with the link status event codes. Signed-off-by: Yuyu Li <liyuyu6@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 66 ++++++++++++++++---------- 1 file changed, 41 insertions(+), 25 deletions(-) commit 7fe3067b885df61691660e53141a0fdb2cd14c48 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Aug 23 17:38:45 2024 +0200 clk: qcom: spmi-pmic-div: simplify locking with guard() Simplify error handling (less gotos) over locks with guard(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240823-cleanup-h-guard-clk-qcom-v1-3-68bb9601c9dd@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-spmi-pmic-div.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit e534612ec7e60989d5b32c90ea2b2f61e5abde0e Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Aug 23 17:38:44 2024 +0200 clk: qcom: smd-rpm: simplify locking with guard() Simplify error handling (less gotos) over locks with guard(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240823-cleanup-h-guard-clk-qcom-v1-2-68bb9601c9dd@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-smd-rpm.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit e18e8bbb97f0a51459163cf8abe116cae64b7207 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Fri Aug 23 17:38:43 2024 +0200 clk: qcom: rpm: simplify locking with guard() Simplify error handling (less gotos) over locks with guard(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240823-cleanup-h-guard-clk-qcom-v1-1-68bb9601c9dd@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/clk-rpm.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 70096b4990848229d0784c5e51dc3c7c072f1111 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Thu Aug 22 18:48:51 2024 +0200 soc: qcom: smem_state: fix missing of_node_put in error path If of_parse_phandle_with_args() succeeds, the OF node reference should be dropped, regardless of number of phandle arguments. Cc: stable@vger.kernel.org Fixes: 9460ae2ff308 ("soc: qcom: Introduce common SMEM state machine code") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20240822164853.231087-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/soc/qcom/smem_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 438d05fb9be6bcd565e713c7e8d9ffb97e5f8d1e Author: devi priya <quic_devipriy@quicinc.com> Date: Thu Aug 1 11:18:02 2024 +0530 arm64: dts: qcom: ipq9574: Enable PCIe PHYs and controllers Enable the PCIe controller and PHY nodes corresponding to RDP 433. Signed-off-by: devi priya <quic_devipriy@quicinc.com> Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com> Link: https://lore.kernel.org/r/20240801054803.3015572-4-quic_srichara@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts | 113 ++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) commit d80c7fbfa908e3d893a1ea7fe178dfa82ed66bf1 Author: devi priya <quic_devipriy@quicinc.com> Date: Thu Aug 1 11:18:01 2024 +0530 arm64: dts: qcom: ipq9574: Add PCIe PHYs and controller nodes Add PCIe0, PCIe1, PCIe2, PCIe3 (and corresponding PHY) devices found on IPQ9574 platform. The PCIe0 & PCIe1 are 1-lane Gen3 host whereas PCIe2 & PCIe3 are 2-lane Gen3 host. Signed-off-by: devi priya <quic_devipriy@quicinc.com> Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com> Link: https://lore.kernel.org/r/20240801054803.3015572-3-quic_srichara@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/ipq9574.dtsi | 420 +++++++++++++++++++++++++++++++++- 1 file changed, 416 insertions(+), 4 deletions(-) commit 7069abcd5340f4c8dc4a96b814609b25d7e332ee Author: Anthony Ruhier <aruhier@mailbox.org> Date: Thu Dec 19 17:05:08 2024 +0100 arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Add lid switch Add the lid switch for the Lenovo Yoga Slim 7x. Other x1e80100 laptops use the GPIO pin 92 only, however on the Yoga Slim 7x this pin seems to be bridged with the pin 71. By default, the pin 71 is set as output-high, which blocks any event on pin 92. This patch sets the pin 71 as output-disable and sets the LID switch on pin 92. This is aligned with how they're configured on Windows: GPIO 71 | 0xf147000 | in | func0 | hi | pull up | 16 mA GPIO 92 | 0xf15c000 | in | func0 | lo | no pull | 2 mA Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Tested-by: Maya Matuszczyk <maccraft123mc@gmail.com> Signed-off-by: Anthony Ruhier <aruhier@mailbox.org> Link: https://lore.kernel.org/r/20241219-patch-lenovo-yoga-v3-1-9c4a79068141@mailbox.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit a57465766a91c6e173876f9cbb424340e214313f Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Date: Thu Dec 19 22:30:11 2024 +0530 clk: qcom: gcc-sm8650: Do not turn off PCIe GDSCs during gdsc_disable() With PWRSTS_OFF_ON, PCIe GDSCs are turned off during gdsc_disable(). This can happen during scenarios such as system suspend and breaks the resume of PCIe controllers from suspend. So use PWRSTS_RET_ON to indicate the GDSC driver to not turn off the GDSCs during gdsc_disable() and allow the hardware to transition the GDSCs to retention when the parent domain enters low power state during system suspend. Cc: stable@vger.kernel.org # 6.8 Fixes: c58225b7e3d7 ("clk: qcom: add the SM8650 Global Clock Controller driver, part 1") Reported-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on QRD8650 Link: https://lore.kernel.org/r/20241219170011.70140-2-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/gcc-sm8650.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 967e011013eda287dbec9e8bd3a19ebe730b8a08 Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Date: Thu Dec 19 22:30:10 2024 +0530 clk: qcom: gcc-sm8550: Do not turn off PCIe GDSCs during gdsc_disable() With PWRSTS_OFF_ON, PCIe GDSCs are turned off during gdsc_disable(). This can happen during scenarios such as system suspend and breaks the resume of PCIe controllers from suspend. So use PWRSTS_RET_ON to indicate the GDSC driver to not turn off the GDSCs during gdsc_disable() and allow the hardware to transition the GDSCs to retention when the parent domain enters low power state during system suspend. Cc: stable@vger.kernel.org # 6.2 Fixes: 955f2ea3b9e9 ("clk: qcom: Add GCC driver for SM8550") Reported-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on QRD8550 Link: https://lore.kernel.org/r/20241219170011.70140-1-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/gcc-sm8550.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 35d8bc131de0f0f280f0db42499512d79f05f456 Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Thu Dec 19 19:53:29 2024 +0100 soc: qcom: llcc: Enable LLCC_WRCACHE at boot on X1 The Last Level Cache is split into many slices, each one of which can be toggled on or off. Only certain slices are recommended to be turned on unconditionally, in order to reach optimal performance/latency/power levels. Enable WRCACHE on X1 at boot, in accordance with internal recommendations. No significant performance difference is expected. Fixes: b3cf69a43502 ("soc: qcom: llcc: Add configuration data for X1E80100") Cc: stable@vger.kernel.org Reviewed-by: Rajendra Nayak <quic_rjendra@quicinc.com> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Tested-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241219-topic-llcc_x1e_wrcache-v3-1-b9848d9c3d63@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/soc/qcom/llcc-qcom.c | 1 + 1 file changed, 1 insertion(+) commit be2f81eaa2c8e81d3de5b73dca5e133f63384cb3 Author: Luca Weiss <luca.weiss@fairphone.com> Date: Fri Dec 20 09:59:50 2024 +0100 arm64: dts: qcom: sm6350: Fix uart1 interconnect path The path MASTER_QUP_0 to SLAVE_EBI_CH0 would be qup-memory path and not qup-config. Since the qup-memory path is not part of the qcom,geni-uart bindings, just replace that path with the correct path for qup-config. Fixes: b179f35b887b ("arm64: dts: qcom: sm6350: add uart1 node") Cc: stable@vger.kernel.org Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241220-sm6350-uart1-icc-v1-1-f4f10fd91adf@fairphone.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99c21c7ca6423913783ea50e2c16be3cc097f17b Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Sat Dec 21 13:24:11 2024 +0100 clk: qcom: Add X1P42100 GPUCC driver The 8-core X1s have a different GPU subsystem compared to their bigger cousins, including the clocks part. Add the GPU clock controller driver to drive these. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241221-topic-x1p4_clk-v1-3-dbaeccb74884@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gpucc-x1p42100.c | 587 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 597 insertions(+) commit 089c09ee12317def57ab6a5159269315743083e3 Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Sat Dec 21 13:24:09 2024 +0100 dt-bindings: clock: qcom,x1e80100-gcc: Add X1P42100 X1P42100 is based on X1E80100 and largely reuses the X1E80100's GCC block, adding a couple wires here and there. Add a compatible for the X1P4 with a fallback to X1E80100. There are some additions in the smaller one, that will be added in the future. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241221-topic-x1p4_clk-v1-1-dbaeccb74884@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/clock/qcom,x1e80100-gcc.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 75c5cb35a83fe96929f09c5a731c6c6864121344 Merge: 9d40c5a698de e8f81b561360 Author: Bjorn Andersson <andersson@kernel.org> Date: Wed Dec 25 21:56:50 2024 -0600 Merge branch '20241221-topic-x1p4_clk-v1-2-dbaeccb74884@oss.qualcomm.com' into clk-for-6.14 Merge the X1P42100 GPUCC binding through a topic branch to make available for the DeviceTree branch as well. commit e8f81b561360d45832cfd546a1ce566745d184d9 Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Sat Dec 21 13:24:10 2024 +0100 dt-bindings: clock: qcom,x1e80100-gpucc: Extend for X1P42100 To make it easier for X1P4 and X1E to share a common device tree base, extend the existing latter's GPUCC bindings and reuse them on the former platform. While not in the same file, it only makes sense to introduce the new compatible in this commit as well. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241221-topic-x1p4_clk-v1-2-dbaeccb74884@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../devicetree/bindings/clock/qcom,sm8450-gpucc.yaml | 1 + include/dt-bindings/clock/qcom,x1e80100-gpucc.h | 13 +++++++++++++ 2 files changed, 14 insertions(+) commit 6994c655e1252049007973fd641e6a26f94c420b Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Sat Dec 21 13:36:03 2024 +0100 firmware: qcom: scm: Allow QSEECOM on X1P42100 CRD Add this board to the list to allow e.g. efivars access. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241221-topic-x1p4_soc-v1-4-55347831d73c@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/firmware/qcom/qcom_scm.c | 1 + 1 file changed, 1 insertion(+) commit e7282bf8a0e9bb8a4cb1be406674ff7bb7b264f2 Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Sat Dec 21 13:36:02 2024 +0100 soc: qcom: pd-mapper: Add X1P42100 X1P42100 is a cousin of X1E80100, and hence can make use of the latter's configuration. Do so. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241221-topic-x1p4_soc-v1-3-55347831d73c@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/soc/qcom/qcom_pd_mapper.c | 1 + 1 file changed, 1 insertion(+) commit 5deec162b2a2a0117165d028f42d664a4456b3f8 Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Sat Dec 21 13:36:01 2024 +0100 dt-bindings: arm: qcom: Add X1P42100 SoC & 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. Add X1P42100 SoC (and the CRD based on it) as a representative of the 8-core series. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20241221-topic-x1p4_soc-v1-2-55347831d73c@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 13dcb0eff18eb06455f879c796a34dbd0928213a Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Sat Dec 21 13:36:00 2024 +0100 dt-bindings: arm: qcom-soc: Extend X1E prefix match for X1P The X1 series includes SoCs like X1P42100. Extend the pattern x1e match to x1[ep] to also include these. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20241221-topic-x1p4_soc-v1-1-55347831d73c@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/arm/qcom-soc.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a86d844099474acf59cfb45f4590800ae4d9365e Author: Yuvaraj Ranganathan <quic_yrangana@quicinc.com> Date: Mon Dec 23 16:39:36 2024 +0530 arm64: dts: qcom: qcs8300: add QCrypto nodes Add the QCE and Crypto BAM DMA nodes. Signed-off-by: Yuvaraj Ranganathan <quic_yrangana@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241223110936.3428125-1-quic_yrangana@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 4f0d4a8218914da9e3bd56ec2cfb7a644472213d Author: Liankun Yang <liankun.yang@mediatek.com> Date: Thu Nov 28 10:37:21 2024 +0800 drm/mediatek: dp: Add sdp path reset When using type-c to type-c to connect to the monitor, the sound plays normally. If you unplug the type-c and connect the type-c to hdmi dongle to the monitor, there will be noise. By capturing the audio data, it is found that the data position is messy, and there is no error in the data. Through experiments, it can be restored by resetting the SDP path when unplugging it. Signed-off-by: Liankun Yang <liankun.yang@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Link: https://patchwork.kernel.org/project/dri-devel/patch/20241128023733.16294-1-liankun.yang@mediatek.com/ Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> drivers/gpu/drm/mediatek/mtk_dp.c | 15 +++++++++++++++ drivers/gpu/drm/mediatek/mtk_dp_reg.h | 1 + 2 files changed, 16 insertions(+) commit e4b4ef34578844d235b2fdc50210de80b5a83789 Author: Yuyu Li <liyuyu6@huawei.com> Date: Fri Nov 22 18:53:05 2024 +0800 RDMA/mlx4: Support report_port_event() ops In addition to dispatching event, some private stuffs need to be done in this driver's link status event handler. Implement the new report_port_event() ops with the link status event codes. Signed-off-by: Yuyu Li <liyuyu6@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/mlx4/main.c | 58 ++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 28 deletions(-) commit 2298c30c6885a017b0a979abb5376e98e5e4c352 Author: Yuyu Li <liyuyu6@huawei.com> Date: Fri Nov 22 18:53:04 2024 +0800 RDMA/usnic: Support report_port_event() ops In addition to dispatching event, some private stuffs need to be done in this driver's link status event handler. Implement the new report_port_event() ops with the link status event codes. Signed-off-by: Yuyu Li <liyuyu6@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/usnic/usnic_ib_main.c | 73 ++++++++++++++++++----------- 1 file changed, 45 insertions(+), 28 deletions(-) commit 62f5d59d1a3d17918ee7e9da9cb4ccb9443e0480 Author: Yuyu Li <liyuyu6@huawei.com> Date: Fri Nov 22 18:53:03 2024 +0800 RDMA/siw: Remove deliver net device event Since the netdev events of link status is now handled in ib_core, remove the related code in drivers. In addition, remove sdev->state as it is only used in siw_query_port(), and it can be replaced by ib_get_curr_port_state(). Signed-off-by: Yuyu Li <liyuyu6@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/sw/siw/siw.h | 3 --- drivers/infiniband/sw/siw/siw_main.c | 16 ---------------- drivers/infiniband/sw/siw/siw_verbs.c | 4 ++-- 3 files changed, 2 insertions(+), 21 deletions(-) commit 958152336cfafdec1f42d3d44253805282dc1321 Author: Yuyu Li <liyuyu6@huawei.com> Date: Fri Nov 22 18:53:02 2024 +0800 RDMA/rxe: Remove deliver net device event Since the netdev events of link status is now handled in ib_core, remove the related code in drivers. In addition, remove the setting of port->attr.state in rxe_port_up() and rxe_port_down(), as it is only used in rxe_query_port(), and it can be replaced by ib_get_curr_port_state(). Signed-off-by: Yuyu Li <liyuyu6@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/sw/rxe/rxe_net.c | 22 ++++------------------ drivers/infiniband/sw/rxe/rxe_verbs.c | 1 + 2 files changed, 5 insertions(+), 18 deletions(-) commit 4c354c02d5e38c5cd0edc7780645d0ab0b3bc455 Author: Yuyu Li <liyuyu6@huawei.com> Date: Fri Nov 22 18:53:01 2024 +0800 RDMA/irdma: Remove deliver net device event Since the netdev events of link status is now handled in ib_core, remove the related code in drivers. Signed-off-by: Yuyu Li <liyuyu6@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/irdma/utils.c | 3 --- 1 file changed, 3 deletions(-) commit 18eb2bf3df190f03f62e8ed45730229002cc341f Author: Yuyu Li <liyuyu6@huawei.com> Date: Fri Nov 22 18:53:00 2024 +0800 RDMA/erdma: Remove deliver net device event Since the netdev events of link status is now handled in ib_core, remove the related code in drivers. In addition, remove dev->state as it is only used in erdma_query_port(), and it can be replaced by ib_get_curr_port_state(). Signed-off-by: Yuyu Li <liyuyu6@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/erdma/erdma.h | 2 -- drivers/infiniband/hw/erdma/erdma_main.c | 8 -------- drivers/infiniband/hw/erdma/erdma_verbs.c | 8 ++------ 3 files changed, 2 insertions(+), 16 deletions(-) commit d3b15fcc4201f886c75fc55bb6bdd1056c7ea433 Author: Yuyu Li <liyuyu6@huawei.com> Date: Fri Nov 22 18:52:59 2024 +0800 RDMA/bnxt_re: Remove deliver net device event Since the netdev events of link status is now handled in ib_core, remove the related code in drivers. Signed-off-by: Yuyu Li <liyuyu6@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/bnxt_re/main.c | 71 ------------------------------------ 1 file changed, 71 deletions(-) commit 69dcf023f1f13ca9c2e9e8f30b9ec52ac0486c0a Author: Charles Keepax <ckeepax@opensource.cirrus.com> Date: Fri Dec 20 17:35:16 2024 +0000 ASoC: SDCA: Split function type patching and function naming Currently, patch_sdca_function_type() both patches the function type for older SDCA revisions, and reports the name of the function. In general it is cleaner to have a single function only do a single task, so split these operations into two separate functions. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20241220173516.907406-5-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sdca/sdca_functions.c | 117 ++++++++++++++++++---------------------- 1 file changed, 53 insertions(+), 64 deletions(-) commit c1ed5eb13f39b0058670bc2b1e251a040c306868 Author: Charles Keepax <ckeepax@opensource.cirrus.com> Date: Fri Dec 20 17:35:15 2024 +0000 ASoC: SDCA: Add missing function type names It is not helpful to error out on some SDCA function types, we might as well report the correct name and let the driver core simply not bind a driver to those functions for which the code lacks support. Also given no functions currently have support, it seems odd to select some as unsupported. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20241220173516.907406-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> include/sound/sdca_function.h | 1 + sound/soc/sdca/sdca_functions.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) commit c36297b1bd6e52a75a8ed75eb5dbf35c50402398 Author: Charles Keepax <ckeepax@opensource.cirrus.com> Date: Fri Dec 20 17:35:14 2024 +0000 ASoC: SDCA: Add bounds check for function address SDCA only supports 3-bits for the function address, but the ACPI value is 64-bits. Update the code that parses this to do a bounds check and error out on invalid addresses. Currently, an invalid address would truncate to the bottom 3-bits when used and thus use a likely incorrect address. With the bounds check, it is also now safe to shrink the size of the adr member of sdca_function_desc to a u8 and rearrange the struct members to pack better with the new size of adr. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20241220173516.907406-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> include/sound/sdca.h | 4 ++-- sound/soc/sdca/sdca_functions.c | 9 ++------- 2 files changed, 4 insertions(+), 9 deletions(-) commit 935cd06bfad4b715195befaf527a2d4fd36361d9 Author: Charles Keepax <ckeepax@opensource.cirrus.com> Date: Fri Dec 20 17:35:13 2024 +0000 ASoC: SDCA: Clean up error messages All the error messages in the SDCA code manually print the function in the output, update these to use dev_fmt instead. Whilst making the changes tweak a couple of the error messages to make them a little shorter. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20241220173516.907406-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sdca/sdca_functions.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit deb015208f7be9a62cb68dd8337d075b1829ee1d Author: Charles Keepax <ckeepax@opensource.cirrus.com> Date: Fri Dec 20 17:35:12 2024 +0000 ASoC: SDCA: Add missing header includes Several of the SDCA files don't include all the headers they use locally. These are included by the point of use through other headers, so it is not currently causing any issues. However, files should directly include things they directly use, so add the missing header includes. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20241220173516.907406-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> include/sound/sdca.h | 3 +++ include/sound/sdca_function.h | 2 ++ sound/soc/sdca/sdca_device.c | 2 ++ sound/soc/sdca/sdca_functions.c | 4 ++++ 4 files changed, 11 insertions(+) commit bc3a116a44988103187b192414caddbcb598072d Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Mon Dec 23 00:31:10 2024 +0100 sched_ext: Use str_enabled_disabled() helper in update_selcpu_topology() Remove hard-coded strings by using the str_enabled_disabled() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Tejun Heo <tj@kernel.org> kernel/sched/ext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a5463629299bc12d7a6308d20e662d5b36e10cb9 Author: Jessica Zhang <quic_jesszhan@quicinc.com> Date: Mon Dec 16 16:43:25 2024 -0800 drm/msm/dpu: Add RM support for allocating CWB Add support for allocating the concurrent writeback mux as part of the WB allocation Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629238/ Link: https://lore.kernel.org/r/20241216-concurrent-wb-v4-14-fe220297a7f0@quicinc.com drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 16 +++++++++++++++- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) commit a31a610fd44b6670f0b45fe109c34abda54d412b Author: Esha Bharadwaj <quic_ebharadw@quicinc.com> Date: Mon Dec 16 16:43:24 2024 -0800 drm/msm/dpu: add CWB support to dpu_hw_wb Adjust the WB_MUX configuration to account for using dedicated CWB pingpong blocks. Signed-off-by: Esha Bharadwaj <quic_ebharadw@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629248/ Link: https://lore.kernel.org/r/20241216-concurrent-wb-v4-13-fe220297a7f0@quicinc.com drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit aae8736426c63567d5daee6d4be61551f6d72a41 Author: Jessica Zhang <quic_jesszhan@quicinc.com> Date: Mon Dec 16 16:43:23 2024 -0800 drm/msm/dpu: Add dpu_hw_cwb abstraction for CWB block The CWB mux has its own registers and set of operations. Add dpu_hw_cwb abstraction to allow driver to configure the CWB mux. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629254/ Link: https://lore.kernel.org/r/20241216-concurrent-wb-v4-12-fe220297a7f0@quicinc.com [DB: added #include <linux/bitfield.h>] Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cwb.c | 75 +++++++++++++++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cwb.h | 70 +++++++++++++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 5 +- 4 files changed, 150 insertions(+), 1 deletion(-) commit af1bc0ebe743d4c72f05a95efcc1c66043332be0 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Wed Dec 4 11:34:50 2024 +0100 dt-bindings: phy: qcom,qmp-pcie: document the SM8350 two lanes PCIe PHY Document the two lanes PCIe PHY found on SM8350 SoCs along the already documented single lane PCIe PHY. This fixes: /soc@0/phy@1c0e000: failed to match any schema with compatible: ['qcom,sm8350-qmp-gen3x2-pcie-phy'] Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241204-topic-misc-sm8350-pcie-bindings-fix-v1-1-e8eaff1699d7@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org> Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 470d5704de03579df1107ff791619ad5f470d3f2 Author: Andy Yan <andy.yan@rock-chips.com> Date: Mon Dec 16 18:07:24 2024 +0800 phy: rockchip: phy-rockchip-typec: Fix Copyright description The company name has update to Rockchip Electronics Co., Ltd. since 2021. And change Co.Ltd to Co., Ltd. to fix mail server warning: DBL_SPAM(6.50)[co.ltd:url]; Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20241216100739.3726293-1-andyshrk@163.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/rockchip/phy-rockchip-typec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74a5054ee95e5d8b2e77eb97309e8243f9015c3b Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Fri Dec 13 19:19:48 2024 +0530 dt-bindings: phy: qcom,ipq8074-qmp-pcie: Document the IPQ5424 QMP PCIe PHYs Document the PCIe phy on the IPQ5424 platform using the IPQ9574 bindings as a fallback, since the PCIe phy on the IPQ5424 is similar to IPQ9574. Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241213134950.234946-3-quic_mmanikan@quicinc.com Signed-off-by: Vinod Koul <vkoul@kernel.org> .../bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 675c1edfa92d98cd04d8f70d858262a183fc9f55 Author: Esha Bharadwaj <quic_ebharadw@quicinc.com> Date: Mon Dec 16 16:43:22 2024 -0800 drm/msm/dpu: add devcoredumps for cwb registers Implement instance of snapshot function to dump new registers used for cwb Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Esha Bharadwaj <quic_ebharadw@quicinc.com> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629221/ Link: https://lore.kernel.org/r/20241216-concurrent-wb-v4-11-fe220297a7f0@quicinc.com drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 5 +++++ 1 file changed, 5 insertions(+) commit d1fe88dd53aedd705afc7140be7bad898a236e75 Author: Jessica Zhang <quic_jesszhan@quicinc.com> Date: Mon Dec 16 16:43:21 2024 -0800 drm/msm/dpu: Specify dedicated CWB pingpong blocks Change pingpong index and names to distinguish between general use pingpong blocks and pingpong blocks dedicated for concurrent writeback Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629229/ Link: https://lore.kernel.org/r/20241216-concurrent-wb-v4-10-fe220297a7f0@quicinc.com drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 8 ++++---- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 8 ++++---- 6 files changed, 16 insertions(+), 16 deletions(-) commit 989412edae5bd3a0cc5aedb71954fb47232aa96a Author: Esha Bharadwaj <quic_ebharadw@quicinc.com> Date: Mon Dec 16 16:43:20 2024 -0800 drm/msm/dpu: Add CWB entry to catalog for SM8650 Add a new block for concurrent writeback mux to the SM8650 HW catalog Signed-off-by: Esha Bharadwaj <quic_ebharadw@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629219/ Link: https://lore.kernel.org/r/20241216-concurrent-wb-v4-9-fe220297a7f0@quicinc.com .../gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 21 +++++++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 13 +++++++++++++ 2 files changed, 34 insertions(+) commit 835d10620445ebae0caa3ff5251e8947b67885dc Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Mon Dec 16 16:43:16 2024 -0800 drm/msm/dpu: get rid of struct dpu_rm_requirements The struct dpu_rm_requirements was used to wrap display topology and hw resources, which meant INTF indices. As of commit ef58e0ad3436 ("drm/msm/dpu: get INTF blocks directly rather than through RM") the hw resources struct was removed, leaving struct dpu_rm_requirements containing a single field (topology). Remove the useless wrapper. Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> [DB: dropped stray msm_drv.h inclusion] Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629259/ Link: https://lore.kernel.org/r/20241216-concurrent-wb-v4-5-fe220297a7f0@quicinc.com drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 70 +++++++++-------------------- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 2 +- 3 files changed, 24 insertions(+), 50 deletions(-) commit 8aa337cbe7a61a5a98a4d3f446fc968b3bac914a Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Apr 20 05:33:03 2024 +0300 drm/msm/mdp4: correct LCDC regulator name Correct c&p error from the conversion of LCDC regulators to the bulk API. Fixes: 54f1fbcb47d4 ("drm/msm/mdp4: use bulk regulators API for LCDC encoder") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/590412/ Link: https://lore.kernel.org/r/20240420-mdp4-fixes-v1-3-96a70f64fa85@linaro.org drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebc0deda3c2948d40419677d388b4e6081688a06 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Apr 20 05:33:01 2024 +0300 drm/msm: don't clean up priv->kms prematurely MSM display drivers provide kms structure allocated during probe(). Don't clean up priv->kms field in case of an error. Otherwise probe functions might fail after KMS probe deferral. Fixes: a2ab5d5bb6b1 ("drm/msm: allow passing struct msm_kms to msm_drv_probe()") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Fixes: 506efcba3129 ("drm/msm: carve out KMS code from msm_drv.c") Patchwork: https://patchwork.freedesktop.org/patch/590411/ Link: https://lore.kernel.org/r/20240420-mdp4-fixes-v1-1-96a70f64fa85@linaro.org drivers/gpu/drm/msm/msm_kms.c | 1 - 1 file changed, 1 deletion(-) commit b34a7401ffaee45354e81b38a4d072794079cfd6 Author: Sui Jingfeng <sui.jingfeng@linux.dev> Date: Mon Nov 4 17:07:38 2024 +0800 drm/msm: Check return value of of_dma_configure() Because the of_dma_configure() will returns '-EPROBE_DEFER' if the probe procedure of the specific platform IOMMU driver is not finished yet. It can also return other error code for various reasons. Stop pretending that it will always suceess, quit if it fail. Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Fixes: 29ac8979cdf7 ("drm/msm/a6xx: use msm_gem for GMU memory objects") Fixes: 5a903a44a984 ("drm/msm/a6xx: Introduce GMU wrapper support") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/622782/ Link: https://lore.kernel.org/r/20241104090738.529848-1-sui.jingfeng@linux.dev Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c36c60d1f7427a6297f432bac3a370b57f3fb9b4 Author: Abhinav Kumar <quic_abhinavk@quicinc.com> Date: Mon Dec 2 19:31:42 2024 -0800 dt-bindings: display: msm: dp: update maintainer entry Add myself as maintainer for dp controller yaml as to support review of the incoming changes. Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/626921/ Link: https://lore.kernel.org/r/20241202-dp_mst_bindings-v1-4-9a9a43b0624a@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Documentation/devicetree/bindings/display/msm/dp-controller.yaml | 1 + 1 file changed, 1 insertion(+) commit 49c2e01be19cd1159c2a49da1733e98f5be3da0a Author: Arnd Bergmann <arnd@arndb.de> Date: Mon Dec 16 09:33:13 2024 +0100 drm/msm: fix -Wformat-security warnings Passing a variable string as a printf style format is potentially dangerous that -Wformat-security can warn about if enabled. A new instance just got added: drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function 'dpu_kms_mdp_snapshot': drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:1046:49: error: format not a string literal and no format arguments [-Werror=format-security] 1046 | vbif->name); | ~~~~^~~~~~ Fix this one and the preexisting -Wformat-security warnings the in the DRM code for snapdragon. Fixes: 1a40bb31fcf1 ("drm/msm/dpu: Add VBIF to DPU snapshot") # and others Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/629126/ Link: https://lore.kernel.org/r/20241216083319.1838449-1-arnd@kernel.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 28 ++++++++++++++++++---------- 2 files changed, 19 insertions(+), 11 deletions(-) commit 68af44a71975688b881ea524e2526bb7c7ad0e9a Author: Breno Leitao <leitao@debian.org> Date: Thu Nov 21 01:57:12 2024 -0800 ima: kexec: silence RCU list traversal warning The ima_measurements list is append-only and doesn't require rcu_read_lock() protection. However, lockdep issues a warning when traversing RCU lists without the read lock: security/integrity/ima/ima_kexec.c:40 RCU-list traversed in non-reader section!! Fix this by using the variant of list_for_each_entry_rcu() with the last argument set to true. This tells the RCU subsystem that traversing this append-only list without the read lock is intentional and safe. This change silences the lockdep warning while maintaining the correct semantics for the append-only list traversal. Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com> security/integrity/ima/ima_kexec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8d3cd6b87557cdf1c075c40025ed3d90ece01338 Merge: c7a94e96f8ec 0c08080fd71c Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 16:44:01 2024 +0100 Merge tag 'mtd/qcom-reorg-for-spi-6.14' into nand/next Topic branch with preparation changes from Qcom in order to apply on top the spi bits adding the Qcom SPI-NAND controller driver re-using a lot of code that has been shared. With this goal in mind, the raw NAND controller driver has been cleaned up and reorganized, and only the relevant structures/helpers which have nothing raw NAND specific should now be exported. commit 0c08080fd71cd5dd59643104b39d3c89d793ab3c Author: Md Sadre Alam <quic_mdalam@quicinc.com> Date: Wed Nov 20 14:45:03 2024 +0530 mtd: rawnand: qcom: use FIELD_PREP and GENMASK Use the bitfield macro FIELD_PREP, and GENMASK to do the shift and mask in one go. This makes the code more readable. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/raw/qcom_nandc.c | 97 ++++++++++++++++++------------------ include/linux/mtd/nand-qpic-common.h | 31 +++++++----- 2 files changed, 67 insertions(+), 61 deletions(-) commit fdf3ee5c6e5278dab4f60b998b47ed2d510bf80f Author: Md Sadre Alam <quic_mdalam@quicinc.com> Date: Wed Nov 20 14:45:02 2024 +0530 mtd: nand: Add qpic_common API file Add qpic_common.c file which hold all the common qpic APIs which will be used by both qpic raw nand driver and qpic spi nand driver. Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/Makefile | 2 +- drivers/mtd/nand/qpic_common.c | 759 +++++++++++++++++++++++ drivers/mtd/nand/raw/qcom_nandc.c | 1092 +--------------------------------- include/linux/mtd/nand-qpic-common.h | 468 +++++++++++++++ 4 files changed, 1240 insertions(+), 1081 deletions(-) commit 1d479f5b345e0c3650fec4dddeef9fc6fab30c8b Author: Md Sadre Alam <quic_mdalam@quicinc.com> Date: Wed Nov 20 14:45:01 2024 +0530 mtd: rawnand: qcom: Add qcom prefix to common api Add qcom prefix to all the api which will be commonly used by spi nand driver and raw nand driver. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/raw/qcom_nandc.c | 320 +++++++++++++++++++------------------- 1 file changed, 160 insertions(+), 160 deletions(-) commit 8c52932da5e6756fa66f52f0720da283fba13aa6 Author: Md Sadre Alam <quic_mdalam@quicinc.com> Date: Wed Nov 20 14:45:00 2024 +0530 mtd: rawnand: qcom: cleanup qcom_nandc driver Perform a global cleanup of the Qualcomm NAND controller driver with the following improvements: - Remove register value indirection API - Remove set_reg() API - Convert read_loc_first & read_loc_last macro to functions - Rename multiple variables Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/raw/qcom_nandc.c | 516 +++++++++++++++++--------------------- 1 file changed, 234 insertions(+), 282 deletions(-) commit c7a94e96f8ece5c87d73bfa4751d75eabb971ea6 Author: Bastien Curutchet <bastien.curutchet@bootlin.com> Date: Wed Dec 4 10:43:19 2024 +0100 mtd: rawnand: davinci: Implement setup_interface() operation The setup_interface() operation isn't implemented. It forces the driver to use the ONFI mode 0, though it could use more optimal modes. Implement the setup_interface() operation. It uses the aemif_set_cs_timings() function from the AEMIF driver to update the chip select timings. The calculation of the register's contents is directly extracted from §20.3.2.3 of the DaVinci TRM [1] MAX_TH_PS and MAX_TSU_PS are the worst case timings based on the Keystone2 and DaVinci datasheets. [1] : https://www.ti.com/lit/ug/spruh77c/spruh77c.pdf Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/raw/davinci_nand.c | 79 +++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit a873eaed31a76979404ab7078d39f9e9324e7a17 Author: Bastien Curutchet <bastien.curutchet@bootlin.com> Date: Wed Dec 4 10:43:18 2024 +0100 mtd: rawnand: davinci: Add clock resource NAND controller has a reference clock inherited from the AEMIF (cf. Documentation/devicetree/bindings/memory-controllers/ti-aemif.txt) This clock isn't used yet by the driver. Add a struct clock in the struct davinci_nand_info so it can be used to compute timings. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/raw/davinci_nand.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ea11788df2ac07c2ddc126ffc89c4692aa78cb4d Author: Bastien Curutchet <bastien.curutchet@bootlin.com> Date: Wed Dec 4 10:43:17 2024 +0100 mtd: rawnand: davinci: Always depends on TI_AEMIF DAVINCI_NAND depends on TI_AEMIF only when ARCH_KEYSTONE is selected while the NAND controller is also always a part of the AEMIF controller on DaVinci SoCs. Set a dependency on TI_AEMIF regardless of the selected architecture. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202411020140.3wsKJOSB-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202411020957.X1T8T9ZR-lkp@intel.com/ Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/raw/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 376a0b999758063b93cc8aa25c3574669a3c628e Merge: 1f05f823a16c df8e78607d47 Author: Miquel Raynal <miquel.raynal@bootlin.com> Date: Tue Dec 24 15:42:57 2024 +0100 Merge tag 'memory-controller-drv-ti-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into nand/next Memory controller drivers for v6.14 - TI TI AEMIF driver enhancements: some refactoring around timing parameters and finally adding plus exporting interfaces for devices using the AEMIF interface (e.g. TI Davinci NAND controller) to better configure the memory interface. The exported functions are going to be used by: drivers/mtd/nand/raw/davinci_nand.c # -----BEGIN PGP SIGNATURE----- # # iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmddXowQHGtyemtAa2Vy # bmVsLm9yZwAKCRDBN2bmhouD15LAD/9E/LtoM//W6VHRIItF0AmYH7e2E4D2ECwl # MQyLCsj4zieIg5TLlnZMC/P2P1BIZoerCPN4QC+M/r5NZrMfufZYNdlpY0sqpkd2 # CoW2w8TjN+PHpzOGncHvbxdD5h/SHS0cRoOqiTJmZXeVf4FCq7riv8piGyoontNC # puzsSjjCOk/AHMHsHBVB3/VbWelvQbjq/qKyW/+aWl8tw3W+Ck4qiPcUMWXkLHhx # FfsrsUXWqOP7di2zcwWx4N+rNJWuYaM6xv6FoTlkVAhc094vDE/uKvBbQcizX/fd # 1iMgUsvt6BpLGKbJ8G3ZBL/DY+ugJv5oC7Cql0AWi9/NjW/Yil9C2a0RqKl48TCW # a4EeJrrXnocK5l0PDodQbyNL+D9c7tiwzs10/VEg2MnchaN8ZvdP/YfLICkJiXcF # ZAio89mG6r/S/AAe05M1vKso1Le/D0Lhx5IiJ9MDnHvJ5Hw2JPnGs7Dcqq5Xm47K # toY0kJmUfPZyAyavax7z1nGAAglpsXGN1m52AEoCcwMyU0DTamSUTf+a7pjKph78 # jrv1g2MB06kjGhXVT//8fS07C5b0v/Rn5CB2LgakgGsug1g6+YD0/rAylGNUTjHX # Dx9lVDz8llr68OP+bdUOTO9mlx+t1gI6SVg9U9gUKHbr95xVhMlyRuwwmqwdsPK8 # U+8kZyAi9w== # =uAGp # -----END PGP SIGNATURE----- # gpg: Signature made Sat 14 Dec 2024 11:31:40 AM CET # gpg: using RSA key DDD262283D111B233B6EB8A8C13766E6868B83D7 # gpg: issuer "krzk@kernel.org" # gpg: Good signature from "Krzysztof Kozlowski <k.kozlowski.k@gmail.com>" [marginal] # gpg: aka "Krzysztof Kozlowski <krzk@kernel.org>" [marginal] # gpg: aka "Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>" [marginal] # gpg: aka "Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>" [marginal] # gpg: aka "Krzysztof Kozłowski <k.kozlowski.k@gmail.com>" [marginal] # gpg: krzk@kernel.org: Verified 3 signatures in the past 3 years. Encrypted 0 # messages. # gpg: Warning: you have yet to encrypt a message to this key! # gpg: Warning: if you think you've seen more signatures by this key and user # id, then this key might be a forgery! Carefully examine the email address # for small variations. If the key is suspect, then use # gpg --tofu-policy bad 9BD07E0E0C51F8D59677B7541B93437D3B41629B # to mark it as being bad. # gpg: WARNING: The key's User ID is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 9BD0 7E0E 0C51 F8D5 9677 B754 1B93 437D 3B41 629B # Subkey fingerprint: DDD2 6228 3D11 1B23 3B6E B8A8 C137 66E6 868B 83D7 commit 8adbf20e05025f588d68fb5b0fbbdab4e9a6f97e Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Date: Tue Dec 24 14:16:20 2024 +0530 phy: qcom-qusb2: Add support for QCS615 Add init sequence and phy configuration for QCS615. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241224084621.4139021-3-krishna.kurapati@oss.qualcomm.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/qualcomm/phy-qcom-qusb2.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 413918c44c4fb7619db41d2b942e0289c6dac0bc Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Date: Tue Dec 24 14:16:19 2024 +0530 dt-bindings: usb: qcom,dwc3: Add QCS615 to USB DWC3 bindings Update dt-bindings to add primary controller of QCS615 to USB DWC3 controller list. Although this controller has a QUSB2 Phy, it belongs to a generation of SoCs like SDM670/SDM845/SM6350 where DP/DM is used for wakeup instead of qusb2_phy interrupt. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241224084621.4139021-2-krishna.kurapati@oss.qualcomm.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 3 +++ 1 file changed, 3 insertions(+) commit e6625db662120572c32ac34c371f9deefb321411 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Fri Dec 13 20:36:46 2024 +0800 phy: core: Simplify API of_phy_simple_xlate() implementation Simplify of_phy_simple_xlate() implementation by API class_find_device_by_of_node(). Also correct comments to mark its parameter @dev as unused instead of @args in passing. Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Cc: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/20241213-phy_core_fix-v6-6-40ae28f5015a@quicinc.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/phy-core.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit bf5821909eb9c7f5d07d5c6e852ead2c373c94a0 Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Fri Dec 6 22:38:09 2024 +0900 mtd: hyperbus: hbmc-am654: fix an OF node reference leak In am654_hbmc_platform_driver, .remove() and the error path of .probe() do not decrement the refcount of an OF node obtained by of_get_next_child(). Fix this by adding of_node_put() calls. Fixes: aca31ce96814 ("mtd: hyperbus: hbmc-am654: Fix direct mapping setup flash access") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/hyperbus/hbmc-am654.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 1f05f823a16ce0c310a1a50bfc2924a330ea87fc Author: Niravkumar L Rabara <niravkumar.l.rabara@intel.com> Date: Mon Dec 9 16:18:26 2024 +0800 dt-bindings: mtd: cadence: convert cadence-nand-controller.txt to yaml Convert cadence-nand-controller.txt to yaml format. Update cadence-nand-controller.txt to cdns,hp-nfc.yaml in MAINTAINER file. Signed-off-by: Niravkumar L Rabara <niravkumar.l.rabara@intel.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> .../bindings/mtd/cadence-nand-controller.txt | 53 --------------- .../devicetree/bindings/mtd/cdns,hp-nfc.yaml | 75 ++++++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 76 insertions(+), 54 deletions(-) commit 5abb5d414d550998a235de1161ac6bef240b0c29 Author: Hui-Ping Chen <hpchen0nvt@gmail.com> Date: Fri Dec 6 03:13:18 2024 +0000 mtd: rawnand: nuvoton: add new driver for the Nuvoton MA35 SoC Nuvoton MA35 SoCs NAND Flash Interface Controller supports 2kiB, 4kiB and 8kiB page size, and up to 8-bit, 12-bit, and 24-bit hardware ECC calculation circuit to protect data. Signed-off-by: Hui-Ping Chen <hpchen0nvt@gmail.com> [Miquel Raynal: Fixed compatible and driver name to match latest bindings] Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/raw/Kconfig | 8 + drivers/mtd/nand/raw/Makefile | 1 + .../mtd/nand/raw/nuvoton-ma35d1-nand-controller.c | 1029 ++++++++++++++++++++ 3 files changed, 1038 insertions(+) commit c20e06019087410832455d01c97e9f72f6bb1626 Author: Hui-Ping Chen <hpchen0nvt@gmail.com> Date: Fri Dec 6 03:13:17 2024 +0000 dt-bindings: mtd: nuvoton,ma35d1-nand: add new bindings Add dt-bindings for the Nuvoton MA35 SoC NAND Controller. Signed-off-by: Hui-Ping Chen <hpchen0nvt@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> .../bindings/mtd/nuvoton,ma35d1-nand.yaml | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) commit 03271ea36ea7a58d30a4bde182eb2a0d46220467 Author: david regan <dregan@broadcom.com> Date: Mon Nov 25 18:39:16 2024 -0800 mtd: rawnand: brcmnand: fix status read of brcmnand_waitfunc This change fixes an issue where an error return value may be mistakenly used as NAND status. Fixes: f504551b7f15 ("mtd: rawnand: Propagate error and simplify ternary operators for brcmstb_nand_wait_for_completion()") Signed-off-by: david regan <dregan@broadcom.com> Reviewed-by: William Zhang <william.zhang@broadcom.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/raw/brcmnand/brcmnand.c | 5 +++++ 1 file changed, 5 insertions(+) commit 98d187a989036096feaa2fef1ec3b2240ecdeacf Author: Fenghua Yu <fenghua.yu@intel.com> Date: Fri Nov 22 15:30:28 2024 -0800 dmaengine: idxd: Enable Function Level Reset (FLR) for halt When DSA/IAA device hits a fatal error, the device enters a halt state. The driver can reset the device depending on Reset Type required by hardware to recover the device. Supported Reset Types are: 0: Reset Device command 1: Function Level Reset (FLR) 2: Warm reset 3: Cold reset Currently, the driver only supports Reset Type 0. This patch adds support for FLR recovery Type 1. Before issuing a PCIe FLR command, IDXD device and WQ states are saved. After the FLR command execution, the device is recovered to its previous states, allowing the user can continue using the device. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20241122233028.2762809-6-fenghua.yu@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/idxd/init.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/dma/idxd/irq.c | 28 +++++++++-- 2 files changed, 148 insertions(+), 3 deletions(-) commit 3e114fa0fd1506c9e75aa0e2eb6a9050eb16b2f8 Author: Fenghua Yu <fenghua.yu@intel.com> Date: Fri Nov 22 15:30:27 2024 -0800 dmaengine: idxd: Refactor halt handler Define a halt handling helper idxd_halt(). Refactor the halt interrupt handler to call the helper. This will simplify the Function Level Reset (FLR) code. No functional change. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20241122233028.2762809-5-fenghua.yu@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/idxd/irq.c | 63 +++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 32 deletions(-) commit 6078a315aec15e0776fa90347cf4eba7478cdbd7 Author: Fenghua Yu <fenghua.yu@intel.com> Date: Fri Nov 22 15:30:26 2024 -0800 dmaengine: idxd: Add idxd_device_config_save() and idxd_device_config_restore() helpers Add the helpers to save and restore IDXD device configurations. These helpers will be called during Function Level Reset (FLR) processing. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20241122233028.2762809-4-fenghua.yu@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/idxd/idxd.h | 11 +++ drivers/dma/idxd/init.c | 225 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 236 insertions(+) commit 3ab45516772b813315324dc63a900703144e80c4 Author: Fenghua Yu <fenghua.yu@intel.com> Date: Fri Nov 22 15:30:25 2024 -0800 dmaengine: idxd: Binding and unbinding IDXD device and driver Add idxd_bind() and idxd_unbind() helpers to bind and unbind the IDXD device and driver. These helpers will be called during Function Level Reset (FLR) processing. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20241122233028.2762809-3-fenghua.yu@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/idxd/init.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 087e89b69b5fe5529a8809a06b4b4680e54f87e2 Author: Fenghua Yu <fenghua.yu@intel.com> Date: Fri Nov 22 15:30:24 2024 -0800 dmaengine: idxd: Add idxd_pci_probe_alloc() helper Add the idxd_pci_probe_alloc() helper to probe IDXD PCI device with or without allocating and setting idxd software values. The idxd_pci_probe() function is refactored to call this helper and always probe the IDXD device with allocating and setting the software values. This helper will be called later in the Function Level Reset (FLR) process without modifying the idxd software data. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20241122233028.2762809-2-fenghua.yu@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/idxd/idxd.h | 2 + drivers/dma/idxd/init.c | 102 +++++++++++++++++++++++++++++------------------- 2 files changed, 64 insertions(+), 40 deletions(-) commit 5d6670033a67b288ffbaa0774966f356b9c4ba5d Author: Charan Pedumuru <charan.pedumuru@microchip.com> Date: Thu Dec 5 15:26:18 2024 +0530 dt-bindings: dma: atmel: Convert to json schema Convert old text based binding to json schema. Changes during conversion: - Add the required properties `clock` and `clock-names`, which were missing in the original binding. - Add a fallback for `microchip,sam9x7-dma` and `microchip,sam9x60-dma` as they are compatible with the dma IP core on `atmel,sama5d4-dma`. - Update examples and include appropriate file directives to resolve errors identified by `dt_binding_check` and `dtbs_check`. Signed-off-by: Charan Pedumuru <charan.pedumuru@microchip.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241205-xdma-v1-1-76a4a44670b5@microchip.com Signed-off-by: Vinod Koul <vkoul@kernel.org> .../devicetree/bindings/dma/atmel,sama5d4-dma.yaml | 79 ++++++++++++++++++++++ .../devicetree/bindings/dma/atmel-xdma.txt | 54 --------------- 2 files changed, 79 insertions(+), 54 deletions(-) commit 54e09c8e2d3b0b7d603a64368fa49fe2a8031dd1 Author: Ken Sloat <ksloat@cornersoftsolutions.com> Date: Fri Dec 6 06:50:18 2024 -0500 dt-bindings: dma: st-stm32-dmamux: Add description for dma-cell values The dma-cell values for the stm32-dmamux are used to craft the DMA spec for the actual controller. These values are currently undocumented leaving the user to reverse engineer the driver in order to determine their meaning. Add a basic description, while avoiding duplicating information by pointing the user to the associated DMA docs that describe the fields in depth. Signed-off-by: Ken Sloat <ksloat@cornersoftsolutions.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20241206115018.1155149-1-ksloat@cornersoftsolutions.com Signed-off-by: Vinod Koul <vkoul@kernel.org> .../devicetree/bindings/dma/stm32/st,stm32-dmamux.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a131169dfa48d6d40da45bca67d1e4f54fa130a6 Author: Jyothi Kumar Seerapu <quic_jseerapu@quicinc.com> Date: Mon Dec 9 13:20:33 2024 +0530 dmaengine: qcom: gpi: Add GPI immediate DMA support for SPI protocol The DMA TRE(Transfer ring element) buffer contains the DMA buffer address. Accessing data from this address can cause significant delays in SPI transfers, which can be mitigated to some extent by utilizing immediate DMA support. QCOM GPI DMA hardware supports an immediate DMA feature for data up to 8 bytes, storing the data directly in the DMA TRE buffer instead of the DMA buffer address. This enhancement enables faster SPI data transfers. This optimization reduces the average transfer time from 25 us to 16 us for a single SPI transfer of 8 bytes length, with a clock frequency of 50 MHz. Signed-off-by: Jyothi Kumar Seerapu <quic_jseerapu@quicinc.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241209075033.16860-1-quic_jseerapu@quicinc.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/qcom/gpi.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) commit 1fb0644c3899b2f857b11037b19ed362b67bfe91 Author: Yuyu Li <liyuyu6@huawei.com> Date: Fri Nov 22 18:52:58 2024 +0800 RDMA/core: Support link status events dispatching Currently the dispatching of link status events is implemented by each RDMA driver independently, and most of them have very similar patterns. Add support for this in ib_core so that we can get rid of duplicate codes in each driver. A new last_port_state is added in ib_port_cache to cache the port state of the last link status events dispatching. The original port_state in ib_port_cache is not used here because it will be updated when ib_dispatch_event() is called, which means it may be changed between two link status events, and may lead to a loss of event dispatching. Some drivers currently have some private stuff in their link status events handler in addition to event dispatching, and cannot be perfectly integrated into the ib_core handling process. For these drivers, add a new ops report_port_event() so that they can keep their current processing. Finally, events of LAG devices are not supported yet in this patch as currently there is no way to obtain ibdev from upper netdev in ib_core. This can be a TODO work after the core have more support for LAG. Signed-off-by: Yuyu Li <liyuyu6@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/core/device.c | 60 ++++++++++++++++++++++++++++++++++++++++ include/rdma/ib_verbs.h | 17 ++++++++++++ 2 files changed, 77 insertions(+) commit 0c039a57b68dfb1dd49dfc16240791086d8e57ad Author: Yuyu Li <liyuyu6@huawei.com> Date: Fri Nov 22 18:52:57 2024 +0800 RDMA/core: Add ib_query_netdev_port() to query netdev port by IB device. Query the port number of a netdev associated with an ibdev. Signed-off-by: Yuyu Li <liyuyu6@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/core/device.c | 39 ++++++++++++++++++++++++++++++++------- include/rdma/ib_verbs.h | 2 ++ 2 files changed, 34 insertions(+), 7 deletions(-) commit 06d5363296dbcffb9e52ca4c9cec097105eb81e9 Author: David Lechner <dlechner@baylibre.com> Date: Mon Dec 16 14:51:02 2024 -0600 dt-bindings: dma: adi,axi-dmac: deprecate adi,channels node Deprecate the adi,channels node in the adi,axi-dmac binding. Prior to IP version 4.3.a, this information was required. Since then, there are memory-mapped registers that can be read to get the same information. Acked-by: Nuno Sa <nuno.sa@analog.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://lore.kernel.org/r/20241216-axi-dma-dt-yaml-v3-2-7b994710c43f@baylibre.com Signed-off-by: Vinod Koul <vkoul@kernel.org> .../devicetree/bindings/dma/adi,axi-dmac.yaml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit 788726fcea1fd79ca238403c56c012ca9c159798 Author: David Lechner <dlechner@baylibre.com> Date: Mon Dec 16 14:51:01 2024 -0600 dt-bindings: dma: adi,axi-dmac: convert to yaml schema Convert the AXI DMAC bindings from .txt to .yaml. Acked-by: Nuno Sa <nuno.sa@analog.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://lore.kernel.org/r/20241216-axi-dma-dt-yaml-v3-1-7b994710c43f@baylibre.com Signed-off-by: Vinod Koul <vkoul@kernel.org> .../devicetree/bindings/dma/adi,axi-dmac.txt | 61 --------- .../devicetree/bindings/dma/adi,axi-dmac.yaml | 139 +++++++++++++++++++++ 2 files changed, 139 insertions(+), 61 deletions(-) commit 9f6caa3978b0e859da39e4ace7973b877222dfd4 Author: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Fri Oct 11 22:58:00 2024 +0200 dmaengine: mv_xor: switch to for_each_child_of_node_scoped() Introduce the scoped variant of the loop to automatically release the child node when it goes out of scope, which is more robust than the non-scoped variant, and accounts for new early exits that could be added in the future. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20241011-dma_mv_xor_of_node_put-v1-2-3c2de819f463@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/mv_xor.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 36d8cbd661c48f4c18eeb414146ec68a71fd644f Merge: 9602a843cb3a 362f1bf98a3e Author: Vinod Koul <vkoul@kernel.org> Date: Tue Dec 24 15:45:33 2024 +0530 Merge branch 'fixes' into next commit 9602a843cb3a16df8930eb9b046aa7aeb769521b Author: Stefan Wahren <wahrenst@gmx.net> Date: Wed Dec 4 17:55:46 2024 +0100 dmaengine: bcm2835-dma: Prevent suspend if DMA channel is busy bcm2835-dma provides the service to others, so it should suspend late and resume early. Suspend should be prevented in case a DMA channel is still busy. Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Link: https://lore.kernel.org/r/20241204165546.77941-1-wahrenst@gmx.net Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/bcm2835-dma.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 68811c928f88828f188656dd3c9c184eeec2ce86 Author: Mohan Kumar D <mkumard@nvidia.com> Date: Tue Dec 17 13:13:58 2024 +0530 dmaengine: tegra210-adma: Support channel page Multiple ADMA Channel page hardware support has been added from TEGRA186 and onwards. - Add support in the tegra adma driver to handle selective channel page usage - Make global register programming optional Signed-off-by: Mohan Kumar D <mkumard@nvidia.com> Link: https://lore.kernel.org/r/20241217074358.340180-3-mkumard@nvidia.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/tegra210-adma.c | 86 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 76 insertions(+), 10 deletions(-) commit 762b37fc6ae2af0c7ddf36556fe7427575e9c759 Author: Mohan Kumar D <mkumard@nvidia.com> Date: Tue Dec 17 13:13:57 2024 +0530 dt-bindings: dma: Support channel page to nvidia,tegra210-adma Multiple ADMA Channel page hardware support has been added from TEGRA186 and onwards. Update the DT binding to use any of the ADMA channel page address space region. Signed-off-by: Mohan Kumar D <mkumard@nvidia.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241217074358.340180-2-mkumard@nvidia.com Signed-off-by: Vinod Koul <vkoul@kernel.org> .../bindings/dma/nvidia,tegra210-adma.yaml | 60 ++++++++++++++++++++-- 1 file changed, 56 insertions(+), 4 deletions(-) commit d0301fdbb50dfc99215b0f999d4ff7ab0a7675d9 Author: Vaishnav Achath <vaishnav.a@ti.com> Date: Wed Nov 27 15:46:27 2024 +0530 dmaengine: ti: k3-udma: Add support for J722S CSI BCDMA J722S CSI BCDMA is similar to J721S2 CSI BCDMA but there are slight integration differences like different PSIL thread base ID which is currently handled in the driver based on udma_of_match data. Add an entry to support J722S CSIRX. Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com> Link: https://lore.kernel.org/r/20241127101627.617537-3-vaishnav.a@ti.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/ti/k3-udma.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 775363772f5e72b984a883e22d510fec5357477a Author: Vaishnav Achath <vaishnav.a@ti.com> Date: Wed Nov 27 15:46:26 2024 +0530 dt-bindings: dma: ti: k3-bcdma: Add J722S CSI BCDMA J722S CSI BCDMA is similar to J721S2 CSI BCDMA and supports both RX and TX channels but has a different PSIL thread base ID which is currently handled in k3-udma driver. Add an entry for J722S CSIRX BCDMA. Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241127101627.617537-2-vaishnav.a@ti.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Documentation/devicetree/bindings/dma/ti/k3-bcdma.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2028c2958775c4861756ace010b433cc1c81f516 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Sat Dec 21 01:40:21 2024 +0000 RDMA/core: Remove unused ib_copy_path_rec_from_user ib_copy_path_rec_from_user() has been unused since 2019's commit a1a8e4a85cf7 ("rdma: Delete the ib_ucm module") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20241221014021.343979-5-linux@treblig.org Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/core/uverbs_marshall.c | 42 ------------------------------- include/rdma/ib_marshall.h | 3 --- 2 files changed, 45 deletions(-) commit 750efbb9c307f7d9ff43d38f58d3fca087dc041f Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Sat Dec 21 01:40:20 2024 +0000 RDMA/core: Remove unused ibdev_printk The last use of ibdev_printk() was removed in 2019 by commit b2299e83815c ("RDMA: Delete DEBUG code") Remove it. Note: The __ibdev_printk() is still used in the idev_err etc functions so leave that. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20241221014021.343979-4-linux@treblig.org Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/core/device.c | 17 ----------------- include/rdma/ib_verbs.h | 3 --- 2 files changed, 20 deletions(-) commit ddc8fab40b9ae309052d37179a705430fc15db97 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Sat Dec 21 01:40:19 2024 +0000 RDMA/core: Remove unused ib_find_exact_cached_pkey The last use of ib_find_exact_cached_pkey() was removed in 2012 by commit 2c75d2ccb6e5 ("IB/mlx4: Fix QP1 P_Key processing in the Primary Physical Function (PPF)") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20241221014021.343979-3-linux@treblig.org Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/core/cache.c | 35 ----------------------------------- include/rdma/ib_cache.h | 16 ---------------- 2 files changed, 51 deletions(-) commit 30dd62fa3954cb7697dbae9c33b2a5c50d8b5c6a Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Sat Dec 21 01:40:18 2024 +0000 RDMA/core: Remove unused ib_ud_header_unpack ib_ud_header_unpack() is unused, and I can't see any sign of it ever having been used in git. The only reference I can find is from December 2004 BKrev: 41d30034XNbBUl0XnyC6ig9V61Nf-A when it looks like it was added. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20241221014021.343979-2-linux@treblig.org Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/core/ud_header.c | 83 ------------------------------------- include/rdma/ib_pack.h | 3 -- 2 files changed, 86 deletions(-) commit 695df3e833c04aa48e57c28a25311dfdde241ce3 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Mon Dec 23 00:16:13 2024 +0000 RDMA/irdma: Remove unused irdma_cqp_*_fpm_val_cmd functions irdma_cqp_commit_fpm_val_cmd() and irdma_cqp_query_fpm_val_cmd() were added in 2021 by commit 915cc7ac0f8e ("RDMA/irdma: Add miscellaneous utility definitions") but haven't been used. Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20241223001613.307138-1-linux@treblig.org Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/irdma/osdep.h | 4 --- drivers/infiniband/hw/irdma/protos.h | 4 --- drivers/infiniband/hw/irdma/utils.c | 68 ------------------------------------ 3 files changed, 76 deletions(-) commit e883c64778e5a9905fce955681f8ee38c7197e0f Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Thu Dec 19 11:05:07 2024 +0900 dmaengine: ti: edma: fix OF node reference leaks in edma_driver The .probe() of edma_driver calls of_parse_phandle_with_fixed_args() but does not release the obtained OF nodes. Thus add a of_node_put() call. This bug was found by an experimental verification tool that I am developing. Fixes: 1be5336bc7ba ("dmaengine: edma: New device tree binding") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20241219020507.1983124-3-joe@pf.is.s.u-tokyo.ac.jp Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/ti/edma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0ab433180eb29bc69f9327e84028d878fb4670c5 Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Thu Dec 19 11:05:06 2024 +0900 dmaengine: ti: edma: make the loop condition simpler in edma_probe() When i == ecc->num_tc, the edma_probe() calls of_parse_phandle_with_fixed_args() and breaks from the loop regardless of the return value. Since neither the returned value nor the output argument tc_args is used, set i < ecc->num_tc as the loop condition. Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Link: https://lore.kernel.org/r/20241219020507.1983124-2-joe@pf.is.s.u-tokyo.ac.jp Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/ti/edma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5aad05463d221bb8afb11607d63eb56fc56eff82 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Tue Dec 17 15:02:44 2024 +0530 drm/i915/dp_mst: Use link.{min/max}_bpp_x16 The link.{min/max}_bpp_x16 is already set in crtc_state, use that while computing link config for MST. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-15-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp_mst.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 1c5b72daff4696e6c07291ace3809bb42abac4a8 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Tue Dec 17 15:02:43 2024 +0530 drm/i915/dp: Set the DSC link limits in intel_dp_compute_config_link_bpp_limits The helper intel_dp_compute_config_link_bpp_limits is the correct place to set the DSC link limits. Move the code to this function and remove the #TODO item. v2: Add argument intel_connector to the helper to get correct connector for DP MST. (Imre) v3: Remove redundant calls to intel_dp_dsc_sink_max_compressed_bpp as its already accounted while setting link bpp limits. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-14-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 58 +++++++++++++++------------------ 1 file changed, 26 insertions(+), 32 deletions(-) commit 57b763dd23d1df11b45ee44c5e150a8dde43efe7 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Tue Dec 17 15:02:42 2024 +0530 drm/i915/dp: Make dsc helpers accept const crtc_state pointers Modify the dsc helpers to get max/min compressed bpp to accept `const struct intel_crtc_state *` pointers instead of `struct intel_crtc_state *`. These helpers are not supposed to modify `crtc_state`. Accepting const pointers will allow these helpers to be called from functions that have const pointer to crtc_state. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-13-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 6 +++--- drivers/gpu/drm/i915/display/intel_dp.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 160672b86b0dd734f03f9bb158c42e13b3a1bf69 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Tue Dec 17 15:02:41 2024 +0530 drm/i915/dp: Use clamp for pipe_bpp limits with DSC Currently to get the max pipe_bpp with dsc we take the min of limits->pipe.max_bpp and dsc max bpp (dsc max bpc * 3). This can result in problems when limits->pipe.max_bpp is less than the computed dsc min bpp (dsc min bpc * 3). Replace the min/max functions with clamp while computing limits->pipe.max/min_bpp to ensure that the pipe_bpp limits are constrained within the DSC-defined minimum and maximum values. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-12-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a35dc4aee37c5f5c2052735babf59062cc19c92c Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Tue Dec 17 15:02:40 2024 +0530 drm/i915/dp_mst: Use pipe_bpp->limits.{max/min}_bpp for dsc The dsc limits->pipe.max/min_bpp are already set in intel_dp_compute_config_limits. Use the limits while computing the link config with DSC for MST. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-11-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp_mst.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 21ebc319fed308fe82022f65ee8bc1e42cc13df9 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Tue Dec 17 15:02:39 2024 +0530 drm/i915/dp: Refactor pipe_bpp limits with dsc With DSC there are additional limits for pipe_bpp. Currently these are scattered in different places. Instead set the limits->pipe.max/min_bpp in one place and use them wherever required. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-10-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 49 ++++++++++++++++----------------- 1 file changed, 24 insertions(+), 25 deletions(-) commit ad784c97876649ece9dd78a550e96c9386725002 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Tue Dec 17 15:02:38 2024 +0530 drm/i915/dp: Drop max_requested_bpc for dsc pipe_min/max bpp Currently we are including both max_requested_bpc and limits->pipe.bpp_max while computing maximum possible pipe bpp with dsc. However, while setting limits->pipe.max_bpp, the max_requested_bpc is already taken into account. Drop the redundant check for max_requested_bpc and use only limits->pipe.bpp_max. This will also result in dropping conn_state argument in functions where it was used only to get max_requested_bpc. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-9-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 1db9bd98e78155fb6be94fedab1520218e7468b1 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Tue Dec 17 15:02:37 2024 +0530 drm/i915/dp_mst: Use helpers to get dsc min/max input bpc Use helpers for source min/max input bpc with DSC. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-8-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 2 -- drivers/gpu/drm/i915/display/intel_dp.h | 2 ++ drivers/gpu/drm/i915/display/intel_dp_mst.c | 13 +++++-------- 3 files changed, 7 insertions(+), 10 deletions(-) commit eeb9632dfe7eae2ce4fd5deb318cd996f7f908e1 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Tue Dec 17 15:02:36 2024 +0530 drm/i915/dp: Return int from dsc_max/min_src_input_bpc helpers Use ints for dsc_max/min_bpc instead of u8 in dsc_max/min_src_input_bpc helpers and their callers. This will also help replace min_t/max_t macros with min/max ones. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-7-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 954e1eadc9c59bd9e6e0b01342b8421f59af85a2 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Tue Dec 17 15:02:35 2024 +0530 drm/i915/dp: Remove HAS_DSC macro for intel_dp_dsc_max_src_input_bpc DSC support is already checked before the helper intel_dp_dsc_max_src_input_bpc is called. Remove the check from the helper. v2: Drop the argument struct drm_i915_private *i915. (Suraj) Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-6-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 63b746070ac0da7810f4b8fac511e7eb8afa0ac3 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Tue Dec 17 15:02:34 2024 +0530 drm/i915/dp: Drop check for FEC in intel_dp_fec_compute_config Support for FEC is already checked by intel_dp_supports_dsc() in intel_dp_dsc_compute_config() which gets called before intel_dp_fec_compute_config(). Therefore the check can be dropped from the helper intel_dp_fec_compute_config(). v2: Changed commit message for clarity. (Suraj) Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-5-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit dc697ce89ba397e639fc84218fd4bc258ef6b64c Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Tue Dec 17 15:02:33 2024 +0530 drm/i915/dp: Separate out helper for compute fec_enable Make a separate function for setting fec_enable in crtc_state. v2: Rename helper to align with encoder->compute_config() callback and other minor fixes. (Jani) Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-4-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 34 ++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) commit adaa2cb6632ba9c4cf4c70a2b387d74c478159f8 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Tue Dec 17 15:02:32 2024 +0530 drm/i915/dp: Return early if DSC not supported Check for DSC support before computing link config with DSC. For DP MST we are already doing the same. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-3-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 230a14f4c586be1f6a58cd35d35d7dfa34eb071e Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Tue Dec 17 15:02:31 2024 +0530 drm/i915/dp: Refactor FEC support check in intel_dp_supports_dsc Forward Error Correction is required for DP if we are using DSC but is optional for eDP. Currently the helper intel_dp_supports_dsc checks if fec_enable is set for DP or not. The helper is called after fec_enable is set in crtc_state. Instead of this a better approach would be to: first, call intel_dp_supports_dsc to check for DSC support (along with FEC requirement for DP) and then set fec_enable for DP (if not already set) in crtc_state. To achieve this, remove the check for fec_enable in the helper and instead check for FEC support for DP. With this change the helper intel_dp_supports_dsc can be called earlier and return early if DSC is not supported. The structure intel_dp is added to the helper to get the FEC support for DP. v2: Pass intel_dp to adjust_limits_for_dsc_hblank_expansion_quirk instead of deriving it from connector. (Jani) Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217093244.3938132-2-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 8 +++++--- drivers/gpu/drm/i915/display/intel_dp.h | 3 ++- drivers/gpu/drm/i915/display/intel_dp_mst.c | 10 ++++++---- 3 files changed, 13 insertions(+), 8 deletions(-) commit 66d88e16f2044400fe6cc75cd51e1e74c4f9d96d Author: Larisa Grigore <larisa.grigore@oss.nxp.com> Date: Thu Dec 19 12:24:14 2024 +0200 dmaengine: fsl-edma: read/write multiple registers in cyclic transactions Add support for reading multiple registers in DEV_TO_MEM transactions and for writing multiple registers in MEM_TO_DEV transactions. Signed-off-by: Frank Li <Frank.Li@nxp.com> Co-developed-by: Alexandru-Catalin Ionita <alexandru-catalin.ionita@nxp.com> Signed-off-by: Alexandru-Catalin Ionita <alexandru-catalin.ionita@nxp.com> Signed-off-by: Larisa Grigore <larisa.grigore@oss.nxp.com> Link: https://lore.kernel.org/r/20241219102415.1208328-6-larisa.grigore@oss.nxp.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/fsl-edma-common.c | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) commit 2500243e5cc2e45e6fae826cbc64e9986a9b8194 Author: Larisa Grigore <larisa.grigore@oss.nxp.com> Date: Thu Dec 19 12:24:13 2024 +0200 dmaengine: fsl-edma: add support for S32G based platforms S32G2/S32G3 includes two system eDMA instances based on v3 version, each of them integrated with two DMAMUX blocks. Another particularity of these SoCs is that the interrupts are shared between channels as follows: - DMA Channels 0-15 share the 'tx-0-15' interrupt - DMA Channels 16-31 share the 'tx-16-31' interrupt - all channels share the 'err' interrupt Signed-off-by: Larisa Grigore <larisa.grigore@oss.nxp.com> Co-developed-by: Ciprian Marian Costea <ciprianmarian.costea@nxp.com> Signed-off-by: Ciprian Marian Costea <ciprianmarian.costea@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20241219102415.1208328-5-larisa.grigore@oss.nxp.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/fsl-edma-common.h | 3 ++ drivers/dma/fsl-edma-main.c | 109 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 111 insertions(+), 1 deletion(-) commit 57eeb0a566a82621ab731b0372a5a2894b0d572e Author: Larisa Grigore <larisa.grigore@oss.nxp.com> Date: Thu Dec 19 12:24:12 2024 +0200 dt-bindings: dma: fsl-edma: add nxp,s32g2-edma compatible string Introduce the compatible strings 'nxp,s32g2-edma' and 'nxp,s32g3-edma' to enable the support for the eDMAv3 present on S32G2/S32G3 platforms. The S32G2/S32G3 eDMA architecture features 32 DMA channels. Each of the two eDMA instances is integrated with two DMAMUX blocks. Another particularity of these SoCs is that the interrupts are shared between channels in the following way: - DMA Channels 0-15 share the 'tx-0-15' interrupt - DMA Channels 16-31 share the 'tx-16-31' interrupt - all channels share the 'err' interrupt Signed-off-by: Larisa Grigore <larisa.grigore@oss.nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241219102415.1208328-4-larisa.grigore@oss.nxp.com Signed-off-by: Vinod Koul <vkoul@kernel.org> .../devicetree/bindings/dma/fsl,edma.yaml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit e7732945db1d4612072e26e5b459d74e9d790b7c Author: Larisa Grigore <larisa.grigore@oss.nxp.com> Date: Thu Dec 19 12:24:11 2024 +0200 dmaengine: fsl-edma: remove FSL_EDMA_DRV_SPLIT_REG check when parsing muxbase Clean up dead code. dmamuxs is always 0 when FSL_EDMA_DRV_SPLIT_REG set. So it is redundant to check FSL_EDMA_DRV_SPLIT_REG again in the for loop because it will never enter for loop. Signed-off-by: Larisa Grigore <larisa.grigore@oss.nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20241219102415.1208328-3-larisa.grigore@oss.nxp.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/fsl-edma-main.c | 4 ---- 1 file changed, 4 deletions(-) commit a4b00f54a20bba0bbfc952a8cb4c3cbe29e408b0 Author: Larisa Grigore <larisa.grigore@oss.nxp.com> Date: Thu Dec 19 12:24:10 2024 +0200 dmaengine: fsl-edma: select of_dma_xlate based on the dmamuxs presence Select the of_dma_xlate function based on the dmamuxs definition rather than the FSL_EDMA_DRV_SPLIT_REG flag, which pertains to the eDMA3 layout. This change is a prerequisite for the S32G platforms, which integrate both eDMAv3 and DMAMUX. Existing platforms with FSL_EDMA_DRV_SPLIT_REG will not be impacted, as they all have dmamuxs set to zero. Signed-off-by: Larisa Grigore <larisa.grigore@oss.nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20241219102415.1208328-2-larisa.grigore@oss.nxp.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/fsl-edma-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57a7138d0627309d469719f1845d2778c251f358 Author: Md Sadre Alam <quic_mdalam@quicinc.com> Date: Fri Dec 20 15:12:03 2024 +0530 dmaengine: qcom: bam_dma: Avoid writing unavailable register Avoid writing unavailable register in BAM-Lite mode. BAM_DESC_CNT_TRSHLD register is unavailable in BAM-Lite mode. Its only available in BAM-NDP mode. So only write this register for clients who is using BAM-NDP. Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> Link: https://lore.kernel.org/r/20241220094203.3510335-1-quic_mdalam@quicinc.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/qcom/bam_dma.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 308213731f8cc772245adb729ae2364fb1d20e98 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Sat Dec 21 14:16:35 2024 +0000 dmaengine: idxd: Remove unused idxd_(un)register_bus_type idxd_register_bus_type() and idxd_unregister_bus_type() have been unused since 2021's commit d9e5481fca74 ("dmaengine: dsa: move dsa_bus_type out of idxd driver to standalone") Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Fenghua Yu <fenghua.yu@intel.com> Link: https://lore.kernel.org/r/20241221141635.69412-1-linux@treblig.org Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/idxd/idxd.h | 2 -- drivers/dma/idxd/sysfs.c | 10 ---------- 2 files changed, 12 deletions(-) commit 86a5f32ed8813d5534d3d6c77aad29184a9f99b6 Author: Brian Norris <briannorris@chromium.org> Date: Mon Dec 16 12:11:44 2024 -0800 drivers: base: test: Add ...find_device_by...(... NULL) tests We recently updated these device_match*() (and therefore, various *find_device_by*()) functions to return a consistent 'false' value when trying to match a NULL handle. Add tests for this. This provides regression-testing coverage for the sorts of bugs that underly commit 5c8418cf4025 ("PCI/pwrctrl: Unregister platform device only if one actually exists"). Reviewed-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Brian Norris <briannorris@chromium.org> Acked-by: Shuah Khan <skhan@linuxfoundation.org> Reviewed-by: David Gow <davidgow@google.com> Link: https://lore.kernel.org/r/20241216201148.535115-4-briannorris@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/test/platform-device-test.c | 41 +++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) commit 55b7aee990ef786251e0e37f8285c32b4193f419 Author: Brian Norris <briannorris@chromium.org> Date: Mon Dec 16 12:11:43 2024 -0800 drivers: base: test: Enable device model tests with KUNIT_ALL_TESTS Per commit bebe94b53eb7 ("drivers: base: default KUNIT_* fragments to KUNIT_ALL_TESTS"), it seems like we should default to KUNIT_ALL_TESTS. This enables these platform_device tests for common configurations, such as with: ./tools/testing/kunit/kunit.py run Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-by: David Gow <davidgow@google.com> Reviewed-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241216201148.535115-3-briannorris@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/test/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1b1bb7b29b1052e4124c0f99eff65200ef141caf Author: Brian Norris <briannorris@chromium.org> Date: Mon Dec 16 12:11:42 2024 -0800 drivers: base: Don't match devices with NULL of_node/fwnode/etc of_find_device_by_node(), bus_find_device_by_of_node(), bus_find_device_by_fwnode(), ..., all produce arbitrary results when provided with a NULL of_node, fwnode, ACPI handle, etc. This is counterintuitive, and the source of a few bugs, such as the one fixed by commit 5c8418cf4025 ("PCI/pwrctrl: Unregister platform device only if one actually exists"). It's hard to imagine a good reason that these device_match_*() APIs should return 'true' for a NULL argument. Augment these to return 0 (false). Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Brian Norris <briannorris@chromium.org> Acked-by: David Gow <davidgow@google.com> Acked-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://lore.kernel.org/r/20241216201148.535115-2-briannorris@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/base/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5ab5a3778dd1745bafa426e5d6f7c71bf9e14d84 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Dec 21 15:09:34 2024 +0100 kheaders: Simplify attribute through __BIN_ATTR_SIMPLE_RO() The utility macro from the sysfs core is sufficient to implement this attribute. Make use of it. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241221-sysfs-const-bin_attr-kheaders-v2-1-8205538aa012@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> kernel/kheaders.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit 90154d08675fdac580b24d90a8716987d4ef4071 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Dec 21 15:48:15 2024 +0100 misc: ds1682: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241221-sysfs-const-bin_attr-misc-drivers-v2-9-ba5e79fe8771@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ds1682.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 052bd11eb8e5db0484a6e545ca78bf0f3f16904e Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Dec 21 15:48:14 2024 +0100 misc: eeprom/max6875: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241221-sysfs-const-bin_attr-misc-drivers-v2-8-ba5e79fe8771@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/eeprom/max6875.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6a43faaa59bf0a2f2e8bb3d6ea76c86c3ef3eb6e Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Dec 21 15:48:13 2024 +0100 misc: eeprom/idt_89hpesx: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241221-sysfs-const-bin_attr-misc-drivers-v2-7-ba5e79fe8771@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/eeprom/idt_89hpesx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e588522da8800a327fd9b9f46bd70394194fd9e2 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Dec 21 15:48:12 2024 +0100 misc: pch_phub: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241221-sysfs-const-bin_attr-misc-drivers-v2-6-ba5e79fe8771@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/pch_phub.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fc58d178b0b4506a6cef59cdb83add920f7dd6a5 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Dec 21 15:48:11 2024 +0100 misc: c2port: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241221-sysfs-const-bin_attr-misc-drivers-v2-5-ba5e79fe8771@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/c2port/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 85aa1342d7a554256611c8e8133bfa5208ffb823 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Dec 21 15:48:10 2024 +0100 misc: c2port: Calculate bin_attribute size through group callback Modifying the size of the global bin_attribute instance can be racy. Instead use the new .bin_size callback to do so safely. For this to work move the initialization of c2dev->ops before the call to device_create() as the size callback will need access to it. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241221-sysfs-const-bin_attr-misc-drivers-v2-4-ba5e79fe8771@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/c2port/core.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit c3b8c358c4f36faf610b76d546eb36178bb11b83 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Dec 21 15:48:09 2024 +0100 misc: sram: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241221-sysfs-const-bin_attr-misc-drivers-v2-3-ba5e79fe8771@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/sram.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e47e0e7ed0e4bf9f65cd7dcf1b4659f160a746e6 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Dec 21 15:48:08 2024 +0100 cxl: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Andrew Donnellan <ajd@linux.ibm.com> Link: https://lore.kernel.org/r/20241221-sysfs-const-bin_attr-misc-drivers-v2-2-ba5e79fe8771@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/cxl/sysfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0e3cd21cdef24017f709d7991676fbd05adf634f Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Dec 21 15:48:07 2024 +0100 ocxl: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Andrew Donnellan <ajd@linux.ibm.com> Link: https://lore.kernel.org/r/20241221-sysfs-const-bin_attr-misc-drivers-v2-1-ba5e79fe8771@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/misc/ocxl/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 95bc2d4a9020efcd7858c91e68e9f4e842e3e8c8 Author: Carlos Llamas <cmllamas@google.com> Date: Tue Dec 10 14:31:05 2024 +0000 binder: use per-vma lock in page reclaiming Use per-vma locking in the shrinker's callback when reclaiming pages, similar to the page installation logic. This minimizes contention with unrelated vmas improving performance. The mmap_sem is still acquired if the per-vma lock cannot be obtained. Cc: Suren Baghdasaryan <surenb@google.com> Suggested-by: Liam R. Howlett <Liam.Howlett@oracle.com> Reviewed-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Carlos Llamas <cmllamas@google.com> Link: https://lore.kernel.org/r/20241210143114.661252-10-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/android/binder_alloc.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit 978ce3ed703db86344e1df718ea0f56ec7d4dae1 Author: Carlos Llamas <cmllamas@google.com> Date: Tue Dec 10 14:31:04 2024 +0000 binder: propagate vm_insert_page() errors Instead of always overriding errors with -ENOMEM, propagate the specific error code returned by vm_insert_page(). This allows for more accurate error logs and handling. Cc: Suren Baghdasaryan <surenb@google.com> Reviewed-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Carlos Llamas <cmllamas@google.com> Link: https://lore.kernel.org/r/20241210143114.661252-9-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/android/binder_alloc.c | 1 - 1 file changed, 1 deletion(-) commit 9e2aa76549b9fd2b8f7b81260417a4ec853910e6 Author: Carlos Llamas <cmllamas@google.com> Date: Tue Dec 10 14:31:03 2024 +0000 binder: use per-vma lock in page installation Use per-vma locking for concurrent page installations, this minimizes contention with unrelated vmas improving performance. The mmap_lock is still acquired when needed though, e.g. before get_user_pages_remote(). Many thanks to Barry Song who posted a similar approach [1]. Link: https://lore.kernel.org/all/20240902225009.34576-1-21cnbao@gmail.com/ [1] Cc: Nhat Pham <nphamcs@gmail.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Barry Song <v-songbaohua@oppo.com> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Hillf Danton <hdanton@sina.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Reviewed-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Carlos Llamas <cmllamas@google.com> Link: https://lore.kernel.org/r/20241210143114.661252-8-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/android/binder_alloc.c | 67 +++++++++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 17 deletions(-) commit 0a7bf6866d416e4f8f452419410359b6a82639d1 Author: Carlos Llamas <cmllamas@google.com> Date: Tue Dec 10 14:31:02 2024 +0000 binder: rename alloc->buffer to vm_start The alloc->buffer field in struct binder_alloc stores the starting address of the mapped vma, rename this field to alloc->vm_start to better reflect its purpose. It also avoids confusion with the binder buffer concept, e.g. transaction->buffer. No functional changes in this patch. Reviewed-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Carlos Llamas <cmllamas@google.com> Link: https://lore.kernel.org/r/20241210143114.661252-7-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/android/binder.c | 2 +- drivers/android/binder_alloc.c | 28 ++++++++++++++-------------- drivers/android/binder_alloc.h | 4 ++-- drivers/android/binder_alloc_selftest.c | 2 +- drivers/android/binder_trace.h | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) commit 072010abc3ad98bc20198dbe60ef13233a0a357c Author: Carlos Llamas <cmllamas@google.com> Date: Tue Dec 10 14:31:01 2024 +0000 binder: replace alloc->vma with alloc->mapped It is unsafe to use alloc->vma outside of the mmap_sem. Instead, add a new boolean alloc->mapped to save the vma state (mapped or unmmaped) and use this as a replacement for alloc->vma to validate several paths. Using the alloc->vma caused several performance and security issues in the past. Now that it has been replaced with either vm_lookup() or the alloc->mapped state, we can finally remove it. Cc: Minchan Kim <minchan@kernel.org> Cc: Liam R. Howlett <Liam.Howlett@oracle.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Suren Baghdasaryan <surenb@google.com> Reviewed-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Carlos Llamas <cmllamas@google.com> Link: https://lore.kernel.org/r/20241210143114.661252-6-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/android/binder_alloc.c | 48 ++++++++++++++++++--------------- drivers/android/binder_alloc.h | 6 ++--- drivers/android/binder_alloc_selftest.c | 2 +- 3 files changed, 30 insertions(+), 26 deletions(-) commit f909f0308267dc49fbf122f60e1ec7ddcd1b92c7 Author: Carlos Llamas <cmllamas@google.com> Date: Tue Dec 10 14:31:00 2024 +0000 binder: store shrinker metadata under page->private Instead of pre-allocating an entire array of struct binder_lru_page in alloc->pages, install the shrinker metadata under page->private. This ensures the memory is allocated and released as needed alongside pages. By converting the alloc->pages[] into an array of struct page pointers, we can access these pages directly and only reference the shrinker metadata where it's being used (e.g. inside the shrinker's callback). Rename struct binder_lru_page to struct binder_shrinker_mdata to better reflect its purpose. Add convenience functions that wrap the allocation and freeing of pages along with their shrinker metadata. Note I've reworked this patch to avoid using page->lru and page->index directly, as Matthew pointed out that these are being removed [1]. Link: https://lore.kernel.org/all/ZzziucEm3np6e7a0@casper.infradead.org/ [1] Cc: Matthew Wilcox <willy@infradead.org> Cc: Liam R. Howlett <Liam.Howlett@oracle.com> Reviewed-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Carlos Llamas <cmllamas@google.com> Link: https://lore.kernel.org/r/20241210143114.661252-5-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/android/binder_alloc.c | 130 ++++++++++++++++++-------------- drivers/android/binder_alloc.h | 25 ++++-- drivers/android/binder_alloc_selftest.c | 14 ++-- 3 files changed, 99 insertions(+), 70 deletions(-) commit 49d2562c804fc4f43342b3254fe6fb87365c9046 Author: Carlos Llamas <cmllamas@google.com> Date: Tue Dec 10 14:30:59 2024 +0000 binder: select correct nid for pages in LRU The numa node id for binder pages is currently being derived from the lru entry under struct binder_lru_page. However, this object doesn't reflect the node id of the struct page items allocated separately. Instead, select the correct node id from the page itself. This was made possible since commit 0a97c01cd20b ("list_lru: allow explicit memcg and NUMA node selection"). Cc: Nhat Pham <nphamcs@gmail.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Suren Baghdasaryan <surenb@google.com> Reviewed-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Carlos Llamas <cmllamas@google.com> Link: https://lore.kernel.org/r/20241210143114.661252-4-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/android/binder_alloc.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit d1716b4b78fb392a5514c8863e8ba287cc4580c2 Author: Carlos Llamas <cmllamas@google.com> Date: Tue Dec 10 14:30:58 2024 +0000 binder: concurrent page installation Allow multiple callers to install pages simultaneously by switching the mmap_sem from write-mode to read-mode. Races to the same PTE are handled using get_user_pages_remote() to retrieve the already installed page. This method significantly reduces contention in the mmap semaphore. To ensure safety, vma_lookup() is used (instead of alloc->vma) to avoid operating on an isolated VMA. In addition, zap_page_range_single() is called under the alloc->mutex to avoid racing with the shrinker. Many thanks to Barry Song who posted a similar approach [1]. Link: https://lore.kernel.org/all/20240902225009.34576-1-21cnbao@gmail.com/ [1] Cc: David Hildenbrand <david@redhat.com> Cc: Barry Song <v-songbaohua@oppo.com> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Liam R. Howlett <Liam.Howlett@oracle.com> Reviewed-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Carlos Llamas <cmllamas@google.com> Link: https://lore.kernel.org/r/20241210143114.661252-3-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/android/binder_alloc.c | 65 ++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 24 deletions(-) commit 8b52c7261e04f1325f47e2b173a9d4b980e8f858 Author: Carlos Llamas <cmllamas@google.com> Date: Tue Dec 10 14:30:57 2024 +0000 Revert "binder: switch alloc->mutex to spinlock_t" This reverts commit 7710e2cca32e7f3958480e8bd44f50e29d0c2509. In preparation for concurrent page installations, restore the original alloc->mutex which will serialize zap_page_range_single() against page installations in subsequent patches (instead of the mmap_sem). Resolved trivial conflicts with commit 2c10a20f5e84a ("binder_alloc: Fix sleeping function called from invalid context") and commit da0c02516c50 ("mm/list_lru: simplify the list_lru walk callback function"). Cc: Mukesh Ojha <quic_mojha@quicinc.com> Reviewed-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Carlos Llamas <cmllamas@google.com> Link: https://lore.kernel.org/r/20241210143114.661252-2-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/android/binder_alloc.c | 46 +++++++++++++++++++++--------------------- drivers/android/binder_alloc.h | 10 ++++----- 2 files changed, 28 insertions(+), 28 deletions(-) commit d7123c77dc6072b028291355e4c4be0ad8046066 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:34:20 2024 +0000 usb: gadget: f_tcm: Refactor goto check_condition Move the command initialization before the check_condition to after the goto statement for a cleaner look. No functional change here. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/8442364f51f2788d2a191997581a8eda7a143272.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit de92fb3fc2bd20ac9ad267af4dfb075b8e792fbc Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:34:15 2024 +0000 usb: gadget: f_tcm: Track BOT command kref Set TARGET_SCF_ACK_KREF flag and allow f_tcm to take the BOT command reference. A usb request may be canceled, the f_tcm knows this. Let it decides if the command should be freed. This is the same as how the UAS interface is done. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/e791c639e91b5d91a8787f5d6902e8c58f1dc172.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3ce3b2108f38059e0830222da4c3003aff2ab097 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:34:09 2024 +0000 usb: gadget: f_tcm: Requeue command request on error If there's error on command request, make sure to requeue to receive the next one. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/d4e55c13be8f83f99ee55f7b979a99e2c14fc4c8.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a4d7274d07ae4b3e77b3b35f46cab7c90b95ef21 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:34:03 2024 +0000 usb: gadget: f_tcm: Stall on invalid CBW If the BOT command CBW is invalid, make sure to respond by setting status endpoint STALL until the next proper CBW or reset. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/96022e2d5225f01a20263a4ba9c2e2c8a63328b8.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 16 +++++++++++++++- drivers/usb/gadget/function/tcm.h | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) commit 29ed170538729c3c59cb8176ebb62673bbf6c799 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:33:56 2024 +0000 usb: gadget: f_tcm: Check overlapped command If there's an overlapped command tag, cancel the command and respond with RC_OVERLAPPED_TAG to host. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/6bffc2903d0cd1e7c7afca837053a48e883d8903.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 123 +++++++++++++++++++++++++++++++++++- drivers/usb/gadget/function/tcm.h | 5 ++ 2 files changed, 127 insertions(+), 1 deletion(-) commit 20e9ab60e6a66389558d9d31932b676937affb79 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:33:50 2024 +0000 usb: gadget: f_tcm: Handle TASK_MANAGEMENT commands Handle target_core_fabric_ops TASK MANAGEMENT functions and their response. If a TASK MANAGEMENT command is received, the driver will interpret the function TMF_*, translate to TMR_*, and fire off a command work executing target_submit_tmr(). On completion, it will handle the TASK MANAGEMENT response through uasp_send_tm_response(). Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/50339586e36509dadb9c208b3314530993e673b6.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 220 ++++++++++++++++++++++++++++++++---- drivers/usb/gadget/function/tcm.h | 5 + 2 files changed, 206 insertions(+), 19 deletions(-) commit 1d5d4e11536ed7154ba08799a64eca9802d32d0f Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:33:44 2024 +0000 usb: gadget: f_tcm: Send sense on cancelled transfer If the transfer is cancelled due to a disconnect or driver tear down (error code -ESHUTDOWN), then just free the command. However, if it got cancelled due to other reasons, then send a sense CHECK CONDITION status with TCM_CHECK_CONDITION_ABORT_CMD status to host notifying the delivery failure. Note that this is separate from TASK MANAGEMENT function abort task command, which will require a separate response IU. See UAS-r04 section 8. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/f2ae293c1fc39df4d242a2f724584bf4ec105ece.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 472615215398b7e47baca6422cab5a7106cddecb Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:33:38 2024 +0000 usb: gadget: f_tcm: Save CPU ID per command Normally we don't care about the CPU id, but if we ever use TARGET_SCF_USE_CPUID, then we need to save the cpuid. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/ab45e37314405d9cdd7a8e3b761c654400bb2270.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 1 + 1 file changed, 1 insertion(+) commit 2d6d0c695e6bb584aec036c51d7de989069fd2ee Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:33:31 2024 +0000 usb: gadget: f_tcm: Stop proceeding further on -ESHUTDOWN If the error code is -ESHUTDOWN, stop processing the request/command further and prepare for teardown. -ESHUTDOWN is for device reset or disconnection. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/b14410cce6bc7b8a0b43da23a8e0cf1ed1fa8ab6.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 89e4ec503d6b37a35720424b70911d61b451875f Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:33:25 2024 +0000 usb: gadget: f_tcm: Cleanup requests on ep disable There may be different reasons for the transfer to be cancelled. Don't blindly free the command without checking its status. We may still need to properly respond to cancelled command. Check and only free the command on endpoint disable. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/6c4ae2b4c2a9037bdcb6f909e173a94b11f04657.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 76003eb6d09278f945eaee0e8134451485a07c69 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:33:19 2024 +0000 usb: gadget: f_tcm: Handle abort command Implement usbg_aborted_task() to cancel aborted outstanding requests. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/6d2a05f120a0384e36b5150b50eec53a0991f400.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 360715d56782fa8ad6776dff9294f0698036a25d Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:33:13 2024 +0000 usb: gadget: f_tcm: Minor cleanup redundant code The status request preparation is done in uasp_prepare_status(). Remove duplicate code. No functional change here. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/2b2200a9022296f520e26f61ed6aaa6eb34d466f.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 2 -- 1 file changed, 2 deletions(-) commit 70fda9e6da8635719ecbecc5987d4cb3180d0702 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:33:07 2024 +0000 usb: gadget: f_tcm: Execute command on write completion Don't just wait for the data write completion and execute the target command. We need to verify if the request completed successfully and not just sending invalid data. The verification is done in the write request completion routine. Queue the same work of the command to execute the target_execute_cmd() on data write. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/9f6b1c6946cf49eeba0173e405678b9b7786636b.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 39 +++++++++++++++++++++++++++++-------- drivers/usb/gadget/function/tcm.h | 4 +++- 2 files changed, 34 insertions(+), 9 deletions(-) commit 5cf091d59e575bcb6ed054bf1ad3caa7f0efca82 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:33:01 2024 +0000 usb: gadget: f_tcm: Return ATA cmd direction Check ATA Pass-Through for direction. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/c22215f7925581684a13eae9a14afb47fb60c061.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 2 ++ 1 file changed, 2 insertions(+) commit 9e0f5819bafcfba0dbfb910a72c3a2f23f501cb6 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:32:55 2024 +0000 usb: gadget: f_tcm: Use extra number of commands To properly respond to host sending more commands than the number of streams the device advertises, the device needs to be able to reject the command with a response. Allocate an extra request to handle 1 more command than the number of streams. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/256f2ec8f5e042ab692d9593144fa75f3d3ce94b.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/tcm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d2d759c9a5d64e3e315a4feda5e2b7a5061a34f Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:32:49 2024 +0000 usb: gadget: f_tcm: Handle multiple commands in parallel Resubmit command on completion to fetch more commands and service them in parallel. Increase the number of work in a queue. Each work will be for each command allowing them to be processed concurrently. Also, set them to be unbounded by cpu to improve performance. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/933cf7191b672bf4cfbea4df19af1b08dc1baca9.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit a570559a4f27f687c88eac5fc5c01c85c869698b Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:32:43 2024 +0000 usb: gadget: f_tcm: Allocate matching number of commands to streams We can handle multiple commands concurently. Each command services a stream id. At the moment, the driver will handle 32 outstanding streams, which is equivalent to 32 commands. Make sure to allocate a matching number of commands to the number of streams. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/2d806120dcc10c88fef21865b7bc1d2b6604fe42.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 107 ++++++++++++++++++------------------ drivers/usb/gadget/function/tcm.h | 10 +++- 2 files changed, 61 insertions(+), 56 deletions(-) commit 34579e98a4167572fa2d974d5926a8b5e5aa37f7 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:32:37 2024 +0000 usb: gadget: f_tcm: Don't set static stream_id Host can assign stream ID value greater than number of streams allocated. The tcm function needs to keep track of which stream is available to assign the stream ID. This patch doesn't track that, but at least it makes sure that there's no Oops if the host send tag with a value greater than the number of supported streams. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/d57b7dfd228199cef811206b1b83ec649f742752.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 1f0d96f5d1ad9d775b8ca2d493217c70c298f718 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:32:31 2024 +0000 usb: gadget: f_tcm: Get stream by sbitmap number We prepare same number of sbitmap as the number of streams. Use the returned sbitmap number as index to the selected stream for a usbg_cmd. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/169f67261162c16342bc8543db93c259b05ead0b.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 26 ++++++-------------------- drivers/usb/gadget/function/tcm.h | 1 - 2 files changed, 6 insertions(+), 21 deletions(-) commit 8840047985bbe3b49855f4e164ad92253d6f8136 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:32:25 2024 +0000 usb: gadget: f_tcm: Limit number of sessions Only allocate up to UASP_SS_EP_COMP_NUM_STREAMS number of session tags. We should not be using more than UASP_SS_EP_COMP_NUM_STREAMS of tags due to the number of commands limit we imposed. Each command uses a unique tag. Any more than that is unnecessary. By limiting it, we can detect an issue in our driver immediately should we run out of session tags. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/017016ffcab2f3c284d863fc42483b83dbd21b35.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/tcm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0c188cd8dc099e733381ed7b6a8f2d209933313 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:32:19 2024 +0000 usb: gadget: f_tcm: Increase bMaxBurst Currently the default bMaxBurst is 0. Set default bMaxBurst to 15 (i.e. 16 bursts) to Data IN and OUT endpoints to improve performance. It should be fine for a controller that supports less than 16 bursts. It should be able to negotiate properly with the host at packet level for the end of burst. If the controller can't handle a burst of 16, and high performance isn't important, the user can use BOT protocol from mass_storage gadget driver instead. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/9d6265db4d138e542f281988362bc4392b034d43.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e577ae94cd6317ddbc0ca9961c713e0621c107d1 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:32:13 2024 +0000 usb: gadget: f_tcm: Increase stream count Some old builds of Microsoft Windows 10 UASP class driver reject UASP device with stream count of 2^4. To keep compatibility with both Linux and Windows, let's increase the stream count to 2^5. Also, internal tests show that stream count of 2^5 increases performance slightly. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/23bf7f5cb04da691fd6ba0a77babee9ad3195f44.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/tcm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94d9bf671ae314cacc2d7bf96bd233b4abc7cede Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:32:07 2024 +0000 usb: gadget: f_tcm: Don't prepare BOT write request twice The duplicate kmalloc here is causing memory leak. The request preparation in bot_send_write_request is also done in usbg_prepare_w_request. Remove the duplicate work. Fixes: c52661d60f63 ("usb-gadget: Initial merge of target module for UASP + BOT") Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/f4f26c3d586cde0d46f8c3bcb4e8ae32311b650d.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 25224c1f07d31c261d04dfbc705a7a0f314a825d Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:32:01 2024 +0000 usb: gadget: f_tcm: ep_autoconfig with fullspeed endpoint Match usb endpoint using fullspeed endpoint descriptor to make sure the wMaxPacketSize for fullspeed descriptors is automatically configured. Fixes: c52661d60f63 ("usb-gadget: Initial merge of target module for UASP + BOT") Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/e4507bc824aed6e7c7f5a718392ab6a7c1480a7f.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) commit 3b997089903b909684114aca6f79d683e5c64a0e Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:31:55 2024 +0000 usb: gadget: f_tcm: Fix Get/SetInterface return value Check to make sure that the GetInterface and SetInterface are for valid interface. Return proper alternate setting number on GetInterface. Fixes: 0b8b1a1fede0 ("usb: gadget: f_tcm: Provide support to get alternate setting in tcm function") Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/ffd91b4640945ea4d3b4f4091cf1abbdbd9cf4fc.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 3b2a52e88ab0c9469eaadd4d4c8f57d072477820 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:31:48 2024 +0000 usb: gadget: f_tcm: Decrement command ref count on cleanup We submitted the command with TARGET_SCF_ACK_KREF, which requires acknowledgment of command completion. If the command fails, make sure to decrement the ref count. Fixes: cff834c16d23 ("usb-gadget/tcm: Convert to TARGET_SCF_ACK_KREF I/O krefs") Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/3c667b4d9c8b0b580346a69ff53616b6a74cfea2.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 1 + 1 file changed, 1 insertion(+) commit 98fa00fd3ae43b857b4976984a135483d89d9281 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:31:43 2024 +0000 usb: gadget: f_tcm: Translate error to sense When respond with check_condition error status, clear from_transport input so the target layer can translate the sense reason reported by f_tcm. Fixes: c52661d60f63 ("usb-gadget: Initial merge of target module for UASP + BOT") Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/b2a5577efe7abd0af0051229622cf7d3be5cdcd0.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c225d006a31949d673e646d585d9569bc28feeb9 Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Date: Wed Dec 11 00:31:36 2024 +0000 usb: gadget: f_tcm: Don't free command immediately Don't prematurely free the command. Wait for the status completion of the sense status. It can be freed then. Otherwise we will double-free the command. Fixes: cff834c16d23 ("usb-gadget/tcm: Convert to TARGET_SCF_ACK_KREF I/O krefs") Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/ae919ac431f16275e05ec819bdffb3ac5f44cbe1.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 2 -- 1 file changed, 2 deletions(-) commit 1aede069816747609d45f02947440a8ad0c3490f Author: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Date: Fri Dec 13 15:35:49 2024 -0800 platform/chrome: cros_ec_typec: Disable tbt on port Altmodes with cros_ec are either automatically entered by the EC or entered by the AP if TBT or USB4 are supported on the system. Due to the security risk of PCIe tunneling, TBT modes should not be auto entered by the kernel at this time and will require user intervention. With this change, a userspace program will need to explicitly activate the thunderbolt mode on the port and partner in order to enter the mode and the thunderbolt driver will not automatically enter when a partner is connected. Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Link: https://lore.kernel.org/r/20241213153543.v5.8.Ic14738918e3d026fa2d85e95fb68f8e07a0828d0@changeid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/platform/chrome/cros_ec_typec.c | 1 + 1 file changed, 1 insertion(+) commit 3b00be26b16ad72c85624ada08cbae2d2c57b6e9 Author: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Date: Fri Dec 13 15:35:48 2024 -0800 platform/chrome: cros_ec_typec: Thunderbolt support Add support for entering and exiting Thunderbolt alt-mode using AP driven alt-mode. Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Link: https://lore.kernel.org/r/20241213153543.v5.7.Ic61ced3cdfb5d6776435356061f12307da719829@changeid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/platform/chrome/Kconfig | 1 + drivers/platform/chrome/cros_ec_typec.c | 23 ++++---- drivers/platform/chrome/cros_typec_altmode.c | 88 ++++++++++++++++++++++++++++ drivers/platform/chrome/cros_typec_altmode.h | 14 +++++ 4 files changed, 115 insertions(+), 11 deletions(-) commit dbb3fc0ffa95788e00e50ffc6501eb0085d48231 Author: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Date: Fri Dec 13 15:35:47 2024 -0800 platform/chrome: cros_ec_typec: Displayport support Add support for entering and exiting displayport alt-mode on systems using AP driven alt-mode. Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Link: https://lore.kernel.org/r/20241213153543.v5.6.I142fc0c09df58689b98f0cebf1c5e48b9d4fa800@changeid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 3 + drivers/platform/chrome/Kconfig | 6 + drivers/platform/chrome/Makefile | 4 + drivers/platform/chrome/cros_ec_typec.c | 13 +- drivers/platform/chrome/cros_ec_typec.h | 1 + drivers/platform/chrome/cros_typec_altmode.c | 285 +++++++++++++++++++++++++++ drivers/platform/chrome/cros_typec_altmode.h | 37 ++++ 7 files changed, 346 insertions(+), 3 deletions(-) commit 5b2f3305a92f3864f07bd67bad7fcc8f0c7adaba Author: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Date: Fri Dec 13 15:35:46 2024 -0800 platform/chrome: cros_ec_typec: Update partner altmode active Mux configuration is often the final piece of mode entry and can be used to determine whether a partner altmode is active. When mux configuration is done, use the active port altmode's SVID to set the partner active field for all partner alt modes. Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Link: https://lore.kernel.org/r/20241213153543.v5.5.I083bf9188947be8cb7460211cfdf3233370a28f6@changeid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/platform/chrome/cros_ec_typec.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5399a1bac6a8f67eb180ac900641c1836cc3c0dd Author: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Date: Fri Dec 13 15:35:45 2024 -0800 usb: typec: Print err when displayport fails to enter Print the error reason for typec_altmode_enter so users can understand why displayport failed to enter. Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Benson Leung <bleung@chromium.org> Link: https://lore.kernel.org/r/20241213153543.v5.4.I6cff9d767b0f8ab6458d8940941e42c920902d49@changeid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/altmodes/displayport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 183b194d8fb62694e81c18e1faec9ad418f952e3 Author: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Date: Fri Dec 13 15:35:44 2024 -0800 usb: typec: Make active on port altmode writable The active property of port altmode should be writable (to prevent or allow partner altmodes from entering) and needs to be part of typec_altmode_desc so we can initialize the port to an inactive state if desired. Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Benson Leung <bleung@chromium.org> Link: https://lore.kernel.org/r/20241213153543.v5.3.I794566684ab2965e209f326b08232006eff333f8@changeid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/class.c | 5 +++-- include/linux/usb/typec.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) commit 100e257386595b3f1865ca8a991e2ba74f9701ff Author: Heikki Krogerus <heikki.krogerus@linux.intel.com> Date: Fri Dec 13 15:35:43 2024 -0800 usb: typec: Add driver for Thunderbolt 3 Alternate Mode Thunderbolt 3 Alternate Mode entry flow is described in USB Type-C Specification Release 2.0. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Co-developed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Link: https://lore.kernel.org/r/20241213153543.v5.2.I3080b036e8de0b9957c57c1c3059db7149c5e549@changeid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/altmodes/Kconfig | 9 + drivers/usb/typec/altmodes/Makefile | 2 + drivers/usb/typec/altmodes/thunderbolt.c | 388 +++++++++++++++++++++++++++++++ include/linux/usb/typec_tbt.h | 1 + 4 files changed, 400 insertions(+) commit 8541bf0239b8509ecc1192b2e26768a36fd9c944 Author: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Date: Fri Dec 13 15:35:42 2024 -0800 usb: typec: Only use SVID for matching altmodes Mode in struct typec_altmode is used to indicate the index of the altmode on a port, partner or plug. It is used in enter mode VDMs but doesn't make much sense for matching against altmode drivers or for matching partner to port altmodes. Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Benson Leung <bleung@chromium.org> Link: https://lore.kernel.org/r/20241213153543.v5.1.Ie0d37646f18461234777d88b4c3e21faed92ed4f@changeid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/altmodes/displayport.c | 2 +- drivers/usb/typec/altmodes/nvidia.c | 2 +- drivers/usb/typec/bus.c | 6 ++---- drivers/usb/typec/class.c | 4 ++-- scripts/mod/devicetable-offsets.c | 1 - scripts/mod/file2alias.c | 9 ++------- 6 files changed, 8 insertions(+), 16 deletions(-) commit 1ff24d40b3c3c673d833c546f898133b80dffc39 Author: Roy Luo <royluo@google.com> Date: Mon Dec 23 04:25:36 2024 +0000 usb: dwc3: gadget: Fix incorrect UDC state after manual deconfiguration The UDC state in sysfs (/sys/class/udc/<udc>/state) should accurately reflect the current state of the USB Device Controller. Currently, the UDC state is not handled consistently during gadget disconnection. While the disconnect interrupt path correctly sets the state to "not-attached", manual deconfiguration leaves the state in "configured", misrepresenting the actual situation. This commit ensures consistent UDC state handling by setting the state to "not-attached" after manual deconfiguration. This accurately reflects the UDC's state and provides a consistent behavior regardless of the disconnection method. Signed-off-by: Roy Luo <royluo@google.com> Reviewed-by: André Draszik <andre.draszik@linaro.org> Tested-by: André Draszik <andre.draszik@linaro.org> Link: https://lore.kernel.org/r/20241223042536.1465299-1-royluo@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/dwc3/gadget.c | 2 ++ 1 file changed, 2 insertions(+) commit 997a6e146d5fdb9d92186a09e7ad6463679fe271 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 22 21:13:48 2024 +0100 usbip: vudc: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241222-sysfs-const-bin_attr-usbip-v1-1-20d611a9bfa4@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/usbip/vudc_sysfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit aa13b9d5ae2597a08703cf9aa4b0907d09407888 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 22 21:12:13 2024 +0100 usb: core: sysfs: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241222-sysfs-const-bin_attr-usb-v1-1-19a137c0f20a@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/core/sysfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ca5d736b74cacbfd7adf1d792e4ad5b97c6c56c8 Author: Jason Long <jasonlongball@gmail.com> Date: Wed Dec 18 11:13:44 2024 -0500 usbip: Accept arbitrarily long scatter-gather list Fixes issue where memory will fail to be allocated for larger bulk transfers, ~1 MB or more. This occurs because userland libraries, such as libusb, send the entire USB data buffer when SG support is detected. The assumption is that the driver knows how to properly split the data up before sending it out. By hardcoding a limit, bigger transfers that exceed the SG tablesize limit of 32 will be unable to use SG. This results in an attempt to allocate contiguous pages which, unsurprisingly, will fail too and returns an ENOMEM. It looks like other drivers that support SG allow for any length of SG lists. Accepting any SG size allows the driver to properly handle large bulk transfer situations. Tested bulk read and write operations using the following devices: - Logitech Webcam Pro 9000 - USB 2.0 - SanDisk Ultra - USB 3.0 - Logitech M500s Mouse Signed-off-by: Jason Long <jasonlongball@gmail.com> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://lore.kernel.org/r/20241218161344.202637-1-jasonlongball@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/usbip/vhci_hcd.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 8cda395b79d90709fde3a9963c667d849cc5718f Author: Amit Sunil Dhamne <amitsd@google.com> Date: Tue Dec 10 19:07:09 2024 -0800 usb: typec: tcpm: Add new AMS for Get_Revision response This commit adds a new AMS for responding to a "Get_Revision" request. Revision message consists of the following fields: +----------------------------------------------------+ | Header | RMDO | | No. of data objects = 1 | | +----------------------------------------------------+ While RMDO consists of: * B31..28 Revision Major * B27..24 Revision Minor * B23..20 Version Major * B19..16 Version Minor * B15..0 Reserved, shall be set to zero. As per the PD spec ("8.3.3.16.2.1 PR_Give_Revision State"), a request is only expected when an explicit contract is established and the port is in ready state. This AMS is only supported for PD >= 3.0. Signed-off-by: Amit Sunil Dhamne <amitsd@google.com> Reviewed-by: Badhri Jagan Sridharan <badhri@google.com> Link: https://lore.kernel.org/r/20241210-get_rev_upstream-v2-3-d0094e52d48f@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/tcpm/tcpm.c | 41 ++++++++++++++++++++++++++++++++++++++++- include/linux/usb/pd.h | 22 ++++++++++++++++++++-- 2 files changed, 60 insertions(+), 3 deletions(-) commit 8ecf60c3b3d4599d2e643bc88c303376a404ad13 Author: Amit Sunil Dhamne <amitsd@google.com> Date: Tue Dec 10 19:07:08 2024 -0800 usb: typec: tcpm: Add support for parsing pd-revision DT property Add support for parsing "pd-revision" DT property in TCPM and store PD revision and version supported by the Type-C connnector. It should be noted that the PD revision is the maximum possible revision supported by the port. This is different from the 2 bit revision set in PD msg headers. The purpose of the 2 bit revision value is to negotiate between Rev 2.X & 3.X spec rev as part of contract negotiation, while this is used for Get_Revision AMS after a contract is in place. Signed-off-by: Amit Sunil Dhamne <amitsd@google.com> Reviewed-by: Badhri Jagan Sridharan <badhri@google.com> Link: https://lore.kernel.org/r/20241210-get_rev_upstream-v2-2-d0094e52d48f@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/tcpm/tcpm.c | 46 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) commit 1ed739929c914fa1f1a16c8f2e76814e9812e1b0 Author: Amit Sunil Dhamne <amitsd@google.com> Date: Tue Dec 10 19:07:07 2024 -0800 dt-bindings: connector: Add pd-revision property Add pd-revision property definition, to specify the maximum Power Delivery Revision and Version supported by the connector. Signed-off-by: Amit Sunil Dhamne <amitsd@google.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241210-get_rev_upstream-v2-1-d0094e52d48f@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/devicetree/bindings/connector/usb-connector.yaml | 7 +++++++ Documentation/devicetree/bindings/usb/maxim,max33359.yaml | 1 + 2 files changed, 8 insertions(+) commit 6fdc943251865979c995798b6b246ffa8381f2dc Author: Oliver Facklam <oliver.facklam@zuehlke.com> Date: Wed Dec 11 17:32:47 2024 +0100 usb: typec: hd3ss3220: support configuring role preference based on fwnode property and typec_operation The TI HD3SS3220 Type-C controller supports configuring its role preference when operating as a dual-role port through the SOURCE_PREF field of the General Control Register. The previous driver behavior was to set the role preference based on the dr_set typec_operation. However, the controller does not support swapping the data role on an active connection due to its lack of Power Delivery support. Remove previous dr_set typec_operation, and support setting the role preference based on the corresponding fwnode property, as well as the try_role typec_operation. Signed-off-by: Oliver Facklam <oliver.facklam@zuehlke.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20241211-usb-typec-controller-enhancements-v3-3-e4bc1b6e1441@zuehlke.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/hd3ss3220.c | 72 ++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 25 deletions(-) commit 5d2c32d506d89a4f657b44b74c61b8f74ba1a23a Author: Oliver Facklam <oliver.facklam@zuehlke.com> Date: Wed Dec 11 17:32:46 2024 +0100 usb: typec: hd3ss3220: support configuring port type The TI HD3SS3220 Type-C controller supports configuring the port type it will operate as through the MODE_SELECT field of the General Control Register. Configure the port type based on the fwnode property "power-role" during probe, if present. If the property is absent, leave the operation mode at the default, which is defined by the PORT pin of the chip. Support configuring the port type through the port_type_set typec_operation as well. The MODE_SELECT field can only be changed when the controller is in unattached state, so follow the sequence recommended by the datasheet to: 1. disable termination on CC pins to disable the controller 2. change the mode 3. re-enable termination This will effectively cause a connected device to disconnect for the duration of the mode change. Signed-off-by: Oliver Facklam <oliver.facklam@zuehlke.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20241211-usb-typec-controller-enhancements-v3-2-e4bc1b6e1441@zuehlke.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/hd3ss3220.c | 88 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) commit 14ba185d2f3e806d7e28c6cf9fbbbccddfdd608e Author: Oliver Facklam <oliver.facklam@zuehlke.com> Date: Wed Dec 11 17:32:45 2024 +0100 usb: typec: hd3ss3220: configure advertised power opmode based on fwnode property The TI HD3SS3220 Type-C controller supports configuring its advertised power operation mode over I2C using the CURRENT_MODE_ADVERTISE field of the Connection Status Register. Configure this power mode based on the existing (optional) property "typec-power-opmode" of /schemas/connector/usb-connector.yaml Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Oliver Facklam <oliver.facklam@zuehlke.com> Link: https://lore.kernel.org/r/20241211-usb-typec-controller-enhancements-v3-1-e4bc1b6e1441@zuehlke.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/hd3ss3220.c | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit 485ff9860801440ed7b87cc2de87270de72e73eb Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Thu Dec 12 14:08:25 2024 +0100 arm64: dts: qcom: x1e80100-qcp: Enable external DP support Now that the FSUSB42 USB switches are described, enable support for DP on the three USB-C ports of the X1E80100 QCP. It supports up to 4 lanes, but for now we need to limit this to 2 lanes due to limitations in the USB/DP combo PHY driver. The same limitation also exists on other boards upstream. Co-developed-by: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241212-x1e80100-qcp-dp-v1-3-37cb362a0dfe@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 42943457e49d69ac6945d5918fc5b8b4d116661d Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Thu Dec 12 14:08:24 2024 +0100 arm64: dts: qcom: x1e80100-qcp: Add FSUSB42 USB switches Unlike most X1E boards, the QCP does not have Parade PS8830 retimers on the three USB-C ports. Instead, there are FSUSB42 USB switches for each port that handle orientation switching for the SBU lines. The overall setup is similar to the gpio-sbu-mux defined for sc8280xp-crd and the ThinkPad X13s. Co-developed-by: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241212-x1e80100-qcp-dp-v1-2-37cb362a0dfe@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 154 ++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) commit d21bbeee523e3c0d585c7a6b860045a9a859c86c Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Thu Dec 12 14:08:23 2024 +0100 dt-bindings: usb: gpio-sbu-mux: Add an entry for FSUSB42 Add a compatible entry for the onsemi FSUSB42 USB switch, which can be used for switching orientation of the SBU lines in USB Type-C applications. Drivers work as-is with the existing fallback compatible. Link to datasheet: https://www.onsemi.com/pdf/datasheet/fsusb42-d.pdf Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241212-x1e80100-qcp-dp-v1-1-37cb362a0dfe@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml | 1 + 1 file changed, 1 insertion(+) commit 21d8dd0daf4cf4627a0c4b813e0f91bcda67598a Author: Dmitry Torokhov <dmitry.torokhov@gmail.com> Date: Wed Nov 6 23:15:35 2024 -0800 Input: use guard notation in input core Switch input core to use "guard" notation when acquiring spinlocks and mutexes to simplify the code and ensure that locks are automatically released when control leaves critical section. Link: https://lore.kernel.org/r/20241107071538.195340-9-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/input.c | 339 +++++++++++++++++++------------------------------- 1 file changed, 131 insertions(+), 208 deletions(-) commit f951e94247e2e0cce9b28526b7e25ad95785e8c1 Author: Dmitry Torokhov <dmitry.torokhov@gmail.com> Date: Wed Nov 6 23:15:34 2024 -0800 Input: poller - convert locking to guard notation Use guard() notation instead of explicitly acquiring and releasing mutex to simplify the code and ensure that it is released. Link: https://lore.kernel.org/r/20241107071538.195340-8-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/input-poller.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5bb6e29a2a5a01d916052fbc5398ed8c2c5377f0 Author: Dmitry Torokhov <dmitry.torokhov@gmail.com> Date: Wed Nov 6 23:15:33 2024 -0800 Input: mt - make use of __free() cleanup facility Annotate allocated memory with __free(kfree) to simplify the code and make sure memory is released appropriately. Link: https://lore.kernel.org/r/20241107071538.195340-7-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/input-mt.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 4e3929ce6cc13b50e3975e8b243d2fcb17b63c64 Author: Dmitry Torokhov <dmitry.torokhov@gmail.com> Date: Wed Nov 6 23:15:32 2024 -0800 Input: mt - convert locking to guard notation Use guard() notation instead of explicitly acquiring and releasing spinlocks to simplify the code and ensure that all locks are released. Link: https://lore.kernel.org/r/20241107071538.195340-6-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/input-mt.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 96173d61028736464b305da7bd6b9fb1b8e85d02 Author: Dmitry Torokhov <dmitry.torokhov@gmail.com> Date: Wed Nov 6 23:15:31 2024 -0800 Input: ff-memless - make use of __free() cleanup facility Annotate allocated memory with __free(kfree) to simplify the code and make sure memory is released appropriately. Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/r/20241107071538.195340-5-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/ff-memless.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit cec6b33a6786e3ecad4b1d4bb7843d122ffa1912 Author: Dmitry Torokhov <dmitry.torokhov@gmail.com> Date: Wed Nov 6 23:15:30 2024 -0800 Input: ff-memless - convert locking to guard notation Use guard() notation instead of explicitly acquiring and releasing spinlocks to simplify the code and ensure that all locks are released. Link: https://lore.kernel.org/r/20241107071538.195340-4-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/ff-memless.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 19c8d0ef1e93d96a2552893df7468a1ff1cd963f Author: Dmitry Torokhov <dmitry.torokhov@gmail.com> Date: Wed Nov 6 23:15:29 2024 -0800 Input: ff-core - make use of __free() cleanup facility Annotate allocated memory with __free(kfree) to simplify the code and make sure memory is released appropriately. Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/r/20241107071538.195340-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/ff-core.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 3a7a4bebe0dbe22686da7de573f183e0c842883a Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 20 03:28:36 2024 +0200 drm/msm/dpu: link DSPP_2/_3 blocks on X1E80100 Link DSPP_2 to the LM_2 and DSPP_3 to the LM_3 mixer blocks. This allows using colour transformation matrix (aka night mode) with more outputs at the same time. Fixes: e3b1f369db5a ("drm/msm/dpu: Add X1E80100 support") Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629966/ Link: https://lore.kernel.org/r/20241220-dpu-fix-catalog-v2-8-38fa961ea992@linaro.org drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h | 2 ++ 1 file changed, 2 insertions(+) commit 3d3ca0915aa3692a837f7235ca9d12db26f09911 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 20 03:28:35 2024 +0200 drm/msm/dpu: link DSPP_2/_3 blocks on SM8650 Link DSPP_2 to the LM_2 and DSPP_3 to the LM_3 mixer blocks. This allows using colour transformation matrix (aka night mode) with more outputs at the same time. Fixes: b94747f7d8c7 ("drm/msm/dpu: add support for SM8650 DPU") Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629962/ Link: https://lore.kernel.org/r/20241220-dpu-fix-catalog-v2-7-38fa961ea992@linaro.org drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 2 ++ 1 file changed, 2 insertions(+) commit e21f9d85b05361bc343b11ecf84ac12c9cccbc3e Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 20 03:28:34 2024 +0200 drm/msm/dpu: link DSPP_2/_3 blocks on SM8550 Link DSPP_2 to the LM_2 and DSPP_3 to the LM_3 mixer blocks. This allows using colour transformation matrix (aka night mode) with more outputs at the same time. Fixes: efcd0107727c ("drm/msm/dpu: add support for SM8550") Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629961/ Link: https://lore.kernel.org/r/20241220-dpu-fix-catalog-v2-6-38fa961ea992@linaro.org drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 2 ++ 1 file changed, 2 insertions(+) commit 42323d3c9e04c725d27606c31663b80a7cc30218 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 20 03:28:33 2024 +0200 drm/msm/dpu: link DSPP_2/_3 blocks on SM8350 Link DSPP_2 to the LM_2 and DSPP_3 to the LM_3 mixer blocks. This allows using colour transformation matrix (aka night mode) with more outputs at the same time. Fixes: 0e91bcbb0016 ("drm/msm/dpu: Add SM8350 to hw catalog") Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629959/ Link: https://lore.kernel.org/r/20241220-dpu-fix-catalog-v2-5-38fa961ea992@linaro.org drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 2 ++ 1 file changed, 2 insertions(+) commit 8252028092f86d413b3a83e5e76a9615073a0c7f Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 20 03:28:32 2024 +0200 drm/msm/dpu: link DSPP_2/_3 blocks on SM8250 Link DSPP_2 to the LM_2 and DSPP_3 to the LM_3 mixer blocks. This allows using colour transformation matrix (aka night mode) with more outputs at the same time. Fixes: 05ae91d960fd ("drm/msm/dpu: enable DSPP support on SM8[12]50") Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629956/ Link: https://lore.kernel.org/r/20241220-dpu-fix-catalog-v2-4-38fa961ea992@linaro.org drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 2 ++ 1 file changed, 2 insertions(+) commit 0986163245df6bece47113e506143a7e87b0097d Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 20 03:28:31 2024 +0200 drm/msm/dpu: link DSPP_2/_3 blocks on SC8180X Link DSPP_2 to the LM_2 and DSPP_3 to the LM_3 mixer blocks. This allows using colour transformation matrix (aka night mode) with more outputs at the same time. Fixes: f5abecfe339e ("drm/msm/dpu: enable DSPP and DSC on sc8180x") Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629954/ Link: https://lore.kernel.org/r/20241220-dpu-fix-catalog-v2-3-38fa961ea992@linaro.org drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 2 ++ 1 file changed, 2 insertions(+) commit ac440a31e523805939215b24d2f0c451b48d5891 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 20 03:28:30 2024 +0200 drm/msm/dpu: link DSPP_2/_3 blocks on SM8150 Link DSPP_2 to the LM_2 and DSPP_3 to the LM_3 mixer blocks. This allows using colour transformation matrix (aka night mode) with more outputs at the same time. Fixes: 05ae91d960fd ("drm/msm/dpu: enable DSPP support on SM8[12]50") Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629952/ Link: https://lore.kernel.org/r/20241220-dpu-fix-catalog-v2-2-38fa961ea992@linaro.org drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 2 ++ 1 file changed, 2 insertions(+) commit 9a20f33495bfd45ca6712213f30697f686d0b6fd Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 20 03:28:29 2024 +0200 drm/msm/dpu: provide DSPP and correct LM config for SDM670 On SDM670 the DPU has two DSPP blocks compared to 4 DSPP blocks on SDM845. Currently SDM670 just reuses LMs and DSPPs from SDM845. Define platform-specific configuration for those blocks. Fixes: e140b7e496b7 ("drm/msm/dpu: Add hw revision 4.1 (SDM670)") Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629951/ Link: https://lore.kernel.org/r/20241220-dpu-fix-catalog-v2-1-38fa961ea992@linaro.org .../gpu/drm/msm/disp/dpu1/catalog/dpu_4_1_sdm670.h | 54 +++++++++++++++++++++- 1 file changed, 52 insertions(+), 2 deletions(-) commit af6cc45af3db12f452bfdc9a515da54b56412756 Author: Ethan Carter Edwards <ethan@ethancedwards.com> Date: Mon Dec 23 14:41:24 2024 +0000 cpufreq: sparc: change kzalloc to kcalloc Refactor to use kcalloc instead of kzalloc when multiplying allocation size by count. This refactor prevents unintentional memory overflows. Discovered by checkpatch.pl. Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/cpufreq/sparc-us2e-cpufreq.c | 2 +- drivers/cpufreq/sparc-us3-cpufreq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit fba0f039affdd0c8767f24e41d5dbef49addea78 Author: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Date: Fri Dec 20 09:19:19 2024 -0800 xe/oa: Drop the unused logic to parse context image Now that all register configurations are using MI_LOAD_REGISTER_IMM, drop the logic to parse context image for offset. v2: Remove unused lrc headers (Ashutosh) Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241220171919.571528-3-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/xe/xe_oa.c | 88 ---------------------------------------- drivers/gpu/drm/xe/xe_oa_types.h | 3 -- 2 files changed, 91 deletions(-) commit 55039832f98c7e05f1cf9e0d8c12b2490abd0f16 Author: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Date: Fri Dec 20 09:19:18 2024 -0800 xe/oa: Fix query mode of operation for OAR/OAC This is a set of squashed commits to facilitate smooth applying to stable. Each commit message is retained for reference. 1) Allow a GGTT mapped batch to be submitted to user exec queue For a OA use case, one of the HW registers needs to be modified by submitting an MI_LOAD_REGISTER_IMM command to the users exec queue, so that the register is modified in the user's hardware context. In order to do this a batch that is mapped in GGTT, needs to be submitted to the user exec queue. Since all user submissions use q->vm and hence PPGTT, add some plumbing to enable submission of batches mapped in GGTT. v2: ggtt is zero-initialized, so no need to set it false (Matt Brost) 2) xe/oa: Use MI_LOAD_REGISTER_IMMEDIATE to enable OAR/OAC To enable OAR/OAC, a bit in RING_CONTEXT_CONTROL needs to be set. Setting this bit cause the context image size to change and if not done correct, can cause undesired hangs. Current code uses a separate exec_queue to modify this bit and is error-prone. As per HW recommendation, submit MI_LOAD_REGISTER_IMM to the target hardware context to modify the relevant bit. In v2 version, an attempt to submit everything to the user-queue was made, but it failed the unprivileged-single-ctx-counters test. It appears that the OACTXCONTROL must be modified from a remote context. In v3 version, all context specific register configurations were moved to use LOAD_REGISTER_IMMEDIATE and that seems to work well. This is a cleaner way, since we can now submit all configuration to user exec_queue and the fence handling is simplified. v2: (Matt) - set job->ggtt to true if create job is successful - unlock vm on job error (Ashutosh) - don't wait on job submission - use kernel exec queue where possible v3: (Ashutosh) - Fix checkpatch issues - Remove extra spaces/new-lines - Add Fixes: and Cc: tags - Reset context control bit when OA stream is closed - Submit all config via MI_LOAD_REGISTER_IMMEDIATE (Umesh) - Update commit message for v3 experiment - Squash patches for easier port to stable v4: (Ashutosh) - No need to pass q to xe_oa_submit_bb - Do not support exec queues with width > 1 - Fix disabling of CTX_CTRL_OAC_CONTEXT_ENABLE v5: (Ashutosh) - Drop reg_lri related comments - Use XE_OA_SUBMIT_NO_DEPS in xe_oa_load_with_lri Fixes: 8135f1c09dd2 ("drm/xe/oa: Don't reset OAC_CONTEXT_ENABLE on OA stream close") Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> # commit 1 Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Cc: stable@vger.kernel.org Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241220171919.571528-2-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/xe/xe_oa.c | 136 +++++++++++--------------------- drivers/gpu/drm/xe/xe_ring_ops.c | 5 +- drivers/gpu/drm/xe/xe_sched_job_types.h | 2 + 3 files changed, 51 insertions(+), 92 deletions(-) commit d576aec24df9f58ed0ebe2ff854daafe837f0225 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Tue Dec 10 11:08:57 2024 +0900 fgraph: Get ftrace recursion lock in function_graph_enter Get the ftrace recursion lock in the generic function_graph_enter() instead of each architecture code. This changes all function_graph tracer callbacks running in non-preemptive state. On x86 and powerpc, this is by default, but on the other architecutres, this will be new. Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Naveen N Rao <naveen@kernel.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: x86@kernel.org Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/173379653720.973433.18438622234884980494.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> arch/powerpc/kernel/trace/ftrace.c | 6 ------ arch/powerpc/kernel/trace/ftrace_64_pg.c | 6 ------ arch/x86/kernel/ftrace.c | 7 ------- kernel/trace/fgraph.c | 8 +++++++- 4 files changed, 7 insertions(+), 20 deletions(-) commit 1d95fd9d6b1a1750da2dec1485a4c58f5a7d3ebd Author: Steven Rostedt <rostedt@goodmis.org> Date: Mon Dec 23 13:46:22 2024 -0500 ftrace: Switch ftrace.c code over to use guard() There are a few functions in ftrace.c that have "goto out" or equivalent on error in order to release locks that were taken. This can be error prone or just simply make the code more complex. Switch every location that ends with unlocking a mutex on error over to using the guard(mutex)() infrastructure to let the compiler worry about releasing locks. This makes the code easier to read and understand. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Link: https://lore.kernel.org/20241223184941.718001540@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/ftrace.c | 97 ++++++++++++++++++--------------------------------- 1 file changed, 34 insertions(+), 63 deletions(-) commit 77e53cb2fcf2c5e81f06f4a41783d8752cf9d038 Author: Steven Rostedt <rostedt@goodmis.org> Date: Mon Dec 23 13:46:21 2024 -0500 ftrace: Remove unneeded goto jumps There are some goto jumps to exit a program to just return a value. The code after the label doesn't free anything nor does it do any unlocks. It simply returns the variable that was set before the jump. Remove these unneeded goto jumps. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Link: https://lore.kernel.org/20241223184941.544855549@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/ftrace.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit f8a2397baf041a5cee408b082334bb09c7e161df Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 10 16:16:50 2024 +0200 drm/bridge: dw-hdmi-qp: drop atomic_check() callback As drm_bridge_connector now provides atomic_check() implementation which calls drm_atomic_helper_connector_hdmi_check(), drop the duplicating callback from the bridge driver. Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241210-bridge_hdmi_check-v1-4-a8fdd8c5afa5@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 15b8f5a297f793f859ed2104755ebcf29384e26b Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 10 16:16:49 2024 +0200 drm/bridge: lontium-lt9611: drop atomic_check() callback As drm_bridge_connector now provides atomic_check() implementation which calls drm_atomic_helper_connector_hdmi_check(), drop the duplicating callback from the bridge driver. Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241210-bridge_hdmi_check-v1-3-a8fdd8c5afa5@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/bridge/lontium-lt9611.c | 10 ---------- 1 file changed, 10 deletions(-) commit 487d1ed989e5ec418b45b9294e8cceefe29ce4fa Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 10 16:16:48 2024 +0200 drm/bridge: ite-it6263: drop atomic_check() callback As drm_bridge_connector now provides atomic_check() implementation which calls drm_atomic_helper_connector_hdmi_check(), drop the duplicating callback from the bridge driver. Reviewed-by: Liu Ying <victor.liu@nxp.com> Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241210-bridge_hdmi_check-v1-2-a8fdd8c5afa5@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/bridge/ite-it6263.c | 10 ---------- 1 file changed, 10 deletions(-) commit 8ec116ff21a97918d187491dc8f90d7eb173dc1d Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Dec 10 16:16:47 2024 +0200 drm/display: bridge_connector: provide atomic_check for HDMI bridges The bridges using HDMI connector framework have a call to drm_atomic_helper_connector_hdmi_check() in their atomic_check() callback. In order to reduce boilerplate and make simplify bridge's code, use drm_atomic_helper_connector_hdmi_check() to implement drm_connector.atomic_check() for HDMI bridges. Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241210-bridge_hdmi_check-v1-1-a8fdd8c5afa5@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/display/drm_bridge_connector.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit ac8c3b02fc33be9deda48532326d301333d39f16 Author: Steven Rostedt <rostedt@goodmis.org> Date: Mon Dec 23 13:46:20 2024 -0500 ftrace: Do not disable interrupts in profiler The function profiler disables interrupts before processing. This was there since the profiler was introduced back in 2009 when there were recursion issues to deal with. The function tracer is much more robust today and has its own internal recursion protection. There's no reason to disable interrupts in the function profiler. Instead, just disable preemption and use the guard() infrastructure while at it. Before this change: ~# echo 1 > /sys/kernel/tracing/function_profile_enabled ~# perf stat -r 10 ./hackbench 10 Time: 3.099 Time: 2.556 Time: 2.500 Time: 2.705 Time: 2.985 Time: 2.959 Time: 2.859 Time: 2.621 Time: 2.742 Time: 2.631 Performance counter stats for '/work/c/hackbench 10' (10 runs): 23,156.77 msec task-clock # 6.951 CPUs utilized ( +- 2.36% ) 18,306 context-switches # 790.525 /sec ( +- 5.95% ) 495 cpu-migrations # 21.376 /sec ( +- 8.61% ) 11,522 page-faults # 497.565 /sec ( +- 1.80% ) 47,967,124,606 cycles # 2.071 GHz ( +- 0.41% ) 80,009,078,371 instructions # 1.67 insn per cycle ( +- 0.34% ) 16,389,249,798 branches # 707.752 M/sec ( +- 0.36% ) 139,943,109 branch-misses # 0.85% of all branches ( +- 0.61% ) 3.332 +- 0.101 seconds time elapsed ( +- 3.04% ) After this change: ~# echo 1 > /sys/kernel/tracing/function_profile_enabled ~# perf stat -r 10 ./hackbench 10 Time: 1.869 Time: 1.428 Time: 1.575 Time: 1.569 Time: 1.685 Time: 1.511 Time: 1.611 Time: 1.672 Time: 1.724 Time: 1.715 Performance counter stats for '/work/c/hackbench 10' (10 runs): 13,578.21 msec task-clock # 6.931 CPUs utilized ( +- 2.23% ) 12,736 context-switches # 937.973 /sec ( +- 3.86% ) 341 cpu-migrations # 25.114 /sec ( +- 5.27% ) 11,378 page-faults # 837.960 /sec ( +- 1.74% ) 27,638,039,036 cycles # 2.035 GHz ( +- 0.27% ) 45,107,762,498 instructions # 1.63 insn per cycle ( +- 0.23% ) 8,623,868,018 branches # 635.125 M/sec ( +- 0.27% ) 125,738,443 branch-misses # 1.46% of all branches ( +- 0.32% ) 1.9590 +- 0.0484 seconds time elapsed ( +- 2.47% ) Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Link: https://lore.kernel.org/20241223184941.373853944@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/ftrace.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 7d137e604aaacf2723ced2fca0b46b3f563e1d5e Author: Steven Rostedt <rostedt@goodmis.org> Date: Mon Dec 23 13:46:19 2024 -0500 fgraph: Remove unnecessary disabling of interrupts and recursion The function graph tracer disables interrupts as well as prevents recursion via NMIs when recording the graph tracer code. There's no reason to do this today. That disabling goes back to 2008 when the function graph tracer was first introduced and recursion protection wasn't part of the code. Today, there's no reason to disable interrupts or prevent the code from recursing as the infrastructure can easily handle it. Before this change: ~# echo function_graph > /sys/kernel/tracing/current_tracer ~# perf stat -r 10 ./hackbench 10 Time: 4.240 Time: 4.236 Time: 4.106 Time: 4.014 Time: 4.314 Time: 3.830 Time: 4.063 Time: 4.323 Time: 3.763 Time: 3.727 Performance counter stats for '/work/c/hackbench 10' (10 runs): 33,937.20 msec task-clock # 7.008 CPUs utilized ( +- 1.85% ) 18,220 context-switches # 536.874 /sec ( +- 6.41% ) 624 cpu-migrations # 18.387 /sec ( +- 9.07% ) 11,319 page-faults # 333.528 /sec ( +- 1.97% ) 76,657,643,617 cycles # 2.259 GHz ( +- 0.40% ) 141,403,302,768 instructions # 1.84 insn per cycle ( +- 0.37% ) 25,518,463,888 branches # 751.932 M/sec ( +- 0.35% ) 156,151,050 branch-misses # 0.61% of all branches ( +- 0.63% ) 4.8423 +- 0.0892 seconds time elapsed ( +- 1.84% ) After this change: ~# echo function_graph > /sys/kernel/tracing/current_tracer ~# perf stat -r 10 ./hackbench 10 Time: 3.340 Time: 3.192 Time: 3.129 Time: 2.579 Time: 2.589 Time: 2.798 Time: 2.791 Time: 2.955 Time: 3.044 Time: 3.065 Performance counter stats for './hackbench 10' (10 runs): 24,416.30 msec task-clock # 6.996 CPUs utilized ( +- 2.74% ) 16,764 context-switches # 686.590 /sec ( +- 5.85% ) 469 cpu-migrations # 19.208 /sec ( +- 6.14% ) 11,519 page-faults # 471.775 /sec ( +- 1.92% ) 53,895,628,450 cycles # 2.207 GHz ( +- 0.52% ) 105,552,664,638 instructions # 1.96 insn per cycle ( +- 0.47% ) 17,808,672,667 branches # 729.376 M/sec ( +- 0.48% ) 133,075,435 branch-misses # 0.75% of all branches ( +- 0.59% ) 3.490 +- 0.112 seconds time elapsed ( +- 3.22% ) Also removed unneeded "unlikely()" around the retaddr code. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andrew Morton <akpm@linux-foundation.org> Link: https://lore.kernel.org/20241223184941.204074053@goodmis.org Fixes: 9cd2992f2d6c8 ("fgraph: Have set_graph_notrace only affect function_graph tracer") # Performance only Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> kernel/trace/trace_functions_graph.c | 37 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 22 deletions(-) commit 155debbe7e627baf6439e75f15856d40ec115c5d Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:17 2024 -0800 xfs: enable realtime reflink Enable reflink for realtime devices, as long as the realtime allocation unit is a single fsblock. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_reflink.c | 25 +++++++++++++++++++++++++ fs/xfs/xfs_reflink.h | 2 ++ fs/xfs/xfs_rtalloc.c | 7 +++++-- fs/xfs/xfs_super.c | 6 ++++-- 4 files changed, 36 insertions(+), 4 deletions(-) commit fd97fe1112088c16594dcd45e809f1643e623309 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:16 2024 -0800 xfs: fix CoW forks for realtime files Port the copy on write fork repair to realtime files. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/agheader_repair.c | 2 +- fs/xfs/scrub/cow_repair.c | 178 +++++++++++++++++++++++++++--- fs/xfs/scrub/reap.c | 242 +++++++++++++++++++++++++++++++++++++++-- fs/xfs/scrub/reap.h | 7 ++ fs/xfs/scrub/repair.h | 1 + fs/xfs/scrub/rtb_bitmap.h | 37 +++++++ fs/xfs/scrub/trace.h | 36 +++--- fs/xfs/xfs_rtalloc.c | 4 +- fs/xfs/xfs_rtalloc.h | 5 + 9 files changed, 470 insertions(+), 42 deletions(-) commit 12f4d203289d1b4f59288389fd0349da3a528dee Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:15 2024 -0800 xfs: check for shared rt extents when rebuilding rt file's data fork When we're rebuilding the data fork of a realtime file, we need to cross-reference each mapping with the rt refcount btree to ensure that the reflink flag is set if there are any shared extents found. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/bmap_repair.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 92b2019493d114d2fad7219376a2448d9efba4a7 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:15 2024 -0800 xfs: repair inodes that have a refcount btree in the data fork Plumb knowledge of refcount btrees into the inode core repair code. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/inode_repair.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 83ccffc489975db625d7f2600d39faa8b0ff69d6 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:14 2024 -0800 xfs: online repair of the realtime refcount btree Port the data device's refcount btree repair code to the realtime refcount btree. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/Makefile | 1 + fs/xfs/scrub/refcount_repair.c | 2 +- fs/xfs/scrub/repair.h | 5 + fs/xfs/scrub/rtrefcount.c | 9 + fs/xfs/scrub/rtrefcount_repair.c | 783 +++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.c | 2 +- fs/xfs/scrub/trace.h | 14 +- 7 files changed, 809 insertions(+), 7 deletions(-) commit fe2efe95082a592955c03f26d00ae8e34bb814ed Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:13 2024 -0800 xfs: capture realtime CoW staging extents when rebuilding rt rmapbt Walk the realtime refcount btree to find the CoW staging extents when we're rebuilding the realtime rmap btree. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/repair.h | 1 + fs/xfs/scrub/rgb_bitmap.h | 37 ++++++++++++++++ fs/xfs/scrub/rtrmap_repair.c | 103 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 141 insertions(+) commit 477493082fe8a480e33cb26ff545b5976818c071 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:12 2024 -0800 xfs: walk the rt reference count tree when rebuilding rmap When we're rebuilding the data device rmap, if we encounter a "refcount" format fork, we have to walk the (realtime) refcount btree inode to build the appropriate mappings. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/rmap_repair.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6470ceef325c886cac909631d212839ee653dbc6 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:11 2024 -0800 xfs: check new rtbitmap records against rt refcount btree When we're rebuilding the realtime bitmap, check the proposed free extents against the rt refcount btree to make sure we don't commit any grievous errors. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/repair.c | 6 ++++++ fs/xfs/scrub/rtbitmap_repair.c | 24 +++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) commit cca34a305446f0eeea7c6c76bbb01ecf58be9cbc Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:11 2024 -0800 xfs: don't flag quota rt block usage on rtreflink filesystems Quota space usage is allowed to exceed the size of the physical storage when reflink is enabled. Now that we have reflink for the realtime volume, apply this same logic to the rtb repair logic. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/quota_repair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca757af07fccf527f91ad49f3b6648e6783b0bc8 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:10 2024 -0800 xfs: scrub the metadir path of rt refcount btree files Add a new XFS_SCRUB_METAPATH subtype so that we can scrub the metadata directory tree path to the refcount btree file for each rt group. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_fs.h | 3 ++- fs/xfs/scrub/metapath.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) commit a9600db96f74af50cc025a02e9e39a9515e2256d Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:09 2024 -0800 xfs: detect and repair misaligned rtinherit directory cowextsize hints If we encounter a directory that has been configured to pass on a CoW extent size hint to a new realtime file and the hint isn't an integer multiple of the rt extent size, we should flag the hint for administrative review and/or turn it off because that is a misconfiguration. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/inode.c | 26 +++++++++++++++++--------- fs/xfs/scrub/inode_repair.c | 15 +++++++++++++++ 2 files changed, 32 insertions(+), 9 deletions(-) commit 48bc170f2cb54371a062d2fae6d9518f6f47d878 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:09 2024 -0800 xfs: allow dquot rt block count to exceed rt blocks on reflink fs Update the quota scrubber to allow dquots where the realtime block count exceeds the block count of the rt volume if reflink is enabled. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/quota.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 30f47950dc2ebaf906d389506c3a9ab048a8c08d Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:08 2024 -0800 xfs: check reference counts of gaps between rt refcount records If there's a gap between records in the rt refcount btree, we ought to cross-reference the gap with the rtrmap records to make sure that there aren't any overlapping records for a region that doesn't have any shared ownership. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/rtrefcount.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) commit 2d9a3e98053e8cfa6ec9c113efb7f8883cd148e6 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:07 2024 -0800 xfs: allow overlapping rtrmapbt records for shared data extents Allow overlapping realtime reverse mapping records if they both describe shared data extents and the fs supports reflink on the realtime volume. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/rtrmap.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 91683bb3f264c04e6f0710de23dbd6c9605c550a Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:06 2024 -0800 xfs: cross-reference checks with the rt refcount btree Use the realtime refcount btree to implement cross-reference checks in other data structures. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/bmap.c | 30 +++++++++++++---- fs/xfs/scrub/rtbitmap.c | 2 ++ fs/xfs/scrub/rtrefcount.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/rtrmap.c | 37 ++++++++++++++++++++ fs/xfs/scrub/scrub.h | 9 +++++ 5 files changed, 158 insertions(+), 6 deletions(-) commit c27929670de144ec76a0dab2f3a168cb4897b314 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:06 2024 -0800 xfs: scrub the realtime refcount btree Add code to scrub realtime refcount btrees. Similar to the refcount btree checking code for the data device, we walk the rmap btree for each refcount record to confirm that the reference counts are correct. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_fs.h | 3 +- fs/xfs/scrub/common.c | 10 + fs/xfs/scrub/common.h | 5 +- fs/xfs/scrub/health.c | 1 + fs/xfs/scrub/rtrefcount.c | 487 ++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.c | 7 + fs/xfs/scrub/scrub.h | 3 + fs/xfs/scrub/stats.c | 1 + fs/xfs/scrub/trace.h | 4 +- 10 files changed, 519 insertions(+), 3 deletions(-) commit 026c8ed8d4580228949f177445c605d475880c93 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:05 2024 -0800 xfs: report realtime refcount btree corruption errors to the health system Whenever we encounter corrupt realtime refcount btree blocks, we should report that to the health monitoring system for later reporting. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_fs.h | 1 + fs/xfs/libxfs/xfs_health.h | 4 +++- fs/xfs/libxfs/xfs_rtgroup.c | 1 + fs/xfs/libxfs/xfs_rtrefcount_btree.c | 10 ++++++++-- fs/xfs/xfs_health.c | 1 + 5 files changed, 14 insertions(+), 3 deletions(-) commit 88a70768df138b97b36bf1571fcde92907812a3d Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:04 2024 -0800 xfs: check that the rtrefcount maxlevels doesn't increase when growing fs The size of filesystem transaction reservations depends on the maximum height (maxlevels) of the realtime btrees. Since we don't want a grow operation to increase the reservation size enough that we'll fail the minimum log size checks on the next mount, constrain growfs operations if they would cause an increase in the rt refcount btree maxlevels. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_fsops.c | 2 ++ fs/xfs/xfs_rtalloc.c | 2 ++ 2 files changed, 4 insertions(+) commit 8e84e8052bc283ebb37f929eb9fb97483ea7385e Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:03 2024 -0800 xfs: enable extent size hints for CoW operations Wire up the copy-on-write extent size hint for realtime files, and connect it to the rt allocator so that we avoid fragmentation on rt filesystems. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_bmap.c | 8 +++++++- fs/xfs/xfs_rtalloc.c | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) commit 4de1a7ba4171db681691bd80506d0cf43c5cb46a Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:03 2024 -0800 xfs: apply rt extent alignment constraints to CoW extsize hint The copy-on-write extent size hint is subject to the same alignment constraints as the regular extent size hint. Since we're in the process of adding reflink (and therefore CoW) to the realtime device, we must apply the same scattered rextsize alignment validation strategies to both hints to deal with the possibility of rextsize changing. Therefore, fix the inode validator to perform rextsize alignment checks on regular realtime files, and to remove misaligned directory hints. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_inode_buf.c | 25 ++++++++++++++++++++----- fs/xfs/xfs_inode_item.c | 14 ++++++++++++++ fs/xfs/xfs_ioctl.c | 17 +++++++++++++++-- 3 files changed, 49 insertions(+), 7 deletions(-) commit 6853d23badd0f1852d3b711128924e2456d27634 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:02 2024 -0800 xfs: fix xfs_get_extsz_hint behavior with realtime alwayscow files Currently, we (ab)use xfs_get_extsz_hint so that it always returns a nonzero value for realtime files. This apparently was done to disable delayed allocation for realtime files. However, once we enable realtime reflink, we can also turn on the alwayscow flag to force CoW writes to realtime files. In this case, the logic will incorrectly send the write through the delalloc write path. Fix this by adjusting the logic slightly. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_bmap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 51e232674975ff138d0e892272fdde9bc444c572 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:01 2024 -0800 xfs: recover CoW leftovers in the realtime volume Scan the realtime refcount tree at mount time to get rid of leftover CoW staging extents. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_refcount.c | 47 +++++++++++++++++++++++++++++++------------- fs/xfs/libxfs/xfs_refcount.h | 3 +-- fs/xfs/xfs_reflink.c | 15 +++++++++++--- 3 files changed, 46 insertions(+), 19 deletions(-) commit c3d3605f9661a2451c437a037d338dc79fb78f37 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:00 2024 -0800 xfs: allow inodes to have the realtime and reflink flags Now that we can share blocks between realtime files, allow this combination. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_inode_buf.c | 3 ++- fs/xfs/scrub/inode.c | 5 +++-- fs/xfs/scrub/inode_repair.c | 6 ------ fs/xfs/xfs_ioctl.c | 4 ---- 4 files changed, 5 insertions(+), 13 deletions(-) commit 5519251da0b0ae1224d7e0ce8dee3612b571c01c Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:21:00 2024 -0800 xfs: enable sharing of realtime file blocks Update the remapping routines to be able to handle realtime files. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_reflink.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 26e97d9b4b7601bc29535b9e9edc8f8aa5dae8d4 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:59 2024 -0800 xfs: enable CoW for realtime data Update our write paths to support copy on write on the rt volume. This works in more or less the same way as it does on the data device, with the major exception that we never do delalloc on the rt volume. Because we consider unwritten CoW fork staging extents to be incore quota reservation, we update xfs_quota_reserve_blkres to support this case. Though xfs doesn't allow rt and quota together, the change is trivial and we shouldn't leave a logic bomb here. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_reflink.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) commit 3639c63d4643f1949e4c71baa8c8d02e63d184b1 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:58 2024 -0800 xfs: refactor reflink quota updates Hoist all quota updates for reflink into a helper function, since things are about to become more complicated. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_reflink.c | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) commit c2694ff678c9b667ab4cb7c0b45d45309c4dd64b Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:57 2024 -0800 xfs: compute rtrmap btree max levels when reflink enabled Compute the maximum possible height of the realtime rmap btree when reflink is enabled. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_rtrmap_btree.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 0bada82331238bd366aaa0566d125c6338b42590 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:57 2024 -0800 xfs: update rmap to allow cow staging extents in the rt rmap Don't error out on CoW staging extent records when realtime reflink is enabled. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_rmap.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4ee3113aaf3f6a3c24fcf952d8489363f56ab375 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:56 2024 -0800 xfs: create routine to allocate and initialize a realtime refcount btree inode Create a library routine to allocate and initialize an empty realtime refcountbt inode. We'll use this for growfs, mkfs, and repair. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_rtgroup.c | 2 ++ fs/xfs/libxfs/xfs_rtrefcount_btree.c | 28 ++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_rtrefcount_btree.h | 3 +++ 3 files changed, 33 insertions(+) commit e5a171729baf61b703069b11fa0d2955890e9b6b Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:55 2024 -0800 xfs: wire up realtime refcount btree cursors Wire up realtime refcount btree cursors wherever they're needed throughout the code base. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_btree.h | 2 +- fs/xfs/libxfs/xfs_refcount.c | 100 ++++++++++++++++++++++++++++++++++++++++++- fs/xfs/libxfs/xfs_rtgroup.c | 9 ++++ fs/xfs/libxfs/xfs_rtgroup.h | 5 ++- fs/xfs/xfs_fsmap.c | 25 +++++------ fs/xfs/xfs_reflink.c | 66 ++++++++++++++++++++++++++-- 6 files changed, 187 insertions(+), 20 deletions(-) commit 4e87047539c7d695571173ad71471b2ac5b8e7e2 Author: Christoph Hellwig <hch@lst.de> Date: Wed Nov 20 16:20:54 2024 -0800 xfs: refactor xfs_reflink_find_shared Move lookup of the perag structure from the callers into the helpers, and return the offset into the extent of the shared region instead of the block number that needs post-processing. This prepares the callsites for the creation of an rt-specific variant in the next patch. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> [djwong: port to the middle of the rtreflink series for cleanliness] Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> fs/xfs/xfs_reflink.c | 110 +++++++++++++++++++++++---------------------------- fs/xfs/xfs_reflink.h | 2 +- 2 files changed, 50 insertions(+), 62 deletions(-) commit f0415af60f482a2192065be8b334b409495ca8a3 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:54 2024 -0800 xfs: wire up a new metafile type for the realtime refcount Plumb in the pieces we need to embed the root of the realtime refcount btree in an inode's data fork, complete with metafile type and on-disk interpretation functions. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_format.h | 8 ++ fs/xfs/libxfs/xfs_inode_fork.c | 6 +- fs/xfs/libxfs/xfs_ondisk.h | 1 + fs/xfs/libxfs/xfs_rtrefcount_btree.c | 264 +++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_rtrefcount_btree.h | 112 +++++++++++++++ fs/xfs/xfs_inode_item_recover.c | 4 + 6 files changed, 392 insertions(+), 3 deletions(-) commit bf0b99411335db18a9ed4fcef278ce9e313f6076 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:53 2024 -0800 xfs: add metadata reservations for realtime refcount btree Reserve some free blocks so that we will always have enough free blocks in the data volume to handle expansion of the realtime refcount btree. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_rtrefcount_btree.c | 38 ++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_rtrefcount_btree.h | 4 ++++ fs/xfs/xfs_rtalloc.c | 6 ++++++ 3 files changed, 48 insertions(+) commit eaed472c40527e526217aff3737816b44b08b363 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:52 2024 -0800 xfs: add realtime refcount btree inode to metadata directory Add a metadir path to select the realtime refcount btree inode and load it at mount time. The rtrefcountbt inode will have a unique extent format code, which means that we also have to update the inode validation and flush routines to look for it. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_format.h | 4 +++- fs/xfs/libxfs/xfs_inode_buf.c | 5 +++++ fs/xfs/libxfs/xfs_inode_fork.c | 6 ++++++ fs/xfs/libxfs/xfs_rtgroup.c | 7 +++++++ fs/xfs/libxfs/xfs_rtgroup.h | 6 ++++++ fs/xfs/libxfs/xfs_rtrefcount_btree.c | 6 +++--- 6 files changed, 30 insertions(+), 4 deletions(-) commit e08d0f2004cd925c6b68f982ac7de6ef77dab8ea Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:51 2024 -0800 xfs: add realtime refcount btree block detection to log recovery Identify rt refcount btree blocks in the log correctly so that we can validate them during log recovery. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_buf_item_recover.c | 4 ++++ 1 file changed, 4 insertions(+) commit ee6d43447923260830285c7ca2d4ae4efab4f31f Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:51 2024 -0800 xfs: support recovering refcount intent items targetting realtime extents Now that we have reflink on the realtime device, refcount intent items have to support remapping extents on the realtime volume. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_refcount_item.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit fd9300679ccec20c6ee1b95458ab0bcf0db628d5 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:50 2024 -0800 xfs: add a realtime flag to the refcount update log redo items Extend the refcount update (CUI) log items with a new realtime flag that indicates that the updates apply against the realtime refcountbt. We'll wire up the actual refcount code later. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_bmap.c | 10 +- fs/xfs/libxfs/xfs_defer.h | 1 + fs/xfs/libxfs/xfs_log_format.h | 6 +- fs/xfs/libxfs/xfs_log_recover.h | 2 + fs/xfs/libxfs/xfs_refcount.c | 64 ++++++++---- fs/xfs/libxfs/xfs_refcount.h | 17 +-- fs/xfs/scrub/cow_repair.c | 2 +- fs/xfs/scrub/reap.c | 5 +- fs/xfs/xfs_log_recover.c | 2 + fs/xfs/xfs_refcount_item.c | 224 +++++++++++++++++++++++++++++++++++++--- fs/xfs/xfs_reflink.c | 19 ++-- 11 files changed, 298 insertions(+), 54 deletions(-) commit 01cef1db246ee8b094fca6df23ea6d4335748181 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:49 2024 -0800 xfs: prepare refcount functions to deal with rtrefcountbt Prepare the high-level refcount functions to deal with the new realtime refcountbt and its slightly different conventions. Provide the ability to talk to either refcountbt or rtrefcountbt formats from the same high level code. Note that we leave the _recover_cow_leftovers functions for a separate patch so that we can convert it all at once. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_refcount.c | 53 +++++++++++++++++++++++++++++++++++++------- fs/xfs/libxfs/xfs_refcount.h | 3 +++ 2 files changed, 48 insertions(+), 8 deletions(-) commit 1a6f88ea538db9b3d8aef86112894e7e6d098287 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:48 2024 -0800 xfs: add realtime refcount btree operations Implement the generic btree operations needed to manipulate rtrefcount btree blocks. This is different from the regular refcountbt in that we allocate space from the filesystem at large, and are neither constrained to the free space nor any particular AG. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_rtrefcount_btree.c | 148 +++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) commit 2003c6a8754e307970c101a20baf8fb67d0588f2 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:48 2024 -0800 xfs: realtime refcount btree transaction reservations Make sure that there's enough log reservation to handle mapping and unmapping realtime extents. We have to reserve enough space to handle a split in the rtrefcountbt to add the record and a second split in the regular refcountbt to record the rtrefcountbt split. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_trans_resv.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:47 2024 -0800 xfs: introduce realtime refcount btree ondisk definitions Add the ondisk structure definitions for realtime refcount btrees. The realtime refcount btree will be rooted from a hidden inode so it needs to have a separate btree block magic and pointer format. Next, add everything needed to read, write and manipulate refcount btree blocks. This prepares the way for connecting the btree operations implementation, though the changes to actually root the rtrefcount btree in an inode come later. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_btree.c | 5 + fs/xfs/libxfs/xfs_format.h | 9 ++ fs/xfs/libxfs/xfs_ondisk.h | 1 + fs/xfs/libxfs/xfs_rtrefcount_btree.c | 273 +++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_rtrefcount_btree.h | 70 +++++++++ fs/xfs/libxfs/xfs_sb.c | 8 + fs/xfs/libxfs/xfs_shared.h | 7 + fs/xfs/xfs_mount.c | 5 +- fs/xfs/xfs_mount.h | 9 ++ fs/xfs/xfs_stats.c | 3 +- fs/xfs/xfs_stats.h | 1 + 12 files changed, 390 insertions(+), 2 deletions(-) commit 70fcf6866578e69635399e806273376f5e0b8e2b Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:46 2024 -0800 xfs: namespace the maximum length/refcount symbols Actually namespace these variables properly, so that readers can tell that this is an XFS symbol, and that it's for the refcount functionality. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_format.h | 4 ++-- fs/xfs/libxfs/xfs_refcount.c | 18 +++++++++--------- fs/xfs/scrub/refcount.c | 2 +- fs/xfs/scrub/refcount_repair.c | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) commit 0d89af530c8c7591f75492e5814aa1ca4a0d26d7 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:45 2024 -0800 xfs: prepare refcount btree cursor tracepoints for realtime Rework the refcount btree cursor tracepoints in preparation to handle the realtime refcount btree cursor. Mostly this involves renaming the field to "refcbno" and extracting the group number from the cursor when possible. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_refcount_item.c | 4 +- fs/xfs/xfs_trace.h | 111 +++++++++++++++++++++++++++------------------ 2 files changed, 70 insertions(+), 45 deletions(-) commit c2358439af374cad47f771797875d0beb8256738 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:45 2024 -0800 xfs: enable realtime rmap btree Permit mounting filesystems with realtime rmap btrees. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_rtalloc.c | 12 ++++++++---- fs/xfs/xfs_super.c | 6 ------ 2 files changed, 8 insertions(+), 10 deletions(-) commit 799e7e6566df79b3546a2dd7cf6bcf287f53d41c Author: Darrick J. Wong <djwong@kernel.org> Date: Tue Dec 17 13:22:44 2024 -0800 xfs: react to fsdax failure notifications on the rt device Now that we have reverse mapping for the realtime device, use the information to kill processes that have mappings to bad pmem. This requires refactoring the existing routines to handle rtgroups or AGs; and splitting out the translation function to improve cohesion. Also make a proper header file for the dax holder ops. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_buf.c | 1 + fs/xfs/xfs_notify_failure.c | 127 +++++++++++++++++++++++++------------------- fs/xfs/xfs_notify_failure.h | 11 ++++ fs/xfs/xfs_super.h | 1 - 4 files changed, 84 insertions(+), 56 deletions(-) commit f4ed93037966aea07ae6b10ab208976783d24e2e Author: Darrick J. Wong <djwong@kernel.org> Date: Tue Dec 17 13:43:06 2024 -0800 xfs: don't shut down the filesystem for media failures beyond end of log If the filesystem has an external log device on pmem and the pmem reports a media error beyond the end of the log area, don't shut down the filesystem because we don't use that space. Cc: <stable@vger.kernel.org> # v6.0 Fixes: 6f643c57d57c56 ("xfs: implement ->notify_failure() for XFS") Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_notify_failure.c | 121 ++++++++++++++++++++++++++++++-------------- 1 file changed, 82 insertions(+), 39 deletions(-) commit 9515572be65e9f8d7b852f067c7a163bfe9520d4 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:44 2024 -0800 xfs: hook live realtime rmap operations during a repair operation Hook the regular realtime rmap code when an rtrmapbt repair operation is running so that we can unlock the AGF buffer to scan the filesystem and keep the in-memory btree up to date during the scan. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/rmap_repair.c | 2 +- fs/xfs/scrub/rtrmap_repair.c | 131 +++++++++++++++++++++++++++++++++++++++++-- fs/xfs/scrub/trace.h | 17 ++++-- 3 files changed, 140 insertions(+), 10 deletions(-) commit 4a61f12eb11958f157e054d386466627445644cd Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:43 2024 -0800 xfs: create a shadow rmap btree during realtime rmap repair Create an in-memory btree of rmap records instead of an array. This enables us to do live record collection instead of freezing the fs. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_btree_mem.c | 1 + fs/xfs/libxfs/xfs_rmap.c | 3 +- fs/xfs/libxfs/xfs_rtrmap_btree.c | 117 +++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_rtrmap_btree.h | 6 ++ fs/xfs/libxfs/xfs_shared.h | 7 ++ fs/xfs/scrub/rtrmap_repair.c | 137 ++++++++++++++++++++++++++------------- fs/xfs/xfs_stats.c | 3 +- fs/xfs/xfs_stats.h | 1 + 8 files changed, 228 insertions(+), 47 deletions(-) commit 6a849bd81b69ccbda5b766cc700f0be86194e4d1 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:42 2024 -0800 xfs: online repair of the realtime rmap btree Repair the realtime rmap btree while mounted. Similar to the regular rmap btree repair code, we walk the data fork mappings of every realtime file in the filesystem to collect reverse-mapping records in an xfarray. Then we sort the xfarray, and use the btree bulk loader to create a new rtrmap btree ondisk. Finally, we swap the btree roots, and reap the old blocks in the usual way. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_btree_staging.c | 1 + fs/xfs/libxfs/xfs_rtrmap_btree.c | 2 +- fs/xfs/libxfs/xfs_rtrmap_btree.h | 3 + fs/xfs/scrub/common.c | 4 +- fs/xfs/scrub/common.h | 2 + fs/xfs/scrub/repair.c | 144 ++++++++ fs/xfs/scrub/repair.h | 14 + fs/xfs/scrub/rtrmap.c | 7 + fs/xfs/scrub/rtrmap_repair.c | 733 ++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.c | 2 +- fs/xfs/scrub/trace.h | 57 +++ 12 files changed, 966 insertions(+), 4 deletions(-) commit c6904f6788b79e8d2275a55cbb71b4992be29d92 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:42 2024 -0800 xfs: support repairing metadata btrees rooted in metadir inodes Adapt the repair code so that we can stage a new btree in the data fork area of a metadir inode and reap the old blocks. We already have nearly all of the infrastructure; the only parts that were missing were the metadata inode reservation handling. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/newbt.c | 42 ++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/newbt.h | 1 + fs/xfs/scrub/reap.c | 41 +++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/reap.h | 2 ++ 4 files changed, 86 insertions(+) commit 8defee8dff2b202702cdf33f6d8577adf9ad3e82 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:41 2024 -0800 xfs: online repair of realtime bitmaps for a realtime group For a given rt group, regenerate the bitmap contents from the group's realtime rmap btree. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_rtbitmap.h | 9 + fs/xfs/scrub/common.h | 6 + fs/xfs/scrub/repair.c | 2 +- fs/xfs/scrub/repair.h | 1 + fs/xfs/scrub/rtbitmap.c | 5 +- fs/xfs/scrub/rtbitmap.h | 50 +++++ fs/xfs/scrub/rtbitmap_repair.c | 429 +++++++++++++++++++++++++++++++++++++++- fs/xfs/scrub/rtsummary_repair.c | 3 +- fs/xfs/scrub/tempexch.h | 2 +- fs/xfs/scrub/tempfile.c | 20 +- fs/xfs/scrub/trace.c | 1 + fs/xfs/scrub/trace.h | 150 ++++++++++++++ 12 files changed, 659 insertions(+), 19 deletions(-) commit 3dd3aba6b92bf8298ff02d839ed3008df7478a8e Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:40 2024 -0800 xfs: repair rmap btree inodes Teach the inode repair code how to deal with realtime rmap btree inodes that won't load properly. This is most likely moot since the filesystem generally won't mount without the rtrmapbt inodes being usable, but we'll add this for completeness. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/inode_repair.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 1bd0843027167221421fe482d18ce03f7ff1f9f1 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:39 2024 -0800 xfs: repair inodes that have realtime extents Plumb into the inode core repair code the ability to search for extents on realtime devices. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/inode_repair.c | 58 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) commit f1a6d9b4c3177bc344528a43143e39a598752a1a Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:39 2024 -0800 xfs: online repair of realtime file bmaps Now that we have a reverse-mapping index of the realtime device, we can rebuild the data fork forward-mappings of any realtime file. Enhance the existing bmbt repair code to walk the rtrmap btrees to gather this information. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/bmap_repair.c | 128 +++++++++++++++++++++++++++++++++++++++++++-- fs/xfs/scrub/repair.c | 46 ++++++++++++++++ fs/xfs/scrub/repair.h | 2 + 3 files changed, 172 insertions(+), 4 deletions(-) commit 2e0629e17c311ad50863dac8fb18c62c94965244 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:38 2024 -0800 xfs: walk the rt reverse mapping tree when rebuilding rmap When we're rebuilding the data device rmap, if we encounter an "rmap" format fork, we have to walk the (realtime) rmap btree inode to build the appropriate mappings. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/rmap_repair.c | 53 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) commit 366243cc99b7e80236a19d7391b68d0f47677f4f Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:37 2024 -0800 xfs: scrub the metadir path of rt rmap btree files Add a new XFS_SCRUB_METAPATH subtype so that we can scrub the metadata directory tree path to the rmap btree file for each rt group. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_fs.h | 3 ++- fs/xfs/scrub/metapath.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) commit a5542712f98341927f646b790b367b72c7d614c5 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:36 2024 -0800 xfs: scan rt rmap when we're doing an intense rmap check of bmbt mappings Teach the bmbt scrubber how to perform a comprehensive check that the rmapbt does not contain /any/ mappings that are not described by bmbt records when it's dealing with a realtime file. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/bmap.c | 48 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 6 deletions(-) commit 037a44d8277adfd9e9097ea9d1bf99089aa14b39 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:36 2024 -0800 xfs: cross-reference the realtime rmapbt Teach the data fork and realtime bitmap scrubbers to cross-reference information with the realtime rmap btree. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/bmap.c | 52 +++++++++++++++++++++++++++------------ fs/xfs/scrub/rgsuper.c | 2 ++ fs/xfs/scrub/rtbitmap.c | 55 ++++++++++++++++++++++++++++++++++++++--- fs/xfs/scrub/rtbitmap.h | 5 ++++ fs/xfs/scrub/rtrmap.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.h | 9 +++++++ 6 files changed, 169 insertions(+), 19 deletions(-) commit 1ebecab5adba16a0e49ca30f945ab4937d8e498c Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:35 2024 -0800 xfs: cross-reference realtime bitmap to realtime rmapbt scrubber When we're checking the realtime rmap btree entries, cross-reference those entries with the realtime bitmap too. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/rtrmap.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 9a6cc4f6d081fddc0d5ff96744a2507d3559f949 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:34 2024 -0800 xfs: scrub the realtime rmapbt Check the realtime reverse mapping btree against the rtbitmap, and modify the rtbitmap scrub to check against the rtrmapbt. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_fs.h | 3 +- fs/xfs/scrub/common.c | 86 +++++++++++++++++++++ fs/xfs/scrub/common.h | 10 ++- fs/xfs/scrub/health.c | 1 + fs/xfs/scrub/inode.c | 6 +- fs/xfs/scrub/inode_repair.c | 7 +- fs/xfs/scrub/repair.c | 1 + fs/xfs/scrub/rtrmap.c | 184 ++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.c | 9 +++ fs/xfs/scrub/scrub.h | 5 ++ fs/xfs/scrub/stats.c | 1 + fs/xfs/scrub/trace.h | 4 +- 13 files changed, 307 insertions(+), 11 deletions(-) commit 428e4884656db965cb0dedc78dcf9a45013fe454 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:33 2024 -0800 xfs: allow queued realtime intents to drain before scrubbing When a writer thread executes a chain of log intent items for the realtime volume, the ILOCKs taken during each step are for each rt metadata file, not the entire rt volume itself. Although scrub takes all rt metadata ILOCKs, this isn't sufficient to guard against scrub checking the rt volume while that writer thread is in the middle of finishing a chain because there's no higher level locking primitive guarding the realtime volume. When there's a collision, cross-referencing between data structures (e.g. rtrmapbt and rtrefcountbt) yields false corruption events; if repair is running, this results in incorrect repairs, which is catastrophic. Fix this by adding to the mount structure the same drain that we use to protect scrub against concurrent AG updates, but this time for the realtime volume. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/scrub/bmap.c | 7 ++++- fs/xfs/scrub/common.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++-- fs/xfs/scrub/common.h | 5 ++-- fs/xfs/scrub/rgsuper.c | 4 ++- fs/xfs/scrub/rtbitmap.c | 8 +++++- fs/xfs/scrub/rtsummary.c | 5 +++- fs/xfs/scrub/scrub.c | 2 +- fs/xfs/xfs_drain.c | 20 +++++++------- fs/xfs/xfs_drain.h | 7 +++-- 9 files changed, 108 insertions(+), 22 deletions(-) commit 6d4933c221958d1e1848d5092a3e3d1c6e4a6f92 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:33 2024 -0800 xfs: report realtime rmap btree corruption errors to the health system Whenever we encounter corrupt realtime rmap btree blocks, we should report that to the health monitoring system for later reporting. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_btree.h | 2 +- fs/xfs/libxfs/xfs_fs.h | 1 + fs/xfs/libxfs/xfs_health.h | 4 +++- fs/xfs/libxfs/xfs_rtgroup.c | 1 + fs/xfs/libxfs/xfs_rtrmap_btree.c | 10 ++++++++-- fs/xfs/xfs_health.c | 1 + 6 files changed, 15 insertions(+), 4 deletions(-) commit 59a57acbce282d5ff0ddcc308b934549b340c713 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:32 2024 -0800 xfs: check that the rtrmapbt maxlevels doesn't increase when growing fs The size of filesystem transaction reservations depends on the maximum height (maxlevels) of the realtime btrees. Since we don't want a grow operation to increase the reservation size enough that we'll fail the minimum log size checks on the next mount, constrain growfs operations if they would cause an increase in those maxlevels. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_fsops.c | 11 +++++++++++ fs/xfs/xfs_rtalloc.c | 25 ++++++++++++++++++------- fs/xfs/xfs_rtalloc.h | 10 ++++++++++ fs/xfs/xfs_trace.h | 21 +++++++++++++++++++++ 4 files changed, 60 insertions(+), 7 deletions(-) commit b3683c74bf17e9f4e33cc8e13c73d29972b19765 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:31 2024 -0800 xfs: wire up getfsmap to the realtime reverse mapping btree Connect the getfsmap ioctl to the realtime rmapbt. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_fsmap.c | 174 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 173 insertions(+), 1 deletion(-) commit 71b8acb42be60e11810eb43a6f470589fcf7b7dd Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:30 2024 -0800 xfs: create routine to allocate and initialize a realtime rmap btree inode Create a library routine to allocate and initialize an empty realtime rmapbt inode. We'll use this for mkfs and repair. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_rtgroup.c | 2 ++ fs/xfs/libxfs/xfs_rtrmap_btree.c | 54 ++++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_rtrmap_btree.h | 5 ++++ fs/xfs/xfs_rtalloc.c | 12 +++++++-- 4 files changed, 71 insertions(+), 2 deletions(-) commit 609a592865c9e66a1c00eb7b8ee7436eea3c39a3 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:30 2024 -0800 xfs: wire up rmap map and unmap to the realtime rmapbt Connect the map and unmap reverse-mapping operations to the realtime rmapbt via the deferred operation callbacks. This enables us to perform rmap operations against the correct btree. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_rmap.c | 78 ++++++++++++++++++++++++++++++--------------- fs/xfs/libxfs/xfs_rtgroup.c | 9 ++++++ fs/xfs/libxfs/xfs_rtgroup.h | 5 ++- 3 files changed, 66 insertions(+), 26 deletions(-) commit f33659e8a114e2c17108227d30a2bdf398e39bdb Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:29 2024 -0800 xfs: wire up a new metafile type for the realtime rmap Plumb in the pieces we need to embed the root of the realtime rmap btree in an inode's data fork, complete with new metafile type and on-disk interpretation functions. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_format.h | 8 ++ fs/xfs/libxfs/xfs_inode_fork.c | 6 +- fs/xfs/libxfs/xfs_ondisk.h | 1 + fs/xfs/libxfs/xfs_rtrmap_btree.c | 251 +++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_rtrmap_btree.h | 112 +++++++++++++++++ fs/xfs/xfs_inode_item_recover.c | 4 + 6 files changed, 379 insertions(+), 3 deletions(-) commit 8491a55cfc73ff5c2c637a70ade51d4d08abb90a Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:28 2024 -0800 xfs: add metadata reservations for realtime rmap btrees Reserve some free blocks so that we will always have enough free blocks in the data volume to handle expansion of the realtime rmap btree. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_rtrmap_btree.c | 41 ++++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_rtrmap_btree.h | 2 ++ fs/xfs/xfs_rtalloc.c | 23 +++++++++++++++++++++- 3 files changed, 65 insertions(+), 1 deletion(-) commit 6b08901a6e8fcda555f3ad39abd73bb0dd37f231 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:27 2024 -0800 xfs: add realtime reverse map inode to metadata directory Add a metadir path to select the realtime rmap btree inode and load it at mount time. The rtrmapbt inode will have a unique extent format code, which means that we also have to update the inode validation and flush routines to look for it. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_format.h | 4 +++- fs/xfs/libxfs/xfs_inode_buf.c | 9 +++++++++ fs/xfs/libxfs/xfs_inode_fork.c | 6 ++++++ fs/xfs/libxfs/xfs_rtgroup.c | 20 ++++++++++++++++++-- fs/xfs/libxfs/xfs_rtgroup.h | 8 ++++++++ fs/xfs/libxfs/xfs_rtrmap_btree.c | 6 +++--- 6 files changed, 47 insertions(+), 6 deletions(-) commit 702c90f451622384d6c65897b619f647704b06a9 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:27 2024 -0800 xfs: support file data forks containing metadata btrees Create a new fork format type for metadata btrees. This fork type requires that the inode is in the metadata directory tree, and only applies to the data fork. The actual type of the metadata btree itself is determined by the di_metatype field. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_format.h | 6 ++++-- fs/xfs/libxfs/xfs_inode_buf.c | 23 ++++++++++++++++++++--- fs/xfs/libxfs/xfs_inode_fork.c | 19 +++++++++++++++++++ fs/xfs/scrub/bmap.c | 1 + fs/xfs/scrub/bmap_repair.c | 1 + fs/xfs/scrub/inode.c | 4 ++++ fs/xfs/scrub/inode_repair.c | 36 ++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/rmap_repair.c | 31 +++++++++++++++++++++---------- fs/xfs/xfs_inode.c | 19 ++++++++++++++++++- fs/xfs/xfs_inode_item.c | 2 ++ fs/xfs/xfs_inode_item_recover.c | 40 +++++++++++++++++++++++++++++++++++----- fs/xfs/xfs_trace.h | 1 + 12 files changed, 162 insertions(+), 21 deletions(-) commit 219ee99d3673ded7abbc13ddd4d7847e92661e2c Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:26 2024 -0800 xfs: pretty print metadata file types in error messages Create a helper function to turn a metadata file type code into a printable string, and use this to complain about lockdep problems with rtgroup inodes. We'll use this more in the next patch. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_metafile.c | 18 ++++++++++++++++++ fs/xfs/libxfs/xfs_metafile.h | 2 ++ fs/xfs/libxfs/xfs_rtgroup.c | 3 ++- 3 files changed, 22 insertions(+), 1 deletion(-) commit 5e0679d1c62f25f97b4f93121efe236fc4e768d2 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:25 2024 -0800 xfs: support recovering rmap intent items targetting realtime extents Now that we have rmap on the realtime device and rmap intent items that target the realtime device, log recovery has to support remapping extents on the realtime volume. Make this work. Identify rtrmapbt blocks in the log correctly so that we can validate them during log recovery. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_buf_item_recover.c | 4 ++++ fs/xfs/xfs_rmap_item.c | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) commit 9e823fc27419b09718fff74ae2297b25ae6fb317 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:24 2024 -0800 xfs: add a realtime flag to the rmap update log redo items Extend the rmap update (RUI) log items to handle realtime volumes by adding a new log intent item type. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_defer.h | 1 + fs/xfs/libxfs/xfs_log_format.h | 6 +- fs/xfs/libxfs/xfs_log_recover.h | 2 + fs/xfs/libxfs/xfs_refcount.c | 4 +- fs/xfs/libxfs/xfs_rmap.c | 17 +++- fs/xfs/libxfs/xfs_rmap.h | 5 +- fs/xfs/scrub/alloc_repair.c | 2 +- fs/xfs/xfs_log_recover.c | 2 + fs/xfs/xfs_rmap_item.c | 197 +++++++++++++++++++++++++++++++++++++--- 9 files changed, 213 insertions(+), 23 deletions(-) commit adafb31c80e608e63adcf8cae5675db00c734149 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:23 2024 -0800 xfs: prepare rmap functions to deal with rtrmapbt Prepare the high-level rmap functions to deal with the new realtime rmapbt and its slightly different conventions. Provide the ability to talk to either rmapbt or rtrmapbt formats from the same high level code. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_rmap.c | 63 +++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_rmap.h | 3 +++ fs/xfs/libxfs/xfs_rtgroup.h | 26 +++++++++++++++++++ 3 files changed, 92 insertions(+) commit d386b4024372ea2f06aaa0f2c6c380b45ba0536e Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:23 2024 -0800 xfs: add realtime rmap btree operations Implement the generic btree operations needed to manipulate rtrmap btree blocks. This is different from the regular rmapbt in that we allocate space from the filesystem at large, and are neither constrained to the free space nor any particular AG. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_btree.c | 68 ++++++++++ fs/xfs/libxfs/xfs_btree.h | 6 + fs/xfs/libxfs/xfs_rtrmap_btree.c | 271 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 345 insertions(+) commit e1c76fce50bb750dff236aa51a3b698de4f7132c Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:22 2024 -0800 xfs: realtime rmap btree transaction reservations Make sure that there's enough log reservation to handle mapping and unmapping realtime extents. We have to reserve enough space to handle a split in the rtrmapbt to add the record and a second split in the regular rmapbt to record the rtrmapbt split. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_exchmaps.c | 4 +++- fs/xfs/libxfs/xfs_trans_resv.c | 12 ++++++++++-- fs/xfs/libxfs/xfs_trans_space.h | 13 +++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) commit fc6856c6ff08642e3e8437f0416d70a5e1807010 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:21 2024 -0800 xfs: introduce realtime rmap btree ondisk definitions Add the ondisk structure definitions for realtime rmap btrees. The realtime rmap btree will be rooted from a hidden inode so it needs to have a separate btree block magic and pointer format. Next, add everything needed to read, write and manipulate rmap btree blocks. This prepares the way for connecting the btree operations implementation, though embedding the rtrmap btree root in the inode comes later in the series. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_btree.c | 5 + fs/xfs/libxfs/xfs_format.h | 10 ++ fs/xfs/libxfs/xfs_ondisk.h | 1 + fs/xfs/libxfs/xfs_rtrmap_btree.c | 271 +++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_rtrmap_btree.h | 82 ++++++++++++ fs/xfs/libxfs/xfs_sb.c | 6 + fs/xfs/libxfs/xfs_shared.h | 7 + fs/xfs/xfs_mount.c | 5 +- fs/xfs/xfs_mount.h | 9 ++ fs/xfs/xfs_stats.c | 3 +- fs/xfs/xfs_stats.h | 1 + 12 files changed, 398 insertions(+), 3 deletions(-) commit 05290bd5c6236b8ad659157edb36bd2d38f46d3e Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:19 2024 -0800 xfs: allow inode-based btrees to reserve space in the data device Create a new space reservation scheme so that btree metadata for the realtime volume can reserve space in the data device to avoid space underruns. Back when we were testing the rmap and refcount btrees for the data device, people observed occasional shutdowns when xfs_btree_split was called for either of those two btrees. This happened when certain operations (mostly writeback ioends) created new rmap or refcount records, which would expand the size of the btree. If there were no free blocks available the allocation would fail and the split would shut down the filesystem. I considered pre-reserving blocks for btree expansion at the time of a write() call, but there wasn't any good way to attach the reservations to an inode and keep them there all the way to ioend processing. Unlike delalloc reservations which have that indlen mechanism, there's no way to do that for mapped extents; and indlen blocks are given back during the delalloc -> unwritten transition. The solution was to reserve sufficient blocks for rmap/refcount btree expansion at mount time. This is what the XFS_AG_RESV_* flags provide; any expansion of those two btrees can come from the pre-reserved space. This patch brings that pre-reservation ability to inode-rooted btrees so that the rt rmap and refcount btrees can also save room for future expansion. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_ag_resv.c | 3 + fs/xfs/libxfs/xfs_errortag.h | 4 +- fs/xfs/libxfs/xfs_metadir.c | 4 + fs/xfs/libxfs/xfs_metafile.c | 205 +++++++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_metafile.h | 11 +++ fs/xfs/libxfs/xfs_types.h | 7 ++ fs/xfs/xfs_error.c | 3 + fs/xfs/xfs_fsops.c | 17 ++++ fs/xfs/xfs_inode.h | 6 ++ fs/xfs/xfs_mount.c | 10 +++ fs/xfs/xfs_mount.h | 1 + fs/xfs/xfs_rtalloc.c | 21 +++++ fs/xfs/xfs_rtalloc.h | 5 ++ fs/xfs/xfs_trace.h | 45 ++++++++++ 14 files changed, 341 insertions(+), 1 deletion(-) commit 2f63b20b7a26c9a7c76ea5a6565ca38cd9e31282 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:18 2024 -0800 xfs: support storing records in the inode core root Add the necessary flags and code so that we can support storing leaf records in the inode root block of a btree. This hasn't been necessary before, but the realtime rmapbt will need to be able to do this. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_btree.c | 138 ++++++++++++++++++++++++++++++++++---- fs/xfs/libxfs/xfs_btree.h | 2 +- fs/xfs/libxfs/xfs_btree_staging.c | 9 ++- 3 files changed, 132 insertions(+), 17 deletions(-) commit 953f76bf7a3622351f335c77c56ed7efb793e3e7 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:21 2024 -0800 xfs: simplify the xfs_rmap_{alloc,free}_extent calling conventions Simplify the calling conventions by allowing callers to pass a fsbno (xfs_fsblock_t) directly into these functions, since we're just going to set it in a struct anyway. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_refcount.c | 6 ++---- fs/xfs/libxfs/xfs_rmap.c | 12 +++++------- fs/xfs/libxfs/xfs_rmap.h | 8 ++++---- fs/xfs/scrub/alloc_repair.c | 5 +++-- 4 files changed, 14 insertions(+), 17 deletions(-) commit 84140a96cf7a5b5b48b862a79c8322aa220ce591 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:18 2024 -0800 xfs: prepare to reuse the dquot pointer space in struct xfs_inode Files participating in the metadata directory tree are not accounted to the quota subsystem. Therefore, the i_[ugp]dquot pointers in struct xfs_inode are never used and should always be NULL. In the next patch we want to add a u64 count of fs blocks reserved for metadata btree expansion, but we don't want every inode in the fs to pay the memory price for this feature. The intent is to union those three pointers with the u64 counter, but for that to work we must guard against all access to the dquot pointers for metadata files. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_attr.c | 4 +--- fs/xfs/libxfs/xfs_bmap.c | 4 +--- fs/xfs/scrub/tempfile.c | 1 + fs/xfs/xfs_dquot.h | 3 +++ fs/xfs/xfs_exchrange.c | 3 +++ fs/xfs/xfs_inode.h | 10 +++++++--- fs/xfs/xfs_qm.c | 2 ++ fs/xfs/xfs_quota.h | 5 ----- fs/xfs/xfs_trans.c | 4 ++++ fs/xfs/xfs_trans_dquot.c | 8 ++++---- 10 files changed, 26 insertions(+), 18 deletions(-) commit d415fb34b4c2d1c11b0536eebc61962d3f9bf286 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:20 2024 -0800 xfs: prepare rmap btree cursor tracepoints for realtime Rework the rmap btree cursor tracepoints in preparation to handle the realtime rmap btree cursor. Mostly this involves renaming the field to "gbno" and extracting the group number from the cursor. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_rmap_item.c | 4 +-- fs/xfs/xfs_trace.h | 82 ++++++++++++++++++++++++++------------------------ 2 files changed, 44 insertions(+), 42 deletions(-) commit af32541081ed6b6ad49b1ea38b5128cb319841b0 Author: Darrick J. Wong <djwong@kernel.org> Date: Fri Nov 22 12:33:17 2024 -0800 xfs: add some rtgroup inode helpers Create some simple helpers to reduce the amount of typing whenever we access rtgroup inodes. Conversion was done with this spatch and some minor reformatting: @@ expression rtg; @@ - rtg->rtg_inodes[XFS_RTGI_BITMAP] + rtg_bitmap(rtg) @@ expression rtg; @@ - rtg->rtg_inodes[XFS_RTGI_SUMMARY] + rtg_summary(rtg) and the CLI command: $ spatch --sp-file /tmp/moo.cocci --dir fs/xfs/ --use-gitgrep --in-place Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_rtbitmap.c | 2 +- fs/xfs/libxfs/xfs_rtgroup.c | 18 ++++++++---------- fs/xfs/libxfs/xfs_rtgroup.h | 10 ++++++++++ fs/xfs/scrub/rtbitmap.c | 7 +++---- fs/xfs/scrub/rtsummary.c | 12 +++++------- fs/xfs/xfs_qm.c | 8 ++++---- fs/xfs/xfs_rtalloc.c | 10 +++++----- 7 files changed, 36 insertions(+), 31 deletions(-) commit 505248719fcbf2c76594fe2ef293680d97fe426c Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:17 2024 -0800 xfs: hoist the node iroot update code out of xfs_btree_kill_iroot In preparation for allowing records in an inode btree root, hoist the code that copies keyptrs from an existing node child into the root block to a separate function. Remove some unnecessary conditionals and clean up a few function calls in the new function. Note that this change reorders the ->free_block call with respect to the change in bc_nlevels to make it easier to support inode root leaf blocks in the next patch. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_btree.c | 84 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 57 insertions(+), 27 deletions(-) commit 7708951ae52132d3c4e05aee2e57d35f0d89bd49 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:16 2024 -0800 xfs: hoist the node iroot update code out of xfs_btree_new_iroot In preparation for allowing records in an inode btree root, hoist the code that copies keyptrs from an existing node root into a child block to a separate function. Note that the new function explicitly computes the keys of the new child block and stores that in the root block; while the bmap btree could rely on leaving the key alone, realtime rmap needs to set the new high key. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_btree.c | 117 ++++++++++++++++++++++++++++++---------------- 1 file changed, 76 insertions(+), 41 deletions(-) commit c914081775e2e39e4afa9b4bb9e5c98202110f51 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:15 2024 -0800 xfs: tidy up xfs_bmap_broot_realloc a bit Hoist out the code that migrates broot pointers during a resize operation to avoid code duplication and streamline the caller. Also use the correct bmbt pointer type for the sizeof operation. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_bmap_btree.c | 43 ++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) commit eb9bff22311ca47ef4848bbdcf24dae06ae3f243 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:15 2024 -0800 xfs: make xfs_iroot_realloc a bmap btree function Move the inode fork btree root reallocation function part of the btree ops because it's now mostly bmbt-specific code. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_bmap.c | 6 +-- fs/xfs/libxfs/xfs_bmap_btree.c | 104 +++++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_bmap_btree.h | 3 ++ fs/xfs/libxfs/xfs_btree.c | 11 ++--- fs/xfs/libxfs/xfs_btree.h | 16 +++++++ fs/xfs/libxfs/xfs_inode_fork.c | 96 ------------------------------------- fs/xfs/libxfs/xfs_inode_fork.h | 2 - 7 files changed, 130 insertions(+), 108 deletions(-) commit 6a92924275ecdd768c8105f8975b971300c5ba7d Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:14 2024 -0800 xfs: make xfs_iroot_realloc take the new numrecs instead of deltas Change the calling signature of xfs_iroot_realloc to take the ifork and the new number of records in the btree block, not a diff against the current number. This will make the callsites easier to understand. Note that this function is misnamed because it is very specific to the single type of inode-rooted btree supported. This will be addressed in a subsequent patch. Return the new btree root to reduce the amount of code clutter. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_bmap.c | 7 ++-- fs/xfs/libxfs/xfs_btree.c | 25 +++++-------- fs/xfs/libxfs/xfs_inode_fork.c | 83 +++++++++++++++++++----------------------- fs/xfs/libxfs/xfs_inode_fork.h | 3 +- 4 files changed, 51 insertions(+), 67 deletions(-) commit 6c1c55ac3c0512262817a088e805d99aad4c0867 Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:13 2024 -0800 xfs: refactor the inode fork memory allocation functions Hoist the code that allocates, frees, and reallocates if_broot into a single xfs_iroot_krealloc function. Eventually we're going to push xfs_iroot_realloc into the btree ops structure to handle multiple inode-rooted btrees, but first let's separate out the bits that should stay in xfs_inode_fork.c. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_inode_fork.c | 116 +++++++++++++++++++++++++++-------------- fs/xfs/libxfs/xfs_inode_fork.h | 5 ++ 2 files changed, 82 insertions(+), 39 deletions(-) commit 1aacd3fac248902ea1f7607f2d12b93929a4833b Author: Darrick J. Wong <djwong@kernel.org> Date: Tue Dec 17 15:00:49 2024 -0800 xfs: release the dquot buf outside of qli_lock Lai Yi reported a lockdep complaint about circular locking: Chain exists of: &lp->qli_lock --> &bch->bc_lock --> &l->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&l->lock); lock(&bch->bc_lock); lock(&l->lock); lock(&lp->qli_lock); I /think/ the problem here is that xfs_dquot_attach_buf during quotacheck will release the buffer while it's holding the qli_lock. Because this is a cached buffer, xfs_buf_rele_cached takes b_lock before decrementing b_hold. Other threads have taught lockdep that a locking dependency chain is bp->b_lock -> bch->bc_lock -> l(ru)->lock; and that another chain is l(ru)->lock -> lp->qli_lock. Hence we do not want to take b_lock while holding qli_lock. Reported-by: syzbot+3126ab3db03db42e7a31@syzkaller.appspotmail.com Cc: <stable@vger.kernel.org> # v6.13-rc3 Fixes: ca378189fdfa89 ("xfs: convert quotacheck to attach dquot buffers") Tested-by: syzbot+3126ab3db03db42e7a31@syzkaller.appspotmail.com Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_dquot.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 4f13f0a3fc6ad193e4d144a5e001b7b8f1fc4b7f Author: Darrick J. Wong <djwong@kernel.org> Date: Wed Nov 20 16:20:12 2024 -0800 xfs: tidy up xfs_iroot_realloc Tidy up this function a bit before we start refactoring the memory handling and move the function to the bmbt code. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/libxfs/xfs_inode_fork.c | 83 ++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 43 deletions(-) commit 4b8d867ca6e2fc6d152f629fdaf027053b81765a Author: Darrick J. Wong <djwong@kernel.org> Date: Thu Dec 12 14:37:56 2024 -0800 xfs: don't over-report free space or inodes in statvfs Emmanual Florac reports a strange occurrence when project quota limits are enabled, free space is lower than the remaining quota, and someone runs statvfs: # mkfs.xfs -f /dev/sda # mount /dev/sda /mnt -o prjquota # xfs_quota -x -c 'limit -p bhard=2G 55' /mnt # mkdir /mnt/dir # xfs_io -c 'chproj 55' -c 'chattr +P' -c 'stat -vvvv' /mnt/dir # fallocate -l 19g /mnt/a # df /mnt /mnt/dir Filesystem Size Used Avail Use% Mounted on /dev/sda 20G 20G 345M 99% /mnt /dev/sda 2.0G 0 2.0G 0% /mnt I think the bug here is that xfs_fill_statvfs_from_dquot unconditionally assigns to f_bfree without checking that the filesystem has enough free space to fill the remaining project quota. However, this is a longstanding behavior of xfs so it's unclear what to do here. Cc: <stable@vger.kernel.org> # v2.6.18 Fixes: 932f2c323196c2 ("[XFS] statvfs component of directory/project quota support, code originally by Glen.") Reported-by: Emmanuel Florac <eflorac@intellique.com> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_qm_bhv.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit ef94ea4fc18ff3fa5034d0da4c1a52dba0b23f8c Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Date: Tue Dec 17 23:41:53 2024 +0200 clk: Drop obsolete devm_clk_bulk_get_all_enable() helper Commit 265b07df758a ("clk: Provide managed helper to get and enable bulk clocks") added devm_clk_bulk_get_all_enable() function, but missed to return the number of clocks stored in the clk_bulk_data table referenced by the clks argument. Without knowing the number, it's not possible to iterate these clocks when needed, hence the argument is useless and could have been simply removed. A new helper devm_clk_bulk_get_all_enabled() has been introduced, which is consistent with devm_clk_bulk_get_all() in terms of the returned value. Drop the obsolete function since all users switched to the new helper. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://lore.kernel.org/r/20241217-clk_bulk_ena_fix-v5-3-aafbbb245155@collabora.com Signed-off-by: Stephen Boyd <sboyd@kernel.org> include/linux/clk.h | 9 --------- 1 file changed, 9 deletions(-) commit 10106d5c1f9cee1a514fc29d711b55601d7241f2 Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Date: Tue Dec 17 23:41:52 2024 +0200 PCI: exynos: Switch to devm_clk_bulk_get_all_enabled() The helper devm_clk_bulk_get_all_enable() missed to return the number of clocks stored in the clk_bulk_data table referenced by the clks argument and, therefore, will be dropped. Use the newly introduced devm_clk_bulk_get_all_enabled() variant instead, which is consistent with devm_clk_bulk_get_all() in terms of the returned value: > 0 if one or more clocks have been stored = 0 if there are no clocks < 0 if an error occurred Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://lore.kernel.org/r/20241217-clk_bulk_ena_fix-v5-2-aafbbb245155@collabora.com Acked-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/pci/controller/dwc/pci-exynos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc924c24feb50530d0d379221460e279af5669bd Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Date: Tue Dec 17 23:41:51 2024 +0200 soc: mediatek: pwrap: Switch to devm_clk_bulk_get_all_enabled() The helper devm_clk_bulk_get_all_enable() missed to return the number of clocks stored in the clk_bulk_data table referenced by the clks argument and, therefore, will be dropped. Use the newly introduced devm_clk_bulk_get_all_enabled() variant instead, which is consistent with devm_clk_bulk_get_all() in terms of the returned value: > 0 if one or more clocks have been stored = 0 if there are no clocks < 0 if an error occurred Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://lore.kernel.org/r/20241217-clk_bulk_ena_fix-v5-1-aafbbb245155@collabora.com Acked-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/soc/mediatek/mtk-pmic-wrap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4c538044ee2d11299cc57ac1e92d343e1e83b847 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon Dec 23 11:34:32 2024 -0800 vsprintf: don't make the 'binary' version pack small integer arguments The strange vbin_printf / bstr_printf interface used to save one- and two-byte printf numerical arguments into their packed format. That's more than a bit strange since the argument buffer is supposed to be an array of 'u32' words, and it's also very different from how the source of the data (varargs) work - which always do the normal integer type conversions, so 'char' and 'short' are always passed as int-sized anyway. This odd packing causes extra code complexity, and it really isn't worth it, since the space savings are simply not there: it only happens for formats like '%hd' (short) and '%hhd' (char), which are very rare indeed. In fact, the only other user of this interface seems to be the bpf helper code (bpf_bprintf_prepare()), and Alexei points out that that case doesn't support those truncated integer formatting options at all in the first place. As a result, bpf_bprintf_prepare() doesn't need any changes for this, and TRACE_BPRINT uses 'vbin_printf()' -> 'bstr_printf()' for the formatting and hopefully doesn't expose the odd packing any other way (knock wood). Link: https://lore.kernel.org/all/CAADnVQJy65oOubjxM-378O3wDfhuwg8TGa9hc-cTv6NmmUSykQ@mail.gmail.com/ Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/vsprintf.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) commit 8d4826cc8a8aca01a3b5e95438dfc0eb3bd589ab Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu Dec 19 13:52:53 2024 -0800 vsnprintf: collapse the number format state into one single state We'll squirrel away the size of the number in 'struct fmt' instead. We have two fairly separate state structures: the 'decode state' is in 'struct fmt', while the 'printout format' is in 'printf_spec'. Both structures are small enough to pass around in registers even across function boundaries (ie two words), even on 32-bit machines. The goal here is to avoid the case statements on the format states, which generate either deep conditionals or jump tables, while also keeping the state size manageable. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/vsprintf.c | 137 +++++++++++++++++++++++++++------------------------------ 1 file changed, 66 insertions(+), 71 deletions(-) commit 2b76e39fca4739a75c9a4f96f3471af6b1c18d9e Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu Dec 19 11:42:15 2024 -0800 vsnprintf: mark the indirect width and precision cases unlikely Make the format_decode() code generation easier to look at by getting the strange and unlikely cases out of line. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/vsprintf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f372b2256acbfbbf703cfdfae3d02c5a6c0e1679 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu Dec 19 11:37:07 2024 -0800 vsnprintf: inline skip_atoi() again At some point skip_atoi() had been marked 'noinline_for_stack', but it turns out that this is now a pessimization, and not inlining it actually results in a stack frame in format decoding due to the call and thus hurts stack usage rather than helping. With the simplistic atoi function inlined, the format decoding now needs no frame at all. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/vsprintf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 614d13462daef9bf6ac735744b5835a18cbfd19c Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu Dec 19 10:55:56 2024 -0800 vsprintf: deal with format specifiers with a lookup table We did the flags as an array earlier, they had simpler rules. The final format specifiers are a bit more complex since they have more fields to deal with, and we want to handle the length modifiers at the same time. But like the flags, we're better off just making it a data-driven table rather than some case statement. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/vsprintf.c | 133 +++++++++++++++++++++++---------------------------------- 1 file changed, 54 insertions(+), 79 deletions(-) commit 312f48b2e27f0f8ede4260e024352fdad225d1c5 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu Dec 19 10:02:45 2024 -0800 vsprintf: deal with format flags with a simple lookup table Rather than a case statement, just look up the printf format flags (justification, zero-padding etc) using a small table. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/vsprintf.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit 938df695e98db7e0df540cce3b12da8c382955b4 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon Dec 16 15:44:10 2024 -0800 vsprintf: associate the format state with the format pointer The vsnprintf() code is written as a state machine as it walks the format pointer, but for various historical reasons the state is oddly named and was encoded as the 'type' field in the 'struct printf_spec'. That naming came from the fact that the states used to not just encode the state of the state machine, but also the various integer types that would then be printed out. Let's make the state machine more obvious, and actually call it 'state', and associate it with the format pointer itself, rather than the 'printf_spec' that contains the currently decoded formatting specs. This also removes the bit packing from printf_spec, which makes it much easier on the compiler. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/vsprintf.c | 292 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 157 insertions(+), 135 deletions(-) commit 9e0e6d8a3268e805e061ae8b22f14e37b157102a Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon Dec 16 15:37:06 2024 -0800 vsprintf: fix calling convention for format_decode() Every single caller wants to know what the next format location is, but instead the function returned the length of the processed part and so every single return statement in the format_decode() function was instead subtracting the start of the format string. The callers that that did want to know the length (in addition to the end of the format processing) already had to save off the start of the format string anyway. So this was all just doing extra processing both on the caller and callee sides. Just change the calling convention to return the end of the format processing, making everything simpler (and preparing for yet more simplification to come). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/vsprintf.c | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit 03d23941bf03eecd8560e40238decb1515f264f6 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon Dec 16 10:26:53 2024 -0800 vsprintf: avoid nested switch statement on same variable Now that we have simplified the number format types, the top-level switch table can easily just handle all the remaining cases, and we don't need to have a case statement with a conditional on the same expression as the switch statement. We do want to fall through to the common 'number()' case, but that's trivially done by making the other case statements use 'continue' instead of 'break'. They are just looping back to the top, after all. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/vsprintf.c | 99 ++++++++++++++++++++++++++++------------------------------ 1 file changed, 47 insertions(+), 52 deletions(-) commit be503db4d0f217bb1bb4b3e3639402d386378d1b Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sun Dec 15 10:44:15 2024 -0800 vsprintf: simplify number handling Instead of dealing with all the different special types (size_t, unsigned char, ptrdiff_t..) just deal with the size of the integer type and the sign. This avoids a lot of unnecessary case statements, and the games we play with the value of the 'SIGN' flags value Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/vsprintf.c | 144 +++++++++++++++++---------------------------------------- 1 file changed, 42 insertions(+), 102 deletions(-) commit 835443da6f50d9516b58bba5a4fdf9e563d961c7 Author: Sebastian Brzezinka <sebastian.brzezinka@intel.com> Date: Fri Dec 20 14:17:14 2024 +0100 drm/i915/gt: Log reason for setting TAINT_WARN at reset TAINT_WARN is used to notify CI about non-recoverable failures, which require device to be restarted. In some cases, there is no sufficient information about the reason for the restart. The test runner is just killed, and DUT is rebooted, logging only 'probe with driver i915 failed with error -4' to dmesg. Printing error to dmesg before TAINT_WARN, would explain why the device has been restarted, and what caused the malfunction in the first place. Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241220131714.1309483-1-andi.shyti@linux.intel.com drivers/gpu/drm/i915/gt/intel_reset.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9268abe611b09edc975aa27e6ce829f629352ff4 Merge: 847cf3b9c3ca f0706c04721b Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Dec 23 10:58:07 2024 -0800 Merge branch 'net-lan969x-add-rgmii-support' Daniel Machon says: ==================== net: lan969x: add RGMII support == Description: This series is the fourth of a multi-part series, that prepares and adds support for the new lan969x switch driver. The upstreaming efforts is split into multiple series (might change a bit as we go along): 1) Prepare the Sparx5 driver for lan969x (merged) 2) Add support for lan969x (same basic features as Sparx5 provides excl. FDMA and VCAP, merged). 3) Add lan969x VCAP functionality (merged). --> 4) Add RGMII support. 5) Add FDMA support. == RGMII support: The lan969x switch device includes two RGMII port interfaces (port 28 and 29) supporting data speeds of 1 Gbps, 100 Mbps and 10 Mbps. == Patch breakdown: Patch #1 does some preparation work. Patch #2 adds new function: is_port_rgmii() to the match data ops. Patch #3 uses the is_port_rgmii() in a number of places. Patch #4 makes sure that we do not configure an RGMII device as a low-speed device, when doing a port config. Patch #5 makes sure we only return the PCS if the port mode requires it. Patch #6 adds checks for RGMII PHY modes in sparx5_verify_speeds(). Patch #7 adds registers required to configure RGMII. Patch #8 adds RGMII implementation. Patch #9 documents RGMII delays in the dt-bindings. Details are in the commit description of the individual patches v4: https://lore.kernel.org/20241213-sparx5-lan969x-switch-driver-4-v4-0-d1a72c9c4714@microchip.com v3: https://lore.kernel.org/20241118-sparx5-lan969x-switch-driver-4-v3-0-3cefee5e7e3a@microchip.com v2: https://lore.kernel.org/20241113-sparx5-lan969x-switch-driver-4-v2-0-0db98ac096d1@microchip.com v1: https://lore.kernel.org/20241106-sparx5-lan969x-switch-driver-4-v1-0-f7f7316436bd@microchip.com ==================== Link: https://patch.msgid.link/20241220-sparx5-lan969x-switch-driver-4-v5-0-fa8ba5dff732@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit f0706c04721becee4e0576f0c56e871c11b1e84e Author: Daniel Machon <daniel.machon@microchip.com> Date: Fri Dec 20 14:48:48 2024 +0100 dt-bindings: net: sparx5: document RGMII delays The lan969x switch device supports two RGMII port interfaces that can be configured for MAC level rx and tx delays. Document two new properties {rx,tx}-internal-delay-ps in the bindings, used to select these delays. Tested-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241220-sparx5-lan969x-switch-driver-4-v5-9-fa8ba5dff732@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../bindings/net/microchip,sparx5-switch.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 010fe5dff1644f60520302fd43776a54402b623f Author: Daniel Machon <daniel.machon@microchip.com> Date: Fri Dec 20 14:48:47 2024 +0100 net: lan969x: add RGMII implementation The lan969x switch device includes two RGMII port interfaces (port 28 and 29) supporting data speeds of 1 Gbps, 100 Mbps and 10 Mbps. MAC level delays are configurable through the HSIO_WRAP target, by choosing a phase shift selector, corresponding to a certain time delay in nano seconds. Add new file: lan969x_rgmii.c that contains the implementation for configuring the RGMII port devices. MAC level delays are configured using the "{rx,tx}-internal-delay-ps" properties. These properties must be specified independently of the phy-mode. If missing, or set to zero, the MAC will not apply any delay. Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Tested-by: Robert Marko <robert.marko@sartura.hr> Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Link: https://patch.msgid.link/20241220-sparx5-lan969x-switch-driver-4-v5-8-fa8ba5dff732@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/microchip/sparx5/Makefile | 3 +- .../ethernet/microchip/sparx5/lan969x/lan969x.c | 1 + .../ethernet/microchip/sparx5/lan969x/lan969x.h | 5 + .../microchip/sparx5/lan969x/lan969x_rgmii.c | 224 +++++++++++++++++++++ .../net/ethernet/microchip/sparx5/sparx5_main.h | 2 + .../net/ethernet/microchip/sparx5/sparx5_port.c | 6 + 6 files changed, 240 insertions(+), 1 deletion(-) commit fb6ac1829bb5865768e75517aefb416a3a19569e Author: Daniel Machon <daniel.machon@microchip.com> Date: Fri Dec 20 14:48:46 2024 +0100 net: lan969x: add RGMII registers Configuration of RGMII is done by configuring the GPIO and clock settings in the HSIOWRAP target, and configuring the RGMII port devices in the DEVRGMII target. Both targets contain registers replicated for the number of RGMII port devices, which is two. Add said targets and register macros required to configure RGMII. Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Tested-by: Robert Marko <robert.marko@sartura.hr> Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Link: https://patch.msgid.link/20241220-sparx5-lan969x-switch-driver-4-v5-7-fa8ba5dff732@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../ethernet/microchip/sparx5/lan969x/lan969x.c | 3 + .../ethernet/microchip/sparx5/sparx5_main_regs.h | 145 +++++++++++++++++++++ 2 files changed, 148 insertions(+) commit 95e467b85e6930d34093b7770c7ed964113589b0 Author: Daniel Machon <daniel.machon@microchip.com> Date: Fri Dec 20 14:48:45 2024 +0100 net: sparx5: verify RGMII speeds When doing a port config, we verify the port speed against the PHY mode and supported speeds of that PHY mode. Add checks for the four RGMII phy modes: RGMII, RGMII_ID, RGMII_TXID and RGMII_RXID. Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Tested-by: Robert Marko <robert.marko@sartura.hr> Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Link: https://patch.msgid.link/20241220-sparx5-lan969x-switch-driver-4-v5-6-fa8ba5dff732@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/microchip/sparx5/sparx5_port.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9b8d70ecfef7abcabe265be4faeb07e552383520 Author: Daniel Machon <daniel.machon@microchip.com> Date: Fri Dec 20 14:48:44 2024 +0100 net: sparx5: only return PCS for modes that require it The RGMII ports have no PCS to configure. Make sure we only return the PCS for port modes that require it. Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Robert Marko <robert.marko@sartura.hr> Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Link: https://patch.msgid.link/20241220-sparx5-lan969x-switch-driver-4-v5-5-fa8ba5dff732@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit d9450934f915a97b09f035866acd5da302f0dc12 Author: Daniel Machon <daniel.machon@microchip.com> Date: Fri Dec 20 14:48:43 2024 +0100 net: sparx5: skip low-speed configuration when port is RGMII When doing a port config, we configure low-speed port devices, among other things. We have a check to ensure, that the device is indeed a low-speed device, an not a high-speed device. Add an additional check, to ensure that the device is not an RGMII device. Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Tested-by: Robert Marko <robert.marko@sartura.hr> Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Link: https://patch.msgid.link/20241220-sparx5-lan969x-switch-driver-4-v5-4-fa8ba5dff732@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/microchip/sparx5/sparx5_port.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 05bda8a1bdedd5dfc21522d732c3bf9413d70eb3 Author: Daniel Machon <daniel.machon@microchip.com> Date: Fri Dec 20 14:48:42 2024 +0100 net: sparx5: use is_port_rgmii() throughout Now that we can check if a given port is an RGMII port, use it in the following cases: - To set RGMII PHY modes for RGMII port devices. - To avoid checking for a SerDes node in the devicetree, when the port is an RGMII port. - To bail out of sparx5_port_init() when the common configuration is done. Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Tested-by: Robert Marko <robert.marko@sartura.hr> Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Link: https://patch.msgid.link/20241220-sparx5-lan969x-switch-driver-4-v5-3-fa8ba5dff732@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../net/ethernet/microchip/sparx5/sparx5_main.c | 28 +++++++++++++++------- .../net/ethernet/microchip/sparx5/sparx5_port.c | 3 +++ 2 files changed, 23 insertions(+), 8 deletions(-) commit dd2baee1084034b8666290cbcc02cb32fe5a8666 Author: Daniel Machon <daniel.machon@microchip.com> Date: Fri Dec 20 14:48:41 2024 +0100 net: sparx5: add function for RGMII port check The lan969x device contains two RGMII port interfaces, sitting at port 28 and 29. Add function: is_port_rgmii() to the match data ops, that checks if a given port is an RGMII port or not. For Sparx5, this function always returns false. Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Tested-by: Robert Marko <robert.marko@sartura.hr> Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Link: https://patch.msgid.link/20241220-sparx5-lan969x-switch-driver-4-v5-2-fa8ba5dff732@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/microchip/sparx5/lan969x/lan969x.c | 1 + drivers/net/ethernet/microchip/sparx5/lan969x/lan969x.h | 5 +++++ drivers/net/ethernet/microchip/sparx5/sparx5_main.c | 1 + drivers/net/ethernet/microchip/sparx5/sparx5_main.h | 1 + drivers/net/ethernet/microchip/sparx5/sparx5_port.h | 5 +++++ 5 files changed, 13 insertions(+) commit c71b59690aa12daf3edbb4dd02b8821490dc727e Author: Daniel Machon <daniel.machon@microchip.com> Date: Fri Dec 20 14:48:40 2024 +0100 net: sparx5: do some preparation work The sparx5_port_init() does initial configuration of a variety of different features and options for each port. Some are shared for all types of devices, some are not. As it is now, common configuration is done after configuration of low-speed devices. This will not work when adding RGMII support in a subsequent patch. In preparation for lan969x RGMII support, move a block of code, that configures 2g5 devices, down. This ensures that the configuration common to all devices is done before configuration of 2g5, 5g, 10g and 25g devices. Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Tested-by: Robert Marko <robert.marko@sartura.hr> Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Link: https://patch.msgid.link/20241220-sparx5-lan969x-switch-driver-4-v5-1-fa8ba5dff732@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../net/ethernet/microchip/sparx5/sparx5_port.c | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) commit 847cf3b9c3ca5c39b0ddebf685dc7cd7d05d639f Merge: 4c61d809cf60 4c44b450c69b Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Dec 23 10:46:49 2024 -0800 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== ixgbe, ixgbevf: Add support for Intel(R) E610 device Piotr Kwapulinski says: Add initial support for Intel(R) E610 Series of network devices. The E610 is based on X550 but adds firmware managed link, enhanced security capabilities and support for updated server manageability. * '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ixgbevf: Add support for Intel(R) E610 device PCI: Add PCI_VDEVICE_SUB helper macro ixgbe: Enable link management in E610 device ixgbe: Clean up the E610 link management related code ixgbe: Add ixgbe_x540 multiple header inclusion protection ixgbe: Add support for EEPROM dump in E610 device ixgbe: Add support for NVM handling in E610 device ixgbe: Add link management support for E610 device ixgbe: Add support for E610 device capabilities detection ixgbe: Add support for E610 FW Admin Command Interface ==================== Link: https://patch.msgid.link/20241220201521.3363985-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 4c61d809cf608842112c77880f50810a564cd9cb Author: Kory Maincent <kory.maincent@bootlin.com> Date: Fri Dec 20 09:37:40 2024 +0100 net: ethtool: Fix suspicious rcu_dereference usage The __ethtool_get_ts_info function can be called with or without the rtnl lock held. When the rtnl lock is not held, using rtnl_dereference() triggers a warning due to the lack of lock context. Add an rcu_read_lock() to ensure the lock is acquired and to maintain synchronization. Reported-by: syzbot+a344326c05c98ba19682@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/676147f8.050a0220.37aaf.0154.GAE@google.com/ Fixes: b9e3f7dc9ed9 ("net: ethtool: tsinfo: Enhance tsinfo to support several hwtstamp by net topology") Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20241220083741.175329-1-kory.maincent@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/ethtool/common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3f8f2e93cdfb96c77bf381590dd697867e89d9e7 Merge: f6f1795d0c37 52dc722db0d9 Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Dec 23 10:35:58 2024 -0800 Merge branch 'eth-fbnic-support-basic-rss-config-and-setting-channel-count' Jakub Kicinski says: ==================== eth: fbnic: support basic RSS config and setting channel count Add support for basic RSS config (indirection table, key get and set), and changing the number of channels. # ./ksft-net-drv/run_kselftest.sh -t drivers/net/hw:rss_ctx.py TAP version 13 1..1 # timeout set to 0 # selftests: drivers/net/hw: rss_ctx.py # KTAP version 1 # 1..15 # ok 1 rss_ctx.test_rss_key_indir # ok 2 rss_ctx.test_rss_queue_reconfigure # ok 3 rss_ctx.test_rss_resize # ok 4 rss_ctx.test_hitless_key_update .. the rest of the tests are for additional contexts so they get skipped.. The slicing of the patches (and bugs) are mine, but I'm keeping Alex as the author on the patches where he wrote 100% of the code. ==================== Link: https://patch.msgid.link/20241220025241.1522781-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 52dc722db0d98bcdf40927dd1719468f7d08bd59 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 19 18:52:41 2024 -0800 eth: fbnic: support ring channel set while up Implement the channel count changes. Copy the netdev priv, allocate new channels using it. Stop, swap, start. Then free the copy of the priv along with the channels it holds, which are now the channels that used to be on the real priv. Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Link: https://patch.msgid.link/20241220025241.1522781-11-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/meta/fbnic/fbnic.h | 1 + drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c | 121 +++++++++++++++++++++++- drivers/net/ethernet/meta/fbnic/fbnic_irq.c | 11 +++ drivers/net/ethernet/meta/fbnic/fbnic_netdev.h | 1 + drivers/net/ethernet/meta/fbnic/fbnic_pci.c | 2 +- drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 8 +- drivers/net/ethernet/meta/fbnic/fbnic_txrx.h | 5 + 7 files changed, 143 insertions(+), 6 deletions(-) commit 3a481cc72673b2fbb18271acf2d9b43f6a920ec4 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 19 18:52:40 2024 -0800 eth: fbnic: support ring channel get and set while down Trivial implementation of ethtool channel get and set. Set is only supported when device is closed, next patch will add code for live reconfig. Asymmetric configurations are supported (combined + extra Tx or Rx), so are configurations with independent IRQs for Rx and Tx. Having all 3 NAPI types (combined, Tx, Rx) is not supported. We used to only call fbnic_reset_indir_tbl() during init. Now that we call it after device had been register must be careful not to override user config. Link: https://patch.msgid.link/20241220025241.1522781-10-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c | 64 +++++++++++++++++++++++++ drivers/net/ethernet/meta/fbnic/fbnic_rpc.c | 3 ++ 2 files changed, 67 insertions(+) commit 557d02238e05eb66b9aba9a1f90f3a2131c6c887 Author: Alexander Duyck <alexanderduyck@fb.com> Date: Thu Dec 19 18:52:39 2024 -0800 eth: fbnic: centralize the queue count and NAPI<>queue setting To simplify dealing with RTNL_ASSERT() requirements further down the line, move setting queue count and NAPI<>queue association to their own helpers. Signed-off-by: Alexander Duyck <alexanderduyck@fb.com> Link: https://patch.msgid.link/20241220025241.1522781-9-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/meta/fbnic/fbnic_netdev.c | 9 +-- drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 92 ++++++++++++++++++-------- drivers/net/ethernet/meta/fbnic/fbnic_txrx.h | 2 + 3 files changed, 70 insertions(+), 33 deletions(-) commit 3a856ab347261870d2bb6f3cab95325f27eee104 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 19 18:52:38 2024 -0800 eth: fbnic: add IRQ reuse support Change our method of swapping NAPIs without disturbing existing config. This is primarily needed for "live reconfiguration" such as changing the channel count when interface is already up. Previously we were planning to use a trick of using shared interrupts. We would install a second IRQ handler for the new NAPI, and make it return IRQ_NONE until we were ready for it to take over. This works fine functionally but breaks IRQ naming. The IRQ subsystem uses the IRQ name to create the procfs entry, since both handlers used the same name the second handler wouldn't get a proc directory registered. When first one gets removed on success full ring count change it would remove its directory and we would be left with none. New approach uses a double pointer to the NAPI. The IRQ handler needs to know how to locate the NAPI to schedule. We register a single IRQ handler and give it a pointer to a pointer. We can then change what it points to without re-registering. This may have a tiny perf impact, but really really negligible. Link: https://patch.msgid.link/20241220025241.1522781-8-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/meta/fbnic/fbnic.h | 14 +++++++++ drivers/net/ethernet/meta/fbnic/fbnic_irq.c | 42 ++++++++++++++++++++++++++ drivers/net/ethernet/meta/fbnic/fbnic_netdev.c | 2 ++ drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 25 +++------------ drivers/net/ethernet/meta/fbnic/fbnic_txrx.h | 2 +- 5 files changed, 63 insertions(+), 22 deletions(-) commit db7159c400ffbbf3e0df1f3ef6b847b7b62186a3 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 19 18:52:37 2024 -0800 eth: fbnic: store NAPIs in an array instead of the list We will need an array for storing NAPIs in the upcoming IRQ handler reuse rework. Replace the current list we have, so that we are able to reuse it later. In a few places replace i as the iterator with t when we iterate over triads, this seems slightly less confusing than having i, j, k variables. Link: https://patch.msgid.link/20241220025241.1522781-7-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/meta/fbnic/fbnic_netdev.c | 1 - drivers/net/ethernet/meta/fbnic/fbnic_netdev.h | 6 +- drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 117 +++++++++++++------------ drivers/net/ethernet/meta/fbnic/fbnic_txrx.h | 7 +- 4 files changed, 71 insertions(+), 60 deletions(-) commit c23a1461bfee0a6f158795a58c768911c49d6cd0 Author: Alexander Duyck <alexanderduyck@fb.com> Date: Thu Dec 19 18:52:36 2024 -0800 eth: fbnic: let user control the RSS hash fields Support setting the fields over which RSS computes its hash. Signed-off-by: Alexander Duyck <alexanderduyck@fb.com> Link: https://patch.msgid.link/20241220025241.1522781-6-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 31ab733e999edbc4070d8386c608d9f0b73267c5 Author: Alexander Duyck <alexanderduyck@fb.com> Date: Thu Dec 19 18:52:35 2024 -0800 eth: fbnic: support setting RSS configuration Let the user program the RSS indirection table and the RSS key. Straightforward implementation. Track the changes and don't bother poking the HW if user asked for a config identical to what's already programmed. The device only supports Toeplitz hash. Similarly to the GET support - all the real code that does the programming was part of initial driver submission, already. Signed-off-by: Alexander Duyck <alexanderduyck@fb.com> Link: https://patch.msgid.link/20241220025241.1522781-5-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c | 55 +++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit ef1c28817bf90aab3a6365ec81c30c09a3b18ece Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 19 18:52:34 2024 -0800 eth: fbnic: don't reset the secondary RSS indir table Secondary RSS indirection table is for additional contexts. It can / should be initialized when such context is created. Since we don't support creating RSS contexts, yet, this change has no user visible effect. Link: https://patch.msgid.link/20241220025241.1522781-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/meta/fbnic/fbnic_rpc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7cb06a6a777cf5a98d6f4edcde5b3937f324efb5 Author: Alexander Duyck <alexanderduyck@fb.com> Date: Thu Dec 19 18:52:33 2024 -0800 eth: fbnic: support querying RSS config The initial driver submission already added all the RSS state, as part of multi-queue support. Expose the configuration via the ethtool APIs. Signed-off-by: Alexander Duyck <alexanderduyck@fb.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Link: https://patch.msgid.link/20241220025241.1522781-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c | 103 ++++++++++++++++++++++++ 1 file changed, 103 insertions(+) commit 7d0bf493b1352ba269f5fefe02dda2b06013f8b5 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 19 18:52:32 2024 -0800 eth: fbnic: reorder ethtool code Define ethtool callback handlers in order in which they are defined in the ops struct. It doesn't really matter what the order is, but it's good to have an order. Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com> Link: https://patch.msgid.link/20241220025241.1522781-2-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c | 158 ++++++++++++------------ 1 file changed, 79 insertions(+), 79 deletions(-) commit f6f1795d0c3753a5ff43e52ee40277a65b464e7c Merge: 8d94a744e1e2 ef1749d50669 Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Dec 23 10:34:48 2024 -0800 Merge branch 'mlx5-misc-changes-2024-12-19' Tariq Toukan says: ==================== mlx5 misc changes 2024-12-19 The first two patches by Rongwei add support for multi-host LAG. The new multi-host NICs provide each host with partial ports, allowing each host to maintain its unique LAG configuration. Patches 3-7 by Moshe, Mark and Yevgeny are enhancements and preparations in fs_core and HW steering, in preparation for future patchsets. Patches 8-9 by Itamar add SW Steering support for ConnectX-8. They are moved here after being part of previous submissions, yet to be accepted. Patch 10 by Carolina cleans up an unnecessary log message. Patch 11 by Patrisious allows RDMA RX steering creation over devices with IB link layer. ==================== Link: https://patch.msgid.link/20241219175841.1094544-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit ef1749d5066984881b3af7a3007c2af91668dd5b Author: Patrisious Haddad <phaddad@nvidia.com> Date: Thu Dec 19 19:58:41 2024 +0200 net/mlx5: fs, Add support for RDMA RX steering over IB link layer Relax the capability check for creating the RDMA RX steering domain by considering only the capabilities reported by the firmware as necessary for its creation, which in turn allows RDMA RX creation over devices with IB link layer as well. The table_miss_action_domain capability is required only for a specific priority, which is handled in mlx5_rdma_enable_roce_steering(). The additional capability check for this case is already in place. Signed-off-by: Patrisious Haddad <phaddad@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241219175841.1094544-12-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) commit f440d69a21f75af1acfdad16d3804750a360613c Author: Carolina Jubran <cjubran@nvidia.com> Date: Thu Dec 19 19:58:40 2024 +0200 net/mlx5: Remove PTM support log message The absence of Precision Time Measurement support should not emit a message, as it can be misleading in contexts where PTM is not required. Remove the log message indicating the lack of PCIe PTM support. Signed-off-by: Carolina Jubran <cjubran@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241219175841.1094544-11-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4d617b57574f8ac04c997bdf9127a4c703a5f1f0 Author: Itamar Gozlan <igozlan@nvidia.com> Date: Thu Dec 19 19:58:39 2024 +0200 net/mlx5: DR, add support for ConnectX-8 steering Add support for a new steering format version that is implemented by ConnectX-8. Except for several differences, the STEv3 is identical to STEv2, so for most callbacks STEv3 context struct will call STEv2 functions. Signed-off-by: Itamar Gozlan <igozlan@nvidia.com> Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241219175841.1094544-10-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/Makefile | 1 + .../mellanox/mlx5/core/steering/sws/dr_domain.c | 2 +- .../mellanox/mlx5/core/steering/sws/dr_ste.c | 2 + .../mellanox/mlx5/core/steering/sws/dr_ste.h | 1 + .../mellanox/mlx5/core/steering/sws/dr_ste_v3.c | 221 +++++++++++++++++++++ .../mellanox/mlx5/core/steering/sws/mlx5_ifc_dr.h | 40 ++++ .../mellanox/mlx5/core/steering/sws/mlx5dr.h | 2 +- 7 files changed, 267 insertions(+), 2 deletions(-) commit aa90a30804a563763eb78f00f56f759b72b91cb0 Author: Itamar Gozlan <igozlan@nvidia.com> Date: Thu Dec 19 19:58:38 2024 +0200 net/mlx5: DR, expand SWS STE callbacks and consolidate common structs Expand SWS STE callbacks to support ConnectX-8 hardware. Move common enums and structures to a shared header file. Signed-off-by: Itamar Gozlan <igozlan@nvidia.com> Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241219175841.1094544-9-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../mellanox/mlx5/core/steering/sws/dr_ste.c | 4 +- .../mellanox/mlx5/core/steering/sws/dr_ste.h | 18 +- .../mellanox/mlx5/core/steering/sws/dr_ste_v0.c | 6 +- .../mellanox/mlx5/core/steering/sws/dr_ste_v1.c | 207 ++++----------------- .../mellanox/mlx5/core/steering/sws/dr_ste_v1.h | 147 ++++++++++++++- .../mellanox/mlx5/core/steering/sws/dr_ste_v2.c | 169 +---------------- .../mellanox/mlx5/core/steering/sws/dr_ste_v2.h | 168 +++++++++++++++++ 7 files changed, 377 insertions(+), 342 deletions(-) commit 429776b6019bbdcf04dcd49706fe7de6a280078b Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Dec 19 19:58:37 2024 +0200 net/mlx5: HWS, do not initialize native API queues HWS has two types of APIs: - Native: fastest and slimmest, async API. The user of this API is required to manage rule handles memory, and to poll for completion for each rule. - BWC: backward compatible API, similar semantics to SWS API. This layer is implemented above native API and it does all the work for the user, so that it is easy to switch between SWS and HWS. Right now the existing users of HWS require only BWC API. Therefore, in order to not waste resources, this patch disables send queues allocation for native API. If in the future support for faster HWS rule insertion will be required (such as for Connection Tracking), native queues can be enabled. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Itamar Gozlan <igozlan@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241219175841.1094544-8-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.h | 6 ++++-- .../net/ethernet/mellanox/mlx5/core/steering/hws/context.c | 6 ++++-- .../net/ethernet/mellanox/mlx5/core/steering/hws/context.h | 6 ++++++ .../net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c | 13 +++++++++++-- 5 files changed, 25 insertions(+), 7 deletions(-) commit 9a0155a709fadaab468a24abca7996c5fdf0507b Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Dec 19 19:58:36 2024 +0200 net/mlx5: HWS, no need to expose mlx5hws_send_queues_open/close No need to have mlx5hws_send_queues_open/close in header. Make them static and remove from header. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Itamar Gozlan <igozlan@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241219175841.1094544-7-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c | 8 ++++---- drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.h | 6 ------ 2 files changed, 4 insertions(+), 10 deletions(-) commit 586face88106481e8c527675a837da8a3ab6677d Author: Mark Bloch <mbloch@nvidia.com> Date: Thu Dec 19 19:58:35 2024 +0200 net/mlx5: fs, retry insertion to hash table on EBUSY When inserting into an rhashtable faster than it can grow, an -EBUSY error may be encountered. Modify the insertion logic to retry on -EBUSY until either a successful insertion or a genuine error is returned. Signed-off-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Link: https://patch.msgid.link/20241219175841.1094544-6-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 31d1356b8fdcdb7fe845874b598cce552a151c64 Author: Moshe Shemesh <moshe@nvidia.com> Date: Thu Dec 19 19:58:34 2024 +0200 net/mlx5: fs, add mlx5_fs_pool API Refactor fc_pool API to create generic fs_pool API, as HW steering has more flow steering elements which can take advantage of the same pool of bulks API. Change fs_counters code to use the fs_pool API. Note, removed __counted_by from struct mlx5_fc_bulk as bulk_len is now inner struct member. It will be added back once __counted_by can support inner struct members. Signed-off-by: Moshe Shemesh <moshe@nvidia.com> Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241219175841.1094544-5-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../net/ethernet/mellanox/mlx5/core/fs_counters.c | 286 ++++++--------------- drivers/net/ethernet/mellanox/mlx5/core/fs_pool.c | 194 ++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/fs_pool.h | 54 ++++ 4 files changed, 327 insertions(+), 209 deletions(-) commit 95f68e06b41b9e88291796efa3969409d13fdd4c Author: Moshe Shemesh <moshe@nvidia.com> Date: Thu Dec 19 19:58:33 2024 +0200 net/mlx5: fs, add counter object to flow destination Currently mlx5_flow_destination includes counter_id which is assigned in case we use flow counter on the flow steering rule. However, counter_id is not enough data in case of using HW Steering. Thus, have mlx5_fc object as part of mlx5_flow_destination instead of counter_id and assign it where needed. In case counter_id is received from user space, create a local counter object to represent it. Signed-off-by: Moshe Shemesh <moshe@nvidia.com> Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241219175841.1094544-4-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/infiniband/hw/mlx5/fs.c | 37 ++++++++++----- .../mellanox/mlx5/core/diag/fs_tracepoint.h | 2 +- .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 20 ++++---- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- .../mellanox/mlx5/core/esw/acl/egress_lgcy.c | 2 +- .../mellanox/mlx5/core/esw/acl/ingress_lgcy.c | 2 +- .../net/ethernet/mellanox/mlx5/core/esw/bridge.c | 20 ++++---- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 1 + .../net/ethernet/mellanox/mlx5/core/fs_counters.c | 53 ++++++++++++++++++++++ .../ethernet/mellanox/mlx5/core/lib/macsec_fs.c | 8 ++-- .../mellanox/mlx5/core/steering/sws/fs_dr.c | 2 +- drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 +- include/linux/mlx5/fs.h | 4 +- 15 files changed, 117 insertions(+), 44 deletions(-) commit 60d01cc468fdb0fbd6b878d66ef86f7e946b0669 Author: Rongwei Liu <rongweil@nvidia.com> Date: Thu Dec 19 19:58:32 2024 +0200 net/mlx5: LAG, Support LAG over Multi-Host NICs New multi-host NICs provide each host with partial ports, allowing each host to maintain its unique LAG configuration. On these multi-host NICs, the 'native_port_num' capability is no longer continuous on each host and can exceed the 'num_lag_ports' capability. Therefore, it is necessary to skip the PFs with ldev->pf[i].dev == NULL when querying/modifying the lag devices' information. There is no need to check dev.native_port_num against ldev->ports. Signed-off-by: Rongwei Liu <rongweil@nvidia.com> Reviewed-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241219175841.1094544-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 200 ++++++++++++++++----- drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h | 3 + drivers/net/ethernet/mellanox/mlx5/core/lag/mp.c | 53 +++--- .../net/ethernet/mellanox/mlx5/core/lag/mpesw.c | 6 +- .../net/ethernet/mellanox/mlx5/core/lag/port_sel.c | 41 ++++- drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 + 6 files changed, 229 insertions(+), 78 deletions(-) commit ddbb5ddc43ad000a984149db5af1133433938404 Author: Rongwei Liu <rongweil@nvidia.com> Date: Thu Dec 19 19:58:31 2024 +0200 net/mlx5: LAG, Refactor lag logic Wrap the lag pf access into two new macros: 1. ldev_for_each() 2. ldev_for_each_reverse() The maximum number of lag ports and the index to `natvie_port_num` mapping will be handled by the two new macros. Users shouldn't use the for loop anymore. Signed-off-by: Rongwei Liu <rongweil@nvidia.com> Reviewed-by: Saeed Mahameed <saeedm@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241219175841.1094544-2-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../net/ethernet/mellanox/mlx5/core/lag/debugfs.c | 13 +- drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 181 +++++++++++---------- drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h | 14 +- drivers/net/ethernet/mellanox/mlx5/core/lag/mp.c | 24 ++- .../net/ethernet/mellanox/mlx5/core/lag/mpesw.c | 10 +- .../net/ethernet/mellanox/mlx5/core/lag/port_sel.c | 16 +- 6 files changed, 137 insertions(+), 121 deletions(-) commit 8d94a744e1e2151429ebbb32f312bc14e969a007 Merge: b4cbbf078ca4 9fc3d6fe8029 Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Dec 23 10:31:01 2024 -0800 Merge branch 'add-rds-ptp-library-for-microchip-phys' Divya Koppera says: ==================== Add rds ptp library for Microchip phys Adds support for rds ptp library in Microchip phys, where rds is internal code name for ptp IP or hardware. This library will be re-used in Microchip phys where same ptp hardware is used. Register base addresses and mmd may changes, due to which base addresses and mmd is made variable in this library. ==================== Link: https://patch.msgid.link/20241219123311.30213-1-divya.koppera@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 9fc3d6fe802923b026ecac16e59c0acdd6744d5d Author: Divya Koppera <divya.koppera@microchip.com> Date: Thu Dec 19 18:03:11 2024 +0530 net: phy: microchip_t1 : Add initialization of ptp for lan887x Add initialization of ptp for lan887x. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Divya Koppera <divya.koppera@microchip.com> Link: https://patch.msgid.link/20241219123311.30213-6-divya.koppera@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/microchip_t1.c | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) commit 85b39f7593e1383b235f1e9b3d943cc2e91b6b10 Author: Divya Koppera <divya.koppera@microchip.com> Date: Thu Dec 19 18:03:10 2024 +0530 net: phy: Makefile: Add makefile support for rds ptp in Microchip phys Add makefile support for rds ptp library. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Signed-off-by: Divya Koppera <divya.koppera@microchip.com> Link: https://patch.msgid.link/20241219123311.30213-5-divya.koppera@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/Makefile | 1 + 1 file changed, 1 insertion(+) commit 2550afc61ef54274ac6f9355df9d33dad2910d3f Author: Divya Koppera <divya.koppera@microchip.com> Date: Thu Dec 19 18:03:09 2024 +0530 net: phy: Kconfig: Add rds ptp library support and 1588 optional flag in Microchip phys Add ptp library support in Kconfig As some of Microchip T1 phys support ptp, add dependency of 1588 optional flag in Kconfig Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Signed-off-by: Divya Koppera <divya.koppera@microchip.com> Link: https://patch.msgid.link/20241219123311.30213-4-divya.koppera@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/Kconfig | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit fa51199c5f34172fc7fd248ca9105e4e0ca6d80a Author: Divya Koppera <divya.koppera@microchip.com> Date: Thu Dec 19 18:03:08 2024 +0530 net: phy: microchip_rds_ptp : Add rds ptp library for Microchip phys Add rds ptp library for Microchip phys 1-step and 2-step modes are supported, over Ethernet and UDP(ipv4, ipv6) Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Signed-off-by: Divya Koppera <divya.koppera@microchip.com> Link: https://patch.msgid.link/20241219123311.30213-3-divya.koppera@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/microchip_rds_ptp.c | 1039 +++++++++++++++++++++++++++++++++++ 1 file changed, 1039 insertions(+) commit d46ef4ee381f0f73b13714f319662f48f0c8b471 Author: Divya Koppera <divya.koppera@microchip.com> Date: Thu Dec 19 18:03:07 2024 +0530 net: phy: microchip_rds_ptp: Add header file for Microchip rds ptp library This rds ptp header file will cover ptp macros for future phys in Microchip where addresses will be same but base offset and mmd address may changes. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Signed-off-by: Divya Koppera <divya.koppera@microchip.com> Link: https://patch.msgid.link/20241219123311.30213-2-divya.koppera@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/microchip_rds_ptp.h | 223 ++++++++++++++++++++++++++++++++++++ 1 file changed, 223 insertions(+) commit b4cbbf078ca49c7e2470cf9ed064c8cd5d5c828f Merge: aa4ad7c3f283 d127ac8b1d4d Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Dec 23 10:29:00 2024 -0800 Merge branch 'vsock-test-tests-for-memory-leaks' Michal Luczaj says: ==================== vsock/test: Tests for memory leaks Series adds tests for recently fixed memory leaks[1]: commit d7b0ff5a8667 ("virtio/vsock: Fix accept_queue memory leak") commit fbf7085b3ad1 ("vsock: Fix sk_error_queue memory leak") commit 60cf6206a1f5 ("virtio/vsock: Improve MSG_ZEROCOPY error handling") Patch 1 is a non-functional preparatory cleanup. Patch 2 is a test suite extension for picking specific tests. Patch 3 explains the need of kmemleak scans. Patch 4 adapts utility functions to handle MSG_ZEROCOPY. Patches 5-6-7 add the tests. NOTE: Test in the last patch ("vsock/test: Add test for MSG_ZEROCOPY completion memory leak") may stop working even before this series is merged. See changes proposed in [2]. The failslab variant would be unaffected. [1] https://lore.kernel.org/20241107-vsock-mem-leaks-v2-0-4e21bfcfc818@rbox.co [2] https://lore.kernel.org/CANn89i+oL+qoPmbbGvE_RT3_3OWgeck7cCPcTafeehKrQZ8kyw@mail.gmail.com v3: https://lore.kernel.org/20241218-test-vsock-leaks-v3-0-f1a4dcef9228@rbox.co v2: https://lore.kernel.org/20241216-test-vsock-leaks-v2-0-55e1405742fc@rbox.co v1: https://lore.kernel.org/20241206-test-vsock-leaks-v1-0-c31e8c875797@rbox.co ==================== Link: https://patch.msgid.link/20241219-test-vsock-leaks-v4-0-a416e554d9d7@rbox.co Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit d127ac8b1d4d3524d292b597100fef96dd909c9b Author: Michal Luczaj <mhal@rbox.co> Date: Thu Dec 19 10:49:34 2024 +0100 vsock/test: Add test for MSG_ZEROCOPY completion memory leak Exercise the ENOMEM error path by attempting to hit net.core.optmem_max limit on send(). Test aims to create a memory leak, kmemleak should be employed. Fixed by commit 60cf6206a1f5 ("virtio/vsock: Improve MSG_ZEROCOPY error handling"). Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Michal Luczaj <mhal@rbox.co> Link: https://patch.msgid.link/20241219-test-vsock-leaks-v4-7-a416e554d9d7@rbox.co Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/vsock/vsock_test.c | 152 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) commit ec50efee8cf814035d82f3b42dad916144d98b38 Author: Michal Luczaj <mhal@rbox.co> Date: Thu Dec 19 10:49:33 2024 +0100 vsock/test: Add test for sk_error_queue memory leak Ask for MSG_ZEROCOPY completion notification, but do not recv() it. Test attempts to create a memory leak, kmemleak should be employed. Fixed by commit fbf7085b3ad1 ("vsock: Fix sk_error_queue memory leak"). Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Michal Luczaj <mhal@rbox.co> Link: https://patch.msgid.link/20241219-test-vsock-leaks-v4-6-a416e554d9d7@rbox.co Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/vsock/vsock_test.c | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit f66ef469a72d19764f943067307a570f83b00dca Author: Michal Luczaj <mhal@rbox.co> Date: Thu Dec 19 10:49:32 2024 +0100 vsock/test: Add test for accept_queue memory leak Attempt to enqueue a child after the queue was flushed, but before SOCK_DONE flag has been set. Test tries to produce a memory leak, kmemleak should be employed. Dealing with a race condition, test by its very nature may lead to a false negative. Fixed by commit d7b0ff5a8667 ("virtio/vsock: Fix accept_queue memory leak"). Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Michal Luczaj <mhal@rbox.co> Link: https://patch.msgid.link/20241219-test-vsock-leaks-v4-5-a416e554d9d7@rbox.co Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/vsock/vsock_test.c | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit f52e7f593b49344b9497c289cbb2ada213f60a7a Author: Michal Luczaj <mhal@rbox.co> Date: Thu Dec 19 10:49:31 2024 +0100 vsock/test: Adapt send_byte()/recv_byte() to handle MSG_ZEROCOPY For a zerocopy send(), buffer (always byte 'A') needs to be preserved (thus it can not be on the stack) or the data recv()ed check in recv_byte() might fail. While there, change the printf format to 0x%02x so the '\0' bytes can be seen. Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Michal Luczaj <mhal@rbox.co> Link: https://patch.msgid.link/20241219-test-vsock-leaks-v4-4-a416e554d9d7@rbox.co Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/vsock/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 50f9434463a0be5b972ee442ba6a9704c9afb02a Author: Michal Luczaj <mhal@rbox.co> Date: Thu Dec 19 10:49:30 2024 +0100 vsock/test: Add README blurb about kmemleak usage Document the suggested use of kmemleak for memory leak detection. Suggested-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Michal Luczaj <mhal@rbox.co> Link: https://patch.msgid.link/20241219-test-vsock-leaks-v4-3-a416e554d9d7@rbox.co Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/vsock/README | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit ef8bd18f475e969753b1b72588a4932195d420f3 Author: Michal Luczaj <mhal@rbox.co> Date: Thu Dec 19 10:49:29 2024 +0100 vsock/test: Introduce option to select tests Allow for selecting specific test IDs to be executed. Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Michal Luczaj <mhal@rbox.co> Link: https://patch.msgid.link/20241219-test-vsock-leaks-v4-2-a416e554d9d7@rbox.co Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/vsock/util.c | 29 +++++++++++++++++++++++++++-- tools/testing/vsock/util.h | 2 ++ tools/testing/vsock/vsock_test.c | 11 +++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) commit f3af3ba1083836d174ada619366783fa17272f66 Author: Michal Luczaj <mhal@rbox.co> Date: Thu Dec 19 10:49:28 2024 +0100 vsock/test: Use NSEC_PER_SEC Replace 1000000000ULL with NSEC_PER_SEC. No functional change intended. Reviewed-by: Luigi Leonardi <leonardi@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Michal Luczaj <mhal@rbox.co> Link: https://patch.msgid.link/20241219-test-vsock-leaks-v4-1-a416e554d9d7@rbox.co Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/vsock/vsock_test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit aa4ad7c3f283fa94b80cf84605661700aa39d708 Author: Yuyang Huang <yuyanghuang@google.com> Date: Sat Dec 21 19:00:07 2024 +0900 netlink: correct nlmsg size for multicast notifications Corrected the netlink message size calculation for multicast group join/leave notifications. The previous calculation did not account for the inclusion of both IPv4/IPv6 addresses and ifa_cacheinfo in the payload. This fix ensures that the allocated message size is sufficient to hold all necessary information. This patch also includes the following improvements: * Uses GFP_KERNEL instead of GFP_ATOMIC when holding the RTNL mutex. * Uses nla_total_size(sizeof(struct in6_addr)) instead of nla_total_size(16). * Removes unnecessary EXPORT_SYMBOL(). Fixes: 2c2b61d2138f ("netlink: add IGMP/MLD join/leave notifications") Cc: Maciej Żenczykowski <maze@google.com> Cc: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: Yuyang Huang <yuyanghuang@google.com> Link: https://patch.msgid.link/20241221100007.1910089-1-yuyanghuang@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/ipv4/igmp.c | 6 ++++-- net/ipv6/addrconf.c | 1 - net/ipv6/mcast.c | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) commit 94ddd8bf98d76f03297a2b33a951711b31f7bc38 Author: Lee Jones <lee@kernel.org> Date: Mon Dec 23 15:18:37 2024 +0000 misc: trivial: Remove undesired double space from struct definition When one is too lazy to use an LSP to conduct look-ups on struct definitions, one might use the ever useful `struct <name> {` search string. However this doesn't work with `struct miscdevice {` because of a stray double space. Assuming that this wasn't intentional, let's simply remove it. Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20241223151843.472645-1-lee@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> include/linux/miscdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f288c7a1ba268a9ed58a7971142a98a1e41a3c73 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 19 16:31:16 2024 -0800 selftests: drv-net: assume stats refresh is 0 if no ethtool -c support Tests using HW stats wait for them to stabilize, using data from ethtool -c as the delay. Not all drivers implement ethtool -c so handle the errors gracefully. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20241220003116.1458863-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/selftests/drivers/net/lib/py/env.py | 9 +++++++-- tools/testing/selftests/net/lib/py/utils.py | 6 ++++-- 2 files changed, 11 insertions(+), 4 deletions(-) commit 85101bda1387e85eabf77cd416bfc38e14f1bce6 Author: YiFei Zhu <zhuyifei@google.com> Date: Thu Dec 19 17:30:04 2024 +0000 sfc: Use netdev refcount tracking in struct efx_async_filter_insertion I was debugging some netdev refcount issues in OpenOnload, and one of the places I was looking at was in the sfc driver. Only struct efx_async_filter_insertion was not using netdev refcount tracker, so add it here. GFP_ATOMIC because this code path is called by ndo_rx_flow_steer which holds RCU. This patch should be a no-op if !CONFIG_NET_DEV_REFCNT_TRACKER Signed-off-by: YiFei Zhu <zhuyifei@google.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20241219173004.2615655-1-zhuyifei@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/sfc/net_driver.h | 2 ++ drivers/net/ethernet/sfc/rx_common.c | 5 +++-- drivers/net/ethernet/sfc/siena/net_driver.h | 2 ++ drivers/net/ethernet/sfc/siena/rx_common.c | 5 +++-- 4 files changed, 10 insertions(+), 4 deletions(-) commit a6ac667467b642c94928c24ac2eb40d20110983c Merge: 6ad7f7196a73 623e43c2f502 Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Dec 23 10:11:07 2024 -0800 Merge branch 'net-bridge-add-skb-drop-reasons-to-the-most-common-drop-points' Radu Rendec says: ==================== net/bridge: Add skb drop reasons to the most common drop points The bridge input code may drop frames for various reasons and at various points in the ingress handling logic. Currently kfree_skb() is used everywhere, and therefore no drop reason is specified. Add drop reasons to the most common drop points. The purpose of this series is to address the most common drop points on the bridge ingress path. It does not exhaustively add drop reasons to the entire bridge code. The intention here is to incrementally add drop reasons to the rest of the bridge code in follow up patches. Most of the skb drop points that are addressed in this series can be easily tested by sending crafted packets. The diagram below shows a simple test configuration, and some examples using `packit`(*) are also included. The bridge is set up with STP disabled. (*) https://github.com/resurrecting-open-source-projects/packit The following changes were *not* tested: * SKB_DROP_REASON_NOMEM in br_flood(). It's not easy to trigger an OOM condition for testing purposes, while everything else works correctly. * All drop reasons in br_multicast_flood(). I could not find an easy way to make a crafted packet get there. * SKB_DROP_REASON_BRIDGE_INGRESS_STP_STATE in br_handle_frame_finish() when the port state is BR_STATE_DISABLED, because in that case the frame is already dropped in the switch/case block at the end of br_handle_frame(). +-------+ | br0 | +---+---+ | +---+---+ veth pair +-------+ | veth0 +-------------+ xeth0 | +-------+ +-------+ SKB_DROP_REASON_MAC_INVALID_SOURCE - br_handle_frame() packit -t UDP -s 192.168.0.1 -d 192.168.0.2 -S 8000 -D 8000 \ -e 01:22:33:44:55:66 -E aa:bb:cc:dd:ee:ff -c 1 \ -p '0x de ad be ef' -i xeth0 SKB_DROP_REASON_MAC_IEEE_MAC_CONTROL - br_handle_frame() packit -t UDP -s 192.168.0.1 -d 192.168.0.2 -S 8000 -D 8000 \ -e 02:22:33:44:55:66 -E 01:80:c2:00:00:01 -c 1 \ -p '0x de ad be ef' -i xeth0 SKB_DROP_REASON_BRIDGE_INGRESS_STP_STATE - br_handle_frame() bridge link set dev veth0 state 0 # disabled packit -t UDP -s 192.168.0.1 -d 192.168.0.2 -S 8000 -D 8000 \ -e 02:22:33:44:55:66 -E aa:bb:cc:dd:ee:ff -c 1 \ -p '0x de ad be ef' -i xeth0 SKB_DROP_REASON_BRIDGE_INGRESS_STP_STATE - br_handle_frame_finish() bridge link set dev veth0 state 2 # learning packit -t UDP -s 192.168.0.1 -d 192.168.0.2 -S 8000 -D 8000 \ -e 02:22:33:44:55:66 -E aa:bb:cc:dd:ee:ff -c 1 \ -p '0x de ad be ef' -i xeth0 SKB_DROP_REASON_NO_TX_TARGET - br_flood() packit -t UDP -s 192.168.0.1 -d 192.168.0.2 -S 8000 -D 8000 \ -e 02:22:33:44:55:66 -E aa:bb:cc:dd:ee:ff -c 1 \ -p '0x de ad be ef' -i xeth0 ==================== Link: https://patch.msgid.link/20241219163606.717758-1-rrendec@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 623e43c2f5023853cbf71d6a60898d448a06416a Author: Radu Rendec <rrendec@redhat.com> Date: Thu Dec 19 11:36:06 2024 -0500 net: bridge: add skb drop reasons to the most common drop points The bridge input code may drop frames for various reasons and at various points in the ingress handling logic. Currently kfree_skb() is used everywhere, and therefore no drop reason is specified. Add drop reasons to the most common drop points. Drop reasons are not added exhaustively to the entire bridge code. The intention is to incrementally add drop reasons to the rest of the bridge code in follow up patches. Signed-off-by: Radu Rendec <rrendec@redhat.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/20241219163606.717758-3-rrendec@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/dropreason-core.h | 12 ++++++++++++ net/bridge/br_forward.c | 16 ++++++++++++---- net/bridge/br_input.c | 20 +++++++++++++++----- 3 files changed, 39 insertions(+), 9 deletions(-) commit 46e0ccfb88f02ab2eb20a41d519d6e4c028652f2 Author: Radu Rendec <rrendec@redhat.com> Date: Thu Dec 19 11:36:05 2024 -0500 net: vxlan: rename SKB_DROP_REASON_VXLAN_NO_REMOTE The SKB_DROP_REASON_VXLAN_NO_REMOTE skb drop reason was introduced in the specific context of vxlan. As it turns out, there are similar cases when a packet needs to be dropped in other parts of the network stack, such as the bridge module. Rename SKB_DROP_REASON_VXLAN_NO_REMOTE and give it a more generic name, so that it can be used in other parts of the network stack. This is not a functional change, and the numeric value of the drop reason even remains unchanged. Signed-off-by: Radu Rendec <rrendec@redhat.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/20241219163606.717758-2-rrendec@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/vxlan/vxlan_core.c | 4 ++-- drivers/net/vxlan/vxlan_mdb.c | 2 +- include/net/dropreason-core.h | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) commit 2c1fd53af21b8cb13878b054894d33d3383eb1f3 Author: Miroslav Ondra <ondra@faster.cz> Date: Sat Dec 21 20:11:04 2024 +0100 serial: amba-pl011: Fix RTS handling in RS485 mode Data loss on serial line was observed during communication through serial ports ttyAMA1 and ttyAMA2 interconnected via RS485 transcievers. Both ports are in one BCM2711 (Compute Module CM40) and they share the same interrupt line. The problem is caused by long waiting for tx queue flush in the function pl011_rs485_tx_stop. Udelay or mdelay are used to wait. The function is called from the interrupt handler. If multiple devices share a single interrupt line, late processing of pending interrupts and data loss may occur. When operation of both devices are synchronous, collisions are quite often. This rework is based on the method used in tty/serial/imx.c Use hrtimer instead of udelay and mdelay calls. Replace simple bool variable rs485_tx_started by 4-state variable rs485_tx_state. Tested-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> Signed-off-by: Miroslav Ondra <ondra@faster.cz> Link: https://lore.kernel.org/r/20241221-amba-rts-v3-1-d3d444681419@faster.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/amba-pl011.c | 126 ++++++++++++++++++++++++++++++---------- 1 file changed, 96 insertions(+), 30 deletions(-) commit b3ee0bc1a065469cfbcef0c35dc42f138563a1fb Author: John Ogness <john.ogness@linutronix.de> Date: Mon Dec 16 18:18:44 2024 +0106 serial: 8250: Explain the role of @read_status_mask The role of @read_status_mask has changed over time and seems to still cause confusion. This can be expected since there is zero documentation about this driver-specific variable. Add comments to the initialization of @read_status_mask to clarify its role. Signed-off-by: John Ogness <john.ogness@linutronix.de> Link: https://lore.kernel.org/r/20241216171244.12783-5-john.ogness@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/8250/8250_omap.c | 6 ++++++ drivers/tty/serial/8250/8250_port.c | 6 ++++++ 2 files changed, 12 insertions(+) commit 9c76c0fa81812619a3de4f3fc681f82c8dc17a66 Author: John Ogness <john.ogness@linutronix.de> Date: Mon Dec 16 18:18:43 2024 +0106 serial: 8250: Never adjust UART_LSR_DR in @read_status_mask The CREAD feature of termios is implemented by setting/clearing UART_LSR_DR within @ignore_status_mask. For this feature to function correctly, it requires that UART_LSR_DR is never masked (unset) in @read_status_mask so that uart_insert_char() can properly drop the character if CREAD is disabled. Currently there are code paths that clear/set UART_LSR_DR from @read_status_mask at times. This appears to be a relic from Linux 1.1.60, where @read_status_mask could be used to mask all UART_LSR reading. However, since Linux 2.1.8 that is no longer the case. Now if UART_LSR_DR is cleared from @read_status_mask, received characters may not be dropped even though CREAD is disabled. This can be seen when: - CREAD is disabled (UART_LSR_DR is set in @ignore_status_mask) - LSR has an error bit set from UART_LSR_BRK_ERROR_BITS (and that error is not ignored via @ignore_status_mask) - UART_LSR_DR is cleared in @read_status_mask In this case characters will be inserted into the tty buffer even though they should be ignored. Remove all setting/clearing of UART_LSR_DR for @read_status_mask except for its initialization. Signed-off-by: John Ogness <john.ogness@linutronix.de> Link: https://lore.kernel.org/r/20241216171244.12783-4-john.ogness@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/8250/8250_core.c | 1 - drivers/tty/serial/8250/8250_omap.c | 1 - drivers/tty/serial/8250/8250_port.c | 1 - 3 files changed, 3 deletions(-) commit 9d31746b5385c3f760746f7b2d63b702e2f80de0 Author: John Ogness <john.ogness@linutronix.de> Date: Mon Dec 16 18:18:42 2024 +0106 serial: 8250: Do not set UART_LSR_THRE in @read_status_mask Since Linux 2.1.8 @read_status_mask is no longer used as a general control of which bits are used from the LSR register. Instead it has become an additional mask applied to @ignore_status_mask. Since UART_LSR_THRE is never set for @ignore_status_mask, it serves no purpose to set it for @read_status_mask. In fact, it propagates the misconception that @read_status_mask can be used as a general mask for LSR bits. Do not set UART_LSR_THRE for @read_status_mask. Signed-off-by: John Ogness <john.ogness@linutronix.de> Link: https://lore.kernel.org/r/20241216171244.12783-3-john.ogness@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/8250/8250_omap.c | 2 +- drivers/tty/serial/8250/8250_port.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c9f49e3e45fccae1841ae61bc5187fef18419ce6 Author: John Ogness <john.ogness@linutronix.de> Date: Mon Dec 16 18:18:41 2024 +0106 serial: 8250: Use @ier bits to determine if Rx is stopped Commit f19c3f6c8109 ("serial: 8250_port: Don't service RX FIFO if throttled") uses @read_status_mask (bit UART_LSR_DR) to determine if Rx has been stopped. However, the bit UART_LSR_DR is not managed properly in @read_status_mask for all Rx stop/start situations and is therefore not suitable for this purpose. Use the UART_IER_RLSI and UART_IER_RDI bits in @ier instead, as this is already common in 8250-variants and drivers. Signed-off-by: John Ogness <john.ogness@linutronix.de> Link: https://lore.kernel.org/r/20241216171244.12783-2-john.ogness@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/8250/8250_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e95cb63e57381f00d9274533ea7fd0ac3bf4e5b0 Author: Rengarajan S <rengarajan.s@microchip.com> Date: Wed Dec 18 15:10:17 2024 +0530 8250: microchip: pci1xxxx: Add workaround for RTS bit toggle In the B0 revision, the RTS pin remains high due to incorrect hardware mapping. To address this issue, enable auto-direction control with the RTS bit in ADCL_CFG_REG. This configuration ensures that the RTS pin goes low when the terminal is opened and high when the terminal is closed. Additionally, we reset the step counter for Rx and Tx engines by writing into FRAC_DIV_CFG_REG. Signed-off-by: Rengarajan S <rengarajan.s@microchip.com> Link: https://lore.kernel.org/r/20241218094017.18290-1-rengarajan.s@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/8250/8250_pci1xxxx.c | 60 ++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) commit 6ad7f7196a732d960a264f32aa2d052f260f9f0c Merge: a502ea6fa94b c12e82c053f6 Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Dec 23 09:54:35 2024 -0800 Merge branch 'add-more-feautues-for-enetc-v4-round-1' Wei Fang says: ==================== Add more feautues for ENETC v4 - round 1 Compared to ENETC v1 (LS1028A), ENETC v4 (i.MX95) adds more features, and some features are configured completely differently from v1. In order to more fully support ENETC v4, these features will be added through several rounds of patch sets. This round adds these features, such as Tx and Rx checksum offload, increase maximum chained Tx BD number and Large send offload (LSO). v1 Link: https://lore.kernel.org/20241107033817.1654163-1-wei.fang@nxp.com v2 Link: https://lore.kernel.org/20241111015216.1804534-1-wei.fang@nxp.com v3 Link: https://lore.kernel.org/20241112091447.1850899-1-wei.fang@nxp.com v4 Link: https://lore.kernel.org/20241115024744.1903377-1-wei.fang@nxp.com v5 Link: https://lore.kernel.org/20241118060630.1956134-1-wei.fang@nxp.com v6 Link: https://lore.kernel.org/20241119082344.2022830-1-wei.fang@nxp.com v6 RESEND Link: https://lore.kernel.org/20241204052932.112446-1-wei.fang@nxp.com v7 Link: https://lore.kernel.org/20241211063752.744975-1-wei.fang@nxp.com v8 Link: https://lore.kernel.org/20241213021731.1157535-1-wei.fang@nxp.com ==================== Link: https://patch.msgid.link/20241219054755.1615626-1-wei.fang@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit c12e82c053f6f444a6644ae937b037a3272d6c5a Author: Wei Fang <wei.fang@nxp.com> Date: Thu Dec 19 13:47:55 2024 +0800 net: enetc: add UDP segmentation offload support Set NETIF_F_GSO_UDP_L4 bit of hw_features and features because i.MX95 enetc and LS1028A driver implements UDP segmentation. - i.MX95 ENETC supports UDP segmentation via LSO. - LS1028A ENETC supports UDP segmentation since the commit 3d5b459ba0e3 ("net: tso: add UDP segmentation support"). Signed-off-by: Wei Fang <wei.fang@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20241219054755.1615626-5-wei.fang@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/freescale/enetc/enetc_pf_common.c | 6 ++++-- drivers/net/ethernet/freescale/enetc/enetc_vf.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit 69797ff888d3dbab035a0d2516b554285b094e3c Author: Wei Fang <wei.fang@nxp.com> Date: Thu Dec 19 13:47:54 2024 +0800 net: enetc: add LSO support for i.MX95 ENETC PF ENETC rev 4.1 supports large send offload (LSO), segmenting large TCP and UDP transmit units into multiple Ethernet frames. To support LSO, software needs to fill some auxiliary information in Tx BD, such as LSO header length, frame length, LSO maximum segment size, etc. At 1Gbps link rate, TCP segmentation was tested using iperf3, and the CPU performance before and after applying the patch was compared through the top command. It can be seen that LSO saves a significant amount of CPU cycles compared to software TSO. Before applying the patch: %Cpu(s): 0.1 us, 4.1 sy, 0.0 ni, 85.7 id, 0.0 wa, 0.5 hi, 9.7 si After applying the patch: %Cpu(s): 0.1 us, 2.3 sy, 0.0 ni, 94.5 id, 0.0 wa, 0.4 hi, 2.6 si Signed-off-by: Wei Fang <wei.fang@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com> Link: https://patch.msgid.link/20241219054755.1615626-4-wei.fang@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/freescale/enetc/enetc.c | 264 ++++++++++++++++++++- drivers/net/ethernet/freescale/enetc/enetc.h | 14 ++ drivers/net/ethernet/freescale/enetc/enetc4_hw.h | 23 ++ drivers/net/ethernet/freescale/enetc/enetc_hw.h | 16 +- .../net/ethernet/freescale/enetc/enetc_pf_common.c | 3 + 5 files changed, 310 insertions(+), 10 deletions(-) commit 93c5d5a0ddf8ad39661a087edb45286a0a55f7e6 Author: Wei Fang <wei.fang@nxp.com> Date: Thu Dec 19 13:47:53 2024 +0800 net: enetc: update max chained Tx BD number for i.MX95 ENETC The max chained Tx BDs of latest ENETC (i.MX95 ENETC, rev 4.1) has been increased to 63, but since the range of MAX_SKB_FRAGS is 17~45, so for i.MX95 ENETC and later revision, it is better to set ENETC4_MAX_SKB_FRAGS to MAX_SKB_FRAGS. In addition, add max_frags in struct enetc_drvdata to indicate the max chained BDs supported by device. Because the max number of chained BDs supported by LS1028A and i.MX95 ENETC is different. Signed-off-by: Wei Fang <wei.fang@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241219054755.1615626-3-wei.fang@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/freescale/enetc/enetc.c | 13 +++++++++---- drivers/net/ethernet/freescale/enetc/enetc.h | 13 +++++++++++-- drivers/net/ethernet/freescale/enetc/enetc_pf_common.c | 1 + drivers/net/ethernet/freescale/enetc/enetc_vf.c | 1 + 4 files changed, 22 insertions(+), 6 deletions(-) commit d9a093d2d12aec87ed0a2ac660b3a62261bef966 Author: Wei Fang <wei.fang@nxp.com> Date: Thu Dec 19 13:47:52 2024 +0800 net: enetc: add Tx checksum offload for i.MX95 ENETC In addition to supporting Rx checksum offload, i.MX95 ENETC also supports Tx checksum offload. The transmit checksum offload is implemented through the Tx BD. To support Tx checksum offload, software needs to fill some auxiliary information in Tx BD, such as IP version, IP header offset and size, whether L4 is UDP or TCP, etc. Same as Rx checksum offload, Tx checksum offload capability isn't defined in register, so tx_csum bit is added to struct enetc_drvdata to indicate whether the device supports Tx checksum offload. Signed-off-by: Wei Fang <wei.fang@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com> Link: https://patch.msgid.link/20241219054755.1615626-2-wei.fang@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/freescale/enetc/enetc.c | 53 +++++++++++++++++++--- drivers/net/ethernet/freescale/enetc/enetc.h | 2 + drivers/net/ethernet/freescale/enetc/enetc_hw.h | 15 ++++-- .../net/ethernet/freescale/enetc/enetc_pf_common.c | 3 ++ 4 files changed, 63 insertions(+), 10 deletions(-) commit 8534229375f8cc4422039fbad74c4ca01ef2f651 Author: Xu Yang <xu.yang_2@nxp.com> Date: Wed Dec 11 18:57:53 2024 +0800 usb: typec: tcpci: set local CC to Rd only when cc1/cc2 status is Rp The cc1 and cc2 status returned by tcpci_get_cc() may be TYPEC_CC_OPEN or TYPEC_CC_RA. So don't assume it's just TYPEC_CC_RD or TYPEC_CC_RP_*. This will let local port present Rd on CC only when cc1/cc2 status is TYPEC_CC_RP_*. Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20241211105753.1205312-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/tcpm/tcpci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c975c9b8f8204c34213e9a6821f597bbda021f8e Author: Jun Yan <jerrysteve1101@gmail.com> Date: Fri Dec 13 22:53:14 2024 +0800 USB: usblp: remove redundant semicolon remove redundant semicolon in LPIOC_SOFT_RESET to fix the incorrect macro expansion syntax. Signed-off-by: Jun Yan <jerrysteve1101@gmail.com> Link: https://lore.kernel.org/r/20241213145314.785616-1-jerrysteve1101@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/class/usblp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9509b499349965ee866aae8eea85e909d798c11 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Thu Dec 12 23:30:05 2024 +0800 USB: Optimize goto logic in API usb_register_driver() usb_register_driver() uses complex goto statements to handle simple error cases, move down the goto label 'out' a bit to - Simplify goto logic - Leverage pr_err() prompt for driver registering failure. Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241212-fix_usb-v1-1-300eb440c753@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/core/driver.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 31d500c2d0d4f71d9555b39951c02c1561d3ae55 Author: Roger Quadros <rogerq@kernel.org> Date: Thu Dec 12 14:53:45 2024 +0200 usb: dwc3: dwc3-am62: Re-initialize controller if lost power in PM suspend If controller looses power during PM suspend then re-initialize it. We use the DEBUG_CFG register to track if controller lost power or was reset in PM suspend. Move all initialization code into dwc3_ti_init() so it can be re-used. Signed-off-by: Roger Quadros <rogerq@kernel.org> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/20241212-am62-dwc3-io-ddr-v3-1-10b95cd7e9c0@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/dwc3/dwc3-am62.c | 82 +++++++++++++++++++++++++++++--------------- 1 file changed, 55 insertions(+), 27 deletions(-) commit fe021328dfc29ef617a969a04d8727d5a57ae6f9 Author: Lucy Mielke <lucymielke@icloud.com> Date: Tue Dec 10 11:29:09 2024 +0100 usb: common: expand documentation for USB functions This patch adds documentation for two USB functions: - usb_otg_state_string(), which returns a human-readable name for OTG states and - usb_get_dr_mode_from_string(), which returns the dual role mode for a given string. Signed-off-by: Lucy Mielke <lucymielke@icloud.com> Link: https://lore.kernel.org/r/6nvegfmo6d5ak4soaf5nyifsaasfts4qlsnnpsd4sgpnikc2jd@amfmgdr5n3bi Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/common/common.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ded71f07f92f83b7695f974db9951a8b014cbefc Author: Heikki Krogerus <heikki.krogerus@linux.intel.com> Date: Thu Dec 5 13:39:19 2024 +0200 usb: typec: intel_pmc_mux: Silence snprintf() output truncation warning In the function pmc_mux_port_debugfs_init() the buffer for the name of the port is limited to six bytes. That makes the compiler think that the output of "port%d" may be truncated. That can't actually happen as the interface can support maximum of eight ports. To make the compiler happy just increase the buffer to where the warning goes away. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412031437.vX580pxx-lkp@intel.com/ Cc: Rajat Khandelwal <rajat.khandelwal@linux.intel.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20241205113919.1182673-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/mux/intel_pmc_mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07089083a526ea19daa72a1edf9d6e209615b77c Author: Thomas Hellström <thomas.hellstrom@linux.intel.com> Date: Mon Dec 23 14:42:50 2024 +0100 drm/xe/tracing: Fix a potential TP_printk UAF The commit afd2627f727b ("tracing: Check "%s" dereference via the field and not the TP_printk format") exposes potential UAFs in the xe_bo_move trace event. Fix those by avoiding dereferencing the xe_mem_type_to_name[] array at TP_printk time. Since some code refactoring has taken place, explicit backporting may be needed for kernels older than 6.10. Fixes: e46d3f813abd ("drm/xe/trace: Extract bo, vm, vma traces") Cc: Gustavo Sousa <gustavo.sousa@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: intel-xe@lists.freedesktop.org Cc: <stable@vger.kernel.org> # v6.11+ Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241223134250.14345-1-thomas.hellstrom@linux.intel.com drivers/gpu/drm/xe/xe_trace_bo.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e5de3f9da5243a57747d0d4a4385a960205dfbb2 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Sun Dec 22 21:58:31 2024 +0000 perf path: Remove unused is_executable_file() is_executable_file() has been unused since 2022's commit 7391db6459388d47 ("perf test: Refactor shell tests allowing subdirs") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Carsten Haitzler <carsten.haitzler@arm.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241222215831.283248-1-linux@treblig.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/path.c | 12 ------------ tools/perf/util/path.h | 1 - 2 files changed, 13 deletions(-) commit 2f4847b5d62cdfb8814edde178d094d0a9392ee0 Author: Ian Rogers <irogers@google.com> Date: Thu Nov 14 15:07:12 2024 -0800 perf values: Use evsel rather than evsel->idx An evsel idx may not be stable due to sorting, evlist removal, etc. Avoid use of the idx where the evsel itself can be used to avoid these problems. This removed 1 values array and duplicated evsel name strings. Reviewed-by: James Clark <james.clark@linaro.org> Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Chen Ni <nichen@iscas.ac.cn> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241114230713.330701-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-report.c | 4 +- tools/perf/util/values.c | 106 +++++++++++++++++++------------------------- tools/perf/util/values.h | 9 ++-- 3 files changed, 51 insertions(+), 68 deletions(-) commit 2f0539fa02672e4a703e0d4205f40caa0a141d22 Author: Ian Rogers <irogers@google.com> Date: Thu Nov 14 15:07:11 2024 -0800 perf stream: Use evsel rather than evsel->idx An evsel idx may not be stable due to sorting, evlist removal, etc. Avoid use of the idx where the evsel itself can be used to avoid these problems. Reviewed-by: James Clark <james.clark@linaro.org> Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Chen Ni <nichen@iscas.ac.cn> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241114230713.330701-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-diff.c | 4 ++-- tools/perf/util/stream.c | 7 +++---- tools/perf/util/stream.h | 10 +++++----- 3 files changed, 10 insertions(+), 11 deletions(-) commit 518413d89ce498d35f6cb7104dd8c32f6e87a9aa Author: Ian Rogers <irogers@google.com> Date: Wed Jun 5 21:49:59 2024 -0700 perf Documentation: Describe the PMU naming convention It is an existing convention to use suffixes with PMU names. Try to capture that convention so that future PMU devices may adhere to it. The name of the file and date within the file try to follow existing conventions, particularly sysfs-bus-event_source-devices-events. Reviewed-by: James Clark <james.clark@arm.com> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Reviewed-by: Leo Yan <leo.yan@arm.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Bharat Bhushan <bbhushan2@marvell.com> Cc: Bhaskara Budiredla <bbudiredla@marvell.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ravi Bangoria <ravi.bangoria@amd.com> Cc: Robin Murphy <robin.murphy@arm.com> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Tuan Phan <tuanphan@os.amperecomputing.com> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20240606044959.335715-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> .../ABI/testing/sysfs-bus-event_source-devices | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 26f45ec8f0367f8ee54dff5c7f2cfe8d445f3da8 Author: Ian Rogers <irogers@google.com> Date: Thu Nov 14 09:23:09 2024 -0800 perf jevents: Provide better path information for broken JSON If the JSON input to jevents.py is broken it can be problematic to work out which particular JSON file is broken. When processing files catch exceptions that occur that re-raise the exception with path details added. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Benjamin Gray <bgray@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sandipan Das <sandipan.das@amd.com> Cc: Stephane Eranian <eranian@google.com> Cc: Xu Yang <xu.yang_2@nxp.com> Link: https://lore.kernel.org/r/20241114172309.840241-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/pmu-events/jevents.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 91a5bffa56fd447d5380d58d4b30be527520e96f Author: Namhyung Kim <namhyung@kernel.org> Date: Thu Dec 19 22:00:09 2024 -0800 perf lock contention: Handle slab objects in -L/--lock-filter option This is to filter lock contention from specific slab objects only. Like in the lock symbol output, we can use '&' prefix to filter slab object names. root@virtme-ng:/home/namhyung/project/linux# tools/perf/perf lock con -abl sleep 1 contended total wait max wait avg wait address symbol 3 14.99 us 14.44 us 5.00 us ffffffff851c0940 pack_mutex (mutex) 2 2.75 us 2.56 us 1.38 us ffff98d7031fb498 &task_struct (mutex) 4 1.42 us 557 ns 355 ns ffff98d706311400 &kmalloc-cg-512 (mutex) 2 953 ns 714 ns 476 ns ffffffff851c3620 delayed_uprobe_lock (mutex) 1 929 ns 929 ns 929 ns ffff98d7031fb538 &task_struct (mutex) 3 561 ns 210 ns 187 ns ffffffff84a8b3a0 text_mutex (mutex) 1 479 ns 479 ns 479 ns ffffffff851b4cf8 tracepoint_srcu_srcu_usage (mutex) 2 320 ns 195 ns 160 ns ffffffff851cf840 pcpu_alloc_mutex (mutex) 1 212 ns 212 ns 212 ns ffff98d7031784d8 &signal_cache (mutex) 1 177 ns 177 ns 177 ns ffffffff851b4c28 tracepoint_srcu_srcu_usage (mutex) With the filter, it can show contentions from the task_struct only. root@virtme-ng:/home/namhyung/project/linux# tools/perf/perf lock con -abl -L '&task_struct' sleep 1 contended total wait max wait avg wait address symbol 2 1.97 us 1.71 us 987 ns ffff98d7032fd658 &task_struct (mutex) 1 1.20 us 1.20 us 1.20 us ffff98d7032fd6f8 &task_struct (mutex) It can work with other aggregation mode: root@virtme-ng:/home/namhyung/project/linux# tools/perf/perf lock con -ab -L '&task_struct' sleep 1 contended total wait max wait avg wait type caller 1 25.10 us 25.10 us 25.10 us mutex perf_event_exit_task+0x39 1 21.60 us 21.60 us 21.60 us mutex futex_exit_release+0x21 1 5.56 us 5.56 us 5.56 us mutex futex_exec_release+0x21 Committer testing: root@number:~# perf lock con -abl sleep 1 contended total wait max wait avg wait address symbol 1 20.80 us 20.80 us 20.80 us ffff9d417fbd65d0 (spinlock) 8 12.85 us 2.41 us 1.61 us ffff9d415eeb6a40 rq_lock (spinlock) 1 2.55 us 2.55 us 2.55 us ffff9d415f636a40 rq_lock (spinlock) 7 1.92 us 840 ns 274 ns ffff9d39c2cbc8c4 (spinlock) 1 1.23 us 1.23 us 1.23 us ffff9d415fb36a40 rq_lock (spinlock) 2 928 ns 738 ns 464 ns ffff9d39c1fa6660 &kmalloc-rnd-14-192 (rwlock) 4 788 ns 252 ns 197 ns ffffffffb8608a80 jiffies_lock (spinlock) 1 304 ns 304 ns 304 ns ffff9d39c2c979c4 (spinlock) 1 216 ns 216 ns 216 ns ffff9d3a0225c660 &kmalloc-rnd-14-192 (rwlock) 1 89 ns 89 ns 89 ns ffff9d3a0adbf3e0 &kmalloc-rnd-14-192 (rwlock) 1 61 ns 61 ns 61 ns ffff9d415f9b6a40 rq_lock (spinlock) root@number:~# uname -r 6.13.0-rc2 root@number:~# Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: Chun-Tse Shao <ctshao@google.com> Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Kees Cook <kees@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Roman Gushchin <roman.gushchin@linux.dev> Cc: Song Liu <song@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Link: https://lore.kernel.org/r/20241220060009.507297-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-lock.c | 35 ++++++++++++++++++++++ tools/perf/util/bpf_lock_contention.c | 40 ++++++++++++++++++++++++-- tools/perf/util/bpf_skel/lock_contention.bpf.c | 21 +++++++++++++- tools/perf/util/lock-contention.h | 2 ++ 4 files changed, 95 insertions(+), 3 deletions(-) commit 0c631ef07c96536a66d8168dc7e176de5fa82878 Author: Namhyung Kim <namhyung@kernel.org> Date: Thu Dec 19 22:00:08 2024 -0800 perf lock contention: Resolve slab object name using BPF The bpf_get_kmem_cache() kfunc can return an address of the slab cache (kmem_cache). As it has the name of the slab cache from the iterator, we can use it to symbolize some dynamic kernel locks in a slab. Before: root@virtme-ng:/home/namhyung/project/linux# tools/perf/perf lock con -abl sleep 1 contended total wait max wait avg wait address symbol 2 3.34 us 2.87 us 1.67 us ffff9d7800ad9600 (mutex) 2 2.16 us 1.93 us 1.08 us ffff9d7804b992d8 (mutex) 4 1.37 us 517 ns 343 ns ffff9d78036e6e00 (mutex) 1 1.27 us 1.27 us 1.27 us ffff9d7804b99378 (mutex) 2 845 ns 599 ns 422 ns ffffffff9e1c3620 delayed_uprobe_lock (mutex) 1 845 ns 845 ns 845 ns ffffffff9da0b280 jiffies_lock (spinlock) 2 377 ns 259 ns 188 ns ffffffff9e1cf840 pcpu_alloc_mutex (mutex) 1 305 ns 305 ns 305 ns ffffffff9e1b4cf8 tracepoint_srcu_srcu_usage (mutex) 1 295 ns 295 ns 295 ns ffffffff9e1c0940 pack_mutex (mutex) 1 232 ns 232 ns 232 ns ffff9d7804b7d8d8 (mutex) 1 180 ns 180 ns 180 ns ffffffff9e1b4c28 tracepoint_srcu_srcu_usage (mutex) 1 165 ns 165 ns 165 ns ffffffff9da8b3a0 text_mutex (mutex) After: root@virtme-ng:/home/namhyung/project/linux# tools/perf/perf lock con -abl sleep 1 contended total wait max wait avg wait address symbol 2 1.95 us 1.77 us 975 ns ffff9d5e852d3498 &task_struct (mutex) 1 1.18 us 1.18 us 1.18 us ffff9d5e852d3538 &task_struct (mutex) 4 1.12 us 354 ns 279 ns ffff9d5e841ca800 &kmalloc-cg-512 (mutex) 2 859 ns 617 ns 429 ns ffffffffa41c3620 delayed_uprobe_lock (mutex) 3 691 ns 388 ns 230 ns ffffffffa41c0940 pack_mutex (mutex) 3 421 ns 164 ns 140 ns ffffffffa3a8b3a0 text_mutex (mutex) 1 409 ns 409 ns 409 ns ffffffffa41b4cf8 tracepoint_srcu_srcu_usage (mutex) 2 362 ns 239 ns 181 ns ffffffffa41cf840 pcpu_alloc_mutex (mutex) 1 220 ns 220 ns 220 ns ffff9d5e82b534d8 &signal_cache (mutex) 1 215 ns 215 ns 215 ns ffffffffa41b4c28 tracepoint_srcu_srcu_usage (mutex) Note that the name starts with '&' sign for slab objects to inform they are dynamic locks. It won't give the accurate lock or type names but it's still useful. We may add type info to the slab cache later to get the exact name of the lock in the type later. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: Chun-Tse Shao <ctshao@google.com> Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Kees Cook <kees@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Roman Gushchin <roman.gushchin@linux.dev> Cc: Song Liu <song@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Link: https://lore.kernel.org/r/20241220060009.507297-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/bpf_lock_contention.c | 52 ++++++++++++++++++++++++++ tools/perf/util/bpf_skel/lock_contention.bpf.c | 26 ++++++++++++- 2 files changed, 76 insertions(+), 2 deletions(-) commit e2c4dc54cd52612d612f49ba728a4b2d008e4fd8 Author: Namhyung Kim <namhyung@kernel.org> Date: Thu Dec 19 22:00:07 2024 -0800 perf lock contention: Run BPF slab cache iterator Recently the kernel got the kmem_cache iterator to traverse metadata of slab objects. This can be used to symbolize dynamic locks in a slab. The new slab_caches hash map will have the pointer of the kmem_cache as a key and save the name and a id. The id will be saved in the flags part of the lock. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: Chun-Tse Shao <ctshao@google.com> Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Kees Cook <kees@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Roman Gushchin <roman.gushchin@linux.dev> Cc: Song Liu <song@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Link: https://lore.kernel.org/r/20241220060009.507297-3-namhyung@kernel.org [ Added change from Namhyung addressing review from Alexei: ] Link: https://lore.kernel.org/r/Z2dVdH3o5iF-KrWj@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/bpf_lock_contention.c | 50 ++++++++++++++++++++++++++ tools/perf/util/bpf_skel/lock_contention.bpf.c | 48 +++++++++++++++++++++++++ tools/perf/util/bpf_skel/lock_data.h | 12 +++++++ tools/perf/util/bpf_skel/vmlinux/vmlinux.h | 8 +++++ 4 files changed, 118 insertions(+) commit 479b2f4590bebd4a5a5ac9cb4c4803f4edf86768 Author: Gabriel Krisman Bertazi <krisman@suse.de> Date: Mon Dec 16 15:46:07 2024 -0500 io_uring: Fold allocation into alloc_cache helper The allocation paths that use alloc_cache duplicate the same code pattern, sometimes in a quite convoluted way. Fold the allocation into the cache code itself, making it just an allocator function, and keeping the cache policy invisible to callers. Another justification for doing this, beyond code simplicity, is that it makes it trivial to test the impact of disabling the cache and using slab directly, which I've used for slab improvement experiments. One relevant detail is that we provide a callback to optionally initialize memory only when we actually reach slab. This allows us to avoid blindly executing the allocation with GFP_ZERO and only clean fields when they matter. Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://lore.kernel.org/r/20241216204615.759089-2-krisman@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/alloc_cache.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 29b95ac917927ce9f95bf38797e16333ecb489b1 Author: Pavel Begunkov <asml.silence@gmail.com> Date: Sun Dec 8 21:43:22 2024 +0000 io_uring: prevent reg-wait speculations With *ENTER_EXT_ARG_REG instead of passing a user pointer with arguments for the waiting loop the user can specify an offset into a pre-mapped region of memory, in which case the [offset, offset + sizeof(io_uring_reg_wait)) will be intepreted as the argument. As we address a kernel array using a user given index, it'd be a subject to speculation type of exploits. Use array_index_nospec() to prevent that. Make sure to pass not the full region size but truncate by the maximum offset allowed considering the structure size. Fixes: d617b3147d54c ("io_uring: restore back registered wait arguments") Fixes: aa00f67adc2c0 ("io_uring: add support for fixed wait regions") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/1e3d9da7c43d619de7bcf41d1cd277ab2688c443.1733694126.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/io_uring.c | 1 + 1 file changed, 1 insertion(+) commit de3b9e2e48190be28473ea84c384bc64931facf7 Author: Pavel Begunkov <asml.silence@gmail.com> Date: Sun Dec 8 21:46:01 2024 +0000 io_uring: don't vmap single page regions When io_check_coalesce_buffer() meets a single page buffer it bails out and tells that it can be coalesced. That's fine for registered buffers as io_coalesce_buffer() wouldn't change anything, but the region code now uses the function to decided on whether to vmap the buffer or not. Report that a single page buffer is trivially coalescable and let io_sqe_buffer_register() to filter them. Fixes: c4d0ac1c1567 ("io_uring/memmap: optimise single folio regions") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/cb83e053f318857068447d40c95becebcd8aeced.1733689833.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/rsrc.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 2e6406a20a3999cc761a5a697a9afa7de40713e6 Author: David Wei <dw@davidwei.uk> Date: Fri Dec 6 16:41:44 2024 -0800 io_uring: clean up io_prep_rw_setup() Remove unnecessary call to iov_iter_save_state() in io_prep_rw_setup() as io_import_iovec() already does this. Then the result from io_import_iovec() can be returned directly. Signed-off-by: David Wei <dw@davidwei.uk> Reviewed-by: Anuj Gupta <anuj20.g@samsung.com> Tested-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20241207004144.783631-1-dw@davidwei.uk Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/rw.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit febfbf767174b8a027efb7aa434f9a9416adc23d Author: Colin Ian King <colin.i.king@gmail.com> Date: Wed Dec 4 15:39:23 2024 +0000 io_uring/kbuf: fix unintentional sign extension on shift of reg.bgid Shifting reg.bgid << IORING_OFF_PBUF_SHIFT results in a promotion from __u16 to a 32 bit signed integer, this is then sign extended to a 64 bit unsigned long on 64 bit architectures. If reg.bgid is greater than 0x7fff then this leads to a sign extended result where all the upper 32 bits of mmap_offset are set to 1. Fix this by casting reg.bgid to the same type as mmap_offset before performing the shift. Fixes: ef62de3c4ad5 ("io_uring/kbuf: use region api for pbuf rings") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20241204153923.401674-1-colin.i.king@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/kbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 546d191427cf5cf3215529744c2ea8558f0279db Author: Jens Axboe <axboe@kernel.dk> Date: Fri Nov 29 15:53:58 2024 -0700 block: make bio_integrity_map_user() static inline If CONFIG_BLK_DEV_INTEGRITY isn't set, then the dummy helper must be static inline to avoid complaints about the function being unused. Fixes: fe8f4ca7107e ("block: modify bio_integrity_map_user to accept iov_iter as argument") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202411300229.y7h60mDg-lkp@intel.com/ Signed-off-by: Jens Axboe <axboe@kernel.dk> include/linux/bio-integrity.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb01ecb79943367f9903b1f1ffb4afb6a3f4d715 Author: Bart Van Assche <bvanassche@acm.org> Date: Tue Dec 17 13:03:10 2024 -0800 blk-zoned: Split queue_zone_wplugs_show() Reduce the indentation level of the code in queue_zone_wplugs_show() by moving the body of the loop in that function into a new function. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20241217210310.645966-5-bvanassche@acm.org Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-zoned.c | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) commit fa8555630b32da7c239a1e01e9eb1bb040be59ac Author: Bart Van Assche <bvanassche@acm.org> Date: Tue Dec 17 13:03:09 2024 -0800 blk-zoned: Improve the queue reference count strategy documentation For the blk_queue_exit() calls, document where the corresponding code can be found that increases q->q_usage_counter. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20241217210310.645966-4-bvanassche@acm.org Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-zoned.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit cbac56e5237dbec9ae3d896e71f24e95e06eafa3 Author: Bart Van Assche <bvanassche@acm.org> Date: Tue Dec 17 13:03:08 2024 -0800 blk-zoned: Document locking assumptions Document which functions expect that their callers must hold a lock. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20241217210310.645966-3-bvanassche@acm.org Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-zoned.c | 4 ++++ 1 file changed, 4 insertions(+) commit 48ea518d0072e29a7af304258a4cedb3e7eea308 Author: Bart Van Assche <bvanassche@acm.org> Date: Tue Dec 17 13:03:07 2024 -0800 blk-zoned: Minimize #include directives Only include those header files that are necessary. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20241217210310.645966-2-bvanassche@acm.org Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-zoned.c | 4 ---- 1 file changed, 4 deletions(-) commit 31d813a3b8cbde2d09ba4dee282ca29096541006 Author: Andreas Hindborg <a.hindborg@kernel.org> Date: Fri Dec 20 10:37:57 2024 +0100 rust: block: fix use of BLK_MQ_F_SHOULD_MERGE BLK_MQ_F_SHOULD_MERGE has was removed [1] and is now in effect by default. So remove the flag from tag sets of Rust block device drivers. Link: https://lore.kernel.org/r/20241219060214.1928848-1-hch@lst.de [1] Fixes: 9377b95cda73 ("block: remove BLK_MQ_F_SHOULD_MERGE") Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org> Link: https://lore.kernel.org/r/20241220-merge-flag-fix-v1-1-41b7778dac06@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk> rust/kernel/block/mq/tag_set.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc76ace465d6977b47daa427379b7be1e0976f12 Author: Christoph Hellwig <hch@lst.de> Date: Thu Dec 19 07:01:59 2024 +0100 block: remove BLK_MQ_F_SHOULD_MERGE BLK_MQ_F_SHOULD_MERGE is set for all tag_sets except those that purely process passthrough commands (bsg-lib, ufs tmf, various nvme admin queues) and thus don't even check the flag. Remove it to simplify the driver interface. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20241219060214.1928848-1-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> arch/um/drivers/ubd_kern.c | 1 - block/blk-mq-debugfs.c | 1 - block/blk-mq-sched.c | 3 +-- drivers/block/amiflop.c | 1 - drivers/block/aoe/aoeblk.c | 1 - drivers/block/ataflop.c | 1 - drivers/block/floppy.c | 1 - drivers/block/loop.c | 3 +-- drivers/block/mtip32xx/mtip32xx.c | 1 - drivers/block/nbd.c | 3 +-- drivers/block/null_blk/main.c | 2 -- drivers/block/ps3disk.c | 3 +-- drivers/block/rbd.c | 1 - drivers/block/rnbd/rnbd-clt.c | 3 +-- drivers/block/sunvdc.c | 2 +- drivers/block/swim.c | 2 +- drivers/block/swim3.c | 3 +-- drivers/block/ublk_drv.c | 1 - drivers/block/virtio_blk.c | 1 - drivers/block/xen-blkfront.c | 1 - drivers/block/z2ram.c | 1 - drivers/cdrom/gdrom.c | 2 +- drivers/md/dm-rq.c | 2 +- drivers/memstick/core/ms_block.c | 3 +-- drivers/memstick/core/mspro_block.c | 3 +-- drivers/mmc/core/queue.c | 2 +- drivers/mtd/mtd_blkdevs.c | 2 +- drivers/mtd/ubi/block.c | 2 +- drivers/nvme/host/apple.c | 1 - drivers/nvme/host/core.c | 1 - drivers/s390/block/dasd_genhd.c | 1 - drivers/s390/block/scm_blk.c | 1 - drivers/scsi/scsi_lib.c | 1 - include/linux/blk-mq.h | 1 - 34 files changed, 15 insertions(+), 43 deletions(-) commit 9bc1e897a821f19ba3775bb013a8a6fb121c3ca1 Author: Daniel Wagner <wagi@kernel.org> Date: Mon Dec 2 15:00:16 2024 +0100 blk-mq: remove unused queue mapping helpers There are no users left of the pci and virtio queue mapping helpers. Thus remove them. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Daniel Wagner <wagi@kernel.org> Link: https://lore.kernel.org/r/20241202-refactor-blk-affinity-helpers-v6-8-27211e9c2cd5@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk> block/Makefile | 2 -- block/blk-mq-pci.c | 46 ------------------------------------------- block/blk-mq-virtio.c | 46 ------------------------------------------- include/linux/blk-mq-pci.h | 11 ----------- include/linux/blk-mq-virtio.h | 11 ----------- 5 files changed, 116 deletions(-) commit a5665c3d150c9876981e9a31161f42dac6a0d95c Author: Daniel Wagner <wagi@kernel.org> Date: Mon Dec 2 15:00:15 2024 +0100 virtio: blk/scsi: replace blk_mq_virtio_map_queues with blk_mq_map_hw_queues Replace all users of blk_mq_virtio_map_queues with the more generic blk_mq_map_hw_queues. This in preparation to retire blk_mq_virtio_map_queues. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Daniel Wagner <wagi@kernel.org> Link: https://lore.kernel.org/r/20241202-refactor-blk-affinity-helpers-v6-7-27211e9c2cd5@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/virtio_blk.c | 4 ++-- drivers/scsi/virtio_scsi.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) commit 4425f6492a511dd12ccad924ae8c8e802c172418 Author: Daniel Wagner <wagi@kernel.org> Date: Mon Dec 2 15:00:14 2024 +0100 nvme: replace blk_mq_pci_map_queues with blk_mq_map_hw_queues Replace all users of blk_mq_pci_map_queues with the more generic blk_mq_map_hw_queues. This in preparation to retire blk_mq_pci_map_queues. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Daniel Wagner <wagi@kernel.org> Link: https://lore.kernel.org/r/20241202-refactor-blk-affinity-helpers-v6-6-27211e9c2cd5@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/nvme/host/fc.c | 1 - drivers/nvme/host/pci.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) commit bd326a5ad6397ccfc67af862606be107c15a43e6 Author: Daniel Wagner <wagi@kernel.org> Date: Mon Dec 2 15:00:13 2024 +0100 scsi: replace blk_mq_pci_map_queues with blk_mq_map_hw_queues Replace all users of blk_mq_pci_map_queues with the more generic blk_mq_map_hw_queues. This in preparation to retire blk_mq_pci_map_queues. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Daniel Wagner <wagi@kernel.org> Link: https://lore.kernel.org/r/20241202-refactor-blk-affinity-helpers-v6-5-27211e9c2cd5@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/scsi/fnic/fnic_main.c | 3 +-- drivers/scsi/hisi_sas/hisi_sas.h | 1 - drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 4 ++-- drivers/scsi/megaraid/megaraid_sas_base.c | 3 +-- drivers/scsi/mpi3mr/mpi3mr.h | 1 - drivers/scsi/mpi3mr/mpi3mr_os.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 +-- drivers/scsi/pm8001/pm8001_init.c | 2 +- drivers/scsi/pm8001/pm8001_sas.h | 1 - drivers/scsi/qla2xxx/qla_nvme.c | 3 +-- drivers/scsi/qla2xxx/qla_os.c | 4 ++-- drivers/scsi/smartpqi/smartpqi_init.c | 7 +++---- 12 files changed, 13 insertions(+), 21 deletions(-) commit 1452e9b470c903fc4137a448e9f5767e92d68229 Author: Daniel Wagner <wagi@kernel.org> Date: Mon Dec 2 15:00:12 2024 +0100 blk-mq: introduce blk_mq_map_hw_queues blk_mq_pci_map_queues and blk_mq_virtio_map_queues will create a CPU to hardware queue mapping based on affinity information. These two function share common code and only differ on how the affinity information is retrieved. Also, those functions are located in the block subsystem where it doesn't really fit in. They are virtio and pci subsystem specific. Thus introduce provide a generic mapping function which uses the irq_get_affinity callback from bus_type. Originally idea from Ming Lei <ming.lei@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Daniel Wagner <wagi@kernel.org> Link: https://lore.kernel.org/r/20241202-refactor-blk-affinity-helpers-v6-4-27211e9c2cd5@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-mq-cpumap.c | 37 +++++++++++++++++++++++++++++++++++++ include/linux/blk-mq.h | 2 ++ 2 files changed, 39 insertions(+) commit c7f63c5d13925c97a4ae9908bd933ab197872161 Author: Daniel Wagner <wagi@kernel.org> Date: Mon Dec 2 15:00:11 2024 +0100 virtio: hookup irq_get_affinity callback struct bus_type has a new callback for retrieving the IRQ affinity for a device. Hook this callback up for virtio based devices. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Daniel Wagner <wagi@kernel.org> Link: https://lore.kernel.org/r/20241202-refactor-blk-affinity-helpers-v6-3-27211e9c2cd5@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/virtio/virtio.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 22d813bf00ba7f7a2e027dfc26f60c6ff525ba85 Author: Daniel Wagner <wagi@kernel.org> Date: Mon Dec 2 15:00:10 2024 +0100 PCI: hookup irq_get_affinity callback struct bus_type has a new callback for retrieving the IRQ affinity for a device. Hook this callback up for PCI based devices. Acked-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Daniel Wagner <wagi@kernel.org> Link: https://lore.kernel.org/r/20241202-refactor-blk-affinity-helpers-v6-2-27211e9c2cd5@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/pci/pci-driver.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit fea4952df0eeec4e1a295ebaac9f61c0065fae87 Author: Daniel Wagner <wagi@kernel.org> Date: Mon Dec 2 15:00:09 2024 +0100 driver core: bus: add irq_get_affinity callback to bus_type Introducing a callback in struct bus_type so that a subsystem can hook up the getters directly. This approach avoids exposing random getters in any subsystems APIs. Acked-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Daniel Wagner <wagi@kernel.org> Link: https://lore.kernel.org/r/20241202-refactor-blk-affinity-helpers-v6-1-27211e9c2cd5@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk> include/linux/device/bus.h | 3 +++ 1 file changed, 3 insertions(+) commit 0e20669a91306540ce76710c12201a73b1c3612a Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Mon Dec 16 16:08:47 2024 +0000 null_blk: Remove accesses to page->index Use page->private to store the index instead of page->index. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Link: https://lore.kernel.org/r/20241216160849.31739-1-willy@infradead.org Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/null_blk/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 53328a3671e965051fdbd2be9be34a0bdc4e7a74 Author: Benoît du Garreau <benoit@dugarreau.fr> Date: Wed Dec 4 09:38:39 2024 +0100 block: rnull: Initialize the module in place Using `InPlaceModule` avoids an allocation and an indirection. Signed-off-by: Benoît du Garreau <benoit@dugarreau.fr> Acked-by: Andreas Hindborg <a.hindborg@kernel.org> Link: https://lore.kernel.org/r/20241204-rnull_in_place-v1-1-efe3eafac9fb@dugarreau.fr Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/rnull.rs | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit ccb9868ab7f4b253440b8723a3487b8b9a16d371 Author: Colin Ian King <colin.i.king@gmail.com> Date: Wed Dec 4 15:04:50 2024 +0000 blktrace: remove redundant return at end of function A recent change added return 0 before an existing return statement at the end of function blk_trace_setup. The final return is now redundant, so remove it. Fixes: 64d124798244 ("blktrace: move copy_[to|from]_user() out of ->debugfs_lock") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20241204150450.399005-1-colin.i.king@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> kernel/trace/blktrace.c | 2 -- 1 file changed, 2 deletions(-) commit 19206d3f5ef7f051056d2fb49203a347e4844e6e Author: John Garry <john.g.garry@oracle.com> Date: Mon Dec 2 11:19:57 2024 +0000 block: Delete bio_set_prio() Since commit 43b62ce3ff0a ("block: move bio io prio to a new field"), macro bio_set_prio() does nothing but set bio->bi_ioprio. All other places just set bio->bi_ioprio directly, so replace bio_set_prio() remaining callsites with setting bio->bi_ioprio directly and delete that macro. Signed-off-by: John Garry <john.g.garry@oracle.com> Acked-by: Jack Wang <jinpu.wang@ionos.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Link: https://lore.kernel.org/r/20241202111957.2311683-3-john.g.garry@oracle.com Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/rnbd/rnbd-srv.c | 2 +- drivers/md/bcache/movinggc.c | 2 +- drivers/md/bcache/writeback.c | 2 +- fs/bcachefs/move.c | 6 +++--- include/linux/bio.h | 2 -- 5 files changed, 6 insertions(+), 8 deletions(-) commit 5c292ac6e69f390179b93dc104b40903cddce636 Author: John Garry <john.g.garry@oracle.com> Date: Mon Dec 2 11:19:56 2024 +0000 block: Delete bio_prio() Since commit 43b62ce3ff0a ("block: move bio io prio to a new field"), macro bio_prio() does nothing but return the value in bio->bi_ioprio. Most other places just read bio->bi_ioprio directly, so replace bi_ioprio() callsites with reading bio->bi_ioprio directly and delete that macro. Signed-off-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Link: https://lore.kernel.org/r/20241202111957.2311683-2-john.g.garry@oracle.com Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/md/dm-verity-fec.c | 6 +++--- drivers/md/dm-verity-target.c | 4 ++-- include/linux/bio.h | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) commit b769a2f409e7a356db852a1bb62a32f7809b3a3c Author: Ming Lei <ming.lei@redhat.com> Date: Thu Nov 28 20:50:27 2024 +0800 blktrace: move copy_[to|from]_user() out of ->debugfs_lock Move copy_[to|from]_user() out of ->debugfs_lock and cut the dependency between mm->mmap_lock and q->debugfs_lock, then we avoids lots of lockdep false positive warning. Obviously ->debug_lock isn't needed for copy_[to|from]_user(). The only behavior change is to call blk_trace_remove() in case of setup failure handling by re-grabbing ->debugfs_lock, and this way is just fine since we do cover concurrent setup() & remove(). Reported-by: syzbot+91585b36b538053343e4@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-block/67450fd4.050a0220.1286eb.0007.GAE@google.com/ Closes: https://lore.kernel.org/linux-block/6742e584.050a0220.1cc393.0038.GAE@google.com/ Closes: https://lore.kernel.org/linux-block/6742a600.050a0220.1cc393.002e.GAE@google.com/ Closes: https://lore.kernel.org/linux-block/67420102.050a0220.1cc393.0019.GAE@google.com/ Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20241128125029.4152292-3-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk> kernel/trace/blktrace.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) commit fd9b0244f5c5f63461ca9752eebd2423ae02bb59 Author: Ming Lei <ming.lei@redhat.com> Date: Thu Nov 28 20:50:26 2024 +0800 blktrace: don't centralize grabbing q->debugfs_mutex in blk_trace_ioctl Call each handler directly and the handler do grab q->debugfs_mutex, prepare for killing dependency between ->debug_mutex and ->mmap_lock. Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20241128125029.4152292-2-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk> kernel/trace/blktrace.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit b56426bcf880d0f14a482c302ab7e37f3e6c3583 Author: Damien Le Moal <dlemoal@kernel.org> Date: Tue Nov 26 09:09:56 2024 +0900 null_blk: Add rotational feature support To facilitate testing of kernel functions related to the rotational feature (BLK_FEAT_ROTATIONAL) of a block device (e.g. NVMe rotational bit support), add the rotational boolean configfs attribute and module parameter to the null_blk driver. If set, a null block device will report being a rotational device through it queue limits features with the BLK_FEAT_ROTATIONAL flag. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20241126000956.95983-1-dlemoal@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/block/null_blk/main.c | 13 ++++++++++++- drivers/block/null_blk/null_blk.h | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) commit f6661b1d0525f3764596a1b65eeed9e75aecafa7 Author: Ming Lei <ming.lei@redhat.com> Date: Wed Nov 27 21:51:30 2024 +0800 block: track queue dying state automatically for modeling queue freeze lockdep Now we only verify the outmost freeze & unfreeze in current context in case that !q->mq_freeze_depth, so it is reliable to save queue lying state when we want to lock the freeze queue since the state is one per-task variable now. Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20241127135133.3952153-5-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-mq.c | 5 +++-- block/blk.h | 12 ++++++------ block/genhd.c | 7 +++---- include/linux/blkdev.h | 6 +++++- 4 files changed, 17 insertions(+), 13 deletions(-) commit b9d4eee7e04b9cfb0b4bcd748fe6b3ec517171d9 Author: Ming Lei <ming.lei@redhat.com> Date: Wed Nov 27 21:51:29 2024 +0800 block: don't verify queue freeze manually in elevator_init_mq() Now blk_freeze_queue_start() can track disk state automatically, and it isn't necessary to verify queue freeze manually in elevator_init_mq() any more. Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20241127135133.3952153-4-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk> block/elevator.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 6f491a8d4b92d1a840fd9209cba783c84437d0b7 Author: Ming Lei <ming.lei@redhat.com> Date: Wed Nov 27 21:51:28 2024 +0800 block: track disk DEAD state automatically for modeling queue freeze lockdep Now we only verify the outmost freeze & unfreeze in current context in case that !q->mq_freeze_depth, so it is reliable to save disk DEAD state when we want to lock the freeze queue since the state is one per-task variable now. Doing this way can kill lots of false positive when freeze queue is called before adding disk[1]. [1] https://lore.kernel.org/linux-block/6741f6b2.050a0220.1cc393.0017.GAE@google.com/ Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20241127135133.3952153-3-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-mq.c | 7 +++++-- block/blk.h | 19 +++++++++++++------ block/elevator.c | 4 ++-- block/genhd.c | 4 ++-- include/linux/blkdev.h | 2 ++ 5 files changed, 24 insertions(+), 12 deletions(-) commit aff09dc1fd3a165289011ab23cc3b46978ec741c Author: Ming Lei <ming.lei@redhat.com> Date: Wed Nov 27 21:51:27 2024 +0800 block: remove unnecessary check in blk_unfreeze_check_owner() The following check of 'q->mq_freeze_owner != current' covers the previous one, so remove the unnecessary check. Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20241127135133.3952153-2-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk> block/blk-mq.c | 2 -- 1 file changed, 2 deletions(-) commit 3d8b5a22d40435b4a7e58f06ae2cd3506b222898 Author: Kanchan Joshi <joshi.k@samsung.com> Date: Thu Nov 28 16:52:40 2024 +0530 block: add support to pass user meta buffer If an iocb contains metadata, extract that and prepare the bip. Based on flags specified by the user, set corresponding guard/app/ref tags to be checked in bip. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anuj Gupta <anuj20.g@samsung.com> Signed-off-by: Kanchan Joshi <joshi.k@samsung.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20241128112240.8867-11-anuj20.g@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk> block/bio-integrity.c | 50 +++++++++++++++++++++++++++++++++++++++++++ block/fops.c | 45 +++++++++++++++++++++++++++++--------- include/linux/bio-integrity.h | 7 ++++++ 3 files changed, 92 insertions(+), 10 deletions(-) commit 18623503a3a514780214850bf8ba8b03ea0f3a4b Author: Anuj Gupta <anuj20.g@samsung.com> Date: Thu Nov 28 16:52:39 2024 +0530 scsi: add support for user-meta interface Add support for sending user-meta buffer. Set tags to be checked using flags specified by user/block-layer. With this change, BIP_CTRL_NOCHECK becomes unused. Remove it. Signed-off-by: Anuj Gupta <anuj20.g@samsung.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20241128112240.8867-10-anuj20.g@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/scsi/sd.c | 4 ++-- include/linux/bio-integrity.h | 16 +++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) commit 472292cd8cfcfb9f2e7731c3c54196c35b8d283d Author: Kanchan Joshi <joshi.k@samsung.com> Date: Thu Nov 28 16:52:38 2024 +0530 nvme: add support for passing on the application tag With user integrity buffer, there is a way to specify the app_tag. Set the corresponding protocol specific flags and send the app_tag down. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anuj Gupta <anuj20.g@samsung.com> Signed-off-by: Kanchan Joshi <joshi.k@samsung.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20241128112240.8867-9-anuj20.g@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk> drivers/nvme/host/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2c0487d8b1f1351d48a13b77b254a2bb6de49eb3 Author: Anuj Gupta <anuj20.g@samsung.com> Date: Thu Nov 28 16:52:37 2024 +0530 block: introduce BIP_CHECK_GUARD/REFTAG/APPTAG bip_flags This patch introduces BIP_CHECK_GUARD/REFTAG/APPTAG bip_flags which indicate how the hardware should check the integrity payload. BIP_CHECK_GUARD/REFTAG are conversion of existing semantics, while BIP_CHECK_APPTAG is a new flag. The driver can now just rely on block layer flags, and doesn't need to know the integrity source. Submitter of PI decides which tags to check. This would also give us a unified interface for user and kernel generated integrity. Signed-off-by: Anuj Gupta <anuj20.g@samsung.com> Signed-off-by: Kanchan Joshi <joshi.k@samsung.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20241128112240.8867-8-anuj20.g@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk> block/bio-integrity.c | 5 +++++ drivers/nvme/host/core.c | 11 +++-------- include/linux/bio-integrity.h | 6 +++++- 3 files changed, 13 insertions(+), 9 deletions(-) commit 59a7d12a7fb5ab24efa893e6980a00ffc090c777 Author: Anuj Gupta <anuj20.g@samsung.com> Date: Thu Nov 28 16:52:36 2024 +0530 io_uring: introduce attributes for read/write and PI support Add the ability to pass additional attributes along with read/write. Application can prepare attibute specific information and pass its address using the SQE field: __u64 attr_ptr; Along with setting a mask indicating attributes being passed: __u64 attr_type_mask; Overall 64 attributes are allowed and currently one attribute 'IORING_RW_ATTR_FLAG_PI' is supported. With PI attribute, userspace can pass following information: - flags: integrity check flags IO_INTEGRITY_CHK_{GUARD/APPTAG/REFTAG} - len: length of PI/metadata buffer - addr: address of metadata buffer - seed: seed value for reftag remapping - app_tag: application defined 16b value Process this information to prepare uio_meta_descriptor and pass it down using kiocb->private. PI attribute is supported only for direct IO. Signed-off-by: Anuj Gupta <anuj20.g@samsung.com> Signed-off-by: Kanchan Joshi <joshi.k@samsung.com> Link: https://lore.kernel.org/r/20241128112240.8867-7-anuj20.g@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk> include/uapi/linux/io_uring.h | 16 +++++++++ io_uring/io_uring.c | 2 ++ io_uring/rw.c | 83 +++++++++++++++++++++++++++++++++++++++++-- io_uring/rw.h | 14 +++++++- 4 files changed, 112 insertions(+), 3 deletions(-) commit 4de2ce04c862db66a7c1dbe0f358fc6df3825bac Author: Anuj Gupta <anuj20.g@samsung.com> Date: Thu Nov 28 16:52:35 2024 +0530 fs: introduce IOCB_HAS_METADATA for metadata Introduce an IOCB_HAS_METADATA flag for the kiocb struct, for handling requests containing meta payload. Signed-off-by: Anuj Gupta <anuj20.g@samsung.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20241128112240.8867-6-anuj20.g@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk> include/linux/fs.h | 1 + 1 file changed, 1 insertion(+) commit 10783d0ba0d7731ec81d88c54f83cf0ff89d1c2a Author: Anuj Gupta <anuj20.g@samsung.com> Date: Thu Nov 28 16:52:34 2024 +0530 fs, iov_iter: define meta io descriptor Add flags to describe checks for integrity meta buffer. Also, introduce a new 'uio_meta' structure that upper layer can use to pass the meta/integrity information. Signed-off-by: Kanchan Joshi <joshi.k@samsung.com> Signed-off-by: Anuj Gupta <anuj20.g@samsung.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20241128112240.8867-5-anuj20.g@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk> include/linux/uio.h | 9 +++++++++ include/uapi/linux/fs.h | 9 +++++++++ 2 files changed, 18 insertions(+) commit fe8f4ca7107e968b0eb7328155c8811f2a19424a Author: Anuj Gupta <anuj20.g@samsung.com> Date: Thu Nov 28 16:52:33 2024 +0530 block: modify bio_integrity_map_user to accept iov_iter as argument This patch refactors bio_integrity_map_user to accept iov_iter as argument. This is a prep patch. Signed-off-by: Anuj Gupta <anuj20.g@samsung.com> Signed-off-by: Kanchan Joshi <joshi.k@samsung.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20241128112240.8867-4-anuj20.g@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk> block/bio-integrity.c | 12 +++++------- block/blk-integrity.c | 10 +++++++++- include/linux/bio-integrity.h | 5 ++--- 3 files changed, 16 insertions(+), 11 deletions(-) commit 031141976be0bd5f385775727a4ed3cc845eb7ba Author: Christoph Hellwig <hch@lst.de> Date: Thu Nov 28 16:52:32 2024 +0530 block: copy back bounce buffer to user-space correctly in case of split Copy back the bounce buffer to user-space in entirety when the parent bio completes. The existing code uses bip_iter.bi_size for sizing the copy, which can be modified. So move away from that and fetch it from the vector passed to the block layer. While at it, switch to using better variable names. Fixes: 492c5d455969f ("block: bio-integrity: directly map user buffers") Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anuj Gupta <anuj20.g@samsung.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20241128112240.8867-3-anuj20.g@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk> block/bio-integrity.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 5dbb3cbd060aa86a722d7d44278e537ae3f63081 Author: Anuj Gupta <anuj20.g@samsung.com> Date: Thu Nov 28 16:52:31 2024 +0530 block: define set of integrity flags to be inherited by cloned bip Introduce BIP_CLONE_FLAGS describing integrity flags that should be inherited in the cloned bip from the parent. Suggested-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anuj Gupta <anuj20.g@samsung.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20241128112240.8867-2-anuj20.g@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk> block/bio-integrity.c | 2 +- include/linux/bio-integrity.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 7cd7b9575270e4c4f80cc5ff71b13f4102b59b9e Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:39 2024 +0000 io_uring/memmap: unify io_uring mmap'ing code All mapped memory is now backed by regions and we can unify and clean up io_region_validate_mmap() and io_uring_mmap(). Extract a function looking up a region, the rest of the handling should be generic and just needs the region. There is one more ring type specific code, i.e. the mmaping size truncation quirk for IORING_OFF_[S,C]Q_RING, which is left as is. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/f5e1eda1562bfd34276de07465525ae5f10e1e84.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/kbuf.c | 3 --- io_uring/memmap.c | 81 +++++++++++++++++++++---------------------------------- 2 files changed, 31 insertions(+), 53 deletions(-) commit ef62de3c4ad58fab4e37bc267177bc723e48e5e2 Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:38 2024 +0000 io_uring/kbuf: use region api for pbuf rings Convert internal parts of the provided buffer ring managment to the region API. It's the last non-region mapped ring we have, so it also kills a bunch of now unused memmap.c helpers. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/6c40cf7beaa648558acd4d84bc0fb3279a35d74b.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/kbuf.c | 170 ++++++++++++++++-------------------------------------- io_uring/kbuf.h | 18 +++--- io_uring/memmap.c | 118 +++++-------------------------------- io_uring/memmap.h | 7 --- 4 files changed, 73 insertions(+), 240 deletions(-) commit 90175f3f503213903b00bc7ba9f8ae436fc5c00e Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:37 2024 +0000 io_uring/kbuf: remove pbuf ring refcounting struct io_buffer_list refcounting was needed for RCU based sync with mmap, now we can kill it. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/4a9cc54bf0077bb2bf2f3daf917549ddd41080da.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/kbuf.c | 21 +++++++-------------- io_uring/kbuf.h | 3 --- io_uring/memmap.c | 1 - 3 files changed, 7 insertions(+), 18 deletions(-) commit 78fda3d056417ccb9921663383b12f771aa0dd43 Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:36 2024 +0000 io_uring/kbuf: use mmap_lock to sync with mmap A preparation / cleanup patch simplifying the buf ring - mmap synchronisation. Instead of relying on RCU, which is trickier, do it by grabbing the mmap_lock when when anyone tries to publish or remove a registered buffer to / from ->io_bl_xa. Modifications of the xarray should always be protected by both ->uring_lock and ->mmap_lock, while lookups should hold either of them. While a struct io_buffer_list is in the xarray, the mmap related fields like ->flags and ->buf_pages should stay stable. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/af13bde56ee1a26bcaefaa9aad37a9ea318a590e.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> include/linux/io_uring_types.h | 5 ++++ io_uring/kbuf.c | 56 ++++++++++++++++++------------------------ io_uring/kbuf.h | 1 - 3 files changed, 29 insertions(+), 33 deletions(-) commit 81a4058e0cd0f07139f088fbeb65bc488f687829 Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:35 2024 +0000 io_uring: use region api for CQ Convert internal parts of the CQ/SQ array managment to the region API. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/46fc3c801290d6b1ac16023d78f6b8e685c87fd6.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> include/linux/io_uring_types.h | 8 +----- io_uring/io_uring.c | 36 +++++++++------------------ io_uring/memmap.c | 55 ++++++------------------------------------ io_uring/memmap.h | 4 --- io_uring/register.c | 35 ++++++++++++--------------- 5 files changed, 36 insertions(+), 102 deletions(-) commit 8078486e1d53591ed946c943177339e59e3089e0 Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:34 2024 +0000 io_uring: use region api for SQ Convert internal parts of the SQ managment to the region API. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/1fb73ced6b835cb319ab0fe1dc0b2e982a9a5650.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> include/linux/io_uring_types.h | 3 +-- io_uring/io_uring.c | 36 ++++++++++++++---------------------- io_uring/memmap.c | 3 +-- io_uring/register.c | 35 ++++++++++++++++------------------- 4 files changed, 32 insertions(+), 45 deletions(-) commit 02255d55260a6836423c8401628b58264e198973 Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:33 2024 +0000 io_uring: pass ctx to io_register_free_rings A preparation patch, pass the context to io_register_free_rings. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/c1865fd2b3d4db22d1a1aac7dd06ea22cb990834.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/register.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 087f997870a948820ec366701d178f402c6a23a3 Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:32 2024 +0000 io_uring/memmap: implement mmap for regions The patch implements mmap for the param region and enables the kernel allocation mode. Internally it uses a fixed mmap offset, however the user has to use the offset returned in struct io_uring_region_desc::mmap_offset. Note, mmap doesn't and can't take ->uring_lock and the region / ring lookup is protected by ->mmap_lock, and it's directly peeking at ctx->param_region. We can't protect io_create_region() with the mmap_lock as it'd deadlock, which is why io_create_region_mmap_safe() initialises it for us in a temporary variable and then publishes it with the lock taken. It's intentionally decoupled from main region helpers, and in the future we might want to have a list of active regions, which then could be protected by the ->mmap_lock. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/0f1212bd6af7fb39b63514b34fae8948014221d1.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/memmap.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++----- io_uring/memmap.h | 10 ++++++++- io_uring/register.c | 6 ++---- 3 files changed, 67 insertions(+), 10 deletions(-) commit 1e21df691ffa2c277e0b1a4928c9da0e86e9a2be Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:31 2024 +0000 io_uring/memmap: implement kernel allocated regions Allow the kernel to allocate memory for a region. That's the classical way SQ/CQ are allocated. It's not yet useful to user space as there is no way to mmap it, which is why it's explicitly disabled in io_register_mem_region(). Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/7b8c40e6542546bbf93f4842a9a42a7373b81e0d.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/memmap.c | 43 ++++++++++++++++++++++++++++++++++++++++--- io_uring/register.c | 2 ++ 2 files changed, 42 insertions(+), 3 deletions(-) commit 4b851d20d325dc59f9abdce55d42dc4b68179db0 Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:30 2024 +0000 io_uring/memmap: add IO_REGION_F_SINGLE_REF Kernel allocated compound pages will have just one reference for the entire page array, add a flag telling io_free_region about that. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/a7abfa7535e9728d5fcade29a1ea1605ec2c04ce.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/memmap.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit a90558b36cceeb546c19b3cd17ed94f9810f8eec Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:29 2024 +0000 io_uring/memmap: helper for pinning region pages In preparation to adding kernel allocated regions extract a new helper that pins user pages. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/a17d7c39c3de4266b66b75b2dcf768150e1fc618.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/memmap.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit c4d0ac1c1567ee822529124a3dc10b384838c3bc Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:28 2024 +0000 io_uring/memmap: optimise single folio regions We don't need to vmap if memory is already physically contiguous. There are two important cases it covers: PAGE_SIZE regions and huge pages. Use io_check_coalesce_buffer() to get the number of contiguous folios. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/d5240af23064a824c29d14d2406f1ae764bf4505.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/memmap.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit 226ae1b4d1111b0b0041677b58371af9b8cd31a9 Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:27 2024 +0000 io_uring/memmap: reuse io_free_region for failure path Regions are going to become more complex with allocation options and optimisations, I want to split initialisation into steps and for that it needs a sane fail path. Reuse io_free_region(), it's smart enough to undo only what's needed and leaves the structure in a consistent state. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/b853b4ec407cc80d033d021bdd2c14e22378fc78.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/memmap.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit fc5f22a64649db7582f988d01651fa7d50054f90 Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:26 2024 +0000 io_uring/memmap: account memory before pinning Move memory accounting before page pinning. It shouldn't even try to pin pages if it's not allowed, and accounting is also relatively inexpensive. It also give a better code structure as we do generic accounting and then can branch for different mapping types. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/1e242b8038411a222e8b269d35e021fa5015289f.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/memmap.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 16375af32d0fd5a6398c48d2a684b3f4fbb17a8e Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:25 2024 +0000 io_uring/memmap: flag regions with user pages In preparation to kernel allocated regions add a flag telling if the region contains user pinned pages or not. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/0dc91564642654405bab080b7ec911cb4a43ec6e.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/memmap.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit a730d2047d4ef822262c37f51ff7267f2f0e7167 Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:24 2024 +0000 io_uring/memmap: flag vmap'ed regions Add internal flags for struct io_mapped_region. The first flag we need is IO_REGION_F_VMAPPED, that indicates that the pointer has to be unmapped on region destruction. For now all regions are vmap'ed, so it's set unconditionally. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/5a3d8046a038da97c0f8a8c8f1733fa3fc689d31.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> include/linux/io_uring_types.h | 5 +++-- io_uring/memmap.c | 14 ++++++++++---- io_uring/memmap.h | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) commit 7427b0b49ad51304c041ffb8c413f342e148cdea Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:23 2024 +0000 io_uring/rsrc: export io_check_coalesce_buffer io_try_coalesce_buffer() is a useful helper collecting useful info about a set of pages, I want to reuse it for analysing ring/etc. mappings. I don't need the entire thing and only interested if it can be coalesced into a single page, but that's better than duplicating the parsing. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/353b447953cd5d34c454a7d909bb6024c391d6e2.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> io_uring/rsrc.c | 22 ++++++++++++---------- io_uring/rsrc.h | 4 ++++ 2 files changed, 16 insertions(+), 10 deletions(-) commit 943d0609d0571af092dc13456cbca70351e4d20e Author: Pavel Begunkov <asml.silence@gmail.com> Date: Fri Nov 29 13:34:22 2024 +0000 io_uring: rename ->resize_lock ->resize_lock is used for resizing rings, but it's a good idea to reuse it in other cases as well. Rename it into mmap_lock as it's protects from races with mmap. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/68f705306f3ac4d2fb999eb80ea1615015ce9f7f.1732886067.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> include/linux/io_uring_types.h | 2 +- io_uring/io_uring.c | 2 +- io_uring/memmap.c | 6 +++--- io_uring/register.c | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) commit 851daf833e876e9cc2a74ee33ec5fb0d9738a28b Merge: 05648c2f58b3 2dfed7403861 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Mon Dec 23 14:34:06 2024 +0100 Merge back earlier cpufreq material for 6.14 commit 2c3412e999738bfd60859c493ff47f5c268814a3 Author: Rick Edgecombe <rick.p.edgecombe@intel.com> Date: Thu Jul 18 14:12:30 2024 -0700 KVM: x86/mmu: Prevent aliased memslot GFNs Add a few sanity checks to prevent memslot GFNs from ever having alias bits set. Like other Coco technologies, TDX has the concept of private and shared memory. For TDX the private and shared mappings are managed on separate EPT roots. The private half is managed indirectly though calls into a protected runtime environment called the TDX module, where the shared half is managed within KVM in normal page tables. For TDX, the shared half will be mapped in the higher alias, with a "shared bit" set in the GPA. However, KVM will still manage it with the same memslots as the private half. This means memslot looks ups and zapping operations will be provided with a GFN without the shared bit set. If these memslot GFNs ever had the bit that selects between the two aliases it could lead to unexpected behavior in the complicated code that directs faulting or zapping operations between the roots that map the two aliases. As a safety measure, prevent memslots from being set at a GFN range that contains the alias bit. Also, check in the kvm_faultin_pfn() for the fault path. This later check does less today, as the alias bits are specifically stripped from the GFN being checked, however future code could possibly call in to the fault handler in a way that skips this stripping. Since kvm_faultin_pfn() now has many references to vcpu->kvm, extract it to local variable. Link: https://lore.kernel.org/kvm/ZpbKqG_ZhCWxl-Fc@google.com/ Suggested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-19-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/mmu.h | 5 +++++ arch/x86/kvm/mmu/mmu.c | 10 +++++++--- arch/x86/kvm/x86.c | 3 +++ 3 files changed, 15 insertions(+), 3 deletions(-) commit df4af9f89cd853f7a06187dbbfd410fc6fd73bce Author: Rick Edgecombe <rick.p.edgecombe@intel.com> Date: Thu Jul 18 14:12:29 2024 -0700 KVM: x86/tdp_mmu: Don't zap valid mirror roots in kvm_tdp_mmu_zap_all() Don't zap valid mirror roots in kvm_tdp_mmu_zap_all(), which in effect is only direct roots (invalid and valid). For TDX, kvm_tdp_mmu_zap_all() is only called during MMU notifier release. Since, mirrored EPT comes from guest mem, it will never be mapped to userspace, and won't apply. But in addition to be unnecessary, mirrored EPT is cleaned up in a special way during VM destruction. Pass the KVM_INVALID_ROOTS bit into __for_each_tdp_mmu_root_yield_safe() as well, to clean up invalid direct roots, as is the current behavior. While at it, remove an obsolete reference to work item-based zapping. Co-developed-by: Yan Zhao <yan.y.zhao@intel.com> Signed-off-by: Yan Zhao <yan.y.zhao@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-18-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/mmu/tdp_mmu.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit a89ecbb56bc722a1ca7a11f5554ae3d8f1d73887 Author: Isaku Yamahata <isaku.yamahata@intel.com> Date: Thu Jul 18 14:12:28 2024 -0700 KVM: x86/tdp_mmu: Take root types for kvm_tdp_mmu_invalidate_all_roots() Rename kvm_tdp_mmu_invalidate_all_roots() to kvm_tdp_mmu_invalidate_roots(), and make it enum kvm_tdp_mmu_root_types as an argument. kvm_tdp_mmu_invalidate_roots() is called with different root types. For kvm_mmu_zap_all_fast() it only operates on shared roots. But when tearing down a VM it needs to invalidate all roots. Have the callers only invalidate the required roots instead of all roots. Within kvm_tdp_mmu_invalidate_roots(), respect the root type passed by checking the root type in root iterator. Suggested-by: Chao Gao <chao.gao@intel.com> Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-17-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/mmu/mmu.c | 9 +++++++-- arch/x86/kvm/mmu/tdp_mmu.c | 15 +++++++++++++-- arch/x86/kvm/mmu/tdp_mmu.h | 3 ++- 3 files changed, 22 insertions(+), 5 deletions(-) commit 94faba8999b95d86a2eba47d2d78925dc80f38ed Author: Isaku Yamahata <isaku.yamahata@intel.com> Date: Thu Jul 18 14:12:27 2024 -0700 KVM: x86/tdp_mmu: Propagate tearing down mirror page tables Integrate hooks for mirroring page table operations for cases where TDX will zap PTEs or free page tables. Like other Coco technologies, TDX has the concept of private and shared memory. For TDX the private and shared mappings are managed on separate EPT roots. The private half is managed indirectly though calls into a protected runtime environment called the TDX module, where the shared half is managed within KVM in normal page tables. Since calls into the TDX module are relatively slow, walking private page tables by making calls into the TDX module would not be efficient. Because of this, previous changes have taught the TDP MMU to keep a mirror root, which is separate, unmapped TDP root that private operations can be directed to. Currently this root is disconnected from the guest. Now add plumbing to propagate changes to the "external" page tables being mirrored. Just create the x86_ops for now, leave plumbing the operations into the TDX module for future patches. Add two operations for tearing down page tables, one for freeing page tables (free_external_spt) and one for zapping PTEs (remove_external_spte). Define them such that remove_external_spte will perform a TLB flush as well. (in TDX terms "ensure there are no active translations"). TDX MMU support will exclude certain MMU operations, so only plug in the mirroring x86 ops where they will be needed. For zapping/freeing, only hook tdp_mmu_iter_set_spte() which is used for mapping and linking PTs. Don't bother hooking tdp_mmu_set_spte_atomic() as it is only used for zapping PTEs in operations unsupported by TDX: zapping collapsible PTEs and kvm_mmu_zap_all_fast(). In previous changes to address races around concurrent populating using tdp_mmu_set_spte_atomic(), a solution was introduced to temporarily set FROZEN_SPTE in the mirrored page tables while performing the external operations. Such a solution is not needed for the tear down paths in TDX as these will always be performed with the mmu_lock held for write. Sprinkle some KVM_BUG_ON()s to reflect this. Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Co-developed-by: Kai Huang <kai.huang@intel.com> Signed-off-by: Kai Huang <kai.huang@intel.com> Co-developed-by: Yan Zhao <yan.y.zhao@intel.com> Signed-off-by: Yan Zhao <yan.y.zhao@intel.com> Co-developed-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-16-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/asm/kvm-x86-ops.h | 2 ++ arch/x86/include/asm/kvm_host.h | 8 ++++++ arch/x86/kvm/mmu/tdp_mmu.c | 51 +++++++++++++++++++++++++++++++++++++- 3 files changed, 60 insertions(+), 1 deletion(-) commit 77ac7079e66d5ce45cd72b2790ca7dbaddd7aa2d Author: Isaku Yamahata <isaku.yamahata@intel.com> Date: Thu Nov 14 13:42:29 2024 -0500 KVM: x86/tdp_mmu: Propagate building mirror page tables Integrate hooks for mirroring page table operations for cases where TDX will set PTEs or link page tables. Like other Coco technologies, TDX has the concept of private and shared memory. For TDX the private and shared mappings are managed on separate EPT roots. The private half is managed indirectly through calls into a protected runtime environment called the TDX module, where the shared half is managed within KVM in normal page tables. Since calls into the TDX module are relatively slow, walking private page tables by making calls into the TDX module would not be efficient. Because of this, previous changes have taught the TDP MMU to keep a mirror root, which is separate, unmapped TDP root that private operations can be directed to. Currently this root is disconnected from any actual guest mapping. Now add plumbing to propagate changes to the "external" page tables being mirrored. Just create the x86_ops for now, leave plumbing the operations into the TDX module for future patches. Add two operations for setting up external page tables, one for linking new page tables and one for setting leaf PTEs. Don't add any op for configuring the root PFN, as TDX handles this itself. Don't provide a way to set permissions on the PTEs also, as TDX doesn't support it. This results in MMU "mirroring" support that is very targeted towards TDX. Since it is likely there will be no other user, the main benefit of making the support generic is to keep TDX specific *looking* code outside of the MMU. As a generic feature it will make enough sense from TDX's perspective. For developers unfamiliar with TDX arch it can express the general concepts such that they can continue to work in the code. TDX MMU support will exclude certain MMU operations, so only plug in the mirroring x86 ops where they will be needed. For setting/linking, only hook tdp_mmu_set_spte_atomic() which is used for mapping and linking PTs. Don't bother hooking tdp_mmu_iter_set_spte() as it is only used for setting PTEs in operations unsupported by TDX: splitting huge pages and write protecting. Sprinkle KVM_BUG_ON()s to document as code that these paths are not supported for mirrored page tables. For zapping operations, leave those for near future changes. Many operations in the TDP MMU depend on atomicity of the PTE update. While the mirror PTE on KVM's side can be updated atomically, the update that happens inside the external operations (S-EPT updates via TDX module call) can't happen atomically with the mirror update. The following race could result during two vCPU's populating private memory: * vcpu 1: atomically update 2M level mirror EPT entry to be present * vcpu 2: read 2M level EPT entry that is present * vcpu 2: walk down into 4K level EPT * vcpu 2: atomically update 4K level mirror EPT entry to be present * vcpu 2: set_exterma;_spte() to update 4K secure EPT entry => error because 2M secure EPT entry is not populated yet * vcpu 1: link_external_spt() to update 2M secure EPT entry Prevent this by setting the mirror PTE to FROZEN_SPTE while the reflect operations are performed. Only write the actual mirror PTE value once the reflect operations have completed. When trying to set a PTE to present and encountering a frozen SPTE, retry the fault. By doing this the race is prevented as follows: * vcpu 1: atomically update 2M level EPT entry to be FROZEN_SPTE * vcpu 2: read 2M level EPT entry that is FROZEN_SPTE * vcpu 2: find that the EPT entry is frozen abandon page table walk to resume guest execution * vcpu 1: link_external_spt() to update 2M secure EPT entry * vcpu 1: atomically update 2M level EPT entry to be present (unfreeze) * vcpu 2: resume guest execution Depending on vcpu 1 state, vcpu 2 may result in EPT violation again or make progress on guest execution Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Co-developed-by: Kai Huang <kai.huang@intel.com> Signed-off-by: Kai Huang <kai.huang@intel.com> Co-developed-by: Yan Zhao <yan.y.zhao@intel.com> Signed-off-by: Yan Zhao <yan.y.zhao@intel.com> Co-developed-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-15-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/asm/kvm-x86-ops.h | 2 + arch/x86/include/asm/kvm_host.h | 7 +++ arch/x86/kvm/mmu/tdp_mmu.c | 98 +++++++++++++++++++++++++++++++++----- 3 files changed, 94 insertions(+), 13 deletions(-) commit de1bf90488708104299639ae49961a9bd0b5a22f Author: Paolo Bonzini <pbonzini@redhat.com> Date: Tue Dec 10 10:00:23 2024 -0500 KVM: x86/tdp_mmu: Propagate attr_filter to MMU notifier callbacks Teach the MMU notifier callbacks how to check kvm_gfn_range.process to filter which KVM MMU root types to operate on. The private GPAs are backed by guest memfd. Such memory is not subjected to MMU notifier callbacks because it can't be mapped into the host user address space. Now kvm_gfn_range conveys info about which root to operate on. Enhance the callback to filter the root page table type. The KVM MMU notifier comes down to two functions. kvm_tdp_mmu_unmap_gfn_range() and __kvm_tdp_mmu_age_gfn_range(): - invalidate_range_start() calls kvm_tdp_mmu_unmap_gfn_range() - invalidate_range_end() doesn't call into arch code - the other callbacks call __kvm_tdp_mmu_age_gfn_range() For VM's without a private/shared split in the EPT, all operations should target the normal(direct) root. With the switch from for_each_tdp_mmu_root() to __for_each_tdp_mmu_root() in kvm_tdp_mmu_handle_gfn(), there are no longer any users of for_each_tdp_mmu_root(). Remove it. Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-14-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/mmu/tdp_mmu.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit fabaa76501485864725448d9da0f7a83254ead8f Author: Isaku Yamahata <isaku.yamahata@intel.com> Date: Thu Jul 18 14:12:24 2024 -0700 KVM: x86/tdp_mmu: Support mirror root for TDP MMU Add the ability for the TDP MMU to maintain a mirror of a separate mapping. Like other Coco technologies, TDX has the concept of private and shared memory. For TDX the private and shared mappings are managed on separate EPT roots. The private half is managed indirectly through calls into a protected runtime environment called the TDX module, where the shared half is managed within KVM in normal page tables. In order to handle both shared and private memory, KVM needs to learn to handle faults and other operations on the correct root for the operation. KVM could learn the concept of private roots, and operate on them by calling out to operations that call into the TDX module. But there are two problems with that: 1. Calls into the TDX module are relatively slow compared to the simple accesses required to read a PTE managed directly by KVM. 2. Other Coco technologies deal with private memory completely differently and it will make the code confusing when being read from their perspective. Special operations added for TDX that set private or zap private memory will have nothing to do with these other private memory technologies. (SEV, etc). To handle these, instead teach the TDP MMU about a new concept "mirror roots". Such roots maintain page tables that are not actually mapped, and are just used to traverse quickly to determine if the mid level page tables need to be installed. When the memory be mirrored needs to actually be changed, calls can be made to via x86_ops. private KVM page fault | | | V | private GPA | CPU protected EPTP | | | V | V mirror PT root | external PT root | | | V | V mirror PT --hook to propagate-->external PT | | | \--------------------+------\ | | | | | V V | private guest page | | non-encrypted memory | encrypted memory | Leave calling out to actually update the private page tables that are being mirrored for later changes. Just implement the handling of MMU operations on to mirrored roots. In order to direct operations to correct root, add root types KVM_DIRECT_ROOTS and KVM_MIRROR_ROOTS. Tie the usage of mirrored/direct roots to private/shared with conditionals. It could also be implemented by making the kvm_tdp_mmu_root_types and kvm_gfn_range_filter enum bits line up such that conversion could be a direct assignment with a case. Don't do this because the mapping of private to mirrored is confusing enough. So it is worth not hiding the logic in type casting. Cleanup the mirror root in kvm_mmu_destroy() instead of the normal place in kvm_mmu_free_roots(), because the private root that is being cannot be rebuilt like a normal root. It needs to persist for the lifetime of the VM. The TDX module will also need to be provided with page tables to use for the actual mapping being mirrored by the mirrored page tables. Allocate these in the mapping path using the recently added kvm_mmu_alloc_external_spt(). Don't support 2M page for now. This is avoided by forcing 4k pages in the fault. Add a KVM_BUG_ON() to verify. Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Co-developed-by: Kai Huang <kai.huang@intel.com> Signed-off-by: Kai Huang <kai.huang@intel.com> Co-developed-by: Yan Zhao <yan.y.zhao@intel.com> Signed-off-by: Yan Zhao <yan.y.zhao@intel.com> Co-developed-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-13-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/mmu.h | 16 +++++++++++++++ arch/x86/kvm/mmu/mmu.c | 12 +++++++++++- arch/x86/kvm/mmu/tdp_mmu.c | 31 +++++++++++++++++++++-------- arch/x86/kvm/mmu/tdp_mmu.h | 43 ++++++++++++++++++++++++++++++++++++++--- 5 files changed, 91 insertions(+), 12 deletions(-) commit 00d98dd4a855443b69cba050a0092dc958baae53 Author: Isaku Yamahata <isaku.yamahata@intel.com> Date: Thu Jul 18 14:12:23 2024 -0700 KVM: x86/tdp_mmu: Take root in tdp_mmu_for_each_pte() Take the root as an argument of tdp_mmu_for_each_pte() instead of looking it up in the mmu. With no other purpose of passing the mmu, drop it. Future changes will want to change which root is used based on the context of the MMU operation. So change the callers to pass in the root currently used, mmu->root.hpa in a preparatory patch to make the later one smaller and easier to review. Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-12-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/mmu/tdp_mmu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit de86ef7bf50f181b29dcc1046e903ff1ca7eeb9f Author: Isaku Yamahata <isaku.yamahata@intel.com> Date: Thu Jul 18 14:12:22 2024 -0700 KVM: x86/tdp_mmu: Introduce KVM MMU root types to specify page table type Define an enum kvm_tdp_mmu_root_types to specify the KVM MMU root type [1] so that the iterator on the root page table can consistently filter the root page table type instead of only_valid. TDX KVM will operate on KVM page tables with specified types. Shared page table, private page table, or both. Introduce an enum instead of bool only_valid so that we can easily enhance page table types applicable to shared, private, or both in addition to valid or not. Replace only_valid=false with KVM_ANY_ROOTS and only_valid=true with KVM_ANY_VALID_ROOTS. Use KVM_ANY_ROOTS and KVM_ANY_VALID_ROOTS to wrap KVM_VALID_ROOTS to avoid further code churn when direct vs mirror root concepts are introduced in future patches. Link: https://lore.kernel.org/kvm/ZivazWQw1oCU8VBC@google.com/ [1] Suggested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-11-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/mmu/tdp_mmu.c | 42 +++++++++++++++++++++++------------------- arch/x86/kvm/mmu/tdp_mmu.h | 7 +++++++ 2 files changed, 30 insertions(+), 19 deletions(-) commit e84b8e4e4430d2a81a3464be8ebe5959da9a6d4a Author: Isaku Yamahata <isaku.yamahata@intel.com> Date: Thu Jul 18 14:12:21 2024 -0700 KVM: x86/tdp_mmu: Extract root invalid check from tdx_mmu_next_root() Extract tdp_mmu_root_match() to check if the root has given types and use it for the root page table iterator. It checks only_invalid now. TDX KVM operates on a shared page table only (Shared-EPT), a mirrored page table only (Secure-EPT), or both based on the operation. KVM MMU notifier operations only on shared page table. KVM guest_memfd invalidation operations only on mirrored page table, and so on. Introduce a centralized matching function instead of open coding matching logic in the iterator. The next step is to extend the function to check whether the page is shared or private Link: https://lore.kernel.org/kvm/ZivazWQw1oCU8VBC@google.com/ Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-10-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/mmu/tdp_mmu.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 3fc3f71851129f9d7c6b8b192b6a81604a1cb2e3 Author: Isaku Yamahata <isaku.yamahata@intel.com> Date: Thu Jul 18 14:12:20 2024 -0700 KVM: x86/mmu: Support GFN direct bits Teach the MMU to map guest GFNs at a massaged position on the TDP, to aid in implementing TDX shared memory. Like other Coco technologies, TDX has the concept of private and shared memory. For TDX the private and shared mappings are managed on separate EPT roots. The private half is managed indirectly through calls into a protected runtime environment called the TDX module, where the shared half is managed within KVM in normal page tables. For TDX, the shared half will be mapped in the higher alias, with a "shared bit" set in the GPA. However, KVM will still manage it with the same memslots as the private half. This means memslot looks ups and zapping operations will be provided with a GFN without the shared bit set. So KVM will either need to apply or strip the shared bit before mapping or zapping the shared EPT. Having GFNs sometimes have the shared bit and sometimes not would make the code confusing. So instead arrange the code such that GFNs never have shared bit set. Create a concept of "direct bits", that is stripped from the fault address when setting fault->gfn, and applied within the TDP MMU iterator. Calling code will behave as if it is operating on the PTE mapping the GFN (without shared bits) but within the iterator, the actual mappings will be shifted using bits specific for the root. SPs will have the GFN set without the shared bit. In the end the TDP MMU will behave like it is mapping things at the GFN without the shared bit but with a strange page table format where everything is offset by the shared bit. Since TDX only needs to shift the mapping like this for the shared bit, which is mapped as the normal TDP root, add a "gfn_direct_bits" field to the kvm_arch structure for each VM with a default value of 0. It will have the bit set at the position of the GPA shared bit in GFN through TD specific initialization code. Keep TDX specific concepts out of the MMU code by not naming it "shared". Ranged TLB flushes (i.e. flush_remote_tlbs_range()) target specific GFN ranges. In convention established above, these would need to target the shifted GFN range. It won't matter functionally, since the actual implementation will always result in a full flush for the only planned user (TDX). For correctness reasons, future changes can provide a TDX x86_ops.flush_remote_tlbs_range implementation to return -EOPNOTSUPP and force the full flush for TDs. This leaves one problem. Some operations use a concept of max GFN (i.e. kvm_mmu_max_gfn()), to iterate over the whole TDP range. When applying the direct mask to the start of the range, the iterator would end up skipping iterating over the range not covered by the direct mask bit. For safety, make sure the __tdp_mmu_zap_root() operation iterates over the full GFN range supported by the underlying TDP format. Add a new iterator helper, for_each_tdp_pte_min_level_all(), that iterates the entire TDP GFN range, regardless of root. Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Co-developed-by: Yan Zhao <yan.y.zhao@intel.com> Signed-off-by: Yan Zhao <yan.y.zhao@intel.com> Co-developed-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-9-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/mmu.h | 5 +++++ arch/x86/kvm/mmu/mmu_internal.h | 28 ++++++++++++++++++++++++++-- arch/x86/kvm/mmu/tdp_iter.c | 10 ++++++---- arch/x86/kvm/mmu/tdp_iter.h | 15 +++++++++++---- arch/x86/kvm/mmu/tdp_mmu.c | 5 +---- 6 files changed, 51 insertions(+), 14 deletions(-) commit e23186da667d1573438c04d2f753440fbf223e59 Author: Isaku Yamahata <isaku.yamahata@intel.com> Date: Thu Jul 18 14:12:19 2024 -0700 KVM: x86/tdp_mmu: Take struct kvm in iter loops Add a struct kvm argument to the TDP MMU iterators. Future changes will want to change how the iterator behaves based on a member of struct kvm. Change the signature and callers of the iterator loop helpers in a separate patch to make the future one easier to review. Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-8-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/mmu/tdp_iter.h | 6 +++--- arch/x86/kvm/mmu/tdp_mmu.c | 38 +++++++++++++++++++------------------- 2 files changed, 22 insertions(+), 22 deletions(-) commit 243e13e810c070785b85470c436cc174cf115a3b Author: Rick Edgecombe <rick.p.edgecombe@intel.com> Date: Thu Jul 18 14:12:18 2024 -0700 KVM: x86/mmu: Make kvm_tdp_mmu_alloc_root() return void The kvm_tdp_mmu_alloc_root() function currently always returns 0. This allows for the caller, mmu_alloc_direct_roots(), to call kvm_tdp_mmu_alloc_root() and also return 0 in one line: return kvm_tdp_mmu_alloc_root(vcpu); So it is useful even though the return value of kvm_tdp_mmu_alloc_root() is always the same. However, in future changes, kvm_tdp_mmu_alloc_root() will be called twice in mmu_alloc_direct_roots(). This will force the first call to either awkwardly handle the return value that will always be zero or ignore it. So change kvm_tdp_mmu_alloc_root() to return void. Do it in a separate change so the future change will be cleaner. Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-ID: <20240718211230.1492011-7-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/mmu/mmu.c | 6 ++++-- arch/x86/kvm/mmu/tdp_mmu.c | 3 +-- arch/x86/kvm/mmu/tdp_mmu.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) commit 6961ab0bae5282de221fed5fc3e9db2b9180c4d6 Author: Isaku Yamahata <isaku.yamahata@intel.com> Date: Thu Jul 18 14:12:17 2024 -0700 KVM: x86/mmu: Add an is_mirror member for union kvm_mmu_page_role Introduce a "is_mirror" member to the kvm_mmu_page_role union to identify SPTEs associated with the mirrored EPT. The TDX module maintains the private half of the EPT mapped in the TD in its protected memory. KVM keeps a copy of the private GPAs in a mirrored EPT tree within host memory. This "is_mirror" attribute enables vCPUs to find and get the root page of mirrored EPT from the MMU root list for a guest TD. This also allows KVM MMU code to detect changes in mirrored EPT according to the "is_mirror" mmu page role and propagate the changes to the private EPT managed by TDX module. Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-6-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/asm/kvm_host.h | 8 +++++--- arch/x86/kvm/mmu/mmu_internal.h | 5 +++++ arch/x86/kvm/mmu/spte.h | 5 +++++ 3 files changed, 15 insertions(+), 3 deletions(-) commit 3a4eb364a46d00b7b9f643011b4652bd7f4eecf2 Author: Isaku Yamahata <isaku.yamahata@intel.com> Date: Thu Jul 18 14:12:16 2024 -0700 KVM: x86/mmu: Add an external pointer to struct kvm_mmu_page Add an external pointer to struct kvm_mmu_page for TDX's private page table and add helper functions to allocate/initialize/free a private page table page. TDX will only be supported with the TDP MMU. Because KVM TDP MMU doesn't use unsync_children and write_flooding_count, pack them to have room for a pointer and use a union to avoid memory overhead. For private GPA, CPU refers to a private page table whose contents are encrypted. The dedicated APIs to operate on it (e.g. updating/reading its PTE entry) are used, and their cost is expensive. When KVM resolves the KVM page fault, it walks the page tables. To reuse the existing KVM MMU code and mitigate the heavy cost of directly walking the private page table allocate two sets of page tables for the private half of the GPA space. For the page tables that KVM will walk, allocate them like normal and refer to them as mirror page tables. Additionally allocate one more page for the page tables the CPU will walk, and call them external page tables. Resolve the KVM page fault with the existing code, and do additional operations necessary for modifying the external page table in future patches. The relationship of the types of page tables in this scheme is depicted below: KVM page fault | | | V | -------------+---------- | | | | V V | shared GPA private GPA | | | | V V | shared PT root mirror PT root | private PT root | | | | V V | V shared PT mirror PT --propagate--> external PT | | | | | \-----------------+------\ | | | | | V | V V shared guest page | private guest page | non-encrypted memory | encrypted memory | PT - Page table Shared PT - Visible to KVM, and the CPU uses it for shared mappings. External PT - The CPU uses it, but it is invisible to KVM. TDX module updates this table to map private guest pages. Mirror PT - It is visible to KVM, but the CPU doesn't use it. KVM uses it to propagate PT change to the actual private PT. Add a helper kvm_has_mirrored_tdp() to trigger this behavior and wire it to the TDX vm type. Co-developed-by: Yan Zhao <yan.y.zhao@intel.com> Signed-off-by: Yan Zhao <yan.y.zhao@intel.com> Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Message-ID: <20240718211230.1492011-5-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/asm/kvm_host.h | 5 +++++ arch/x86/kvm/mmu.h | 5 +++++ arch/x86/kvm/mmu/mmu.c | 7 +++++++ arch/x86/kvm/mmu/mmu_internal.h | 31 +++++++++++++++++++++++++++---- arch/x86/kvm/mmu/tdp_mmu.c | 1 + 5 files changed, 45 insertions(+), 4 deletions(-) commit 9364789567f9b49279b138f7d124f0c6db1d6589 Author: Rick Edgecombe <rick.p.edgecombe@intel.com> Date: Thu Jul 18 14:12:15 2024 -0700 KVM: x86: Add a VM type define for TDX Add a VM type define for TDX. Future changes will need to lay the ground work for TDX support by making some behavior conditional on the VM being a TDX guest. Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-4-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/uapi/asm/kvm.h | 1 + 1 file changed, 1 insertion(+) commit dca6c88532322830d5d92486467fcc91b67a9ad8 Author: Isaku Yamahata <isaku.yamahata@intel.com> Date: Thu Jul 18 14:12:14 2024 -0700 KVM: Add member to struct kvm_gfn_range to indicate private/shared Add new members to strut kvm_gfn_range to indicate which mapping (private-vs-shared) to operate on: enum kvm_gfn_range_filter attr_filter. Update the core zapping operations to set them appropriately. TDX utilizes two GPA aliases for the same memslots, one for memory that is for private memory and one that is for shared. For private memory, KVM cannot always perform the same operations it does on memory for default VMs, such as zapping pages and having them be faulted back in, as this requires guest coordination. However, some operations such as guest driven conversion of memory between private and shared should zap private memory. Internally to the MMU, private and shared mappings are tracked on separate roots. Mapping and zapping operations will operate on the respective GFN alias for each root (private or shared). So zapping operations will by default zap both aliases. Add fields in struct kvm_gfn_range to allow callers to specify which aliases so they can only target the aliases appropriate for their specific operation. There was feedback that target aliases should be specified such that the default value (0) is to operate on both aliases. Several options were considered. Several variations of having separate bools defined such that the default behavior was to process both aliases. They either allowed nonsensical configurations, or were confusing for the caller. A simple enum was also explored and was close, but was hard to process in the caller. Instead, use an enum with the default value (0) reserved as a disallowed value. Catch ranges that didn't have the target aliases specified by looking for that specific value. Set target alias with enum appropriately for these MMU operations: - For KVM's mmu notifier callbacks, zap shared pages only because private pages won't have a userspace mapping - For setting memory attributes, kvm_arch_pre_set_memory_attributes() chooses the aliases based on the attribute. - For guest_memfd invalidations, zap private only. Link: https://lore.kernel.org/kvm/ZivIF9vjKcuGie3s@google.com/ Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Co-developed-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-3-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/mmu/mmu.c | 6 ++++++ include/linux/kvm_host.h | 6 ++++++ virt/kvm/guest_memfd.c | 2 ++ virt/kvm/kvm_main.c | 14 ++++++++++++++ 4 files changed, 28 insertions(+) commit 35be969d1ef2c99a98f4b788f7839e6ee5b51ff8 Author: Rick Edgecombe <rick.p.edgecombe@intel.com> Date: Thu Jul 18 14:12:13 2024 -0700 KVM: x86/mmu: Zap invalid roots with mmu_lock holding for write at uninit Prepare for a future TDX patch which asserts that atomic zapping (i.e. zapping with mmu_lock taken for read) don't operate on mirror roots. When tearing down a VM, all roots have to be zapped (including mirror roots once they're in place) so do that with the mmu_lock taken for write. kvm_mmu_uninit_tdp_mmu() is invoked either before or after executing any atomic operations on SPTEs by vCPU threads. Therefore, it will not impact vCPU threads performance if kvm_tdp_mmu_zap_invalidated_roots() acquires mmu_lock for write to zap invalid roots. Co-developed-by: Yan Zhao <yan.y.zhao@intel.com> Signed-off-by: Yan Zhao <yan.y.zhao@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Message-ID: <20240718211230.1492011-2-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/mmu/mmu.c | 2 +- arch/x86/kvm/mmu/tdp_mmu.c | 16 +++++++++++----- arch/x86/kvm/mmu/tdp_mmu.h | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) commit 67b43038ce14d6b0673bdffb2052d879065c94ae Author: Yan Zhao <yan.y.zhao@intel.com> Date: Mon Nov 4 16:43:03 2024 +0800 KVM: guest_memfd: Remove RCU-protected attribute from slot->gmem.file Remove the RCU-protected attribute from slot->gmem.file. No need to use RCU primitives rcu_assign_pointer()/synchronize_rcu() to update this pointer. - slot->gmem.file is updated in 3 places: kvm_gmem_bind(), kvm_gmem_unbind(), kvm_gmem_release(). All of them are protected by kvm->slots_lock. - slot->gmem.file is read in 2 paths: (1) kvm_gmem_populate kvm_gmem_get_file __kvm_gmem_get_pfn (2) kvm_gmem_get_pfn kvm_gmem_get_file __kvm_gmem_get_pfn Path (1) kvm_gmem_populate() requires holding kvm->slots_lock, so slot->gmem.file is protected by the kvm->slots_lock in this path. Path (2) kvm_gmem_get_pfn() does not require holding kvm->slots_lock. However, it's also not guarded by rcu_read_lock() and rcu_read_unlock(). So synchronize_rcu() in kvm_gmem_unbind()/kvm_gmem_release() actually will not wait for the readers in kvm_gmem_get_pfn() due to lack of RCU read-side critical section. The path (2) kvm_gmem_get_pfn() is safe without RCU protection because: a) kvm_gmem_bind() is called on a new memslot, before the memslot is visible to kvm_gmem_get_pfn(). b) kvm->srcu ensures that kvm_gmem_unbind() and freeing of a memslot occur after the memslot is no longer visible to kvm_gmem_get_pfn(). c) get_file_active() ensures that kvm_gmem_get_pfn() will not access the stale file if kvm_gmem_release() sets it to NULL. This is because if kvm_gmem_release() occurs before kvm_gmem_get_pfn(), get_file_active() will return NULL; if get_file_active() does not return NULL, kvm_gmem_release() should not occur until after kvm_gmem_get_pfn() releases the file reference. Signed-off-by: Yan Zhao <yan.y.zhao@intel.com> Message-ID: <20241104084303.29909-1-yan.y.zhao@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> include/linux/kvm_host.h | 7 ++++++- virt/kvm/guest_memfd.c | 34 +++++++++++++++++++++------------- 2 files changed, 27 insertions(+), 14 deletions(-) commit a502ea6fa94b1f7be72a24bcf9e3f5f6b7e6e90c Author: Stefano Brivio <sbrivio@redhat.com> Date: Wed Dec 18 17:21:16 2024 +0100 udp: Deal with race between UDP socket address change and rehash If a UDP socket changes its local address while it's receiving datagrams, as a result of connect(), there is a period during which a lookup operation might fail to find it, after the address is changed but before the secondary hash (port and address) and the four-tuple hash (local and remote ports and addresses) are updated. Secondary hash chains were introduced by commit 30fff9231fad ("udp: bind() optimisation") and, as a result, a rehash operation became needed to make a bound socket reachable again after a connect(). This operation was introduced by commit 719f835853a9 ("udp: add rehash on connect()") which isn't however a complete fix: the socket will be found once the rehashing completes, but not while it's pending. This is noticeable with a socat(1) server in UDP4-LISTEN mode, and a client sending datagrams to it. After the server receives the first datagram (cf. _xioopen_ipdgram_listen()), it issues a connect() to the address of the sender, in order to set up a directed flow. Now, if the client, running on a different CPU thread, happens to send a (subsequent) datagram while the server's socket changes its address, but is not rehashed yet, this will result in a failed lookup and a port unreachable error delivered to the client, as apparent from the following reproducer: LEN=$(($(cat /proc/sys/net/core/wmem_default) / 4)) dd if=/dev/urandom bs=1 count=${LEN} of=tmp.in while :; do taskset -c 1 socat UDP4-LISTEN:1337,null-eof OPEN:tmp.out,create,trunc & sleep 0.1 || sleep 1 taskset -c 2 socat OPEN:tmp.in UDP4:localhost:1337,shut-null wait done where the client will eventually get ECONNREFUSED on a write() (typically the second or third one of a given iteration): 2024/11/13 21:28:23 socat[46901] E write(6, 0x556db2e3c000, 8192): Connection refused This issue was first observed as a seldom failure in Podman's tests checking UDP functionality while using pasta(1) to connect the container's network namespace, which leads us to a reproducer with the lookup error resulting in an ICMP packet on a tap device: LOCAL_ADDR="$(ip -j -4 addr show|jq -rM '.[] | .addr_info[0] | select(.scope == "global").local')" while :; do ./pasta --config-net -p pasta.pcap -u 1337 socat UDP4-LISTEN:1337,null-eof OPEN:tmp.out,create,trunc & sleep 0.2 || sleep 1 socat OPEN:tmp.in UDP4:${LOCAL_ADDR}:1337,shut-null wait cmp tmp.in tmp.out done Once this fails: tmp.in tmp.out differ: char 8193, line 29 we can finally have a look at what's going on: $ tshark -r pasta.pcap 1 0.000000 :: ? ff02::16 ICMPv6 110 Multicast Listener Report Message v2 2 0.168690 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 3 0.168767 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 4 0.168806 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 5 0.168827 c6:47:05:8d:dc:04 ? Broadcast ARP 42 Who has 88.198.0.161? Tell 88.198.0.164 6 0.168851 9a:55:9a:55:9a:55 ? c6:47:05:8d:dc:04 ARP 42 88.198.0.161 is at 9a:55:9a:55:9a:55 7 0.168875 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 8 0.168896 88.198.0.164 ? 88.198.0.161 ICMP 590 Destination unreachable (Port unreachable) 9 0.168926 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 10 0.168959 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 11 0.168989 88.198.0.161 ? 88.198.0.164 UDP 4138 60260 ? 1337 Len=4096 12 0.169010 88.198.0.161 ? 88.198.0.164 UDP 42 60260 ? 1337 Len=0 On the third datagram received, the network namespace of the container initiates an ARP lookup to deliver the ICMP message. In another variant of this reproducer, starting the client with: strace -f pasta --config-net -u 1337 socat UDP4-LISTEN:1337,null-eof OPEN:tmp.out,create,trunc 2>strace.log & and connecting to the socat server using a loopback address: socat OPEN:tmp.in UDP4:localhost:1337,shut-null we can more clearly observe a sendmmsg() call failing after the first datagram is delivered: [pid 278012] connect(173, 0x7fff96c95fc0, 16) = 0 [...] [pid 278012] recvmmsg(173, 0x7fff96c96020, 1024, MSG_DONTWAIT, NULL) = -1 EAGAIN (Resource temporarily unavailable) [pid 278012] sendmmsg(173, 0x561c5ad0a720, 1, MSG_NOSIGNAL) = 1 [...] [pid 278012] sendmmsg(173, 0x561c5ad0a720, 1, MSG_NOSIGNAL) = -1 ECONNREFUSED (Connection refused) and, somewhat confusingly, after a connect() on the same socket succeeded. Until commit 4cdeeee9252a ("net: udp: prefer listeners bound to an address"), the race between receive address change and lookup didn't actually cause visible issues, because, once the lookup based on the secondary hash chain failed, we would still attempt a lookup based on the primary hash (destination port only), and find the socket with the outdated secondary hash. That change, however, dropped port-only lookups altogether, as side effect, making the race visible. To fix this, while avoiding the need to make address changes and rehash atomic against lookups, reintroduce primary hash lookups as fallback, if lookups based on four-tuple and secondary hashes fail. To this end, introduce a simplified lookup implementation, which doesn't take care of SO_REUSEPORT groups: if we have one, there are multiple sockets that would match the four-tuple or secondary hash, meaning that we can't run into this race at all. v2: - instead of synchronising lookup operations against address change plus rehash, reintroduce a simplified version of the original primary hash lookup as fallback v1: - fix build with CONFIG_IPV6=n: add ifdef around sk_v6_rcv_saddr usage (Kuniyuki Iwashima) - directly use sk_rcv_saddr for IPv4 receive addresses instead of fetching inet_rcv_saddr (Kuniyuki Iwashima) - move inet_update_saddr() to inet_hashtables.h and use that to set IPv4/IPv6 addresses as suitable (Kuniyuki Iwashima) - rebase onto net-next, update commit message accordingly Reported-by: Ed Santiago <santiago@redhat.com> Link: https://github.com/containers/podman/issues/24147 Analysed-by: David Gibson <david@gibson.dropbear.id.au> Fixes: 30fff9231fad ("udp: bind() optimisation") Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv4/udp.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ net/ipv6/udp.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) commit d50c837675a95f733e53a5e21eb168f8c9f5a73d Author: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr> Date: Sat Dec 21 12:06:49 2024 +0100 can: dev: can_get_state_str(): Remove dead code The default switch case ends with a return; meaning this return is never reached. Coverity-ID: 1497123 Signed-off-by: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr> Link: https://patch.msgid.link/20241221111454.1074285-4-ariel.otilibili-anieli@eurecom.fr Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> drivers/net/can/dev/dev.c | 2 -- 1 file changed, 2 deletions(-) commit 1263e69a7c47a68537476298f13f943fb954581e Author: Oliver Hartkopp <socketcan@hartkopp.net> Date: Thu Dec 19 20:08:37 2024 +0100 MAINTAINERS: assign em_canid.c additionally to CAN maintainers The extended match rule em_canid is used to classify CAN frames based on their CAN Identifier. To keep the CAN maintainers in the loop for relevant changes which might affect the CAN specific functionality add em_canid.c to the CAN NETWORK LAYER files. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Link: https://patch.msgid.link/20241219190837.3087-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 57769cb9ccbad92c5126264584346ebc8501b353 Author: Oliver Hartkopp <socketcan@hartkopp.net> Date: Sat Nov 30 18:08:34 2024 +0100 mailmap: add an entry for Oliver Hartkopp Map my retired company address and an accidentally used personal mail address within mailmap. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Link: https://patch.msgid.link/20241130170911.2828-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> .mailmap | 2 ++ 1 file changed, 2 insertions(+) commit 2351998fd833eb40358adf0b889637311b5bc6b4 Author: Charan Pedumuru <charan.pedumuru@microchip.com> Date: Wed Nov 20 13:58:08 2024 +0530 dt-bindings: net: can: atmel: Convert to json schema Convert old text based binding to json schema. Changes during conversion: - Add a fallback for `microchip,sam9x60-can` as it is compatible with the CAN IP core on `atmel,at91sam9x5-can`. - Add the required properties `clock` and `clock-names`, which were missing in the original binding. - Update examples and include appropriate file directives to resolve errors identified by `dt_binding_check` and `dtbs_check`. Signed-off-by: Charan Pedumuru <charan.pedumuru@microchip.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20241120-can-v3-1-da5bb4f6128d@microchip.com [mkl: fixed indention in example] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> .../bindings/net/can/atmel,at91sam9263-can.yaml | 58 ++++++++++++++++++++++ .../devicetree/bindings/net/can/atmel-can.txt | 15 ------ 2 files changed, 58 insertions(+), 15 deletions(-) commit 68d426da13fac6b1d3f5949a38d31ce2e3d88e49 Author: Sean Nyekjaer <sean@geanix.com> Date: Thu Nov 28 09:32:31 2024 +0100 can: tcan4x5x: get rid of false clock errors tcan4x5x devices only requires the clock "cclk", so call devm_clk_get() directly. This is done to avoid m_can_class_get_clocks() that checks for both hclk and cclk and results in this warning message: | tcan4x5x spi0.0: no clock found Signed-off-by: Sean Nyekjaer <sean@geanix.com> Link: https://patch.msgid.link/20241128-mcancclk-v1-1-a93aac64dbae@geanix.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> drivers/net/can/m_can/tcan4x5x-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bddad4fac9f73c14f57b111058dd0fa6d9ede228 Author: Dario Binacchi <dario.binacchi@amarulasolutions.com> Date: Fri Nov 22 23:15:44 2024 +0100 can: sun4i_can: continue to use likely() to check skb Throughout the sun4i_can_err() function, the likely() macro is used to check the skb buffer, except in one instance. This patch makes the code consistent by using the macro in that case as well. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Link: https://patch.msgid.link/20241122221650.633981-4-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> drivers/net/can/sun4i_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad79f18ba443222f9c0bfb188e2d93f8f029803f Merge: 79195755cdeb 36131b72fb1c Author: Marc Kleine-Budde <mkl@pengutronix.de> Date: Mon Dec 23 12:38:55 2024 +0100 Merge patch series "can: tcan4x5x: add option for selecting nWKRQ voltage" Sean Nyekjaer <sean@geanix.com> says: This series adds support for setting the nWKRQ voltage. Link: https://patch.msgid.link/20241114-tcan-wkrqv-v5-0-a2d50833ed71@geanix.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> commit 36131b72fb1c62bc61e86068618de304763b8ac7 Author: Sean Nyekjaer <sean@geanix.com> Date: Thu Nov 14 10:14:50 2024 +0100 can: tcan4x5x: add option for selecting nWKRQ voltage The nWKRQ pin supports an output voltage of either the internal reference voltage (3.6V) or the reference voltage of the digital interface 0-6V (VIO). Add the devicetree option ti,nwkrq-voltage-vio to set it to VIO. If this property is omitted the reset default, the internal reference voltage, is used. Signed-off-by: Sean Nyekjaer <sean@geanix.com> Reviewed-by: Marc Kleine-Budde <mkl@pengutronix.de> Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://patch.msgid.link/20241114-tcan-wkrqv-v5-2-a2d50833ed71@geanix.com [mkl: remove unused variable in tcan4x5x_get_dt_data()] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> drivers/net/can/m_can/tcan4x5x-core.c | 19 +++++++++++++++++++ drivers/net/can/m_can/tcan4x5x.h | 2 ++ 2 files changed, 21 insertions(+) commit 0b5b1c881a909f17c05ef4b1ccb421e077f6e466 Author: Chen-Yu Tsai <wenst@chromium.org> Date: Wed Oct 30 15:02:20 2024 +0800 arm64: dts: mediatek: mt8183-kukui-jacuzzi: Drop pp3300_panel voltage settings The pp3300_panel fixed regulator is just a load switch. It does not have any regulating capabilities. Thus having voltage constraints on it is wrong. Remove the voltage constraints. Fixes: cabc71b08eb5 ("arm64: dts: mt8183: Add kukui-jacuzzi-damu board") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://lore.kernel.org/r/20241030070224.1006331-2-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi.dtsi | 2 -- 1 file changed, 2 deletions(-) commit cab316255951188fb2847af04f2123c1ab85dadf Author: Nícolas F. R. A. Prado <nfraprado@collabora.com> Date: Mon Dec 16 16:51:26 2024 -0300 arm64: defconfig: Enable MediaTek DWMAC Enable the config for the DWMAC MediaTek glue layer to allow usage of the Ethernet controller present on MT8195 and MT8188 SoCs. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://lore.kernel.org/r/20241216-genio700-configs-eth-sound-v1-2-04a719035d6e@collabora.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit bf6c63f066b68eacdd43d4f360ac8dcc5110e04e Author: Nícolas F. R. A. Prado <nfraprado@collabora.com> Date: Mon Dec 16 16:51:25 2024 -0300 arm64: defconfig: Enable sound for MT8188 Enable platform and machine sound drivers for the MT8188 SoC with the MT6359 PMIC codec, as well as the MT8186 SOF driver which is also compatible with MT8188, in order to get working sound on MT8188 SoCs. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://lore.kernel.org/r/20241216-genio700-configs-eth-sound-v1-1-04a719035d6e@collabora.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 6140ae05d79ce063c976b2cc5660c76e98fbf9c6 Author: Nícolas F. R. A. Prado <nfraprado@collabora.com> Date: Fri Dec 20 13:50:44 2024 -0300 arm64: defconfig: Enable MediaTek STAR Ethernet MAC Enable CONFIG_NET_VENDOR_MEDIATEK and CONFIG_NET_MEDIATEK_STAR_EMAC in the defconfig to allow usage of the Ethernet controller on the MT8365 SoC. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://lore.kernel.org/r/20241220-mt8365-eth-config-v1-1-7f3ffae35fd6@collabora.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit f8a032834abceed9db3f20a5eb56064b21c84613 Author: Nícolas F. R. A. Prado <nfraprado@collabora.com> Date: Sat Nov 9 10:16:33 2024 -0500 arm64: dts: mediatek: Set mediatek,mac-wol on DWMAC node for all boards Due to the mediatek,mac-wol property previously being handled backwards by the dwmac-mediatek driver, its use in the DTs seems to have been inconsistent. Now that the driver has been fixed, correct this description. All the currently upstream boards support MAC WOL, so add the mediatek,mac-wol property to the missing ones. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://lore.kernel.org/r/20241109-mediatek-mac-wol-noninverted-v2-2-0e264e213878@collabora.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt2712-evb.dts | 1 + arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 1 + arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts | 1 + 3 files changed, 3 insertions(+) commit b44b9bc7cab2967c3d6a791b1cd542c89fc07f0e Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Tue Dec 3 09:13:00 2024 +0100 OPP: fix dev_pm_opp_find_bw_*() when bandwidth table not initialized If a driver calls dev_pm_opp_find_bw_ceil/floor() the retrieve bandwidth from the OPP table but the bandwidth table was not created because the interconnect properties were missing in the OPP consumer node, the kernel will crash with: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004 ... pc : _read_bw+0x8/0x10 lr : _opp_table_find_key+0x9c/0x174 ... Call trace: _read_bw+0x8/0x10 (P) _opp_table_find_key+0x9c/0x174 (L) _find_key+0x98/0x168 dev_pm_opp_find_bw_ceil+0x50/0x88 ... In order to fix the crash, create an assert function to check if the bandwidth table was created before trying to get a bandwidth with _read_bw(). Fixes: add1dc094a74 ("OPP: Use generic key finding helpers for bandwidth key") Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/opp/core.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit d659bc68ed489022ea33342cfbda2911a81e7a0d Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Tue Dec 3 09:12:59 2024 +0100 OPP: add index check to assert to avoid buffer overflow in _read_freq() Pass the freq index to the assert function to make sure we do not read a freq out of the opp->rates[] table when called from the indexed variants: dev_pm_opp_find_freq_exact_indexed() or dev_pm_opp_find_freq_ceil/floor_indexed(). Add a secondary parameter to the assert function, unused for assert_single_clk() then add assert_clk_index() which will check for the clock index when called from the _indexed() find functions. Fixes: 142e17c1c2b4 ("OPP: Introduce dev_pm_opp_find_freq_{ceil/floor}_indexed() APIs") Fixes: a5893928bb17 ("OPP: Add dev_pm_opp_find_freq_exact_indexed()") Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/opp/core.c | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) commit 402074f0105e93154409e4a86c02d09e5199d9a5 Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Sat Nov 30 13:07:56 2024 +0300 opp: core: Fix off by one in dev_pm_opp_get_bw() The "opp->bandwidth" array has "opp->opp_table->path_count" number of elements. It's allocated in _opp_allocate(). So this > needs to be >= to prevent an out of bounds access. Fixes: d78653dcd8bf ("opp: core: implement dev_pm_opp_get_bw") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b89c0ed09e1189217cd9d516b739627c523d53a4 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Tue Nov 19 18:56:36 2024 +0100 opp: core: implement dev_pm_opp_get_bw Add and implement dev_pm_opp_get_bw() to retrieve the OPP's bandwidth in the same way as the dev_pm_opp_get_voltage() helper. Retrieving bandwidth is required in the case of the Adreno GPU where the GPU Management Unit can handle the Bandwidth scaling. The helper can get the peak or average bandwidth for any of the interconnect path. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> [ Viresh: Fixed commit log and a comment in code ] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/opp/core.c | 25 +++++++++++++++++++++++++ include/linux/pm_opp.h | 7 +++++++ 2 files changed, 32 insertions(+) commit a9ba290d0b829012574b6821ba08815046e60c94 Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Date: Thu Dec 5 22:20:29 2024 +0530 cpufreq: qcom: Implement clk_ops::determine_rate() for qcom_cpufreq* clocks determine_rate() callback is used by the clk_set_rate() API to get the closest rate of the target rate supported by the clock. If this callback is not implemented (nor round_rate() callback), then the API will assume that the clock cannot set the requested rate. And since there is no parent, it will return -EINVAL. This is not an issue right now as clk_set_rate() mistakenly compares the target rate with cached rate and bails out early. But once that is fixed to compare the target rate with the actual rate of the clock (returned by recalc_rate()), then clk_set_rate() for this clock will start to fail as below: cpu cpu0: _opp_config_clk_single: failed to set clock rate: -22 So implement the determine_rate() callback that just returns the actual rate at which the clock is passed to the CPUs in a domain. Fixes: 4370232c727b ("cpufreq: qcom-hw: Add CPU clock provider support") Reported-by: Johan Hovold <johan+linaro@kernel.org> Suggested-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/cpufreq/qcom-cpufreq-hw.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 85d8b11351a8f15d6ec7a5e97909861cb3b6bcec Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Date: Thu Dec 5 22:20:28 2024 +0530 cpufreq: qcom: Fix qcom_cpufreq_hw_recalc_rate() to query LUT if LMh IRQ is not available Currently, qcom_cpufreq_hw_recalc_rate() returns the LMh throttled frequency for the domain even if LMh IRQ is not available. But as per qcom_cpufreq_hw_get(), the driver has to query LUT entries to get the actual frequency of the domain. So do the same in qcom_cpufreq_hw_recalc_rate(). While doing so, refactor the existing qcom_cpufreq_hw_get() function so that qcom_cpufreq_hw_recalc_rate() can make use of the existing code and avoid code duplication. This also requires setting the qcom_cpufreq_data::policy even if LMh IRQ is not available. Fixes: 4370232c727b ("cpufreq: qcom-hw: Add CPU clock provider support") Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/cpufreq/qcom-cpufreq-hw.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 1a4ddf6ab9dde8a7e1e025c44745862705636b2f Author: Nick Chan <towinchenmi@gmail.com> Date: Thu Dec 19 02:25:09 2024 +0800 cpufreq: apple-soc: Add Apple A7-A8X SoC cpufreq support These SoCs only use 3 bits for p-states, and have a different APPLE_DVFS_CMD_PS1 mask value. Signed-off-by: Nick Chan <towinchenmi@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/cpufreq/apple-soc-cpufreq.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit 13b147b2a9f8a9a0b18eddd23abaf84d7bea80d1 Author: Nick Chan <towinchenmi@gmail.com> Date: Thu Dec 19 02:25:08 2024 +0800 cpufreq: apple-soc: Set fallback transition latency to APPLE_DVFS_TRANSITION_TIMEOUT The driver already assumes transitions will not take longer than APPLE_DVFS_TRANSITION_TIMEOUT in apple_soc_cpufreq_set_target(), so it makes little sense to set CPUFREQ_ETERNAL as the transition latency when the transistion latency is not given by the opp-table. Reviewed-by: Christian Loehle <christian.loehle@arm.com> Signed-off-by: Nick Chan <towinchenmi@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/cpufreq/apple-soc-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0dc21f609149b958ca8c010d17f9935ed9cc96fe Author: Nick Chan <towinchenmi@gmail.com> Date: Thu Dec 19 02:25:07 2024 +0800 cpufreq: apple-soc: Increase cluster switch timeout to 400us Apple A11 SoC takes a long time to switch. Maximum switch time observed is 345us, so increase the cluster switch timeout to 400us to be safe. Signed-off-by: Nick Chan <towinchenmi@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/cpufreq/apple-soc-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55aac9f570b0f8a300a9b0128620ced15c4742d8 Author: Nick Chan <towinchenmi@gmail.com> Date: Thu Dec 19 02:25:06 2024 +0800 cpufreq: apple-soc: Use 32-bit read for status register Apple A7-A9(X) SoCs requires 32-bit reads on the status register. Newer SoCs accepts 32-bit reads on the status register as well. Signed-off-by: Nick Chan <towinchenmi@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/cpufreq/apple-soc-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0755a9376ec949eb7d881324548266ba8667a206 Author: Nick Chan <towinchenmi@gmail.com> Date: Thu Dec 19 02:25:05 2024 +0800 cpufreq: apple-soc: Allow per-SoC configuration of APPLE_DVFS_CMD_PS1 Support for SoC that has a different APPLE_DVFS_CMD_PS1 will be added soon, so modify the driver first to allow it to be configured per-SoC. Signed-off-by: Nick Chan <towinchenmi@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/cpufreq/apple-soc-cpufreq.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 4a06c250abaaf7cd1e32abcb90694b551712fa63 Author: Hector Martin <marcan@marcan.st> Date: Thu Dec 19 02:25:04 2024 +0800 cpufreq: apple-soc: Drop setting the PS2 field on M2+ Newer device do not use this. It is not known what this field does, but change the behavior to be same as macOS to be safe. Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Nick Chan <towinchenmi@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/cpufreq/apple-soc-cpufreq.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit a248d90ddc3f73d193327275da2f16fb80c862cf Author: Nick Chan <towinchenmi@gmail.com> Date: Thu Dec 19 02:25:03 2024 +0800 dt-bindings: cpufreq: apple,cluster-cpufreq: Add A7-A11, T2 compatibles Add compatibles for Apple A7-A11, T2 SoCs. Apple A7, A8, A8X gets the per-SoC compatible and the A7 "apple,s5l8960x-cluster-cpufreq" compatible. Apple A9, A9X, A10, A10X, T2, A11 gets the per-SoC compatible, M1 "apple,t8103-cluster-cpufreq" compatible, then the "apple,cluster-cpufreq" fallback compatible. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Nick Chan <towinchenmi@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> .../devicetree/bindings/cpufreq/apple,cluster-cpufreq.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit ab16dfb99cb565fb21ddf29320890c7bad35024c Author: Christian Marangi <ansuelsmth@gmail.com> Date: Fri Dec 6 22:11:24 2024 +0100 dt-bindings: cpufreq: Document support for Airoha EN7581 CPUFreq On newer Airoha SoC, CPU Frequency is scaled indirectly with SMC commands to ATF. A virtual clock is exposed. This virtual clock is a get-only clock and is used to expose the current global CPU clock. The frequency info comes by the output of the SMC command that reports the clock in MHz. The SMC sets the CPU clock by providing an index, this is modelled as performance states in a power domain. CPUs can't be individually scaled as the CPU frequency is shared across all CPUs and is global. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> .../bindings/cpufreq/airoha,en7581-cpufreq.yaml | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit f1f010c9d9c62c865d9f54e94075800ba764b4d9 Author: Andreas Kemnade <andreas@kemnade.info> Date: Sun Nov 3 22:02:51 2024 +0100 cpufreq: fix using cpufreq-dt as module This driver can be built as a module since commit 3b062a086984 ("cpufreq: dt-platdev: Support building as module"), but unfortunately this caused a regression because the cputfreq-dt-platdev.ko module does not autoload. Usually, this is solved by just using the MODULE_DEVICE_TABLE() macro to export all the device IDs as module aliases. But this driver is special due how matches with devices and decides what platform supports. There are two of_device_id lists, an allow list that are for CPU devices that always match and a deny list that's for devices that must not match. The driver registers a cpufreq-dt platform device for all the CPU device nodes that either are in the allow list or contain an operating-points-v2 property and are not in the deny list. Enforce builtin compile of cpufreq-dt-platdev to make autoload work. Fixes: 3b062a086984 ("cpufreq: dt-platdev: Support building as module") Link: https://lore.kernel.org/all/20241104201424.2a42efdd@akair/ Link: https://lore.kernel.org/all/20241119111918.1732531-1-javierm@redhat.com/ Cc: stable@vger.kernel.org Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reported-by: Radu Rendec <rrendec@redhat.com> Reported-by: Javier Martinez Canillas <javierm@redhat.com> [ Viresh: Picked commit log from Javier, updated tags ] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/cpufreq/Kconfig | 2 +- drivers/cpufreq/cpufreq-dt-platdev.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit 34059ed0f30f3b83aac0576c131e79d39bc143d8 Author: Sibi Sankar <quic_sibis@quicinc.com> Date: Thu Nov 14 07:59:16 2024 +0530 cpufreq: scmi: Register for limit change notifications Register for limit change notifications if supported and use the throttled frequency from the notification to apply HW pressure. Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com> Tested-by: Mike Tipton <quic_mdtipton@quicinc.com> Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/cpufreq/scmi-cpufreq.c | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 259230378c65ebb6b4815b4dd175c5298428b9fa Author: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk> Date: Wed Dec 18 18:19:55 2024 +0000 leds: Add LED1202 I2C driver The output current can be adjusted separately for each channel by 8-bit analog (current sink input) and 12-bit digital (PWM) dimming control. The LED1202 implements 12 low-side current generators with independent dimming control. Internal volatile memory allows the user to store up to 8 different patterns, each pattern is a particular output configuration in terms of PWM duty-cycle (on 4096 steps). Analog dimming (on 256 steps) is per channel but common to all patterns. Each device tree LED node will have a corresponding entry in /sys/class/leds with the label name. The brightness property corresponds to the per channel analog dimming, while the patterns[1-8] to the PWM dimming control. Signed-off-by: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk> Link: https://lore.kernel.org/r/20241218182001.41476-4-vicentiu.galanopulo@remote-tech.co.uk Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/Kconfig | 10 ++ drivers/leds/leds-st1202.c | 416 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 426 insertions(+) commit 0fffcd4e7cfdb0160ab74a4c6cdb55c9c8bde823 Author: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk> Date: Wed Dec 18 18:19:54 2024 +0000 dt-bindings: leds: Add LED1202 LED Controller The LED1202 is a 12-channel low quiescent current LED driver with: * Supply range from 2.6 V to 5 V * 20 mA current capability per channel * 1.8 V compatible I2C control interface * 8-bit analog dimming individual control * 12-bit local PWM resolution * 8 programmable patterns If the led node is present in the controller then the channel is set to active. Signed-off-by: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241218182001.41476-3-vicentiu.galanopulo@remote-tech.co.uk Signed-off-by: Lee Jones <lee@kernel.org> .../devicetree/bindings/leds/st,led1202.yaml | 132 +++++++++++++++++++++ 1 file changed, 132 insertions(+) commit b1816b22381be67a899c8c0c65fb919102a0e750 Author: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk> Date: Wed Dec 18 18:19:53 2024 +0000 Documentation:leds: Add leds-st1202.rst Add usage for sysfs hw_pattern entry for leds-st1202 Signed-off-by: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk> Link: https://lore.kernel.org/r/20241218182001.41476-2-vicentiu.galanopulo@remote-tech.co.uk Signed-off-by: Lee Jones <lee@kernel.org> Documentation/leds/index.rst | 1 + Documentation/leds/leds-st1202.rst | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit 3e3aa566dd1803f1697530de6c8489a8350765b3 Author: Bitterblue Smith <rtl8821cerfe2@gmail.com> Date: Thu Dec 19 00:35:49 2024 +0200 wifi: rtw88: usb: Preallocate and reuse the RX skbs The USB driver uses four USB Request Blocks for RX. Before submitting one, it allocates a 32768 byte skb for the RX data. This allocation can fail, maybe due to temporary memory fragmentation. When the allocation fails, the corresponding URB is never submitted again. After four such allocation failures, all RX stops because the driver is not requesting data from the device anymore. Don't allocate a 32768 byte skb when submitting a USB Request Block (which happens very often). Instead preallocate 8 such skbs, and reuse them over and over. If all 8 are busy, allocate a new one. This is pretty rare. If the allocation fails, use a work to try again later. When there are enough free skbs again, free the excess skbs. Also, use WQ_BH for the RX workqueue. With a normal or high priority workqueue the skbs are processed too slowly when the system is even a little busy, like when opening a new page in a browser, and the driver runs out of free skbs and allocates a lot of new ones. This is more or less what the out-of-tree Realtek drivers do, except they use a tasklet instead of a BH workqueue. Tested with RTL8723DU, RTL8821AU, RTL8812AU, RTL8812BU, RTL8822CU, RTL8811CU. Closes: https://lore.kernel.org/linux-wireless/6e7ecb47-7ea0-433a-a19f-05f88a2edf6b@gmail.com/ Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/9cee7a34-c38d-4128-824d-0ec139ca5a4e@gmail.com drivers/net/wireless/realtek/rtw88/usb.c | 79 ++++++++++++++++++++++++++------ drivers/net/wireless/realtek/rtw88/usb.h | 3 ++ 2 files changed, 67 insertions(+), 15 deletions(-) commit 13221be72034d1c34630ab124c43438aefe7e656 Author: Bitterblue Smith <rtl8821cerfe2@gmail.com> Date: Thu Dec 19 00:34:42 2024 +0200 wifi: rtw88: Handle C2H_ADAPTIVITY in rtw_fw_c2h_cmd_handle() The firmware message C2H_ADAPTIVITY is currently handled in rtw_fw_c2h_cmd_rx_irqsafe(), which runs in the RX workqueue, but it's not "irqsafe" with USB because it sleeps (reads hardware registers). This becomes a problem after the next patch, which will create the RX workqueue with the flag WQ_BH. To avoid sleeping when it's not allowed, handle C2H_ADAPTIVITY in rtw_fw_c2h_cmd_handle(), which runs in the c2h workqueue. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/96e52b03-be8d-4050-ae71-bfdb478ff42f@gmail.com drivers/net/wireless/realtek/rtw88/fw.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit e9048e2935f7d797c2ba047c15b705b57c2fa99a Author: Bitterblue Smith <rtl8821cerfe2@gmail.com> Date: Thu Dec 19 00:33:20 2024 +0200 wifi: rtw88: usb: Copy instead of cloning the RX skb "iperf3 -c 192.168.0.1 -R --udp -b 0" shows about 40% of datagrams are lost. Many torrents don't download faster than 3 MiB/s, probably because the Bittorrent protocol uses UDP. This is somehow related to the use of skb_clone() in the RX path. Don't use skb_clone(). Instead allocate a new skb for each 802.11 frame received and copy the data from the big (32768 byte) skb. With this patch, "iperf3 -c 192.168.0.1 -R --udp -b 0" shows only 1-2% of datagrams are lost, and torrents can reach download speeds of 36 MiB/s. Tested with RTL8812AU and RTL8822CU. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/8c9d4f9d-ebd8-4dc0-a0c4-9ebe430521dd@gmail.com drivers/net/wireless/realtek/rtw88/usb.c | 52 +++++++++++++++++++------------- 1 file changed, 31 insertions(+), 21 deletions(-) commit 74a72c367573ad521becf6cc4d649e14387b3c64 Author: Bitterblue Smith <rtl8821cerfe2@gmail.com> Date: Wed Dec 18 02:16:11 2024 +0200 wifi: rtw88: 8821a/8812a: Set ptct_efuse_size to 0 Some RTL8812AU devices fail to probe: [ 12.478774] rtw_8812au 1-1.3:1.0: failed to dump efuse logical map [ 12.487712] rtw_8812au 1-1.3:1.0: failed to setup chip efuse info [ 12.487742] rtw_8812au 1-1.3:1.0: failed to setup chip information [ 12.491077] rtw_8812au: probe of 1-1.3:1.0 failed with error -22 It turns out these chips don't need to "protect" any bytes at the end of the efuse. The original value of 96 was copied from rtw8821c.c. No one reported any failures with RTL8821AU yet, but the vendor driver uses the same efuse reading code for both chips. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/1a477adb-60c3-463c-b158-3f86c94cb821@gmail.com drivers/net/wireless/realtek/rtw88/rtw8812a.c | 2 +- drivers/net/wireless/realtek/rtw88/rtw8821a.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 59ab27a9f20f8de6f7989e8a8c3d97c04ed8199c Author: Bitterblue Smith <rtl8821cerfe2@gmail.com> Date: Wed Dec 18 02:13:22 2024 +0200 wifi: rtw88: 8812a: Support RFE type 2 RF front end type 2 exists in the wild and can be treated like types 0 and 1. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/2917c7fc-6d88-4007-b6a6-9130bd1991e5@gmail.com drivers/net/wireless/realtek/rtw88/rtw8812a.c | 3 +++ 1 file changed, 3 insertions(+) commit 66ef0289ac99e155d206ddaa0fdfad09ae3cd007 Author: Bitterblue Smith <rtl8821cerfe2@gmail.com> Date: Wed Dec 18 00:53:11 2024 +0200 wifi: rtlwifi: rtl8821ae: Fix media status report RTL8821AE is stuck transmitting at the lowest rate allowed by the rate mask. This is because the firmware doesn't know the device is connected to a network. Fix the macros SET_H2CCMD_MSRRPT_PARM_OPMODE and SET_H2CCMD_MSRRPT_PARM_MACID_IND to work on the first byte of __cmd, not the second. Now the firmware is correctly notified when the device is connected to a network and it activates the rate control. Before (MCS3): [ 5] 0.00-1.00 sec 12.5 MBytes 105 Mbits/sec 0 339 KBytes [ 5] 1.00-2.00 sec 10.6 MBytes 89.1 Mbits/sec 0 339 KBytes [ 5] 2.00-3.00 sec 10.6 MBytes 89.1 Mbits/sec 0 386 KBytes [ 5] 3.00-4.00 sec 10.6 MBytes 89.1 Mbits/sec 0 386 KBytes [ 5] 4.00-5.00 sec 10.2 MBytes 86.0 Mbits/sec 0 427 KBytes After (MCS9): [ 5] 0.00-1.00 sec 33.9 MBytes 284 Mbits/sec 0 771 KBytes [ 5] 1.00-2.00 sec 31.6 MBytes 265 Mbits/sec 0 865 KBytes [ 5] 2.00-3.00 sec 29.9 MBytes 251 Mbits/sec 0 963 KBytes [ 5] 3.00-4.00 sec 28.2 MBytes 237 Mbits/sec 0 963 KBytes [ 5] 4.00-5.00 sec 26.8 MBytes 224 Mbits/sec 0 963 KBytes Fixes: 39f40710d0b5 ("rtlwifi: rtl88821ae: Remove usage of private bit manipulation macros") Cc: stable@vger.kernel.org Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/754785b3-8a78-4554-b80d-de5f603b410b@gmail.com drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0daa521a1c8c29ffbefe6530f0d276e74e2749d0 Author: Ping-Ke Shih <pkshih@realtek.com> Date: Thu Dec 12 13:42:03 2024 +0800 wifi: rtw88: add __packed attribute to efuse layout struct The layout struct of efuse should not do address alignment by compiler. Otherwise it leads unexpected layout and size for certain arch suc as arm. In x86-64, the results are identical before and after this patch. Also adjust bit-field to prevent over adjacent byte to avoid warning: rtw88/rtw8822b.h:66:1: note: offset of packed bit-field `res2` has changed in GCC 4.4 66 | } __packed; | ^ Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412120131.qk0x6OhE-lkp@intel.com/ Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241212054203.135046-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw88/main.h | 4 ++-- drivers/net/wireless/realtek/rtw88/rtw8723x.h | 8 ++++---- drivers/net/wireless/realtek/rtw88/rtw8821c.h | 9 +++++---- drivers/net/wireless/realtek/rtw88/rtw8822b.h | 9 +++++---- drivers/net/wireless/realtek/rtw88/rtw8822c.h | 9 +++++---- 5 files changed, 21 insertions(+), 18 deletions(-) commit d3571faa1ba899f2459ee3616d702e7b07b9c996 Merge: 362a7993ed01 4bbf9020becb Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Mon Dec 23 07:58:41 2024 +0100 Merge 6.14-rc4 into usb-next We need the USB fixes in here as well for testing. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 74148bb59e2064b87eb1715d9eb109adccb75316 Author: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Date: Tue Dec 3 14:51:44 2024 +0530 soundwire: amd: clear wake enable register for power off mode As per design for power off mode, clear the wake enable register during resume sequence. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20241203092144.4096986-1-Vijendar.Mukunda@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/soundwire/amd_manager.c | 1 + 1 file changed, 1 insertion(+) commit 25befdf32aa407ac21d8b2aa1257ff666fb783b2 Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Wed Dec 18 16:01:55 2024 +0800 soundwire: generic_bandwidth_allocation: count the bandwidth of active streams only sdw_compute_group_params() should only count payload bandwidth of the active streams which is in the ENABLED and DISABLED state in the bus. And add the payload bandwidth of the stream that calls sdw_compute_group_params() in sdw_prepare_stream(). Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-15-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/soundwire/generic_bandwidth_allocation.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 168cdf9cdef232225f6b6c617fd347b4d1c4a7d7 Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Wed Dec 18 16:01:54 2024 +0800 SoundWire: pass stream to compute_params() The stream parameter will be used in the follow up commit. No function change. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-14-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/soundwire/amd_manager.c | 2 +- drivers/soundwire/generic_bandwidth_allocation.c | 11 +- drivers/soundwire/qcom.c | 2 +- drivers/soundwire/stream.c | 4 +- include/linux/soundwire/sdw.h | 148 +++++++++++------------ 5 files changed, 85 insertions(+), 82 deletions(-) commit 366fd59fb894e3d3605de9eeb856e92221ff9d48 Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Wed Dec 18 16:01:53 2024 +0800 soundwire: generic_bandwidth_allocation: add lane in sdw_group_params All active streams with the same parameters are grouped together and the params are stored in the sdw_group struct. We compute the required bandwidth for each group. However, each lane has individual bandwidth. Therefore, we should separate different lanes in different params groups. Add lane variable to separate params groups. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-13-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/soundwire/bus.h | 1 + drivers/soundwire/generic_bandwidth_allocation.c | 122 +++++++++++++++++------ 2 files changed, 90 insertions(+), 33 deletions(-) commit 7a30292ffa2a048271755fdf9364e11343315271 Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Wed Dec 18 16:01:52 2024 +0800 soundwire: generic_bandwidth_allocation: select data lane If a peripheral supports multi-lane, we can use data lane x to extend the bandwidth. The patch suggests to select data lane x where x > 0 when bandwidth is not enough on data lane 0. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-12-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/soundwire/generic_bandwidth_allocation.c | 133 ++++++++++++++++++++++- drivers/soundwire/stream.c | 20 +++- 2 files changed, 146 insertions(+), 7 deletions(-) commit 4a7927d54d2c819029e70f6efa768085b90bfc34 Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Wed Dec 18 16:01:51 2024 +0800 soundwire: generic_bandwidth_allocation: check required freq accurately Currently, we check curr_dr_freq roughly by "if (curr_dr_freq <= bus->params.bandwidth)" in sdw_compute_bus_params() and check it accurately in sdw_select_row_col(). It works if we only support one freq. But, we need to check it accurately in sdw_select_row_col() to give it a chance to use a higher freq or use multi-lane. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-11-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/soundwire/generic_bandwidth_allocation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cf44ae3d3282572480d760199cc8d6c7c61006cf Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Wed Dec 18 16:01:50 2024 +0800 soundwire: generic_bandwidth_allocation: correct clk_freq check in sdw_select_row_col The bits in Column 0 of Rows 0 to 47 are for control word and cannot be used for audio. In practice, entire Column 0 is skipped. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-10-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/soundwire/generic_bandwidth_allocation.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 3ddd303f4725b66d418998ca21cddbe9f31bb8aa Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Wed Dec 18 16:01:49 2024 +0800 Soundwire: generic_bandwidth_allocation: set frame shape on fly We need to recalculate frame shape when sdw bus clock is changed. And need to make sure all Peripherals connected to the Manager support dynamic clock change. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-9-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/soundwire/generic_bandwidth_allocation.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 645291cfe5e52cce9571d73542476bec1d79ce26 Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Wed Dec 18 16:01:48 2024 +0800 Soundwire: stream: program BUSCLOCK_SCALE We need to program bus clock scale to adjust the bus clock if current bus clock doesn't fit the bandwidth. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-8-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/soundwire/bus.c | 10 ++++++++++ drivers/soundwire/stream.c | 36 ++++++++++++++++++++++++++++++++++++ include/linux/soundwire/sdw.h | 1 + 3 files changed, 47 insertions(+) commit 8f4e3343eda8cdedaf711bf3d8ef2d6ed571f420 Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Wed Dec 18 16:01:47 2024 +0800 Soundwire: add sdw_slave_get_scale_index helper Currently, we only set peripheral frequency when the peripheral is initialized. However, curr_dr_freq may change to get required bandwidth. For example, curr_dr_freq may increase from 4.8MHz to 9.6MHz when the 4th stream is opened. Add a helper to get the scale index so that we can get the scale index and program it. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-7-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/soundwire/bus.c | 55 ++++++++++++++++++++++++++----------------- include/linux/soundwire/sdw.h | 2 ++ 2 files changed, 36 insertions(+), 21 deletions(-) commit fdd1faeeec14291f9e542afa5ccec2c5a0930f5b Author: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Date: Wed Dec 18 16:01:46 2024 +0800 soundwire: generic_bandwidth_allocation: skip DEPREPARED streams We should not blindly walk through all the m_rt list, since it will have the side effect of accounting for deprepared streams. This behavior is the result of the split implementation where the dailink hw_free() handles the stream state change and the bit allocation, and the dai hw_free() modifies the m_rt list. The bit allocation ends-up using m_rt entries in zombie state, no longer relevant but still used. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-6-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/soundwire/generic_bandwidth_allocation.c | 3 +++ 1 file changed, 3 insertions(+) commit f1b3dba6905a9afc49996b039042c411aa98fd52 Author: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Date: Wed Dec 18 16:01:45 2024 +0800 soundwire: stream: set DEPREPARED state earlier The existing logic is problematic in that we deprepare all the ports, but still take into account the stream for bit allocation by just walking through the bus->m_rt list. This patch sets the state earlier, so that such DEPREPARED streams can be skipped in the bandwidth allocation (to be implemented in a follow-up patch). Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/soundwire/stream.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit b6a2e1be7d9303d07eff72a13132a37e035fbcfa Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Wed Dec 18 16:01:44 2024 +0800 soundwire: add lane_used_bandwidth in struct sdw_bus To support multi-lane, we need to know how much bandwidth is used on each lane. And to use the lane that has enough bandwidth. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> include/linux/soundwire/sdw.h | 2 ++ 1 file changed, 2 insertions(+) commit 7533d0df69452c3e7b69c727c1e8e1a7e1afc83c Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Wed Dec 18 16:01:43 2024 +0800 soundwire: mipi_disco: read lane mapping properties from ACPI The DisCo for SoundWire 2.0 added support for the 'mipi-sdw-lane-<n>-mapping' property. Co-developed-by: Chao Song <chao.song@linux.intel.com> Signed-off-by: Chao Song <chao.song@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/soundwire/mipi_disco.c | 40 +++++++++++++++++++++++++++++++++++++++- include/linux/soundwire/sdw.h | 5 +++++ 2 files changed, 44 insertions(+), 1 deletion(-) commit 6bba2d3f744c4383b22aa79471d7136cfdce7d0c Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Wed Dec 18 16:01:42 2024 +0800 soundwire: add lane field in sdw_port_runtime Currently, lane_ctrl is always 0. Add a lane field in sdw_port_runtime to indicate the data lane of the data port. They are 0 by default. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/soundwire/amd_manager.c | 2 +- drivers/soundwire/bus.h | 2 ++ drivers/soundwire/generic_bandwidth_allocation.c | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) commit a5fef9baa87f8be359a4b3ed11829ebca82e56ad Author: Charles Keepax <ckeepax@opensource.cirrus.com> Date: Thu Dec 5 11:33:15 2024 +0000 soundwire: bus: Move irq mapping cleanup into devres Currently the IRQ mapping is disposed off in sdw_drv_remove(), however if the SoundWire device uses devres this can run before the actual device clean up, potentially clearing the mapping whilst it is still in use. Make this devres safe by also moving the sdw_irq_dispose_mapping into devres. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20241205113315.2266313-1-ckeepax@opensource.cirrus.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/soundwire/bus_type.c | 3 --- drivers/soundwire/irq.c | 12 ++++++++---- drivers/soundwire/irq.h | 5 ----- 3 files changed, 8 insertions(+), 12 deletions(-) commit 62e9c1e8ecee87a86052ffeeca382f1252f7aef6 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Sun Dec 22 23:31:57 2024 +0100 stackleak: Use str_enabled_disabled() helper in stack_erasing_sysctl() Remove hard-coded strings by using the str_enabled_disabled() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://lore.kernel.org/r/20241222223157.135164-2-thorsten.blum@linux.dev Signed-off-by: Kees Cook <kees@kernel.org> kernel/stackleak.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e3f6a42272e028c46695acc83fc7d7c42f2750ad Author: Marco Elver <elver@google.com> Date: Fri Nov 8 12:34:25 2024 +0100 tracing: Remove pid in task_rename tracing output Remove pid in task_rename tracepoint output, since that tracepoint only deals with the current task, and is printed by default. This also saves some space in the entry and avoids wasted padding. Link: https://lkml.kernel.org/r/20241105120247.596a0dc9@gandalf.local.home Suggested-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Marco Elver <elver@google.com> Link: https://lore.kernel.org/r/20241108113455.2924361-2-elver@google.com Signed-off-by: Kees Cook <kees@kernel.org> include/trace/events/task.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit c38904ebb74b455a44e3b9a679aef320361654ae Author: Marco Elver <elver@google.com> Date: Fri Nov 8 12:34:24 2024 +0100 tracing: Add task_prctl_unknown tracepoint prctl() is a complex syscall which multiplexes its functionality based on a large set of PR_* options. Currently we count 64 such options. The return value of unknown options is -EINVAL, and doesn't distinguish from known options that were passed invalid args that also return -EINVAL. To understand if programs are attempting to use prctl() options not yet available on the running kernel, provide the task_prctl_unknown tracepoint. Note, this tracepoint is in an unlikely cold path, and would therefore be suitable for continuous monitoring (e.g. via perf_event_open). While the above is likely the simplest usecase, additionally this tracepoint can help unlock some testing scenarios (where probing sys_enter or sys_exit causes undesirable performance overheads): a. unprivileged triggering of a test module: test modules may register a probe to be called back on task_prctl_unknown, and pick a very large unknown prctl() option upon which they perform a test function for an unprivileged user; b. unprivileged triggering of an eBPF program function: similar as idea (a). Example trace_pipe output: test-380 [001] ..... 78.142904: task_prctl_unknown: option=1234 arg2=101 arg3=102 arg4=103 arg5=104 Signed-off-by: Marco Elver <elver@google.com> Reviewed-by: Alexander Potapenko <glider@google.com> Link: https://lore.kernel.org/r/20241108113455.2924361-1-elver@google.com Signed-off-by: Kees Cook <kees@kernel.org> include/trace/events/task.h | 37 +++++++++++++++++++++++++++++++++++++ kernel/sys.c | 3 +++ 2 files changed, 40 insertions(+) commit 26bef359bc4f10747f8d0b3a7f3fe60ef99ce2c1 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Fri Dec 20 20:17:04 2024 +0100 powerpc: Use str_on_off() helper in check_cache_coherency() Remove hard-coded strings by using the str_on_off() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241220191705.1446-2-thorsten.blum@linux.dev arch/powerpc/kernel/setup-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f6945d52ee5346900fb7251ec23d34822a06918e Author: Sicelo A. Mhlongo <absicsz@gmail.com> Date: Sat Dec 21 18:10:23 2024 +0200 power: supply: bq2415x_charger: Immediately reschedule delayed work on notifier events When the notifier is called we want to schedule the worker as soon as possible. Thus it makes sense to reschedule any waiting work and only queue a new one if there is none. Suggested-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com> Link: https://lore.kernel.org/r/20241221161124.114989-1-absicsz@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/bq2415x_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04626c3f1c69909189c9419424887fc2dad48f75 Author: Corey Minyard <corey@minyard.net> Date: Sun Dec 22 14:55:56 2024 -0600 char:ipmi: Fix a not-used variable on a non-ACPI system Put some code into APCI ifdefs to avoid a not-used variable warning. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412222349.R7qW7Q2t-lkp@intel.com/ Signed-off-by: Corey Minyard <corey@minyard.net> drivers/char/ipmi/ipmb_dev_int.c | 2 ++ 1 file changed, 2 insertions(+) commit c50be1c9457d6c7486a7f592aa96ffbb8c3cde96 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Tue Dec 10 11:21:03 2024 -0500 KVM: x86: Refactor __kvm_emulate_hypercall() into a macro Rework __kvm_emulate_hypercall() into a macro so that completion of hypercalls that don't exit to userspace use direct function calls to the completion helper, i.e. don't trigger a retpoline when RETPOLINE=y. Opportunistically take the names of the input registers, as opposed to taking the input values, to preemptively dedup more of the calling code (TDX needs to use different registers). Use the direct GPR accessors to read values to avoid the pointless marking of the registers as available (KVM requires GPRs to always be available). Signed-off-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Kai Huang <kai.huang@intel.com> Message-ID: <20241128004344.4072099-7-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/x86.c | 30 ++++++++++-------------------- arch/x86/kvm/x86.h | 25 ++++++++++++++++++++----- 2 files changed, 30 insertions(+), 25 deletions(-) commit d9eb86a6f43d74f08ee3b6eb99ad7eb2a7d7fce0 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:43:43 2024 -0800 KVM: x86: Always complete hypercall via function callback Finish "emulation" of KVM hypercalls by function callback, even when the hypercall is handled entirely within KVM, i.e. doesn't require an exit to userspace, and refactor __kvm_emulate_hypercall()'s return value to *only* communicate whether or not KVM should exit to userspace or resume the guest. (Ab)Use vcpu->run->hypercall.ret to propagate the return value to the callback, purely to avoid having to add a trampoline for every completion callback. Using the function return value for KVM's control flow eliminates the multiplexed return value, where '0' for KVM_HC_MAP_GPA_RANGE (and only that hypercall) means "exit to userspace". Note, the unnecessary extra indirect call and thus potential retpoline will be eliminated in the near future by converting the intermediate layer to a macro. Suggested-by: Binbin Wu <binbin.wu@linux.intel.com> Suggested-by: Kai Huang <kai.huang@intel.com> Signed-off-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Kai Huang <kai.huang@intel.com> Message-ID: <20241128004344.4072099-6-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/x86.c | 28 +++++++++++----------------- arch/x86/kvm/x86.h | 10 ++++++---- 2 files changed, 17 insertions(+), 21 deletions(-) commit 05a518b49dd6f674cd0b1fe1eb6c8f9c3953b63d Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:43:42 2024 -0800 KVM: x86: Bump hypercall stat prior to fully completing hypercall Increment the "hypercalls" stat for KVM hypercalls as soon as KVM knows it will skip the guest instruction, i.e. once KVM is committed to emulating the hypercall. Waiting until completion adds no known value, and creates a discrepancy where the stat will be bumped if KVM exits to userspace as a result of trying to skip the instruction, but not if the hypercall itself exits. Handling the stat in common code will also avoid the need for another helper to dedup code when TDX comes along (TDX needs a separate completion path due to GPR usage differences). Signed-off-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Kai Huang <kai.huang@intel.com> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Message-ID: <20241128004344.4072099-5-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/x86.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 13b64ce1b635d3bbf7209c2fff7d2ac2c15d54d0 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:43:41 2024 -0800 KVM: x86: Move "emulate hypercall" function declarations to x86.h Move the declarations for the hypercall emulation APIs to x86.h. While the helpers are exported, they are intended to be consumed only by KVM vendor modules, i.e. don't need to be exposed to the kernel at-large. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Kai Huang <kai.huang@intel.com> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Message-ID: <20241128004344.4072099-4-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/asm/kvm_host.h | 6 ------ arch/x86/kvm/x86.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) commit c4c083d95105445ebf1cadfb7d05dd2630976241 Author: Binbin Wu <binbin.wu@linux.intel.com> Date: Wed Nov 27 16:43:40 2024 -0800 KVM: x86: Add a helper to check for user interception of KVM hypercalls Add and use user_exit_on_hypercall() to check if userspace wants to handle a KVM hypercall instead of open-coding the logic everywhere. No functional change intended. Signed-off-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com> Reviewed-by: Kai Huang <kai.huang@intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> [sean: squash into one patch, keep explicit KVM_HC_MAP_GPA_RANGE check] Signed-off-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Message-ID: <20241128004344.4072099-3-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/svm/sev.c | 4 ++-- arch/x86/kvm/x86.c | 2 +- arch/x86/kvm/x86.h | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) commit 9a1dfeff4414112ce89652a5017538016ccd656c Author: Paolo Bonzini <pbonzini@redhat.com> Date: Fri Dec 13 14:36:25 2024 -0500 KVM: x86: clear vcpu->run->hypercall.ret before exiting for KVM_EXIT_HYPERCALL QEMU up to 9.2.0 is assuming that vcpu->run->hypercall.ret is 0 on exit and it never modifies it when processing KVM_EXIT_HYPERCALL. Make this explicit in the code, to avoid breakage when KVM starts modifying that field. This in principle is not a good idea... It would have been much better if KVM had set the field to -KVM_ENOSYS from the beginning, so that a dumb userspace that does nothing on KVM_EXIT_HYPERCALL would tell the guest it does not support KVM_HC_MAP_GPA_RANGE. However, breaking userspace is a Very Bad Thing, as everybody should know. Reported-by: Binbin Wu <binbin.wu@linux.intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/svm/sev.c | 14 ++++++++++++++ arch/x86/kvm/x86.c | 7 +++++++ 2 files changed, 21 insertions(+) commit 10b2c8a67c4b8ec15f9d07d177f63b563418e948 Merge: a066bad89c6c 386d69f9f29b Author: Paolo Bonzini <pbonzini@redhat.com> Date: Sun Dec 22 12:59:33 2024 -0500 Merge tag 'kvm-x86-fixes-6.13-rcN' of https://github.com/kvm-x86/linux into HEAD KVM x86 fixes for 6.13: - Disable AVIC on SNP-enabled systems that don't allow writes to the virtual APIC page, as such hosts will hit unexpected RMP #PFs in the host when running VMs of any flavor. - Fix a WARN in the hypercall completion path due to KVM trying to determine if a guest with protected register state is in 64-bit mode (KVM's ABI is to assume such guests only make hypercalls in 64-bit mode). - Allow the guest to write to supported bits in MSR_AMD64_DE_CFG to fix a regression with Windows guests, and because KVM's read-only behavior appears to be entirely made up. - Treat TDP MMU faults as spurious if the faulting access is allowed given the existing SPTE. This fixes a benign WARN (other than the WARN itself) due to unexpectedly replacing a writable SPTE with a read-only SPTE. commit 6071d10413ff8489c3e842b19b1e0d539700068d Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Fri Dec 20 10:36:34 2024 +0100 hwmon: (lm75) add I3C support for P3T1755 Introduce I3C support by defining I3C accessors for regmap and implementing an I3C driver. Enable I3C for the NXP P3T1755. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20241220093635.11218-1-wsa+renesas@sang-engineering.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/Kconfig | 2 + drivers/hwmon/lm75.c | 121 ++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 119 insertions(+), 4 deletions(-) commit 63da297f0303c39025172cccafca7b55b169ec3c Author: Markuss Broks <markuss.broks@gmail.com> Date: Sat Dec 14 16:56:47 2024 +0200 arm64: dts: exynos: Add initial support for Samsung Galaxy S9 (SM-G960F) Samsung Galaxy S9 (SM-G960F), codenamed starlte, is a mobile phone released in 2017. It has 4GB of RAM, 64GB of UFS storage, Exynos9810 SoC and 1440x2960 Super AMOLED display. This initial device tree enables the framebuffer pre-initialised by bootloader and physical buttons of the device, with more support to come in the future. Co-developed-by: Maksym Holovach <nergzd@nergzd723.xyz> Signed-off-by: Maksym Holovach <nergzd@nergzd723.xyz> Signed-off-by: Markuss Broks <markuss.broks@gmail.com> Link: https://lore.kernel.org/r/20241214-exynos9810-v4-2-4e91fbbc2133@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/Makefile | 1 + arch/arm64/boot/dts/exynos/exynos9810-starlte.dts | 119 ++++++++++++++++++++++ 2 files changed, 120 insertions(+) commit 698be6fe8f89b5edf533a85fba7258339c8b72d6 Author: Markuss Broks <markuss.broks@gmail.com> Date: Sat Dec 14 16:56:46 2024 +0200 arm64: dts: exynos: Add Exynos9810 SoC support Exynos 9810 is an ARMv8 mobile SoC found in various Samsung devices, such as Samsung Galaxy S9 (starlte), S9 Plus (star2lte), Note 9 (crownlte) and perhaps others. Add minimal support for this SoC, including basic stuff like: - PSCI for bringing up secondary cores - ARMv8 generic timer - GPIO and pinctrl. The firmware coming with the devices based on this SoC is buggy and doesn't configure CNTFRQ_EL0, as required by spec, so it's needed to hardcode the frequency in the timer node. Co-developed-by: Maksym Holovach <nergzd@nergzd723.xyz> Signed-off-by: Maksym Holovach <nergzd@nergzd723.xyz> Signed-off-by: Markuss Broks <markuss.broks@gmail.com> Link: https://lore.kernel.org/r/20241214-exynos9810-v4-1-4e91fbbc2133@gmail.com [krzysztof: Rename and move PMU nodes to proper sorting position] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/exynos9810-pinctrl.dtsi | 503 +++++++++++++++++++++ arch/arm64/boot/dts/exynos/exynos9810.dtsi | 273 +++++++++++ 2 files changed, 776 insertions(+) commit 419a40cc2bdda0eadd643de55b70f212354761a2 Author: zhangheng <zhangheng@kylinos.cn> Date: Fri Dec 20 18:23:37 2024 +0800 w1: core: use sysfs_emit() instead of sprintf() 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: zhangheng <zhangheng@kylinos.cn> Link: https://lore.kernel.org/r/20241220102337.295864-1-zhangheng@kylinos.cn Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/slaves/w1_ds28e17.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 630a9370164c231e9e81ec66256fc3351266dcac Merge: abfdccd6af2b fbd7a5a0359b Author: Peter Zijlstra <peterz@infradead.org> Date: Sun Dec 22 12:43:31 2024 +0100 Merge tag 'lockdep-for-tip.20241220' of git://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux into locking/core Lockdep changes for v6.14: - Use swap() macro in the ww_mutex test. - Minor fixes and documentation for lockdep configs on internal data structure sizes. - Some "-Wunused-function" warning fixes for Clang. Rust locking changes for v6.14: - Add Rust locking files into LOCKING PRIMITIVES maintainer entry. - Add `Lock<(), ..>::from_raw()` function to support abstraction on low level locking. - Expose `Guard::new()` for public usage and add type alias for spinlock and mutex guards. - Add lockdep checking when creating a new lock `Guard`. commit 11fd6c9b047c30c72dcea3f79c0acb7deb69c822 Author: Sam Protsenko <semen.protsenko@linaro.org> Date: Tue Dec 10 21:30:27 2024 -0600 arm64: dts: exynos850-e850-96: Specify reserved secure memory explicitly Instead of carving out the secure area in 'memory' node, let's describe it in 'reserved-memory'. That makes it easier to understand both RAM regions and particular secure world memory region. Originally the device tree was created in a way to make sure it was well aligned with the way LittleKernel bootloader modified it. But later it was found the LittleKernel works fine with properly described reserved regions, so it's possible now to define those in a cleaner way. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Link: https://lore.kernel.org/r/20241211033027.12985-1-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/exynos850-e850-96.dts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 86c0d7f230fe71952cddac9905e4c090e09ecf3c Author: Umer Uddin <umer.uddin@mentallysanemainliners.org> Date: Sat Dec 14 11:58:55 2024 +0000 arm64: dts: exynos990: Add a PMU node for the third cluster Since we have a PMU compatiable for Samsung's Mongoose cores now, drop the comment that explains the lack of it and define the node. Signed-off-by: Umer Uddin <umer.uddin@mentallysanemainliners.org> Link: https://lore.kernel.org/r/20241214115855.49138-2-umer.uddin@mentallysanemainliners.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/exynos990.dtsi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit ec052fae814d467d6aa7e591b4b24531b87e65ec Author: Mateusz Guzik <mjguzik@gmail.com> Date: Thu Dec 5 16:47:43 2024 +0100 fs: sort out a stale comment about races between fd alloc and dup2 It claims the issue is only relevant for shared descriptor tables which is of no concern for POSIX (but then is POSIX of concern to anyone today?), which I presume predates standarized threading. The comment also mentions the following systems: - OpenBSD installing a larval file -- they moved away from it, file is installed late and EBUSY is returned on conflict - FreeBSD returning EBADF -- reworked to install the file early like OpenBSD used to do - NetBSD "deadlocks in amusing ways" -- their solution looks Solaris-inspired (not a compliment) and I would not be particularly surprised if it indeed deadlocked, in amusing ways or otherwise I don't believe mentioning any of these adds anything and the statement about the issue not being POSIX-relevant is outdated. dup2 description in POSIX still does not mention the problem. Just shorten the comment and be done with it. Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://lore.kernel.org/r/20241205154743.1586584-1-mjguzik@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org> fs/file.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 175c6a216dda4c88f7050b67e75a6cf331086c75 Author: Zhu Jun <zhujun2@cmss.chinamobile.com> Date: Wed Dec 4 00:12:18 2024 -0800 fs: Fix grammar and spelling in propagate_umount() Fix grammar and spelling in the propagate_umount() function. Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241204081218.12141-1-zhujun2@cmss.chinamobile.com Signed-off-by: Christian Brauner <brauner@kernel.org> fs/pnode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4db9f52fa9b81addc412330957bb7a657d2f1ffb Author: Guo Weikang <guoweikang.kernel@gmail.com> Date: Mon Dec 2 16:11:45 2024 +0800 fs: fc_log replace magic number 7 with ARRAY_SIZE() Replace the hardcoded value `7` in `put_fc_log()` with `ARRAY_SIZE`. This improves maintainability by ensuring the loop adapts to changes in the buffer size. Signed-off-by: Guo Weikang <guoweikang.kernel@gmail.com> Link: https://lore.kernel.org/r/20241202081146.1031780-1-guoweikang.kernel@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org> fs/fs_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3212a8f34021a16d13ace91d3ac5f451ef8d0103 Author: Mateusz Guzik <mjguzik@gmail.com> Date: Sat Nov 30 06:17:11 2024 +0100 fs: use a consume fence in mnt_idmap() The routine is used in link_path_walk() for every path component. To my reading the entire point of the fence was to grab a fully populated mnt_idmap, but that's already going to happen with mere consume fence. Eliminates an actual fence on arm64. Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://lore.kernel.org/r/20241130051712.1036527-1-mjguzik@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org> include/linux/mount.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b7da575f85962c44abe7dc245b0a58179ad2c45 Author: shao mingyin <shao.mingyin@zte.com.cn> Date: Wed Oct 23 13:58:50 2024 +0800 file: flush delayed work in delayed fput() The fput() of file rcS might not have completed causing issues when executing the file. rcS is opened in do_populate_rootfs before executed. At the end of do_populate_rootfs() flush_delayed_fput() is called. Now do_populate_rootfs() assumes that all fput()s caused by do_populate_rootfs() have completed. But flush_delayed_fput() can only ensure that fput() on the current delayed_fput_list has finished. Any file that has been removed from delayed_fput_list asynchronously in the meantime might not have completed causing the exec to fail. do_populate_rootfs delayed_fput_list delayed_fput execve fput() a fput() a->b fput() a->b->rcS __fput(a) fput() c fput() c->d __fput(b) flush_delayed_fput __fput(c) __fput(d) __fput(b) __fput(b) execve(rcS) Ensure that all delayed work is done by calling flush_delayed_work() in flush_delayed_fput() explicitly. Signed-off-by: Chen Lin <chen.lin5@zte.com.cn> Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn> Link: https://lore.kernel.org/r/20241023135850067m3w2R0UXESiVCYz_wdAoT@zte.com.cn Cc: Yang Yang <yang.yang29@zte.com.cn> Cc: Yang Tao <yang.tao172@zte.com.cn> Cc: Xu Xin <xu.xin16@zte.com.cn> [brauner: rewrite commit message] Signed-off-by: Christian Brauner <brauner@kernel.org> fs/file_table.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1197867a5dc8924d83ce484b6fd361ca32423dac Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Mon Nov 25 17:54:41 2024 +0000 watch_queue: Use page->private instead of page->index We are attempting to eliminate page->index, so use page->private instead. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://lore.kernel.org/r/20241125175443.2911738-1-willy@infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> kernel/watch_queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d727935cad9f6f52c8d184968f9720fdc966c669 Author: Jinliang Zheng <alexjlzheng@gmail.com> Date: Sun Nov 24 11:46:36 2024 +0800 fs: fix proc_handler for sysctl_nr_open Use proc_douintvec_minmax() instead of proc_dointvec_minmax() to handle sysctl_nr_open, because its data type is unsigned int, not int. Fixes: 9b80a184eaad ("fs/file: more unsigned file descriptors") Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com> Link: https://lore.kernel.org/r/20241124034636.325337-1-alexjlzheng@tencent.com Signed-off-by: Christian Brauner <brauner@kernel.org> fs/file_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84208b8fa3b7e73d1cc08efe7eaf527e28d8b951 Merge: 135ec43eb29c 657e726e0cb9 Author: Christian Brauner <brauner@kernel.org> Date: Thu Nov 21 11:15:21 2024 +0100 Merge patch series "symlink length caching" Mateusz Guzik <mjguzik@gmail.com> says: quote: When utilized it dodges strlen() in vfs_readlink(), giving about 1.5% speed up when issuing readlink on /initrd.img on ext4. The size is stored in a union with i_devices, which is never looked at unless the inode is for a device. ext4 and tmpfs are patched, other filesystems can also get there with some more work. benchmark: plug into will-it-scale into tests/readlink1.c: char *testcase_description = "readlink /initrd.img"; void testcase(unsigned long long *iterations, unsigned long nr) { char *tmplink = "/initrd.img"; char buf[1024]; while (1) { int error = readlink(tmplink, buf, sizeof(buf)); assert(error > 0); (*iterations)++; } } * patches from https://lore.kernel.org/r/20241120112037.822078-1-mjguzik@gmail.com: tmpfs: use inode_set_cached_link() ext4: use inode_set_cached_link() vfs: support caching symlink lengths in inodes Link: https://lore.kernel.org/r/20241120112037.822078-1-mjguzik@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org> commit 657e726e0cb9ba4f583ae7d226100bc43cc43a41 Author: Mateusz Guzik <mjguzik@gmail.com> Date: Wed Nov 20 12:20:36 2024 +0100 tmpfs: use inode_set_cached_link() Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://lore.kernel.org/r/20241120112037.822078-4-mjguzik@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org> mm/shmem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 135ec43eb29c68ed26e2d10f221d43f7d9139a8f Author: Randy Dunlap <rdunlap@infradead.org> Date: Wed Nov 20 17:13:52 2024 -0800 fiemap: use kernel-doc includes in fiemap docbook Add some kernel-doc notation to structs in fiemap header files then pull that into Documentation/filesystems/fiemap.rst instead of duplicating the header file structs in fiemap.rst. This helps to future-proof fiemap.rst against struct changes. Add missing flags documentation from header files into fiemap.rst for FIEMAP_FLAG_CACHE and FIEMAP_EXTENT_SHARED. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20241121011352.201907-1-rdunlap@infradead.org Cc: Christoph Hellwig <hch@lst.de> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Christian Brauner <brauner@kernel.org> Cc: Jan Kara <jack@suse.cz> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Christian Brauner <brauner@kernel.org> Documentation/filesystems/fiemap.rst | 49 +++++++++++------------------------- include/linux/fiemap.h | 16 ++++++++---- include/uapi/linux/fiemap.h | 47 +++++++++++++++++++++++----------- 3 files changed, 59 insertions(+), 53 deletions(-) commit bae80473f7b0b25772619e7692019b1549d4a82c Author: Mateusz Guzik <mjguzik@gmail.com> Date: Wed Nov 20 12:20:35 2024 +0100 ext4: use inode_set_cached_link() Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://lore.kernel.org/r/20241120112037.822078-3-mjguzik@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org> fs/ext4/inode.c | 3 ++- fs/ext4/namei.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) commit c7175957b28a69947dd1d36e8b19ac0d3c1a5d7d Author: Mateusz Guzik <mjguzik@gmail.com> Date: Thu Jul 27 20:03:55 2023 +0200 seqlock: annotate spinning as unlikely() in __read_seqcount_begin Annotation already used to be there, but got lost in 52ac39e5db5148f7 ("seqlock: seqcount_t: Implement all read APIs as statement expressions"). Does not look like it was intentional. Without it gcc 12 decides to compile the following in path_init: nd->m_seq = __read_seqcount_begin(&mount_lock.seqcount); nd->r_seq = __read_seqcount_begin(&rename_lock.seqcount); into 2 cases of conditional jumps forward if the value is even, aka branch prediction miss by default in the common case on x86-64. With the patch jumps are only for odd values. before: [snip] mov 0x104fe96(%rip),%eax # 0xffffffff82409680 <mount_lock> test $0x1,%al je 0xffffffff813b97fa <path_init+122> pause mov 0x104fe8a(%rip),%eax # 0xffffffff82409680 <mount_lock> test $0x1,%al jne 0xffffffff813b97ee <path_init+110> mov %eax,0x48(%rbx) mov 0x104fdfd(%rip),%eax # 0xffffffff82409600 <rename_lock> test $0x1,%al je 0xffffffff813b9813 <path_init+147> pause mov 0x104fdf1(%rip),%eax # 0xffffffff82409600 <rename_lock> test $0x1,%al jne 0xffffffff813b9807 <path_init+135> [/snip] after: [snip] mov 0x104fec6(%rip),%eax # 0xffffffff82409680 <mount_lock> test $0x1,%al jne 0xffffffff813b99af <path_init+607> mov %eax,0x48(%rbx) mov 0x104fe35(%rip),%eax # 0xffffffff82409600 <rename_lock> test $0x1,%al jne 0xffffffff813b999d <path_init+589> [/snip] Interestingly .text gets slightly smaller (as reported by size(1)): before: 20702563 after: 20702429 Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://lore.kernel.org/r/20230727180355.813995-1-mjguzik@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org> include/linux/seqlock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea382199071931d19aac5f688b543e07360e2b64 Author: Mateusz Guzik <mjguzik@gmail.com> Date: Wed Nov 20 12:20:34 2024 +0100 vfs: support caching symlink lengths in inodes When utilized it dodges strlen() in vfs_readlink(), giving about 1.5% speed up when issuing readlink on /initrd.img on ext4. Filesystems opt in by calling inode_set_cached_link() when creating an inode. The size is stored in a new union utilizing the same space as i_devices, thus avoiding growing the struct or taking up any more space. Churn-wise the current readlink_copy() helper is patched to accept the size instead of calculating it. Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://lore.kernel.org/r/20241120112037.822078-2-mjguzik@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org> fs/namei.c | 34 +++++++++++++++++++--------------- fs/proc/namespaces.c | 2 +- include/linux/fs.h | 15 +++++++++++++-- security/apparmor/apparmorfs.c | 2 +- 4 files changed, 34 insertions(+), 19 deletions(-) commit e891432cf7171ab2054222e2ce4c94f8080b92e7 Author: Marc Zyngier <maz@kernel.org> Date: Sat Dec 21 10:06:17 2024 +0000 KVM: arm64: nv: Advertise the lack of AArch32 EL0 support Although we never supported 32bit anywhere in NV, we fail to advertise so for EL0, probably owing to the relative lack of hardware supporting both NV2 and 32bit EL0. Add some sanitising to ID_AA64PFR0_EL1.EL0, and reaffirm that "in 64bit-only we trust". Reported-by: Oliver Upton <oliver.upton@linux.dev> Acked-by: Oliver Upton <oliver.upton@linux.dev> Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/nested.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3781680fba3eab0b34b071cb9443fd5ad92d23cf Merge: 16ecd47cb0cd f63df61651be Author: Christian Brauner <brauner@kernel.org> Date: Sun Dec 22 11:03:19 2024 +0100 Merge patch series "pidfs: support bind-mounts" Christian Brauner <brauner@kernel.org> says: Allow bind-mounting pidfds. Similar to nsfs let's allow bind-mounts for pidfds. This allows pidfds to be safely recovered and checked for process recycling. Instead of checking d_ops for both nsfs and pidfs we could in a follow-up patch add a flag argument to struct dentry_operations that functions similar to file_operations->fop_flags. * patches from https://lore.kernel.org/r/20241219-work-pidfs-mount-v1-0-dbc56198b839@kernel.org: selftests: add pidfd bind-mount tests pidfs: allow bind-mounts Link: https://lore.kernel.org/r/20241219-work-pidfs-mount-v1-0-dbc56198b839@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> commit f63df61651be541cc5699083faa1bfbaa105ed44 Author: Christian Brauner <brauner@kernel.org> Date: Thu Dec 19 18:01:33 2024 +0100 selftests: add pidfd bind-mount tests Link: https://lore.kernel.org/r/20241219-work-pidfs-mount-v1-2-dbc56198b839@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> tools/testing/selftests/pidfd/.gitignore | 1 + tools/testing/selftests/pidfd/Makefile | 2 +- tools/testing/selftests/pidfd/pidfd_bind_mount.c | 188 +++++++++++++++++++++++ 3 files changed, 190 insertions(+), 1 deletion(-) commit ef4144ac2dec35d47de666f35cd873eb1be4172e Author: Christian Brauner <brauner@kernel.org> Date: Thu Dec 19 18:01:32 2024 +0100 pidfs: allow bind-mounts Allow bind-mounting pidfds. Similar to nsfs let's allow bind-mounts for pidfds. This allows pidfds to be safely recovered and checked for process recycling. Link: https://lore.kernel.org/r/20241219-work-pidfs-mount-v1-1-dbc56198b839@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/namespace.c | 10 ++++++++-- fs/pidfs.c | 2 +- include/linux/pidfs.h | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) commit b9784e5cde1f9fb83661a70e580e381ae1264d12 Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Tue Dec 17 18:14:34 2024 +0900 memory: tegra20-emc: fix an OF node reference bug in tegra_emc_find_node_by_ram_code() As of_find_node_by_name() release the reference of the argument device node, tegra_emc_find_node_by_ram_code() releases some device nodes while still in use, resulting in possible UAFs. According to the bindings and the in-tree DTS files, the "emc-tables" node is always device's child node with the property "nvidia,use-ram-code", and the "lpddr2" node is a child of the "emc-tables" node. Thus utilize the for_each_child_of_node() macro and of_get_child_by_name() instead of of_find_node_by_name() to simplify the code. This bug was found by an experimental verification tool that I am developing. Fixes: 96e5da7c8424 ("memory: tegra: Introduce Tegra20 EMC driver") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Link: https://lore.kernel.org/r/20241217091434.1993597-1-joe@pf.is.s.u-tokyo.ac.jp Link: https://lore.kernel.org/r/20241218024415.2494267-3-joe@pf.is.s.u-tokyo.ac.jp [krzysztof: applied v1, adjust the commit msg to incorporate v2 parts] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/memory/tegra/tegra20-emc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4ebbf89814bc2610c565ebfe3a33b77f14d3c7e0 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Sat Dec 21 10:52:08 2024 +0100 ALSA: ad1889: Use str_enabled_disabled() helper function Remove hard-coded strings by using the str_enabled_disabled() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20241221095210.5473-1-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/ad1889.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c9261bcc1546a564407513e148c35a79a58bc2b9 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Mon Dec 16 00:44:10 2024 +0200 drm/msm/dp: stop passing panel to msm_dp_audio_get() The dp_audio module doesn't make any use of the passed DP panel instance. Drop the argument. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/629056/ Link: https://lore.kernel.org/r/20241216-fd-dp-audio-fixup-v4-5-f8d1961cf22f@linaro.org drivers/gpu/drm/msm/dp/dp_audio.c | 3 +-- drivers/gpu/drm/msm/dp/dp_audio.h | 3 --- drivers/gpu/drm/msm/dp/dp_display.c | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) commit 429783c22fe931cd8ba3c4ebda116bff0c53e89f Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Mon Dec 16 00:44:09 2024 +0200 drm/msm/dp: drop struct msm_dp_panel_in All other submodules pass arguments directly. Drop struct msm_dp_panel_in that is used to wrap dp_panel's submodule args and pass all data to msm_dp_panel_get() directly. Reviewed-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629055/ Link: https://lore.kernel.org/r/20241216-fd-dp-audio-fixup-v4-4-f8d1961cf22f@linaro.org drivers/gpu/drm/msm/dp/dp_display.c | 9 +-------- drivers/gpu/drm/msm/dp/dp_panel.c | 15 ++++++++------- drivers/gpu/drm/msm/dp/dp_panel.h | 10 ++-------- 3 files changed, 11 insertions(+), 23 deletions(-) commit c0caebf379607d3b90a3cb960952f8b5e8d01969 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Mon Dec 16 00:44:08 2024 +0200 drm/msm/dp: drop obsolete audio headers access through catalog Drop obsolete functions to access audio packet headers. The dp_audio.c now writes them using msm_dp_write_link() directly. Reviewed-by: Stephen Boyd <swboyd@chromium.org> Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/629052/ Link: https://lore.kernel.org/r/20241216-fd-dp-audio-fixup-v4-3-f8d1961cf22f@linaro.org drivers/gpu/drm/msm/dp/dp_audio.c | 2 - drivers/gpu/drm/msm/dp/dp_catalog.c | 76 ------------------------------------- drivers/gpu/drm/msm/dp/dp_catalog.h | 24 ------------ 3 files changed, 102 deletions(-) commit 486de5eec0d8ccad68d92a27a86690e8a688d96f Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Mon Dec 16 00:44:07 2024 +0200 drm/msm/dp: use msm_dp_utils_pack_sdp_header() for audio packets Use msm_dp_utils_pack_sdp_header() and call msm_dp_write_link() directly to program audio packet data. Use 0 as Packet ID, as it was not programmed earlier. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/629051/ Link: https://lore.kernel.org/r/20241216-fd-dp-audio-fixup-v4-2-f8d1961cf22f@linaro.org drivers/gpu/drm/msm/dp/dp_audio.c | 268 ++++++------------------------------ drivers/gpu/drm/msm/dp/dp_catalog.c | 71 ++++++++++ drivers/gpu/drm/msm/dp/dp_catalog.h | 10 ++ 3 files changed, 122 insertions(+), 227 deletions(-) commit ba3627bf82c1e90552f49c411a47bf70c4e30e97 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Mon Dec 16 00:44:06 2024 +0200 drm/msm/dp: drop msm_dp_panel_dump_regs() and msm_dp_catalog_dump_regs() The msm_dp_panel_dump_regs() and msm_dp_catalog_dump_regs() are not called anywhere. If there is a necessity to dump registers, the snapshotting should be used instead. Drop these two functions. Reviewed-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629049/ Link: https://lore.kernel.org/r/20241216-fd-dp-audio-fixup-v4-1-f8d1961cf22f@linaro.org drivers/gpu/drm/msm/dp/dp_catalog.c | 37 ------------------------------------- drivers/gpu/drm/msm/dp/dp_catalog.h | 1 - drivers/gpu/drm/msm/dp/dp_panel.c | 11 ----------- drivers/gpu/drm/msm/dp/dp_panel.h | 1 - 4 files changed, 50 deletions(-) commit bec73681d4923ed1bd038b3b220588853c17abf0 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 18 01:59:37 2024 +0000 fbdev: omapfb: Remove unused hdmi5_core_handle_irqs hdmi5_core_handle_irqs() has been unused since commit f5bab2229190 ("OMAPDSS: HDMI: Add OMAP5 HDMI support") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Helge Deller <deller@gmx.de> drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c | 17 ----------------- drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.h | 1 - 2 files changed, 18 deletions(-) commit 4e39aded665f9c8966d0fd487d37fa3f30b94ba4 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Tue Dec 17 01:38:59 2024 +0000 video: hdmi: Remove unused hdmi_infoframe_check hdmi_infoframe_check() has been unused since it was added in commit c5e69ab35c0d ("video/hdmi: Constify infoframe passed to the pack functions") Remove it. Note that the individual check functions for each type are actually used, so they're staying. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Helge Deller <deller@gmx.de> drivers/video/hdmi.c | 28 ---------------------------- include/linux/hdmi.h | 1 - 2 files changed, 29 deletions(-) commit dcbcf5244e140944af18225801d71397e882ad9f Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 15 15:58:04 2024 +0100 fbdev: radeon: Use const 'struct bin_attribute' callbacks The sysfs core now provides callback variants that explicitly take a const pointer. Make use of it to match the attribute definitions. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Helge Deller <deller@gmx.de> drivers/video/fbdev/aty/radeon_base.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 59aa03ac70cccf8b40f49311d2bccba8ff5f12e6 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 15 15:55:17 2024 +0100 fbdev: udlfb: Use const 'struct bin_attribute' callback The sysfs core now provides callback variants that explicitly take a const pointer. Make use of it to match the attribute definition. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Helge Deller <deller@gmx.de> drivers/video/fbdev/udlfb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9d2616754ce7e16a9e73ab6c00efc27fe47cb943 Author: Linus Walleij <linus.walleij@linaro.org> Date: Thu Dec 19 19:36:05 2024 +0100 MAINTAINERS: Assume maintainership of PL111 Emma Anholt dropped maintainership for PL111 and I didn't notice it at the time. I've written part of it and I'm happy to maintain it, list myself as maintainer and assume active maintainership. Acked-by: Simona Vetter <simona.vetter@ffwll.ch> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241219-pl111-maintain-v1-1-c60f57c523cd@linaro.org MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 74e3f620852390a4e8359c6056d67af1e42b1b1c Author: Bhavin Sharma <bhavin.sharma@siliconsignals.io> Date: Fri Dec 20 14:19:55 2024 +0530 power: supply: Add STC3117 fuel gauge unit driver Adds initial support for the STC3117 fuel gauge. The driver provides functionality to monitor key parameters including: Voltage, Current, State of Charge (SOC), Temperature, Status Co-developed-by: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io> Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io> Signed-off-by: Bhavin Sharma <bhavin.sharma@siliconsignals.io> Link: https://lore.kernel.org/r/20241220084958.32367-3-bhavin.sharma@siliconsignals.io Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> MAINTAINERS | 8 + drivers/power/supply/Kconfig | 9 + drivers/power/supply/Makefile | 1 + drivers/power/supply/stc3117_fuel_gauge.c | 612 ++++++++++++++++++++++++++++++ 4 files changed, 630 insertions(+) commit 69a3761389cb9a3a05684e84a659c2799b62cbb3 Author: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io> Date: Fri Dec 20 14:19:54 2024 +0530 dt-bindings: power: supply: Add STC3117 Fuel Gauge The STC3117 provides a simple fuel gauge via I2C. Add a DT schema to describe how to set it up in the device tree. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io> Signed-off-by: Bhavin Sharma <bhavin.sharma@siliconsignals.io> Link: https://lore.kernel.org/r/20241220084958.32367-2-bhavin.sharma@siliconsignals.io Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> .../bindings/power/supply/st,stc3117.yaml | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit 7b6092ee7a4ce2d03dc65b87537889e8e1e0ab95 Author: Nathan Chancellor <nathan@kernel.org> Date: Wed Dec 18 13:11:17 2024 -0700 crypto: qce - revert "use __free() for a buffer that's always freed" Commit ce8fd0500b74 ("crypto: qce - use __free() for a buffer that's always freed") introduced a buggy use of __free(), which clang rightfully points out: drivers/crypto/qce/sha.c:365:3: error: cannot jump from this goto statement to its label 365 | goto err_free_ahash; | ^ drivers/crypto/qce/sha.c:373:6: note: jump bypasses initialization of variable with __attribute__((cleanup)) 373 | u8 *buf __free(kfree) = kzalloc(keylen + QCE_MAX_ALIGN_SIZE, | ^ Jumping over a variable declared with the cleanup attribute does not prevent the cleanup function from running; instead, the cleanup function is called with an uninitialized value. Moving the declaration back to the top function with __free() and a NULL initialization would resolve the bug but that is really not much different from the original code. Since the function is so simple and there is no functional reason to use __free() here, just revert the original change to resolve the issue. Fixes: ce8fd0500b74 ("crypto: qce - use __free() for a buffer that's always freed") Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> Closes: https://lore.kernel.org/CA+G9fYtpAwXa5mUQ5O7vDLK2xN4t-kJoxgUe1ZFRT=AGqmLSRA@mail.gmail.com/ Signed-off-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/qce/sha.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 472a989029aac2b78ef2f0b18b27c568bf76d104 Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Sun Dec 15 16:27:20 2024 +0900 crypto: ixp4xx - fix OF node reference leaks in init_ixp_crypto() init_ixp_crypto() calls of_parse_phandle_with_fixed_args() multiple times, but does not release all the obtained refcounts. Fix it by adding of_node_put() calls. This bug was found by an experimental static analysis tool that I am developing. Fixes: 76f24b4f46b8 ("crypto: ixp4xx - Add device tree support") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c | 3 +++ 1 file changed, 3 insertions(+) commit a5a9d959936499a3106a1bf3b9070875d0d3dec4 Author: Wenkai Lin <linwenkai6@hisilicon.com> Date: Fri Dec 13 17:13:35 2024 +0800 crypto: hisilicon/sec2 - fix for aead invalid authsize When the digest alg is HMAC-SHAx or another, the authsize may be less than 4 bytes and mac_len of the BD is set to zero, the hardware considers it a BD configuration error and reports a ras error, so the sec driver needs to switch to software calculation in this case, this patch add a check for it and remove unnecessary check that has been done by crypto. Fixes: 2f072d75d1ab ("crypto: hisilicon - Add aead support on SEC2") Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/hisilicon/sec2/sec.h | 2 +- drivers/crypto/hisilicon/sec2/sec_crypto.c | 64 +++++++++++++++--------------- 2 files changed, 34 insertions(+), 32 deletions(-) commit fd337f852b2677b53d0859a47b58e6e6bd189f30 Author: Wenkai Lin <linwenkai6@hisilicon.com> Date: Fri Dec 13 17:13:34 2024 +0800 crypto: hisilicon/sec2 - fix for aead icv error When the AEAD algorithm is used for encryption or decryption, the input authentication length varies, the hardware needs to obtain the input length to pass the integrity check verification. Currently, the driver uses a fixed authentication length,which causes decryption failure, so the length configuration is modified. In addition, the step of setting the auth length is unnecessary, so it was deleted from the setkey function. Fixes: 2f072d75d1ab ("crypto: hisilicon - Add aead support on SEC2") Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/hisilicon/sec2/sec.h | 1 - drivers/crypto/hisilicon/sec2/sec_crypto.c | 101 +++++++++++++---------------- drivers/crypto/hisilicon/sec2/sec_crypto.h | 11 ---- 3 files changed, 44 insertions(+), 69 deletions(-) commit 3cd46a78eeee8f1be545492a9de6dc37cd7d69d9 Author: Eric Biggers <ebiggers@google.com> Date: Thu Dec 12 13:28:45 2024 -0800 crypto: x86/aes-xts - additional optimizations Reduce latency by taking advantage of the property vaesenclast(key, a) ^ b == vaesenclast(key ^ b, a), like I did in the AES-GCM code. Also replace a vpand and vpxor with a vpternlogd. On AMD Zen 5 this improves performance by about 3%. Intel performance remains about the same, with a 0.1% improvement being seen on Icelake. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> arch/x86/crypto/aes-xts-avx-x86_64.S | 145 ++++++++++++++++++++++------------- 1 file changed, 90 insertions(+), 55 deletions(-) commit 68e95f5c6418ce1d0171fa756608a84170c56165 Author: Eric Biggers <ebiggers@google.com> Date: Thu Dec 12 13:28:44 2024 -0800 crypto: x86/aes-xts - more code size optimizations Prefer immediates of -128 to 128, since the former fits in a signed byte, saving 3 bytes per instruction. Also prefer VEX-coded instructions to EVEX where this is easy to do. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> arch/x86/crypto/aes-xts-avx-x86_64.S | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 77a4b5675b0494bb47926cc63593378243778dfd Author: Eric Biggers <ebiggers@google.com> Date: Thu Dec 12 13:28:43 2024 -0800 crypto: x86/aes-xts - change len parameter to int The AES-XTS assembly code currently treats the length as signed, since this saves a few instructions in the loop compared to treating it as unsigned. Therefore update the type to make this clear. (It is not actually passed any values larger than PAGE_SIZE.) Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> arch/x86/crypto/aes-xts-avx-x86_64.S | 2 +- arch/x86/crypto/aesni-intel_glue.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit bd7e7df6e660ecc1e9c0d9d97215fc0732a9d7e1 Author: Eric Biggers <ebiggers@google.com> Date: Thu Dec 12 13:28:42 2024 -0800 crypto: x86/aes-xts - improve some comments Improve some of the comments in aes-xts-avx-x86_64.S. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> arch/x86/crypto/aes-xts-avx-x86_64.S | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) commit d1bb1c32f945e70d2b31aad715d2e620833f55d1 Author: Eric Biggers <ebiggers@google.com> Date: Thu Dec 12 13:28:41 2024 -0800 crypto: x86/aes-xts - make the register aliases per-function Since aes-xts-avx-x86_64.S contains multiple functions, move the register aliases for the parameters and local variables of the XTS update function into the macro that generates that function. Then add register aliases to aes_xts_encrypt_iv() to improve readability there. This makes aes-xts-avx-x86_64.S consistent with the GCM assembly files. No change in the generated code. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> arch/x86/crypto/aes-xts-avx-x86_64.S | 61 +++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 28 deletions(-) commit 5b7981c1ca61ca7ad7162cfe95bf271d001d29ac Author: Eric Biggers <ebiggers@google.com> Date: Thu Dec 12 13:28:40 2024 -0800 crypto: x86/aes-xts - use .irp when useful Use .irp instead of repeating code. No change in the generated code. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> arch/x86/crypto/aes-xts-avx-x86_64.S | 74 ++++++++---------------------------- 1 file changed, 15 insertions(+), 59 deletions(-) commit 95791ccd112eddd1f31a2c7040122365add52a3f Author: Eric Biggers <ebiggers@google.com> Date: Thu Dec 12 13:28:39 2024 -0800 crypto: x86/aes-gcm - tune better for AMD CPUs Reorganize the main loop to free up the RNDKEYLAST[0-3] registers and use them for more cached round keys. This improves performance by about 2% on AMD Zen 4 and Zen 5. Intel performance remains about the same. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> arch/x86/crypto/aes-gcm-avx10-x86_64.S | 99 +++++++++++++--------------------- 1 file changed, 38 insertions(+), 61 deletions(-) commit 3cae5a3c05b87917f2f6d58248be8ea4d1a2a705 Author: Eric Biggers <ebiggers@google.com> Date: Thu Dec 12 13:28:38 2024 -0800 crypto: x86/aes-gcm - code size optimization Prefer immediates of -128 to 128, since the former fits in a signed byte, saving 3 bytes per instruction. Also replace a vpand and vpxor with a vpternlogd. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> arch/x86/crypto/aes-gcm-avx10-x86_64.S | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit b9b894642fede191d50230d08608bd4f4f49f73d Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 11 22:02:18 2024 +0000 crypto: lib/gf128mul - Remove some bbe deadcode gf128mul_4k_bbe(), gf128mul_bbe() and gf128mul_init_4k_bbe() are part of the library originally added in 2006 by commit c494e0705d67 ("[CRYPTO] lib: table driven multiplications in GF(2^128)") but have never been used. Remove them. (BBE is Big endian Byte/Big endian bits Note the 64k table version is used and I've left that in) Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> include/crypto/gf128mul.h | 6 +--- lib/crypto/gf128mul.c | 75 ----------------------------------------------- 2 files changed, 1 insertion(+), 80 deletions(-) commit e1d3422c95f003eba241c176adfe593c33e8a8f6 Author: Breno Leitao <leitao@debian.org> Date: Thu Nov 28 04:16:25 2024 -0800 rhashtable: Fix potential deadlock by moving schedule_work outside lock Move the hash table growth check and work scheduling outside the rht lock to prevent a possible circular locking dependency. The original implementation could trigger a lockdep warning due to a potential deadlock scenario involving nested locks between rhashtable bucket, rq lock, and dsq lock. By relocating the growth check and work scheduling after releasing the rth lock, we break this potential deadlock chain. This change expands the flexibility of rhashtable by removing restrictive locking that previously limited its use in scheduler and workqueue contexts. Import to say that this calls rht_grow_above_75(), which reads from struct rhashtable without holding the lock, if this is a problem, we can move the check to the lock, and schedule the workqueue after the lock. Fixes: f0e1a0643a59 ("sched_ext: Implement BPF extensible scheduler class") Suggested-by: Tejun Heo <tj@kernel.org> Signed-off-by: Breno Leitao <leitao@debian.org> Modified so that atomic_inc is also moved outside of the bucket lock along with the growth above 75% check. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> lib/rhashtable.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 35c5609abf512302e4f3119d08fd1729e392d339 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Dec 12 03:03:58 2024 -0500 bcachefs: Snapshot deletion no longer uses snapshot_t->equiv Switch to generating a private list of interior nodes to delete, instead of using the equivalence class in the global data structure. This eliminates possible races with snapshot creation, and is much cleaner - it'll let us delete a lot of janky code for calculating and maintaining the equivalence classes. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/snapshot.c | 268 ++++++++++++++++++++++++------------------------- 1 file changed, 133 insertions(+), 135 deletions(-) commit 85c060f62da4d039952895177f0c58b0167e320b Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Dec 12 02:41:37 2024 -0500 bcachefs: Kill equiv_seen arg to delete_dead_snapshots_process_key() When deleting dead snapshots, we move keys from redundant interior snapshot nodes to child nodes - unless there's already a key, in which case the ancestor key is deleted. Previously, we tracked via equiv_seen whether the child snapshot had a key, but this was tricky w.r.t. transaction restarts, and not transactionally safe w.r.t. updates in the child snapshot. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/snapshot.c | 51 +++++++++++++++++--------------------------------- 1 file changed, 17 insertions(+), 34 deletions(-) commit 92e31d425179c0f5b14d27ad1ad4a7b716c8db7e Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Dec 12 02:27:52 2024 -0500 bcachefs: Don't run overwrite triggers before insert This breaks when the trigger is inserting updates for the same btree, as the inode trigger now does. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_trans_commit.c | 81 ++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 44 deletions(-) commit f859bc945ebb1ed8e915cfd31bbe14ce3bb242e5 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Dec 12 02:32:32 2024 -0500 bcachefs: alloc_data_type_set() happens in alloc trigger Originally, we ran insert triggers before overwrite so that if an extent was being moved (by fallocate insert/collapse range), the bucket sector count wouldn't hit 0 partway through, and so we don't trigger state changes caused by that too soon. But this is better solved by just moving the data type change to the alloc trigger itself, where it's already called. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_gc.c | 1 - fs/bcachefs/buckets.c | 11 ++++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit b9a37144da8d5c1f900d7d7782bbd9842a40b806 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Dec 13 05:29:27 2024 -0500 bcachefs: Fix key cache + BTREE_ITER_all_snapshots Normally, whitouts (KEY_TYPE_whitout) are filtered from btree lookups, since they exist only to represent deletions of keys in ancestor snapshots - except, they should not be filtered in BTREE_ITER_all_snapshots mode, so that e.g. snapshot deletion can clean them up. This means that that the key cache has to store whiteouts, and key cache fills cannot filter them. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 7e320a4063a81508e171012e0f75ec4a111850d4 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Dec 12 02:26:15 2024 -0500 bcachefs: Fix btree_trans_peek_key_cache() BTREE_ITER_all_snapshots In BTREE_ITER_all_snapshots mode, we're required to only return keys where the snapshot field matches the iterator position - BTREE_ITER_filter_snapshots requires pulling keys into the key cache from ancestor snapshots, so we have to check for that. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 4 ++++ 1 file changed, 4 insertions(+) commit c50341be4eb65d7f3b85ac740c0121e36fd69bb4 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Dec 13 06:02:24 2024 -0500 bcachefs: tidy btree_trans_peek_journal() Change to match bch2_btree_trans_peek_updates() calling convention. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 68eb4fdd8c1c729aa7fbb1eb8d7af6c39917e117 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Dec 12 03:38:14 2024 -0500 bcachefs: tidy up __bch2_btree_iter_peek() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 25a3123a67d98d4560ec9ee2286f4f7cffe4c22c Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Dec 8 21:10:27 2024 -0500 bcachefs: check_indirect_extents can run online Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/recovery_passes_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00fa283a41fedc209ee7eda343828275b8303a61 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Dec 10 13:23:47 2024 -0500 bcachefs: Refactor c->opts.reconstruct_alloc Now handled in one place. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/recovery.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit 64833d396584676cdc9f841c056514bf5b8f5a4a Author: Nathan Chancellor <nathan@kernel.org> Date: Tue Dec 10 11:12:07 2024 -0700 bcachefs: Add empty statement between label and declaration in check_inode_hash_info_matches_root() Clang 18 and newer warns (or errors with CONFIG_WERROR=y): fs/bcachefs/str_hash.c:164:2: error: label followed by a declaration is a C23 extension [-Werror,-Wc23-extensions] 164 | struct bch_inode_unpacked inode; | ^ In Clang 17 and prior, this is an unconditional hard error: fs/bcachefs/str_hash.c:164:2: error: expected expression 164 | struct bch_inode_unpacked inode; | ^ fs/bcachefs/str_hash.c:165:30: error: use of undeclared identifier 'inode' 165 | ret = bch2_inode_unpack(k, &inode); | ^ fs/bcachefs/str_hash.c:169:55: error: use of undeclared identifier 'inode' 169 | struct bch_hash_info hash2 = bch2_hash_info_init(c, &inode); | ^ fs/bcachefs/str_hash.c:171:40: error: use of undeclared identifier 'inode' 171 | ret = repair_inode_hash_info(trans, &inode); | ^ Add an empty statement between the label and the declaration to fix the warning/error without disturbing the code too much. Fixes: 2519d3b0d656 ("bcachefs: bch2_str_hash_check_key() now checks inode hash info") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412092339.QB7hffGC-lkp@intel.com/ Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/str_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f57171d8ddd792a0367e05395a6266e5fc011e0 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Dec 10 10:29:12 2024 -0500 bcachefs: trace_write_buffer_maybe_flush Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 2 +- fs/bcachefs/btree_write_buffer.c | 8 ++++++++ fs/bcachefs/trace.h | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) commit 9f95fc3c12e05d3796fcb261a6b0594e51e63ba5 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Dec 9 01:31:43 2024 -0500 bcachefs: bch2_snapshot_exists() bch2_snapshot_equiv() is going away; convert users that just wanted to know if the snapshot exists to something better Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/data_update.c | 2 +- fs/bcachefs/snapshot.c | 7 ++++--- fs/bcachefs/snapshot.h | 15 +++++++++++++++ fs/bcachefs/subvolume_types.h | 1 + 4 files changed, 21 insertions(+), 4 deletions(-) commit be203120dc084c21fa8208d12fa394d50e843b62 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Dec 8 22:30:19 2024 -0500 bcachefs: bch2_check_key_has_snapshot() prints btree id Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/snapshot.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6ea607ca61475f9281191dab9d5f8a61baee1c4f Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Dec 8 21:47:34 2024 -0500 bcachefs: bch2_str_hash_check_key() now checks inode hash info Versions of the same inode in different snapshots must have the same hash info; this is critical for lookups to work correctly. We're going to be running the str_hash checks online, at readdir or xattr list time, so we now need str_hash_check_key() to check for inode hash seed mismatches, since it won't be run right after check_inodes(). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fsck.c | 6 +-- fs/bcachefs/str_hash.c | 127 +++++++++++++++++++++++++++++++++++++++---------- fs/bcachefs/str_hash.h | 25 ++++++++-- 3 files changed, 125 insertions(+), 33 deletions(-) commit 644457ed8315c8018a5a8c16fdee9acce5cfef27 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Dec 8 22:00:36 2024 -0500 bcachefs: Don't BUG_ON() inode unpack error Bkey validation checks that inodes are well-formed and unpack successfully, so an unpack error should always indicate memory corruption or some other kind of hardware bug - but these are still errors we can recover from. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fsck.c | 37 +++++++++++++++++++++++++------------ fs/bcachefs/move.c | 4 +++- 2 files changed, 28 insertions(+), 13 deletions(-) commit 7b11260456ed49ac14be623400b5ebbb847b71de Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Dec 8 21:42:49 2024 -0500 bcachefs: Use proper errcodes for inode unpack errors Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/errcode.h | 3 +++ fs/bcachefs/inode.c | 12 ++++++------ fs/bcachefs/varint.c | 5 +++-- 3 files changed, 12 insertions(+), 8 deletions(-) commit cd150cf9240225958a72d258d8596055459208a3 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Dec 8 20:55:03 2024 -0500 bcachefs: kill sysfs internal/accounting Since we added per-inode counters there's now far too many counters to show in one shot - if we want this in the future, it'll have to be in debugfs. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/disk_accounting.c | 26 -------------------------- fs/bcachefs/disk_accounting.h | 1 - fs/bcachefs/sysfs.c | 5 ----- 3 files changed, 32 deletions(-) commit 49f2d182638a54ecda9cb35ede5224f8d9f5f2e6 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Dec 8 04:11:21 2024 -0500 bcachefs: Kill unnecessary mark_lock usage We can't hold mark_lock while calling fsck_err() - that's a deadlock, mark_lock is meant to be a leaf node lock. It's also unnecessary for gc_bucket() and bucket_gen(); rcu suffices since the bucket_gens array describes its size, and we can't race with device removal or resize during gc/fsck since that takes state lock. Reported-by: syzbot+38641fcbda1aaffefdd4@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_foreground.c | 4 ---- fs/bcachefs/bcachefs.h | 6 ++---- fs/bcachefs/btree_gc.c | 7 ------- fs/bcachefs/buckets.c | 40 +++++++++++----------------------------- fs/bcachefs/buckets.h | 9 ++++----- fs/bcachefs/ec.c | 6 ++---- fs/bcachefs/errcode.h | 1 + fs/bcachefs/super.c | 2 -- 8 files changed, 20 insertions(+), 55 deletions(-) commit 54dacdada6de8d97e7ca7e51eadc96c61032bdb4 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Dec 9 06:00:33 2024 -0500 bcachefs: Don't start rewriting btree nodes until after journal replay This fixes a deadlock during journal replay when btree node read errors kick off a ton of rewrites: we don't want them competing with journal replay. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_update_interior.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9e779f3f24fbca1594bcd70996426f3b84873bc8 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Dec 6 23:15:05 2024 -0500 bcachefs: Fix reuse of bucket before journal flush on multiple empty -> nonempty transition For each bucket we track when the bucket became nonempty and when it became empty again: if we can ensure that there will be no journal flushes in the range [nonempty, empty) (possibly because they occured at the same journal sequence number), then it's safe to reuse the bucket without waiting for a journal commit. This is a major performance optimization for erasure coding, where writes are initially replicated, but the extra replicas are quickly dropped: if those buckets are reused and overwritten without issuing a cache flush to the underlying device, then they only cost bus bandwidth. But there's a tricky corner case when there's multiple empty -> nonempty -> empty transitions in quick succession, i.e. when data is getting overwritten immediately as it's being written. If this happens and the previous empty transition hasn't been flushed, we need to continue tracking the previous nonempty transition - not start a new one. Fixing this means we now need to track both the nonempty and empty transitions in bch_alloc_v4. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 78 ++++++++++++++++++----------------- fs/bcachefs/alloc_background_format.h | 4 +- 2 files changed, 42 insertions(+), 40 deletions(-) commit 89e74eccab9248d37bf329c66af0b7d4e23eac12 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Dec 8 00:28:16 2024 -0500 bcachefs: bch2_journal_noflush_seq() now takes [start, end) Harder to screw up if we're explicit about the range, and more correct as journal reservations can be outstanding on multiple journal entries simultaneously. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 4 +++- fs/bcachefs/journal.c | 11 ++++++----- fs/bcachefs/journal.h | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) commit be565740ee84798b5b2d5ab88070d887fd77c1a3 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Dec 7 20:43:07 2024 -0500 bcachefs: Set bucket needs discard, inc gen on empty -> nonempty transition Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 44a43cf9fdccc3576b1f2a96dc3e0dc87796bedb Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Dec 5 12:35:43 2024 -0500 bcachefs: Don't add unknown accounting types to eytzinger tree Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/disk_accounting.c | 16 ++++++++++++++++ fs/bcachefs/disk_accounting.h | 8 +++++++- 2 files changed, 23 insertions(+), 1 deletion(-) commit 60558d55f7e26c8aa2242718461642792fa200a4 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Dec 7 21:36:15 2024 -0500 bcachefs: Plumb bkey_validate_context to journal_entry_validate This lets us print the exact location in the journal if it was found in the journal, or correctly print if it was found in the superblock. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bkey_types.h | 12 ++--- fs/bcachefs/btree_trans_commit.c | 44 ++++++++----------- fs/bcachefs/error.c | 9 +++- fs/bcachefs/extents.c | 13 +++--- fs/bcachefs/journal_io.c | 95 ++++++++++++++++++++++------------------ fs/bcachefs/journal_io.h | 2 +- fs/bcachefs/sb-clean.c | 6 ++- 7 files changed, 97 insertions(+), 84 deletions(-) commit bbe36bd0993df2167b883d4af0b849a309350c38 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Dec 6 19:23:22 2024 -0500 bcachefs: Use a heap for handling overwrites in btree node scan Fix an O(n^2) issue when we find many overlapping (overwritten) btree nodes - especially when one node overwrites many smaller nodes. This was discovered to be an issue with the bcachefs merge_torture_flakey test - if we had a large btree that was then emptied, the number of difficult overwrites can be unbounded. Cc: Kuan-Wei Chiu <visitorckw@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_node_scan.c | 133 +++++++++++++++++++++++------------- fs/bcachefs/btree_node_scan_types.h | 1 - 2 files changed, 86 insertions(+), 48 deletions(-) commit dec6c0aac4fc5e4266cea18e9e6e47eecb2333e1 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Dec 6 19:16:02 2024 -0500 lib min_heap: Switch to size_t size_t is the correct type for a count of objects that can fit in memory: this also means heaps now have the same memory layout as darrays (fs/bcachefs/darray.h), and darrays can be used as heaps. Cc: Kuan-Wei Chiu <visitorckw@gmail.com> Cc: Ian Rogers <irogers@google.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Coly Li <colyli@suse.de> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> include/linux/min_heap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fbd152bf9469873b5d2a9aba2373e624eaa22a9f Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Dec 6 22:37:42 2024 -0500 bcachefs: Minor bucket alloc optimization Check open buckets and buckets waiting for journal commit before doing other expensive lookups. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_foreground.c | 55 +++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 22 deletions(-) commit f65645d80451e2bc675d539dde8ce951b6a0640e Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Dec 6 19:49:46 2024 -0500 bcachefs: Mark more errors autofix tested repairing from a bug uncovered by the merge_torture_flakey test Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/sb-errors_format.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 821ddebbc2c43e43210b1bb9f2dab1f90944d8a7 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Dec 6 20:11:16 2024 -0500 bcachefs: fix bch2_btree_node_header_to_text() format string Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58117dbdd6ef9ae2b61aedd15a005e0ef19957d2 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Dec 5 12:35:17 2024 -0500 bcachefs: Journal space calculations should skip durability=0 devices Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/journal_reclaim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d4c9fc000bd1bc03cfa0b7650e59060f623cf46d Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Dec 4 23:36:33 2024 -0500 bcachefs: factor out str_hash.c Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/Makefile | 1 + fs/bcachefs/fsck.c | 214 ++----------------------------------------------- fs/bcachefs/fsck.h | 8 ++ fs/bcachefs/str_hash.c | 209 +++++++++++++++++++++++++++++++++++++++++++++++ fs/bcachefs/str_hash.h | 7 ++ 5 files changed, 232 insertions(+), 207 deletions(-) commit ce70157112482c775430568d9cc62e0abeb386ea Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Dec 4 23:40:26 2024 -0500 bcachefs: kill flags param to bch2_subvolume_get() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/dirent.c | 2 +- fs/bcachefs/fs-common.c | 4 +--- fs/bcachefs/fs.c | 7 +++---- fs/bcachefs/fsck.c | 7 +++---- fs/bcachefs/snapshot.c | 5 ++--- fs/bcachefs/subvolume.c | 14 ++++++-------- fs/bcachefs/subvolume.h | 2 +- 7 files changed, 17 insertions(+), 24 deletions(-) commit 23f88c1d165563c9432314f92a9e7b8b6e17c7a2 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Dec 4 20:43:01 2024 -0500 bcachefs: Don't call bch2_btree_interior_update_will_free_node() until after update succeeds Originally, btree splits always succeeded once we got to the point of recursing to the btree_insert_node() call. But that changed when we switched to not taking intent locks all the way up to the root, and that introduced a bug, because bch2_btree_interior_update_will_free_node() cancels paending writes and reparents a node that's going to be made visible on disk by another btree update to the current btree update. This was discovered in recent backpointers work, because bch2_btree_interior_update_will_free_node() also clears the will_make_reachable flag, causing backpointer target lookup to spuriously thing it had found a dangling backpointer (when the backpointer just hadn't been created yet by btree_update_nodes_written()). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_update_interior.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit c67fab0774cee93b6aac9adc3601bcf0a4ea6ab4 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Dec 4 19:46:35 2024 -0500 bcachefs: Make sure __bch2_run_explicit_recovery_pass() signals to rewind We should always signal to rewind if the requested pass hasn't been run, even if called multiple times. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs.h | 1 + fs/bcachefs/recovery_passes.c | 52 +++++++++++++++++++++---------------------- 2 files changed, 27 insertions(+), 26 deletions(-) commit 90c6daa6ac90a7f83efa566350fbe2404f848ef0 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Dec 4 19:41:38 2024 -0500 bcachefs: Call bch2_btree_lost_data() on btree read error Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_gc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit ff7e7c5367250454ed10a6113695d2e01ccc0cfc Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Dec 4 18:14:14 2024 -0500 bcachefs: Journal write path refactoring, debug improvements Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/journal.c | 6 +++++ fs/bcachefs/journal_io.c | 70 +++++++++++++++++++++++++++--------------------- 2 files changed, 45 insertions(+), 31 deletions(-) commit 47d6ee766f8033563aff333f326378cd4b36a170 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Dec 4 19:21:22 2024 -0500 bcachefs: dev_alloc_list.devs -> dev_alloc_list.data This lets us use darray macros on dev_alloc_list (and it will become a darray eventually, when we increase the maximum number of devices). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_foreground.c | 60 ++++++++++++++++++------------------------ fs/bcachefs/alloc_foreground.h | 2 +- fs/bcachefs/journal_io.c | 21 ++++++--------- 3 files changed, 34 insertions(+), 49 deletions(-) commit 49833ce27ed2eed91915a4c25690d82aae5b6a0b Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Dec 4 18:16:25 2024 -0500 bcachefs: Fix failure to allocate journal write on discard retry When allocating a journal write fails, then retries after doing discards, we were failing to count already allocated replicas. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/journal_io.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6728f8f829cf68ae25cc664d3b1ba7034bc81fd4 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Dec 4 17:53:38 2024 -0500 bcachefs: BCH_ERR_insufficient_journal_devices kill another standard error code use Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/errcode.h | 1 + fs/bcachefs/journal_io.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) commit 3f1cf04ff9877bf043795d05bb6704d0a85bcd80 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Dec 4 17:48:06 2024 -0500 bcachefs: Silence "unable to allocate journal write" if we're already RO Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/journal_io.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 400af9a398186851103e27d848ef42be8870072b Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Dec 4 17:44:25 2024 -0500 bcachefs: trace_accounting_mem_insert Add a tracepoint for inserting new accounting entries: we're seeing odd spinning behaviour in accounting read. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/disk_accounting.c | 8 ++++++++ fs/bcachefs/trace.h | 24 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+) commit e3474394eb1a0e4ebf4a5e0e2531671fa96add16 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Dec 4 01:19:28 2024 -0500 bcachefs: Advance to next bp on BCH_ERR_backpointer_to_overwritten_btree_node Don't spin. Fixes: de95cc201a97 ("bcachefs: Kill bch2_get_next_backpointer()") Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/move.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8dabb19ff4b802131ebfc1024de132b601c3c23d Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Dec 3 22:03:18 2024 -0500 bcachefs: Simplify disk accounting validate late The validate late path was iterating over accounting entries in eytzinger order, which is unnecessarily tricky when we may have to remove entries. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/darray.h | 2 +- fs/bcachefs/disk_accounting.c | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) commit f78760dede23affb50a6fe62b1230849e1a5d15f Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Dec 1 21:35:11 2024 -0500 bcachefs: logged ops only use inum 0 of logged ops btree we wish to use the logged ops btree for other items that aren't strictly logged ops: cursors for inode allocation There's no reason to create another cached btree for inode allocator cursors - so reserve different parts of the keyspace for different purposes. Older versions will ignore or delete the cursors. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/logged_ops.c | 10 +++++----- fs/bcachefs/logged_ops_format.h | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) commit ad0b2544ec827e03b75143bed83338bda7f6fe21 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Dec 3 21:22:26 2024 -0500 bcachefs: rcu_pending now works in userspace Introduce a typedef to handle the difference between unsigned long/struct urcu_gp_poll_state. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/rcu_pending.c | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) commit d36b3e74b65f4ec68a38bdb717d94b32a81a355f Author: Geert Uytterhoeven <geert@linux-m68k.org> Date: Tue Dec 3 17:40:10 2024 +0100 bcachefs: BCACHEFS_PATH_TRACEPOINTS should depend on TRACING When tracing is disabled, there is no point in asking the user about enabling extra btree_path tracepoints in bcachefs. Fixes: 32ed4a620c5405be ("bcachefs: Btree path tracepoints") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c22dd02ae8b80bf662ab409091731cfb9a09348 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Dec 2 23:36:38 2024 -0500 bcachefs: Fix allocating too big journal entry The "journal space available" calculations didn't take into account mismatched bucket sizes; we need to take the minimum space available out of our devices. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/journal_reclaim.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5cdaec193a85e32235e7dccb95c085acc50b8dbd Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Dec 1 16:39:54 2024 -0500 bcachefs: Improve "unable to allocate journal write" message Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/journal_io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 511ddcdb2d5e0bdb73c7968e4215268f4572a984 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Nov 30 23:27:45 2024 -0500 bcachefs: fix bch2_journal_key_insert_take() seq Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_journal_iter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1f618f4f7cc7b8360e7362d3d18f3e244ded364 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Nov 29 18:53:26 2024 -0500 bcachefs: bch2_async_btree_node_rewrites_flush() Add a method to flush btree node rewrites at the end of recovery, to ensure that corrected errors are persisted. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs.h | 7 +- fs/bcachefs/btree_update_interior.c | 153 +++++++++++++++++++++--------------- fs/bcachefs/btree_update_interior.h | 1 + fs/bcachefs/recovery.c | 2 + 4 files changed, 97 insertions(+), 66 deletions(-) commit b29769c72d0b6f842ae7a1e10e9cfb9a8fcc87fa Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Nov 29 18:17:00 2024 -0500 bcachefs: If we did repair on a btree node, make sure we rewrite it Ensure that "invalid bkey" repair gets persisted, so that it doesn't repeatedly spam the logs. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_io.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 1302eeb7c5db1b9ac9db9d29c39e6a46bda718a6 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Nov 29 18:20:42 2024 -0500 bcachefs: bkey_fsck_err now respects errors_silent Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/error.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 7807b5b07de1d009275e00b7fa51db31071d57a4 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Nov 29 19:13:54 2024 -0500 bcachefs: list_pop_entry() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/ec.c | 6 ++---- fs/bcachefs/io_write.c | 4 +--- fs/bcachefs/util.h | 13 +++++++++++++ 3 files changed, 16 insertions(+), 7 deletions(-) commit 097cc9d0d60a3671fd1adcda9b7c0324908e3fd7 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Nov 13 23:08:57 2024 -0500 bcachefs: Convert write path errors to inum_to_path() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/io_write.c | 91 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 36 deletions(-) commit f7727a6767277a9d939f9ab3720eb327973a262e Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Sep 28 15:40:49 2024 -0400 bcachefs: bch2_inum_to_path() Add a function for walking backpointers to find a path from a given inode number, and convert various error messages to use it. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/errcode.h | 1 + fs/bcachefs/error.c | 34 ++++++++ fs/bcachefs/error.h | 6 ++ fs/bcachefs/fs-common.c | 81 +++++++++++++++++++ fs/bcachefs/fs-common.h | 2 + fs/bcachefs/fs-io-buffered.c | 10 ++- fs/bcachefs/fsck.c | 12 ++- fs/bcachefs/io_misc.c | 12 +-- fs/bcachefs/io_read.c | 185 +++++++++++++++++++++++++++++++------------ 9 files changed, 279 insertions(+), 64 deletions(-) commit c9b9afe78c436bb6d64ac0d3fa255c9cc232f2a9 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Nov 29 21:12:47 2024 -0500 bcachefs: Fix fsck.c build in userspace Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fsck.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2f8d5edf556a7499a188c8b38a650bed5aebcdbf Author: Yang Li <yang.lee@linux.alibaba.com> Date: Fri Nov 29 14:38:27 2024 +0800 bcachefs: Add missing parameter description to bch2_bucket_alloc_trans() The function bch2_bucket_alloc_trans() lacked a description for the nowait parameter in its documentation comment block. This patch adds the missing description to ensure all parameters are properly documented. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=12179 Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_foreground.c | 1 + 1 file changed, 1 insertion(+) commit 2cd85fea49d850629404d4668e104466114598e3 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 28 19:30:23 2024 -0500 bcachefs: Don't recurse in check_discard_freespace_key When calling check_discard_freeespace_key from the allocator, we can't repair without recursing - run it asynchronously instead. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 72 +++++++++++++++++++++++++++++++++++++----- fs/bcachefs/alloc_background.h | 2 +- fs/bcachefs/alloc_foreground.c | 2 +- fs/bcachefs/bcachefs.h | 1 + 4 files changed, 67 insertions(+), 10 deletions(-) commit 9bdb3b73e73203546107eb11a4d8bb3ad3f48851 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 28 19:02:18 2024 -0500 bcachefs: Check for extent crc uncompressed/compressed size mismatch When not compressed, these must be equal - this fixes an assertion pop in bch2_rechecksum_bio(). Reported-by: syzbot+50d3544c9b8db9c99fd2@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/extents.c | 22 +++++++++++++--------- fs/bcachefs/sb-errors_format.h | 5 +++-- 2 files changed, 16 insertions(+), 11 deletions(-) commit ff1dd05f82338cc0be15285035b55b517b4c64a2 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 28 18:05:06 2024 -0500 bcachefs: bch2_trans_relock() is trylock for lockdep fix some spurious lockdep splats Reported-by: syzbot+e088be3c2d5c05aaac35@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 8 ++++---- fs/bcachefs/btree_locking.c | 2 +- fs/bcachefs/btree_locking.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit f7f196170dcd7c629126ee9d37be5dbdb6d4f941 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 28 17:57:55 2024 -0500 bcachefs: cryptographic MACs on superblock are not (yet?) supported We should add support for cryptographic macs on the superblock - and it won't be hard, but it'll need an incompatible feature bit (and we have a new incompatible feature versioning scheme coming). For now, just add a guard to avoid a dull ptr deref in gen_poly_key(). Reported-by: syzbot+dd3d9835055dacb66f35@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/super-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4746ee182a76bbe4dd847180b0c8b575756b0d0d Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 28 17:48:20 2024 -0500 bcachefs: Check for inode journal seq in the future More check and repair code: this fixes a warning in bch2_journal_flush_seq_async() Reported-by: syzbot+d119b445ec739e7f3068@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fs-io.c | 35 ++++++++++++++++++++++++++++++++--- fs/bcachefs/fsck.c | 13 ++++++++++++- fs/bcachefs/sb-errors_format.h | 3 ++- 3 files changed, 46 insertions(+), 5 deletions(-) commit 0eafe758ac440fd285eb8de854c4b673886e9eea Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 28 16:59:40 2024 -0500 bcachefs: Check for bucket journal seq in the future This fixes an assertion pop in bch2_journal_noflush_seq() - log the error to the superblock and continue instead. Reported-by: syzbot+85700120f75fc10d4e18@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 63 +++++++++++++++++++++++------------------- fs/bcachefs/sb-errors_format.h | 3 +- 2 files changed, 37 insertions(+), 29 deletions(-) commit 8b105909182fed845bdf1eb4313896c6a5d04a10 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 28 16:25:41 2024 -0500 bcachefs: do_fsck_ask_yn() __bch2_fsck_err() is huge, and badly needs more refactoring Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/error.c | 59 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 25 deletions(-) commit 052210c3fa1f8a964942cd71cb479b339537c69b Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 28 16:14:06 2024 -0500 bcachefs: Don't error out when logging fsck error Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 8 +++++--- fs/bcachefs/error.c | 29 +++++++++++++++++------------ fs/bcachefs/error.h | 14 +++++++++----- 3 files changed, 31 insertions(+), 20 deletions(-) commit cfba90aba9fb858488ad035ce041f2fbda5e20f9 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 28 16:09:15 2024 -0500 bcachefs: mark more errors AUTOFIX mark errors as autofix where syzbot has hit the repair paths Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/sb-errors_format.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 914381013bc759370b5b28b679bfbe5df6009f31 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 28 16:09:04 2024 -0500 bcachefs: add missing printbuf_reset() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_gc.c | 1 + 1 file changed, 1 insertion(+) commit 0184dfa3b82111f147455bdbd82801843d306eb1 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 28 15:10:24 2024 -0500 bcachefs: Fix journal_iter list corruption Fix exiting an iterator that wasn't initialized. Reported-by: syzbot+2f7c2225ed8a5cb24af1@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_update_interior.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f11ca2ab18e369a662c2f60d53b8bea46c54e312 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Nov 27 22:29:54 2024 -0500 bcachefs: Guard against backpointers to unknown btrees Reported-by: syzbot+997f0573004dcb964555@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 7 +++++-- fs/bcachefs/sb-errors_format.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) commit f9e0a9be70c8f790fe721ee2796995b06a314b7f Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Nov 27 22:09:29 2024 -0500 bcachefs: Issue a transaction restart after commit in repair transaction commits invalidate pointers to btree values, and they also downgrade intent locks. This breaks the interior btree update path, which takes intent locks and then calls into the allocator. This isn't an ideal solution: we can't unconditionally issue a restart after a transaction commit, because that would break other codepaths. Reported-by: syzbot+78d82470c16a49702682@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 2 +- fs/bcachefs/errcode.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit b3d82c2f27611c897c3877a51de8f8df755165af Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Nov 27 21:58:43 2024 -0500 bcachefs: Guard against journal seq overflow Wraparound is impractical to handle since in various places we use 0 as a sentinal value - but 64 bits (or 56, because the btree write buffer steals a few bits) is enough for all practical purposes. Reported-by: syzbot+73ed43fbe826227bd4e0@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/journal.c | 9 +++++++++ fs/bcachefs/journal_types.h | 3 +++ 2 files changed, 12 insertions(+) commit 9963a14da1091c114764bec8723cf81677ca691e Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Nov 27 03:00:54 2024 -0500 bcachefs: BCH_FS_recovery_running If we're autofixing topology errors, we shouldn't shutdown if we're still in recovery. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs.h | 1 + fs/bcachefs/error.c | 2 +- fs/bcachefs/recovery.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) commit 124e108185dccf7cc1bb159501ea7fea59350218 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Nov 24 21:28:07 2024 -0500 bcachefs: Make topology errors autofix These repair paths are well tested, we can repair them without explicit user intervention This also tweaks bch2_topology_error() so that we run topology repair if we're in recovery, not just fsck. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_gc.c | 2 +- fs/bcachefs/recovery.c | 31 +++++++++++++++++++++++++------ fs/bcachefs/sb-errors_format.h | 12 ++++++------ 3 files changed, 32 insertions(+), 13 deletions(-) commit a6f4794fcd8627638153614193b3b81f37a28175 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Nov 27 00:29:52 2024 -0500 bcachefs: struct bkey_validate_context Add a new parameter to bkey validate functions, and use it to improve invalid bkey error messages: we can now print the btree and depth it came from, or if it came from the journal, or is a btree root. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 10 ++++----- fs/bcachefs/alloc_background.h | 16 ++++++++------ fs/bcachefs/backpointers.c | 2 +- fs/bcachefs/backpointers.h | 3 ++- fs/bcachefs/bkey.h | 7 ------ fs/bcachefs/bkey_methods.c | 29 ++++++++++++------------ fs/bcachefs/bkey_methods.h | 15 +++++++------ fs/bcachefs/bkey_types.h | 26 ++++++++++++++++++++++ fs/bcachefs/btree_io.c | 44 +++++++++++++++++++++++++++++++------ fs/bcachefs/btree_node_scan.c | 7 +++++- fs/bcachefs/btree_trans_commit.c | 7 +++++- fs/bcachefs/btree_update_interior.c | 11 +++++++--- fs/bcachefs/data_update.c | 7 ++++-- fs/bcachefs/dirent.c | 4 ++-- fs/bcachefs/dirent.h | 4 ++-- fs/bcachefs/disk_accounting.c | 4 ++-- fs/bcachefs/disk_accounting.h | 3 ++- fs/bcachefs/ec.c | 4 ++-- fs/bcachefs/ec.h | 5 ++--- fs/bcachefs/error.c | 20 +++++++++++++---- fs/bcachefs/error.h | 4 ++-- fs/bcachefs/extents.c | 20 ++++++++--------- fs/bcachefs/extents.h | 9 ++++---- fs/bcachefs/inode.c | 16 +++++++------- fs/bcachefs/inode.h | 9 ++++---- fs/bcachefs/journal_io.c | 35 +++++++++++++++++------------ fs/bcachefs/lru.c | 2 +- fs/bcachefs/lru.h | 2 +- fs/bcachefs/quota.c | 2 +- fs/bcachefs/quota.h | 4 ++-- fs/bcachefs/recovery.c | 1 + fs/bcachefs/reflink.c | 8 +++---- fs/bcachefs/reflink.h | 10 ++++----- fs/bcachefs/snapshot.c | 4 ++-- fs/bcachefs/snapshot.h | 7 +++--- fs/bcachefs/subvolume.c | 2 +- fs/bcachefs/subvolume.h | 5 ++--- fs/bcachefs/xattr.c | 2 +- fs/bcachefs/xattr.h | 3 ++- 39 files changed, 231 insertions(+), 142 deletions(-) commit c7e78f7b01786d0d06bde8548e88822ff57c4b4f Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Nov 27 01:03:41 2024 -0500 bcachefs: Ignore empty btree root journal entries There's no reason to treat them as errors: just ignore them, and go with a previous btree root if we had one. Reported-by: syzbot+e22007d6acb9c87c2362@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/recovery.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 90f3683e8f7c9eba516b65c47865fa3a5c08c6fc Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Nov 26 22:59:27 2024 -0500 bcachefs: Fix null ptr deref in btree_path_lock_root() Historically, we required that all btree node roots point to a valid (possibly fake) node, but we're improving our ability to continue in the presence of errors. Reported-by: syzbot+e22007d6acb9c87c2362@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit db0667a4ed82b67779855674682956685fc71f15 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Nov 26 21:27:16 2024 -0500 bcachefs: Go RW earlier, for normal rw mount Previously, when mounting read-write after a clean shutdown, we wouldn't go read-write until after all the recovery passes completed. Now, go RW early in recovery, the same as any other situation we'll need to go read-write. This fixes a bug where we discover unlinked inodes after a clean shutdown: repair fails because we're read only. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/recovery_passes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d94159763649831024255a4ec3b4bd1e1bf3f234 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Nov 26 15:16:57 2024 -0500 bcachefs: Fix bch2_btree_node_update_key_early() Fix an assertion pop from the recent btree cache freelist fixes. Fixes: baefd3f849ed ("bcachefs: btree_cache.freeable list fixes") Reported-by: Tyler <th020394@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 686d2ebec683903fe9ca41fd3cef9b4fb924aae4 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Nov 25 17:03:13 2024 -0500 bcachefs: Change "disk accounting version 0" check to commit only 6.11 had a bug where we'd sometimes create disk accounting keys with version 0, which causes issues for journal replay - but we don't need to delete existing accounting keys with version 0. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/disk_accounting.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dba8243f3b466dd39ef05ff63890d5acab30c852 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Nov 25 02:05:02 2024 -0500 bcachefs: Don't try to en/decrypt when encryption not available If a btree node says it's encrypted, but the superblock never had an encryptino key - whoops, that needs to be handled. Reported-by: syzbot+026f1857b12f5eb3f9e9@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_io.c | 117 +++++++++++++++++++++--------------------- fs/bcachefs/btree_node_scan.c | 3 ++ fs/bcachefs/checksum.c | 10 +++- fs/bcachefs/errcode.h | 1 + fs/bcachefs/io_read.c | 14 ++++- 5 files changed, 84 insertions(+), 61 deletions(-) commit 75eabea6988e4ef587c8d90425918fdc58a8f1c9 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Nov 25 01:26:56 2024 -0500 bcachefs: Fix dup/misordered check in btree node read We were checking for out of order keys, but not duplicate keys. Reported-by: syzbot+dedbd67513939979f84f@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_io.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 14152654805256d760315ec24e414363bfa19a06 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Nov 25 00:21:27 2024 -0500 bcachefs: Bad btree roots are now autofix Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/sb-errors_format.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 828552ca74a45877dbf139b34c47d0f600a1e852 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Nov 24 23:28:21 2024 -0500 bcachefs: Kill bch2_bucket_alloc_new_fs() The early-early allocation path, bch2_bucket_alloc_new_fs(), is no longer needed - and inconsistencies around new_fs_bucket_idx have been a frequent source of bugs. Reported-by: syzbot+592425844580a6598410@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_foreground.c | 40 ++++++++++++++++------------------------ fs/bcachefs/alloc_foreground.h | 2 -- fs/bcachefs/bcachefs.h | 1 - fs/bcachefs/buckets.c | 25 +++++++++++++++++++++++++ fs/bcachefs/buckets.h | 21 +-------------------- fs/bcachefs/journal.c | 34 +++++++++++++++------------------- fs/bcachefs/journal_reclaim.c | 3 +++ fs/bcachefs/recovery.c | 5 +---- fs/bcachefs/super.c | 12 +++++------- 9 files changed, 66 insertions(+), 77 deletions(-) commit abf23afa36eb425fb75d47c26fc665dbab2a9ae1 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Nov 24 22:57:01 2024 -0500 bcachefs: Fix btree node scan when unknown btree IDs are present btree_root entries for unknown btree IDs are created during recovery, before reading those btree roots. But btree_node_scan may find btree nodes with unknown btree IDs when we haven't seen roots for those btrees. Reported-by: syzbot+1f202d4da221ec6ebf8e@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_cache.c | 11 ++++++++--- fs/bcachefs/btree_cache.h | 9 +++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) commit 427db7ffe9a91bcad00a7bac4edcd74d75007a11 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Nov 24 22:45:25 2024 -0500 bcachefs: backpointer_to_missing_ptr is now autofix Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/sb-errors_format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b71d89bd7b1fbe0a4569d072a0069110f60f9ec9 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Nov 24 22:28:41 2024 -0500 bcachefs: Fix accounting_read when we rewind If we rewind recovery to run topology repair, that causes accounting_read to run twice. This fixes accounting being double counted. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/disk_accounting.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit a7ecd5f2ccabb97174f8264b965c9597ea854e8f Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Nov 24 22:23:41 2024 -0500 bcachefs: disk_accounting: bch2_dev_rcu -> bch2_dev_rcu_noerror Accounting keys that reference invalid devices are corrected by fsck, they shouldn't cause an emergency shutdown. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/disk_accounting.c | 4 ++-- fs/bcachefs/disk_accounting.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 6534a404d4924820bd1c06fb4412dd4444234f79 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Nov 24 21:49:08 2024 -0500 bcachefs: errcode cleanup: journal errors Instead of throwing standard error codes, we should be throwing dedicated private error codes, this greatly improves debugability. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/errcode.h | 2 ++ fs/bcachefs/journal.c | 4 ++-- fs/bcachefs/journal.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) commit 525be09e63cc9ff4bee0b0f480551a4dc2e7b276 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Nov 24 20:15:30 2024 -0500 bcachefs: Use separate rhltable for bch2_inode_or_descendents_is_open() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs.h | 1 + fs/bcachefs/fs.c | 39 ++++++++++++++++++++++++++++++--------- fs/bcachefs/fs.h | 1 + 3 files changed, 32 insertions(+), 9 deletions(-) commit 375d21b76d9a20ff4bddf81aadadd6e57f38dee8 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Nov 23 22:12:58 2024 -0500 bcachefs: BCH_ERR_btree_node_read_error_cached Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_cache.c | 6 +++--- fs/bcachefs/errcode.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) commit 0eaac0b44fa93a5bf8bd5d79c557ca5e04d2dc16 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Apr 23 02:18:18 2024 -0400 bcachefs: btree_write_buffer_flush_seq() no longer closes journal Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_write_buffer.c | 19 ++++++++++++++----- fs/bcachefs/journal.c | 27 ++++++++++++++++++++------- fs/bcachefs/journal.h | 2 +- 3 files changed, 35 insertions(+), 13 deletions(-) commit bb61afebca3b5608842e2ac59bbe4eedf137050f Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 21 20:09:45 2024 -0500 bcachefs: discard fastpath now uses bch2_discard_one_bucket() The discard bucket fastpath previously was using its own code for discarding buckets and clearing them in the need_discard btree, which didn't have any of the consistency checks of the main discard path. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 75 +++++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 34 deletions(-) commit e1cb4f56dc4cfcf1cb1b90479cb35c5a304ff527 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Nov 23 16:47:10 2024 -0500 bcachefs: Bias reads more in favor of faster device Per reports of performance issues on mixed multi device filesystems where we're issuing too much IO to the spinning rust - tweak this algorithm. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/extents.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f4d67f6d5a4c042a28fa1d67f756e3d24ba60888 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Nov 23 18:21:12 2024 -0500 bcachefs: trivial btree write buffer refactoring Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_write_buffer.c | 64 +++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 33 deletions(-) commit c601e5d7daea102481bd7512b013018fdbf57034 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Nov 23 16:27:47 2024 -0500 bcachefs: Can now block journal activity without closing cur entry Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/journal.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- fs/bcachefs/journal.h | 3 ++- fs/bcachefs/journal_types.h | 2 ++ 3 files changed, 46 insertions(+), 3 deletions(-) commit c80f33b752688392adf2aa71190636b8e1ff204b Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 14 21:34:43 2024 -0500 bcachefs: New backpointers helpers - bch2_backpointer_del() - bch2_backpointer_maybe_flush() Kill a bit of open coding and make sure we're properly handling the btree write buffer. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 58 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 13 deletions(-) commit 1ab00b6cddc53d47e6f45002e69034941d40ae03 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Nov 17 18:26:54 2024 -0500 bcachefs: kill bch_backpointer.bucket_offset usage bch_backpointer.bucket_offset is going away - it's no longer needed since we no longer store backpointers in alloc keys, the same information is in the key position itself. And we'll be reclaiming the space in bch_backpointer for the bucket generation number. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 15 +++++++-------- fs/bcachefs/backpointers.h | 8 ++++++++ 2 files changed, 15 insertions(+), 8 deletions(-) commit e48fda6cdc2799ef4a63692f0f11240613067b38 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Nov 18 00:32:57 2024 -0500 bcachefs: Fix check_backpointers_to_extents range limiting bch2_get_btree_in_memory_pos() will return positions that refer directly to the btree it's checking will fit in memory - i.e. backpointer positions, not buckets. This also means check_bp_exists() no longer has to refer to the device, and we can delete some code. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 63 ++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 38 deletions(-) commit eb25733aba20544035d56bd53fee5c8ecf87bc2e Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Nov 15 17:36:09 2024 -0500 bcachefs: bch_backpointer -> bkey_i_backpointer Since we no longer store backpointers in alloc keys, there's no reason not to pass around bkey_i_backpointers; this means we don't have to pass the bucket pos separately. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 215 ++++++++++++++++++--------------------------- fs/bcachefs/backpointers.h | 51 +++++------ fs/bcachefs/buckets.c | 8 +- fs/bcachefs/ec.c | 2 +- 4 files changed, 111 insertions(+), 165 deletions(-) commit abff9b149dcc0a584cbadc869167e5a7199cd1ce Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Nov 15 17:45:44 2024 -0500 bcachefs: Drop swab code for backpointers in alloc keys Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 8 -------- 1 file changed, 8 deletions(-) commit 5b5a7ae8fa827572c1f9c55fd1494468ef3ae988 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Nov 15 16:30:30 2024 -0500 bcachefs: bucket_pos_to_bp_end() Better helpers for iterating over backpointers within a specific bucket Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.h | 10 ++++++++++ fs/bcachefs/ec.c | 5 +++-- fs/bcachefs/move.c | 5 ++--- 3 files changed, 15 insertions(+), 5 deletions(-) commit debe6965ac47c3d8b0ebe87aa67ae6504baa8072 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Nov 18 00:16:52 2024 -0500 bcachefs: check for backpointers to invalid device Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 4 ++++ fs/bcachefs/sb-errors_format.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 3b6ebc94a011f3c0f057f984560265705b020cd9 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 14 22:49:40 2024 -0500 bcachefs: fix bp_pos_to_bucket_nodev_noerror _noerror means don't produce inconsistent errors, so it should be using bch2_dev_rcu_noerror(). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4de2c24aa9453564ceb285039e2816bd22fa4ac6 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Dec 9 06:18:49 2024 -0500 bcachefs: Fix evacuate_bucket tracepoint 86a494c8eef9 ("bcachefs: Kill bch2_get_next_backpointer()") dropped some things the tracepoint emitted because bch2_evacuate_bucket() no longer looks at the alloc key - but we did want at least some of that. We still no longer look at the alloc key so we can't report on the fragmentation number, but that's a direct function of dirty_sectors and a copygc concern anyways - copygc should get its own tracepoint that includes information from the fragmentation LRU. But we can report on the number of sectors we moved and the bucket size. Co-developed-by: Piotr Zalewski <pZ010001011111@proton.me> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/move.c | 21 +++++++++++++-------- fs/bcachefs/trace.h | 10 ++++------ 2 files changed, 17 insertions(+), 14 deletions(-) commit eae6c4a6255b03161c5c2c3e3a9cbfb4e22fa025 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Nov 17 02:23:24 2024 -0500 bcachefs: fix O(n^2) issue with whiteouts in journal keys The journal_keys array can't be substantially modified after we go RW, because lookups need to be able to check it locklessly - thus we're limited on what we can do when a key in the journal has been overwritten. This is a problem when there's many overwrites to skip over for peek() operations. To fix this, add tracking of ranges of overwrites: we create a range entry when there's more than one contiguous whiteout. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs.h | 23 +---- fs/bcachefs/btree_journal_iter.c | 156 +++++++++++++++++++++++++++++---- fs/bcachefs/btree_journal_iter.h | 2 + fs/bcachefs/btree_journal_iter_types.h | 36 ++++++++ fs/bcachefs/super.c | 3 +- 5 files changed, 179 insertions(+), 41 deletions(-) commit 854724d116cbd1145cd3888239a5cc7ea44d8cdc Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Nov 17 14:39:46 2024 -0500 bcachefs: btree_and_journal_iter: don't iterate over too many whiteouts when prefetching To help ameloriate issues with peek operations having to skip over deletions in the journal - just bail out if all we're doing is prefetching btree nodes. Since btree node prefetching runs every time we iterate to a new node, and has to sequentially scan ahead, this avoids another O(n^2). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 2 ++ fs/bcachefs/btree_journal_iter.c | 7 +++++++ fs/bcachefs/btree_journal_iter.h | 1 + 3 files changed, 10 insertions(+) commit 06d7a56fe0bfc4f8c17bff6ca12d8bdd33e9f7e8 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Nov 17 14:20:35 2024 -0500 bcachefs: journal keys: sort keys for interior nodes first There's an unavoidable issue with btree lookups when we're overlaying journal keys and the journal has many deletions for keys present in the btree - peek operations will have to iterate over all those deletions to find the next live key to return. This is mainly a problem for lookups in interior nodes, if we have to traverse to a leaf. Looking up an insert position in a leaf (for journal replay) doesn't have to find the next live key, but walking down the btree does. So to ameloriate this, change journal key sort ordering so that we replay keys from roots and interior nodes first. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_journal_iter.c | 10 ++++------ fs/bcachefs/btree_journal_iter.h | 13 ++++++++++--- 2 files changed, 14 insertions(+), 9 deletions(-) commit 57026c41c9c5009f0d363cb11b15763c5289abb9 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Nov 16 23:54:19 2024 -0500 bcachefs: kill bch2_journal_entries_free() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_journal_iter.c | 17 ++++++----------- fs/bcachefs/btree_journal_iter.h | 2 -- 2 files changed, 6 insertions(+), 13 deletions(-) commit 3d0b3b51c5abaf27e35d9eeca880eed44c8690b0 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 14 23:03:40 2024 -0500 bcachefs: Don't BUG_ON() when superblock feature wasn't set for compressed data We don't allocate the mempools for compression/decompression unless we need them - but that means there's an inconsistency to check for. Reported-by: syzbot+cb3fbcfb417448cfd278@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/compress.c | 29 +++++++++++++++++++++++++++-- fs/bcachefs/errcode.h | 1 + fs/bcachefs/opts.c | 2 +- fs/bcachefs/opts.h | 1 + fs/bcachefs/sb-errors_format.h | 4 +++- 5 files changed, 33 insertions(+), 4 deletions(-) commit e1702b989151649b27a73b776fc5bc494d03f725 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Nov 15 00:52:20 2024 -0500 bcachefs: Don't use a shared decompress workspace mempool gzip and zstd require different decompress workspace sizes, and if we start with one and then start using the other at runtime we may not get the correct size Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs.h | 1 - fs/bcachefs/compress.c | 52 ++++++++++++++++++++++++++++++-------------------- fs/bcachefs/errcode.h | 1 - 3 files changed, 31 insertions(+), 23 deletions(-) commit 6a4ce7a92fcc12762154c7f695c969787780c7c8 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Nov 16 21:03:53 2024 -0500 bcachefs: compression workspaces should be indexed by opt, not type type includes lz4 and lz4_old, which do not get different compression workspaces, and incompressible, a fake type - BCH_COMPRESSION_OPTS() is the correct enum to use. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs.h | 2 +- fs/bcachefs/compress.c | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) commit cec51e0a5d6d48eeeef6bfcfb8c5e91147dcdddb Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Nov 17 03:31:01 2024 -0500 bcachefs: add missing BTREE_ITER_intent this fixes excessive transaction restarts due to trans_commit having to upgrade Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/io_write.c | 1 + 1 file changed, 1 insertion(+) commit 9e92d6e9efb02c60c700a97e981b8cb97ed9451b Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 14 21:53:38 2024 -0500 bcachefs: Kill bch2_get_next_backpointer() Since for quite some time backpointers have only been stored in the backpointers btree, not alloc keys (an aborted experiment, support for which has been removed) - we can replace get_next_backpointer() with simple btree iteration. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 125 +++++++++++++-------------------------------- fs/bcachefs/backpointers.h | 11 ++-- fs/bcachefs/ec.c | 41 ++++++--------- fs/bcachefs/move.c | 41 +++++++-------- 4 files changed, 75 insertions(+), 143 deletions(-) commit 7815809fca37b0e6287de349f88b2d5d6eadd82d Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 14 21:28:40 2024 -0500 bcachefs: Delete backpointers check in try_alloc_bucket() try_alloc_bucket() has a "safety" check, which avoids allocating a bucket if there's any backpointers present. But backpointers are not the source of truth for live data in a bucket, the bucket sector counts are; this check was fairly useless, and we're also deferring backpointers checks from fsck to runtime in the near future. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_foreground.c | 20 -------------------- 1 file changed, 20 deletions(-) commit ac745efb429226434d9a8c5a1496dc0373efa359 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Oct 25 20:41:06 2024 -0400 bcachefs: peek_prev_min(): Search forwards for extents, snapshots With extents and snapshots, for slightly different reasons, we may have to search forwards to find a key that compares equal to iter->pos (i.e. a key that peek_prev() should return, as it returns keys <= iter->pos). peek_slot() does this, and is an easy way to fix this case. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 7e5b8e00e2631ee1fa72edeb420e7393ad078ab3 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Oct 24 22:12:37 2024 -0400 bcachefs: Implement bch2_btree_iter_prev_min() A user contributed a filessytem dump, where the dump was actually corrupted (due to being taken while the filesystem was online), but which exposed an interesting bug in fsck - reconstruct_inode(). When itearting in BTREE_ITER_filter_snapshots mode, it's required to give an end position for the iteration and it can't span inode numbers; continuing into the next inode might mean we start seeing keys from a different snapshot tree, that the is_ancestor() checks always filter, thus we're never able to return a key and stop iterating. Backwards iteration never implemented the end position because nothing else needed it - except for reconstuct_inode(). Additionally, backwards iteration is now able to overlay keys from the journal, which will be useful if we ever decide to start doing journal replay in the background. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 256 +++++++++++++++++++++++++++------------ fs/bcachefs/btree_iter.h | 8 +- fs/bcachefs/btree_journal_iter.c | 46 +++++++ fs/bcachefs/btree_journal_iter.h | 2 + fs/bcachefs/errcode.h | 1 - fs/bcachefs/fsck.c | 4 +- fs/bcachefs/io_misc.c | 2 +- 7 files changed, 234 insertions(+), 85 deletions(-) commit acd1fc7b1fb7585780b55edc79b4ee3bfd5ee1ce Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Oct 26 23:25:17 2024 -0400 bcachefs: discard_one_bucket() now uses need_discard_or_freespace_err() More conversion of inconsistent errors to fsck errors. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit c8e588135ce2bdb76b2edc640130e8b1aacd1810 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Oct 26 22:21:20 2024 -0400 bcachefs: bch2_bucket_do_index(): inconsistent_err -> fsck_err Factor out a common helper, need_discard_or_freespace_err(), which is now used by both fsck and the runtime checks, and can repair. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 83 ++++++++++++++++++++++-------------------- fs/bcachefs/error.c | 7 ++-- fs/bcachefs/error.h | 6 ++- 3 files changed, 51 insertions(+), 45 deletions(-) commit c97118f1dc5081171625f66f082fe12980a4bcbe Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 27 00:40:43 2024 -0400 bcachefs: try_alloc_bucket() now uses bch2_check_discard_freespace_key() check_discard_freespace_key() was doing all the same checks as try_alloc_bucket(), but with repair. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 80 ++++++++++++++++++++---------------- fs/bcachefs/alloc_background.h | 2 + fs/bcachefs/alloc_foreground.c | 93 +++++++----------------------------------- 3 files changed, 62 insertions(+), 113 deletions(-) commit 731d06e138b07e1e54ac84a22054ca83ab5b1082 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 27 20:47:03 2024 -0400 bcachefs: rework bch2_bucket_alloc_freelist() freelist iteration Prep work for converting try_alloc_bucket() to use bch2_check_discard_freespace_key(). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_foreground.c | 59 +++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 27 deletions(-) commit 724e49c6778c3bf899a49e5d24f9c0bb67451a71 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 27 00:05:54 2024 -0400 bcachefs: kill inconsistent err in invalidate_one_bucket() Change it to a normal fsck_err() - meaning it'll get repaired at runtime when that's flipped on. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) commit 7579c85d9cc3b25c7969474e9662f2d1c1130ab8 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 20 20:27:44 2024 -0400 bcachefs: Don't delete reflink pointers to missing indirect extents To avoid tragic loss in the event of transient errors (i.e., a btree node topology error that was later corrected by btree node scan), we can't delete reflink pointers to correct errors. This adds a new error bit to bch_reflink_p, indicating that it is known to point to a missing indirect extent, and the error has already been reported. Indirect extent lookups now use bch2_lookup_indirect_extent(), which on error reports it as a fsck_err() and sets the error bit, and clears it if necessary on succesful lookup. This also gets rid of the bch2_inconsistent_error() call in __bch2_read_indirect_extent, and in the reflink_p trigger: part of the online self healing project. An on disk format change isn't necessary here: setting the error bit will be interpreted by older versions as pointing to a different index, which will also be missing - which is fine. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fs-io-buffered.c | 5 +- fs/bcachefs/fs.c | 8 +- fs/bcachefs/io_read.c | 45 +------- fs/bcachefs/io_read.h | 28 +++-- fs/bcachefs/reflink.c | 241 +++++++++++++++++++++++++++++++++---------- fs/bcachefs/reflink.h | 4 + fs/bcachefs/reflink_format.h | 1 + 7 files changed, 222 insertions(+), 110 deletions(-) commit 3d338378d76391bb98a18e3cfb154a539866d0cf Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Oct 31 01:25:09 2024 -0400 bcachefs: Reorganize reflink.c a bit Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_gc.c | 92 --------------------- fs/bcachefs/reflink.c | 214 ++++++++++++++++++++++++++++++++++++------------- fs/bcachefs/reflink.h | 3 + 3 files changed, 160 insertions(+), 149 deletions(-) commit 61f854da4cba9708dd54f45b0e19ded6ffd10d01 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Oct 28 23:43:16 2024 -0400 bcachefs: Reserve 8 bits in bch_reflink_p Better repair for reflink pointers, as well as propagating new inode options to indirect extents, are going to require a few extra bits bch_reflink_p: so claim a few from the high end of the destination index. Also add some missing bounds checking. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/extent_update.c | 2 +- fs/bcachefs/extents.c | 2 +- fs/bcachefs/io_read.c | 14 +++++--------- fs/bcachefs/reflink.c | 45 ++++++++++++++++++++++++++++++-------------- fs/bcachefs/reflink_format.h | 4 +++- 5 files changed, 41 insertions(+), 26 deletions(-) commit eb73e7773fd665c6b2f26e8b5057197ad6794f50 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Oct 28 21:27:23 2024 -0400 bcachefs: Kill FSCK_NEED_FSCK If we find an error that indicates that we need to run fsck, we can specify that directly with run_explicit_recovery_pass(). These are now log_fsck_err() calls: we're just logging in the superblock that an error occurred - and possibly doing an emergency shutdown, depending on policy. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_update_interior.c | 18 ++++++------------ fs/bcachefs/buckets.c | 29 +++++++++++++++++------------ fs/bcachefs/error.c | 21 +++++++++++++-------- fs/bcachefs/error.h | 12 ++++++------ fs/bcachefs/sb-errors_format.h | 5 ++--- 5 files changed, 44 insertions(+), 41 deletions(-) commit 79c5e3c7934cb1358ae403d8a9e4bf84c2195581 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Oct 29 01:17:08 2024 -0400 bcachefs: lru errors are expected when reconstructing alloc Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/recovery.c | 2 ++ 1 file changed, 2 insertions(+) commit b6269cd0ec0a55f256d6f79a6e70dd7177050150 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Oct 26 22:52:06 2024 -0400 bcachefs: Delete dead code from bch2_discard_one_bucket() alloc key validation ensures that if a bucket is in need_discard state the sector counts are all zero - we don't have to check for that. The NEED_INC_GEN check appears to be dead code, as well: we only see buckets in the need_discard btree, and it's an error if they aren't in the need_discard state. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 7d1918b0d86dcf049fac0d548509459e0e0300da Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Oct 26 23:35:03 2024 -0400 bcachefs: bch2_btree_bit_mod_iter() factor out a new helper, make it handle extents bitset btrees (freespace). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 57 ++++++++---------------------------------- fs/bcachefs/btree_update.c | 37 +++++++++++++-------------- fs/bcachefs/btree_update.h | 3 +-- 3 files changed, 29 insertions(+), 68 deletions(-) commit 1f282f1ee0f80e40e6fb2ecd2dabbfb24a6d9e1f Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Nov 12 03:53:30 2024 -0500 bcachefs: delete dead code Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/error.h | 20 -------------------- 1 file changed, 20 deletions(-) commit d985e63dba24bcb0ede1e8975dc67b9c6a2b2c3b Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 7 21:50:00 2024 -0500 bcachefs: Fix shutdown message Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c3911ac94229893b820315d0fde175c07fa28a4 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 7 19:15:38 2024 -0500 bcachefs: Don't use page allocator for sb_read_scratch Kill another unnecessary dependency on PAGE_SIZE Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/super-io.c | 7 ++++--- fs/bcachefs/super-io.h | 2 ++ fs/bcachefs/super.c | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) commit 385d1a3c81fee16202b1c5a980653807a8c8dc95 Author: Youling Tang <tangyouling@kylinos.cn> Date: Wed Oct 16 09:49:11 2024 +0800 bcachefs: Simplify code in bch2_dev_alloc() - Remove unnecessary variable 'ret'. - Remove unnecessary bch2_dev_free() operations. Signed-off-by: Youling Tang <tangyouling@kylinos.cn> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/super.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 924e81c530ccbe986fd01381b495d410f8a63805 Author: Youling Tang <tangyouling@kylinos.cn> Date: Fri Sep 27 16:40:42 2024 +0800 bcachefs: Remove redundant initialization in bch2_vfs_inode_init() `inode->v.i_ino` has been initialized to `inum.inum`. If `inum.inum` and `bi->bi_inum` are not equal, BUG_ON() is triggered in bch2_inode_update_after_write(). Signed-off-by: Youling Tang <tangyouling@kylinos.cn> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fs.c | 1 - 1 file changed, 1 deletion(-) commit 5abd7ac19ddac6dd7e9ef872e92b76e200d99531 Author: Youling Tang <tangyouling@kylinos.cn> Date: Tue Sep 24 10:53:50 2024 +0800 bcachefs: Removes NULL pointer checks for __filemap_get_folio return values __filemap_get_folio the return value cannot be NULL, so unnecessary checks are removed. Signed-off-by: Youling Tang <tangyouling@kylinos.cn> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fs-io-buffered.c | 2 +- fs/bcachefs/fs-io-pagecache.c | 2 +- fs/bcachefs/fs-io.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit dc003efbc7769f22919e1d7d924bf8fc4d2ff841 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Jul 9 09:11:34 2024 +0800 bcachefs: Add support for FS_IOC_GETFSSYSFSPATH [TEST]: ``` $ cat ioctl_getsysfspath.c #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <sys/ioctl.h> #include <linux/fs.h> #include <unistd.h> int main(int argc, char *argv[]) { int fd; struct fs_sysfs_path sysfs_path = {}; if (argc != 2) { fprintf(stderr, "Usage: %s <path_to_file_or_directory>\n", argv[0]); exit(EXIT_FAILURE); } fd = open(argv[1], O_RDONLY); if (fd == -1) { perror("open"); exit(EXIT_FAILURE); } if (ioctl(fd, FS_IOC_GETFSSYSFSPATH, &sysfs_path) == -1) { perror("ioctl FS_IOC_GETFSSYSFSPATH"); close(fd); exit(EXIT_FAILURE); } printf("FS_IOC_GETFSSYSFSPATH: %s\n", sysfs_path.name); close(fd); return 0; } $ gcc ioctl_getsysfspath.c $ sudo bcachefs format /dev/sda $ sudo mount.bcachefs /dev/sda /mnt $ sudo ./a.out /mnt FS_IOC_GETFSSYSFSPATH: bcachefs/c380b4ab-fbb6-41d2-b805-7a89cae9cadb ``` Original patch link: [1]: https://lore.kernel.org/all/20240207025624.1019754-8-kent.overstreet@linux.dev/ Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Youling Tang <youling.tang@linux.dev> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fs.c | 1 + 1 file changed, 1 insertion(+) commit 4f1a6b0ab4ef9ccd0b5940efcba32b34a5c2da08 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Jul 9 09:11:33 2024 +0800 bcachefs: Add support for FS_IOC_GETFSUUID Use super_set_uuid() to set `sb->s_uuid_len` to avoid returning `-ENOTTY` with sb->s_uuid_len being 0. Original patch link: [1]: https://lore.kernel.org/all/20240207025624.1019754-2-kent.overstreet@linux.dev/ Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Youling Tang <tangyouling@kylinos.cn> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fa5d8e166e1e64c4cebedda53c523f0b80ed69b Author: Youling Tang <tangyouling@kylinos.cn> Date: Wed Oct 16 09:50:26 2024 +0800 bcachefs: Correct the description of the '--bucket=size' options Signed-off-by: Youling Tang <tangyouling@kylinos.cn> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/opts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 394033dcc976d1f83f0fc6e7d4dd041ce376d245 Author: Integral <integral@murena.io> Date: Wed Oct 23 18:00:33 2024 +0800 bcachefs: add support for true/false & yes/no in bool-type options Here is the patch which uses existing constant table: Currently, when using bcachefs-tools to set options, bool-type options can only accept 1 or 0. Add support for accepting true/false and yes/no for these options. Signed-off-by: Integral <integral@murena.io> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Acked-by: David Howells <dhowells@redhat.com> fs/bcachefs/opts.c | 16 +++++++++------- fs/fs_parser.c | 3 ++- include/linux/fs_parser.h | 2 ++ 3 files changed, 13 insertions(+), 8 deletions(-) commit e5ea05293a2ba181cdd04cd075b0483f11868f8f Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Nov 6 13:13:25 2024 -0500 bcachefs: Move fsck ioctl code to fsck.c chardev.c and fs-ioctl.c are not organized by subject; let's try to fix this. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/chardev.c | 219 +------------------------------------------------- fs/bcachefs/fsck.c | 218 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/bcachefs/fsck.h | 3 + 3 files changed, 222 insertions(+), 218 deletions(-) commit e69df6adf8e5d8f0b4a1a3ee6ba66d826c2e3094 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Oct 25 22:16:19 2024 -0400 bcachefs: Kill unnecessary iter_rewind() in bkey_get_empty_slot() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_update.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit db6e584b8514556894ba64b5afddbb2d2217ce62 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Oct 25 01:48:26 2024 -0400 bcachefs: Simplify btree_iter_peek() filter_snapshots Collapse all the BTREE_ITER_filter_snapshots handling down into a single block; btree iteration is much simpler in the !filter_snapshots case. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 129 +++++++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 67 deletions(-) commit 000fe8d573c4f287ed0aceb328f0a1a7698790c0 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Oct 24 18:39:59 2024 -0400 bcachefs: Rename btree_iter_peek_upto() -> btree_iter_peek_max() We'll be introducing btree_iter_peek_prev_min(), so rename for consistency. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/alloc_background.c | 6 +++--- fs/bcachefs/btree_gc.c | 2 +- fs/bcachefs/btree_iter.c | 10 +++++----- fs/bcachefs/btree_iter.h | 36 ++++++++++++++++++------------------ fs/bcachefs/btree_journal_iter.c | 4 ++-- fs/bcachefs/btree_journal_iter.h | 2 +- fs/bcachefs/btree_update.c | 6 +++--- fs/bcachefs/dirent.c | 4 ++-- fs/bcachefs/ec.c | 2 +- fs/bcachefs/extent_update.c | 2 +- fs/bcachefs/fs-io-pagecache.c | 2 +- fs/bcachefs/fs-io.c | 8 ++++---- fs/bcachefs/fs.c | 2 +- fs/bcachefs/fsck.c | 8 ++++---- fs/bcachefs/inode.c | 6 +++--- fs/bcachefs/io_misc.c | 6 +++--- fs/bcachefs/io_write.c | 4 ++-- fs/bcachefs/movinggc.c | 2 +- fs/bcachefs/reflink.c | 2 +- fs/bcachefs/str_hash.h | 6 +++--- fs/bcachefs/subvolume.h | 12 ++++++------ fs/bcachefs/tests.c | 26 +++++++++++++------------- fs/bcachefs/xattr.c | 2 +- 23 files changed, 80 insertions(+), 80 deletions(-) commit 65b14fa3d83588d55441384ea1c0b3eacfac0a1b Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Oct 25 22:31:20 2024 -0400 bcachefs: Assert that we're not violating key cache coherency rules We're not allowed to have a dirty key in the key cache if the key doesn't exist at all in the btree - creation has to bypass the key cache, so that iteration over the btree can check if the key is present in the key cache. Things break in subtle ways if cache coherency is broken, so this needs an assert. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_key_cache.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit b318882022a8ab67e9b1682bed52366072592fa7 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 27 19:32:40 2024 -0400 bcachefs: bch2_trans_verify_not_unlocked_or_in_restart() Fold two asserts into one. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 36 ++++++++++++++++++++---------------- fs/bcachefs/btree_iter.h | 20 ++++++-------------- fs/bcachefs/btree_locking.h | 2 +- fs/bcachefs/btree_trans_commit.c | 9 +++------ fs/bcachefs/btree_update_interior.c | 3 +-- fs/bcachefs/btree_update_interior.h | 2 +- 6 files changed, 32 insertions(+), 40 deletions(-) commit a71a1fac904d89fe6a5a1d407a85de0b078f1dee Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Oct 14 23:52:51 2024 -0400 bcachefs: Better in_restart error We're ramping up on checking transaction restart handling correctness - so, in debug mode we now save a backtrace for where the restart was emitted, which makes it much easier to track down the incorrect handling. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 12 ++++++++++++ fs/bcachefs/btree_iter.h | 4 ++++ fs/bcachefs/btree_types.h | 3 +++ 3 files changed, 19 insertions(+) commit 2434fc38ef62731f1d9b8684625a71385112805f Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Oct 14 23:33:57 2024 -0400 bcachefs: Assert we're not in a restart in bch2_trans_put() This always indicates a transaction restart handling bug Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 3 +++ 1 file changed, 3 insertions(+) commit 69785001c669e6e8681efdc3e49afee9f6a38559 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Nov 7 22:00:05 2024 -0500 bcachefs: Fix unhandled transaction restart in evacuate_bucket() Generally, releasing a transaction within a transaction restart means an unhandled transaction restart: but this can happen legitimately within the move code, e.g. when bch2_move_ratelimit() tells us to exit before we've retried. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/move.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b09b34499c43197a2578f179ffbcfdd5a5bc85b9 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Oct 31 00:25:36 2024 -0400 bcachefs: Improved check_topology() assert On interior btree node updates, we always verify that we're not introducing topology errors: child nodes should exactly span the range of the parent node. single_device.ktest small_nodes has been popping this assert: change it to give us more information. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_update_interior.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit a34b026482125b8170dae3d059120c0575ff6893 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Oct 31 03:39:32 2024 -0400 bcachefs: Kill BCH_TRANS_COMMIT_lazy_rw We unconditionally go read-write, if we're going to do so, before journal replay: lazy_rw is obsolete. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_gc.c | 2 +- fs/bcachefs/btree_trans_commit.c | 31 +++++-------------------------- fs/bcachefs/btree_update.c | 3 +-- fs/bcachefs/btree_update.h | 1 - fs/bcachefs/lru.c | 2 +- fs/bcachefs/rebalance.c | 3 +-- fs/bcachefs/snapshot.c | 8 ++++++-- fs/bcachefs/subvolume.c | 2 +- fs/bcachefs/super.h | 10 ---------- 9 files changed, 16 insertions(+), 46 deletions(-) commit cc944fbe06d8e7b1098d42b9b824272dad5cea44 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Oct 31 03:35:41 2024 -0400 bcachefs: Add assert for use of journal replay keys for updates The journal replay keys mechanism can only be used for updates in early recovery, when still single threaded. Add some asserts to make sure we never accidentally use it elsewhere. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs.h | 6 ++++++ fs/bcachefs/btree_trans_commit.c | 2 ++ fs/bcachefs/super.c | 5 +++++ 3 files changed, 13 insertions(+) commit 32e573c362db3d15b8046d10cd194c314adf7b82 Author: Hongbo Li <lihongbo22@huawei.com> Date: Tue Oct 29 20:54:08 2024 +0800 bcachefs: use attribute define helper for sysfs attribute The sysfs attribute definition has been wrapped into macro: rw_attribute, read_attribute and write_attribute, we can use these helpers to uniform the attribute definition. Signed-off-by: Hongbo Li <lihongbo22@huawei.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/sysfs.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit d3d8ec90babcaf8b925cd63c668573abb423e715 Author: Hongbo Li <lihongbo22@huawei.com> Date: Tue Oct 29 20:53:50 2024 +0800 bcachefs: remove write permission for gc_gens_pos sysfs interface The gc_gens_pos is used to show the status of bucket gen gc. There is no need to assign write permissions for this attribute. Here we can use read_attribute helper to define this attribute. ``` [Before] $ ll internal/gc_gens_pos -rw-r--r-- 1 root root 4096 Oct 28 15:27 internal/gc_gens_pos [After] $ ll internal/gc_gens_pos -r--r--r-- 1 root root 4096 Oct 28 17:27 internal/gc_gens_pos ``` Fixes: ac516d0e7db7 ("bcachefs: Add the status of bucket gen gc to sysfs") Signed-off-by: Hongbo Li <lihongbo22@huawei.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 161d13835e38e4803f9c44e0912aaec9c35f127f Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Oct 28 23:23:18 2024 -0400 bcachefs: Move bch_extent_rebalance code to rebalance.c Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/buckets.c | 1 + fs/bcachefs/extents.c | 99 ---------------------- fs/bcachefs/extents.h | 7 -- fs/bcachefs/extents_format.h | 48 +---------- fs/bcachefs/move.c | 43 +--------- fs/bcachefs/rebalance.c | 186 +++++++++++++++++++++++++++++++++++++++++ fs/bcachefs/rebalance.h | 52 ++---------- fs/bcachefs/rebalance_format.h | 53 ++++++++++++ 8 files changed, 251 insertions(+), 238 deletions(-) commit a652c56590a912144579684c508f4c36c252f245 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Oct 26 01:42:57 2024 -0400 bcachefs: Improve trace_rebalance_extent We now say explicitly which pointers are being moved or compressed Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/extents.c | 35 +++-------------------------------- fs/bcachefs/rebalance.c | 26 +++++++++++++++++++++----- fs/bcachefs/rebalance.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 37 deletions(-) commit 3de8b72731dbb41b980af44805ff5bf032a19bc1 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Oct 19 21:41:20 2024 -0400 bcachefs: Simplify option logic in rebalance Since bch2_move_get_io_opts() now synchronizes io_opts with options from bch_extent_rebalance, delete the ad-hoc logic in rebalance.c that previously did this. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/extents.c | 20 ++++++++++---------- fs/bcachefs/extents.h | 3 +-- fs/bcachefs/rebalance.c | 47 +++++++++++++++-------------------------------- 3 files changed, 26 insertions(+), 44 deletions(-) commit 6aa0bd0fd59a1ab9ecd5c51332c29fac0d8969c8 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Oct 19 21:41:20 2024 -0400 bcachefs: get_update_rebalance_opts() bch2_move_get_io_opts() now synchronizes options loaded from the filesystem and inode (if present, i.e. not walking the reflink btree directly) with options from the bch_extent_rebalance_entry, updating the extent if necessary. Since bch_extent_rebalance tracks where its option came from we can preserve "inode options override filesystem options", even for indirect extents where we don't have access to the inode the options came from. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/extents.c | 17 +++++++++ fs/bcachefs/extents.h | 1 + fs/bcachefs/move.c | 94 ++++++++++++++++++++++++++++++++++++------------- fs/bcachefs/move.h | 5 ++- fs/bcachefs/rebalance.c | 2 +- 5 files changed, 91 insertions(+), 28 deletions(-) commit 4ae6bbb522f59aef34bb7fb3f7048ecaf72f0ab7 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 20 20:53:53 2024 -0400 bcachefs: bch2_write_inode() now checks for changing rebalance options Previously, BCHFS_IOC_REINHERIT_ATTRS didn't trigger rebalance scans when changing rebalance options - it had been missed, only the xattr interface triggered them. Ideally they'd be done by the transactional trigger, but unpacking the inode to get the options is too heavy to be done in the low level trigger - the inode trigger is run on every extent update, since the bch_inode.bi_journal_seq has to be updated for fsync. bch2_write_inode() is a good compromise, it already unpacks and repacks and is not run in any super-fast paths. Additionally, creating the new rebalance entry to trigger the scan is now done in the same transaction as the inode update that changed the options. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fs.c | 26 +++++++++++++++++++++----- fs/bcachefs/inode.h | 8 ++++++++ fs/bcachefs/rebalance.c | 4 ++-- fs/bcachefs/rebalance.h | 1 + fs/bcachefs/xattr.c | 7 ------- 5 files changed, 32 insertions(+), 14 deletions(-) commit 2d21d112538ea3b5f35a92fded43324dc693af25 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Oct 19 21:41:20 2024 -0400 bcachefs: New bch_extent_rebalance fields - Add more io path options to bch_extent_rebalance - For each option, track whether it came from the filesystem or the inode This will be used for improved rebalance support for reflinked data. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/extents.c | 65 ++++++++++++++++++++++++++++++++++++-------- fs/bcachefs/extents_format.h | 34 +++++++++++++++++++++-- fs/bcachefs/opts.h | 3 +- 3 files changed, 87 insertions(+), 15 deletions(-) commit ed13bb5726ee344d1c1a5593e474c1ccc6fd8c5a Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Oct 28 01:14:53 2024 -0400 bcachefs: bch2_prt_csum_opt() bounds checking helper Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs_format.h | 2 +- fs/bcachefs/checksum.h | 2 +- fs/bcachefs/opts.c | 3 ++- fs/bcachefs/opts.h | 7 ++++--- 4 files changed, 8 insertions(+), 6 deletions(-) commit c22508470439014d0b902adda1f0d97567b574d0 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Thu Oct 24 01:06:53 2024 -0400 bcachefs: copygc_enabled, rebalance_enabled now opts.h options They can now be set at mount time Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs.h | 2 -- fs/bcachefs/movinggc.c | 4 ++-- fs/bcachefs/opts.h | 12 ++++++++++++ fs/bcachefs/rebalance.c | 4 ++-- fs/bcachefs/rebalance_types.h | 2 -- fs/bcachefs/super.c | 3 --- fs/bcachefs/sysfs.c | 31 +++++++------------------------ 7 files changed, 23 insertions(+), 35 deletions(-) commit 7a7c43a0c1ecf174218f88cc46f5af361314b3c2 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Oct 19 23:26:11 2024 -0400 bcachefs: Add bch_io_opts fields for indicating whether the opts came from the inode This is going to be used in the bch_extent_rebalance improvements, which propagate io_path options into the extent (important for rebalance, which needs something present in the extent for transactionally tagging them in the rebalance_work btree, and also for indirect extents). By tracking in bch_extent_rebalance whether the option came from the filesystem or the inode we can correctly handle options being changed on indirect extents. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/inode.c | 8 +++++++- fs/bcachefs/opts.h | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) commit 3000855cab65831f39ecdedd9447c396893287f6 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 20 02:28:51 2024 -0400 bcachefs: io_opts_to_rebalance_opts() New helper to simplify bch2_bkey_set_needs_rebalance() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/data_update.c | 2 +- fs/bcachefs/extents.c | 60 ++++++++++++-------------------------------- fs/bcachefs/extents.h | 3 +-- fs/bcachefs/extents_format.h | 5 ++++ fs/bcachefs/io_misc.c | 2 +- fs/bcachefs/io_write.c | 2 +- fs/bcachefs/opts.h | 13 ++++++++++ fs/bcachefs/reflink.c | 2 +- 8 files changed, 39 insertions(+), 50 deletions(-) commit 5fffe1a3c3992cdcfc2f22e8e80afb91885840fa Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 20 02:21:28 2024 -0400 bcachefs: rename bch_extent_rebalance fields to match other opts structs Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/extents.c | 36 ++++++++++++++++++------------------ fs/bcachefs/extents_format.h | 8 ++++---- fs/bcachefs/rebalance.c | 12 ++++++------ 3 files changed, 28 insertions(+), 28 deletions(-) commit 282faf952474a3125d3f3fd7d32ae77f8b4c96c3 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 20 02:14:53 2024 -0400 bcachefs: kill __bch2_bkey_sectors_need_rebalance() Single caller, fold into bch2_bkey_sectors_need_rebalance() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/extents.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit c8908959aead268223baaf17e990a200a085bb5c Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 20 01:40:19 2024 -0400 bcachefs: kill bch2_bkey_needs_rebalance() Dead code Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/extents.c | 17 ----------------- fs/bcachefs/extents.h | 1 - 2 files changed, 18 deletions(-) commit 015fafc49bbf81380b65190219e530b4015cb13e Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 20 01:32:55 2024 -0400 bcachefs: small cleanup for extent ptr bitmasks Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/data_update.c | 30 +++++++++++++++--------------- fs/bcachefs/extents.c | 12 ++++++------ fs/bcachefs/io_read.c | 6 +++--- 3 files changed, 24 insertions(+), 24 deletions(-) commit eacb755568d68337de6e6f734b00df40780c4e30 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 20 01:21:43 2024 -0400 bcachefs: bch2_io_opts_fixups() Centralize some io path option fixups - they weren't always being applied correctly: - background_compression uses compression if unset - background_target uses foreground_target if unset - nocow disables most fancy io path options Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/data_update.c | 4 ++-- fs/bcachefs/extents.c | 2 +- fs/bcachefs/inode.c | 4 ++-- fs/bcachefs/opts.c | 5 ++++- fs/bcachefs/opts.h | 12 ++++++++++-- fs/bcachefs/rebalance.c | 4 ++-- 6 files changed, 21 insertions(+), 10 deletions(-) commit 16de2c856af0d93bb798a5e55d790103d5fd888c Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 20 01:16:16 2024 -0400 bcachefs: use bch2_data_update_opts_to_text() in trace_move_extent_fail() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/data_update.c | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) commit a1ca525b82312ad42adb11a59fb103243b28407b Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 20 01:11:29 2024 -0400 bcachefs: avoid 'unsigned flags' flags should have actual types, where possible: fix btree_update.h helpers Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_update.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 901ff6555ba02dd917aa65b1105c9715e25dc994 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Sat Oct 26 17:47:04 2024 +0200 bcachefs: Annotate struct bucket_gens with __counted_by() Add the __counted_by compiler attribute to the flexible array member b to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Use struct_size() to calculate the number of bytes to be allocated. Update bucket_gens->nbuckets and bucket_gens->nbuckets_minus_first when resizing. Compile-tested only. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/buckets.c | 13 ++++++++----- fs/bcachefs/buckets_types.h | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) commit ac9826f14739023bccf1345e6e4ddb0461fa9a2e Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Sat Oct 26 12:47:23 2024 +0200 bcachefs: Use str_write_read() helper in write_super_endio() Remove hard-coded strings by using the str_write_read() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/super-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 751d869710ca91b6b2c6f4235137c71eb054ce02 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Sun Oct 20 13:20:46 2024 +0200 bcachefs: Use str_write_read() helper in ec_block_endio() Remove hard-coded strings by using the helper function str_write_read(). Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/ec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit de902e3b4a9881ae02d414d427ad56cc384c9bf1 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Sat Oct 19 14:25:27 2024 +0200 bcachefs: Use str_write_read() helper function Remove hard-coded strings by using the helper function str_write_read(). Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/journal_io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e0c8369bc8444daf0d68d23bcae472d11680d49f Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Oct 20 19:02:44 2024 -0400 bcachefs: Add version check for bch_btree_ptr_v2.sectors_written validate A user popped up with a very old (0.11) filesystem that needed repair and wasn't recently backed up. Reported-by: Manoa <manoa@mail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/extents.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 27de0ee39f810dab2e948d2c465f8fcf8cbf9f8c Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Oct 14 21:35:44 2024 -0400 bcachefs: Add block plugging to read paths This will help with some of the btree_trans srcu lock hold time warnings that are still turning up; submit_bio() can block for awhile if the device is sufficiently congested. It's not a perfect solution since blk_plug bios are submitted when scheduling; we might want a way to disable the "submit on context switch" behaviour, or switch to our own plugging in the future. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fs-io-buffered.c | 19 ++++++++++++++++++- fs/bcachefs/fs-io-direct.c | 5 +++++ 2 files changed, 23 insertions(+), 1 deletion(-) commit be5a7be1062b2e588519d7ed68ff2e8f4ed0a42a Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Oct 12 14:07:44 2024 -0400 bcachefs: Fix warning about passing flex array member by value this showed up when building in userspace Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/disk_accounting.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fb8c835b18d48dac953a5d755a8e90b0d8fb9c29 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Oct 11 22:50:48 2024 -0400 bcachefs: bch2_journal_meta() takes ref on c->writes This part of addressing https://github.com/koverstreet/bcachefs/issues/656 where we're getting stuck in bch2_journal_meta() in the dump tool. We shouldn't be invoking the journal without a ref on c->writes (if we're not RW), and there's no reason for the dump tool to be going read-write. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs.h | 1 + fs/bcachefs/journal.c | 27 +++++++++++++++++---------- fs/bcachefs/recovery.c | 4 +--- 3 files changed, 19 insertions(+), 13 deletions(-) commit 8b22abb4c84058e9533d71a4814e54316ba2621f Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Oct 11 22:53:09 2024 -0400 bcachefs: -o norecovery now bails out of recovery earlier -o norecovery (used by the dump tool) should be doing the absolute minimum amount of work to get the filesystem up and readable; we shouldn't be running check and repair code, or going read-write. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/recovery.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit d55d4a0ca27adea2e6bb404eb9b65a19036dd047 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Sep 1 14:57:26 2024 -0400 bcachefs: Refactor new stripe path to reduce dependencies on ec_stripe_head We need to add a path for reshaping existing stripes (for e.g. device removal), and this new path won't necessarily use ec_stripe_head. Refactor the code to avoid unnecessary references to it for clarity. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/ec.c | 196 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 104 insertions(+), 92 deletions(-) commit db514cf6775fa58b45780969e407f678e0a5132c Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Oct 9 23:02:04 2024 -0400 bcachefs: Avoid bch2_btree_id_str() Prefer bch2_btree_id_to_text() - it prints out the integer ID when unknown. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/backpointers.c | 24 +++++++++++--------- fs/bcachefs/bbpos.h | 2 +- fs/bcachefs/btree_cache.c | 37 ++++++++++++++++++------------ fs/bcachefs/btree_cache.h | 3 ++- fs/bcachefs/btree_gc.c | 45 ++++++++++++++++++++++--------------- fs/bcachefs/btree_io.c | 13 ++++++----- fs/bcachefs/btree_iter.c | 32 +++++++++++++------------- fs/bcachefs/btree_journal_iter.c | 5 ++++- fs/bcachefs/btree_node_scan.c | 10 +++++---- fs/bcachefs/btree_update_interior.c | 23 ++++++++++--------- fs/bcachefs/debug.c | 4 +++- fs/bcachefs/disk_accounting.c | 3 ++- fs/bcachefs/journal_io.c | 3 ++- fs/bcachefs/recovery.c | 25 +++++++++++++++------ fs/bcachefs/sysfs.c | 3 ++- 15 files changed, 140 insertions(+), 92 deletions(-) commit 9e2f5f79882b855156cd522acb7354e5a7901418 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Oct 9 21:27:11 2024 -0400 bcachefs: better error message in check_snapshot_tree() If we find a snapshot node and it didn't match the snapshot tree, we should print it. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/snapshot.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 106480e9a869e8d2dd2db34819d04e15ccfd896c Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Oct 9 21:51:05 2024 -0400 bcachefs: Factor out jset_entry_log_msg_bytes() Needed for improved userspace cmd_list_journal Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs_format.h | 9 +++++++++ fs/bcachefs/journal_io.c | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) commit 0269e27ce3f7be2bd1e565cc17a88e4074facad1 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Oct 9 21:26:05 2024 -0400 bcachefs: improved bkey_val_copy() Factor out some common code, add typechecking. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.h | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit e3c43dbe8e5ff64e77b6f927b32f489bccc7d75e Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Sep 21 23:40:01 2024 -0400 bcachefs: bch2_btree_lost_data() now uses run_explicit_rceovery_pass_persistent() Also get a bit more fine grained about which passes to run for which btrees. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/recovery.c | 63 ++++++++++++++++++++++++++++--------------- fs/bcachefs/recovery.h | 2 +- fs/bcachefs/recovery_passes.c | 11 ++++++++ fs/bcachefs/recovery_passes.h | 1 + 4 files changed, 54 insertions(+), 23 deletions(-) commit d65d126c0256cf2349e118a3e8627d8281295eee Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Sep 21 23:27:59 2024 -0400 bcachefs: Add locking for bch_fs.curr_recovery_pass Recovery can rewind in certain situations - when we discover we need to run a pass that doesn't normally run. This can happen from another thread for btree node read errors, so we need a bit of locking. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs.h | 1 + fs/bcachefs/recovery_passes.c | 76 ++++++++++++++++++++++++++++++++----------- fs/bcachefs/super.c | 1 + 3 files changed, 59 insertions(+), 19 deletions(-) commit 26c79fdc580d27c08c050789c523ce89e9a0da44 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Sep 21 23:22:48 2024 -0400 bcachefs: lru, accounting are alloc btrees They can be regenerated by fsck and don't require a btree node scan, like other alloc btrees. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs_format.h | 2 ++ 1 file changed, 2 insertions(+) commit 18f5b84a04707565b926b3dcdfbc6f88ef53988a Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Sep 21 20:21:18 2024 -0400 bcachefs: bch2_run_explicit_recovery_pass() returns different error when not in recovery if we're not in recovery then there's no way to rewind recovery - give this a different errcode so that any error messages will give us a better idea of what happened. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/errcode.h | 4 +++- fs/bcachefs/recovery_passes.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) commit eba3d7e57d2a4e0c1f28b5c2e3bb691279ab6eaf Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Sep 23 18:11:07 2024 -0400 bcachefs: add more path idx debug asserts Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.h | 2 ++ 1 file changed, 2 insertions(+) commit 55f524b706b48229685a61e8d5349b484f683e34 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Mon Sep 23 16:44:53 2024 +0200 bcachefs: Use FOREACH_ACL_ENTRY() macro to iterate over acl entries Use the existing FOREACH_ACL_ENTRY() macro to iterate over POSIX acl entries and remove the custom acl_for_each_entry() macro. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/acl.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 03525de50638ac0801e5296826e3cdebe4cb553f Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Mon Sep 23 16:20:29 2024 +0200 bcachefs: Remove duplicate included headers The header files dirent_format.h and disk_groups_format.h are included twice. Remove the redundant includes and the following warnings reported by make includecheck: disk_groups_format.h is included more than once dirent_format.h is included more than once Reviewed-by: Hongbo Li <lihongbo22@huawei.com> Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs_format.h | 2 -- 1 file changed, 2 deletions(-) commit 71008e5d6f097794d188d91e7c83c13f777b45ce Author: Dennis Lam <dennis.lamerice@gmail.com> Date: Wed Sep 11 21:16:28 2024 -0400 docs: filesystems: bcachefs: fixed some spelling mistakes in the bcachefs coding style page Specifically, fixed spelling of "commit" and pluralization of last sentence. Signed-off-by: Dennis Lam <dennis.lamerice@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Documentation/filesystems/bcachefs/CodingStyle.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e1c6ac05a2348be6b74db63b406c10dd553f1ae Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Sep 23 22:11:41 2024 -0400 bcachefs: kill btree_trans_restart_nounlock() Redundant, the normal btree_trans_restart() doesn't unlock. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.h | 7 +++---- fs/bcachefs/btree_trans_commit.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) commit d6cf895847f60af83bad62b15f1da14abd331fae Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Sep 24 05:08:39 2024 -0400 bcachefs: Remove unnecessary peek_slot() hash_lookup() used to return an errorcode, and a peek_slot() call was required to get the key it looked up. But we're adding fault injection for transaction restarts, so fix this old unconverted code. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fsck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe818d2039e74fac314e4032b51f057a7f313ad0 Author: Thomas Bertschinger <tahbertschinger@gmail.com> Date: Fri Sep 13 18:11:22 2024 -0600 bcachefs: move bch2_xattr_handlers to .rodata A series posted previously moved all of the `struct xattr_handler` tables to .rodata for each filesystem [1]. However, this appears to have been done shortly before bcachefs was merged, so bcachefs was missed at that time. Link: https://lkml.kernel.org/r/20230930050033.41174-1-wedsonaf@gmail.com [1] Cc: Wedson Almeida Filho <wedsonaf@gmail.com> Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/xattr.c | 2 +- fs/bcachefs/xattr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bf4e42d158baff9b67ef8f7bd3caa0801bee6374 Author: Alan Huang <mmpgouride@gmail.com> Date: Fri Sep 27 22:26:53 2024 +0800 bcachefs: Delete dead code lock_fail_root_changed has not been used since commit 0d7009d7ca99 ("bcachefs: Delete old deadlock avoidance code") Remove it. Signed-off-by: Alan Huang <mmpgouride@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_iter.c | 2 -- fs/bcachefs/errcode.h | 1 - 2 files changed, 3 deletions(-) commit c07beca44ff181bad5928abccff6358ca9d9590b Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Oct 1 16:59:08 2024 -0400 bcachefs: Pull disk accounting hooks out of trans_commit.c Also, fix a minor bug in the revert path, where we weren't checking the journal entry type correctly. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_trans_commit.c | 35 ++++++----------------------------- fs/bcachefs/disk_accounting.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 29 deletions(-) commit 179cdecf225dfe2ad88ca1fbcf776d7e6fc10c26 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Sep 28 23:10:48 2024 -0400 bcachefs: bch_verbose_ratelimited ratelimit "deleting unlinked inode" messages Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/bcachefs.h | 8 ++++++++ fs/bcachefs/inode.c | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) commit a55e2d78eac840cf156445492403ea3ac0a1b1eb Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sun Sep 22 01:11:36 2024 -0400 bcachefs: rcu_pending: don't invoke __call_rcu() under lock In userspace we don't (yet) have an SRCU implementation, so call_srcu() recurses. But we don't want to be invoking it under the lock anyways. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/rcu_pending.c | 2 ++ 1 file changed, 2 insertions(+) commit b836f220146967a0931d0dff58d5c90797c8b88e Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Mon Sep 30 00:14:09 2024 -0400 bcachefs: __bch2_key_has_snapshot_overwrites uses for_each_btree_key_reverse_norestart() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/snapshot.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 1325ccf27e7eb247295d84ae8e6fd0f1f3f0e445 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Tue Oct 1 17:45:58 2024 -0400 bcachefs: remove_backpointer() now uses dirent_get_by_pos() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fsck.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit de92b1ee679bfdf97e6dcd7d4815c53606ea5f01 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Sat Sep 28 14:27:24 2024 -0400 bcachefs: bch2_inode_should_have_bp -> bch2_inode_should_have_single_bp Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fs.c | 2 +- fs/bcachefs/fsck.c | 2 +- fs/bcachefs/inode.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 1c6d5841aebcad7d1a63e242780e400db6efcf97 Author: Colin Ian King <colin.i.king@gmail.com> Date: Mon Oct 7 09:11:21 2024 +0100 bcachefs: remove superfluous ; after statements There are a several statements with two following semicolons, replace these with just one semicolon. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/btree_update.c | 2 +- fs/bcachefs/ec.c | 2 +- fs/bcachefs/super.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 135c0c85248a10512a9c5d17dccf65e220398cf4 Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Wed Oct 9 16:53:59 2024 -0400 bcachefs: Fix racy use of jiffies Calculate the timeout, then check if it's positive before calling schedule_timeout(). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/journal_reclaim.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4b8d382b2c896d5338112b681ac11eb6704c7c69 Merge: 78d4f34e2115 3d1ea1c0aeaf Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Oct 11 19:23:26 2024 -0400 Merge branch 'bcachefs-kill-retry-estale' into HEAD commit c074fc2220eb1f9f3a4dd3d5322cacb553d3ce7f Author: Sibi Sankar <quic_sibis@quicinc.com> Date: Fri Oct 25 18:05:50 2024 +0530 arm64: dts: qcom: x1e001de-devkit: Enable SD card support The SD card slot found on the X1E001DE Snapdragon Devkit for windows board is controlled by SDC2 instance, so enable it. Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241025123551.3528206-3-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e001de-devkit.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit ab8f487d2f8905641541c27c7929363ee538b0f8 Author: Abel Vesa <abel.vesa@linaro.org> Date: Thu Dec 12 18:50:40 2024 +0200 arm64: dts: qcom: x1e80100-qcp: Enable SD card support One of the SD card slots found on the X Elite QCP board is controlled by the SDC2. Enable it and describe the board specific resources. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Link: https://lore.kernel.org/r/20241212-x1e80100-qcp-sdhc-v4-2-a74c48ee68a3@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit ffb21c1e19b17f3b2f5f56c70e379ef7c96afad5 Author: Abel Vesa <abel.vesa@linaro.org> Date: Thu Dec 12 18:50:39 2024 +0200 arm64: dts: qcom: x1e80100: Describe the SDHC controllers The X Elite platform features two SDHC v5 controllers. Describe the controllers along with the pin configuration in TLMM for the SDC2, since they are hardwired and cannot be muxed to any other function. The SDC4 pin configuration can be muxed to different functions, so leave those to board specific dts. Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Link: https://lore.kernel.org/r/20241212-x1e80100-qcp-sdhc-v4-1-a74c48ee68a3@linaro.org [bjorn: Replaced 0s with QCOM_ICC_TAG_ALWAYS] Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100.dtsi | 142 +++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) commit 89fc83a9472812052610970b41fd44de94224b32 Author: Lijuan Gao <quic_lijuang@quicinc.com> Date: Wed Dec 18 18:39:39 2024 +0800 arm64: dts: qcom: qcs615: Add CPU and LLCC BWMON support Add CPU and LLCC BWMON nodes and their corresponding opp tables to support bandwidth monitoring on QCS615 SoC. This is necessary to enable power management and optimize system performance from the perspective of dynamically changing LLCC and DDR frequencies. Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241218-add_bwmon_support_for_qcs615-v1-2-680d798a19e5@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615.dtsi | 72 ++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 653bd35b8849dd47536edc8c893718e7142548c7 Author: Lijuan Gao <quic_lijuang@quicinc.com> Date: Wed Dec 18 18:39:38 2024 +0800 dt-bindings: interconnect: qcom-bwmon: Document QCS615 bwmon compatibles Document QCS615 BWMONs, which includes one BWMONv4 instance for CPU to LLCC path bandwidth monitoring and one BWMONv5 instance for LLCC to DDR path bandwidth monitoring. Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241218-add_bwmon_support_for_qcs615-v1-1-680d798a19e5@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 2054d38ccf708e1add482c6345f7f349059b56e0 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Tue Dec 17 21:31:22 2024 -0800 drm/xe: Use q->xef for accessing xe file No need to traverse through the vm object as each exec queue maintains a reference to xe_file. Also improve/simplify the comment on why xef is checked. Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241218053122.2730195-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_exec_queue.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 4ca1fd418338d4d135428a0eb1e16e3b3ce17ee8 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Tue Dec 17 21:31:21 2024 -0800 drm/xe: Fix fault on fd close after unbind If userspace holds an fd open, unbinds the device and then closes it, the driver shouldn't try to access the hardware. Protect it by using drm_dev_enter()/drm_dev_exit(). This fixes the following page fault: <6> [IGT] xe_wedged: exiting, ret=98 <1> BUG: unable to handle page fault for address: ffffc901bc5e508c <1> #PF: supervisor read access in kernel mode <1> #PF: error_code(0x0000) - not-present page ... <4> xe_lrc_update_timestamp+0x1c/0xd0 [xe] <4> xe_exec_queue_update_run_ticks+0x50/0xb0 [xe] <4> xe_exec_queue_fini+0x16/0xb0 [xe] <4> __guc_exec_queue_fini_async+0xc4/0x190 [xe] <4> guc_exec_queue_fini_async+0xa0/0xe0 [xe] <4> guc_exec_queue_fini+0x23/0x40 [xe] <4> xe_exec_queue_destroy+0xb3/0xf0 [xe] <4> xe_file_close+0xd4/0x1a0 [xe] <4> drm_file_free+0x210/0x280 [drm] <4> drm_close_helper.isra.0+0x6d/0x80 [drm] <4> drm_release_noglobal+0x20/0x90 [drm] Fixes: 83db047d9425 ("drm/xe: Stop accumulating LRC timestamp on job_free") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3421 Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241218053122.2730195-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_exec_queue.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 39a72b4fedd0669ff49d0051efc763e729da56bf Merge: d3dcc98f65db f96274528995 Author: Stephen Boyd <sboyd@kernel.org> Date: Fri Dec 20 15:44:41 2024 -0800 Merge tag 'renesas-clk-for-v6.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull Renesas clk driver udpates from Geert Uytterhoeven: - Add sound (SSI), remaining serial (SCIF), and ADC clocks, resets and power domains on Renesas RZ/G3S - Add system restart support on Renesas RZ/N1 - Add camera clocks and resets on Renesas RZ/V2H(P) - Add display clocks on Renesas R-Car V4M * tag 'renesas-clk-for-v6.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r9a08g045: Add clocks, resets and power domain support for the ADC IP clk: renesas: r8a779h0: Add display clocks clk: renesas: r9a09g057: Add support for PLLVDO, CRU clocks, and resets clk: renesas: rzv2h: Add selective Runtime PM support for clocks clk: renesas: r9a06g032: Use BIT macro consistently clk: renesas: r9a06g032: Add restart handler clk: renesas: r9a08g045: Add clock, reset and power domain for the remaining SCIFs clk: renesas: r9a08g045: Add clocks, resets and power domains support for SSI clk: renesas: cpg-mssr: Fix 'soc' node handling in cpg_mssr_reserved_init() commit 5efc58e409d9e11fc43a029c4186cf6671dd3521 Author: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Date: Fri Dec 13 19:59:48 2024 +0100 drm/i915/selftests: Use preemption timeout on cleanup Many selftests call igt_flush_test() on cleanup. With default preemption timeout of compute engines raised to 7.5 seconds, hardcoded flush timeout of 3 seconds is too short. That results in GPU forcibly wedged and kernel taineted, then IGT abort triggered. CI BAT runs loose a part of their expected coverage. Calculate the flush timeout based on the longest preemption timeout currently configured for any engine. That way, selftest can still report detected issues as non-critical, and the GPU gets a chance to recover from preemptible hangs and prepare for fluent execution of next test cases. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061 Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241213190122.513709-2-janusz.krzysztofik@linux.intel.com drivers/gpu/drm/i915/selftests/igt_flush_test.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit ae418e95dd930df6543107521c5ce55e379a9530 Merge: 6ed3472173c5 c63e9f3b89d3 Author: Jakub Kicinski <kuba@kernel.org> Date: Fri Dec 20 13:50:14 2024 -0800 Merge branch 'ipv4-consolidate-route-lookups-from-ipv4-sockets' Guillaume Nault says: ==================== ipv4: Consolidate route lookups from IPv4 sockets. Create inet_sk_init_flowi4() so that the different IPv4 code paths that need to do a route lookup based on an IPv4 socket don't need to reimplement that logic. ==================== Link: https://patch.msgid.link/cover.1734357769.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit c63e9f3b89d3f96220a1c99466fed4563c14a259 Author: Guillaume Nault <gnault@redhat.com> Date: Mon Dec 16 18:21:54 2024 +0100 l2tp: Use inet_sk_init_flowi4() in l2tp_ip_sendmsg(). Use inet_sk_init_flowi4() to automatically initialise the flowi4 structure in l2tp_ip_sendmsg() instead of passing parameters manually to ip_route_output_ports(). Override ->daddr with the value passed in the msghdr structure if provided. Signed-off-by: Guillaume Nault <gnault@redhat.com> Reviewed-by: James Chapman <jchapman@katalix.com> Link: https://patch.msgid.link/2ff22a3560c5050228928456662b80b9c84a8fe4.1734357769.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/l2tp/l2tp_ip.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit 148721f8e04a10a3b9c51f030c9be0d15b0a4d17 Author: Guillaume Nault <gnault@redhat.com> Date: Mon Dec 16 18:21:51 2024 +0100 ipv4: Use inet_sk_init_flowi4() in __ip_queue_xmit(). Use inet_sk_init_flowi4() to automatically initialise the flowi4 structure in __ip_queue_xmit() instead of passing parameters manually to ip_route_output_ports(). Override ->flowi4_tos with the value passed as parameter since that's required by SCTP. Signed-off-by: Guillaume Nault <gnault@redhat.com> Link: https://patch.msgid.link/37e64ffbd9adac187b14aa9097b095f5c86e85be.1734357769.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/ipv4/ip_output.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 42e5ffc385f3b0790c6cd5b54d3396a6c772d3b6 Author: Guillaume Nault <gnault@redhat.com> Date: Mon Dec 16 18:21:48 2024 +0100 ipv4: Use inet_sk_init_flowi4() in inet_csk_rebuild_route(). Use inet_sk_init_flowi4() to automatically initialise the flowi4 structure in inet_csk_rebuild_route() instead of passing parameters manually to ip_route_output_ports(). Signed-off-by: Guillaume Nault <gnault@redhat.com> Link: https://patch.msgid.link/b270931636effa1095508e0f0a3e8c3a0e6d357f.1734357769.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/ipv4/inet_connection_sock.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 5be1323b5041d806716c80be4f8b11cfb64fa24c Author: Guillaume Nault <gnault@redhat.com> Date: Mon Dec 16 18:21:46 2024 +0100 ipv4: Use inet_sk_init_flowi4() in ip4_datagram_release_cb(). Use inet_sk_init_flowi4() to automatically initialise the flowi4 structure in ip4_datagram_release_cb() instead of passing parameters manually to ip_route_output_ports(). Signed-off-by: Guillaume Nault <gnault@redhat.com> Link: https://patch.msgid.link/9c326b8d9e919478f7952b21473d31da07eba2dd.1734357769.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/ipv4/datagram.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 1dbdce30f040a87f5aa6a9dbe43be398737f090f Author: Guillaume Nault <gnault@redhat.com> Date: Mon Dec 16 18:21:44 2024 +0100 ipv4: Define inet_sk_init_flowi4() and use it in inet_sk_rebuild_header(). IPv4 code commonly has to initialise a flowi4 structure from an IPv4 socket. This requires looking at potential IPv4 options to set the proper destination address, call flowi4_init_output() with the correct set of parameters and run the sk_classify_flow security hook. Instead of reimplementing these operations in different parts of the stack, let's define inet_sk_init_flowi4() which does all these operations. The first user is inet_sk_rebuild_header(), where inet_sk_init_flowi4() replaces ip_route_output_ports(). Unlike ip_route_output_ports(), which sets the flowi4 structure and performs the route lookup in one go, inet_sk_init_flowi4() only initialises the flow. The route lookup is then done by ip_route_output_flow(). Decoupling flow initialisation from route lookup makes this new interface applicable more broadly as it will allow some users to overwrite specific struct flowi4 members before the route lookup. Signed-off-by: Guillaume Nault <gnault@redhat.com> Link: https://patch.msgid.link/fd416275262b1f518d5abfcef740ce4f4a1a6522.1734357769.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/route.h | 28 ++++++++++++++++++++++++++++ net/ipv4/af_inet.c | 14 ++------------ 2 files changed, 30 insertions(+), 12 deletions(-) commit 7a47db23a9f003614e15c687d2a5425c175a9ca8 Merge: 5fe85a5c5133 794d8cf3a87a Author: Christian Brauner <brauner@kernel.org> Date: Fri Dec 20 22:34:18 2024 +0100 Merge patch series "netfs: Read performance improvements and "single-blob" support" David Howells <dhowells@redhat.com> says: This set of patches is primarily about two things: improving read performance and supporting monolithic single-blob objects that have to be read/written as such (e.g. AFS directory contents). The implementation of the two parts is interwoven as each makes the other possible. READ PERFORMANCE ================ The read performance improvements are intended to speed up some loss of performance detected in cifs and to a lesser extend in afs. The problem is that we queue too many work items during the collection of read results: each individual subrequest is collected by its own work item, and then they have to interact with each other when a series of subrequests don't exactly align with the pattern of folios that are being read by the overall request. Whilst the processing of the pages covered by individual subrequests as they complete potentially allows folios to be woken in parallel and with minimum delay, it can shuffle wakeups for sequential reads out of order - and that is the most common I/O pattern. The final assessment and cleanup of an operation is then held up until the last I/O completes - and for a synchronous sequential operation, this means the bouncing around of work items just adds latency. Two changes have been made to make this work: (1) All collection is now done in a single "work item" that works progressively through the subrequests as they complete (and also dispatches retries as necessary). (2) For readahead and AIO, this work item be done on a workqueue and can run in parallel with the ultimate consumer of the data; for synchronous direct or unbuffered reads, the collection is run in the application thread and not offloaded. Functions such as smb2_readv_callback() then just tell netfslib that the subrequest has terminated; netfslib does a minimal bit of processing on the spot - stat counting and tracing mostly - and then queues/wakes up the worker. This simplifies the logic as the collector just walks sequentially through the subrequests as they complete and walks through the folios, if buffered, unlocking them as it goes. It also keeps to a minimum the amount of latency injected into the filesystem's low-level I/O handling The way netfs supports filesystems using the deprecated PG_private_2 flag is changed: folios are flagged and added to a write request as they complete and that takes care of scheduling the writes to the cache. The originating read request can then just unlock the pages whatever happens. SINGLE-BLOB OBJECT SUPPORT ========================== Single-blob objects are files for which the content of the file must be read from or written to the server in a single operation because reading them in parts may yield inconsistent results. AFS directories are an example of this as there exists the possibility that the contents are generated on the fly and would differ between reads or might change due to third party interference. Such objects will be written to and retrieved from the cache if one is present, though we allow/may need to propose multiple subrequests to do so. The important part is that read from/write to the *server* is monolithic. Single blob reading is, for the moment, fully synchronous and does result collection in the application thread and, also for the moment, the API is supplied the buffer in the form of a folio_queue chain rather than using the pagecache. AFS CHANGES =========== This series makes a number of changes to the kafs filesystem, primarily in the area of directory handling: (1) AFS's FetchData RPC reply processing is made partially asynchronous which allows the netfs_io_request's outstanding operation counter to be removed as part of reducing the collection to a single work item. (2) Directory and symlink reading are plumbed through netfslib using the single-blob object API and are now cacheable with fscache. This also allows the afs_read struct to be eliminated and netfs_io_subrequest to be used directly instead. (3) Directory and symlink content are now stored in a folio_queue buffer rather than in the pagecache. This means we don't require the RCU read lock and xarray iteration to access it, and folios won't randomly disappear under us because the VM wants them back. There are some downsides to this, though: the storage folios are no longer known to the VM, drop_caches can't flush them, the folios are not migrateable. The inode must also be marked dirty manually to get the data written to the cache in the background. (4) The vnode operation lock is changed from a mutex struct to a private lock implementation. The problem is that the lock now needs to be dropped in a separate thread and mutexes don't permit that. (5) When a new directory or symlink is created, we now initialise it locally and mark it valid rather than downloading it (we know what it's likely to look like). (6) We now use the in-directory hashtable to reduce the number of entries we need to scan when doing a lookup. The edit routines have to maintain the hash chains. (7) Cancellation (e.g. by signal) of an async call after the rxrpc_call has been set up is now offloaded to the worker thread as there will be a notification from rxrpc upon completion. This avoids a double cleanup. SUPPORTING CHANGES ================== To support the above some other changes are also made: (1) A "rolling buffer" implementation is created to abstract out the two separate folio_queue chaining implementations I had (one for read and one for write). (2) Functions are provided to create/extend a buffer in a folio_queue chain and tear it down again. This is used to handle AFS directories, but could also be used to create bounce buffers for content crypto and transport crypto. (3) The was_async argument is dropped from netfs_read_subreq_terminated(). Instead we wake the read collection work item by either queuing it or waking up the app thread. (4) We don't need to use BH-excluding locks when communicating between the issuing thread and the collection thread as neither of them now run in BH context. MISCELLANY ========== Also included are a number of new tracepoints; a split of the netfslib write collection code to put retrying into its own file (it gets more complicated with content encryption). There are also some minor fixes AFS included, including fixing the AFS directory format struct layout, reducing some directory over-invalidation and making afs_mkdir() translate EEXIST to ENOTEMPY (which is not available on all systems the servers support). Finally, there's a patch to try and detect entry into the folio unlock function with no folio_queue structs in the buffer (which isn't allowed in the cases that can get there). This is a debugging patch, but should be minimal overhead. * patches from https://lore.kernel.org/r/20241216204124.3752367-1-dhowells@redhat.com: (31 commits) netfs: Report on NULL folioq in netfs_writeback_unlock_folios() afs: Add a tracepoint for afs_read_receive() afs: Locally initialise the contents of a new symlink on creation afs: Use the contained hashtable to search a directory afs: Make afs_mkdir() locally initialise a new directory's content netfs: Change the read result collector to only use one work item afs: Make {Y,}FS.FetchData an asynchronous operation afs: Fix cleanup of immediately failed async calls afs: Eliminate afs_read afs: Use netfslib for symlinks, allowing them to be cached afs: Use netfslib for directories afs: Make afs_init_request() get a key if not given a file netfs: Add support for caching single monolithic objects such as AFS dirs netfs: Add functions to build/clean a buffer in a folio_queue afs: Add more tracepoints to do with tracking validity cachefiles: Add auxiliary data trace cachefiles: Add some subrequest tracepoints netfs: Remove some extraneous directory invalidations afs: Fix directory format encoding struct afs: Fix EEXIST error returned from afs_rmdir() to be ENOTEMPTY ... Link: https://lore.kernel.org/r/20241216204124.3752367-1-dhowells@redhat.com Signed-off-by: Christian Brauner <brauner@kernel.org> commit 794d8cf3a87a6b958d520a7c32d142f7ec30cb92 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:22 2024 +0000 netfs: Report on NULL folioq in netfs_writeback_unlock_folios() It seems that it's possible to get to netfs_writeback_unlock_folios() with an empty rolling buffer during buffered writes. This should not be possible as the rolling buffer is initialised as the write request is set up and thereafter maintains at least one folio_queue struct therein until it gets destroyed. This allows lockless addition and removal of folio_queue structs in the buffer because, unlike with a ring buffer, the producer and consumer each only need to look at and alter one pointer into the buffer. Now, the rolling buffer is only used for buffered I/O operations as netfs_collect_write_results() should only call netfs_writeback_unlock_folios() if the request is of origin type NETFS_WRITEBACK, NETFS_WRITETHROUGH or NETFS_PGPRIV2_COPY_TO_CACHE. So it would seem that one of the following occurred: (1) I/O started before the request was fully initialised, (2) the origin got switched mid-flow or (3) the request has already been freed and this is a UAF error. I think the last is the most likely. Make netfs_writeback_unlock_folios() report information about the request and subrequests if folioq is seen to be NULL to try and help debug this, throw a warning and return. Note that this does not try to fix the problem. Reported-by: syzbot+af5c06208fa71bf31b16@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=af5c06208fa71bf31b16 Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/ZxshMEW4U7MTgQYa@gmail.com/ Link: https://lore.kernel.org/r/20241216204124.3752367-33-dhowells@redhat.com cc: Chang Yu <marcus.yu.56@gmail.com> cc: Jeff Layton <jlayton@kernel.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/netfs/write_collect.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 3c49e529e1c6aa71cb9b874fd60b72c97dae7ede Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:21 2024 +0000 afs: Add a tracepoint for afs_read_receive() Add a tracepoint for afs_read_receive() to allow potential missed wakeups to be debugged. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-32-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/file.c | 1 + include/trace/events/afs.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit 6698c02d64b240861c20d15a531445942600c8ae Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:20 2024 +0000 afs: Locally initialise the contents of a new symlink on creation Since we know what the contents of a symlink will be when we create it on the server, initialise its contents locally too to avoid the need to download it. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-31-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/dir.c | 2 ++ fs/afs/inode.c | 46 ++++++++++++++++++++++++++++++++++++++++------ fs/afs/internal.h | 1 + fs/netfs/buffered_read.c | 2 +- fs/netfs/read_single.c | 2 +- 5 files changed, 45 insertions(+), 8 deletions(-) commit a5b5beebcf96d5e8a2fc79856c2ac1e93f82478e Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:19 2024 +0000 afs: Use the contained hashtable to search a directory Each directory image contains a hashtable with 128 buckets to speed up searching. Currently, kafs does not use this, but rather iterates over all the occupied slots in the image as it can share this with readdir. Switch kafs to use the hashtable for lookups to reduce the latency. Care must be taken that the hash chains are acyclic. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-30-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/Makefile | 1 + fs/afs/dir.c | 42 ++++------ fs/afs/dir_edit.c | 135 ++++++++++++++++++++----------- fs/afs/dir_search.c | 227 ++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/afs/internal.h | 18 +++++ 5 files changed, 350 insertions(+), 73 deletions(-) commit 836bb70bde6a24a0069866b69d23eb61a00c422a Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:18 2024 +0000 afs: Make afs_mkdir() locally initialise a new directory's content Initialise a new directory's content when it is created by mkdir locally rather than downloading the content from the server as we can predict what it's going to look like. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-29-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/dir.c | 3 +++ fs/afs/dir_edit.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++ fs/afs/internal.h | 1 + include/trace/events/afs.h | 2 ++ 4 files changed, 55 insertions(+) commit e2d46f2ec332533816417b60933954173f602121 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:17 2024 +0000 netfs: Change the read result collector to only use one work item Change the way netfslib collects read results to do all the collection for a particular read request using a single work item that walks along the subrequest queue as subrequests make progress or complete, unlocking folios progressively rather than doing the unlock in parallel as parallel requests come in. The code is remodelled to be more like the write-side code, though only using a single stream. This makes it more directly comparable and thus easier to duplicate fixes between the two sides. This has a number of advantages: (1) It's simpler. There doesn't need to be a complex donation mechanism to handle mismatches between the size and alignment of subrequests and folios. The collector unlocks folios as the subrequests covering each complete. (2) It should cause less scheduler overhead as there's a single work item in play unlocking pages in parallel when a read gets split up into a lot of subrequests instead of one per subrequest. Whilst the parallellism is nice in theory, in practice, the vast majority of loads are sequential reads of the whole file, so committing a bunch of threads to unlocking folios out of order doesn't help in those cases. (3) It should make it easier to implement content decryption. A folio cannot be decrypted until all the requests that contribute to it have completed - and, again, most loads are sequential and so, most of the time, we want to begin decryption sequentially (though it's great if the decryption can happen in parallel). There is a disadvantage in that we're losing the ability to decrypt and unlock things on an as-things-arrive basis which may affect some applications. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-28-dhowells@redhat.com cc: Jeff Layton <jlayton@kernel.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/9p/vfs_addr.c | 3 +- fs/afs/dir.c | 8 +- fs/ceph/addr.c | 9 +- fs/netfs/buffered_read.c | 160 +++++----- fs/netfs/direct_read.c | 60 ++-- fs/netfs/internal.h | 21 +- fs/netfs/main.c | 2 +- fs/netfs/objects.c | 34 +- fs/netfs/read_collect.c | 716 +++++++++++++++++++++++++------------------ fs/netfs/read_pgpriv2.c | 203 +++++------- fs/netfs/read_retry.c | 207 +++++++------ fs/netfs/read_single.c | 37 +-- fs/netfs/write_collect.c | 4 +- fs/netfs/write_issue.c | 2 +- fs/netfs/write_retry.c | 14 +- fs/smb/client/cifssmb.c | 2 + fs/smb/client/smb2pdu.c | 5 +- include/linux/netfs.h | 16 +- include/trace/events/netfs.h | 79 +---- 19 files changed, 819 insertions(+), 763 deletions(-) commit eddf51f2bb2c28b082199c6f5fd95611ca511135 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:15 2024 +0000 afs: Make {Y,}FS.FetchData an asynchronous operation Make FS.FetchData and YFS.FetchData an asynchronous operation in that the request is queued in AF_RXRPC and then we return to the caller rather than waiting. Processing of the returning packets is then done inline if it's a synchronous VFS/VM call (readdir, read_folio, sync DIO, prep for write) or offloaded to a workqueue if asynchronous VM calls (eg. readahead, async DIO). This reduces the chain of workqueues invoking workqueues and cuts out some of the overhead, driving rxrpc data extraction and netfslib read collection from a thread that's going to block to completion anyway if possible. The ->done() call op is also split with ->immediate_cancel() handling the cancellation on failure to begin the call and ->done() handling the rest. This means that the AFS async FetchData code doesn't try to terminate the netfs subrequest twice. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-26-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/file.c | 126 ++++++++++++++++++++++++++++++++++++++++++++------ fs/afs/fs_operation.c | 2 +- fs/afs/fsclient.c | 9 +++- fs/afs/internal.h | 24 ++++++++++ fs/afs/main.c | 2 +- fs/afs/rxrpc.c | 25 +++------- fs/afs/vlclient.c | 1 + fs/afs/write.c | 12 +++++ fs/afs/yfsclient.c | 6 ++- 9 files changed, 170 insertions(+), 37 deletions(-) commit 9750be93b2be12b6d92323b97d7c055099d279e6 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:14 2024 +0000 afs: Fix cleanup of immediately failed async calls If we manage to begin an async call, but fail to transmit any data on it due to a signal, we then abort it which causes a race between the notification of call completion from rxrpc and our attempt to cancel the notification. The notification will be necessary, however, for async FetchData to terminate the netfs subrequest. However, since we get a notification from rxrpc upon completion of a call (aborted or otherwise), we can just leave it to that. This leads to calls not getting cleaned up, but appearing in /proc/net/rxrpc/calls as being aborted with code 6. Fix this by making the "error_do_abort:" case of afs_make_call() abort the call and then abandon it to the notification handler. Fixes: 34fa47612bfe ("afs: Fix race in async call refcounting") Reported-by: Marc Dionne <marc.dionne@auristor.com> Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-25-dhowells@redhat.com cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/internal.h | 9 +++++++++ fs/afs/rxrpc.c | 12 +++++++++--- include/trace/events/afs.h | 2 ++ 3 files changed, 20 insertions(+), 3 deletions(-) commit f28fc2010d622a2f1f3fe8fcd2ce2376ecf3430f Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:13 2024 +0000 afs: Eliminate afs_read Now that directory and symlink reads go through netfslib, the afs_read struct is mostly redundant with almost all data duplicated in the netfs_io_request and netfs_io_subrequest structs that are also available any time we're doing a fetch. Eliminate afs_read by moving the one field we still need there to the afs_call struct (we may be given a different amount of data than what we asked for and have to track what remains of that) and using the netfs_io_subrequest directly instead. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-24-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/file.c | 96 ++++++++++-------------------------------------------- fs/afs/fsclient.c | 55 +++++++++++++++---------------- fs/afs/inode.c | 2 ++ fs/afs/internal.h | 35 ++------------------ fs/afs/yfsclient.c | 47 +++++++++++++------------- fs/netfs/main.c | 2 +- 6 files changed, 72 insertions(+), 165 deletions(-) commit eae9e78951bb02a7b94a9adef6e981413d13c564 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:12 2024 +0000 afs: Use netfslib for symlinks, allowing them to be cached Use netfslib to read symlinks, thereby allowing them to be cached by fscache and cachefiles. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-23-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: Jeff Layton <jlayton@kernel.org> cc: linux-afs@lists.infradead.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/file.c | 32 ----------------------- fs/afs/inode.c | 64 ++++++++++++++++++++++++++++++++++++++++++---- fs/afs/internal.h | 4 ++- fs/afs/mntpt.c | 22 ++++++++-------- include/trace/events/afs.h | 1 + 5 files changed, 74 insertions(+), 49 deletions(-) commit 6dd80936618c4ff852d4db73aca400351d9bd9f0 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:11 2024 +0000 afs: Use netfslib for directories In the AFS ecosystem, directories are just a special type of file that is downloaded and parsed locally. Download is done by the same mechanism as ordinary files and the data can be cached. There is one important semantic restriction on directories over files: the client must download the entire directory in one go because, for example, the server could fabricate the contents of the blob on the fly with each download and give a different image each time. So that we can cache the directory download, switch AFS directory support over to using the netfslib single-object API, thereby allowing directory content to be stored in the local cache. To make this work, the following changes are made: (1) A directory's contents are now stored in a folio_queue chain attached to the afs_vnode (inode) struct rather than its associated pagecache, though multipage folios are still used to hold the data. The folio queue is discarded when the directory inode is evicted. This also helps with the phasing out of ITER_XARRAY. (2) Various directory operations are made to use and unuse the cache cookie. (3) The content checking, content dumping and content iteration are now performed with a standard iov_iter iterator over the contents of the folio queue. (4) Iteration and modification must be done with the vnode's validate_lock held. In conjunction with (1), this means that the iteration can be done without the need to lock pages or take extra refs on them, unlike when accessing ->i_pages. (5) Convert to using netfs_read_single() to read data. (6) Provide a ->writepages() to call netfs_writeback_single() to save the data to the cache according to the VM's scheduling whilst holding the validate_lock read-locked as (4). (7) Change local directory image editing functions: (a) Provide a function to get a specific block by number from the folio_queue as we can no longer use the i_pages xarray to locate folios by index. This uses a cursor to remember the current position as we need to iterate through the directory contents. The block is kmapped before being returned. (b) Make the function in (a) extend the directory by an extra folio if we run out of space. (c) Raise the check of the block free space counter, for those blocks that have one, higher in the function to eliminate a call to get a block. (d) Remove the page unlocking and putting done during the editing loops. This is no longer necessary as the folio_queue holds the references and the pages are no longer in the pagecache. (e) Mark the inode dirty and pin the cache usage till writeback at the end of a successful edit. (8) Don't set the large_folios flag on the inode as we do the allocation ourselves rather than the VM doing it automatically. (9) Mark the inode as being a single object that isn't uploaded to the server. (10) Enable caching on directories. (11) Only set the upload key for writeback for regular files. Notes: (*) We keep the ->release_folio(), ->invalidate_folio() and ->migrate_folio() ops as we set the mapping pointer on the folio. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-22-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: Jeff Layton <jlayton@kernel.org> cc: linux-afs@lists.infradead.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/dir.c | 747 +++++++++++++++++++++++---------------------- fs/afs/dir_edit.c | 183 +++++------ fs/afs/file.c | 8 + fs/afs/inode.c | 21 +- fs/afs/internal.h | 16 + fs/afs/super.c | 2 + fs/afs/write.c | 4 +- include/trace/events/afs.h | 6 +- 8 files changed, 517 insertions(+), 470 deletions(-) commit b2604315e87a3fa3c35561e1c37836f915c4e3d8 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:10 2024 +0000 afs: Make afs_init_request() get a key if not given a file In a future patch, AFS directory caching will go through netfslib and this will involve, at times, running on behalf of ->lookup(), which doesn't provide us with a file from which we can get an authentication key. If a file isn't provided, make afs_init_request() get a key from the process's keyrings instead when setting up a read. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-21-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/file.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 49866ce7ea8d41a3dc198f519cc9caa2d6be1891 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:09 2024 +0000 netfs: Add support for caching single monolithic objects such as AFS dirs Add support for caching the content of a file that contains a single monolithic object that must be read/written with a single I/O operation, such as an AFS directory. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-20-dhowells@redhat.com cc: Jeff Layton <jlayton@kernel.org> cc: Marc Dionne <marc.dionne@auristor.com> cc: netfs@lists.linux.dev cc: linux-afs@lists.infradead.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/netfs/Makefile | 1 + fs/netfs/buffered_read.c | 11 ++- fs/netfs/internal.h | 2 + fs/netfs/main.c | 2 + fs/netfs/objects.c | 2 + fs/netfs/read_collect.c | 45 +++++++++- fs/netfs/read_single.c | 202 ++++++++++++++++++++++++++++++++++++++++++ fs/netfs/stats.c | 4 +- fs/netfs/write_collect.c | 6 +- fs/netfs/write_issue.c | 203 +++++++++++++++++++++++++++++++++++++++++-- include/linux/netfs.h | 10 +++ include/trace/events/netfs.h | 4 + 12 files changed, 478 insertions(+), 14 deletions(-) commit e61bfaad8fd86ac84eac633e0bbaac47a5dfd358 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:08 2024 +0000 netfs: Add functions to build/clean a buffer in a folio_queue Add two netfslib functions to build up or clean up a buffer in a folio_queue. The first, netfs_alloc_folioq_buffer() will add folios to a buffer, extending up at least to the given size. If it can, it will add multipage folios. The folios are optionally have the mapping set and will have the index set according to the distance from the front of the folio queue. The second function will free up a folio queue and put any folios in the queue that have the first mark set. The netfs_folio tracepoint is also altered to cope with folios that have a NULL mapping, and the folios being added/put will have trace lines emitted and will be accounted in the stats. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-19-dhowells@redhat.com cc: Jeff Layton <jlayton@kernel.org> cc: Marc Dionne <marc.dionne@auristor.com> cc: netfs@lists.linux.dev cc: linux-afs@lists.infradead.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/netfs/misc.c | 96 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/netfs.h | 6 +++ include/trace/events/netfs.h | 6 +-- 3 files changed, 104 insertions(+), 4 deletions(-) commit 9e705016eb8f3d4a58f2000e560ea2c7517e081b Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:07 2024 +0000 afs: Add more tracepoints to do with tracking validity Add wrappers to set and clear the callback promise and to mark a directory as invalidated, and add tracepoints to track these events: (1) afs_cb_promise: Log when a callback promise is set on a vnode. (2) afs_vnode_invalid: Log when the server's callback promise for a vnode is no longer valid and we need to refetch the vnode metadata. (3) afs_dir_invalid: Log when the contents of a directory are marked invalid and requiring refetching from the server and the cache invalidating. and two tracepoints to record data version number management: (4) afs_set_dv: Log when the DV is recorded on a vnode. (5) afs_dv_mismatch: Log when the DV recorded on a vnode plus the expected delta for the operation does not match the DV we got back from the server. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-18-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/callback.c | 4 +- fs/afs/dir.c | 14 ++-- fs/afs/dir_edit.c | 16 ++--- fs/afs/inode.c | 23 +++--- fs/afs/internal.h | 32 +++++++++ fs/afs/rotate.c | 4 +- fs/afs/validation.c | 31 ++++++--- include/trace/events/afs.h | 169 +++++++++++++++++++++++++++++++++++++++++++-- 8 files changed, 248 insertions(+), 45 deletions(-) commit 229105e5cfd9832a9ef1368c96e0098ec3a5fbf0 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:06 2024 +0000 cachefiles: Add auxiliary data trace Add a display of the first 8 bytes of the downloaded auxiliary data and of the on-disk stored auxiliary data as these are used in coherency management. In the case of afs, this holds the data version number. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-17-dhowells@redhat.com cc: Jeff Layton <jlayton@kernel.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/cachefiles/xattr.c | 9 ++++++++- include/trace/events/cachefiles.h | 13 ++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) commit bcb33f79e15d0e4dc4b86106ceb01d64bfab9e35 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:05 2024 +0000 cachefiles: Add some subrequest tracepoints Add some tracepoints into the cachefiles write paths. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-16-dhowells@redhat.com cc: netfs@lists.linux.dev Signed-off-by: Christian Brauner <brauner@kernel.org> fs/cachefiles/io.c | 4 ++++ include/trace/events/netfs.h | 3 +++ 2 files changed, 7 insertions(+) commit 30f878fa0fac932ea811303aacf73c6a44b12bd2 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:04 2024 +0000 netfs: Remove some extraneous directory invalidations In the directory editing code, we shouldn't re-invalidate the directory if it is already invalidated. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-15-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/dir_edit.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 07a10767853adcbdbf436dc91393b729b52c4e81 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:03 2024 +0000 afs: Fix directory format encoding struct The AFS directory format structure, union afs_xdr_dir_block::meta, has too many alloc counter slots declared and so pushes the hash table along and over the data. This doesn't cause a problem at the moment because I'm currently ignoring the hash table and only using the correct number of alloc_ctrs in the code anyway. In future, however, I should start using the hash table to try and speed up afs_lookup(). Fix this by using the correct constant to declare the counter array. Fixes: 4ea219a839bf ("afs: Split the directory content defs into a header") Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-14-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/xdr_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b49194da2aff2c879dec9c59ef8dec0f2b0809ef Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:02 2024 +0000 afs: Fix EEXIST error returned from afs_rmdir() to be ENOTEMPTY AFS servers pass back a code indicating EEXIST when they're asked to remove a directory that is not empty rather than ENOTEMPTY because not all the systems that an AFS server can run on have the latter error available and AFS preexisted the addition of that error in general. Fix afs_rmdir() to translate EEXIST to ENOTEMPTY. Fixes: 260a980317da ("[AFS]: Add "directory write" support.") Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-13-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/dir.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6e0b503dc65c89b83fbfafb4dac5201c844da1de Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:01 2024 +0000 afs: Don't use mutex for I/O operation lock Don't use the standard mutex for the I/O operation lock, but rather implement our own as the standard mutex must be released in the same thread as locked it. This is a problem when it comes to doing async FetchData where the lock will be dropped from the workqueue that processed the incoming data and not from the issuing thread. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-12-dhowells@redhat.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/afs/fs_operation.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++--- fs/afs/internal.h | 3 +- fs/afs/super.c | 2 +- 3 files changed, 108 insertions(+), 8 deletions(-) commit 627cf645277b6f8e6128e2c86907a81970bce87a Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:00 2024 +0000 netfs: Don't use bh spinlock All the accessing of the subrequest lists is now done in process context, possibly in a workqueue, but not now in a BH context, so we don't need the lock against BH interference when taking the netfs_io_request::lock spinlock. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-11-dhowells@redhat.com cc: Jeff Layton <jlayton@kernel.org> cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/netfs/buffered_read.c | 4 ++-- fs/netfs/direct_read.c | 4 ++-- fs/netfs/read_collect.c | 20 ++++++++++---------- fs/netfs/read_retry.c | 8 ++++---- fs/netfs/write_collect.c | 4 ++-- fs/netfs/write_issue.c | 4 ++-- 6 files changed, 22 insertions(+), 22 deletions(-) commit 31fc366aa7aa911ebc0744e99c82caee4e97315a Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:40:59 2024 +0000 netfs: Drop the was_async arg from netfs_read_subreq_terminated() Drop the was_async argument from netfs_read_subreq_terminated(). Almost every caller is either in process context and passes false. Some filesystems delegate the call to a workqueue to avoid doing the work in their network message queue parsing thread. The only exception is netfs_cache_read_terminated() which handles completion in the cache - which is usually a callback from the backing filesystem in softirq context, though it can be from process context if an error occurred. In this case, delegate to a workqueue. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/CAHk-=wiVC5Cgyz6QKXFu6fTaA6h4CjexDR-OV9kL6Vo5x9v8=A@mail.gmail.com/ Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-10-dhowells@redhat.com cc: Jeff Layton <jlayton@kernel.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/9p/vfs_addr.c | 2 +- fs/afs/file.c | 6 +++--- fs/afs/fsclient.c | 2 +- fs/afs/yfsclient.c | 2 +- fs/ceph/addr.c | 6 +++--- fs/netfs/buffered_read.c | 6 +++--- fs/netfs/direct_read.c | 2 +- fs/netfs/internal.h | 2 +- fs/netfs/objects.c | 2 +- fs/netfs/read_collect.c | 53 +++++++++++------------------------------------- fs/netfs/read_retry.c | 2 +- fs/nfs/fscache.c | 2 +- fs/nfs/fscache.h | 2 +- fs/smb/client/file.c | 2 +- include/linux/netfs.h | 4 ++-- 15 files changed, 33 insertions(+), 62 deletions(-) commit 360157829ee3dba848ffa817792d9a07969e0a95 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:40:58 2024 +0000 netfs: Drop the error arg from netfs_read_subreq_terminated() Drop the error argument from netfs_read_subreq_terminated() in favour of passing the value in subreq->error. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-9-dhowells@redhat.com cc: Jeff Layton <jlayton@kernel.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/9p/vfs_addr.c | 3 ++- fs/afs/file.c | 15 ++++++++++----- fs/ceph/addr.c | 13 +++++++++---- fs/netfs/buffered_read.c | 16 ++++++++-------- fs/netfs/objects.c | 15 ++++++++++++++- fs/netfs/read_collect.c | 47 ++++++++++++++++++++++++++++++----------------- fs/nfs/fscache.c | 6 ++++-- fs/nfs/fscache.h | 3 ++- fs/smb/client/cifssmb.c | 10 +--------- fs/smb/client/file.c | 3 ++- fs/smb/client/smb2pdu.c | 10 +--------- include/linux/netfs.h | 7 +++---- 12 files changed, 86 insertions(+), 62 deletions(-) commit 751e213f9f8a24e1bd5988b9cb8043b0b2f017f0 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:40:57 2024 +0000 netfs: Split retry code out of fs/netfs/write_collect.c Split write-retry code out of fs/netfs/write_collect.c as it will become more elaborate when content crypto is introduced. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-8-dhowells@redhat.com cc: Jeff Layton <jlayton@kernel.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/netfs/Makefile | 3 +- fs/netfs/internal.h | 5 ++ fs/netfs/write_collect.c | 214 -------------------------------------------- fs/netfs/write_retry.c | 226 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 233 insertions(+), 215 deletions(-) commit d606c36294f46747b4fa34f79fccea6562d14aa7 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:40:56 2024 +0000 netfs: Make netfs_advance_write() return size_t netfs_advance_write() calculates the amount of data it's attaching to a stream with size_t, but then returns this as an int. Switch the return value to size_t for consistency. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-7-dhowells@redhat.com cc: Jeff Layton <jlayton@kernel.org> cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/netfs/internal.h | 6 +++--- fs/netfs/write_issue.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 06fa229ceb36898e68022b5654c017d2c6582d7d Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:40:55 2024 +0000 netfs: Abstract out a rolling folio buffer implementation A rolling buffer is a series of folios held in a list of folio_queues. New folios and folio_queue structs may be inserted at the head simultaneously with spent ones being removed from the tail without the need for locking. The rolling buffer includes an iov_iter and it has to be careful managing this as the list of folio_queues is extended such that an oops doesn't incurred because the iterator was pointing to the end of a folio_queue segment that got appended to and then removed. We need to use the mechanism twice, once for read and once for write, and, in future patches, we will use a second rolling buffer to handle bounce buffering for content encryption. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-6-dhowells@redhat.com cc: Jeff Layton <jlayton@kernel.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/netfs/Makefile | 1 + fs/netfs/buffered_read.c | 119 +++++----------------- fs/netfs/direct_read.c | 14 +-- fs/netfs/direct_write.c | 10 +- fs/netfs/internal.h | 4 - fs/netfs/misc.c | 147 --------------------------- fs/netfs/objects.c | 2 +- fs/netfs/read_pgpriv2.c | 32 +++--- fs/netfs/read_retry.c | 2 +- fs/netfs/rolling_buffer.c | 226 +++++++++++++++++++++++++++++++++++++++++ fs/netfs/write_collect.c | 19 ++-- fs/netfs/write_issue.c | 26 +++-- include/linux/netfs.h | 10 +- include/linux/rolling_buffer.h | 61 +++++++++++ include/trace/events/netfs.h | 2 + 15 files changed, 375 insertions(+), 300 deletions(-) commit aabcabf2746062253565b33aa3f8d25999a5ac01 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:40:54 2024 +0000 netfs: Add a tracepoint to log the lifespan of folio_queue structs Add a tracepoint to log the lifespan of folio_queue structs. For tracing illustrative purposes, folio_queues are tagged with the debug ID of whatever they're related to (typically a netfs_io_request) and a debug ID of their own. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-5-dhowells@redhat.com cc: Jeff Layton <jlayton@kernel.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/netfs/buffered_read.c | 10 +++++++--- fs/netfs/internal.h | 3 ++- fs/netfs/misc.c | 31 ++++++++++++++++++++----------- fs/netfs/read_collect.c | 8 ++++++-- fs/netfs/write_issue.c | 2 +- fs/smb/client/smb2ops.c | 2 +- include/linux/folio_queue.h | 12 +++++++++--- include/linux/netfs.h | 6 ++++-- include/trace/events/netfs.h | 41 +++++++++++++++++++++++++++++++++++++++-- lib/kunit_iov_iter.c | 4 ++-- 10 files changed, 91 insertions(+), 28 deletions(-) commit eb1181594417dafad0f75808ead71f6d5170c1ea Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:40:53 2024 +0000 netfs: Use a folio_queue allocation and free functions Provide and use folio_queue allocation and free functions to combine the allocation, initialisation and stat (un)accounting steps that are repeated in several places. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-4-dhowells@redhat.com cc: Jeff Layton <jlayton@kernel.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/netfs/buffered_read.c | 12 +++--------- fs/netfs/misc.c | 38 ++++++++++++++++++++++++++++++++++---- include/linux/netfs.h | 5 +++++ 3 files changed, 42 insertions(+), 13 deletions(-) commit 2a8a384621c35849bbc068e25e41cbe23243fa40 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:40:52 2024 +0000 cachefiles: Clean up some whitespace in trace header Clean up some whitespace in the cachefiles trace header. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-3-dhowells@redhat.com cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> include/trace/events/cachefiles.h | 172 +++++++++++++++++++------------------- 1 file changed, 86 insertions(+), 86 deletions(-) commit d3d3ec86568090cc5a4501b745274114de6881e0 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:40:51 2024 +0000 netfs: Clean up some whitespace in trace header Clean up some whitespace in the netfs trace header. Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20241216204124.3752367-2-dhowells@redhat.com cc: Jeff Layton <jlayton@kernel.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> include/trace/events/netfs.h | 130 +++++++++++++++++++++---------------------- 1 file changed, 65 insertions(+), 65 deletions(-) commit 6ed3472173c575cd8aaed6c62eb74f7728404ee6 Author: Tristram Ha <tristram.ha@microchip.com> Date: Tue Dec 17 18:02:40 2024 -0800 net: dsa: microchip: Do not execute PTP driver code for unsupported switches The PTP driver code only works for certain KSZ switches like KSZ9477, KSZ9567, LAN937X and their varieties. This code is enabled by kernel configuration CONFIG_NET_DSA_MICROCHIP_KSZ_PTP. As the DSA driver is common to work with all KSZ switches this PTP code is not appropriate for other unsupported switches. The ptp_capable indication is added to the chip data structure to signal whether to execute those code. Signed-off-by: Tristram Ha <tristram.ha@microchip.com> Link: https://patch.msgid.link/20241218020240.70601-1-Tristram.Ha@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/microchip/ksz_common.c | 40 ++++++++++++++++++++++++---------- drivers/net/dsa/microchip/ksz_common.h | 1 + 2 files changed, 30 insertions(+), 11 deletions(-) commit 3272040790eb4b6cafe6c30ec05049e9599ec456 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Thu Dec 19 11:00:19 2024 +0100 qlcnic: use const 'struct bin_attribute' callbacks The sysfs core now provides callback variants that explicitly take a const pointer. Use them so the non-const variants can be removed. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://patch.msgid.link/20241219-sysfs-const-bin_attr-net-v2-1-93bdaece3c90@weissschuh.net Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | 69 +++++++++++------------ 1 file changed, 34 insertions(+), 35 deletions(-) commit c1bc6d217858f7de7db01658f4b0d799bebc21ac Merge: 05dd04b218f4 dca12e9ab760 Author: Jakub Kicinski <kuba@kernel.org> Date: Fri Dec 20 13:16:46 2024 -0800 Merge branch 'bridge-handle-changes-in-vlan_flag_bridge_binding' Petr Machata says: ==================== bridge: Handle changes in VLAN_FLAG_BRIDGE_BINDING When bridge binding is enabled on a VLAN netdevice, its link state should track bridge ports that are members of the corresponding VLAN. This works for a newly-added netdevices. However toggling the option does not have the effect of enabling or disabling the behavior as appropriate. In this patchset, have bridge react to bridge_binding toggles on VLAN uppers. There has been another attempt at supporting this behavior in 2022 by Sevinj Aghayeva [0]. A discussion ensued that informed how this new patchset is constructed, namely that the logic is in the bridge as opposed to the 8021q driver, and the bridge reacts to NETDEV_CHANGE events on the 8021q upper. Patches #1 and #2 contain the implementation, patches #3 and #4 a selftest. [0] https://lore.kernel.org/netdev/cover.1660100506.git.sevinj.aghayeva@gmail.com/ ==================== Link: https://patch.msgid.link/cover.1734540770.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit dca12e9ab7603d94e47ded65080f750d6527c852 Author: Petr Machata <petrm@nvidia.com> Date: Wed Dec 18 18:15:59 2024 +0100 selftests: net: Add a VLAN bridge binding selftest Add a test that exercises bridge binding. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/baf7244fd1fe223a6d93e027584fa9f99dee982c.1734540770.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/selftests/net/Makefile | 1 + tools/testing/selftests/net/vlan_bridge_binding.sh | 256 +++++++++++++++++++++ 2 files changed, 257 insertions(+) commit 976d248bd33356eecb958cdc1b0c37622fd5d595 Author: Petr Machata <petrm@nvidia.com> Date: Wed Dec 18 18:15:58 2024 +0100 selftests: net: lib: Add a couple autodefer helpers Alongside the helper ip_link_set_up(), one to set the link down will be useful as well. Add a helper to determine the link state as well, ip_link_is_up(), and use it to short-circuit any changes if the state is already the desired one. Furthermore, add a helper bridge_vlan_add(). Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/856d9e01725fdba21b7f6716358f645b19131af2.1734540770.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/selftests/net/lib.sh | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) commit 3abd45122c72d6a66a52d41a65586fdf7ab40ef7 Author: Petr Machata <petrm@nvidia.com> Date: Wed Dec 18 18:15:57 2024 +0100 net: bridge: Handle changes in VLAN_FLAG_BRIDGE_BINDING When bridge binding is enabled on a VLAN netdevice, its link state should track bridge ports that are members of the corresponding VLAN. This works for newly-added netdevices. However toggling the option does not have the effect of enabling or disabling the behavior as appropriate. In this patch, react to bridge_binding toggles on VLAN uppers. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/90a8ca8aea4d81378b29d75d9e562433e0d5c7ff.1734540770.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/bridge/br.c | 7 +++++++ net/bridge/br_private.h | 9 +++++++++ net/bridge/br_vlan.c | 24 ++++++++++++++++++++++++ 3 files changed, 40 insertions(+) commit f284424dc17b57d779a03dfc9a66489a67150b30 Author: Petr Machata <petrm@nvidia.com> Date: Wed Dec 18 18:15:56 2024 +0100 net: bridge: Extract a helper to handle bridge_binding toggles Currently, the BROPT_VLAN_BRIDGE_BINDING bridge option is only toggled when VLAN devices are added on top of a bridge or removed from it. Extract the toggling of the option to a function so that it could be invoked by a subsequent patch when the state of an upper VLAN device changes. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/a7455f6fe1dfa7b13126ed8a7fb33d3b611eecb8.1734540770.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/bridge/br_vlan.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 05dd04b218f42c57a14e330fd8583995f141ed6b Author: Eric Dumazet <edumazet@google.com> Date: Thu Dec 19 15:03:30 2024 +0000 inetpeer: avoid false sharing in inet_peer_xrlim_allow() Under DOS, inet_peer_xrlim_allow() might be called millions of times per second from different cpus. Make sure to write over peer->rate_tokens and peer->rate_last only when really needed. Note the inherent races of this function are still there, we do not care of precise ICMP rate limiting. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20241219150330.3159027-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/ipv4/inetpeer.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 710aebdad633d4608568ba8124d643e01866fc6d Merge: b73e56f16250 8973ce189376 Author: Jakub Kicinski <kuba@kernel.org> Date: Fri Dec 20 12:56:19 2024 -0800 Merge branch 'hisilicon-hns-deadcoding' Dr. David Alan Gilbert says: ==================== hisilicon hns deadcoding From: "Dr. David Alan Gilbert" <linux@treblig.org> A small set of deadcoding for functions that are not called, and a couple of function pointers that they called. Build tested only; I don't have the hardware. ==================== Link: https://patch.msgid.link/20241218163341.40297-1-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 8973ce189376e41ddd398fab0ba8dc8b14e50cd0 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 18 16:33:41 2024 +0000 net: hisilicon: hns: Remove unused enums The enums dsaf_roce_port_mode, dsaf_roce_port_num and dsaf_roce_qos_sl are unused after the removal of the reset code. Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Jijie Shao<shaojijie@huawei.com> Link: https://patch.msgid.link/20241218163341.40297-5-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h | 23 ---------------------- 1 file changed, 23 deletions(-) commit 0198b459f54e5813da4f6c36c867822401abc0c8 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 18 16:33:40 2024 +0000 net: hisilicon: hns: Remove reset helpers With hns_dsaf_roce_reset() removed in a previous patch, the two helper member pointers, 'hns_dsaf_roce_srst', and 'hns_dsaf_srst_chns' are now unread. Remove them, and the helper functions that they were initialised to, that is hns_dsaf_srst_chns(), hns_dsaf_srst_chns_acpi(), hns_dsaf_roce_srst() and hns_dsaf_roce_srst_acpi(). Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Jijie Shao<shaojijie@huawei.com> Link: https://patch.msgid.link/20241218163341.40297-4-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h | 3 - drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 67 ---------------------- 2 files changed, 70 deletions(-) commit 0265e9edf2100735304907e9979a9264c4dc7b5e Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 18 16:33:39 2024 +0000 net: hisilicon: hns: Remove unused hns_rcb_start hns_rcb_start() has been unused since 2016's commit 454784d85de3 ("net: hns: delete redundancy ring enable operations") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Jijie Shao<shaojijie@huawei.com> Link: https://patch.msgid.link/20241218163341.40297-3-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 5 ----- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h | 1 - 2 files changed, 6 deletions(-) commit a574fe14ed1e496deb8ee6821029ed96591021e8 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 18 16:33:38 2024 +0000 net: hisilicon: hns: Remove unused hns_dsaf_roce_reset hns_dsaf_roce_reset() has been unused since 2021's commit 38d220882426 ("RDMA/hns: Remove support for HIP06") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Jijie Shao<shaojijie@huawei.com> Link: https://patch.msgid.link/20241218163341.40297-2-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 109 --------------------- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h | 2 - 2 files changed, 111 deletions(-) commit d8cc6da4067b66f5fe54b865ae4ed987455d91fc Author: Namhyung Kim <namhyung@kernel.org> Date: Thu Dec 19 22:00:06 2024 -0800 perf lock contention: Add and use LCB_F_TYPE_MASK This is a preparation for the later change. It'll use more bits in the flags so let's rename the type part and use the mask to extract the type. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: Chun-Tse Shao <ctshao@google.com> Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Kees Cook <kees@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Roman Gushchin <roman.gushchin@linux.dev> Cc: Song Liu <song@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Link: https://lore.kernel.org/r/20241220060009.507297-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-lock.c | 4 ++-- tools/perf/util/bpf_skel/lock_data.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) commit efff5add204fd30c4f1707a87369e00704721315 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Fri Dec 20 16:10:28 2024 -0300 perf script: Cache the output type Right now every time we need to figure out the type of an evsel for output purposes we do a quick sequence of ifs, but there are new cases where there is a need to do more complex iterations over multiple data structures, sso allow for caching this operation on a hole of 'struct evsel'. This should really be done on the evsel->priv area that 'perf script' sets up, but more work is needed to make sure that it is allocated when we need it, right now it is only used for conditionally, add some comments so that we move this to that 'perf script' specific area when the conditions are in place for that. Acked-by: Thomas Falcon <thomas.falcon@intel.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ravi Bangoria <ravi.bangoria@amd.com> Link: https://lore.kernel.org/lkml/Z2XCi3PgstSrV0SE@x1 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-script.c | 91 ++++++++++++++++++++++++--------------------- tools/perf/util/evsel.c | 1 + tools/perf/util/evsel.h | 1 + 3 files changed, 51 insertions(+), 42 deletions(-) commit 2f12e9c029315c1400059b2e7fdf53117c09c3a9 Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Thu Dec 19 18:55:36 2024 -0500 drm/xe/dg1: Fix power gate sequence. sub-pipe PG is not present on DG1. Setting these bits can disable other power gates and cause GPU hangs on video playbacks. VLK: 16314, 4304 Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13381 Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241219235536.454270-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/xe_gt_idle.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit fba32c5d5042ccb3f2f6a8abea35fdf0e1958e0b Author: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Date: Wed Dec 18 17:09:24 2024 -0800 drm/xe/gsc: Make GSCCS disabling message less alarming The GSCCS is only used to transport messages from the driver to the GSC FW; therefore, we can disable it if we're not using the FW, which is the case on both BMG and PTL. However, the current wording of the logged message could be interpreted as a problem, so reword to make it clearer it is not an error and lower it debug verbosity as users don't really need to know about it. Reported-by: Eero Tamminen <eero.t.tamminen@intel.com> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3866 Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241219010924.2466333-1-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/xe_hw_engine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2eedadf19979109415928f5ea9ba9a73262aa8f Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Tue Dec 17 18:05:47 2024 -0500 drm/xe/pm: Also avoid missing outer rpm warning on system suspend Fix the false-positive "Missing outer runtime PM protection" warning triggered by release_async_domains() -> intel_runtime_pm_get_noresume() -> xe_pm_runtime_get_noresume() during system suspend. xe_pm_runtime_get_noresume() is supposed to warn if the device is not in the runtime resumed state, using xe_pm_runtime_get_if_in_use() for this. However the latter function will fail if called during runtime or system suspend/resume, regardless of whether the device is runtime resumed or not. Based on the above suppress the warning during system suspend/resume, similarly to how this is done during runtime suspend/resume. Suggested-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217230547.1667561-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/xe_pm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ab09c6cfe01b317f515bcd944668697241a54b9d Author: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Sat Dec 14 23:55:50 2024 +0100 iio: light: as73211: fix channel handling in only-color triggered buffer The channel index is off by one unit if AS73211_SCAN_MASK_ALL is not set (optimized path for color channel readings), and it must be shifted instead of leaving an empty channel for the temperature when it is off. Once the channel index is fixed, the uninitialized channel must be set to zero to avoid pushing uninitialized data. Add available_scan_masks for all channels and only-color channels to let the IIO core demux and repack the enabled channels. Cc: stable@vger.kernel.org Fixes: 403e5586b52e ("iio: light: as73211: New driver") Tested-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20241214-iio_memset_scan_holes-v4-1-260b395b8ed5@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/light/as73211.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit c969c1e56264ecb14a3f92ae53d096f1bbee7f3b Author: Axel Haslam <ahaslam@baylibre.com> Date: Wed Nov 6 11:38:24 2024 +0100 dt-bindings: iio: dac: ad5791: ldac gpio is active low On the example, the ldac gpio is flagged as active high, when in reality its an active low gpio. Fix the example by using the active low flag for the ldac gpio. Fixes: baaa92d284d5 ("dt-bindings: iio: dac: ad5791: Add optional reset, clr and ldac gpios") Signed-off-by: Axel Haslam <ahaslam@baylibre.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20241106103824.579292-1-ahaslam@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c45633c3210730ca938772f3f450df6fff82b11 Author: Ricardo Ribalda <ribalda@chromium.org> Date: Fri Nov 22 17:36:52 2024 +0000 iio: hid-sensor-prox: Fix invalid read_raw for attention The attention channel is a IIO_CHAN_INFO_PROCESSED, not a IIO_CHAN_INFO_RAW. Modify prox_read_raw() to support it. Fixes: 596ef5cf654b ("iio: hid-sensor-prox: Add support for more channels") Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://patch.msgid.link/20241122-fix-processed-v2-1-b9f606d3b519@chromium.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/light/hid-sensor-prox.c | 1 + 1 file changed, 1 insertion(+) commit 954c06ddabb0d02bedd7a99a59fcc09173087eee Author: Guillaume Stols <gstols@baylibre.com> Date: Tue Dec 10 10:46:41 2024 +0000 iio: adc: ad7606: Fix hardcoded offset in the ADC channels When introducing num_adc_channels, I overlooked some new functions created in a meanwhile that had also the hardcoded offset. This commit adds the new logic to these functions. Fixes: ef67f16e365c ("iio: adc: ad7606: Introduce num_adc_channels") Signed-off-by: Guillaume Stols <gstols@baylibre.com> Link: https://patch.msgid.link/20241210-ad7606_add_iio_backend_software_mode-v2-1-6619c3e50d81@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad7606.c | 48 ++++++++++++++++++++++++++++-------------------- drivers/iio/adc/ad7606.h | 2 +- 2 files changed, 29 insertions(+), 21 deletions(-) commit de7061947b4ed4be857d452c60d5fb795831d79e Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Thu Dec 19 16:00:19 2024 -0500 drm/i915/dg1: Fix power gate sequence. sub-pipe PG is not present on DG1. Setting these bits can disable other power gates and cause GPU hangs on video playbacks. VLK: 16314, 4304 Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13381 Fixes: 85a12d7eb8fe ("drm/i915/tgl: Fix Media power gate sequence.") Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241219210019.70532-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/i915/gt/intel_rc6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 300d7208ed783df828d26196f0105853811f4af1 Author: Andre Przywara <andre.przywara@arm.com> Date: Sun Dec 15 21:25:33 2024 +0000 arm64: dts: allwinner: h313: enable DVFS for Tanix TX1 The merging of the Tanix TX1 .dts file overlapped with the introduction of the CPU OPP .dtsi file, so the TX1 wasn't covered by the patch enabling DVFS for all boards. Add the missing include of that OPP .dtsi file, to allow the box to run at up to 1.3GHz, and enable power saving by using lower OPPs. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Link: https://patch.msgid.link/20241215212533.12707-1-andre.przywara@arm.com Signed-off-by: Chen-Yu Tsai <wens@csie.org> arch/arm64/boot/dts/allwinner/sun50i-h313-tanix-tx1.dts | 1 + 1 file changed, 1 insertion(+) commit 6bde14ba5f7ef59e103ac317df6cc5ac4291ff4a Author: LECOINTRE Philippe <philippe.lecointre@thalesgroup.com> Date: Tue Dec 17 11:36:11 2024 +0000 drm/etnaviv: add optional reset support Add optional reset support which is mentioned in vivante,gc.yaml to allow the driver to work on SoCs whose reset signal is asserted by default Signed-off-by: Philippe Lecointre <philippe.lecointre@thalesgroup.com> Acked-by: Simon Lenain <simon.lenain@thalesgroup.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 41 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 2 ++ 2 files changed, 43 insertions(+) commit 4c44b450c69b676955c2790dcf467c1f969d80f1 Author: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Date: Wed Dec 18 14:12:38 2024 +0100 ixgbevf: Add support for Intel(R) E610 device Add support for Intel(R) E610 Series of network devices. The E610 is based on X550 but adds firmware managed link, enhanced security capabilities and support for updated server manageability Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Rafal Romanowski <rafal.romanowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> drivers/net/ethernet/intel/ixgbevf/defines.h | 5 ++++- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 6 +++++- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 12 ++++++++++-- drivers/net/ethernet/intel/ixgbevf/vf.c | 12 +++++++++++- drivers/net/ethernet/intel/ixgbevf/vf.h | 4 +++- 5 files changed, 33 insertions(+), 6 deletions(-) commit 208fff3f567e2a3c3e7e4788845e90245c3891b4 Author: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Date: Wed Dec 18 14:12:37 2024 +0100 PCI: Add PCI_VDEVICE_SUB helper macro PCI_VDEVICE_SUB generates the pci_device_id struct layout for the specific PCI device/subdevice. Private data may follow the output. Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Tested-by: Rafal Romanowski <rafal.romanowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> include/linux/pci.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 4600cdf9f5aca3d2559d858c414e09cf64370da1 Author: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Date: Thu Dec 5 09:44:50 2024 +0100 ixgbe: Enable link management in E610 device Add high level link management support for E610 device. Enable the following features: - driver load - bring up network interface - IP address assignment - pass traffic - show statistics (e.g. via ethtool) - disable network interface - driver unload Co-developed-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Co-developed-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com> Reviewed-by: Jan Glaza <jan.glaza@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Bharath R <bharath.r@intel.com> Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> drivers/net/ethernet/intel/ixgbe/ixgbe.h | 13 +- drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 3 +- drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 19 +- drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | 3 +- drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 165 +++++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 6 +- drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 3 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 414 ++++++++++++++++++++++- drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c | 4 +- drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 5 +- drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | 12 +- drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 21 +- drivers/net/ethernet/intel/ixgbe/ixgbe_x550.h | 20 ++ 14 files changed, 659 insertions(+), 30 deletions(-) commit 34b41577077198953e156f5e4bf8cdf734485e1f Author: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Date: Thu Dec 5 09:44:49 2024 +0100 ixgbe: Clean up the E610 link management related code Required for enabling the link management in E610 device. Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Bharath R <bharath.r@intel.com> Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 17 +++++++++++------ drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 12 ++++++------ 2 files changed, 17 insertions(+), 12 deletions(-) commit a0834bd521eaf1f2014041a8ad5a0cb233ac4fda Author: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Date: Thu Dec 5 09:44:48 2024 +0100 ixgbe: Add ixgbe_x540 multiple header inclusion protection Required to adopt x540 specific functions by E610 device. Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Bharath R <bharath.r@intel.com> Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> drivers/net/ethernet/intel/ixgbe/ixgbe_x540.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit e5b132b4f4d97a4737d152df0f97906e542be7ee Author: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Date: Thu Dec 5 09:44:47 2024 +0100 ixgbe: Add support for EEPROM dump in E610 device Add low level support for EEPROM dump for the specified network device. Co-developed-by: Stefan Wegrzyn <stefan.wegrzyn@intel.com> Signed-off-by: Stefan Wegrzyn <stefan.wegrzyn@intel.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Bharath R <bharath.r@intel.com> Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 95 ++++++++++++++++++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h | 5 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.h | 7 ++ 3 files changed, 107 insertions(+) commit d2483ebc9deb9de23fd85a2a45f9073ec9101f36 Author: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Date: Thu Dec 5 09:44:46 2024 +0100 ixgbe: Add support for NVM handling in E610 device Add low level support for accessing NVM in E610 device. NVM operations are handled via the Admin Command Interface. Add the following NVM specific operations: - acquire, release, read - validate checksum - read shadow ram Co-developed-by: Stefan Wegrzyn <stefan.wegrzyn@intel.com> Signed-off-by: Stefan Wegrzyn <stefan.wegrzyn@intel.com> Co-developed-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Bharath R <bharath.r@intel.com> Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 291 ++++++++++++++++++++++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h | 12 ++ 2 files changed, 303 insertions(+) commit 23c0e5a16bccd120caf1e7a9bfdf002fea107fa8 Author: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Date: Thu Dec 5 09:44:45 2024 +0100 ixgbe: Add link management support for E610 device Add low level link management support for E610 device. Link management operations are handled via the Admin Command Interface. Add the following link management operations: - get link capabilities - set up link - get media type - get link status, link status events - link power management Co-developed-by: Stefan Wegrzyn <stefan.wegrzyn@intel.com> Signed-off-by: Stefan Wegrzyn <stefan.wegrzyn@intel.com> Co-developed-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com> Reviewed-by: Jan Glaza <jan.glaza@intel.com> Tested-by: Bharath R <bharath.r@intel.com> Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 1081 ++++++++++++++++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h | 32 + drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.h | 1 + 3 files changed, 1114 insertions(+) commit 7c3aa0fccb1944921f13a6e0084d3aa070b4ff7b Author: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Date: Thu Dec 5 09:44:44 2024 +0100 ixgbe: Add support for E610 device capabilities detection Add low level support for E610 device capabilities detection. The capabilities are discovered via the Admin Command Interface. Discover the following capabilities: - function caps: vmdq, dcb, rss, rx/tx qs, msix, nvm, orom, reset - device caps: vsi, fdir, 1588 - phy caps Co-developed-by: Stefan Wegrzyn <stefan.wegrzyn@intel.com> Signed-off-by: Stefan Wegrzyn <stefan.wegrzyn@intel.com> Co-developed-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com> Reviewed-by: Jan Sokolowski <jan.sokolowski@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Bharath R <bharath.r@intel.com> Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 529 ++++++++++++++++++++++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h | 12 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 + 3 files changed, 548 insertions(+) commit 46761fd52a8868a1420f75b675caf209793b8dd1 Author: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Date: Thu Dec 5 09:44:43 2024 +0100 ixgbe: Add support for E610 FW Admin Command Interface Add low level support for Admin Command Interface (ACI). ACI is the Firmware interface used by a driver to communicate with E610 adapter. Add the following ACI features: - data structures, macros, register definitions - commands handling - events handling Co-developed-by: Stefan Wegrzyn <stefan.wegrzyn@intel.com> Signed-off-by: Stefan Wegrzyn <stefan.wegrzyn@intel.com> Co-developed-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Bharath R <bharath.r@intel.com> Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> drivers/net/ethernet/intel/ixgbe/Makefile | 4 +- drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 6 +- drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 497 +++++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h | 19 + drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 72 +- drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.h | 1066 ++++++++++++++++++++ 6 files changed, 1657 insertions(+), 7 deletions(-) commit 2981c62fb6542cf84e5e5eabb40949cd2d038603 Merge: 160825131614 a40f02b2923b Author: Arnd Bergmann <arnd@arndb.de> Date: Fri Dec 20 17:58:39 2024 +0100 Merge tag 'renesas-arm-defconfig-for-v6.14-tag1' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/defconfig Renesas ARM defconfig updates for v6.14 - Enable Watchdog support for the RZ/V2H(P) SoC and the RZ/V2H EVK board in the ARM64 defconfig, - Refresh shmobile_defconfig for v6.13-rc1, - Enable support for the Renesas RZ/G3E (R9A09G047) SoC in the ARM64 defconfig. * tag 'renesas-arm-defconfig-for-v6.14-tag1' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: defconfig: Enable R9A09G047 SoC ARM: shmobile: defconfig: Refresh for v6.13-rc1 arm64: defconfig: Enable Renesas RZ/V2H(P) Watchdog driver Link: https://lore.kernel.org/r/cover.1734689799.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann <arnd@arndb.de> commit c5d2bac978c513e1f22273cba9c55db3778032e5 Author: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr> Date: Wed Dec 11 22:57:29 2024 +0100 selftests/bpf: Clear out Python syntax warnings Invalid escape sequences are used, and produced syntax warnings: $ test_bpftool_synctypes.py test_bpftool_synctypes.py:69: SyntaxWarning: invalid escape sequence '\[' self.start_marker = re.compile(f'(static )?const bool {self.array_name}\[.*\] = {{\n') test_bpftool_synctypes.py:83: SyntaxWarning: invalid escape sequence '\[' pattern = re.compile('\[(BPF_\w*)\]\s*= (true|false),?$') test_bpftool_synctypes.py:181: SyntaxWarning: invalid escape sequence '\s' pattern = re.compile('^\s*(BPF_\w+),?(\s+/\*.*\*/)?$') test_bpftool_synctypes.py:229: SyntaxWarning: invalid escape sequence '\*' start_marker = re.compile(f'\*{block_name}\* := {{') test_bpftool_synctypes.py:229: SyntaxWarning: invalid escape sequence '\*' start_marker = re.compile(f'\*{block_name}\* := {{') test_bpftool_synctypes.py:230: SyntaxWarning: invalid escape sequence '\*' pattern = re.compile('\*\*([\w/-]+)\*\*') test_bpftool_synctypes.py:248: SyntaxWarning: invalid escape sequence '\s' start_marker = re.compile(f'"\s*{block_name} := {{') test_bpftool_synctypes.py:249: SyntaxWarning: invalid escape sequence '\w' pattern = re.compile('([\w/]+) [|}]') test_bpftool_synctypes.py:267: SyntaxWarning: invalid escape sequence '\s' start_marker = re.compile(f'"\s*{macro}\s*" [|}}]') test_bpftool_synctypes.py:267: SyntaxWarning: invalid escape sequence '\s' start_marker = re.compile(f'"\s*{macro}\s*" [|}}]') test_bpftool_synctypes.py:268: SyntaxWarning: invalid escape sequence '\w' pattern = re.compile('([\w-]+) ?(?:\||}[ }\]])') test_bpftool_synctypes.py:287: SyntaxWarning: invalid escape sequence '\w' pattern = re.compile('(?:.*=\')?([\w/]+)') test_bpftool_synctypes.py:319: SyntaxWarning: invalid escape sequence '\w' pattern = re.compile('([\w-]+) ?(?:\||}[ }\]"])') test_bpftool_synctypes.py:341: SyntaxWarning: invalid escape sequence '\|' start_marker = re.compile('\|COMMON_OPTIONS\| replace:: {') test_bpftool_synctypes.py:342: SyntaxWarning: invalid escape sequence '\*' pattern = re.compile('\*\*([\w/-]+)\*\*') Escaping them clears out the warnings. $ tools/testing/selftests/bpf/test_bpftool_synctypes.py; echo $? 0 Signed-off-by: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Tested-by: Quentin Monnet <qmo@kernel.org> Reviewed-by: Quentin Monnet <qmo@kernel.org> Link: https://docs.python.org/3/library/re.html Link: https://lore.kernel.org/bpf/20241211220012.714055-2-ariel.otilibili-anieli@eurecom.fr .../selftests/bpf/test_bpftool_synctypes.py | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 220fcc13c0937d7e2b5d0cbfcfa1d45f0d7d896a Merge: fac04efc5c79 12e0bd600e3c Author: Arnd Bergmann <arnd@arndb.de> Date: Fri Dec 20 17:48:32 2024 +0100 Merge tag 'renesas-drivers-for-v6.14-tag1' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers Renesas driver updates for v6.14 - Initial support for the Renesas RZ/G3E (R9A09G047) SoC. * tag 'renesas-drivers-for-v6.14-tag1' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: Add RZ/G3E (R9A09G047) config option Link: https://lore.kernel.org/r/cover.1734689801.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann <arnd@arndb.de> commit 45b177c3fe0210e0b113f55d8d4e1fe9c7d02e34 Merge: 2b3f2a149659 acb247afab5b Author: Arnd Bergmann <arnd@arndb.de> Date: Fri Dec 20 17:45:12 2024 +0100 Merge tag 'renesas-dts-for-v6.14-tag1' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DTS updates for v6.14 - Add more serial (SCIF), power monitor, ADC, and sound support for the RZ/G3S SoC and the RZ/G3S SMARC SoM and development board, - Add support for the R-Car V4H ES3.0 (R8A779G3) SoC on the White Hawk Single development board, - Add display support for the R-Car V4M SoC and the Gray Hawk Single development board, - Add video capture support for the Gray Hawk Single development board, - Add initial support for the RZ/G3E (R9A09G047) SoC and the RZ/G3E SMARC SoM and Carrier-II EVK development board, - Add support for 5-port MATEnet on the Falcon Ethernet sub-board, - Miscellaneous fixes and improvements. * tag 'renesas-dts-for-v6.14-tag1' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (33 commits) arm64: dts: renesas: r9a09g047: Add I2C nodes arm64: dts: renesas: rzg3s-smarc: Add sound card arm64: dts: renesas: rzg3s-smarc: Enable SSI3 arm64: dts: renesas: Add da7212 audio codec node arm64: dts: renesas: rzg3s-smarc-som: Add versa3 clock generator node arm64: dts: renesas: r9a08g045: Add SSI nodes arm64: dts: renesas: rzg3s-smarc-som: Enable ADC arm64: dts: renesas: r9a08g045: Add ADC node arm64: dts: renesas: Add initial device tree for RZ/G3E SMARC EVK board arm64: dts: renesas: Add initial support for RZ/G3E SMARC SoM arm64: dts: renesas: r9a09g047: Add OPP table arm64: dts: renesas: Add initial DTSI for RZ/G3E SoC arm64: dts: renesas: falcon-ethernet: Describe PHYs connected on the breakout board arm64: dts: renesas: r8a779a0: Remove address- and size-cells from AVB[1-5] dt-bindings: clock: renesas: Document RZ/G3E SoC CPG dt-bindings: soc: renesas: Document RZ/G3E SMARC SoM and Carrier-II EVK dt-bindings: soc: renesas: Document Renesas RZ/G3E SoC variants arm64: dts: renesas: gray-hawk-single: Add video capture support arm64: dts: renesas: gray-hawk-single: Add DisplayPort support arm64: dts: renesas: r8a779h0: Add display support ... Link: https://lore.kernel.org/r/cover.1734689803.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann <arnd@arndb.de> commit e62fedef0aa51134b6848951dcd007fd9338705a Author: Danilo Krummrich <dakr@kernel.org> Date: Thu Dec 19 18:04:18 2024 +0100 MAINTAINERS: add Danilo to DRIVER CORE Let's keep an eye on the Rust abstractions; add myself as reviewer to DRIVER CORE. Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Tested-by: Fabien Parent <fabien.parent@linaro.org> Link: https://lore.kernel.org/r/20241219170425.12036-17-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit b2e8a83242c0b8d5d382a1aeceed18aa9bcb9a00 Author: Danilo Krummrich <dakr@kernel.org> Date: Thu Dec 19 18:04:17 2024 +0100 samples: rust: add Rust platform sample driver Add a sample Rust platform driver illustrating the usage of the platform bus abstractions. This driver probes through either a match of device / driver name or a match within the OF ID table. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Tested-by: Fabien Parent <fabien.parent@linaro.org> Link: https://lore.kernel.org/r/20241219170425.12036-16-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 1 + drivers/of/unittest-data/tests-platform.dtsi | 5 +++ samples/rust/Kconfig | 10 ++++++ samples/rust/Makefile | 1 + samples/rust/rust_driver_platform.rs | 49 ++++++++++++++++++++++++++++ 5 files changed, 66 insertions(+) commit 2b3f2a1496591e5ba56574d88fea143830c867e3 Merge: b589fbc3f413 8df9bff27889 Author: Arnd Bergmann <arnd@arndb.de> Date: Fri Dec 20 17:40:06 2024 +0100 Merge tag 'stm32-dt-for-v6.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into soc/dt STM32 DT for v6.14, round 1 Highlights: ---------- - MPU: - STM32MP13: - Populate all timer counter nodes in Soc file. - Enable counter (timers) on stm32mp135f-dk. - DH core: increase CPU voltage to fit with STM32MP135F datasheet. - STMP32MP15: - Populate all timer counter nodes in Soc file. - Enable counter (timers) on stm32mp15 EV1 and DK boards. - OCTAVO: - LXA-TAC (gen1/2): disable RTC, update aliases and adjust USB gadget. - Add LXA-TAC gen3 based on OSD32MP153x SIP: STMP32MP153, RAM, PMIC. - DH: minor fixes. - STM32MP25: - Enable imx335/CSI/DCMIPP pipeline on stm32mp257f-ev1. - Add I2S, SAI, SPDIFRX supports. - Add and enable COMBOPHY on stm32mp257f-ev1. Combophy is used by PCIe and USB3. * tag 'stm32-dt-for-v6.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: (23 commits) arm64: dts: st: enable imx335/csi/dcmipp pipeline on stm32mp257f-ev1 arm64: dts: st: add csi & dcmipp node in stm32mp25 ARM: dts: stm32: Swap USART3 and UART8 alias on STM32MP15xx DHCOM SoM ARM: dts: stm32: add counter subnodes on stm32mp157 dk boards ARM: dts: stm32: add counter subnodes on stm32mp157c-ev1 ARM: dts: stm32: add counter subnodes on stm32mp135f-dk ARM: dts: stm32: populate all timer counter nodes on stm32mp15 ARM: dts: stm32: populate all timer counter nodes on stm32mp13 ARM: dts: stm32: lxa-tac: Add support for generation 3 devices ARM: dts: stm32: lxa-tac: move adc and gpio{e,g} to gen{1,2} boards dt-bindings: arm: stm32: add compatible strings for Linux Automation LXA TAC gen 3 ARM: dts: stm32: lxa-tac: adjust USB gadget fifo sizes for multi function ARM: dts: stm32: lxa-tac: extend the alias table ARM: dts: stm32: lxa-tac: disable the real time clock ARM: dts: stm32: Fix IPCC EXTI declaration on stm32mp151 ARM: dts: stm32: Sort M24256E write-lockable page in DH STM32MP13xx DHCOR SoM DT ARM: dts: stm32: Increase CPU core voltage on STM32MP13xx DHCOR SoM ARM: dts: stm32: Deduplicate serial aliases and chosen node for STM32MP15xx DHCOM SoM arm64: dts: st: Enable COMBOPHY on the stm32mp257f-ev1 board arm64: dts: st: Add combophy node on stm32mp251 ... Link: https://lore.kernel.org/r/7ffcca65-3953-413a-bcf3-0702a6b0518b@foss.st.com Signed-off-by: Arnd Bergmann <arnd@arndb.de> commit 683a63befc7385bf7f19ba30fc0b4b14961114c5 Author: Danilo Krummrich <dakr@kernel.org> Date: Thu Dec 19 18:04:16 2024 +0100 rust: platform: add basic platform device / driver abstractions Implement the basic platform bus abstractions required to write a basic platform driver. This includes the following data structures: The `platform::Driver` trait represents the interface to the driver and provides `platform::Driver::probe` for the driver to implement. The `platform::Device` abstraction represents a `struct platform_device`. In order to provide the platform bus specific parts to a generic `driver::Registration` the `driver::RegistrationOps` trait is implemented by `platform::Adapter`. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Link: https://lore.kernel.org/r/20241219170425.12036-15-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 1 + rust/bindings/bindings_helper.h | 1 + rust/helpers/helpers.c | 1 + rust/helpers/platform.c | 13 +++ rust/kernel/lib.rs | 1 + rust/kernel/platform.rs | 198 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 215 insertions(+) commit 7a718a1f26d1697465f0f4e402a69e29d6c4dd33 Author: Danilo Krummrich <dakr@kernel.org> Date: Thu Dec 19 18:04:15 2024 +0100 rust: driver: implement `Adapter` In order to not duplicate code in bus specific implementations (e.g. platform), implement a generic `driver::Adapter` to represent the connection of matched drivers and devices. Bus specific `Adapter` implementations can simply implement this trait to inherit generic functionality, such as matching OF or ACPI device IDs and ID table entries. Suggested-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Link: https://lore.kernel.org/r/20241219170425.12036-14-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> rust/bindings/bindings_helper.h | 1 + rust/kernel/driver.rs | 58 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 1 deletion(-) commit bbe3b4d1580dac8ea0e1451e38d1be9590a89ddc Author: Danilo Krummrich <dakr@kernel.org> Date: Thu Dec 19 18:04:14 2024 +0100 rust: of: add `of::DeviceId` abstraction `of::DeviceId` is an abstraction around `struct of_device_id`. This is used by subsequent patches, in particular the platform bus abstractions, to create OF device ID tables. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Tested-by: Fabien Parent <fabien.parent@linaro.org> Link: https://lore.kernel.org/r/20241219170425.12036-13-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 1 + rust/kernel/lib.rs | 1 + rust/kernel/of.rs | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+) commit 685376d18e9ae2f08ab6ac36285dc3a949c8cb77 Author: Danilo Krummrich <dakr@kernel.org> Date: Thu Dec 19 18:04:13 2024 +0100 samples: rust: add Rust PCI sample driver This commit adds a sample Rust PCI driver for QEMU's "pci-testdev" device. To enable this device QEMU has to be called with `-device pci-testdev`. The same driver shows how to use the PCI device / driver abstractions, as well as how to request and map PCI BARs, including a short sequence of MMIO operations. Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Link: https://lore.kernel.org/r/20241219170425.12036-12-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 1 + samples/rust/Kconfig | 11 ++++ samples/rust/Makefile | 1 + samples/rust/rust_driver_pci.rs | 110 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 123 insertions(+) commit bf9651f84b4e49ca006fd8b5534f16a38dae875c Author: Danilo Krummrich <dakr@kernel.org> Date: Thu Dec 19 18:04:12 2024 +0100 rust: pci: implement I/O mappable `pci::Bar` Implement `pci::Bar`, `pci::Device::iomap_region` and `pci::Device::iomap_region_sized` to allow for I/O mappings of PCI BARs. To ensure that a `pci::Bar`, and hence the I/O memory mapping, can't out-live the PCI device, the `pci::Bar` type is always embedded into a `Devres` container, such that the `pci::Bar` is revoked once the device is unbound and hence the I/O mapped memory is unmapped. A `pci::Bar` can be requested with (`pci::Device::iomap_region_sized`) or without (`pci::Device::iomap_region`) a const generic representing the minimal requested size of the I/O mapped memory region. In case of the latter only runtime checked I/O reads / writes are possible. Co-developed-by: Philipp Stanner <pstanner@redhat.com> Signed-off-by: Philipp Stanner <pstanner@redhat.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Link: https://lore.kernel.org/r/20241219170425.12036-11-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> rust/kernel/pci.rs | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 141 insertions(+), 1 deletion(-) commit 1bd8b6b2c5d38d9881d59928b986eacba40f9da8 Author: Danilo Krummrich <dakr@kernel.org> Date: Thu Dec 19 18:04:11 2024 +0100 rust: pci: add basic PCI device / driver abstractions Implement the basic PCI abstractions required to write a basic PCI driver. This includes the following data structures: The `pci::Driver` trait represents the interface to the driver and provides `pci::Driver::probe` for the driver to implement. The `pci::Device` abstraction represents a `struct pci_dev` and provides abstractions for common functions, such as `pci::Device::set_master`. In order to provide the PCI specific parts to a generic `driver::Registration` the `driver::RegistrationOps` trait is implemented by `pci::Adapter`. `pci::DeviceId` implements PCI device IDs based on the generic `device_id::RawDevceId` abstraction. Co-developed-by: FUJITA Tomonori <fujita.tomonori@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Link: https://lore.kernel.org/r/20241219170425.12036-10-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 1 + rust/bindings/bindings_helper.h | 1 + rust/helpers/helpers.c | 1 + rust/helpers/pci.c | 18 +++ rust/kernel/lib.rs | 2 + rust/kernel/pci.rs | 292 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 315 insertions(+) commit 76c01ded724bfb464878e22c89f7ecce26f5d50e Author: Danilo Krummrich <dakr@kernel.org> Date: Thu Dec 19 18:04:10 2024 +0100 rust: add devres abstraction Add a Rust abstraction for the kernel's devres (device resource management) implementation. The Devres type acts as a container to manage the lifetime and accessibility of device bound resources. Therefore it registers a devres callback and revokes access to the resource on invocation. Users of the Devres abstraction can simply free the corresponding resources in their Drop implementation, which is invoked when either the Devres instance goes out of scope or the devres callback leads to the resource being revoked, which implies a call to drop_in_place(). Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Link: https://lore.kernel.org/r/20241219170425.12036-9-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 1 + rust/helpers/device.c | 10 +++ rust/helpers/helpers.c | 1 + rust/kernel/devres.rs | 178 +++++++++++++++++++++++++++++++++++++++++++++++++ rust/kernel/lib.rs | 1 + 5 files changed, 191 insertions(+) commit ce30d94e6855a4f6dc687f658e63c225fcc1d690 Author: Danilo Krummrich <dakr@kernel.org> Date: Thu Dec 19 18:04:09 2024 +0100 rust: add `io::{Io, IoRaw}` base types I/O memory is typically either mapped through direct calls to ioremap() or subsystem / bus specific ones such as pci_iomap(). Even though subsystem / bus specific functions to map I/O memory are based on ioremap() / iounmap() it is not desirable to re-implement them in Rust. Instead, implement a base type for I/O mapped memory, which generically provides the corresponding accessors, such as `Io::readb` or `Io:try_readb`. `Io` supports an optional const generic, such that a driver can indicate the minimal expected and required size of the mapping at compile time. Correspondingly, calls to the 'non-try' accessors, support compile time checks of the I/O memory offset to read / write, while the 'try' accessors, provide boundary checks on runtime. `IoRaw` is meant to be embedded into a structure (e.g. pci::Bar or io::IoMem) which creates the actual I/O memory mapping and initializes `IoRaw` accordingly. To ensure that I/O mapped memory can't out-live the device it may be bound to, subsystems must embed the corresponding I/O memory type (e.g. pci::Bar) into a `Devres` container, such that it gets revoked once the device is unbound. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Tested-by: Daniel Almeida <daniel.almeida@collabora.com> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Link: https://lore.kernel.org/r/20241219170425.12036-8-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> rust/helpers/helpers.c | 1 + rust/helpers/io.c | 101 +++++++++++++++++++ rust/kernel/io.rs | 260 +++++++++++++++++++++++++++++++++++++++++++++++++ rust/kernel/lib.rs | 1 + 4 files changed, 363 insertions(+) commit 0494d9c82b0c722d8ce2af7dc5f92be6aef4625b Author: Wedson Almeida Filho <wedsonaf@gmail.com> Date: Thu Dec 19 18:04:08 2024 +0100 rust: add `Revocable` type Revocable allows access to objects to be safely revoked at run time. This is useful, for example, for resources allocated during device probe; when the device is removed, the driver should stop accessing the device resources even if another state is kept in memory due to existing references (i.e., device context data is ref-counted and has a non-zero refcount after removal of the device). Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com> Co-developed-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Link: https://lore.kernel.org/r/20241219170425.12036-7-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> rust/kernel/lib.rs | 1 + rust/kernel/revocable.rs | 219 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 220 insertions(+) commit 2d3bf6ffe26439444b55dd5af7b06d1aca3a042d Author: Danilo Krummrich <dakr@kernel.org> Date: Thu Dec 19 18:04:07 2024 +0100 rust: types: add `Opaque::pin_init` Analogous to `Opaque::new` add `Opaque::pin_init`, which instead of a value `T` takes a `PinInit<T>` and returns a `PinInit<Opaque<T>>`. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Suggested-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Tested-by: Fabien Parent <fabien.parent@linaro.org> Link: https://lore.kernel.org/r/20241219170425.12036-6-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> rust/kernel/types.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 51158207294108898e5b72bb78fa51a7e848844f Author: Wedson Almeida Filho <wedsonaf@gmail.com> Date: Thu Dec 19 18:04:06 2024 +0100 rust: add rcu abstraction Add a simple abstraction to guard critical code sections with an rcu read lock. Reviewed-by: Boqun Feng <boqun.feng@gmail.com> Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com> Co-developed-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Tested-by: Fabien Parent <fabien.parent@linaro.org> Link: https://lore.kernel.org/r/20241219170425.12036-5-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 1 + rust/helpers/helpers.c | 1 + rust/helpers/rcu.c | 13 +++++++++++++ rust/kernel/sync.rs | 1 + rust/kernel/sync/rcu.rs | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 63 insertions(+) commit 9b90864bb42befdc10fa5c60dd1d8033c8535726 Author: Danilo Krummrich <dakr@kernel.org> Date: Thu Dec 19 18:04:05 2024 +0100 rust: implement `IdArray`, `IdTable` and `RawDeviceId` Most subsystems use some kind of ID to match devices and drivers. Hence, we have to provide Rust drivers an abstraction to register an ID table for the driver to match. Generally, those IDs are subsystem specific and hence need to be implemented by the corresponding subsystem. However, the `IdArray`, `IdTable` and `RawDeviceId` types provide a generalized implementation that makes the life of subsystems easier to do so. Co-developed-by: Wedson Almeida Filho <wedsonaf@gmail.com> Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com> Co-developed-by: Gary Guo <gary@garyguo.net> Signed-off-by: Gary Guo <gary@garyguo.net> Co-developed-by: Fabien Parent <fabien.parent@linaro.org> Signed-off-by: Fabien Parent <fabien.parent@linaro.org> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Tested-by: Fabien Parent <fabien.parent@linaro.org> Link: https://lore.kernel.org/r/20241219170425.12036-4-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 1 + rust/kernel/device_id.rs | 165 +++++++++++++++++++++++++++++++++++++++++++++++ rust/kernel/lib.rs | 6 ++ 3 files changed, 172 insertions(+) commit ea7e18289f44b0aa597026f16e7f4f6daa0f13ee Author: Danilo Krummrich <dakr@kernel.org> Date: Thu Dec 19 18:04:04 2024 +0100 rust: implement generic driver registration Implement the generic `Registration` type and the `RegistrationOps` trait. The `Registration` structure is the common type that represents a driver registration and is typically bound to the lifetime of a module. However, it doesn't implement actual calls to the kernel's driver core to register drivers itself. Instead the `RegistrationOps` trait is provided to subsystems, which have to implement `RegistrationOps::register` and `RegistrationOps::unregister`. Subsystems have to provide an implementation for both of those methods where the subsystem specific variants to register / unregister a driver have to implemented. For instance, the PCI subsystem would call __pci_register_driver() from `RegistrationOps::register` and pci_unregister_driver() from `DrvierOps::unregister`. Co-developed-by: Wedson Almeida Filho <wedsonaf@gmail.com> Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Tested-by: Fabien Parent <fabien.parent@linaro.org> Link: https://lore.kernel.org/r/20241219170425.12036-3-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 1 + rust/kernel/driver.rs | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++ rust/kernel/lib.rs | 1 + 3 files changed, 119 insertions(+) commit a790265c7f663c382ac25ecb841e241a023f0590 Author: Danilo Krummrich <dakr@kernel.org> Date: Thu Dec 19 18:04:03 2024 +0100 rust: module: add trait `ModuleMetadata` In order to access static metadata of a Rust kernel module, add the `ModuleMetadata` trait. In particular, this trait provides the name of a Rust kernel module as specified by the `module!` macro. Signed-off-by: Danilo Krummrich <dakr@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Tested-by: Fabien Parent <fabien.parent@linaro.org> Link: https://lore.kernel.org/r/20241219170425.12036-2-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> rust/kernel/lib.rs | 6 ++++++ rust/macros/module.rs | 4 ++++ 2 files changed, 10 insertions(+) commit 53c54d9b9379e2a3eaec015556a51e47957a8d92 Author: Cody Eksal <masterr3c0rd@epochal.quest> Date: Wed Dec 18 09:01:19 2024 -0400 arm64: dts: allwinner: a100: Add syscon nodes The Allwinner A100 has a system configuration block, denoted as SYS_CFG in the user manual's memory map. It is undocumented in the manual, but a glance at the vendor tree shows this block is similar to its predecessors in the A64 and H6. The A100 also has 3 SRAM blocks: A1, A2, and C. Add all of these to the SoC's device tree. Reviewed-by: Parthiban Nallathambi <parthiban@linumiz.com> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest> Link: https://patch.msgid.link/20241218-a100-syscon-v2-2-dae60b9ce192@epochal.quest Signed-off-by: Chen-Yu Tsai <wens@csie.org> arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 168b2b355f886db4230f10d24bc109b0b34c4708 Author: Cody Eksal <masterr3c0rd@epochal.quest> Date: Wed Dec 18 09:01:18 2024 -0400 dt-bindings: sram: sunxi-sram: Add A100 compatible The Allwinner A100 has a system configuration block similar to that of the A64 and H6. Add a compatible for it. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest> Link: https://patch.msgid.link/20241218-a100-syscon-v2-1-dae60b9ce192@epochal.quest Signed-off-by: Chen-Yu Tsai <wens@csie.org> .../devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6de02569a2bb678db04236fdf29814c0c27f5121 Author: John B. Wyatt IV <jwyatt@redhat.com> Date: Wed Dec 18 20:26:02 2024 -0500 pm: cpupower: Add install and uninstall options to bindings makefile Installs the .so and .py files generated by SWIG to system's site packages directory. This allows the Python bindings to be used system wide. This commit also includes documentation on setting up and installing the Python bindings. Link: https://lore.kernel.org/r/20241219012606.38963-1-jwyatt@redhat.com Signed-off-by: "John B. Wyatt IV" <jwyatt@redhat.com> Signed-off-by: "John B. Wyatt IV" <sageofredondo@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> tools/power/cpupower/bindings/python/Makefile | 10 ++++++++++ tools/power/cpupower/bindings/python/README | 25 +++++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit 8395d43949790f1671621975730a07c264ef3e6f Author: Mario Limonciello <mario.limonciello@amd.com> Date: Wed Dec 18 13:09:56 2024 -0600 cpupower: Adjust whitespace for amd-pstate specific prints The amd-pstate section is grouped under boost, which isn't appropriate. Adjust the indentation so that it is it's own section. Link: https://lore.kernel.org/r/20241218191144.3440854-8-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> tools/power/cpupower/utils/helpers/amd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit acf71265e4c0289e23ee1b66fc0977478edea9a5 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Wed Dec 18 13:09:55 2024 -0600 cpupower: Don't fetch maximum latency when EPP is enabled When EPP has been enabled the hardware will autonomously change frequencies on it's own and thus there is no latency with changing from the kernel. Avoid doing the maximum latency check when EPP is found. This will apply to both amd-pstate and intel-pstate drivers. Link: https://lore.kernel.org/r/20241218191144.3440854-7-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> tools/power/cpupower/utils/cpufreq-info.c | 3 +++ 1 file changed, 3 insertions(+) commit 5f567afc283fc9e7c6a34d013c4fc6c5e8d6afae Author: Mario Limonciello <mario.limonciello@amd.com> Date: Wed Dec 18 13:09:54 2024 -0600 cpupower: Add support for showing energy performance preference The EPP value is useful for characterization of performance. Show it in cpupower frequency-info output. Link: https://lore.kernel.org/r/20241218191144.3440854-6-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> tools/power/cpupower/lib/cpufreq.c | 14 ++++++++++++++ tools/power/cpupower/lib/cpufreq.h | 8 ++++++++ tools/power/cpupower/utils/cpufreq-info.c | 25 ++++++++++++++++++++++++- 3 files changed, 46 insertions(+), 1 deletion(-) commit 26e16174f54d40a3774614c4d43966572ed79dc1 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Wed Dec 18 13:09:53 2024 -0600 cpupower: Don't try to read frequency from hardware when kernel uses aperfmperf When the amd-pstate is in use frequency is set by the hardware and measured by the kernel through using the aperf and mperf registers. There is no direct call to the hardware to indicate current frequency. Detect that this feature is in use and skip the check. Link: https://lore.kernel.org/r/20241218191144.3440854-5-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> tools/power/cpupower/utils/cpufreq-info.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6d4a2987f96b9f281b07286eeb1d4022054e1ecd Author: Mario Limonciello <mario.limonciello@amd.com> Date: Wed Dec 18 13:09:52 2024 -0600 cpupower: Add support for amd-pstate preferred core rankings The rankings are useful information to determine if the scheduler is placing tasks appropriately for the hardware. Link: https://lore.kernel.org/r/20241218191144.3440854-4-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> tools/power/cpupower/utils/helpers/amd.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3f2eb7606eee37aea630c4b7aa42497bc36ca157 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Wed Dec 18 13:09:51 2024 -0600 cpupower: Add support for parsing 'enabled' or 'disabled' strings from table When cpufreq_get_sysfs_value_from_table() is passed a table with kernel strings that report 'enabled' or 'disabled' it always returns 0 because these can't cleanly convert to integers. Explicitly look for enabled or disabled strings from the kernel to handle this. Link: https://lore.kernel.org/r/20241218191144.3440854-3-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> tools/power/cpupower/lib/cpufreq.c | 4 ++++ 1 file changed, 4 insertions(+) commit dec2f97a1571ed28ddbadf4431afc5e5872a10df Author: Mario Limonciello <mario.limonciello@amd.com> Date: Wed Dec 18 13:09:50 2024 -0600 cpupower: Remove spurious return statement print_duration() has a return; statement at the end of the function that is not necessary as it's a void function. Link: https://lore.kernel.org/r/20241218191144.3440854-2-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> tools/power/cpupower/utils/cpufreq-info.c | 1 - 1 file changed, 1 deletion(-) commit 5d4db9cf4135d82634c7f31aac73081fba3a356e Author: Santosh Mahto <eisantosh95@gmail.com> Date: Thu Dec 12 21:51:04 2024 +0530 staging: gpib: Replace semaphore with completion for one-time signaling Replaced 'down_interruptible()' and 'up()' calls with 'wait_for_completion_interruptible()' and 'complete()' respectively. The completion API simplifies the code and adheres to kernel best practices for synchronization primitive Signed-off-by: Santosh Mahto <eisantosh95@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20241212162112.13083-1-eisantosh95@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/ni_usb/ni_usb_gpib.c | 16 ++++++++-------- drivers/staging/gpib/ni_usb/ni_usb_gpib.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) commit 716eefc88c2f784ef16395d6a3eea8670847bba4 Author: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com> Date: Wed Dec 11 20:26:40 2024 -0300 staging: rtl8723bs: delete HAL_DEF_DBG_RX_INFO_DUMP enum and caller After removing code isolated by DBG_RX_SIGNAL_DISPLAY_RAW_DATA cflag, HAL_DEF_DBG_RX_INFO_DUMP enum lost it's use. Removing the enum and the caller. Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20241211233415.37702-3-rodrigo.gobbi.7@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 1 - drivers/staging/rtl8723bs/hal/hal_com.c | 2 -- drivers/staging/rtl8723bs/include/hal_intf.h | 1 - 3 files changed, 4 deletions(-) commit 2bc2c3640039520d7cc0ea1e4c91fb0a8126fdda Author: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com> Date: Wed Dec 11 20:26:39 2024 -0300 staging: rtl8723bs: delete DBG_RX_SIGNAL_DISPLAY_RAW_DATA ifdef code remove code depending on cflag since it's not compiling and there is no reference for it's usage; Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20241211233415.37702-2-rodrigo.gobbi.7@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/rtl8723bs/hal/hal_com.c | 53 ------------------------- drivers/staging/rtl8723bs/hal/rtl8723b_rxdesc.c | 4 -- drivers/staging/rtl8723bs/include/hal_com.h | 5 --- drivers/staging/rtl8723bs/include/rtw_recv.h | 18 --------- 4 files changed, 80 deletions(-) commit a99e5c8853f4b018b003641ad532059169e271a5 Author: Chenguang Zhao <zhaochenguang@kylinos.cn> Date: Thu Dec 5 10:16:10 2024 +0800 staging: rtl8723bs: Cleanups for rtw_inc_and_chk_continual_io_error There's a warning when using checkpatch.pl check rtw_io.c: WARNING: Missing a blank line after declarations 146: FILE: drivers/staging/rtl8723bs/core/rtw_io.c:146: int value = atomic_inc_return(&dvobj->continual_io_error); if (value > MAX_CONTINUAL_IO_ERR) The patch fixes it. In addition, also rename 'value' variable to 'error_count' and drop 'ret' variable. Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20241205021610.523528-1-zhaochenguang@kylinos.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/rtl8723bs/core/rtw_io.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bc96dc1a1cdad999ccd84a7ea6d5e0926c26d8ce Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Thu Dec 19 23:55:26 2024 +0100 hwmon: (lm75) separate probe into common and I2C parts Put generic probe functionality into a separate function and let the I2C driver call it. This is a preparation for adding I3C support which will also use the generic probe function. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20241219225522.3490-11-wsa+renesas@sang-engineering.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/lm75.c | 68 +++++++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 30 deletions(-) commit 7a5c24da4b3c96949a6d93c3c7fa4133c6f2b88e Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Thu Dec 19 23:55:25 2024 +0100 hwmon: (lm75) Remove superfluous 'client' member from private struct The regmap-only conversion allows us to store the client-pointer as the 'context' parameter for regmap. This not only makes the private struct smaller, but also allows proper separation of I2C and I3C in the future. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20241219225522.3490-10-wsa+renesas@sang-engineering.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/lm75.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 2b64c6f652b0f5435b293d33f7d231132e987fb2 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Thu Dec 19 23:55:24 2024 +0100 hwmon: (lm75) simplify regulator handling devm_regulator_get_enable() was introduced exactly to avoid open coding regulator handling like in this driver. Make use of this helper. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20241219225522.3490-9-wsa+renesas@sang-engineering.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/lm75.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) commit c4d08cf8a03eb9b14858a9b8cf8f4d71a639da57 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Thu Dec 19 23:55:23 2024 +0100 hwmon: (lm75) simplify lm75_write_config() After previous refactoring, it is now possible to make lm75_write_config() a simple inline function. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20241219225522.3490-8-wsa+renesas@sang-engineering.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/lm75.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 6da24a25f766e02fbfc07570b5560154818ba59d Author: Guenter Roeck <linux@roeck-us.net> Date: Tue Dec 17 09:29:10 2024 -0800 hwmon: (lm75) Hide register size differences in regmap access functions Hide register size differences in regmap access functions to simplify runtime code and to simplify adding support for I3C devices. Also use regmap API functions for bit operations where possible. For this to work, the 16-bit and 8-bit configuration register has to be mapped to a 16-bit value. Unlike other registers, this register is a low-byte-first register, presumably for compatibility with chips with 8-bit wide configuration registers. Hide the differences in the regmap access code. While at it, enable alarm attribute support for TMP112. Cc: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/lm75.c | 131 ++++++++++++++++++++++++--------------------------- 1 file changed, 62 insertions(+), 69 deletions(-) commit 0e45818ec1896c2b4aee0ec6721022ad625ea531 Author: Kan Liang <kan.liang@linux.intel.com> Date: Wed Dec 11 08:03:17 2024 -0800 perf/x86/intel: Support RDPMC metrics clear mode The new RDPMC enhancement, metrics clear mode, is to clear the PERF_METRICS-related resources as well as the fixed-function performance monitoring counter 3 after the read is performed. It is available for ring 3. The feature is enumerated by the IA32_PERF_CAPABILITIES.RDPMC_CLEAR_METRICS[bit 19]. To enable the feature, the IA32_FIXED_CTR_CTRL.METRICS_CLEAR_EN[bit 14] must be set. Two ways were considered to enable the feature. - Expose a knob in the sysfs globally. One user may affect the measurement of other users when changing the knob. The solution is dropped. - Introduce a new event format, metrics_clear, for the slots event to disable/enable the feature only for the current process. Users can utilize the feature as needed. The latter solution is implemented in the patch. The current KVM doesn't support the perf metrics yet. For virtualization, the feature can be enabled later separately. Suggested-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Andi Kleen <ak@linux.intel.com> Reviewed-by: Ian Rogers <irogers@google.com> Link: https://lkml.kernel.org/r/20241211160318.235056-1-kan.liang@linux.intel.com arch/x86/events/intel/core.c | 20 +++++++++++++++++++- arch/x86/events/perf_event.h | 1 + arch/x86/include/asm/perf_event.h | 4 ++++ 3 files changed, 24 insertions(+), 1 deletion(-) commit abfdccd6af2b071951633e57d6322c46a1ea791f Author: John Stultz <jstultz@google.com> Date: Mon Dec 16 20:07:35 2024 -0800 sched/wake_q: Add helper to call wake_up_q after unlock with preemption disabled A common pattern seen when wake_qs are used to defer a wakeup until after a lock is released is something like: preempt_disable(); raw_spin_unlock(lock); wake_up_q(wake_q); preempt_enable(); So create some raw_spin_unlock*_wake() helper functions to clean this up. Applies on top of the fix I submitted here: https://lore.kernel.org/lkml/20241212222138.2400498-1-jstultz@google.com/ NOTE: I recognise the unlock()/unlock_irq()/unlock_irqrestore() variants creates its own duplication, which we could use a macro to generate the similar functions, but I often dislike how those generation macros making finding the actual implementation harder, so I left the three functions as is. If folks would prefer otherwise, let me know and I'll switch it. Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: John Stultz <jstultz@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20241217040803.243420-1-jstultz@google.com include/linux/sched/wake_q.h | 34 ++++++++++++++++++++++++++++++++++ kernel/futex/pi.c | 5 +---- kernel/locking/mutex.c | 16 ++++------------ kernel/locking/rtmutex.c | 32 +++++--------------------------- 4 files changed, 44 insertions(+), 43 deletions(-) commit c2db11a750fb626d0d04f2dc76e548a1f07617df Merge: 63a48181fbcd 4a0779145781 Author: Peter Zijlstra <peterz@infradead.org> Date: Fri Dec 20 15:31:19 2024 +0100 Merge branch 'locking/urgent' Sync with urgent -- avoid conflicts. Signed-off-by: Peter Zijlstra <peterz@infradead.org> commit 7c8cd569ff66755f17b0c0c03a9d8df1b6f3e9ed Author: Swapnil Sapkal <swapnil.sapkal@amd.com> Date: Fri Dec 20 06:32:24 2024 +0000 docs: Update Schedstat version to 17 Update the Schedstat version to 17 as more fields are added to report different kinds of imbalances in the sched domain. Also domain field started printing corresponding domain name. Signed-off-by: Swapnil Sapkal <swapnil.sapkal@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20241220063224.17767-7-swapnil.sapkal@amd.com Documentation/scheduler/sched-stats.rst | 126 +++++++++++++++++++------------- kernel/sched/stats.c | 2 +- 2 files changed, 76 insertions(+), 52 deletions(-) commit 011b3a14dc66c40066d08d60a768e14ede7ef351 Author: K Prateek Nayak <kprateek.nayak@amd.com> Date: Fri Dec 20 06:32:23 2024 +0000 sched/stats: Print domain name in /proc/schedstat Currently, there does not exist a straightforward way to extract the names of the sched domains and match them to the per-cpu domain entry in /proc/schedstat other than looking at the debugfs files which are only visible after enabling "verbose" debug after commit 34320745dfc9 ("sched/debug: Put sched/domains files under the verbose flag") Since tools like `perf sched stats`[1] require displaying per-domain information in user friendly manner, display the names of sched domain, alongside their level in /proc/schedstat. Domain names also makes the /proc/schedstat data unambiguous when some of the cpus are offline. For example, on a 128 cpus AMD Zen3 machine where CPU0 and CPU64 are SMT siblings and CPU64 is offline: Before: cpu0 ... domain0 ... domain1 ... cpu1 ... domain0 ... domain1 ... domain2 ... After: cpu0 ... domain0 MC ... domain1 PKG ... cpu1 ... domain0 SMT ... domain1 MC ... domain2 PKG ... [1] https://lore.kernel.org/lkml/20241122084452.1064968-1-swapnil.sapkal@amd.com/ Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com> Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com> Signed-off-by: Swapnil Sapkal <swapnil.sapkal@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: James Clark <james.clark@linaro.org> Link: https://lore.kernel.org/r/20241220063224.17767-6-swapnil.sapkal@amd.com kernel/sched/stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c055a0f5d3bafaca5d218bbb3e4e63d6307be45 Author: Swapnil Sapkal <swapnil.sapkal@amd.com> Date: Fri Dec 20 06:32:22 2024 +0000 sched: Move sched domain name out of CONFIG_SCHED_DEBUG /proc/schedstat file shows cpu and sched domain level scheduler statistics. It does not show domain name instead shows domain level. It will be very useful for tools like `perf sched stats`[1] to aggragate domain level stats if domain names are shown in /proc/schedstat. But sched domain name is guarded by CONFIG_SCHED_DEBUG. As per the discussion[2], move sched domain name out of CONFIG_SCHED_DEBUG. [1] https://lore.kernel.org/lkml/20241122084452.1064968-1-swapnil.sapkal@amd.com/ [2] https://lore.kernel.org/lkml/fcefeb4d-3acb-462d-9c9b-3df8d927e522@amd.com/ Suggested-by: "Gautham R. Shenoy" <gautham.shenoy@amd.com> Signed-off-by: Swapnil Sapkal <swapnil.sapkal@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20241220063224.17767-5-swapnil.sapkal@amd.com include/linux/sched/topology.h | 8 -------- kernel/sched/topology.c | 4 ---- 2 files changed, 12 deletions(-) commit 3b2a793ea70fd14136b442df31e53935e8095034 Author: Swapnil Sapkal <swapnil.sapkal@amd.com> Date: Fri Dec 20 06:32:21 2024 +0000 sched: Report the different kinds of imbalances in /proc/schedstat In /proc/schedstat, lb_imbalance reports the sum of imbalances discovered in sched domains with each call to sched_balance_rq(), which is not very useful because lb_imbalance does not mention whether the imbalance is due to load, utilization, nr_tasks or misfit_tasks. Remove this field from /proc/schedstat. Currently there is no field in /proc/schedstat to report different types of imbalances. Introduce new fields in /proc/schedstat to report the total imbalances in load, utilization, nr_tasks or misfit_tasks. Added fields to /proc/schedstat: - lb_imbalance_load: Total imbalance due to load. - lb_imbalance_util: Total imbalance due to utilization. - lb_imbalance_task: Total imbalance due to number of tasks. - lb_imbalance_misfit: Total imbalance due to misfit tasks. Signed-off-by: Swapnil Sapkal <swapnil.sapkal@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com> Link: https://lore.kernel.org/r/20241220063224.17767-4-swapnil.sapkal@amd.com include/linux/sched/topology.h | 5 ++++- kernel/sched/fair.c | 24 +++++++++++++++++++++++- kernel/sched/stats.c | 7 +++++-- 3 files changed, 32 insertions(+), 4 deletions(-) commit c3856c9ce6b8903909b61e8d2985a3c7ec7a78e8 Author: Peter Zijlstra <peterz@infradead.org> Date: Fri Dec 20 06:32:20 2024 +0000 sched/fair: Cleanup in migrate_degrades_locality() to improve readability migrate_degrade_locality() would return {1, 0, -1} respectively to indicate that migration would degrade-locality, would improve locality, would be ambivalent to locality improvements. This patch improves readability by changing the return value to mean: * Any positive value degrades locality * 0 migration doesn't affect locality * Any negative value improves locality [Swapnil: Fixed comments around code and wrote commit log] Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Not-yet-signed-off-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Swapnil Sapkal <swapnil.sapkal@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20241220063224.17767-3-swapnil.sapkal@amd.com kernel/sched/fair.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit a430d99e349026d53e2557b7b22bd2ebd61fe12a Author: Peter Zijlstra <peterz@infradead.org> Date: Fri Dec 20 06:32:19 2024 +0000 sched/fair: Fix value reported by hot tasks pulled in /proc/schedstat In /proc/schedstat, lb_hot_gained reports the number hot tasks pulled during load balance. This value is incremented in can_migrate_task() if the task is migratable and hot. After incrementing the value, load balancer can still decide not to migrate this task leading to wrong accounting. Fix this by incrementing stats when hot tasks are detached. This issue only exists in detach_tasks() where we can decide to not migrate hot task even if it is migratable. However, in detach_one_task(), we migrate it unconditionally. [Swapnil: Handled the case where nr_failed_migrations_hot was not accounted properly and wrote commit log] Fixes: d31980846f96 ("sched: Move up affinity check to mitigate useless redoing overhead") Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reported-by: "Gautham R. Shenoy" <gautham.shenoy@amd.com> Not-yet-signed-off-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Swapnil Sapkal <swapnil.sapkal@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20241220063224.17767-2-swapnil.sapkal@amd.com include/linux/sched.h | 1 + kernel/sched/fair.c | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) commit ee8118c1f1864eab709fb660d3af8545cf11ae96 Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu Dec 19 09:58:39 2024 +0100 sched/fair: Update comments after sched_tick() rename. scheduler_tick() was renamed to sched_tick() in 86dd6c04ef9f2 ("sched/balancing: Rename scheduler_tick() => sched_tick()"). Update comments still referring to scheduler_tick. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20241219085839.302378-1-bigeasy@linutronix.de kernel/sched/fair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aac64ad36955268d65375c32415d5bcf1bd1dd47 Author: Fuad Tabba <tabba@google.com> Date: Mon Dec 16 10:50:57 2024 +0000 KVM: arm64: Use kvm_vcpu_has_feature() directly for struct kvm Now that we have introduced kvm_vcpu_has_feature(), use it in the remaining code that checks for features in struct kvm, instead of using the __vcpu_has_feature() helper. No functional change intended. Suggested-by: Quentin Perret <qperret@google.com> Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-18-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/nested.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 41d6028e28bd474298ff10409c292ec46cf43a90 Author: Fuad Tabba <tabba@google.com> Date: Mon Dec 16 10:50:56 2024 +0000 KVM: arm64: Convert the SVE guest vcpu flag to a vm flag The vcpu flag GUEST_HAS_SVE is per-vcpu, but it is based on what is now a per-vm feature. Make the flag per-vm. Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-17-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_emulate.h | 12 +++++++++--- arch/arm64/include/asm/kvm_host.h | 18 ++++++++++++------ arch/arm64/kvm/hyp/nvhe/pkvm.c | 11 +++++++---- arch/arm64/kvm/reset.c | 2 +- 4 files changed, 29 insertions(+), 14 deletions(-) commit c5c1763596660fcd77a1190b3bd78bbe24bcfd6a Author: Fuad Tabba <tabba@google.com> Date: Mon Dec 16 10:50:55 2024 +0000 KVM: arm64: Remove PtrAuth guest vcpu flag The vcpu flag GUEST_HAS_PTRAUTH is always associated with the vcpu PtrAuth features, which are defined per vm rather than per vcpu. Remove the flag, and replace it with checks for the features instead. Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-16-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_emulate.h | 5 ----- arch/arm64/include/asm/kvm_host.h | 7 +++---- arch/arm64/kvm/hyp/nvhe/pkvm.c | 13 ------------- arch/arm64/kvm/reset.c | 4 ---- 4 files changed, 3 insertions(+), 26 deletions(-) commit 1eccad35c9268f1ad4be3d72d37167a58c0ac2db Author: Fuad Tabba <tabba@google.com> Date: Mon Dec 16 10:50:54 2024 +0000 KVM: arm64: Fix the value of the CPTR_EL2 RES1 bitmask for nVHE Since the introduction of SME, bit 12 in CPTR_EL2 (nVHE) is TSM for trapping SME, instead of RES1, as per ARM ARM DDI 0487K.a, section D23.2.34. Fix the value of CPTR_NVHE_EL2_RES1 to reflect that, and adjust the code that relies on it accordingly. Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-15-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_arm.h | 2 +- arch/arm64/include/asm/kvm_emulate.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 8f7df795b2da0564b22a03c4aceec90bfc5e1b1b Author: Fuad Tabba <tabba@google.com> Date: Mon Dec 16 10:50:53 2024 +0000 KVM: arm64: Refactor kvm_reset_cptr_el2() Fold kvm_get_reset_cptr_el2() into kvm_reset_cptr_el2(), since it is its only caller. Add a comment to clarify that this function is meant for the host value of cptr_el2. No functional change intended. Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-14-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_emulate.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 2fd5b4b0e7b440602455b79977bfa64dea101e6c Author: Fuad Tabba <tabba@google.com> Date: Mon Dec 16 10:50:52 2024 +0000 KVM: arm64: Calculate cptr_el2 traps on activating traps Similar to VHE, calculate the value of cptr_el2 from scratch on activate traps. This removes the need to store cptr_el2 in every vcpu structure. Moreover, some traps, such as whether the guest owns the fp registers, need to be set on every vcpu run. Reported-by: James Clark <james.clark@linaro.org> Fixes: 5294afdbf45a ("KVM: arm64: Exclude FP ownership from kvm_vcpu_arch") Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-13-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 1 - arch/arm64/kvm/arm.c | 1 - arch/arm64/kvm/hyp/nvhe/pkvm.c | 42 -------------------------------- arch/arm64/kvm/hyp/nvhe/switch.c | 51 ++++++++++++++++++++++++--------------- 4 files changed, 32 insertions(+), 63 deletions(-) commit 092e7b2c3b1a5591bbabc358f3b709dfa2289b91 Author: Fuad Tabba <tabba@google.com> Date: Mon Dec 16 10:50:51 2024 +0000 KVM: arm64: Remove redundant setting of HCR_EL2 trap bit In hVHE mode, HCR_E2H should be set for both protected and non-protected VMs. Since commit b56680de9c64 ("KVM: arm64: Initialize trap register values in hyp in pKVM"), this has been fixed, and the setting of the flag here is redundant. Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-12-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/nvhe/pkvm.c | 3 --- 1 file changed, 3 deletions(-) commit 81403c8d04e1d85209cdb0e0ce32aa0019620c65 Author: Fuad Tabba <tabba@google.com> Date: Mon Dec 16 10:50:50 2024 +0000 KVM: arm64: Remove fixed_config.h header The few remaining items needed in fixed_config.h are better suited for pkvm.h. Move them there and delete it. No functional change intended. Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-11-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/include/nvhe/fixed_config.h | 206 ------------------------- arch/arm64/kvm/hyp/include/nvhe/pkvm.h | 5 + arch/arm64/kvm/hyp/nvhe/pkvm.c | 1 - arch/arm64/kvm/hyp/nvhe/setup.c | 1 - arch/arm64/kvm/hyp/nvhe/switch.c | 1 - arch/arm64/kvm/hyp/nvhe/sys_regs.c | 1 - 6 files changed, 5 insertions(+), 210 deletions(-) commit 3d7ff00700d1a4d0c8f092f2c1bf67553a8c7c4c Author: Fuad Tabba <tabba@google.com> Date: Mon Dec 16 10:50:49 2024 +0000 KVM: arm64: Rework specifying restricted features for protected VMs The existing code didn't properly distinguish between signed and unsigned features, and was difficult to read and to maintain. Rework it using the same method used in other parts of KVM when handling vcpu features. Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-10-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 1 + arch/arm64/kvm/hyp/include/nvhe/fixed_config.h | 1 - arch/arm64/kvm/hyp/nvhe/sys_regs.c | 357 +++++++++++++------------ 3 files changed, 189 insertions(+), 170 deletions(-) commit 0401f7e76d707741d2562f4988743cc5daf445e4 Author: Fuad Tabba <tabba@google.com> Date: Mon Dec 16 10:50:48 2024 +0000 KVM: arm64: Set protected VM traps based on its view of feature registers Now that the VM's feature id registers are initialized with the values of the supported features, use those values to determine which traps to set using kvm_has_feature(). Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-9-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/nvhe/pkvm.c | 84 ++++++++++++++------------------------ arch/arm64/kvm/hyp/nvhe/sys_regs.c | 7 ---- 2 files changed, 30 insertions(+), 61 deletions(-) commit 9df9186f8df513dc9bf9f95f68525c7ebc941bcd Author: Fuad Tabba <tabba@google.com> Date: Mon Dec 16 10:50:47 2024 +0000 KVM: arm64: Fix RAS trapping in pKVM for protected VMs Trap RAS in pKVM if not supported at all for protected VMs. The RAS version doesn't matter in this case. Fixes: 2a0c343386ae ("KVM: arm64: Initialize trap registers for protected VMs") Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-8-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/nvhe/pkvm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7ba5b8f80475e48b486f095ee9fb67dc9f9d02df Author: Fuad Tabba <tabba@google.com> Date: Mon Dec 16 10:50:46 2024 +0000 KVM: arm64: Initialize feature id registers for protected VMs The hypervisor maintains the state of protected VMs. Initialize the values for feature ID registers for protected VMs, to be used when setting traps and when advertising features to protected VMs. Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-7-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/include/nvhe/fixed_config.h | 1 + arch/arm64/kvm/hyp/include/nvhe/pkvm.h | 2 ++ arch/arm64/kvm/hyp/nvhe/pkvm.c | 10 ++++-- arch/arm64/kvm/hyp/nvhe/sys_regs.c | 45 ++++++++++++++++++++++++-- 4 files changed, 52 insertions(+), 6 deletions(-) commit a3163dca4817e9a30b154a14c793641e39a00592 Author: Fuad Tabba <tabba@google.com> Date: Mon Dec 16 10:50:45 2024 +0000 KVM: arm64: Use KVM extension checks for allowed protected VM capabilities Use KVM extension checks as the source for determining which capabilities are allowed for protected VMs. KVM extension checks is the natural place for this, since it is also the interface exposed to users. Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-6-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_pkvm.h | 25 +++++++++++++++++++++++++ arch/arm64/kvm/arm.c | 29 ++--------------------------- arch/arm64/kvm/hyp/nvhe/pkvm.c | 24 ++++++------------------ 3 files changed, 33 insertions(+), 45 deletions(-) commit 27f5cf8ad5224033a711aef3fde90b60c9a8d7d5 Author: Fuad Tabba <tabba@google.com> Date: Mon Dec 16 10:50:44 2024 +0000 KVM: arm64: Remove KVM_ARM_VCPU_POWER_OFF from protected VMs allowed features in pKVM The hypervisor is responsible for the power state of protected VMs in pKVM. Therefore, remove KVM_ARM_VCPU_POWER_OFF from the list of allowed features for protected VMs. Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-5-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/nvhe/pkvm.c | 2 -- 1 file changed, 2 deletions(-) commit 1fea164ccf19750c5bea688afd9122eb84eb3a72 Author: Fuad Tabba <tabba@google.com> Date: Mon Dec 16 10:50:43 2024 +0000 KVM: arm64: Move checking protected vcpu features to a separate function At the moment, checks for supported vcpu features for protected VMs are build-time bugs. In the following patch, they will become runtime checks based on the vcpu's features registers. Therefore, consolidate them into one function that would return an error if it encounters an unsupported feature. Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-4-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/nvhe/pkvm.c | 45 ++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 13 deletions(-) commit f50758260bfff393f2a800469b37c45a7ef50376 Author: Fuad Tabba <tabba@google.com> Date: Fri Dec 20 11:33:05 2024 +0000 KVM: arm64: Group setting traps for protected VMs by control register Group setting protected VM traps by control register rather than feature id register, since some trap values (e.g., PAuth), depend on more than one feature id register. Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-3-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/nvhe/pkvm.c | 317 +++++++++++++++++++---------------------- 1 file changed, 144 insertions(+), 173 deletions(-) commit c9ec045fa8053820573efbaa70137d0857e444db Author: Shree Ramamoorthy <s-ramamoorthy@ti.com> Date: Tue Dec 17 14:47:55 2024 -0600 gpio: tps65219: Use existing kernel gpio macros Replace the user-defined macros with the equivalent kernel macros provided. The user-defined macros serve the same purpose as the common kernel macros. The user-defined macros rely on the inference that _IN corresponds to true and _OUT is false. Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com> Link: https://lore.kernel.org/r/20241217204755.1011731-2-s-ramamoorthy@ti.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> drivers/gpio/gpio-tps65219.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 7cef813a91c468253c80633891393478b9f2c966 Author: Luca Ceresoli <luca.ceresoli@bootlin.com> Date: Thu Dec 19 10:39:46 2024 +0100 gpio: pca953x: log an error when failing to get the reset GPIO When the dirver fails getting this GPIO, it fails silently. Log an error message to make debugging a lot easier by just reading dmesg. Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Fixes: 054ccdef8b28 ("gpio: pca953x: Add optional reset gpio control") Link: https://lore.kernel.org/r/20241219-pca953x-log-no-reset-gpio-v1-1-9aa7bcc45ead@bootlin.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> drivers/gpio/gpio-pca953x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2589dbd72797a4163dd998b05c4663ff98bd0771 Author: Marc Zyngier <maz@kernel.org> Date: Fri Dec 20 11:33:05 2024 +0000 KVM: arm64: Consolidate allowed and restricted VM feature checks The definitions for features allowed and allowed with restrictions for protected guests, which are based on feature registers, were defined and checked for separately, even though they are handled in the same way. This could result in missing checks for certain features, e.g., pointer authentication, causing traps for allowed features. Consolidate the definitions into one. Use that new definition to construct the guest view of the feature registers for consistency. Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241216105057.579031-2-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/include/nvhe/fixed_config.h | 55 +++++++++----------------- arch/arm64/kvm/hyp/nvhe/pkvm.c | 8 ++-- arch/arm64/kvm/hyp/nvhe/sys_regs.c | 6 +-- 3 files changed, 26 insertions(+), 43 deletions(-) commit 1c6799266aacbddc9df8e2712566895e9a12641b Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Thu Dec 12 18:12:58 2024 +0100 pinctrl: ocelot: Constify some structures 'struct ocelot_match_data and 'struct irq_chip' are not modified in this driver. Constifying these structures 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 41459 9008 80 50547 c573 drivers/pinctrl/pinctrl-ocelot.o After: ===== text data bss dec hex filename 42803 7640 80 50523 c55b drivers/pinctrl/pinctrl-ocelot.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/32edcf0567fffd0b1a219e7e2dad7e0bd8c5aaf4.1734023550.git.christophe.jaillet@wanadoo.fr Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/pinctrl-ocelot.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit fa4752d4b5999e2f4fac4689def0c7a306d5b909 Merge: 5c4bfbb21ded 03fc60cd8e7b Author: Linus Walleij <linus.walleij@linaro.org> Date: Fri Dec 20 13:34:46 2024 +0100 Merge tag 'renesas-pinctrl-for-v6.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v6.14 - Add audio clock pin support for the RZ/G3S SoC. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> commit 652be03b54e042d229fde7d086655c24b7146924 Author: Ahmad Fatoum <a.fatoum@pengutronix.de> Date: Wed Dec 18 20:45:00 2024 +0100 drm: panel-simple: support TOPLAND TIAN G07017 LCD panel The TIAN-G07017-01 is a 7" TFT-LCD module by TOPLAND ELECTRONICS (H.K). The panel features 1024x600 24-bit RGB pixels driven over LVDS as well as a PWM backlight and I2C-connected ft5506-compatible capacitive touch. The panel description is taken from the Datasheet V0 (2024.5.23), but it lists no timings and these were provided by the vendor separately. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241218-topland-tian-g07017-v1-3-d5e411c199e3@pengutronix.de Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241218-topland-tian-g07017-v1-3-d5e411c199e3@pengutronix.de drivers/gpu/drm/panel/panel-simple.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 3e743df4722c24f021143977335649a0f2e1311e Author: Ahmad Fatoum <a.fatoum@pengutronix.de> Date: Wed Dec 18 20:44:59 2024 +0100 dt-bindings: display: panel-simple: Document Topland TIAN-G07017-01 The TIAN-G07017-01 is a 7" TFT-LCD module by TOPLAND ELECTRONICS (H.K). Add its compatible string. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241218-topland-tian-g07017-v1-2-d5e411c199e3@pengutronix.de Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241218-topland-tian-g07017-v1-2-d5e411c199e3@pengutronix.de Documentation/devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) commit bd2f80c16f33f5d2abde1e23bfc06dc637259a56 Author: Ahmad Fatoum <a.fatoum@pengutronix.de> Date: Wed Dec 18 20:44:58 2024 +0100 dt-bindings: vendor-prefixes: add prefix for Topland Electronics (H.K) Topland is a professional supplier of photoelectric display and touch integrated products from Hong Kong: https://www.topland.com.hk/aboutus/ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241218-topland-tian-g07017-v1-1-d5e411c199e3@pengutronix.de Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241218-topland-tian-g07017-v1-1-d5e411c199e3@pengutronix.de Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit a253b0b1292b4db0fec5733acceffc87bad4ffaf Author: Xin Ji <xji@analogixsemi.com> Date: Thu Dec 19 15:03:29 2024 +0800 drm/bridge:anx7625: Update HDCP content status When user enabled HDCP feature, userspace will set HDCP content to DRM_MODE_CONTENT_PROTECTION_DESIRED. Next, anx7625 will update HDCP content to DRM_MODE_CONTENT_PROTECTION_ENABLED if down stream support HDCP feature. As anx7625 bridge IC will be power down after call .atomic_disable(), then all HDCP status will be lost on chip. So we should reestablish HDCP again in .atomic_enable(), and update hdcp content to DESIRE if current HDCP content is ENABLE in .atomic_disable(). v4: - Change HDCP content value to DESIRED if HDCP status is ENABLE in bridge interface .atomic_enable(). v3: - Move hdcp content value checking from bridge interface .atomic_check() to .atomic_enable() v2: - Add more details in commit message Signed-off-by: Xin Ji <xji@analogixsemi.com> Tested-by: Pin-yen Lin <treapking@chromium.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241219070330.224996-1-xji@analogixsemi.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241219070330.224996-1-xji@analogixsemi.com drivers/gpu/drm/bridge/analogix/anx7625.c | 73 ++++++++++++------------------- 1 file changed, 29 insertions(+), 44 deletions(-) commit 5ed539e327401adc6a41e6c729b5766ba184c5de Author: Nitin Gote <nitin.r.gote@intel.com> Date: Tue Dec 17 15:30:58 2024 +0530 drm/i915/gt: Use ENGINE_TRACE for tracing. Instead of drm_err(), prefer gt_err() and ENGINE_TRACE() for GEM tracing in i915. So, it will be good to use ENGINE_TRACE() over drm_err() drm_device based logging for engine debug log. v2: Bit more specific in commit description (Andi) v3: Use gt_err() along with ENGINE_TRACE() in place of drm_err() (Andi) Signed-off-by: Nitin Gote <nitin.r.gote@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217100058.2819053-1-nitin.r.gote@intel.com drivers/gpu/drm/i915/gt/intel_ring_submission.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 03fc60cd8e7b7e6f330d0a48c54545740addd9d8 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Wed Nov 13 15:35:20 2024 +0200 pinctrl: renesas: rzg2l: Add audio clock pins on RZ/G3S Add audio clock pins on the RZ/G3S SoC. These are used by audio IPs as input pins to feed them with audio clocks. Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241113133540.2005850-6-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/pinctrl/renesas/pinctrl-rzg2l.c | 2 ++ 1 file changed, 2 insertions(+) commit fce886a6020734d6253c2c5a3bc285e385cc5496 Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:59 2024 +0000 KVM: arm64: Plumb the pKVM MMU in KVM Introduce the KVM_PGT_CALL() helper macro to allow switching from the traditional pgtable code to the pKVM version easily in mmu.c. The cost of this 'indirection' is expected to be very minimal due to is_protected_kvm_enabled() being backed by a static key. With this, everything is in place to allow the delegation of non-protected guest stage-2 page-tables to pKVM, so let's stop using the host's kvm_s2_mmu from EL2 and enjoy the ride. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-19-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_mmu.h | 16 +++++++ arch/arm64/kvm/arm.c | 9 +++- arch/arm64/kvm/hyp/nvhe/hyp-main.c | 2 - arch/arm64/kvm/mmu.c | 87 +++++++++++++++++++++++++------------- 4 files changed, 82 insertions(+), 32 deletions(-) commit e912efed485a4c50bdc3934ae647e257ef568ef6 Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:58 2024 +0000 KVM: arm64: Introduce the EL1 pKVM MMU Introduce a set of helper functions allowing to manipulate the pKVM guest stage-2 page-tables from EL1 using pKVM's HVC interface. Each helper has an exact one-to-one correspondance with the traditional kvm_pgtable_stage2_*() functions from pgtable.c, with a strictly matching prototype. This will ease plumbing later on in mmu.c. These callbacks track the gfn->pfn mappings in a simple rb_tree indexed by IPA in lieu of a page-table. This rb-tree is kept in sync with pKVM's state and is protected by the mmu_lock like a traditional stage-2 page-table. Signed-off-by: Quentin Perret <qperret@google.com> Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-18-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 1 + arch/arm64/include/asm/kvm_pgtable.h | 23 ++-- arch/arm64/include/asm/kvm_pkvm.h | 26 +++++ arch/arm64/kvm/pkvm.c | 201 +++++++++++++++++++++++++++++++++++ 4 files changed, 242 insertions(+), 9 deletions(-) commit 0adce4d42f249b1701c136907055d9b12f8f6e1c Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:57 2024 +0000 KVM: arm64: Introduce __pkvm_tlb_flush_vmid() Introduce a new hypercall to flush the TLBs of non-protected guests. The host kernel will be responsible for issuing this hypercall after changing stage-2 permissions using the __pkvm_host_relax_guest_perms() or __pkvm_host_wrprotect_guest() paths. This is left under the host's responsibility for performance reasons. Note however that the TLB maintenance for all *unmap* operations still remains entirely under the hypervisor's responsibility for security reasons -- an unmapped page may be donated to another entity, so a stale TLB entry could be used to leak private data. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-17-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_asm.h | 1 + arch/arm64/kvm/hyp/nvhe/hyp-main.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) commit 76f0b18b3db57868fb0cabe691201aad3085b712 Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:56 2024 +0000 KVM: arm64: Introduce __pkvm_host_mkyoung_guest() Plumb the kvm_pgtable_stage2_mkyoung() callback into pKVM for non-protected guests. It will be called later from the fault handling path. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-16-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_asm.h | 1 + arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 1 + arch/arm64/kvm/hyp/nvhe/hyp-main.c | 19 +++++++++++++++++++ arch/arm64/kvm/hyp/nvhe/mem_protect.c | 20 ++++++++++++++++++++ 4 files changed, 41 insertions(+) commit 56ab4de37f4e13231e964cf7fa304818f791fea7 Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:55 2024 +0000 KVM: arm64: Introduce __pkvm_host_test_clear_young_guest() Plumb the kvm_stage2_test_clear_young() callback into pKVM for non-protected guest. It will be later be called from MMU notifiers. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-15-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_asm.h | 1 + arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 1 + arch/arm64/kvm/hyp/nvhe/hyp-main.c | 22 ++++++++++++++++++++++ arch/arm64/kvm/hyp/nvhe/mem_protect.c | 19 +++++++++++++++++++ 4 files changed, 43 insertions(+) commit 26117e4c636c813be4fa31e9ec9410b7d02ced5c Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:54 2024 +0000 KVM: arm64: Introduce __pkvm_host_wrprotect_guest() Introduce a new hypercall to remove the write permission from a non-protected guest stage-2 mapping. This will be used for e.g. enabling dirty logging. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-14-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_asm.h | 1 + arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 1 + arch/arm64/kvm/hyp/nvhe/hyp-main.c | 21 +++++++++++++++++++++ arch/arm64/kvm/hyp/nvhe/mem_protect.c | 19 +++++++++++++++++++ 4 files changed, 42 insertions(+) commit 34884a0a4a53f9544f78e7e9556cb4d202e170d5 Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:53 2024 +0000 KVM: arm64: Introduce __pkvm_host_relax_guest_perms() Introduce a new hypercall allowing the host to relax the stage-2 permissions of mappings in a non-protected guest page-table. It will be used later once we start allowing RO memslots and dirty logging. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-13-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_asm.h | 1 + arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 1 + arch/arm64/kvm/hyp/nvhe/hyp-main.c | 20 ++++++++++++++++++++ arch/arm64/kvm/hyp/nvhe/mem_protect.c | 23 +++++++++++++++++++++++ 4 files changed, 45 insertions(+) commit 72db3d3fbaa77ba649201c9e9f9d1a54fa76b217 Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:52 2024 +0000 KVM: arm64: Introduce __pkvm_host_unshare_guest() In preparation for letting the host unmap pages from non-protected guests, introduce a new hypercall implementing the host-unshare-guest transition. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-12-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_asm.h | 1 + arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 1 + arch/arm64/kvm/hyp/include/nvhe/pkvm.h | 6 +++ arch/arm64/kvm/hyp/nvhe/hyp-main.c | 21 +++++++++ arch/arm64/kvm/hyp/nvhe/mem_protect.c | 67 +++++++++++++++++++++++++++ arch/arm64/kvm/hyp/nvhe/pkvm.c | 12 +++++ 6 files changed, 108 insertions(+) commit d0bd3e6570aee42766e7bd884734ae078667ea1e Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:51 2024 +0000 KVM: arm64: Introduce __pkvm_host_share_guest() In preparation for handling guest stage-2 mappings at EL2, introduce a new pKVM hypercall allowing to share pages with non-protected guests. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-11-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_asm.h | 1 + arch/arm64/include/asm/kvm_host.h | 3 ++ arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 2 + arch/arm64/kvm/hyp/include/nvhe/memory.h | 4 +- arch/arm64/kvm/hyp/nvhe/hyp-main.c | 34 +++++++++++++ arch/arm64/kvm/hyp/nvhe/mem_protect.c | 72 +++++++++++++++++++++++++++ arch/arm64/kvm/hyp/nvhe/pkvm.c | 8 +++ 7 files changed, 123 insertions(+), 1 deletion(-) commit f7d03fcbf1f482069e9afac55b17de3bd323b8f6 Author: Marc Zyngier <maz@kernel.org> Date: Wed Dec 18 19:40:50 2024 +0000 KVM: arm64: Introduce __pkvm_vcpu_{load,put}() Rather than look-up the hyp vCPU on every run hypercall at EL2, introduce a per-CPU 'loaded_hyp_vcpu' tracking variable which is updated by a pair of load/put hypercalls called directly from kvm_arch_vcpu_{load,put}() when pKVM is enabled. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-10-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_asm.h | 2 ++ arch/arm64/kvm/arm.c | 14 ++++++++++ arch/arm64/kvm/hyp/include/nvhe/pkvm.h | 7 +++++ arch/arm64/kvm/hyp/nvhe/hyp-main.c | 47 ++++++++++++++++++++++++++-------- arch/arm64/kvm/hyp/nvhe/pkvm.c | 29 +++++++++++++++++++++ arch/arm64/kvm/vgic/vgic-v3.c | 6 +++-- 6 files changed, 93 insertions(+), 12 deletions(-) commit 99996d575ee69d4327bad98a0148729b73dde23a Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:49 2024 +0000 KVM: arm64: Add {get,put}_pkvm_hyp_vm() helpers In preparation for accessing pkvm_hyp_vm structures at EL2 in a context where we can't always expect a vCPU to be loaded (e.g. MMU notifiers), introduce get/put helpers to get temporary references to hyp VMs from any context. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-9-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/include/nvhe/pkvm.h | 3 +++ arch/arm64/kvm/hyp/nvhe/pkvm.c | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) commit c77e5181fed54b25d489eb7d2ccb5c1c72a1063c Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:48 2024 +0000 KVM: arm64: Make kvm_pgtable_stage2_init() a static inline function Turn kvm_pgtable_stage2_init() into a static inline function instead of a macro. This will allow the usage of typeof() on it later on. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-8-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_pgtable.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e279c25d78d6729e39a0221c98185bd0e7aa0c99 Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:47 2024 +0000 KVM: arm64: Pass walk flags to kvm_pgtable_stage2_relax_perms kvm_pgtable_stage2_relax_perms currently assumes that it is being called from a 'shared' walker, which will not be true once called from pKVM. To allow for the re-use of that function, make the walk flags one of its parameters. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-7-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_pgtable.h | 4 +++- arch/arm64/kvm/hyp/pgtable.c | 6 ++---- arch/arm64/kvm/mmu.c | 7 +++---- 3 files changed, 8 insertions(+), 9 deletions(-) commit 5398ddc5c90bd418b90d859e9267aa39399021af Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:46 2024 +0000 KVM: arm64: Pass walk flags to kvm_pgtable_stage2_mkyoung kvm_pgtable_stage2_mkyoung currently assumes that it is being called from a 'shared' walker, which will not be true once called from pKVM. To allow for the re-use of that function, make the walk flags one of its parameters. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-6-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_pgtable.h | 4 +++- arch/arm64/kvm/hyp/pgtable.c | 7 +++---- arch/arm64/kvm/mmu.c | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) commit e94a7dea2972bd9a5ee3ed4312f7198370969407 Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:45 2024 +0000 KVM: arm64: Move host page ownership tracking to the hyp vmemmap We currently store part of the page-tracking state in PTE software bits for the host, guests and the hypervisor. This is sub-optimal when e.g. sharing pages as this forces to break block mappings purely to support this software tracking. This causes an unnecessarily fragmented stage-2 page-table for the host in particular when it shares pages with Secure, which can lead to measurable regressions. Moreover, having this state stored in the page-table forces us to do multiple costly walks on the page transition path, hence causing overhead. In order to work around these problems, move the host-side page-tracking logic from SW bits in its stage-2 PTEs to the hypervisor's vmemmap. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-5-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/include/nvhe/memory.h | 14 ++++- arch/arm64/kvm/hyp/nvhe/mem_protect.c | 100 +++++++++++++++++++++---------- arch/arm64/kvm/hyp/nvhe/setup.c | 7 +-- 3 files changed, 84 insertions(+), 37 deletions(-) commit b35875d466ad3cb08866eac067cca0581d4293d7 Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:44 2024 +0000 KVM: arm64: Make hyp_page::order a u8 We don't need 16 bits to store the hyp page order, and we'll need some bits to store page ownership data soon, so let's reduce the order member. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-4-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/include/nvhe/gfp.h | 6 +++--- arch/arm64/kvm/hyp/include/nvhe/memory.h | 5 +++-- arch/arm64/kvm/hyp/nvhe/page_alloc.c | 14 +++++++------- 3 files changed, 13 insertions(+), 12 deletions(-) commit d4fc42a479c8e913fd61dbb432e67f35587c336a Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:43 2024 +0000 KVM: arm64: Move enum pkvm_page_state to memory.h In order to prepare the way for storing page-tracking information in pKVM's vmemmap, move the enum pkvm_page_state definition to nvhe/memory.h. No functional changes intended. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-3-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 34 +-------------------------- arch/arm64/kvm/hyp/include/nvhe/memory.h | 33 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 33 deletions(-) commit a1a1f1ff1f28d52deb39aa29b89663de2afefd67 Author: Quentin Perret <qperret@google.com> Date: Wed Dec 18 19:40:42 2024 +0000 KVM: arm64: Change the layout of enum pkvm_page_state The 'concrete' (a.k.a non-meta) page states are currently encoded using software bits in PTEs. For performance reasons, the abstract pkvm_page_state enum uses the same bits to encode these states as that makes conversions from and to PTEs easy. In order to prepare the ground for moving the 'concrete' state storage to the hyp vmemmap, re-arrange the enum to use bits 0 and 1 for this purpose. No functional changes intended. Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20241218194059.3670226-2-qperret@google.com Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit aa135d1d0902c49ed45bec98c61c1b4022652b7e Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri Dec 20 09:40:29 2024 +0100 x86/mm: Remove unnecessary include of <linux/extable.h> The header file linux/extable.h is included for search_exception_tables(). That function is no longer used since commit: c2508ec5a58db ("mm: introduce new 'lock_mm_and_find_vma()' page fault helper") Remove it. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20241220084029.473617-1-bigeasy@linutronix.de arch/x86/mm/fault.c | 1 - 1 file changed, 1 deletion(-) commit 60675d4ca1ef0857e44eba5849b74a3a998d0c0f Merge: dd4059634dab 8faabc041a00 Author: Ingo Molnar <mingo@kernel.org> Date: Fri Dec 20 10:25:44 2024 +0100 Merge branch 'linus' into x86/mm, to pick up fixes Signed-off-by: Ingo Molnar <mingo@kernel.org> commit c4a6ed85455979ef3fbadc2f1bdf18734b0ecea6 Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:16 2024 -0800 KVM: arm64: Promote guest ownership for DBGxVR/DBGxCR reads Only yielding control of the debug registers for writes is a bit silly, unless of course you're a fan of pointless traps. Give control of the debug registers to the guest upon the first access, regardless of direction. Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-20-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/sys_regs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3ce9f3357e9e099f02feaa002769eb99ef1138cd Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:15 2024 -0800 KVM: arm64: Fold DBGxVR/DBGxCR accessors into common set There is a nauseating amount of boilerplate for accessing the breakpoint and watchpoint registers. Fold everything together into a single set of accessors and select the right storage based on the sysreg encoding. Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-19-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/sys_regs.c | 197 ++++++++++++++++------------------------------ 1 file changed, 69 insertions(+), 128 deletions(-) commit 8c02c2bbd64375e603df79449f0eb2c57e1a597c Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:14 2024 -0800 KVM: arm64: Avoid reading ID_AA64DFR0_EL1 for debug save/restore Similar to other per-CPU profiling/debug features we handle, store the number of breakpoints/watchpoints in kvm_host_data to avoid reading the ID register 4 times on every guest entry/exit. And if you're in the nested virt business that's quite a few avoidable exits to the L0 hypervisor. Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-18-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 4 ++++ arch/arm64/kvm/debug.c | 3 +++ arch/arm64/kvm/hyp/include/hyp/debug-sr.h | 17 ++++------------- 3 files changed, 11 insertions(+), 13 deletions(-) commit b0ee51033ae35461ae98c465426f0002b8370679 Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:13 2024 -0800 KVM: arm64: nv: Honor MDCR_EL2.TDE routing for debug exceptions Inject debug exceptions into vEL2 if MDCR_EL2.TDE is set. Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-17-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_nested.h | 1 + arch/arm64/kvm/emulate-nested.c | 23 +++++++++++++++++++---- arch/arm64/kvm/handle_exit.c | 3 +++ 3 files changed, 23 insertions(+), 4 deletions(-) commit 2ca3f03bf524c98afa421c479689f1e7dc030bf0 Author: Marc Zyngier <maz@kernel.org> Date: Fri Dec 20 08:59:48 2024 +0000 KVM: arm64: Manage software step state at load/put KVM takes over the guest's software step state machine if the VMM is debugging the guest, but it does the save/restore fiddling for every guest entry. Note that the only constraint on host usage of software step is that the guest's configuration remains visible to userspace via the ONE_REG ioctls. So, we can cut down on the amount of fiddling by doing this at load/put instead. Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-16-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 24 ++----- arch/arm64/kvm/arm.c | 4 +- arch/arm64/kvm/debug.c | 145 ++++++++++---------------------------- arch/arm64/kvm/guest.c | 2 +- arch/arm64/kvm/handle_exit.c | 2 +- 5 files changed, 48 insertions(+), 129 deletions(-) commit 4ad3a0b87f2ec4714fdfa6bd5de57b4c30e15753 Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:11 2024 -0800 KVM: arm64: Don't hijack guest context MDSCR_EL1 Stealing MDSCR_EL1 in the guest's kvm_cpu_context for external debugging is rather gross. Just add a field for this instead and let the context switch code pick the correct one based on the debug owner. Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-15-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 2 +- arch/arm64/kvm/debug.c | 75 ++++++++++++++---------------- arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h | 39 +++++++++++----- 3 files changed, 64 insertions(+), 52 deletions(-) commit 75a5fbaf6623328d3ac69719145c2247f7b4e299 Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:10 2024 -0800 KVM: arm64: Compute MDCR_EL2 at vcpu_load() KVM has picked up several hacks to cope with vcpu->arch.mdcr_el2 needing to be prepared before vcpu_load(), which is when it gets programmed into hardware on VHE. Now that the flows for reprogramming MDCR_EL2 have been simplified, move that computation to vcpu_load(). Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-14-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 1 - arch/arm64/kvm/arm.c | 2 -- arch/arm64/kvm/debug.c | 19 +++---------------- 3 files changed, 3 insertions(+), 19 deletions(-) commit 06d22a9c1b94006ebfa67693a38baed86b9a75e8 Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:09 2024 -0800 KVM: arm64: Reload vCPU for accesses to OSLAR_EL1 KVM takes ownership of the debug regs if the guest enables the OS lock, as it needs to use MDSCR_EL1 to mask debug exceptions. Just reload the vCPU if the guest toggles the OS lock, relying on kvm_vcpu_load_debug() to update the debug owner and get the right trap configuration in place. Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-13-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 1 + arch/arm64/kvm/debug.c | 13 +++++++++++++ arch/arm64/kvm/sys_regs.c | 9 +-------- 3 files changed, 15 insertions(+), 8 deletions(-) commit beb470d96cec8dd8f4e05b2135c74d828f7b114b Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:08 2024 -0800 KVM: arm64: Use debug_owner to track if debug regs need save/restore Use the debug owner to determine if the debug regs are in use instead of keeping around the DEBUG_DIRTY flag. Debug registers are now saved/restored after the first trap, regardless of whether it was a read or a write. This also shifts the point at which KVM becomes lazy to vcpu_put() rather than the next exception taken from the guest. Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-12-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 4 ++-- arch/arm64/kvm/debug.c | 19 +++-------------- arch/arm64/kvm/hyp/include/hyp/debug-sr.h | 2 -- arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h | 4 ++-- arch/arm64/kvm/sys_regs.c | 33 ------------------------------ 5 files changed, 7 insertions(+), 55 deletions(-) commit 803602b0d94168bd25f5ff6eafdfd9388a6dd2ec Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:07 2024 -0800 KVM: arm64: Remove vestiges of debug_ptr Delete the remnants of debug_ptr now that debug registers are selected based on the debug owner instead. Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-11-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 5 ----- arch/arm64/kvm/arm.c | 2 -- arch/arm64/kvm/debug.c | 30 +----------------------------- arch/arm64/kvm/hyp/nvhe/hyp-main.c | 2 -- 4 files changed, 1 insertion(+), 38 deletions(-) commit 3b7780945cc8494793040ab0a9805b77b7826abb Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:06 2024 -0800 KVM: arm64: Remove debug tracepoints The debug tracepoints are a useless firehose of information that track implementation detail rather than well-defined events. These are going to be rather difficult to uphold now that the implementation is getting redone, so throw them out instead of bending over backwards. Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-10-oliver.upton@linux.dev [maz: fixed compilation after trace-ectomy] Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/debug.c | 34 ----------------- arch/arm64/kvm/sys_regs.c | 11 ------ arch/arm64/kvm/trace_handle_exit.h | 75 -------------------------------------- 3 files changed, 120 deletions(-) commit 58db67e9accca6d146916203a943568f63754697 Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:05 2024 -0800 KVM: arm64: Select debug state to save/restore based on debug owner Select the set of debug registers to use based on the owner rather than relying on debug_ptr. Besides the code cleanup, this allows us to eliminate a couple instances kern_hyp_va() as well. Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-9-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 2 ++ arch/arm64/kvm/hyp/include/hyp/debug-sr.h | 23 +++++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) commit 4cefbec97d80247083b84ccc86e32a78c119f705 Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:04 2024 -0800 KVM: arm64: Clean up KVM_SET_GUEST_DEBUG handler No particular reason other than it isn't nice to look at. Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-8-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/guest.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) commit cd9b10102ae38bf0e10b13dbb98c3ead42cf8e1b Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:03 2024 -0800 KVM: arm64: Evaluate debug owner at vcpu_load() In preparation for tossing the debug_ptr mess, introduce an enumeration to track the ownership of the debug registers while in the guest. Update the owner at vcpu_load() based on whether the host needs to steal the guest's debug context or if breakpoints/watchpoints are actively in use. Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-7-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 11 ++++++++++ arch/arm64/kvm/arm.c | 1 + arch/arm64/kvm/debug.c | 46 +++++++++++++++++++++++++++++++++++++++ arch/arm64/kvm/sys_regs.c | 2 ++ 4 files changed, 60 insertions(+) commit b47ffd13fda8275733d573e5799e63e66b5f5361 Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:02 2024 -0800 KVM: arm64: Write MDCR_EL2 directly from kvm_arm_setup_mdcr_el2() Expecting the callee to know when MDCR_EL2 needs to be written to hardware asking for trouble. Do the deed from kvm_arm_setup_mdcr_el2() instead. Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-6-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/debug.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 42b09e100f5d0724097d810861a6ad4aa433d7e7 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Mon Dec 16 13:34:11 2024 +0100 ALSA: hdsp: Use str_on_off() and str_yes_no() helper functions Remove hard-coded strings by using the str_on_off() and str_yes_no() helper functions. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20241216123412.64691-2-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/rme9652/hdsp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d381e53384a69e35aac417cd6e66afc6c8c11583 Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:01 2024 -0800 KVM: arm64: Move host SME/SVE tracking flags to host data The SME/SVE state tracking flags have no business in the vCPU. Move them to kvm_host_data. Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-5-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 22 ++++++++++------------ arch/arm64/kvm/fpsimd.c | 12 ++++++------ 2 files changed, 16 insertions(+), 18 deletions(-) commit 38131c02a53ff691e4c496d65d2d087a5ed42bbf Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:41:00 2024 -0800 KVM: arm64: Track presence of SPE/TRBE in kvm_host_data instead of vCPU Add flags to kvm_host_data to track if SPE/TRBE is present + programmable on a per-CPU basis. Set the flags up at init rather than vcpu_load() as the programmability of these buffers is unlikely to change. Reviewed-by: James Clark <james.clark@linaro.org> Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-4-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_host.h | 19 +++++++++++-------- arch/arm64/kvm/arm.c | 3 --- arch/arm64/kvm/debug.c | 36 +++++++++--------------------------- arch/arm64/kvm/hyp/nvhe/debug-sr.c | 8 ++++---- 4 files changed, 24 insertions(+), 42 deletions(-) commit 2417218f2f234fd7880fb193ebf3ae5fcccfa29b Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:40:59 2024 -0800 KVM: arm64: Get rid of __kvm_get_mdcr_el2() and related warts KVM caches MDCR_EL2 on a per-CPU basis in order to preserve the configuration of MDCR_EL2.HPMN while running a guest. This is a bit gross, since we're relying on some baked configuration rather than the hardware definition of implemented counters. Discover the number of implemented counters by reading PMCR_EL0.N instead. This works because: - In VHE the kernel runs at EL2, and N always returns the number of counters implemented in hardware - In {n,h}VHE, the EL2 setup code programs MDCR_EL2.HPMN with the EL2 view of PMCR_EL0.N for the host Lastly, avoid traps under nested virtualization by saving PMCR_EL0.N in host data. Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-3-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/include/asm/kvm_asm.h | 5 +---- arch/arm64/include/asm/kvm_host.h | 7 +++++-- arch/arm64/kvm/arm.c | 2 +- arch/arm64/kvm/debug.c | 29 +++++++++++------------------ arch/arm64/kvm/hyp/nvhe/debug-sr.c | 5 ----- arch/arm64/kvm/hyp/nvhe/hyp-main.c | 6 ------ arch/arm64/kvm/hyp/vhe/debug-sr.c | 5 ----- 7 files changed, 18 insertions(+), 41 deletions(-) commit 8ca19c40c47d80af369c222662445bbf593666b1 Author: Oliver Upton <oliver.upton@linux.dev> Date: Thu Dec 19 14:40:58 2024 -0800 KVM: arm64: Drop MDSCR_EL1_DEBUG_MASK Nothing is using this macro, get rid of it. Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20241219224116.3941496-2-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org> arch/arm64/kvm/debug.c | 5 ----- 1 file changed, 5 deletions(-) commit 523bafb48f333eab33839715e91221d005a18be6 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Dec 18 16:17:34 2024 +0200 drm/i915/dmc_wl: store register ranges in rodata Add const to register range arrays to store them in rodata. They don't need to be modified. Cc: Gustavo Sousa <gustavo.sousa@intel.com> Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241218141734.2583601-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dmc_wl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8df9bff2788973e16263ca86df7574d527c84405 Author: Alain Volmat <alain.volmat@foss.st.com> Date: Thu Dec 12 10:17:39 2024 +0100 arm64: dts: st: enable imx335/csi/dcmipp pipeline on stm32mp257f-ev1 Enable the camera pipeline with a imx335 sensor connected to the dcmipp via the csi interface. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm64/boot/dts/st/stm32mp257f-ev1.dts | 83 ++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit d67635e62d8078eb5602246c81d991d3f6eb034d Author: Alain Volmat <alain.volmat@foss.st.com> Date: Thu Dec 12 10:17:38 2024 +0100 arm64: dts: st: add csi & dcmipp node in stm32mp25 Add nodes describing the csi and dcmipp controllers handling the camera pipeline on the stm32mp25x. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm64/boot/dts/st/stm32mp251.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 479b8227ffc433929ba49200182b6383569f9615 Author: Marek Vasut <marex@denx.de> Date: Fri Dec 13 23:36:25 2024 +0100 ARM: dts: stm32: Swap USART3 and UART8 alias on STM32MP15xx DHCOM SoM Swap USART3 and UART8 aliases on STM32MP15xx DHCOM SoM, make sure UART8 is listed first, USART3 second, because the UART8 is labeled as UART2 on the SoM pinout, while USART3 is labeled as UART3 on the SoM pinout. Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board") Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Christoph Niedermaier <cniedermaier@dh-electronics.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm/boot/dts/st/stm32mp15xx-dhcom-som.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5f8049c1d1701130a0856f098cc0a36a440c055a Author: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Date: Mon Dec 16 16:39:08 2024 +0100 ARM: dts: stm32: add counter subnodes on stm32mp157 dk boards Enable the counter nodes without dedicated pins. With such configuration, the counter interface can be used on internal clock to generate events. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 00de2022848bb749644ce0d7864228fc269c359a Author: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Date: Mon Dec 16 16:39:07 2024 +0100 ARM: dts: stm32: add counter subnodes on stm32mp157c-ev1 Enable the counter nodes without dedicated pins. With such configuration, the counter interface can be used on internal clock to generate events. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm/boot/dts/st/stm32mp157c-ev1.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2879145733cc1436b2cac64ef409e4d04a059d36 Author: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Date: Mon Dec 16 16:39:06 2024 +0100 ARM: dts: stm32: add counter subnodes on stm32mp135f-dk Enable the counter nodes without dedicated pins. With such configuration, the counter interface can be used on internal clock to generate events. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm/boot/dts/st/stm32mp135f-dk.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 57f1e18bb6c02d20ff2822d81726dd273d959e25 Author: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Date: Mon Dec 16 16:39:05 2024 +0100 ARM: dts: stm32: populate all timer counter nodes on stm32mp15 Counter driver originally had support limited to quadrature interface and simple counter. It has been improved[1], so add the remaining stm32 timer counter nodes. [1] https://lore.kernel.org/linux-arm-kernel/20240307133306.383045-1-fabrice.gasnier@foss.st.com/ Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm/boot/dts/st/stm32mp151.dtsi | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit ec9bd8e7c06d8aa3c4440b7536771a4de6f64a3e Author: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Date: Mon Dec 16 16:39:04 2024 +0100 ARM: dts: stm32: populate all timer counter nodes on stm32mp13 Counter driver originally had support limited to quadrature interface and simple counter. It has been improved[1], so add the remaining stm32 timer counter nodes. [1] https://lore.kernel.org/linux-arm-kernel/20240307133306.383045-1-fabrice.gasnier@foss.st.com/ Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm/boot/dts/st/stm32mp131.dtsi | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit b73e56f16250c6124f8975636f1844472f6fd450 Merge: 29b540795b42 560d958c6c68 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 19 19:51:17 2024 -0800 Merge branch 'xdp-a-fistful-of-generic-changes-pt-iii' Alexander Lobakin says: ==================== xdp: a fistful of generic changes pt. III XDP for idpf is currently 5.(6) chapters: * convert Rx to libeth; * convert Tx and stats to libeth; * generic XDP and XSk code changes; * generic XDP and XSk code additions pt. 1; * generic XDP and XSk code additions pt. 2 (you are here); * actual XDP for idpf via new libeth_xdp; * XSk for idpf (via ^). Part III.3 does the following: * adds generic functions to build skbs from xdp_buffs (regular and XSk) and attach frags to xdp_buffs (regular and XSk); * adds helper to optimize XSk xmit in drivers. Everything is prereq for libeth_xdp, but will be useful standalone as well: less code in drivers, faster XSk XDP_PASS, smaller object code. ==================== Link: https://patch.msgid.link/20241218174435.1445282-1-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 560d958c6c68fa62ddb4bd6f890c363598d184b0 Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Wed Dec 18 18:44:33 2024 +0100 xsk: add generic XSk &xdp_buff -> skb conversion Same as with converting &xdp_buff to skb on Rx, the code which allocates a new skb and copies the XSk frame there is identical across the drivers, so make it generic. This includes copying all the frags if they are present in the original buff. System percpu page_pools greatly improve XDP_PASS performance on XSk: instead of page_alloc() + page_free(), the net core recycles the same pages, so the only overhead left is memcpy()s. When the Page Pool is not compiled in, the whole function is a return-NULL (but it always gets selected when eBPF is enabled). Note that the passed buff gets freed if the conversion is done w/o any error, assuming you don't need this buffer after you convert it to an skb. Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/20241218174435.1445282-6-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/xdp.h | 1 + net/core/xdp.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) commit 51205f841a495c78aa59d0e41683463dac23eb27 Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Wed Dec 18 18:44:32 2024 +0100 xsk: make xsk_buff_add_frag() really add the frag via __xdp_buff_add_frag() Currently, xsk_buff_add_frag() only adds the frag to pool's linked list, not doing anything with the &xdp_buff. The drivers do that manually and the logic is the same. Make it really add an skb frag, just like xdp_buff_add_frag() does that, and freeing frags on error if needed. This allows to remove repeating code from i40e and ice and not add the same code again and again. Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/20241218174435.1445282-5-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/i40e/i40e_xsk.c | 30 +++------------------------- drivers/net/ethernet/intel/ice/ice_xsk.c | 32 ++---------------------------- include/net/xdp_sock_drv.h | 18 ++++++++++++++--- 3 files changed, 20 insertions(+), 60 deletions(-) commit 539c1fba1ac77184215d892eda0857f5687b7366 Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Wed Dec 18 18:44:31 2024 +0100 xdp: add generic xdp_build_skb_from_buff() The code which builds an skb from an &xdp_buff keeps multiplying itself around the drivers with almost no changes. Let's try to stop that by adding a generic function. Unlike __xdp_build_skb_from_frame(), always allocate an skbuff head using napi_build_skb() and make use of the available xdp_rxq pointer to assign the Rx queue index. In case of PP-backed buffer, mark the skb to be recycled, as every PP user's been switched to recycle skbs. Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/20241218174435.1445282-4-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/xdp.h | 1 + net/core/xdp.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) commit 68ddc8ae17685a8c4ac78260bde8fe4a79511aef Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Wed Dec 18 18:44:30 2024 +0100 xdp: add generic xdp_buff_add_frag() The code piece which would attach a frag to &xdp_buff is almost identical across the drivers supporting XDP multi-buffer on Rx. Make it a generic elegant "oneliner". Also, I see lots of drivers calculating frags_truesize as `xdp->frame_sz * nr_frags`. I can't say this is fully correct, since frags might be backed by chunks of different sizes, especially with stuff like the header split. Even page_pool_alloc() can give you two different truesizes on two subsequent requests to allocate the same buffer size. Add a field to &skb_shared_info (unionized as there's no free slot currently on x86_64) to track the "true" truesize. It can be used later when updating the skb. Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/20241218174435.1445282-3-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/linux/skbuff.h | 16 ++++++--- include/net/xdp.h | 96 +++++++++++++++++++++++++++++++++++++++++++++++++- net/core/xdp.c | 11 ++++++ 3 files changed, 118 insertions(+), 5 deletions(-) commit a19d0236f466f1ce8f44a04a96c302d3023eebf4 Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Wed Dec 18 18:44:29 2024 +0100 page_pool: add page_pool_dev_alloc_netmem() Similarly to other _dev shorthands, add one for page_pool_alloc_netmem() to allocate a netmem using the default Rx GFP flags (ATOMIC | NOWARN) to make the page -> netmem transition of drivers easier. Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/20241218174435.1445282-2-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/page_pool/helpers.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 29b540795b42a3e610c0d5e9d908a8d6c1333676 Author: Guillaume Nault <gnault@redhat.com> Date: Wed Dec 18 14:17:16 2024 +0100 gre: Drop ip_route_output_gre(). We already have enough variants of ip_route_output*() functions. We don't need a GRE specific one in the generic route.h header file. Furthermore, ip_route_output_gre() is only used once, in ipgre_open(), where it can be easily replaced by a simple call to ip_route_output_key(). While there, and for clarity, explicitly set .flowi4_scope to RT_SCOPE_UNIVERSE instead of relying on the implicit zero initialisation. Signed-off-by: Guillaume Nault <gnault@redhat.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Link: https://patch.msgid.link/ab7cba47b8558cd4bfe2dc843c38b622a95ee48e.1734527729.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/route.h | 14 -------------- net/ipv4/ip_gre.c | 17 ++++++++++------- 2 files changed, 10 insertions(+), 21 deletions(-) commit 5155cbcdbf03f207095f9a3794942a25aa7e5f58 Author: Florent Revest <revest@chromium.org> Date: Wed Dec 18 15:33:34 2024 +0100 af_unix: Add a prompt to CONFIG_AF_UNIX_OOB This makes it possible to disable the MSG_OOB support in .config. Signed-off-by: Florent Revest <revest@chromium.org> Reviewed-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20241218143334.1507465-1-revest@chromium.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/unix/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6724bc65e59b57e64f65269da8956f8bdc12bb03 Author: Jamal Hadi Salim <jhs@mojatatu.com> Date: Wed Dec 18 09:00:18 2024 -0500 selftests: net: remove redundant ncdevmem print Remove extrenous fprintf Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Reviewed-by: Mina Almasry <almasrymina@google.com> Link: https://patch.msgid.link/20241218140018.15607-1-jhs@mojatatu.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/selftests/drivers/net/hw/ncdevmem.c | 3 --- 1 file changed, 3 deletions(-) commit 455e135c3042540cf15fff629a56600c11bea396 Author: Andy Moreton <andy.moreton@amd.com> Date: Wed Dec 18 13:59:30 2024 +0000 sfc: remove efx_writed_page_locked From: Andy Moreton <andy.moreton@amd.com> efx_writed_page_locked is a workaround for Siena hardware that is not needed on later adapters, and has no callers. Remove it. Signed-off-by: Andy Moreton <andy.moreton@amd.com> Signed-off-by: Edward Cree <ecree.xilinx@gmail.com> Link: https://patch.msgid.link/20241218135930.2350358-1-edward.cree@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/sfc/io.h | 24 ------------------------ 1 file changed, 24 deletions(-) commit 5c98e89d96ecbf0e4ed38a20c46727c0ed2c112b Author: Furong Xu <0x1207@gmail.com> Date: Wed Dec 18 16:34:07 2024 +0800 net: stmmac: Drop useless code related to ethtool rx-copybreak After commit 2af6106ae949 ("net: stmmac: Introducing support for Page Pool"), the driver always copies frames to get a better performance, zero-copy for RX frames is no more, then these code turned to be useless and users of ethtool may get confused about the unhandled rx-copybreak parameter. This patch mostly reverts commit 22ad38381547 ("stmmac: do not perform zero-copy for rx frames") Signed-off-by: Furong Xu <0x1207@gmail.com> Link: https://patch.msgid.link/20241218083407.390509-1-0x1207@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 -- .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 39 ---------------------- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 --- 3 files changed, 46 deletions(-) commit f6038d913b13b41dcaf10ff2a89f76d7ffac9edc Author: Mina Almasry <almasrymina@google.com> Date: Tue Dec 17 20:12:06 2024 +0000 net: Document netmem driver support Document expectations from drivers looking to add support for device memory tcp or other netmem based features. Signed-off-by: Mina Almasry <almasrymina@google.com> Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com> Reviewed-by: Shannon Nelson <shannon.nelson@amd.com> Link: https://patch.msgid.link/20241217201206.2360389-1-almasrymina@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Documentation/networking/index.rst | 1 + Documentation/networking/netmem.rst | 79 +++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) commit 0c7469ee718e1dd929f52bfb142a7f6fb68f0765 Author: Lorenzo Bianconi <lorenzo@kernel.org> Date: Mon Dec 16 18:47:33 2024 +0100 net: airoha: Fix error path in airoha_probe() Do not run napi_disable() if airoha_hw_init() fails since Tx/Rx napi has not been started yet. In order to fix the issue, introduce airoha_qdma_stop_napi routine and remove napi_disable in airoha_hw_cleanup(). Fixes: 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC") Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20241216-airoha_probe-error-path-fix-v2-1-6b10e04e9a5c@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mediatek/airoha_eth.c | 33 ++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) commit 5fde7edadea66eb2a71ab4ceef2cd8e5a0273da9 Merge: e8f33238052b c9f5a5dabbf5 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 19 19:07:54 2024 -0800 Merge branch 'net-add-and-use-phy_disable_eee' Heiner Kallweit says: ==================== net: add and use phy_disable_eee If a MAC driver doesn't support EEE, then the PHY shouldn't advertise it. Add phy_disable_eee() for this purpose, and use it in cpsw driver. ==================== Link: https://patch.msgid.link/5139374e-7151-4d0d-8ba9-9ec3d9b52f67@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit c9f5a5dabbf5ab53a6392d7c782d373d2c892e21 Author: Heiner Kallweit <hkallweit1@gmail.com> Date: Mon Dec 16 22:32:25 2024 +0100 net: ethernet: ti: cpsw: disable PHY EEE advertisement It seems the cpsw MAC doesn't support EEE. See e.g. the commit message of ce2899428ec0 ("ARM: dts: am335x-baltos: disable EEE for Atheros 8035 PHY"). There are cases where this causes issues if the PHY's on both sides have negotiated EEE. As a workaround EEE modes of the PHY are marked broken in DT, effectively disabling EEE advertisement. Improve this by using new function phy_disable_eee() in the MAC driver. This properly disables EEE advertisement, and allows to remove the eee-broken-xxx properties from DT. As EEE is disabled anyway, we can remove also the set_eee ethtool op. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/d08a798e-8565-422c-b2ed-121794db077f@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/ti/cpsw.c | 3 ++- drivers/net/ethernet/ti/cpsw_ethtool.c | 12 ------------ drivers/net/ethernet/ti/cpsw_new.c | 3 ++- drivers/net/ethernet/ti/cpsw_priv.h | 1 - 4 files changed, 4 insertions(+), 15 deletions(-) commit b55498ff14bd14860d48dc8d2a0b6889b218c408 Author: Heiner Kallweit <hkallweit1@gmail.com> Date: Mon Dec 16 22:31:18 2024 +0100 net: phy: add phy_disable_eee If a MAC driver doesn't support EEE, then the PHY shouldn't advertise it. Add phy_disable_eee() for this purpose. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/fd51738c-dcd6-4d61-b8c5-faa6ac0f1026@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phy_device.c | 16 ++++++++++++++++ include/linux/phy.h | 1 + 2 files changed, 17 insertions(+) commit e8f33238052b41d20a115bce527e4ee532dc509c Merge: 75e2c86c7b18 8ab3bf476413 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 19 18:54:07 2024 -0800 Merge tag 'wireless-next-2024-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.14 Multi-Link Operation implementation continues, both in stack and in drivers. Otherwise it has been relatively quiet. Major changes: cfg80211/mac80211 - define wiphy guard - get TX power per link - EHT 320 MHz channel support for mesh ath11k - QCA6698AQ support ath9k - RX inactivity detection rtl8xxxu - add more USB device IDs rtw88 - add more USB device IDs - enable USB RX aggregation and USB 3 to improve performance rtw89 - PowerSave flow for Multi-Link Operation * tag 'wireless-next-2024-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (121 commits) wifi: wlcore: sysfs: constify 'struct bin_attribute' wifi: brcmfmac: clarify unmodifiable headroom log message wifi: brcmfmac: add missing header include for brcmf_dbg wifi: brcmsmac: add gain range check to wlc_phy_iqcal_gainparams_nphy() wifi: qtnfmac: fix spelling error in core.h wifi: rtw89: phy: add dummy C2H event handler for report of TAS power wifi: rtw89: 8851b: rfk: remove unnecessary assignment of return value of _dpk_dgain_read() wifi: rtw89: 8852c: rfk: refine target channel calculation in _rx_dck_channel_calc() wifi: rtlwifi: pci: wait for firmware loading before releasing memory wifi: rtlwifi: fix memory leaks and invalid access at probe error path wifi: rtlwifi: destroy workqueue at rtl_deinit_core wifi: rtlwifi: remove unused check_buddy_priv wifi: rtw89: 8922a: update format of RFK pre-notify H2C command v2 wifi: rtw89: regd: update regulatory map to R68-R51 wifi: rtw89: 8852c: disable ER SU when 4x HE-LTF and 0.8 GI capability differ wifi: rtw89: disable firmware training HE GI and LTF wifi: rtw89: ps: update data for firmware and settings for hardware before/after PS wifi: rtw89: ps: refactor channel info to firmware before entering PS wifi: rtw89: ps: refactor PS flow to support MLO wifi: mwifiex: decrease timeout waiting for host sleep from 10s to 5s ... ==================== Link: https://patch.msgid.link/20241219185709.774EDC4CECE@smtp.kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 75e2c86c7b180fd1068ad271178c2820a199e7eb Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Dec 17 18:44:00 2024 -0800 net: netlink: catch attempts to send empty messages syzbot can figure out a way to redirect a netlink message to a tap. Sending empty skbs to devices is not valid and we end up hitting a skb_assert_len() in __dev_queue_xmit(). Make catching these mistakes easier, assert the skb size directly in netlink core. Reviewed-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20241218024400.824355-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/netlink/af_netlink.c | 1 + 1 file changed, 1 insertion(+) commit 3fc87cb94f5f3224a9ea168ee935286d915d2a6a Author: Tristram Ha <tristram.ha@microchip.com> Date: Tue Dec 17 18:03:11 2024 -0800 net: dsa: microchip: Add suspend/resume support to KSZ DSA driver The KSZ DSA driver starts a timer to read MIB counters periodically to avoid count overrun. During system suspend this will give an error for not able to write to register as the SPI system returns an error when it is in suspend state. This implementation stops the timer when the system goes into suspend and restarts it when resumed. Signed-off-by: Tristram Ha <tristram.ha@microchip.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241218020311.70628-1-Tristram.Ha@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/microchip/ksz9477_i2c.c | 4 ++++ drivers/net/dsa/microchip/ksz_common.c | 37 +++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 2 ++ drivers/net/dsa/microchip/ksz_spi.c | 4 ++++ 4 files changed, 47 insertions(+) commit d5872aa262069e08c7260fa183c8ff850a8eb55b Merge: 07e5c4eb94e6 73df38b097a6 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 19 17:30:03 2024 -0800 Merge branch 'bnxt_en-driver-update' Michael Chan says: ==================== bnxt_en: Driver update The first patch configures context memory for RoCE resources based on FW limits. The next 4 patches restrict certain ethtool operations when they are not supported. The last patch adds Pavan Chebbi as co-maintainer of the driver. v1: https://lore.kernel.org/20241215205943.2341612-1-michael.chan@broadcom.com ==================== Link: https://patch.msgid.link/20241217182620.2454075-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 73df38b097a608ee5d0054211e6cb479c8edad91 Author: Michael Chan <michael.chan@broadcom.com> Date: Tue Dec 17 10:26:20 2024 -0800 MAINTAINERS: bnxt_en: Add Pavan Chebbi as co-maintainer Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20241217182620.2454075-7-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit bf2afe0f1493e992852df4a58e4aabd01ab8b384 Author: Michael Chan <michael.chan@broadcom.com> Date: Tue Dec 17 10:26:19 2024 -0800 bnxt_en: Skip reading PXP registers during ethtool -d if unsupported Newer firmware does not allow reading the PXP registers during ethtool -d, so skip the firmware call in that case. Userspace (bnxt.c) always expects the register block to be populated so zeroes will be returned instead. Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20241217182620.2454075-6-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b45a850585ca0cc45f7fe0f83be33a769ecc43ab Author: Michael Chan <michael.chan@broadcom.com> Date: Tue Dec 17 10:26:18 2024 -0800 bnxt_en: Skip MAC loopback selftest if it is unsupported by FW Call the new HWRM_PORT_MAC_QCAPS to check if mac loopback is supported. Skip the MAC loopback ethtool self test if it is not supported. Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Link: https://patch.msgid.link/20241217182620.2454075-5-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 24 +++++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 5 +++++ drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 11 +++++++---- 3 files changed, 36 insertions(+), 4 deletions(-) commit 36d1e70a90e98c59ee6635552db243d9ebc3c5ea Author: Michael Chan <michael.chan@broadcom.com> Date: Tue Dec 17 10:26:17 2024 -0800 bnxt_en: Skip PHY loopback ethtool selftest if unsupported by FW Skip PHY loopback selftest if firmware advertises that it is unsupported in the HWRM_PORT_PHY_QCAPS call. Only show PHY loopback test result to be 0 if the test has run and passes. Do the same for external loopback to be consistent. Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20241217182620.2454075-4-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit fac5472fc845115ea543acbe9b183d330d6277ed Author: Michael Chan <michael.chan@broadcom.com> Date: Tue Dec 17 10:26:16 2024 -0800 bnxt_en: Do not allow ethtool -m on an untrusted VF Block all ethtool module operations on an untrusted VF. The firmware won't allow it and will return error. Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20241217182620.2454075-3-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 5 +++++ drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 12 ++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) commit b1b66ae094cd2aa49c6841683cb7846bd46f38ca Author: Hongguang Gao <hongguang.gao@broadcom.com> Date: Tue Dec 17 10:26:15 2024 -0800 bnxt_en: Use FW defined resource limits for RoCE If FW supports setting resource limits for RoCE, then just use the FW limits instead of using some fixed values in the driver. These limits will be used to allocate context memory for QP, SRQ, AH, and MR resources for RoCE. Reviewed-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Hongguang Gao <hongguang.gao@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20241217182620.2454075-2-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 41 +++++++++++++++++++-------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 3 ++ drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 2 ++ drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 2 ++ 4 files changed, 36 insertions(+), 12 deletions(-) commit db9d8eca3dc97d8d91d5e3fd878fb0bd0d8346d6 Author: Hans de Goede <hdegoede@redhat.com> Date: Sun Dec 15 18:21:26 2024 +0100 power: supply: ug3105_battery: Let the core handle POWER_SUPPLY_PROP_TECHNOLOGY The power-supply core already takes care of handling POWER_SUPPLY_PROP_TECHNOLOGY based on the battery_info. Drop the unnecessary handling from the driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241215172133.178460-4-hdegoede@redhat.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ug3105_battery.c | 4 ---- 1 file changed, 4 deletions(-) commit de68987480cb92702eab14cf62ec2aa1bae5c867 Author: Dimitri Fedrau <dimitri.fedrau@liebherr.com> Date: Wed Dec 18 09:35:01 2024 +0100 power: supply: gpio-charger: add support for default charge current limit With DT properties charge-current-limit-gpios and charge-current-limit-mapping one can define charge current limits in uA using up to 32 GPIOs. At the moment the driver defaults to smallest charge current limitation for safety reasons. When disabling charging is supported, which should be common, the driver defaults to non charging on probe. By having a default, charging can be enabled on probe for such devices. Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com> Link: https://lore.kernel.org/r/20241218-default-charge-current-limit-v3-2-b26118cf06b5@liebherr.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/gpio-charger.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 0a219d6fd7ab89177a6fa49539def43694154d50 Author: Dimitri Fedrau <dimitri.fedrau@liebherr.com> Date: Wed Dec 18 09:35:00 2024 +0100 dt-bindings: power: supply: gpio-charger: add support for default charge current limit With DT properties charge-current-limit-gpios and charge-current-limit-mapping one can define charge current limits in uA using up to 32 GPIOs. Add property charge-current-limit-default-microamp which selects a default charge current limit that must be listed in charge-current-limit-mapping. This is helpful when the smallest possible charge current limit is 0uA. The driver defaults to the smallest possible value at the moment, which disables charging on probe. With the default its possible to setup a safe charge current limit. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com> Link: https://lore.kernel.org/r/20241218-default-charge-current-limit-v3-1-b26118cf06b5@liebherr.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Documentation/devicetree/bindings/power/supply/gpio-charger.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 04d9741493e7a1d17d2109f4c9ea21f3314666b4 Author: Hans de Goede <hdegoede@redhat.com> Date: Sun Dec 15 18:21:24 2024 +0100 power: supply: Use power_supply_external_power_changed() in __power_supply_changed_work() The power-supply core is designed so that power-supply driver callbacks such as get_property() and external_power_changed() will not be called until the power-supply's parent driver's probe() function has completed. There is a race where power_supply_changed() can be called for a supplier of a power-supply which is being probed after the device_add() in __power_supply_register() but before the parent driver's probe() function has completed. Hitting this race breaks the power-supply core's design to not call power-supply driver callbacks before probe() completion. This problem is caused by __power_supply_changed_work() calling the external_power_changed() directly rather then going through the power_supply_external_power_changed() helper which correcly checks psy->use_cnt . Switch to using power_supply_external_power_changed() to fix this race. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241215172133.178460-2-hdegoede@redhat.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/power_supply_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a8d0aa0e7fcd20c9f1992688c0f0d07a68287403 Author: Michal Wajdeczko <michal.wajdeczko@intel.com> Date: Mon Dec 16 23:32:53 2024 +0100 drm/xe/pf: Use correct function to check LMEM provisioning There is a typo in function call and instead of VF LMEM we were looking at VF GGTT provisioning. Fix that. Fixes: 234670cea9a2 ("drm/xe/pf: Skip fair VFs provisioning if already provisioned") Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Piotr Piórkowski <piotr.piorkowski@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241216223253.819-1-michal.wajdeczko@intel.com drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d0d8c8989d352b545ce1e52ad82e9f3503335f1 Author: Xin Liu <quic_liuxin@quicinc.com> Date: Mon Dec 16 16:06:40 2024 +0800 arm64: dts: qcom: qcs8300: Add watchdog node Add the watchdog node for QCS8300 SoC. Signed-off-by: Xin Liu <quic_liuxin@quicinc.com> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit a317017f47f6525dff59517dadb2af30b5f58f57 Author: Nathan Chancellor <nathan@kernel.org> Date: Wed Jul 24 08:49:35 2024 -0700 drm/amd/display: Reapply fdedd77b0eb3 Commit 2563391e57b5 ("drm/amd/display: DML2.1 resynchronization") blew away the compiler warning fix from commit 2fde4fdddc1f ("drm/amd/display: Avoid -Wenum-float-conversion in add_margin_and_round_to_dfs_grainularity()"), causing the warning to reappear. drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c:183:58: error: arithmetic between enumeration type 'enum dentist_divider_range' and floating-point type 'double' [-Werror,-Wenum-float-conversion] 183 | divider = (unsigned int)(DFS_DIVIDER_RANGE_SCALE_FACTOR * (vco_freq_khz / clock_khz)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Apply the fix again to resolve the warning. Re-apply again after commit be4e3509314a ("drm/amd/display: DML21 Reintegration For Various Fixes") This should be making its way back to the original DML trees this time. (Alex) Fixes: be4e3509314a ("drm/amd/display: DML21 Reintegration For Various Fixes") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3841 Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab75a0d2e07942ae15d32c0a5092fd336451378c Author: Melissa Wen <mwen@igalia.com> Date: Tue Dec 17 17:45:05 2024 -0300 drm/amd/display: fix divide error in DM plane scale calcs dm_get_plane_scale doesn't take into account plane scaled size equal to zero, leading to a kernel oops due to division by zero. Fix by setting out-scale size as zero when the dst size is zero, similar to what is done by drm_calc_scale(). This issue started with the introduction of cursor ovelay mode that uses this function to assess cursor mode changes via dm_crtc_get_cursor_mode() before checking plane state. [Dec17 17:14] Oops: divide error: 0000 [#1] PREEMPT SMP NOPTI [ +0.000018] CPU: 5 PID: 1660 Comm: surface-DP-1 Not tainted 6.10.0+ #231 [ +0.000007] Hardware name: Valve Jupiter/Jupiter, BIOS F7A0131 01/30/2024 [ +0.000004] RIP: 0010:dm_get_plane_scale+0x3f/0x60 [amdgpu] [ +0.000553] Code: 44 0f b7 41 3a 44 0f b7 49 3e 83 e0 0f 48 0f a3 c2 73 21 69 41 28 e8 03 00 00 31 d2 41 f7 f1 31 d2 89 06 69 41 2c e8 03 00 00 <41> f7 f0 89 07 e9 d7 d8 7e e9 44 89 c8 45 89 c1 41 89 c0 eb d4 66 [ +0.000005] RSP: 0018:ffffa8df0de6b8a0 EFLAGS: 00010246 [ +0.000006] RAX: 00000000000003e8 RBX: ffff9ac65c1f6e00 RCX: ffff9ac65d055500 [ +0.000003] RDX: 0000000000000000 RSI: ffffa8df0de6b8b0 RDI: ffffa8df0de6b8b4 [ +0.000004] RBP: ffff9ac64e7a5800 R08: 0000000000000000 R09: 0000000000000a00 [ +0.000003] R10: 00000000000000ff R11: 0000000000000054 R12: ffff9ac6d0700010 [ +0.000003] R13: ffff9ac65d054f00 R14: ffff9ac65d055500 R15: ffff9ac64e7a60a0 [ +0.000004] FS: 00007f869ea00640(0000) GS:ffff9ac970080000(0000) knlGS:0000000000000000 [ +0.000004] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ +0.000003] CR2: 000055ca701becd0 CR3: 000000010e7f2000 CR4: 0000000000350ef0 [ +0.000004] Call Trace: [ +0.000007] <TASK> [ +0.000006] ? __die_body.cold+0x19/0x27 [ +0.000009] ? die+0x2e/0x50 [ +0.000007] ? do_trap+0xca/0x110 [ +0.000007] ? do_error_trap+0x6a/0x90 [ +0.000006] ? dm_get_plane_scale+0x3f/0x60 [amdgpu] [ +0.000504] ? exc_divide_error+0x38/0x50 [ +0.000005] ? dm_get_plane_scale+0x3f/0x60 [amdgpu] [ +0.000488] ? asm_exc_divide_error+0x1a/0x20 [ +0.000011] ? dm_get_plane_scale+0x3f/0x60 [amdgpu] [ +0.000593] dm_crtc_get_cursor_mode+0x33f/0x430 [amdgpu] [ +0.000562] amdgpu_dm_atomic_check+0x2ef/0x1770 [amdgpu] [ +0.000501] drm_atomic_check_only+0x5e1/0xa30 [drm] [ +0.000047] drm_mode_atomic_ioctl+0x832/0xcb0 [drm] [ +0.000050] ? __pfx_drm_mode_atomic_ioctl+0x10/0x10 [drm] [ +0.000047] drm_ioctl_kernel+0xb3/0x100 [drm] [ +0.000062] drm_ioctl+0x27a/0x4f0 [drm] [ +0.000049] ? __pfx_drm_mode_atomic_ioctl+0x10/0x10 [drm] [ +0.000055] amdgpu_drm_ioctl+0x4e/0x90 [amdgpu] [ +0.000360] __x64_sys_ioctl+0x97/0xd0 [ +0.000010] do_syscall_64+0x82/0x190 [ +0.000008] ? __pfx_drm_mode_createblob_ioctl+0x10/0x10 [drm] [ +0.000044] ? srso_return_thunk+0x5/0x5f [ +0.000006] ? drm_ioctl_kernel+0xb3/0x100 [drm] [ +0.000040] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? __check_object_size+0x50/0x220 [ +0.000007] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? drm_ioctl+0x2a4/0x4f0 [drm] [ +0.000039] ? __pfx_drm_mode_createblob_ioctl+0x10/0x10 [drm] [ +0.000043] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? __pm_runtime_suspend+0x69/0xc0 [ +0.000006] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? amdgpu_drm_ioctl+0x71/0x90 [amdgpu] [ +0.000366] ? srso_return_thunk+0x5/0x5f [ +0.000006] ? syscall_exit_to_user_mode+0x77/0x210 [ +0.000007] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? do_syscall_64+0x8e/0x190 [ +0.000006] ? srso_return_thunk+0x5/0x5f [ +0.000006] ? do_syscall_64+0x8e/0x190 [ +0.000006] ? srso_return_thunk+0x5/0x5f [ +0.000007] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ +0.000008] RIP: 0033:0x55bb7cd962bc [ +0.000007] Code: 4c 89 6c 24 18 4c 89 64 24 20 4c 89 74 24 28 0f 57 c0 0f 11 44 24 30 89 c7 48 8d 54 24 08 b8 10 00 00 00 be bc 64 38 c0 0f 05 <49> 89 c7 48 83 3b 00 74 09 4c 89 c7 ff 15 62 64 99 00 48 83 7b 18 [ +0.000005] RSP: 002b:00007f869e9f4da0 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ +0.000007] RAX: ffffffffffffffda RBX: 00007f869e9f4fb8 RCX: 000055bb7cd962bc [ +0.000004] RDX: 00007f869e9f4da8 RSI: 00000000c03864bc RDI: 000000000000003b [ +0.000003] RBP: 000055bb9ddcbcc0 R08: 00007f86541b9920 R09: 0000000000000009 [ +0.000004] R10: 0000000000000004 R11: 0000000000000217 R12: 00007f865406c6b0 [ +0.000003] R13: 00007f86541b5290 R14: 00007f865410b700 R15: 000055bb9ddcbc18 [ +0.000009] </TASK> Fixes: 1b04dcca4fb1 ("drm/amd/display: Introduce overlay cursor mode") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3729 Reported-by: Fabio Scaccabarozzi <fsvm88@gmail.com> Co-developed-by: Fabio Scaccabarozzi <fsvm88@gmail.com> Signed-off-by: Fabio Scaccabarozzi <fsvm88@gmail.com> Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b8d6daffc871a42026c3c20bff7b8fa0302298c1 Author: Melissa Wen <mwen@igalia.com> Date: Tue Dec 17 17:45:04 2024 -0300 drm/amd/display: increase MAX_SURFACES to the value supported by hw As the hw supports up to 4 surfaces, increase the maximum number of surfaces to prevent the DC error when trying to use more than three planes. [drm:dc_state_add_plane [amdgpu]] *ERROR* Surface: can not attach plane_state 000000003e2cb82c! Maximum is: 3 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3693 Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c86c81a86c60f9b15d3e3f43af0363cf56063e7 Author: Melissa Wen <mwen@igalia.com> Date: Tue Dec 17 17:45:03 2024 -0300 drm/amd/display: fix page fault due to max surface definition mismatch DC driver is using two different values to define the maximum number of surfaces: MAX_SURFACES and MAX_SURFACE_NUM. Consolidate MAX_SURFACES as the unique definition for surface updates across DC. It fixes page fault faced by Cosmic users on AMD display versions that support two overlay planes, since the introduction of cursor overlay mode. [Nov26 21:33] BUG: unable to handle page fault for address: 0000000051d0f08b [ +0.000015] #PF: supervisor read access in kernel mode [ +0.000006] #PF: error_code(0x0000) - not-present page [ +0.000005] PGD 0 P4D 0 [ +0.000007] Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI [ +0.000006] CPU: 4 PID: 71 Comm: kworker/u32:6 Not tainted 6.10.0+ #300 [ +0.000006] Hardware name: Valve Jupiter/Jupiter, BIOS F7A0131 01/30/2024 [ +0.000007] Workqueue: events_unbound commit_work [drm_kms_helper] [ +0.000040] RIP: 0010:copy_stream_update_to_stream.isra.0+0x30d/0x750 [amdgpu] [ +0.000847] Code: 8b 10 49 89 94 24 f8 00 00 00 48 8b 50 08 49 89 94 24 00 01 00 00 8b 40 10 41 89 84 24 08 01 00 00 49 8b 45 78 48 85 c0 74 0b <0f> b6 00 41 88 84 24 90 64 00 00 49 8b 45 60 48 85 c0 74 3b 48 8b [ +0.000010] RSP: 0018:ffffc203802f79a0 EFLAGS: 00010206 [ +0.000009] RAX: 0000000051d0f08b RBX: 0000000000000004 RCX: ffff9f964f0a8070 [ +0.000004] RDX: ffff9f9710f90e40 RSI: ffff9f96600c8000 RDI: ffff9f964f000000 [ +0.000004] RBP: ffffc203802f79f8 R08: 0000000000000000 R09: 0000000000000000 [ +0.000005] R10: 0000000000000000 R11: 0000000000000000 R12: ffff9f96600c8000 [ +0.000004] R13: ffff9f9710f90e40 R14: ffff9f964f000000 R15: ffff9f96600c8000 [ +0.000004] FS: 0000000000000000(0000) GS:ffff9f9970000000(0000) knlGS:0000000000000000 [ +0.000005] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ +0.000005] CR2: 0000000051d0f08b CR3: 00000002e6a20000 CR4: 0000000000350ef0 [ +0.000005] Call Trace: [ +0.000011] <TASK> [ +0.000010] ? __die_body.cold+0x19/0x27 [ +0.000012] ? page_fault_oops+0x15a/0x2d0 [ +0.000014] ? exc_page_fault+0x7e/0x180 [ +0.000009] ? asm_exc_page_fault+0x26/0x30 [ +0.000013] ? copy_stream_update_to_stream.isra.0+0x30d/0x750 [amdgpu] [ +0.000739] ? dc_commit_state_no_check+0xd6c/0xe70 [amdgpu] [ +0.000470] update_planes_and_stream_state+0x49b/0x4f0 [amdgpu] [ +0.000450] ? srso_return_thunk+0x5/0x5f [ +0.000009] ? commit_minimal_transition_state+0x239/0x3d0 [amdgpu] [ +0.000446] update_planes_and_stream_v2+0x24a/0x590 [amdgpu] [ +0.000464] ? srso_return_thunk+0x5/0x5f [ +0.000009] ? sort+0x31/0x50 [ +0.000007] ? amdgpu_dm_atomic_commit_tail+0x159f/0x3a30 [amdgpu] [ +0.000508] ? srso_return_thunk+0x5/0x5f [ +0.000009] ? amdgpu_crtc_get_scanout_position+0x28/0x40 [amdgpu] [ +0.000377] ? srso_return_thunk+0x5/0x5f [ +0.000009] ? drm_crtc_vblank_helper_get_vblank_timestamp_internal+0x160/0x390 [drm] [ +0.000058] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? dma_fence_default_wait+0x8c/0x260 [ +0.000010] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? wait_for_completion_timeout+0x13b/0x170 [ +0.000006] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? dma_fence_wait_timeout+0x108/0x140 [ +0.000010] ? commit_tail+0x94/0x130 [drm_kms_helper] [ +0.000024] ? process_one_work+0x177/0x330 [ +0.000008] ? worker_thread+0x266/0x3a0 [ +0.000006] ? __pfx_worker_thread+0x10/0x10 [ +0.000004] ? kthread+0xd2/0x100 [ +0.000006] ? __pfx_kthread+0x10/0x10 [ +0.000006] ? ret_from_fork+0x34/0x50 [ +0.000004] ? __pfx_kthread+0x10/0x10 [ +0.000005] ? ret_from_fork_asm+0x1a/0x30 [ +0.000011] </TASK> Fixes: 1b04dcca4fb1 ("drm/amd/display: Introduce overlay cursor mode") Suggested-by: Leo Li <sunpeng.li@amd.com> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3693 Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_state.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_stream.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 1 - drivers/gpu/drm/amd/display/dc/dml2/dml2_mall_phantom.c | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) commit 3782305ce5807c18fbf092124b9e8303cf1723ae Author: Alex Hung <alex.hung@amd.com> Date: Tue Dec 17 14:03:50 2024 -0700 drm/amd/display: Remove unnecessary amdgpu_irq_get/put [WHY & HOW] commit 7fb363c57522 ("drm/amd/display: Let drm_crtc_vblank_on/off manage interrupts") lets drm_crtc_vblank_* to manage interrupts in amdgpu_dm_crtc_set_vblank, and amdgpu_irq_get/put do not need to be called here. Part of that patch got lost somehow, so fix it up. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 31 ----------------------- 1 file changed, 31 deletions(-) commit d678c63534ed0d0fe52ff95cea83808f6f0ae382 Merge: 8368e9719de1 1e93f594285f Author: Dave Airlie <airlied@redhat.com> Date: Fri Dec 20 07:57:30 2024 +1000 Merge tag 'drm-misc-next-2024-12-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for 6.14: UAPI Changes: Cross-subsystem Changes: Core Changes: - connector: Add a mutex to protect ELD access, Add a helper to create a connector in two steps Driver Changes: - amdxdna: Add RyzenAI-npu6 Support, various improvements - rcar-du: Add r8a779h0 Support - rockchip: various improvements - zynqmp: Add DP audio support - bridges: - ti-sn65dsi83: Add ti,lvds-vod-swing optional properties - panels: - new panels: Tianma TM070JDHG34-00, Multi-Inno Technology MI1010Z1T-1CP11 Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <mripard@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241219-truthful-demonic-hound-598f63@houat commit fbd7a5a0359bc770e898d918d84977ea61163aad Author: Lyude Paul <lyude@redhat.com> Date: Mon Nov 25 15:40:58 2024 -0500 rust: sync: Add lock::Backend::assert_is_held() Since we've exposed Lock::from_raw() and Guard::new() publically, we want to be able to make sure that we assert that a lock is actually held when constructing a Guard for it to handle instances of unsafe Guard::new() calls outside of our lock module. Hence add a new method assert_is_held() to Backend, which uses lockdep to check whether or not a lock has been acquired. When lockdep is disabled, this has no overhead. [Boqun: Resolve the conflicts with exposing Guard::new(), reword the commit log a bit and format "unsafe { <statement>; }" into "unsafe { <statement> }" for the consistency. ] Signed-off-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20241125204139.656801-1-lyude@redhat.com rust/helpers/mutex.c | 5 +++++ rust/helpers/spinlock.c | 5 +++++ rust/kernel/sync/lock.rs | 10 ++++++++++ rust/kernel/sync/lock/mutex.rs | 5 +++++ rust/kernel/sync/lock/spinlock.rs | 5 +++++ 5 files changed, 30 insertions(+) commit eb5ccb038284dc0e69822d71aafcbf7b57394aad Author: Lyude Paul <lyude@redhat.com> Date: Wed Nov 20 17:26:29 2024 -0500 rust: sync: Add SpinLockGuard type alias A simple helper alias for code that needs to deal with Guard types returned from SpinLocks. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20241120222742.2490495-3-lyude@redhat.com rust/kernel/sync.rs | 2 +- rust/kernel/sync/lock/spinlock.rs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 37624dde4768ec25d2f9798aa75bf32e18c0eae2 Author: Lyude Paul <lyude@redhat.com> Date: Wed Nov 20 17:26:28 2024 -0500 rust: sync: Add MutexGuard type alias A simple helper alias for code that needs to deal with Guard types returned from Mutexes. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20241120222742.2490495-2-lyude@redhat.com rust/kernel/sync.rs | 2 +- rust/kernel/sync/lock/mutex.rs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit daa03fe50ec376aeadd63a264c471c56af194e83 Author: Lyude Paul <lyude@redhat.com> Date: Tue Nov 19 18:11:04 2024 -0500 rust: sync: Make Guard::new() public Since we added a `Lock::from_raw()` function previously, it makes sense to also introduce an interface for creating a `Guard` from a reference to a `Lock` for instances where we've derived the `Lock` from a raw pointer and know that the lock is already acquired, there are such usages in KMS API. [Boqun: Add backquotes to type names, reformat the commit log, reword a bit on the usage of KMS API] Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Filipe Xavier <felipe_life@live.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20241119231146.2298971-3-lyude@redhat.com rust/kernel/sync/lock.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15abc88057eeec052aefde897df277eca2340ac6 Author: Lyude Paul <lyude@redhat.com> Date: Tue Nov 19 18:11:03 2024 -0500 rust: sync: Add Lock::from_raw() for Lock<(), B> The KMS bindings [1] have a few bindings that require manually acquiring specific locks before calling certain functions. At the moment though, the only way of acquiring these locks in bindings is to simply call the C locking functions directly - since said locks are not initialized on the Rust side of things. However - if we add `#[repr(C)]` to `Lock<(), B>`, then given `()` is a ZST - `Lock<(), B>` becomes equivalent in data layout to its inner `B::State` type. Since locks in C don't have data explicitly associated with them anyway, we can take advantage of this to add a `Lock::from_raw()` function that can translate a raw pointer to `B::State` into its proper `Lock<(), B>` equivalent. This lets us simply acquire a reference to the lock in question and work with it like it was initialized on the Rust side of things, allowing us to use less unsafe code to implement bindings with lock requirements. [Boqun: Use "Link:" instead of a URL and format the commit log] Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://patchwork.freedesktop.org/series/131522/ [1] Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20241119231146.2298971-2-lyude@redhat.com rust/kernel/sync/lock.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 9793c9bb91f1b05473bb6d4a2323a259ef00ff2e Author: Boqun Feng <boqun.feng@gmail.com> Date: Wed Nov 27 10:30:24 2024 -0800 locking: MAINTAINERS: Start watching Rust locking primitives It makes sense to add Rust locking primitives under the watch of general locking primitives maintainers. This will encourage more reviews and find potential issues earlier. Hence add related Rust files into the LOCKING PRIMITIVES entry in MAINTAINERS. While we are at it, change the role of myself into the maintainer of LOCKDEP and RUST to reflect my responsibility for the corresponding code. Acked-by: Miguel Ojeda <ojeda@kernel.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> https://lore.kernel.org/lkml/20241128054022.19586-2-boqun.feng@gmail.com/ MAINTAINERS | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3430600925859be3c8588b8220173758c7860e8c Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Mon Dec 2 21:34:45 2024 +0200 lockdep: Move lockdep_assert_locked() under #ifdef CONFIG_PROVE_LOCKING When lockdep_assert_locked() is unused, it prevents kernel builds with clang, `make W=1` and CONFIG_WERROR=y, CONFIG_LOCKDEP=y and CONFIG_PROVE_LOCKING=n: kernel/locking/lockdep.c:160:20: error: unused function 'lockdep_assert_locked' [-Werror,-Wunused-function] Fix this by moving it under the respective ifdeffery. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). [Boqun: add more config information of the error] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20241202193445.769567-1-andriy.shevchenko@linux.intel.com kernel/locking/lockdep.c | 2 ++ 1 file changed, 2 insertions(+) commit 8148fa2e022bae29f21bb9a2c4cc796334fd372b Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Mon Dec 9 19:08:10 2024 +0200 lockdep: Mark chain_hlock_class_idx() with __maybe_unused When chain_hlock_class_idx() is unused, it prevents kernel builds with clang, `make W=1` and CONFIG_WERROR=y, CONFIG_LOCKDEP=y and CONFIG_PROVE_LOCKING=n: kernel/locking/lockdep.c:435:28: error: unused function 'chain_hlock_class_idx' [-Werror,-Wunused-function] Fix this by marking it with __maybe_unused. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). [Boqun: add more config information of the error] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20241209170810.1485183-1-andriy.shevchenko@linux.intel.com kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8368e9719de1ecf60e27883a08692283f4086b05 Merge: 38e961097e04 695c2c745e5d Author: Dave Airlie <airlied@redhat.com> Date: Thu Dec 19 12:04:47 2024 +1000 Merge tag 'amd-drm-next-6.14-2024-12-18' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.14-2024-12-18: amdgpu: - RAS updates - ISP updates - SDMA queue reset support - Rework DPM powergating interfaces - Documentation updates and cleanups - Panel replay fixes - DCN 3.5 updates - DP tunneling fixes - Use a pm notifier to more gracefully handle VRAM eviction on suspend or hibernate - Add debugfs interfaces for forcing scheduling to specific engine instances - GG 9.5 updates - IH 4.4 updates - Make missing optional firmware less noisy - PSP 13.x updates - SMU 13.x updates - VCN 5.x updates - JPEG 5.x updates - Misc cleanups - GC 12.x updates - DRM panic support - DC FAMS updates - DSC fixes - job handling fixes amdkfd: - GG 9.5 updates - Logging improvements - Misc cleanups - Various Optimizations Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241218201758.2580723-1-alexander.deucher@amd.com commit 21096800c5ac634a9fbbac21505bfd798163b390 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Thu Dec 19 15:28:18 2024 +0100 power: supply: core: fix build of extension sysfs group if CONFIG_SYSFS=n Add and use wrapper functions for the sysfs interaction. Restore the compatibility of CONFIG_POWER_SUPPLY=y and CONFIG_SYSFS=n. Reported-by: Nathan Chancellor <nathan@kernel.org> Closes: https://lore.kernel.org/lkml/20241218195229.GA2796534@ax162/ Fixes: 288a2cabcf6b ("power: supply: core: add UAPI to discover currently used extensions") Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241219-psy-extensions-sysfs-v1-1-868fc6cb46d6@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/power_supply.h | 12 +++++++++++- drivers/power/supply/power_supply_core.c | 13 +++++-------- drivers/power/supply/power_supply_sysfs.c | 15 ++++++++++++++- 3 files changed, 30 insertions(+), 10 deletions(-) commit 17159601d2ec40b849d3f12713eb6f92093b6748 Author: Sakari Ailus <sakari.ailus@linux.intel.com> Date: Thu Dec 19 17:21:48 2024 +0200 ACPI: property: Consider data nodes as being available New functions making use of the data node availability information, like fwnode_for_each_available_child_node(), have been added years after fwnode_device_is_available() was introduced. To enumerate the data nodes in various ways specific to those functions, the node availability test needs to pass. On ACPI, there is no explicit data node availbility information in the first place and the original fwnode_device_is_available() implementation simply returns false. This causes new functions that only enumerate available nodes to never return any nodes on ACPI for leaf devices that have child data nodes. However, on the DT side, fwnode_device_is_available() returns true for all nodes without the "status" property which are analogous to the ACPI data nodes, so there is a difference in behavior between DT and ACPI in that respect. Thus from now on, return true from fwnode_device_is_available() on all ACPI data nodes. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Link: https://patch.msgid.link/20241219152148.975622-1-sakari.ailus@linux.intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/acpi/property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84524b1dadd8c4dd772d22b7effe45e7e65c27f5 Author: Ricardo Ribalda <ribalda@chromium.org> Date: Mon Dec 16 21:17:21 2024 +0000 media: ipu-bridge: Remove unneeded conditional compilations The ACPI headers have introduced implementations for some of their functions when the kernel is not configured with ACPI. Let's use them instead of our conditional compilation. It is easier to maintain and less prone to errors. Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Acked-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://patch.msgid.link/20241216-fix-ipu-v5-7-3d6b35ddce7b@chromium.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/media/pci/intel/ipu-bridge.c | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) commit 78c3227c5e268d40d0a08fea8b244afeb182610c Author: Ricardo Ribalda <ribalda@chromium.org> Date: Mon Dec 16 21:17:20 2024 +0000 ACPI: bus: implement acpi_device_hid when !ACPI Provide an implementation of acpi_device_hid that can be used when CONFIG_ACPI is not set. Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://patch.msgid.link/20241216-fix-ipu-v5-6-3d6b35ddce7b@chromium.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> include/acpi/acpi_bus.h | 5 +++++ 1 file changed, 5 insertions(+) commit 46d10e5f9c346e6f3aa828895ed8b49cc6d9c0f6 Author: Ricardo Ribalda <ribalda@chromium.org> Date: Mon Dec 16 21:17:19 2024 +0000 ACPI: bus: implement for_each_acpi_consumer_dev when !ACPI Provide an implementation of for_each_acpi_consumer_dev that can be use used when CONFIG_ACPI is not set. The expression `false && supplier` is used to avoid "variable not used" warnings. Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://patch.msgid.link/20241216-fix-ipu-v5-5-3d6b35ddce7b@chromium.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> include/acpi/acpi_bus.h | 3 +++ 1 file changed, 3 insertions(+) commit 7d3707bbbbb1dc8b1802886e9ff0506b7d8b323b Author: Ricardo Ribalda <ribalda@chromium.org> Date: Mon Dec 16 21:17:18 2024 +0000 ACPI: header: implement acpi_device_handle when !ACPI Provide an implementation of acpi_device_handle that can be used when CONFIG_ACPI is not set. Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://patch.msgid.link/20241216-fix-ipu-v5-4-3d6b35ddce7b@chromium.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> include/linux/acpi.h | 5 +++++ 1 file changed, 5 insertions(+) commit 34df77363dff6df1e95ee4c1e035de464da4ee4b Author: Ricardo Ribalda <ribalda@chromium.org> Date: Mon Dec 16 21:17:17 2024 +0000 ACPI: bus: implement acpi_get_physical_device_location when !ACPI Provide an implementation of acpi_get_physical_device_location that can be used when CONFIG_ACPI is not set. Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://patch.msgid.link/20241216-fix-ipu-v5-3-3d6b35ddce7b@chromium.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> include/acpi/acpi_bus.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit e04efd34d9fe36e934e86e61f568c427a999aa5c Author: Ricardo Ribalda <ribalda@chromium.org> Date: Mon Dec 16 21:17:16 2024 +0000 ACPI: bus: implement for_each_acpi_dev_match when !ACPI Provide an implementation of for_each_acpi_dev_match that can be used when CONFIG_ACPI is not set. The condition `false && hid && uid && hrv` is used to avoid "variable not used" warnings. Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://patch.msgid.link/20241216-fix-ipu-v5-2-3d6b35ddce7b@chromium.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> include/acpi/acpi_bus.h | 3 +++ 1 file changed, 3 insertions(+) commit 79f237bae910e1019f1f7617d7b0b900f717d209 Author: Ricardo Ribalda <ribalda@chromium.org> Date: Mon Dec 16 21:17:15 2024 +0000 ACPI: bus: change the prototype for acpi_get_physical_device_location It generally is not OK to use acpi_status and/or AE_ error codes without CONFIG_ACPI and they really only should be used in drivers/acpi/ (and not everywhere in there for that matter). So acpi_get_physical_device_location() needs to be redefined to return something different from acpi_status (preferably bool) in order to be used in !CONFIG_ACPI code. Suggested-by: Rafael J. Wysocki <rafael@kernel.org> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://patch.msgid.link/20241216-fix-ipu-v5-1-3d6b35ddce7b@chromium.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/acpi/mipi-disco-img.c | 3 +-- drivers/acpi/scan.c | 4 +--- drivers/acpi/utils.c | 7 +++---- drivers/base/physical_location.c | 4 +--- drivers/media/pci/intel/ipu-bridge.c | 4 ++-- drivers/usb/core/usb-acpi.c | 3 +-- include/acpi/acpi_bus.h | 2 +- 7 files changed, 10 insertions(+), 17 deletions(-) commit 2dfed7403861e4a40f5c61f0f9af59bb9b054e32 Merge: 8e461a1cb43d 95fad7fb58cf Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Thu Dec 19 20:49:50 2024 +0100 Merge tag 'amd-pstate-v6.14-2024-12-18' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux Merge amd-pstate changes for 6.14 from Mario Limonciello: "Mostly cleanups and optimizations to increase code reuse by shuffling around and using helpers. Notable other changes: * Add ftrace event for active mode to use * Set default EPP policy on Ryzen" * tag 'amd-pstate-v6.14-2024-12-18' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux: (21 commits) cpufreq/amd-pstate: Drop boost_state variable cpufreq/amd-pstate: Set different default EPP policy for Epyc and Ryzen cpufreq/amd-pstate: Drop ret variable from amd_pstate_set_energy_pref_index() cpufreq/amd-pstate: Always write EPP value when updating perf cpufreq/amd-pstate: Cache EPP value and use that everywhere cpufreq/amd-pstate: Move limit updating code cpufreq/amd-pstate: Change amd_pstate_update_perf() to return an int cpufreq/amd-pstate: store all values in cpudata struct in khz cpufreq/amd-pstate: Only update the cached value in msr_set_epp() on success cpufreq/amd-pstate: Use FIELD_PREP and FIELD_GET macros cpufreq/amd-pstate: Drop cached epp_policy variable cpufreq/amd-pstate: convert mutex use to guard() cpufreq/amd-pstate: Add trace event for EPP perf updates cpufreq/amd-pstate: Merge amd_pstate_epp_cpu_offline() and amd_pstate_epp_offline() cpufreq/amd-pstate: Remove the cppc_state check in offline/online functions cpufreq/amd-pstate: Refactor amd_pstate_epp_reenable() and amd_pstate_epp_offline() cpufreq/amd-pstate: Move the invocation of amd_pstate_update_perf() cpufreq/amd-pstate: Convert the amd_pstate_get/set_epp() to static calls cpufreq/amd-pstate: Use boost numerator for upper bound of frequencies cpufreq/amd-pstate: Store the boost numerator as highest perf again ... commit 07e5c4eb94e6aba96fa11b424b39c5e5576a7713 Merge: 6b3099ebca13 8faabc041a00 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 5 11:48:58 2024 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR (net-6.13-rc4). No conflicts. Adjacent changes: drivers/net/ethernet/renesas/rswitch.h 32fd46f5b69e ("net: renesas: rswitch: remove speed from gwca structure") 922b4b955a03 ("net: renesas: rswitch: rework ts tags management") Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 6784ed98fde5b7538fff6b329b686b119ca23d8b Author: Alexander Aring <aahringo@redhat.com> Date: Mon Dec 2 10:26:41 2024 -0500 dlm: return -ENOENT if no comm was found Currently if no comm can be found dlm_comm_seq() returns -EEXIST which means entry already exists for a lookup it makes no sense to return -EEXIST. We change it to -ENOENT. There is no user that will evaluate the return value on a specific value so this should be fine. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com> fs/dlm/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57cdd1a1cf1464199678f9338049b63fb5d5b41c Author: Alexander Aring <aahringo@redhat.com> Date: Mon Dec 2 10:26:37 2024 -0500 dlm: fix srcu_read_lock() return type to int The return type of srcu_read_lock() is int and not bool. Whereas we using the ret variable only to evaluate a bool type of dlm_lowcomms_con_has_addr() to check if an address is already being set. Fixes: 6f0b0b5d7ae7 ("fs: dlm: remove dlm_node_addrs lookup list") Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com> fs/dlm/lowcomms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 134129520beaf3339482c557361ea0bde709cf36 Author: Alexander Aring <aahringo@redhat.com> Date: Tue Nov 19 15:56:44 2024 -0500 dlm: fix removal of rsb struct that is master and dir record An rsb struct was not being removed in the case where it was both the master and the dir record. This case (master and dir node) was missed in the condition for doing add_scan() from deactivate_rsb(). Fixing this triggers a related WARN_ON that needs to be fixed, and requires adjusting where two del_scan() calls are made. Fixes: c217adfc8caa ("dlm: fix add_scan and del_scan usage") Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com> fs/dlm/lock.c | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) commit e5ecedcd7cc231a115c11cfed79635583ef4f882 Author: Marc Zyngier <maz@kernel.org> Date: Thu Dec 19 17:33:50 2024 +0000 arm64/sysreg: Get rid of CPACR_ELx SysregFields There is no such thing as CPACR_ELx in the architecture. What we have is CPACR_EL1, for which CPTR_EL12 is an accessor. Rename CPACR_ELx_* to CPACR_EL1_*, and fix the bit of code using these names. Reviewed-by: Mark Brown <broonie@kernel.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20241219173351.1123087-5-maz@kernel.org Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/include/asm/el2_setup.h | 6 ++--- arch/arm64/include/asm/kvm_arm.h | 2 -- arch/arm64/include/asm/kvm_emulate.h | 40 ++++++++++++++++----------------- arch/arm64/include/asm/kvm_nested.h | 8 +++---- arch/arm64/kernel/cpufeature.c | 2 +- arch/arm64/kvm/emulate-nested.c | 2 +- arch/arm64/kvm/fpsimd.c | 2 +- arch/arm64/kvm/hyp/include/hyp/switch.h | 4 ++-- arch/arm64/kvm/hyp/nvhe/hyp-main.c | 4 ++-- arch/arm64/kvm/hyp/nvhe/pkvm.c | 2 +- arch/arm64/kvm/hyp/nvhe/switch.c | 6 ++--- arch/arm64/kvm/hyp/vhe/switch.c | 16 ++++++------- arch/arm64/tools/sysreg | 6 +---- 13 files changed, 47 insertions(+), 53 deletions(-) commit 233fc36bb5a2488ec5e9eb4625b41d772d9d88b2 Author: Marc Zyngier <maz@kernel.org> Date: Thu Dec 19 17:33:49 2024 +0000 arm64/sysreg: Convert *_EL12 accessors to Mapping Perform a bulk convert of the remaining EL12 accessors to use the Mapping qualifier, which makes things a bit clearer. Reviewed-by: Mark Brown <broonie@kernel.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20241219173351.1123087-4-maz@kernel.org Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/tools/sysreg | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 7052e808c44638ed52187f2403df6ed941e1adfa Author: Marc Zyngier <maz@kernel.org> Date: Thu Dec 19 17:33:48 2024 +0000 arm64/sysreg: Get rid of the TCR2_EL1x SysregFields TCR2_EL1x is a pretty bizarre construct, as it is shared between TCR2_EL1 and TCR2_EL12. But the latter is obviously only an accessor to the former. In order to make things more consistent, upgrade TCR2_EL1x to a full-blown sysreg definition for TCR2_EL1, and describe TCR2_EL12 as a mapping to TCR2_EL1. This results in a couple of minor changes to the actual code. Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20241219173351.1123087-3-maz@kernel.org Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/kernel/cpufeature.c | 2 +- arch/arm64/kvm/at.c | 6 +++--- arch/arm64/mm/proc.S | 5 +++-- arch/arm64/tools/sysreg | 8 ++------ 4 files changed, 9 insertions(+), 12 deletions(-) commit 078bc96539c33cf459370526a2d3bf922ff5ec2a Author: Marc Zyngier <maz@kernel.org> Date: Thu Dec 19 17:33:47 2024 +0000 arm64/sysreg: Allow a 'Mapping' descriptor for system registers *EL02 and *_EL12 system registers are actually only accessors for EL0 and EL1 registers accessed from EL2 when HCR_EL2.E2H==1. They do not have fields of their own. To that effect, introduce a 'Mapping' entry, describing which system register an _EL12 register maps to. Implementation wise, this is handled the same was as Fields, which ls only a comment. Acked-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20241219173351.1123087-2-maz@kernel.org Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/tools/gen-sysreg.awk | 2 +- arch/arm64/tools/sysreg | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) commit 578f6fc55c2ced5f68a7f87edbf6db3663dc6b57 Author: Colin Ian King <colin.i.king@gmail.com> Date: Tue Dec 17 10:55:05 2024 +0000 wifi: ath12k: Fix spelling mistake "requestted" -> "requested" There is a spelling mistake in an ath12k_err error message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241217105505.306047-1-colin.i.king@gmail.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/qmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8534c42397ed8f05257dbddcd305a351ad40add1 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Tue Dec 17 14:15:11 2024 +0530 wifi: ath12k: Avoid explicit type cast in monitor status parse handler Currently, monitor status parse procedure handles all the supported TLV tags. Each TLV tag has its own data structure for parsing. Now, this handler is passed the tlv_data as a u8 pointer, so explicit type cast conversion happens for every TLV tag parsing. Therefore, avoid the explicit type conversion by changing the tlv_data type from a u8 pointer to a const void pointer. 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 <quic_periyasa@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241217084511.2981515-9-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/dp_mon.c | 126 ++++++++++++------------------- 1 file changed, 47 insertions(+), 79 deletions(-) commit 61f247a06c3cdeb9093b3d90afd7d51168d089f4 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Tue Dec 17 14:15:10 2024 +0530 wifi: ath12k: Change the Tx monitor SRNG ring ID The Tx monitor SRNG ring ID does not align with the ath12k 802.11be hardware architecture. Currently, there is no issue since the Tx monitor is not enabled. However, in the future, the Tx monitor will be enabled. Therefore, change the HAL_SRNG_RING_ID_WMAC1_SW2TXMON_BUF0 SRNG ID and assign the correct start ring ID for the ring type HAL_TX_MONITOR_BUF. 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 <quic_periyasa@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241217084511.2981515-8-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/hal.c | 2 +- drivers/net/wireless/ath/ath12k/hal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0345f28a122656a4703442a2a97d2dca370c27a0 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Tue Dec 17 14:15:09 2024 +0530 wifi: ath12k: Remove unused HAL Rx mask in DP monitor path Currently, CODING and TXBF are unused masks defined in the HAL Rx monitor status TLV parsing code path. Therefore, remove the unused masks to prevent incorrect assumptions for code readers. 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 <quic_periyasa@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241217084511.2981515-7-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/hal_rx.h | 2 -- 1 file changed, 2 deletions(-) commit ebee84cc961cd3947015efbf4a5dbea63b11c5d3 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Tue Dec 17 14:15:08 2024 +0530 wifi: ath12k: fix incorrect TID updation in DP monitor status path Currently, an incorrect TID value gets populated in the monitor status Rx path due to an incorrect bitmap value given to the ffs() built-in helper function. Therefore, avoid the decrement and directly provide the TID bitmap to the ffs() built-in helper function for the correct TID update in the monitor status 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: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241217084511.2981515-6-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/dp_mon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b79462532cd56119fb409f81f50dc74b12724b5e Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Tue Dec 17 14:15:07 2024 +0530 wifi: ath12k: Fix the misspelled of hal TLV tag HAL_PHYRX_GENERICHT_SIG There is "HAL_PHYRX_GENERICHT_SIG" misspelled as "HAL_PHYRX_GENERIC_EHT_SIG" in the comments. Fix the spelling. 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 <quic_periyasa@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241217084511.2981515-5-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/hal_desc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a6d941a39947c359ed245fca490dcdb09551235 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Tue Dec 17 14:15:06 2024 +0530 wifi: ath12k: cleanup Rx peer statistics structure Currently, unused fields are present in the Rx peer statistics structure. These fields are already present in the same structure under the ath12k_rx_peer_rate_stats container structure. Therefore, remove the unused fields from the Rx peer statistics structure. 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 <quic_periyasa@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241217084511.2981515-4-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.h | 4 ---- 1 file changed, 4 deletions(-) commit 61a0d9a879c3682391f88855220dd766bb9d6542 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Tue Dec 17 14:15:05 2024 +0530 wifi: ath12k: Refactor monitor status TLV structure The following TLV structures and bitmask definitions were inherited from the ath11k but were not updated for the ath12k 802.11be hardware. These data structure and bitmask will be used to parse the monitor status TLV data in the Rx path. 1. hal_rx_ppdu_end_user_stats_ext structure 2. hal_rx_ppdu_end_duration structure 3. HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_TXBF bitmask 4. HAL_RX_MPDU_START_INFO1_PEERID bitmask 5. HAL_INVALID_PEERID 6. hal_rx_ppdu_end_user_stats bitmask Currently, there is no issue since the monitor status Rx path is not enabled. However, in the future, the monitor status Rx path will be enabled. Therefore, update the above TLV structures and bitmask to align with the ath12k 802.11be hardware. 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 <quic_periyasa@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241217084511.2981515-3-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/hal_rx.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit d506e55fe39bcd6a78bd1f23210cbcd8cee4f844 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Tue Dec 17 14:15:04 2024 +0530 wifi: ath12k: Add documentation HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG Add missing field documentation for HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG command with indentation alignment. 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 <quic_periyasa@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241217084511.2981515-2-quic_periyasa@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/dp.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit bf2da5c4f5b576d45f5f0cc0f508b8255f7ab015 Author: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Date: Tue Dec 17 22:26:18 2024 +0200 wifi: ath12k: Decrease ath12k_mac_station_assoc() stack usage Building the ath12k driver with llvm-18.1.7-x86_64 produces the warning: drivers/net/wireless/ath/ath12k/mac.c:5606:12: warning: stack frame size (1176) exceeds limit (1024) in 'ath12k_mac_op_sta_state' [-Wframe-larger-than] ath12k_mac_op_sta_state() itself does not consume much stack, but it calls ath12k_mac_handle_link_sta_state() which in turn calls ath12k_mac_station_add(). Since those are both static functions with only one caller, it is suspected that these both get inlined, and their stack usage is reported for ath12k_mac_op_sta_state(). A major contributor to the ath12k_mac_station_assoc() stack usage is: struct ath12k_wmi_peer_assoc_arg peer_arg; Avoid the excess stack usage by dynamically allocating peer_arg instead of declaring it on the stack. 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: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241217202618.1329312-5-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/mac.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 6ff412420e5ea1635385038a0bb4c77420862bc9 Author: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Date: Tue Dec 17 22:26:17 2024 +0200 wifi: ath12k: Decrease ath12k_sta_rc_update_wk() stack usage Currently when building ath12k with llvm-18.1.7-x86_64 the following warning is observed: drivers/net/wireless/ath/ath12k/mac.c:4946:13: warning: stack frame size (1112) exceeds limit (1024) in 'ath12k_sta_rc_update_wk' [-Wframe-larger-than] A major contributor to the stack usage in this function is: struct ath12k_wmi_peer_assoc_arg peer_arg; Avoid the excess stack usage by dynamically allocating peer_arg instead of declaring it on the stack. 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: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241217202618.1329312-4-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/mac.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 445718c9958c8c160654068014c0e72505f59d63 Author: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Date: Tue Dec 17 22:26:16 2024 +0200 wifi: ath12k: Decrease ath12k_bss_assoc() stack usage Currently when building ath12k with gcc-14.2.0 the following warning is observed: drivers/net/wireless/ath/ath12k/mac.c: In function 'ath12k_bss_assoc': drivers/net/wireless/ath/ath12k/mac.c:3080:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=] A major contributor to the stack usage in this function is: struct ath12k_wmi_peer_assoc_arg peer_arg; Avoid the excess stack usage by dynamically allocating peer_arg instead of declaring it on the stack. 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: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241217202618.1329312-3-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/mac.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit aa21668ab3c7c479998be11393e1a1c3c2624fce Author: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Date: Tue Dec 17 22:26:15 2024 +0200 wifi: ath12k: Decrease ath12k_mac_op_remain_on_channel() stack usage Building the ath12k driver with llvm-18.1.7-x86_64 produces the warning: drivers/net/wireless/ath/ath12k/mac.c:10028:12: warning: stack frame size (1080) exceeds limit (1024) in 'ath12k_mac_op_remain_on_channel' [-Wframe-larger-than] A major contributor to the stack usage in this function is: struct ath12k_wmi_scan_req_arg arg; Avoid the excess stack usage by dynamically allocating arg instead of declaring it on the stack. As part of the effort use __free() for both this new allocation as well as the existing chan_list allocation, and since then no central cleanup is required, replace all cleanup gotos with returns. 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: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241217202618.1329312-2-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/mac.c | 78 +++++++++++++++-------------------- 1 file changed, 34 insertions(+), 44 deletions(-) commit be8d47f181fd4f341b8beee1ca11a96d296d2df2 Author: P Praneesh <quic_ppranees@quicinc.com> Date: Tue Dec 17 15:20:58 2024 +0530 wifi: ath12k: Add support for parsing 64-bit TLVs There is mismatch between the format of monitor destination TLVs received and the expected format by the current implementation. The received TLVs are in 64-bit format, while the implementation is designed to handle 32-bit TLVs. This leads to incorrect parsing. Fix it by adding support for parsing 64-bit TLVs. 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 <quic_ppranees@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Acked-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Link: https://patch.msgid.link/20241217095058.2725755-1-quic_ppranees@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/dp_mon.c | 14 +++++++------- drivers/net/wireless/ath/ath12k/hal_desc.h | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) commit 0cc6510ca4639a20c8921f223f05faa485795204 Author: Dmitry Antipov <dmantipov@yandex.ru> Date: Mon Dec 9 18:50:27 2024 +0300 wifi: ath9k: simplify internal time management Prefer 'ktime_t' over 'struct timespec64' for 'struct ath_chanctx' and 'struct ath_softc' timestamps, choose standard kernel time API over an ad-hoc math in 'chanctx_event_delta()' and 'ath9k_hw_get_tsf_offset()', adjust related users. Compile tested only. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk> Link: https://patch.msgid.link/20241209155027.636400-3-dmantipov@yandex.ru Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath9k/ath9k.h | 4 ++-- drivers/net/wireless/ath/ath9k/beacon.c | 2 +- drivers/net/wireless/ath/ath9k/channel.c | 29 ++++++++++++----------------- drivers/net/wireless/ath/ath9k/hw.c | 25 ++++++++----------------- drivers/net/wireless/ath/ath9k/hw.h | 2 +- drivers/net/wireless/ath/ath9k/main.c | 9 ++++----- 6 files changed, 28 insertions(+), 43 deletions(-) commit d19ac7ef6ee997298a42335d0dd09b67c6cb19bf Author: Dmitry Antipov <dmantipov@yandex.ru> Date: Mon Dec 9 18:50:26 2024 +0300 wifi: ath9k: cleanup a few (mostly) TX-related routines Remove unused 'struct ath_softc *' argument of 'ath_pkt_duration()', 'ath_tx_update_baw()', 'ath_get_skb_tid()', 'ath_tx_addto_baw()' and 'ath_tx_count_frames()', adjust related users. Compile tested only. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk> Link: https://patch.msgid.link/20241209155027.636400-2-dmantipov@yandex.ru Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath9k/ath9k.h | 4 ++-- drivers/net/wireless/ath/ath9k/recv.c | 4 ++-- drivers/net/wireless/ath/ath9k/xmit.c | 40 +++++++++++++++------------------- 3 files changed, 22 insertions(+), 26 deletions(-) commit 2a7e02fa9116d9b077983257774e6644af064857 Author: Dmitry Antipov <dmantipov@yandex.ru> Date: Mon Dec 9 18:50:25 2024 +0300 wifi: ath9k: cleanup ath_txq_skb_done() Since 'txq' argument of 'ath_txq_skb_done()' is actually (mis|un)used, convert the former to local variable and adjust all related users. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk> Link: https://patch.msgid.link/20241209155027.636400-1-dmantipov@yandex.ru Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath9k/xmit.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 92b6919d7fb29691a8bc5aca49044056683542ca Author: Ard Biesheuvel <ardb@kernel.org> Date: Thu Dec 12 09:18:47 2024 +0100 arm64: Kconfig: force ARM64_PAN=y when enabling TTBR0 sw PAN There are a couple of instances of Kconfig constraints where PAN must be enabled too if TTBR0 sw PAN is enabled, primarily to avoid dealing with the modified TTBR0_EL1 sysreg format that is used when 52-bit physical addressing and/or CnP are enabled (support for either implies support for hardware PAN as well, which will supersede PAN emulation if both are available) Let's simplify this, and always enable ARM64_PAN when enabling TTBR0 sw PAN. This decouples the PAN configuration from the VA size selection, permitting us to simplify the latter in subsequent patches. (Note that PAN and TTBR0 sw PAN can still be disabled after this patch, but not independently) To avoid a convoluted circular Kconfig dependency involving KCSAN, make ARM64_MTE select ARM64_PAN too, instead of depending on it. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20241212081841.2168124-13-ardb+git@google.com Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/Kconfig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9d86c3c974348eb4220b637fae1a2466232078b7 Author: Ard Biesheuvel <ardb@kernel.org> Date: Thu Dec 12 09:18:46 2024 +0100 arm64/kvm: Avoid invalid physical addresses to signal owner updates The pKVM stage2 mapping code relies on an invalid physical address to signal to the internal API that only the annotations of descriptors should be updated, and these are stored in the high bits of invalid descriptors covering memory that has been donated to protected guests, and is therefore unmapped from the host stage-2 page tables. Given that these invalid PAs are never stored into the descriptors, it is better to rely on an explicit flag, to clarify the API and to avoid confusion regarding whether or not the output address of a descriptor can ever be invalid to begin with (which is not the case with LPA2). That removes a dependency on the logic that reasons about the maximum PA range, which differs on LPA2 capable CPUs based on whether LPA2 is enabled or not, and will be further clarified in subsequent patches. Cc: Quentin Perret <qperret@google.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Quentin Perret <qperret@google.com> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20241212081841.2168124-12-ardb+git@google.com Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/kvm/hyp/pgtable.c | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) commit f0da16992aef7e246b2f3bba1492e3a52c38ca0e Author: Ard Biesheuvel <ardb@kernel.org> Date: Thu Dec 12 09:18:45 2024 +0100 arm64/kvm: Configure HYP TCR.PS/DS based on host stage1 When the host stage1 is configured for LPA2, the value currently being programmed into TCR_EL2.T0SZ may be invalid unless LPA2 is configured at HYP as well. This means kvm_lpa2_is_enabled() is not the right condition to test when setting TCR_EL2.DS, as it will return false if LPA2 is only available for stage 1 but not for stage 2. Similary, programming TCR_EL2.PS based on a limited IPA range due to lack of stage2 LPA2 support could potentially result in problems. So use lpa2_is_enabled() instead, and set the PS field according to the host's IPS, which is capped at 48 bits if LPA2 support is absent or disabled. Whether or not we can make meaningful use of such a configuration is a different question. Cc: stable@vger.kernel.org Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20241212081841.2168124-11-ardb+git@google.com Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/kvm/arm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 62cffa496aac0c2c4eeca00d080058affd7a0172 Author: Ard Biesheuvel <ardb@kernel.org> Date: Thu Dec 12 09:18:44 2024 +0100 arm64/mm: Override PARange for !LPA2 and use it consistently When FEAT_LPA{,2} are not implemented, the ID_AA64MMFR0_EL1.PARange and TCR.IPS values corresponding with 52-bit physical addressing are reserved. Setting the TCR.IPS field to 0b110 (52-bit physical addressing) has side effects, such as how the TTBRn_ELx.BADDR fields are interpreted, and so it is important that disabling FEAT_LPA2 (by overriding the ID_AA64MMFR0.TGran fields) also presents a PARange field consistent with that. So limit the field to 48 bits unless LPA2 is enabled, and update existing references to use the override consistently. Fixes: 352b0395b505 ("arm64: Enable 52-bit virtual addressing for 4k and 16k granule configs") Cc: stable@vger.kernel.org Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20241212081841.2168124-10-ardb+git@google.com Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/include/asm/assembler.h | 5 +++++ arch/arm64/kernel/cpufeature.c | 2 +- arch/arm64/kernel/pi/idreg-override.c | 9 +++++++++ arch/arm64/kernel/pi/map_kernel.c | 6 ++++++ arch/arm64/mm/init.c | 7 ++++++- 5 files changed, 27 insertions(+), 2 deletions(-) commit bf74bb73cd87c64bd5afc1fd4b749029997b6170 Author: Ard Biesheuvel <ardb@kernel.org> Date: Thu Dec 12 09:18:43 2024 +0100 arm64/mm: Reduce PA space to 48 bits when LPA2 is not enabled Currently, LPA2 kernel support implies support for up to 52 bits of physical addressing, and this is reflected in global definitions such as PHYS_MASK_SHIFT and MAX_PHYSMEM_BITS. This is potentially problematic, given that LPA2 hardware support is modeled as a CPU feature which can be overridden, and with LPA2 hardware support turned off, attempting to map physical regions with address bits [51:48] set (which may exist on LPA2 capable systems booting with arm64.nolva) will result in corrupted mappings with a truncated output address and bogus shareability attributes. This means that the accepted physical address range in the mapping routines should be at most 48 bits wide when LPA2 support is configured but not enabled at runtime. Fixes: 352b0395b505 ("arm64: Enable 52-bit virtual addressing for 4k and 16k granule configs") Cc: stable@vger.kernel.org Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20241212081841.2168124-9-ardb+git@google.com Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/include/asm/pgtable-hwdef.h | 6 ------ arch/arm64/include/asm/pgtable-prot.h | 7 +++++++ arch/arm64/include/asm/sparsemem.h | 5 ++++- 3 files changed, 11 insertions(+), 7 deletions(-) commit 1e4a5e3679cc4d037982bfc822d939d5ba954e70 Author: Anshuman Khandual <anshuman.khandual@arm.com> Date: Wed Dec 11 12:24:25 2024 +0530 docs: arm64: Document EL3 requirements for FEAT_PMUv3 This documents EL3 requirements for FEAT_PMUv3. The register field MDCR_EL3 .TPM needs to be cleared for accesses into PMU registers without any trap being generated into EL3. PMUv3 registers like PMCCFILTR_EL0, PMCCNTR_EL0 PMCNTENCLR_EL0, PMCNTENSET_EL0, PMCR_EL0, PMEVCNTR<n>_EL0, PMEVTYPER<n>_EL0 etc are already being accessed for perf HW PMU implementation. Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Link: https://lore.kernel.org/r/20241211065425.1106683-3-anshuman.khandual@arm.com Signed-off-by: Will Deacon <will@kernel.org> Documentation/arch/arm64/booting.rst | 6 ++++++ 1 file changed, 6 insertions(+) commit 3e5be4e11aac40eb9d3ea6b5e79b7e95b0a6ebe5 Author: Anshuman Khandual <anshuman.khandual@arm.com> Date: Wed Dec 11 12:24:24 2024 +0530 docs: arm64: Document EL3 requirements for cpu debug architecture This documents EL3 requirements for debug architecture. The register field MDCR_EL3.TDA needs to be cleared for accesses into debug registers without any trap being generated into EL3. CPU debug registers like DBGBCR<n>_EL1, DBGBVR<n>_EL1, DBGWCR<n>_EL1, DBGWVR<n>_EL1 and MDSCR_EL1 are already being accessed for HW breakpoint, watchpoint and debug monitor implementations on the platform. Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Link: https://lore.kernel.org/r/20241211065425.1106683-2-anshuman.khandual@arm.com Signed-off-by: Will Deacon <will@kernel.org> Documentation/arch/arm64/booting.rst | 6 ++++++ 1 file changed, 6 insertions(+) commit ee37bc7e0144e312a8e990acdd4f49e4afa71f1c Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Thu Dec 19 15:57:19 2024 +0000 firmware: cs_dsp: Delete redundant assignments in cs_dsp_test_bin.c Delete two redundant assignments in cs_dsp_test_bin.c. Unfortunately none of W=1 or the static analysis tools I ran flagged these. Fixes: dd0b6b1f29b9 ("firmware: cs_dsp: Add KUnit testing of bin file download") Reported-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com> Closes: https://scan7.scan.coverity.com/#/project-view/52337/11354?selectedIssue=1602511 Closes: https://scan7.scan.coverity.com/#/project-view/52337/11354?selectedIssue=1602490 Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241219155719.84276-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/test/cs_dsp_test_bin.c | 6 ------ 1 file changed, 6 deletions(-) commit 74ef9527bd87ead62deabe749a6d867af748d448 Author: Yunxiang Li <Yunxiang.Li@amd.com> Date: Thu Dec 19 10:14:11 2024 -0500 drm/amdgpu: track bo memory stats at runtime Before, every time fdinfo is queried we try to lock all the BOs in the VM and calculate memory usage from scratch. This works okay if the fdinfo is rarely read and the VMs don't have a ton of BOs. If either of these conditions is not true, we get a massive performance hit. In this new revision, we track the BOs as they change states. This way when the fdinfo is queried we only need to take the status lock and copy out the usage stats with minimal impact to the runtime performance. With this new approach however, we would no longer be able to track active buffers. Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241219151411.1150-6-Yunxiang.Li@amd.com Signed-off-by: Christian König <christian.koenig@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 18 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 110 ++++++--------- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 205 ++++++++++++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 23 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 1 + 9 files changed, 232 insertions(+), 139 deletions(-) commit a541a6e865ecd8dfd8df6eeb134cc20e7139d329 Author: Yunxiang Li <Yunxiang.Li@amd.com> Date: Thu Dec 19 10:14:10 2024 -0500 drm/amdgpu: remove unused function parameter amdgpu_vm_bo_invalidate doesn't use the adev parameter and not all callers have a reference to adev handy, so remove it for cleanliness. Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241219151411.1150-5-Yunxiang.Li@amd.com Signed-off-by: Christian König <christian.koenig@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 +-- 6 files changed, 7 insertions(+), 12 deletions(-) commit e77d0401e8a198d348bdff5ad48f9dab07902eb4 Author: Yunxiang Li <Yunxiang.Li@amd.com> Date: Thu Dec 19 10:14:09 2024 -0500 Documentation/gpu: Clarify drm memory stats definition Define how to handle buffers with multiple possible placement so we don't get incompatible implementations. Callout the resident requirement for drm-purgeable- explicitly. Remove the requirement for there to be only drm-memory- or only drm-resident-, it's not what's implemented and having both is better for back-compat. Also re-order the paragraphs to flow better. Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241219151411.1150-4-Yunxiang.Li@amd.com Signed-off-by: Christian König <christian.koenig@amd.com> Documentation/gpu/drm-usage-stats.rst | 54 +++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) commit bebf2ebd70f210a6c8fe5f668dadefb083014217 Author: Yunxiang Li <Yunxiang.Li@amd.com> Date: Thu Dec 19 10:14:08 2024 -0500 drm: make drm-active- stats optional When memory stats is generated fresh everytime by going though all the BOs, their active information is quite easy to get. But if the stats are tracked with BO's state this becomes harder since the job scheduling part doesn't really deal with individual buffers. Make drm-active- optional to enable amdgpu to switch to the second method. Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241219151411.1150-3-Yunxiang.Li@amd.com Signed-off-by: Christian König <christian.koenig@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 1 + drivers/gpu/drm/drm_file.c | 13 +++++++------ drivers/gpu/drm/i915/i915_drm_client.c | 1 + drivers/gpu/drm/xe/xe_drm_client.c | 1 + include/drm/drm_gem.h | 14 ++++++++------ 5 files changed, 18 insertions(+), 12 deletions(-) commit fd265d9e0c3358e6b9fe244d8f5d2824fda1c0dc Author: Yunxiang Li <Yunxiang.Li@amd.com> Date: Thu Dec 19 10:14:07 2024 -0500 drm: add drm_memory_stats_is_zero Add a helper to check if the memory stats is zero, this will be used to check for memory accounting errors. Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241219151411.1150-2-Yunxiang.Li@amd.com Signed-off-by: Christian König <christian.koenig@amd.com> drivers/gpu/drm/drm_file.c | 10 ++++++++++ include/drm/drm_file.h | 1 + 2 files changed, 11 insertions(+) commit f3edf03a4c59e59e52c0c1fd958f64a76a038302 Author: Xu Yang <xu.yang_2@nxp.com> Date: Thu Dec 12 14:57:08 2024 +0800 perf: imx9_perf: Introduce AXI filter version to refactor the driver and better extension The imx93 is the first supported DDR PMU that supports read transaction, write transaction and read beats events which corresponding respecitively to counter 2, 3 and 4. However, transaction-based AXI match has low accuracy when get total bits compared to beats-based. And imx93 doesn't assign AXI_ID to each master. So axi filter is not used widely on imx93. This could be regards as AXI filter version 1. To improve the AXI filter capability, imx95 supports 1 read beats and 3 write beats event which corresponding respecitively to counter 2-5. imx95 also detailed AXI_ID allocation so that most of the master could be count individually. This could be regards as AXI filter version 2. This will introduce AXI filter version to refactor the driver and support better extension, such as coming imx943. This is also a potential fix on imx91 when configure axi filter. Fixes: 44798fe136dc ("perf: imx_perf: add support for i.MX91 platform") Cc: stable@vger.kernel.org Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Link: https://lore.kernel.org/r/20241212065708.1353513-1-xu.yang_2@nxp.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/fsl_imx9_ddr_perf.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) commit e94dc6ddda8dd3770879a132d577accd2cce25f9 Author: Nicolin Chen <nicolinc@nvidia.com> Date: Wed Dec 18 21:14:21 2024 -0800 iommu/tegra241-cmdqv: Read SMMU IDR1.CMDQS instead of hardcoding The hardware limitation "max=19" actually comes from SMMU Command Queue. So, it'd be more natural for tegra241-cmdqv driver to read it out rather than hardcoding it itself. This is not an issue yet for a kernel on a baremetal system, but a guest kernel setting the queue base/size in form of IPA/gPA might result in a noncontiguous queue in the physical address space, if underlying physical pages backing up the guest RAM aren't contiguous entirely: e.g. 2MB-page backed guest RAM cannot guarantee a contiguous queue if it is 8MB (capped to VCMDQ_LOG2SIZE_MAX=19). This might lead to command errors when HW does linear-read from a noncontiguous queue memory. Adding this extra IDR1.CMDQS cap (in the guest kernel) allows VMM to set SMMU's IDR1.CMDQS=17 for the case mentioned above, so a guest-level queue will be capped to maximum 2MB, ensuring a contiguous queue memory. Fixes: a3799717b881 ("iommu/tegra241-cmdqv: Fix alignment failure at max_n_shift") Reported-by: Ian Kalinowski <ikalinowski@nvidia.com> Cc: stable@vger.kernel.org Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Link: https://lore.kernel.org/r/20241219051421.1850267-1-nicolinc@nvidia.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b7b8a63055572f5baa78c1d9d048aad750b02ba5 Author: Mostafa Saleh <smostafa@google.com> Date: Sun Dec 15 20:04:11 2024 +0000 iommu/io-pgtable-arm: Fix cfg reading in arm_lpae_concat_mandatory() The newly introduced arm_lpae_concat_mandatory() function reads the ias/oas fields from the 'io_pgtable_cfg' copy embedded inside the 'arm_lpae_io_pgtable' structure. However, this copy is not set until later in alloc_io_pgtable_ops() after the alloc() function has been called. Use the address sizes passed in the 'io_pgtable_cfg' structure when deciding whether or not to concatenate the PGD. Fixes: 4dcac8407fe1 ("iommu/io-pgtable-arm: Fix stage-2 concatenation with 16K") Signed-off-by: Mostafa Saleh <smostafa@google.com> Link: https://lore.kernel.org/r/20241215200412.561400-1-smostafa@google.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/io-pgtable-arm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 8735e47e3a29fa25439caaa2cf3b9a25f5357ec7 Author: Barnabás Czémán <barnabas.czeman@mainlining.org> Date: Sun Dec 15 12:14:59 2024 +0100 dt-bindings: iommu: qcom,iommu: Add MSM8917 IOMMU to SMMUv1 compatibles Add MSM8917 compatible string with "qcom,msm-iommu-v1" as fallback for the MSM8917 IOMMU which is compatible with Qualcomm's secure fw "SMMU v1" implementation. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> Link: https://lore.kernel.org/r/20241215-msm8917-v9-4-bacaa26f3eef@mainlining.org Signed-off-by: Will Deacon <will@kernel.org> Documentation/devicetree/bindings/iommu/qcom,iommu.yaml | 1 + 1 file changed, 1 insertion(+) commit ca0245d131b121f5408b0f67569ec14ee7fccec8 Author: Chao Gao <chao.gao@intel.com> Date: Mon Nov 11 16:59:46 2024 +0800 KVM: x86: Remove hwapic_irr_update() from kvm_x86_ops Remove the redundant .hwapic_irr_update() ops. If a vCPU has APICv enabled, KVM updates its RVI before VM-enter to L1 in vmx_sync_pir_to_irr(). This guarantees RVI is up-to-date and aligned with the vIRR in the virtual APIC. So, no need to update RVI every time the vIRR changes. Note that KVM never updates vmcs02 RVI in .hwapic_irr_update() or vmx_sync_pir_to_irr(). So, removing .hwapic_irr_update() has no impact to the nested case. Signed-off-by: Chao Gao <chao.gao@intel.com> Link: https://lore.kernel.org/r/20241111085947.432645-1-chao.gao@intel.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/include/asm/kvm-x86-ops.h | 1 - arch/x86/include/asm/kvm_host.h | 1 - arch/x86/kvm/lapic.c | 5 ----- arch/x86/kvm/vmx/main.c | 1 - arch/x86/kvm/vmx/vmx.c | 14 -------------- arch/x86/kvm/vmx/x86_ops.h | 1 - 6 files changed, 23 deletions(-) commit 3d91521e57df1f6903419502592910232af49dbb Author: Sean Christopherson <seanjc@google.com> Date: Fri Nov 1 12:14:47 2024 -0700 KVM: nVMX: Honor event priority when emulating PI delivery during VM-Enter Move the handling of a nested posted interrupt notification that is unblocked by nested VM-Enter (unblocks L1 IRQs when ack-on-exit is enabled by L1) from VM-Enter emulation to vmx_check_nested_events(). To avoid a pointless forced immediate exit, i.e. to not regress IRQ delivery latency when a nested posted interrupt is pending at VM-Enter, block processing of the notification IRQ if and only if KVM must block _all_ events. Unlike injected events, KVM doesn't need to actually enter L2 before updating the vIRR and vmcs02.GUEST_INTR_STATUS, as the resulting L2 IRQ will be blocked by hardware itself, until VM-Enter to L2 completes. Note, very strictly speaking, moving the IRQ from L2's PIR to IRR before entering L2 is still technically wrong. But, practically speaking, only an L1 hypervisor or an L0 userspace that is deliberately checking event priority against PIR=>IRR processing can even notice; L2 will see architecturally correct behavior, as KVM ensures the VM-Enter is finished before doing anything that would effectively preempt the PIR=>IRR movement. Reported-by: Chao Gao <chao.gao@intel.com> Link: https://lore.kernel.org/r/20241101191447.1807602-6-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/vmx/nested.c | 53 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 15 deletions(-) commit c829d2c35650e9e24dc338234bd14e4c7c6231f5 Author: Sean Christopherson <seanjc@google.com> Date: Fri Nov 1 12:14:46 2024 -0700 KVM: nVMX: Use vmcs01's controls shadow to check for IRQ/NMI windows at VM-Enter Use vmcs01's execution controls shadow to check for IRQ/NMI windows after a successful nested VM-Enter, instead of snapshotting the information prior to emulating VM-Enter. It's quite difficult to see that the entire reason controls are snapshot prior nested VM-Enter is to read them from vmcs01 (vmcs02 is loaded if nested VM-Enter is successful). That could be solved with a comment, but explicitly using vmcs01's shadow makes the code self-documenting to a certain extent. No functional change intended (vmcs01's execution controls must not be modified during emulation of nested VM-Enter). Link: https://lore.kernel.org/r/20241101191447.1807602-5-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/vmx/nested.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit b2868b55cfef036b743a620de18cb3ff1d16b043 Author: Sean Christopherson <seanjc@google.com> Date: Fri Nov 1 12:14:45 2024 -0700 KVM: nVMX: Drop manual vmcs01.GUEST_INTERRUPT_STATUS.RVI check at VM-Enter Drop the manual check for a pending IRQ in vmcs01's RVI field during nested VM-Enter, as the recently added call to kvm_apic_has_interrupt() when checking for pending events after successful VM-Enter is a superset of the RVI check (IRQs that are pending in RVI are also pending in L1's IRR). Link: https://lore.kernel.org/r/20241101191447.1807602-4-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/vmx/nested.c | 10 ---------- 1 file changed, 10 deletions(-) commit 4f09ebd0c8be7c9aa0279be5ddde896695a72309 Author: Sean Christopherson <seanjc@google.com> Date: Fri Nov 1 12:14:44 2024 -0700 KVM: nVMX: Check for pending INIT/SIPI after entering non-root mode Explicitly check for a pending INIT or SIPI after entering non-root mode during nested VM-Enter emulation, as no VMCS information is quered as part of the check, i.e. there is no need to check for INIT/SIPI while vmcs01 is still loaded. Link: https://lore.kernel.org/r/20241101191447.1807602-3-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/vmx/nested.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cda3960fbcc532f8609fc32b07196abe2a2f0376 Author: Sean Christopherson <seanjc@google.com> Date: Fri Nov 1 12:14:43 2024 -0700 KVM: nVMX: Explicitly update vPPR on successful nested VM-Enter Always request pending event evaluation after successful nested VM-Enter if L1 has a pending IRQ, as KVM will effectively do so anyways when APICv is enabled, by way of vmx_has_apicv_interrupt(). This will allow dropping the aforementioned APICv check, and will also allow handling nested Posted Interrupt processing entirely within vmx_check_nested_events(), which is necessary to honor priority between concurrent events. Note, checking for pending IRQs has a subtle side effect, as it results in a PPR update for L1's vAPIC (PPR virtualization does happen at VM-Enter, but for nested VM-Enter that affects L2's vAPIC, not L1's vAPIC). However, KVM updates PPR _constantly_, even when PPR technically shouldn't be refreshed, e.g. kvm_vcpu_has_events() re-evaluates PPR if IRQs are unblocked, by way of the same kvm_apic_has_interrupt() check. Ditto for nested VM-Enter itself, when nested posted interrupts are enabled. Thus, trying to avoid a PPR update on VM-Enter just to be pedantically accurate is ridiculous, given the behavior elsewhere in KVM. Link: https://lore.kernel.org/kvm/20230312180048.1778187-1-jason.cj.chen@intel.com Closes: https://lore.kernel.org/all/20240920080012.74405-1-mankku@gmail.com Signed-off-by: Chao Gao <chao.gao@intel.com> Link: https://lore.kernel.org/r/20241101191447.1807602-2-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/vmx/nested.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fdd2db5126ce9cce22947354008d430252b08a03 Author: Adrian Hunter <adrian.hunter@intel.com> Date: Fri Nov 1 11:50:31 2024 -0700 KVM: VMX: Allow toggling bits in MSR_IA32_RTIT_CTL when enable bit is cleared Allow toggling other bits in MSR_IA32_RTIT_CTL if the enable bit is being cleared, the existing logic simply ignores the enable bit. E.g. KVM will incorrectly reject a write of '0' to stop tracing. Fixes: bf8c55d8dc09 ("KVM: x86: Implement Intel PT MSRs read/write emulation") Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> [sean: rework changelog, drop stable@] Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241101185031.1799556-3-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/vmx/vmx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 04bc93cf49d16d01753b95ddb5d4f230b809a991 Author: Chao Gao <chao.gao@intel.com> Date: Wed Nov 27 16:00:10 2024 -0800 KVM: nVMX: Defer SVI update to vmcs01 on EOI when L2 is active w/o VID If KVM emulates an EOI for L1's virtual APIC while L2 is active, defer updating GUEST_INTERUPT_STATUS.SVI, i.e. the VMCS's cache of the highest in-service IRQ, until L1 is active, as vmcs01, not vmcs02, needs to track vISR. The missed SVI update for vmcs01 can result in L1 interrupts being incorrectly blocked, e.g. if there is a pending interrupt with lower priority than the interrupt that was EOI'd. This bug only affects use cases where L1's vAPIC is effectively passed through to L2, e.g. in a pKVM scenario where L2 is L1's depriveleged host, as KVM will only emulate an EOI for L1's vAPIC if Virtual Interrupt Delivery (VID) is disabled in vmc12, and L1 isn't intercepting L2 accesses to its (virtual) APIC page (or if x2APIC is enabled, the EOI MSR). WARN() if KVM updates L1's ISR while L2 is active with VID enabled, as an EOI from L2 is supposed to affect L2's vAPIC, but still defer the update, to try to keep L1 alive. Specifically, KVM forwards all APICv-related VM-Exits to L1 via nested_vmx_l1_wants_exit(): case EXIT_REASON_APIC_ACCESS: case EXIT_REASON_APIC_WRITE: case EXIT_REASON_EOI_INDUCED: /* * The controls for "virtualize APIC accesses," "APIC- * register virtualization," and "virtual-interrupt * delivery" only come from vmcs12. */ return true; Fixes: c7c9c56ca26f ("x86, apicv: add virtual interrupt delivery support") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/kvm/20230312180048.1778187-1-jason.cj.chen@intel.com Reported-by: Markku Ahvenjärvi <mankku@gmail.com> Closes: https://lore.kernel.org/all/20240920080012.74405-1-mankku@gmail.com Cc: Janne Karhunen <janne.karhunen@gmail.com> Signed-off-by: Chao Gao <chao.gao@intel.com> [sean: drop request, handle in VMX, write changelog] Tested-by: Chao Gao <chao.gao@intel.com> Link: https://lore.kernel.org/r/20241128000010.4051275-3-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/lapic.c | 11 +++++++++++ arch/x86/kvm/lapic.h | 1 + arch/x86/kvm/vmx/nested.c | 5 +++++ arch/x86/kvm/vmx/vmx.c | 21 +++++++++++++++++++++ arch/x86/kvm/vmx/vmx.h | 1 + 5 files changed, 39 insertions(+) commit e49ecdf79a6009433b8a4aff827eab3d43b61ea5 Author: Robin Murphy <robin.murphy@arm.com> Date: Wed Dec 11 19:04:58 2024 +0000 perf/arm-cmn: Permit more exhaustive groups The group validation logic still somewhat assumes the original CMN-600 case of events counting globally, such that if one tries to group 9 events where the first 8 target a single DTC domain, the 9th will be rejected because *a* DTC domain is full, even though it might only target other non-overlapping domains and thus still be schedulable. Improve matters by only counting the DTCs that the new event actually needs (as arm_cmn_val_add_event() was already clever enough to do). Signed-off-by: Robin Murphy <robin.murphy@arm.com> Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com> Link: https://lore.kernel.org/r/bdfd1e58dac449e407c5cacfd6bf8577dc0a5899.1733943898.git.robin.murphy@arm.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/arm-cmn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6b3099ebca13ecc5d0e7d07b438672addbd65da6 Merge: 4fefbc66dfb3 5760711e198d Author: Paolo Abeni <pabeni@redhat.com> Date: Thu Dec 19 16:02:24 2024 +0100 Merge branch 'net-fib_rules-add-flow-label-selector-support' Ido Schimmel says: ==================== net: fib_rules: Add flow label selector support In some deployments users would like to encode path information into certain bits of the IPv6 flow label, the UDP source port and the DSCP and use this information to route packets accordingly. Redirecting traffic to a routing table based on the flow label is not currently possible with Linux as FIB rules cannot match on it despite the flow label being available in the IPv6 flow key. This patchset extends FIB rules to match on the flow label with a mask. Future patches will add mask attributes to L4 ports and DSCP matches. Patches #1-#5 gradually extend FIB rules to match on the flow label. Patches #6-#7 allow user space to specify a flow label in route get requests. This is useful for both debugging and testing. Patch #8 adjusts the fib6_table_lookup tracepoint to print the flow label to the trace buffer for better observability. Patch #9 extends the FIB rule selftest with flow label test cases while utilizing the route get functionality from patch #6. ==================== Link: https://patch.msgid.link/20241216171201.274644-1-idosch@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> commit 5760711e198d86bd0d0b9270a54a494ae9a501e0 Author: Ido Schimmel <idosch@nvidia.com> Date: Mon Dec 16 19:12:01 2024 +0200 selftests: fib_rule_tests: Add flow label selector match tests Add tests for the new FIB rule flow label selector. Test both good and bad flows and with both input and output routes. # ./fib_rule_tests.sh IPv6 FIB rule tests [...] TEST: rule6 check: flowlabel redirect to table [ OK ] TEST: rule6 check: flowlabel no redirect to table [ OK ] TEST: rule6 del by pref: flowlabel redirect to table [ OK ] TEST: rule6 check: iif flowlabel redirect to table [ OK ] TEST: rule6 check: iif flowlabel no redirect to table [ OK ] TEST: rule6 del by pref: iif flowlabel redirect to table [ OK ] TEST: rule6 check: flowlabel masked redirect to table [ OK ] TEST: rule6 check: flowlabel masked no redirect to table [ OK ] TEST: rule6 del by pref: flowlabel masked redirect to table [ OK ] TEST: rule6 check: iif flowlabel masked redirect to table [ OK ] TEST: rule6 check: iif flowlabel masked no redirect to table [ OK ] TEST: rule6 del by pref: iif flowlabel masked redirect to table [ OK ] [...] Tests passed: 268 Tests failed: 0 Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> tools/testing/selftests/net/fib_rule_tests.sh | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 002bf68a3b3e5f90ce61ea8fd11b8b62fd0765ce Author: Ido Schimmel <idosch@nvidia.com> Date: Mon Dec 16 19:12:00 2024 +0200 tracing: ipv6: Add flow label to fib6_table_lookup tracepoint The different parameters affecting the IPv6 route lookup are printed to the trace buffer by the fib6_table_lookup tracepoint. Add the IPv6 flow label for better observability as it can affect the route lookup both in terms of multipath hash calculation and policy based routing (FIB rules). Example: # echo 1 > /sys/kernel/tracing/events/fib6/fib6_table_lookup/enable # ip -6 route get ::1 flowlabel 0x12345 ipproto udp sport 12345 dport 54321 &> /dev/null # cat /sys/kernel/tracing/trace_pipe ip-358 [010] ..... 44.897484: fib6_table_lookup: table 255 oif 0 iif 1 proto 17 ::/12345 -> ::1/54321 flowlabel 0x12345 tos 0 scope 0 flags 0 ==> dev lo gw :: err 0 Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> include/trace/events/fib6.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d26b8267d9e02b02c8d1aeb38d7730b5efab3b64 Author: Ido Schimmel <idosch@nvidia.com> Date: Mon Dec 16 19:11:59 2024 +0200 netlink: specs: Add route flow label attribute Add the new flow label attribute to the spec. Example: # ip link add name dummy1 up type dummy # ip -6 route add default table 254 dev dummy1 # ip -6 route add default table 10 dev dummy1 # ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_rule.yaml \ --do newrule \ --json '{"family": 10, "priority": 1, "flowlabel": 10, "flowlabel-mask": 255, "action": 1, "table": 10}' None $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_route.yaml \ --do getroute \ --json '{"rtm-family": 10, "rta-flowlabel": 1}' --output-json \ | jq '.["rta-table"]' 254 $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_route.yaml \ --do getroute \ --json '{"rtm-family": 10, "rta-flowlabel": 10}' --output-json \ | jq '.["rta-table"]' 10 Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Documentation/netlink/specs/rt_route.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit ba4138032ae3b5b8e2b68d2f2647cdc0817b05a6 Author: Ido Schimmel <idosch@nvidia.com> Date: Mon Dec 16 19:11:58 2024 +0200 ipv6: Add flow label to route get requests The default IPv6 multipath hash policy takes the flow label into account when calculating a multipath hash and previous patches added a flow label selector to IPv6 FIB rules. Allow user space to specify a flow label in route get requests by adding a new netlink attribute and using its value to populate the "flowlabel" field in the IPv6 flow info structure prior to a route lookup. Deny the attribute in RTM_{NEW,DEL}ROUTE requests by checking for it in rtm_to_fib6_config() and returning an error if present. A subsequent patch will use this capability to test the new flow label selector in IPv6 FIB rules. Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> include/uapi/linux/rtnetlink.h | 1 + net/ipv6/route.c | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) commit c72004aac60a9ffdf4bc29b1e7ff0798a7eab3c2 Author: Ido Schimmel <idosch@nvidia.com> Date: Mon Dec 16 19:11:57 2024 +0200 netlink: specs: Add FIB rule flow label attributes Add the new flow label attributes to the spec. Example: # ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_rule.yaml \ --do newrule \ --json '{"family": 10, "flowlabel": 1, "flowlabel-mask": 1, "action": 1, "table": 1}' None $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_rule.yaml \ --dump getrule --json '{"family": 10}' --output-json \ | jq '.[] | select(.flowlabel == "0x1")' { "table": 1, "suppress-prefixlen": "0xffffffff", "protocol": 0, "priority": 32765, "flowlabel": "0x1", "flowlabel-mask": "0x1", "family": 10, "dst-len": 0, "src-len": 0, "tos": 0, "action": "to-tbl", "flags": 0 } Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Documentation/netlink/specs/rt_rule.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 4c25f3f0519486382644c76ee11b127026095c61 Author: Ido Schimmel <idosch@nvidia.com> Date: Mon Dec 16 19:11:56 2024 +0200 net: fib_rules: Enable flow label selector usage Now that both IPv4 and IPv6 correctly handle the new flow label attributes, enable user space to configure FIB rules that make use of the flow label by changing the policy to stop rejecting them and accepting 32 bit values in big-endian byte order. Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/core/fib_rules.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9aa77531a1314dd46d3694eac5dc469a6690fca7 Author: Ido Schimmel <idosch@nvidia.com> Date: Mon Dec 16 19:11:55 2024 +0200 ipv6: fib_rules: Add flow label support Implement support for the new flow label selector which allows IPv6 FIB rules to match on the flow label with a mask. Ensure that both flow label attributes are specified (or none) and that the mask is valid. Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/ipv6/fib6_rules.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) commit f0c898d8c279e6cfdf5e25dc04424d518dec1aa4 Author: Ido Schimmel <idosch@nvidia.com> Date: Mon Dec 16 19:11:54 2024 +0200 ipv4: fib_rules: Reject flow label attributes IPv4 FIB rules cannot match on flow label so reject requests that try to add such rules. Do that in the IPv4 configure callback as the netlink policy resides in the core and used by both IPv4 and IPv6. Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/ipv4/fib_rules.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d1d761b3012e99d55d288d435384be606302cb2c Author: Ido Schimmel <idosch@nvidia.com> Date: Mon Dec 16 19:11:53 2024 +0200 net: fib_rules: Add flow label selector attributes Add new FIB rule attributes which will allow user space to match on the IPv6 flow label with a mask. Temporarily set the type of the attributes to 'NLA_REJECT' while support is being added in the IPv6 code. Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> include/uapi/linux/fib_rules.h | 2 ++ net/core/fib_rules.c | 2 ++ 2 files changed, 4 insertions(+) commit 314d44bc8eaab6e159ebf187356e9bd40e2baf9b Author: Bagas Sanjaya <bagasdotme@gmail.com> Date: Tue Dec 17 10:49:15 2024 +0700 drm/sched: Fix drm_sched_fini() docu generation Commit baf4afc5831438 ("drm/sched: Improve teardown documentation") documents problems of drm_sched_fini() in form of a list. The checklist triggers htmldocs warning (but renders correctly in htmldocs output): Documentation/gpu/drm-mm:571: ./drivers/gpu/drm/scheduler/sched_main.c:1359: ERROR: Unexpected indentation. Separate the list from the preceding paragraph by a blank line to fix the warning. While at it, also end the aforementioned paragraph by a colon. Fixes: baf4afc58314 ("drm/sched: Improve teardown documentation") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Closes: https://lore.kernel.org/r/20241108175655.6d3fcfb7@canb.auug.org.au/ Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> [phasta: Adjust commit message] Signed-off-by: Philipp Stanner <phasta@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241217034915.62594-1-bagasdotme@gmail.com drivers/gpu/drm/scheduler/sched_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 094041b176546a82db2ecc84b7a7d31d43d4ffb9 Merge: b06bc4727991 f64f610ec6ab Author: Ulf Hansson <ulf.hansson@linaro.org> Date: Thu Dec 19 15:49:44 2024 +0100 pmdomain: Merge branch fixes into next Merge the pmdomain fixes for v6.13-rc[n] into the next branch, to allow them to get tested together with the new changes that are targeted for v6.14. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> commit 40ed9e9b2808beeb835bd0ed971fb364c285d39c Author: Ricardo Ribalda <ribalda@chromium.org> Date: Wed Dec 18 21:39:11 2024 +0000 media: uvcvideo: Announce the user our deprecation intentions If the user sets the nodrop parameter, print a deprecation warning once. Hopefully they will come to the mailing list if it is an ABI change. Now that we have a callback, take this chance to parse the parameter as a boolean. We still say to userspace that it is a uint to avoid ABI changes. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241218-uvc-deprecate-v2-4-ab814139e983@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_driver.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 8869eb654f2a7abb2dcdb79606fc95a4f092a449 Author: Ricardo Ribalda <ribalda@chromium.org> Date: Wed Dec 18 21:39:10 2024 +0000 media: uvcvideo: Allow changing noparam on the fly Right now the parameter value is read during video_registration and cannot be changed afterwards, despite its permissions 0644, that makes the user believe that the value can be written. The parameter only affects the behaviour of uvc_queue_buffer_complete(), with only one check per buffer. We can read the value directly from uvc_queue_buffer_complete() and therefore allowing changing it with sysfs on the fly. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241218-uvc-deprecate-v2-3-ab814139e983@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_driver.c | 2 +- drivers/media/usb/uvc/uvc_queue.c | 6 ++---- drivers/media/usb/uvc/uvcvideo.h | 4 +--- 3 files changed, 4 insertions(+), 8 deletions(-) commit 52fbe173baa4df9d14bd733f42ee6b9ceab8299b Author: Ricardo Ribalda <ribalda@chromium.org> Date: Wed Dec 18 21:39:09 2024 +0000 media: uvcvideo: Invert default value for nodrop module param The module param `nodrop` defines what to do with frames that contain an error: drop them or sending them to userspace. The default in the rest of the media subsystem is to return buffers with an error to userspace with V4L2_BUF_FLAG_ERROR set in v4l2_buffer.flags. In UVC we drop buffers with errors by default. Change the default behaviour of uvcvideo to match the rest of the drivers and maybe get rid of the module parameter in the future. Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241218-uvc-deprecate-v2-2-ab814139e983@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87ce177654e388451850905a1d376658aebe8699 Author: Ricardo Ribalda <ribalda@chromium.org> Date: Wed Dec 18 21:39:08 2024 +0000 media: uvcvideo: Propagate buf->error to userspace Now we return VB2_BUF_STATE_DONE for valid and invalid frames. Propagate the correct value, so the user can know if the frame is valid or not via struct v4l2_buffer->flags. Reported-by: Hans de Goede <hdegoede@redhat.com> Closes: https://lore.kernel.org/linux-media/84b0f212-cd88-46bb-8e6f-b94ec3eccba6@redhat.com Fixes: 6998b6fb4b1c ("[media] uvcvideo: Use videobuf2-vmalloc") Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241218-uvc-deprecate-v2-1-ab814139e983@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_queue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d6b874ff9ce28b7c65606f1d046fd41e39df17ca Author: Ricardo Ribalda <ribalda@chromium.org> Date: Tue Dec 3 21:20:12 2024 +0000 media: uvcvideo: Flush the control cache when we get an event Asynchronous controls trigger an event when they have completed their operation. This can make that the control cached value does not match the value in the device. Let's flush the cache to be on the safe side. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20241203-uvc-fix-async-v6-5-26c867231118@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_ctrl.c | 3 +++ 1 file changed, 3 insertions(+) commit 02baaa09d1cb32eaaed74135cab15155ffd7b953 Author: Ricardo Ribalda <ribalda@chromium.org> Date: Tue Dec 3 21:20:11 2024 +0000 media: uvcvideo: Annotate lock requirements for uvc_ctrl_set Make it explicit that the function is always called with ctrl_mutex being held. Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://lore.kernel.org/r/20241203-uvc-fix-async-v6-4-26c867231118@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_ctrl.c | 2 ++ 1 file changed, 2 insertions(+) commit 221cd51efe4565501a3dbf04cc011b537dcce7fb Author: Ricardo Ribalda <ribalda@chromium.org> Date: Tue Dec 3 21:20:10 2024 +0000 media: uvcvideo: Remove dangling pointers When an async control is written, we copy a pointer to the file handle that started the operation. That pointer will be used when the device is done. Which could be anytime in the future. If the user closes that file descriptor, its structure will be freed, and there will be one dangling pointer per pending async control, that the driver will try to use. Clean all the dangling pointers during release(). To avoid adding a performance penalty in the most common case (no async operation), a counter has been introduced with some logic to make sure that it is properly handled. Cc: stable@vger.kernel.org Fixes: e5225c820c05 ("media: uvcvideo: Send a control event when a Control Change interrupt arrives") Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20241203-uvc-fix-async-v6-3-26c867231118@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_ctrl.c | 59 ++++++++++++++++++++++++++++++++++++++-- drivers/media/usb/uvc/uvc_v4l2.c | 2 ++ drivers/media/usb/uvc/uvcvideo.h | 9 +++++- 3 files changed, 67 insertions(+), 3 deletions(-) commit 04d3398f66d2d31c4b8caea88f051a4257b7a161 Author: Ricardo Ribalda <ribalda@chromium.org> Date: Tue Dec 3 21:20:09 2024 +0000 media: uvcvideo: Remove redundant NULL assignment ctrl->handle will only be different than NULL for controls that have mappings. This is because that assignment is only done inside uvc_ctrl_set() for mapped controls. Cc: stable@vger.kernel.org Fixes: e5225c820c05 ("media: uvcvideo: Send a control event when a Control Change interrupt arrives") Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://lore.kernel.org/r/20241203-uvc-fix-async-v6-2-26c867231118@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_ctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d9fecd096f67a4469536e040a8a10bbfb665918b Author: Ricardo Ribalda <ribalda@chromium.org> Date: Tue Dec 3 21:20:08 2024 +0000 media: uvcvideo: Only save async fh if success Now we keep a reference to the active fh for any call to uvc_ctrl_set, regardless if it is an actual set or if it is a just a try or if the device refused the operation. We should only keep the file handle if the device actually accepted applying the operation. Cc: stable@vger.kernel.org Fixes: e5225c820c05 ("media: uvcvideo: Send a control event when a Control Change interrupt arrives") Suggested-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://lore.kernel.org/r/20241203-uvc-fix-async-v6-1-26c867231118@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_ctrl.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 4c2367d46a81d1c291ce05bef2d626fb70771e63 Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Date: Sun Nov 17 23:33:04 2024 +0200 MAINTAINERS: Add missing file entries for the USB video class driver The USB video class driver is missing a few F: entries for files related to the driver that have been added to the kernel over the years. Add them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> MAINTAINERS | 4 ++++ 1 file changed, 4 insertions(+) commit 082dd785e20860fcddaab815903c2e54dadd0cc7 Author: Benoit Sevens <bsevens@google.com> Date: Thu Nov 7 14:22:03 2024 +0000 media: uvcvideo: Refactor frame parsing code into a uvc_parse_frame function The ftype value does not change in the while loop so we can check it before entering the while loop. Refactoring the frame parsing code into a dedicated uvc_parse_frame function makes this more readable. Signed-off-by: Benoit Sevens <bsevens@google.com> Link: https://lore.kernel.org/r/20241107142204.1182969-3-bsevens@google.com Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_driver.c | 229 ++++++++++++++++++++----------------- 1 file changed, 122 insertions(+), 107 deletions(-) commit 840fb2c33904c0e56b6c2d2bd2683ac6c30933ea Author: Ricardo Ribalda <ribalda@chromium.org> Date: Mon Dec 2 13:37:35 2024 +0000 media: uvcvideo: Remove duplicated cap/out code The *_vid_cap and *_vid_out helpers seem to be identical: - Remove all the cap/out duplicated code. - Remove s/g_parm helpers - Reorder uvc_ioctl_ops And now that we are at it, fix a comment for uvc_acquire_privileges() Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://lore.kernel.org/r/20241202-uvc-dup-cap-out-v3-1-d40b11bb74b7@chromium.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_v4l2.c | 162 +++++++++++---------------------------- 1 file changed, 43 insertions(+), 119 deletions(-) commit 7309f3e2b7fd2b7a9b175d0da565427a0c007287 Author: Xiong Nandi <xndchn@gmail.com> Date: Fri Nov 29 23:17:23 2024 +0800 media: uvcvideo: Use uvc_query_name in uvc_get_video_ctrl uvc_query_name was introduced to print query name in uvc_query_ctrl. So we can also use it in uvc_get_video_ctrl. Signed-off-by: Xiong Nandi <xndchn@gmail.com> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20241129151723.48275-1-xndchn@gmail.com Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_video.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 060950f7f74ef242ce9eec837a75a53b379959f0 Author: Ricardo Ribalda <ribalda@chromium.org> Date: Thu Nov 28 20:53:42 2024 +0000 media: uvcvideo: Add more logging to uvc_query_ctrl() If we fail to query the control error code there is no information on dmesg or in uvc_dbg. This makes difficult to debug the issue. Print a proper error message when we cannot retrieve the error code from the device. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://lore.kernel.org/r/20241128-uvc-readless-v5-2-cf16ed282af8@chromium.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_video.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f00ee2ca8da25ebccb8e19956d853c9055e2c8d0 Author: Ricardo Ribalda <ribalda@chromium.org> Date: Thu Nov 28 20:53:41 2024 +0000 media: uvcvideo: Support partial control reads Some cameras, like the ELMO MX-P3, do not return all the bytes requested from a control if it can fit in less bytes. Eg: Returning 0xab instead of 0x00ab. usb 3-9: Failed to query (GET_DEF) UVC control 3 on unit 2: 1 (exp. 2). Extend the returned value from the camera and return it. Cc: stable@vger.kernel.org Fixes: a763b9fb58be ("media: uvcvideo: Do not return positive errors in uvc_query_ctrl()") Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://lore.kernel.org/r/20241128-uvc-readless-v5-1-cf16ed282af8@chromium.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_video.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit c31cffd5ae2c3d7ef21d9008977a9d117ce7a64e Author: Ricardo Ribalda <ribalda@chromium.org> Date: Thu Nov 14 19:10:30 2024 +0000 media: uvcvideo: Fix event flags in uvc_ctrl_send_events If there is an event that needs the V4L2_EVENT_CTRL_CH_FLAGS flag, all the following events will have that flag, regardless if they need it or not. This is because we keep using the same variable all the time and we do not reset its original value. Cc: stable@vger.kernel.org Fixes: 805e9b4a06bf ("[media] uvcvideo: Send control change events for slave ctrls when the master changes") Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20241114-uvc-roi-v15-1-64cfeb56b6f8@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a67f75c2b5ecf534eab416ce16c11fe780c4f8f6 Author: Ricardo Ribalda <ribalda@chromium.org> Date: Tue Oct 22 08:30:30 2024 +0000 media: uvcvideo: Fix deadlock during uvc_probe If uvc_probe() fails, it can end up calling uvc_status_unregister() before uvc_status_init() is called. Fix this by checking if dev->status is NULL or not in uvc_status_unregister(). Reported-by: syzbot+9446d5e0d25571e6a212@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-media/20241020160249.GD7770@pendragon.ideasonboard.com/T/#m506744621d72a2ace5dd2ab64055be9898112dbd Fixes: c5fe3ed618f9 ("media: uvcvideo: Avoid race condition during unregister") Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20241022-race-unreg-v1-1-2212f364d9de@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_status.c | 3 +++ 1 file changed, 3 insertions(+) commit c6ef3a7fa97ec823a1e1af9085cf13db9f7b3bac Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Date: Fri Nov 8 01:51:30 2024 +0200 media: uvcvideo: Fix double free in error path If the uvc_status_init() function fails to allocate the int_urb, it will free the dev->status pointer but doesn't reset the pointer to NULL. This results in the kfree() call in uvc_status_cleanup() trying to double-free the memory. Fix it by resetting the dev->status pointer to NULL after freeing it. Fixes: a31a4055473b ("V4L/DVB:usbvideo:don't use part of buffer for USB transfer #4") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20241107235130.31372-1-laurent.pinchart@ideasonboard.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_status.c | 1 + 1 file changed, 1 insertion(+) commit a9ea1a3d88b7947ce8cadb2afceee7a54872bbc5 Author: Ricardo Ribalda <ribalda@chromium.org> Date: Wed Nov 6 20:36:07 2024 +0000 media: uvcvideo: Fix crash during unbind if gpio unit is in use We used the wrong device for the device managed functions. We used the usb device, when we should be using the interface device. If we unbind the driver from the usb interface, the cleanup functions are never called. In our case, the IRQ is never disabled. If an IRQ is triggered, it will try to access memory sections that are already free, causing an OOPS. We cannot use the function devm_request_threaded_irq here. The devm_* clean functions may be called after the main structure is released by uvc_delete. Luckily this bug has small impact, as it is only affected by devices with gpio units and the user has to unbind the device, a disconnect will not trigger this error. Cc: stable@vger.kernel.org Fixes: 2886477ff987 ("media: uvcvideo: Implement UVC_EXT_GPIO_UNIT") Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20241106-uvc-crashrmmod-v6-1-fbf9781c6e83@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_driver.c | 28 +++++++++++++++++++++------- drivers/media/usb/uvc/uvcvideo.h | 1 + 2 files changed, 22 insertions(+), 7 deletions(-) commit 33656034de418b7d5b7c9605bbaf8cd00c7e7769 Author: Ricardo Ribalda <ribalda@chromium.org> Date: Tue Oct 22 08:37:13 2024 +0000 media: uvcvideo: Reorder uvc_status_init() Only initialize the input device if the interrupt endpoint has been properly initialized. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20241022-order_status-v1-1-3904fafca340@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/usb/uvc/uvc_status.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 03f8e0e05510dad6377cd5ef029594d30e6c096d Author: Mario Limonciello <mario.limonciello@amd.com> Date: Tue Dec 17 13:39:52 2024 -0600 platform/x86/amd: pmf: Switch to guard(mutex) Instead of using the `goto label; mutex_unlock()` pattern use `guard(mutex)` which will release the mutex when it goes out of scope. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241217194027.1189038-3-superm1@kernel.org Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/amd/pmf/acpi.c | 6 ++---- drivers/platform/x86/amd/pmf/core.c | 18 ++++++++---------- 2 files changed, 10 insertions(+), 14 deletions(-) commit f947ea8dd657ed70c0c02b35ac485a24366201d3 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Tue Dec 17 13:39:51 2024 -0600 platform/x86/amd: pmc: Use guard(mutex) Instead of using the `goto label; mutex_unlock()` pattern use `guard(mutex)` which will release the mutex when it goes out of scope. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241217194027.1189038-2-superm1@kernel.org Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/amd/pmc/pmc.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 741521fa273fdd119f149dd208d7b60fc9400bb5 Author: Eric Biggers <ebiggers@google.com> Date: Thu Dec 12 20:19:50 2024 -0800 mmc: sdhci-msm: convert to use custom crypto profile As is being done in ufs-qcom, make the sdhci-msm driver override the full crypto profile rather than "just" key programming and eviction. This makes it much more straightforward to add support for hardware-wrapped inline encryption keys. It also makes it easy to pass the original blk_crypto_key down to qcom_ice_program_key() once it is updated to require the key in that form. Signed-off-by: Eric Biggers <ebiggers@google.com> Message-ID: <20241213041958.202565-8-ebiggers@kernel.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/cqhci-crypto.c | 33 +++++++-------- drivers/mmc/host/cqhci.h | 8 ++-- drivers/mmc/host/sdhci-msm.c | 94 ++++++++++++++++++++++++++++++++--------- 3 files changed, 94 insertions(+), 41 deletions(-) commit 08a7ead3242f70f4415232800104ae458fd96d17 Author: Eric Biggers <ebiggers@google.com> Date: Thu Dec 12 20:19:49 2024 -0800 mmc: crypto: add mmc_from_crypto_profile() Add a helper function that encapsulates a container_of expression. For now there is just one user but soon there will be more. Signed-off-by: Eric Biggers <ebiggers@google.com> Message-ID: <20241213041958.202565-7-ebiggers@kernel.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/cqhci-crypto.c | 5 +---- include/linux/mmc/host.h | 8 ++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) commit f2d3630f1c361cfcd16fff88ff79e19ef8ac896a Merge: 6ee5233a4c91 8d90a86ed053 Author: Ulf Hansson <ulf.hansson@linaro.org> Date: Thu Dec 19 14:42:22 2024 +0100 mmc: Merge branch fixes into next Merge the mmc fixes for v6.13-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.14. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> commit c2a86d8ce81d43ae56549682097ebf5827ec43b9 Author: Nirmoy Das <nirmoy.das@intel.com> Date: Wed Dec 18 15:14:47 2024 +0100 drm/xe/tests: Move shrink test out of xe_bo The subtest typically has an execution time long enough to motivate a separate test so that it can be easily excluded if needed. v2: reword commit message(Thomas) Cc: Matthew Auld <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241218141447.2528530-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> drivers/gpu/drm/xe/tests/xe_bo.c | 16 ++++++++++++++-- drivers/gpu/drm/xe/tests/xe_live_test_mod.c | 2 ++ 2 files changed, 16 insertions(+), 2 deletions(-) commit a066bad89c6c79890bb8f45aef8662dcd0562a62 Merge: 78d4f34e2115 9af04539d474 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Thu Dec 19 07:50:06 2024 -0500 Merge tag 'kvm-selftests-treewide-6.14' of https://github.com/kvm-x86/linux into HEAD KVM selftests "tree"-wide changes for 6.14: - Rework vcpu_get_reg() to return a value instead of using an out-param, and update all affected arch code accordingly. - Convert the max_guest_memory_test into a more generic mmu_stress_test. The basic gist of the "conversion" is to have the test do mprotect() on guest memory while vCPUs are accessing said memory, e.g. to verify KVM and mmu_notifiers are working as intended. - Play nice with treewrite builds of unsupported architectures, e.g. arm (32-bit), as KVM selftests' Makefile doesn't do anything to ensure the target architecture is actually one KVM selftests supports. - Use the kernel's $(ARCH) definition instead of the target triple for arch specific directories, e.g. arm64 instead of aarch64, mainly so as not to be different from the rest of the kernel. commit 3d7fdd8e38aafd4858935df2392762c1ab8fb40f Author: Nícolas F. R. A. Prado <nfraprado@collabora.com> Date: Wed Dec 18 19:01:08 2024 -0300 arm64: dts: mediatek: mt8195: Remove suspend-breaking reset from pcie1 The MAC reset for PCIe port 1 on MT8195 when asserted during suspend causes the system to hang during resume with the following error (with no_console_suspend enabled): mtk-pcie-gen3 112f8000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x0) mtk-pcie-gen3 112f8000.pcie: PM: dpm_run_callback(): genpd_resume_noirq+0x0/0x24 returns -110 mtk-pcie-gen3 112f8000.pcie: PM: failed to resume noirq: error -110 This issue is specific to MT8195. On MT8192 with the PCIe reset, MT8192_INFRA_RST4_PCIE_TOP_SWRST, added to the DT node, the issue is not observed. Since without the reset, the PCIe controller and WiFi card connected to it, work just as well, remove the reset to allow the system to suspend and resume properly. Fixes: ecc0af6a3fe6 ("arm64: dts: mt8195: Add pcie and pcie phy nodes") Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://lore.kernel.org/r/20241218-mt8195-pcie1-reset-suspend-fix-v1-1-1c021dda42a6@collabora.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8195.dtsi | 3 --- 1 file changed, 3 deletions(-) commit c57c76498a895a705b624ed65dfe5a3037b78d83 Author: Advait Dhamorikar <advaitdhamorikar@gmail.com> Date: Thu Dec 19 10:09:39 2024 +0530 RDMA/erdma: Fix opcode conditional check Fix conditional if else check by checking with wr->opcode. The indicated dead code may have performed some action; that action will never occur as op is pre-assigned a different value. Fixes: 999a0a2e9b87 ("RDMA/erdma: Support UD QPs and UD WRs") Signed-off-by: Advait Dhamorikar <advaitdhamorikar@gmail.com> Link: https://patch.msgid.link/20241219043939.10344-1-advaitdhamorikar@gmail.com Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/erdma/erdma_qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 312189ebb802a0242639a9c628cfdc6e532d8e11 Author: Frank Wunderlich <frank-w@public-files.de> Date: Fri Dec 6 14:23:59 2024 +0100 arm64: dts: mt7986: add overlay for SATA power socket on BPI-R3 Bananapi R3 has a Power socket entended for using external SATA drives. This Socket is off by default but can be switched with gpio 8. Add an overlay to activate it. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Link: https://lore.kernel.org/r/20241206132401.70259-1-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/Makefile | 1 + .../dts/mediatek/mt7986a-bananapi-bpi-r3-sata.dtso | 34 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit a3cbf68c69611188cd304229e346bffdabfd4277 Author: Ma Ke <make_ruc2021@163.com> Date: Tue Dec 17 15:55:38 2024 +0800 RDMA/srp: Fix error handling in srp_add_port As comment of device_add() says, if device_add() succeeds, you should call device_del() when you want to get rid of it. If device_add() has not succeeded, use only put_device() to drop the reference count. Add a put_device() call before returning from the function to decrement reference count for cleanup. Found by code review. Fixes: c8e4c2397655 ("RDMA/srp: Rework the srp_add_port() error path") Signed-off-by: Ma Ke <make_ruc2021@163.com> Link: https://patch.msgid.link/20241217075538.2909996-1-make_ruc2021@163.com Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/ulp/srp/ib_srp.c | 1 - 1 file changed, 1 deletion(-) commit 2ac0bd27133114ae00420da10aed2af739bdacb2 Author: David Heidelberg <david@ixit.cz> Date: Sun Dec 15 10:41:49 2024 -0500 media: Documentation: PHY information can be obtained from OF endpoint too bus-type endpoint property contains the information. Signed-off-by: David Heidelberg <david@ixit.cz> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Documentation/driver-api/media/tx-rx.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d9599ed3281bd0595d137277daf603714d833575 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 15 15:18:33 2024 +0100 media: i2c: imx208: Use const 'struct bin_attribute' callback The sysfs core now provides callback variants that explicitly take a const pointer. Make use of it to match the attribute definition. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/imx208.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b76fb1f2c5a39e8e1b785e94a08448847fe4c626 Author: Sakari Ailus <sakari.ailus@linux.intel.com> Date: Mon Dec 16 16:13:16 2024 +0200 media: Documentation: tx-rx: Fix formatting Fix formatting under "``.enable_streams()`` and ``.disable_streams()`` callbacks" in tx-rx.rst. Fixes: 30fe661eb9d3 ("media: Documentation: Deprecate s_stream video op, update docs") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Documentation/driver-api/media/tx-rx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee1b5046d5cd892a0754ab982aeaaad3702083a5 Author: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Date: Tue Dec 17 08:51:50 2024 +0200 staging: media: max96712: fix kernel oops when removing module The following kernel oops is thrown when trying to remove the max96712 module: Unable to handle kernel paging request at virtual address 00007375746174db Mem abort info: ESR = 0x0000000096000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault Data abort info: ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 user pgtable: 4k pages, 48-bit VAs, pgdp=000000010af89000 [00007375746174db] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Modules linked in: crct10dif_ce polyval_ce mxc_jpeg_encdec flexcan snd_soc_fsl_sai snd_soc_fsl_asoc_card snd_soc_fsl_micfil dwc_mipi_csi2 imx_csi_formatter polyval_generic v4l2_jpeg imx_pcm_dma can_dev snd_soc_imx_audmux snd_soc_wm8962 snd_soc_imx_card snd_soc_fsl_utils max96712(C-) rpmsg_ctrl rpmsg_char pwm_fan fuse [last unloaded: imx8_isi] CPU: 0 UID: 0 PID: 754 Comm: rmmod Tainted: G C 6.12.0-rc6-06364-g327fec852c31 #17 Tainted: [C]=CRAP Hardware name: NXP i.MX95 19X19 board (DT) pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : led_put+0x1c/0x40 lr : v4l2_subdev_put_privacy_led+0x48/0x58 sp : ffff80008699bbb0 x29: ffff80008699bbb0 x28: ffff00008ac233c0 x27: 0000000000000000 x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000 x23: ffff000080cf1170 x22: ffff00008b53bd00 x21: ffff8000822ad1c8 x20: ffff000080ff5c00 x19: ffff00008b53be40 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000004 x13: ffff0000800f8010 x12: 0000000000000000 x11: ffff000082acf5c0 x10: ffff000082acf478 x9 : ffff0000800f8010 x8 : 0101010101010101 x7 : 7f7f7f7f7f7f7f7f x6 : fefefeff6364626d x5 : 8080808000000000 x4 : 0000000000000020 x3 : 00000000553a3dc1 x2 : ffff00008ac233c0 x1 : ffff00008ac233c0 x0 : ff00737574617473 Call trace: led_put+0x1c/0x40 v4l2_subdev_put_privacy_led+0x48/0x58 v4l2_async_unregister_subdev+0x2c/0x1a4 max96712_remove+0x1c/0x38 [max96712] i2c_device_remove+0x2c/0x9c device_remove+0x4c/0x80 device_release_driver_internal+0x1cc/0x228 driver_detach+0x4c/0x98 bus_remove_driver+0x6c/0xbc driver_unregister+0x30/0x60 i2c_del_driver+0x54/0x64 max96712_i2c_driver_exit+0x18/0x1d0 [max96712] __arm64_sys_delete_module+0x1a4/0x290 invoke_syscall+0x48/0x10c el0_svc_common.constprop.0+0xc0/0xe0 do_el0_svc+0x1c/0x28 el0_svc+0x34/0xd8 el0t_64_sync_handler+0x120/0x12c el0t_64_sync+0x190/0x194 Code: f9000bf3 aa0003f3 f9402800 f9402000 (f9403400) ---[ end trace 0000000000000000 ]--- This happens because in v4l2_i2c_subdev_init(), the i2c_set_cliendata() is called again and the data is overwritten to point to sd, instead of priv. So, in remove(), the wrong pointer is passed to v4l2_async_unregister_subdev(), leading to a crash. Fixes: 5814f32fef13 ("media: staging: max96712: Add basic support for MAX96712 GMSL2 deserializer") Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Cc: stable@vger.kernel.org Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/staging/media/max96712/max96712.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 77ed2470ac09c2b0a33cf3f98cc51d18ba9ed976 Author: Jiasheng Jiang <jiashengjiangcool@gmail.com> Date: Mon Nov 25 19:18:17 2024 +0000 media: camif-core: Add check for clk_enable() Add check for the return value of clk_enable() to gurantee the success. Fixes: babde1c243b2 ("[media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface") Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/samsung/s3c-camif/camif-core.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 125ad1aeec77eb55273b420be6894b284a01e4b6 Author: Jiasheng Jiang <jiashengjiangcool@gmail.com> Date: Mon Nov 25 19:18:18 2024 +0000 media: mipi-csis: Add check for clk_enable() Add check for the return value of clk_enable() to gurantee the success. Fixes: b5f1220d587d ("[media] v4l: Add v4l2 subdev driver for S5P/EXYNOS4 MIPI-CSI receivers") Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/samsung/exynos4-is/mipi-csis.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 7b1ec3e38906224c2b201e3317d2b6c7fdbeff9b Author: Naushir Patuck <naush@raspberrypi.com> Date: Wed Nov 27 11:15:15 2024 +0000 media: bcm2835-unicam: Fix for possible dummy buffer overrun The Unicam hardware has been observed to cause a buffer overrun when using the dummy buffer as a circular buffer. The conditions that cause the overrun are not fully known, but it seems to occur when the memory bus is heavily loaded. To avoid the overrun, program the hardware with a buffer size of 0 when using the dummy buffer. This will cause overrun into the allocated dummy buffer, but avoid out of bounds writes. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/broadcom/bcm2835-unicam.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 697a252bb2ea414cc1c0b4cf4e3d94a879eaf162 Author: Naushir Patuck <naush@raspberrypi.com> Date: Wed Nov 27 11:15:14 2024 +0000 media: bcm2835-unicam: Disable trigger mode operation The imx219/imx708 sensors frequently generate a single corrupt frame (image or embedded data) when the sensor first starts. This can either be a missing line, or invalid samples within the line. This only occurrs using the upstream Unicam kernel driver. Disabling trigger mode elimiates this corruption. Since trigger mode is a legacy feature copied from the firmware driver and not expected to be needed, remove it. Tested on the Raspberry Pi cameras and shows no ill effects. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/broadcom/bcm2835-unicam.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit a4781bf807052e04c7f22f7f9c2ae7d18d4639eb Author: Naushir Patuck <naush@raspberrypi.com> Date: Wed Nov 27 11:15:13 2024 +0000 media: bcm2835-unicam: Allow setting of unpacked formats When matching formats via try_fmt/set_fmt ioctls, test for the unpacked formats as well as packed formats. This allows userland clients setup unpacking to 16-bits from the 10/12/14-packed CSI2 formats. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/broadcom/bcm2835-unicam.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f21ebe2c7defed9f9287778c0ff540be29fe2ce6 Author: Naushir Patuck <naush@raspberrypi.com> Date: Wed Nov 27 11:15:12 2024 +0000 media: bcm2835-unicam: Improve frame sequence count handling Ensure that the frame sequence counter is incremented only if a previous frame start interrupt has occurred, or a frame start + frame end has occurred simultaneously. This corresponds the sequence number with the actual number of frames produced by the sensor, not the number of frame buffers dequeued back to userland. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/broadcom/bcm2835-unicam.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit fb6ba073ff0778eabc5028149d436e76ba09ca52 Author: Hans de Goede <hdegoede@redhat.com> Date: Thu Nov 28 16:23:38 2024 +0100 media: ov2740: Add regulator support On some designs the regulators for the AVDD / DOVDD / DVDD power rails are controlled by Linux. Add support to the driver for getting regulators for these 3 rails and for enabling these regulators when necessary. The datasheet specifies a delay of 0ns between enabling the regulators, IOW they can all 3 be enabled at the same time. This allows using the bulk regulator API. The regulator core will provide dummy regulators for the 3 power-rails when necessary. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ricardo Ribalda <ribalda@chromium.org> Tested-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ov2740.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) commit fa3772f390c6aed371639c35383ceb4025597af1 Author: Hans de Goede <hdegoede@redhat.com> Date: Thu Nov 28 16:23:37 2024 +0100 media: ov2740: Add powerdown GPIO support The ov2740 sensor has both reset and power_down inputs according to the datasheet one or the other should always be tied to DOVDD but on some designs both are attached to GPIOs. Add support for controlling both a reset and a powerdown GPIO. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> Acked-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ov2740.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 17898af922834cf2673896715d9495b34ab70677 Author: Hans de Goede <hdegoede@redhat.com> Date: Thu Nov 28 16:23:36 2024 +0100 media: ov2740: Add camera orientation and sensor rotation controls Add camera orientation and sensor rotation controls using the v4l2_fwnode_device_parse() and v4l2_ctrl_new_fwnode_properties() helpers. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ov2740.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 47601552499d48a3c309545f857bd797baaf6aaf Author: Hans de Goede <hdegoede@redhat.com> Date: Thu Nov 28 16:23:35 2024 +0100 media: ov2740: Debug log chip ID Calling the identify function may get delayed till the first stream-on, add a dev_dbg() to it so that we know when it has run. This is useful to debug bring-up problems related to regulators / clks / GPIOs. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ov2740.c | 2 ++ 1 file changed, 2 insertions(+) commit 001d3753538d26ddcbef011f5643cfff58a7f672 Author: Sam Bobrowicz <sam@elite-embedded.com> Date: Fri Nov 22 09:28:01 2024 +0100 media: ov5640: fix get_light_freq on auto Light frequency was not properly returned when in auto mode and the detected frequency was 60Hz. Fixes: 19a81c1426c1 ("[media] add Omnivision OV5640 sensor driver") Cc: stable@vger.kernel.org Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ov5640.c | 1 + 1 file changed, 1 insertion(+) commit fb2bd86270cd0ad004f4c614ba4f8c63a5720e25 Author: Cosmin Tanislav <demonsingur@gmail.com> Date: Fri Nov 22 16:55:24 2024 +0200 media: mc: fix endpoint iteration When creating links from a subdev to a sink, the current logic tries to iterate over the endpoints of dev's fwnode. This might not be correct when the subdev uses a different fwnode compared to the dev's fwnode. If, when registering, the subdev's fwnode is not set, the code inside v4l2_async_register_subdev will set it to the dev's fwnode. To fix this, just use the subdev's fwnode. Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com> Fixes: 0d3c81e82da9 ("media: v4l2-mc: add v4l2_create_fwnode_links helpers") Cc: stable@vger.kernel.org Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/v4l2-core/v4l2-mc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cff7e9e5aee4bacf7d5cc193d612fb59b76c0d6e Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri Dec 6 10:26:51 2024 +0200 media: i2c: ds90ub960: Fix shadowing of local variables Fix a few cases where a local shadows a previously declared local of the same name. Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ds90ub960.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 0794c43ea1e451007e80246e1288ebbf44139397 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri Dec 6 10:26:50 2024 +0200 media: i2c: ds90ub953: Add error handling for i2c reads/writes Add error handling for i2c reads/writes in various places. Reported-by: Sakari Ailus <sakari.ailus@linux.intel.com> Closes: https://lore.kernel.org/all/Zv40EQSR__JDN_0M@kekkonen.localdomain/ Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ds90ub953.c | 46 ++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 14 deletions(-) commit acd8f58d7a3bce0fbd3263961cd09555c00464ba Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri Dec 6 10:26:49 2024 +0200 media: i2c: ds90ub913: Add error handling to ub913_hw_init() Add error handling to ub913_hw_init() using a new helper function, ub913_update_bits(). Reported-by: Sakari Ailus <sakari.ailus@linux.intel.com> Closes: https://lore.kernel.org/all/Zv40EQSR__JDN_0M@kekkonen.localdomain/ Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ds90ub913.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit 2b244ff3671fa7061d5d62e6f24cca863cec4db6 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri Dec 6 10:26:48 2024 +0200 media: i2c: ds90ub960: Handle errors in ub960_log_status_ub960_sp_eq() Add error handling for i2c read/write calls to ub960_log_status_ub960_sp_eq(). Reported-by: Sakari Ailus <sakari.ailus@linux.intel.com> Closes: https://lore.kernel.org/all/Zv40EQSR__JDN_0M@kekkonen.localdomain/ Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ds90ub960.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 4c9320bc1892e8c78d5dcb65a3d77e44251171b6 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri Dec 6 10:26:47 2024 +0200 media: i2c: ds90ub960: Reduce sleep in ub960_rxport_wait_locks() We currently sleep for 50 ms at the end of each iteration in ub960_rxport_wait_locks(). This feels a bit excessive, especially as we always do at least two loops, so there's always at least one sleep, even if we already have a stable lock. Change the sleep to 10 ms. Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ds90ub960.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 7fd049714569d02f124311e858b09f9e0308fa46 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri Dec 6 10:26:46 2024 +0200 media: i2c: ds90ub960: Drop unused indirect block define Drop the unused UB960_IND_TARGET_CSI_CSIPLL_REG_1 define. It does not even match to any block in the more recent documents, so it's possible it is not only unused but also wrong. Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ds90ub960.c | 1 - 1 file changed, 1 deletion(-) commit b0ab26fa4a081645ee289ba8fd3fd6b3efe84f49 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri Dec 6 10:26:45 2024 +0200 media: i2c: ds90ub953: Clear CRC errors in ub953_log_status() Clear the CRC error counter after showing it in ub953_log_status() to make its behavior match the other counter values. Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ds90ub953.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 0aac971d427c7929c7da42bb4388416cb6ad49a5 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri Dec 6 10:26:44 2024 +0200 media: i2c: ds90ub960: Add RGB24, RAW8 and RAW10 formats Add RGB24 and RAW8 and RAW10 bayer formats. RGB24 is mostly for TPG purposes, but RAW8 and RAW10 are widely used by sensors. Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ds90ub960.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit ab57d4b590a756a751e165dc63c743369b4103e1 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri Dec 6 10:26:43 2024 +0200 media: i2c: ds90ub960: Add support for I2C_RX_ID Normally the driver accesses both the RX and the TX port registers via a paging mechanism: one register is used to select the page (i.e. the port), which dictates the port used when accessing the port specific registers. The downside to this is that while debugging it's almost impossible to access the port specific registers from the userspace, as the driver can change the page at any moment. The hardware supports another access mechanism: using the I2C_RX_ID registers (one for each RX port), i2c addresses can be chosen which, when accessed, will always use the specific port's registers, skipping the paging mechanism. The support is only for the RX port, but it has proven very handy while debugging and testing. So let's add the code for this, but hide it behind a disabled define. Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ds90ub960.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit a56fac44beced4d525a690caa44cd8e995362dfb Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri Dec 6 10:26:42 2024 +0200 media: i2c: ds90ub960: Use HZ_PER_MHZ Use HZ_PER_MHZ instead of 1000000U. Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ds90ub960.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 5dbbd0609b83f6eb72c005e2e5979d0cd25243c8 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri Dec 6 10:26:41 2024 +0200 media: i2c: ds90ub960: Fix UB9702 VC map The driver uses a static CSI-2 virtual channel mapping where all virtual channels from an RX port are mapped to a virtual channel number matching the RX port number. The UB960 and UB9702 have different registers for the purpose, and the UB9702 version is not correct. Each of the VC_ID_MAP registers do not contain a single mapping, as the driver currently thinks, but two. This can cause received VCs other than 0 to be mapped in a wrong way. Fix this by writing both mappings to each register. Cc: stable@vger.kernel.org Fixes: afe267f2d368 ("media: i2c: add DS90UB960 driver") Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ds90ub960.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42d0ec194aa12e9b97f09a94fe565ba2e5f631a2 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri Dec 6 10:26:40 2024 +0200 media: i2c: ds90ub960: Fix logging SP & EQ status only for UB9702 UB9702 does not have SP and EQ registers, but the driver uses them in log_status(). Fix this by separating the SP and EQ related log_status() work into a separate function (for clarity) and calling that function only for UB960. Cc: stable@vger.kernel.org Fixes: afe267f2d368 ("media: i2c: add DS90UB960 driver") Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ds90ub960.c | 90 ++++++++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 40 deletions(-) commit 698cf6df87ffa83f259703e7443c15a4c5ceae86 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri Dec 6 10:26:39 2024 +0200 media: i2c: ds90ub960: Fix use of non-existing registers on UB9702 UB9702 doesn't have the registers for SP and EQ. Adjust the code in ub960_rxport_wait_locks() to not use those registers for UB9702. As these values are only used for a debug print here, there's no functional change. Cc: stable@vger.kernel.org Fixes: afe267f2d368 ("media: i2c: add DS90UB960 driver") Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ds90ub960.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit ba3bdb93947c90f098061de1fb2458e2ca040093 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri Dec 6 10:26:38 2024 +0200 media: i2c: ds90ub960: Fix UB9702 refclk register access UB9702 has the refclk freq register at a different offset than UB960, but the code uses the UB960's offset for both chips. Fix this. The refclk freq is only used for a debug print, so there's no functional change here. Cc: stable@vger.kernel.org Fixes: afe267f2d368 ("media: i2c: add DS90UB960 driver") Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ds90ub960.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 60b45ece41c5632a3a3274115a401cb244180646 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri Dec 6 10:26:37 2024 +0200 media: i2c: ds90ub9x3: Fix extra fwnode_handle_put() The ub913 and ub953 drivers call fwnode_handle_put(priv->sd.fwnode) as part of their remove process, and if the driver is removed multiple times, eventually leads to put "overflow", possibly causing memory corruption or crash. The fwnode_handle_put() is a leftover from commit 905f88ccebb1 ("media: i2c: ds90ub9x3: Fix sub-device matching"), which changed the code related to the sd.fwnode, but missed removing these fwnode_handle_put() calls. Cc: stable@vger.kernel.org Fixes: 905f88ccebb1 ("media: i2c: ds90ub9x3: Fix sub-device matching") Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ds90ub913.c | 1 - drivers/media/i2c/ds90ub953.c | 1 - 2 files changed, 2 deletions(-) commit f8d0343046655590723628cc0c240161995c135d Author: Mehdi Djait <mehdi.djait@linux.intel.com> Date: Thu Dec 12 14:40:04 2024 +0100 media: ccs: Fail the probe on CCS static data parser failure No need to continue probing when the CCS static data parser fails. Improve this by checking the return value and correctly exiting on failure. Signed-off-by: Mehdi Djait <mehdi.djait@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ccs/ccs-core.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit a29053906c9a73fe16cc0bc814f7a5fe6bdfd4f2 Author: Mehdi Djait <mehdi.djait@linux.intel.com> Date: Thu Dec 12 14:40:03 2024 +0100 media: ccs: Print a warning on CCS static data parser failure Besides returning an error, also print a warning when ccs_data_parse() fails. Signed-off-by: Mehdi Djait <mehdi.djait@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ccs/ccs-data.c | 1 + 1 file changed, 1 insertion(+) commit 733d41af75d1eb1af046ab47053cd86465e10436 Author: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> Date: Thu Dec 12 12:37:53 2024 +0100 media: intel/ipu6: move some boot messages to debug level When ipu6 driver is waiting for the ivsc driver to probe, which can fail or take long time, we can get plenty of ipu6 messages like this: [ 15.454049] intel-ipu6 0000:00:05.0: IPU6 in non-secure mode touch 0x0 mask 0xff [ 15.456600] intel-ipu6 0000:00:05.0: FW version: 20230925 [ 15.458292] intel-ipu6 0000:00:05.0: IPU6 in non-secure mode touch 0x0 mask 0xff [ 15.461186] intel-ipu6 0000:00:05.0: FW version: 20230925 [ 15.463616] intel-ipu6 0000:00:05.0: IPU6 in non-secure mode touch 0x0 mask 0xff [ 15.466490] intel-ipu6 0000:00:05.0: FW version: 20230925 Print them only when debugging is enabled to do not flood dmesg. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/pci/intel/ipu6/ipu6-buttress.c | 8 ++++---- drivers/media/pci/intel/ipu6/ipu6-cpd.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit f6470be571362bd0ea19a597226933b61fa6e313 Author: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Date: Tue Dec 10 16:54:00 2024 +0100 media: rcar-csi2: Update D-PHY startup on V4M The latest datasheet (Rev.0.70) updates the D-PHY start-up sequence for D-PHY operation. Unfortunately the datasheet do not add any additional documentation on the magic values. This have been tested together with the MAX96724 available on the single board test platform and it works as expected. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/renesas/rcar-csi2.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit feaf4154d69657af2bf96e6e66cca794f88b1a61 Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Mon Dec 9 14:55:45 2024 +0000 media: i2c: ov9282: Correct the exposure offset The datasheet lists that "Maximum exposure time is frame length -25 row periods, where frame length is set by registers {0x380E, 0x380F}". However this driver had OV9282_EXPOSURE_OFFSET set to 12 which allowed that restriction to be violated, and would result in very under-exposed images. Correct the offset. Fixes: 14ea315bbeb7 ("media: i2c: Add ov9282 camera sensor driver") Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ov9282.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit facb541ff0805314e0b56e508f7d3cbd07af513c Author: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> Date: Wed Dec 11 12:49:05 2024 +0100 media: intel/ipu6: remove cpu latency qos request on error Fix cpu latency qos list corruption like below. It happens when we do not remove cpu latency request on error path and free corresponding memory. [ 30.634378] l7 kernel: list_add corruption. prev->next should be next (ffffffff9645e960), but was 0000000100100001. (prev=ffff8e9e877e20a8). [ 30.634388] l7 kernel: WARNING: CPU: 2 PID: 2008 at lib/list_debug.c:32 __list_add_valid_or_report+0x83/0xa0 <snip> [ 30.634640] l7 kernel: Call Trace: [ 30.634650] l7 kernel: <TASK> [ 30.634659] l7 kernel: ? __list_add_valid_or_report+0x83/0xa0 [ 30.634669] l7 kernel: ? __warn.cold+0x93/0xf6 [ 30.634678] l7 kernel: ? __list_add_valid_or_report+0x83/0xa0 [ 30.634690] l7 kernel: ? report_bug+0xff/0x140 [ 30.634702] l7 kernel: ? handle_bug+0x58/0x90 [ 30.634712] l7 kernel: ? exc_invalid_op+0x17/0x70 [ 30.634723] l7 kernel: ? asm_exc_invalid_op+0x1a/0x20 [ 30.634733] l7 kernel: ? __list_add_valid_or_report+0x83/0xa0 [ 30.634742] l7 kernel: plist_add+0xdd/0x140 [ 30.634754] l7 kernel: pm_qos_update_target+0xa0/0x1f0 [ 30.634764] l7 kernel: cpu_latency_qos_update_request+0x61/0xc0 [ 30.634773] l7 kernel: intel_dp_aux_xfer+0x4c7/0x6e0 [i915 1f824655ed04687c2b0d23dbce759fa785f6d033] Reported-by: Genes Lists <lists@sapience.com> Closes: https://lore.kernel.org/linux-media/c0e94be466b367f1a3cfdc3cb7b1a4f47e5953ae.camel@sapience.com/ Fixes: f50c4ca0a820 ("media: intel/ipu6: add the main input system driver") Cc: stable@vger.kernel.org Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/pci/intel/ipu6/ipu6-isys.c | 1 + 1 file changed, 1 insertion(+) commit 6fdbff0f54786e94f0f630ff200ec1d666b1633e Author: Mehdi Djait <mehdi.djait@linux.intel.com> Date: Wed Dec 11 14:30:45 2024 +0100 media: ccs: Fix cleanup order in ccs_probe() ccs_limits is allocated in ccs_read_all_limits() after the allocation of mdata.backing. Ensure that resources are freed in the reverse order of their allocation by moving out_free_ccs_limits up. Fixes: a11d3d6891f0 ("media: ccs: Read CCS static data from firmware binaries") Cc: stable@vger.kernel.org Signed-off-by: Mehdi Djait <mehdi.djait@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ccs/ccs-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b06ec03b7464fdf235487cb68ce0902df8c34aa6 Author: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Date: Thu Nov 21 14:41:08 2024 +0100 media: rcar-csi2: Allow specifying C-PHY line order Later versions of the V4H datasheet adds documentation for the line order register needed to support all possible configurations. Extend the driver to take the line order for each data line into account when configuring the device. Unfortunately not all registers initially thought to be involved in line order configuration where directly related. One magic value is still in the driver and left as-is, but it is not related to line order as that procedure have now been documented. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/renesas/rcar-csi2.c | 74 +++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 7 deletions(-) commit 573b4adddbd22baf14c5022b8e4b1dd93bac22ee Author: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Date: Thu Nov 21 14:41:06 2024 +0100 media: v4l: fwnode: Parse MiPI DisCo for C-PHY line-orders Extend the fwnode parsing to validate and fill in the CSI-2 C-PHY line-orders order properties as defined in MIPI Discovery and Configuration (DisCo) Specification for Imaging. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> [Sakari Ailus: Use ARRAY_SIZE() instead of an integer.] Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/v4l2-core/v4l2-fwnode.c | 43 ++++++++++++++++++++++++++++++++++- include/media/v4l2-mediabus.h | 21 +++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) commit 91a7088096a49eb413ca11a9d80bc8ba60695c18 Author: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Date: Thu Nov 21 14:41:05 2024 +0100 media: dt-bindings: Add property to describe CSI-2 C-PHY line orders Each data lane on a CSI-2 C-PHY bus uses three phase encoding and is constructed from three physical wires. The wires are referred to as A, B and C and their default order is ABC. However to ease hardware design the specification allows for the wires to be switched in any order. Add a vendor neutral property to describe the line order used. The property name 'line-orders', the possible values it can be assigned and there names are taken from the MIPI Discovery and Configuration (DisCo) Specification for Imaging. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> .../devicetree/bindings/media/video-interfaces.yaml | 21 +++++++++++++++++++++ include/dt-bindings/media/video-interfaces.h | 7 +++++++ 2 files changed, 28 insertions(+) commit 57d10bcac67707caaa542e09dee86e13ea85defc Author: Naushir Patuck <naush@raspberrypi.com> Date: Fri Nov 15 20:07:17 2024 +0200 media: imx296: Add standby delay during probe Add a 2-5ms delay when coming out of standby and before reading the sensor info register durning probe, as instructed by the datasheet. This standby delay is already present when the sensor starts streaming. During a cold-boot, reading the IMX296_SENSOR_INFO register would often return a value of 0x0000, if this delay is not present before. Fixes: cb33db2b6ccf ("media: i2c: IMX296 camera sensor driver") Cc: stable@vger.kernel.org Tested-by: Alexandru Ardelean <aardelean@baylibre.com> Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/imx296.c | 2 ++ 1 file changed, 2 insertions(+) commit 33f4a7fba7229232e294f4794503283e44cd03f2 Author: Luca Weiss <luca.weiss@fairphone.com> Date: Mon Nov 18 22:45:46 2024 +0100 media: i2c: imx412: Add missing newline to prints Add trailing \n to dev_dbg and dev_err prints where missing. Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> Fixes: 9214e86c0cc1 ("media: i2c: Add imx412 camera sensor driver") Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/imx412.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit c699b6c7c857baba1375a1ed090bf71f695e2971 Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Wed Nov 20 19:17:06 2024 +0000 media: i2c: imx290: Add configuration for IMX462 IMX462 is the successor to IMX290, and wants very minor changes to the register setup. Add the relevant configuration to support it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/imx290.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit e4faac99d5bb4b6c80f2495c40fcd71a67c40b27 Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Wed Nov 20 19:17:05 2024 +0000 media: dt-bindings: sony,imx290: Add IMX462 to the IMX290 binding IMX462 is the successor to IMX290, which is supportable by the existing IMX290 driver via a new compatible string. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml | 2 ++ 1 file changed, 2 insertions(+) commit f2055c1d62d6dfd25a31d1d1923883f21305aea5 Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Wed Nov 20 19:17:04 2024 +0000 media: i2c: imx290: Register 0x3011 varies between imx327 and imx290 Reviewing the datasheets, register 0x3011 is meant to be 0x02 on imx327 and 0x00 on imx290. Move it out of the common registers, and set it appropriately in the sensor specific sections. (Included for imx290 to be explicit, rather than relying on the default value). Fixes: 2d41947ec2c0 ("media: i2c: imx290: Add support for imx327 variant") Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/imx290.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ec75fd952b0b5cdab7b606cdacba237c57c1fdda Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Wed Nov 20 19:17:03 2024 +0000 media: i2c: imx290: Limit analogue gain according to module The imx327 only supports up to 29.4dB of analogue gain, vs the imx290 going up to 30dB. Both are in 0.3dB steps. As we now have model specific config, fix this mismatch, and delete the comment referencing it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/imx290.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit da73efa8e675a2b58f1c7ae61201acfe57714bf7 Author: Sakari Ailus <sakari.ailus@linux.intel.com> Date: Tue Dec 3 12:23:01 2024 +0200 media: ccs: Clean up parsed CCS static data on parse failure ccs_data_parse() releases the allocated in-memory data structure when the parser fails, but it does not clean up parsed metadata that is there to help access the actual data. Do that, in order to return the data structure in a sane state. Fixes: a6b396f410b1 ("media: ccs: Add CCS static data parser library") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ccs/ccs-data.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 82b696750f0b60e7513082a10ad42786854f59f8 Author: Sakari Ailus <sakari.ailus@linux.intel.com> Date: Tue Dec 3 10:10:23 2024 +0200 media: ccs: Fix CCS static data parsing for large block sizes The length field of the CCS static data blocks was mishandled, leading to wrong interpretation of the length header for blocks that are 16 kiB in size. Such large blocks are very, very rare and so this wasn't found earlier. As the length is used as part of input validation, the issue has no security implications. Fixes: a6b396f410b1 ("media: ccs: Add CCS static data parser library") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/i2c/ccs/ccs-data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11f68d2ba2e1521a608af773bf788e8cfa260f68 Author: Jiasheng Jiang <jiashengjiangcool@gmail.com> Date: Tue Dec 3 21:29:02 2024 +0000 media: marvell: Add check for clk_enable() Add check for the return value of clk_enable() to guarantee the success. Fixes: 81a409bfd551 ("media: marvell-ccic: provide a clock for the sensor") Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com> [Sakari Ailus: Fix spelling in commit message.] Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/marvell/mcam-core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 688c0a6907a7c6e6776f314195c10536f249b37f Author: Sakari Ailus <sakari.ailus@linux.intel.com> Date: Mon Dec 16 14:27:17 2024 +0200 media: Documentation: ipu3: Remove unused and obsolete references Remove unused reference #f5 and obsolete reference f3. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Documentation/admin-guide/media/ipu3.rst | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 50e7592cb696b3767d2186b0d51bb37a2fddbb67 Author: Hsin-Te Yuan <yuanhsinte@chromium.org> Date: Fri Dec 13 09:29:22 2024 +0000 arm64: dts: mediatek: mt8188: Add GPU speed bin NVMEM cells On the MT8188, the chip is binned for different GPU voltages at the highest OPPs. The binning value is stored in the efuse. Add the NVMEM cell, and tie it to the GPU. Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org> Link: https://lore.kernel.org/r/20241213-speedbin-v1-1-a0053ead9477@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8188.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 9594935260d76bffe200bea6cfab6ba0752e70d9 Author: Hsin-Te Yuan <yuanhsinte@chromium.org> Date: Fri Dec 13 05:27:48 2024 +0000 arm64: dts: mediatek: mt8183: willow: Support second source touchscreen Some willow devices use second source touchscreen. Fixes: f006bcf1c972 ("arm64: dts: mt8183: Add kukui-jacuzzi-willow board") Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org> Link: https://lore.kernel.org/r/20241213-touchscreen-v3-2-7c1f670913f9@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> .../boot/dts/mediatek/mt8183-kukui-jacuzzi-willow.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 5ec5dc73c5ac0c6e06803dc3b5aea4493e856568 Author: Hsin-Te Yuan <yuanhsinte@chromium.org> Date: Fri Dec 13 05:27:47 2024 +0000 arm64: dts: mediatek: mt8183: kenzo: Support second source touchscreen Some kenzo devices use second source touchscreen. Fixes: 0a9cefe21aec ("arm64: dts: mt8183: Add kukui-jacuzzi-kenzo board") Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org> Link: https://lore.kernel.org/r/20241213-touchscreen-v3-1-7c1f670913f9@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> .../boot/dts/mediatek/mt8183-kukui-jacuzzi-kenzo.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 207a792d01603faae08d9bd82846bd99c42c30cc Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Date: Wed Dec 18 13:44:44 2024 -0800 thermal: intel: Fix compile issue when CONFIG_NET is not defined If CONFIG_NET is not defined then THERMAL_NETLINK can't be selected. Hence add dependency on CONFIG_NET. Othewise it will generate compile errors while compiling thermal_netlink.c. Fixes: 4596cbea0ed2 ("thermal: intel: Remove explicit user_space governor selection") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://patch.msgid.link/20241218214444.1904650-1-srinivas.pandruvada@linux.intel.com [ rjw: Merge the "depends on" lines ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/thermal/intel/Kconfig | 2 +- drivers/thermal/intel/int340x_thermal/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b69386fcbc6066fb4885667743ab4d4967d561b8 Author: Jon Lin <jon.lin@rock-chips.com> Date: Thu Dec 19 09:05:57 2024 +0800 spi: rockchip-sfc: Using normal memory for dma Nornal memory CPU copy with cache invalidate is more efficient than uncache memory copy. Signed-off-by: Jon Lin <jon.lin@rock-chips.com> Link: https://patch.msgid.link/20241219010557.333327-1-jon.lin@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-rockchip-sfc.c | 47 ++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 22 deletions(-) commit ec4696925da6b9baec38345184403ce9e29a2e48 Author: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com> Date: Mon Dec 9 13:20:39 2024 -0500 efi/libstub: Bump up EFI_MMAP_NR_SLACK_SLOTS to 32 Recent platforms require more slack slots than the current value of EFI_MMAP_NR_SLACK_SLOTS, otherwise they fail to boot. The current workaround is to append `efi=disable_early_pci_dma` to the kernel's cmdline. So, bump up EFI_MMAP_NR_SLACK_SLOTS to 32 to allow those platforms to boot with the aforementioned workaround. Signed-off-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Allen Pais <apais@linux.microsoft.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> drivers/firmware/efi/libstub/efistub.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e93f594285faef57651a0c89f61a7d976db7def Author: Andy Yan <andy.yan@rock-chips.com> Date: Mon Dec 16 18:10:03 2024 +0800 drm/bridge: synopsys: Fix Copyright Writing Style of dw-hdmi-qp The standard writing style should be: Co., Ltd. This fix the mail server warning: DBL_SPAM(6.50)[co.ltd:url]; Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241216101015.3726517-1-andyshrk@163.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241216101015.3726517-1-andyshrk@163.com drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2b8c6d5495706eee2347483ea89b5c13f256ff2 Author: Andrej Picej <andrej.picej@norik.com> Date: Mon Dec 16 09:54:09 2024 +0100 drm/bridge: ti-sn65dsi83: Add ti,lvds-vod-swing optional properties Add a optional properties to change LVDS output voltage. This should not be static as this depends mainly on the connected display voltage requirement. We have three properties: - "ti,lvds-termination-ohms", which sets near end termination, - "ti,lvds-vod-swing-data-microvolt" and - "ti,lvds-vod-swing-clock-microvolt" which both set LVDS differential output voltage for data and clock lanes. They are defined as an array with min and max values. The appropriate bitfield will be set if selected constraints can be met. If "ti,lvds-termination-ohms" is not defined the default of 200 Ohm near end termination will be used. Selecting only one: "ti,lvds-vod-swing-data-microvolt" or "ti,lvds-vod-swing-clock-microvolt" can be done, but the output voltage constraint for only data/clock lanes will be met. Setting both is recommended. Signed-off-by: Andrej Picej <andrej.picej@norik.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241216085410.1968634-3-andrej.picej@norik.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241216085410.1968634-3-andrej.picej@norik.com drivers/gpu/drm/bridge/ti-sn65dsi83.c | 145 +++++++++++++++++++++++++++++++++- 1 file changed, 142 insertions(+), 3 deletions(-) commit 63f4e7dfef8c1162e22cd25c9a23b125ba40dfc4 Author: Andrej Picej <andrej.picej@norik.com> Date: Mon Dec 16 09:54:08 2024 +0100 dt-bindings: drm/bridge: ti-sn65dsi83: Add properties for ti,lvds-vod-swing Add properties which can be used to specify LVDS differential output voltage. Since this also depends on near-end signal termination also include property which sets this. LVDS differential output voltage is specified with an array (min, max), which should match the one from connected device. Signed-off-by: Andrej Picej <andrej.picej@norik.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241216085410.1968634-2-andrej.picej@norik.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241216085410.1968634-2-andrej.picej@norik.com .../bindings/display/bridge/ti,sn65dsi83.yaml | 34 ++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) commit 63b81a3a770f6c66a5c4c6b023ca5ad4feacba79 Author: Sk Anirban <sk.anirban@intel.com> Date: Fri Nov 29 21:17:16 2024 +0530 drm/i915/selftests: Implement frequency logging for energy reading validation Add RC6 & RC0 frequency printing to ensure accurate energy readings aimed at addressing GPU energy leaks and power measurement failures. Also update sleep time for RC6 mode to match RC0. v2: - Improved commit message. v3: - Used pr_err log to display frequency (Anshuman) - Sorted headers alphabetically (Sai Teja) v4: - Improved commit message. - Fix pr_err log (Sai Teja) v5: - Add error & debug logging for RC0 power and frequency checks (Anshuman) v6: - Modify debug logging for RC0 power and frequency checks (Sai Teja) v7: - Use pr_debug if RC0 power isn't measured but frequency is (Anshuman) - Improved commit message (Badal) - Change API to read actual frequency without applying forcewake (Badal) - Update sleep time for RC6 mode (Anshuman) Signed-off-by: Sk Anirban <sk.anirban@intel.com> Reviewed-by: Sai Teja Pottumuttu <sai.teja.pottumuttu@intel.com> Reviewed-by: Badal Nilawar <badal.nilawar@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241129154716.2764974-1-sk.anirban@intel.com drivers/gpu/drm/i915/gt/selftest_rc6.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit eda86a41a1c7700757c9217f74b9d57431c3e5f4 Author: Shrikanth Hegde <sshegde@linux.ibm.com> Date: Sun Nov 17 00:53:06 2024 +0530 powerpc: Large user copy aware of full:rt:lazy preemption Large user copy_to/from (more than 16 bytes) uses vmx instructions to speed things up. Once the copy is done, it makes sense to try schedule as soon as possible for preemptible kernels. So do this for preempt=full/lazy and rt kernel. Not checking for lazy bit here, since it could lead to unnecessary context switches. Suggested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241116192306.88217-3-sshegde@linux.ibm.com arch/powerpc/lib/vmx-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00199ed6f2ca6601b2c5856fac64132303d9437a Author: Shrikanth Hegde <sshegde@linux.ibm.com> Date: Sun Nov 17 00:53:05 2024 +0530 powerpc: Add preempt lazy support Define preempt lazy bit for Powerpc. Use bit 9 which is free and within 16 bit range of NEED_RESCHED, so compiler can issue single andi. Since Powerpc doesn't use the generic entry/exit, add lazy check at exit to user. CONFIG_PREEMPTION is defined for lazy/full/rt so use it for return to kernel. Ran a few benchmarks and db workload on Power10. Performance is close to preempt=none/voluntary. Since Powerpc systems can have large core count and large memory, preempt lazy is going to be helpful in avoiding soft lockup issues. Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Ankur Arora <ankur.a.arora@oracle.com> Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241116192306.88217-2-sshegde@linux.ibm.com arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/thread_info.h | 9 ++++++--- arch/powerpc/kernel/interrupt.c | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) commit 64546cf46e370c89cc4b0434b00ba05cdef02d86 Author: Mika Kahola <mika.kahola@intel.com> Date: Tue Dec 17 16:34:40 2024 +0200 drm/i915/display: UHBR rates for Thunderbolt tbt-alt mode is missing uhbr rates 10G and 20G. This requires requires pll clock rates 312.5 MHz and 625 MHz to be added, respectively. The uhbr rates are supported only form PTL+ platforms. v2: Add drm_WARN_ON() to check if port clock is not supported by the platform (Imre) Combine forward ungate with mask parameter (Imre) Rename XE3LPDP_* to XE3D_* (Imre) Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217143440.572308-1-mika.kahola@intel.com drivers/gpu/drm/i915/display/intel_cx0_phy.c | 39 ++++++++++++++++++++--- drivers/gpu/drm/i915/display/intel_cx0_phy_regs.h | 4 +++ 2 files changed, 39 insertions(+), 4 deletions(-) commit 3ec5c15793051c9fe102ed0674c7925a56205385 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Wed Oct 23 14:52:43 2024 +0300 drm: xlnx: zynqmp_dpsub: Add DP audio support Add basic DisplayPort audio support. Support non-live audio playback from two PCMs (DMA channels), and the volume control in the audio mixer. As older dtb files may not have the audio DMA channels defined, the driver will just mark the audio support as disabled if the audio DMA is missing, and will continue with only display support. Note: Reset doesn't seem to work (ZYNQMP_DISP_AUD_SOFT_RESET). If we do a reset, audio playback won't start again even if, afaics, we do set up all the necessary registers. So, at the moment, resetting the audio block in dp_dai_hw_free() is commented out. Tested-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com> Reviewed-by: Vishal Sagar <vishal.sagar@amd.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241023-xilinx-dp-audio-v4-3-5128881457be@ideasonboard.com drivers/gpu/drm/xlnx/Kconfig | 9 + drivers/gpu/drm/xlnx/Makefile | 1 + drivers/gpu/drm/xlnx/zynqmp_disp.c | 48 ---- drivers/gpu/drm/xlnx/zynqmp_disp_regs.h | 7 +- drivers/gpu/drm/xlnx/zynqmp_dp.c | 54 ++-- drivers/gpu/drm/xlnx/zynqmp_dp.h | 7 + drivers/gpu/drm/xlnx/zynqmp_dp_audio.c | 447 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 39 +-- drivers/gpu/drm/xlnx/zynqmp_dpsub.h | 15 +- 9 files changed, 526 insertions(+), 101 deletions(-) commit 0e0ab2462fd3a4c44f03617a9e107ef8c754e05e Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Wed Oct 23 14:52:42 2024 +0300 arm64: dts: zynqmp: Add DMA for DP audio Add the two DMA channels used for the DisplayPort audio to the zynqmp_dpsub node. Acked-by: Michal Simek <michal.simek@amd.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241023-xilinx-dp-audio-v4-2-5128881457be@ideasonboard.com arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 9367ab5d7ff75230534ee1d8d7e5a8365c36b014 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Wed Oct 23 14:52:41 2024 +0300 dt-bindings: display/xlnx/zynqmp-dpsub: Add audio DMAs The DP subsystem for ZynqMP supports audio via two channels, and the DP DMA has dma-engines for those channels. For some reason the DT binding has not specified those channels, even if the picture included in xlnx,zynqmp-dpsub.yaml shows "2 x aud" DMAs. This hasn't caused any issues as the drivers have not supported audio, and has thus gone unnoticed. To make it possible to add the audio support to the driver, add the two audio DMAs to the binding. While strictly speaking this is an ABI break, there should be no regressions caused by this as we're adding new entries at the end of the dmas list, and, after the audio support has been added in "arm64: dts: zynqmp: Add DMA for DP audio", the driver will treat the audio DMAs as optional to also support the old bindings. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241023-xilinx-dp-audio-v4-1-5128881457be@ideasonboard.com .../devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 4fefbc66dfb356145633e571475be2459d73ce16 Merge: 44d49629bfd2 db48fe905d8a Author: Jakub Kicinski <kuba@kernel.org> Date: Wed Dec 18 19:32:07 2024 -0800 Merge branch 'mdio-support-updates' Nikita Yushchenko says: ==================== rswitch: mdio support updates This series cleans up rswitch mdio support, and adds C22 operations. ==================== Link: https://patch.msgid.link/20241216071957.2587354-1-nikita.yoush@cogentembedded.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit db48fe905d8ae90d0c35238ddd90e816d543316c Author: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Date: Mon Dec 16 12:19:57 2024 +0500 net: renesas: rswitch: add mdio C22 support The generic MPSM operation added by the previous patch can be used both for C45 and C22. Add handlers for C22 operations. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://patch.msgid.link/20241216071957.2587354-6-nikita.yoush@cogentembedded.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/renesas/rswitch.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 2aa722b6d81c3118d33dcb8eea9aac49f56af790 Author: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Date: Mon Dec 16 12:19:56 2024 +0500 net: renesas: rswitch: use generic MPSM operation for mdio C45 Introduce rswitch_etha_mpsm_op() that accepts values for MPSM register fields and executes the transaction. This avoids some code duptication, and can be used both for C45 and C22. Convert C45 read and write operations to use that. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://patch.msgid.link/20241216071957.2587354-5-nikita.yoush@cogentembedded.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/renesas/rswitch.c | 51 +++++++++++++++++++--------------- drivers/net/ethernet/renesas/rswitch.h | 17 ++++++++---- 2 files changed, 40 insertions(+), 28 deletions(-) commit 1ced1b8cacf396d6ff979f594ba40ace42087797 Author: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Date: Mon Dec 16 12:19:55 2024 +0500 net: renesas: rswitch: align mdio C45 operations with datasheet Per rswitch datasheet, software can know that mdio operation completed either by polling MPSM.PSME bit, or via interrupt. Instead, the driver currently polls for interrupt status bit. Although this still provides correct result, it requires additional register operations to clean the interrupt status bits, and generally looks wrong. Fix it to poll MPSM.PSME bit, as the datasheet suggests. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://patch.msgid.link/20241216071957.2587354-4-nikita.yoush@cogentembedded.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/renesas/rswitch.c | 12 +++--------- drivers/net/ethernet/renesas/rswitch.h | 6 ------ 2 files changed, 3 insertions(+), 15 deletions(-) commit da75ba93e3383fc10af71e5029b5a57378a57576 Author: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Date: Mon Dec 16 12:19:54 2024 +0500 net: renesas: rswitch: use FIELD_PREP for remaining MPIC register fields Commit fb9e6039c325 ("net: renesas: rswitch: fix initial MPIC register setting") converted setting some MPIC fields to FIELD_PREP. To keep common style, do the same with mii bus related fields of the same register. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://patch.msgid.link/20241216071957.2587354-3-nikita.yoush@cogentembedded.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/renesas/rswitch.c | 5 +++-- drivers/net/ethernet/renesas/rswitch.h | 10 ++-------- 2 files changed, 5 insertions(+), 10 deletions(-) commit 206112fa65790221ca3ebbc43092911bb8836a19 Author: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Date: Mon Dec 16 12:19:53 2024 +0500 net: renesas: rswitch: do not write to MPSM register at init time MPSM register is used to execute mdio bus transactions. There is no need to initialize it early. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://patch.msgid.link/20241216071957.2587354-2-nikita.yoush@cogentembedded.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/renesas/rswitch.c | 1 - 1 file changed, 1 deletion(-) commit 44d49629bfd2862653b167c64adb018be3a6dfd9 Merge: a126061c80d5 bc1027473986 Author: Jakub Kicinski <kuba@kernel.org> Date: Wed Dec 18 19:17:08 2024 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== ice: add support for devlink health events Przemek Kitszel says: Reports for two kinds of events are implemented, Malicious Driver Detection (MDD) and Tx hang. Patches 1, 2, 3: core improvements (checkpatch.pl, devlink extension) Patch 4: rename current ice devlink/ files Patches 5, 6, 7: ice devlink health infra + reporters Mateusz did good job caring for this series, and hardening the code. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: Add MDD logging via devlink health ice: add Tx hang devlink health reporter ice: rename devlink_port.[ch] to port.[ch] devlink: add devlink_fmsg_dump_skb() function devlink: add devlink_fmsg_put() macro checkpatch: don't complain on _Generic() use ==================== Link: https://patch.msgid.link/20241217210835.3702003-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 38e961097e04e7adfe1d3335e3371e97c1723064 Merge: 301e2772295e 78d4f34e2115 Author: Dave Airlie <airlied@redhat.com> Date: Thu Dec 19 11:59:43 2024 +1000 Merge tag 'v6.13-rc3' into drm-next Backmerge linux 6.13-rc3 as amd next has some dependencies on fixes in it. Signed-off-by: Dave Airlie <airlied@redhat.com> commit a126061c80d5efb4baef4bcf346094139cd81df6 Author: Eric Dumazet <edumazet@google.com> Date: Tue Dec 17 13:51:21 2024 +0000 ptr_ring: do not block hard interrupts in ptr_ring_resize_multiple() Jakub added a lockdep_assert_no_hardirq() check in __page_pool_put_page() to increase test coverage. syzbot found a splat caused by hard irq blocking in ptr_ring_resize_multiple() [1] As current users of ptr_ring_resize_multiple() do not require hard irqs being masked, replace it to only block BH. Rename helpers to better reflect they are safe against BH only. - ptr_ring_resize_multiple() to ptr_ring_resize_multiple_bh() - skb_array_resize_multiple() to skb_array_resize_multiple_bh() [1] WARNING: CPU: 1 PID: 9150 at net/core/page_pool.c:709 __page_pool_put_page net/core/page_pool.c:709 [inline] WARNING: CPU: 1 PID: 9150 at net/core/page_pool.c:709 page_pool_put_unrefed_netmem+0x157/0xa40 net/core/page_pool.c:780 Modules linked in: CPU: 1 UID: 0 PID: 9150 Comm: syz.1.1052 Not tainted 6.11.0-rc3-syzkaller-00202-gf8669d7b5f5d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 RIP: 0010:__page_pool_put_page net/core/page_pool.c:709 [inline] RIP: 0010:page_pool_put_unrefed_netmem+0x157/0xa40 net/core/page_pool.c:780 Code: 74 0e e8 7c aa fb f7 eb 43 e8 75 aa fb f7 eb 3c 65 8b 1d 38 a8 6a 76 31 ff 89 de e8 a3 ae fb f7 85 db 74 0b e8 5a aa fb f7 90 <0f> 0b 90 eb 1d 65 8b 1d 15 a8 6a 76 31 ff 89 de e8 84 ae fb f7 85 RSP: 0018:ffffc9000bda6b58 EFLAGS: 00010083 RAX: ffffffff8997e523 RBX: 0000000000000000 RCX: 0000000000040000 RDX: ffffc9000fbd0000 RSI: 0000000000001842 RDI: 0000000000001843 RBP: 0000000000000000 R08: ffffffff8997df2c R09: 1ffffd40003a000d R10: dffffc0000000000 R11: fffff940003a000e R12: ffffea0001d00040 R13: ffff88802e8a4000 R14: dffffc0000000000 R15: 00000000ffffffff FS: 00007fb7aaf716c0(0000) GS:ffff8880b9300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa15a0d4b72 CR3: 00000000561b0000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> tun_ptr_free drivers/net/tun.c:617 [inline] __ptr_ring_swap_queue include/linux/ptr_ring.h:571 [inline] ptr_ring_resize_multiple_noprof include/linux/ptr_ring.h:643 [inline] tun_queue_resize drivers/net/tun.c:3694 [inline] tun_device_event+0xaaf/0x1080 drivers/net/tun.c:3714 notifier_call_chain+0x19f/0x3e0 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2032 [inline] call_netdevice_notifiers net/core/dev.c:2046 [inline] dev_change_tx_queue_len+0x158/0x2a0 net/core/dev.c:9024 do_setlink+0xff6/0x41f0 net/core/rtnetlink.c:2923 rtnl_setlink+0x40d/0x5a0 net/core/rtnetlink.c:3201 rtnetlink_rcv_msg+0x73f/0xcf0 net/core/rtnetlink.c:6647 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550 Fixes: ff4e538c8c3e ("page_pool: add a lockdep check for recycling in hardirq") Reported-by: syzbot+f56a5c5eac2b28439810@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/671e10df.050a0220.2b8c0f.01cf.GAE@google.com/T/ Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Link: https://patch.msgid.link/20241217135121.326370-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/tap.c | 6 +++--- drivers/net/tun.c | 6 +++--- include/linux/ptr_ring.h | 21 ++++++++++----------- include/linux/skb_array.h | 17 +++++++++-------- net/sched/sch_generic.c | 4 ++-- 5 files changed, 27 insertions(+), 27 deletions(-) commit 65c233d8e329c152e88fe796155702fd21028883 Author: shunlizhou <shunlizhou@aliyun.com> Date: Mon Dec 16 13:54:46 2024 +0000 docs: net: bonding: fix typos The bonding documentation had several "insure" which is not properly used in the context. Suggest to change to "ensure" to improve readability. Signed-off-by: shunlizhou <shunlizhou@aliyun.com> Link: https://patch.msgid.link/20241216135447.57681-1-shunlizhou@aliyun.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Documentation/networking/bonding.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 95b3cdafd7cb74414070893445a9b731793f7b55 Author: Mimi Zohar <zohar@linux.ibm.com> Date: Thu Dec 12 18:42:23 2024 +0100 ima: instantiate the bprm_creds_for_exec() hook Like direct file execution (e.g. ./script.sh), indirect file execution (e.g. sh script.sh) needs to be measured and appraised. Instantiate the new security_bprm_creds_for_exec() hook to measure and verify the indirect file's integrity. Unlike direct file execution, indirect file execution is optionally enforced by the interpreter. Differentiate kernel and userspace enforced integrity audit messages. Co-developed-by: Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com> Tested-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Mickaël Salaün <mic@digikod.net> Signed-off-by: Mickaël Salaün <mic@digikod.net> Link: https://lore.kernel.org/r/20241212174223.389435-9-mic@digikod.net Signed-off-by: Kees Cook <kees@kernel.org> include/uapi/linux/audit.h | 1 + security/integrity/ima/ima_appraise.c | 27 +++++++++++++++++++++++++-- security/integrity/ima/ima_main.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) commit 2a69962be4a7e97ab347e05826480a3352c6fbc8 Author: Mickaël Salaün <mic@digikod.net> Date: Thu Dec 12 18:42:22 2024 +0100 samples/check-exec: Add an enlighten "inc" interpreter and 28 tests Add a very simple script interpreter called "inc" that can evaluate two different commands (one per line): - "?" to initialize a counter from user's input; - "+" to increment the counter (which is set to 0 by default). It is enlighten to only interpret executable files according to AT_EXECVE_CHECK and the related securebits: # Executing a script with RESTRICT_FILE is only allowed if the script # is executable: ./set-exec -f -- ./inc script-exec.inc # Allowed ./set-exec -f -- ./inc script-noexec.inc # Denied # Executing stdin with DENY_INTERACTIVE is only allowed if stdin is an # executable regular file: ./set-exec -i -- ./inc -i < script-exec.inc # Allowed ./set-exec -i -- ./inc -i < script-noexec.inc # Denied # However, a pipe is not executable and it is then denied: cat script-noexec.inc | ./set-exec -i -- ./inc -i # Denied # Executing raw data (e.g. command argument) with DENY_INTERACTIVE is # always denied. ./set-exec -i -- ./inc -c "+" # Denied ./inc -c "$(<script-ask.inc)" # Allowed # To directly execute a script, we can update $PATH (used by `env`): PATH="${PATH}:." ./script-exec.inc # To execute several commands passed as argument: Add a complete test suite to check the script interpreter against all possible execution cases: make TARGETS=exec kselftest-install ./tools/testing/selftests/kselftest_install/run_kselftest.sh Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christian Brauner <brauner@kernel.org> Cc: Kees Cook <keescook@chromium.org> Cc: Paul Moore <paul@paul-moore.com> Cc: Serge Hallyn <serge@hallyn.com> Signed-off-by: Mickaël Salaün <mic@digikod.net> Link: https://lore.kernel.org/r/20241212174223.389435-8-mic@digikod.net Signed-off-by: Kees Cook <kees@kernel.org> samples/Kconfig | 4 +- samples/check-exec/.gitignore | 1 + samples/check-exec/Makefile | 1 + samples/check-exec/inc.c | 205 +++++++++++++++++++++++ samples/check-exec/run-script-ask.inc | 9 + samples/check-exec/script-ask.inc | 5 + samples/check-exec/script-exec.inc | 4 + samples/check-exec/script-noexec.inc | 4 + tools/testing/selftests/exec/.gitignore | 2 + tools/testing/selftests/exec/Makefile | 14 +- tools/testing/selftests/exec/check-exec-tests.sh | 205 +++++++++++++++++++++++ 11 files changed, 451 insertions(+), 3 deletions(-) commit 3e707b07f582c12ed78fa5516a97bf701bf0634c Author: Mickaël Salaün <mic@digikod.net> Date: Thu Dec 12 18:42:21 2024 +0100 selftests: ktap_helpers: Fix uninitialized variable __ktap_test() may be called without the optional third argument which is an issue for scripts using `set -u` to detect uninitialized variables and potential bugs. Fix this optional "directive" argument by either using the third argument or an empty string. This is required for the next commit to properly test script execution control. Cc: Kees Cook <kees@kernel.org> Cc: Nícolas F. R. A. Prado <nfraprado@collabora.com> Cc: Shuah Khan <skhan@linuxfoundation.org> Fixes: 14571ab1ad21 ("kselftest: Add new test for detecting unprobed Devicetree devices") Signed-off-by: Mickaël Salaün <mic@digikod.net> Link: https://lore.kernel.org/r/20241212174223.389435-7-mic@digikod.net Signed-off-by: Kees Cook <kees@kernel.org> tools/testing/selftests/kselftest/ktap_helpers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit faf2d88e556756f31d9e2e33f37ce89396ba0f7f Author: Mickaël Salaün <mic@digikod.net> Date: Thu Dec 12 18:42:20 2024 +0100 samples/check-exec: Add set-exec Add a simple tool to set SECBIT_EXEC_RESTRICT_FILE or SECBIT_EXEC_DENY_INTERACTIVE before executing a command. This is useful to easily test against enlighten script interpreters. Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christian Brauner <brauner@kernel.org> Cc: Kees Cook <keescook@chromium.org> Cc: Paul Moore <paul@paul-moore.com> Cc: Serge Hallyn <serge@hallyn.com> Signed-off-by: Mickaël Salaün <mic@digikod.net> Link: https://lore.kernel.org/r/20241212174223.389435-6-mic@digikod.net Signed-off-by: Kees Cook <kees@kernel.org> samples/Kconfig | 7 ++++ samples/Makefile | 1 + samples/check-exec/.gitignore | 1 + samples/check-exec/Makefile | 14 +++++++ samples/check-exec/set-exec.c | 85 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 108 insertions(+) commit 0e7f90f34cf79bf329d6d08edea3403544498843 Author: Mickaël Salaün <mic@digikod.net> Date: Thu Dec 12 18:42:19 2024 +0100 selftests/landlock: Add tests for execveat + AT_EXECVE_CHECK Extend layout1.execute with the new AT_EXECVE_CHECK flag. The semantic with AT_EXECVE_CHECK is the same as with a simple execve(2), LANDLOCK_ACCESS_FS_EXECUTE is enforced the same way. Cc: Günther Noack <gnoack@google.com> Cc: Kees Cook <keescook@chromium.org> Cc: Paul Moore <paul@paul-moore.com> Signed-off-by: Mickaël Salaün <mic@digikod.net> Link: https://lore.kernel.org/r/20241212174223.389435-5-mic@digikod.net Signed-off-by: Kees Cook <kees@kernel.org> tools/testing/selftests/landlock/fs_test.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit b083cc815376a8ccfba6535b4d59a396b77601d4 Author: Mickaël Salaün <mic@digikod.net> Date: Thu Dec 12 18:42:18 2024 +0100 selftests/exec: Add 32 tests for AT_EXECVE_CHECK and exec securebits Test that checks performed by execveat(..., AT_EXECVE_CHECK) are consistent with noexec mount points and file execute permissions. Test that SECBIT_EXEC_RESTRICT_FILE and SECBIT_EXEC_DENY_INTERACTIVE are inherited by child processes and that they can be pinned with the appropriate SECBIT_EXEC_RESTRICT_FILE_LOCKED and SECBIT_EXEC_DENY_INTERACTIVE_LOCKED bits. Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christian Brauner <brauner@kernel.org> Cc: Kees Cook <keescook@chromium.org> Cc: Paul Moore <paul@paul-moore.com> Cc: Serge Hallyn <serge@hallyn.com> Signed-off-by: Mickaël Salaün <mic@digikod.net> Link: https://lore.kernel.org/r/20241212174223.389435-4-mic@digikod.net Signed-off-by: Kees Cook <kees@kernel.org> tools/testing/selftests/exec/.gitignore | 2 + tools/testing/selftests/exec/Makefile | 7 + tools/testing/selftests/exec/check-exec.c | 456 ++++++++++++++++++++++++++++++ tools/testing/selftests/exec/config | 2 + tools/testing/selftests/exec/false.c | 5 + 5 files changed, 472 insertions(+) commit a0623b2a1d595341971c189b90a6b06f42cd209d Author: Mickaël Salaün <mic@digikod.net> Date: Thu Dec 12 18:42:17 2024 +0100 security: Add EXEC_RESTRICT_FILE and EXEC_DENY_INTERACTIVE securebits The new SECBIT_EXEC_RESTRICT_FILE, SECBIT_EXEC_DENY_INTERACTIVE, and their *_LOCKED counterparts are designed to be set by processes setting up an execution environment, such as a user session, a container, or a security sandbox. Unlike other securebits, these ones can be set by unprivileged processes. Like seccomp filters or Landlock domains, the securebits are inherited across processes. When SECBIT_EXEC_RESTRICT_FILE is set, programs interpreting code should control executable resources according to execveat(2) + AT_EXECVE_CHECK (see previous commit). When SECBIT_EXEC_DENY_INTERACTIVE is set, a process should deny execution of user interactive commands (which excludes executable regular files). Being able to configure each of these securebits enables system administrators or owner of image containers to gradually validate the related changes and to identify potential issues (e.g. with interpreter or audit logs). It should be noted that unlike other security bits, the SECBIT_EXEC_RESTRICT_FILE and SECBIT_EXEC_DENY_INTERACTIVE bits are dedicated to user space willing to restrict itself. Because of that, they only make sense in the context of a trusted environment (e.g. sandbox, container, user session, full system) where the process changing its behavior (according to these bits) and all its parent processes are trusted. Otherwise, any parent process could just execute its own malicious code (interpreting a script or not), or even enforce a seccomp filter to mask these bits. Such a secure environment can be achieved with an appropriate access control (e.g. mount's noexec option, file access rights, LSM policy) and an enlighten ld.so checking that libraries are allowed for execution e.g., to protect against illegitimate use of LD_PRELOAD. Ptrace restrictions according to these securebits would not make sense because of the processes' trust assumption. Scripts may need some changes to deal with untrusted data (e.g. stdin, environment variables), but that is outside the scope of the kernel. See chromeOS's documentation about script execution control and the related threat model: https://www.chromium.org/chromium-os/developer-library/guides/security/noexec-shell-scripts/ Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Christian Brauner <brauner@kernel.org> Cc: Kees Cook <keescook@chromium.org> Cc: Paul Moore <paul@paul-moore.com> Reviewed-by: Serge Hallyn <serge@hallyn.com> Reviewed-by: Jeff Xu <jeffxu@chromium.org> Tested-by: Jeff Xu <jeffxu@chromium.org> Signed-off-by: Mickaël Salaün <mic@digikod.net> Link: https://lore.kernel.org/r/20241212174223.389435-3-mic@digikod.net Signed-off-by: Kees Cook <kees@kernel.org> Documentation/userspace-api/check_exec.rst | 107 +++++++++++++++++++++++++++++ include/uapi/linux/securebits.h | 24 ++++++- security/commoncap.c | 29 ++++++-- 3 files changed, 153 insertions(+), 7 deletions(-) commit a5874fde3c0884a33ed4145101052318c5e17c74 Author: Mickaël Salaün <mic@digikod.net> Date: Thu Dec 12 18:42:16 2024 +0100 exec: Add a new AT_EXECVE_CHECK flag to execveat(2) Add a new AT_EXECVE_CHECK flag to execveat(2) to check if a file would be allowed for execution. The main use case is for script interpreters and dynamic linkers to check execution permission according to the kernel's security policy. Another use case is to add context to access logs e.g., which script (instead of interpreter) accessed a file. As any executable code, scripts could also use this check [1]. This is different from faccessat(2) + X_OK which only checks a subset of access rights (i.e. inode permission and mount options for regular files), but not the full context (e.g. all LSM access checks). The main use case for access(2) is for SUID processes to (partially) check access on behalf of their caller. The main use case for execveat(2) + AT_EXECVE_CHECK is to check if a script execution would be allowed, according to all the different restrictions in place. Because the use of AT_EXECVE_CHECK follows the exact kernel semantic as for a real execution, user space gets the same error codes. An interesting point of using execveat(2) instead of openat2(2) is that it decouples the check from the enforcement. Indeed, the security check can be logged (e.g. with audit) without blocking an execution environment not yet ready to enforce a strict security policy. LSMs can control or log execution requests with security_bprm_creds_for_exec(). However, to enforce a consistent and complete access control (e.g. on binary's dependencies) LSMs should restrict file executability, or measure executed files, with security_file_open() by checking file->f_flags & __FMODE_EXEC. Because AT_EXECVE_CHECK is dedicated to user space interpreters, it doesn't make sense for the kernel to parse the checked files, look for interpreters known to the kernel (e.g. ELF, shebang), and return ENOEXEC if the format is unknown. Because of that, security_bprm_check() is never called when AT_EXECVE_CHECK is used. It should be noted that script interpreters cannot directly use execveat(2) (without this new AT_EXECVE_CHECK flag) because this could lead to unexpected behaviors e.g., `python script.sh` could lead to Bash being executed to interpret the script. Unlike the kernel, script interpreters may just interpret the shebang as a simple comment, which should not change for backward compatibility reasons. Because scripts or libraries files might not currently have the executable permission set, or because we might want specific users to be allowed to run arbitrary scripts, the following patch provides a dynamic configuration mechanism with the SECBIT_EXEC_RESTRICT_FILE and SECBIT_EXEC_DENY_INTERACTIVE securebits. This is a redesign of the CLIP OS 4's O_MAYEXEC: https://github.com/clipos-archive/src_platform_clip-patches/blob/f5cb330d6b684752e403b4e41b39f7004d88e561/1901_open_mayexec.patch This patch has been used for more than a decade with customized script interpreters. Some examples can be found here: https://github.com/clipos-archive/clipos4_portage-overlay/search?q=O_MAYEXEC Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christian Brauner <brauner@kernel.org> Cc: Kees Cook <keescook@chromium.org> Acked-by: Paul Moore <paul@paul-moore.com> Reviewed-by: Serge Hallyn <serge@hallyn.com> Reviewed-by: Jeff Xu <jeffxu@chromium.org> Tested-by: Jeff Xu <jeffxu@chromium.org> Link: https://docs.python.org/3/library/io.html#io.open_code [1] Signed-off-by: Mickaël Salaün <mic@digikod.net> Link: https://lore.kernel.org/r/20241212174223.389435-2-mic@digikod.net Signed-off-by: Kees Cook <kees@kernel.org> Documentation/userspace-api/check_exec.rst | 37 ++++++++++++++++++++++++++++++ Documentation/userspace-api/index.rst | 1 + fs/exec.c | 20 ++++++++++++++-- include/linux/binfmts.h | 7 +++++- include/uapi/linux/fcntl.h | 4 ++++ security/security.c | 10 ++++++++ 6 files changed, 76 insertions(+), 3 deletions(-) commit 5972da73f75af6002b72e5cd61002855b6b4eda3 Author: Sicelo A. Mhlongo <absicsz@gmail.com> Date: Thu Nov 28 10:57:28 2024 +0200 power: supply: bq2415x_charger: report charging state changes to userspace Continuously track the charging status register in order to send uevents whenever the state changes. Generate an uevent also when the chip's OTG line is toggled, in bq2415x_notifier_call(). Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com> Link: https://lore.kernel.org/r/20241128085759.11840-2-absicsz@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/bq2415x_charger.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e10c5cbd1c912c06d887c8a1980ac57e21d87b6f Author: Lukas Wunner <lukas@wunner.de> Date: Mon Dec 16 20:18:41 2024 +0100 PCI: Update code comment on PCI_EXP_LNKCAP_SLS for PCIe r3.0 Niklas notes that the code comment on the PCI_EXP_LNKCAP_SLS macro is outdated as it reflects the meaning of the field prior to PCIe r3.0. Update it to avoid confusion. Closes: https://lore.kernel.org/r/70829798889c6d779ca0f6cd3260a765780d1369.camel@kernel.org Link: https://lore.kernel.org/r/6152bd17cbe0876365d5f4624fc317529f4bbc85.1734376438.git.lukas@wunner.de Reported-by: Niklas Schnelle <niks@kernel.org> Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com> include/uapi/linux/pci_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 525f6a2c63e0958c25080e108a0cb7f8a3a23719 Author: Sicelo A. Mhlongo <absicsz@gmail.com> Date: Mon Nov 25 17:12:58 2024 +0200 bq27xxx: add voltage min design for bq27000 and bq27200 The bq27x00 gauges have an EEPROM register which contains the value of the voltage that should be considered to be zero battery capacity. Expose this to userspace using the VOLTAGE_MIN_DESIGN property. Tested on Nokia N900 with bq27200. Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com> Acked-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20241125151321.45440-1-absicsz@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/bq27xxx_battery.c | 39 +++++++++++++++++++++++++++++++++- include/linux/power/bq27xxx_battery.h | 1 + 2 files changed, 39 insertions(+), 1 deletion(-) commit 156fb706f915ceb436200030e3730305bbf12f6c Author: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Date: Sun Nov 17 14:34:43 2024 +0900 power: reset: as3722-poweroff: Remove unnecessary return in as3722_poweroff_probe The return is executed on the devm_register_sys_off_handler() line in as3722_poweroff_probe, so the last return line is unnecessary. Remove it. Fixes: 348fde771ce7 ("power: reset: as3722-poweroff: Use devm_register_sys_off_handler(POWER_OFF)") Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Acked-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20241117053443.1148902-1-iwamatsu@nigauri.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/reset/as3722-poweroff.c | 2 -- 1 file changed, 2 deletions(-) commit 8eef6ac4d70eb1f0099fff93321d90ce8fa49ee1 Author: Martin KaFai Lau <martin.lau@kernel.org> Date: Wed Dec 18 11:30:00 2024 -0800 bpf: bpf_local_storage: Always use bpf_mem_alloc in PREEMPT_RT In PREEMPT_RT, kmalloc(GFP_ATOMIC) is still not safe in non preemptible context. bpf_mem_alloc must be used in PREEMPT_RT. This patch is to enforce bpf_mem_alloc in the bpf_local_storage when CONFIG_PREEMPT_RT is enabled. [ 35.118559] BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 [ 35.118566] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1832, name: test_progs [ 35.118569] preempt_count: 1, expected: 0 [ 35.118571] RCU nest depth: 1, expected: 1 [ 35.118577] INFO: lockdep is turned off. ... [ 35.118647] __might_resched+0x433/0x5b0 [ 35.118677] rt_spin_lock+0xc3/0x290 [ 35.118700] ___slab_alloc+0x72/0xc40 [ 35.118723] __kmalloc_noprof+0x13f/0x4e0 [ 35.118732] bpf_map_kzalloc+0xe5/0x220 [ 35.118740] bpf_selem_alloc+0x1d2/0x7b0 [ 35.118755] bpf_local_storage_update+0x2fa/0x8b0 [ 35.118784] bpf_sk_storage_get_tracing+0x15a/0x1d0 [ 35.118791] bpf_prog_9a118d86fca78ebb_trace_inet_sock_set_state+0x44/0x66 [ 35.118795] bpf_trace_run3+0x222/0x400 [ 35.118820] __bpf_trace_inet_sock_set_state+0x11/0x20 [ 35.118824] trace_inet_sock_set_state+0x112/0x130 [ 35.118830] inet_sk_state_store+0x41/0x90 [ 35.118836] tcp_set_state+0x3b3/0x640 There is no need to adjust the gfp_flags passing to the bpf_mem_cache_alloc_flags() which only honors the GFP_KERNEL. The verifier has ensured GFP_KERNEL is passed only in sleepable context. It has been an old issue since the first introduction of the bpf_local_storage ~5 years ago, so this patch targets the bpf-next. bpf_mem_alloc is needed to solve it, so the Fixes tag is set to the commit when bpf_mem_alloc was first used in the bpf_local_storage. Fixes: 08a7ce384e33 ("bpf: Use bpf_mem_cache_alloc/free in bpf_local_storage_elem") Reported-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://lore.kernel.org/r/20241218193000.2084281-1-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/bpf_local_storage.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 3c7c176b10ccff15fee0e8d00ebc6804f87fb807 Author: Hans de Goede <hdegoede@redhat.com> Date: Sat Nov 16 21:36:48 2024 +0100 power: supply: bq24190: Add BQ24297 support The BQ24297 is identical to the BQ24296 except that it uses USB D+ / D- data-lines for charger-type (max. input-current) detection instead of a PSEL input pin. This is the same difference as between the already supported BQ24190 (D+ / D-) and the BQ24192 (PSEL). Note just like with the BQ24190 vs BQ24192 there is no difference how the charger-IC works at the register-level. The only difference is in the external hardware interface. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241116203648.169100-3-hdegoede@redhat.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/bq24190_charger.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit da4ac0b3c22f48f6387617d13bb986f633d3c01a Author: Hans de Goede <hdegoede@redhat.com> Date: Sat Nov 16 21:36:46 2024 +0100 dt-bindings: power: supply: bq24190: Add BQ24297 compatible The BQ24297 is identical to the BQ24296 except that it uses USB D+ / D- data-lines for charger-type (max. input-current) detection instead of a PSEL input pin. This is the same difference as between the already supported BQ24190 (D+ / D-) and the BQ24192 (PSEL). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241116203648.169100-1-hdegoede@redhat.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Documentation/devicetree/bindings/power/supply/bq24190.yaml | 1 + 1 file changed, 1 insertion(+) commit 4eea7596b8fb5c204f7a454a5166ebdcb6b6c72a Author: Thippeswamy Havalige <thippesw@amd.com> Date: Sun Sep 22 11:43:18 2024 +0530 PCI: xilinx-cpm: Add support for Versal CPM5 Root Port Controller 1 Add support for the Xilinx Versal CPM5 Root Port Controller 1. The key difference between Controller 0 and Controller 1 lies in the platform-specific error interrupt bits, which are located at different register offsets. To handle these differences, updated variant structure to hold the following platform-specific details: - Interrupt status register offset (ir_status) - Interrupt enable register offset (ir_enable) - Miscellaneous interrupt values (ir_misc_value) The driver differentiates between Controller 0 and Controller 1 using the compatible string in the device tree. This ensures that the appropriate register offsets are used for each controller, allowing for correct handling of platform-specific interrupts and initialization. Link: https://lore.kernel.org/r/20240922061318.2653503-3-thippesw@amd.com Signed-off-by: Thippeswamy Havalige <thippesw@amd.com> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> drivers/pci/controller/pcie-xilinx-cpm.c | 50 +++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 11 deletions(-) commit c9cfced17365b1df8c6ae6cd5db56aebd7ed9b57 Author: Yafang Shao <laoar.shao@gmail.com> Date: Tue Dec 10 10:27:06 2024 +0800 net/mlx5e: Report rx_discards_phy via rx_dropped We noticed a high number of rx_discards_phy events on certain servers while running `ethtool -S`. However, this critical counter is not currently included in the standard /proc/net/dev statistics file, making it difficult to monitor effectively—especially given the diversity of vendors across a large fleet of servers. Let's report it via the standard rx_dropped metric. Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Yafang Shao <laoar.shao@gmail.com> Cc: Saeed Mahameed <saeedm@nvidia.com> Cc: Leon Romanovsky <leon@kernel.org> Cc: Gal Pressman <gal@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241210022706.6665-1-laoar.shao@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 + 1 file changed, 1 insertion(+) commit 0e77b324110c9c1e240a67cc35fa1355f8f3f57c Author: Maxim Levitsky <mlevitsk@redhat.com> Date: Tue Sep 10 16:03:49 2024 -0400 KVM: x86: Add information about pending requests to kvm_exit tracepoint Print pending requests in the kvm_exit tracepoint, which allows userspace to gather information on how often KVM interrupts vCPUs due to specific requests. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20240910200350.264245-3-mlevitsk@redhat.com [sean: massage changelog] Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/trace.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 3e633e7e7d0725b483aee843cbdce22bc9cd1707 Author: Maxim Levitsky <mlevitsk@redhat.com> Date: Tue Sep 10 16:03:48 2024 -0400 KVM: x86: Add interrupt injection information to the kvm_entry tracepoint Add VMX/SVM specific interrupt injection info the kvm_entry tracepoint. As is done with kvm_exit, gather the information via a kvm_x86_ops hook to avoid the moderately costly VMREADs on VMX when the tracepoint isn't enabled. Opportunistically rename the parameters in the get_exit_info() declaration to match the names used by both SVM and VMX. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20240910200350.264245-2-mlevitsk@redhat.com [sean: drop is_guest_mode() change, use intr_info/error_code for names] Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/include/asm/kvm-x86-ops.h | 1 + arch/x86/include/asm/kvm_host.h | 7 +++++-- arch/x86/kvm/svm/svm.c | 16 ++++++++++++++++ arch/x86/kvm/trace.h | 9 ++++++++- arch/x86/kvm/vmx/main.c | 1 + arch/x86/kvm/vmx/vmx.c | 9 +++++++++ arch/x86/kvm/vmx/x86_ops.h | 3 +++ 7 files changed, 43 insertions(+), 3 deletions(-) commit 62e41f6b4f3697e5909cdf70d56e9a7ebd958732 Author: Ivan Orlov <iorlov@amazon.com> Date: Tue Dec 17 18:14:58 2024 +0000 KVM: selftests: Add test case for MMIO during vectoring on x86 Extend the 'set_memory_region_test' with an x86-only test case which covers emulated MMIO during event vectoring error handling. The test case 1) Sets an IDT descriptor base to point to an MMIO address 2) Generates a #GP in the guest 3) Verifies userspace gets the correct exit reason, suberror code, and GPA in internal.data[3] Opportunistically add a definition for a non-canonical address to processor.h so that the source of the #GP is somewhat self-documenting, and so that future tests don't have to reinvent the wheel. Signed-off-by: Ivan Orlov <iorlov@amazon.com> Link: https://lore.kernel.org/r/20241217181458.68690-8-iorlov@amazon.com [sean: massage changelog] Signed-off-by: Sean Christopherson <seanjc@google.com> .../testing/selftests/kvm/include/x86/processor.h | 2 + .../testing/selftests/kvm/set_memory_region_test.c | 51 ++++++++++++++++++++++ 2 files changed, 53 insertions(+) commit 4e9427aeb9572a4023b42e64ca2cd2ca3cbf7e20 Author: Ivan Orlov <iorlov@amazon.com> Date: Tue Dec 17 18:14:57 2024 +0000 KVM: selftests: Add and use a helper function for x86's LIDT Implement a function for setting the IDT descriptor from the guest code. Replace the existing lidt occurrences with calls to this function as `lidt` is used in multiple places. Signed-off-by: Ivan Orlov <iorlov@amazon.com> Link: https://lore.kernel.org/r/20241217181458.68690-7-iorlov@amazon.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/include/x86/processor.h | 5 +++++ tools/testing/selftests/kvm/set_memory_region_test.c | 2 +- tools/testing/selftests/kvm/x86/sev_smoke_test.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) commit 7bd7ff99110a2f63f758b292ab762cad16b85656 Author: Ivan Orlov <iorlov@amazon.com> Date: Tue Dec 17 18:14:56 2024 +0000 KVM: SVM: Handle event vectoring error in check_emulate_instruction() Detect unhandleable vectoring in check_emulate_instruction() to prevent infinite retry loops on SVM, and to eliminate the main differences in how VM-Exits during event vectoring are handled on SVM versus VMX. E.g. if the vCPU puts its IDT in emulated MMIO memory and generates an event, without the check_emulate_instruction() change, SVM will re-inject the event and resume the guest, and effectively put the vCPU into an infinite loop. Signed-off-by: Ivan Orlov <iorlov@amazon.com> Link: https://lore.kernel.org/r/20241217181458.68690-6-iorlov@amazon.com [sean: grab "svm" locally, massage changelog] Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/svm/svm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 47ef3ef843c0f6e8006094d707b4aac18ed87e53 Author: Ivan Orlov <iorlov@amazon.com> Date: Tue Dec 17 18:14:55 2024 +0000 KVM: VMX: Handle event vectoring error in check_emulate_instruction() Move handling of emulation during event vectoring, which KVM doesn't support, into VMX's check_emulate_instruction(), so that KVM detects all unsupported emulation, not just cached emulated MMIO (EPT misconfig). E.g. on emulated MMIO that isn't cached (EPT Violation) or occurs with legacy shadow paging (#PF). Rejecting emulation on other sources of emulation also fixes a largely theoretical flaw (thanks to the "unprotect and retry" logic), where KVM could incorrectly inject a #DF: 1. CPU executes an instruction and hits a #GP 2. While vectoring the #GP, a shadow #PF occurs 3. On the #PF VM-Exit, KVM re-injects #GP 4. KVM emulates because of the write-protected page 5. KVM "successfully" emulates and also detects the #GP 6. KVM synthesizes a #GP, and since #GP has already been injected, incorrectly escalates to a #DF. Fix the comment about EMULTYPE_PF as this flag doesn't necessarily mean MMIO anymore: it can also be set due to the write protection violation. Note, handle_ept_misconfig() checks vmx_check_emulate_instruction() before attempting emulation of any kind. Suggested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Ivan Orlov <iorlov@amazon.com> Link: https://lore.kernel.org/r/20241217181458.68690-5-iorlov@amazon.com [sean: massage changelog] Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/include/asm/kvm_host.h | 9 +++++++-- arch/x86/kvm/vmx/vmx.c | 23 +++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) commit 704fc6021b9ecd1e5db4c099bb8ed226760d2159 Author: Ivan Orlov <iorlov@amazon.com> Date: Tue Dec 17 18:14:54 2024 +0000 KVM: x86: Try to unprotect and retry on unhandleable emulation failure If emulation is "rejected" by check_emulate_instruction(), try to unprotect and retry instruction execution before reporting the error to userspace. Currently, check_emulate_instruction() never signals failure when "unprotect and retry" is possible, but that will change in the future as both VMX and SVM will reject emulation due to coincident exception vectoring. E.g. if there is a write to a shadowed page table when vectoring an event, then unprotecting the gfn and retrying the instruction will allow the guest to make forward progress in most cases, i.e. will allow the vCPU to keep running instead of returning an error to userspace. This ensures that the subsequent patches won't make KVM exit to userspace when handling an intercepted #PF during vectoring without checking whether unprotect and retry is possible. Suggested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Ivan Orlov <iorlov@amazon.com> Link: https://lore.kernel.org/r/20241217181458.68690-4-iorlov@amazon.com [sean: massage changelog to clarify this is a nop for the current code] Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/x86.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5c9cfc48663606f26455e4113fd5a1f29b19ddc9 Author: Ivan Orlov <iorlov@amazon.com> Date: Tue Dec 17 18:14:53 2024 +0000 KVM: x86: Add emulation status for unhandleable exception vectoring Add emulation status for unhandleable vectoring, i.e. when KVM can't emulate an instruction because emulation was triggered on an exit that occurred while the CPU was vectoring an event. Such a situation can occur if guest sets the IDT descriptor base to point to MMIO region, and triggers an exception after that. Exit to userspace with event delivery error when KVM can't emulate an instruction when vectoring an event. Signed-off-by: Ivan Orlov <iorlov@amazon.com> Link: https://lore.kernel.org/r/20241217181458.68690-3-iorlov@amazon.com [sean: massage changelog and X86EMUL_UNHANDLEABLE_VECTORING comment] Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/kvm_emulate.h | 2 ++ arch/x86/kvm/x86.c | 5 +++++ 2 files changed, 7 insertions(+) commit 11c98fa07a792c7667c9c0d4f3c7f2d620bfb7f0 Author: Ivan Orlov <iorlov@amazon.com> Date: Tue Dec 17 18:14:52 2024 +0000 KVM: x86: Add function for vectoring error generation Extract VMX code for unhandleable VM-Exit during vectoring into vendor-agnostic function so that boiler-plate code can be shared by SVM. To avoid unnecessarily complexity in the helper, unconditionally report a GPA to userspace instead of having a conditional entry. For exits that don't report a GPA, i.e. everything except EPT Misconfig, simply report KVM's "invalid GPA". Signed-off-by: Ivan Orlov <iorlov@amazon.com> Link: https://lore.kernel.org/r/20241217181458.68690-2-iorlov@amazon.com [sean: clarify that the INVALID_GPA logic is new] Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/vmx/vmx.c | 17 +++++------------ arch/x86/kvm/x86.c | 22 ++++++++++++++++++++++ 3 files changed, 29 insertions(+), 12 deletions(-) commit 871ac338ef553faf8c1c2f71dc4636b35d176ef4 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:24 2024 -0800 KVM: x86: Use only local variables (no bitmask) to init kvm_cpu_caps Refactor the kvm_cpu_cap_init() macro magic to collect supported features in a local variable instead of passing them to the macro as a "mask". As pointed out by Maxim, relying on macros to "return" a value and set local variables is surprising, as the bitwise-OR logic suggests the macros are pure, i.e. have no side effects. Ideally, the feature initializers would have zero side effects, e.g. would take local variables as params, but there isn't a sane way to do so without either sacrificing the various compile-time assertions (basically a non-starter), or passing at least one variable, e.g. a struct, to each macro usage (adds a lot of noise and boilerplate code). Opportunistically force callers to emit a trailing comma by intentionally omitting a semicolon after invoking the feature initializers. Forcing a trailing comma isotales futures changes to a single line, i.e. doesn't cause churn for unrelated features/lines when adding/removing/modifying a feature. No functional change intended. Suggested-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-58-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 541 ++++++++++++++++++++++++++------------------------- 1 file changed, 273 insertions(+), 268 deletions(-) commit 7a9b65ab0abd52ae646ba327522315d7500a7d4f Author: Amit Vadhavana <av2082000@gmail.com> Date: Sat Nov 16 20:51:36 2024 +0530 selftests: refactor the lsm `flags_overset_lsm_set_self_attr` test Remove the temporary context variable `tctx` to simplify the code. use the original context `ctx` directly in calls to `lsm_get_self_attr`, eliminating redundancy without any functional changes. Reviewed-by: Casey Schaufler <casey@schaufler-ca.com> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Amit Vadhavana <av2082000@gmail.com> [PM: subject tweak] Signed-off-by: Paul Moore <paul@paul-moore.com> tools/testing/selftests/lsm/lsm_set_self_attr_test.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 5c911b4659d55580a15150b7845f13d04c070112 Author: Thippeswamy Havalige <thippesw@amd.com> Date: Sun Sep 22 11:43:17 2024 +0530 dt-bindings: PCI: xilinx-cpm: Add compatible string for CPM5 host1 The Xilinx Versal premium series has CPM5 block which supports two typeA Root Port controller functionality at Gen5 speed. Add compatible string to distinguish between two CPM5 rootport controller1. since Legacy and error interrupt register and bits for both the controllers are at different offsets. Link: https://lore.kernel.org/r/20240922061318.2653503-2-thippesw@amd.com Signed-off-by: Thippeswamy Havalige <thippesw@amd.com> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml | 1 + 1 file changed, 1 insertion(+) commit 6f5c71cc42d49203771bceed91a023d4dbec54f4 Author: Kai Huang <kai.huang@intel.com> Date: Sun Dec 15 04:15:47 2024 +1300 x86/virt/tdx: Require the module to assert it has the NO_RBP_MOD mitigation Old TDX modules can clobber RBP in the TDH.VP.ENTER SEAMCALL. However RBP is used as frame pointer in the x86_64 calling convention, and clobbering RBP could result in bad things like being unable to unwind the stack if any non-maskable exceptions (NMI, #MC etc) happens in that gap. A new "NO_RBP_MOD" feature was introduced to more recent TDX modules to not clobber RBP. KVM will need to use the TDH.VP.ENTER SEAMCALL to run TDX guests. It won't be safe to run TDX guests w/o this feature. To prevent it, just don't initialize the TDX module if this feature is not supported [1]. Note the bit definitions of TDX_FEATURES0 are not auto-generated in tdx_global_metadata.h. Manually define a macro for it in "tdx.h". Signed-off-by: Kai Huang <kai.huang@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com> Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Link: https://lore.kernel.org/fc0e8ab7-86d4-4428-be31-82e1ece6dd21@intel.com/ [1] Link: https://lore.kernel.org/all/76ae5025502c84d799e3a56a6fc4f69a82da8f93.1734188033.git.kai.huang%40intel.com arch/x86/virt/vmx/tdx/tdx.c | 17 +++++++++++++++++ arch/x86/virt/vmx/tdx/tdx.h | 4 ++++ 2 files changed, 21 insertions(+) commit fae43b24a6ba8f3def312af371ed86d8ce85e11b Author: Kai Huang <kai.huang@intel.com> Date: Sun Dec 15 04:15:46 2024 +1300 x86/virt/tdx: Switch to use auto-generated global metadata reading code Continue the process to have a centralized solution for TDX global metadata reading. Now that the new autogenerated solution is ready for use, switch to it and remove the old one. Signed-off-by: Kai Huang <kai.huang@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Link: https://lore.kernel.org/all/fc025d1e13b92900323f47cfe9aac3157bf08ee7.1734188033.git.kai.huang%40intel.com arch/x86/virt/vmx/tdx/tdx.c | 61 +-------------------------------------------- arch/x86/virt/vmx/tdx/tdx.h | 45 +-------------------------------- 2 files changed, 2 insertions(+), 104 deletions(-) commit 6bfb77f4893f9809fd1dc3591c8b343534c87a65 Author: Kai Huang <kai.huang@intel.com> Date: Sun Dec 15 04:15:45 2024 +1300 x86/virt/tdx: Use dedicated struct members for PAMT entry sizes Currently, the 'struct tdmr_sys_info_tdmr' which includes TDMR related fields defines the PAMT entry sizes for TDX supported page sizes (4KB, 2MB and 1GB) as an array: struct tdx_sys_info_tdmr { ... u16 pamt_entry_sizes[TDX_PS_NR]; }; PAMT entry sizes are needed when allocating PAMTs for each TDMR. Using the array to contain PAMT entry sizes reduces the number of arguments that need to be passed when calling tdmr_set_up_pamt(). It also makes the code pattern like below clearer: for (pgsz = TDX_PS_4K; pgsz < TDX_PS_NR; pgsz++) { pamt_size[pgsz] = tdmr_get_pamt_sz(tdmr, pgsz, pamt_entry_size[pgsz]); tdmr_pamt_size += pamt_size[pgsz]; } However, the auto-generated metadata reading code generates a structure member for each field. The 'global_metadata.json' has a dedicated field for each PAMT entry size, and the new 'struct tdx_sys_info_tdmr' looks like: struct tdx_sys_info_tdmr { ... u16 pamt_4k_entry_size; u16 pamt_2m_entry_size; u16 pamt_1g_entry_size; }; Prepare to use the autogenerated code by making the existing 'struct tdx_sys_info_tdmr' look like the generated one. When passing to tdmrs_set_up_pamt_all(), build a local array of PAMT entry sizes from the structure so the code to allocate PAMTs can stay the same. Signed-off-by: Kai Huang <kai.huang@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Link: https://lore.kernel.org/all/ccf46f3dacb01be1fb8309592616d443ac17caba.1734188033.git.kai.huang%40intel.com arch/x86/virt/vmx/tdx/tdx.c | 14 +++++++++----- arch/x86/virt/vmx/tdx/tdx.h | 4 +++- 2 files changed, 12 insertions(+), 6 deletions(-) commit 04a7bc7316b8b9ea5564ea66eb65155203f1541f Author: Paolo Bonzini <pbonzini@redhat.com> Date: Sun Dec 15 04:15:44 2024 +1300 x86/virt/tdx: Use auto-generated code to read global metadata The TDX module provides a set of "Global Metadata Fields". They report things like TDX module version, supported features, and fields related to create/run TDX guests and so on. Currently the kernel only reads "TD Memory Region" (TDMR) related fields for module initialization. There are needs to read more global metadata fields for future use: - Supported features ("TDX_FEATURES0") to fail module initialization when the module doesn't support "not clobbering host RBP when exiting from TDX guest" feature [1]. - KVM TDX baseline support and other features like TDX Connect will need to read more. The current global metadata reading code has limitations (e.g., it only has a primitive helper to read metadata field with 16-bit element size, while TDX supports 8/16/32/64 bits metadata element sizes). It needs tweaks in order to read more metadata fields. But even with the tweaks, when new code is added to read a new field, the reviewers will still need to review against the spec to make sure the new code doesn't screw up things like using the wrong metadata field ID (each metadata field is associated with a unique field ID, which is a TDX-defined u64 constant) etc. TDX documents all global metadata fields in a 'global_metadata.json' file as part of TDX spec [2]. JSON format is machine readable. Instead of tweaking the metadata reading code, use a script to generate the code so that: 1) Using the generated C is simple. 2) Adding a field is simple, e.g., the script just pulls the field ID out of the JSON for a given field thus no manual review is needed. Specifically, to match the layout of the 'struct tdx_sys_info' and its sub-structures, the script uses a table with each entry containing the the name of the sub-structures (which reflects the "Class") and the "Field Name" of all its fields, and auto-generate: 1) The 'struct tdx_sys_info' and all 'struct tdx_sys_info_xx' sub-structures in 'tdx_global_metadata.h'. 2) The main function 'get_tdx_sys_info()' which reads all metadata to 'struct tdx_sys_info' and the 'get_tdx_sys_info_xx()' functions which read 'struct tdx_sys_info_xx()' in 'tdx_global_metadata.c'. Using the generated C is simple: 1) include "tdx_global_metadata.h" to the local "tdx.h"; 2) explicitly include "tdx_global_metadata.c" to the local "tdx.c" after the read_sys_metadata_field() primitive (which is a wrapper of TDH.SYS.RD SEAMCALL to read global metadata). Adding a field is also simple: 1) just add the new field to an existing structure, or add it with a new structure; 2) re-run the script to generate the new code; 3) update the existing tdx_global_metadata.{hc} with the new ones. For now, use the auto-generated code to read the TDMR related fields and the aforesaid metadata field "TDX_FEATURES0". The tdx_global_metadata.{hc} can be generated by running below: #python tdx_global_metadata.py global_metadata.json \ tdx_global_metadata.h tdx_global_metadata.c .. where the 'global_metadata.json' can be fetched from [2] and the 'tdx_global_metadata.py' can be found from [3]. Co-developed-by: Kai Huang <kai.huang@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kai Huang <kai.huang@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Link: https://lore.kernel.org/fc0e8ab7-86d4-4428-be31-82e1ece6dd21@intel.com/ [1] Link: https://cdrdv2.intel.com/v1/dl/getContent/795381 [2] Link: https://lore.kernel.org/762a50133300710771337398284567b299a86f67.camel@intel.com/ [3] Link: https://lore.kernel.org/all/cbe3f12b1e5479399b53f4873f2ff783d9fc669b.1734188033.git.kai.huang%40intel.com arch/x86/virt/vmx/tdx/tdx_global_metadata.c | 48 +++++++++++++++++++++++++++++ arch/x86/virt/vmx/tdx/tdx_global_metadata.h | 25 +++++++++++++++ 2 files changed, 73 insertions(+) commit c4e0862a62c059498000914305ae60f9cbd0818a Author: Kai Huang <kai.huang@intel.com> Date: Sun Dec 15 04:15:43 2024 +1300 x86/virt/tdx: Start to track all global metadata in one structure The TDX module provides a set of "Global Metadata Fields". They report things like TDX module version, supported features, and fields related to create/run TDX guests and so on. Today the kernel only reads "TD Memory Region" (TDMR) related fields for module initialization. KVM will need to read additional metadata fields to run TDX guests. Move towards having the TDX host core-kernel provide a centralized, canonical, and immutable structure for the global metadata that comes out from the TDX module for all kernel components to use. As the first step, introduce a new 'struct tdx_sys_info' to track all global metadata fields. TDX categorizes global metadata fields into different "Classes". E.g., the TDMR related fields are under class "TDMR Info". Instead of making 'struct tdx_sys_info' a plain structure to contain all metadata fields, organize them in smaller structures based on the "Class". This allows those metadata fields to be used in finer granularity thus makes the code clearer. E.g., construct_tdmrs() can just take the structure which contains "TDMR Info" metadata fields. Add get_tdx_sys_info() as the placeholder to read all metadata fields. Have it only call get_tdx_sys_info_tdmr() to read TDMR related fields for now. Place get_tdx_sys_info() as the first step of init_tdx_module() to enable early prerequisite checks on the metadata to support early module initialization abort. This results in moving get_tdx_sys_info_tdmr() to be before build_tdx_memlist(), but this is fine because there are no dependencies between these two functions. Signed-off-by: Kai Huang <kai.huang@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Link: https://lore.kernel.org/all/bfacb4e90527cf79d4be0d1753e6f318eea21118.1734188033.git.kai.huang%40intel.com arch/x86/virt/vmx/tdx/tdx.c | 19 ++++++++++++------- arch/x86/virt/vmx/tdx/tdx.h | 19 ++++++++++++------- 2 files changed, 24 insertions(+), 14 deletions(-) commit e8aa393b0ada3b5ce1b3e8475b02e90e5dce6841 Author: Kai Huang <kai.huang@intel.com> Date: Sun Dec 15 04:15:42 2024 +1300 x86/virt/tdx: Rename 'struct tdx_tdmr_sysinfo' to reflect the spec better The TDX module provides a set of "Global Metadata Fields". They report things like TDX module version, supported features, and fields related to create/run TDX guests and so on. TDX organizes those metadata fields by "Classes" based on the meaning of those fields. E.g., for now the kernel only reads "TD Memory Region" (TDMR) related fields for module initialization. Those fields are defined under class "TDMR Info". Today the kernel reads some of the global metadata to initialize the TDX module. KVM will need to read additional metadata fields to run TDX guests. Move towards having the TDX host core-kernel provide a centralized, canonical, and immutable structure for the global metadata that comes out from the TDX module for all kernel components to use. More specifically, prepare the code to end up with an organization like: struct tdx_sys_info { struct tdx_sys_info_classA a; struct tdx_sys_info_classB b; ... }; Currently the kernel organizes all fields under "TDMR Info" class in 'struct tdx_tdmr_sysinfo'. Prepare for the above by renaming the structure to 'struct tdx_sys_info_tdmr' to follow the class name better. No functional change intended. Signed-off-by: Kai Huang <kai.huang@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Link: https://lore.kernel.org/all/de165d09e0b571cfeb119a368f4be6e2888ebb93.1734188033.git.kai.huang%40intel.com arch/x86/virt/vmx/tdx/tdx.c | 36 ++++++++++++++++++------------------ arch/x86/virt/vmx/tdx/tdx.h | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) commit ac9d1b7591a22e63f66a8c596390eccf821885e8 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:23 2024 -0800 KVM: x86: Explicitly track feature flags that are enabled at runtime Add one last (hopefully) CPUID feature macro, RUNTIME_F(), and use it to track features that KVM supports, but that are only set at runtime (in response to other state), and aren't advertised to userspace via KVM_GET_SUPPORTED_CPUID. Currently, RUNTIME_F() is mostly just documentation, but tracking all KVM-supported features will allow for asserting, at build time, take), that all features that are set, cleared, *or* checked by KVM are known to kvm_set_cpu_caps(). No functional change intended. Link: https://lore.kernel.org/r/20241128013424.4096668-57-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 0fea7aa2dc6a7095fa6acc00bff2aaa108635e63 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:22 2024 -0800 KVM: x86: Explicitly track feature flags that require vendor enabling Add another CPUID feature macro, VENDOR_F(), and use it to track features that KVM supports, but that need additional vendor support and so are conditionally enabled in vendor code. Currently, VENDOR_F() is mostly just documentation, but tracking all KVM-supported features will allow for asserting, at build time, take), that all features that are set, cleared, *or* checked by KVM are known to kvm_set_cpu_caps(). To fudge around a macro collision on 32-bit kernels, #undef DS to be able to get at X86_FEATURE_DS. No functional change intended. Link: https://lore.kernel.org/r/20241128013424.4096668-56-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 59 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 16 deletions(-) commit 9b2776c7cf2bdfb6a68b121c4038e167247ad1b1 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:21 2024 -0800 KVM: x86: Rename "SF" macro to "SCATTERED_F" Now that each feature flag is on its own line, i.e. brevity isn't a major concern, drop the "SF" acronym and use the (almost) full name, SCATTERED_F. No functional change intended. Link: https://lore.kernel.org/r/20241128013424.4096668-55-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3fd55b52279531c6211cb1037e929ea890fbeb59 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:20 2024 -0800 KVM: x86: Pull CPUID capabilities from boot_cpu_data only as needed Don't memcpy() all of boot_cpu_data.x86_capability, and instead explicitly fill each kvm_cpu_cap_init leaf during kvm_cpu_cap_init(). While clever, copying all kernel capabilities risks over-reporting KVM capabilities, e.g. if KVM added support in __do_cpuid_func(), but neglected to init the supported set of capabilities. Note, explicitly grabbing leafs deliberately keeps Linux-defined leafs as 0! KVM should never advertise Linux-defined leafs; any relevant features that are "real", but scattered, must be gathered in their correct hardware- defined leaf. Link: https://lore.kernel.org/r/20241128013424.4096668-54-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 75c489e12d4b90d8aa5ffb34c3c907ef717fe38e Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:19 2024 -0800 KVM: x86: Add a macro for features that are synthesized into boot_cpu_data Add yet another CPUID macro, this time for features that the host kernel synthesizes into boot_cpu_data, i.e. that the kernel force sets even in situations where the feature isn't reported by CPUID. Thanks to the macro shenanigans of kvm_cpu_cap_init(), such features can now be handled in the core CPUID framework, i.e. don't need to be handled out-of-band and thus without as many guardrails. Adding a dedicated macro also helps document what's going on, e.g. the calls to kvm_cpu_cap_check_and_set() are very confusing unless the reader knows exactly how kvm_cpu_cap_init() generates kvm_cpu_caps (and even then, it's far from obvious). Link: https://lore.kernel.org/r/20241128013424.4096668-53-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 49 ++++++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 19 deletions(-) commit cbdeea032bfe24ad9ef13a0c476ada405316758d Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:18 2024 -0800 KVM: x86: Drop superfluous host XSAVE check when adjusting guest XSAVES caps Drop the manual boot_cpu_has() checks on XSAVE when adjusting the guest's XSAVES capabilities now that guest cpu_caps incorporates KVM's support. The guest's cpu_caps are initialized from kvm_cpu_caps, which are in turn initialized from boot_cpu_data, i.e. checking guest_cpu_cap_has() also checks host/KVM capabilities (which is the entire point of cpu_caps). Cc: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-52-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/svm/svm.c | 1 - arch/x86/kvm/vmx/vmx.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) commit 8f2a27752e808f16f3baf1939a91c42966f22a08 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:17 2024 -0800 KVM: x86: Replace (almost) all guest CPUID feature queries with cpu_caps Switch all queries (except XSAVES) of guest features from guest CPUID to guest capabilities, i.e. replace all calls to guest_cpuid_has() with calls to guest_cpu_cap_has(). Keep guest_cpuid_has() around for XSAVES, but subsume its helper guest_cpuid_get_register() and add a compile-time assertion to prevent using guest_cpuid_has() for any other feature. Add yet another comment for XSAVE to explain why KVM is allowed to query its raw guest CPUID. Opportunistically drop the unused guest_cpuid_clear(), as there should be no circumstance in which KVM needs to _clear_ a guest CPUID feature now that everything is tracked via cpu_caps. E.g. KVM may need to _change_ a feature to emulate dynamic CPUID flags, but KVM should never need to clear a feature in guest CPUID to prevent it from being used by the guest. Delete the last remnants of the governed features framework, as the lone holdout was vmx_adjust_secondary_exec_control()'s divergent behavior for governed vs. ungoverned features. Note, replacing guest_cpuid_has() checks with guest_cpu_cap_has() when computing reserved CR4 bits is a nop when viewed as a whole, as KVM's capabilities are already incorporated into the calculation, i.e. if a feature is present in guest CPUID but unsupported by KVM, its CR4 bit was already being marked as reserved, checking guest_cpu_cap_has() simply double-stamps that it's a reserved bit. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-51-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 4 +-- arch/x86/kvm/cpuid.h | 76 ++++++++++++++-------------------------- arch/x86/kvm/governed_features.h | 22 ------------ arch/x86/kvm/hyperv.c | 2 +- arch/x86/kvm/lapic.c | 4 +-- arch/x86/kvm/smm.c | 10 +++--- arch/x86/kvm/svm/pmu.c | 8 ++--- arch/x86/kvm/svm/sev.c | 4 +-- arch/x86/kvm/svm/svm.c | 20 +++++------ arch/x86/kvm/vmx/hyperv.h | 2 +- arch/x86/kvm/vmx/nested.c | 12 +++---- arch/x86/kvm/vmx/pmu_intel.c | 4 +-- arch/x86/kvm/vmx/sgx.c | 14 ++++---- arch/x86/kvm/vmx/vmx.c | 47 ++++++++++++------------- arch/x86/kvm/x86.c | 66 +++++++++++++++++----------------- 15 files changed, 124 insertions(+), 171 deletions(-) commit 820545bdfeb0192f2afb311df9fd9d61458d89d2 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:16 2024 -0800 KVM: x86: Shuffle code to prepare for dropping guest_cpuid_has() Move the implementations of guest_has_{spec_ctrl,pred_cmd}_msr() down below guest_cpu_cap_has() so that their use of guest_cpuid_has() can be replaced with calls to guest_cpu_cap_has(). No functional change intended. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-50-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 75d4642fce01308621851f2c097d8ea047c6d450 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:15 2024 -0800 KVM: x86: Update guest cpu_caps at runtime for dynamic CPUID-based features When updating guest CPUID entries to emulate runtime behavior, e.g. when the guest enables a CR4-based feature that is tied to a CPUID flag, also update the vCPU's cpu_caps accordingly. This will allow replacing all usage of guest_cpuid_has() with guest_cpu_cap_has(). Note, this relies on kvm_set_cpuid() taking a snapshot of cpu_caps before invoking kvm_update_cpuid_runtime(), i.e. when KVM is updating CPUID entries that *may* become the vCPU's CPUID, so that unwinding to the old cpu_caps is possible if userspace tries to set bogus CPUID information. Note #2, none of the features in question use guest_cpu_cap_has() at this time, i.e. aside from settings bits in cpu_caps, this is a glorified nop. Cc: Yang Weijiang <weijiang.yang@intel.com> Cc: Robert Hoo <robert.hoo.linux@gmail.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-49-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 1f66590d7ff0bab04843fb89292e181c30d43e6c Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:14 2024 -0800 KVM: x86: Update OS{XSAVE,PKE} bits in guest CPUID irrespective of host support When making runtime CPUID updates, change OSXSAVE and OSPKE even if their respective base features (XSAVE, PKU) are not supported by the host. KVM already incorporates host support in the vCPU's effective reserved CR4 bits. I.e. OSXSAVE and OSPKE can be set if and only if the host supports them. And conversely, since KVM's ABI is that KVM owns the dynamic OS feature flags, clearing them when they obviously aren't supported and thus can't be enabled is arguably a fix. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-48-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit cfd15745260929565bc53e16fed54f9e3276c7e1 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:13 2024 -0800 KVM: x86: Drop unnecessary check that cpuid_entry2_find() returns right leaf Drop an unnecessary check that kvm_find_cpuid_entry_index(), i.e. cpuid_entry2_find(), returns the correct leaf when getting CPUID.0x7.0x0 to update X86_FEATURE_OSPKE. cpuid_entry2_find() never returns an entry for the wrong function. And not that it matters, but cpuid_entry2_find() will always return a precise match for CPUID.0x7.0x0 since the index is significant. No functional change intended. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-47-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 963180ae06373c9b0d16c23491bf3bcafef1900b Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:12 2024 -0800 KVM: x86: Avoid double CPUID lookup when updating MWAIT at runtime Move the handling of X86_FEATURE_MWAIT during CPUID runtime updates to utilize the lookup done for other CPUID.0x1 features. No functional change intended. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-46-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit e592ec657d84acba6562b3bfbd699769dc54e294 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:11 2024 -0800 KVM: x86: Initialize guest cpu_caps based on KVM support Constrain all guest cpu_caps based on KVM support instead of constraining only the few features that KVM _currently_ needs to verify are actually supported by KVM. The intent of cpu_caps is to track what the guest is actually capable of using, not the raw, unfiltered CPUID values that the guest sees. I.e. KVM should always consult it's only support when making decisions based on guest CPUID, and the only reason KVM has historically made the checks opt-in was due to lack of centralized tracking. Suggested-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-45-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 15 ++++++++++++++- arch/x86/kvm/cpuid.h | 7 ------- arch/x86/kvm/svm/svm.c | 11 ----------- arch/x86/kvm/vmx/vmx.c | 9 ++------- 4 files changed, 16 insertions(+), 26 deletions(-) commit d4b9ff3d55dede868f43c4541ba999c109dbadcb Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:10 2024 -0800 KVM: x86: Treat MONTIOR/MWAIT as a "partially emulated" feature Enumerate MWAIT in cpuid_func_emulated(), but only if the caller wants to include "partially emulated" features, i.e. features that KVM kinda sorta emulates, but with major caveats. This will allow initializing the guest cpu_caps based on the set of features that KVM virtualizes and/or emulates, without needing to handle things like MONITOR/MWAIT as one-off exceptions. Adding one-off handling for individual features is quite painful, especially when considering future hardening. It's very doable to verify, at compile time, that every CPUID-based feature that KVM queries when emulating guest behavior is actually known to KVM, e.g. to prevent KVM bugs where KVM emulates some feature but fails to advertise support to userspace. In other words, any features that are special cased, i.e. not handled generically in the CPUID framework, would also need to be special cased for any hardening efforts that build on said framework. Link: https://lore.kernel.org/r/20241128013424.4096668-44-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit ff402f56e8eb21d65c73e559fb5db5a00cedb14a Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:09 2024 -0800 KVM: x86: Extract code for generating per-entry emulated CPUID information Extract the meat of __do_cpuid_func_emulated() into a separate helper, cpuid_func_emulated(), so that cpuid_func_emulated() can be used with a single CPUID entry. This will allow marking emulated features as fully supported in the guest cpu_caps without needing to hardcode the set of emulated features in multiple locations. No functional change intended. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-43-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit a7a308f863a1b82a2940ef4e8de0feef0a65403e Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:08 2024 -0800 KVM: x86: Initialize guest cpu_caps based on guest CPUID Initialize a vCPU's capabilities based on the guest CPUID provided by userspace instead of simply zeroing the entire array. This is the first step toward using cpu_caps to query *all* CPUID-based guest capabilities, i.e. will allow converting all usage of guest_cpuid_has() to guest_cpu_cap_has(). Zeroing the array was the logical choice when using cpu_caps was opt-in, e.g. "unsupported" was generally a safer default, and the whole point of governed features is that KVM would need to check host and guest support, i.e. making everything unsupported by default didn't require more code. But requiring KVM to manually "enable" every CPUID-based feature in cpu_caps would require an absurd amount of boilerplate code. Follow existing CPUID/kvm_cpu_caps nomenclature where possible, e.g. for the change() and clear() APIs. Replace check_and_set() with constrain() to try and capture that KVM is constraining userspace's desired guest feature set based on KVM's capabilities. This is intended to be gigantic nop, i.e. should not have any impact on guest or KVM functionality. This is also an intermediate step; a future commit will also incorporate KVM support into the vCPU's cpu_caps before converting guest_cpuid_has() to guest_cpu_cap_has(). Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-42-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 46 ++++++++++++++++++++++++++++++++++++++++++++-- arch/x86/kvm/cpuid.h | 24 +++++++++++++++++++++--- arch/x86/kvm/svm/svm.c | 28 +++++++++++++++------------- arch/x86/kvm/vmx/vmx.c | 8 +++++--- 4 files changed, 85 insertions(+), 21 deletions(-) commit 7ea34578aea728819a2832b6556035050e25fcb7 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:07 2024 -0800 KVM: x86: Replace guts of "governed" features with comprehensive cpu_caps Replace the internals of the governed features framework with a more comprehensive "guest CPU capabilities" implementation, i.e. with a guest version of kvm_cpu_caps. Keep the skeleton of governed features around for now as vmx_adjust_sec_exec_control() relies on detecting governed features to do the right thing for XSAVES, and switching all guest feature queries to guest_cpu_cap_has() requires subtle and non-trivial changes, i.e. is best done as a standalone change. Tracking *all* guest capabilities that KVM cares will allow excising the poorly named "governed features" framework, and effectively optimizes all KVM queries of guest capabilities, i.e. doesn't require making a subjective decision as to whether or not a feature is worth "governing", and doesn't require adding the code to do so. The cost of tracking all features is currently 92 bytes per vCPU on 64-bit kernels: 100 bytes for cpu_caps versus 8 bytes for governed_features. That cost is well worth paying even if the only benefit was eliminating the "governed features" terminology. And practically speaking, the real cost is zero unless those 92 bytes pushes the size of vcpu_vmx or vcpu_svm into a new order-N allocation, and if that happens there are better ways to reduce the footprint of kvm_vcpu_arch, e.g. making the PMU and/or MTRR state separate allocations. Suggested-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-41-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/include/asm/kvm_host.h | 46 +++++++++++++++++++++++++++-------------- arch/x86/kvm/cpuid.c | 14 ++++++++++--- arch/x86/kvm/cpuid.h | 10 ++++----- arch/x86/kvm/reverse_cpuid.h | 17 --------------- 4 files changed, 45 insertions(+), 42 deletions(-) commit 2c5e168e5ce154592667a8e384012117c917d790 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:06 2024 -0800 KVM: x86: Rename "governed features" helpers to use "guest_cpu_cap" As the first step toward replacing KVM's so-called "governed features" framework with a more comprehensive, less poorly named implementation, replace the "kvm_governed_feature" function prefix with "guest_cpu_cap" and rename guest_can_use() to guest_cpu_cap_has(). The "guest_cpu_cap" naming scheme mirrors that of "kvm_cpu_cap", and provides a more clear distinction between guest capabilities, which are KVM controlled (heh, or one might say "governed"), and guest CPUID, which with few exceptions is fully userspace controlled. Opportunistically rewrite the comment about XSS passthrough for SEV-ES guests to avoid referencing so many functions, as such comments are prone to becoming stale (case in point...). No functional change intended. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-40-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 2 +- arch/x86/kvm/cpuid.h | 16 ++++++++-------- arch/x86/kvm/mmu.h | 2 +- arch/x86/kvm/mmu/mmu.c | 4 ++-- arch/x86/kvm/svm/nested.c | 22 +++++++++++----------- arch/x86/kvm/svm/sev.c | 17 ++++++++--------- arch/x86/kvm/svm/svm.c | 26 +++++++++++++------------- arch/x86/kvm/svm/svm.h | 4 ++-- arch/x86/kvm/vmx/nested.c | 6 +++--- arch/x86/kvm/vmx/vmx.c | 16 ++++++++-------- arch/x86/kvm/x86.c | 4 ++-- 11 files changed, 59 insertions(+), 60 deletions(-) commit 9aa470f5ddb2aa8de152f72795b7dcd44a071b66 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:05 2024 -0800 KVM: x86: Advertise HYPERVISOR in KVM_GET_SUPPORTED_CPUID Unconditionally advertise "support" for the HYPERVISOR feature in CPUID, as the flag simply communicates to the guest that's it's running under a hypervisor. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-39-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9be4ec35d6687a5b5b472f36ffd627aace24f30e Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:04 2024 -0800 KVM: x86: Advertise TSC_DEADLINE_TIMER in KVM_GET_SUPPORTED_CPUID Unconditionally advertise TSC_DEADLINE_TIMER via KVM_GET_SUPPORTED_CPUID, as KVM always emulates deadline mode, *if* the VM has an in-kernel local APIC. The odds of a VMM emulating the local APIC in userspace, not emulating the TSC deadline timer, _and_ reflecting KVM_GET_SUPPORTED_CPUID back into KVM_SET_CPUID2, i.e. the risk of over-advertising and breaking any setups, is extremely low. KVM has _unconditionally_ advertised X2APIC via CPUID since commit 0d1de2d901f4 ("KVM: Always report x2apic as supported feature"), and it is completely impossible for userspace to emulate X2APIC as KVM doesn't support forwarding the MSR accesses to userspace. I.e. KVM has relied on userspace VMMs to not misreport local APIC capabilities for nearly 13 years. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-38-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> Documentation/virt/kvm/api.rst | 9 ++++++--- arch/x86/kvm/cpuid.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) commit 136d605b43657d577c5aa181554f119f4b5aa3c2 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:03 2024 -0800 KVM: x86: Remove all direct usage of cpuid_entry2_find() Convert all use of cpuid_entry2_find() to kvm_find_cpuid_entry{,index}() now that cpuid_entry2_find() operates on the vCPU state, i.e. now that there is no need to use cpuid_entry2_find() directly in order to pass in non-vCPU state. To help prevent unwanted usage of cpuid_entry2_find(), #undef KVM_CPUID_INDEX_NOT_SIGNIFICANT, i.e. force KVM to use kvm_find_cpuid_entry(). No functional change intended. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-37-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 8b30cb367c46a2aaf5426c8d48bfb91453b4e2d1 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:02 2024 -0800 KVM: x86: Move kvm_find_cpuid_entry{,_index}() up near cpuid_entry2_find() Move kvm_find_cpuid_entry{,_index}() "up" in cpuid.c so that they are colocated with cpuid_entry2_find(), e.g. to make it easier to see the effective guts of the helpers without having to bounce around cpuid.c. No functional change intended. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-36-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 285185f8e47973cb85e4e7e08994b341f73fb566 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:01 2024 -0800 KVM: x86: Always operate on kvm_vcpu data in cpuid_entry2_find() Now that KVM sets vcpu->arch.cpuid_{entries,nent} before processing the incoming CPUID entries during KVM_SET_CPUID{,2}, drop the @entries and @nent params from cpuid_entry2_find() and unconditionally operate on the vCPU state. No functional change intended. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-35-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 62 ++++++++++++++++++---------------------------------- 1 file changed, 21 insertions(+), 41 deletions(-) commit a5b32718081e5e2ddec1a1473a0e0f21bc35ed67 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:34:00 2024 -0800 KVM: x86: Remove unnecessary caching of KVM's PV CPUID base Now that KVM only searches for KVM's PV CPUID base when userspace sets guest CPUID, drop the cache and simply do the search every time. Practically speaking, this is a nop except for situations where userspace sets CPUID _after_ running the vCPU, which is anything but a hot path, e.g. QEMU does so only when hotplugging a vCPU. And on the flip side, caching guest CPUID information, especially information that is used to query/modify _other_ CPUID state, is inherently dangerous as it's all too easy to use stale information, i.e. KVM should only cache CPUID state when the performance and/or programming benefits justify it. Link: https://lore.kernel.org/r/20241128013424.4096668-34-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/include/asm/kvm_host.h | 1 - arch/x86/kvm/cpuid.c | 34 ++++++++-------------------------- 2 files changed, 8 insertions(+), 27 deletions(-) commit 63d8c702c2d41d070c84d97069a71ade808f8054 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:59 2024 -0800 KVM: x86: Clear PV_UNHALT for !HLT-exiting only when userspace sets CPUID Now that KVM disallows disabling HLT-exiting after vCPUs have been created, i.e. now that it's impossible for kvm_hlt_in_guest() to change while vCPUs are running, apply KVM's PV_UNHALT quirk only when userspace is setting guest CPUID. Opportunistically rename the helper to make it clear that KVM's behavior is a quirk that should never have been added. KVM's documentation explicitly states that userspace should not advertise PV_UNHALT if HLT-exiting is disabled, but for unknown reasons, commit caa057a2cad6 ("KVM: X86: Provide a capability to disable HLT intercepts") didn't stop at documenting the requirement and also massaged the incoming guest CPUID. Unfortunately, it's quite likely that userspace has come to rely on KVM's behavior, i.e. the code can't simply be deleted. The only reason KVM doesn't have an "official" quirk is that there is no known use case where disabling the quirk would make sense, i.e. letting userspace disable the quirk would further increase KVM's burden without any benefit. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-33-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit 8c01290bda1ab957c0b6d4640bdb351985a26123 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:58 2024 -0800 KVM: x86: Swap incoming guest CPUID into vCPU before massaging in KVM_SET_CPUID2 When handling KVM_SET_CPUID{,2}, swap the old and new CPUID arrays and lengths before processing the new CPUID, and simply undo the swap if setting the new CPUID fails for whatever reason. To keep the diff reasonable, continue passing the entry array and length to most helpers, and defer the more complete cleanup to future commits. For any sane VMM, setting "bad" CPUID state is not a hot path (or even something that is surviable), and setting guest CPUID before it's known good will allow removing all of KVM's infrastructure for processing CPUID entries directly (as opposed to operating on vcpu->arch.cpuid_entries). Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-32-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 54 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 22 deletions(-) commit 6174004ebd2508556204255757fd77fbc10009f9 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:57 2024 -0800 KVM: x86: Add a macro to init CPUID features that KVM emulates in software Now that kvm_cpu_cap_init() is a macro with its own scope, add EMUL_F() to OR-in features that KVM emulates in software, i.e. that don't depend on the feature being available in hardware. The contained scope of kvm_cpu_cap_init() allows using a local variable to track the set of emulated leaves, which in addition to avoiding confusing and/or unnecessary variables, helps prevent misuse of EMUL_F(). Link: https://lore.kernel.org/r/20241128013424.4096668-31-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 5c8de4b3a5bc4dc6a1a8afd46ff5d58beebb6356 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:56 2024 -0800 KVM: x86: Add a macro to init CPUID features that ignore host kernel support Add a macro for use in kvm_set_cpu_caps() to automagically initialize features that KVM wants to support based solely on the CPU's capabilities, e.g. KVM advertises LA57 support if it's available in hardware, even if the host kernel isn't utilizing 57-bit virtual addresses. Track a features that are passed through to userspace (from hardware) in a local variable, and simply OR them in *after* adjusting the capabilities that came from boot_cpu_data. Note, eliminating the open-coded call to cpuid_ecx() also fixes a largely benign bug where KVM could incorrectly report LA57 support on Intel CPUs whose max supported CPUID is less than 7, i.e. if the max supported leaf (<7) happened to have bit 16 set. In practice, barring a funky virtual machine setup, the bug is benign as all known CPUs that support VMX also support leaf 7. Link: https://lore.kernel.org/r/20241128013424.4096668-30-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 3d142340d717f5e246f65769bc1d211b62d03677 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:55 2024 -0800 KVM: x86: Harden CPU capabilities processing against out-of-scope features Add compile-time assertions to verify that usage of F() and friends in kvm_set_cpu_caps() is scoped to the correct CPUID word, e.g. to detect bugs where KVM passes a feature bit from word X into word y. Add a one-off assertion in the aliased feature macro to ensure that only word 0x8000_0001.EDX aliased the features defined for 0x1.EDX. To do so, convert kvm_cpu_cap_init() to a macro and have it define a local variable to track which CPUID word is being initialized that is then used to validate usage of F() (all of the inputs are compile-time constants and thus can be fed into BUILD_BUG_ON()). Redefine KVM_VALIDATE_CPU_CAP_USAGE after kvm_set_cpu_caps() to be a nop so that F() can be used in other flows that aren't as easily hardened, e.g. __do_cpuid_func_emulated() and __do_cpuid_func(). Invoke KVM_VALIDATE_CPU_CAP_USAGE() in SF() and X86_64_F() to ensure the validation occurs, e.g. if the usage of F() is completely compiled out (which shouldn't happen for boot_cpu_has(), but could happen in the future, e.g. if KVM were to use cpu_feature_enabled()). Link: https://lore.kernel.org/r/20241128013424.4096668-29-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 53 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 17 deletions(-) commit 8d862c270bf14cb3e63ca84a9a51be77c9fa4e2a Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:54 2024 -0800 KVM: x86: #undef SPEC_CTRL_SSBD in cpuid.c to avoid macro collisions Undefine SPEC_CTRL_SSBD, which is #defined by msr-index.h to represent the enable flag in MSR_IA32_SPEC_CTRL, to avoid issues with the macro being unpacked into its raw value when passed to KVM's F() macro. This will allow using multiple layers of macros in F() and friends, e.g. to harden against incorrect usage of F(). No functional change intended (cpuid.c doesn't consume SPEC_CTRL_SSBD). Link: https://lore.kernel.org/r/20241128013424.4096668-28-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 46505c0f69f99cc8cf0b50842a35a49200db5144 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:53 2024 -0800 KVM: x86: Handle kernel- and KVM-defined CPUID words in a single helper Merge kvm_cpu_cap_init() and kvm_cpu_cap_init_kvm_defined() into a single helper. The only advantage of separating the two was to make it somewhat obvious that KVM directly initializes the KVM-defined words, whereas using a common helper will allow for hardening both kernel- and KVM-defined CPUID words without needing copy+paste. No functional change intended. Link: https://lore.kernel.org/r/20241128013424.4096668-27-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 46 ++++++++++++++++------------------------------ 1 file changed, 16 insertions(+), 30 deletions(-) commit 264969b48a295e3fd89f01d3584a9f3cf6b47eb1 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:52 2024 -0800 KVM: x86: Add a macro to precisely handle aliased 0x1.EDX CPUID features Add a macro to precisely handle CPUID features that AMD duplicated from CPUID.0x1.EDX into CPUID.0x8000_0001.EDX. This will allow adding an assert that all features passed to kvm_cpu_cap_init() match the word being processed, e.g. to prevent passing a feature from CPUID 0x7 to CPUID 0x1. Because the kernel simply reuses the X86_FEATURE_* definitions from CPUID.0x1.EDX, KVM's use of the aliased features would result in false positives from such an assert. No functional change intended. Link: https://lore.kernel.org/r/20241128013424.4096668-26-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) commit 6eac4d99a9677a35947aa115bbc60266def40c3e Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:51 2024 -0800 KVM: x86: Add a macro to init CPUID features that are 64-bit only Add a macro to mask-in feature flags that are supported only on 64-bit kernels/KVM. In addition to reducing overall #ifdeffery, using a macro will allow hardening the kvm_cpu_cap initialization sequences to assert that the features being advertised are indeed included in the word being initialized. And arguably using *F() macros through is more readable. No functional change intended. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-25-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 3cc359ca29adadb94f4551b0cf40bb2352c28361 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:50 2024 -0800 KVM: x86: Rename kvm_cpu_cap_mask() to kvm_cpu_cap_init() Rename kvm_cpu_cap_mask() to kvm_cpu_cap_init() in anticipation of merging it with kvm_cpu_cap_init_kvm_defined(), and in anticipation of _setting_ bits in the helper (a future commit will play macro games to set emulated feature flags via kvm_cpu_cap_init()). No functional change intended. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-24-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit ccf93de484a33f8fe943734f3eed0f05004a48e9 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:49 2024 -0800 KVM: x86: Unpack F() CPUID feature flag macros to one flag per line of code Refactor kvm_set_cpu_caps() to express each supported (or not) feature flag on a separate line, modulo a handful of cases where KVM does not, and likely will not, support a sequence of flags. This will allow adding fancier macros with longer, more descriptive names without resulting in absurd line lengths and/or weird code. Isolating each flag also makes it far easier to review changes, reduces code conflicts, and generally makes it easier to resolve conflicts. Lastly, it allows co-locating comments for notable flags, e.g. MONITOR, precisely with the relevant flag. No functional change intended. Suggested-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-23-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 295 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 231 insertions(+), 64 deletions(-) commit 96cbc766baf05daf5dbcfd17c605d821f10170be Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:48 2024 -0800 KVM: x86: Account for max supported CPUID leaf when getting raw host CPUID Explicitly zero out the feature word in kvm_cpu_caps if the word's associated CPUID function is greater than the max leaf supported by the CPU. For such unsupported functions, Intel CPUs return the output from the last supported leaf, not all zeros. Practically speaking, this is likely a benign bug, as KVM uses the raw host CPUID to mask the kernel's computed capabilities, and the kernel does perform max leaf checks when populating boot_cpu_data. The only way KVM's goof could be problematic is if the kernel force-set a feature in a leaf that is completely unsupported, _and_ the max supported leaf happened to return a value with '1' the same bit position. Which is theoretically possible, but extremely unlikely. And even if that did happen, it's entirely possible that KVM would still provide the correct functionality; the kernel did set the capability after all. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-22-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) commit 6416b0fb1660eb8bb73dc35dd5beb844646cb603 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:47 2024 -0800 KVM: x86: Do reverse CPUID sanity checks in __feature_leaf() Do the compile-time sanity checks on reverse_cpuid in __feature_leaf() so that higher level APIs don't need to "manually" perform the sanity checks. No functional change intended. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-21-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.h | 3 --- arch/x86/kvm/reverse_cpuid.h | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) commit f21958e328a9e5813562bfb822e674833a3ca36b Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:46 2024 -0800 KVM: x86: Don't update PV features caches when enabling enforcement capability Revert the chunk of commit 01b4f510b9f4 ("kvm: x86: ensure pv_cpuid.features is initialized when enabling cap") that forced a PV features cache refresh during KVM_CAP_ENFORCE_PV_FEATURE_CPUID, as whatever ioctl() ordering issue it alleged to have fixed never existed upstream, and likely never existed in any kernel. At the time of the commit, there was a tangentially related ioctl() ordering issue, as toggling KVM_X86_DISABLE_EXITS_HLT after KVM_SET_CPUID2 would have resulted in KVM potentially leaving KVM_FEATURE_PV_UNHALT set. But (a) that bug affected the entire guest CPUID, not just the cache, (b) commit 01b4f510b9f4 didn't address that bug, it only refreshed the cache (with the bad CPUID), and (c) setting KVM_X86_DISABLE_EXITS_HLT after vCPU creation is completely broken as KVM configures HLT-exiting only during vCPU creation, which is why KVM_CAP_X86_DISABLE_EXITS is now disallowed if vCPUs have been created. Another tangentially related bug was KVM's failure to clear the cache when handling KVM_SET_CPUID2, but again commit 01b4f510b9f4 did nothing to fix that bug. The most plausible explanation for the what commit 01b4f510b9f4 was trying to fix is a bug that existed in Google's internal kernel that was the source of commit 01b4f510b9f4. At the time, Google's internal kernel had not yet picked up commit 0d3b2ba16ba68 ("KVM: X86: Go on updating other CPUID leaves when leaf 1 is absent"), i.e. KVM would not initialize the PV features cache if KVM_SET_CPUID2 was called without a CPUID.0x1 entry. Of course, no sane real world VMM would omit CPUID.0x1, including the KVM selftest added by commit ac4a4d6de22e ("selftests: kvm: test enforcement of paravirtual cpuid features"). And the test didn't actually try to verify multiple orderings, nor did the selftest enter the guest without doing KVM_SET_CPUID2, so who knows what motivated the change. Regardless of why commit 01b4f510b9f4 ("kvm: x86: ensure pv_cpuid.features is initialized when enabling cap") was added, refreshing the cache during KVM_CAP_ENFORCE_PV_FEATURE_CPUID isn't necessary. Cc: Oliver Upton <oliver.upton@linux.dev> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-20-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 2 +- arch/x86/kvm/cpuid.h | 1 - arch/x86/kvm/x86.c | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-) commit 01d1059d635a101a21f145284e8023b0ffa5f7ed Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:45 2024 -0800 KVM: x86: Zero out PV features cache when the CPUID leaf is not present Clear KVM's PV feature cache prior when processing a new guest CPUID so that KVM doesn't keep a stale cache entry if userspace does KVM_SET_CPUID2 multiple times, once with a PV features entry, and a second time without. Fixes: 66570e966dd9 ("kvm: x86: only provide PV features if enabled in guest's CPUID") Cc: Oliver Upton <oliver.upton@linux.dev> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-19-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 2 ++ 1 file changed, 2 insertions(+) commit 59cb3acdb316130c7247a3d3a20d7d6e75e2896a Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:44 2024 -0800 KVM: selftests: Update x86's KVM PV test to match KVM's disabling exits behavior Rework x86's KVM PV features test to align with KVM's new, fixed behavior of not allowing userspace to disable HLT-exiting after vCPUs have been created. Rework the core testcase to disable HLT-exiting before creating a vCPU, and opportunistically modify keep the paired VM+vCPU creation to verify that KVM rejects KVM_CAP_X86_DISABLE_EXITS as expected. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-18-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/x86/kvm_pv_test.c | 33 ++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) commit 7b2658cb33c744ca41358ada2421a86774914764 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:43 2024 -0800 KVM: selftests: Fix a bad TEST_REQUIRE() in x86's KVM PV test Actually check for KVM support for disabling HLT-exiting instead of effectively checking that KVM_CAP_X86_DISABLE_EXITS is #defined to a non-zero value, and convert the TEST_REQUIRE() to a simple return so that only the sub-test is skipped if HLT-exiting is mandatory. The goof has likely gone unnoticed because all x86 CPUs support disabling HLT-exiting, only systems with the opt-in mitigate_smt_rsb KVM module param disallow HLT-exiting. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-17-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/x86/kvm_pv_test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit af5366bea2cb9dfb5da2880e1dff544f87505300 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:42 2024 -0800 KVM: x86: Drop the now unused KVM_X86_DISABLE_VALID_EXITS Drop the KVM_X86_DISABLE_VALID_EXITS definition, as it is misleading, and unused in KVM *because* it is misleading. The set of exits that can be disabled is dynamic, i.e. userspace (and KVM) must check KVM's actual capabilities. Suggested-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-16-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> include/uapi/linux/kvm.h | 4 ---- 1 file changed, 4 deletions(-) commit c829ccd4d9dc4a892e7c9ae032b87ac90ace2252 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:41 2024 -0800 KVM: x86: Reject disabling of MWAIT/HLT interception when not allowed Reject KVM_CAP_X86_DISABLE_EXITS if userspace attempts to disable MWAIT or HLT exits and KVM previously reported (via KVM_CHECK_EXTENSION) that disabling the exit(s) is not allowed. E.g. because MWAIT isn't supported or the CPU doesn't have an always-running APIC timer, or because KVM is configured to mitigate cross-thread vulnerabilities. Cc: Kechen Lu <kechenl@nvidia.com> Fixes: 4d5422cea3b6 ("KVM: X86: Provide a capability to disable MWAIT intercepts") Fixes: 6f0f2d5ef895 ("KVM: x86: Mitigate the cross-thread return address predictions bug") Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-15-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/x86.c | 54 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) commit 04cd8f8628d88da7839b1643db0bef8522c39254 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:40 2024 -0800 KVM: x86: Disallow KVM_CAP_X86_DISABLE_EXITS after vCPU creation Reject KVM_CAP_X86_DISABLE_EXITS if vCPUs have been created, as disabling PAUSE/MWAIT/HLT exits after vCPUs have been created is broken and useless, e.g. except for PAUSE on SVM, the relevant intercepts aren't updated after vCPU creation. vCPUs may also end up with an inconsistent configuration if exits are disabled between creation of multiple vCPUs. Cc: Hou Wenlong <houwenlong.hwl@antgroup.com> Link: https://lore.kernel.org/all/9227068821b275ac547eb2ede09ec65d2281fe07.1680179693.git.houwenlong.hwl@antgroup.com Link: https://lore.kernel.org/all/20230121020738.2973-2-kechenl@nvidia.com Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-14-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> Documentation/virt/kvm/api.rst | 1 + arch/x86/kvm/x86.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 21d7f06d1a8364a57432ccc1e6167c73c043b913 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:39 2024 -0800 KVM: x86: Drop now-redundant MAXPHYADDR and GPA rsvd bits from vCPU creation Drop the manual initialization of maxphyaddr and reserved_gpa_bits during vCPU creation now that kvm_arch_vcpu_create() unconditionally invokes kvm_vcpu_after_set_cpuid(), which handles all such CPUID caching. None of the helpers between the existing code in kvm_arch_vcpu_create() and the call to kvm_vcpu_after_set_cpuid() consume maxphyaddr or reserved_gpa_bits (though auditing vmx_vcpu_create() and svm_vcpu_create() isn't exactly easy). Link: https://lore.kernel.org/r/20241128013424.4096668-13-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/x86.c | 3 --- 1 file changed, 3 deletions(-) commit ac32cbd4dfc642b0bb8a10dd998246c86f19e326 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:38 2024 -0800 KVM: x86/pmu: Drop now-redundant refresh() during init() Drop the manual kvm_pmu_refresh() from kvm_pmu_init() now that kvm_arch_vcpu_create() performs the refresh via kvm_vcpu_after_set_cpuid(). Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-12-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/pmu.c | 1 - 1 file changed, 1 deletion(-) commit b0c3d6871778ea28b22761134fb399926782a1a6 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:37 2024 -0800 KVM: x86: Move __kvm_is_valid_cr4() definition to x86.h Let vendor code inline __kvm_is_valid_cr4() now x86.c's cr4_reserved_bits no longer exists, as keeping cr4_reserved_bits local to x86.c was the only reason for "hiding" the definition of __kvm_is_valid_cr4(). No functional change intended. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-11-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/x86.c | 9 --------- arch/x86/kvm/x86.h | 6 +++++- 2 files changed, 5 insertions(+), 10 deletions(-) commit 01bcd829c63fdde92d9d6c32b2ed3ba34ead0930 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:36 2024 -0800 KVM: selftests: Verify KVM stuffs runtime CPUID OS bits on CR4 writes Extend x86's set sregs test to verify that KVM sets/clears OSXSAVE and OSKPKE according to CR4.XSAVE and CR4.PKE respectively. For performance reasons, KVM is responsible for emulating the architectural behavior of the OS CPUID bits tracking CR4. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-10-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/x86/set_sregs_test.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a2a791e8208623b1575f21c7ec559df095c0a96e Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:35 2024 -0800 KVM: selftests: Refresh vCPU CPUID cache in __vcpu_get_cpuid_entry() Refresh selftests' CPUID cache in the vCPU structure when querying a CPUID entry so that tests don't consume stale data when KVM modifies CPUID as a side effect to a completely unrelated change. E.g. KVM adjusts OSXSAVE in response to CR4.OSXSAVE changes. Unnecessarily invoking KVM_GET_CPUID is suboptimal, but vcpu->cpuid exists to simplify selftests development, not for performance reasons. And, unfortunately, trying to handle the side effects in tests or other flows is unpleasant, e.g. selftests could manually refresh if KVM_SET_SREGS is successful, but that would still leave a gap with respect to guest CR4 changes. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-9-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/include/x86/processor.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 08833719e77041e331f6193878f1b944744b9068 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:34 2024 -0800 KVM: selftests: Assert that vcpu->cpuid is non-NULL when getting CPUID entries Add a sanity check in __vcpu_get_cpuid_entry() to provide a friendlier error than a segfault when a test developer tries to use a vCPU CPUID helper on a barebones vCPU. Link: https://lore.kernel.org/r/20241128013424.4096668-8-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/include/x86/processor.h | 2 ++ 1 file changed, 2 insertions(+) commit bf4dfc3aa875c082dd70b979417f0729a35969a0 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:33 2024 -0800 KVM: selftests: Update x86's set_sregs_test to match KVM's CPUID enforcement Rework x86's set sregs test to verify that KVM enforces CPUID vs. CR4 features even if userspace hasn't explicitly set guest CPUID. KVM used to allow userspace to set any KVM-supported CR4 value prior to KVM_SET_CPUID2, and the test verified that behavior. However, the testcase was written purely to verify KVM's existing behavior, i.e. was NOT written to match the needs of real world VMMs. Opportunistically verify that KVM continues to reject unsupported features after KVM_SET_CPUID2 (using KVM_GET_SUPPORTED_CPUID). Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-7-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/x86/set_sregs_test.c | 53 ++++++++++++++---------- 1 file changed, 30 insertions(+), 23 deletions(-) commit 7520a53b8e0a53de4fb35557e712b0b4b6bc1e4d Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:32 2024 -0800 KVM: x86: Account for KVM-reserved CR4 bits when passing through CR4 on VMX Drop x86.c's local pre-computed cr4_reserved bits and instead fold KVM's reserved bits into the guest's reserved bits. This fixes a bug where VMX's set_cr4_guest_host_mask() fails to account for KVM-reserved bits when deciding which bits can be passed through to the guest. In most cases, letting the guest directly write reserved CR4 bits is ok, i.e. attempting to set the bit(s) will still #GP, but not if a feature is available in hardware but explicitly disabled by the host, e.g. if FSGSBASE support is disabled via "nofsgsbase". Note, the extra overhead of computing host reserved bits every time userspace sets guest CPUID is negligible. The feature bits that are queried are packed nicely into a handful of words, and so checking and setting each reserved bit costs in the neighborhood of ~5 cycles, i.e. the total cost will be in the noise even if the number of checked CR4 bits doubles over the next few years. In other words, x86 will run out of CR4 bits long before the overhead becomes problematic. Note #2, __cr4_reserved_bits() starts from CR4_RESERVED_BITS, which is why the existing __kvm_cpu_cap_has() processing doesn't explicitly OR in CR4_RESERVED_BITS (and why the new code doesn't do so either). Fixes: 2ed41aa631fc ("KVM: VMX: Intercept guest reserved CR4 bits to inject #GP fault") Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Chao Gao <chao.gao@intel.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20241128013424.4096668-6-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 7 +++++-- arch/x86/kvm/x86.c | 9 --------- 2 files changed, 5 insertions(+), 11 deletions(-) commit ec3d4440b2c8c3f617252a5b9a65a5d81c6a34cb Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:31 2024 -0800 KVM: x86: Explicitly do runtime CPUID updates "after" initial setup Explicitly perform runtime CPUID adjustments as part of the "after set CPUID" flow to guard against bugs where KVM consumes stale vCPU/CPUID state during kvm_update_cpuid_runtime(). E.g. see commit 4736d85f0d18 ("KVM: x86: Use actual kvm_cpuid.base for clearing KVM_FEATURE_PV_UNHALT"). Whacking each mole individually is not sustainable or robust, e.g. while the aforemention commit fixed KVM's PV features, the same issue lurks for Xen and Hyper-V features, Xen and Hyper-V simply don't have any runtime features (though spoiler alert, neither should KVM). Updating runtime features in the "full" path will also simplify adding a snapshot of the guest's capabilities, i.e. of caching the intersection of guest CPUID and kvm_cpu_caps (modulo a few edge cases). Link: https://lore.kernel.org/r/20241128013424.4096668-5-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 85e5ba83c01641c22569a3cc3cf57761ebef1f5d Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:30 2024 -0800 KVM: x86: Do all post-set CPUID processing during vCPU creation During vCPU creation, process KVM's default, empty CPUID as if userspace set an empty CPUID to ensure consistent and correct behavior with respect to guest CPUID. E.g. if userspace never sets guest CPUID, KVM will never configure cr4_guest_rsvd_bits, and thus create divergent, incorrect, guest- visible behavior due to letting the guest set any KVM-supported CR4 bits despite the features not being allowed per guest CPUID. Note! This changes KVM's ABI, as lack of full CPUID processing allowed userspace to stuff garbage vCPU state, e.g. userspace could set CR4 to a guest-unsupported value via KVM_SET_SREGS. But it's extremely unlikely that this is a breaking change, as KVM already has many flows that require userspace to set guest CPUID before loading vCPU state. E.g. multiple MSR flows consult guest CPUID on host writes, and KVM_SET_SREGS itself already relies on guest CPUID being up-to-date, as KVM's validity check on CR3 consumes CPUID.0x7.1 (for LAM) and CPUID.0x80000008 (for MAXPHYADDR). Furthermore, the plan is to commit to enforcing guest CPUID for userspace writes to MSRs, at which point bypassing sregs CPUID checks is even more nonsensical. Link: https://lore.kernel.org/r/20241128013424.4096668-4-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 2 +- arch/x86/kvm/cpuid.h | 1 + arch/x86/kvm/x86.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 4b027f5af907f8413a448939a99361532e1089ae Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:29 2024 -0800 KVM: x86: Limit use of F() and SF() to kvm_cpu_cap_{mask,init_kvm_defined}() Define and undefine the F() and SF() macros precisely around kvm_set_cpu_caps() to make it all but impossible to use the macros outside of kvm_cpu_cap_{mask,init_kvm_defined}(). Currently, F() is a simple passthrough, but SF() is actively dangerous as it checks that the scattered feature is supported by the host kernel. And usage outside of the aforementioned helpers will run afoul of future changes to harden KVM's CPUID management. Opportunistically switch to feature_bit() when stuffing LA57 based on raw hardware support. No functional change intended. Link: https://lore.kernel.org/r/20241128013424.4096668-3-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit ccf4c1d15d5a593bb3a50911ce3e8bb373feddc5 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 17:33:28 2024 -0800 KVM: x86: Use feature_bit() to clear CONSTANT_TSC when emulating CPUID When clearing CONSTANT_TSC during CPUID emulation due to a Hyper-V quirk, use feature_bit() instead of SF() to ensure the bit is actually cleared. SF() evaluates to zero if the _host_ doesn't support the feature. I.e. KVM could keep the bit set if userspace advertised CONSTANT_TSC despite it not being supported in hardware. Note, translating from a scattered feature to a the hardware version is done by __feature_translate(), not SF(). The sole purpose of SF() is to check kernel support for the scattered feature, *before* translation. Cc: Vitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com> Link: https://lore.kernel.org/r/20241128013424.4096668-2-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9af04539d474dda4984ff4909d4568e6123c8cba Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:47 2024 -0800 KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR Now that KVM selftests uses the kernel's canonical arch paths, directly override ARCH to 'x86' when targeting x86_64 instead of defining ARCH_DIR to redirect to appropriate paths. ARCH_DIR was originally added to deal with KVM selftests using the target triple ARCH for directories, e.g. s390x and aarch64; keeping it around just to deal with the one-off alias from x86_64=>x86 is unnecessary and confusing. Note, even when selftests are built from the top-level Makefile, ARCH is scoped to KVM's makefiles, i.e. overriding ARCH won't trip up some other selftests that (somehow) expects x86_64 and can't work with x86. Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Link: https://lore.kernel.org/r/20241128005547.4077116-17-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/Makefile | 4 +--- tools/testing/selftests/kvm/Makefile.kvm | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-) commit 67730e6c53d70fb31618230f81c4acee9f72eaa3 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:46 2024 -0800 KVM: selftests: Use canonical $(ARCH) paths for KVM selftests directories Use the kernel's canonical $(ARCH) paths instead of the raw target triple for KVM selftests directories. KVM selftests are quite nearly the only place in the entire kernel that using the target triple for directories, tools/testing/selftests/drivers/s390x being the lone holdout. Using the kernel's preferred nomenclature eliminates the minor, but annoying, friction of having to translate to KVM's selftests directories, e.g. for pattern matching, opening files, running selftests, etc. Opportunsitically delete file comments that reference the full path of the file, as they are obviously prone to becoming stale, and serve no known purpose. Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Acked-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Acked-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241128005547.4077116-16-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> MAINTAINERS | 12 +- tools/testing/selftests/kvm/Makefile | 10 +- tools/testing/selftests/kvm/Makefile.kvm | 328 ++++++++++----------- .../kvm/{aarch64 => arm64}/aarch32_id_regs.c | 0 .../selftests/kvm/{aarch64 => arm64}/arch_timer.c | 0 .../kvm/{aarch64 => arm64}/arch_timer_edge_cases.c | 0 .../kvm/{aarch64 => arm64}/debug-exceptions.c | 0 .../kvm/{aarch64 => arm64}/get-reg-list.c | 0 .../selftests/kvm/{aarch64 => arm64}/hypercalls.c | 0 .../selftests/kvm/{aarch64 => arm64}/mmio_abort.c | 0 .../selftests/kvm/{aarch64 => arm64}/no-vgic-v3.c | 0 .../kvm/{aarch64 => arm64}/page_fault_test.c | 0 .../selftests/kvm/{aarch64 => arm64}/psci_test.c | 0 .../selftests/kvm/{aarch64 => arm64}/set_id_regs.c | 0 .../kvm/{aarch64 => arm64}/smccc_filter.c | 0 .../kvm/{aarch64 => arm64}/vcpu_width_config.c | 0 .../selftests/kvm/{aarch64 => arm64}/vgic_init.c | 0 .../selftests/kvm/{aarch64 => arm64}/vgic_irq.c | 0 .../kvm/{aarch64 => arm64}/vgic_lpi_stress.c | 0 .../kvm/{aarch64 => arm64}/vpmu_counter_access.c | 0 tools/testing/selftests/kvm/dirty_log_perf_test.c | 2 +- .../kvm/include/{aarch64 => arm64}/arch_timer.h | 0 .../kvm/include/{aarch64 => arm64}/delay.h | 0 .../selftests/kvm/include/{aarch64 => arm64}/gic.h | 0 .../kvm/include/{aarch64 => arm64}/gic_v3.h | 0 .../kvm/include/{aarch64 => arm64}/gic_v3_its.h | 0 .../kvm/include/{aarch64 => arm64}/kvm_util_arch.h | 0 .../kvm/include/{aarch64 => arm64}/processor.h | 0 .../kvm/include/{aarch64 => arm64}/spinlock.h | 0 .../kvm/include/{aarch64 => arm64}/ucall.h | 0 .../kvm/include/{aarch64 => arm64}/vgic.h | 0 .../kvm/include/{s390x => s390}/debug_print.h | 0 .../include/{s390x => s390}/diag318_test_handler.h | 0 .../kvm/include/{s390x => s390}/facility.h | 0 .../kvm/include/{s390x => s390}/kvm_util_arch.h | 0 .../kvm/include/{s390x => s390}/processor.h | 0 .../selftests/kvm/include/{s390x => s390}/sie.h | 0 .../selftests/kvm/include/{s390x => s390}/ucall.h | 0 .../selftests/kvm/include/{x86_64 => x86}/apic.h | 2 - .../selftests/kvm/include/{x86_64 => x86}/evmcs.h | 3 - .../selftests/kvm/include/{x86_64 => x86}/hyperv.h | 3 - .../kvm/include/{x86_64 => x86}/kvm_util_arch.h | 0 .../selftests/kvm/include/{x86_64 => x86}/mce.h | 2 - .../selftests/kvm/include/{x86_64 => x86}/pmu.h | 0 .../kvm/include/{x86_64 => x86}/processor.h | 2 - .../selftests/kvm/include/{x86_64 => x86}/sev.h | 0 .../selftests/kvm/include/{x86_64 => x86}/svm.h | 6 - .../kvm/include/{x86_64 => x86}/svm_util.h | 3 - .../selftests/kvm/include/{x86_64 => x86}/ucall.h | 0 .../selftests/kvm/include/{x86_64 => x86}/vmx.h | 2 - .../selftests/kvm/lib/{aarch64 => arm64}/gic.c | 0 .../kvm/lib/{aarch64 => arm64}/gic_private.h | 0 .../selftests/kvm/lib/{aarch64 => arm64}/gic_v3.c | 0 .../kvm/lib/{aarch64 => arm64}/gic_v3_its.c | 0 .../kvm/lib/{aarch64 => arm64}/handlers.S | 0 .../kvm/lib/{aarch64 => arm64}/processor.c | 0 .../kvm/lib/{aarch64 => arm64}/spinlock.c | 0 .../selftests/kvm/lib/{aarch64 => arm64}/ucall.c | 0 .../selftests/kvm/lib/{aarch64 => arm64}/vgic.c | 0 .../kvm/lib/{s390x => s390}/diag318_test_handler.c | 0 .../selftests/kvm/lib/{s390x => s390}/facility.c | 0 .../selftests/kvm/lib/{s390x => s390}/processor.c | 0 .../selftests/kvm/lib/{s390x => s390}/ucall.c | 0 .../selftests/kvm/lib/{x86_64 => x86}/apic.c | 0 .../selftests/kvm/lib/{x86_64 => x86}/handlers.S | 0 .../selftests/kvm/lib/{x86_64 => x86}/hyperv.c | 0 .../selftests/kvm/lib/{x86_64 => x86}/memstress.c | 2 +- .../selftests/kvm/lib/{x86_64 => x86}/pmu.c | 0 .../selftests/kvm/lib/{x86_64 => x86}/processor.c | 2 - .../selftests/kvm/lib/{x86_64 => x86}/sev.c | 0 .../selftests/kvm/lib/{x86_64 => x86}/svm.c | 1 - .../selftests/kvm/lib/{x86_64 => x86}/ucall.c | 0 .../selftests/kvm/lib/{x86_64 => x86}/vmx.c | 2 - .../selftests/kvm/{s390x => s390}/cmma_test.c | 0 tools/testing/selftests/kvm/{s390x => s390}/config | 0 .../kvm/{s390x => s390}/cpumodel_subfuncs_test.c | 0 .../selftests/kvm/{s390x => s390}/debug_test.c | 0 .../testing/selftests/kvm/{s390x => s390}/memop.c | 0 .../testing/selftests/kvm/{s390x => s390}/resets.c | 0 .../kvm/{s390x => s390}/shared_zeropage_test.c | 0 .../selftests/kvm/{s390x => s390}/sync_regs_test.c | 0 .../testing/selftests/kvm/{s390x => s390}/tprot.c | 0 .../selftests/kvm/{s390x => s390}/ucontrol_test.c | 0 .../testing/selftests/kvm/set_memory_region_test.c | 6 +- .../selftests/kvm/{x86_64 => x86}/amx_test.c | 0 .../kvm/{x86_64 => x86}/apic_bus_clock_test.c | 0 .../selftests/kvm/{x86_64 => x86}/cpuid_test.c | 0 .../kvm/{x86_64 => x86}/cr4_cpuid_sync_test.c | 0 .../selftests/kvm/{x86_64 => x86}/debug_regs.c | 0 .../dirty_log_page_splitting_test.c | 0 .../exit_on_emulation_failure_test.c | 0 .../kvm/{x86_64 => x86}/feature_msrs_test.c | 0 .../kvm/{x86_64 => x86}/fix_hypercall_test.c | 0 .../selftests/kvm/{x86_64 => x86}/flds_emulation.h | 0 .../selftests/kvm/{x86_64 => x86}/hwcr_msr_test.c | 0 .../selftests/kvm/{x86_64 => x86}/hyperv_clock.c | 0 .../selftests/kvm/{x86_64 => x86}/hyperv_cpuid.c | 0 .../selftests/kvm/{x86_64 => x86}/hyperv_evmcs.c | 0 .../{x86_64 => x86}/hyperv_extended_hypercalls.c | 0 .../kvm/{x86_64 => x86}/hyperv_features.c | 0 .../selftests/kvm/{x86_64 => x86}/hyperv_ipi.c | 0 .../kvm/{x86_64 => x86}/hyperv_svm_test.c | 0 .../kvm/{x86_64 => x86}/hyperv_tlb_flush.c | 0 .../selftests/kvm/{x86_64 => x86}/kvm_clock_test.c | 0 .../selftests/kvm/{x86_64 => x86}/kvm_pv_test.c | 0 .../kvm/{x86_64 => x86}/max_vcpuid_cap_test.c | 0 .../kvm/{x86_64 => x86}/monitor_mwait_test.c | 0 .../kvm/{x86_64 => x86}/nested_exceptions_test.c | 0 .../kvm/{x86_64 => x86}/nx_huge_pages_test.c | 0 .../kvm/{x86_64 => x86}/nx_huge_pages_test.sh | 0 .../kvm/{x86_64 => x86}/platform_info_test.c | 0 .../kvm/{x86_64 => x86}/pmu_counters_test.c | 0 .../kvm/{x86_64 => x86}/pmu_event_filter_test.c | 0 .../{x86_64 => x86}/private_mem_conversions_test.c | 0 .../{x86_64 => x86}/private_mem_kvm_exits_test.c | 0 .../kvm/{x86_64 => x86}/recalc_apic_map_test.c | 0 .../kvm/{x86_64 => x86}/set_boot_cpu_id.c | 0 .../selftests/kvm/{x86_64 => x86}/set_sregs_test.c | 0 .../kvm/{x86_64 => x86}/sev_init2_tests.c | 0 .../kvm/{x86_64 => x86}/sev_migrate_tests.c | 0 .../selftests/kvm/{x86_64 => x86}/sev_smoke_test.c | 0 .../smaller_maxphyaddr_emulation_test.c | 0 .../selftests/kvm/{x86_64 => x86}/smm_test.c | 0 .../selftests/kvm/{x86_64 => x86}/state_test.c | 0 .../kvm/{x86_64 => x86}/svm_int_ctl_test.c | 0 .../kvm/{x86_64 => x86}/svm_nested_shutdown_test.c | 0 .../{x86_64 => x86}/svm_nested_soft_inject_test.c | 0 .../kvm/{x86_64 => x86}/svm_vmcall_test.c | 0 .../selftests/kvm/{x86_64 => x86}/sync_regs_test.c | 0 .../kvm/{x86_64 => x86}/triple_fault_event_test.c | 0 .../selftests/kvm/{x86_64 => x86}/tsc_msrs_test.c | 0 .../kvm/{x86_64 => x86}/tsc_scaling_sync.c | 0 .../kvm/{x86_64 => x86}/ucna_injection_test.c | 0 .../kvm/{x86_64 => x86}/userspace_io_test.c | 0 .../kvm/{x86_64 => x86}/userspace_msr_exit_test.c | 0 .../kvm/{x86_64 => x86}/vmx_apic_access_test.c | 0 .../{x86_64 => x86}/vmx_close_while_nested_test.c | 0 .../kvm/{x86_64 => x86}/vmx_dirty_log_test.c | 0 .../vmx_exception_with_invalid_guest_state.c | 0 .../vmx_invalid_nested_guest_state.c | 0 .../selftests/kvm/{x86_64 => x86}/vmx_msrs_test.c | 0 .../{x86_64 => x86}/vmx_nested_tsc_scaling_test.c | 0 .../kvm/{x86_64 => x86}/vmx_pmu_caps_test.c | 0 .../{x86_64 => x86}/vmx_preemption_timer_test.c | 0 .../{x86_64 => x86}/vmx_set_nested_state_test.c | 0 .../kvm/{x86_64 => x86}/vmx_tsc_adjust_test.c | 0 .../selftests/kvm/{x86_64 => x86}/xapic_ipi_test.c | 0 .../kvm/{x86_64 => x86}/xapic_state_test.c | 0 .../kvm/{x86_64 => x86}/xcr0_cpuid_test.c | 0 .../kvm/{x86_64 => x86}/xen_shinfo_test.c | 0 .../kvm/{x86_64 => x86}/xen_vmcall_test.c | 0 .../selftests/kvm/{x86_64 => x86}/xss_msr_test.c | 0 152 files changed, 176 insertions(+), 212 deletions(-) commit 43fbd8cd389faa9760c5152b1c58e893c812953b Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:45 2024 -0800 KVM: selftests: Provide empty 'all' and 'clean' targets for unsupported ARCHs Provide empty targets for KVM selftests if the target architecture is unsupported to make it obvious which architectures are supported, and so that various side effects don't fail and/or do weird things, e.g. as is, "mkdir -p $(sort $(dir $(TEST_GEN_PROGS)))" fails due to a missing operand, and conversely, "$(shell mkdir -p $(sort $(OUTPUT)/$(ARCH_DIR) ..." will create an empty, useless directory for the unsupported architecture. Move the guts of the Makefile to Makefile.kvm so that it's easier to see that the if-statement effectively guards all of KVM selftests. Reported-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Acked-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Acked-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241128005547.4077116-15-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/.gitignore | 1 + tools/testing/selftests/kvm/Makefile | 336 +------------------------------ tools/testing/selftests/kvm/Makefile.kvm | 334 ++++++++++++++++++++++++++++++ 3 files changed, 340 insertions(+), 331 deletions(-) commit b6c304aec6483f6cd254df690eda35b225cd856c Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:44 2024 -0800 KVM: selftests: Verify KVM correctly handles mprotect(PROT_READ) Add two phases to mmu_stress_test to verify that KVM correctly handles guest memory that was writable, and then made read-only in the primary MMU, and then made writable again. Add bonus coverage for x86 and arm64 to verify that all of guest memory was marked read-only. Making forward progress (without making memory writable) requires arch specific code to skip over the faulting instruction, but the test can at least verify each vCPU's starting page was made read-only for other architectures. Link: https://lore.kernel.org/r/20241128005547.4077116-14-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/mmu_stress_test.c | 104 +++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 3 deletions(-) commit 80b7859a3a43ff8bb924947a03b144626aeb1d0c Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:43 2024 -0800 KVM: selftests: Add a read-only mprotect() phase to mmu_stress_test Add a third phase of mmu_stress_test to verify that mprotect()ing guest memory to make it read-only doesn't cause explosions, e.g. to verify KVM correctly handles the resulting mmu_notifier invalidations. Reviewed-by: James Houghton <jthoughton@google.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241128005547.4077116-13-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/mmu_stress_test.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 82b542e1184884885fe2b4aabd47672540db02c7 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:42 2024 -0800 KVM: selftests: Precisely limit the number of guest loops in mmu_stress_test Run the exact number of guest loops required in mmu_stress_test instead of looping indefinitely in anticipation of adding more stages that run different code (e.g. reads instead of writes). Reviewed-by: James Houghton <jthoughton@google.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241128005547.4077116-12-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/mmu_stress_test.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 3a042252640450fd288c56953bf21583d5198fba Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:41 2024 -0800 KVM: selftests: Use vcpu_arch_put_guest() in mmu_stress_test Use vcpu_arch_put_guest() to write memory from the guest in mmu_stress_test as an easy way to provide a bit of extra coverage. Reviewed-by: James Houghton <jthoughton@google.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241128005547.4077116-11-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/mmu_stress_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8abe7632a1eebdfac2c553a21b4f980db416c166 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:40 2024 -0800 KVM: selftests: Enable mmu_stress_test on arm64 Enable the mmu_stress_test on arm64. The intent was to enable the test across all architectures when it was first added, but a few goofs made it unrunnable on !x86. Now that those goofs are fixed, at least for arm64, enable the test. Cc: Oliver Upton <oliver.upton@linux.dev> Cc: Marc Zyngier <maz@kernel.org> Reviewed-by: James Houghton <jthoughton@google.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241128005547.4077116-10-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/Makefile | 1 + 1 file changed, 1 insertion(+) commit c35d8f579e50328f539bc049cc057f2158bb8e60 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:39 2024 -0800 KVM: sefltests: Explicitly include ucall_common.h in mmu_stress_test.c Explicitly include ucall_common.h in the MMU stress test, as unlike arm64 and x86-64, RISC-V doesn't include ucall_common.h in its processor.h, i.e. this will allow enabling the test on RISC-V. Reported-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241128005547.4077116-9-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/mmu_stress_test.c | 1 + 1 file changed, 1 insertion(+) commit 1ddd3ea75ac3be79dbd800507dd7e08928bd454d Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:38 2024 -0800 KVM: selftests: Compute number of extra pages needed in mmu_stress_test Create mmu_stress_tests's VM with the correct number of extra pages needed to map all of memory in the guest. The bug hasn't been noticed before as the test currently runs only on x86, which maps guest memory with 1GiB pages, i.e. doesn't need much memory in the guest for page tables. Reviewed-by: James Houghton <jthoughton@google.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241128005547.4077116-8-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/mmu_stress_test.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 55e164df482a48e168b26994197c2a848aae5959 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:37 2024 -0800 KVM: selftests: Only muck with SREGS on x86 in mmu_stress_test Try to get/set SREGS in mmu_stress_test only when running on x86, as the ioctls are supported only by x86 and PPC, and the latter doesn't yet support KVM selftests. Reviewed-by: James Houghton <jthoughton@google.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241128005547.4077116-7-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/mmu_stress_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b12391498d1e7ee49390cda34df4a5cc21700e9f Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:36 2024 -0800 KVM: selftests: Rename max_guest_memory_test to mmu_stress_test Rename max_guest_memory_test to mmu_stress_test so that the name isn't horribly misleading when future changes extend the test to verify things like mprotect() interactions, and because the test is useful even when its configured to populate far less than the maximum amount of guest memory. Reviewed-by: James Houghton <jthoughton@google.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241128005547.4077116-6-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/Makefile | 2 +- .../selftests/kvm/{max_guest_memory_test.c => mmu_stress_test.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) commit d6533c15133867cd3032bcab7f839ae5d53d0e70 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:35 2024 -0800 KVM: selftests: Check for a potential unhandled exception iff KVM_RUN succeeded Don't check for an unhandled exception if KVM_RUN failed, e.g. if it returned errno=EFAULT, as reporting unhandled exceptions is done via a ucall, i.e. requires KVM_RUN to exit cleanly. Theoretically, checking for a ucall on a failed KVM_RUN could get a false positive, e.g. if there were stale data in vcpu->run from a previous exit. Reviewed-by: James Houghton <jthoughton@google.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241128005547.4077116-5-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/lib/kvm_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fe85ce31b2891611a2e4d788872be815cea85a4b Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:34 2024 -0800 KVM: selftests: Assert that vcpu_{g,s}et_reg() won't truncate Assert that the register being read/written by vcpu_{g,s}et_reg() is no larger than a uint64_t, i.e. that a selftest isn't unintentionally truncating the value being read/written. Ideally, the assert would be done at compile-time, but that would limit the checks to hardcoded accesses and/or require fancier compile-time assertion infrastructure to filter out dynamic usage. Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241128005547.4077116-4-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> tools/testing/selftests/kvm/include/kvm_util.h | 4 ++++ 1 file changed, 4 insertions(+) commit 09bb926d290789ff35e7fa53045811a8c57356a9 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:33 2024 -0800 KVM: selftests: Return a value from vcpu_get_reg() instead of using an out-param Return a uint64_t from vcpu_get_reg() instead of having the caller provide a pointer to storage, as none of the vcpu_get_reg() usage in KVM selftests accesses a register larger than 64 bits, and vcpu_set_reg() only accepts a 64-bit value. If a use case comes along that needs to get a register that is larger than 64 bits, then a utility can be added to assert success and take a void pointer, but until then, forcing an out param yields ugly code and prevents feeding the output of vcpu_get_reg() into vcpu_set_reg(). Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Acked-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Link: https://lore.kernel.org/r/20241128005547.4077116-3-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> .../selftests/kvm/aarch64/aarch32_id_regs.c | 10 ++-- .../selftests/kvm/aarch64/debug-exceptions.c | 4 +- tools/testing/selftests/kvm/aarch64/hypercalls.c | 6 +- tools/testing/selftests/kvm/aarch64/no-vgic-v3.c | 2 +- tools/testing/selftests/kvm/aarch64/psci_test.c | 8 +-- tools/testing/selftests/kvm/aarch64/set_id_regs.c | 22 ++++---- .../selftests/kvm/aarch64/vpmu_counter_access.c | 19 +++---- tools/testing/selftests/kvm/include/kvm_util.h | 6 +- .../testing/selftests/kvm/lib/aarch64/processor.c | 8 +-- tools/testing/selftests/kvm/lib/riscv/processor.c | 66 +++++++++++----------- tools/testing/selftests/kvm/riscv/arch_timer.c | 2 +- tools/testing/selftests/kvm/riscv/ebreak_test.c | 2 +- tools/testing/selftests/kvm/riscv/sbi_pmu_test.c | 2 +- tools/testing/selftests/kvm/s390x/resets.c | 2 +- tools/testing/selftests/kvm/steal_time.c | 3 +- 15 files changed, 81 insertions(+), 81 deletions(-) commit 301e2772295e8de0cf8acdd9ddb1824b546375a5 Merge: bdecb30d579e f373ebec18a7 Author: Dave Airlie <airlied@redhat.com> Date: Thu Dec 19 07:59:20 2024 +1000 Merge tag 'drm-intel-gt-next-2024-12-18' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Driver Changes: - More accurate engine busyness metrics with GuC submission (Umesh) - Ensure partial BO segment offset never exceeds allowed max (Krzysztof) - Flush GuC CT receive tasklet during reset preparation (Zhanjun) - Code cleanups and refactoring (David, Lucas) - Debugging improvements (Jesus) - Selftest improvements (Sk) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/Z2KadNXgumx1aQMP@jlahtine-mobl.ger.corp.intel.com commit 0e7faea1880c316c8f41987165b95f1db2544350 Author: Niklas Cassel <cassel@kernel.org> Date: Fri Dec 13 15:33:07 2024 +0100 PCI: endpoint: Verify that requested BAR size is a power of two When allocating a BAR using pci_epf_alloc_space(), there are checks that round up the size to a power of two. However, there is no check in pci_epc_set_bar() which verifies that the requested BAR size is a power of two. Add a power of two check in pci_epc_set_bar(), so that we don't need to add such a check in each and every PCI endpoint controller driver. Link: https://lore.kernel.org/r/20241213143301.4158431-14-cassel@kernel.org Signed-off-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> drivers/pci/endpoint/pci-epc-core.c | 3 +++ 1 file changed, 3 insertions(+) commit f015b53d634a10fbceba545de70c3e109665c379 Author: Niklas Cassel <cassel@kernel.org> Date: Fri Dec 13 15:33:06 2024 +0100 PCI: endpoint: Add size check for fixed size BARs in pci_epc_set_bar() A BAR of type BAR_FIXED has a fixed BAR size (the size cannot be changed). When using pci_epf_alloc_space() to allocate backing memory for a BAR, pci_epf_alloc_space() will always set the size to the fixed BAR size if the BAR type is BAR_FIXED (and will give an error if you the requested size is larger than the fixed BAR size). However, some drivers might not call pci_epf_alloc_space() before calling pci_epc_set_bar(), so add a check in pci_epc_set_bar() to ensure that an EPF driver cannot set a size different from the fixed BAR size, if the BAR type is BAR_FIXED. The pci_epc_function_is_valid() check is removed because this check is now done by pci_epc_get_features(). Link: https://lore.kernel.org/r/20241213143301.4158431-13-cassel@kernel.org Signed-off-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> drivers/pci/endpoint/pci-epc-core.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit f3a30016e4b557495d49df7851f18ad97b6d5a23 Author: WangYuli <wangyuli@uniontech.com> Date: Wed Dec 18 22:04:37 2024 +0800 ktest.pl: Fix typo "accesing" There is a spelling mistake of 'accesing' in comments which should be 'accessing'. Fixes: 6d76f469c8ac9 ("ktest: Add useful example configs") Link: https://lore.kernel.org/8714AE3735C0EA0B+20241218140437.194906-1-wangyuli@uniontech.com Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: WangYuli <wangyuli@uniontech.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> tools/testing/ktest/examples/include/defaults.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 770221a36932a65c5a8b7711b5477430a1dbf5e8 Author: Ba Jing <bajing@cmss.chinamobile.com> Date: Mon Sep 2 20:46:45 2024 +0800 ktest.pl: Fix typo in comment "on of these" should be "one of these". Fixes: 77d942ceacbad ("ktest: Create variables for the ktest config files") Link: https://lore.kernel.org/20240902124645.5674-1-bajing@cmss.chinamobile.com Signed-off-by: Ba Jing <bajing@cmss.chinamobile.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> tools/testing/ktest/ktest.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 776735b954f49f85fd19e1198efa421fae2ad77c Author: Ba Jing <bajing@cmss.chinamobile.com> Date: Mon Sep 2 21:07:35 2024 +0800 ktest.pl: Remove unused declarations in run_bisect_test function Since $output and $ret are not used in the subsequent code, the declarations should be removed. Fixes: a75fececff3c ("ktest: Added sample.conf, new %default option format") Link: https://lore.kernel.org/20240902130735.6034-1-bajing@cmss.chinamobile.com Signed-off-by: Ba Jing <bajing@cmss.chinamobile.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> tools/testing/ktest/ktest.pl | 2 -- 1 file changed, 2 deletions(-) commit b61fef0813cb9a87733c46a48b98b5652494eea4 Author: Niklas Cassel <cassel@kernel.org> Date: Fri Dec 13 15:33:05 2024 +0100 PCI: artpec6: Implement dw_pcie_ep operation get_features All non-DWC EPC drivers implement (struct pci_epc *)->ops->get_features(). All DWC EPC drivers implement (struct dw_pcie_ep *)->ops->get_features(), except for pcie-artpec6.c. epc_features has been required in pci-epf-test.c since commit 6613bc2301ba ("PCI: endpoint: Fix NULL pointer dereference for ->get_features()"). A follow-up commit will make further use of epc_features in EPC core code. Implement epc_features in the only EPC driver where it is currently not implemented. Link: https://lore.kernel.org/r/20241213143301.4158431-12-cassel@kernel.org Signed-off-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> drivers/pci/controller/dwc/pcie-artpec6.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit a4e17a8f239a545c463f8ec27db4ed6e74b31841 Author: Ricardo B. Marliere <rbm@suse.com> Date: Thu Dec 5 17:50:35 2024 -0300 ktest.pl: Check kernelrelease return in get_version In the case of a test that uses the special option ${KERNEL_VERSION} in one of its settings but has no configuration available in ${OUTPUT_DIR}, for example if it's a new empty directory, then the `make kernelrelease` call will fail and the subroutine will chomp an empty string, silently. Fix that by adding an empty configuration and retrying. Cc: stable@vger.kernel.org Cc: John Hawley <warthog9@eaglescrag.net> Fixes: 5f9b6ced04a4e ("ktest: Bisecting, install modules, add logging") Link: https://lore.kernel.org/20241205-ktest_kver_fallback-v2-1-869dae4c7777@suse.com Signed-off-by: Ricardo B. Marliere <rbm@suse.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> tools/testing/ktest/ktest.pl | 5 +++++ 1 file changed, 5 insertions(+) commit 129f6af747b2259a4319a0af536fd80ece16e7cb Author: Niklas Cassel <cassel@kernel.org> Date: Fri Dec 13 15:33:04 2024 +0100 PCI: dwc: ep: Add 'address' alignment to 'size' check in dw_pcie_prog_ep_inbound_atu() dw_pcie_prog_ep_inbound_atu() is used to program an inbound iATU in "BAR Match Mode". A memory address returned by e.g. kmalloc() is guaranteed to have natural alignment (aligned to the size of the allocation). It is however not guaranteed that pci_epc_set_bar() (and thus dw_pcie_prog_ep_inbound_atu()) is supplied an address that has natural alignment. (An EPF driver can send in an arbitrary physical address to pci_epc_set_bar().) The DWC Databook description for the LWR_TARGET_RW and LWR_TARGET_HW fields in the IATU_LWR_TARGET_ADDR_OFF_INBOUND_i registers state that: "Field size depends on log2(BAR_MASK+1) in BAR match mode." I.e. only the upper bits are writable, and the number of writable bits is dependent on the configured BAR_MASK. Add a check to ensure that the physical address programmed in the iATU is aligned to the size of the BAR (BAR_MASK+1), as without this, we can get hard to debug errors, as we could write to bits that are read-only (without getting a write error), which could cause the iATU to end up redirecting to a physical address that is different from the address that we intended. Link: https://lore.kernel.org/r/20241213143301.4158431-11-cassel@kernel.org Signed-off-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> drivers/pci/controller/dwc/pcie-designware-ep.c | 8 +++++--- drivers/pci/controller/dwc/pcie-designware.c | 5 +++-- drivers/pci/controller/dwc/pcie-designware.h | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) commit 3708acbd5f169ebafe1faa519cb28adc56295546 Author: Niklas Cassel <cassel@kernel.org> Date: Fri Dec 13 15:33:03 2024 +0100 PCI: dwc: ep: Prevent changing BAR size/flags in pci_epc_set_bar() In commit 4284c88fff0e ("PCI: designware-ep: Allow pci_epc_set_bar() update inbound map address") set_bar() was modified to support dynamically changing the backing physical address of a BAR that was already configured. This means that set_bar() can be called twice, without ever calling clear_bar() (as calling clear_bar() would clear the BAR's PCI address assigned by the host). This can only be done if the new BAR size/flags does not differ from the existing BAR configuration. Add these missing checks. If we allow set_bar() to set e.g. a new BAR size that differs from the existing BAR size, the new address translation range will be smaller than the BAR size already determined by the host, which would mean that a read past the new BAR size would pass the iATU untranslated, which could allow the host to read memory not belonging to the new struct pci_epf_bar. While at it, add comments which clarifies the support for dynamically changing the physical address of a BAR. (Which was also missing.) Fixes: 4284c88fff0e ("PCI: designware-ep: Allow pci_epc_set_bar() update inbound map address") Link: https://lore.kernel.org/r/20241213143301.4158431-10-cassel@kernel.org Signed-off-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Cc: stable@vger.kernel.org drivers/pci/controller/dwc/pcie-designware-ep.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 33a6938e0c3373f2d11f92d098f337668cd64fdd Author: Niklas Cassel <cassel@kernel.org> Date: Fri Dec 13 15:33:02 2024 +0100 PCI: dwc: ep: Write BAR_MASK before iATU registers in pci_epc_set_bar() The "DesignWare Cores PCI Express Controller Register Descriptions, Version 4.60a", section "1.21.70 IATU_LWR_TARGET_ADDR_OFF_INBOUND_i", fields LWR_TARGET_RW and LWR_TARGET_HW both state that: "Field size depends on log2(BAR_MASK+1) in BAR match mode." I.e. only the upper bits are writable, and the number of writable bits is dependent on the configured BAR_MASK. If we do not write the BAR_MASK before writing the iATU registers, we are relying the reset value of the BAR_MASK being larger than the requested BAR size (which is supplied in the struct pci_epf_bar which is passed to pci_epc_set_bar()). The reset value of the BAR_MASK is SoC dependent. Thus, if the struct pci_epf_bar requests a BAR size that is larger than the reset value of the BAR_MASK, the iATU will try to write to read-only bits, which will cause the iATU to end up redirecting to a physical address that is different from the address that was intended. Thus, we should always write the iATU registers after writing the BAR_MASK. Fixes: f8aed6ec624f ("PCI: dwc: designware: Add EP mode support") Link: https://lore.kernel.org/r/20241213143301.4158431-9-cassel@kernel.org Signed-off-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Cc: stable@vger.kernel.org drivers/pci/controller/dwc/pcie-designware-ep.c | 28 +++++++++++++------------ 1 file changed, 15 insertions(+), 13 deletions(-) commit b317268368546d6401af788648668f82e3ba1bd3 Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Wed Dec 18 13:09:35 2024 +0900 PM: wakeup: implement devm_device_init_wakeup() helper Some drivers that enable device wakeup fail to properly disable it during their cleanup, which results in a memory leak. To address this, introduce devm_device_init_wakeup(), a managed variant of device_init_wakeup(dev, true). With this managed helper, wakeup functionality will be automatically disabled when the device is released, ensuring a more reliable cleanup process. This need for this addition arose during a previous discussion [1]. Link: https://lore.kernel.org/linux-rtc/20241212100403.3799667-1-joe@pf.is.s.u-tokyo.ac.jp/ [1] Suggested-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Link: https://patch.msgid.link/20241218040935.1921416-1-joe@pf.is.s.u-tokyo.ac.jp Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> include/linux/pm_wakeup.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit b59bd75a4b0983d6bcd10987b32ea9b9042db88c Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Date: Mon Dec 16 13:18:10 2024 -0800 thermal: intel: int340x: Panther Lake power floor and workload hint support Panther Lake follows same register set as Lunar Lake. Enable feature flags to support workload hints and power floor status. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://patch.msgid.link/20241216211810.1207028-2-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e50eeababa946d92f1669fd4d66a5f652b143b05 Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Date: Mon Dec 16 13:18:09 2024 -0800 thermal: intel: int340x: Panther Lake DLVR support Panther Lake follows same register set as Lunar Lake for DLVR. Enable feature flag to support DLVR. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://patch.msgid.link/thermal: intel: int340x: Panther Lake DLVR support Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4596cbea0ed2ef4f563a92775c9f612700ece145 Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Date: Mon Dec 16 11:08:21 2024 -0800 thermal: intel: Remove explicit user_space governor selection Currently some user space programs like Linux thermald needs to register to get notifications from both thermal user space governor and also Thermal netlink. This is required as some messages like HFI (Hardware Feedback Notifications) requires Thermal netlink. This results in additional processing in kernel and user space to process both notifications. The cost of using user space governor using kobject_uevent is much higher as this is also used by other user space daemons like udev daemon. Do not select user_space thermal governor by default. If it is present user space programs can always use this governor by writing to "policy" attribute. Instead from the kernel select THERMAL_NETLINK. Trip temperature violation can be received by user space programs via thermal netlink events: THERMAL_GENL_EVENT_TZ_TRIP_UP THERMAL_GENL_EVENT_TZ_TRIP_DOWN Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://patch.msgid.link/20241216190821.1137162-1-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/thermal/intel/Kconfig | 2 +- drivers/thermal/intel/int340x_thermal/Kconfig | 2 +- drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 1 - drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c | 1 - drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c | 1 - 5 files changed, 2 insertions(+), 5 deletions(-) commit ebeeee390b6a341770789a50d81e677da9a103d9 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Thu Dec 12 13:01:02 2024 +0100 PM: EM: Move sched domains rebuild function from schedutil to EM Function sugov_eas_rebuild_sd() defined in the schedutil cpufreq governor implements generic functionality that may be useful in other places. In particular, there is a plan to use it in the intel_pstate driver in the future. For this reason, move it from schedutil to the energy model code and rename it to em_rebuild_sched_domains(). This also helps to get rid of some #ifdeffery in schedutil which is a plus. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Christian Loehle <christian.loehle@arm.com> drivers/cpufreq/cpufreq.c | 2 +- include/linux/energy_model.h | 2 ++ kernel/power/energy_model.c | 17 +++++++++++++++++ kernel/sched/cpufreq_schedutil.c | 33 ++++++--------------------------- 4 files changed, 26 insertions(+), 28 deletions(-) commit 4c2a458eb5c0de1ba120ac03374290068e39c418 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Tue Dec 17 07:12:26 2024 +0100 dt-bindings: interrupt-controller: arm,gic: Correct VGIC interrupt description The description of VGIC interrupt referenced obsolete "see below" after converting TXT to DT Schema in commit 66ed144f147a ("dt-bindings: interrupt-controller: Convert ARM GIC to json-schema"), because there is no dedicated "VGIC" chapter anymore below. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Marc Zyngier <maz@kernel.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241217061226.14139-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Documentation/devicetree/bindings/interrupt-controller/arm,gic.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 233157785a34612e5899be6edcc6a53ea682d379 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:44 2024 -0800 perf python: Correctly throw IndexError Correctly throw IndexError for out-of-bound accesses to evlist: Python 3.11.9 (main, Jun 19 2024, 00:38:48) [GCC 13.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path.insert(0, '/tmp/perf/python') >>> import perf >>> x=perf.parse_events('cycles') >>> print(x) evlist([cycles]) >>> x[2] Traceback (most recent call last): File "<stdin>", line 1, in <module> IndexError: Index out of range Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-23-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/python.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 24fb6de241172283f0a4b91c319925b0103be917 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:43 2024 -0800 perf python: Add __str__ and __repr__ functions to evsel This allows evsel to be shown in the REPL like: Python 3.11.9 (main, Jun 19 2024, 00:38:48) [GCC 13.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path.insert(0, '/tmp/perf/python') >>> import perf >>> x=perf.parse_events('cycles,data_read') >>> print(x) evlist([cycles,uncore_imc_free_running_0/data_read/,uncore_imc_free_running_1/data_read/]) >>> x[0] evsel(cycles) >>> x[1] evsel(uncore_imc_free_running_0/data_read/) >>> x[2] evsel(uncore_imc_free_running_1/data_read/) Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-22-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/python.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 3c0401a0812528ef4e043f94993f63ca062547a4 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:42 2024 -0800 perf python: Add __str__ and __repr__ functions to evlist This allows the values in the evlist to be shown in the REPL like: Python 3.11.9 (main, Jun 19 2024, 00:38:48) [GCC 13.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path.insert(0,'/tmp/perf/python') >>> import perf >>> perf.parse_events('cycles,data_read') evlist([cycles,uncore_imc_free_running_0/data_read/,uncore_imc_free_running_1/data_read/]) Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-21-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/python.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit f081defccd934a8db309c90a61178e4f2eef386c Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:41 2024 -0800 perf python: Add parse_events function Add basic parse_events function that takes a string and returns an evlist. As the python evlist is embedded in a pyrf_evlist, and the evsels are embedded in pyrf_evsels, copy the parsed data into those structs and update evsel__clone to enable this. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-20-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/cgroup.c | 2 +- tools/perf/util/evsel.c | 19 +++++++++------ tools/perf/util/evsel.h | 2 +- tools/perf/util/python.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 9 deletions(-) commit 5c10f3b4463d4984c74d444c0c7606488587ce79 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:40 2024 -0800 perf build: Remove test library from python shared object With the attr.c code moved to a shell test, there is no need to link the test code into the python dso to avoid a missing reference to test_attr__open. Drop the test code from the python library. With the bench and test code removed from the python library on my x86 debian derived laptop the python library is reduced in size by 508,712 bytes or nearly 5%. Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-19-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.perf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cf133c25cc261cd6c30ed0af55e22ac11cebbe4 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:39 2024 -0800 perf kwork: Make perf_kwork_add_work a callback perf_kwork_add_work is declared in builtin-kwork, whereas much kwork code is in util. To avoid needing to stub perf_kwork_add_work in python.c, add a callback to struct perf_kwork and initialize it in builtin-kwork to perf_kwork_add_work - this is the only struct perf_kwork. This removes the need for the stub in python.c. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-18-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-kwork.c | 3 ++- tools/perf/util/bpf_kwork.c | 2 +- tools/perf/util/bpf_kwork_top.c | 2 +- tools/perf/util/kwork.h | 6 ++++-- tools/perf/util/python.c | 12 ------------ 5 files changed, 8 insertions(+), 17 deletions(-) commit df487111bd09616e5f20f32e88c48005d09dc0ec Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:38 2024 -0800 perf bench: Remove reference to cmd_inject Avoid `perf bench internals inject-build-id` referencing the cmd_inject sub-command that requires perf-bench to backward reference internals of builtins. Replace the reference to cmd_inject with a call to main. To avoid python.c needing to link with something providing main, drop the libperf-bench library from the python shared object. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-17-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.perf | 7 +++++-- tools/perf/bench/inject-buildid.c | 13 +++++++------ tools/perf/util/python.c | 6 ------ 3 files changed, 12 insertions(+), 14 deletions(-) commit 1a12ed09bc43e0d072ce9e2033cc9aa4e1a9fcb3 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:37 2024 -0800 perf lock: Move common lock contention code to new file Avoid references from util code to builtin-lock that require python stubs. Move the functions and related variables to util/lock-contention.c. Add max_stack_depth parameter to match_callstack_filter to avoid sharing a global variable. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-16-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-lock.c | 137 +------------------------------- tools/perf/util/Build | 1 + tools/perf/util/bpf_lock_contention.c | 2 +- tools/perf/util/lock-contention.c | 143 ++++++++++++++++++++++++++++++++++ tools/perf/util/lock-contention.h | 18 ++++- tools/perf/util/python.c | 17 ---- 6 files changed, 160 insertions(+), 158 deletions(-) commit 16ecb4316f06a3d6215810c8e351da65d238d2f2 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:36 2024 -0800 perf env: Move arch errno function to only use in env Move arch_syscalls__strerrno_function out of builtin-trace.c to env.c so that there isn't a util to builtin function call. This allows the python.c stub to be removed. Also, remove declaration/prototype from env.h and make static to reduce scope. The include is moved inside ifdefs to avoid, "defined but unused warnings". Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-15-irogers@google.com perf: perf python: Correctly throw IndexError Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-trace.c | 1 - tools/perf/trace/beauty/arch_errno_names.sh | 3 ++- tools/perf/util/env.c | 4 ++++ tools/perf/util/env.h | 2 -- tools/perf/util/python.c | 6 ------ 5 files changed, 6 insertions(+), 10 deletions(-) commit 254a867b98aee0474e84888c9c549564bf124ac1 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:35 2024 -0800 perf intel-pt: Remove stale build comment Commit 00a263902ac3 ("perf intel-pt: Use shared x86 insn decoder") removed the use of diff, so remove stale busybox comment. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-14-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/intel-pt-decoder/Build | 2 -- 1 file changed, 2 deletions(-) commit e7bb49e3f6435ff3611b83f78a61d387f24d80f8 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:34 2024 -0800 perf x86: Define arch_fetch_insn in NO_AUXTRACE builds archinsn.c containing arch_fetch_insn was only enabled with CONFIG_AUXTRACE, but this meant that a NO_AUXTRACE build on x86 would use the empty weak version of arch_fetch_insn - weak symbols are a frequent source of errors like this and are outside of the C specification. Change it so that archinsn.c is always built on x86 and make the weak symbol empty version of arch_fetch_insn a strong one guarded by ifdefs. arch_fetch_insn on x86 depends on insn_decode which is a function included then built into intel-pt-insn-decoder.c. intel-pt-insn-decoder.c isn't built in a NO_AUXTRACE=1 build. Separate the insn_decode function from intel-pt-insn-decoder.c by just directly compiling the relevant file. Guard this compilation to be for either always on x86 (because of the use in arch_fetch_insn) or when auxtrace is enabled. Apply the CFLAGS overrides as necessary, reducing the amount of code where warnings are disabled. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-13-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/arch/x86/util/Build | 2 +- tools/perf/util/Build | 2 +- tools/perf/util/intel-pt-decoder/Build | 18 ++++++++++++++---- .../perf/util/intel-pt-decoder/intel-pt-insn-decoder.c | 3 --- tools/perf/util/trace-event-scripting.c | 4 +++- 5 files changed, 19 insertions(+), 10 deletions(-) commit dc7be5e4c08feb5310ecbf6a2e7db56b3855c631 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:33 2024 -0800 perf script: Move perf_sample__sprintf_flags to trace-event-scripting.c perf_sample__sprintf_flags is used in the python C code and so needs to be in the util library rather than a builtin. Signed-off-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20241119011644.971342-12-irogers@google.com Cc: Mark Rutland <mark.rutland@arm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Weilin Wang <weilin.wang@intel.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: James Clark <james.clark@linaro.org> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: linux-kernel@vger.kernel.org Cc: linux-perf-users@vger.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-script.c | 81 -------------------------------- tools/perf/util/python.c | 6 --- tools/perf/util/trace-event-scripting.c | 83 +++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+), 87 deletions(-) commit 1ff2ca39b39f2ff5718a74bc4c92183b8eb9763f Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:32 2024 -0800 perf script: Move script_fetch_insn to trace-event-scripting.c Add native_arch as a parameter to script_fetch_insn rather than relying on the builtin-script value that won't be initialized for the dlfilter and python Context use cases. Assume both of those cases are running natively. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-11-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-script.c | 15 +-------------- tools/perf/scripts/python/Perf-Trace-Util/Context.c | 2 +- tools/perf/util/dlfilter.c | 3 ++- tools/perf/util/python.c | 6 ------ tools/perf/util/trace-event-scripting.c | 14 ++++++++++++++ tools/perf/util/trace-event.h | 2 +- 6 files changed, 19 insertions(+), 23 deletions(-) commit 04051b4a9330bd84fd3d42bee0eb3d0fd65546ee Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:31 2024 -0800 perf script: Move script_spec code to trace-event-scripting.c The script_spec code is referenced in util/trace-event-scripting but the list was in builtin-script, accessed via a function that required a stub function in python.c. Move all the logic to trace-event-scripting, with lookup and foreach functions exposed for builtin-script's benefit. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-10-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-script.c | 67 ++--------------------------- tools/perf/util/python.c | 5 --- tools/perf/util/trace-event-scripting.c | 75 +++++++++++++++++++++++++++++++++ tools/perf/util/trace-event.h | 3 +- 4 files changed, 80 insertions(+), 70 deletions(-) commit 9557d1562a8f49e8803265b4b30045f690b6d041 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:30 2024 -0800 perf stat: Move stat_config into config.c stat_config is accessed by config.c via helper functions, but declared in builtin-stat. Move to util/config.c so that stub functions aren't needed in python.c which doesn't link against the builtin files. To avoid name conflicts change builtin-script to use the same stat_config as builtin-stat. Rename local variables in tests to avoid shadow declaration warnings. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-script.c | 1 - tools/perf/builtin-stat.c | 27 --------------------------- tools/perf/tests/stat.c | 16 +++++++++------- tools/perf/util/config.c | 27 +++++++++++++++++++++++++++ tools/perf/util/python.c | 10 ---------- tools/perf/util/stat.h | 3 ++- 6 files changed, 38 insertions(+), 46 deletions(-) commit d927e30ca0b130d81c61dd031eeae22328a778ba Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:29 2024 -0800 perf script: Move find_scripts to browser/scripts.c The only use of find_scripts is in browser/scripts.c but the definition in builtin causes linking problems requiring a stub in python.c. Move the function to allow the stub to be removed. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-script.c | 171 ------------------------------------- tools/perf/builtin.h | 6 -- tools/perf/ui/browsers/scripts.c | 177 ++++++++++++++++++++++++++++++++++++++- tools/perf/util/python.c | 6 -- 4 files changed, 175 insertions(+), 185 deletions(-) commit f76f94dc7885b5bd288532642690eab74cd06b03 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:28 2024 -0800 perf script: Use openat for directory iteration Rewrite the directory iteration to use openat so that large character arrays aren't needed. The arrays are warned about potential buffer overflows by GCC when the code exists in a single C file. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-script.c | 87 +++++++++++++++++++++++++++++++-------------- tools/perf/util/path.c | 10 ++++++ tools/perf/util/path.h | 1 + 3 files changed, 71 insertions(+), 27 deletions(-) commit 3f1889422a1ddb5d834dcab17356059e3aac0d1b Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:27 2024 -0800 perf kvm: Move functions used in util out of builtin The util library code is used by the python module but doesn't have access to the builtin files. Make a util/kvm-stat.c to match the kvm-stat.h file that declares the functions and move the functions there. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-kvm.c | 61 ---------------------------------------- tools/perf/util/Build | 1 + tools/perf/util/kvm-stat.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/kvm-stat.h | 3 ++ tools/perf/util/python.c | 32 --------------------- 5 files changed, 74 insertions(+), 93 deletions(-) commit 702c7a4aec38a29d8a61a6e4af6cbfc9ca2c33a9 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:26 2024 -0800 perf script: Move scripting_max_stack out of builtin scripting_max_stack is used in util code which is linked into the python module. Move the variable declaration to util/trace-event-scripting.c to avoid conditional compilation. Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-script.c | 2 -- tools/perf/util/python.c | 2 -- tools/perf/util/trace-event-scripting.c | 3 +++ 3 files changed, 3 insertions(+), 4 deletions(-) commit c027e637bba16cff96292df09e962e635c048c11 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:25 2024 -0800 perf python: Remove unused #include Remove unused #include of bpf-filter.h. Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/python.c | 1 - 1 file changed, 1 deletion(-) commit b8816289ab390f63c7bfeb9a369defa732114f0e Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:24 2024 -0800 perf python: Constify variables and parameters Opportunistically constify variables and parameters when possible. Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/python.c | 55 +++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 26 deletions(-) commit e7e9943c87d857da650f228fdf6cb47b785b3ff9 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 17:16:23 2024 -0800 perf python: Remove python 2 scripting support Python2 was deprecated 4 years ago, remove support and workarounds. Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: Weilin Wang <weilin.wang@intel.com> Link: https://lore.kernel.org/r/20241119011644.971342-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> .../perf/scripts/python/Perf-Trace-Util/Context.c | 18 ------ tools/perf/util/python.c | 73 ++++------------------ .../util/scripting-engines/trace-event-python.c | 63 +------------------ 3 files changed, 15 insertions(+), 139 deletions(-) commit 4c7f9ee2eba2210db920d61dc7fd5291daeb0aa4 Author: Adrian Hunter <adrian.hunter@intel.com> Date: Mon Dec 16 09:02:43 2024 +0200 perf intel-pt: Add a test for pause / resume Add a simple sub-test to the "Miscellaneous Intel PT testing" test to check pause / resume. Reviewed-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20241216070244.14450-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/shell/test_intel_pt.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit f8b301e0a4744a0a5aeb6cdea65f5b25a1d40fb7 Author: Adrian Hunter <adrian.hunter@intel.com> Date: Mon Dec 16 09:02:42 2024 +0200 perf intel-pt: Add documentation for pause / resume Document the use of aux-action config term and provide a simple example. Reviewed-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20241216070244.14450-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Documentation/perf-intel-pt.txt | 108 +++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) commit f38ec2274c2397cc2ce0bde3b87b434470ffd0f8 Author: Adrian Hunter <adrian.hunter@intel.com> Date: Mon Dec 16 09:02:41 2024 +0200 perf intel-pt: Improve man page format Improve format of config terms and section references. Reviewed-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20241216070244.14450-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Documentation/perf-intel-pt.txt | 486 ++++++++++++++++------------- 1 file changed, 267 insertions(+), 219 deletions(-) commit bf66b5fd6e7e049449cd2ae19987c5003e1f5998 Author: Adrian Hunter <adrian.hunter@intel.com> Date: Mon Dec 16 09:02:40 2024 +0200 perf tools: Add missing_features for aux_start_paused, aux_pause, aux_resume Display "feature is not supported" error message if aux_start_paused, aux_pause or aux_resume result in a perf_event_open() error. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20241216070244.14450-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/evsel.c | 98 +++++++++++++++++++++++++++++++++++++++++++------ tools/perf/util/evsel.h | 1 + 2 files changed, 87 insertions(+), 12 deletions(-) commit 8a0f49a7f1dadd377a0d8a57d5a1da3faa51792e Author: Adrian Hunter <adrian.hunter@intel.com> Date: Mon Dec 16 09:02:39 2024 +0200 perf tools: Parse aux-action Add parsing for aux-action to accept "pause", "resume" or "start-paused" values. "start-paused" is valid only for AUX area events. "pause" and "resume" are valid only for events grouped with an AUX area event as the group leader. However, like with aux-output, the events will be automatically grouped if they are not currently in a group, and the AUX area event precedes the other events. Reviewed-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20241216070244.14450-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Documentation/perf-record.txt | 4 ++ tools/perf/builtin-record.c | 4 +- tools/perf/util/auxtrace.c | 67 +++++++++++++++++++++++++++++--- tools/perf/util/auxtrace.h | 6 ++- tools/perf/util/evsel.c | 1 + 5 files changed, 74 insertions(+), 8 deletions(-) commit 314bf84e03a704206bddc5839d9d9beea14ad621 Author: Adrian Hunter <adrian.hunter@intel.com> Date: Mon Dec 16 09:02:38 2024 +0200 perf tools: Add aux-action config term Add a new common config term "aux-action" to use for configuring AUX area trace pause / resume. The value is a string that will be parsed in a subsequent patch. Reviewed-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20241216070244.14450-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/evsel.c | 2 ++ tools/perf/util/evsel_config.h | 1 + tools/perf/util/parse-events.c | 10 ++++++++++ tools/perf/util/parse-events.h | 1 + tools/perf/util/parse-events.l | 1 + tools/perf/util/pmu.c | 1 + 6 files changed, 16 insertions(+) commit f3e719475692d4875355794507230bbab9db3472 Author: Adrian Hunter <adrian.hunter@intel.com> Date: Mon Dec 16 09:02:37 2024 +0200 perf tools: Add aux_start_paused, aux_pause and aux_resume Add 'struct perf_event_attr' members to support pause and resume of AUX area tracing. Reviewed-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20241216070244.14450-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/perf_event_attr_fprintf.c | 3 +++ 1 file changed, 3 insertions(+) commit fee9c03b25829adcc5539da1081d6219fe7ccbcd Author: Leo Yan <leo.yan@arm.com> Date: Sun Dec 15 22:12:23 2024 +0000 bpftool: Link zstd lib required by libelf When the feature libelf-zstd is detected, the zstd lib is required by libelf. Link the zstd lib in this case. Reviewed-by: Quentin Monnet <qmo@kernel.org> Signed-off-by: Leo Yan <leo.yan@arm.com> Tested-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Eduard Zingerman <eddyz87@gmail.com> Cc: Guilherme Amadio <amadio@gentoo.org> Cc: Hao Luo <haoluo@google.com> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Fastabend <john.fastabend@gmail.com> Cc: KP Singh <kpsingh@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: Nick Terrell <terrelln@fb.com> Cc: Song Liu <song@kernel.org> Cc: Stanislav Fomichev <sdf@google.com> Cc: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20241215221223.293205-4-leo.yan@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/bpf/bpftool/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) commit 44b44ffd5dcef03d273ad070d0b02a65a323f5f6 Author: Leo Yan <leo.yan@arm.com> Date: Sun Dec 15 22:12:22 2024 +0000 perf build: Minor improvement for linking libzstd The zstd library will be automatically linked by detecting the feature libzstd. It is no need to explicitly link it for static builds, so remove the redundant linkage. It is contradictory to detect the feature libelf-zstd while the build configuration NO_LIBZSTD is set. Report an error for reminding users not to set NO_LIBZSTD. Signed-off-by: Leo Yan <leo.yan@arm.com> Tested-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Eduard Zingerman <eddyz87@gmail.com> Cc: Guilherme Amadio <amadio@gentoo.org> Cc: Hao Luo <haoluo@google.com> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Fastabend <john.fastabend@gmail.com> Cc: KP Singh <kpsingh@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: Nick Terrell <terrelln@fb.com> Cc: Quentin Monnet <qmo@kernel.org> Cc: Song Liu <song@kernel.org> Cc: Stanislav Fomichev <sdf@google.com> Cc: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20241215221223.293205-3-leo.yan@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Makefile.config | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit d557814cdf4f7635352dfc7e1bcf4e786d40f14f Author: Leo Yan <leo.yan@arm.com> Date: Sun Dec 15 22:12:21 2024 +0000 tools build: Add feature test for libelf with ZSTD The macro ELFCOMPRESS_ZSTD defines the compress algorithm, which was introduced in the commit ("libelf: Document and make ELFCOMPRESS_ZSTD usable with old system elf.h") of the repository elfutils-0.188-67. Therefore, libelf 0.189 and later versions require to link the libzstd library. Add a test for checking if libelf supports ZSTD algorithm. Pass the macro ELFCOMPRESS_ZSTD as an argument to the elf_compress() function. If the build succeeds, it means the feature is supported. Reviewed-by: Quentin Monnet <qmo@kernel.org> Signed-off-by: Leo Yan <leo.yan@arm.com> Tested-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Quentin Monnet <qmo@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Eduard Zingerman <eddyz87@gmail.com> Cc: Guilherme Amadio <amadio@gentoo.org> Cc: Hao Luo <haoluo@google.com> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: John Fastabend <john.fastabend@gmail.com> Cc: KP Singh <kpsingh@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: Nick Terrell <terrelln@fb.com> Cc: Song Liu <song@kernel.org> Cc: Stanislav Fomichev <sdf@google.com> Cc: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20241215221223.293205-2-leo.yan@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/build/Makefile.feature | 1 + tools/build/feature/Makefile | 4 ++++ tools/build/feature/test-all.c | 4 ++++ tools/build/feature/test-libelf-zstd.c | 9 +++++++++ 4 files changed, 18 insertions(+) commit ea3683fda676ad0bf5a4af07c683df63209319a9 Author: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Date: Fri Dec 6 19:22:54 2024 +0530 perf tools tests shell base_probe: Enhance print_overall_results to print summary information Currently print_overall_results prints the number of fails in the summary, example from base_probe tests in testsuite_probe: ## [ FAIL ] ## perf_probe :: test_invalid_options SUMMARY :: 11 failures found test_invalid_options contains multiple tests and out of that 11 failed. Sometimes it could happen that it is due to missing dependency in the build or environment dependency. Example, perf probe -L requires DWARF enabled. otherwise it fails as below: ./perf probe -L Error: switch `L' is not available because NO_DWARF=1 "-L" is tested as one of the option in: for opt in '-a' '-d' '-L' '-V'; do <<perf probe test>> print_results $PERF_EXIT_CODE $CHECK_EXIT_CODE "missing argument for $opt" Here -a and -d doesn't require DWARF. Similarly there are few other tests requiring DWARF. To hint the user that missing DWARF could be one issue, update print_overall_results to print a comment string along with summary hinting the possible cause. Update test_invalid_options.sh and test_line_semantics.sh to pass the info about DWARF requirement since these tests failed when perf is built without DWARF. Use the check for presence of DWARF with "perf check feature" and append the hint message based on the result. With the change: ## [ FAIL ] ## perf_probe :: test_invalid_options SUMMARY :: 11 failures found :: Some of the tests need DWARF to run Reviewed-by: Kajol Jain <kjain@linux.ibm.com> Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Veronika Molnarova <vmolnaro@redhat.com> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20241206135254.35727-1-atrajeev@linux.vnet.ibm.com [ Minor edits changing "dwarf" to "DWARF" as its an acronym ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/shell/base_probe/test_invalid_options.sh | 5 ++++- tools/perf/tests/shell/base_probe/test_line_semantics.sh | 5 ++++- tools/perf/tests/shell/common/init.sh | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) commit 2aad2130c2db780f7b62961850719d44bf92e0c9 Author: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Date: Fri Dec 6 19:26:37 2024 +0530 perf tools arch powerpc: Add register mask for power11 PVR in extended regs Perf tools side uses extended mask to display the platform supported register names (with -I? option) to the user and also send this mask to the kernel to capture the extended registers as part of each sample. This mask value is decided based on the processor version ( from PVR ). Add PVR value for power11 to enable capturing the extended regs as part of sample in power11. Reviewed-by: Kajol Jain <kjain@linux.ibm.com> Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Disha Goel <disgoel@linux.vnet.ibm.com> Cc: Hari Bathini <hbathini@linux.ibm.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20241206135637.36166-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/arch/powerpc/util/perf_regs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a5bbe6dd69128fe887487fbc45ab0ef1e264e85c Author: Namhyung Kim <namhyung@kernel.org> Date: Fri Dec 13 16:29:38 2024 -0800 perf ftrace latency: Fix compiler error for clang 12 I noticed this error on CentOS 8. CLANG /build/util/bpf_skel/.tmp/func_latency.bpf.o Error at line 119: Unsupport signed division for DAG: 0x55829ee68a10: i64 = sdiv 0x55829ee68bb0, 0x55829ee69090, util/bpf_skel/func_latency.bpf.c:119:17 @[ util/bpf_skel/func_latency.bpf.c:84:5 ]Please convert to unsigned div/mod. fatal error: error in backend: Cannot select: 0x55829ee68a10: i64 = sdiv 0x55829ee68bb0, 0x55829ee69090, util/bpf_skel/func_latency.bpf.c:119:17 @[ util/bpf_skel/func_latency.bpf.c:84:5 ] 0x55829ee68bb0: i64,ch = CopyFromReg 0x55829edc9a78, Register:i64 %5, util/bpf_skel/func_latency.bpf.c:119:17 @[ util/bpf_skel/func_latency.bpf.c:84:5 ] 0x55829ee68e20: i64 = Register %5 0x55829ee69090: i64,ch = load<(volatile dereferenceable load 4 from @bucket_range, !tbaa !160), zext from i32> 0x55829edc9a78, 0x55829ee68fc0, undef:i64, util/bpf_skel/func_latency.bpf.c:119:19 @[ util/bpf_skel/func_latency.bpf.c:84:5 ] 0x55829ee68fc0: i64 = BPFISD::Wrapper TargetGlobalAddress:i64<i32* @bucket_range> 0, util/bpf_skel/func_latency.bpf.c:119:19 @[ util/bpf_skel/func_latency.bpf.c:84:5 ] 0x55829ee68808: i64 = TargetGlobalAddress<i32* @bucket_range> 0, util/bpf_skel/func_latency.bpf.c:119:19 @[ util/bpf_skel/func_latency.bpf.c:84:5 ] 0x55829ee68530: i64 = undef In function: func_end PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. It complains about sdiv which is (s64)delta / (u32)bucket_range. Let's cast the delta to u64 for division. Committer testing: Tested on: $ head -2 /etc/os-release NAME="Fedora Linux" VERSION="40 (Toolbx Container Image)" $ clang --version |& head -1 clang version 18.1.8 (Fedora 18.1.8-1.fc40) $ root@number:~# perf ftrace latency --use-nsec --bucket-range=200 --min-latency 250 --max-latency=5000 -T switch_mm_irqs_off -a sleep 10 # DURATION | COUNT | GRAPH | 0 - 250 ns | 28 | ##### | 250 - 450 ns | 12 | ## | 450 - 650 ns | 10 | # | 650 - 850 ns | 9 | # | 850 - 1050 ns | 20 | ### | 1.05 - 1.25 us | 14 | ## | 1.25 - 1.45 us | 16 | ### | 1.45 - 1.65 us | 8 | # | 1.65 - 1.85 us | 11 | ## | 1.85 - 2.05 us | 7 | # | 2.05 - 2.25 us | 11 | ## | 2.25 - 2.45 us | 10 | # | 2.45 - 2.65 us | 7 | # | 2.65 - 2.85 us | 8 | # | 2.85 - 3.05 us | 7 | # | 3.05 - 3.25 us | 7 | # | 3.25 - 3.45 us | 10 | # | 3.45 - 3.65 us | 5 | | 3.65 - 3.85 us | 9 | # | 3.85 - 4.05 us | 2 | | 4.05 - 4.25 us | 6 | # | 4.25 - ... us | 23 | #### | root@number:~# Fixes: e8536dd47a98b5db ("perf ftrace latency: Introduce --bucket-range to ask for linear bucketing") Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Gabriele Monaco <gmonaco@redhat.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241214002938.1027546-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/bpf_skel/func_latency.bpf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 055f0ce7d8345478aa029f9999a47efeef23fc05 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Fri Dec 13 16:42:44 2024 -0300 tools build: Test for presence of libtraceevent and libtracefs in test-all.c Since these are so far considered part of the basic set of libraries to be present when building perf, have then in tools/build/features/test-all.c. They were already in the FEATURE_TESTS_BASIC variable of tools/build/Makefile.feature, meaning if test-all.c builds, those features would be set as present, but then we were calling "again" (well, they were not in test-all.c, so were not really being tested) for it to be detected, fix this all up by not calling feature_check for those features but instead have them in test-all.c to be tested together with the the set of basic expected libraries. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/lkml/20241213195052.914914-3-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/build/feature/test-all.c | 10 ++++++++++ tools/perf/Makefile.config | 2 -- 2 files changed, 10 insertions(+), 2 deletions(-) commit 1460bb1fef9ccf7390af0d74a15252442fd6effd Author: José Roberto de Souza <jose.souza@intel.com> Date: Tue Dec 17 08:07:32 2024 -0800 drm/xe: Force write completion of MI_STORE_DATA_IMM With Force write completion unset there is no guarantees of when the write will be globally visible what is not the behavior wanted. Fixes: 9c57bc08652a ("drm/xe/lnl: Drop force_probe requirement") Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217160732.46280-1-jose.souza@intel.com drivers/gpu/drm/xe/instructions/xe_mi_commands.h | 13 +++++++------ drivers/gpu/drm/xe/xe_migrate.c | 11 ++++++++--- drivers/gpu/drm/xe/xe_oa.c | 4 +++- drivers/gpu/drm/xe/xe_ring_ops.c | 6 ++++-- 4 files changed, 22 insertions(+), 12 deletions(-) commit 4b252f2dab2ebb654eebbb2aee980ab8373b2295 Merge: c1bad69f8baf 5d4cadef52f2 Author: Jakub Kicinski <kuba@kernel.org> Date: Wed Dec 18 10:01:33 2024 -0800 Merge branch 'selftests-net-packetdrill-import-multiple-tests' Soham Chakradeo says: ==================== selftests/net: packetdrill: import multiple tests Import tests for the following features (folder names in brackets): ECN (ecn) : RFC 3168 Close (close) : RFC 9293 TCP_INFO (tcp_info) : RFC 9293 Fast recovery (fast_recovery) : RFC 5681 Timestamping (timestamping) : RFC 1323 Nagle (nagle) : RFC 896 Selective Acknowledgments (sack) : RFC 2018 Recent Timestamp (ts_recent) : RFC 1323 Send file (sendfile) Syscall bad arg (syscall_bad_arg) Validate (validate) Blocking (blocking) Splice (splice) End of record (eor) Limited transmit (limited_transmit) Procedure to import and test the packetdrill tests into upstream linux is explained in the first patch of this series These tests have many authors. We only import them here from github.com/google/packetdrill. Thanks to the following authors fo their contributions over the years to these tests: Neal Cardwell, Shuo Chen, Yuchung Cheng, Jerry Chu, Eric Dumazet, Luke Hsiao, Priyaranjan Jha, Chonggang Li, Tanner Love, John Sperbeck, Wei Wang and Maciej Żenczykowski. For more info see the original github commits, such as https://github.com/google/packetdrill/commit/8229c94928ac. ==================== Link: https://patch.msgid.link/20241217185203.297935-1-sohamch.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 5d4cadef52f29eea779a0b44e09f59657c1b46d8 Author: Soham Chakradeo <sohamch@google.com> Date: Tue Dec 17 18:52:01 2024 +0000 selftests/net: packetdrill: import tcp/user_timeout, tcp/validate, tcp/sendfile, tcp/limited-transmit, tcp/syscall_bad_arg Use the standard import and testing method, as described in the import of tcp/ecn and tcp/close , tcp/sack , tcp/tcp_info. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Soham Chakradeo <sohamch@google.com> Link: https://patch.msgid.link/20241217185203.297935-5-sohamch.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> ...p_limited_transmit_limited-transmit-no-sack.pkt | 53 ++++++++++++++++++++++ .../tcp_limited_transmit_limited-transmit-sack.pkt | 50 ++++++++++++++++++++ .../packetdrill/tcp_sendfile_sendfile-simple.pkt | 26 +++++++++++ ...cp_syscall_bad_arg_fastopen-invalid-buf-ptr.pkt | 42 +++++++++++++++++ .../tcp_syscall_bad_arg_sendmsg-empty-iov.pkt | 30 ++++++++++++ ...tcp_syscall_bad_arg_syscall-invalid-buf-ptr.pkt | 25 ++++++++++ .../tcp_user_timeout_user-timeout-probe.pkt | 37 +++++++++++++++ .../packetdrill/tcp_user_timeout_user_timeout.pkt | 32 +++++++++++++ .../tcp_validate_validate-established-no-flags.pkt | 24 ++++++++++ 9 files changed, 319 insertions(+) commit 6f6692053939038f48c2f9f404fe414038a44431 Author: Soham Chakradeo <sohamch@google.com> Date: Tue Dec 17 18:52:00 2024 +0000 selftests/net: packetdrill: import tcp/eor, tcp/splice, tcp/ts_recent, tcp/blocking Use the standard import and testing method, as described in the import of tcp/ecn and tcp/close , tcp/sack , tcp/tcp_info. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Soham Chakradeo <sohamch@google.com> Link: https://patch.msgid.link/20241217185203.297935-4-sohamch.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../packetdrill/tcp_blocking_blocking-accept.pkt | 18 ++++++ .../packetdrill/tcp_blocking_blocking-connect.pkt | 13 ++++ .../net/packetdrill/tcp_blocking_blocking-read.pkt | 29 +++++++++ .../packetdrill/tcp_blocking_blocking-write.pkt | 35 +++++++++++ .../net/packetdrill/tcp_eor_no-coalesce-large.pkt | 38 ++++++++++++ .../packetdrill/tcp_eor_no-coalesce-retrans.pkt | 72 ++++++++++++++++++++++ .../net/packetdrill/tcp_eor_no-coalesce-small.pkt | 36 +++++++++++ .../packetdrill/tcp_eor_no-coalesce-subsequent.pkt | 66 ++++++++++++++++++++ .../tcp_splice_tcp_splice_loop_test.pkt | 20 ++++++ .../net/packetdrill/tcp_ts_recent_fin_tsval.pkt | 23 +++++++ .../net/packetdrill/tcp_ts_recent_invalid_ack.pkt | 25 ++++++++ .../net/packetdrill/tcp_ts_recent_reset_tsval.pkt | 25 ++++++++ 12 files changed, 400 insertions(+) commit eab35989cc37e168550b7bfa690905ea2d1ae603 Author: Soham Chakradeo <sohamch@google.com> Date: Tue Dec 17 18:51:59 2024 +0000 selftests/net: packetdrill: import tcp/fast_recovery, tcp/nagle, tcp/timestamping Use the standard import and testing method, as described in the import of tcp/ecn , tcp/close , tcp/sack , tcp/tcp_info. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Soham Chakradeo <sohamch@google.com> Link: https://patch.msgid.link/20241217185203.297935-3-sohamch.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../tcp_fast_recovery_prr-ss-10pkt-lost-1.pkt | 72 ++++++++++ ...p_fast_recovery_prr-ss-30pkt-lost-1_4-11_16.pkt | 50 +++++++ .../tcp_fast_recovery_prr-ss-30pkt-lost1_4.pkt | 43 ++++++ ...ast_recovery_prr-ss-ack-below-snd_una-cubic.pkt | 41 ++++++ .../net/packetdrill/tcp_nagle_https_client.pkt | 40 ++++++ .../net/packetdrill/tcp_nagle_sendmsg_msg_more.pkt | 66 ++++++++++ .../packetdrill/tcp_nagle_sockopt_cork_nodelay.pkt | 43 ++++++ .../tcp_timestamping_client-only-last-byte.pkt | 92 +++++++++++++ .../net/packetdrill/tcp_timestamping_partial.pkt | 91 +++++++++++++ .../net/packetdrill/tcp_timestamping_server.pkt | 145 +++++++++++++++++++++ 10 files changed, 683 insertions(+) commit 88395c071f08d9ea2314045230206cc5a3f82ef0 Author: Soham Chakradeo <sohamch@google.com> Date: Tue Dec 17 18:51:58 2024 +0000 selftests/net: packetdrill: import tcp/ecn, tcp/close, tcp/sack, tcp/tcp_info Same as initial tests, import verbatim from github.com/google/packetdrill, aside from: - update `source ./defaults.sh` path to adjust for flat dir - add SPDX headers - remove author statements if any - drop blank lines at EOF Same test process as previous tests. Both with and without debug mode. Recording the steps once: make mrproper vng --build \ --config tools/testing/selftests/net/packetdrill/config \ --config kernel/configs/debug.config vng -v --run . --user root --cpus 4 -- \ make -C tools/testing/selftests TARGETS=net/packetdrill run_tests Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Soham Chakradeo <sohamch@google.com> Link: https://patch.msgid.link/20241217185203.297935-2-sohamch.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> ...tcp_close_close-local-close-then-remote-fin.pkt | 23 ++++++++ .../packetdrill/tcp_close_close-on-syn-sent.pkt | 21 +++++++ .../tcp_close_close-remote-fin-then-close.pkt | 36 ++++++++++++ .../net/packetdrill/tcp_ecn_ecn-uses-ect0.pkt | 21 +++++++ .../tcp_sack_sack-route-refresh-ip-tos.pkt | 37 ++++++++++++ ...tcp_sack_sack-shift-sacked-2-6-8-3-9-nofack.pkt | 64 +++++++++++++++++++++ .../tcp_sack_sack-shift-sacked-7-3-4-8-9-fack.pkt | 66 ++++++++++++++++++++++ .../tcp_sack_sack-shift-sacked-7-5-6-8-9-fack.pkt | 62 ++++++++++++++++++++ .../tcp_tcp_info_tcp-info-last_data_recv.pkt | 20 +++++++ .../tcp_tcp_info_tcp-info-rwnd-limited.pkt | 54 ++++++++++++++++++ .../tcp_tcp_info_tcp-info-sndbuf-limited.pkt | 38 +++++++++++++ 11 files changed, 442 insertions(+) commit 8ab3bf4764136e8ad8d1064c304be50297bcf9ad Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 12:30:10 2024 +0100 wifi: wlcore: sysfs: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241216-sysfs-const-bin_attr-net-v1-3-ec460b91f274@weissschuh.net drivers/net/wireless/ti/wlcore/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aeda9245c7ce6afbf0bf1be164ecef7552384c29 Author: Alex Shumsky <alexthreed@gmail.com> Date: Fri Dec 13 11:14:02 2024 +0300 wifi: brcmfmac: clarify unmodifiable headroom log message Replace misleading log "insufficient headroom (0)" with more clear "unmodifiable headroom". Signed-off-by: Alex Shumsky <alexthreed@gmail.com> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241213081402.625003-1-alexthreed@gmail.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 695c2c745e5dff201b75da8a1d237ce403600d04 Author: Michel Dänzer <mdaenzer@redhat.com> Date: Tue Dec 17 18:22:56 2024 +0100 drm/amdgpu: Handle NULL bo->tbo.resource (again) in amdgpu_vm_bo_update Third time's the charm, I hope? Fixes: d3116756a710 ("drm/ttm: rename bo->mem and make it a pointer") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3837 Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Michel Dänzer <mdaenzer@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit a21ab06b8c2d8d25c4a83bdf39542834b1f3beae Author: Mirsad Todorovac <mtodorovac69@gmail.com> Date: Tue Dec 17 23:58:10 2024 +0100 drm/admgpu: replace kmalloc() and memcpy() with kmemdup() The static analyser tool gave the following advice: ./drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:1266:7-14: WARNING opportunity for kmemdup → 1266 tmp = kmalloc(used_size, GFP_KERNEL); 1267 if (!tmp) 1268 return -ENOMEM; 1269 → 1270 memcpy(tmp, &host_telemetry->body.error_count, used_size); Replacing kmalloc() + memcpy() with kmemdump() doesn't change semantics. Original code works without fault, so this is not a bug fix but proposed improvement. Link: https://lwn.net/Articles/198928/ Fixes: 84a2947ecc85 ("drm/amdgpu: Implement virt req_ras_err_count") Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: Xinhui Pan <Xinhui.Pan@amd.com> Cc: David Airlie <airlied@gmail.com> Cc: Simona Vetter <simona@ffwll.ch> Cc: Zhigang Luo <Zhigang.Luo@amd.com> Cc: Victor Skvortsov <victor.skvortsov@amd.com> Cc: Hawking Zhang <Hawking.Zhang@amd.com> Cc: Lijo Lazar <lijo.lazar@amd.com> Cc: Yunxiang Li <Yunxiang.Li@amd.com> Cc: Jack Xiao <Jack.Xiao@amd.com> Cc: Vignesh Chander <Vignesh.Chander@amd.com> Cc: Danijel Slivka <danijel.slivka@amd.com> Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Mirsad Todorovac <mtodorovac69@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b64f2f3e870d324703246757cb67cec09a64a1c9 Author: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Date: Thu Dec 12 15:03:29 2024 +0530 drm/amd/display: Fix NULL pointer dereference in dmub_tracebuffer_show It corrects the issue by checking if 'adev->dm.dmub_srv' is NULL before accessing its 'meta_info' member. This ensures that we do not dereference a NULL pointer. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:917 dmub_tracebuffer_show() warn: address of 'adev->dm.dmub_srv->meta_info' is non-NULL drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c 901 static int dmub_tracebuffer_show(struct seq_file *m, void *data) 902 { 903 struct amdgpu_device *adev = m->private; 904 struct dmub_srv_fb_info *fb_info = adev->dm.dmub_fb_info; 905 struct dmub_fw_meta_info *fw_meta_info = &adev->dm.dmub_srv->meta_info; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Even if adev->dm.dmub_srv is NULL, the address of ->meta_info can't be NULL 906 struct dmub_debugfs_trace_entry *entries; 907 uint8_t *tbuf_base; 908 uint32_t tbuf_size, max_entries, num_entries, first_entry, i; 909 910 if (!fb_info) 911 return 0; 912 913 tbuf_base = (uint8_t *)fb_info->fb[DMUB_WINDOW_5_TRACEBUFF].cpu_addr; 914 if (!tbuf_base) 915 return 0; 916 --> 917 tbuf_size = fw_meta_info ? fw_meta_info->trace_buffer_size : ^^^^^^^^^^^^ Always non-NULL 918 DMUB_TRACE_BUFFER_SIZE; 919 max_entries = (tbuf_size - sizeof(struct dmub_debugfs_trace_header)) / 920 sizeof(struct dmub_debugfs_trace_entry); 921 922 num_entries = v2: Initialize struct dmub_fw_meta_info *fw_meta_info to NULL (Dan Carpenter) Fixes: 5a498172c8d0 ("drm/amd/display: Make DMCUB tracebuffer debugfs chronological") Cc: Leo Li <sunpeng.li@amd.com> Cc: Tom Chung <chiahsuan.chung@amd.com> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Cc: Roman Li <roman.li@amd.com> Cc: Alex Hung <alex.hung@amd.com> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Hamza Mahfooz <hamza.mahfooz@amd.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Roman Li <roman.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e37ccf44ace3f58fc9d84de1acd439077b9f7fef Author: Philip Yang <Philip.Yang@amd.com> Date: Tue Dec 3 10:00:25 2024 -0500 drm/amdgpu: Show warning message if IH ring overflow If IH primary ring and KFD ih fifo overflows, we may miss CP, SDMA interrupts and cause application soft hang. Show warning message with ring name if overflow happens. Add function to get ih ring name to avoid duplicating it. To keep warning message consistent between GPU generations, change all *_ih.c except ASICs older than Vega which has only one ih ring. Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 1 + drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 5 ++--- drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 4 ++-- 6 files changed, 15 insertions(+), 11 deletions(-) commit de844846f72b152119faaef1b363448dc8ea368f Author: Philip Yang <Philip.Yang@amd.com> Date: Wed Dec 4 17:49:08 2024 -0500 drm/amdkfd: Improve signal event slow path If event slot is not signaled, kfd_signal_event_interrupt goes to slow path to scan all event slots to find the signaled event, this is needed for old ASICs that don't have the event ID or the event IDs are incorrect in the IH payload. There is case that GPU signal the same event twice, then driver process the first event interrupt, set_event and event slot is auto-reset, then for the second event interrupt, KFD goes to slow path as event is not signaled, just drop the second event interrupt because the application only need wakeup once. Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdkfd/kfd_events.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 34db5a32617d102e8042151bb87590e43c97132e Author: Philip Yang <Philip.Yang@amd.com> Date: Tue Nov 26 11:33:15 2024 -0500 drm/amdkfd: Queue interrupt work to different CPU For CPX mode, each KFD node has interrupt worker to process ih_fifo to send events to user space. Currently all interrupt workers of same adev queue to same CPU, all workers execution are actually serialized and this cause KFD ih_fifo overflow when CPU usage is high. Use per-GPU unbounded highpri queue with number of workers equals to number of partitions, let queue_work select the next CPU round robin among the local CPUs of same NUMA. Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdkfd/kfd_device.c | 25 +++++++++---------------- drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 25 +++++++++---------------- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 ++- 3 files changed, 20 insertions(+), 33 deletions(-) commit 1b00143231d3e6f4b76f88f4edd6bb8a1332ef9b Author: Philip Yang <Philip.Yang@amd.com> Date: Tue Nov 12 22:07:33 2024 -0500 drm/amdgpu: Optimize gfx v9 GPU page fault handling After GPU page fault, there are lots of page fault interrupts generated at short period even with CAM filter enabled because the fault address is different. Each page fault copy to KFD ih fifo to send event to user space by KFD interrupt worker, this could cause KFD ih fifo overflow while other processes generate events at same time. KFD process is aborted after GPU page fault, we only need one GPU page fault interrupt sent to KFD ih fifo to send memory exception event to user space. Incease KFD ih fifo size to 2 times of IH primary ring size, to handle the burst events case. This patch handle the gfx v9 path, cover retry on/off and CAM filter on/off cases. Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 10 +++++ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 ++ drivers/gpu/drm/amd/amdkfd/kfd_device.c | 67 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 ++ 5 files changed, 84 insertions(+), 1 deletion(-) commit f607b2b867bbef8a3a76de8d0eccf7429782bdca Author: Philip Yang <Philip.Yang@amd.com> Date: Fri Nov 22 17:36:15 2024 -0500 drm/amdkfd: KFD interrupt access ih_fifo data in-place To handle 40000 to 80000 interrupts per second running CPX mode with 4 streams/queues per KFD node, KFD interrupt handler becomes the performance bottleneck. Remove the kfifo_out memcpy overhead by accessing ih_fifo data in-place and updating rptr with kfifo_skip_count. Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 35 ++++++++++++------------------ 1 file changed, 14 insertions(+), 21 deletions(-) commit 11815bb0e30966321ff4351b55ad7b6f2e0a63bf Author: Christian König <christian.koenig@amd.com> Date: Thu Dec 12 16:51:04 2024 +0100 drm/amdgpu: partially revert "reduce reset time" This partially reverts commit 194eb174cbe4fe2b3376ac30acca2dc8c8beca00. This commit introduced a new state variable into adev without even remotely worrying about CPU barriers. Since we already have the amdgpu_in_reset() function exactly for this use case partially revert that. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 3 --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- 5 files changed, 4 insertions(+), 8 deletions(-) commit 26c95e838e6301b0230430ec2fadeabfcb07aeda Author: Christian König <christian.koenig@amd.com> Date: Thu Dec 12 16:43:45 2024 +0100 drm/amdgpu: set the VM pointer to NULL in amdgpu_job_prepare As soon as the prepare phase is completed the VM might be released, better set it to NULL. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 57f812d171af4ba233d3ed7c94dfa5b8e92dcc04 Author: Christian König <christian.koenig@amd.com> Date: Thu Dec 12 16:29:18 2024 +0100 drm/amdgpu: fix amdgpu_coredump The VM pointer might already be outdated when that function is called. Use the PASID instead to gather the information instead. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d1ebe307b44bbc9a98578c8f8089bb8789c5ecd7 Author: Candice Li <candice.li@amd.com> Date: Mon Dec 16 17:20:12 2024 +0800 drm/amdgpu: Enable psp v14_0_3 RAS support for non-SRIOV configurations. Enable psp v14_0_3 RAS support for non-SRIOV configurations. Signed-off-by: Candice Li <candice.li@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4b7271e5ca95b581f2fcc4ae852c4079215e92d Author: Philip Yang <Philip.Yang@amd.com> Date: Tue Nov 26 15:45:32 2024 -0500 drm/amdgpu: Don't enable sdma 4.4.5 CTXEMPTY interrupt The sdma context empty interrupt is dropped in amdgpu_irq_dispatch as unregistered interrupt src_id 243, this interrupt accounts to 1/3 of total interrupts and causes IH primary ring overflow when running stressful benchmark application. Disable this interrupt has no side effect found. Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 34c4eb7d4e0cd443399a0f114d467d2b3ff05419 Author: Karol Przybylski <karprzy7@gmail.com> Date: Sun Dec 15 13:28:57 2024 +0100 drm/amdgpu: Fix potential integer overflow in scheduler mask calculations The use of 1 << i in scheduler mask calculations can result in an unintentional integer overflow due to the expression being evaluated as a 32-bit signed integer. This patch replaces 1 << i with 1ULL << i to ensure the operation is performed as a 64-bit unsigned integer, preventing overflow Discovered in coverity scan, CID 1636393, 1636175, 1636007, 1635853 Fixes: c5c63d9cb5d3 ("drm/amdgpu: add amdgpu_gfx_sched_mask and amdgpu_compute_sched_mask debugfs") Signed-off-by: Karol Przybylski <karprzy7@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8f2cd1067afe68372a1723e05e19b68ed187676a Author: Alex Deucher <alexander.deucher@amd.com> Date: Thu Dec 12 17:06:26 2024 -0500 drm/amdgpu/smu14.0.2: fix IP version check Use the helper function rather than reading it directly. Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1fd1d0f40272948aa6ab82a3a82ecbbc76dff53 Author: Alex Deucher <alexander.deucher@amd.com> Date: Thu Dec 12 17:04:58 2024 -0500 drm/amdgpu/gfx12: fix IP version check Use the helper function rather than reading it directly. Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63bfd24088b42c6f55c2096bfc41b50213d419b2 Author: Alex Deucher <alexander.deucher@amd.com> Date: Thu Dec 12 17:03:20 2024 -0500 drm/amdgpu/mmhub4.1: fix IP version check Use the helper function rather than reading it directly. Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/mmhub_v4_1_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c8eeaaa0fe5841ccf07a0eb51b1426f34ef39f7 Author: Alex Deucher <alexander.deucher@amd.com> Date: Thu Dec 12 17:00:07 2024 -0500 drm/amdgpu/nbio7.11: fix IP version check Use the helper function rather than reading it directly. Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ec43fbece784215d3c4469973e4556d70bce915 Author: Alex Deucher <alexander.deucher@amd.com> Date: Thu Dec 12 16:49:20 2024 -0500 drm/amdgpu/nbio7.0: fix IP version check Use the helper function rather than reading it directly. Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22b9555bc90df22b585bdd1f161b61584b13af51 Author: Alex Deucher <alexander.deucher@amd.com> Date: Thu Dec 12 16:47:48 2024 -0500 drm/amdgpu/nbio7.7: fix IP version check Use the helper function rather than reading it directly. Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 824ed4cb629c87b0b8aec997d3b7f6f77143ad25 Author: Aric Cyr <aric.cyr@amd.com> Date: Sun Dec 8 22:01:45 2024 -0500 drm/amd/display: 3.2.314 DC 3.2.314 contains some improvements as summarized below: * Update DML21 code. * Fixes for FAMS2 interface. * HDMI fixes. * Compilation warning fixes. Signed-off-by: Aric Cyr <aric.cyr@amd.com> Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83626efdce0be2eb80696110fe55e9290c72b1f1 Author: George Shen <george.shen@amd.com> Date: Thu Dec 5 16:58:21 2024 -0500 drm/amd/display: Disable MPC rate control on ODM pipe update [Why] Seamless boot skips MPC init for the active pipe, resulting in stale MPC rate control state being retained. This will cause issues since other logic assumes it is disabled (as DCN30 and newer does not need it). [How] Disable MPC rate control on ODM pipe update to cover the seamless boot case. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: George Shen <george.shen@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 12 ++++++++++++ .../gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 12 ++++++++++++ drivers/gpu/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c | 18 ++++++++++++++++++ drivers/gpu/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.h | 7 +++++++ 4 files changed, 49 insertions(+) commit 95265e4b2b3a9e47b40ffaa6587f335e4aa0b549 Author: Chris Park <chris.park@amd.com> Date: Tue Dec 3 14:33:16 2024 -0500 drm/amd/display: Block Invalid TMDS operation [Why] When sink type is TMDS, PHY programming does not block against pixel clock greater than 600MHz. [How] Based on sink type, block greater than 600MHz phy programming. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Aric Cyr <aric.cyr@amd.com> Signed-off-by: Chris Park <chris.park@amd.com> Signed-off-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 3 +++ drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 4 ++++ 2 files changed, 7 insertions(+) commit f9dfa31ff7aff4767d799ba9d29e8e1e9c25d48b Author: Dillon Varone <dillon.varone@amd.com> Date: Thu Dec 5 17:33:06 2024 -0500 drm/amd/display: Re-validate streams on commit_streams To prevent invalid HW programming, streams should be revalidated first before committing to HW. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Aric Cyr <aric.cyr@amd.com> Signed-off-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +++++ 1 file changed, 5 insertions(+) commit 04d6273faed083e619fc39a738ab0372b6a4db20 Author: Rodrigo Siqueira <siqueira@igalia.com> Date: Thu Nov 14 15:32:52 2024 -0700 Revert "drm/amd/display: Fix green screen issue after suspend" This reverts commit 87b7ebc2e16c14d32a912f18206a4d6cc9abc3e8. A long time ago, we had an issue with the Raven system when it was connected to two displays: one with DP and another with HDMI. After the system woke up from suspension, we saw a solid green screen caused by an underflow generated by bad DCC metadata. To workaround this issue, the 'commit 87b7ebc2e16c ("drm/amd/display: Fix green screen issue after suspend")' was introduced to disable the DCC for a few frames after in the resume phase. However, in hindsight, this solution was probably a workaround at the kernel level for some issues from another part (probably other driver components or user space). After applying this patch and trying to reproduce the green issue in a similar hardware system but using the latest kernel and userspace, we cannot see the issue, which makes this workaround obsolete and creates extra unnecessary complexity to the code; for all of this reason, this commit reverts the original change. Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 ++++-------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 22 ++++++++-------------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.h | 3 +-- 3 files changed, 13 insertions(+), 24 deletions(-) commit 1b0cbcf888543b88787ad147731160244bb993c9 Author: Alex Hung <alex.hung@amd.com> Date: Thu Dec 5 20:57:04 2024 -0700 drm/amd/display: Fix uninitialized variables in amdgpu_dm_debugfs [WHAT] Some fields in struct dc_link_settings and link_training_settings are not initialized and using them can cause unexpected results. [HOW] Initialize struct dc_link_settings and link_training_settings to zero. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 57a793a74f3cc8e313166ea8d58f93e3c235dc4b Author: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Date: Thu Dec 5 14:53:36 2024 -0500 drm/amd/display: Apply (some) policy for DML2 formulation on DCN35/DCN351 [Why] Dropping the entirety of dml2_policy_build_synthetic_soc_states exposes an issue for states that cannot be filled via bbox_overrides and rely on the default parameters that may or may not be present depending on the DM. For amdgpu_dm this results in missing parameters for most of the struct in higher states: - sr_exit_time_us - sr_enter_plus_exit_time_us - sr_exit_z8_time_us - sr_enter_plus_exit_z8_time_us - urgent_latency_pixel_data_only_us - urgent_latency_pixel_mixed_with_vm_data_us - urgent_latency_vm_data_only_us - dram_clock_change_latency_us - fclk_change_latency_us - usr_retraining_latency_us - writeback_latency_us - urgent_latency_adjustment_fabric_clock_component_us - urgent_latency_adjustment_fabric_clock_reference_mhz - dscclk_mhz - phyclk_mhz - phyclk_d18_mhz - phyclk_d32_mhz - use_ideal_dram_bw_strobe [How] Copy from the first state, applying a minimal policy to set max clocks for SOC independent values. Then copy the SOC dependent ones from the states modified by bbox_overrides. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../amd/display/dc/dml2/dml2_translation_helper.c | 54 +++++++++++++++++++--- 1 file changed, 47 insertions(+), 7 deletions(-) commit 5b0766f2de9211395e1374ebc5173e0cb60b8fd7 Author: Shunlu Zhang <Shunlu.Zhang@amd.com> Date: Wed Nov 13 19:21:40 2024 -0500 drm/amd/display: delete legacy code Delete unused code. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Jun Lei <jun.lei@amd.com> Signed-off-by: Shunlu Zhang <Shunlu.Zhang@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.c | 1 + .../gpu/drm/amd/display/dc/dml2/dml_display_rq_dlg_calc.c | 12 ------------ 2 files changed, 1 insertion(+), 12 deletions(-) commit b486bc9e878ca2577f47e72851ecbc467d8dec44 Author: Dillon Varone <dillon.varone@amd.com> Date: Wed Nov 27 17:22:36 2024 -0500 drm/amd/display: Add new message for DF throttling optimization on dcn401 [WHY] When effective bandwidth from the SoC is enough to perform SubVP prefetchs, then DF throttling is not required. [HOW] Provide SMU the required clocks for which DF throttling is not required. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c | 46 ++++++++++++++++++++++ .../amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.h | 1 + .../dc/clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.c | 23 +++++++++++ .../dc/clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.h | 3 ++ drivers/gpu/drm/amd/display/dc/dc.h | 3 ++ .../dc/dml2/dml21/dml21_translation_helper.c | 2 + .../amd/display/dc/dml2/dml21/inc/dml_top_types.h | 5 +++ .../dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 43 ++++++++++++++++++++ 8 files changed, 126 insertions(+) commit be4e3509314af751f08677f428f93c306aaa2f8e Author: Austin Zheng <Austin.Zheng@amd.com> Date: Mon Nov 25 17:16:53 2024 -0500 drm/amd/display: DML21 Reintegration For Various Fixes Reintegrate latest DML21 code. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Austin Zheng <Austin.Zheng@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dml2/Makefile | 15 +- .../drm/amd/display/dc/dml2/display_mode_core.c | 6 +- .../display/dc/dml2/display_mode_core_structs.h | 103 +- .../drm/amd/display/dc/dml2/display_mode_util.c | 6 +- .../dc/dml2/dml21/dml21_translation_helper.c | 14 +- .../dc/dml2/dml21/inc/bounding_boxes/dcn4_soc_bb.h | 1 + .../dc/dml2/dml21/inc/dml_top_display_cfg_types.h | 52 +- .../dml2/dml21/inc/dml_top_soc_parameter_types.h | 2 + .../amd/display/dc/dml2/dml21/inc/dml_top_types.h | 69 +- .../dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.c | 39 +- .../dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 1214 +++++++++++++------- .../dml21/src/dml2_core/dml2_core_dcn4_calcs.h | 2 +- .../dml21/src/dml2_core/dml2_core_shared_types.h | 129 ++- .../dc/dml2/dml21/src/dml2_core/dml2_core_utils.c | 223 +++- .../dc/dml2/dml21/src/dml2_core/dml2_core_utils.h | 6 +- .../dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 6 +- .../dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 394 ++++--- .../dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h | 7 + .../dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.c | 1 - .../dml2/dml21/src/dml2_top/dml2_top_interfaces.c | 51 + .../dc/dml2/dml21/src/dml2_top/dml2_top_legacy.c | 4 + .../dc/dml2/dml21/src/dml2_top/dml2_top_legacy.h | 9 + .../dml21/src/dml2_top/dml2_top_optimization.c | 307 ----- .../dml21/src/dml2_top/dml2_top_optimization.h | 33 - .../dc/dml2/dml21/src/dml2_top/dml2_top_soc15.c | 1177 +++++++++++++++++++ .../{dml_top_mcache.h => dml2_top_soc15.h} | 20 +- .../dc/dml2/dml21/src/dml2_top/dml_top_mcache.c | 549 --------- .../amd/display/dc/dml2/dml21/src/inc/dml2_debug.c | 5 + .../amd/display/dc/dml2/dml21/src/inc/dml2_debug.h | 46 +- .../dml21/src/inc/dml2_internal_shared_types.h | 60 +- 30 files changed, 2819 insertions(+), 1731 deletions(-) commit bb4090cda94fecb2b1fd9c7a25dd32dff03ac3f3 Author: Harry VanZyllDeJong <hvanzyll@amd.com> Date: Wed Dec 4 14:54:23 2024 -0500 drm/amd/display: Fix brightness adjustment on MiniLED [Why] Older Asics were changed to target new DCN while still needing older support causing brightness adjustments to fail. [How] Reverted the DCN targets on required DCNs Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Iswara Nagulendran <iswara.nagulendran@amd.com> Signed-off-by: Harry VanZyllDeJong <hvanzyll@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_init.c | 2 +- drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_init.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e56ad45e991128bf4db160b75a1d9f647a341d8f Author: Fangzhi Zuo <Jerry.Zuo@amd.com> Date: Mon Dec 2 13:30:37 2024 -0500 drm/amd/display: Fix Mode Cutoff in DSC Passthrough to DP2.1 Monitor Source --> DP2.1 MST hub --> DP1.4/2.1 monitor When change from DP1.4 to DP2.1 from monitor manual, modes higher than 4k120 are all cutoff by mode validation. Switch back to DP1.4 gets all the modes up to 4k240 available to be enabled by dsc passthrough. [why] Compared to DP1.4 link from hub to monitor, DP2.1 link has larger full_pbn value that causes overflow in the process of doing conversion from pbn to kbps. [how] Change the data type accordingly to fit into the data limit during conversion calculation. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Wayne Lin <wayne.lin@amd.com> Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e823421d6c540dd9056886707b43764d701b89d7 Author: Charlene Liu <Charlene.Liu@amd.com> Date: Tue Dec 3 15:55:34 2024 -0500 drm/amd/display: init dc_power_state Initialize the power state for dc use Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Chris Park <chris.park@amd.com> Signed-off-by: Charlene Liu <Charlene.Liu@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/core/dc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 12e4ec5d45fecc36efa932287c164f4059bfc8c9 Author: Meera Patel <meera.patel@amd.com> Date: Wed Nov 27 17:51:16 2024 -0500 drm/amd/display: initialize uninitialized variable [WHY] There is one uninitialized variable in file dc/hwss/dcn401/dcn401_hwseq.c, which trigger com compile warnings. [HOW] Initialize the unininitialized variable. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Ariel Bernstein <eric.bernstein@amd.com> Signed-off-by: Meera Patel <meera.patel@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55eeaaec0d5716efef2229bb2b5f262ba934f9a5 Author: Dillon Varone <dillon.varone@amd.com> Date: Fri Nov 29 16:37:32 2024 -0500 drm/amd/display: Add support for FAMS2+ interface versions Current driver interface does not allow for flexibility in coexistence of multiple interface versions, so add support for checking minor interface revisions and providing appropriate programming. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 40 +++++----- .../drm/amd/display/dc/dml2/dml21/dml21_utils.c | 80 ++++++++++++------- .../dc/dml2/dml21/inc/bounding_boxes/dcn4_soc_bb.h | 2 +- .../amd/display/dc/dml2/dml21/inc/dml_top_types.h | 3 +- .../dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.c | 3 +- .../dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 90 +++++++++++----------- .../dml21/src/dml2_core/dml2_core_dcn4_calcs.h | 2 +- .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 3 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 4 +- .../drm/amd/display/dc/optc/dcn401/dcn401_optc.c | 4 +- .../display/dc/resource/dcn401/dcn401_resource.c | 4 + 12 files changed, 134 insertions(+), 102 deletions(-) commit 3f238a6bd28c613e9ffca0186c56e51e8e7de700 Author: Alvin Lee <Alvin.Lee2@amd.com> Date: Fri Nov 29 11:53:38 2024 -0500 drm/amd/display: Update FAMS2 config cmd The FAMS2 stream and sub-state have been separated into 2 different commands. Update the cmd function to send one command each for the stream and sub-state. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Alvin Lee <Alvin.Lee2@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 25 +++++++++++++++++++------ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 1 + 2 files changed, 20 insertions(+), 6 deletions(-) commit 357ef5b3b7e98b4d21cb0abc1bde1140332c7eb8 Author: Andrew Martin <Andrew.Martin@amd.com> Date: Tue Dec 10 11:45:53 2024 -0500 drm/amdgpu: Failed to check various return code Clean up code to quiet the compiler on us failing to check the return code. Signed-off-by: Andrew Martin <Andrew.Martin@amd.com> Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) commit 88a45aa6083be000dc18c38a339acb1fd2f9831c Author: Andrew Martin <Andrew.Martin@amd.com> Date: Tue Dec 10 11:50:13 2024 -0500 drm/amdkfd: Failed to check various return code This patch checks and warns if pdd is NULL. Signed-off-by: Andrew Martin <Andrew.Martin@amd.com> Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 3 +++ 1 file changed, 3 insertions(+) commit 635c659fceed82f934623188471ff604e098aab7 Author: Lijo Lazar <lijo.lazar@amd.com> Date: Thu Dec 12 09:46:30 2024 +0530 drm/amdgpu: Use dbg level for VBIOS check messages Driver has different ways to fetch VBIOS. If one of the methods doesn't find an authentic one, it will show misleading info messages eventhough a subsequent method finds a valid VBIOS. Keep the message level at debug and add device context. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 54a1b36d4bd93c3dcfdeacf136ef7cd6387553b2 Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Date: Fri Dec 6 14:02:47 2024 +0100 drm/amdgpu: remove useless init from amdgpu_job_alloc This init is useless because base.sched will be cleared to 0 in drm_sched_job_init because of commit 2320c9e6a768 ("drm/sched: memset() 'job' in drm_sched_job_init()"). Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 5 ----- 1 file changed, 5 deletions(-) commit 0014952b1754b0dba3ea87d2d3b9784fdcec9f95 Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Date: Fri Dec 6 13:16:14 2024 +0100 drm/amdgpu: drop the amdgpu_device argument from amdgpu_ib_free It's unused. Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 ++---- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 2 +- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c | 14 +++++++------- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 +- 27 files changed, 40 insertions(+), 45 deletions(-) commit 2ae520cb12831d264ceb97c61f72c59d33c0dbd7 Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Date: Fri Dec 6 13:17:45 2024 +0100 drm/amdgpu: don't access invalid sched Since 2320c9e6a768 ("drm/sched: memset() 'job' in drm_sched_job_init()") accessing job->base.sched can produce unexpected results as the initialisation of (*job)->base.sched done in amdgpu_job_alloc is overwritten by the memset. This commit fixes an issue when a CS would fail validation and would be rejected after job->num_ibs is incremented. In this case, amdgpu_ib_free(ring->adev, ...) will be called, which would crash the machine because the ring value is bogus. To fix this, pass a NULL pointer to amdgpu_ib_free(): we can do this because the device is actually not used in this function. The next commit will remove the ring argument completely. Fixes: 2320c9e6a768 ("drm/sched: memset() 'job' in drm_sched_job_init()") Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6f685a8134cb40b8b76401d2a6b1d62a001669be Author: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Date: Thu Dec 12 09:47:17 2024 +0800 drm/amd/display: use swap() in update_phy_id_mapping() Use existing swap() function rather than duplicating its implementation. ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c:185:47-48: WARNING opportunity for swap(). ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c:125:53-54: WARNING opportunity for swap(). Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=12335 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 69b54d7c7c9435462322e451207a0de9b3409751 Author: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com> Date: Thu Dec 12 16:26:24 2024 +0530 drm/amdgpu: simplify return statement in amdgpu_ras_eeprom_init Remove the logically dead code in the last return statement of amdgpu_ras_eeprom_init. The condition res < 0 is redundant since res is already checked for a negative value earlier. Replace return res < 0 ? res : 0; with return 0 to improve clarity. Fixes: 63d4c081a556 ("drm/amdgpu: Optimize EEPROM RAS table I/O") Closes: https://scan7.scan.coverity.com/#/project-view/52337/11354?selectedIssue=1602413 Signed-off-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e50642d41050c2182368171d5afb0543b38f379 Author: Alex Deucher <alexander.deucher@amd.com> Date: Thu Oct 31 13:51:35 2024 -0400 drm/amd/display: add non-DC drm_panic support Add support for the drm_panic module, which displays a pretty user friendly message on the screen when a Linux kernel panic occurs. Adapt Lu Yao's code to use common helpers derived from Jocelyn's patch. This extends the non-DC code to enable access to non-CPU accessible VRAM and adds support for other DCE versions. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Lu Yao <yaolu@kylinos.cn> Cc: Jocelyn Falempe <jfalempe@redhat.com> Cc: Harry Wentland <harry.wentland@amd.com> drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 27 +++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 27 +++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 27 +++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 26 ++++++++++++++++++++++++++ 4 files changed, 107 insertions(+) commit 736692c3b7c072eb25d64ee5aca29bb525f3818f Author: Jocelyn Falempe <jfalempe@redhat.com> Date: Thu Oct 31 13:27:03 2024 -0400 drm/amd/display: add DC drm_panic support Add support for the drm_panic module, which displays a pretty user friendly message on the screen when a Linux kernel panic occurs. It doesn't work yet on laptop panels, maybe due to PSR. Adapted from Jocelyn's original patch to add DC drm_panic support. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Lu Yao <yaolu@kylinos.cn> Cc: Jocelyn Falempe <jfalempe@redhat.com> Cc: Harry Wentland <harry.wentland@amd.com> .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 30 +++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 1ad5bdc28bafa66db0f041cc6cdd278a80426aae Author: Mario Limonciello <mario.limonciello@amd.com> Date: Wed Dec 11 09:56:01 2024 -0600 drm/amd: Require CONFIG_HOTPLUG_PCI_PCIE for BOCO If the kernel hasn't been compiled with PCIe hotplug support this can lead to problems with dGPUs that use BOCO because they effectively drop off the bus. To prevent issues, disable BOCO support when compiled without PCIe hotplug. Reported-by: Gabriel Marcano <gabemarcano@yahoo.com> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/1707#note_2696862 Acked-by: Alex Deucher <alexander.deucher@amd.com> Link: https://lore.kernel.org/r/20241211155601.3585256-1-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+) commit 3676f37a88432132bcff55a17dc48911239b6d98 Author: Bokun Zhang <bokun.zhang@amd.com> Date: Wed Dec 11 15:42:56 2024 -0600 drm/amdgpu/vcn: reset fw_shared under SRIOV - The previous patch only considered the case for baremetal and is not applicable for SRIOV code path. We also need to init fw_share for SRIOV VF Fixes: 928cd772e18f ("drm/amdgpu/vcn: reset fw_shared when VCPU buffers corrupted on vcn v4.0.3") Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Bokun Zhang <bokun.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 2 ++ 1 file changed, 2 insertions(+) commit b7a287fa0c22802529aa346527512b155a8378fe Author: Alex Deucher <alexander.deucher@amd.com> Date: Tue Nov 12 16:19:18 2024 -0500 drm/amd/display/dc: add helper for panic updates Add a DC helper for panic updates. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Lu Yao <yaolu@kylinos.cn> Cc: Jocelyn Falempe <jfalempe@redhat.com> Cc: Harry Wentland <harry.wentland@amd.com> drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 46 ++++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc_plane.h | 3 ++ 2 files changed, 49 insertions(+) commit 98471006aecb20e1016f76354efa22889302abda Author: Alex Deucher <alexander.deucher@amd.com> Date: Thu Oct 31 13:20:19 2024 -0400 drm/amd/display: add clear_tiling mi callbacks This adds clear_tiling callbacks to the mi structure that will be used for drm panic support to clear the tiling on a display. Mem input (mi) is used on DCE based display IPs. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Lu Yao <yaolu@kylinos.cn> Cc: Jocelyn Falempe <jfalempe@redhat.com> Cc: Harry Wentland <harry.wentland@amd.com> drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 34 ++++++++++++++++++---- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 2 ++ 2 files changed, 31 insertions(+), 5 deletions(-) commit 1fa5c5a3173581e22f01948aa9bed0251084c313 Author: Alex Deucher <alexander.deucher@amd.com> Date: Thu Oct 31 13:17:06 2024 -0400 drm/amd/display: add clear_tiling hubp callbacks This adds clear_tiling callbacks to the hubp structure that will be used for drm panic support to clear the tiling on a display. hubp3 support from Jocelyn's original patch and the rest from me. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Lu Yao <yaolu@kylinos.cn> Cc: Jocelyn Falempe <jfalempe@redhat.com> Cc: Harry Wentland <harry.wentland@amd.com> drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c | 15 +++++++++++++++ drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.h | 2 ++ drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c | 15 +++++++++++++++ drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.h | 2 ++ .../gpu/drm/amd/display/dc/hubp/dcn201/dcn201_hubp.c | 1 + drivers/gpu/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c | 1 + drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c | 17 +++++++++++++++++ drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.h | 2 ++ drivers/gpu/drm/amd/display/dc/hubp/dcn31/dcn31_hubp.c | 1 + drivers/gpu/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.c | 3 ++- drivers/gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c | 1 + .../gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c | 15 ++++++++++++++- .../gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.h | 2 ++ drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 1 + 14 files changed, 76 insertions(+), 2 deletions(-) commit fe151ed7af5425c424a5735ef9fa3d02c828be7f Author: Alex Deucher <alexander.deucher@amd.com> Date: Wed Oct 30 17:27:23 2024 -0400 drm/amdgpu: add generic display panic helper code Pull this out of Jocelyn's patch and make it generic. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Lu Yao <yaolu@kylinos.cn> Cc: Jocelyn Falempe <jfalempe@redhat.com> Cc: Harry Wentland <harry.wentland@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 80 +++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 5 ++ 2 files changed, 85 insertions(+) commit 77b1ccb2a27c7b3b118a03bf1730def92070d31b Author: Min-Hua Chen <minhuadotchen@gmail.com> Date: Sat Dec 14 16:17:06 2024 +0800 drm/rockchip: vop2: include rockchip_drm_drv.h Move rockchip_drm_drv.h in rockchip_drm_vop2.h to fix the follow sparse warning: ARCH=arm64 LLVM=1 make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' mrproper defconfig all -j12 drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:502:24: sparse: warning: symbol 'vop2_platform_driver' was not declared. Should it be static? It is also beneficial for the upcoming support for rk3576. Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com> Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Min-Hua Chen <minhuadotchen@gmail.com> Tested-by: Detlev Casanova <detlev.casanova@collabora.com> Tested-by: Michael Riesch <michael.riesch@wolfvision.net> # on RK3568 Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241214081719.3330518-8-andyshrk@163.com drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 1 - drivers/gpu/drm/rockchip/rockchip_drm_vop2.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 7e8a56c703c67bfa8d3f71a0c1c297bb1252b897 Author: Andy Yan <andy.yan@rock-chips.com> Date: Sat Dec 14 16:17:05 2024 +0800 drm/rockchip: vop2: Add check for 32 bpp format for rk3588 RK3588 only support DRM_FORMAT_XRGB2101010/XBGR2101010 in afbc mode. Fixes: 5a028e8f062f ("drm/rockchip: vop2: Add support for rk3588") Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241214081719.3330518-7-andyshrk@163.com drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit df063c0b8ffbdca486ab2f802e716973985d8f86 Author: Andy Yan <andy.yan@rock-chips.com> Date: Sat Dec 14 16:17:04 2024 +0800 drm/rockchip: vop2: Check linear format for Cluster windows on rk3566/8 The Cluster windows on rk3566/8 only support afbc mode. Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241214081719.3330518-6-andyshrk@163.com drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c766998ba6df126ab6934d32ff2ff080316ec630 Author: Andy Yan <andy.yan@rock-chips.com> Date: Sat Dec 14 16:17:03 2024 +0800 drm/rockchip: vop2: Setup delay cycle for Esmart2/3 Each layer needs to set the correct delay cycle to display properly without unexpected offset on screen. Fixes: 5a028e8f062f ("drm/rockchip: vop2: Add support for rk3588") Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Tested-by: Derek Foreman <derek.foreman@collabora.com> Tested-by: Detlev Casanova <detlev.casanova@collabora.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241214081719.3330518-5-andyshrk@163.com drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 ++ 1 file changed, 2 insertions(+) commit 7b256880fdb2d7f23393b87bb557090f049e686a Author: Andy Yan <andy.yan@rock-chips.com> Date: Sat Dec 14 16:17:02 2024 +0800 drm/rockchip: vop2: Set AXI id for rk3588 There are two AXI bus in vop2, windows attached on the same bus must have a unique channel YUV and RGB channel ID. The default IDs will conflict with each other on the rk3588, so they need to be reassigned. Fixes: 5a028e8f062f ("drm/rockchip: vop2: Add support for rk3588") Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Tested-by: Derek Foreman <derek.foreman@collabora.com> Tested-by: Detlev Casanova <detlev.casanova@collabora.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241214081719.3330518-4-andyshrk@163.com drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 14 ++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop2.h | 9 +++++++++ drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 26 +++++++++++++++++++++++++- 3 files changed, 48 insertions(+), 1 deletion(-) commit f663898d047a7a0a04d30732b1405ee007fdd243 Author: Bence Csókás <csokas.bence@prolan.hu> Date: Wed Dec 18 16:17:54 2024 +0100 spi: atmel-quadspi: Factor out switching to Serial Memory Mode to function SAMA7G5 support (that was forward-ported from v6.1) re-introduced a bug that was fixed in v6.12, thankfully only in the codepath of the new SoC. But to prevent similar mistakes in the future, we split out the offending code to a function, and use this, fixed version everywhere. To facilitate this, support function `atmel_qspi_update_config()` also had to be moved upwards. For best viewing experience, use `--color-moved-ws="allow-indentation-change" --color-moved`. Fixes: 5af42209a4d2 ("spi: atmel-quadspi: Add support for sama7g5 QSPI") Reported-by: Alexander Dahl <ada@thorsis.com> Closes: https://lore.kernel.org/linux-spi/20241218-appliance-jaws-90773405977a@thorsis.com/ Signed-off-by: Bence Csókás <csokas.bence@prolan.hu> Link: https://patch.msgid.link/20241218151754.365519-1-csokas.bence@prolan.hu Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/atmel-quadspi.c | 101 +++++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 48 deletions(-) commit 0c5928deada15a8d075516e6e0d9ee19011bb000 Author: Yutaro Ohno <yutaro.ono.418@gmail.com> Date: Thu Oct 24 00:54:59 2024 +0900 rust: block: fix formatting in GenDisk doc Align bullet points and improve indentation in the `Invariants` section of the `GenDisk` struct documentation for better readability. [ Yutaro is also working on implementing the lint we suggested to catch this sort of issue in upstream Rust: https://github.com/rust-lang/rust-clippy/issues/13601 https://github.com/rust-lang/rust-clippy/pull/13711 Thanks a lot! - Miguel ] Fixes: 3253aba3408a ("rust: block: introduce `kernel::block::mq` module") Signed-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com> Reviewed-by: Boqun Feng <boqun.feng@gmail.com> Acked-by: Andreas Hindborg <a.hindborg@kernel.org> Link: https://lore.kernel.org/r/ZxkcU5yTFCagg_lX@ohnotp Signed-off-by: Miguel Ojeda <ojeda@kernel.org> rust/kernel/block/mq/gen_disk.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit de076198d1e4934c5fc17aa52d5f1884f469ce1a Author: Ninad Palsule <ninad@linux.ibm.com> Date: Tue Dec 17 11:35:33 2024 -0600 hwmon: (pmbus/crps) Add Intel CRPS185 power supply Add the driver to monitor Intel common redundant power supply (crps185) with hwmon over pmbus. Signed-off-by: Ninad Palsule <ninad@linux.ibm.com> Link: https://lore.kernel.org/r/20241217173537.192331-3-ninad@linux.ibm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/hwmon/crps.rst | 97 +++++++++++++++++++++++++++++++++++++++++++ Documentation/hwmon/index.rst | 1 + MAINTAINERS | 7 ++++ drivers/hwmon/pmbus/Kconfig | 9 ++++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/crps.c | 74 +++++++++++++++++++++++++++++++++ 6 files changed, 189 insertions(+) commit 18e930f9813345abecbee994ede58ebac274e9f4 Author: Ninad Palsule <ninad@linux.ibm.com> Date: Tue Dec 17 11:35:34 2024 -0600 dt-bindings: hwmon: intel,crps185: Add to trivial Add INTEL Common Redundant Power Supply Versions crps185 bindings as trivial. The hardware does not have any resources like clocks which are required to be included in the device tree. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Ninad Palsule <ninad@linux.ibm.com> Link: https://lore.kernel.org/r/20241217173537.192331-4-ninad@linux.ibm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 409e29df6d149c37009c9547647cbb85f82d77e1 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Wed Dec 18 08:41:34 2024 +0100 hwmon: (lm75) Fix LM75B document link NXP reorganized their website. Update the link for the LM75B datasheet. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20241218074131.4351-8-wsa+renesas@sang-engineering.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/hwmon/lm75.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3506653d01c0df1f1c86cd49fe70c98f00f1aef Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Wed Dec 18 08:41:33 2024 +0100 hwmon: (lm75) Add NXP P3T1755 support Add this LM75 compatible sensor which needs a separate entry because of its default sampling time and SMBusAlert handling. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20241218074131.4351-7-wsa+renesas@sang-engineering.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/hwmon/lm75.rst | 6 ++++-- drivers/hwmon/lm75.c | 13 +++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) commit 3ace3c42144c8664b900ede3520c5e02e4d450ac Merge: 388cf16d90f6 4c41a48f5f3e Author: Alexander Gordeev <agordeev@linux.ibm.com> Date: Wed Dec 18 16:06:24 2024 +0100 Merge branch 'pci-device-recovery' into features Niklas Schnelle says: =================== This patch series enhances the introspectability of the PCI device recovery for firmware. Until now when Linux performs recovery in response to a firmware error report. For example, until now firmware debug data would have no indication if the recovery was successfull or if it failed, for example due to KVM pass-through. Improve on this by reporting recovery status as well as some debug information such as device driver name and s390dbf/pci_msg/sprintf logs via the SCLP Write Event Data Action Qualifier 2 (Log Data provided) mechanism. =================== Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> commit 844029c59d44c590871b93fdc9720245a71f63c4 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Wed Dec 18 08:41:32 2024 +0100 dt-bindings: hwmon: lm75: Add NXP P3T1755 Add this LM75 compatible sensor which needs a separate entry because of its default sampling time and SMBusAlert handling. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241218074131.4351-6-wsa+renesas@sang-engineering.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/devicetree/bindings/hwmon/lm75.yaml | 1 + 1 file changed, 1 insertion(+) commit 8e461a1cb43d69d2fc8a97e61916dce571e6bb31 Author: Sultan Alsawaf (unemployed) <sultan@kerneltoast.com> Date: Wed Dec 11 17:57:32 2024 -0800 cpufreq: schedutil: Fix superfluous updates caused by need_freq_update A redundant frequency update is only truly needed when there is a policy limits change with a driver that specifies CPUFREQ_NEED_UPDATE_LIMITS. In spite of that, drivers specifying CPUFREQ_NEED_UPDATE_LIMITS receive a frequency update _all the time_, not just for a policy limits change, because need_freq_update is never cleared. Furthermore, ignore_dl_rate_limit()'s usage of need_freq_update also leads to a redundant frequency update, regardless of whether or not the driver specifies CPUFREQ_NEED_UPDATE_LIMITS, when the next chosen frequency is the same as the current one. Fix the superfluous updates by only honoring CPUFREQ_NEED_UPDATE_LIMITS when there's a policy limits change, and clearing need_freq_update when a requisite redundant update occurs. This is neatly achieved by moving up the CPUFREQ_NEED_UPDATE_LIMITS test and instead setting need_freq_update to false in sugov_update_next_freq(). Fixes: 600f5badb78c ("cpufreq: schedutil: Don't skip freq update when limits change") Signed-off-by: Sultan Alsawaf (unemployed) <sultan@kerneltoast.com> Reviewed-by: Christian Loehle <christian.loehle@arm.com> Link: https://patch.msgid.link/20241212015734.41241-2-sultan@kerneltoast.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> kernel/sched/cpufreq_schedutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6ee5233a4c91fd0299c439b06d2d79bae54db4a3 Author: Chen-Yu Tsai <wenst@chromium.org> Date: Tue Dec 10 15:32:11 2024 +0800 mmc: mtk-sd: Limit getting top_base to SoCs that require it Currently the mtk-sd driver tries to get and map the second register base, named top_base in the code, regardless of whether the SoC model actually has it or not. This produces confusing big error messages on the platforms that don't need it: mtk-msdc 11260000.mmc: error -EINVAL: invalid resource (null) Limit it to the platforms that actually require it, based on their device tree entries, and properly fail if it is missing. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Message-ID: <20241210073212.3917912-3-wenst@chromium.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/mtk-sd.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 6af057a8a5f60512ea49af028e5cf4042cb70de3 Author: Chen-Yu Tsai <wenst@chromium.org> Date: Tue Dec 10 15:32:10 2024 +0800 dt-bindings: mmc: mtk-sd: Document compatibles that need two register ranges Besides the MT8183's MMC controller and all its compatible derivatives, the recently added MT7986 and MT8196 also require two register ranges. This is based on the actual device trees. Properly enforce this in the binding. Fixes: 4a8bd2b07d88 ("dt-bindings: mmc: mtk-sd: Add mt7988 SoC") Fixes: 58927c9dc4ab ("dt-bindings: mmc: mtk-sd: Add support for MT8196") Cc: Frank Wunderlich <frank-w@public-files.de> Cc: Andy-ld Lu <andy-ld.lu@mediatek.com> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Message-ID: <20241210073212.3917912-2-wenst@chromium.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit de51589f9bd98efddf4ab776d3a490e81905ef7c Author: Christian Loehle <christian.loehle@arm.com> Date: Wed Dec 11 12:26:05 2024 +0000 cpufreq: intel_pstate: Use CPUFREQ_POLICY_UNKNOWN epp_policy uses the same values as cpufreq_policy.policy and resets to CPUFREQ_POLICY_UNKNOWN during offlining. Be consistent about it and initialize to CPUFREQ_POLICY_UNKNOWN instead of 0, too. No functional change intended. Signed-off-by: Christian Loehle <christian.loehle@arm.com> Link: https://patch.msgid.link/20241211122605.3048503-3-christian.loehle@arm.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/cpufreq/intel_pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecfe4926dcdc68e9dde8150df583703b32bc9833 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Fri Nov 1 12:11:34 2024 +0200 mmc: sdhci-acpi: Use devm_platform_ioremap_resource() The struct resource is not used for anything else, so we can simplify the code a bit by using the helper function. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Message-ID: <20241101101441.3518612-5-andriy.shevchenko@linux.intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/sdhci-acpi.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 88e3008424d3882af1d8e56a43373bb1f2d14714 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Fri Nov 1 12:11:33 2024 +0200 mmc: sdhci-acpi: Remove not so useful error message First of all, this error message is just informative and doesn't prevent driver from going on. Second, the ioremap() on many architectures just works on page size granularity, which is higher than 256 bytes. Last, but not lease, this is an impediment for furhter cleanups, hence remove it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Message-ID: <20241101101441.3518612-4-andriy.shevchenko@linux.intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/sdhci-acpi.c | 3 --- 1 file changed, 3 deletions(-) commit 46b155acbf4ee4ebf6bd7d5661b08762220ab894 Author: Xu Yilun <yilun.xu@intel.com> Date: Tue Nov 19 20:10:34 2024 -0500 fpga: dfl: destroy/recreate feature platform device on port release/assign Now that the internal DFL APIs have been converted to consume DFL enumeration info from a separate structure, dfl_feature_dev_data, which lifetime is independent of the feature device, proceed to completely destroy and recreate the feature platform device on port release and assign, respectively. This resolves a longstanding issue in the use of platform_device_add(), which states to "not call this routine more than once for any device structure" and which used to print a kernel warning. The function feature_dev_unregister() resets the device pointer in the feature data to NULL to signal that the feature platform device has been destroyed. This substitutes the previous device_is_registered() checks. Signed-off-by: Xu Yilun <yilun.xu@intel.com> Signed-off-by: Russ Weight <russell.h.weight@intel.com> Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-19-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit ff1f06b60ab041b3ff69c7b3e23d5d5d5ae2f97e Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:33 2024 -0500 fpga: dfl: drop unneeded get_device() and put_device() of feature device The feature device data was originally stored as platform data, hence the memory allocation was tied to the lifetime of the feature device. Now that the feature device data is tied to the lifetime of the DFL PCIe FPGA device instead, get_device() and put_device() are no longer needed. Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-18-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl-fme-br.c | 2 -- drivers/fpga/dfl.c | 16 +++++----------- drivers/fpga/dfl.h | 5 ----- 3 files changed, 5 insertions(+), 18 deletions(-) commit 57146d9454882c4539f0f239505958ad8e0ddfd8 Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:32 2024 -0500 fpga: dfl: remove unneeded function build_info_create_dev() Remove the function build_info_create_dev(), which no longer serves its original purpose now that the allocation of the platform device has been moved to feature_dev_register(). Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-17-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit fa74e62d6af08fe7a8b69683953a2dab40e9ae2f Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:31 2024 -0500 fpga: dfl: allocate platform device after feature device data Delay calling platform_device_alloc() from build_info_create_dev() to feature_dev_register(), now that the feature device data contains all necessary data to create the feature device. This completes the new function feature_dev_register(), which will be reused in a subsequent commit to fully recreate the feature device when assigning a port. In the function feature_dev_unregister(), reset the device pointer in the feature data to NULL to signal that the platform device has been destroyed. This will substitute device_is_registered() in a subsequent commit. Reset the device pointer of each sub feature for consistency. Convert is_feature_dev_detected() to check whether binfo->type is not DFL_ID_MAX for deciding whether a feature device was detected during feature parsing, instead of checking binfo->feature_dev for non-NULL. Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-16-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl.c | 72 ++++++++++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 38 deletions(-) commit 59c265babab697aaa80814fe808cbb8942a14b9d Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:30 2024 -0500 fpga: dfl: store platform device id in feature device data Delay the feature device id allocation from build_info_create_dev() to binfo_create_feature_dev_data() and store the id in the feature device data before copying it to the device. This will allow reusing the same id in a subsequent commit which completely destroys and recreates the feature device when releasing and reassigning the corresponding port. Instead of manually freeing the id when no longer needed, use a device-managed resource with a custom action to automatically free the id right before the feature device data is freed. The id registry is guaranteed to be allocated when dfl_id_free_action() is invoked, since the DFL PCIe device and its device-managed resources will be destroyed before dfl_ids_destroy() is called in dfl_fpga_exit(). Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-15-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl.c | 46 +++++++++++++++++++++++----------------------- drivers/fpga/dfl.h | 2 ++ 2 files changed, 25 insertions(+), 23 deletions(-) commit 3ddcf99119603b102e19e5f44338c1524cc549b7 Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:29 2024 -0500 fpga: dfl: store platform device name in feature device data Add a new member, pdev_name, to the structure dfl_feature_dev_data that holds the platform device name for convenience. A subsequent commit will completely destroy the platform device during port release, after which fdata->dev is unavailable, while fdata itself remains available. Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-14-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl.c | 3 ++- drivers/fpga/dfl.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 7b15c41110382ccc208a046932c762bcca16b5b1 Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:28 2024 -0500 fpga: dfl: store MMIO resources in feature device data Instead of directly copying the MMIO resource of each feature to the feature device resources, add a new member to the feature device data to store the resources and copy them to the feature device using platform_device_add_resources(). This prepares a subsequent commit which completely destroys and recreates the feature device when releasing and reassigning the corresponding port, respectively. Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-13-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl.c | 21 +++++++++++++-------- drivers/fpga/dfl.h | 4 ++++ 2 files changed, 17 insertions(+), 8 deletions(-) commit b3245f700ae2e9f0ecbcf36b8908f6460db91202 Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:27 2024 -0500 fpga: dfl: convert features from flexible array member to separate array Use a separate array allocation for features and substitute a pointer for the flexible array member in the feature device data. A subsequent commit will add another array for resources. The current commit converts the flexible array member to a separate allocation for consistency. Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-12-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl.c | 7 ++++++- drivers/fpga/dfl.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) commit 39ea74e33edc034831ed19902bfc17354c8fc8db Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:26 2024 -0500 fpga: dfl: factor out feature device data from platform device data Add a structure dfl_feature_dev_data to hold the DFL enumeration info previously held in dfl_feature_platform_data. Allocate the new structure using device-managed memory whose lifetime is bound to the lifetime of the physical DFL, e.g., PCIe FPGA device. In a subsequent commit, this will allow the feature platform device to be completely destroyed and recreated on port release and assign, respectively, while retaining the feature data in the new dfl_feature_dev_data structure. Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-11-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl.c | 16 +++++++--------- drivers/fpga/dfl.h | 42 ++++++++++++++++++++++++++++-------------- 2 files changed, 35 insertions(+), 23 deletions(-) commit 0783f41b00502d29fd70c31e727671d4a94e92f6 Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:25 2024 -0500 fpga: dfl: factor out feature device registration Add separate functions, feature_dev_{register,unregister}(), that wrap platform_device_add() and platform_device_unregister(), respectively. These are invoked once per feature device in this commit but will be reused in a subsequent commit to destroy and recreate the platform device when the corresponding port is released and reassigned. The function feature_dev_register() will be extended in subsequent commits to allocate the platform device, add resources and platform data, and finally add the platform device to the device hierarchy. Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-10-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) commit af3940713e3aed3c096ddd5a9f61152c067681b6 Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:24 2024 -0500 fpga: dfl: refactor internal DFL APIs to take/return feature device data This change prepares a subsequent commit which factors out the DFL enumeration info from the structure dfl_feature_platform_data into a new structure dfl_feature_dev_data, whose lifetime is independent of the feature device which will be destroyed during port release. Add an alias dfl_feature_dev_data for dfl_feature_platform_data, and an alias to_dfl_feature_dev_data() for dev_get_platdata(), and refactor internal DFL APIs to take/return dfl_feature_dev_data instead. The aliases will be replaced with implementations in a subsequent commit. This change does not introduce any functional changes. Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-9-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl-afu-dma-region.c | 110 +++++++-------- drivers/fpga/dfl-afu-error.c | 60 ++++----- drivers/fpga/dfl-afu-main.c | 276 +++++++++++++++++++------------------- drivers/fpga/dfl-afu-region.c | 48 +++---- drivers/fpga/dfl-afu.h | 26 ++-- drivers/fpga/dfl-fme-br.c | 22 +-- drivers/fpga/dfl-fme-error.c | 102 +++++++------- drivers/fpga/dfl-fme-main.c | 98 +++++++------- drivers/fpga/dfl-fme-pr.c | 84 ++++++------ drivers/fpga/dfl.c | 186 ++++++++++++------------- drivers/fpga/dfl.h | 77 ++++++----- 11 files changed, 546 insertions(+), 543 deletions(-) commit 975a7301f581d7f5f9d84539b0ad45bb82c2ac3d Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:23 2024 -0500 fpga: dfl: store FIU type in feature platform data Remove the local function feature_dev_id_type() in favor of persisting the FIU type in struct dfl_feature_platform_data. Add type to struct build_feature_devs_info and drop argument to build_info_create_dev(). Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-8-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl.c | 55 ++++++++++++++++++++++++++---------------------------- drivers/fpga/dfl.h | 3 +++ 2 files changed, 29 insertions(+), 29 deletions(-) commit fccfc01148d6f920c5fcf2c159ae375f2c98ec52 Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:22 2024 -0500 fpga: dfl: factor out feature data creation from build_info_commit_dev() Add a separate function, binfo_create_feature_dev_data(), which allocates and populates the feature platform data, and call the function from build_info_commit_dev(), which registers the feature platform device. Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-7-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl.c | 72 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 32 deletions(-) commit 512eadb33489fac4245abdede396cbda17e79a8b Author: Nitin Gote <nitin.r.gote@intel.com> Date: Tue Dec 17 12:05:32 2024 +0530 drm/i915/gt: Increase a time to retry RING_HEAD reset Issue seen again where engine resets fails because the engine resumes from an incorrect RING_HEAD. HEAD is still not 0 even after writing into it. This seems to be timing issue and we experimented different values from 5ms to 50ms and found out that 50ms works best based on testing. So, if write doesn't succeed at first then retry again. v2: add a comment (Andi Shyti) Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12806 Signed-off-by: Nitin Gote <nitin.r.gote@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217063532.2729031-1-nitin.r.gote@intel.com drivers/gpu/drm/i915/gt/intel_ring_submission.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 7b34395a619cb79e85b8a0b99e620eb2cd6aaf19 Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:21 2024 -0500 fpga: dfl: pass feature platform data instead of device as argument For functions which use the feature platform data, instead of invoking dev_get_platdata() on the device, directly pass the data as an argument. This patch is part of a refactoring of the internal DFL APIs to move the feature device data into a new struct dfl_feature_dev_data which lifetime is independent of the corresponding platform device. Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-6-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl-afu-error.c | 29 +++++++++-------- drivers/fpga/dfl-afu-main.c | 76 +++++++++++++++++++++++--------------------- drivers/fpga/dfl-afu.h | 4 +-- drivers/fpga/dfl-fme-br.c | 26 +++++++-------- drivers/fpga/dfl-fme-error.c | 32 +++++++++++-------- drivers/fpga/dfl-fme-main.c | 18 +++++++---- drivers/fpga/dfl-fme-pr.c | 6 ++-- drivers/fpga/dfl.c | 75 +++++++++++++++++++------------------------ drivers/fpga/dfl.h | 35 ++++++++++---------- 9 files changed, 152 insertions(+), 149 deletions(-) commit e5d3a57891ba500503df075b99b78d6e61f2694e Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri Dec 13 12:50:40 2024 -0800 x86/cpu: Make all all CPUID leaf names consistent The leaf names are not consistent. Give them all a CPUID_LEAF_ prefix for consistency and vertical alignment. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Acked-by: Dave Jiang <dave.jiang@intel.com> # for ioatdma bits Link: https://lore.kernel.org/all/20241213205040.7B0C3241%40davehans-spike.ostc.intel.com arch/x86/events/intel/pt.c | 4 ++-- arch/x86/include/asm/cpuid.h | 12 ++++++------ arch/x86/kernel/acpi/cstate.c | 4 ++-- arch/x86/kernel/cpu/common.c | 6 +++--- arch/x86/kernel/fpu/xstate.c | 20 ++++++++++---------- arch/x86/kernel/hpet.c | 2 +- arch/x86/kernel/process.c | 2 +- arch/x86/kernel/smpboot.c | 2 +- arch/x86/kernel/tsc.c | 18 +++++++++--------- arch/x86/xen/enlighten_pv.c | 4 ++-- drivers/acpi/acpi_pad.c | 2 +- drivers/dma/ioat/dca.c | 2 +- drivers/idle/intel_idle.c | 2 +- drivers/platform/x86/intel/pmc/core.c | 4 ++-- 14 files changed, 42 insertions(+), 42 deletions(-) commit 588e148d8babeb2fd863fb152b80548e18971caf Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri Dec 13 12:50:38 2024 -0800 x86/fpu: Remove unnecessary CPUID level check The CPUID level dependency table will entirely zap X86_FEATURE_XSAVE if the CPUID level is too low. This code is unreachable. Kill it. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Chang S. Bae <chang.seok.bae@intel.com> Link: https://lore.kernel.org/all/20241213205038.6E71F9A4%40davehans-spike.ostc.intel.com arch/x86/kernel/fpu/xstate.c | 5 ----- 1 file changed, 5 deletions(-) commit 754aaac3bbf13bdbbed9da94b56f371e90fd9c96 Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri Dec 13 12:50:37 2024 -0800 x86/fpu: Move CPUID leaf definitions to common code Move the XSAVE-related CPUID leaf definitions to common code. Then, use the new definition to remove the last magic number from the CPUID level dependency table. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/all/20241213205037.43C57CDE%40davehans-spike.ostc.intel.com arch/x86/include/asm/cpuid.h | 2 ++ arch/x86/include/asm/fpu/xstate.h | 4 ---- arch/x86/kernel/cpu/common.c | 2 +- arch/x86/kernel/fpu/xstate.c | 1 + 4 files changed, 4 insertions(+), 5 deletions(-) commit cf126261d5d3b8767fd9c838ffe7213144d05147 Author: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Wed Dec 18 10:43:58 2024 +0800 ASoC: fsl_asrc_m2m: force cast for snd_pcm_format_t type Fix sparse warnings: fsl_asrc_m2m.c:360:45: sparse: warning: incorrect type in argument 1 (different base types) fsl_asrc_m2m.c:360:45: sparse: expected restricted snd_pcm_format_t [usertype] pcm_forma fsl_asrc_m2m.c:360:45: sparse: got unsigned int [usertype] format fsl_asrc_m2m.c:361:41: sparse: warning: incorrect type in assignment (different base types) fsl_asrc_m2m.c:361:41: sparse: expected restricted snd_pcm_format_t fsl_asrc_m2m.c:361:41: sparse: got unsigned int [usertype] format fsl_asrc_m2m.c:365:45: sparse: warning: incorrect type in argument 1 (different base types) fsl_asrc_m2m.c:365:45: sparse: expected restricted snd_pcm_format_t [usertype] pcm_forma fsl_asrc_m2m.c:365:45: sparse: got unsigned int [usertype] pcm_format fsl_asrc_m2m.c:366:42: sparse: warning: incorrect type in assignment (different base types) fsl_asrc_m2m.c:366:42: sparse: expected restricted snd_pcm_format_t fsl_asrc_m2m.c:366:42: sparse: got unsigned int [usertype] pcm_format fsl_asrc_m2m.c:595:54: sparse: warning: incorrect type in assignment (different base types) fsl_asrc_m2m.c:595:54: sparse: expected unsigned int [usertype] formats fsl_asrc_m2m.c:595:54: sparse: got restricted snd_pcm_format_t [assigned] [usertype] k Fixes: 24a01710f627 ("ASoC: fsl_asrc_m2m: Add memory to memory function") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412180043.PAA4t4sQ-lkp@intel.com/ Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20241218024358.3022635-1-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_asrc_m2m.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e558eadf6bd6199a3f454299de3c6338931d4e46 Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri Dec 13 12:50:36 2024 -0800 x86/tsc: Remove CPUID "frequency" leaf magic numbers. All the code that reads the CPUID frequency information leaf hard-codes a magic number. Give it a symbolic name and use it. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/all/20241213205036.4397658F%40davehans-spike.ostc.intel.com arch/x86/include/asm/cpuid.h | 1 + arch/x86/kernel/tsc.c | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) commit 030c15b5610cedf7eb428dab5382f73d492a7967 Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri Dec 13 12:50:34 2024 -0800 x86/tsc: Move away from TSC leaf magic numbers The TSC code has a bunch of hard-coded references to leaf 0x15. Change them over to the symbolic name. Also zap the 'ART_CPUID_LEAF' definition. It was a duplicate of 'CPUID_TSC_LEAF'. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/all/20241213205034.B79D6224%40davehans-spike.ostc.intel.com arch/x86/kernel/tsc.c | 11 +++++------ drivers/platform/x86/intel/pmc/core.c | 7 ++++--- 2 files changed, 9 insertions(+), 9 deletions(-) commit a86740a77bf0942e618cc5f022336cdd99530d10 Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri Dec 13 12:50:33 2024 -0800 x86/cpu: Move TSC CPUID leaf definition Prepare to use the TSC CPUID leaf definition more widely by moving it to the common header. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/all/20241213205033.68799E53%40davehans-spike.ostc.intel.com arch/x86/events/intel/pt.c | 1 + arch/x86/events/intel/pt.h | 3 --- arch/x86/include/asm/cpuid.h | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) commit 5d82d8e0a9ac06bfc6ac59407b96bc357eff441a Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri Dec 13 12:50:32 2024 -0800 x86/cpu: Refresh DCA leaf reading code The DCA leaf number is also hard-coded in the CPUID level dependency table. Move its definition to common code and use it. While at it, fix up the naming and types in the probe code. All CPUID data is provided in 32-bit registers, not 'unsigned long'. Also stop referring to "level_9". Move away from test_bit() because the type is no longer an 'unsigned long'. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/all/20241213205032.476A30FE%40davehans-spike.ostc.intel.com arch/x86/include/asm/cpuid.h | 3 ++- arch/x86/kernel/cpu/common.c | 2 +- drivers/dma/ioat/dca.c | 8 +++++--- 3 files changed, 8 insertions(+), 5 deletions(-) commit 262fba55708b60a063b30d103963477dc5026f8c Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri Dec 13 12:50:30 2024 -0800 x86/cpu: Remove unnecessary MwAIT leaf checks The CPUID leaf dependency checker will remove X86_FEATURE_MWAIT if the CPUID level is below the required level (CPUID_MWAIT_LEAF). Thus, if you check X86_FEATURE_MWAIT you do not need to also check the CPUID level. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/all/20241213205030.9B42B458%40davehans-spike.ostc.intel.com arch/x86/kernel/hpet.c | 3 --- arch/x86/kernel/smpboot.c | 2 -- drivers/acpi/acpi_pad.c | 2 -- drivers/idle/intel_idle.c | 3 --- 4 files changed, 10 deletions(-) commit 8bd6821c9cf3b81d3c07a94fa4e3f97a3cc7b724 Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri Dec 13 12:50:29 2024 -0800 x86/cpu: Use MWAIT leaf definition The leaf-to-feature dependency array uses hard-coded leaf numbers. Use the new common header definition for the MWAIT leaf. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/all/20241213205029.5B055D6E%40davehans-spike.ostc.intel.com arch/x86/kernel/cpu/common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 497f70284695bbb9b875e182554ef3f18b4a56e2 Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri Dec 13 12:50:28 2024 -0800 x86/cpu: Move MWAIT leaf definition to common header Begin constructing a common place to keep all CPUID leaf definitions. Move CPUID_MWAIT_LEAF to the CPUID header and include it where needed. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/all/20241213205028.EE94D02A%40davehans-spike.ostc.intel.com arch/x86/include/asm/cpuid.h | 2 ++ arch/x86/include/asm/mwait.h | 1 - arch/x86/kernel/acpi/cstate.c | 1 + arch/x86/kernel/hpet.c | 1 + arch/x86/kernel/process.c | 1 + arch/x86/kernel/smpboot.c | 1 + arch/x86/xen/enlighten_pv.c | 1 + drivers/acpi/acpi_pad.c | 1 + drivers/idle/intel_idle.c | 1 + 9 files changed, 9 insertions(+), 1 deletion(-) commit 221e29e197981e8e5882cdcf230d063598298e2f Author: Arnd Bergmann <arnd@arndb.de> Date: Wed Dec 18 09:58:57 2024 +0100 accel/amdxdna: include linux/slab.h This driver fails to build in random configurations: drivers/accel/amdxdna/aie2_solver.c: In function 'remove_partition_node': drivers/accel/amdxdna/aie2_solver.c:121:9: error: implicit declaration of function 'kfree' [-Wimplicit-function-declaration] 121 | kfree(pt_node); | ^~~~~ drivers/accel/amdxdna/aie2_solver.c: In function 'get_free_partition': drivers/accel/amdxdna/aie2_solver.c:153:19: error: implicit declaration of function 'kzalloc' [-Wimplicit-function-declaration] 153 | pt_node = kzalloc(sizeof(*pt_node), GFP_KERNEL); Add the missing include. Fixes: c88d3325ae69 ("accel/amdxdna: Add hardware resource solver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241218085902.2684002-1-arnd@kernel.org drivers/accel/amdxdna/aie2_solver.c | 1 + 1 file changed, 1 insertion(+) commit 5366d8965d35f0ea266c80e8970aa9527a9fee52 Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri Dec 13 10:51:33 2024 -0800 x86/cpu: Remove 'x86_cpu_desc' infrastructure All the users of 'x86_cpu_desc' are gone. Zap it from the tree. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/all/20241213185133.AF0BF2BC%40davehans-spike.ostc.intel.com arch/x86/include/asm/cpu_device_id.h | 35 ----------------------------------- arch/x86/kernel/cpu/match.c | 31 ------------------------------- 2 files changed, 66 deletions(-) commit f3f3251526739bb975b97f840c56b3054dba8638 Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri Dec 13 10:51:32 2024 -0800 x86/cpu: Move AMD erratum 1386 table over to 'x86_cpu_id' The AMD erratum 1386 detection code uses and old style 'x86_cpu_desc' table. Replace it with 'x86_cpu_id' so the old style can be removed. I did not create a new helper macro here. The new table is certainly more noisy than the old and it can be improved on. But I was hesitant to create a new macro just for a single site that is only two ugly lines in the end. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/all/20241213185132.07555E1D%40davehans-spike.ostc.intel.com arch/x86/kernel/cpu/amd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 1f2bf7049f6ef6048b56b18d0033d3e77b28f973 Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Thu Nov 28 19:44:28 2024 +0000 ntfs3: Remove an access to page->index Convert the first page passed to ni_write_frame() to a folio and use folio_pos() on that instead of open-coding the access to folio->index, cast & shift. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> fs/ntfs3/frecord.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c1bad69f8baf562b1d522740dc76e48f2a2a1918 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Mon Dec 16 16:56:05 2024 +0000 net: Remove bouncing hippi list linux-hippi is bouncing with: <linux-hippi@sunsite.dk>: Sorry, no mailbox here by that name. (#5.1.1) Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 5a49edec44f638952da8dc8d754e76f462c19034 Author: Andrew Lunn <andrew@lunn.ch> Date: Sun Dec 15 17:43:55 2024 +0000 net: dsa: qca8k: Fix inconsistent use of jiffies vs milliseconds wait_for_complete_timeout() expects a timeout in jiffies. With the driver, some call sites converted QCA8K_ETHERNET_TIMEOUT to jiffies, others did not. Make the code consistent by changes the #define to include a call to msecs_to_jiffies, and remove all other calls to msecs_to_jiffies. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: from Christian would be very welcome. Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/qca/qca8k-8xxx.c | 4 ++-- drivers/net/dsa/qca/qca8k.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 96bd1d50bfd30cb1e49aa6650d120946572d97af Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Dec 17 15:21:47 2024 +0200 drm/i915/display: drop unnecessary i915_drv.h includes Now that we don't include i915_drv.h via any headers from display, we can reliably remove unnecessary i915_drv.h includes and be sure they're not indirectly included. Add other includes where needed. v2: Fix 32-bit build Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217132147.2008057-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/dvo_ns2501.c | 1 - drivers/gpu/drm/i915/display/i9xx_display_sr.c | 3 ++- drivers/gpu/drm/i915/display/intel_acpi.c | 3 ++- drivers/gpu/drm/i915/display/intel_alpm.c | 1 - drivers/gpu/drm/i915/display/intel_display_debugfs_params.c | 3 ++- drivers/gpu/drm/i915/display/intel_display_params.c | 7 ++++++- drivers/gpu/drm/i915/display/intel_display_power_map.c | 6 ++---- drivers/gpu/drm/i915/display/intel_display_snapshot.c | 4 +++- drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 3 ++- drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 1 - drivers/gpu/drm/i915/display/intel_dp_link_training.c | 3 ++- drivers/gpu/drm/i915/display/intel_dp_test.c | 1 - drivers/gpu/drm/i915/display/intel_dp_tunnel.c | 3 +-- drivers/gpu/drm/i915/display/intel_hti.c | 3 ++- drivers/gpu/drm/i915/display/intel_link_bw.c | 3 +-- drivers/gpu/drm/i915/display/intel_load_detect.c | 2 +- drivers/gpu/drm/i915/display/intel_lspcon.c | 4 ++-- drivers/gpu/drm/i915/display/intel_panel.c | 1 - drivers/gpu/drm/i915/display/intel_pfit.c | 2 +- drivers/gpu/drm/i915/display/intel_quirks.c | 2 +- drivers/gpu/drm/i915/display/intel_vrr.c | 1 - 21 files changed, 30 insertions(+), 27 deletions(-) commit b8f2688258f886f0bc0c0cb3ebe51efaa12191ec Author: Kees Cook <kees@kernel.org> Date: Mon Dec 16 14:45:15 2024 -0800 inotify: Use strscpy() for event->name copies Since we have already allocated "len + 1" space for event->name, make sure that name->name cannot ever accidentally cause a copy overflow by calling strscpy() instead of the unbounded strcpy() routine. This assists in the ongoing efforts to remove the unsafe strcpy() API[1] from the kernel. Link: https://github.com/KSPP/linux/issues/88 [1] Signed-off-by: Kees Cook <kees@kernel.org> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20241216224507.work.859-kees@kernel.org fs/notify/inotify/inotify_fsnotify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 958473e7ed69bb397eed816b88be28986f7951ad Author: Marek Vasut <marex@denx.de> Date: Thu Dec 12 13:26:29 2024 +0100 drm/panel: simple: add Multi-Inno Technology MI1010Z1T-1CP11 Add Multi-Inno Technology MI1010Z1T-1CP11 10.1" 1024x600 LVDS panel support. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241212122701.25305-2-marex@denx.de Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241212122701.25305-2-marex@denx.de drivers/gpu/drm/panel/panel-simple.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 523092f6891d8652ab26331a9f35dc8329322896 Author: Marek Vasut <marex@denx.de> Date: Thu Dec 12 13:26:28 2024 +0100 dt-bindings: display: simple: Document Multi-Inno Technology MI1010Z1T-1CP11 panel Add Multi-Inno Technology MI1010Z1T-1CP11 10.1" 1024x600 LVDS panel compatible string. Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241212122701.25305-1-marex@denx.de Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241212122701.25305-1-marex@denx.de Documentation/devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) commit bf6daaa281f7d11fcd91a68935142916afc51c53 Author: Luca Ceresoli <luca.ceresoli@bootlin.com> Date: Mon Dec 16 17:21:35 2024 +0100 drm/panel: simple: Add Tianma TM070JDHG34-00 panel support Add Tianma TM070JDHG34-00 7.0" 1280x800 LVDS RGB TFT LCD panel. Panel info and datasheet: https://fortec.us/products/tm070jdhg34-00/ Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://lore.kernel.org/r/20241216-tianma_tm070jdhg34-v2-2-0b319a0bac39@bootlin.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241216-tianma_tm070jdhg34-v2-2-0b319a0bac39@bootlin.com drivers/gpu/drm/panel/panel-simple.c | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 0c8d3b4a0342c5feb6887d18efd1273d80530674 Author: Luca Ceresoli <luca.ceresoli@bootlin.com> Date: Mon Dec 16 17:21:34 2024 +0100 dt-bindings: display: simple: Add Tianma TM070JDHG34-00 panel Add the Tianma Micro-electronics TM070JDHG34-00 7.0" LVDS LCD TFT panel. Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241216-tianma_tm070jdhg34-v2-1-0b319a0bac39@bootlin.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241216-tianma_tm070jdhg34-v2-1-0b319a0bac39@bootlin.com Documentation/devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 4e358b57bbb3e35bf20faed697305cd97aa1a388 Author: Luca Ceresoli <luca.ceresoli@bootlin.com> Date: Tue Dec 17 17:02:51 2024 +0100 drm/bridge: ti-sn65dsi83: use dev_err_probe when failing to get panel bridge When devm_drm_of_get_bridge() fails, the probe fails silently. Use dev_err_probe() instead to log an error or report the deferral reason, whichever is applicable. Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://lore.kernel.org/r/20241217-ti-sn65dsi83-dev_err_probe-v1-1-3fdce386400c@bootlin.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241217-ti-sn65dsi83-dev_err_probe-v1-1-3fdce386400c@bootlin.com drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cce16e7f6216227964cda25f5f23634bce2c500f Author: Mingwei Zheng <zmw12306@gmail.com> Date: Fri Dec 6 16:53:18 2024 -0500 pwm: stm32-lp: Add check for clk_enable() Add check for the return value of clk_enable() to catch the potential error. We used APP-Miner to find it. Fixes: e70a540b4e02 ("pwm: Add STM32 LPTimer PWM driver") Signed-off-by: Mingwei Zheng <zmw12306@gmail.com> Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com> Link: https://lore.kernel.org/r/20241206215318.3402860-1-zmw12306@gmail.com Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org> drivers/pwm/pwm-stm32-lp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4ccf7e3553fec5026a8b4aba86ad43fef7a2ce11 Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Tue Oct 29 17:08:36 2024 +0100 dt-bindings: pwm: marvell,berlin-pwm: Convert from txt to yaml Formalize the binding for marvell,berlin-pwm devices and make them automatically checkable. No change to the binding intended. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241029160837.590199-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org> .../bindings/pwm/marvell,berlin-pwm.yaml | 44 ++++++++++++++++++++++ .../devicetree/bindings/pwm/pwm-berlin.txt | 17 --------- 2 files changed, 44 insertions(+), 17 deletions(-) commit a0b67429fc4175d93ed5d5f4c90c50c80aac61cd Author: Stanislav Jakubek <stano.jakubek@gmail.com> Date: Wed Oct 30 10:36:36 2024 +0100 dt-bindings: pwm: sprd,ums512-pwm: convert to YAML Convert the Spreadtrum/Unisoc UMS512 PWM controller bindings to DT schema. Adjust filename to match compatible. Drop assigned-* properties as these should not be needed. Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Chunyan Zhang <zhang.lyra@gmail.com> Acked-by: Baolin Wang <baolin.wang@linux.alibaba.com> Link: https://lore.kernel.org/r/ZyH-JASRcpMXYsmH@standask-GA-A55M-S2HP [Replaced Baolin Wang's email address in maintainers list] Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org> Documentation/devicetree/bindings/pwm/pwm-sprd.txt | 40 ------------- .../devicetree/bindings/pwm/sprd,ums512-pwm.yaml | 66 ++++++++++++++++++++++ 2 files changed, 66 insertions(+), 40 deletions(-) commit 10435e0d2377e5fc0353ba9948aa47b9c029ca7b Author: Philipp Stanner <pstanner@redhat.com> Date: Mon Nov 11 10:09:45 2024 +0100 pwm: Replace deprecated PCI functions pcim_iomap_table() and pcim_request_regions() have been deprecated in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()") and commit d140f80f60358 ("PCI: Deprecate pcim_iomap_regions() in favor of pcim_iomap_region()"). Replace these functions with pcim_iomap_region(). Additionally, pass the actual driver names to pcim_iomap_region() instead of the previous pci_name(), since the 'name' parameter should always reflect which driver owns a region. Signed-off-by: Philipp Stanner <pstanner@redhat.com> Link: https://lore.kernel.org/r/20241111090944.11293-2-pstanner@redhat.com Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org> drivers/pwm/pwm-dwc.c | 14 +++++--------- drivers/pwm/pwm-lpss-pci.c | 9 +++++---- 2 files changed, 10 insertions(+), 13 deletions(-) commit 647b7aad19490a7b90c52c883bda7df299457491 Author: Yi Liu <yi.l.liu@intel.com> Date: Wed Dec 4 04:29:28 2024 -0800 iommu: Remove the remove_dev_pasid op The iommu drivers that supports PASID have supported attaching pasid to the blocked_domain, hence remove the remove_dev_pasid op from the iommu_ops. Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Vasant Hegde <vasant.hegde@amd.com> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Yi Liu <yi.l.liu@intel.com> Link: https://lore.kernel.org/r/20241204122928.11987-8-yi.l.liu@intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/iommu.c | 17 ++++------------- include/linux/iommu.h | 5 ----- 2 files changed, 4 insertions(+), 18 deletions(-) commit 5f53638882391646e203e064c3ef3cc401745da8 Author: Yi Liu <yi.l.liu@intel.com> Date: Wed Dec 4 04:29:27 2024 -0800 iommu/amd: Make the blocked domain support PASID The blocked domain can be extended to park PASID of a device to be the DMA blocking state. By this the remove_dev_pasid() op is dropped. Remove PASID from old domain and device GCR3 table. No need to attach PASID to the blocked domain as clearing PASID from GCR3 table will make sure all DMAs for that PASID are blocked. Suggested-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Vasant Hegde <vasant.hegde@amd.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Yi Liu <yi.l.liu@intel.com> Link: https://lore.kernel.org/r/20241204122928.11987-7-yi.l.liu@intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/amd/iommu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 4f0bdab175d6ea544c97766813db001ba28be3a7 Author: Yi Liu <yi.l.liu@intel.com> Date: Wed Dec 4 04:29:26 2024 -0800 iommu/vt-d: Make the blocked domain support PASID The blocked domain can be extended to park PASID of a device to be the DMA blocking state. By this the remove_dev_pasid() op is dropped. Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Yi Liu <yi.l.liu@intel.com> Link: https://lore.kernel.org/r/20241204122928.11987-6-yi.l.liu@intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/intel/iommu.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit ef181762cb544efc8c88b79ea9224e21ca5da533 Author: Jason Gunthorpe <jgg@ziepe.ca> Date: Wed Dec 4 04:29:25 2024 -0800 iommu/arm-smmu-v3: Make the blocked domain support PASID The blocked domain is used to park RID to be blocking DMA state. This can be extended to PASID as well. By this, the remove_dev_pasid() op of ARM SMMUv3 can be dropped. Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Yi Liu <yi.l.liu@intel.com> Link: https://lore.kernel.org/r/20241204122928.11987-5-yi.l.liu@intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b18301b9156a0d8a0094fcd16a1b98816539eab0 Author: Yi Liu <yi.l.liu@intel.com> Date: Wed Dec 4 04:29:24 2024 -0800 iommu: Detaching pasid by attaching to the blocked_domain The iommu drivers are on the way to detach pasid by attaching to the blocked domain. However, this cannot be done in one shot. During the transition, iommu core would select between the remove_dev_pasid op and the blocked domain. Suggested-by: Kevin Tian <kevin.tian@intel.com> Suggested-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Vasant Hegde <vasant.hegde@amd.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Yi Liu <yi.l.liu@intel.com> Link: https://lore.kernel.org/r/20241204122928.11987-4-yi.l.liu@intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/iommu.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 1fbf73425f5169e2d183b2ca67bfe2f1019d11c0 Author: Yi Liu <yi.l.liu@intel.com> Date: Wed Dec 4 04:29:23 2024 -0800 iommu: Consolidate the ops->remove_dev_pasid usage into a helper Add a wrapper for the ops->remove_dev_pasid, this consolidates the iommu_ops fetching and callback invoking. It is also a preparation for starting the transition from using remove_dev_pasid op to detach pasid to the way using blocked_domain to detach pasid. Reviewed-by: Vasant Hegde <vasant.hegde@amd.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Yi Liu <yi.l.liu@intel.com> Link: https://lore.kernel.org/r/20241204122928.11987-3-yi.l.liu@intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/iommu.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit fb3de9f9b085d003a8a869ca6a4789d1bfbb3f22 Author: Yi Liu <yi.l.liu@intel.com> Date: Wed Dec 4 04:29:22 2024 -0800 iommu: Prevent pasid attach if no ops->remove_dev_pasid driver should implement both set_dev_pasid and remove_dev_pasid op, otherwise it is a problem how to detach pasid. In reality, it is impossible that an iommu driver implements set_dev_pasid() but no remove_dev_pasid() op. However, it is better to check it. Move the group check to be the first as dev_iommu_ops() may fail when there is no valid group. Also take the chance to remove the dev_has_iommu() check as it is duplicated to the group check. Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Yi Liu <yi.l.liu@intel.com> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Link: https://lore.kernel.org/r/20241204122928.11987-2-yi.l.liu@intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/iommu.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit b0988acc94c021d8d428c9496649a1b4e6203011 Author: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Date: Mon Nov 18 05:49:37 2024 +0000 iommu/amd: Remove amd_iommu_apply_erratum_63() Also replace __set_dev_entry_bit() with set_dte_bit() and remove unused helper functions. Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Link: https://lore.kernel.org/r/20241118054937.5203-10-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/amd/amd_iommu.h | 1 - drivers/iommu/amd/init.c | 50 +++---------------------------------------- 2 files changed, 3 insertions(+), 48 deletions(-) commit 457da57646686fcb38b3f61b153920ca08200078 Author: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Date: Mon Nov 18 05:49:36 2024 +0000 iommu/amd: Lock DTE before updating the entry with WRITE_ONCE() When updating only within a 64-bit tuple of a DTE, just lock the DTE and use WRITE_ONCE() because it is writing to memory read back by HW. Suggested-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Link: https://lore.kernel.org/r/20241118054937.5203-9-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/amd/amd_iommu.h | 1 + drivers/iommu/amd/iommu.c | 43 ++++++++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 19 deletions(-) commit 66ea3f96ae2b02cf543f3373b67aa6b8c6794926 Author: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Date: Mon Nov 18 05:49:35 2024 +0000 iommu/amd: Modify clear_dte_entry() to avoid in-place update By reusing the make_clear_dte() and update_dte256(). Also, there is no need to set TV bit for non-SNP system when clearing DTE for blocked domain, and no longer need to apply erratum 63 in clear_dte() since it is already stored in struct ivhd_dte_flags and apply in set_dte_entry(). Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Link: https://lore.kernel.org/r/20241118054937.5203-8-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/amd/iommu.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit a2ce608a1eb65c2af99c58b63eae557165a0da87 Author: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Date: Mon Nov 18 05:49:34 2024 +0000 iommu/amd: Introduce helper function get_dte256() And use it in clone_alias() along with update_dte256(). Also use get_dte256() in dump_dte_entry(). Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Link: https://lore.kernel.org/r/20241118054937.5203-7-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/amd/iommu.c | 62 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 11 deletions(-) commit fd5dff9de4be29b8ebec63b7e916915d4c984027 Author: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Date: Mon Nov 18 05:49:33 2024 +0000 iommu/amd: Modify set_dte_entry() to use 256-bit DTE helpers Also, the set_dte_entry() is used to program several DTE fields (e.g. stage1 table, stage2 table, domain id, and etc.), which is difficult to keep track with current implementation. Therefore, separate logic for clearing DTE (i.e. make_clear_dte) and another function for setting up the GCR3 Table Root Pointer, GIOV, GV, GLX, and GuestPagingMode into another function set_dte_gcr3_table(). Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Link: https://lore.kernel.org/r/20241118054937.5203-6-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/amd/amd_iommu.h | 2 + drivers/iommu/amd/amd_iommu_types.h | 13 ++-- drivers/iommu/amd/init.c | 30 +++++++-- drivers/iommu/amd/iommu.c | 129 +++++++++++++++++++++--------------- 4 files changed, 106 insertions(+), 68 deletions(-) commit 8b3f78733814b180089a400743b6f19d118aec62 Author: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Date: Mon Nov 18 05:49:32 2024 +0000 iommu/amd: Introduce helper function to update 256-bit DTE The current implementation does not follow 128-bit write requirement to update DTE as specified in the AMD I/O Virtualization Techonology (IOMMU) Specification. Therefore, modify the struct dev_table_entry to contain union of u128 data array, and introduce a helper functions update_dte256() to update DTE using two 128-bit cmpxchg operations to update 256-bit DTE with the modified structure, and take into account the DTE[V, GV] bits when programming the DTE to ensure proper order of DTE programming and flushing. In addition, introduce a per-DTE spin_lock struct dev_data.dte_lock to provide synchronization when updating the DTE to prevent cmpxchg128 failure. Suggested-by: Jason Gunthorpe <jgg@nvidia.com> Suggested-by: Uros Bizjak <ubizjak@gmail.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Link: https://lore.kernel.org/r/20241118054937.5203-5-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/amd/amd_iommu_types.h | 10 ++- drivers/iommu/amd/iommu.c | 123 ++++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+), 1 deletion(-) commit 7bea695ada0e84c40685551159068996cea29ef8 Author: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Date: Mon Nov 18 05:49:31 2024 +0000 iommu/amd: Introduce struct ivhd_dte_flags to store persistent DTE flags During early initialization, the driver parses IVRS IVHD block to get list of downstream devices along with their DTE flags (i.e INITPass, EIntPass, NMIPass, SysMgt, Lint0Pass, Lint1Pass). This information is currently store in the device DTE, and needs to be preserved when clearing and configuring each DTE, which makes it difficult to manage. Introduce struct ivhd_dte_flags to store IVHD DTE settings for a device or range of devices, which are stored in the amd_ivhd_dev_flags_list during initial IVHD parsing. Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Link: https://lore.kernel.org/r/20241118054937.5203-4-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/amd/amd_iommu_types.h | 16 +++++ drivers/iommu/amd/init.c | 113 +++++++++++++++++++++++++++--------- 2 files changed, 100 insertions(+), 29 deletions(-) commit 82582f85ed22ba6cd27fea76b4248745f3b9fdf7 Author: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Date: Mon Nov 18 05:49:30 2024 +0000 iommu/amd: Disable AMD IOMMU if CMPXCHG16B feature is not supported According to the AMD IOMMU spec, IOMMU hardware reads the entire DTE in a single 256-bit transaction. It is recommended to update DTE using 128-bit operation followed by an INVALIDATE_DEVTAB_ENTYRY command when the IV=1b or V=1b before the change. According to the AMD BIOS and Kernel Developer's Guide (BDKG) dated back to family 10h Processor [1], which is the first introduction of AMD IOMMU, AMD processor always has CPUID Fn0000_0001_ECX[CMPXCHG16B]=1. Therefore, it is safe to assume cmpxchg128 is available with all AMD processor w/ IOMMU. In addition, the CMPXCHG16B feature has already been checked separately before enabling the GA, XT, and GAM modes. Consolidate the detection logic, and fail the IOMMU initialization if the feature is not supported. [1] https://www.amd.com/content/dam/amd/en/documents/archived-tech-docs/programmer-references/31116.pdf Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Suggested-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Link: https://lore.kernel.org/r/20241118054937.5203-3-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/amd/init.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit f20a6e3eb2ef323aa0a6ac22f94293ce4f17d113 Author: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Date: Mon Nov 18 05:49:29 2024 +0000 iommu/amd: Misc ACPI IVRS debug info clean up * Remove redundant AMD-Vi prefix. * Print IVHD device entry settings field using hex value. * Print root device of IVHD ACPI device entry using hex value. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Link: https://lore.kernel.org/r/20241118054937.5203-2-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/amd/amd_iommu_types.h | 2 +- drivers/iommu/amd/init.c | 35 +++++++++++++++-------------------- 2 files changed, 16 insertions(+), 21 deletions(-) commit d5f88acdd6ff84607043a6845b81e4be148f9fd9 Author: Andrew Jones <ajones@ventanamicro.com> Date: Tue Nov 12 14:35:06 2024 +0100 iommu/riscv: Add support for platform msi Apply platform_device_msi_init_and_alloc_irqs() to add support for MSIs when the IOMMU is a platform device. Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20241112133504.491984-4-ajones@ventanamicro.com Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/riscv/iommu-platform.c | 102 ++++++++++++++++++++++++++++------- 1 file changed, 84 insertions(+), 18 deletions(-) commit d629d7a8efc33d05d62f4805c0ffb44727e3d99f Author: Sourabh Jain <sourabhjain@linux.ibm.com> Date: Tue Dec 17 13:16:40 2024 +0530 powerpc/book3s64/hugetlb: Fix disabling hugetlb when fadump is active Commit 8597538712eb ("powerpc/fadump: Do not use hugepages when fadump is active") disabled hugetlb support when fadump is active by returning early from hugetlbpage_init():arch/powerpc/mm/hugetlbpage.c and not populating hpage_shift/HPAGE_SHIFT. Later, commit 2354ad252b66 ("powerpc/mm: Update default hugetlb size early") moved the allocation of hpage_shift/HPAGE_SHIFT to early boot, which inadvertently re-enabled hugetlb support when fadump is active. Fix this by implementing hugepages_supported() on powerpc. This ensures that disabling hugetlb for the fadump kernel is independent of hpage_shift/HPAGE_SHIFT. Fixes: 2354ad252b66 ("powerpc/mm: Update default hugetlb size early") Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241217074640.1064510-1-sourabhjain@linux.ibm.com arch/powerpc/include/asm/hugetlb.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9fa9712644e04c4fd4de7e2d999edde3c9316823 Author: Christophe Leroy <christophe.leroy@csgroup.eu> Date: Sat Dec 14 12:09:31 2024 +0100 powerpc/vdso: Mark the vDSO code read-only after init VDSO text is fixed-up during init so it can't be const, but it can be read-only after init. Do the same as x86 in commit 018ef8dcf3de ("x86/vdso: Mark the vDSO code read-only after init") and arm in commit 11bf9b865898 ("ARM/vdso: Mark the vDSO code read-only after init"), move it into ro_after_init section. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/e9892d288b646cbdfeef0b2b73edbaf6d3c6cabe.1734174500.git.christophe.leroy@csgroup.eu arch/powerpc/kernel/vdso32_wrapper.S | 2 +- arch/powerpc/kernel/vdso64_wrapper.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f66dbe43798fc97e8c0e6d9b86f1aa923ef523fa Author: Michael Ellerman <mpe@ellerman.id.au> Date: Mon Dec 16 23:17:06 2024 +1100 powerpc/64: Use get_user() in start_thread() For ELFv1 binaries (big endian), the ELF entry point isn't the address of the first instruction, instead it points to the function descriptor for the entry point. The address of the first instruction is in the function descriptor. That means the kernel has to fetch the address of the first instruction from user memory. Because start_thread() uses __get_user(), which has no access_ok() checks, it looks like a malicious ELF binary could be crafted to point the entry point address at kernel memory. The kernel would load 8 bytes from kernel memory into the NIP and then start the process, it would typically crash, but a debugger could observe the NIP value which would be the result of reading from kernel memory. However that's NOT possible, because there is a check in load_elf_binary() that ensures the ELF entry point is < TASK_SIZE (look for BAD_ADDR(elf_entry)). However it's fragile for start_thread() to rely on a check elsewhere, even if the ELF parser is unlikely to ever drop the check that elf_entry is a user address. Make it more robust by using get_user(), which checks that the address points at userspace before doing the load. If the address doesn't point at userspace it will just set the result to zero, and the userspace program will crash at zero (which is fine because it's self-inflicted). Note that it's also possible for a malicious binary to have a valid ELF entry address, but with the first instruction address pointing into the kernel. However that's OK, because it is blocked by the MMU, just like any other attempt to jump into the kernel from userspace. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241216121706.26790-1-mpe@ellerman.id.au arch/powerpc/kernel/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e834166822a3c9fb403411c898367df8dabf973c Author: Luis Felipe Hernandez <luis.hernandez093@gmail.com> Date: Tue Dec 17 21:55:41 2024 -0500 macintosh: declare ctl_table as const Since commit 7abc9b53bd51 ("sysctl: allow registration of const struct ctl_table"), the sysctl registration API allows struct ctl_table variables to be placed into read-only memory. mac_hid_files is registered as a sysctl table and should be treated as read-only. By declaring the mac_hid_files structure as const, we ensure that it cannot be accidentally modified. This change improves safety. Suggested-by: Thomas Weißschuh <linux@weissschuh.net> Suggested-by: Ricardo B. Marliere <rbm@suse.com> Reviewed-by: Ricardo B. Marliere <rbm@suse.com> Signed-off-by: Luis Felipe Hernandez <luis.hernandez093@gmail.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241217-constify_ctl_table-v1-1-402ebceaeb8e@gmail.com drivers/macintosh/mac_hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65f5038352e8f635fb827f7482f1d08fae4d16bf Author: Madhavan Srinivasan <maddy@linux.ibm.com> Date: Mon Dec 16 21:32:57 2024 +0530 selftest/powerpc/ptrace: Cleanup duplicate macro definitions Both core-pkey.c and ptrace-pkey.c tests have similar macro definitions, move them to "pkeys.h" and remove the macro definitions from the C file. Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241216160257.87252-3-maddy@linux.ibm.com tools/testing/selftests/powerpc/include/pkeys.h | 8 ++++++++ tools/testing/selftests/powerpc/ptrace/core-pkey.c | 12 ------------ tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c | 12 ------------ 3 files changed, 8 insertions(+), 24 deletions(-) commit b0e1b95b1597ad3d87ff91d52f6b67cc9423c31e Author: Madhavan Srinivasan <maddy@linux.ibm.com> Date: Mon Dec 16 21:32:56 2024 +0530 selftest/powerpc/ptrace/ptrace-pkey: Remove duplicate macros ./powerpc/ptrace/Makefile includes flags.mk. In flags.mk, -I$(selfdir)/powerpc/include is always included as part of CFLAGS. So it will pick up the "pkeys.h" defined in powerpc/include. ptrace-pkey.c test has macros defined which are part of "pkeys.h" header file. Remove those duplicates and include "pkeys.h" Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241216160257.87252-2-maddy@linux.ibm.com tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 026ac4dda8f666f737b375731e30ef8f5698b215 Author: Madhavan Srinivasan <maddy@linux.ibm.com> Date: Mon Dec 16 21:32:55 2024 +0530 selftest/powerpc/ptrace/core-pkey: Remove duplicate macros ./powerpc/ptrace/Makefile includes flags.mk. In flags.mk, -I$(selfdir)/powerpc/include is always included as part of CFLAGS. So it will pick up the "pkeys.h" defined in powerpc/include. core-pkey.c test has couple of macros defined which are part of "pkeys.h" header file. Remove those duplicates and include "pkeys.h" Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241216160257.87252-1-maddy@linux.ibm.com tools/testing/selftests/powerpc/ptrace/core-pkey.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) commit f9d418552ba1e3a0e92487ff82eb515dab7516c0 Author: Suraj Kandpal <suraj.kandpal@intel.com> Date: Mon Dec 16 23:45:54 2024 +0530 drm/i915/cx0_phy: Fix C10 pll programming sequence According to spec VDR_CUSTOM_WIDTH register gets programmed after pll specific VDR registers and TX Lane programming registers are done. Moreover we only program into C10_VDR_CONTROL1 to update config and setup master lane once all VDR registers are written into. Bspec: 67636 Fixes: 51390cc0e00a ("drm/i915/mtl: Add Support for C10 PHY message bus and pll programming") Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241216181554.2861381-1-suraj.kandpal@intel.com drivers/gpu/drm/i915/display/intel_cx0_phy.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 2b9da35f48a552c158a8965a61f36a1aa62fca34 Merge: 95dcfdff8bb6 adb42b1e0ef3 Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Dec 17 20:01:41 2024 -0800 Merge branch 'support-some-features-for-the-hibmcge-driver' Jijie Shao says: ==================== Support some features for the HIBMCGE driver In this patch series, The HIBMCGE driver implements some functions such as dump register, unicast MAC address filtering, debugfs and reset. ==================== Link: https://patch.msgid.link/20241216040532.1566229-1-shaojijie@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit adb42b1e0ef32f80f6f02374342aa5c223e9d17f Author: Jijie Shao <shaojijie@huawei.com> Date: Mon Dec 16 12:05:32 2024 +0800 net: hibmcge: Add nway_reset supported in this module Add nway_reset supported in this module Signed-off-by: Jijie Shao <shaojijie@huawei.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241216040532.1566229-8-shaojijie@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/hisilicon/hibmcge/hbg_ethtool.c | 1 + 1 file changed, 1 insertion(+) commit 3f5a61f6d504f55ed1a36cce044d5123d508721f Author: Jijie Shao <shaojijie@huawei.com> Date: Mon Dec 16 12:05:31 2024 +0800 net: hibmcge: Add reset supported in this module Sometimes, if the port doesn't work, we can try to fix it by resetting it. This patch supports reset triggered by ethtool or FLR of PCIe, For example: ethtool --reset eth0 dedicated echo 1 > /sys/bus/pci/devices/0000\:83\:00.1/reset We hope that the reset can be performed only when the port is down, and the port cannot be up during the reset. Therefore, the entire reset process is protected by the rtnl lock. After the reset is complete, the hardware registers are restored to their default values. Therefore, some rebuild operations are required to rewrite the user configuration to the registers. Signed-off-by: Jijie Shao <shaojijie@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241216040532.1566229-7-shaojijie@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/hisilicon/hibmcge/Makefile | 2 +- .../net/ethernet/hisilicon/hibmcge/hbg_common.h | 16 +++ .../net/ethernet/hisilicon/hibmcge/hbg_debugfs.c | 22 ++++ drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c | 134 +++++++++++++++++++++ drivers/net/ethernet/hisilicon/hibmcge/hbg_err.h | 13 ++ .../net/ethernet/hisilicon/hibmcge/hbg_ethtool.c | 15 +++ drivers/net/ethernet/hisilicon/hibmcge/hbg_hw.c | 10 +- drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c | 35 +++--- 8 files changed, 226 insertions(+), 21 deletions(-) commit 3a03763f38769707a4dd0ca44474806fed3a7f81 Author: Jijie Shao <shaojijie@huawei.com> Date: Mon Dec 16 12:05:30 2024 +0800 net: hibmcge: Add pauseparam supported in this module The MAC can automatically send or respond to pause frames. This patch supports the function of enabling pause frames by using ethtool. Signed-off-by: Jijie Shao <shaojijie@huawei.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241216040532.1566229-6-shaojijie@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../net/ethernet/hisilicon/hibmcge/hbg_common.h | 1 + .../net/ethernet/hisilicon/hibmcge/hbg_ethtool.c | 25 ++++++++++++++++++++++ drivers/net/ethernet/hisilicon/hibmcge/hbg_hw.c | 21 ++++++++++++++++++ drivers/net/ethernet/hisilicon/hibmcge/hbg_hw.h | 3 +++ drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c | 1 + drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c | 15 +++++++++++++ drivers/net/ethernet/hisilicon/hibmcge/hbg_reg.h | 2 ++ 7 files changed, 68 insertions(+) commit 51574da8dce3c08f388893d727292364a1db8cc0 Author: Jijie Shao <shaojijie@huawei.com> Date: Mon Dec 16 12:05:29 2024 +0800 net: hibmcge: Add register dump supported in this module The dump register is an effective way to analyze problems. To ensure code flexibility, each register contains the type, offset, and value information. The ethtool does the pretty print based on these information. The driver can dynamically add or delete registers that need to be dumped in the future because information such as type and offset is contained. ethtool always can do pretty print. With the ethtool of a specific version, the following effects are achieved: [root@localhost sjj]# ./ethtool -d enp131s0f1 [SPEC] VALID [0x0000]: 0x00000001 [SPEC] EVENT_REQ [0x0004]: 0x00000000 [SPEC] MAC_ID [0x0008]: 0x00000002 [SPEC] PHY_ADDR [0x000c]: 0x00000002 [SPEC] MAC_ADDR_L [0x0010]: 0x00000808 [SPEC] MAC_ADDR_H [0x0014]: 0x08080802 [SPEC] UC_MAX_NUM [0x0018]: 0x00000004 [SPEC] MAX_MTU [0x0028]: 0x00000fc2 [SPEC] MIN_MTU [0x002c]: 0x00000100 [SPEC] TX_FIFO_NUM [0x0030]: 0x00000040 [SPEC] RX_FIFO_NUM [0x0034]: 0x0000007f [SPEC] VLAN_LAYERS [0x0038]: 0x00000002 [MDIO] COMMAND_REG [0x0000]: 0x0000185f [MDIO] ADDR_REG [0x0004]: 0x00000000 [MDIO] WDATA_REG [0x0008]: 0x0000a000 [MDIO] RDATA_REG [0x000c]: 0x00000000 [MDIO] STA_REG [0x0010]: 0x00000000 [GMAC] DUPLEX_TYPE [0x0008]: 0x00000001 [GMAC] FD_FC_TYPE [0x000c]: 0x00008808 [GMAC] FC_TX_TIMER [0x001c]: 0x000000ff [GMAC] FD_FC_ADDR_LOW [0x0020]: 0xc2000001 [GMAC] FD_FC_ADDR_HIGH [0x0024]: 0x00000180 [GMAC] MAX_FRM_SIZE [0x003c]: 0x000005f6 [GMAC] PORT_MODE [0x0040]: 0x00000002 [GMAC] PORT_EN [0x0044]: 0x00000006 ... Signed-off-by: Jijie Shao <shaojijie@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241216040532.1566229-5-shaojijie@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../net/ethernet/hisilicon/hibmcge/hbg_ethtool.c | 140 +++++++++++++++++++++ drivers/net/ethernet/hisilicon/hibmcge/hbg_reg.h | 34 +++++ 2 files changed, 174 insertions(+) commit 37b367d60d0f91260cd787ffbfba8e71e8f6fc7c Author: Jijie Shao <shaojijie@huawei.com> Date: Mon Dec 16 12:05:28 2024 +0800 net: hibmcge: Add unicast frame filter supported in this module MAC supports filtering unmatched unicast packets according to the MAC address table. This patch adds the support for unicast frame filtering. To support automatic restoration of MAC entries after reset, the driver saves a copy of MAC entries in the driver. Signed-off-by: Jijie Shao <shaojijie@huawei.com> Reviewed-by: Hariprasad Kelam <hkelam@marvell.com> Link: https://patch.msgid.link/20241216040532.1566229-4-shaojijie@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../net/ethernet/hisilicon/hibmcge/hbg_common.h | 12 ++ .../net/ethernet/hisilicon/hibmcge/hbg_debugfs.c | 22 ++++ drivers/net/ethernet/hisilicon/hibmcge/hbg_hw.c | 17 ++- drivers/net/ethernet/hisilicon/hibmcge/hbg_hw.h | 3 +- drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c | 136 ++++++++++++++++++++- drivers/net/ethernet/hisilicon/hibmcge/hbg_reg.h | 3 + 6 files changed, 187 insertions(+), 6 deletions(-) commit df491c419bcb37af6e250d15a872218673141fb2 Author: Jijie Shao <shaojijie@huawei.com> Date: Mon Dec 16 12:05:27 2024 +0800 net: hibmcge: Add irq_info file to debugfs the driver requested three interrupts: "tx", "rx", "err". The err interrupt is a summary interrupt. We distinguish different errors based on the status register and mask. With "cat /proc/interrupts | grep hibmcge", we can't distinguish the detailed cause of the error, so we added this file to debugfs. the following effects are achieved: [root@localhost sjj]# cat /sys/kernel/debug/hibmcge/0000\:83\:00.1/irq_info RX : enabled: true , logged: false, count: 0 TX : enabled: true , logged: false, count: 0 MAC_MII_FIFO_ERR : enabled: false, logged: true , count: 0 MAC_PCS_RX_FIFO_ERR : enabled: false, logged: true , count: 0 MAC_PCS_TX_FIFO_ERR : enabled: false, logged: true , count: 0 MAC_APP_RX_FIFO_ERR : enabled: false, logged: true , count: 0 MAC_APP_TX_FIFO_ERR : enabled: false, logged: true , count: 0 SRAM_PARITY_ERR : enabled: true , logged: true , count: 0 TX_AHB_ERR : enabled: true , logged: true , count: 0 RX_BUF_AVL : enabled: true , logged: false, count: 0 REL_BUF_ERR : enabled: true , logged: true , count: 0 TXCFG_AVL : enabled: true , logged: false, count: 0 TX_DROP : enabled: true , logged: false, count: 0 RX_DROP : enabled: true , logged: false, count: 0 RX_AHB_ERR : enabled: true , logged: true , count: 0 MAC_FIFO_ERR : enabled: true , logged: false, count: 0 RBREQ_ERR : enabled: true , logged: false, count: 0 WE_ERR : enabled: true , logged: false, count: 0 The irq framework of hibmcge driver also includes tx/rx interrupts. Therefore, TX and RX are not moved separately form this file. Signed-off-by: Jijie Shao <shaojijie@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241216040532.1566229-3-shaojijie@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../net/ethernet/hisilicon/hibmcge/hbg_debugfs.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 86331b510260bdb4b4b0dcac2eeb81a82eb161c3 Author: Jijie Shao <shaojijie@huawei.com> Date: Mon Dec 16 12:05:26 2024 +0800 net: hibmcge: Add debugfs supported in this module This patch initializes debugfs and creates root directory for each device. The tx_ring and rx_ring debugfs files are implemented together. Signed-off-by: Jijie Shao <shaojijie@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241216040532.1566229-2-shaojijie@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/hisilicon/hibmcge/Makefile | 3 +- .../net/ethernet/hisilicon/hibmcge/hbg_debugfs.c | 94 ++++++++++++++++++++++ .../net/ethernet/hisilicon/hibmcge/hbg_debugfs.h | 12 +++ drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c | 29 ++++++- 4 files changed, 135 insertions(+), 3 deletions(-) commit 95dcfdff8bb637ba8250674d1ade1def63d70260 Merge: 33d06d1d2812 01e2f4d55bda Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Dec 17 19:51:58 2024 -0800 Merge branch 'lan78xx-preparations-for-phylink' Oleksij Rempel says: ==================== lan78xx: Preparations for PHYlink This patch set is a third part of the preparatory work for migrating the lan78xx USB Ethernet driver to the PHYlink framework. During extensive testing, I observed that resetting the USB adapter can lead to various read/write errors. While the errors themselves are acceptable, they generate excessive log messages, resulting in significant log spam. This set improves error handling to reduce logging noise by addressing errors directly and returning early when necessary. ==================== Link: https://patch.msgid.link/20241216120941.1690908-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 01e2f4d55bda0e24548e1458e77975898683a2cd Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Mon Dec 16 13:09:41 2024 +0100 net: usb: lan78xx: Improve error handling in WoL operations Enhance error handling in Wake-on-LAN (WoL) operations: - Log a warning in `lan78xx_get_wol` if `lan78xx_read_reg` fails. - Check and handle errors from `device_set_wakeup_enable` and `phy_ethtool_set_wol` in `lan78xx_set_wol`. - Ensure proper cleanup with a unified error handling path. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241216120941.1690908-7-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d09de7ebd4abf26d9aee072b82a514c372d278b5 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Mon Dec 16 13:09:40 2024 +0100 net: usb: lan78xx: remove PHY register access from ethtool get_regs Remove PHY register handling from `lan78xx_get_regs` and `lan78xx_get_regs_len`. Since the controller can have different PHYs attached, the first 32 registers are not universally relevant or the most interesting. Simplify the implementation to focus on MAC and device registers. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20241216120941.1690908-6-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) commit 3a59437ed9072fa812e3e30bf0637ca94a239652 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Mon Dec 16 13:09:39 2024 +0100 net: usb: lan78xx: rename phy_mutex to mdiobus_mutex Rename `phy_mutex` to `mdiobus_mutex` for clarity, as the mutex protects MDIO bus access rather than PHY-specific operations. Update all references to ensure consistency. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20241216120941.1690908-5-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 7433d022b915977a0e361a036aa06a0d382a9630 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Mon Dec 16 13:09:38 2024 +0100 net: usb: lan78xx: Use action-specific label in lan78xx_mac_reset Rename the generic `done` label to the action-specific `exit_unlock` label in `lan78xx_mac_reset`. This improves clarity by indicating the specific cleanup action (mutex unlock) and aligns with best practices for error handling and cleanup labels. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com> Link: https://patch.msgid.link/20241216120941.1690908-4-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 18bdefe62439c75227021ddbbf6510aa2f2f4e54 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Mon Dec 16 13:09:37 2024 +0100 net: usb: lan78xx: Use ETIMEDOUT instead of ETIME in lan78xx_stop_hw Update lan78xx_stop_hw to return -ETIMEDOUT instead of -ETIME when a timeout occurs. While -ETIME indicates a general timer expiration, -ETIMEDOUT is more commonly used for signaling operation timeouts and provides better consistency with standard error handling in the driver. The -ETIME checks in tx_complete() and rx_complete() are unrelated to this error handling change. In these functions, the error values are derived from urb->status, which reflects USB transfer errors. The error value from lan78xx_stop_hw will be exposed in the following cases: - usb_driver::suspend - net_device_ops::ndo_stop (potentially, though currently the return value is not used). Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com> Link: https://patch.msgid.link/20241216120941.1690908-3-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 30c63abaee9024ed7524325b3eeb7f2d26727c31 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Mon Dec 16 13:09:36 2024 +0100 net: usb: lan78xx: Add error handling to lan78xx_get_regs Update `lan78xx_get_regs` to handle errors during register and PHY reads. Log warnings for failed reads and exit the function early if an error occurs. Drop all previously logged registers to signal inconsistent readings to the user space. This ensures that invalid data is not returned to users. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20241216120941.1690908-2-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) commit 33d06d1d28124b042178894584b727fdf83660b1 Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Mon Dec 16 15:51:22 2024 +0000 niu: Use page->private instead of page->index We are close to removing page->index. Use page->private instead, which is least likely to be removed. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://patch.msgid.link/20241216155124.3114-1-willy@infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/sun/niu.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 1ba06ca96ca255c079ce5ea6a75cc0bfd5e97921 Author: Ido Schimmel <idosch@nvidia.com> Date: Mon Dec 16 14:18:44 2024 +0100 mlxsw: Switch to napi_gro_receive() Benefit from the recent conversion of the driver to NAPI and enable GRO support through the use of napi_gro_receive(). Pass the NAPI pointer from the bus driver (mlxsw_pci) to the switch driver (mlxsw_spectrum) through the skb control block where various packet metadata is already encoded. The main motivation is to improve forwarding performance through the use of GRO fraglist [1]. In my testing, when the forwarding data path is simple (routing between two ports) there is not much difference in forwarding performance between GRO disabled and GRO enabled with fraglist. The improvement becomes more noticeable as the data path becomes more complex since it is traversed less times with GRO enabled. For example, with 10 ingress and 10 egress flower filters with different priorities on the two ports between which routing is performed, there is an improvement of about 140% in forwarded bandwidth. [1] https://lore.kernel.org/netdev/20200125102645.4782-1-steffen.klassert@secunet.com/ Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Amit Cohen <amcohen@nvidia.com> Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/21258fe55f608ccf1ee2783a5a4534220af28903.1734354812.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlxsw/core.h | 1 + drivers/net/ethernet/mellanox/mlxsw/pci.c | 4 +++- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) commit 3a4130550998f23762184b0de4cc9163a3f2c49d Merge: bf8469fc4d1e a853c609504e Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Dec 17 19:37:02 2024 -0800 Merge branch 'inetpeer-reduce-false-sharing-and-atomic-operations' Eric Dumazet says: ==================== inetpeer: reduce false sharing and atomic operations After commit 8c2bd38b95f7 ("icmp: change the order of rate limits"), there is a risk that a host receiving packets from an unique source targeting closed ports is using a common inet_peer structure from many cpus. All these cpus have to acquire/release a refcount and update the inet_peer timestamp (p->dtime) Switch to pure RCU to avoid changing the refcount, and update p->dtime only once per jiffy. Tested: DUT : 128 cores, 32 hw rx queues. receiving 8,400,000 UDP packets per second, targeting closed ports. Before the series: - napi poll can not keep up, NIC drops 1,200,000 packets per second. - We use 20 % of cpu cycles After this series: - All packets are received (no more hw drops) - We use 12 % of cpu cycles. v1: https://lore.kernel.org/20241213130212.1783302-1-edumazet@google.com ==================== Link: https://patch.msgid.link/20241215175629.1248773-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit a853c609504e2d1d83e71285e3622fda1f1451d8 Author: Eric Dumazet <edumazet@google.com> Date: Sun Dec 15 17:56:29 2024 +0000 inetpeer: do not get a refcount in inet_getpeer() All inet_getpeer() callers except ip4_frag_init() don't need to acquire a permanent refcount on the inetpeer. They can switch to full RCU protection. Move the refcount_inc_not_zero() into ip4_frag_init(), so that all the other callers no longer have to perform a pair of expensive atomic operations on a possibly contended cache line. inet_putpeer() no longer needs to be exported. After this patch, my DUT can receive 8,400,000 UDP packets per second targeting closed ports, using 50% less cpu cycles than before. Also change two calls to l3mdev_master_ifindex() by l3mdev_master_ifindex_rcu() (Ido ideas) Fixes: 8c2bd38b95f7 ("icmp: change the order of rate limits") Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20241215175629.1248773-5-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/ipv4/icmp.c | 9 ++++----- net/ipv4/inetpeer.c | 8 ++------ net/ipv4/ip_fragment.c | 15 ++++++++++----- net/ipv4/route.c | 15 ++++++++------- net/ipv6/icmp.c | 4 ++-- net/ipv6/ip6_output.c | 4 ++-- net/ipv6/ndisc.c | 6 ++++-- 7 files changed, 32 insertions(+), 29 deletions(-) commit 50b362f21d6c10b0f7939c1482c6a1b43da82f1a Author: Eric Dumazet <edumazet@google.com> Date: Sun Dec 15 17:56:28 2024 +0000 inetpeer: update inetpeer timestamp in inet_getpeer() inet_putpeer() will be removed in the following patch, because we will no longer use refcounts. Update inetpeer timestamp (p->dtime) at lookup time. Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20241215175629.1248773-4-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/ipv4/inetpeer.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 7a596a50c4a4eab946aec149171c72321b4934aa Author: Eric Dumazet <edumazet@google.com> Date: Sun Dec 15 17:56:27 2024 +0000 inetpeer: remove create argument of inet_getpeer() All callers of inet_getpeer() want to create an inetpeer. Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20241215175629.1248773-3-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/inetpeer.h | 7 +++---- net/ipv4/inetpeer.c | 11 ++--------- 2 files changed, 5 insertions(+), 13 deletions(-) commit 661cd8fc8e9039819ca0c22e0add52b632240a9e Author: Eric Dumazet <edumazet@google.com> Date: Sun Dec 15 17:56:26 2024 +0000 inetpeer: remove create argument of inet_getpeer_v[46]() All callers of inet_getpeer_v4() and inet_getpeer_v6() want to create an inetpeer. Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20241215175629.1248773-2-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/inetpeer.h | 9 ++++----- net/ipv4/icmp.c | 2 +- net/ipv4/ip_fragment.c | 2 +- net/ipv4/route.c | 4 ++-- net/ipv6/icmp.c | 2 +- net/ipv6/ip6_output.c | 2 +- net/ipv6/ndisc.c | 2 +- 7 files changed, 11 insertions(+), 12 deletions(-) commit bf8469fc4d1ef2696bbe10b049cc8f9ef501face Merge: d3c9510dc900 ae026eae08e7 Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Dec 17 19:00:51 2024 -0800 Merge branch 'net-constify-struct-bin_attribute' Thomas Weißschuh says: ==================== net: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. ==================== Link: https://patch.msgid.link/20241216-sysfs-const-bin_attr-net-v1-0-ec460b91f274@weissschuh.net Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit ae026eae08e7a0a118abc31192041e49bcda3a8e Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 12:30:11 2024 +0100 netxen_nic: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241216-sysfs-const-bin_attr-net-v1-4-ec460b91f274@weissschuh.net Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 2d7b422fa7952e3f15fc0912b12530af1d265193 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 12:30:09 2024 +0100 net: phy: ks8995: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241216-sysfs-const-bin_attr-net-v1-2-ec460b91f274@weissschuh.net Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/spi_ks8995.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a2558b410de3b0b6c38222ac4858188a55bc52ff Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 16 12:30:08 2024 +0100 net: bridge: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Simon Horman <horms@kernel.org> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/20241216-sysfs-const-bin_attr-net-v1-1-ec460b91f274@weissschuh.net Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/bridge/br_sysfs_br.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d3c9510dc900e9ff3ea330189c0465c9f00fba18 Author: Jakub Kicinski <kuba@kernel.org> Date: Sun Dec 15 13:29:38 2024 -0800 net: page_pool: rename page_pool_is_last_ref() page_pool_is_last_ref() releases a reference while the name, to me at least, suggests it just checks if the refcount is 1. The semantics of the function are the same as those of atomic_dec_and_test() and refcount_dec_and_test(), so just use the _and_test() suffix. Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Acked-by: Jesper Dangaard Brouer <hawk@kernel.org> Link: https://patch.msgid.link/20241215212938.99210-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/page_pool/helpers.h | 4 ++-- net/core/page_pool.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 3fa5626720c0948ce067306c4f6558d9ec86020c Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri Dec 13 10:51:31 2024 -0800 x86/cpu: Replace PEBS use of 'x86_cpu_desc' use with 'x86_cpu_id' The 'x86_cpu_desc' and 'x86_cpu_id' structures are very similar. Reduce duplicate infrastructure by moving the few users of 'x86_cpu_desc' to the much more common variant. The existing X86_MATCH_VFM_STEPS() helper matches ranges of steppings. Instead of introducing a single-stepping match function which could get confusing when paired with the range, just use the stepping min/max match helper and use min==max. Note that this makes the table more vertically compact because multiple entries like this: INTEL_CPU_DESC(INTEL_SKYLAKE_X, 4, 0x00000000), INTEL_CPU_DESC(INTEL_SKYLAKE_X, 5, 0x00000000), INTEL_CPU_DESC(INTEL_SKYLAKE_X, 6, 0x00000000), INTEL_CPU_DESC(INTEL_SKYLAKE_X, 7, 0x00000000), can be consolidated down to a single stepping range. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/all/20241213185131.8B610039%40davehans-spike.ostc.intel.com arch/x86/events/intel/core.c | 62 +++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 36 deletions(-) commit 85b08180df07b9a5984b15ae31d76b904d42a115 Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri Dec 13 10:51:29 2024 -0800 x86/cpu: Expose only stepping min/max interface The x86_match_cpu() infrastructure can match CPU steppings. Since there are only 16 possible steppings, the matching infrastructure goes all out and stores the stepping match as a bitmap. That means it can match any possible steppings in a single list entry. Fun. But it exposes this bitmap to each of the X86_MATCH_*() helpers when none of them really need a bitmap. It makes up for this by exporting a helper (X86_STEPPINGS()) which converts a contiguous stepping range into the bitmap which every single user leverages. Instead of a bitmap, have the main helper for this sort of thing (X86_MATCH_VFM_STEPS()) just take a stepping range. This ends up actually being even more compact than before. Leave the helper in place (renamed to __X86_STEPPINGS()) to make it more clear what is going on instead of just having a random GENMASK() in the middle of an already complicated macro. One oddity that I hit was this macro: X86_MATCH_VFM_STEPS(vfm, X86_STEPPING_MIN, max_stepping, issues) It *could* have been converted over to take a min/max stepping value for each entry. But that would have been a bit too verbose and would prevent the one oddball in the list (INTEL_COMETLAKE_L stepping 0) from sticking out. Instead, just have it take a *maximum* stepping and imply that the match is from 0=>max_stepping. This is functional for all the cases now and also retains the nice property of having INTEL_COMETLAKE_L stepping 0 stick out like a sore thumb. skx_cpuids[] is goofy. It uses the stepping match but encodes all possible steppings. Just use a normal, non-stepping match helper. Suggested-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/all/20241213185129.65527B2A%40davehans-spike.ostc.intel.com arch/x86/include/asm/cpu_device_id.h | 15 +++---- arch/x86/kernel/apic/apic.c | 18 ++++----- arch/x86/kernel/cpu/common.c | 78 ++++++++++++++++++------------------ drivers/edac/i10nm_base.c | 21 +++++----- drivers/edac/skx_base.c | 2 +- include/linux/mod_devicetable.h | 2 + 6 files changed, 70 insertions(+), 66 deletions(-) commit b8e10c86e674eb19e0e53dcf4fa3e71cba1e0c1c Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri Dec 13 10:51:28 2024 -0800 x86/cpu: Introduce new microcode matching helper The 'x86_cpu_id' and 'x86_cpu_desc' structures are very similar and need to be consolidated. There is a microcode version matching function for 'x86_cpu_desc' but not 'x86_cpu_id'. Create one for 'x86_cpu_id'. This essentially just leverages the x86_cpu_id->driver_data field to replace the less generic x86_cpu_desc->x86_microcode_rev field. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/all/20241213185128.8F24EEFC%40davehans-spike.ostc.intel.com arch/x86/include/asm/cpu_device_id.h | 1 + arch/x86/kernel/cpu/match.c | 11 +++++++++++ 2 files changed, 12 insertions(+) commit 517743c4e303252cd8c1a1fb1bed28e7d94d4678 Author: Guangbo Cui <2407018371@qq.com> Date: Mon Nov 11 21:51:27 2024 +0800 rust: alloc: align Debug implementation for Box with Display Ensure consistency between `Debug` and `Display` for `Box` by updating `Debug` to match the new `Display` style. Acked-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Guangbo Cui <2407018371@qq.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/tencent_1FC0BC283DA65DD81A8A14EEF25563934E05@qq.com [ Reworded title. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> rust/kernel/alloc/kbox.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21e08aa59a9a0b665b051a8919ec80a872807cfb Author: Guangbo Cui <2407018371@qq.com> Date: Mon Nov 11 21:40:41 2024 +0800 rust: alloc: implement Display for Box Currently `impl Display` is missing for `Box<T, A>`, as a result, things like using `Box<..>` directly as an operand in `pr_info!()` are impossible, which is less ergonomic compared to `Box` in Rust std. Therefore add `impl Display` for `Box`. Acked-by: Danilo Krummrich <dakr@kernel.org> Suggested-by: Boqun Feng <boqun.feng@gmail.com> Link: https://github.com/Rust-for-Linux/linux/issues/1126 Signed-off-by: Guangbo Cui <2407018371@qq.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/tencent_2AD25C6A6898D3A598CBA54BB6AF59BB900A@qq.com [ Reworded title. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> rust/kernel/alloc/kbox.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2dde1c8b04a5c415912bc3ffa8b677eb364dbcb7 Author: Tamir Duberstein <tamird@gmail.com> Date: Thu Nov 7 05:36:46 2024 -0500 rust: sync: document `PhantomData` in `Arc` Add a comment explaining the relevant semantics of `PhantomData`. This should help future readers who may, as I did, assume that this field is redundant at first glance. Signed-off-by: Tamir Duberstein <tamird@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20241107-simplify-arc-v2-1-7256e638aac1@gmail.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org> rust/kernel/sync/arc.rs | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3f4223c007b25327c49aabe3af8ecc72bb33dbf6 Author: Dirk Behme <dirk.behme@gmail.com> Date: Wed Oct 16 15:35:07 2024 +0200 rust: workqueue: Enable execution of doctests Having the Rust doctests enabled these workqueue tests are built but not executed as the final callers of the print_*() functions are missing. Add them. The result is # rust_doctest_kernel_workqueue_rs_0.location: rust/kernel/workqueue.rs:35 rust_doctests_kernel: The value is: 42 ok 94 rust_doctest_kernel_workqueue_rs_0 # rust_doctest_kernel_workqueue_rs_3.location: rust/kernel/workqueue.rs:78 rust_doctests_kernel: The value is: 24 rust_doctests_kernel: The second value is: 42 ok 97 rust_doctest_kernel_workqueue_rs_3 Without this change the "The value ..." outputs are not there meaning that this test code is not run. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Dirk Behme <dirk.behme@gmail.com> Reviewed-by: Boqun Feng <boqun.feng@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/cb953202-0dbe-4127-8a8e-6a75258c2116@gmail.com [ Reworded slightly. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> rust/kernel/workqueue.rs | 3 +++ 1 file changed, 3 insertions(+) commit a7c205120d339b6ad2557fe3f33fdf20394f1a0f Author: Mykyta Yatsenko <yatsenko@meta.com> Date: Tue Dec 17 18:11:13 2024 +0000 veristat: Fix top source line stat collection Fix comparator implementation to return most popular source code lines instead of least. Introduce min/max macro for building veristat outside of Linux repository. Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241217181113.364651-1-mykyta.yatsenko5@gmail.com tools/testing/selftests/bpf/veristat.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 9a02cbc5139e668f8b74e75a611d3a04b5241228 Author: Daniel Sedlak <daniel@sedlak.dev> Date: Sat Dec 7 12:24:45 2024 +0100 rust: error: modify `from_errno` to use `try_from_errno` Modify the from_errno function to use try_from_errno to reduce code duplication while still maintaining all existing behavior and error handling and also reduces unsafe code. Link: https://github.com/Rust-for-Linux/linux/issues/1125 Suggested-by: Miguel Ojeda <ojeda@kernel.org> Co-developed-by: Guilherme Augusto Martins da Silva <guilhermev2huehue@gmail.com> Signed-off-by: Guilherme Augusto Martins da Silva <guilhermev2huehue@gmail.com> Signed-off-by: Daniel Sedlak <daniel@sedlak.dev> Reviewed-by: Fiona Behrens <me@kloenk.dev> Link: https://lore.kernel.org/r/20241207112445.55502-1-daniel@sedlak.dev Signed-off-by: Miguel Ojeda <ojeda@kernel.org> rust/kernel/error.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 3d11c09d41284ca94c752864e570e917c0273d65 Author: Dmitry Torokhov <dmitry.torokhov@gmail.com> Date: Wed Nov 6 23:15:28 2024 -0800 Input: ff-core - convert locking to guard notation Use guard() and scoped_guard() notation instead of explicitly acquiring and releasing spinlocks and mutexes to simplify the code and ensure that all locks are released properly. Link: https://lore.kernel.org/r/20241107071538.195340-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/ff-core.c | 71 ++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 42 deletions(-) commit e571f988af1b62b701fc85fb74df878acc0a9857 Author: Jiri Kosina <jikos@kernel.org> Date: Tue Dec 17 11:47:39 2024 +0100 Input: remove evbug driver I've never heard of anyone having used this driver for debugging at least in over past decade or so. Since we have tools like evtest, this driver seems to be rather superficial. Also, it apparently causes confusion among people who accidentaly enable CONFIG_INPUT_EVBUG and are annoyed/confused by their kernel log being spammed by a lot of useless data. Let's just remove it. Signed-off-by: Jiri Kosina <jkosina@suse.com> Link: https://lore.kernel.org/r/8n377s5p-3r9n-ro38-3r2o-p536745552qo@xreary.bet Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/Kconfig | 14 ------- drivers/input/Makefile | 1 - drivers/input/evbug.c | 100 ------------------------------------------------- 3 files changed, 115 deletions(-) commit 64a6b577490c1c71f1a3bbdb3844717815214621 Author: Shree Ramamoorthy <s-ramamoorthy@ti.com> Date: Tue Dec 17 14:45:26 2024 -0600 regulator: tps65219: Remove debugging helper function This helper function is primarily used by developers for debugging & is not a standard feature included in other PMIC drivers. The purpose of debugging function is to check if rdev is determine if the regulator has been registered prior to requesting a threaded irq. This case is already handled with the ISERR(rdev) check because the error code is returned. Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com> Link: https://patch.msgid.link/20241217204526.1010989-5-s-ramamoorthy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/regulator/tps65219-regulator.c | 28 ---------------------------- 1 file changed, 28 deletions(-) commit ca321ef98b80eb282a4dcdd5231f666c610b0575 Author: Shree Ramamoorthy <s-ramamoorthy@ti.com> Date: Tue Dec 17 14:45:25 2024 -0600 regulator: tps65219: Remove MODULE_ALIAS Remove MODULE_ALIAS because the same module alias is already generated by MODULE_DEVICE_TABLE. Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com> Link: https://patch.msgid.link/20241217204526.1010989-4-s-ramamoorthy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/regulator/tps65219-regulator.c | 1 - 1 file changed, 1 deletion(-) commit 2ef8310c464cac41a024fc6fd2910e51f10a38e7 Author: Shree Ramamoorthy <s-ramamoorthy@ti.com> Date: Tue Dec 17 14:45:24 2024 -0600 regulator: tps65219: Update driver name Follow the same naming convention in tps6594-regulator.c with tpsxxx-regulator instead of tpsxxx-pmic. Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com> Link: https://patch.msgid.link/20241217204526.1010989-3-s-ramamoorthy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/regulator/tps65219-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7ce0437709552a5f5e577c29f3dfde620153913 Author: Shree Ramamoorthy <s-ramamoorthy@ti.com> Date: Tue Dec 17 14:45:23 2024 -0600 regulator: tps65219: Use dev_err_probe() instead of dev_err() Make the error message format unified by switching from dev_err() to dev_err_probe() where there is a chance of -EPROBE_DEFER returned. This helps simplify the error code where possible. Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com> Link: https://patch.msgid.link/20241217204526.1010989-2-s-ramamoorthy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/regulator/tps65219-regulator.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d5af79c05e9382d38b8546dc5362381ce07ba3d1 Author: Randy Dunlap <rdunlap@infradead.org> Date: Mon Dec 9 16:00:41 2024 -0800 Documentation: move dev-tools debugging files to process/debugging/ Move gdb and kgdb debugging documentation to the dedicated debugging directory (Documentation/process/debugging/). Adjust the index.rst files to follow the file movement. Adjust files that refer to these moved files to follow the file movement. Update location of kgdb.rst in MAINTAINERS file. Add a link from dev-tools/index to process/debugging/index. Note: translations are not updated. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Sebastian Fricke <sebastian.fricke@collabora.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: workflows@vger.kernel.org Cc: Jason Wessel <jason.wessel@windriver.com> Cc: Daniel Thompson <danielt@kernel.org> Cc: Douglas Anderson <dianders@chromium.org> Cc: linux-debuggers@vger.kernel.org Cc: kgdb-bugreport@lists.sourceforge.net Cc: Doug Anderson <dianders@chromium.org> Cc: Alex Shi <alexs@kernel.org> Cc: Hu Haowen <2023002089@link.tyut.edu.cn> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-serial@vger.kernel.org Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Daniel Thompson <danielt@kernel.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241210000041.305477-1-rdunlap@infradead.org Documentation/admin-guide/README.rst | 4 ++-- Documentation/dev-tools/index.rst | 5 +++-- .../{dev-tools => process/debugging}/gdb-kernel-debugging.rst | 0 Documentation/process/debugging/index.rst | 2 ++ Documentation/{dev-tools => process/debugging}/kgdb.rst | 0 MAINTAINERS | 2 +- include/linux/tty_driver.h | 2 +- lib/Kconfig.debug | 2 +- lib/Kconfig.kgdb | 2 +- 9 files changed, 11 insertions(+), 8 deletions(-) commit 270beb5b2aae021cdd6406b15a35d494d8467cc8 Author: Jonathan Corbet <corbet@lwn.net> Date: Fri Dec 13 11:20:54 2024 -0700 docs: admin-guide: bring some order to the "everything else" section The bulk of the admin guide had become a big pile of stuff haphazardly tossed together, mostly in the catch-all "everything else" section. Split that section into a few broad categories and sort the documents into them as appropriate. No documents have been added or removed, they are just reordered. Note that many of these documents are severely obsolete and should be considered for removal. Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241213182057.343527-4-corbet@lwn.net Documentation/admin-guide/index.rst | 161 ++++++++++++++++++++++-------------- 1 file changed, 100 insertions(+), 61 deletions(-) commit 2eb4e66cddd7d2fd2bbb960f57d5e19435fa5290 Author: Jonathan Corbet <corbet@lwn.net> Date: Fri Dec 13 11:20:53 2024 -0700 docs: admin-guide: add some subsection headings As part of the goal of bringing some order to this file, add subsection headings to help readers find what they are looking for. Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241213182057.343527-3-corbet@lwn.net Documentation/admin-guide/index.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 42463d3e89ab09fb0c0ab0e8bce481bae2ef7159 Author: Jonathan Corbet <corbet@lwn.net> Date: Fri Dec 13 11:20:52 2024 -0700 docs: admin-guide: join the sysfs information in one place The documents describing sysfs are spread out in the admin guide; bring them together in one place. Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241213182057.343527-2-corbet@lwn.net Documentation/admin-guide/index.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 366640868ccb4a7991aebe8442b01340fab218e2 Author: Daniel Golle <daniel@makrotopia.org> Date: Sun Dec 15 22:14:48 2024 +0000 clk: mediatek: mt2701-img: add missing dummy clk Add dummy clk for index 0 which was missed during the conversion to mtk_clk_simple_probe(). Fixes: 973d1607d936 ("clk: mediatek: mt2701: use mtk_clk_simple_probe to simplify driver") Cc: stable@vger.kernel.org Signed-off-by: Daniel Golle <daniel@makrotopia.org> Link: https://lore.kernel.org/r/d677486a5c563fe5c47aa995841adc2aaa183b8a.1734300668.git.daniel@makrotopia.org Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/clk/mediatek/clk-mt2701-img.c | 1 + 1 file changed, 1 insertion(+) commit 67aea188f23a5dde51c31a720ccf66aed0ce4187 Author: Daniel Golle <daniel@makrotopia.org> Date: Sun Dec 15 22:14:34 2024 +0000 clk: mediatek: mt2701-mm: add missing dummy clk Add dummy clk which was missed during the conversion to mtk_clk_pdev_probe() and is required for the existing DT bindings to keep working. Fixes: 65c10c50c9c7 ("clk: mediatek: Migrate to mtk_clk_pdev_probe() for multimedia clocks") Cc: stable@vger.kernel.org Signed-off-by: Daniel Golle <daniel@makrotopia.org> Link: https://lore.kernel.org/r/9de23440fcba1ffef9e77d58c9f505105e57a250.1734300668.git.daniel@makrotopia.org Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/clk/mediatek/clk-mt2701-mm.c | 1 + 1 file changed, 1 insertion(+) commit fd291adc5e9a4ee6cd91e57f148f3b427f80647b Author: Daniel Golle <daniel@makrotopia.org> Date: Sun Dec 15 22:14:24 2024 +0000 clk: mediatek: mt2701-bdp: add missing dummy clk Add dummy clk for index 0 which was missed during the conversion to mtk_clk_simple_probe(). Fixes: 973d1607d936 ("clk: mediatek: mt2701: use mtk_clk_simple_probe to simplify driver") Cc: stable@vger.kernel.org Signed-off-by: Daniel Golle <daniel@makrotopia.org> Link: https://lore.kernel.org/r/b8526c882a50f2b158df0eccb4a165956fd8fa13.1734300668.git.daniel@makrotopia.org Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/clk/mediatek/clk-mt2701-bdp.c | 1 + 1 file changed, 1 insertion(+) commit 5fba40be5fbad563914e3ce9d5129a6baaea1ff5 Author: Daniel Golle <daniel@makrotopia.org> Date: Sun Dec 15 22:14:11 2024 +0000 clk: mediatek: mt2701-aud: fix conversion to mtk_clk_simple_probe Some of the audio subsystem clocks defined in clk-mt2701.h aren't actually used by the driver. This broke conversion to mtk_clk_simple_probe which expects that the highest possible clk id is defined by the ARRAY_SIZE. Add additional dummy clocks to fill the gaps and remain compatible with the existing DT bindings. Fixes: 0f69a423c458 ("clk: mediatek: Switch to mtk_clk_simple_probe() where possible") Cc: stable@vger.kernel.org Signed-off-by: Daniel Golle <daniel@makrotopia.org> Link: https://lore.kernel.org/r/a07584d803af57b9ce4b5df5e122c09bf5a56ac9.1734300668.git.daniel@makrotopia.org Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/clk/mediatek/clk-mt2701-aud.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7c8746126a4e256fcf1af9174ee7d92cc3f3bc31 Author: Daniel Golle <daniel@makrotopia.org> Date: Sun Dec 15 22:13:49 2024 +0000 clk: mediatek: mt2701-vdec: fix conversion to mtk_clk_simple_probe Commit 973d1607d936 ("clk: mediatek: mt2701: use mtk_clk_simple_probe to simplify driver") broke DT bindings as the highest index was reduced by 1 because the id count starts from 1 and not from 0. Fix this, like for other drivers which had the same issue, by adding a dummy clk at index 0. Fixes: 973d1607d936 ("clk: mediatek: mt2701: use mtk_clk_simple_probe to simplify driver") Cc: stable@vger.kernel.org Signed-off-by: Daniel Golle <daniel@makrotopia.org> Link: https://lore.kernel.org/r/b126a5577f3667ef19b1b5feea5e70174084fb03.1734300668.git.daniel@makrotopia.org Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/clk/mediatek/clk-mt2701-vdec.c | 1 + 1 file changed, 1 insertion(+) commit f5ce990af7cf9ced0b3459f3d9aed0a27a74d00c Author: Rosen Penev <rosenp@gmail.com> Date: Tue Dec 3 15:36:32 2024 -0800 arm64: dts: bcm4908: nvmem-layout conversion nvmem-layout is a more flexible replacement for nvmem-cells. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://lore.kernel.org/r/20241203233632.184861-1-rosenp@gmail.com Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> .../boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 5c1ae7729e7bf3c7dc4d36cae0133f04fd232747 Author: Sam Edwards <cfsworks@gmail.com> Date: Wed Oct 9 14:54:54 2024 -0700 arm64: dts: broadcom: bcmbca: bcm4908: Add DT for Zyxel EX3510-B Zyxel EX3510-B is a WiFi 6 capable home gateway (family) based on the BCM4906 SoC, with 512MiB of RAM and 512MiB of NAND flash. WiFi support consists of a BCM6710 and a BCM6715 attached to separate PCIe buses. Add an initial devicetree for this system, with support for: - Onboard UART (per base dtsi) - USB (2.0 only; superspeed devices are treated as high-speed due to an unknown cause) - Both buttons (rear reset, front WPS) - Almost all LEDs: - Power (red/green) - Internet (red/green) - WAN (green) - LAN (green; anode is connected to GPIO 13 so currently nonfunctioning) - USB (green) - WPS button (red/green) - Absent in DT: There are 2.4GHz/5.0GHz WiFi status LEDs connected to the WiFi chips instead of the SoC. - NAND flash - Embedded Ethernet switch - Factory-programmed Ethernet MAC address WiFi cannot be enabled at this time due to Linux lacking drivers for both the PCIe controllers and the PCIe WiFi peripherals. Signed-off-by: Sam Edwards <CFSworks@gmail.com> Link: https://lore.kernel.org/r/20241009215454.1449508-3-CFSworks@gmail.com Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm64/boot/dts/broadcom/bcmbca/Makefile | 1 + .../dts/broadcom/bcmbca/bcm4906-zyxel-ex3510b.dts | 196 +++++++++++++++++++++ 2 files changed, 197 insertions(+) commit 0828ed4d9b2d9d48bb7a68785ec5aec33a952844 Author: Sam Edwards <cfsworks@gmail.com> Date: Wed Oct 9 14:54:53 2024 -0700 dt-bindings: arm64: bcmbca: Add Zyxel EX3510-B based on BCM4906 This is a series (EX3510-B0 and EX3510-B1) of residential gateways based on BCM4906, a stripped-down version of the BCM4908 SoC. Although Zyxel's marketing materials call this a "series," the EX3510-B1 appears to be a very minor revision of the EX3510-B0, with only changes that are transparent to software. As far as Linux is concerned, this "series" effectively represents a single model. Signed-off-by: Sam Edwards <CFSworks@gmail.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241009215454.1449508-2-CFSworks@gmail.com Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 1 + 1 file changed, 1 insertion(+) commit 95d56dfaa0dd9352462c9b2636549f2faee033a0 Author: Sam Edwards <cfsworks@gmail.com> Date: Fri Oct 4 22:01:55 2024 -0700 arm64: dts: broadcom: bcmbca: bcm4908: Protect cpu-release-addr The `cpu-release-addr` property is relevant only when the "spin-table" enable method is used. It is the physical address where the bootloader expects Linux to write the secondary CPU entry point's physical address. On this platform, only the CFE bootloader uses this method: U-Boot uses PSCI instead. CFE actually walks the FDT to learn this address, so we're free to put it wherever we want. We only need to make sure that it goes in a reserved-memory block so that writing to it during early boot does not risk conflicting with an unrelated memory allocation: this was not done. Since the previous patch reserved the first page of memory for CFE's secondary-CPU init stub, which is actually much smaller than a page, just put this address at the end of that page and it shall be so protected. Signed-off-by: Sam Edwards <CFSworks@gmail.com> Link: https://lore.kernel.org/r/20241005050155.61103-3-CFSworks@gmail.com Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cef313931d6424982941e1cb40b89daba68663ff Author: Sam Edwards <cfsworks@gmail.com> Date: Fri Oct 4 22:01:54 2024 -0700 arm64: dts: broadcom: bcmbca: bcm4908: Reserve CFE stub area The CFE bootloader places a stub program in the first page of physical memory to hold the secondary CPUs until the boot CPU writes the release address, but does not splice a /reserved-memory node into the FDT to protect it. If Linux overwrites this program before execution reaches smp_prepare_cpus(), the secondary CPUs may become inaccessible. This is only a problem with CFE, and then only until the secondary CPUs are brought online. Ideally, there would be some hypothetical mechanism we could use to indicate that this area of memory is sensitive only during boot. But as there is none, and since it is such a small amount of memory, it is easiest to reserve it unconditionally. Therefore, add a /reserved-memory node to bcm4908.dtsi to protect the first 4KiB of physical memory. Signed-off-by: Sam Edwards <CFSworks@gmail.com> Link: https://lore.kernel.org/r/20241005050155.61103-2-CFSworks@gmail.com Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 44308ef54af768d5ea7a5d17527ef30cbd16e7be Author: Rob Herring (Arm) <robh@kernel.org> Date: Fri Nov 15 13:38:53 2024 -0600 arm64: dts: broadcom: Remove unused and undocumented properties Remove properties which are both unused in the kernel and undocumented. Most likely they are leftovers from downstream. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241115193854.3624123-1-robh@kernel.org Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dts | 2 -- arch/arm64/boot/dts/broadcom/northstar2/ns2-xmc.dts | 1 - arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi | 2 -- 3 files changed, 5 deletions(-) commit 44839e2ac8ec585fda9f7abcc0d3aa5f6754b43c Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Fri Oct 25 18:16:07 2024 +0100 arm64: dts: broadcom: Add DT for D-step version of BCM2712 The D-Step has some minor variations in the hardware, so needs matching changes to DT. Add a new DTS file that modifies the existing (C-step) devicetree. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://lore.kernel.org/r/20241025-drm-vc4-2712-support-v2-36-35efa83c8fc0@raspberrypi.com Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm64/boot/dts/broadcom/Makefile | 1 + arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts | 37 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit 25d77bdd7df26caf59747349a81edb0c57aa0c00 Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Fri Oct 25 18:16:06 2024 +0100 arm64: dts: broadcom: Add display pipeline support to BCM2712 Adds the HVS and associated hardware blocks to support the HDMI and writeback connectors on BCM2712 / Pi5. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://lore.kernel.org/r/20241025-drm-vc4-2712-support-v2-35-35efa83c8fc0@raspberrypi.com Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts | 14 ++ arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 188 +++++++++++++++++++++++ 2 files changed, 202 insertions(+) commit f373ebec18a75d671908e81ed9925aebf279ec2f Author: Jesus Narvaez <jesus.narvaez@intel.com> Date: Fri Dec 13 12:47:20 2024 -0800 drm/i915/guc: Update guc_err message to show outstanding g2h responses Updating the guc_error message to show how many g2h responses are still outstanding, in order to help with future debugging. Signed-off-by: Jesus Narvaez <jesus.narvaez@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213204720.3918056-1-jesus.narvaez@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 568680a0c847cb0dee3e86d5265e7c3a55538ccf Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Fri Oct 25 18:16:05 2024 +0100 arm64: dts: broadcom: Add firmware clocks and power nodes to Pi5 DT BCM2712 still uses the firmware clocks and power drivers, so add them to the base device tree. The brcm,bcm2836-l1-intc controller isn't used on this platform. It is used on 32-bit kernels for the smp_boot_secondary hook, but BCM2712 can't run a 32-bit kernel. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://lore.kernel.org/r/20241025-drm-vc4-2712-support-v2-34-35efa83c8fc0@raspberrypi.com Link: https://lore.kernel.org/r/20241212-dt-bcm2712-fixes-v3-7-44a7f3390331@raspberrypi.com Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts | 28 ++++++++++++++++++++++++ arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 5 ----- 2 files changed, 28 insertions(+), 5 deletions(-) commit bc1027473986dbbd93f9eb41de33307f9abe1319 Author: Ben Shelton <benjamin.h.shelton@intel.com> Date: Mon Dec 16 15:15:35 2024 +0100 ice: Add MDD logging via devlink health Add a devlink health reporter for MDD events. The 'dump' handler will return the information captured in each call to ice_handle_mdd_event(). A device reset (CORER/PFR) will put the reporter back in healthy state. Signed-off-by: Ben Shelton <benjamin.h.shelton@intel.com> Reviewed-by: Igor Bagnucki <igor.bagnucki@intel.com> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Co-developed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> drivers/net/ethernet/intel/ice/devlink/health.c | 77 +++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/devlink/health.h | 11 ++++ drivers/net/ethernet/intel/ice/ice_main.c | 6 ++ 3 files changed, 94 insertions(+) commit 2a82874a3b7be3f424eb6e94cd4f225e928efe2a Author: Przemek Kitszel <przemyslaw.kitszel@intel.com> Date: Mon Dec 16 15:15:34 2024 +0100 ice: add Tx hang devlink health reporter Add Tx hang devlink health reporter, see struct ice_tx_hang_event to see what exactly is reported. For now dump descriptors with little metadata and skb diagnostic information. Reviewed-by: Igor Bagnucki <igor.bagnucki@intel.com> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Co-developed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com> Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> drivers/net/ethernet/intel/ice/Makefile | 1 + drivers/net/ethernet/intel/ice/devlink/health.c | 192 ++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/devlink/health.h | 47 ++++++ drivers/net/ethernet/intel/ice/ice.h | 2 + drivers/net/ethernet/intel/ice/ice_main.c | 18 ++- 5 files changed, 255 insertions(+), 5 deletions(-) commit 1863f213d3e878d10589ebc0aae1c861c3b0f0c3 Author: Luwei Zhou <b45643@freescale.com> Date: Mon Dec 16 10:28:51 2024 -0800 Input: mma8450 - add chip ID check in probe Prevent continuous polling error logs by adding a chip ID check in the probe function. This ensures the driver only proceeds when the mma8450 is present, avoiding issues in scenarios like missing add-on cards. Signed-off-by: Luwei Zhou <b45643@freescale.com> Signed-off-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20241216173205.211058-1-Frank.Li@nxp.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/misc/mma8450.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 7c4b497fd4032935676b9024396f187fee005739 Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Tue Dec 17 18:41:54 2024 +0100 clk: davinci: remove platform data struct There are no board files using struct davinci_pll_platform_data anymore. The structure itself is currently used to store a single pointer. Let's remove the struct definition, the header and rework the driver to not require the syscon regmap to be stored in probe(). Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20241217174154.84441-1-brgl@bgdev.pl Reviewed-by: David Lechner <david@lechnology.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/clk/davinci/pll.c | 32 +++------------------------ include/linux/platform_data/clk-davinci-pll.h | 21 ------------------ 2 files changed, 3 insertions(+), 50 deletions(-) commit f167292c8d13d31cbe9ffaa8108edcb4e8b1c60f Author: Rosen Penev <rosenp@gmail.com> Date: Sun Oct 20 18:51:47 2024 -0700 ARM: dts: meraki-mr26: set mac address for gmac0 Currently this needs to be done in userspace. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://lore.kernel.org/r/20241021015147.172700-1-rosenp@gmail.com Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm/boot/dts/broadcom/bcm53015-meraki-mr26.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 618775c9007d663ab1b2d600324f377e6ba21771 Author: Linus Walleij <linus.walleij@linaro.org> Date: Sat Oct 19 22:39:38 2024 +0200 ARM: dts: broadcom: Add Genexis XG6846B DTS file This adds a device tree for the Genexis XG6846B router. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20241019-genexis-xg6846b-base-v3-9-8375a0e1f89f@linaro.org Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm/boot/dts/broadcom/Makefile | 1 + .../boot/dts/broadcom/bcm6846-genexis-xg6846b.dts | 244 +++++++++++++++++++++ 2 files changed, 245 insertions(+) commit 8166df7568ee8c0893aa44c6046a796d5f5f7353 Author: Linus Walleij <linus.walleij@linaro.org> Date: Sat Oct 19 22:39:37 2024 +0200 dt-bindings: arm: bcmbca: Add Genexis XG6846B This adds the device tree bindings for the Genexis XG6846B router/gateway/broadband modem. Acked-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20241019-genexis-xg6846b-base-v3-8-8375a0e1f89f@linaro.org Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 1 + 1 file changed, 1 insertion(+) commit 7aa6e6900371f65f63c4a5236d094a947fd5a157 Author: Linus Walleij <linus.walleij@linaro.org> Date: Sat Oct 19 22:39:36 2024 +0200 dt-bindings: vendor-prefixes: Add Genexis Genexis is Swedish/Dutch company producing broadband access equipment. Link: https://genexis.eu/ Acked-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20241019-genexis-xg6846b-base-v3-7-8375a0e1f89f@linaro.org Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 3abdd3eb88a2f72daa57daf4142226441b9421dd Author: Linus Walleij <linus.walleij@linaro.org> Date: Sat Oct 19 22:39:35 2024 +0200 ARM: dts: bcm6846: Add ARM PL081 DMA block The ARM PL081 DMA controller can be found in the BCM6846 memory map, and it turns out to work. The block may be used as DMA engine for some of the peripherals (maybe the EMMC controller found in the same group of peripherals?) but it can always be used as a memcpy engine, which is a generic "blitter". I tested it with the dmatest module, and it copies lots of data very fast and fires hundreds of thousands of interrupts so it works just fine. Add it to the BCM6846 DTSI file. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20241019-genexis-xg6846b-base-v3-6-8375a0e1f89f@linaro.org Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm/boot/dts/broadcom/bcm6846.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 71449ffdb27e39a7681f82477d0906b85f43ba4f Author: Linus Walleij <linus.walleij@linaro.org> Date: Sat Oct 19 22:39:34 2024 +0200 ARM: dts: bcm6846: Add LED controller Add the BCMBCA LED controller to the BCM6846 DTSI. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20241019-genexis-xg6846b-base-v3-5-8375a0e1f89f@linaro.org Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm/boot/dts/broadcom/bcm6846.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 20aaee0b437456546726221fb0a83e48caecdf0d Author: Linus Walleij <linus.walleij@linaro.org> Date: Sat Oct 19 22:39:33 2024 +0200 ARM: dts: bcm6846: Add MDIO control block This adds the MDIO block found in the BCM6846. Use the new "brcm,bcm6846-mdio" compatible (merged to the networking tree) for this block. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20241019-genexis-xg6846b-base-v3-4-8375a0e1f89f@linaro.org Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm/boot/dts/broadcom/bcm6846.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit a534e78e46a698c3d947bd81ece26beb0b3e0f3b Author: Linus Walleij <linus.walleij@linaro.org> Date: Sat Oct 19 22:39:32 2024 +0200 ARM: dts: bcm6846: Add GPIO blocks The BCM6846 has the same simplistic GPIOs as some other Broadcom SoCs: plain memory-mapped registers with up to 8 blocks of 32 GPIOs each totalling 256 GPIOs. Users of the SoC can selectively enable the GPIO blocks actually used with a certain design. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20241019-genexis-xg6846b-base-v3-3-8375a0e1f89f@linaro.org Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm/boot/dts/broadcom/bcm6846.dtsi | 80 +++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit e5739733e92fca45ec544851484e70c86ecbdfc4 Author: Linus Walleij <linus.walleij@linaro.org> Date: Sat Oct 19 22:39:31 2024 +0200 ARM: dts: bcm6846: Enable watchdog The BCM6846 has a BCM7038-compatible watchdog timer, just add it to the device tree. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20241019-genexis-xg6846b-base-v3-2-8375a0e1f89f@linaro.org Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm/boot/dts/broadcom/bcm6846.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 5e9ebdd838aac61fa3b74ae0f18ba226b5a48f78 Author: Linus Walleij <linus.walleij@linaro.org> Date: Sat Oct 19 22:39:30 2024 +0200 ARM: dts: bcm6846: Add iproc rng The bcm6846 has a standard iproc 200 RNG which is already fully supported by bindings, so just add it to the DTS file. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20241019-genexis-xg6846b-base-v3-1-8375a0e1f89f@linaro.org Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm/boot/dts/broadcom/bcm6846.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit e0bea865f23ad84c384f8f05b6473e26e75a6d3b Author: Rob Herring (Arm) <robh@kernel.org> Date: Fri Nov 15 13:39:01 2024 -0600 arm: dts: broadcom: Remove unused and undocumented properties Remove properties which are both unused in the kernel and undocumented. Most likely they are leftovers from downstream. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241115193904.3624350-1-robh@kernel.org Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> arch/arm/boot/dts/broadcom/bcm53340-ubnt-unifi-switch8.dts | 1 - arch/arm/boot/dts/broadcom/bcm953012hr.dts | 1 - arch/arm/boot/dts/broadcom/bcm953012k.dts | 1 - arch/arm/boot/dts/broadcom/bcm958522er.dts | 1 - arch/arm/boot/dts/broadcom/bcm958525er.dts | 1 - arch/arm/boot/dts/broadcom/bcm958525xmc.dts | 1 - arch/arm/boot/dts/broadcom/bcm958622hr.dts | 1 - arch/arm/boot/dts/broadcom/bcm958623hr.dts | 1 - arch/arm/boot/dts/broadcom/bcm958625hr.dts | 1 - arch/arm/boot/dts/broadcom/bcm958625k.dts | 1 - arch/arm/boot/dts/broadcom/bcm988312hr.dts | 1 - 11 files changed, 11 deletions(-) commit 6a8d72b80807ad45229c0f5a17e3be843b15a703 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Tue Dec 17 08:54:46 2024 -0800 accel/amdxdna: Remove DRM_AMDXDNA_HWCTX_CONFIG_NUM Defining a number of enum elements in uapi header is meaningless. It will not be used as expected and can potentially lead to incompatible issue between user space application and driver. Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217165446.2607585-2-lizhi.hou@amd.com include/uapi/drm/amdxdna_accel.h | 1 - 1 file changed, 1 deletion(-) commit 03c318a0af96f1292e0e6fd0da92facb4f3a5c31 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Tue Dec 17 08:54:45 2024 -0800 accel/amdxdna: Add zero check for pad in ioctl input structures For input ioctl structures, it is better to check if the pad is zero. Thus, the pad bytes might be usable in the future. Suggested-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217165446.2607585-1-lizhi.hou@amd.com drivers/accel/amdxdna/aie2_ctx.c | 3 +++ drivers/accel/amdxdna/aie2_message.c | 3 +++ drivers/accel/amdxdna/amdxdna_ctx.c | 6 ++++++ drivers/accel/amdxdna/amdxdna_gem.c | 2 +- include/uapi/drm/amdxdna_accel.h | 10 +++++----- 5 files changed, 18 insertions(+), 6 deletions(-) commit 0acb90676629f5549e185dd3a144806e2a88fe40 Merge: 7b4035ebf2af 5af42209a4d2 Author: Mark Brown <broonie@kernel.org> Date: Tue Dec 17 17:44:16 2024 +0000 spi: atmel-quadspi: Refactor to allow supporting Merge series from "Csókás, Bence" <csokas.bence@prolan.hu>: This is based on Tudor Ambarus' submission from 2021, and my refactor of said sumbission from roughly a month ago. Link: https://lore.kernel.org/linux-spi/20211214133404.121739-1-tudor.ambarus@microchip.com/ Link: https://lore.kernel.org/linux-spi/20241030084445.2438750-1-csokas.bence@prolan.hu/ This time, I submit both my refactor and the diff between it and the original submission, rebased on top of Linus' master, namely: commit 7d4050728c83 ("Merge tag 'vfs-6.13-rc1.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs") Tested on a SAMA5G27C, we'll soon test on a SAMA7G54 we got from Microchip for this purpose. commit 6d4a0f4ea72319c9a37c1a7191695467006dd272 Merge: 828fd3f1d611 78d4f34e2115 Author: Dmitry Torokhov <dmitry.torokhov@gmail.com> Date: Tue Dec 17 09:40:45 2024 -0800 Merge tag 'v6.13-rc3' into next Sync up with the mainline. commit d349fd151f1aeb0d8aea4a2f0fe9ba24309609ed Author: Colin Ian King <colin.i.king@gmail.com> Date: Tue Dec 17 17:11:51 2024 +0000 ASoC: soc-core: remove redundant assignment to variable ret The variable ret is being assigned a zero value that is never read, it is being re-assigned a new value from the return value from the call to snd_soc_dapm_add_routes. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20241217171151.354550-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/soc-core.c | 1 - 1 file changed, 1 deletion(-) commit 2846fe5614ac15117fddaa45b86e7e77d91dd569 Author: Przemek Kitszel <przemyslaw.kitszel@intel.com> Date: Mon Dec 16 15:15:33 2024 +0100 ice: rename devlink_port.[ch] to port.[ch] Drop "devlink_" prefix from files that sit in devlink/. I'm going to add more files there, and repeating "devlink" does not feel good. This is also the scheme used in most other places, most notably the devlink core files are named like that. devlink.[ch] stays as is. Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> drivers/net/ethernet/intel/ice/Makefile | 2 +- drivers/net/ethernet/intel/ice/devlink/devlink.c | 2 +- drivers/net/ethernet/intel/ice/devlink/{devlink_port.c => port.c} | 2 +- drivers/net/ethernet/intel/ice/devlink/{devlink_port.h => port.h} | 0 drivers/net/ethernet/intel/ice/ice_eswitch.h | 2 +- drivers/net/ethernet/intel/ice/ice_main.c | 2 +- drivers/net/ethernet/intel/ice/ice_repr.c | 2 +- drivers/net/ethernet/intel/ice/ice_sf_eth.c | 2 +- 8 files changed, 7 insertions(+), 7 deletions(-) commit 3dbfde7f6bc7b8efff26e3e98fdd8cba20287da7 Author: Mateusz Polchlopek <mateusz.polchlopek@intel.com> Date: Mon Dec 16 15:15:32 2024 +0100 devlink: add devlink_fmsg_dump_skb() function Add devlink_fmsg_dump_skb() function that adds some diagnostic information about skb (like length, pkt type, MAC, etc) to devlink fmsg mechanism using bunch of devlink_fmsg_put() function calls. Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> include/net/devlink.h | 2 ++ net/devlink/health.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) commit 346947223bacf96155f603528823a60b18b92d9a Author: Przemek Kitszel <przemyslaw.kitszel@intel.com> Date: Mon Dec 16 15:15:31 2024 +0100 devlink: add devlink_fmsg_put() macro Add devlink_fmsg_put() that dispatches based on the type of the value to put, example: bool -> devlink_fmsg_bool_pair_put(). Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> include/net/devlink.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 20d00cfae627f048560c46ba5849011a34515103 Author: Przemek Kitszel <przemyslaw.kitszel@intel.com> Date: Mon Dec 16 15:15:30 2024 +0100 checkpatch: don't complain on _Generic() use Improve CamelCase recognition logic to avoid reporting on _Generic() use. Other C keywords, such as _Bool, are intentionally omitted, as those should be rather avoided in new source code. Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> scripts/checkpatch.pl | 2 ++ 1 file changed, 2 insertions(+) commit 915d2f0718a42ee0b334be34cc53664a865a5928 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:55:32 2024 -0800 KVM: Move KVM_REG_SIZE() definition to common uAPI header Define KVM_REG_SIZE() in the common kvm.h header, and delete the arm64 and RISC-V versions. As evidenced by the surrounding definitions, all aspects of the register size encoding are generic, i.e. RISC-V should have moved arm64's definition to common code instead of copy+pasting. Acked-by: Anup Patel <anup@brainfault.org> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Link: https://lore.kernel.org/r/20241128005547.4077116-2-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/arm64/include/uapi/asm/kvm.h | 3 --- arch/riscv/include/uapi/asm/kvm.h | 3 --- include/uapi/linux/kvm.h | 4 ++++ 3 files changed, 4 insertions(+), 6 deletions(-) commit af98d8a36a963e758e84266d152b92c7b51d4ecb Author: Vishal Chourasia <vishalc@linux.ibm.com> Date: Thu Dec 12 10:01:03 2024 +0530 sched/fair: Fix CPU bandwidth limit bypass during CPU hotplug CPU controller limits are not properly enforced during CPU hotplug operations, particularly during CPU offline. When a CPU goes offline, throttled processes are unintentionally being unthrottled across all CPUs in the system, allowing them to exceed their assigned quota limits. Consider below for an example, Assigning 6.25% bandwidth limit to a cgroup in a 8 CPU system, where, workload is running 8 threads for 20 seconds at 100% CPU utilization, expected (user+sys) time = 10 seconds. $ cat /sys/fs/cgroup/test/cpu.max 50000 100000 $ ./ebizzy -t 8 -S 20 // non-hotplug case real 20.00 s user 10.81 s // intended behaviour sys 0.00 s $ ./ebizzy -t 8 -S 20 // hotplug case real 20.00 s user 14.43 s // Workload is able to run for 14 secs sys 0.00 s // when it should have only run for 10 secs During CPU hotplug, scheduler domains are rebuilt and cpu_attach_domain is called for every active CPU to update the root domain. That ends up calling rq_offline_fair which un-throttles any throttled hierarchies. Unthrottling should only occur for the CPU being hotplugged to allow its throttled processes to become runnable and get migrated to other CPUs. With current patch applied, $ ./ebizzy -t 8 -S 20 // hotplug case real 21.00 s user 10.16 s // intended behaviour sys 0.00 s This also has another symptom, when a CPU goes offline, and if the cfs_rq is not in throttled state and the runtime_remaining still had plenty remaining, it gets reset to 1 here, causing the runtime_remaining of cfs_rq to be quickly depleted. Note: hotplug operation (online, offline) was performed in while(1) loop v3: https://lore.kernel.org/all/20241210102346.228663-2-vishalc@linux.ibm.com v2: https://lore.kernel.org/all/20241207052730.1746380-2-vishalc@linux.ibm.com v1: https://lore.kernel.org/all/20241126064812.809903-2-vishalc@linux.ibm.com Suggested-by: Zhang Qiao <zhangqiao22@huawei.com> Signed-off-by: Vishal Chourasia <vishalc@linux.ibm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Vincent Guittot <vincent.guittot@linaro.org> Tested-by: Madadi Vineeth Reddy <vineethr@linux.ibm.com> Tested-by: Samir Mulani <samir@linux.ibm.com> Link: https://lore.kernel.org/r/20241212043102.584863-2-vishalc@linux.ibm.com kernel/sched/fair.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 41a1e976623eb430f7b5a8619d3810b44e6235ad Author: Peter Zijlstra <peterz@infradead.org> Date: Mon Dec 16 11:08:12 2024 +0100 x86/mm: Convert unreachable() to BUG() Commit 2190966fbc14 ("x86: Convert unreachable() to BUG()") missed one. And after commit 06e24745985c ("objtool: Remove annotate_{,un}reachable()") the invalid use of unreachable() (rightfully) triggers warnings: vmlinux.o: warning: objtool: page_fault_oops() falls through to next function is_prefetch() Fixes: 2190966fbc14 ("x86: Convert unreachable() to BUG()") Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20241216093215.GD12338@noisy.programming.kicks-ass.net arch/x86/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b4035ebf2af2c2f1450e8c38bf4f41acd3f01bf Author: Iker Pedrosa <ikerpedrosam@gmail.com> Date: Mon Dec 16 10:57:33 2024 +0100 spi: dt-bindings: Document CS active-high The current documentation does not clearly explain how to invert the SPI CS signal to make it active-high. This makes it very difficult to understand. This patch adds a simple explanation on how to set the CS line in active-high and adds an example to make it easier for users who need that setup for their SPI peripherals. Link: https://forums.raspberrypi.com/viewtopic.php?t=378222 Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20241216095739.27320-1-ikerpedrosam@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> .../devicetree/bindings/spi/spi-controller.yaml | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit d34357743b360c99903b5a59daab08f55b2f41a1 Author: Derek Foreman <derek.foreman@collabora.com> Date: Mon Dec 2 12:19:39 2024 -0600 drm/connector: Allow clearing HDMI infoframes Our infoframe setting code currently lacks the ability to clear infoframes. For some of the infoframes, we only need to replace them, so if an error occurred when generating a new infoframe we would leave a stale frame instead of clearing the frame. However, the Dynamic Range and Mastering (DRM) infoframe should only be present when displaying HDR content (ie: the HDR_OUTPUT_METADATA blob is set). If we can't clear infoframes, the stale DRM infoframe will remain and we can never set the display back to SDR mode. With this change, we clear infoframes when they can not, or should not, be generated. This fixes switching to an SDR mode from an HDR one. Fixes: f378b77227bc ("drm/connector: hdmi: Add Infoframes generation") Signed-off-by: Derek Foreman <derek.foreman@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241202181939.724011-1-derek.foreman@collabora.com Signed-off-by: Maxime Ripard <mripard@kernel.org> drivers/gpu/drm/display/drm_hdmi_state_helper.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6adc91663565542bac0a21b32c437439557c6f71 Author: Huang Borong <huangborong@bosc.ac.cn> Date: Fri Dec 13 17:09:24 2024 +0800 dt-bindings: interrupt-controller: update imsic reg address to 0x24000000 in Example 1 Change the 'reg' property address from 0x28000000 to 0x24000000 to match the node label interrupt-controller@24000000. Signed-off-by: Huang Borong <huangborong@bosc.ac.cn> Link: https://lore.kernel.org/r/20241213090924.181249-1-huangborong@bosc.ac.cn Signed-off-by: Rob Herring (Arm) <robh@kernel.org> .../devicetree/bindings/interrupt-controller/riscv,imsics.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29df7025cff00dd9fa7cacbec979ede97ee775eb Author: Jakob Riepler <jakob+lkml@paranoidlabs.org> Date: Mon Dec 16 22:37:55 2024 +0100 leds: pwm-multicolor: Disable PWM when going to suspend This fixes suspend on platforms like stm32mp1xx, where the PWM consumer has to be disabled for the PWM to enter suspend. Another positive side effect is that active-low LEDs now properly turn off instead of going back to full brightness when they are set to 0. Link: https://lore.kernel.org/all/20240417153846.271751-2-u.kleine-koenig@pengutronix.de/ Signed-off-by: Jakob Riepler <jakob+lkml@paranoidlabs.org> Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/20241216213754.18374-2-jakob+lkml@paranoidlabs.org Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/rgb/leds-pwm-multicolor.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0508316be63bb735f59bdc8fe4527cadb62210ca Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Mon Dec 16 16:49:23 2024 +0900 leds: netxbig: Fix an OF node reference leak in netxbig_leds_get_of_pdata() netxbig_leds_get_of_pdata() does not release the OF node obtained by of_parse_phandle() when of_find_device_by_node() fails. Add an of_node_put() call to fix the leak. This bug was found by an experimental static analysis tool that I am developing. Fixes: 9af512e81964 ("leds: netxbig: Convert to use GPIO descriptors") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Link: https://lore.kernel.org/r/20241216074923.628509-1-joe@pf.is.s.u-tokyo.ac.jp Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/leds-netxbig.c | 1 + 1 file changed, 1 insertion(+) commit 1c896113f04e34d0036ef506532d2e6cf77dd1e5 Author: Marek Behún <kabel@kernel.org> Date: Sun Dec 15 22:13:23 2024 +0100 turris-omnia-mcu-interface.h: Move macro definitions outside of enums Move the definitions of enumerator related macros outside of the enumerator definitions. Suggested-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/linux-leds/20241212183357.GK7139@google.com/ Signed-off-by: Marek Behún <kabel@kernel.org> Link: https://lore.kernel.org/r/20241215211323.23364-1-kabel@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> include/linux/turris-omnia-mcu-interface.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit db03b70969aab4ef111a3369cfd90ea4da3a6aa0 Author: zhenwei pi <pizhenwei@bytedance.com> Date: Mon Dec 16 20:19:53 2024 +0800 RDMA/rxe: Fix mismatched max_msg_sz User mode queries max_msg_sz as 0x800000 by command 'ibv_devinfo -v', however ibv_post_send/ibv_post_recv has a limit of 2^31. Fix this mismatched information. Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> Fixes: f605f26ea196 ("RDMA/rxe: Protect QP state with qp->state_lock") Fixes: 5bf944f24129 ("RDMA/rxe: Add error messages") Link: https://patch.msgid.link/20241216121953.765331-1-pizhenwei@bytedance.com Review-by: Zhu Yanjun <yanjun.zhu@linux.dev> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/sw/rxe/rxe_param.h | 2 +- drivers/infiniband/sw/rxe/rxe_verbs.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) commit 2dab32d1c79c4fc1542075ab86de1c8948317375 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Mon Dec 16 21:19:14 2024 +0000 IB/hfi1: Remove unused hfi1_format_hwerrors hfi1_format_hwerrors() was added in 2015 by commit 7724105686e7 ("IB/hfi1: add driver files") but never used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20241216211914.745111-1-linux@treblig.org Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/hfi1/hfi.h | 14 -------------- drivers/infiniband/hw/hfi1/intr.c | 31 ------------------------------- 2 files changed, 45 deletions(-) commit 9ce43bba65698ed1cfc3cfbd4dcc16f6472b28ee Author: Imre Deak <imre.deak@intel.com> Date: Thu Dec 12 01:03:26 2024 +0200 drm/tests: Add tests for drm_connector_dynamic_init()/register() Add kunit tests for drm_connector_dynamic_init()/drm_connector_dynamic_register() added in an earlier commit. v2: Replace the reference to the patchset with "earlier commit". (Jani) Suggested-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211230328.4012496-10-imre.deak@intel.com drivers/gpu/drm/tests/drm_connector_test.c | 463 +++++++++++++++++++++++++++++ 1 file changed, 463 insertions(+) commit 5c4bfbb21dedf5d56a55cb0e129ccb1fd5083d14 Author: Mingwei Zheng <zmw12306@gmail.com> Date: Fri Dec 6 17:16:18 2024 -0500 pinctrl: nomadik: Add check for clk_enable() Add check for the return value of clk_enable() to catch the potential error. Disable success clks in the error handling. Change return type of nmk_gpio_glitch_slpm_init casade. Fixes: 3a19805920f1 ("pinctrl: nomadik: move all Nomadik drivers to subdir") Signed-off-by: Mingwei Zheng <zmw12306@gmail.com> Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com> Link: https://lore.kernel.org/20241206221618.3453159-1-zmw12306@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/nomadik/pinctrl-nomadik.c | 35 ++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) commit efe479ccc4b58efcc9568a19c89fd797f63d0bf0 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Thu Dec 5 14:13:10 2024 +0100 pinctrl: ingenic: Replace seq_printf() by seq_puts() Simplify "seq_printf(p, "%s", ...)" to "seq_puts(p, ...)". Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/9a5b38027ed674ca773fe28a3b3246631eae8834.1733404358.git.geert+renesas@glider.be Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/pinctrl-ingenic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04e10d00bf0a3e5bf07f6cdd44e296cf52407bf0 Author: Imre Deak <imre.deak@intel.com> Date: Thu Dec 12 01:03:25 2024 +0200 drm/connector: Warn if a connector is registered/added incorrectly All the drivers should be converted now to use drm_connector_dynamic_init() for MST connectors, hence drm_connector_dynamic_register()->drm_connector_add() can WARN now if this was not the case (for instance if a driver inited an MST connector with one of the drm_connector_init*() functions incorrectly). Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211230328.4012496-9-imre.deak@intel.com drivers/gpu/drm/drm_connector.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 5a83c9293ca0cac25055d4b804b2ebee700eba6f Author: Imre Deak <imre.deak@intel.com> Date: Thu Dec 12 01:03:24 2024 +0200 drm/nouveau/dp_mst: Expose a connector to kernel users after it's properly initialized After a connector is added to the drm_mode_config::connector_list, it's visible to any in-kernel users looking up connectors via the above list. Make sure that the connector is properly initialized before such look-ups, by initializing the connector with drm_connector_dynamic_init() - which doesn't add the connector to the list - and registering it with drm_connector_dynamic_register() - which adds the connector to the list - after the initialization is complete. v2: Fix s/drm_connector_dynamic_register()/drm_connector_dynamic_init() typo in the commit log. Cc: Karol Herbst <kherbst@redhat.com> Cc: Lyude Paul <lyude@redhat.com> Cc: Danilo Krummrich <dakr@kernel.org> Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211230328.4012496-8-imre.deak@intel.com drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 550949c67cedfee22334dcb47ec6447f39a96af0 Author: Imre Deak <imre.deak@intel.com> Date: Thu Dec 12 01:03:23 2024 +0200 drm/amd/dp_mst: Expose a connector to kernel users after it's properly initialized After a connector is added to the drm_mode_config::connector_list, it's visible to any in-kernel users looking up connectors via the above list. Make sure that the connector is properly initialized before such look-ups, by initializing the connector with drm_connector_dynamic_init() - which doesn't add the connector to the list - and registering it with drm_connector_dynamic_register() - which adds the connector to the list - after the initialization is complete. v2: Fix s/drm_connector_dynamic_register()/drm_connector_dynamic_init() typo in the commit log. Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: Wayne Lin <wayne.lin@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Lyude Paul <lyude@redhat.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211230328.4012496-7-imre.deak@intel.com drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6fe7b1d10cbdf2c07808e76306c501482e563263 Author: Imre Deak <imre.deak@intel.com> Date: Thu Dec 12 01:03:22 2024 +0200 drm/i915/dp_mst: Expose a connector to kernel users after it's properly initialized After a connector is added to the drm_mode_config::connector_list, it's visible to any in-kernel users looking up connectors via the above list. Make sure that the connector is properly initialized before such look-ups, by initializing the connector with drm_connector_dynamic_init() - which doesn't add the connector to the list - and registering it with drm_connector_dynamic_register() - which adds the connector to the list - after the initialization is complete. v2: - Rebase on the change which moves adding the connector to the connector list only later when calling drm_connector_dynamic_register(). v3: - Rebase on drm-misc-next, due to a trivial conflict with commit 5503f8112e52 ("drm/i915/mst: unify MST topology callback naming ..."), which is only in drm-intel-next. - Fix s/drm_connector_dynamic_register()/drm_connector_dynamic_init() typo in the commit log. Cc: Lyude Paul <lyude@redhat.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (v1) Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211230328.4012496-6-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_dp_mst.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 0f7c05b3c74d8cfce7d7418e22539dbc382de235 Author: Imre Deak <imre.deak@intel.com> Date: Thu Dec 12 01:03:21 2024 +0200 drm/dp_mst: Register connectors via drm_connector_dynamic_register() MST connectors should be initialized/registered by calling drm_connector_dynamic_init()/drm_connector_dynamic_register(). The commit adding these functions explains the issue with the current drm_connector_init*()/drm_connector_register() interface for MST connectors. Based on the above adjust here the registration part and change the initialization part in follow-up commits for each driver. For now, drivers are allowed to keep using the drm_connector_init*() functions, by drm_connector_dynamic_register() checking for this (see drm_connector_add()). A commit later will change this to WARN in such cases. v2: Replaces references to a "patch" with "commit" in the commit log. (Jani) Cc: Lyude Paul <lyude@redhat.com> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: Wayne Lin <wayne.lin@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Karol Herbst <kherbst@redhat.com> Cc: Danilo Krummrich <dakr@kernel.org> Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211230328.4012496-5-imre.deak@intel.com drivers/gpu/drm/display/drm_dp_mst_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dae4f9b43c9e54bdf5a156f48333a7e2832da1a1 Author: Imre Deak <imre.deak@intel.com> Date: Thu Dec 12 01:03:20 2024 +0200 drm/connector: Add deprecation notes for drm_connector_register/unregister Drivers should register/unregister only dynamic (MST) connectors manually using drm_connector_dynamic_register()/unregister(). Static connectors are registered/unregistered by the DRM core automatically. Some drivers still call drm_connector_register()/ unregister() for static connectors, both of which should be a nop for them and hence are scheduled to be removed. Update the function documentation for these functions accordingly. v2: s/deprication/deprecation in subject line. (Jani) Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211230328.4012496-4-imre.deak@intel.com drivers/gpu/drm/drm_connector.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 2f17099ab9098e4541c7a2564b3dd7af9923c54b Author: Imre Deak <imre.deak@intel.com> Date: Thu Dec 12 01:03:19 2024 +0200 drm/connector: Add FIXME for GETRESOURCES ioctl wrt. uninited connectors The connectors enumerated by the GETRESOURCES ioctl may not be fully initialized yet wrt. to the state set up during connector registration (for instance the connector's debugfs/sysfs interfaces may not exist yet). This can happen in two ways: 1. Connectors initialized and added to the drm_mode_config::connector_list during driver loading will be visible to the GETRESOURCES ioctl caller once the driver is registered via drm_dev_register()->drm_minor_register(DRM_MINOR_PRIMARY) and before the connectors are registered via drm_dev_register()-> drm_modeset_register_all(). 2. Dynamic connectors (MST) - after being initialized - may be added to the connector_list after the driver is loaded and registered and before the connector's userspace interfaces (debugfs, sysfs etc.) are added in drm_connector_dynamic_register(). A solution for 1. would be to register the driver only after the connectors are registered, for 2. to add the connector to connector_list only after the userspace interfaces are registered. The fix requires a bigger change, for now adding a FIXME: comment for it. v2: Remove references to the patchset from the commit log. (Jani) Suggested-by: Simona Vetter <simona.vetter@ffwll.ch> Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211230328.4012496-3-imre.deak@intel.com drivers/gpu/drm/drm_mode_config.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1d985ddabbe0ab73e34d128fdcc26b8ed05a9328 Author: Imre Deak <imre.deak@intel.com> Date: Thu Dec 12 01:03:18 2024 +0200 drm/connector: Add a way to init/add a connector in separate steps Atm when the connector is added to the drm_mode_config::connector_list, the connector may not be fully initialized yet. This is not a problem for static connectors initialized/added during driver loading, for which the driver ensures that look-ups via the above list are not possible until all the connector and other required state is fully initialized already. It's also not a problem for user space looking up either a static or dynamic (see what this is below) connector, since this will be only possible once the connector is registered. A dynamic - atm only a DP MST - connector can be initialized and added after the load time initialization is done. Such a connector may be looked up by in-kernel users once it's added to the connector list. In particular a hotplug handler could perform a detection on all the connectors on the list and hence find a connector there which isn't yet initialized. For instance the connector's helper hooks may be unset, leading to a NULL dereference while the detect helper calls the connector's drm_connector_helper_funcs::detect() or detect_ctx() handler. To resolve the above issue, add a way for dynamic connectors to separately initialize the DRM core specific parts of the connector without adding it to the connector list - by calling the new drm_connector_dynamic_init() - and to add the connector to the list later once all the initialization is complete and the connector is registered - by calling the new drm_connector_dynamic_register(). Adding the above 2 functions was also motivated to make the distinction of the interface between static and dynamic connectors clearer: Drivers should manually initialize and register only dynamic connectors (with the above 2 functions). A driver should only initialize a static connector (with one of the drm_connector_init*, drmm_connector_init* functions) while the registration of the connector will be done automatically by DRM core. v2: (Jani) - Let initing DDC as well via drm_connector_init_core(). - Rename __drm_connector_init to drm_connector_init_core_and_add(). v3: - Rename drm_connector_init_core() to drm_connector_dynamic_init(). (Sima) - Instead of exporting drm_connector_add(), move adding the connector to the registration step via a new drm_connector_dynamic_register(). (Sima) - Update drm_connector_dynamic_init()'s function documentation and the commit log according to the above changes. - Update the commit log describing the problematic scenario during connector detection. (Maxime) Cc: Jani Nikula <jani.nikula@intel.com> Cc: Simona Vetter <simona@ffwll.ch> Cc: Maxime Ripard <mripard@kernel.org> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (v1) Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Maxime Ripard <mripard@kernel.org> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211230328.4012496-2-imre.deak@intel.com drivers/gpu/drm/drm_connector.c | 150 ++++++++++++++++++++++++++++++++++------ include/drm/drm_connector.h | 6 ++ 2 files changed, 136 insertions(+), 20 deletions(-) commit e490ceff433fbc111404ce040bd9e8f41f12af16 Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Tue Dec 17 12:42:25 2024 +0100 spi: spidev: Align ordering of spidev_spi_ids[] and spidev_dt_ids[] There is a 1:1 correspondance between the list of spi device-ids and the devicetree compatibles. The latter is ordered alphabetically by vendor and device. To simplify keeping the two lists in sync, mention the vendor in a comment for the spi device-ids and order alphabetically, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20241217114226.1223724-2-u.kleine-koenig@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spidev.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit 644115e86023fccdaecb1318133ed14418b76f49 Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Tue Dec 17 10:56:24 2024 +0000 firmware: cs_dsp: Fix endianness conversion in cs_dsp_mock_wmfw.c In cs_dsp_mock_wmfw_add_coeff_desc() the value stored in longstring->len needs a cpu_to_le16() conversion. Fixes: 5cf1b7b47180 ("firmware: cs_dsp: Add mock wmfw file generator for KUnit testing") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412170233.8DnsdtY6-lkp@intel.com/ Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241217105624.139479-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/test/cs_dsp_mock_wmfw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db8b9b12892f0528c3a78715243c22398ab3cb5d Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Tue Dec 17 08:05:45 2024 +0100 ASoC: cs42l43: don't include '<linux/find.h>' directly The header clearly states that it does not want to be included directly, only via '<linux/bitmap.h>'. Replace the include accordingly. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20241217070545.2533-2-wsa+renesas@sang-engineering.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/cs42l43.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5bd108d4a57d6c00372041c83e633a26fb450de Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Tue Dec 17 11:31:27 2024 +0000 firmware: cs_dsp: Avoid using a u32 as a __be32 in cs_dsp_mock_mem_maps.c In cs_dsp_mock_xm_header_drop_from_regmap_cache() for the ADSP2 case read the big-endian firmware word into a dedicated __be32 variable instead of using the same u32 for both the big-endian and cpu-endian value. Fixes: 41e78c0f44f9 ("firmware: cs_dsp: Add mock DSP memory map for KUnit testing") Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241217113127.186736-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/test/cs_dsp_mock_mem_maps.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 3d6976047922374347fb77b509d755da153f549d Author: Thomas Richard <thomas.richard@bootlin.com> Date: Wed Dec 11 17:27:20 2024 +0100 MAINTAINERS: Add entry for AAEON UP board FPGA drivers Add the AAEON UP board FPGA drivers and header as Maintained by myself. Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> Link: https://lore.kernel.org/r/20241211-aaeon-up-board-pinctrl-support-v1-5-24719be27631@bootlin.com Signed-off-by: Lee Jones <lee@kernel.org> MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0ef2929a018123154283b14dd11744ff32a2a12c Author: Thomas Richard <thomas.richard@bootlin.com> Date: Wed Dec 11 17:27:17 2024 +0100 leds: Add AAEON UP board LED driver Add support for LEDs on AAEON UP boards. These leds are managed by the onboard FPGA: - UP boards: yellow, green, red - UP Squared boards: blue, yellow, green, red Based on the work done by Gary Wang <garywang@aaeon.com.tw>, largely rewritten. Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> Link: https://lore.kernel.org/r/20241211-aaeon-up-board-pinctrl-support-v1-2-24719be27631@bootlin.com Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/Kconfig | 9 ++++ drivers/leds/Makefile | 1 + drivers/leds/leds-upboard.c | 126 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 136 insertions(+) commit c2b148f3bc94b61e885dc8529d6b6136576bd865 Author: Thomas Richard <thomas.richard@bootlin.com> Date: Wed Dec 11 17:27:16 2024 +0100 mfd: Add support for AAEON UP board FPGA The UP boards implement some features (pin controller, LEDs) through an on-board FPGA. This MFD driver implements the line protocol to communicate with the FPGA through regmap, and registers pin controller and led cells. This commit adds support for UP and UP Squared boards. Based on the work done by Gary Wang <garywang@aaeon.com.tw>. Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> Link: https://lore.kernel.org/r/20241211-aaeon-up-board-pinctrl-support-v1-1-24719be27631@bootlin.com Signed-off-by: Lee Jones <lee@kernel.org> drivers/mfd/Kconfig | 12 ++ drivers/mfd/Makefile | 2 + drivers/mfd/upboard-fpga.c | 325 +++++++++++++++++++++++++++++++++++++++ include/linux/mfd/upboard-fpga.h | 55 +++++++ 4 files changed, 394 insertions(+) commit c925bb8853dae5cb25e7108298e905b55301bbff Author: Marcus Folkesson <marcus.folkesson@gmail.com> Date: Tue Dec 10 16:24:40 2024 +0100 mfd: da9052: Store result from fault_log Other sub-components (da9052-wdt) could use the result to determine reboot cause. Expose the result by make it part of the da9052 structure. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://lore.kernel.org/r/20241210-da9052-wdt-v2-1-95a5756e9ac8@gmail.com Signed-off-by: Lee Jones <lee@kernel.org> drivers/mfd/da9052-core.c | 1 + include/linux/mfd/da9052/da9052.h | 2 ++ 2 files changed, 3 insertions(+) commit 70e997e0107e5ed85c1a3ef2adfccbe351c29d71 Author: Hans de Goede <hdegoede@redhat.com> Date: Sun Dec 8 16:00:27 2024 +0100 mfd: intel_soc_pmic_chtdc_ti: Fix invalid regmap-config max_register value The max_register = 128 setting in the regmap config is not valid. The Intel Dollar Cove TI PMIC has an eeprom unlock register at address 0x88 and a number of EEPROM registers at 0xF?. Increase max_register to 0xff so that these registers can be accessed. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20241208150028.325349-1-hdegoede@redhat.com Signed-off-by: Lee Jones <lee@kernel.org> drivers/mfd/intel_soc_pmic_chtdc_ti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f35dc4bd50df4ad3c17a2c53cdccc4cdc5caa9e Author: Charles Keepax <ckeepax@opensource.cirrus.com> Date: Thu Dec 5 11:58:22 2024 +0000 mfd: cs42l43: Use devres for remove as well Currently the device is powered down in the remove callback, however all other clean up is done through devres. The problem here is the MFD children are cleaned up through devres. As this happens after the remove callback has run, this leads to the incorrect ordering where the child remove functions run after the device has been powered down. Put the power down into devres as well such that everything runs in the expected order. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20241205115822.2371719-4-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones <lee@kernel.org> drivers/mfd/cs42l43-i2c.c | 8 -------- drivers/mfd/cs42l43-sdw.c | 10 ---------- drivers/mfd/cs42l43.c | 21 +++++++++++++-------- drivers/mfd/cs42l43.h | 1 - 4 files changed, 13 insertions(+), 27 deletions(-) commit 47dde1a077dcdcd5b9071983a11ec34cf302b943 Author: Charles Keepax <ckeepax@opensource.cirrus.com> Date: Thu Dec 5 11:58:21 2024 +0000 mfd: cs42l43: Increase the SoundWire attach timeout Some SoundWire controllers take a very long time to fully power up. As such, increase the timeout that the cs42l43 driver will wait for the device to initially appear on the bus. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20241205115822.2371719-3-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones <lee@kernel.org> drivers/mfd/cs42l43.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a57f93b786d24063d827f9c70802e2644cea493b Author: Charles Keepax <ckeepax@opensource.cirrus.com> Date: Thu Dec 5 11:58:20 2024 +0000 mfd: cs42l43: Use gpiod_set_raw for GPIO operations The GPIO framework supports specifying if a GPIO is active low or high and will invert accordingly. Whilst specifying this is part of the normal GPIO definition flow on device tree systems, it is a DSD extension under ACPI, that Windows doesn't really use. This means most ACPI systems do not set the polarity of the pin. The current cs42l43 driver assumes it is setting the level of the line directly, which is actually the case on all current systems and likely most future ones. However if the part was used in a device tree system or an ACPI system that actually used the DSD extensions this would get inverted, causing the driver to fail probe. As the driver always knows the polarity of its own reset line, use the raw set API making the intention to set the level directly clear and to avoid any such future issues. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20241205115822.2371719-2-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones <lee@kernel.org> drivers/mfd/cs42l43.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit d496ad33e637da91257699732c46dc4eac19ff13 Author: Maciej Strozek <mstrozek@opensource.cirrus.com> Date: Thu Dec 5 11:58:19 2024 +0000 mfd: cs42l43: Prepare support for updated bios patch Newer bios patch firmware versions now require use of the shadow register interface, which was previously only required by the full firmware, update the check accordingly. Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20241205115822.2371719-1-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones <lee@kernel.org> drivers/mfd/cs42l43.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b787a44fb11f4c5f56be117d4fbb5d99949b57fd Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Wed Dec 4 19:44:15 2024 +0530 dt-bindings: mfd: qcom,tcsr: Add compatible for ipq5424 Document the qcom,tcsr-ipq5424 compatible. Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Link: https://lore.kernel.org/r/20241204141416.1352545-2-quic_mmanikan@quicinc.com Signed-off-by: Lee Jones <lee@kernel.org> Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 1 + 1 file changed, 1 insertion(+) commit 6856edf7ead8c54803216a38a7b227bcb3dadff7 Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Tue Nov 12 19:01:06 2024 +0200 dt-bindings: mfd: bd71815: Fix rsense and typos The sense resistor used for measuring currents is typically some tens of milli Ohms. It has accidentally been documented to be tens of mega Ohms. Fix the size of this resistor and a few copy-paste errors while at it. Drop the unsuitable 'rohm,charger-sense-resistor-ohms' property (which can't represent resistors smaller than one Ohm), and introduce a new 'rohm,charger-sense-resistor-micro-ohms' property with appropriate minimum, maximum and default values instead. Fixes: 4238dc1e6490 ("dt_bindings: mfd: Add ROHM BD71815 PMIC") Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/0efd8e9de0ae8d62ee4c6b78cc565b04007a245d.1731430700.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones <lee@kernel.org> .../devicetree/bindings/mfd/rohm,bd71815-pmic.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 1e89d21f8189d286f80b900e1b7cf57cb1f3037e Author: Hans de Goede <hdegoede@redhat.com> Date: Thu Nov 14 20:38:08 2024 +0100 mfd: lpc_ich: Add another Gemini Lake ISA bridge PCI device-id On N4100 / N4120 Gemini Lake SoCs the ISA bridge PCI device-id is 31e8 rather the 3197 found on e.g. the N4000 / N4020. While at fix the existing GLK PCI-id table entry breaking the table being sorted by device-id. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20241114193808.110132-1-hdegoede@redhat.com Signed-off-by: Lee Jones <lee@kernel.org> drivers/mfd/lpc_ich.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 00e6dbc80532f15d40dbb77eeddaa9ffc7ee6db9 Author: Dragan Simic <dsimic@manjaro.org> Date: Tue Nov 12 13:46:48 2024 +0100 mfd: stpmic1: Use devm_register_power_off_handler() Simplify the code a bit by using devm_register_power_off_handler(), which is a purpose-specific wrapper for devm_register_sys_off_handler(). No intended functional changes are introduced. Signed-off-by: Dragan Simic <dsimic@manjaro.org> Link: https://lore.kernel.org/r/219e0de8bcd1b2ef24142c837d8331ffc535ab26.1731415409.git.dsimic@manjaro.org Signed-off-by: Lee Jones <lee@kernel.org> drivers/mfd/stpmic1.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 88dfdd03270c0708b6bbe4c5c7ec5712a7f28d37 Author: Dragan Simic <dsimic@manjaro.org> Date: Tue Nov 12 13:46:47 2024 +0100 mfd: axp20x: Use devm_register_power_off_handler() Simplify the code a bit by using devm_register_power_off_handler(), which is a purpose-specific wrapper for devm_register_sys_off_handler(). No intended functional changes are introduced. Signed-off-by: Dragan Simic <dsimic@manjaro.org> Link: https://lore.kernel.org/r/ab1f059f4b5bef75da3d3903d0fbf28bddffd57c.1731415409.git.dsimic@manjaro.org Signed-off-by: Lee Jones <lee@kernel.org> drivers/mfd/axp20x.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 9855caf5d4eb1d8b8bba60be256186ea8e0f907c Author: Heiko Stuebner <heiko@sntech.de> Date: Thu Nov 7 12:47:10 2024 +0100 hwmon: add driver for the hwmon parts of qnap-mcu devices The MCU can be found on network-attached-storage devices made by QNAP and provides access to fan control including reading back its RPM as well as reading the temperature of the NAS case. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20241107114712.538976-8-heiko@sntech.de Signed-off-by: Lee Jones <lee@kernel.org> Documentation/hwmon/index.rst | 1 + Documentation/hwmon/qnap-mcu-hwmon.rst | 27 +++ MAINTAINERS | 1 + drivers/hwmon/Kconfig | 12 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/qnap-mcu-hwmon.c | 364 +++++++++++++++++++++++++++++++++ 6 files changed, 406 insertions(+) commit bb7e361191564cbd77f5cfc0f49213d9e799ff10 Author: Heiko Stuebner <heiko@sntech.de> Date: Thu Nov 7 12:47:09 2024 +0100 Input: add driver for the input part of qnap-mcu devices The MCU controls the power-button and beeper, so expose them as input device. There is of course no interrupt line, so the status of the power-button needs to be polled. To generate an event the power-button also needs to be held for 1-2 seconds, so the polling interval does not need to be overly fast. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://lore.kernel.org/r/20241107114712.538976-7-heiko@sntech.de Signed-off-by: Lee Jones <lee@kernel.org> MAINTAINERS | 1 + drivers/input/misc/Kconfig | 12 +++ drivers/input/misc/Makefile | 1 + drivers/input/misc/qnap-mcu-input.c | 153 ++++++++++++++++++++++++++++++++++++ 4 files changed, 167 insertions(+) commit 2ec8bb475743c6f1890cf3245e59cc516b70bf2b Author: Heiko Stuebner <heiko@sntech.de> Date: Thu Nov 7 12:47:08 2024 +0100 leds: Add driver for LEDs from qnap-mcu devices This adds a driver that connects to the qnap-mcu mfd driver and provides access to the LEDs on it. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20241107114712.538976-6-heiko@sntech.de Signed-off-by: Lee Jones <lee@kernel.org> MAINTAINERS | 1 + drivers/leds/Kconfig | 11 +++ drivers/leds/Makefile | 1 + drivers/leds/leds-qnap-mcu.c | 227 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 240 insertions(+) commit 998f70d1806bb718a7565f350283e4a79c8cbb4b Author: Heiko Stuebner <heiko@sntech.de> Date: Thu Nov 7 12:47:07 2024 +0100 mfd: Add base driver for qnap-mcu devices These microcontroller units are used in network-attached-storage devices made by QNAP and provide additional functionality to the system. This adds the base driver that implements the serial protocol via serdev and additionally hooks into the poweroff handlers to turn off the parts of the system not supplied by the general PMIC. Turning off (at least the TSx33 devices using Rockchip SoCs) consists of two separate actions. Turning off the MCU alone does not turn off the main SoC and turning off only the SoC/PMIC does not turn off the hard-drives. Also if the MCU is not turned off, the system also won't start again until it is unplugged from power. So on shutdown the MCU needs to be turned off separately before the main PMIC. The protocol spoken by the MCU is sadly not documented, but was obtained by listening to the chatter on the serial port, as thankfully the "hal_app" program from QNAPs firmware allows triggering all/most MCU actions from the command line. The implementation of how to talk to the serial device got some inspiration from the rave-sp servdev driver. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20241107114712.538976-5-heiko@sntech.de Signed-off-by: Lee Jones <lee@kernel.org> MAINTAINERS | 6 + drivers/mfd/Kconfig | 13 ++ drivers/mfd/Makefile | 2 + drivers/mfd/qnap-mcu.c | 338 +++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/qnap-mcu.h | 26 ++++ 5 files changed, 385 insertions(+) commit 3f674e74570e82100aa20aae82da742f07b9310c Author: Heiko Stuebner <heiko@sntech.de> Date: Thu Nov 7 12:47:06 2024 +0100 dt-bindings: mfd: Add binding for qnap,ts433-mcu devices These MCUs can be found in network attached storage devices made by QNAP. They are connected to a serial port of the host device and provide functionality like LEDs, power-control and temperature monitoring. LEDs, buttons, etc are all elements of the MCU firmware itself, so don't need devicetree input, though the fan gets its cooling settings from a fan-0 subnode. A binding for the LEDs for setting the linux-default-trigger may come later, once all the LEDs are understood and ATA controllers actually can address individual port-LEDs, but are really optional. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241107114712.538976-4-heiko@sntech.de Signed-off-by: Lee Jones <lee@kernel.org> .../devicetree/bindings/mfd/qnap,ts433-mcu.yaml | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit fa52c04daec9ff9820260901a8b1d271bb532d12 Author: Heiko Stuebner <heiko@sntech.de> Date: Thu Nov 7 12:47:05 2024 +0100 mfd: core: Make platform_data pointer const in struct mfd_cell The content of the platform_data of a struct mfd_cell is simply passed on to the platform_device_add_data() call in mfd_add_device() . platform_device_add_data() already handles the data behind that pointer as const and also uses kmemdup to create a copy of the data before handing that copy over to the newly created platform-device, so there is no reason to not extend this to struct mfd_cell, as the old copy in the mfd_cell will be stale anyway. This allows to pass structs gathered from of_device_get_match_data() as platform-data to sub-devices - which is retrieved as const already. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20241107114712.538976-3-heiko@sntech.de Signed-off-by: Lee Jones <lee@kernel.org> include/linux/mfd/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a5b38c3fd709e8acd2bfdedf66c25e6af759576 Author: Heiko Stuebner <heiko@sntech.de> Date: Thu Nov 7 12:47:04 2024 +0100 HID: hid-sensor-hub: don't use stale platform-data on remove The hid-sensor-hub creates the individual device structs and transfers them to the created mfd platform-devices via the platform_data in the mfd_cell. Before e651a1da442a ("HID: hid-sensor-hub: Allow parallel synchronous reads") the sensor-hub was managing access centrally, with one "completion" in the hub's data structure, which needed to be finished on removal at the latest. The mentioned commit then moved this central management to each hid sensor device, resulting on a completion in each struct hid_sensor_hub_device. The remove procedure was adapted to go through all sensor devices and finish any pending "completion". What this didn't take into account was, platform_device_add_data() that is used by mfd_add{_hotplug}_devices() does a kmemdup on the submitted platform-data. So the data the platform-device gets is a copy of the original data, meaning that the device worked on a different completion than what sensor_hub_remove() currently wants to access. To fix that, use device_for_each_child() to go through each child-device similar to how mfd_remove_devices() unregisters the devices later and with that get the live platform_data to finalize the correct completion. Fixes: e651a1da442a ("HID: hid-sensor-hub: Allow parallel synchronous reads") Cc: stable@vger.kernel.org Signed-off-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Benjamin Tissoires <bentiss@kernel.org> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Acked-by: Jiri Kosina <jkosina@suse.com> Link: https://lore.kernel.org/r/20241107114712.538976-2-heiko@sntech.de Signed-off-by: Lee Jones <lee@kernel.org> drivers/hid/hid-sensor-hub.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 7fc2adcddd929716539ad93594481799310d004b Author: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Date: Tue Dec 17 07:31:41 2024 +0200 drm/rcar-du: Add support for r8a779h0 Add support for r8a779h0. It is very similar to r8a779g0, but has only one output. Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217-rcar-gh-dsi-v5-7-e77421093c05@ideasonboard.com drivers/gpu/drm/renesas/rcar-du/rcar_du_drv.c | 18 ++++++++++++++++++ drivers/gpu/drm/renesas/rcar-du/rcar_du_group.c | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) commit c303814c38cde135b8e9a0696c3b505a3ef5123f Author: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Date: Tue Dec 17 07:31:40 2024 +0200 drm/rcar-du: dsi: Add r8a779h0 support Add support for DSI on r8a779h0. As it is identical to DSI on r8a779g0, all we need is to handle the compatible string. Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217-rcar-gh-dsi-v5-6-e77421093c05@ideasonboard.com drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 2 ++ 1 file changed, 2 insertions(+) commit a409a9058fe1feecbb123701172af0ea46b71f24 Author: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Date: Tue Dec 17 07:31:39 2024 +0200 dt-bindings: display: bridge: renesas,dsi-csi2-tx: Add r8a779h0 Extend the Renesas DSI display bindings to support the r8a779h0 V4M. Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217-rcar-gh-dsi-v5-5-e77421093c05@ideasonboard.com .../devicetree/bindings/display/bridge/renesas,dsi-csi2-tx.yaml | 1 + 1 file changed, 1 insertion(+) commit 3a7c9b42b464becfec9e98776b169f38f8520d8a Author: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Date: Tue Dec 17 07:31:38 2024 +0200 dt-bindings: display: renesas,du: Add r8a779h0 Extend the Renesas DU display bindings to support the r8a779h0 V4M. Note that we remove the requirement for two ports from the global part of the bindings, as each conditional part defines the number of required ports already. This came up with r8a779h0 as it's the first one that has only one port. Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217-rcar-gh-dsi-v5-4-e77421093c05@ideasonboard.com .../devicetree/bindings/display/renesas,du.yaml | 52 ++++++++++++++++++++-- 1 file changed, 48 insertions(+), 4 deletions(-) commit 8fe1db6bd85072f6cae1913208400edcd92addbd Author: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Date: Tue Dec 17 07:31:37 2024 +0200 dt-bindings: display: renesas,du: Add missing constraints The binding is missing maxItems for all renesas,cmms and renesas,vsps properties. As the amount of cmms or vsps is always a fixed amount, set the maxItems to match the minItems. Also add the minItems and maxItems to the top level properties. Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217-rcar-gh-dsi-v5-3-e77421093c05@ideasonboard.com Documentation/devicetree/bindings/display/renesas,du.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit bb5f268b7662469b47e9b518c2353803bc7f4ec9 Author: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Date: Tue Dec 17 07:31:36 2024 +0200 drm/rcar-du: Write DPTSR only if the second source exists Currently the driver always writes DPTSR when setting up the hardware. However, writing the register is only meaningful when the second source for a plane is used, and the register is not even documented for SoCs that do not have the second source. So move the write behind a condition. Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> # On R-Car M3-N Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217-rcar-gh-dsi-v5-2-e77421093c05@ideasonboard.com drivers/gpu/drm/renesas/rcar-du/rcar_du_group.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 6389e616fae8a101ce00068f7690461ab57b29d8 Author: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Date: Tue Dec 17 07:31:35 2024 +0200 drm/rcar-du: dsi: Fix PHY lock bit check The driver checks for bit 16 (using CLOCKSET1_LOCK define) in CLOCKSET1 register when waiting for the PPI clock. However, the right bit to check is bit 17 (CLOCKSET1_LOCK_PHY define). Not only that, but there's nothing in the documents for bit 16 for V3U nor V4H. So, fix the check to use bit 17, and drop the define for bit 16. Fixes: 155358310f01 ("drm: rcar-du: Add R-Car DSI driver") Fixes: 11696c5e8924 ("drm: Place Renesas drivers in a separate dir") Cc: stable@vger.kernel.org Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241217-rcar-gh-dsi-v5-1-e77421093c05@ideasonboard.com drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 2 +- drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 0dfda50988c6805e8ab432e99866a021ea6ec46d Author: Marek Vasut <marex@denx.de> Date: Mon Dec 16 11:48:22 2024 +0100 leds: trigger: netdev: Check offload ability on interface up The trigger_data->hw_control indicates whether the LED is controlled by HW offload, i.e. the PHY. The trigger_data->hw_control = can_hw_control() is currently called only from netdev_led_attr_store(), i.e. when writing any sysfs attribute of the netdev trigger instance associated with a PHY LED. The can_hw_control() calls validate_net_dev() which internally calls led_cdev->hw_control_get_device(), which is phy_led_hw_control_get_device() for PHY LEDs. The phy_led_hw_control_get_device() returns NULL if the PHY is not attached. At least in case of DWMAC (STM32MP, iMX8M, ...), the PHY device is attached only when the interface is brought up and is detached again when the interface is brought down. In case e.g. udev rules configure the netdev LED trigger sysfs attributes before the interface is brought up, then when the interface is brought up, the LEDs are not blinking. This is because trigger_data->hw_control = can_hw_control() was called when udev wrote the sysfs attribute files, before the interface was up, so can_hw_control() resp. validate_net_dev() returned false, and the trigger_data->hw_control = can_hw_control() was never called again to update the trigger_data->hw_control content and let the offload take over the LED blinking. Call data->hw_control = can_hw_control() from netdev_trig_notify() to update the offload capability of the LED when the UP notification arrives. This makes the LEDs blink after the interface is brought up. On STM32MP13xx with RTL8211F, it is enough to have the following udev rule in place, boot the machine with cable plugged in, and the LEDs won't work without this patch once the interface is brought up, even if they should: " ACTION=="add", SUBSYSTEM=="leds", KERNEL=="stmmac-0:01:green:wan", ATTR{trigger}="netdev", ATTR{link_10}="1", ATTR{link_100}="1", ATTR{link_1000}="1", ATTR{device_name}="end0" ACTION=="add", SUBSYSTEM=="leds", KERNEL=="stmmac-0:01:yellow:wan", ATTR{trigger}="netdev", ATTR{rx}="1", ATTR{tx}="1", ATTR{device_name}="end0" " Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20241216104826.6946-1-marex@denx.de Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/trigger/ledtrig-netdev.c | 2 ++ 1 file changed, 2 insertions(+) commit d22f955cc2cb9684dd45396f974101f288869485 Author: Rahul Rameshbabu <sergeantsagara@protonmail.com> Date: Sat Dec 14 19:43:06 2024 +0000 rust: net::phy scope ThisModule usage in the module_phy_driver macro Similar to the use of $crate::Module, ThisModule should be referred to as $crate::ThisModule in the macro evaluation. The reason the macro previously did not cause any errors is because all the users of the macro would use kernel::prelude::*, bringing ThisModule into scope. Signed-off-by: Rahul Rameshbabu <sergeantsagara@protonmail.com> Reviewed-by: FUJITA Tomonori <fujita.tomonori@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/20241214194242.19505-1-sergeantsagara@protonmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> rust/kernel/net/phy.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff9f17ce2e53887e74fc0e72711ece42526836ed Author: Toke Høiland-Jørgensen <toke@redhat.com> Date: Sat Dec 14 17:50:59 2024 +0100 net/sched: Add drop reasons for AQM-based qdiscs Now that we have generic QDISC_CONGESTED and QDISC_OVERLIMIT drop reasons, let's have all the qdiscs that contain an AQM apply them consistently when dropping packets. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://patch.msgid.link/20241214-fq-codel-drop-reasons-v1-1-2a814e884c37@redhat.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/sched/sch_codel.c | 5 +++-- net/sched/sch_fq_codel.c | 3 ++- net/sched/sch_fq_pie.c | 6 ++++-- net/sched/sch_gred.c | 4 ++-- net/sched/sch_pie.c | 5 ++++- net/sched/sch_red.c | 4 +++- net/sched/sch_sfb.c | 4 +++- 7 files changed, 21 insertions(+), 10 deletions(-) commit 5e0db3c2cd2c5218f378134cfcb2a86ee0cf54eb Author: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com> Date: Wed Dec 4 13:26:06 2024 -0800 interconnect: qcom: Add interconnect provider driver for SM8750 Introduce SM8750 interconnect provider driver using the interconnect framework. Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241204-sm8750_master_interconnects-v3-2-3d9aad4200e9@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org> drivers/interconnect/qcom/Kconfig | 9 + drivers/interconnect/qcom/Makefile | 2 + drivers/interconnect/qcom/sm8750.c | 1705 ++++++++++++++++++++++++++++++++++++ 3 files changed, 1716 insertions(+) commit 2102773c60787d97ce93e8aa6890b74f166edd35 Author: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com> Date: Wed Dec 4 13:26:05 2024 -0800 dt-bindings: interconnect: add interconnect bindings for SM8750 Add interconnect device bindings. These devices can be used to describe any RPMh and NoC based interconnect devices. Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241204-sm8750_master_interconnects-v3-1-3d9aad4200e9@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org> .../bindings/interconnect/qcom,sm8750-rpmh.yaml | 136 ++++++++++++++++++++ .../dt-bindings/interconnect/qcom,sm8750-rpmh.h | 143 +++++++++++++++++++++ 2 files changed, 279 insertions(+) commit 4a45f8c502a8b8a836c3c932a18d538856097ac7 Author: Rob Herring (Arm) <robh@kernel.org> Date: Fri Nov 15 13:34:53 2024 -0600 arm64: dts: hisilicon: Remove unused and undocumented "enable-dma" and "bus-id" properties Remove "enable-dma" and "bus-id" properties which are both unused in the kernel and undocumented. Most likely they are leftovers from downstream. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Wei Xu <xuwei5@hisilicon.com> arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 388cf16d90f6cce74ce531f306e2c77d6d66f2f7 Author: Sumanth Korikkar <sumanthk@linux.ibm.com> Date: Thu Dec 12 17:17:20 2024 +0100 s390/diag: Move diag.c to diag specific folder Move implementation of s390 diagnose code to diag specific folder. Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/diag/Makefile | 2 +- arch/s390/kernel/{ => diag}/diag.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 90e6f191e1ee094d13faae5fc29af7b5baf9d1b8 Author: Sumanth Korikkar <sumanthk@linux.ibm.com> Date: Thu Dec 12 17:17:19 2024 +0100 s390/diag324: Retrieve power readings via diag 0x324 Retrieve electrical power readings for resources in a computing environment via diag 0x324. diag 0x324 stores the power readings in the power information block (pib). Provide power readings from pib via diag324 ioctl interface. diag324 ioctl provides new pib to the user only if the threshold time has passed since the last call. Otherwise, cache data is returned. When there are no active readers, cleanup of pib buffer is performed. Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/diag.h | 1 + arch/s390/include/asm/sclp.h | 1 + arch/s390/include/uapi/asm/diag.h | 24 ++++ arch/s390/kernel/Makefile | 1 + arch/s390/kernel/diag.c | 1 + arch/s390/kernel/diag/Makefile | 2 +- arch/s390/kernel/diag/diag324.c | 224 +++++++++++++++++++++++++++++++++++++ arch/s390/kernel/diag/diag_ioctl.h | 10 ++ arch/s390/kernel/diag/diag_misc.c | 9 ++ drivers/s390/char/sclp.h | 4 +- drivers/s390/char/sclp_early.c | 2 + 11 files changed, 277 insertions(+), 2 deletions(-) commit 2478d43ed621c4d15549142c0cfe6fa4a05e5f10 Author: Sumanth Korikkar <sumanthk@linux.ibm.com> Date: Thu Dec 12 17:17:18 2024 +0100 s390/diag: Create misc device /dev/diag Create a misc device /dev/diag to fetch diagnose specific information from the kernel and provide it to userspace. Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/kernel/diag/Makefile | 1 + arch/s390/kernel/diag/diag_misc.c | 45 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) commit 807e39ed4da2cd7e6fe2c38a8d41d36f4c59e861 Author: Sven Schnelle <svens@linux.ibm.com> Date: Thu Dec 12 10:55:03 2024 +0100 s390/lib: Use exrl instead of ex in string functions exrl is present in all machines currently supported in the linux kernel, therefore prefer it over ex. This saves one instruction and doesn't need an additional register to hold the address of the target instruction. Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/lib/mem.S | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit f8107a8be0b2e92798ded4aff45e3a94b763ce61 Author: Heiko Carstens <hca@linux.ibm.com> Date: Mon Dec 9 10:45:18 2024 +0100 s390/mm: Simplify noexec page protection handling By default page protection definitions like PAGE_RX have the _PAGE_NOEXEC bit set. For older machines without the instruction execution protection facility this bit is not allowed to be used in page table entries, and therefore must be removed. This is done at a couple of page table walkers, but also at some but not all page table modification functions like ptep_modify_prot_commit(). Avoid all of this and change the page, segment and region3 protection definitions so that the noexec bit is masked out automatically if the instruction execution-protection facility is not available. This is similar to what also various other architectures do which had to solve the same problem. Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/boot/boot.h | 1 - arch/s390/boot/startup.c | 13 +++++- arch/s390/boot/vmem.c | 8 ---- arch/s390/include/asm/pgtable.h | 93 +++++++++++++++++++++++++++-------------- arch/s390/kernel/setup.c | 1 + arch/s390/mm/init.c | 9 ++++ arch/s390/mm/mmap.c | 42 +++++++++++-------- arch/s390/mm/pageattr.c | 6 --- arch/s390/mm/pgtable.c | 2 - arch/s390/mm/vmem.c | 8 ---- 10 files changed, 106 insertions(+), 77 deletions(-) commit db449b147cef0a210c61dc8840424456fbe45cc8 Author: Heiko Carstens <hca@linux.ibm.com> Date: Mon Dec 9 10:45:17 2024 +0100 s390/mm: Remove unused PAGE_KERNEL_EXEC and friends Remove unused PAGE_KERNEL_EXEC, SEGMENT_KERNEL_EXEC, and REGION3_KERNEL_EXEC. Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/pgtable.h | 15 --------------- 1 file changed, 15 deletions(-) commit 62b87e0c9a2cb35a74b47766743135e175f488b4 Author: Heiko Carstens <hca@linux.ibm.com> Date: Mon Dec 9 10:45:16 2024 +0100 s390/mm: Remove incorrect comment Remove an outdated comment that is also located at a random place. The generic statement that read permissions imply execute permissions is wrong since the instruction execution-protection facility is available. Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/pgtable.h | 7 ------- 1 file changed, 7 deletions(-) commit a0e583b64ced4699f6edf4a9c1323003847aeff0 Author: Karan Sanghavi <karansanghvi98@gmail.com> Date: Mon Dec 16 17:07:00 2024 +0000 dt-bindings: power: Convert raspberrypi,bcm2835-power to Dt schema Convert the raspberrypi,bcm2835-power binding to Dt schema Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Karan Sanghavi <karansanghvi98@gmail.com> Link: https://lore.kernel.org/r/20241216-raspberrypi-bcm2835-power-v5-1-222fc244132b@gmail.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> .../bindings/power/raspberrypi,bcm2835-power.yaml | 42 +++++++++++++++++++ .../bindings/soc/bcm/raspberrypi,bcm2835-power.txt | 47 ---------------------- 2 files changed, 42 insertions(+), 47 deletions(-) commit 9e0894d07072e50b83ef077ce91e504bdb7484a3 Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Date: Thu Dec 5 15:49:37 2024 +0530 platform/x86/amd/pmf: Enable Custom BIOS Inputs for PMF-TA Introduce support for passing custom BIOS inputs to the PMF-TA to assess BIOS input policy conditions. The PMF driver will adjust system settings based on these BIOS input conditions and their corresponding output actions. Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com> Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241205101937.2547351-1-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/amd/pmf/acpi.c | 24 ++++++++++++++++++++++++ drivers/platform/x86/amd/pmf/pmf.h | 15 ++++++++++++++- drivers/platform/x86/amd/pmf/spc.c | 24 ++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) commit 8ba0e61861ab855d49315c2222844cff4fef467b Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 15 14:25:40 2024 +0100 mlxbf-bootctl: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241215-sysfs-const-bin_attr-mellanox-v1-1-b6fe4f68e2ca@weissschuh.net Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/mellanox/mlxbf-bootctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a2ec08e43fdb15ffc0bdfe0a8356d0b8e111c505 Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Fri Dec 13 11:05:51 2024 +0100 platform/x86: dell-uart-backlight: Use blacklight power constant The backlight subsystem has gotten its own power constants. Replace FB_BLANK_UNBLANK with BACKLIGHT_POWER_ON. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://lore.kernel.org/r/20241213100647.200598-1-tzimmermann@suse.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/dell/dell-uart-backlight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c91d916af898e481444d17eed8ce8df6c50f70d Author: Armin Wolf <W_Armin@gmx.de> Date: Fri Dec 6 22:56:50 2024 +0100 platform/x86: wmi-bmof: Make use of .bin_size() callback Until now the wmi-bmof driver had to allocate the binary sysfs attribute dynamically since its size depends on the bmof buffer returned by the firmware. Use the new .bin_size() callback to avoid having to do this memory allocation. Tested on a Asus Prime B650-Plus. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20241206215650.2977-1-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/wmi-bmof.c | 75 +++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 37 deletions(-) commit 204d45fe680be98be356acb7c603622606356be7 Author: Arnd Bergmann <arnd@arndb.de> Date: Mon Dec 16 09:34:05 2024 +0100 platform/x86/intel: bytcrc_pwrsrc: fix power_supply dependency The driver now fails to link when the power supply core is missing or in a loadable module: _64-linux/bin/x86_64-linux-ld: drivers/platform/x86/intel/bytcrc_pwrsrc.o: in function `crc_pwrsrc_irq_handler': bytcrc_pwrsrc.c:(.text+0x2aa): undefined reference to `power_supply_changed' x86_64-linux-ld: drivers/platform/x86/intel/bytcrc_pwrsrc.o: in function `crc_pwrsrc_psy_get_property': bytcrc_pwrsrc.c:(.text+0x2f6): undefined reference to `power_supply_get_drvdata' x86_64-linux-ld: drivers/platform/x86/intel/bytcrc_pwrsrc.o: in function `crc_pwrsrc_probe': bytcrc_pwrsrc.c:(.text+0x644): undefined reference to `devm_power_supply_register' Add the appropriate dependency for it. Fixes: 0130ec83c553 ("platform/x86/intel: bytcrc_pwrsrc: Optionally register a power_supply dev") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20241216083409.1885677-1-arnd@kernel.org Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/intel/Kconfig | 1 + 1 file changed, 1 insertion(+) commit e21bff27f2061f75a51951104e16fac752c3b840 Author: Hans de Goede <hdegoede@redhat.com> Date: Mon Dec 9 19:35:56 2024 +0100 platform/x86: dell-smo8800: Add a couple more models to lis3lv02d_devices[] Add the accelerometer address for the following laptop models to lis3lv02d_devices[]: Dell Latitude E6330 Dell Latitude E6430 Dell XPS 15 9550 Tested-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pali Rohár <pali@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241209183557.7560-4-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/dell/dell-lis3lv02d.c | 3 +++ 1 file changed, 3 insertions(+) commit cc0809b752c74b768845f6e049b419c32d954a1a Author: Hans de Goede <hdegoede@redhat.com> Date: Mon Dec 9 19:35:55 2024 +0100 platform/x86: dell-smo8800: Move instantiation of lis3lv02d i2c_client from i2c-i801 to dell-lis3lv02d Various Dell laptops have an lis3lv02d freefall/accelerometer sensor. The lis3lv02d chip has an interrupt line as well as an I2C connection to the system's main SMBus. The lis3lv02d is described in the ACPI tables by an SMO88xx ACPI device, but the SMO88xx ACPI fwnodes are incomplete and only list an IRQ resource. So far this has been worked around with some SMO88xx specific quirk code in the generic i2c-i801 driver, but it is not necessary to handle the Dell specific instantiation of i2c_client-s for SMO88xx ACPI devices there. The kernel already instantiates platform_device-s for these with an acpi:SMO88xx modalias. The drivers/platform/x86/dell/dell-smo8800.c driver binds to this platform device but this only deals with the interrupt resource. Add a drivers/platform/x86/dell/dell-lis3lv02d.c which will matches on the same acpi:SMO88xx modaliases and move the i2c_client instantiation from the generic i2c-i801 driver there. Moving the i2c_client instantiation has the following advantages: 1. This moves the SMO88xx ACPI device quirk handling away from the generic i2c-i801 module which is loaded on all Intel x86 machines to a module which will only be loaded when there is an ACPI SMO88xx device. 2. This removes the duplication of the SMO88xx ACPI Hardware ID (HID) table between the i2c-i801 and dell-smo8800 drivers. 3. This allows extending the quirk handling by adding new code and related module parameters to the dell-lis3lv02d driver, without needing to modify the i2c-i801 code. Reviewed-by: Pali Rohár <pali@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Wolfram Sang <wsa@kernel.org> Link: https://lore.kernel.org/r/20241209183557.7560-3-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/i2c/busses/i2c-i801.c | 124 ------------------ drivers/platform/x86/dell/Kconfig | 1 + drivers/platform/x86/dell/Makefile | 1 + drivers/platform/x86/dell/dell-lis3lv02d.c | 204 +++++++++++++++++++++++++++++ 4 files changed, 206 insertions(+), 124 deletions(-) commit bdf0ea9d521c390c4d7bff254eafbe7712441292 Author: Hans de Goede <hdegoede@redhat.com> Date: Mon Dec 9 19:35:54 2024 +0100 platform/x86: dell-smo8800: Move SMO88xx acpi_device_ids to dell-smo8800-ids.h Move the SMO88xx acpi_device_ids to a new dell-smo8800-ids.h header, so that these can be shared with the new dell-lis3lv02d code. Reviewed-by: Pali Rohár <pali@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241209183557.7560-2-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/dell/dell-smo8800-ids.h | 27 +++++++++++++++++++++++++++ drivers/platform/x86/dell/dell-smo8800.c | 16 +--------------- 2 files changed, 28 insertions(+), 15 deletions(-) commit 3bc018395f106d11d8f882219bad76ca422d66df Author: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Date: Tue Dec 10 16:01:14 2024 +0200 platform/x86/intel/tpmi/plr: Make char[] longer to silence warning W=1 build triggers this warning: drivers/platform/x86/intel/plr_tpmi.c:315:55: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=] 315 | snprintf(name, sizeof(name), "domain%d", i); | ^ drivers/platform/x86/intel/plr_tpmi.c:315:17: note: ‘snprintf’ output between 8 and 17 bytes into a destination of size 16 315 | snprintf(name, sizeof(name), "domain%d", i); Inspecting the code tells that maximum i in intel_plr_probe() will fit into u8 because it comes from: struct intel_tpmi_pfs_entry { ... u64 num_entries:8; ...but compiler does not know that. Saving one byte in name[] at the expense of a warning with W=1 seems a bad trade so simply make it name[17]. Link: https://lore.kernel.org/r/20241210140115.1375-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/intel/plr_tpmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8fa1a2e1053ad780eaf48fc05e3a4a24bc809ee2 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:38:36 2024 +0100 platform/x86/amd/hsmp: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-pdx86-v1-5-9ab204c2a814@weissschuh.net Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/amd/hsmp/acpi.c | 12 ++++++------ drivers/platform/x86/amd/hsmp/plat.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) commit 7ff2fecc8bc2e855bd17bd75358973c6bb4accbd Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:38:35 2024 +0100 platform/x86/intel/pmt: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-pdx86-v1-4-9ab204c2a814@weissschuh.net Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/intel/pmt/class.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b0034f206f140ecdd78e8f5fe4d61fb367124f3b Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:38:34 2024 +0100 platform/x86/intel/sdsi: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-pdx86-v1-3-9ab204c2a814@weissschuh.net Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/intel/sdsi.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit fbabd3dbb55fc46392193a2e3c0366905b2b26f9 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:38:33 2024 +0100 platform/x86: dell_rbu: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-pdx86-v1-2-9ab204c2a814@weissschuh.net Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/dell/dell_rbu.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit c0cc60b39269395b0a55c3ea8825690ec756d18e Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:38:32 2024 +0100 platform/x86: dell: dcdbas: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. While at it switch from the custom DCDBAS_BIN_ATTR_RW() to the identical BIN_ATTR_RW() macro. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-pdx86-v1-1-9ab204c2a814@weissschuh.net Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/dell/dcdbas.c | 10 +++++----- drivers/platform/x86/dell/dcdbas.h | 8 -------- 2 files changed, 5 insertions(+), 13 deletions(-) commit 963b7895ef9af77131cef6e47cfffd4d3d513cc6 Merge: a14a429069bb bf61ffeb9cc4 Author: Paolo Abeni <pabeni@redhat.com> Date: Tue Dec 17 12:08:30 2024 +0100 Merge branch 'af_unix-prepare-for-skb-drop-reason' Kuniyuki Iwashima says: ==================== af_unix: Prepare for skb drop reason. This is a prep series and cleans up error paths in the following functions * unix_stream_connect() * unix_stream_sendmsg() * unix_dgram_sendmsg() to make it easy to add skb drop reason for AF_UNIX, which seems to have a potential user. https://lore.kernel.org/netdev/CAAf2ycmZHti95WaBR3s+L5Epm1q7sXmvZ-EqCK=-oZj=45tOwQ@mail.gmail.com/ v1: https://lore.kernel.org/netdev/20241206052607.1197-1-kuniyu@amazon.com/ ==================== Link: https://patch.msgid.link/20241213110850.25453-1-kuniyu@amazon.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> commit bf61ffeb9cc48ee7d1945f26578291da5d9305e4 Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Fri Dec 13 20:08:50 2024 +0900 af_unix: Remove unix_our_peer(). unix_our_peer() is used only in unix_may_send(). Let's inline it in unix_may_send(). Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/unix/af_unix.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 62c6db251e667e8a240dc8209c00313240120fd6 Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Fri Dec 13 20:08:49 2024 +0900 af_unix: Clean up error paths in unix_dgram_sendmsg(). The error path is complicated in unix_dgram_sendmsg() because there are two timings when other could be non-NULL: when it's fetched from unix_peer_get() and when it's looked up by unix_find_other(). Let's move unix_peer_get() to the else branch for unix_find_other() and clean up the error paths. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/unix/af_unix.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 106d979b85e575b0ab10224fcde5c3eb94566e05 Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Fri Dec 13 20:08:48 2024 +0900 af_unix: Clean up SOCK_DEAD error paths in unix_dgram_sendmsg(). When other has SOCK_DEAD in unix_dgram_sendmsg(), we hold unix_state_lock() for the sender socket first. However, we do not need it for sk->sk_type. Let's move the lock down a bit. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/unix/af_unix.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 689c398885cc27d2a5bb2ad5d70324107d4a78ec Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Fri Dec 13 20:08:47 2024 +0900 af_unix: Defer sock_put() to clean up path in unix_dgram_sendmsg(). When other has SOCK_DEAD in unix_dgram_sendmsg(), we call sock_put() for it first and then set NULL to other before jumping to the error path. This is to skip sock_put() in the error path. Let's not set NULL to other and defer the sock_put() to the error path to clean up the labels later. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/unix/af_unix.c | 2 -- 1 file changed, 2 deletions(-) commit a700b43358ccc3c5ae857eeea37ff50ce0529b1c Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Fri Dec 13 20:08:46 2024 +0900 af_unix: Split restart label in unix_dgram_sendmsg(). There are two paths jumping to the restart label in unix_dgram_sendmsg(). One requires another lookup and sk_filter(), but the other doesn't. Let's split the label to make each flow more straightforward. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/unix/af_unix.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3c05329a2abe312ed85a60a325b930063f61e817 Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Fri Dec 13 20:08:45 2024 +0900 af_unix: Use msg->{msg_name,msg_namelen} in unix_dgram_sendmsg(). In unix_dgram_sendmsg(), we use a local variable sunaddr pointing NULL or msg->msg_name based on msg->msg_namelen. Let's remove sunaddr and simplify the usage. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/unix/af_unix.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit f4dd63165b08ba3b72117973d5daea456f36377d Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Fri Dec 13 20:08:44 2024 +0900 af_unix: Move !sunaddr case in unix_dgram_sendmsg(). When other is NULL in unix_dgram_sendmsg(), we check if sunaddr is NULL before looking up a receiver socket. There are three paths going through the check, but it's always false for 2 out of the 3 paths: the first socket lookup and the second 'goto restart'. The condition can be true for the first 'goto restart' only when SOCK_DEAD is flagged for the socket found with msg->msg_name. Let's move the check to the single appropriate path. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/unix/af_unix.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 001a25088c35ab69bd4b2f208e47eb8acbce6353 Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Fri Dec 13 20:08:43 2024 +0900 af_unix: Set error only when needed in unix_dgram_sendmsg(). We will introduce skb drop reason for AF_UNIX, then we need to set an errno and a drop reason for each path. Let's set an error only when it's needed in unix_dgram_sendmsg(). Then, we need not (re)set 0 to err. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/unix/af_unix.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) commit d460b04bc452cf15810b79c15381fffd9d201915 Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Fri Dec 13 20:08:42 2024 +0900 af_unix: Clean up error paths in unix_stream_sendmsg(). If we move send_sig() to the SEND_SHUTDOWN check before the while loop, then we can reuse the same kfree_skb() after the pipe_err_free label. Let's gather the scattered kfree_skb()s in error paths. While at it, some style issues are fixed, and the pipe_err_free label is renamed to out_pipe to match other label names. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/unix/af_unix.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) commit 6c444255b193b5b9c5a18c3784d960e10e1833a2 Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Fri Dec 13 20:08:41 2024 +0900 af_unix: Set error only when needed in unix_stream_sendmsg(). We will introduce skb drop reason for AF_UNIX, then we need to set an errno and a drop reason for each path. Let's set an error only when it's needed in unix_stream_sendmsg(). Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/unix/af_unix.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e26ee0a736bd949ce6fa51829fd0a2f6381391de Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Fri Dec 13 20:08:40 2024 +0900 af_unix: Clean up error paths in unix_stream_connect(). The label order is weird in unix_stream_connect(), and all NULL checks are unnecessary if reordered. Let's clean up the error paths to make it easy to set a drop reason for each path. While at it, a comment with the old style is updated. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/unix/af_unix.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit 34c899af6c1a9d65aa85c765b2eecb1b9a88e8b8 Author: Kuniyuki Iwashima <kuniyu@amazon.com> Date: Fri Dec 13 20:08:39 2024 +0900 af_unix: Set error only when needed in unix_stream_connect(). We will introduce skb drop reason for AF_UNIX, then we need to set an errno and a drop reason for each path. Let's set an error only when it's needed in unix_stream_connect(). Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/unix/af_unix.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 9550fd31fd20f9cebdf0280666fc9d9c70034cb3 Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Tue Dec 17 14:43:06 2024 +0530 pinctrl: qcom: ipq5424: split spi0 pin group The GPIO configuration differs for the spi0 clk, cs, miso, mosi pins. Therefore, split the spi0 pin group and assign function to each pin as per the specification. Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Link: https://lore.kernel.org/20241217091308.3253897-3-quic_mmanikan@quicinc.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/qcom/pinctrl-ipq5424.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit d992e52d7e0efb602b0765e7974137363a158014 Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Tue Dec 17 14:43:05 2024 +0530 dt-bindings: pinctrl: qcom: update spi0 function The GPIO configuration differs for the spi0 clk, cs, miso, mosi pins. Therefore, split the spi0 pin group and document each pin function. Fixes: b88752d3133b ("dt-bindings: pinctrl: qcom: add IPQ5424 pinctrl") Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Link: https://lore.kernel.org/20241217091308.3253897-2-quic_mmanikan@quicinc.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Documentation/devicetree/bindings/pinctrl/qcom,ipq5424-tlmm.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1ff7d092dce0b2273dce4b8d33fa5856679dd25b Author: Sahil Malhotra <sahil.malhotra@nxp.com> Date: Fri Nov 29 12:46:48 2024 +0100 optee: fix format string for printing optee build_id There has been a recent change in OP-TEE to print 8 and 16 character commit id for 32bit and 64bit architecture respectively. In case if commit id is starting with 0 like 04d1c612ec7beaede073b8c it is printing revision as below removing leading 0 "optee: revision 4.4 (4d1c612ec7beaed)" Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Link: https://lore.kernel.org/r/20241129114648.3048941-1-sahil.malhotra@nxp.com Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> drivers/tee/optee/smc_abi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0476fd4ff45261744da6bb2df2f8080571902bf0 Author: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Date: Tue Dec 17 18:55:32 2024 +0900 tomoyo: use realpath if symlink's pathname refers to procfs Fedora 41 has reached Linux 6.12 kernel with TOMOYO enabled. I observed that /usr/lib/systemd/systemd executes /usr/lib/systemd/systemd-executor by passing dirfd == 9 or dirfd == 16 upon execveat(). Commit ada1986d0797 ("tomoyo: fallback to realpath if symlink's pathname does not exist") used realpath only if symlink's pathname does not exist. But an out of tree patch suggested that it will be reasonable to always use realpath if symlink's pathname refers to proc filesystem. Therefore, this patch changes the pathname used for checking "file execute" and the domainname used after a successful execve() request. Before: <kernel> /usr/lib/systemd/systemd file execute proc:/self/fd/16 exec.realpath="/usr/lib/systemd/systemd-executor" exec.argv[0]="/usr/lib/systemd/systemd-executor" file execute proc:/self/fd/9 exec.realpath="/usr/lib/systemd/systemd-executor" exec.argv[0]="/usr/lib/systemd/systemd-executor" <kernel> /usr/lib/systemd/systemd proc:/self/fd/16 file execute /usr/sbin/auditd exec.realpath="/usr/sbin/auditd" exec.argv[0]="/usr/sbin/auditd" <kernel> /usr/lib/systemd/systemd proc:/self/fd/16 /usr/sbin/auditd <kernel> /usr/lib/systemd/systemd proc:/self/fd/9 file execute /usr/bin/systemctl exec.realpath="/usr/bin/systemctl" exec.argv[0]="/usr/bin/systemctl" <kernel> /usr/lib/systemd/systemd proc:/self/fd/9 /usr/bin/systemctl After: <kernel> /usr/lib/systemd/systemd file execute /usr/lib/systemd/systemd-executor exec.realpath="/usr/lib/systemd/systemd-executor" exec.argv[0]="/usr/lib/systemd/systemd-executor" <kernel> /usr/lib/systemd/systemd /usr/lib/systemd/systemd-executor file execute /usr/bin/systemctl exec.realpath="/usr/bin/systemctl" exec.argv[0]="/usr/bin/systemctl" file execute /usr/sbin/auditd exec.realpath="/usr/sbin/auditd" exec.argv[0]="/usr/sbin/auditd" <kernel> /usr/lib/systemd/systemd /usr/lib/systemd/systemd-executor /usr/bin/systemctl <kernel> /usr/lib/systemd/systemd /usr/lib/systemd/systemd-executor /usr/sbin/auditd Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> security/tomoyo/domain.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 4181576d85c64224ae4b21f7754448d7bbfd5c4b Author: Boris Brezillon <boris.brezillon@collabora.com> Date: Wed Dec 11 09:05:00 2024 +0100 drm/panthor: Report innocent group kill Groups can be killed during a reset even though they did nothing wrong. That usually happens when the FW is put in a bad state by other groups, resulting in group suspension failures when the reset happens. If we end up in that situation, flag the group innocent and report innocence through a new DRM_PANTHOR_GROUP_STATE flag. Bump the minor driver version to reflect the uAPI change. Changes in v4: - Add an entry to the driver version changelog - Add R-bs Changes in v3: - Actually report innocence to userspace Changes in v2: - New patch Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Reviewed-by: Steven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211080500.2349505-1-boris.brezillon@collabora.com drivers/gpu/drm/panthor/panthor_drv.c | 3 ++- drivers/gpu/drm/panthor/panthor_sched.c | 18 ++++++++++++++++++ include/uapi/drm/panthor_drm.h | 9 +++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) commit 1e28fbf8cbec3283eca295e363ee477f27704c26 Author: Swati Sharma <swati2.sharma@intel.com> Date: Fri Dec 13 15:00:08 2024 +0530 drm/i915/dsc: Expose dsc sink max slice count via debugfs Number of DSC slices can be shown in the DSC debugfs so that test can take a call whether the configuration can support forcing bigjoiner/ultrajoiner. v2: used intel_dp_is_edp() as the parameter to drm_dp_dsc_sink_max_slice_count() (Jani N) Reviewed-by: Nemesa Garg <nemesa.garg@intel.com> (v1) Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3387 Signed-off-by: Swati Sharma <swati2.sharma@intel.com> Signed-off-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213093008.2149452-1-swati2.sharma@intel.com drivers/gpu/drm/i915/display/intel_display_debugfs.c | 2 ++ 1 file changed, 2 insertions(+) commit acb247afab5bc2b4462f4dfc17a9d930e1153e52 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Mon Dec 16 12:00:25 2024 +0000 arm64: dts: renesas: r9a09g047: Add I2C nodes Add I2C{0..8} nodes to RZ/G3E (R9A09G047) SoC DTSI. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241216120029.143944-4-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 189 +++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) commit 16ecd47cb0cd895c7c2f5dd5db50f6c005c51639 Author: Christian Brauner <brauner@kernel.org> Date: Sat Dec 14 22:01:28 2024 +0100 pidfs: lookup pid through rbtree The new pid inode number allocation scheme is neat but I overlooked a possible, even though unlikely, attack that can be used to trigger an overflow on both 32bit and 64bit. An unique 64 bit identifier was constructed for each struct pid by two combining a 32 bit idr with a 32 bit generation number. A 32bit number was allocated using the idr_alloc_cyclic() infrastructure. When the idr wrapped around a 32 bit wraparound counter was incremented. The 32 bit wraparound counter served as the upper 32 bits and the allocated idr number as the lower 32 bits. Since the idr can only allocate up to INT_MAX entries everytime a wraparound happens INT_MAX - 1 entries are lost (Ignoring that numbering always starts at 2 to avoid theoretical collisions with the root inode number.). If userspace fully populates the idr such that and puts itself into control of two entries such that one entry is somewhere in the middle and the other entry is the INT_MAX entry then it is possible to overflow the wraparound counter. That is probably difficult to pull off but the mere possibility is annoying. The problem could be contained to 32 bit by switching to a data structure such as the maple tree that allows allocating 64 bit numbers on 64 bit machines. That would leave 32 bit in a lurch but that probably doesn't matter that much. The other problem is that removing entries form the maple tree is somewhat non-trivial because the removal code can be called under the irq write lock of tasklist_lock and irq{save,restore} code. Instead, allocate unique identifiers for struct pid by simply incrementing a 64 bit counter and insert each struct pid into the rbtree so it can be looked up to decode file handles avoiding to leak actual pids across pid namespaces in file handles. On both 64 bit and 32 bit the same 64 bit identifier is used to lookup struct pid in the rbtree. On 64 bit the unique identifier for struct pid simply becomes the inode number. Comparing two pidfds continues to be as simple as comparing inode numbers. On 32 bit the 64 bit number assigned to struct pid is split into two 32 bit numbers. The lower 32 bits are used as the inode number and the upper 32 bits are used as the inode generation number. Whenever a wraparound happens on 32 bit the 64 bit number will be incremented by 2 so inode numbering starts at 2 again. When a wraparound happens on 32 bit multiple pidfds with the same inode number are likely to exist. This isn't a problem since before pidfs pidfds used the anonymous inode meaning all pidfds had the same inode number. On 32 bit sserspace can thus reconstruct the 64 bit identifier by retrieving both the inode number and the inode generation number to compare, or use file handles. This gives the same guarantees on both 32 bit and 64 bit. Link: https://lore.kernel.org/r/20241214-gekoppelt-erdarbeiten-a1f9a982a5a6@brauner Signed-off-by: Christian Brauner <brauner@kernel.org> fs/pidfs.c | 129 +++++++++++++++++++++++++++++++------------------- include/linux/pid.h | 2 + include/linux/pidfs.h | 2 +- kernel/pid.c | 6 +-- 4 files changed, 86 insertions(+), 53 deletions(-) commit 59a42b0e78888e2d9a459b12e8d1eb09fb4a3c7b Author: Christian Brauner <brauner@kernel.org> Date: Mon Dec 2 23:44:52 2024 +0100 selftests/pidfd: add pidfs file handle selftests Add selftests for pidfs file handles. Link: https://lore.kernel.org/r/20241202-imstande-einsicht-d78753e1c632@brauner Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Christian Brauner <brauner@kernel.org> tools/testing/selftests/pidfd/.gitignore | 1 + tools/testing/selftests/pidfd/Makefile | 3 +- tools/testing/selftests/pidfd/pidfd.h | 39 ++ .../selftests/pidfd/pidfd_file_handle_test.c | 503 +++++++++++++++++++++ tools/testing/selftests/pidfd/pidfd_setns_test.c | 47 +- tools/testing/selftests/pidfd/pidfd_wait.c | 47 +- 6 files changed, 567 insertions(+), 73 deletions(-) commit 8ce3528188207a2e1896cc3173fba6d99a59013a Author: Christian Brauner <brauner@kernel.org> Date: Fri Nov 29 21:16:37 2024 +0100 pidfs: check for valid ioctl commands Prior to doing any work, check whether the provided ioctl command is supported by pidfs. Signed-off-by: Christian Brauner <brauner@kernel.org> fs/pidfs.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit dc14abd3375409560a761f886696969ee755c784 Merge: d8b47d051eab b3caba8f7a34 Author: Christian Brauner <brauner@kernel.org> Date: Fri Nov 29 20:53:03 2024 +0100 Merge patch series "pidfs: implement file handle support" Christian Brauner <brauner@kernel.org> says: Now that we have the preliminaries to lookup struct pid based on its inode number alone we can implement file handle support. This is based on custom export operation methods which allows pidfs to implement permission checking and opening of pidfs file handles cleanly without hacking around in the core file handle code too much. * patches from https://lore.kernel.org/r/20241129-work-pidfs-file_handle-v1-0-87d803a42495@kernel.org: pidfs: implement file handle support exportfs: add permission method fhandle: pull CAP_DAC_READ_SEARCH check into may_decode_fh() exportfs: add open method fhandle: simplify error handling pseudofs: add support for export_ops Link: https://lore.kernel.org/r/20241129-work-pidfs-file_handle-v1-0-87d803a42495@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> commit b3caba8f7a34a2bbaf45ffc6ff3a49b70afeb192 Author: Christian Brauner <brauner@kernel.org> Date: Fri Nov 29 14:38:05 2024 +0100 pidfs: implement file handle support On 64-bit platforms, userspace can read the pidfd's inode in order to get a never-repeated PID identifier. On 32-bit platforms this identifier is not exposed, as inodes are limited to 32 bits. Instead expose the identifier via export_fh, which makes it available to userspace via name_to_handle_at. In addition we implement fh_to_dentry, which allows userspace to recover a pidfd from a pidfs file handle. Signed-off-by: Erin Shepherd <erin.shepherd@e43.eu> [brauner: patch heavily rewritten] Link: https://lore.kernel.org/r/20241129-work-pidfs-file_handle-v1-6-87d803a42495@kernel.org Reviewed-by: Amir Goldstein <amir73il@gmail.com> Co-Developed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/pidfs.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) commit c220e216d6bcd52cc7333e38edf43dc66ba0dd13 Author: Christian Brauner <brauner@kernel.org> Date: Fri Nov 29 14:38:04 2024 +0100 exportfs: add permission method This allows filesystems such as pidfs to provide their custom permission checks. Link: https://lore.kernel.org/r/20241129-work-pidfs-file_handle-v1-5-87d803a42495@kernel.org Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/fhandle.c | 35 ++++++++++++++--------------------- include/linux/exportfs.h | 17 ++++++++++++++++- 2 files changed, 30 insertions(+), 22 deletions(-) commit 1c9eb9e684c606982c5dba019c58eaed5474c3c0 Author: Dharma Balasubiramani <dharma.b@microchip.com> Date: Fri Dec 6 12:59:52 2024 -0700 dt-bindings: clock: Add SAMA7D65 PMC compatible string Add the `microchip,sama7d65-pmc` compatible string to the existing binding, since the SAMA7D65 PMC shares the same properties and clock requirements as the SAMA7G5. Export MCK3 and MCK5 to be accessed and referenced in DT to assign to the clocks property for sama7d65 SoC. Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/5252a28531deaee67af1edd8e72d45ca57783464.1733505542.git.Ryan.Wanner@microchip.com [claudiu.beznea: use tabs instead of spaces in include/dt-bindings/clock/at91.h] Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Documentation/devicetree/bindings/clock/atmel,at91rm9200-pmc.yaml | 2 ++ include/dt-bindings/clock/at91.h | 4 ++++ 2 files changed, 6 insertions(+) commit 188002bd234035199769cb1a8c7a20b51754327b Author: Dharma Balasubiramani <dharma.b@microchip.com> Date: Fri Dec 6 12:59:51 2024 -0700 dt-bindings: clocks: atmel,at91sam9x5-sckc: add sama7d65 Add bindings for SAMA7D65's slow clock controller. Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/b7a8a22a571f6fc2be56a25f26757f37fa8d2bb3.1733505542.git.Ryan.Wanner@microchip.com Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Documentation/devicetree/bindings/clock/atmel,at91sam9x5-sckc.yaml | 1 + 1 file changed, 1 insertion(+) commit a6afc96b5363f189ad13a807ba4b54f5f07ad150 Author: Dharma Balasubiramani <dharma.b@microchip.com> Date: Fri Dec 6 12:59:48 2024 -0700 dt-bindings: atmel-sysreg: add sama7d65 RAM and PIT Add SAMA7D65 RAM controller, PIT64 DT bindings. Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/96e64f01eee264ad0ac4c720a7a1cab4f95c206b.1733505542.git.Ryan.Wanner@microchip.com [claudiu.beznea: add missing space] Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 2140e55aaf07e41e8a98b7680ff8bc30de8dd0d4 Author: Romain Sioen <romain.sioen@microchip.com> Date: Fri Dec 6 12:59:46 2024 -0700 dt-bindings: ARM: at91: Document Microchip SAMA7D65 Curiosity Document device tree binding of the Microchip SAMA7D65 Curiosity board. Signed-off-by: Romain Sioen <romain.sioen@microchip.com> Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/d5a22763a2081daa0d2155e2c05b7dc0eb468610.1733505542.git.Ryan.Wanner@microchip.com Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Documentation/devicetree/bindings/arm/atmel-at91.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 36591b7dac851cfefd26d4f3782c4952e42e3418 Author: Mihai Sain <mihai.sain@microchip.com> Date: Fri Nov 22 10:05:23 2024 +0200 ARM: dts: microchip: sam9x75_curiosity: Add power monitor support Add PAC1934 support in order to monitor the board power consumption. Device is connected on flexcom7 in twi mode. [root@SAM9X75 ~]$ awk -f pac1934.awk VDD3V3 current: 10.675 mA, voltage: 3295.41 mV VDDOUT4 current: 5.7625 mA, voltage: 1196.78 mV VDDCORE current: 115.442 mA, voltage: 1243.65 mV VDDIODDR current: 29.585 mA, voltage: 1345.21 mV Signed-off-by: Mihai Sain <mihai.sain@microchip.com> Link: https://lore.kernel.org/r/20241122080523.3941-3-mihai.sain@microchip.com [claudiu.beznea: s/VDDOUT4/DCDC4 to comply with schematics] Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> .../boot/dts/microchip/at91-sam9x75_curiosity.dts | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 18dd125299d43cdb3191380e5b73333f770d0aa6 Author: Mihai Sain <mihai.sain@microchip.com> Date: Fri Nov 22 10:05:22 2024 +0200 ARM: dts: microchip: sam9x7: Move i2c address/size to dtsi Since these properties are common for all i2c subnodes, move them to SoC dtsi from board dts. Signed-off-by: Mihai Sain <mihai.sain@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/20241122080523.3941-2-mihai.sain@microchip.com Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> .../boot/dts/microchip/at91-sam9x75_curiosity.dts | 2 -- arch/arm/boot/dts/microchip/sam9x7.dtsi | 26 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) commit bf2a5a622a50b47560e4b29387b2fd4cfb33881a Author: Sven Eckelmann <sven@narfation.org> Date: Mon Dec 16 19:37:12 2024 +0100 batman-adv: Map VID 0 to untagged TT VLAN VID 0 is not a valid VLAN according to "802.1Q-2011" "Table 9-2—Reserved VID values". It is only used to indicate "priority tag" frames which only contain priority information and no VID. The 8021q is also redirecting the priority tagged frames to the underlying interface since commit ad1afb003939 ("vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)"). But at the same time, it automatically adds the VID 0 to all devices to ensure that VID 0 is in the allowed list of the HW filter. This resulted in a VLAN 0 which was always announced in OGM messages. batman-adv should therefore not create a new batadv_softif_vlan for VID 0 and handle all VID 0 related frames using the "untagged" global/local translation tables. Signed-off-by: Sven Eckelmann <sven@narfation.org> Acked-by: Antonio Quartulli <antonio@mandelbit.com> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> net/batman-adv/main.c | 7 +++++++ net/batman-adv/soft-interface.c | 14 ++++++++++++++ 2 files changed, 21 insertions(+) commit 7543d5702c2cfe0e8e8bc8bf4fe8cd44f08d6d39 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 15 15:49:12 2024 +0100 firmware: google: vpd: Use const 'struct bin_attribute' callback The sysfs core now provides callback variants that explicitly take a const pointer. Use them so the non-const variants can be removed. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Brian Norris <briannorris@chromium.org> Link: https://lore.kernel.org/r/20241215-sysfs-const-bin_attr-google-v1-4-e5c2808f5833@weissschuh.net Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> drivers/firmware/google/vpd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 093d752032f723da665cdaa6077ee62b3931e48b Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 15 15:49:11 2024 +0100 firmware: google: memconsole: Use const 'struct bin_attribute' callback The sysfs core now provides callback variants that explicitly take a const pointer. Use them so the non-const variants can be removed. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Brian Norris <briannorris@chromium.org> Link: https://lore.kernel.org/r/20241215-sysfs-const-bin_attr-google-v1-3-e5c2808f5833@weissschuh.net Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> drivers/firmware/google/memconsole.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7da14dea76fb6a90f62938e6dfa9f34c980af358 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 15 15:49:10 2024 +0100 firmware: google: gsmi: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Brian Norris <briannorris@chromium.org> Link: https://lore.kernel.org/r/20241215-sysfs-const-bin_attr-google-v1-2-e5c2808f5833@weissschuh.net Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> drivers/firmware/google/gsmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bf2066caee80c1612cb5a3356dc16a7a298f58ab Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 15 15:49:09 2024 +0100 firmware: google: cbmem: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Brian Norris <briannorris@chromium.org> Link: https://lore.kernel.org/r/20241215-sysfs-const-bin_attr-google-v1-1-e5c2808f5833@weissschuh.net Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> drivers/firmware/google/cbmem.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a14a429069bb1a18eb9fe63d68fcaa77dffe0e23 Merge: 9163b05eca1d b3593df26ab1 Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Dec 16 18:27:36 2024 -0800 Merge branch 'r8169-add-support-for-rtl8125d-rev-b' Heiner Kallweit says: ==================== r8169: add support for RTL8125D rev.b Add support for RTL8125D rev.b. Its XID is 0x689. It is basically based on the one with XID 0x688, but with different firmware file. To avoid a mess with the version numbering, adjust it first. ==================== Link: https://patch.msgid.link/15c4a9fd-a653-4b09-825d-751964832a7a@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit b3593df26ab19f114d613693fa8a92ab202803d0 Author: ChunHao Lin <hau@realtek.com> Date: Fri Dec 13 20:02:58 2024 +0100 r8169: add support for RTL8125D rev.b Add support for RTL8125D rev.b. Its XID is 0x689. It is basically based on the one with XID 0x688, but with different firmware file. Signed-off-by: ChunHao Lin <hau@realtek.com> [hkallweit1@gmail.com: rebased after adjusted version numbering] Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/75e5e9ec-d01f-43ac-b0f4-e7456baf18d1@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/realtek/r8169.h | 1 + drivers/net/ethernet/realtek/r8169_main.c | 6 ++++++ drivers/net/ethernet/realtek/r8169_phy_config.c | 1 + 3 files changed, 8 insertions(+) commit b299ea0069284186b0d3d54aebe87f0d195d457a Author: Heiner Kallweit <hkallweit1@gmail.com> Date: Fri Dec 13 20:01:41 2024 +0100 r8169: adjust version numbering for RTL8126 Adjust version numbering for RTL8126, so that it doesn't overlap with new RTL8125 versions. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/6a354364-20e9-48ad-a198-468264288757@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/realtek/r8169.h | 4 +- drivers/net/ethernet/realtek/r8169_main.c | 62 ++++++++++++------------- drivers/net/ethernet/realtek/r8169_phy_config.c | 4 +- 3 files changed, 35 insertions(+), 35 deletions(-) commit 9163b05eca1d920653efc752b438867dd48fb88b Merge: 4fe205539c46 e45469e594b2 Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Dec 16 18:11:21 2024 -0800 Merge branch 'add-support-for-so_priority-cmsg' Anna Emese Nyiri says: ==================== Add support for SO_PRIORITY cmsg Introduce a new helper function, `sk_set_prio_allowed`, to centralize the logic for validating priority settings. Add support for the `SO_PRIORITY` control message, enabling user-space applications to set socket priority via control messages (cmsg). ==================== Link: https://patch.msgid.link/20241213084457.45120-1-annaemesenyiri@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit e45469e594b255ef8d750ed5576698743450d2ac Author: Anna Emese Nyiri <annaemesenyiri@gmail.com> Date: Fri Dec 13 09:44:57 2024 +0100 sock: Introduce SO_RCVPRIORITY socket option Add new socket option, SO_RCVPRIORITY, to include SO_PRIORITY in the ancillary data returned by recvmsg(). This is analogous to the existing support for SO_RCVMARK, as implemented in commit 6fd1d51cfa253 ("net: SO_RCVMARK socket option for SO_MARK with recvmsg()"). Reviewed-by: Willem de Bruijn <willemb@google.com> Suggested-by: Ferenc Fejes <fejes@inf.elte.hu> Signed-off-by: Anna Emese Nyiri <annaemesenyiri@gmail.com> Link: https://patch.msgid.link/20241213084457.45120-5-annaemesenyiri@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> arch/alpha/include/uapi/asm/socket.h | 2 ++ arch/mips/include/uapi/asm/socket.h | 2 ++ arch/parisc/include/uapi/asm/socket.h | 2 ++ arch/sparc/include/uapi/asm/socket.h | 2 ++ include/net/sock.h | 4 +++- include/uapi/asm-generic/socket.h | 2 ++ net/core/sock.c | 8 ++++++++ net/socket.c | 11 +++++++++++ tools/include/uapi/asm-generic/socket.h | 2 ++ 9 files changed, 34 insertions(+), 1 deletion(-) commit cda7d5abe089cc8bd6d623cd6577627d8125d155 Author: Anna Emese Nyiri <annaemesenyiri@gmail.com> Date: Fri Dec 13 09:44:56 2024 +0100 selftests: net: test SO_PRIORITY ancillary data with cmsg_sender Extend cmsg_sender.c with a new option '-Q' to send SO_PRIORITY ancillary data. cmsg_so_priority.sh script added to validate SO_PRIORITY behavior by creating VLAN device with egress QoS mapping and testing packet priorities using flower filters. Verify that packets with different priorities are correctly matched and counted by filters for multiple protocols and IP versions. Reviewed-by: Willem de Bruijn <willemb@google.com> Acked-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Tested-by: Ido Schimmel <idosch@nvidia.com> Suggested-by: Ido Schimmel <idosch@idosch.org> Signed-off-by: Anna Emese Nyiri <annaemesenyiri@gmail.com> Link: https://patch.msgid.link/20241213084457.45120-4-annaemesenyiri@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/selftests/net/Makefile | 1 + tools/testing/selftests/net/cmsg_sender.c | 11 +- tools/testing/selftests/net/cmsg_so_priority.sh | 151 ++++++++++++++++++++++++ 3 files changed, 162 insertions(+), 1 deletion(-) commit a32f3e9d1ed146f81162702605d65447a319eb76 Author: Anna Emese Nyiri <annaemesenyiri@gmail.com> Date: Fri Dec 13 09:44:55 2024 +0100 sock: support SO_PRIORITY cmsg The Linux socket API currently allows setting SO_PRIORITY at the socket level, applying a uniform priority to all packets sent through that socket. The exception to this is IP_TOS, when the priority value is calculated during the handling of ancillary data, as implemented in commit f02db315b8d8 ("ipv4: IP_TOS and IP_TTL can be specified as ancillary data"). However, this is a computed value, and there is currently no mechanism to set a custom priority via control messages prior to this patch. According to this patch, if SO_PRIORITY is specified as ancillary data, the packet is sent with the priority value set through sockc->priority, overriding the socket-level values set via the traditional setsockopt() method. This is analogous to the existing support for SO_MARK, as implemented in commit c6af0c227a22 ("ip: support SO_MARK cmsg"). If both cmsg SO_PRIORITY and IP_TOS are passed, then the one that takes precedence is the last one in the cmsg list. This patch has the side effect that raw_send_hdrinc now interprets cmsg IP_TOS. Reviewed-by: Willem de Bruijn <willemb@google.com> Suggested-by: Ferenc Fejes <fejes@inf.elte.hu> Signed-off-by: Anna Emese Nyiri <annaemesenyiri@gmail.com> Link: https://patch.msgid.link/20241213084457.45120-3-annaemesenyiri@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/inet_sock.h | 2 +- include/net/ip.h | 2 +- include/net/sock.h | 4 +++- net/can/raw.c | 2 +- net/core/sock.c | 7 +++++++ net/ipv4/ip_output.c | 4 ++-- net/ipv4/ip_sockglue.c | 2 +- net/ipv4/raw.c | 2 +- net/ipv6/ip6_output.c | 3 ++- net/ipv6/ping.c | 1 + net/ipv6/raw.c | 3 ++- net/ipv6/udp.c | 1 + net/packet/af_packet.c | 2 +- 13 files changed, 24 insertions(+), 11 deletions(-) commit 77ec16be758ea65de641833149963bec39f311da Author: Anna Emese Nyiri <annaemesenyiri@gmail.com> Date: Fri Dec 13 09:44:54 2024 +0100 sock: Introduce sk_set_prio_allowed helper function Simplify priority setting permissions with the 'sk_set_prio_allowed' function, centralizing the validation logic. This change is made in anticipation of a second caller in a following patch. No functional changes. Reviewed-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Suggested-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Anna Emese Nyiri <annaemesenyiri@gmail.com> Link: https://patch.msgid.link/20241213084457.45120-2-annaemesenyiri@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/core/sock.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 4fe205539c46ab0add34675ab037f49caa30607c Author: Donald Hunter <donald.hunter@gmail.com> Date: Fri Dec 13 11:25:50 2024 +0000 netlink: specs: add phys-binding attr to rt_link spec Add the missing phys-binding attr to the mctp-attrs in the rt_link spec. This fixes commit 580db513b4a9 ("net: mctp: Expose transport binding identifier via IFLA attribute"). Note that enum mctp_phys_binding is not currently uapi, but perhaps it should be? Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20241213112551.33557-1-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Documentation/netlink/specs/rt_link.yaml | 3 +++ 1 file changed, 3 insertions(+) commit ae4f899894792c436d792c17d3f3e6a2affb787f Author: David Howells <dhowells@redhat.com> Date: Thu Dec 12 21:04:22 2024 +0000 rxrpc: Fix ability to add more data to a call once MSG_MORE deasserted When userspace is adding data to an RPC call for transmission, it must pass MSG_MORE to sendmsg() if it intends to add more data in future calls to sendmsg(). Calling sendmsg() without MSG_MORE being asserted closes the transmission phase of the call (assuming sendmsg() adds all the data presented) and further attempts to add more data should be rejected. However, this is no longer the case. The change of call state that was previously the guard got bumped over to the I/O thread, which leaves a window for a repeat sendmsg() to insert more data. This previously went unnoticed, but the more recent patch that changed the structures behind the Tx queue added a warning: WARNING: CPU: 3 PID: 6639 at net/rxrpc/sendmsg.c:296 rxrpc_send_data+0x3f2/0x860 and rejected the additional data, returning error EPROTO. Fix this by adding a guard flag to the call, setting the flag when we queue the final packet and then rejecting further attempts to add data with EPROTO. Fixes: 2d689424b618 ("rxrpc: Move call state changes from sendmsg to I/O thread") Reported-by: syzbot+ff11be94dfcd7a5af8da@syzkaller.appspotmail.com Closes: https://lore.kernel.org/r/6757fb68.050a0220.2477f.005f.GAE@google.com/ Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: syzbot+ff11be94dfcd7a5af8da@syzkaller.appspotmail.com cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/2870480.1734037462@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/ar-internal.h | 1 + net/rxrpc/sendmsg.c | 8 ++++++++ 2 files changed, 9 insertions(+) commit d920270a6dbf756384b125ce39c17666a7c0c9f4 Author: David Howells <dhowells@redhat.com> Date: Thu Dec 12 20:58:15 2024 +0000 rxrpc: Disable IRQ, not BH, to take the lock for ->attend_link Use spin_lock_irq(), not spin_lock_bh() to take the lock when accessing the ->attend_link() to stop a delay in the I/O thread due to an interrupt being taken in the app thread whilst that holds the lock and vice versa. Fixes: a2ea9a907260 ("rxrpc: Use irq-disabling spinlocks between app and I/O thread") Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/2870146.1734037095@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/io_thread.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5637797add2af632a5d037044ab1b0b35643902e Author: Ashutosh Dixit <ashutosh.dixit@intel.com> Date: Thu Dec 12 14:49:03 2024 -0800 drm/xe/oa/uapi: Expose an unblock after N reports OA property Expose an "unblock after N reports" OA property, to allow userspace threads to be woken up less frequently. Co-developed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241212224903.1853862-1-ashutosh.dixit@intel.com drivers/gpu/drm/xe/xe_oa.c | 30 ++++++++++++++++++++++++++---- drivers/gpu/drm/xe/xe_oa_types.h | 3 +++ drivers/gpu/drm/xe/xe_query.c | 3 ++- include/uapi/drm/xe_drm.h | 7 +++++++ 4 files changed, 38 insertions(+), 5 deletions(-) commit 91e8b7cff8e9445c56b0e433a51f2fd360a9b070 Author: Rob Herring (Arm) <robh@kernel.org> Date: Fri Nov 15 13:38:21 2024 -0600 arm64: dts: altera: Remove unused and undocumented "snps,max-mtu" property Remove "snps,max-mtu" property which is both unused in the kernel and undocumented. Most likely they are leftovers from downstream. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org> arch/arm64/boot/dts/altera/socfpga_stratix10_swvp.dts | 1 - 1 file changed, 1 deletion(-) commit 184a9358e506b77ade22c07dda4f34d133bc31c0 Author: Tycho Andersen <tandersen@netflix.com> Date: Wed Oct 30 14:37:32 2024 -0600 selftests/exec: add a test for execveat()'s comm In the previous patch we've updated AT_EMPTY_PATH execs to use the dentry filename. Test for this and just to be sure keeps working with symlinks, which was a concern in [1], I've added a test for that as well. The test itself is a bit ugly, because the existing check_execveat_fail() helpers use a hardcoded envp and argv, and we want to "pass" things via the environment to test various argument values, but it seemed cleaner than passing one in everywhere in all the existing tests. Output looks like: ok 51 Check success of execveat(6, 'home/tycho/packages/...yyyyyyyyyyyyyyyyyyyy', 0)... # Check execveat(AT_EMPTY_PATH)'s comm is execveat ok 52 Check success of execveat(9, '', 4096)... # Check execveat(AT_EMPTY_PATH)'s comm is execveat ok 53 Check success of execveat(11, '', 4096)... # Check execveat(AT_EMPTY_PATH)'s comm is execveat [ 25.579272] process 'execveat' launched '/dev/fd/9' with NULL argv: empty string added ok 54 Check success of execveat(9, '', 4096)... Link: https://lore.kernel.org/all/20240925.152228-private.conflict.frozen.trios-TdUGhuI5Sb4v@cyphar.com/ [1] Signed-off-by: Tycho Andersen <tandersen@netflix.com> Link: https://lore.kernel.org/r/20241030203732.248767-2-tycho@tycho.pizza Signed-off-by: Kees Cook <kees@kernel.org> tools/testing/selftests/exec/execveat.c | 75 +++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 3 deletions(-) commit 3f7c869e143acfd41ccfdda1ffe8b97dae71449b Author: Niravkumar L Rabara <niravkumar.l.rabara@intel.com> Date: Wed Dec 4 14:32:54 2024 +0800 arm64: dts: socfpga: agilex5: Add gpio0 node and spi dma handshake id Add gpio0 controller node and correct DMA handshake ID for SPI tx and rx channels. Signed-off-by: Niravkumar L Rabara <niravkumar.l.rabara@intel.com> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org> arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 543841d1806029889c2f69f040e88b247aba8e22 Author: Kees Cook <kees@kernel.org> Date: Thu Nov 21 07:07:05 2024 -0800 exec: fix up /proc/pid/comm in the execveat(AT_EMPTY_PATH) case Zbigniew mentioned at Linux Plumber's that systemd is interested in switching to execveat() for service execution, but can't, because the contents of /proc/pid/comm are the file descriptor which was used, instead of the path to the binary[1]. This makes the output of tools like top and ps useless, especially in a world where most fds are opened CLOEXEC so the number is truly meaningless. When the filename passed in is empty (e.g. with AT_EMPTY_PATH), use the dentry's filename for "comm" instead of using the useless numeral from the synthetic fdpath construction. This way the actual exec machinery is unchanged, but cosmetically the comm looks reasonable to admins investigating things. Instead of adding TASK_COMM_LEN more bytes to bprm, use one of the unused flag bits to indicate that we need to set "comm" from the dentry. Suggested-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Suggested-by: Tycho Andersen <tandersen@netflix.com> Suggested-by: Al Viro <viro@zeniv.linux.org.uk> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Link: https://github.com/uapi-group/kernel-features#set-comm-field-before-exec [1] Reviewed-by: Aleksa Sarai <cyphar@cyphar.com> Tested-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Kees Cook <kees@kernel.org> fs/exec.c | 29 ++++++++++++++++++++++++++--- include/linux/binfmts.h | 4 +++- 2 files changed, 29 insertions(+), 4 deletions(-) commit 3a3f61ce5e0b4bcf730acc09c1af91012d241f85 Author: Kees Cook <kees@kernel.org> Date: Fri Nov 29 20:06:55 2024 -0800 exec: Make sure task->comm is always NUL-terminated Using strscpy() meant that the final character in task->comm may be non-NUL for a moment before the "string too long" truncation happens. Instead of adding a new use of the ambiguous strncpy(), we'd want to use memtostr_pad() which enforces being able to check at compile time that sizes are sensible, but this requires being able to see string buffer lengths. Instead of trying to inline __set_task_comm() (which needs to call trace and perf functions), just open-code it. But to make sure we're always safe, add compile-time checking like we already do for get_task_comm(). Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Suggested-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Kees Cook <kees@kernel.org> fs/exec.c | 12 ++++++------ include/linux/sched.h | 9 ++++----- io_uring/io-wq.c | 2 +- io_uring/sqpoll.c | 2 +- kernel/kthread.c | 3 ++- 5 files changed, 14 insertions(+), 14 deletions(-) commit 8b87f3e333f4b0633d4c02c23e1615220a8eb643 Author: Niravkumar L Rabara <niravkumar.l.rabara@intel.com> Date: Mon Dec 9 10:36:11 2024 +0800 arm64: dts: socfpga: agilex: Add VGIC maintenance interrupt Add VGIC maintenance interrupt and interrupt-parent property for interrupt controller, required to run Linux in virtualized environment. Signed-off-by: Niravkumar L Rabara <niravkumar.l.rabara@intel.com> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org> arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 9495e6688522f7de5d72eb98b49420bc2ba40967 Merge: bc6a5efe3dcd aeb3ec990269 Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Dec 16 16:47:42 2024 -0800 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Tariq Toukan says: ==================== mlx5-next 2024-12-16 The following pull-request contains mlx5 IFC updates. * 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: net/mlx5: Add device cap abs_native_port_num net/mlx5: qos: Add ifc support for cross-esw scheduling net/mlx5: Add support for new scheduling elements net/mlx5: Add ConnectX-8 device to ifc net/mlx5: ifc: Reorganize mlx5_ifc_flow_table_context_bits ==================== Link: https://patch.msgid.link/20241216124028.973763-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit d31679f42e19780b4564cd1c5f90c1f3249f00c7 Author: Frederic Weisbecker <frederic@kernel.org> Date: Wed Dec 11 16:40:15 2024 +0100 firmware: stratix10-svc: Use kthread_run_on_cpu() Use the proper API instead of open coding it. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org> drivers/firmware/stratix10-svc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit ee46245564a8d74ae96394269f173f8306669c04 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Sat Oct 26 17:53:04 2024 +0200 clk: socfpga: arria10: Optimize local variables in clk_pll_recalc_rate() Since readl() returns a u32, the local variable reg 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 also 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. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org> drivers/clk/socfpga/clk-pll-a10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62a40a0d5634834790f7166ab592be247390d857 Author: Mamta Shukla <mamta.shukla@leica-geosystems.com> Date: Mon Oct 28 15:59:07 2024 +0100 arm: dts: socfpga: use reset-name "stmmaceth-ocp" instead of "ahb" The ahb reset is deasserted in probe before first register access, while the stmmacheth-ocp reset needs to be asserted every time before changing the phy mode in Arria10[1]. Changed in Upstream to "ahb"(331085a423b arm64: dts: socfpga: change the reset-name of "stmmaceth-ocp" to "ahb" ).This change was intended for arm64 socfpga and it is not applicable to Arria10. Further with STMMAC-SELFTEST Driver enabled, ethtool test also FAILS. $ ethtool -t eth0 [ 322.946709] socfpga-dwmac ff800000.ethernet eth0: entered promiscuous mode [ 323.374558] socfpga-dwmac ff800000.ethernet eth0: left promiscuous mode The test result is FAIL The test extra info: 1. MAC Loopback 0 2. PHY Loopback -110 3. MMC Counters -110 4. EEE -95 5. Hash Filter MC 0 6. Perfect Filter UC -110 7. MC Filter -110 8. UC Filter 0 9. Flow Control -110 10. RSS -95 11. VLAN Filtering -95 12. VLAN Filtering (perf) -95 13. Double VLAN Filter -95 14. Double VLAN Filter (perf) -95 15. Flexible RX Parser -95 16. SA Insertion (desc) -95 17. SA Replacement (desc) -95 18. SA Insertion (reg) -95 19. SA Replacement (reg) -95 20. VLAN TX Insertion -95 21. SVLAN TX Insertion -95 22. L3 DA Filtering -95 23. L3 SA Filtering -95 24. L4 DA TCP Filtering -95 25. L4 SA TCP Filtering -95 26. L4 DA UDP Filtering -95 27. L4 SA UDP Filtering -95 28. ARP Offload -95 29. Jumbo Frame -110 30. Multichannel Jumbo -95 31. Split Header -95 32. TBS (ETF Scheduler) -95 [ 324.881327] socfpga-dwmac ff800000.ethernet eth0: Link is Down [ 327.995360] socfpga-dwmac ff800000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx Link:[1] https://www.intel.com/content/www/us/en/docs/programmable/683711/21-2/functional-description-of-the-emac.html Fixes: 331085a423b ("arm64: dts: socfpga: change the reset-name of "stmmaceth-ocp" to "ahb") Signed-off-by: Mamta Shukla <mamta.shukla@leica-geosystems.com> Tested-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org> arch/arm/boot/dts/intel/socfpga/socfpga_arria10.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d5f9e83ca6319cb50da1acba954664c63c3df3cc Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Thu Nov 7 10:59:52 2024 +0100 ARM: dts: socfpga_cyclone5_mcvevk: Drop unused #address-cells/#size-cells The properties #address-cells and #size-cells are only useful if there is a ranges property or child nodes with "reg" properties. This fixes a W=1 warning: arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_mcvevk.dts:51.22-72.4: Warning (avoid_unnecessary_addr_size): /soc/i2c@ffc04000/stmpe811@41: unnecessary #address-cells/#size-cells without "ranges", "dma-ranges" or child "reg" property Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org> arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_mcvevk.dts | 2 -- 1 file changed, 2 deletions(-) commit 036e78a942b4981a21a48751d45eebaf53f4c5c4 Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 15:53:12 2024 -0800 KVM: SVM: Remove redundant TLB flush on guest CR4.PGE change Drop SVM's direct TLB flush when CR4.PGE is toggled and NPT is enabled, as KVM already guarantees TLBs are flushed appropriately. For the call from cr_trap(), kvm_post_set_cr4() requests TLB_FLUSH_GUEST (which is a superset of TLB_FLUSH_CURRENT) when CR4.PGE is toggled, regardless of whether or not KVM is using TDP. The calls from nested_vmcb02_prepare_save() and nested_svm_vmexit() are checking guest (L2) vs. host (L1) CR4, and so a flush is unnecessary as L2 is defined to use a different ASID (from L1's perspective). Lastly, the call from svm_set_cr0() passes in the current CR4 value, i.e. can't toggle PGE. Link: https://lore.kernel.org/r/20241127235312.4048445-1-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/svm/svm.c | 5 ----- 1 file changed, 5 deletions(-) commit 45d522d3ee9ccea0f1fa0548af33cb8507ea947c Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 15:46:59 2024 -0800 KVM: SVM: Macrofy SEV=n versions of sev_xxx_guest() Define sev_{,es_,snp_}guest() as "false" when SEV is disabled via Kconfig, i.e. when CONFIG_KVM_AMD_SEV=n. Despite the helpers being __always_inline, gcc-12 is somehow incapable of realizing that the return value is a compile-time constant and generates sub-optimal code. Opportunistically clump the paths together to reduce the amount of ifdeffery. No functional change intended. Link: https://lore.kernel.org/r/20241127234659.4046347-1-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/svm/svm.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 2d5faa6a8402435d6332e8e8f3c3f18cca382d83 Author: Juergen Gross <jgross@suse.com> Date: Fri Nov 8 17:14:16 2024 +0100 KVM/x86: add comment to kvm_mmu_do_page_fault() On a first glance it isn't obvious why calling kvm_tdp_page_fault() in kvm_mmu_do_page_fault() is special cased, as the general case of using an indirect case would result in calling of kvm_tdp_page_fault() anyway. Add a comment to explain the reason. Signed-off-by: Juergen Gross <jgross@suse.com> Link: https://lore.kernel.org/r/20241108161416.28552-1-jgross@suse.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/kvm/mmu/mmu_internal.h | 4 ++++ 1 file changed, 4 insertions(+) commit 76bce9f10162cd4b36ac0b7889649b22baf70ebd Author: Sean Christopherson <seanjc@google.com> Date: Wed Nov 27 16:00:09 2024 -0800 KVM: x86: Plumb in the vCPU to kvm_x86_ops.hwapic_isr_update() Pass the target vCPU to the hwapic_isr_update() vendor hook so that VMX can defer the update until after nested VM-Exit if an EOI for L1's vAPIC occurs while L2 is active. Note, commit d39850f57d21 ("KVM: x86: Drop @vcpu parameter from kvm_x86_ops.hwapic_isr_update()") removed the parameter with the justification that doing so "allows for a decent amount of (future) cleanup in the APIC code", but it's not at all clear what cleanup was intended, or if it was ever realized. No functional change intended. Cc: stable@vger.kernel.org Reviewed-by: Chao Gao <chao.gao@intel.com> Tested-by: Chao Gao <chao.gao@intel.com> Link: https://lore.kernel.org/r/20241128000010.4051275-2-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/lapic.c | 11 +++++------ arch/x86/kvm/vmx/vmx.c | 2 +- arch/x86/kvm/vmx/x86_ops.h | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) commit 01528db67f28d5919f7b0a68900dc212165218e2 Author: Sean Christopherson <seanjc@google.com> Date: Wed Oct 9 08:04:55 2024 -0700 KVM: Drop hack that "manually" informs lockdep of kvm->lock vs. vcpu->mutex Now that KVM takes vcpu->mutex inside kvm->lock when creating a vCPU, drop the hack to manually inform lockdep of the kvm->lock => vcpu->mutex ordering. This effectively reverts commit 42a90008f890 ("KVM: Ensure lockdep knows about kvm->lock vs. vcpu->mutex ordering rule"). Cc: Oliver Upton <oliver.upton@linux.dev> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20241009150455.1057573-7-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> virt/kvm/kvm_main.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit e53dc37f5a06f0be5b89fac230fcd4008f646d50 Author: Sean Christopherson <seanjc@google.com> Date: Wed Oct 9 08:04:54 2024 -0700 KVM: Don't BUG() the kernel if xa_insert() fails with -EBUSY WARN once instead of triggering a BUG if xa_insert() fails because it encountered an existing entry. While KVM guarantees there should be no existing entry, there's no reason to BUG the kernel, as KVM needs to gracefully handle failure anyways. Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20241009150455.1057573-6-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0831edcd87ee4cbf1b8cc5669d9d07c71577477 Author: Sean Christopherson <seanjc@google.com> Date: Wed Oct 9 08:04:53 2024 -0700 Revert "KVM: Fix vcpu_array[0] races" Now that KVM loads from vcpu_array if and only if the target index is valid with respect to online_vcpus, i.e. now that it is safe to erase a not-fully-onlined vCPU entry, revert to storing into vcpu_array before success is guaranteed. If xa_store() fails, which _should_ be impossible, then putting the vCPU's reference to 'struct kvm' results in a refcounting bug as the vCPU fd has been installed and owns the vCPU's reference. This was found by inspection, but forcing the xa_store() to fail confirms the problem: | Unable to handle kernel paging request at virtual address ffff800080ecd960 | Call trace: | _raw_spin_lock_irq+0x2c/0x70 | kvm_irqfd_release+0x24/0xa0 | kvm_vm_release+0x1c/0x38 | __fput+0x88/0x2ec | ____fput+0x10/0x1c | task_work_run+0xb0/0xd4 | do_exit+0x210/0x854 | do_group_exit+0x70/0x98 | get_signal+0x6b0/0x73c | do_signal+0xa4/0x11e8 | do_notify_resume+0x60/0x12c | el0_svc+0x64/0x68 | el0t_64_sync_handler+0x84/0xfc | el0t_64_sync+0x190/0x194 | Code: b9000909 d503201f 2a1f03e1 52800028 (88e17c08) Practically speaking, this is a non-issue as xa_store() can't fail, absent a nasty kernel bug. But the code is visually jarring and technically broken. This reverts commit afb2acb2e3a32e4d56f7fbd819769b98ed1b7520. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Michal Luczaj <mhal@rbox.co> Cc: Alexander Potapenko <glider@google.com> Cc: Marc Zyngier <maz@kernel.org> Reported-by: Will Deacon <will@kernel.org> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20241009150455.1057573-5-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> virt/kvm/kvm_main.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 6e2b2358b3ef870d24109083d2e314d04fc72de4 Author: Sean Christopherson <seanjc@google.com> Date: Wed Oct 9 08:04:52 2024 -0700 KVM: Grab vcpu->mutex across installing the vCPU's fd and bumping online_vcpus During vCPU creation, acquire vcpu->mutex prior to exposing the vCPU to userspace, and hold the mutex until online_vcpus is bumped, i.e. until the vCPU is fully online from KVM's perspective. To ensure asynchronous vCPU ioctls also wait for the vCPU to come online, explicitly check online_vcpus at the start of kvm_vcpu_ioctl(), and take the vCPU's mutex to wait if necessary (having to wait for any ioctl should be exceedingly rare, i.e. not worth optimizing). Reported-by: Will Deacon <will@kernel.org> Reported-by: Michal Luczaj <mhal@rbox.co> Link: https://lore.kernel.org/all/20240730155646.1687-1-will@kernel.org Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20241009150455.1057573-4-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> virt/kvm/kvm_main.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) commit 0664dc74e9d004c36b4400081811df795169809a Author: Sean Christopherson <seanjc@google.com> Date: Wed Oct 9 08:04:51 2024 -0700 KVM: Verify there's at least one online vCPU when iterating over all vCPUs Explicitly check that there is at least online vCPU before iterating over all vCPUs. Because the max index is an unsigned long, passing "0 - 1" in the online_vcpus==0 case results in xa_for_each_range() using an unlimited max, i.e. allows it to access vCPU0 when it shouldn't. This will allow KVM to safely _erase_ from vcpu_array if the last stages of vCPU creation fail, i.e. without generating a use-after-free if a different task happens to be concurrently iterating over all vCPUs. Note, because xa_for_each_range() is a macro, kvm_for_each_vcpu() subtly reloads online_vcpus after each iteration, i.e. adding an extra load doesn't meaningfully impact the total cost of iterating over all vCPUs. And because online_vcpus is never decremented, there is no risk of a reload triggering a walk of the entire xarray. Cc: Will Deacon <will@kernel.org> Cc: Michal Luczaj <mhal@rbox.co> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20241009150455.1057573-3-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> include/linux/kvm_host.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 1e7381f3617d14b3c11da80ff5f8a93ab14cfc46 Author: Sean Christopherson <seanjc@google.com> Date: Wed Oct 9 08:04:50 2024 -0700 KVM: Explicitly verify target vCPU is online in kvm_get_vcpu() Explicitly verify the target vCPU is fully online _prior_ to clamping the index in kvm_get_vcpu(). If the index is "bad", the nospec clamping will generate '0', i.e. KVM will return vCPU0 instead of NULL. In practice, the bug is unlikely to cause problems, as it will only come into play if userspace or the guest is buggy or misbehaving, e.g. KVM may send interrupts to vCPU0 instead of dropping them on the floor. However, returning vCPU0 when it shouldn't exist per online_vcpus is problematic now that KVM uses an xarray for the vCPUs array, as KVM needs to insert into the xarray before publishing the vCPU to userspace (see commit c5b077549136 ("KVM: Convert the kvm->vcpus array to a xarray")), i.e. before vCPU creation is guaranteed to succeed. As a result, incorrectly providing access to vCPU0 will trigger a use-after-free if vCPU0 is dereferenced and kvm_vm_ioctl_create_vcpu() bails out of vCPU creation due to an error and frees vCPU0. Commit afb2acb2e3a3 ("KVM: Fix vcpu_array[0] races") papered over that issue, but in doing so introduced an unsolvable teardown conundrum. Preventing accesses to vCPU0 before it's fully online will allow reverting commit afb2acb2e3a3, without re-introducing the vcpu_array[0] UAF race. Fixes: 1d487e9bf8ba ("KVM: fix spectrev1 gadgets") Cc: stable@vger.kernel.org Cc: Will Deacon <will@kernel.org> Cc: Michal Luczaj <mhal@rbox.co> Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20241009150455.1057573-2-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> include/linux/kvm_host.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8011709906d0d6ff1ba9589de5a906bf6e430782 Author: Jon Lin <jon.lin@rock-chips.com> Date: Sun Dec 8 21:03:11 2024 +0800 spi: rockchip-sfc: Support pm ops Support system_sleep and runtime_pm ops. Signed-off-by: Jon Lin <jon.lin@rock-chips.com> Link: https://patch.msgid.link/20241208130311.1324024-1-jon.lin@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-rockchip-sfc.c | 148 +++++++++++++++++++++++++++++++++++------ 1 file changed, 128 insertions(+), 20 deletions(-) commit 5af42209a4d23adc9a09e59e586d1b47fef3cc86 Author: Tudor Ambarus <tudor.ambarus@linaro.org> Date: Thu Nov 28 18:43:15 2024 +0100 spi: atmel-quadspi: Add support for sama7g5 QSPI The sama7g5 QSPI controller uses dedicated clocks for the QSPI Controller Interface and the QSPI Controller Core, and requires synchronization before accessing registers or bit fields. QSPI_SR.SYNCBSY must be zero before accessing any of the bits: QSPI_CR.QSPIEN, QSPI_CR.QSPIDIS, QSPI_CR.SRFRSH, QSPI_CR.SWRST, QSPI_CR.UPDCFG, QSPI_CR.STTFR, QSPI_CR.RTOUT, QSPI_CR.LASTXFER. Also, the QSPI controller core configuration can be updated by writing the QSPI_CR.UPDCFG bit to ‘1’. This is needed by the following registers: QSPI_MR, QSPI_SCR, QSPI_IAR, QSPI_WICR, QSPI_IFR, QSPI_RICR, QSPI_SMR, QSPI_SKR,QSPI_REFRESH, QSPI_WRACNT QSPI_PCALCFG. The Octal SPI supports frequencies up to 200 MHZ DDR. The need for output impedance calibration arises. To avoid the degradation of the signal quality, a PAD calibration cell is used to adjust the output impedance to the driven I/Os. The transmission flow requires different sequences for setting the configuration and for the actual transfer, than what is in the sama5d2 and sam9x60 versions of the IP. Different interrupts are handled. aq->ops->set_cfg() and aq->ops->transfer() are introduced to help differentiating the flows. Tested single and octal SPI mode with mx66lm1g45g. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Link: https://lore.kernel.org/r/20211214133404.121739-1-tudor.ambarus@microchip.com [varshini.rajendran@microchip.com: Fixed conflicts and ported to 6.1.4] Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com> [ csokas.bence: Forward-port to master and address feedback ] Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Link: https://patch.msgid.link/20241128174316.3209354-3-csokas.bence@prolan.hu Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/atmel-quadspi.c | 816 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 798 insertions(+), 18 deletions(-) commit c0a0203cf57963792d59b3e4317a1d07b73df42a Author: Csókás, Bence <csokas.bence@prolan.hu> Date: Thu Nov 28 18:43:14 2024 +0100 spi: atmel-quadspi: Create `atmel_qspi_ops` to support newer SoC families Refactor the code to introduce an ops struct, to prepare for merging support for later SoCs, such as SAMA7G5. This code was based on the vendor's kernel (linux4microchip). Cc'ing original contributors. Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Link: https://patch.msgid.link/20241128174316.3209354-2-csokas.bence@prolan.hu Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/atmel-quadspi.c | 111 ++++++++++++++++++++++++++++++-------------- 1 file changed, 77 insertions(+), 34 deletions(-) commit 8bfb66c75cdace542dabe87841152614fd5b8d91 Author: Alexey Klimov <alexey.klimov@linaro.org> Date: Thu Dec 5 02:33:43 2024 +0000 ASoC: qcom: sdm845: add handling of secondary MI2S clock Add handling of clock related to secondary MI2S_RX in startup, shutdown and hw params routines. The handing of MI2S_TX and SEC_MI2S clock is already there so this requires only placing SECONDARY_MI2S_RX in the correct switch-case choices. Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Link: https://patch.msgid.link/20241205023344.2232529-3-alexey.klimov@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/qcom/sdm845.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b1dcfe620574b689ddd7a3297fad86b947f12a20 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Fri Dec 13 15:29:32 2024 -0800 accel/amdxdna: Read firmware interface version from registers The latest released firmware supports reading firmware interface version from registers directly. The driver's probe routine reads the major and minor version numbers. If the firmware interface is not compatible with the driver, the driver's probe routine returns failure. Co-developed-by: Min Ma <min.ma@amd.com> Signed-off-by: Min Ma <min.ma@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213232933.1545388-5-lizhi.hou@amd.com drivers/accel/amdxdna/aie2_message.c | 26 ------------- drivers/accel/amdxdna/aie2_pci.c | 74 ++++++++++++++++++++++++++++-------- drivers/accel/amdxdna/aie2_pci.h | 6 +-- drivers/accel/amdxdna/npu1_regs.c | 2 +- drivers/accel/amdxdna/npu2_regs.c | 2 +- drivers/accel/amdxdna/npu4_regs.c | 2 +- drivers/accel/amdxdna/npu5_regs.c | 2 +- 7 files changed, 64 insertions(+), 50 deletions(-) commit f4d7b8a6bc8c92963876e8e1dbf73b4728445aa2 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Fri Dec 13 15:29:31 2024 -0800 accel/amdxdna: Enhance power management settings Add SET_STATE ioctl to configure device power mode for aie2 device. Three modes are supported initially. POWER_MODE_DEFAULT: Enable clock gating and set DPM (Dynamic Power Management) level to value which has been set by resource solver or maximum DPM level the device supports. POWER_MODE_HIGH: Enable clock gating and set DPM level to maximum DPM level the device supports. POWER_MODE_TURBO: Disable clock gating and set DPM level to maximum DPM level the device supports. Disabling clock gating means all clocks always run on full speed. And the different clock frequency are used based on DPM level been set. Initially, the driver set the power mode to default mode. Co-developed-by: Narendra Gutta <VenkataNarendraKumar.Gutta@amd.com> Signed-off-by: Narendra Gutta <VenkataNarendraKumar.Gutta@amd.com> Co-developed-by: George Yang <George.Yang@amd.com> Signed-off-by: George Yang <George.Yang@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213232933.1545388-4-lizhi.hou@amd.com drivers/accel/amdxdna/Makefile | 1 + drivers/accel/amdxdna/TODO | 1 - drivers/accel/amdxdna/aie2_ctx.c | 6 ++ drivers/accel/amdxdna/aie2_message.c | 9 ++- drivers/accel/amdxdna/aie2_pci.c | 139 ++++++++++++++++++++++++++------ drivers/accel/amdxdna/aie2_pci.h | 55 ++++++++++--- drivers/accel/amdxdna/aie2_pm.c | 108 +++++++++++++++++++++++++ drivers/accel/amdxdna/aie2_smu.c | 85 +++++++++++-------- drivers/accel/amdxdna/aie2_solver.c | 59 ++++++++++++-- drivers/accel/amdxdna/aie2_solver.h | 1 + drivers/accel/amdxdna/amdxdna_pci_drv.c | 19 +++++ drivers/accel/amdxdna/amdxdna_pci_drv.h | 17 ++++ drivers/accel/amdxdna/npu1_regs.c | 29 +++++-- drivers/accel/amdxdna/npu2_regs.c | 15 ++-- drivers/accel/amdxdna/npu4_regs.c | 32 ++++++-- drivers/accel/amdxdna/npu5_regs.c | 15 ++-- drivers/accel/amdxdna/npu6_regs.c | 19 ++--- include/uapi/drm/amdxdna_accel.h | 52 ++++++++++++ 18 files changed, 534 insertions(+), 128 deletions(-) commit a37d78470bcc8258a34237ec26c0abf0eb2ca4af Author: Lizhi Hou <lizhi.hou@amd.com> Date: Fri Dec 13 15:29:30 2024 -0800 accel/amdxdna: Replace idr api with xarray Switch mailbox message id and hardware context id management over from the idr api to the xarray api. Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213232933.1545388-3-lizhi.hou@amd.com drivers/accel/amdxdna/TODO | 1 - drivers/accel/amdxdna/aie2_ctx.c | 5 +-- drivers/accel/amdxdna/aie2_message.c | 5 +-- drivers/accel/amdxdna/aie2_pci.c | 6 ++-- drivers/accel/amdxdna/amdxdna_ctx.c | 47 +++++++++++---------------- drivers/accel/amdxdna/amdxdna_mailbox.c | 56 ++++++++++++++------------------- drivers/accel/amdxdna/amdxdna_pci_drv.c | 4 +-- drivers/accel/amdxdna/amdxdna_pci_drv.h | 8 ++++- 8 files changed, 60 insertions(+), 72 deletions(-) commit 273b5176ac178d0d890cc1785d3688dc6f8adf37 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Fri Dec 13 15:29:29 2024 -0800 accel/amdxdna: Add RyzenAI-npu6 support Add NPU6 registers and other private configurations. Co-developed-by: Xiaoming Ren <xiaoming.ren@amd.com> Signed-off-by: Xiaoming Ren <xiaoming.ren@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213232933.1545388-2-lizhi.hou@amd.com drivers/accel/amdxdna/Makefile | 3 +- drivers/accel/amdxdna/amdxdna_pci_drv.c | 1 + drivers/accel/amdxdna/amdxdna_pci_drv.h | 1 + drivers/accel/amdxdna/npu6_regs.c | 121 ++++++++++++++++++++++++++++++++ 4 files changed, 125 insertions(+), 1 deletion(-) commit dad704ebe38642cd405e15b9c51263356391355c Merge: 2309132fc5d9 df539cefb0ab Author: Martin KaFai Lau <martin.lau@kernel.org> Date: Mon Dec 16 12:49:08 2024 -0800 Merge branch 'selftests-bpf-migrate-test_xdp_meta-sh-to-test_progs' Bastien Curutchet says: ==================== This patch series continues the work to migrate the script tests into prog_tests. test_xdp_meta.sh uses the BPF programs defined in progs/test_xdp_meta.c to do a simple XDP/TC functional test that checks the metadata allocation performed by the bpf_xdp_adjust_meta() helper. This is already partly covered by two tests under prog_tests/: - xdp_context_test_run.c uses bpf_prog_test_run_opts() to verify the validity of the xdp_md context after a call to bpf_xdp_adjust_meta() - xdp_metadata.c ensures that these meta-data can be exchanged through an AF_XDP socket. However test_xdp_meta.sh also verifies that the meta-data initialized in the struct xdp_md is forwarded to the struct __sk_buff used by BPF programs at 'TC level'. To cover this, I add a test case in xdp_context_test_run.c that uses the same BPF programs from progs/test_xdp_meta.c. Changes in v2: - Add missing close_netns() - Use a unique 'close' label - Link to v1: https://lore.kernel.org/r/20241206-xdp_meta-v1-0-5c150618f6e9@bootlin.com ==================== Link: https://patch.msgid.link/20241213-xdp_meta-v2-0-634582725b90@bootlin.com Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> commit df539cefb0abbd16be9fbcc6ec46a5a35495800f Author: Bastien Curutchet <bastien.curutchet@bootlin.com> Date: Fri Dec 13 16:06:21 2024 +0100 selftests/bpf: Migrate test_xdp_meta.sh into xdp_context_test_run.c test_xdp_meta.sh can't be used by the BPF CI. Migrate test_xdp_meta.sh in a new test case in xdp_context_test_run.c. It uses the same BPF programs located in progs/test_xdp_meta.c and the same network topology. Remove test_xdp_meta.sh and its Makefile entry. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://patch.msgid.link/20241213-xdp_meta-v2-2-634582725b90@bootlin.com tools/testing/selftests/bpf/Makefile | 1 - .../bpf/prog_tests/xdp_context_test_run.c | 87 ++++++++++++++++++++++ tools/testing/selftests/bpf/test_xdp_meta.sh | 58 --------------- 3 files changed, 87 insertions(+), 59 deletions(-) commit b9e58c934c56aa35b0fb436d9afd86ef326bae0e Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Mon Dec 16 08:40:40 2024 +0800 of: Fix of_find_node_opts_by_path() handling of alias+path+options of_find_node_opts_by_path() fails to find OF device node when its @path parameter have pattern below: "alias-name/node-name-1/.../node-name-N:options". The reason is that alias name length calculated by the API is wrong, as explained by example below: "testcase-alias/phandle-tests/consumer-a:testaliasoption". ^ ^ ^ 0 14 39 The right length of alias 'testcase-alias' is 14, but the result worked out by the API is 39 which is obvious wrong. Fix by using index of either '/' or ':' as the length who comes earlier. Fixes: 75c28c09af99 ("of: add optional options parameter to of_find_node_by_path()") Cc: stable@vger.kernel.org Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241216-of_core_fix-v2-1-e69b8f60da63@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> drivers/of/base.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c1b4b91a5e5532602e40b3abe14e6e464d3499f9 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Mon Dec 16 08:40:41 2024 +0800 of: unittest: Add a test case for of_find_node_opts_by_path() with alias+path+options To test of_find_node_opts_by_path() take @path argument with pattern: "alias-name/node-name-1/.../node-name-N:options", for example: "testcase-alias/phandle-tests/consumer-a:testaliasoption" Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241216-of_core_fix-v2-2-e69b8f60da63@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> drivers/of/unittest.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8dccbecbb9692a96cf477eb826352a7c556a31e2 Author: Bastien Curutchet <bastien.curutchet@bootlin.com> Date: Fri Dec 13 16:06:20 2024 +0100 selftests/bpf: test_xdp_meta: Rename BPF sections SEC("t") and SEC("x") can't be loaded by the __load() helper. Rename these sections SEC("tc") and SEC("xdp") so they can be interpreted by the __load() helper in upcoming patch. Update the test_xdp_meta.sh to fit these new names. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://patch.msgid.link/20241213-xdp_meta-v2-1-634582725b90@bootlin.com tools/testing/selftests/bpf/progs/test_xdp_meta.c | 4 ++-- tools/testing/selftests/bpf/test_xdp_meta.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit d9a1ae0d17bdc444eefee6bc5f0dd11e875bd735 Author: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Date: Fri Dec 13 10:10:12 2024 -0800 drm/xe/guc: Enable WA_DUAL_QUEUE for newer platforms The DUAL_QUEUE_WA tells the GuC to not allow concurrent submissions on RCS and CCSes with different address spaces, which on DG2 is required as a WA for an HW bug. On newer platforms, this block has been moved in HW at the CS level, by stalling the RCS/CCS context switch when one of the other RCS/CCSes is busy with a different address space. While functionally correct, having a submission stalled on the HW limits the GuC ability to shuffle things around and can cause complications if the non-stalled submission runs for a long time, because the GuC doesn't know that the stalled submission isn't actually running and might declare it as hung. Therefore, we enable the DUAL_QUEUE_WA on all newer platforms to move management back to the GuC. Note that the GuC specs also recommend enabling this for all platforms starting from MTL that have a CCS. v2: only apply the WA on GTs that have CCS engines v3: split comment (Jonathan) Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Cc: Jesus Narvaez <jesus.narvaez@intel.com> Cc: Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213181012.2178794-1-daniele.ceraolospurio@intel.com drivers/gpu/drm/xe/xe_guc.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 9d6c0e58514f8b57cd9c2c755e41623d6a966025 Author: He Rongguang <herongguang@linux.alibaba.com> Date: Thu Dec 12 10:14:59 2024 +0800 cpupower: fix TSC MHz calculation Commit 'cpupower: Make TSC read per CPU for Mperf monitor' (c2adb1877b7) changes TSC counter reads per cpu, but left time diff global (from start of all cpus to end of all cpus), thus diff(time) is too large for a cpu's tsc counting, resulting in far less than acutal TSC_Mhz and thus `cpupower monitor` showing far less than actual cpu realtime frequency. /proc/cpuinfo shows frequency: cat /proc/cpuinfo | egrep -e 'processor' -e 'MHz' ... processor : 171 cpu MHz : 4108.498 ... before fix (System 100% busy): | Mperf || Idle_Stats CPU| C0 | Cx | Freq || POLL | C1 | C2 171| 0.77| 99.23| 2279|| 0.00| 0.00| 0.00 after fix (System 100% busy): | Mperf || Idle_Stats CPU| C0 | Cx | Freq || POLL | C1 | C2 171| 0.46| 99.54| 4095|| 0.00| 0.00| 0.00 Fixes: c2adb1877b76 ("cpupower: Make TSC read per CPU for Mperf monitor") Signed-off-by: He Rongguang <herongguang@linux.alibaba.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> tools/power/cpupower/utils/idle_monitor/mperf_monitor.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 9b98be76855f14bd5180b59c1ac646b5add98f33 Author: Gary Guo <gary@garyguo.net> Date: Fri Sep 13 22:29:25 2024 +0100 rust: cleanup unnecessary casts With `long` mapped to `isize`, `size_t`/`__kernel_size_t` mapped to `usize` and `char` mapped to `u8`, many of the existing casts are no longer necessary. Signed-off-by: Gary Guo <gary@garyguo.net> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20240913213041.395655-6-gary@garyguo.net [ Moved `uaccess` changes to the previous commit, since they were irrefutable patterns that Rust >= 1.82.0 warns about. Removed a couple casts that now use `c""` literals. Rebased on top of `rust-next`. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> rust/kernel/print.rs | 4 ++-- rust/kernel/str.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 1bae8729e50a900f41e9a1c17ae81113e4cf62b8 Author: Gary Guo <gary@garyguo.net> Date: Fri Sep 13 22:29:24 2024 +0100 rust: map `long` to `isize` and `char` to `u8` The following FFI types are replaced compared to `core::ffi`: 1. `char` type is now always mapped to `u8`, since kernel uses `-funsigned-char` on the C code. `core::ffi` maps it to platform default ABI, which can be either signed or unsigned. 2. `long` is now always mapped to `isize`. It's very common in the kernel to use `long` to represent a pointer-sized integer, and in fact `intptr_t` is a typedef of `long` in the kernel. Enforce this mapping rather than mapping to `i32/i64` depending on platform can save us a lot of unnecessary casts. Signed-off-by: Gary Guo <gary@garyguo.net> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20240913213041.395655-5-gary@garyguo.net [ Moved `uaccess` changes from the next commit, since they were irrefutable patterns that Rust >= 1.82.0 warns about. Reworded slightly and reformatted a few documentation comments. Rebased on top of `rust-next`. Added the removal of two casts to avoid Clippy warnings. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> rust/ffi.rs | 37 ++++++++++++++++++++++++++++++++++++- rust/kernel/error.rs | 5 +---- rust/kernel/firmware.rs | 2 +- rust/kernel/miscdevice.rs | 4 ++-- rust/kernel/uaccess.rs | 27 +++++++-------------------- 5 files changed, 47 insertions(+), 28 deletions(-) commit 27c7518e7f1ccaaa43eb5f25dc362779d2dc2ccb Author: Miguel Ojeda <ojeda@kernel.org> Date: Sun Dec 15 22:43:53 2024 +0100 rust: finish using custom FFI integer types In the last kernel cycle we migrated most of the `core::ffi` cases in commit d072acda4862 ("rust: use custom FFI integer types"): Currently FFI integer types are defined in libcore. This commit creates the `ffi` crate and asks bindgen to use that crate for FFI integer types instead of `core::ffi`. This commit is preparatory and no type changes are made in this commit yet. Finish now the few remaining/new cases so that we perform the actual remapping in the next commit as planned. Acked-by: Jocelyn Falempe <jfalempe@redhat.com> # drm Link: https://lore.kernel.org/rust-for-linux/CANiq72m_rg42SvZK=bF2f0yEoBLVA33UBhiAsv8THhVu=G2dPA@mail.gmail.com/ Link: https://lore.kernel.org/all/cc9253fa-9d5f-460b-9841-94948fb6580c@redhat.com/ Signed-off-by: Miguel Ojeda <ojeda@kernel.org> drivers/gpu/drm/drm_panic_qr.rs | 2 +- rust/kernel/device.rs | 4 ++-- rust/kernel/miscdevice.rs | 8 ++------ rust/kernel/security.rs | 2 +- rust/kernel/seq_file.rs | 2 +- samples/rust/rust_print_main.rs | 2 +- 6 files changed, 8 insertions(+), 12 deletions(-) commit d33bc467e8325be66b7209250e9829d199034ffe Author: Rameshkumar Sundaram <quic_ramess@quicinc.com> Date: Wed Dec 11 17:43:58 2024 +0200 wifi: ath12k: advertise MLO support and capabilities Now everything in ath12k is in place and we can enable Multi-Link Operation (MLO) in the driver. For now it's only enabled for QCN9274 with firmware having ATH12K_FW_FEATURE_MLO feature bit set. 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 <quic_ramess@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241211154358.776279-8-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.h | 2 ++ drivers/net/wireless/ath/ath12k/mac.c | 13 ++++++++++++- drivers/net/wireless/ath/ath12k/wmi.c | 3 +++ drivers/net/wireless/ath/ath12k/wmi.h | 2 ++ 4 files changed, 19 insertions(+), 1 deletion(-) commit 02213c21fb8dfe430e25e539153865eb846f1549 Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Wed Dec 11 17:43:57 2024 +0200 wifi: ath12k: assign unique hardware link IDs during QMI host cap Currently, in the QMI host capability, the device index, the number of local links, and the corresponding hardware link IDs are sent. The hardware link ID assignment is based on the local variable `hw_link_id`, which starts from 0 and ranges up to `num_local_links` in the device. Starting from 0 is not ideal because it can result in the same link ID being assigned to different devices in certain scenarios (e.g., split MAC). Additionally, for multi link operations the firmware expects the hardware link IDs in the same order as the Wireless Serial Interface (WSI) connection. Hence, for MLO to function seamlessly, the hardware link IDs across devices need to be unique and should follow the order of the WSI connection. To address this, a previous change read the WSI index from the Device Tree (DT) and stored it. Use this WSI index to determine the starting hardware link IDs for each device, ensuring uniqueness and correct order across all devices. While at it, add debug prints to clearly show the MLO capability advertisement sent during QMI host capability exchange. 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 <quic_adisi@quicinc.com> Co-developed-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com> Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241211154358.776279-7-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.h | 2 ++ drivers/net/wireless/ath/ath12k/qmi.c | 35 +++++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) commit 043b473e3e02d4c371075956e9c72c32f17958fb Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Wed Dec 11 17:43:56 2024 +0200 wifi: ath12k: add ATH12K_FW_FEATURE_MLO capability firmware feature To maintain backward compatibility with older firmware versions, introduce a new feature bit, ATH12K_FW_FEATURE_MLO, to identify whether the firmware supports MLO. If the firmware-X.bin does not have this bit advertised in the feature, then MLO capability in the host will be disabled. This applies only for QCN9274 chipsets. 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 <quic_adisi@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241211154358.776279-6-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.c | 34 +++++++++++++++++++++++++++++++--- drivers/net/wireless/ath/ath12k/fw.h | 3 +++ 2 files changed, 34 insertions(+), 3 deletions(-) commit 2c737079493d79ac340cb2b1b14c1a49645cdf61 Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Wed Dec 11 17:43:55 2024 +0200 wifi: ath12k: remove warning print in htt mlo offset event message In the function ath12k_htt_mlo_offset_event_handler(), it is possible that the ar is not yet active (started). The function ath12k_mac_get_ar_by_pdev_id() only searches for active pdev, so a NULL return is possible. Therefore, there is no need to print a warning, instead, just silently discard the message. 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 <quic_adisi@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241211154358.776279-5-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/dp_rx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 77478788c957d1d41462890f187c71f8babbd093 Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Wed Dec 11 17:43:54 2024 +0200 wifi: ath12k: add no-op without debug print in WMI Rx event Currently, certain WMI events are frequently received by the host. Since the host lacks the logic to process these events, the console is flooded with ‘Unknown eventid:’ debug messages. To address this, handle these events gracefully without printing debug messages. There is already a block of event IDs that are ignored with a debug print. However, this new type of event occurs more frequently, so no debug print is necessary, and handling it should be a no-op. While at it, re-arrange the code so that all Unknown event IDs are towards the end of the switch block. 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 <quic_adisi@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241211154358.776279-4-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/wmi.c | 20 +++++++++++++------- drivers/net/wireless/ath/ath12k/wmi.h | 5 +++++ 2 files changed, 18 insertions(+), 7 deletions(-) commit 6792b3ca14adb666a3c41628bac99227680eb871 Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Wed Dec 11 17:43:53 2024 +0200 wifi: ath12k: add can_activate_links mac operation When operating as an ML station, mac80211 initially activates only one link in the driver until the peer is authorized. Once the state changes to authorized, the driver should call mac80211 API to activate all other partner links. Before doing so, mac80211 checks if the driver supports activating links via the can_activate_links mac80211_ops. Therefore, add support for this mac80211_ops and call the API to activate the links once the state changes to authorized. 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 <quic_adisi@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241211154358.776279-3-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/mac.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 3863f014ad23f1f966b78e8fe6f4cbed97fd4737 Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Wed Dec 11 17:43:52 2024 +0200 wifi: ath12k: symmetrize scan vdev creation and deletion during HW scan Currently, the hardware scan is initiated in the driver on scan link (15). After mapping to the appropriate radio based on the scan frequency, the vdev is created and the scan begins. However, the vdev is only deleted when channel assignment is about to occur after the scan. Additionally, it is also deleted if a new scan is requested on the same interface but the underlying radio differs in the new request. This imbalance leads to various hardware scan issues, especially when a non-MLO and MLO combination exists. In such cases, the latter tries to skip the scan and proceed with channel assignment while the former is still scanning, causing a firmware assert. To address this issue, symmetrize the scan vdev creation and deletion during hardware scan operations. This means creating a vdev when the scan starts and deleting it once the scan is completed or aborted. While at this, add a few debug prints in scan handling and a few empty lines for better code read. 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 <quic_adisi@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241211154358.776279-2-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.h | 3 +- drivers/net/wireless/ath/ath12k/mac.c | 120 ++++++++++++++++++++++++++------- drivers/net/wireless/ath/ath12k/wmi.c | 3 +- 3 files changed, 99 insertions(+), 27 deletions(-) commit 7462d67c660f52396e0bc5b3e13cc5c3a4dc01c3 Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Mon Dec 9 20:54:21 2024 +0200 wifi: ath12k: pass link ID during MLO while delivering skb mac80211 expects link_id in some scenarios or else the packet might get dropped. Hence, add link_id information before delivering the skb. 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 <quic_adisi@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241209185421.376381-10-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/dp_mon.c | 8 +++++++- drivers/net/wireless/ath/ath12k/dp_rx.c | 5 +++++ drivers/net/wireless/ath/ath12k/peer.c | 2 ++ drivers/net/wireless/ath/ath12k/peer.h | 3 +++ 4 files changed, 17 insertions(+), 1 deletion(-) commit 72c24b1b779d78674842012f252913c0b5beda73 Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Mon Dec 9 20:54:20 2024 +0200 wifi: ath12k: fix ar->supports_6ghz usage during hw register In the ath12k_mac_hw_register() function's context, ar is an iterator variable, and there is no assurance that the last ar will be the one with 6 GHz enabled. Therefore, checking directly ar->supports_6ghz outside the loop is not appropriate. Additionally, 6 GHz lacks HT capabilities. To obtain the super set of HT capabilities across all grouped radios, 6 GHz should be excluded. 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 <quic_adisi@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241209185421.376381-9-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/mac.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 78cf6fd16572912fb3f39237fb29879ccefb5a17 Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Mon Dec 9 20:54:19 2024 +0200 wifi: ath12k: fix ath12k_qmi_alloc_chunk() to handle too large allocations If the requested memory chunk is too large, an error message is logged, but the request continues to be processed. However, no actual memory is allocated to the firmware from this request. Instead, the firmware sends another request with smaller chunks, where memory will be allocated accordingly. Therefore, it is pointless to proceed with parsing the request if at least one of the requests cannot be fulfilled. Hence, return -EAGAIN immediately and proceed to process the new request. 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 <quic_adisi@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241209185421.376381-8-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/qmi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit ae6b065282abd5cb097fbe96bfb96fa29a9fc321 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Mon Dec 9 20:54:18 2024 +0200 wifi: ath12k: advertise multi device interface combination The prerequisite for MLO support in cfg80211/mac80211 requires that all the links participating in MLO belong to the same wiphy/struct ieee80211_hw. The driver needs to group multiple discrete hardware components, each acting as a link in MLO, under one wiphy. Consequently, the driver advertises multi-hardware device interface combination capabilities specific to the radio, including supported frequencies. The global interface combination represent the combined interface capabilities. 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 <quic_periyasa@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241209185421.376381-7-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/mac.c | 222 ++++++++++++++++++++++++++++------ 1 file changed, 185 insertions(+), 37 deletions(-) commit 3c9bc818b8f192142280b722fa53e2389491a6d1 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Mon Dec 9 20:54:17 2024 +0200 wifi: ath12k: Refactor radio frequency information Currently, radio stores the low frequency and high frequency information as separate variables. However, cfg80211 already provides a suitable data structure struct wiphy_radio_freq_range to store this information efficiently. Additionally, for multi radio per wiphy infrastructure, this frequency range information is essential. In future patches using struct wiphy_radio_freq_range makes the code simpler. 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 <quic_periyasa@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241209185421.376381-6-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.h | 3 +-- drivers/net/wireless/ath/ath12k/mac.c | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) commit 8fea0066b4b481bd604256f5359127837a5db7ce Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Mon Dec 9 20:54:16 2024 +0200 wifi: ath12k: introduce interface combination cleanup helper Introduce a cleanup helper function to avoid redundant code for interface combination cleanup. Remove the cleanup code from ath12k_mac_hw_unregister() and ath12k_mac_hw_register() and replace it with a new cleanup helper function. 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 <quic_periyasa@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20241209185421.376381-5-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/mac.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 555872c477958e1a12244e79f3ef9f976ca2a077 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Mon Dec 9 20:54:15 2024 +0200 wifi: ath12k: add helper function to init partner cmem configuration In the Inter Multi-Link Operation, the primary device is expected to receive the partner device buffer. Therefore, each device initializes the partner device buffer in their cmem configuration. So add a helper function to initialize the partner device buffer in their cmem 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: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241209185421.376381-4-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.c | 5 ++++- drivers/net/wireless/ath/ath12k/dp.c | 13 +++++++++++++ drivers/net/wireless/ath/ath12k/dp.h | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) commit 1d18b197bc4b9884c3b53945356afe054b5340f4 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Mon Dec 9 20:54:14 2024 +0200 wifi: ath12k: add partner device buffer support in receive data path Currently, partner device buffer is not handled in the receive data path. In Multi-Link Operation, the partner device buffer is reported to the primary upper MAC rings. Therefore, add partner device buffer processing in the REO and Exception ring handler. 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 <quic_periyasa@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241209185421.376381-3-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.h | 6 ++ drivers/net/wireless/ath/ath12k/dp.c | 1 + drivers/net/wireless/ath/ath12k/dp.h | 3 +- drivers/net/wireless/ath/ath12k/dp_rx.c | 179 +++++++++++++++++++++++--------- 4 files changed, 140 insertions(+), 49 deletions(-) commit 1a73acb5fba4d85ab5eed1147282a07d56af8550 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Mon Dec 9 20:54:13 2024 +0200 wifi: ath12k: move to HW link id based receive handling Currently, all the rx processing treats the hardware link id as the MAC id. The HW link id is a unique identifier for all hardware links participating in the multi link group. Therefore, the current MAC id derivation is insufficient to process the partner rx buffer in the Multi-Link Operation. So derive the MAC id from the HW link id and implementing this change in rx processing will enable the scaling of partner buffer processing in Multi-Link Operation. 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 <quic_periyasa@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241209185421.376381-2-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.h | 8 +++++- drivers/net/wireless/ath/ath12k/dp_rx.c | 49 +++++++++++++++++++-------------- drivers/net/wireless/ath/ath12k/mac.c | 3 ++ 3 files changed, 39 insertions(+), 21 deletions(-) commit 628bbaa551da94d879d7aa5abc3b9632ed743fbe Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Wed Dec 11 17:34:32 2024 +0200 wifi: ath12k: avoid redundant code in DP Rx error process Currently, in DP rx error processing, the MAC id is fetched redundantly from the same descriptor for each MSDU. To avoid this redundancy, move the fetch handling before the iteration. 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 <quic_periyasa@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241211153432.775335-9-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/dp_rx.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit b716a10d99a287681fc5cef46a7f9399bec5f055 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Wed Dec 11 17:34:31 2024 +0200 wifi: ath12k: enable MLO setup and teardown from core In case of multi device group abstraction, host has to exchange the multi-link operation commands such as setup and ready to firmware before registering the device group to mac80211. The multi-link operation commands - setup, ready and teardown are necessary for many commands such as WMI_PEER_ASSOC_CMD, WMI_BCN_TMPL_CMD in case of multi-link interfaces. 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 <quic_periyasa@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241211153432.775335-8-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.c | 73 ++++++++++++++++- drivers/net/wireless/ath/ath12k/core.h | 3 + drivers/net/wireless/ath/ath12k/mac.c | 142 +++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath12k/mac.h | 3 + drivers/net/wireless/ath/ath12k/wmi.c | 3 + drivers/net/wireless/ath/ath12k/wmi.h | 1 + 6 files changed, 224 insertions(+), 1 deletion(-) commit cc64deef0bdb52d6b2d6f1a2cd427ae680ed1936 Author: Bhagavathi Perumal S <quic_bperumal@quicinc.com> Date: Wed Dec 11 17:34:30 2024 +0200 wifi: ath12k: Add MLO WMI setup and teardown functions In case of multi device group abstraction, host has to exchange the MLO commands such as setup, teardown and ready to firmware. Once multi device group is ready, host has to exchange MLO setup command with partner devices link information and followed by MLO ready command to firmware. During deinit, MLO teardown command should be sent to firmware. Firmware would send MLO setup complete and MLO teardown complete to host for MLO setup command and MLO teardown command respectively. Added WMI helper functions for the MLO setup, ready and teardown command and the handling for corresponding event from firmware. Add appropriate WMI tag, command id and event id to parse the event and send request. 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: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Signed-off-by: Bhagavathi Perumal S <quic_bperumal@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241211153432.775335-7-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/wmi.c | 177 ++++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath12k/wmi.h | 48 +++++++++ 2 files changed, 225 insertions(+) commit 48090fae676ecef4bb39cc6a2faa9765a248b4f8 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Wed Dec 11 17:34:29 2024 +0200 wifi: ath12k: add support to allocate MLO global memory region To enable Multi-Link Operation (MLO), QCN9274 firmware requests MLO global memory (MLO_GLOBAL_MEM_REGION_TYPE). This memory region is shared across all the firmware (SoC) that are participation in the MLO. Hence, add support to allocate and free MLO global memory region. Allocate one MLO global memory per struct ath12k_hw_group and assign the same memory to all firmware in the same struct ath12k_hw_group. WCN7850 firmware does not request this memory type, therefore this change will have no impact on WCN7850 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: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Co-developed-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com> Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241211153432.775335-6-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.h | 7 ++ drivers/net/wireless/ath/ath12k/qmi.c | 127 ++++++++++++++++++++++++++++++--- drivers/net/wireless/ath/ath12k/qmi.h | 1 + 3 files changed, 125 insertions(+), 10 deletions(-) commit 786f34b5b4a408f466f762ca7785121ef3dbf540 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Wed Dec 11 17:34:28 2024 +0200 wifi: ath12k: refactor ath12k_qmi_alloc_target_mem_chunk() Currently, all QMI target memory types share the same allocation logic within ath12k_qmi_alloc_target_mem_chunk(). However, for Multi-Link Operation (MLO), the firmware requests a new MLO global memory region. This memory is shared across different firmware (SoC) participating in the MLO. To accommodate this logic change, refactor ath12k_qmi_alloc_target_mem_chunk() and introduce a helper function ath12k_qmi_alloc_chunk() for memory chunk allocation. Subsequent patch will add MLO global memory allocation logic. 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: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241211153432.775335-5-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/qmi.c | 82 +++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 38 deletions(-) commit 08a4c51c6ea0790d8abcb713410833fcb0019a69 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Wed Dec 11 17:34:27 2024 +0200 wifi: ath12k: send partner device details in QMI MLO capability Currently, QMI MLO host capability is sent with the details of local links and hw_link id only for particular device. But in the case of multi device group abstraction, it has to include the details of hw_link_id, num_local_links of every partner device that is involved in the group during QMI MLO capability exchange. Add changes to send partner device details to the firmware in QMI MLO capability exchange. 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 <quic_periyasa@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241211153432.775335-4-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/qmi.c | 88 ++++++++++++++++++++++++++++------- 1 file changed, 72 insertions(+), 16 deletions(-) commit 908c10c860e012f961bfb2b8e0823b23426beb9d Author: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com> Date: Wed Dec 11 17:34:26 2024 +0200 wifi: ath12k: parse multiple device information from Device Tree Currently, a single device is part of the device group abstraction. However, for multi-link operations, multiple devices need to be combined. This multi-device grouping is done via WSI (WLAN Serial Interface), which is described in the Device Tree. Information about different WSI groups and the number of devices involved in each group can be parsed from the Device Tree. Add changes to parse the Device Tree and determine WSI information, such as the different WSI groups and the number of devices per WSI group. Assign WSI index zero to the WSI controller device (to synchronize the clock among the devices within the WSI group), and increment the WSI index of each device in the order of the WSI connection. 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: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241211153432.775335-3-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.c | 183 ++++++++++++++++++++++++++++++--- drivers/net/wireless/ath/ath12k/core.h | 8 ++ 2 files changed, 178 insertions(+), 13 deletions(-) commit f86e09fd393adfbbf078985e2cbf322e9892fbe3 Author: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com> Date: Wed Dec 11 17:34:25 2024 +0200 dt-bindings: net: wireless: Describe ath12k PCI module with WSI The QCN9274 WiFi device supports WSI (WLAN Serial Interface). WSI is used to exchange specific control information across radios using a doorbell mechanism. This WSI connection is essential for exchanging control information among these devices. The WSI interface in the QCN9274 includes TX and RX ports, which are used to connect multiple WSI-supported devices together, forming a WSI group. Describe QCN9274 PCI wifi device with WSI interface. Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20241211153432.775335-2-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> .../bindings/net/wireless/qcom,ath12k-wsi.yaml | 204 +++++++++++++++++++++ 1 file changed, 204 insertions(+) commit 58ecb3a789fdc2b015112a31a91aa674c040a5ba Author: Song Liu <song@kernel.org> Date: Wed Dec 11 23:59:56 2024 -0800 bpf: lsm: Remove hook to bpf_task_storage_free free_task() already calls bpf_task_storage_free(). It is not necessary to call it again on security_task_free(). Remove the hook. Signed-off-by: Song Liu <song@kernel.org> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Acked-by: Matt Bobrowski <mattbobrowski@google.com> Link: https://patch.msgid.link/20241212075956.2614894-1-song@kernel.org security/bpf/hooks.c | 1 - 1 file changed, 1 deletion(-) commit d37e2646c8a5cb8acaebd03f4ae33a1bc0d24991 Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Tue Dec 10 09:36:01 2024 +0100 arm64: dts: qcom: x1e80100-pmics: Enable all SMB2360 separately At the moment, x1e80100-pmics.dtsi enables two of the SMB2360 PMICs by default and leaves the other two disabled. The third one was originally also enabled by default, but then disabled in commit a237b8da413c ("arm64: dts: qcom: x1e80100: Disable SMB2360_2 by default"). This is inconsistent and confusing. Some laptops will even need SMB2360_1 disabled by default if they just have a single USB-C port. Make this consistent by keeping all SMB2360 disabled in x1e80100-pmics.dtsi and enable them separately for all boards where needed. That way it is always clear which ones are available and avoids accidentally trying to read/write from missing chips when some of the PMICs are not present. Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Abel Vesa <abel.vesa@linaro.org> Link: https://lore.kernel.org/r/20241210-x1e80100-disable-smb2360-v2-1-2449be2eca29@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e001de-devkit.dts | 8 ++++++++ arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts | 8 ++++++++ arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts | 8 ++++++++ arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 8 ++++++++ arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts | 8 ++++++++ arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts | 8 ++++++++ arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 8 ++++++++ arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi | 4 ++++ arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 8 ++++++++ 9 files changed, 68 insertions(+) commit c759bc8e9046f9812238f506d70f07d3ea4206d4 Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Wed Dec 11 12:28:12 2024 +0900 ACPI: fan: cleanup resources in the error path of .probe() Call thermal_cooling_device_unregister() and sysfs_remove_link() in the error path of acpi_fan_probe() to fix possible memory leak. This bug was found by an experimental static analysis tool that I am developing. Fixes: 05a83d972293 ("ACPI: register ACPI Fan as generic thermal cooling device") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Link: https://patch.msgid.link/20241211032812.210164-1-joe@pf.is.s.u-tokyo.ac.jp Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/acpi/fan_core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 30062044a1a652ad1722a19604b816e363af7089 Author: Ninad Palsule <ninad@linux.ibm.com> Date: Mon Dec 16 11:50:39 2024 -0600 hwmon: (pmbus/core) Add PMBUS_REVISION in debugfs Add debugfs file for the PMBUS_REVISION command. This command provides information about PMBus protocol revision number. Signed-off-by: Ninad Palsule <ninad@linux.ibm.com> Link: https://lore.kernel.org/r/20241216175044.4144442-2-ninad@linux.ibm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/pmbus/pmbus_core.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit a5dfca553c237c8cfd0b02aacad64d6e6e14149b Merge: b0e4e2030b18 6dcc8e7f2bb7 Author: Mark Brown <broonie@kernel.org> Date: Mon Dec 16 18:25:51 2024 +0000 ASoC: Intel: Add matches for Cirrus Logic CDB35L56 Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: This series adds TGL and MTL matches for configurations using the Cirrus Logic CDB35L56-EIGHT-C board. commit 55b75306c3edf369285ce22ba1ced45e335094c2 Author: Peng Fan <peng.fan@nxp.com> Date: Thu Dec 12 11:03:22 2024 +0800 Input: bbnsm_pwrkey - add remove hook Without remove hook to clear wake irq, there will be kernel dump when doing module test. "bbnsm_pwrkey 44440000.bbnsm:pwrkey: wake irq already initialized" Add remove hook to clear wake irq and set wakeup to false. Signed-off-by: Peng Fan <peng.fan@nxp.com> Fixes: 40e40fdfec3f ("Input: bbnsm_pwrkey - add bbnsm power key support") Link: https://lore.kernel.org/r/20241212030322.3110017-1-peng.fan@oss.nxp.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/misc/nxp-bbnsm-pwrkey.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 828fd3f1d611cff5accb9fbff75f6bb011d8c9e2 Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Mon Dec 16 09:32:17 2024 +0100 Input: davinci-keyscan - remove leftover header The corresponding driver was removed two years ago but the platform data header was left behind. Remove it now. Fixes: 3c9cb34939fb ("input: remove davinci keyboard driver") Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20241216083218.22926-1-brgl@bgdev.pl Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> include/linux/platform_data/keyscan-davinci.h | 29 --------------------------- 1 file changed, 29 deletions(-) commit 06103dccbbd29408255a409f6f98f7f02387dc93 Merge: 00a5acdbf398 78d4f34e2115 Author: Alexei Starovoitov <ast@kernel.org> Date: Mon Dec 16 08:52:55 2024 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Cross-merge bpf fixes after downstream PR. No conflicts. Adjacent changes in: Auto-merging include/linux/bpf.h Auto-merging include/linux/bpf_verifier.h Auto-merging kernel/bpf/btf.c Auto-merging kernel/bpf/verifier.c Auto-merging kernel/trace/bpf_trace.c Auto-merging tools/testing/selftests/bpf/progs/test_tp_btf_nullable.c Signed-off-by: Alexei Starovoitov <ast@kernel.org> commit e90c9612ac3969cb8206029a26bcd2b6f5d4a942 Author: Andy Yan <andy.yan@rock-chips.com> Date: Mon Dec 16 18:04:43 2024 +0800 media: rockchip: rga: Fix Copyright description The company name has update to Rockchip Electronics Co., Ltd. since 2021. And change Co.Ltd to Co., Ltd. to fix mail server warning: DBL_SPAM(6.50)[co.ltd:url]; Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20241216100444.3726048-1-andyshrk@163.com Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> drivers/media/platform/rockchip/rga/rga-buf.c | 2 +- drivers/media/platform/rockchip/rga/rga-hw.c | 2 +- drivers/media/platform/rockchip/rga/rga-hw.h | 2 +- drivers/media/platform/rockchip/rga/rga.c | 2 +- drivers/media/platform/rockchip/rga/rga.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit dbb9c372555c0b2a5a9264418bfba6d017752808 Author: Chen-Yu Tsai <wenst@chromium.org> Date: Wed Dec 11 15:20:07 2024 +0800 remoteproc: mtk_scp: Only populate devices for SCP cores When multi-core SCP support was added, the driver was made to populate platform devices for all the sub-nodes. This ended up adding platform devices for the rpmsg sub-nodes as well, which never actually get used, since rpmsg devices are registered through the rpmsg interface. Limit of_platform_populate() to just populating the SCP cores with a compatible string match list. Fixes: 1fdbf0cdde98 ("remoteproc: mediatek: Probe SCP cluster on multi-core SCP") Cc: Tinghan Shen <tinghan.shen@mediatek.com> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://lore.kernel.org/r/20241211072009.120511-1-wenst@chromium.org Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> drivers/remoteproc/mtk_scp.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit d1ad636741e49ad3450e270f6285da23003e912b Author: Fabio Estevam <festevam@denx.de> Date: Mon Dec 2 10:21:47 2024 -0300 dt-bindings: timer: fsl,imxgpt: Document fsl,imx35-gpt The i.MX35 General Purpose Timer is compatible with i.MX31. Document the fsl,imx35-gpt compatible. This fixes the following dt-schema warning: timer@53f90000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx35-gpt', 'fsl,imx31-gpt'] is too long 'fsl,imx1-gpt' was expected 'fsl,imx21-gpt' was expected 'fsl,imx27-gpt' was expected 'fsl,imx31-gpt' was expected 'fsl,imx35-gpt' is not one of ['fsl,imx25-gpt', 'fsl,imx50-gpt', 'fsl,imx51-gpt', 'fsl,imx53-gpt', 'fsl,imx6q-gpt'] 'fsl,imx6dl-gpt' was expected 'fsl,imx35-gpt' is not one of ['fsl,imx6sl-gpt', 'fsl,imx6sx-gpt', 'fsl,imx8mp-gpt', 'fsl,imxrt1050-gpt', 'fsl,imxrt1170-gpt'] 'fsl,imx35-gpt' is not one of ['fsl,imx6ul-gpt', 'fsl,imx7d-gpt'] 'fsl,imx6sx-gpt' was expected Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241202132147.587799-2-festevam@gmail.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml | 1 + 1 file changed, 1 insertion(+) commit a7a3b4186c8e29001e114a384a06b36c888c686d Author: Fabio Estevam <festevam@denx.de> Date: Mon Dec 2 10:21:46 2024 -0300 dt-bindings: timer: fsl,imxgpt: Fix the fsl,imx7d-gpt fallback imx7s.dtsi correctly describes the GPT node as: compatible = "fsl,imx7d-gpt", "fsl,imx6dl-gpt"; Document the fallback compatible to be "fsl,imx6dl-gpt" in the bindings. This fixes the following dt-schema warnings: timer@302f0000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx7d-gpt', 'fsl,imx6dl-gpt'] is too long 'fsl,imx1-gpt' was expected 'fsl,imx21-gpt' was expected 'fsl,imx27-gpt' was expected 'fsl,imx31-gpt' was expected 'fsl,imx7d-gpt' is not one of ['fsl,imx25-gpt', 'fsl,imx50-gpt', 'fsl,imx51-gpt', 'fsl,imx53-gpt', 'fsl,imx6q-gpt'] 'fsl,imx6dl-gpt' was expected 'fsl,imx7d-gpt' is not one of ['fsl,imx6sl-gpt', 'fsl,imx6sx-gpt', 'fsl,imx8mp-gpt', 'fsl,imxrt1050-gpt', 'fsl,imxrt1170-gpt'] 'fsl,imx6sx-gpt' was expected Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241202132147.587799-1-festevam@gmail.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76f01376df398304972bf337ba430a62062add31 Author: Dmitry Antipov <dmantipov@yandex.ru> Date: Thu Dec 12 20:57:48 2024 +0300 f2fs: ensure that node info flags are always initialized Syzbot has reported the following KMSAN splat: BUG: KMSAN: uninit-value in f2fs_new_node_page+0x1494/0x1630 f2fs_new_node_page+0x1494/0x1630 f2fs_new_inode_page+0xb9/0x100 f2fs_init_inode_metadata+0x176/0x1e90 f2fs_add_inline_entry+0x723/0xc90 f2fs_do_add_link+0x48f/0xa70 f2fs_symlink+0x6af/0xfc0 vfs_symlink+0x1f1/0x470 do_symlinkat+0x471/0xbc0 __x64_sys_symlink+0xcf/0x140 x64_sys_call+0x2fcc/0x3d90 do_syscall_64+0xd9/0x1b0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Local variable new_ni created at: f2fs_new_node_page+0x9d/0x1630 f2fs_new_inode_page+0xb9/0x100 So adjust 'f2fs_get_node_info()' to ensure that 'flag' field of 'struct node_info' is always initialized. Reported-by: syzbot+5141f6db57a2f7614352@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=5141f6db57a2f7614352 Fixes: e05df3b115e7 ("f2fs: add node operations") Suggested-by: Chao Yu <chao@kernel.org> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/node.c | 1 + 1 file changed, 1 insertion(+) commit e9a844f6e487ee0f64d995d1d8ffde2e270e2479 Author: Yongpeng Yang <yangyongpeng1@oppo.com> Date: Wed Dec 4 11:31:13 2024 +0800 f2fs: The GC triggered by ioctl also needs to mark the segno as victim In SSR mode, the segment selected for allocation might be the same as the target segment of the GC triggered by ioctl, resulting in the GC moving the CURSEG_I(sbi, type)->segno. Thread A Thread B or Thread A - f2fs_ioc_gc_range - __f2fs_ioc_gc_range(.victim_segno=segno#N) - f2fs_gc - __get_victim - f2fs_get_victim : segno#N is valid, return segno#N as source segment of GC - f2fs_allocate_data_block - need_new_seg - get_ssr_segment - f2fs_get_victim : get segno #N as destination segment - change_curseg Fixes: e066b83c9b40 ("f2fs: add ioctl to flush data from faster device to cold area") Signed-off-by: Yongpeng Yang <yangyongpeng1@oppo.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/gc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 5f6594542779e69c6c6e2b57341c352174135eed Author: zangyangyang1 <zangyangyang1@xiaomi.com> Date: Fri Nov 22 18:58:22 2024 +0800 f2fs: cache more dentry pages While traversing dir entries in dentry page, it's better to refresh current accessed page in lru list by using FGP_ACCESSED flag, otherwise, such page may has less chance to survive during memory reclaim, result in causing additional IO when revisiting dentry page. Signed-off-by: zangyangyang1 <zangyangyang1@xiaomi.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c910a64bc4e21782959221b6ea2d6c4cce0506c7 Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Thu Nov 28 04:58:26 2024 +0000 f2fs: Remove calls to folio_file_mapping() All folios that f2fs sees belong to f2fs and not to the swapcache so it can dereference folio->mapping directly like all other filesystems do. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/data.c | 2 +- fs/f2fs/inline.c | 2 +- include/trace/events/f2fs.h | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) commit 19bbd306ddfd50a2f6cf0c3ccaaa079f22ddf4c5 Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Thu Nov 28 04:58:25 2024 +0000 f2fs: Convert __read_io_type() to take a folio Remove the last call to page_file_mapping() as both callers can now pass in a folio. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/data.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f58d8645824b4885caa9e24989f8e601b5e7ed50 Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Thu Nov 28 04:58:24 2024 +0000 f2fs: Use a data folio in f2fs_submit_page_bio() Remove a call to compound_head(). We can call bio_add_folio_nofail() here because we just allocated the bio, so we know it can't fail and thus the error path can never be taken. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/data.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 0765b3f989a7eb757252951b21a244bfa3224561 Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Thu Nov 28 04:58:23 2024 +0000 f2fs: Use a folio more in f2fs_submit_page_bio() Cache the result of page_folio(fio->page) in a local variable so we don't have to keep calling it. Saves a couple of calls to compound_head() and removes an access to page->mapping. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/data.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e0821645dd2d79180418dd9389e3e9e7e10e7281 Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Thu Nov 28 04:58:22 2024 +0000 f2fs: Convert f2fs_finish_read_bio() to use folios Use bio_for_each_folio_all() to iterate over each folio in the bio. This lets us use folio_end_read() which saves an atomic operation and memory barrier compared to marking the folio uptodate and unlocking it as two separate operations. This also removes a few hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/data.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 1cf746007005593aa51395302ca0d31814f4ce42 Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Thu Nov 28 04:58:21 2024 +0000 f2fs: Add F2FS_F_SB() This is the folio equivalent of F2FS_P_SB(). Removes a call to page_file_mapping() as we know folios seen by f2fs are never part of the swap cache. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/f2fs.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 87e2a15bc00840762b082399493597e8d3c1e42c Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Thu Nov 28 04:58:20 2024 +0000 f2fs: Convert submit tracepoints to take a folio Remove accesses to page->index and page->mapping as well as unnecessary calls to page_file_mapping(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/data.c | 6 +++--- include/trace/events/f2fs.h | 30 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 18 deletions(-) commit ac866908d7a92b6b2be1127a2d5e85e23da86fa3 Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Thu Nov 28 04:58:19 2024 +0000 f2fs: Use a folio in f2fs_write_compressed_pages() Remove accesses to page->index and an unnecessary reference to page->mapping. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/compress.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 1cda5bc0b2fe93cdcb5f05a02f814a282d32742c Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Thu Nov 28 04:58:18 2024 +0000 f2fs: Use a folio in f2fs_truncate_partial_cluster() Convert the incoming page to a folio and use it throughout. Removes an access to page->index. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/compress.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit ff6c82a934f7b5df8702579d921209c5ca336102 Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Thu Nov 28 04:58:17 2024 +0000 f2fs: Use a folio in f2fs_compress_write_end() This removes an access of page->index. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/compress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a909c179535383dc72a8f8e155ed3d35f298af86 Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Thu Nov 28 04:58:16 2024 +0000 f2fs: Use a folio in f2fs_all_cluster_page_ready() Remove references to page->index and use folio_test_uptodate() instead of PageUptodate(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/compress.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3e10457f4fbbfd992b80e7d9c56948be7de2a63e Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:03:37 2024 +0200 drm/i915/display: drop i915_drv.h include from intel_display_trace.h Finish the job of removing implicit dependencies on i915_drv.h via other includes in display code. Add a few missing explicit includes. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/c51352a2152cebd56ab3597ae5a791d2bb41439e.1732104170.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_atomic_plane.c | 1 + drivers/gpu/drm/i915/display/intel_crtc.c | 1 + drivers/gpu/drm/i915/display/intel_display_trace.h | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) commit 88555f703f78c350483ee36c938e7e5608ea7f5d Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:03:36 2024 +0200 drm/i915/display: add struct drm_device to struct intel_display conversion function Add a __drm_to_display() conversion function to hide the to_i915() usage and the implicit dependency on i915_drv.h from intel_display_types.h. The goal is for this implementation to be a transitional helper only. One idea I've floated around in the past would be to require a struct intel_display pointer member to be placed right after struct drm_device member in struct drm_i915_private and struct xe_device [1][2]. [1] https://lore.kernel.org/r/7777ff70e2be0663de4398aa6f75f0c54146cbfc.1709727127.git.jani.nikula@intel.com [2] https://lore.kernel.org/r/0b9459da6c8cba0f74bf2781d69182fa6801cd97.1709727127.git.jani.nikula@intel.com Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/cbbf26fa58ef662946303c972b1a1ff1547ddcfe.1732104170.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display_conversion.c | 5 +++++ drivers/gpu/drm/i915/display/intel_display_conversion.h | 3 ++- drivers/gpu/drm/i915/display/intel_display_types.h | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) commit 399f7b67161eaafa3df3bea22e0663fafa3212a1 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:03:35 2024 +0200 drm/i915/uncore: add to_intel_uncore() and use it Add to_intel_uncore() function to avoid the inclusion of i915_drv.h from intel_de.h. This reveals a number of implicit dependencies on i915_drv.h that need to be added. For now, to_intel_uncore() can be an inline function, with all the includes in compat intel_uncore.h, as long as i915_drv.h isn't included. The implicit dependencies on i915_drv.h is a problem in display code, but the same is not true for xe_device.h etc. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/377e2b400d126776224fc49874ed9cb03ac3123c.1732104170.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/g4x_dp.c | 1 + drivers/gpu/drm/i915/display/g4x_hdmi.c | 1 + drivers/gpu/drm/i915/display/i9xx_plane.c | 1 + drivers/gpu/drm/i915/display/icl_dsi.c | 1 + drivers/gpu/drm/i915/display/intel_alpm.c | 1 + drivers/gpu/drm/i915/display/intel_backlight.c | 1 + drivers/gpu/drm/i915/display/intel_cdclk.c | 1 + drivers/gpu/drm/i915/display/intel_color.c | 1 + drivers/gpu/drm/i915/display/intel_combo_phy.c | 1 + drivers/gpu/drm/i915/display/intel_cursor.c | 1 + drivers/gpu/drm/i915/display/intel_cx0_phy.c | 2 ++ drivers/gpu/drm/i915/display/intel_de.h | 6 ++++-- drivers/gpu/drm/i915/display/intel_display_debugfs.c | 1 + drivers/gpu/drm/i915/display/intel_dmc_wl.c | 1 + drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 1 + drivers/gpu/drm/i915/display/intel_dpio_phy.c | 1 + drivers/gpu/drm/i915/display/intel_dpll.c | 1 + drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 1 + drivers/gpu/drm/i915/display/intel_dpt_common.c | 1 + drivers/gpu/drm/i915/display/intel_fdi.c | 1 + drivers/gpu/drm/i915/display/intel_lspcon.c | 1 + drivers/gpu/drm/i915/display/intel_pch_display.c | 1 + drivers/gpu/drm/i915/display/intel_pch_refclk.c | 1 + drivers/gpu/drm/i915/display/intel_pipe_crc.c | 1 + drivers/gpu/drm/i915/display/intel_snps_phy.c | 1 + drivers/gpu/drm/i915/display/skl_scaler.c | 1 + drivers/gpu/drm/i915/intel_uncore.c | 5 +++++ drivers/gpu/drm/i915/intel_uncore.h | 2 ++ drivers/gpu/drm/xe/compat-i915-headers/intel_uncore.h | 5 +++++ 29 files changed, 42 insertions(+), 2 deletions(-) commit adceb416888daf0c53048d1cc5411527dcc8d24c Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:03:34 2024 +0200 drm/i915/display: add intel_display_conversion.c to hide stuff better The __to_intel_display() generics require the definition of struct drm_i915_private i.e. inclusion of i915_drv.h. Add intel_display_conversion.c with a __i915_to_display() function to do the conversion without the intel_display_conversion.h having an implicit dependency on i915_drv.h. The long term goal is to remove __to_intel_display() and the intel_display_conversion.[ch] files altoghether, and this is merely a transitional step to make the dependencies on i915_drv.h explicit. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/39e99b765b8c1a05d001659c39686a661ac268e2.1732104170.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_display_conversion.c | 9 +++++++++ drivers/gpu/drm/i915/display/intel_display_conversion.h | 9 +++++++-- drivers/gpu/drm/xe/Makefile | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) commit 17d707260765efbf0672cdd7ba9d597a16924781 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:03:33 2024 +0200 drm/i915: extract intel_uncore_trace.[ch] The i915_reg_rw tracing is a small isolated part of i915_trace.h. Its users are orthogonal to the other i915_trace.h users as well, and its implementation does not require all the includes of i915_trace.h. Split i915_reg_rw tracing to separate intel_uncore_trace.[ch]. The main underlying goal is to reduce implicit includes of i915_drv.h from display code. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/1a3623fbb120adc55bc1cab1e27aca6e55487163.1732104170.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_de.h | 2 +- drivers/gpu/drm/i915/display/intel_dp_aux.c | 2 +- drivers/gpu/drm/i915/i915_trace.h | 28 ------------- drivers/gpu/drm/i915/intel_uncore.c | 2 +- drivers/gpu/drm/i915/intel_uncore_trace.c | 7 ++++ drivers/gpu/drm/i915/intel_uncore_trace.h | 49 ++++++++++++++++++++++ drivers/gpu/drm/i915/vlv_suspend.c | 1 + .../{i915_trace.h => intel_uncore_trace.h} | 0 9 files changed, 61 insertions(+), 31 deletions(-) commit 57442cfb459d14871628940f0608c22449a52527 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:03:32 2024 +0200 drm/i915/gvt: always pass struct intel_display * to register macros The long term goal is to remove the __to_intel_display() generics from display macros, such as register macros. This requires that all such macro usage passes struct intel_display * rather than struct drm_i915_private * to the macros. The short term goal is to hide the struct drm_i915_private access in intel_display_conversions.h into a function. This is problematic with gvt, because it's a separate module, and the conversion function would need to be exported. Make the conversion to always passing struct intel_display * in gvt to unblock both of the above. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/266616e14db8d9a342fd93ec9752f561149a799b.1732104170.git.jani.nikula@intel.com drivers/gpu/drm/i915/gvt/cmd_parser.c | 17 +++++--- drivers/gpu/drm/i915/gvt/display.c | 80 +++++++++++++++++++---------------- drivers/gpu/drm/i915/gvt/fb_decoder.c | 21 +++++---- drivers/gpu/drm/i915/gvt/handlers.c | 44 ++++++++++--------- 4 files changed, 89 insertions(+), 73 deletions(-) commit 81a9a93b169a273ccc4a9a1ee56f17e9981d3f98 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 6 11:43:13 2024 +0200 drm/vc4: hdmi: use eld_mutex to protect access to connector->eld Reading access to connector->eld can happen at the same time the drm_edid_to_eld() updates the data. Take the newly added eld_mutex in order to protect connector->eld from concurrent access. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-10-c9bce1ee8bea@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e99c0b517bcd53cf61f998a3c4291333401cb391 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 6 11:43:12 2024 +0200 drm/sti: hdmi: use eld_mutex to protect access to connector->eld Reading access to connector->eld can happen at the same time the drm_edid_to_eld() updates the data. Take the newly added eld_mutex in order to protect connector->eld from concurrent access. Reviewed-by: Maxime Ripard <mripard@kernel.org> Acked-by: Raphael Gallais-Pou <rgallaispou@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-9-c9bce1ee8bea@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/sti/sti_hdmi.c | 2 ++ 1 file changed, 2 insertions(+) commit b54c14f82428c8a602392d4cae1958a71a578132 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 6 11:43:11 2024 +0200 drm/radeon: use eld_mutex to protect access to connector->eld Reading access to connector->eld can happen at the same time the drm_edid_to_eld() updates the data. Take the newly added eld_mutex in order to protect connector->eld from concurrent access. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-8-c9bce1ee8bea@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/radeon/radeon_audio.c | 2 ++ 1 file changed, 2 insertions(+) commit 9aad030dc64f6994dc5de7bb81ceca55dbc555c3 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 6 11:43:10 2024 +0200 drm/msm/dp: use eld_mutex to protect access to connector->eld Reading access to connector->eld can happen at the same time the drm_edid_to_eld() updates the data. Take the newly added eld_mutex in order to protect connector->eld from concurrent access. Reviewed-by: Maxime Ripard <mripard@kernel.org> Acked-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-7-c9bce1ee8bea@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/msm/dp/dp_audio.c | 2 ++ 1 file changed, 2 insertions(+) commit 5db44dd1528625c73a31542df2a68972327c9897 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 6 11:43:09 2024 +0200 drm/i915/audio: use eld_mutex to protect access to connector->eld Reading access to connector->eld can happen at the same time the drm_edid_to_eld() updates the data. Take the newly added eld_mutex in order to protect connector->eld from concurrent access. Reviewed-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-6-c9bce1ee8bea@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/i915/display/intel_audio.c | 3 +++ 1 file changed, 3 insertions(+) commit 5e8436d334ed7f6785416447c50b42077c6503e0 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 6 11:43:08 2024 +0200 drm/exynos: hdmi: use eld_mutex to protect access to connector->eld Reading access to connector->eld can happen at the same time the drm_edid_to_eld() updates the data. Take the newly added eld_mutex in order to protect connector->eld from concurrent access. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-5-c9bce1ee8bea@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/exynos/exynos_hdmi.c | 2 ++ 1 file changed, 2 insertions(+) commit 819bee01eea06282d7bda17d46caf29cae4f6d84 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 6 11:43:07 2024 +0200 drm/amd/display: use eld_mutex to protect access to connector->eld Reading access to connector->eld can happen at the same time the drm_edid_to_eld() updates the data. Take the newly added eld_mutex in order to protect connector->eld from concurrent access. Reviewed-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-4-c9bce1ee8bea@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+) commit 39ead6e02ea7d19b421e9d42299d4293fed3064e Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 6 11:43:06 2024 +0200 drm/bridge: ite-it66121: use eld_mutex to protect access to connector->eld Reading access to connector->eld can happen at the same time the drm_edid_to_eld() updates the data. Take the newly added eld_mutex in order to protect connector->eld from concurrent access. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-3-c9bce1ee8bea@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/bridge/ite-it66121.c | 2 ++ 1 file changed, 2 insertions(+) commit e72bf423a60afd744d13e40ab2194044a3af5217 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 6 11:43:05 2024 +0200 drm/bridge: anx7625: use eld_mutex to protect access to connector->eld Reading access to connector->eld can happen at the same time the drm_edid_to_eld() updates the data. Take the newly added eld_mutex in order to protect connector->eld from concurrent access. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-2-c9bce1ee8bea@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/bridge/analogix/anx7625.c | 2 ++ 1 file changed, 2 insertions(+) commit df7c8e3dde37a9d81c0613285b43600f3cc70f34 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Fri Dec 6 11:43:04 2024 +0200 drm/connector: add mutex to protect ELD from concurrent access The connector->eld is accessed by the .get_eld() callback. This access can collide with the drm_edid_to_eld() updating the data at the same time. Add drm_connector.eld_mutex to protect the data from concurrenct access. Individual drivers are not updated (to reduce possible issues while applying the patch), maintainers are to find a best suitable way to lock that mutex while accessing the ELD data. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-1-c9bce1ee8bea@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/drm_connector.c | 1 + drivers/gpu/drm/drm_edid.c | 6 ++++++ include/drm/drm_connector.h | 5 ++++- 3 files changed, 11 insertions(+), 1 deletion(-) commit 362a7993ed0173e70859d0a624d8ffa968b2cea0 Merge: d8d936c51388 78d4f34e2115 Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Mon Dec 16 16:23:12 2024 +0100 Merge 6.13-rc3 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 30691a59c85c48575b04e849f675660fd8060cad Merge: aea2654cce40 78d4f34e2115 Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Mon Dec 16 16:21:10 2024 +0100 Merge 6.13-rc3 into tty-next We need the serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit f9e7f3f9620b13d76ed16399b46b29cab1a398f2 Merge: 0a4edbeef1e4 78d4f34e2115 Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Mon Dec 16 16:18:45 2024 +0100 Merge 6.13-rc3 into staging-next We need the gpib build fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 4c41a48f5f3ecd3b963cd3820d2ea41d9a8d6516 Author: Niklas Schnelle <schnelle@linux.ibm.com> Date: Fri Dec 13 14:47:33 2024 +0100 s390/pci: Add pci_msg debug view to PCI report Using the newly introduced debug_dump() mechanism add formatted content of pci_debug_msg_id to the PCI report. The formatting is based on the existing sprintf format but removes caller pointer and area index and adds an column header. This will allow the platform to collect this log data together with hardware errors. This sets the reverse flag such that the newest log entries get added to the PCI report even if not all debug log entries fit. Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Co-developed-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/debug.h | 4 ++++ arch/s390/kernel/debug.c | 8 +++----- arch/s390/pci/pci_report.c | 47 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 5 deletions(-) commit dc18c81a57e75c2abfd826164600b5b4f96f5fd9 Author: Niklas Schnelle <schnelle@linux.ibm.com> Date: Fri Dec 13 14:47:32 2024 +0100 s390/debug: Add a reverse mode for debug_dump() In this mode debug_dump() writes the debug log starting at the newest entry followed by earlier entries. To this end add a debug_prev_entry() helper analogous to debug_next_entry() a helper to get the latest entry which is one before the active entry and a helper to iterate either forward or backward. Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Co-developed-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/debug.h | 2 +- arch/s390/kernel/debug.c | 87 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 86 insertions(+), 3 deletions(-) commit 5f952dae48d034b0736593ba98b5aef84038522b Author: Niklas Schnelle <schnelle@linux.ibm.com> Date: Fri Dec 13 14:47:31 2024 +0100 s390/debug: Add debug_dump() to write debug view to a string buffer The debug_dump() function allows to get the content of a debug log and view pair in a string buffer. One future application of this is to provide debug logs to the platform to be collected with hardware error logs during recovery. Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Co-developed-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/debug.h | 3 +++ arch/s390/kernel/debug.c | 47 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) commit 460c52a57f83f0cb510ba04ac8263e1ee95b2d66 Author: Niklas Schnelle <schnelle@linux.ibm.com> Date: Fri Dec 13 14:47:30 2024 +0100 s390/debug: Split private data alloc/free out of file operations Split the allocation respectively freeing of file_private_info_t out of open() respectively close(). This will be used in a follow on change to access to debug views without going through the s390dbf filesystem. Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/kernel/debug.c | 78 +++++++++++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 30 deletions(-) commit 7832b3047d10e2c1f9cfed49de818a38aea251f6 Author: Niklas Schnelle <schnelle@linux.ibm.com> Date: Fri Dec 13 14:47:29 2024 +0100 s390/debug: Simplify and document debug_next_entry() logic Contrary to convention debug_next_entry() returns a falsy 0 value if there are more entries and a truthy 1 value when there are no more entries. As there is only one caller just reverse this logic to be less surprising and document the behavior in a kdoc comment. Also replace the goto with an early return. In the future this allows using it in a do {} while (debug_next_entry(...)) loop. Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/kernel/debug.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 4ec6054e7321dc24ebccaa08b3af0d590f5666e6 Author: Niklas Schnelle <schnelle@linux.ibm.com> Date: Fri Dec 13 14:47:28 2024 +0100 s390/pci: Report PCI error recovery results via SCLP Add a mechanism with which the status of PCI error recovery runs is reported to the platform. Together with the status supply additional information that may aid in problem determination. Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/sclp.h | 33 +++++++++++++ arch/s390/pci/Makefile | 2 +- arch/s390/pci/pci_event.c | 21 ++++++-- arch/s390/pci/pci_report.c | 111 +++++++++++++++++++++++++++++++++++++++++++ arch/s390/pci/pci_report.h | 16 +++++++ drivers/s390/char/sclp.h | 14 ------ drivers/s390/char/sclp_pci.c | 19 -------- 7 files changed, 178 insertions(+), 38 deletions(-) commit 5bcc8bfe841b29f7d62f4bb7738bb085ecc51aad Author: Alice Ryhl <aliceryhl@google.com> Date: Tue Dec 3 12:34:38 2024 +0000 rust: miscdevice: add fops->show_fdinfo() hook File descriptors should generally provide a fops->show_fdinfo() hook for debugging purposes. Thus, add such a hook to the miscdevice abstractions. Signed-off-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20241203-miscdevice-showfdinfo-v1-1-7e990732d430@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> rust/kernel/miscdevice.rs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 8d9b095b8f898bddc6c59a3eb9f50c1aa194c57a Author: Lee Jones <lee@kernel.org> Date: Fri Dec 13 13:47:10 2024 +0000 samples: rust_misc_device: Provide an example C program to exercise functionality Here is the expected output (manually spliced together): USERSPACE: Opening /dev/rust-misc-device for reading and writing KERNEL: rust_misc_device: Opening Rust Misc Device Sample USERSPACE: Calling Hello KERNEL: rust_misc_device: IOCTLing Rust Misc Device Sample KERNEL: rust_misc_device: -> Hello from the Rust Misc Device USERSPACE: Fetching initial value KERNEL: rust_misc_device: IOCTLing Rust Misc Device Sample KERNEL: rust_misc_device: -> Copying data to userspace (value: 0) USERSPACE: Submitting new value (1) KERNEL: rust_misc_device: IOCTLing Rust Misc Device Sample KERNEL: rust_misc_device: -> Copying data from userspace (value: 1) USERSPACE: Fetching new value KERNEL: rust_misc_device: IOCTLing Rust Misc Device Sample KERNEL: rust_misc_device: -> Copying data to userspace (value: 1) USERSPACE: Attempting to call in to an non-existent IOCTL KERNEL: rust_misc_device: IOCTLing Rust Misc Device Sample KERNEL: rust_misc_device: -> IOCTL not recognised: 20992 USERSPACE: ioctl: Succeeded to fail - this was expected: Inappropriate ioctl for device USERSPACE: Closing /dev/rust-misc-device KERNEL: rust_misc_device: Exiting the Rust Misc Device Sample USERSPACE: Success Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20241213134715.601415-6-lee@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> samples/rust/rust_misc_device.rs | 90 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) commit ff9feb05672e165bcdc3dcca5be630071d9e25b4 Author: Lee Jones <lee@kernel.org> Date: Fri Dec 13 13:47:09 2024 +0000 MAINTAINERS: Add Rust Misc Sample to MISC entry Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20241213134715.601415-5-lee@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 42523ceba5f6735df4d02c6982d1733a1465afbd Author: Lee Jones <lee@kernel.org> Date: Fri Dec 13 13:47:08 2024 +0000 samples: rust_misc_device: Demonstrate additional get/set value functionality Expand the complexity of the sample driver by providing the ability to get and set an integer. The value is protected by a mutex. Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20241213134715.601415-4-lee@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> samples/rust/rust_misc_device.rs | 89 +++++++++++++++++++++++++++++++++------- 1 file changed, 75 insertions(+), 14 deletions(-) commit b0e4e2030b18b4e8a6820fc7c9da00e120c89338 Author: Arnd Bergmann <arnd@arndb.de> Date: Mon Dec 16 13:15:35 2024 +0100 firmware: cs_dsp: avoid large local variables Having 1280 bytes of local variables on the stack exceeds the limit on 32-bit architectures: drivers/firmware/cirrus/test/cs_dsp_test_bin.c: In function 'bin_patch_mixed_packed_unpacked_random': drivers/firmware/cirrus/test/cs_dsp_test_bin.c:2097:1: error: the frame size of 1784 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Use dynamic allocation for the largest two here. Fixes: dd0b6b1f29b9 ("firmware: cs_dsp: Add KUnit testing of bin file download") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241216121541.3455880-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/test/cs_dsp_test_bin.c | 33 +++++++++++++++----------- 1 file changed, 19 insertions(+), 14 deletions(-) commit 37c42bde28f580ac5de4de838afd5eea72e40262 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Mon Dec 16 13:51:10 2024 +0000 ASoC: rt715: Remove unused hda_to_sdw hda_to_sdw() has been unused since it was added in 2020 as part of the commit d1ede0641b05 ("ASoC: rt715: add RT715 codec driver") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20241216135110.53426-1-linux@treblig.org Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/rt715-sdw.c | 41 ----------------------------------------- sound/soc/codecs/rt715.h | 3 --- 2 files changed, 44 deletions(-) commit fdb1ac6c302689b286eca9bb7247111bffc7db17 Author: Lee Jones <lee@kernel.org> Date: Fri Dec 13 13:47:07 2024 +0000 samples: rust: Provide example using the new Rust MiscDevice abstraction This sample driver demonstrates the following basic operations: * Register a Misc Device * Create /dev/rust-misc-device * Provide open call-back for the aforementioned character device * Operate on the character device via a simple ioctl() * Provide close call-back for the character device Signed-off-by: Lee Jones <lee@kernel.org> Reviewed-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20241213134715.601415-3-lee@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> samples/rust/Kconfig | 10 +++++ samples/rust/Makefile | 1 + samples/rust/rust_misc_device.rs | 87 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+) commit 4a9ce18874068aad0df0bee877d6cdbc26365b30 Author: Lee Jones <lee@kernel.org> Date: Fri Dec 13 13:47:06 2024 +0000 Documentation: ioctl-number: Carve out some identifiers for use by sample drivers 32 IDs should be plenty (at yet, not too greedy) since a lot of sample drivers will use their own subsystem allocations. Sample drivers predominately reside in <KERNEL_ROOT>/samples, but there should be no issue with in-place example drivers using them. Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20241213134715.601415-2-lee@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/userspace-api/ioctl/ioctl-number.rst | 1 + 1 file changed, 1 insertion(+) commit 284ae0be4dcafff0a154c1e69e7430c144a7ddc2 Author: Lee Jones <lee@kernel.org> Date: Tue Dec 10 09:39:02 2024 +0000 rust: miscdevice: Provide accessor to pull out miscdevice::this_device There are situations where a pointer to a `struct device` will become necessary (e.g. for calling into dev_*() functions). This accessor allows callers to pull this out from the `struct miscdevice`. Signed-off-by: Lee Jones <lee@kernel.org> Signed-off-by: Alice Ryhl <aliceryhl@google.com> Tested-by: Lee Jones <lee@kernel.org> Reviewed-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20241210-miscdevice-file-param-v3-3-b2a79b666dc5@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> rust/kernel/miscdevice.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 88441d5c6d17211bcbd5b429205b09c25598f756 Author: Alice Ryhl <aliceryhl@google.com> Date: Tue Dec 10 09:39:01 2024 +0000 rust: miscdevice: access the `struct miscdevice` from fops->open() Providing access to the underlying `struct miscdevice` is useful for various reasons. For example, this allows you access the miscdevice's internal `struct device` for use with the `dev_*` printing macros. Note that since the underlying `struct miscdevice` could get freed at any point after the fops->open() call (if misc_deregister is called), only the open call is given access to it. To use `dev_*` printing macros from other fops hooks, take a refcount on `miscdevice->this_device` to keep it alive. See the linked thread for further discussion on the lifetime of `struct miscdevice`. Link: https://lore.kernel.org/r/2024120951-botanist-exhale-4845@gregkh Signed-off-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Lee Jones <lee@kernel.org> Tested-by: Lee Jones <lee@kernel.org> Reviewed-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20241210-miscdevice-file-param-v3-2-b2a79b666dc5@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> rust/kernel/miscdevice.rs | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 0d8a7c7bf47aa1002e0df792cb1d0652bc824cba Author: Alice Ryhl <aliceryhl@google.com> Date: Tue Dec 10 09:39:00 2024 +0000 rust: miscdevice: access file in fops This allows fops to access information about the underlying struct file for the miscdevice. For example, the Binder driver needs to inspect the O_NONBLOCK flag inside the fops->ioctl() hook. Signed-off-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Lee Jones <lee@kernel.org> Tested-by: Lee Jones <lee@kernel.org> Reviewed-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20241210-miscdevice-file-param-v3-1-b2a79b666dc5@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> rust/kernel/miscdevice.rs | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) commit 618f9e122f4c91e84db21237490dfe9fcd6a0fb9 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Dec 13 11:48:25 2024 +0200 drm/i915/dp: finish link training conversion to struct intel_display Convert the final stragglers to struct intel_display now that we have platform identification via it too. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/14a214fc358eafba8d57c25e0d26c8c35856dc89.1734083244.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp_link_training.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 5d1bbfba0f39cf7a37e30e88b362a500272c9b2a Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Dec 13 11:48:24 2024 +0200 drm/i915/dp: convert interfaces to struct intel_display Convert the intel_dp.[ch] external interfaces to struct intel_display. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/7d55f5fd9fc0619be3113098a49259d5374013c6.1734083244.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_display.c | 6 ++-- .../gpu/drm/i915/display/intel_display_driver.c | 9 ++---- drivers/gpu/drm/i915/display/intel_dp.c | 36 ++++++++-------------- drivers/gpu/drm/i915/display/intel_dp.h | 20 ++++++------ .../gpu/drm/i915/display/intel_dp_link_training.c | 5 ++- drivers/gpu/drm/i915/display/intel_dp_mst.c | 12 +++----- drivers/gpu/drm/i915/display/intel_psr.c | 2 +- drivers/gpu/drm/i915/i915_driver.c | 2 +- drivers/gpu/drm/xe/display/xe_display.c | 2 +- 9 files changed, 38 insertions(+), 56 deletions(-) commit 8146b9235fc2b3a0d102c475d92130c852871576 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Dec 13 11:48:23 2024 +0200 drm/i915/dp: convert to struct intel_display Going forward, struct intel_display is the main device data structure for display. Switch to it internally in DP code. v2/v3: Rebase Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/d712a2894addde5fd7a8b593fbea87314df37e1f.1734083244.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp.c | 684 +++++++++++++++++--------------- 1 file changed, 359 insertions(+), 325 deletions(-) commit 8beac7655c485da28d0455765899f87df3c2dee5 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Dec 13 11:48:22 2024 +0200 drm/i915/dp: s/intel_connector/connector/ Use the contemporary naming convention of struct intel_connector *connector. Avoid struct drm_connector use altogether. In a few cases add local struct drm_display_info and struct intel_display pointers to help move away from struct drm_connector usage. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/2951b76d7476adcffb6d16079ab52207d1aab92d.1734083244.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp.c | 202 ++++++++++++++++---------------- 1 file changed, 99 insertions(+), 103 deletions(-) commit 595a19e57d50cb0bac2be8ece87ca1170ee2d396 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Dec 13 11:48:21 2024 +0200 drm/i915/dp: s/intel_encoder/encoder/ Use the contemporary naming convention of struct intel_encoder *encoder. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/d1d3fb9254871d9a334e3f20b219bdf772426e66.1734083244.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 805cc9fef1fa9b07ab76d59ac733b915e0c52e48 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Dec 11 16:43:10 2024 +0200 drm/i915/mst: use intel_dp_compute_config_limits() for DP MST There's a lot of duplication between mst_stream_compute_config_limits() and intel_dp_compute_config_limits(). Adjust the latter to suit the needs of the former, and use the same function for both. This reduces duplication and highlights the differences for SST and MST and UHBR. Remove the kernel-doc for intel_dp_compute_config_link_bpp_limits() which now becomes static. Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211144310.701895-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp.c | 44 ++++++++++++++++++----------- drivers/gpu/drm/i915/display/intel_dp.h | 10 +++---- drivers/gpu/drm/i915/display/intel_dp_mst.c | 29 ++----------------- 3 files changed, 34 insertions(+), 49 deletions(-) commit ff5eb00255eb0ffee9de6d6580a83b95a9236719 Author: Otto Pflüger <otto.pflueger@abscue.de> Date: Sun Dec 15 12:14:58 2024 +0100 pinctrl: qcom: Add MSM8917 tlmm pinctrl driver It is based on MSM8916 driver with the pinctrl definitions from Qualcomm's downstream MSM8917 driver. Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> Link: https://lore.kernel.org/20241215-msm8917-v9-3-bacaa26f3eef@mainlining.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/qcom/Kconfig.msm | 6 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-msm8917.c | 1620 ++++++++++++++++++++++++++++++++ 3 files changed, 1627 insertions(+) commit 9d7ad0ed85e9fc54b190444f4c0683c2de47a88e Author: Barnabás Czémán <barnabas.czeman@mainlining.org> Date: Sun Dec 15 12:14:57 2024 +0100 dt-bindings: pinctrl: qcom: Add MSM8917 pinctrl Add device tree bindings documentation for Qualcomm MSM8917 pinctrl driver. Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> Link: https://lore.kernel.org/20241215-msm8917-v9-2-bacaa26f3eef@mainlining.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org> .../bindings/pinctrl/qcom,msm8917-pinctrl.yaml | 160 +++++++++++++++++++++ 1 file changed, 160 insertions(+) commit 7b64859fde26ea4bb662db7401c8ebec5ac7f8b5 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 11 23:52:50 2024 +0000 ata: sata_gemini: Remove remaining reset glue Now that gemini_sata_reset_bridge() is gone, we can remove the sata0/1_reset members and the code that creates them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Damien Le Moal <dlemoal@kernel.org> drivers/ata/sata_gemini.c | 20 -------------------- 1 file changed, 20 deletions(-) commit d483fa58991fab33cf7b29d01d8243343dd0e5ad Author: Vinod Govindapillai <vinod.govindapillai@intel.com> Date: Fri Dec 13 14:03:57 2024 +0200 drm/i915/xe3: do not configure auto min dbuf for cursor WMs Cursor planes do not have the minimum dbuf configuration. The ddb allocation and registration routines handle this correctly. But the plane wm handling for cursor need to be differentiated for this case. Auto minimum buf enable bit should not be enabled for cursor wm registers in xe3. Fixes: a831920c370c ("drm/i915/xe3: Use hw support for min/interim ddb allocations for async flip") Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213120357.300584-1-vinod.govindapillai@intel.com Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com> drivers/gpu/drm/i915/display/skl_watermark.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1950af31dc66487ac21287cea5edc92738e7c8c8 Author: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Date: Tue Dec 10 19:45:45 2024 -0800 RDMA/bnxt_re: Remove unnecessary header file inclusion There is no need to include bnxt_ulp.h in ib_verbs.c. Remove it. Also, fixed hw_counters.c to remove unwanted header file inclusions. Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/1733888745-30939-6-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/bnxt_re/hw_counters.c | 9 --------- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 -- 2 files changed, 11 deletions(-) commit 8aa3dd3e7659128c73fe9e41381e364db8c2e56c Author: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Date: Tue Dec 10 19:45:44 2024 -0800 RDMA/bnxt_re: Eliminate need for some forward declarations Move the function definition of bnxt_re_shutdown() to avoid forward declarartion of bnxt_re_dev_uninit(). Move the function definition of bnxt_re_setup_cc() before bnxt_re_add_device() to avoid it's forward declarations. Also, forward declarartions of bnxt_re_stop_irq() and bnxt_re_dev_stop() are unnecessary. Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/1733888745-30939-5-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/bnxt_re/main.c | 73 +++++++++++++++++------------------- 1 file changed, 34 insertions(+), 39 deletions(-) commit 55992c386263f3899552118b2e3d142cd223eba4 Author: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Date: Tue Dec 10 19:45:43 2024 -0800 RDMA/bnxt_re: Optimize error handling in bnxt_re_probe Optimize error handling path in bnxt_re_probe by removing some duplicate code. Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/1733888745-30939-4-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/bnxt_re/main.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit ae51cb98213268464a7fba9273cb979037516e9a Author: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Date: Tue Dec 10 19:45:42 2024 -0800 RDMA/bnxt_re: Remove unnecessary goto in bnxt_re_netdev_event Return directly in case of error without a goto label as there is no cleanup actions performed. Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/1733888745-30939-3-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/bnxt_re/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c7f2cfe81e059a6efdf7be95e5efa9044a2f4b67 Author: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Date: Tue Dec 10 19:45:41 2024 -0800 RDMA/bnxt_re: Remove extra new line in bnxt_re_netdev_event This is a purely cosmetic change. Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/1733888745-30939-2-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/bnxt_re/main.c | 1 - 1 file changed, 1 deletion(-) commit 999a0a2e9b87c451786df32c57518a2600311035 Author: Boshi Yu <boshiyu@linux.alibaba.com> Date: Wed Dec 11 10:09:08 2024 +0800 RDMA/erdma: Support UD QPs and UD WRs The iWARP protocol supports only RC QPs previously. Now we add UD QPs and UD WRs support for the RoCEv2 protocol. Signed-off-by: Boshi Yu <boshiyu@linux.alibaba.com> Link: https://patch.msgid.link/20241211020930.68833-9-boshiyu@linux.alibaba.com Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/erdma/erdma_cq.c | 20 +++++++++ drivers/infiniband/hw/erdma/erdma_hw.h | 37 +++++++++++++++- drivers/infiniband/hw/erdma/erdma_qp.c | 71 +++++++++++++++++++++++++------ drivers/infiniband/hw/erdma/erdma_verbs.c | 29 ++++++++++--- 4 files changed, 136 insertions(+), 21 deletions(-) commit 1cccbd3eec3d6370ddf9a003c1a1baeb8c155b3b Author: Boshi Yu <boshiyu@linux.alibaba.com> Date: Wed Dec 11 10:09:07 2024 +0800 RDMA/erdma: Add the query_qp command to the cmdq Certian QP attributes, such as sq_draining, can only be obtained by querying the hardware on the erdma RoCEv2 device. To address this, we add the query_qp command to the cmdq and parse the response to retrieve corresponding QP attributes. Signed-off-by: Boshi Yu <boshiyu@linux.alibaba.com> Link: https://patch.msgid.link/20241211020930.68833-8-boshiyu@linux.alibaba.com Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/erdma/erdma_hw.h | 12 +++++++ drivers/infiniband/hw/erdma/erdma_verbs.c | 58 +++++++++++++++++++++++++------ 2 files changed, 60 insertions(+), 10 deletions(-) commit de5b8008aa4da7e1e750cc780c086d45242ba51e Author: Boshi Yu <boshiyu@linux.alibaba.com> Date: Wed Dec 11 10:09:06 2024 +0800 RDMA/erdma: Refactor the code of the modify_qp interface The procedure for modifying QP is similar for both the iWARP and RoCEv2 protocols. Therefore, we unify the code and provide the erdma_modify_qp() interface for both protocols. Signed-off-by: Boshi Yu <boshiyu@linux.alibaba.com> Link: https://patch.msgid.link/20241211020930.68833-7-boshiyu@linux.alibaba.com Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/erdma/erdma_cm.c | 71 +++++----- drivers/infiniband/hw/erdma/erdma_hw.h | 1 + drivers/infiniband/hw/erdma/erdma_main.c | 3 +- drivers/infiniband/hw/erdma/erdma_qp.c | 136 +++++++++++-------- drivers/infiniband/hw/erdma/erdma_verbs.c | 210 +++++++++++++++--------------- drivers/infiniband/hw/erdma/erdma_verbs.h | 75 +++++++---- 6 files changed, 276 insertions(+), 220 deletions(-) commit 9566cf6a7742f2e2bb8044b4624a7a1e66b6a549 Author: Boshi Yu <boshiyu@linux.alibaba.com> Date: Wed Dec 11 10:09:05 2024 +0800 RDMA/erdma: Add erdma_modify_qp_rocev2() interface The QP state machines in the RoCEv2 and iWARP protocols are different. To handle these differences for the erdma RoCEv2 device, we provide the erdma_modify_qp_rocev2() interface, which transitions the QP state and modifies QP attributes accordingly. Signed-off-by: Boshi Yu <boshiyu@linux.alibaba.com> Link: https://patch.msgid.link/20241211020930.68833-6-boshiyu@linux.alibaba.com Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/erdma/erdma_cq.c | 45 ++++++ drivers/infiniband/hw/erdma/erdma_hw.h | 14 ++ drivers/infiniband/hw/erdma/erdma_main.c | 3 +- drivers/infiniband/hw/erdma/erdma_qp.c | 92 +++++++++++++ drivers/infiniband/hw/erdma/erdma_verbs.c | 221 ++++++++++++++++++++++++++---- drivers/infiniband/hw/erdma/erdma_verbs.h | 44 ++++++ 6 files changed, 388 insertions(+), 31 deletions(-) commit 41dcaf48ff9e31d1441b6a74ed488360aad096d4 Author: Boshi Yu <boshiyu@linux.alibaba.com> Date: Wed Dec 11 10:09:04 2024 +0800 RDMA/erdma: Add address handle implementation The address handle contains the necessary information to transmit messages to a remote peer in the RoCEv2 protocol. This commit implements the erdma_create_ah(), erdma_destroy_ah(), and erdma_query_ah() interfaces, which are used to create, destroy, and query an address handle, respectively. Signed-off-by: Boshi Yu <boshiyu@linux.alibaba.com> Link: https://patch.msgid.link/20241211020930.68833-5-boshiyu@linux.alibaba.com Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/erdma/erdma.h | 4 +- drivers/infiniband/hw/erdma/erdma_hw.h | 34 +++++++++ drivers/infiniband/hw/erdma/erdma_main.c | 4 ++ drivers/infiniband/hw/erdma/erdma_verbs.c | 114 +++++++++++++++++++++++++++++- drivers/infiniband/hw/erdma/erdma_verbs.h | 28 ++++++++ 5 files changed, 182 insertions(+), 2 deletions(-) commit 14bcf7354a0ed2004da85b4b03afe44effd5e445 Author: Boshi Yu <boshiyu@linux.alibaba.com> Date: Wed Dec 11 10:09:03 2024 +0800 RDMA/erdma: Add the erdma_query_pkey() interface The erdma_query_pkey() interface queries the PKey at the specified index. Currently, erdma supports only one partition and returns the default PKey for each query. Besides, the correct length of the PKey table can be obtained by calling the erdma_query_port() and erdma_get_port_immutable() interfaces. Signed-off-by: Boshi Yu <boshiyu@linux.alibaba.com> Link: https://patch.msgid.link/20241211020930.68833-4-boshiyu@linux.alibaba.com Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/erdma/erdma_hw.h | 2 ++ drivers/infiniband/hw/erdma/erdma_main.c | 1 + drivers/infiniband/hw/erdma/erdma_verbs.c | 14 ++++++++++++++ drivers/infiniband/hw/erdma/erdma_verbs.h | 1 + 4 files changed, 18 insertions(+) commit 6edc15abc256f676ae44ac2ddc914567859bd1a7 Author: Boshi Yu <boshiyu@linux.alibaba.com> Date: Wed Dec 11 10:09:02 2024 +0800 RDMA/erdma: Add GID table management interfaces The erdma_add_gid() interface inserts a GID entry at the specified index. The erdma_del_gid() interface deletes the GID entry at the specified index. Additionally, programs can invoke the erdma_query_port() and erdma_get_port_immutable() interfaces to query the GID table length. Signed-off-by: Boshi Yu <boshiyu@linux.alibaba.com> Link: https://patch.msgid.link/20241211020930.68833-3-boshiyu@linux.alibaba.com Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/erdma/erdma.h | 1 + drivers/infiniband/hw/erdma/erdma_hw.h | 28 +++++++++++++++- drivers/infiniband/hw/erdma/erdma_main.c | 3 ++ drivers/infiniband/hw/erdma/erdma_verbs.c | 56 +++++++++++++++++++++++++++++-- drivers/infiniband/hw/erdma/erdma_verbs.h | 12 +++++++ 5 files changed, 96 insertions(+), 4 deletions(-) commit a883e71345a0101ff33be23a8d13f112ec4defb5 Author: Boshi Yu <boshiyu@linux.alibaba.com> Date: Wed Dec 11 10:09:01 2024 +0800 RDMA/erdma: Probe the erdma RoCEv2 device Currently, the erdma driver supports both the iWARP and RoCEv2 protocols. The erdma driver reads the ERDMA_REGS_DEV_PROTO_REG register to identify the protocol used by the erdma device. Since each protocol requires different ib_device_ops, we introduce the erdma_device_ops_iwarp and erdma_device_ops_rocev2 for iWARP and RoCEv2 protocols, respectively. Signed-off-by: Boshi Yu <boshiyu@linux.alibaba.com> Link: https://patch.msgid.link/20241211020930.68833-2-boshiyu@linux.alibaba.com Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/erdma/Kconfig | 2 +- drivers/infiniband/hw/erdma/erdma.h | 3 ++- drivers/infiniband/hw/erdma/erdma_hw.h | 7 +++++++ drivers/infiniband/hw/erdma/erdma_main.c | 34 +++++++++++++++++++++++-------- drivers/infiniband/hw/erdma/erdma_verbs.c | 16 ++++++++++++++- drivers/infiniband/hw/erdma/erdma_verbs.h | 12 +++++++++++ 6 files changed, 62 insertions(+), 12 deletions(-) commit bc6a5efe3dcd9ada8d76eeb69039a11a86add39b Merge: da3e3186ef13 6e9e2eed4f39 Author: David S. Miller <davem@davemloft.net> Date: Mon Dec 16 12:51:41 2024 +0000 Merge branch 'net-timestamp-selectable' Kory Maincent says: ==================== net: Make timestamping selectable Up until now, there was no way to let the user select the hardware PTP provider at which time stamping occurs. The stack assumed that PHY time stamping is always preferred, but some MAC/PHY combinations were buggy. This series updates the default MAC/PHY default timestamping and aims to allow the user to select the desired hwtstamp provider administratively. Here is few netlink spec usage examples: ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --dump tsinfo-get --json '{"header":{"dev-name":"eth0"}}' [{'header': {'dev-index': 3, 'dev-name': 'eth0'}, 'hwtst-provider': {'index': 0, 'qualifier': 0}, 'phc-index': 0, 'rx-filters': {'bits': {'bit': [{'index': 0, 'name': 'none'}, {'index': 2, 'name': 'some'}]}, 'nomask': True, 'size': 16}, 'timestamping': {'bits': {'bit': [{'index': 0, 'name': 'hardware-transmit'}, {'index': 2, 'name': 'hardware-receive'}, {'index': 6, 'name': 'hardware-raw-clock'}]}, 'nomask': True, 'size': 17}, 'tx-types': {'bits': {'bit': [{'index': 0, 'name': 'off'}, {'index': 1, 'name': 'on'}]}, 'nomask': True, 'size': 4}}, {'header': {'dev-index': 3, 'dev-name': 'eth0'}, 'hwtst-provider': {'index': 2, 'qualifier': 0}, 'phc-index': 2, 'rx-filters': {'bits': {'bit': [{'index': 0, 'name': 'none'}, {'index': 1, 'name': 'all'}]}, 'nomask': True, 'size': 16}, 'timestamping': {'bits': {'bit': [{'index': 0, 'name': 'hardware-transmit'}, {'index': 1, 'name': 'software-transmit'}, {'index': 2, 'name': 'hardware-receive'}, {'index': 3, 'name': 'software-receive'}, {'index': 4, 'name': 'software-system-clock'}, {'index': 6, 'name': 'hardware-raw-clock'}]}, 'nomask': True, 'size': 17}, 'tx-types': {'bits': {'bit': [{'index': 0, 'name': 'off'}, {'index': 1, 'name': 'on'}, {'index': 2, 'name': 'onestep-sync'}]}, 'nomask': True, 'size': 4}}] ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do tsinfo-get --json '{"header":{"dev-name":"eth0"}, "hwtst-provider":{"index":0, "qualifier":0 } }' {'header': {'dev-index': 3, 'dev-name': 'eth0'}, 'hwtst-provider': {'index': 0, 'qualifier': 0}, 'phc-index': 0, 'rx-filters': {'bits': {'bit': [{'index': 0, 'name': 'none'}, {'index': 2, 'name': 'some'}]}, 'nomask': True, 'size': 16}, 'timestamping': {'bits': {'bit': [{'index': 0, 'name': 'hardware-transmit'}, {'index': 2, 'name': 'hardware-receive'}, {'index': 6, 'name': 'hardware-raw-clock'}]}, 'nomask': True, 'size': 17}, 'tx-types': {'bits': {'bit': [{'index': 0, 'name': 'off'}, {'index': 1, 'name': 'on'}]}, 'nomask': True, 'size': 4}} ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do tsinfo-set --json '{"header":{"dev-name":"eth0"}, "hwtst-provider":{"index":2, "qualifier":0}}' None ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do tsconfig-get --json '{"header":{"dev-name":"eth0"}}' {'header': {'dev-index': 3, 'dev-name': 'eth0'}, 'hwtstamp-flags': 1, 'hwtstamp-provider': {'index': 1, 'qualifier': 0}, 'rx-filters': {'bits': {'bit': [{'index': 12, 'name': 'ptpv2-event'}]}, 'nomask': True, 'size': 16}, 'tx-types': {'bits': {'bit': [{'index': 1, 'name': 'on'}]}, 'nomask': True, 'size': 4}} ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do tsconfig-set --json '{"header":{"dev-name":"eth0"}, "hwtstamp-provider":{"index":1, "qualifier":0 }, "rx-filters":{"bits": {"bit": {"name":"ptpv2-l4-event"}}, "nomask": 1}, "tx-types":{"bits": {"bit": {"name":"on"}}, "nomask": 1}}' {'header': {'dev-index': 3, 'dev-name': 'eth0'}, 'hwtstamp-flags': 1, 'hwtstamp-provider': {'index': 1, 'qualifier': 0}, 'rx-filters': {'bits': {'bit': [{'index': 12, 'name': 'ptpv2-event'}]}, 'nomask': True, 'size': 16}, 'tx-types': {'bits': {'bit': [{'index': 1, 'name': 'on'}]}, 'nomask': True, 'size': 4}} Changes in v21: - NIT fixes. - Link to v20: https://lore.kernel.org/r/20241204-feature_ptp_netnext-v20-0-9bd99dc8a867@bootlin.com Changes in v20: - Change hwtstamp provider design to avoid saving "user" (phy or net) in the ptp clock structure. - Link to v19: https://lore.kernel.org/r/20241030-feature_ptp_netnext-v19-0-94f8aadc9d5c@bootlin.com Changes in v19: - Rebase on net-next - Link to v18: https://lore.kernel.org/r/20241023-feature_ptp_netnext-v18-0-ed948f3b6887@bootlin.com Changes in v18: - Few changes in the tsconfig-set ethtool command. - Add tsconfig-set-reply ethtool netlink socket. - Add missing netlink tsconfig documentation - Link to v17: https://lore.kernel.org/r/20240709-feature_ptp_netnext-v17-0-b5317f50df2a@bootlin.com Changes in v17: - Fix a documentation nit. - Add a missing kernel_ethtool_tsinfo update from a new MAC driver. - Link to v16: https://lore.kernel.org/r/20240705-feature_ptp_netnext-v16-0-5d7153914052@bootlin.com Changes in v16: - Add a new patch to separate tsinfo into a new tsconfig command to get and set the hwtstamp config. - Used call_rcu() instead of synchronize_rcu() to free the hwtstamp_provider - Moved net core changes of patch 12 directly to patch 8. - Link to v15: https://lore.kernel.org/r/20240612-feature_ptp_netnext-v15-0-b2a086257b63@bootlin.com Changes in v15: - Fix uninitialized ethtool_ts_info structure. - Link to v14: https://lore.kernel.org/r/20240604-feature_ptp_netnext-v14-0-77b6f6efea40@bootlin.com Changes in v14: - Add back an EXPORT_SYMBOL() missing. - Link to v13: https://lore.kernel.org/r/20240529-feature_ptp_netnext-v13-0-6eda4d40fa4f@bootlin.com Changes in v13: - Add PTP builtin code to fix build errors when building PTP as a module. - Fix error spotted by smatch and sparse. - Link to v12: https://lore.kernel.org/r/20240430-feature_ptp_netnext-v12-0-2c5f24b6a914@bootlin.com Changes in v12: - Add missing return description in the kdoc. - Fix few nit. - Link to v11: https://lore.kernel.org/r/20240422-feature_ptp_netnext-v11-0-f14441f2a1d8@bootlin.com Changes in v11: - Add netlink examples. - Remove a change of my out of tree marvell_ptp patch in the patch series. - Remove useless extern. - Link to v10: https://lore.kernel.org/r/20240409-feature_ptp_netnext-v10-0-0fa2ea5c89a9@bootlin.com Changes in v10: - Move declarations to net/core/dev.h instead of netdevice.h - Add netlink documentation. - Add ETHTOOL_A_TSINFO_GHWTSTAMP netlink attributes instead of a bit in ETHTOOL_A_TSINFO_TIMESTAMPING bitset. - Send "Move from simple ida to xarray" patch standalone. - Add tsinfo ntf command. - Add rcu_lock protection mechanism to avoid memory leak. - Fixed doc and kdoc issue. - Link to v9: https://lore.kernel.org/r/20240226-feature_ptp_netnext-v9-0-455611549f21@bootlin.com Changes in v9: - Remove the RFC prefix. - Correct few NIT fixes. - Link to v8: https://lore.kernel.org/r/20240216-feature_ptp_netnext-v8-0-510f42f444fb@bootlin.com Changes in v8: - Drop the 6 first patch as they are now merged. - Change the full implementation to not be based on the hwtstamp layer (MAC/PHY) but on the hwtstamp provider which mean a ptp clock and a phc qualifier. - Made some patch to prepare the new implementation. - Expand netlink tsinfo instead of a new ts command for new hwtstamp configuration uAPI and for dumping tsinfo of specific hwtstamp provider. - Link to v7: https://lore.kernel.org/r/20231114-feature_ptp_netnext-v7-0-472e77951e40@bootlin.com Changes in v7: - Fix a temporary build error. - Link to v6: https://lore.kernel.org/r/20231019-feature_ptp_netnext-v6-0-71affc27b0e5@bootlin.com Changes in v6: - Few fixes from the reviews. - Replace the allowlist to default_timestamp flag to know which phy is using old API behavior. - Rename the timestamping layer enum values. - Move to a simple enum instead of the mix between enum and bitfield. - Update ts_info and ts-set in software timestamping case. Changes in v5: - Update to ndo_hwstamp_get/set. This bring several new patches. - Add few patches to make the glue. - Convert macb to ndo_hwstamp_get/set. - Add netlink specs description of new ethtool commands. - Removed netdev notifier. - Split the patches that expose the timestamping to userspace to separate the core and ethtool development. - Add description of software timestamping. - Convert PHYs hwtstamp callback to use kernel_hwtstamp_config. Changes in v4: - Move on to ethtool netlink instead of ioctl. - Add a netdev notifier to allow packet trapping by the MAC in case of PHY time stamping. - Add a PHY whitelist to not break the old PHY default time-stamping preference API. Changes in v3: - Expose the PTP choice to ethtool instead of sysfs. You can test it with the ethtool source on branch feature_ptp of: https://github.com/kmaincent/ethtool - Added a devicetree binding to select the preferred timestamp. Changes in v2: - Move selected_timestamping_layer variable of the concerned patch. - Use sysfs_streq instead of strmcmp. - Use the PHY timestamp only if available. ==================== Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit 6e9e2eed4f39d52edf5fd006409d211facf49f6b Author: Kory Maincent <kory.maincent@bootlin.com> Date: Thu Dec 12 18:06:45 2024 +0100 net: ethtool: Add support for tsconfig command to get/set hwtstamp config Introduce support for ETHTOOL_MSG_TSCONFIG_GET/SET ethtool netlink socket to read and configure hwtstamp configuration of a PHC provider. Note that simultaneous hwtstamp isn't supported; configuring a new one disables the previous setting. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> Documentation/netlink/specs/ethtool.yaml | 56 ++++ Documentation/networking/ethtool-netlink.rst | 75 +++++ Documentation/networking/timestamping.rst | 38 ++- include/uapi/linux/ethtool_netlink_generated.h | 16 + net/ethtool/Makefile | 2 +- net/ethtool/common.c | 27 +- net/ethtool/common.h | 2 +- net/ethtool/netlink.c | 18 + net/ethtool/netlink.h | 3 + net/ethtool/tsconfig.c | 444 +++++++++++++++++++++++++ 10 files changed, 655 insertions(+), 26 deletions(-) commit b9e3f7dc9ed95daeb83cfa45b821cacaa01aa906 Author: Kory Maincent <kory.maincent@bootlin.com> Date: Thu Dec 12 18:06:44 2024 +0100 net: ethtool: tsinfo: Enhance tsinfo to support several hwtstamp by net topology Either the MAC or the PHY can provide hwtstamp, so we should be able to read the tsinfo for any hwtstamp provider. Enhance 'get' command to retrieve tsinfo of hwtstamp providers within a network topology. Add support for a specific dump command to retrieve all hwtstamp providers within the network topology, with added functionality for filtered dump to target a single interface. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> Documentation/netlink/specs/ethtool.yaml | 20 ++ Documentation/networking/ethtool-netlink.rst | 7 +- include/linux/ethtool.h | 4 + include/uapi/linux/ethtool_netlink_generated.h | 10 + net/ethtool/common.c | 141 +++++++++- net/ethtool/common.h | 13 + net/ethtool/netlink.c | 6 +- net/ethtool/netlink.h | 5 +- net/ethtool/ts.h | 20 ++ net/ethtool/tsinfo.c | 358 ++++++++++++++++++++++++- 10 files changed, 563 insertions(+), 21 deletions(-) commit 35f7cad1743e04bf2944a2aadb6b6a42adc57bca Author: Kory Maincent <kory.maincent@bootlin.com> Date: Thu Dec 12 18:06:43 2024 +0100 net: Add the possibility to support a selected hwtstamp in netdevice Introduce the description of a hwtstamp provider, mainly defined with a the hwtstamp source and the phydev pointer. Add a hwtstamp provider description within the netdev structure to allow saving the hwtstamp we want to use. This prepares for future support of an ethtool netlink command to select the desired hwtstamp provider. By default, the old API that does not support hwtstamp selectability is used, meaning the hwtstamp provider pointer is unset. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/phy/phy_device.c | 10 ++++++++ include/linux/net_tstamp.h | 29 +++++++++++++++++++++++ include/linux/netdevice.h | 4 ++++ include/uapi/linux/net_tstamp.h | 11 +++++++++ net/core/dev_ioctl.c | 41 ++++++++++++++++++++++++++++++-- net/core/timestamping.c | 52 +++++++++++++++++++++++++++++++++++++---- 6 files changed, 140 insertions(+), 7 deletions(-) commit b18fe47c0c093cc429f7e4d7694fdf0fc362aaf5 Author: Kory Maincent <kory.maincent@bootlin.com> Date: Thu Dec 12 18:06:42 2024 +0100 net: Make net_hwtstamp_validate accessible Make the net_hwtstamp_validate function accessible in prevision to use it from ethtool to validate the hwtstamp configuration before setting it. Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/core/dev.h | 1 + net/core/dev_ioctl.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 5e51e50e2324c9374d06ab05e3d7d09123e1114f Author: Kory Maincent <kory.maincent@bootlin.com> Date: Thu Dec 12 18:06:41 2024 +0100 net: Make dev_get_hwtstamp_phylib accessible Make the dev_get_hwtstamp_phylib function accessible in prevision to use it from ethtool to read the hwtstamp current configuration. Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/core/dev.h | 2 ++ net/core/dev_ioctl.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit da3e3186ef138177592f43a199adacd349c983fb Merge: 92c932b9946c 555f0edb9ff0 Author: David S. Miller <davem@davemloft.net> Date: Mon Dec 16 12:47:30 2024 +0000 Merge branch 'tls1.3-key-updates' Sabrina Dubroca says: ==================== tls: implement key updates for TLS1.3 This adds support for receiving KeyUpdate messages (RFC 8446, 4.6.3 [1]). A sender transmits a KeyUpdate message and then changes its TX key. The receiver should react by updating its RX key before processing the next message. This patchset implements key updates by: 1. pausing decryption when a KeyUpdate message is received, to avoid attempting to use the old key to decrypt a record encrypted with the new key 2. returning -EKEYEXPIRED to syscalls that cannot receive the KeyUpdate message, until the rekey has been performed by userspace 3. passing the KeyUpdate message to userspace as a control message 4. allowing updates of the crypto_info via the TLS_TX/TLS_RX setsockopts This API has been tested with gnutls to make sure that it allows userspace libraries to implement key updates [2]. Thanks to Frantisek Krenzelok <fkrenzel@redhat.com> for providing the implementation in gnutls and testing the kernel patches. ======================================================================= Discussions around v2 of this patchset focused on how HW offload would interact with rekey. RX - The existing SW path will handle all records between the KeyUpdate message signaling the change of key and the new key becoming known to the kernel -- those will be queued encrypted, and decrypted in SW as they are read by userspace (once the key is provided, ie same as this patchset) - Call ->tls_dev_del + ->tls_dev_add immediately during setsockopt(TLS_RX) TX - After setsockopt(TLS_TX), switch to the existing SW path (not the current device_fallback) until we're able to re-enable HW offload - tls_device_sendmsg will call into tls_sw_sendmsg under lock_sock to avoid changing socket ops during the rekey while another thread might be waiting on the lock - We only re-enable HW offload (call ->tls_dev_add to install the new key in HW) once all records sent with the old key have been ACKed. At this point, all unacked records are SW-encrypted with the new key, and the old key is unused by both HW and retransmissions. - If there are no unacked records when userspace does setsockopt(TLS_TX), we can (try to) install the new key in HW immediately. - If yet another key has been provided via setsockopt(TLS_TX), we don't install intermediate keys, only the latest. - TCP notifies ktls of ACKs via the icsk_clean_acked callback. In case of a rekey, tls_icsk_clean_acked will record when all data sent with the most recent past key has been sent. The next call to sendmsg will install the new key in HW. - We close and push the current SW record before reenabling offload. If ->tls_dev_add fails to install the new key in HW, we stay in SW mode. We can add a counter to keep track of this. In addition: Because we can't change socket ops during a rekey, we'll also have to modify do_tls_setsockopt_conf to check ctx->tx_conf and only call either tls_set_device_offload or tls_set_sw_offload. RX already uses the same ops for both TLS_HW and TLS_SW, so we could switch between HW and SW mode on rekey. An alternative would be to have a common sendmsg which locks the socket and then calls the correct implementation. We'll need that anyway for the offload under rekey case, so that would only add a test to the SW path's ops (compared to the current code). That should allow us to simplify build_protos a bit, but might have a performance impact - we'll need to check it if we want to go that route. ======================================================================= Changes since v4: - add counter for received KeyUpdate messages - improve wording in the documentation - improve handling of bogus messages when looking for KeyUpdate's - some coding style clean ups Changes since v3: - rebase on top of net-next - rework tls_check_pending_rekey according to Jakub's feedback - add statistics for rekey: {RX,TX}REKEY{OK,ERROR} - some coding style clean ups ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 555f0edb9ff043196655a5b7cc65f67dfd05b530 Author: Sabrina Dubroca <sd@queasysnail.net> Date: Thu Dec 12 16:36:09 2024 +0100 selftests: tls: add rekey tests Test the kernel's ability to: - update the key (but not the version or cipher), only for TLS1.3 - pause decryption after receiving a KeyUpdate message, until a new RX key has been provided - reflect the pause/non-readable socket in poll() Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net> tools/testing/selftests/net/tls.c | 458 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 458 insertions(+) commit b2e584aa3c710802600b690f34a56fb526aebf2f Author: Sabrina Dubroca <sd@queasysnail.net> Date: Thu Dec 12 16:36:08 2024 +0100 selftests: tls: add key_generation argument to tls_crypto_info_init This allows us to generate different keys, so that we can test that rekey is using the correct one. Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net> tools/testing/selftests/net/tls.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 5aa97a43d042fffa8bd0f0bc2723f3574310686e Author: Sabrina Dubroca <sd@queasysnail.net> Date: Thu Dec 12 16:36:07 2024 +0100 docs: tls: document TLS1.3 key updates Document the kernel's behavior and userspace expectations. Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net> Documentation/networking/tls.rst | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 510128b30f2db1600172e9aaec44f66db3c16e15 Author: Sabrina Dubroca <sd@queasysnail.net> Date: Thu Dec 12 16:36:06 2024 +0100 tls: add counters for rekey This introduces 5 counters to keep track of key updates: Tls{Rx,Tx}Rekey{Ok,Error} and TlsRxRekeyReceived. Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net> include/uapi/linux/snmp.h | 5 +++++ net/tls/tls_main.c | 27 ++++++++++++++++++++++----- net/tls/tls_proc.c | 5 +++++ net/tls/tls_sw.c | 6 ++++-- 4 files changed, 36 insertions(+), 7 deletions(-) commit 47069594e67e882ec5c1d8d374f6aab037511509 Author: Sabrina Dubroca <sd@queasysnail.net> Date: Thu Dec 12 16:36:05 2024 +0100 tls: implement rekey for TLS1.3 This adds the possibility to change the key and IV when using TLS1.3. Changing the cipher or TLS version is not supported. Once we have updated the RX key, we can unblock the receive side. If the rekey fails, the context is unmodified and userspace is free to retry the update or close the socket. This change only affects tls_sw, since 1.3 offload isn't supported. Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Acked-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> net/tls/tls.h | 3 +- net/tls/tls_device.c | 2 +- net/tls/tls_main.c | 46 ++++++++++++++++------ net/tls/tls_sw.c | 105 ++++++++++++++++++++++++++++++++++----------------- 4 files changed, 108 insertions(+), 48 deletions(-) commit 0471b1093e3a5d702ba2bf5987c35ee0e2336855 Author: Sabrina Dubroca <sd@queasysnail.net> Date: Thu Dec 12 16:36:04 2024 +0100 tls: block decryption when a rekey is pending When a TLS handshake record carrying a KeyUpdate message is received, all subsequent records will be encrypted with a new key. We need to stop decrypting incoming records with the old key, and wait until userspace provides a new key. Make a note of this in the RX context just after decrypting that record, and stop recvmsg/splice calls with EKEYEXPIRED until the new key is available. key_update_pending can't be combined with the existing bitfield, because we will read it locklessly in ->poll. Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/tls.h | 3 +++ net/tls/tls_sw.c | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) commit cda06412c06893a6f07a2fbf89d42a0972ec9e8e Author: Nirmoy Das <nirmoy.das@intel.com> Date: Fri Dec 13 13:24:15 2024 +0100 drm/xe: Wait for migration job before unmapping pages Fix a potential GPU page fault during tt -> system moves by waiting for migration jobs to complete before unmapping SG. This ensures that IOMMU mappings are not prematurely torn down while a migration job is still in progress. v2: Use intr=false(Matt A) v3: Update commit message(Matt A) v4: s/DMA_RESV_USAGE_BOOKKEEP/DMA_RESV_USAGE_KERNEL(Thomas) Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3466 Fixes: 75521e8b56e8 ("drm/xe: Perform dma_map when moving system buffer objects to TT") Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: stable@vger.kernel.org # v6.11+ Cc: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213122415.3880017-2-nirmoy.das@intel.com Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> drivers/gpu/drm/xe/xe_bo.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit dc5e20ae1f8a7c354dc9833faa2720254e5a5443 Author: Nirmoy Das <nirmoy.das@intel.com> Date: Fri Dec 13 13:24:14 2024 +0100 drm/xe: Use non-interruptible wait when moving BO to system Ensure a non-interruptible wait is used when moving a bo to XE_PL_SYSTEM. This prevents dma_mappings from being removed prematurely while a GPU job is still in progress, even if the CPU receives a signal during the operation. Fixes: 75521e8b56e8 ("drm/xe: Perform dma_map when moving system buffer objects to TT") Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: stable@vger.kernel.org # v6.11+ Suggested-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213122415.3880017-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> drivers/gpu/drm/xe/xe_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5725bce709db1c001140d79398581e067e28c031 Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Thu Dec 12 01:57:55 2024 +0000 ASoC: simple-card-utils: Unify clock direction by clk_direction Original sample-card assumes SND_SOC_CLOCK_IN is used for snd_soc_dai_set_sysclk(), but someday, Codec uses SND_SOC_CLOCK_IN and CPU uses SND_SOC_CLOCK_OUT at hw_params(), and dai->clk_direction is used at simple_init_dai(). There is no uniformity today. Let's use dai->clk_direction for all cases. Fortunately, almost all DAI doesn't care about "dir" (= SND_SOC_CLOCK_IN/OUT) in .set_sysclk callback function (which is called in snd_soc_dai_set_sysclk()), so this patch has no effect in such DAIs. But this patch might breaks some existing Sound Card. Use "system-clock-direction-out" property if it needs to use SND_SOC_CLOCK_OUT Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87y10lu0gx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/generic/simple-card-utils.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 301c26a018acb94dd537a4418cefa0f654500c6f Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Fri Dec 13 01:21:10 2024 +0000 ASoC: soc-pcm: don't use soc_pcm_ret() on .prepare callback commit 1f5664351410 ("ASoC: lower "no backend DAIs enabled for ... Port" log severity") ignores -EINVAL error message on common soc_pcm_ret(). It is used from many functions, ignoring -EINVAL is over-kill. The reason why -EINVAL was ignored was it really should only be used upon invalid parameters coming from userspace and in that case we don't want to log an error since we do not want to give userspace a way to do a denial-of-service attack on the syslog / diskspace. So don't use soc_pcm_ret() on .prepare callback is better idea. Link: https://lore.kernel.org/r/87v7vptzap.wl-kuninori.morimoto.gx@renesas.com Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87bjxg8jju.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/soc-pcm.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit 539a3f0c99cf62c61edc37a8f88e3073119ae852 Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Mon Dec 16 10:55:20 2024 +0000 firmware: cs_dsp: Fix kerneldoc typos in cs_dsp_mock_bin.c Fix two places in kerneldoc where alg_id had been mistyped as alg_ig. Fixes: 7c052c661529 ("firmware: cs_dsp: Add mock bin file generator for KUnit testing") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412142205.HHHcousT-lkp@intel.com/ Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241216105520.22135-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/test/cs_dsp_mock_bin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit abf594ce914172e3bb640d02fc6e79569fa25b8e Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Thu Dec 12 02:13:13 2024 +0000 ASoC: soc-core: tidyup ret handling for card->disable_route_checks commit a22ae72b86a4 ("ASoC: soc-core: disable route checks for legacy devices") added card->disable_route_checks to disable route checks for legacy devices at soc_probe_component() and snd_soc_bind_card(). And commit 6974857c2b2c ("ASoC: topology: Do not ignore route checks when parsing graphs") tidyup soc-topology for same reason. In snd_soc_bind_card() case, if snd_soc_dapm_add_routes() (A) error, but has card->disable_route_checks case (B), it will indicate dev_info() only, and then, next function (C) will be called. Thus, "ret" will be over written, and it is handled as non-error. static int snd_soc_bind_card(...) { ... (A) ret = snd_soc_dapm_add_routes(...); if (ret < 0) { (B) if (card->disable_route_checks) { dev_info(...); } else { ... goto probe_end; } } (C) ret = snd_soc_dapm_add_routes(...); ... In soc_probe_component() case, if snd_soc_dapm_add_routes() (a) error, and has card->disable_route_checks case (b), it will indicate dev_info(). But there is no next function after that, this means ret is still indicating error, and will not be over written. So error handline (c) will be handled, and will return error (d) static int soc_probe_component(...) { ... (a) ret = snd_soc_dapm_add_routes(...); if (ret < 0) { (b) if (card->disable_route_checks) { dev_info(...); } else { ... goto err_probe; } } /* see for_each_card_components */ list_add(...); err_probe: (c) if (ret < 0) soc_remove_component(...); (d) return ret; } In soc_tplg_dapm_graph_elems_load() case, snd_soc_dapm_add_routes() is called in for loop (1). if it was error (2), and doesn't have card->disable_route_checks case flag (3), it will break from loop. If card has flag, it will indicate dev_info() and handled as non-error. But ret is still indicating error in this case. If this error happen in last of loop, if will return error (4). static int soc_tplg_dapm_graph_elems_load(...) { ... (1) for (i = 0; i < count; i++) { ... (2) ret = snd_soc_dapm_add_routes(...); if (ret) { (3) if (!dapm->card->disable_route_checks) { dev_err(...); break; } dev_info(...); } } (4) return ret; } This patch set "ret = 0" for each case. Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Cc: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87wmg5tzra.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/soc-core.c | 2 ++ sound/soc/soc-topology.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) commit 6dcc8e7f2bb7b748d75844631b2bae860648202a Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Mon Dec 16 11:27:21 2024 +0800 ASoC: Intel: mtl-match: Add CDB35L56-EIGHT-C 8x CS35L56 without CS42L43 This adds a match entry for using all the amps on a CDB35L56-EIGHT-C board without the CS42L43 codec. Configuration is: SDW0: 4x CS35L56 (OUT1, OUT2, OUT3, OUT4) SDW1: 4x CS35L56 (OUT5, OUT6, OUT7, OUT8) Speaker playback and amp feedback are aggregated. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20241216032721.131227-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/common/soc-acpi-intel-mtl-match.c | 134 ++++++++++++++++++++++ 1 file changed, 134 insertions(+) commit bc7bd5c335030858216581e7a591d02ebfdb53e7 Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Mon Dec 16 11:27:20 2024 +0800 ASoC: Intel: mtl-match: Add CDB35L56-EIGHT-C with aggregated speakers This adds a match for the CDB35L56-EIGHT-C board with SmartCodec and SmartAmp speakers aggregated. The configuration is: SDW0: CS35L56 x2 (SmartAmp) using OUT1 and OUT2 SDW1: CS35L56 x2 (SmartAmp) using OUT7 and OUT8 SDW3: CS42L43 (SmartJack, SmartMic, SmartAmp) CS35L56 and CS42L43 Speaker playback is aggregated across all 3 buses. The device addresses and reset arrangements of the EIGHT-C board are quirky hence the use of non-contiguous outputs OUT1,2,7,8. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20241216032721.131227-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/common/soc-acpi-intel-mtl-match.c | 79 +++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit bf4519f4b1e1fa6286af5d331146238ddc580ea6 Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Mon Dec 16 11:27:19 2024 +0800 ASoC: Intel: tgl-match: Add entries for CS35L56 on CDB35L56-EIGHT-C This adds match entries for the eight CS35L56 amps on the Cirrus Logic CDB35L56-EIGHT-C board. Speaker playback and amp feedback are aggregated across all amps on both SoundWire buses. The mapping of SoundWire addresses to AMPn numbers matches the actual order of amps on the EIGHT-C board. The SoundWire unique ID is in reverse order for amps 1..4 on these boards, and the amp resets are paired 1+8, 2+7, 3+6, 4+5. This then makes the entries from cs35l56_sdw_eight_1_4_fb_adr and cs35l56_sdw_eight_5_8_fb_adr match the way the amp resets are paired on the EIGHT-C board. [0] = 1 + 8 [1] = 2 + 7 [3] = 3 + 6 [4] = 4 + 5 Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20241216032721.131227-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/common/soc-acpi-intel-tgl-match.c | 194 ++++++++++++++++++++++ 1 file changed, 194 insertions(+) commit 0161e2d6950fe66cf6ac1c10d945bae971f33667 Author: John Ogness <john.ogness@linutronix.de> Date: Mon Dec 9 12:23:46 2024 +0106 printk: Defer legacy printing when holding printk_cpu_sync The documentation of printk_cpu_sync_get() clearly states that the owner must never perform any activities where it waits for a CPU. For legacy printing there can be spinning on the console_lock and on the port lock. Therefore legacy printing must be deferred when holding the printk_cpu_sync. Note that in the case of emergency states, atomic consoles are not prevented from printing when printk is deferred. This is appropriate because they do not spin-wait indefinitely for other CPUs. Reported-by: Rik van Riel <riel@surriel.com> Closes: https://lore.kernel.org/r/20240715232052.73eb7fb1@imladris.surriel.com Signed-off-by: John Ogness <john.ogness@linutronix.de> Fixes: 55d6af1d6688 ("lib/nmi_backtrace: explicitly serialize banner and regs") Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20241209111746.192559-3-john.ogness@linutronix.de Signed-off-by: Petr Mladek <pmladek@suse.com> kernel/printk/internal.h | 6 ++++++ kernel/printk/printk.c | 5 +++++ kernel/printk/printk_safe.c | 7 ++++++- 3 files changed, 17 insertions(+), 1 deletion(-) commit f1c21cf470595c4561d4671fd499af94152175d5 Author: John Ogness <john.ogness@linutronix.de> Date: Mon Dec 9 12:23:45 2024 +0106 printk: Remove redundant deferred check in vprintk() The helper printk_get_console_flush_type() is already calling is_printk_legacy_deferred() to determine if legacy printing is to be offloaded. Therefore there is no need for vprintk() to perform this check as well. Remove the redundant check from vprintk(). Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20241209111746.192559-2-john.ogness@linutronix.de Signed-off-by: Petr Mladek <pmladek@suse.com> kernel/printk/printk_safe.c | 9 --------- 1 file changed, 9 deletions(-) commit 2db03b5c01338be8a5adef42617190a0bb921e75 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Dec 13 13:51:11 2024 +0200 drm/i915: move DDI_CLK_VALFREQ next to other Cx0 PHY registers Relocate DDI_CLK_VALFREQ register definition next to other Cx0 PHY register macros. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213115111.335474-3-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_cx0_phy_regs.h | 5 +++++ drivers/gpu/drm/i915/i915_reg.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) commit 4821e26ab8f5927094e7c3936f757cbba0d784c7 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Dec 13 13:51:10 2024 +0200 drm/i915: relocate _VGA_MSR_WRITE register definition Move _VGA_MSR_WRITE to intel_crt_regs.h. It's not necessarily the optimal place for it, but hands down better than i915_reg.h. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213115111.335474-2-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_crt_regs.h | 2 ++ drivers/gpu/drm/i915/i915_reg.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit aea0ec7e260e80da234a7f013aa36af7212f910f Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Dec 13 13:51:09 2024 +0200 drm/i915: split out i9xx_wm_regs.h Very few files need the i9xx watermark related registers. Split them out to a dedicated file. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213115111.335474-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/i9xx_display_sr.c | 1 + drivers/gpu/drm/i915/display/i9xx_wm.c | 1 + drivers/gpu/drm/i915/display/i9xx_wm_regs.h | 257 +++++++++++++++++++++ .../gpu/drm/i915/display/intel_display_debugfs.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 248 -------------------- drivers/gpu/drm/i915/intel_gvt_mmio_table.c | 1 + 6 files changed, 261 insertions(+), 248 deletions(-) commit 3df7546fc03b8f004eee0b9e3256369f7d096685 Author: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Date: Mon Dec 16 19:38:40 2024 +0900 tomoyo: don't emit warning in tomoyo_write_control() syzbot is reporting too large allocation warning at tomoyo_write_control(), for one can write a very very long line without new line character. To fix this warning, I use __GFP_NOWARN rather than checking for KMALLOC_MAX_SIZE, for practically a valid line should be always shorter than 32KB where the "too small to fail" memory-allocation rule applies. One might try to write a valid line that is longer than 32KB, but such request will likely fail with -ENOMEM. Therefore, I feel that separately returning -EINVAL when a line is longer than KMALLOC_MAX_SIZE is redundant. There is no need to distinguish over-32KB and over-KMALLOC_MAX_SIZE. Reported-by: syzbot+7536f77535e5210a5c76@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=7536f77535e5210a5c76 Reported-by: Leo Stone <leocstone@gmail.com> Closes: https://lkml.kernel.org/r/20241216021459.178759-2-leocstone@gmail.com Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> security/tomoyo/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67a615c5cb6dc33ed35492dc0d67e496cbe8de68 Author: Karol Przybylski <karprzy7@gmail.com> Date: Sun Dec 15 13:53:55 2024 +0100 drm: zynqmp_dp: Fix integer overflow in zynqmp_dp_rate_get() This patch fixes a potential integer overflow in the zynqmp_dp_rate_get() The issue comes up when the expression drm_dp_bw_code_to_link_rate(dp->test.bw_code) * 10000 is evaluated using 32-bit Now the constant is a compatible 64-bit type. Resolves coverity issues: CID 1636340 and CID 1635811 Cc: stable@vger.kernel.org Fixes: 28edaacb821c ("drm: zynqmp_dp: Add debugfs interface for compliance testing") Signed-off-by: Karol Przybylski <karprzy7@gmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/stable/20241212095057.1015146-1-karprzy7%40gmail.com Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241215125355.938953-1-karprzy7@gmail.com drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7177ecdd2b73de4e19a02794d29e6c5f06728ab Author: Drew Fustini <drew@pdp7.com> Date: Sun Dec 15 16:31:15 2024 -0800 riscv: defconfig: enable pinctrl and dwmac support for TH1520 Enable pinctrl and ethernet dwmac driver for the TH1520 SoC boards like the BeagleV Ahead and the Sipeed LicheePi 4A. Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Signed-off-by: Drew Fustini <drew@pdp7.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com> arch/riscv/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 83a9752729c455a6bd9b7cf62198506180691931 Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Thu Dec 12 18:36:30 2024 +0000 dt-bindings: gpio: brcmstb: permit gpio-line-names property gpio-line-names is a generic property that can be supported by any GPIO controller, so permit it through the binding. It is permitted to have a variable number of GPIOs per node based on brcm,gpio-bank-widths, so define an arbitrary maximum number of items based on current users. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241212-dt-bcm2712-fixes-v3-3-44a7f3390331@raspberrypi.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 2251fbd05f2357927fa5c5a8dd955f84da883008 Author: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Date: Thu Dec 12 15:08:09 2024 +0100 gpio: tqmx86: add support for changing GPIO directions Only GPIOs 4..7 have IRQ support on the TQMx86 variants currently handled by the driver, but apart from that, changing directions works fine. The default directions are left unchanged (0..3 output, 4..7 input) to match the COM Express specification. A tqmx86_gpio_set() variant without locking is introduced as a new helper. Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Link: https://lore.kernel.org/r/d89da2f0e13fa6c8ec3f9076eed242133a1e3a63.1734001247.git.matthias.schiffer@ew.tq-group.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> drivers/gpio/gpio-tqmx86.c | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) commit a1389f5c128e80c8ad3132bbdc7b5061f3710b7f Author: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Date: Thu Dec 12 15:08:08 2024 +0100 gpio: tqmx86: introduce tqmx86_gpio_clrsetbits() helper Add a helper for the common read-modify-write pattern (only used in tqmx86_gpio_irq_config() initially). No functional change intended. Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Link: https://lore.kernel.org/r/f60ec3cc1386d4527ebb864d1b069683473b7a5a.1734001247.git.matthias.schiffer@ew.tq-group.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> drivers/gpio/gpio-tqmx86.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 2abb6e53b5b08987265946b258ca29762091930c Author: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Date: Thu Dec 12 15:08:07 2024 +0100 gpio: tqmx86: use cleanup guards for spinlock As we're touching this code anyways, go all the way and fully replace lock/unlock with guard and scoped_guard. No functional change intended. Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Link: https://lore.kernel.org/r/c89e7814ce5705e516116d0b86146d8455aaeddc.1734001247.git.matthias.schiffer@ew.tq-group.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> drivers/gpio/gpio-tqmx86.c | 84 +++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 42 deletions(-) commit 0ccf314304ed5b83df7470a8ed0fe1b6ed48fc03 Author: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Date: Thu Dec 12 15:08:06 2024 +0100 gpio: tqmx86: consistently refer to IRQs by hwirq numbers On currently supported variants of the TQMx86 GPIO controller, only GPIOs 4-7 have IRQ support; in the interrupt status and config registers, position 0 therefore corresponds to GPIO 4, position 1 to GPIO 5, etc. This was made even more confusing by sometimes using the term "offset" to refer to GPIO numbers (which are equavalent to hwirq numbers), and sometimes to bit positions in the hardware registers. With this change, the whole driver consistently uses hwirq numbers (== GPIO numbers) when referring to the IRQs, and only the two pieces of code that interact with the hardware registers (tqmx86_gpio_irq_config() and tqmx86_gpio_irq_handler()) deal with bit positions. Space for hwirq numbers 0-3 is reserved in the irq_type array, but remains unused for existing (COM Express) TQMx86 variants; support for TQMx86 variants that support IRQs on all GPIO lines will be added in the future. No functional change intended. Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Link: https://lore.kernel.org/r/94b78f4a9500bb71e66c0f7d3b084fec5cfe42ca.1734001247.git.matthias.schiffer@ew.tq-group.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> drivers/gpio/gpio-tqmx86.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 2a485c83787723671b7ad215e4e141315e46b311 Author: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Date: Thu Dec 12 15:08:05 2024 +0100 gpio: tqmx86: add macros for interrupt configuration Consistently use TQMX86_INT_* flags for irq_type values. The TQMX86_GPII_CONFIG macro is used to convert from TQMX86_INT_TRIG_* flags to GPII register values. Bit patterns for TQMX86_INT_* are chosen to make this conversion as simple as possible. No functional change intended. Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Link: https://lore.kernel.org/r/26c01bce589aedb794c19ea7ccd85f6143532e48.1734001247.git.matthias.schiffer@ew.tq-group.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> drivers/gpio/gpio-tqmx86.c | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) commit 34064c8267a61063d684408db6ae78b571a9999d Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Mon Nov 18 14:31:03 2024 +0200 powerpc/8xx: Drop legacy-of-mm-gpiochip.h header Remove legacy-of-mm-gpiochip.h header file. The above mentioned file provides an OF API that's deprecated. There is no agnostic alternatives to it and we have to open code the logic which was hidden behind of_mm_gpiochip_add_data(). Note, most of the GPIO drivers are using their own labeling schemas and resource retrieval that only a few may gain of the code deduplication, so whenever alternative is appear we can move drivers again to use that one. As a side effect this change fixes a potential memory leak on an error path, if of_mm_gpiochip_add_data() fails. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Acked-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241118123254.620519-1-andriy.shevchenko@linux.intel.com arch/powerpc/platforms/8xx/cpm1.c | 119 +++++++++++++++++++------------------- 1 file changed, 60 insertions(+), 59 deletions(-) commit aeb3ec99026979287266e4b5a1194789c1488c1a Author: Rongwei Liu <rongweil@nvidia.com> Date: Fri Dec 13 00:13:20 2024 +0200 net/mlx5: Add device cap abs_native_port_num When the abs_native_port_num is set, the native_port_num reported by the device may not be continuous and bigger than the num_lag_ports. Signed-off-by: Rongwei Liu <rongweil@nvidia.com> Reviewed-by: Shay Drory <shayd@nvidia.com> Reviewed-by: Saeed Mahameed <saeedm@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241212221329.961628-2-tariqt@nvidia.com Signed-off-by: Leon Romanovsky <leon@kernel.org> include/linux/mlx5/mlx5_ifc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0f049da5b0568cafd39706cc87a1b689dcdae8a0 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sun Dec 15 16:19:04 2024 +0100 hwmon: (occ/p9_sbe) Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241215-sysfs-const-bin_attr-hwmon-v1-1-ea72a6a46c36@weissschuh.net Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/occ/p9_sbe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cf85760f6a0a656d06d9e2851fc82baf1240262a Author: Max Ammann <max@maxammann.org> Date: Sat Dec 14 11:22:01 2024 +0100 hwmon: (nct6683) Add customer ID for ASRock B650 Steel Legend WiFi This value was found on an ASRock B650 Steel Legend WiFi with an NCT6686D chip. Signed-off-by: Max Ammann <max@maxammann.org> Link: https://lore.kernel.org/r/20241214102201.122851-1-max@maxammann.org [groeck: htmldocs fix] Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/hwmon/nct6683.rst | 23 ++++++++++++----------- drivers/hwmon/nct6683.c | 3 +++ 2 files changed, 15 insertions(+), 11 deletions(-) commit 012920131013208186ce0ded0ef1c47fa67a70f6 Author: Casey Schaufler <casey@schaufler-ca.com> Date: Fri Dec 6 14:57:13 2024 -0800 binder: initialize lsm_context structure It is possible to reach the end of binder_transaction() without having set lsmctx. As the variable value is checked there it needs to be initialized. Suggested-by: Kees Bakker <kees@ijzerbout.nl> [PM: subj tweak to fit convention] Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: Paul Moore <paul@paul-moore.com> drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ef6fc99e0d922a54073e7b6d6465c62f4d3b62b Author: Thiébaud Weksteen <tweek@google.com> Date: Thu Dec 5 12:21:00 2024 +1100 selinux: add netlink nlmsg_type audit message Add a new audit message type to capture nlmsg-related information. This is similar to LSM_AUDIT_DATA_IOCTL_OP which was added for the other SELinux extended permission (ioctl). Adding a new type is preferred to adding to the existing lsm_network_audit structure which contains irrelevant information for the netlink sockets (i.e., dport, sport). Signed-off-by: Thiébaud Weksteen <tweek@google.com> [PM: change "nlnk-msgtype" to "nl-msgtype" as discussed] Signed-off-by: Paul Moore <paul@paul-moore.com> include/linux/lsm_audit.h | 2 ++ security/lsm_audit.c | 3 +++ security/selinux/hooks.c | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) commit 4670f7bc17dfce649a1877c72643c133ef9055ab Author: Heiko Carstens <hca@linux.ibm.com> Date: Fri Dec 6 14:52:35 2024 +0100 s390/mm/hugetlbfs: Remove huge_pte_none() / huge_pte_none_mostly() Slightly cleanup arch/s390/include/asm/hugetlb.h: - Remove huge_pte_none() / huge_pte_none_mostly() which are identical to the generic variants - Coding style adjustments Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/hugetlb.h | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit 92c932b9946c1e082406aa0515916adb3e662e24 Merge: dcacb364772e 5409fd6fec68 Author: Jakub Kicinski <kuba@kernel.org> Date: Sun Dec 15 14:28:36 2024 -0800 Merge branch 'mptcp-pm-userspace-misc-cleanups' Matthieu Baerts says: ==================== mptcp: pm: userspace: misc cleanups These cleanups lead the way to the unification of the path-manager interfaces, and allow future extensions. The following patches are not linked to each others, but are all related to the userspace path-manager. - Patch 1: add a new helper to reduce duplicated code. - Patch 2: add a macro to iterate over the address list, clearer. - Patch 3: reduce duplicated code to get the corresponding MPTCP socket. - Patch 4: move userspace PM specific code out of the in-kernel one. - Patch 5: pass an entry instead of a list with always one entry. - Patch 6: uniform struct type used for the local addresses. - Patch 7: simplify error handling. ==================== Link: https://patch.msgid.link/20241213-net-next-mptcp-pm-misc-cleanup-v1-0-ddb6d00109a8@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 5409fd6fec680d59111708ba337b09c1d36db0a8 Author: Geliang Tang <geliang@kernel.org> Date: Fri Dec 13 20:52:58 2024 +0100 mptcp: drop useless "err = 0" in subflow_destroy Upon successful return, mptcp_pm_parse_addr() returns 0. There is no need to set "err = 0" after this. So after mptcp_nl_find_ssk() returns, just need to set "err = -ESRCH", then release and free msk socket if it returns NULL. Also, no need to define the variable "subflow" in subflow_destroy(), use mptcp_subflow_ctx(ssk) directly. This patch doesn't change the behaviour of the code, just refactoring. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20241213-net-next-mptcp-pm-misc-cleanup-v1-7-ddb6d00109a8@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/mptcp/pm_userspace.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 1c670b39cec7603893e7d0169578409dccf63e94 Author: Geliang Tang <geliang@kernel.org> Date: Fri Dec 13 20:52:57 2024 +0100 mptcp: change local addr type of subflow_destroy Generally, in the path manager interfaces, the local address is defined as an mptcp_pm_addr_entry type address, while the remote address is defined as an mptcp_addr_info type one: (struct mptcp_pm_addr_entry *local, struct mptcp_addr_info *remote) But subflow_destroy() interface uses two mptcp_addr_info type parameters. This patch changes the first one to mptcp_pm_addr_entry type and use helper mptcp_pm_parse_entry() to parse it instead of using mptcp_pm_parse_addr(). This patch doesn't change the behaviour of the code, just refactoring. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20241213-net-next-mptcp-pm-misc-cleanup-v1-6-ddb6d00109a8@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/mptcp/pm_userspace.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 88d0973163711a5313ddd479a1ff543b5ac93d51 Author: Geliang Tang <geliang@kernel.org> Date: Fri Dec 13 20:52:56 2024 +0100 mptcp: drop free_list for deleting entries mptcp_pm_remove_addrs() actually only deletes one address, which does not match its name. This patch renames it to mptcp_pm_remove_addr_entry() and changes the parameter "rm_list" to "entry". With the help of mptcp_pm_remove_addr_entry(), it's no longer necessary to move the entry to be deleted to free_list and then traverse the list to delete the entry, which is not allowed in BPF. The entry can be directly deleted through list_del_rcu() and sock_kfree_s() now. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20241213-net-next-mptcp-pm-misc-cleanup-v1-5-ddb6d00109a8@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/mptcp/pm_userspace.c | 42 +++++++++++++++--------------------------- net/mptcp/protocol.h | 3 ++- 2 files changed, 17 insertions(+), 28 deletions(-) commit 8008e77e07418a2a43235c2288430602b0d4c8da Author: Geliang Tang <geliang@kernel.org> Date: Fri Dec 13 20:52:55 2024 +0100 mptcp: move mptcp_pm_remove_addrs into pm_userspace Since mptcp_pm_remove_addrs() is only called from the userspace PM, this patch moves it into pm_userspace.c. For this, lookup_subflow_by_saddr() and remove_anno_list_by_saddr() helpers need to be exported in protocol.h. Also add "mptcp_" prefix for these helpers. Here, mptcp_pm_remove_addrs() is not changed to a static function because it will be used in BPF Path Manager. This patch doesn't change the behaviour of the code, just refactoring. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20241213-net-next-mptcp-pm-misc-cleanup-v1-4-ddb6d00109a8@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/mptcp/pm_netlink.c | 46 ++++++++-------------------------------------- net/mptcp/pm_userspace.c | 28 ++++++++++++++++++++++++++++ net/mptcp/protocol.h | 4 ++++ 3 files changed, 40 insertions(+), 38 deletions(-) commit 6a389c8ceeb75cf3c523ebf652a90958267c7b13 Author: Geliang Tang <geliang@kernel.org> Date: Fri Dec 13 20:52:54 2024 +0100 mptcp: add mptcp_userspace_pm_get_sock helper Each userspace pm netlink function uses nla_get_u32() to get the msk token value, then pass it to mptcp_token_get_sock() to get the msk. Finally check whether userspace PM is selected on this msk. It makes sense to wrap them into a helper, named mptcp_userspace_pm_get_sock(), to do this. This patch doesn't change the behaviour of the code, just refactoring. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20241213-net-next-mptcp-pm-misc-cleanup-v1-3-ddb6d00109a8@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/mptcp/pm_userspace.c | 144 ++++++++++++++++------------------------------- 1 file changed, 47 insertions(+), 97 deletions(-) commit a28717d8414e965a3ce6c83f744aa1c70ac8722f Author: Geliang Tang <geliang@kernel.org> Date: Fri Dec 13 20:52:53 2024 +0100 mptcp: add mptcp_for_each_userspace_pm_addr macro Similar to mptcp_for_each_subflow() macro, this patch adds a new macro mptcp_for_each_userspace_pm_addr() for userspace PM to iterate over the address entries on the local address list userspace_pm_local_addr_list of the mptcp socket. This patch doesn't change the behaviour of the code, just refactoring. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20241213-net-next-mptcp-pm-misc-cleanup-v1-2-ddb6d00109a8@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/mptcp/pm_userspace.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit e7b4083b90b7213902124d13fd1ed808360e32b1 Author: Geliang Tang <geliang@kernel.org> Date: Fri Dec 13 20:52:52 2024 +0100 mptcp: add mptcp_userspace_pm_lookup_addr helper Like __lookup_addr() helper in pm_netlink.c, a new helper mptcp_userspace_pm_lookup_addr() is also defined in pm_userspace.c. It looks up the corresponding mptcp_pm_addr_entry address in userspace_pm_local_addr_list through the passed "addr" parameter and returns the found address entry. This helper can be used in mptcp_userspace_pm_delete_local_addr(), mptcp_userspace_pm_set_flags(), mptcp_userspace_pm_get_local_id() and mptcp_userspace_pm_is_backup() to simplify the code. Please note that with this change now list_for_each_entry() is used in mptcp_userspace_pm_append_new_local_addr(), not list_for_each_entry_safe(), but that's OK to do so because mptcp_userspace_pm_lookup_addr() only returns an entry from the list, the list hasn't been modified here. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20241213-net-next-mptcp-pm-misc-cleanup-v1-1-ddb6d00109a8@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/mptcp/pm_userspace.c | 71 ++++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 35 deletions(-) commit dcacb364772eb463bde225176086bd7738b7102f Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Fri Dec 13 20:09:11 2024 +0800 net: wan: framer: Simplify API framer_provider_simple_of_xlate() implementation Simplify framer_provider_simple_of_xlate() implementation by API class_find_device_by_of_node(). Also correct comments to mark its parameter @dev as unused instead of @args in passing. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241213-net_fix-v2-1-6d06130d630f@quicinc.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/wan/framer/framer-core.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 734ff310d38cfdc27a1b3eac9fa83ff754356ae7 Author: Easwar Hariharan <eahariha@linux.microsoft.com> Date: Thu Dec 12 17:33:01 2024 +0000 gve: 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan <eahariha@linux.microsoft.com> Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com> Link: https://patch.msgid.link/20241212-netdev-converge-secs-to-jiffies-v4-1-6dac97a6d6ab@linux.microsoft.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/google/gve/gve_tx_dqo.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a35d00d5512accd337510fa4de756b743d331a87 Author: Donald Hunter <donald.hunter@gmail.com> Date: Fri Dec 13 11:08:27 2024 +0000 netlink: specs: add uint, sint to netlink-raw schema Add uint, sint to the list of attr types in the netlink-raw schema. This fixes the rt_link spec which had a uint attr added in commit f858cc9eed5b ("net: add IFLA_MAX_PACING_OFFLOAD_HORIZON device attribute") Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20241213110827.32250-1-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Documentation/netlink/netlink-raw.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 410cd938511ff18a13bea39e1af80e4821dca14a Author: Arnd Bergmann <arnd@arndb.de> Date: Fri Dec 13 09:32:18 2024 +0100 octeontx2-af: fix build regression without CONFIG_DCB When DCB is disabled, the pfc_en struct member cannot be accessed: drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c: In function 'otx2_is_pfc_enabled': drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:22:48: error: 'struct otx2_nic' has no member named 'pfc_en' 22 | return IS_ENABLED(CONFIG_DCB) && !!pfvf->pfc_en; | ^~ drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c: In function 'otx2_nix_config_bp': drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:1755:33: error: 'IEEE_8021QAZ_MAX_TCS' undeclared (first use in this function) 1755 | req->chan_cnt = IEEE_8021QAZ_MAX_TCS; | ^~~~~~~~~~~~~~~~~~~~ Move the member out of the #ifdef block to avoid putting back another check in the source file and add the missing include file unconditionally. Fixes: a7ef63dbd588 ("octeontx2-af: Disable backpressure between CPT and NIX") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241213083228.2645757-1-arnd@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 1 + drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit a63bb695396641d91201b9226b09652c1a647ff4 Author: Brett Creeley <brett.creeley@amd.com> Date: Thu Dec 12 13:20:42 2024 -0800 ionic: remove the unused nb_work Remove the empty and unused nb_work and associated ionic_lif_notify_work() function. v2: separated from previous net patch Link: https://lore.kernel.org/netdev/20241210174828.69525-2-shannon.nelson@amd.com/ Signed-off-by: Brett Creeley <brett.creeley@amd.com> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Link: https://patch.msgid.link/20241212212042.9348-1-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/pensando/ionic/ionic.h | 1 - drivers/net/ethernet/pensando/ionic/ionic_lif.c | 7 ------- 2 files changed, 8 deletions(-) commit 0193eebbb1fcade01331f9d7cc24e57fc28a577d Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Thu Dec 12 10:11:43 2024 +0100 ethernet: Make OA_TC6 config symbol invisible Commit aa58bec064ab1622 ("net: ethernet: oa_tc6: implement register write operation") introduced a library that implements the OPEN Alliance TC6 10BASE-T1x MAC-PHY Serial Interface protocol for supporting 10BASE-T1x MAC-PHYs. There is no need to ask the user about enabling this library, as all drivers that use it select the OA_TC6 symbol. Hence make the symbol invisible, unless when compile-testing. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/3b600550745af10ab7d7c3526353931c1d39f641.1733994552.git.geert+renesas@glider.be Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffcbfb5f9779637792547356a4fb8b0cbf645fa9 Author: Vladimir Oltean <vladimir.oltean@nxp.com> Date: Thu Dec 12 16:08:34 2024 +0200 net: phylink: improve phylink_sfp_config_phy() error message with missing PHY driver It seems that phylink does not support driving PHYs in SFP modules using the Generic PHY or Generic Clause 45 PHY driver. I've come to this conclusion after analyzing these facts: - sfp_sm_probe_phy(), who is our caller here, first calls phy_device_register() and then sfp_add_phy() -> ... -> phylink_sfp_connect_phy(). - phydev->supported is populated by phy_probe() - phy_probe() is usually called synchronously from phy_device_register() via phy_bus_match(), if a precise device driver is found for the PHY. In that case, phydev->supported has a good chance of being set to a non-zero mask. - There is an exceptional case for the PHYs for which phy_bus_match() didn't find a driver. Those devices sit for a while without a driver, then phy_attach_direct() force-binds the genphy_c45_driver or genphy_driver to them. Again, this triggers phy_probe() and renders a good chance of phydev->supported being populated, assuming compatibility with genphy_read_abilities() or genphy_c45_pma_read_abilities(). - phylink_sfp_config_phy() does not support the exceptional case of retrieving phydev->supported from the Generic PHY driver, due to its code flow. It expects the phydev->supported mask to already be non-empty, because it first calls phylink_validate() on it, and only calls phylink_attach_phy() if that succeeds. Thus, phylink_attach_phy() -> phy_attach_direct() has no chance of running. It is not my wish to change the state of affairs by altering the code flow, but merely to document the limitation rather than have the current unspecific error: [ 61.800079] mv88e6085 d0032004.mdio-mii:12 sfp: validation with support 00,00000000,00000000,00000000 failed: -EINVAL [ 61.820743] sfp sfp: sfp_add_phy failed: -EINVAL On the premise that an empty phydev->supported is going to make phylink_validate() fail anyway, and that this is caused by a missing PHY driver, it would be more informative to single out that case, undercut the entire phylink_sfp_config_phy() call, including phylink_validate(), and print a more specific message for this common gotcha: [ 37.076403] mv88e6085 d0032004.mdio-mii:12 sfp: PHY i2c:sfp:16 (id 0x01410cc2) has no driver loaded [ 37.089157] mv88e6085 d0032004.mdio-mii:12 sfp: Drivers which handle known common cases: CONFIG_BCM84881_PHY, CONFIG_MARVELL_PHY [ 37.108047] sfp sfp: sfp_add_phy failed: -EINVAL Link: https://lore.kernel.org/netdev/20241113144229.3ff4bgsalvj7spb7@skbuf/ Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/20241212140834.278894-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phylink.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 36e32b33d81152e1911a70750e0fe5c7621797ba Author: Shay Agroskin <shayagr@amazon.com> Date: Thu Dec 12 13:59:08 2024 +0200 net: ena: Fix incorrect indentation The assignment was accidentally aligned to the string one line before. This was raised by the kernel bot. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412101739.umNl7yYu-lkp@intel.com/ Signed-off-by: David Arinzon <darinzon@amazon.com> Signed-off-by: Shay Agroskin <shayagr@amazon.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241212115910.2485851-1-shayagr@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 586e62fe380feb7992104e3cbbf407371520cb39 Author: Yan Zhen <yanzhen@vivo.com> Date: Mon Sep 30 15:40:23 2024 +0800 EDAC: Fix typos in comments Fix the following typos: 'Alocate' ==> 'Allocate', 'specifed' ==> 'specified', 'Technlogy' ==> 'Technology', 'Brnach' ==> 'Branch', 'branchs' ==> 'branches'. Signed-off-by: Yan Zhen <yanzhen@vivo.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20240930074023.618110-1-yanzhen@vivo.com drivers/edac/edac_mc.c | 2 +- drivers/edac/edac_mc_sysfs.c | 6 +++--- drivers/edac/i5000_edac.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) commit 329365dc46b8cedb9c4fd5cfb80b29cb85b84c39 Author: Maximilian Güntner <code@mguentner.de> Date: Thu Dec 12 17:19:11 2024 +0100 ipv4: output metric as unsigned int adding a route metric greater than 0x7fff_ffff leads to an unintended wrap when printing the underlying u32 as an unsigned int (`%d`) thus incorrectly rendering the metric as negative. Formatting using `%u` corrects the issue. Signed-off-by: Maximilian Güntner <code@mguentner.de> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241212161911.51598-1-code@mguentner.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/ipv4/fib_trie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab2cedb0d4fcecba6d241ad1bdc674a0af625641 Merge: 2c2b61d2138f 53e3b540952c Author: David S. Miller <davem@davemloft.net> Date: Sun Dec 15 21:12:37 2024 +0000 Merge branch 'dp83822-gpio2' Dimitri Fedrau says: ==================== net: phy: dp83822: Add support for GPIO2 clock output The DP83822 has several clock configuration options for pins GPIO1, GPIO2 and GPIO3. Clock options include: - MAC IF clock - XI clock - Free-Running clock - Recovered clock This patch adds support for GPIO2, the support for GPIO1 and GPIO3 can be easily added if needed. Code and device tree bindings are derived from dp83867 which has a similar feature. Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com> --- Changes in v3: - Dropped <dt-bindings/net/ti-dp83822.h> - Moved defines from <dt-bindings/net/ti-dp83822.h> to dp83822.c - Switched to enum of type string for property ti,gpio2-clk-out and added explanation for values, added example. - Link to v2: https://lore.kernel.org/r/20241211-dp83822-gpio2-clk-out-v2-0-614a54f6acab@liebherr.com Changes in v2: - Move MII_DP83822_IOCTRL2 before MII_DP83822_GENCFG - List case statements together, and have one break at the end. - Move dp83822->set_gpio2_clk_out = true at the end of the validation - Link to v1: https://lore.kernel.org/r/20241209-dp83822-gpio2-clk-out-v1-0-fd3c8af59ff5@liebherr.com ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 53e3b540952c14aa190233c173ba56d2987aa527 Author: Dimitri Fedrau <dimitri.fedrau@liebherr.com> Date: Thu Dec 12 09:44:07 2024 +0100 net: phy: dp83822: Add support for GPIO2 clock output The GPIO2 pin on the DP83822 can be configured as clock output. Add support for configuration via DT. Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/phy/dp83822.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit a2d8af57452e60ff93a3525704788ad566433070 Author: Dimitri Fedrau <dimitri.fedrau@liebherr.com> Date: Thu Dec 12 09:44:06 2024 +0100 dt-bindings: net: dp83822: Add support for GPIO2 clock output The GPIO2 pin on the DP83822 can be configured as clock output. Add binding to support this feature. Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> .../devicetree/bindings/net/ti,dp83822.yaml | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit bd7b5ae26618ad2bd6f6264e2cb6c5815d323e75 Author: Carlos Llamas <cmllamas@google.com> Date: Thu Oct 24 18:36:28 2024 +0000 lockdep: Document MAX_LOCKDEP_CHAIN_HLOCKS calculation Define a macro AVG_LOCKDEP_CHAIN_DEPTH to document the magic number '5' used in the calculation of MAX_LOCKDEP_CHAIN_HLOCKS. The number represents the estimated average depth (number of locks held) of a lock chain. The calculation of MAX_LOCKDEP_CHAIN_HLOCKS was first added in commit 443cd507ce7f ("lockdep: add lock_class information to lock_chain and output it"). Suggested-by: Waiman Long <longman@redhat.com> Cc: Huang Ying <ying.huang@intel.com> Cc: J. R. Okajima <hooanon05g@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Boqun Feng <boqun.feng@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Will Deacon <will@kernel.org> Acked-by: Waiman Long <longman@redhat.com> Signed-off-by: Carlos Llamas <cmllamas@google.com> Acked-by: "Huang, Ying" <ying.huang@intel.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20241024183631.643450-4-cmllamas@google.com kernel/locking/lockdep_internals.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 88a79e88a97cb9309bb48a472be2bf1316d40adc Author: Carlos Llamas <cmllamas@google.com> Date: Thu Oct 24 18:36:27 2024 +0000 lockdep: Clarify size for LOCKDEP_*_BITS configs The LOCKDEP_*_BITS configs control the size of internal structures used by lockdep. The size is calculated as a power of two of the configured value (e.g. 16 => 64KB). Update these descriptions to more accurately reflect this, as "Bitsize" can be misleading. Suggested-by: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Boqun Feng <boqun.feng@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Waiman Long <longman@redhat.com> Cc: Will Deacon <will@kernel.org> Signed-off-by: Carlos Llamas <cmllamas@google.com> Acked-by: Waiman Long <longman@redhat.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20241024183631.643450-3-cmllamas@google.com lib/Kconfig.debug | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e638072e61726cae363d48812815197a2a0e097f Author: Carlos Llamas <cmllamas@google.com> Date: Thu Oct 24 18:36:26 2024 +0000 lockdep: Fix upper limit for LOCKDEP_*_BITS configs Lockdep has a set of configs used to determine the size of the static arrays that it uses. However, the upper limit that was initially setup for these configs is too high (30 bit shift). This equates to several GiB of static memory for individual symbols. Using such high values leads to linker errors: $ make defconfig $ ./scripts/config -e PROVE_LOCKING --set-val LOCKDEP_BITS 30 $ make olddefconfig all [...] ld: kernel image bigger than KERNEL_IMAGE_SIZE ld: section .bss VMA wraps around address space Adjust the upper limits to the maximum values that avoid these issues. The need for anything more, likely points to a problem elsewhere. Note that LOCKDEP_CHAINS_BITS was intentionally left out as its upper limit had a different symptom and has already been fixed [1]. Reported-by: J. R. Okajima <hooanon05g@gmail.com> Closes: https://lore.kernel.org/all/30795.1620913191@jrobl/ [1] Cc: Peter Zijlstra <peterz@infradead.org> Cc: Boqun Feng <boqun.feng@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Waiman Long <longman@redhat.com> Cc: Will Deacon <will@kernel.org> Acked-by: Waiman Long <longman@redhat.com> Signed-off-by: Carlos Llamas <cmllamas@google.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20241024183631.643450-2-cmllamas@google.com lib/Kconfig.debug | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0d3547df6934b8f9600630322799a2a76b4567d8 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Wed Jul 31 15:58:51 2024 +0200 locking/ww_mutex/test: Use swap() macro Fixes the following Coccinelle/coccicheck warning reported by swap.cocci: WARNING opportunity for swap() Compile-tested only. [Boqun: Add the report tags from Jiapeng and Abaci Robot [1].] Reported-by: Abaci Robot <abaci@linux.alibaba.com> Reported-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11531 Link: https://lore.kernel.org/r/20241025081455.55089-1-jiapeng.chong@linux.alibaba.com [1] Acked-by: Waiman Long <longman@redhat.com> Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20240731135850.81018-2-thorsten.blum@toblux.com kernel/locking/test-ww_mutex.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 8fb72561602322bcd226460fc16f74f0bc003988 Author: Vasily Gorbik <gor@linux.ibm.com> Date: Tue Dec 10 12:35:49 2024 +0100 s390: Add KERNEL_IMAGE_BASE to kasan.config Although Kconfig specifies: config KERNEL_IMAGE_BASE hex "Kernel image base address" range 0x100000 0x1FFFFFE0000000 if !KASAN range 0x100000 0x1BFFFFE0000000 if KASAN default 0x3FFE0000000 if !KASAN default 0x7FFFE0000000 if KASAN Running make defconfig or make debug_defconfig followed by make kasan.config results in a suboptimal CONFIG_KERNEL_IMAGE_BASE=0x3FFE0000000. Add CONFIG_KERNEL_IMAGE_BASE=0x7FFFE0000000 to kasan.config to address that. Acked-by: Heiko Carstens <hca@linux.ibm.com> Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/configs/kasan.config | 1 + 1 file changed, 1 insertion(+) commit 01dc3a0d5cd67de28bcd48c2be196b26dd2dde9f Author: Vasily Gorbik <gor@linux.ibm.com> Date: Tue Dec 10 12:35:46 2024 +0100 s390/abs_lowcore: Include linux/smp.h for get_cpu() and put_cpu() Add missing include of <linux/smp.h> in abs_lowcore.h to provide declarations for get_cpu() and put_cpu() used in the code. Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/abs_lowcore.h | 1 + 1 file changed, 1 insertion(+) commit 912a0d35232686673a92a3728606f618da64291e Author: Vasily Gorbik <gor@linux.ibm.com> Date: Tue Dec 10 12:35:40 2024 +0100 s390: Remove __bootdata annotations from declarations For consistency, remove the `__bootdata` and `__bootdata_preserved` section annotations from variable declarations in header files. Section annotations should be applied to definitions, not declarations. This change moves the annotations to the variable definitions in the corresponding source files. Acked-by: Heiko Carstens <hca@linux.ibm.com> Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/abs_lowcore.h | 3 +-- arch/s390/include/asm/page-states.h | 3 +-- arch/s390/include/asm/pgtable.h | 15 +++++++-------- arch/s390/kernel/abs_lowcore.c | 1 + arch/s390/kernel/os_info.c | 1 + arch/s390/kernel/setup.c | 12 ++++++------ arch/s390/kernel/vmcore_info.c | 3 ++- arch/s390/mm/maccess.c | 1 + 8 files changed, 20 insertions(+), 19 deletions(-) commit 5c9e37e5233ec3a6b4f2d160c697b8b28d13f134 Author: Heiko Carstens <hca@linux.ibm.com> Date: Wed Dec 11 12:58:05 2024 +0100 s390/preempt: Optimize __preempt_count_dec_and_test() Use __atomic_add_const_and_test() within __preempt_count_dec_and_test(). With this it is possible to decrease preempt_count by one and test if need_resched is set with one instruction, if the compiler has support for flag output operand constraints. Reviewed-by: Juergen Christ <jchrist@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/preempt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a53f5d247e24f4d3fb1218f23abdb5096488f4cb Author: Heiko Carstens <hca@linux.ibm.com> Date: Wed Dec 11 12:58:04 2024 +0100 s390/atomic: Provide arch_atomic_*_and_test() implementations Provide arch_atomic_*_and_test() implementations which make use of flag output constraints, and allow the compiler to generate slightly better code. Reviewed-by: Juergen Christ <jchrist@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/atomic.h | 36 +++++++++++++++++++ arch/s390/include/asm/atomic_ops.h | 73 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) commit 7c7f32c9ee8ecd626dffc28be601b37c111ebd60 Author: Heiko Carstens <hca@linux.ibm.com> Date: Wed Dec 11 12:58:03 2024 +0100 s390: Remove superfluous new lines from inline assemblies GCC uses the number of lines of an inline assembly to calculate its length (number of instructions). This has an impact on GCCs inlining decisions. Therefore remove superfluous new lines from a couple of inline assemblies, so that their real size is reflected. Also use an "asm inline" statement for the fpu_lfpc_safe() inline assembly to enforce that GCC assumes the minimum size for this inline assembly, since it contains various statements which make it appear much larger than the resulting code is. Suggested-by: Juergen Christ <jchrist@linux.ibm.com> Reviewed-by: Juergen Christ <jchrist@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/atomic_ops.h | 4 ++-- arch/s390/include/asm/checksum.h | 2 +- arch/s390/include/asm/fpu-insn.h | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) commit 2ca248f52afa4f55fd3fc2e7c5e123385b192f14 Author: Heiko Carstens <hca@linux.ibm.com> Date: Wed Dec 4 12:31:02 2024 +0100 s390/preempt: Adjust coding style Just remove a line break which reduces readability. Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/preempt.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5eee66c5bf6034c84a67fdbf224110f5288d9195 Author: Heiko Carstens <hca@linux.ibm.com> Date: Wed Dec 4 12:31:01 2024 +0100 s390/preempt: Remove special pre MARCH_HAS_Z196_FEATURES implementation Remove the preempt count implementation for pre MARCH_HAS_Z196_FEATURES builds. If the kernel is compiled with PREEMPT=n, which is the default for all distributions, this has close to zero impact in the generated code. Therefore remove the alternative implementation to keep things simple. Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/preempt.h | 52 ----------------------------------------- 1 file changed, 52 deletions(-) commit a7af4fb85e208f31cc767245516460b1af287b36 Author: Heiko Carstens <hca@linux.ibm.com> Date: Wed Dec 4 12:31:00 2024 +0100 s390/preempt: Add comments The s390 preempt_count implementation is more or less a copy of the x86 implementation using different instructions. For clarification how this works also add all comments from x86 with some minor modifications. Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/preempt.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 9b90c5705786cf0c39356a94b19d842c954fdf16 Author: Heiko Carstens <hca@linux.ibm.com> Date: Wed Dec 4 12:30:59 2024 +0100 s390/atomic: Consistent layering between atomic.h and atomic_ops.h With commit c8a91c285d8c ("s390/atomic: move remaining inline assemblies to atomic_ops.h") all remaining atomic inline assemblies have been moved to atomic_ops.h. However the result is inconsistent: the functions in atomic_ops.h are supposed to be used with integral types like int and long pointers, while the functions in atomic.h work with atomic types. This layering got violated with the named commit. Therefore adjust this now, and also use consistent variable names in atomic_ops.h. Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/atomic.h | 8 +++---- arch/s390/include/asm/atomic_ops.h | 44 +++++++++++++++++++------------------- 2 files changed, 26 insertions(+), 26 deletions(-) commit d809df72b5a583f9fa6e0a722e4e7cb8b28b19fc Author: Heiko Carstens <hca@linux.ibm.com> Date: Wed Dec 4 12:30:58 2024 +0100 s390/atomic: Implement arch_atomic_inc() / arch_atomic_dec() Implement arch_atomic_inc() / arch_atomic_dec() functions which result in a single instruction if compiled for z196 or newer architectures. Reduces the kernel image size by ~6K (defconfig): bloat-o-meter: add/remove: 0/0 grow/shrink: 12/1005 up/down: 106/-6404 (-6298) Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/include/asm/atomic.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit d82c9281189d2b27642ede2760db495379503b86 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sun Dec 15 14:40:18 2024 +0200 drm/msm/dpu: include SSPP allocation state into the dumped state Make dpu_rm_print_state() also output the SSPP allocation state. Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629025/ Link: https://lore.kernel.org/r/20241215-dpu-virtual-wide-v8-3-65221f213ce1@linaro.org drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8c62a31607f6589545ef1c0a85f2924dee39430b Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sun Dec 15 14:40:17 2024 +0200 drm/msm/dpu: allow using two SSPP blocks for a single plane Virtual wide planes give high amount of flexibility, but it is not always enough: In parallel multirect case only the half of the usual width is supported for tiled formats. Thus the whole width of two tiled multirect rectangles can not be greater than max_linewidth, which is not enough for some platforms/compositors. Another example is as simple as wide YUV plane. YUV planes can not use multirect, so currently they are limited to max_linewidth too. Now that the planes are fully virtualized, add support for allocating two SSPP blocks to drive a single DRM plane. This fixes both mentioned cases and allows all planes to go up to 2*max_linewidth (at the cost of making some of the planes unavailable to the user). Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/629026/ Link: https://lore.kernel.org/r/20241215-dpu-virtual-wide-v8-2-65221f213ce1@linaro.org drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 144 ++++++++++++++++++++---------- 1 file changed, 98 insertions(+), 46 deletions(-) commit 774bcfb731765d092992136b54c34958d7c64bea Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sun Dec 15 14:40:16 2024 +0200 drm/msm/dpu: add support for virtual planes Only several SSPP blocks support such features as YUV output or scaling, thus different DRM planes have different features. Properly utilizing all planes requires the attention of the compositor, who should prefer simpler planes to YUV-supporting ones. Otherwise it is very easy to end up in a situation when all featureful planes are already allocated for simple windows, leaving no spare plane for YUV playback. To solve this problem make all planes virtual. Each plane is registered as if it supports all possible features, but then at the runtime during the atomic_check phase the driver selects backing SSPP block for each plane. As the planes are attached to the CRTC and not the encoder, the SSPP blocks are also allocated per CRTC ID (all other resources are currently allocated per encoder ID). This also matches the hardware requirement, where both rectangles of a single SSPP can only be used with the LM pair. Note, this does not provide support for using two different SSPP blocks for a single plane or using two rectangles of an SSPP to drive two planes. Each plane still gets its own SSPP and can utilize either a solo rectangle or both multirect rectangles depending on the resolution. Note #2: By default support for virtual planes is turned off and the driver still uses old code path with preallocated SSPP block for each plane. To enable virtual planes, pass 'msm.dpu_use_virtual_planes=1' kernel parameter. Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629022/ Link: https://lore.kernel.org/r/20241215-dpu-virtual-wide-v8-1-65221f213ce1@linaro.org drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 50 ++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 10 +- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 4 + drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 249 ++++++++++++++++++++++++++---- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h | 13 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 82 ++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 14 ++ 7 files changed, 390 insertions(+), 32 deletions(-) commit 8a570c93fb67bd40f07beb2b3960badcf6d7cec0 Author: Li Liu <quic_lliu6@quicinc.com> Date: Tue Dec 10 14:53:58 2024 +0800 drm/msm/dsi: Add support for SM6150 Add support for DSI 2.3.1 (block used on SM6150). Signed-off-by: Li Liu <quic_lliu6@quicinc.com> Signed-off-by: Fange Zhang <quic_fangez@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/628011/ Link: https://lore.kernel.org/r/20241210-add-display-support-for-qcs615-platform-v4-7-2d875a67602d@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/msm/dsi/dsi_cfg.c | 2 ++ drivers/gpu/drm/msm/dsi/dsi_cfg.h | 1 + 2 files changed, 3 insertions(+) commit fbf937a89ad25ff38f6a636c63a20a00c6c19377 Author: Li Liu <quic_lliu6@quicinc.com> Date: Tue Dec 10 14:53:57 2024 +0800 drm/msm/dsi: Add dsi phy support for SM6150 Add phy configuration for SM6150 Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Li Liu <quic_lliu6@quicinc.com> Signed-off-by: Fange Zhang <quic_fangez@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/628009/ Link: https://lore.kernel.org/r/20241210-add-display-support-for-qcs615-platform-v4-6-2d875a67602d@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 2 ++ drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 1 + drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+) commit cb2f9144693b03801e9de0ea0df4caeb06eea513 Author: Li Liu <quic_lliu6@quicinc.com> Date: Tue Dec 10 14:53:56 2024 +0800 drm/msm/dpu: Add SM6150 support Add definitions for the display hardware used on the Qualcomm SM6150 platform. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Li Liu <quic_lliu6@quicinc.com> Signed-off-by: Fange Zhang <quic_fangez@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/628007/ Link: https://lore.kernel.org/r/20241210-add-display-support-for-qcs615-platform-v4-5-2d875a67602d@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_3_sm6150.h | 254 +++++++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 1 + 4 files changed, 257 insertions(+) commit b8871563eb9617a10c14a698103c0292207797f6 Author: Li Liu <quic_lliu6@quicinc.com> Date: Tue Dec 10 14:53:55 2024 +0800 drm/msm: mdss: Add SM6150 support Add support for MDSS on SM6150. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Li Liu <quic_lliu6@quicinc.com> Signed-off-by: Fange Zhang <quic_fangez@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/628005/ Link: https://lore.kernel.org/r/20241210-add-display-support-for-qcs615-platform-v4-4-2d875a67602d@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/msm/msm_mdss.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 701da2861cbc2a60482f7454bfa2b13229d74f8a Author: Li Liu <quic_lliu6@quicinc.com> Date: Tue Dec 10 14:53:54 2024 +0800 dt-bindings: display/msm: Add SM6150 MDSS & DPU Document the MDSS and DPU hardware found on the Qualcomm SM6150 platform. Signed-off-by: Li Liu <quic_lliu6@quicinc.com> Signed-off-by: Fange Zhang <quic_fangez@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/628003/ Link: https://lore.kernel.org/r/20241210-add-display-support-for-qcs615-platform-v4-3-2d875a67602d@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> .../bindings/display/msm/qcom,sm6150-dpu.yaml | 108 +++++++++ .../bindings/display/msm/qcom,sm6150-mdss.yaml | 245 +++++++++++++++++++++ 2 files changed, 353 insertions(+) commit e9280f124b3cffc7d717b08622c066c7a5f6a388 Author: Li Liu <quic_lliu6@quicinc.com> Date: Tue Dec 10 14:53:53 2024 +0800 dt-bindings: display/msm: dsi-controller-main: Document SM6150 Document general compatibility of the DSI controller on SM6150. Signed-off-by: Li Liu <quic_lliu6@quicinc.com> Signed-off-by: Fange Zhang <quic_fangez@quicinc.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/628002/ Link: https://lore.kernel.org/r/20241210-add-display-support-for-qcs615-platform-v4-2-2d875a67602d@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 5902cd2212eb8718caf37280d010ce50723e0c57 Author: Li Liu <quic_lliu6@quicinc.com> Date: Tue Dec 10 14:53:52 2024 +0800 dt-bindings: display/msm: Add SM6150 DSI phy Add new compatible for SM6150 with dsi_phy_14nm_36mA_regulators Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Li Liu <quic_lliu6@quicinc.com> Signed-off-by: Fange Zhang <quic_fangez@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/627999/ Link: https://lore.kernel.org/r/20241210-add-display-support-for-qcs615-platform-v4-1-2d875a67602d@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml | 1 + 1 file changed, 1 insertion(+) commit dbc7bb1a93f41c533fe31ddc97bdf777d7a61faa Author: Abhinav Kumar <quic_abhinavk@quicinc.com> Date: Mon Dec 9 13:18:36 2024 -0800 drm/msm/dpu: filter out too wide modes if no 3dmux is present On chipsets such as QCS615, there is no 3dmux present. In such a case, a layer exceeding the max_mixer_width cannot be split, hence cannot be supported. Filter out the modes which exceed the max_mixer_width when there is no 3dmux present. Also, add a check in the dpu_crtc_atomic_check() to return failure for such modes. Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Tested-by: Xiangxu Yin <quic_xiangxuy@quicinc.com> # QCS615 Patchwork: https://patchwork.freedesktop.org/patch/627974/ Link: https://lore.kernel.org/r/20241209-no_3dmux-v3-1-48aaa555b0d3@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 2c2b61d2138f472e50b5531ec0cb4a1485837e21 Author: Yuyang Huang <yuyanghuang@google.com> Date: Wed Dec 11 17:22:41 2024 +0900 netlink: add IGMP/MLD join/leave notifications This change introduces netlink notifications for multicast address changes. The following features are included: * Addition and deletion of multicast addresses are reported using RTM_NEWMULTICAST and RTM_DELMULTICAST messages with AF_INET and AF_INET6. * Two new notification groups: RTNLGRP_IPV4_MCADDR and RTNLGRP_IPV6_MCADDR are introduced for receiving these events. This change allows user space applications (e.g., ip monitor) to efficiently track multicast group memberships by listening for netlink events. Previously, applications relied on inefficient polling of procfs, introducing delays. With netlink notifications, applications receive realtime updates on multicast group membership changes, enabling more precise metrics collection and system monitoring.  This change also unlocks the potential for implementing a wide range of sophisticated multicast related features in user space by allowing applications to combine kernel provided multicast address information with user space data and communicate decisions back to the kernel for more fine grained control. This mechanism can be used for various purposes, including multicast filtering, IGMP/MLD offload, and IGMP/MLD snooping. Cc: Maciej Żenczykowski <maze@google.com> Cc: Lorenzo Colitti <lorenzo@google.com> Co-developed-by: Patrick Ruddy <pruddy@vyatta.att-mail.com> Signed-off-by: Patrick Ruddy <pruddy@vyatta.att-mail.com> Link: https://lore.kernel.org/r/20180906091056.21109-1-pruddy@vyatta.att-mail.com Signed-off-by: Yuyang Huang <yuyanghuang@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/linux/igmp.h | 2 ++ include/net/addrconf.h | 21 ++++++++++++++ include/uapi/linux/rtnetlink.h | 10 ++++++- net/ipv4/igmp.c | 64 ++++++++++++++++++++++++++++++++++++++++++ net/ipv6/addrconf.c | 29 ++++++------------- net/ipv6/mcast.c | 39 +++++++++++++++++++++++++ 6 files changed, 144 insertions(+), 21 deletions(-) commit dc7b16a4f055f6cae65e787063cdb155d53e8080 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Wed Nov 27 16:04:34 2024 +0200 drm/msm/mdss: use boolean values for macrotile_mode The macrotile_mode is a flag, not a bit value. Use true/false values to set it rather than 1/0. Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/626374/ Link: https://lore.kernel.org/r/20241127-msm-mdss-ubwc-v3-3-9782a7c2b023@linaro.org drivers/gpu/drm/msm/msm_mdss.c | 16 ++++++++-------- drivers/gpu/drm/msm/msm_mdss.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) commit 2cb62d9f9cf186fa1d132ea462990cca0845de7f Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Wed Nov 27 16:04:33 2024 +0200 drm/msm/mdss: reuse defined bitfields for UBWC 2.0 Follow other msm_mdss_setup_ubwc_dec_nn functions and use individual bits instead of just specifying the value to be programmed to the UBWC_STATIC register. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/626373/ Link: https://lore.kernel.org/r/20241127-msm-mdss-ubwc-v3-2-9782a7c2b023@linaro.org drivers/gpu/drm/msm/msm_mdss.c | 17 +++++++++++++---- drivers/gpu/drm/msm/msm_mdss.h | 1 - 2 files changed, 13 insertions(+), 5 deletions(-) commit 43eb9a8a372bc6ae7fccde509cf7dcb76e0d4eb8 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Wed Nov 27 16:04:32 2024 +0200 drm/msm/mdss: define bitfields for the UBWC_STATIC register Rather than hand-coding UBWC_STATIC value calculation, define corresponding bitfields and use them to setup the register value. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/626372/ Link: https://lore.kernel.org/r/20241127-msm-mdss-ubwc-v3-1-9782a7c2b023@linaro.org drivers/gpu/drm/msm/msm_mdss.c | 38 +++++++++++++++----------- drivers/gpu/drm/msm/msm_mdss.h | 1 + drivers/gpu/drm/msm/registers/display/mdss.xml | 11 +++++++- 3 files changed, 33 insertions(+), 17 deletions(-) commit 1a40bb31fcf1c9071dcb3d635aca6d0d08b6a5aa Author: Jessica Zhang <quic_jesszhan@quicinc.com> Date: Fri Nov 22 15:09:10 2024 -0800 drm/msm/dpu: Add VBIF to DPU snapshot Add VBIF registers to the DPU snapshot to help with debugging. Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/625946/ Link: https://lore.kernel.org/r/20241122-vbif-snapshot-v1-1-6e8fedd16fdf@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0ca953ac226eaffbe1a795f5e517095a8d494921 Author: Andy Yan <andy.yan@rock-chips.com> Date: Sat Dec 14 16:17:01 2024 +0800 drm/rockchip: vop2: Fix the windows switch between different layers Every layer of vop2 should bind a window, and we also need to make sure that this window is not used by other layer. 0x5 is a reserved layer sel value on rk3568, but it will select Cluster3 on rk3588, configure unused layers to 0x5 will lead alpha blending error on rk3588. When we bind a window from layerM to layerN, we move the old window on layerN to layerM. Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") Tested-by: Derek Foreman <derek.foreman@collabora.com> Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241214081719.3330518-3-andyshrk@163.com drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 47 ++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 13 deletions(-) commit 779964556c64cd3d76ddfeb34738ef78020fae84 Author: Andy Yan <andy.yan@rock-chips.com> Date: Sat Dec 14 16:17:00 2024 +0800 drm/rockchip: vop2: Add debugfs support /sys/kernel/debug/dri/vop2/summary: dump vop display state /sys/kernel/debug/dri/vop2/regs: dump whole vop registers /sys/kernel/debug/dri/vop2/active_regs: only dump the registers of activated modules Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Tested-by: Michael Riesch <michael.riesch@wolfvision.net> # on RK3568 Tested-by: Detlev Casanova <detlev.casanova@collabora.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241214081719.3330518-2-andyshrk@163.com drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 258 +++++++++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop2.h | 11 ++ drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 191 ++++++++++++++++++++ 3 files changed, 460 insertions(+) commit 041c664da0691a72aca67f72ab6a13789631358e Author: Andy Yan <andy.yan@rock-chips.com> Date: Sat Dec 14 15:13:33 2024 +0800 drm/rockchip: Fix Copyright description The company name has update to Rockchip Electronics Co., Ltd. since 2021. And change Co.Ltd to Co., Ltd. to fix mail server warning: DBL_SPAM(6.50)[co.ltd:url]; Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241214071333.3325308-1-andyshrk@163.com drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +- drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +- drivers/gpu/drm/rockchip/cdn-dp-core.h | 2 +- drivers/gpu/drm/rockchip/cdn-dp-reg.c | 2 +- drivers/gpu/drm/rockchip/cdn-dp-reg.h | 2 +- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 2 +- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 2 +- drivers/gpu/drm/rockchip/inno_hdmi.c | 2 +- drivers/gpu/drm/rockchip/inno_hdmi.h | 2 +- drivers/gpu/drm/rockchip/rk3066_hdmi.c | 2 +- drivers/gpu/drm/rockchip/rk3066_hdmi.h | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_fb.h | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_vop2.h | 2 +- drivers/gpu/drm/rockchip/rockchip_lvds.c | 2 +- drivers/gpu/drm/rockchip/rockchip_lvds.h | 2 +- drivers/gpu/drm/rockchip/rockchip_rgb.c | 2 +- drivers/gpu/drm/rockchip/rockchip_rgb.h | 2 +- drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 2 +- drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 2 +- drivers/gpu/drm/rockchip/rockchip_vop_reg.h | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) commit 288a2cabcf6bb35532e8b2708829bdc2b85bc690 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 20:57:58 2024 +0100 power: supply: core: add UAPI to discover currently used extensions Userspace wants to now about the used power supply extensions, for example to handle a device extended by a certain extension differently or to discover information about the extending device. Add a sysfs directory to the power supply device. This directory contains links which are named after the used extension and point to the device implementing that extension. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20241211-power-supply-extensions-v6-4-9d9dc3f3d387@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Documentation/ABI/testing/sysfs-class-power | 9 +++++++++ drivers/power/supply/cros_charge-control.c | 5 ++++- drivers/power/supply/power_supply.h | 2 ++ drivers/power/supply/power_supply_core.c | 19 +++++++++++++++++-- drivers/power/supply/power_supply_sysfs.c | 10 ++++++++++ drivers/power/supply/test_power.c | 4 +++- include/linux/power_supply.h | 2 ++ 7 files changed, 47 insertions(+), 4 deletions(-) commit bcfe7d6ba20742bc166b293cc1a3986a0f4aaeb9 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 20:57:57 2024 +0100 power: supply: cros_charge-control: implement a power supply extension Power supply extensions provide an easier mechanism to implement additional properties for existing power supplies. Use that instead of reimplementing the sysfs attributes manually. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241211-power-supply-extensions-v6-3-9d9dc3f3d387@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/cros_charge-control.c | 197 +++++++++++++---------------- 1 file changed, 85 insertions(+), 112 deletions(-) commit 2f9ccc64b3eeddab5690f56e59357c3a165d0cc6 Merge: 9d76d5de87bb c28dc9fc24f5 Author: Sebastian Reichel <sebastian.reichel@collabora.com> Date: Sat Dec 14 22:21:20 2024 +0100 power: supply: Merge fixes branch into for-next Merge the fixes branch into the development branch, since the it contains multiple changes to the cros_charge-control driver needed to convert it to the new power-supply extension framework. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> commit 4b5c2205526cc1579b840893b98eb7545220f7cf Merge: 8f6f1636e345 0fef924e3918 45c7c67643ae 6ca774f06a7d Author: Uladzislau Rezki (Sony) <urezki@gmail.com> Date: Sat Dec 14 17:32:26 2024 +0100 Merge branches 'fixes.2024.12.14a', 'rcutorture.2024.12.14a', 'srcu.2024.12.14a' and 'torture-test.2024.12.14a' into rcu-merge.2024.12.14a fixes.2024.12.14a: RCU fixes rcutorture.2024.12.14a: Torture-test updates srcu.2024.12.14a: SRCU updates torture-test.2024.12.14a: Adding an extra test, fixes commit 45c7c67643ae6391a354e42cf729d807fe341491 Author: Feng Lee <379943137@qq.com> Date: Tue Nov 19 15:29:49 2024 +0800 srcu: Remove redundant GP sequence checks in srcu_funnel_gp_start We will perform GP sequence checking at the beginning of srcu_gp_start, thus making it safe to remove duplicate GP sequence checks prior to calling srcu_gp_start. Signed-off-by: Feng Lee <379943137@qq.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/srcutree.c | 1 - 1 file changed, 1 deletion(-) commit cfb07b07dda2a17feed96c80c5af85937fcd2e9c Author: Paul E. McKenney <paulmck@kernel.org> Date: Tue Nov 12 16:53:53 2024 -0800 srcu: Fix typo s/srcu_check_read_flavor()/__srcu_check_read_flavor()/ This commit fixes a typo in which a comment needed to have been updated from srcu_check_read_flavor() to __srcu_check_read_flavor(). Reported-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com> Closes: https://lore.kernel.org/all/b75d1fcd-6fcd-4619-bb5c-507fa599ee28@amd.com/ Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> include/linux/srcutree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d465492a224b2409508224cf6970d7b97e2285cc Author: Paul E. McKenney <paulmck@kernel.org> Date: Mon Oct 21 15:09:39 2024 -0700 srcu: Guarantee non-negative return value from srcu_read_lock() For almost 20 years, the int return value from srcu_read_lock() has been always either zero or one. This commit therefore documents the fact that it will be non-negative, and does the same for the underlying __srcu_read_lock(). [ paulmck: Apply Andrii Nakryiko feedback. ] Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> include/linux/srcu.h | 15 ++++++++------- kernel/rcu/srcutree.c | 3 ++- 2 files changed, 10 insertions(+), 8 deletions(-) commit 8f6f1636e34531477f0a44df39943e79f89d83c2 Author: Paul E. McKenney <paulmck@kernel.org> Date: Tue Oct 29 12:22:54 2024 -0700 MAINTAINERS: Update RCU git tree RCU now has a shiny new shared git tree, so this commit updates MAINTAINERS to point to it instead of my personal -rcu tree. Reported-by: Song Liu <song@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> MAINTAINERS | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1bb03ad383a7311f609ecfd13c3aaab248c0627f Author: Paul E. McKenney <paulmck@kernel.org> Date: Fri Oct 25 19:56:20 2024 -0700 rcu: Add lockdep_assert_irqs_disabled() to rcu_exp_need_qs() Callers to rcu_exp_need_qs() are supposed to disable interrupts, so this commit enlists lockdep's aid in checking this. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/tree_exp.h | 1 + 1 file changed, 1 insertion(+) commit ecc5e6b0d3c982091b82615af21817ddf9cfdd60 Author: Paul E. McKenney <paulmck@kernel.org> Date: Fri Oct 25 17:44:28 2024 -0700 rcu: Add KCSAN exclusive-writer assertions for rdp->cpu_no_qs.b.exp The value of rdp->cpu_no_qs.b.exp may be changed only by the corresponding CPU, and that CPU is not even allowed to race with itself, for example, via interrupt handlers. This commit therefore adds KCSAN exclusive-writer assertions to check this constraint. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/tree_exp.h | 4 ++++ kernel/rcu/tree_plugin.h | 1 + 2 files changed, 5 insertions(+) commit 7a323371197b184c8f0cff0d67d74f48f0098164 Author: Paul E. McKenney <paulmck@kernel.org> Date: Fri Oct 25 17:17:16 2024 -0700 rcu: Make preemptible rcu_exp_handler() check idempotency Although the non-preemptible implementation of rcu_exp_handler() contains checks to enforce idempotency, the preemptible version does not. The reason for this omission is that in preemptible kernels, there is no reporting of quiescent states from CPU hotplug notifiers, and thus no need for idempotency. In theory, anyway. In practice, accidents happen. This commit therefore adds checks under WARN_ON_ONCE() to catch any such accidents. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/tree_exp.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 6ae4c30fee05d97c4f53237e3cd13795a6f44422 Author: Paul E. McKenney <paulmck@kernel.org> Date: Fri Oct 25 16:33:36 2024 -0700 rcu: Replace open-coded rcu_exp_need_qs() from rcu_exp_handler() with call Currently, the preemptible implementation of rcu_exp_handler() almost open-codes rcu_exp_need_qs(). A call to that function would be shorter and would improve expediting in cases where rcu_exp_handler() interrupted a preemption-disabled or bh-disabled region of code. This commit therefore moves rcu_exp_need_qs() out of the non-preemptible leg of the enclosing #ifdef and replaces the open coding in preemptible rcu_exp_handler() with a call to rcu_exp_need_qs(). Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/tree_exp.h | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit e2bd168295e4eb719a343086baddfe0abca512a2 Author: Paul E. McKenney <paulmck@kernel.org> Date: Fri Oct 25 15:56:17 2024 -0700 rcu: Move rcu_report_exp_rdp() setting of ->cpu_no_qs.b.exp under lock This commit reduces the state space of rcu_report_exp_rdp() by moving the setting of ->cpu_no_qs.b.exp under the rcu_node structure's ->lock. The lock isn't really all that important here, given that this per-CPU field is supposed to be written only by its CPU, but the disabling of interrupts excludes things like rcu_exp_handler(), which also can write to this same field. Avoiding this sort of interleaved access reduces the state space. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/tree_exp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d16e32f75f30d5228d9e0a3f6ca77b62c3a4383d Author: Paul E. McKenney <paulmck@kernel.org> Date: Fri Oct 25 11:43:28 2024 -0700 rcu: Make rcu_report_exp_cpu_mult() caller acquire lock There is a hard-to-trigger bug in the expedited grace-period computation whose fix requires that the __sync_rcu_exp_select_node_cpus() function to check that the grace-period sequence number has not changed before invoking rcu_report_exp_cpu_mult(). However, this check must be done while holding the leaf rcu_node structure's ->lock. This commit therefore prepares for that fix by moving this lock's acquisition from rcu_report_exp_cpu_mult() to its callers (all two of them). Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/tree_exp.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 049dfe96baf97228a9e98eaf50a8a7386ec7a483 Author: Frederic Weisbecker <frederic@kernel.org> Date: Wed Oct 2 16:57:38 2024 +0200 rcu: Report callbacks enqueued on offline CPU blind spot Callbacks enqueued after rcutree_report_cpu_dead() fall into RCU barrier blind spot. Report any potential misuse. Reported-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/tree.c | 3 +++ 1 file changed, 3 insertions(+) commit 0fef924e3918e72768357a220c84e6b4dd2b6180 Author: Paul E. McKenney <paulmck@kernel.org> Date: Thu Nov 14 11:11:18 2024 -0800 rcutorture: Use symbols for SRCU reader flavors This commit converts rcutorture.c values for the reader_flavor module parameter from hexadecimal to the SRCU_READ_FLAVOR_* C-preprocessor macros. The actual modprobe or kernel-boot-parameter values for read_flavor must still be entered in hexadecimal. Link: https://lore.kernel.org/all/c48c9dca-fe07-4833-acaa-28c827e5a79e@amd.com/ Suggested-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> include/linux/srcu.h | 6 ++++++ include/linux/srcutree.h | 6 +----- kernel/rcu/rcutorture.c | 14 +++++++------- 3 files changed, 14 insertions(+), 12 deletions(-) commit 223f16b87d70a62058d3b3f4aae0da570b4380a1 Author: Paul E. McKenney <paulmck@kernel.org> Date: Wed Nov 13 19:10:19 2024 -0800 rcutorture: Add per-reader-segment preemption diagnostics For preemptible RCU, this commit adds an indication for each reader segments to whether the rcu_torture_reader() task was on the ->blkd_tasks lists, though only in kernels built with CONFIG_RCU_TORTURE_TEST_LOG_CPU=y. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/rcutorture.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 885a6f4729c688c50bb2f470dfcc0ad0dea43c1e Author: Paul E. McKenney <paulmck@kernel.org> Date: Fri Nov 8 15:36:55 2024 -0800 rcutorture: Read CPU ID for decoration protected by both reader types Currently, rcutorture_one_extend() reads the CPU ID before making any change to the type of RCU reader. This can be confusing because the properties of the code from which the CPU ID is read are not that of the reader segment that this same CPU ID is listed with. This commit therefore causes rcutorture_one_extend() to read the CPU ID just after the new protections have been added, but before the old protections have been removed. With this change in place, all of the protections of a given reader segment apply from the reading of one CPU ID to the reading of the next. This change therefore also allows a single read of the CPU ID to work for both the old and the new reader segment. And this dual use of a single read of the CPU ID avoids inflicting any additional to heisenbugs. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/rcutorture.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit c31569eec4815c6fa64948c31f00ebe50b1c75dc Author: Paul E. McKenney <paulmck@kernel.org> Date: Fri Nov 8 14:58:54 2024 -0800 rcutorture: Add preempt_count() to rcutorture_one_extend_check() diagnostics This commit adds the value of preempt_count() to the diagnostics produced by rcutorture_one_extend_check() to improve debugging. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/rcutorture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 282e06cc8f595e999f778bd284d6a3608f7d1d62 Author: Paul E. McKenney <paulmck@kernel.org> Date: Wed Nov 6 15:42:06 2024 -0800 rcutorture: Add parameters to control polled/conditional wait interval This commit adds rcutorture module parameters gp_cond_wi, gp_cond_wi_exp, gp_poll_wi, and gp_poll_wi_exp to control the wait interval for conditional, conditional expedited, polled, and polled expedited grace periods, respectively. When rcu_torture_writer() is testing these types of grace periods, hrtimers are used to randomly wait up to the specified number of microseconds, but with nanosecond granularity. In the case of conditional grace periods (get_state_synchronize_rcu() and cond_synchronize_rcu(), for example) there is just one wait. For polled grace periods (start_poll_synchronize_rcu() and poll_state_synchronize_rcu(), for example), there is a repeated series of waits until the grace period ends. For normal grace periods, the default is 16 jiffies (for example, 16,000 microseconds on a HZ=1000 system) and for expedited grace periods the default is 128 microseconds. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> Documentation/admin-guide/kernel-parameters.txt | 38 +++++++++++++++++++++++++ kernel/rcu/rcutorture.c | 37 ++++++++++++++++-------- 2 files changed, 63 insertions(+), 12 deletions(-) commit cae7f6319e6451dc49e4239652c6c7b6f54008d2 Author: Paul E. McKenney <paulmck@kernel.org> Date: Wed Nov 6 13:49:44 2024 -0800 rcutorture: Add documentation for recent conditional and polled APIs This commit adds kernel-parameters.txt documentation for rcutorture's (relatively) new gp_cond_exp, gp_cond_full, gp_cond_exp, gp_poll, gp_poll_exp, gp_poll_full, and gp_poll_exp module parameters. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> Documentation/admin-guide/kernel-parameters.txt | 36 ++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) commit a2ab1e457897f4fc8ff23f7ead92ee2b29655c04 Author: Paul E. McKenney <paulmck@kernel.org> Date: Wed Nov 6 12:19:35 2024 -0800 rcutorture: Ignore attempts to test preemption and forward progress Use of the rcutorture preempt_duration and the default-on fwd_progress kernel parameters can result in preemption of callback processing during forward-progress testing, which is an excellent way to OOM your test if your kernel offloads RCU callbacks. This commit therefore treats preempt_duration in the same way as stall_cpu in CONFIG_RCU_NOCB_CPU=y kernels, prohibiting fwd_progress testing and splatting when rcutorture is built in (as opposed to being a loadable module). Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/rcutorture.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ec9d6356bfda69abe5f4767dd56c964127913233 Author: Paul E. McKenney <paulmck@kernel.org> Date: Wed Oct 30 17:10:22 2024 -0700 rcutorture: Make rcutorture_one_extend() check reader state This commit adds reader-state debugging checks to a new function named rcutorture_one_extend_check(), which is invoked before and after setting new reader states by the existing rcutorture_one_extend() function. These checks have proven to be rather heavyweight, reducing reproduction rate of some failures by a factor of two. They are therefore hidden behind a new RCU_TORTURE_TEST_CHK_RDR_STATE Kconfig option. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org> Tested-by: kernel test robot <oliver.sang@intel.com> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/Kconfig.debug | 16 +++++++++++ kernel/rcu/rcutorture.c | 71 ++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 79 insertions(+), 8 deletions(-) commit 16338e7cb7450574ae3a210db6f35280fc44e50e Author: Paul E. McKenney <paulmck@kernel.org> Date: Tue Oct 29 12:21:28 2024 -0700 rcutorture: Pretty-print rcutorture reader segments The current "Failure/close-call rcutorture reader segments" output is good and sufficient, but annoying when you have to interpret several tens of them after an all-night rcutorture run. This commit therefore makes them a bit more human-readable. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/rcutorture.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit b27a34f908c7c2424483e50c13894414bb169aad Author: Paul E. McKenney <paulmck@kernel.org> Date: Tue Oct 29 09:47:11 2024 -0700 rcutorture: Add full read-side contexts to "busted" torture type The purpose of the "busted" torture type is to test rcutorture code paths used only when a too-short grace period is detected. Currently, "busted" only uses normal rcu_read_lock()-style readers, which fails to exercise much of the "Failure/close-call rcutorture reader segments" functionality. This commit therefore sets the .extendables field of rcu_busted_ops to RCUTORTURE_MAX_EXTEND in order to more fully exercise the reporting. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/rcutorture.c | 1 + 1 file changed, 1 insertion(+) commit 3b476823b98685ec4d228af32323854f8e45aac7 Author: Paul E. McKenney <paulmck@kernel.org> Date: Mon Oct 28 16:58:51 2024 -0700 rcutorture: Decorate failing reader segments with last CPU ID In kernels built with CONFIG_RCU_TORTURE_TEST_LOG_CPU=y, the CPU is logged at the beginning of each reader segment. This commit further logs it at the end of the full set of reader segments in order to show any migration that might have occurred during the last reader segment. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/rcutorture.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0f38c06cab7712fc82c314fe4264a8897f3e6365 Author: Paul E. McKenney <paulmck@kernel.org> Date: Mon Oct 28 13:07:11 2024 -0700 rcutorture: Check preemption for failing reader This commit checks to see if the RCU reader has been preempted within its read-side critical section for RCU flavors supporting this notion (currently only preemptible RCU). If such a preemption occurred, then this is printed at the end of the "Failure/close-call rcutorture reader segments" list at the end of the rcutorture run. [ paulmck: Apply kernel test robot feedback. ] Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org> Tested-by: kernel test robot <oliver.sang@intel.com> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> include/linux/rcupdate_wait.h | 11 +++++++++++ kernel/rcu/rcutorture.c | 11 +++++++++++ 2 files changed, 22 insertions(+) commit 4569cf60b6caf26995f314a0c1e14f73ab8c924b Author: Paul E. McKenney <paulmck@kernel.org> Date: Tue Oct 22 14:29:11 2024 -0700 rcutorture: Add ->cond_sync_exp_full function to rcu_ops structure The rcu_ops structure currently lacks a ->cond_sync_exp_full function, which prevents testign of conditional full-state polled grace periods. This commit therefore adds them, enabling testing this option. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/rcutorture.c | 1 + 1 file changed, 1 insertion(+) commit 7b6c1648bb6e041b3f2284b7f602283adc852bb7 Author: Paul E. McKenney <paulmck@kernel.org> Date: Mon Oct 21 07:07:47 2024 -0700 rcutorture: Use finer-grained timeouts for rcu_torture_writer() polling The rcu_torture_writer() polling currently uses timeouts ranging from zero to 16 milliseconds to wait for the polled grace period to end. This works, but it would be better to have a higher probability of exercising races with the code that cleans up after a grace period. This commit therefore switches from these millisecond-scale timeouts to timeouts ranging from zero to 128 microseconds, and with a full microsecond's worth of timeout fuzz. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/rcutorture.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 579a05da40a4980870a13d30cd0532f77aa15b8b Author: Paul E. McKenney <paulmck@kernel.org> Date: Wed Oct 16 09:50:40 2024 -0700 rcutorture: Decorate failing reader segments with CPU ID This commit adds CPU number to the "Failure/close-call rcutorture reader segments" list printed at the end of an rcutorture run that had too-short grace periods. This information can help debugging interactions with migration and CPU hotplug. However, experience indicates that sampling the CPU number in rcutorture's read-side code can reduce the probability of too-short bugs by a small integer factor. And small integer factors are crucial to RCU bug hunting, so this commit also introduces a default-off RCU_TORTURE_TEST_LOG_CPU Kconfig option to enable this CPU-number-logging functionality at build time. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/Kconfig.debug | 15 +++++++++++++++ kernel/rcu/rcutorture.c | 9 +++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) commit 5ec090011bd2bb6ea6c2c607371db57ee0506a89 Author: Paul E. McKenney <paulmck@kernel.org> Date: Thu Oct 10 11:49:54 2024 -0700 rcutorture: Make the TREE03 scenario do preemption This commit adds the rcutorture.preempt_duration module parameter to rcutorture's TREE03.boot parameter list in order to better test preemption of RCU read-side critical sections. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> tools/testing/selftests/rcutorture/configs/rcu/TREE03.boot | 1 + 1 file changed, 1 insertion(+) commit 584975ccb7bd8088e681b0b75335295d0a2c6da1 Author: Paul E. McKenney <paulmck@kernel.org> Date: Thu Oct 10 11:42:53 2024 -0700 rcutorture: Add random real-time preemption This commit adds the rcutorture.preempt_duration kernel module parameter, which gives the real-time preemption duration in milliseconds (zero to disable, which is the default) and also the rcutorture.preempt_interval module parameter, which gives the interval between successive preemptions, also in milliseconds, defaulting to one second. The CPU to preempt is chosen at random from those online at that time. Races between preempting a given CPU and that CPU going offline are ignored, and preemption is forgone when this occurs. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> Documentation/admin-guide/kernel-parameters.txt | 16 +++++++++ kernel/rcu/rcutorture.c | 44 +++++++++++++++++++++++-- 2 files changed, 58 insertions(+), 2 deletions(-) commit a4ea3e41befd012c967edfacacea1594b80f762e Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Wed Dec 4 15:08:57 2024 +0100 hwmon: (isl28022) Drop explicit initialization of struct i2c_device_id::driver_data to 0 This driver doesn't use the driver_data member of struct i2c_device_id, so don't explicitly initialize it. This prepares putting driver_data in an anonymous union which requires either no initialization or named designators. But it's also a nice cleanup on its own. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/20241204140857.1691402-2-u.kleine-koenig@baylibre.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/isl28022.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27cad221a4dddc27b281fabcf500fd307a196bac Author: Guenter Roeck <linux@roeck-us.net> Date: Wed Dec 4 06:17:54 2024 -0800 hwmon: (tmp108) Drop of_match_ptr() protection Limiting the scope of devicetree support to CONFIG_OF prevents use of this driver with ACPI via PRP0001. Drop the dependency. While at it, - Switch of.h for mod_devicetable.h include given the use of struct of_device_id which is defined in that header - Add I2C device ID for p3t1085 - Drop the unnecessary include of hwmon-sysfs.h. Cc: Frank Li <Frank.Li@nxp.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20241204141754.4051186-1-linux@roeck-us.net Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/tmp108.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit bddbb9cff4ab97ad367692201a0abe680a59d44d Author: Stanislav Jakubek <stano.jakubek@gmail.com> Date: Tue Nov 26 09:40:35 2024 +0100 hwmon: (tmp108) Add basic regulator support TMP108/P3T1085 are powered by the V+/VCC regulator, add support for it. Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/tmp108.c | 5 +++++ 1 file changed, 5 insertions(+) commit fd8caceaaeb4c74d7f3917209cc653f70e73f007 Author: Li XingYang <yanhuoguifan@gmail.com> Date: Sun Dec 1 11:47:45 2024 +0800 hwmon: (asus-ec-sensors) Add TUF GAMING X670E PLUS Add support for TUF GAMING X670E PLUS. Signed-off-by: Li XingYang <yanhuoguifan@gmail.com> [groeck: Massaged description] Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/hwmon/asus_ec_sensors.rst | 1 + drivers/hwmon/asus-ec-sensors.c | 11 +++++++++++ 2 files changed, 12 insertions(+) commit 7582b7ae896e3b63fbadbe08af28ba59c95a4d91 Author: Li XingYang <yanhuoguifan@gmail.com> Date: Sun Dec 1 11:47:44 2024 +0800 hwmon: (asus-ec-sensors) Add support for fan cpu opt on AMD 600 motherboards According to the LibreHardwareMonitor project, LibreHardwareMonitorLib/ Hardware/Motherboard/Lpc/EC/EmbeddedController.cs file, fan cpu opt is supported by the AMD600 EC. Registers are described as follows. BoardFamily.Amd600, new Dictionary<ECSensor, EmbeddedControllerSource> { { ECSensor.FanCPUOpt, new EmbeddedControllerSource ("CPU Optional Fan", SensorType.Fan, 0x00b0, 2) }, } Add FanCPUOpt support for AMD600. Signed-off-by: Li XingYang <yanhuoguifan@gmail.com> [groeck: Massaged subject and description] Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/asus-ec-sensors.c | 2 ++ 1 file changed, 2 insertions(+) commit 2505f87eb3af55f3dd7f57d7cb7783b94b52a2d9 Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Tue Dec 3 18:31:49 2024 +0100 hwmon: (nct6775): Actually make use of the HWMON_NCT6775 symbol namespace DEFAULT_SYMBOL_NAMESPACE must already be defined when <linux/export.h> is included. So move the define above the include block. Fixes: c3963bc0a0cf ("hwmon: (nct6775) Split core and platform driver") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/nct6775-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 339bca4ffdaa7267b1597e634ac6002a133ad7b8 Author: Jerome Brunet <jbrunet@baylibre.com> Date: Mon Dec 2 11:28:02 2024 +0100 hwmon: (pmbus/tps25990) Add initial support Add initial support for the Texas Instruments TPS25990 eFuse. This adds the basic PMBUS telemetry support for the device. From Karol Przybylski: The tps25990_read_word_data function contains a block of unreachable code caused by the syntactic structure in the PMBUS_VIRT_READ_IIN_MAX case. Specifically, the return TPS25990_READ_IIN_PEAK; statement immediately exits the function, making the next lines unreachable. This patch removes the return statement, leaving the expected handling. Discovered in coverity: CID 1602227 Tested-by: Vaishnav Achath <vaishnav.a@ti.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> [groeck: Adjust to MODULE_IMPORT_NS API change] [karprzy7@gmail.com: Fix unreachable code in tps25990_read_word_data] Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/hwmon/index.rst | 1 + Documentation/hwmon/tps25990.rst | 147 +++++++++++++ MAINTAINERS | 2 + drivers/hwmon/pmbus/Kconfig | 17 ++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/tps25990.c | 436 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 604 insertions(+) commit 83bed3c159f44bf2e205875feb8d932bbcf1b656 Author: Jerome Brunet <jbrunet@baylibre.com> Date: Mon Dec 2 11:28:01 2024 +0100 hwmon: (pmbus/core) add wp module param Add a module parameter to force the write protection mode of pmbus chips. 4 protections modes are provided to start with: * 0: Remove the write protection * 1: Disable all writes except to the WRITE_PROTECT, OPERATION, PAGE, ON_OFF_CONFIG and VOUT_COMMAND commands * 2: Disable all writes except to the WRITE_PROTECT, OPERATION and PAGE commands * 3: Disable all writes except to the WRITE_PROTECT command Of course, if the parameter is not provided, the default write protection status of the pmbus chips is left untouched. Suggested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/hwmon/pmbus-core.rst | 21 +++++++++++++++++++++ drivers/hwmon/pmbus/pmbus_core.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) commit f40452577557caf0e5d0ff182da8479c3d492ac5 Author: Jerome Brunet <jbrunet@baylibre.com> Date: Mon Dec 2 11:28:00 2024 +0100 hwmon: (pmbus/core) improve handling of write protected regulators Writing PMBus protected registers does succeed from the smbus perspective, even if the write is ignored by the device and a communication fault is raised. This fault will silently be caught and cleared by pmbus irq if one has been registered. This means that the regulator call may return succeed although the operation was ignored. With this change, the operation which are not supported will be properly flagged as such and the regulator framework won't even try to execute them. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> [groeck: Adjust to EXPORT_SYMBOL_NS_GPL API change] Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/hwmon/pmbus-core.rst | 14 ++++++++++ drivers/hwmon/pmbus/pmbus.h | 4 +++ drivers/hwmon/pmbus/pmbus_core.c | 52 +++++++++++++++++++++++++++++++++----- include/linux/pmbus.h | 14 ++++++++++ 4 files changed, 78 insertions(+), 6 deletions(-) commit c26eef895794b31be8a2714b8a1b5d0b8b605bc4 Author: Stefan Wahren <wahrenst@gmx.net> Date: Mon Dec 2 12:58:32 2024 +0100 hwmon: (raspberrypi) Add PM suspend/resume support Add suspend/resume handler in order to stop firmware polling during s2idle. This was just waking-up the system without a real benefit. Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/raspberrypi-hwmon.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 4d2ffc42f78c429b7d42a635351a654c6f0b01b5 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Nov 18 07:15:59 2024 +0100 hwmon: (core) Avoid ifdef CONFIG_THERMAL in C source file Using an #ifdef in a C source files to have different definitions of the same symbol makes the code harder to read and understand. Furthermore it makes it harder to test compilation of the different branches. Replace the ifdeffery with IS_ENABLED() which is just a normal conditional. The resulting binary is still the same as before as the compiler optimizes away all the unused code and definitions. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/hwmon.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit 868dc3cd1105bd328be864bf2c409891438df44a Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Nov 18 07:15:58 2024 +0100 thermal: core: Add stub for thermal_zone_device_update() To simplify the !CONFIG_THERMAL case in the hwmon core, add a !CONFIG_THERMAL stub for thermal_zone_device_update(). Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Rafael J. Wysocki <rafael@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> include/linux/thermal.h | 4 ++++ 1 file changed, 4 insertions(+) commit 232ba88182083b4410df41cf310c9a16b84e547e Author: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Thu Nov 21 22:44:56 2024 +0100 hwmon: (chipcap2) Switch to guard() for mutext handling Switch to guard() for mutex handling to simplify the code, getting rid of the 'ret = x, break; return ret;' construct and return the result of the operation instead. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/chipcap2.c | 63 ++++++++++++++---------------------------------- 1 file changed, 18 insertions(+), 45 deletions(-) commit f6477c85db0c34c8ed98c899d698251b4847d387 Author: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Thu Nov 21 22:44:55 2024 +0100 MAINTAINERS: Drop IIO from the title of the Chipcap 2 hwmon driver The Chipcap 2 driver belongs to hwmon, and not to iio. When at it, drop the sensor type description, as that is documented elsewhere. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10208399dbe0967880ed32ec43f663f644fde36e Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Wed Nov 20 09:33:52 2024 +0100 hwmon: (isl28022) apply coding style to module init/exit Function declarations can be in one line. module_init|exit macros should be tied to the function. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> drivers/hwmon/isl28022.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 262a3f6ea8f11aaf27571712a0f983cbea874278 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Wed Nov 20 09:33:51 2024 +0100 hwmon: (isl28022) document shunt voltage channel During the upstreaming process, the driver has been extended to report the shunt voltage as well. Document that. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/hwmon/isl28022.rst | 1 + 1 file changed, 1 insertion(+) commit 895cbbc122589925ab7082c0a83285db74c32ff8 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Wed Nov 20 09:33:50 2024 +0100 hwmon: (isl28022) use proper path for DT bindings Vendor is "Renesas" not "ISL". Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Documentation/hwmon/isl28022.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0203b485d26d5b403ff4ed21e4cc85ba9ec0fe67 Author: Paul E. McKenney <paulmck@kernel.org> Date: Wed Oct 9 16:42:37 2024 -0700 torture: Add dowarn argument to torture_sched_setaffinity() Current use cases of torture_sched_setaffinity() are well served by its unconditional warning on error. However, an upcoming use case for a preemption kthread needs to avoid warnings that might otherwise arise when that kthread attempted to bind itself to a CPU on its way offline. This commit therefore adds a dowarn argument that, when false, suppresses the warning. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> include/linux/torture.h | 2 +- kernel/locking/locktorture.c | 6 +++--- kernel/rcu/rcutorture.c | 2 +- kernel/rcu/update.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit 6ca774f06a7df650f41b38b67bec0665d862ac23 Author: Paul E. McKenney <paulmck@kernel.org> Date: Wed Oct 9 11:56:28 2024 -0700 torture: Make kvm-remote.sh give up on unresponsive system Currently, a system that stops responding at the wrong time will hang kvm-remote.sh. This can happen when the system in question is forced offline for maintenance, and there is currently no way for the user to kick this script into moving ahead. This commit therefore causes kvm-remote.sh to wait at most 15 minutes for a non-responsive system, that is, a system for which ssh gives an exit code of 255. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> .../testing/selftests/rcutorture/bin/kvm-remote.sh | 25 ++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit 1806b1f97f7ab0bb8bda7c117b2573a335cea940 Author: Paul E. McKenney <paulmck@kernel.org> Date: Wed Oct 9 11:02:49 2024 -0700 refscale: Add test for sched_clock() This commit adds a "sched-clock" test for the sched_clock() function. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> kernel/rcu/refscale.c | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) commit aea2654cce40a6e34e91f3be2a31cd040fdea822 Author: Ricardo B. Marliere <rbm@suse.com> Date: Fri Dec 13 16:35:05 2024 -0300 tty: Make sysctl table const Since commit 7abc9b53bd51 ("sysctl: allow registration of const struct ctl_table"), the sysctl registration API allows for struct ctl_table to be in read-only memory. Move tty_table to be declared at build time, instead of having to be dynamically allocated at boot time. Cc: Thomas Weißschuh <linux@weissschuh.net> Suggested-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Ricardo B. Marliere <rbm@suse.com> Link: https://lore.kernel.org/r/20241213-sysctl_const-tty-v1-1-2e2bcec77f85@suse.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/tty_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2740f7d878932a4b4aaf69d751baf3825c1b287 Author: Jiri Slaby (SUSE) <jirislaby@kernel.org> Date: Wed Dec 11 08:49:33 2024 +0100 tty: serial: extract uart_change_port() from uart_set_info() This "change_port" part of uart_set_info() is for no good reason inlined there. It makes the function rather hard to read. Therefore, extract it to a separate function. This allows for flattening the ifs (with short path "return"s) and avoiding two levels of indentation. Both making the code really flat and comprehesible. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20241211074933.92973-4-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/serial_core.c | 114 ++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 56 deletions(-) commit 4d0e56d571b8675e5a4863f394884c7db4387bcb Author: Jiri Slaby (SUSE) <jirislaby@kernel.org> Date: Wed Dec 11 08:49:32 2024 +0100 tty: serial: get rid of exit label from uart_set_info() The label is unneeded since 7ba2e769825f (tty: Split the serial_core helpers for setserial into two). Until then, there was a lock held in uart_set_info(). Now it is not, so we can remove the label. This involves reordering the code, so that it is clear what values are returned, where and why. Until now, it was really hard to follow. The "change_port" part of the function is extracted into a separate function in the next patch. This patch makes the transition there easier too. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20241211074933.92973-3-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/serial_core.c | 116 +++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 65 deletions(-) commit e52ed2dd8287f7438c80e8e5e8c8bf14400cc1a2 Author: Jiri Slaby (SUSE) <jirislaby@kernel.org> Date: Wed Dec 11 08:49:31 2024 +0100 tty: serial_core: use more guard(mutex) Simplify 4 more functions using guard(mutex): uart_get_info(), console_store(), serial_core_add_one_port(), and serial_core_register_port(). Especially console_store() is now much less convoluted. In the others, we save some goto-s and even local variables are dropped in some. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20241211074933.92973-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/serial_core.c | 83 +++++++++++++++------------------------- 1 file changed, 31 insertions(+), 52 deletions(-) commit bc9c7e56a14ba71027256c4b48e0590e0c29798f Author: Tobias Klauser <tklauser@distanz.ch> Date: Thu Dec 5 10:11:38 2024 +0100 serial: altera_uart: Use KBUILD_MODNAME There is no need to redefine the driver name. Use KBUILD_MODNAME and get rid of DRV_NAME altogether. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Link: https://lore.kernel.org/r/20241205091138.25894-1-tklauser@distanz.ch Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/altera_uart.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 6ebb05b48e9c555f23a042dcbb45280a0f26def8 Author: Christian Brauner <brauner@kernel.org> Date: Fri Nov 29 14:38:03 2024 +0100 fhandle: pull CAP_DAC_READ_SEARCH check into may_decode_fh() There's no point in keeping it outside of that helper. This way we have all the permission pieces in one place. Link: https://lore.kernel.org/r/20241129-work-pidfs-file_handle-v1-4-87d803a42495@kernel.org Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/fhandle.c | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) commit 50166d57ea8c5042ecba0ee22532617d72ed085a Author: Christian Brauner <brauner@kernel.org> Date: Fri Nov 29 14:38:02 2024 +0100 exportfs: add open method This allows filesystems such as pidfs to provide their custom open. Link: https://lore.kernel.org/r/20241129-work-pidfs-file_handle-v1-3-87d803a42495@kernel.org Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/fhandle.c | 7 ++++++- include/linux/exportfs.h | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit f07c7cc4684a641032c6bd439d3b91ec336e8cb5 Author: Christian Brauner <brauner@kernel.org> Date: Fri Nov 29 14:38:01 2024 +0100 fhandle: simplify error handling Rely on our cleanup infrastructure. Link: https://lore.kernel.org/r/20241129-work-pidfs-file_handle-v1-2-87d803a42495@kernel.org Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/fhandle.c | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) commit d8b47d051eab9729417ea35d3c27fbe8ebd9f5c6 Merge: 40384c840ea1 230536ff6b06 Author: Christian Brauner <brauner@kernel.org> Date: Fri Nov 29 20:49:42 2024 +0100 Merge patch series "pidfs: file handle preliminaries" Christian Brauner <brauner@kernel.org> says: This reworks the inode number allocation for pidfs in order to support file handles properly. Recently we received a patchset that aims to enable file handle encoding and decoding via name_to_handle_at(2) and open_by_handle_at(2). A crucical step in the patch series is how to go from inode number to struct pid without leaking information into unprivileged contexts. The issue is that in order to find a struct pid the pid number in the initial pid namespace must be encoded into the file handle via name_to_handle_at(2). This can be used by containers using a separate pid namespace to learn what the pid number of a given process in the initial pid namespace is. While this is a weak information leak it could be used in various exploits and in general is an ugly wart in the design. To solve this problem a new way is needed to lookup a struct pid based on the inode number allocated for that struct pid. The other part is to remove the custom inode number allocation on 32bit systems that is also an ugly wart that should go away. So, a new scheme is used that I was discusssing with Tejun some time back. A cyclic ida is used for the lower 32 bits and a the high 32 bits are used for the generation number. This gives a 64 bit inode number that is unique on both 32 bit and 64 bit. The lower 32 bit number is recycled slowly and can be used to lookup struct pids. * patches from https://lore.kernel.org/r/20241129-work-pidfs-v2-0-61043d66fbce@kernel.org: pidfs: support FS_IOC_GETVERSION pidfs: remove 32bit inode number handling pidfs: rework inode number allocation Link: https://lore.kernel.org/r/20241129-work-pidfs-v2-0-61043d66fbce@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> commit d2ab36bb115b720c9c738184d4007e1ca01c53da Author: Erin Shepherd <erin.shepherd@e43.eu> Date: Fri Nov 29 14:38:00 2024 +0100 pseudofs: add support for export_ops Pseudo-filesystems might reasonably wish to implement the export ops (particularly for name_to_handle_at/open_by_handle_at); plumb this through pseudo_fs_context Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Erin Shepherd <erin.shepherd@e43.eu> Link: https://lore.kernel.org/r/20241113-pidfs_fh-v2-1-9a4d28155a37@e43.eu Link: https://lore.kernel.org/r/20241129-work-pidfs-file_handle-v1-1-87d803a42495@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> fs/libfs.c | 1 + include/linux/pseudo_fs.h | 1 + 2 files changed, 2 insertions(+) commit 230536ff6b06b199995687aa7fbf164970ebda85 Author: Christian Brauner <brauner@kernel.org> Date: Fri Nov 29 14:02:25 2024 +0100 pidfs: support FS_IOC_GETVERSION This will allow 32 bit userspace to detect when a given inode number has been recycled and also to construct a unique 64 bit identifier. Link: https://lore.kernel.org/r/20241129-work-pidfs-v2-3-61043d66fbce@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/pidfs.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 03c212bf3fa86820baa5bcad75cfabb845166ccd Author: Christian Brauner <brauner@kernel.org> Date: Fri Nov 29 14:02:24 2024 +0100 pidfs: remove 32bit inode number handling Now that we have a unified inode number handling model remove the custom ida-based allocation for 32bit. Link: https://lore.kernel.org/r/20241129-work-pidfs-v2-2-61043d66fbce@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/pidfs.c | 43 ++----------------------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) commit 9698d5a4836549d394e6efd858b5200878c9f255 Author: Christian Brauner <brauner@kernel.org> Date: Fri Nov 29 14:02:23 2024 +0100 pidfs: rework inode number allocation Recently we received a patchset that aims to enable file handle encoding and decoding via name_to_handle_at(2) and open_by_handle_at(2). A crucical step in the patch series is how to go from inode number to struct pid without leaking information into unprivileged contexts. The issue is that in order to find a struct pid the pid number in the initial pid namespace must be encoded into the file handle via name_to_handle_at(2). This can be used by containers using a separate pid namespace to learn what the pid number of a given process in the initial pid namespace is. While this is a weak information leak it could be used in various exploits and in general is an ugly wart in the design. To solve this problem a new way is needed to lookup a struct pid based on the inode number allocated for that struct pid. The other part is to remove the custom inode number allocation on 32bit systems that is also an ugly wart that should go away. So, a new scheme is used that I was discusssing with Tejun some time back. A cyclic ida is used for the lower 32 bits and a the high 32 bits are used for the generation number. This gives a 64 bit inode number that is unique on both 32 bit and 64 bit. The lower 32 bit number is recycled slowly and can be used to lookup struct pids. Link: https://lore.kernel.org/r/20241129-work-pidfs-v2-1-61043d66fbce@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/pidfs.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++- include/linux/pidfs.h | 2 ++ kernel/pid.c | 14 ++++----- 3 files changed, 86 insertions(+), 8 deletions(-) commit 21fc6178e92070523e70fc5db59ac83806d269d6 Author: Tom Lendacky <thomas.lendacky@amd.com> Date: Mon Dec 2 14:50:53 2024 -0600 x86/sev/docs: Document the SNP Reverse Map Table (RMP) Update the AMD memory encryption documentation to include information on the Reverse Map Table (RMP) and the two table formats. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Nikunj A Dadhania <nikunj@amd.com> Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com> Link: https://lore.kernel.org/r/d3feea54912ad9ff2fc261223db691ca11fc547f.1733172653.git.thomas.lendacky@amd.com Documentation/arch/x86/amd-memory-encryption.rst | 118 +++++++++++++++++++++++ 1 file changed, 118 insertions(+) commit de7a4e01055b040b303d01d709262b7ce9d818ff Author: Faraz Ata <faraz.ata@samsung.com> Date: Thu Dec 12 17:27:05 2024 +0530 arm64: dts: exynosautov920: Add DMA nodes ExynosAutov920 SoC has 7 DMA controllers. Two secure DMAC (SPDMA0 & SPDMA1) and five non-secure DMAC (PDMA0 to PDMA4). Add the required dt nodes for the same. Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Faraz Ata <faraz.ata@samsung.com> Link: https://lore.kernel.org/r/20241212115709.1724-1-faraz.ata@samsung.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/exynosautov920.dtsi | 63 ++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 8ae3291f773befee8fdeae11b0b1b5d380e4dfb6 Author: Tom Lendacky <thomas.lendacky@amd.com> Date: Fri Dec 13 08:55:42 2024 -0600 x86/sev: Add full support for a segmented RMP table A segmented RMP table allows for improved locality of reference between the memory protected by the RMP and the RMP entries themselves. Add support to detect and initialize a segmented RMP table with multiple segments as configured by the system BIOS. While the RMPREAD instruction will be used to read an RMP entry in a segmented RMP, initialization and debugging capabilities will require the mapping of the segments. The RMP_CFG MSR indicates if segmented RMP support is enabled and, if enabled, the amount of memory that an RMP segment covers. When segmented RMP support is enabled, the RMP_BASE MSR points to the start of the RMP bookkeeping area, which is 16K in size. The RMP Segment Table (RST) is located immediately after the bookkeeping area and is 4K in size. The RST contains up to 512 8-byte entries that identify the location of the RMP segment and amount of memory mapped by the segment (which must be less than or equal to the configured segment size). The physical address that is covered by a segment is based on the segment size and the index of the segment in the RST. The RMP entry for a physical address is based on the offset within the segment. For example, if the segment size is 64GB (0x1000000000 or 1 << 36), then physical address 0x9000800000 is RST entry 9 (0x9000800000 >> 36) and RST entry 9 covers physical memory 0x9000000000 to 0x9FFFFFFFFF. The RMP entry index within the RMP segment is the physical address AND-ed with the segment mask, 64GB - 1 (0xFFFFFFFFF), and then right-shifted 12 bits or PHYS_PFN(0x9000800000 & 0xFFFFFFFFF), which is 0x800. CPUID 0x80000025_EBX[9:0] describes the number of RMP segments that can be cached by the hardware. Additionally, if CPUID 0x80000025_EBX[10] is set, then the number of actual RMP segments defined cannot exceed the number of RMP segments that can be cached and can be used as a maximum RST index. [ bp: Unify printk hex format specifiers. ] Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Nikunj A Dadhania <nikunj@amd.com> Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com> Link: https://lore.kernel.org/r/02afd0ffd097a19cb6e5fb1bb76eb110496c5b11.1734101742.git.thomas.lendacky@amd.com arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/msr-index.h | 8 +- arch/x86/virt/svm/sev.c | 260 ++++++++++++++++++++++++++++++++++--- 3 files changed, 245 insertions(+), 24 deletions(-) commit 8749e19c133e6790254252d6dc4fd16d67f7edee Author: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Date: Wed Dec 11 18:29:42 2024 +0200 arm64: dts: exynos8895: Add a PMU node for the second cluster Since we have a PMU compatible for Samsung's Mongoose cores now, drop the comment that explains the lack of it and define the node. Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Link: https://lore.kernel.org/r/20241211162942.450525-2-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/exynos8895.dtsi | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 5119e6b44f8ada5f5cea19935a7f005fee062aef Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 11 21:42:27 2024 +0000 memory: omap-gpmc: deadcode a pair of functions gpmc_get_client_irq() last use was removed by commit ac28e47ccc3f ("ARM: OMAP2+: Remove legacy gpmc-nand.c") gpmc_ticks_to_ns() last use was removed by commit 2514830b8b8c ("ARM: OMAP2+: Remove gpmc-onenand") Remove them. gpmc_clk_ticks_to_ns() is now only used in some DEBUG code; move inside the ifdef to avoid unused warnings. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Roger Quadros <rogerq@kernel.org> Acked-by: Kevin Hilman <khilman@baylibre.com> Link: https://lore.kernel.org/r/20241211214227.107980-1-linux@treblig.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/memory/omap-gpmc.c | 33 +++++++-------------------------- include/linux/omap-gpmc.h | 4 ---- 2 files changed, 7 insertions(+), 30 deletions(-) commit 0f14af0d1d7df0086b1be98d2cea1cad4b8c826f Author: Tom Lendacky <thomas.lendacky@amd.com> Date: Mon Dec 2 14:50:51 2024 -0600 x86/sev: Treat the contiguous RMP table as a single RMP segment In preparation for support of a segmented RMP table, treat the contiguous RMP table as a segmented RMP table with a single segment covering all of memory. By treating a contiguous RMP table as a single segment, much of the code that initializes and accesses the RMP can be re-used. Segmented RMP tables can have up to 512 segment entries. Each segment will have metadata associated with it to identify the segment location, the segment size, etc. The segment data and the physical address are used to determine the index of the segment within the table and then the RMP entry within the segment. For an actual segmented RMP table environment, much of the segment information will come from a configuration MSR. For the contiguous RMP, though, much of the information will be statically defined. [ bp: Touchups, explain array_index_nospec() usage. ] Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Nikunj A Dadhania <nikunj@amd.com> Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com> Link: https://lore.kernel.org/r/8c40fbc9c5217f0d79b37cf861eff03ab0330bef.1733172653.git.thomas.lendacky@amd.com arch/x86/virt/svm/sev.c | 199 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 180 insertions(+), 19 deletions(-) commit bdd03ebf721f70df1458a720b25998a489f63297 Author: Igor Belwon <igor.belwon@mentallysanemainliners.org> Date: Mon Dec 9 15:45:23 2024 +0100 clk: samsung: Introduce Exynos990 clock controller driver The current implementation contains support for: - CMU_TOP - which generates clocks for other blocks - CMU_HSI0 - which generates clocks for USB31. Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org> Link: https://lore.kernel.org/r/20241209-exynos990-cmu-v4-3-57f07080f9e4@mentallysanemainliners.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/clk/samsung/Makefile | 1 + drivers/clk/samsung/clk-exynos990.c | 1343 +++++++++++++++++++++++++++++++++++ 2 files changed, 1344 insertions(+) commit ac517965a5a12d685f1e7a7f77e64503167f87d5 Author: Tom Lendacky <thomas.lendacky@amd.com> Date: Mon Dec 2 14:50:50 2024 -0600 x86/sev: Map only the RMP table entries instead of the full RMP range In preparation for support of a segmented RMP table, map only the RMP table entries. The RMP bookkeeping area is only ever accessed when first enabling SNP and does not need to remain mapped. To accomplish this, split the initialization of the RMP bookkeeping area and the initialization of the RMP entry area. The RMP bookkeeping area will be mapped only while it is being initialized. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Nikunj A Dadhania <nikunj@amd.com> Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com> Reviewed-by: Ashish Kalra <ashish.kalra@amd.com> Link: https://lore.kernel.org/r/22f179998d319834f49c13a8c01187fbf0fd308d.1733172653.git.thomas.lendacky@amd.com arch/x86/virt/svm/sev.c | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) commit 4a450ed26c580316d720154e7ffb5e9b4763a11a Author: Igor Belwon <igor.belwon@mentallysanemainliners.org> Date: Mon Dec 9 15:45:22 2024 +0100 clk: samsung: clk-pll: Add support for pll_{0717x, 0718x, 0732x} These PLLs are found in the Exynos990 SoC. The PLLs are similar to pll0822x. pll0717x and pll0718x are an exception, and they use the mdiv mask from 1718X (that is, one bit smaller). Apart from that, the masks/shifts are identical to those of 0822x. Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org> Link: https://lore.kernel.org/r/20241209-exynos990-cmu-v4-2-57f07080f9e4@mentallysanemainliners.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/clk/samsung/clk-pll.c | 14 ++++++++++++-- drivers/clk/samsung/clk-pll.h | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) commit 5feae3e79dbe2d357b223fc48ae907ba0aedb271 Author: Igor Belwon <igor.belwon@mentallysanemainliners.org> Date: Mon Dec 9 15:45:21 2024 +0100 dt-bindings: clock: samsung: Add Exynos990 SoC CMU bindings Add dt-schema documentation for the Exynos990 SoC CMU. This clock management unit has a topmost block (CMU_TOP) that generates top clocks for other blocks. Currently the only other block implemented is CMU_HSI0, which provides clocks for the USB part of the SoC. Also, device-tree binding definitions added for these blocks: - CMU_TOP - CMU_HSI0 Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org> Link: https://lore.kernel.org/r/20241209-exynos990-cmu-v4-1-57f07080f9e4@mentallysanemainliners.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> .../bindings/clock/samsung,exynos990-clock.yaml | 121 +++++++++++ include/dt-bindings/clock/samsung,exynos990.h | 236 +++++++++++++++++++++ 2 files changed, 357 insertions(+) commit e2f3d40df82eeb70f6c3602418bca63c54183776 Author: Tom Lendacky <thomas.lendacky@amd.com> Date: Mon Dec 2 14:50:49 2024 -0600 x86/sev: Move the SNP probe routine out of the way To make patch review easier for the segmented RMP support, move the SNP probe function out from in between the initialization-related routines. No functional change. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Nikunj A Dadhania <nikunj@amd.com> Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com> Link: https://lore.kernel.org/r/6c2975bbf132d567dd12e1435be1d18c0bf9131c.1733172653.git.thomas.lendacky@amd.com arch/x86/virt/svm/sev.c | 60 ++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 0f28374e99a46bfb5ece60af0791ccc840a6aa89 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:50:27 2024 +0100 w1: ds28e04: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-w1-v1-12-c4befd2aa7cc@weissschuh.net Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/slaves/w1_ds28e04.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 0ef2a9b2439a119508b7b80e1024f0d19dd0c7dc Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:50:26 2024 +0100 w1: ds2805: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-w1-v1-11-c4befd2aa7cc@weissschuh.net Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/slaves/w1_ds2805.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c797bbdac5dc5d695d56a50845f5cce25122e99a Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:50:25 2024 +0100 w1: ds2781: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-w1-v1-10-c4befd2aa7cc@weissschuh.net Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/slaves/w1_ds2781.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4a68c8530fcaf12f977db89d25340d2a233d3177 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:50:24 2024 +0100 w1: ds2780: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-w1-v1-9-c4befd2aa7cc@weissschuh.net Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/slaves/w1_ds2780.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 83544525d1ab7bade074e6a41cb5d6211b2efa0d Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:50:23 2024 +0100 w1: ds2438: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-w1-v1-8-c4befd2aa7cc@weissschuh.net Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/slaves/w1_ds2438.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 1398800d8274afe138361a803c900ad563c32bb1 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:50:22 2024 +0100 w1: ds2433: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-w1-v1-7-c4befd2aa7cc@weissschuh.net Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/slaves/w1_ds2433.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 86b04e4dcf8ae443aef9f871874120260d89a7ee Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:50:21 2024 +0100 w1: ds2431: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-w1-v1-6-c4befd2aa7cc@weissschuh.net Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/slaves/w1_ds2431.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit be0d277fd319e1e702f325757e6fa208945d745e Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:50:20 2024 +0100 w1: ds2430: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-w1-v1-5-c4befd2aa7cc@weissschuh.net Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/slaves/w1_ds2430.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f597a4ce8c91dab3a192b2615769b54450031ce0 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:50:19 2024 +0100 w1: ds2413: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-w1-v1-4-c4befd2aa7cc@weissschuh.net Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/slaves/w1_ds2413.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 492772838ddfd266fac83a8f47e44ee28c8d414b Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:50:18 2024 +0100 w1: ds2408: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-w1-v1-3-c4befd2aa7cc@weissschuh.net Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/slaves/w1_ds2408.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit edc52050f81c5d190e7e4e7cfd1b8a6a401b394d Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:50:17 2024 +0100 w1: ds2406: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-w1-v1-2-c4befd2aa7cc@weissschuh.net Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/slaves/w1_ds2406.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 699e5f2f28c8f68ae3d3f58ba99f711b006c355b Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 18:50:16 2024 +0100 w1: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241211-sysfs-const-bin_attr-w1-v1-1-c4befd2aa7cc@weissschuh.net Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/w1.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 4972808d6f4a2b4c10eb3035d769f2e1a003da2f Author: Tom Lendacky <thomas.lendacky@amd.com> Date: Mon Dec 2 14:50:48 2024 -0600 x86/sev: Require the RMPREAD instruction after Zen4 Limit usage of the non-architectural RMP format to Zen3/Zen4 processors. The RMPREAD instruction, with architectural defined output, is available and should be used for RMP access beyond Zen4. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Nikunj A Dadhania <nikunj@amd.com> Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com> Reviewed-by: Ashish Kalra <ashish.kalra@amd.com> Link: https://lore.kernel.org/r/5be0093e091778a151266ea853352f62f838eb99.1733172653.git.thomas.lendacky@amd.com arch/x86/kernel/cpu/amd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit f916e44487f56df4827069ff3a2070c0746dc511 Author: Eric Biggers <ebiggers@google.com> Date: Sat Dec 7 11:57:52 2024 -0800 crypto: keywrap - remove assignment of 0 to cra_alignmask Since this code is zero-initializing the algorithm struct, the assignment of 0 to cra_alignmask is redundant. Remove it to reduce the number of matches that are found when grepping for cra_alignmask. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> crypto/keywrap.c | 1 - 1 file changed, 1 deletion(-) commit 5478ced4783cfc84ee5f0a4945ce61e8d111bef9 Author: Eric Biggers <ebiggers@google.com> Date: Sat Dec 7 11:57:51 2024 -0800 crypto: aegis - remove assignments of 0 to cra_alignmask Struct fields are zero by default, so these lines of code have no effect. Remove them to reduce the number of matches that are found when grepping for cra_alignmask. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> crypto/aegis128-core.c | 2 -- 1 file changed, 2 deletions(-) commit a6185842d1b8e7ef5a1a239f26361a39cc291a0b Author: Eric Biggers <ebiggers@google.com> Date: Sat Dec 7 11:57:50 2024 -0800 crypto: x86 - remove assignments of 0 to cra_alignmask Struct fields are zero by default, so these lines of code have no effect. Remove them to reduce the number of matches that are found when grepping for cra_alignmask. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> arch/x86/crypto/aegis128-aesni-glue.c | 1 - arch/x86/crypto/blowfish_glue.c | 1 - arch/x86/crypto/camellia_glue.c | 1 - arch/x86/crypto/des3_ede_glue.c | 1 - arch/x86/crypto/twofish_glue.c | 1 - 5 files changed, 5 deletions(-) commit 047ea6d85ee32c768ceec9a3ad6b7f403971aa63 Author: Eric Biggers <ebiggers@google.com> Date: Sat Dec 7 11:57:49 2024 -0800 crypto: seed - stop using cra_alignmask Instead of specifying a nonzero alignmask, use the unaligned access helpers. This eliminates unnecessary alignment operations on most CPUs, which can handle unaligned accesses efficiently, and brings us a step closer to eventually removing support for the alignmask field. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> crypto/seed.c | 48 +++++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 27 deletions(-) commit 7e0061586f1d6a38641a2f444855c1ddeb10d17e Author: Eric Biggers <ebiggers@google.com> Date: Sat Dec 7 11:57:48 2024 -0800 crypto: khazad - stop using cra_alignmask Instead of specifying a nonzero alignmask, use the unaligned access helpers. This eliminates unnecessary alignment operations on most CPUs, which can handle unaligned accesses efficiently, and brings us a step closer to eventually removing support for the alignmask field. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> crypto/khazad.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 5e252f490c1c2c989cdc2ca50744f30fbca356b4 Author: Eric Biggers <ebiggers@google.com> Date: Sat Dec 7 11:57:47 2024 -0800 crypto: tea - stop using cra_alignmask Instead of specifying a nonzero alignmask, use the unaligned access helpers. This eliminates unnecessary alignment operations on most CPUs, which can handle unaligned accesses efficiently, and brings us a step closer to eventually removing support for the alignmask field. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> crypto/tea.c | 83 ++++++++++++++++++++++++------------------------------------ 1 file changed, 33 insertions(+), 50 deletions(-) commit 6c178fd66b4de03101fefe91e1a987052051add2 Author: Eric Biggers <ebiggers@google.com> Date: Sat Dec 7 11:57:46 2024 -0800 crypto: aria - stop using cra_alignmask Instead of specifying a nonzero alignmask, use the unaligned access helpers. This eliminates unnecessary alignment operations on most CPUs, which can handle unaligned accesses efficiently, and brings us a step closer to eventually removing support for the alignmask field. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> crypto/aria_generic.c | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit 8d90528228adcc091b41244fab4d0003d59bdba4 Author: Eric Biggers <ebiggers@google.com> Date: Sat Dec 7 11:57:45 2024 -0800 crypto: anubis - stop using cra_alignmask Instead of specifying a nonzero alignmask, use the unaligned access helpers. This eliminates unnecessary alignment operations on most CPUs, which can handle unaligned accesses efficiently, and brings us a step closer to eventually removing support for the alignmask field. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> crypto/anubis.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 07d58e0a60f70b3cc176c9427d1ea856d1756820 Author: Eric Biggers <ebiggers@google.com> Date: Sat Dec 7 11:05:03 2024 -0800 crypto: skcipher - remove support for physical address walks Since the physical address support in skcipher_walk is not used anymore, remove all the code associated with it. This includes: - The skcipher_walk_async() and skcipher_walk_complete() functions; - The SKCIPHER_WALK_PHYS flag and everything conditional on it; - The buffers, phys, and virt.page fields in struct skcipher_walk; - struct skcipher_walk_buffer. As a result, skcipher_walk now just supports virtual addresses. Physical address support in skcipher_walk is unneeded because drivers that need physical addresses just use the scatterlists directly. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> crypto/skcipher.c | 187 ++++++------------------------------- include/crypto/internal/skcipher.h | 12 --- 2 files changed, 26 insertions(+), 173 deletions(-) commit 9cda46babdfed9804214b1eecb4219786d91c9c7 Author: Eric Biggers <ebiggers@google.com> Date: Sat Dec 7 11:05:02 2024 -0800 crypto: n2 - remove Niagara2 SPU driver Remove the driver for the Stream Processing Unit (SPU) on the Niagara 2. Removing this driver allows removing the support for physical address walks in skcipher_walk. That is a misfeature that is used only by this driver and increases the overhead of the crypto API for everyone else. There is little evidence that anyone cares about this driver. The Niagara 2, a.k.a. the UltraSPARC T2, is a server CPU released in 2007. The SPU is also present on the SPARC T3, released in 2010. However, the SPU went away in SPARC T4, released in 2012, which replaced it with proper cryptographic instructions instead. These newer instructions are supported by the kernel in arch/sparc/crypto/. This driver was completely broken from (at least) 2015 to 2022, from commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero") to commit 76a4e8745935 ("crypto: n2 - add missing hash statesize"), since its probe function always returned an error before registering any algorithms. Though, even with that obvious issue fixed, it is unclear whether the driver now works correctly. E.g., there are no indications that anyone has run the self-tests recently. One bug report for this driver in 2017 (https://lore.kernel.org/r/nycvar.YFH.7.76.1712110214220.28416@n3.vanv.qr) complained that it crashed the kernel while being loaded. The reporter didn't seem to care about the functionality of the driver, but rather just the fact that loading it crashed the kernel. In fact not until 2022 was the driver fixed to maybe actually register its algorithms with the crypto API. The 2022 fix does have a Reported-by and Tested-by, but that may similarly have been just about making the error messages go away as opposed to someone actually wanting to use the driver. As such, it seems appropriate to retire this driver in mainline. Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/Kconfig | 17 - drivers/crypto/Makefile | 2 - drivers/crypto/n2_asm.S | 96 -- drivers/crypto/n2_core.c | 2168 ---------------------------------------------- drivers/crypto/n2_core.h | 232 ----- 5 files changed, 2515 deletions(-) commit 49b9258b05b97c6464e1964b6a2fddb3ddb65d17 Author: Eric Biggers <ebiggers@google.com> Date: Tue Dec 3 10:05:53 2024 -0800 crypto: qce - fix priority to be less than ARMv8 CE As QCE is an order of magnitude slower than the ARMv8 Crypto Extensions on the CPU, and is also less well tested, give it a lower priority. Previously the QCE SHA algorithms had higher priority than the ARMv8 CE equivalents, and the ciphers such as AES-XTS had the same priority which meant the QCE versions were chosen if they happened to be loaded later. Fixes: ec8f5d8f6f76 ("crypto: qce - Qualcomm crypto engine driver") Cc: stable@vger.kernel.org Cc: Bartosz Golaszewski <brgl@bgdev.pl> Cc: Neil Armstrong <neil.armstrong@linaro.org> Cc: Thara Gopinath <thara.gopinath@gmail.com> Signed-off-by: Eric Biggers <ebiggers@google.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/qce/aead.c | 2 +- drivers/crypto/qce/sha.c | 2 +- drivers/crypto/qce/skcipher.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit f1e532d05aa615d7c9a6c430190261ca35c0367a Author: Mario Limonciello <mario.limonciello@amd.com> Date: Tue Dec 3 10:22:57 2024 -0600 crypto: ccp - Use scoped guard for mutex Use a scoped guard to simplify the cleanup handling. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/ccp/dbc.c | 53 ++++++++++++++++++------------------------------ 1 file changed, 20 insertions(+), 33 deletions(-) commit 3382c44f0c6fb26469b1df75575643c68c421291 Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Tue Dec 3 10:19:37 2024 +0100 crypto: qce - switch to using a mutex Having switched to workqueue from tasklet, we are no longer limited to atomic APIs and can now convert the spinlock to a mutex. This, along with the conversion from tasklet to workqueue grants us ~15% improvement in cryptsetup benchmarks for AES encryption. While at it: use guards to simplify locking code. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/qce/core.c | 46 +++++++++++++++++++++------------------------- drivers/crypto/qce/core.h | 3 ++- 2 files changed, 23 insertions(+), 26 deletions(-) commit eb7986e5e14d3db69e387da2c8bcef92b4c1a625 Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Tue Dec 3 10:19:36 2024 +0100 crypto: qce - convert tasklet to workqueue There's nothing about the qce driver that requires running from a tasklet. Switch to using the system workqueue. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/qce/core.c | 20 ++++++-------------- drivers/crypto/qce/core.h | 6 ++++-- 2 files changed, 10 insertions(+), 16 deletions(-) commit ce8fd0500b741b3669c246cc604f1f2343cdd6fd Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Tue Dec 3 10:19:35 2024 +0100 crypto: qce - use __free() for a buffer that's always freed The buffer allocated in qce_ahash_hmac_setkey is always freed before returning to use __free() to automate it. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/qce/sha.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c151535cf46fd0b6cc34884762dd1610c628bac1 Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Tue Dec 3 10:19:34 2024 +0100 crypto: qce - make qce_register_algs() a managed interface Make qce_register_algs() a managed interface. This allows us to further simplify the remove() callback. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/qce/core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit cf96b0d6fbc9f92451a071a98b527021196bf7d6 Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Tue Dec 3 10:19:33 2024 +0100 crypto: qce - convert qce_dma_request() to use devres Make qce_dma_request() into a managed interface. With this we can simplify the error path in probe() and drop another operations from remove(). Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/qce/core.c | 16 +++------------- drivers/crypto/qce/dma.c | 22 +++++++++++++--------- drivers/crypto/qce/dma.h | 3 +-- 3 files changed, 17 insertions(+), 24 deletions(-) commit 6bca1f0cadc45f3e16e074d3fba7da9cf0f56f80 Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Tue Dec 3 10:19:32 2024 +0100 crypto: qce - shrink code with devres clk helpers Use devm_clk_get_optional_enabled() to avoid having to enable the clocks separately as well as putting the clocks in error path and the remove() callback. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/qce/core.c | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) commit d66b1ab3554672750010ae96b651f431da6b687f Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Tue Dec 3 10:19:31 2024 +0100 crypto: qce - remove unneeded call to icc_set_bw() in error path There's no need to call icc_set_bw(qce->mem_path, 0, 0); in error path as this will already be done in the release path of devm_of_icc_get(). Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/qce/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e80cf84b608725303113d6fe98bb727bf7b7a40d Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Tue Dec 3 10:19:30 2024 +0100 crypto: qce - unregister previously registered algos in error path If we encounter an error when registering alorithms with the crypto framework, we just bail out and don't unregister the ones we successfully registered in prior iterations of the loop. Add code that goes back over the algos and unregisters them before returning an error from qce_register_algs(). Cc: stable@vger.kernel.org Fixes: ec8f5d8f6f76 ("crypto: qce - Qualcomm crypto engine driver") Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/qce/core.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 5278275c1758a38199b43530adfc50098f4b41c7 Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Tue Dec 3 10:19:29 2024 +0100 crypto: qce - fix goto jump in error path If qce_check_version() fails, we should jump to err_dma as we already called qce_dma_request() a couple lines before. Cc: stable@vger.kernel.org Fixes: ec8f5d8f6f76 ("crypto: qce - Qualcomm crypto engine driver") Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/qce/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bc5c9515b4817e994579b21c32c033cbb3b0e6c Author: Furong Xu <0x1207@gmail.com> Date: Thu Dec 12 11:33:25 2024 +0800 net: stmmac: Drop redundant dwxgmac_tc_ops variable dwmac510_tc_ops and dwxgmac_tc_ops are completely identical, keep dwmac510_tc_ops to provide better backward compatibility. Signed-off-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com> Link: https://patch.msgid.link/20241212033325.282817-1-0x1207@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/hwif.c | 4 ++-- drivers/net/ethernet/stmicro/stmmac/hwif.h | 1 - drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 11 ----------- 3 files changed, 2 insertions(+), 14 deletions(-) commit 9d76d5de87bbf03c6e483565030b562dc42c7bff Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 20:57:56 2024 +0100 power: supply: test-power: implement a power supply extension Allow easy testing of the new power supply extension functionality. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241211-power-supply-extensions-v6-2-9d9dc3f3d387@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/test_power.c | 111 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) commit 6037802bbae892f3ad0c7b4c4faee39b967e32b0 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 11 20:57:55 2024 +0100 power: supply: core: implement extension API Various drivers, mostly in platform/x86 extend the ACPI battery driver with additional sysfs attributes to implement more UAPIs than are exposed through ACPI by using various side-channels, like WMI, nonstandard ACPI or EC communication. While the created sysfs attributes look similar to the attributes provided by the powersupply core, there are various deficiencies: * They don't show up in uevent payload. * They can't be queried with the standard in-kernel APIs. * They don't work with triggers. * The extending driver has to reimplement all of the parsing, formatting and sysfs display logic. * Writing a extension driver is completely different from writing a normal power supply driver. This extension API avoids all of these issues. An extension is just a "struct power_supply_ext" with the same kind of callbacks as in a normal "struct power_supply_desc". The API is meant to be used via battery_hook_register(), the same way as the current extensions. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20241211-power-supply-extensions-v6-1-9d9dc3f3d387@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/power_supply.h | 17 ++++ drivers/power/supply/power_supply_core.c | 162 ++++++++++++++++++++++++++++-- drivers/power/supply/power_supply_sysfs.c | 26 ++++- include/linux/power_supply.h | 33 ++++++ 4 files changed, 228 insertions(+), 10 deletions(-) commit 0cbc0258415814c86eb6db50237ae3d90fbf3b3d Author: Tom Lendacky <thomas.lendacky@amd.com> Date: Mon Dec 2 14:50:47 2024 -0600 x86/sev: Add support for the RMPREAD instruction The RMPREAD instruction returns an architecture defined format of an RMP table entry. This is the preferred method for examining RMP entries. The instruction is advertised in CPUID 0x8000001f_EAX[21]. Use this instruction when available. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Nikunj A Dadhania <nikunj@amd.com> Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com> Reviewed-by: Ashish Kalra <ashish.kalra@amd.com> Link: https://lore.kernel.org/r/72c734ac8b324bbc0c839b2c093a11af4a8881fa.1733172653.git.thomas.lendacky@amd.com arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/virt/svm/sev.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit 7ed047da59cfa1acb558b95169d347acc8d85da1 Author: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Date: Wed Nov 27 09:40:06 2024 -0800 i915/guc: Accumulate active runtime on gt reset On gt reset, if a context is running, then accumulate it's active time into the busyness counter since there will be no chance for the context to switch out and update it's run time. v2: Move comment right above the if (John) Fixes: 77cdd054dd2c ("drm/i915/pmu: Connect engine busyness stats from GuC to pmu") Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241127174006.190128-4-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit cf907f6d294217985e9dafd9985dce874e04ca37 Author: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Date: Wed Nov 27 09:40:05 2024 -0800 i915/guc: Ensure busyness counter increases motonically Active busyness of an engine is calculated using gt timestamp and the context switch in time. While capturing the gt timestamp, it's possible that the context switches out. This race could result in an active busyness value that is greater than the actual context runtime value by a small amount. This leads to a negative delta and throws off busyness calculations for the user. If a subsequent count is smaller than the previous one, just return the previous one, since we expect the busyness to catch up. Fixes: 77cdd054dd2c ("drm/i915/pmu: Connect engine busyness stats from GuC to pmu") Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241127174006.190128-3-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/gt/intel_engine_types.h | 5 +++++ drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit abd318237fa6556c1e5225529af145ef15d5ff0d Author: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Date: Wed Nov 27 09:40:04 2024 -0800 i915/guc: Reset engine utilization buffer before registration On GT reset, we store total busyness counts for all engines and re-register the utilization buffer with GuC. At that time we should reset the buffer, so that we don't get spurious busyness counts on subsequent queries. To repro this issue, run igt@perf_pmu@busy-hang followed by igt@perf_pmu@most-busy-idle-check-all for a couple iterations. Fixes: 77cdd054dd2c ("drm/i915/pmu: Connect engine busyness stats from GuC to pmu") Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241127174006.190128-2-umesh.nerlige.ramappa@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 00a5acdbf39816ad23b8db3255c366bbc77e69af Author: Thomas Weißschuh <linux@weissschuh.net> Date: Fri Dec 13 00:00:30 2024 +0100 bpf: Fix configuration-dependent BTF function references These BTF functions are not available unconditionally, only reference them when they are available. Avoid the following build warnings: BTF .tmp_vmlinux1.btf.o btf_encoder__tag_kfunc: failed to find kfunc 'bpf_send_signal_task' in BTF btf_encoder__tag_kfuncs: failed to tag kfunc 'bpf_send_signal_task' NM .tmp_vmlinux1.syms KSYMS .tmp_vmlinux1.kallsyms.S AS .tmp_vmlinux1.kallsyms.o LD .tmp_vmlinux2 NM .tmp_vmlinux2.syms KSYMS .tmp_vmlinux2.kallsyms.S AS .tmp_vmlinux2.kallsyms.o LD vmlinux BTFIDS vmlinux WARN: resolve_btfids: unresolved symbol prog_test_ref_kfunc WARN: resolve_btfids: unresolved symbol bpf_crypto_ctx WARN: resolve_btfids: unresolved symbol bpf_send_signal_task WARN: resolve_btfids: unresolved symbol bpf_modify_return_test_tp WARN: resolve_btfids: unresolved symbol bpf_dynptr_from_xdp WARN: resolve_btfids: unresolved symbol bpf_dynptr_from_skb Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241213-bpf-cond-ids-v1-1-881849997219@weissschuh.net kernel/bpf/helpers.c | 4 ++++ kernel/bpf/verifier.c | 8 ++++++++ 2 files changed, 12 insertions(+) commit 3d1af4bd84a8aa854034e1ccea245bb28a114a11 Merge: 6a10d2d3613f d677a10f80ab Author: Andrii Nakryiko <andrii@kernel.org> Date: Fri Dec 13 14:45:59 2024 -0800 Merge branch 'add-fd_array_cnt-attribute-for-bpf_prog_load' Anton Protopopov says: ==================== Add fd_array_cnt attribute for BPF_PROG_LOAD Add a new attribute to the bpf(BPF_PROG_LOAD) system call. If this new attribute is non-zero, then the fd_array is considered to be a continuous array of the fd_array_cnt length and to contain only proper map file descriptors or btf file descriptors. This change allows maps (and btfs), which aren't referenced directly by a BPF program, to be bound to the program _and_ also to be present during the program verification (so BPF_PROG_BIND_MAP is not enough for this use case). The primary reason for this change is that it is a prerequisite for adding "instruction set" maps, which are both non-referenced by the program and must be present during the program verification. The first five commits add the new functionality, the sixth adds corresponding self-tests, and the last one is a small additional fix. v1 -> v2: * rewrite the add_fd_from_fd_array() function (Eduard) * a few cleanups in selftests (Eduard) v2 -> v3: * various renamings (Alexei) * "0 is not special" (Alexei, Andrii) * do not alloc memory on fd_array init (Alexei) * fix leaking maps for error path (Hou Tao) * use libbpf helpers vs. raw syscalls (Andrii) * add comments on __btf_get_by_fd/__bpf_map_get (Alexei) * remove extra code (Alexei) v3 -> v4: * simplify error path when parsing fd_array * libbpf: pass fd_array_cnt only in prog_load (Alexei) * selftests patch contained extra code (Alexei) * renames, fix comments (Alexei) v4 -> v5: * Add btfs to env->used_btfs (Andrii) * Fix an integer overflow (Andrii) * A set of cleanups for selftests (Andrii) ==================== Link: https://patch.msgid.link/20241213130934.1087929-1-aspsk@isovalent.com Signed-off-by: Andrii Nakryiko <andrii@kernel.org> commit d677a10f80abf1ef65ae9bcf51b5a83ecf10e99a Author: Anton Protopopov <aspsk@isovalent.com> Date: Fri Dec 13 13:09:34 2024 +0000 selftest/bpf: Replace magic constants by macros Replace magic constants in a BTF structure initialization code by proper macros, as is done in other similar selftests. Suggested-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Anton Protopopov <aspsk@isovalent.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241213130934.1087929-8-aspsk@isovalent.com tools/testing/selftests/bpf/progs/syscall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1c593d7402b13d97f997b570e9fc7c49e53e1ed1 Author: Anton Protopopov <aspsk@isovalent.com> Date: Fri Dec 13 13:09:33 2024 +0000 selftests/bpf: Add tests for fd_array_cnt Add a new set of tests to test the new field in PROG_LOAD-related part of bpf_attr: fd_array_cnt. Add the following test cases: * fd_array_cnt/no-fd-array: program is loaded in a normal way, without any fd_array present * fd_array_cnt/fd-array-ok: pass two extra non-used maps, check that they're bound to the program * fd_array_cnt/fd-array-dup-input: pass a few extra maps, only two of which are unique * fd_array_cnt/fd-array-ref-maps-in-array: pass a map in fd_array which is also referenced from within the program * fd_array_cnt/fd-array-trash-input: pass array with some trash * fd_array_cnt/fd-array-2big: pass too large array All the tests above are using the bpf(2) syscall directly, no libbpf involved. Signed-off-by: Anton Protopopov <aspsk@isovalent.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241213130934.1087929-7-aspsk@isovalent.com tools/testing/selftests/bpf/prog_tests/fd_array.c | 441 ++++++++++++++++++++++ 1 file changed, 441 insertions(+) commit f9933acda31a9882b6e08f58cb976e67842a180b Author: Anton Protopopov <aspsk@isovalent.com> Date: Fri Dec 13 13:09:32 2024 +0000 libbpf: prog load: Allow to use fd_array_cnt Add new fd_array_cnt field to bpf_prog_load_opts and pass it in bpf_attr, if set. Signed-off-by: Anton Protopopov <aspsk@isovalent.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241213130934.1087929-6-aspsk@isovalent.com tools/lib/bpf/bpf.c | 3 ++- tools/lib/bpf/bpf.h | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 4d3ae294f900fb7232fb6c890dbd3176b8a5f121 Author: Anton Protopopov <aspsk@isovalent.com> Date: Fri Dec 13 13:09:31 2024 +0000 bpf: Add fd_array_cnt attribute for prog_load The fd_array attribute of the BPF_PROG_LOAD syscall may contain a set of file descriptors: maps or btfs. This field was introduced as a sparse array. Introduce a new attribute, fd_array_cnt, which, if present, indicates that the fd_array is a continuous array of the corresponding length. If fd_array_cnt is non-zero, then every map in the fd_array will be bound to the program, as if it was used by the program. This functionality is similar to the BPF_PROG_BIND_MAP syscall, but such maps can be used by the verifier during the program load. Signed-off-by: Anton Protopopov <aspsk@isovalent.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241213130934.1087929-5-aspsk@isovalent.com include/uapi/linux/bpf.h | 10 ++++ kernel/bpf/syscall.c | 2 +- kernel/bpf/verifier.c | 106 +++++++++++++++++++++++++++++++++++------ tools/include/uapi/linux/bpf.h | 10 ++++ 4 files changed, 112 insertions(+), 16 deletions(-) commit 76145f7255326761dafb76721a785799d8a00d5f Author: Anton Protopopov <aspsk@isovalent.com> Date: Fri Dec 13 13:09:30 2024 +0000 bpf: Refactor check_pseudo_btf_id Introduce a helper to add btfs to the env->used_maps array. Use it to simplify the check_pseudo_btf_id() function. This new helper will also be re-used in a consequent patch. Signed-off-by: Anton Protopopov <aspsk@isovalent.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241213130934.1087929-4-aspsk@isovalent.com kernel/bpf/verifier.c | 132 +++++++++++++++++++++++++++++--------------------- 1 file changed, 76 insertions(+), 56 deletions(-) commit 928f3221cb141bdb40d5cc6efe5e7b10adecfe5f Author: Anton Protopopov <aspsk@isovalent.com> Date: Fri Dec 13 13:09:29 2024 +0000 bpf: Move map/prog compatibility checks Move some inlined map/prog compatibility checks from the resolve_pseudo_ldimm64() function to the dedicated check_map_prog_compatibility() function. Call the latter function from the add_used_map_from_fd() function directly. This simplifies code and optimizes logic a bit, as before these changes the check_map_prog_compatibility() function was executed on every map usage, which doesn't make sense, as it doesn't include any per-instruction checks, only map type vs. prog type. (This patch also simplifies a consequent patch which will call the add_used_map_from_fd() function from another code path.) Signed-off-by: Anton Protopopov <aspsk@isovalent.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241213130934.1087929-3-aspsk@isovalent.com kernel/bpf/verifier.c | 101 +++++++++++++++++++++++--------------------------- 1 file changed, 46 insertions(+), 55 deletions(-) commit 4e885fab7164689f031a6c73522a3d91674c5bdc Author: Anton Protopopov <aspsk@isovalent.com> Date: Fri Dec 13 13:09:28 2024 +0000 bpf: Add a __btf_get_by_fd helper Add a new helper to get a pointer to a struct btf from a file descriptor. This helper doesn't increase a refcnt. Add a comment explaining this and pointing to a corresponding function which does take a reference. Signed-off-by: Anton Protopopov <aspsk@isovalent.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241213130934.1087929-2-aspsk@isovalent.com include/linux/bpf.h | 17 +++++++++++++++++ kernel/bpf/btf.c | 11 +++-------- 2 files changed, 20 insertions(+), 8 deletions(-) commit 6a10d2d3613fed501ae9c164cb1c4335e11cb714 Merge: 5506b7d7bbdb 9d294f698678 Author: Andrii Nakryiko <andrii@kernel.org> Date: Fri Dec 13 14:35:42 2024 -0800 Merge branch 'bpftool-btf-support-dumping-a-single-type-from-file' Daniel Xu says: ==================== bpftool: btf: Support dumping a single type from file Some projects, for example xdp-tools [0], prefer to check in a minimized vmlinux.h rather than the complete file which can get rather large. However, when you try to add a minimized version of a complex struct (eg struct xfrm_state), things can get quite complex if you're trying to manually untangle and deduplicate the dependencies. This commit teaches bpftool to do a minimized dump of a single type by providing an optional root_id argument. Example usage: $ ./bpftool btf dump file ~/dev/linux/vmlinux | rg "STRUCT 'xfrm_state'" [12643] STRUCT 'xfrm_state' size=912 vlen=58 $ ./bpftool btf dump file ~/dev/linux/vmlinux root_id 12643 format c #ifndef __VMLINUX_H__ #define __VMLINUX_H__ [..] struct xfrm_type_offload; struct xfrm_sec_ctx; struct xfrm_state { possible_net_t xs_net; union { struct hlist_node gclist; struct hlist_node bydst; }; union { struct hlist_node dev_gclist; struct hlist_node bysrc; }; struct hlist_node byspi; [..] [0]: https://github.com/xdp-project/xdp-tools/blob/master/headers/bpf/vmlinux.h === Changelog === Changes in v5: * Update bash-completion to support repeating root_id * Update man page to mention root_id NAND map key/value/kv/all Changes in v4: * Support multiple instances of root_id Changes in v3: * Make `root_id` a top level btf-dump argument rather than attached to `file` * Update bash completion script * Refactor root_type_ids checking to after btf handle creation * Update help messages and fix existing man page inconsistency Changes in v2: * Add early error check for invalid BTF ID ==================== Link: https://patch.msgid.link/cover.1734119028.git.dxu@dxuuu.xyz Signed-off-by: Andrii Nakryiko <andrii@kernel.org> commit 9d294f6986789e20696f44c2deb4c7f7b8ae4704 Author: Daniel Xu <dxu@dxuuu.xyz> Date: Fri Dec 13 12:44:12 2024 -0700 bpftool: bash: Add bash completion for root_id argument This commit updates the bash completion script with the new root_id argument. Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/37016c786620761e621a88240e36f6cb27a8f628.1734119028.git.dxu@dxuuu.xyz tools/bpf/bpftool/bash-completion/bpftool | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a812d92ed2aee2d57dccb12b289377265f4ce5e7 Author: Daniel Xu <dxu@dxuuu.xyz> Date: Fri Dec 13 12:44:11 2024 -0700 bpftool: btf: Support dumping a specific types from file Some projects, for example xdp-tools [0], prefer to check in a minimized vmlinux.h rather than the complete file which can get rather large. However, when you try to add a minimized version of a complex struct (eg struct xfrm_state), things can get quite complex if you're trying to manually untangle and deduplicate the dependencies. This commit teaches bpftool to do a minimized dump of a specific types by providing a optional root_id argument(s). Example usage: $ ./bpftool btf dump file ~/dev/linux/vmlinux | rg "STRUCT 'xfrm_state'" [12643] STRUCT 'xfrm_state' size=912 vlen=58 $ ./bpftool btf dump file ~/dev/linux/vmlinux root_id 12643 format c #ifndef __VMLINUX_H__ #define __VMLINUX_H__ [..] struct xfrm_type_offload; struct xfrm_sec_ctx; struct xfrm_state { possible_net_t xs_net; union { struct hlist_node gclist; struct hlist_node bydst; }; union { struct hlist_node dev_gclist; struct hlist_node bysrc; }; struct hlist_node byspi; [..] [0]: https://github.com/xdp-project/xdp-tools/blob/master/headers/bpf/vmlinux.h Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/04feb860c0a56a7da66f923551484e1483a72074.1734119028.git.dxu@dxuuu.xyz tools/bpf/bpftool/Documentation/bpftool-btf.rst | 9 ++++-- tools/bpf/bpftool/btf.c | 39 +++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 4 deletions(-) commit 7f5819e1ace85632cf58c43ab6c38d2d4b0aa161 Author: Daniel Xu <dxu@dxuuu.xyz> Date: Fri Dec 13 12:44:10 2024 -0700 bpftool: btf: Validate root_type_ids early Handle invalid root_type_ids early, as an invalid ID will cause dumpers to half-emit valid boilerplate and then bail with an unclean exit. This is ugly and possibly confusing for users, so preemptively handle the common error case before any dumping begins. Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Reviewed-by: Quentin Monnet <qmo@kernel.org> Link: https://lore.kernel.org/bpf/33e09a08a6072f8381cb976218a009709309b7e1.1734119028.git.dxu@dxuuu.xyz tools/bpf/bpftool/btf.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5e3ad22d82238e8bcb4c7ec26a20533217ddfb18 Author: Daniel Xu <dxu@dxuuu.xyz> Date: Fri Dec 13 12:44:09 2024 -0700 bpftool: man: Add missing format argument to command description The command description was missing the optional argument. Add it there for consistency with the rest of the commands. Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Reviewed-by: Quentin Monnet <qmo@kernel.org> Link: https://lore.kernel.org/bpf/140402f22fc377fba4c34376b7e1d2eba2c276b1.1734119028.git.dxu@dxuuu.xyz tools/bpf/bpftool/Documentation/bpftool-btf.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46e417b150f23dfd92788224866c4e23956d17f2 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Fri Nov 29 06:26:29 2024 +0200 drm/modes: Fix drm_mode_vrefres() docs We no longer store a cache vrefresh value in the mode. Remove the stale information from drm_vrefresh() docs. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241129042629.18280-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/drm_modes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 70fb86a85dc9fd66014d7eb2fe356f50702ceeb6 Author: John Harrison <John.C.Harrison@Intel.com> Date: Fri Dec 13 09:28:33 2024 -0800 drm/xe: Revert some changes that break a mesa debug tool There is a mesa debug tool for decoding devcoredump files. Recent changes to improve the devcoredump output broke that tool. So revert the changes until the tool can be extended to support the new fields. Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Fixes: c28fd6c358db ("drm/xe/devcoredump: Improve section headings and add tile info") Fixes: ec1455ce7e35 ("drm/xe/devcoredump: Add ASCII85 dump helper function") Cc: John Harrison <John.C.Harrison@Intel.com> Cc: Julia Filipchuk <julia.filipchuk@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: intel-xe@lists.freedesktop.org Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213172833.1733376-1-John.C.Harrison@Intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/xe_devcoredump.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 3e43c60eb3e3779e88635d45400f7387ec732c07 Author: Tom Lendacky <thomas.lendacky@amd.com> Date: Mon Dec 2 14:50:46 2024 -0600 x86/sev: Prepare for using the RMPREAD instruction to access the RMP The RMPREAD instruction returns an architecture defined format of an RMP entry. This is the preferred method for examining RMP entries. In preparation for using the RMPREAD instruction, convert the existing code that directly accesses the RMP to map the raw RMP information into the architecture defined format. RMPREAD output returns a status bit for the 2MB region status. If the input page address is 2MB aligned and any other pages within the 2MB region are assigned, then 2MB region status will be set to 1. Otherwise, the 2MB region status will be set to 0. For systems that do not support RMPREAD, calculating this value would require looping over all of the RMP table entries within that range until one is found with the assigned bit set. Since this bit is not defined in the current format, and so not used today, do not incur the overhead associated with calculating it. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Nikunj A Dadhania <nikunj@amd.com> Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com> Link: https://lore.kernel.org/r/da49d5af1eb7f9039f35f14a32ca091efb2dd818.1733172653.git.thomas.lendacky@amd.com arch/x86/virt/svm/sev.c | 132 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 94 insertions(+), 38 deletions(-) commit 4aa176193475d37441cc52b84088542f3a59899a Author: Christian Göttsche <cgzones@googlemail.com> Date: Wed Oct 23 17:27:10 2024 +0200 selinux: add support for xperms in conditional policies Add support for extended permission rules in conditional policies. Currently the kernel accepts such rules already, but evaluating a security decision will hit a BUG() in services_compute_xperms_decision(). Thus reject extended permission rules in conditional policies for current policy versions. Add a new policy version for this feature. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com> Tested-by: Stephen Smalley <stephen.smalley.work@gmail.com> Signed-off-by: Paul Moore <paul@paul-moore.com> security/selinux/include/security.h | 3 ++- security/selinux/ss/avtab.c | 11 +++++++++-- security/selinux/ss/avtab.h | 2 +- security/selinux/ss/conditional.c | 2 +- security/selinux/ss/policydb.c | 5 +++++ security/selinux/ss/services.c | 12 ++++++++---- 6 files changed, 26 insertions(+), 9 deletions(-) commit 701b27403c69e8290145de7d41a22faf92110e91 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Fri Dec 13 16:29:54 2024 -0300 tools build feature: Don't set feature-libslang-include-subdir=1 if test-all.c builds As it is not really included in tools/build/feature/test-all.c, so any questioning about this feature should really try to build tools/build/feature/test-libslang-include-subdir.c and not set it as detected when test-all.c builds. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/lkml/20241213195052.914914-2-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/build/Makefile.feature | 1 - 1 file changed, 1 deletion(-) commit dea654e34afe07ccad9d57c472c2e2ae19b861a7 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Fri Dec 13 14:59:08 2024 -0300 perf tests switch-tracking: Set this test to run exclusively This test was failing when run with the default 'perf test' mode, which is to run multiple regression tests in parallel. Since it checks system_wide mode, set it to run in exclusive mode. Reviewed-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Ravi Bangoria <ravi.bangoria@amd.com> Link: https://lore.kernel.org/lkml/Z1yPYqYYs_isO1PJ@x1 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/switch-tracking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cd67bac9d4e50938516c3ca3fdcfc31a34cb8d0 Author: Ravi Bangoria <ravi.bangoria@amd.com> Date: Tue Dec 10 09:34:48 2024 +0000 perf test: Introduce DEFINE_SUITE_EXCLUSIVE() A variant of DEFINE_SUITE() but sets ->exclusive bit for the test so the test will be executed sequentially. Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ananth Narayan <ananth.narayan@amd.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sandipan Das <sandipan.das@amd.com> Cc: Santosh Shukla <santosh.shukla@amd.com> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: x86@kernel.org Link: https://lore.kernel.org/r/20241210093449.1662-10-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/tests.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d216d9cb4dd854ef0a2ec1701f403facb298af51 Author: Nicolas Dufresne <nicolas.dufresne@collabora.com> Date: Tue Dec 10 16:25:16 2024 -0500 media: hantro: Replace maintainers As per a long time request from Ezequiel, who left the project around 2020, replace the top maintainers with Benjamin and myself, and also keeping Philipp, who is still active in the subsystem. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 555936182dcf49d0602f24c169cc5865a601877b Author: Benjamin Gaignard <benjamin.gaignard@collabora.com> Date: Mon Oct 21 15:49:34 2024 +0000 media: verisilicon: av1: Store chroma and mv offsets Store the chroma and motion vector offsets for each frame so that they can be used later when the resolution changes. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/verisilicon/hantro.h | 7 +++++++ drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c | 9 +++++---- 2 files changed, 12 insertions(+), 4 deletions(-) commit e5453f2a94828b954e728521531d2d813cb7b3a3 Author: Benjamin Gaignard <benjamin.gaignard@collabora.com> Date: Thu Dec 12 15:43:34 2024 +0000 media: verisilicon: Fix IMX8 native pixel-format step values The Hantro decoder non post-processed pixel-format steps are different from the post-processed ones. Fix the steps according to the hardware limitations. Since reference frame pixel-format issues have been fixed, it is possible to use V4L2_PIX_FMT_NV15_4L4 rather V4L2_PIX_FMT_P010_4L4 for 10bit streams. Fluster VP9 score goes up to 207/305. HEVC score is still 141/147. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/verisilicon/imx8m_vpu_hw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit db300ab0e9d38b1e1b0b561333b66a5beacb9994 Author: Benjamin Gaignard <benjamin.gaignard@collabora.com> Date: Thu Dec 12 15:43:33 2024 +0000 media: verisilicon: Store reference frames pixels format The Hantro decoder always produces tiled pixel-formats, but when the post-processor is used, the destination pixel-format is a non-tiled pixel-format. This causes an incorrect computation of the reference frame size and offsets. Get and save the correct tiled pixel-format for 8 and 10 bit streams to solve these computation issues. Fluster VP9 score increase to 166/305 (vs 145/305). HEVC score is still 141/147. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/verisilicon/hantro.h | 2 ++ drivers/media/platform/verisilicon/hantro_g2.c | 2 +- .../media/platform/verisilicon/hantro_postproc.c | 32 ++++++++-------------- drivers/media/platform/verisilicon/hantro_v4l2.c | 21 ++++++++++++++ 4 files changed, 35 insertions(+), 22 deletions(-) commit 584e09743d2f44905290b0dbf3215064d2a1888c Author: Kyle Meyer <kyle.meyer@hpe.com> Date: Thu Dec 12 19:25:49 2024 -0600 EDAC/{i10nm,skx,skx_common}: Support UV systems The 3-bit source IDs in PCI configuration space registers, used to map devices to sockets, are limited to 8 unique IDs, and each ID is local to a UPI/QPI domain. Source IDs cannot be used to map devices to sockets on UV systems because they can exceed 8 sockets and have multiple UPI/QPI domains with identical, repeating source IDs. Use NUMA information to get package IDs instead of source IDs on UV systems, and use package/source IDs to name IMC information structures. Signed-off-by: Kyle Meyer <kyle.meyer@hpe.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Tested-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Link: https://lore.kernel.org/all/20241213012549.43099-1-kyle.meyer@hpe.com/ drivers/edac/i10nm_base.c | 11 +++-------- drivers/edac/skx_base.c | 9 +++------ drivers/edac/skx_common.c | 47 +++++++++++++++++++++++++++++++++-------------- drivers/edac/skx_common.h | 3 +-- 4 files changed, 40 insertions(+), 30 deletions(-) commit 57e5a9a85bd03d8cc4992cb2e15ca23450e016c4 Author: Kim Seer Paller <kimseer.paller@analog.com> Date: Fri Dec 13 10:37:46 2024 +0800 power: supply: ltc4162-l-charger: Add support for ltc4162-f/s and ltc4015 LTC4162-L 35V/3.2A Multi-Cell Lithium-Ion Step-Down Battery Charger LTC4162-F 35V/3.2A Multi-Cell LiFePO4 Step-Down Battery Charger LTC4162-S 35V/3.2A Lead-Acid Step-Down Battery Charger LTC4015 35V/3.2A Multichemistry Buck Battery Charger Controller The LTC4162-L/F/S variants and LTC4015 share a common set of registers. The difference lies in the resolution value of the scaling factor for battery voltage and battery current measurement, input voltage, and input current for different battery chemistries. The difference also includes the calculation of setting and getting the actual voltage setting applied to the charge voltage, as well as getting the die temperature. Adding chip info structure to encapsulates these differences by defining function pointers and parameters specific to each device. This structure includes: - function pointers for getting and setting various parameters such as battery voltage, charge voltage, and die temperature - resolution parameters for battery current and input voltage - telemetry mask to specify which bits in the register are used for telemetry features Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com> Link: https://lore.kernel.org/r/20241213023746.34168-3-kimseer.paller@analog.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ltc4162-l-charger.c | 434 +++++++++++++++++++++++++++---- 1 file changed, 383 insertions(+), 51 deletions(-) commit 649399c5dad9cd7a42fe7eb8a32c31627d35492d Author: Kim Seer Paller <kimseer.paller@analog.com> Date: Fri Dec 13 10:37:45 2024 +0800 dt-bindings: power: supply: ltc4162-l-charger: Add ltc4162-f/s and ltc4015 Add LTC4162-F/S and LTC4015 to the supported devices of LTC4162-L. They share a common set of registers. The only differences lie in the resolution value of the scaling factor for battery voltage and battery current measurement, input voltage, and input current for different battery chemistries. The differences also include the calculation of setting and getting the actual voltage applied to the charge voltage, as well as getting the die temperature. This add compatible entries for ltc4162-f/s and ltc4015 and include datasheets for new devices. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com> Link: https://lore.kernel.org/r/20241213023746.34168-2-kimseer.paller@analog.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Documentation/devicetree/bindings/power/supply/ltc4162-l.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit f0d3a3cffd432bd756b25a630f7bd19c018f72ce Author: Ilia Levi <ilia.levi@intel.com> Date: Fri Dec 13 09:25:37 2024 +0200 drm/xe/irq: Manage MSI-X interrupts allocation Expose functions to request and free MSI-X interrupts. The request has two flavors: - Static MSI-X allocation, for known MSI-X interrupts (e.g. GuC-to-host) - Dynamic MSI-X allocation, which uses the next available MSI-X interrupt Signed-off-by: Ilia Levi <ilia.levi@intel.com> Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213072538.6823-4-ilia.levi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/xe_device_types.h | 2 + drivers/gpu/drm/xe/xe_irq.c | 96 ++++++++++++++++++++++++++++-------- drivers/gpu/drm/xe/xe_irq.h | 5 ++ 3 files changed, 83 insertions(+), 20 deletions(-) commit 21d07f5fdc903e36cfd7119bb19477c4d12dbb36 Author: Ilia Levi <ilia.levi@intel.com> Date: Fri Dec 13 09:25:36 2024 +0200 drm/xe: Initial MSI-X support for HW engines - Configure the HW engines to work with MSI-X - Program the LRC to use memirq infra (similar to VF) - CS_INT_VEC field added to the LRC Bspec: 60342, 72547 Signed-off-by: Ilia Levi <ilia.levi@intel.com> Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213072538.6823-3-ilia.levi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/regs/xe_engine_regs.h | 3 +++ drivers/gpu/drm/xe/regs/xe_lrc_layout.h | 3 +++ drivers/gpu/drm/xe/xe_exec_queue.c | 4 +++- drivers/gpu/drm/xe/xe_exec_queue_types.h | 2 ++ drivers/gpu/drm/xe/xe_execlist.c | 10 +++++++--- drivers/gpu/drm/xe/xe_hw_engine.c | 7 +++++-- drivers/gpu/drm/xe/xe_lrc.c | 24 ++++++++++++++++++++---- drivers/gpu/drm/xe/xe_lrc.h | 2 +- 8 files changed, 44 insertions(+), 11 deletions(-) commit da889070be7b26b91e8b90f072687ca437d3ed7b Author: Ilia Levi <ilia.levi@intel.com> Date: Fri Dec 13 09:25:35 2024 +0200 drm/xe/irq: Separate MSI and MSI-X flows A new flow is added for devices that support MSI-X: - MSI-X vector 0 is used for GuC-to-host interrupt - MSI-X vector 1 (aka default MSI-X) is used for HW engines The default MSI-X will be passed to the HW engines in a subsequent patch. Signed-off-by: Ilia Levi <ilia.levi@intel.com> Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213072538.6823-2-ilia.levi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/xe_device.c | 4 +- drivers/gpu/drm/xe/xe_device.h | 3 +- drivers/gpu/drm/xe/xe_device_types.h | 6 + drivers/gpu/drm/xe/xe_irq.c | 257 ++++++++++++++++++++++++++++++----- drivers/gpu/drm/xe/xe_irq.h | 3 + 5 files changed, 237 insertions(+), 36 deletions(-) commit 1db806ec06b7c6e08e8af57088da067963ddf117 Author: Jian-Hong Pan <jhp@endlessos.org> Date: Fri Nov 15 15:22:02 2024 +0800 PCI/ASPM: Save parent L1SS config in pci_save_aspm_l1ss_state() After 17423360a27a ("PCI/ASPM: Save L1 PM Substates Capability for suspend/resume"), pci_save_aspm_l1ss_state(dev) saves the L1SS state for "dev", and pci_restore_aspm_l1ss_state(dev) restores the state for both "dev" and its parent. The problem is that unless pci_save_state() has been used in some other path and has already saved the parent L1SS state, we will restore junk to the parent, which means the L1 Substates likely won't work correctly. Save the L1SS config for both the device and its parent in pci_save_aspm_l1ss_state(). When restoring, we need both because L1SS must be enabled at the parent (the Downstream Port) before being enabled at the child (the Upstream Port). Link: https://lore.kernel.org/r/20241115072200.37509-3-jhp@endlessos.org Fixes: 17423360a27a ("PCI/ASPM: Save L1 PM Substates Capability for suspend/resume") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218394 Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Jian-Hong Pan <jhp@endlessos.org> [bhelgaas: parallel save/restore structure, simplify commit log, patch at https://lore.kernel.org/r/20241212230340.GA3267194@bhelgaas] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Tested-by: Jian-Hong Pan <jhp@endlessos.org> # Asus B1400CEAE drivers/pci/pcie/aspm.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) commit e5a8f19c39d769c2e4c0a4624576997ac41819bc Author: Arnd Bergmann <arnd@arndb.de> Date: Fri Dec 13 10:02:54 2024 +0100 accel/amdxdna: use modern PM helpers The old SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS macros cause a build warning when CONFIG_PM is disabled: drivers/accel/amdxdna/amdxdna_pci_drv.c:343:12: error: 'amdxdna_pmops_resume' defined but not used [-Werror=unused-function] 343 | static int amdxdna_pmops_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~ drivers/accel/amdxdna/amdxdna_pci_drv.c:328:12: error: 'amdxdna_pmops_suspend' defined but not used [-Werror=unused-function] 328 | static int amdxdna_pmops_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~ Change these to the modern replacements. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Lizhi Hou <lizhi.hou@amd.com> Tested-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213090259.68492-1-arnd@kernel.org drivers/accel/amdxdna/amdxdna_pci_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5ce3beed07b8145aff61f2cb41f1868f6221271f Merge: 94c545aa535d b62eaff0650d Author: Mark Brown <broonie@kernel.org> Date: Fri Dec 13 17:33:09 2024 +0000 ASoC: fsl: add memory to memory function for ASRC Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>: This function is base on the accelerator implementation for compress API: 04177158cf98 ("ALSA: compress_offload: introduce accel operation mode") Audio signal processing also has the requirement for memory to memory similar as Video. This asrc memory to memory (memory ->asrc->memory) case is a non real time use case. User fills the input buffer to the asrc module, after conversion, then asrc sends back the output buffer to user. So it is not a traditional ALSA playback and capture case. Because we had implemented the "memory -> asrc ->i2s device-> codec" use case in ALSA. Now the "memory->asrc->memory" needs to reuse the code in asrc driver, so the patch 1 and patch 2 is for refining the code to make it can be shared by the "memory->asrc->memory" driver. Other change is to add memory to memory support for two kinds of i.MX ASRC modules. commit 94c545aa535d7f5dcf54ad8e648f22943bbfcb32 Merge: 9b94f4144993 75a4a6ef615e Author: Mark Brown <broonie@kernel.org> Date: Fri Dec 13 17:33:05 2024 +0000 firmware: cirrus: Add KUnit tests for cs_dsp Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: This series adds KUnit tests for the cs_dsp module. Most of the functionality in cs_dsp is for downloading firmware to DSP memory and interacting with "control" words defined in that memory. This doesn't require any emulation of running firmware, because it is only reading and writing registers. So the testing can be done using a dummy regmap. The way this is used to perform testing is described in more detail in the commit message for each test. ADSP1 is not tested because this was only used by the WM2200 codec, a long-obsolete part that was discontinued in 2015. commit 9b94f41449939537151dfd91e922b2e897054b94 Merge: f851b987f391 3a47319d2d91 Author: Mark Brown <broonie@kernel.org> Date: Fri Dec 13 17:33:00 2024 +0000 ASoC: SOF: core/Intel: Handle pause supported token Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: A new set of tokens have been added to SOF topology to indicate that the pause operation is supported or not on the given PCM device. Pause is an optional feature that depends on pipeline, topology and modules used by the PCM. Add a pause_supported flag to snd_sof_pcm_stream and use this flag in Intel platform code to keep the pause support enabled or to disable it. commit b690f5d955e033b9bd80de0486a04adf150f89a8 Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Wed Dec 4 11:58:27 2024 +0100 drm: Drop explicit initialization of struct i2c_device_id::driver_data to 0 These drivers don't use the driver_data member of struct i2c_device_id, so don't explicitly initialize this member. This prepares putting driver_data in an anonymous union which requires either no initialization or named designators. But it's also a nice cleanup on its own. While add it, also remove commas after the sentinel entries. Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Liu Ying <victor.liu@nxp.com> # ite-it6263.c Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241204105827.1682632-2-u.kleine-koenig@baylibre.com drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 2 +- drivers/gpu/drm/bridge/analogix/anx7625.c | 2 +- drivers/gpu/drm/bridge/chrontel-ch7033.c | 2 +- drivers/gpu/drm/bridge/ite-it6263.c | 2 +- drivers/gpu/drm/bridge/ite-it6505.c | 2 +- drivers/gpu/drm/bridge/lontium-lt8912b.c | 4 ++-- drivers/gpu/drm/bridge/lontium-lt9611.c | 2 +- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +- drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 8 ++++---- drivers/gpu/drm/bridge/nxp-ptn3460.c | 4 ++-- drivers/gpu/drm/bridge/sii902x.c | 4 ++-- drivers/gpu/drm/bridge/sii9234.c | 4 ++-- drivers/gpu/drm/bridge/sil-sii8620.c | 4 ++-- drivers/gpu/drm/bridge/tc358767.c | 2 +- drivers/gpu/drm/bridge/tc358768.c | 4 ++-- drivers/gpu/drm/bridge/ti-dlpc3433.c | 2 +- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++-- drivers/gpu/drm/bridge/ti-tfp410.c | 2 +- drivers/gpu/drm/i2c/ch7006_drv.c | 2 +- drivers/gpu/drm/i2c/sil164_drv.c | 2 +- drivers/gpu/drm/i2c/tda9950.c | 4 ++-- drivers/gpu/drm/i2c/tda998x_drv.c | 2 +- 22 files changed, 33 insertions(+), 33 deletions(-) commit d408916885ca59293064476e7bdeeda73d033f33 Author: Mike Lothian <mike@fireburn.co.uk> Date: Fri Dec 13 08:38:56 2024 -0800 accel/amdxdna: Add include interrupt.h to amdxdna_mailbox.c For amdxdna_mailbox.c, linux/interrupt.h is indirectly included by trace/events/amdxdna.h. So if TRACING is disabled, driver compiling will fail. Fixes: b87f920b9344 ("accel/amdxdna: Support hardware mailbox") Reported-by: Mike Lothian <mike@fireburn.co.uk> Closes: https://lore.kernel.org/dri-devel/CAHbf0-E+Z2O7rW-x+-EKNQ-nLbf=_ohaNzXxE7WD2cj9kFJERQ@mail.gmail.com/ Signed-off-by: Mike Lothian <mike@fireburn.co.uk> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213163856.1472207-1-lizhi.hou@amd.com drivers/accel/amdxdna/amdxdna_mailbox.c | 1 + 1 file changed, 1 insertion(+) commit e197f5ec3ad38ad0a014ed1ba672497bdf0550bb Author: Liang Jie <liangjie@lixiang.com> Date: Fri Dec 13 17:52:54 2024 +0800 sched_ext: Use sizeof_field for key_len in dsq_hash_params Update the `dsq_hash_params` initialization to use `sizeof_field` for the `key_len` field instead of a hardcoded value. This improves code readability and ensures the key length dynamically matches the size of the `id` field in the `scx_dispatch_q` structure. Signed-off-by: Liang Jie <liangjie@lixiang.com> Signed-off-by: Tejun Heo <tj@kernel.org> kernel/sched/ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1e9a0ff94b801e946f30c4aba29df247475d825 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Fri Dec 6 13:59:58 2024 -0800 accel/amdxdna: Add query firmware version Enhance GET_INFO ioctl to support retrieving firmware version. Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241206220001.164049-6-lizhi.hou@amd.com drivers/accel/amdxdna/aie2_pci.c | 20 ++++++++++++++++++++ include/uapi/drm/amdxdna_accel.h | 16 +++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) commit cfc722fc1c72e415d5f473affcdb3f3f556233f6 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Fri Dec 6 13:59:55 2024 -0800 accel/amdxdna: Replace mmput with mmput_async to avoid dead lock Hardware mailbox message receiving handler calls mmput to release the process mm. If the process has already exited, the mmput here may call mmu notifier handler, amdxdna_hmm_invalidate, which will cause a dead lock. Using mmput_async instead prevents this dead lock. Fixes: aac243092b70 ("accel/amdxdna: Add command execution") Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241206220001.164049-3-lizhi.hou@amd.com drivers/accel/amdxdna/aie2_ctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f78c081d44ce0f9d73dcef3204df5936ddbfea7 Author: Chun-Kuang Hu <chunkuang.hu@kernel.org> Date: Sun Sep 1 14:32:59 2024 +0000 soc: mediatek: cmdq: Remove cmdq_pkt_finalize() helper function In order to have fine-grained control, use cmdq_pkt_eoc() and cmdq_pkt_jump_rel() to replace cmdq_pkt_finalize(). Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> Acked-by: Matthias Brugger <matthias.bgg@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/soc/mediatek/mtk-cmdq-helper.c | 18 ------------------ include/linux/soc/mediatek/mtk-cmdq.h | 13 ------------- 2 files changed, 31 deletions(-) commit 48df9029743fd0318b3343dbc95b64620b951e9f Author: Chun-Kuang Hu <chunkuang.hu@kernel.org> Date: Sun Sep 1 14:32:58 2024 +0000 media: platform: mtk-mdp3: Use cmdq_pkt_create() and cmdq_pkt_destroy() Use the cmdq_pkt_create() and cmdq_pkt_destroy() common functions instead of implementing specific mdp3 versions. Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> .../media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 46 +++------------------- .../media/platform/mediatek/mdp3/mtk-mdp3-cmdq.h | 1 + 2 files changed, 6 insertions(+), 41 deletions(-) commit 50ab69f21e964455b4382df7a805cc147c7c2c44 Author: Chun-Kuang Hu <chunkuang.hu@kernel.org> Date: Sun Sep 1 14:32:57 2024 +0000 media: platform: mtk-mdp3: Get fine-grain control of cmdq_pkt_finalize() In order to have fine-grained control, use cmdq_pkt_eoc() and cmdq_pkt_jump_rel() to replace cmdq_pkt_finalize(). Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 3 ++- drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 2 ++ drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) commit 6633de339047364b25daecc3055b006fc253efe9 Author: Nícolas F. R. A. Prado <nfraprado@collabora.com> Date: Fri Aug 23 17:31:24 2024 -0400 media: platform: mtk-mdp3: Remove mask parameter from MM_REG_POLL macro Just like was done with MM_REG_WRITE, remove the mask from the MM_REG_POLL macro, leaving MM_REG_POLL_MASK to be used when a mask is required, and update the call sites accordingly. In this case, all calls require a mask, so MM_REG_POLL remains unused, but at least this makes the MM_REG_POLL macros consistent with the MM_REG_WRITE ones. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c | 8 ++++---- drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.h | 13 +++++-------- 2 files changed, 9 insertions(+), 12 deletions(-) commit 7b00fcfdb5ddfbcab34295dee3b8c4989ae92c2a Author: Nícolas F. R. A. Prado <nfraprado@collabora.com> Date: Fri Aug 23 17:31:23 2024 -0400 media: platform: mtk-mdp3: Remove mask parameter from MM_REG_WRITE macro There are two macros to issue a cmdq write: MM_REG_WRITE_MASK and MM_REG_WRITE, but confusingly, both of them take a mask parameter. The difference is that MM_REG_WRITE additionally checks whether the mask passed in contains the register mask, in which case, the 0xffffffff mask is passed to cmdq_pkt_write_mask(), effectively disregarding the mask and calling cmdq_pkt_write() as an optimization. Move that optimization to the MM_REG_WRITE_MASK macro and make MM_REG_WRITE the variant that doesn't take a mask, directly calling to cmdq_pkt_write(). Change the call sites to MM_REG_WRITE whenever a mask wasn't necessary (ie 0xffffffff or a <register>_MASK was passed as mask) and in other cases to MM_REG_WRITE_MASK. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> .../media/platform/mediatek/mdp3/mtk-mdp3-comp.c | 529 +++++++++------------ .../media/platform/mediatek/mdp3/mtk-mdp3-comp.h | 10 +- 2 files changed, 239 insertions(+), 300 deletions(-) commit 6d9038dc87003623aaf9a4dd86d7096ab5748397 Author: Nícolas F. R. A. Prado <nfraprado@collabora.com> Date: Fri Aug 23 17:31:22 2024 -0400 media: platform: mtk-mdp3: Remove useless variadic arguments from macros A few macros declare variadic arguments even though the underlying functions don't support them. Remove them. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 1ab010907fb154210f945d7a7248f59e860a9cdb Author: Nícolas F. R. A. Prado <nfraprado@collabora.com> Date: Fri Aug 23 17:31:21 2024 -0400 media: platform: mtk-mdp3: Use cmdq_pkt_write when no mask is needed cmdq_pkt_write_mask() boils down to a cmdq_pkt_write() when the mask is 0xFFFFFFFF. Call cmdq_pkt_write() directly in those cases to simplify the code. Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c3772d6c04c8a61c0e11831e4de857aff95385f0 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Fri Dec 6 13:59:54 2024 -0800 accel/amdxdna: Add device status for aie2 devices Add device status to track if aie2_hw_start() or aie2_hw_stop() is re-entered. In aie2_hw_stop(), call drmm_kfree to free mbox. Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241206220001.164049-2-lizhi.hou@amd.com drivers/accel/amdxdna/aie2_pci.c | 17 +++++++++++++++++ drivers/accel/amdxdna/aie2_pci.h | 7 +++++++ drivers/accel/amdxdna/amdxdna_mailbox.c | 6 ------ 3 files changed, 24 insertions(+), 6 deletions(-) commit b589fbc3f413c94b2f279c04ee802a008692a7fe Author: Rob Herring (Arm) <robh@kernel.org> Date: Tue Nov 12 10:55:57 2024 +1030 ARM: dts: nuvoton: Fix at24 EEPROM node names at24.yaml defines the node name for at24 EEPROMs as 'eeprom'. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20240910215905.823337-1-robh@kernel.org Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> Signed-off-by: Arnd Bergmann <arnd@arndb.de> arch/arm/boot/dts/nuvoton/nuvoton-npcm730-gbs.dts | 6 +++--- arch/arm/boot/dts/nuvoton/nuvoton-npcm750-runbmc-olympus.dts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 160825131614bbf0afaee837180391e313d9d08b Author: Mark Brown <broonie@kernel.org> Date: Thu Dec 12 19:36:32 2024 +0000 arm64: defconfig: Enable Amazon Elastic Network Adaptor The Graviton SoCs available in AWS use a custom network adaptor, enable support for this in defconfig so standard defconfig builds can be used more readily in CI. The driver is left as a module since it is relatively unlikely these will be netbooted. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241212-arm64-defconfig-graviton-v1-1-86830c3d572b@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit d4c0d167b1f6535da7183783688850b8c51e3c44 Author: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com> Date: Wed Dec 4 16:05:29 2024 +0000 MAINTAINER: Add entry for Blaize SoC Add MAINTAINERS entry for Blaize SoC platform with a list of maintainers. Signed-off-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Matt Redfearn <matt.redfearn@blaize.com> Acked-by: James Cowgill <james.cowgill@blaize.com> Acked-by: Neil Jones <neil.jones@blaize.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit b0837ce079804d57bdabe225e6daf069dcbfc609 Author: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com> Date: Wed Dec 4 16:05:28 2024 +0000 arm64: defconfig: Enable Blaize BLZP1600 platform Enable ARCH_BLAIZE to support the BLZP1600 SoC and the CB2 development board. Signed-off-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 2e976f19d9c2863e0f97bf598f42e87efe5d9784 Author: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com> Date: Wed Dec 4 16:05:27 2024 +0000 arm64: dts: Add initial support for Blaize BLZP1600 CB2 Add support for the Blaize CB2 development board based on the BLZP1600 SoC. This consists of a Carrier-Board-2 and a System-on-Module. Both BLZP1600 SoM and CB2 are available as products. CB2 (Pathfinder) has multiple peripherals like UART, I2C, SPI, GPIO, CSI (camera), DSI (display), USB-3.0 and Ethernet. Enable support for the Cryptocell, UART and I2C which are already fully supported by the drivers. The blaize-blzp1600.dtsi is the common part for the SoC, blaize-blzp1600-som.dtsi is the common part for the SoM and blaize-blzp1600-cb2.dts is the board specific file. Co-developed-by: James Cowgill <james.cowgill@blaize.com> Signed-off-by: James Cowgill <james.cowgill@blaize.com> Co-developed-by: Matt Redfearn <matt.redfearn@blaize.com> Signed-off-by: Matt Redfearn <matt.redfearn@blaize.com> Co-developed-by: Neil Jones <neil.jones@blaize.com> Signed-off-by: Neil Jones <neil.jones@blaize.com> Signed-off-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/blaize/Makefile | 2 + arch/arm64/boot/dts/blaize/blaize-blzp1600-cb2.dts | 83 +++++++++ .../arm64/boot/dts/blaize/blaize-blzp1600-som.dtsi | 23 +++ arch/arm64/boot/dts/blaize/blaize-blzp1600.dtsi | 205 +++++++++++++++++++++ 5 files changed, 314 insertions(+) commit c0b454a517553849093af19733489e1c57236905 Author: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com> Date: Wed Dec 4 16:05:26 2024 +0000 arm64: Add Blaize BLZP1600 SoC family Add ARCH_BLAIZE SoC family to the arm64 architecture to support the BLZP1600 System-On-Module and the Carrier-Board-2 development board. Signed-off-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com> Reviewed-by: Matt Redfearn <matt.redfearn@blaize.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> arch/arm64/Kconfig.platforms | 5 +++++ 1 file changed, 5 insertions(+) commit f156403c2c8dad011db22ef6d120b511784bd95f Author: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com> Date: Wed Dec 4 16:05:25 2024 +0000 dt-bindings: arm: blaize: Add Blaize BLZP1600 SoC Add device tree bindings for the Blaize BLZP1600 CB2 development board (carrier board). This board integrates a Blaize BLZP1600 SoM (System on Module) which is based on the Blaize BLZP1600 SoC. The Blaize BLZP1600 SoC integrates a dual core ARM Cortex A53 cluster and a Blaize Graph Streaming Processor for AI and ML workloads, plus a suite of connectivity and other peripherals. Signed-off-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com> Reviewed-by: Matt Redfearn <matt.redfearn@blaize.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Documentation/devicetree/bindings/arm/blaize.yaml | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 1fa9ce7e525dcf78824192557e72b0e906ffe55a Author: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com> Date: Wed Dec 4 16:05:24 2024 +0000 dt-bindings: Add Blaize vendor prefix Blaize, Inc. (www.blaize.com) is a SoC manufacturer with integrated programmable Graph-Streaming-Processors for AI and ML. Signed-off-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit a75916d1d95c07feda0df7247c380802b72ac1c2 Author: Jeffrey Hugo <quic_jhugo@quicinc.com> Date: Fri Nov 29 13:28:45 2024 -0700 accel/qaic: Fix typo for struct qaic_manage_trans_passthrough The documentation header for struct qaic_manage_trans_passthrough has a typo - "t" is missing in "transaction". Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> Reviewed-by: Youssef Samir <quic_yabdulra@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241129202845.3579306-1-quic_jhugo@quicinc.com include/uapi/drm/qaic_accel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c14b68596e748241d84431628c0b8aea41db2be Author: Saru2003 <sarvesh20123@gmail.com> Date: Mon Nov 25 22:21:22 2024 +0530 Documentation: zram: fix dictionary spelling Fixes a typo in the ZRAM documentation where 'dictioary' was misspelled. Corrected it to 'dictionary' in the example usage of 'algorithm_params'. Signed-off-by: Sarveshwaar SS <sarvesh20123@gmail.com> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241125165122.17521-1-sarvesh20123@gmail.com Documentation/admin-guide/blockdev/zram.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b76d32422c09bc9310f61a5a89671975db34bd2a Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Mon Dec 9 16:09:44 2024 +0000 kref: Improve documentation There is already kernel-doc written for many of the functions in kref.h but it's not linked into the html docs anywhere. Add it to kref.rst. Improve the kref documentation by using the standard Return: section, rewording some unclear verbiage and adding docs for some undocumented functions. Update Thomas' email address to his current one. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241209160953.757673-1-willy@infradead.org Documentation/core-api/kref.rst | 7 +++++- include/linux/kref.h | 48 +++++++++++++++++++++++++++++------------ 2 files changed, 40 insertions(+), 15 deletions(-) commit 9fb89b97652837a1b73a32aa472d3d44dc7a5ae6 Author: Bingwu Zhang <xtex@aosc.io> Date: Sun Dec 8 11:54:47 2024 +0800 Documentation: filesystems: fix two misspells This fixes two small misspells in the filesystems documentation. Signed-off-by: Bingwu Zhang <xtex@aosc.io> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241208035447.162465-2-xtex@envs.net Documentation/filesystems/iomap/operations.rst | 2 +- Documentation/filesystems/overlayfs.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c1aade0ee5e459cb7b7a8e301a9561bffef16d60 Author: Saru2003 <sarvesh20123@gmail.com> Date: Sun Dec 8 14:03:20 2024 +0530 Documentation/accounting: Fix typo in taskstats-struct.rst Corrected a typo in the 'taskstats-struct.rst' documentation. The macro name 'TAKSTATS_VERSION' was mistakenly mentioned instead of the correct 'TASKSTATS_VERSION'. The corrected line now references the proper macro 'TASKSTATS_VERSION', defined in '<linux/taskstats.h>'. Signed-off-by: Sarveshwaar SS <sarvesh20123@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241208083320.16190-1-sarvesh20123@gmail.com Documentation/accounting/taskstats-struct.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09cbeb5b301585343985e3b60d41425ff45d5961 Author: Andrew Kreimer <algonell@gmail.com> Date: Mon Dec 9 15:06:00 2024 +0200 Documentation/rv: Fix typos There are some typos in the documentation: 'a' -> 'at', missing 'to'. Fix them. Signed-off-by: Andrew Kreimer <algonell@gmail.com> Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241209130640.10954-1-algonell@gmail.com Documentation/trace/rv/runtime-verification.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bbf5254a5ab18b5a17e0c11a91a42d50a92bb5e1 Author: Michal Koutný <mkoutny@suse.com> Date: Wed Dec 11 18:00:52 2024 +0100 Documentation: sched/RT: Update paragraphs about RT bandwidth control This has slightly changed with the introduction of fair_server. Update the most relevant parts. Link: https://lore.kernel.org/r/Z0c8S8i3qt7SEU14@jlelli-thinkpadt14gen4.remote.csb/ Signed-off-by: Michal Koutný <mkoutny@suse.com> Reviewed-by: Juri Lelli <juri.lelli@redhat.com> Acked-by: Juri Lelli <juri.lelli@redhat.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241211170052.2449581-1-mkoutny@suse.com Documentation/scheduler/sched-deadline.rst | 13 +++++++------ Documentation/scheduler/sched-rt-group.rst | 8 ++++---- 2 files changed, 11 insertions(+), 10 deletions(-) commit 80568f479b65a2d3e85125a20a51af09e1cc7ea8 Author: Guixin Liu <kanie@linux.alibaba.com> Date: Mon Dec 9 15:11:27 2024 +0800 docs, nvme: introduce nvme-multipath document This adds a document about nvme-multipath and policies supported by the Linux NVMe host driver, and also each policy's best scenario. Signed-off-by: Guixin Liu <kanie@linux.alibaba.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241209071127.22922-1-kanie@linux.alibaba.com Documentation/admin-guide/index.rst | 1 + Documentation/admin-guide/nvme-multipath.rst | 72 ++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) commit dfddf35310a927f375e7dddc55e987a6ea719c6f Author: Carlos Maiolino <cmaiolino@redhat.com> Date: Fri Dec 13 16:17:40 2024 +0100 Documentation: Fix simple typo on filesystems/porting.rst Just spotted this while reading the doc. Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241213151743.23435-1-cem@kernel.org Documentation/filesystems/porting.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93a07ad57fa805b762d16f0ae024c446a5f6f3f1 Merge: 9fc78ffaf0c7 d9339496729f Author: Jonathan Corbet <corbet@lwn.net> Date: Fri Dec 13 08:28:25 2024 -0700 Merge branch 'docs-fixes' into docs-mw Bring the kernel-doc fix into docs-mw as well. commit aec95d7ce1c8fe5ee9940b861b53e31509ce9428 Merge: 1d18ebcfd302 f932fb9b4074 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Fri Dec 13 11:53:27 2024 -0300 Merge remote-tracking branch 'torvalds/master' into perf-tools-next To get the fixes that went thru perf-tools for v6.13. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> commit 3a8e60188b55f7aff76c1d3707ebcbf98e68cc13 Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Fri Oct 11 16:41:24 2024 +0200 drm/tiny: panel-mipi-dbi: Include <linux/of.h> Include <linux/of.h> directly to get of_property_read_string_index(). Avoids the proxy include via <linux/backlight.h> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: "Noralf Trønnes" <noralf@tronnes.org> Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241011144632.90434-7-tzimmermann@suse.de drivers/gpu/drm/tiny/panel-mipi-dbi.c | 1 + 1 file changed, 1 insertion(+) commit d1a1807bae39e91016ba006b1fcb3319fa4e51ba Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Fri Oct 11 16:41:23 2024 +0200 drm/panel: panel-samsung-s6e63m0: Include <linux/property.h> Include <linux/property.h> directly to get device_property_read_u32(). Avoids the proxy include via <linux/backlight.h> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Neil Armstrong <neil.armstrong@linaro.org> Cc: Jessica Zhang <quic_jesszhan@quicinc.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241011144632.90434-6-tzimmermann@suse.de drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 1 + 1 file changed, 1 insertion(+) commit dd49403a3269ce0aef0da1ea61e4021eed7a65e3 Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Fri Oct 11 16:41:22 2024 +0200 drm/panel: panel-samsung-s6e3ha2: Include <linux/mod_devicetable.h> Include <linux/mod_devicetable.h> directly to get struct of_device_id. Avoids the proxy include via <linux/backlight.h> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Neil Armstrong <neil.armstrong@linaro.org> Cc: Jessica Zhang <quic_jesszhan@quicinc.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241011144632.90434-5-tzimmermann@suse.de drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c | 1 + 1 file changed, 1 insertion(+) commit 5d09158305406aed983556ed2acdb5526cc113b9 Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Fri Oct 11 16:41:21 2024 +0200 drm/panel: panel-orisetech-otm8009a: Include <linux/mod_devicetable.h> Include <linux/mod_devicetable.h> directly to get struct of_device_id. Avoids the proxy include via <linux/backlight.h> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Neil Armstrong <neil.armstrong@linaro.org> Cc: Jessica Zhang <quic_jesszhan@quicinc.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241011144632.90434-4-tzimmermann@suse.de drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 1 + 1 file changed, 1 insertion(+) commit 8b974c5b39b1863b11e4f6911dbc3d03b6cb6d59 Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Fri Oct 11 16:41:20 2024 +0200 drm/panel: Include <linux/of.h> Include <linux/of.h> directly to get of_device_is_available(). Avoids the proxy include via <linux/backlight.h> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Neil Armstrong <neil.armstrong@linaro.org> Cc: Jessica Zhang <quic_jesszhan@quicinc.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241011144632.90434-3-tzimmermann@suse.de drivers/gpu/drm/drm_panel.c | 1 + 1 file changed, 1 insertion(+) commit 162fba219827636f89e921996ddfc41e598dca66 Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Fri Oct 11 16:41:19 2024 +0200 drm/fsl-dcu: Include <linux/of.h> Include <linux/of.h> directly to get of_parse_phandle(). Avoids the proxy include via <linux/backlight.h> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Stefan Agner <stefan@agner.ch> Cc: Alison Wang <alison.wang@nxp.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241011144632.90434-2-tzimmermann@suse.de drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 1 + 1 file changed, 1 insertion(+) commit f851b987f39121bb73d110c8508cac5ea60cfdc5 Author: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Date: Fri Dec 13 15:17:17 2024 +0200 ASoC: SOF: sof-priv: Remove unused SOF_DAI_STREAM() and SOF_FORMATS The following definitions have no users: SOF_DAI_STREAM() and SOF_FORMATS, they can be dropped from the header file. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Link: https://patch.msgid.link/20241213131717.24071-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sof/sof-priv.h | 8 -------- 1 file changed, 8 deletions(-) commit e4b3a8456447f0e10223ebaca81efabe8a71f3f2 Author: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Date: Fri Dec 13 15:21:10 2024 +0200 ASoC: SOF: ipc4-topology: Use macro to set the EXT_PARAM_SIZE in widget setup Use the SOF_IPC4_MOD_EXT_PARAM_SIZE() macro to set the param size in the extension part of the IPC message for clarity. No Functional change as the PARMA_SIZE offset is at 0. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://patch.msgid.link/20241213132110.27800-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sof/ipc4-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75a4a6ef615e2f4e9458051641f185498273ce02 Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Thu Dec 12 14:37:25 2024 +0000 firmware: cs_dsp: Add KUnit testing of client callbacks Test that the cs_dsp_client_ops callbacks are called when expected. pre_run, post_run - when cs_dsp_run() is called. pre_stop, post_stop - when cs_dsp_stop() is called control_add - when a WMFW is loaded control_remove - when cs_dsp_remove() is called Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241212143725.1381013-13-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/test/Makefile | 1 + .../firmware/cirrus/test/cs_dsp_test_callbacks.c | 688 +++++++++++++++++++++ 2 files changed, 689 insertions(+) commit feb5fb0615f321ab514f4fbbab777f3591f7e4b5 Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Thu Dec 12 14:37:24 2024 +0000 firmware: cs_dsp: Add KUnit testing of wmfw error cases Add tests for various types of errors and illegal values in wmfw files. This covers buffer overflows as well as general unsupported field values. There are several sets of test cases to cover various different versions of the wmfw file format. V0 format was only used on the earlier ADSP2 devices. It does not have algorithm blocks. V1 format is used on all ADSP2 versions. It added algorithm blocks and firmware coefficient descriptor blocks. Strings are stored in fixed-length arrays. V2 format is used on all ADSP2 versions. It is similar to V1 but space for strings is variable-length with either an 8-bit or 16-bit length field. V3 format is used on Halo Core DSPs and is mostly identical to the V3 format. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241212143725.1381013-12-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/test/Makefile | 1 + .../firmware/cirrus/test/cs_dsp_test_wmfw_error.c | 1347 ++++++++++++++++++++ 2 files changed, 1348 insertions(+) commit cd8c058499b65e8605cd3c387bb1f76e2954870e Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Thu Dec 12 14:37:23 2024 +0000 firmware: cs_dsp: Add KUnit testing of bin error cases Add tests for various types of errors and illegal values in bin files. This covers buffer overflows as well as general unsupported field values. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241212143725.1381013-11-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/test/Makefile | 1 + .../firmware/cirrus/test/cs_dsp_test_bin_error.c | 600 +++++++++++++++++++++ 2 files changed, 601 insertions(+) commit fe54fd5474f746f07f2b587f2f5e3311bf611970 Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Thu Dec 12 14:37:22 2024 +0000 firmware: cs_dsp: Add KUnit testing of control read/write Add KUnit test cases for control read/write. Tests cases cover general reading and writing of controls: 1) Read/write at offset position in control. 2) Read/write of various lengths less than length of the control. 3) Rejecting illegal arguments. The test cases are run for ADSP2 with 16-bit registers, ADSP2 with 32-bit registers and Halo Core with 32-bit registers. The ADSP2 cases are further divided into runs for V1 and V2 format WMFW files, because there are differences in how V1 and V2 defines controls. The obsolete V0 format does not have controls, so no testing of that format is needed. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241212143725.1381013-10-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/test/Makefile | 1 + .../firmware/cirrus/test/cs_dsp_test_control_rw.c | 2669 ++++++++++++++++++++ 2 files changed, 2670 insertions(+) commit 9b33a4fc500cedc1adc9c0ee01e30ffd50e5887a Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Thu Dec 12 14:37:21 2024 +0000 firmware: cs_dsp: Add KUnit testing of control cache Add KUnit test cases for the caching of control content. The test cases can be divided into four groups: 1) The cache is correctly initialized when the firmware is first downloaded. 2) Reads return the correct data. 3) Writes update the registers and cache. 4) If a value has been written to the control it is retained in the cache and written out to the registers when the firmware is started. There are multiple test suites to cover: - V1 and V2 format files on 16-bit and 32-bit ADSP2. - V3 format files on Halo Core DSPs. V1 format files, and some V2 format files, didn't provide access flags for the controls. There are a couple of test cases for unspecified flags to ensure backwards compatibility with the original implementation of these older firmware versions. The obsolete V0 format does not have controls, so no testing of that format is needed. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241212143725.1381013-9-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/test/Makefile | 1 + .../cirrus/test/cs_dsp_test_control_cache.c | 3282 ++++++++++++++++++++ 2 files changed, 3283 insertions(+) commit 83baecd92e7c2a44ac963fab8fd4476c71e19ddd Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Thu Dec 12 14:37:20 2024 +0000 firmware: cs_dsp: Add KUnit testing of control parsing Add KUnit test cases for parsing of firmware controls out of the wmfw. These test cases are only testing that the data in the wmfw is correctly interpreted and entered into the list of controls. The test cases can be roughly divided into three types: 1) The correct values are extracted from the wmfw. 2) Variable-length strings are handled correctly. 3) Controls are correctly identified as unique or identical. There are multiple test suites to cover: - V1 and V2 format files on 16-bit and 32-bit ADSP2. - V3 format files on Halo Core DSPs. V1 format does not have named controls, and the strings in the coefficient descriptor are fixed-length fields. On V2 and V3 format the controls are named and all strings are variable-length. The obsolete V0 format does not have controls, so no testing of that format is needed. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241212143725.1381013-8-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/test/Makefile | 1 + .../cirrus/test/cs_dsp_test_control_parse.c | 1851 ++++++++++++++++++++ 2 files changed, 1852 insertions(+) commit a2b2f2c1cd2a8b21c23bd1ec33131d2266c7568a Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Thu Dec 12 14:37:19 2024 +0000 firmware: cs_dsp: Add KUnit testing of wmfw download This adds a KUnit test suite to test downloading wmfw files. The general technique is 1. Create mock wmfw file content 2. Tell cs_dsp to download the wmfw file 3. Check in the emulated regmap registers that the correct values have been written to DSP memory 4. Drop the regmap cache for the expected written registers and then do a regcache_sync() to check for unexpected writes to other registers. The test covers ADSP2 v1 and v2, and HALO Core DSPs. (ADSP1 is very obsolete so isn't tested). There is a large number of test cases and parameterized variants of tests because of the many different addressing schemes supported by the Cirrus devices. The DSP has 2 or 3 memory spaces: XM, YM and ZM. The DSP sees these using its native addressing, which is word-addressed (not byte-addressed). The host sees these through one of several register mappings (depending on the DSP type and parent codec family). The registers have three different addressing schemes: 16-bit registers addressed by register number, 32-bit registers addressed by register number, or 32-bit registers addressed by byte (with a stride of 4). In addition to these multiple addressing schemes, the Halo Core DSPs have a "packed" register mapping that maps 4 DSP words into 3 registers. In addition to this there are 4 versions of the wmfw file format to be tested. The test cases intentionally have relatively little factoring-out of similar code. This makes it much easier to visually verify that a test case is testing correctly, and what exactly it is testing. Factoring out large amounts of code into helper functions tends to obscure what the actual test procedure is, so increasing the chance of hidden errors where test cases don't actually test as intended. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241212143725.1381013-7-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/test/Makefile | 1 + drivers/firmware/cirrus/test/cs_dsp_test_wmfw.c | 2211 +++++++++++++++++++++++ 2 files changed, 2212 insertions(+) commit dd0b6b1f29b92202d03a6d2dd7d65ecead27941a Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Thu Dec 12 14:37:18 2024 +0000 firmware: cs_dsp: Add KUnit testing of bin file download This adds a KUnit test suite to test downloading bin files. The general technique is 1. Create mock bin file content 2. Tell cs_dsp to download the bin file 3. Check in the emulated regmap registers that the correct values have been written to DSP memory 4. Drop the regmap cache for the expected written registers and then do a regcache_sync() to check for unexpected writes to other registers. The test covers ADSP2 v1 and v2, and HALO Core DSPs. (ADSP1 is very obsolete so isn't tested). There is a large number of test cases and parameterized variants of tests because of the many different addressing schemes supported by the Cirrus devices. The DSP has 2 or 3 memory spaces: XM, YM and ZM. The DSP sees these using its native addressing, which is word-addressed (not byte-addressed). The host sees these through one of several register mappings (depending on the DSP type and parent codec family). The registers have three different addressing schemes: 16-bit registers addressed by register number, 32-bit registers addressed by register number, or 32-bit registers addressed by byte (with a stride of 4). In addition to these multiple addressing schemes, the Halo Core DSPs have a "packed" register mapping that maps 4 DSP words into 3 registers. The bin file addresses the data blob relative to the base address of an algorithm, which has to be calculated in both DSP words (for the DSP to access) and register addresses (for the host). This results in many different addressing schemes used in parallel, hence the complexity of the address and size manipulation in the test cases: word addresses in DSP memory, byte offsets, word offsets, register addresses (either byte-addressed 32-bit or index-addressed 16-bit), and packed register addresses. The test cases intentionally have relatively little factoring-out of similar code. This makes it much easier to visually verify that a test case is testing correctly, and what exactly it is testing. Factoring out large amounts of code into helper functions tends to obscure what the actual test procedure is, so increasing the chance of hidden errors where test cases don't actually test as intended. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241212143725.1381013-6-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/Kconfig | 14 + drivers/firmware/cirrus/test/Makefile | 5 + drivers/firmware/cirrus/test/cs_dsp_test_bin.c | 2557 ++++++++++++++++++++++++ drivers/firmware/cirrus/test/cs_dsp_tests.c | 14 + 4 files changed, 2590 insertions(+) commit 7c052c6615297ff32032105130cd5f02059f7ae4 Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Thu Dec 12 14:37:17 2024 +0000 firmware: cs_dsp: Add mock bin file generator for KUnit testing Add a mock firmware file that emulates what the firmware build tools would normally create. This will be used by KUnit tests to generate a test bin file. The data payload in a bin is an opaque blob, so the mock bin only needs to generate the appropriate file header and description block for each payload blob. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241212143725.1381013-5-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/test/Makefile | 1 + drivers/firmware/cirrus/test/cs_dsp_mock_bin.c | 199 ++++++++++++++++++++++ include/linux/firmware/cirrus/cs_dsp_test_utils.h | 18 ++ 3 files changed, 218 insertions(+) commit 5cf1b7b471803f7cc654a29ee16cb085ad69c097 Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Thu Dec 12 14:37:16 2024 +0000 firmware: cs_dsp: Add mock wmfw file generator for KUnit testing Add a mock firmware file that emulates what the firmware build tools would normally create. This will be used by KUnit tests to generate a test wmfw file. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241212143725.1381013-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/test/Makefile | 3 +- drivers/firmware/cirrus/test/cs_dsp_mock_wmfw.c | 473 ++++++++++++++++++++++ include/linux/firmware/cirrus/cs_dsp_test_utils.h | 33 ++ 3 files changed, 508 insertions(+), 1 deletion(-) commit 41e78c0f44f97c958afcda3f82b23f4f4a05b968 Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Thu Dec 12 14:37:15 2024 +0000 firmware: cs_dsp: Add mock DSP memory map for KUnit testing Add helper functions to implement an emulation of the DSP memory map. There are three main groups of functionality: 1. Define a mock cs_dsp_region table. 2. Calculate the addresses of memory and algorithms from the firmware header in XM. 3. Build a mock XM header in emulated XM. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241212143725.1381013-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/firmware/cirrus/test/Makefile | 1 + .../firmware/cirrus/test/cs_dsp_mock_mem_maps.c | 751 +++++++++++++++++++++ include/linux/firmware/cirrus/cs_dsp_test_utils.h | 63 ++ 3 files changed, 815 insertions(+) commit d54a3fc6bf3db0db0e16cfdf7f48a8bbb803f6b0 Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Thu Dec 12 14:37:14 2024 +0000 firmware: cs_dsp: Add mock regmap for KUnit testing Add a mock regmap implementation to act as a simulated DSP for KUnit testing. This is built as a utility module so that it could be used by clients of cs_dsp to create a mock "DSP" for their own testing. cs_dsp interacts with the DSP only through registers. Most of the register space of the DSP is RAM. ADSP cores have a small set of control registers. HALO Core DSPs have a much larger set of control registers but only a small subset are used. Most writes are "blind" in the sense that cs_dsp does not expect to receive any sort of response from the DSP. So there isn't any need to emulate a "DSP", only a set of registers that can be written and read back. The idea of the mock regmap is to use the cache to accumulate writes which can then be tested against the values that are expected to be in the registers. Stray writes can be detected by dropping the cache entries for all addresses that should have been written and then issuing a regcache_sync(). If this causes bus writes it means there were writes to unexpected registers. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241212143725.1381013-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> MAINTAINERS | 4 +- drivers/firmware/cirrus/Kconfig | 6 + drivers/firmware/cirrus/Makefile | 2 + drivers/firmware/cirrus/test/Makefile | 8 + drivers/firmware/cirrus/test/cs_dsp_mock_regmap.c | 367 ++++++++++++++++++++++ drivers/firmware/cirrus/test/cs_dsp_mock_utils.c | 13 + include/linux/firmware/cirrus/cs_dsp_test_utils.h | 46 +++ 7 files changed, 444 insertions(+), 2 deletions(-) commit 3a47319d2d910291f4c09c0f1fec4e86a2e03696 Author: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Date: Fri Dec 13 12:11:23 2024 +0200 ASoC: SOF: Intel: hda-pcm: Follow the pause_supported flag to drop PAUSE support If the stream's pause_supported flag is false then mask out the PAUSE support, so user space will be prevented to use it. Introduce a module parameter to ignore the pause_supported flag, named as force_pause_support to allow testing of the PAUSE feature. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Link: https://patch.msgid.link/20241213101123.27318-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sof/intel/hda-pcm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 70a667d70cce338ab8552dd762ae114a5ab96500 Author: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Date: Fri Dec 13 12:11:22 2024 +0200 ASoC: SOF: Add support for pause supported tokens from topology New tokens are added to topology: 1202: SOF_TKN_STREAM_PLAYBACK_PAUSE_SUPPORTED 1203: SOF_TKN_STREAM_CAPTURE_PAUSE_SUPPORTED The new tokens are used to advertise support for PAUSE/RESUME operation on a PCM device depending on firmware product, use case, pipeline topology. The snd_sof_pcm_stream.pause_supported is updated to reflect the advertised value for the PCM device. If the token does not exist then the pause_supported is set to false. Note: it is up to the platform code to use this flag to decide to advertise the PAUSE support for user space or not. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Link: https://patch.msgid.link/20241213101123.27318-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> include/uapi/sound/sof/tokens.h | 2 ++ sound/soc/sof/sof-audio.h | 1 + sound/soc/sof/topology.c | 4 ++++ 3 files changed, 7 insertions(+) commit 104372ff359486b26b5a2db33b8e1dc6bfb39812 Merge: b05d30c2b6df 09489812013f Author: Kalle Valo <kvalo@kernel.org> Date: Fri Dec 13 14:57:06 2024 +0200 Merge tag 'rtw-next-2024-12-12' of https://github.com/pkshih/rtw rtw-next patches for v6.14 Regular development in this period. Main changes are listed: rtl8xxxu: * add more USB devices IDs rtlwifi: * refine error path rtw88: * add more USB devices IDs * enable USB RX aggregation and USB 3 to improve performance rtw89: * implement more stuffs including PS flow for MLO commit b05d30c2b6df7e2172b18bf1baee9b202f9c6b53 Author: Marcel Hamer <marcel.hamer@windriver.com> Date: Wed Dec 11 14:36:18 2024 +0100 wifi: brcmfmac: add missing header include for brcmf_dbg Including the fwil.h header file can lead to a build error: drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.h: \ In function ‘brcmf_fil_cmd_int_set’: drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.h:90:9: error: implicit \ declaration of function ‘brcmf_dbg’ [-Werror=implicit-function-declaration] 90 | brcmf_dbg(FIL, "ifidx=%d, cmd=%d, value=%d\n", ifp->ifidx, cmd, data); | ^~~~~~~~~ The error is often avoided because the debug.h header file is included before the fwil.h header file. This makes sure the header include order is irrelevant by explicitly adding the debug.h header. Fixes: 31343230abb1 ("wifi: brcmfmac: export firmware interface functions") Signed-off-by: Marcel Hamer <marcel.hamer@windriver.com> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241211133618.2014083-1-marcel.hamer@windriver.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.h | 2 ++ 1 file changed, 2 insertions(+) commit 3f4a0948c3524ae50f166dbc6572a3296b014e62 Author: Dmitry Antipov <dmantipov@yandex.ru> Date: Tue Dec 10 10:04:41 2024 +0300 wifi: brcmsmac: add gain range check to wlc_phy_iqcal_gainparams_nphy() In 'wlc_phy_iqcal_gainparams_nphy()', add gain range check to WARN() instead of possible out-of-bounds 'tbl_iqcal_gainparams_nphy' access. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241210070441.836362-1-dmantipov@yandex.ru drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c | 3 +++ 1 file changed, 3 insertions(+) commit 56e14a21cee4ea6074b956a9ff2e406de5ad6548 Author: Tao Zhang <quic_taozha@quicinc.com> Date: Fri Dec 13 18:07:31 2024 +0800 coresight-tpda: Optimize the function of reading element size Since the new funnel device supports multi-port output scenarios, there may be more than one TPDM connected to one TPDA. In this way, when reading the element size of the TPDM, TPDA driver needs to find the expected TPDM corresponding to the filter source. When TPDA finds a TPDM or a filter source from a input connection, it will read the Devicetree to get the expected TPDM's element size. Signed-off-by: Tao Zhang <quic_taozha@quicinc.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20241213100731.25914-5-quic_taozha@quicinc.com drivers/hwtracing/coresight/coresight-tpda.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit ec9903d6cc34e61b77e609a0425e7a0a804fb95a Author: Tao Zhang <quic_taozha@quicinc.com> Date: Fri Dec 13 18:07:30 2024 +0800 coresight: Add support for trace filtering by source Some replicators have hard coded filtering of "trace" data, based on the source device. This is different from the trace filtering based on TraceID, available in the standard programmable replicators. e.g., Qualcomm replicators have filtering based on custom trace protocol format and is not programmable. The source device could be connected to the replicator via intermediate components (e.g., a funnel). Thus we need platform information from the firmware tables to decide the source device corresponding to a given output port from the replicator. Given this affects "trace path building" and traversing the path back from the sink to source, add the concept of "filtering by source" to the generic coresight connection. The specified source will be marked like below in the Devicetree. test-replicator { ... ... ... ... out-ports { ... ... ... ... port@0 { reg = <0>; xyz: endpoint { remote-endpoint = <&zyx>; filter-source = <&source_1>; <-- To specify the source to }; be filtered out here. }; port@1 { reg = <1>; abc: endpoint { remote-endpoint = <&cba>; filter-source = <&source_2>; <-- To specify the source to }; be filtered out here. }; }; }; Signed-off-by: Tao Zhang <quic_taozha@quicinc.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20241213100731.25914-4-quic_taozha@quicinc.com drivers/hwtracing/coresight/coresight-core.c | 113 +++++++++++++++++++---- drivers/hwtracing/coresight/coresight-platform.c | 21 +++++ include/linux/coresight.h | 5 + 3 files changed, 120 insertions(+), 19 deletions(-) commit 62374ce1876be26b3f33575680e67ca69a59db54 Author: Tao Zhang <quic_taozha@quicinc.com> Date: Fri Dec 13 18:07:29 2024 +0800 coresight: Add a helper to check if a device is source Since there are a lot of places in the code to check whether the device is source, add a helper to check it. Signed-off-by: Tao Zhang <quic_taozha@quicinc.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20241213100731.25914-3-quic_taozha@quicinc.com drivers/hwtracing/coresight/coresight-tpda.c | 2 +- include/linux/coresight.h | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit 2a0bc219272b7b83916b108b1ec8cc656275e21b Author: Tao Zhang <quic_taozha@quicinc.com> Date: Fri Dec 13 18:07:28 2024 +0800 dt-bindings: arm: qcom,coresight-static-replicator: Add property for source filtering The is some "magic" hard coded filtering in the replicators, which only passes through trace from a particular "source". Add a new property "filter-source" to label a phandle to the coresight trace source device matching the hard coded filtering for the port. Signed-off-by: Tao Zhang <quic_taozha@quicinc.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20241213100731.25914-2-quic_taozha@quicinc.com .../bindings/arm/arm,coresight-static-replicator.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 24bfc042ba3dc3692e206ff060eb22733b6d3ac0 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:53 2024 +0200 arm64: dts: renesas: rzg3s-smarc: Add sound card Add sound card with SSI3 as CPU DAI and DA7212 as codec DAI. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://lore.kernel.org/20241210170953.2936724-25-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 558a25c2ee3815c3d59d4dd9440a1cb3a78d20ab Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:52 2024 +0200 arm64: dts: renesas: rzg3s-smarc: Enable SSI3 Enable SSI3. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://lore.kernel.org/20241210170953.2936724-24-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit c3de00ac31f76b8e3af9f7a85c2da29c1b72babf Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:51 2024 +0200 arm64: dts: renesas: Add da7212 audio codec node Add the da7212 audio codec node. Along with it regulators nodes were reworked to be able to re-use them on da7212. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://lore.kernel.org/20241210170953.2936724-23-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi | 17 ++++++++++++----- arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 21 +++++++++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) commit a94253232b0454ae3f45e2a941bbc0a1d5bdb955 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:50 2024 +0200 arm64: dts: renesas: rzg3s-smarc-som: Add versa3 clock generator node Add versa3 clock generator node. It provides the clocks for the Ethernet PHY, PCIe, audio devices. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://lore.kernel.org/20241210170953.2936724-22-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 880f6c84701cb7735d19f20db89e757086a8fcfa Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:49 2024 +0200 arm64: dts: renesas: r9a08g045: Add SSI nodes Add DT nodes for the SSI IPs available on the Renesas RZ/G3S SoC. Along with it external audio clocks were added. Board device tree could use it and update the frequencies. Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241210170953.2936724-21-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 94 ++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit 8cbf69bc74e1f365b0ef8caf5dd2ac994ce965e0 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Dec 6 13:13:37 2024 +0200 arm64: dts: renesas: rzg3s-smarc-som: Enable ADC Enable ADC. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241206111337.726244-16-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 78f2c089d0797fbf677a415aeeba8061b442027b Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Dec 6 13:13:36 2024 +0200 arm64: dts: renesas: r9a08g045: Add ADC node Add the device tree node for the ADC IP available on the Renesas RZ/G3S SoC. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241206111337.726244-15-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 53 ++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit c4d87fe3cd4eab905f235ecfdd09313be9bc0e99 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Tue Dec 3 10:49:39 2024 +0000 arm64: dts: renesas: Add initial device tree for RZ/G3E SMARC EVK board Add the initial device tree for the Renesas RZ/G3E SMARC EVK board. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241203105005.103927-13-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/Makefile | 2 ++ arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts | 18 ++++++++++++++++ arch/arm64/boot/dts/renesas/renesas-smarc2.dtsi | 24 ++++++++++++++++++++++ 3 files changed, 44 insertions(+) commit e0379695728b0d79c20bc1a904bb4168d4f117c0 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Tue Dec 3 10:49:38 2024 +0000 arm64: dts: renesas: Add initial support for RZ/G3E SMARC SoM Add initial support for the RZ/G3E SMARC SoM with 4GB memory, audio_extal, qextal and rtxin clks. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241203105005.103927-12-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 8e96597f3c25007d292eabba9cfc9612e7d90f0f Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Tue Dec 3 10:49:37 2024 +0000 arm64: dts: renesas: r9a09g047: Add OPP table Add OPP table for RZ/G3E SoC. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241203105005.103927-11-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 9977754eeebed749a071492d98e46700307c0bd1 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Tue Dec 3 10:49:36 2024 +0000 arm64: dts: renesas: Add initial DTSI for RZ/G3E SoC Add the initial DTSI for the RZ/G3E SoC. The files in this commit have the following meaning: - r9a09g047.dtsi: RZ/G3E family SoC common parts - r9a09g047e57.dtsi: RZ/G3E R0A09G047E{4,5}{7,8} SoC specific parts - r9a09g047e37.dtsi: RZ/G3E R0A09G047E{2,3}{7,8} SoC specific parts Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241203105005.103927-10-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 144 ++++++++++++++++++++++++++ arch/arm64/boot/dts/renesas/r9a09g047e37.dtsi | 18 ++++ arch/arm64/boot/dts/renesas/r9a09g047e57.dtsi | 13 +++ 3 files changed, 175 insertions(+) commit 6977c89b4db7739aeaa5bd3989a2b5208e2805e7 Merge: a57e6e1fe02e 25458fdd39a1 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Fri Dec 13 11:17:24 2024 +0100 Merge tag 'renesas-r9a09g047-dt-binding-defs-tag1' into renesas-dts-for-v6.14 Renesas RZ/G3E DT Binding Definitions DT bindings and binding definitions for the Renesas RZ/G3E (R9A09G047) SoC, shared by driver and DT source files. commit a57e6e1fe02e2499663c409f039eab7a746af11d Author: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Date: Wed Oct 23 17:46:43 2024 +0200 arm64: dts: renesas: falcon-ethernet: Describe PHYs connected on the breakout board Describe and connect the five Marvell 88Q2110 PHYs present on the Falcon Ethernet breakout board. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241023154643.4025941-3-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> .../boot/dts/renesas/r8a779a0-falcon-ethernet.dtsi | 242 +++++++++++++++++++++ 1 file changed, 242 insertions(+) commit 95605458312787fadff4001b1df53154451c05a2 Author: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Date: Wed Oct 23 17:46:42 2024 +0200 arm64: dts: renesas: r8a779a0: Remove address- and size-cells from AVB[1-5] When describing the PHYs on the Falcon Ethernet breakout board mdio nodes will be needed to describe the connections, and each mdio node will need to contain these two properties instead. This will make the address-cells and size-cells described in the base SoC include file redundant and they will produce warnings, remove them. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241023154643.4025941-2-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 10 ---------- 1 file changed, 10 deletions(-) commit a40f02b2923b6d58e76cfef760b8ed61a00f1d53 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Tue Dec 3 10:49:40 2024 +0000 arm64: defconfig: Enable R9A09G047 SoC Enable support for the Renesas RZ/G3E (R9A09G047) SoC in the ARM64 defconfig. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241203105005.103927-14-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 12e0bd600e3c2f33f9db0e3b91f6b8d8d95b7dbe Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Tue Dec 3 10:49:32 2024 +0000 soc: renesas: Add RZ/G3E (R9A09G047) config option Add a configuration option for the RZ/G3E SoC. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241203105005.103927-6-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/soc/renesas/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) commit 25458fdd39a18a5ce00c36f38992da54bb7453f3 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Tue Dec 3 10:49:31 2024 +0000 dt-bindings: clock: renesas: Document RZ/G3E SoC CPG Document the device tree bindings for the Renesas RZ/G3E SoC Clock Pulse Generator (CPG). Also define constants for the core clocks of the RZ/G3E SoC. Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241203105005.103927-5-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> .../bindings/clock/renesas,rzv2h-cpg.yaml | 15 +++++++++------ include/dt-bindings/clock/renesas,r9a09g047-cpg.h | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+), 6 deletions(-) commit 2bf1a3ca1df7ed93e5ac82ff672753a4edbb6e80 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Tue Dec 3 10:49:30 2024 +0000 dt-bindings: soc: renesas: Document RZ/G3E SMARC SoM and Carrier-II EVK Document the Renesas RZ/G3E SMARC Carrier-II EVK board which is based on the Renesas RZ/G3E SMARC SoM. The RZ/G3E SMARC Carrier-II EVK consists of an RZ/G3E SoM module and a SMARC Carrier-II carrier board. The SoM module sits on top of the carrier board. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241203105005.103927-4-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Documentation/devicetree/bindings/soc/renesas/renesas.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit ceaa1428e197d9d273ceaf60b8a7bbb3a60565b3 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Tue Dec 3 10:49:29 2024 +0000 dt-bindings: soc: renesas: Document Renesas RZ/G3E SoC variants Document Renesas RZ/G3E (R9A09G047) SoC variants. Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241203105005.103927-3-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Documentation/devicetree/bindings/soc/renesas/renesas.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit ba68e6906057584d1f5f5374c585d51f64252e49 Author: Marek Vasut <marex@denx.de> Date: Mon Nov 25 02:33:36 2024 +0100 drm/panel: simple: add Multi-Inno Technology MI0700A2T-30 Add Multi-Inno Technology MI0700A2T-30 7" 800x480 LVDS panel support. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241125013413.160725-2-marex@denx.de Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241125013413.160725-2-marex@denx.de drivers/gpu/drm/panel/panel-simple.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 465f127a50058ff3f32aa5e3098d9499ea63960e Author: Marek Vasut <marex@denx.de> Date: Mon Nov 25 02:33:35 2024 +0100 dt-bindings: display: simple: Document Multi-Inno Technology MI0700A2T-30 panel Add Multi-Inno Technology MI0700A2T-30 7" 800x480 LVDS panel compatible string. Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241125013413.160725-1-marex@denx.de Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241125013413.160725-1-marex@denx.de Documentation/devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 1c64605fd976cd2c7e4f30d826818a8c27924c32 Author: Fabio Estevam <festevam@denx.de> Date: Tue Dec 10 07:57:04 2024 -0300 dt-bindings: display: panel-lvds: Add compatible for AUO G084SN05 V9 The AUO G084SN05 V9 is an 8.4" 800x600 LVDS display. Add a compatible entry for this LVDS display model. Signed-off-by: Fabio Estevam <festevam@denx.de> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241210105705.116116-1-festevam@gmail.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241210105705.116116-1-festevam@gmail.com Documentation/devicetree/bindings/display/panel/panel-lvds.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 1ba1964a7f83daae7fdeaf2de584a7ba758c4491 Author: Christian Hewitt <christianshewitt@gmail.com> Date: Wed Nov 27 04:33:58 2024 +0000 arm64: dts: meson: remove broadcom wifi compatible from GX reference boards Amlogic GX reference boards shipped with Broadcom SDIO modules and this is described in device-tree files. These boards are rare, but their device-trees are commonly used to boot no-name Android STB's that closely follow the vendor reference design. For cost reasons these boxes often use non-Broadcom RTL8189ES/FS and QCA9377 SDIO modules, and for availability reasons the chipset/module used can change between batches of the same device. Testing shows the only requirement for WiFi driver probe and load is presence of the correct 'reg' value, and all Amlogic boards use the same <1> value. Removing the 'brcm,bcm4329-fmac' compatible allows a wider range of Android STB boards to boot from reference design device-trees and have working WiFi. Also convert the 'brcmf' node name to a more generic 'sdio' to reflect we are not always using the Broadcom brcmfmac driver now. Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Link: https://lore.kernel.org/r/20241127043358.3799737-1-christianshewitt@gmail.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 3 +-- arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts | 3 +-- arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p231.dts | 3 +-- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 3 +-- arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts | 3 +-- arch/arm64/boot/dts/amlogic/meson-gxm-q201.dts | 3 +-- 6 files changed, 6 insertions(+), 12 deletions(-) commit b62eaff0650dc6dc2a4bf0f50714f2357a23fc71 Author: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Thu Dec 12 15:45:09 2024 +0800 ASoC: fsl_easrc: register m2m platform device Register m2m platform device,that user can use M2M feature. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Link: https://patch.msgid.link/20241212074509.3445859-7-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_easrc.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) commit 286d658477a43284f7be2539b059ecc90ba109c2 Author: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Thu Dec 12 15:45:08 2024 +0800 ASoC: fsl_asrc: register m2m platform device Register m2m platform device, that user can use M2M feature. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Link: https://patch.msgid.link/20241212074509.3445859-6-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_asrc.c | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) commit 24a01710f6271ec32b629d714e6a64a69665128b Author: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Thu Dec 12 15:45:07 2024 +0800 ASoC: fsl_asrc_m2m: Add memory to memory function Implement the ASRC memory to memory function using the compress framework, user can use this function with compress ioctl interface. This feature can be shared by ASRC and EASRC drivers Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Link: https://patch.msgid.link/20241212074509.3445859-5-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/Kconfig | 2 + sound/soc/fsl/Makefile | 2 +- sound/soc/fsl/fsl_asrc_common.h | 9 + sound/soc/fsl/fsl_asrc_m2m.c | 727 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 739 insertions(+), 1 deletion(-) commit 27147695aaf7ccb0edc3f21454b5405c9037b4ba Author: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Thu Dec 12 15:45:06 2024 +0800 ASoC: fsl_easrc: define functions for memory to memory usage ASRC can be used on memory to memory case, define several functions for m2m usage and export them as function pointer. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Link: https://patch.msgid.link/20241212074509.3445859-4-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_easrc.c | 228 ++++++++++++++++++++++++++++++++++++++++++++++ sound/soc/fsl/fsl_easrc.h | 4 + 2 files changed, 232 insertions(+) commit 8ea7d04a4e9e30876c9d8184b4b8e4cab33e0372 Author: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Thu Dec 12 15:45:05 2024 +0800 ASoC: fsl_asrc: define functions for memory to memory usage ASRC can be used on memory to memory case, define several functions for m2m usage. m2m_prepare: prepare for the start step m2m_start: the start step m2m_unprepare: unprepare for stop step, optional m2m_stop: stop step m2m_check_format: check format is supported or not m2m_calc_out_len: calculate output length according to input length m2m_get_maxburst: burst size for dma m2m_pair_suspend: suspend function of pair, optional. m2m_pair_resume: resume function of pair get_output_fifo_size: get remaining data size in FIFO Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Link: https://patch.msgid.link/20241212074509.3445859-3-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_asrc.c | 142 ++++++++++++++++++++++++++++++++++++++++ sound/soc/fsl/fsl_asrc.h | 2 + sound/soc/fsl/fsl_asrc_common.h | 61 +++++++++++++++++ 3 files changed, 205 insertions(+) commit f4425e3ab2f796d442a44f31262eade9b6427ff7 Author: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Thu Dec 12 15:45:04 2024 +0800 ALSA: compress: Add output rate and output format support Add 'pcm_format' for struct snd_codec, add 'pcm_formats' for struct snd_codec_desc, these are used for accelerator usage. Current accelerator example is sample rate converter (SRC). Define struct snd_codec_desc_src for descript minmum and maxmum sample rates. And add 'src_d' in union snd_codec_options structure. These are mainly used for capbility query. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Acked-by: Vinod Koul <vkoul@kernel.org> Link: https://patch.msgid.link/20241212074509.3445859-2-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> include/uapi/sound/compress_params.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit 5506b7d7bbdb7622959d80a4a2fc18985a01d512 Author: Eduard Zingerman <eddyz87@gmail.com> Date: Thu Dec 12 16:32:24 2024 -0800 selftests/bpf: make BPF_TARGET_ENDIAN non-recursive to speed up *.bpf.o build BPF_TARGET_ENDIAN is used in CLANG_BPF_BUILD_RULE and co macros. It is defined as a recursively expanded variable, meaning that it is recomputed each time the value is needed. Thus, it is recomputed for each *.bpf.o file compilation. The variable is computed by running a C compiler in a shell. This significantly hinders parallel build performance for *.bpf.o files. This commit changes BPF_TARGET_ENDIAN to be a simply expanded variable. # Build performance stats before this commit $ git clean -xfd; time make -j12 real 1m0.000s ... # Build performance stats after this commit $ git clean -xfd; time make -j12 real 0m43.605s ... Signed-off-by: Eduard Zingerman <eddyz87@gmail.com> Acked-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20241213003224.837030-1-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 689d72824dfe0ea613ae5d9fc0f6be044fe5b8f9 Author: Yang Chen <yangchen.openbmc@gmail.com> Date: Thu Dec 12 21:32:26 2024 +0800 ARM: dts: aspeed: minerva: add second source RTC Add second source RTC on i2c bus 9. Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com> Link: https://patch.msgid.link/20241212133226.342937-5-yangchen.openbmc@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 2421d5a9217eec120561fb65684e341b76aadd66 Author: Yang Chen <yangchen.openbmc@gmail.com> Date: Thu Dec 12 21:32:25 2024 +0800 ARM: dts: aspeed: minerva: add bmc ready led setting Add GPIO BMC_READY on LED and give it active value and transitory flag. Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com> Link: https://patch.msgid.link/20241212133226.342937-4-yangchen.openbmc@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-minerva.dts | 5 +++++ 1 file changed, 5 insertions(+) commit fbcdbc1eedef7b00dd645269967919fbda7de382 Author: Yang Chen <yangchen.openbmc@gmail.com> Date: Thu Dec 12 21:32:24 2024 +0800 ARM: dts: aspeed: minerva: add i/o expanders on each FCB Add four I/O expanders on each i2c of fan control board (FCB), assign the GPIO line name to each GPIO in use, and specify the interrupt GPIO number for each FCB's i/o expander. Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com> Link: https://patch.msgid.link/20241212133226.342937-3-yangchen.openbmc@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../dts/aspeed/aspeed-bmc-facebook-minerva.dts | 456 +++++++++++++++++++++ 1 file changed, 456 insertions(+) commit 2f5b33ff11310df1e6e17716650a283270c72fad Author: Yang Chen <yangchen.openbmc@gmail.com> Date: Thu Dec 12 21:32:23 2024 +0800 ARM: dts: aspeed: minerva: add i/o expanders on bus 0 Add three I/O expanders on i2c bus 0, assign the GPIO line name to each GPIO in use, and specify the interrupt GPIO that has been used on it and give the interrupt gpio number. Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com> Link: https://patch.msgid.link/20241212133226.342937-2-yangchen.openbmc@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../dts/aspeed/aspeed-bmc-facebook-minerva.dts | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit b3092f4a8ebc2428e97a42826545fbbec39940ca Author: Potin Lai <potin.lai.pt@gmail.com> Date: Thu Nov 21 12:34:05 2024 +0800 ARM: dts: aspeed: catalina: remove interrupt of GPIOB4 form all IOEXP We notice this interrupt pin always keep low, it cause BMC stuck at boot up until kernel disabling IRQ of this GPIO pin. Remove the interrupt of GPIOB4 pin from all IOEXP for now to avoid BMC get stuck. Signed-off-by: Potin Lai <potin.lai.pt@gmail.com> Link: https://patch.msgid.link/20241121-catalina-dts-20241120-v1-2-e4212502624b@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-catalina.dts | 6 ------ 1 file changed, 6 deletions(-) commit 48c45702c37a95018357c645a1c1f052b2e066f5 Author: Potin Lai <potin.lai.pt@gmail.com> Date: Thu Nov 21 12:34:04 2024 +0800 ARM: dts: aspeed: catalina: revise ltc4287 shunt-resistor value Fix wrong shunt-resistor settings of two ltc4287 nodes. Signed-off-by: Potin Lai <potin.lai.pt@gmail.com> Link: https://patch.msgid.link/20241121-catalina-dts-20241120-v1-1-e4212502624b@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-catalina.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 48ba87be3ff8da2943d221f843a9cd8b714699ca Author: Eddie James <eajames@linux.ibm.com> Date: Fri Nov 15 16:27:21 2024 -0600 arm: dts: aspeed: Blueridge and Rainer: Add VRM presence GPIOs Add GPIO line names to the GPIO expander to describe DCM and VRM presence detection lines. Signed-off-by: Eddie James <eajames@linux.ibm.com> Link: https://patch.msgid.link/20241115222721.1564735-1-eajames@linux.ibm.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-blueridge.dts | 5 +++-- arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-rainier.dts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 53aa3e1422fa90d8dc5f4e7c8e0cde3a1d3dc4b0 Author: Eddie James <eajames@linux.ibm.com> Date: Thu Nov 7 09:14:31 2024 -0600 ARM: dts: aspeed: Blueridge and Fuji: Fix LED node names The addressing on PCA LED nodes should be in hexadecimal, not decimal. Signed-off-by: Eddie James <eajames@linux.ibm.com> Link: https://patch.msgid.link/20241107151431.1045102-1-eajames@linux.ibm.com [aj: Capitalise ARM in subject] Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../boot/dts/aspeed/aspeed-bmc-ibm-blueridge.dts | 36 +++++----- arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-fuji.dts | 84 +++++++++++----------- 2 files changed, 60 insertions(+), 60 deletions(-) commit 2bec75006d5b6c640a6b154fd50346fa8220aaaf Author: Eddie James <eajames@linux.ibm.com> Date: Wed Nov 6 13:33:03 2024 -0600 arm: dts: aspeed: Everest and Fuji: Add VRM presence gpio expander Add the gpio expander that provides the VRM presence detection pins. Signed-off-by: Eddie James <eajames@linux.ibm.com> Link: https://patch.msgid.link/20241106193303.748824-1-eajames@linux.ibm.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../arm/boot/dts/aspeed/aspeed-bmc-ibm-everest.dts | 27 ++++++++++++++++++++++ arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-fuji.dts | 27 ++++++++++++++++++++++ 2 files changed, 54 insertions(+) commit 1d333cd641fb3eab485ce73814852a7bba1fe838 Author: Patrick Rudolph <patrick.rudolph@9elements.com> Date: Mon Nov 4 14:52:15 2024 +0530 ARM: dts: aspeed: sbp1: IBM sbp1 BMC board Add a device tree for IBM sbp1 BMC board which is based on AST2600 SOC. sbp1 baseboard has: - support for up to four Sapphire Rapids sockets having 16 DIMMS each. - 240 core/480 threads at maximum - 32x CPU PCIe slots - 2x M.2 PCH PCIe slots - Dual 200Gbit/s NIC - SPI TPM Added the following: - Indication LEDs - I2C mux & GPIO controller, pin assignments, - Thermister, - Voltage regulator - EEPROM/VPD Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com> Link: https://patch.msgid.link/20241104092220.2268805-2-naresh.solanki@9elements.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/Makefile | 1 + arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-sbp1.dts | 6086 ++++++++++++++++++++++ 2 files changed, 6087 insertions(+) commit 884e602933f81f1f0a0ce557446c6f5d272fa198 Author: Naresh Solanki <naresh.solanki@9elements.com> Date: Mon Nov 4 14:52:14 2024 +0530 dt-bindings: arm: aspeed: add IBM SBP1 board Document the new compatibles used on IBM SBP1. Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20241104092220.2268805-1-naresh.solanki@9elements.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> Documentation/devicetree/bindings/arm/aspeed/aspeed.yaml | 1 + 1 file changed, 1 insertion(+) commit de153911ffcb6d9a2800cd13cc60062ae118f2a4 Author: Chanh Nguyen <chanh@os.amperecomputing.com> Date: Mon Oct 21 08:37:02 2024 +0000 ARM: dts: aspeed: Add device tree for Ampere's Mt. Jefferson BMC The Mt. Jefferson BMC is an ASPEED AST2600-based BMC for the Mt. Jefferson hardware reference platform with AmpereOne(TM)M processor. Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com> Link: https://patch.msgid.link/20241021083702.9734-3-chanh@os.amperecomputing.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/Makefile | 1 + .../dts/aspeed/aspeed-bmc-ampere-mtjefferson.dts | 622 +++++++++++++++++++++ 2 files changed, 623 insertions(+) commit d03dc8d484ec6dde1cb184e198c144e4af955660 Author: Chanh Nguyen <chanh@os.amperecomputing.com> Date: Mon Oct 21 08:37:01 2024 +0000 dt-bindings: arm: aspeed: add Mt. Jefferson board Document Ampere's Mt. Jefferson BMC board compatible. Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20241021083702.9734-2-chanh@os.amperecomputing.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> Documentation/devicetree/bindings/arm/aspeed/aspeed.yaml | 1 + 1 file changed, 1 insertion(+) commit ddfb2ac8807dbd45bdf3d0609b3cf653807be81d Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Thu Oct 3 15:42:50 2024 +0800 ARM: dts: aspeed: yosemite4: Add i2c-mux for ADC monitor on Spider Board Add I2C mux for ADC monitors on Spider Board. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20241003074251.3818101-10-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit ede02e36c9db024303fe78423c66cf6c60f4f998 Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Thu Oct 3 15:42:49 2024 +0800 ARM: dts: aspeed: yosemite4: Revise adc128d818 adc mode on Fan Boards Revise adc128d818 adc mode on Fan Boards according to schematic. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20241003074251.3818101-9-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 031f763e108899c43534d6ab82fe5042a090680a Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Thu Oct 3 15:42:48 2024 +0800 ARM: dts: aspeed: yosemite4: Change the address of Fan IC on fan boards Change the address of Fan IC: Max31790 on fan boards according to schematic. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20241003074251.3818101-8-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b64d50e40151a24841ad6d1587b36d569cff45f4 Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Thu Oct 3 15:42:47 2024 +0800 ARM: dts: aspeed: yosemite4: Revise address of i2c-mux for two fan boards Change the address of the I2C mux for two fan boards to 0x74 according to schematic. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20241003074251.3818101-7-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 76 +++++++++++----------- 1 file changed, 39 insertions(+), 37 deletions(-) commit b1a1ecb669bfa763ee5e86a038d7c9363eee7548 Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Thu Oct 3 15:42:46 2024 +0800 ARM: dts: aspeed: yosemite4: correct the compatible string for max31790 Fix the compatible string for max31790 to match the binding document. Fixes: 2b8d94f4b4a4 ("ARM: dts: aspeed: yosemite4: add Facebook Yosemite 4 BMC") Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20241003074251.3818101-6-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit c64ac96f8f8d957cdc6ec3c93dd9a6c4e6d78506 Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Thu Oct 3 15:42:45 2024 +0800 ARM: dts: aspeed: yosemite4: Add required properties for IOE on fan boards Add the required properties for IO expander on fan boards. Fixes: 2b8d94f4b4a4 ("ARM: dts: aspeed: yosemite4: add Facebook Yosemite 4 BMC") Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20241003074251.3818101-5-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 4 ++++ 1 file changed, 4 insertions(+) commit bca0fdbb7f8211f1b8a6b012376dfbc7fc4bd75a Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Thu Oct 3 15:42:44 2024 +0800 ARM: dts: aspeed: yosemite4: Add i2c-mux for CPLD IOE on Spider Board Add I2C mux for CPLD IOE on Spider Board. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20241003074251.3818101-4-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit f65648c816fc93633c43448f1f4288f6b93f1de7 Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Thu Oct 3 15:42:43 2024 +0800 ARM: dts: aspeed: yosemite4: Add i2c-mux for four NICs Add i2c-mux on Spider board for four NICs and add the temperature sensor and EEPROM for the NICs. Also remove the mctp-controller property on I2C bus 15 because we need to add the property on the I2C mux to each NIC so that the MCTP driver will ensure that each port is configured properly before communicating with the NICs. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20241003074251.3818101-3-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 75 +++++++++++++++++++++- 1 file changed, 72 insertions(+), 3 deletions(-) commit 199d1f5b155c8a90d45a457cb6af47080100ba9e Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Thu Oct 3 15:42:42 2024 +0800 ARM: dts: aspeed: yosemite4: add i2c-mux for all Server Board slots Add i2c mux to 8 slots of server board and add the io expanders and eeprom for the slots. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20241003074251.3818101-2-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 238 ++++++++++++++++++++- 1 file changed, 234 insertions(+), 4 deletions(-) commit 52ba8cb80a33d949339243ee865f093e3a6a3276 Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Tue Oct 1 16:30:21 2024 +0800 ARM: dts: aspeed: yosemite4: Remove IO expanders on I2C bus 13 Remove IO expanders on I2C bus 13 according to schematic change. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20241001083021.3462426-1-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 28 ---------------------- 1 file changed, 28 deletions(-) commit 801938dcb8a967e5dab202ffc420120955390a3f Author: Ninad Palsule <ninad@linux.ibm.com> Date: Tue Oct 1 14:17:50 2024 -0500 ARM: dts: aspeed: system1: Add GPIO line names Add following GPIO line names so that userspace can control them - PCH related GPIOs - FPGA related GPIOs Signed-off-by: Ninad Palsule <ninad@linux.ibm.com> Reviewed-by: Eddie James <eajames@linux.ibm.com> Link: https://patch.msgid.link/20241001191756.234096-4-ninad@linux.ibm.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9b78fd254e9aee698b877a9c3b61dad9d6570372 Author: Ninad Palsule <ninad@linux.ibm.com> Date: Tue Oct 1 14:17:49 2024 -0500 ARM: dts: aspeed: system1: Enable serial gpio0 Enable serial GPIO0. Set number of GPIO lines to 128 and bus frequency to 1MHz. Signed-off-by: Ninad Palsule <ninad@linux.ibm.com> Reviewed-by: Eddie James <eajames@linux.ibm.com> Link: https://patch.msgid.link/20241001191756.234096-3-ninad@linux.ibm.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 430f5675d35de0694f7166dc3e3556a7252485af Author: Ninad Palsule <ninad@linux.ibm.com> Date: Tue Oct 1 14:17:48 2024 -0500 ARM: dts: aspeed: system1: Bump up i2c busses freq Bump up i2c8 and i2c15 bus frequency so that PCIe slot and FPGA runs faster Signed-off-by: Ninad Palsule <ninad@linux.ibm.com> Reviewed-by: Eddie James <eajames@linux.ibm.com> Link: https://patch.msgid.link/20241001191756.234096-2-ninad@linux.ibm.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts | 2 ++ 1 file changed, 2 insertions(+) commit ece3e20e3389ec8a32944ad44746ee379bf1d3eb Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Fri Sep 27 16:52:13 2024 +0800 ARM: dts: aspeed: yosemite4: correct the compatible string of adm1272 Remove the space in the compatible string of adm1272 to match the pattern of compatible. Fixes: 2b8d94f4b4a4 ("ARM: dts: aspeed: yosemite4: add Facebook Yosemite 4 BMC") Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Fixes: 2b8d94f4b4a4765d ("ARM: dts: aspeed: yosemite4: add Facebook Yosemite 4 BMC") Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au> Link: https://patch.msgid.link/20240927085213.331127-1-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 519eada5b8cf1af1d3e141edb7655dd4194fc78f Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Thu Sep 26 11:35:33 2024 +0800 ARM: dts: aspeed: yosemite4: Add i2c-mux for Management Board Add I2C mux for Management Board to separate the I2C bus 35 for updating CPLD firmware and I2C bus 34 for the other devices. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20240926033534.4174707-1-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 80 +++++++++++++++++++--- 1 file changed, 69 insertions(+), 11 deletions(-) commit b4279b289971fb392b4dfae7e39bf2b13d1d3767 Author: Potin Lai <potin.lai.pt@gmail.com> Date: Thu Sep 26 15:10:46 2024 +0800 ARM: dts: aspeed: catalina: update NIC1 fru address Update NIC1 FRU EEPROM address to 0x52 based on EVT changes. Signed-off-by: Potin Lai <potin.lai.pt@gmail.com> Link: https://patch.msgid.link/20240926-catalina-evt-dvt-system-modify-v2-3-a861daeba059@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-catalina.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit af86f3883b3dd1319964a4a288d5a31082551bc2 Author: Potin Lai <potin.lai.pt@gmail.com> Date: Thu Sep 26 15:10:45 2024 +0800 ARM: dts: aspeed: catalina: enable mac2 Enable mac2 in advance for DVT HW schematic. - EVT system: - eth0 (mac2): no NCSI - eth1 (mac3): with NCSI - DVT system: - eth0 (mac2): with NCSI - eth1 (mac3): with NCSI Signed-off-by: Potin Lai <potin.lai.pt@gmail.com> Link: https://patch.msgid.link/20240926-catalina-evt-dvt-system-modify-v2-2-a861daeba059@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-catalina.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit e755c62c3f61637bdb0f9ec1cccaad9fec0e49cd Author: Potin Lai <potin.lai@quantatw.com> Date: Thu Sep 26 15:10:44 2024 +0800 ARM: dts: aspeed: catalina: move hdd board i2c mux bus to i2c5 Due to EVT hardware changes, move HDD board i2c mux bus from i2c30 to i2c5. Signed-off-by: Potin Lai <potin.lai@quantatw.com> Link: https://patch.msgid.link/20240926-catalina-evt-dvt-system-modify-v2-1-a861daeba059@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../dts/aspeed/aspeed-bmc-facebook-catalina.dts | 165 +++++++++++---------- 1 file changed, 83 insertions(+), 82 deletions(-) commit 98e5f6ca17594bd3c53212d464fce35fe4c21d8d Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Tue Sep 24 17:44:30 2024 +0800 ARM: dts: aspeed: yosemite4: revise flash layout to 128MB Revise flash layout to 128MB since we are using 1GB flash memory in our project. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20240924094430.272074-3-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7b71409c9b9ec4607563e87f695bfccd7e7e350 Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Tue Sep 24 17:44:29 2024 +0800 ARM: dts: aspeed: yosemite4: Revise quad mode to dual mode Revise quad mode to dual mode to keep the write protect feature for the SPI flash because the WP pin is the same pin with IO2 pin in quad mode. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20240924094430.272074-2-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7161ec8386a682b1c0be824e3684537c1dd997f3 Author: Yang Chen <yangchen.openbmc@gmail.com> Date: Tue Sep 24 22:02:15 2024 +0800 ARM: dts: aspeed: minerva: add fru device for other blades The Minerva platform has 16 compute blades and 6 network blades, each with an EEPROM that can be operated by the CMM. This commit adds support for each FRU. Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com> Link: https://patch.msgid.link/20240924140215.2484170-4-yangchen.openbmc@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../dts/aspeed/aspeed-bmc-facebook-minerva.dts | 334 +++++++++++++++++++++ 1 file changed, 334 insertions(+) commit a9fecf61a877dc488576527bf88976a0ad7b7a46 Author: Yang Chen <yangchen.openbmc@gmail.com> Date: Tue Sep 24 22:02:14 2024 +0800 ARM: dts: aspeed: minerva: change the i2c mux number for FCBs Change the i2c mux channel to match the correct fan board location. Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com> Link: https://patch.msgid.link/20240924140215.2484170-3-yangchen.openbmc@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../dts/aspeed/aspeed-bmc-facebook-minerva.dts | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) commit f739d336cbfd45637f223dd251607c77ecf8b4a3 Author: Yang Chen <yangchen.openbmc@gmail.com> Date: Tue Sep 24 22:02:13 2024 +0800 ARM: dts: aspeed: minerva: Revise the SGPIO line name Modify the SGPIO line names sent from the CMM CPLD in the DVT version and map the blade and FCB numbers to match the silkscreen labels on the rack as follows: 1. Change the compute blade numbering from 0-15 to 1-16. 2. Change the network blade numbering from 0-5 to 1-6. 3. Update the FCB numbering from TOP0/1, MID0/1, and BOT0/1 to FCB1-6. 4. Revise the SGPIO line name for DVT changed. Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com> Link: https://patch.msgid.link/20240924140215.2484170-2-yangchen.openbmc@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../dts/aspeed/aspeed-bmc-facebook-minerva.dts | 110 ++++++++++----------- 1 file changed, 55 insertions(+), 55 deletions(-) commit 23cdf46845f4fb611449a5a42ab0feea55900433 Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Fri Sep 20 16:02:26 2024 +0800 ARM: dts: aspeed: yosemite4: Enable spi-gpio setting for TPM Enable spi-gpio setting for TPM device in yosemite4. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20240920080227.711691-1-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 3f132cafb5f941d02155a6d08e3eabf441835732 Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Fri Sep 20 16:50:07 2024 +0800 ARM: dts: aspeed: yosemite4: Revise adc128d818 adc mode on Spider Board Revise adc128d818 adc mode on Spider Board according to schematic. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au> Link: https://patch.msgid.link/20240920085007.1076174-1-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 28805afcc74b1a6b6583dc463bd352d251436d28 Author: Potin Lai <potin.lai.pt@gmail.com> Date: Fri Sep 20 17:55:52 2024 +0800 ARM: dts: aspeed: catalina: add i2c-mux-idle-disconnect to all mux Add the `i2c-mux-idle-disconnect` property to all i2c-mux nodes to ensure proper behavior when switching between multiple I2C buses. This avoids potential confusion caused by device addresses appearing on multiple buses when they are not actively selected. Signed-off-by: Potin Lai <potin.lai.pt@gmail.com> Link: https://patch.msgid.link/20240920-catalina-i2c-mux-fix-2-v1-1-66cce7c54188@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-catalina.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit 8e0f79624ee1c808d5a5298964c2aa52bb2da2ff Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Tue Sep 10 13:47:51 2024 +0800 ARM: dts: aspeed: yosemite4: Add gpio pca9506 for CPLD IOE We use CPLD to emulate gpio pca9506 I/O expander on each server boards. Therefore, add pca9506 to probe driver for the CPLD I/O expander. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20240910054751.2943217-3-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 252 +++++++++++++++++++++ 1 file changed, 252 insertions(+) commit 2c6cdf56903fd6351dbf8dd953b04ae892c783bb Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Tue Sep 10 13:47:50 2024 +0800 ARM: dts: aspeed: yosemite4: Revise to use adm1281 on Medusa board Revise to use adm1281 for HSC according to the hardware design change. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20240910054751.2943217-2-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit de43a841c9b6808ff0a0669cbef81cb26913d6f7 Author: Manojkiran Eda <manojkiran.eda@gmail.com> Date: Wed Sep 18 14:50:03 2024 +0530 ARM: dts: aspeed: Enable PECI and LPC snoop for IBM System1 This patch enables the PECI interface and configures the LPC Snoop for ports 0x80 and 0x81 in the ASPEED BMC for IBM System1. Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Link: https://patch.msgid.link/20240918-dts-aspeed-system1-peci-snoop-v2-1-2d4d17403670@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit 931462b385c401b8763b76f4cf335f2e49bb577b Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Wed Sep 18 18:17:41 2024 +0800 ARM: dts: aspeed: yosemite4: Enable interrupt setting for pca9555 Enable interrupt setting and add GPIO line name for pca9555 for the I/O expanders on Medusa board. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20240918101742.1346788-1-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 26392e143f908b05367b12a88218d55a958a9c75 Author: Eddie James <eajames@linux.ibm.com> Date: Tue Sep 17 11:21:00 2024 -0500 ARM: dts: aspeed: Fix Rainier and Blueridge GPIO LED names Blueridge LED names to include the "led-" prefix as is proper. Rainier should match for ease of application design. In addition, the gpio line name ought to match. Signed-off-by: Eddie James <eajames@linux.ibm.com> Link: https://patch.msgid.link/20240917162100.1386130-1-eajames@linux.ibm.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-blueridge.dts | 5 +++-- arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-rainier.dts | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) commit 561b108992547e9b666d96eacddcf3a09aa0c678 Author: Chanh Nguyen <chanh@os.amperecomputing.com> Date: Thu Sep 5 06:35:21 2024 +0000 ARM: dts: aspeed: mtmitchell: Add gpio line names for io expanders Add below gpio line names to io expanders for more platform features. - ext-vref-sel - presence-hdd-bp5-n - presence-hdd-bp6-n - bmc-ocp0-en-n - bmc-ocp1-en-n - bmc-riser-en-n - gpi0, gpi1 Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com> Link: https://patch.msgid.link/20240905063521.319416-3-chanh@os.amperecomputing.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0c1bb3df1bb85c8b80675115ca825499b688555d Author: Chanh Nguyen <chanh@os.amperecomputing.com> Date: Thu Sep 5 06:35:20 2024 +0000 ARM: dts: aspeed: mtmitchell: Add I2C FAN controllers Add the MAX31790 nodes as i2c fan controllers. Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com> Link: https://patch.msgid.link/20240905063521.319416-2-chanh@os.amperecomputing.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit cb3f397b17bbda3f2998eff9e54b040c8fa85cc9 Author: Peter Yin <peteryin.openbmc@gmail.com> Date: Mon Sep 9 16:04:59 2024 +0800 ARM: dts: aspeed: Harma: revise sgpio line name power-card-enable power-fault-n power-hsc-good power-chassis-good asic0-card-type-detection0-n asic0-card-type-detection1-n asic0-card-type-detection2-n presence-cmm uart-switch-button uart-switch-lsb uart-switch-msb reset-control-cmos-clear Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com> Link: https://patch.msgid.link/20240909080459.3457853-3-peteryin.openbmc@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> .../boot/dts/aspeed/aspeed-bmc-facebook-harma.dts | 36 ++++++++++------------ 1 file changed, 16 insertions(+), 20 deletions(-) commit ed024f28940e48fa15de2e8267900aa91f67aac4 Author: Peter Yin <peteryin.openbmc@gmail.com> Date: Mon Sep 9 16:04:58 2024 +0800 ARM: dts: aspeed: Harma: add rtc device Add "nxp,pcf8563" device and the slave address is 0x51. Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com> Link: https://patch.msgid.link/20240909080459.3457853-2-peteryin.openbmc@gmail.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 85c523998048814e82fdbe9e0b258bb2650a91c3 Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Tue Sep 10 10:22:36 2024 +0800 ARM: dts: aspeed: yosemite4: Enable adc15 Enable Yosemite4 adc15 config for monitoring P3V_BAT_SCALED. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20240910022236.1564291-1-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a20a18dd1df53bd8515446bdb674f356bf2bb8c2 Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Tue Sep 10 16:09:50 2024 +0800 ARM: dts: aspeed: yosemite4: Enable watchdog2 Enable watchdog2 setting for yosemite4 system. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au> Link: https://patch.msgid.link/20240910080951.3568594-1-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit 6f7c8ff47bf5249f356b5243362e484712899aba Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Tue Sep 10 16:41:09 2024 +0800 ARM: dts: aspeed: yosemite4: Change eeprom for Medusa Board Change eeprom on Medusa Board to AT24C128 according to hardware change. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20240910084109.3585923-1-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 528421afb16aa4cbfbc5340834228610e06caeff Author: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Date: Tue Sep 10 16:57:00 2024 +0800 ARM: dts: aspeed: yosemite4: Remove temperature sensors on Medusa Board Remove two temperature sensors on Medusa Board according to hardware change. Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Link: https://patch.msgid.link/20240910085701.3595248-1-Delphine_CC_Chiu@wiwynn.com Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 10 ---------- 1 file changed, 10 deletions(-) commit 2d9e29622e4511b4a5a1cb524b25914398d995b5 Author: Rob Herring (Arm) <robh@kernel.org> Date: Tue Sep 10 16:59:29 2024 -0500 ARM: dts: aspeed: Fix at24 EEPROM node names at24.yaml defines the node name for at24 EEPROMs as 'eeprom'. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20240910215929.823913-1-robh@kernel.org Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> arch/arm/boot/dts/aspeed/aspeed-bmc-quanta-s6q.dts | 8 ++++---- arch/arm/boot/dts/aspeed/aspeed-bmc-vegman-rx20.dts | 6 +++--- arch/arm/boot/dts/aspeed/aspeed-bmc-vegman.dtsi | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) commit c95c1362e5bcd90c45987828bbef02236d181ffd Author: Michal Wilczynski <m.wilczynski@samsung.com> Date: Mon Nov 4 11:07:34 2024 +0100 riscv: dts: thead: Add mailbox node Add mailbox device tree node. This work is based on the vendor kernel [1]. Link: https://github.com/revyos/thead-kernel.git [1] Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Reviewed-by: Drew Fustini <dfustini@tenstorrent.com> Signed-off-by: Drew Fustini <dfustini@tenstorrent.com> arch/riscv/boot/dts/thead/th1520.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit f117051514c33c43b7e0c517e0ae9e0189e884da Author: Andrew Donnellan <ajd@linux.ibm.com> Date: Tue Dec 10 16:40:55 2024 +1100 scsi/cxlflash: Deprecate driver We intend to remove the cxlflash driver in an upcoming release. It is already marked as Obsolete in MAINTAINERS. The cxlflash driver has received minimal maintenance for some time, and the CAPI Flash hardware that uses it is no longer commercially available. Add a warning message on probe and change Kconfig to label the driver as deprecated and not build the driver by default. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241210054055.144813-3-ajd@linux.ibm.com drivers/scsi/cxlflash/Kconfig | 6 ++++-- drivers/scsi/cxlflash/main.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) commit 5731d41af924b764f32532d39d37a15f669c1e01 Author: Andrew Donnellan <ajd@linux.ibm.com> Date: Tue Dec 10 16:40:54 2024 +1100 cxl: Deprecate driver The cxl driver is no longer actively maintained and we intend to remove it in a future kernel release. cxl has received minimal maintenance for several years, and is not supported on the Power10 processor. We aren't aware of any users who are likely to be using recent kernels. Change its MAINTAINERS status to obsolete, update the sysfs ABI documentation accordingly, add a warning message on device probe, change the Kconfig options to label it as deprecated, and don't build it by default. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com> Acked-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241210054055.144813-2-ajd@linux.ibm.com Documentation/ABI/{testing => obsolete}/sysfs-class-cxl | 3 +++ MAINTAINERS | 4 ++-- drivers/misc/cxl/Kconfig | 6 ++++-- drivers/misc/cxl/of.c | 2 ++ drivers/misc/cxl/pci.c | 2 ++ 5 files changed, 13 insertions(+), 4 deletions(-) commit 2c27c7663390d28bc71e97500eb68e0ce2a7223f Merge: 363177375e04 7dba339faae9 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 12 18:49:11 2024 -0800 Merge branch 'devmem-tcp-fixes' Mina Almasry says: ==================== devmem TCP fixes Couple unrelated devmem TCP fixes bundled in a series for some convenience. - fix naming and provide page_pool_alloc_netmem for fragged netmem. - fix issues with dma-buf dma addresses being potentially passed to dma_sync_for_* helpers. ==================== Link: https://patch.msgid.link/20241211212033.1684197-1-almasrymina@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 7dba339faae991a23c54f7b93a58798c58f8c16f Author: Mina Almasry <almasrymina@google.com> Date: Wed Dec 11 21:20:31 2024 +0000 page_pool: disable sync for cpu for dmabuf memory provider dmabuf dma-addresses should not be dma_sync'd for CPU/device. Typically its the driver responsibility to dma_sync for CPU, but the driver should not dma_sync for CPU if the netmem is actually coming from a dmabuf memory provider. The page_pool already exposes a helper for dma_sync_for_cpu: page_pool_dma_sync_for_cpu. Upgrade this existing helper to handle netmem, and have it skip dma_sync if the memory is from a dmabuf memory provider. Drivers should migrate to using this helper when adding support for netmem. Also minimize the impact on the dma syncing performance for pages. Special case the dma-sync path for pages to not go through the overhead checks for dma-syncing and conversion to netmem. Cc: Alexander Lobakin <aleksander.lobakin@intel.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Signed-off-by: Mina Almasry <almasrymina@google.com> Link: https://patch.msgid.link/20241211212033.1684197-5-almasrymina@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/page_pool/helpers.h | 35 ++++++++++++++++++++++++++++++----- include/net/page_pool/types.h | 3 ++- net/core/devmem.c | 1 + net/core/page_pool.c | 1 + 4 files changed, 34 insertions(+), 6 deletions(-) commit b400f4b87430c105d92550cee5a72aea01fdf3d6 Author: Samiullah Khawaja <skhawaja@google.com> Date: Wed Dec 11 21:20:30 2024 +0000 page_pool: Set `dma_sync` to false for devmem memory provider Move the `dma_map` and `dma_sync` checks to `page_pool_init` to make them generic. Set dma_sync to false for devmem memory provider because the dma_sync APIs should not be used for dma_buf backed devmem memory provider. Cc: Jason Gunthorpe <jgg@ziepe.ca> Signed-off-by: Samiullah Khawaja <skhawaja@google.com> Signed-off-by: Mina Almasry <almasrymina@google.com> Link: https://patch.msgid.link/20241211212033.1684197-4-almasrymina@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/core/devmem.c | 9 ++++----- net/core/page_pool.c | 3 +++ 2 files changed, 7 insertions(+), 5 deletions(-) commit 8156c310499a34c8f42b2e2b7360abb805683bbe Author: Mina Almasry <almasrymina@google.com> Date: Wed Dec 11 21:20:29 2024 +0000 net: page_pool: create page_pool_alloc_netmem Create page_pool_alloc_netmem to be the mirror of page_pool_alloc. This enables drivers that want currently use page_pool_alloc to transition to netmem by converting the call sites to page_pool_alloc_netmem. Signed-off-by: Mina Almasry <almasrymina@google.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20241211212033.1684197-3-almasrymina@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/page_pool/helpers.h | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 91a152cbb49c26609d217cf2f116d46143b9b8be Author: Mina Almasry <almasrymina@google.com> Date: Wed Dec 11 21:20:28 2024 +0000 net: page_pool: rename page_pool_alloc_netmem to *_netmems page_pool_alloc_netmem (without an s) was the mirror of page_pool_alloc_pages (with an s), which was confusing. Rename to page_pool_alloc_netmems so it's the mirror of page_pool_alloc_pages. Signed-off-by: Mina Almasry <almasrymina@google.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20241211212033.1684197-2-almasrymina@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/page_pool/types.h | 2 +- net/core/page_pool.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 363177375e04ef2f0324bbaa1554e9e98eff2e67 Merge: a42d71e322a8 0dffdb3b3366 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 12 18:23:08 2024 -0800 Merge branch 'xdp-a-fistful-of-generic-changes-pt-ii' Alexander Lobakin says: ==================== xdp: a fistful of generic changes pt. II (part) XDP for idpf is currently 5.5 chapters: * convert Rx to libeth; * convert Tx and stats to libeth; * generic XDP and XSk code changes; * generic XDP and XSk code additions (you are here); * actual XDP for idpf via new libeth_xdp; * XSk for idpf (via ^). Part III.2.1 does the following: * allows mixing pages from several Page Pools within one XDP frame; * optimizes &xdp_frame structure and removes no-more-used field; Everything is prereq for libeth_xdp, but will be useful standalone as well: faster xdp_return_frame_bulk() and xdp_frame fields access. ==================== Link: https://patch.msgid.link/20241211172649.761483-1-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 0dffdb3b3366c932fb7d210f5032476c552f7000 Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Wed Dec 11 18:26:47 2024 +0100 skbuff: allow 2-4-argument skb_frag_dma_map() skb_frag_dma_map(dev, frag, 0, skb_frag_size(frag), DMA_TO_DEVICE) is repeated across dozens of drivers and really wants a shorthand. Add a macro which will count args and handle all possible number from 2 to 5. Semantics: skb_frag_dma_map(dev, frag) -> __skb_frag_dma_map(dev, frag, 0, skb_frag_size(frag), DMA_TO_DEVICE) skb_frag_dma_map(dev, frag, offset) -> __skb_frag_dma_map(dev, frag, offset, skb_frag_size(frag) - offset, DMA_TO_DEVICE) skb_frag_dma_map(dev, frag, offset, size) -> __skb_frag_dma_map(dev, frag, offset, size, DMA_TO_DEVICE) skb_frag_dma_map(dev, frag, offset, size, dir) -> __skb_frag_dma_map(dev, frag, offset, size, dir) No object code size changes for the existing callers. Users passing less arguments also won't have bigger size comparing to the full equivalent call. Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/20241211172649.761483-11-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/linux/skbuff.h | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit 207ff83cecaeaacf0d47c8ccbe927c8354ac1280 Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Wed Dec 11 18:26:40 2024 +0100 xdp: make __xdp_return() MP-agnostic Currently, __xdp_return() takes pointer to the virtual memory to free a buffer. Apart from that this sometimes provokes redundant data <--> page conversions, taking data pointer effectively prevents lots of XDP code to support non-page-backed buffers, as there's no mapping for the non-host memory (data is always NULL). Just convert it to always take netmem reference. For xdp_return_{buff,frame*}(), this chops off one page_address() per each frag and adds one virt_to_netmem() (same as virt_to_page()) per header buffer. For __xdp_return() itself, it removes one virt_to_page() for MEM_TYPE_PAGE_POOL and another one for MEM_TYPE_PAGE_ORDER0, adding one page_address() for [not really common nowadays] MEM_TYPE_PAGE_SHARED, but the main effect is that the abovementioned functions won't die or memleak anymore if the frame has non-host memory attached and will correctly free those. Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/20241211172649.761483-4-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/xdp.h | 4 ++-- net/core/filter.c | 9 +++------ net/core/xdp.c | 47 +++++++++++++++++++---------------------------- 3 files changed, 24 insertions(+), 36 deletions(-) commit 56d95b0adfa224bb1c67733dbcad30dd8debd39e Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Wed Dec 11 18:26:39 2024 +0100 xdp: get rid of xdp_frame::mem.id Initially, xdp_frame::mem.id was used to search for the corresponding &page_pool to return the page correctly. However, after that struct page was extended to have a direct pointer to its PP (netmem has it as well), further keeping of this field makes no sense. xdp_return_frame_bulk() still used it to do a lookup, and this leftover is now removed. Remove xdp_frame::mem and replace it with ::mem_type, as only memory type still matters and we need to know it to be able to free the frame correctly. As a cute side effect, we can now make every scalar field in &xdp_frame of 4 byte width, speeding up accesses to them. Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/20241211172649.761483-3-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- drivers/net/veth.c | 4 ++-- include/net/xdp.h | 14 ++++++------- kernel/bpf/cpumap.c | 2 +- net/bpf/test_run.c | 4 ++-- net/core/filter.c | 12 +++++------ net/core/xdp.c | 28 +++++++++++++------------- 7 files changed, 33 insertions(+), 33 deletions(-) commit fcc680a647ba77370480fe753664cc10d572b240 Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Wed Dec 11 18:26:38 2024 +0100 page_pool: allow mixing PPs within one bulk The main reason for this change was to allow mixing pages from different &page_pools within one &xdp_buff/&xdp_frame. Why not? With stuff like devmem and io_uring zerocopy Rx, it's required to have separate PPs for header buffers and payload buffers. Adjust xdp_return_frame_bulk() and page_pool_put_netmem_bulk(), so that they won't be tied to a particular pool. Let the latter create a separate bulk of pages which's PP is different from the first netmem of the bulk and process it after the main loop. This greatly optimizes xdp_return_frame_bulk(): no more hashtable lookups and forced flushes on PP mismatch. Also make xdp_flush_frame_bulk() inline, as it's just one if + function call + one u32 read, not worth extending the call ladder. Co-developed-by: Toke Høiland-Jørgensen <toke@redhat.com> # iterative Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Suggested-by: Jakub Kicinski <kuba@kernel.org> # while (count) Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/20241211172649.761483-2-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/page_pool/types.h | 6 +-- include/net/xdp.h | 16 +++++-- net/core/page_pool.c | 109 ++++++++++++++++++++++++++++-------------- net/core/xdp.c | 29 +---------- 4 files changed, 87 insertions(+), 73 deletions(-) commit 8da7bf2cee2735dbd2478cf07672ff0d243ce6ed Author: Tejun Heo <tj@kernel.org> Date: Thu Dec 12 16:16:57 2024 -1000 tools/sched_ext: Receive updates from SCX repo Receive tools/sched_ext updates form https://github.com/sched-ext/scx to sync userspace bits: - scx_bpf_dump_header() added which can be used to print out basic scheduler info on dump. - BPF possible/online CPU iterators added. - CO-RE enums added. The enums are autogenerated from vmlinux.h. Include the generated artifacts in tools/sched_ext to keep the Makefile simpler. - Other misc changes. Signed-off-by: Tejun Heo <tj@kernel.org> tools/sched_ext/include/scx/common.bpf.h | 83 ++++++++++++++++++- tools/sched_ext/include/scx/common.h | 6 ++ tools/sched_ext/include/scx/compat.h | 1 + tools/sched_ext/include/scx/enums.autogen.bpf.h | 105 ++++++++++++++++++++++++ tools/sched_ext/include/scx/enums.autogen.h | 41 +++++++++ tools/sched_ext/include/scx/enums.bpf.h | 12 +++ tools/sched_ext/include/scx/enums.h | 27 ++++++ tools/sched_ext/include/scx/user_exit_info.h | 9 +- tools/sched_ext/scx_central.bpf.c | 2 +- tools/sched_ext/scx_central.c | 1 + tools/sched_ext/scx_flatcg.bpf.c | 2 +- tools/sched_ext/scx_flatcg.c | 1 + tools/sched_ext/scx_qmap.bpf.c | 2 +- tools/sched_ext/scx_qmap.c | 2 + 14 files changed, 286 insertions(+), 8 deletions(-) commit a42d71e322a8066dcfa228ce8529bb073c521ae9 Author: Toke Høiland-Jørgensen <toke@redhat.com> Date: Wed Dec 11 11:17:09 2024 +0100 net_sched: sch_cake: Add drop reasons Add three qdisc-specific drop reasons and use them in sch_cake: 1) SKB_DROP_REASON_QDISC_OVERLIMIT Whenever the total queue limit for a qdisc instance is exceeded and a packet is dropped to make room. 2) SKB_DROP_REASON_QDISC_CONGESTED Whenever a packet is dropped by the qdisc AQM algorithm because congestion is detected. 3) SKB_DROP_REASON_CAKE_FLOOD Whenever a packet is dropped by the flood protection part of the CAKE AQM algorithm (BLUE). Also use the existing SKB_DROP_REASON_QUEUE_PURGE in cake_clear_tin(). Reasons show up as: perf record -a -e skb:kfree_skb sleep 1; perf script iperf3 665 [005] 848.656964: skb:kfree_skb: skbaddr=0xffff98168a333500 rx_sk=(nil) protocol=34525 location=__dev_queue_xmit+0x10f0 reason: QDISC_OVERLIMIT swapper 0 [001] 909.166055: skb:kfree_skb: skbaddr=0xffff98168280cee0 rx_sk=(nil) protocol=34525 location=cake_dequeue+0x5ef reason: QDISC_CONGESTED Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com> Acked-by: Dave Taht <dave.taht@gmail.com> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://patch.msgid.link/20241211-cake-drop-reason-v2-1-920afadf4d1b@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/dropreason-core.h | 18 ++++++++++++++++++ net/sched/sch_cake.c | 43 +++++++++++++++++++++++-------------------- 2 files changed, 41 insertions(+), 20 deletions(-) commit bdecb30d579ef8f3bbaee2693b1b4d53ded5f730 Merge: c7d6cb4c43a6 4d79a1266d4c Author: Dave Airlie <airlied@redhat.com> Date: Fri Dec 13 10:19:44 2024 +1000 Merge tag 'drm-xe-next-2024-12-11' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next UAPI Changes: - Make OA buffer size configurable (Sai) Display Changes (including i915): - Fix ttm_bo_access() usage (Auld) - Power request asserting/deasserting for Xe3lpd (Mika) - One Type-C conversion towards struct intel_display (Mika) Driver Changes: - GuC capture related fixes (Everest, Zhanjun) - Move old workaround to OOB infra (Lucas) - Compute mode change refactoring (Bala) - Add ufence and g2h flushes for LNL Hybrid timeouts (Nirmoy) - Avoid unnecessary OOM kills (Thomas) - Restore system memory GGTT mappings (Brost) - Fix build error for XE_IOCTL_DBG macro (Gyeyoung) - Documentation updates and fixes (Lucas, Randy) - A few exec IOCTL fixes (Brost) - Fix potential GGTT allocation leak (Michal) - Fix races on fdinfo (Lucas) - SRIOV VF: Post-migration recovery worker basis (Tomasz) - GuC Communication fixes and improvements (Michal, John, Tomasz, Auld, Jonathan) - SRIOV PF: Add support for VF scheduling priority - Trace improvements (Lucas, Auld, Oak) - Hibernation on igpu fixes and improvements (Auld) - GT oriented logs/asserts improvements (Michal) - Take job list lock in xe_sched_first_pending_job (Nirmoy) - GSC: Improve SW proxy error checking and logging (Daniele) - GuC crash notifications & drop default log verbosity (John) - Fix races on fdinfo (Lucas) - Fix runtime_pm handling in OA (Ashutosh) - Allow fault injection in vm create and vm bind IOCTLs (Francois) - TLB invalidation fixes (Nirmoy, Daniele) - Devcoredump Improvements, doc and fixes (Brost, Lucas, Zhanjun, John) - Wake up waiters after setting ufence->signalled (Nirmoy) - Mark preempt fence workqueue as reclaim (Brost) - Trivial header/flags cleanups (Lucas) - VRAM drop 2G block restriction (Auld) - Drop useless d3cold allowed message (Brost) - SRIOV PF: Drop 2GiB limit of fair LMEM allocation (Michal) - Add another PTL PCI ID (Atwood) - Allow bo mapping on multiple ggtts (Niranjana) - Add support for GuC-to-GuC communication (John) - Update xe2_graphics name string (Roper) - VRAM: fix lpfn check (Auld) - Ad Xe3 workaround (Apoorva) - Migrate fixes (Auld) - Fix non-contiguous VRAM BO access (Brost) - Log throttle reasons (Raag) - Enable PMT support for BMG (Michael) - IRQ related fixes and improvements (Ilia) - Avoid evicting object of the same vm in none fault mode (Oak) - Fix in tests (Nirmoy) - Fix ERR_PTR handling (Mirsad) - Some reg_sr/whitelist fixes and refactors (Lucas) Signed-off-by: Dave Airlie <airlied@redhat.com> # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCAAdFiEEbSBwaO7dZQkcLOKj+mJfZA7rE8oFAmdaHkMACgkQ+mJfZA7r # E8o+twf/XYZTk4O3qQ+yNL3PDQT0NIKjH8mEnmu4udyIw/sYhQe6ji+uh1YutK8Y # 41IQc06qQogTj36bqSwbjThw5asMfRh2sNR/p1uOy7RGUnN25FuYSXEgOeDWi/Ec # xrZE1TKPotFGeGI09KJmzjzMq94cgv97Pxma+5m8BjVsvzXQSzEJ2r9cC6ruSfNT # O5Jq5nqxHSkWUbKCxPnixSlGnH4jbsuiqS1E1pnH+u6ijxsfhOJj686wLn2FRkiw # 6FhXmJBrd8AZ0Q2E7h3UswE5O88I0ALDc58OINAzD1GMyzvZj2vB1pXgj5uNr0/x # Ku4cxu1jprsi+FLUdKAdYpxRBRanow== # =3Ou7 # -----END PGP SIGNATURE----- # gpg: Signature made Thu 12 Dec 2024 09:20:35 AEST # gpg: using RSA key 6D207068EEDD65091C2CE2A3FA625F640EEB13CA # gpg: Good signature from "Rodrigo Vivi <rodrigo.vivi@intel.com>" [unknown] # gpg: aka "Rodrigo Vivi <rodrigo.vivi@gmail.com>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 6D20 7068 EEDD 6509 1C2C E2A3 FA62 5F64 0EEB 13CA From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/Z1ofx-fExLQKV_e4@intel.com commit 5d417a5e7ade02a7b75cd886d8afe3e9025e7e25 Author: Hans de Goede <hdegoede@redhat.com> Date: Wed Dec 11 18:44:50 2024 +0100 power: supply: bq24190_charger: Add support for "charge_types" property The bq24190 power_supply class device has a writeable "charge_type" property, add support for the new "charge_types" property. Reading this returns a list of supported charge-types with the currently active type surrounded by square brackets, allowing userspace to find out which enum power_supply_charge_type values are supported. This has been tested on a GPD win gaming-handheld. Reviewed-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241211174451.355421-4-hdegoede@redhat.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/bq24190_charger.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d24bf99214b199c25f9c2cb04b3a4993d1c7ab60 Author: Hans de Goede <hdegoede@redhat.com> Date: Wed Dec 11 18:44:49 2024 +0100 power: supply: core: Add new "charge_types" property Add a new "charge_types" property, this is identical to "charge_type" but reading returns a list of supported charge-types with the currently active type surrounded by square brackets, e.g.: Fast [Standard] "Long_Life" This has the advantage over the existing "charge_type" property that this allows userspace to find out which charge-types are supported for writable charge_type properties. Drivers which already support "charge_type" can easily add support for this by setting power_supply_desc.charge_types to a bitmask representing valid charge_type values. The existing "charge_type" get_property() and set_property() code paths can be re-used for "charge_types". Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241211174451.355421-3-hdegoede@redhat.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Documentation/ABI/testing/sysfs-class-power | 20 ++++++++++++++++ drivers/power/supply/power_supply_sysfs.c | 36 +++++++++++++++++++++++++++++ include/linux/power_supply.h | 23 +++++++++++++++++- 3 files changed, 78 insertions(+), 1 deletion(-) commit f4f25b689b0da1c009028ed45ad1700c2cc8560a Merge: b9fee10a52c0 6d5e5e5d7ce1 Author: Andrii Nakryiko <andrii@kernel.org> Date: Thu Dec 12 14:58:49 2024 -0800 Merge branch 'libbpf-extend-linker-api-to-support-in-memory-elf-files' Alastair Robertson says: ==================== libbpf: Extend linker API to support in-memory ELF files This gives API consumers the option of using anonymous files/memfds to avoid writing temporary ELFs to disk, which will be useful for performing linking as part of bpftrace's JIT compilation. v3: - Removed "filename" option. Now always generate our own filename for passed-in FDs and buffers. - Use a common function (bpf_linker_add_file) for shared implementation of bpf_linker__add_file, bpf_linker__add_fd and bpf_linker__add_buf. ==================== Link: https://patch.msgid.link/20241211164030.573042-1-ajor@meta.com Signed-off-by: Andrii Nakryiko <andrii@kernel.org> commit 6d5e5e5d7ce134a0b334c3bfe44a9326d8c5f32b Author: Alastair Robertson <ajor@meta.com> Date: Wed Dec 11 08:40:30 2024 -0800 libbpf: Extend linker API to support in-memory ELF files The new_fd and add_fd functions correspond to the original new and add_file functions, but accept an FD instead of a file name. This gives API consumers the option of using anonymous files/memfds to avoid writing ELFs to disk. This new API will be useful for performing linking as part of bpftrace's JIT compilation. The add_buf function is a convenience wrapper that does the work of creating a memfd for the caller. Signed-off-by: Alastair Robertson <ajor@meta.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241211164030.573042-3-ajor@meta.com tools/lib/bpf/libbpf.h | 5 ++ tools/lib/bpf/libbpf.map | 4 ++ tools/lib/bpf/linker.c | 162 +++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 150 insertions(+), 21 deletions(-) commit b641712925bfe89ff7217cc2d0b7a8e042df556b Author: Alastair Robertson <ajor@meta.com> Date: Wed Dec 11 08:40:29 2024 -0800 libbpf: Pull file-opening logic up to top-level functions Move the filename arguments and file-descriptor handling from init_output_elf() and linker_load_obj_file() and instead handle them at the top-level in bpf_linker__new() and bpf_linker__add_file(). This will allow the inner functions to be shared with a new, non-filename-based, API in the next commit. Signed-off-by: Alastair Robertson <ajor@meta.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241211164030.573042-2-ajor@meta.com tools/lib/bpf/linker.c | 84 +++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) commit 250bbd612bb1103745ea6c891a2a1d5f5e1576a3 Author: Varshini Rajendran <varshini.rajendran@microchip.com> Date: Thu Oct 10 17:34:14 2024 +0530 power: reset: at91-reset: add sdhwc support for sam9x7 SoC Add shutdown controller support for SAM9X7 SoC. Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/20241010120414.92993-1-varshini.rajendran@microchip.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef4f3ac4be990511a2c958443744d0c0c97deb5b Author: Varshini Rajendran <varshini.rajendran@microchip.com> Date: Thu Oct 10 17:34:10 2024 +0530 power: reset: at91-reset: add reset support for sam9x7 SoC Add power reset support for SAM9X7 SoC. Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/20241010120410.92942-1-varshini.rajendran@microchip.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a16675e254a35f13203c6738a1137093c773056 Author: Varshini Rajendran <varshini.rajendran@microchip.com> Date: Thu Oct 10 17:34:04 2024 +0530 power: reset: at91-poweroff: lookup for proper pmc dt node for sam9x7 Use sam9x7 pmc's compatible to lookup for in the SHDWC driver. Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/20241010120404.92893-1-varshini.rajendran@microchip.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/reset/at91-sama5d2_shdwc.c | 1 + 1 file changed, 1 insertion(+) commit 2d656827a0fc9ca4982c245f1bec3b606fab30d8 Author: Varshini Rajendran <varshini.rajendran@microchip.com> Date: Thu Oct 10 17:34:25 2024 +0530 dt-bindings: power: reset: atmel,sama5d2-shdwc: add sam9x7 Add shutdown controller DT bindings. Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241010120425.93102-1-varshini.rajendran@microchip.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Documentation/devicetree/bindings/power/reset/atmel,sama5d2-shdwc.yaml | 3 +++ 1 file changed, 3 insertions(+) commit c7d6cb4c43a6baf940f4ae42541dcc1a1a74b2a3 Merge: fac04efc5c79 cb2e1c2136f7 Author: Dave Airlie <airlied@redhat.com> Date: Fri Dec 13 08:20:53 2024 +1000 Merge tag 'drm-misc-next-2024-12-05' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next [airlied: handle module ns conflict] drm-misc-next for 6.14: UAPI Changes: Cross-subsystem Changes: Core Changes: - Remove driver date from drm_driver Driver Changes: - amdxdna: New driver! - ivpu: Fix qemu crash when using passthrough - nouveau: expose GSP-RM logging buffers via debugfs - panfrost: Add MT8188 Mali-G57 MC3 support - panthor: misc improvements, - rockchip: Gamma LUT support - tidss: Misc improvements - virtio: convert to helpers, add prime support for scanout buffers - v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL - vc4: Add support for BCM2712 - vkms: Improvements all across the board - panels: - Introduce backlight quirks infrastructure - New panels: KDB KD116N2130B12 Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <mripard@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241205-agile-straight-pegasus-aca7f4@houat commit 8a1c099f36b256c8203319313f65666ce0043fe5 Author: Fabio Estevam <festevam@gmail.com> Date: Thu Dec 12 10:04:56 2024 -0300 power: reset: gpio-poweroff: Clarify the warning message When gpio-poweroff fails, a WARN_ON() is triggered without an explanation to the user about the failure. Add some comments explaining that the attempt to poweroff the system via gpio-poweroff failed and convert it to a WARN() message with a bit of context to provide some hint to the user. Signed-off-by: Fabio Estevam <festevam@gmail.com> Link: https://lore.kernel.org/r/20241212130456.580197-1-festevam@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/reset/gpio-poweroff.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 5098462fbac60cbec76171a8b4998a36b85891a1 Merge: f3674384709b 150b567e0d57 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 5 11:48:58 2024 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR (net-6.13-rc3). No conflicts or adjacent changes. Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 789384eb1437aed94155dc0eac8a8a6ba1baf578 Author: Abhinav Kumar <quic_abhinavk@quicinc.com> Date: Wed Dec 11 11:50:26 2024 -0800 drm/msm/dpu: check dpu_plane_atomic_print_state() for valid sspp Similar to the r_pipe sspp protect, add a check to protect the pipe state prints to avoid NULL ptr dereference for cases when the state is dumped without a corresponding atomic_check() where the pipe->sspp is assigned. Fixes: 31f7148fd370 ("drm/msm/dpu: move pstate->pipe initialization to dpu_plane_atomic_check") Reported-by: Stephen Boyd <swboyd@chromium.org> Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/67 Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Tested-by: Douglas Anderson <dianders@chromium.org> Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor Patchwork: https://patchwork.freedesktop.org/patch/628404/ Link: https://lore.kernel.org/r/20241211-check-state-before-dump-v2-1-62647a501e8c@quicinc.com Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit d9f55e2abfb933818c772eba659a9b7ab28a44d0 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Mon Dec 9 12:04:24 2024 +0200 drm/msm/dpu1: don't choke on disabling the writeback connector During suspend/resume process all connectors are explicitly disabled and then reenabled. However resume fails because of the connector_status check: [dpu error]connector not connected 3 [drm:drm_mode_config_helper_resume [drm_kms_helper]] *ERROR* Failed to resume (-22) It doesn't make sense to check for the Writeback connected status (and other drivers don't perform such check), so drop the check. It wasn't a problem before the commit 71174f362d67 ("drm/msm/dpu: move writeback's atomic_check to dpu_writeback.c"), since encoder's atomic_check() is called under a different conditions that the connector's atomic_check() (e.g. it is not called if there is no connected CRTC or if the corresponding connector is not a part of the new state). Fixes: 71174f362d67 ("drm/msm/dpu: move writeback's atomic_check to dpu_writeback.c") Cc: stable@vger.kernel.org Reported-by: Leonard Lausen <leonard@lausen.nl> Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/57 Tested-by: Leonard Lausen <leonard@lausen.nl> # on sc7180 lazor Tested-by: György Kurucz <me@kuruczgy.com> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Tested-by: Johan Hovold <johan+linaro@kernel.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Tested-by: Jessica Zhang <quic_jesszhan@quicinc.com> # Trogdor (sc7180) Patchwork: https://patchwork.freedesktop.org/patch/627828/ Link: https://lore.kernel.org/r/20241209-dpu-fix-wb-v4-1-7fe93059f9e0@linaro.org Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c | 3 --- 1 file changed, 3 deletions(-) commit a3dd01375a6a21ed3e5dbc58f7004d48561f0977 Author: Abhinav Kumar <quic_abhinavk@quicinc.com> Date: Thu Dec 5 20:31:33 2024 -0800 drm/msm/dp: disable the opp table request even for dp_ctrl_off_link() dp_ctrl_off_link() was created to handle a case where we received a cable connect and then get a cable disconnect without the corresponding dp_display_enable(). For such cases the pixel clock will be off but the link clock will still be on. dp_ctrl_off_link() handles this case by turning off the link clock only. However, the vote removal to the opp table for this case was missed. Remove the opp table vote in dp_ctrl_off_link(). Fixes: 375a126090b9 ("drm/msm/dp: tear down main link at unplug handle immediately") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/627487/ Link: https://lore.kernel.org/r/20241205-dp_mst-v1-2-f8618d42a99a@quicinc.com Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> drivers/gpu/drm/msm/dp/dp_ctrl.c | 1 + 1 file changed, 1 insertion(+) commit 50e608d166ba68faacf81a5ce17c09b0c697eefd Author: Abhinav Kumar <quic_abhinavk@quicinc.com> Date: Thu Dec 5 20:31:32 2024 -0800 drm/msm/dp: dont call dp_catalog_ctrl_mainlink_ctrl in dp_ctrl_configure_source_params() Once the link has already been setup there is no need to call dp_catalog_ctrl_mainlink_ctrl() as this does a reset on the mainlink thereby tearing down the link briefly. Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/627479/ Link: https://lore.kernel.org/r/20241205-dp_mst-v1-1-f8618d42a99a@quicinc.com Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> drivers/gpu/drm/msm/dp/dp_ctrl.c | 1 - 1 file changed, 1 deletion(-) commit 9ffbf5ef0e8d6e1b76440a6d77311d0c5d6e3979 Author: Abhinav Kumar <quic_abhinavk@quicinc.com> Date: Mon Dec 2 12:41:59 2024 -0800 drm/msm/dp: do not touch the MMSS_DP_INTF_CONFIG for tpg MMSS_DP_INTF_CONFIG has already been setup by the main datapath for DP to account for widebus to be used/unused etc. In current implementation, TPG only switches the DP controller to use the main datapath stream OR use the test pattern but expects the rest of the controller to be already setup. Keeping the same behavior intact, drop the clearing of MMSS_DP_INTF_CONFIG from the msm_dp_catalog_panel_tpg_enable() API. Fixes: 757a2f36ab09 ("drm/msm/dp: enable widebus feature for display port") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/626888/ Link: https://lore.kernel.org/r/20241202-tpg-v1-2-0fd6b518b914@quicinc.com Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> drivers/gpu/drm/msm/dp/dp_catalog.c | 1 - 1 file changed, 1 deletion(-) commit 1d18ebcfd302a2005b83ae5f13df223894d19902 Author: Levi Yun <yeoreum.yun@arm.com> Date: Fri Nov 8 14:34:25 2024 +0000 perf expr: Initialize is_test value in expr__ctx_new() When expr_parse_ctx is allocated by expr_ctx_new(), expr_scanner_ctx->is_test isn't initialize, so it has garbage value. this can affects the result of expr__parse() return when it parses non-exist event literal according to garbage value. Use calloc instead of malloc in expr_ctx_new() to fix this. Fixes: 3340a08354ac286e ("perf pmu-events: Fix testing with JEVENTS_ARCH=all") Reviewed-by: Ian Rogers <irogers@google.com> Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Levi Yun <yeoreum.yun@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20241108143424.819126-1-yeoreum.yun@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/expr.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 9ba3462c1ce5f1596c8f065540628cec7bdad005 Author: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Date: Fri Nov 15 17:15:27 2024 +0800 perf tests: Fix an incorrect type in append_script() The return value from the call to readlink() is ssize_t. However, the return value is being assigned to an size_t variable 'len', so making 'len' an ssize_t. ./tools/perf/tests/tests-scripts.c:182:5-8: WARNING: Unsigned expression compared with zero: len < 0. Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11909 Reported-by: Abaci Robot <abaci@linux.alibaba.com> Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241115091527.128923-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/tests-scripts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b9f942eb21c92041905e3943a8d5177c9a9d89d Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Tue Dec 10 22:00:20 2024 +0800 PCI: endpoint: Finish virtual EP removal in pci_epf_remove_vepf() When removing a virtual Endpoint, pci_epf_remove_vepf() failed to clear epf_vf->epf_pf, which caused a subsequent pci_epf_add_vepf() to incorrectly return -EBUSY: pci_epf_add_vepf(epf_pf, epf_vf) // add pci_epf_remove_vepf(epf_pf, epf_vf) // remove pci_epf_add_vepf(epf_pf, epf_vf) // add again, -EBUSY error Fix by clearing epf_vf->epf_pf in pci_epf_remove_vepf(). Link: https://lore.kernel.org/r/20241210-pci-epc-core_fix-v3-3-4d86dd573e4b@quicinc.com Fixes: 1cf362e907f3 ("PCI: endpoint: Add support to add virtual function in endpoint core") Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Cc: stable@vger.kernel.org drivers/pci/endpoint/pci-epf-core.c | 1 + 1 file changed, 1 insertion(+) commit e0be8511ff50bec4927ec9bc27bf0a0eea5e8f63 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Tue Dec 10 22:00:19 2024 +0800 PCI: endpoint: Simplify pci_epc_get() Simplify pci_epc_get() implementation by using class_find_device_by_name(). Link: https://lore.kernel.org/r/20241210-pci-epc-core_fix-v3-2-4d86dd573e4b@quicinc.com Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> drivers/pci/endpoint/pci-epc-core.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit d4929755e4d02bd3de3ae5569dab69cb9502c54f Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Tue Dec 10 22:00:18 2024 +0800 PCI: endpoint: Destroy the EPC device in devm_pci_epc_destroy() The devm_pci_epc_destroy() comment says destroys the EPC device, but it does not actually do that since devres_destroy() does not call devm_pci_epc_release(), and it also can not fully undo what the API devm_pci_epc_create() does, so it is faulty. Fortunately, the faulty API has not been used by current kernel tree. Use devres_release() instead of devres_destroy() so the EPC device will be released. Link: https://lore.kernel.org/r/20241210-pci-epc-core_fix-v3-1-4d86dd573e4b@quicinc.com Fixes: 5e8cb4033807 ("PCI: endpoint: Add EP core layer to enable EP controller and EP functions") Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> drivers/pci/endpoint/pci-epc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76850b54943ffd5037c97cc27794449ce05c31e9 Author: Rick Wertenbroek <rick.wertenbroek@gmail.com> Date: Thu Dec 12 17:25:47 2024 +0100 PCI: endpoint: Replace magic number '6' by PCI_STD_NUM_BARS Replace the constant "6" by PCI_STD_NUM_BARS, as defined in include/uapi/linux/pci_regs.h: #define PCI_STD_NUM_BARS 6 /* Number of standard BARs */ Link: https://lore.kernel.org/r/20241212162547.225880-1-rick.wertenbroek@gmail.com Signed-off-by: Rick Wertenbroek <rick.wertenbroek@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> include/linux/pci-epf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8791a78fb70ebcc46170025b3ac76f7fb33770f7 Author: Ruffalo Lavoisier <ruffalolavoisier@gmail.com> Date: Wed Nov 20 13:35:02 2024 +0900 perf test: Remove duplicate word - Remove duplicate word, 'the'. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Günther Noack <gnoack@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mickaël Salaün <mic@digikod.net> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ruffalo Lavoisier <RuffaloLavoisier@gmail.com> Cc: linux-security-module@vger.kernel.org Link: https://lore.kernel.org/r/20241120043503.80530-1-RuffaloLavoisier@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/workloads/landlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61e0a9446349e1a1531703fde07b65d2811af84a Author: Ian Rogers <irogers@google.com> Date: Tue Nov 19 22:52:24 2024 -0800 perf string: Avoid undefined NULL+1 While the value NULL+1 is never used it triggers a ubsan warning. Restructure and comment the loop to avoid this. Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241120065224.286813-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/string.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 7269846617a572163778bb565e948cfd61edf5f2 Author: James Clark <james.clark@linaro.org> Date: Wed Nov 20 14:37:31 2024 +0000 perf vendor events arm64: Update N2/V2 events from source Update using the new data [1] for these changes: * Scale some metrics like dtlb_walk_ratio to percent so they display better with Perf's 2 dp precision * Description typos, grammar and clarifications * Unnecessary metric formula brackets seem to have been removed in the source but this is not a functional change * New sve_all_percentage metric The following command was used to generate this commit: $ telemetry-solution/tools/perf_json_generator/generate.py \ tools/perf/ --telemetry-files \ telemetry-solution/data/pmu/cpu/neoverse/neoverse-v2.json:neoverse-n2-v2 [1]: https://gitlab.arm.com/telemetry-solution/telemetry-solution/-/blob/main/data/pmu/cpu/neoverse/neoverse-v2.json Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: James Clark <james.clark@linaro.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20241120143739.243728-1-james.clark@linaro.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> .../arch/arm64/arm/neoverse-n2-v2/exception.json | 2 +- .../arch/arm64/arm/neoverse-n2-v2/general.json | 2 +- .../arch/arm64/arm/neoverse-n2-v2/l1d_cache.json | 6 +- .../arch/arm64/arm/neoverse-n2-v2/l2_cache.json | 14 ++-- .../arch/arm64/arm/neoverse-n2-v2/l3_cache.json | 4 +- .../arch/arm64/arm/neoverse-n2-v2/ll_cache.json | 4 +- .../arch/arm64/arm/neoverse-n2-v2/memory.json | 2 +- .../arch/arm64/arm/neoverse-n2-v2/metrics.json | 93 ++++++++++++---------- .../arch/arm64/arm/neoverse-n2-v2/retired.json | 4 +- .../arm64/arm/neoverse-n2-v2/spec_operation.json | 14 ++-- .../arch/arm64/arm/neoverse-n2-v2/stall.json | 8 +- .../arch/arm64/arm/neoverse-n2-v2/tlb.json | 4 +- 12 files changed, 82 insertions(+), 75 deletions(-) commit 4cc40bf45b6f6b6ae350e1f75ee0af49b81f9b1f Author: Marek Behún <kabel@kernel.org> Date: Mon Nov 11 11:03:55 2024 +0100 leds: turris-omnia: Use uppercase first letter in all comments Change first letter of 4 more comments to uppercase to make the driver comments uniform. Signed-off-by: Marek Behún <kabel@kernel.org> Link: https://lore.kernel.org/r/20241111100355.6978-12-kabel@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/leds-turris-omnia.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit eda057c7c7c2c99c15b86bb5e3c1858b8650c074 Author: Marek Behún <kabel@kernel.org> Date: Mon Nov 11 11:03:54 2024 +0100 leds: turris-omnia: Use dev_err_probe() where appropriate Use dev_err_probe() instead of dev_err() + separate return where appropriate. Signed-off-by: Marek Behún <kabel@kernel.org> Link: https://lore.kernel.org/r/20241111100355.6978-11-kabel@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/leds-turris-omnia.c | 50 +++++++++++++--------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) commit 2de889e9cf25558bf12505b6827dcd435cbc1b11 Author: Marek Behún <kabel@kernel.org> Date: Mon Nov 11 11:03:53 2024 +0100 leds: turris-omnia: Inform about missing LED gamma correction feature in the MCU driver If the LED gamma correction feature is missing in the MCU firmware, inform about this in the MCU firmware probe function instead of LED driver probe function, so that all the feature checks are in one place. Signed-off-by: Marek Behún <kabel@kernel.org> Link: https://lore.kernel.org/r/20241111100355.6978-10-kabel@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/leds-turris-omnia.c | 6 ------ drivers/platform/cznic/turris-omnia-mcu-base.c | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) commit 1783b766940f37aeaf7c841f777be8cf68326908 Author: Marek Behún <kabel@kernel.org> Date: Mon Nov 11 11:03:52 2024 +0100 platform: cznic: turris-omnia-mcu: Inform about missing LED panel brightness change interrupt feature When reading MCU firmware features, check also for the LED panel brightness change interrupt feature, and suggest upgrading the firmware if it is missing. Signed-off-by: Marek Behún <kabel@kernel.org> Link: https://lore.kernel.org/r/20241111100355.6978-9-kabel@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> drivers/platform/cznic/turris-omnia-mcu-base.c | 1 + 1 file changed, 1 insertion(+) commit d82e09d62b3bdbfa9dac2daf3c3c071b6a79d2aa Author: Marek Behún <kabel@kernel.org> Date: Mon Nov 11 11:03:51 2024 +0100 leds: turris-omnia: Notify sysfs on MCU global LEDs brightness change Recall that on Turris Omnia, the LED controller has a global brightness property, which allows the user to make the front LED panel dimmer. There is also a button on the front panel, which by default is configured so that pressing it changes the global brightness to a lower value (unless it is at 0%, in which case pressing the button changes the global brightness to 100%). Newer versions of the MCU firmware support informing the SOC that the brightness was changed by button press event via an interrupt. Now that we have the turris-omnia-mcu driver, which adds support for MCU interrupts, add the ability to inform the userspace (via a sysfs notification) that the global brightness was changed. Signed-off-by: Marek Behún <kabel@kernel.org> Link: https://lore.kernel.org/r/20241111100355.6978-8-kabel@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/Kconfig | 1 + drivers/leds/leds-turris-omnia.c | 62 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) commit 8ca5bf8ad183e1b05034ccfd96d59e7b802d6335 Author: Marek Behún <kabel@kernel.org> Date: Mon Nov 11 11:03:50 2024 +0100 leds: turris-omnia: Document driver private structures Add documentation for driver private structures, `struct omnia_leds` and `struct omnia_led`. Signed-off-by: Marek Behún <kabel@kernel.org> Link: https://lore.kernel.org/r/20241111100355.6978-7-kabel@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/leds-turris-omnia.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 2b73a24f327070390f1a17570fcab35b61a92c24 Author: Marek Behún <kabel@kernel.org> Date: Mon Nov 11 11:03:49 2024 +0100 dt-bindings: leds: cznic,turris-omnia-leds: Allow interrupts property Extend the cznic,turris-omnia-leds binding with interrupts property, specifying the global LED brightness changed by button press interrupt. Signed-off-by: Marek Behún <kabel@kernel.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241111100355.6978-6-kabel@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> .../devicetree/bindings/leds/cznic,turris-omnia-leds.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5d2f88320c2f7d15830f2f3b51726ef6ba999195 Author: Marek Behún <kabel@kernel.org> Date: Mon Nov 11 11:03:48 2024 +0100 leds: turris-omnia: Use global header for MCU command definitions The global turris-omnia-mcu-interface.h header file contains the definitions for MCU commands. Drop the driver-internal definitions and use the global ones. Signed-off-by: Marek Behún <kabel@kernel.org> Link: https://lore.kernel.org/r/20241111100355.6978-5-kabel@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/leds-turris-omnia.c | 71 +++++++++++++--------------------------- 1 file changed, 23 insertions(+), 48 deletions(-) commit d665d7f2800fff5da9311e4c8c236966ba57d440 Author: Marek Behún <kabel@kernel.org> Date: Mon Nov 11 11:03:47 2024 +0100 turris-omnia-mcu-interface.h: Add LED commands related definitions to global header Add definitions for contents of the OMNIA_CMD_LED_MODE and OMNIA_CMD_LED_STATE commands to the global turris-omnia-mcu-interface.h header. Signed-off-by: Marek Behún <kabel@kernel.org> Link: https://lore.kernel.org/r/20241111100355.6978-4-kabel@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> include/linux/turris-omnia-mcu-interface.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b4c3960da27dd91412e04bc263311c16e6c46fb0 Author: Marek Behún <kabel@kernel.org> Date: Mon Nov 11 11:03:46 2024 +0100 leds: turris-omnia: Use command execution functions from the MCU driver Use the MCU command execution functions from the MCU driver instead of the ad-hoc implementation in the LED driver. This allows as to drop the LED driver implementation, which is a duplicate. Signed-off-by: Marek Behún <kabel@kernel.org> Link: https://lore.kernel.org/r/20241111100355.6978-3-kabel@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/Kconfig | 1 + drivers/leds/leds-turris-omnia.c | 137 +++++++++++++++------------------------ 2 files changed, 55 insertions(+), 83 deletions(-) commit ad5d76aecdcfe73a4093a9755a991f172d2d2492 Author: Namhyung Kim <namhyung@kernel.org> Date: Wed Nov 27 17:03:25 2024 -0800 perf tools: Avoid unaligned pointer operations The sample data is 64-bit aligned basically but raw data starts with 32-bit length field and data follows. In perf_event__synthesize_sample it treats the sample data as a 64-bit array. And it needs some trick to update the raw data properly. But it seems some compilers are not happy with this and the program dies siliently. I found the sample parsing test failed without any messages on affected systems. Let's update the code to use a 32-bit pointer directly and make sure the result is 64-bit aligned again. No functional changes intended. Reviewed-by: Ian Rogers <irogers@google.com> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241128010325.946897-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/synthetic-events.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 082e8f6db9092d19ae84549874daaef240c2207b Author: Marek Behún <kabel@kernel.org> Date: Mon Nov 11 11:03:45 2024 +0100 turris-omnia-mcu-interface.h: Move command execution function to global header Move the command execution functions from the turris-omnia-mcu platform driver private header to the global turris-omnia-mcu-interface.h header, so that they can be used by the LED driver. Signed-off-by: Marek Behún <kabel@kernel.org> Link: https://lore.kernel.org/r/20241111100355.6978-2-kabel@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> drivers/platform/cznic/turris-omnia-mcu-base.c | 1 + drivers/platform/cznic/turris-omnia-mcu.h | 130 ----------------------- include/linux/turris-omnia-mcu-interface.h | 136 ++++++++++++++++++++++++- 3 files changed, 136 insertions(+), 131 deletions(-) commit b1ef2559d5579b1bc34f062aef53e9c1e52c91b0 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Wed Dec 11 16:51:08 2024 -0300 tools build feature: Don't set feature-libcap=1 if libcap-devel isn't available libcap isn't tested in the tools/build/feature/test-all.c fast path feature detection process, so don't set it as available if test-all manages to build. There are other users of this feature detection mechanism, and they explicitely ask for libcap to be tested, so are not affected by this patch, for instance, with this patch in place: $ make -C tools/bpf/bpftool/ clean <SNIP> make: Leaving directory '/home/acme/git/perf-tools-next/tools/bpf/bpftool' ⬢ [acme@toolbox perf-tools-next]$ make -C tools/bpf/bpftool/ make: Entering directory '/home/acme/git/perf-tools-next/tools/bpf/bpftool' Auto-detecting system features: ... clang-bpf-co-re: [ on ] ... llvm: [ on ] ... libcap: [ on ] ... libbfd: [ on ] ... libelf-zstd: [ on ] <SNIP> LINK bpftool make: Leaving directory '/home/acme/git/perf-tools-next/tools/bpf/bpftool' $ $ sudo rpm -e libcap-devel $ make -C tools/bpf/bpftool/ <SNIP> make: Entering directory '/home/acme/git/perf-tools-next/tools/bpf/bpftool' Auto-detecting system features: ... clang-bpf-co-re: [ on ] ... llvm: [ on ] ... libcap: [ OFF ] ... libbfd: [ on ] ... libelf-zstd: [ on ] $ Reviewed-by: Ian Rogers <irogers@google.com> Acked-by: Quentin Monnet <qmo@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/lkml/20241211224509.797827-3-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/build/Makefile.feature | 2 -- tools/build/feature/Makefile | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit 20ed532554a4971c363e1b5529ae13b6d3c28875 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Wed Dec 11 16:30:02 2024 -0300 tools build feature: Add some comments to explain the FEATURE_TESTS logic The tools/build/feature/test-all.c works in conjunction with the tools/build/Makefile.feature FEATURE_TESTS_BASIC and FEATURE_TESTS_EXTRA contents, so that if test-all.c manages to be built, we go on and iterate all entries in FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA setting them to 1. To test this: $ rm -rf /tmp/b ; mkdir /tmp/b ; make -C tools/perf O=/tmp/b feature-dump $ cat /tmp/b/feature/test-all.make.output $ ldd /tmp/b/feature/test-all.bin linux-vdso.so.1 (0x00007f2a47a67000) libdw.so.1 => /lib64/libdw.so.1 (0x00007f2a477cf000) libpython3.12.so.1.0 => /lib64/libpython3.12.so.1.0 (0x00007f2a471fe000) libm.so.6 => /lib64/libm.so.6 (0x00007f2a4711a000) libtraceevent.so.1 => /lib64/libtraceevent.so.1 (0x00007f2a470f2000) libtracefs.so.1 => /lib64/libtracefs.so.1 (0x00007f2a470cb000) libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007f2a46c1b000) libz.so.1 => /lib64/libz.so.1 (0x00007f2a46bf8000) libbabeltrace-ctf.so.1 => /lib64/libbabeltrace-ctf.so.1 (0x00007f2a46bad000) libcapstone.so.5 => /lib64/libcapstone.so.5 (0x00007f2a464b8000) libopencsd_c_api.so.1 => /lib64/libopencsd_c_api.so.1 (0x00007f2a464a8000) libopencsd.so.1 => /lib64/libopencsd.so.1 (0x00007f2a46422000) libelf.so.1 => /lib64/libelf.so.1 (0x00007f2a46406000) libnuma.so.1 => /lib64/libnuma.so.1 (0x00007f2a463f6000) libslang.so.2 => /lib64/libslang.so.2 (0x00007f2a46113000) libperl.so.5.38 => /lib64/libperl.so.5.38 (0x00007f2a45d74000) libc.so.6 => /lib64/libc.so.6 (0x00007f2a45b83000) liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f2a45b50000) libzstd.so.1 => /lib64/libzstd.so.1 (0x00007f2a45a91000) libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f2a45a7b000) /lib64/ld-linux-x86-64.so.2 (0x00007f2a47a69000) libbabeltrace.so.1 => /lib64/libbabeltrace.so.1 (0x00007f2a45a6b000) libpopt.so.0 => /lib64/libpopt.so.0 (0x00007f2a45a5b000) libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f2a45a51000) libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x00007f2a45a4a000) libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f2a458fa000) libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f2a45696000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f2a45668000) libcrypt.so.2 => /lib64/libcrypt.so.2 (0x00007f2a45630000) libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f2a45590000) $ head /tmp/b/FEATURE-DUMP feature-backtrace=1 feature-libdw=1 feature-eventfd=1 feature-fortify-source=1 feature-get_current_dir_name=1 feature-gettid=1 feature-glibc=1 feature-libbfd=1 feature-libbfd-buildid=1 feature-libcap=1 $ There are inconsistencies that are being audited, as can be seen above with the libcap case, that is not linked with test-all.bin nor is present in test-all.c, so shouldn't be set as present. Further patches are going to address those inconsistencies, but lets document this a bit more to reduce the chances of this happening again. Reviewed-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/lkml/20241211224509.797827-2-acme@kernel.org [ Fixed typo pointed out by Ian Rogers ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/build/Makefile.feature | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 5a10971c7645a95f5d5dc23c26fbac4bf61801d0 Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Tue Dec 10 10:56:33 2024 +0530 wifi: ath12k: fix read pointer after free in ath12k_mac_assign_vif_to_vdev() In ath12k_mac_assign_vif_to_vdev(), if arvif is created on a different radio, it gets deleted from that radio through a call to ath12k_mac_unassign_link_vif(). This action frees the arvif pointer. Subsequently, there is a check involving arvif, which will result in a read-after-free scenario. Fix this by moving this check after arvif is again assigned via call to ath12k_mac_assign_link_vif(). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Closes: https://scan5.scan.coverity.com/#/project-view/63541/10063?selectedIssue=1636423 Fixes: b5068bc9180d ("wifi: ath12k: Cache vdev configs before vdev create") Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> Acked-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241210-read_after_free-v1-1-969f69c7d66c@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/mac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 73e456b402faddf354ff587a859121163709ad2d Author: Liu Jing <liujing@cmss.chinamobile.com> Date: Mon Dec 9 14:24:25 2024 +0800 wifi: qtnfmac: fix spelling error in core.h Fix specific spelling error in core.h. Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241209062425.4139-1-liujing@cmss.chinamobile.com drivers/net/wireless/quantenna/qtnfmac/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1234b215538279c8520481f6d539f1582bd17d8 Author: Richard Acayan <mailingradian@gmail.com> Date: Mon Nov 11 21:40:52 2024 -0500 dt-bindings: leds: qcom,spmi-flash-led: Add pm660l compatible Add the compatible for the flash LED controller on the PM660L PMIC. Signed-off-by: Richard Acayan <mailingradian@gmail.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241112024050.669578-7-mailingradian@gmail.com Signed-off-by: Lee Jones <lee@kernel.org> Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml | 1 + 1 file changed, 1 insertion(+) commit 6fcafd33d2f85f0ffc1fc64e2b1ea607d0e75037 Author: Zhu Jun <zhujun2@cmss.chinamobile.com> Date: Thu Nov 21 22:46:26 2024 -0800 leds: ledtrig-activity: Fix the wrong format specifier The format specifier of "signed int" in sprintf() should be "%d", not "%u". Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241122064626.4680-1-zhujun2@cmss.chinamobile.com Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/trigger/ledtrig-activity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 322a00efec6a7f44a9204fad4e15d7f83e0e1ed2 Author: Arnd Bergmann <arnd@arndb.de> Date: Thu Dec 12 16:39:50 2024 +0100 drm/log: select CONFIG_FONT_SUPPORT Without fonts, this fails to link: drivers/gpu/drm/clients/drm_log.o: in function `drm_log_init_client': drm_log.c:(.text+0x3d4): undefined reference to `get_default_font' Select this, like the other users do. Fixes: f7b42442c4ac ("drm/log: Introduce a new boot logger to draw the kmsg on the screen") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241212154003.1313437-1-arnd@kernel.org drivers/gpu/drm/clients/Kconfig | 1 + lib/fonts/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit b9fee10a52c0999f6f1c7e1c0ea83869f3cd10ae Author: Simone Magnani <simone.magnani@isovalent.com> Date: Mon Dec 9 15:54:39 2024 +0100 bpftool: Probe for ISA v4 instruction set extension This patch introduces a new probe to check whether the kernel supports instruction set extensions v4. The v4 extension comprises several new instructions: BPF_{SDIV,SMOD} (signed div and mod), BPF_{LD,LDX,ST,STX,MOV} (sign-extended load/store/move), 32-bit BPF_JA (unconditional jump), target-independent BPF_ALU64 BSWAP (byte-swapping 16/32/64). These have been introduced in the following commits respectively: * ec0e2da95f72 ("bpf: Support new signed div/mod instructions.") * 1f9a1ea821ff ("bpf: Support new sign-extension load insns") * 8100928c8814 ("bpf: Support new sign-extension mov insns") * 4cd58e9af8b9 ("bpf: Support new 32bit offset jmp instruction") * 0845c3db7bf5 ("bpf: Support new unconditional bswap instruction") Support in bpftool for previous ISA extensions was added in commit 0fd800b2456c ("bpftool: Probe for instruction set extensions"). These probes are useful for userspace BPF projects that want to use newer instruction set extensions on newer kernels, to reduce the programs' sizes or their complexity. LLVM provides the mcpu=v4 option since LLVM commit 8f28e8069c4b ("[BPF] support for BPF_ST instruction in codegen") [0]. Signed-off-by: Simone Magnani <simone.magnani@isovalent.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Quentin Monnet <qmo@kernel.org> Link: https://github.com/llvm/llvm-project/commit/8f28e8069c4ba1110daee8bddc4d5049b6d4646e [0] Link: https://lore.kernel.org/bpf/20241209145439.336362-1-simone.magnani@isovalent.com tools/bpf/bpftool/feature.c | 23 +++++++++++++++++++++++ tools/include/linux/filter.h | 10 ++++++++++ 2 files changed, 33 insertions(+) commit 934bacb6441afdb77093a46b3138f81cbcde7d81 Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Date: Thu Dec 5 13:06:09 2024 +0100 gpio: omap: allow building the module with COMPILE_TEST=y For better build coverage, allow building the gpio-omap driver with COMPILE_TEST Kconfig option enabled. While at it: simplify the dependencies and drop the dependency on ARM as it's already implied by ARCH_OMAP. Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Link: https://lore.kernel.org/r/20241205120610.40644-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> drivers/gpio/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fcf15fd8ed88507ac618fb9228423edcc99b13ad Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Thu Dec 12 15:47:37 2024 +0300 drm/vc4: unlock on error in vc4_hvs_get_fifo_frame_count() The default statement is never used in real life. However, if it were used for some reason then call drm_dev_exit() before returning. Fixes: 8f2fc64773be ("drm/vc4: Fix reading of frame count on GEN5 / Pi4") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/b61a81b2-0101-43bd-a4f6-09cf3a016484@stanley.mountain Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_hvs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18131e9f1682bd6082ec6c194f8ed3243f0fc230 Merge: 3b6f9c6505a3 0056b0852c32 Author: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Date: Thu Dec 12 16:07:26 2024 +0200 Merge branch 'platform-drivers-x86-platform-profile' into for-next commit f3674384709b69c5cd8c4597b8bd73ea7bd0236f Merge: a3b16198d3df c12b2704a678 Author: Paolo Abeni <pabeni@redhat.com> Date: Thu Dec 12 13:50:20 2024 +0100 Merge branch 'net-smc-two-features-for-smc-r' Guangguan Wang says: ==================== net/smc: Two features for smc-r v2: https://lore.kernel.org/netdev/20241202125203.48821-1-guangguan.wang@linux.alibaba.com/ v1: https://lore.kernel.org/oe-kbuild-all/202411282154.DjX7ilwF-lkp@intel.com/ ==================== Link: https://patch.msgid.link/20241211023055.89610-1-guangguan.wang@linux.alibaba.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> commit c12b2704a678b8a116eeb03f5b91895b90b4dd6f Author: Guangguan Wang <guangguan.wang@linux.alibaba.com> Date: Wed Dec 11 10:30:55 2024 +0800 net/smc: support ipv4 mapped ipv6 addr client for smc-r v2 AF_INET6 is not supported for smc-r v2 client before, even if the ipv6 addr is ipv4 mapped. Thus, when using AF_INET6, smc-r connection will fallback to tcp, especially for java applications running smc-r. This patch support ipv4 mapped ipv6 addr client for smc-r v2. Clients using real global ipv6 addr is still not supported yet. Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com> Reviewed-by: Wen Gu <guwen@linux.alibaba.com> Reviewed-by: Dust Li <dust.li@linux.alibaba.com> Reviewed-by: D. Wythe <alibuda@linux.alibaba.com> Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com> Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/smc/af_smc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 27ef6a9981fe74191849966a6d5e0400a4008ab8 Author: Guangguan Wang <guangguan.wang@linux.alibaba.com> Date: Wed Dec 11 10:30:54 2024 +0800 net/smc: support SMC-R V2 for rdma devices with max_recv_sge equals to 1 For SMC-R V2, llc msg can be larger than SMC_WR_BUF_SIZE, thus every recv wr has 2 sges, the first sge with length SMC_WR_BUF_SIZE is for V1/V2 compatible llc/cdc msg, and the second sge with length SMC_WR_BUF_V2_SIZE-SMC_WR_TX_SIZE is for V2 specific llc msg, like SMC_LLC_DELETE_RKEY and SMC_LLC_ADD_LINK for SMC-R V2. The memory buffer in the second sge is shared by all recv wr in one link and all link in one lgr for saving memory usage purpose. But not all RDMA devices with max_recv_sge greater than 1. Thus SMC-R V2 can not support on such RDMA devices and SMC_CLC_DECL_INTERR fallback happens because of the failure of create qp. This patch introduce the support for SMC-R V2 on RDMA devices with max_recv_sge equals to 1. Every recv wr has only one sge with individual buffer whose size is SMC_WR_BUF_V2_SIZE once the RDMA device's max_recv_sge equals to 1. It may use more memory, but it is better than SMC_CLC_DECL_INTERR fallback. Co-developed-by: Wen Gu <guwen@linux.alibaba.com> Signed-off-by: Wen Gu <guwen@linux.alibaba.com> Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com> Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/smc/smc_core.c | 5 +++++ net/smc/smc_core.h | 11 ++++++++++- net/smc/smc_ib.c | 3 +-- net/smc/smc_llc.c | 21 +++++++++++++++------ net/smc/smc_wr.c | 42 +++++++++++++++++++++--------------------- 5 files changed, 52 insertions(+), 30 deletions(-) commit 686f27f7ea376ee5001783489c70a6c2e0bfcd6d Author: Alain Volmat <alain.volmat@foss.st.com> Date: Thu Dec 12 10:17:37 2024 +0100 media: stm32: dcmipp: add core support for the stm32mp25 The stm32mp25 supports both parallel & csi inputs. An additional clock control is necessary. Skeleton of the subdev structures for the stm32mp25 is added, identical for the time being to the stm32mp13 however more subdeves will be added in further commits. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../platform/st/stm32/stm32-dcmipp/dcmipp-core.c | 104 +++++++++++++++++---- 1 file changed, 85 insertions(+), 19 deletions(-) commit 923b428c49fb8ef50b2c6ae8ca9f322568a3882a Author: Alain Volmat <alain.volmat@foss.st.com> Date: Thu Dec 12 10:17:36 2024 +0100 dt-bindings: media: add the stm32mp25 compatible of DCMIPP Add the stm32mp25 compatible for the DCMIPP. The stm32mp25 distinguish with the stm32mp13 by the fact that: - supports also csi inputs in addition to parallel inputs - requires an addition csi clock to be present Add also access-controllers, an optional property that allows a peripheral to refer to one or more domain access controller(s). Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../devicetree/bindings/media/st,stm32-dcmipp.yaml | 53 +++++++++++++++++++--- 1 file changed, 47 insertions(+), 6 deletions(-) commit 4a58f7ec73a3120bef5c5989dbc38f2b1e830662 Author: Alain Volmat <alain.volmat@foss.st.com> Date: Thu Dec 12 10:17:35 2024 +0100 media: stm32: dcmipp: fill media ctl hw_revision field Add hw_revision field information of the media controller so that application can distinguish between variants of DCMIPP implementations. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 58d0201ef8ad1b2316e57ef9a23ccd6382ded5bb Author: Alain Volmat <alain.volmat@foss.st.com> Date: Thu Dec 12 10:17:34 2024 +0100 media: stm32: dcmipp: avoid duplicated format on enum in bytecap Avoid duplication of enumerated pixelformat on the bytecap video capture device. Indeed, since the bytecap format list contains both CSI & parallel 16bits formats, ensure that same pixelformat are not reported twice when performing enumeration of supported formats. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../st/stm32/stm32-dcmipp/dcmipp-bytecap.c | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) commit e2650231553cb3aa47eeb034fbec2e5f34d9c89a Author: Alain Volmat <alain.volmat@foss.st.com> Date: Thu Dec 12 10:17:33 2024 +0100 media: stm32: dcmipp: add 1X16 RGB / YUV formats support Add 1X16 RGB & YUV formats support within bytecap & byteproc. Slightly change the link_validate function to be able to validate against either 1X16 or 2X8 variant of a format. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../st/stm32/stm32-dcmipp/dcmipp-bytecap.c | 23 ++++++++++++++++------ .../st/stm32/stm32-dcmipp/dcmipp-byteproc.c | 5 +++++ 2 files changed, 22 insertions(+), 6 deletions(-) commit 822c72eb15190e6aa70d2da9c69f0b86b1da6038 Author: Alain Volmat <alain.volmat@foss.st.com> Date: Thu Dec 12 10:17:32 2024 +0100 media: stm32: dcmipp: add bayer 10~14 bits formats Add support for bayer formats from 10 to 14 bits. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../media/platform/st/stm32/stm32-dcmipp/dcmipp-bytecap.c | 12 ++++++++++++ .../media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c | 12 ++++++++++++ 2 files changed, 24 insertions(+) commit 03abfb7b7176d586940a5ad92b08e27a26c3b598 Author: Alain Volmat <alain.volmat@foss.st.com> Date: Thu Dec 12 10:17:31 2024 +0100 media: stm32: dcmipp: add support for csi input into dcmipp-input On stm32mp25, the dcmipp can accept data coming from a CSI bus in addition to the parallel interface. Add this support into dcmipp-input subdev. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../platform/st/stm32/stm32-dcmipp/dcmipp-input.c | 134 +++++++++++++++++---- 1 file changed, 110 insertions(+), 24 deletions(-) commit d64685e129c0a3db7b5d7cfaee6661eca9cbbdc7 Author: Alain Volmat <alain.volmat@foss.st.com> Date: Thu Dec 12 10:17:30 2024 +0100 media: stm32: dcmipp: rename dcmipp_parallel into dcmipp_input In preparation of the introduction of dcmipp csi input support, rename the dcmipp_parallel subdev into a generic dcmipp_input which will be in charge of handling both parallel input & csi input. Only structures / variables / functions and file naming are changed without any functional modifications. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../media/platform/st/stm32/stm32-dcmipp/Makefile | 2 +- .../platform/st/stm32/stm32-dcmipp/dcmipp-common.h | 4 +- .../platform/st/stm32/stm32-dcmipp/dcmipp-core.c | 12 +- .../{dcmipp-parallel.c => dcmipp-input.c} | 178 ++++++++++----------- 4 files changed, 98 insertions(+), 98 deletions(-) commit b0f3cc70893289d0d74a1523e26d60346f747ebe Author: Alain Volmat <alain.volmat@foss.st.com> Date: Thu Dec 12 10:17:29 2024 +0100 media: stm32: dcmipp: replace s_stream with enable/disable_streams Replace s_stream ops with enable_streams and disable_streams. At the same time, use v4l2_subdev_enable_streams and v4l2_subdev_disable_streams functions instead of direct s_stream calls. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../st/stm32/stm32-dcmipp/dcmipp-bytecap.c | 49 ++++------ .../st/stm32/stm32-dcmipp/dcmipp-byteproc.c | 98 +++++++++++-------- .../st/stm32/stm32-dcmipp/dcmipp-parallel.c | 107 ++++++++++++--------- 3 files changed, 139 insertions(+), 115 deletions(-) commit 255e0cc62b9b1afad9b9ba7738d5c53cd0d157fb Author: Alain Volmat <alain.volmat@foss.st.com> Date: Thu Dec 12 10:17:28 2024 +0100 media: stm32: dcmipp: use v4l2_subdev_is_streaming Rely on v4l2_subdev_is_streaming in order to know if the subdev is streaming or not instead of relying on a local variable. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-byteproc.c | 6 +----- drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-parallel.c | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) commit dcb0f4c16be5df6881a952dc510ce3ec01570144 Author: Alain Volmat <alain.volmat@foss.st.com> Date: Thu Dec 12 10:17:27 2024 +0100 media: stm32: csi: addition of the STM32 CSI driver The STM32 CSI controller is tightly coupled with the DCMIPP and act as an input stage to receive data coming from the sensor and transferring them into the DCMIPP. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> MAINTAINERS | 8 + drivers/media/platform/st/stm32/Kconfig | 14 + drivers/media/platform/st/stm32/Makefile | 1 + drivers/media/platform/st/stm32/stm32-csi.c | 1137 +++++++++++++++++++++++++++ 4 files changed, 1160 insertions(+) commit 64ecc79a95db0ef781c7b5948910a73bd2b54770 Author: Alain Volmat <alain.volmat@foss.st.com> Date: Thu Dec 12 10:17:26 2024 +0100 dt-bindings: media: add description of stm32 csi Add the stm32 csi controller description. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../bindings/media/st,stm32mp25-csi.yaml | 125 +++++++++++++++++++++ 1 file changed, 125 insertions(+) commit b36077ba289b827b4e76e25e8d8e0cc90fa09186 Author: Alain Volmat <alain.volmat@foss.st.com> Date: Thu Dec 12 10:17:25 2024 +0100 media: stm32: dcmipp: correct dma_set_mask_and_coherent mask value Correct the call to dma_set_mask_and_coherent which should be set to DMA_BIT_MASK(32). Fixes: 28e0f3772296 ("media: stm32-dcmipp: STM32 DCMIPP camera interface driver") Cc: stable@vger.kernel.org Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-bytecap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3b16198d3df38aa2fc6de167b919ecb3fae74a6 Author: Vladimir Oltean <vladimir.oltean@nxp.com> Date: Wed Dec 11 01:35:40 2024 +0200 selftests: forwarding: add a pvid_change test to bridge_vlan_unaware Historically, DSA drivers have seen problems with the model in which bridge VLANs work, particularly with them being offloaded to switchdev asynchronously relative to when they become active (vlan_filtering=1). This switchdev API peculiarity was papered over by commit 2ea7a679ca2a ("net: dsa: Don't add vlans when vlan filtering is disabled"), which introduced other problems, fixed by commit 54a0ed0df496 ("net: dsa: provide an option for drivers to always receive bridge VLANs") through an opt-in ds->configure_vlan_while_not_filtering bool (which later became an opt-out). The point is that some DSA drivers still skip VLAN configuration while VLAN-unaware, and there is a desire to get rid of that behavior. It's hard to deduce from the wording "at least one corner case" what Andrew saw, but my best guess is that there is a discrepancy of meaning between bridge pvid and hardware port pvid which caused breakage. On one side, the Linux bridge with vlan_filtering=0 is completely VLAN-unaware, and will accept and process a packet the same way irrespective of the VLAN groups on the ports or the bridge itself (there may not even be a pvid, and this makes no difference). On the other hand, DSA switches still do VLAN processing internally, even with vlan_filtering disabled, but they are expected to classify all packets to the port pvid. That pvid shouldn't be confused with the bridge pvid, and there lies the problem. When a switch port is under a VLAN-unaware bridge, the hardware pvid must be explicitly managed by the driver to classify all received packets to it, regardless of bridge VLAN groups. When under a VLAN-aware bridge, the hardware pvid must be synchronized to the bridge port pvid. To do this correctly, the pattern is unfortunately a bit complicated, and involves hooking the pvid change logic into quite a few places (the ones that change the input variables which determine the value to use as hardware pvid for a port). See mv88e6xxx_port_commit_pvid(), sja1105_commit_pvid(), ocelot_port_set_pvid() etc. The point is that not all drivers used to do that, especially in older kernels. If a driver is to blindly program a bridge pvid VLAN received from switchdev while it's VLAN-unaware, this might in turn change the hardware pvid used by a VLAN-unaware bridge port, which might result in packet loss depending which other ports have that pvid too (in that same note, it might also go unnoticed). To capture that condition, it is sufficient to take a VLAN-unaware bridge and change the [VLAN-aware] bridge pvid on a single port, to a VID that isn't present on any other port. This shouldn't have absolutely any effect on packet classification or forwarding. However, broken drivers will take the bait, and change their PVID to 3, causing packet loss. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Tested-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20241210233541.1401837-1-vladimir.oltean@nxp.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> .../net/forwarding/bridge_vlan_unaware.sh | 25 +++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 08242719a8af603db54a2a79234a8fe600680105 Author: Chen-Yu Tsai <wenst@chromium.org> Date: Wed Dec 11 13:24:19 2024 +0800 regulator: dt-bindings: mt6315: Drop regulator-compatible property The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It should not have been used for new submissions such as the MT6315. Drop the property from the MT6315 regulator binding and its examples. Fixes: 977fb5b58469 ("regulator: document binding for MT6315 regulator") Fixes: 6d435a94ba5b ("regulator: mt6315: Enforce regulator-compatible, not name") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20241211052427.4178367-2-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org> Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml | 6 ------ 1 file changed, 6 deletions(-) commit c3a2a2cfac52219d4f0491de6e72f6f00dc7c9ff Merge: 96b6fcc0ee41 a857c841e7ea Author: Paolo Abeni <pabeni@redhat.com> Date: Thu Dec 12 12:06:35 2024 +0100 Merge branch 'ionic-minor-code-updates' Shannon Nelson says: ==================== ionic: minor code updates These are a few updates to the ionic driver, mostly for handling newer/faster QSFP connectors. ==================== Link: https://patch.msgid.link/20241210183045.67878-1-shannon.nelson@amd.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> commit a857c841e7ea0f8ac18bcd3944e2e32cfd82efed Author: Shannon Nelson <shannon.nelson@amd.com> Date: Tue Dec 10 10:30:45 2024 -0800 ionic: add support for QSFP_PLUS_CMIS Teach the driver to recognize and decode the sfp pid SFF8024_ID_QSFP_PLUS_CMIS correctly. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 1 + 1 file changed, 1 insertion(+) commit a8b05dd3389f313b2ba858165a6ded53c274e5fd Author: Shannon Nelson <shannon.nelson@amd.com> Date: Tue Dec 10 10:30:44 2024 -0800 ionic: add speed defines for 200G and 400G Add higher speed defines to the ionic_if.h API and decode them in the ethtool get_link_ksettings callback. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> .../net/ethernet/pensando/ionic/ionic_ethtool.c | 39 ++++++++++++++++++++++ drivers/net/ethernet/pensando/ionic/ionic_if.h | 16 ++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) commit 7c372bac12b2003a44aa333773001c83bcb07d09 Author: Brett Creeley <brett.creeley@amd.com> Date: Tue Dec 10 10:30:43 2024 -0800 ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP Instead of reporting -EINVAL when IONIC_RC_ENOSUPP is returned use the -EOPNOTSUPP value. This aligns better since the FW only returns IONIC_RC_ENOSUPP when operations aren't supported not when invalid values are used. Signed-off-by: Brett Creeley <brett.creeley@amd.com> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/ethernet/pensando/ionic/ionic_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 33ce1d41c133b053ccea5ac4aaaab260d42706b3 Author: Brett Creeley <brett.creeley@amd.com> Date: Tue Dec 10 10:30:42 2024 -0800 ionic: Use VLAN_ETH_HLEN when possible Replace when ETH_HLEN and VLAN_HLEN are used together with VLAN_ETH_HLEN since it's the same value and uses 1 define instead of 2. Signed-off-by: Brett Creeley <brett.creeley@amd.com> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4aa567b1df8b88e3d49a1896b0d4467d5bec6c89 Author: Shannon Nelson <shannon.nelson@amd.com> Date: Tue Dec 10 10:30:41 2024 -0800 ionic: add asic codes to firmware interface file Now that the firmware has learned how to properly report the asic type id, add the values to our interface file. The sharp-eyed reviewers will catch that the CAPRI value changed here from 0 to 1. This comes with the FW actually defining it correctly. This is safe for us to change as nothing actually uses that value yet. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/ethernet/pensando/ionic/ionic.h | 2 -- drivers/net/ethernet/pensando/ionic/ionic_if.h | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) commit 0f9a4f02a878dc330d2654eaecb3698aa4ff4fcb Author: Zhengqiao Xia <xiazhengqiao@huaqin.corp-partner.google.com> Date: Thu Dec 12 14:20:46 2024 +0800 arm64: dts: mediatek: Modify audio codec name for pmic change `codec` in pmic (in mt8186-corsola.dtsi) to `audio-codec` Signed-off-by: Zhengqiao Xia <xiazhengqiao@huaqin.corp-partner.google.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241212062046.22509-5-xiazhengqiao@huaqin.corp-partner.google.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79ef2aae9fde746217c82a3c659e73fa2583774d Author: Zhengqiao Xia <xiazhengqiao@huaqin.corp-partner.google.com> Date: Thu Dec 12 14:20:45 2024 +0800 arm64: dts: mediatek: Add extcon node for DP bridge Add extcon node for DP bridge to make the display work properly. Signed-off-by: Zhengqiao Xia <xiazhengqiao@huaqin.corp-partner.google.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241212062046.22509-4-xiazhengqiao@huaqin.corp-partner.google.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 5fbe5332623c0b3fe95b940f9a76cb0e09691395 Author: Zhengqiao Xia <xiazhengqiao@huaqin.corp-partner.google.com> Date: Thu Dec 12 14:20:44 2024 +0800 arm64: dts: mediatek: Add MT8186 Chinchou Chromebooks MT8186 chinchou, known as ASUS Chromebook CZ12 Flip (CZ1204F) and CZ12(CZ1204C), is a MT8186 based laptop. It is based on the "corsola" design.It includes chinchou and chinchou360, including LTE, stylus, touchscreen combinations. Signed-off-by: Zhengqiao Xia <xiazhengqiao@huaqin.corp-partner.google.com> Link: https://lore.kernel.org/r/20241212062046.22509-3-xiazhengqiao@huaqin.corp-partner.google.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/Makefile | 3 + .../dts/mediatek/mt8186-corsola-chinchou-sku0.dts | 18 ++ .../dts/mediatek/mt8186-corsola-chinchou-sku1.dts | 35 +++ .../dts/mediatek/mt8186-corsola-chinchou-sku16.dts | 29 ++ .../boot/dts/mediatek/mt8186-corsola-chinchou.dtsi | 321 +++++++++++++++++++++ 5 files changed, 406 insertions(+) commit d49df8e014ee48fe81078c9c24c6b7c2b9c21c27 Author: Zhengqiao Xia <xiazhengqiao@huaqin.corp-partner.google.com> Date: Thu Dec 12 14:20:43 2024 +0800 dt-bindings: arm: mediatek: Add MT8186 Chinchou Chromebook Add an entry for the MT8186 based Chinchou Chromebook, also known as the ASUS Chromebook CZ12 Flip (CZ1204F) and CZ12(CZ1204C). Signed-off-by: Zhengqiao Xia <xiazhengqiao@huaqin.corp-partner.google.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241212062046.22509-2-xiazhengqiao@huaqin.corp-partner.google.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> .../devicetree/bindings/arm/mediatek.yaml | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit a2836d3fe220220ff8c495ca9722f89cea8a67e7 Author: Chen Ni <nichen@iscas.ac.cn> Date: Tue May 21 17:10:42 2024 +0800 media: lmedm04: Handle errors for lme2510_int_read Add check for the return value of usb_pipe_endpoint() and usb_submit_urb() in order to catch the errors. Fixes: 15e1ce33182d ("[media] lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in interrupt urb") Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://lore.kernel.org/r/20240521091042.1769684-1-nichen@iscas.ac.cn Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> drivers/media/usb/dvb-usb-v2/lmedm04.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit faf6ef673787956ec4d33ac8bf56f8ea929abf37 Author: Tony Luck <tony.luck@intel.com> Date: Fri Dec 6 08:31:48 2024 -0800 x86/resctrl: Document the new "mba_MBps_event" file Add a section to document a new read/write file that shows/sets the memory bandwidth event used to control bandwidth used by each CTRL_MON group. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Tested-by: Babu Moger <babu.moger@amd.com> Link: https://lore.kernel.org/r/20241206163148.83828-9-tony.luck@intel.com Documentation/arch/x86/resctrl.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 8e931105acae688ff0fc8f875a6c05e5aed8ab79 Author: Tony Luck <tony.luck@intel.com> Date: Fri Dec 6 08:31:47 2024 -0800 x86/resctrl: Add write option to "mba_MBps_event" file The "mba_MBps" mount option provides an alternate method to control memory bandwidth. Instead of specifying allowable bandwidth as a percentage of maximum possible, the user provides a MiB/s limit value. There is a file in each CTRL_MON group directory that shows the event currently in use. Allow writing that file to choose a different event. A user can choose any of the memory bandwidth monitoring events listed in /sys/fs/resctrl/info/L3_mon/mon_features independently for each CTRL_MON group by writing to each of the "mba_MBps_event" files. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Tested-by: Babu Moger <babu.moger@amd.com> Link: https://lore.kernel.org/r/20241206163148.83828-8-tony.luck@intel.com arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 40 +++++++++++++++++++++++++++++++ arch/x86/kernel/cpu/resctrl/internal.h | 2 ++ arch/x86/kernel/cpu/resctrl/rdtgroup.c | 3 ++- 3 files changed, 44 insertions(+), 1 deletion(-) commit f5cd0e316f14d79c9eb0cf8fe7e60cee3a657aa8 Author: Tony Luck <tony.luck@intel.com> Date: Fri Dec 6 08:31:46 2024 -0800 x86/resctrl: Add "mba_MBps_event" file to CTRL_MON directories The "mba_MBps" mount option provides an alternate method to control memory bandwidth. Instead of specifying allowable bandwidth as a percentage of maximum possible, the user provides a MiB/s limit value. In preparation to allow the user to pick the memory bandwidth monitoring event used as input to the feedback loop, provide a file in each CTRL_MON group directory that shows the event currently in use. Note that this file is only visible when the "mba_MBps" mount option is in use. Suggested-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Tested-by: Babu Moger <babu.moger@amd.com> Link: https://lore.kernel.org/r/20241206163148.83828-7-tony.luck@intel.com arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 30 ++++++++++++++++++++++++++++++ arch/x86/kernel/cpu/resctrl/internal.h | 2 ++ arch/x86/kernel/cpu/resctrl/rdtgroup.c | 10 ++++++++++ 3 files changed, 42 insertions(+) commit bc0e01b53614d3d6bb80c7b97ab26a609ba394e9 Author: Jocelyn Falempe <jfalempe@redhat.com> Date: Thu Dec 12 10:11:29 2024 +0100 drm/client: Fix drm client endless Kconfig loop if DRM_CLIENT_SELECTION is enabled, and none of the client is, the "Default DRM Client" choice is empty, and this makes Kconfig goes into an infinite loop of: Default DRM Client choice[1-0?]: 0 Default DRM Client choice[1-0?]: 0 Default DRM Client choice[1-0?]: 0 .... So only allow the choice if at least one of the client is selected. Fixes: f7b42442c4ac ("drm/log: Introduce a new boot logger to draw the kmsg on the screen") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/dri-devel/20241204160014.1171469-1-jfalempe@redhat.com/T/#md78853bba8904fd7614073f280f721d13ab0b432 Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Tested-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Simona Vetter <simona.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20241212091153.1592096-1-jfalempe@redhat.com drivers/gpu/drm/clients/Kconfig | 1 + 1 file changed, 1 insertion(+) commit b8457716eeee45ed5cb6b8fdc5a5b459f7ebe819 Author: Nícolas F. R. A. Prado <nfraprado@collabora.com> Date: Tue Dec 10 17:54:29 2024 -0300 arm64: dts: mediatek: mt8390-genio-700-evk: Add sound output support Describe all the components to get sound output working on the two audio jacks, Earphone and Speaker, present on the Genio 700 EVK board with the audio DSP enabled. Co-developed-by: Aary Patil <aary.patil@mediatek.com> Signed-off-by: Aary Patil <aary.patil@mediatek.com> Co-developed-by: Suhrid Subramaniam <suhrid.subramaniam@mediatek.com> Signed-off-by: Suhrid Subramaniam <suhrid.subramaniam@mediatek.com> Co-developed-by: parkeryang <Parker.Yang@mediatek.com> Signed-off-by: parkeryang <Parker.Yang@mediatek.com> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241210-genio700-audio-output-v2-2-c50886ae0be2@collabora.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> .../boot/dts/mediatek/mt8390-genio-700-evk.dts | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 9bc8353be720ca1f9cb6e03825929bc172e1157d Author: Nícolas F. R. A. Prado <nfraprado@collabora.com> Date: Tue Dec 10 17:54:28 2024 -0300 arm64: dts: mt6359: Add #sound-dai-cells property MT6359 provides digital audio interfaces. Add a #sound-dai-cells property for it to allow pointing to it from dai-link nodes. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://lore.kernel.org/r/20241210-genio700-audio-output-v2-1-c50886ae0be2@collabora.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt6359.dtsi | 1 + 1 file changed, 1 insertion(+) commit 9545ba142865b9099d43c972b9ebcf463606499a Author: Chen-Yu Tsai <wenst@chromium.org> Date: Tue Dec 10 17:26:13 2024 +0800 arm64: dts: mediatek: mt8173-evb: Fix MT6397 PMIC sub-node names The MT6397 PMIC bindings specify exact names for its sub-nodes. The names used in the current dts don't match, causing a validation error. Fix up the names. Also drop the label for the regulators node, since any reference should be against the individual regulator sub-nodes. Fixes: 16ea61fc5614 ("arm64: dts: mt8173-evb: Add PMIC support") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://lore.kernel.org/r/20241210092614.3951748-2-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit beb06b727194f68b0a4b5183e50c88265ce185af Author: Chen-Yu Tsai <wenst@chromium.org> Date: Tue Dec 10 17:26:12 2024 +0800 arm64: dts: mediatek: mt8173-elm: Fix MT6397 PMIC sub-node names The MT6397 PMIC bindings specify exact names for its sub-nodes. The names used in the current dts don't match, causing a validation error. Fix up the names. Also drop the label for the regulators node, since any reference should be against the individual regulator sub-nodes. Fixes: 689b937bedde ("arm64: dts: mediatek: add mt8173 elm and hana board") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://lore.kernel.org/r/20241210092614.3951748-1-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b99bf07c2c8b3c85c1935ddca2a73bc686f8d847 Author: Chen-Yu Tsai <wenst@chromium.org> Date: Wed Dec 11 13:24:26 2024 +0800 arm64: dts: mediatek: mt8395-genio-1200-evk: Drop regulator-compatible property The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It should not have been used for new submissions such as the MT6315. Drop the "regulator-compatible" property from the board dts. The property values are the same as the node name, so everything should continue to work. Fixes: f2b543a191b6 ("arm64: dts: mediatek: add device-tree for Genio 1200 EVK board") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241211052427.4178367-9-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8395-genio-1200-evk.dts | 2 -- 1 file changed, 2 deletions(-) commit ab60442f26b15ba69b210974722a851ed03188ff Author: Chen-Yu Tsai <wenst@chromium.org> Date: Wed Dec 11 13:24:25 2024 +0800 arm64: dts: medaitek: mt8395-nio-12l: Drop regulator-compatible property The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It should not have been used for new submissions such as the MT6315. Drop the "regulator-compatible" property from the board dts. The property values are the same as the node name, so everything should continue to work. Fixes: 96564b1e2ea4 ("arm64: dts: mediatek: Introduce the MT8395 Radxa NIO 12L board") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241211052427.4178367-8-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts | 2 -- 1 file changed, 2 deletions(-) commit 2a8af9b95f504260a6d8200a11f0ae5c90e9f787 Author: Chen-Yu Tsai <wenst@chromium.org> Date: Wed Dec 11 13:24:24 2024 +0800 arm64: dts: mediatek: mt8195-demo: Drop regulator-compatible property The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It is also not listed in the MT6360 regulator and charger bindings. Drop the "regulator-compatible" property from the board dts. The MT6360 bindings actually require the lowercase name, so with the property present the regulators were likely not actually working. Fixes: 6147314aeedc ("arm64: dts: mediatek: Add device-tree for MT8195 Demo board") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241211052427.4178367-7-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 9 --------- 1 file changed, 9 deletions(-) commit 4dbaa5d5def2c49e44efaa5e796c23d9b904be09 Author: Chen-Yu Tsai <wenst@chromium.org> Date: Wed Dec 11 13:24:23 2024 +0800 arm64: dts: mediatek: mt8195-cherry: Drop regulator-compatible property The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It should not have been used for new submissions such as the MT6315. Drop the "regulator-compatible" property from the board dts. The property values are the same as the node name, so everything should continue to work. Fixes: 260c04d425eb ("arm64: dts: mediatek: cherry: Enable MT6315 regulators on SPMI bus") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241211052427.4178367-6-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 2 -- 1 file changed, 2 deletions(-) commit d1fb968551c8688652b8b817bb081fdc9c25cd48 Author: Chen-Yu Tsai <wenst@chromium.org> Date: Wed Dec 11 13:24:22 2024 +0800 arm64: dts: mediatek: mt8192-asurada: Drop regulator-compatible property The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It should not have been used for new submissions such as the MT6315. Drop the "regulator-compatible" property from the board dts. The property values are the same as the node name, so everything should continue to work. Fixes: 3183cb62b033 ("arm64: dts: mediatek: asurada: Add SPMI regulators") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241211052427.4178367-5-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 3 --- 1 file changed, 3 deletions(-) commit 4b907b3ea5fba240808136cc5599d14b52230b39 Author: Chen-Yu Tsai <wenst@chromium.org> Date: Wed Dec 11 13:24:21 2024 +0800 arm64: dts: mediatek: mt8173-elm: Drop regulator-compatible property The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It is also not listed in the MT6397 regulator bindings. Having them present produces a whole bunch of validation errors: Unevaluated properties are not allowed ('regulator-compatible' was unexpected) Drop the "regulator-compatible" property from the board dts. The property values are the same as the node name, so everything should continue to work. Fixes: 689b937bedde ("arm64: dts: mediatek: add mt8173 elm and hana board") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241211052427.4178367-4-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 23 ----------------------- 1 file changed, 23 deletions(-) commit a6d5983e40f5d5b219337569cdd269727f5a3e2e Author: Chen-Yu Tsai <wenst@chromium.org> Date: Wed Dec 11 13:24:20 2024 +0800 arm64: dts: mediatek: mt8173-evb: Drop regulator-compatible property The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It is also not listed in the MT6397 regulator bindings. Having them present produces a whole bunch of validation errors: Unevaluated properties are not allowed ('regulator-compatible' was unexpected) Drop the "regulator-compatible" property from the board dts. The property values are the same as the node name, so everything should continue to work. Fixes: 16ea61fc5614 ("arm64: dts: mt8173-evb: Add PMIC support") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241211052427.4178367-3-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 23 ----------------------- 1 file changed, 23 deletions(-) commit 8ade5e05bd094485ce370fad66a6a3fb6f50bfbc Author: Jiri Kosina <jikos@kernel.org> Date: Thu Dec 12 10:19:32 2024 +0100 HID: multitouch: fix support for Goodix PID 0x01e9 Commit c8000deb68365b ("HID: multitouch: Add support for GT7868Q") added support for 0x01e8 and 0x01e9, but the mt_device[] entries were added twice for 0x01e8 and there was none added for 0x01e9. Fix that. Fixes: c8000deb68365b ("HID: multitouch: Add support for GT7868Q") Reported-by: He Lugang <helugang@uniontech.com> Reported-by: WangYuli <wangyuli@uniontech.com> Reported-by: Ulrich Müller <ulm@gentoo.org> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-multitouch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d6f83df8ff2d5de84b50377e4f0d45e25311c7a Author: Kuan-Wei Chiu <visitorckw@gmail.com> Date: Sat Sep 28 19:36:08 2024 +0800 printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX Shifting 1 << 31 on a 32-bit int causes signed integer overflow, which leads to undefined behavior. To prevent this, cast 1 to u32 before performing the shift, ensuring well-defined behavior. This change explicitly avoids any potential overflow by ensuring that the shift occurs on an unsigned 32-bit integer. Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Acked-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20240928113608.1438087-1-visitorckw@gmail.com Signed-off-by: Petr Mladek <pmladek@suse.com> kernel/printk/printk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d88ba86ba6f35a0467f25a88c38aa5639190d04 Author: Jiri Kosina <jikos@kernel.org> Date: Thu Dec 12 09:53:10 2024 +0100 Revert "HID: multitouch: Add support for lenovo Y9000P Touchpad" This reverts commit 251efae73bd46b097deec4f9986d926813aed744. Quoting Wang Yuli: "The 27C6:01E0 touchpad doesn't require the workaround and applying it would actually break functionality. The initial report came from a BBS forum, but we suspect the information provided by the forum user may be incorrect which could happen sometimes. [1] Further investigation showed that the Lenovo Y9000P 2024 doesn't even use a Goodix touchpad. [2] For the broader issue of 27c6:01e0 being unusable on some devices, it just need to address it with a libinput quirk. In conclusion, we should revert this commit, which is the best solution." Reported-by: Ulrich Müller <ulm@gentoo.org> Reported-by: WangYuli <wangyuli@uniontech.com> Link: https://lore.kernel.org/all/uikt4wwpw@gentoo.org/ Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-ids.h | 1 - drivers/hid/hid-multitouch.c | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) commit a7f5b36b34824415c28875d615c49a3cf5070615 Author: Suresh Vankadara <quic_svankada@quicinc.com> Date: Sat Dec 7 00:48:58 2024 +0530 media: qcom: camss: Add support for camss driver on sc7280 Add support for the camss driver on the sc7280 soc. Signed-off-by: Suresh Vankadara <quic_svankada@quicinc.com> Signed-off-by: Trishansh Bhardwaj <quic_tbhardwa@quicinc.com> Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Tested-by: Luca Weiss <luca.weiss@fairphone.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../platform/qcom/camss/camss-csiphy-3ph-1-0.c | 5 + drivers/media/platform/qcom/camss/camss-csiphy.c | 5 + drivers/media/platform/qcom/camss/camss-csiphy.h | 1 + drivers/media/platform/qcom/camss/camss-vfe.c | 2 + drivers/media/platform/qcom/camss/camss.c | 319 +++++++++++++++++++++ drivers/media/platform/qcom/camss/camss.h | 1 + 6 files changed, 333 insertions(+) commit 3522673b8f291cd8ae40c03c8fe4ac07e68b3398 Author: Vikram Sharma <quic_vikramsa@quicinc.com> Date: Sat Dec 7 00:48:57 2024 +0530 media: qcom: camss: Sort camss version enums and compatible strings Sort CAMSS version enums and compatible strings alphanumerically. Signed-off-by: Suresh Vankadara <quic_svankada@quicinc.com> Signed-off-by: Trishansh Bhardwaj <quic_tbhardwa@quicinc.com> Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c | 10 +++++----- drivers/media/platform/qcom/camss/camss-vfe.c | 6 +++--- drivers/media/platform/qcom/camss/camss.c | 2 +- drivers/media/platform/qcom/camss/camss.h | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) commit 5593555343f3ec299ca28d46a478e718c1119f74 Author: Vikram Sharma <quic_vikramsa@quicinc.com> Date: Sat Dec 7 00:48:56 2024 +0530 media: dt-bindings: Add qcom,sc7280-camss Add bindings for qcom,sc7280-camss to support the camera subsystem on the SC7280 platform. Signed-off-by: Suresh Vankadara <quic_svankada@quicinc.com> Signed-off-by: Trishansh Bhardwaj <quic_tbhardwa@quicinc.com> Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../bindings/media/qcom,sc7280-camss.yaml | 425 +++++++++++++++++++++ 1 file changed, 425 insertions(+) commit a831920c370c5b93901350154c6e4324b797b57b Author: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> Date: Thu Nov 21 13:27:26 2024 +0200 drm/i915/xe3: Use hw support for min/interim ddb allocations for async flip Xe3 is capable of switching automatically to min ddb allocation (not using any extra blocks) or interim SAGV-adjusted allocation in case if async flip is used. Introduce the minimum and interim ddb allocation configuration for that purpose. Also i915 is replaced with intel_display within the patch's context v2: update min/interim ddb declarations and handling (Ville) update to register definitions styling consolidation of minimal wm0 check with min DDB check Bspec: 69880, 72053 Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241121112726.510220-4-vinod.govindapillai@intel.com drivers/gpu/drm/i915/display/intel_display_types.h | 8 ++ drivers/gpu/drm/i915/display/skl_universal_plane.c | 26 +++++++ .../drm/i915/display/skl_universal_plane_regs.h | 15 ++++ drivers/gpu/drm/i915/display/skl_watermark.c | 87 +++++++++++++++++----- 4 files changed, 118 insertions(+), 18 deletions(-) commit aac49b862a855e170620f023fbca370fac763e33 Author: Vinod Govindapillai <vinod.govindapillai@intel.com> Date: Thu Nov 21 13:27:25 2024 +0200 drm/i915/display: add a gelper to relative data rate handling Add a helper to the relative data rate handling in skl_watermarks.c where other similar functions are implemented. Also get rid of use_min_ddb() and use use_minimal_wm0() instead to decide whether the relative data rate can be returned as 0 v2: re-phrase the commit description (uma) Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241121112726.510220-3-vinod.govindapillai@intel.com drivers/gpu/drm/i915/display/intel_atomic_plane.c | 27 +++++------------------ drivers/gpu/drm/i915/display/skl_watermark.c | 16 ++++++++++++++ drivers/gpu/drm/i915/display/skl_watermark.h | 4 ++++ 3 files changed, 26 insertions(+), 21 deletions(-) commit 7947f4c4f6e91e9b42c9d5954da5fbe543d70aea Author: Vinod Govindapillai <vinod.govindapillai@intel.com> Date: Thu Nov 21 13:27:24 2024 +0200 drm/i915/display: update to plane_wm register access function Future platforms can have new additions in the plane_wm registers. So update skl_wm_level_from_reg_val() to have possiblity for such platform differentiations. This is in preparation for the rest of the patches in this series where hw support for the minimum and interim ddb allocations for async flip is added. Replace all the i915 uses to intel_display in this function while updating this function Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241121112726.510220-2-vinod.govindapillai@intel.com drivers/gpu/drm/i915/display/skl_watermark.c | 32 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit c861cac950fb6cf7b1b3a438cf717fdee4352df6 Author: Mukesh Ojha <quic_mojha@quicinc.com> Date: Wed Dec 11 13:36:11 2024 -0800 stop_machine: Fix rcu_momentary_eqs() call in multi_cpu_stop() The multi_cpu_stop() contains a loop that can initially be executed with interrupts enabled (in the MULTI_STOP_NONE and MULTI_STOP_PREPARE states). Interrupts are guaranteed to be once the MULTI_STOP_DISABLE_IRQ state is reached. Unfortunately, the rcu_momentary_eqs() function that is currently invoked on each pass through this loop requires that interrupts be disabled. This commit therefore moves this call to rcu_momentary_eqs() to the body of the "else if (curstate > MULTI_STOP_PREPARE)" portion of the loop, thus guaranteeing that interrupts will be disabled on each call, as required. Kudos to 朱恺乾 (Kaiqian) for noting that this had not made it to mainline. [ paulmck: Update from rcu_momentary_dyntick_idle() to rcu_momentary_eqs(). ] Link: https://lore.kernel.org/all/1712649736-27058-1-git-send-email-quic_mojha@quicinc.com/ Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> kernel/stop_machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e4a19e2bd371068b0f25190356615cab4ca2f1f Author: Rik van Riel <riel@surriel.com> Date: Mon Dec 9 12:44:11 2024 -0500 locking/csd-lock: make CSD lock debug tunables writable in /sys Currently the CSD lock tunables can only be set at boot time in the kernel commandline, but the way these variables are used means there is really no reason not to tune them at runtime through /sys. Make the CSD lock debug tunables tunable through /sys. Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> kernel/smp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e9f826b0459f1376b9c8beba019b84f9878419c6 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Thu Aug 22 18:48:15 2024 +0200 soc: qcom: pmic_glink: simplify locking with guard() Simplify error handling over locks with guard(). In few places this elimiates error gotos and local variables. Switch to guard() everywhere (except when jumps would go over scoped guard) for consistency, even if it does not bring benefit in such places. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240822164815.230167-2-krzysztof.kozlowski@linaro.org [bjorn: Rebased ontop of v6.13-rc1] Signed-off-by: Bjorn Andersson <andersson@kernel.org> drivers/soc/qcom/pmic_glink.c | 70 ++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 41 deletions(-) commit 96b6fcc0ee41114fdd2c75661d155d878a945ed3 Merge: 3fa2540d93d8 88325a291a0c Author: Jakub Kicinski <kuba@kernel.org> Date: Wed Dec 11 20:29:41 2024 -0800 Merge branch 'net-dsa-cleanup-eee-part-1' Russell King says: ==================== net: dsa: cleanup EEE (part 1) First part of DSA EEE cleanups. Patch 1 removes a useless test that is always false. dp->pl will always be set for user ports, so !dp->pl in the EEE methods will always be false. Patch 2 adds support for a new DSA support_eee() method, which tells DSA whether the DSA driver supports EEE, and thus whether the ethtool set_eee() and get_eee() methods should return -EOPNOTSUPP. Patch 3 adds a trivial implementation for this new method which indicates that EEE is supported. Patches 4..8 adds implementations for .supports_eee() to all drivers that support EEE in some form. Patch 9 switches the core DSA code to require a .supports_eee() implementation if DSA is supported. Any DSA driver that doesn't implement this method after this patch will not support the ethtool EEE methods. Part 2 will remove the (now) useless .get_mac_eee() DSA operation. ==================== Link: https://patch.msgid.link/Z1hNkEb13FMuDQiY@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 88325a291a0cd077bf49b889af605e683b5f956e Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 10 14:18:52 2024 +0000 net: dsa: require .support_eee() method to be implemented Now that we have updated all drivers, switch DSA to require an implementation of the .support_eee() method for EEE to be usable, rather than defaulting to being permissive when not implemented. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/E1tL14e-006cZy-AT@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/dsa/user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 801fd546c1cad69a00cef0a300e9f293d8e50432 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 10 14:18:47 2024 +0000 net: dsa: ksz: implement .support_eee() method Implement the .support_eee() method by reusing the ksz_validate_eee() method as a template, renaming the function, changing the return type and values, and removing it from the ksz_set_mac_eee() and ksz_get_mac_eee() methods. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/E1tL14Z-006cZs-6o@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/microchip/ksz_common.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit eb3126e720e7629474332417dae256d471727865 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 10 14:18:42 2024 +0000 net: dsa: mv88e6xxx: implement .support_eee() method Implement the .support_eee() method by using the generic helper as all user ports support EEE. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/E1tL14U-006cZm-2K@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/mv88e6xxx/chip.c | 1 + 1 file changed, 1 insertion(+) commit fe3ef44385b217c49fd1bfcab3c221d34174e1b4 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 10 14:18:36 2024 +0000 net: dsa: qca8k: implement .support_eee() method Implement the .support_eee() method by using the generic helper as all user ports support EEE. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/E1tL14O-006cZg-VM@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/qca/qca8k-8xxx.c | 1 + 1 file changed, 1 insertion(+) commit 7eb4f3d9fe173d71b9f9fad7e426e528fcb59b74 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 10 14:18:31 2024 +0000 net: dsa: mt753x: implement .support_eee() method Implement the .support_eee() method by using the generic helper as all user ports support EEE. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/E1tL14J-006cZa-Rh@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/mt7530.c | 1 + 1 file changed, 1 insertion(+) commit c86692fc2cb77d94dd8c166c2b9017f196d02a84 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 10 14:18:26 2024 +0000 net: dsa: b53/bcm_sf2: implement .support_eee() method Implement the .support_eee() method to indicate that EEE is not supported by two switch variants, rather than making these checks in the .set_mac_eee() and .get_mac_eee() methods. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/E1tL14E-006cZU-Nc@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/b53/b53_common.c | 13 +++++++------ drivers/net/dsa/b53/b53_priv.h | 1 + drivers/net/dsa/bcm_sf2.c | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) commit 99379f587278c818777cb4778e2c79c6c1440c65 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 10 14:18:21 2024 +0000 net: dsa: provide implementation of .support_eee() Provide a trivial implementation for the .support_eee() method which switch drivers can use to simply indicate that they support EEE on all their user ports. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/E1tL149-006cZJ-JJ@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/dsa.h | 1 + net/dsa/port.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) commit 9723a77318b7c0cfd06ea207e52a042f8c815318 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 10 14:18:16 2024 +0000 net: dsa: add hook to determine whether EEE is supported Add a hook to determine whether the switch supports EEE. This will return false if the switch does not, or true if it does. If the method is not implemented, we assume (currently) that the switch supports EEE. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/E1tL144-006cZD-El@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/dsa.h | 1 + net/dsa/user.c | 8 ++++++++ 2 files changed, 9 insertions(+) commit 66c366392e55ae07e37699eeacca50f01b0bb879 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 10 14:18:11 2024 +0000 net: dsa: remove check for dp->pl in EEE methods When user ports are initialised, a phylink instance is always created, and so dp->pl will always be non-NULL. The EEE methods are only used for user ports, so checking for dp->pl to be NULL makes no sense. No other phylink-calling method implements similar checks in DSA. Remove this unnecessary check. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/E1tL13z-006cZ7-BZ@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/dsa/user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3fa2540d93d85ad18456dbd29386c737ad3f7e02 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 10 12:38:26 2024 +0000 net: fec: use phydev->eee_cfg.tx_lpi_timer Rather than maintaining a private copy of the LPI timer, make use of the LPI timer maintained by phylib. In any case, phylib overwrites the value of tx_lpi_timer set by the driver in phy_ethtool_get_eee(). Note that feb->eee.tx_lpi_timer is initialised to zero, which is just the same with phylib's copy, so there should be no functional change. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Wei Fang <wei.fang@nxp.com> Link: https://patch.msgid.link/E1tKzVS-006c67-IJ@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/freescale/fec.h | 2 -- drivers/net/ethernet/freescale/fec_main.c | 16 ++++++---------- 2 files changed, 6 insertions(+), 12 deletions(-) commit 175dd9079ecbd86d0e10927c442d64519baf5809 Author: Ido Schimmel <idosch@nvidia.com> Date: Tue Dec 10 10:45:37 2024 +0100 mlxsw: spectrum_flower: Do not allow mixing sample and mirror actions The device does not support multiple mirror actions per rule and the driver rejects such configuration: # tc filter add dev swp1 ingress pref 1 proto ip flower skip_sw action mirred egress mirror dev swp2 action mirred egress mirror dev swp3 Error: mlxsw_spectrum: Multiple mirror actions per rule are not supported. We have an error talking to the kernel Internally, the sample action is implemented by the device by mirroring to the CPU port. Therefore, mixing sample and mirror actions in a single rule does not work correctly and results in the last action effect. Solve by rejecting such misconfiguration: # tc filter add dev swp1 ingress pref 1 proto ip flower skip_sw action mirred egress mirror dev swp2 action sample rate 100 group 1 Error: mlxsw_spectrum: Sample action after mirror action is not supported. We have an error talking to the kernel # tc filter add dev swp1 ingress pref 1 proto ip flower skip_sw action sample rate 100 group 1 action mirred egress mirror dev swp2 Error: mlxsw_spectrum: Mirror action after sample action is not supported. We have an error talking to the kernel Reported-by: Vladyslav Mykhaliuk <vmykhaliuk@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Amit Cohen <amcohen@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Link: https://patch.msgid.link/d6c979914e8706dbe1dedbaf29ffffb0b8d71166.1733822570.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 154dee7c3265bb8c1e9e87ee63dd195497155854 Merge: 148328b59d4b ca6a6f93867a Author: Jakub Kicinski <kuba@kernel.org> Date: Wed Dec 11 20:17:38 2024 -0800 Merge branch 'make-time-wait-reuse-delay-deterministic-and-configurable' Jakub Sitnicki says: ==================== Make TIME-WAIT reuse delay deterministic and configurable This patch set is an effort to enable faster reuse of TIME-WAIT sockets. We have recently talked about the motivation and the idea at Plumbers [1]. Experiment in production ------------------------ We are restarting our experiment on a small set of production nodes as the code has slightly changed since v1 [2], and there are still a few weeks of development window to soak the changes. We will report back if we observe any regressions. Packetdrill tests ----------------- The packetdrill tests for TIME-WAIT reuse [3] did not change since v1. Although we are not touching PAWS code any more, I would still like to add tests to cover PAWS reject after TW reuse. This, however, requires patching packetdrill as I mentioned in the last cover letter [2]. [1] https://lpc.events/event/18/contributions/1962/ [2] https://lore.kernel.org/r/20241113-jakub-krn-909-poc-msec-tw-tstamp-v2-0-b0a335247304@cloudflare.com [3] https://github.com/google/packetdrill/pull/90 v1: https://lore.kernel.org/20241204-jakub-krn-909-poc-msec-tw-tstamp-v1-0-8b54467a0f34@cloudflare.com RFCv2: https://lore.kernel.org/20241113-jakub-krn-909-poc-msec-tw-tstamp-v2-0-b0a335247304@cloudflare.com RFCv1: https://lore.kernel.org/20240819-jakub-krn-909-poc-msec-tw-tstamp-v1-1-6567b5006fbe@cloudflare.com ==================== Link: https://patch.msgid.link/20241209-jakub-krn-909-poc-msec-tw-tstamp-v2-0-66aca0eed03e@cloudflare.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit ca6a6f93867a9763bdf8685c788e2e558d10975f Author: Jakub Sitnicki <jakub@cloudflare.com> Date: Mon Dec 9 20:38:04 2024 +0100 tcp: Add sysctl to configure TIME-WAIT reuse delay Today we have a hardcoded delay of 1 sec before a TIME-WAIT socket can be reused by reopening a connection. This is a safe choice based on an assumption that the other TCP timestamp clock frequency, which is unknown to us, may be as low as 1 Hz (RFC 7323, section 5.4). However, this means that in the presence of short lived connections with an RTT of couple of milliseconds, the time during which a 4-tuple is blocked from reuse can be orders of magnitude longer that the connection lifetime. Combined with a reduced pool of ephemeral ports, when using IP_LOCAL_PORT_RANGE to share an egress IP address between hosts [1], the long TIME-WAIT reuse delay can lead to port exhaustion, where all available 4-tuples are tied up in TIME-WAIT state. Turn the reuse delay into a per-netns setting so that sysadmins can make more aggressive assumptions about remote TCP timestamp clock frequency and shorten the delay in order to allow connections to reincarnate faster. Note that applications can completely bypass the TIME-WAIT delay protection already today by locking the local port with bind() before connecting. Such immediate connection reuse may result in PAWS failing to detect old duplicate segments, leaving us with just the sequence number check as a safety net. This new configurable offers a trade off where the sysadmin can balance between the risk of PAWS detection failing to act versus exhausting ports by having sockets tied up in TIME-WAIT state for too long. [1] https://lpc.events/event/16/contributions/1349/ Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Jason Xing <kerneljasonxing@gmail.com> Link: https://patch.msgid.link/20241209-jakub-krn-909-poc-msec-tw-tstamp-v2-2-66aca0eed03e@cloudflare.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Documentation/networking/ip-sysctl.rst | 14 ++++++++++++++ .../networking/net_cachelines/netns_ipv4_sysctl.rst | 1 + include/net/netns/ipv4.h | 1 + net/ipv4/sysctl_net_ipv4.c | 10 ++++++++++ net/ipv4/tcp_ipv4.c | 4 +++- 5 files changed, 29 insertions(+), 1 deletion(-) commit 19ce8cd3046587efbd2c6253947be7c22dfccc18 Author: Jakub Sitnicki <jakub@cloudflare.com> Date: Mon Dec 9 20:38:03 2024 +0100 tcp: Measure TIME-WAIT reuse delay with millisecond precision Prepare ground for TIME-WAIT socket reuse with subsecond delay. Today the last TS.Recent update timestamp, recorded in seconds and stored tp->ts_recent_stamp and tw->tw_ts_recent_stamp fields, has two purposes. Firstly, it is used to track the age of the last recorded TS.Recent value to detect when that value becomes outdated due to potential wrap-around of the other TCP timestamp clock (RFC 7323, section 5.5). For this purpose a second-based timestamp is completely sufficient as even in the worst case scenario of a peer using a high resolution microsecond timestamp, the wrap-around interval is ~36 minutes long. Secondly, it serves as a threshold value for allowing TIME-WAIT socket reuse. A TIME-WAIT socket can be reused only once the virtual 1 Hz clock, ktime_get_seconds, is past the TS.Recent update timestamp. The purpose behind delaying the TIME-WAIT socket reuse is to wait for the other TCP timestamp clock to tick at least once before reusing the connection. It is only then that the PAWS mechanism for the reopened connection can detect old duplicate segments from the previous connection incarnation (RFC 7323, appendix B.2). In this case using a timestamp with second resolution not only blocks the way toward allowing faster TIME-WAIT reuse after shorter subsecond delay, but also makes it impossible to reliably delay TW reuse by one second. As Eric Dumazet has pointed out [1], due to timestamp rounding, the TW reuse delay will actually be between (0, 1] seconds, and 0.5 seconds on average. We delay TW reuse for one full second only when last TS.Recent update coincides with our virtual 1 Hz clock tick. Considering the above, introduce a dedicated field to store a millisecond timestamp of transition into the TIME-WAIT state. Place it in an existing 4-byte hole inside inet_timewait_sock structure to avoid an additional memory cost. Use the new timestamp to (i) reliably delay TIME-WAIT reuse by one second, and (ii) prepare for configurable subsecond reuse delay in the subsequent change. We assume here that a full one second delay was the original intention in [2] because it accounts for the worst case scenario of the other TCP using the slowest recommended 1 Hz timestamp clock. A more involved alternative would be to change the resolution of the last TS.Recent update timestamp, tw->tw_ts_recent_stamp, to milliseconds. [1] https://lore.kernel.org/netdev/CANn89iKB4GFd8sVzCbRttqw_96o3i2wDhX-3DraQtsceNGYwug@mail.gmail.com/ [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b8439924316d5bcb266d165b93d632a4b4b859af Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Jason Xing <kerneljasonxing@gmail.com> Link: https://patch.msgid.link/20241209-jakub-krn-909-poc-msec-tw-tstamp-v2-1-66aca0eed03e@cloudflare.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/inet_timewait_sock.h | 4 ++++ net/ipv4/tcp_ipv4.c | 5 +++-- net/ipv4/tcp_minisocks.c | 7 ++++++- 3 files changed, 13 insertions(+), 3 deletions(-) commit 148328b59d4b37690b6a06a2e8a0a3f22b7c4aa8 Merge: 91a91aacc519 00bf2032e976 Author: Jakub Kicinski <kuba@kernel.org> Date: Wed Dec 11 20:15:30 2024 -0800 Merge branch 'ipv6-mcast-add-data-race-annotations' Eric Dumazet says: ==================== ipv6: mcast: add data-race annotations ipv6_chk_mcast_addr() and igmp6_mcf_seq_show() are reading fields under RCU. Add missing annotations. ==================== Link: https://patch.msgid.link/20241210183352.86530-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 00bf2032e97691c4b53427b33a85b134324e2a94 Author: Eric Dumazet <edumazet@google.com> Date: Tue Dec 10 18:33:52 2024 +0000 ipv6: mcast: annotate data-race around psf->sf_count[MCAST_XXX] psf->sf_count[MCAST_XXX] fields are read locklessly from ipv6_chk_mcast_addr() and igmp6_mcf_seq_show(). Add READ_ONCE() and WRITE_ONCE() annotations accordingly. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://patch.msgid.link/20241210183352.86530-4-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/ipv6/mcast.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 626962911ad886f2b8e6d6f612289f9c7268b435 Author: Eric Dumazet <edumazet@google.com> Date: Tue Dec 10 18:33:51 2024 +0000 ipv6: mcast: annotate data-races around mc->mca_sfcount[MCAST_EXCLUDE] mc->mca_sfcount[MCAST_EXCLUDE] is read locklessly from ipv6_chk_mcast_addr(). Add READ_ONCE() and WRITE_ONCE() annotations accordingly. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://patch.msgid.link/20241210183352.86530-3-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/ipv6/mcast.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit d51cfd5f4fe01cd3d212703c8fe5dd6886da969c Author: Eric Dumazet <edumazet@google.com> Date: Tue Dec 10 18:33:50 2024 +0000 ipv6: mcast: reduce ipv6_chk_mcast_addr() indentation Add a label and two gotos to shorten lines by two tabulations, to ease code review of following patches. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://patch.msgid.link/20241210183352.86530-2-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/ipv6/mcast.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit 91a91aacc5195982229265b02a021e670b3a034a Merge: ae7837bb3d9d 39be64c34ca3 Author: Jakub Kicinski <kuba@kernel.org> Date: Wed Dec 11 20:13:29 2024 -0800 Merge branch 'lib-packing-introduce-and-use-un-pack_fields' Jacob Keller says: ==================== lib: packing: introduce and use (un)pack_fields This series improves the packing library with a new API for packing or unpacking a large number of fields at once with minimal code footprint. The API is then used to replace bespoke packing logic in the ice driver, preparing it to handle unpacking in the future. Finally, the ice driver has a few other cleanups related to the packing logic. The pack_fields and unpack_fields functions have the following improvements over the existing pack() and unpack() API: 1. Packing or unpacking a large number of fields takes significantly less code. This significantly reduces the .text size for an increase in the .data size which is much smaller. 2. The unpacked data can be stored in sizes smaller than u64 variables. This reduces the storage requirement both for runtime data structures, and for the rodata defining the fields. This scales with the number of fields used. 3. Most of the error checking is done at compile time, rather than runtime, via CHECK_PACKED_FIELD macros. The actual packing and unpacking code still uses the u64 size variables. However, these are converted to the appropriate field sizes when storing or reading the data from the buffer. This version now uses significantly improved macro checks, thanks to the work of Vladimir. We now only need 300 lines of macro for the generated checks. In addition, each new check only requires 4 lines of code for its macro implementation and 1 extra line in the CHECK_PACKED_FIELDS macro. This is significantly better than previous versions which required ~2700 lines. The CHECK_PACKED_FIELDS macro uses __builtin_choose_expr to select the appropriately sized CHECK_PACKED_FIELDS_N macro. This enables directly adding CHECK_PACKED_FIELDS calls into the pack_fields and unpack_fields macros. Drivers no longer need to call the CHECK_PACKED_FIELDS_N macros directly, and we do not need to modify Kbuild or introduce multiple CONFIG options. The code for the CHECK_PACKED_FIELDS_(0..50) and CHECK_PACKED_FIELDS itself can be generated from the C program in scripts/gen_packed_field_checks.c. This little C program may be used in the future to update the checks to more sizes if a driver with more than 50 fields appears in the future. The total amount of required code is now much smaller, and we don't anticipate needing to increase the size very often. Thus, it makes sense to simply commit the result directly instead of attempting to modify Kbuild to automatically generate it. This version uses the 5-argument format of pack_fields and unpack_fields, with the size of the packed buffer passed as one of the arguments. We do enforce that the compiler can tell its a constant using __builtin_constant_p(), ensuring that the size checks are handled at compile time. We could reduce these to 4 arguments and require that the passed in pbuf be of a type which has the appropriate size. I opted against that because it makes the API less flexible and a bit less natural to use in existing code. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> v9: https://lore.kernel.org/20241204-packing-pack-fields-and-ice-implementation-v9-0-81c8f2bd7323@intel.com v8: https://lore.kernel.org/20241203-packing-pack-fields-and-ice-implementation-v8-0-2ed68edfe583@intel.com v7: https://lore.kernel.org/20241202-packing-pack-fields-and-ice-implementation-v7-0-ed22e38e6c65@intel.com v6: https://lore.kernel.org/20241118-packing-pack-fields-and-ice-implementation-v6-0-6af8b658a6c3@intel.com v5: https://lore.kernel.org/20241111-packing-pack-fields-and-ice-implementation-v5-0-80c07349e6b7@intel.com v4: https://lore.kernel.org/20241108-packing-pack-fields-and-ice-implementation-v4-0-81a9f42c30e5@intel.com v3: https://lore.kernel.org/20241107-packing-pack-fields-and-ice-implementation-v3-0-27c566ac2436@intel.com v2: https://lore.kernel.org/20241025-packing-pack-fields-and-ice-implementation-v2-0-734776c88e40@intel.com v1: https://lore.kernel.org/20241011-packing-pack-fields-and-ice-implementation-v1-0-d9b1f7500740@intel.com ==================== Link: https://patch.msgid.link/20241210-packing-pack-fields-and-ice-implementation-v10-0-ee56a47479ac@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 39be64c34ca303094d11a23fc9b36e73e3adb9dc Author: Jacob Keller <jacob.e.keller@intel.com> Date: Tue Dec 10 12:27:19 2024 -0800 ice: cleanup Rx queue context programming functions The ice_copy_rxq_ctx_to_hw() and ice_write_rxq_ctx() functions perform some defensive checks which are typically frowned upon by kernel style guidelines. In particular, NULL checks on buffers which point to the stack are discouraged, especially when the functions are static and only called once. Checks of this sort only serve to hide potential programming error, as we will not produce the normal crash dump on a NULL access. In addition, ice_copy_rxq_ctx_to_hw() cannot fail in another way, so could be made void. Future support for VF Live Migration will need to introduce an inverse function for reading Rx queue context from HW registers to unpack it, as well as functions to pack and unpack Tx queue context from HW. Rather than copying these style issues into the new functions, lets first cleanup the existing code. For the ice_copy_rxq_ctx_to_hw() function: * Move the Rx queue index check out of this function. * Convert the function to a void return. * Use a simple int variable instead of a u8 for the for loop index, and initialize it inside the for loop. * Update the function description to better align with kernel doc style. For the ice_write_rxq_ctx() function: * Move the Rx queue index check into this function. * Update the function description with a Returns: to align with kernel doc style. These changes align the existing write functions to current kernel style, and will align with the style of the new functions added when we implement live migration in a future series. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20241210-packing-pack-fields-and-ice-implementation-v10-10-ee56a47479ac@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/ice/ice_common.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit ac001acc4d353455dd9f7b8e74d2f9c01e83ace2 Author: Jacob Keller <jacob.e.keller@intel.com> Date: Tue Dec 10 12:27:18 2024 -0800 ice: move prefetch enable to ice_setup_rx_ctx The ice_write_rxq_ctx() function is responsible for programming the Rx Queue context into hardware. It receives the configuration in unpacked form via the ice_rlan_ctx structure. This function unconditionally modifies the context to set the prefetch enable bit. This was done by commit c31a5c25bb19 ("ice: Always set prefena when configuring an Rx queue"). Setting this bit makes sense, since prefetching descriptors is almost always the preferred behavior. However, the ice_write_rxq_ctx() function is not the place that actually defines the queue context. We initialize the Rx Queue context in ice_setup_rx_ctx(). It is surprising to have the Rx queue context changed by a function who's responsibility is to program the given context to hardware. Following the principle of least surprise, move the setting of the prefetch enable bit out of ice_write_rxq_ctx() and into the ice_setup_rx_ctx(). Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20241210-packing-pack-fields-and-ice-implementation-v10-9-ee56a47479ac@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/ice/ice_base.c | 3 +++ drivers/net/ethernet/intel/ice/ice_common.c | 9 +++------ 2 files changed, 6 insertions(+), 6 deletions(-) commit f72588a4267b2211d18328433035b629d24f6f03 Author: Jacob Keller <jacob.e.keller@intel.com> Date: Tue Dec 10 12:27:17 2024 -0800 ice: reduce size of queue context fields The ice_rlan_ctx and ice_tlan_ctx structures have some fields which are intentionally sized larger than necessary relative to the packed sizes the data must fit into. This was done because the original ice_set_ctx() function and its helpers did not correctly handle packing when the packed bits straddled a byte. This is no longer the case with the use of the <linux/packing.h> implementation. Save some bytes in these structures by sizing the variables to the number of bytes the actual bitpacked fields fit into. There are a couple of gaps left in the structure, which is a result of the fields being in the order they appear in the packed bit layout, but where alignment forces some extra gaps. We could fix this, saving ~8 bytes from each structure. However, these structures are not used heavily, and the resulting savings is minimal: $ bloat-o-meter ice-before-reorder.ko ice-after-reorder.ko add/remove: 0/0 grow/shrink: 1/1 up/down: 26/-70 (-44) Function old new delta ice_vsi_cfg_txq 1873 1899 +26 ice_setup_rx_ctx.constprop 1529 1459 -70 Total: Before=1459555, After=1459511, chg -0.00% Thus, the fields are left in the same order as the packed bit layout, despite the gaps this causes. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20241210-packing-pack-fields-and-ice-implementation-v10-8-ee56a47479ac@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | 32 ++++++++------------------ 1 file changed, 10 insertions(+), 22 deletions(-) commit dc4305be467a6f84f66005cfc58557d56b5ab107 Author: Jacob Keller <jacob.e.keller@intel.com> Date: Tue Dec 10 12:27:16 2024 -0800 ice: use <linux/packing.h> for Tx and Rx queue context data The ice driver needs to write the Tx and Rx queue context when programming Tx and Rx queues. This is currently done using some bespoke custom logic via the ice_set_ctx() and its helper functions, along with bit position definitions in the ice_tlan_ctx_info and ice_rlan_ctx_info structures. This logic does work, but is problematic for several reasons: 1) ice_set_ctx requires a helper function for each byte size being packed, as it uses a separate function to pack u8, u16, u32, and u64 fields. This requires 4 functions which contain near-duplicate logic with the types changed out. 2) The logic in the ice_pack_ctx_word, ice_pack_ctx_dword, and ice_pack_ctx_qword does not handle values which straddle alignment boundaries very well. This requires that several fields in the ice_tlan_ctx_info and ice_rlan_ctx_info be a size larger than their bit size should require. 3) Future support for live migration will require adding unpacking functions to take the packed hardware context and unpack it into the ice_rlan_ctx and ice_tlan_ctx structures. Implementing this would require implementing ice_get_ctx, and its associated helper functions, which essentially doubles the amount of code required. The Linux kernel has had a packing library that can handle this logic since commit 554aae35007e ("lib: Add support for generic packing operations"). The library was recently extended with support for packing or unpacking an array of fields, with a similar structure as the ice_ctx_ele structure. Replace the ice-specific ice_set_ctx() logic with the recently added pack_fields and packed_field_s infrastructure from <linux/packing.h> For API simplicity, the Tx and Rx queue context are programmed using separate ice_pack_txq_ctx() and ice_pack_rxq_ctx(). This avoids needing to export the packed_field_s arrays. The functions can pointers to the appropriate ice_txq_ctx_buf_t and ice_rxq_ctx_buf_t types, ensuring that only buffers of the appropriate size are passed. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20241210-packing-pack-fields-and-ice-implementation-v10-7-ee56a47479ac@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/Kconfig | 1 + drivers/net/ethernet/intel/ice/ice_base.c | 3 +- drivers/net/ethernet/intel/ice/ice_common.c | 243 ++++--------------------- drivers/net/ethernet/intel/ice/ice_common.h | 5 +- drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | 14 -- 5 files changed, 42 insertions(+), 224 deletions(-) commit efe39d8b4b9d8175fd7c3610da4c8fa663154a1e Author: Jacob Keller <jacob.e.keller@intel.com> Date: Tue Dec 10 12:27:15 2024 -0800 ice: use structures to keep track of queue context size The ice Tx and Rx queue context are currently stored as arrays of bytes with defined size (ICE_RXQ_CTX_SZ and ICE_TXQ_CTX_SZ). The packed queue context is often passed to other functions as a simple u8 * pointer, which does not allow tracking the size. This makes the queue context API easy to misuse, as you can pass an arbitrary u8 array or pointer. Introduce wrapper typedefs which use a __packed structure that has the proper fixed size for the Tx and Rx context buffers. This enables the compiler to track the size of the value and ensures that passing the wrong buffer size will be detected by the compiler. The existing APIs do not benefit much from this change, however the wrapping structures will be used to simplify the arguments of new packing functions based on the recently introduced pack_fields API. Co-developed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20241210-packing-pack-fields-and-ice-implementation-v10-6-ee56a47479ac@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 11 +++++++++-- drivers/net/ethernet/intel/ice/ice_base.c | 2 +- drivers/net/ethernet/intel/ice/ice_common.c | 24 +++++++++++------------- drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | 2 -- 4 files changed, 21 insertions(+), 18 deletions(-) commit aeeaa9f891737cadbb0832c2b552f3dca3b04675 Author: Jacob Keller <jacob.e.keller@intel.com> Date: Tue Dec 10 12:27:14 2024 -0800 ice: remove int_q_state from ice_tlan_ctx The int_q_state field of the ice_tlan_ctx structure represents the internal queue state. However, we never actually need to assign this or read this during normal operation. In fact, trying to unpack it would not be possible as it is larger than a u64. Remove this field from the ice_tlan_ctx structure, and remove its packing field from the ice_tlan_ctx_info array. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20241210-packing-pack-fields-and-ice-implementation-v10-5-ee56a47479ac@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/intel/ice/ice_common.c | 1 - drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | 1 - 2 files changed, 2 deletions(-) commit a9ad2a8dfb436c55607c8038aa926f55a6d6ca8e Author: Jacob Keller <jacob.e.keller@intel.com> Date: Tue Dec 10 12:27:13 2024 -0800 lib: packing: document recently added APIs Extend the documentation for the packing library, covering the intended use for the recently added APIs. This includes the pack() and unpack() macros, as well as the pack_fields() and unpack_fields() macros. Add a note that the packing() API is now deprecated in favor of pack() and unpack(). For the pack_fields() and unpack_fields() APIs, explain the rationale for when a driver may want to select this API. Provide an example which shows how to define the fields and call the pack_fields() and unpack_fields() macros. Co-developed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20241210-packing-pack-fields-and-ice-implementation-v10-4-ee56a47479ac@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Documentation/core-api/packing.rst | 118 +++++++++++++++++++++++++++++++++++-- 1 file changed, 113 insertions(+), 5 deletions(-) commit 41d7ea30494cc0dde3e124a75ce0add93f988ba9 Author: Vladimir Oltean <vladimir.oltean@nxp.com> Date: Tue Dec 10 12:27:12 2024 -0800 lib: packing: add pack_fields() and unpack_fields() This is new API which caters to the following requirements: - Pack or unpack a large number of fields to/from a buffer with a small code footprint. The current alternative is to open-code a large number of calls to pack() and unpack(), or to use packing() to reduce that number to half. But packing() is not const-correct. - Use unpacked numbers stored in variables smaller than u64. This reduces the rodata footprint of the stored field arrays. - Perform error checking at compile time, rather than runtime, and return void from the API functions. Because the C preprocessor can't generate variable length code (loops), this is a bit tricky to do with macros. To handle this, implement macros which sanity check the packed field definitions based on their size. Finally, a single macro with a chain of __builtin_choose_expr() is used to select the appropriate macros. We enforce the use of ascending or descending order to avoid O(N^2) scaling when checking for overlap. Note that the macros are written with care to ensure that the compilers can correctly evaluate the resulting code at compile time. In particular, care was taken with avoiding too many nested statement expressions. Nested statement expressions trip up some compilers, especially when passing down variables created in previous statement expressions. There are two key design choices intended to keep the overall macro code size small. First, the definition of each CHECK_PACKED_FIELDS_N macro is implemented recursively, by calling the N-1 macro. This avoids needing the code to repeat multiple times. Second, the CHECK_PACKED_FIELD macro enforces that the fields in the array are sorted in order. This allows checking for overlap only with neighboring fields, rather than the general overlap case where each field would need to be checked against other fields. The overlap checks use the first two fields to determine the order of the remaining fields, thus allowing either ascending or descending order. This enables drivers the flexibility to keep the fields ordered in which ever order most naturally fits their hardware design and its associated documentation. The CHECK_PACKED_FIELDS macro is directly called from within pack_fields and unpack_fields, ensuring that all drivers using the API receive the benefits of the compile-time checks. Users do not need to directly call any of the macros directly. The CHECK_PACKED_FIELDS and its helper macros CHECK_PACKED_FIELDS_(0..50) are generated using a simple C program in scripts/gen_packed_field_checks.c This program can be compiled on demand and executed to generate the macro code in include/linux/packing.h. This will aid in the event that a driver needs more than 50 fields. The generator can be updated with a new size, and used to update the packing.h header file. In practice, the ice driver will need to support 27 fields, and the sja1105 driver will need to support 0 fields. This on-demand generation avoids the need to modify Kbuild. We do not anticipate the maximum number of fields to grow very often. - Reduced rodata footprint for the storage of the packed field arrays. To that end, we have struct packed_field_u8 and packed_field_u16, which define the fields with the associated type. More can be added as needed (unlikely for now). On these types, the same generic pack_fields() and unpack_fields() API can be used, thanks to the new C11 _Generic() selection feature, which can call pack_fields_u8() or pack_fields_16(), depending on the type of the "fields" array - a simplistic form of polymorphism. It is evaluated at compile time which function will actually be called. Over time, packing() is expected to be completely replaced either with pack() or with pack_fields(). Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Co-developed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20241210-packing-pack-fields-and-ice-implementation-v10-3-ee56a47479ac@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> MAINTAINERS | 1 + Makefile | 4 + include/linux/packing.h | 425 ++++++++++++++++++++++++++++++++++++++ lib/packing.c | 153 ++++++++++++++ lib/packing_test.c | 61 ++++++ scripts/.gitignore | 1 + scripts/Makefile | 2 +- scripts/gen_packed_field_checks.c | 37 ++++ 8 files changed, 683 insertions(+), 1 deletion(-) commit 48c2752785ad1730e08a64507f05d0e5d5bc79b8 Author: Vladimir Oltean <vladimir.oltean@nxp.com> Date: Tue Dec 10 12:27:11 2024 -0800 lib: packing: demote truncation error in pack() to a warning in __pack() Most of the sanity checks in pack() and unpack() can be covered at compile time. There is only one exception, and that is truncation of the uval during a pack() operation. We'd like the error-less __pack() to catch that condition as well. But at the same time, it is currently the responsibility of consumer drivers (currently just sja1105) to print anything at all when this error occurs, and then discard the return code. We can just print a loud warning in the library code and continue with the truncated __pack() operation. In practice, having the warning is very important, see commit 24deec6b9e4a ("net: dsa: sja1105: disallow C45 transactions on the BASE-TX MDIO bus") where the bug was caught exactly by noticing this print. Add the first print to the packing library, and at the same time remove the print for the same condition from the sja1105 driver, to avoid double printing. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20241210-packing-pack-fields-and-ice-implementation-v10-2-ee56a47479ac@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/sja1105/sja1105_static_config.c | 8 ++------ lib/packing.c | 26 ++++++++++--------------- 2 files changed, 12 insertions(+), 22 deletions(-) commit c4117091d029087abde76e6947d43dca8f1db20b Author: Vladimir Oltean <vladimir.oltean@nxp.com> Date: Tue Dec 10 12:27:10 2024 -0800 lib: packing: create __pack() and __unpack() variants without error checking A future variant of the API, which works on arrays of packed_field structures, will make most of these checks redundant. The idea will be that we want to perform sanity checks at compile time, not once for every function call. Introduce new variants of pack() and unpack(), which elide the sanity checks, assuming that the input was pre-sanitized. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20241210-packing-pack-fields-and-ice-implementation-v10-1-ee56a47479ac@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> lib/packing.c | 142 ++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 78 insertions(+), 64 deletions(-) commit ae7837bb3d9d0bad1230353bbafb92b3e6ad3941 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 11 00:58:02 2024 +0000 isdn: Remove unused get_Bprotocol4id() get_Bprotocol4id() was added in 2008 in commit 1b2b03f8e514 ("Add mISDN core files") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20241211005802.258279-1-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/isdn/mISDN/core.c | 14 -------------- drivers/isdn/mISDN/core.h | 1 - 2 files changed, 15 deletions(-) commit b82ca90d5512b07be2b9ee28d0e9a775bc23e3e9 Author: Bharat Bhushan <bbhushan2@marvell.com> Date: Wed Dec 11 11:54:19 2024 +0530 cn10k-ipsec: Fix compilation error when CONFIG_XFRM_OFFLOAD disabled Define static branch variable "cn10k_ipsec_sa_enabled" in "otx2_txrx.c". This fixes below compilation error when CONFIG_XFRM_OFFLOAD is disabled. drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.o:(__jump_table+0x8): undefined reference to `cn10k_ipsec_sa_enabled' drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.o:(__jump_table+0x18): undefined reference to `cn10k_ipsec_sa_enabled' drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.o:(__jump_table+0x28): undefined reference to `cn10k_ipsec_sa_enabled' Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412110505.ZKDzGRMv-lkp@intel.com/ Fixes: 6a77a158848a ("cn10k-ipsec: Process outbound ipsec crypto offload") Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com> Link: https://patch.msgid.link/20241211062419.2587111-1-bbhushan2@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c | 2 -- drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit 67571036635b8136a53b615c6bb57021d982d7da Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 11 00:19:27 2024 +0000 gve: Remove unused gve_adminq_set_mtu The last use of gve_adminq_set_mtu() was removed by commit 37149e9374bf ("gve: Implement packet continuation for RX.") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com> Link: https://patch.msgid.link/20241211001927.253161-1-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/google/gve/gve_adminq.c | 14 -------------- drivers/net/ethernet/google/gve/gve_adminq.h | 1 - 2 files changed, 15 deletions(-) commit f87e4f2434430b0f750fbdff4fd0601807571bb2 Author: Easwar Hariharan <eahariha@linux.microsoft.com> Date: Tue Dec 10 22:56:53 2024 +0000 nfp: 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: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan <eahariha@linux.microsoft.com> Reviewed-by: Louis Peens <louis.peens@corigine.com> Link: https://patch.msgid.link/20241210-converge-secs-to-jiffies-v3-20-59479891e658@linux.microsoft.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d40c5a698de6ba629f2abc8dd43b8a2db469307 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Sat Aug 17 11:46:05 2024 +0200 dt-bindings: clock: qcom,sc7280-lpasscorecc: 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 reg, clocks and clock-names. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20240817094605.27185-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../devicetree/bindings/clock/qcom,sc7280-lpasscorecc.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 2a5711c7dc6f20e132f99b13731952bdb3530acf Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Sat Aug 17 11:46:04 2024 +0200 dt-bindings: clock: qcom,sc7280-lpasscorecc: order properties to match convention By convention we expect first "compatible", then "reg" and then rest. Order properties to match convention and what is in "required:" block. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20240817094605.27185-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../bindings/clock/qcom,sc7280-lpasscorecc.yaml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 09489812013f9ff3850c3af9900c88012b8c1e5d Author: Ping-Ke Shih <pkshih@realtek.com> Date: Mon Dec 9 12:21:27 2024 +0800 wifi: rtw89: phy: add dummy C2H event handler for report of TAS power The newer firmware, lik RTL8852C version 0.27.111.0, will notify driver report of TAS (Time Averaged SAR) power by new C2H events. This is to assist in higher accurate calculation of TAS. For now, driver doesn't use the report yet, so add a dummy handler to avoid it throws info like: rtw89_8852ce 0000:03:00.0: c2h class 9 func 6 not support Also add "MAC" and "PHY" to the message to disambiguate the source of C2H event. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241209042127.21424-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/mac.c | 4 ++-- drivers/net/wireless/realtek/rtw89/phy.c | 10 ++++++++-- drivers/net/wireless/realtek/rtw89/phy.h | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) commit 5fdf5e557f06213ef5134d31770c29e77de205cd Author: Ping-Ke Shih <pkshih@realtek.com> Date: Mon Dec 9 12:20:20 2024 +0800 wifi: rtw89: 8851b: rfk: remove unnecessary assignment of return value of _dpk_dgain_read() The return value of _dpk_dgain_read() is not used afterward, so remove it safely. Addresses-Coverity-ID: 1504753 ("Unused value") Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241209042020.21290-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6c10a19363787ffdffe08049b9e0b71c101d401 Author: Ping-Ke Shih <pkshih@realtek.com> Date: Mon Dec 9 12:20:19 2024 +0800 wifi: rtw89: 8852c: rfk: refine target channel calculation in _rx_dck_channel_calc() The channel is not possibly 0, so original code is fine. Still want to avoid Coverity warning, so ensure -32 offset for the channel number which is larger than 125 only. Actually, don't change logic at all. Addresses-Coverity-ID: 1628150 ("Overflowed constant") Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241209042020.21290-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b59b86c5d08be7d761c04affcbcec8184738c200 Author: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Date: Fri Dec 6 14:37:13 2024 -0300 wifi: rtlwifi: pci: wait for firmware loading before releasing memory At probe error path, the firmware loading work may have already been queued. In such a case, it will try to access memory allocated by the probe function, which is about to be released. In such paths, wait for the firmware worker to finish before releasing memory. Fixes: 3d86b93064c7 ("rtlwifi: Fix PCI probe error path orphaned memory") Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241206173713.3222187-5-cascardo@igalia.com drivers/net/wireless/realtek/rtlwifi/pci.c | 1 + 1 file changed, 1 insertion(+) commit e7ceefbfd8d447abc8aca8ab993a942803522c06 Author: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Date: Fri Dec 6 14:37:12 2024 -0300 wifi: rtlwifi: fix memory leaks and invalid access at probe error path Deinitialize at reverse order when probe fails. When init_sw_vars fails, rtl_deinit_core should not be called, specially now that it destroys the rtl_wq workqueue. And call rtl_pci_deinit and deinit_sw_vars, otherwise, memory will be leaked. Remove pci_set_drvdata call as it will already be cleaned up by the core driver code and could lead to memory leaks too. cf. commit 8d450935ae7f ("wireless: rtlwifi: remove unnecessary pci_set_drvdata()") and commit 3d86b93064c7 ("rtlwifi: Fix PCI probe error path orphaned memory"). Fixes: 0c8173385e54 ("rtl8192ce: Add new driver") Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241206173713.3222187-4-cascardo@igalia.com drivers/net/wireless/realtek/rtlwifi/pci.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit d8ece6fc3694657e4886191b32ca1690af11adda Author: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Date: Fri Dec 6 14:37:11 2024 -0300 wifi: rtlwifi: destroy workqueue at rtl_deinit_core rtl_wq is allocated at rtl_init_core, so it makes more sense to destroy it at rtl_deinit_core. In the case of USB, where _rtl_usb_init does not require anything to be undone, that is fine. But for PCI, rtl_pci_init, which is called after rtl_init_core, needs to deallocate data, but only if it has been called. That means that destroying the workqueue needs to be done whether rtl_pci_init has been called or not. And since rtl_pci_deinit was doing it, it has to be moved out of there. It makes more sense to move it to rtl_deinit_core and have it done in both cases, USB and PCI. Since this is a requirement for a followup memory leak fix, mark this as fixing such memory leak. Fixes: 0c8173385e54 ("rtl8192ce: Add new driver") Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241206173713.3222187-3-cascardo@igalia.com drivers/net/wireless/realtek/rtlwifi/base.c | 6 ++++++ drivers/net/wireless/realtek/rtlwifi/pci.c | 2 -- drivers/net/wireless/realtek/rtlwifi/usb.c | 5 ----- 3 files changed, 6 insertions(+), 7 deletions(-) commit 2fdac64c3c35858aa8ac5caa70b232e03456e120 Author: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Date: Fri Dec 6 14:37:10 2024 -0300 wifi: rtlwifi: remove unused check_buddy_priv Commit 2461c7d60f9f ("rtlwifi: Update header file") introduced a global list of private data structures. Later on, commit 26634c4b1868 ("rtlwifi Modify existing bits to match vendor version 2013.02.07") started adding the private data to that list at probe time and added a hook, check_buddy_priv to find the private data from a similar device. However, that function was never used. Besides, though there is a lock for that list, it is never used. And when the probe fails, the private data is never removed from the list. This would cause a second probe to access freed memory. Remove the unused hook, structures and members, which will prevent the potential race condition on the list and its corruption during a second probe when probe fails. Fixes: 26634c4b1868 ("rtlwifi Modify existing bits to match vendor version 2013.02.07") Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241206173713.3222187-2-cascardo@igalia.com drivers/net/wireless/realtek/rtlwifi/base.c | 7 ----- drivers/net/wireless/realtek/rtlwifi/base.h | 1 - drivers/net/wireless/realtek/rtlwifi/pci.c | 44 ----------------------------- drivers/net/wireless/realtek/rtlwifi/wifi.h | 12 -------- 4 files changed, 64 deletions(-) commit 9ae817c779df50710218e65593ca8105aa27ff91 Author: Chih-Kang Chang <gary.chang@realtek.com> Date: Fri Dec 6 13:57:16 2024 +0800 wifi: rtw89: 8922a: update format of RFK pre-notify H2C command v2 The RFK pre-notify H2C command is to tell firmware the channels driver is using. Since the format is changed after 0.35.49.0, update it accordingly. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241206055716.18598-8-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 1 + drivers/net/wireless/realtek/rtw89/fw.c | 33 ++++++++++++++++++++++--------- drivers/net/wireless/realtek/rtw89/fw.h | 7 ++++++- 3 files changed, 31 insertions(+), 10 deletions(-) commit a2854ac3383032310db381b2cfda5b164d8585ec Author: Zong-Zhe Yang <kevin_yang@realtek.com> Date: Fri Dec 6 13:57:15 2024 +0800 wifi: rtw89: regd: update regulatory map to R68-R51 Sync Realtek Channel Plan R68 and Realtek Regulatory R51. Configure 6 GHz field of Realtek regd for the following countries. BO, DO, EG, LS, MZ, NG, OM, ZW, PK, PH, TH, KM, CG, CD, GE, GI, GU, LR, MH, FM, MP, PW, MF, SX, SZ, TZ, VI Besides, add entries for the following countries. CU, SY, SD Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241206055716.18598-7-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/regd.c | 57 ++++++++++++++++--------------- 1 file changed, 30 insertions(+), 27 deletions(-) commit 9ddc6ee0b215783252fdab234661ece8c32e2c61 Author: Kuan-Chung Chen <damon.chen@realtek.com> Date: Fri Dec 6 13:57:14 2024 +0800 wifi: rtw89: 8852c: disable ER SU when 4x HE-LTF and 0.8 GI capability differ Since hardware only has single one register for HE-LTF setting, to prevent interoperability issues, 8852CE disables ER SU when the AP can handle SU/MU with 4x HE-LTF and 0.8 GI, but does not support ER SU with the same settings. Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241206055716.18598-6-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 24 +++++++++++++++++++----- drivers/net/wireless/realtek/rtw89/core.h | 10 ++++++++++ 2 files changed, 29 insertions(+), 5 deletions(-) commit f0441c540fe808570c275a5700adc42b2cfd914b Author: Kuan-Chung Chen <damon.chen@realtek.com> Date: Fri Dec 6 13:57:13 2024 +0800 wifi: rtw89: disable firmware training HE GI and LTF Given the performance trade-off associated with firmware training HE GI/LTF, especially in high attenuation environments, we have decided to utilize a constant value instead. Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241206055716.18598-5-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 10 ++++++++++ drivers/net/wireless/realtek/rtw89/phy.c | 24 ++++++++++++++++-------- 2 files changed, 26 insertions(+), 8 deletions(-) commit 5b4ca804792a3128ee56ac74a390358fabba6fa3 Author: Eric Huang <echuang@realtek.com> Date: Fri Dec 6 13:57:12 2024 +0800 wifi: rtw89: ps: update data for firmware and settings for hardware before/after PS For MLO supported IC, send H2C command to firmware before PS with link information for each PHY for MLO to work properly. And re-init hardware settings regarding to RX descriptor information after PS. Signed-off-by: Eric Huang <echuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241206055716.18598-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 2 + drivers/net/wireless/realtek/rtw89/core.h | 2 + drivers/net/wireless/realtek/rtw89/fw.c | 82 +++++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/fw.h | 18 +++++++ drivers/net/wireless/realtek/rtw89/phy.c | 6 +++ drivers/net/wireless/realtek/rtw89/phy.h | 1 + drivers/net/wireless/realtek/rtw89/ps.c | 8 ++- 7 files changed, 118 insertions(+), 1 deletion(-) commit 8c86036693a3c7e24008734f01109f14807e7347 Author: Ping-Ke Shih <pkshih@realtek.com> Date: Fri Dec 6 13:57:11 2024 +0800 wifi: rtw89: ps: refactor channel info to firmware before entering PS In PS mode, firmware needs hardware parameters related to channel info to configure hardware itself. Before entering PS, driver prepares these info to firmware via firmware H2C command. Since firmware only consider PS for single one vif, change the argument of entry function to rtwvif, and only consider first link for this old H2C command that only support legacy. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241206055716.18598-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/fw.c | 35 +++++++++++++++++++++++++-------- drivers/net/wireless/realtek/rtw89/fw.h | 3 +-- drivers/net/wireless/realtek/rtw89/ps.c | 3 ++- 3 files changed, 30 insertions(+), 11 deletions(-) commit 1015d61570802c7e0794585934d3bc5e09de743e Author: Ping-Ke Shih <pkshih@realtek.com> Date: Fri Dec 6 13:57:10 2024 +0800 wifi: rtw89: ps: refactor PS flow to support MLO Firmware can only support PS on single one VIF operating in station mode, so argument of PS entry rtw89_enter_lps() should be rtwvif insetad of rtwvif_link. To enter PS under MLO, for each rtwvif, driver sends H2C command to tell firmware which mac_id will enter PS one by one, and afterward asks firmware to enter deep PS. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241206055716.18598-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 26 ++++++++---------------- drivers/net/wireless/realtek/rtw89/ps.c | 33 ++++++++++++++++--------------- drivers/net/wireless/realtek/rtw89/ps.h | 4 ++-- drivers/net/wireless/realtek/rtw89/wow.c | 6 ++---- 4 files changed, 29 insertions(+), 40 deletions(-) commit 0937c6e7113e07a67301b809ec824b032b3821bb Author: Raag Jadav <raag.jadav@intel.com> Date: Wed Dec 11 17:29:52 2024 +0530 drm/i915/dg2: Implement Wa_14022698537 G8 power state entry is disabled due to a limitation on DG2, so we enable it from driver with Wa_14022698537. For now we enable it for all DG2 devices with the exception of a few, for which, we enable only when paired with whitelisted CPU models. This works with native ASPM and reduces idle power consumption. $ echo powersave > /sys/module/pcie_aspm/parameters/policy $ lspci -s 0000:03:00.0 -vvv LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk- v2: Fix Wa_ID and include it in subject (Badal) Rephrase commit message (Jani) v3: Move workaround to i915_pcode_init() (Badal, Anshuman) Re-order macro (Riana) v4: Spell fix (Riana) Signed-off-by: Raag Jadav <raag.jadav@intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Riana Tauro <riana.tauro@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211115952.1659287-5-raag.jadav@intel.com drivers/gpu/drm/i915/i915_driver.c | 15 +++++++++++++++ drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 16 insertions(+) commit d58db10e6c38e64ea23c2911fcbe2008ef9945b9 Author: Raag Jadav <raag.jadav@intel.com> Date: Wed Dec 11 17:29:51 2024 +0530 drm/i915: Introduce intel_cpu_info.c for CPU IDs Having similar naming convention in intel-family.h and intel_device_info.h results in redefinition of a few platforms. Define CPU IDs in its own file to avoid this. v3: Move file out of gt directory, add kernel doc (Riana) Rephrase file description (Jani) Signed-off-by: Raag Jadav <raag.jadav@intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Riana Tauro <riana.tauro@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211115952.1659287-4-raag.jadav@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/intel_cpu_info.c | 44 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_cpu_info.h | 13 +++++++++++ 3 files changed, 58 insertions(+) commit f9a15b968dceab06119524994ed0e84e4df9745b Author: Raag Jadav <raag.jadav@intel.com> Date: Wed Dec 11 17:29:50 2024 +0530 drm/i915/dg2: Introduce DG2_D subplatform Introduce DG2_D subplatform for the devices that span across multiple DG2 subplatforms but are within same segment and will be useful for segment specific features. v3: Rework subplatform naming (Jani) Split subplatform check into separate case (Jani) Signed-off-by: Raag Jadav <raag.jadav@intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211115952.1659287-3-raag.jadav@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_device_info.c | 9 +++++++++ drivers/gpu/drm/i915/intel_device_info.h | 5 ++++- 3 files changed, 15 insertions(+), 1 deletion(-) commit b99dcb91ef551d7134d0d9fc51652f2f79d91224 Author: Raag Jadav <raag.jadav@intel.com> Date: Wed Dec 11 17:29:49 2024 +0530 drm/intel/pciids: Refactor DG2 PCI IDs into segment ranges Refactor DG2 PCI IDs into D, E and M ranges which will be useful for segment specific features. v3: Rework subplatform naming (Jani) Signed-off-by: Raag Jadav <raag.jadav@intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Riana Tauro <riana.tauro@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211115952.1659287-2-raag.jadav@intel.com include/drm/intel/pciids.h | 55 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 13 deletions(-) commit b40fbeb0b1cd72912c41fb18c8b5e4b73ed191c4 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Wed Dec 11 12:24:21 2024 -0300 tools build: Remove the libunwind feature tests from the ones detected when test-all.o builds We have a tools/build/feature/test-all.c that has the most common set of features that perf uses and are expected to have its development files available when building perf. When we made libwunwind opt-in we forgot to remove them from the list of features that are assumed to be available when test-all.c builds, remove them. Before this patch: $ rm -rf /tmp/b ; mkdir /tmp/b ; make -C tools/perf O=/tmp/b feature-dump ; grep feature-libunwind-aarch64= /tmp/b/FEATURE-DUMP feature-libunwind-aarch64=1 $ Even tho this not being test built and those header files being available: $ head -5 tools/build/feature/test-libunwind-aarch64.c // SPDX-License-Identifier: GPL-2.0 #include <libunwind-aarch64.h> #include <stdlib.h> extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, $ After this patch: $ grep feature-libunwind- /tmp/b/FEATURE-DUMP $ Now an audit on what is being enabled when test-all.c builds will be performed. Fixes: 176c9d1e6a06f2fa ("tools features: Don't check for libunwind devel files by default") Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/build/Makefile.feature | 7 ------- 1 file changed, 7 deletions(-) commit 19851fa2ba9824bede16f55234f63d9423897c3d Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Date: Mon Dec 2 22:27:34 2024 +0200 drm/rockchip: dw_hdmi_qp: Simplify clock handling Make use of the recently introduced devm_clk_bulk_get_all_enabled() helper to simplify the code a bit. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241202-dw-hdmi-qp-rk-clk-bulk-v1-1-60a7cc9cd74e@collabora.com drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 28 +++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 9c22b6ece2e5c2308f41ba4bec27cfa158397fa7 Author: Piotr Zalewski <pZ010001011111@proton.me> Date: Fri Dec 6 19:26:10 2024 +0000 drm/rockchip: vop2: don't check color_mgmt_changed in atomic_enable Remove color_mgmt_changed check from vop2_crtc_atomic_try_set_gamma to allow gamma LUT rewrite during modeset when coming out of suspend. Add a check for color_mgmt_changed directly in vop2_crtc_atomic_flush. This patch fixes the patch adding gamma LUT support for vop2 [1]. [1] https://lore.kernel.org/linux-rockchip/20241101185545.559090-3-pZ010001011111@proton.me/ Suggested-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Piotr Zalewski <pZ010001011111@proton.me> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241206192013.342692-3-pZ010001011111@proton.me drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8ddc8dfb8329349d5efb0418c9f20025333e2d98 Author: Guoqing Jiang <guoqing.jiang@canonical.com> Date: Fri Dec 6 19:42:33 2024 +0800 drm/rockchip: Remove unnecessary checking It is not needed since drm_atomic_helper_shutdown checks it. Signed-off-by: Guoqing Jiang <guoqing.jiang@canonical.com> Acked-by: Andy Yan <andyshrk@163.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241206114233.1270989-1-guoqing.jiang@canonical.com drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e70ba4679540a4746ec66450967f01c52d21727c Author: Alex Deucher <alexander.deucher@amd.com> Date: Tue Dec 10 16:30:54 2024 -0500 drm/amdgpu/jpeg5.0.1: use num_jpeg_inst for SR-IOV They should be the same, but use the proper variable. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f53758bc34bf2a64c681f9278dd57738f322d5c3 Author: Alex Deucher <alexander.deucher@amd.com> Date: Tue Dec 10 16:28:20 2024 -0500 drm/amdgpu/jpeg4.0.3: use num_jpeg_inst for SR-IOV They should be the same, but use the proper variable. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b842c852f09844b8d5bdd523254a2ae9c4a1a6f Author: Alex Deucher <alexander.deucher@amd.com> Date: Tue Dec 10 13:45:42 2024 -0500 drm/amdgpu: add sysfs reset mask for vcn 5.0.1 Add the calls to the vcn 5.0.1 code. Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 40253e36e08a65619f85328272ee4eb420711b7e Author: Alex Deucher <alexander.deucher@amd.com> Date: Tue Dec 10 13:37:39 2024 -0500 drm/amdgpu: add ip_dump support for vcn 5.0.1 Shared with vcn 5.0.0. Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 35 ++++++++++++++++++++------------- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.h | 5 +++++ drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 7 +++++++ drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.h | 8 -------- 4 files changed, 33 insertions(+), 22 deletions(-) commit 3f6f237b9dd189e1fb85b8a3f7c97a8f27c1e49a Author: Mario Limonciello <mario.limonciello@amd.com> Date: Tue Dec 10 20:44:14 2024 -0600 drm/amd: Update strapping for NBIO 2.5.0 This helps to avoid a spurious PME event on hotplug to Azalia. Cc: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reported-and-tested-by: ionut_n2001@yahoo.com Closes: https://bugzilla.kernel.org/show_bug.cgi?id=215884 Tested-by: Gabriel Marcano <gabemarcano@yahoo.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Link: https://lore.kernel.org/r/20241211024414.7840-1-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit bcc263dea635e2d3cc96b2abb113843761af15ae Author: Jesse.zhang@amd.com <Jesse.zhang@amd.com> Date: Tue Dec 10 14:01:39 2024 +0800 drm/amdgpu/gfx11: clean up kcq reset code Replace kcq queue reset with existing function amdgpu_mes_reset_legacy_queue. Signed-off-by: Jesse Zhang <jesse.zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) commit 0c0dec8207cfc90d06a1ad600f5b3a86fc7e5c60 Author: Jesse.zhang@amd.com <Jesse.zhang@amd.com> Date: Tue Dec 10 14:00:15 2024 +0800 drm/amdgpu/gfx12: clean up kcq reset code Replace kcq queue reset with existing function amdgpu_mes_reset_legacy_queue. Signed-off-by: Jesse Zhang <jesse.zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 11974b7eac29c073482c7cf377532908f37cb747 Author: Jesse.zhang@amd.com <Jesse.zhang@amd.com> Date: Tue Dec 10 10:27:43 2024 +0800 drm/amdgpu/sdma7: Add queue reset sysfs for sdmav7 sdmv7 queue reset already supports by mmio, add its sys file. Signed-off-by: Jesse Zhang <jesse.zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a73a83241efe58ade2078d16b096ec74d2dc5b48 Author: Jesse.zhang@amd.com <Jesse.zhang@amd.com> Date: Tue Dec 10 09:35:49 2024 +0800 drm/amdgpu/mes12: Implement reset gfx/compute queue function by mmio Reset gfx/compute queue through mmio based on me_id and queue_id. Signed-off-by: Jesse Zhang <jesse.zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v12_0.h | 2 + drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 88 +++++++++++++++++++++++++++++++++- 2 files changed, 89 insertions(+), 1 deletion(-) commit 0f8666138f4f9313b2594b0cef4238ca7bb01b88 Author: Jesse.zhang@amd.com <Jesse.zhang@amd.com> Date: Mon Dec 9 17:23:19 2024 +0800 drm/amdgpu/mes12: Implement reset sdmav7 queue function by mmio Reset sdma queue through mmio based on me_id and queue_id. Signed-off-by: Jesse Zhang <jesse.zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit fccb446f82b9155c05758d1fa30af4a06494e0ec Author: Lijo Lazar <lijo.lazar@amd.com> Date: Mon Dec 9 09:14:53 2024 +0530 drm/amdgpu: Avoid VF for RAS recovery source check VF device sets the RAS flag when mailbox data can't be read properly. There is no conclusive way to tell if the real source is RAS error. Therefore VF schedules a KFD based reset which doesn't set RAS source. SKip checking RAS source for any VF scheduled recovery. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reported-by: Vojislav Tomasevic <vojislav.tomasevic@amd.com> Reviewed-by: Yiqing Yao <yiqing.yao@amd.com> Tested-by: Yiqing Yao <yiqing.yao@amd.com> Fixes: e1ee2111ca48 ("drm/amdgpu: Prefer RAS recovery for scheduler hang") Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1 insertion(+) commit f4d583cd3f1634f1d62bf193f4dbccb7611db56a Author: Jesse.zhang@amd.com <Jesse.zhang@amd.com> Date: Mon Dec 9 17:12:04 2024 +0800 drm/amdgpu/sdma7: implement queue reset callback for sdma7 Implement sdma queue reset callback by mes_reset_queue_mmio. Signed-off-by: Jesse Zhang <jesse.zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 8a4c6fc826e8deea573d05b42eaf381472878631 Author: Jesse.zhang@amd.com <Jesse.zhang@amd.com> Date: Mon Dec 9 17:07:12 2024 +0800 drm/amdgpu/sdma7: Implement resume function for each instance Extracts the resume sequence for per sdma instance from sdma_v7_0_gfx_resume. This function can be used in start or restart scenarios of specific instances. Signed-off-by: Jesse Zhang <jesse.zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 259 ++++++++++++++++++--------------- 1 file changed, 141 insertions(+), 118 deletions(-) commit b34d605d120f09303cf8d9e25ad3e17a4997c3a1 Author: Bjorn Helgaas <bhelgaas@google.com> Date: Mon Dec 9 16:29:38 2024 -0600 perf/dwc_pcie: Qualify RAS DES VSEC Capability by Vendor, Revision PCI Vendor-Specific (VSEC) Capabilities are defined by each vendor. Devices from different vendors may advertise a VSEC Capability with the DWC RAS DES functionality, but the vendors may assign different VSEC IDs. Search for the DWC RAS DES Capability using the VSEC ID and VSEC Rev chosen by the vendor. This does not fix a current problem because Alibaba, Ampere, and Qualcomm all assigned the same VSEC ID and VSEC Rev for the DWC RAS DES Capability. The potential issue is that we may add support for a device from another vendor, where the vendor has already assigned DWC_PCIE_VSEC_RAS_DES_ID (0x02) for an unrelated VSEC. In that event, dwc_pcie_des_cap() would find the unrelated VSEC and mistakenly assume it was a DWC RAS DES Capability. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com> Reviewed-and-tested-by: Shuai Xue <xueshuai@linux.alibaba.com> Link: https://lore.kernel.org/r/20241209222938.3219364-1-helgaas@kernel.org Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/dwc_pcie_pmu.c | 68 ++++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 31 deletions(-) commit 9456a15947c1fe875e75d790a8ecd0b659fd2915 Author: Anshuman Khandual <anshuman.khandual@arm.com> Date: Tue Dec 10 10:02:57 2024 +0530 arm64/Kconfig: Drop EXECMEM dependency from ARCH_WANTS_EXECMEM_LATE ARCH_WANTS_EXECMEM_LATE indicates subscribing platform's preference for EXECMEM late initialisation without creating a new dependency. Hence this just drops EXECMEM dependency while selecting ARCH_WANTS_EXECMEM_LATE. Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Link: https://lore.kernel.org/r/20241210043257.715822-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7f0a3a6f7339af55f1ca2c27131739d75569c08 Merge: bc5b7ba15936 fac04efc5c79 Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Wed Dec 11 15:06:05 2024 -0500 Merge drm/drm-next into drm-intel-next Catching up with 6.13-rc2. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> commit 034294fbfdf0ded4f931f9503d2ca5bbf8b9aebd Author: Mikhail Ivanov <ivanov.mikhail1@huawei-partners.com> Date: Tue Nov 12 22:52:03 2024 +0800 selinux: Fix SCTP error inconsistency in selinux_socket_bind() Check sk->sk_protocol instead of security class to recognize SCTP socket. SCTP socket is initialized with SECCLASS_SOCKET class if policy does not support EXTSOCKCLASS capability. In this case bind(2) hook wrongfully return EAFNOSUPPORT instead of EINVAL. The inconsistency was detected with help of Landlock tests: https://lore.kernel.org/all/b58680ca-81b2-7222-7287-0ac7f4227c3c@huawei-partners.com/ Fixes: 0f8db8cc73df ("selinux: add AF_UNSPEC and INADDR_ANY checks to selinux_socket_bind()") Signed-off-by: Mikhail Ivanov <ivanov.mikhail1@huawei-partners.com> Signed-off-by: Paul Moore <paul@paul-moore.com> security/selinux/hooks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11534b4de2a1bcc438ed90d031184c9c847e8560 Author: Yi Liu <yi.l.liu@intel.com> Date: Sat Dec 7 04:01:08 2024 -0800 iommufd: Deal with IOMMU_HWPT_FAULT_ID_VALID in iommufd core IOMMU_HWPT_FAULT_ID_VALID is used to mark if the fault_id field of iommu_hwp_alloc is valid or not. As the fault_id field is handled in the iommufd core, so it makes sense to sanitize the IOMMU_HWPT_FAULT_ID_VALID flag in the iommufd core, and mask it out before passing the user flags to the iommu drivers. Link: https://patch.msgid.link/r/20241207120108.5640-1-yi.l.liu@intel.com Signed-off-by: Yi Liu <yi.l.liu@intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 8 +------- drivers/iommu/intel/iommu.c | 3 +-- drivers/iommu/iommufd/hw_pagetable.c | 10 +++++++--- drivers/iommu/iommufd/selftest.c | 2 +- 4 files changed, 10 insertions(+), 13 deletions(-) commit b4706d814921cc2df7bb59ad8f9ee84855a4f0c4 Author: Eliav Farber <farbere@amazon.com> Date: Wed Dec 4 14:20:03 2024 +0000 genirq/kexec: Prevent redundant IRQ masking by checking state before shutdown During machine kexec, machine_kexec_mask_interrupts() is responsible for disabling or masking all interrupts. While the irq_disable() is only invoked when the interrupt is not yet disabled, it unconditionally invokes the irq_mask() callback for every interrupt descriptor, even when the interrupt is already masked or not even started up yet. A specific issue was observed in the crash kernel flow after unbinding a device (prior to kexec) that used a GPIO as an IRQ source. The warning was triggered by the gpiochip_disable_irq() function, which attempts to clear the FLAG_IRQ_IS_ENABLED flag when FLAG_USED_AS_IRQ was not set. This issue surfaced after commit a8173820f441 ("gpio: gpiolib: Allow GPIO IRQs to lazy disable") introduced lazy disablement for GPIO IRQs. It replaced disable/enable hooks with mask/unmask hooks. Unlike the disable hook, the mask hook doesn't handle already-masked IRQs. When a GPIO-IRQ driver is unbound, the IRQ is released, triggering __irq_disable() and irq_state_set_masked(). A subsequent call to machine_kexec_mask_interrupts() re-invokes chip->irq_mask(). This results in a call chain, including gpiochip_irq_mask() and gpiochip_disable_irq(). Since FLAG_USED_AS_IRQ was cleared earlier, the warning is triggered. Replace the direct invocation of the irq_mask() and irq_disable() callbacks invoking to irq_shutdown(), which handles the cases correct and avoid it all together when the interrupt has never been started up. Signed-off-by: Eliav Farber <farbere@amazon.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20241204142003.32859-3-farbere@amazon.com kernel/irq/kexec.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit bad6722e478f5b17a5ceb039dfb4c680cf2c0b48 Author: Eliav Farber <farbere@amazon.com> Date: Wed Dec 4 14:20:02 2024 +0000 kexec: Consolidate machine_kexec_mask_interrupts() implementation Consolidate the machine_kexec_mask_interrupts implementation into a common function located in a new file: kernel/irq/kexec.c. This removes duplicate implementations from architecture-specific files in arch/arm, arch/arm64, arch/powerpc, and arch/riscv, reducing code duplication and improving maintainability. The new implementation retains architecture-specific behavior for CONFIG_GENERIC_IRQ_KEXEC_CLEAR_VM_FORWARD, which was previously implemented for ARM64. When enabled (currently for ARM64), it clears the active state of interrupts forwarded to virtual machines (VMs) before handling other interrupt masking operations. Signed-off-by: Eliav Farber <farbere@amazon.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20241204142003.32859-2-farbere@amazon.com arch/arm/kernel/machine_kexec.c | 23 ---------------------- arch/arm64/Kconfig | 1 + arch/arm64/kernel/machine_kexec.c | 31 ------------------------------ arch/powerpc/include/asm/kexec.h | 1 - arch/powerpc/kexec/core.c | 22 --------------------- arch/powerpc/kexec/core_32.c | 1 + arch/riscv/kernel/machine_kexec.c | 23 ---------------------- include/linux/irq.h | 3 +++ kernel/irq/Kconfig | 6 ++++++ kernel/irq/Makefile | 2 +- kernel/irq/kexec.c | 40 +++++++++++++++++++++++++++++++++++++++ 11 files changed, 52 insertions(+), 101 deletions(-) commit 4d112ebd02d10faf202aa8335b06de0aca8b536b Author: Guillaume Ranquet <granquet@baylibre.com> Date: Mon Dec 2 11:09:53 2024 +0100 iio: adc: ad-sigma-delta: Document ABI for sigma delta adc Add common calibration nodes for sigma delta adc. Signed-off-by: Guillaume Ranquet <granquet@baylibre.com> Link: https://patch.msgid.link/20241202-ad411x_calibration-v3-2-beb6aeec39e2@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> .../ABI/testing/sysfs-bus-iio-adc-ad-sigma-delta | 23 +++++++++++++++++++++ Documentation/ABI/testing/sysfs-bus-iio-adc-ad7192 | 24 ---------------------- 2 files changed, 23 insertions(+), 24 deletions(-) commit 031bdc8aee01b7b298159eee541844d8bff4467d Author: Guillaume Ranquet <granquet@baylibre.com> Date: Mon Dec 2 11:09:52 2024 +0100 iio: adc: ad7173: add calibration support The ad7173 family of chips has up to four calibration modes. Internal zero scale: removes ADC core offset errors. Internal full scale: removes ADC core gain errors. System zero scale: reduces offset error to the order of channel noise. System full scale: reduces gain error to the order of channel noise. All voltage channels will undergo an internal zero/full scale calibration at bootup. System zero/full scale can be done after bootup using the newly created iio interface 'sys_calibration' and 'sys_calibration_mode' Signed-off-by: Guillaume Ranquet <granquet@baylibre.com> Link: https://patch.msgid.link/20241202-ad411x_calibration-v3-1-beb6aeec39e2@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad7173.c | 116 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) commit c3948d09008085993eda43d687993f79b55aacda Author: Marcelo Schmitt <marcelo.schmitt@analog.com> Date: Mon Dec 2 11:08:30 2024 -0300 iio: adc: ad4000: Add support for PulSAR devices The ADI PulSAR series of single-channel devices comprises differential and pseudo-differential ADCs that don't require any input data from the host controller. By not requiring a data input line, PulSAR devices can operate with a 3-wire only data bus in some setups. The AD4000 series and the single-channel PulSAR series of devices have similar SPI transfer specifications and wiring configurations. Single-channel PulSAR devices are slower than AD4000 and don't have a configuration register. That taken into account, single-channel PulSARs can be supported by the ad4000 driver without any increase in code complexity. Extend the AD4000 driver to also support single-channel PulSAR devices. Reviewed-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com> Link: https://patch.msgid.link/2bfb904e29914c3dc4905e1c87fcc735575f330d.1733147444.git.marcelo.schmitt@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad4000.c | 162 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) commit fc8f6300954966ca0c826d33ae6b4a4de1d8419a Author: Marcelo Schmitt <marcelo.schmitt@analog.com> Date: Mon Dec 2 11:08:13 2024 -0300 iio: adc: ad4000: Use device specific timing for SPI transfers The SPI transfers for AD4020, AD4021, and AD4022 have slightly different timing specifications. Use device specific timing constraints to set SPI transfer parameters. While tweaking time constraints, remove time related defines including unused AD4000_TQUIET1_NS. Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/a36fcf44cc00b2a498170e2ae3f005829d516266.1733147444.git.marcelo.schmitt@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad4000.c | 51 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 9 deletions(-) commit 646acd46fc909ff55c3fea17b697e480a4e2cd57 Author: Marcelo Schmitt <marcelo.schmitt@analog.com> Date: Mon Dec 2 11:07:56 2024 -0300 iio: adc: ad4000: Add timestamp channel The ADC data is pushed to the IIO buffer along with timestamp but no timestamp channel was provided to retried the time data. Add a timestamp channel to provide sample capture time. Suggested-by: David Lechner <dlechner@baylibre.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com> Link: https://patch.msgid.link/d1f1bb1b726b90a3a7c1148c65d2f7fe073e2b15.1733147444.git.marcelo.schmitt@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad4000.c | 98 +++++++++++++++++++++++++++--------------------- 1 file changed, 56 insertions(+), 42 deletions(-) commit c54b909481de76f4047e824781304a9ec1ac0387 Author: Marcelo Schmitt <marcelo.schmitt@analog.com> Date: Mon Dec 2 11:07:38 2024 -0300 dt-bindings: iio: adc: adi,ad4000: Add PulSAR Extend the AD4000 series device tree documentation to also describe PulSAR devices. The single-channel series of PulSAR devices is similar to the AD4000 series except PulSAR devices sample at slower rates and don't have a configuration register. Because PulSAR devices don't have a configuration register, they don't support all features of AD4000 devices and thus fewer interfaces are provided to user space. Also, while AD4000 may have their SDI pin connected to SPI host MOSI line, PulSAR SDI pin is never connected to MOSI. Some devices within the PulSAR series are just faster versions of others. >From fastest to slowest, AD7980, AD7988-5, AD7686, AD7685, and AD7988-1 are all 16-bit pseudo-differential pin-for-pin compatible ADCs. Devices that only vary on the sample rate are documented with a common fallback compatible. Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/cc05f1471c409ab38722cd0e80fd5857ff9ce5db.1733147444.git.marcelo.schmitt@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> .../devicetree/bindings/iio/adc/adi,ad4000.yaml | 75 ++++++++++++++++++---- 1 file changed, 62 insertions(+), 13 deletions(-) commit 22ccb0a1c57c436de899ccd3170d6d2ce7238836 Author: Matteo Martelli <matteomartelli3@gmail.com> Date: Mon Dec 2 16:11:07 2024 +0100 iio: consumers: ensure read buffers for labels and ext_info are page aligned Attributes of iio providers are exposed via sysfs. Typically, providers pass attribute values to the iio core, which handles formatting and printing to sysfs. However, some attributes, such as labels or extended info, are directly formatted and printed to sysfs by provider drivers using sysfs_emit() and sysfs_emit_at(). These helpers assume the read buffer, allocated by sysfs fop, is page-aligned. When these attributes are accessed by consumer drivers, the read buffer is allocated by the consumer and may not be page-aligned, leading to failures in the provider's callback that utilizes sysfs_emit*. Add a check to ensure that read buffers for labels and external info attributes are page-aligned. Update the prototype documentation as well. Signed-off-by: Matteo Martelli <matteomartelli3@gmail.com> Link: https://patch.msgid.link/20241202-iio-kmalloc-align-v1-1-aa9568c03937@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/inkern.c | 11 +++++++++++ include/linux/iio/consumer.h | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit ca56951352ca26a15e9a62a7e682e56f1c01bf53 Author: Vasileios Amoiridis <vassilisamir@gmail.com> Date: Mon Dec 2 19:19:07 2024 +0100 iio: pressure: bmp280: Make time vars intuitive and move to fsleep Move sleep functions to the new fsleep() implementation. While at it, add time unit abbreviation as a suffix of time describing variables to make them more intuitive. Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://patch.msgid.link/20241202181907.21471-4-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/pressure/bmp280-core.c | 39 +++++++++++++++++++------------------- drivers/iio/pressure/bmp280.h | 4 ++-- 2 files changed, 22 insertions(+), 21 deletions(-) commit 7666baba9edf764575cb8a6608d51a72b8310404 Author: Vasileios Amoiridis <vassilisamir@gmail.com> Date: Mon Dec 2 19:19:06 2024 +0100 iio: pressure: bmp280: Use sizeof() for denominator Instead of using magic number 2 as a denominator, make it intuitive by using sizeof(). Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://patch.msgid.link/20241202181907.21471-3-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/pressure/bmp280.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e60a6545c14000e9e896c71dc62206f3a6f14b2 Author: Vasileios Amoiridis <vassilisamir@gmail.com> Date: Mon Dec 2 20:23:41 2024 +0100 iio: chemical: bme680: add power management Add runtime power management to the device. Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://patch.msgid.link/20241202192341.33187-4-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/chemical/bme680.h | 2 + drivers/iio/chemical/bme680_core.c | 109 ++++++++++++++++++++++++++++++++++--- drivers/iio/chemical/bme680_i2c.c | 1 + drivers/iio/chemical/bme680_spi.c | 1 + 4 files changed, 106 insertions(+), 7 deletions(-) commit 601f7269fc2c369403ff7ec4729eb61900cb0ff0 Author: Vasileios Amoiridis <vassilisamir@gmail.com> Date: Mon Dec 2 20:23:40 2024 +0100 iio: chemical: bme680: add regulators Add support for the regulators described in the dt-binding. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://patch.msgid.link/20241202192341.33187-3-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/chemical/bme680_core.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 139a45c3ac5da32ab957907cf6f3adbaaf3ad3a5 Author: Vasileios Amoiridis <vassilisamir@gmail.com> Date: Mon Dec 2 20:23:39 2024 +0100 dt-bindings: iio: bosch,bme680: Move from trivial-devices and add supplies Move dt-binding for BME680 out of trivial-devices.yaml and extend it by adding the missing supplies. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://patch.msgid.link/20241202192341.33187-2-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> .../bindings/iio/chemical/bosch,bme680.yaml | 62 ++++++++++++++++++++++ .../devicetree/bindings/trivial-devices.yaml | 2 - 2 files changed, 62 insertions(+), 2 deletions(-) commit 804eb393d4cfde80c4f46d86e26b7a26d00e5553 Author: Sean Nyekjaer <sean@geanix.com> Date: Tue Dec 3 08:20:17 2024 +0100 iio: imu: st_lsm6dsx: don't always auto-enable I2C, I3C and SPI interface drivers This patch makes I2C, I3C and SPI interface drivers for ST lsm6dsx individually selectable via Kconfig. The default is kept unchanged - I2C, I3C and SPI interface drivers are still selected by default if the corresponding bus support is available. However, the patch makes it possible to explicitly disable drivers that are not needed for a particular target. Signed-off-by: Sean Nyekjaer <sean@geanix.com> Link: https://patch.msgid.link/20241203-lsm6dsx-v1-1-6d7893443bc8@geanix.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/imu/st_lsm6dsx/Kconfig | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit c3084fada909e139f647615d2c85e6a484d4d777 Author: Sean Nyekjaer <sean@geanix.com> Date: Tue Dec 3 08:22:11 2024 +0100 dt-bindings: iio: accel: fxls8962af: add wakeup-source property Add a wakeup-source property to the binding to describe whether the wakeup interrupts from the accelerometer can wake the system from suspend. Signed-off-by: Sean Nyekjaer <sean@geanix.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20241203-fxlsdt-v2-1-ef523461b507@geanix.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit aed2bcd2aa2f6ccd3b8912fd5bb6b8c1fdbe1ecd Author: Lothar Rubusch <l.rubusch@gmail.com> Date: Thu Dec 5 17:13:35 2024 +0000 iio: accel: adxl345: rename variable data to st Rename the locally used variable data to st. The st refers to "state", representing the internal state of the driver object. Further it prepares the usage of an internal data pointer needed for the implementation of the sensor features. Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com> Link: https://patch.msgid.link/20241205171343.308963-3-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/adxl345_core.c | 44 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 4df71ef089a4c27fc578ecb4d147e273f30303a5 Author: Lothar Rubusch <l.rubusch@gmail.com> Date: Thu Dec 5 17:13:34 2024 +0000 iio: accel: adxl345: refrase comment on probe Refrase comment on the probe function, avoid naming different hardware. Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com> Link: https://patch.msgid.link/20241205171343.308963-2-l.rubusch@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/adxl345_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6eaf3f60ab45a5740ed4e1a7d41c4f0c10f6ac3c Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Fri Dec 6 18:28:42 2024 +0100 iio: adc: ad7124: Implement temperature measurement If the maximal count of channels the driver supports isn't fully utilized, add an attribute providing the internal temperature. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/433211af8ac3f02dee58586ecb51d2e98246a095.1733504533.git.u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad7124.c | 112 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 91 insertions(+), 21 deletions(-) commit abc61acde13cd9b70b5f5b5d20e4e2b3fee457cf Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Fri Dec 6 18:28:41 2024 +0100 iio: adc: ad7124: Add error reporting during probe A driver that silently fails to probe is annoying and hard to debug. So add messages in the error paths of the probe function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/55e24392f1e4d5b9896f00a52a93c1c4b1feac43.1733504533.git.u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad7124.c | 76 +++++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 36 deletions(-) commit 132d44dc6966c1cf841ffe0f6f048165687e870b Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Fri Dec 6 18:28:40 2024 +0100 iio: adc: ad_sigma_delta: Check for previous ready signals It can happen if a previous conversion was aborted the ADC pulls down the R̅D̅Y̅ line but the event wasn't handled before. In that case enabling the irq might immediately fire (depending on the irq controller capabilities) and even with a rdy-gpio isn't identified as an unrelated one. To cure that problem check for a pending event before the measurement is started and clear it if needed. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/3ec6b61fb1e527e935133dc56f589aab4b2094a3.1733504533.git.u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad_sigma_delta.c | 99 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 98 insertions(+), 1 deletion(-) commit 07a28874bb49700036a3ab435dd95ae31afd21ae Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Fri Dec 6 18:28:39 2024 +0100 iio: adc: ad_sigma_delta: Store information about reset sequence length The various chips can be reset using a sequence of SPI transfers with MOSI = 1. The length of such a sequence varies from chip to chip. Store that length in struct ad_sigma_delta_info and replace the respective parameter to ad_sd_reset() with it. Note the ad7192 used to pass 48 as length but the documentation specifies 40 as the required length. Assuming the latter is right. (Using a too long sequence doesn't hurt apart from using a longer spi transfer than necessary, so this is no relevant fix.) The motivation for storing this information is that this is useful to clear a pending R̅D̅Y̅ signal in the next change. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/9750db62fce638bf140ff48172c23bff7f785e5b.1733504533.git.u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad7124.c | 3 ++- drivers/iio/adc/ad7173.c | 1 + drivers/iio/adc/ad7192.c | 4 +++- drivers/iio/adc/ad7791.c | 1 + drivers/iio/adc/ad7793.c | 3 ++- drivers/iio/adc/ad_sigma_delta.c | 5 ++--- include/linux/iio/adc/ad_sigma_delta.h | 5 +++-- 7 files changed, 14 insertions(+), 8 deletions(-) commit f522589c139debb8af56dbead0c6e9dfca2d5ce4 Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Fri Dec 6 18:28:38 2024 +0100 iio: adc: ad_sigma_delta: Fix a race condition The ad_sigma_delta driver helper uses irq_disable_nosync(). With that one it is possible that the irq handler still runs after the irq_disable_nosync() function call returns. Also to properly synchronize irq disabling in the different threads proper locking is needed and because it's unclear if the irq handler's irq_disable_nosync() call comes first or the one in the enabler's error path, all code locations that disable the irq must check for .irq_dis first to ensure there is exactly one disable call per enable call. So add a spinlock to the struct ad_sigma_delta and use it to synchronize irq enabling and disabling. Also only act in the irq handler if the irq is still enabled. Fixes: af3008485ea0 ("iio:adc: Add common code for ADI Sigma Delta devices") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/9e6def47e2e773e0e15b7a2c29d22629b53d91b1.1733504533.git.u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad_sigma_delta.c | 56 +++++++++++++++++++++------------- include/linux/iio/adc/ad_sigma_delta.h | 1 + 2 files changed, 36 insertions(+), 21 deletions(-) commit 90b8b2fe60eb673d917b3c11abfc0a8ee144145e Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Fri Dec 6 18:28:37 2024 +0100 iio: adc: ad_sigma_delta: Handle CS assertion as intended in ad_sd_read_reg_raw() When struct ad_sigma_delta::keep_cs_asserted was introduced only register writing was adapted to honor this new flag. Also respect it when reading a register. Fixes: df1d80aee963 ("iio: ad_sigma_delta: Properly handle SPI bus locking vs CS assertion") Reviewed-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/8d76b4ea4a4363b269886c71193b840821c724ea.1733504533.git.u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad_sigma_delta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a87ef09b1fdf75fdc2d6b386ff23a35589173055 Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Fri Dec 6 18:28:36 2024 +0100 iio: adc: ad_sigma_delta: Add support for reading irq status using a GPIO Some of the ADCs by Analog signal their irq condition on the MISO line. So typically that line is connected to an SPI controller and a GPIO. The GPIO is used as input and the respective interrupt is enabled when the last SPI transfer is completed. Depending on the GPIO controller the toggling MISO line might make the interrupt pending even while it's masked. In that case the irq handler is called immediately after irq_enable() and so before the device actually pulls that line low which results in non-sense values being reported to the upper layers. The only way to find out if the line was actually pulled low is to read the GPIO. (There is a flag in AD7124's status register that also signals if an interrupt was asserted, but reading that register toggles the MISO line and so might trigger another spurious interrupt.) Add the possibility to specify an interrupt GPIO in the machine description in addition to the plain interrupt. This GPIO is used then to check if the irq line is actually active in the irq handler. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/5be9a4cc4dc600ec384c88db01dd661a21506b9c.1733504533.git.u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad_sigma_delta.c | 38 +++++++++++++++++++++++++++++----- include/linux/iio/adc/ad_sigma_delta.h | 2 ++ 2 files changed, 35 insertions(+), 5 deletions(-) commit fa6068fb7828b5778cf7d5905c4d8c05e6f231ac Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Fri Dec 6 18:28:35 2024 +0100 dt-bindings: iio: adc: adi,ad7{124,173,192,780}: Allow specifications of a gpio for irq line For the AD7124 chip and some of its cousins the logical irq line (R̅D̅Y̅) is physically on the same pin as the spi MISO output (DOUT) and so reading a register might trigger an interrupt. For correct operation it's critical that the actual state of the pin can be read to judge if an interrupt event is a real one or just a spurious one triggered by toggling the line in its MISO mode. Allow specification of an "rdy-gpios" property that references a GPIO that can be used for that purpose. While this is typically the same GPIO also used (implicitly) as interrupt source, it is still supposed that the interrupt is specified as before and usual. Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/7fc92a8539e55802d514332e70ee836a3ed08b66.1733504533.git.u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml | 13 +++++++++++++ Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml | 12 ++++++++++++ Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml | 15 +++++++++++++++ Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml | 11 +++++++++++ 4 files changed, 51 insertions(+) commit 9ecad7f404b57d8a544c3211cf87a6284e49f4fd Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Fri Dec 6 18:28:34 2024 +0100 iio: adc: ad7124: Refuse invalid input specifiers The ad7124-4 has 8 analog inputs; the input select values 8 to 15 are reserved and not to be used. These are fine for ad7124-8. For both ad7124-4 and ad7124-8 values bigger than 15 are internal channels that might appear as inputs in the channels specified in the device description according to the description of commit f1794fd7bdf7 ("iio: adc: ad7124: Remove input number limitation"), values bigger than 31 don't fit into the respective register bit field and the driver masked them to smaller values. Check for these invalid input specifiers and fail to probe if one is found. Fixes: f1794fd7bdf7 ("iio: adc: ad7124: Remove input number limitation") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/80e3bd629d2b755ab5e061c8731dafa57d08698a.1733504533.git.u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad7124.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit cc597af18092d0e84ccb108c8e4aa0beea26634d Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Fri Dec 6 18:28:33 2024 +0100 iio: adc: ad7124: Don't create more channels than the driver can handle The ad7124-4 and ad7124-8 both support 16 channel registers and assigns each channel defined in dt statically such a register. While the driver could be a bit more clever about this, it currently isn't and specifying more than 16 channels yields broken behaviour. So just refuse to bind in this situation. Fixes: b3af341bbd96 ("iio: adc: Add ad7124 support") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/1b9a5a1d334e5501294f7f9f9d5893f1cdf1b0ec.1733504533.git.u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad7124.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 645fb7c22fd8d27c223b0e4abff442632bd9a75a Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Dec 6 13:13:35 2024 +0200 iio: adc: rzg2l_adc: Add support for Renesas RZ/G3S Add ADC support for the Renesas RZ/G3S SoC. The key features of this IP include: - 9 channels, with one dedicated to reading the temperature reported by the Thermal Sensor Unit (TSU) - A different default ADCMP value, which is written to the ADM3 register. - Different default sampling rates - ADM3.ADSMP field is 8 bits wide - ADINT.INTEN field is 11 bits wide Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241206111337.726244-14-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/rzg2l_adc.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 4af77feab3a2d489e2c7390e8d31b2f88d0b3db6 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Dec 6 13:13:34 2024 +0200 dt-bindings: iio: adc: renesas,rzg2l-adc: Document RZ/G3S SoC Document the ADC IP available on the RZ/G3S SoC. The ADC IP on the RZ/G3S differs slightly from the one found on the RZ/G2L. The identified differences are as follows: - different number of channels (one being used for temperature conversion); consequently, various registers differ; the temperature channel support was not available for the RZ/G2L variant; the #io-channel-cells property was added to be able to request the temperature channel from the thermal driver - different default sampling periods - the RZ/G3S variant lacks the ADVIC register. Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241206111337.726244-13-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> .../bindings/iio/adc/renesas,rzg2l-adc.yaml | 37 +++++++++++++++------- 1 file changed, 26 insertions(+), 11 deletions(-) commit 563cf94f932946521ce885a089399a2c813c71ab Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Dec 6 13:13:33 2024 +0200 iio: adc: rzg2l_adc: Add suspend/resume support The Renesas RZ/G3S SoC features a power-saving mode where power to most of the SoC components is turned off, including the ADC IP. Suspend/resume support has been added to the rzg2l_adc driver to restore functionality after resuming from this power-saving mode. During suspend, the ADC resets are asserted, and the ADC is powered down. On resume, the ADC resets are de-asserted, the hardware is re-initialized, and the ADC power is restored using the runtime PM APIs. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://patch.msgid.link/20241206111337.726244-12-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/rzg2l_adc.c | 70 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 6dd8a7712538a38ddc742adc0fc5c3361560235f Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Dec 6 13:13:32 2024 +0200 iio: adc: rzg2l_adc: Add support for channel 8 The ADC on the Renesas RZ/G3S SoC includes an additional channel (channel 8) dedicated to reading temperature values from the Thermal Sensor Unit (TSU). There is a direct in-SoC connection between the ADC and TSU IPs. To read the temperature reported by the TSU, a different sampling rate (compared to channels 0-7) must be configured in the ADM3 register. The rzg2l_adc driver has been updated to support reading the TSU temperature. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://patch.msgid.link/20241206111337.726244-11-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/rzg2l_adc.c | 62 ++++++++++++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 18 deletions(-) commit a259a8465d3e9c744f990bda3582b5217562827f Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Dec 6 13:13:31 2024 +0200 iio: adc: rzg2l_adc: Prepare for the addition of RZ/G3S support The ADC IP available on the RZ/G3S differs slightly from the one found on the RZ/G2L. The identified differences are as follows: - different number of channels (one being used for temperature conversion); consequently, various registers differ - different default sampling periods - the RZ/G3S variant lacks the ADVIC register. To accommodate these differences, the rzg2l_adc driver has been updated by introducing the struct rzg2l_adc_hw_params, which encapsulates the hardware-specific differences between the IP variants. A pointer to an object of type struct rzg2l_adc_hw_params is embedded in struct rzg2l_adc_data. Additionally, the completion member of struct rzg2l_adc_data was relocated to avoid potential padding, if any. The code has been adjusted to utilize hardware-specific parameters stored in the new structure instead of relying on plain macros. The check of chan->channel in rzg2l_adc_read_raw() function, against the driver specific mask was removed as the subsystem should have already been done this before reaching the rzg2l_adc_read_raw() function. Along with it the local variable ch was dropped as chan->channel could be used instead. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://patch.msgid.link/20241206111337.726244-10-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/rzg2l_adc.c | 87 ++++++++++++++++++++++++++++++--------------- 1 file changed, 59 insertions(+), 28 deletions(-) commit d7c3e3463492f50644168cbb4e443034052d1c22 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Dec 6 13:13:30 2024 +0200 iio: adc: rzg2l_adc: Enable runtime PM autosuspend support Enable runtime PM autosuspend support for the rzg2l_adc driver. With this change, consecutive conversion requests will no longer cause the device to be runtime-enabled/disabled after each request. Instead, the device will transition based on the delay configured by the user. This approach reduces the frequency of hardware register access during runtime PM suspend/resume cycles, thereby saving CPU cycles. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://patch.msgid.link/20241206111337.726244-9-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/rzg2l_adc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5d7fb2d589c56877bf220f73debd134c09e8209f Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Dec 6 13:13:29 2024 +0200 iio: adc: rzg2l_adc: Simplify the locking scheme in rzg2l_adc_read_raw() Simplify the locking scheme in rzg2l_adc_read_raw() by using guard(mutex)(). Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://patch.msgid.link/20241206111337.726244-8-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/rzg2l_adc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit b7549624af04eb52cb28df57bee2bcc88be1adc0 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Dec 6 13:13:28 2024 +0200 iio: adc: rzg2l_adc: Use read_poll_timeout() Replace the driver-specific implementation with the read_poll_timeout() function. This change simplifies the code and improves maintainability by leveraging the standardized helper. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://patch.msgid.link/20241206111337.726244-7-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/rzg2l_adc.c | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) commit 7842ef74c5fc807e1ebd221b6301cc144057280c Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Dec 6 13:13:27 2024 +0200 iio: adc: rzg2l_adc: Switch to RUNTIME_PM_OPS() and pm_ptr() The use of SET_RUNTIME_PM_OPS() is now deprecated and requires __maybe_unused annotations to avoid warnings about unused functions. Switching to RUNTIME_PM_OPS() and pm_ptr() eliminates the need for such annotations because the compiler can directly reference the runtime PM functions, thereby suppressing the warnings. As a result, the __maybe_unused markings can be removed. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://patch.msgid.link/20241206111337.726244-6-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/rzg2l_adc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 89ee8174e8c8db0efc75b26f2307114b38d61354 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Dec 6 13:13:26 2024 +0200 iio: adc: rzg2l_adc: Simplify the runtime PM code All Renesas SoCs using the rzg2l_adc driver manage ADC clocks through PM domains. Calling pm_runtime_{resume_and_get, put_sync}() implicitly sets the state of the clocks. As a result, the code in the rzg2l_adc driver that explicitly manages ADC clocks can be removed, leading to simpler and cleaner implementation. Additionally, replace the use of rzg2l_adc_set_power() with direct PM runtime API calls to further simplify and clean up the code. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://patch.msgid.link/20241206111337.726244-5-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/rzg2l_adc.c | 98 +++++++++------------------------------------ 1 file changed, 20 insertions(+), 78 deletions(-) commit b010b104673013b0075c94b4f9ae2f990f8351e9 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Dec 6 13:13:25 2024 +0200 iio: adc: rzg2l_adc: Use devres helpers to request pre-deasserted reset controls Starting with commit d872bed85036 ("reset: Add devres helpers to request pre-deasserted reset controls"), devres helpers are available to simplify the process of requesting pre-deasserted reset controls. Update the rzg2l_adc driver to utilize these helpers, reducing complexity in this way. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://patch.msgid.link/20241206111337.726244-4-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/rzg2l_adc.c | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) commit a34dc289f89ecc4e967dfe6ec742aafdc5ae62f6 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Dec 6 13:13:24 2024 +0200 iio: adc: rzg2l_adc: Convert dev_err() to dev_err_probe() Convert all occurrences of dev_err() in the probe path to dev_err_probe(). This improves readability and simplifies the code. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://patch.msgid.link/20241206111337.726244-3-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/rzg2l_adc.c | 78 +++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 46 deletions(-) commit c75c7945cd49c05404b00358108084a175a5fb29 Author: Christian Göttsche <cgzones@googlemail.com> Date: Mon Nov 25 12:06:44 2024 +0100 selinux: use native iterator types Use types for iterators equal to the type of the to be compared values. Reported by clang: ../ss/sidtab.c:126:2: warning: comparison of integers of different signs: 'int' and 'unsigned long' 126 | hash_for_each_rcu(sidtab->context_to_sid, i, entry, list) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../hashtable.h:139:51: note: expanded from macro 'hash_for_each_rcu' 139 | for (... ; obj == NULL && (bkt) < HASH_SIZE(name);\ | ~~~ ^ ~~~~~~~~~~~~~~~ ../selinuxfs.c:1520:23: warning: comparison of integers of different signs: 'int' and 'unsigned int' 1520 | for (cpu = *idx; cpu < nr_cpu_ids; ++cpu) { | ~~~ ^ ~~~~~~~~~~ ../hooks.c:412:16: warning: comparison of integers of different signs: 'int' and 'unsigned long' 412 | for (i = 0; i < ARRAY_SIZE(tokens); i++) { | ~ ^ ~~~~~~~~~~~~~~~~~~ Signed-off-by: Christian Göttsche <cgzones@googlemail.com> [PM: munged the clang output due to line length concerns] Signed-off-by: Paul Moore <paul@paul-moore.com> security/selinux/hooks.c | 2 +- security/selinux/selinuxfs.c | 2 +- security/selinux/ss/sidtab.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit b98d5000c50544f14bacb248c34e5219fbe81287 Author: Oliver Neukum <oneukum@suse.com> Date: Tue Nov 26 14:17:22 2024 +0100 media: rc: iguanair: handle timeouts In case of a timeout the IO must be cancelled or the next IO using the URB will fail and/or overwrite an operational URB. The automatic bisection fails because it arrives at a commit that correctly lets the test case run without an error. Signed-off-by: Oliver Neukum <oneukum@suse.com> Fixes: e99a7cfe93fd ("[media] iguanair: reuse existing urb callback for command responses") Reported-by: syzbot+ffba8e636870dac0e0c0@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/66f5cc9a.050a0220.46d20.0004.GAE@google.com/ Tested-by: syzbot+ffba8e636870dac0e0c0@syzkaller.appspotmail.com Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/rc/iguanair.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ff8f969da0532fd4220eaa1ddfbd9cabdf20476c Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Mon Nov 18 08:29:06 2024 +0100 media: mceusb: don't include 'pm_wakeup.h' directly The header clearly states that it does not want to be included directly, only via 'device.h'. 'platform_device.h' works equally well. Remove the direct inclusion. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/rc/mceusb.c | 1 - 1 file changed, 1 deletion(-) commit ef2cc59cb623444a5b57ce55b336e0185f78e762 Author: Sean Young <sean@mess.org> Date: Mon Oct 28 15:59:27 2024 +0000 media: imon: don't push static constants on stack for %*ph There is no need to pass constants via stack. The width may be explicitly specified in the format. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/rc/imon_raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5e7850cc87e749edd6bbb2bc2d071900ed4afd3 Author: Sean Young <sean@mess.org> Date: Mon Oct 28 15:59:26 2024 +0000 media: mceusb: don't push static constants on stack for %*ph There is no need to pass constants via stack. The width may be explicitly specified in the format. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/rc/mceusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 11c7fd6e0f62b24b3e6b0558bcbd0c3bbf541718 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Sun Oct 13 00:39:32 2024 +0100 media: cx18: Remove unused cx18_reset_ir_gpio cx18_reset_ir_gpio() has been unused in tree since 2009 commit eefe1010a465 ("V4L/DVB (10759): cx18: Convert GPIO connected functions to act as v4l2_subdevices") It has a comment saying it's exported for use by 'lirc_pvr150' but I don't see any sign of it in the lirc git, and I see it removed support for lirc_i2c.c 'Flavors of the Hauppage PVR-150...' in 2014. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/pci/cx18/cx18-gpio.c | 15 --------------- drivers/media/pci/cx18/cx18-gpio.h | 1 - 2 files changed, 16 deletions(-) commit b01c939d5854bbf1acf6109ba7a0f74993a22b19 Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Date: Wed Nov 27 11:09:22 2024 +0100 selinux: add generated av_permissions.h to targets av_permissions.h was not declared as a target and therefore not cleaned up automatically by kbuild. Suggested-by: Masahiro Yamada <masahiroy@kernel.org> Link: https://lore.kernel.org/lkml/CAK7LNATUnCPt03BRFSKh1EH=+Sy0Q48wE4ER0BZdJqOb_44L8w@mail.gmail.com/ Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Reviewed-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Paul Moore <paul@paul-moore.com> security/selinux/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4d79a1266d4cc3c967bc8823502466cad1ac8514 Author: Ilia Levi <ilia.levi@intel.com> Date: Tue Dec 10 19:35:06 2024 +0200 drm/xe: Make irq enabled flag atomic The irq.enabled flag was protected by a spin lock (irq.lock). By making it atomic we no longer need to wait for the spin lock in irq handlers. This will become especially useful for MSI-X irq handlers to prevent lock contention between different interrupts. Signed-off-by: Ilia Levi <ilia.levi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241210173506.202150-1-ilia.levi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/display/ext/i915_irq.c | 13 +------------ drivers/gpu/drm/xe/xe_device_types.h | 2 +- drivers/gpu/drm/xe/xe_irq.c | 29 +++++++---------------------- 3 files changed, 9 insertions(+), 35 deletions(-) commit d61927d784e25c0ce5ab6015538e6a82f152c24e Author: Jason Gunthorpe <jgg@ziepe.ca> Date: Wed Dec 4 16:13:39 2024 -0400 iommufd/selftest: Remove domain_alloc_paging() Since this implements domain_alloc_paging_flags() it only needs one op. Fold mock_domain_alloc_paging() into mock_domain_alloc_paging_flags(). Link: https://patch.msgid.link/r/0-v1-8a3e7e21ff6a+1745d-iommufd_paging_flags_jgg@nvidia.com Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Yi Liu <yi.l.liu@intel.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> drivers/iommu/iommufd/selftest.c | 43 +++++++++++++++------------------------- 1 file changed, 16 insertions(+), 27 deletions(-) commit 58fa8109fa8dae2947567e8f56dbd55ad81bc35c Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Fri Dec 6 15:52:29 2024 +0300 wifi: ath12k: Off by one in ath12k_wmi_process_csa_switch_count_event() The ahvif->vif->link_conf[] array has IEEE80211_MLD_MAX_NUM_LINKS elements so this should be >= instead of > to avoid an out of bounds access. Fixes: 3952657848c0 ("wifi: ath12k: Use mac80211 vif's link_conf instead of bss_conf") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/755becb1-819b-484d-8fac-9a2db53ced1b@stanley.mountain Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02f41c8aa643b0d329ee9fa3f3341919bf86b759 Author: Baochen Qiang <quic_bqiang@quicinc.com> Date: Fri Dec 6 13:45:52 2024 +0800 wifi: ath12k: fix leaking michael_mic for non-primary links In ath12k_dp_rx_peer_frag_setup(), commit ea4192553850 ("wifi: ath12k: add primary link for data path operations") checks whether a link is the primary link, and returns directly if it isn't. In ML scenario where we have non-primary links created, this results in leaking the michael_mic info since it is allocated by default but could never be freed for a non-primary link. Note that we can not move the might-sleep allocation after primary link check since there we are in atomic context (due to spin lock). So keep the default allocation, and then free it before return to fix this issue. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Fixes: ea4192553850 ("wifi: ath12k: add primary link for data path operations") Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Acked-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Link: https://patch.msgid.link/20241206054552.177424-1-quic_bqiang@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/dp_rx.c | 1 + 1 file changed, 1 insertion(+) commit bc5b7ba159361cd89ed9c14583f9b0e3c39ef450 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Dec 11 14:54:31 2024 +0200 drm/i915/dp: move g4x_dp_set_clock() call to g4x_dp_compute_config() It does not look like anything in intel_dp_compute_config() after the g4x_dp_set_clock() call depends on the changes it makes, namely setting dpll and clock_set in crtc_state. Move the call one level higher to g4x_dp_compute_config() to reduce the clutter in intel_dp_compute_config(). Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211125431.680227-2-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/g4x_dp.c | 13 ++++++++++--- drivers/gpu/drm/i915/display/g4x_dp.h | 6 ------ drivers/gpu/drm/i915/display/intel_dp.c | 3 --- 3 files changed, 10 insertions(+), 12 deletions(-) commit 0c638e861f02946ac7e89ea189ca7070aa376d4f Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Dec 11 14:54:30 2024 +0200 drm/i915/dp: add g4x_dp_compute_config() Add g4x_dp_compute_config() instead of using intel_dp_compute_config() directly, in order to slightly reduce the clutter in the latter wrt ->has_pch_encoder. Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211125431.680227-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/g4x_dp.c | 14 +++++++++++++- drivers/gpu/drm/i915/display/intel_dp.c | 3 --- 2 files changed, 13 insertions(+), 4 deletions(-) commit 3ce8df13f65e3ed297def63bb1e3ee6f024cbdc5 Merge: ab20bcb2d0c8 699a9733a354 Author: Mark Brown <broonie@kernel.org> Date: Wed Dec 11 17:02:47 2024 +0000 Add audio support for the Renesas RZ/G3S SoC Merge series from Claudiu <claudiu.beznea@tuxon.dev>: Series enables the audio support for the Renesas RZ/G3S SoC along with runtime PM and suspend to RAM. commit 254ef9541d68bd9d75296b2487ec97d4d6d40d57 Author: Stefan Berger <stefanb@linux.ibm.com> Date: Mon Nov 18 09:57:31 2024 -0500 ima: Suspend PCR extends and log appends when rebooting To avoid the following types of error messages due to a failure by the TPM driver to use the TPM, suspend TPM PCR extensions and the appending of entries to the IMA log once IMA's reboot notifier has been called. This avoids trying to use the TPM after the TPM subsystem has been shut down. [111707.685315][ T1] ima: Error Communicating to TPM chip, result: -19 [111707.685960][ T1] ima: Error Communicating to TPM chip, result: -19 Synchronization with the ima_extend_list_mutex to set ima_measurements_suspended ensures that the TPM subsystem is not shut down when IMA holds the mutex while appending to the log and extending the PCR. The alternative of reading the system_state variable would not provide this guarantee. This error could be observed on a ppc64 machine running SuSE Linux where processes are still accessing files after devices have been shut down. Suspending the IMA log and PCR extensions shortly before reboot does not seem to open a significant measurement gap since neither TPM quoting would work for attestation nor that new log entries could be written to anywhere after devices have been shut down. However, there's a time window between the invocation of the reboot notifier and the shutdown of devices. This includes all subsequently invoked reboot notifiers as well as kernel_restart_prepare() where __usermodehelper_disable() waits for all running_helpers to exit. During this time window IMA could now miss log entries even though attestation would still work. The reboot of the system shortly after may make this small gap insignificant. Signed-off-by: Tushar Sugandhi <tusharsu@linux.microsoft.com> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com> security/integrity/ima/ima.h | 1 + security/integrity/ima/ima_init.c | 2 ++ security/integrity/ima/ima_queue.c | 44 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) commit 0357ef03c94ef835bd44a0658b8edb672a9dbf51 Author: Amir Goldstein <amir73il@gmail.com> Date: Thu Nov 28 15:25:32 2024 +0100 fs: don't block write during exec on pre-content watched files Commit 2a010c412853 ("fs: don't block i_writecount during exec") removed the legacy behavior of getting ETXTBSY on attempt to open and executable file for write while it is being executed. This commit was reverted because an application that depends on this legacy behavior was broken by the change. We need to allow HSM writing into executable files while executed to fill their content on-the-fly. To that end, disable the ETXTBSY legacy behavior for files that are watched by pre-content events. This change is not expected to cause regressions with existing systems which do not have any pre-content event listeners. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Acked-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20241128142532.465176-1-amir73il@gmail.com fs/binfmt_elf.c | 4 ++-- fs/binfmt_elf_fdpic.c | 4 ++-- fs/exec.c | 8 ++++---- include/linux/fs.h | 22 ++++++++++++++++++++++ kernel/fork.c | 12 ++++++------ 5 files changed, 36 insertions(+), 14 deletions(-) commit 95fad7fb58cfaa2a295aa54a1f001a16b9324963 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Mon Dec 9 12:52:48 2024 -0600 cpufreq/amd-pstate: Drop boost_state variable Currently boost_state is cached for every processor in cpudata structure and driver boost state is set for every processor. Both of these aren't necessary as the driver only needs to set once and the policy stores whether boost is enabled. Move the driver boost setting to registration and adjust all references to cached value to pull from the policy instead. Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241209185248.16301-16-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 26 +++++++++++++------------- drivers/cpufreq/amd-pstate.h | 1 - 2 files changed, 13 insertions(+), 14 deletions(-) commit f9a378ff6443cdcd4387e5dbb76fa5fa549a83ec Author: Mario Limonciello <mario.limonciello@amd.com> Date: Mon Dec 9 12:52:47 2024 -0600 cpufreq/amd-pstate: Set different default EPP policy for Epyc and Ryzen For Ryzen systems the EPP policy set by the BIOS is generally configured to performance as this is the default register value for the CPPC request MSR. If a user doesn't use additional software to configure EPP then the system will default biased towards performance and consume extra battery. Instead configure the default to "balanced_performance" for this case. Suggested-by: Artem S. Tashkinov <aros@gmx.com> Reviewed-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com> Tested-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219526 Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241209185248.16301-15-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit f8fde687c911a366a6132aed85f4ee6b647b9160 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Mon Dec 9 12:52:46 2024 -0600 cpufreq/amd-pstate: Drop ret variable from amd_pstate_set_energy_pref_index() The ret variable is not necessary. Reviewed-and-tested-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241209185248.16301-14-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit fff395796917ac3fe3b4c4607cb74a8dbdc17593 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Mon Dec 9 12:52:45 2024 -0600 cpufreq/amd-pstate: Always write EPP value when updating perf For MSR systems the EPP value is in the same register as perf targets and so divding them into two separate MSR writes is wasteful. In msr_update_perf(), update both EPP and perf values in one write to MSR_AMD_CPPC_REQ, and cache them if successful. To accomplish this plumb the EPP value into the update_perf call and modify all its callers to check the return value. As this unifies calls, ensure that the MSR write is necessary before flushing a write out. Also drop the comparison from the passive flow tracing. Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241209185248.16301-13-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate-trace.h | 7 +-- drivers/cpufreq/amd-pstate.c | 108 +++++++++++++++++++------------------ 2 files changed, 56 insertions(+), 59 deletions(-) commit b3781f30bfcfd7db12de2595adb01779e565e1c6 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Mon Dec 9 12:52:44 2024 -0600 cpufreq/amd-pstate: Cache EPP value and use that everywhere Cache the value in cpudata->epp_cached, and use that for all callers. As all callers use cached value merge amd_pstate_get_energy_pref_index() into show_energy_performance_preference(). Check if the EPP value is changed before writing it to MSR or shared memory region. Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241209185248.16301-12-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 105 ++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 62 deletions(-) commit 3f7b835fa4d0d06f82249a3aca989fdf9bdf4656 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Mon Dec 9 12:52:43 2024 -0600 cpufreq/amd-pstate: Move limit updating code The limit updating code in amd_pstate_epp_update_limit() should not only apply to EPP updates. Move it to amd_pstate_update_min_max_limit() so other callers can benefit as well. With this move it's not necessary to have clamp_t calls anymore because the verify callback is called when setting limits. Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241209185248.16301-11-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) commit 942718f2a236cb3b27d2dbb5942538681b6e0e88 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Mon Dec 9 12:52:42 2024 -0600 cpufreq/amd-pstate: Change amd_pstate_update_perf() to return an int As msr_update_perf() calls an MSR it's possible that it fails. Pass this return code up to the caller. Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241209185248.16301-10-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 68cb0e77b6439fea64c6907c563b7bd27f2ee57f Author: Mario Limonciello <mario.limonciello@amd.com> Date: Mon Dec 9 12:52:41 2024 -0600 cpufreq/amd-pstate: store all values in cpudata struct in khz Storing values in the cpudata structure in different units leads to confusion and hardcoded conversions elsewhere. After ratios are calculated store everything in khz for any future use. Adjust all relevant consumers for this change as well. Suggested-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241209185248.16301-9-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate-ut.c | 12 +++++------- drivers/cpufreq/amd-pstate.c | 28 ++++++++++++++-------------- 2 files changed, 19 insertions(+), 21 deletions(-) commit 474e7218e81e7932ed18f91969b72169005ff038 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Mon Dec 9 12:52:40 2024 -0600 cpufreq/amd-pstate: Only update the cached value in msr_set_epp() on success If writing the MSR MSR_AMD_CPPC_REQ fails then the cached value in the amd_cpudata structure should not be updated. Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241209185248.16301-8-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 88a95ba066a962d4d39c6a36b18bf665f51d3767 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Mon Dec 9 12:52:39 2024 -0600 cpufreq/amd-pstate: Use FIELD_PREP and FIELD_GET macros The FIELD_PREP and FIELD_GET macros improve readability and help to avoid shifting bugs. Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241209185248.16301-7-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 51 ++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 28 deletions(-) commit 3b43739824a6b617d8213dd2bce6fb1b2747c377 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Mon Dec 9 12:52:38 2024 -0600 cpufreq/amd-pstate: Drop cached epp_policy variable epp_policy is not used by any of the current code and there is no need to cache it. Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241209185248.16301-6-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 3 --- drivers/cpufreq/amd-pstate.h | 2 -- 2 files changed, 5 deletions(-) commit 6c093d5a5b73ec1caf1e706510ae6031af2f9d43 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Mon Dec 9 12:52:37 2024 -0600 cpufreq/amd-pstate: convert mutex use to guard() Using scoped guard declaration will unlock mutexes automatically. Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241209185248.16301-5-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) commit 4dcd130151a654108a414b298df9e21a0d3575c9 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Mon Dec 9 12:52:36 2024 -0600 cpufreq/amd-pstate: Add trace event for EPP perf updates In "active" mode the most important thing for debugging whether an issue is hardware or software based is to look at what was the last thing written to the CPPC request MSR or shared memory region. The 'amd_pstate_epp_perf' trace event shows the values being written for all CPUs. Reviewed-by: Perry Yuan <perry.yuan@amd.com> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241209185248.16301-4-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate-trace.h | 45 ++++++++++++++++++++++++++++++++++++++ drivers/cpufreq/amd-pstate.c | 28 ++++++++++++++++++++++++ 2 files changed, 73 insertions(+) commit 53ec2101dfede8fecdd240662281a12e537c3411 Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Date: Wed Dec 4 14:48:42 2024 +0000 cpufreq/amd-pstate: Merge amd_pstate_epp_cpu_offline() and amd_pstate_epp_offline() amd_pstate_epp_offline() is only called from within amd_pstate_epp_cpu_offline() and doesn't make much sense to have it at all. Hence, remove it. Also remove the unncessary debug print in the offline path while at it. Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241204144842.164178-6-Dhananjay.Ugwekar@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit b78f8c87ec3e7499bb049986838636d3afbc7ece Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Date: Wed Dec 4 14:48:41 2024 +0000 cpufreq/amd-pstate: Remove the cppc_state check in offline/online functions Only amd_pstate_epp driver (i.e. cppc_state = ACTIVE) enters the amd_pstate_epp_offline() and amd_pstate_epp_cpu_online() functions, so remove the unnecessary if condition checking if cppc_state is equal to AMD_PSTATE_ACTIVE. Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241204144842.164178-5-Dhananjay.Ugwekar@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit b1089e0c8817fda93d474eaa82ad86386887aefe Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Date: Wed Dec 4 14:48:40 2024 +0000 cpufreq/amd-pstate: Refactor amd_pstate_epp_reenable() and amd_pstate_epp_offline() Replace similar code chunks with amd_pstate_update_perf() and amd_pstate_set_epp() function calls. Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241204144842.164178-4-Dhananjay.Ugwekar@amd.com [ML: Fix LKP reported error about unused variable] Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) commit 57a2b25e45cd40eaa2e505452384fa1b7248895a Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Date: Wed Dec 4 14:48:39 2024 +0000 cpufreq/amd-pstate: Move the invocation of amd_pstate_update_perf() amd_pstate_update_perf() should not be a part of shmem_set_epp() function, so move it to the amd_pstate_epp_update_limit() function, where it is needed. Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241204144842.164178-3-Dhananjay.Ugwekar@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 16c977f8177f9c2ecb88319c944722107c952731 Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Date: Wed Dec 4 14:48:38 2024 +0000 cpufreq/amd-pstate: Convert the amd_pstate_get/set_epp() to static calls MSR and shared memory based systems have different mechanisms to get and set the epp value. Split those mechanisms into different functions and assign them appropriately to the static calls at boot time. This eliminates the need for the "if(cpu_feature_enabled(X86_FEATURE_CPPC))" checks at runtime. Also, propagate the error code from rdmsrl_on_cpu() and cppc_get_epp_perf() to *_get_epp()'s caller, instead of returning -EIO unconditionally. Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241204144842.164178-2-Dhananjay.Ugwekar@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> drivers/cpufreq/amd-pstate.c | 92 +++++++++++++++++++++++++++++--------------- 1 file changed, 60 insertions(+), 32 deletions(-) commit 5121711eb8dbcbed70b1db429a4665f413844164 Author: Josef Bacik <josef@toxicpanda.com> Date: Fri Nov 15 10:30:32 2024 -0500 fs: enable pre-content events on supported file systems Now that all the code has been added for pre-content events, and the various file systems that need the page fault hooks for fsnotify have been updated, add SB_I_ALLOW_HSM to the supported file systems. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/46960dcb2725fa0317895ed66a8409ba1c306a82.1731684329.git.josef@toxicpanda.com fs/btrfs/super.c | 2 +- fs/ext4/super.c | 3 +++ fs/xfs/xfs_super.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) commit bb480760ffc7018e21ee6f60241c2b99ff26ee0e Author: Jan Kara <jack@suse.cz> Date: Thu Nov 21 11:18:23 2024 +0100 ext4: add pre-content fsnotify hook for DAX faults ext4 has its own handling for DAX faults. Add the pre-content fsnotify hook for this case. Signed-off-by: Jan Kara <jack@suse.cz> fs/ext4/file.c | 3 +++ 1 file changed, 3 insertions(+) commit b722e40be2bda7a688f74e1a794121e84f717fdc Author: Josef Bacik <josef@toxicpanda.com> Date: Fri Nov 15 10:30:31 2024 -0500 btrfs: disable defrag on pre-content watched files We queue up inodes to be defrag'ed asynchronously, which means we do not have their original file for readahead. This means that the code to skip readahead on pre-content watched files will not run, and we could potentially read in empty pages. Handle this corner case by disabling defrag on files that are currently being watched for pre-content events. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/4cc5bcea13db7904174353d08e85157356282a59.1731684329.git.josef@toxicpanda.com fs/btrfs/ioctl.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7f4796a46571ced5d3d5b0942e1bfea1eedaaecd Author: Josef Bacik <josef@toxicpanda.com> Date: Fri Nov 15 10:30:30 2024 -0500 xfs: add pre-content fsnotify hook for DAX faults xfs has it's own handling for DAX faults, so we need to add the pre-content fsnotify hook for this case. Other faults go through filemap_fault so they're handled properly there. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/9eccdf59a65b72f0a1a5e2f2b9bff8eda2d4f2d9.1731684329.git.josef@toxicpanda.com fs/xfs/xfs_file.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 8392bc2ff8c8bf7c4c5e6dfa71ccd893a3c046f6 Author: Josef Bacik <josef@toxicpanda.com> Date: Fri Nov 15 10:30:29 2024 -0500 fsnotify: generate pre-content permission event on page fault FS_PRE_ACCESS will be generated on page fault depending on the faulting method. This pre-content event is meant to be used by hierarchical storage managers that want to fill in the file content on first read access. Export a simple helper that file systems that have their own ->fault() will use, and have a more complicated helper to be do fancy things in filemap_fault. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/aa56c50ce81b1fd18d7f5d71dd2dfced5eba9687.1731684329.git.josef@toxicpanda.com include/linux/mm.h | 1 + mm/filemap.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ mm/nommu.c | 7 ++++++ 3 files changed, 82 insertions(+) commit 9fc78ffaf0c72aefc4074d1492b313195d0c9970 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Thu Nov 28 17:23:40 2024 +0200 x86/Documentation: Elaborate Intel MID device list Intel MID includes several SoCs in the family, elaborate this in the respective line of the documentation. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241128152546.2396782-4-andriy.shevchenko@linux.intel.com Documentation/arch/x86/boot.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efba5970794159f45ea1e577258baa5d27cd6dfc Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Thu Nov 28 17:23:39 2024 +0200 x86/Documentation: Align Note Blocks style The file collects pieces from different epochs and hence has unaligned style of the Note Blocks (in terms of reStructuredText specification). Align the style to be the same structured: - start the text under 't' column from '.. note::' directive - convert a couple of plain text notes to use '.. note::' directive Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241128152546.2396782-3-andriy.shevchenko@linux.intel.com Documentation/arch/x86/boot.rst | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) commit f23d79d6c4acab3e46ad1d79668d3cdf69829746 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Thu Nov 28 17:23:38 2024 +0200 x86/Documentation: Make Literal Blocks to follow reStructuredText specification The file collects pieces from different epochs and hence has unaligned style of the Literal Blocks (in terms of reStructuredText specification). Make the Literal Blocks to follow the reStructuredText specification While at it, make the C-like code more C and follow the Kernel Coding style in them (after satisfying rST specification). Suggested-by: Ingo Molnar <mingo@kernel.org> Suggested-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241128152546.2396782-2-andriy.shevchenko@linux.intel.com Documentation/arch/x86/boot.rst | 327 ++++++++++++++++++++-------------------- 1 file changed, 162 insertions(+), 165 deletions(-) commit 311cf7164a40eb96be2af25a3948be21f76c5c41 Author: Gianfranco Trad <gianf.trad@gmail.com> Date: Fri Nov 15 02:18:35 2024 +0100 Documentation: kvm: fix typo in api.rst Fix minor typo in api.rst where the word physical was misspelled as physcial. Signed-off-by: Gianfranco Trad <gianf.trad@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241115011831.300705-5-gianf.trad@gmail.com Documentation/virt/kvm/api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a3f0a11b2f1d01fd4675c28fdcc72ea0d149385 Author: Ruffalo Lavoisier <ruffalolavoisier@gmail.com> Date: Wed Nov 20 13:34:13 2024 +0900 docs: remove duplicate word - Remove duplicate word, 'to'. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241120043414.78811-1-RuffaloLavoisier@gmail.com Documentation/admin-guide/sysctl/fs.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9734b3e753ad4081d8c146e2cae177528246f7ba Author: Thorsten Leemhuis <linux@leemhuis.info> Date: Mon Dec 2 09:12:19 2024 +0100 docs: 5.Posting: mentioned Suggested-by: tag Mention the Suggested-by: tag in 5.Posting.rst in a way similar to submitting-patches.rst, which according to the header of the latter is the less detailed document of the two. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Thorsten Leemhuis <linux@leemhuis.info> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/fbebad6605b02e372b24c2cfa1e05f789fed43d1.1733127086.git.linux@leemhuis.info Documentation/process/5.Posting.rst | 4 ++++ 1 file changed, 4 insertions(+) commit 126437fc26be0629585f956b890e6314f56cd63b Author: Randy Dunlap <rdunlap@infradead.org> Date: Sat Nov 30 00:11:06 2024 -0800 docs: debugging: add more info about devcoredump Correct a few small things in the devcoredump synopsis and then add the devcoredump APIs to it. Fixes: a037699da0a1 ("docs: Add debugging section to process") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Sebastian Fricke <sebastian.fricke@collabora.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: workflows@vger.kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241130081107.552503-1-rdunlap@infradead.org .../debugging/driver_development_debugging_guide.rst | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 28884915e6b14c9af4ddbb5f89d64edd863494c0 Author: Randy Dunlap <rdunlap@infradead.org> Date: Tue Nov 19 22:07:11 2024 -0800 Documentation: core-api: add generic parser docbook Add the simple generic parser to the core-api docbook. It can be used for parsing all sorts of options throughout the kernel. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Eric Biggers <ebiggers@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241120060711.159783-1-rdunlap@infradead.org Documentation/core-api/index.rst | 1 + Documentation/core-api/parser.rst | 17 +++++++++++++++++ lib/parser.c | 5 +++-- 3 files changed, 21 insertions(+), 2 deletions(-) commit bc7509446b456d6649afa60fce9104d169e94de1 Author: Carlos Bilbao <carlos.bilbao@kernel.org> Date: Fri Nov 29 09:58:47 2024 -0600 docs/sp_SP: Move development-process to top of index All documents in development-process are now translated. Reorder development-process to the top of the index for translated docs, matching the layout in the main Documentation index. Co-developed-by: Avadhut Naik <avadhut.naik@amd.com> Signed-off-by: Avadhut Naik <avadhut.naik@amd.com> Signed-off-by: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241129155851.1023884-8-carlos.bilbao.osdev@gmail.com .../translations/sp_SP/process/development-process.rst | 15 +++++++-------- Documentation/translations/sp_SP/process/index.rst | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) commit 1b2f1e192757ca3c0a3d8d6b33cb8d51e0a7d491 Author: Avadhut Naik <avadhut.naik@amd.com> Date: Fri Nov 29 09:58:46 2024 -0600 docs/sp_SP: Add translation of process/8.Conclusion.rst Translate Documentation/process/8.Conclusion.rst into Spanish, finishing the development-process docs. Co-developed-by: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> Signed-off-by: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> Signed-off-by: Avadhut Naik <avadhut.naik@amd.com> Signed-off-by: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241129155851.1023884-7-carlos.bilbao.osdev@gmail.com .../translations/sp_SP/process/8.Conclusion.rst | 75 +++++++++++++++++++++- .../sp_SP/process/development-process.rst | 1 + 2 files changed, 74 insertions(+), 2 deletions(-) commit b33bad520acc235ae1a53747e2534cb822d91687 Author: Avadhut Naik <avadhut.naik@amd.com> Date: Fri Nov 29 09:58:45 2024 -0600 docs/sp_SP: Add translation of process/7.AdvancedTopics.rst Translate Documentation/process/7.AdvancedTopics.rst into Spanish. Co-developed-by: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> Signed-off-by: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> Signed-off-by: Avadhut Naik <avadhut.naik@amd.com> Signed-off-by: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241129155851.1023884-6-carlos.bilbao.osdev@gmail.com .../sp_SP/process/7.AdvancedTopics.rst | 207 ++++++++++++++++++++- .../sp_SP/process/development-process.rst | 1 + 2 files changed, 206 insertions(+), 2 deletions(-) commit 6422b065809d3c24546ddb59020eba92902076e1 Author: Carlos Bilbao <carlos.bilbao@kernel.org> Date: Fri Nov 29 09:58:44 2024 -0600 docs/sp_SP: Add translation of process/6.Followthrough.rst Translate Documentation/process/6.Followthrough.rst into Spanish. Co-developed-by: Avadhut Naik <avadhut.naik@amd.com> Signed-off-by: Avadhut Naik <avadhut.naik@amd.com> Signed-off-by: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241129155851.1023884-5-carlos.bilbao.osdev@gmail.com .../translations/sp_SP/process/6.Followthrough.rst | 223 ++++++++++++++++++++- .../sp_SP/process/development-process.rst | 1 + 2 files changed, 222 insertions(+), 2 deletions(-) commit 08c42f22c7d83e29bf3f4ff466b34f8a61b76407 Author: Avadhut Naik <avadhut.naik@amd.com> Date: Fri Nov 29 09:58:43 2024 -0600 docs/sp_SP: Add translation of process/5.Posting.rst Translate Documentation/process/5.Posting.rst into Spanish. Co-developed-by: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> Signed-off-by: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> Signed-off-by: Avadhut Naik <avadhut.naik@amd.com> Signed-off-by: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241129155851.1023884-4-carlos.bilbao.osdev@gmail.com .../translations/sp_SP/process/5.Posting.rst | 388 ++++++++++++++++++++- .../sp_SP/process/development-process.rst | 1 + 2 files changed, 385 insertions(+), 4 deletions(-) commit ad7f6532b858a822a34ea1cf396ffcd00dfbf9f7 Author: Carlos Bilbao <carlos.bilbao@kernel.org> Date: Fri Nov 29 09:58:42 2024 -0600 docs/sp_SP: Add translation of process/4.Coding.rst Translate Documentation/process/4.Coding.rst into Spanish. Co-developed-by: Avadhut Naik <avadhut.naik@amd.com> Signed-off-by: Avadhut Naik <avadhut.naik@amd.com> Signed-off-by: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241129155851.1023884-3-carlos.bilbao.osdev@gmail.com .../translations/sp_SP/process/4.Coding.rst | 463 ++++++++++++++++++++- .../sp_SP/process/development-process.rst | 1 + 2 files changed, 462 insertions(+), 2 deletions(-) commit 42b5e1e213611f79c73a6fe15230c4dc680877ba Author: Carlos Bilbao <carlos.bilbao@kernel.org> Date: Fri Nov 29 09:58:41 2024 -0600 docs/sp_SP: Add translation of process/3.Early-stage.rst Translate Documentation/process/3.Early-stage.rst into Spanish. Co-developed-by: Avadhut Naik <avadhut.naik@amd.com> Signed-off-by: Avadhut Naik <avadhut.naik@amd.com> Signed-off-by: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241129155851.1023884-2-carlos.bilbao.osdev@gmail.com .../translations/sp_SP/process/3.Early-stage.rst | 234 ++++++++++++++++++++- .../sp_SP/process/development-process.rst | 1 + 2 files changed, 233 insertions(+), 2 deletions(-) commit e551bd4109d2083bec93d306b44e9b7233224a17 Author: Cengiz Can <cengiz@kernel.wtf> Date: Mon Dec 2 09:05:02 2024 +0000 Documentation: remove :kyb: tags :kyb: is an extra markup that we should avoid when we can. It worsens the plain-text reading experience and adds very little value to rendered views. Remove all :kbd: tags from Documentation/* Signed-off-by: Cengiz Can <cengiz@kernel.wtf> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241202090514.1716-1-cengiz@kernel.wtf Documentation/admin-guide/braille-console.rst | 4 +- Documentation/admin-guide/sysrq.rst | 20 ++++----- Documentation/dev-tools/kgdb.rst | 50 +++++++++++----------- Documentation/process/email-clients.rst | 8 ++-- Documentation/scheduler/sched-ext.rst | 6 +-- .../translations/it_IT/process/email-clients.rst | 8 ++-- .../translations/sp_SP/process/email-clients.rst | 8 ++-- .../translations/zh_CN/admin-guide/sysrq.rst | 22 +++++----- .../translations/zh_CN/process/email-clients.rst | 8 ++-- .../translations/zh_TW/admin-guide/sysrq.rst | 22 +++++----- .../translations/zh_TW/process/email-clients.rst | 8 ++-- 11 files changed, 82 insertions(+), 82 deletions(-) commit 3fcf68d7393fd622b96cd45124ccb1eddf77684c Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Mon Dec 9 15:27:39 2024 -0800 drm/xe: Apply whitelist to engine save-restore Instead of handling the whitelist directly in the GuC ADS initialization, make it follow the same logic as other engine registers that are save-restored. Main benefit is that then the SW tracking then shows it in debugfs and there's no risk of an engine workaround to write to the same nopriv register that is being passed directly to GuC. This means that xe_reg_whitelist_process_engine() only has to process the RTP and convert them to entries for the hwe. With that all the registers should be covered by xe_reg_sr_apply_mmio() to write to the HW and there's no special handling in GuC ADS to also add these registers to the list of registers that is passed to GuC. Example for DG2: # cat /sys/kernel/debug/dri/0000\:03\:00.0/gt0/register-save-restore ... Engine rcs0 ... REG[0x24d0] clr=0xffffffff set=0x1000dafc masked=no mcr=no REG[0x24d4] clr=0xffffffff set=0x1000db01 masked=no mcr=no REG[0x24d8] clr=0xffffffff set=0x0000db1c masked=no mcr=no ... Whitelist rcs0 REG[0xdafc-0xdaff]: allow read access REG[0xdb00-0xdb1f]: allow read access REG[0xdb1c-0xdb1f]: allow rw access v2: - Use ~0u for clr bits so it's just a write (Matt Roper) - Simplify helpers now that unused slots are not written Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241209232739.147417-6-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_gt.c | 4 +--- drivers/gpu/drm/xe/xe_guc_ads.c | 7 ------ drivers/gpu/drm/xe/xe_hw_engine.c | 1 - drivers/gpu/drm/xe/xe_reg_sr.c | 45 ----------------------------------- drivers/gpu/drm/xe/xe_reg_whitelist.c | 37 ++++++++++++++++++++++++++++ 5 files changed, 38 insertions(+), 56 deletions(-) commit c1151691b5e97b600a9ef3efd7c31a3abf568e41 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Mon Dec 9 15:27:38 2024 -0800 drm/xe/reg_sr: Stop setting all whitelist slots Currently xe_reg_sr_apply_whitelist() sets the unused values to a known used value for no good reason: it could just leave it with the HW default. The behavior is slightly different if there are no whitelist registers for the engine as the function returns early. This is not needed, so just drop the addition writes for the unused slots. Later this will allow to reduce the amount of registers passed to GuC for save/restore. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241209232739.147417-5-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_reg_sr.c | 7 ------- 1 file changed, 7 deletions(-) commit bd022199ce967cd4bfdd6cea2385448d72be2a80 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Mon Dec 9 15:27:37 2024 -0800 drm/xe/reg_sr: Convert whitelist to gt logging Part of the whitelist printing was already using gt-logging - convert the rest. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241209232739.147417-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_reg_sr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 26582fc61a923e81832df8d5a169bbdab095d15e Author: Michal Wajdeczko <michal.wajdeczko@intel.com> Date: Mon Dec 9 15:27:36 2024 -0800 drm/xe: Introduce xe_gt_dbg_printer() We didn't have GT-oriented debug level printer as it was hard to correctly show actual callsite annotation. But this is now doable from commit c2ef66e9ad88 ("drm/print: Improve drm_dbg_printer"). Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241209232739.147417-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_gt_printk.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit e5283bd4dfecbd3335f43b62a68e24dae23f59e4 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Mon Dec 9 15:27:35 2024 -0800 drm/xe/reg_sr: Remove register pool That pool implementation doesn't really work: if the krealloc happens to move the memory and return another address, the entries in the xarray become invalid, leading to use-after-free later: BUG: KASAN: slab-use-after-free in xe_reg_sr_apply_mmio+0x570/0x760 [xe] Read of size 4 at addr ffff8881244b2590 by task modprobe/2753 Allocated by task 2753: kasan_save_stack+0x39/0x70 kasan_save_track+0x14/0x40 kasan_save_alloc_info+0x37/0x60 __kasan_kmalloc+0xc3/0xd0 __kmalloc_node_track_caller_noprof+0x200/0x6d0 krealloc_noprof+0x229/0x380 Simplify the code to fix the bug. A better pooling strategy may be added back later if needed. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241209232739.147417-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_reg_sr.c | 31 ++++++------------------------- drivers/gpu/drm/xe/xe_reg_sr_types.h | 6 ------ 2 files changed, 6 insertions(+), 31 deletions(-) commit 9d0593da9459176396c1f2246efafbc80a828c7f Author: Davidlohr Bueso <dave@stgolabs.net> Date: Wed Nov 13 10:33:21 2024 -0800 riscv/futex: Optimize atomic cmpxchg Remove redundant release/acquire barriers, optimizing the lr/sc sequence to provide conditional RCsc synchronization, per the RVWMO. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Reviewed-by: Andrea Parri <parri.andrea@gmail.com> Link: https://lore.kernel.org/r/20241113183321.491113-1-dave@stgolabs.net Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> arch/riscv/include/asm/futex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0207244ea0e7fcf45e68e24b0fffe964624a22ef Author: Drew Fustini <drew@pdp7.com> Date: Wed Nov 13 10:43:36 2024 -0800 riscv: defconfig: enable pinctrl and dwmac support for TH1520 Enable pinctrl and ethernet dwmac driver for the TH1520 SoC boards like the BeagleV Ahead and the Sipeed LicheePi 4A. Signed-off-by: Drew Fustini <drew@pdp7.com> Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Link: https://lore.kernel.org/r/20241113184333.829716-1-drew@pdp7.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> arch/riscv/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit c5cf801914ef3e67923e5dc912e04167e665dd11 Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Mon Dec 2 13:03:43 2024 +0100 drm/vc4: plane: Remove WARN on state being set in plane_reset It is permitted on situations such as system resume for plane->state to be non-NULL, and that should be handled by freeing it. Do so. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Maíra Canal <mcanal@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241202120343.33726-1-wahrenst@gmx.net drivers/gpu/drm/vc4/vc4_plane.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit eb708cd631a8dca17ff004ccc39bbeb096c1db22 Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Wed Dec 11 13:35:58 2024 +0000 regmap: regmap_multi_reg_read(): make register list const Mark the list of registers passed into regmap_multi_reg_read() as a pointer to const. This allows the caller to define the register list as const data. This requires making the same change to _regmap_bulk_read(), which is called by regmap_multi_reg_read(). Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241211133558.884669-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/base/regmap/regmap.c | 4 ++-- include/linux/regmap.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 1b1d865715e0eda52e62226261651e97673773d6 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:01:41 2024 +0100 HID: roccat: pyro: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-roccat-pyra.c | 50 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit cdc6829c2cf086ce76007b17173079a78997539e Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:01:40 2024 +0100 HID: roccat: lua: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-roccat-lua.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 79ef5c3598fd3163b71273547b73f1450bc632ab Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:01:39 2024 +0100 HID: roccat: kovaplus: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-roccat-kovaplus.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 4b02dcc0b87d70634237a38d262869e3925ce134 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:01:38 2024 +0100 HID: roccat: koneplus: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-roccat-koneplus.c | 42 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit badcb329b9aa624292cd2e97e2e66fb1a2b5de17 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:01:37 2024 +0100 HID: roccat: kone: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-roccat-kone.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 03445591bd8665ddceee102bb875475ad5f81064 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:01:36 2024 +0100 HID: roccat: isku: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-roccat-isku.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 68489bad2b151949b9fa9a340e264f48bdc9e64f Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:01:35 2024 +0100 HID: roccat: arvo: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-roccat-arvo.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 66f58ab4273d0df6c732fe9bceffdab9bbd44201 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:01:34 2024 +0100 HID: roccat: common, konepure, ryos, savu: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-roccat-common.h | 22 +++++++++++----------- drivers/hid/hid-roccat-konepure.c | 4 ++-- drivers/hid/hid-roccat-ryos.c | 4 ++-- drivers/hid/hid-roccat-savu.c | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) commit d80286711e4d7e3aa4c86e179612d712441d4e24 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:01:33 2024 +0100 HID: core: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 725bf3d8faab91cfd55e275752509fed851da643 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:01:32 2024 +0100 HID: core: use utility macros to define sysfs attributes Save some lines of code and prepare for the constification of 'struct bin_attribute'. Also align the definitions within the source file. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-core.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit e02b876cf4c171fecc0f3b4910ed3029db566369 Author: Aleksandrs Vinarskis <alex.vinarskis@gmail.com> Date: Thu Oct 31 08:31:42 2024 +0100 HID: i2c-hid: introduce qtec vendor, enable re-power-on quirk This solves keyboard not working until suspend&resume issue on Dell XPS 9345 13" (codenamed 'tributo'). Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/hid-ids.h | 2 ++ drivers/hid/i2c-hid/i2c-hid-core.c | 5 +++++ 2 files changed, 7 insertions(+) commit e61080220ae7b52920aed292c8d399ea8ce7cfdb Author: Aleksandrs Vinarskis <alex.vinarskis@gmail.com> Date: Thu Oct 31 08:31:41 2024 +0100 HID: i2c-hid: introduce re-power-on quirk It appears some keyboards from vendor 'QTEC' will not work properly until suspend & resume. Empirically narrowed down to solution of re-sending power on command _after_ initialization was completed before the end of initial probing. Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/i2c-hid/i2c-hid-core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c0b8980e6041afa363361e41fcafd7862721c3ee Author: James Chapman <jchapman@katalix.com> Date: Mon Dec 9 11:46:07 2024 +0000 l2tp: Handle eth stats using NETDEV_PCPU_STAT_DSTATS. l2tp_eth uses the TSTATS infrastructure (dev_sw_netstats_*()) for RX and TX packet counters and DEV_STATS_INC for dropped counters. Consolidate that using the DSTATS infrastructure, which can handle both packet counters and packet drops. Statistics that don't fit DSTATS are still updated atomically with DEV_STATS_INC(). This change is inspired by the introduction of DSTATS helpers and their use in other udp tunnel drivers: Link: https://lore.kernel.org/all/cover.1733313925.git.gnault@redhat.com/ Signed-off-by: James Chapman <jchapman@katalix.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/l2tp/l2tp_eth.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 42d28736a5a4c3f499bb2d4b7fd84e334bdd5489 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Tue Dec 10 18:24:26 2024 +0100 ALSA: sonicvibes: Use str_on_off() helper in snd_sonicvibes_proc_read() Remove hard-coded strings by using the str_on_off() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20241210172428.139643-2-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/sonicvibes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ab20bcb2d0c80b4df9f9a6ef86c6e47d5d10cba0 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Wed Dec 11 09:09:55 2024 +0100 ASoC: dt-bindings: convert rt5682.txt to dt-schema Convert the text bindings for the Realtek rt5682 and rt5682i codecs to dt-schema. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20241211-topic-misc-rt5682-convert-v2-1-9e1dd4ff7093@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org> .../devicetree/bindings/sound/realtek,rt5682.yaml | 156 +++++++++++++++++++++ Documentation/devicetree/bindings/sound/rt5682.txt | 98 ------------- 2 files changed, 156 insertions(+), 98 deletions(-) commit 699a9733a354d74482ae4d4304acdbb0c0318a23 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:48 2024 +0200 ASoC: dt-bindings: renesas,rz-ssi: Document the Renesas RZ/G3S SoC The SSI IP variant present on the Renesas RZ/G3S SoC is similar to the one found on the Renesas RZ/G2{UL, L, LC} SoCs. Add documentation for it. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/20241210170953.2936724-20-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml | 1 + 1 file changed, 1 insertion(+) commit c28dac5d3a6e87615d4c8e50f574c320172a3d55 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:47 2024 +0200 ASoC: dt-bindings: renesas,rz-ssi: Remove DMA description Remove the DMA description, as it duplicates content from ../dma/renesas,rz-dma.yaml. Additionally, remove the MID/RID examples mentioned in the dropped description (this information is already documented in the hardware manual). Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241210170953.2936724-19-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> .../devicetree/bindings/sound/renesas,rz-ssi.yaml | 18 ------------------ 1 file changed, 18 deletions(-) commit 1fc778f7c833aeb13041adc06f016f1a2dff7350 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:46 2024 +0200 ASoC: renesas: rz-ssi: Add suspend to RAM support The SSIF-2 IP is available on the Renesas RZ/G3S SoC. The Renesas RZ/G3S SoC supports a power-saving mode where power to most of the SoC components is turned off. Add suspend/resume support to the SSIF-2 driver to support this power-saving mode. On SNDRV_PCM_TRIGGER_SUSPEND trigger the SSI is stopped (the stream user pointer is left untouched to avoid breaking user space and the dma buffer pointer is set to zero), on SNDRV_PCM_TRIGGER_RESUME software reset is issued for the SSIF-2 IP and the clocks are re-configured. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241210170953.2936724-18-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/renesas/rz-ssi.c | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) commit fc2a31affb22394d1d74d3ecc86b5c68da33d52a Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:45 2024 +0200 ASoC: renesas: rz-ssi: Issue software reset in hw_params API The code initially issued software reset on SNDRV_PCM_TRIGGER_START action only before starting the first stream. This can be easily moved to hw_params() as the action is similar to setting the clocks. Moreover, according to the hardware manual (Table 35.7 Bits Initialized by Software Reset of the SSIFCR.SSIRST Bit) the software reset action acts also on the clock dividers bits. Due to this issue the software reset in hw_params() before configuring the clock dividers. This also simplifies the code in trigger API. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241210170953.2936724-17-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/renesas/rz-ssi.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 3888672495fcaee98b90196c0a899b1c2eb57d5b Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:44 2024 +0200 ASoC: renesas: rz-ssi: Add runtime PM support Add runtime PM support to the ssi driver. This assert/de-assert the reset lines on runtime suspend/resume. Along with it the de-assertion of the reset line from probe function was removed as it is not necessary anymore. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241210170953.2936724-16-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/renesas/rz-ssi.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit cf3a79e4f826fc680fd7bfef7c427e2cc6023bc3 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:43 2024 +0200 ASoC: renesas: rz-ssi: Enable runtime PM autosuspend support Enable runtime PM autosuspend support. The chosen autosuspend delay is zero for immediate autosuspend. In case there are users that need a different autosuspend delay, it can be adjusted through sysfs. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241210170953.2936724-15-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/renesas/rz-ssi.c | 3 +++ 1 file changed, 3 insertions(+) commit e8fcf25f562891d5c0734d4f49c44bb6aa72bc15 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:42 2024 +0200 ASoC: renesas: rz-ssi: Rely on the ASoC subsystem to runtime resume/suspend the SSI The ASoC subsystem takes care of runtime resume/suspend the audio devices when needed. Just enable the runtime PM on the SSI driver and let the subsystem runtime resume/suspend it. While at it use directly the devm_pm_runtime_enable(). Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241210170953.2936724-14-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/renesas/rz-ssi.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit f0c155c9da7536ab33687b5207eb21e704122a56 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:41 2024 +0200 ASoC: renesas: rz-ssi: Use goto label names that specify their actions Use goto label names that specify their action. In this way we can have a better understanding of what is the action associated with the label by just reading the label name. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241210170953.2936724-13-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/renesas/rz-ssi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 403366d2a43eb7c911c6cddf1d7882e429d1212d Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:40 2024 +0200 ASoC: renesas: rz-ssi: Use temporary variable for struct device Use a temporary variable for the struct device pointers to avoid dereferencing. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241210170953.2936724-12-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/renesas/rz-ssi.c | 62 +++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit 4bf77dfa3308b7cfda29d9c4ead1dc32f1ceefa9 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:39 2024 +0200 ASoC: renesas: rz-ssi: Use readl_poll_timeout_atomic() Use readl_poll_timeout_atomic() instead of hardcoding something similar. While at it replace dev_info() with dev_warn_ratelimited() as the rz_ssi_set_idle() can also be called from IRQ context and if the SSI idle is not properly set this is at least a warning for user. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241210170953.2936724-11-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/renesas/rz-ssi.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 109e60866f11c7db8f720f01b0bda3105c47b463 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:38 2024 +0200 ASoC: renesas: rz-ssi: Remove the first argument of rz_ssi_stream_is_play() The first argument of the rz_ssi_stream_is_play() is not used. Remove it. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241210170953.2936724-10-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/renesas/rz-ssi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit dec61e16e72db196e8dc1daf7f7022fd98e6d921 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:37 2024 +0200 ASoC: renesas: rz-ssi: Remove the rz_ssi_get_dai() function Remove the rz_ssi_get_dai() function and use directly the snd_soc_rtd_to_cpu() where needed or the struct device pointer embedded in the struct rz_ssi_priv objects. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241210170953.2936724-9-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/renesas/rz-ssi.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit a73710a25808a585a2bf0a8325eb16fd6a2f370c Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:36 2024 +0200 ASoC: renesas: rz-ssi: Remove pdev member of struct rz_ssi_priv Remove the pdev member of struct rz_ssi_priv as it is not used. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241210170953.2936724-8-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/renesas/rz-ssi.c | 2 -- 1 file changed, 2 deletions(-) commit 100c6b22d6c70adabdf45dcb346d7d853bff6a30 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:35 2024 +0200 ASoC: renesas: rz-ssi: Fix typo on SSI_RATES macro comment The SSI_RATES macro covers 8KHz-48KHz audio frequencies. Update macro comment to reflect it. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241210170953.2936724-7-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/renesas/rz-ssi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55c209cd4318c701e6e88e0b2512a0f12dd02a7d Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:34 2024 +0200 ASoC: renesas: rz-ssi: Use only the proper amount of dividers There is no need to populate the ckdv[] with invalid dividers as that part will not be indexed anyway. The ssi->audio_mck/bclk_rate should always be >= 0. While at it, change the ckdv type as u8, as the divider 128 was previously using the s8 sign bit. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Fixes: 03e786bd43410fa9 ("ASoC: sh: Add RZ/G2L SSIF-2 driver") Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/20241210170953.2936724-6-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/renesas/rz-ssi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 541011dc2d7c4c82523706f726f422a5e23cc86f Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:33 2024 +0200 ASoC: renesas: rz-ssi: Terminate all the DMA transactions The stop trigger invokes rz_ssi_stop() and rz_ssi_stream_quit(). - The purpose of rz_ssi_stop() is to disable TX/RX, terminate DMA transactions, and set the controller to idle. - The purpose of rz_ssi_stream_quit() is to reset the substream-specific software data by setting strm->running and strm->substream appropriately. The function rz_ssi_is_stream_running() checks if both strm->substream and strm->running are valid and returns true if so. Its implementation is as follows: static inline bool rz_ssi_is_stream_running(struct rz_ssi_stream *strm) { return strm->substream && strm->running; } When the controller is configured in full-duplex mode (with both playback and capture active), the rz_ssi_stop() function does not modify the controller settings when called for the first substream in the full-duplex setup. Instead, it simply sets strm->running = 0 and returns if the companion substream is still running. The following code illustrates this: static int rz_ssi_stop(struct rz_ssi_priv *ssi, struct rz_ssi_stream *strm) { strm->running = 0; if (rz_ssi_is_stream_running(&ssi->playback) || rz_ssi_is_stream_running(&ssi->capture)) return 0; // ... } The controller settings, along with the DMA termination (for the last stopped substream), are only applied when the last substream in the full-duplex setup is stopped. While applying the controller settings only when the last substream stops is not problematic, terminating the DMA operations for only one substream causes failures when starting and stopping full-duplex operations multiple times in a loop. To address this issue, call dmaengine_terminate_async() for both substreams involved in the full-duplex setup when the last substream in the setup is stopped. Fixes: 4f8cd05a4305 ("ASoC: sh: rz-ssi: Add full duplex support") Cc: stable@vger.kernel.org Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/20241210170953.2936724-5-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/renesas/rz-ssi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4ee06e3b6120a77fd3967c2c62268083d26c5500 Author: Maíra Canal <mcanal@igalia.com> Date: Fri Dec 6 12:39:09 2024 -0300 drm/v3d: Fix miscellaneous documentation errors This commit fixes several miscellaneous documentation errors. Mostly, delete/update comments that are outdated or are leftovers from past code changes. Apart from that, remove double-spaces in several comments. Signed-off-by: Maíra Canal <mcanal@igalia.com> Acked-by: Iago Toral Quiroga <itoral@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241206153908.62429-1-mcanal@igalia.com drivers/gpu/drm/v3d/v3d_bo.c | 4 ---- drivers/gpu/drm/v3d/v3d_mmu.c | 8 ++++---- drivers/gpu/drm/v3d/v3d_performance_counters.h | 12 +++++------- drivers/gpu/drm/v3d/v3d_sched.c | 12 ++++++------ drivers/gpu/drm/v3d/v3d_submit.c | 9 +++++---- 5 files changed, 20 insertions(+), 25 deletions(-) commit 54d3970548bd9de40f921c95f8c31e1b1b2382cb Author: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Date: Mon Dec 9 11:24:11 2024 +0500 net: renesas: rswitch: enable only used MFWD features Currently, rswitch driver does not utilize most of MFWD forwarding and processing features. It only uses port-based forwarding for ETHA ports, and direct descriptor forwarding for GWCA port. Update rswitch_fwd_init() to enable exactly that, and keep everything else disabled. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/renesas/rswitch.c | 30 ++++++++++++++++++++---------- drivers/net/ethernet/renesas/rswitch.h | 14 ++++++++------ 2 files changed, 28 insertions(+), 16 deletions(-) commit 609bc99a4452ffbce82d10f024a85d911c42e6cd Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Thu Nov 14 13:44:29 2024 +0100 dt-bindings: leds: class-multicolor: Fix path to color definitions The LED color definitions have always been in include/dt-bindings/leds/common.h in upstream. Fixes: 5c7f8ffe741daae7 ("dt: bindings: Add multicolor class dt bindings documention") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/a3c7ea92e90b77032f2e480d46418b087709286d.1731588129.git.geert+renesas@glider.be Signed-off-by: Lee Jones <lee@kernel.org> Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d2e820a86793595e2a776855d04701109e46663 Author: Alexander Sverdlin <alexander.sverdlin@siemens.com> Date: Thu Nov 14 11:13:59 2024 +0100 leds: lp8860: Write full EEPROM, not only half of it I struggle to explain dividing an ARRAY_SIZE() by the size of an element once again. As the latter equals to 2, only the half of EEPROM was ever written. Drop the unexplainable division and write full ARRAY_SIZE(). Cc: stable@vger.kernel.org Fixes: 7a8685accb95 ("leds: lp8860: Introduce TI lp8860 4 channel LED driver") Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Link: https://lore.kernel.org/r/20241114101402.2562878-1-alexander.sverdlin@siemens.com Signed-off-by: Lee Jones <lee@kernel.org> drivers/leds/leds-lp8860.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d880452fb3edc4645e28264381ce35606fb1b19 Author: Colin Ian King <colin.i.king@gmail.com> Date: Thu Sep 12 14:10:17 2024 +0100 dmaengine: amd: qdma: make read-only arrays h2c_types and c2h_types static const Don't populate the read-only arrays h2c_types and c2h_types on the stack at run time, instead make them static const. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20240912131017.588141-1-colin.i.king@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/amd/qdma/qdma.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 24947be1c7da99036e8336de160457599bc124d7 Author: Melody Olvera <quic_molvera@quicinc.com> Date: Mon Oct 21 16:05:00 2024 -0700 dt-bindings: dma: qcom,gpi: Document the sm8750 GPI DMA engine Document the GPI DMA engine on the sm8750 platform. Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241021230500.2632527-1-quic_molvera@quicinc.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 + 1 file changed, 1 insertion(+) commit 80a9b50b1333fce036154615c31be981044108a1 Author: Fenghua Yu <fenghua.yu@intel.com> Date: Thu Oct 24 11:35:00 2024 -0700 dmaengine: idxd: Add a new IAA device ID on Panther Lake family platforms A new IAA device ID, 0xb02d, is introduced across all Panther Lake family platforms. Add the device ID to the IDXD driver. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Link: https://lore.kernel.org/r/20241024183500.281268-1-fenghua.yu@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/idxd/init.c | 2 ++ drivers/dma/idxd/registers.h | 1 + 2 files changed, 3 insertions(+) commit 6faf1ccadad6718957753d6cda2281416b288bde Author: Mesih Kilinc <mesihkilinc@gmail.com> Date: Fri Nov 22 17:11:31 2024 +0100 dma-engine: sun4i: Add support for Allwinner suniv F1C100s DMA of Allwinner suniv F1C100s is similar to sun4i. It has 4 NDMA, 4 DDMA channels and endpoints are different. Also F1C100s has reset bit for DMA in CCU. Add support for it. Signed-off-by: Mesih Kilinc <mesihkilinc@gmail.com> [ csokas.bence: Rebased on current master ] Signed-off-by: Csókás Bence <csokas.bence@prolan.hu> Link: https://lore.kernel.org/r/20241122161128.2619172-5-csokas.bence@prolan.hu Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/Kconfig | 4 ++-- drivers/dma/sun4i-dma.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 2 deletions(-) commit fdcdcc57152a5f4250dab5a1ec17d2e4b8311c02 Author: Csókás, Bence <csokas.bence@prolan.hu> Date: Fri Nov 22 17:11:30 2024 +0100 dt-bindings: dmaengine: Add Allwinner suniv F1C100s DMA Add compatible string for Allwinner suniv F1C100s DMA. Acked-by: Conor Dooley <conor.dooley@microchip.com> [ csokas.bence: Reimplemented Mesih Kilinc's binding in YAML ] Signed-off-by: Csókás Bence <csokas.bence@prolan.hu> Link: https://lore.kernel.org/r/20241122161128.2619172-4-csokas.bence@prolan.hu Signed-off-by: Vinod Koul <vkoul@kernel.org> Documentation/devicetree/bindings/dma/allwinner,sun4i-a10-dma.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e17ca0effaed4616a0e07fa77d7ee1acdad9c85e Author: Mesih Kilinc <mesihkilinc@gmail.com> Date: Fri Nov 22 17:11:29 2024 +0100 dma-engine: sun4i: Add has_reset option to quirk Allwinner suniv F1C100s has a reset bit for DMA in CCU. Sun4i do not has this bit but in order to support suniv we need to add it. So add support for reset bit. Signed-off-by: Mesih Kilinc <mesihkilinc@gmail.com> [ csokas.bence: Rebased and addressed comments ] Signed-off-by: Csókás Bence <csokas.bence@prolan.hu> Link: https://lore.kernel.org/r/20241122161128.2619172-3-csokas.bence@prolan.hu Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/sun4i-dma.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit a2186c2cd3a700df0467d2c3b23fab4e50dde373 Author: Mesih Kilinc <mesihkilinc@gmail.com> Date: Fri Nov 22 17:11:25 2024 +0100 dma-engine: sun4i: Add a quirk to support different chips Allwinner suniv F1C100s has similar DMA engine to sun4i. Several registers has different addresses. Total dma channels, endpoint counts and max burst counts are also different. In order to support F1C100s add a quirk structure to hold IC specific data. Signed-off-by: Mesih Kilinc <mesihkilinc@gmail.com> [ csokas.bence: Resolve conflict in `sun4i_dma_prep_dma_cyclic()`, fix whitespace ] Signed-off-by: Csókás Bence <csokas.bence@prolan.hu> Link: https://lore.kernel.org/r/20241122161128.2619172-2-csokas.bence@prolan.hu Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/sun4i-dma.c | 137 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 105 insertions(+), 32 deletions(-) commit e7402a7983de1c7148ee0fdc024fe5242f2c3357 Author: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Date: Mon Dec 9 13:55:04 2024 +0100 arm64: dts: renesas: gray-hawk-single: Add video capture support The Gray-Hawk single board contains two MAX96724 connected to the using I2C and CSI-2, record the connections. Also enable all nodes (VIN, CSI-2 and ISP) that are part of the downstream video capture pipeline. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241209125504.2010984-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> .../boot/dts/renesas/r8a779h0-gray-hawk-single.dts | 169 +++++++++++++++++++++ 1 file changed, 169 insertions(+) commit b1000645dc29701fafd12d0c6f22ab080de6ab43 Author: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Date: Fri Dec 6 11:32:43 2024 +0200 arm64: dts: renesas: gray-hawk-single: Add DisplayPort support Add support for the mini DP output on the Gray Hawk board. Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241206-rcar-gh-dsi-v3-10-d74c2166fa15@ideasonboard.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> .../boot/dts/renesas/r8a779h0-gray-hawk-single.dts | 105 +++++++++++++++++++++ 1 file changed, 105 insertions(+) commit c2484af44be1ee55cc9116fcde2b4dffe9bfcf5d Author: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Date: Fri Dec 6 11:32:42 2024 +0200 arm64: dts: renesas: r8a779h0: Add display support Add the device nodes for supporting DU and DSI. Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241206-rcar-gh-dsi-v3-9-d74c2166fa15@ideasonboard.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/r8a779h0.dtsi | 73 +++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit 4fd66d72b9d0b2b343332aec309ae8861f881181 Author: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Date: Fri Dec 6 11:32:41 2024 +0200 arm64: dts: renesas: gray-hawk-single: Fix indentation Fix the indent on the two regulators. Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241206-rcar-gh-dsi-v3-8-d74c2166fa15@ideasonboard.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> .../boot/dts/renesas/r8a779h0-gray-hawk-single.dts | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) commit 0f818db20c77506ddd870761785740f8230a4207 Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Date: Wed Dec 11 01:06:14 2024 +0200 drm/rockchip: dw_hdmi_qp: Add support for RK3588 HDMI1 output Provide the basic support required to enable the second HDMI TX port found on RK3588 SoC. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Tested-by: Alexandre ARNOUD <aarnoud@me.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241211-rk3588-hdmi1-v2-1-02cdca22ff68@collabora.com drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 119 ++++++++++++++++++++----- 1 file changed, 96 insertions(+), 23 deletions(-) commit b47325cc1f7820e01755acca9ee09d1de240e7d4 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Wed Nov 20 11:30:46 2024 +0100 ARM: dts: renesas: r7s72100: Add DMA support to RSPI Add DMA properties to the device nodes for Renesas Serial Peripheral Interfaces. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/dfafc16b840630f20e75292d419479294558e173.1732098491.git.geert+renesas@glider.be arch/arm/boot/dts/renesas/r7s72100.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d4276259f3a57131291d879b53fc05863c6b59fa Author: Pei Xiao <xiaopei01@kylinos.cn> Date: Thu Nov 21 10:40:03 2024 +0800 coresight: Fix dsb_mode_store() unsigned val is never less than zero dsb_mode_store() warn: unsigned 'val' is never less than zero. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202410150702.UaZ7kvet-lkp@intel.com/ Fixes: 018e43ad1eee ("coresight-tpdm: Add node to set dsb programming mode") Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/122503017ada249fbf12be3fa4ee6ccb8f8c78cc.1732156624.git.xiaopei01@kylinos.cn drivers/hwtracing/coresight/coresight-tpdm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f7d7454607cf863cc860e201636117e242d45fe0 Author: Mao Jinlong <quic_jinlmao@quicinc.com> Date: Thu Nov 21 14:28:29 2024 +0800 coresight: dummy: Add static trace id support for dummy source Some dummy source has static trace id configured in HW and it cannot be changed via software programming. Configure the trace id in device tree and reserve the id when device probe. Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com> Link: https://lore.kernel.org/r/20241121062829.11571-4-quic_jinlmao@quicinc.com [ Fix Date and Version to December 2024, v6.14 ] Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> .../sysfs-bus-coresight-devices-dummy-source | 15 ++++ drivers/hwtracing/coresight/coresight-dummy.c | 81 +++++++++++++++++++--- 2 files changed, 87 insertions(+), 9 deletions(-) commit fd9b7e8e9fbc23d69fa4accc881dea2cf13a2e2e Author: Mao Jinlong <quic_jinlmao@quicinc.com> Date: Thu Nov 21 14:28:28 2024 +0800 coresight: Add support to get static id for system trace sources Dynamic trace id was introduced in coresight subsystem, so trace id is allocated dynamically. However, some hardware ATB source has static trace id and it cannot be changed via software programming. For such source, it can call coresight_get_static_trace_id to get the fixed trace id from device node and pass id to coresight_trace_id_get_static_system_id to reserve the id. Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com> Reviewed-by: Mike Leach <mike.leach@linaro.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20241121062829.11571-3-quic_jinlmao@quicinc.com drivers/hwtracing/coresight/coresight-platform.c | 6 ++++ drivers/hwtracing/coresight/coresight-trace-id.c | 43 +++++++++++++++++------- drivers/hwtracing/coresight/coresight-trace-id.h | 9 +++++ include/linux/coresight.h | 1 + 4 files changed, 47 insertions(+), 12 deletions(-) commit d0a10da78cbfabcbc2eda87ac238bc03bb2b2c81 Author: Mao Jinlong <quic_jinlmao@quicinc.com> Date: Thu Nov 21 14:28:27 2024 +0800 dt-bindings: arm: Add arm,static-trace-id for coresight dummy source Some dummy source HW has static trace id which cannot be changed via software programming. Add arm,static-trace-id for static id support to coresight dummy source. Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Mike Leach <mike.leach@linaro.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20241121062829.11571-2-quic_jinlmao@quicinc.com .../devicetree/bindings/arm/arm,coresight-dummy-source.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 5aec7c065fba0c56d6c1ea5d629395210f174be8 Author: James Clark <james.clark@linaro.org> Date: Thu Nov 28 12:14:14 2024 +0000 coresight: Drop atomics in connection refcounts These belong to the device being enabled or disabled and are only ever used inside the device's spinlock. Remove the atomics to not imply that there are any other concurrent accesses. If atomics were necessary I don't think they would have been enough anyway. There would be nothing to prevent an enable or disable running concurrently if not for the spinlock. Signed-off-by: James Clark <james.clark@linaro.org> Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20241128121414.2425119-1-james.clark@linaro.org drivers/hwtracing/coresight/coresight-funnel.c | 6 +++--- drivers/hwtracing/coresight/coresight-replicator.c | 6 +++--- drivers/hwtracing/coresight/coresight-tpda.c | 6 +++--- include/linux/coresight.h | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) commit c8ea5f41b4212fd6c76070bd9432f1bdec64f6b0 Author: Songwei Chai <quic_songchai@quicinc.com> Date: Wed Oct 9 17:17:27 2024 +0800 Coresight: Narrow down the matching range of tpdm The format of tpdm's peripheral id is 1f0exx. To avoid potential conflicts in the future, update the .id_table's id to 0x001f0e00. This update will narrow down the matching range and prevent incorrect matches. For example, another component's peripheral id might be f0e00, which would incorrectly match the old id. Fixes: b3c71626a933 ("Coresight: Add coresight TPDM source driver") Signed-off-by: Songwei Chai <quic_songchai@quicinc.com> [ trimmmed Fixes commit sha to 12 chars ] Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20241009091728.1638-1-quic_songchai@quicinc.com drivers/hwtracing/coresight/coresight-tpdm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f2efcd90b58d74e6aab7ba47ead0dedc543c0145 Author: Jani Nikula <jani.nikula@intel.com> Date: Thu Dec 5 11:30:42 2024 +0200 drm/i915/display: clean up DP Adaptive Sync SDP state mismatch logging Pass the drm_printer from intel_pipe_config_compare(), and use it for logging, along with pipe_config_mismatch(), to simplify and unify. While at it, differentiate the VSC and AS SDP log texts from each other. Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241205093042.3028608-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_display.c | 29 ++++++++++------------------ 1 file changed, 10 insertions(+), 19 deletions(-) commit ec62d37d2c0d9981da8df0f272a724f5b76181dc Author: Boris Brezillon <boris.brezillon@collabora.com> Date: Wed Dec 11 08:54:19 2024 +0100 drm/panthor: Fix the fast-reset logic If we do a GPU soft-reset, that's no longer fast reset. This also means the slow reset fallback doesn't work because the MCU state is only reset after a GPU soft-reset. Let's move the retry logic to panthor_device_resume() to issue a soft-reset between the fast and slow attempts, and patch panthor_gpu_suspend() to only power-off the L2 when a fast reset is requested. v3: - No changes v2: - Add R-b Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211075419.2333731-6-boris.brezillon@collabora.com drivers/gpu/drm/panthor/panthor_device.c | 32 ++++++++++++++----- drivers/gpu/drm/panthor/panthor_device.h | 11 +++++++ drivers/gpu/drm/panthor/panthor_fw.c | 54 +++++++------------------------- drivers/gpu/drm/panthor/panthor_gpu.c | 11 ++++--- 4 files changed, 53 insertions(+), 55 deletions(-) commit 303e9e981db6c9f0ccd8067f0971416d929be426 Author: Boris Brezillon <boris.brezillon@collabora.com> Date: Wed Dec 11 08:54:18 2024 +0100 drm/panthor: Be robust against resume failures When the runtime PM resume callback returns an error, it puts the device in a state where it can't be resumed anymore. Make sure we can recover from such transient failures by calling pm_runtime_set_suspended() explicitly after a pm_runtime_resume_and_get() failure. v3: - Add R-b/A-b v2: - Add a comment explaining potential races in panthor_device_resume_and_get() Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Adrian Larumbe <adrian.larumbe@collabora.com> Acked-by: Steven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211075419.2333731-5-boris.brezillon@collabora.com drivers/gpu/drm/panthor/panthor_device.c | 1 + drivers/gpu/drm/panthor/panthor_device.h | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/panthor/panthor_drv.c | 2 +- drivers/gpu/drm/panthor/panthor_sched.c | 4 ++-- 4 files changed, 30 insertions(+), 3 deletions(-) commit b0758224e5d83d8ee153645b1e5de98085690b65 Author: Boris Brezillon <boris.brezillon@collabora.com> Date: Wed Dec 11 08:54:17 2024 +0100 drm/panthor: Ignore devfreq_{suspend, resume}_device() failures devfreq_{resume,suspend}_device() don't bother undoing the suspend_count modifications if something fails, so either it assumes failures are harmless, or it's super fragile/buggy. In either case it's not something we can address at the driver level, so let's just assume failures are harmless for now, like is done in panfrost. v3: - Add R-b v2: - Add R-b Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Reviewed-by: Adrian Larumbe <adrian.larumbe@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211075419.2333731-4-boris.brezillon@collabora.com drivers/gpu/drm/panthor/panthor_devfreq.c | 12 +++++------ drivers/gpu/drm/panthor/panthor_devfreq.h | 4 ++-- drivers/gpu/drm/panthor/panthor_device.c | 35 +++---------------------------- 3 files changed, 11 insertions(+), 40 deletions(-) commit dcddad6c897d568d4503ed0905b87b2530b72f5b Author: Boris Brezillon <boris.brezillon@collabora.com> Date: Wed Dec 11 08:54:16 2024 +0100 drm/panthor: Be robust against runtime PM resume failures in the suspend path The runtime PM resume operation is not guaranteed to succeed, but if it fails, the device should be in a suspended state. Make sure we're robust to resume failures in the unplug path. v3: - Fix typo - Add R-bs v2: - Move the bit that belonged in the next commit - Drop the panthor_device_unplug() changes Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Adrian Larumbe <adrian.larumbe@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211075419.2333731-3-boris.brezillon@collabora.com drivers/gpu/drm/panthor/panthor_fw.c | 14 +++++++++----- drivers/gpu/drm/panthor/panthor_gpu.c | 3 ++- drivers/gpu/drm/panthor/panthor_mmu.c | 3 ++- 3 files changed, 13 insertions(+), 7 deletions(-) commit 4bd56ca8226dda6115bca385b166ef87e867d807 Author: Boris Brezillon <boris.brezillon@collabora.com> Date: Wed Dec 11 08:54:15 2024 +0100 drm/panthor: Preserve the result returned by panthor_fw_resume() WARN() will return true if the condition is true, false otherwise. If we store the return of drm_WARN_ON() in ret, we lose the actual error code. v3: - Add R-b v2: - Add R-b Fixes: 5fe909cae118 ("drm/panthor: Add the device logical block") Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Reviewed-by: Adrian Larumbe <adrian.larumbe@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211075419.2333731-2-boris.brezillon@collabora.com drivers/gpu/drm/panthor/panthor_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 960a4140ade8f6ba44e78dc40b80bbf272027805 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Mon Oct 7 16:09:38 2024 +0200 dt-bindings: soc: amlogic,meson-gx-hhi-sysctrl: Document the System Control registers found on early Meson SoC The early Amlogic SoCs also has a System Control registers register set, document it in the amlogic,meson-gx-hhi-sysctrl now the clock controller has been converted to yaml dt-schema. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/20241007-topic-amlogic-arm32-upstream-bindings-fixes-hhi-sysctrl-meson8-v1-1-896b24e6c3c8@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> .../bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 41979b81b22a35322817733b15407167164be58e Author: Byoungtae Cho <bt.cho@samsung.com> Date: Fri Dec 6 11:51:38 2024 +0900 arm64: dts: exynosautov920: add watchdog DT node Adds two watchdog devices for ExynosAutoV920 SoC. Signed-off-by: Byoungtae Cho <bt.cho@samsung.com> Signed-off-by: Taewan Kim <trunixs.kim@samsung.com> Link: https://lore.kernel.org/r/20241206025139.2148833-2-trunixs.kim@samsung.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/exynosautov920.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit a7f08ca7df9260bdcda8e3931c0680c24e02be0b Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Wed Dec 11 01:12:01 2024 +0000 ata: sata_gemini: Remove unused gemini_sata_reset_bridge() gemini_sata_reset_bridge() was added in 2017 by the initial commit be4e456ed3a5 ("ata: Add driver for Faraday Technology FTIDE010") but has never been used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Damien Le Moal <dlemoal@kernel.org> drivers/ata/sata_gemini.c | 12 ------------ drivers/ata/sata_gemini.h | 1 - 2 files changed, 13 deletions(-) commit 65fb414c93f486cef5408951350f20552113abd0 Merge: ce864c76ccd6 530f17e6cb3b Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Dec 10 18:48:33 2024 -0800 Merge branch 'lan78xx-preparations-for-phylink' Oleksij Rempel says: ==================== lan78xx: Preparations for PHYlink This patch set is a second part of the preparatory work for migrating the lan78xx USB Ethernet driver to the PHYlink framework. During extensive testing, I observed that resetting the USB adapter can lead to various read/write errors. While the errors themselves are acceptable, they generate excessive log messages, resulting in significant log spam. This set improves error handling to reduce logging noise by addressing errors directly and returning early when necessary. ==================== Link: https://patch.msgid.link/20241209130751.703182-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 530f17e6cb3bac67723dd90b289a381cc04a52e8 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Mon Dec 9 14:07:50 2024 +0100 net: usb: lan78xx: Rename lan78xx_phy_wait_not_busy to lan78xx_mdiobus_wait_not_busy Rename `lan78xx_phy_wait_not_busy` to `lan78xx_mdiobus_wait_not_busy` for clarity and accuracy, as the function operates on the MII bus rather than a specific PHY. Update all references to reflect the new name. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241209130751.703182-11-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 21fff45a6cc1b5fceeedc5f6e2ccb118d4c19063 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Mon Dec 9 14:07:49 2024 +0100 net: usb: lan78xx: Improve error handling in lan78xx_phy_wait_not_busy Update `lan78xx_phy_wait_not_busy` to forward errors from `lan78xx_read_reg` instead of overwriting them with `-EIO`. Replace `-EIO` with `-ETIMEDOUT` for timeout cases, providing more specific and appropriate error codes. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241209130751.703182-10-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bf361b18d91e96dee50c5794097a80ff3594725c Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Mon Dec 9 14:07:46 2024 +0100 net: usb: lan78xx: Fix return value handling in lan78xx_set_features Update `lan78xx_set_features` to correctly return the result of `lan78xx_write_reg`. This ensures that errors during register writes are propagated to the caller. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241209130751.703182-7-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 41b774e4f3279a3b3149a36fe27557ecdc72c29c Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Mon Dec 9 14:07:45 2024 +0100 net: usb: lan78xx: Simplify lan78xx_update_reg Simplify `lan78xx_update_reg` by directly returning the result of `lan78xx_write_reg`. This eliminates unnecessary checks and improves code readability. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241209130751.703182-6-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 9a46956c72cbc5c1725b3ee7de5586e6e8b1b0b7 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Mon Dec 9 14:07:43 2024 +0100 net: usb: lan78xx: Add error handling to lan78xx_set_mac_addr Update `lan78xx_set_mac_addr` to handle errors during MAC address register write operations. Ensure that errors are properly propagated to the caller, improving the robustness of MAC address updates. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241209130751.703182-4-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 6f31135894ec96481e2bda93a1da70712f5e57c1 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Mon Dec 9 14:07:42 2024 +0100 net: usb: lan78xx: Add error handling to lan78xx_init_mac_address Convert `lan78xx_init_mac_address` to return error codes and handle failures in register read and write operations. Update `lan78xx_reset` to check for errors during MAC address initialization and propagate them appropriately. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241209130751.703182-3-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) commit d354d008255ffdde6f3d4549dd6a06a14ee76619 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Mon Dec 9 14:07:41 2024 +0100 net: usb: lan78xx: Add error handling to lan78xx_setup_irq_domain Update `lan78xx_setup_irq_domain` to handle errors in `lan78xx_read_reg`. Return the error code immediately if the read operation fails, ensuring proper error propagation during IRQ domain setup. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241209130751.703182-2-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ce864c76ccd69470205f5cb22181bffe23563730 Author: Philipp Stanner <pstanner@redhat.com> Date: Fri Dec 6 20:57:13 2024 +0100 net: wwan: t7xx: Replace deprecated PCI functions pcim_iomap_regions() and pcim_iomap_table() have been deprecated by the PCI subsystem. Replace them with pcim_iomap_region(). Additionally, pass the actual driver name to that function to improve debug output. Signed-off-by: Philipp Stanner <pstanner@redhat.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Link: https://patch.msgid.link/20241206195712.182282-2-pstanner@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/wwan/t7xx/t7xx_pci.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 90da34d146383b56e0e0be1ff03bcaf68221e39e Merge: 4eb0308d78d3 53a6d8912372 Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Dec 10 18:32:34 2024 -0800 Merge branch 'net-prepare-for-removal-of-net-dev_index_head' Eric Dumazet says: ==================== net: prepare for removal of net->dev_index_head This series changes rtnl_fdb_dump, last iterator using net->dev_index_head[] First patch creates ndo_fdb_dump_context structure, to no longer assume specific layout for the arguments. Second patch adopts for_each_netdev_dump() in rtnl_fdb_dump(), while changing two first fields of ndo_fdb_dump_context. Third patch removes the padding, thus changing the location of ctx->fdb_idx now that all users agree on how to retrive it. After this series, the only users of net->dev_index_head are __dev_get_by_index() and dev_get_by_index_rcu(). We have to evaluate if switching them to dev_by_index xarray would be sensible. v1: https://lore.kernel.org/20241207162248.18536-1-edumazet@google.com/T/#m800755d4b16c7f335927a76d9f52ebd37f7f077c ==================== Link: https://patch.msgid.link/20241209100747.2269613-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 53a6d8912372fc23ea82cc7a49eb59047aa0a650 Author: Eric Dumazet <edumazet@google.com> Date: Mon Dec 9 10:07:47 2024 +0000 rtnetlink: remove pad field in ndo_fdb_dump_context I chose to remove this field in a separate patch to ease potential bisection, in case one ndo_fdb_dump() is still using the old way (cb->args[2] instead of ctx->fdb_idx) Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com> Link: https://patch.msgid.link/20241209100747.2269613-4-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/linux/rtnetlink.h | 1 - 1 file changed, 1 deletion(-) commit 53970a05f799087e2dd2005973609188504e7fcc Author: Eric Dumazet <edumazet@google.com> Date: Mon Dec 9 10:07:46 2024 +0000 rtnetlink: switch rtnl_fdb_dump() to for_each_netdev_dump() This is the last netdev iterator still using net->dev_index_head[]. Convert to modern for_each_netdev_dump() for better scalability, and use common patterns in our stack. Following patch in this series removes the pad field in struct ndo_fdb_dump_context. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com> Link: https://patch.msgid.link/20241209100747.2269613-3-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/linux/rtnetlink.h | 4 +-- net/core/rtnetlink.c | 92 ++++++++++++++++++----------------------------- 2 files changed, 37 insertions(+), 59 deletions(-) commit be325f08c432ae5ac6d6594d163e1899cdf202df Author: Eric Dumazet <edumazet@google.com> Date: Mon Dec 9 10:07:45 2024 +0000 rtnetlink: add ndo_fdb_dump_context rtnl_fdb_dump() and various ndo_fdb_dump() helpers share a hidden layout of cb->ctx. Before switching rtnl_fdb_dump() to for_each_netdev_dump() in the following patch, make this more explicit. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com> Link: https://patch.msgid.link/20241209100747.2269613-2-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../net/ethernet/freescale/dpaa2/dpaa2-switch.c | 3 ++- drivers/net/ethernet/mscc/ocelot_net.c | 3 ++- drivers/net/vxlan/vxlan_core.c | 5 +++-- include/linux/rtnetlink.h | 7 ++++++ net/bridge/br_fdb.c | 3 ++- net/core/rtnetlink.c | 26 ++++++++++++---------- net/dsa/user.c | 3 ++- 7 files changed, 32 insertions(+), 18 deletions(-) commit 4eb0308d78d3891d7d691f719e262cf908bdcb35 Author: Dimitri Fedrau <dimitri.fedrau@liebherr.com> Date: Mon Dec 9 18:50:42 2024 +0100 net: phy: dp83822: Replace DP83822_DEVADDR with MDIO_MMD_VEND2 Instead of using DP83822_DEVADDR which is locally defined use MDIO_MMD_VEND2. Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241209-dp83822-mdio-mmd-vend2-v1-1-4473c7284b94@liebherr.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/dp83822.c | 58 +++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 30 deletions(-) commit 6bb6ab852c19442285c50874954da454ae60c6c3 Author: Andrew Kreimer <algonell@gmail.com> Date: Mon Dec 9 14:47:30 2024 +0200 net: hinic: Fix typo in dev_err message There is a typo in dev_err message: fliter -> filter. Fix it via codespell. Signed-off-by: Andrew Kreimer <algonell@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241209124804.9789-1-algonell@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/huawei/hinic/hinic_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33035977b464fc15fa1028606a05316f91f14a23 Author: Frederic Weisbecker <frederic@kernel.org> Date: Mon Dec 9 00:49:55 2024 +0100 net: pktgen: Use kthread_create_on_cpu() Use the proper API instead of open coding it. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://patch.msgid.link/20241208234955.31910-1-frederic@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/core/pktgen.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 46afe345ff181e3b72830cb12f1e11cc837cc58e Author: Furong Xu <0x1207@gmail.com> Date: Sun Dec 8 15:02:02 2024 +0800 net: stmmac: Relocate extern declarations in common.h and hwif.h The extern declarations should be in a header file that corresponds to their definition, move these extern declarations to its header file. Some of them have nowhere to go, so move them to hwif.h since they are referenced in hwif.c only. dwmac100_* dwmac1000_* dwmac4_* dwmac410_* dwmac510_* stay in hwif.h, otherwise you will be flooded with name conflicts from dwmac100.h, dwmac1000.h and dwmac4.h if hwif.c try to #include these .h files. Compile tested only. No functional change intended. Suggested-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Furong Xu <0x1207@gmail.com> Link: https://patch.msgid.link/20241208070202.203931-1-0x1207@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/common.h | 14 -------------- drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.h | 3 +++ drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 5 +++++ drivers/net/ethernet/stmicro/stmmac/hwif.c | 2 ++ drivers/net/ethernet/stmicro/stmmac/hwif.h | 16 +++++++++------- drivers/net/ethernet/stmicro/stmmac/mmc.h | 3 +++ drivers/net/ethernet/stmicro/stmmac/stmmac_est.h | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h | 3 +++ 8 files changed, 27 insertions(+), 21 deletions(-) commit 23c57f404bd03c0d7d6f5cb0d5258d2a1c157bcb Merge: a0e1fc921cb0 9a4eef6bf2be Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Dec 10 18:23:17 2024 -0800 Merge branch 'dsa-mv88e6xxx-refactor-statistics-ready-for-rmu-support' Andrew Lunn says: ==================== dsa: mv88e6xxx: Refactor statistics ready for RMU support Marvell Ethernet switches support sending commands to the switch inside Ethernet frames, which the Remote Management Unit, RMU, handles. One such command retries all the RMON statistics. The switches however have other statistics which cannot be retried by this bulk method, so need to be gathered individually. This patch series refactors the existing statistics code into a structure that will allow RMU integration in a future patchset. There should be no functional change as a result of this refactoring. ==================== Link: https://patch.msgid.link/20241207-v6-13-rc1-net-next-mv88e6xxx-stats-refactor-v1-0-b9960f839846@lunn.ch Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 9a4eef6bf2bee375e94a3647cc11906ed3ee58f7 Author: Andrew Lunn <andrew@lunn.ch> Date: Sat Dec 7 15:18:45 2024 -0600 dsa: mv88e6xxx: Centralise common statistics check With moving information about available statistics into the info structure, the test becomes identical. Consolidate them into a single test. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241207-v6-13-rc1-net-next-mv88e6xxx-stats-refactor-v1-2-b9960f839846@lunn.ch Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/mv88e6xxx/chip.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 5595e3613ea768b81f600d37ea6880983339f21a Author: Andrew Lunn <andrew@lunn.ch> Date: Sat Dec 7 15:18:44 2024 -0600 dsa: mv88e6xxx: Move available stats into info structure Different families of switches have different statistics available. This information is current hard coded into functions, however this information will also soon be needed when getting statistics from the RMU. Move it into the info structure. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241207-v6-13-rc1-net-next-mv88e6xxx-stats-refactor-v1-1-b9960f839846@lunn.ch Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/mv88e6xxx/chip.c | 42 ++++++++++++++++++++++++++++++++++++---- drivers/net/dsa/mv88e6xxx/chip.h | 1 + 2 files changed, 39 insertions(+), 4 deletions(-) commit cc4c34577dbc17729b7e3f1266cf12d043e8c170 Author: Hans de Goede <hdegoede@redhat.com> Date: Mon Dec 9 21:40:48 2024 +0100 power: supply: power_supply_show_enum_with_available(): Replace spaces with '_' Some enum style power-supply properties have text-values / labels for some of the enum values containing a space, e.g. "Long Life" for POWER_SUPPLY_CHARGE_TYPE_LONGLIFE. Make power_supply_show_enum_with_available() replace these spaces with '_' when showing the available text-values. After this the output for a battery which supports "Long Life" will be e.g.: Fast [Standard] Long_Life or: Fast Standard [Long_Life] Modify power_supply_store_property() to accept both the original text-value with space and the alternative value with the spaces replaced by '_'. This allows users to write the value with '_' after seeing this on reading the property. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241209204051.8786-2-hdegoede@redhat.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/power_supply_sysfs.c | 37 +++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) commit 72ad51a62389dc99fbe5337ad1821399b23bd78f Author: Thomas Weißschuh <linux@weissschuh.net> Date: Tue Dec 10 22:56:01 2024 +0100 power: supply: bq24257_charger: use dev_to_psy() Use the new, explicit accessor to go from a 'struct device' to its 'struct power_supply'. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-14-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/bq24257_charger.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f11ebcdeb9208e07140c7db9a849df111fbbe9d7 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Tue Dec 10 22:56:00 2024 +0100 power: supply: bq24190_charger: use dev_to_psy() Use the new, explicit accessor to go from a 'struct device' to its 'struct power_supply'. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-13-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/bq24190_charger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 30c9849c4867197d7e23f8108b93f5d196d6953f Author: Thomas Weißschuh <linux@weissschuh.net> Date: Tue Dec 10 22:55:59 2024 +0100 power: supply: bq2415x_charger: use dev_to_psy() Use the new, explicit accessor to go from a 'struct device' to its 'struct power_supply'. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-12-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/bq2415x_charger.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 6d99e50663f61db460a2b09ad1feef069b013182 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Tue Dec 10 22:55:58 2024 +0100 power: supply: surface_battery: use dev_to_psy() Use the new, explicit accessor to go from a 'struct device' to its 'struct power_supply'. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-11-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/surface_battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1f4971fd33b1c79f1a265ce878c29241d4100a69 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Tue Dec 10 22:55:57 2024 +0100 power: supply: ab8500: use dev_to_psy() Use the new, explicit accessor to go from a 'struct device' to its 'struct power_supply'. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-10-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ab8500_fg.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 4543b0c3534c65d676a837640d1ed1611e5e3038 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Tue Dec 10 22:55:56 2024 +0100 power: supply: sysfs: use dev_to_psy() Use the new, explicit accessor to go from a 'struct device' to its 'struct power_supply'. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-9-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/power_supply_sysfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ead11ae3c0d9805012fb7bd3169f7771844410cc Author: Thomas Weißschuh <linux@weissschuh.net> Date: Tue Dec 10 22:55:55 2024 +0100 power: supply: core: use dev_to_psy() Use the new, explicit accessor to go from a 'struct device' to its 'struct power_supply'. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-8-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/power_supply_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f52204036326bd9c07db08bab6607f423c801716 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Tue Dec 10 22:55:54 2024 +0100 power: supply: core: introduce dev_to_psy() The psy core and drivers currently use dev_get_drvdata() to go from a 'struct device' to its 'struct power_supply'. This is not typesafe and or documented. Introduce a new helper to make this pattern explicit. Instead of using dev_get_drvdata(), use container_of_const() which also preserves the constness. Furthermore 'dev' does need to be dereferenced anymore and at some point the drvdata could be reused for something else. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-7-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> include/linux/power_supply.h | 2 ++ 1 file changed, 2 insertions(+) commit bfc330323cf3ea6d5c9985179384c0b56f2d5372 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Tue Dec 10 22:55:53 2024 +0100 power: supply: core: remove power_supply_for_each_device() There are no users anymore. All potential future users are expected to use power_supply_for_each_psy(). Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-6-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/power_supply_core.c | 8 +------- include/linux/power_supply.h | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) commit 230fb418b47733d887dc8ca1a653b21f41f77399 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Tue Dec 10 22:55:52 2024 +0100 power: supply: apm_power: use power_supply_for_each_psy() Simplify the callbacks by removing the need to convert a 'struct device' into a 'struct power_supply'. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-5-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/apm_power.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 87f57faa20ee2cc274400801fb197a27535ff6b5 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Tue Dec 10 22:55:51 2024 +0100 power: supply: ab8500: use power_supply_for_each_psy() Simplify the callbacks by removing the need to convert a 'struct device' into a 'struct power_supply'. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-4-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ab8500_btemp.c | 5 ++--- drivers/power/supply/ab8500_chargalg.c | 5 ++--- drivers/power/supply/ab8500_charger.c | 5 ++--- drivers/power/supply/ab8500_fg.c | 5 ++--- 4 files changed, 8 insertions(+), 12 deletions(-) commit 68abaf7323ae857db7ec56a174b7bbf5fc687d47 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Tue Dec 10 22:55:50 2024 +0100 power: supply: core: use power_supply_for_each_psy() Simplify the callbacks by removing the need to convert a 'struct device' into a 'struct power_supply'. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-3-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/power_supply_core.c | 36 +++++++++++++------------------- 1 file changed, 15 insertions(+), 21 deletions(-) commit 9029409d1a250da19f1086ab1113752411c5163d Author: Thomas Weißschuh <linux@weissschuh.net> Date: Tue Dec 10 22:55:49 2024 +0100 power: supply: core: introduce power_supply_for_each_psy() All existing callers of power_supply_for_each_device() want to iterate over 'struct power_supply', not 'struct device'. The power_supply_for_each_device() forces each caller to duplicate the logic to go from one to the other. Introduce power_supply_for_each_psy() to simplify the callers. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-2-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/power_supply_core.c | 24 ++++++++++++++++++++++++ include/linux/power_supply.h | 1 + 2 files changed, 25 insertions(+) commit e959fdb1cd4dccd37225cac654901a862c52e0c5 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Tue Dec 10 22:55:48 2024 +0100 power: supply: mm8013: use accessor for driver data Instead of directly accessing the structure member, use the accessor. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-1-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/mm8013.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b4dfdcde3573a12b72d2869dabd4ca37ad7e9c7 Author: Andy Yan <andy.yan@rock-chips.com> Date: Mon Dec 9 20:29:16 2024 +0800 drm/rockchip: vop2: Fix the mixer alpha setup for layer 0 The alpha setup should start from the second layer, the current calculation starts incorrectly from the first layer, a negative offset will be obtained in the following formula: offset = (mixer_id + zpos - 1) * 0x10 Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") Tested-by: Derek Foreman <derek.foreman@collabora.com> Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241209122943.2781431-7-andyshrk@163.com drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 17b4b10a0df1a1421d5fbdc03bad0bd3799bc966 Author: Andy Yan <andy.yan@rock-chips.com> Date: Mon Dec 9 20:29:15 2024 +0800 drm/rockchip: vop2: Fix cluster windows alpha ctrl regsiters offset The phy_id of cluster windws are not increase one for each window. Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") Tested-by: Derek Foreman <derek.foreman@collabora.com> Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241209122943.2781431-6-andyshrk@163.com drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 28fa3291cad1c201967ef93edc6e7f8ccc9afbc0 Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Date: Tue Dec 10 22:09:12 2024 +0900 clk: fix an OF node reference leak in of_clk_get_parent_name() Current implementation of of_clk_get_parent_name() leaks an OF node reference on error path. Add a of_node_put() call before returning an error. This bug was found by an experimental static analysis tool that I am developing. Fixes: 8da411cc1964 ("clk: let of_clk_get_parent_name() fail for invalid clock-indices") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Link: https://lore.kernel.org/r/20241210130913.3615205-1-joe@pf.is.s.u-tokyo.ac.jp Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/clk/clk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9f1e1e14f59de8e5a62226840abecbcdbd50221a Author: Heiko Stuebner <heiko.stuebner@cherry.de> Date: Tue Dec 10 00:10:21 2024 +0100 drm/rockchip: Add MIPI DSI2 glue driver for RK3588 This adds the glue code for the MIPI DSI2 bridge on Rockchip SoCs and enables its use on the RK3588. Right now the DSI2 controller is always paired with a DC-phy based on a Samsung IP, so the interface values are set statically for now. This stays true for the upcoming RK3576 as well. Tested-by: Daniel Semkowicz <dse@thaumatec.com> Tested-by: Dmitry Yashin <dmt.yashin@gmail.com> Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de> Reviewed-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241209231021.2180582-4-heiko@sntech.de drivers/gpu/drm/rockchip/Kconfig | 10 + drivers/gpu/drm/rockchip/Makefile | 1 + drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c | 487 +++++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 + drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 1 + 5 files changed, 501 insertions(+) commit 77889f2baadc856a26eef4ed601e5e277d0518b5 Author: Heiko Stuebner <heiko.stuebner@cherry.de> Date: Tue Dec 10 00:10:20 2024 +0100 dt-bindings: display: rockchip: Add schema for RK3588 DW DSI2 controller The Display Serial Interface 2 (DSI-2) is part of a group of communication protocols defined by the MIPI Alliance. The RK3588 implements this specification in its two MIPI DSI-2 Host Controllers that are based on a new Synopsys IP. Tested-by: Dmitry Yashin <dmt.yashin@gmail.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241209231021.2180582-3-heiko@sntech.de .../rockchip/rockchip,rk3588-mipi-dsi2.yaml | 120 +++++++++++++++++++++ 1 file changed, 120 insertions(+) commit 0d6d86253fef1e6b1e38a54db14bcbea9d0d9ca4 Author: Heiko Stuebner <heiko.stuebner@cherry.de> Date: Tue Dec 10 00:10:19 2024 +0100 drm/bridge/synopsys: Add MIPI DSI2 host controller bridge Add a Synopsys Designware MIPI DSI host DRM bridge driver for their DSI2 host controller, based on the Rockchip version from the driver rockchip/dw-mipi-dsi2.c in their vendor-kernel with phy & bridge APIs. While the driver is heavily modelled after the previous IP, the register set of this DSI2 controller is completely different and there are also additional properties like the variable-width phy interface. Tested-by: Daniel Semkowicz <dse@thaumatec.com> Tested-by: Dmitry Yashin <dmt.yashin@gmail.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de> Reviewed-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241209231021.2180582-2-heiko@sntech.de drivers/gpu/drm/bridge/synopsys/Kconfig | 6 + drivers/gpu/drm/bridge/synopsys/Makefile | 1 + drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c | 1030 ++++++++++++++++++++++++ include/drm/bridge/dw_mipi_dsi2.h | 95 +++ 4 files changed, 1132 insertions(+) commit d3dcc98f65dbd364ff839edecf39d1a1e949ee90 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:32 2024 +0200 clk: versaclock3: Add support for the 5L35023 variant Add support for the 5L35023 variant of the Versa 3 clock generator. Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://lore.kernel.org/r/20241210170953.2936724-4-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/clk/clk-versaclock3.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 626b77735a3712b02dabb25be3a0abdde6696bf3 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:31 2024 +0200 dt-bindings: clock: versaclock3: Document 5L35023 Versa3 clock generator There are some differences b/w 5L35023 and 5P35023 Versa3 clock generator variants but the same driver could be used with minimal adjustments. The identified differences are PLL2 Fvco, the clock sel bit for SE2 clock and different default values for some registers. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://lore.kernel.org/r/20241210170953.2936724-3-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Stephen Boyd <sboyd@kernel.org> Documentation/devicetree/bindings/clock/renesas,5p35023.yaml | 1 + 1 file changed, 1 insertion(+) commit ae6040cd7c7f8e80deefe5a49691734480f97409 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Dec 10 19:09:30 2024 +0200 clk: versaclock3: Prepare for the addition of 5L35023 device The 5P35023 and 5L35035 Versa 3 clock generator variants are different but the versaclock3 driver could be used with small adjustments. The features that are implemented in driver and differs b/w variants are the PLL2 Fvco and clock sel bit for SE2 clock. Adjust the driver to prepare for the addition of 5L35023 device. Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://lore.kernel.org/r/20241210170953.2936724-2-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/clk/clk-versaclock3.c | 61 ++++++++++++++++++++++++++++++------------- 1 file changed, 43 insertions(+), 18 deletions(-) commit 65338639b79ce88aef5263cd518cde570a3c7c8e Author: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Date: Thu Dec 5 17:50:22 2024 -0800 drm/xe: Call invalidation_fence_fini for PT inval fences in error state Invalidation_fence_init takes a PM reference, which is released in its _fini counterpart, so we need to make sure that the latter is called, even if the fence is in an error state. Since we already have a function that calls _fini() and signals the fence in the tlb inval code, we can expose that and call it from the PT code. Fixes: f002702290fc ("drm/xe: Hold a PM ref when GT TLB invalidations are inflight") Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: <stable@vger.kernel.org> # v6.11+ Cc: Matthew Brost <matthew.brost@intel.com> Cc: Nirmoy Das <nirmoy.das@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241206015022.1567113-1-daniele.ceraolospurio@intel.com drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 8 ++++++++ drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h | 1 + drivers/gpu/drm/xe/xe_pt.c | 3 +-- 3 files changed, 10 insertions(+), 2 deletions(-) commit 3560a023a9b9965803e8a967ee88343879b5dc1b Author: Raag Jadav <raag.jadav@intel.com> Date: Wed Oct 30 12:28:04 2024 +0530 x86/cpu: Fix typo in x86_match_cpu()'s doc Fix typo in x86_match_cpu()'s description. [ bp: Massage commit message. ] Signed-off-by: Raag Jadav <raag.jadav@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241030065804.407793-1-raag.jadav@intel.com arch/x86/kernel/cpu/match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93b216cb312dcaee19de19efab6025481e5df4ae Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Fri Dec 6 23:25:42 2024 +0100 auxdisplay: img-ascii-lcd: Constify struct img_ascii_lcd_config 'struct img_ascii_lcd_config' 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: Before: ====== text data bss dec hex filename 6110 728 0 6838 1ab6 drivers/auxdisplay/img-ascii-lcd.o After: ===== text data bss dec hex filename 6198 632 0 6830 1aae drivers/auxdisplay/img-ascii-lcd.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> drivers/auxdisplay/img-ascii-lcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e4ee5c3c43ea25e9dae0ca548eeedcd178ff04e6 Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Fri Dec 6 23:25:41 2024 +0100 auxdisplay: img-ascii-lcd: Remove an unused field in struct img_ascii_lcd_ctx Remove 'cfg' from struct img_ascii_lcd_ctx. It is unused since commit 7e76aece6f03 ("auxdisplay: Extract character line display core support") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> drivers/auxdisplay/img-ascii-lcd.c | 2 -- 1 file changed, 2 deletions(-) commit 03edb7020bb920f1935c3f30acad0bb27fdb99af Author: Zhongqiu Han <quic_zhonhan@quicinc.com> Date: Thu Dec 5 16:45:00 2024 +0800 perf bpf: Fix two memory leakages when calling perf_env__insert_bpf_prog_info() If perf_env__insert_bpf_prog_info() returns false due to a duplicate bpf prog info node insertion, the temporary info_node and info_linear memory will leak. Add a check to ensure the memory is freed if the function returns false. Fixes: d56354dc49091e33 ("perf tools: Save bpf_prog_info and BTF of new BPF programs") Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Zhongqiu Han <quic_zhonhan@quicinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Song Liu <song@kernel.org> Cc: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241205084500.823660-4-quic_zhonhan@quicinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/bpf-event.c | 10 ++++++++-- tools/perf/util/env.c | 8 ++++++-- tools/perf/util/env.h | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) commit a7da6c7030e1aec32f0a41c7b4fa70ec96042019 Author: Zhongqiu Han <quic_zhonhan@quicinc.com> Date: Thu Dec 5 16:44:59 2024 +0800 perf header: Fix one memory leakage in process_bpf_prog_info() Function __perf_env__insert_bpf_prog_info() will return without inserting bpf prog info node into perf env again due to a duplicate bpf prog info node insertion, causing the temporary info_linear and info_node memory to leak. Modify the return type of this function to bool and add a check to ensure the memory is freed if the function returns false. Fixes: 606f972b1361f477 ("perf bpf: Save bpf_prog_info information as headers to perf.data") Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Zhongqiu Han <quic_zhonhan@quicinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Song Liu <song@kernel.org> Cc: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241205084500.823660-3-quic_zhonhan@quicinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/env.c | 5 +++-- tools/perf/util/env.h | 2 +- tools/perf/util/header.c | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) commit 875d22980a062521beed7b5df71fb13a1af15d83 Author: Zhongqiu Han <quic_zhonhan@quicinc.com> Date: Thu Dec 5 16:44:58 2024 +0800 perf header: Fix one memory leakage in process_bpf_btf() If __perf_env__insert_btf() returns false due to a duplicate btf node insertion, the temporary node will leak. Add a check to ensure the memory is freed if the function returns false. Fixes: a70a1123174ab592 ("perf bpf: Save BTF information as headers to perf.data") Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Zhongqiu Han <quic_zhonhan@quicinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Song Liu <song@kernel.org> Cc: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241205084500.823660-2-quic_zhonhan@quicinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/header.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7504a1c20eb799adcf028a34855c7d9f3dd99545 Author: Ian Rogers <irogers@google.com> Date: Wed Nov 13 08:55:58 2024 -0800 perf jevents: Fix build issue in '*/' in event descriptions For big string offsets we output comments for what string the offset is for. If the string contains a '*/' as seen in Intel Arrowlake event descriptions, then this causes C parsing issues for the generated pmu-events.c. Catch such '*/' values and escape to avoid this. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Benjamin Gray <bgray@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sandipan Das <sandipan.das@amd.com> Cc: Xu Yang <xu.yang_2@nxp.com> Link: https://lore.kernel.org/r/20241113165558.628856-1-irogers@google.com [ Used return s.replace('*/', r'\*\/') based on failure followed by request by Ian ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/pmu-events/jevents.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 20e20f83dd88a25c1e4ab0a3838e9a4ce583c30d Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Thu Dec 5 12:40:19 2024 +0100 cpufreq: intel_pstate: Drop Arrow Lake from "scaling factor" list Since HYBRID_SCALING_FACTOR_MTL is not going to be suitable for Arrow Lake in general, drop it from the "known hybrid scaling factors" list of platforms, so the scaling factor for it will be determined with the help of information provided by the platform firmware via CPPC. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/2307515.iZASKD2KPV@rjwysocki.net drivers/cpufreq/intel_pstate.c | 1 - 1 file changed, 1 deletion(-) commit 9b18d536b124357fee56d82b1462c02f78d219e5 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Thu Dec 5 12:39:05 2024 +0100 cpufreq: intel_pstate: Use CPPC to get scaling factors The perf-to-frequency scaling factors are used by intel_pstate on hybrid platforms to cast performance levels to frequency on different types of CPUs which is needed because the generic cpufreq sysfs interface works in the frequency domain. For some hybrid platforms already in the field, the scaling factors are known, but for others (including some upcoming ones) they most likely will be different and the only way to get them that scales is to use information provided by the platform firmware. In this particular case, the requisite information can be obtained via CPPC. If the P-core hybrid scaling factor for the given processor model is not known, use CPPC to compute hybrid scaling factors for all CPUs. Since the current default hybrid scaling factor is only suitable for a few early hybrid platforms, add intel_hybrid_scaling_factor[] entries for them and initialize the scaling factor to zero ("unknown") by default. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/8476313.T7Z3S40VBb@rjwysocki.net drivers/cpufreq/intel_pstate.c | 57 ++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 24 deletions(-) commit eeed4bfbe9b96214162a09a7fbb7570fa9522ca4 Author: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Date: Tue Dec 3 15:03:06 2024 +0200 intel_idle: add Clearwater Forest SoC support Clearwater Forest (CWF) SoC has the same C-states as Sierra Forest (SRF) SoC. Add CWF support by re-using the SRF C-states table. Note: it is expected that CWF C-states will have same or very similar characteristics as SRF C-states (latency and target residency). However, there is a possibility that the characteristics will end up being different enough when the CWF platform development is finished. In that case, a separate CWF C-states table will be created and populated with the CWF-specific characteristics (latency and target residency). Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Link: https://patch.msgid.link/20241203130306.1559024-1-artem.bityutskiy@linux.intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/idle/intel_idle.c | 1 + 1 file changed, 1 insertion(+) commit 3fd3697ebfb49ee218416340b084208377ea081d Author: Zhang Rui <rui.zhang@intel.com> Date: Tue Dec 3 15:58:02 2024 +0800 ACPI: DPTF: Support Panther Lake Add Panther Lake ACPI IDs for DPTF. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Link: https://patch.msgid.link/20241203075802.584741-4-rui.zhang@intel.com [ rjw: Changelog edit ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/acpi/dptf/dptf_pch_fivr.c | 1 + drivers/acpi/dptf/dptf_power.c | 2 ++ drivers/acpi/dptf/int340x_thermal.c | 6 ++++++ drivers/acpi/fan.h | 1 + drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 1 + drivers/thermal/intel/int340x_thermal/int3403_thermal.c | 1 + 6 files changed, 12 insertions(+) commit 3cc83aeea0cd061e424f634da62dfcabe7fdd5c5 Author: Zhang Rui <rui.zhang@intel.com> Date: Tue Dec 3 15:58:01 2024 +0800 thermal: intel: int340x: processor: Enable MMIO RAPL for Panther Lake Enable MMIO RAPL support for PantherLake platform. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Link: https://patch.msgid.link/20241203075802.584741-3-rui.zhang@intel.com [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/thermal/intel/int340x_thermal/processor_thermal_device.h | 1 + drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c | 1 + 2 files changed, 2 insertions(+) commit 85a810f91d9bb9c4440cbe745643cec87642ae5c Author: Zhang Rui <rui.zhang@intel.com> Date: Tue Dec 3 15:58:00 2024 +0800 powercap: intel_rapl: Add support for Panther Lake platform Add support for PantherLake platform to the RAPL common driver. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Link: https://patch.msgid.link/20241203075802.584741-2-rui.zhang@intel.com [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/powercap/intel_rapl_common.c | 1 + 1 file changed, 1 insertion(+) commit d5bdde0b38c1d17f39ad6d41d16af33357b329b2 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:03:00 2024 +0100 PCI/ACPI: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-pci-v1-4-c32360f495a7@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/pci/hotplug/acpiphp_ibm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 02915b4813a126ebf2e050fc4951e037d11f18b5 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Thu Dec 5 21:46:35 2024 +0100 ACPI: battery: Rename extensions to hook in messages This functionality is called "hook" everywhere in the code. For consistency call it the same in the log messages. The power supply subsystem is about to get its own extension functionality. While the two are closely related and will be used together, the current wording leaves room for misinterpretation. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://patch.msgid.link/20241205-power-supply-extensions-v5-1-f0f996db4347@weissschuh.net Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/acpi/battery.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit bede543d2f8a045030ea6ed49307719673342613 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Thu Dec 5 12:24:35 2024 +0100 ACPI: OSL: Use usleep_range() in acpi_os_sleep() As stated by Len in [1], the extra delay added by msleep() to the sleep time value passed to it can be significant, roughly between 1.5 ns on systems with HZ = 1000 and as much as 15 ms on systems with HZ = 100, which is hardly acceptable, at least for small sleep time values. msleep(5) on the default HZ = 250 in Ubuntu on a modern PC takes about 12 ms. This results in over 800 ms of spurious system resume delay on systems such as the Dell XPS-13-9300, which use ASL Sleep(5ms) in a tight loop. Address this by using usleep_range() in acpi_os_sleep() instead of msleep(). For short sleep times this is a no brainer, but even for long sleeps usleep_range() should be preferred because timer wheel timers are optimized for cancelation before they expire and this particular timer is not going to be canceled. Add at least 50 us on top of the requested sleep time in case the timer can be subject to coalescing, which is consistent with what's done in user space in this context [2], but for sleeps longer than 5 ms use 1% of the requested sleep time for this purpose. The rationale here is that longer sleeps don't need that much of a timer precision as a rule and making the timer a more likely candidate for coalescing in these cases is generally desirable. It starts at 5 ms so that the delta between the requested sleep time and the effective deadline is a contiuous function of the former. Link: https://lore.kernel.org/linux-pm/c7db7e804c453629c116d508558eaf46477a2d73.1731708405.git.len.brown@intel.com/ [1] Link: https://lore.kernel.org/linux-pm/CAJvTdK=Q1kwWA6Wxn8Zcf0OicDEk6cHYFAvQVizgA47mXu63+g@mail.gmail.com/ [2] Closes: https://bugzilla.kernel.org/show_bug.cgi?id=216263 Reported-by: Len Brown <lenb@kernel.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Tested-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/5857066.DvuYhMxLoT@rjwysocki.net drivers/acpi/osl.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 625f4de23fa8bdd22026051f7fc5a5844bac07ba Author: Veronika Molnarova <vmolnaro@redhat.com> Date: Tue Oct 29 15:43:47 2024 +0100 perf test: Parse 'perf stat' Topdown events for aarch64 The 'perf stat' output on aarch64 machines with topdown events wasn't counted for in the 'perf stat STD output linter' test case. Add the topdown metric to the skip_metric list as it is done for topdown events on other systems. The Topdown events are also disabled on aarch64 KVM guests because the value of caps/slots is set to 0 due to the part of the system register being a stub. This prevents the metric for the topdown events from being computed, leaving the 'perf stat' topdown metric without any value at all. Add the "TopdownL1" to the skip_metric list as well to handle this possibility. Before aarch64: 100: perf stat STD output linter: --- start --- test child forked, pid 403305 Checking STD output: no args Unknown event name in TopdownL1 # 4.3 percent of slots slots_lost_misspeculation_fraction ---- end(-1) ---- 100: perf stat STD output linter : FAILED! Before aarch64 KVM: 100: perf stat STD output linter: --- start --- test child forked, pid 404671 Checking STD output: no args Unknown event name in TopdownL1 ---- end(-1) ---- 100: perf stat STD output linter : FAILED! After: 100: perf stat STD output linter: --- start --- test child forked, pid 404777 Checking STD output: no args [Success] Checking STD output: system wide [Success] Checking STD output: interval [Success] Checking STD output: per thread [Success] Checking STD output: per node [Success] Checking STD output: system wide no aggregation [Success] Checking STD output: per core [Success] Checking STD output: per cache instance [Success] Checking STD output: per cluster [Success] Checking STD output: per die [Success] Checking STD output: per socket [Success] ---- end(0) ---- 100: perf stat STD output linter : Ok Signed-off-by: Veronika Molnarova <vmolnaro@redhat.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241029144347.25651-1-vmolnaro@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/shell/stat+std_output.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b223564fe122cae9183e98c7598381f3b52ce763 Author: Masami Hiramatsu (Google) <mhiramat@kernel.org> Date: Wed Nov 13 09:21:21 2024 +0900 perf probe: Replace unacceptable characters when generating event name Replace unacceptable characters with '_' when generating event name from the probing function name. This is not for a C program. For the a C program, it will continue to remove suffixes. Note that this language checking depends on the debuginfo. So without the debuginfo, perf probe will always replaces unacceptable characters with '_'. For example. $ ./perf probe -x cro3 -D \"cro3::cmd::servo::run_show\" p:probe_cro3/cro3_cmd_servo_run_show /work/cro3/target/x86_64-unknown-linux-gnu/debug/cro3:0x197530 $ ./perf probe -x /work/go/example/outyet/main -D 'main.(*Server).poll' p:probe_main/main_Server_poll /work/go/example/outyet/main:0x353040 Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Alexander Lobakin <aleksander.lobakin@intel.com> Cc: Dima Kogan <dima@secretsauce.net> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com> Link: https://lore.kernel.org/r/173145728160.2747044.18089011235495186810.stgit@mhiramat.roam.corp.google.com [ Removed some extra tabs in the new struct fields ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/probe-event.c | 32 +++++++++++++++++++++++++------- tools/perf/util/probe-event.h | 1 + tools/perf/util/probe-finder.c | 15 +++++++++++++++ tools/perf/util/probe-finder.h | 5 +++++ 4 files changed, 46 insertions(+), 7 deletions(-) commit 7349678b84552d15866c1a118535663e9dbb6768 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:04:11 2024 +0100 ACPI: sysfs: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://patch.msgid.link/20241202-sysfs-const-bin_attr-acpi-v1-3-78f3b38d350d@weissschuh.net Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/acpi/sysfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d16d7e91ed31f08903c698db42bbabe3dd454e07 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:04:10 2024 +0100 ACPI: BGRT: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://patch.msgid.link/20241202-sysfs-const-bin_attr-acpi-v1-2-78f3b38d350d@weissschuh.net Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/acpi/bgrt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e687b81f4c0e1e1d2cb84716523d7791fa34c8ff Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:04:09 2024 +0100 ACPI: BGRT: Mark bin_attribute as __ro_after_init The attribute is only modified during __init phase. Protect it against accidental or intentional modifications afterwards. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://patch.msgid.link/20241202-sysfs-const-bin_attr-acpi-v1-1-78f3b38d350d@weissschuh.net Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/acpi/bgrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05453d36a2fcaf1ea49939f8f9a8cd9dcd516159 Merge: 13148e22c151 7cb1b4663150 Author: Ingo Molnar <mingo@kernel.org> Date: Tue Dec 10 19:32:36 2024 +0100 Merge branch 'linus' into x86/cleanups, to resolve conflict These two commits interact: upstream: 73da582a476e ("x86/cpu/topology: Remove limit of CPUs due to disabled IO/APIC") x86/cleanups: 13148e22c151 ("x86/apic: Remove "disablelapic" cmdline option") Resolve it. Conflicts: arch/x86/kernel/cpu/topology.c Signed-off-by: Ingo Molnar <mingo@kernel.org> commit 720f63a838731d25ab34c306db59c12834ce09b4 Author: Sai Teja Pottumuttu <sai.teja.pottumuttu@intel.com> Date: Thu Dec 5 09:49:13 2024 +0530 drm/xe/oa/uapi: Make OA buffer size configurable Add a new property called DRM_XE_OA_PROPERTY_OA_BUFFER_SIZE to allow OA buffer size to be configurable from userspace. With this OA buffer size can be configured to any power of 2 size between 128KB and 128MB and it would default to 16MB in case the size is not supplied. v2: - Rebase v3: - Add oa buffer size to capabilities [Ashutosh] - Address several nitpicks [Ashutosh] - Fix commit message/subject [Ashutosh] BSpec: 61100, 61228 Signed-off-by: Sai Teja Pottumuttu <sai.teja.pottumuttu@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241205041913.883767-2-sai.teja.pottumuttu@intel.com drivers/gpu/drm/xe/regs/xe_oa_regs.h | 9 +----- drivers/gpu/drm/xe/xe_oa.c | 55 ++++++++++++++++++++++++++++-------- drivers/gpu/drm/xe/xe_oa_types.h | 2 +- drivers/gpu/drm/xe/xe_query.c | 3 +- include/uapi/drm/xe_drm.h | 9 ++++++ 5 files changed, 56 insertions(+), 22 deletions(-) commit 690a052a6d85c530363990175d7981dbcdac2301 Author: Gabriele Monaco <gmonaco@redhat.com> Date: Tue Nov 12 15:12:14 2024 -0300 perf ftrace latency: Add --max-latency option This patch adds a max-latency option as discussed, in case the number of buckets is more than 22, we don't observe the setting (for now, let's say). By default or if 0 is passed, the value is automatically determined based on the number of buckets, range and minimum, so that we fill all available buffers (equivalent to the behaviour before this patch). We now get something like this: # perf ftrace latency --bucket-range=20 \ --min-latency 10 \ --max-latency=100 \ -T switch_mm_irqs_off -a sleep 2 # DURATION | COUNT | GRAPH | 0 - 10 us | 1731 | ################ | 10 - 30 us | 1 | | 30 - 50 us | 0 | | 50 - 70 us | 0 | | 70 - 90 us | 0 | | 90 - 100 us | 0 | | 100 - ... us | 0 | | Note the maximum is observed also if it doesn't cover completely a full range (the second to last range is 10us long to let the last start at 100 sharp), this looks to me more sensible and eases the computations, since we don't need to account for the range while filling the buckets. Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Clark Williams <williams@redhat.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20241112181214.1171244-5-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Documentation/perf-ftrace.txt | 4 ++++ tools/perf/builtin-ftrace.c | 28 +++++++++++++++++++++++++--- tools/perf/util/bpf_skel/func_latency.bpf.c | 4 +++- tools/perf/util/ftrace.h | 1 + 4 files changed, 33 insertions(+), 4 deletions(-) commit 08b875b6bf6085894f5cc65e028ae76f371a805e Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Tue Nov 12 15:12:13 2024 -0300 perf ftrace latency: Introduce --min-latency to narrow down into a latency range Things below and over will be in the first and last, outlier, buckets. Without it: # perf ftrace latency --use-nsec --use-bpf \ --bucket-range=200 \ -T switch_mm_irqs_off -a sleep 2 # DURATION | COUNT | GRAPH | 0 - 200 ns | 0 | | 200 - 400 ns | 44 | | 400 - 600 ns | 291 | # | 600 - 800 ns | 506 | ## | 800 - 1000 ns | 148 | | 1.00 - 1.20 us | 581 | ## | 1.20 - 1.40 us | 2199 | ########## | 1.40 - 1.60 us | 1048 | #### | 1.60 - 1.80 us | 1448 | ###### | 1.80 - 2.00 us | 1091 | ##### | 2.00 - 2.20 us | 517 | ## | 2.20 - 2.40 us | 318 | # | 2.40 - 2.60 us | 370 | # | 2.60 - 2.80 us | 271 | # | 2.80 - 3.00 us | 150 | | 3.00 - 3.20 us | 85 | | 3.20 - 3.40 us | 48 | | 3.40 - 3.60 us | 40 | | 3.60 - 3.80 us | 22 | | 3.80 - 4.00 us | 13 | | 4.00 - 4.20 us | 14 | | 4.20 - ... us | 626 | ## | # # perf ftrace latency --use-nsec --use-bpf \ --bucket-range=20 --min-latency=1200 \ -T switch_mm_irqs_off -a sleep 2 # DURATION | COUNT | GRAPH | 0 - 1200 ns | 1243 | ##### | 1.20 - 1.22 us | 141 | | 1.22 - 1.24 us | 202 | | 1.24 - 1.26 us | 209 | | 1.26 - 1.28 us | 219 | | 1.28 - 1.30 us | 208 | | 1.30 - 1.32 us | 245 | # | 1.32 - 1.34 us | 246 | # | 1.34 - 1.36 us | 224 | # | 1.36 - 1.38 us | 219 | | 1.38 - 1.40 us | 206 | | 1.40 - 1.42 us | 190 | | 1.42 - 1.44 us | 190 | | 1.44 - 1.46 us | 146 | | 1.46 - 1.48 us | 140 | | 1.48 - 1.50 us | 125 | | 1.50 - 1.52 us | 115 | | 1.52 - 1.54 us | 102 | | 1.54 - 1.56 us | 87 | | 1.56 - 1.58 us | 90 | | 1.58 - 1.60 us | 85 | | 1.60 - ... us | 5487 | ######################## | # Now we want focus on the latencies starting at 1.2us, with a finer grained range of 20ns: This is all on a live system, so statistically interesting, but not narrowing down on the same numbers, so a 'perf ftrace latency record' seems interesting to then use all on the same snapshot of latencies. A --max-latency counterpart should come next, at first limiting the max-latency to 20 * bucket-size, as we have a fixed buckets array with 20 + 2 entries (+ for the outliers) and thus would need to make it larger for higher latencies. We also may need a way to ask for not considering the out of range values (first and last buckets) when drawing the buckets bars. Co-developed-by: Gabriele Monaco <gmonaco@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Clark Williams <williams@redhat.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20241112181214.1171244-4-acme@kernel.org Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Documentation/perf-ftrace.txt | 4 ++++ tools/perf/builtin-ftrace.c | 32 ++++++++++++++++++++++++----- tools/perf/util/bpf_ftrace.c | 1 + tools/perf/util/bpf_skel/func_latency.bpf.c | 12 +++++++++-- tools/perf/util/ftrace.h | 1 + 5 files changed, 43 insertions(+), 7 deletions(-) commit e8536dd47a98b5dbfac1dcdd2954b502bf656044 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Tue Nov 12 15:12:12 2024 -0300 perf ftrace latency: Introduce --bucket-range to ask for linear bucketing In addition to showing it exponentially, using log2() to figure out the histogram index, allow for showing it linearly: The preexisting more, the default: # perf ftrace latency --use-nsec --use-bpf \ -T switch_mm_irqs_off -a sleep 2 # DURATION | COUNT | GRAPH | 0 - 1 ns | 0 | | 1 - 2 ns | 0 | | 2 - 4 ns | 0 | | 4 - 8 ns | 0 | | 8 - 16 ns | 0 | | 16 - 32 ns | 0 | | 32 - 64 ns | 0 | | 64 - 128 ns | 238 | # | 128 - 256 ns | 1704 | ########## | 256 - 512 ns | 672 | ### | 512 - 1024 ns | 4458 | ########################## | 1 - 2 us | 677 | #### | 2 - 4 us | 5 | | 4 - 8 us | 0 | | 8 - 16 us | 0 | | 16 - 32 us | 0 | | 32 - 64 us | 0 | | 64 - 128 us | 0 | | 128 - 256 us | 0 | | 256 - 512 us | 0 | | 512 - 1024 us | 0 | | 1 - ... ms | 0 | | # The new histogram mode: # perf ftrace latency --bucket-range=150 --use-nsec --use-bpf \ -T switch_mm_irqs_off -a sleep 2 # DURATION | COUNT | GRAPH | 0 - 1 ns | 0 | | 1 - 151 ns | 265 | # | 151 - 301 ns | 1797 | ########### | 301 - 451 ns | 258 | # | 451 - 601 ns | 289 | # | 601 - 751 ns | 2049 | ############# | 751 - 901 ns | 967 | ###### | 901 - 1051 ns | 513 | ### | 1.05 - 1.20 us | 114 | | 1.20 - 1.35 us | 559 | ### | 1.35 - 1.50 us | 189 | # | 1.50 - 1.65 us | 137 | | 1.65 - 1.80 us | 32 | | 1.80 - 1.95 us | 2 | | 1.95 - 2.10 us | 0 | | 2.10 - 2.25 us | 1 | | 2.25 - 2.40 us | 1 | | 2.40 - 2.55 us | 0 | | 2.55 - 2.70 us | 0 | | 2.70 - 2.85 us | 0 | | 2.85 - 3.00 us | 1 | | 3.00 - ... us | 4 | | # Co-developed-by: Gabriele Monaco <gmonaco@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Clark Williams <williams@redhat.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20241112181214.1171244-3-acme@kernel.org Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Documentation/perf-ftrace.txt | 3 ++ tools/perf/builtin-ftrace.c | 66 +++++++++++++++++++++++------ tools/perf/util/bpf_ftrace.c | 2 + tools/perf/util/bpf_skel/func_latency.bpf.c | 14 ++++++ tools/perf/util/ftrace.h | 1 + 5 files changed, 73 insertions(+), 13 deletions(-) commit 12115c6037aeb8aeaa792b376a63b339aee746ae Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Tue Nov 12 15:12:11 2024 -0300 perf ftrace latency: Pass ftrace pointer to histogram routines to pass more args The ftrace->use_nsec arg is being passed to both make_historgram() and display_histogram(), since another ftrace field will be passed to those functions in a followup patch, make them look like other functions in this codebase that receive the 'struct perf_ftrace' pointer. No change in logic. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Clark Williams <williams@redhat.com> Cc: Gabriele Monaco <gmonaco@redhat.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20241112181214.1171244-2-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-ftrace.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 13148e22c151e871c1c00bab519f39cc6f6ea37a Author: Borislav Petkov (AMD) <bp@alien8.de> Date: Mon Dec 2 20:00:11 2024 +0100 x86/apic: Remove "disablelapic" cmdline option The convention is "no<something>" and there already is "nolapic". Drop the disable one. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Sohil Mehta <sohil.mehta@intel.com> Link: https://lore.kernel.org/r/20241202190011.11979-2-bp@kernel.org arch/x86/kernel/apic/apic.c | 9 +-------- arch/x86/kernel/cpu/topology.c | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) commit ab0e7f20768af59fe161d71cc5d1de384f2a9da8 Author: Borislav Petkov (AMD) <bp@alien8.de> Date: Mon Dec 2 20:00:10 2024 +0100 Documentation: Merge x86-specific boot options doc into kernel-parameters.txt Documentation/arch/x86/x86_64/boot-options.rst is causing unnecessary confusion by being a second place where one can put x86 boot options. Move them into the main one. Drop removed ones like "acpi=ht", while at it. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Sohil Mehta <sohil.mehta@intel.com> Link: https://lore.kernel.org/r/20241202190011.11979-1-bp@kernel.org Documentation/admin-guide/kernel-parameters.rst | 3 - Documentation/admin-guide/kernel-parameters.txt | 237 +++++++++++++++- Documentation/arch/x86/x86_64/boot-options.rst | 312 --------------------- .../arch/x86/x86_64/fake-numa-for-cpusets.rst | 2 +- Documentation/arch/x86/x86_64/index.rst | 1 - arch/x86/Kconfig.debug | 2 +- arch/x86/kernel/pci-dma.c | 4 - 7 files changed, 227 insertions(+), 334 deletions(-) commit 3f3b063e0c6d6c35da99bdabba0a9f2bc7e58a47 Merge: b7cc281812c4 0020c9d2d572 Author: Mark Brown <broonie@kernel.org> Date: Tue Dec 10 17:22:57 2024 +0000 spi: Unify and simplify fwnode related checks Merge series from Andy Shevchenko <andriy.shevchenko@linux.intel.com>: A couple of cleanups on top of recently added change. commit 0056b0852c326cf21201661f68ab41002ae9a845 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:18 2024 -0600 Documentation: Add documentation about class interface for platform profiles The class interface allows changing multiple platform profiles on a system to different values. The semantics of it are similar to the legacy interface. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-23-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Documentation/ABI/testing/sysfs-platform_profile | 5 +++ .../userspace-api/sysfs-platform_profile.rst | 38 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) commit dd7ba84afa0667c818d380605ab3e11440925287 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:17 2024 -0600 platform/x86/amd: pmf: Drop all quirks As multiple platform profile handlers can now be registered, the quirks to avoid registering amd-pmf as a handler are no longer necessary. Drop them. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Matthew Schwartz <matthew.schwartz@linux.dev> Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-22-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/amd/pmf/Makefile | 2 +- drivers/platform/x86/amd/pmf/core.c | 1 - drivers/platform/x86/amd/pmf/pmf-quirks.c | 66 ------------------------------- drivers/platform/x86/amd/pmf/pmf.h | 3 -- 4 files changed, 1 insertion(+), 71 deletions(-) commit 688834743d672b55ce357e11e34be835c78467e8 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:16 2024 -0600 ACPI: platform_profile: Allow multiple handlers Multiple drivers may attempt to register platform profile handlers, but only one may be registered and the behavior is non-deterministic for which one wins. It's mostly controlled by probing order. This can be problematic if one driver changes CPU settings and another driver notifies the EC for changing fan curves. Modify the ACPI platform profile handler to let multiple drivers register platform profile handlers and abstract this detail from userspace. To avoid undefined behaviors only offer profiles that are commonly advertised across multiple handlers. If any problems occur when changing profiles for any driver, then the drivers that were already changed remain changed and the legacy sysfs handler will report 'custom'. Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Matthew Schwartz <matthew.schwartz@linux.dev> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-21-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 11 ----------- 1 file changed, 11 deletions(-) commit 37a6853d83f8af1b68346b555a7dd78e2c7f10e5 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:15 2024 -0600 ACPI: platform_profile: Notify class device from platform_profile_notify() When a driver has called platform_profile_notify() both the legacy sysfs interface and the class device should be notified as userspace may listen to either. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-20-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 3 +++ 1 file changed, 3 insertions(+) commit 70246f89c55fb1be0367a584000fd68502a0933f Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:14 2024 -0600 ACPI: platform_profile: Check all profile handler to calculate next As multiple platform profile handlers might not all support the same profile, cycling to the next profile could have a different result depending on what handler are registered. Check what is active and supported by all handlers to decide what to do. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-19-mario.limonciello@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit e836b7dfbabaa9d8a99b58ef0afa586f782d8e01 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:13 2024 -0600 ACPI: platform_profile: Make sure all profile handlers agree on profile If for any reason multiple profile handlers don't agree on the profile return the custom profile. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-18-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 125 ++++++++++++++++++++++++++++++++-------- 1 file changed, 102 insertions(+), 23 deletions(-) commit 494637cf5bf098ac0fe125dd6d23368419fe9da4 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:12 2024 -0600 ACPI: platform_profile: Add concept of a "custom" profile When two profile handlers don't agree on the current profile it's ambiguous what to show to the legacy sysfs interface. Add a "custom" profile string that userspace will be able to use the legacy sysfs interface to distinguish this situation.. Additionally drivers can choose to use this to indicate that a user has modified driver settings in a way that the platform profile advertised by a driver is not accurate. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-17-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 1 + include/linux/platform_profile.h | 1 + 2 files changed, 2 insertions(+) commit 06ec24388f1de63a5d9b0dc1994bc2180d7ff6b8 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:11 2024 -0600 ACPI: platform_profile: Only show profiles common for all handlers If multiple platform profile handlers have been registered, don't allow switching to profiles unique to only one handler. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Matthew Schwartz <matthew.schwartz@linux.dev> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-16-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 54 +++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 10 deletions(-) commit e5fe5ddc38ffd389433032f9ab121774b6b2980a Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:10 2024 -0600 ACPI: platform_profile: Notify change events on register and unregister As multiple platform profile handlers may come and go, send a notification to userspace each time that a platform profile handler is registered or unregistered. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Matthew Schwartz <matthew.schwartz@linux.dev> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-15-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 4 ++++ 1 file changed, 4 insertions(+) commit d2785e39429a33966b010bcc89b169e93c6597f7 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:09 2024 -0600 ACPI: platform_profile: Add profile attribute for class interface Reading and writing the `profile` sysfs file will use the callbacks for the platform profile handler to read or set the given profile. Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-14-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 105 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) commit 52a67be8ee274b14984df1a9f7ae157e11bc08ab Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:08 2024 -0600 ACPI: platform_profile: Add choices attribute for class interface The `choices` file will show all possible choices that a given platform profile handler can support. Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-13-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 97cab71d712b4066e3807c3e33990d6ed7506c2d Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:07 2024 -0600 ACPI: platform_profile: Add name attribute to class interface The name attribute shows the name of the associated platform profile handler. Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-12-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 77be5cacb2c2d8c3ddd069f0b4e9408f553af1d8 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:06 2024 -0600 ACPI: platform_profile: Create class for ACPI platform profile When registering a platform profile handler create a class device that will allow changing a single platform profile handler. The class and sysfs group are no longer needed when the platform profile core is a module and unloaded, so remove them at that time as well. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-11-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 82 +++++++++++++++++++++++++++++++++++++--- include/linux/platform_profile.h | 2 + 2 files changed, 79 insertions(+), 5 deletions(-) commit 1f3ac55c2e65af30a37a460a1a7cc5c7eb74747d Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:05 2024 -0600 ACPI: platform_profile: Use `scoped_cond_guard` Migrate away from using an interruptible mutex to scoped_cond_guard in all functions. While changing, move the sysfs notification used in platform_profile_store() outside of mutex scope. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-10-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 105 +++++++++++++++------------------------- 1 file changed, 38 insertions(+), 67 deletions(-) commit 55b1e68134bfa041960282fdefef7f3e56add703 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:04 2024 -0600 ACPI: platform_profile: Use guard(mutex) for register/unregister guard(mutex) can be used to automatically release mutexes when going out of scope. Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Matthew Schwartz <matthew.schwartz@linux.dev> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-9-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit ab431a20756a0e755c91a5df78c8c70e0fbecd80 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:03 2024 -0600 ACPI: platform_profile: Move matching string for new profile out of mutex Holding the mutex is not necessary while scanning the string passed into platform_profile_store(). Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-8-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 585484003dedaa35ffc8d1ead3f3334af021dee7 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:02 2024 -0600 ACPI: platform_profile: Move sanity check out of the mutex The sanity check that the platform handler had choices set doesn't need the mutex taken. Move it to earlier in the registration. Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Matthew Schwartz <matthew.schwartz@linux.dev> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-7-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4d5c027bf55661da2621c694ea39908ae2d3a46a Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:01 2024 -0600 ACPI: platform_profile: Pass the profile handler into platform_profile_notify() The profile handler will be used to notify the appropriate class devices. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-6-mario.limonciello@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 2 +- drivers/platform/x86/acer-wmi.c | 2 +- drivers/platform/x86/asus-wmi.c | 2 +- drivers/platform/x86/ideapad-laptop.c | 2 +- drivers/platform/x86/thinkpad_acpi.c | 14 +++++++------- include/linux/platform_profile.h | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) commit 9b3bb37b44a317626464e79da8b39989b421963f Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:19:00 2024 -0600 ACPI: platform_profile: Add platform handler argument to platform_profile_remove() To allow registering and unregistering multiple platform handlers calls to platform_profile_remove() will need to know which handler is to be removed. Add an argument for this. Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Matthew Schwartz <matthew.schwartz@linux.dev> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-5-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/acpi/platform_profile.c | 2 +- drivers/platform/surface/surface_platform_profile.c | 6 +++++- drivers/platform/x86/acer-wmi.c | 4 ++-- drivers/platform/x86/amd/pmf/sps.c | 2 +- drivers/platform/x86/asus-wmi.c | 4 ++-- drivers/platform/x86/dell/alienware-wmi.c | 2 +- drivers/platform/x86/dell/dell-pc.c | 2 +- drivers/platform/x86/hp/hp-wmi.c | 2 +- drivers/platform/x86/ideapad-laptop.c | 2 +- drivers/platform/x86/inspur_platform_profile.c | 5 ++++- drivers/platform/x86/thinkpad_acpi.c | 2 +- include/linux/platform_profile.h | 2 +- 12 files changed, 21 insertions(+), 14 deletions(-) commit 6f5e63ddc333dae371be6f8a8f70a82043697a4c Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:18:59 2024 -0600 ACPI: platform_profile: Add device pointer into platform profile handler In order to let platform profile handlers manage platform profile for their driver the core code will need a pointer to the device. Add this to the structure and use it in the trivial driver cases. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-4-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/surface/surface_platform_profile.c | 1 + drivers/platform/x86/acer-wmi.c | 5 +++-- drivers/platform/x86/amd/pmf/sps.c | 1 + drivers/platform/x86/asus-wmi.c | 1 + drivers/platform/x86/dell/alienware-wmi.c | 5 +++-- drivers/platform/x86/dell/dell-pc.c | 1 + drivers/platform/x86/hp/hp-wmi.c | 5 +++-- drivers/platform/x86/ideapad-laptop.c | 1 + drivers/platform/x86/inspur_platform_profile.c | 1 + drivers/platform/x86/thinkpad_acpi.c | 1 + include/linux/platform_profile.h | 1 + 11 files changed, 17 insertions(+), 6 deletions(-) commit 7c63fe4dcd0ae08eda7fcb8c31d22ef33c591fe5 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:18:58 2024 -0600 platform/x86/dell: dell-pc: Create platform device In order to have a device for the platform profile core to reference create a platform device for dell-pc. While doing this change the memory allocation for the thermal handler to be device managed to follow the lifecycle of that device. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-3-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/dell/dell-pc.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit 549de562d794a42bb647952e965e588390e16fe0 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 21:18:57 2024 -0600 ACPI: platform-profile: Add a name member to handlers In order to prepare for allowing multiple handlers, introduce a name field that can be used to distinguish between different handlers. Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Matthew Schwartz <matthew.schwartz@linux.dev> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20241206031918.1537-2-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/surface/surface_platform_profile.c | 1 + drivers/platform/x86/acer-wmi.c | 1 + drivers/platform/x86/amd/pmf/sps.c | 1 + drivers/platform/x86/asus-wmi.c | 1 + drivers/platform/x86/dell/alienware-wmi.c | 1 + drivers/platform/x86/dell/dell-pc.c | 1 + drivers/platform/x86/hp/hp-wmi.c | 1 + drivers/platform/x86/ideapad-laptop.c | 1 + drivers/platform/x86/inspur_platform_profile.c | 1 + drivers/platform/x86/thinkpad_acpi.c | 1 + include/linux/platform_profile.h | 1 + 11 files changed, 11 insertions(+) commit 6e8ba494d87d05cba49224d2068dd313190adbd0 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 4 20:37:45 2024 +0100 kbuild/btf: Propagate CONFIG_WERROR to resolve_btfids Use CONFIG_WERROR to also fail on warnings emitted by resolve_btfids. Allow the CI bots to prevent the introduction of new warnings. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/bpf/20241204-resolve_btfids-v3-2-e6a279a74cfd@weissschuh.net scripts/link-vmlinux.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b70b073979ebf7a5271e7ce655ea1c25b4673f04 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Wed Dec 4 20:37:44 2024 +0100 tools/resolve_btfids: Add --fatal_warnings option Currently warnings emitted by resolve_btfids are buried in the build log and are slipping into mainline frequently. Add an option to elevate warnings to hard errors so the CI bots can catch any new warnings. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/bpf/20241204-resolve_btfids-v3-1-e6a279a74cfd@weissschuh.net tools/bpf/resolve_btfids/main.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 3a973ce1b9180a5263924fbcebf8ad7572cca1fc Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Mon Dec 9 21:25:00 2024 +0800 of/irq: Correct element count for array @dummy_imask in API of_irq_parse_raw() Array @dummy_imask only needs MAX_PHANDLE_ARGS elements, but it actually has (MAX_PHANDLE_ARGS + 1) elements. One extra element doesn't hurt anything except for some stack usage. Fix by using (MAX_PHANDLE_ARGS - 1) as max element index in initializer. Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241209-of_irq_fix-v1-2-782f1419c8a1@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> drivers/of/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bc244f6817daa2a05b97e4d063daa0854b5ccd6 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Fri Dec 6 08:52:36 2024 +0800 of: Simplify API of_find_node_with_property() implementation Simplify of_find_node_with_property() implementation by __of_find_property(). Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241206-of_core_fix-v1-10-dc28ed56bec3@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> drivers/of/base.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 4ff899ee4ef0876555dabe532d3179ec90502291 Author: Zijun Hu <quic_zijuhu@quicinc.com> Date: Fri Dec 6 08:52:32 2024 +0800 of/fdt: Dump __be32 array in CPU type order in of_dump_addr() of_dump_addr() dumps __be32 array without conversion to CPU byte order in advance, that will reduce log readability for little endian CPUs. Fix by be32_to_cpu() conversion before dump. Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20241206-of_core_fix-v1-6-dc28ed56bec3@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org> drivers/of/fdt_address.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c48780d48df029cf9d5f42b8971663e6fb975ae Author: Stephen Boyd <swboyd@chromium.org> Date: Wed Dec 4 11:48:05 2024 -0800 of: Hide of_default_bus_match_table[] This isn't used outside this file. Hide the array in the C file. Signed-off-by: Stephen Boyd <swboyd@chromium.org> Acked-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20241204194806.2665589-1-swboyd@chromium.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org> drivers/of/platform.c | 23 +++++++++++------------ include/linux/of_platform.h | 2 -- 2 files changed, 11 insertions(+), 14 deletions(-) commit 4bf610499c429fa0bfb3fa94be450f01016224c5 Author: Borislav Petkov (AMD) <bp@alien8.de> Date: Thu Oct 31 11:34:01 2024 +0100 x86/cpufeature: Document cpu_feature_enabled() as the default to use cpu_feature_enabled() should be used in most cases when CPU feature support needs to be tested in code. Document that. Reported-by: Sohil Mehta <sohil.mehta@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Sohil Mehta <sohil.mehta@intel.com> Acked-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/r/20241031103401.GBZyNdGQ-ZyXKyzC_z@fat_crate.local arch/x86/include/asm/cpufeature.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit df425814019f46c2e34567560d15d8f510683c32 Merge: ea049a037e9e f3d87abe11ed Author: Ulf Hansson <ulf.hansson@linaro.org> Date: Tue Dec 10 17:05:47 2024 +0100 mmc: Merge branch fixes into next Merge the mmc fixes for v6.13-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.14. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> commit f03241fbebdf47b9b435752f7e72d3f1e96e4529 Author: Junhao He <hejunhao3@huawei.com> Date: Tue Dec 10 22:15:25 2024 +0800 drivers/perf: hisi: Delete redundant blank line of DDRC PMU Do not add blank line at the end of a code block defined by braces. Signed-off-by: Junhao He <hejunhao3@huawei.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241210141525.37788-11-yangyicong@huawei.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 1 - 1 file changed, 1 deletion(-) commit 4e15bcffa19acf15b6acb2cb3f4a1dd923ee4708 Author: Junhao He <hejunhao3@huawei.com> Date: Tue Dec 10 22:15:24 2024 +0800 drivers/perf: hisi: Fix incorrect variable name "hha_pmu" in DDRC PMU driver In the callback function write_evtype(), the variable name of struct hisi_pmu should be "ddrc_pmu" instead of "hha_pmu". Signed-off-by: Junhao He <hejunhao3@huawei.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241210141525.37788-10-yangyicong@huawei.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3b051bb7cb4344d12b9b9b4974c77706462d4246 Author: Yicong Yang <yangyicong@hisilicon.com> Date: Tue Dec 10 22:15:23 2024 +0800 drivers/perf: hisi: Export associated CPUs of each PMU through sysfs Although the event of the uncore PMU can only be opened on a single CPU, some PMU does have the affinity on a range of CPUs. For example the L3C PMU is associated to the CPUs sharing the L3T it monitors. Users may infer this affinity by the PMU name which may have SCCL ID and CCL ID encoded (for L3C etc), but it's not that straightforward. So export this information by adding an "associated_cpus" sysfs attribute then user can get this directly. Reviewed-by: Jonathan Cameron <Joanthan.Cameron@huawei.com> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241210141525.37788-9-yangyicong@huawei.com Signed-off-by: Will Deacon <will@kernel.org> Documentation/admin-guide/perf/hisi-pmu.rst | 5 ++++- drivers/perf/hisilicon/hisi_uncore_pmu.c | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit 8688c01e313d542124fae82e82c8d6d5c073899f Author: Yicong Yang <yangyicong@hisilicon.com> Date: Tue Dec 10 22:15:22 2024 +0800 drivers/perf: hisi: Provide a generic implementation of cpumask/identifier Each type of HiSilicon Uncore PMU has the following sysfs attributes: - format: bitmask in perf_event_attr::config[012] of corresponding attribute - event: events name and corresponding event code - cpumask: range of CPUs the events can be opened on - identifier: the version of this PMU Different types of PMU have different implementations of the "format" and "event" but all share the same implementation of the "cpumask" and "identifier". Thus we can move cpumask and identifier to the hisi_uncore_pmu framework and drivers can use the generic implementation. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241210141525.37788-8-yangyicong@huawei.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/hisilicon/hisi_uncore_cpa_pmu.c | 27 ++-------------- drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 31 +++--------------- drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 31 +++--------------- drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 31 +++--------------- drivers/perf/hisilicon/hisi_uncore_pa_pmu.c | 35 ++++----------------- drivers/perf/hisilicon/hisi_uncore_pmu.c | 45 +++++++++++++++++++++------ drivers/perf/hisilicon/hisi_uncore_pmu.h | 4 +++ drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c | 27 ++-------------- drivers/perf/hisilicon/hisi_uncore_uc_pmu.c | 27 ++-------------- 9 files changed, 63 insertions(+), 195 deletions(-) commit 32528b165ea1266ee25afe6a29be0107b3c5e76a Author: Yicong Yang <yangyicong@hisilicon.com> Date: Tue Dec 10 22:15:21 2024 +0800 drivers/perf: hisi: Add a common function to retrieve topology from firmware Currently each type of uncore PMU driver uses almost the same routine and the same firmware interface (or properties) to retrieve the topology information, then reset the unused IDs to -1. Extract the common parts to the framework in hisi_uncore_pmu_init_topology(). Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241210141525.37788-7-yangyicong@huawei.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/hisilicon/hisi_uncore_cpa_pmu.c | 10 ++++----- drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 10 ++++----- drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 10 ++++----- drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 8 +++---- drivers/perf/hisilicon/hisi_uncore_pa_pmu.c | 11 ++++------ drivers/perf/hisilicon/hisi_uncore_pmu.c | 30 +++++++++++++++++++++++++++ drivers/perf/hisilicon/hisi_uncore_pmu.h | 1 + drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c | 11 ++++------ drivers/perf/hisilicon/hisi_uncore_uc_pmu.c | 12 +++++------ 9 files changed, 60 insertions(+), 43 deletions(-) commit c192026ceea793a73d4b54ed46dc1cfeb21d3853 Author: Yicong Yang <yangyicong@hisilicon.com> Date: Tue Dec 10 22:15:20 2024 +0800 drivers/perf: hisi: Extract topology information to a separate structure HiSilicon Uncore PMUs are identified by the IDs of the topology element on which the PMUs are located. Add a new separate struct hisi_pmu_toplogy to encapsulate this information. Add additional documentation on the meaning of each ID. - make sccl_id and sicl_id into a union since they're exclusive. It can also be accessed by scl_id if the SICL/SCCL distinction is not relevant - make index_id and sub_id signed so -1 may be used to indicate the PMU doesn't have this topology element or it could not be retrieved. This patch should have no functional changes. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241210141525.37788-6-yangyicong@huawei.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/hisilicon/hisi_uncore_cpa_pmu.c | 12 ++++----- drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 18 ++++++------- drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 12 ++++----- drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 8 +++--- drivers/perf/hisilicon/hisi_uncore_pa_pmu.c | 14 +++++----- drivers/perf/hisilicon/hisi_uncore_pmu.c | 7 ++--- drivers/perf/hisilicon/hisi_uncore_pmu.h | 38 ++++++++++++++++++++++----- drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c | 10 +++---- drivers/perf/hisilicon/hisi_uncore_uc_pmu.c | 11 ++++---- 9 files changed, 78 insertions(+), 52 deletions(-) commit 6cd137088fdf02488ab29d11c64f66ac650ec1ad Author: Yicong Yang <yangyicong@hisilicon.com> Date: Tue Dec 10 22:15:19 2024 +0800 drivers/perf: hisi: Refactor the detection of associated CPUs There are two type of PMUs supported currently: 1) PMUs locate on SCCL (Super CPU Cluster [1]), associated with certain CCL (CPU cluster [1])(e.g. L3C PMU) or not (e.g. DDRC PMU) 2) PMUs locate on the SICL (Super IO Cluster [1]), which has no association with certain CPU topology (e.g. CPA PMU) Currently the associated CPUs of the PMU is detected in the cpuhp online callback as below: - for type 1) the CPUs match PMU's sccl_id and ccl_id - for type 2) PMU's sccl_id is -1 and all online CPUs will be associated Since uncore PMUs are not bound to certain CPU context and event could be counting started by any online CPU, the associated CPUs are just a preference. Below disadvantages are observed in current implementation: - the PMU cannot be used if its associated CPUs are offline - SICL PMUs are associated to all the online CPUs implicitly without the consideration of locality So refactor the way we detect the associated CPUs in below aspects: - add a clear definition of hisi_pmu::associated_cpus - initialize hisi_pmu::on_cpu based on locality if no associated CPU found, otherwise update it from associated CPUs - drop the detection with a sccl_id of -1 for SICL PMUs [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin-guide/perf/hisi-pmu.rst?h=v6.12-rc1 Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241210141525.37788-5-yangyicong@huawei.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/hisilicon/hisi_uncore_pmu.c | 22 +++++++++++++++------- drivers/perf/hisilicon/hisi_uncore_pmu.h | 6 +++++- 2 files changed, 20 insertions(+), 8 deletions(-) commit 83037a47d3aa5f3e35b0c02433a87806e9c34438 Author: Yicong Yang <yangyicong@hisilicon.com> Date: Tue Dec 10 22:15:18 2024 +0800 drivers/perf: hisi: Migrate to one online CPU if no associated one online If the selected CPU hisi_pmu::on_cpu goes offline, driver will select a new online CPU from hisi_pmu::associated_cpus, or if no online CPU found the PMU context won't be migrated. However for uncore PMUs the associated CPUs are just a peference and it also works to schedule the events on any online CPUs. So add a fallback to choose an online CPU if no associated CPUs found. Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241210141525.37788-4-yangyicong@huawei.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/hisilicon/hisi_uncore_pmu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit f2368a209a713267b68f7a4906a5012a29925410 Author: Yicong Yang <yangyicong@hisilicon.com> Date: Tue Dec 10 22:15:17 2024 +0800 drivers/perf: hisi: Don't update the associated_cpus on CPU offline Event will be scheduled on CPU of hisi_pmu::on_cpu which is selected from the intersection of hisi_pmu::associated_cpus and online CPUs. So the associated_cpus don't need to be maintained with online CPUs. This will save one update operation if one associated CPU is offlined. Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241210141525.37788-3-yangyicong@huawei.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/hisilicon/hisi_uncore_pmu.c | 3 --- 1 file changed, 3 deletions(-) commit 41729809ac8504abb7ac757105c6db2c2fbbc466 Author: Yicong Yang <yangyicong@hisilicon.com> Date: Tue Dec 10 22:15:16 2024 +0800 drivers/perf: hisi: Define a symbol namespace for HiSilicon Uncore PMUs The HiSilicon Uncore PMU framework implements some common functions and exported them to the drivers. Use a specific HISI_PMU namespace for the exported symbols to avoid pollute the generic ones. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20241210141525.37788-2-yangyicong@huawei.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/hisilicon/hisi_uncore_cpa_pmu.c | 1 + drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 1 + drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 1 + drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 1 + drivers/perf/hisilicon/hisi_uncore_pa_pmu.c | 1 + drivers/perf/hisilicon/hisi_uncore_pmu.c | 36 +++++++++++++-------------- drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c | 1 + drivers/perf/hisilicon/hisi_uncore_uc_pmu.c | 1 + 8 files changed, 25 insertions(+), 18 deletions(-) commit 7ecc7329c4ddeb42041a2bd95b8c1b6e17e5ea8d Author: Andrew Martin <Andrew.Martin@amd.com> Date: Fri Dec 6 14:52:34 2024 -0500 drm/amdkfd: Uninitialized pointer read This a pointer that is being passed into other functions, so it is best to initialize it to NULL prior. Signed-off-by: Andrew Martin <Andrew.Martin@amd.com> Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00cace8b549a5eec2459eb7446b5e39f26268288 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Mon Nov 4 02:38:52 2024 +0000 drm/amd/display: Remove unused dcn_find_dcfclk_suits_all dcn_find_dcfclk_suits_all() last use was removed by 2018's commit 4fd994c448a3 ("drm/amd/display: Start using the new pp_smu interface") Remove it, and the dcn_find_normalized_clock_vdd_Level helper it used. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/display/dc/dml/calcs/dcn_calcs.c | 132 --------------------- drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h | 4 - 2 files changed, 136 deletions(-) commit 21615ea493a0f420a4c98ee18240d745dba6e9cd Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Mon Nov 4 02:38:51 2024 +0000 drm/amd/display: Remove unused mmhubbub_warmup field mmhubbub_warmup is a field that was only read by the just removed dc_stream_warmup_writeback() function. Remove the field and it's initialisers. It was only ever initialised to a single function value (dcn30_mmhubbub_warmup) which is called explicitly elsewhere. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_init.c | 1 - drivers/gpu/drm/amd/display/dc/hwss/dcn301/dcn301_init.c | 1 - drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_init.c | 1 - drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_init.c | 1 - drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_init.c | 1 - drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_init.c | 1 - drivers/gpu/drm/amd/display/dc/hwss/dcn351/dcn351_init.c | 1 - drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c | 1 - drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h | 4 ---- 9 files changed, 12 deletions(-) commit 006ee12cd8b7f834beaad5f1d796482775b3b880 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Mon Nov 4 02:38:50 2024 +0000 drm/amd/display: Remove unused dc_stream_warmup_writeback dc_stream_warmup_writeback() is unused since it was added in 2019 by commit 6a652f6d127d ("drm/amd/display: Add warmup escape call support") Remove it. Note there is a dcn30 version that's called directly which is kept. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 11 ----------- drivers/gpu/drm/amd/display/dc/dc_stream.h | 4 ---- 2 files changed, 15 deletions(-) commit a4b0d065dfb3fef32078e81eec5e8fac59a6070d Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Mon Nov 4 02:38:49 2024 +0000 drm/amd/display: Remove unused dwb3_set_host_read_rate_control dwb3_set_host_read_rate_control() has been unused since it was added by commit 8993dee0de2a ("drm/amd/display: Add DCN3 DWB") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dwb/dcn30/dcn30_dwb.c | 13 ------------- drivers/gpu/drm/amd/display/dc/dwb/dcn30/dcn30_dwb.h | 1 - 2 files changed, 14 deletions(-) commit b7d38567b1baa516345452b5c64a74cb203f00c6 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Mon Nov 4 02:38:48 2024 +0000 drm/amd/display: Remove unused enable_surface_flip_reporting enable_surface_flip_reporting() has been unused since it was added by commit 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 7 ------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 --- 2 files changed, 10 deletions(-) commit ecc5278ce05d18fb0a2e167ead91394356cb4c79 Author: Leo Li <sunpeng.li@amd.com> Date: Thu Dec 5 15:43:42 2024 -0500 drm/amdgpu: rename register headers to dcn_2_0_1 They were named with the incorrect dcn version. Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Sun peng Li <sunpeng.li@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c | 4 ++-- drivers/gpu/drm/amd/display/dc/irq/dcn201/irq_service_dcn201.c | 4 ++-- drivers/gpu/drm/amd/display/dc/resource/dcn201/dcn201_resource.c | 4 ++-- .../include/asic_reg/dcn/{dcn_2_0_3_offset.h => dcn_2_0_1_offset.h} | 4 ++-- .../include/asic_reg/dcn/{dcn_2_0_3_sh_mask.h => dcn_2_0_1_sh_mask.h} | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) commit 859a661eb493fffa88ea5c94b0cd62ecc7b24634 Author: Aric Cyr <aric.cyr@amd.com> Date: Sun Dec 1 23:06:31 2024 -0500 drm/amd/display: 3.2.313 * Fix some regressions related to IPS2 and PSR Panel Replay * Bug fixes in DML * DMCUB debug improvements * Other refactors and improvements across multiple components Reviewed-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Aric Cyr <aric.cyr@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9aec7222efdbf465468de4ae87827f0d0766338b Author: Taimur Hassan <Syed.Hassan@amd.com> Date: Sun Dec 1 00:46:06 2024 -0500 drm/amd/display: [FW Promotion] Release 0.0.246.0 Reviewed-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Taimur Hassan <Syed.Hassan@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 154 ++++++++++++++++-------- 1 file changed, 103 insertions(+), 51 deletions(-) commit a1fc2837f4960e84e9375e12292584ad2ae472da Author: Charlene Liu <Charlene.Liu@amd.com> Date: Fri Nov 29 17:18:50 2024 -0500 drm/amd/display: update dcn351 used clock offset [why] hw register offset delta Reviewed-by: Martin Leung <martin.leung@amd.com> Signed-off-by: Charlene Liu <Charlene.Liu@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 5 +- .../amd/display/dc/clk_mgr/dcn35/dcn351_clk_mgr.c | 140 +++++++++++++++++++++ .../amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 132 ++++++++++++++----- .../amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.h | 4 + .../drm/amd/display/dc/inc/hw/clk_mgr_internal.h | 59 +++++++++ 6 files changed, 308 insertions(+), 34 deletions(-) commit 25ac54d6b771de5cb90dd6705d91ee19da7bd800 Author: Zhongwei <Zhongwei.Zhang@amd.com> Date: Wed Nov 27 13:58:17 2024 +0800 drm/amd/display: remove clearance code of force_ffu_mode flag in dmub_psr_copy_settings() [Why/How] The force_ffu_mode flag could be initialized at other place. Reviewed-by: Robin Chen <robin.chen@amd.com> Signed-off-by: Zhongwei <Zhongwei.Zhang@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 670bae1037a5f741f2caee5b3ce504289fcbbc9b Author: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Date: Thu Nov 28 11:45:21 2024 -0500 Revert "drm/amd/display: Don't allow IPS2 in D0 for RCG Dynamic" This reverts commit 8488646966fe. In some test environments causes reporting failures for S0i3/S4. It shouldn't actually block entry provided there's no race with the last state being updated, but currently suspecting there's an IPS2 check that's no longer being met. Fixes: 8488646966fe ("drm/amd/display: Don't allow IPS2 in D0 for RCG Dynamic") Reviewed-by: Ovidiu Bunea <ovidiu.bunea@amd.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 5 +---- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) commit 1afb0e012e7acee849e622adafe6abc9b46c51ee Author: Gabe Teeger <Gabe.Teeger@amd.com> Date: Thu Nov 28 09:19:09 2024 -0500 Revert "drm/amd/display: Revised for Replay Pseudo vblank" This reverts commit 0f5ac8c8e275 Due to a replay regression. Fixes: 0f5ac8c8e275 ("drm/amd/display: Revised for Replay Pseudo vblank control") Reviewed-by: Dennis Chan <dennis.chan@amd.com> Signed-off-by: Gabe Teeger <Gabe.Teeger@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc_types.h | 4 ++-- drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 4 ++-- drivers/gpu/drm/amd/display/modules/power/power_helpers.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 2909c6d7b19ced6ff85dba6757a6d43dc446c4eb Author: Chris Park <chris.park@amd.com> Date: Wed Nov 27 13:50:04 2024 -0500 drm/amd/display: Update color space, bias and scale programming sequence [Why] DMColor inaccurately updates color space, bias and scale destructively in dc_plane_state. This can be resolved by accurately populating the infos on dc_plane_info where then translation to plane state can happen as a whole surface update sequence. [How] Remove dc_plane_state update in DMColor and update color space, bias and scale on dc_plane_info. Reviewed-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Chris Park <chris.park@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + 2 files changed, 5 insertions(+) commit 57ac1175b9568a04042c998a6ab84322afc9bce0 Author: Peterson <peterson.guo@amd.com> Date: Wed Nov 27 16:04:13 2024 -0500 drm/amd/display: Use resource_build_scaling_params for dcn20 [WHY] When using upscaling on certain gpus, some incorrect scaling calculations would be made causing hangs. [HOW] This was fixed by using the resource_build_scaling_params function on these gpus. Reviewed-by: Dillon Varone <dillon.varone@amd.com> Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Peterson Guo <peterson.guo@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../amd/display/dc/resource/dcn20/dcn20_resource.c | 57 ++-------------------- 1 file changed, 3 insertions(+), 54 deletions(-) commit 24909d9ec7c3afa8da2f3c9afa312e7a4a61f250 Author: Ausef Yousof <Ausef.Yousof@amd.com> Date: Tue Nov 26 15:26:01 2024 -0500 drm/amd/display: Overwriting dualDPP UBF values before usage [WHY] Right now in dml2 mode validation we are calculating UBF parameters for prefetch calculation for single and dual DPP scenarios. Data structure to store such values are just 1D arrays, the single DPP values are overwritten by the dualDPP values, and we end up using dualDPP for prefetch calculations twice (once in place of singleDPP support check and again for dual). This naturally leads to many problems, one of which validating a mode in "singleDPP" (when we used dual DPP parameters) and sending the singleDPP parameters to mode programming, if we cannot support then we observe the corruption as described in the ticket. [HOW] UBF values need to have 2d arrays to store values specific to single and dual DPP states to avoid single DPP values being overwritten. Other parameters are recorded on a per state basis such as prefetch UBF values but they are in the same loop used for calculation and at that point its fine to overwrite them, its not the case for plain UBF values. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Ausef Yousof <Ausef.Yousof@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../drm/amd/display/dc/dml2/display_mode_core.c | 30 +++++++++++----------- .../display/dc/dml2/display_mode_core_structs.h | 6 ++--- 2 files changed, 18 insertions(+), 18 deletions(-) commit 5a498172c8d0eab3e567b4212d6c3199717928d5 Author: Leo Li <sunpeng.li@amd.com> Date: Tue Nov 26 12:34:39 2024 -0500 drm/amd/display: Make DMCUB tracebuffer debugfs chronological [Why] Previously, the debugfs did a simple dump of the tracebuffer region. Because the tracebuffer is a ring, it meant that the entries printed may not be in chronological order if the ring rolled over. This makes parsing the tracelog cumbersome. [How] Since dmcub provides the current entry count, use that to determine the latest tracelog entry and output the log chronologically. Also, the fb region size is not accurate of the actual tracebuffer size; it has been padded to alignment requirements. Use the tracebuffer size reported by the fw meta_info, if available. If not, a fallback to the hardcoded default is needed. To make this value available to other .c files, its define was moved to dmub_srv.h. Also, print a indicator at the start of the log if rollover occurred. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 26 +++++++++++++++++++--- drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 3 +++ drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c | 4 ---- 3 files changed, 26 insertions(+), 7 deletions(-) commit 7b4340576ef2bb1f28959fd8bc72d850752e61d5 Author: Samson Tam <Samson.Tam@amd.com> Date: Fri Nov 22 13:48:54 2024 -0500 drm/amd/display: clean up SPL code [Why & How] Add check for invalid pixel format, remove unused pixel formats and clean up some names Reviewed-by: Navid Assadian <navid.assadian@amd.com> Signed-off-by: Samson Tam <Samson.Tam@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc_spl_translate.c | 9 ++- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 71 +++++++++++------------ drivers/gpu/drm/amd/display/dc/spl/dc_spl_types.h | 6 +- 3 files changed, 46 insertions(+), 40 deletions(-) commit fae0e342f56a96511c97f6f50bd9cb9497e47206 Author: Austin Zheng <Austin.Zheng@amd.com> Date: Tue Nov 26 11:39:32 2024 -0500 drm/amd/display: DML21 Update Prefetch Calculations [Why/How] Mismatch between mode support and mode programming occurs. Mode support would calculate higher row vblank than mode programming. As a result, mode programming fails and hardware isn't properly programmed. Reviewed-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Austin Zheng <Austin.Zheng@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 58a8467a3493c0817c95aa53c6ef0d17a508f544 Author: Wayne Lin <Wayne.Lin@amd.com> Date: Thu Oct 31 17:32:32 2024 +0800 drm/amd/display: Adjust secure_display_context data structure [Why] Variables relates to secure display are spreading out within struct amdgpu_display_manager. [How] Encapsulate relevant variables into struct secure_display_context and adjust relevant affected codes. Reviewed-by: HaoPing Liu <haoping.liu@amd.com> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 16 +-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 12 +-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 109 +++++++++++---------- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h | 16 ++- 4 files changed, 81 insertions(+), 72 deletions(-) commit 34b6c4b1306d6bce72663ae7863356e29351f237 Author: Wayne Lin <Wayne.Lin@amd.com> Date: Thu Jul 25 15:29:44 2024 +0800 drm/amd/display: Fix phy id mapping issue for secure display [Why] Under mst scenario, mst streams are from the same link_enc_hw_inst. As the result, can't utilize that as the phy index for distinguising different stream sinks. [How] Sort the connectors by: link_enc_hw_instance->mst tree depth->mst RAD After sorting the phy index assignment, store connector's relevant info into dm mapping array. Once need the index, just look up the static array. Reviewed-by: HaoPing Liu <haoping.liu@amd.com> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 4 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 264 ++++++++++++++++++++- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h | 9 + 3 files changed, 273 insertions(+), 4 deletions(-) commit 37a8f9b0c97178f72fdea83aa99e03579673a2e3 Author: Wayne Lin <Wayne.Lin@amd.com> Date: Tue Aug 6 17:21:24 2024 +0800 drm/amd/display: Adjust dc_stream_forward_crc_window to accept assignment of phy_id [Why] For mst streams under same topology, stream->link->link_enc_hw_inst are the same and hence can't distinguish the crc window setting. [How] Firstly adjust dc_stream_forward_crc_window to accept assignment of phy_id. Follow up another patch to determine the phy_id at dm layer. Reviewed-by: HaoPing Liu <haoping.liu@amd.com> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 6 ++++-- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) commit 5f02fc3ecb7d565df7db027a39fc7b39cb3deea8 Author: Joshua Aberback <joshua.aberback@amd.com> Date: Fri Nov 22 19:46:10 2024 -0500 drm/amd/display: Refactor dcn31_panel_construct to avoid assert [Why] We want to avoid unnecessary asserts, one of which is hit in dcn31_panel_construct when booting on a DCN32 asic that has an eDP connector on a different DIG than A or B. The DIG-based mapping only applies when edp0_on_dp1 is supported, therefore the check for valid eng_id can be moved within the appropriate section of the if statement. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Joshua Aberback <joshua.aberback@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../drm/amd/display/dc/dcn31/dcn31_panel_cntl.c | 34 ++++++++++++---------- 1 file changed, 18 insertions(+), 16 deletions(-) commit ea0553b41bb8ef5eb022741b5433645595e1e3f0 Author: Karthi Kandasamy <karthi.kandasamy@amd.com> Date: Tue Oct 22 20:47:19 2024 +0200 drm/amd/display: expose DCN401 HUBP functions [Why] Expose DCN401 HUBP functions for use across other platforms. [Description] This change aims to make the DCN401 HUBP functions accessible for enabling their use in future platform developments. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Karthi Kandasamy <karthi.kandasamy@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c | 20 +++++++++---------- .../drm/amd/display/dc/hubp/dcn401/dcn401_hubp.h | 23 ++++++++++++++++++++++ 2 files changed, 33 insertions(+), 10 deletions(-) commit 679580530d45b2eebde83a770b1c53248ee44751 Author: Harry VanZyllDeJong <hvanzyll@amd.com> Date: Wed Nov 20 14:50:24 2024 -0500 drm/amd/display: populate VABC support in DMCUB [HOW&WHY] Stores DMUB support for enablement of Varibright over VABC in DCN32 Reviewed-by: Aric Cyr <aric.cyr@amd.com> Reviewed-by: Iswara Nagulendran <iswara.nagulendran@amd.com> Signed-off-by: Harry VanZyllDeJong <hvanzyll@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 1 + 1 file changed, 1 insertion(+) commit ecd1191e128aacaf7d35f09bbbb28d890a7120ab Author: Candice Li <candice.li@amd.com> Date: Thu Aug 8 16:40:41 2024 +0800 drm/amdgpu: Support nbif v6_3_1 fatal error handling Add nbif v6_3_1 fatal error handling support. Signed-off-by: Candice Li <candice.li@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 12 +++++ drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c | 81 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.h | 1 + drivers/gpu/drm/amd/amdgpu/soc24.c | 19 +++++++- 4 files changed, 111 insertions(+), 2 deletions(-) commit 58893392989786eefd89aba48823dc3e27d37fd6 Author: Lijo Lazar <lijo.lazar@amd.com> Date: Fri Dec 6 18:24:06 2024 +0530 drm/amd/pm: Revert state if force level fails Before forcing level, CG/PG is disabled or enabled depending on the new level. However if the force level operation fails, CG/PG state remains modified. Revert the state change on failure. Also, move invalid operation checks to the beginning before any logic that could change SOC state. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 58 ++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 23 deletions(-) commit 178ad3a9d1502439e750cca90dbbbf7478d29e63 Author: Sonny Jiang <sonjiang@amd.com> Date: Sun Oct 13 00:16:21 2024 -0400 drm/amdgpu: Enable VCN_5_0_1 IP block Add VCN_5_0_1 IP block to kernel boot Signed-off-by: Sonny Jiang <sonjiang@amd.com> Acked-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 346492f30ce3581bf5324c4ae417eab8537dc998 Author: Sonny Jiang <sonjiang@amd.com> Date: Sat Oct 12 18:55:23 2024 -0400 drm/amdgpu: Add VCN_5_0_1 support Add vcn support for VCN_5_0_1 v2: rebase, squash in fixes (Alex) Signed-off-by: Sonny Jiang <sonjiang@amd.com> Acked-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 14 +- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 1105 +++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.h | 37 ++ 5 files changed, 1161 insertions(+), 5 deletions(-) commit c406fca4b5f86ffc5b5c06bc86b60ad6ae555d15 Author: Sathishkumar S <sathishkumar.sundararaju@amd.com> Date: Thu Aug 8 18:41:07 2024 +0530 drm/amdgpu: enable JPEG5_0_1 ip block enable JPEG5_0_1 ip block Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com> Reviewed-by: Sonny Jiang <sonny.jiang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 4 ++++ 1 file changed, 4 insertions(+) commit b8f57b69942b2faa7deee0566cc9306316fe0a74 Author: Sathishkumar S <sathishkumar.sundararaju@amd.com> Date: Fri Aug 9 15:23:04 2024 +0530 drm/amdgpu: Add JPEG5_0_1 support add support for JPEG5_0_1 v2: squash in updates, rebase on IP instance changes Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com> Reviewed-by: Sonny Jiang <sonny.jiang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | 708 +++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.h | 29 ++ 3 files changed, 739 insertions(+), 1 deletion(-) commit 4e4b1a1b80dd7b1771496b379447433262886d7b Author: Sonny Jiang <sonjiang@amd.com> Date: Sun Oct 13 00:29:03 2024 -0400 drm/amdgpu: Add VCN_5_0_1 codec query Support VCN_5_0_1 codec query v2: squash in updates Signed-off-by: Sonny Jiang <sonjiang@amd.com> Acked-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/soc15.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit fdce10ff8f4b42d541eee7b18492afa74d9ba056 Author: Sonny Jiang <sonjiang@amd.com> Date: Sat Oct 12 12:56:47 2024 -0400 drm/amdgpu: Add VCN_5_0_1 firmware Add vcn_5_0_1 firmware support Signed-off-by: Sonny Jiang <sonjiang@amd.com> Acked-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 20a3029227ee3fd4b4da6a02c9f58d0eb8d348c1 Author: Sathishkumar S <sathishkumar.sundararaju@amd.com> Date: Mon Nov 11 17:29:02 2024 -0500 drm/amdgpu: update macro for maximum jpeg rings Update the macro to accomdate more rings. Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com> Acked-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Sonny Jiang <sonjiang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h | 3 ++- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 25510f92b4792d228b646ebc6c7647f63009110b Author: Aurabindo Pillai <aurabindo.pillai@amd.com> Date: Fri Dec 6 13:51:59 2024 -0500 drm/amd: Update atomfirmware: add new retimer definition Add some new retimer definitions and also fix a incorrect definition Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Reviewed-by: Michael Strauss <michael.strauss@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/include/atomfirmware.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit b1d0286c81980014d6f111eb6d1308f34e91bcb7 Author: Alex Deucher <alexander.deucher@amd.com> Date: Mon Nov 11 17:15:37 2024 -0500 drm/amdgpu: update irq sec header for vcn 5.0.0 No functional change. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 26893116c3c6feeaf13ff81a51d097e22a894e3c Author: Alex Deucher <alexander.deucher@amd.com> Date: Mon Nov 11 17:14:46 2024 -0500 drm/amdgpu: update irq sec header for jpeg 5.0.0 No functional change. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d1bb64651095b53572dc170982fc1c1cf92b672c Author: Sathishkumar S <sathishkumar.sundararaju@amd.com> Date: Fri Oct 18 18:05:16 2024 +0530 drm/amdgpu: add irq source ids for VCN5_0/JPEG5_0 Add interrupt source id macros for VCN5 and JPEG5 V2: Update copyright year (Sonny) Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com> Acked-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Sonny Jiang <sonjiang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../drm/amd/include/ivsrcid/vcn/irqsrcs_vcn_5_0.h | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 33f1aa210a0fe0bda1d287e34ae6fdcf3be52617 Author: Candice Li <candice.li@amd.com> Date: Fri Apr 26 18:56:57 2024 +0800 drm/amdgpu: Add umc v8_14 ras functions Add umc v8_14 ras functions. Signed-off-by: Candice Li <candice.li@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 18 +++- drivers/gpu/drm/amd/amdgpu/umc_v8_14.c | 160 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/umc_v8_14.h | 51 +++++++++++ 4 files changed, 229 insertions(+), 2 deletions(-) commit 334a81583e6cb722a99b6897cae6e63ea4fb16f5 Author: Candice Li <candice.li@amd.com> Date: Thu Jul 11 16:45:10 2024 +0800 drm/amdgpu: Add umc v8_14_0 ip headers Add umc v8_14_0 ip headers. Signed-off-by: Candice Li <candice.li@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../amd/include/asic_reg/umc/umc_8_14_0_offset.h | 29 +++++++++++++++++ .../amd/include/asic_reg/umc/umc_8_14_0_sh_mask.h | 37 ++++++++++++++++++++++ 2 files changed, 66 insertions(+) commit 2c2b84f193bbbd6e4dad2ccd5b1e600f8433f96f Author: Candice Li <candice.li@amd.com> Date: Wed Dec 4 17:47:11 2024 +0800 drm/amdgpu: Add psp v14_0_3 ras support Add psp v14_0_3 ras support. Signed-off-by: Candice Li <candice.li@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 + 1 file changed, 1 insertion(+) commit 55f4139b6598bc1f8e2fca2181c2749bca84ffee Author: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Date: Thu Nov 28 01:11:36 2024 +0530 drm/amd/amdgpu: Add Annotations to Process Isolation functions This update adds explanations to key functions that manage how the Kernel Fusion Driver (KFD) and Kernel Graphics Driver (KGD) share the GPU. amdgpu_gfx_enforce_isolation_wait_for_kfd: Controls the waiting period for KFD to ensure it takes turns with KGD in using the GPU. It uses a mutex to safely manage shared data, like timing and state, and tracks when KFD starts and stops waiting. amdgpu_gfx_enforce_isolation_ring_begin_use: Ensures KFD has enough time to run before new tasks are submitted to the GPU ring. It uses a mutex to synchronize access and may adjust the KFD scheduler. amdgpu_gfx_enforce_isolation_ring_end_use: Handles cleanup and state updates when finishing the use of a GPU ring. It may also adjust the KFD scheduler, using a mutex to manage shared data access. Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Suggested-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 57bcfa89feaacb39f3640e28f946a1364e41b6b7 Author: Hawking Zhang <Hawking.Zhang@amd.com> Date: Thu Oct 3 23:55:48 2024 +0800 drm/amdgpu: Init mmhub v1_8_1 ras func reuse mmhub v1_8 ras functuion Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Asad Kamal <asad.kamal@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 1 + 1 file changed, 1 insertion(+) commit bd18b11f2d8bd25de5fd5ca24d5694c8b8ec25b7 Author: Shiwu Zhang <shiwu.zhang@amd.com> Date: Sat Jul 27 13:05:14 2024 +0800 drm/amdgpu: Enable xgmi for gfx v9_5_0 Enable xgmi for gfx v9_5_0 Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Shiwu Zhang <shiwu.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f79cfbac5cc551da81c8f3bcb690debc0683c6ab Author: Asad Kamal <asad.kamal@amd.com> Date: Tue Sep 10 16:02:03 2024 +0800 drm/amdgpu: Fetch refclock for SMU v13.0.12 Add support to fetch refclock value for SMU v13.0.12 Signed-off-by: Asad Kamal <asad.kamal@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + 1 file changed, 1 insertion(+) commit 100350c3730f4c7ec122ed8ed399aad44cdda6e1 Author: Asad Kamal <asad.kamal@amd.com> Date: Tue Sep 10 15:32:15 2024 +0800 drm/amd/pm: Add mode2 support for SMU v13.0.12 Add mode2 reset support for smu version 13.0.12 Signed-off-by: Asad Kamal <asad.kamal@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 2 ++ drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + 2 files changed, 3 insertions(+) commit 1d5b62e3f82adec536965a26112b0d44033516c5 Author: Asad Kamal <asad.kamal@amd.com> Date: Thu Jul 4 11:49:41 2024 +0800 drm/amd/pm: Add smu_v13_0_12 support Add support for new smu 13_0_12 version v2: Updated subject & moved skipping p2s init to a separate patch Signed-off-by: Asad Kamal <asad.kamal@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 + 1 file changed, 1 insertion(+) commit a69f4cc278fe5285f1f42562904f4472955c20ea Author: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Date: Fri Nov 29 19:20:03 2024 +0530 drm/amd/amdgpu: Add Descriptions to Process Isolation and Cleaner Shader Sysfs Functions This update adds explanations to key functions related to process isolation and cleaner shader execution sysfs interfaces. - `amdgpu_gfx_set_run_cleaner_shader`: Describes how to manually run a cleaner shader, which clears the Local Data Store (LDS) and General Purpose Registers (GPRs) to ensure data isolation between GPU workloads. - `amdgpu_gfx_get_enforce_isolation`: Describes how to query the current settings of the 'enforce_isolation' feature for each GPU partition. - `amdgpu_gfx_set_enforce_isolation`: Describes how to enable or disable process isolation for GPU partitions through the sysfs interface. Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Suggested-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 45 +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 9a826c4af8f1be3cf6838a8ea2fc70d03315aaa6 Author: Hawking Zhang <Hawking.Zhang@amd.com> Date: Sun Aug 18 15:26:13 2024 +0800 drm/amdgpu: Enable RAS for psp v13_0_12 Enable RAS Cap check and initialize RAS funcs for psp v13_0_12 Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 1 + 2 files changed, 6 insertions(+) commit 98230feb55124802832985e1d75c309f0d680f5d Author: Hawking Zhang <Hawking.Zhang@amd.com> Date: Thu Aug 8 16:25:16 2024 +0800 drm/amdgpu: Load spdm_drv for psp v13_0_12 spdm_drv is a firmware that needs to be loaded in driver initialization phase. Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 15 +++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 1 + drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 6 ++++++ 4 files changed, 28 insertions(+) commit 3516d35f8122ed04ddb5b2b25ea28cd0dc014614 Author: Hawking Zhang <Hawking.Zhang@amd.com> Date: Sat Jul 27 13:43:01 2024 +0800 drm/amdgpu: Add psp v13_0_12 firmware specifiers Add psp v13_0_12 firmware specifiers for sos and ta Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Shiwu Zhang <shiwu.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 2 ++ 1 file changed, 2 insertions(+) commit 2d2f1622c82a93239dac53240bc3570e84e13129 Author: Le Ma <le.ma@amd.com> Date: Thu May 16 14:46:22 2024 +0800 drm/amdgpu: add psp 13_0_12 version support Add support for new psp 13_0_12 version Signed-off-by: Le Ma <le.ma@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++ drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + 4 files changed, 8 insertions(+) commit b6e6871a56d7471f087c3f36e63f213668feba49 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Thu Dec 5 10:51:27 2024 -0600 drm/amd: Show an info message about optional firmware missing With the warning from the core about missing firmware gone, users still may be notified of missing optional firmware by a more friendly message to clarify it's optional. Suggested-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2a50d94b11e2f58aba6ee58adcf1011e0ed694b7 Author: Yang Wang <kevinyang.wang@amd.com> Date: Fri Nov 29 15:41:05 2024 +0800 drm/amdgpu: add ACA support for jpeg v4.0.3 Add ACA support for jpeg v4.0.3. Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 86 ++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) commit 3748c439bbca728697f97d4913815179e8abbf23 Author: Yang Wang <kevinyang.wang@amd.com> Date: Thu Nov 28 15:19:20 2024 +0800 drm/amdgpu: add ACA support for vcn v4.0.3 v1: Add ACA support for vcn v4.0.3. v2: - split VCN ACA(v1) to 2 parts: vcn and jpeg. - move mmSMNAID_AID0_MCA_SMU to amdgpu_aca.h file. v3: - split JPEG ACA to another patch. Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 85 +++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) commit abfcf9560743937c6368ebad278603d0dab8b029 Author: Yang Wang <kevinyang.wang@amd.com> Date: Fri Nov 29 15:12:37 2024 +0800 drm/amdgpu: move common ACA ipid defines into amdgpu_aca.h move common ACA ipid defines into amdgpu_aca.h file. Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_aca.h | 5 +++++ drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 4 ---- drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 1 - 3 files changed, 5 insertions(+), 5 deletions(-) commit 1a3d4abd54b33db7e47822e652486d0baf5c3357 Author: Alex Sierra <alex.sierra@amd.com> Date: Thu May 30 14:16:16 2024 -0500 drm/amdgpu: add ih cam support for IH 4.4.4 Same as IH 4.4.2. Signed-off-by: Alex Sierra <alex.sierra@amd.com> Reviewed-by: Amber Lin <Amber.Lin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 1 + 1 file changed, 1 insertion(+) commit 968e3811c3e87d49bd644bb05cdffac2dbd89394 Author: Le Ma <le.ma@amd.com> Date: Fri Nov 8 14:43:13 2024 -0500 drm/amdgpu: add initial support for sdma444 add sdma444 basic support Signed-off-by: Le Ma <le.ma@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 2 ++ drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 2 ++ 3 files changed, 5 insertions(+) commit fd0c6bd82d19c218e8421db5a76db268d24583a8 Author: Lijo Lazar <lijo.lazar@amd.com> Date: Tue Dec 3 14:41:31 2024 +0530 drm/amdgpu: Increase FRU File Id buffer size Some boards use longer File Ids. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Asad Kamal <asad.kamal@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae756cd8536923841b45340f7ee369272c9bf105 Author: Tao Zhou <tao.zhou1@amd.com> Date: Fri Nov 29 16:52:41 2024 +0800 drm/amdgpu: correct the calculation of RAS bad page After the introduction of NPS RAS, one bad page record on eeprom may be related to 1 or 16 bad pages, so the bad page record and bad page are two different concepts, define a new variable to store bad page number. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 10 ++----- drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 40 +++++++++++++++++--------- drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h | 5 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 3 +- 4 files changed, 36 insertions(+), 22 deletions(-) commit 1f06e7f344c4ac66184ee6bb49d83b8c413306ca Author: Tao Zhou <tao.zhou1@amd.com> Date: Thu Nov 28 18:30:36 2024 +0800 drm/amdgpu: split ras_eeprom_init into init and check functions Init function is for ras table header read and check function is responsible for the validation of the header. Call them in different stages. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 15 +++++++++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 20 ++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h | 2 ++ 3 files changed, 33 insertions(+), 4 deletions(-) commit ea5d49349894a7a74ce8dba242e3a487d24b6c0e Author: Mario Limonciello <mario.limonciello@amd.com> Date: Tue Dec 3 11:28:54 2024 -0600 drm/amd: Add the capability to mark certain firmware as "required" Some of the firmware that is loaded by amdgpu is not actually required. For example the ISP firmware on some SoCs is optional, and if it's not present the ISP IP block just won't be initialized. The firmware loader core however will show a warning when this happens like this: ``` Direct firmware load for amdgpu/isp_4_1_0.bin failed with error -2 ``` To avoid confusion for non-required firmware, adjust the amd-ucode helper to take an extra argument indicating if the firmware is required or optional. On optional firmware use firmware_request_nowarn() instead of request_firmware() to avoid the warnings. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Link: https://lore.kernel.org/amd-gfx/df71d375-7abd-4b32-97ce-15e57846eed8@amd.com/T/#t Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 18 ++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 8 ++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 9 +++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 ++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 3 ++- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 12 +++++++++++- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 7 +++++-- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/imu_v12_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2 ++ drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 ++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++-- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 3 ++- drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 3 ++- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 3 ++- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 3 ++- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 3 ++- 35 files changed, 136 insertions(+), 34 deletions(-) commit 5a7c8c579dd1d35dc385724fd34ffe94f90d872f Author: Le Ma <le.ma@amd.com> Date: Wed Aug 7 17:33:00 2024 +0800 drm/amdkfd: update the cwsr area size for gfx950 Update cwsr area size for gfx950 to fit the new user queue buffer validation. The size of LDS calculation is referred from gfx950 thunk implementation. Signed-off-by: Le Ma <le.ma@amd.com> Acked-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 5690011a7006f8a2ce1dbf32d733c3b1454af6da Author: Lancelot SIX <lancelot.six@amd.com> Date: Fri Jul 12 23:22:29 2024 +0100 drm/amdkfd: Handle save/restore of lds allocated in 1280B blocks The gfx-9 trap handler is reading LDS allocation size in 256 bytes granularity (from SQ_WAVE_LDS_ALLOC), but it using the assumption that this value is always even (i.e. the LDS allocation is really done in multiple of 512 bytes). This was true so far, but gfx-950 allocates LDS in chunks of 1280 bytes, making this assumption invalid. This can cause the trap handler to try to save / restore past the end of LDS, and past the LDS allocated slot in the save are, overriding data from the following wave. This patch updates the trap handler to support LDS allocated in 1280 bytes blocks: - During restore, copy from main memory directly to LDS in batch of 1280 bytes. - During save, continue to use 512 bytes blocks (we only have 2 VGPRs we can use to hold data), making sure to mask the upper half of the wave when handling when the LDS size is not a multiple of 512 bytes. Signed-off-by: Lancelot SIX <lancelot.six@amd.com> Co-authored-by: Alex Sierra <alex.sierra@amd.com> Reviewed-by: Jay Cornwall <jay.cornwall@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 60 ++++++++++------------ .../gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx9.asm | 25 +++++++-- 2 files changed, 49 insertions(+), 36 deletions(-) commit 549120edfda954b31ad2f0bc8e1829334d042c0c Author: Lancelot SIX <lancelot.six@amd.com> Date: Mon Jun 17 12:10:56 2024 +0100 drm/amdkfd: Adjust CWSR trap handler for gfx950 In gfx950, the SQ_WAVE_LDS_ALLOC.LDS_SIZE field is extended to bits 12 to 22. The LDS_SIZE granularity remains unchanged (units of 64 dwords, or 256 bytes). This patch adjusts the CWSR trap handler to read the full extent of LDS_SIZE. Signed-off-by: Lancelot SIX <lancelot.six@amd.com> Reviewed-by: Jay Cornwall <jay.cornwall@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 497 +++++++++++++++++++++ .../gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx9.asm | 9 + drivers/gpu/drm/amd/amdkfd/kfd_device.c | 6 +- 3 files changed, 509 insertions(+), 3 deletions(-) commit ccca9964303a64fbae015dfc2876dce0abde8afa Author: Lancelot SIX <lancelot.six@amd.com> Date: Fri Apr 12 08:41:53 2024 +0100 drm/amdkfd: update buffer_{store,load}_* modifiers for gfx940 Instruction modifiers of the untyped vector memory buffer instructions (MUBUF encoded) changed in gfx940. The slc, scc and glc modifiers have been replaced with sc0, sc1 and nt. The current CWSR trap handler is written using pre-gfx940 modifier names, making the source incompatible with a strict gfx940 assembler. This patch updates the cwsr_trap_handler_gfx9.s source file to be compatible with all gfx9 variants of the ISA. The binary assembled code is unchanged (so the behaviour is unchanged as well), only the source representation is updated. Signed-off-by: Lancelot SIX <lancelot.six@amd.com> Reviewed-by: Jay Cornwall <jay.cornwall@amd.com> Acked-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx9.asm | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 71985559a8f35c43e618453e202ebafab2e62d0a Author: Alex Sierra <alex.sierra@amd.com> Date: Wed Feb 21 15:02:15 2024 -0600 drm/amdkfd: add gc 9.5.0 support on kfd Initial support for GC 9.5.0. v2: squash in pqm_clean_queue_resource() fix from Lijo Signed-off-by: Alex Sierra <alex.sierra@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_debug.h | 1 + drivers/gpu/drm/amd/amdkfd/kfd_device.c | 43 +++++++++++++--------- .../drm/amd/amdkfd/kfd_device_queue_manager_v9.c | 3 +- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 13 +++++-- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 3 +- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 6 ++- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 5 ++- .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 13 ++++--- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 3 +- 10 files changed, 57 insertions(+), 34 deletions(-) commit 0ca6d9759668da8e1541531847d2a00de51a8b26 Author: Hawking Zhang <Hawking.Zhang@amd.com> Date: Fri Oct 18 21:59:27 2024 +0800 drm/amdgpu: Apply gc v9_5_0 golden settings Apply gc v9_5_0 golden settings. Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Asad Kamal <asad.kamal@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit dad0c70507a834ac12e9286401d90536a3c4cea2 Author: Alex Sierra <alex.sierra@amd.com> Date: Tue Jul 23 19:29:02 2024 -0500 drm/amd: update mtype flags for gfx 9.5.0 Update mtype flags to meet gfx 9.5.0 requirements for remote GPU memory and system memory. Signed-off-by: Alex Sierra <alex.sierra@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Reviewed-by: Harish Kasiviswanathan <harish.kasiviswanathan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 ++++---- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) commit 1f91cc4d947ec3c059838c108826a432a6c42d74 Author: Alex Sierra <alex.sierra@amd.com> Date: Thu Feb 29 14:55:58 2024 -0600 drm/amdgpu: Set proper MTYPE for GC 9.5.0 GC 9.5.0 local memory MTYPE default should be set as RW. Signed-off-by: Alex Sierra <alex.sierra@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 1 + 1 file changed, 1 insertion(+) commit 0b58a55af5d48ce1a4c045853e7d5cd49a4b4e6b Author: Le Ma <le.ma@amd.com> Date: Fri Nov 8 14:40:22 2024 -0500 drm/amdgpu: add initial support for gfx950 add gfx950 basic support Signed-off-by: Le Ma <le.ma@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 3 +++ drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c | 4 +++- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 30 +++++++++++++++++++-------- drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + 7 files changed, 36 insertions(+), 11 deletions(-) commit ebc7d1acf3afff28c8c6bfe316120317684f5f4f Author: Le Ma <le.ma@amd.com> Date: Fri Feb 23 16:02:37 2024 +0800 drm/amdgpu/gfx: add gfx950 microcode Add firmware declarations. Signed-off-by: Le Ma <le.ma@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 2 ++ 1 file changed, 2 insertions(+) commit 9bfe4caa4e57ba343d81e837911242f058688200 Author: Alex Sierra <alex.sierra@amd.com> Date: Tue Jul 23 19:19:42 2024 -0500 drm/amd: define gc ip version local variable For better readability. Also leftover orphaned code. Signed-off-by: Alex Sierra <alex.sierra@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Reviewed-by: Harish Kasiviswanathan <harish.kasiviswanathan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 +++----- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 5 +++-- 2 files changed, 6 insertions(+), 7 deletions(-) commit 3f1e050c99de63b92e867625c722f24efc1b8fb5 Author: Lijo Lazar <lijo.lazar@amd.com> Date: Wed Nov 27 11:38:41 2024 +0530 drm/amdgpu: Remove gfxoff usage GFXOFF is not valid for these IP versions. Also, SDMA v4.4.2 is not in GFX domain. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 4 ---- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 2 -- 2 files changed, 6 deletions(-) commit d2382f29ce5467c4e5704eac1f55ad9d3f9ca970 Author: Prike Liang <Prike.Liang@amd.com> Date: Mon Dec 2 14:13:02 2024 +0800 drm/amdgpu: Avoid to release the FW twice in the validated error There will to release the FW twice when the FW validated error. Even if the release_firmware() will further validate the FW whether is empty, but that will be redundant and inefficient. Signed-off-by: Prike Liang <Prike.Liang@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit a567db808ec9482d8b4ce5f9e5fcbc9e6c5a6da9 Author: Randy Dunlap <rdunlap@infradead.org> Date: Wed Nov 27 19:20:53 2024 -0800 drm/amdgpu: device: fix spellos and punctuation Make spelling and punctuation changes to ease reading of the comments. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Xinhui Pan <Xinhui.Pan@amd.com> Cc: amd-gfx@lists.freedesktop.org Cc: David Airlie <airlied@gmail.com> Cc: Simona Vetter <simona@ffwll.ch> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 357445e28ff004d7f10967aa93ddb4bffa5c3688 Author: Ivan Stepchenko <sid@itb.spb.ru> Date: Mon Dec 2 11:00:43 2024 +0300 drm/amdgpu: Fix potential NULL pointer dereference in atomctrl_get_smc_sclk_range_table The function atomctrl_get_smc_sclk_range_table() does not check the return value of smu_atom_get_data_table(). If smu_atom_get_data_table() fails to retrieve SMU_Info table, it returns NULL which is later dereferenced. Found by Linux Verification Center (linuxtesting.org) with SVACE. In practice this should never happen as this code only gets called on polaris chips and the vbios data table will always be present on those chips. Fixes: a23eefa2f461 ("drm/amd/powerplay: enable dpm for baffin.") Signed-off-by: Ivan Stepchenko <sid@itb.spb.ru> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c | 2 ++ 1 file changed, 2 insertions(+) commit de258d06fdab578b24c18756a6ed21a1b23db6d1 Author: Sathishkumar S <sathishkumar.sundararaju@amd.com> Date: Fri Nov 29 09:47:47 2024 +0530 drm/amdgpu: Add amdgpu_vcn_sched_mask debugfs Add debugfs entry to enable or disable job submission to specific vcn instances. The entry is created only when there is more than an instance and is unified queue type. Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com> Reviewed-by: Jesse Zhang <jesse.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 68 +++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 1 + 3 files changed, 70 insertions(+) commit 9db3aed8ea22415706db76c2857fe88c37357f8d Author: Jinzhou Su <jinzhou.su@amd.com> Date: Mon Dec 2 11:14:40 2024 +0800 drm/amdgpu: return error when eeprom checksum failed Return eeprom table checksum error result, otherwise it might be overwritten by next call. V2: replace DRM_ERROR with dev_err Signed-off-by: Jinzhou Su <jinzhou.su@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2965e6355dcdf157b5fafa25a2715f00064da8bf Author: Mario Limonciello <mario.limonciello@amd.com> Date: Wed Nov 27 21:26:56 2024 -0600 drm/amd: Add Suspend/Hibernate notification callback support As part of the suspend sequence VRAM needs to be evicted on dGPUs. In order to make suspend/resume more reliable we moved this into the pmops prepare() callback so that the suspend sequence would fail but the system could remain operational under high memory usage suspend. Another class of issues exist though where due to memory fragementation there isn't a large enough contiguous space and swap isn't accessible. Add support for a suspend/hibernate notification callback that could evict VRAM before tasks are frozen. This should allow paging out to swap if necessary. Link: https://github.com/ROCm/ROCK-Kernel-Driver/issues/174 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3476 Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2362 Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3781 Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Link: https://lore.kernel.org/r/20241128032656.2090059-2-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 46 +++++++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 - 3 files changed, 46 insertions(+), 2 deletions(-) commit aaf69c606f0865c8ad3571e1725372f21b5ad97a Author: Aric Cyr <aric.cyr@amd.com> Date: Sun Nov 24 20:29:39 2024 -0500 drm/amd/display: 3.2.312 DC 3.2.312 contains some improvements as summarized below: * Fix dcn401 S3 resume sequence * Fix dcn351 clk table * Bug fix on IP2, reply, DP tunneling Reviewed-by: Fangzhi Zuo <jerry.zuo@amd.com> Signed-off-by: Aric Cyr <aric.cyr@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 257b42dcdf40998650ebd67d00c0d4f43b1cc195 Author: Samson Tam <Samson.Tam@amd.com> Date: Wed Nov 20 01:05:58 2024 -0500 drm/amd/display: fix v tap calculation for non-adaptive scaling in SPL [Why & How] v and h tap calculations slightly different Use h tap calculation for both v and h tap Reviewed-by: Navid Assadian <navid.assadian@amd.com> Signed-off-by: Samson Tam <Samson.Tam@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 340e463e65625bcc7862a95ce7443dac33ab8de1 Author: Cruise <Cruise.Hung@amd.com> Date: Fri Nov 22 23:23:13 2024 +0800 drm/amd/display: Adjust DPCD read for DP tunneling Move DP tunneling field DPCD reading after all other RX caps are read. Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Signed-off-by: Cruise <Cruise.Hung@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../display/dc/link/protocols/link_dp_capability.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit baf6645387ccff1aff9b7bb52aa2e582e8ce7332 Author: Peterson <peterson.guo@amd.com> Date: Thu Nov 21 15:21:23 2024 -0500 drm/amd/display: Check that hw cursor is not required when falling back to subvp sw cursor [WHY] When using a sw cursor and flip immediate, the plane that is flipping immediately will do partial updates causing tearing. When on certain displays, subvp is expected based on timings but should be disabled in specific use cases that are not accounted for. [HOW] This was fixed by improving the timings check by using the hw cursor required flag to cover the unaccounted use cases. Reviewed-by: Austin Zheng <austin.zheng@amd.com> Signed-off-by: Peterson <peterson.guo@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8488646966fe59ae9fca79af47895ff40adeb7ee Author: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Date: Wed Nov 13 13:32:36 2024 -0500 drm/amd/display: Don't allow IPS2 in D0 for RCG Dynamic [Why] The existing changes to the DPMS off flag should help reduce accidental entry, but this change further restricts the entry condition. [How] Record last power state as sent to DMUB. Don't send IPS2 allow if it's D0. Reviewed-by: Ovidiu Bunea <ovidiu.bunea@amd.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 5 ++++- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit 70fec46519fca859aa209f5f02e7e0a0123aca4a Author: Ausef Yousof <Ausef.Yousof@amd.com> Date: Wed Nov 20 12:38:11 2024 -0500 drm/amd/display: Populate chroma prefetch parameters, DET buffer fix [WHY] Soft hang/lag observed during 10bit playback + moving cursor, corruption observed in other tickets for same reason, also failing MPO. 1. Currently, we are always running calculate_lowest_supported_state_for_temp_read which is only necessary on dGPU 2. Fast validate path does not apply DET buffer allocation policy 3. Prefetch UrgBFactor chroma parameter not populated in prefetch calculation [HOW] 1. Add a check to see if we are on APU, if so, skip the code 2. Add det buffer alloc policy checks to fast validate path 3. Populate UrgentBurstChroma param in call to calculate UrgBChroma prefetch values -revision commits: small formatting/brackets/null check addition + remove test change + dGPU code Reviewed-by: Charlene Liu <charlene.liu@amd.com> Signed-off-by: Ausef Yousof <Ausef.Yousof@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../drm/amd/display/dc/dml2/display_mode_core.c | 5 +++- drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c | 35 +++++++++++++++------- 2 files changed, 29 insertions(+), 11 deletions(-) commit cb49aefb196939bc1617454801098c328ebe3441 Author: Charlene Liu <Charlene.Liu@amd.com> Date: Mon Nov 18 16:48:48 2024 -0500 drm/amd/display: correct dcn351 dpm clk table based on pmfw_drv_if [why] driver got wrong clock table due to miss match dtm_table headers. correct the dtn_clock table based on pmfw header. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Reviewed-by: Sung joon Kim <sungjoon.kim@amd.com> Signed-off-by: Charlene Liu <Charlene.Liu@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> .../amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 93 +++++++++++++++++++++- .../drm/amd/display/dc/clk_mgr/dcn35/dcn35_smu.h | 41 +++++++--- 2 files changed, 119 insertions(+), 15 deletions(-) commit 0f5ac8c8e2757f7b3f6084e439098970848538aa Author: Dennis Chan <dennis.chan@amd.com> Date: Mon Sep 23 10:12:05 2024 +0800 drm/amd/display: Revised for Replay Pseudo vblank control [why] Revised Replay Full screen video Pseudo vblank control. Reviewed-by: ChunTao Tso <chuntao.tso@amd.com> Signed-off-by: Dennis Chan <dennis.chan@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc_types.h | 4 ++-- drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 4 ++-- drivers/gpu/drm/amd/display/modules/power/power_helpers.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit edd628ad17d85c4bb29f602224c25f1fa3a645e3 Author: Lijo Lazar <lijo.lazar@amd.com> Date: Fri Nov 29 08:20:45 2024 +0530 drm/amdgpu: Simplify cleanup check for FRU sysfs FRU info is expected to be non-NULL if FRU sys files are created. Simplify the check. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e1a34ed9176edddb3b472a977c8a02ee7d67fefb Author: Jinzhou Su <jinzhou.su@amd.com> Date: Thu Nov 28 10:58:45 2024 +0800 drm/amdgpu: Add secure display v2 command Add secure display v2 command to support multiple ROI instances per display. v2: fix typo and coding style issue Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Jinzhou Su <jinzhou.su@amd.com> Reviewed-by: Lang Yu <lang.yu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 ++- drivers/gpu/drm/amd/amdgpu/ta_secureDisplay_if.h | 24 ++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) commit c2ee5c2f0ea7808f74500ed2eb7a92a87ae8595c Author: Mario Limonciello <mario.limonciello@amd.com> Date: Wed Nov 27 21:26:55 2024 -0600 drm/amd: Invert APU check for amdgpu_device_evict_resources() Resource eviction isn't needed for s3 or s2idle on APUs, but should be run for S4. As amdgpu_device_evict_resources() will be called by prepare notifier adjust logic so that APUs only cover S4. Suggested-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Link: https://lore.kernel.org/r/20241128032656.2090059-1-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 86fa54f34991db7b900b779525e129ffaa4a2d34 Author: Sunil Khatri <sunil.khatri@amd.com> Date: Thu Nov 21 23:04:49 2024 +0530 drm/amdgpu: add "restore" missing variable comment add "restore" missing variable in the fucntions sdma_v4_4_2_page_resume and sdma_v4_4_2_inst_start. This fixes the warning: warning: Function parameter or struct member 'restore' not described in 'sdma_v4_4_2_page_resume' warning: Function parameter or struct member 'restore' not described in 'sdma_v4_4_2_inst_start' Signed-off-by: Sunil Khatri <sunil.khatri@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 2 ++ 1 file changed, 2 insertions(+) commit 093bbeb994af5ac3f3affdfd73983dcbd19d9a17 Author: Sunil Khatri <sunil.khatri@amd.com> Date: Thu Nov 21 23:02:11 2024 +0530 drm/amdgpu: Update the variable name to dma_buf Instead of fixing the warning for missing variable its better to update the variable name to match with the style followed in the code. This will fix the below mentioned warning: warning: Function parameter or struct member 'dbuf' not described in 'amdgpu_bo_create_isp_user' warning: Excess function parameter 'dma_buf' description in 'amdgpu_bo_create_isp_user' Signed-off-by: Sunil Khatri <sunil.khatri@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea8094abfb09163432208d3c9c9892d858441320 Author: Tao Zhou <tao.zhou1@amd.com> Date: Wed Nov 6 16:36:50 2024 +0800 drm/amdgpu: set UMC PA per NPS mode when PA is 0 The shift bit of PA varys according to NPS mode due to different address format. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit d08fb6637014c8e80cfcc1aabc38beac857a1f29 Author: Tao Zhou <tao.zhou1@amd.com> Date: Fri Nov 1 12:09:49 2024 +0800 drm/amdgpu: remove is_mca_add for ras_add_bad_pages Remove unnecessary variable and simplify the logic. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit a8d133e625ceb147a173b6cafc862a9bd4312894 Author: Tao Zhou <tao.zhou1@amd.com> Date: Thu Oct 31 15:48:10 2024 +0800 drm/amdgpu: parse legacy RAS bad page mixed with new data in various NPS modes All legacy RAS bad pages are generated in NPS1 mode, but new bad page can be generated in any NPS mode, so we can't use retired_page stored on eeprom directly in non-nps1 mode even for legacy data. We need to take different actions for different data, new data can be identified from old data by UMC_CHANNEL_IDX_V2 flag. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 96 +++++++++++++++++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 4 +- 3 files changed, 84 insertions(+), 18 deletions(-) commit 0859eb540f1412cced6234922626c8b1e6072126 Author: Shikang Fan <shikang.fan@amd.com> Date: Thu Nov 21 17:06:30 2024 +0800 drm/amdgpu: Check fence emitted count to identify bad jobs In SRIOV, when host driver performs MODE 1 reset and notifies FLR to guest driver, there is a small chance that there is no job running on hw but the driver has not updated the pending list yet, causing the driver not respond the FLR request. Modify the has_job_running function to make sure if there is still running job. v2: Use amdgpu_fence_count_emitted to determine job running status. v3: Remove the timeout wait in has_job_running Signed-off-by: Emily Deng <Emily.Deng@amd.com> Signed-off-by: Shikang Fan <shikang.fan@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 9aa879da796fde31533e72884276a440c8c1d886 Author: Xiaogang Chen <xiaogang.chen@amd.com> Date: Thu Nov 21 12:04:36 2024 -0600 drm/amdkfd: Differentiate logging message for driver oversubscription To have user better understand the causes triggering runlist oversubscription. No function change. Signed-off-by: Xiaogang Chen <xiaogang.chen@amd.com> Reviewed-by: Harish Kasiviswanathan <harish.kasiviswanathan@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 38 ++++++++++++++++--------- 1 file changed, 25 insertions(+), 13 deletions(-) commit 9b995d1af162f1736dd1d62ec3f6f9a5d6be5c84 Author: Aric Cyr <aric.cyr@amd.com> Date: Sun Nov 17 21:46:13 2024 -0500 drm/amd/display: 3.2.311 This version brings along following fixes: - Add hblank borrowing support - Limit VTotal range to max hw cap minus fp - Correct prefetch calculation - Add option to retrieve detile buffer size - Add support for custom recout_width in SPL - Add disable_ips_in_dpms_off flag for IPS - Enable EASF based on luma taps only - Add a left edge pixel if in YCbCr422 or YCbCr420 and odm Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Aric Cyr <aric.cyr@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0720473e2727b9f26c407c2fcd80a004c2528a3 Author: Samson Tam <Samson.Tam@amd.com> Date: Thu Nov 14 03:10:05 2024 -0500 drm/amd/display: Add support for custom recout_width in SPL [WHY] Add support for custom recout_width for mpc combine in SPL [HOW] 1. Rename mpc_combine_h and mpc_combine_v 2. Add flag use_recout_width_aligned to use custom recout_width 3. Create union to use either mpc_num_h_slices or mpc_recout_width_align Reviewed-by: Navid Assadian <navid.assadian@amd.com> Signed-off-by: Samson Tam <Samson.Tam@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc_spl_translate.c | 8 +++--- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 31 ++++++++++++++++++----- drivers/gpu/drm/amd/display/dc/spl/dc_spl_types.h | 10 ++++++-- 3 files changed, 37 insertions(+), 12 deletions(-) commit 7f81a80a6819959772d331314e7cf7891f08a875 Author: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Date: Tue Nov 12 17:16:46 2024 -0500 drm/amd/display: Add disable_ips_in_dpms_off flag for IPS [WHY] It's possible we still allow IPS2 when all streams are DPMS off but this is unexpected. [HOW] Pass the DM config value into DC so it can use the pure stream count to decide. We will be in 0 streams for S0i3 so this will still allow it for D3. Reviewed-by: Ovidiu Bunea <ovidiu.bunea@amd.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 18509133862cc7d6e2cf6d186b870c97d1b04411 Author: Samson Tam <Samson.Tam@amd.com> Date: Tue Nov 12 12:14:55 2024 -0500 drm/amd/display: Enable EASF based on luma taps only [WHY] EASF only applies to luma. Previously both luma and chroma taps were checked to determine whether to enable EASF. [HOW] Only check if luma taps are supported before determining whether to enable EASF or not. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Samson Tam <Samson.Tam@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 85b495bbbeda20b5e8aec90e6d2bec3103b8eadc Author: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Date: Wed Nov 6 07:37:24 2024 +0530 drm/amd/amdgpu/vcn: Fix kdoc entries for VCN clock/power gating functions This commit corrects the descriptors for the vcn_v4_0/v4_0_3/v4_0_5/v5_0_0 _set_clockgating_state and vcn_v4_0/v4_0_3/v4_0_5/v5_0_0 _set_powergating_state functions in the amdgpu driver. The parameter descriptors in the comments were mismatched with the actual function parameters. The non-existent 'handle' parameter has been replaced with the correct 'ip_block' parameter in the comments to accurately reflect the function signatures and to resolving the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c:1232: warning: Function parameter or struct member 'ip_block' not described in 'vcn_v5_0_0_set_clockgating_state' drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c:1232: warning: Excess function parameter 'handle' description in 'vcn_v5_0_0_set_clockgating_state' drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c:1263: warning: Function parameter or struct member 'ip_block' not described in 'vcn_v5_0_0_set_powergating_state' drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c:1263: warning: Excess function parameter 'handle' description in 'vcn_v5_0_0_set_powergating_state' drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c:2012: warning: Function parameter or struct member 'ip_block' not described in 'vcn_v4_0_set_clockgating_state' drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c:2012: warning: Excess function parameter 'handle' description in 'vcn_v4_0_set_clockgating_state' drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c:2043: warning: Function parameter or struct member 'ip_block' not described in 'vcn_v4_0_set_powergating_state' drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c:2043: warning: Excess function parameter 'handle' description in 'vcn_v4_0_set_powergating_state' drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c:1505: warning: Function parameter or struct member 'ip_block' not described in 'vcn_v4_0_5_set_clockgating_state' drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c:1505: warning: Excess function parameter 'handle' description in 'vcn_v4_0_5_set_clockgating_state' drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c:1536: warning: Function parameter or struct member 'ip_block' not described in 'vcn_v4_0_5_set_powergating_state' drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c:1536: warning: Excess function parameter 'handle' description in 'vcn_v4_0_5_set_powergating_state' drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c:1629: warning: Function parameter or struct member 'ip_block' not described in 'vcn_v4_0_3_set_powergating_state' drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c:1629: warning: Excess function parameter 'handle' description in 'vcn_v4_0_3_set_powergating_state' Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) commit 9346e2e0ad179b4a3f0e408d8b42f5c3a1d2b8ed Author: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Date: Wed Nov 6 07:45:36 2024 +0530 drm/amd/amdgpu: Add missing kdoc 'inst' parameter in 'smu_dpm_set_power_gate' function This commit adds the missing kdoc parameter descriptor for 'inst' in the smu_dpm_set_power_gate function. The 'inst' parameter, which specifies the instance of the IP block to power gate/ungate. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/../pm/swsmu/amdgpu_smu.c:359: warning: Function parameter or struct member 'inst' not described in 'smu_dpm_set_power_gate' Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cf1aa9ffd42f1c26706f6c705c9dde63a0f44da8 Author: Boyuan Zhang <boyuan.zhang@amd.com> Date: Mon Oct 7 13:35:33 2024 -0400 drm/amdgpu: move per inst variables to amdgpu_vcn_inst Move all per instance variables from amdgpu_vcn to amdgpu_vcn_inst. Move adev->vcn.fw[i] from amdgpu_vcn to amdgpu_vcn_inst. Move adev->vcn.vcn_config[i] from amdgpu_vcn to amdgpu_vcn_inst. Move adev->vcn.vcn_codec_disable_mask[i] from amdgpu_vcn to amdgpu_vcn_inst. Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 20 ++++++++++---------- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 6 +++--- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 4 ++-- 11 files changed, 36 insertions(+), 36 deletions(-) commit f2ba8c3d510695c68ede786b3a37a9aa170ddfae Author: Boyuan Zhang <boyuan.zhang@amd.com> Date: Mon Oct 7 19:43:31 2024 -0400 drm/amdgpu: pass ip_block in set_clockgating_state Pass ip_block instead of adev in set_clockgating_state() callback functions. Modify set_clockgating_state()for all correspoding ip blocks. v2: remove all changes for is_idle(), remove type casting Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Sunil Khatri <sunil.khatri@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 2 +- drivers/gpu/drm/amd/amdgpu/cik.c | 2 +- drivers/gpu/drm/amd/amdgpu/cik_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/cz_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/ih_v7_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/nv.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/si.c | 2 +- drivers/gpu/drm/amd/amdgpu/si_dma.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/si_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/soc21.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/soc24.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 13 ++++--------- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 13 ++++--------- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 7 ++++--- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vi.c | 4 ++-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/include/amd_shared.h | 2 +- drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 2 +- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 2 +- drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 2 +- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +- 82 files changed, 157 insertions(+), 163 deletions(-) commit 80d80511241cd3f532704dc4abbb604425552396 Author: Boyuan Zhang <boyuan.zhang@amd.com> Date: Sun Sep 29 15:17:51 2024 -0400 drm/amdgpu: pass ip_block in set_powergating_state Pass ip_block instead of adev in set_powergating_state callback function. Modify set_powergating_state ip functions for all correspoding ip blocks. v2: fix a ip block index error. v3: remove type casting Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Suggested-by: Christian König <christian.koenig@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Sunil Khatri <sunil.khatri@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/cik.c | 2 +- drivers/gpu/drm/amd/amdgpu/cik_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2 +- drivers/gpu/drm/amd/amdgpu/cz_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/ih_v7_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/nv.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/si.c | 2 +- drivers/gpu/drm/amd/amdgpu/si_dma.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/si_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- drivers/gpu/drm/amd/amdgpu/soc21.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/soc24.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 9 +++++---- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 12 ++++++------ drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 13 +++++++------ drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 9 +++++---- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 9 +++++---- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/vi.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/include/amd_shared.h | 2 +- drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 2 +- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 2 +- drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 2 +- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +- 82 files changed, 162 insertions(+), 156 deletions(-) commit 393f026b168a674d403ddb8ea9e5175e644d2892 Author: Boyuan Zhang <boyuan.zhang@amd.com> Date: Thu Oct 3 14:47:29 2024 -0400 drm/amdgpu: add inst to amdgpu_dpm_enable_vcn Add an instance parameter to amdgpu_dpm_enable_vcn() function, and change all calls from vcn ip functions to add instance argument. vcn generations with only one instance (v1.0, v2.0) always use 0 as instance number. vcn generations with multiple instances (v2.5, v3.0, v4.0, v4.0.3, v4.0.5, v5.0.0) use the actual instance number. v2: remove for-loop in amdgpu_dpm_enable_vcn(), and temporarily move it to vcn ip with multiple instances, in order to keep the exact same logic as before, until further separation in next patch. v3: fix missing prefix Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 12 ++++++++---- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 12 ++++++++---- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 12 ++++++++---- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 12 ++++++++---- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 12 ++++++++---- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 12 ++++++++---- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 14 ++++++-------- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 +- 10 files changed, 60 insertions(+), 38 deletions(-) commit ff69bba05f085cd6d4277c27ac7600160167b384 Author: Boyuan Zhang <boyuan.zhang@amd.com> Date: Wed Oct 2 23:52:01 2024 -0400 drm/amd/pm: add inst to dpm_set_powergating_by_smu Add an instance parameter to amdgpu_dpm_set_powergating_by_smu() function, and use the instance to call set_powergating_by_smu(). v2: remove duplicated functions. remove for-loop in amdgpu_dpm_set_powergating_by_smu(), and temporarily move it to amdgpu_dpm_enable_vcn(), in order to keep the exact same logic as before, until further separation in next patch. v3: drop SI logic in amdgpu_dpm_enable_vcn(). Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 14 +++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 6 ++--- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 4 ++-- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 37 +++++++++++++++++++++--------- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 3 ++- 16 files changed, 59 insertions(+), 43 deletions(-) commit 697cb5cc2549c5aa8da541ec5d815500edc35f88 Author: Boyuan Zhang <boyuan.zhang@amd.com> Date: Wed Oct 2 23:25:45 2024 -0400 drm/amd/pm: add inst to set_powergating_by_smu Add an instance parameter to set_powergating_by_smu() function, and re-write all amd_pm functions accordingly. Then use the instance to call smu_dpm_set_vcn_enable(). v2: remove duplicated functions. remove for-loop in smu_dpm_set_power_gate(), and temporarily move it to to amdgpu_dpm_set_powergating_by_smu(), in order to keep the exact same logic as before, until further separation in next patch. v3: add instance number in error message. Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/include/kgd_pp_interface.h | 4 +++- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 10 ++++++++-- drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 4 +++- drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 4 +++- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 16 +++++++--------- 5 files changed, 24 insertions(+), 14 deletions(-) commit 15df736afe009856a40baf93df3fd10f4a32a88b Author: Boyuan Zhang <boyuan.zhang@amd.com> Date: Wed Oct 2 21:59:33 2024 -0400 drm/amd/pm: add inst to smu_dpm_set_vcn_enable First, add an instance parameter to smu_dpm_set_vcn_enable() function, and calling dpm_set_vcn_enable() with this given instance. Second, modify vcn_gated to be an array, to track the gating status for each vcn instance separately. With these 2 changes, smu_dpm_set_vcn_enable() will check and set the gating status for the given vcn instance ONLY. v2: remove duplicated functions. remove for-loop in dpm_set_vcn_enable(), and temporarily move it to to smu_dpm_set_power_gate(), in order to keep the exact same logic as before, until further separation in next patch. v3: add instance number in error message. v4: declaring i at the top of the function. Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 75 ++++++++++++++++----------- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 2 +- 2 files changed, 47 insertions(+), 30 deletions(-) commit 8aaf166703751ffd9a9fbc4d8b996f538b278983 Author: Boyuan Zhang <boyuan.zhang@amd.com> Date: Sun Sep 29 15:17:29 2024 -0400 drm/amd/pm: power up or down vcn by instance For smu ip with multiple vcn instances (smu 11/13/14), remove all the for loop in dpm_set_vcn_enable() functions. And use the instance argument to power up/down vcn for the given instance only, instead of powering up/down for all vcn instances. v2: remove all duplicated functions in v1. remove for-loop from each ip, and temporarily move to dpm_set_vcn_enable, in order to keep the exact same logic as before, until further separation in the next patch. Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 9 ++++-- .../drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 20 +++++-------- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 16 ++++------ drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 35 ++++++++++------------ 4 files changed, 35 insertions(+), 45 deletions(-) commit a3300782d5375e280ba7040f323d01960bfe3396 Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Tue Nov 19 21:23:18 2024 +0100 drm/amd/pm: Fix an error handling path in vega10_enable_se_edc_force_stall_config() In case of error after a amdgpu_gfx_rlc_enter_safe_mode() call, it is not balanced by a corresponding amdgpu_gfx_rlc_exit_safe_mode() call. Add the missing call. Fixes: 9b7b8154cdb8 ("drm/amd/powerplay: added didt support for vega10") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_powertune.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fcb600b07894913a9e73d8c1a1ce86a36324e4a7 Author: Tao Zhou <tao.zhou1@amd.com> Date: Wed Oct 30 16:42:42 2024 +0800 drm/amdgpu: add interface to get die id from memory address And implement it for UMC v12_0. The die id is calculated from IPID register in bad page retirement flow, but we don't store it on eeprom and it can be also gotten from physical address. v2: get PA_C4 and PA_R13 from MCA address since they may be cleared in retired page. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 2 ++ drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit 2206daa1f9182a08aea92213dc2bcb387173dab1 Author: Tao Zhou <tao.zhou1@amd.com> Date: Wed Oct 30 14:17:49 2024 +0800 drm/amdgpu: add a flag to indicate UMC channel index version v1 (legacy way): store channel index within a UMC instance in eeprom v2: store global channel index in eeprom V2: only save the flag on eeprom, clear it after saving. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 11 ++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 16 ++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) commit 71a0e9630027f77d7646c5b750593c9ecfaa27d3 Author: Tao Zhou <tao.zhou1@amd.com> Date: Tue Oct 29 19:46:44 2024 +0800 drm/amdgpu: save UMC global channel index to eeprom Save the global channel index returned by RAS TA to eeprom. We can get memory physical address by MCA address and channel index. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 7 ++----- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 2 +- drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 13 ++++++++----- 4 files changed, 13 insertions(+), 11 deletions(-) commit 07dd49e1fc42fcb67a1786c2b2f71e0dd0079935 Author: Tao Zhou <tao.zhou1@amd.com> Date: Thu Oct 24 15:34:27 2024 +0800 drm/amdgpu: support to find RAS bad pages via old TA Old version of RAS TA doesn't support to convert MCA address stored on eeprom to physical address (PA), support to find all bad pages in one memory row by PA with old RAS TA. This approach is only suitable for nps1 mode. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit b02ef407729d9eb26fbc74ca229e28dbe971e1c1 Author: Tao Zhou <tao.zhou1@amd.com> Date: Thu Oct 24 14:46:19 2024 +0800 drm/amdgpu: add function to find all memory pages in one physical row And the function can be reused across amdgpu driver. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 38 ++++++++++++++++++++------------- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 2 ++ 2 files changed, 25 insertions(+), 15 deletions(-) commit 19d4b27aedc73d2f5785bdef7c30fe49c16606e7 Author: Tao Zhou <tao.zhou1@amd.com> Date: Thu Oct 24 18:51:13 2024 +0800 drm/amdgpu: retire RAS bad pages in different NPS modes There are some changes in format of memory normalized address per NPS mode, need to adjust bit mapping according to NPS mode. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 64 ++++++++++++++++++++++------------ drivers/gpu/drm/amd/amdgpu/umc_v12_0.h | 11 ++++++ 2 files changed, 52 insertions(+), 23 deletions(-) commit c3d4acf0c3bbba4eb24812f12412d642fa3d5378 Author: Tao Zhou <tao.zhou1@amd.com> Date: Fri Oct 18 18:58:54 2024 +0800 drm/amdgpu: store only one RAS bad page record for all pages in one row So eeprom space can be saved, compatible with legacy way. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 35 +++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) commit e1ee2111ca48169a9fdc5075f7863f5d4d591e2f Author: Lijo Lazar <lijo.lazar@amd.com> Date: Thu Oct 24 11:01:57 2024 +0530 drm/amdgpu: Prefer RAS recovery for scheduler hang Before scheduling a recovery due to scheduler/job hang, check if a RAS error is detected. If so, choose RAS recovery to handle the situation. A scheduler/job hang could be the side effect of a RAS error. In such cases, it is required to go through the RAS error recovery process. A RAS error recovery process in certains cases also could avoid a full device device reset. An error state is maintained in RAS context to detect the block affected. Fatal Error state uses unused block id. Set the block id when error is detected. If the interrupt handler detected a poison error, it's not required to look for a fatal error. Skip fatal error checking in such cases. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/aldebaran.c | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 15 ++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 55 ++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 11 +++-- drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 2 + 5 files changed, 78 insertions(+), 7 deletions(-) commit 0eecff79e49f8ce5475e1b4d968f26263587be66 Author: Tao Zhou <tao.zhou1@amd.com> Date: Fri Oct 18 14:49:00 2024 +0800 drm/amdgpu: do RAS MCA2PA conversion in device init phase NPS mode is introduced, the value of memory physical address (PA) related to a MCA address varies per nps mode. We need to rely on MCA address and convert it into PA accroding to nps mode. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 94 ++++++++++++++++++++++++++++----- 1 file changed, 82 insertions(+), 12 deletions(-) commit 772df3df809a536c3e1b14db5a1dd74ae7baa102 Author: Tao Zhou <tao.zhou1@amd.com> Date: Fri Oct 18 17:52:59 2024 +0800 drm/amdgpu: add flag to indicate the type of RAS eeprom record One UMC MCA address could map to multiply physical address (PA): AMDGPU_RAS_EEPROM_REC_PA: one record store one PA AMDGPU_RAS_EEPROM_REC_MCA: one record store one MCA address, PA is not cared about Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 33 ++++++++++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h | 14 +++++++++++ 2 files changed, 40 insertions(+), 7 deletions(-) commit 95024c714b83d267036564be998328762c47fbda Author: Tao Zhou <tao.zhou1@amd.com> Date: Fri Oct 18 14:43:04 2024 +0800 drm/amdgpu: add TA_RAS_INV_NODE value We can set UMC node instance to invalid state if we use global channel index, and RAS TA can choose UMC address conversion approach by checking node_inst value. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/ta_ras_if.h | 3 +++ 1 file changed, 3 insertions(+) commit f44a30583bcf2b9c3846264515d618d349e67485 Author: Tao Zhou <tao.zhou1@amd.com> Date: Fri Oct 18 16:43:44 2024 +0800 drm/amdgpu: add return value for convert_ras_err_addr So upper layer can return failure directly if address conversion fails. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 19 +++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 2 +- drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 12 ++++++++---- 3 files changed, 22 insertions(+), 11 deletions(-) commit 76723fbc5f8632570c6079a2f497c2f2132bce98 Author: Tao Zhou <tao.zhou1@amd.com> Date: Fri Oct 18 16:21:26 2024 +0800 drm/amdgpu: reduce memory usage for umc_lookup_bad_pages_in_a_row The function handles one page in one time, allocating umc.retire_unit bad page records is enough. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4e7812e2372bc02809ca6eed285096baffee0ebf Author: Tao Zhou <tao.zhou1@amd.com> Date: Thu Oct 17 15:51:54 2024 +0800 drm/amdgpu: make convert_ras_err_addr visible outside UMC block And change some UMC v12 specific functions to generic version, so the code can be shared. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 63 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 11 ++++++ drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 62 +++----------------------------- 3 files changed, 78 insertions(+), 58 deletions(-) commit 3d60a30c85bca8832ab21c4d8095b064d4e33dfe Author: Tao Zhou <tao.zhou1@amd.com> Date: Thu Oct 17 11:56:12 2024 +0800 drm/amdgpu: store PA with column bits cleared for RAS bad page So the code can be simplified, and no need to expose the detail of PA format outside address conversion. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/umc_v12_0.h | 5 ----- 2 files changed, 3 insertions(+), 6 deletions(-) commit 66f4f7d5aa316f88b0fcb5c2e2b80014da28f640 Author: Prike Liang <Prike.Liang@amd.com> Date: Fri Nov 15 16:04:48 2024 +0800 drm/amdgpu: reduce the mmio writes in kiq setting There's no need to perform the two MMIO writes in the KIQ Setting registers programmed period, and reducing the MMIO writes will save the driver loading time. Signed-off-by: Prike Liang <Prike.Liang@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8 ++------ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 +--- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 4 +--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 +--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 +--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 4 +--- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 4 +--- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 4 +--- 8 files changed, 9 insertions(+), 27 deletions(-) commit 52b10d55c15b53113cf50fe29e79f98b12e40e7a Author: Jiadong Zhu <Jiadong.Zhu@amd.com> Date: Sun Sep 29 11:00:16 2024 +0800 drm/amdgpu/sdma4.4.2: implement ring reset callback for sdma4.4.2 Implement sdma queue reset callback via SMU interface. v2: Leverage inst_stop/start functions in reset sequence. Use GET_INST for physical SDMA instance. Disable apu for sdma reset. v3: Rephrase error prints. v4: Remove redundant prints. Remove setting PREEMPT registers as soft reset handles it. Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 90 +++++++++++++++++++++++++------- 1 file changed, 72 insertions(+), 18 deletions(-) commit 610696505c3a2875f2863a5adc899ec2b0203180 Author: Jiadong Zhu <Jiadong.Zhu@amd.com> Date: Fri Sep 27 17:55:26 2024 +0800 drm/amd/pm: implement dpm sdma reset function Implement sdma soft reset by sending MSG_ResetSDMA on smu 13.0.6. v2: Add firmware version for the reset message. v3: Add ip version check. Print inst_mask on failure. Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 15 ++++++++++++++ drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 1 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 10 ++++++++++ drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 6 ++++++ drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 ++- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 23 ++++++++++++++++++++++ 6 files changed, 57 insertions(+), 1 deletion(-) commit 70158b4512f6334887bc5dea34e2058243e14164 Author: Jiadong Zhu <Jiadong.Zhu@amd.com> Date: Fri Sep 27 17:49:17 2024 +0800 drm/amd/pm: update smu_v13_0_6 smu header update smu header for sdma soft reset. Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_ppsmc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5c8baccc1e8907e7ae97ea4b085ec10b991d8f76 Author: Tao Zhou <tao.zhou1@amd.com> Date: Wed Oct 16 15:06:30 2024 +0800 drm/amdgpu: remove redundant RAS error address coversion code Only one interface is responsible for the conversion. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 134 ++++++++++++++------------------- 1 file changed, 58 insertions(+), 76 deletions(-) commit ebbe34edc0a90be85b620b85eb97f8ff3356e38c Author: Pratap Nirujogi <pratap.nirujogi@amd.com> Date: Tue Nov 19 18:03:15 2024 -0500 drm/amd/amdgpu: Add support for isp buffers Add support to create user BOs with MC address for isp using the dma-buf handle exported for the buffers allocated from system memory in isp driver. Export amdgpu_bo_create_kernel() and amdgpu_bo_free_kernel() as well for isp to allocate GTT internal buffers required for fw to run. Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 101 +++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 5 ++ 2 files changed, 106 insertions(+) commit 150f6c903069e3c20fc0227510d532b80ea3e56a Author: Tao Zhou <tao.zhou1@amd.com> Date: Tue Oct 15 18:32:08 2024 +0800 drm/amdgpu: simplify RAS page retirement in one memory row Take R13 and column bits as a whole for UMC v12. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 57 ++++++++++++++-------------------- drivers/gpu/drm/amd/amdgpu/umc_v12_0.h | 1 + 2 files changed, 24 insertions(+), 34 deletions(-) commit bd96a3935e89486304461a21752f824fc25e0f0b Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Sat Nov 30 13:01:37 2024 +0300 rdma/cxgb4: Prevent potential integer overflow on 32bit The "gl->tot_len" variable is controlled by the user. It comes from process_responses(). On 32bit systems, the "gl->tot_len + sizeof(struct cpl_pass_accept_req) + sizeof(struct rss_header)" addition could have an integer wrapping bug. Use size_add() to prevent this. Fixes: 1cab775c3e75 ("RDMA/cxgb4: Fix LE hash collision bug for passive open connection") Link: https://patch.msgid.link/r/86b404e1-4a75-4a35-a34e-e3054fa554c7@stanley.mountain Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> drivers/infiniband/hw/cxgb4/device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 141cb5c482b38d7e494a207f881d0fe61e4848ef Author: Tony Luck <tony.luck@intel.com> Date: Fri Dec 6 08:31:45 2024 -0800 x86/resctrl: Make mba_sc use total bandwidth if local is not supported The default input measurement to the mba_sc feedback loop for memory bandwidth control when the user mounts with the "mba_MBps" option is the local bandwidth event. But some systems may not support a local bandwidth event. When local bandwidth event is not supported, check for support of total bandwidth and use that instead. Relax the mount option check to allow use of the "mba_MBps" option for systems when only total bandwidth monitoring is supported. Also update the error message. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Tested-by: Babu Moger <babu.moger@amd.com> Link: https://lore.kernel.org/r/20241206163148.83828-6-tony.luck@intel.com arch/x86/kernel/cpu/resctrl/core.c | 2 ++ arch/x86/kernel/cpu/resctrl/rdtgroup.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit 2c272fadb58b590eb973c6c447b039f10631f5f7 Author: Tony Luck <tony.luck@intel.com> Date: Fri Dec 6 08:31:44 2024 -0800 x86/resctrl: Compute memory bandwidth for all supported events Switching between local and total memory bandwidth events as the input to the mba_sc feedback loop would be cumbersome and take effect slowly in the current implementation as the bandwidth is only known after two consecutive readings of the same event. Compute the bandwidth for all supported events. This doesn't add significant overhead and will make changing which event is used simple. Suggested-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Tested-by: Babu Moger <babu.moger@amd.com> Link: https://lore.kernel.org/r/20241206163148.83828-5-tony.luck@intel.com arch/x86/kernel/cpu/resctrl/monitor.c | 72 ++++++++++++++++------------------- 1 file changed, 33 insertions(+), 39 deletions(-) commit ea049a037e9e01e4dd92e44c21f8d594e64e4396 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Thu Nov 28 16:16:45 2024 +0100 dt-bindings: mmc: convert amlogic,meson-mx-sdio.txt to dtschema Convert the Amlogic Meson6, Meson8 and Meson8b SDIO/MMC controller bindings to dt-schema. Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Message-ID: <20241128-topic-amlogic-arm32-upstream-bindings-fixes-convert-meson-mx-sdio-v4-5-11d9f9200a59@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> .../bindings/mmc/amlogic,meson-mx-sdio.txt | 54 ------------- .../bindings/mmc/amlogic,meson-mx-sdio.yaml | 94 ++++++++++++++++++++++ 2 files changed, 94 insertions(+), 54 deletions(-) commit b833f3deb1abdccc171e6a7ad6aa2f3f66e4f7f7 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Thu Nov 28 16:16:44 2024 +0100 dt-bindings: mmc: document mmc-slot Document the mmc-slot, which is a subnode of a multi-slot MMC controller, each slot is represented as a full MMC controller, the top node handling all the shared resources and slot mux. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Message-ID: <20241128-topic-amlogic-arm32-upstream-bindings-fixes-convert-meson-mx-sdio-v4-4-11d9f9200a59@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> .../devicetree/bindings/mmc/mmc-slot.yaml | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit b55a9f72878bfe8b4b5fb8c80ca0ca9f3464e642 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Thu Nov 28 16:16:43 2024 +0100 dt-bindings: mmc: controller: remove '|' when not needed Adding "|" is used to keep the description format, remove it when not needed after the split into mmc-controller.yaml and mmc-controller-common.yaml files. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Message-ID: <20241128-topic-amlogic-arm32-upstream-bindings-fixes-convert-meson-mx-sdio-v4-3-11d9f9200a59@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml | 6 +++--- Documentation/devicetree/bindings/mmc/mmc-controller.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 3aee3eec6d2a1a5a2e80ed26906bbc0e431a3007 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Thu Nov 28 16:16:42 2024 +0100 dt-bindings: mmc: controller: move properties common with slot out to mmc-controller-common Move the common MMC "slot" properties because they are shared by the single-slot or multi-slot controllers, and will help defining a simple mmc-slot bindings document with proper slot properties and nodename. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Message-ID: <20241128-topic-amlogic-arm32-upstream-bindings-fixes-convert-meson-mx-sdio-v4-2-11d9f9200a59@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> .../bindings/mmc/mmc-controller-common.yaml | 357 +++++++++++++++++++++ .../devicetree/bindings/mmc/mmc-controller.yaml | 344 +------------------- 2 files changed, 360 insertions(+), 341 deletions(-) commit b2b8e93ec00b8110cb37cbde5400d5abfdaed6a7 Author: Neil Armstrong <neil.armstrong@linaro.org> Date: Thu Nov 28 16:16:41 2024 +0100 dt-bindings: mmc: controller: clarify the address-cells description The term "slot ID" has nothing to do with the SDIO function number which is specified in the reg property of the subnodes, rephrase the description to be more accurate. Fixes: f9b7989859dd ("dt-bindings: mmc: Add YAML schemas for the generic MMC options") Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Message-ID: <20241128-topic-amlogic-arm32-upstream-bindings-fixes-convert-meson-mx-sdio-v4-1-11d9f9200a59@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Documentation/devicetree/bindings/mmc/mmc-controller.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ad0075005088d931a39321dcbb5cb4df8801a37 Author: Heiko Carstens <hca@linux.ibm.com> Date: Mon Dec 2 12:56:39 2024 +0100 s390/setup: Cleanup stack_alloc() and stack_free() Some small cleanups to stack_alloc() and stack_free(): - Rename ret to stack to reflect what the variable is used for - Whitespace removal Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/kernel/setup.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 27939d6cde904bcea19d0cdb64a79eedf5abc7ce Author: Heiko Carstens <hca@linux.ibm.com> Date: Mon Dec 2 12:56:38 2024 +0100 s390/Kconfig: Select VMAP_STACK unconditionally There is no point in supporting !VMAP_STACK kernel builds. VMAP_STACK has proven to work since many years. Also, since KASAN_VMALLOC is supported, kernels built with !VMAP_STACK are completely untested. Therefore select VMAP_STACK unconditionally and remove all config options and code required for !VMAP_STACK builds. Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com> Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/Kconfig | 27 +-------------------------- arch/s390/Makefile | 9 --------- arch/s390/kernel/entry.S | 20 ++------------------ arch/s390/kernel/setup.c | 8 -------- arch/s390/kernel/vdso64/Makefile | 2 +- 5 files changed, 4 insertions(+), 62 deletions(-) commit e7256acac3b3c858d22683fa937a772bf209f4af Author: Heiko Carstens <hca@linux.ibm.com> Date: Mon Dec 2 12:56:37 2024 +0100 s390/Kconfig: Select KASAN_VMALLOC if KASAN is enabled Reduce the number of to be considered config options and select KASAN_VMALLOC if KASAN is enabled. Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com> Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> arch/s390/Kconfig | 1 + arch/s390/boot/vmem.c | 12 +++--------- arch/s390/configs/kasan.config | 1 - 3 files changed, 4 insertions(+), 10 deletions(-) commit 3b6f9c6505a34450a4dd5d9bbbe5cfec4718adb2 Author: Armin Wolf <W_Armin@gmx.de> Date: Tue Dec 10 01:16:56 2024 +0100 platform/x86: acer-wmi: Implement proper hwmon support After looking at the ACPI AML code, it seems that the command 0x0000 used with ACER_WMID_GET_GAMING_SYS_INFO_METHODID returns a bitmap of all supported sensor indices available through the 0x0001 command. Those sensor indices seem to include both temperature and fan speed sensors, with only the fan speed sensors being currently supported. Use the output of this new command to implement reliable sensor detection. This fixes detection of fans which do not spin during probe, as fans are currently being ignored if their speed is 0. Also add support for the new temperature sensor ids. Tested-by: Rayan Margham <rayanmargham4@gmail.com> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20241210001657.3362-5-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/acer-wmi.c | 113 ++++++++++++++++++++++++++++------------ 1 file changed, 79 insertions(+), 34 deletions(-) commit a11d8b37942d3c12a8a5f8ae30cbdeb069e5d819 Author: Armin Wolf <W_Armin@gmx.de> Date: Tue Dec 10 01:16:55 2024 +0100 platform/x86: acer-wmi: Improve error handling when reading gaming system information If a call to ACER_WMID_GET_GAMING_SYS_INFO_METHODID fails, the lower 8 bits will be non-zero. Introduce a helper function to check this and use it when reading gaming system information. Tested-by: Rayan Margham <rayanmargham4@gmail.com> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Kurt Borja <kuurtb@gmail.com> Link: https://lore.kernel.org/r/20241210001657.3362-4-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/acer-wmi.c | 55 +++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 19 deletions(-) commit 287b3240fc8a06a14923019a6b3e697c6e693c93 Author: Armin Wolf <W_Armin@gmx.de> Date: Tue Dec 10 01:16:54 2024 +0100 platform/x86: acer-wmi: Rename ACER_CAP_FAN_SPEED_READ Rename ACER_CAP_FAN_SPEED_READ to ACER_CAP_HWMON to prepare for upcoming changes in the hwmon handling code. Tested-by: Rayan Margham <rayanmargham4@gmail.com> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Kurt Borja <kuurtb@gmail.com> Link: https://lore.kernel.org/r/20241210001657.3362-3-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/acer-wmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9741f9aa13f6dc3ff24e1d006b2ced5f460e6b6f Author: Armin Wolf <W_Armin@gmx.de> Date: Tue Dec 10 01:16:53 2024 +0100 platform/x86: acer-wmi: Add support for Acer PH14-51 Add the Acer Predator PT14-51 to acer_quirks to provide support for the turbo button and predator_v4 hwmon interface. Reported-by: Rayan Margham <rayanmargham4@gmail.com> Closes: https://lore.kernel.org/platform-driver-x86/CACzB==6tUsCnr5musVMz-EymjTUCJfNtKzhMFYqMRU_h=kydXA@mail.gmail.com Tested-by: Rayan Margham <rayanmargham4@gmail.com> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Kurt Borja <kuurtb@gmail.com> Link: https://lore.kernel.org/r/20241210001657.3362-2-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/acer-wmi.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7675361ff9a1d9038025c05267600d0c762c0236 Author: John Stultz <jstultz@google.com> Date: Thu Dec 5 15:59:35 2024 -0800 sched: deadline: Cleanup goto label in pick_earliest_pushable_dl_task Commit 8b5e770ed7c0 ("sched/deadline: Optimize pull_dl_task()") added a goto label seems would be better written as a while loop. So replace the goto with a while loop, to make it easier to read. Reported-by: Todd Kjos <tkjos@google.com> Signed-off-by: John Stultz <jstultz@google.com> Reviewed-and-tested-by: K Prateek Nayak <kprateek.nayak@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Juri Lelli <juri.lelli@redhat.com> Link: https://lore.kernel.org/r/20241206000009.1226085-1-jstultz@google.com kernel/sched/deadline.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 7d5265ffcd8b41da5e09066360540d6e0716e9cd Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Date: Tue Nov 12 10:28:26 2024 -0500 rseq: Validate read-only fields under DEBUG_RSEQ config The rseq uapi requires cooperation between users of the rseq fields to ensure that all libraries and applications using rseq within a process do not interfere with each other. This is especially important for fields which are meant to be read-only from user-space, as documented in uapi/linux/rseq.h: - cpu_id_start, - cpu_id, - node_id, - mm_cid. Storing to those fields from a user-space library prevents any sharing of the rseq ABI with other libraries and applications, as other users are not aware that the content of those fields has been altered by a third-party library. This is unfortunately the current behavior of tcmalloc: it purposefully overlaps part of a cached value with the cpu_id_start upper bits to get notified about preemption, because the kernel clears those upper bits before returning to user-space. This behavior does not conform to the rseq uapi header ABI. This prevents tcmalloc from using rseq when rseq is registered by the GNU C library 2.35+. It requires tcmalloc users to disable glibc rseq registration with a glibc tunable, which is a sad state of affairs. Considering that tcmalloc and the GNU C library are the two first upstream projects using rseq, and that they are already incompatible due to use of this hack, adding kernel-level validation of all read-only fields content is necessary to ensure future users of rseq abide by the rseq ABI requirements. Validate that user-space does not corrupt the read-only fields and conform to the rseq uapi header ABI when the kernel is built with CONFIG_DEBUG_RSEQ=y. This is done by storing a copy of the read-only fields in the task_struct, and validating the prior values present in user-space before updating them. If the values do not match, print a warning on the console (printk_ratelimited()). This is a first step to identify misuses of the rseq ABI by printing a warning on the console. After a giving some time to userspace to correct its use of rseq, the plan is to eventually terminate offending processes with SIGSEGV. This change is expected to produce warnings for the upstream tcmalloc implementation, but tcmalloc developers mentioned they were open to adapt their implementation to kernel-level change. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://github.com/google/tcmalloc/issues/144 include/linux/sched.h | 9 +++++ kernel/rseq.c | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) commit c56078128c0afe92985c378478b0b0435062c8df Merge: 527acf5de4c0 bd4a5c8d5356 Author: Mark Brown <broonie@kernel.org> Date: Tue Dec 10 13:46:41 2024 +0000 ASoC: simple-card-utils: tidyup for Multi connection Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: These patches tidyup simple-card-utils for Multi connection of Audio Graph Card, Because of DT node parsing, it should check port 1st instead of endpoint. Otherwise, it can't handle DAI correctly. commit cc115abc1f9b55092c11c183ebff9ad921251609 Author: Hans de Goede <hdegoede@redhat.com> Date: Mon Dec 9 23:05:22 2024 +0100 platform/x86: int3472: Debug log the sensor name Debug log the sensor name to make it easier to figure out which INT3472 device is associated with which sensor. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241209220522.25288-4-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/intel/int3472/common.c | 2 ++ 1 file changed, 2 insertions(+) commit 6718d42b6eb28228a554db6c8973693ad5320006 Author: Hans de Goede <hdegoede@redhat.com> Date: Mon Dec 9 23:05:21 2024 +0100 platform/x86: int3472: Fix skl_int3472_handle_gpio_resources() return value The INT3472 code never wants a copy of the ACPI resource to be added to the list-head passed to acpi_dev_get_resources(). Make skl_int3472_handle_gpio_resources() always return -errno or 1. Also update the inaccurate comment about the return value. skl_int3472_handle_gpio_resources() was already returning 1 in the case of not a GPIO resource or invalid _DSM return and not -EINVAL / -ENODEV as the comment claimed. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241209220522.25288-3-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/intel/int3472/discrete.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 1dd0cb9cabf37fbe20f0a66e4c3972cb21240aed Author: Hans de Goede <hdegoede@redhat.com> Date: Mon Dec 9 23:05:20 2024 +0100 platform/x86: int3472: Make "pin number mismatch" message a debug message It seems that Windows is only using the ACPI GPIO resources and never looks at the part of the _DSM return value which encodes the pin number. For example on a Terra Pad 1262 v2 the following messages are printend: int3472-discrete INT3472:01: reset \_SB.GPI0 pin number mismatch _DSM 103 resource 359 int3472-discrete INT3472:01: powerdown \_SB.GPI0 pin number mismatch _DSM 207 resource 335 int3472-discrete INT3472:02: reset \_SB.GPI0 pin number mismatch _DSM 101 resource 357 Notice for the 2 reset pins that the _DSM value is off by 256, this is caused by there only being 8 bits reserved in the _DSM return value for the pin-number. As for the powerdown pin, testing has shown that the pin-number 335 from the ACPI GPIO resource is correct and the _DSM value is bogus. Lower the warning about these mismatches to a debug message and only look at the lower 8 bits of the GPIO resource pin numbers. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241209220522.25288-2-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/intel/int3472/discrete.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cd2fd6eab480dfc247b737cf7a3d6b009c4d0f1c Author: Hans de Goede <hdegoede@redhat.com> Date: Mon Dec 9 23:05:19 2024 +0100 platform/x86: int3472: Check for adev == NULL Not all devices have an ACPI companion fwnode, so adev might be NULL. This can e.g. (theoretically) happen when a user manually binds one of the int3472 drivers to another i2c/platform device through sysfs. Add a check for adev not being set and return -ENODEV in that case to avoid a possible NULL pointer deref in skl_int3472_get_acpi_buffer(). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241209220522.25288-1-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/intel/int3472/discrete.c | 3 +++ drivers/platform/x86/intel/int3472/tps68470.c | 3 +++ 2 files changed, 6 insertions(+) commit 8a4b913df427b8f900bcc7849cc15a7b81628d57 Author: Jocelyn Falempe <jfalempe@redhat.com> Date: Wed Dec 4 16:45:05 2024 +0100 drm/log: Add integer scaling support Add a module parameter, to increase the font size for HiDPI screen. Even with CONFIG_FONT_TER16x32, it can still be a bit small to read. In this case, adding drm_log.scale=2 to your kernel command line will double the character size. Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-7-jfalempe@redhat.com drivers/gpu/drm/clients/drm_log.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit cd41b4489c27058570255fe0594a33c25e4bd209 Author: Jocelyn Falempe <jfalempe@redhat.com> Date: Wed Dec 4 16:45:04 2024 +0100 drm/log: Implement suspend/resume Normally the console is already suspended when the graphic driver suspend callback is called, but if the parameter no_console_suspend is set, it might still be active. So call console_stop()/console_start() in the suspend/resume callbacks, to make sure it won't try to write to the framebuffer while the graphic driver is suspended. Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: John Ogness <john.ogness@linutronix.de> Acked-by: Petr Mladek <pmladek@suse.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-6-jfalempe@redhat.com drivers/gpu/drm/clients/drm_log.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 25e2c2a3eff55683bbe77b108db2a7e389246666 Author: Jocelyn Falempe <jfalempe@redhat.com> Date: Wed Dec 4 16:45:03 2024 +0100 drm/log: Color the timestamp, to improve readability Color the timesamp prefix, similar to dmesg. Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-5-jfalempe@redhat.com drivers/gpu/drm/clients/drm_log.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit eb30b4453e4c29bbe2ff855c08b13f332b3505aa Author: Jocelyn Falempe <jfalempe@redhat.com> Date: Wed Dec 4 16:45:02 2024 +0100 drm/log: Do not draw if drm_master is taken When userspace takes drm_master, the drm_client buffer is no more visible, so drm_log shouldn't waste CPU cycle to draw on it. Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-4-jfalempe@redhat.com drivers/gpu/drm/clients/drm_log.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit f7b42442c4ac142ab5e261858cec48eb6c9c1567 Author: Jocelyn Falempe <jfalempe@redhat.com> Date: Wed Dec 4 16:45:01 2024 +0100 drm/log: Introduce a new boot logger to draw the kmsg on the screen drm_log is a simple logger that uses the drm_client API to print the kmsg boot log on the screen. This is not a full replacement to fbcon, as it will only print the kmsg. It will never handle user input, or a terminal because this is better done in userspace. Design decisions: * It uses the drm_client API, so it should work on all drm drivers from the start. * It doesn't scroll the message, that way it doesn't need to redraw the whole screen for each new message. It also means it doesn't have to keep drawn messages in memory, to redraw them when scrolling. * It uses the new non-blocking console API, so it should work well with PREEMPT_RT. This patch also adds a Kconfig menu to select the drm client to use. It can be overwritten on the kernel command line with: drm_client_lib.active=log or drm_client_lib.active=fbdev Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: John Ogness <john.ogness@linutronix.de> # console API Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-3-jfalempe@redhat.com drivers/gpu/drm/clients/Kconfig | 48 ++++ drivers/gpu/drm/clients/Makefile | 3 + drivers/gpu/drm/clients/drm_client_internal.h | 6 + drivers/gpu/drm/clients/drm_client_setup.c | 29 +- drivers/gpu/drm/clients/drm_log.c | 370 ++++++++++++++++++++++++++ 5 files changed, 452 insertions(+), 4 deletions(-) commit 31fa2c1ca0b239f64eaf682f1685bbbd74fc0181 Author: Jocelyn Falempe <jfalempe@redhat.com> Date: Wed Dec 4 16:45:00 2024 +0100 drm/panic: Move drawing functions to drm_draw Move the color conversions, blit and fill functions to drm_draw.c, so that they can be re-used by drm_log. drm_draw is internal to the drm subsystem, and shouldn't be used by gpu drivers. Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-2-jfalempe@redhat.com drivers/gpu/drm/Kconfig | 5 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/drm_draw.c | 233 +++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_draw_internal.h | 56 ++++++++ drivers/gpu/drm/drm_panic.c | 269 ++++-------------------------------- 5 files changed, 324 insertions(+), 240 deletions(-) commit f3479920605644e273768d316aa49119ec629acc Author: Hans de Goede <hdegoede@redhat.com> Date: Wed Dec 4 15:38:07 2024 +0100 platform/x86: intel: int0002_vgpio: Make the irqchip immutable Commit 6c846d026d49 ("gpio: Don't fiddle with irqchips marked as immutable") added a warning to indicate if the gpiolib is altering the internals of irqchips: gpio gpiochip4: (INT0002 Virtual GPIO): not an immutable chip, please consider fixing it! Fix this by making the irqchip in the int0002_vgpio driver immutable. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20241204143807.32966-1-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/intel/int0002_vgpio.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 93e3c990fcd90e578fd23b572a6c89020c7a453e Author: Janaki Ramaiah Thota <quic_janathot@quicinc.com> Date: Mon Dec 9 16:04:55 2024 +0530 power: sequencing: qcom-wcn: add support for the WCN6750 PMU Enable support for controlling the power-up sequence of the PMU inside the WCN6750 model. Signed-off-by: Janaki Ramaiah Thota <quic_janathot@quicinc.com> Link: https://lore.kernel.org/r/20241209103455.9675-5-quic_janathot@quicinc.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> drivers/power/sequencing/pwrseq-qcom-wcn.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit c78dd25138d104f94ddeab5248a5efe4504f205e Author: Hans de Goede <hdegoede@redhat.com> Date: Wed Dec 4 20:34:42 2024 +0100 platform/x86: x86-android-tablets: Add Vexia EDU ATLA 10 EC battery driver The Vexia EDU ATLA 10 tablet has an embedded controller instead of giving the os direct access to the charger + fuel-gauge ICs as is normal on tablets designed for Android. There is ACPI Battery device in the DSDT using the EC which should work except that it expects the I2C controller to be enumerated as an ACPI device and the tablet's BIOS enumerates all LPSS devices as PCI devices (and changing the LPSS BIOS settings from PCI -> ACPI does not work). Add a power_supply class driver for the Atla 10 EC to expert battery info to userspace. This is made part of the x86-android-tablets directory and Kconfig option because the i2c_client it binds to is instantiated by the x86-android-tablets kmod. Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241204193442.65374-3-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/x86-android-tablets/Makefile | 2 +- .../x86/x86-android-tablets/vexia_atla10_ec.c | 261 +++++++++++++++++++++ 2 files changed, 262 insertions(+), 1 deletion(-) commit 0130ec83c5535b034a96284eb9f31b3b5373d207 Author: Hans de Goede <hdegoede@redhat.com> Date: Wed Dec 4 20:34:41 2024 +0100 platform/x86/intel: bytcrc_pwrsrc: Optionally register a power_supply dev On some Android tablets with Crystal Cove PMIC the DSDT lacks an ACPI AC device to indicate whether a charger is plugged in or not. Add support for registering a "crystal_cove_pwrsrc" power_supply class device to indicate charger online status. This is made conditional on a "linux,register-pwrsrc-power_supply" boolean device-property to avoid registering a duplicate power_supply class device on devices where this is already handled by an ACPI AC device. Note the "linux,register-pwrsrc-power_supply" property is only used on x86/ACPI (non devicetree) devs and the devicetree-bindings maintainers have requested properties like these to not be added to the devicetree bindings, so the new property is deliberately not added to any bindings. Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241204193442.65374-2-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/intel/bytcrc_pwrsrc.c | 79 +++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 2 deletions(-) commit c0f1bfc141ea52ea039bd17537b46b705ff8a93d Author: Hans de Goede <hdegoede@redhat.com> Date: Wed Dec 4 21:42:19 2024 +0100 platform/x86: x86-android-tablets: Add Bluetooth support for Vexia EDU ATLA 10 The UART used for the Bluetooth HCI on the Vexia EDU ATLA 10 is enumerated as a PCI device, but the ODBA7823 ACPI fwnode for the HCI expects it to use the more standard ACPI enumeration mode. So Bluetooth does not work out of the box. Add x86_serdev_info to make the x86-android-tablets manually associate the fwnode with the UART. Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241204204227.95757-9-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/x86-android-tablets/other.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7d28fb4d16fb8ad2309616ee3bdcdbf161c13dc5 Author: Hans de Goede <hdegoede@redhat.com> Date: Wed Dec 4 21:42:18 2024 +0100 platform/x86: x86-android-tablets: Add support for getting serdev-controller by PCI parent On the Vexia EDU ATLA 10 tablet, which ships with Android + a custom Linux (guadalinex) using the custom Android kernel the UART controllers are not enumerated as ACPI devices as they typically are. Instead they are enumerated through PCI and getting the serdev-controller by ACPI HID + UID does not work. Add support for getting the serdev-controller by the PCI devfn of its parent instead. This also renames the use_pci_devname flag to use_pci since the former name now no longer is accurate. Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241204204227.95757-8-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/x86-android-tablets/core.c | 22 +++++++++++++++++++--- drivers/platform/x86/x86-android-tablets/other.c | 2 +- .../x86/x86-android-tablets/x86-android-tablets.h | 5 ++++- 3 files changed, 24 insertions(+), 5 deletions(-) commit dd6db239cb30ef1ccc0084a530839c9897009a6f Author: Hans de Goede <hdegoede@redhat.com> Date: Wed Dec 4 21:42:17 2024 +0100 platform/x86: x86-android-tablets: Store serdev-controller ACPI HID + UID in a union Store the serdev-controller ACPI HID + UID in a union inside struct x86_serdev_info. This is a preparation patch for adding support for PCI enumerated serdev- controllers which will be done by the devfn value of the PCI device. Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241204204227.95757-7-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/x86-android-tablets/asus.c | 4 ++-- drivers/platform/x86/x86-android-tablets/core.c | 2 +- drivers/platform/x86/x86-android-tablets/lenovo.c | 4 ++-- drivers/platform/x86/x86-android-tablets/x86-android-tablets.h | 8 ++++++-- 4 files changed, 11 insertions(+), 7 deletions(-) commit c1007dd139b6f8b2b00ba7bdce32a94c3da34dbe Author: Hans de Goede <hdegoede@redhat.com> Date: Wed Dec 4 21:42:16 2024 +0100 platform/x86: x86-android-tablets: Change x86_instantiate_serdev() prototype Make x86_instantiate_serdev() take a "struct x86_dev_info *" + idx as arguments instead of a "struct x86_serdev_info *" + idx. This makes the x86_instantiate_serdev() prototype match the x86_instantiate_i2c_client() and x86_instantiate_spi_dev() prototypes. Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241204204227.95757-6-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/x86-android-tablets/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a6593c5c50455852cd3b2b51e09bdec90b99738f Author: Hans de Goede <hdegoede@redhat.com> Date: Wed Dec 4 21:42:15 2024 +0100 platform/x86: serdev_helpers: Add get_serdev_controller_from_parent() helper The x86-android-tablets code needs to be able to get a serdev_controller device from a PCI parent, rather then by the ACPI HID+UID of the parent, because on some tablets the UARTs are enumerated as PCI devices instead of ACPI devices. Split the code to walk the device hierarchy to find the serdev_controller from its parents out into a get_serdev_controller_from_parent() helper so that the x86-android-tablets code can re-use it. Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241204204227.95757-5-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/serdev_helpers.h | 60 ++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 26 deletions(-) commit 478b00a623d6c8ae23a1be7bcc96cb5497045cef Author: Hans de Goede <hdegoede@redhat.com> Date: Wed Dec 4 21:42:14 2024 +0100 platform/x86: serdev_helpers: Check for serial_ctrl_uid == NULL dell_uart_bl_pdev_probe() calls get_serdev_controller() with the serial_ctrl_uid parameter set to NULL. In case of errors this NULL parameter then gets passed to pr_err() as argument matching a "%s" conversion specification. This leads to compiler warnings when building with "make W=1". Check serial_ctrl_uid before passing it to pr_err() to avoid these. Fixes: dc5afd720f84 ("platform/x86: Add new get_serdev_controller() helper") Cc: stable@vger.kernel.org Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20241204204227.95757-4-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/serdev_helpers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f6728073baa172be6223512fffd72796de891536 Author: Hans de Goede <hdegoede@redhat.com> Date: Wed Dec 4 21:42:13 2024 +0100 platform/x86: x86-android-tablets: Make variables only used locally static Commit 06f876def346 ("platform/x86: x86-android-tablets: Add support for Vexia EDU ATLA 10 tablet") omitted the static keyword from some variables which are only used inside other.c . Add the missing static keyword to these, this fixes the following warnings: .../x86-android-tablets/other.c:605:12: sparse: sparse: symbol 'crystal_cove_pwrsrc_psy' was not declared. Should it be static? .../x86-android-tablets/other.c:612:28: sparse: sparse: symbol 'vexia_edu_atla10_ulpmc_node' was not declared. Should it be static? Fixes: 06f876def346 ("platform/x86: x86-android-tablets: Add support for Vexia EDU ATLA 10 tablet") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202411301001.1glTy7Xm-lkp@intel.com/ Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20241204204227.95757-3-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/x86-android-tablets/other.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 981fd70a5ac4347368fa8a3329b7d67f1c567ee7 Author: Hans de Goede <hdegoede@redhat.com> Date: Wed Dec 4 21:42:12 2024 +0100 platform/x86: x86-android-tablets: Add missing __init to get_i2c_adap_by_*() get_i2c_adap_by_handle() and get_i2c_adap_by_pci_parent() both are only used by x86_instantiate_i2c_client() which is __init itself and in case of the latter it also uses match_parent() which is also __init. Fixes: 5b78e809f948 ("platform/x86: x86-android-tablets: Add support for getting i2c_adapter by PCI parent devname()") Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241204204227.95757-2-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/x86-android-tablets/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 68573a561362cc11d4dbfdcf97127fbf0e118896 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Tue Oct 22 09:24:24 2024 +0100 drm: renesas: rz-du: rzg2l_du_encoder: Fix max dot clock for DPI As per the RZ/G2UL hardware manual Table 33.4 Clock List, the maximum dot clock for the DPI interface is 83.5 MHz. Add mode_valid callback to reject modes greater than 83.5 MHz. Suggested-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241022082433.32513-3-biju.das.jz@bp.renesas.com drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit e22c857aed59ed3f5f3e144039ef095521f15179 Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Tue Oct 22 09:24:23 2024 +0100 drm: renesas: rz-du: Drop DU_MCR0_DPI_OE macro The DPI_OE bit is removed from the latest RZ/G2UL and RZ/G2L hardware manual. So, drop this macro. Fixes: b330f1480172 ("drm: renesas: rz-du: Add RZ/G2UL DU Support") Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241022082433.32513-2-biju.das.jz@bp.renesas.com drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 527acf5de4c060ebb3d1eb98c4acf21743c2cde7 Merge: 5a305d9d48df 4edc98598be4 Author: Mark Brown <broonie@kernel.org> Date: Tue Dec 10 12:37:21 2024 +0000 Add function to constrain rates Merge series from Chancel Liu <chancel.liu@nxp.com>: Platforms like i.MX93/91 only have one audio PLL. Some sample rates are not supported. If the PLL source is used for 8kHz series rates, then 11kHz series rates can't be supported. Add common function to constrain rates according to different clock sources. In ASoC drivers switch to this new function. commit 5a305d9d48df11e8eeb8c28fa08927067bc274af Merge: 8c695b4d19cf 6e750d3ec741 Author: Mark Brown <broonie@kernel.org> Date: Tue Dec 10 12:37:17 2024 +0000 ASoC: sun4i-spdif: Add 24bit support Merge series from codekipper@gmail.com: I've tested this patch series on the Allwinner H3, A64, H6 and H313 SoCs up to 192KHz. 24bit support is working on my H313 board but 16bit plays a bit slow and I suspect that there is an issue with the clock setups. This is even present without this patch stack. I would look to address this asap, but for now can you please review what's here. commit 8c695b4d19cff2828683b8ec1aa6794419ef3a86 Merge: 7d57d1ce9398 d7f671b2f566 Author: Mark Brown <broonie@kernel.org> Date: Tue Dec 10 12:37:13 2024 +0000 ASoC: Intel: boards: updates for 6.14 Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: 1. Fix the incorrect cfg-mics value in card->components string. 2. New codec match entries supports. Bard Liao (6): ASoC: Intel: sof_sdw: correct mach_params->dmic_num ASoC: Intel: sof_sdw: reduce log level for not using internal dmic ASoC: Intel: sof_sdw: improve the log of DAI link numbers ASoC: Intel: soc-acpi-intel-ptl-match: add rt712_vb + rt1320 support ASoC: Intel: soc-acpi-intel-lnl-match: add rt713_vb_l2_rt1320_l13 support ASoC: Intel: soc-acpi-intel-ptl-match: add rt713_vb_l2_rt1320_l13 support Simon Trimmer (4): ASoC: Intel: sof_sdw: Correct quirk for Lenovo Yoga Slim 7 ASoC: Intel: sof_sdw: Add a dev_dbg message for the SOC_SDW_CODEC_MIC quirk ASoC: Intel: soc-acpi: arl: Correct naming of a cs35l56 address struct ASoC: Intel: soc-acpi: arl: Add match entries for new cs42l43 laptops sound/soc/intel/boards/sof_sdw.c | 33 ++-- .../intel/common/soc-acpi-intel-arl-match.c | 45 +++++- .../intel/common/soc-acpi-intel-lnl-match.c | 70 +++++++++ .../intel/common/soc-acpi-intel-ptl-match.c | 148 ++++++++++++++++++ 4 files changed, 282 insertions(+), 14 deletions(-) -- 2.43.0 commit e52163df77215c991cf4b6439f64c6331fd7dbfb Author: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io> Date: Fri Nov 15 11:06:35 2024 +0530 arm64/cpufeature: Refactor conditional logic in init_cpu_ftr_reg() Unnecessarily checks ftr_ovr == tmp in an extra else if, which is not needed because that condition would already be true by default if the previous conditions are not satisfied. if (ftr_ovr != tmp) { } else if (ftr_new != tmp) { } else if (ftr_ovr == tmp) { Logic: The first and last conditions are inverses of each other, so the last condition must be true if the first two conditions are false. Additionally, all branches set the variable str, making the subsequent "if (str)" check redundant Reviewed-by: Mark Brown <broonie@kernel.org> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io> Link: https://lore.kernel.org/r/20241115053740.20523-1-hardevsinh.palaniya@siliconsignals.io Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/kernel/cpufeature.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit b7cc281812c4e0545d415e9761d5b03e130a41f2 Merge: a17162f0b2dc 25fb0e77b90e Author: Mark Brown <broonie@kernel.org> Date: Tue Dec 10 12:12:44 2024 +0000 spi: Merge up fixes Silly add/add conflict in the Cadence QuadSPI driver. commit 264a593da60b60c4f8f218ac50cd1305d75387e8 Author: Mark Rutland <mark.rutland@arm.com> Date: Mon Dec 9 15:59:48 2024 +0000 arm64: cpufeature: Add HAFT to cpucap_is_possible() For consistency with other cpucaps, handle the configuration check for ARM64_HAFT in cpucap_is_possible() rather than this being explicit in system_supports_haft(). The configuration check will now happen implicitly as cpus_have_final_cap() uses cpucap_is_possible() via alternative_has_cap_unlikely(). Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Signed-off-by: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/r/20241209155948.2124393-1-mark.rutland@arm.com Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/include/asm/cpucaps.h | 2 ++ arch/arm64/include/asm/cpufeature.h | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) commit d82bb731e7606f1b07886aa2ac9b47a69019704b Author: Jani Nikula <jani.nikula@intel.com> Date: Thu Dec 5 11:49:35 2024 +0200 drm/i915/display: use drm_print_hex_dump() for buffer mismatch dumps Use the drm_printer based printer to get the device specific printing of the hex dump, and avoid the manual loglevel hacking. Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/a536050b5f9dc2d7de32d29766c98477f58d746c.1733392101.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_display.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 15695f72f1fd24f9dd9070a1529c52e6a6475d31 Author: Jani Nikula <jani.nikula@intel.com> Date: Thu Dec 5 11:49:34 2024 +0200 drm/i915/display: use drm_print_hex_dump() for crtc state dump Use the drm_printer based printer to get the device specific printing of the hex dump. Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/12d76e34ed4c508524f768a46d2a2beb09991a23.1733392101.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_crtc_state_dump.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 3050c1811387af53ed6c99ac2d602f4408d41f8d Author: Jani Nikula <jani.nikula@intel.com> Date: Thu Dec 5 11:49:33 2024 +0200 drm/print: add drm_print_hex_dump() Add a helper to print a hex dump to a struct drm_printer. There's no fancy formatting stuff, just 16 space-separated bytes per line, with an optional prefix. Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/f650fe1ed3e3bb74760426fa7461c3b028d661fb.1733392101.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/drm_print.c | 23 +++++++++++++++++++++++ include/drm/drm_print.h | 2 ++ 2 files changed, 25 insertions(+) commit 50a78409a2157c0340572beecab86e2b263fe2a2 Author: Charlie Jenkins <charlie@rivosinc.com> Date: Fri Dec 6 10:05:06 2024 -0800 selftests/hid: Add host-tools to .gitignore When compiling these selftests the host-tools directory is generated. Add it to the .gitignore so git doesn't see these files as trackable. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> tools/testing/selftests/hid/.gitignore | 1 + 1 file changed, 1 insertion(+) commit 88006b8eca63467cf1b28fed839f4954c578eeff Author: Jason Gerecke <jason.gerecke@wacom.com> Date: Mon Dec 9 10:40:29 2024 -0800 HID: wacom: Initialize brightness of LED trigger If an LED has a default_trigger set prior to being registered with the subsystem, that trigger will be executed with a brightness value defined by `trigger->brightness`. Our driver was not setting this value, which was causing problems. It would cause the selected LED to be turned off, as well as corrupt the hlv/llv values assigned to other LEDs (since calling `wacom_led_brightness_set` will overite these values). This patch sets the value of `trigger->brightness` to an appropriate value. We use `wacom_leds_brightness_get` to transform the llv/hlv values into a brightness that is understood by the rest of the LED subsystem. Fixes: 822c91e72eac ("leds: trigger: Store brightness set by led_trigger_event()") Cc: stable@vger.kernel.org # v6.10+ Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> drivers/hid/wacom_sys.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit b06bc47279919628b328710f7767ea7a18a68973 Author: Kevin Hilman <khilman@baylibre.com> Date: Fri Dec 6 14:12:52 2024 -0800 pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups When a device supports IO daisy-chain wakeups, it uses a dedicated wake IRQ. Devices with IO daisy-chain wakeups enabled should not set wakeup constraints since these can happen even from deep power states, so should not prevent the DM from picking deep power states. Wake IRQs are set with dev_pm_set_wake_irq() or dev_pm_set_dedicated_wake_irq(). The latter is used by the serial driver used on K3 platforms (drivers/tty/serial/8250/8250_omap.c) when the interrupts-extended property is used to describe the dedicated wakeup interrupt. Detect these wake IRQs in the suspend path, and if set, skip sending constraint. Tested-by: Dhruva Gole <d-gole@ti.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Message-ID: <20241206-lpm-v6-10-constraints-pmdomain-v6-3-833980158c68@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/pmdomain/ti/ti_sci_pm_domains.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9d8aa0dd3be4099019ce258c1635062aaf56b737 Author: Kevin Hilman <khilman@baylibre.com> Date: Fri Dec 6 14:12:51 2024 -0800 pmdomain: ti_sci: add wakeup constraint management During system-wide suspend, check all devices connected to PM domain to see if they are wakeup-enabled. If so, set a TI SCI device constraint. Note: DM firmware clears all constraints on resume. Co-developed-by: Vibhore Vardhan <vibhore@ti.com> Signed-off-by: Vibhore Vardhan <vibhore@ti.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Dhruva Gole <d-gole@ti.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Message-ID: <20241206-lpm-v6-10-constraints-pmdomain-v6-2-833980158c68@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/pmdomain/ti/ti_sci_pm_domains.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit b5fc9453651d0aacaf412ae636d1960bd6a4a3d7 Author: Kevin Hilman <khilman@baylibre.com> Date: Fri Dec 6 14:12:50 2024 -0800 pmdomain: ti_sci: add per-device latency constraint management For each device in a TI SCI PM domain, check whether the device has any resume latency constraints set via per-device PM QoS. If constraints are set, send them to DM via the new SCI constraints API. Checking for constraints happen for each device before system-wide suspend (via ->suspend() hook.) An important detail here is that the PM domain driver inserts itself into the path of both the ->suspend() and ->resume() hook path of *all* devices in the PM domain. This allows generic PM domain code to handle the constraint management and communication with TI SCI. Further, this allows device drivers to use existing PM QoS APIs to add/update constraints. DM firmware clears constraints during its resume, so Linux has to check/update/send constraints each time system suspends. Also note that the PM QoS framework uses usecs as the units for latency whereas the TI SCI firmware uses msecs, so a conversion is needed before passing to TI SCI. Co-developed-by: Vibhore Vardhan <vibhore@ti.com> Signed-off-by: Vibhore Vardhan <vibhore@ti.com> Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Dhruva Gole <d-gole@ti.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Message-ID: <20241206-lpm-v6-10-constraints-pmdomain-v6-1-833980158c68@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/pmdomain/ti/ti_sci_pm_domains.c | 55 +++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit e1a87570347091204d54298ede5f04176c9eeb49 Author: Peng Fan <peng.fan@nxp.com> Date: Fri Dec 6 19:27:31 2024 +0800 pmdomain: imx-gpcv2: Suppress bind attrs The gpcv2 drivers on imx8m series are registered as platform devices and this opens the possibility of reloading the driver at runtime. But this doesn't actually work. There are some hardware sequence dependecy between blk ctrl and gpc, also power domains are used by other peripherals, so fix this by explicitly suppressing bind attrs. Signed-off-by: Peng Fan <peng.fan@nxp.com> Message-ID: <20241206112731.98244-2-peng.fan@oss.nxp.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/pmdomain/imx/gpcv2.c | 2 ++ 1 file changed, 2 insertions(+) commit afb2a86f002baf2823ba296c5d6e6a2a902a3d00 Author: Peng Fan <peng.fan@nxp.com> Date: Fri Dec 6 19:27:30 2024 +0800 pmdomain: imx8m[p]-blk-ctrl: Suppress bind attrs The blk ctrl drivers on imx8m series are registered as platform devices and this opens the possibility of reloading the driver at runtime. But this doesn't actually work. There are some hardware sequence dependecy between blk ctrl and gpc, also power domains are used by other peripherals, so fix this by explicitly suppressing bind attrs. Signed-off-by: Peng Fan <peng.fan@nxp.com> Message-ID: <20241206112731.98244-1-peng.fan@oss.nxp.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/pmdomain/imx/imx8m-blk-ctrl.c | 1 + drivers/pmdomain/imx/imx8mp-blk-ctrl.c | 1 + 2 files changed, 2 insertions(+) commit e281bd22998b4ff8e4add6a5cea2db980bf64d8d Author: Zhu Jun <zhujun2@cmss.chinamobile.com> Date: Tue Dec 3 01:33:23 2024 -0800 arm64: asm: Fix typo in pgtable.h The word 'trasferring' is wrong, so fix it. Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241203093323.7831-1-zhujun2@cmss.chinamobile.com Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e5823c8e86de83a43d59a522b4de29066d3b306 Author: Anshuman Khandual <anshuman.khandual@arm.com> Date: Mon Dec 2 12:14:07 2024 +0530 arm64/mm: Ensure adequate HUGE_MAX_HSTATE This asserts that HUGE_MAX_HSTATE is sufficient enough preventing potential hugetlb_max_hstate runtime overflow in hugetlb_add_hstate() thus triggering a BUG_ON() there after. Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Link: https://lore.kernel.org/r/20241202064407.53807-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/mm/hugetlbpage.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit a0e33f528e09ae45308880999dee3f54b52e3182 Author: Anshuman Khandual <anshuman.khandual@arm.com> Date: Mon Dec 2 14:08:50 2024 +0530 arm64/mm: Replace open encodings with PXD_TABLE_BIT [pgd|p4d]_bad() helpers have open encodings for their respective table bits which can be replaced with corresponding macros. This makes things clearer, thus improving their readability as well. Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Link: https://lore.kernel.org/r/20241202083850.73207-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/include/asm/pgtable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5f882f4aa8aa893f6c7dee11bbe57b0910a6d995 Author: Anshuman Khandual <anshuman.khandual@arm.com> Date: Mon Dec 2 10:05:53 2024 +0530 arm64/mm: Drop INIT_MM_CONTEXT() Platform override for INIT_MM_CONTEXT() is redundant because swapper_pg_dir always gets assigned as the pgd during init_mm initialization. So just drop this override on arm64. Originally this override was added via the 'commit 2b5548b68199 ("arm64/mm: Separate boot-time page tables from swapper_pg_dir")' because non standard init_pg_dir was assigned as the pgd. Subsequently it was changed as default swapper_pg_dir by the 'commit ba5b0333a847 ("arm64: mm: omit redundant remap of kernel image")', which might have also just dropped this override. Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Link: https://lore.kernel.org/r/20241202043553.29592-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon <will@kernel.org> arch/arm64/include/asm/mmu.h | 3 --- 1 file changed, 3 deletions(-) commit d14b9a713b3458ce4908ca883c7277f0863cfe21 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Tue Dec 10 12:09:33 2024 +0100 xtensa/simdisk: Use str_write_read() helper in simdisk_transfer() Remove hard-coded strings by using the str_write_read() helper. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Message-Id: <20241210110935.104919-2-thorsten.blum@linux.dev> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> arch/xtensa/platforms/iss/simdisk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b04b981f3a842ef63e06048fafaa8d20c20334c6 Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Sat Nov 30 17:39:37 2024 +0100 pmdomain: core: Support naming idle states Commit 422f2d418186 ("arm64: dts: qcom: Drop undocumented domain "idle-state-name"") brought to light the common misbelief that idle-state-names also applies to e.g. PSCI power domain idle states. Make that a reality, mimicking the property name used by cpuidle states. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Message-ID: <20241130-topic-idle_state_name-v1-2-d0ff67b0c8e9@oss.qualcomm.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/pmdomain/core.c | 15 ++++++++++++--- include/linux/pm_domain.h | 1 + 2 files changed, 13 insertions(+), 3 deletions(-) commit 11444fb6f2ed79f8ccaaf13e281957a2b6bbc360 Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Sat Nov 30 17:39:36 2024 +0100 dt-bindings: power: domain-idle-state: Allow idle-state-name Allow specifying a name for idle states, similar to CPU idle states in cpu/idle-states.yaml Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Message-ID: <20241130-topic-idle_state_name-v1-1-d0ff67b0c8e9@oss.qualcomm.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Documentation/devicetree/bindings/power/domain-idle-state.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit 20bf82a898b65c129af76deb96a1b415d3098a28 Author: Josef Bacik <josef@toxicpanda.com> Date: Fri Nov 15 10:30:28 2024 -0500 mm: don't allow huge faults for files with pre content watches There's nothing stopping us from supporting this, we could simply pass the order into the helper and emit the proper length. However currently there's no tests to validate this works properly, so disable it until there's a desire to support this along with the appropriate tests. Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/9035b82cff08a3801cef3d06bbf2778b2e5a4dba.1731684329.git.josef@toxicpanda.com mm/memory.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit b031ef5ea8b16525ba7ec47c0db36393b759615c Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 25 17:19:33 2024 +0200 drm/i915/mst: add beginnings of DP MST documentation Add a little bit of documentation around DP MST. This is nowhere near complete nor does it have enough detail. But it's better than nothing, and hopefully gives people a basic grasp of what's going on. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241125151933.2382910-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp_mst.c | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit fac84846a28c0950d4433118b3dffd44306df62d Author: Josef Bacik <josef@toxicpanda.com> Date: Fri Nov 15 10:30:27 2024 -0500 fanotify: disable readahead if we have pre-content watches With page faults we can trigger readahead on the file, and then subsequent faults can find these pages and insert them into the file without emitting an fanotify event. To avoid this case, disable readahead if we have pre-content watches on the file. This way we are guaranteed to get an event for every range we attempt to access on a pre-content watched file. Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/70a54e859f555e54bc7a47b32fe5aca92b085615.1731684329.git.josef@toxicpanda.com mm/filemap.c | 12 ++++++++++++ mm/readahead.c | 14 ++++++++++++++ 2 files changed, 26 insertions(+) commit b4b2ff4f61ded819bfa22e50fdec7693f51cbbee Author: Amir Goldstein <amir73il@gmail.com> Date: Fri Nov 15 10:30:25 2024 -0500 fanotify: allow to set errno in FAN_DENY permission response With FAN_DENY response, user trying to perform the filesystem operation gets an error with errno set to EPERM. It is useful for hierarchical storage management (HSM) service to be able to deny access for reasons more diverse than EPERM, for example EAGAIN, if HSM could retry the operation later. Allow fanotify groups with priority FAN_CLASSS_PRE_CONTENT to responsd to permission events with the response value FAN_DENY_ERRNO(errno), instead of FAN_DENY to return a custom error. Limit custom error values to errors expected on read(2)/write(2) and open(2) of regular files. This list could be extended in the future. Userspace can test for legitimate values of FAN_DENY_ERRNO(errno) by writing a response to an fanotify group fd with a value of FAN_NOFD in the fd field of the response. The change in fanotify_response is backward compatible, because errno is written in the high 8 bits of the 32bit response field and old kernels reject respose value with high bits set. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/1e5fb6af84b69ca96b5c849fa5f10bdf4d1dc414.1731684329.git.josef@toxicpanda.com fs/notify/fanotify/fanotify.c | 17 +++++++++++++---- fs/notify/fanotify/fanotify.h | 5 +++++ fs/notify/fanotify/fanotify_user.c | 29 +++++++++++++++++++++++++++-- include/linux/fanotify.h | 4 +++- include/uapi/linux/fanotify.h | 7 +++++++ 5 files changed, 55 insertions(+), 7 deletions(-) commit 870499bc1d4dc04cba1f63dd5e7bc02b983e2458 Author: Amir Goldstein <amir73il@gmail.com> Date: Fri Nov 15 10:30:24 2024 -0500 fanotify: report file range info with pre-content events With group class FAN_CLASS_PRE_CONTENT, report offset and length info along with FAN_PRE_ACCESS pre-content events. This information is meant to be used by hierarchical storage managers that want to fill partial content of files on first access to range. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/b90a9e6c809dd3cad5684da90f23ea93ec6ce8c8.1731684329.git.josef@toxicpanda.com fs/notify/fanotify/fanotify.h | 8 ++++++++ fs/notify/fanotify/fanotify_user.c | 38 ++++++++++++++++++++++++++++++++++++++ include/uapi/linux/fanotify.h | 8 ++++++++ 3 files changed, 54 insertions(+) commit 4f8afa33817a6420398d1c177c6e220a05081f51 Author: Amir Goldstein <amir73il@gmail.com> Date: Fri Nov 15 10:30:23 2024 -0500 fanotify: introduce FAN_PRE_ACCESS permission event Similar to FAN_ACCESS_PERM permission event, but it is only allowed with class FAN_CLASS_PRE_CONTENT and only allowed on regular files and dirs. Unlike FAN_ACCESS_PERM, it is safe to write to the file being accessed in the context of the event handler. This pre-content event is meant to be used by hierarchical storage managers that want to fill the content of files on first read access. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/b80986f8d5b860acea2c9a73c0acd93587be5fe4.1731684329.git.josef@toxicpanda.com fs/notify/fanotify/fanotify.c | 3 ++- fs/notify/fanotify/fanotify_user.c | 35 ++++++++++++++++++++++++++++++----- include/linux/fanotify.h | 14 ++++++++++---- include/uapi/linux/fanotify.h | 2 ++ 4 files changed, 44 insertions(+), 10 deletions(-) commit 4acf3bc76e521b47acebcefc6312c97992f4ca29 Author: Amir Goldstein <amir73il@gmail.com> Date: Fri Nov 15 10:30:22 2024 -0500 fsnotify: generate pre-content permission event on truncate Generate FS_PRE_ACCESS event before truncate, without sb_writers held. Move the security hooks also before sb_start_write() to conform with other security hooks (e.g. in write, fallocate). The event will have a range info of the page surrounding the new size to provide an opportunity to fill the conetnt at the end of file before truncating to non-page aligned size. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/23af8201db6ac2efdea94f09ab067d81ba5de7a7.1731684329.git.josef@toxicpanda.com fs/open.c | 31 +++++++++++++++++++++---------- include/linux/fsnotify.h | 20 ++++++++++++++++++++ 2 files changed, 41 insertions(+), 10 deletions(-) commit 9740d17162deca7138fad7dcf3ef52324832c32b Author: Amir Goldstein <amir73il@gmail.com> Date: Fri Nov 15 10:30:21 2024 -0500 fsnotify: pass optional file access range in pre-content event We would like to add file range information to pre-content events. Pass a struct file_range with offset and length to event handler along with pre-content permission event. The offset and length are aligned to page size, but we may need to align them to minimum folio size for filesystems with large block size. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/88eddee301231d814aede27fb4d5b41ae37c9702.1731684329.git.josef@toxicpanda.com fs/notify/fanotify/fanotify.c | 11 +++++++++-- fs/notify/fanotify/fanotify.h | 2 ++ fs/notify/fsnotify.c | 18 ++++++++++++++++++ include/linux/fsnotify.h | 4 ++-- include/linux/fsnotify_backend.h | 40 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 71 insertions(+), 4 deletions(-) commit f156524e5d72c81792eee81f828784dc8a37a7f2 Author: Amir Goldstein <amir73il@gmail.com> Date: Fri Nov 15 10:30:20 2024 -0500 fsnotify: introduce pre-content permission events The new FS_PRE_ACCESS permission event is similar to FS_ACCESS_PERM, but it meant for a different use case of filling file content before access to a file range, so it has slightly different semantics. Generate FS_PRE_ACCESS/FS_ACCESS_PERM as two seperate events, so content scanners could inspect the content filled by pre-content event handler. Unlike FS_ACCESS_PERM, FS_PRE_ACCESS is also called before a file is modified by syscalls as write() and fallocate(). FS_ACCESS_PERM is reported also on blockdev and pipes, but the new pre-content events are only reported for regular files and dirs. The pre-content events are meant to be used by hierarchical storage managers that want to fill the content of files on first access. There are some specific requirements from filesystems that could be used with pre-content events, so add a flag for fs to opt-in for pre-content events explicitly before they can be used. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/b934c5e3af205abc4e0e4709f6486815937ddfdf.1731684329.git.josef@toxicpanda.com fs/notify/fsnotify.c | 2 +- include/linux/fs.h | 1 + include/linux/fsnotify.h | 19 ++++++++++++++++++- include/linux/fsnotify_backend.h | 11 ++++++++--- security/selinux/hooks.c | 3 ++- 5 files changed, 30 insertions(+), 6 deletions(-) commit 0a076036b631f086a6bce93a45eaa216f234f121 Author: Amir Goldstein <amir73il@gmail.com> Date: Fri Nov 15 10:30:19 2024 -0500 fanotify: reserve event bit of deprecated FAN_DIR_MODIFY Avoid reusing it, because we would like to reserve it for future FAN_PATH_MODIFY pre-content event. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/632d9f80428e2e7a6b6a8ccc2925d87c92bbb518.1731684329.git.josef@toxicpanda.com include/linux/fsnotify_backend.h | 1 + include/uapi/linux/fanotify.h | 1 + 2 files changed, 2 insertions(+) commit 4edcb9f7b7179ef87ca16440da50ff01f05f268c Author: Amir Goldstein <amir73il@gmail.com> Date: Fri Nov 15 10:30:18 2024 -0500 fanotify: rename a misnamed constant FANOTIFY_PIDFD_INFO_HDR_LEN is not the length of the header. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/8776ab90fe538225aeb561c560296bafd16b97c4.1731684329.git.josef@toxicpanda.com fs/notify/fanotify/fanotify_user.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b82c6f5930f65c510f5b6b4b0d7d1913a6dda3db Author: Josef Bacik <josef@toxicpanda.com> Date: Fri Nov 15 10:30:17 2024 -0500 fanotify: don't skip extra event info if no info_mode is set Previously we would only include optional information if you requested it via an FAN_ flag at fanotify_init time (FAN_REPORT_FID for example). However this isn't necessary as the event length is encoded in the metadata, and if the user doesn't want to consume the information they don't have to. With the PRE_ACCESS events we will always generate range information, so drop this check in order to allow this extra information to be exported without needing to have another flag. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/afcbc4e4139dee076ef1757918b037d3b48c3edb.1731684329.git.josef@toxicpanda.com fs/notify/fanotify/fanotify_user.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 318652e07fa5b1743d08eeccd69a1f47f2c15710 Author: Amir Goldstein <amir73il@gmail.com> Date: Fri Nov 15 10:30:16 2024 -0500 fsnotify: check if file is actually being watched for pre-content events on open So far, we set FMODE_NONOTIFY_ flags at open time if we know that there are no permission event watchers at all on the filesystem, but lack of FMODE_NONOTIFY_ flags does not mean that the file is actually watched. For pre-content events, it is possible to optimize things so that we don't bother trying to send pre-content events if file was not watched (through sb, mnt, parent or inode itself) on open. Set FMODE_NONOTIFY_ flags according to that. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/2ddcc9f8d1fde48d085318a6b5a889289d8871d8.1731684329.git.josef@toxicpanda.com fs/notify/fsnotify.c | 29 ++++++++++++++++++++++++++--- include/linux/fsnotify_backend.h | 3 +++ 2 files changed, 29 insertions(+), 3 deletions(-) commit a94204f4d48e28a711b7ed10399f749286c433e3 Author: Amir Goldstein <amir73il@gmail.com> Date: Fri Nov 15 10:30:15 2024 -0500 fsnotify: opt-in for permission events at file open time Legacy inotify/fanotify listeners can add watches for events on inode, parent or mount and expect to get events (e.g. FS_MODIFY) on files that were already open at the time of setting up the watches. fanotify permission events are typically used by Anti-malware sofware, that is watching the entire mount and it is not common to have more that one Anti-malware engine installed on a system. To reduce the overhead of the fsnotify_file_perm() hooks on every file access, relax the semantics of the legacy FAN_ACCESS_PERM event to generate events only if there were *any* permission event listeners on the filesystem at the time that the file was opened. The new semantic is implemented by extending the FMODE_NONOTIFY bit into two FMODE_NONOTIFY_* bits, that are used to store a mode for which of the events types to report. This is going to apply to the new fanotify pre-content events in order to reduce the cost of the new pre-content event vfs hooks. [Thanks to Bert Karwatzki <spasswolf@web.de> for reporting a bug in this code with CONFIG_FANOTIFY_ACCESS_PERMISSIONS disabled] Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/linux-fsdevel/CAHk-=wj8L=mtcRTi=NECHMGfZQgXOp_uix1YVh04fEmrKaMnXA@mail.gmail.com/ Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/5ea5f8e283d1edb55aa79c35187bfe344056af14.1731684329.git.josef@toxicpanda.com fs/notify/fsnotify.c | 38 ++++++++++++++++++++++++++++++++++++++ fs/open.c | 8 +++++++- include/linux/fs.h | 43 ++++++++++++++++++++++++++++++++++++++----- include/linux/fsnotify.h | 39 +++++++++++++++++++++++---------------- 4 files changed, 106 insertions(+), 22 deletions(-) commit f962745289958e89bf520407728e384e52ea8e27 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Dec 6 13:13:23 2024 +0200 clk: renesas: r9a08g045: Add clocks, resets and power domain support for the ADC IP Add clocks, resets and power domains for ADC IP available on the Renesas RZ/G3S SoC. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://lore.kernel.org/20241206111337.726244-2-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/r9a08g045-cpg.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 548f9a3c3eb32dc4e93a947a0d8bd6331bdb8d19 Author: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Date: Fri Dec 6 11:32:38 2024 +0200 clk: renesas: r8a779h0: Add display clocks Add display related clocks for DU, DSI, FCPVD, and VSPD. Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241206-rcar-gh-dsi-v3-5-d74c2166fa15@ideasonboard.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/r8a779h0-cpg-mssr.c | 4 ++++ 1 file changed, 4 insertions(+) commit ee47b94102d2eaed23ac60910003cd0f3fade13c Author: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Date: Mon Dec 2 20:39:16 2024 +0000 clk: renesas: r9a09g057: Add support for PLLVDO, CRU clocks, and resets Add support for the PLLVDO clock and its related CRU clocks and reset entries in the r9a09g057 CPG driver. Introduce `CLK_PLLVDO` and associated clocks like `CLK_PLLVDO_CRU0`, `CLK_PLLVDO_CRU1`, `CLK_PLLVDO_CRU2`, and `CLK_PLLVDO_CRU3`, along with their corresponding dividers. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241202203916.48668-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/r9a09g057-cpg.c | 45 +++++++++++++++++++++++++++++++++++++ drivers/clk/renesas/rzv2h-cpg.h | 6 +++++ 2 files changed, 51 insertions(+) commit 03108a2614ecab46af6e0d66f9fd61c0d80587f2 Author: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Date: Mon Dec 2 20:39:15 2024 +0000 clk: renesas: rzv2h: Add selective Runtime PM support for clocks Update `rzv2h_cpg_attach_dev` to prevent external and core clocks not tied to the power domain from being managed by Runtime PM. This ensures that only clocks originating from the domain are controlled, thereby avoiding unintended handling of external and core clocks. Additionally, introduce a `no_pm` flag in `mod_clock` and `rzv2h_mod_clk` structures to exclude specific clocks from Runtime PM when needed. Some clocks, such as those in the CRU block, require unique enable/disable sequences that are incompatible with standard Runtime PM. For example, the CSI-2 D-PHY clock initialization requires toggling individual clocks, making Runtime PM unsuitable. The helper function `rzv2h_cpg_is_pm_clk()` checks whether a clock should be managed by Runtime PM based on this `no_pm` flag. New macros, such as `DEF_MOD_NO_PM`, allow straightforward declaration of clocks that bypass PM. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241202203916.48668-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/rzv2h-cpg.c | 44 +++++++++++++++++++++++++++++++++++++---- drivers/clk/renesas/rzv2h-cpg.h | 12 ++++++++--- 2 files changed, 49 insertions(+), 7 deletions(-) commit 8b2a89f2388f283c2c50f2a7174b47e8281dba36 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Thu Nov 28 10:11:12 2024 +0100 clk: renesas: r9a06g032: Use BIT macro consistently Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241128091113.24116-3-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/r9a06g032-clocks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b69ca396097028fc2167bcdaa2239190444acba Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Thu Nov 28 10:11:11 2024 +0100 clk: renesas: r9a06g032: Add restart handler The SYSCTRL module also does reset handling. Start supporting that by allowing software resets which can then be utilized by a restart handler. Finally 'reboot' will do something useful on RZ/N1D. Watchdog support to be added later. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241128091113.24116-2-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/r9a06g032-clocks.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit bfd5859709ee72f8a22cb3594eabd275ed030778 Author: Patrick Delaunay <patrick.delaunay@foss.st.com> Date: Tue Nov 19 14:18:34 2024 +0100 cpuidle: psci: Activate GENPD_FLAG_ACTIVE_WAKEUP with OSI Set GENPD_FLAG_ACTIVE_WAKEUP flag for domain psci cpuidle when OSI is activated, then when a device is set as the wake-up source using device_set_wakeup_path, the PSCI power domain could be retained to allow so that the associated device can wake up the system. With this flag, for S2IDLE system-wide suspend, the wake-up path is managed in each device driver and is tested in the power framework: a PSCI domain is only turned off when GENPD_FLAG_ACTIVE_WAKEUP is enabled and the associated device is not in the wake-up path, so PSCI CPUIdle selects the lowest level in the PSCI topology according to the wake-up path. This patch is a preliminary step to support PSCI OSI on the STM32MP25 platform with the D1 domain (power-domain-cluster) for the A35 cortex cluster and for the associated peripherals including EXTI1 which manages the wake-up interrupts for domain D1. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Message-ID: <20241119141827.1.I6129b16ec6b558efc1707861db87e55bf7022f62@changeid> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/cpuidle/cpuidle-psci-domain.c | 1 + 1 file changed, 1 insertion(+) commit b0cf8110843ad2ee4c9665e1f590069108fe1881 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Thu Dec 5 13:53:49 2024 +0100 arm64: dts: renesas: white-hawk-single: Add R-Car Sound support White Hawk Single boards can use the same ARD-AUDIO-DA7212 external audio board as the White Hawk board stack. Add support for building DTBs for them, and document the small differences in connector labels. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/7c840b6e08e0af8a6b9bd5516969eb585f16e10a.1733402907.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/Makefile | 4 ++++ arch/arm64/boot/dts/renesas/white-hawk-ard-audio-da7212.dtso | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) commit b72dc7b9e388e1a5997c1ab3239947ff23fe3f72 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Thu Dec 5 13:53:48 2024 +0100 arm64: dts: renesas: white-hawk-ard-audio: Drop SoC part The White Hawk with ARD-AUDIO-DA7212 external audio board stack is not specific to R8A779G0. Hence rename its DTS file name to drop the "r8a779g0-" prefix. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/0a72c67991828784066f76b61605d2f7913a353c.1733402907.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/Makefile | 4 ++-- ...te-hawk-ard-audio-da7212.dtso => white-hawk-ard-audio-da7212.dtso} | 0 2 files changed, 2 insertions(+), 2 deletions(-) commit bf6b3ccda3e6797c6b7b774726fe29a1c4602e95 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Mon Dec 2 17:30:11 2024 +0100 arm64: dts: renesas: r8a779g3: Add White Hawk Single support The White Hawk Single board with R-Car V4H ES3.0 (R8A779G3) uses an updated version of the R-Car V4H (R8A779G0) SoC. For now, there are no visible differences compared to the variant equipped with an R-Car V4H ES2.0 (R8A779G2) SoC. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/66d0fe78c393e6df2775287c730464e91732ec56.1733156661.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/Makefile | 2 ++ .../boot/dts/renesas/r8a779g3-white-hawk-single.dts | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) commit f7cd4b412020e71ab4c248c908558c67248a8392 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Mon Dec 2 17:30:10 2024 +0100 arm64: dts: renesas: Add R8A779G3 SoC support Add support for the Renesas R-Car V4H ES3.0 (R8A779G3) SoC, which is an updated version of the R-Car V4H (R8A779G0) SoC. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/978c41f932aa2dccd46ad91fc1ddfabacd1c254c.1733156661.git.geert+renesas@glider.be arch/arm64/boot/dts/renesas/r8a779g3.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d43c077cb88d800d0c2a372d70d5af75c6a16356 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Mon Dec 2 17:30:09 2024 +0100 arm64: dts: renesas: Factor out White Hawk Single board support Move the common parts for the Renesas White Hawk Single board to white-hawk-single.dtsi, to enable future reuse. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/1661743b18a9ff9fac716f98a663b39fc8488d7e.1733156661.git.geert+renesas@glider.be .../dts/renesas/r8a779g2-white-hawk-single.dts | 62 +----------------- arch/arm64/boot/dts/renesas/white-hawk-single.dtsi | 73 ++++++++++++++++++++++ 2 files changed, 74 insertions(+), 61 deletions(-) commit 5c3e55ad76cf5eda2cd6cbda56161184888ea463 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Mon Dec 2 17:30:08 2024 +0100 dt-bindings: soc: renesas: Document R8A779G3 White Hawk Single Document the compatible value for the Renesas R-Car V4H ES3.0 (R8A779G3) SoC, as used on the Renesas White Hawk Single board. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/1d2d2a6cbf31c817f574f6eed310a960e6175afe.1733156661.git.geert+renesas@glider.be Documentation/devicetree/bindings/soc/renesas/renesas.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit f71429df70fb0ed5ca90f595f4d0e9cfa23fcf31 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Mon Dec 2 17:30:07 2024 +0100 dt-bindings: soc: renesas: Move R8A779G0 White Hawk up Move the R8A779G0-only White Hawk board stack section up, just below the R8A779G0-only White Hawk CPU section, to improve sort order. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/d553ef4b1f969f72e384f274d42ac7a62fe45fd4.1733156661.git.geert+renesas@glider.be Documentation/devicetree/bindings/soc/renesas/renesas.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a62727cf33e49634d03362800b2edc43538f1913 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Wed Nov 20 09:49:59 2024 +0100 arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor Enable I2C1 for the carrier board and the connected power monitor ISL28022. Limit the bus speed to the maximum the power monitor supports. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://lore.kernel.org/20241120085345.24638-2-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 08811b984f5af8eeda4fb157894fe9bf230ec1e1 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Nov 15 15:43:58 2024 +0200 arm64: dts: renesas: rzg3s-smarc: Fix the debug serial alias The debug serial of the RZ/G3S is SCIF0 which is routed on the Renesas RZ SMARC Carrier II board on the SER3_UART. Use serial3 alias for it for better hardware description. Along with it, the chosen properties were moved to the device tree corresponding to the RZ SMARC Carrier II board. Fixes: adb4f0c5699c ("arm64: dts: renesas: Add initial support for RZ/G3S SMARC SoM") Fixes: d1ae4200bb26 ("arm64: dts: renesas: Add initial device tree for RZ SMARC Carrier-II Board") Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241115134401.3893008-6-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi | 5 ----- arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 7 ++++++- 2 files changed, 6 insertions(+), 6 deletions(-) commit aaf7188d7f77bb8a6e043c70dc6cc6616c427762 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Nov 15 15:43:57 2024 +0200 arm64: dts: renesas: r9a08g045: Add the remaining SCIF interfaces The Renesas RZ/G3S SoC has 6 SCIF interfaces. SCIF0 is used as debug console. Add the remaining ones. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241115134401.3893008-5-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 90 ++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) commit 5b192d06f381ed5508851f1d47768c2e2f8fbcad Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Wed Dec 4 15:01:47 2024 +0100 ARM: shmobile: defconfig: Refresh for v6.13-rc1 Refresh the defconfig for Renesas ARM systems: - Enable RZ DMA Controller support, as used on the Genmai and RSK+RZA1 development boards. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/b8727e642508433016290a998c880b54de2e208d.1733320866.git.geert+renesas@glider.be arch/arm/configs/shmobile_defconfig | 1 + 1 file changed, 1 insertion(+) commit 5ad0a0c7917dc434ee28da765186dabc81172e3c Author: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Date: Tue Nov 12 09:34:12 2024 +0000 arm64: defconfig: Enable Renesas RZ/V2H(P) Watchdog driver Enable the watchdog driver for the Renesas RZ/V2H(P) SoC. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241112093412.20093-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 3f3f0e53e9ae906844e8309fa433b48372f905e1 Author: Cristian Marussi <cristian.marussi@arm.com> Date: Mon Dec 9 16:49:57 2024 +0000 firmware: arm_scmi: Add aliases to transport modules SCMI transports when built as loadable modules should be loaded by the subsystem they plug into, based on the related subsystem specific aliases. Add, where missing, the MODULE_DEVICE_TABLE() directives needed to generate the aliases required to enable autoloading for SCMI transports. Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> Message-Id: <20241209164957.1801886-4-cristian.marussi@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> drivers/firmware/arm_scmi/transports/mailbox.c | 1 + drivers/firmware/arm_scmi/transports/smc.c | 1 + drivers/firmware/arm_scmi/transports/virtio.c | 1 + 3 files changed, 3 insertions(+) commit d4cc8912cbff4990940b33cc61a9b09ddaee9704 Author: Cristian Marussi <cristian.marussi@arm.com> Date: Mon Dec 9 16:49:56 2024 +0000 firmware: arm_scmi: Add module aliases to i.MX vendor protocols Using the pattern 'scmi-protocol-0x<PROTO_ID>-<VEND_ID>' as MODULE_ALIAS allows the SCMI core to autoload this protocol, if built as a module, when its protocol operations are requested by an SCMI driver. Cc: Peng Fan <peng.fan@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> Message-Id: <20241209164957.1801886-3-cristian.marussi@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> drivers/firmware/arm_scmi/vendors/imx/imx-sm-bbm.c | 5 +++-- drivers/firmware/arm_scmi/vendors/imx/imx-sm-misc.c | 5 +++-- include/linux/scmi_imx_protocol.h | 9 +++++---- 3 files changed, 11 insertions(+), 8 deletions(-) commit 54cf6e786caa29e125f34a3cf33bc7cfa3aa74da Author: Cristian Marussi <cristian.marussi@arm.com> Date: Mon Dec 9 16:49:55 2024 +0000 firmware: arm_scmi: Support vendor protocol modules autoloading SCMI vendor protocols namespace is shared amongst all vendors so that there can be multiple implementation for the same protocol ID by different vendors, exposing completely different functionalities and used by distinct SCMI vendor drivers. For these reasons, at runtime, when some driver asks for a protocol, the proper implementation to use is chosen based on the SCMI vendor/subvendor/ impl_version data as advertised by the platform SCMI server and gathered from the SCMI core during stack initialization: this enables proper runtime selection of vendor protocols even when many different protocols from different vendors are built into the same image via a common defconfig. This same selection mechanism works similarly well even when all the vendor protocols are compiled as loadable modules, as long as all such required protocol modules have been previously loaded by some other means. Add support for the automatic loading of vendor protocol modules, based on protocol/vendor IDs, when an SCMI driver attempts to use such a protocol. Reported-by: Johan Hovold <johan+linaro@kernel.org> Closes: https://lore.kernel.org/lkml/ZytnRc94iKUfMYH0@hovoldconsulting.com/ Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> Message-Id: <20241209164957.1801886-2-cristian.marussi@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> drivers/firmware/arm_scmi/driver.c | 56 +++++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 10 deletions(-) commit aee2ae1423a2f147d28075499af5d9bf063774c5 Author: Stefan Wahren <wahrenst@gmx.net> Date: Mon Dec 2 12:51:40 2024 +0100 mmc: bcm2835: add suspend/resume pm support Add a minimalistic suspend/resume PM support. Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Message-ID: <20241202115140.33492-1-wahrenst@gmx.net> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/bcm2835.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 634717a2b89a9b2a18af569ddb44ed3cc7de0ec9 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Sat Nov 30 10:47:58 2024 +0100 dt-bindings: Drop Bhupesh Sharma from maintainers For more than a year all emails to Bhupesh Sharma's Linaro emails bounce and there were no updates to mailmap. No reviews from Bhupesh, either, so change the maintainer to Bjorn and Konrad (Qualcomm SoC maintainers). Cc: Bhupesh Sharma <bhupesh.linux@gmail.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Konrad Dybcio <konradybcio@kernel.org> Message-ID: <20241130094758.15553-1-krzysztof.kozlowski@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 3 ++- Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 3 ++- Documentation/devicetree/bindings/net/qcom,ethqos.yaml | 3 ++- Documentation/devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) commit 65169604e8d00308c23d66d02a70d67a5e4ff68c Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Mon Nov 18 08:29:07 2024 +0100 mmc: core: don't include 'pm_wakeup.h' directly The header clearly states that it does not want to be included directly, only via 'device.h'. 'platform_device.h' works equally well. Remove the direct inclusion. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Message-ID: <20241118072917.3853-9-wsa+renesas@sang-engineering.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/core/core.c | 1 - drivers/mmc/core/host.c | 1 - 2 files changed, 2 deletions(-) commit 02fcf9c9e237e3a8c31cacf67dbb0366b78a7e4f Author: Andy-ld Lu <andy-ld.lu@mediatek.com> Date: Tue Nov 26 20:48:23 2024 +0800 mmc: mtk-sd: Add support for ignoring cmd response CRC The current process flow does not handle MMC requests that are indicated to ignore the command response CRC. For instance, cmd12 and cmd48 from mmc_cqe_recovery() are marked to ignore CRC, but they are not matched to the appropriate response type in msdc_cmd_find_resp(). As a result, they are defaulted to 'MMC_RSP_NONE', which means no response is expected. This commit applies the flag 'MMC_RSP_R1B_NO_CRC' to fix the response type setting in msdc_cmd_find_resp() and adds the logic to ignore CRC in msdc_cmd_done(). Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Andy-ld Lu <andy-ld.lu@mediatek.com> Message-ID: <20241126125041.16071-3-andy-ld.lu@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/mtk-sd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ed97550d470d00ebafe9de888fd100cb82d3abb6 Author: Andy-ld Lu <andy-ld.lu@mediatek.com> Date: Tue Nov 26 20:48:22 2024 +0800 mmc: core: Introduce the MMC_RSP_R1B_NO_CRC response The R1B response type with ignoring CRC is used in the mmc_cqe_recovery(), introduce the MMC_RSP_R1B_NO_CRC response type to simplify the code. Signed-off-by: Andy-ld Lu <andy-ld.lu@mediatek.com> Message-ID: <20241126125041.16071-2-andy-ld.lu@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/core/core.c | 6 ++---- include/linux/mmc/core.h | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) commit ea79df10331218b04d90f028a605f33c879c518d Author: Ulf Hansson <ulf.hansson@linaro.org> Date: Mon Nov 25 14:23:11 2024 +0100 mmc: core: Drop the MMC_RSP_R1_NO_CRC response The MMC_RSP_R1_NO_CRC type of response is not being used by the mmc core for any commands. Let's therefore drop it, together with the corresponding code in the host drivers. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com> # for TMIO Reviewed-by: Avri Altman <avri.altman@wdc.com> Message-ID: <20241125132311.23939-1-ulf.hansson@linaro.org> drivers/mmc/host/rtsx_pci_sdmmc.c | 2 -- drivers/mmc/host/rtsx_usb_sdmmc.c | 3 --- drivers/mmc/host/tmio_mmc_core.c | 1 - include/linux/mmc/core.h | 3 --- 4 files changed, 9 deletions(-) commit 0202dfbdc5dea70e213205aa42ab49a1a08aad3a Author: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com> Date: Mon Nov 25 10:33:56 2024 +0200 mmc: sdhci-esdhc-imx: enable 'SDHCI_QUIRK_NO_LED' quirk for S32G Enable SDHCI_QUIRK_NO_LED quirk for S32G2/S32G3 variants as the controller does not have a LED signal line. Signed-off-by: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Haibo Chen <haibo.chen@nxp.com> Message-ID: <20241125083357.1041949-1-ciprianmarian.costea@oss.nxp.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/sdhci-esdhc-imx.c | 1 + 1 file changed, 1 insertion(+) commit 8593b6871314cff8200308cbc6a1cf6da3fbf356 Author: Dharma Balasubiramani <dharma.b@microchip.com> Date: Tue Nov 19 09:40:10 2024 -0700 dt-bindings: mmc: atmel,sama5d2-sdhci: add microchip,sama7d65-sdhci Add mmc binding documentation for SAMA7D65. Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com> Message-ID: <e9e9e4cf0753422706bdc44fe7d20ca3a686ce7a.1732030972.git.Ryan.Wanner@microchip.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Documentation/devicetree/bindings/mmc/atmel,sama5d2-sdhci.yaml | 1 + 1 file changed, 1 insertion(+) commit 5feebfb4b34c18411d699e64247111221e3c4abc Author: Rob Herring (Arm) <robh@kernel.org> Date: Wed Nov 13 16:56:01 2024 -0600 dt-bindings: mmc: marvell,xenon-sdhci: Simplify Armada 3700 if/then schema Properties are supposed to be defined in the top-level schema and then disallowed in an if/then schema if necessary. Move the "marvell,pad-type" property to follow this. "reg" can also be similarly described at the top-level with only the number of entries restricted in the if/then schema. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> Message-ID: <20241113225602.1782573-1-robh@kernel.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> .../bindings/mmc/marvell,xenon-sdhci.yaml | 48 ++++++++++------------ 1 file changed, 22 insertions(+), 26 deletions(-) commit a2a44f8da29352f76c99c6904ee652911b8dc7dd Author: Shawn Lin <shawn.lin@rock-chips.com> Date: Fri Nov 22 17:37:22 2024 +0800 mmc: core: Respect quirk_max_rate for non-UHS SDIO card The card-quirk was added to limit the clock-rate for a card with UHS-mode support, although let's respect the quirk for non-UHS mode too, to make the behaviour consistent. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Message-ID: <1732268242-72799-1-git-send-email-shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/core/sdio.c | 2 ++ 1 file changed, 2 insertions(+) commit 35aafa1d41cee0d3d50164561bca34befc1d9ce3 Author: Ard Biesheuvel <ardb@kernel.org> Date: Mon Dec 9 10:41:06 2024 +0100 x86/boot/64: Fix spurious undefined reference when CONFIG_X86_5LEVEL=n, on GCC-12 In __startup_64(), the bool 'la57' can only assume the 'true' value if CONFIG_X86_5LEVEL is enabled in the build, and generally, the compiler can make this inference at build time, and elide any references to the symbol 'level4_kernel_pgt', which may be undefined if 'la57' is false. As it turns out, GCC 12 gets this wrong sometimes, and gives up with a build error: ld: arch/x86/kernel/head64.o: in function `__startup_64': head64.c:(.head.text+0xbd): undefined reference to `level4_kernel_pgt' even though the reference is in unreachable code. Fix this by duplicating the IS_ENABLED(CONFIG_X86_5LEVEL) in the conditional that tests the value of 'la57'. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20241209094105.762857-2-ardb+git@google.com Closes: https://lore.kernel.org/oe-kbuild-all/202412060403.efD8Kgb7-lkp@intel.com/ arch/x86/kernel/head64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 481d363748b2df881df21569f3697b3c7fcf8fc1 Author: Tony Luck <tony.luck@intel.com> Date: Fri Dec 6 08:31:43 2024 -0800 x86/resctrl: Modify update_mba_bw() to use per CTRL_MON group event update_mba_bw() hard codes use of the memory bandwidth local event which prevents more flexible options from being deployed. Change this function to use the event specified in the rdtgroup that is being processed. Mount time checks for the "mba_MBps" option ensure that local memory bandwidth is enabled. So drop the redundant is_mbm_local_enabled() check. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Tested-by: Babu Moger <babu.moger@amd.com> Link: https://lore.kernel.org/r/20241206163148.83828-4-tony.luck@intel.com arch/x86/kernel/cpu/resctrl/monitor.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 3b49c37a2f4657730dd38a050b9d221363889dea Author: Tony Luck <tony.luck@intel.com> Date: Fri Dec 6 08:31:42 2024 -0800 x86/resctrl: Prepare for per-CTRL_MON group mba_MBps control Resctrl uses local memory bandwidth event as input to the feedback loop when the mba_MBps mount option is used. This means that this mount option cannot be used on systems that only support monitoring of total bandwidth. Prepare to allow users to choose the input event independently for each CTRL_MON group by adding a global variable "mba_mbps_default_event" used to set the default event for each CTRL_MON group, and a new field "mba_mbps_event" in struct rdtgroup to track which event is used for each CTRL_MON group. Notes: 1) Both of these are only used when the user mounts the filesystem with the "mba_MBps" option. 2) Only check for support of local bandwidth event when initializing mba_mbps_default_event. Support for total bandwidth event can be added after other routines in resctrl have been updated to handle total bandwidth event. [ bp: Move mba_mbps_default_event extern into the arch header. ] Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Tested-by: Babu Moger <babu.moger@amd.com> Link: https://lore.kernel.org/r/20241206163148.83828-3-tony.luck@intel.com arch/x86/kernel/cpu/resctrl/core.c | 3 +++ arch/x86/kernel/cpu/resctrl/internal.h | 4 +++- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 13 +++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) commit fbef60de6c753253e1337ea60cf818d079108974 Author: Chiara Meiohas <cmeiohas@nvidia.com> Date: Tue Dec 3 15:57:11 2024 +0200 RDMA/mlx5: Extend ODP statistics with operation count The current ODP counters represent the total number of pages handled, but it is not enough to understand the effectiveness of these operations. Extend the ODP counters to include the number of times page fault and invalidation events were handled. Example for a single page fault handling 512 pages: - page_fault: incremented by 512 (total pages) - page_fault_handled: incremented by 1 (operation count) The same example is applicable for page invalidation too. Previous output: $ rdma stat mr dev rocep8s0f0 mrn 8 page_faults 27 page_invalidations 0 page_prefetch 29 New output: $ rdma stat mr dev rocep8s0f0 mrn 21 page_faults 512 page_faults_handled 1 page_invalidations 0 page_invalidations_handled 0 page_prefetch 51200 Signed-off-by: Chiara Meiohas <cmeiohas@nvidia.com> Reviewed-by: Michael Guralnik <michaelgur@nvidia.com> Link: https://patch.msgid.link/b18f29ed1392996ade66e9e6c45f018925253f6a.1733234165.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/infiniband/hw/mlx5/mlx5_ib.h | 6 ++++++ drivers/infiniband/hw/mlx5/odp.c | 6 +++--- drivers/infiniband/hw/mlx5/restrack.c | 9 +++++++++ include/rdma/ib_verbs.h | 2 ++ 4 files changed, 20 insertions(+), 3 deletions(-) commit f5afe060b1031a5838bc3b0cb91f4c66a5cbf151 Author: Leon Romanovsky <leon@kernel.org> Date: Tue Dec 3 15:42:26 2024 +0200 RDMA/mlx4: Use DMA iterator to write MTT Replace an open coding of rdma_umem_for_each_dma_block() with the proper function. Link: https://patch.msgid.link/0bf595962c964fb8918743405acf9103a5a85983.1733233299.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky <leonro@nvidia.com> drivers/infiniband/hw/mlx4/mr.c | 119 +++------------------------------------- 1 file changed, 8 insertions(+), 111 deletions(-) commit d31ba16c4331d1f8261c757647b141b3ed9b6e52 Author: Leon Romanovsky <leon@kernel.org> Date: Tue Dec 3 15:42:25 2024 +0200 RDMA/mlx4: Use ib_umem_find_best_pgsz() to calculate MTT size Convert mlx4 to use ib_umem_find_best_pgsz() instead of open-coded variant to calculate MTT size. Link: https://patch.msgid.link/c39ec6f5d4664c439a72f2961728ebb5895a9f07.1733233299.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky <leonro@nvidia.com> drivers/infiniband/hw/mlx4/cq.c | 6 +- drivers/infiniband/hw/mlx4/mlx4_ib.h | 18 +++- drivers/infiniband/hw/mlx4/mr.c | 167 +---------------------------------- drivers/infiniband/hw/mlx4/qp.c | 12 ++- 4 files changed, 35 insertions(+), 168 deletions(-) commit 1f53d88cbb0dcc7df235bf6611ae632b254fccd8 Author: Leon Romanovsky <leon@kernel.org> Date: Tue Dec 3 15:44:25 2024 +0200 RDMA/mlx4: Avoid false error about access to uninitialized gids array Smatch generates the following false error report: drivers/infiniband/hw/mlx4/main.c:393 mlx4_ib_del_gid() error: uninitialized symbol 'gids'. Traditionally, we are not changing kernel code and asking people to fix the tools. However in this case, the fix can be done by simply rearranging the code to be more clear. Fixes: e26be1bfef81 ("IB/mlx4: Implement ib_device callbacks") Link: https://patch.msgid.link/6a3a1577463da16962463fcf62883a87506e9b62.1733233426.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky <leonro@nvidia.com> drivers/infiniband/hw/mlx4/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 26f6e91fa29a58fdc76b47f94f8f6027944a490c Author: Chen-Yu Tsai <wenst@chromium.org> Date: Fri Oct 25 15:56:28 2024 +0800 arm64: dts: mediatek: mt8183: Disable DSI display output by default Most SoC dtsi files have the display output interfaces disabled by default, and only enabled on boards that utilize them. The MT8183 has it backwards: the display outputs are left enabled by default, and only disabled at the board level. Reverse the situation for the DSI output so that it follows the normal scheme. For ease of backporting the DPI output is handled in a separate patch. Fixes: 88ec840270e6 ("arm64: dts: mt8183: Add dsi node") Fixes: 19b6403f1e2a ("arm64: dts: mt8183: add mt8183 pumpkin board") Cc: stable@vger.kernel.org Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Fei Shao <fshao@chromium.org> Link: https://lore.kernel.org/r/20241025075630.3917458-2-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts | 4 ---- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) commit 93a680af46436780fd64f4e856a4cfa8b393be6e Author: Chen-Yu Tsai <wenst@chromium.org> Date: Fri Oct 25 15:56:27 2024 +0800 arm64: dts: mediatek: mt8183: Disable DPI display output by default This reverts commit 377548f05bd0905db52a1d50e5b328b9b4eb049d. Most SoC dtsi files have the display output interfaces disabled by default, and only enabled on boards that utilize them. The MT8183 has it backwards: the display outputs are left enabled by default, and only disabled at the board level. Reverse the situation for the DPI output so that it follows the normal scheme. For ease of backporting the DSI output is handled in a separate patch. Fixes: 009d855a26fd ("arm64: dts: mt8183: add dpi node to mt8183") Fixes: 377548f05bd0 ("arm64: dts: mediatek: mt8183-kukui: Disable DPI display interface") Cc: stable@vger.kernel.org Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Fei Shao <fshao@chromium.org> Link: https://lore.kernel.org/r/20241025075630.3917458-1-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 5 ----- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) commit 08d312c944095df2b73e9959c2bb16073820ecdd Author: Leonard Göhrs <l.goehrs@pengutronix.de> Date: Tue Nov 19 12:35:03 2024 +0100 ARM: dts: stm32: lxa-tac: Add support for generation 3 devices Add support for the lxa-tac generation 3 board based on the STM32MP153c. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm/boot/dts/st/Makefile | 1 + arch/arm/boot/dts/st/stm32mp153c-lxa-tac-gen3.dts | 267 ++++++++++++++++++++++ 2 files changed, 268 insertions(+) commit b4f063ba74202564786b38fb822c4bd79d443f56 Author: Leonard Göhrs <l.goehrs@pengutronix.de> Date: Tue Nov 19 12:35:02 2024 +0100 ARM: dts: stm32: lxa-tac: move adc and gpio{e,g} to gen{1,2} boards This is a preparation patch in order to add lxa-tac generation 3 board. As the gen3 board has a different adc and gpio{e,g} setups, move these from the stm32mp15xc-lxa-tac.dtsi to the gen{1,2}.dts files. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm/boot/dts/st/stm32mp157c-lxa-tac-gen1.dts | 84 +++++++++++++++++++++++ arch/arm/boot/dts/st/stm32mp157c-lxa-tac-gen2.dts | 84 +++++++++++++++++++++++ arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi | 84 ----------------------- 3 files changed, 168 insertions(+), 84 deletions(-) commit 8f5f7d065b3842e2014729be3c7274e1e0128cf7 Author: Leonard Göhrs <l.goehrs@pengutronix.de> Date: Tue Nov 19 12:35:01 2024 +0100 dt-bindings: arm: stm32: add compatible strings for Linux Automation LXA TAC gen 3 The Linux Automation LXA TAC generation 3 is built around an OSD32MP153x SiP with CPU, RAM, PMIC, Oscillator and EEPROM. LXA TACs are a development tool for embedded devices with a focus on embedded Linux devices. Add compatible for the generation 3 based on the STM32MP153c. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> Documentation/devicetree/bindings/arm/stm32/stm32.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit 0407c432aec49397d8a81c535b27d7a430ad78ec Author: Leonard Göhrs <l.goehrs@pengutronix.de> Date: Tue Nov 19 12:35:00 2024 +0100 ARM: dts: stm32: lxa-tac: adjust USB gadget fifo sizes for multi function Allow providing the Ethernet and mass storage functions on the USB peripheral port at the same time. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 4f1d50488feef32a413a765ada80217d0ecc5190 Author: Leonard Göhrs <l.goehrs@pengutronix.de> Date: Tue Nov 19 12:34:59 2024 +0100 ARM: dts: stm32: lxa-tac: extend the alias table Some of the userspace software and tests depend on the can/i2c/spi devices having the same name on every boot. This may not always be the case based on e.g. parallel probe order. Assign static device numbers to all can/i2c/spi devices. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2cb11e22820cddd276a556b03e9cfdfbee6bbb5d Author: Leonard Göhrs <l.goehrs@pengutronix.de> Date: Tue Nov 19 12:34:58 2024 +0100 ARM: dts: stm32: lxa-tac: disable the real time clock The RTC was enabled under the false assumption that the SoM already contains a suitable 32.768 kHz crystal. It does however not contain such a crystal and since none is fitted externally to the SoM the RTC can not be used on the hardware. Reflect that in the devicetree. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi | 4 ---- 1 file changed, 4 deletions(-) commit 4ea654242e0c75bdf6b45d3c619c5fdcb2e9312a Author: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Date: Fri Dec 6 18:17:59 2024 +0100 ARM: dts: stm32: Fix IPCC EXTI declaration on stm32mp151 The GIC IRQ type used for IPCC RX should be IRQ_TYPE_LEVEL_HIGH. Replacing the interrupt with the EXTI event changes the type to the numeric value 1, meaning IRQ_TYPE_EDGE_RISING. The issue is that EXTI event 61 is a direct event.The IRQ type of direct events is not used by EXTI and is propagated to the parent IRQ controller of EXTI, the GIC. Align the IRQ type to the value expected by the GIC by replacing the second parameter "1" with IRQ_TYPE_LEVEL_HIGH. Fixes: 7d9802bb0e34 ("ARM: dts: stm32: remove the IPCC "wakeup" IRQ on stm32mp151") Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm/boot/dts/st/stm32mp151.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 983804ec0d10b8796f76442d66f36d2a6953ba01 Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:20 2024 -0500 fpga: dfl: afu: define local pointer to feature device Define local pointer to pdata->dev->dev to avoid repetition. Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-5-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl-afu-dma-region.c | 9 +++++---- drivers/fpga/dfl-afu-region.c | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) commit 3a3494ef987e447867187d2706c97d7c0ce45e36 Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:19 2024 -0500 fpga: dfl: afu: use parent device to log errors on port enable/disable AFU port enable/disable may be triggered from userspace at any point, e.g., after a port has been released. This commit prepares a subsequent commit that destroys the port platform device on port release, which is then no longer available during port enable/disable. Use the parent, physical DFL, e.g., PCIe FPGA device instead for logging errors. Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-4-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl-afu-main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d4970a9d9ba3c7d51a3fad91b6db09577af5bafe Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:18 2024 -0500 fpga: dfl: return platform data from dfl_fpga_inode_to_feature_dev_data() Refactor dfl_fpga_inode_to_feature_dev() to directly return the feature device platform data instead of the platform device, and retrieve the device from the data. The null pointer checks are not needed since the platform device is guaranteed to have associated feature device data. This patch is part of a refactoring of the internal DFL APIs to move the feature device data into a new struct dfl_feature_dev_data which lifetime is independent of the corresponding platform device. Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-3-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl-afu-main.c | 8 ++------ drivers/fpga/dfl-fme-main.c | 7 ++----- drivers/fpga/dfl.h | 6 +++--- 3 files changed, 7 insertions(+), 14 deletions(-) commit 958d8c70024e6123f85b46f60dcb889c60e6bcff Author: Peter Colberg <peter.colberg@intel.com> Date: Tue Nov 19 20:10:17 2024 -0500 fpga: dfl: omit unneeded argument pdata from dfl_feature_instance_init() The argument pdata passed to dfl_feature_instance_init() was never used. Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20241120011035.230574-2-peter.colberg@intel.com Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> drivers/fpga/dfl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 72914faebaabd77d8a471af4662ca0b938011c49 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:20:56 2024 -0800 MAINTAINERS: add entry for CRC library I am volunteering to maintain the kernel's CRC library code. Ard has volunteered to be a reviewer. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20241202012056.209768-13-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> MAINTAINERS | 11 +++++++++++ 1 file changed, 11 insertions(+) commit db1fda2d4cd44234a77e134b79a7f03fdf3d8c8c Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:20:55 2024 -0800 powerpc/crc: delete obsolete crc-vpmsum_test.c Delete crc-vpmsum_test.c, since its functionality is now covered by the new crc_kunit.c as well as the crypto subsystem's fuzz tests. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Cc: Vinicius Peixoto <vpeixoto@lkcamp.dev> Link: https://lore.kernel.org/r/20241202012056.209768-12-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/powerpc/configs/ppc64_defconfig | 1 - arch/powerpc/crypto/Kconfig | 9 --- arch/powerpc/crypto/Makefile | 1 - arch/powerpc/crypto/crc-vpmsum_test.c | 133 ---------------------------------- 4 files changed, 144 deletions(-) commit 87fe0a131001ebadda9970c6341cc05c5e417506 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:20:54 2024 -0800 lib/crc32test: delete obsolete crc32test.c Delete crc32test.c, since it has been superseded by crc_kunit.c. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # m68k Cc: Vinicius Peixoto <vpeixoto@lkcamp.dev> Link: https://lore.kernel.org/r/20241202012056.209768-11-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/m68k/configs/amiga_defconfig | 1 - arch/m68k/configs/apollo_defconfig | 1 - arch/m68k/configs/atari_defconfig | 1 - arch/m68k/configs/bvme6000_defconfig | 1 - arch/m68k/configs/hp300_defconfig | 1 - arch/m68k/configs/mac_defconfig | 1 - arch/m68k/configs/multi_defconfig | 1 - arch/m68k/configs/mvme147_defconfig | 1 - arch/m68k/configs/mvme16x_defconfig | 1 - arch/m68k/configs/q40_defconfig | 1 - arch/m68k/configs/sun3_defconfig | 1 - arch/m68k/configs/sun3x_defconfig | 1 - arch/s390/configs/debug_defconfig | 1 - lib/Kconfig | 9 - lib/Makefile | 1 - lib/crc32test.c | 852 ----------------------------------- 16 files changed, 875 deletions(-) commit f04be1dddc70fcdd01497d66786e748106271eb6 Author: Herbert Xu <herbert@gondor.apana.org.au> Date: Fri Nov 29 17:11:33 2024 +0800 crypto: sig - Set maskset to CRYPTO_ALG_TYPE_MASK As sig is now a standalone type, it no longer needs to have a wide mask that includes akcipher. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> crypto/sig.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit db092e515d862e23307c6b6a3ebd7e4fd46f887f Author: Herbert Xu <herbert@gondor.apana.org.au> Date: Fri Nov 29 13:54:54 2024 +0800 MAINTAINERS: Move rhashtable over to linux-crypto This patch moves the rhashtable mailing list over to linux-crypto. This would allow rhashtable patches to go through my tree instead of the networking tree. More uses are popping up outside of the network stack and having it under the networking tree no longer makes sense. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73a7496c218b7ca19ba276f54758e7f0adf269c5 Author: Gaurav Jain <gaurav.jain@nxp.com> Date: Tue Nov 26 12:16:07 2024 +0530 crypto: caam - use JobR's space to access page 0 regs On iMX8DXL/QM/QXP(SECO) & iMX8ULP(ELE) SoCs, access to controller region(CAAM page 0) is not permitted from non secure world. use JobR's register space to access page 0 registers. Fixes: 6a83830f649a ("crypto: caam - warn if blob_gen key is insecure") Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Reviewed-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/caam/blob_gen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4e6ccd94bd9310f67418b522cb92c487a45a166c Author: Yuvaraj Ranganathan <quic_yrangana@quicinc.com> Date: Mon Nov 25 16:49:22 2024 +0530 dt-bindings: crypto: qcom-qce: document the QCS8300 crypto engine Document the crypto engine on the QCS8300 Platform. Acked-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Yuvaraj Ranganathan <quic_yrangana@quicinc.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 1 + 1 file changed, 1 insertion(+) commit 4a36b76bfc9270544631b3de38a7a49ad06aa9ff Author: Yuvaraj Ranganathan <quic_yrangana@quicinc.com> Date: Mon Nov 25 12:28:00 2024 +0530 dt-bindings: crypto: ice: document the qcs8300 inline crypto engine Add the compatible string for QCom ICE on qcs8300 SoCs. Signed-off-by: Yuvaraj Ranganathan <quic_yrangana@quicinc.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml | 1 + 1 file changed, 1 insertion(+) commit 9a11fba9fc977887201cef8b6dbdecb93d0f20e3 Author: Yuvaraj Ranganathan <quic_yrangana@quicinc.com> Date: Mon Nov 25 12:13:16 2024 +0530 dt-bindings: crypto: qcom,prng: document QCS8300 Document QCS8300 compatible for the True Random Number Generator. Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Yuvaraj Ranganathan <quic_yrangana@quicinc.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Documentation/devicetree/bindings/crypto/qcom,prng.yaml | 1 + 1 file changed, 1 insertion(+) commit 771ba5c982a28ede1d33de9702c0f3501f1f9e1c Author: Weili Qian <qianweili@huawei.com> Date: Fri Nov 15 19:26:51 2024 +0800 crypto: hisilicon/zip - support new error report The error detection of the data aggregation feature is separated from the compression/decompression feature. This patch enables the error detection and reporting of the data aggregation feature. When an unrecoverable error occurs in the algorithm core, the device reports the error to the driver, and the driver will reset the device. Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/hisilicon/hpre/hpre_main.c | 12 ++ drivers/crypto/hisilicon/qm.c | 46 +++++-- drivers/crypto/hisilicon/sec2/sec_main.c | 12 ++ drivers/crypto/hisilicon/zip/dae_main.c | 192 ++++++++++++++++++++++++++++++ drivers/crypto/hisilicon/zip/zip.h | 6 + drivers/crypto/hisilicon/zip/zip_main.c | 36 +++++- include/linux/hisi_acc_qm.h | 2 + 7 files changed, 292 insertions(+), 14 deletions(-) commit 09463346b6c23672cdd451f500d2a23b792bd6f0 Author: Weili Qian <qianweili@huawei.com> Date: Fri Nov 15 19:26:50 2024 +0800 crypto: hisilicon/zip - add data aggregation feature The zip device adds data aggregation feature, data with the same key can be combined. This patch enables the device data aggregation feature. New feature is called "hashagg" name and registered to the uacce subsystem to allow applications to submit data aggregation operations in user space. Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/hisilicon/qm.c | 12 +++--- drivers/crypto/hisilicon/zip/Makefile | 2 +- drivers/crypto/hisilicon/zip/dae_main.c | 70 +++++++++++++++++++++++++++++++++ drivers/crypto/hisilicon/zip/zip.h | 2 + drivers/crypto/hisilicon/zip/zip_main.c | 15 +++++-- include/linux/hisi_acc_qm.h | 3 ++ 6 files changed, 93 insertions(+), 11 deletions(-) commit b7685262884c9aaedd622fab974c0820b62eb608 Author: Herbert Xu <herbert@gondor.apana.org.au> Date: Fri Nov 15 09:56:28 2024 +0800 crypto: api - Call crypto_schedule_test outside of mutex There is no need to hold the crypto mutex when scheduling a self- test. In fact prior to the patch introducing asynchronous testing, this was done outside of the locked area. Move the crypto_schedule_test call back out of the locked area. Also move crypto_remove_final to the else branch under the schedule- test call as the list of algorithms to be removed is non-empty only when the test larval is NULL (i.e., testing is disabled). Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> crypto/algapi.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 8dd458cbc5be9ce4427ffce7a9dcdbff4dfc4ac9 Author: Herbert Xu <herbert@gondor.apana.org.au> Date: Fri Nov 15 09:29:02 2024 +0800 crypto: api - Fix boot-up self-test race During the boot process self-tests are postponed so that all algorithms are registered when the test starts. In the event that algorithms are still being registered during these tests, which can occur either because the algorithm is registered at late_initcall, or because a self-test itself triggers the creation of an instance, some self-tests may never start at all. Fix this by setting the flag at the start of crypto_start_tests. Note that this race is theoretical and has never been observed in practice. Fixes: adad556efcdd ("crypto: api - Fix built-in testing dependency failures") Signed-off-by: Herbert Xu <herbert.xu@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> crypto/algapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 15589bda46830695a3261518bb7627afac61f519 Author: Chen Ridong <chenridong@huawei.com> Date: Mon Nov 11 01:28:27 2024 +0000 crypto: tegra - do not transfer req when tegra init fails The tegra_cmac_init or tegra_sha_init function may return an error when memory is exhausted. It should not transfer the request when they return an error. Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver") Signed-off-by: Chen Ridong <chenridong@huawei.com> Acked-by: Akhil R <akhilrajeev@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/tegra/tegra-se-aes.c | 7 +++++-- drivers/crypto/tegra/tegra-se-hash.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) commit 3a7a53c8d4813ef510a731f529b8c58208ab8896 Author: Zhu Jun <zhujun2@cmss.chinamobile.com> Date: Wed Dec 4 00:01:49 2024 -0800 selftests/powerpc: Fix typo in test-vphn.c The word 'accross' is wrong, so fix it. Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241204080149.11759-1-zhujun2@cmss.chinamobile.com tools/testing/selftests/powerpc/vphn/test-vphn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9a71ca13f71bf0d32664a1e7d1f00378811d59c Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Sat Dec 7 17:48:28 2024 +0100 scsi: Constify struct pci_device_id 'struct pci_device_id' is not modified in these drivers. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 70237 9137 320 79694 1374e drivers/scsi/3w-9xxx.o After: ===== text data bss dec hex filename 70461 8913 320 79694 1374e drivers/scsi/3w-9xxx.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/fc61b1946488c1ea8f7a17a06cf40fbd05dcc6de.1733590049.git.christophe.jaillet@wanadoo.fr Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/3w-9xxx.c | 2 +- drivers/scsi/3w-sas.c | 2 +- drivers/scsi/3w-xxxx.c | 2 +- drivers/scsi/BusLogic.c | 2 +- drivers/scsi/a100u2w.c | 2 +- drivers/scsi/advansys.c | 2 +- drivers/scsi/am53c974.c | 2 +- drivers/scsi/arcmsr/arcmsr_hba.c | 2 +- drivers/scsi/atp870u.c | 2 +- drivers/scsi/cxlflash/main.c | 2 +- drivers/scsi/dc395x.c | 2 +- drivers/scsi/dmx3191d.c | 2 +- drivers/scsi/elx/efct/efct_driver.c | 2 +- drivers/scsi/fdomain_pci.c | 2 +- drivers/scsi/fnic/fnic_main.c | 2 +- drivers/scsi/hptiop.c | 2 +- drivers/scsi/initio.c | 2 +- drivers/scsi/ipr.c | 2 +- drivers/scsi/megaraid.c | 2 +- drivers/scsi/megaraid/megaraid_mbox.c | 2 +- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- drivers/scsi/mvsas/mv_init.c | 2 +- drivers/scsi/nsp32.c | 2 +- drivers/scsi/pm8001/pm8001_init.c | 2 +- drivers/scsi/pmcraid.c | 2 +- drivers/scsi/qedi/qedi_main.c | 2 +- drivers/scsi/qla1280.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 2 +- drivers/scsi/qla4xxx/ql4_os.c | 2 +- drivers/scsi/snic/snic_main.c | 2 +- drivers/scsi/stex.c | 2 +- drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +- 32 files changed, 32 insertions(+), 32 deletions(-) commit 6cb7063feb2eff2e52dc9624b2193a1f4cad69bf Author: Michael Kelley <mhklinux@outlook.com> Date: Wed Oct 2 20:53:32 2024 -0700 scsi: storvsc: Don't assume cpu_possible_mask is dense Current code allocates the stor_chns array with size num_possible_cpus(). This code assumes cpu_possible_mask is dense, which is not true in the general case per [1]. If cpu_possible_mask is sparse, the array might be indexed by a value beyond the size of the array. However, the configurations that Hyper-V provides to guest VMs on x86 and ARM64 hardware, in combination with how architecture specific code assigns Linux CPU numbers, *does* always produce a dense cpu_possible_mask. So the dense assumption is not currently causing failures. But for robustness against future changes in how cpu_possible_mask is populated, update the code to no longer assume dense. The correct approach is to allocate and initialize the array using size "nr_cpu_ids". While this leaves unused array entries corresponding to holes in cpu_possible_mask, the holes are assumed to be minimal and hence the amount of memory wasted by unused entries is minimal. [1] https://lore.kernel.org/lkml/SN6PR02MB4157210CC36B2593F8572E5ED4692@SN6PR02MB4157.namprd02.prod.outlook.com/ Signed-off-by: Michael Kelley <mhklinux@outlook.com> Link: https://lore.kernel.org/r/20241003035333.49261-5-mhklinux@outlook.com Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/storvsc_drv.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit bd55f56188caf170d6dbdc04638159bd91d8401b Author: Steffen Maier <maier@linux.ibm.com> Date: Thu Dec 5 15:19:32 2024 +0100 scsi: MAINTAINERS: Update zfcp entry Nihar takes over the zfcp maintainer work. Update the MAINTAINERS entry accordingly. Signed-off-by: Steffen Maier <maier@linux.ibm.com> Acked-by: Steffen Maier <maier@linux.ibm.com> Acked-by: Benjamin Block <bblock@linux.ibm.com> Acked-by: Nihar Panda <niharp@linux.ibm.com> Signed-off-by: Nihar Panda <niharp@linux.ibm.com> Link: https://lore.kernel.org/r/20241205141932.1227039-4-niharp@linux.ibm.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 32574fe6e19d3018a27e8003b1a75be2af584dae Author: Steffen Maier <maier@linux.ibm.com> Date: Thu Dec 5 15:19:31 2024 +0100 scsi: zfcp: Clarify zfcp_port refcount ownership during "link" test Reviewed-by: Benjamin Block <bblock@linux.ibm.com> Signed-off-by: Steffen Maier <maier@linux.ibm.com> Signed-off-by: Nihar Panda <niharp@linux.ibm.com> Link: https://lore.kernel.org/r/20241205141932.1227039-3-niharp@linux.ibm.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/s390/scsi/zfcp_fc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 9fe5b6130baf6dd15d46b41f8edf0abdb3541f4f Author: Fedor Loshakov <loshakov@linux.ibm.com> Date: Thu Dec 5 15:19:30 2024 +0100 scsi: zfcp: Correct kdoc parameter description for sending ELS and CT Since commit 7c7dc196814b ("[SCSI] zfcp: Simplify handling of ct and els requests") there are no more such structures as zfcp_send_els and zfcp_send_ct. Instead there is now one common fsf structure to hold zfcp data for ct and els requests. Fix parameter description for zfcp_fsf_send_ct() and zfcp_fsf_send_els() accordingly. Signed-off-by: Fedor Loshakov <loshakov@linux.ibm.com> Reviewed-by: Steffen Maier <maier@linux.ibm.com> Reviewed-by: Benjamin Block <bblock@linux.ibm.com> Signed-off-by: Nihar Panda <niharp@linux.ibm.com> Link: https://lore.kernel.org/r/20241205141932.1227039-2-niharp@linux.ibm.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/s390/scsi/zfcp_fsf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6dca1d3af16a82552294596b66fee9e13eed0795 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Fri Nov 29 18:33:35 2024 +0100 powerpc/xmon: Use str_yes_no() helper in dump_one_paca() Remove hard-coded strings by using the str_yes_no() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241129173337.57890-2-thorsten.blum@linux.dev arch/powerpc/xmon/xmon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c17618cf664ddf54b264ea74df9e8ab3e3ceda3b Author: Randy Dunlap <rdunlap@infradead.org> Date: Wed Dec 4 20:18:39 2024 -0800 scsi: Eliminate scsi_register() and scsi_unregister() usage & docs scsi_mid_low_api.rst refers to scsi_register() and scsi_unregister() but these functions don't exist. They have been replaced by more meaningful names. Update one driver (megaraid_mbox.c) that uses "scsi_unregister" in a warning message. Update scsi_mid_low_api.rst to eliminate references to scsi_register() and scsi_unregister(). Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20241205041839.164404-1-rdunlap@infradead.org Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> Cc: Martin K. Petersen <martin.petersen@oracle.com> Cc: Bart Van Assche <bvanassche@acm.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Cc: Kashyap Desai <kashyap.desai@broadcom.com> Cc: Sumit Saxena <sumit.saxena@broadcom.com> Cc: Shivasharan S <shivasharan.srikanteshwara@broadcom.com> Cc: Chandrakanth patil <chandrakanth.patil@broadcom.com> Cc: megaraidlinux.pdl@broadcom.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Documentation/scsi/scsi_mid_low_api.rst | 55 +++------------------------------ drivers/scsi/megaraid/megaraid_mbox.c | 2 +- include/scsi/scsi_host.h | 2 +- 3 files changed, 7 insertions(+), 52 deletions(-) commit 8d14bfb539522fff4cc0f90cd3c402d5aeef3c6a Author: Randy Dunlap <rdunlap@infradead.org> Date: Wed Dec 4 19:13:07 2024 -0800 scsi: docs: Remove init_this_scsi_driver() Finish removing mention of init_this_scsi_driver() that was removed ages ago. Fixes: 83c9f08e6c6a ("scsi: remove the old scsi_module.c initialization model") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20241205031307.130441-1-rdunlap@infradead.org Cc: Christoph Hellwig <hch@lst.de> Cc: Martin K. Petersen <martin.petersen@oracle.com> Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Documentation/scsi/scsi_mid_low_api.rst | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 9db7a472423d3470fb4bd114d74d0bc0027995ae Author: Avri Altman <avri.altman@wdc.com> Date: Thu Nov 28 09:25:42 2024 +0200 scsi: ufs: core: Do not hold any lock in ufshcd_hba_stop() This change is motivated by Bart's suggestion in [1], which enables to further reduce the SCSI host lock usage in the UFS driver. The reason why it makes sense, because although the legacy interrupt is disabled by some but not all ufshcd_hba_stop() callers, it is safe to nest disable_irq() calls as it checks the irq depth. [1] https://lore.kernel.org/linux-scsi/c58e4fce-0a74-4469-ad16-f1edbd670728@acm.org/ Suggested-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Avri Altman <avri.altman@wdc.com> Link: https://lore.kernel.org/r/20241128072542.219170-1-avri.altman@wdc.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/ufs/core/ufshcd.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 2a17a5bebc9aa7f59e99676350866adc41577c03 Author: Christophe Leroy <christophe.leroy@csgroup.eu> Date: Sat Dec 7 11:09:27 2024 +0100 powerpc/32: Replace mulhdu() by mul_u64_u64_shr() Using mul_u64_u64_shr() provides similar calculation as mulhdu() assembly function, but enables inlining by the compiler. The home-made assembly function had special handling for when one of the arguments is not a fully populated u64 but time functions use it to multiply timebase by a calculated scale which is constructed to have most significant bit set. On mpc8xx sched_clock() runs 3% faster. On mpc83xx it is 2%. As you can see below, sched_clock() is not much bigger than before: c000cf68 <sched_clock>: c000cf68: 7d 2d 42 a6 mftbu r9 c000cf6c: 7d 0c 42 a6 mftb r8 c000cf70: 7d 4d 42 a6 mftbu r10 c000cf74: 7c 09 50 40 cmplw r9,r10 c000cf78: 40 82 ff f0 bne c000cf68 <sched_clock> c000cf7c: 3d 40 c1 37 lis r10,-16073 c000cf80: 38 8a b3 30 addi r4,r10,-19664 c000cf84: 80 ea b3 30 lwz r7,-19664(r10) c000cf88: 80 64 00 14 lwz r3,20(r4) c000cf8c: 39 40 00 00 li r10,0 c000cf90: 80 a4 00 04 lwz r5,4(r4) c000cf94: 80 c4 00 10 lwz r6,16(r4) c000cf98: 7c 63 40 10 subfc r3,r3,r8 c000cf9c: 80 84 00 08 lwz r4,8(r4) c000cfa0: 7d 06 49 10 subfe r8,r6,r9 c000cfa4: 7c c7 19 d6 mullw r6,r7,r3 c000cfa8: 7d 25 18 16 mulhwu r9,r5,r3 c000cfac: 7c 08 29 d6 mullw r0,r8,r5 c000cfb0: 7c 67 18 16 mulhwu r3,r7,r3 c000cfb4: 7d 29 30 14 addc r9,r9,r6 c000cfb8: 7c a8 28 16 mulhwu r5,r8,r5 c000cfbc: 7c ca 51 14 adde r6,r10,r10 c000cfc0: 7d 67 41 d6 mullw r11,r7,r8 c000cfc4: 7d 29 00 14 addc r9,r9,r0 c000cfc8: 7c c6 01 94 addze r6,r6 c000cfcc: 7c 63 28 14 addc r3,r3,r5 c000cfd0: 7d 4a 51 14 adde r10,r10,r10 c000cfd4: 7c e7 40 16 mulhwu r7,r7,r8 c000cfd8: 7c 63 58 14 addc r3,r3,r11 c000cfdc: 7d 4a 01 94 addze r10,r10 c000cfe0: 7c 63 30 14 addc r3,r3,r6 c000cfe4: 7d 4a 39 14 adde r10,r10,r7 c000cfe8: 35 24 ff e0 addic. r9,r4,-32 c000cfec: 41 80 00 10 blt c000cffc <sched_clock+0x94> c000cff0: 7c 63 48 30 slw r3,r3,r9 c000cff4: 38 80 00 00 li r4,0 c000cff8: 4e 80 00 20 blr c000cffc: 21 04 00 1f subfic r8,r4,31 c000d000: 54 69 f8 7e srwi r9,r3,1 c000d004: 7d 4a 20 30 slw r10,r10,r4 c000d008: 7d 29 44 30 srw r9,r9,r8 c000d00c: 7c 64 20 30 slw r4,r3,r4 c000d010: 7d 23 53 78 or r3,r9,r10 c000d014: 4e 80 00 20 blr Before this change: c000d0bc <sched_clock>: c000d0bc: 94 21 ff f0 stwu r1,-16(r1) c000d0c0: 7c 08 02 a6 mflr r0 c000d0c4: 90 01 00 14 stw r0,20(r1) c000d0c8: 93 e1 00 0c stw r31,12(r1) c000d0cc: 7d 2d 42 a6 mftbu r9 c000d0d0: 7d 0c 42 a6 mftb r8 c000d0d4: 7d 4d 42 a6 mftbu r10 c000d0d8: 7c 09 50 40 cmplw r9,r10 c000d0dc: 40 82 ff f0 bne c000d0cc <sched_clock+0x10> c000d0e0: 3f e0 c1 37 lis r31,-16073 c000d0e4: 3b ff b3 30 addi r31,r31,-19664 c000d0e8: 80 9f 00 14 lwz r4,20(r31) c000d0ec: 80 7f 00 10 lwz r3,16(r31) c000d0f0: 7c 84 40 10 subfc r4,r4,r8 c000d0f4: 80 bf 00 00 lwz r5,0(r31) c000d0f8: 80 df 00 04 lwz r6,4(r31) c000d0fc: 7c 63 49 10 subfe r3,r3,r9 c000d100: 48 00 37 85 bl c0010884 <mulhdu> c000d104: 81 3f 00 08 lwz r9,8(r31) c000d108: 35 49 ff e0 addic. r10,r9,-32 c000d10c: 41 80 00 20 blt c000d12c <sched_clock+0x70> c000d110: 80 01 00 14 lwz r0,20(r1) c000d114: 7c 83 50 30 slw r3,r4,r10 c000d118: 83 e1 00 0c lwz r31,12(r1) c000d11c: 38 80 00 00 li r4,0 c000d120: 7c 08 03 a6 mtlr r0 c000d124: 38 21 00 10 addi r1,r1,16 c000d128: 4e 80 00 20 blr c000d12c: 80 01 00 14 lwz r0,20(r1) c000d130: 54 8a f8 7e srwi r10,r4,1 c000d134: 21 09 00 1f subfic r8,r9,31 c000d138: 83 e1 00 0c lwz r31,12(r1) c000d13c: 7c 63 48 30 slw r3,r3,r9 c000d140: 7d 4a 44 30 srw r10,r10,r8 c000d144: 7c 84 48 30 slw r4,r4,r9 c000d148: 7d 43 1b 78 or r3,r10,r3 c000d14c: 7c 08 03 a6 mtlr r0 c000d150: 38 21 00 10 addi r1,r1,16 c000d154: 4e 80 00 20 blr c0010884 <mulhdu>: c0010884: 2c 06 00 00 cmpwi r6,0 c0010888: 2c 83 00 00 cmpwi cr1,r3,0 c001088c: 7c 8a 23 78 mr r10,r4 c0010890: 7c 84 28 16 mulhwu r4,r4,r5 c0010894: 41 82 00 14 beq c00108a8 <mulhdu+0x24> c0010898: 7c 0a 30 16 mulhwu r0,r10,r6 c001089c: 7c ea 29 d6 mullw r7,r10,r5 c00108a0: 7c e0 38 14 addc r7,r0,r7 c00108a4: 7c 84 01 94 addze r4,r4 c00108a8: 4d 86 00 20 beqlr cr1 c00108ac: 7d 23 29 d6 mullw r9,r3,r5 c00108b0: 7d 43 28 16 mulhwu r10,r3,r5 c00108b4: 41 82 00 18 beq c00108cc <mulhdu+0x48> c00108b8: 7c 03 31 d6 mullw r0,r3,r6 c00108bc: 7d 03 30 16 mulhwu r8,r3,r6 c00108c0: 7c e0 38 14 addc r7,r0,r7 c00108c4: 7c 84 41 14 adde r4,r4,r8 c00108c8: 7d 4a 01 94 addze r10,r10 c00108cc: 7c 84 48 14 addc r4,r4,r9 c00108d0: 7c 6a 01 94 addze r3,r10 c00108d4: 4e 80 00 20 blr Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/f29e473c193c87bdbd36b209dfdee99d2f0c60dc.1733566130.git.christophe.leroy@csgroup.eu arch/powerpc/include/asm/time.h | 2 +- arch/powerpc/kernel/misc_32.S | 26 -------------------------- 2 files changed, 1 insertion(+), 27 deletions(-) commit a0e1fc921cb0651cd11469bf5378ec342bf7094d Merge: 32fd46f5b69e 6bc6234cbd5e Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Dec 9 18:36:05 2024 -0800 Merge branch 'add-support-for-synopsis-dwmac-ip-on-nxp-automotive-socs-s32g2xx-s32g3xx-s32r45' Jan Petrous via says: ==================== Add support for Synopsis DWMAC IP on NXP Automotive SoCs S32G2xx/S32G3xx/S32R45 The SoC series S32G2xx and S32G3xx feature one DWMAC instance, the SoC S32R45 has two instances. The devices can use RGMII/RMII/MII interface over Pinctrl device or the output can be routed to the embedded SerDes for SGMII connectivity. The provided stmmac glue code implements only basic functionality, interface support is restricted to RGMII only. More, including SGMII/SerDes support will come later. This patchset adds stmmac glue driver based on downstream NXP git [0]. [0] https://github.com/nxp-auto-linux/linux v7: https://lore.kernel.org/20241202-upstream_s32cc_gmac-v7-0-bc3e1f9f656e@oss.nxp.com v6: https://lore.kernel.org/20241124-upstream_s32cc_gmac-v6-0-dc5718ccf001@oss.nxp.com v5: https://lore.kernel.org/20241119-upstream_s32cc_gmac-v5-0-7dcc90fcffef@oss.nxp.com v4: https://lore.kernel.org/20241028-upstream_s32cc_gmac-v4-0-03618f10e3e2@oss.nxp.com v3: https://lore.kernel.org/20241013-upstream_s32cc_gmac-v3-0-d84b5a67b930@oss.nxp.com ==================== Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-0-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 6bc6234cbd5e9f7a4d8a20aa4d5f0c891e099649 Author: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Date: Thu Dec 5 17:43:12 2024 +0100 MAINTAINERS: Add Jan Petrous as the NXP S32G/R DWMAC driver maintainer Add myself as NXP S32G/R DWMAC Ethernet driver maintainer. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-15-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit cd197ac5d661ee2ab36f1578164e276ad947506c Author: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Date: Thu Dec 5 17:43:11 2024 +0100 net: stmmac: dwmac-s32: add basic NXP S32G/S32R glue driver NXP S32G2xx/S32G3xx and S32R45 are automotive grade SoCs that integrate one or two Synopsys DWMAC 5.10/5.20 IPs. The basic driver supports only RGMII interface. Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-14-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/Kconfig | 12 ++ drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c | 202 ++++++++++++++++++++++++ 3 files changed, 215 insertions(+) commit 91f10e5895209c855edc0f993410f5d82b54e049 Author: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Date: Thu Dec 5 17:43:10 2024 +0100 dt-bindings: net: Add DT bindings for DWMAC on NXP S32G/R SoCs Add basic description for DWMAC ethernet IP on NXP S32G2xx, S32G3xx and S32R45 automotive series SoCs. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-13-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../devicetree/bindings/net/nxp,s32-dwmac.yaml | 105 +++++++++++++++++++++ .../devicetree/bindings/net/snps,dwmac.yaml | 1 + 2 files changed, 106 insertions(+) commit 1ead5777550717f77fa70d6342fc467bebc18519 Author: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Date: Thu Dec 5 17:43:09 2024 +0100 net: dwmac-sti: Use helper rgmii_clock Utilize a new helper function rgmii_clock(). Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-12-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit fd59bca4d5eaba6cadf78e74b5e72fd8852a7529 Author: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Date: Thu Dec 5 17:43:08 2024 +0100 net: xgene_enet: Use helper rgmii_clock Utilize a new helper function rgmii_clock(). Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-11-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 04207d28f46870df113112a4afc42458495837d6 Author: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Date: Thu Dec 5 17:43:07 2024 +0100 net: macb: Use helper rgmii_clock Utilize a new helper function rgmii_clock(). Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-10-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/cadence/macb_main.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit b561d717a799241d260a7e5667e8d35de6fac874 Author: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Date: Thu Dec 5 17:43:06 2024 +0100 net: dwmac-starfive: Use helper rgmii_clock Utilize a new helper function rgmii_clock(). Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-9-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 30b4a9b5c335b32a8c8234662b180876a2db173e Author: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Date: Thu Dec 5 17:43:05 2024 +0100 net: dwmac-rk: Use helper rgmii_clock Utilize a new helper function rgmii_clock(). Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-8-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 30 ++++++-------------------- 1 file changed, 6 insertions(+), 24 deletions(-) commit 8470bfc835154a80774e5ab0e46969f196c0dba1 Author: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Date: Thu Dec 5 17:43:04 2024 +0100 net: dwmac-intel-plat: Use helper rgmii_clock Utilize a new helper function rgmii_clock(). When in, remove dead code in kmb_eth_fix_mac_speed(). Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-7-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../net/ethernet/stmicro/stmmac/dwmac-intel-plat.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit 839b75ea4d940f810650a2ce11c91d94c5f01aa3 Author: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Date: Thu Dec 5 17:43:03 2024 +0100 net: dwmac-imx: Use helper rgmii_clock Utilize a new helper function rgmii_clock(). Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-6-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 37b66c483e4c8a72cd1fd22f8ced05cc40f9e128 Author: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Date: Thu Dec 5 17:43:02 2024 +0100 net: dwmac-dwc-qos-eth: Use helper rgmii_clock Utilize a new helper function rgmii_clock(). Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-5-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 386aa60abdb600a4e5ad818e6dba171685942e54 Author: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Date: Thu Dec 5 17:43:01 2024 +0100 net: phy: Add helper for mapping RGMII link speed to clock rate The RGMII interface supports three data rates: 10/100 Mbps and 1 Gbps. These speeds correspond to clock frequencies of 2.5/25 MHz and 125 MHz, respectively. Many Ethernet drivers, including glues in stmmac, follow a similar pattern of converting RGMII speed to clock frequency. To simplify code, define the helper rgmii_clock(speed) to convert connection speed to clock frequency. Suggested-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-4-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/linux/phy.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit cb09f61a9ab84369c62f2ef7f8a2b797f596f6d1 Author: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Date: Thu Dec 5 17:43:00 2024 +0100 net: stmmac: Fix clock rate variables size The clock API clk_get_rate() returns unsigned long value. Expand affected members of stmmac platform data and convert the stmmac_clk_csr_set() and dwmac4_core_init() methods to defining the unsigned long clk_rate local variables. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Serge Semin <fancer.lancer@gmail.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-3-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- include/linux/stmmac.h | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) commit c8fab05d021dfc04401102f9fa1de07fc8f75d8d Author: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Date: Thu Dec 5 17:42:59 2024 +0100 net: stmmac: Extend CSR calc support Add support for CSR clock range up to 800 MHz. Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-2-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/stmicro/stmmac/common.h | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++++ include/linux/stmmac.h | 2 ++ 3 files changed, 8 insertions(+) commit 31cdd8418234e70043abd26894b57eb201489cba Author: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Date: Thu Dec 5 17:42:58 2024 +0100 net: stmmac: Fix CSR divider comment The comment in declaration of STMMAC_CSR_250_300M incorrectly describes the constant as '/* MDC = clk_scr_i/122 */' but the DWC Ether QOS Handbook version 5.20a says it is CSR clock/124. Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/20241205-upstream_s32cc_gmac-v8-1-ec1d180df815@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/linux/stmmac.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32fd46f5b69e9a2e1206d576359e533e5b7c4694 Author: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Date: Sat Dec 7 00:21:40 2024 +0500 net: renesas: rswitch: remove speed from gwca structure This field is set but never used. GWCA is rswitch CPU interface module which connects rswitch to the host over AXI bus. Speed of the switch ports is not anyhow related to GWCA operation. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Link: https://patch.msgid.link/20241206192140.1714-2-nikita.yoush@cogentembedded.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/renesas/rswitch.c | 3 --- drivers/net/ethernet/renesas/rswitch.h | 1 - 2 files changed, 4 deletions(-) commit 070927427d82debf5797e60c96165f2666c0bc42 Author: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Date: Sat Dec 7 00:21:39 2024 +0500 net: renesas: rswitch: do not deinit disabled ports In rswitch_ether_port_init_all(), only enabled ports are initialized. Then, rswitch_ether_port_deinit_all() shall also only deinitialize enabled ports. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Link: https://patch.msgid.link/20241206192140.1714-1-nikita.yoush@cogentembedded.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/renesas/rswitch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 919b1458ccfd33ead891fa4ad1e1d06016f5a20c Author: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Date: Thu Dec 5 09:02:10 2024 +0100 drm/bridge: ite-it6263: Support VESA-24 input format Introduce it6263_is_input_bus_fmt_valid() and refactor the it6263_bridge_atomic_get_input_bus_fmts() function to support VESA-24 format by selecting the LVDS input format based on the LVDS data mapping and thereby support both JEIDA-24 and VESA-24 input formats. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Reviewed-by: Liu Ying <victor.liu@nxp.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241205080210.1285385-1-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/bridge/ite-it6263.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 46fd8c707b552c0a846917192f66e623bb03f976 Author: wangfushuai <wangfushuai@baidu.com> Date: Wed Dec 4 15:02:47 2024 +0800 cpupower: revise is_valid flag handling for idle_monitor The is_valid flag should reflect the validity state of both the XXX_start and XXX_stop functions. But the use of '=' in XXX_stop overwrites the validity state set by XXX_start. This commit changes '=' to '|=' in XXX_stop to preserve and combine the validity state of XXX_start and XXX_stop. Signed-off-by: wangfushuai <wangfushuai@baidu.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c | 4 ++-- tools/power/cpupower/utils/idle_monitor/mperf_monitor.c | 2 +- tools/power/cpupower/utils/idle_monitor/nhm_idle.c | 2 +- tools/power/cpupower/utils/idle_monitor/snb_idle.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) commit 3075476a7af666de3ec10b4f35d8e62db8fd5b6d Author: Peng Fan <peng.fan@nxp.com> Date: Fri Nov 29 09:20:05 2024 +0800 pm: cpupower: Makefile: Fix cross compilation After commit f79473ed9220 ("pm: cpupower: Makefile: Allow overriding cross-compiling env params") we would fail to cross compile cpupower in buildroot which uses the recipe at [1] where only the CROSS variable is being set. The issue here is the use of the lazy evaluation for all variables: CC, LD, AR, STRIP, RANLIB, rather than just CROSS. [1]: https://git.buildroot.net/buildroot/tree/package/linux-tools/linux-tool-cpupower.mk.in Fixes: f79473ed9220 ("pm: cpupower: Makefile: Allow overriding cross-compiling env params") Reported-by: Florian Fainelli <florian.fainelli@broadcom.com> Closes: https://lore.kernel.org/all/2bbabd2c-24ef-493c-a199-594e5dada3da@broadcom.com/ Signed-off-by: Peng Fan <peng.fan@nxp.com> Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> tools/power/cpupower/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) commit 694389cd2bdfc6bc646bbb0fd2a5684c5e8d5fbf Author: Li Zhijian <lizhijian@fujitsu.com> Date: Fri Nov 22 15:47:57 2024 +0800 selftests/cpufreq: gitignore output files and clean them in make clean After `make run_tests`, the git status complains: Untracked files: (use "git add <file>..." to include in what will be committed) cpufreq/cpufreq_selftest.dmesg_cpufreq.txt cpufreq/cpufreq_selftest.dmesg_full.txt cpufreq/cpufreq_selftest.txt Link: https://lore.kernel.org/all/20241122074757.1583002-1-lizhijian@fujitsu.com/ Cc: "Rafael J. Wysocki" <rafael@kernel.org> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> tools/testing/selftests/cpufreq/.gitignore | 2 ++ tools/testing/selftests/cpufreq/Makefile | 1 + 2 files changed, 3 insertions(+) commit 94ba531bf9cb3c4ef725ffc37b8ed09006533f25 Author: Bence Csókás <csokas.bence@prolan.hu> Date: Sun Dec 8 14:15:31 2024 +0100 power: ip5xxx_power: Fix uninitialized variable read The check for whether a charger supports the requested battery voltage was incorrectly added to the `ip5xxx_battery_get_voltage_max()` function, instead of `set_voltage_max()`. This commit fixes it. Reported-by: Kees Bakker <kees@ijzerbout.nl> Closes: https://lore.kernel.org/linux-kernel/b547c228-df70-4137-9e96-175923f62404@ijzerbout.nl/ Fixes: 8584bc5df539 ("power: ip5xxx_power: Allow for more parameters to be configured") Signed-off-by: Bence Csókás <csokas.bence@prolan.hu> Link: https://lore.kernel.org/r/20241208131532.1028581-1-csokas.bence@prolan.hu Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ip5xxx_power.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8a241ef9b9b86afc087e5b3e4a95cb60f9ee796c Author: Shinas Rasheed <srasheed@marvell.com> Date: Thu Dec 5 22:41:34 2024 -0800 octeon_ep: add ndo ops for VFs in PF driver These APIs are needed to support applications that use netlink to get VF information from a PF driver. Signed-off-by: Shinas Rasheed <srasheed@marvell.com> Link: https://patch.msgid.link/20241206064135.2331790-1-srasheed@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../net/ethernet/marvell/octeon_ep/octep_main.c | 39 ++++++++++++++++++++++ .../net/ethernet/marvell/octeon_ep/octep_main.h | 1 + .../ethernet/marvell/octeon_ep/octep_pfvf_mbox.c | 23 +++++++++++-- .../ethernet/marvell/octeon_ep/octep_pfvf_mbox.h | 6 ++-- 4 files changed, 65 insertions(+), 4 deletions(-) commit 376ce8b35ed15d5deee57bdecd8449f6a4df4c42 Author: Mostafa Saleh <smostafa@google.com> Date: Mon Dec 2 14:06:04 2024 +0000 iommu/io-pgtable-arm: Add coverage for different OAS in selftest Run selftests with different OAS values intead of hardcoding it to 48 bits. We always keep OAS >= IAS to make the config valid for stage-2. This can be further improved, if we split IAS/OAS configuration for stage-1 and stage-2 (to use input sizes compatible with VA_BITS as SMMUv3 does, or IAS > OAS which is valid for stage-1). However, that adds more complexity, and the current change improves coverage and makes it possible to test all concatenation cases. Signed-off-by: Mostafa Saleh <smostafa@google.com> Link: https://lore.kernel.org/r/20241202140604.422235-3-smostafa@google.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/io-pgtable-arm.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 4dcac8407fe1be21990f356e2e8d8309ba63e346 Author: Mostafa Saleh <smostafa@google.com> Date: Mon Dec 2 14:06:03 2024 +0000 iommu/io-pgtable-arm: Fix stage-2 concatenation with 16K At the moment, io-pgtable-arm uses concatenation only if it is possible at level 0, which misses a case where concatenation is mandatory at level 1 according to R_SRKBC in Arm spec DDI0487 K.a. Also, that means concatenation can be used when not mandated, contradicting the comment on the code. However, these cases can only happen if the SMMUv3 driver is changed to use ias != oas for stage-2. This patch re-writes the code to use concatenation only if mandatory, fixing the missing case for level-1 and granule 16K with PA = 40 bits. Signed-off-by: Mostafa Saleh <smostafa@google.com> Link: https://lore.kernel.org/r/20241202140604.422235-2-smostafa@google.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/io-pgtable-arm.c | 45 +++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 12 deletions(-) commit cdfb9840fcc60b6e493aec077b1eecaa3268640b Author: Jason Gunthorpe <jgg@ziepe.ca> Date: Thu Dec 5 11:43:29 2024 -0400 iommu/arm-smmu-v3: Remove domain_alloc_paging() arm_smmu_domain_alloc_paging_flags() with a flags = 0 now does the same thing as arm_smmu_domain_alloc_paging(), remove arm_smmu_domain_alloc_paging(). Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/3-v1-0bb8d5313a27+27b-smmuv3_paging_flags_jgg@nvidia.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 31 ----------------------------- 1 file changed, 31 deletions(-) commit bb857c5c015033026d82d404061b26bbb37c821d Author: Jason Gunthorpe <jgg@ziepe.ca> Date: Thu Dec 5 11:43:28 2024 -0400 iommu/arm-smmu-v3: Make domain_alloc_paging_flags() directly determine the S1/S2 The selection of S1/S2 is a bit indirect today, make domain_alloc_paging_flags() directly decode the flags and select the correct S1/S2 type. Directly reject flag combinations the HW doesn't support when processing the flags. Fix missing rejection of some flag combinations that are not supported today (ie NEST_PARENT | DIRTY_TRACKING) by using a switch statement to list out exactly the combinations that are currently supported. Move the determination of the stage out of arm_smmu_domain_finalise() and into both callers. As today the default stage is S1 if supported in HW. This makes arm_smmu_domain_alloc_paging_flags() self contained and no longer calling arm_smmu_domain_alloc_paging(). Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/2-v1-0bb8d5313a27+27b-smmuv3_paging_flags_jgg@nvidia.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 42 ++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 12 deletions(-) commit 48e7b8e284e5be9fd1b54b60246bcbe9711d43e4 Author: Jason Gunthorpe <jgg@ziepe.ca> Date: Thu Dec 5 11:43:27 2024 -0400 iommu/arm-smmu-v3: Remove arm_smmu_domain_finalise() during attach Domains are now always finalized during allocation because the core code no longer permits a NULL dev argument to domain_alloc_paging/_flags(). Remove the late finalize during attach that supported domains that were not fully initialized. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/1-v1-0bb8d5313a27+27b-smmuv3_paging_flags_jgg@nvidia.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 37 +++++++---------------------- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 1 - 2 files changed, 9 insertions(+), 29 deletions(-) commit 6e192214c6c82c2f52238d5e1865f11594e58a6f Author: Robin Murphy <robin.murphy@arm.com> Date: Thu Dec 5 13:48:09 2024 +0000 iommu/arm-smmu-v3: Document SVA interaction with new pagetable features Process pagetables may now be using new permission-indirection-based features which an SMMU may not understand when given such a table for SVA. Although SMMUv3.4 does add its own S1PIE feature, realistically we're still going to have to cope with feature mismatches between CPUs and SMMUs, so let's start simple and essentially just document the expectations for what falls out as-is. Although it seems unlikely for SVA applications to also depend on memory-hardening features, or vice-versa, the relative lifecycles make it tricky to enforce mutual exclusivity. Thankfully our PIE index allocation makes it relatively benign for an SMMU to keep interpreting them as direct permissions, the only real implication is that an SVA application cannot harden itself against its own devices with these features. Thus, inform the user about that just in case they have other expectations. Also we don't (yet) support LPA2, so deny SVA entirely if we're going to misunderstand the pagetable format altogether. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/68a37b00a720f0827cac0e4f40e4d3a688924054.1733406275.git.robin.murphy@arm.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit e58b4771af2bf47ed533448457ee5cfb7eb284c6 Merge: 3f330db30638 d84b5dccf3eb Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Dec 9 14:47:11 2024 -0800 Merge branch 'vxlan-support-user-defined-reserved-bits' Petr Machata says: ==================== vxlan: Support user-defined reserved bits Currently the VXLAN header validation works by vxlan_rcv() going feature by feature, each feature clearing the bits that it consumes. If anything is left unparsed at the end, the packet is rejected. Unfortunately there are machines out there that send VXLAN packets with reserved bits set, even if they are configured to not use the corresponding features. One such report is here[1], and we have heard similar complaints from our customers as well. This patchset adds an attribute that makes it configurable which bits the user wishes to tolerate and which they consider reserved. This was recommended in [1] as well. A knob like that inevitably allows users to set as reserved bits that are in fact required for the features enabled by the netdevice, such as GPE. This is detected, and such configurations are rejected. In patches #1..#7, the reserved bits validation code is gradually moved away from the unparsed approach described above, to one where a given set of valid bits is precomputed and then the packet is validated against that. In patch #8, this precomputed set is made configurable through a new attribute IFLA_VXLAN_RESERVED_BITS. Patches #9 and #10 massage the testsuite a bit, so that patch #11 can introduce a selftest for the resreved bits feature. The corresponding iproute2 support is available in [2]. [1] https://lore.kernel.org/netdev/db8b9e19-ad75-44d3-bfb2-46590d426ff5@proxmox.com/ [2] https://github.com/pmachata/iproute2/commits/vxlan_reserved_bits/ ==================== Link: https://patch.msgid.link/cover.1733412063.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit d84b5dccf3ebdeeabef910d1c19b931c84f67884 Author: Petr Machata <petrm@nvidia.com> Date: Thu Dec 5 16:41:00 2024 +0100 selftests: forwarding: Add a selftest for the new reserved_bits UAPI Run VXLAN packets through a gateway. Flip individual bits of the packet and/or reserved bits of the gateway, and check that the gateway treats the packets as expected. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/388bef3c30ebc887d4e64cd86a362e2df2f2d2e1.1733412063.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/selftests/net/forwarding/Makefile | 1 + .../selftests/net/forwarding/vxlan_reserved.sh | 352 +++++++++++++++++++++ 2 files changed, 353 insertions(+) commit d76ccb2ec368c8a44f64839140cd253c19f6a79a Author: Petr Machata <petrm@nvidia.com> Date: Thu Dec 5 16:40:59 2024 +0100 selftests: net: lib: Add several autodefer helpers Add ip_link_set_addr(), ip_link_set_up(), ip_addr_add() and ip_route_add() to the suite of helpers that automatically schedule a corresponding cleanup. When setting a new MAC, one needs to remember the old address first. Move mac_get() from forwarding/ to that end. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/add6bcbe30828fd01363266df20c338cf13aaf25.1733412063.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/selftests/net/forwarding/lib.sh | 7 ----- tools/testing/selftests/net/lib.sh | 39 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 7 deletions(-) commit 8653eb21d68c6882ce5716b04379431817310b85 Author: Petr Machata <petrm@nvidia.com> Date: Thu Dec 5 16:40:58 2024 +0100 selftests: net: lib: Rename ip_link_master() to ip_link_set_master() Let's have a verb in that function name to make it clearer what's going on. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/fbf7c53a429b340b9cff5831280ea8c305a224f9.1733412063.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/selftests/net/fdb_notify.sh | 6 +++--- tools/testing/selftests/net/lib.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 6c11379b104e3718135fd7fc37bb254b41e4cf65 Author: Petr Machata <petrm@nvidia.com> Date: Thu Dec 5 16:40:57 2024 +0100 vxlan: Add an attribute to make VXLAN header validation configurable The set of bits that the VXLAN netdevice currently considers reserved is defined by the features enabled at the netdevice construction. In order to make this configurable, add an attribute, IFLA_VXLAN_RESERVED_BITS. The payload is a pair of big-endian u32's covering the VXLAN header. This is validated against the set of flags used by the various enabled VXLAN features, and attempts to override bits used by an enabled feature are bounced. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/c657275e5ceed301e62c69fe8e559e32909442e2.1733412063.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/vxlan/vxlan_core.c | 53 ++++++++++++++++++++++++++++++++++++------ include/uapi/linux/if_link.h | 1 + 2 files changed, 47 insertions(+), 7 deletions(-) commit bb16786ed6fdff3a67ba33ed928ae138fd4254b5 Author: Petr Machata <petrm@nvidia.com> Date: Thu Dec 5 16:40:56 2024 +0100 vxlan: vxlan_rcv(): Drop unparsed The code currently validates the VXLAN header in two ways: first by comparing it with the set of reserved bits, constructed ahead of time during the netdevice construction; and second by gradually clearing the bits off a separate copy of VXLAN header, "unparsed". Drop the latter validation method. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/4559f16c5664c189b3a4ee6f5da91f552ad4821c.1733412063.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/vxlan/vxlan_core.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 752b1c8d8b409f2b03e61e153696689ee081bf07 Author: Petr Machata <petrm@nvidia.com> Date: Thu Dec 5 16:40:55 2024 +0100 vxlan: Bump error counters for header mismatches The VXLAN driver so far has not increased the error counters for packets that set reserved bits. It does so for other packet errors, so do it for this case as well. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/d096084167d56706d620afe5136cf37a2d34d1b9.1733412063.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/vxlan/vxlan_core.c | 4 ++++ 1 file changed, 4 insertions(+) commit e4f8647767cfac0291def86ddfac23b925294701 Author: Petr Machata <petrm@nvidia.com> Date: Thu Dec 5 16:40:54 2024 +0100 vxlan: Track reserved bits explicitly as part of the configuration In order to make it possible to configure which bits in VXLAN header should be considered reserved, introduce a new field vxlan_config::reserved_bits. Have it cover the whole header, except for the VNI-present bit and the bits for VNI itself, and have individual enabled features clear more bits off reserved_bits. (This is expressed as first constructing a used_bits set, and then inverting it to get the reserved_bits. The set of used_bits will be useful on its own for validation of user-set reserved_bits in a following patch.) The patch also moves a comment relevant to the validation from the unparsed validation site up to the new site. Logically this patch should add the new comment, and a later patch that removes the unparsed bits would remove the old comment. But keeping both legs in the same patch is better from the history spelunking point of view. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/984dbf98d5940d3900268dbffaf70961f731d4a4.1733412063.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/vxlan/vxlan_core.c | 41 ++++++++++++++++++++++++++++++----------- include/net/vxlan.h | 1 + 2 files changed, 31 insertions(+), 11 deletions(-) commit e713130dfb4d6b5a2cd42f33a94b6ac983d2989d Author: Petr Machata <petrm@nvidia.com> Date: Thu Dec 5 16:40:53 2024 +0100 vxlan: vxlan_rcv(): Extract vxlan_hdr(skb) to a named variable Having a named reference to the VXLAN header is more handy than having to conjure it anew through vxlan_hdr() on every use. Add a new variable and convert several open-coded sites. Additionally, convert one "unparsed" use to the new variable as well. Thus the only "unparsed" uses that remain are the flag-clearing and the header validity check at the end. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/2a0a940e883c435a0fdbcdc1d03c4858957ad00e.1733412063.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/vxlan/vxlan_core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit fe3dcbcfae522fae9c62954488398562ff6b5ece Author: Petr Machata <petrm@nvidia.com> Date: Thu Dec 5 16:40:52 2024 +0100 vxlan: vxlan_rcv() callees: Drop the unparsed argument The functions vxlan_remcsum() and vxlan_parse_gbp_hdr() take both the SKB and the unparsed VXLAN header. Now that unparsed adjustment is handled directly by vxlan_rcv(), drop this argument, and have the function derive it from the SKB on its own. vxlan_parse_gpe_proto() does not take SKB, so keep the header parameter. However const it so that it's clear that the intention is that it does not get changed. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/5ea651f4e06485ba1a84a8eb556a457c39f0dfd4.1733412063.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/vxlan/vxlan_core.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit 0f09ae907818d593e55c4b058d286a0914a43c3f Author: Petr Machata <petrm@nvidia.com> Date: Thu Dec 5 16:40:51 2024 +0100 vxlan: vxlan_rcv() callees: Move clearing of unparsed flags out In order to migrate away from the use of unparsed to detect invalid flags, move all the code that actually clears the flags from callees directly to vxlan_rcv(). Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/2857871d929375c881b9defe378473c8200ead9b.1733412063.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/vxlan/vxlan_core.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 9234a37a495dc34cece943bec495ab541e4143ab Author: Petr Machata <petrm@nvidia.com> Date: Thu Dec 5 16:40:50 2024 +0100 vxlan: In vxlan_rcv(), access flags through the vxlan netdevice vxlan_sock.flags is constructed from vxlan_dev.cfg.flags, as the subset of flags (named VXLAN_F_RCV_FLAGS) that is important from the point of view of socket sharing. Attempts to reconfigure these flags during the vxlan netdev lifetime are also bounced. It is therefore immaterial whether we access the flags through the vxlan_dev or through the socket. Convert the socket accesses to netdevice accesses in this separate patch to make the conversions that take place in the following patches more obvious. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/5d237ffd731055e524d7b7c436de43358d8743d2.1733412063.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/vxlan/vxlan_core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 46b3df8eb9bd035620bc48bd7a1f028490626621 Author: Robin Murphy <robin.murphy@arm.com> Date: Thu Dec 5 16:33:58 2024 +0000 iommu: Manage driver probe deferral better Since iommu_fwspec_init() absorbed the basic driver probe deferral check to wait for an IOMMU to register, we may as well handle the probe deferral timeout there as well. The current inconsistency of callers results in client devices deferring forever on an arm64 ACPI system where an SMMU has failed its own driver probe. Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/41fa59f156ef8d196d08fa75c4901e6d4b12e6c4.1733406914.git.robin.murphy@arm.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/iommu.c | 2 +- drivers/iommu/of_iommu.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit fcbd621567420b3a2f21f49bbc056de8b273c625 Author: Robin Murphy <robin.murphy@arm.com> Date: Thu Dec 5 16:33:57 2024 +0000 iommu/arm-smmu-v3: Clean up more on probe failure kmemleak noticed that the iopf queue allocated deep down within arm_smmu_init_structures() can be leaked by a subsequent error return from arm_smmu_device_probe(). Furthermore, after arm_smmu_device_reset() we will also leave the SMMU enabled with an empty Stream Table, silently blocking all DMA. This proves rather annoying for debugging said probe failure, so let's handle it a bit better by putting the SMMU back into (more or less) the same state as if it hadn't probed at all. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/5137901958471cf67f2fad5c2229f8a8f1ae901a.1733406914.git.robin.murphy@arm.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 97cb1fa0272646c2a033b05338bb8e0260879968 Author: Robin Murphy <robin.murphy@arm.com> Date: Thu Dec 5 16:33:56 2024 +0000 iommu/arm-smmu: Retire probe deferral workaround This reverts commit 229e6ee43d2a160a1592b83aad620d6027084aad. Now that the fundamental ordering issue between arm_smmu_get_by_fwnode() and iommu_device_register() is resolved, the race condition for client probe no longer exists either, so retire the specific workaround. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/4167c5dfa052d4c8bb780f0a30af63dcfc4ce6c1.1733406914.git.robin.murphy@arm.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu/arm-smmu.c | 11 ----------- 1 file changed, 11 deletions(-) commit 7d835134d4e13e9c30509fd24a42f8c2b94135ea Author: Robin Murphy <robin.murphy@arm.com> Date: Thu Dec 5 16:33:55 2024 +0000 iommu/arm-smmu: Make instance lookup robust Relying on the driver list was a cute idea for minimising the scope of our SMMU device lookups, however it turns out to have a subtle flaw. The SMMU device only gets added to that list after arm_smmu_device_probe() returns success, so there's actually no way the iommu_device_register() call from there could ever work as intended, even if it wasn't already hampered by the fwspec setup not happening early enough. Switch both arm_smmu_get_by_fwnode() implementations to use a platform bus lookup instead, which *will* reliably work. Also make sure that we don't register SMMUv2 instances until we've fully initialised them, to avoid similar consequences of the lookup now finding a device with no drvdata. Moving the error returns is also a perfect excuse to streamline them with dev_err_probe() in the process. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/6d7ce1dc31873abdb75c895fb8bd2097cce098b4.1733406914.git.robin.murphy@arm.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 4 ++-- drivers/iommu/arm/arm-smmu/arm-smmu.c | 29 +++++++++++++---------------- 2 files changed, 15 insertions(+), 18 deletions(-) commit 3f330db30638b6489d548084a7e8843374d41ad0 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 5 08:59:14 2024 -0800 net: reformat kdoc return statements kernel-doc -Wall warns about missing Return: statement for non-void functions. We have a number of kdocs in our headers which are missing the colon, IOW they use * Return some value or * Returns some value Having the colon makes some sense, it should help kdoc parser avoid false positives. So add them. This is mostly done with a sed script, and removing the unnecessary cases (mostly the comments which aren't kdoc). Acked-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Richard Cochran <richardcochran@gmail.com> Acked-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Reviewed-by: Edward Cree <ecree.xilinx@gmail.com> Acked-by: Alexandra Winter <wintera@linux.ibm.com> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org> Link: https://patch.msgid.link/20241205165914.1071102-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/linux/etherdevice.h | 18 ++++++++-------- include/linux/ethtool.h | 6 +++--- include/linux/if_vlan.h | 28 ++++++++++++------------ include/linux/netdevice.h | 14 ++++++------ include/linux/netfilter/x_tables.h | 2 +- include/linux/netfilter_netdev.h | 3 ++- include/linux/ptp_clock_kernel.h | 4 ++-- include/linux/rfkill.h | 2 +- include/linux/rtnetlink.h | 2 +- include/linux/skbuff.h | 16 +++++++------- include/linux/wwan.h | 2 +- include/net/cfg80211.h | 2 +- include/net/dst.h | 2 +- include/net/genetlink.h | 6 +++--- include/net/ipv6.h | 2 +- include/net/iucv/iucv.h | 30 +++++++++++++------------- include/net/netfilter/nf_tproxy.h | 4 ++-- include/net/netlink.h | 44 +++++++++++++++++++------------------- include/net/page_pool/helpers.h | 9 +++----- include/net/pkt_cls.h | 4 ++-- include/net/tcp.h | 2 +- 21 files changed, 101 insertions(+), 101 deletions(-) commit 9b640ae7fbba13d45a8b9712dff2911a0c2b5ff4 Author: Jason Gunthorpe <jgg@ziepe.ca> Date: Thu Dec 5 11:40:15 2024 -0400 iommu/arm-smmuv3: Update comments about ATS and bypass The SMMUv3 spec has a note that BYPASS and ATS don't work together under the STE EATS field definition. However there is another section "13.6.4 Full ATS skipping stage 1" that explains under certain conditions BYPASS and ATS do work together if the STE is using S1DSS to select BYPASS and the CD table has the possibility for a substream. When these comments were written the understanding was that all forms of BYPASS just didn't work and this was to be a future problem to solve. It turns out that ATS and IDENTITY will always work just fine: - If STE.Config = BYPASS then the PCI ATS is disabled - If a PASID domain is attached then S1DSS = BYPASS and ATS will be enabled. This meets the requirements of 13.6.4 to automatically generate 1:1 ATS replies on the RID. Update the comments to reflect this. Fixes: 7497f4211f4f ("iommu/arm-smmu-v3: Make changing domains be hitless for ATS") Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/0-v1-f27174f44f39+27a33-smmuv3_ats_note_jgg@nvidia.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit ca7858880590d4f1dfe73b2cbf372b8ed80a6d81 Author: Jesse Van Gavere <jesseevg@gmail.com> Date: Fri Dec 6 21:42:02 2024 +0100 net: dsa: microchip: Make MDIO bus name unique In configurations with 2 or more DSA clusters it will fail to allocate unique MDIO bus names as only the switch ID is used, fix this by using a combination of the tree ID and switch ID when needed Signed-off-by: Jesse Van Gavere <jesse.vangavere@scioteq.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241206204202.649912-1-jesse.vangavere@scioteq.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/dsa/microchip/ksz_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2d20773aec14996b6cc4db92d885028319be683d Author: Eric Dumazet <edumazet@google.com> Date: Fri Dec 6 22:38:11 2024 +0000 mctp: no longer rely on net->dev_index_head[] mctp_dump_addrinfo() is one of the last users of net->dev_index_head[] in the control path. Switch to for_each_netdev_dump() for better scalability. Use C99 for mctp_device_rtnl_msg_handlers[] to prepare future RTNL removal from mctp_dump_addrinfo() (mdev->addrs is not yet RCU protected) Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Matt Johnston <matt@codeconstruct.com.au> Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com> Acked-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://patch.msgid.link/20241206223811.1343076-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/mctp/device.c | 50 +++++++++++++++++++------------------------------- 1 file changed, 19 insertions(+), 31 deletions(-) commit 4d33dc1bc31df80356c49e40dbd3ddff19500bcb Author: Saket Kumar Bhaskar <skb99@linux.ibm.com> Date: Mon Dec 9 12:27:20 2024 +0530 selftests/bpf: Fix fill_link_info selftest on powerpc With CONFIG_KPROBES_ON_FTRACE enabled on powerpc, ftrace_location_range returns ftrace location for bpf_fentry_test1 at offset of 4 bytes from function entry. This is because branch to _mcount function is at offset of 4 bytes in function profile sequence. To fix this, add entry_offset of 4 bytes while verifying the address for kprobe entry address of bpf_fentry_test1 in verify_perf_link_info in selftest, when CONFIG_KPROBES_ON_FTRACE is enabled. Disassemble of bpf_fentry_test1: c000000000e4b080 <bpf_fentry_test1>: c000000000e4b080: a6 02 08 7c mflr r0 c000000000e4b084: b9 e2 22 4b bl c00000000007933c <_mcount> c000000000e4b088: 01 00 63 38 addi r3,r3,1 c000000000e4b08c: b4 07 63 7c extsw r3,r3 c000000000e4b090: 20 00 80 4e blr When CONFIG_PPC_FTRACE_OUT_OF_LINE [1] is enabled, these function profile sequence is moved out of line with an unconditional branch at offset 0. So, the test works without altering the offset for 'CONFIG_KPROBES_ON_FTRACE && CONFIG_PPC_FTRACE_OUT_OF_LINE' case. Disassemble of bpf_fentry_test1: c000000000f95190 <bpf_fentry_test1>: c000000000f95190: 00 00 00 60 nop c000000000f95194: 01 00 63 38 addi r3,r3,1 c000000000f95198: b4 07 63 7c extsw r3,r3 c000000000f9519c: 20 00 80 4e blr [1] https://lore.kernel.org/all/20241030070850.1361304-13-hbathini@linux.ibm.com/ Fixes: 23cf7aa539dc ("selftests/bpf: Add selftest for fill_link_info") Signed-off-by: Saket Kumar Bhaskar <skb99@linux.ibm.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241209065720.234344-1-skb99@linux.ibm.com tools/testing/selftests/bpf/prog_tests/fill_link_info.c | 4 ++++ tools/testing/selftests/bpf/progs/test_fill_link_info.c | 13 ++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) commit f9663b7cafa5e15b700efc1fdfabe33e31c133e7 Merge: 6145fefc1e42 7c482665931b Author: Jakub Kicinski <kuba@kernel.org> Date: Mon Dec 9 13:48:35 2024 -0800 Merge branch 'rxrpc-implement-jumbo-data-transmission-and-rack-tlp' David Howells says: ==================== rxrpc: Implement jumbo DATA transmission and RACK-TLP Here's a series of patches to implement two main features: (1) The transmission of jumbo data packets whereby several DATA packets of a particular size can be glued together into a single UDP packet, allowing us to make use of larger MTU sizes. The basic jumbo subpacket capacity is 1412 bytes (RXRPC_JUMBO_DATALEN) and, say, an MTU of 8192 allows five of them to be transmitted as one. An alternative (and possibly more efficient way) would be to expand/shrink the capacity of each DATA packet to match the MTU and thus save on header and tail-gap overhead, but the Rx protocol does not provide a mechanism for splitting the data - especially as the transported data is encrypted per-packet - and so UDP fragmentation would be the only way to handle this. In fact, in the future, AF_RXRPC also needs to look at shrinking the packet size where the MTU is smaller - for instance in the case of being carried by IPv6 over wifi where there isn't capacity for a 1412 byte capacity. (2) RACK-TLP to manage packet loss and retransmission in conjunction with the congestion control algorithm. These allow for better data throughput and work towards being able to have larger transmission windows. To this end, the following changes are also made: (1) Use a single large array of kvec structs for the I/O thread rather than having one per transmission buffer. We need a much bigger collection of kvecs for ping padding (2) Implement path-MTU probing by sending padded PING ACK packets and monitoring for PING RESPONSE ACKs. The pmtud value determined is used to configure the construction of jumbo DATA packets. (3) The transmission queue is changed from a linked list of transmission buffer structs to a linked list of transmission-queue structs, each of which points to either 32 or 64 transmission buffers (depending on cpu word size) and various bits of metadata are concentrated in the queue structs rather than the buffers to make better use of the cpu cache. (4) SACK data is stored in the transmission-queue structures in batches of 32 or 64 making it faster to process rather than being spread amongst all the individual packet buffers. (5) Don't change the DF flag on the UDP socket unless we need to - and basically only enable it for path-MTU probing. There are also some additional bits: (1) Fix the handling of connection aborts to poke the aborted connections. (2) Don't set the MORE-PACKETS Rx header flag on the wire. No one actually checks it and it is, in any case, generated inconsistently between implementations. (3) Request an ACK when, during call transmission, there's a stall in the app generating the data to be transmitted. (4) Fix attention starvation in the I/O thread by making sure we go through all outstanding events rather than returning to the beginning of the check cycle after any time we process an event. (5) Don't use the skbuff timestamp in the calculation of timeouts and RTT as we really should include local processing time in that too. Further, getting receive skbuff timestamps may be expensive. (6) Make RTT tracking per call with the saving of the value between calls, even within the same connection channel. The initial call timeout starts off large to allow the server time to set up its state before the initial reply. (7) Don't allocate txbuf structs for ACK packets, but rather use page frags and MSG_SPLICE_PAGES. (8) Use irq-disabling locks for interactions between app threads and I/O threads so that the I/O thread doesn't get help up. (9) Make rxrpc set the REQUEST-ACK flag on an outgoing packet when cwnd is at RXRPC_MIN_CWND (currently 4), not at 2 which it can never reach. (10) Add some tracing bits and pieces (including displaying the userStatus field in an ACK header) and some more stats counters (including different sizes of jumbo packets sent/received). Link: https://lore.kernel.org/r/20240306000655.1100294-1-dhowells@redhat.com/ [1] ==================== Link: https://patch.msgid.link/20241204074710.990092-1-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 7c482665931b6ce7bc72fa5feae6c35567070296 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:47:07 2024 +0000 rxrpc: Implement RACK/TLP to deal with transmission stalls [RFC8985] When an rxrpc call is in its transmission phase and is sending a lot of packets, stalls occasionally occur that cause severe performance degradation (eg. increasing the transmission time for a 256MiB payload from 0.7s to 2.5s over a 10G link). rxrpc already implements TCP-style congestion control [RFC5681] and this helps mitigate the effects, but occasionally we're missing a time event that deals with a missing ACK, leading to a stall until the RTO expires. Fix this by implementing RACK/TLP in rxrpc. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 342 +++++++++++++++++++++++++++++++++-- net/rxrpc/Makefile | 1 + net/rxrpc/ar-internal.h | 107 ++++++++++- net/rxrpc/call_event.c | 247 +++++++++---------------- net/rxrpc/call_object.c | 3 +- net/rxrpc/input.c | 117 ++++++++---- net/rxrpc/input_rack.c | 418 +++++++++++++++++++++++++++++++++++++++++++ net/rxrpc/io_thread.c | 1 + net/rxrpc/output.c | 41 +++-- 9 files changed, 1041 insertions(+), 236 deletions(-) commit 4ee4c2f82b81c088d1514b04c28c84c15e98ba1a Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:47:06 2024 +0000 rxrpc: Fix request for an ACK when cwnd is minimum rxrpc_prepare_data_subpacket() sets the REQUEST-ACK flag on the outgoing DATA packet under a number of circumstances, including, theoretically, when the cwnd is at minimum (or less). However, the minimum in this function is hard-coded as 2, but the actual minimum is RXRPC_MIN_CWND (which is currently 4) and so this never occurs. Without this, we will miss the request of some ACKs, potentially leading to a transmission stall until a timeout occurs on one side or the other that leads to an ACK being generated. Fix the function to use RXRPC_MIN_CWND rather than a hard-coded number. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b40ef2b85a7d117dd323b5910e504899e0a3e7dc Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:47:05 2024 +0000 rxrpc: Manage RTT per-call rather than per-peer Manage the determination of RTT on a per-call (ie. per-RPC op) basis rather than on a per-peer basis, averaging across all calls going to that peer. The problem is that the RTT measurements from the initial packets on a call may be off because the server may do some setting up (such as getting a lock on a file) before accepting the rest of the data in the RPC and, further, the RTT may be affected by server-side file operations, for instance if a large amount of data is being written or read. Note: When handling the FS.StoreData-type RPCs, for example, the server uses the userStatus field in the header of ACK packets as supplementary flow control to aid in managing this. AF_RXRPC does not yet support this, but it should be added. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 2 +- net/rxrpc/ar-internal.h | 39 ++++++++++--------- net/rxrpc/call_event.c | 18 ++++----- net/rxrpc/call_object.c | 2 + net/rxrpc/input.c | 10 ++--- net/rxrpc/output.c | 14 +++---- net/rxrpc/peer_object.c | 9 +---- net/rxrpc/proc.c | 6 +-- net/rxrpc/rtt.c | 91 ++++++++++++++++++++++---------------------- net/rxrpc/sendmsg.c | 2 +- 10 files changed, 97 insertions(+), 96 deletions(-) commit b509934094fd52ac3a49ee2a2c144e885517069f Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:47:04 2024 +0000 rxrpc: Add a reason indicator to the tx_ack tracepoint Record the reason for the transmission of an ACK in the rxrpc_tx_ack tracepoint, and not just in the rxrpc_propose_ack tracepoint. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 13 +++++++++---- net/rxrpc/conn_event.c | 3 ++- net/rxrpc/output.c | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) commit 372d12d191cb80720319e224d401fd82c602e9e4 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:47:03 2024 +0000 rxrpc: Add a reason indicator to the tx_data tracepoint Add an indicator to the rxrpc_tx_data tracepoint to indicate what triggered the transmission of a particular packet. At this point, it's only normal transmission and retransmission, plus the tracepoint is also used to record loss injection, but in a future patch, TLP-induced (re-)transmission will also be a thing. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 21 ++++++++++++++------- net/rxrpc/ar-internal.h | 1 + net/rxrpc/call_event.c | 12 ++++++++---- net/rxrpc/output.c | 6 +++--- 4 files changed, 26 insertions(+), 14 deletions(-) commit 547a9acd4c5e95190c6c93a6d8628c5b8b74a4d6 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:47:02 2024 +0000 rxrpc: Tidy up the ACK parsing a bit Tidy up the ACK parsing in the following ways: (1) Put the serial number of the ACK packet into the rxrpc_ack_summary struct and access it from there whilst parsing an ACK. (2) Be consistent about using "if (summary.acked_serial)" rather than "if (summary.acked_serial != 0)". Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/ar-internal.h | 1 + net/rxrpc/input.c | 55 +++++++++++++++++++++++-------------------------- 2 files changed, 27 insertions(+), 29 deletions(-) commit a2ea9a9072607c2fd6442bd1ffb4dbdbf882aed7 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:47:01 2024 +0000 rxrpc: Use irq-disabling spinlocks between app and I/O thread Where a spinlock is used by both the application thread and the I/O thread, use irq-disabling locking so that an interrupt taken on the app thread doesn't also slow down the I/O thread. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/af_rxrpc.c | 4 ++-- net/rxrpc/ar-internal.h | 1 - net/rxrpc/call_accept.c | 20 ++++++++++---------- net/rxrpc/call_object.c | 15 +++++++-------- net/rxrpc/conn_client.c | 12 ++++++------ net/rxrpc/conn_event.c | 8 ++++---- net/rxrpc/conn_object.c | 8 ++++---- net/rxrpc/input.c | 5 +---- net/rxrpc/io_thread.c | 8 ++++---- net/rxrpc/peer_event.c | 8 ++++---- net/rxrpc/peer_object.c | 1 + net/rxrpc/recvmsg.c | 18 +++++++++--------- net/rxrpc/security.c | 4 ++-- net/rxrpc/sendmsg.c | 2 -- 14 files changed, 54 insertions(+), 60 deletions(-) commit 08d55d7cf3f33c730ce2694393efe16b7983a9c8 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:47:00 2024 +0000 rxrpc: Don't allocate a txbuf for an ACK transmission Don't allocate an rxrpc_txbuf struct for an ACK transmission. There's now no need as the memory to hold the ACK content is allocated with a page frag allocator. The allocation and freeing of a txbuf is just unnecessary overhead. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 2 - net/rxrpc/ar-internal.h | 5 +- net/rxrpc/output.c | 210 ++++++++++++++++++++++++++----------------- net/rxrpc/txbuf.c | 76 ---------------- 4 files changed, 131 insertions(+), 162 deletions(-) commit fe24a5494390d22ff645fd201d2bf1669fa3aab1 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:59 2024 +0000 rxrpc: Send jumbo DATA packets Send jumbo DATA packets if the path-MTU probing using padded PING ACK packets shows up sufficient capacity to do so. This allows larger chunks of data to be sent without reducing the retryability as the subpackets in a jumbo packet can also be retransmitted individually. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/ar-internal.h | 1 + net/rxrpc/call_event.c | 2 +- net/rxrpc/call_object.c | 1 + net/rxrpc/input.c | 3 +++ 4 files changed, 6 insertions(+), 1 deletion(-) commit 0130eff911b13e0ad5fc2eebd44833cacd5a8b0b Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:58 2024 +0000 rxrpc: Fix initial resend timeout The constant for the initial resend timeout is in milliseconds, but the variable it's assigned to is in microseconds. Fix the constant to be in microseconds. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/rtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c0ceba23bb47085d6c9c53bff08a29634ee4e7e Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:57 2024 +0000 rxrpc: Fix the calculation and use of RTO Make the following changes to the calculation and use of RTO: (1) Fix rxrpc_resend() to use the backed-off RTO value obtained by calling rxrpc_get_rto_backoff() rather than extracting the value itself. Without this, it may retransmit packets too early. (2) The RTO value being similar to the RTT causes a lot of extraneous resends because the RTT doesn't end up taking account of clearing out of the receive queue on the server. Worse, responses to PING-ACKs are made as fast as possible and so are less than the DATA-requested-ACK RTT and so skew the RTT down. Fix this by putting a lower bound on the RTO by adding 100ms to it and limiting the lower end to 200ms. Fixes: c410bf01933e ("rxrpc: Fix the excessive initial retransmission timeout") Fixes: 37473e416234 ("rxrpc: Clean up the resend algorithm") Signed-off-by: David Howells <dhowells@redhat.com> Suggested-by: Simon Wilkinson <sxw@auristor.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/call_event.c | 3 ++- net/rxrpc/rtt.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit a3d7f46d983fb2ed528b9cceb457c067fe4277a2 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:56 2024 +0000 rxrpc: Display userStatus in rxrpc_rx_ack trace Display the userStatus field from the Rx packet header in the rxrpc_rx_ack trace line. This is used for flow control purposes by FS.StoreData-type kafs RPC calls. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 93dfca65a1df42a3c8b1094299dc42ab8f18e5c8 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:55 2024 +0000 rxrpc: Adjust the rxrpc_rtt_rx tracepoint Adjust the rxrpc_rtt_rx tracepoint in the following ways: (1) Display the collected RTT sample in the rxrpc_rtt_rx trace. (2) Move the division of srtt by 8 to the TP_printk() rather doing it before invoking the trace point. (3) Display the min_rtt value. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 14 ++++++++++---- net/rxrpc/input.c | 4 ++-- net/rxrpc/rtt.c | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) commit c637bd066841de6d0a204898a62f1d9bb8fa1b7f Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:54 2024 +0000 rxrpc: Generate rtt_min Generate rtt_min as this is required by RACK-TLP. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-27-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> lib/win_minmax.c | 1 + net/rxrpc/ar-internal.h | 2 ++ net/rxrpc/rtt.c | 20 ++++++++++++++++---- 3 files changed, 19 insertions(+), 4 deletions(-) commit 7903d4438b3f50b2f44af1ce4560631e0e0a9779 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:53 2024 +0000 rxrpc: Don't use received skbuff timestamps Don't use received skbuff timestamps, but rather set a timestamp when an ack is processed so that the time taken to get to rxrpc_input_ack() is included in the RTT. The timestamp of the latest ACK received is tracked in call->acks_latest_ts. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-26-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/input.c | 19 ++++++++++--------- net/rxrpc/local_object.c | 3 --- 2 files changed, 10 insertions(+), 12 deletions(-) commit dcdff0d8e3b61033b28c72926997d458949fcc05 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:52 2024 +0000 rxrpc: Store the DATA serial in the txqueue and use this in RTT calc Store the serial number set on a DATA packet at the point of transmission in the rxrpc_txqueue struct and when an ACK is received, match the reference number in the ACK by trawling the txqueue rather than sharing an RTT table with ACK RTT. This can be done as part of Tx queue rotation. This means we have a lot more RTT samples available and is faster to search with all the serial numbers packed together into a few cachelines rather than being hung off different txbufs. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-25-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 14 +++---- net/rxrpc/ar-internal.h | 4 ++ net/rxrpc/call_event.c | 8 ++-- net/rxrpc/input.c | 94 ++++++++++++++++++++++++++++---------------- net/rxrpc/output.c | 6 ++- 5 files changed, 79 insertions(+), 47 deletions(-) commit 9b052c6b92f9316d670bf50566f70e183d0d19cb Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:51 2024 +0000 rxrpc: Use the new rxrpc_tx_queue struct to more efficiently process ACKs With the change in the structure of the transmission buffer to store buffers in bunches of 32 or 64 (BITS_PER_LONG) we can place sets of per-buffer flags into the rxrpc_tx_queue struct rather than storing them in rxrpc_tx_buf, thereby vastly increasing efficiency when assessing the SACK table in an ACK packet. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-24-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 86 +++++++++++++-- net/rxrpc/ar-internal.h | 23 ++-- net/rxrpc/call_event.c | 181 +++++++++++++++---------------- net/rxrpc/call_object.c | 1 - net/rxrpc/input.c | 252 +++++++++++++++++++++++++++---------------- net/rxrpc/output.c | 10 +- net/rxrpc/sendmsg.c | 3 + 7 files changed, 352 insertions(+), 204 deletions(-) commit f7dd0dc9651326f609579fa81cbdda69b0467c2a Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:50 2024 +0000 rxrpc: Adjust names and types of congestion-related fields Adjust some of the names of fields and constants to make them look a bit more like the TCP congestion symbol names, such as flight_size -> in_flight and congest_mode to ca_state. Move the persistent congestion-related fields from the rxrpc_ack_summary struct into the rxrpc_call struct rather than copying them out and back in again. The rxrpc_congest tracepoint can fetch them from the call struct. Rename the counters for soft acks and nacks to have an 's' on the front to reflect the softness, e.g. nr_acks -> nr_sacks. Make fields counting numbers of packets or numbers of acks u16 rather than u8 to allow for windows of up to 8192 DATA packets in flight in future. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-23-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 58 ++++++++++------- net/rxrpc/ar-internal.h | 51 +++++++-------- net/rxrpc/conn_client.c | 4 +- net/rxrpc/input.c | 151 ++++++++++++++++++++----------------------- net/rxrpc/output.c | 2 +- 5 files changed, 132 insertions(+), 134 deletions(-) commit f003e4038f0e14b3b374f7dae76dfeef9591f006 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:49 2024 +0000 rxrpc: Display stats about jumbo packets transmitted and received In /proc/net/rxrpc/stats, display statistics about the numbers of different sizes of jumbo packets transmitted and received, showing counts for 1 subpacket (ie. a non-jumbo packet), 2 subpackets, 3, ... to 8 and then 9+. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-22-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/ar-internal.h | 2 ++ net/rxrpc/input.c | 6 +++++- net/rxrpc/output.c | 5 ++++- net/rxrpc/proc.c | 26 ++++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) commit 203457e11b591f80ada571f981dd5f4d683b0009 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:48 2024 +0000 rxrpc: Replace call->acks_first_seq with tracking of the hard ACK point Replace the call->acks_first_seq variable (which holds ack.firstPacket from the latest ACK packet and indicates the sequence number of the first ack slot in the SACK table) with call->acks_hard_ack which will hold the highest sequence hard ACK'd. This is 1 less than call->acks_first_seq, but it fits in the same schema as the other tracking variables which hold the sequence of a packet, not one past it. This will fix the rxrpc_congest tracepoint's calculation of SACK window size which shows one fewer than it should - and will occasionally go to -1. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-21-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 68 +++++++++++++++++++++----------------------- net/rxrpc/ar-internal.h | 2 +- net/rxrpc/input.c | 56 +++++++++++++++++------------------- 3 files changed, 59 insertions(+), 67 deletions(-) commit 692c4caa074c0d6092bd713babc6fc3872b5592a Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:47 2024 +0000 rxrpc: call->acks_hard_ack is now the same call->tx_bottom, so remove it Now that packets are removed from the Tx queue in the rotation function rather than being cleaned up later, call->acks_hard_ack now advances in step with call->tx_bottom, so remove it. Some of the places call->acks_hard_ack is used in the rxrpc tracepoints are replaced by call->acks_first_seq instead as that's the peer's reported idea of the hard-ACK point. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-20-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 20 ++++++++++---------- net/rxrpc/ar-internal.h | 1 - net/rxrpc/call_event.c | 4 ++-- net/rxrpc/input.c | 17 ++++++++--------- net/rxrpc/proc.c | 6 +++--- net/rxrpc/sendmsg.c | 6 +++--- 6 files changed, 26 insertions(+), 28 deletions(-) commit b341a0263b1b804d329f864c2dc24815364510ec Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:46 2024 +0000 rxrpc: Implement progressive transmission queue struct We need to scan the buffers in the transmission queue occasionally when processing ACKs, but the transmission queue is currently a linked list of transmission buffers which, when we eventually expand the Tx window to 8192 packets will be very slow to walk. Instead, pull the fields we need to examine a lot (last sent time, retransmitted flag) into a new struct rxrpc_txqueue and make each one hold an array of 32 or 64 packets. The transmission queue is then a list of these structs, each pointing to a contiguous set of packets. Scanning is then a lot faster as the flags and timestamps are concentrated in the CPU dcache. The transmission timestamps are stored as a number of microseconds from a base ktime to reduce memory requirements. This should be fine provided we manage to transmit an entire buffer within an hour. This will make implementing RACK-TLP [RFC8985] easier as it will be less costly to scan the transmission buffers. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-19-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 98 +++++++++++++++++---- net/rxrpc/ar-internal.h | 47 ++++++++-- net/rxrpc/call_event.c | 204 +++++++++++++++++++++++++++---------------- net/rxrpc/call_object.c | 38 ++++---- net/rxrpc/input.c | 72 +++++++++++---- net/rxrpc/output.c | 163 +++++++++++++++++----------------- net/rxrpc/sendmsg.c | 69 ++++++++++++--- net/rxrpc/txbuf.c | 41 +-------- 8 files changed, 467 insertions(+), 265 deletions(-) commit 6396b48ac0a77165f9c2c40ab03d6c8188c89739 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:45 2024 +0000 rxrpc: Don't need barrier for ->tx_bottom and ->acks_hard_ack We don't need a barrier for the ->tx_bottom value (which indicates the lowest sequence still in the transmission queue) and the ->acks_hard_ack value (which tracks the DATA packets hard-ack'd by the latest ACK packet received and thus indicates which DATA packets can now be discarded) as the app thread doesn't use either value as a reference to memory to access. Rather, the app thread merely uses these as a guide to how much space is available in the transmission queue Change the code to use READ/WRITE_ONCE() instead. Also, change rxrpc_check_tx_space() to use the same value for tx_bottom throughout. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-18-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/sendmsg.c | 8 +++++--- net/rxrpc/txbuf.c | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) commit 976b0ca5aae741ef33f4cf4079a9a026331eae88 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:44 2024 +0000 rxrpc: Timestamp DATA packets before transmitting them Move to setting the timestamp on DATA packets before transmitting them as part of the preparation. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-17-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/output.c | 56 +++++++++++++++++------------------------------------- 1 file changed, 17 insertions(+), 39 deletions(-) commit 81e7761be58aa915cc825afc6ff35dec63bf0b2f Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:43 2024 +0000 rxrpc: Only set DF=1 on initial DATA transmission Change how the DF flag is managed on DATA transmissions. Set it on initial transmission and don't set it on retransmissions. Then remove the handling for EMSGSIZE in rxrpc_send_data_packet() and just pretend it didn't happen, leaving it to the retransmission path to retry. The path-MTU discovery using PING ACKs is then used to probe for the maximum DATA size - though notification by ICMP will be used if one is received. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-16-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/ar-internal.h | 1 + net/rxrpc/output.c | 32 ++++++++++++++++---------------- net/rxrpc/proc.c | 5 +++-- 3 files changed, 20 insertions(+), 18 deletions(-) commit cd69a07b6d186eeb7df20d8bcbef18d7bbd84c4b Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:42 2024 +0000 rxrpc: Fix injection of packet loss Fix the code that injects packet loss for testing to make sure call->tx_transmitted is updated. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-15-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/output.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 9e3cccd176b5ec6ff78693287fb03097e453e69c Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:41 2024 +0000 rxrpc: Fix CPU time starvation in I/O thread Starvation can happen in the rxrpc I/O thread because it goes back to the top of the I/O loop after it does any one thing without trying to give any other connection or call CPU time. Also, because it processes one call packet at a time, it tries to do the retransmission loop after each ACK without checking to see if there are other ACKs already in the queue that can update the SACK state. Fix this by: (1) Add a received-packet queue on each call. (2) Distribute packets from the master Rx queue to the individual call, conn and error queues and 'poking' calls to add them to the attend queue first thing in the I/O thread. (3) Go through all the attention-seeking connections and calls before going back to the top of the I/O thread. Each queue is extracted as a whole and then gone through so that new additions to insert themselves into the queue. (4) Make the call event handler go through all the packets currently on the call's rx_queue before transmitting and retransmitting DATA packets. (5) Drop the skb argument from the call event handler as this is now replaced with the rx_queue. Instead, keep track of whether we received a packet or an ACK for the tests that used to rely on that. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-14-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 3 ++ net/rxrpc/ar-internal.h | 10 ++++- net/rxrpc/call_accept.c | 2 +- net/rxrpc/call_event.c | 34 +++++++------- net/rxrpc/call_object.c | 2 + net/rxrpc/conn_client.c | 12 ++--- net/rxrpc/input.c | 2 +- net/rxrpc/io_thread.c | 104 ++++++++++++++++++++++--------------------- net/rxrpc/peer_event.c | 2 +- 9 files changed, 96 insertions(+), 75 deletions(-) commit 149d002bee706f51772bd320cda90c922844bb0e Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:40 2024 +0000 rxrpc: Add a tracepoint to show variables pertinent to jumbo packet size Add a tracepoint to be called right before packets are transmitted for the first time that shows variable values that are pertinent to how many subpackets will be added to a jumbo DATA packet. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-13-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 41 +++++++++++++++++++++++++++++++++++++++++ net/rxrpc/call_event.c | 2 ++ 2 files changed, 43 insertions(+) commit b7313009c2e56d6e8bffd3d21c1a3a67a9149e2e Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:39 2024 +0000 rxrpc: Prepare to be able to send jumbo DATA packets Prepare to be able to send jumbo DATA packets if the we decide to, but don't enable that yet. This will allow larger chunks of data to be sent without reducing the retryability as the subpackets in a jumbo packet can also be retransmitted individually. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-12-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/ar-internal.h | 18 ++++++++++- net/rxrpc/call_event.c | 48 ++++++++++++++++------------- net/rxrpc/input.c | 36 +++++++++++++--------- net/rxrpc/insecure.c | 2 ++ net/rxrpc/output.c | 80 +++++++++++++++++++++++++++++++++---------------- net/rxrpc/rxkad.c | 13 ++++++++ 6 files changed, 137 insertions(+), 60 deletions(-) commit 3d2bdf73cea57d7f6bf314aa1c948af11af94980 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:38 2024 +0000 rxrpc: Separate the packet length from the data length in rxrpc_txbuf Separate the packet length from the data length (txb->len) stored in the rxrpc_txbuf to make security calculations easier. Also store the allocation size as that's an upper bound on the size of the security wrapper and change a number of fields to unsigned short as the amount of data can't exceed the capacity of a UDP packet. Also, whilst we're at it, use kzalloc() for txbufs. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-11-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/ar-internal.h | 8 +++++--- net/rxrpc/insecure.c | 1 + net/rxrpc/output.c | 7 ++++--- net/rxrpc/rxkad.c | 44 ++++++++++++++++++++++++-------------------- net/rxrpc/sendmsg.c | 1 - net/rxrpc/txbuf.c | 7 ++----- 6 files changed, 36 insertions(+), 32 deletions(-) commit eeaedc5449d9fccf2b56e844a018df9d3720d59e Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:37 2024 +0000 rxrpc: Implement path-MTU probing using padded PING ACKs (RFC8899) Implement path-MTU probing (along the lines of RFC8899) by padding some of the PING ACKs we send. PING ACKs get their own individual responses quite apart from the acking of data (though, as ACKs, they fulfil that role also). The probing concentrates on packet sizes that correspond how many subpackets can be stuffed inside a jumbo packet as jumbo DATA packets are just aggregations of individual DATA packets and can be split easily for retransmission purposes. If we want to perform probing, we advertise this by setting the maximum number of jumbo subpackets to 0 in the ack trailer when we send an ACK and see if the peer is also advertising the service. This is interpreted by non-supporting Rx stacks as an indication that jumbo packets aren't supported. The MTU sizes advertised in the ACK trailer AF_RXRPC transmits are pegged at a maximum of 1444 unless pmtud is supported by both sides. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-10-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 124 +++++++++++++++++++++++++++++++++++++++++++ net/rxrpc/ar-internal.h | 25 +++++++-- net/rxrpc/call_event.c | 5 ++ net/rxrpc/conn_event.c | 17 +++--- net/rxrpc/conn_object.c | 6 +++ net/rxrpc/input.c | 26 +++++---- net/rxrpc/io_thread.c | 6 +++ net/rxrpc/misc.c | 4 +- net/rxrpc/output.c | 67 ++++++++++++++++++----- net/rxrpc/peer_event.c | 104 ++++++++++++++++++++++++++++++++++-- net/rxrpc/peer_object.c | 24 +++++++-- net/rxrpc/proc.c | 9 ++-- net/rxrpc/protocol.h | 13 +++-- net/rxrpc/sysctl.c | 6 ++- net/rxrpc/txbuf.c | 3 +- 15 files changed, 382 insertions(+), 57 deletions(-) commit 420f8af502877a34dd371a7c8b6b943594487ebb Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:36 2024 +0000 rxrpc: Use a large kvec[] in rxrpc_local rather than every rxrpc_txbuf Use a single large kvec[] in the rxrpc_local struct rather than one in every rxrpc_txbuf struct to build large packets to save on memory. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-9-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/ar-internal.h | 6 ++++++ net/rxrpc/output.c | 45 +++++++++++++++++++++++++++++++++------------ 2 files changed, 39 insertions(+), 12 deletions(-) commit 8b5823ea437624b53ecf084b6dd582760f110394 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:35 2024 +0000 rxrpc: Request an ACK on impending Tx stall Set the REQUEST-ACK flag on the DATA packet we're about to send if we're about to stall transmission because the app layer isn't keeping up supplying us with data to transmit. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-8-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 1 + net/rxrpc/ar-internal.h | 2 +- net/rxrpc/output.c | 7 ++++++- net/rxrpc/proc.c | 5 +++-- 4 files changed, 11 insertions(+), 4 deletions(-) commit ff992adbc470c86d2dcb66f5ed837fbb3c1a561e Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:34 2024 +0000 rxrpc: Show stats counter for received reason-0 ACKs In /proc/net/rxrpc/stats, show the stats counter for received ACKs that have the reason code set to 0 as some implementations do this. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-7-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/proc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cbe0d89095c31afcede96e4ce9cd58c4bed62d63 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:33 2024 +0000 rxrpc: Don't set the MORE-PACKETS rxrpc wire header flag The MORE-PACKETS rxrpc header flag hasn't actually been looked at by anything since 1988 and not all implementations generate it. Change rxrpc so that it doesn't set MORE-PACKETS at all rather than setting it inconsistently. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-6-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/sendmsg.c | 3 --- 1 file changed, 3 deletions(-) commit efa95c32352b2ac7ff09d680144e22c0f25244cb Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:32 2024 +0000 rxrpc: Clean up Tx header flags generation handling Clean up the generation of the header flags when building packet headers for transmission: (1) Assemble the flags in a local variable rather than in the txb->flags. (2) Do the flags masking and JUMBO-PACKET setting in one bit of code for both the main header and the jumbo headers. (3) Generate the REQUEST-ACK flag afresh each time. There's a possibility we might want to do jumbo retransmission packets in future. (4) Pass the local flags variable to the rxrpc_tx_data tracepoint rather than the combination of the txb flags and the wire header flags (the latter belong only to the first subpacket). Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-5-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 1 - net/rxrpc/ar-internal.h | 2 +- net/rxrpc/output.c | 18 ++++++++++++------ net/rxrpc/proc.c | 3 +-- 4 files changed, 14 insertions(+), 10 deletions(-) commit 29e03ec757292e55fa0f7efa051c84ddc4f3e668 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:31 2024 +0000 rxrpc: Use umin() and umax() rather than min_t()/max_t() where possible Use umin() and umax() rather than min_t()/max_t() where the type specified is an unsigned type. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-4-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/rxrpc/call_event.c | 5 ++--- net/rxrpc/call_object.c | 4 ++-- net/rxrpc/conn_client.c | 2 +- net/rxrpc/input.c | 13 +++++-------- net/rxrpc/insecure.c | 2 +- net/rxrpc/io_thread.c | 2 +- net/rxrpc/output.c | 2 +- net/rxrpc/rtt.c | 6 +++--- net/rxrpc/rxkad.c | 6 +++--- net/rxrpc/rxperf.c | 2 +- net/rxrpc/sendmsg.c | 2 +- 11 files changed, 21 insertions(+), 25 deletions(-) commit 0e56ebde245e4799ce74d38419426f2a80d39950 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:30 2024 +0000 rxrpc: Fix handling of received connection abort Fix the handling of a connection abort that we've received. Though the abort is at the connection level, it needs propagating to the calls on that connection. Whilst the propagation bit is performed, the calls aren't then woken up to go and process their termination, and as no further input is forthcoming, they just hang. Also add some tracing for the logging of connection aborts. Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code") Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-3-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/trace/events/rxrpc.h | 25 +++++++++++++++++++++++++ net/rxrpc/conn_event.c | 12 ++++++++---- 2 files changed, 33 insertions(+), 4 deletions(-) commit d1fd972914239996dbd15c5142d7f6e09d95a002 Author: David Howells <dhowells@redhat.com> Date: Wed Dec 4 07:46:29 2024 +0000 ktime: Add us_to_ktime() Add a us_to_ktime() helper to go with ms_to_ktime() and ns_to_ktime(). Signed-off-by: David Howells <dhowells@redhat.com> cc: Thomas Gleixner <tglx@linutronix.de> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20241204074710.990092-2-dhowells@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/linux/ktime.h | 5 +++++ 1 file changed, 5 insertions(+) commit d814b70b9b901c823ddedd12757ca4a19b18c8f7 Author: Pranjal Shrivastava <praan@google.com> Date: Tue Dec 3 18:49:06 2024 +0000 iommu/arm-smmu-v3: Log better event records Currently, the driver dumps the raw hex for a received event record. Improve this by leveraging `struct arm_smmu_event` for event fields and log human-readable event records with meaningful information. Signed-off-by: Pranjal Shrivastava <praan@google.com> Link: https://lore.kernel.org/r/20241203184906.2264528-3-praan@google.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 114 +++++++++++++++++++++++++--- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 14 +++- 2 files changed, 115 insertions(+), 13 deletions(-) commit 43ca55f5555b53d0c37039c62d75e882cccbfb69 Author: Pranjal Shrivastava <praan@google.com> Date: Tue Dec 3 18:49:05 2024 +0000 iommu/arm-smmu-v3: Introduce struct arm_smmu_event Introduce `struct arm_smmu_event` to represent event records. Parse out relevant fields from raw event records for ease and use the new `struct arm_smmu_event` instead. Signed-off-by: Pranjal Shrivastava <praan@google.com> Link: https://lore.kernel.org/r/20241203184906.2264528-2-praan@google.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 55 +++++++++++++++++++---------- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 18 ++++++++++ 2 files changed, 54 insertions(+), 19 deletions(-) commit c95584e07b018db34a57ee067578aa1d93103511 Author: Ian Rogers <irogers@google.com> Date: Thu Dec 5 20:23:06 2024 -0800 perf test hwmon_pmu: Fix event file location The temp directory is made and a known fake hwmon PMU created within it. Prior to this fix the events were being incorrectly written to the temp directory rather than the fake PMU directory. This didn't impact the test as the directory fd matched the wrong location, but it doesn't mirror what a hwmon PMU would actually look like. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241206042306.1055913-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/hwmon_pmu.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 9a4426120dddab113782ea9cb331e5c03e2231ff Author: Ian Rogers <irogers@google.com> Date: Thu Dec 5 20:23:05 2024 -0800 perf hwmon_pmu: Use openat rather than dup to refresh directory The hwmon PMU test will make a temp directory, open the directory with O_DIRECTORY then fill it with contents. As the open is before the filling the contents the later fdopendir may reflect the initial empty state, meaning no events are seen. Change to re-open the directory, rather than dup the fd, so the latest contents are seen. Minor tweaks/additions to debug messages. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241206042306.1055913-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/hwmon_pmu.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 5e530a8287b7c935eeb56d65c11d0f823b3dc0a7 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 14:53:45 2024 -0800 perf tests: Enable tests disabled due to tracepoint parsing Tracepoint parsing required libtraceevent but no longer does. Remove the Build logic and #ifdefs that caused the tests not to be run. Test code that directly uses libtraceevent is still guarded. Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dominique Martinet <asmadeus@codewreck.org> Cc: Ilkka Koskinen <ilkka@os.amperecomputing.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Oliver Upton <oliver.upton@linux.dev> Cc: Paran Lee <p4ranlee@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steinar H. Gunderson <sesse@google.com> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Thomas Falcon <thomas.falcon@intel.com> Cc: Weilin Wang <weilin.wang@intel.com> Cc: Yang Jihong <yangjihong@bytedance.com> Cc: Yang Li <yang.lee@linux.alibaba.com> Cc: Ze Gao <zegao2021@gmail.com> Cc: Zixian Cai <fzczx123@gmail.com> Cc: zhaimingbing <zhaimingbing@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241118225345.889810-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/Build | 6 +++--- tools/perf/tests/builtin-test.c | 2 -- tools/perf/tests/parse-events.c | 25 +------------------------ 3 files changed, 4 insertions(+), 29 deletions(-) commit 6c8310e8380d472cb8b39b702a59e996e4b6efba Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 14:53:44 2024 -0800 perf evsel: Allow evsel__newtp without libtraceevent Switch from reading the tracepoint format to reading the id directly for the evsel config. This avoids the need to initialize libtraceevent, plugins, etc. It is sufficient for many tracepoint commands to work like: $ perf stat -e sched:sched_switch true To populate evsel->tp_format, do lazy initialization using libtraceevent in the evsel__tp_format function (the sys and name are saved in evsel__newtp_idx for this purpose). Reading the id should be indicative of the format failing to load, but if not an error is reported in evsel__tp_format. This could happen for a tracepoint with a format that fails to parse. As tracepoints can be parsed without libtraceevent with this, remove the associated #ifdefs in parse-events.c. By only lazily parsing the tracepoint format information it is hoped this will help improve the performance of code using tracepoints but not the format information. It also cuts down on the build and ifdef logic. Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dominique Martinet <asmadeus@codewreck.org> Cc: Ilkka Koskinen <ilkka@os.amperecomputing.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Oliver Upton <oliver.upton@linux.dev> Cc: Paran Lee <p4ranlee@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steinar H. Gunderson <sesse@google.com> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Thomas Falcon <thomas.falcon@intel.com> Cc: Weilin Wang <weilin.wang@intel.com> Cc: Yang Jihong <yangjihong@bytedance.com> Cc: Yang Li <yang.lee@linux.alibaba.com> Cc: Ze Gao <zegao2021@gmail.com> Cc: Zixian Cai <fzczx123@gmail.com> Cc: zhaimingbing <zhaimingbing@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241118225345.889810-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/evsel.c | 103 ++++++++++++++++++++++++++++++----------- tools/perf/util/evsel.h | 14 ++---- tools/perf/util/parse-events.c | 16 +------ 3 files changed, 82 insertions(+), 51 deletions(-) commit c46d634a03a309df461294a001cdf71b77d43b57 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 14:53:43 2024 -0800 perf evsel: Add/use accessor for tp_format Add an accessor function for tp_format. Rather than search+replace uses try to use a variable and reuse it. Add additional NULL checks when accessing/using the value. Make sure the PTR_ERR is nulled out on error path in evsel__newtp_idx. Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dominique Martinet <asmadeus@codewreck.org> Cc: Ilkka Koskinen <ilkka@os.amperecomputing.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Oliver Upton <oliver.upton@linux.dev> Cc: Paran Lee <p4ranlee@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steinar H. Gunderson <sesse@google.com> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Thomas Falcon <thomas.falcon@intel.com> Cc: Weilin Wang <weilin.wang@intel.com> Cc: Yang Jihong <yangjihong@bytedance.com> Cc: Yang Li <yang.lee@linux.alibaba.com> Cc: Ze Gao <zegao2021@gmail.com> Cc: Zixian Cai <fzczx123@gmail.com> Cc: zhaimingbing <zhaimingbing@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241118225345.889810-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-kmem.c | 12 ++-- tools/perf/builtin-kwork.c | 3 +- tools/perf/builtin-script.c | 9 ++- tools/perf/builtin-trace.c | 79 +++++++++++++++------- tools/perf/util/data-convert-bt.c | 10 +-- tools/perf/util/data-convert-json.c | 8 +-- tools/perf/util/evsel.c | 9 ++- tools/perf/util/evsel.h | 5 ++ tools/perf/util/evsel_fprintf.c | 4 +- .../perf/util/scripting-engines/trace-event-perl.c | 3 +- .../util/scripting-engines/trace-event-python.c | 3 +- tools/perf/util/sort.c | 33 +++++---- tools/perf/util/trace-event-scripting.c | 10 +-- 13 files changed, 128 insertions(+), 60 deletions(-) commit 800c93ffaf943a8c6d7c90d4e0468b9431e3dd7a Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 14:53:42 2024 -0800 perf trace-event: Always build trace-event-info.c trace-event-info.c has no libtraceevent dependencies, always build it and use it in builtin-record and perf_event_attr printing. Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dominique Martinet <asmadeus@codewreck.org> Cc: Ilkka Koskinen <ilkka@os.amperecomputing.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Oliver Upton <oliver.upton@linux.dev> Cc: Paran Lee <p4ranlee@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steinar H. Gunderson <sesse@google.com> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Thomas Falcon <thomas.falcon@intel.com> Cc: Weilin Wang <weilin.wang@intel.com> Cc: Yang Jihong <yangjihong@bytedance.com> Cc: Yang Li <yang.lee@linux.alibaba.com> Cc: Ze Gao <zegao2021@gmail.com> Cc: Zixian Cai <fzczx123@gmail.com> Cc: zhaimingbing <zhaimingbing@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241118225345.889810-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-record.c | 2 -- tools/perf/util/Build | 2 +- tools/perf/util/perf_event_attr_fprintf.c | 4 ---- 3 files changed, 1 insertion(+), 7 deletions(-) commit f7264150b446ec5b2eedbf492be5df56123083ad Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 14:53:41 2024 -0800 perf trace-event: Constify print arguments Capture that these functions don't mutate their input. Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dominique Martinet <asmadeus@codewreck.org> Cc: Ilkka Koskinen <ilkka@os.amperecomputing.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Oliver Upton <oliver.upton@linux.dev> Cc: Paran Lee <p4ranlee@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steinar H. Gunderson <sesse@google.com> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Thomas Falcon <thomas.falcon@intel.com> Cc: Weilin Wang <weilin.wang@intel.com> Cc: Yang Jihong <yangjihong@bytedance.com> Cc: Yang Li <yang.lee@linux.alibaba.com> Cc: Ze Gao <zegao2021@gmail.com> Cc: Zixian Cai <fzczx123@gmail.com> Cc: zhaimingbing <zhaimingbing@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241118225345.889810-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/trace-event-parse.c | 2 +- tools/perf/util/trace-event.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 05be17eed774aaf56f6b1e12714325ca3a266c04 Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 14:53:40 2024 -0800 tool api fs: Correctly encode errno for read/write open failures Switch from returning -1 to -errno so that callers can determine types of failure. Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dominique Martinet <asmadeus@codewreck.org> Cc: Ilkka Koskinen <ilkka@os.amperecomputing.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Oliver Upton <oliver.upton@linux.dev> Cc: Paran Lee <p4ranlee@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steinar H. Gunderson <sesse@google.com> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Thomas Falcon <thomas.falcon@intel.com> Cc: Weilin Wang <weilin.wang@intel.com> Cc: Yang Jihong <yangjihong@bytedance.com> Cc: Yang Li <yang.lee@linux.alibaba.com> Cc: Ze Gao <zegao2021@gmail.com> Cc: Zixian Cai <fzczx123@gmail.com> Cc: zhaimingbing <zhaimingbing@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241118225345.889810-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/lib/api/fs/fs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 925c25efcaf047ba6abe67dbef8581cc6c12b54c Author: Ian Rogers <irogers@google.com> Date: Mon Nov 18 14:53:39 2024 -0800 perf env: Ensure failure broken topology file reads are always -1 encoded get_core_id returns 0 on success and a negative errno value on error. Currently the error can only be -1, but fixing this to be any errno value breaks perf: https://lore.kernel.org/lkml/Zzu4Sdebve-NXEMX@google.com/ To avoid this, make sure all error values are written as -1. Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dominique Martinet <asmadeus@codewreck.org> Cc: Ilkka Koskinen <ilkka@os.amperecomputing.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Oliver Upton <oliver.upton@linux.dev> Cc: Paran Lee <p4ranlee@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steinar H. Gunderson <sesse@google.com> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Thomas Falcon <thomas.falcon@intel.com> Cc: Weilin Wang <weilin.wang@intel.com> Cc: Yang Jihong <yangjihong@bytedance.com> Cc: Yang Li <yang.lee@linux.alibaba.com> Cc: Ze Gao <zegao2021@gmail.com> Cc: Zixian Cai <fzczx123@gmail.com> Cc: zhaimingbing <zhaimingbing@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241118225345.889810-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/env.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit dcf900429d1e7c9b528e3e4682d0255003ab7be3 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Mon Dec 9 16:00:39 2024 -0300 perf btf: Make the sigtrap test helper to find a member by name widely available By introducing a tools/perf/util/btf.c to collect utilities not yet available via libbpf, the first being a way to find a member by name once we get the type_id for the struct. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/sigtrap.c | 20 +++----------------- tools/perf/util/Build | 1 + tools/perf/util/btf.c | 27 +++++++++++++++++++++++++++ tools/perf/util/btf.h | 10 ++++++++++ 4 files changed, 41 insertions(+), 17 deletions(-) commit bfb946753550d8d5f5bd5a156e4413c3df359faa Author: Ian Rogers <irogers@google.com> Date: Thu Dec 5 20:40:35 2024 -0800 libperf cpumap: Grow array of read CPUs in smaller increments Instead of growing the array by 2048, grow by the larger of the current range or 16. As ranges are typical for things like the online CPUs this will mean a single allocation happens. While uncore CPU maps will grow 16 at a time which is a value that is generous except say on large servers. Reviewed-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Kyle Meyer <kyle.meyer@hpe.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241206044035.1062032-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/lib/perf/cpumap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit e9ca57d7116a4bd9469c9e4c4f0d2c7894ef53a4 Author: Ian Rogers <irogers@google.com> Date: Thu Dec 5 20:40:34 2024 -0800 libperf cpumap: Remove perf_cpu_map__read() Function is no longer used and duplicates the parsing logic from perf_cpu_map__new(). Remove to allow simplification. Reviewed-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Kyle Meyer <kyle.meyer@hpe.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241206044035.1062032-8-irogers@google.com [ Applied manually to cope with "libperf cpumap: Refactor perf_cpu_map__merge()" ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/lib/perf/Documentation/libperf.txt | 1 - tools/lib/perf/cpumap.c | 56 -------------------------------- tools/lib/perf/include/perf/cpumap.h | 2 -- tools/lib/perf/libperf.map | 1 - 4 files changed, 60 deletions(-) commit 9d9a83c51ae0167fcd923ebb48fd7ec4c23b10cb Author: Ian Rogers <irogers@google.com> Date: Thu Dec 5 20:40:33 2024 -0800 libperf cpumap: Remove use of perf_cpu_map__read() Remove use of a FILE and switch to reading a string that is then passed to perf_cpu_map__new(). Being able to remove perf_cpu_map__read() avoids duplicated parsing logic. Reviewed-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Kyle Meyer <kyle.meyer@hpe.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241206044035.1062032-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/lib/perf/cpumap.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 4b8a7c0327e5657260c089df89632cdfaa53ecd1 Author: Ian Rogers <irogers@google.com> Date: Thu Dec 5 20:40:32 2024 -0800 perf pmu: Remove use of perf_cpu_map__read() Remove use of a FILE and switch to reading a string that is then passed to perf_cpu_map__new(). Being able to remove perf_cpu_map__read() avoids duplicated parsing logic. Reviewed-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Kyle Meyer <kyle.meyer@hpe.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241206044035.1062032-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/pmu.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 5d2fd516bb53e31a2f2e2750490a3f1a7e7edde4 Author: Ian Rogers <irogers@google.com> Date: Thu Dec 5 20:40:31 2024 -0800 libperf cpumap: Be tolerant of newline at the end of a cpumask File cpumasks often have a newline that shouldn't trigger the invalid parsing case in perf_cpu_map__new(). Reviewed-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Kyle Meyer <kyle.meyer@hpe.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241206044035.1062032-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/lib/perf/cpumap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e8399d34d568d61cb57b0bc154b454676cd29dce Author: Ian Rogers <irogers@google.com> Date: Thu Dec 5 20:40:30 2024 -0800 libperf cpumap: Hide/reduce scope of MAX_NR_CPUS Avoid redefinition of MAX_NR_CPUS as a global constant, the original definition is tools/perf/perf.h. Reviewed-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Kyle Meyer <kyle.meyer@hpe.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241206044035.1062032-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/lib/perf/cpumap.c | 2 ++ tools/lib/perf/include/internal/cpumap.h | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) commit 02b5ed8a6a7eb3c9eefe8f26c988e3fea6a69026 Author: Ian Rogers <irogers@google.com> Date: Thu Dec 5 20:40:29 2024 -0800 perf cpumap: Reduce transitive dependencies on libperf MAX_NR_CPUS libperf exposes MAX_NR_CPUS via tools/lib/perf/include/internal/cpumap.h which is internal. The preferred dependency should be the definition in tools/perf/perf.h. Add the includes of perf.h so that MAX_NR_CPUS can be hidden in libperf. Reviewed-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Kyle Meyer <kyle.meyer@hpe.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241206044035.1062032-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-annotate.c | 1 + tools/perf/builtin-diff.c | 1 + tools/perf/builtin-kwork.c | 1 + tools/perf/builtin-mem.c | 1 + tools/perf/builtin-sched.c | 1 + tools/perf/util/kwork.h | 1 + tools/perf/util/session.c | 1 + tools/perf/util/svghelper.c | 1 + 8 files changed, 8 insertions(+) commit 9a1e106550be574d75e3eba5e9aa4ef96473e058 Author: Kyle Meyer <kyle.meyer@hpe.com> Date: Thu Dec 5 20:40:28 2024 -0800 perf: Increase MAX_NR_CPUS to 4096 Systems have surpassed 2048 CPUs. Increase MAX_NR_CPUS to 4096. Bitmaps declared with MAX_NR_CPUS bits will increase from 256B to 512B, cpus_runtime will increase from 81960B to 163880B, and max_entries will increase from 8192B to 16384B. Reviewed-by: Ian Rogers <irogers@google.com> Reviewed-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Kyle Meyer <kyle.meyer@hpe.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241206044035.1062032-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/lib/perf/include/internal/cpumap.h | 2 +- tools/perf/perf.h | 2 +- tools/perf/util/bpf_skel/kwork_top.bpf.c | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) commit 9e7a00ec6a8844b4e62eaa7383c837e14953460b Author: Ilkka Koskinen <ilkka@os.amperecomputing.com> Date: Fri Nov 8 20:29:46 2024 +0000 perf arm-spe: Add support for SPE Data Source packet on AmpereOne Decode SPE Data Source packets on AmpereOne. The field is IMPDEF. Reviewed-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Graham Woodward <graham.woodward@arm.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20241108202946.16835-3-ilkka@os.amperecomputing.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/arm-spe-decoder/arm-spe-decoder.h | 9 +++++ tools/perf/util/arm-spe.c | 44 +++++++++++++++++++++++ 2 files changed, 53 insertions(+) commit ccdc9e9c5ed7af44efaaf9039398998b5f239d64 Author: Ilkka Koskinen <ilkka@os.amperecomputing.com> Date: Fri Nov 8 20:29:45 2024 +0000 perf arm-spe: Prepare for adding data source packet implementations for other cores Split Data Source Packet handling to prepare adding support for other implementations. Reviewed-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Graham Woodward <graham.woodward@arm.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20241108202946.16835-2-ilkka@os.amperecomputing.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/arm-spe.c | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) commit 9eef3ec920f558aabcf7bd0acd55d7d037b9e56b Author: Leo Yan <leo.yan@arm.com> Date: Thu Nov 7 12:53:08 2024 +0000 perf cpumap: Add checking for reference counter For the CPU map merging test, add an extra check for the reference counter before releasing the last CPU map. Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Leo Yan <leo.yan@arm.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20241107125308.41226-4-leo.yan@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/cpumap.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit fb953dfa66ce90c12c3b581db4e213e810591d1e Author: Leo Yan <leo.yan@arm.com> Date: Thu Nov 7 12:53:07 2024 +0000 perf cpumap: Add more tests for CPU map merging Add additional tests for CPU map merging to cover more cases. These tests include different types of arguments, such as when one CPU map is a subset of another, as well as cases with or without overlap between the two maps. Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Leo Yan <leo.yan@arm.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20241107125308.41226-3-leo.yan@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/cpumap.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) commit a9d2217556f7745e082b765ed44ad5c0172aa5a1 Author: Leo Yan <leo.yan@arm.com> Date: Thu Nov 7 12:53:06 2024 +0000 libperf cpumap: Refactor perf_cpu_map__merge() The perf_cpu_map__merge() function has two arguments, 'orig' and 'other'. The function definition might cause confusion as it could give the impression that the CPU maps in the two arguments are copied into a new allocated structure, which is then returned as the result. The purpose of the function is to merge the CPU map 'other' into the CPU map 'orig'. This commit changes the 'orig' argument to a pointer to pointer, so the new result will be updated into 'orig'. The return value is changed to an int type, as an error number or 0 for success. Update callers and tests for the new function definition. Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Leo Yan <leo.yan@arm.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20241107125308.41226-2-leo.yan@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/lib/perf/cpumap.c | 49 ++++++++++++++++++++---------------- tools/lib/perf/evlist.c | 2 +- tools/lib/perf/include/perf/cpumap.h | 4 +-- tools/perf/tests/cpumap.c | 13 +++++----- tools/perf/util/mem-events.c | 5 +++- 5 files changed, 40 insertions(+), 33 deletions(-) commit 161c3402fd9918af6254cb3ef68a0d119df544cd Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Thu Dec 5 11:59:34 2024 -0300 perf config: Fix trival typo 'an' -> 'can' Just a trivial typo, should be 'can', did a spell check on the rest of the file just in case, nothing more stood out. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Documentation/perf-config.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d78e20c081e744812cba9d12933a0afe5bc09e61 Author: Ian Rogers <irogers@google.com> Date: Tue Nov 19 10:01:30 2024 -0800 perf script python: Improve physical mem type resolution Previously system RAM and persistent memory were hard code matched, change so that the label of the memory region is just read from /proc/iomem. This avoids frequent N/A samples. Change the /proc/iomem reading, event processing and output so that nested entries appear and their counts count toward their parent. As labels may be repeated, include the memory ranges in the output to make it clear why, for example, "System RAM" appears twice. Before: Event: mem_inst_retired.all_loads:P Memory type count percentage ---------------------------------------- ---------- ---------- System RAM 9460 96.5% N/A 998 3.5% After: Event: mem_inst_retired.all_loads:P Memory type count percentage ---------------------------------------- ---------- ---------- 100000000-105f7fffff : System RAM 36741 96.5 841400000-8416599ff : Kernel data 89 0.2 840800000-8412a6fff : Kernel rodata 60 0.2 841ebe000-8423fffff : Kernel bss 34 0.1 0-fff : Reserved 1345 3.5 100000-89dd9fff : System RAM 2 0.0 Before: Event: mem_inst_retired.any:P Memory type count percentage ---------------------------------------- ----------- ----------- System RAM 9460 90.5% N/A 998 9.5% After: Event: mem_inst_retired.any:P Memory type count percentage ---------------------------------------- ---------- ---------- 100000000-105f7fffff : System RAM 9460 90.5 841400000-8416599ff : Kernel data 45 0.4 840800000-8412a6fff : Kernel rodata 19 0.2 841ebe000-8423fffff : Kernel bss 12 0.1 0-fff : Reserved 998 9.5 The code has been updated to python 3 with type hints and resolving issues reported by mypy and pylint. Tabs are swapped to spaces as preferred in PEP8, because most lines of code were modified (of this small file) and this makes pylint significantly less noisy. Committer testing: root@number:/tmp# grep -m1 "model name" /proc/cpuinfo model name : Intel(R) Core(TM) i7-14700K root@number:/tmp# root@number:/tmp# perf script mem-phys-addr -a find / /bin /lib /lib64 /sbin Warning: 744 out of order events recorded. Event: cpu_core/mem_inst_retired.all_loads/P Memory type count percentage ---------------------------------------- ---------- ---------- 100000000-8bfbfffff : System RAM 364561 76.5 621400000-6223a6fff : Kernel rodata 10474 2.2 622400000-62283d4bf : Kernel data 4828 1.0 623304000-6237fffff : Kernel bss 1063 0.2 620000000-6213fffff : Kernel code 98 0.0 0-fff : Reserved 111480 23.4 100000-2b0ca017 : System RAM 337 0.1 2fbad000-30d92fff : System RAM 44 0.0 2c79d000-2fbabfff : System RAM 30 0.0 30d94000-316d5fff : System RAM 16 0.0 2b131a58-2c71dfff : System RAM 7 0.0 root@number:/tmp# Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Kan Liang <kan.liang@linux.intel.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241119180130.19160-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/scripts/python/mem-phys-addr.py | 177 +++++++++++++++++------------ 1 file changed, 102 insertions(+), 75 deletions(-) commit b2b95a2d78c090bd87d14e826c29a329ea9305be Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Fri Nov 29 12:20:39 2024 -0300 perf disasm: Return a proper error when not determining the file type Before: ⬢ [acme@toolbox a]$ perf annotate --stdio2 -i acme-perf-injected.data 'java.lang.String com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer.findSymbol(char[], int, int, int)' Error: Couldn't annotate java.lang.String com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer.findSymbol(char[], int, int, int): Internal error: Invalid -1 error code ⬢ [acme@toolbox a]$ After: ⬢ [acme@toolbox a]$ perf annotate --stdio2 -i acme-perf-injected.data 'java.lang.String com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer.findSymbol(char[], int, int, int)' Error: Couldn't annotate java.lang.String com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer.findSymbol(char[], int, int, int): Couldn't determine the file /tmp/perf-3308868.map type. ⬢ [acme@toolbox a]$ Reported-by: Francesco Nigro <fnigro@redhat.com> Reported-by: Ilan Green <igreen@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Yonatan Goldschmidt <yonatan.goldschmidt@granulate.io> Link: https://lore.kernel.org/lkml/Z092D9-r_iOgwIWM@x1 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/annotate.h | 1 + tools/perf/util/disasm.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 176c9d1e6a06f2fa62c1b9743369ab35c724d2c4 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Tue Dec 3 17:52:33 2024 -0300 tools features: Don't check for libunwind devel files by default Since 13e17c9ff49119aa ("perf build: Make libunwind opt-in rather than opt-out"), so we shouldn't by default be testing for its availability at build time in tools/build/features/test-all.c. That test was designed to test the features we expect to be the most common ones in most builds, so if we test build just that file, then we assume the features there are present and will not test one by one. Removing it from test-all.c gets rid of the first impediment for test-all.c to build successfully: $ cat /tmp/build/perf-tools-next/feature/test-all.make.output In file included from test-all.c:62: test-libunwind.c:2:10: fatal error: libunwind.h: No such file or directory 2 | #include <libunwind.h> | ^~~~~~~~~~~~~ compilation terminated. $ We then get to: $ cat /tmp/build/perf-tools-next/feature/test-all.make.output /usr/bin/ld: cannot find -lunwind-x86_64: No such file or directory /usr/bin/ld: cannot find -lunwind: No such file or directory collect2: error: ld returned 1 exit status $ So make all the logic related to setting CFLAGS, LDFLAGS, etc for libunwind to be conditional on NO_LIBWUNWIND=1, which is now the default, now we get a faster build: $ cat /tmp/build/perf-tools-next/feature/test-all.make.output $ ldd /tmp/build/perf-tools-next/feature/test-all.bin linux-vdso.so.1 (0x00007fef04cde000) libdw.so.1 => /lib64/libdw.so.1 (0x00007fef04a49000) libpython3.12.so.1.0 => /lib64/libpython3.12.so.1.0 (0x00007fef04478000) libm.so.6 => /lib64/libm.so.6 (0x00007fef04394000) libtraceevent.so.1 => /lib64/libtraceevent.so.1 (0x00007fef0436c000) libtracefs.so.1 => /lib64/libtracefs.so.1 (0x00007fef04345000) libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007fef03e95000) libz.so.1 => /lib64/libz.so.1 (0x00007fef03e72000) libelf.so.1 => /lib64/libelf.so.1 (0x00007fef03e56000) libnuma.so.1 => /lib64/libnuma.so.1 (0x00007fef03e48000) libslang.so.2 => /lib64/libslang.so.2 (0x00007fef03b65000) libperl.so.5.38 => /lib64/libperl.so.5.38 (0x00007fef037c6000) libc.so.6 => /lib64/libc.so.6 (0x00007fef035d5000) liblzma.so.5 => /lib64/liblzma.so.5 (0x00007fef035a0000) libzstd.so.1 => /lib64/libzstd.so.1 (0x00007fef034e1000) libbz2.so.1 => /lib64/libbz2.so.1 (0x00007fef034cd000) /lib64/ld-linux-x86-64.so.2 (0x00007fef04ce0000) libcrypt.so.2 => /lib64/libcrypt.so.2 (0x00007fef03495000) $ Fixes: 13e17c9ff49119aa ("perf build: Make libunwind opt-in rather than opt-out") Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/lkml/Z09zTztD8X8qIWCX@x1 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/build/feature/test-all.c | 5 --- tools/perf/Makefile.config | 83 +++++++++++++++++++++++++----------------- 2 files changed, 49 insertions(+), 39 deletions(-) commit 2937f9c361f7a8b230cd599e4af5264798bf4ce7 Author: Babu Moger <babu.moger@amd.com> Date: Fri Dec 6 08:31:41 2024 -0800 x86/resctrl: Introduce resctrl_file_fflags_init() to initialize fflags thread_throttle_mode_init() and mbm_config_rftype_init() both initialize fflags for resctrl files. Adding new files will involve adding another function to initialize the fflags. This can be simplified by adding a new function resctrl_file_fflags_init() and passing the file name and flags to be initialized. Consolidate fflags initialization into resctrl_file_fflags_init() and remove thread_throttle_mode_init() and mbm_config_rftype_init(). [ Tony: Drop __init attribute so resctrl_file_fflags_init() can be used at run time. ] Signed-off-by: Babu Moger <babu.moger@amd.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Link: https://lore.kernel.org/r/20241206163148.83828-2-tony.luck@intel.com arch/x86/kernel/cpu/resctrl/core.c | 4 +++- arch/x86/kernel/cpu/resctrl/internal.h | 3 +-- arch/x86/kernel/cpu/resctrl/monitor.c | 6 ++++-- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 15 ++------------- 4 files changed, 10 insertions(+), 18 deletions(-) commit 4ccb27d48a73d8be0e532353d0d9445cb52587c9 Author: Umer Uddin <umer.uddin@mentallysanemainliners.org> Date: Mon Dec 9 08:00:59 2024 +0000 arm64: dts: exynos: Add initial support for Samsung Galaxy S20 (x1slte) Add initial support for the Samsung Galaxy S20 (x1slte/SM-G980F) phone. It was launched in 2020, and it's based on the Exynos 990 SoC. It has only one configuration with 8GB of RAM and 128GB of UFS 3.0 storage. This device tree adds support for the following: - SimpleFB - 8GB RAM - Buttons Signed-off-by: Umer Uddin <umer.uddin@mentallysanemainliners.org> Link: https://lore.kernel.org/r/20241209080059.11891-5-umer.uddin@mentallysanemainliners.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/Makefile | 1 + arch/arm64/boot/dts/exynos/exynos990-x1slte.dts | 28 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit e7c075846d0be40f6238ea9c784c5d553135c1ae Author: Umer Uddin <umer.uddin@mentallysanemainliners.org> Date: Mon Dec 9 08:00:58 2024 +0000 arm64: dts: exynos: Add initial support for Samsung Galaxy S20 5G (x1s) Add initial support for the Samsung Galaxy S20 5G (x1s/SM-G981B) phone. It was launched in 2020, and it's based on the Exynos 990 SoC. It has only one configuration with 12GB of RAM and 128GB of UFS 3.0 storage. This device tree adds support for the following: - SimpleFB - 12GB RAM - Buttons Signed-off-by: Umer Uddin <umer.uddin@mentallysanemainliners.org> Link: https://lore.kernel.org/r/20241209080059.11891-4-umer.uddin@mentallysanemainliners.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/Makefile | 1 + arch/arm64/boot/dts/exynos/exynos990-x1s.dts | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit 38794a41be2bacc698fc520d75d3aea88c727a01 Author: Umer Uddin <umer.uddin@mentallysanemainliners.org> Date: Mon Dec 9 08:00:57 2024 +0000 arm64: dts: exynos: Add initial support for Samsung Galaxy S20 Series boards (x1s-common) Add initial support for the Samsung Galaxy S20 Series (x1s-common) phones. They were launched in 2020, and are based on the Exynos 990 SoC. The devices have multiple RAM configurations, starting from 8GB going all the way up to 16GB for the S20 Ultra devices. This device tree adds support for the following: - SimpleFB - 8GB RAM (Any more will be mapped in device trees) - Buttons Signed-off-by: Umer Uddin <umer.uddin@mentallysanemainliners.org> Link: https://lore.kernel.org/r/20241209080059.11891-3-umer.uddin@mentallysanemainliners.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> .../boot/dts/exynos/exynos990-x1s-common.dtsi | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+) commit 2e342a80b02c64d2bae6f1070c473a8a9c7a5b9d Author: Umer Uddin <umer.uddin@mentallysanemainliners.org> Date: Mon Dec 9 08:00:56 2024 +0000 dt-bindings: arm: samsung: samsung-boards: Add bindings for SM-G981B and SM-G980F board Add devicetree bindings for Samsung Galaxy S20 5G and Samsung Galaxy S20 board. Signed-off-by: Umer Uddin <umer.uddin@mentallysanemainliners.org> Link: https://lore.kernel.org/r/20241209080059.11891-2-umer.uddin@mentallysanemainliners.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml | 2 ++ 1 file changed, 2 insertions(+) commit df8e78607d4795806b59564ba7a3e2e125d119fc Author: Bastien Curutchet <bastien.curutchet@bootlin.com> Date: Wed Dec 4 10:43:16 2024 +0100 memory: ti-aemif: Export aemif_*_cs_timings() Export the aemif_set_cs_timing() and aemif_check_cs_timing() symbols so they can be used by other drivers Add a mutex to protect the CS configuration register from concurrent accesses between the AEMIF and its 'children'. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20241204094319.1050826-7-bastien.curutchet@bootlin.com [krzysztof: wrap aemif_set_cs_timings() at 80-char] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/memory/ti-aemif.c | 36 ++++++++++++++---------------------- include/linux/memory/ti-aemif.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 22 deletions(-) commit a6d60e3376065752137ec23d103f7d039c363e41 Author: Bastien Curutchet <bastien.curutchet@bootlin.com> Date: Wed Dec 4 10:43:15 2024 +0100 memory: ti-aemif: Create aemif_set_cs_timings() Create an aemif_set_cs_timings() function to isolate the setting of a chip select timing configuration and ease its exportation. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20241204094319.1050826-6-bastien.curutchet@bootlin.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/memory/ti-aemif.c | 65 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 49 insertions(+), 16 deletions(-) commit 2c7b585d19cc1a7185a3a0b58cb643d28fd19cc1 Author: Bastien Curutchet <bastien.curutchet@bootlin.com> Date: Wed Dec 4 10:43:14 2024 +0100 memory: ti-aemif: Create aemif_check_cs_timings() aemif_calc_rate() checks the validity of a new computed timing against a 'max' value given as input. This isn't convenient if we want to check the CS timing configuration somewhere else in the code. Wrap the verification of all the chip select's timing configuration into a single function to ease its exportation in upcoming patches. Remove the validity check from aemif_calc_rate(). Also remove the no longer used 'max' input and change the return type to u32. Remove the check of the aemif_calc_rate()'s return value during device-tree parsing as aemif_calc_rate() can't fail anymore. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20241204094319.1050826-5-bastien.curutchet@bootlin.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/memory/ti-aemif.c | 111 +++++++++++++++++++++------------------------- 1 file changed, 51 insertions(+), 60 deletions(-) commit 30b4da67655469bf8d4b8ba7c001096a1e10c7bf Author: Bastien Curutchet <bastien.curutchet@bootlin.com> Date: Wed Dec 4 10:43:13 2024 +0100 memory: ti-aemif: Wrap CS timings into a struct CS timings are store in the struct aemif_cs_data along with other CS parameters. It isn't convenient for exposing CS timings to other drivers without also exposing the other parameters. Wrap the CS timings in a new struct aemif_cs_timings to simplify their export in upcoming patches. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20241204094319.1050826-4-bastien.curutchet@bootlin.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/memory/ti-aemif.c | 57 +++++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 24 deletions(-) commit b3d57e179607106d5b08a635c49b338c409357d4 Author: Bastien Curutchet <bastien.curutchet@bootlin.com> Date: Wed Dec 4 10:43:12 2024 +0100 memory: ti-aemif: Remove unnecessary local variables CS timings are copied to local variables that are then used as is, without any modifications. Remove these unneeded local variables and deal directly with the timings stored in the struct aemif_cs_data. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20241204094319.1050826-3-bastien.curutchet@bootlin.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/memory/ti-aemif.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 1ec0fa90070c9468d22b3c3ea5f4bd6c27810907 Author: Bastien Curutchet <bastien.curutchet@bootlin.com> Date: Wed Dec 4 10:43:11 2024 +0100 memory: ti-aemif: Store timings parameter in number of cycles - 1 The CS configuration register expects timings to be expressed in 'number of cycles - 1' but they are stored in ns in the struct aemif_cs_data. So at init, the timings currently set are converted to ns by aemif_get_hw_params(), updated with values from the device-tree properties, and then converted back to 'number of cycles - 1' before being applied. Store the timings directly in 'number of cycles - 1' instead of nanoseconds. Perform the conversion from nanosecond during the device-tree parsing. Remove aemif_cycles_to_nsec() as it isn't used anymore. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20241204094319.1050826-2-bastien.curutchet@bootlin.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/memory/ti-aemif.c | 135 +++++++++++++++++++++++++++------------------- 1 file changed, 79 insertions(+), 56 deletions(-) commit 95350c0ec27d906cd95375084ce343bc65421e70 Author: André Draszik <andre.draszik@linaro.org> Date: Tue Dec 3 12:40:26 2024 +0000 arm64: dts: exynos: gs101: allow stable USB phy Vbus detection For the DWC3 core to reliably detect the connected phy's Vbus state, we need to disable phy suspend. Add snps,dis_u2_susphy_quirk snps,dis_u3_susphy_quirk to do that. While at it, also add snps,has-lpm-erratum as this is set downstream which implies that the core was configured with LPM Erratum. We should do the same here. Signed-off-by: André Draszik <andre.draszik@linaro.org> Reviewed-by: Peter Griffin <peter.griffin@linaro.org> Tested-by: Peter Griffin <peter.griffin@linaro.org> Link: https://lore.kernel.org/r/20241203-gs101-phy-lanes-orientation-dts-v2-3-1412783a6b01@linaro.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/google/gs101.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 527c9640e4f04044afa98f3ce18f8af89ac4a322 Author: André Draszik <andre.draszik@linaro.org> Date: Tue Dec 3 12:40:25 2024 +0000 arm64: dts: exynos: gs101: phy region for exynos5-usbdrd is larger Turns out there are some additional registers in the phy region, update the DT accordingly. Signed-off-by: André Draszik <andre.draszik@linaro.org> Reviewed-by: Peter Griffin <peter.griffin@linaro.org> Tested-by: Peter Griffin <peter.griffin@linaro.org> Link: https://lore.kernel.org/r/20241203-gs101-phy-lanes-orientation-dts-v2-2-1412783a6b01@linaro.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/google/gs101.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 135eef38d7e081303fd9cdb982b37fcad32f9be0 Author: Frederic Weisbecker <frederic@kernel.org> Date: Wed Aug 7 18:02:08 2024 +0200 x86/resctrl: Use kthread_run_on_cpu() Use the proper API instead of open coding it. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Acked-by: Reinette Chatre <reinette.chatre@intel.com> Link: https://lore.kernel.org/r/20240807160228.26206-3-frederic@kernel.org arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) commit 2593988fd00e1fa9401fa5f951c098682b41f2ef Author: Melody Olvera <quic_molvera@quicinc.com> Date: Wed Dec 4 14:27:25 2024 -0800 dt-bindings: arm-smmu: Document SM8750 SMMU Document the SM8750 SMMU block. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> Link: https://lore.kernel.org/r/20241204-sm8750_master_smmu-v2-1-9e73e3fc15f2@quicinc.com Signed-off-by: Will Deacon <will@kernel.org> Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 2e55bb9b71e179c37d05deff37daa0dd8d04b59d Author: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Date: Tue Dec 3 10:20:38 2024 +0800 EDAC/i10nm: Add Intel Clearwater Forest server support Clearwater Forest is the successor to Sierra Forest. Add Clearwater Forest CPU model ID for EDAC support. Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Tested-by: Yi Lai <yi1.lai@intel.com> Link: https://lore.kernel.org/r/20241203022038.72873-1-qiuxu.zhuo@intel.com drivers/edac/i10nm_base.c | 1 + 1 file changed, 1 insertion(+) commit d1e22c7145af42f26f05771897a9fd5162212edb Author: Qingqing Zhou <quic_qqzhou@quicinc.com> Date: Fri Nov 22 13:19:21 2024 +0530 dt-bindings: arm-smmu: document QCS615 GPU SMMU Add the compatible for Qualcomm QCS615 GPU SMMU. Add the compatible in the list of 3 clocks required by the GPU SMMU. Remove the compatible from the "no clocks" list. Signed-off-by: Qingqing Zhou <quic_qqzhou@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241122074922.28153-2-quic_qqzhou@quicinc.com Signed-off-by: Will Deacon <will@kernel.org> Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 42314738906380cbd3b6e9caf3ad34e1b2d66035 Author: Richard Acayan <mailingradian@gmail.com> Date: Wed Nov 13 19:47:16 2024 -0500 iommu/arm-smmu-qcom: add sdm670 adreno iommu compatible Add the compatible for the separate IOMMU on SDM670 for the Adreno GPU. This IOMMU has the compatible strings: "qcom,sdm670-smmu-v2", "qcom,adreno-smmu", "qcom,smmu-v2" While the SMMU 500 doesn't need an entry for this specific SoC, the SMMU v2 compatible should have its own entry, as the fallback entry in arm-smmu.c handles "qcom,smmu-v2" without per-process page table support unless there is an entry here. This entry can't be the "qcom,adreno-smmu" compatible because dedicated GPU IOMMUs can also be SMMU 500 with different handling. Signed-off-by: Richard Acayan <mailingradian@gmail.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241114004713.42404-6-mailingradian@gmail.com Signed-off-by: Will Deacon <will@kernel.org> drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 + 1 file changed, 1 insertion(+) commit 87cafa082ce395ff8a28ab23ff97dfe108604bf2 Author: Richard Acayan <mailingradian@gmail.com> Date: Wed Nov 13 19:47:15 2024 -0500 dt-bindings: iommu: arm,smmu: add sdm670 adreno iommu compatible SDM670 has a separate IOMMU for the GPU, like SDM845. Add the compatible for it. Signed-off-by: Richard Acayan <mailingradian@gmail.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241114004713.42404-5-mailingradian@gmail.com Signed-off-by: Will Deacon <will@kernel.org> Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 1 + 1 file changed, 1 insertion(+) commit b20821248e262a7d16882137419460030c1aead6 Merge: f143cece43dd da8656797ae1 Author: Kalle Valo <kvalo@kernel.org> Date: Mon Dec 9 20:41:20 2024 +0200 Merge tag 'ath-next-20241209' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath ath.git patches for v6.14 This development cycle featured multiple patchsets to ath12k to support the new 802.11be MLO feature, although the feature is still incomplete. Also in ath12k, there were other feature patches. In ath11k, support was added for QCA6698AQ. And there was the usual set of bug fixes and cleanups across most drivers, notable being the addition of "noinline_for_stack" to some functions to avoid "stack frame size" warnings when compiling with clang. commit 82c1f13de315f38ecdb63d8b0e63ad7d70994d55 Author: Mykyta Yatsenko <yatsenko@meta.com> Date: Mon Dec 9 13:04:55 2024 +0000 selftests/bpf: Add more stats into veristat Extend veristat to collect and print more stats, namely: - program size in instructions - jited program size in bytes - program type - attach type - stack depth Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241209130455.94592-1-mykyta.yatsenko5@gmail.com tools/testing/selftests/bpf/veristat.c | 64 ++++++++++++++++++++++++++++++---- 1 file changed, 58 insertions(+), 6 deletions(-) commit 41e12cebd9c39c9ef7b6686f2c4e8bc451a386fc Author: Marek Vasut <marex@denx.de> Date: Wed Nov 6 00:40:41 2024 +0100 ARM: dts: stm32: Sort M24256E write-lockable page in DH STM32MP13xx DHCOR SoM DT Move the M24256E write-lockable page subnode after RTC subnode in DH STM32MP13xx DHCOR SoM DT to keep the list of nodes sorted by I2C address. No functional change. Fixes: 3f2e7d167307 ("ARM: dts: stm32: Describe M24256E write-lockable page in DH STM32MP13xx DHCOR SoM DT") Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm/boot/dts/st/stm32mp13xx-dhcor-som.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a4422a9183278162093d4524fdf4b6bbd7dd8a28 Author: Marek Vasut <marex@denx.de> Date: Tue Nov 5 23:46:22 2024 +0100 ARM: dts: stm32: Increase CPU core voltage on STM32MP13xx DHCOR SoM The STM32MP13xx DHCOR DHSBC is populated with STM32MP13xx part capable of 1 GHz operation, increase the CPU core voltage to 1.35 V to make sure the SoC is stable even if the blobs unconditionally force the CPU to 1 GHz operation. It is not possible to make use of CPUfreq on the STM32MP13xx because the SCMI protocol 0x13 is not implemented by upstream OpTee-OS which is the SCMI provider. Fixes: 6331bddce649 ("ARM: dts: stm32: Add support for STM32MP13xx DHCOR SoM and DHSBC board") Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm/boot/dts/st/stm32mp13xx-dhcor-som.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 73317d327123472cb70e9ecbe050310f1d235e93 Author: Marek Vasut <marex@denx.de> Date: Wed Nov 6 00:29:44 2024 +0100 ARM: dts: stm32: Deduplicate serial aliases and chosen node for STM32MP15xx DHCOM SoM Deduplicate /aliases { serialN = ... } and /chosen node into stm32mp15xx-dhcom-som.dtsi , since the content is identical on all carrier boards using the STM32MP15xx DHCOM SoM. No functional change. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Christoph Niedermaier <cniedermaier@dh-electronics.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm/boot/dts/st/stm32mp15xx-dhcom-drc02.dtsi | 12 ------------ arch/arm/boot/dts/st/stm32mp15xx-dhcom-pdk2.dtsi | 10 ---------- arch/arm/boot/dts/st/stm32mp15xx-dhcom-picoitx.dtsi | 10 ---------- arch/arm/boot/dts/st/stm32mp15xx-dhcom-som.dtsi | 7 +++++++ 4 files changed, 7 insertions(+), 32 deletions(-) commit cb57c75098c1c449a007ba301f9073f96febaaa9 Author: Mirsad Todorovac <mtodorovac69@gmail.com> Date: Thu Nov 21 22:20:58 2024 +0100 drm/xe: fix the ERR_PTR() returned on failure to allocate tiny pt Running coccinelle spatch gave the following warning: ./drivers/gpu/drm/xe/tests/xe_migrate.c:226:5-11: inconsistent IS_ERR and PTR_ERR on line 228. The code reports PTR_ERR(pt) when IS_ERR(tiny) is checked: → 211 pt = xe_bo_create_pin_map(xe, tile, m->q->vm, XE_PAGE_SIZE, 212 ttm_bo_type_kernel, 213 XE_BO_FLAG_VRAM_IF_DGFX(tile) | 214 XE_BO_FLAG_PINNED); 215 if (IS_ERR(pt)) { 216 KUNIT_FAIL(test, "Failed to allocate fake pt: %li\n", 217 PTR_ERR(pt)); 218 goto free_big; 219 } 220 221 tiny = xe_bo_create_pin_map(xe, tile, m->q->vm, → 222 2 * SZ_4K, 223 ttm_bo_type_kernel, 224 XE_BO_FLAG_VRAM_IF_DGFX(tile) | 225 XE_BO_FLAG_PINNED); → 226 if (IS_ERR(tiny)) { → 227 KUNIT_FAIL(test, "Failed to allocate fake pt: %li\n", → 228 PTR_ERR(pt)); 229 goto free_pt; 230 } Now, the IS_ERR(tiny) and the corresponding PTR_ERR(pt) do not match. Returning PTR_ERR(tiny), as the last failed function call, seems logical. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Mirsad Todorovac <mtodorovac69@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241121212057.1526634-2-mtodorovac69@gmail.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/tests/xe_migrate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0df076d35c58bfec06803d317251b0ffc3c039a9 Author: Christian Bruel <christian.bruel@foss.st.com> Date: Mon Sep 30 19:08:47 2024 +0200 arm64: dts: st: Enable COMBOPHY on the stm32mp257f-ev1 board Enable the COMBOPHY with external pad clock on stm32mp257f-ev1 board, to be used for the PCIe clock provider. Signed-off-by: Christian Bruel <christian.bruel@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm64/boot/dts/st/stm32mp257f-ev1.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 486f87a8688c1641e00795e49a2fc2ad35257f2f Author: Christian Bruel <christian.bruel@foss.st.com> Date: Mon Sep 30 19:08:46 2024 +0200 arm64: dts: st: Add combophy node on stm32mp251 Add support for COMBOPHY which is used either by the USB3 and PCIe controller. USB3 or PCIe mode is done with phy_set_mode(). PCIe internal reference clock can be generated from the internal clock source or optionnaly from an external 100Mhz pad. Signed-off-by: Christian Bruel <christian.bruel@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm64/boot/dts/st/stm32mp251.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7c7abd1bf4019e7a88ead7d93d6708153f17abf7 Author: Olivier Moysan <olivier.moysan@foss.st.com> Date: Tue Nov 5 17:21:41 2024 +0100 arm64: dts: st: add spdifrx support on stm32mp251 Add S/PDIFRX support to STM32MP25 SoC family. Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm64/boot/dts/st/stm32mp251.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit bf26d75a95f1729eff7262ee11f3628b739ef9e4 Author: Olivier Moysan <olivier.moysan@foss.st.com> Date: Wed Nov 13 10:20:46 2024 +0100 arm64: dts: st: add sai support on stm32mp251 Add SAI support to STM32MP25 SoC family. Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm64/boot/dts/st/stm32mp251.dtsi | 136 +++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) commit 279f8c8d303d2a88608d98cfce5cfed9f7923658 Author: Olivier Moysan <olivier.moysan@foss.st.com> Date: Wed Nov 13 09:25:09 2024 +0100 arm64: dts: st: add i2s support to stm32mp251 Add I2S support to STM32MP25 SoCs. Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> arch/arm64/boot/dts/st/stm32mp251.dtsi | 45 ++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit f143cece43dd05fa651fa14d97726b67b92e9d03 Author: Pin-yen Lin <treapking@chromium.org> Date: Wed Nov 27 18:55:43 2024 +0800 wifi: mwifiex: decrease timeout waiting for host sleep from 10s to 5s In commit 52250cbee7f6 ("mwifiex: use timeout variant for wait_event_interruptible") it was noted that sometimes we seemed to miss the signal that our host sleep settings took effect. A 10 second timeout was added to the code to make sure we didn't hang forever waiting. It appears that this problem still exists and we hit the timeout sometimes for Chromebooks in the field. Recently on ChromeOS we've started setting the DPM watchdog to trip if full system suspend takes over 10 seconds. Given the timeout in the original patch, obviously we're hitting the DPM watchdog before mwifiex gets a chance to timeout. While we could increase the DPM watchdog in ChromeOS to avoid this problem, it's probably better to simply decrease the timeout. Any time we're waiting several seconds for the firmware to respond it's likely that the firmware won't ever respond. With that in mind, decrease the timeout in mwifiex from 10 seconds to 5 seconds. Suggested-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Pin-yen Lin <treapking@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Acked-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241127105709.4014302-1-treapking@chromium.org drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aba23b0a6a0df84b06ed0323ce127bf7257e4025 Author: Renjaya Raga Zenta <ragazenta@gmail.com> Date: Thu Nov 21 14:09:27 2024 +0700 wifi: brcmfmac: fix brcmf_vif_clear_mgmt_ies when stopping AP This removes the following error log when stopping AP: ieee80211 phy0: brcmf_vif_set_mgmt_ie: vndr ie set error : -52 It happened if: 1) previously wlan interface was in station mode (wpa_supplicant) and connected to a hotspot 2) then started AP mode (hostapd) 3) and then stopped AP mode. The error happened when it tried to clear BRCMF_VNDR_IE_PRBREQ_FLAG. This flag is not set in `brcmf_config_ap_mgmt_ie`, but BRCMF_VNDR_IE_ASSOCRSP_FLAG is set instead. Signed-off-by: Renjaya Raga Zenta <ragazenta@gmail.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241121-brcmfmac-v1-1-02fc3fb427c2@gmail.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 01e767d6f7832f1ef171816953547b466bba9937 Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Mon Nov 11 14:40:35 2024 +0100 wifi: wlcore: testmode: Constify strutc nla_policy 'struct nla_policy' 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: Before: ====== text data bss dec hex filename 5062 528 0 5590 15d6 drivers/net/wireless/ti/wlcore/testmode.o After: ===== text data bss dec hex filename 5178 404 0 5582 15ce drivers/net/wireless/ti/wlcore/testmode.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/78810e3ebb74ddbd3a4538f182bf1143b89baba7.1731332414.git.christophe.jaillet@wanadoo.fr drivers/net/wireless/ti/wlcore/testmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52e8726d6782a14c7f9e0fea5a5bc8e6a1992fd4 Author: Norbert van Bolhuis <nvbolhuis@gmail.com> Date: Fri Nov 8 13:52:30 2024 +0100 wifi: brcmfmac: fix scatter-gather handling by detecting end of sg list The scatter-gather handling uses a pre-allocated list (with nents entries). If the driver runs out of sg entries it will result in an oops. Let's detect this instead and make the SDIO block transfer fail. Signed-off-by: Norbert van Bolhuis <nvbolhuis@gmail.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241108125609.107016-1-nvbolhuis@gmail.com drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5fcccba1183374c84f2b2392655c15ec4dbe41bc Author: Gowthami Thiagarajan <gthiagarajan@marvell.com> Date: Fri Nov 8 09:36:19 2024 +0530 perf/marvell: Odyssey LLC-TAD performance monitor support Each TAD provides eight 64-bit counters for monitoring cache behavior.The driver always configures the same counter for all the TADs. The user would end up effectively reserving one of eight counters in every TAD to look across all TADs. The occurrences of events are aggregated and presented to the user at the end of running the workload. The driver does not provide a way for the user to partition TADs so that different TADs are used for different applications. The performance events reflect various internal or interface activities. By combining the values from multiple performance counters, cache performance can be measured in terms such as: cache miss rate, cache allocations, interface retry rate, internal resource occupancy, etc. Each supported counter's event and formatting information is exposed to sysfs at /sys/devices/tad/. Use perf tool stat command to measure the pmu events. For instance: perf stat -e tad_hit_ltg,tad_hit_dtg <workload> Signed-off-by: Gowthami Thiagarajan <gthiagarajan@marvell.com> Link: https://lore.kernel.org/r/20241108040619.753343-6-gthiagarajan@marvell.com Signed-off-by: Will Deacon <will@kernel.org> Documentation/admin-guide/perf/index.rst | 1 + .../admin-guide/perf/mrvl-odyssey-tad-pmu.rst | 37 ++++++++++++++++++++++ drivers/perf/marvell_cn10k_tad_pmu.c | 35 ++++++++++++++++++++ 3 files changed, 73 insertions(+) commit 59731e231c6fdcdcbb87beb31a10ba819c1fb7f6 Author: Gowthami Thiagarajan <gthiagarajan@marvell.com> Date: Fri Nov 8 09:36:18 2024 +0530 perf/marvell: Refactor to extract platform data Refactor the Marvell TAD PMU driver to add versioning to the existing driver. Make no functional changes, the behavior and performance of the driver remain unchanged. Signed-off-by: Gowthami Thiagarajan <gthiagarajan@marvell.com> Link: https://lore.kernel.org/r/20241108040619.753343-5-gthiagarajan@marvell.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/marvell_cn10k_tad_pmu.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit d950c381dce1dd69e3cf110df45c3bfcafdc9285 Author: Gowthami Thiagarajan <gthiagarajan@marvell.com> Date: Fri Nov 8 09:36:17 2024 +0530 perf/marvell: Odyssey DDR Performance monitor support Odyssey DRAM Subsystem supports eight counters for monitoring performance and software can program those counters to monitor any of the defined performance events. Supported performance events include those counted at the interface between the DDR controller and the PHY, interface between the DDR Controller and the CHI interconnect, or within the DDR Controller. Additionally DSS also supports two fixed performance event counters, one for ddr reads and the other for ddr writes. Signed-off-by: Gowthami Thiagarajan <gthiagarajan@marvell.com> Link: https://lore.kernel.org/r/20241108040619.753343-4-gthiagarajan@marvell.com Signed-off-by: Will Deacon <will@kernel.org> Documentation/admin-guide/perf/index.rst | 1 + .../admin-guide/perf/mrvl-odyssey-ddr-pmu.rst | 80 ++++++ drivers/perf/marvell_cn10k_ddr_pmu.c | 273 ++++++++++++++++++++- 3 files changed, 349 insertions(+), 5 deletions(-) commit 0045de7e8713db40eda6590aa5e7c1d1a0709200 Author: Gowthami Thiagarajan <gthiagarajan@marvell.com> Date: Fri Nov 8 09:36:16 2024 +0530 perf/marvell: Refactor to extract PMU operations Introduce a refactor to the Marvell DDR PMU driver to extract PMU operations ("pmu ops") from the existing driver. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@Huawei.com> Signed-off-by: Gowthami Thiagarajan <gthiagarajan@marvell.com> Link: https://lore.kernel.org/r/20241108040619.753343-3-gthiagarajan@marvell.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/marvell_cn10k_ddr_pmu.c | 105 +++++++++++++++++++++++++++-------- 1 file changed, 83 insertions(+), 22 deletions(-) commit 349f77e10952f0a9a37030e5caa55b80d044d739 Author: Gowthami Thiagarajan <gthiagarajan@marvell.com> Date: Fri Nov 8 09:36:15 2024 +0530 perf/marvell: Refactor to extract platform data Introduce a refactor to the Marvell DDR pmu driver to extract platform data ("pdata") from the existing driver. Prepare for the upcoming support of the next version of the Performance Monitoring Unit (PMU) in this driver. Make no functional changes, this refactor solely improves code organization and prepares for future enhancements. While at it, fix a typo. Signed-off-by: Gowthami Thiagarajan <gthiagarajan@marvell.com> Link: https://lore.kernel.org/r/20241108040619.753343-2-gthiagarajan@marvell.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/marvell_cn10k_ddr_pmu.c | 162 ++++++++++++++++++++++++----------- 1 file changed, 113 insertions(+), 49 deletions(-) commit 8632306e093c56508aee876dd8855d53399aa83b Author: Ilkka Koskinen <ilkka@os.amperecomputing.com> Date: Thu Dec 5 06:19:14 2024 +0000 Documentation: dwc_pcie_pmu: Fix the mnemonics and eventid Fix the event id and type in the example. In addition, the recent fix, which addressed the mnemonics with mixed case, didn't fix the document. Match the names with the driver. Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com> Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com> Link: https://lore.kernel.org/r/20241205061914.5568-3-ilkka@os.amperecomputing.com Signed-off-by: Will Deacon <will@kernel.org> Documentation/admin-guide/perf/dwc_pcie_pmu.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e64c22cc2e6177a5ff59eee394cf4f4dd2f0ed91 Author: Ilkka Koskinen <ilkka@os.amperecomputing.com> Date: Thu Dec 5 06:19:13 2024 +0000 perf/dwc_pcie: Fix the event numbers According to Databook, L1 aux is event number 0x08 and TX L0s and RX L0S is 0x09. Fix the event numbers for the two events. Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com> Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com> Link: https://lore.kernel.org/r/20241205061914.5568-2-ilkka@os.amperecomputing.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/dwc_pcie_pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 33f029af89791f5d55cbfcb72a6c1b32a8905584 Merge: 76ba5467ecfd fac04efc5c79 Author: Maarten Lankhorst <dev@lankhorst.se> Date: Mon Dec 9 16:28:17 2024 +0100 Merge remote-tracking branch 'drm/drm-next' into drm-misc-next The v6.13-rc2 release included a bunch of breaking changes, specifically the MODULE_IMPORT_NS commit. Backmerge in order to fix them before the next pull-request. Include the fix from Stephen Roswell. Caused by commit 25c3fd1183c0 ("drm/virtio: Add a helper to map and note the dma addrs and lengths") Interacting with commit cdd30ebb1b9f ("module: Convert symbol namespace to string literal") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Link: https://patchwork.freedesktop.org/patch/msgid/20241209121717.2abe8026@canb.auug.org.au Signed-off-by: Maarten Lankhorst <dev@lankhorst.se> commit bce61d5c57647ca4565847217fe811260cc60173 Author: Besar Wicaksono <bwicaksono@nvidia.com> Date: Thu Oct 31 14:21:18 2024 +0000 perf: arm_cspmu: nvidia: monitor all ports by default Some NVIDIA PMUs like the NVLINK-C2C, CNVLINK, and PCIE PMU provide port filtering. If the port filter is set to zero, the counter of these PMUs will not capture any event. To avoid meaningless experiment, the driver sets the port filter value to a default non-zero value. Signed-off-by: Besar Wicaksono <bwicaksono@nvidia.com> Link: https://lore.kernel.org/r/20241031142118.1865965-5-bwicaksono@nvidia.com Signed-off-by: Will Deacon <will@kernel.org> Documentation/admin-guide/perf/nvidia-pmu.rst | 12 ++++++++---- drivers/perf/arm_cspmu/nvidia_cspmu.c | 6 ++++-- 2 files changed, 12 insertions(+), 6 deletions(-) commit ca26df4b1036bcad326170a6ddb5245f6d6e8d82 Author: Besar Wicaksono <bwicaksono@nvidia.com> Date: Thu Oct 31 14:21:17 2024 +0000 perf: arm_cspmu: nvidia: enable NVLINK-C2C port filtering Enable NVLINK-C2C port filtering to distinguish traffic from different GPUs connected to NVLINK-C2C. Signed-off-by: Besar Wicaksono <bwicaksono@nvidia.com> Link: https://lore.kernel.org/r/20241031142118.1865965-4-bwicaksono@nvidia.com Signed-off-by: Will Deacon <will@kernel.org> Documentation/admin-guide/perf/nvidia-pmu.rst | 30 +++++++++++++++++++++++++++ drivers/perf/arm_cspmu/nvidia_cspmu.c | 5 +++-- 2 files changed, 33 insertions(+), 2 deletions(-) commit 5f7cd0dc98a658d6470bc738499e01172bc6007f Author: Besar Wicaksono <bwicaksono@nvidia.com> Date: Thu Oct 31 14:21:16 2024 +0000 perf: arm_cspmu: nvidia: fix sysfs path in the kernel doc Fix typos to the sysfs path referenced by NVIDIA uncore pmu kernel doc. Signed-off-by: Besar Wicaksono <bwicaksono@nvidia.com> Link: https://lore.kernel.org/r/20241031142118.1865965-3-bwicaksono@nvidia.com Signed-off-by: Will Deacon <will@kernel.org> Documentation/admin-guide/perf/nvidia-pmu.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit ac4c52956f62700803754ffba906e42126273956 Author: Besar Wicaksono <bwicaksono@nvidia.com> Date: Thu Oct 31 14:21:15 2024 +0000 perf: arm_cspmu: nvidia: remove unsupported SCF events Remove unsupported events under SCF PMU. Signed-off-by: Besar Wicaksono <bwicaksono@nvidia.com> Link: https://lore.kernel.org/r/20241031142118.1865965-2-bwicaksono@nvidia.com Signed-off-by: Will Deacon <will@kernel.org> drivers/perf/arm_cspmu/nvidia_cspmu.c | 64 ----------------------------------- 1 file changed, 64 deletions(-) commit bc893280751ab566892399fe4e81a9a67a4097be Merge: 26bba754539a fac04efc5c79 Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Mon Dec 9 09:56:45 2024 -0500 Merge drm/drm-next into drm-xe-next Catch up with -rc2 and fixing namespace conflict issue caused by commit cdd30ebb1b9f ("module: Convert symbol namespace to string literal") and commit 0c45e76fcc62 ("drm/xe/vsec: Support BMG devices") Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> commit 02c56362a7d3eccc209d5c00d73a06513d2504d5 Author: Andrii Nakryiko <andrii@kernel.org> Date: Fri Dec 6 10:34:36 2024 -0800 uprobes: Guard against kmemdup() failing in dup_return_instance() If kmemdup() failed to alloc memory, don't proceed with extra_consumers copy. Fixes: e62f2d492728 ("uprobes: Simplify session consumer tracking") Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20241206183436.968068-1-andrii@kernel.org kernel/events/uprobes.c | 2 ++ 1 file changed, 2 insertions(+) commit d29e744c71673a71da8f8522799ee02744cad6c9 Author: Namhyung Kim <namhyung@kernel.org> Date: Tue Dec 3 10:04:41 2024 -0800 perf/x86: Relax privilege filter restriction on AMD IBS While IBS is available for per-thread profiling, still regular users cannot open an event due to the default paranoid setting (2) which doesn't allow unprivileged users to get kernel samples. That means it needs to set exclude_kernel bit in the attribute but IBS driver would reject it since it has PERF_PMU_CAP_NO_EXCLUDE. This is not what we want and I've been getting requests to fix this issue. This should be done in the hardware, but until we get the HW fix we may allow exclude_{kernel,user,hv} in the attribute and silently drop the samples in the PMU IRQ handler. It won't guarantee the sampling frequency or even it'd miss some with fixed period too. Not ideal, but that'd still be helpful to regular users. To minimize the confusion, let's add 'swfilt' bit to attr.config2 which is exposed in the sysfs format directory so that users can figure out if the kernel support the privilege filters by software. $ perf record -e ibs_op/swfilt=1/u true This uses perf_exclude_event() which checks regs->cs. But it should be fine because set_linear_ip() also updates the CS according to the RIP provided by IBS. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Tested-by: Ravi Bangoria <ravi.bangoria@amd.com> Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com> Link: https://lore.kernel.org/r/20241203180441.1634709-3-namhyung@kernel.org arch/x86/events/amd/ibs.c | 59 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 18 deletions(-) commit 6057b90ecc84f232dd32a047a086a4c4c271765f Author: Namhyung Kim <namhyung@kernel.org> Date: Tue Dec 3 10:04:40 2024 -0800 perf/core: Export perf_exclude_event() While at it, rename the same function in s390 cpum_sf PMU. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Tested-by: Ravi Bangoria <ravi.bangoria@amd.com> Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com> Acked-by: Thomas Richter <tmricht@linux.ibm.com> Link: https://lore.kernel.org/r/20241203180441.1634709-2-namhyung@kernel.org arch/s390/kernel/perf_cpum_sf.c | 6 +++--- include/linux/perf_event.h | 6 ++++++ kernel/events/core.c | 3 +-- 3 files changed, 10 insertions(+), 5 deletions(-) commit 8622e45b5da17e777e0e45f16296072494452318 Author: Andrii Nakryiko <andrii@kernel.org> Date: Thu Dec 5 16:24:17 2024 -0800 uprobes: Reuse return_instances between multiple uretprobes within task Instead of constantly allocating and freeing very short-lived struct return_instance, reuse it as much as possible within current task. For that, store a linked list of reusable return_instances within current->utask. The only complication is that ri_timer() might be still processing such return_instance. And so while the main uretprobe processing logic might be already done with return_instance and would be OK to immediately reuse it for the next uretprobe instance, it's not correct to unconditionally reuse it just like that. Instead we make sure that ri_timer() can't possibly be processing it by using seqcount_t, with ri_timer() being "a writer", while free_ret_instance() being "a reader". If, after we unlink return instance from utask->return_instances list, we know that ri_timer() hasn't gotten to processing utask->return_instances yet, then we can be sure that immediate return_instance reuse is OK, and so we put it onto utask->ri_pool for future (potentially, almost immediate) reuse. This change shows improvements both in single CPU performance (by avoiding relatively expensive kmalloc/free combon) and in terms of multi-CPU scalability, where you can see that per-CPU throughput doesn't decline as steeply with increased number of CPUs (which were previously attributed to kmalloc()/free() through profiling): BASELINE (latest perf/core) =========================== uretprobe-nop ( 1 cpus): 1.898 ± 0.002M/s ( 1.898M/s/cpu) uretprobe-nop ( 2 cpus): 3.574 ± 0.011M/s ( 1.787M/s/cpu) uretprobe-nop ( 3 cpus): 5.279 ± 0.066M/s ( 1.760M/s/cpu) uretprobe-nop ( 4 cpus): 6.824 ± 0.047M/s ( 1.706M/s/cpu) uretprobe-nop ( 5 cpus): 8.339 ± 0.060M/s ( 1.668M/s/cpu) uretprobe-nop ( 6 cpus): 9.812 ± 0.047M/s ( 1.635M/s/cpu) uretprobe-nop ( 7 cpus): 11.030 ± 0.048M/s ( 1.576M/s/cpu) uretprobe-nop ( 8 cpus): 12.453 ± 0.126M/s ( 1.557M/s/cpu) uretprobe-nop (10 cpus): 14.838 ± 0.044M/s ( 1.484M/s/cpu) uretprobe-nop (12 cpus): 17.092 ± 0.115M/s ( 1.424M/s/cpu) uretprobe-nop (14 cpus): 19.576 ± 0.022M/s ( 1.398M/s/cpu) uretprobe-nop (16 cpus): 22.264 ± 0.015M/s ( 1.391M/s/cpu) uretprobe-nop (24 cpus): 33.534 ± 0.078M/s ( 1.397M/s/cpu) uretprobe-nop (32 cpus): 43.262 ± 0.127M/s ( 1.352M/s/cpu) uretprobe-nop (40 cpus): 53.252 ± 0.080M/s ( 1.331M/s/cpu) uretprobe-nop (48 cpus): 55.778 ± 0.045M/s ( 1.162M/s/cpu) uretprobe-nop (56 cpus): 56.850 ± 0.227M/s ( 1.015M/s/cpu) uretprobe-nop (64 cpus): 62.005 ± 0.077M/s ( 0.969M/s/cpu) uretprobe-nop (72 cpus): 66.445 ± 0.236M/s ( 0.923M/s/cpu) uretprobe-nop (80 cpus): 68.353 ± 0.180M/s ( 0.854M/s/cpu) THIS PATCHSET (on top of latest perf/core) ========================================== uretprobe-nop ( 1 cpus): 2.253 ± 0.004M/s ( 2.253M/s/cpu) uretprobe-nop ( 2 cpus): 4.281 ± 0.003M/s ( 2.140M/s/cpu) uretprobe-nop ( 3 cpus): 6.389 ± 0.027M/s ( 2.130M/s/cpu) uretprobe-nop ( 4 cpus): 8.328 ± 0.005M/s ( 2.082M/s/cpu) uretprobe-nop ( 5 cpus): 10.353 ± 0.001M/s ( 2.071M/s/cpu) uretprobe-nop ( 6 cpus): 12.513 ± 0.010M/s ( 2.086M/s/cpu) uretprobe-nop ( 7 cpus): 14.525 ± 0.017M/s ( 2.075M/s/cpu) uretprobe-nop ( 8 cpus): 15.633 ± 0.013M/s ( 1.954M/s/cpu) uretprobe-nop (10 cpus): 19.532 ± 0.011M/s ( 1.953M/s/cpu) uretprobe-nop (12 cpus): 21.405 ± 0.009M/s ( 1.784M/s/cpu) uretprobe-nop (14 cpus): 24.857 ± 0.020M/s ( 1.776M/s/cpu) uretprobe-nop (16 cpus): 26.466 ± 0.018M/s ( 1.654M/s/cpu) uretprobe-nop (24 cpus): 40.513 ± 0.222M/s ( 1.688M/s/cpu) uretprobe-nop (32 cpus): 54.180 ± 0.074M/s ( 1.693M/s/cpu) uretprobe-nop (40 cpus): 66.100 ± 0.082M/s ( 1.652M/s/cpu) uretprobe-nop (48 cpus): 70.544 ± 0.068M/s ( 1.470M/s/cpu) uretprobe-nop (56 cpus): 74.494 ± 0.055M/s ( 1.330M/s/cpu) uretprobe-nop (64 cpus): 79.317 ± 0.029M/s ( 1.239M/s/cpu) uretprobe-nop (72 cpus): 84.875 ± 0.020M/s ( 1.179M/s/cpu) uretprobe-nop (80 cpus): 92.318 ± 0.224M/s ( 1.154M/s/cpu) For reference, with uprobe-nop we hit the following throughput: uprobe-nop (80 cpus): 143.485 ± 0.035M/s ( 1.794M/s/cpu) So now uretprobe stays a bit closer to that performance. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Oleg Nesterov <oleg@redhat.com> Link: https://lore.kernel.org/r/20241206002417.3295533-5-andrii@kernel.org include/linux/uprobes.h | 6 +++- kernel/events/uprobes.c | 83 +++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 75 insertions(+), 14 deletions(-) commit 0cf981de7687b26ccc9bd4e6daa8fa6b177f91a9 Author: Andrii Nakryiko <andrii@kernel.org> Date: Thu Dec 5 16:24:16 2024 -0800 uprobes: Ensure return_instance is detached from the list before freeing Ensure that by the time we call free_ret_instance() to clean up an instance of struct return_instance it isn't reachable from utask->return_instances anymore. free_ret_instance() is called in a few different situations, all but one of which already are fine w.r.t. return_instance visibility: - uprobe_free_utask() guarantees that ri_timer() won't be called (through timer_delete_sync() call), and so there is no need to unlink anything, because entire utask is being freed; - uprobe_handle_trampoline() is already unlinking to-be-freed return_instance with rcu_assign_pointer() before calling free_ret_instance(). Only cleanup_return_instances() violates this property, which so far is not causing problems due to RCU-delayed freeing of return_instance, which we'll change in the next patch. So make sure we unlink return_instance before passing it into free_ret_instance(), as otherwise reuse will be unsafe. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Oleg Nesterov <oleg@redhat.com> Link: https://lore.kernel.org/r/20241206002417.3295533-4-andrii@kernel.org kernel/events/uprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 636666a1c73313a0cc9a0a6671c29e2d6ebe16fb Author: Andrii Nakryiko <andrii@kernel.org> Date: Thu Dec 5 16:24:15 2024 -0800 uprobes: Decouple return_instance list traversal and freeing free_ret_instance() has two unrelated responsibilities: actually cleaning up return_instance's resources and freeing memory, and also helping with utask->return_instances list traversal by returning the next alive pointer. There is no reason why these two aspects have to be mixed together, so turn free_ret_instance() into void-returning function and make callers do list traversal on their own. We'll use this simplification in the next patch that will guarantee that to-be-freed return_instance isn't reachable from utask->return_instances list. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Oleg Nesterov <oleg@redhat.com> Link: https://lore.kernel.org/r/20241206002417.3295533-3-andrii@kernel.org kernel/events/uprobes.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) commit 2ff913ab3f472321ac1931b663314edd6c211a0c Author: Andrii Nakryiko <andrii@kernel.org> Date: Thu Dec 5 16:24:14 2024 -0800 uprobes: Simplify session consumer tracking In practice, each return_instance will typically contain either zero or one return_consumer, depending on whether it has any uprobe session consumer attached or not. It's highly unlikely that more than one uprobe session consumers will be attached to any given uprobe, so there is no need to optimize for that case. But the way we currently do memory allocation and accounting is by pre-allocating the space for 4 session consumers in contiguous block of memory next to struct return_instance fixed part. This is unnecessarily wasteful. This patch changes this to keep struct return_instance fixed-sized with one pre-allocated return_consumer, while (in a highly unlikely scenario) allowing for more session consumers in a separate dynamically allocated and reallocated array. We also simplify accounting a bit by not maintaining a separate temporary capacity for consumers array, and, instead, relying on krealloc() to be a no-op if underlying memory can accommodate a slightly bigger allocation (but again, it's very uncommon scenario to even have to do this reallocation). All this gets rid of ri_size(), simplifies push_consumer() and removes confusing ri->consumers_cnt re-assignment, while containing this singular preallocated consumer logic contained within a few simple preexisting helpers. Having fixed-sized struct return_instance simplifies and speeds up return_instance reuse that we ultimately add later in this patch set, see follow up patches. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Oleg Nesterov <oleg@redhat.com> Link: https://lore.kernel.org/r/20241206002417.3295533-2-andrii@kernel.org include/linux/uprobes.h | 10 +++++-- kernel/events/uprobes.c | 72 +++++++++++++++++++++++++------------------------ 2 files changed, 45 insertions(+), 37 deletions(-) commit 82c54741fc567497e105b7591cb90bae777a8b66 Author: Jani Nikula <jani.nikula@intel.com> Date: Thu Dec 5 14:37:20 2024 +0200 drm/i915/pps: include panel power cycle delay in debugfs The debugfs contains all the other timings except panel power cycle delay. Add it for completeness. Tested-by: Paul Menzel <pmenzel@molgen.mpg.de> # Dell XPS 13 9360 Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241205123720.3278727-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_pps.c | 2 ++ 1 file changed, 2 insertions(+) commit 34e025972c4e2f38c5c92ca1cda260d4d0968a5d Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Dec 4 18:00:48 2024 +0200 drm/i915/pps: debug log the remaining power cycle delay to wait While pps_init_delays() debug logs the power cycle delay, also debug log the actual remaining time to wait in wait_panel_power_cycle(). Note that this still isn't the full picture; the power sequencer may still wait after this one. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13007 Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Tested-by: Paul Menzel <pmenzel@molgen.mpg.de> # Dell XPS 13 Link: https://patchwork.freedesktop.org/patch/msgid/20241204160048.2774419-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_pps.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 6e750d3ec7410c8d3aa6a006d37142eb837b3c03 Author: Marcus Cooper <codekipper@gmail.com> Date: Mon Nov 11 17:55:31 2024 +0100 ASoC: sun4i-spdif: Add working 24bit audio support 24 bit audio file can be detected by the alsa driver as S32_LE. Add this format to what is supported and change the DMA address width. Signed-off-by: Marcus Cooper <codekipper@gmail.com> Link: https://patch.msgid.link/20241111165600.57219-4-codekipper@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sunxi/sun4i-spdif.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 80ac12ffb3a9e19a2f11eb1975ed31c9a39183c8 Author: Marcus Cooper <codekipper@gmail.com> Date: Mon Nov 11 17:55:30 2024 +0100 ASoC: sun4i-spdif: Always set the valid data to be the MSB This doesn't affect 16bit formats and allows us to properly run 24bit formats. Signed-off-by: Marcus Cooper <codekipper@gmail.com> Link: https://patch.msgid.link/20241111165600.57219-3-codekipper@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sunxi/sun4i-spdif.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0a2319308de88b9e819c0b43d0fccd857123eb31 Author: George Lander <lander@jagmn.com> Date: Mon Nov 11 17:55:29 2024 +0100 ASoC: sun4i-spdif: Add clock multiplier settings There have been intermittent issues with the SPDIF output on H3 and H2+ devices which has been fixed by setting the s_clk to 4 times the audio pll. Add a quirk for the clock multiplier as not every supported SoC requires it. Without the multiplier, the audio at normal sampling rates was distorted and did not play at higher sampling rates. Fixes: 1bd92af877ab ("ASoC: sun4i-spdif: Add support for the H3 SoC") Signed-off-by: George Lander <lander@jagmn.com> Signed-off-by: Marcus Cooper <codekipper@gmail.com> Link: https://patch.msgid.link/20241111165600.57219-2-codekipper@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sunxi/sun4i-spdif.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a17162f0b2dc97aa2dedfde8a7226fb9b5210534 Author: Stefan Wahren <wahrenst@gmx.net> Date: Mon Dec 9 12:13:16 2024 +0100 spi: mxs: support effective_speed_hz Setting spi_transfer->effective_speed_hz in transfer_one_message so that SPI client driver can use it. Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Link: https://patch.msgid.link/20241209111316.4767-1-wahrenst@gmx.net Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-mxs.c | 2 ++ 1 file changed, 2 insertions(+) commit 8332e667099712e05ec87ba2058af394b51ebdc9 Author: Mingwei Zheng <zmw12306@gmail.com> Date: Fri Dec 6 20:52:06 2024 -0500 spi: zynq-qspi: Add check for clk_enable() Add check for the return value of clk_enable() to catch the potential error. Fixes: c618a90dcaf3 ("spi: zynq-qspi: Drop GPIO header") Signed-off-by: Mingwei Zheng <zmw12306@gmail.com> Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com> Link: https://patch.msgid.link/20241207015206.3689364-1-zmw12306@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-zynq-qspi.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 0020c9d2d572b49c55b2e1fabe6f6687e11a3ced Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Sun Dec 8 18:03:17 2024 +0200 spi: Deduplicate deferred probe checks in spi_probe() Deduplicate deferred probe checks in spi_probe() and enable the error message for ACPI case as well. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241208195635.1271656-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit b6ffe0e6147915fe3d31705e14dfbbecb724fb81 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Sun Dec 8 18:03:16 2024 +0200 spi: Unify firmware node type checks The few functions are using different approaches on how to check for the type of firmware node. Unify them to use a modern way of it. With that in place it becomes obvious that no need to have independent conditionals when they are dependent and hence the code generation can be improved a little bit (clang-18, x86_64): add/remove: 0/0 grow/shrink: 2/2 up/down: 16/-46 (-30) Total: Before=49801, After=49771, chg -0.06% Meanwhile no functional changes intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241208195635.1271656-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 017b76fb8e5b6066f6791e7ad2387deb2c9c9a14 Author: Joy Zou <joy.zou@nxp.com> Date: Thu Dec 5 11:51:12 2024 -0500 regulator: pca9450: Add PMIC pca9452 support Add the PMIC pca9452 support, which add ldo3 compared with pca9451a. Signed-off-by: Joy Zou <joy.zou@nxp.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20241205-pca9450-v1-4-aab448b74e78@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/regulator/pca9450-regulator.c | 29 ++++++++++++++++++++++++++++- include/linux/regulator/pca9450.h | 1 + 2 files changed, 29 insertions(+), 1 deletion(-) commit 17b531c162e5dbdce9a184ccd1c730ae3f31576b Author: Joy Zou <joy.zou@nxp.com> Date: Thu Dec 5 11:51:11 2024 -0500 regulator: dt-bindings: pca9450: Add pca9452 support Add compatible string 'nxp,pca9452'. pca9452 add 'ldo3' compared with pca9451a. Signed-off-by: Joy Zou <joy.zou@nxp.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20241205-pca9450-v1-3-aab448b74e78@nxp.com Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org> Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml | 1 + 1 file changed, 1 insertion(+) commit 0f5c601098bd3c9cdfea3e01aacdd9d0c4010ea7 Author: Frank Li <Frank.Li@nxp.com> Date: Thu Dec 5 11:51:10 2024 -0500 regulator: pca9450: Use dev_err_probe() to simplify code Use dev_err_probe() to simplify code. Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20241205-pca9450-v1-2-aab448b74e78@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/regulator/pca9450-regulator.c | 73 +++++++++++++---------------------- 1 file changed, 27 insertions(+), 46 deletions(-) commit 229773f90b1f886e8fd542f98b495c66e43be5ba Author: Robin Gong <yibin.gong@nxp.com> Date: Thu Dec 5 11:51:09 2024 -0500 regulator: pca9450: add enable_value for all bucks Set 'enable_value' in the regulator descriptor for different bucks to manage their enable modes: - 00b: OFF - 01b: ON when PMIC_ON_REQ = H - 10b: ON when PMIC_ON_REQ = H && PMIC_STBY_REQ = L - 11b: Always ON Ensure appropriate behavior based on the intended design. For example: - Buck2, designed for vddarm, should be set to '10b' (ON when PMIC_STBY_REQ = L) since it can be off when `PMIC_STBY_REQ = H` after the kernel enters suspend. - Other bucks remain '01b' (ON when PMIC_ON_REQ = H), matching the default setting. This avoids the need to re-enable them during kernel boot as they are already enabled after PMIC initialization. Signed-off-by: Robin Gong <yibin.gong@nxp.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20241205-pca9450-v1-1-aab448b74e78@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/regulator/pca9450-regulator.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 7d57d1ce9398bb59fa0b251aa2ffa6eafef5cff4 Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 14:00:01 2024 -0600 ASoC: wm8985: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-21-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/wm8985.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 77f3bfeacb939b47e1ffcda000cdf3c52af70e0f Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 14:00:00 2024 -0600 ASoC: wm8904: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-20-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/wm8904.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit cb47dcedef8dee9e9e64598612b2a301f70a7fdb Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:59 2024 -0600 ASoC: tpa6130a2: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-19-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/tpa6130a2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2a169c459d9614dd6edebd8d34ab096b09f134ac Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:58 2024 -0600 ASoC: tlv320aic3x: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-18-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/tlv320aic3x-i2c.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f742875ee2534473ca4bf5ce1e120bebdf8d624d Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:57 2024 -0600 ASoC: tlv320aic31xx: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-17-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/tlv320aic31xx.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 55cf63cc8d951246ec35195ae5a1628beb9c9da3 Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:56 2024 -0600 ASoC: tlv320adc3xxx: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-16-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/tlv320adc3xxx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 06c61070173803a5341be31ff5281d15cc133e5d Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:55 2024 -0600 ASoC: tas5720: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-15-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/tas5720.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit af4cffb250ec9e26a76c90cf753f1a6630811eed Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:54 2024 -0600 ASoC: tas2781: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-14-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/tas2781-i2c.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit eb4b5da0ecf61135533574285bacb9dab4fc4703 Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:53 2024 -0600 ASoC: tas2562: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-13-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/tas2562.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6c978c1baeb8449114e8cb35c68832e903f713d8 Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:52 2024 -0600 ASoC: ssm2602: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-12-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/ssm2602-i2c.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 0a7bd3dba60a967032ce8c05b4d81350f01ecc8a Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:51 2024 -0600 ASoc: pcm6240: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-11-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/pcm6240.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b9f99efcc59ae86bcf238719e29427e9519b3878 Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:50 2024 -0600 ASoC: pcm186x: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-10-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/pcm186x-i2c.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a8bb9855de4c5ca5b586814b7f8cc4a77d9e8b9c Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:49 2024 -0600 ASoC: max98095: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-9-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/max98095.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit db2aaa0943803fbba606e3b59b5cf900eced2a5c Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:48 2024 -0600 ASoC: max98090: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-8-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/max98090.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit ebf572bfefcd27584e1b32b0dd51ba71f3fe33d6 Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:47 2024 -0600 ASoC: max98088: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-7-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/max98088.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 99816f3fa964380a50ccc898b08cc7d9dd58c764 Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:46 2024 -0600 ASoC: alc5632: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-6-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/alc5632.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b5e8f7abbb73d0f71ec8742c990c7e1ffa44a554 Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:45 2024 -0600 ASoC: alc5623: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-5-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/alc5623.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d6ba6f50fae4170a8b7058da81dc2644913a5216 Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:44 2024 -0600 ASoC: adau1977: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-4-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/adau1977-i2c.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f9812846ffdb1f5686154cae18ca8cc765232967 Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:43 2024 -0600 ASoC: adau1781: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-3-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/adau1781-i2c.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 56731c80fc3b17850e49913cec262c2bcaa88dcb Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:42 2024 -0600 ASoC: adau1761: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-2-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/adau1761-i2c.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 8c491103c946fb760005044a74c82d7cf6c6f6b4 Author: Andrew Davis <afd@ti.com> Date: Tue Dec 3 13:59:41 2024 -0600 ASoC: ad193x: Remove use of i2c_match_id() The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20241203200001.197295-1-afd@ti.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/ad193x-i2c.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e9705da8472f306b44cbe1992ea2161bb96ece6e Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Mon Dec 9 10:44:42 2024 +0100 ASoC: dt-bindings: qcom,wcd9335: Drop number of DAIs from the header Number of DAIs in the codec is not really a binding constant, because it could grow, e.g. when we implement missing features. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20241209094442.38900-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org> include/dt-bindings/sound/qcom,wcd9335.h | 1 - 1 file changed, 1 deletion(-) commit 76c29db042e4f0fdea75c76cd4ad5f36080cd1c9 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Mon Dec 9 10:44:41 2024 +0100 ASoC: codecs: wcd9335: Add define for number of DAIs Number of DAIs in the codec is not really a binding, because it could grow, e.g. when we implement missing features. Add the define to the driver, which will replace the one in the binding header. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20241209094442.38900-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/wcd9335.c | 2 ++ 1 file changed, 2 insertions(+) commit d7f671b2f566379f275c13e25a29fa7001bb278f Author: Simon Trimmer <simont@opensource.cirrus.com> Date: Fri Dec 6 15:59:03 2024 +0800 ASoC: Intel: soc-acpi: arl: Add match entries for new cs42l43 laptops Add some new match table entries on Arrowlake for some coming cs42l43 laptops. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20241206075903.195730-11-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/common/soc-acpi-intel-arl-match.c | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit a3003af649efb6f3d86d379d1e9a966ea6d5f5ab Author: Simon Trimmer <simont@opensource.cirrus.com> Date: Fri Dec 6 15:59:02 2024 +0800 ASoC: Intel: soc-acpi: arl: Correct naming of a cs35l56 address struct As there are many combinations these follow a naming scheme to make the content of link structures clearer: cs35l56_<controller link>_<l or r><unique instance id>_adr Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20241206075903.195730-10-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/common/soc-acpi-intel-arl-match.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a7ebb0255188a7a2f1c9edd5660346bd5b17fb7b Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Fri Dec 6 15:59:01 2024 +0800 ASoC: Intel: soc-acpi-intel-ptl-match: add rt713_vb_l2_rt1320_l13 support Add rt713_vb on SoundWire link 2 and rt1320 on SoundWire link 1 and 3 configuration support. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://patch.msgid.link/20241206075903.195730-9-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/common/soc-acpi-intel-ptl-match.c | 77 +++++++++++++++++++++++ 1 file changed, 77 insertions(+) commit 124d534c581cda93aae06b37351ed76af7b98d5c Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Fri Dec 6 15:59:00 2024 +0800 ASoC: Intel: soc-acpi-intel-lnl-match: add rt713_vb_l2_rt1320_l13 support Add rt713_vb on SoundWire link 2 and rt1320 on SoundWire link 1 and 3 configuration support. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://patch.msgid.link/20241206075903.195730-8-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/common/soc-acpi-intel-lnl-match.c | 70 +++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit bd40d912728fc306e0861c82af4a359d8691ee16 Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Fri Dec 6 15:58:59 2024 +0800 ASoC: Intel: soc-acpi-intel-ptl-match: add rt712_vb + rt1320 support Add rt712_vb on SDW link 2 and 1 rt1320 on SDW link 1 configuration support. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://patch.msgid.link/20241206075903.195730-7-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/common/soc-acpi-intel-ptl-match.c | 71 +++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit 558d516e4b0f886f15ea04c83bf3ab0bbe62e474 Author: Simon Trimmer <simont@opensource.cirrus.com> Date: Fri Dec 6 15:58:58 2024 +0800 ASoC: Intel: sof_sdw: Add a dev_dbg message for the SOC_SDW_CODEC_MIC quirk Add debug message when SOC_SDW_CODEC_MIC is enabled (which informs the machine driver to not bind in the cs42l43 microphone DAI link). Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20241206075903.195730-6-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/boards/sof_sdw.c | 2 ++ 1 file changed, 2 insertions(+) commit 7662f0e5d55728a009229112ec820e963ed0e21c Author: Simon Trimmer <simont@opensource.cirrus.com> Date: Fri Dec 6 15:58:57 2024 +0800 ASoC: Intel: sof_sdw: Correct quirk for Lenovo Yoga Slim 7 In addition to changing the DMI match to examine the product name rather than the SKU, this adds the quirk to inform the machine driver to not bind in the cs42l43 microphone DAI link. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20241206075903.195730-5-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/boards/sof_sdw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 41f91a884f9e5d9fda73fcb30d87b72fb7526216 Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Fri Dec 6 15:58:56 2024 +0800 ASoC: Intel: sof_sdw: improve the log of DAI link numbers The log shows the number for different type of DAIs. Add "DAI link numbers:" to make the log be more explicit. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://patch.msgid.link/20241206075903.195730-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/boards/sof_sdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90a73807fd8a6c044cc971e53c2cc602f3841ef6 Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Fri Dec 6 15:58:55 2024 +0800 ASoC: Intel: sof_sdw: reduce log level for not using internal dmic ctx->ignore_internal_dmic is set when there is a dedicated SoundWire DMIC is in the system. In other words, ignoring internal DMIC is expected, not an error. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://patch.msgid.link/20241206075903.195730-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/boards/sof_sdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ab80a2961c75562ffbac1f80de151a978c31659 Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Fri Dec 6 15:58:54 2024 +0800 ASoC: Intel: sof_sdw: correct mach_params->dmic_num mach_params->dmic_num will be used to set the cfg-mics value of card->components string which should be the dmic channels. However dmic_num is dmic link number and could be set due to the SOC_SDW_PCH_DMIC quirk. Set mach_params->dmic_num to the default value if the dmic link is created due to the SOC_SDW_PCH_DMIC quirk. Fixes: 7db9f6361170 ("ASoC: Intel: sof_sdw: overwrite mach_params->dmic_num") Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://patch.msgid.link/20241206075903.195730-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/boards/sof_sdw.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit bd4a5c8d5356fa42a1d63b684d34cf58a21eb8f7 Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Tue Dec 3 02:10:32 2024 +0000 ASoC: simple-card-utils: use for_each_of_graph_port() on graph_get_dai_id() Because DT check when compiling become very strict in these days, we need to add reg = <x> if it has multi port/endpoint, otherwise it will get error or warning. But it was not so strict and/or mandatry before. Current code is counting "endpoint" to get DAI ID, but it should count "port" instead, otherwise strange ID will be used for DAI if it was multi connected case (A). There is no issue if it was not multi connected (B). One note is that this code will be used if neither port/endpoint doesn't have reg = <x> property on DT. case (A) /* This should be handled as DAI-0 */ port@0 { endpoint@0 { } /* It will be DAI-0 by endpoint count */ endpoint@1 { } /* It will be DAI-1 by endpoint count */ }; /* This should be handled as DAI-1 */ port@1 { endpoint { } /* It will be DAI-2 by endpoint count */ }; case (B) /* both endpoint cound and port count are same */ port@0 { endpoint { ... } }; port@1 { endpoint { ... } }; It will be issue if Audio-Graph-Card is used with Multi Connection. No issue will be happen with Audio-Graph-Card2 / Simple-Card. This patch uses for_each_of_graph_port() instead of for_each_endpoint_of_node(), and thus, we can use "break" to quit from loop. Because for_each_of_graph_port() uses __free(device_node) inside. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87o71tfrdz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/generic/simple-card-utils.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 76deee29153b8313cc9629d3db45e56024b3dd26 Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Tue Dec 3 02:10:28 2024 +0000 ASoC: simple-card-utils: check port reg first on graph_get_dai_id() Because DT check when compiling become very strict in these days, we need to add reg = <x> if it has multi port/endpoint, otherwise it will get error or warning. But it was not so strict and/or mandatry before. Current code uses reg number as DAI ID, but it will use "endpoint" reg first and use "port" reg 2nd. But it should use port number as 1st (A) if it was used for multi connected case. There is no priority for port/endpoint if it was not multi connected (B). case (A) port { /* * "port" and "endpoint" are using different reg number. * It should use <x> as DAI ID, not <y> not <z> */ reg = <x>; endpoint@y { reg = <y>; ... }; endpoint@z { reg = <z>; ... }; }; case (B) port { /* * Both port/endpoint are using same reg numer <x>. */ reg = <x>; endpoint { reg = <x>; ... }; }; It will be issue if Audio-Graph-Card is used with Multi Connection. No issue will be happen with Audio-Graph-Card2 / Simple-Card. This patch swtich port/endpoint priority. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87plm9fre3.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/generic/simple-card-utils.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 419d1918105e5d9926ab02f1f834bb416dc76f65 Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Tue Dec 3 02:10:23 2024 +0000 ASoC: simple-card-utils: use __free(device_node) for device node simple-card-utils handles many type of device_node, thus need to use of_node_put() in many place. Let's use __free(device_node) and avoid it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87r06pfre8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/generic/simple-card-utils.c | 44 +++++++++++------------------------ 1 file changed, 14 insertions(+), 30 deletions(-) commit 4edc98598be43634f87af5d3876ebec6c274d2cb Author: Chancel Liu <chancel.liu@nxp.com> Date: Tue Nov 26 20:54:40 2024 +0900 ASoC: fsl_sai: Add sample rate constraint Platforms like i.MX93/91 only have one audio PLL. Some sample rates are not supported. If the PLL source is used for 8kHz series rates, then 11kHz series rates can't be supported. Use fsl_asoc_constrain_rates() to constrain rates according to PLL sources. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20241126115440.3929061-5-chancel.liu@nxp.com Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_sai.c | 7 ++++++- sound/soc/fsl/fsl_sai.h | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) commit b622b677d255b41cbfce20b66535723933a6b640 Author: Chancel Liu <chancel.liu@nxp.com> Date: Tue Nov 26 20:54:39 2024 +0900 ASoC: fsl_xcvr: Add sample rate constraint Platforms like i.MX93/91 only have one audio PLL. Some sample rates are not supported. If the PLL source is used for 8kHz series rates, then 11kHz series rates can't be supported. Use fsl_asoc_constrain_rates() to constrain rates according to PLL sources. This constraint is merely applicable to playback cases on SPDIF only platforms. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20241126115440.3929061-4-chancel.liu@nxp.com Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_xcvr.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit daf7a173fc7c4b652f3fe69d3b5aa520976a7d63 Author: Chancel Liu <chancel.liu@nxp.com> Date: Tue Nov 26 20:54:38 2024 +0900 ASoC: fsl_micfil: Switch to common sample rate constraint function fsl_asoc_constrain_rates() is a common function to constrain rates. Let's switch to this function. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20241126115440.3929061-3-chancel.liu@nxp.com Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_micfil.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 820bcaeb1ff5705ba907563e554f17d0deecc3fa Author: Chancel Liu <chancel.liu@nxp.com> Date: Tue Nov 26 20:54:37 2024 +0900 ASoC: fsl_utils: Add function to constrain rates Platforms like i.MX93/91 only have one audio PLL. Some sample rates are not supported. Add common function to constrain rates according to different clock sources. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20241126115440.3929061-2-chancel.liu@nxp.com Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_utils.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ sound/soc/fsl/fsl_utils.h | 5 +++++ 2 files changed, 50 insertions(+) commit e5fca61fdfcdd7d3cc43c0b4c3b959d4f2b06666 Merge: 1a90aae3b25b fac04efc5c79 Author: Mark Brown <broonie@kernel.org> Date: Mon Dec 9 12:51:04 2024 +0000 spi: Merge up v6.12-rc2 This has fixes for several boards which help my testing a lot. commit a6ebabd0e53d4352abe0fd2ad156a52162f5d3ce Merge: a8d77166fcfe fac04efc5c79 Author: Mark Brown <broonie@kernel.org> Date: Mon Dec 9 12:50:54 2024 +0000 regulator: Merge up v6.12-rc2 This has fixes for several boards which help my testing a lot. commit 1331fb6640440f42a709eafd5c802f3496f746b8 Merge: a308f9e47fc2 fac04efc5c79 Author: Mark Brown <broonie@kernel.org> Date: Mon Dec 9 12:50:45 2024 +0000 regmap: Merge up v6.12-rc2 This has fixes for several boards which help my testing a lot. commit 5757b31666277e2b177b406e48878dc48d587a46 Merge: 5a56323a54b7 fac04efc5c79 Author: Mark Brown <broonie@kernel.org> Date: Mon Dec 9 12:50:19 2024 +0000 ASoC: Merge up v6.12-rc2 This has fixes for several boards which help my testing a lot. commit 0b4dc35529f87d99fca91b259d50f54613bf9ec0 Author: alice.guo <alice.guo@nxp.com> Date: Mon Nov 18 10:17:16 2024 +0800 soc: imx: Add SoC device register for i.MX9 i.MX9 SoCs have SoC ID, SoC revision number and chip unique identifier which are provided by the corresponding ARM trusted firmware API. This patch intends to use SMC call to obtain these information and then register i.MX9 SoC as a device. Signed-off-by: Alice Guo <alice.guo@nxp.com> Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Stefan Wahren <wahrenst@gmx.net> Signed-off-by: Shawn Guo <shawnguo@kernel.org> drivers/soc/imx/Makefile | 2 +- drivers/soc/imx/soc-imx9.c | 128 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+), 1 deletion(-) commit e419ddeabe7edd89650a19f411f928eea12b35b1 Author: Greg Ungerer <gerg@linux-m68k.org> Date: Mon Nov 13 23:32:09 2023 +1000 m68k: Use kernel's generic muldi3 libgcc function Use the kernels own generic lib/muldi3.c implementation of muldi3 for 68K machines. Some 68K CPUs support 64bit multiplies so move the arch specific umul_ppmm() macro into a header file that is included by lib/muldi3.c. That way it can take advantage of the single instruction when available. There does not appear to be any existing mechanism for the generic lib/muldi3.c code to pick up an external arch definition of umul_ppmm(). Create an arch specific libgcc.h that can optionally be included by the system include/linux/libgcc.h to allow for this. Somewhat oddly there is also a similar definition of umul_ppmm() in the non-architecture code in lib/crypto/mpi/longlong.h for a wide range or machines. Its presence ends up complicating the include setup and means not being able to use something like compiler.h instead. Actually there is a few other defines of umul_ppmm() macros spread around in various architectures, but not directly usable for the m68k case. Signed-off-by: Greg Ungerer <gerg@linux-m68k.org> Link: https://lore.kernel.org/20231113133209.1367286-1-gerg@linux-m68k.org Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> arch/Kconfig | 8 ++++ arch/m68k/Kconfig | 2 + arch/m68k/include/asm/libgcc.h | 20 +++++++++ arch/m68k/lib/Makefile | 2 +- arch/m68k/lib/muldi3.c | 97 ------------------------------------------ include/linux/libgcc.h | 4 ++ 6 files changed, 35 insertions(+), 98 deletions(-) commit 6145fefc1e42c1895c0c1c2c8593de2c085d8c56 Merge: 7ea2745766d7 b3ae3dc3a30f Author: David S. Miller <davem@davemloft.net> Date: Mon Dec 9 12:15:31 2024 +0000 Merge branch 'cn10k-ipswec-outbound-inline-support' Bharat Bhushan says: ==================== cn10k-ipsec: Add outbound inline ipsec support This patch series adds outbound inline ipsec support on Marvell cn10k series of platform. One crypto hardware logical function (cpt-lf) per netdev is required for inline ipsec outbound functionality. Software prepare and submit crypto hardware (CPT) instruction for outbound inline ipsec crypto mode offload. The CPT instruction have details for encryption and authentication Crypto hardware encrypt, authenticate and provide the ESP packet to network hardware logic to transmit ipsec packet. First patch makes dma memory writable for in-place encryption, Second patch moves code to common file, Third patch disable backpressure on crypto (CPT) and network (NIX) hardware. Patch four onwards enables inline outbound ipsec. v9->v10: - Removed unlikely() in data-patch and used static_branch when at least a SA is configured. - Added missing READ_ONCE() as per comment on previous patch - Removed "\n" from end of extack messages - Poll for context write status check reduced to 100ms from 10s v8->v9: - Removed mutex lock to use hardware, now using hardware state - Previous versions were supporting only 64 SAs and a bitmap was used for same. That limitation is removed from this version. - Replaced netdev_err with NL_SET_ERR_MSG_MOD in state add flow as per comment in previous version v7->v8: - spell correction in patch 1/8 (s/sdk/skb) v6->v7: - skb data was mapped as device writeable but it was not ensured that skb is writeable. This version calls skb_unshare() to make skb data writeable (Thanks Jakub Kicinski for pointing out). v4->v5: - Fixed un-initialized warning and pointer check (comment from Kalesh Anakkur Purayil) v3->v4: - Few error messages in data-path removed and some moved under netif_msg_tx_err(). - Added check for crypto offload (XFRM_DEV_OFFLOAD_CRYPTO) Thanks "Leon Romanovsky" for pointing out - Fixed codespell error as per comment from Simon Horman - Added some other cleanup comment from Kalesh Anakkur Purayil v2->v3: - Fix smatch and sparse errors (Comment from Simon Horman) - Fix build error with W=1 (Comment from Simon Horman) https://patchwork.kernel.org/project/netdevbpf/patch/20240513105446.297451-6-bbhushan2@marvell.com/ - Some other minor cleanup as per comment https://www.spinics.net/lists/netdev/msg997197.html v1->v2: - Fix compilation error to build driver a module - Use dma_wmb() instead of architecture specific barrier - Fix couple of other compilation warnings ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit b3ae3dc3a30f3de78c0c3675ea980639b9ba212c Author: Bharat Bhushan <bbhushan2@marvell.com> Date: Wed Dec 4 11:26:59 2024 +0530 cn10k-ipsec: Enable outbound ipsec crypto offload Hardware is initialized and netdev transmit flow is hooked up for outbound ipsec crypto offload, so finally enable ipsec offload. Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 32188be805d052a91b999a723fd93698d83a7fa5 Author: Bharat Bhushan <bbhushan2@marvell.com> Date: Wed Dec 4 11:26:58 2024 +0530 cn10k-ipsec: Allow ipsec crypto offload for skb with SA Allow to use hardware offload for outbound ipsec crypto mode if security association (SA) is set for a given skb. Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 6a77a158848a8c68930df27b8840660db8531222 Author: Bharat Bhushan <bbhushan2@marvell.com> Date: Wed Dec 4 11:26:57 2024 +0530 cn10k-ipsec: Process outbound ipsec crypto offload Prepare and submit crypto hardware (CPT) instruction for outbound ipsec crypto offload. The CPT instruction have authentication offset, IV offset and encapsulation offset in input packet. Also provide SA context pointer which have details about algo, keys, salt etc. Crypto hardware encrypt, authenticate and provide the ESP packet to networking hardware. Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> .../ethernet/marvell/octeontx2/nic/cn10k_ipsec.c | 219 +++++++++++++++++++++ .../ethernet/marvell/octeontx2/nic/cn10k_ipsec.h | 42 ++++ .../ethernet/marvell/octeontx2/nic/otx2_common.c | 23 +++ .../ethernet/marvell/octeontx2/nic/otx2_common.h | 3 + .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 + .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 32 ++- .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.h | 3 + 7 files changed, 321 insertions(+), 3 deletions(-) commit c45211c2369734d1b03c75165988878d16867040 Author: Bharat Bhushan <bbhushan2@marvell.com> Date: Wed Dec 4 11:26:56 2024 +0530 cn10k-ipsec: Add SA add/del support for outb ipsec crypto offload This patch adds support to add and delete Security Association (SA) xfrm ops. Hardware maintains SA context in memory allocated by software. Each SA context is 128 byte aligned and size of each context is multiple of 128-byte. Add support for transport and tunnel ipsec mode, ESP protocol, aead aes-gcm-icv16, key size 128/192/256-bits with 32bit salt. Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> .../ethernet/marvell/octeontx2/nic/cn10k_ipsec.c | 409 +++++++++++++++++++++ .../ethernet/marvell/octeontx2/nic/cn10k_ipsec.h | 114 ++++++ 2 files changed, 523 insertions(+) commit fe079ab05d49ffaac1e333cb38cf2c2792f7cf40 Author: Bharat Bhushan <bbhushan2@marvell.com> Date: Wed Dec 4 11:26:55 2024 +0530 cn10k-ipsec: Init hardware for outbound ipsec crypto offload One crypto hardware logical function (cpt-lf) per netdev is required for outbound ipsec crypto offload. Allocate, attach and initialize one crypto hardware function when enabling outbound ipsec crypto offload. Crypto hardware function will be detached and freed on disabling outbound ipsec crypto offload. Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> MAINTAINERS | 1 + .../net/ethernet/marvell/octeontx2/nic/Makefile | 1 + .../ethernet/marvell/octeontx2/nic/cn10k_ipsec.c | 415 +++++++++++++++++++++ .../ethernet/marvell/octeontx2/nic/cn10k_ipsec.h | 109 ++++++ .../ethernet/marvell/octeontx2/nic/otx2_common.h | 18 + .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 14 +- .../net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 10 +- 7 files changed, 566 insertions(+), 2 deletions(-) commit a7ef63dbd5886c396aa1130d5ce42634ab1db91e Author: Bharat Bhushan <bbhushan2@marvell.com> Date: Wed Dec 4 11:26:54 2024 +0530 octeontx2-af: Disable backpressure between CPT and NIX NIX can assert backpressure to CPT on the NIX<=>CPT link. Keep the backpressure disabled for now. NIX block anyways handles backpressure asserted by MAC due to PFC or flow control pkts. Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 4 ++ .../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 68 ++++++++++++++++++---- .../ethernet/marvell/octeontx2/nic/otx2_common.c | 44 +++++++++++--- .../ethernet/marvell/octeontx2/nic/otx2_common.h | 1 + .../ethernet/marvell/octeontx2/nic/otx2_dcbnl.c | 3 + .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 3 + 6 files changed, 106 insertions(+), 17 deletions(-) commit c460b7442a6b020c6f0a2a5f837436b1ce56e95b Author: Bharat Bhushan <bbhushan2@marvell.com> Date: Wed Dec 4 11:26:53 2024 +0530 octeontx2-pf: Move skb fragment map/unmap to common code Move skb fragment map/unmap function to common file so as to reuse same for outbound IPsec crypto offload Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> .../ethernet/marvell/octeontx2/nic/otx2_common.c | 46 ++++++++++++++++++++++ .../ethernet/marvell/octeontx2/nic/otx2_common.h | 4 ++ .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 46 ---------------------- 3 files changed, 50 insertions(+), 46 deletions(-) commit 195c3d4631816f02071f0e01d2d2def51cf5067a Author: Bharat Bhushan <bbhushan2@marvell.com> Date: Wed Dec 4 11:26:52 2024 +0530 octeontx2-pf: map skb data as device writeable Crypto hardware need write permission for in-place encrypt or decrypt operation on skb-data to support IPsec crypto offload. That patch uses skb_unshare to make skb data writeable for ipsec crypto offload and map skb fragment memory as device read-write. Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 5055d82bcebfba915b1a10b6abcbfa0212c96f35 Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Mon Dec 9 12:08:56 2024 +0100 xtensa: Remove zero-length alignment array Align the whole struct to 16 bytes instead of using a zero-length alignment array. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Message-Id: <20241209110856.40132-3-thorsten.blum@linux.dev> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> arch/xtensa/include/asm/processor.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 99e487db5c15a1630b186571c3734f4e3c751d0a Author: Masahiro Yamada <masahiroy@kernel.org> Date: Wed Sep 18 12:15:34 2024 +0900 xtensa: annotate dtb_start variable as static __initdata The 'dtb_start' variable is only used within arch/xtensa/kernel/setup.c. Mark it as 'static'. It is only used by parse_tag_fdt() and init_arch(), both of which are annotated as __init. Therefore, dtb_start can be annotated as __initdata, so it will discarded after boot. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Message-Id: <20240918031537.588965-1-masahiroy@kernel.org> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> arch/xtensa/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23006e94cc9dd75a1123e917bc4fe630e8e59aed Author: Frank Li <Frank.Li@nxp.com> Date: Tue Nov 12 11:52:01 2024 -0500 arm64: dts: imx93-9x9-qsb: add temp-sensor nxp,p3t1085 Add temp-sensor nxp,p3t1085 for imx93-9x9-qsb boards. Signed-off-by: Frank Li <Frank.Li@nxp.com> Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 2b21c2306a9006e401c1ee3c694ecd327de4dc16 Author: Liu Ying <victor.liu@nxp.com> Date: Tue Nov 12 18:05:47 2024 +0800 arm64: defconfig: Enable ITE IT6263 driver ITE IT6263 LVDS to HDMI converter is populated on NXP IMX-LVDS-HDMI and IMX-DLVDS-HDMI adapter cards. The adapter cards can connect to i.MX8MP EVK base board to support video output through HDMI connectors. Build the ITE IT6263 driver as a module. Signed-off-by: Liu Ying <victor.liu@nxp.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 2561c7d5d497b988deccc36fe5eac7fd50b937f8 Author: Val Packett <val@packett.cool> Date: Wed Dec 4 16:05:07 2024 -0300 arm64: dts: mediatek: mt8516: reserve 192 KiB for TF-A The Android DTB for the related MT8167 reserves 0x30000. This is likely correct for MT8516 Android devices as well, and there's never any harm in reserving 64KiB more. Fixes: 5236347bde42 ("arm64: dts: mediatek: add dtsi for MT8516") Signed-off-by: Val Packett <val@packett.cool> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241204190524.21862-5-val@packett.cool Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8516.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eb72341fd92b7af510d236e5a8554d855ed38d3c Author: Val Packett <val@packett.cool> Date: Wed Dec 4 16:05:06 2024 -0300 arm64: dts: mediatek: mt8516: add i2c clock-div property Move the clock-div property from the pumpkin board dtsi to the SoC's since it belongs to the SoC itself and is required on other devices. Fixes: 5236347bde42 ("arm64: dts: mediatek: add dtsi for MT8516") Signed-off-by: Val Packett <val@packett.cool> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241204190524.21862-4-val@packett.cool Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8516.dtsi | 3 +++ arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) commit 03a80442030e7147391738fb6cbe5fa0b3b91bb1 Author: Val Packett <val@packett.cool> Date: Wed Dec 4 16:05:05 2024 -0300 arm64: dts: mediatek: mt8516: fix wdt irq type The GICv2 does not support EDGE_FALLING interrupts, so the watchdog would refuse to attach due to a failing check coming from the GIC driver. Fixes: 5236347bde42 ("arm64: dts: mediatek: add dtsi for MT8516") Signed-off-by: Val Packett <val@packett.cool> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241204190524.21862-3-val@packett.cool Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8516.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3ee31e4409f051c021a30122f3c470f093a7386 Author: Val Packett <val@packett.cool> Date: Wed Dec 4 16:05:04 2024 -0300 arm64: dts: mediatek: mt8516: fix GICv2 range On the MT8167 which is based on the MT8516 DTS, the following error was appearing on boot, breaking interrupt operation: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set Similar to what's been proposed for MT7622 which has the same issue, fix by using the range reported by force_probe. Link: https://lore.kernel.org/all/YmhNSLgp%2Fyg8Vr1F@makrotopia.org/ Fixes: 5236347bde42 ("arm64: dts: mediatek: add dtsi for MT8516") Signed-off-by: Val Packett <val@packett.cool> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241204190524.21862-2-val@packett.cool Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8516.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d926d78bc93b1bfe18bc1cf80e66e1a0e38297ce Author: Wojciech Macek <wmacek@chromium.org> Date: Fri Nov 29 05:57:20 2024 +0000 arm64: dts: mediatek: mt8186: Add Starmie device Add support for Starmie Chromebooks. Signed-off-by: Wojciech Macek <wmacek@chromium.org> Link: https://lore.kernel.org/r/20241129055720.3328681-3-wmacek@chromium.org Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/Makefile | 2 + .../dts/mediatek/mt8186-corsola-starmie-sku0.dts | 31 ++ .../dts/mediatek/mt8186-corsola-starmie-sku1.dts | 31 ++ .../boot/dts/mediatek/mt8186-corsola-starmie.dtsi | 472 +++++++++++++++++++++ 4 files changed, 536 insertions(+) commit c31f6c2f25586557bc586a9b3713bd7473e0cac3 Author: Wojciech Macek <wmacek@chromium.org> Date: Fri Nov 29 05:57:19 2024 +0000 dt-bindings: arm: mediatek: Add MT8186 Starmie Chromebooks Add an entry for the MT8186 based Starmie Chromebooks, also known as the ASUS Chromebook Enterprise CM30 Detachable (CM3001). The device is a tablet style chromebook. Signed-off-by: Wojciech Macek <wmacek@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241129055720.3328681-2-wmacek@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Documentation/devicetree/bindings/arm/mediatek.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 5e6af7f5418950d77eb2193ddfb8557458a070b0 Author: Fei Shao <fshao@chromium.org> Date: Sun Nov 24 16:52:38 2024 +0800 arm64: dts: mediatek: Introduce MT8188 Geralt platform based Ciri Introduce MT8188-based Chromebook Ciri, also known commercially as Lenovo Chromebook Duet (11", 9). Ciri is a detachable device based on the Geralt design, where Geralt is the codename for the MT8188 platform. Ciri offers 8 SKUs to accommodate different combinations of second-source components, including: - audio codecs (RT5682S and ES8326) - speaker amps (TAS2563 and MAX98390) - MIPI-DSI panels (BOE nv110wum-l60 and IVO t109nw41) Signed-off-by: Fei Shao <fshao@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241124085739.290556-3-fshao@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/Makefile | 8 + .../boot/dts/mediatek/mt8188-geralt-ciri-sku0.dts | 32 + .../boot/dts/mediatek/mt8188-geralt-ciri-sku1.dts | 59 + .../boot/dts/mediatek/mt8188-geralt-ciri-sku2.dts | 59 + .../boot/dts/mediatek/mt8188-geralt-ciri-sku3.dts | 32 + .../boot/dts/mediatek/mt8188-geralt-ciri-sku4.dts | 48 + .../boot/dts/mediatek/mt8188-geralt-ciri-sku5.dts | 72 ++ .../boot/dts/mediatek/mt8188-geralt-ciri-sku6.dts | 72 ++ .../boot/dts/mediatek/mt8188-geralt-ciri-sku7.dts | 48 + .../boot/dts/mediatek/mt8188-geralt-ciri.dtsi | 316 ++++++ arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi | 1156 ++++++++++++++++++++ 11 files changed, 1902 insertions(+) commit 3a11be8938aa7294719c0cf2a4758ed0cf88ab84 Author: Fei Shao <fshao@chromium.org> Date: Sun Nov 24 16:52:37 2024 +0800 dt-bindings: arm: mediatek: Add MT8188 Lenovo Chromebook Duet (11", 9) Add entries for the MT8188-based Chromebook "Ciri", also known as Lenovo Chromebook Duet (11", 9). This device features a detachable design with touchscreen, detachable keyboard and USI 2.0 Stylus support, and has 8 SKUs to accommodate the combinations of second-source components. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Fei Shao <fshao@chromium.org> Link: https://lore.kernel.org/r/20241124085739.290556-2-fshao@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Documentation/devicetree/bindings/arm/mediatek.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 6c379e8b984815fc8f876e4bc78c4d563f13ddae Author: Hsin-Yi Wang <hsinyi@chromium.org> Date: Wed Nov 13 16:16:53 2024 +0800 arm64: dts: mt8183: set DMIC one-wire mode on Damu Sets DMIC one-wire mode on Damu. Fixes: cabc71b08eb5 ("arm64: dts: mt8183: Add kukui-jacuzzi-damu board") Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Link: https://lore.kernel.org/r/20241113-damu-v4-1-6911b69610dd@chromium.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-damu.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 253b4e96f5783fddede1b82274a7b4e0aa57d761 Author: Nícolas F. R. A. Prado <nfraprado@collabora.com> Date: Wed Nov 6 16:01:45 2024 -0500 arm64: dts: mediatek: mt8186: Move wakeup to MTU3 to get working suspend The current DT has the wakeup-source and mediatek,syscon-wakeup properties in the XHCI nodes, which configures USB wakeup after powering down the XHCI hardware block. However, since the XHCI controller is behind an MTU3 (USB3 DRD controller), the MTU3 only gets powered down after USB wakeup has been configured, causing the system to detect a wakeup, and results in broken suspend support as the system resumes immediately. Move the wakeup properties to the MTU3 nodes so that USB wakeup is only enabled after the MTU3 has powered down. With this change in place, it is possible to suspend and resume, and also to wakeup through USB, as tested on the Google Steelix (Lenovo 300e Yoga Chromebook Gen 4). Fixes: f6c3e61c5486 ("arm64: dts: mediatek: mt8186: Add MTU3 nodes") Reported-by: Wojciech Macek <wmacek@google.com> Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241106-mt8186-suspend-with-usb-wakeup-v1-1-07734a4c8236@collabora.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8186.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4604c989004006cc0c08a9cfe8d80e7544b8e808 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Mon Dec 9 12:29:20 2024 +0100 arm64: dts: mediatek: mt8183-kukui: align thermal node names with bindings Bindings expect thermal zones node name to follow certain pattern. This fixes dtbs_check warning: mt8183-kukui-jacuzzi-burnet.dtb: thermal-zones: 'tboard1', 'tboard2' do not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,10}-thermal$', 'pinctrl-[0-9]+' Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241209112920.70060-1-krzysztof.kozlowski@linaro.org Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 26e6057674b670bf18a21585d053acb017acc90c Author: Frederic Weisbecker <frederic@kernel.org> Date: Fri Sep 27 00:48:49 2024 +0200 arm/bL_switcher: Use kthread_run_on_cpu() Use the proper API instead of open coding it. Reviewed-by: Dave Martin <Dave.Martin@arm.com> Acked-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> arch/arm/common/bL_switcher.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit da9ca3164d1794660d9ad650beb807b9a47fe18b Author: André Draszik <andre.draszik@linaro.org> Date: Tue Dec 3 13:03:52 2024 +0000 MAINTAINERS: add myself and Tudor as reviewers for Google Tensor SoC Add myself and Tudor as reviewers for the Google Tensor SoC alongside Peter. While at it, also add our IRC channel. Signed-off-by: André Draszik <andre.draszik@linaro.org> Acked-by: Tudor Ambarus <tudor.ambarus@linaro.org> Reviewed-by: Peter Griffin <peter.griffin@linaro.org> Link: https://lore.kernel.org/r/20241203-gs101-maintainers-v1-1-f287036dbde5@linaro.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) commit 2a77e4be12cb58bbf774e7c717c8bb80e128b7a4 Author: Peter Zijlstra <peterz@infradead.org> Date: Fri Nov 29 11:15:41 2024 +0100 sched/fair: Untangle NEXT_BUDDY and pick_next_task() There are 3 sites using set_next_buddy() and only one is conditional on NEXT_BUDDY, the other two sites are unconditional; to note: - yield_to_task() - cgroup dequeue / pick optimization However, having NEXT_BUDDY control both the wakeup-preemption and the picking side of things means its near useless. Fixes: 147f3efaa241 ("sched/fair: Implement an EEVDF-like scheduling policy") Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20241129101541.GA33464@noisy.programming.kicks-ass.net kernel/sched/fair.c | 4 ++-- kernel/sched/features.h | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) commit 95d9fed3a2aea85fe9551c2f007e186d4abb4a2a Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Mon Dec 2 19:35:30 2024 +0200 sched/fair: Mark m*_vruntime() with __maybe_unused When max_vruntime() is unused, it prevents kernel builds with clang, `make W=1` and CONFIG_WERROR=y: kernel/sched/fair.c:526:19: error: unused function 'max_vruntime' [-Werror,-Wunused-function] 526 | static inline u64 max_vruntime(u64 max_vruntime, u64 vruntime) | ^~~~~~~~~~~~ Fix this by marking them with __maybe_unused (all cases for the sake of symmetry). See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20241202173546.634433-1-andriy.shevchenko@linux.intel.com kernel/sched/fair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0429489e092851f066b08deed9ce0f3910515383 Author: Vincent Guittot <vincent.guittot@linaro.org> Date: Mon Dec 2 18:46:06 2024 +0100 sched/fair: Fix variable declaration position Move variable declaration at the beginning of the function Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Link: https://lore.kernel.org/r/20241202174606.4074512-12-vincent.guittot@linaro.org kernel/sched/fair.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 61b82dfb6b7e1f951fd1e95198a2aee2ccf6a167 Author: Vincent Guittot <vincent.guittot@linaro.org> Date: Mon Dec 2 18:46:05 2024 +0100 sched/fair: Do not try to migrate delayed dequeue task Migrating a delayed dequeued task doesn't help in balancing the number of runnable tasks in the system. Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Link: https://lore.kernel.org/r/20241202174606.4074512-11-vincent.guittot@linaro.org kernel/sched/fair.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 736c55a02c477ad31c57ae4c69130f437855e051 Author: Vincent Guittot <vincent.guittot@linaro.org> Date: Mon Dec 2 18:46:04 2024 +0100 sched/fair: Rename cfs_rq.nr_running into nr_queued Rename cfs_rq.nr_running into cfs_rq.nr_queued which better reflects the reality as the value includes both the ready to run tasks and the delayed dequeue tasks. Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Link: https://lore.kernel.org/r/20241202174606.4074512-10-vincent.guittot@linaro.org kernel/sched/debug.c | 2 +- kernel/sched/fair.c | 38 +++++++++++++++++++------------------- kernel/sched/sched.h | 4 ++-- 3 files changed, 22 insertions(+), 22 deletions(-) commit 43eef7c3a4a65e258244d63a8992d0a8d70e5974 Author: Vincent Guittot <vincent.guittot@linaro.org> Date: Mon Dec 2 18:46:03 2024 +0100 sched/fair: Remove unused cfs_rq.idle_nr_running cfs_rq.idle_nr_running field is not used anywhere so we can remove the useless associated computation. Last user went in commit 5e963f2bd465 ("sched/fair: Commit to EEVDF"). Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Link: https://lore.kernel.org/r/20241202174606.4074512-9-vincent.guittot@linaro.org kernel/sched/debug.c | 2 -- kernel/sched/fair.c | 14 +------------- kernel/sched/sched.h | 1 - 3 files changed, 1 insertion(+), 16 deletions(-) commit 31898e7b87dd2833eb5dd6aa60ab2a5880c4c12f Author: Vincent Guittot <vincent.guittot@linaro.org> Date: Mon Dec 2 18:46:02 2024 +0100 sched/fair: Rename cfs_rq.idle_h_nr_running into h_nr_idle Use same naming convention as others starting with h_nr_* and rename idle_h_nr_running into h_nr_idle. The "running" is not correct anymore as it includes delayed dequeue tasks as well. Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Link: https://lore.kernel.org/r/20241202174606.4074512-8-vincent.guittot@linaro.org kernel/sched/debug.c | 3 +-- kernel/sched/fair.c | 52 ++++++++++++++++++++++++++-------------------------- kernel/sched/sched.h | 2 +- 3 files changed, 28 insertions(+), 29 deletions(-) commit 9216582b0bfb17889eebcf96fb41cd67a3d71133 Author: Vincent Guittot <vincent.guittot@linaro.org> Date: Mon Dec 2 18:46:01 2024 +0100 sched/fair: Removed unsued cfs_rq.h_nr_delayed h_nr_delayed is not used anymore. We now have: - h_nr_runnable which tracks tasks ready to run - h_nr_queued which tracks enqueued tasks either ready to run or delayed dequeue Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Link: https://lore.kernel.org/r/20241202174606.4074512-7-vincent.guittot@linaro.org kernel/sched/debug.c | 1 - kernel/sched/fair.c | 40 ++++++++++++---------------------------- kernel/sched/sched.h | 1 - 3 files changed, 12 insertions(+), 30 deletions(-) commit 1a49104496d38cdcb7d9106ec23773a52c7a7e82 Author: Vincent Guittot <vincent.guittot@linaro.org> Date: Mon Dec 2 18:46:00 2024 +0100 sched/fair: Use the new cfs_rq.h_nr_runnable Use the new h_nr_runnable that tracks only queued and runnable tasks in the statistics that are used to balance the system: - PELT runnable_avg - deciding if a group is overloaded or has spare capacity - numa stats - reduced capacity management - load balance - nohz kick It should be noticed that the rq->nr_running still counts the delayed dequeued tasks as delayed dequeue is a fair feature that is meaningless at core level. Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Link: https://lore.kernel.org/r/20241202174606.4074512-6-vincent.guittot@linaro.org kernel/sched/fair.c | 18 +++++++++--------- kernel/sched/pelt.c | 4 ++-- kernel/sched/sched.h | 7 ++----- 3 files changed, 13 insertions(+), 16 deletions(-) commit c2a295bffeaf9461ecba76dc9e4780c898c94f03 Author: Vincent Guittot <vincent.guittot@linaro.org> Date: Mon Dec 2 18:45:59 2024 +0100 sched/fair: Add new cfs_rq.h_nr_runnable With delayed dequeued feature, a sleeping sched_entity remains queued in the rq until its lag has elapsed. As a result, it stays also visible in the statistics that are used to balance the system and in particular the field cfs.h_nr_queued when the sched_entity is associated to a task. Create a new h_nr_runnable that tracks only queued and runnable tasks. Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Link: https://lore.kernel.org/r/20241202174606.4074512-5-vincent.guittot@linaro.org kernel/sched/debug.c | 1 + kernel/sched/fair.c | 20 ++++++++++++++++++-- kernel/sched/sched.h | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) commit 7b8a702d943827130cc00ae36075eff5500f86f1 Author: Vincent Guittot <vincent.guittot@linaro.org> Date: Mon Dec 2 18:45:58 2024 +0100 sched/fair: Rename h_nr_running into h_nr_queued With delayed dequeued feature, a sleeping sched_entity remains queued in the rq until its lag has elapsed but can't run. Rename h_nr_running into h_nr_queued to reflect this new behavior. Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Link: https://lore.kernel.org/r/20241202174606.4074512-4-vincent.guittot@linaro.org kernel/sched/core.c | 4 +-- kernel/sched/debug.c | 6 ++-- kernel/sched/fair.c | 88 ++++++++++++++++++++++++++-------------------------- kernel/sched/pelt.c | 4 +-- kernel/sched/sched.h | 4 +-- 5 files changed, 53 insertions(+), 53 deletions(-) commit 40c3b94fbb5a2c2415e5ac27d995adfd0f71a1e0 Merge: c907cd44a108 76f2f783294d Author: Peter Zijlstra <peterz@infradead.org> Date: Mon Dec 9 11:48:10 2024 +0100 Merge branch 'sched/urgent' Sync with urgent bits as a base for further work. Signed-off-by: Peter Zijlstra <peterz@infradead.org> commit ed2ec63d3faa4a3fda0dbf7cca93a9d0d9793100 Author: Wardenjohn <zhangwarden@gmail.com> Date: Thu Oct 24 16:35:30 2024 +0800 selftests: livepatch: add test cases of stack_order sysfs interface Add selftest test cases to sysfs attribute 'stack_order'. Suggested-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Wardenjohn <zhangwarden@gmail.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Tested-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20241024083530.58775-1-zhangwarden@gmail.com [pmladek@suse.com: Substitute $SYSFS_KLP_DIR] Signed-off-by: Petr Mladek <pmladek@suse.com> tools/testing/selftests/livepatch/test-sysfs.sh | 71 +++++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit d5b3944bec944b40e91cae82583ce11740af6f10 Author: Igor Belwon <igor.belwon@mentallysanemainliners.org> Date: Wed Dec 4 15:55:59 2024 +0100 arm64: dts: exynos990: Add pmu and syscon-reboot nodes Add PMU syscon, and syscon-reboot nodes to the Exynos990 dtsi. Reboot of the Exynos990 SoC is handled by setting bit(SWRESET_TRIGGER[1]) of SWRESET register (PMU + 0x3a00). Tested using the "reboot" command. Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com> Link: https://lore.kernel.org/r/20241204145559.524932-3-igor.belwon@mentallysanemainliners.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/exynos990.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 3dae09de406167123449d9ece1f51855d5bac01a Author: Wardenjohn <zhangwarden@gmail.com> Date: Tue Oct 8 09:48:56 2024 +0800 livepatch: Add stack_order sysfs attribute Add "stack_order" sysfs attribute which holds the order in which a live patch module was loaded into the system. A user can then determine an active live patched version of a function. cat /sys/kernel/livepatch/livepatch_1/stack_order -> 1 means that livepatch_1 is the first live patch applied cat /sys/kernel/livepatch/livepatch_module/stack_order -> N means that livepatch_module is the Nth live patch applied Suggested-by: Petr Mladek <pmladek@suse.com> Suggested-by: Miroslav Benes <mbenes@suse.cz> Suggested-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Wardenjohn <zhangwarden@gmail.com> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Reviewed-by: Petr Mladek <pmladek@suse.com> Tested-by: Petr Mladek <pmladek@suse.com> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Link: https://lore.kernel.org/r/20241008014856.3729-2-zhangwarden@gmail.com [pmladek@suse.com: Updated kernel version and date in the ABI documentation.] Signed-off-by: Petr Mladek <pmladek@suse.com> Documentation/ABI/testing/sysfs-kernel-livepatch | 9 +++++++++ kernel/livepatch/core.c | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit ebe559609d7829b52c6642b581860760984faf9d Author: Al Viro <viro@zeniv.linux.org.uk> Date: Fri Nov 15 10:30:14 2024 -0500 fs: get rid of __FMODE_NONOTIFY kludge All it takes to get rid of the __FMODE_NONOTIFY kludge is switching fanotify from anon_inode_getfd() to anon_inode_getfile_fmode() and adding a dentry_open_nonotify() helper to be used by fanotify on the other path. That's it - no more weird shit in OPEN_FMODE(), etc. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Link: https://lore.kernel.org/linux-fsdevel/20241113043003.GH3387508@ZenIV/ Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/d1231137e7b661a382459e79a764259509a4115d.1731684329.git.josef@toxicpanda.com fs/fcntl.c | 4 ++-- fs/notify/fanotify/fanotify_user.c | 25 ++++++++++++++++--------- fs/open.c | 23 +++++++++++++++++++---- include/linux/fs.h | 6 +++--- include/uapi/asm-generic/fcntl.h | 1 - 5 files changed, 40 insertions(+), 19 deletions(-) commit 477fb0671feb7b51fed9a803aeafa64d66cf6101 Author: George Guo <guodongtai@kylinos.cn> Date: Mon Nov 25 19:28:12 2024 +0800 selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh Replaced the hardcoded module name test_klp_callbacks_demo in the pre_patch_callback log message with the variable $MOD_LIVEPATCH. Signed-off-by: George Guo <guodongtai@kylinos.cn> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20241125112812.281018-2-dongtai.guo@linux.dev Signed-off-by: Petr Mladek <pmladek@suse.com> tools/testing/selftests/livepatch/test-callbacks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e501bfde65581aad673e1022fdaf4e8ab928f9f2 Author: Cristian Marussi <cristian.marussi@arm.com> Date: Tue Dec 3 19:35:44 2024 +0000 firmware: arm_scmi: Allow transport properties for multiple instances Default SCMI transport properties values can be overridden with devicetree provided descriptors; in order to support multiple SCMI instances, make the properties-update happen on a per-instance copy of the original transport descriptor. Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> Message-Id: <20241203193544.3895173-1-cristian.marussi@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> drivers/firmware/arm_scmi/common.h | 4 ++-- drivers/firmware/arm_scmi/driver.c | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) commit 9d9c8facf2c6e5d9d79a0bc6ffb7d69f74b9e7db Author: Liu Ying <victor.liu@nxp.com> Date: Tue Nov 12 18:05:46 2024 +0800 arm64: dts: imx8mp-evk: Add NXP LVDS to HDMI adapter cards One ITE IT6263 LVDS to HDMI converter is populated on NXP IMX-LVDS-HDMI and IMX-DLVDS-HDMI adapter cards. Card IMX-LVDS-HDMI supports single LVDS link(IT6263 link1). Card IMX-DLVDS-HDMI supports dual LVDS links(IT6263 link1 and link2). Only one card can be enabled with one i.MX8MP EVK. Add dedicated overlays to support the below four connections: 1) imx8mp-evk-lvds0-imx-lvds-hdmi.dtso: i.MX8MP EVK LVDS0 connector <=> LVDS adapter card J6(IT6263 link1) 2) imx8mp-evk-lvds1-imx-lvds-hdmi.dtso: i.MX8MP EVK LVDS1 connector <=> LVDS adapter card J6(IT6263 link1) 3) imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtso: i.MX8MP EVK LVDS0 connector <=> DLVDS adapter card channel0(IT6263 link1) i.MX8MP EVK LVDS1 connector <=> DLVDS adapter card channel1(IT6263 link2) 4) imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtso: i.MX8MP EVK LVDS1 connector <=> DLVDS adapter card channel0(IT6263 link1) i.MX8MP EVK LVDS0 connector <=> DLVDS adapter card channel1(IT6263 link2) Part links: https://www.nxp.com/part/IMX-LVDS-HDMI https://www.nxp.com/part/IMX-DLVDS-HDMI Signed-off-by: Liu Ying <victor.liu@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/boot/dts/freescale/Makefile | 8 ++++ .../freescale/imx8mp-evk-imx-lvds-hdmi-common.dtsi | 29 ++++++++++++++ .../imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtso | 44 ++++++++++++++++++++++ .../imx8mp-evk-lvds0-imx-lvds-hdmi-common.dtsi | 43 +++++++++++++++++++++ .../freescale/imx8mp-evk-lvds0-imx-lvds-hdmi.dtso | 28 ++++++++++++++ .../imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtso | 44 ++++++++++++++++++++++ .../imx8mp-evk-lvds1-imx-lvds-hdmi-common.dtsi | 43 +++++++++++++++++++++ .../freescale/imx8mp-evk-lvds1-imx-lvds-hdmi.dtso | 28 ++++++++++++++ arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 6 +++ 9 files changed, 273 insertions(+) commit 8446c9585542ee67e2c75d27f9d581360d836bd0 Author: Liu Ying <victor.liu@nxp.com> Date: Tue Nov 12 18:05:41 2024 +0800 arm64: dts: imx8mp-skov-revb-mi1010ait-1cp1: Set "media_disp2_pix" clock rate to 70MHz The LVDS panel "multi-inno,mi1010ait-1cp" used on this platform has a typical pixel clock rate of 70MHz. Set "media_disp2_pix" clock rate to that rate, instead of the original 68.9MHz. The LVDS serial clock is controlled by "media_ldb" clock. It should run at 490MHz(7-fold the pixel clock rate due to single LVDS link). Set "video_pll1" clock rate and "media_ldb" to 490MHz to achieve that. This should be able to suppress this LDB driver warning: [ 17.206644] fsl-ldb 32ec0000.blk-ctrl:bridge@5c: Configured LDB clock (70000000 Hz) does not match requested LVDS clock: 490000000 Hz This also makes the display mode used by the panel pass mode validation against pixel clock rate and "media_ldb" clock rate in a certain display driver. Signed-off-by: Liu Ying <victor.liu@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/boot/dts/freescale/imx8mp-skov-revb-mi1010ait-1cp1.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ead64b20f16e38443aded90dc8491d25f4f5bd39 Author: Christian Göttsche <cgzones@googlemail.com> Date: Mon Nov 25 11:40:00 2024 +0100 gfs2: reorder capability check last capable() calls refer to enabled LSMs whether to permit or deny the request. This is relevant in connection with SELinux, where a capability check results in a policy decision and by default a denial message on insufficient permission is issued. It can lead to three undesired cases: 1. A denial message is generated, even in case the operation was an unprivileged one and thus the syscall succeeded, creating noise. 2. To avoid the noise from 1. the policy writer adds a rule to ignore those denial messages, hiding future syscalls, where the task performs an actual privileged operation, leading to hidden limited functionality of that task. 3. To avoid the noise from 1. the policy writer adds a rule to permit the task the requested capability, while it does not need it, violating the principle of least privilege. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> fs/gfs2/quota.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f5d38d4fa88441bc4f96e185bce7426790e32949 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Dec 4 12:21:50 2024 +0200 drm/i915/display: convert intel_display_driver.[ch] to struct intel_display Going forward, struct intel_display will be the main display driver structure. Convert the main display entry points to struct intel_display. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241204102150.2223455-1-jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_crt.c | 4 +- drivers/gpu/drm/i915/display/intel_display.c | 3 +- .../gpu/drm/i915/display/intel_display_driver.c | 280 +++++++++++---------- .../gpu/drm/i915/display/intel_display_driver.h | 38 +-- drivers/gpu/drm/i915/display/intel_display_reset.c | 4 +- drivers/gpu/drm/i915/display/intel_dp.c | 5 +- drivers/gpu/drm/i915/display/intel_dp_mst.c | 7 +- drivers/gpu/drm/i915/display/intel_dvo.c | 6 +- drivers/gpu/drm/i915/display/intel_hdmi.c | 5 +- drivers/gpu/drm/i915/display/intel_panel.c | 3 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 9 +- drivers/gpu/drm/i915/display/intel_tv.c | 3 +- drivers/gpu/drm/i915/i915_driver.c | 47 ++-- drivers/gpu/drm/xe/display/xe_display.c | 44 ++-- 14 files changed, 238 insertions(+), 220 deletions(-) commit 1360bc7eecc81e98aed7e8be2c39771ef5112cc2 Author: Marek Vasut <marex@denx.de> Date: Mon Nov 11 12:34:21 2024 +0100 MAINTAINERS: Update entry for DH electronics DHSOM SoMs and boards Update the MAINTAINERS entry to cover all DH electronics DHSOM SoMs and boards. The DHSOM is the name which covers all modules, DHCOM is the SODIMM seated SoM, DHCOR is the solder on module. Use glob pattern to match on every DT file which contains either of those three module substrings in lowercase. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org> MAINTAINERS | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit c92fd19450c15ab62218de5f71320098b0dfd9d9 Author: Alexander Stein <alexander.stein@ew.tq-group.com> Date: Fri Nov 8 14:49:26 2024 +0100 ARM: imx_v6_v7_defconfig: enable JC42 for TQMa7x TQMa7x uses an JC42 compatible temperature sensor. Enable the corresponding driver. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Markus Niebel <markus.niebel@ew.tq-group.com> Reviewed-by: Bruno Thomsen <bruno.thomsen@gmail.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit d78a518e774b2610d642bdba9c7ec5b264fefb1d Author: Alexander Stein <alexander.stein@ew.tq-group.com> Date: Fri Nov 8 14:49:25 2024 +0100 ARM: dts: imx7[d]-mba7: add Ethernet PHY IRQ support The regulator-fec*-pwdn regulators were used to deassert the PWDN signal of ethernet PHY, e.g. not powering. This is not necessary as the line has a pull-up already. Instead of the combo pad of the PHY for IRQ support. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Markus Niebel <markus.niebel@ew.tq-group.com> Reviewed-by: Bruno Thomsen <bruno.thomsen@gmail.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm/boot/dts/nxp/imx/imx7-mba7.dtsi | 23 ++--------------------- arch/arm/boot/dts/nxp/imx/imx7d-mba7.dts | 3 ++- 2 files changed, 4 insertions(+), 22 deletions(-) commit c0a0fdcd628e0b68f5756515288bf95dc108c8de Author: Alexander Stein <alexander.stein@ew.tq-group.com> Date: Fri Nov 8 14:49:24 2024 +0100 ARM: dts: imx7-mba7: Remove duplicated power supply VCC3V3 is used twice, resulting in the debugfs warning: debugfs: Directory 'VCC3V3' with parent 'regulator' already present! The power supply provided by reg_vcc_3v3 is actually the same as reg_mba_3v3. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Markus Niebel <markus.niebel@ew.tq-group.com> Reviewed-by: Bruno Thomsen <bruno.thomsen@gmail.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm/boot/dts/nxp/imx/imx7-mba7.dtsi | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 10a5e47ad4e25849ff3d514ed01c8c2f122c73b0 Author: Alexander Stein <alexander.stein@ew.tq-group.com> Date: Fri Nov 8 14:49:23 2024 +0100 ARM: dts: imx7-mba7: Fix SD card vmmc-supply The SD card is directly supplied by VCC3V3. Remove superfluous regulator. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Markus Niebel <markus.niebel@ew.tq-group.com> Reviewed-by: Bruno Thomsen <bruno.thomsen@gmail.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm/boot/dts/nxp/imx/imx7-mba7.dtsi | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 765d85db7ec090822c3d12f427e693fc0aefa077 Author: Alexander Stein <alexander.stein@ew.tq-group.com> Date: Fri Nov 8 14:49:22 2024 +0100 ARM: dts: imx7-mba7: Add 3.3V and 5.0V regulators These voltages are provided unconditionally from external power supply and are input voltages to various dedicated, switchable, power rails. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Markus Niebel <markus.niebel@ew.tq-group.com> Reviewed-by: Bruno Thomsen <bruno.thomsen@gmail.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm/boot/dts/nxp/imx/imx7-mba7.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 78e08cebfe41a99d12a3a79d3e3be913559182e2 Author: Alexander Stein <alexander.stein@ew.tq-group.com> Date: Fri Nov 8 14:49:21 2024 +0100 ARM: dts: imx7-tqma7: add missing vs-supply for LM75A (rev. 01xxx) Add missing supply for LM75. Fixes the kernel warning: lm75 0-0048: supply vs not found, using dummy regulator Fixes: c9d4affbe60a ("ARM: dts: imx: tqma7: add lm75a sensor (rev. 01xxx)") Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Markus Niebel <markus.niebel@ew.tq-group.com> Reviewed-by: Bruno Thomsen <bruno.thomsen@gmail.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi | 1 + 1 file changed, 1 insertion(+) commit 24bd1c6c8777d72877092641b4b8e16037eddace Author: Alexander Stein <alexander.stein@ew.tq-group.com> Date: Fri Nov 8 14:49:20 2024 +0100 ARM: dts: imx7-tqma7: Remove superfluous status="okay" property There is no need to specify status = "okay"; for newly created nodes, remove this property. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Markus Niebel <markus.niebel@ew.tq-group.com> Reviewed-by: Bruno Thomsen <bruno.thomsen@gmail.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 23d0d411765f67d3ff8b4ef096b5d32bb7fa8915 Author: Alexander Stein <alexander.stein@ew.tq-group.com> Date: Fri Nov 8 14:49:19 2024 +0100 ARM: dts: imx7-mba7: remove LVDS transmitter regulator This regulator essentially controls the SHTDN# pin of the LVDS encoder. Remove it for proper usage with 'lvds-encoder' driver. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Markus Niebel <markus.niebel@ew.tq-group.com> Reviewed-by: Bruno Thomsen <bruno.thomsen@gmail.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm/boot/dts/nxp/imx/imx7-mba7.dtsi | 9 --------- 1 file changed, 9 deletions(-) commit 59af653a6998ce0a79aa7f8851b0d5ecc667579b Merge: 152d00a91396 ed58b186c773 Author: Steffen Klassert <steffen.klassert@secunet.com> Date: Mon Dec 9 10:09:40 2024 +0100 Merge branch 'Add IP-TFS mode to xfrm' Christian Hopps says: ==================== * Summary of Changes: This patchset adds a new xfrm mode implementing on-demand IP-TFS. IP-TFS (AggFrag encapsulation) has been standardized in RFC9347. Link: https://www.rfc-editor.org/rfc/rfc9347.txt This feature supports demand driven (i.e., non-constant send rate) IP-TFS to take advantage of the AGGFRAG ESP payload encapsulation. This payload type supports aggregation and fragmentation of the inner IP packet stream which in turn yields higher small-packet bandwidth as well as reducing MTU/PMTU issues. Congestion control is unimplementated as the send rate is demand driven rather than constant. In order to allow loading this fucntionality as a module a set of callbacks xfrm_mode_cbs has been added to xfrm as well. Patchset Structure: ------------------- The first 5 commits are changes to the net and xfrm infrastructure to support the callbacks as well as more generic IP-TFS additions that may be used outside the actual IP-TFS implementation. - xfrm: config: add CONFIG_XFRM_IPTFS - include: uapi: protocol number and packet structs for AGGFRAG in ESP - xfrm: netlink: add config (netlink) options - xfrm: add mode_cbs module functionality - xfrm: add generic iptfs defines and functionality The last 10 commits constitute the IP-TFS implementation constructed in layers to make review easier. The first 9 commits all apply to a single file `net/xfrm/xfrm_iptfs.c`, the last commit adds a new tracepoint header file along with the use of these new tracepoint calls. - xfrm: iptfs: add new iptfs xfrm mode impl - xfrm: iptfs: add user packet (tunnel ingress) handling - xfrm: iptfs: share page fragments of inner packets - xfrm: iptfs: add fragmenting of larger than MTU user packets - xfrm: iptfs: add basic receive packet (tunnel egress) handling - xfrm: iptfs: handle received fragmented inner packets - xfrm: iptfs: add reusing received skb for the tunnel egress packet - xfrm: iptfs: add skb-fragment sharing code - xfrm: iptfs: handle reordering of received packets - xfrm: iptfs: add tracepoint functionality ==================== Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> commit eead8f3536d5cdb0b300a473ca800249bbcd8329 Author: Heiko Schocher <hs@denx.de> Date: Tue Nov 5 07:42:06 2024 +0100 arm64: dts: imx8mp: add aristainetos3 board support Add support for the i.MX8MP based aristainetos3 boards from ABB. The board uses a ABB specific SoM from ADLink, based on NXP i.MX8MP SoC. The SoM is used on 3 different carrier boards, with small differences. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/boot/dts/freescale/Makefile | 5 + .../freescale/imx8mp-aristainetos3-adpismarc.dts | 37 + .../imx8mp-aristainetos3-helios-lvds.dtso | 113 ++ .../dts/freescale/imx8mp-aristainetos3-helios.dts | 98 ++ .../freescale/imx8mp-aristainetos3-proton2s.dts | 161 +++ .../freescale/imx8mp-aristainetos3a-som-v1.dtsi | 1107 ++++++++++++++++++++ 6 files changed, 1521 insertions(+) commit 9723142eae655bcf4d26feb6893acfa03e011587 Author: Heiko Schocher <hs@denx.de> Date: Tue Nov 5 07:42:04 2024 +0100 dt-bindings: arm: fsl: Add ABB SoM and carrier add support for the i.MX8MP based SoM and carrier from ABB. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Shawn Guo <shawnguo@kernel.org> Documentation/devicetree/bindings/arm/fsl.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) commit 26bba754539a274fb4905cb07d244ca291bcc5d0 Author: Nirmoy Das <nirmoy.das@intel.com> Date: Thu Dec 5 12:47:02 2024 +0100 drm/xe/tests: Wait for clear fence operation to complete Ensure the clear operation completes before proceeding, as the clear fence is not attached to the BO's dma-resv object. Cc: Matthew Auld <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241205114702.1963303-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> drivers/gpu/drm/xe/tests/xe_bo.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7157135384a110007a8e632998bca11eff722328 Author: Frank Li <Frank.Li@nxp.com> Date: Fri Oct 18 14:31:16 2024 -0400 arm64: dts: imx8mq-zii-ultra: remove #address-cells of eeprom@a4 Remove #address-cells and #size-cells of eeprom@a4 because no children nodes under eeprom@a4. Signed-off-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/boot/dts/freescale/imx8mq-zii-ultra.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 27ede5bbcf75be621c120cf6b2390f8f1a13cc79 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Fri Sep 27 14:42:19 2024 +0200 arm64: dts: imx: Switch to simple-audio-card,hp-det-gpios Replace the deprecated "simple-audio-card,hp-det-gpio" property by "simple-audio-card,hp-det-gpios" in Simple Audio Card device nodes. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 2 +- arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f70ec2ef27a42c7ba073e7f6ce938e0116b2e742 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Fri Sep 27 14:42:25 2024 +0200 ARM: dts: imx: Switch to {hp,mic}-det-gpios Replace the deprecated "hp-det-gpio" and "mic-det-gpio" properties by "hp-det-gpios" resp. "mic-det-gpios" in Freescale Generic ASoC Sound Card device nodes. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Shawn Guo <shawnguo@kernel.org> arch/arm/boot/dts/nxp/imx/imx6qdl-sabresd.dtsi | 4 ++-- arch/arm/boot/dts/nxp/imx/imx6sl-evk.dts | 2 +- arch/arm/boot/dts/nxp/imx/imx6sll-evk.dts | 2 +- arch/arm/boot/dts/nxp/imx/imx6sx-sdb.dtsi | 2 +- arch/arm/boot/dts/nxp/imx/imx6ul-14x14-evk.dtsi | 2 +- arch/arm/boot/dts/nxp/imx/imx7d-sdb.dts | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) commit 442bc81bd344dc52c37d8f80b854cc6da062b2d0 Merge: d6212d82bf26 fac04efc5c79 Author: Alexei Starovoitov <ast@kernel.org> Date: Sun Dec 8 17:01:51 2024 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Cross-merge bpf fixes after downstream PR. Trivial conflict: tools/testing/selftests/bpf/prog_tests/verifier.c Adjacent changes in: Auto-merging kernel/bpf/verifier.c Auto-merging samples/bpf/Makefile Auto-merging tools/testing/selftests/bpf/.gitignore Auto-merging tools/testing/selftests/bpf/Makefile Auto-merging tools/testing/selftests/bpf/prog_tests/verifier.c Signed-off-by: Alexei Starovoitov <ast@kernel.org> commit a8ec0b44c7c5116805f252da624264652be1de71 Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Fri Dec 6 11:26:42 2024 +0200 iio: kx022a: document new chip_info structure members The kx022a driver supports a few different HW variants. A chip-info structure is used to describe sensor specific details. Support for sensors with different measurement g-ranges was added recently, introducing sensor specific scale arrays. The members of the chip-info structure have been documented using kerneldoc. The newly added members omitted the documentation. It is nice to have all the entries documented for the sake of the consistency. Furthermore, the scale table format may not be self explatonary, nor how the amount of scales is informed. Add documentation to scale table entries to maintain consistency and to make it more obvious how the scales should be represented. Suggested-by: Mehdi Djait <mehdi.djait@linux.intel.com> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com> Link: https://patch.msgid.link/Z1LDUj-naUdGSM6n@mva-rohm Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/kionix-kx022a.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 221984deceee75846b8a132974683d33dab5a029 Author: Ryan Wanner <Ryan.Wanner@microchip.com> Date: Fri Dec 6 12:59:57 2024 -0700 ARM: configs: at91: sama7: add new SoC config Add sama7d65 to the sama7_defconfig. Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com> Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/e5a1311100a4f05fdc44107e124129d2d93df2e0.1733505542.git.Ryan.Wanner@microchip.com Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> arch/arm/configs/multi_v7_defconfig | 1 + arch/arm/configs/sama7_defconfig | 1 + 2 files changed, 2 insertions(+) commit b6096751a652a7e7526d4b3d59971a40c3287ef7 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Thu Oct 31 12:46:31 2024 +0200 phy: sun4i-usb: Remove unused of_gpio.h of_gpio.h is deprecated and subject to remove. The drivers in question don't use it, simply remove the unused header. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Link: https://lore.kernel.org/r/20241031104631.2454581-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/allwinner/phy-sun4i-usb.c | 1 - 1 file changed, 1 deletion(-) commit 80738c3f1e1b7bd664481d73d64e42e139c7002d Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Thu Oct 31 12:44:01 2024 +0200 phy: HiSilicon: Don't use "proxy" headers Update header inclusions to follow IWYU (Include What You Use) principle. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20241031104401.2454179-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/hisilicon/phy-hi3670-pcie.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 0d9fff6c57fee5cccba414a0c40d75812121bdd8 Author: Peter Griffin <peter.griffin@linaro.org> Date: Tue Oct 29 19:21:07 2024 +0000 phy: samsung-ufs: switch back to syscon_regmap_lookup_by_phandle() Now exynos-pmu can register its custom regmap for gs101 via of_syscon_register_regmap() we can switch back to the standard syscon_regmap_lookup_by_phandle() api for obtaining the regmap. Additionally add a Kconfig dependency for MFD_SYSCON. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Link: https://lore.kernel.org/r/20241029192107.2344279-1-peter.griffin@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/samsung/Kconfig | 1 + drivers/phy/samsung/phy-samsung-ufs.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) commit 0fd0b31965b0d4a2caa9267c7aee43f1f78870e8 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Mon Oct 21 13:33:12 2024 +0300 phy: qualcomm: qmp-pcie: add support for SAR2130P Add PCIe QMP PHY configuration for the Qualcomm SAR2130P platform. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241021-sar2130p-phys-v2-6-d883acf170f7@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 141 +++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) commit 8114f34dd0baa972085280610ad5be89a41d1414 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Mon Oct 21 13:33:11 2024 +0300 phy: qualcomm: qmp-pcie: define several new registers Define several registers to be used by PCIe QMP PHYs on v6 platforms. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241021-sar2130p-phys-v2-5-d883acf170f7@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v6.h | 3 +++ drivers/phy/qualcomm/phy-qcom-qmp-pcs-v6.h | 2 ++ drivers/phy/qualcomm/phy-qcom-qmp-qserdes-txrx-v6.h | 1 + 3 files changed, 6 insertions(+) commit f9d35dd39bf44d01012119b146a27c29e55d8ad8 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Mon Oct 21 13:33:10 2024 +0300 phy: qualcomm: qmp-pcie: split PCS_LANE1 region The PCS_LANE1 region isn't a part of the PCS_PCIE region. It was handled this way as it simplified handled of devices with the old bindings. Nowadays it can be handled as is, without hacks. Split the PCS_LANE1 region from the PCS_PCIE / PCS_MISC region space. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241021-sar2130p-phys-v2-4-d883acf170f7@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 32 ++++++++++++++++++---- drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v4_20.h | 5 ++-- drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v5_20.h | 5 ++-- 3 files changed, 33 insertions(+), 9 deletions(-) commit 545069bcf39e9f025e8e3d749505e52423433e37 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Mon Oct 21 13:33:09 2024 +0300 phy: qualcomm: qmp-combo: add support for SAR2130P Extend the USB+DP combo QMP PHY driver to support the SAR2130P platform. It mosly follows the SM8550 QMP PHY, but the QSERDES programming differs, most likely because of the parent clock rate differences. NOTE: The DP part wasn't yet tested, but it is not possible to support just the USB part of the PHY. DP part might require additional fixes later. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241021-sar2130p-phys-v2-3-d883acf170f7@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 100 ++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) commit 5c4bfe3ee5c412379b54ef53f09fceb93f42f619 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Mon Oct 21 13:33:08 2024 +0300 dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add SAR2130P compatible Document compatible for the QMP PCIe PHY on SAR2130P platform. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241021-sar2130p-phys-v2-2-d883acf170f7@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org> Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 2 ++ 1 file changed, 2 insertions(+) commit d1cfda3b1e4dba015d7cbceb49fb35fdf10b743a Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Mon Oct 21 13:33:07 2024 +0300 dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp: Add SAR2130P compatible Document compatible for the USB+DP Combo PHY on SAR2130P platform. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241021-sar2130p-phys-v2-1-d883acf170f7@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org> .../devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 802244fae1f8f151ec2a4ba091a0cb14b32ac27f Author: Claudiu Beznea <claudiu.beznea@tuxon.dev> Date: Mon Aug 26 20:31:15 2024 +0300 clk: at91: sckc: Use SCKC_{TD, MD}_SLCK IDs for clk32k clocks Use the newly introduced macros instead of raw numbers. With this the code is a bit easier to understand. Reviewed-by: Alexander Dahl <ada@thorsis.com> Link: https://lore.kernel.org/r/20240826173116.3628337-3-claudiu.beznea@tuxon.dev Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> drivers/clk/at91/sckc.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit d87daa18535d38385f1da460c557c004e0b66347 Author: Claudiu Beznea <claudiu.beznea@tuxon.dev> Date: Mon Aug 26 20:31:14 2024 +0300 dt-bindings: clk: at91: Add clock IDs for the slow clock controller Add clock IDs for the slow clock controller. Previously, raw numbers were used (0 or 1) for clocks generated by the slow clock controller. This leads to confusion and wrong IDs were used on few device trees. To avoid this add macros. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240826173116.3628337-2-claudiu.beznea@tuxon.dev Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> include/dt-bindings/clock/at91.h | 4 ++++ 1 file changed, 4 insertions(+) commit d567679f2b6a8bcea20589bbea6488c0236886cd Author: Adam Ford <aford173@gmail.com> Date: Sat Oct 26 08:19:59 2024 -0500 phy: freescale: fsl-samsung-hdmi: Clean up fld_tg_code calculation Currently, the calcuation for fld_tg_code is based on a lookup table, but there are gaps in the lookup table, and frequencies in these gaps may not properly use the correct divider. Based on the description of FLD_CK_DIV, the internal PLL frequency should be less than 50 MHz, so directly calcuate the value of FLD_CK_DIV from pixclk. This allow for proper calcuation of any pixel clock and eliminates a few gaps in the LUT. Since the value of the int_pllclk is in Hz, do the fixed-point math in Hz to achieve a more accurate value and reduces the complexity of the caluation to 24MHz * (256 / int_pllclk). Fixes: 6ad082bee902 ("phy: freescale: add Samsung HDMI PHY") Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de> Link: https://lore.kernel.org/r/20241026132014.73050-3-aford173@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 32 ++++++++++------------------ 1 file changed, 11 insertions(+), 21 deletions(-) commit 1b9b8b159601d174526ce1c3a62ebe3a7286003b Author: Adam Ford <aford173@gmail.com> Date: Sat Oct 26 08:19:58 2024 -0500 phy: freescale: fsl-samsung-hdmi: Stop searching when exact match is found There are a series of for-loops which check various values of P and S for the integer divder PLL. The for loops search all entries and use the one closest to the nominal, but it continues to searches through all for loops even after the nominal is achieved. Ending when the nominal value is found stops wasting time, since it will not find a better value than a deviation of 0 Hz. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de> Link: https://lore.kernel.org/r/20241026132014.73050-2-aford173@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2a9868d69be26e623dd0bf4231d5175f0ccf5d6f Author: Adam Ford <aford173@gmail.com> Date: Sat Oct 26 08:19:57 2024 -0500 phy: freescale: fsl-samsung-hdmi: Expand Integer divider range The Integer divder uses values of P,M, and S to determine the PLL rate. Currently, the range of M was set based on a series of table entries where the range was limited. Since the ref manual shows it is 8-bit wide, expand the range to be up to 255. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de> Link: https://lore.kernel.org/r/20241026132014.73050-1-aford173@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit ba8ad7eece66ac5c579dd8de39efc72770e7cf64 Author: Kever Yang <kever.yang@rock-chips.com> Date: Wed Nov 6 10:13:57 2024 +0800 phy: rockchip-naneng-combo: add rk3576 support Rockchip RK3576 integrates two naneng-combo PHY, PHY0 is used for PCIE and SATA, PHY1 is used for PCIE, SATA and USB3. This adds device specific data support. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: William Wu <william.wu@rock-chips.com> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Test-by: Kever Yang <kever.yang@rock-chips.com> Link: https://lore.kernel.org/r/20241106021357.19782-2-frawang.cn@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 279 +++++++++++++++++++++ 1 file changed, 279 insertions(+) commit b136e9928dbe5e71474d9e2c8911c4a094e329c2 Author: Frank Wang <frank.wang@rock-chips.com> Date: Wed Nov 6 10:13:56 2024 +0800 dt-bindings: phy: rockchip: add rk3576 compatible Adds the compatible line to support RK3576 SoC. Signed-off-by: Frank Wang <frank.wang@rock-chips.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241106021357.19782-1-frawang.cn@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Documentation/devicetree/bindings/phy/phy-rockchip-naneng-combphy.yaml | 1 + 1 file changed, 1 insertion(+) commit 6fc5bdfa872b7da51b5507a1327a17c3db2fcf95 Author: Nicolas Ferre <nicolas.ferre@microchip.com> Date: Mon Nov 25 17:56:48 2024 +0100 ARM: at91: pm: change BU Power Switch to automatic mode Change how the Backup Unit Power is configured and force the automatic/hardware mode. This change eliminates the need for software management of the power switch, ensuring it transitions to the backup power source before entering low power modes. This is done in the only location where this switch was configured. It's usually done in the bootloader. Previously, the loss of the VDDANA (or VDDIN33) power source was not automatically compensated by an alternative power source. This resulted in the loss of Backup Unit content, including Backup Self-refresh low power mode information, OTP emulation configuration, and boot configuration, for instance. Fixes: ac809e7879b1 ("ARM: at91: pm: switch backup area to vbat in backup mode") Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20241125165648.509162-1-nicolas.ferre@microchip.com Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> arch/arm/mach-at91/pm.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) commit d3455ab798100f40af77123e7c2443ec979c546b Author: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Thu Oct 31 13:33:36 2024 +0100 soc: atmel: fix device_node release in atmel_soc_device_init() A device_node acquired via of_find_node_by_path() requires explicit calls to of_node_put() when it is no longer needed to avoid leaking the resource. Instead of adding the missing calls to of_node_put() in all execution paths, use the cleanup attribute for 'np' by means of the __free() macro, which automatically calls of_node_put() when the variable goes out of scope. Fixes: 960ddf70cc11 ("drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs") Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20241031-soc-atmel-soc-cleanup-v2-1-73f2d235fd98@gmail.com Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> drivers/soc/atmel/soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7041ed0dde8319991b59003c414f0bda5192b041 Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Wed Sep 18 14:31:48 2024 +0200 extcon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 These drivers don't use the driver_data member of struct i2c_device_id, so don't explicitly initialize this member. This prepares putting driver_data in an anonymous union which requires either no initialization or named designators. But it's also a nice cleanup on its own. Link: https://lore.kernel.org/lkml/20240918123150.1540161-6-u.kleine-koenig@baylibre.com/ Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> drivers/extcon/extcon-fsa9480.c | 2 +- drivers/extcon/extcon-ptn5150.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 68c8448341e3e255c5e58a2206545a00f5129d6d Author: anish kumar <yesanishhere@gmail.com> Date: Sat Nov 2 19:54:36 2024 -0700 Documentation: extcon: add documentation for Extcon subsystem The Extcon (External Connector) subsystem driver lacked proper documentation. This commit adds comprehensive documentation explaining the purpose, key components, and usage of the Extcon framework. The new documentation includes: - An overview of the Extcon subsystem - Descriptions of key structures - Explanations of core functions - Information on the sysfs interface - A usage example for driver developers Link: https://lore.kernel.org/lkml/20241103025436.69196-1-yesanishhere@gmail.com/ Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: anish kumar <yesanishhere@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Documentation/driver-api/extcon.rst | 255 ++++++++++++++++++++++++++++++++++++ Documentation/driver-api/index.rst | 1 + MAINTAINERS | 1 + 3 files changed, 257 insertions(+) commit 91329cb0a8cb4a7c7bb5743a65a052c084225d86 Author: Charles Han <hanchunchao@inspur.com> Date: Fri Oct 25 17:46:50 2024 +0800 extcon: realtek: fix NULL deref check in extcon_rtk_type_c_probe In extcon_rtk_type_c_probe() devm_kzalloc() may return NULL but this returned value is not checked. Fixes: 8a590d7371f0 ("extcon: add Realtek DHC RTD SoC Type-C driver") Link: https://lore.kernel.org/lkml/20241025094650.253599-1-hanchunchao@inspur.com/ Signed-off-by: Charles Han <hanchunchao@inspur.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> drivers/extcon/extcon-rtk-type-c.c | 2 ++ 1 file changed, 2 insertions(+) commit ed33fbb5d5536db77bd168e8fefde8dbc077cfd7 Author: Markus Elfring <elfring@users.sourceforge.net> Date: Thu Oct 3 11:01:30 2024 +0200 PM / devfreq: event: Call of_node_put() only once in devfreq_event_get_edev_by_phandle() An of_node_put(node) call was immediately used after a null pointer check for the local variable “edev” at the end of this function implementation. Thus call such a function only once instead directly before the check. This issue was transformed by using the Coccinelle software. Link: https://lore.kernel.org/lkml/0f103384-376c-41f0-a35c-8ad98327d6cb@web.de/ Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> drivers/devfreq/devfreq-event.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 7ea2745766d776866cfbc981b21ed3cfdf50124e Author: Justin Lai <justinlai0215@realtek.com> Date: Fri Dec 6 16:48:51 2024 +0800 rtase: Refine the if statement Refine the if statement to improve readability. Signed-off-by: Justin Lai <justinlai0215@realtek.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Link: https://patch.msgid.link/20241206084851.760475-1-justinlai0215@realtek.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/realtek/rtase/rtase_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 72e2e2f5eef33375ce65c393fc40f4af94e40975 Merge: 3ca459eaba1b 484d0170d6c6 Author: Jakub Kicinski <kuba@kernel.org> Date: Sat Dec 7 17:49:47 2024 -0800 Merge branch 'net-net-add-negotiation-of-in-band-capabilities-remainder' Russell King says: ==================== net: net: add negotiation of in-band capabilities (remainder) Here are the last three patches which were not included in the non-RFC posting, but were in the RFC posting. These add the .pcs_inband() method to the Lynx, MTK Lynx and XPCS drivers. ==================== Link: https://patch.msgid.link/Z1F1b8eh8s8T627j@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 484d0170d6c6bbb5213d037664e9a551f793bacd Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Thu Dec 5 09:42:34 2024 +0000 net: pcs: xpcs: implement pcs_inband_caps() method Report the PCS inband capabilities to phylink for XPCS. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tJ8NW-006L5V-I9@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/pcs/pcs-xpcs.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 520d29bdda86915b3caf8c72825a574bff212553 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Thu Dec 5 09:42:29 2024 +0000 net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method Report the PCS in-band capabilities to phylink for the LynxI PCS. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tJ8NR-006L5P-E3@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/pcs/pcs-mtk-lynxi.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 6561f0e547be221f411fda5eddfcc5bd8bb058a5 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Thu Dec 5 09:42:24 2024 +0000 net: pcs: pcs-lynx: implement pcs_inband_caps() method Report the PCS in-band capabilities to phylink for the Lynx PCS. Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tJ8NM-006L5J-AH@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/pcs/pcs-lynx.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 3ca459eaba1bf96a8c7878de84fa8872259a01e3 Author: Stas Sergeev <stsp2@yandex.ru> Date: Thu Dec 5 10:36:14 2024 +0300 tun: fix group permission check Currently tun checks the group permission even if the user have matched. Besides going against the usual permission semantic, this has a very interesting implication: if the tun group is not among the supplementary groups of the tun user, then effectively no one can access the tun device. CAP_SYS_ADMIN still can, but its the same as not setting the tun ownership. This patch relaxes the group checking so that either the user match or the group match is enough. This avoids the situation when no one can access the device even though the ownership is properly set. Also I simplified the logic by removing the redundant inversions: tun_not_capable() --> !tun_capable() Signed-off-by: Stas Sergeev <stsp2@yandex.ru> Reviewed-by: Willem de Bruijn <willemb@google.com> Acked-by: Jason Wang <jasowang@redhat.com> Link: https://patch.msgid.link/20241205073614.294773-1-stsp2@yandex.ru Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/tun.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 81d89e6e88d5d592c1792940753d69d9753b3a8a Author: Johannes Berg <johannes.berg@intel.com> Date: Fri Dec 6 11:30:57 2024 +0100 tools: ynl-gen-c: don't require -o argument Without -o the tool currently crashes, but it's not marked as required. The only thing we can't do without it is to generate the correct #include for user source files, but we can put a placeholder instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20241206113100.89d35bf124d6.I9228fb704e6d5c9d8e046ef15025a47a48439c1e@changeid Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/net/ynl/ynl-gen-c.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 00ab246750821b226f14ebc94ad21431dc82820b Author: Johannes Berg <johannes.berg@intel.com> Date: Fri Dec 6 11:30:56 2024 +0100 tools: ynl-gen-c: annotate valid choices for --mode This makes argparse validate the input and helps users understand which modes are possible. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20241206113100.e2ab5cf6937c.Ie149a0ca5df713860964b44fe9d9ae547f2e1553@changeid Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/net/ynl/ynl-gen-c.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 892bb0740b02e9cc1e4e28b9fc042d5987257bef Author: Vaibhav Gupta <vaibhavgupta40@gmail.com> Date: Mon Jul 20 20:37:16 2020 +0530 firewire: ohci: use generic power management Drivers using legacy PM have to manage PCI states and device's PM states themselves. They also need to take care of configuration registers. With improved and powerful support of generic PM, PCI Core takes care of above mentioned, device-independent, jobs. This driver makes use of PCI helper functions like pci_save/restore_state(), pci_disable_device() and pci_set_power_state() to do required operations. In generic mode, they are no longer needed. Change function parameter in both .suspend() and .resume() to "struct device*" type. Use to_pci_dev() to get "struct pci_dev*" variable. Compile-tested only. Maintainer has tested the changes on non-PowerPC platform and got no failure of the suspend/resume operations. Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com> Link: https://lore.kernel.org/r/20200720150715.624520-1-vaibhavgupta40@gmail.com Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by; Takashi Sakamoto <o-takashi@sakamocchi.jp< drivers/firewire/ohci.c | 44 +++++++++++++------------------------------- 1 file changed, 13 insertions(+), 31 deletions(-) commit 56f8c1759be90f139056a61328ffbf168cef895f Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Fri Dec 6 23:07:23 2024 +0100 iio: proximity: aw96103: Constify struct iio_info​ 'struct iio_info' 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: Before: ====== text data bss dec hex filename 17366 1454 16 18836 4994 drivers/iio/proximity/aw96103.o After: ===== text data bss dec hex filename 17526 1294 16 18836 4994 drivers/iio/proximity/aw96103.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://patch.msgid.link/da4918af46fef03903ab0e9fdcb4f23e014f3821.1733522812.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/proximity/aw96103.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 582d732bf689dea68f002d4f05a0b9485326e8f0 Author: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Sun Nov 24 19:59:06 2024 +0100 iio: light: veml6030: add support for triggered buffer All devices supported by this driver (currently veml6030, veml6035 and veml7700) have two 16-bit channels, and can profit for the same configuration to support data access via triggered buffers. The measurements are stored in two 16-bit consecutive registers (addresses 0x04 and 0x05) as little endian, unsigned data. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20241124-veml6030_triggered_buffer-v3-1-565bb6b4b5c8@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/light/Kconfig | 2 ++ drivers/iio/light/veml6030.c | 76 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) commit c437190ceaaa68caa303e1fd8ab3654be580b1c4 Author: Jiasheng Jiang <jiashengjiangcool@gmail.com> Date: Sat Nov 23 22:01:49 2024 +0000 iio: trigger: stm32-timer-trigger: Add check for clk_enable() Add check for the return value of clk_enable() in order to catch the potential exception. Reviewed-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com> Link: https://patch.msgid.link/20241123220149.30655-1-jiashengjiangcool@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/trigger/stm32-timer-trigger.c | 48 +++++++++++++++++++------------ 1 file changed, 29 insertions(+), 19 deletions(-) commit e895f2edfe4820b671c700ccc17be35b1de3d295 Author: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Mon Nov 25 22:16:19 2024 +0100 iio: core: fix doc reference to iio_push_to_buffers_with_ts_unaligned Use the right name of the function, which is defined in drivers/iio/industrialio-buffer.c Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20241125-iio_memset_scan_holes-v1-11-0cb6e98d895c@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> include/linux/iio/iio-opaque.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8278c08ad21271fa86d5384f3c39a06c989d952e Author: Frank Li <Frank.Li@nxp.com> Date: Tue Nov 26 14:52:56 2024 -0500 iio: adc: vf610_adc: limit i.MX6SX's channel number to 4 i.MX6SX only has 4 ADC channels, so limit channel numbers to 4 for compatible string 'fsl,imx6sx-adc'. Reviewed-by: Haibo Chen <haibo.chen@nxp.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20241126195256.2441622-2-Frank.Li@nxp.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/vf610_adc.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 207149d9f7089d79fa14df6f677b0b571dc6d8a7 Author: Frank Li <Frank.Li@nxp.com> Date: Tue Nov 26 14:52:55 2024 -0500 iio: adc: vf610_adc: use devm_* and dev_err_probe() to simple code Use devm_* and dev_err_probe() simplify probe function and remove vf610_adc_remove(). Reviewed-by: Haibo Chen <haibo.chen@nxp.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20241126195256.2441622-1-Frank.Li@nxp.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/vf610_adc.c | 78 +++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 53 deletions(-) commit 0ecb42a16cc42ec7b839ed546a65bbb5a5efefab Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Thu Nov 28 11:03:18 2024 +0200 iio: accel: kx022a: Support KX134-1211 The ROHM KX134-1211 has very similar register interface as KX132-1211 does. The main differencies are the content of the "Who am I" identification register and different g-ranges. The KX132-1211 can measure ranges from +/- 2g to +/-16g where the KX134-1211 supports measuring ranges +/- 8g to +/- 64g. Support the ROHM KX134-1211. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://patch.msgid.link/6e95af6b425df6a5ff5218825ec8923f1341f7c3.1732783834.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/kionix-kx022a-i2c.c | 2 ++ drivers/iio/accel/kionix-kx022a-spi.c | 2 ++ drivers/iio/accel/kionix-kx022a.c | 29 +++++++++++++++++++++++++++++ drivers/iio/accel/kionix-kx022a.h | 2 ++ 4 files changed, 35 insertions(+) commit 046b460d059c17fb6642b6ebd074ac1de47103ca Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Thu Nov 28 11:03:02 2024 +0200 dt-bindings: iio: kx022a: Support KX134-1211 The ROHM KX134-1211 is very similar to KX132-1211. The main difference is supported g-ranges. The KX132-1211 can measure ranges from +/- 2g to +/-16g where the KX134-1211 supports measuring ranges +/- 8g to +/- 64g. Support the ROHM KX134-1211. Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://patch.msgid.link/48b50cbda3d6c3a58a7b7c9ff23ed4dc7f418a5e.1732783834.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> .../devicetree/bindings/iio/accel/kionix,kx022a.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 48e4f3cb67b86c1d5aad18b2d13229a85cb65fd8 Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Thu Nov 28 11:02:45 2024 +0200 iio: kx022a: Support ROHM KX134ACR-LBZ The register interface of the ROHM KX134ACR-LBZ accelerometer is almost identical to the KX132ACR-LBZ. The main difference between these accelerometers is that the KX134ACR-LBZ supports different G-ranges. The driver can model this by informing different scale to users. Also, the content of the "who_am_I" register is different. Add an ID and scales for the KX134ACR-LBZ. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://patch.msgid.link/27c43c595de1f3f698ace671922d4f5a48c3cd54.1732783834.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/kionix-kx022a-i2c.c | 2 ++ drivers/iio/accel/kionix-kx022a-spi.c | 2 ++ drivers/iio/accel/kionix-kx022a.c | 36 +++++++++++++++++++++++++++++++++++ drivers/iio/accel/kionix-kx022a.h | 2 ++ 4 files changed, 42 insertions(+) commit 720c8b777a7a5bbbe7904868f236461a431ce283 Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Thu Nov 28 11:02:29 2024 +0200 dt-bindings: ROHM KX134ACR-LBZ >From the software point of view, the KX134ACR-LBZ is almost identical to the KX132ACR-LBZ. They, however, have different g ranges and ID register values which makes them incompatible. Add compatible and information for ROHM KX134ACR-LBZ accelerometer. Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://patch.msgid.link/2efe2bf7078704be3f020663960fef563ab21aca.1732783834.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 64eb1c6fae9423747e37887dec6aeee413490f00 Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Thu Nov 28 11:02:15 2024 +0200 iio: accel: kx022a: Support ICs with different G-ranges The register interface of the ROHM KX134ACR-LBZ accelerometer is almost identical to the KX132ACR-LBZ. Main difference between these accelerometers is that the KX134ACR-LBZ supports G-ranges +/- 8, 16, 32 and 64G. All the other sensors supported by the kx022a driver can measure +/- 2, 4, 8 and 16G. Prepare supporting the KX134ACR-LBZ with different G-ranges by storing a pointer to the scale tables in IC specific structure. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://patch.msgid.link/fc667b1495adf4e3f29ecbb336495c1f18b47e61.1732783834.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/kionix-kx022a.c | 32 +++++++++++++++++++++----------- drivers/iio/accel/kionix-kx022a.h | 2 ++ 2 files changed, 23 insertions(+), 11 deletions(-) commit 725521e1f485d4687790f2e459271f1ad6af64d5 Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Thu Nov 28 11:01:48 2024 +0200 iio: accel: kx022a: Use cleanup.h helpers A few functions in KX022A need to use mutex for protecting the enabling/disabling of the measurement while configurations are being made. Some of the functions can be slightly simplified by using the __cleanup based scoped mutexes, which allows dropping the goto based unlocking at error path. Simplify error paths using guard(mutex). Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://patch.msgid.link/4785f841ad5f131356ba78b4f3c76f676d86a2e8.1732783834.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/kionix-kx022a.c | 61 +++++++++++++++------------------------ 1 file changed, 23 insertions(+), 38 deletions(-) commit 0c39208bc3af6f7afcbcdb675ad8fbe6b3022865 Author: Robert Budai <robert.budai@analog.com> Date: Mon Nov 25 15:35:08 2024 +0200 iio: imu: adis: Remove documented not used elements This patch removes elements from adis.h that are documented but not used anymore. Signed-off-by: Robert Budai <robert.budai@analog.com> Link: https://patch.msgid.link/20241125133520.24328-2-robert.budai@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> include/linux/iio/imu/adis.h | 1 - 1 file changed, 1 deletion(-) commit 14a2ed21efdce5a585fff9e07c58799ffb6ca022 Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Thu Nov 28 21:35:35 2024 +0200 dt-bindings: iio: light: Drop BU27008 and BU27010 The ROHM BU27008 and BU27010 RGB sensors got cancelled. I was informed they never reached mass production stage. Keeping the bindings around is waste of maintenance resources. Drop the bindings. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/3be66a8ec15fedd18ef13afae48ebb182196da13.1732819203.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> .../bindings/iio/light/rohm,bu27008.yaml | 49 --------------------- .../bindings/iio/light/rohm,bu27010.yaml | 50 ---------------------- 2 files changed, 99 deletions(-) commit 91407b55181df45b66bf5db79fb9648c44d12bc4 Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Thu Nov 28 21:35:18 2024 +0200 iio: light: Drop BU27008 and BU27010 The ROHM BU27008 and BU27010 RGB sensors got cancelled. I was informed they never reached mass production stage. Keeping the drivers around is waste of maintenance resources. Drop the drivers. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/f4d0aa31f29f160a06cba4856a034fa5636d3372.1732819203.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> MAINTAINERS | 1 - drivers/iio/light/Kconfig | 16 - drivers/iio/light/Makefile | 1 - drivers/iio/light/rohm-bu27008.c | 1635 -------------------------------------- 4 files changed, 1653 deletions(-) commit 7a91aee8ef811d3770c8ea30bd80e1d8d719f757 Author: Han Xu <han.xu@nxp.com> Date: Fri Nov 15 17:37:23 2024 -0500 iio: gyro: Add support for iam20380 sensor Add support for the Invensense IAM20380 sensor to the MPU6050 driver. It is similar to the IAM20680. But IAM20380 only supports gyro and WHOAMI register data is difference. Signed-off-by: Han Xu <han.xu@nxp.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com> Link: https://patch.msgid.link/20241115-iam20380-v2-2-d8d9dc6891f5@nxp.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 25 +++++++++++++++++++++++++ drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 6 ++++++ drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 2 ++ drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 5 +++++ 4 files changed, 38 insertions(+) commit b305412152b7346f69b2ba16ef112315e9939c5c Author: Han Xu <han.xu@nxp.com> Date: Fri Nov 15 17:37:22 2024 -0500 dt-bindings: iio: imu: mpu6050: Add invensense,iam20380 compatible string Add compatible string "invensense,iam20380" for the Invensense IAM20380 sensor. The IAM20380 is similar to the IAM20680, but only supports gyro. Signed-off-by: Han Xu <han.xu@nxp.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20241115-iam20380-v2-1-d8d9dc6891f5@nxp.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml | 1 + 1 file changed, 1 insertion(+) commit cb3e9a446763da8850c8280be009d95f61e11a94 Author: David Lechner <dlechner@baylibre.com> Date: Fri Nov 22 11:42:48 2024 -0600 iio: adc: ad_sigma_delta: add tab to align irq_line Align the irq_line field in struct ad_sigma_delta with the other fields. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241122-iio-adc-ad_signal_delta-fix-align-v1-1-d0a071d2dc83@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> include/linux/iio/adc/ad_sigma_delta.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a05dc8b4d4aa3b6602fbf755c439c0860cf08467 Author: David Lechner <dlechner@baylibre.com> Date: Fri Nov 15 14:18:48 2024 -0600 iio: buffer-dmaengine: document iio_dmaengine_buffer_setup_ext The iio_dmaengine_buffer_setup_ext() function is public and should be documented. Also, while touching this, fix the description of @dev in related functions. @dev does not strictly have to be the parent of the IIO device. It is only passed to dma_request_chan() so strictly speaking, it can be any device that is a valid DMA channel consumer. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241115-dlech-mainline-spi-engine-offload-2-v5-9-bea815bd5ea5@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/buffer/industrialio-buffer-dmaengine.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit df81f90c500b018e4793e9f4be3c6966930f8417 Author: Cibil Pankiras <cibil.pankiras@aerq.com> Date: Thu Nov 14 10:13:23 2024 +0100 iio: light: cm3232: Reset before reading HW ID According to the datasheet, the chip requires a reset before any data can be read. This commit moves the device identification logic to occur after the reset to ensure proper initialization. Cc: Kevin Tsai <ktsai@capellamicro.com> Signed-off-by: Cibil Pankiras <cibil.pankiras@aerq.com> Link: https://patch.msgid.link/20241114091323.7415-1-cibil.pankiras@aerq.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/light/cm3232.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2d6941932974005867e7f02f113edac63b598b45 Author: David Lechner <dlechner@baylibre.com> Date: Wed Nov 13 10:55:20 2024 -0600 dt-bindings: iio: adc: adi,ad4695: change include path Change the include path for the adi,ad4695.h header since it has been moved to the include/dt-bindings/iio/adc/ directory. Signed-off-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20241113-iio-adc-ad4695-move-dt-bindings-header-v1-2-aba1f0f9b628@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 435004291c9aebeb940c4bb5b0f5764c012ea5ff Author: David Lechner <dlechner@baylibre.com> Date: Wed Nov 13 10:55:19 2024 -0600 iio: adc: ad4695: move dt-bindings header Move the dt-bindings header file to the include/dt-bindings/iio/adc/ directory. ad4695 is an ADC driver, so it should be in the adc/ subdirectory for better organization. Previously, it was in the iio/ subdirectory. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241113-iio-adc-ad4695-move-dt-bindings-header-v1-1-aba1f0f9b628@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/iio/ad4695.rst | 2 +- MAINTAINERS | 2 +- drivers/iio/adc/ad4695.c | 2 +- include/dt-bindings/iio/{ => adc}/adi,ad4695.h | 0 4 files changed, 3 insertions(+), 3 deletions(-) commit 534674463a5978c6eda8185b31f5b903a9543f46 Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Thu Nov 21 15:05:38 2024 +0200 iio: bm1390: simplify using guard(mutex) The BM1390 uses mutex for protecting the fifo read sequence. The clean-up for a few of the functions can be slightly simplified by removing the goto-based error handling/unlocking and by utilizing the guard(mutex) scoped mutex handling instead. Simplify driver by using the scoped mutexes. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/a4c2f21189964132d245531b77fb0865562443a1.1732193263.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/pressure/rohm-bm1390.c | 78 +++++++++++++++----------------------- 1 file changed, 30 insertions(+), 48 deletions(-) commit 439c2cef8157bd3856200effdf4bb4ce3ff8e774 Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Thu Nov 21 15:05:19 2024 +0200 iio: bu27034: simplify using guard(mutex) The BU27034 uses mutex for protecting the gain / time / scale changes. The clean-up for a few of the functions can be slightly simplified by removing the goto-based error handling/unlocking and by utilizing the guard(mutex) scoped mutex handling instead. Simplify driver by using the scoped mutexes. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/4e65a4725c211b166906f70fdb5ba90f2af0f570.1732193263.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/light/rohm-bu27034.c | 73 ++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 48 deletions(-) commit d95986fb818d3f76841f2cd32c74dd7961a2a15d Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Thu Nov 21 10:19:50 2024 +0200 iio: accel: kx022a: Improve reset delay All the sensors supported by kx022a driver seemed to require some delay after software reset to be operational again. More or less a random msleep(1) was added to cause the driver to go to sleep so the sensor has time to become operational again. Now we have official docuumentation available: https://fscdn.rohm.com/kionix/en/document/AN010_KX022ACR-Z_Power-on_Procedure_E.pdf https://fscdn.rohm.com/kionix/en/document/TN027-Power-On-Procedure.pdf https://fscdn.rohm.com/kionix/en/document/AN011_KX134ACR-LBZ_Power-on_Procedure_E.pdf stating the required time is 2 ms. Due to the nature of the current msleep implementation, the msleep(1) is likely to be sleeping more than 2ms already - but the value "1" is misleading in case someone needs to optimize the start time and change the msleep to a more accurate delay. Hence it is better for "documentation" purposes to use value which actually reflects the specified 2ms wait time. Change the value of delay after software reset to match the specifications and add links to the power-on procedure specifications. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://patch.msgid.link/ac1b6705945cded0e79593d64e55522681e00f9a.1732105157.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/kionix-kx022a.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 9fdf1d03331623e377d8445e600b09111259a608 Author: Victor Duicu <victor.duicu@microchip.com> Date: Fri Nov 15 15:34:36 2024 +0200 iio: adc: pac1921: Add ACPI support to Microchip pac1921 This patch implements ACPI support to Microchip pac1921. The driver can read the shunt resistor value and label from the ACPI table. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Matteo Martelli <matteomartelli3@gmail.com> Signed-off-by: Victor Duicu <victor.duicu@microchip.com> Link: https://patch.msgid.link/20241115133436.13204-1-victor.duicu@microchip.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/pac1921.c | 93 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 87 insertions(+), 6 deletions(-) commit 26f9fd646cb07875d70ee189dfff08c313d0ef2f Author: Karan Sanghavi <karansanghvi98@gmail.com> Date: Mon Nov 11 14:55:05 2024 +0000 iio: dac: Fix converters spelling typo. Correct the converters typo error "convertors" => "converters" Signed-off-by: Karan Sanghavi <karansanghvi98@gmail.com> Link: https://patch.msgid.link/20241111-dackconfigcodespell-v1-1-2498567be34c@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9598866317fc4c297c4423aa948479408639c537 Author: David Lechner <dlechner@baylibre.com> Date: Wed Nov 20 15:33:34 2024 -0600 iio: dac: max5821: use devm_regulator_get_enable_read_voltage() Simplify the code by using devm_regulator_get_enable_read_voltage(). Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241120-iio-regulator-cleanup-round-6-v1-11-d5a5360f7ec3@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/max5821.c | 36 ++++-------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) commit 6f0588607864dc980318e4c4e03bd4e3b8acdf3e Author: David Lechner <dlechner@baylibre.com> Date: Wed Nov 20 15:33:33 2024 -0600 iio: dac: ltc2688: use devm_regulator_get_enable_read_voltage() Simplify the code by using devm_regulator_get_enable_read_voltage(). Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241120-iio-regulator-cleanup-round-6-v1-10-d5a5360f7ec3@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/ltc2688.c | 44 ++++++++++---------------------------------- 1 file changed, 10 insertions(+), 34 deletions(-) commit 3ebb535f4f926e50646364d49ddf013d68d84e5f Author: David Lechner <dlechner@baylibre.com> Date: Wed Nov 20 15:33:32 2024 -0600 iio: dac ltc2632: drop driver remove function Remove driver remove callback for the ltc2632 driver. By making use of devm_iio_device_register(), we no longer need a driver remove callback. Also since this was the last user of spi_get_drvdata(), we can drop the call to spi_set_drvdata(). Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241120-iio-regulator-cleanup-round-6-v1-9-d5a5360f7ec3@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/ltc2632.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit c15031ef6ef3879d87534df17b19de0a130726ec Author: David Lechner <dlechner@baylibre.com> Date: Wed Nov 20 15:33:31 2024 -0600 iio: dac: ltc2632: use devm_regulator_get_enable_read_voltage() Simplify the code by using devm_regulator_get_enable_read_voltage(). Some use of dev_err() is replaced with dev_err_probe() to simplify things even more since we are refactoring these lines anyway. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241120-iio-regulator-cleanup-round-6-v1-8-d5a5360f7ec3@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/ltc2632.c | 58 +++++++++++++++-------------------------------- 1 file changed, 18 insertions(+), 40 deletions(-) commit 276821d1e04cd10db98cabcc532cbfef6bd3e529 Author: David Lechner <dlechner@baylibre.com> Date: Wed Nov 20 15:33:30 2024 -0600 iio: dac ad8801: drop driver remove function Remove driver remove callback in the ad8801 driver. By making use of devm_iio_device_register(), we no longer need a driver remove callback. Also since this was the last user of spi_get_drvdata(), we can drop the call to spi_set_drvdata(). Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241120-iio-regulator-cleanup-round-6-v1-7-d5a5360f7ec3@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/ad8801.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 451bdc1dc9cbadc0bb3567d0fa25e1898452e9fe Author: David Lechner <dlechner@baylibre.com> Date: Wed Nov 20 15:33:29 2024 -0600 iio: dac: ad8801: use devm_regulator_get_enable_read_voltage() Simplify the code by using devm_regulator_get_enable_read_voltage(). Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241120-iio-regulator-cleanup-round-6-v1-6-d5a5360f7ec3@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/ad8801.c | 70 +++++++++--------------------------------------- 1 file changed, 12 insertions(+), 58 deletions(-) commit 6c009e55924a7a103925091af0811c3553ca27e9 Author: David Lechner <dlechner@baylibre.com> Date: Wed Nov 20 15:33:26 2024 -0600 iio: dac: ad5686: use devm_regulator_get_enable_read_voltage() Simplify the code by using devm_regulator_get_enable_read_voltage(). There is a small change in behavior. Before, all errors from devm_regulator_get_optional() were ignored and assumed to mean that the external reference supply was absent. Now, only -ENODEV is checked and other errors will cause a failure to probe. So now, this will catch errors, like using the wrong data type for the devicetree property. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241120-iio-regulator-cleanup-round-6-v1-3-d5a5360f7ec3@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/ad5686-spi.c | 6 ----- drivers/iio/dac/ad5686.c | 62 +++++++++++--------------------------------- drivers/iio/dac/ad5686.h | 4 --- drivers/iio/dac/ad5696-i2c.c | 6 ----- 4 files changed, 15 insertions(+), 63 deletions(-) commit f596651dd6beb37b0f90e21ec245a3bc7c84557b Author: David Lechner <dlechner@baylibre.com> Date: Wed Nov 20 15:33:25 2024 -0600 iio: dac: ad5686: fix struct name in doc comment Fix a copy/paste mistake in the struct ad5686_state doc comment. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241120-iio-regulator-cleanup-round-6-v1-2-d5a5360f7ec3@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/ad5686.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6d9c45c90effa6b662c080146c12c73472b1706 Author: David Lechner <dlechner@baylibre.com> Date: Wed Nov 20 15:33:24 2024 -0600 iio: dac: ad5624r: fix struct name in doc comment Fix a copy/paste mistake in the struct ad5624r_state doc comment. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241120-iio-regulator-cleanup-round-6-v1-1-d5a5360f7ec3@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/ad5624r.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cd85685546d32560beffe97fcec24be2812bec2 Author: Han Xu <han.xu@nxp.com> Date: Fri Nov 15 15:24:00 2024 -0500 iio: accel: fxls8962af: add fxls8967af support fxls8967af is similar with fxls8962af, the only difference is the device id change to 0x87. Signed-off-by: Han Xu <han.xu@nxp.com> Reviewed-by: Sean Nyekjaer <sean@geanix.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20241115-fxls-v2-4-95f3df9228ed@nxp.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/fxls8962af-core.c | 7 +++++++ drivers/iio/accel/fxls8962af-i2c.c | 1 + drivers/iio/accel/fxls8962af.h | 1 + 3 files changed, 9 insertions(+) commit f7c0bc201900eb0145b14e0638b410998a647030 Author: Haibo Chen <haibo.chen@nxp.com> Date: Fri Nov 15 15:23:59 2024 -0500 iio: accel: fxls8962af: add fxls8974cf support fxls8974cf is similar with fxls8962af, the only difference is the device id change to 0x86. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Clark Wang <xiaoning.wang@nxp.com> Reviewed-by: Sean Nyekjaer <sean@geanix.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20241115-fxls-v2-3-95f3df9228ed@nxp.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/accel/fxls8962af-core.c | 7 +++++++ drivers/iio/accel/fxls8962af-i2c.c | 1 + drivers/iio/accel/fxls8962af.h | 1 + 3 files changed, 9 insertions(+) commit db61f1b7a76995e97c88b1101f62404dbbe1d136 Author: Han Xu <han.xu@nxp.com> Date: Fri Nov 15 15:23:58 2024 -0500 dt-bindings: iio: accel: fxls8962af: add compatible string 'nxp,fxls8974cf' Add 'nxp,fxls8974cf' compatible for the FXLS8974CF sensor, falling back to 'nxp,fxls8962af' as the only difference is the ID. Signed-off-by: Han Xu <han.xu@nxp.com> Reviewed-by: Sean Nyekjaer <sean@geanix.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20241115-fxls-v2-2-95f3df9228ed@nxp.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 2592bc5003f102f818fd09069fa4afcdcd19b25a Author: Han Xu <han.xu@nxp.com> Date: Fri Nov 15 15:23:57 2024 -0500 dt-bindings: iio: accel: fxls8962af: add compatible string 'nxp,fxls8967af' Add 'nxp,fxls8967af' compatible for the FXLS8967AF sensor, falling back to 'nxp,fxls8962af' as the only difference is the ID. Signed-off-by: Han Xu <han.xu@nxp.com> Reviewed-by: Sean Nyekjaer <sean@geanix.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20241115-fxls-v2-1-95f3df9228ed@nxp.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> .../devicetree/bindings/iio/accel/nxp,fxls8962af.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 6dfc256151e842fa894a2b579f9a4551c6961e2c Author: Karan Sanghavi <karansanghvi98@gmail.com> Date: Sun Nov 3 08:43:14 2024 +0000 iio: invensense: Prevent possible integer overflow while multiplication Typecast a variable to int64_t for 64-bit arithmetic multiplication. Signed-off-by: Karan Sanghavi <karansanghvi98@gmail.com> Link: https://scan7.scan.coverity.com/#/project-view/51946/11354?selectedIssue=1586045 Link: https://patch.msgid.link/20241103-coverity1586045integeroverflow-v1-1-43ea37a3f3cd@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/common/inv_sensors/inv_sensors_timestamp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a79f049b2eec9bac847717b0551469899ac0e715 Author: Rob Herring (Arm) <robh@kernel.org> Date: Mon Nov 4 13:08:46 2024 -0600 iio: dac: mcp4725: 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) <robh@kernel.org> Link: https://patch.msgid.link/20241104190846.278417-1-robh@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/dac/mcp4725.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83f616a384275301265748e6e9627b4acaa97d83 Author: David Lechner <dlechner@baylibre.com> Date: Mon Nov 4 13:42:14 2024 -0600 iio: adc: ad7173: remove unused field Remove the unused chan_reg field from struct ad7173_channel. This was set but never read. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241104-iio-adc-ad7173-remove-unused-field-v1-1-da9500a48750@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/adc/ad7173.c | 2 -- 1 file changed, 2 deletions(-) commit a8213189bbe99c7c571c53979609ab24f7853b2d Author: Guenter Roeck <linux@roeck-us.net> Date: Sat Nov 9 06:54:30 2024 -0800 iio: imu: lsm6dsx: Use i3cdev_to_dev to get device pointer I3C client drivers should not include linux/i3c/master.h. Use i3cdev_to_dev() to get the device pointer from struct i3c_device to be able to avoid that include. Suggested-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Link: https://patch.msgid.link/20241109145430.3702482-1-linux@roeck-us.net Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 197ff95ac11e601a9dd89e41147d32d22645ba7d Author: Darius Berghe <darius.berghe@analog.com> Date: Fri Nov 8 14:58:14 2024 +0200 dt-bindings: iio: adis16480: add devices to adis16480 Add the adis16486, adis16487 and adis16489 Six Degrees of Freedom Inertial Sensors to the list of compatible devices of the adis16480 iio subsystem driver. adis16486 is similar to adis16485, has the exact same channels but acceleration and delta velocity scales are different. adis16487 is fallback compatible with adis16485 and as a consequence, dt-bindings list was updated to use oneOf. adis16489 is similar to adis16488 but lacks the magnetometer and has a different accelerometer scale. Signed-off-by: Darius Berghe <darius.berghe@analog.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20241108125814.3097213-4-darius.berghe@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> .../devicetree/bindings/iio/imu/adi,adis16480.yaml | 42 ++++++++++++---------- 1 file changed, 24 insertions(+), 18 deletions(-) commit 2b1dc7f1402450fa681cefe133f85e939b501fa8 Author: Darius Berghe <darius.berghe@analog.com> Date: Fri Nov 8 14:58:13 2024 +0200 iio: imu: adis16480: add devices to adis16480 - docs Add datasheet links for adis16486, adis16487 and adis16489 Six Degrees of Freedom Inertial Sensors into the existing adis16480 driver documentation. adis16486 is similar to adis16485, has the exact same channels but acceleration and delta velocity scales are different. adis16487 is fallback compatible with adis16485. adis16489 is similar to adis16488 but lacks the magnetometer and has a different accelerometer scale. Signed-off-by: Darius Berghe <darius.berghe@analog.com> Link: https://patch.msgid.link/20241108125814.3097213-3-darius.berghe@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Documentation/iio/adis16480.rst | 3 +++ 1 file changed, 3 insertions(+) commit 6fbf150823a1ccb84eeb7c4f21e9cdc55693d462 Author: Darius Berghe <darius.berghe@analog.com> Date: Fri Nov 8 14:58:12 2024 +0200 iio: imu: adis16480: add devices to adis16480 driver Add support for adis16486, adis16487 and adis16489 Six Degrees of Freedom Inertial Sensors into the existing adis16480 iio subsystem driver. adis16486 is similar to adis16485, has the exact same channels but acceleration and delta velocity scales are different. adis16487 is fallback compatible with adis16485. adis16489 is similar to adis16488 but lacks the magnetometer and has a different accelerometer scale. Signed-off-by: Darius Berghe <darius.berghe@analog.com> Link: https://patch.msgid.link/20241108125814.3097213-2-darius.berghe@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/imu/adis16480.c | 75 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit df195d931a33889c96c0efebbbc6f3b747c145c6 Author: Julian Vetter <julian@outer-limits.org> Date: Wed Dec 4 09:04:40 2024 +0100 parisc: Remove memcpy_toio and memset_io Recently new functions for IO memcpy and IO memset were added in libs/iomem_copy.c. So, remove the arch specific implementations, to fall back to the generic ones which do exactly the same. Keep memcpy_fromio for now, because it's slight more optimized by doing 'u16' accesses if the buffer is aligned this way. Signed-off-by: Julian Vetter <julian@outer-limits.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Helge Deller <deller@gmx.de> arch/parisc/include/asm/io.h | 4 ---- arch/parisc/kernel/parisc_ksyms.c | 2 -- arch/parisc/lib/io.c | 47 --------------------------------------- 3 files changed, 53 deletions(-) commit 525077ae7145cc868b69282f85bed2be8ecd1ed5 Author: Baoquan He <bhe@redhat.com> Date: Sat Nov 23 19:42:21 2024 +0800 x86/ioremap: Remove unused size parameter in remapping functions The size parameter of functions memremap_is_efi_data(), memremap_is_setup_data() and early_memremap_is_setup_data() is not used. Remove it. [ bp: Massage commit message. ] Signed-off-by: Baoquan He <bhe@redhat.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241123114221.149383-4-bhe@redhat.com arch/x86/mm/ioremap.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 095ac6fa19500fecd7c62e755dee45bb303d4d43 Author: Baoquan He <bhe@redhat.com> Date: Sat Nov 23 19:42:19 2024 +0800 x86/ioremap: Simplify setup_data mapping variants memremap_is_setup_data() and early_memremap_is_setup_data() share completely the same process and handling, except for the differing memremap/unmap invocations. Add a helper __memremap_is_setup_data() extracting the common part and simplify a lot of code while at it. Mark __memremap_is_setup_data() as __ref to suppress this section mismatch warning: WARNING: modpost: vmlinux: section mismatch in reference: __memremap_is_setup_data+0x5f (section: .text) -> early_memunmap (section: .init.text) [ bp: Massage a bit. ] Signed-off-by: Baoquan He <bhe@redhat.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241123114221.149383-2-bhe@redhat.com arch/x86/mm/ioremap.c | 106 +++++++++++++++++--------------------------------- 1 file changed, 35 insertions(+), 71 deletions(-) commit 860dbab69ad8d07a91117ed9c9eb5fb64adf7e0e Merge: 9ec780b26985 c77200c07491 Author: Jakub Kicinski <kuba@kernel.org> Date: Fri Dec 6 17:56:56 2024 -0800 Merge branch 'net-convert-some-udp-tunnel-drivers-to-netdev_pcpu_stat_dstats' Guillaume Nault says: ==================== net: Convert some UDP tunnel drivers to NETDEV_PCPU_STAT_DSTATS. VXLAN, Geneve and Bareudp use various device counters for managing RX and TX statistics: * VXLAN uses the device core_stats for RX and TX drops, tstats for regular RX/TX counters and DEV_STATS_INC() for various types of RX/TX errors. * Geneve uses tstats for regular RX/TX counters and DEV_STATS_INC() for everything else, include RX/TX drops. * Bareudp, was recently converted to follow VXLAN behaviour, that is, device core_stats for RX and TX drops, tstats for regular RX/TX counters and DEV_STATS_INC() for other counter types. Let's consolidate statistics management around the dstats counters instead. This avoids using core_stats in VXLAN and Bareudp, as core_stats is supposed to be used by core networking code only (and not in drivers). This also allows Geneve to avoid using atomic increments when updating RX and TX drop counters, as dstats is per-cpu. Finally, this also simplifies the code as all three modules now handle stats in the same way and with only two different sets of counters (the per-cpu dstats and the atomic DEV_STATS_INC()). Patch 1 creates dstats helper functions that can be used outside of VRF (until then, dstats was VRF-specific). Then patches 2 to 4, convert VXLAN, Geneve and Bareudp, one by one. ==================== Link: https://patch.msgid.link/cover.1733313925.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit c77200c074917d0fd51e5c029c50c76c07b6d310 Author: Guillaume Nault <gnault@redhat.com> Date: Wed Dec 4 13:11:32 2024 +0100 bareudp: Handle stats using NETDEV_PCPU_STAT_DSTATS. Bareudp uses the TSTATS infrastructure (dev_sw_netstats_*()) for RX packet counters. It was also recently converted to use the device core stats (dev_core_stats_*()) for RX and TX drops (see commit 788d5d655bc9 ("bareudp: Use pcpu stats to update rx_dropped counter.")). Since core stats are to be avoided in drivers, and for consistency with VXLAN and Geneve, let's convert packet stats handling to DSTATS, which can handle RX/TX stats and packet drops. Statistics that don't fit DSTATS are still updated atomically with DEV_STATS_INC(). Signed-off-by: Guillaume Nault <gnault@redhat.com> Link: https://patch.msgid.link/0f4f8448db3ff449ac6e939872b28cf3f8982da7.1733313925.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/bareudp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 6fa6de30224619f836f4cb1209b5af3f5319806e Author: Guillaume Nault <gnault@redhat.com> Date: Wed Dec 4 13:11:30 2024 +0100 geneve: Handle stats using NETDEV_PCPU_STAT_DSTATS. Geneve uses the TSTATS infrastructure (dev_sw_netstats_*()) for RX packet counters. All other counters are handled using atomic increments with DEV_STATS_INC(). Let's convert packet stats handling to DSTATS, which has a per-cpu counter for packet drops too, to avoid the cost of atomic increments in these cases. Statistics that don't fit DSTATS are still updated atomically with DEV_STATS_INC(). Signed-off-by: Guillaume Nault <gnault@redhat.com> Link: https://patch.msgid.link/7af5c09f3c26f0f231fbe383822ca5d1ce0278fa.1733313925.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/geneve.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit be226352e8dc77d3313c096b2d8e7f69bf6980fc Author: Guillaume Nault <gnault@redhat.com> Date: Wed Dec 4 13:11:27 2024 +0100 vxlan: Handle stats using NETDEV_PCPU_STAT_DSTATS. VXLAN uses the TSTATS infrastructure (dev_sw_netstats_*()) for RX and TX packet counters. It also uses the device core stats (dev_core_stats_*()) for RX and TX drops. Let's consolidate that using the DSTATS infrastructure, which can handle both packet counters and packet drops. Statistics that don't fit DSTATS are still updated atomically with DEV_STATS_INC(). While there, convert the "len" variable of vxlan_encap_bypass() to unsigned int, to respect the types of skb->len and dev_dstats_[rt]x_add(). Signed-off-by: Guillaume Nault <gnault@redhat.com> Link: https://patch.msgid.link/145558b184b3cda77911ca5682b6eb83c3ffed8e.1733313925.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/vxlan/vxlan_core.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 18eabadd73ae60023ab05e376246bd725fb0c113 Author: Guillaume Nault <gnault@redhat.com> Date: Wed Dec 4 13:11:21 2024 +0100 vrf: Make pcpu_dstats update functions available to other modules. Currently vrf is the only module that uses NETDEV_PCPU_STAT_DSTATS. In order to make this kind of statistics available to other modules, we need to define the update functions in netdevice.h. Therefore, let's define dev_dstats_*() functions for RX and TX packet updates (packets, bytes and drops). Use these new functions in vrf.c instead of vrf_rx_stats() and the other manual counter updates. While there, update the type of the "len" variables to "unsigned int", so that there're aligned with both skb->len and the new dstats update functions. Signed-off-by: Guillaume Nault <gnault@redhat.com> Link: https://patch.msgid.link/d7a552ee382c79f4854e7fcc224cf176cd21150d.1733313925.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/vrf.c | 49 ++++++++++++++--------------------------------- include/linux/netdevice.h | 40 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 35 deletions(-) commit 9ec780b26985f5eea807a899bec2d20e463c990e Merge: 7a2716ac9a5b 48fb3d3c4be6 Author: Jakub Kicinski <kuba@kernel.org> Date: Fri Dec 6 17:53:29 2024 -0800 Merge branch 'lan78xx-preparations-for-phylink' Oleksij Rempel says: ==================== lan78xx: Preparations for PHYlink This patch set is part of the preparatory work for migrating the lan78xx USB Ethernet driver to the PHYlink framework. During extensive testing, I observed that resetting the USB adapter can lead to various read/write errors. While the errors themselves are acceptable, they generate excessive log messages, resulting in significant log spam. This set improves error handling to reduce logging noise by addressing errors directly and returning early when necessary. Key highlights of this series include: - Enhanced error handling to reduce log spam while preserving the original error values, avoiding unnecessary overwrites. - Improved error reporting using the `%pe` specifier for better clarity in log messages. - Removal of redundant and problematic PHY fixups for LAN8835 and KSZ9031, with detailed explanations in the respective patches. - Cleanup of code structure, including unified `goto` labels for better readability and maintainability, even in simple editors. ==================== Link: https://patch.msgid.link/20241204084142.1152696-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 48fb3d3c4be602f0977f81d20de7deb0e3807575 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Wed Dec 4 09:41:42 2024 +0100 net: usb: lan78xx: Improve error handling in dataport and multicast writes Update `lan78xx_dataport_write` and `lan78xx_deferred_multicast_write` to: - Handle errors during register read/write operations. - Exit immediately on errors and log them using `%pe` for clarity. - Avoid silent failures by propagating error codes properly. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241204084142.1152696-11-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 67 +++++++++++++++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 22 deletions(-) commit 0da202e6a56f6ec137fde151c1a1a9d39a4135c0 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Wed Dec 4 09:41:41 2024 +0100 net: usb: lan78xx: Add error handling to lan78xx_irq_bus_sync_unlock Update `lan78xx_irq_bus_sync_unlock` to handle errors in register read/write operations. If an error occurs, log it and exit the function appropriately. This ensures proper handling of failures during IRQ synchronization. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241204084142.1152696-10-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 65520a70cb09200d916464ddaa04e996e689c576 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Wed Dec 4 09:41:40 2024 +0100 net: usb: lan78xx: Add error handling to set_rx_max_frame_length and set_mtu Improve error handling in `lan78xx_set_rx_max_frame_length` by: - Checking return values from register read/write operations and propagating errors. - Exiting immediately on failure to ensure proper error reporting. In `lan78xx_change_mtu`, log errors when changing MTU fails, using `%pe` for clear error representation. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241204084142.1152696-9-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 77586156b517c1d38a22c0a8662fe9401ab0f580 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Wed Dec 4 09:41:39 2024 +0100 net: usb: lan78xx: Add error handling to lan78xx_init_ltm Convert `lan78xx_init_ltm` to return error codes and handle errors properly. Previously, errors during the LTM initialization process were not propagated, potentially leading to undetected issues. This patch ensures: - Errors in `lan78xx_read_reg` and `lan78xx_write_reg` are checked and handled. - Errors are logged with detailed messages using `%pe` for clarity. - The function exits immediately on error, returning the error code. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241204084142.1152696-8-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 50 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 11 deletions(-) commit 8b1b2ca83b200fa46fdfb81e80ad5fe34537e6d4 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Wed Dec 4 09:41:38 2024 +0100 net: usb: lan78xx: Improve error handling in EEPROM and OTP operations Refine error handling in EEPROM and OTP read/write functions by: - Return error values immediately upon detection. - Avoid overwriting correct error codes with `-EIO`. - Preserve initial error codes as they were appropriate for specific failures. - Use `-ETIMEDOUT` for timeout conditions instead of `-EIO`. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241204084142.1152696-7-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 240 +++++++++++++++++++++++++++++----------------- 1 file changed, 152 insertions(+), 88 deletions(-) commit 32ee0dc764505278229078e496e7b56a6d65224b Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Wed Dec 4 09:41:37 2024 +0100 net: usb: lan78xx: Fix error handling in MII read/write functions Ensure proper error handling in `lan78xx_mdiobus_read` and `lan78xx_mdiobus_write` by checking return values of register read/write operations and returning errors to the caller. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241204084142.1152696-6-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 9bcdc610cfabe8784f80b8c84f950cc5693f146b Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Wed Dec 4 09:41:36 2024 +0100 net: usb: lan78xx: Improve error reporting with %pe specifier Replace integer error codes with the `%pe` format specifier in register read and write error messages. This change provides human-readable error strings, making logs more informative and debugging easier. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241204084142.1152696-5-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 39aa1d620d10cdd276f4728da50f136dbe939643 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Wed Dec 4 09:41:35 2024 +0100 net: usb: lan78xx: move functions to avoid forward definitions Move following functions to avoid forward declarations in the code: - lan78xx_start_hw() - lan78xx_stop_hw() - lan78xx_flush_fifo() - lan78xx_start_tx_path() - lan78xx_stop_tx_path() - lan78xx_flush_tx_fifo() - lan78xx_start_rx_path() - lan78xx_stop_rx_path() - lan78xx_flush_rx_fifo() These functions will be used in an upcoming PHYlink migration patch. No modifications to the functionality of the code are made. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241204084142.1152696-4-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 300 +++++++++++++++++++++++----------------------- 1 file changed, 150 insertions(+), 150 deletions(-) commit 6782d06a47ad6f8844e71f3912ab60a47f7bc7c3 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Wed Dec 4 09:41:34 2024 +0100 net: usb: lan78xx: Remove KSZ9031 PHY fixup Remove the KSZ9031RNX PHY fixup from the lan78xx driver. The fixup applied specific RGMII pad skew configurations globally, but these settings violate the RGMII specification and cause more harm than benefit. Key issues with the fixup: 1. **Non-Compliant Timing**: The fixup's delay settings fall outside the RGMII specification requirements of 1.5 ns to 2.0 ns: - RX Path: Total delay of **2.16 ns** (PHY internal delay of 1.2 ns + 0.96 ns skew). - TX Path: Total delay of **0.96 ns**, significantly below the RGMII minimum of 1.5 ns. 2. **Redundant or Incorrect Configurations**: - The RGMII skew registers written by the fixup do not meaningfully alter the PHY's default behavior and fail to account for its internal delays. - The TX_DATA pad skew was not configured, relying on power-on defaults that are insufficient for RGMII compliance. 3. **Micrel Driver Support**: By setting `PHY_INTERFACE_MODE_RGMII_ID`, the Micrel driver can calculate and assign appropriate skew values for the KSZ9031 PHY. This ensures better timing configurations without relying on external fixups. 4. **System Interference**: The fixup applied globally, reconfiguring all KSZ9031 PHYs in the system, even those unrelated to the LAN78xx adapter. This could lead to unintended and harmful behavior on unrelated interfaces. While the fixup is removed, a better mechanism is still needed to dynamically determine the optimal combination of PHY and MAC delays to fully meet RGMII requirements without relying on Device Tree or global fixups. This would allow for robust operation across different hardware configurations. The Micrel driver is capable of using the interface mode value to calculate and apply better skew values, providing a configuration much closer to the RGMII specification than the fixup. Removing the fixup ensures better default behavior and prevents harm to other system interfaces. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241204084142.1152696-3-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) commit 7b60c3bf93fa813e6522686025aae31ab54db2d2 Author: Oleksij Rempel <o.rempel@pengutronix.de> Date: Wed Dec 4 09:41:33 2024 +0100 net: usb: lan78xx: Remove LAN8835 PHY fixup Remove the PHY fixup for the LAN8835 PHY in the lan78xx driver due to the following reasons: - There is no publicly available information about the LAN8835 PHY. However, it appears to be the integrated PHY used in the LAN7800 and LAN7850 USB Ethernet controllers. These PHYs use the GMII interface, not RGMII as configured by the fixup. - The correct driver for handling the LAN8835 PHY functionality is the Microchip PHY driver (`drivers/net/phy/microchip.c`), which properly supports these integrated PHYs. - The PHY ID `0x0007C130` is actually used by the LAN8742A PHY, which only supports RMII. This interface is incompatible with the LAN78xx MAC, as the LAN7801 (the only LAN78xx version without an integrated PHY) supports only RGMII. - The mask applied for this fixup is overly broad, inadvertently covering both Microchip LAN88xx PHYs and unrelated SMSC LAN8742A PHYs, leading to potential conflicts with other devices. - Testing has shown that removing this fixup for LAN7800 and LAN7850 does not result in any noticeable difference in functionality, as the Microchip PHY driver (`drivers/net/phy/microchip.c`) handles all necessary configurations for these integrated PHYs. - Registering this fixup globally (not limited to USB devices) risks conflicts by unintentionally modifying other interfaces whenever a LAN7801 adapter is connected to the system. Note that both LAN7800 and LAN7850 USB Ethernet controllers use an integrated PHY with the ID `0x0007C132`. Additionally, the LAN7515, a specialized part for Raspberry Pi, includes an integrated LAN7800 USB Ethernet controller and USB hub in a multifunctional chip design, and it also uses the same PHY ID (`0x0007C132`). Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20241204084142.1152696-2-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/usb/lan78xx.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) commit 7a2716ac9a5b2a2dd0443b101766d3721f094ee1 Merge: 48697bdfb65d f899c594e138 Author: Jakub Kicinski <kuba@kernel.org> Date: Fri Dec 6 17:47:34 2024 -0800 Merge branch 'net-phylib-eee-cleanups' Russell King says: ==================== net: phylib EEE cleanups Clean up phylib's EEE support. Patches previously posted as RFC as part of the phylink EEE series. Patch 1 changes the Marvell driver to use the state we store in struct phy_device, rather than manually calling phydev->eee_cfg.eee_enabled. Patch 2 avoids genphy_c45_ethtool_get_eee() setting ->eee_enabled, as we copy that from phydev->eee_cfg.eee_enabled later, and after patch 3 mo one uses this after calling genphy_c45_ethtool_get_eee(). In fact, the only caller of this function now is phy_ethtool_get_eee(). As all callers to genphy_c45_eee_is_active() now pass NULL as its is_enabled flag, this is no longer useful. Remove the argument in patch 3. Patch 4 updates the phylib documentation to make it absolutely clear that phy_ethtool_get_eee() now fills in all members of struct ethtool_keee, which is why we now have so many buggy network drivers. ==================== Link: https://patch.msgid.link/Z1GDZlFyF2fsFa3S@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit f899c594e138eda72804b16babbdeff92707d7b0 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Thu Dec 5 10:42:15 2024 +0000 net: phy: update phy_ethtool_get_eee() documentation Update the phy_ethtool_get_eee() documentation to make it clear that all members of struct ethtool_keee are written by this function. keee.supported, keee.advertised, keee.lp_advertised and keee.eee_active are all written by genphy_c45_ethtool_get_eee(). keee.tx_lpi_timer, keee.tx_lpi_enabled and keee.eee_enabled are all written by eeecfg_to_eee(). Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/E1tJ9JH-006LIz-SO@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8f1c716090a7ed20fea802b63b37758169d59b81 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Thu Dec 5 10:42:10 2024 +0000 net: phy: remove genphy_c45_eee_is_active()'s is_enabled arg All callers to genphy_c45_eee_is_active() now pass NULL as the is_enabled argument, which means we never use the value computed in this function. Remove the argument and clean up this function. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/E1tJ9JC-006LIt-Ne@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phy-c45.c | 12 ++++-------- drivers/net/phy/phy.c | 5 ++--- include/linux/phy.h | 2 +- 3 files changed, 7 insertions(+), 12 deletions(-) commit 92f7acb825ec272261a2057e0f9e0b1c76198dae Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Thu Dec 5 10:42:05 2024 +0000 net: phy: avoid genphy_c45_ethtool_get_eee() setting eee_enabled genphy_c45_ethtool_get_eee() is only called from phy_ethtool_get_eee(), which then calls eeecfg_to_eee(). eeecfg_to_eee() will overwrite keee.eee_enabled, so there's no point setting keee.eee_enabled in genphy_c45_ethtool_get_eee(). Remove this assignment. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/E1tJ9J7-006LIn-Jr@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phy-c45.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit bac3d0f21c5a42f042ac9b9f6dcbc11544efdefa Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Thu Dec 5 10:42:00 2024 +0000 net: phy: marvell: use phydev->eee_cfg.eee_enabled Rather than calling genphy_c45_ethtool_get_eee() to retrieve whether EEE is enabled, use the value stored in the phy_device eee_cfg structure. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/E1tJ9J2-006LIh-Fl@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/marvell.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 48697bdfb65d21bab8c686830b04bf2e47b96d52 Author: Joe Damato <jdamato@fastly.com> Date: Wed Dec 4 16:32:39 2024 +0000 selftests: net: cleanup busy_poller.c Fix various integer type conversions by using strtoull and a temporary variable which is bounds checked before being casted into the appropriate cfg_* variable for use by the test program. While here: - free the strdup'd cfg string for overall hygenie. - initialize napi_id = 0 in setup_queue to avoid warnings on some compilers. Signed-off-by: Joe Damato <jdamato@fastly.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20241204163239.294123-1-jdamato@fastly.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/selftests/net/busy_poller.c | 88 ++++++++++++++++++------------- 1 file changed, 50 insertions(+), 38 deletions(-) commit 6c36b5c244d6cb22ef8ea2f6b5da46f5171b37a5 Author: Eric Dumazet <edumazet@google.com> Date: Wed Dec 4 21:02:34 2024 +0000 net: tipc: remove one synchronize_net() from tipc_nametbl_stop() tipc_exit_net() is very slow and is abused by syzbot. tipc_nametbl_stop() is called for each netns being dismantled. Calling synchronize_net() right before freeing tn->nametbl is a big hammer. Replace this with kfree_rcu(). Note that RCU is not properly used here, otherwise tn->nametbl should be cleared before the synchronize_net() or kfree_rcu(), or even before the cleanup loop. We might need to fix this at some point. Also note tipc uses other synchronize_rcu() calls, more work is needed to make tipc_exit_net() much faster. List of remaining calls to synchronize_rcu() tipc_detach_loopback() (dev_remove_pack()) tipc_bcast_stop() tipc_sk_rht_destroy() Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20241204210234.319484-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/tipc/name_table.c | 4 ++-- net/tipc/name_table.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit e36d46b9af682bac7c376638cf0fd98d18b98653 Author: Rosen Penev <rosenp@gmail.com> Date: Tue Dec 3 15:13:37 2024 -0800 net: simplify resource acquisition + ioremap get resource + request_mem_region + ioremap can all be done by a single function. Replace them with devm_platform_get_and_ioremap_resource or\ devm_platform_ioremap_resource where res is not used. Signed-off-by: Rosen Penev <rosenp@gmail.com> Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> # sja1000_platform.c Link: https://patch.msgid.link/20241203231337.182391-1-rosenp@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/can/sja1000/sja1000_platform.c | 15 +++---------- drivers/net/ethernet/freescale/fman/fman.c | 35 ++++++------------------------ drivers/net/ethernet/lantiq_etop.c | 25 +++------------------ drivers/net/mdio/mdio-octeon.c | 25 ++++----------------- 4 files changed, 17 insertions(+), 83 deletions(-) commit 6f71ad02aae83f7032255863e374acadaa852bea Author: Konstantin Andreev <andreev@swemel.ru> Date: Fri Sep 13 17:46:59 2024 +0300 smack: deduplicate access to string conversion Signed-off-by: Konstantin Andreev <andreev@swemel.ru> Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> security/smack/smack.h | 1 + security/smack/smack_access.c | 10 ++++++++-- security/smack/smack_lsm.c | 18 +----------------- security/smack/smackfs.c | 26 +++++--------------------- 4 files changed, 15 insertions(+), 40 deletions(-) commit c1472ec1dc4419d0bae663c1a1e6cb98dc7881ad Author: Romain Naour <romain.naour@skf.com> Date: Fri Nov 15 11:25:37 2024 +0100 ARM: dts: dra7: Add bus_dma_limit for l4 cfg bus A bus_dma_limit was added for l3 bus by commit cfb5d65f2595 ("ARM: dts: dra7: Add bus_dma_limit for L3 bus") to fix an issue observed only with SATA on DRA7-EVM with 4GB RAM and CONFIG_ARM_LPAE enabled. Since kernel 5.13, the SATA issue can be reproduced again following the SATA node move from L3 bus to L4_cfg in commit 8af15365a368 ("ARM: dts: Configure interconnect target module for dra7 sata"). Fix it by adding an empty dma-ranges property to l4_cfg and segment@100000 nodes (parent device tree node of SATA controller) to inherit the 2GB dma ranges limit from l3 bus node. Note: A similar fix was applied for PCIe controller by commit 90d4d3f4ea45 ("ARM: dts: dra7: Fix bus_dma_limit for PCIe"). Fixes: 8af15365a368 ("ARM: dts: Configure interconnect target module for dra7 sata"). Link: https://lore.kernel.org/linux-omap/c583e1bb-f56b-4489-8012-ce742e85f233@smile.fr/ Cc: stable@vger.kernel.org # 5.13 Signed-off-by: Romain Naour <romain.naour@skf.com> Link: https://lore.kernel.org/r/20241115102537.1330300-1-romain.naour@smile.fr Signed-off-by: Kevin Hilman <khilman@baylibre.com> arch/arm/boot/dts/ti/omap/dra7-l4.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 19ee9e4cded46927d9cf6eaac3695dab17f86241 Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Sat Nov 2 10:27:51 2024 +0100 ARM: OMAP2+: Fix a typo A 'a' is missing in "powerdomin". Add it. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/ec20fd5c347bf74963532e95282f850d209d84d5.1730539664.git.christophe.jaillet@wanadoo.fr Signed-off-by: Kevin Hilman <khilman@baylibre.com> arch/arm/mach-omap2/powerdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd4059634dab548c904eeae2660ba3c8f7ce843c Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Date: Mon Dec 2 09:31:39 2024 +0200 x86/mtrr: Rename mtrr_overwrite_state() to guest_force_mtrr_state() Rename the helper to better reflect its function. Suggested-by: Dave Hansen <dave.hansen@intel.com> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Dave Hansen <dave.hansen@intel.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Link: https://lore.kernel.org/r/20241202073139.448208-1-kirill.shutemov@linux.intel.com arch/x86/hyperv/ivm.c | 2 +- arch/x86/include/asm/mtrr.h | 10 +++++----- arch/x86/kernel/cpu/mtrr/generic.c | 6 +++--- arch/x86/kernel/cpu/mtrr/mtrr.c | 2 +- arch/x86/kernel/kvm.c | 2 +- arch/x86/xen/enlighten_pv.c | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) commit 9d93db0d1881c9e37e1528cd796e20ff13b7692c Author: Gautam Somani <gautamsomani@gmail.com> Date: Sun Dec 1 03:41:02 2024 +0900 x86/mm/selftests: Fix typo in lam.c Change the spelling from metadate -> metadata Signed-off-by: Gautam Somani <gautamsomani@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20241130184102.2182-1-gautamsomani@gmail.com tools/testing/selftests/x86/lam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6212d82bf26f3cbd30b84df064080dd98051ae9 Author: Toke Høiland-Jørgensen <toke@redhat.com> Date: Wed Dec 4 14:28:26 2024 +0100 selftests/bpf: Consolidate kernel modules into common directory The selftests build four kernel modules which use copy-pasted Makefile targets. This is a bit messy, and doesn't scale so well when we add more modules, so let's consolidate these rules into a single rule generated for each module name, and move the module sources into a single directory. To avoid parallel builds of the different modules stepping on each other's toes during the 'modpost' phase of the Kbuild 'make modules', the module files should really be a grouped target. However, make only added explicit support for grouped targets in version 4.3, which is newer than the minimum version supported by the kernel. However, make implicitly treats pattern matching rules with multiple targets as a grouped target, so we can work around this by turning the rule into a pattern matching target. We do this by replacing '.ko' with '%ko' in the targets with subst(). Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Viktor Malik <vmalik@redhat.com> Link: https://lore.kernel.org/bpf/20241204-bpf-selftests-mod-compile-v5-1-b96231134a49@redhat.com tools/testing/selftests/bpf/Makefile | 64 +++++++--------------- .../selftests/bpf/bpf_test_modorder_x/Makefile | 19 ------- .../selftests/bpf/bpf_test_modorder_y/Makefile | 19 ------- .../testing/selftests/bpf/bpf_test_no_cfi/Makefile | 19 ------- tools/testing/selftests/bpf/bpf_testmod/Makefile | 20 ------- .../testing/selftests/bpf/prog_tests/core_reloc.c | 2 +- tools/testing/selftests/bpf/progs/bad_struct_ops.c | 2 +- tools/testing/selftests/bpf/progs/cb_refs.c | 2 +- tools/testing/selftests/bpf/progs/epilogue_exit.c | 4 +- .../selftests/bpf/progs/epilogue_tailcall.c | 4 +- tools/testing/selftests/bpf/progs/iters_testmod.c | 2 +- tools/testing/selftests/bpf/progs/jit_probe_mem.c | 2 +- .../selftests/bpf/progs/kfunc_call_destructive.c | 2 +- .../testing/selftests/bpf/progs/kfunc_call_fail.c | 2 +- .../testing/selftests/bpf/progs/kfunc_call_race.c | 2 +- .../testing/selftests/bpf/progs/kfunc_call_test.c | 2 +- .../selftests/bpf/progs/kfunc_call_test_subprog.c | 2 +- .../testing/selftests/bpf/progs/local_kptr_stash.c | 2 +- tools/testing/selftests/bpf/progs/map_kptr.c | 2 +- tools/testing/selftests/bpf/progs/map_kptr_fail.c | 2 +- tools/testing/selftests/bpf/progs/missed_kprobe.c | 2 +- .../selftests/bpf/progs/missed_kprobe_recursion.c | 2 +- tools/testing/selftests/bpf/progs/nested_acquire.c | 2 +- tools/testing/selftests/bpf/progs/pro_epilogue.c | 4 +- .../selftests/bpf/progs/pro_epilogue_goto_start.c | 4 +- tools/testing/selftests/bpf/progs/sock_addr_kern.c | 2 +- .../selftests/bpf/progs/struct_ops_detach.c | 2 +- .../selftests/bpf/progs/struct_ops_forgotten_cb.c | 2 +- .../selftests/bpf/progs/struct_ops_maybe_null.c | 2 +- .../bpf/progs/struct_ops_maybe_null_fail.c | 2 +- .../selftests/bpf/progs/struct_ops_module.c | 2 +- .../selftests/bpf/progs/struct_ops_multi_pages.c | 2 +- .../selftests/bpf/progs/struct_ops_nulled_out_cb.c | 2 +- .../selftests/bpf/progs/struct_ops_private_stack.c | 2 +- .../bpf/progs/struct_ops_private_stack_fail.c | 2 +- .../bpf/progs/struct_ops_private_stack_recur.c | 2 +- .../bpf/progs/test_kfunc_param_nullable.c | 2 +- .../selftests/bpf/progs/test_module_attach.c | 2 +- .../selftests/bpf/progs/test_tp_btf_nullable.c | 2 +- .../testing/selftests/bpf/progs/unsupported_ops.c | 2 +- tools/testing/selftests/bpf/progs/wq.c | 2 +- tools/testing/selftests/bpf/progs/wq_failures.c | 2 +- .../bpf/{bpf_testmod => test_kmods}/.gitignore | 0 tools/testing/selftests/bpf/test_kmods/Makefile | 21 +++++++ .../bpf_test_modorder_x.c | 0 .../bpf_test_modorder_y.c | 0 .../bpf_test_no_cfi.c | 0 .../bpf_testmod-events.h | 0 .../bpf/{bpf_testmod => test_kmods}/bpf_testmod.c | 0 .../bpf/{bpf_testmod => test_kmods}/bpf_testmod.h | 0 .../bpf_testmod_kfunc.h | 0 51 files changed, 83 insertions(+), 161 deletions(-) commit 1dc7c8ed7cb378dd3974387692dfa833aee718d4 Author: Robin Murphy <robin.murphy@arm.com> Date: Mon Oct 28 17:58:35 2024 +0000 remoteproc: omap: Handle ARM dma_iommu_mapping It's no longer practical for the OMAP IOMMU driver to trick arm_setup_iommu_dma_ops() into ignoring its presence, so let's use the same tactic as other IOMMU API users on 32-bit ARM and explicitly kick the arch code's dma_iommu_mapping out of the way to avoid problems. Fixes: 4720287c7bf7 ("iommu: Remove struct iommu_ops *iommu from arch_setup_dma_ops()") Signed-off-by: Robin Murphy <robin.murphy@arm.com> Tested-by: Beleswar Padhi <b-padhi@ti.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/6186e311cb6f64a787f87fd41e49a73f409b789c.1730136799.git.robin.murphy@arm.com [Fixed changelog title] Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> drivers/remoteproc/omap_remoteproc.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 93e00ccab5f7da0c479bbdc6fc08c7e42f07eb5e Author: Parth Pancholi <parth.pancholi@toradex.com> Date: Tue Nov 5 11:58:44 2024 +0100 mtd: spi-nor: macronix: remove mx25u25635f from parts list to enable SFDP The Macronix mx25u25635f flash device supports SFDP initialization. This commit removes the specific mx25u25635f entry (NOR ID 0xc22539), along with its size and flags, from the NOR parts list. By removing this entry, both mx25u25635f and mx25u25645g (which share the same NOR ID) will utilize the generic flash driver configuration. This change allows both devices (mx25u25635f and mx25u25645g) to leverage SFDP-defined parameters, enabling dual and quad read operations without the need for manual adjustment of no_sfdp_flags. Link: https://www.macronix.com/Lists/Datasheet/Attachments/8663/MX25U25635F,%201.8V,%20256Mb,%20v1.5.pdf Signed-off-by: Parth Pancholi <parth.pancholi@toradex.com> Reviewed-by: Pratyush Yadav <pratyush@kernel.org> Signed-off-by: Pratyush Yadav <pratyush@kernel.org> Link: https://lore.kernel.org/r/20241105105844.257676-1-parth105105@gmail.com drivers/mtd/spi-nor/macronix.c | 6 ------ 1 file changed, 6 deletions(-) commit d8bde4fd663667822956ad76dc33f0bbfa57bee8 Author: Peng Fan <peng.fan@nxp.com> Date: Mon Nov 11 13:19:46 2024 +0200 mtd: spi-nor: support vcc-supply regulator SPI NOR flashes needs power supply to work properly. The power supply maybe software controllable per board design. So add the support for an vcc-supply regulator. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> [ta: move devm_regulator_get_enable() to spi_nor_probe().] Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> Reviewed-by: Pratyush Yadav <pratyush@kernel.org> Signed-off-by: Pratyush Yadav <pratyush@kernel.org> Link: https://lore.kernel.org/r/20241111111946.9048-3-tudor.ambarus@linaro.org drivers/mtd/spi-nor/core.c | 5 +++++ 1 file changed, 5 insertions(+) commit 07c888838ea34662b9fd4a2698ef24ff59f0a630 Author: Tudor Ambarus <tudor.ambarus@linaro.org> Date: Mon Nov 11 13:19:45 2024 +0200 mtd: spi-nor: use local variable for struct device Use a local variable for the struct device pointers to avoid dereferencing. Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> Reviewed-by: Pratyush Yadav <pratyush@kernel.org> Signed-off-by: Pratyush Yadav <pratyush@kernel.org> Link: https://lore.kernel.org/r/20241111111946.9048-2-tudor.ambarus@linaro.org drivers/mtd/spi-nor/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e7f4e924f46d41952271b3f97e51596a54e48775 Author: Peng Fan <peng.fan@nxp.com> Date: Mon Nov 11 13:19:44 2024 +0200 dt-bindings: mtd: jedec,spi-nor: add optional vcc-supply Introduce optional vcc-supply property, SPI NOR flashes needs power supply to work properly. The power supply maybe software controlable per board design. Acked-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> Reviewed-by: Pratyush Yadav <pratyush@kernel.org> Signed-off-by: Pratyush Yadav <pratyush@kernel.org> Link: https://lore.kernel.org/r/20241111111946.9048-1-tudor.ambarus@linaro.org Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 774b5fa509a97017715801739111a42fdc23d590 Author: Oak Zeng <oak.zeng@intel.com> Date: Mon Dec 2 21:19:29 2024 -0500 drm/xe: Avoid evicting object of the same vm in none fault mode BO validation during vm_bind could trigger memory eviction when system runs under memory pressure. Right now we blindly evict BOs of all VMs. This scheme has a problem when system runs in none recoverable page fault mode: even though the vm_bind could be successful by evicting BOs, the later the rebinding of the evicted BOs would fail. So it is better to report an out-of- memory failure at vm_bind time than at time of rebinding where xekmd currently doesn't have a good mechanism to report error to user space. This patch implemented a scheme to only evict objects of other VMs during vm_bind time. Object of the same VM will skip eviction. If we failed to find enough memory for vm_bind, we report error to user space at vm_bind time. This scheme is not needed for recoverable page fault mode under what we can dynamically fault-in pages on demand. v1: Use xe_vm_in_preempt_fence_mode instead of stack variable (Thomas) Signed-off-by: Oak Zeng <oak.zeng@intel.com> Suggested-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241203021929.1919730-1-oak.zeng@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/xe_vm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5be9a36c44cd7e6990631957df523a5059b26bcd Author: Tudor Ambarus <tudor.ambarus@linaro.org> Date: Mon Nov 11 13:36:09 2024 +0200 mtd: spi-nor: macronix: use nor->addr_nbytes Use the nor->addr_nbytes set by the core, we shouldn't use magic numbers or states that are not tracked by the core. Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> Acked-by: Pratyush Yadav <pratyush@kernel.org> Signed-off-by: Pratyush Yadav <pratyush@kernel.org> Link: https://lore.kernel.org/r/20241111113609.12093-1-tudor.ambarus@linaro.org drivers/mtd/spi-nor/macronix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 792caa4a4baaa9bc3fb59052b30cee08e8bc801d Author: Marcus Folkesson <marcus.folkesson@gmail.com> Date: Sat Nov 16 11:55:55 2024 +0100 mtd: spi-nor: atmel: add at25sf321 entry Add entry for the at25sf321 32Mbit SPI flash. This flash is populated on a custom board and was tested at 10MHz frequency using the "ti,da830-spi" SPI controller. Link: https://www.renesas.com/en/document/dst/at25sf321-datasheet?r=1608801 Reviewed-by: Michael Walle <mwalle@kernel.org> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Pratyush Yadav <pratyush@kernel.org> Signed-off-by: Pratyush Yadav <pratyush@kernel.org> Link: https://lore.kernel.org/r/20241116-spi-nor-v4-1-3de8ac6fd0be@gmail.com drivers/mtd/spi-nor/atmel.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6c10d1adae82e1c8da16e7ebd2320e69f20b9d6f Author: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Date: Mon Oct 7 14:42:24 2024 +0200 media: rkisp1: Reduce min_queued_buffers to 1 There apparently is no reason to require 3 queued buffers to call streamon() for the RkISP1 as the driver operates with a scratch buffer where frames can be directed to if there's no available buffer provided by userspace. Reduce the number of required buffers to 1 to allow applications to operate with a single queued buffer. Tested with libcamera, by operating with a single capture request. The same request (and associated capture buffer) gets recycled once completed. This of course causes a frame rate drop but doesn't hinder operations. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20241007124225.63463-1-jacopo.mondi@ideasonboard.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 86e5e8efb82cbee416e726e141decdc9e1a2d5f3 Author: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com> Date: Tue Nov 19 12:56:53 2024 +0530 media: rkisp1: Fix unused value issue This commit fixes an unused value issue detected by Coverity (CID 1519008). The error condition for the invalid MIPI CSI-2 is not properly handled as the break statement would only exit the switch block and not the entire loop. Fix this by breaking from the look immediately after the switch block when an error occurs. Signed-off-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com> Fixes: 7d4f126fde89 ("media: rkisp1: Make the internal CSI-2 receiver optional") Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Link: https://lore.kernel.org/r/20241119072653.72260-1-dheeraj.linuxdev@gmail.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 3 +++ 1 file changed, 3 insertions(+) commit 630e03808a71c06407f5720b494fd76f5665ffc2 Author: Sk Anirban <sk.anirban@intel.com> Date: Tue Dec 3 11:41:14 2024 +0530 drm/i915/selftests: Add delay to stabilize frequency in live_rps_power Add delays to allow frequency stabilization before power measurement to fix sporadic power conservation issues in live_rps_power test. v2: - Move delay to respective function (Badal) Signed-off-by: Sk Anirban <sk.anirban@intel.com> Reviewed-by: Badal Nilawar <badal.nilawar@intel.com> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241203061114.2790448-1-sk.anirban@intel.com drivers/gpu/drm/i915/gt/selftest_rps.c | 1 + 1 file changed, 1 insertion(+) commit a16e1551dc57d0192668c9ded42d8274c6e66b0a Author: Oak Zeng <oak.zeng@intel.com> Date: Mon Dec 2 21:21:40 2024 -0500 drm/xe: Trace xe_bo_validate Add a tracepoint for xe_bo_validate function. I found this is useful during debug issues. Signed-off-by: Oak Zeng <oak.zeng@intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241203022140.1919922-1-oak.zeng@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/xe_bo.c | 1 + drivers/gpu/drm/xe/xe_trace_bo.h | 5 +++++ 2 files changed, 6 insertions(+) commit 51db5c8943001186be0b5b02456e7d03b3be1f12 Merge: 9d1a8c6f9879 53036aa8d031 Author: David S. Miller <davem@davemloft.net> Date: Fri Dec 6 13:41:53 2024 +0000 Merge branch 'ucc_geth-phylink-conversion' Maxime Chevallier says: ==================== net: freescale: ucc_geth: Phylink conversion This is V3 of the phylink conversion for ucc_geth. The main changes in this V3 are related to error handling in the patches 1 and 10 to report an error when the deprecated "interface" property is found in DT. Doing so, I found and addressed some issues with the jump labels in the error paths, impacting patches 1 and 10. The rest of the changes are just a rebase on net-next. Some of the V2 changes haven't been reviewed, so I stress out that I'm still uncertain about the way WoL is handled is patches 4 and 10. Thanks, Maxime Link to V1: https://lore.kernel.org/netdev/20241107170255.1058124-1-maxime.chevallier@bootlin.com/ Link to V2: https://lore.kernel.org/netdev/20241114153603.307872-1-maxime.chevallier@bootlin.com/ ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 53036aa8d03178a8d056a24a52a301ad290877d4 Author: Maxime Chevallier <maxime.chevallier@bootlin.com> Date: Tue Dec 3 13:43:21 2024 +0100 net: freescale: ucc_geth: phylink conversion ucc_geth is quite capable in terms of supported interfaces, and even includes an externally controlled PCS (well, TBI). Port that driver to phylink. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/Kconfig | 3 +- drivers/net/ethernet/freescale/ucc_geth.c | 445 +++++++++------------- drivers/net/ethernet/freescale/ucc_geth.h | 13 +- drivers/net/ethernet/freescale/ucc_geth_ethtool.c | 73 +--- 4 files changed, 209 insertions(+), 325 deletions(-) commit 02d4a6498b3028f64f93ac61c0ff346e8ab661e0 Author: Maxime Chevallier <maxime.chevallier@bootlin.com> Date: Tue Dec 3 13:43:20 2024 +0100 net: freescale: ucc_geth: Introduce a helper to check Reduced modes A number of parallel MII interfaces also exist in a "Reduced" mode, usually with higher clock rates and fewer data lines, to ease the hardware design. This is what the 'R' stands for in RGMII, RMII, RTBI, RXAUI, etc. The UCC Geth controller has a special configuration bit that needs to be set when the MII mode is one of the supported reduced modes. Add a local helper for that. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/ucc_geth.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit efc52055b756a231b2c4c6fdec4369c8903afa1e Author: Maxime Chevallier <maxime.chevallier@bootlin.com> Date: Tue Dec 3 13:43:19 2024 +0100 net: freescale: ucc_geth: Move the serdes configuration around The uec_configure_serdes() function deals with serialized linkmodes settings. It's used during the link bringup sequence. It is planned to be used during the phylink conversion for mac configuration, but it needs to me moved around in the process. To make the phylink port clearer, this commit moves the function without any feature change. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/ucc_geth.c | 93 +++++++++++++++---------------- 1 file changed, 46 insertions(+), 47 deletions(-) commit dba25f75383fd8c2fe6f0390aa7f7a3b0dd72a63 Author: Maxime Chevallier <maxime.chevallier@bootlin.com> Date: Tue Dec 3 13:43:18 2024 +0100 net: freescale: ucc_geth: Hardcode the preamble length to 7 bytes The preamble length can be configured in ucc_geth, however it just ends-up always being configured to 7 bytes, as nothing ever changes the default value of 7. Make that value the default value when the MACCFG2 register gets initialized, and remove the code to configure that value altogether. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/ucc_geth.c | 21 --------------------- drivers/net/ethernet/freescale/ucc_geth.h | 4 ++-- 2 files changed, 2 insertions(+), 23 deletions(-) commit 270ec339126a09564fab67209da8330a20fe446f Author: Maxime Chevallier <maxime.chevallier@bootlin.com> Date: Tue Dec 3 13:43:17 2024 +0100 net: freescale: ucc_geth: Simplify frame length check The frame length check is configured when the phy interface is setup. However, it's configured according to an internal flag that is always false. So, just make so that we disable the relevant bit in the MACCFG2 register upon accessing it for other MAC configuration operations. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/ucc_geth.c | 21 +++------------------ drivers/net/ethernet/freescale/ucc_geth.h | 1 - 2 files changed, 3 insertions(+), 19 deletions(-) commit 420d56e4de5247b78fa1e1d5084f246e547e95a9 Author: Maxime Chevallier <maxime.chevallier@bootlin.com> Date: Tue Dec 3 13:43:16 2024 +0100 net: freescale: ucc_geth: Use the correct type to store WoL opts The WoL opts are represented through a bitmask stored in a u32. As this mask is copied as-is in the driver, make sure we use the exact same type to store them internally. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/ucc_geth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2adc441a19a592ce104e2b257ad9d002eaec53f Author: Maxime Chevallier <maxime.chevallier@bootlin.com> Date: Tue Dec 3 13:43:15 2024 +0100 net: freescale: ucc_geth: Fix WOL configuration The get/set_wol ethtool ops rely on querying the PHY for its WoL capabilities, checking for the presence of a PHY and a PHY interrupts isn't enough. Address that by cleaning up the WoL configuration sequence. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/ucc_geth.c | 4 +-- drivers/net/ethernet/freescale/ucc_geth.h | 1 + drivers/net/ethernet/freescale/ucc_geth_ethtool.c | 36 ++++++++++++++++++----- 3 files changed, 32 insertions(+), 9 deletions(-) commit 43068024cc2a2abdf39c73d3c1ed63a77207ae31 Author: Maxime Chevallier <maxime.chevallier@bootlin.com> Date: Tue Dec 3 13:43:14 2024 +0100 net: freescale: ucc_geth: Use netdev->phydev to access the PHY As this driver pre-dates phylib, it uses a private pointer to get a reference to the attached phy_device. Drop that pointer and use the netdev's pointer instead. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/ucc_geth.c | 27 +++++++++-------------- drivers/net/ethernet/freescale/ucc_geth.h | 1 - drivers/net/ethernet/freescale/ucc_geth_ethtool.c | 17 +++++++------- 3 files changed, 20 insertions(+), 25 deletions(-) commit 1e59fd163100c2e21a65004c96f81b458e86b457 Author: Maxime Chevallier <maxime.chevallier@bootlin.com> Date: Tue Dec 3 13:43:13 2024 +0100 net: freescale: ucc_geth: split adjust_link for phylink conversion Preparing the phylink conversion, split the adjust_link callbaclk, by clearly separating the mac configuration, link_up and link_down phases. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/ucc_geth.c | 180 +++++++++++++++--------------- 1 file changed, 93 insertions(+), 87 deletions(-) commit 3e42bb998c6d574cbd683bd2d4ba1a2abf5aa044 Author: Maxime Chevallier <maxime.chevallier@bootlin.com> Date: Tue Dec 3 13:43:12 2024 +0100 net: freescale: ucc_geth: Drop support for the "interface" DT property In april 2007, ucc_geth was converted to phylib with : commit 728de4c927a3 ("ucc_geth: migrate ucc_geth to phylib"). In that commit, the device-tree property "interface", that could be used to retrieve the PHY interface mode was deprecated. DTS files that still used that property were converted along the way, in the following commit, also dating from april 2007 : commit 0fd8c47cccb1 ("[POWERPC] Replace undocumented interface properties in dts files") 17 years later, there's no users of that property left and I hope it's safe to say we can remove support from that in the ucc_geth driver, making the probe() function a bit simpler. Should there be any users that have a DT that was generated when 2.6.21 was cutting-edge, print an error message with hints on how to convert the devicetree if the 'interface' property is found. With that property gone, we can greatly simplify the parsing of the phy-interface-mode from the devicetree by using of_get_phy_mode(), allowing the removal of the open-coded parsing in the driver. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/ucc_geth.c | 63 ++++++------------------------- 1 file changed, 12 insertions(+), 51 deletions(-) commit acf5a2f08f852d412e645256c19a39d3d6af7cd2 Author: Zhu Jun <zhujun2@cmss.chinamobile.com> Date: Thu Dec 5 19:17:27 2024 -0800 ALSA: seq: oss: fix typo in seq_oss_init.c The word 'annoucement' is wrong, so fix it. Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Link: https://patch.msgid.link/20241206031727.20500-1-zhujun2@cmss.chinamobile.com Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/core/seq/oss/seq_oss_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ad947884c6e02a9353cb475d51796c7e039d121 Author: liujing <liujing@cmss.chinamobile.com> Date: Fri Dec 6 10:16:47 2024 +0800 ALSA: cmipci: Modify the incorrect format specifier Replace %d with %u in snprintf() because it is "unsigned int". Signed-off-by: liujing <liujing@cmss.chinamobile.com> Link: https://patch.msgid.link/20241206021647.2343-1-liujing@cmss.chinamobile.com Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/cmipci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3eaa2be7004ed7ce5cf8939c660e44a15fc3665 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:43:24 2024 +0100 x86/sysfs: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-x86-v1-1-b767d5f0ac5c@weissschuh.net arch/x86/kernel/ksysfs.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 29188c16006176caee6cb6729103be51a29c1a93 Author: Juergen Gross <jgross@suse.com> Date: Tue Dec 3 08:15:50 2024 +0100 x86/paravirt: Remove the WBINVD callback The pv_ops::cpu.wbinvd paravirt callback is a leftover of lguest times. Today it is no longer needed, as all users use the native WBINVD implementation. Remove the callback and rename native_wbinvd() to wbinvd(). Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20241203071550.26487-1-jgross@suse.com arch/x86/include/asm/paravirt.h | 7 ------- arch/x86/include/asm/paravirt_types.h | 2 -- arch/x86/include/asm/special_insns.h | 8 +------- arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 2 +- arch/x86/kernel/paravirt.c | 6 ------ arch/x86/kernel/process.c | 4 ++-- arch/x86/xen/enlighten_pv.c | 2 -- 7 files changed, 4 insertions(+), 27 deletions(-) commit 7a470e826d7521bec6af789deab31cfa4fd05af3 Author: Sohil Mehta <sohil.mehta@intel.com> Date: Thu Nov 7 23:30:00 2024 +0000 x86/cpufeatures: Free up unused feature bits Linux defined feature bits X86_FEATURE_P3 and X86_FEATURE_P4 are not used anywhere. Commit f31d731e4467 ("x86: use X86_FEATURE_NOPL in alternatives") got rid of the last usage in 2008. Remove the related mappings and code. Just like all X86_FEATURE bits, the raw bit numbers can be exposed to userspace via MODULE_DEVICE_TABLE(). There is a very small theoretical chance of userspace getting confused if these bits got reassigned and changed logical meaning. But these bits were never used for a device table, so it's highly unlikely this will ever happen in practice. [ dhansen: clarify userspace visibility of these bits ] Signed-off-by: Sohil Mehta <sohil.mehta@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/all/20241107233000.2742619-1-sohil.mehta%40intel.com arch/x86/include/asm/cpufeatures.h | 4 ++-- arch/x86/kernel/cpu/intel.c | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) commit 5a82223e0743fb36bcb99657772513739d1a9936 Author: David Woodhouse <dwmw@amazon.co.uk> Date: Thu Dec 5 15:05:19 2024 +0000 x86/kexec: Mark relocate_kernel page as ROX instead of RWX All writes to the page now happen before it gets marked as executable (or after it's already switched to the identmap page tables where it's OK to be RWX). Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20241205153343.3275139-14-dwmw2@infradead.org arch/x86/kernel/machine_kexec_64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 93e489ad7a4694bb2fe8110f5012f85bd3eee65a Author: David Woodhouse <dwmw@amazon.co.uk> Date: Thu Dec 5 15:05:18 2024 +0000 x86/kexec: Clean up register usage in relocate_kernel() The memory encryption flag is passed in %r8 because that's where the calling convention puts it. Instead of moving it to %r12 and then using %r8 for other things, just leave it in %r8 and use other registers instead. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205153343.3275139-13-dwmw2@infradead.org arch/x86/kernel/relocate_kernel_64.S | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit b7155dfd4999211247cce40be2665c71235ab094 Author: David Woodhouse <dwmw@amazon.co.uk> Date: Thu Dec 5 15:05:17 2024 +0000 x86/kexec: Eliminate writes through kernel mapping of relocate_kernel page All writes to the relocate_kernel control page are now done *after* the %cr3 switch via simple %rip-relative addressing, which means the DATA() macro with its pointer arithmetic can also now be removed. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205153343.3275139-12-dwmw2@infradead.org arch/x86/kernel/relocate_kernel_64.S | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit b3adabae8a96fee62184f4236bf60313b35244e9 Author: David Woodhouse <dwmw@amazon.co.uk> Date: Thu Dec 5 15:05:16 2024 +0000 x86/kexec: Drop page_list argument from relocate_kernel() The kernel's virtual mapping of the relocate_kernel page currently needs to be RWX because it is written to before the %cr3 switch. Now that the relocate_kernel page has its own .data section and local variables, it can also have *global* variables. So eliminate the separate page_list argument, and write the same information directly to variables in the relocate_kernel page instead. This way, the relocate_kernel code itself doesn't need to copy it. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205153343.3275139-11-dwmw2@infradead.org arch/x86/include/asm/kexec.h | 12 +++++------- arch/x86/kernel/machine_kexec_64.c | 18 +++++++----------- arch/x86/kernel/relocate_kernel_64.S | 36 ++++++++++++------------------------ 3 files changed, 24 insertions(+), 42 deletions(-) commit 8dbec5c77bc32f04583d3973c8178a74e72fdf18 Author: David Woodhouse <dwmw@amazon.co.uk> Date: Thu Dec 5 15:05:15 2024 +0000 x86/kexec: Add data section to relocate_kernel Now that the relocate_kernel page is handled sanely by a linker script we can have actual data, and just use %rip-relative addressing to access it. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205153343.3275139-10-dwmw2@infradead.org arch/x86/kernel/machine_kexec_64.c | 8 ++++- arch/x86/kernel/relocate_kernel_64.S | 62 +++++++++++++++++------------------- arch/x86/kernel/vmlinux.lds.S | 1 + 3 files changed, 38 insertions(+), 33 deletions(-) commit cb33ff9e063c1230d557d97ff6e87d097821d517 Author: David Woodhouse <dwmw@amazon.co.uk> Date: Thu Dec 5 15:05:14 2024 +0000 x86/kexec: Move relocate_kernel to kernel .data section Now that the copy is executed instead of the original, the relocate_kernel page can live in the kernel's .text section. This will allow subsequent commits to actually add real data to it and clean up the code somewhat as well as making the control page ROX. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205153343.3275139-9-dwmw2@infradead.org arch/x86/include/asm/sections.h | 1 + arch/x86/kernel/callthunks.c | 6 ++++++ arch/x86/kernel/machine_kexec_64.c | 4 +++- arch/x86/kernel/relocate_kernel_64.S | 7 +------ arch/x86/kernel/vmlinux.lds.S | 15 ++++++++++++++- 5 files changed, 25 insertions(+), 8 deletions(-) commit eeebbde57113730db7b3ec7380ada61a0193d27c Author: David Woodhouse <dwmw@amazon.co.uk> Date: Thu Dec 5 15:05:13 2024 +0000 x86/kexec: Invoke copy of relocate_kernel() instead of the original This currently calls set_memory_x() from machine_kexec_prepare() just like the 32-bit version does. That's actually a bit earlier than I'd like, as it leaves the page RWX all the time the image is even *loaded*. Subsequent commits will eliminate all the writes to the page between the point it's marked executable in machine_kexec_prepare() the time that relocate_kernel() is running and has switched to the identmap %cr3, so that it can be ROX. But that can't happen until it's moved to the .data section of the kernel, and *that* can't happen until we start executing the copy instead of executing it in place in the kernel .text. So break the circular dependency in those commits by letting it be RWX for now. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205153343.3275139-8-dwmw2@infradead.org arch/x86/kernel/machine_kexec_64.c | 30 ++++++++++++++++++++++++------ arch/x86/kernel/relocate_kernel_64.S | 5 ++++- 2 files changed, 28 insertions(+), 7 deletions(-) commit 6a750b4c009936f352aaac0366f5f10fcf51e81b Author: David Woodhouse <dwmw@amazon.co.uk> Date: Thu Dec 5 15:05:12 2024 +0000 x86/kexec: Copy control page into place in machine_kexec_prepare() There's no need for this to wait until the actual machine_kexec() invocation; future changes will need to make the control page read-only and executable, so all writes should be completed before machine_kexec_prepare() returns. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205153343.3275139-7-dwmw2@infradead.org arch/x86/kernel/machine_kexec_64.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 4b5bc2ec9a239bce261ffeafdd63571134102323 Author: David Woodhouse <dwmw@amazon.co.uk> Date: Thu Dec 5 15:05:11 2024 +0000 x86/kexec: Allocate PGD for x86_64 transition page tables separately Now that the following fix: d0ceea662d45 ("x86/mm: Add _PAGE_NOPTISHADOW bit to avoid updating userspace page tables") stops kernel_ident_mapping_init() from scribbling over the end of a 4KiB PGD by assuming the following 4KiB will be a userspace PGD, there's no good reason for the kexec PGD to be part of a single 8KiB allocation with the control_code_page. ( It's not clear that that was the reason for x86_64 kexec doing it that way in the first place either; there were no comments to that effect and it seems to have been the case even before PTI came along. It looks like it was just a happy accident which prevented memory corruption on kexec. ) Either way, it definitely isn't needed now. Just allocate the PGD separately on x86_64, like i386 already does. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205153343.3275139-6-dwmw2@infradead.org arch/x86/include/asm/kexec.h | 18 +++++++++++---- arch/x86/kernel/machine_kexec_64.c | 45 ++++++++++++++++++++------------------ 2 files changed, 38 insertions(+), 25 deletions(-) commit 9e5683e2d0b5584c51993908c5d0afa78e613492 Author: David Woodhouse <dwmw@amazon.co.uk> Date: Thu Dec 5 15:05:10 2024 +0000 x86/kexec: Only swap pages for ::preserve_context mode There's no need to swap pages (which involves three memcopies for each page) in the plain kexec case. Just do a single copy from source to destination page. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205153343.3275139-5-dwmw2@infradead.org arch/x86/kernel/relocate_kernel_64.S | 4 ++++ 1 file changed, 4 insertions(+) commit 46d4e205e22c89841552b05663d34e57e9a66611 Author: David Woodhouse <dwmw@amazon.co.uk> Date: Thu Dec 5 15:05:09 2024 +0000 x86/kexec: Use named labels in swap_pages in relocate_kernel_64.S Make the code a little more readable. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Kai Huang <kai.huang@intel.com> Cc: Baoquan He <bhe@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205153343.3275139-4-dwmw2@infradead.org arch/x86/kernel/relocate_kernel_64.S | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 207bdf7f72ae8b1764de294ae59bdf5b015082bd Author: David Woodhouse <dwmw@amazon.co.uk> Date: Thu Dec 5 15:05:08 2024 +0000 x86/kexec: Clean up and document register use in relocate_kernel_64.S Add more comments explaining what each register contains, and save the preserve_context flag to a non-clobbered register sooner, to keep things simpler. No change in behavior intended. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Kai Huang <kai.huang@intel.com> Cc: Baoquan He <bhe@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205153343.3275139-3-dwmw2@infradead.org arch/x86/kernel/relocate_kernel_64.S | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit fe8ec69baa9dbaf37cae4f3458d2d5e09bf6d87e Merge: faf0ed487415 07fa619f2a40 Author: Ingo Molnar <mingo@kernel.org> Date: Fri Dec 6 10:36:14 2024 +0100 Merge branch 'x86/urgent' into x86/boot, to pick up dependent fixes Signed-off-by: Ingo Molnar <mingo@kernel.org> commit 6db2526c1d694c91c6e05e2f186c085e9460f202 Author: Rik van Riel <riel@fb.com> Date: Wed Dec 4 21:03:16 2024 -0500 x86/mm/tlb: Only trim the mm_cpumask once a second Setting and clearing CPU bits in the mm_cpumask is only ever done by the CPU itself, from the context switch code or the TLB flush code. Synchronization is handled by switch_mm_irqs_off() blocking interrupts. Sending TLB flush IPIs to CPUs that are in the mm_cpumask, but no longer running the program causes a regression in the will-it-scale tlbflush2 test. This test is contrived, but a large regression here might cause a small regression in some real world workload. Instead of always sending IPIs to CPUs that are in the mm_cpumask, but no longer running the program, send these IPIs only once a second. The rest of the time we can skip over CPUs where the loaded_mm is different from the target mm. Reported-by: kernel test roboto <oliver.sang@intel.com> Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20241204210316.612ee573@fangorn Closes: https://lore.kernel.org/oe-lkp/202411282207.6bd28eae-lkp@intel.com/ arch/x86/include/asm/mmu.h | 2 ++ arch/x86/include/asm/mmu_context.h | 1 + arch/x86/include/asm/tlbflush.h | 1 + arch/x86/mm/tlb.c | 35 ++++++++++++++++++++++++++++++++--- 4 files changed, 36 insertions(+), 3 deletions(-) commit 953753db887f9d70f70f61d6ecbe5cf209107672 Author: Rik van Riel <riel@surriel.com> Date: Thu Dec 5 10:46:30 2024 -0500 x86/mm/tlb: Also remove local CPU from mm_cpumask if stale The code in flush_tlb_func() that removes a remote CPU from the cpumask if it is no longer running the target mm is also needed on the originating CPU of a TLB flush, now that CPUs are no longer cleared from the mm_cpumask at context switch time. Flushing the TLB when we are not running the target mm is harmless, because the CPU's tlb_gen only gets updated to match the mm_tlb_gen, but it does hit this warning: WARN_ON_ONCE(local_tlb_gen > mm_tlb_gen); [ 210.343902][ T4668] WARNING: CPU: 38 PID: 4668 at arch/x86/mm/tlb.c:815 flush_tlb_func (arch/x86/mm/tlb.c:815) Removing both local and remote CPUs from the mm_cpumask when doing a flush for a not currently loaded mm avoids that warning. Reported-by: kernel test robot <oliver.sang@intel.com> Tested-by: kernel test robot <oliver.sang@intel.com> Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20241205104630.755706ca@fangorn Closes: https://lore.kernel.org/oe-lkp/202412051551.690e9656-lkp@intel.com arch/x86/mm/tlb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e1daed030b56049caa2d8cc040c824990374d941 Author: Stanislav Jakubek <stano.jakubek@gmail.com> Date: Fri Dec 6 09:28:30 2024 +0100 arm64: dts: sprd: Fix battery-detect-gpios property According to DT bindings, the property is called 'battery-detect-gpios', not 'bat-detect-gpio'. Update the property as such. Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com> Link: https://lore.kernel.org/r/Z1K1rnndKGIFdgfj@standask-GA-A55M-S2HP Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/sprd/sc2731.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76ba5467ecfd17f63da954c946ec98aa3cbde2d3 Author: Chen-Yu Tsai <wenst@chromium.org> Date: Wed Dec 4 17:39:41 2024 +0800 drm/panel: visionox-rm69299: Remove redundant assignments of panel fields drm_panel_init() was made to initialize the fields in |struct drm_panel|. There is no need to separately initialize them again. Drop the separate assignments that are redundant. Also fix up any uses of `ctx->panel.dev` to use `dev` directly. Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241204093942.1374693-1-wenst@chromium.org Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> drivers/gpu/drm/panel/panel-visionox-rm69299.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 9d1a8c6f987974febb6fcd88a324e5b18cc29922 Merge: 1daa6591ab7d 024bfd2e9d80 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 5 18:41:13 2024 -0800 Merge branch 'xdp-a-fistful-of-generic-changes-pt-i' Alexander Lobakin says: ==================== xdp: a fistful of generic changes pt. I XDP for idpf is currently 6 chapters: * convert Rx to libeth; * convert Tx and stats to libeth; * generic XDP and XSk code changes (you are here); * generic XDP and XSk code additions; * actual XDP for idpf via new libeth_xdp; * XSk for idpf (via ^). Part III does the following: * improve &xdp_buff_xsk cacheline placement; * does some cleanups with marking read-only bpf_prog and xdp_buff arguments const for some generic functions; * allows attaching already registered XDP memory model to RxQ info; * makes system percpu page_pools valid XDP memory models; * starts using netmems in the XDP core code (1 function); * allows mixing pages from several page_pools within one XDP frame; * optimizes &xdp_frame layout and removes no-more-used field. Bullets 4-6 are the most important ones. All of them are prereqs to libeth_xdp. ==================== Link: https://patch.msgid.link/20241203173733.3181246-1-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 024bfd2e9d80d7131f1178eb2235030b96f7ef0e Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Tue Dec 3 18:37:31 2024 +0100 page_pool: make page_pool_put_page_bulk() handle array of netmems Currently, page_pool_put_page_bulk() indeed takes an array of pointers to the data, not pages, despite the name. As one side effect, when you're freeing frags from &skb_shared_info, xdp_return_frame_bulk() converts page pointers to virtual addresses and then page_pool_put_page_bulk() converts them back. Moreover, data pointers assume every frag is placed in the host memory, making this function non-universal. Make page_pool_put_page_bulk() handle array of netmems. Pass frag netmems directly and use virt_to_netmem() when freeing xdpf->data, so that the PP core will then get the compound netmem and take care of the rest. Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://patch.msgid.link/20241203173733.3181246-9-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/page_pool/types.h | 8 ++++---- include/net/xdp.h | 2 +- net/core/page_pool.c | 30 +++++++++++++++--------------- net/core/xdp.c | 6 +++--- 4 files changed, 23 insertions(+), 23 deletions(-) commit 9bd9f72a74344b54cfb6fcabf1173e6c6e5c6952 Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Tue Dec 3 18:37:30 2024 +0100 netmem: add a couple of page helper wrappers Add the following netmem counterparts: * virt_to_netmem() -- simple page_to_netmem(virt_to_page()) wrapper; * netmem_is_pfmemalloc() -- page_is_pfmemalloc() for page-backed netmems, false otherwise; and the following "unsafe" versions: * __netmem_to_page() * __netmem_get_pp() * __netmem_address() They do the same as their non-underscored buddies, but assume the netmem is always page-backed. When working with header &page_pools, you don't need to check whether netmem belongs to the host memory and you can never get NULL instead of &page. Checks for the LSB, clearing the LSB, branches take cycles and increase object code size, sometimes significantly. When you're sure your PP is always host, you can avoid this by using the underscored counterparts. Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://patch.msgid.link/20241203173733.3181246-8-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/netmem.h | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 2 deletions(-) commit e77d9aee951341119be16a991fcfc76d1154d22a Author: Toke Høiland-Jørgensen <toke@redhat.com> Date: Tue Dec 3 18:37:29 2024 +0100 xdp: register system page pool as an XDP memory model To make the system page pool usable as a source for allocating XDP frames, we need to register it with xdp_reg_mem_model(), so that page return works correctly. This is done in preparation for using the system page_pool to convert XDP_PASS XSk frames to skbs; for the same reason, make the per-cpu variable non-static so we can access it from other source files as well (but w/o exporting). Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/20241203173733.3181246-7-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/linux/netdevice.h | 1 + net/core/dev.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 9e25dd9d65d27aa94220831fe6453d935988801c Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Tue Dec 3 18:37:28 2024 +0100 xsk: allow attaching XSk pool via xdp_rxq_info_reg_mem_model() When you register an XSk pool as XDP Rxq info memory model, you then need to manually attach it after the registration. Let the user combine both actions into one by just passing a pointer to the pool directly to xdp_rxq_info_reg_mem_model(), which will take care of calling xsk_pool_set_rxq_info(). This looks similar to how a &page_pool gets registered and reduce repeating driver code. Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/20241203173733.3181246-6-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/core/xdp.c | 3 +++ 1 file changed, 3 insertions(+) commit f65966fe0178c06065d354c22fb456fc4370b527 Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Tue Dec 3 18:37:27 2024 +0100 xdp: allow attaching already registered memory model to xdp_rxq_info One may need to register memory model separately from xdp_rxq_info. One simple example may be XDP test run code, but in general, it might be useful when memory model registering is managed by one layer and then XDP RxQ info by a different one. Allow such scenarios by adding a simple helper which "attaches" already registered memory model to the desired xdp_rxq_info. As this is mostly needed for Page Pool, add a special function to do that for a &page_pool pointer. Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/20241203173733.3181246-5-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/xdp.h | 32 +++++++++++++++++++++++++++++++ net/core/xdp.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) commit dcf3827cde8621d2317a7f98e069adbdc2112982 Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Tue Dec 3 18:37:26 2024 +0100 xdp, xsk: constify read-only arguments of some static inline helpers Lots of read-only helpers for &xdp_buff and &xdp_frame, such as getting the frame length, skb_shared_info etc., don't have their arguments marked with `const` for no reason. Add the missing annotations to leave less place for mistakes and more for optimization. Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://patch.msgid.link/20241203173733.3181246-4-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/xdp.h | 29 +++++++++++++++++------------ include/net/xdp_sock_drv.h | 11 ++++++----- include/net/xsk_buff_pool.h | 2 +- 3 files changed, 24 insertions(+), 18 deletions(-) commit 7cd1107f48e2a246c6a628c2381e1b8aafa4675a Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Tue Dec 3 18:37:25 2024 +0100 bpf, xdp: constify some bpf_prog * function arguments In lots of places, bpf_prog pointer is used only for tracing or other stuff that doesn't modify the structure itself. Same for net_device. Address at least some of them and add `const` attributes there. The object code didn't change, but that may prevent unwanted data modifications and also allow more helpers to have const arguments. Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/linux/bpf.h | 12 ++++++------ include/linux/filter.h | 9 +++++---- include/linux/netdevice.h | 6 +++--- include/linux/skbuff.h | 2 +- kernel/bpf/devmap.c | 8 ++++---- net/core/dev.c | 10 +++++----- net/core/filter.c | 29 ++++++++++++++++------------- net/core/skbuff.c | 2 +- 8 files changed, 41 insertions(+), 37 deletions(-) commit ca5c94949facce1f67a4a9a9528a27f635ff3e78 Author: Alexander Lobakin <aleksander.lobakin@intel.com> Date: Tue Dec 3 18:37:24 2024 +0100 xsk: align &xdp_buff_xsk harder After the series "XSk buff on a diet" by Maciej, the greatest pow-2 which &xdp_buff_xsk can be divided got reduced from 16 to 8 on x86_64. Also, sizeof(xdp_buff_xsk) now is 120 bytes, which, taking the previous sentence into account, leads to that it leaves 8 bytes at the end of cacheline, which means an array of buffs will have its elements messed between the cachelines chaotically. Use __aligned_largest for this struct. This alignment is usually 16 bytes, which makes it fill two full cachelines and align an array nicely. ___cacheline_aligned may be excessive here, especially on arches with 128-256 byte CLs, as well as 32-bit arches (76 -> 96 bytes on MIPS32R2), while not doing better than _largest. Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://patch.msgid.link/20241203173733.3181246-2-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/xsk_buff_pool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1daa6591ab7d6893cbcd8d02c2dbe43af42d36de Merge: 5765c7f6e317 1e7e1f0e8be1 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 5 18:02:15 2024 -0800 Merge branch 'net_sched-sch_sfq-reject-limit-of-1' Octavian Purdila says: ==================== net_sched: sch_sfq: reject limit of 1 The implementation does not properly support limits of 1. Add an in-kernel check, in addition to existing iproute2 check, since other tools may be used for configuration. This patch set also adds a selfcheck to test that a limit of 1 is rejected. An alternative (or in addition) we could fix the implementation by setting q->tail to NULL in sfq_drop if this is the last slot we marked empty, e.g.: --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c @@ -317,8 +317,11 @@ static unsigned int sfq_drop(struct Qdisc *sch, struct sk_buff **to_free) /* It is difficult to believe, but ALL THE SLOTS HAVE LENGTH 1. */ x = q->tail->next; slot = &q->slots[x]; - q->tail->next = slot->next; q->ht[slot->hash] = SFQ_EMPTY_SLOT; + if (x == slot->next) + q->tail = NULL; /* no more active slots */ + else + q->tail->next = slot->next; goto drop; } ==================== Link: https://patch.msgid.link/20241204030520.2084663-1-tavip@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 1e7e1f0e8be147ae98fe88ec82150c97265965a6 Author: Octavian Purdila <tavip@google.com> Date: Tue Dec 3 19:05:20 2024 -0800 selftests/tc-testing: sfq: test that kernel rejects limit of 1 Add test to check that the kernel rejects a configuration with the limit set to 1. Signed-off-by: Octavian Purdila <tavip@google.com> Link: https://patch.msgid.link/20241204030520.2084663-3-tavip@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> .../tc-testing/scripts/sfq_rejects_limit_1.py | 21 +++++++++++++++++++++ .../selftests/tc-testing/tc-tests/qdiscs/sfq.json | 20 ++++++++++++++++++++ 2 files changed, 41 insertions(+) commit 10685681bafce6febb39770f3387621bf5d67d0b Author: Octavian Purdila <tavip@google.com> Date: Tue Dec 3 19:05:19 2024 -0800 net_sched: sch_sfq: don't allow 1 packet limit The current implementation does not work correctly with a limit of 1. iproute2 actually checks for this and this patch adds the check in kernel as well. This fixes the following syzkaller reported crash: UBSAN: array-index-out-of-bounds in net/sched/sch_sfq.c:210:6 index 65535 is out of range for type 'struct sfq_head[128]' CPU: 0 PID: 2569 Comm: syz-executor101 Not tainted 5.10.0-smp-DEV #1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x125/0x19f lib/dump_stack.c:120 ubsan_epilogue lib/ubsan.c:148 [inline] __ubsan_handle_out_of_bounds+0xed/0x120 lib/ubsan.c:347 sfq_link net/sched/sch_sfq.c:210 [inline] sfq_dec+0x528/0x600 net/sched/sch_sfq.c:238 sfq_dequeue+0x39b/0x9d0 net/sched/sch_sfq.c:500 sfq_reset+0x13/0x50 net/sched/sch_sfq.c:525 qdisc_reset+0xfe/0x510 net/sched/sch_generic.c:1026 tbf_reset+0x3d/0x100 net/sched/sch_tbf.c:319 qdisc_reset+0xfe/0x510 net/sched/sch_generic.c:1026 dev_reset_queue+0x8c/0x140 net/sched/sch_generic.c:1296 netdev_for_each_tx_queue include/linux/netdevice.h:2350 [inline] dev_deactivate_many+0x6dc/0xc20 net/sched/sch_generic.c:1362 __dev_close_many+0x214/0x350 net/core/dev.c:1468 dev_close_many+0x207/0x510 net/core/dev.c:1506 unregister_netdevice_many+0x40f/0x16b0 net/core/dev.c:10738 unregister_netdevice_queue+0x2be/0x310 net/core/dev.c:10695 unregister_netdevice include/linux/netdevice.h:2893 [inline] __tun_detach+0x6b6/0x1600 drivers/net/tun.c:689 tun_detach drivers/net/tun.c:705 [inline] tun_chr_close+0x104/0x1b0 drivers/net/tun.c:3640 __fput+0x203/0x840 fs/file_table.c:280 task_work_run+0x129/0x1b0 kernel/task_work.c:185 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0x5ce/0x2200 kernel/exit.c:931 do_group_exit+0x144/0x310 kernel/exit.c:1046 __do_sys_exit_group kernel/exit.c:1057 [inline] __se_sys_exit_group kernel/exit.c:1055 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1055 do_syscall_64+0x6c/0xd0 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fe5e7b52479 Code: Unable to access opcode bytes at RIP 0x7fe5e7b5244f. RSP: 002b:00007ffd3c800398 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fe5e7b52479 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 RBP: 00007fe5e7bcd2d0 R08: ffffffffffffffb8 R09: 0000000000000014 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe5e7bcd2d0 R13: 0000000000000000 R14: 00007fe5e7bcdd20 R15: 00007fe5e7b24270 The crash can be also be reproduced with the following (with a tc recompiled to allow for sfq limits of 1): tc qdisc add dev dummy0 handle 1: root tbf rate 1Kbit burst 100b lat 1s ../iproute2-6.9.0/tc/tc qdisc add dev dummy0 handle 2: parent 1:10 sfq limit 1 ifconfig dummy0 up ping -I dummy0 -f -c2 -W0.1 8.8.8.8 sleep 1 Scenario that triggers the crash: * the first packet is sent and queued in TBF and SFQ; qdisc qlen is 1 * TBF dequeues: it peeks from SFQ which moves the packet to the gso_skb list and keeps qdisc qlen set to 1. TBF is out of tokens so it schedules itself for later. * the second packet is sent and TBF tries to queues it to SFQ. qdisc qlen is now 2 and because the SFQ limit is 1 the packet is dropped by SFQ. At this point qlen is 1, and all of the SFQ slots are empty, however q->tail is not NULL. At this point, assuming no more packets are queued, when sch_dequeue runs again it will decrement the qlen for the current empty slot causing an underflow and the subsequent out of bounds access. Reported-by: syzbot <syzkaller@googlegroups.com> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Octavian Purdila <tavip@google.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20241204030520.2084663-2-tavip@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/sched/sch_sfq.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5765c7f6e3173eb894889a29963a497aeb721c5e Author: Eric Dumazet <edumazet@google.com> Date: Wed Dec 4 17:19:50 2024 +0000 net_sched: sch_fq: add three drop_reason Add three new drop_reason, more precise than generic QDISC_DROP: "tc -s qd" show aggregate counters, it might be more useful to use drop_reason infrastructure for bug hunting. 1) SKB_DROP_REASON_FQ_BAND_LIMIT Whenever a packet is added while its band limit is hit. Corresponding value in "tc -s qd" is bandX_drops XXXX 2) SKB_DROP_REASON_FQ_HORIZON_LIMIT Whenever a packet has a timestamp too far in the future. Corresponding value in "tc -s qd" is horizon_drops XXXX 3) SKB_DROP_REASON_FQ_FLOW_LIMIT Whenever a flow has reached its limit. Corresponding value in "tc -s qd" is flows_plimit XXXX Tested: tc qd replace dev eth1 root fq flow_limit 10 limit 100000 perf record -a -e skb:kfree_skb sleep 1; perf script udp_stream 12329 [004] 216.929492: skb:kfree_skb: skbaddr=0xffff888eabe17e00 rx_sk=(nil) protocol=34525 location=__dev_queue_xmit+0x9d9 reason: FQ_FLOW_LIMIT udp_stream 12385 [006] 216.929593: skb:kfree_skb: skbaddr=0xffff888ef8827f00 rx_sk=(nil) protocol=34525 location=__dev_queue_xmit+0x9d9 reason: FQ_FLOW_LIMIT udp_stream 12389 [005] 216.929871: skb:kfree_skb: skbaddr=0xffff888ecb9ba500 rx_sk=(nil) protocol=34525 location=__dev_queue_xmit+0x9d9 reason: FQ_FLOW_LIMIT udp_stream 12316 [009] 216.930398: skb:kfree_skb: skbaddr=0xffff888eca286b00 rx_sk=(nil) protocol=34525 location=__dev_queue_xmit+0x9d9 reason: FQ_FLOW_LIMIT udp_stream 12400 [008] 216.930490: skb:kfree_skb: skbaddr=0xffff888eabf93d00 rx_sk=(nil) protocol=34525 location=__dev_queue_xmit+0x9d9 reason: FQ_FLOW_LIMIT tc qd replace dev eth1 root fq flow_limit 100 limit 10000 perf record -a -e skb:kfree_skb sleep 1; perf script udp_stream 18074 [001] 1058.318040: skb:kfree_skb: skbaddr=0xffffa23c881fc000 rx_sk=(nil) protocol=34525 location=__dev_queue_xmit+0x9d9 reason: FQ_BAND_LIMIT udp_stream 18126 [005] 1058.320651: skb:kfree_skb: skbaddr=0xffffa23c6aad4000 rx_sk=(nil) protocol=34525 location=__dev_queue_xmit+0x9d9 reason: FQ_BAND_LIMIT udp_stream 18118 [006] 1058.321065: skb:kfree_skb: skbaddr=0xffffa23df0d48a00 rx_sk=(nil) protocol=34525 location=__dev_queue_xmit+0x9d9 reason: FQ_BAND_LIMIT udp_stream 18074 [001] 1058.321126: skb:kfree_skb: skbaddr=0xffffa23c881ffa00 rx_sk=(nil) protocol=34525 location=__dev_queue_xmit+0x9d9 reason: FQ_BAND_LIMIT udp_stream 15815 [003] 1058.321224: skb:kfree_skb: skbaddr=0xffffa23c9835db00 rx_sk=(nil) protocol=34525 location=__dev_queue_xmit+0x9d9 reason: FQ_BAND_LIMIT tc -s -d qd sh dev eth1 qdisc fq 8023: root refcnt 257 limit 10000p flow_limit 100p buckets 1024 orphan_mask 1023 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 weights 589824 196608 65536 quantum 18Kb initial_quantum 92120b low_rate_threshold 550Kbit refill_delay 40ms timer_slack 10us horizon 10s horizon_drop Sent 492439603330 bytes 336953991 pkt (dropped 61724094, overlimits 0 requeues 4463) backlog 14611228b 9995p requeues 4463 flows 2965 (inactive 1151 throttled 0) band0_pkts 0 band1_pkts 9993 band2_pkts 0 gc 6347 highprio 0 fastpath 30 throttled 5 latency 2.32us flows_plimit 7403693 band1_drops 54320401 Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Victor Nogueira <victor@mojatatu.com> Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Link: https://patch.msgid.link/20241204171950.89829-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/net/dropreason-core.h | 18 ++++++++++++++++++ include/net/sch_generic.h | 8 ++++++++ net/sched/sch_fq.c | 14 ++++++++++---- 3 files changed, 36 insertions(+), 4 deletions(-) commit 2309132fc5d9d87deb15bda3497326aded6bfe4a Author: Song Yoong Siang <yoong.siang.song@intel.com> Date: Thu Dec 5 13:19:36 2024 +0800 selftests/bpf: Enable Tx hwtstamp in xdp_hw_metadata Currently, user needs to manually enable transmit hardware timestamp feature of certain Ethernet drivers, e.g. stmmac and igc drivers, through following command after running the xdp_hw_metadata app. sudo hwstamp_ctl -i eth0 -t 1 To simplify the step test of xdp_hw_metadata, set tx_type to HWTSTAMP_TX_ON to enable hardware timestamping for all outgoing packets, so that user no longer need to execute hwstamp_ctl command. Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20241205051936.3156307-1-yoong.siang.song@intel.com tools/testing/selftests/bpf/xdp_hw_metadata.c | 1 + 1 file changed, 1 insertion(+) commit 0bee36d1a51366fa57b731f8975f26f92943b43e Author: Song Yoong Siang <yoong.siang.song@intel.com> Date: Thu Dec 5 12:42:58 2024 +0800 selftests/bpf: Actuate tx_metadata_len in xdp_hw_metadata set XDP_UMEM_TX_METADATA_LEN flag to reserve tx_metadata_len bytes of per-chunk metadata. Fixes: d5e726d9143c ("xsk: Require XDP_UMEM_TX_METADATA_LEN to actuate tx_metadata_len") Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20241205044258.3155799-1-yoong.siang.song@intel.com tools/testing/selftests/bpf/xdp_hw_metadata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e92eebb0d6116f942ab25dfb1a41905aa59472a8 Author: Ricardo Robaina <rrobaina@redhat.com> Date: Fri Nov 22 09:18:43 2024 -0300 audit: fix suffixed '/' filename matching When the user specifies a directory to delete with the suffix '/', the audit record fails to collect the filename, resulting in the following logs: type=PATH msg=audit(10/30/2024 14:11:17.796:6304) : item=2 name=(null) type=PATH msg=audit(10/30/2024 14:11:17.796:6304) : item=1 name=(null) It happens because the value of the variables dname, and n->name->name in __audit_inode_child() differ only by the suffix '/'. This commit treats this corner case by handling pathname's trailing slashes in audit_compare_dname_path(). Steps to reproduce the issue: # auditctl -w /tmp $ mkdir /tmp/foo $ rm -r /tmp/foo/ # ausearch -i | grep PATH | tail -3 The first version of this patch was based on a GitHub patch/PR by user @hqh2010 [1]. Link: https://github.com/linux-audit/audit-kernel/pull/148 [1] Suggested-by: Paul Moore <paul@paul-moore.com> Signed-off-by: Ricardo Robaina <rrobaina@redhat.com> Reviewed-by: Richard Guy Briggs <rgb@redhat.com> [PM: subject tweak, trim old metadata] Signed-off-by: Paul Moore <paul@paul-moore.com> kernel/auditfilter.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 88e4a7dc04b7828315292eb3acaa466c9c123d8b Author: Sho Tanimoto <mojyack@gmail.com> Date: Thu Dec 5 17:46:00 2024 +0900 power: supply: bq24190_charger: Fix typo 'jeta' -> 'jeita' The sysfs file 'jeta_iset' was probably intended for 'jeita_iset' Signed-off-by: Sho Tanimoto <mojyack@gmail.com> Link: https://lore.kernel.org/r/20241205084601.2720462-1-mojyack@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/bq24190_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36bcc52b9bf078d92ff8f0f258cbe6b6e5213ee0 Author: John Harrison <John.C.Harrison@Intel.com> Date: Mon Dec 2 16:59:49 2024 -0800 drm/xe/guc: Fix for dead CT dump not re-arming The state dump on a dead CT incident deliberately disarms itself after running. This is to prevent a long stream of errors causing continuous dumps. It was supposed to re-arm itself after a reset, however that was not happening. The re-arm flag was being set but the worker was not being run to process that flag. So fix that. Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Julia Filipchuk <julia.filipchuk@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241203005949.3947920-1-John.C.Harrison@Intel.com drivers/gpu/drm/xe/xe_guc_ct.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e10500b69c3f3378f3dcfc8c2fe4cdb74fc844f5 Author: Quentin Monnet <qmo@kernel.org> Date: Thu Dec 5 13:59:42 2024 +0000 libbpf: Fix segfault due to libelf functions not setting errno Libelf functions do not set errno on failure. Instead, it relies on its internal _elf_errno value, that can be retrieved via elf_errno (or the corresponding message via elf_errmsg()). From "man libelf": If a libelf function encounters an error it will set an internal error code that can be retrieved with elf_errno. Each thread maintains its own separate error code. The meaning of each error code can be determined with elf_errmsg, which returns a string describing the error. As a consequence, libbpf should not return -errno when a function from libelf fails, because an empty value will not be interpreted as an error and won't prevent the program to stop. This is visible in bpf_linker__add_file(), for example, where we call a succession of functions that rely on libelf: err = err ?: linker_load_obj_file(linker, filename, opts, &obj); err = err ?: linker_append_sec_data(linker, &obj); err = err ?: linker_append_elf_syms(linker, &obj); err = err ?: linker_append_elf_relos(linker, &obj); err = err ?: linker_append_btf(linker, &obj); err = err ?: linker_append_btf_ext(linker, &obj); If the object file that we try to process is not, in fact, a correct object file, linker_load_obj_file() may fail with errno not being set, and return 0. In this case we attempt to run linker_append_elf_sysms() and may segfault. This can happen (and was discovered) with bpftool: $ bpftool gen object output.o sample_ret0.bpf.c libbpf: failed to get ELF header for sample_ret0.bpf.c: invalid `Elf' handle zsh: segmentation fault (core dumped) bpftool gen object output.o sample_ret0.bpf.c Fix the issue by returning a non-null error code (-EINVAL) when libelf functions fail. Fixes: faf6ed321cf6 ("libbpf: Add BPF static linker APIs") Signed-off-by: Quentin Monnet <qmo@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241205135942.65262-1-qmo@kernel.org tools/lib/bpf/linker.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 5cc1ccb61ecfec535a36bd6a2fb0b12226f79671 Author: Michael J. Ruhl <michael.j.ruhl@intel.com> Date: Thu Dec 5 13:36:49 2024 -0500 drm/xe/vsec: Address static checker issue The callback structure should be static. Add static attribute. Fixes: 0c45e76fcc62 ("drm/xe/vsec: Support BMG devices") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412050418.8ecQxYXj-lkp@intel.com/ Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241205183649.3120032-1-michael.j.ruhl@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/xe_vsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da8656797ae10b524a7a0c3d5eeb6237fa3ddd70 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Wed Dec 4 18:32:16 2024 +0200 wifi: ath12k: introduce mlo_capable flag for device group Currently, during mac80211 allocate and register single device is considered for the registration. But, in future, during multi device group abstraction is introduced, all the devices has to be combined together as a single abstraction and then hardware should be allocated. All the devices in the group should be combined together only if it supports inter device mlo capability. The decision of whether to combine the devices or not can be based on the mlo capability flag in ath12k_hw_group. By default, mlo_capable flag in the group would be set as false. During QMI PHY capability exchange, only when we have more than one chip in the group or if one chip, then that chip supports inter MLO, then mlo_capable flag in the group will be enabled. Add changes to introduce mlo_capable flag for device group and refactor ath12k_mac_hw_allocate() api based on device group (ag) rather than device (ab). 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 <quic_periyasa@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241204163216.433795-8-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.c | 17 +++++++++++++++++ drivers/net/wireless/ath/ath12k/core.h | 3 +++ drivers/net/wireless/ath/ath12k/mac.c | 8 +++++--- drivers/net/wireless/ath/ath12k/qmi.c | 6 ++++-- 4 files changed, 29 insertions(+), 5 deletions(-) commit d302ac65ac938516487f57ae20f11e9cf6327606 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Wed Dec 4 18:32:15 2024 +0200 wifi: ath12k: send QMI host capability after device group is ready QMI host capability has the information regarding MLO parameters such as device_id, MLO capability, group id and the information of each devices involved in the group and sent immediately on QMI server arrive event. Currently, only one device is involved in the group and hence, single device information is sent as part of MLO capability of host. But, in future when multi device group abstraction is introduced, host should send all the device information involved in the group as part of QMI MLO host capability rather than single device. Hence, sending QMI host capability immediately on server arrive of a device might not be ideal for multi device group abstraction as the details of other devices in the group would not be available. Hence, once QMI server arrive event is received, request for QMI PHY capabilities of device, and defer the host capability send for that device. After QMI PHY capability is received for all the devices in the group trigger the host capability event for the deferred devices in the group. Hence, add changes to defer the QMI host capability event until the device group is ready and then resume the QMI exchange for all the device with host capabilities. 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 <quic_periyasa@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241204163216.433795-7-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.c | 21 ++++++++ drivers/net/wireless/ath/ath12k/qmi.c | 98 ++++++++++++++++++++++++++++++++-- drivers/net/wireless/ath/ath12k/qmi.h | 20 +++++++ 3 files changed, 134 insertions(+), 5 deletions(-) commit a343d97f27f514015e6d5e789672cf4ab4111720 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Wed Dec 4 18:32:14 2024 +0200 wifi: ath12k: move struct ath12k_hw from per device to group Currently, hardware abstractions (ah) of different radio bands are tightly coupled to a single device (ab). But, with hardware device group abstraction (ag), multiple radios across different devices in a group can form different combinations of hardware abstractions (ah) within the group. Hence, the mapping between ah to ab can be removed and instead it can be mapped with struct ath12k_hw_group (ag). Current mapping between struct ath12k_hw (ah), struct ath12k_base (ab) and struct ath12k_hw_group (ag): +------------------------------------------------+ | +-------------------------------------+ | | | +---------------+ +---------------+ | | | | |ath12k_hw (ah) | |ath12k_hw (ah) | | | | | +---------------+ +---------------+ | | | | | | | | +-----------+ | +-----------+ | | | | | ar (2GHz) | | | ar (5GHz) | | | | | +-----------+ | +-----------+ | | | | Dual band device-1 (ab) | | | +-------------------------------------+ | | ath12k_hw_group (ag) based on group id | +------------------------------------------------+ After hardware device group abstraction moving ah array out of ab to ag: +----------------------------------------------+ | +---------------+ +---------------+ | | |ath12k_hw (ah) | |ath12k_hw (ah) | | | +---------------+ +---------------+ | | +-------------------------------------+ | | | +-----------+ +-----------+ | | | | | ar (2GHz) | | ar (5GHz) | | | | | +-----------+ +-----------+ | | | | Dual band device-1 (ab) | | | +-------------------------------------+ | | ath12k_hw_group (ag) based on group id | +----------------------------------------------+ This decoupling of struct ath12k_hw (ah) from struct ath12k_base (ab) and mapping it to struct ath12k_hw_group (ag) will help in forming different combinations of multi-link devices. 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 <quic_periyasa@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241204163216.433795-6-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.c | 49 +++++++++---------- drivers/net/wireless/ath/ath12k/core.h | 29 ++++++----- drivers/net/wireless/ath/ath12k/dp.c | 19 +++----- drivers/net/wireless/ath/ath12k/dp.h | 2 +- drivers/net/wireless/ath/ath12k/mac.c | 89 +++++++++++++++++++++++----------- drivers/net/wireless/ath/ath12k/mac.h | 9 ++-- 6 files changed, 115 insertions(+), 82 deletions(-) commit ee146e11b4d9183e01d8b7e4963941730ed4af6d Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Wed Dec 4 18:32:13 2024 +0200 wifi: ath12k: refactor core start based on hardware group Currently, mac allocate/register and core_pdev_create are initiated immediately when QMI firmware ready event is received for a particular device. With hardware device group abstraction, QMI firmware ready event can be received simultaneously for different devices in the group and so, it should not be registered immediately rather it has to be deferred until all devices in the group has received QMI firmware ready. To handle this, refactor the code of core start to have registering within ath12k_core_hw_group_start() and unregistering in ath12k_core_hw_group_stop(). 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 <quic_periyasa@quicinc.com> Co-developed-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241204163216.433795-5-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.c | 195 ++++++++++++++++++++++++--------- drivers/net/wireless/ath/ath12k/core.h | 22 ++++ drivers/net/wireless/ath/ath12k/qmi.c | 4 +- 3 files changed, 170 insertions(+), 51 deletions(-) commit 6f245ea0ec6c29b90c8fa4fdf6e178c646125d7e Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Wed Dec 4 18:32:12 2024 +0200 wifi: ath12k: introduce device group abstraction Currently, single device is probed, and once firmware is ready, the device is registered to mac80211. For Multi-Link Operation, different bands of different devices or same device are part of a single wiphy and for this, hardware device group abstraction is needed. Hardware device group abstraction - when there are multiple devices (with single radio or dual radio) that are connected by any means of interface for communicating between them, then these devices can be combined together as a single group using a group id to form a group abstraction and register to mac80211. The grouping information of multiple devices would be based on device tree during device probe (will be implemented in future patches). If no such information is available, then a single device will be part of group abstraction and registered to mac80211, else multiple devices advertised in device tree are combined and then registered to mac80211. For device group abstraction, a base structure ath12k_hw_group (ag) and the helpers are implemented. These helpers are used during device probe and mapping the group to the devices involved. An illustration of how multiple devices might be combined together in future based on group id: +------------------------------------------------------------------------+ | +-------------------------------------+ +-------------------+ | | | +-----------+ | | +-----------+ | | +-----------+ | | | | | ar (2GHz) | | | | ar (5GHz) | | | | ar (6GHz) | | | | | +-----------+ | | +-----------+ | | +-----------+ | | | | ath12k_base (ab) | | ath12k_base (ab) | | | | (Dual band device) | | | | | +-------------------------------------+ +-------------------+ | | ath12k_hw_group (ag) based on group id | +------------------------------------------------------------------------+ In the above representation, two devices are combined into single group based on group id. Add base code changes where single device would be part of a group with an invalid group id forming an group abstraction. Multi device grouping will be introduced in future. 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 <quic_periyasa@quicinc.com> Co-developed-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241204163216.433795-4-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.c | 231 +++++++++++++++++++++++++++++++-- drivers/net/wireless/ath/ath12k/core.h | 17 +++ drivers/net/wireless/ath/ath12k/pci.c | 1 + 3 files changed, 236 insertions(+), 13 deletions(-) commit 46d16f7e1d1413ad7ff99c1334d8874623717745 Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Wed Dec 4 18:32:11 2024 +0200 wifi: ath12k: rename mlo_capable_flags to single_chip_mlo_supp At present, the mlo_capable_flags in ath12k_base is used to indicate whether the chip supports inter (QCN9274) or intra (WCN7850) chip MLO. However, it’s possible that the chip supports neither, especially with older firmware versions. Additionally, if intra chip MLO is not supported, inter chip MLO will also be non-functional. Therefore, having two separate flags for this is unnecessary. Therefore, rename this flag to single_chip_mlo_supp. At the same time convert it into a bool data type. Also, get rid of the enums defined earlier. For the QCN9274 family of chipsets, this will be set only when firmware advertises the support during the QMI exchange. For the WCN7850 family of chipsets, since the event is not supported, assumption is made that single chip MLO is supported. 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 <quic_adisi@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241204163216.433795-3-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/core.c | 2 +- drivers/net/wireless/ath/ath12k/core.h | 23 ++--------------------- drivers/net/wireless/ath/ath12k/qmi.c | 13 +++++-------- 3 files changed, 8 insertions(+), 30 deletions(-) commit a5686ae820fa7ab03226a3b0ff529720b7bac599 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Wed Dec 4 18:32:10 2024 +0200 wifi: ath12k: move ATH12K_FLAG_REGISTERED handling to ath12k_mac_register() When hardware device group abstraction is introduced, a group abstraction is registered to mac80211 rather than a particular single device. So we cannot set the device registered when the QMI firmware ready event is received, only after all the devices in group have received the event. To do that set and unset ATH12K_FLAG_REGISTERED flag inside ath12k_mac_register() and ath12k_mac_unregister() 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: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241204163216.433795-2-kvalo@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> drivers/net/wireless/ath/ath12k/mac.c | 4 ++++ drivers/net/wireless/ath/ath12k/qmi.c | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) commit fca81aa3e653d68ac696f3ee994384cecacf3845 Author: Remi Pommarel <repk@triplefau.lt> Date: Fri Nov 22 16:52:52 2024 +0100 batman-adv: Don't keep redundant TT change events When adding a local TT twice within the same OGM interval (e.g. happens when flag get updated), the flags of the first TT change entry is updated with the second one and both change events is added to the change list. This leads to having the same ADD change entry twice. Similarly, a DEL+DEL scenario is also creating twice the same event. Deduplicate ADD+ADD or DEL+DEL scenarios to reduce the TT change events that need to be sent in both OGM and TT response. Signed-off-by: Remi Pommarel <repk@triplefau.lt> Co-developed-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> net/batman-adv/translation-table.c | 40 +++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 22 deletions(-) commit 8587e0e3f562b09bbfe0df1b0c506066095043e4 Author: Remi Pommarel <repk@triplefau.lt> Date: Fri Nov 22 16:52:51 2024 +0100 batman-adv: Remove atomic usage for tt.local_changes The tt.local_changes atomic is either written with tt.changes_list_lock or close to it (see batadv_tt_local_event()). Thus the performance gain using an atomic was limited (or because of atomic_read() impact even negative). Using atomic also comes with the need to be wary of potential negative tt.local_changes value. Simplify the tt.local_changes usage by removing the atomic property and modifying it only with tt.changes_list_lock held. Signed-off-by: Remi Pommarel <repk@triplefau.lt> Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> net/batman-adv/soft-interface.c | 2 +- net/batman-adv/translation-table.c | 24 +++++++++++------------- net/batman-adv/types.h | 4 ++-- 3 files changed, 14 insertions(+), 16 deletions(-) commit a7d5100ed0099a9f21b796017908cc7ece5332e4 Author: Sven Eckelmann <sven@narfation.org> Date: Wed Oct 16 09:23:06 2024 +0200 batman-adv: Reorder includes for distributed-arp-table.c The commit 5f60d5f6bbc1 ("move asm/unaligned.h to linux/unaligned.h") changed the include without adjusting the order (to match the rest of the file). Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> net/batman-adv/distributed-arp-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77a214317a6adcbfaf0781a2d950247106c6bc1f Author: Simon Wunderlich <sw@simonwunderlich.de> Date: Wed Oct 16 09:16:07 2024 +0200 batman-adv: Start new development cycle This version will contain all the (major or even only minor) changes for Linux 6.14. 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 <sw@simonwunderlich.de> net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f930594981cd9db15315c0ca03292a91828e39f0 Merge: 302cc446cbd9 8d0580c6ebdd Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 5 12:03:09 2024 -0800 Merge branch 'ethtool-generate-uapi-header-from-the-spec' Stanislav Fomichev says: ==================== ethtool: generate uapi header from the spec We keep expanding ethtool netlink api surface and this leads to constantly playing catchup on the ynl spec side. There are a couple of things that prevent us from fully converting to generating the header from the spec (stats and cable tests), but we can generate 95% of the header which is still better than maintaining c header and spec separately. The series adds a couple of missing features on the ynl-gen-c side and separates the parts that we can generate into new ethtool_netlink_generated.h. ==================== Link: https://patch.msgid.link/20241204155549.641348-1-sdf@fomichev.me Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 8d0580c6ebdd27879c83483f53bc71e2e470f6fe Author: Stanislav Fomichev <sdf@fomichev.me> Date: Wed Dec 4 07:55:49 2024 -0800 ethtool: regenerate uapi header from the spec No functional changes. Mostly the following formatting: - extra docs - extra enums - XXX_MAX = __XXX_CNT - 1 -> XXX_MAX = (__XXX_CNT - 1) - newlines Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20241204155549.641348-9-sdf@fomichev.me Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/uapi/linux/ethtool_netlink_generated.h | 89 ++++++++++++++++---------- 1 file changed, 56 insertions(+), 33 deletions(-) commit dd7cde36de15b071b5f9163d21d7c9142089b424 Author: Stanislav Fomichev <sdf@fomichev.me> Date: Wed Dec 4 07:55:48 2024 -0800 ethtool: remove the comments that are not gonna be generated Cleanup the header manually to make it easier to review the changes that ynl generator brings in. No functional changes. Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20241204155549.641348-8-sdf@fomichev.me Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/uapi/linux/ethtool_netlink_generated.h | 678 ++++++++++--------------- 1 file changed, 274 insertions(+), 404 deletions(-) commit 49922401c2190713c5cc03902dc68c3ecd3f13e8 Author: Stanislav Fomichev <sdf@fomichev.me> Date: Wed Dec 4 07:55:47 2024 -0800 ethtool: separate definitions that are gonna be generated Reshuffle definitions that are gonna be generated into ethtool_netlink_generated.h and match ynl spec order. This should make it easier to compare the output of the ynl-gen-c to the existing uapi header. No functional changes. Things that are still remaining to be manually defined: - ETHTOOL_FLAG_ALL - probably no good way to add to spec? - some of the cable test bits (not sure whether it's possible to move to spec) - some of the stats definitions (no way currently to move to spec) Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20241204155549.641348-7-sdf@fomichev.me Signed-off-by: Jakub Kicinski <kuba@kernel.org> MAINTAINERS | 2 +- include/uapi/linux/ethtool_netlink.h | 893 +----------------------- include/uapi/linux/ethtool_netlink_generated.h | 899 +++++++++++++++++++++++++ 3 files changed, 901 insertions(+), 893 deletions(-) commit 001b0b59efbbdf54126c2ae512009d4a7c9f9f88 Author: Stanislav Fomichev <sdf@fomichev.me> Date: Wed Dec 4 07:55:46 2024 -0800 ynl: include uapi header after all dependencies Essentially reverse the order of headers for userspace generated files. Before (make -C tools/net/ynl/; cat tools/net/ynl/ethtool-user.h): #include <linux/ethtool_netlink_generated.h> #include <linux/ethtool.h> #include <linux/ethtool.h> #include <linux/ethtool.h> After: #include <linux/ethtool.h> #include <linux/ethtool_netlink_generated.h> While at it, make sure we track which headers we've already included and include the headers only once. Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20241204155549.641348-6-sdf@fomichev.me Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/net/ynl/ynl-gen-c.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 0187e602c03c876d69cf955dd438bc7fea8c8fd3 Author: Stanislav Fomichev <sdf@fomichev.me> Date: Wed Dec 4 07:55:45 2024 -0800 ynl: add missing pieces to ethtool spec to better match uapi header - __ETHTOOL_UDP_TUNNEL_TYPE_CNT and render max - skip rendering stringset (empty enum) - skip rendering c33-pse-ext-state (defined in ethtool.h) - rename header flags to ethtool-flag- - add attr-cnt-name to each attribute to use XXX_CNT instead of XXX_MAX - add unspec 0 entry to each attribute - carry some doc entries from the existing header - tcp-header-split Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20241204155549.641348-5-sdf@fomichev.me Signed-off-by: Jakub Kicinski <kuba@kernel.org> Documentation/netlink/specs/ethtool.yaml | 358 +++++++++++++++++++++++++++++-- 1 file changed, 346 insertions(+), 12 deletions(-) commit 56881d07f0b4cb97f3c460dc3908eee91fc51a17 Author: Stanislav Fomichev <sdf@fomichev.me> Date: Wed Dec 4 07:55:44 2024 -0800 ynl: support directional specs in ynl-gen-c.py The intent is to generate ethtool uapi headers. For now, some of the things are hard-coded: - <FAMILY>_MSG_{USER,KERNEL}_MAX - the split between USER and KERNEL messages Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20241204155549.641348-4-sdf@fomichev.me Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/net/ynl/ynl-gen-c.py | 118 +++++++++++++++++++++++++++++++++------------ 1 file changed, 87 insertions(+), 31 deletions(-) commit 8c843ecde4e49e11063ad942675246ec685ea19a Author: Stanislav Fomichev <sdf@fomichev.me> Date: Wed Dec 4 07:55:43 2024 -0800 ynl: skip rendering attributes with header property in uapi mode To allow omitting some of the attributes in the final generated file. Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20241204155549.641348-3-sdf@fomichev.me Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/net/ynl/ynl-gen-c.py | 4 ++++ 1 file changed, 4 insertions(+) commit 523d3cc4b6d1ae18bfa516345d48332d455181e6 Author: Stanislav Fomichev <sdf@fomichev.me> Date: Wed Dec 4 07:55:42 2024 -0800 ynl: support enum-cnt-name attribute in legacy definitions This is similar to existing attr-cnt-name in the attributes to allow changing the name of the 'count' enum entry. Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20241204155549.641348-2-sdf@fomichev.me Signed-off-by: Jakub Kicinski <kuba@kernel.org> Documentation/netlink/genetlink-c.yaml | 3 +++ Documentation/netlink/genetlink-legacy.yaml | 3 +++ Documentation/userspace-api/netlink/c-code-gen.rst | 4 +++- tools/net/ynl/ynl-gen-c.py | 8 ++++++-- 4 files changed, 15 insertions(+), 3 deletions(-) commit 302cc446cbd92aadff72a647cebc13d5634f8342 Merge: da4fa00abe56 896d8946da97 Author: Jakub Kicinski <kuba@kernel.org> Date: Thu Dec 5 11:48:58 2024 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR (net-6.13-rc2). No conflicts or adjacent changes. Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit dff8470b99da095e1baafd01bdc21d9da05de821 Author: Eduard Zingerman <eddyz87@gmail.com> Date: Wed Dec 4 09:34:16 2024 -0800 samples/bpf: Pass TPROGS_USER_CFLAGS to libbpf makefile Before commit [1], the value of a variable TPROGS_USER_CFLAGS was passed to libbpf make command as a part of EXTRA_CFLAGS. This commit makes sure that the value of TPROGS_USER_CFLAGS is still passed to libbpf make command, in order to maintain backwards build scripts compatibility. [1] commit 5a6ea7022ff4 ("samples/bpf: Remove unnecessary -I flags from libbpf EXTRA_CFLAGS") Fixes: 5a6ea7022ff4 ("samples/bpf: Remove unnecessary -I flags from libbpf EXTRA_CFLAGS") Suggested-by: Viktor Malik <vmalik@redhat.com> Signed-off-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Viktor Malik <vmalik@redhat.com> Link: https://lore.kernel.org/bpf/20241204173416.142240-1-eddyz87@gmail.com samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 564ea84c8c14b007d7838bfb1327295b873573be Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Date: Mon Dec 2 09:24:58 2024 +0200 x86/tdx: Dump attributes and TD_CTLS on boot Dump TD configuration on boot. Attributes and TD_CTLS define TD behavior. This information is useful for tracking down bugs. The output ends up looking like this in practice: [ 0.000000] tdx: Guest detected [ 0.000000] tdx: Attributes: SEPT_VE_DISABLE [ 0.000000] tdx: TD_CTLS: PENDING_VE_DISABLE ENUM_TOPOLOGY VIRT_CPUID2 REDUCE_VE Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com> Link: https://lore.kernel.org/all/20241202072458.447455-1-kirill.shutemov%40linux.intel.com arch/x86/coco/tdx/Makefile | 2 +- arch/x86/coco/tdx/debug.c | 69 +++++++++++++++++++++++++++++++++++++++ arch/x86/coco/tdx/tdx.c | 27 ++++++++++----- arch/x86/include/asm/shared/tdx.h | 39 ++++++++++++++++++++-- arch/x86/include/asm/tdx.h | 3 ++ 5 files changed, 128 insertions(+), 12 deletions(-) commit 9dfc6850cfa48a30d6a3068dd92db5b47ea8074e Author: Philipp Stanner <pstanner@redhat.com> Date: Tue Dec 3 11:00:24 2024 +0100 PCI: Encourage resource request API users to supply driver name PCI region request functions have a @name parameter (sometimes called "res_name"). It is used in a log message to inform drivers about request collisions, e.g., when another driver has requested that region already. This message is only useful when it contains the actual owner of the region, i.e., which driver requested it. So far, a great many drivers misuse the @name parameter and just pass pci_name(), which doesn't result in useful debug information. Rename "res_name" to "name". Detail @name's purpose in the docstrings. Link: https://lore.kernel.org/r/20241203100023.31152-2-pstanner@redhat.com Signed-off-by: Philipp Stanner <pstanner@redhat.com> [bhelgaas: tweak comment wording to include "driver"] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> drivers/pci/devres.c | 16 ++++++------ drivers/pci/pci.c | 69 +++++++++++++++++++++++++--------------------------- 2 files changed, 41 insertions(+), 44 deletions(-) commit 9ad11a3e1bf5b0f9c121aa8b0fbd0f1cf0ee69d8 Merge: c34e9ab9a612 738ab625a984 Author: Takashi Iwai <tiwai@suse.de> Date: Thu Dec 5 18:17:33 2024 +0100 Merge branch 'topic/post-6.13-rc1' into for-next Pull pending changes for 6.14 onto 6.13-devel branch. Signed-off-by: Takashi Iwai <tiwai@suse.de> commit 919c2b586f620d884f95a97b3d5f665b4ee27228 Author: Ilia Levi <ilia.levi@intel.com> Date: Wed Dec 4 13:16:55 2024 +0200 drm/xe: Use managed BO in memirq When probe has an error, the current scheme causes a page fault during resource unwinding. This happens because GTTMMADR_BAR gets unmapped before the allocated BO is released via drmm. Switching to a managed BO that is released via devm solves this ordering issue. Signed-off-by: Ilia Levi <ilia.levi@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241204111655.1293-1-ilia.levi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_memirq.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit 20296f8baa25839585b9060079946f7333a5c5aa Author: Mesih Kilinc <mesihkilinc@gmail.com> Date: Sat Nov 23 13:39:05 2024 +0100 ARM: dts: suniv: f1c100s: Activate Audio Codec for Lichee Pi Nano Allwinner suniv F1C100s now has basic audio codec support. Activate it for Lichee Pi Nano board. Signed-off-by: Mesih Kilinc <mesihkilinc@gmail.com> [ csokas.bence: Moved and fixed conflict ] Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Link: https://patch.msgid.link/20241123123900.2656837-6-csokas.bence@prolan.hu Signed-off-by: Chen-Yu Tsai <wens@csie.org> arch/arm/boot/dts/allwinner/suniv-f1c100s-licheepi-nano.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 95b570f7ded1e921eb3fd256d0a70b294f31bd0c Author: Mesih Kilinc <mesihkilinc@gmail.com> Date: Sat Nov 23 13:39:04 2024 +0100 ARM: dts: suniv: f1c100s: Add support for Audio Codec Allwinner suniv F1C100s now has basic audio codec support. Enable it under device tree. Signed-off-by: Mesih Kilinc <mesihkilinc@gmail.com> [ csokas.bence: Rebased on current master ] Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Link: https://patch.msgid.link/20241123123900.2656837-5-csokas.bence@prolan.hu Signed-off-by: Chen-Yu Tsai <wens@csie.org> arch/arm/boot/dts/allwinner/suniv-f1c100s.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 7336701f6467381af87a462008793178925a03bf Author: Mesih Kilinc <mesihkilinc@gmail.com> Date: Fri Nov 22 17:11:32 2024 +0100 ARM: dts: suniv: f1c100s: Add support for DMA Allwinner suniv F1C100s now has DMA support. Enable it under device tree. Signed-off-by: Mesih Kilinc <mesihkilinc@gmail.com> [ csokas.bence: Rebased on current master ] Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Link: https://patch.msgid.link/20241122161128.2619172-6-csokas.bence@prolan.hu Signed-off-by: Chen-Yu Tsai <wens@csie.org> arch/arm/boot/dts/allwinner/suniv-f1c100s.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 738ab625a9840959328f941d3d5f33aae6a81d62 Author: Zhu Jun <zhujun2@cmss.chinamobile.com> Date: Thu Dec 5 01:51:56 2024 -0800 ALSA: lola: Fix typo in lola_clock.c The word 'ajustement' is wrong, so fix it. Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Link: https://patch.msgid.link/20241205095156.17837-1-zhujun2@cmss.chinamobile.com Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/lola/lola_clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e0438f9c3d25eea8bc8e9b4dcff7edfb64cb9e7 Author: Krzysztof Karas <krzysztof.karas@intel.com> Date: Mon Nov 18 12:19:22 2024 +0000 drm/i915: ensure segment offset never exceeds allowed max Commit 255fc1703e42 ("drm/i915/gem: Calculate object page offset for partial memory mapping") introduced a new offset, which accounts for userspace mapping not starting from the beginning of object's scatterlist. This works fine for cases where first object pte is larger than the new offset - "r->sgt.curr" counter is set to the offset to match the difference in the number of total pages. However, if object's first pte's size is equal to or smaller than the offset, then information about the offset in userspace is covered up by moving "r->sgt" pointer in remap_sg(): r->sgt.curr += PAGE_SIZE; if (r->sgt.curr >= r->sgt.max) r->sgt = __sgt_iter(__sg_next(r->sgt.sgp), use_dma(r->iobase)); This means that two or more pages from virtual memory are counted for only one page in object's memory, because after moving "r->sgt" pointer "r->sgt.curr" will be 0. We should account for this mismatch by moving "r->sgt" pointer to the next pte. For that we may use "r.sgt.max", which already holds the max allowed size. This change also eliminates possible confusion, when looking at i915_scatterlist.h and remap_io_sg() code: former has scatterlist pointer definition, which differentiates "s.max" value based on "dma" flag (sg_dma_len() is used only when the flag is enabled), while latter uses sg_dma_len() indiscriminately. This patch aims to resolve issue: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12031 v3: - instead of checking if r.sgt.curr would exceed allowed max, changed the value in the while loop to be aligned with `dma` value v4: - remove unnecessary parent relation v5: - update commit message with explanation about page counting mismatch and link to the issue Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/upbjdavlbcxku63ns4vstp5kgbn2anxwewpmnppszgb67fn66t@tfclfgkqijue drivers/gpu/drm/i915/i915_mm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63a48181fbcddefe5fb4c6618938bb64c543945b Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Date: Tue Dec 3 11:35:58 2024 -0500 smp/scf: Evaluate local cond_func() before IPI side-effects In smp_call_function_many_cond(), the local cond_func() is evaluated after triggering the remote CPU IPIs. If cond_func() depends on loading shared state updated by other CPU's IPI handlers func(), then triggering execution of remote CPUs IPI before evaluating cond_func() may have unexpected consequences. One example scenario is evaluating a jiffies delay in cond_func(), which is updated by func() in the IPI handlers. This situation can prevent execution of periodic cleanup code on the local CPU. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Rik van Riel <riel@surriel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20241203163558.3455535-1-mathieu.desnoyers@efficios.com kernel/smp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5a56323a54b7febcfe82cc5eda840a176647b7cd Author: Nícolas F. R. A. Prado <nfraprado@collabora.com> Date: Thu Dec 5 09:13:57 2024 -0300 ASoC: dt-bindings: mediatek,mt8188-mt6359: Allow DL_SRC/UL_SRC dai-links Add DL_SRC_BE and UL_SRC_BE as possible link-names for dai-links. These DAI back-ends are currently hardcoded in the driver to the MT6359 codec, but they may still be overridden with dai-links in the Devicetree to assign them additional codecs or even to make the dependency to the MT6359 codec explicit and allow device links to probe the components in the right order and avoid unnecessary probe deferrals. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20241205-genio700-audio-output-v1-4-0e955c78c29e@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org> Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 8e22ea5fb8498c52fcc20bbe2070c3aef1a3dff2 Author: Nícolas F. R. A. Prado <nfraprado@collabora.com> Date: Thu Dec 5 09:13:55 2024 -0300 ASoC: dt-bindings: mediatek,mt8188-mt6359: Add compatible for mt8390 evk Add a compatible for the MT8390 EVK. It is compatible with mediatek,mt8188-mt6359-evb so make that the fallback compatible. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20241205-genio700-audio-output-v1-2-0e955c78c29e@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org> .../devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 5c44aa21f0863270efbf03a4d5bd6b75fec4134c Author: Matthew Wilcox (Oracle) <willy@infradead.org> Date: Mon Nov 25 18:01:14 2024 +0000 isofs: Partially convert zisofs_read_folio to use a folio Remove several hidden calls to compound_head() and references to page->index. More needs to be done to use folios throughout the zisofs code. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20241125180117.2914311-1-willy@infradead.org fs/isofs/compress.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 84e541b1e58e04d808e1bb13ef566ffbe87aa89b Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Nov 30 03:52:35 2024 +0200 drm/sun4i: use drm_atomic_helper_connector_hdmi_check() Replace sun4i_hdmi_connector_atomic_check(), which performs just TMDS char rate check, with drm_atomic_helper_connector_hdmi_check(), which performs additional checks basing on the HDMI Connector's state. Suggested-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241130-hdmi-mode-valid-v5-10-742644ec3b1f@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) commit 2d7202c6f38d14260a3998a2aa249a53415a24f5 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Nov 30 03:52:34 2024 +0200 drm/bridge: dw-hdmi-qp: replace mode_valid with tmds_char_rate Replace .mode_valid() callback with .hdmi_tmds_char_rate_valid(). It is more generic and is used in other mode validation paths. The rate validation for .mode_valid() will be performed by the drm_bridge_connector code. Reviewed-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241130-hdmi-mode-valid-v5-9-742644ec3b1f@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit efda6551aa866b80dcb5a94158d805c560fc4f1c Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Nov 30 03:52:33 2024 +0200 drm/bridge: lontium-lt9611: drop TMDS char rate check in mode_valid Drop manual check of the TMDS char rate in the mode_valid callback. This check is now being performed by the core. Reviewed-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241130-hdmi-mode-valid-v5-8-742644ec3b1f@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/bridge/lontium-lt9611.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 54d7b7f9d637a53ba19d117eb9b01619bb1704ed Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Nov 30 03:52:32 2024 +0200 drm/display: bridge_connector: use drm_bridge_connector_mode_valid() Use new drm_bridge_connector_mode_valid() helper if there is a HDMI bridge in the bridge chain. This removes the need to perform TMDS char rate check manually in the bridge driver. Reviewed-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241130-hdmi-mode-valid-v5-7-742644ec3b1f@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/display/drm_bridge_connector.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit d4581ae8695863b21f9b739dddce8159f3068ca3 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Nov 30 03:52:31 2024 +0200 drm/vc4: use drm_hdmi_connector_mode_valid() Use new drm_hdmi_connector_mode_valid() helper instead of a module-specific copy. Reviewed-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241130-hdmi-mode-valid-v5-6-742644ec3b1f@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/vc4/vc4_hdmi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ae048fc4f96d716a2ef326bd6e894694057c078c Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Nov 30 03:52:30 2024 +0200 drm/sun4i: use drm_hdmi_connector_mode_valid() Use new drm_hdmi_connector_mode_valid() helper instead of a module-specific copy. Reviewed-by: Chen-Yu Tsai <wens@csie.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241130-hdmi-mode-valid-v5-5-742644ec3b1f@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 47368ab437fdd1b5118644659a97a6e5dab45248 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Nov 30 03:52:29 2024 +0200 drm/display: hdmi: add generic mode_valid helper Add drm_hdmi_connector_mode_valid(), generic helper for HDMI connectors. It can be either used directly or as a part of the .mode_valid callback. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241130-hdmi-mode-valid-v5-4-742644ec3b1f@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/display/drm_hdmi_state_helper.c | 21 +++ drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 180 ++++++++++++++++++++- drivers/gpu/drm/tests/drm_kunit_edid.h | 102 ++++++++++++ include/drm/display/drm_hdmi_state_helper.h | 4 + 4 files changed, 302 insertions(+), 5 deletions(-) commit a8403be6eea91e4f5d8ad5dbc463dd08339eaece Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Nov 30 03:52:28 2024 +0200 drm/tests: hdmi: return meaningful value from set_connector_edid() The set_connector_edid() function returns a bogus 0, performing the check on the connector->funcs->fill_modes() result internally. Make the function pass the fill_modes()'s return value to the caller and move corresponding checks to the caller site. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241130-hdmi-mode-valid-v5-3-742644ec3b1f@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 31 +++++++++++----------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 67d31cd02c8dfb3d006dba62a854e6758cf7a0e4 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Nov 30 03:52:27 2024 +0200 drm/tests: hdmi: rename connector creation function As pointed out by Maxime, the drm_atomic_helper_connector_hdmi_init() isn't a good name for a function inside KUnit tests. Rename it to drm_kunit_helper_connector_hdmi_init(). Suggested-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241130-hdmi-mode-valid-v5-2-742644ec3b1f@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 202 ++++++++++----------- 1 file changed, 101 insertions(+), 101 deletions(-) commit d3314efd6ebf335a3682b1d6b1b81cdab3d8254a Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Nov 30 03:52:26 2024 +0200 drm/tests: hdmi: handle empty modes in find_preferred_mode() If the connector->modes list is empty, then list_first_entry() returns a bogus entry. Change that to use list_first_entry_or_null(). Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241130-hdmi-mode-valid-v5-1-742644ec3b1f@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit faf0ed487415f76fe4acf7980ce360901f5e1698 Author: Ard Biesheuvel <ardb@kernel.org> Date: Thu Dec 5 12:28:12 2024 +0100 x86/boot: Reject absolute references in .head.text The .head.text section used to contain asm code that bootstrapped the page tables and switched to the kernel virtual address space before executing C code. The asm code carefully avoided dereferencing absolute symbol references, as those will fault before the page tables are installed. Today, the .head.text section contains lots of C code too, and getting the compiler to reason about absolute addresses taken from, e.g., section markers such as _text[] or _end[] but never use such absolute references to access global variables [*] is intractible. So instead, forbid the use of absolute references in .head.text entirely, and rely on explicit arithmetic involving VA-to-PA offsets generated by the asm startup code to construct virtual addresses where needed (e.g., to construct the page tables). Note that the 'relocs' tool is only used on the core kernel image when building a relocatable image, but this is the default, and so adding the check there is sufficient to catch new occurrences of code that use absolute references before the kernel mapping is up. [*] it is feasible when using PIC codegen but there is strong pushback to using this for all of the core kernel, and using it only for .head.text is not straight-forward. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205112804.3416920-16-ardb+git@google.com arch/x86/tools/relocs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit a6a4ae9c3f3a8894c54476cc842069f82af8361c Author: Ard Biesheuvel <ardb@kernel.org> Date: Thu Dec 5 12:28:11 2024 +0100 x86/boot: Move .head.text into its own output section In order to be able to double check that vmlinux is emitted without absolute symbol references in .head.text, it needs to be distinguishable from the rest of .text in the ELF metadata. So move .head.text into its own ELF section. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205112804.3416920-15-ardb+git@google.com arch/x86/kernel/vmlinux.lds.S | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 35350eb689e68897d996b762832782e2e791eb74 Author: Ard Biesheuvel <ardb@kernel.org> Date: Thu Dec 5 12:28:10 2024 +0100 x86/kernel: Move ENTRY_TEXT to the start of the image Since commit: 7734a0f31e99 ("x86/boot: Robustify calling startup_{32,64}() from the decompressor code") it is no longer necessary for .head.text to appear at the start of the image. Since ENTRY_TEXT needs to appear PMD-aligned, it is easier to just place it at the start of the image, rather than line it up with the end of the .text section. The amount of padding required should be the same, but this arrangement also permits .head.text to be split off and emitted separately, which is needed by a subsequent change. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205112804.3416920-14-ardb+git@google.com arch/x86/kernel/vmlinux.lds.S | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 3b6f99a94b04b389292590840d96342b7dd08941 Author: Ard Biesheuvel <ardb@kernel.org> Date: Thu Dec 5 12:28:09 2024 +0100 x86/boot: Disable UBSAN in early boot code The early boot code runs from a 1:1 mapping of memory, and may execute before the kernel virtual mapping is even up. This means absolute symbol references cannot be permitted in this code. UBSAN injects references to global data structures into the code, and without -fPIC, those references are emitted as absolute references to kernel virtual addresses. Accessing those will fault before the kernel virtual mapping is up, so UBSAN needs to be disabled in early boot code. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205112804.3416920-13-ardb+git@google.com arch/x86/coco/sev/shared.c | 7 ++++--- arch/x86/include/asm/init.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) commit 0d9b9a328cb605419ed046d341dc2a3d66ee0256 Author: Ard Biesheuvel <ardb@kernel.org> Date: Thu Dec 5 12:28:08 2024 +0100 x86/boot/64: Avoid intentional absolute symbol references in .head.text The code in .head.text executes from a 1:1 mapping and cannot generally refer to global variables using their kernel virtual addresses. However, there are some occurrences of such references that are valid: the kernel virtual addresses of _text and _end are needed to populate the page tables correctly, and some other section markers are used in a similar way. To avoid the need for making exceptions to the rule that .head.text must not contain any absolute symbol references, derive these addresses from the RIP-relative 1:1 mapped physical addresses, which can be safely determined using RIP_REL_REF(). Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205112804.3416920-12-ardb+git@google.com arch/x86/kernel/head64.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 093562198e1a6360672954293753f4c6cb9a3316 Author: Ard Biesheuvel <ardb@kernel.org> Date: Thu Dec 5 12:28:07 2024 +0100 x86/boot/64: Determine VA/PA offset before entering C code Implicit absolute symbol references (e.g., taking the address of a global variable) must be avoided in the C code that runs from the early 1:1 mapping of the kernel, given that this is a practice that violates assumptions on the part of the toolchain. I.e., RIP-relative and absolute references are expected to produce the same values, and so the compiler is free to choose either. However, the code currently assumes that RIP-relative references are never emitted here. So an explicit virtual-to-physical offset needs to be used instead to derive the kernel virtual addresses of _text and _end, instead of simply taking the addresses and assuming that the compiler will not choose to use a RIP-relative references in this particular case. Currently, phys_base is already used to perform such calculations, but it is derived from the kernel virtual address of _text, which is taken using an implicit absolute symbol reference. So instead, derive this VA-to-PA offset in asm code, and pass it to the C startup code. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205112804.3416920-11-ardb+git@google.com arch/x86/include/asm/setup.h | 2 +- arch/x86/kernel/head64.c | 8 +++++--- arch/x86/kernel/head_64.S | 12 +++++++++--- 3 files changed, 15 insertions(+), 7 deletions(-) commit 09d35045cd0f4265cf1dfe18ef83285fdc294688 Author: Ard Biesheuvel <ardb@kernel.org> Date: Thu Dec 5 12:28:06 2024 +0100 x86/sev: Avoid WARN()s and panic()s in early boot code Using WARN() or panic() while executing from the early 1:1 mapping is unlikely to do anything useful: the string literals are passed using their kernel virtual addresses which are not even mapped yet. But even if they were, calling into the printk() machinery from the early 1:1 mapped code is not going to get very far. So drop the WARN()s entirely, and replace panic() with a deadloop. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20241205112804.3416920-10-ardb+git@google.com arch/x86/coco/sev/core.c | 15 +++++---------- arch/x86/coco/sev/shared.c | 9 +++++---- 2 files changed, 10 insertions(+), 14 deletions(-) commit 26a4dedc5f3cdb6e2de79371f57d12e5119f03c1 Author: Rosen Penev <rosenp@gmail.com> Date: Tue Dec 3 15:33:54 2024 -0800 gpio: twl4030: use gpiochip_get_data We can pass the pointer in probe to gpiochip_add_data instead of using dev_get_drvdata. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://lore.kernel.org/r/20241203233354.184404-1-rosenp@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> drivers/gpio/gpio-twl6040.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cec785a7f25d9ebe3a151ddc4f3a4ede7fc0dab0 Author: Michal Pecio <michal.pecio@gmail.com> Date: Wed Dec 4 21:44:43 2024 +0100 ARM: tegra: nyan: Maintain power to USB ports on boot USB ports are turned on by the firmware as it looks for disks to boot, ensure that they aren't power cycled before the xHCI driver comes up. This enables USB devices to be ready for use faster and reduces wear and risk of data loss on storage devices. A particularly annoying case was booting from a mechanical disk, which takes time to spin up again. Vendor kernel also kept these ports powered, and by the same means. Signed-off-by: Michal Pecio <michal.pecio@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com> arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit cb7595225ab725db4a0cf24981d1d12882fd65e7 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Mon Nov 18 08:29:01 2024 +0100 PM: sleep: sysfs: don't include 'pm_wakeup.h' directly The header clearly states that it does not want to be included directly, only via 'device.h'. 'platform_device.h' works equally well. Remove the direct inclusion. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://patch.msgid.link/20241118072917.3853-3-wsa+renesas@sang-engineering.com [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/base/power/sysfs.c | 1 - 1 file changed, 1 deletion(-) commit d6482311efa063da6d01c3c0cd57df81e743a480 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Mon Nov 18 08:29:14 2024 +0100 PM: sleep: autosleep: don't include 'pm_wakeup.h' directly The header clearly states that it does not want to be included directly, only via 'device.h'. 'platform_device.h' works equally well. Remove the direct inclusion. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://patch.msgid.link/20241118072917.3853-16-wsa+renesas@sang-engineering.com [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> kernel/power/autosleep.c | 1 - 1 file changed, 1 deletion(-) commit 6e47c6e737082110386aaad6f7a6984193b29966 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Wed Dec 4 14:02:04 2024 +0100 PM: sleep: Update stale comment in device_resume() There is no function called __device_suspend() any more and it is still mentioned in a comment in device_resume(), so update that comment. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/2787627.mvXUDI8C0e@rjwysocki.net drivers/base/power/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 751df73d825b3f7e6cad42ed333c28096635784d Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Fri Sep 27 14:42:23 2024 +0200 arm64: dts: uniphier: Switch to hp-det-gpios Replace the deprecated "hp-det-gpio" property by "hp-det-gpios" in Audio Graph Card device nodes. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/b14b8512181c2a3b0744698e8a21b4e16451d7b3.1727438777.git.geert+renesas@glider.be Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts | 2 +- arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 62f95d8a4920706e94759a8f5e34677528530cf1 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Fri Sep 27 14:42:18 2024 +0200 ARM: dts: marvell: mmp2-olpc-xo-1-75: Switch to {hp,mic}-det-gpios Replace the deprecated "hp-det-gpio" and "mic-det-gpio" properties by "hp-det-gpios" resp. "mic-det-gpios" in Audio Graph Card device nodes. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/7b4d7d735189fb346175a95e29db33f01c8cf93d.1727438777.git.geert+renesas@glider.be Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm/boot/dts/marvell/mmp2-olpc-xo-1-75.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cb2e1c2136f71618142557ceca3a8802e87a44cd Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Dec 4 16:31:12 2024 +0200 drm: remove driver date from struct drm_driver and all drivers We stopped using the driver initialized date in commit 7fb8af6798e8 ("drm: deprecate driver date") and (eventually) started returning "0" for drm_version ioctl instead. Finish the job, and remove the unused date member from struct drm_driver, its initialization from drivers, along with the common DRIVER_DATE macros. v2: Also update drivers/accel (kernel test robot) Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Simon Ser <contact@emersion.fr> Acked-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Acked-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # msm Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/1f2bf2543aed270a06f6c707fd6ed1b78bf16712.1733322525.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/accel/habanalabs/common/habanalabs_drv.c | 1 - drivers/accel/ivpu/ivpu_drv.c | 1 - drivers/accel/qaic/qaic_drv.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.h | 1 - drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 1 - drivers/gpu/drm/arm/hdlcd_drv.c | 1 - drivers/gpu/drm/arm/malidp_drv.c | 1 - drivers/gpu/drm/armada/armada_drv.c | 1 - drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 1 - drivers/gpu/drm/ast/ast_drv.c | 1 - drivers/gpu/drm/ast/ast_drv.h | 1 - drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 1 - drivers/gpu/drm/etnaviv/etnaviv_drv.c | 1 - drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 -- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 - drivers/gpu/drm/gma500/psb_drv.c | 1 - drivers/gpu/drm/gma500/psb_drv.h | 1 - drivers/gpu/drm/gud/gud_drv.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 1 - drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 - drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 2 -- drivers/gpu/drm/i915/i915_driver.c | 1 - drivers/gpu/drm/i915/i915_driver.h | 1 - drivers/gpu/drm/i915/i915_gpu_error.c | 1 - drivers/gpu/drm/imagination/pvr_drv.c | 1 - drivers/gpu/drm/imagination/pvr_drv.h | 1 - drivers/gpu/drm/imx/dcss/dcss-kms.c | 1 - drivers/gpu/drm/imx/ipuv3/imx-drm-core.c | 1 - drivers/gpu/drm/imx/lcdc/imx-lcdc.c | 1 - drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 1 - drivers/gpu/drm/kmb/kmb_drv.c | 1 - drivers/gpu/drm/kmb/kmb_drv.h | 1 - drivers/gpu/drm/lima/lima_drv.c | 1 - drivers/gpu/drm/logicvc/logicvc_drm.c | 1 - drivers/gpu/drm/loongson/lsdc_drv.c | 2 -- drivers/gpu/drm/mcde/mcde_drv.c | 1 - drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 -- drivers/gpu/drm/meson/meson_drv.c | 1 - drivers/gpu/drm/mgag200/mgag200_drv.c | 1 - drivers/gpu/drm/mgag200/mgag200_drv.h | 1 - drivers/gpu/drm/msm/msm_drv.c | 1 - drivers/gpu/drm/mxsfb/lcdif_drv.c | 1 - drivers/gpu/drm/mxsfb/mxsfb_drv.c | 1 - drivers/gpu/drm/nouveau/nouveau_drm.c | 5 ----- drivers/gpu/drm/nouveau/nouveau_drv.h | 1 - drivers/gpu/drm/omapdrm/omap_drv.c | 2 -- drivers/gpu/drm/panfrost/panfrost_drv.c | 1 - drivers/gpu/drm/panthor/panthor_drv.c | 1 - drivers/gpu/drm/pl111/pl111_drv.c | 1 - drivers/gpu/drm/qxl/qxl_drv.c | 1 - drivers/gpu/drm/qxl/qxl_drv.h | 1 - drivers/gpu/drm/radeon/radeon_drv.c | 1 - drivers/gpu/drm/radeon/radeon_drv.h | 1 - drivers/gpu/drm/renesas/rcar-du/rcar_du_drv.c | 1 - drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c | 1 - drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 1 - drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 -- drivers/gpu/drm/solomon/ssd130x.c | 2 -- drivers/gpu/drm/sprd/sprd_drm.c | 2 -- drivers/gpu/drm/sti/sti_drv.c | 2 -- drivers/gpu/drm/stm/drv.c | 1 - drivers/gpu/drm/sun4i/sun4i_drv.c | 1 - drivers/gpu/drm/tegra/drm.c | 2 -- drivers/gpu/drm/tidss/tidss_drv.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_drv.c | 1 - drivers/gpu/drm/tiny/arcpgu.c | 1 - drivers/gpu/drm/tiny/bochs.c | 1 - drivers/gpu/drm/tiny/cirrus-qemu.c | 2 -- drivers/gpu/drm/tiny/gm12u320.c | 2 -- drivers/gpu/drm/tiny/hx8357d.c | 1 - drivers/gpu/drm/tiny/ili9163.c | 1 - drivers/gpu/drm/tiny/ili9225.c | 1 - drivers/gpu/drm/tiny/ili9341.c | 1 - drivers/gpu/drm/tiny/ili9486.c | 1 - drivers/gpu/drm/tiny/mi0283qt.c | 1 - drivers/gpu/drm/tiny/ofdrm.c | 2 -- drivers/gpu/drm/tiny/panel-mipi-dbi.c | 1 - drivers/gpu/drm/tiny/repaper.c | 1 - drivers/gpu/drm/tiny/sharp-memory.c | 1 - drivers/gpu/drm/tiny/simpledrm.c | 2 -- drivers/gpu/drm/tiny/st7586.c | 1 - drivers/gpu/drm/tiny/st7735r.c | 1 - drivers/gpu/drm/tve200/tve200_drv.c | 1 - drivers/gpu/drm/udl/udl_drv.c | 1 - drivers/gpu/drm/udl/udl_drv.h | 1 - drivers/gpu/drm/v3d/v3d_drv.c | 2 -- drivers/gpu/drm/vboxvideo/vbox_drv.c | 1 - drivers/gpu/drm/vboxvideo/vbox_drv.h | 1 - drivers/gpu/drm/vc4/vc4_drv.c | 3 --- drivers/gpu/drm/vgem/vgem_drv.c | 2 -- drivers/gpu/drm/virtio/virtgpu_drv.c | 1 - drivers/gpu/drm/virtio/virtgpu_drv.h | 1 - drivers/gpu/drm/vkms/vkms_drv.c | 2 -- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 1 - drivers/gpu/drm/xe/xe_device.c | 1 - drivers/gpu/drm/xe/xe_drv.h | 1 - drivers/gpu/drm/xen/xen_drm_front.c | 1 - drivers/gpu/drm/xlnx/zynqmp_kms.c | 1 - include/drm/drm_drv.h | 2 -- 101 files changed, 126 deletions(-) commit 75bfd8db89020e105daef8cd07135e94cf72fa56 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Dec 4 16:31:11 2024 +0200 accel/ivpu: remove DRIVER_DATE conditional drm_driver init The ivpu struct drm_driver has conditional initialization based on #ifdef DRIVER_DATE, which is never defined anywhere. Neither are the macros referenced within the block: DRIVER_DATE, DRIVER_MAJOR, DRIVER_MINOR, and DRIVER_PATCHLEVEL. With the struct drm_driver date member going away anyway, just remove the conditional compilation. Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/0e4276552dde66dcdd275740cbc63d232cefd8f4.1733322525.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/accel/ivpu/ivpu_drv.c | 7 ------- 1 file changed, 7 deletions(-) commit 23e08dc09efade5cda2aa548b02ec5e7688ca94e Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Dec 4 16:31:10 2024 +0200 drm/xen: remove redundant initialization info print drm_dev_register() already prints the same information on successful init. Remove the redundant prints. Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> Acked-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Acked-by: Simon Ser <contact@emersion.fr> Link: https://patchwork.freedesktop.org/patch/msgid/900b3836c80a23923ede034ab10eb344be1e35bd.1733322525.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/xen/xen_drm_front.c | 5 ----- 1 file changed, 5 deletions(-) commit 49f4ad82f031ac390ea4571a5bf7d58ee27ce4f2 Author: Stanislav Jakubek <stano.jakubek@gmail.com> Date: Wed Nov 6 20:05:59 2024 +0100 arm64: dts: sprd: sc9863a: reorder clocks, clock-names per bindings DT bindings expect the SC9863A clock-controller clocks/clock-names to be in a specific order, reorder them. Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> Link: https://lore.kernel.org/r/d235438fbbd53c28b63cada2cf7e1234c120355e.1730918663.git.stano.jakubek@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/sprd/sc9863a.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a34907f484949e3a550a54a19d71e8616d812d7e Author: Stanislav Jakubek <stano.jakubek@gmail.com> Date: Wed Nov 6 20:05:52 2024 +0100 arm64: dts: sprd: sc9863a: fix in-ports property This property is called "in-ports", not "in-port", fix it. Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> Link: https://lore.kernel.org/r/5318a47282b8c15a3135fd12dacedb8aa70592e2.1730918663.git.stano.jakubek@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/sprd/sc9863a.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec87fd9f66bb8196ce4c80b6f9a02a8fdb452821 Author: Stanislav Jakubek <stano.jakubek@gmail.com> Date: Wed Nov 6 20:05:45 2024 +0100 arm64: dts: sprd: sc2731: move fuel-gauge monitored-battery to device DTS The monitored-battery property is a property of the board, not the PMIC. Move this property to the DTS of its only user, sp9860g-1h10. While at it, disable the fuel-gauge node by default and enable it only for its users, as it requires board-specific properties to work correctly. Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> Link: https://lore.kernel.org/r/2959aa8567afbef17337829072adce01158f00bb.1730918663.git.stano.jakubek@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/sprd/sc2731.dtsi | 4 ++-- arch/arm64/boot/dts/sprd/sp9860g-1h10.dts | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit e864e215ce2197cd5d5c0e9229b4bb83379a5186 Author: Stanislav Jakubek <stano.jakubek@gmail.com> Date: Wed Nov 6 20:05:37 2024 +0100 arm64: dts: sprd: sp9860g-1h10: fix factory-internal-resistance-micro-ohms property As per DT bindings, this property was missing the "factory-" prefix. Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> Link: https://lore.kernel.org/r/30d7ad167400764b6fe37f63276c07d3e30d931d.1730918663.git.stano.jakubek@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/sprd/sp9860g-1h10.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 367d31471c3272b87a7e842355b2aa4bc688add8 Author: Stanislav Jakubek <stano.jakubek@gmail.com> Date: Wed Nov 6 20:05:29 2024 +0100 arm64: dts: sprd: sp9860g-1h10: fix constant-charge-voltage-max-microvolt property This property has hyphens/dashes, not underscores. Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/aa557091d9494fdaa3eda75803f9ea97014c8832.1730918663.git.stano.jakubek@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/sprd/sp9860g-1h10.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02ba194feacb994d6ed8dd60550a2dcf213e256d Author: David Jander <david@protonic.nl> Date: Tue Dec 3 11:38:37 2024 +0100 mtd: mchp48l640: add support for Fujitsu MB85RS128TY FRAM The Fujitsu FRAM chips use the same command set as Microchip EERAM. The only differences are that the Fujitsu FRAM chips don't really have a page size limit, nor do they automatically reset the WEL bit. Signed-off-by: David Jander <david@protonic.nl> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Jonas Rebmann <jre@pengutronix.de> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/devices/mchp48l640.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 5b68d4d2db29fba81adef44513f31731e06f5589 Author: Jonas Rebmann <jre@pengutronix.de> Date: Tue Dec 3 11:38:36 2024 +0100 dt-bindings: mtd: mchp48l640 add mb85rs128ty compatible Add a compatible string to support Fujitsu MB85RS128TY. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Jonas Rebmann <jre@pengutronix.de> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5dbc889d41b175aa7b9c7c49a48c11a047f6074d Author: David Jander <david@protonic.nl> Date: Tue Dec 3 11:38:35 2024 +0100 mtd: mchp48l640: make WEL behaviour configurable The 48L640 resets the WEL bit (the Write Enable Latch bit in the status register) to zero on the completion of write operations. In preparation to support chips behaving differently, introduce .auto_disable_wel capability, and, if it's missing, explicitly reset the WEL bit after writes. Signed-off-by: David Jander <david@protonic.nl> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Jonas Rebmann <jre@pengutronix.de> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/devices/mchp48l640.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit da4fa00abe5674d3d165cfd8032c740e8aab4d3b Merge: 152d00a91396 985ec6f5e623 Author: Paolo Abeni <pabeni@redhat.com> Date: Thu Dec 5 11:15:59 2024 +0100 Merge branch 'mitigate-the-two-reallocations-issue-for-iptunnels' Justin Iurman says: ==================== Mitigate the two-reallocations issue for iptunnels RESEND v5: - v5 was sent just when net-next closed v5: - address Paolo's comments - s/int dst_dev_overhead()/unsigned int dst_dev_overhead()/ v4: - move static inline function to include/net/dst.h v3: - fix compilation error in seg6_iptunnel v2: - add missing "static" keywords in seg6_iptunnel - use a static-inline function to return the dev overhead (as suggested by Olek, thanks) The same pattern is found in ioam6, rpl6, and seg6. Basically, it first makes sure there is enough room for inserting a new header: (1) err = skb_cow_head(skb, len + skb->mac_len); Then, when the insertion (encap or inline) is performed, the input and output handlers respectively make sure there is enough room for layer 2: (2) err = skb_cow_head(skb, LL_RESERVED_SPACE(dst->dev)); skb_cow_head() does nothing when there is enough room. Otherwise, it reallocates more room, which depends on the architecture. Briefly, skb_cow_head() calls __skb_cow() which then calls pskb_expand_head() as follows: pskb_expand_head(skb, ALIGN(delta, NET_SKB_PAD), 0, GFP_ATOMIC); "delta" represents the number of bytes to be added. This value is aligned with NET_SKB_PAD, which is defined as follows: NET_SKB_PAD = max(32, L1_CACHE_BYTES) ... where L1_CACHE_BYTES also depends on the architecture. In our case (x86), it is defined as follows: L1_CACHE_BYTES = (1 << CONFIG_X86_L1_CACHE_SHIFT) ... where (again, in our case) CONFIG_X86_L1_CACHE_SHIFT equals 6 (=X86_GENERIC). All this to say, skb_cow_head() would reallocate to the next multiple of NET_SKB_PAD (in our case a 64-byte multiple) when there is not enough room. Back to the main issue with the pattern: in some cases, two reallocations are triggered, resulting in a performance drop (i.e., lines (1) and (2) would both trigger an implicit reallocation). How's that possible? Well, this is kind of bad luck as we hit an exact NET_SKB_PAD boundary and when skb->mac_len (=14) is smaller than LL_RESERVED_SPACE(dst->dev) (=16 in our case). For an x86 arch, it happens in the following cases (with the default needed_headroom): - ioam6: - (inline mode) pre-allocated data trace of 236 or 240 bytes - (encap mode) pre-allocated data trace of 196 or 200 bytes - seg6: - (encap mode) for 13, 17, 21, 25, 29, 33, ...(+4)... prefixes Let's illustrate the problem, i.e., when we fall on the exact NET_SKB_PAD boundary. In the case of ioam6, for the above problematic values, the total overhead is 256 bytes for both modes. Based on line (1), skb->mac_len (=14) is added, therefore passing 270 bytes to skb_cow_head(). At that moment, the headroom has 206 bytes available (in our case). Since 270 > 206, skb_cow_head() performs a reallocation and the new headroom is now 206 + 64 (NET_SKB_PAD) = 270. Which is exactly the room we needed. After the insertion, the headroom has 0 byte available. But, there's line (2) where 16 bytes are still needed. Which, again, triggers another reallocation. The same logic is applied to seg6 (although it does not happen with the inline mode, i.e., -40 bytes). It happens with other L1 cache shifts too (the larger the cache shift, the less often it happens). For example, with a +32 cache shift (instead of +64), the following number of segments would trigger two reallocations: 11, 15, 19, ... With a +128 cache shift, the following number of segments would trigger two reallocations: 17, 25, 33, ... And so on and so forth. Note that it is the same for both the "encap" and "l2encap" modes. For the "encap.red" and "l2encap.red" modes, it is the same logic but with "segs+1" (e.g., 14, 18, 22, 26, etc for a +64 cache shift). Note also that it may happen with rpl6 (based on some calculations), although it did not in our case. This series provides a solution to mitigate the aforementioned issue for ioam6, seg6, and rpl6. It provides the dst_entry (in the cache) to skb_cow_head() **before** the insertion (line (1)). As a result, the very first iteration would still trigger two reallocations (i.e., empty cache), while next iterations would only trigger a single reallocation. ==================== Link: https://patch.msgid.link/20241203124945.22508-1-justin.iurman@uliege.be Signed-off-by: Paolo Abeni <pabeni@redhat.com> commit 985ec6f5e6235242191370628acb73d7a9f0c0ea Author: Justin Iurman <justin.iurman@uliege.be> Date: Tue Dec 3 13:49:45 2024 +0100 net: ipv6: rpl_iptunnel: mitigate 2-realloc issue This patch mitigates the two-reallocations issue with rpl_iptunnel by providing the dst_entry (in the cache) to the first call to skb_cow_head(). As a result, the very first iteration would still trigger two reallocations (i.e., empty cache), while next iterations would only trigger a single reallocation. Performance tests before/after applying this patch, which clearly shows there is no impact (it even shows improvement): - before: https://ibb.co/nQJhqwc - after: https://ibb.co/4ZvW6wV Signed-off-by: Justin Iurman <justin.iurman@uliege.be> Cc: Alexander Aring <aahringo@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/ipv6/rpl_iptunnel.c | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) commit 40475b63761abb6f8fdef960d03228a08662c9c4 Author: Justin Iurman <justin.iurman@uliege.be> Date: Tue Dec 3 13:49:44 2024 +0100 net: ipv6: seg6_iptunnel: mitigate 2-realloc issue This patch mitigates the two-reallocations issue with seg6_iptunnel by providing the dst_entry (in the cache) to the first call to skb_cow_head(). As a result, the very first iteration would still trigger two reallocations (i.e., empty cache), while next iterations would only trigger a single reallocation. Performance tests before/after applying this patch, which clearly shows the improvement: - before: https://ibb.co/3Cg4sNH - after: https://ibb.co/8rQ350r Signed-off-by: Justin Iurman <justin.iurman@uliege.be> Cc: David Lebrun <dlebrun@google.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/ipv6/seg6_iptunnel.c | 85 +++++++++++++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 33 deletions(-) commit dce525185bc92864e5a318040285ee070563fe34 Author: Justin Iurman <justin.iurman@uliege.be> Date: Tue Dec 3 13:49:43 2024 +0100 net: ipv6: ioam6_iptunnel: mitigate 2-realloc issue This patch mitigates the two-reallocations issue with ioam6_iptunnel by providing the dst_entry (in the cache) to the first call to skb_cow_head(). As a result, the very first iteration may still trigger two reallocations (i.e., empty cache), while next iterations would only trigger a single reallocation. Performance tests before/after applying this patch, which clearly shows the improvement: - inline mode: - before: https://ibb.co/LhQ8V63 - after: https://ibb.co/x5YT2bS - encap mode: - before: https://ibb.co/3Cjm5m0 - after: https://ibb.co/TwpsxTC - encap mode with tunsrc: - before: https://ibb.co/Gpy9QPg - after: https://ibb.co/PW1bZFT This patch also fixes an incorrect behavior: after the insertion, the second call to skb_cow_head() makes sure that the dev has enough headroom in the skb for layer 2 and stuff. In that case, the "old" dst_entry was used, which is now fixed. After discussing with Paolo, it appears that both patches can be merged into a single one -this one- (for the sake of readability) and target net-next. Signed-off-by: Justin Iurman <justin.iurman@uliege.be> Signed-off-by: Paolo Abeni <pabeni@redhat.com> net/ipv6/ioam6_iptunnel.c | 73 ++++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 36 deletions(-) commit 0600cf40e9b36fe17f9c9f04d4f9cef249eaa5e7 Author: Justin Iurman <justin.iurman@uliege.be> Date: Tue Dec 3 13:49:42 2024 +0100 include: net: add static inline dst_dev_overhead() to dst.h Add static inline dst_dev_overhead() function to include/net/dst.h. This helper function is used by ioam6_iptunnel, rpl_iptunnel and seg6_iptunnel to get the dev's overhead based on a cache entry (dst_entry). If the cache is empty, the default and generic value skb->mac_len is returned. Otherwise, LL_RESERVED_SPACE() over dst's dev is returned. Signed-off-by: Justin Iurman <justin.iurman@uliege.be> Cc: Alexander Lobakin <aleksander.lobakin@intel.com> Cc: Vadim Fedorenko <vadim.fedorenko@linux.dev> Signed-off-by: Paolo Abeni <pabeni@redhat.com> include/net/dst.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1a50e3612de9187857f55ee14a573f7f8e7d4ebc Author: Takahiro Kuwano <Takahiro.Kuwano@infineon.com> Date: Tue Dec 3 11:46:50 2024 +0900 mtd: spinand: Add support for SkyHigh S35ML-3 family SkyHigh S35ML01G300, S35ML01G301, S35ML02G300, and S35ML04G300 are 1Gb, 2Gb, and 4Gb SLC SPI NAND flash family. This family of devices has on-die ECC which parity bits are stored to hidden area. In this family the on-die ECC cannot be disabled so raw access needs to be prevented. Link: https://www.skyhighmemory.com/download/SPI_S35ML01_04G3_002_19205.pdf?v=P Co-developed-by: KR Kim <kr.kim@skyhighmemory.com> Signed-off-by: KR Kim <kr.kim@skyhighmemory.com> Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/spi/Makefile | 2 +- drivers/mtd/nand/spi/core.c | 1 + drivers/mtd/nand/spi/skyhigh.c | 147 +++++++++++++++++++++++++++++++++++++++++ include/linux/mtd/spinand.h | 1 + 4 files changed, 150 insertions(+), 1 deletion(-) commit 6d9d6ab3a82af50e36e13e7bc8e2d1b970e39f79 Author: Takahiro Kuwano <Takahiro.Kuwano@infineon.com> Date: Tue Dec 3 11:46:49 2024 +0900 mtd: spinand: Introduce a way to avoid raw access SkyHigh spinand device has ECC enable bit in configuration register but it must be always enabled. If ECC is disabled, read and write ops results in undetermined state. For such devices, a way to avoid raw access is needed. Introduce SPINAND_NO_RAW_ACCESS flag to advertise the device does not support raw access. In such devices, the on-die ECC engine ops returns error to I/O request in raw mode. Checking and marking BBM need to be cared as special case, by adding fallback mechanism that tries read/write OOB with ECC enabled. Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/spi/core.c | 22 ++++++++++++++++++++-- include/linux/mtd/spinand.h | 1 + 2 files changed, 21 insertions(+), 2 deletions(-) commit c6858779f1f549442ec2fe2f69800d8e9cd904ce Author: Takahiro Kuwano <Takahiro.Kuwano@infineon.com> Date: Tue Dec 3 11:46:48 2024 +0900 mtd: spinand: Remove write_enable_op() in markbad() We don't have to call spinand_write_enable_op() in spinand_markbad() as it is called in spinand_write_page(). Fixes: b645ad39d568 ("mtd: spinand: Do not erase the block before writing a bad block marker") Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/spi/core.c | 4 ---- 1 file changed, 4 deletions(-) commit b3c782868ecebd0c1661a6aa2bdc84cd3cbb1ef3 Author: Takashi Iwai <tiwai@suse.de> Date: Thu Nov 14 16:44:41 2024 +0100 mtd: phram: Add the kernel lock down check The phram MTD driver may map any memory pages no matter whether it's reserved or whatever used for systems, which basically allows user bypassing the lock down. Add the check and abort the probe if the kernel is locked down for LOCKDOWN_DEV_MEM. Reported-by: Fabian Vogt <fvogt@suse.com> Suggested-by: Fabian Vogt <fvogt@suse.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Richard Weinberger <richard@nod.at> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/devices/phram.c | 5 +++++ 1 file changed, 5 insertions(+) commit 70a71f8151b9879b0950668ce3ad76263261fee0 Author: Ivan Stepchenko <sid@itb.spb.ru> Date: Thu Nov 14 16:29:51 2024 +0300 mtd: onenand: Fix uninitialized retlen in do_otp_read() The function do_otp_read() does not set the output parameter *retlen, which is expected to contain the number of bytes actually read. As a result, in onenand_otp_walk(), the tmp_retlen variable remains uninitialized after calling do_otp_walk() and used to change the values of the buf, len and retlen variables. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 49dc08eeda70 ("[MTD] [OneNAND] fix numerous races") Cc: stable@vger.kernel.org Signed-off-by: Ivan Stepchenko <sid@itb.spb.ru> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/onenand/onenand_base.c | 1 + 1 file changed, 1 insertion(+) commit ae461cde5c559675fc4c0ba351c7c31ace705f56 Author: Bohdan Chubuk <chbgdn@gmail.com> Date: Sun Nov 10 22:50:47 2024 +0200 mtd: spinand: add support for FORESEE F35SQA001G Add support for FORESEE F35SQA001G SPI NAND. Similar to F35SQA002G, but differs in capacity. Datasheet: - https://cdn.ozdisan.com/ETicaret_Dosya/704795_871495.pdf Tested on Xiaomi AX3000T flashed with OpenWRT. Signed-off-by: Bohdan Chubuk <chbgdn@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/spi/foresee.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 78a56df609460e8e708cb4500d624dc8a3732cfa Author: Colin Ian King <colin.i.king@gmail.com> Date: Wed Oct 30 17:21:49 2024 +0000 mtd: phram: only call platform_driver_unregister if phram_setup fails The check on ret and call to platform_driver_unregister is only required in the code path where MODULE is not defined. Fix this by moving this code into the relevant place after the call to phram_setup. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/devices/phram.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ef73c7dad4b14bf7365aa8629b0c73c4e3c3bcd1 Author: Marcus Folkesson <marcus.folkesson@gmail.com> Date: Thu Nov 7 14:47:07 2024 +0100 mtd: nand: davinci: add support for on-die ECC engine type Some chips, e.g. Micron MT29F1G08ABBFAH4, has a mandatory on-die ECC. Add "on-die" as ECC engine type in order to be compatible with those. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> drivers/mtd/nand/raw/davinci_nand.c | 4 ++++ 1 file changed, 4 insertions(+) commit e0a4f50fce154c88c158562a1cee2c8b851c4e38 Author: Marcus Folkesson <marcus.folkesson@gmail.com> Date: Thu Nov 7 14:47:08 2024 +0100 dt-bindings: mtd: davinci: convert to yaml Convert the bindings to yaml format. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> .../devicetree/bindings/mtd/davinci-nand.txt | 94 ---------------- .../devicetree/bindings/mtd/ti,davinci-nand.yaml | 124 +++++++++++++++++++++ 2 files changed, 124 insertions(+), 94 deletions(-) commit f09ed834a946f9c77088d53af4d4806974728d7b Author: Cosmin Ratiu <cratiu@nvidia.com> Date: Thu Dec 5 00:09:24 2024 +0200 net/mlx5: qos: Add ifc support for cross-esw scheduling This adds the capability bit and the vport element fields related to cross-esw scheduling. Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241204220931.254964-5-tariqt@nvidia.com Signed-off-by: Leon Romanovsky <leon@kernel.org> include/linux/mlx5/mlx5_ifc.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 03713108e0cccf325bb71941edd9ed6122142907 Author: Carolina Jubran <cjubran@nvidia.com> Date: Thu Dec 5 00:09:23 2024 +0200 net/mlx5: Add support for new scheduling elements Introduce new scheduling elements in the E-Switch QoS hierarchy to enhance traffic management capabilities. This patch adds support for: - Rate Limit scheduling elements: Enables bandwidth limitation across multiple nodes without a shared ancestor, providing a mechanism for more granular control of bandwidth allocation. - Traffic Class Transmit Scheduling Arbiter (TSAR): Introduces the infrastructure for creating Traffic Class TSARs, allowing hierarchical arbitration based on traffic classes. - Traffic Class Arbiter TSAR: Adds support for a TSAR capable of managing arbitration between multiple traffic classes, enabling improved bandwidth prioritization and traffic management. No functional changes are introduced in this patch. Signed-off-by: Carolina Jubran <cjubran@nvidia.com> Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241204220931.254964-4-tariqt@nvidia.com Signed-off-by: Leon Romanovsky <leon@kernel.org> drivers/net/ethernet/mellanox/mlx5/core/rl.c | 4 ++++ include/linux/mlx5/mlx5_ifc.h | 14 +++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) commit e799ac9dd3c485a7cda3586f2a12784b030b9df0 Author: Yevgeny Kliteynik <kliteyn@nvidia.com> Date: Thu Dec 5 00:09:22 2024 +0200 net/mlx5: Add ConnectX-8 device to ifc In preparation for ConnectX-8 SWS support, add enum for the new device type. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241204220931.254964-3-tariqt@nvidia.com Signed-off-by: Leon Romanovsky <leon@kernel.org> include/linux/mlx5/mlx5_ifc.h | 1 + 1 file changed, 1 insertion(+) commit f9a5b34f9251cf530fecf08ef039be64ead8c459 Author: Cosmin Ratiu <cratiu@nvidia.com> Date: Thu Dec 5 00:09:21 2024 +0200 net/mlx5: ifc: Reorganize mlx5_ifc_flow_table_context_bits The nested union at the end is not in the same style as the rest of the code, so un-nest it to make the style uniformly applied again. Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241204220931.254964-2-tariqt@nvidia.com Signed-off-by: Leon Romanovsky <leon@kernel.org> include/linux/mlx5/mlx5_ifc.h | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit ed58b186c7737bf0db1ebf57207b30fe740e1d07 Author: Christian Hopps <chopps@labn.net> Date: Thu Nov 14 02:07:12 2024 -0500 xfrm: iptfs: add tracepoint functionality Add tracepoints to the IP-TFS code. Signed-off-by: Christian Hopps <chopps@labn.net> Tested-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> net/xfrm/trace_iptfs.h | 218 +++++++++++++++++++++++++++++++++++++++++++++++++ net/xfrm/xfrm_iptfs.c | 71 +++++++++++++++- 2 files changed, 288 insertions(+), 1 deletion(-) commit 6be02e3e4f376fea468846c8562655ca5ee18204 Author: Christian Hopps <chopps@labn.net> Date: Thu Nov 14 02:07:11 2024 -0500 xfrm: iptfs: handle reordering of received packets Handle the receipt of the outer tunnel packets out-of-order. Pointers to the out-of-order packets are saved in a window (array) awaiting needed prior packets. When the required prior packets are received the now in-order packets are then passed on to the regular packet receive code. A timer is used to consider missing earlier packet as lost so the algorithm will advance. Signed-off-by: Christian Hopps <chopps@labn.net> Tested-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> net/xfrm/xfrm_iptfs.c | 497 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 484 insertions(+), 13 deletions(-) commit 5f2b6a9095743a6bf1f34c43c4fe78fa8bdf5ad7 Author: Christian Hopps <chopps@labn.net> Date: Thu Nov 14 02:07:10 2024 -0500 xfrm: iptfs: add skb-fragment sharing code Avoid copying the inner packet data by sharing the skb data fragments from the output packet skb into new inner packet skb. Signed-off-by: Christian Hopps <chopps@labn.net> Tested-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> net/xfrm/xfrm_iptfs.c | 296 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 290 insertions(+), 6 deletions(-) commit 3f3339885fb343b7b42d7c34717108ce07da24ae Author: Christian Hopps <chopps@labn.net> Date: Thu Nov 14 02:07:09 2024 -0500 xfrm: iptfs: add reusing received skb for the tunnel egress packet Add an optimization of re-using the tunnel outer skb re-transmission of the inner packet to avoid skb allocation and copy. Signed-off-by: Christian Hopps <chopps@labn.net> Tested-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> net/xfrm/xfrm_iptfs.c | 123 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 108 insertions(+), 15 deletions(-) commit 07569476544681816335099929ff3494dfbf6b05 Author: Christian Hopps <chopps@labn.net> Date: Thu Nov 14 02:07:08 2024 -0500 xfrm: iptfs: handle received fragmented inner packets Add support for handling receipt of partial inner packets that have been fragmented across multiple outer IP-TFS tunnel packets. Signed-off-by: Christian Hopps <chopps@labn.net> Tested-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> net/xfrm/xfrm_iptfs.c | 480 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 461 insertions(+), 19 deletions(-) commit 6c82d2433671819a550227bf65bfb6043e3d3305 Author: Christian Hopps <chopps@labn.net> Date: Thu Nov 14 02:07:07 2024 -0500 xfrm: iptfs: add basic receive packet (tunnel egress) handling Add handling of packets received from the tunnel. This implements tunnel egress functionality. Signed-off-by: Christian Hopps <chopps@labn.net> Tested-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> net/xfrm/xfrm_iptfs.c | 276 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 276 insertions(+) commit 8579d342ea2b3c1c672858de180152ccf9cb0ee1 Author: Christian Hopps <chopps@labn.net> Date: Thu Nov 14 02:07:06 2024 -0500 xfrm: iptfs: add fragmenting of larger than MTU user packets Add support for tunneling user (inner) packets that are larger than the tunnel's path MTU (outer) using IP-TFS fragmentation. Signed-off-by: Christian Hopps <chopps@labn.net> Tested-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> net/xfrm/xfrm_iptfs.c | 343 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 315 insertions(+), 28 deletions(-) commit b96ba312e21c9b7ac1526829b9640ddc06695c0b Author: Christian Hopps <chopps@labn.net> Date: Thu Nov 14 02:07:05 2024 -0500 xfrm: iptfs: share page fragments of inner packets When possible rather than appending secondary (aggregated) inner packets to the fragment list, share their page fragments with the outer IPTFS packet. This allows for more efficient packet transmission. Signed-off-by: Christian Hopps <chopps@labn.net> Tested-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> net/xfrm/xfrm_iptfs.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 77 insertions(+), 8 deletions(-) commit 0e4fbf013fa566f274ce9b4ce698c75b1f998c52 Author: Christian Hopps <chopps@labn.net> Date: Thu Nov 14 02:07:04 2024 -0500 xfrm: iptfs: add user packet (tunnel ingress) handling Add tunnel packet output functionality. This is code handles the ingress to the tunnel. Signed-off-by: Christian Hopps <chopps@labn.net> Tested-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> net/xfrm/xfrm_iptfs.c | 563 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 560 insertions(+), 3 deletions(-) commit 4b3faf610cc63bfac972711635eafbca5e7d7117 Author: Christian Hopps <chopps@labn.net> Date: Thu Nov 14 02:07:03 2024 -0500 xfrm: iptfs: add new iptfs xfrm mode impl Add a new xfrm mode implementing AggFrag/IP-TFS from RFC9347. This utilizes the new xfrm_mode_cbs to implement demand-driven IP-TFS functionality. This functionality can be used to increase bandwidth utilization through small packet aggregation, as well as help solve PMTU issues through it's efficient use of fragmentation. Link: https://www.rfc-editor.org/rfc/rfc9347.txt Multiple commits follow to build the functionality into xfrm_iptfs.c Signed-off-by: Christian Hopps <chopps@labn.net> Tested-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> net/xfrm/Makefile | 1 + net/xfrm/xfrm_iptfs.c | 216 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 217 insertions(+) commit d1716d5a44c37e5743bf6ea4e5cdbdab37727f27 Author: Christian Hopps <chopps@labn.net> Date: Thu Nov 14 02:07:02 2024 -0500 xfrm: add generic iptfs defines and functionality Define `XFRM_MODE_IPTFS` and `IPSEC_MODE_IPTFS` constants, and add these to switch case and conditionals adjacent with the existing TUNNEL modes. Signed-off-by: Christian Hopps <chopps@labn.net> Tested-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> include/net/xfrm.h | 1 + include/uapi/linux/ipsec.h | 3 ++- include/uapi/linux/snmp.h | 2 ++ net/ipv4/esp4.c | 3 ++- net/ipv6/esp6.c | 3 ++- net/netfilter/nft_xfrm.c | 3 ++- net/xfrm/xfrm_device.c | 1 + net/xfrm/xfrm_output.c | 4 ++++ net/xfrm/xfrm_policy.c | 8 ++++++-- net/xfrm/xfrm_proc.c | 2 ++ net/xfrm/xfrm_state.c | 12 ++++++++++++ net/xfrm/xfrm_user.c | 12 ++++++++++++ 12 files changed, 48 insertions(+), 6 deletions(-) commit 7ac64f4598b4daa3f955f82759760666e047bdf8 Author: Christian Hopps <chopps@labn.net> Date: Thu Nov 14 02:07:01 2024 -0500 xfrm: add mode_cbs module functionality Add a set of callbacks xfrm_mode_cbs to xfrm_state. These callbacks enable the addition of new xfrm modes, such as IP-TFS to be defined in modules. Signed-off-by: Christian Hopps <chopps@labn.net> Tested-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> include/net/xfrm.h | 43 ++++++++++++++++++++++++++++++ net/xfrm/xfrm_device.c | 3 ++- net/xfrm/xfrm_input.c | 18 +++++++++++-- net/xfrm/xfrm_output.c | 2 ++ net/xfrm/xfrm_policy.c | 18 ++++++++----- net/xfrm/xfrm_state.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ net/xfrm/xfrm_user.c | 13 +++++++++ 7 files changed, 159 insertions(+), 10 deletions(-) commit f69eb4f65c58f5a081dbafb76011dad73757420c Author: Christian Hopps <chopps@labn.net> Date: Thu Nov 14 02:07:00 2024 -0500 xfrm: netlink: add config (netlink) options Add netlink options for configuring IP-TFS SAs. Signed-off-by: Christian Hopps <chopps@labn.net> Tested-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> include/uapi/linux/xfrm.h | 9 +++++++- net/xfrm/xfrm_compat.c | 10 +++++++-- net/xfrm/xfrm_user.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 3 deletions(-) commit 64e844505bc08cde3f346f193cbbbab0096fef54 Author: Christian Hopps <chopps@labn.net> Date: Thu Nov 14 02:06:59 2024 -0500 include: uapi: protocol number and packet structs for AGGFRAG in ESP Add the RFC assigned IP protocol number for AGGFRAG. Add the on-wire basic and congestion-control IP-TFS packet headers. Signed-off-by: Christian Hopps <chopps@labn.net> Tested-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> include/uapi/linux/in.h | 2 ++ include/uapi/linux/ip.h | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) commit ffa794846bf777a06407d94ef69b9b1c5ac5a6c6 Author: Christian Hopps <chopps@labn.net> Date: Thu Nov 14 02:06:58 2024 -0500 xfrm: config: add CONFIG_XFRM_IPTFS Add new Kconfig option to enable IP-TFS (RFC9347) functionality. Signed-off-by: Christian Hopps <chopps@labn.net> Tested-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> net/xfrm/Kconfig | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e952837f3ddb0ff726d5b582aa1aad9aa38d024d Author: Florian Westphal <fw@strlen.de> Date: Thu Nov 28 15:26:25 2024 +0100 xfrm: state: fix out-of-bounds read during lookup lookup and resize can run in parallel. The xfrm_state_hash_generation seqlock ensures a retry, but the hash functions can observe a hmask value that is too large for the new hlist array. rehash does: rcu_assign_pointer(net->xfrm.state_bydst, ndst) [..] net->xfrm.state_hmask = nhashmask; While state lookup does: h = xfrm_dst_hash(net, daddr, saddr, tmpl->reqid, encap_family); hlist_for_each_entry_rcu(x, net->xfrm.state_bydst + h, bydst) { This is only safe in case the update to state_bydst is larger than net->xfrm.xfrm_state_hmask (or if the lookup function gets serialized via state spinlock again). Fix this by prefetching state_hmask and the associated pointers. The xfrm_state_hash_generation seqlock retry will ensure that the pointer and the hmask will be consistent. The existing helpers, like xfrm_dst_hash(), are now unsafe for RCU side, add lockdep assertions to document that they are only safe for insert side. xfrm_state_lookup_byaddr() uses the spinlock rather than RCU. AFAICS this is an oversight from back when state lookup was converted to RCU, this lock should be replaced with RCU in a future patch. Reported-by: syzbot+5f9f31cb7d985f584d8e@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/CACT4Y+azwfrE3uz6A5ZErov5YN2LYBN5KrsymBerT36VU8qzBA@mail.gmail.com/ Diagnosed-by: Dmitry Vyukov <dvyukov@google.com> Fixes: c2f672fc9464 ("xfrm: state lookup can be lockless") Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> net/xfrm/xfrm_state.c | 89 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 70 insertions(+), 19 deletions(-) commit 7b98caea39676561f22db58752551161bb36462b Author: Chih-Kang Chang <gary.chang@realtek.com> Date: Thu Nov 28 13:54:33 2024 +0800 wifi: rtw89: add crystal_cap check to avoid setting as overflow value In the original flow, the crystal_cap might be calculated as a negative value and set as an overflow value. Therefore, we added a check to limit the calculated crystal_cap value. Additionally, we shrank the crystal_cap adjustment according to specific CFO. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241128055433.11851-7-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/phy.c | 11 ++++++----- drivers/net/wireless/realtek/rtw89/phy.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) commit 148cd1e184cf3f19c17f8596c8f3f1a3b447edd6 Author: Zong-Zhe Yang <kevin_yang@realtek.com> Date: Thu Nov 28 13:54:32 2024 +0800 wifi: rtw89: refine link handling for link_sta_rc_update The original handling will iterate all active links under the given sta and apply the changes to each. Now, stack tweaks ops from sta_rc_update to link_sta_rc_update, which means targeting a given link. Then, our link iteration looks redundant. So, refine it to apply the changes to the link directly. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241128055433.11851-6-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/mac80211.c | 9 +++++++-- drivers/net/wireless/realtek/rtw89/phy.c | 15 ++++++--------- drivers/net/wireless/realtek/rtw89/phy.h | 3 +++ 3 files changed, 16 insertions(+), 11 deletions(-) commit b6853ed2be27ac7f9511867faff3d6dd1139b915 Author: Chih-Kang Chang <gary.chang@realtek.com> Date: Thu Nov 28 13:54:31 2024 +0800 wifi: rtw89: 8922a: use RSSI from PHY report in RX descriptor The PPDU status of probe response will fail to parse the IE due to being filtered by the to_self check. Therefore, we parse RSSI from PHY report in RX descriptor. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241128055433.11851-5-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 17 ++++++++++ drivers/net/wireless/realtek/rtw89/core.h | 19 ++++++++++++ drivers/net/wireless/realtek/rtw89/mac.c | 1 + drivers/net/wireless/realtek/rtw89/mac.h | 36 ++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/mac_be.c | 15 +++++++++ drivers/net/wireless/realtek/rtw89/reg.h | 4 +++ drivers/net/wireless/realtek/rtw89/rtw8851b.c | 4 ++- drivers/net/wireless/realtek/rtw89/rtw8852a.c | 5 ++- drivers/net/wireless/realtek/rtw89/rtw8852b.c | 1 + .../net/wireless/realtek/rtw89/rtw8852b_common.c | 4 ++- drivers/net/wireless/realtek/rtw89/rtw8852bt.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852c.c | 6 +++- drivers/net/wireless/realtek/rtw89/rtw8922a.c | 17 ++++++++-- drivers/net/wireless/realtek/rtw89/txrx.h | 3 ++ 14 files changed, 127 insertions(+), 6 deletions(-) commit 3374c63111b0811134b773e9d4c028bd643bb9c9 Author: Po-Hao Huang <phhuang@realtek.com> Date: Thu Nov 28 13:54:30 2024 +0800 wifi: rtw89: 8852bt: add beacon filter and CQM support Declare beacon filter and connection monitor for 8852BT. This offloads connection monitor mechanism to firmware, and this is required for the MCC feature. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241128055433.11851-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/fw.c | 1 + 1 file changed, 1 insertion(+) commit d56c261e5214e51e2c6d22149f63555039b5601e Author: Po-Hao Huang <phhuang@realtek.com> Date: Thu Nov 28 13:54:29 2024 +0800 wifi: rtw89: 8852b: add beacon filter and CQM support Declare beacon filter and connection monitor for 8852B. This offloads connection monitor mechanism to firmware, and this is required for the MCC feature. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241128055433.11851-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/fw.c | 1 + 1 file changed, 1 insertion(+) commit 05b6555feeddc077f1eaa14c3e2c409b7ddf917b Author: Po-Hao Huang <phhuang@realtek.com> Date: Thu Nov 28 13:54:28 2024 +0800 wifi: rtw89: 8922a: Extend channel info field length for scan Extend the bitfield for duration in channel info to 16 bits. Update the related format in H2C and C2H, then increase firmware format sequence to 3. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241128055433.11851-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 1 + drivers/net/wireless/realtek/rtw89/fw.c | 43 +++++++++++++++++++-------- drivers/net/wireless/realtek/rtw89/fw.h | 22 ++++++++++++-- drivers/net/wireless/realtek/rtw89/mac.c | 24 +++++++++++---- drivers/net/wireless/realtek/rtw89/rtw8922a.c | 2 +- 5 files changed, 71 insertions(+), 21 deletions(-) commit 152d00a913969514967ad3f962b3b1c8983eb2d7 Author: Heiner Kallweit <hkallweit1@gmail.com> Date: Tue Dec 3 22:33:22 2024 +0100 r8169: simplify setting hwmon attribute visibility Use new member visible to simplify setting the static visibility. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Link: https://patch.msgid.link/dba77e76-be45-4a30-96c7-45e284072ad2@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/realtek/r8169_main.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit d71ff85ad850899b3be3ce1a1525586725570157 Author: Suraj Kandpal <suraj.kandpal@intel.com> Date: Tue Dec 3 14:17:06 2024 +0530 drm/i915/wm: Club initialized variables of same type together Refactor program_dpkgc function so that all initialized variables of same type are clubbed together. --v2 -Modify commit message to reflect what is being done in patch [Mitul] Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241203084706.2126189-6-suraj.kandpal@intel.com drivers/gpu/drm/i915/display/skl_watermark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9aa59753afb50f3353ce33b58e3ed8788df894a9 Author: Suraj Kandpal <suraj.kandpal@intel.com> Date: Tue Dec 3 14:17:05 2024 +0530 drm/i915/wm: Modify latency programmed into PKG_C_LATENCY Increase the latency programmed into PKG_C_LATENCY latency to be a multiple of line time which is written into WM_LINETIME. --v2 -Fix commit subject line [Sai Teja] -Use individual DISPLAY_VER checks instead of range [Sai Teja] -Initialize max_linetime [Sai Teja] --v3 -take into account the scenario when adjusted_latency is 0 [Vinod] --v4 -rename adjusted_latency to latency [Mitul] -fix the condition in which dpkgc is disabled [Vinod] --v5 -Add check to see if max_linetime is 0 [Vinod] --v6 -Avoid nested if statements [Mitul] WA: 22020299601 Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241203084706.2126189-5-suraj.kandpal@intel.com drivers/gpu/drm/i915/display/skl_watermark.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 555a09d54e371ad5efc822d902720d681e66ea4e Author: Suraj Kandpal <suraj.kandpal@intel.com> Date: Tue Dec 3 14:17:04 2024 +0530 drm/i915/display: Refactor DPKGC code to call it from atomic_commit_tail Refactor the code to check the fixed refresh rate condition in the dpkgc function itself and call it from intel_atomic_commit_tail so that we have all the required values specially linetime which is computed after intel_wm_compute, this will also help implement some WA's which requires linetime. This also avoid writing into any of the registers while we are in compute_config phase. Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241203084706.2126189-4-suraj.kandpal@intel.com drivers/gpu/drm/i915/display/intel_display.c | 2 ++ drivers/gpu/drm/i915/display/skl_watermark.c | 28 ++++++++++++++++------------ drivers/gpu/drm/i915/display/skl_watermark.h | 1 + 3 files changed, 19 insertions(+), 12 deletions(-) commit 11c739218aa8b9ef1e53fee7365e72cba527b687 Author: Suraj Kandpal <suraj.kandpal@intel.com> Date: Tue Dec 3 14:17:03 2024 +0530 drm/i915/wm: Use intel_display structure in DPKGC code Use intel_display for DPKGC code wherever we can. While we are at it also use intel_de_rmw instead of intel_uncore_rmw as we really don't need the internal uncore_rmw_function. Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241203084706.2126189-3-suraj.kandpal@intel.com drivers/gpu/drm/i915/display/skl_watermark.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d4e8379ba2aabfa7c2697e32ed5ad3bad4a8e392 Author: Suraj Kandpal <suraj.kandpal@intel.com> Date: Tue Dec 3 14:17:02 2024 +0530 drm/i915/wm: Refactor dpkgc value prepration Refactor the value getting prepped to be written into the PKG_C_LATENCY register by ORing the REG_FIELD_PREP values instead of having val getting operated on twice. We dont need the clear and val variables to be initialized. Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241203084706.2126189-2-suraj.kandpal@intel.com drivers/gpu/drm/i915/display/skl_watermark.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5105c803295e4c2004aad518713208fae42bfc33 Author: Suraj Kandpal <suraj.kandpal@intel.com> Date: Tue Dec 3 14:17:01 2024 +0530 drm/i915/wm: Initialize max_latency variable to appropriate value Initialize max_latency variable to LNL_PKG_C_LATENCY_MASK which helps to eliminate the else block and make the whole code a lot cleaner. --v2 -Seprate patch to club variables together [Mitul] Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241203084706.2126189-1-suraj.kandpal@intel.com drivers/gpu/drm/i915/display/skl_watermark.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ac98b3132402e1b892c16f87d766f21ef18dd344 Author: Kenjiro Nakayama <nakayamakenjiro@gmail.com> Date: Wed Dec 4 07:28:44 2024 +0900 selftests/net: call sendmmsg via udpgso_bench.sh Currently, sendmmsg is implemented in udpgso_bench_tx.c, but it is not called by any test script. This patch adds a test for sendmmsg in udpgso_bench.sh. This allows for basic API testing and benchmarking comparisons with GSO. Signed-off-by: Kenjiro Nakayama <nakayamakenjiro@gmail.com> Reviewed-by: Hangbin Liu <liuhangbin@gmail.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20241203222843.26983-1-nakayamakenjiro@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> tools/testing/selftests/net/udpgso_bench.sh | 3 +++ 1 file changed, 3 insertions(+) commit 5204ccbfa22358f95afd031a3f337e6d9a74baea Author: Eric Dumazet <edumazet@google.com> Date: Tue Dec 3 17:36:17 2024 +0000 inet: add indirect call wrapper for getfrag() calls UDP send path suffers from one indirect call to ip_generic_getfrag() We can use INDIRECT_CALL_1() to avoid it. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Brian Vazquez <brianvv@google.com> Link: https://patch.msgid.link/20241203173617.2595451-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/ipv4/ip_output.c | 13 +++++++++---- net/ipv6/ip6_output.c | 13 ++++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) commit f029c409c3d17feb7a2715ea80efdedda809724b Merge: 4485043a9bf8 77ac9a8b2536 Author: Jakub Kicinski <kuba@kernel.org> Date: Wed Dec 4 19:19:09 2024 -0800 Merge branch 'net-add-negotiation-of-in-band-capabilities' Russell King says: ==================== net: add negotiation of in-band capabilities This is a repost without RFC for this series, shrunk down to 13 patches by removing the non-Marvell PCS. Phylink's handling of in-band has been deficient for a long time, and people keep hitting problems with it. Notably, situations with the way- to-late standardized 2500Base-X and whether that should or should not have in-band enabled. We have also been carrying a hack in the form of phylink_phy_no_inband() for a PHY that has been used on a SFP module, but has no in-band capabilities, not even for SGMII. When phylink is trying to operate in in-band mode, this series will look at the capabilities of the MAC-side PCS and PHY, and work out whether in-band can or should be used, programming the PHY as appropriate. This includes in-band bypass mode at the PHY. We don't... yet... support bypass on the MAC side PCS, because that requires yet more complexity. Patch 1 passes struct phylink and struct phylink_pcs into phylink_pcs_neg_mode() so we can look at more state in this function in a future patch. Patch 2 splits "cur_link_an_mode" (the MLO_AN_* mode) into two separate purposes - a requested and an active mode. The active mode is the one we will be using for the MAC, which becomes dependent on the result of in-band negotiation. Patch 3 adds debug to phylink_major_config() so we can see what is going on with the requested and active AN modes. Patch 4 adds to phylib a method to get the in-band capabilities of the PHY from phylib. Patches 5 and 6 add implementations for BCM84881 and some Marvell PHYs found on SFPs. Patch 7 adds to phylib a method to configure the PHY in-band signalling, and patch 8 implements it for those Marvell PHYs that support the method in patch 4. Patch 9 does the same as patch 4 but for the MAC-side PCS, with patches 10 and 11 adding support to Marvell NETA and PP2. Patch 12 adds the code to phylink_pcs_neg_mode() which looks at the capabilities, and works out whether to use in-band or out-band mode for driving the link between the MAC PCS and PHY. Patch 13 removes the phylink_phy_no_inband() hack now that we are publishing the in-band capabilities from the BCM84881 PHY driver. Three more PCS, omitted from this series due to the limit of 15 patches, will be sent once this has been merged. ==================== Link: https://patch.msgid.link/Z08kCwxdkU4n2V6x@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 77ac9a8b2536e0eaca6c6f21070068458bf55981 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 3 15:31:48 2024 +0000 net: phylink: remove phylink_phy_no_inband() Remove phylink_phy_no_inband() now that we are handling the lack of inband negotiation by querying the capabilities of the PHY and PCS, and the BCM84881 PHY driver provides us the information necessary to make the decision. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tIUsO-006IUt-KN@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phylink.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) commit 5fd0f1a02e750e2db4038dee60edea669ce5aab1 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 3 15:31:43 2024 +0000 net: phylink: add negotiation of in-band capabilities Support for in-band signalling with Serdes links is uncertain. Some PHYs do not support in-band for e.g. SGMII. Some PCS do not support in-band for 2500Base-X. Some PCS require in-band for Base-X protocols. Simply using what is in DT is insufficient when we have hot-pluggable PHYs e.g. in the form of SFP modules, which may not provide the in-band signalling. In order to address this, we have introduced phy_inband_caps() and pcs_inband_caps() functions to allow phylink to retrieve the capabilities from each end of the PCS/PHY link. This commit adds code to resolve whether in-band will be used in the various scenarios that we have: In-band not being used, PHY present using SGMII or Base-X, PHY not present. We also deal with no capabilties provided. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tIUsJ-006IUn-H3@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phylink.c | 154 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 144 insertions(+), 10 deletions(-) commit d4169f0c7665afb8d8adb5e1b1df3db88517d0ad Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 3 15:31:38 2024 +0000 net: mvpp2: implement pcs_inband_caps() method Report the PCS in-band capabilities to phylink for Marvell PP2 interfaces. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tIUsE-006IUh-E7@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 513e8fb8fa32035b3325e2e14fb9598f8cb545e9 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 3 15:31:33 2024 +0000 net: mvneta: implement pcs_inband_caps() method Report the PCS in-band capabilities to phylink for Marvell NETA interfaces. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tIUs9-006IUb-Au@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/marvell/mvneta.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit df874f9e52c340cc6f0a0014a97b778f67d46849 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 3 15:31:28 2024 +0000 net: phylink: add pcs_inband_caps() method Add a pcs_inband_caps() method to query the PCS for its inband link capabilities, and use this to determine whether link modes used with optical SFPs can be supported. When a PCS does not provide a method, we allow inband negotiation to be either on or off, making this a no-op until the pcs_inband_caps() method is implemented by a PCS driver. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tIUs4-006IUU-7K@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phylink.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++ include/linux/phylink.h | 17 ++++++++++++++ 2 files changed, 77 insertions(+) commit a219912e0fec73c346e64ef47013cb2e152f88fc Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 3 15:31:23 2024 +0000 net: phy: marvell: implement config_inband() method Implement the config_inband() method for Marvell 88E1112, 88E1111, and Finisar's 88E1111 variant. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tIUrz-006IUO-3r@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/marvell.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 5d58a890c02770ba8d790b1f3c6e8c0e20514dc2 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 3 15:31:18 2024 +0000 net: phy: add phy_config_inband() Add a method to configure the PHY's in-band mode. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tIUru-006IUI-08@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phy.c | 32 ++++++++++++++++++++++++++++++++ include/linux/phy.h | 6 ++++++ 2 files changed, 38 insertions(+) commit 1c86828dff88e28b8ade6bddeee0163a023faf91 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 3 15:31:12 2024 +0000 net: phy: marvell: implement phy_inband_caps() method Provide an implementation for phy_inband_caps() for Marvell PHYs used on SFP modules, so that phylink knows the PHYs capabilities. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tIUro-006IUC-Rq@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/marvell.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit c64c7fa0a774d9da72071a8517e359992baac982 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 3 15:31:07 2024 +0000 net: phy: bcm84881: implement phy_inband_caps() method BCM84881 has no support for inband signalling, so this is a trivial implementation that returns no support for inband. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://patch.msgid.link/E1tIUrj-006IU6-ON@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/bcm84881.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b4c7698dd95f253c6958d8c6ac219098009bf28a Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 3 15:31:02 2024 +0000 net: phy: add phy_inband_caps() Add a method to query the PHY's in-band capabilities for a PHY interface mode. Where the interface mode does not have in-band capability, or the PHY driver has not been updated to return this information, then phy_inband_caps() should return zero. Otherwise, PHY drivers will return a value consisting of the following flags: LINK_INBAND_DISABLE indicates that the hardware does not support in-band signalling, or can have in-band signalling configured via software to be disabled. LINK_INBAND_ENABLE indicates that the hardware will use in-band signalling, or can have in-band signalling configured via software to be enabled. LINK_INBAND_BYPASS indicates that the hardware has the ability to bypass in-band signalling when enabled after a timeout if the link partner does not respond to its in-band signalling. This reports the PHY capabilities for the particular interface mode, not the current configuration. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tIUre-006ITz-KF@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phy.c | 21 +++++++++++++++++++++ include/linux/phy.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) commit 4e7d000286fe8e12f2d88032711ffab3ab658b12 Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 3 15:30:57 2024 +0000 net: phylink: add debug for phylink_major_config() Now that we have a more complexity in phylink_major_config(), augment the debugging so we can see what's going on there. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tIUrZ-006ITt-Fa@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phylink.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 1f92ead7e15003f632b5f138e8138095e0997d3d Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 3 15:30:52 2024 +0000 net: phylink: split cur_link_an_mode into requested and active There is an interdependence between the current link_an_mode and pcs_neg_mode that some drivers rely upon to know whether inband or PHY mode will be used. In order to support detection of PCS and PHY inband capabilities resulting in automatic selection of inband or PHY mode, we need to cater for this, and support changing the MAC link_an_mode. However, we end up with an inter-dependency between the current link_an_mode and pcs_neg_mode. To solve this, split the current link_an_mode into the requested link_an_mode and active link_an_mode. The requested link_an_mode will always be passed to phylink_pcs_neg_mode(), and the active link_an_mode will be used for everything else, and only updated during phylink_major_config(). This will ensure that phylink_pcs_neg_mode()'s link_an_mode will not depend on the active link_an_mode that will, in a future patch, depend on pcs_neg_mode. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tIUrU-006ITn-Ai@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phylink.c | 60 ++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 29 deletions(-) commit 17ed1911f9c8d4f9af8e13b2c95103ee06dadc0f Author: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Date: Tue Dec 3 15:30:47 2024 +0000 net: phylink: pass phylink and pcs into phylink_pcs_neg_mode() Move the call to phylink_pcs_neg_mode() in phylink_major_config() after we have selected the appropriate PCS to allow the PCS to be passed in. Add struct phylink and struct phylink_pcs pointers to phylink_pcs_neg_mode() and pass in the appropriate structures. Set pl->pcs_neg_mode before returning, and remove the return value. This will allow the capabilities of the PCS and any PHY to be used when deciding which pcs_neg_mode should be used. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tIUrP-006ITh-6u@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/phy/phylink.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 4485043a9bf83d1a03a62b460ef9d6eec643b0ad Author: Justin Lai <justinlai0215@realtek.com> Date: Tue Dec 3 18:31:46 2024 +0800 rtase: Add support for RTL907XD-VA PCIe port 1. Add RTL907XD-VA hardware version id. 2. Add the reported speed for RTL907XD-VA. Signed-off-by: Justin Lai <justinlai0215@realtek.com> Link: https://patch.msgid.link/20241203103146.734516-1-justinlai0215@realtek.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/realtek/rtase/rtase.h | 1 + drivers/net/ethernet/realtek/rtase/rtase_main.c | 2 ++ 2 files changed, 3 insertions(+) commit a1081779ca8f18774585aa3cf540cdde13afdc7c Merge: a9ab02ed97c6 36de47bfd013 Author: Jakub Kicinski <kuba@kernel.org> Date: Wed Dec 4 19:15:39 2024 -0800 Merge branch 'netcons-add-udp-send-fail-statistics-to-netconsole' Maksym Kutsevol says: ==================== netcons: Add udp send fail statistics to netconsole Enhance observability of netconsole. Packet sends can fail. Start tracking at least two failure possibilities: ENOMEM and NET_XMIT_DROP for every target. Stats are exposed via an additional attribute in CONFIGFS. The exposed statistics allows easier debugging of cases when netconsole messages were not seen by receivers, eliminating the guesswork if the sender thinks that messages in question were sent out. Stats are not reset on enable/disable/change remote ip/etc, they belong to the netcons target itself. ==================== Link: https://patch.msgid.link/20241202-netcons-add-udp-send-fail-statistics-to-netconsole-v5-0-70e82239f922@kutsevol.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> commit 36de47bfd013f2152860339ca763fcb64c76f9b2 Author: Maksym Kutsevol <max@kutsevol.com> Date: Mon Dec 2 11:55:08 2024 -0800 netcons: Add udp send fail statistics to netconsole Enhance observability of netconsole. Packet sends can fail. Start tracking at least two failure possibilities: ENOMEM and NET_XMIT_DROP for every target. Stats are exposed via an additional attribute in CONFIGFS. The exposed statistics allows easier debugging of cases when netconsole messages were not seen by receivers, eliminating the guesswork if the sender thinks that messages in question were sent out. Stats are not reset on enable/disable/change remote ip/etc, they belong to the netcons target itself. Reported-by: Breno Leitao <leitao@debian.org> Closes: https://lore.kernel.org/all/ZsWoUzyK5du9Ffl+@gmail.com/ Signed-off-by: Maksym Kutsevol <max@kutsevol.com> Link: https://patch.msgid.link/20241202-netcons-add-udp-send-fail-statistics-to-netconsole-v5-2-70e82239f922@kutsevol.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Documentation/networking/netconsole.rst | 5 +-- drivers/net/netconsole.c | 60 +++++++++++++++++++++++++++++++-- 2 files changed, 60 insertions(+), 5 deletions(-) commit a61b19f4a6586590a9ae6baf2ac4a25a852e547f Author: Maksym Kutsevol <max@kutsevol.com> Date: Mon Dec 2 11:55:07 2024 -0800 netpoll: Make netpoll_send_udp return status instead of void netpoll_send_udp can return if send was successful. It will allow client code to be aware of the send status. Possible return values are the result of __netpoll_send_skb (cast to int) and -ENOMEM. This doesn't cover the case when TX was not successful instantaneously and was scheduled for later, __netpoll__send_skb returns success in that case. Signed-off-by: Maksym Kutsevol <max@kutsevol.com> Link: https://patch.msgid.link/20241202-netcons-add-udp-send-fail-statistics-to-netconsole-v5-1-70e82239f922@kutsevol.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> include/linux/netpoll.h | 2 +- net/core/netpoll.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit d48da4d5ed7b4a022a4e54f210575baac71f58af Author: Jordan Rome <linux@jordanrome.com> Date: Wed Dec 4 07:59:11 2024 -0800 security: add trace event for cap_capable In cases where we want a stable way to observe/trace cap_capable (e.g. protection from inlining and API updates) add a tracepoint that passes: - The credentials used - The user namespace of the resource being accessed - The user namespace in which the credential provides the capability to access the targeted resource - The capability to check for - The return value of the check Signed-off-by: Jordan Rome <linux@jordanrome.com> Acked-by: Andrii Nakryiko <andrii@kernel.org> Reviewed-by: Paul Moore <paul@paul-moore.com> Reviewed-by: Serge Hallyn <serge@hallyn.com> Link: https://lore.kernel.org/r/20241204155911.1817092-1-linux@jordanrome.com Signed-off-by: Serge Hallyn <sergeh@kernel.org> MAINTAINERS | 1 + include/trace/events/capability.h | 57 +++++++++++++++++++++++++++++++++++++++ security/commoncap.c | 54 ++++++++++++++++++++++++++++--------- 3 files changed, 99 insertions(+), 13 deletions(-) commit 3f4f1f8a1ab75314ff5cc14f9ed134bc038926bd Author: Paul Moore <paul@paul-moore.com> Date: Wed Sep 25 15:20:19 2024 -0400 capabilities: remove cap_mmap_file() The cap_mmap_file() LSM callback returns the default value for the security_mmap_file() LSM hook and can be safely removed. Signed-off-by: Paul Moore <paul@paul-moore.com> Reviewed-by: Casey Schaufler <casey@schaufler-ca.com> Reviewed-by: Serge Hallyn <serge@hallyn.com> Signed-off-by: Serge Hallyn <sergeh@kernel.org> security/commoncap.c | 7 ------- 1 file changed, 7 deletions(-) commit a9ab02ed97c654a9ea09afb3e6294cea3768c388 Author: Breno Leitao <leitao@debian.org> Date: Mon Dec 2 16:22:05 2024 -0800 netpoll: Use rtnl_dereference() for npinfo pointer access In the __netpoll_setup() function, when accessing the device's npinfo pointer, replace rcu_access_pointer() with rtnl_dereference(). This change is more appropriate, as suggested by Herbert Xu[1]. The function is called with the RTNL mutex held, and the pointer is being dereferenced later, so, dereference earlier and just reuse the pointer for the if/else. The replacement ensures correct pointer access while maintaining the existing locking and RCU semantics of the netpoll subsystem. Link: https://lore.kernel.org/lkml/Zz1cKZYt1e7elibV@gondor.apana.org.au/ [1] Suggested-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Link: https://patch.msgid.link/20241202-netpoll_rcu_herbet_fix-v2-1-2b9d58edc76a@debian.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> net/core/netpoll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 39f3bd9c9a27d526858da153090376decdf7bfea Author: Csókás, Bence <csokas.bence@prolan.hu> Date: Tue Nov 19 19:07:40 2024 +0100 power: ip5xxx_power: Add support for IP5306 Add ip5xxx_regfield_config for IP5306 Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Link: https://lore.kernel.org/r/20241119180741.2237692-8-csokas.bence@prolan.hu Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ip5xxx_power.c | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit ec62beb285e84da1a8c06f9dadc0e3669faaa0ab Author: Csókás, Bence <csokas.bence@prolan.hu> Date: Tue Nov 19 19:07:39 2024 +0100 dt-bindings: trivial-devices: Add Injoinic IP5306 It is to be handled with the rest of the IP51xx/52xx family. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Link: https://lore.kernel.org/r/20241119180741.2237692-7-csokas.bence@prolan.hu Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 667e11374f4e4c85452d1a4f6f3fe0640991abd8 Author: Csókás, Bence <csokas.bence@prolan.hu> Date: Tue Nov 19 19:07:38 2024 +0100 power: ip5xxx_power: Fall back to Charge End bit if status register is absent On parts where there is no status register, check the Charge End bit to set charging/not charging status. Fullness, trickle charge status, discharging etc. cannot be determined from just this bit. Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Link: https://lore.kernel.org/r/20241119180741.2237692-6-csokas.bence@prolan.hu Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ip5xxx_power.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit ee7300da80db325af4ddaf2127984f8fb561bc00 Author: Csókás, Bence <csokas.bence@prolan.hu> Date: Tue Nov 19 19:07:37 2024 +0100 power: ip5xxx_power: Check for optional bits Some parts may not have certain control bits. These bits however may be non-essential to the system's operation, as the default behaviour is the one we would set anyways, or the bits are not applicable for said part (e. g. enabling NTC on a part without an NTC pin, or one where it cannot be disabled via registers anyways). Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Link: https://lore.kernel.org/r/20241119180741.2237692-5-csokas.bence@prolan.hu Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ip5xxx_power.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 4013a71da38b66dbd084579b4af6becead76ed99 Author: Csókás, Bence <csokas.bence@prolan.hu> Date: Tue Nov 19 19:07:36 2024 +0100 power: ip5xxx_power: Add battery type for 4.4V IP53xx series supports 4.4V batteries. Add support for it to compatible parts (that have `vbat_max` set to >= 4.4 V). Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Link: https://lore.kernel.org/r/20241119180741.2237692-4-csokas.bence@prolan.hu Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ip5xxx_power.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8584bc5df53969523ac813a4b742b96f536d5472 Author: Csókás, Bence <csokas.bence@prolan.hu> Date: Tue Nov 19 19:07:35 2024 +0100 power: ip5xxx_power: Allow for more parameters to be configured Other parts such as IP5306 may support other battery voltages and have different constants for input voltage regulation. Allow these to be passed from `struct ip5xxx_regfield_config`. Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Link: https://lore.kernel.org/r/20241119180741.2237692-3-csokas.bence@prolan.hu Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ip5xxx_power.c | 43 +++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) commit 3ee089f172a75b06c95d970a563d4c3de9c97575 Author: Csókás, Bence <csokas.bence@prolan.hu> Date: Tue Nov 19 19:07:33 2024 +0100 power: ip5xxx_power: Use regmap_field API The IP53xx series [1] has a much different register layout than the 51xx/52xx [2] currently supported by this driver. To accommodate supporting the former, refactor the code to use the flexible regmap_field API. [1] https://sharvielectronics.com/wp-content/uploads/2021/07/IP5306-I2C-registers.pdf [2] https://www.windworkshop.cn/wp-content/uploads/2022/04/IP5209-IP5109-IP5207-IP5108-I2C-registers.pdf Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Link: https://lore.kernel.org/r/20241119180741.2237692-1-csokas.bence@prolan.hu Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ip5xxx_power.c | 451 +++++++++++++++++++++++------------- 1 file changed, 293 insertions(+), 158 deletions(-) commit 98c57141319832861e141059aa46ee5fec3b9445 Author: Csókás, Bence <csokas.bence@prolan.hu> Date: Tue Nov 19 19:07:34 2024 +0100 power: ip5xxx_power: Fix return value on ADC read errors If ADC read returns an error, the return value was silently ignored, execution continued and an uninitialized value and a return code of 0 was passed back to userspace. The only exception was POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT, which bailed out correctly. Fix returns for the other cases as well. Fixes: 75853406fa27 ("power: supply: Add a driver for Injoinic power bank ICs") Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Link: https://lore.kernel.org/r/20241119180741.2237692-2-csokas.bence@prolan.hu Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ip5xxx_power.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f29a749d01dc136ee6e08afafebbccc389ef5b05 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Nov 11 22:40:08 2024 +0100 power: supply: sysfs: rework uevent property loop Instead of looping through all properties known to be supported by the psy, loop over all known properties and decide based on the return value of power_supply_get_property() whether the property existed. This makes the code shorter now and even more so when power supply extensions are added. It also simplifies the locking, as it can all happen inside power_supply_get_property(). Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20241111-power-supply-extensions-v4-6-7240144daa8e@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/power_supply_sysfs.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) commit 5c2141f2c7c671e8696e2ee1c7b332c77266dd08 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Nov 11 22:40:07 2024 +0100 power: supply: sysfs: prepare for power supply extensions The upcoming extension API will add properties which are not part of the the power_supply_desc. Use power_supply_has_property() so the properties from extensions are also checked. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20241111-power-supply-extensions-v4-5-7240144daa8e@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/power_supply_sysfs.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 39bb32f06c1f7eb34b4a9838e878f3d741b7d50c Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Nov 11 22:40:06 2024 +0100 power: supply: hwmon: prepare for power supply extensions The upcoming extension API will add properties which are not part of the the power_supply_desc. Use power_supply_has_property() so the properties from extensions are also checked. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20241111-power-supply-extensions-v4-4-7240144daa8e@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/power_supply_hwmon.c | 50 +++++++++++++++---------------- 1 file changed, 24 insertions(+), 26 deletions(-) commit aa40f37d636570458e1be76f51564357347eb77c Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Nov 11 22:40:05 2024 +0100 power: supply: core: introduce power_supply_has_property() Introduce a helper to check if a power supply implements a certain property. It will be used by the sysfs and hwmon code to remove similar open-coded checks. It also paves the way for the extension API to hook into. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20241111-power-supply-extensions-v4-3-7240144daa8e@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/power_supply.h | 2 ++ drivers/power/supply/power_supply_core.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) commit 172f2151c2b436746173d794887115e026961d82 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Nov 11 22:40:04 2024 +0100 power: supply: core: rename psy_has_property() to psy_desc_has_property() The function only takes a desc as parameter, align the naming. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20241111-power-supply-extensions-v4-2-7240144daa8e@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/power_supply_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 31d8440e07704d53041936222728636421957660 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Nov 11 22:40:03 2024 +0100 power: supply: sysfs: print single value in uevent for POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR Currently an uevent contains the same string representation of a property as sysfs. However for POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR this is specially formatted to indicate all possible values. This doesn't make sense for uevents and complicates parsing. Instead only include the currently active value in uevents. As currently no in-tree driver uses POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR this change is not a problem. Soon the property will actually be used so fix the formatting before that happens. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20241111-power-supply-extensions-v4-1-7240144daa8e@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/power_supply_sysfs.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit dc90aa3a72e624a3eb30e61d47c4c501006dfb8b Author: Dimitri Fedrau <dimitri.fedrau@liebherr.com> Date: Tue Dec 3 09:04:36 2024 +0100 power: supply: max1720x: add charge full property Charge full holds the calculated full capacity of the cell based on all inputs from the ModelGauge m5 algorithm including empty compensation. A new full-capacity value is calculated continuously as application conditions change. Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com> Link: https://lore.kernel.org/r/20241203-max1720x-charge-full-prop-v1-1-b02776b43f17@liebherr.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/max1720x_battery.c | 6 ++++++ 1 file changed, 6 insertions(+) commit cd9ce8217345bd13035a0d3edaaecec4244d0ddd Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Date: Mon Dec 2 09:24:31 2024 +0200 x86/tdx: Disable unnecessary virtualization exceptions Originally, #VE was defined as the TDX behavior in order to support paravirtualization of x86 features that can’t be virtualized by the TDX module. The intention is that if guest software wishes to use such a feature, it implements some logic to support this. This logic resides in the #VE exception handler it may work in cooperation with the host VMM. Theoretically, the guest TD’s #VE handler was supposed to act as a "TDX enlightenment agent" inside the TD. However, in practice, the #VE handler is simplistic: - #VE on CPUID is handled by returning all-0 to the code which executed CPUID. In many cases, an all-0 value is not the correct value, and may cause improper operation. - #VE on RDMSR is handled by requesting the MSR value from the host VMM. This is prone to security issues since the host VMM is untrusted. It may also be functionally incorrect in case the expected operation is to paravirtualize some CPU functionality. Newer TDX modules provide a "REDUCE_VE" feature. When enabled, it drastically cuts cases when guests receive #VE on MSR and CPUID accesses. Basically, instead of punting the problem to the VMM, the TDX module fills in good data. What the TDX module provides is obviously highly specific to the MSR or CPUID. This is all spelled out in excruciating detail in the TDX specs. Enable REDUCE_VE. Make TDX guest behaviour less odd, and closer to how a normal CPU behaves. Note that enabling of the feature doesn't eliminate need in #VE handler for CPUID and MSR accesses. Some MSRs still generate #VE (notably APIC-related) and kernel needs CPUID #VE handler to ask VMM for leafs in hypervisor range. [ dhansen: changelog tweaks, rename/rework VE reduction function ] Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com> Link: https://lore.kernel.org/all/20241202072431.447380-1-kirill.shutemov%40linux.intel.com arch/x86/coco/tdx/tdx.c | 17 ++++++++++++++++- arch/x86/include/asm/shared/tdx.h | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) commit 2486e60bdd41ca7ad98b9dc7467abf4628f008ab Merge: 5efff64c6be9 b0d3b8514abd Author: Martin K. Petersen <martin.petersen@oracle.com> Date: Wed Dec 4 16:54:10 2024 -0500 Merge patch series "Replace the "slave_*" function names" Bart Van Assche <bvanassche@acm.org> says: Hi Martin, The text "slave_" in multiple function names does not make it clear what the purpose of these functions is. Hence this patch series that renames all SCSI functions that have the word "slave" in their function name. Please consider this patch series for the next merge window. Thanks, Bart. Link: https://lore.kernel.org/r/20241022180839.2712439-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> commit 1c44832979a70570f2e652013877c7b15000494e Author: Andrew Davis <afd@ti.com> Date: Mon Dec 2 15:15:19 2024 -0600 power: supply: ds2782: Use devm_delayed_work_autocancel() helper Use the device lifecycle managed work init function. This helps prevent mistakes like canceling out of order in cleanup functions and forgetting to canceling on error paths. Note we move this to after the registering the power supply so that the cancel is called before unregistering. This was the last thing the .remove() function did, so remove that too. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20241202211519.199635-5-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ds2782_battery.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 8571178e9adf3128d70d14359b965f370cfd522d Author: Andrew Davis <afd@ti.com> Date: Mon Dec 2 15:15:18 2024 -0600 power: supply: ds2782: Use devm_power_supply_register() helper Use the device lifecycle managed register function. This helps prevent mistakes like unregistering out of order in cleanup functions and forgetting to unregister on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20241202211519.199635-4-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ds2782_battery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1481f9f39091b95aec52553a9652d84a827a6004 Author: Andrew Davis <afd@ti.com> Date: Mon Dec 2 15:15:17 2024 -0600 power: supply: ds2782: Use devm based memory allocators Use device lifecycle managed memory alloc helpers. This helps prevent mistakes like freeing out of order in cleanup functions and forgetting to free on all error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20241202211519.199635-3-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ds2782_battery.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit fd647cc2cb73e8a6403f9c59fd7956f68f2e6b35 Author: Andrew Davis <afd@ti.com> Date: Mon Dec 2 15:15:16 2024 -0600 power: supply: ds2782: Free IDA with devm action This helps prevent mistakes like freeing out of order in cleanup functions and forgetting to free on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20241202211519.199635-2-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ds2782_battery.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit bea4395a04d2602e72f550e795c15e98e557b779 Author: Andrew Davis <afd@ti.com> Date: Mon Dec 2 15:15:15 2024 -0600 power: supply: ds2782: Switch to simpler IDA interface We don't need to specify any ranges when allocating IDs so we can switch to ida_alloc() and ida_free() instead of idr_*. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20241202211519.199635-1-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ds2782_battery.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit dc509d8be38ffe4ff6d752bdb7913718318e83cd Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:02:22 2024 +0100 power: supply: olpc_battery: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-psy-v1-4-f846430b8b66@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/olpc_battery.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 8159fcb12862f826a26964d8b814ad33e69ba4de Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:02:21 2024 +0100 power: supply: ds2781: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-psy-v1-3-f846430b8b66@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ds2781_battery.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 9aae72fe40f06872ae20c0cdb545ea5ecc840842 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:02:20 2024 +0100 power: supply: ds2780: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-psy-v1-2-f846430b8b66@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ds2780_battery.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit fc197588917bb05252115c9e76f3d34d30600249 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:02:19 2024 +0100 power: supply: ds2760: constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-psy-v1-1-f846430b8b66@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> drivers/power/supply/ds2760_battery.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 214c9539cf2f5a0116051dc8e2a36b0577383a5e Author: Timur Tabi <ttabi@nvidia.com> Date: Wed Oct 30 15:29:52 2024 -0500 drm/nouveau: expose GSP-RM logging buffers via debugfs The LOGINIT, LOGINTR, LOGRM, and LOGPMU buffers are circular buffers that have printf-like logs from GSP-RM and PMU encoded in them. LOGINIT, LOGINTR, and LOGRM are allocated by Nouveau and their DMA addresses are passed to GSP-RM during initialization. The buffers are required for GSP-RM to initialize properly. LOGPMU is also allocated by Nouveau, but its contents are updated when Nouveau receives an NV_VGPU_MSG_EVENT_UCODE_LIBOS_PRINT RPC from GSP-RM. Nouveau then copies the RPC to the buffer. The messages are encoded as an array of variable-length structures that contain the parameters to an NV_PRINTF call. The format string and parameter count are stored in a special ELF image that contains only logging strings. This image is not currently shipped with the Nvidia driver. There are two methods to extract the logs. OpenRM tries to load the logging ELF, and if present, parses the log buffers in real time and outputs the strings to the kernel console. Alternatively, and this is the method used by this patch, the buffers can be exposed to user space, and a user-space tool (along with the logging ELF image) can parse the buffer and dump the logs. This method has the advantage that it allows the buffers to be parsed even when the logging ELF file is not available to the user. However, it has the disadvantage the debugfs entries need to remain until the driver is unloaded. The buffers are exposed via debugfs. If GSP-RM fails to initialize, then Nouveau immediately shuts down the GSP interface. This would normally also deallocate the logging buffers, thereby preventing the user from capturing the debug logs. To avoid this, introduce the keep-gsp-logging command line parameter. If specified, and if at least one logging buffer has content, then Nouveau will migrate these buffers into new debugfs entries that are retained until the driver unloads. An end-user can capture the logs using the following commands: cp /sys/kernel/debug/nouveau/<path>/loginit loginit cp /sys/kernel/debug/nouveau/<path>/logrm logrm cp /sys/kernel/debug/nouveau/<path>/logintr logintr cp /sys/kernel/debug/nouveau/<path>/logpmu logpmu where (for a PCI device) <path> is the PCI ID of the GPU (e.g. 0000:65:00.0). Since LOGPMU is not needed for normal GSP-RM operation, it is only created if debugfs is available. Otherwise, the NV_VGPU_MSG_EVENT_UCODE_LIBOS_PRINT RPCs are ignored. A simple way to test the buffer migration feature is to have nvkm_gsp_init() return an error code. Tested-by: Ben Skeggs <bskeggs@nvidia.com> Signed-off-by: Timur Tabi <ttabi@nvidia.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241030202952.694055-2-ttabi@nvidia.com drivers/gpu/drm/nouveau/include/nvif/log.h | 51 +++ drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 20 + drivers/gpu/drm/nouveau/nouveau_drm.c | 16 + drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 442 +++++++++++++++++++++- 4 files changed, 528 insertions(+), 1 deletion(-) commit 7c995e2fd966ae0c94582ae23575c077be0160b7 Author: Timur Tabi <ttabi@nvidia.com> Date: Wed Oct 30 15:29:51 2024 -0500 drm/nouveau: retain device pointer in nvkm_gsp_mem object Store the struct device pointer used to allocate the DMA buffer in the nvkm_gsp_mem object. This allows nvkm_gsp_mem_dtor() to release the buffer without needing the nvkm_gsp. This is needed so that we can retain DMA buffers even after the nvkm_gsp object is deleted. Signed-off-by: Timur Tabi <ttabi@nvidia.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241030202952.694055-1-ttabi@nvidia.com drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 50 +++++++++++++++-------- 2 files changed, 34 insertions(+), 17 deletions(-) commit 97118a1816d2be258d360da8a9819ff0f34949eb Author: Danilo Krummrich <dakr@kernel.org> Date: Mon Nov 25 15:25:49 2024 +0100 drm/nouveau: create module debugfs root Typically DRM drivers use the DRM debugfs root entry. However, since Nouveau is heading towards a split into a core and a DRM driver, create a module specific debugfs root directory. Subsequent patches make use of this new debugfs root in order to store GSP-RM log bufferes (optionally beyond a device driver binding). Acked-by: Timur Tabi <ttabi@nvidia.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241125142639.9126-1-dakr@kernel.org drivers/gpu/drm/nouveau/nouveau_debugfs.c | 16 ++++++++++++++++ drivers/gpu/drm/nouveau/nouveau_debugfs.h | 16 ++++++++++++++++ drivers/gpu/drm/nouveau/nouveau_drm.c | 22 +++++++++++++++++++--- 3 files changed, 51 insertions(+), 3 deletions(-) commit b0d3b8514abd2f49b479dc775a03725c25b2f11c Author: Bart Van Assche <bvanassche@acm.org> Date: Tue Oct 22 11:07:57 2024 -0700 scsi: core: Update API documentation Since the .slave_alloc(), .slave_destroy() and .slave_configure() methods have been renamed in struct scsi_host_template, also rename these in the API documentation. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20241022180839.2712439-6-bvanassche@acm.org Reviewed-by: Damien Le Maol <dlemoal@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Documentation/scsi/scsi_mid_low_api.rst | 78 ++++++++++++++++----------------- 1 file changed, 39 insertions(+), 39 deletions(-) commit 0f98212d96a2af52e4091a199ef1d35d478d0c60 Author: Bart Van Assche <bvanassche@acm.org> Date: Tue Oct 22 11:07:56 2024 -0700 scsi: core: Remove the .slave_configure() method Now that all SCSI drivers have been converted from .slave_configure() to .sdev_configure(), remove support for .slave_configure() from the SCSI core. Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20241022180839.2712439-5-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_scan.c | 4 +--- include/scsi/scsi_host.h | 10 +++------- 2 files changed, 4 insertions(+), 10 deletions(-) commit 49515b7fe50ce4348b3dd5116b6d7d4308546da6 Author: Bart Van Assche <bvanassche@acm.org> Date: Tue Oct 22 11:07:55 2024 -0700 scsi: Convert SCSI drivers to .sdev_configure() The only difference between the .sdev_configure() and .slave_configure() methods is that the former accepts an additional 'limits' argument. Convert all SCSI drivers that define a .slave_configure() method to .sdev_configure(). This patch prepares for removing the .slave_configure() method. No functionality has been changed. Acked-by: Geoff Levand <geoff@infradead.org> # for ps3rom Acked-by: Khalid Aziz <khalid@gonehiking.org> # for the BusLogic driver Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20241022180839.2712439-4-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/infiniband/ulp/srp/ib_srp.c | 5 +++-- drivers/message/fusion/mptfc.c | 2 +- drivers/message/fusion/mptsas.c | 6 +++--- drivers/message/fusion/mptscsih.c | 4 ++-- drivers/message/fusion/mptscsih.h | 3 ++- drivers/message/fusion/mptspi.c | 7 ++++--- drivers/s390/scsi/zfcp_scsi.c | 5 +++-- drivers/scsi/3w-9xxx.c | 7 ++++--- drivers/scsi/3w-sas.c | 7 ++++--- drivers/scsi/3w-xxxx.c | 8 ++++---- drivers/scsi/53c700.c | 7 ++++--- drivers/scsi/BusLogic.c | 7 ++++--- drivers/scsi/BusLogic.h | 3 ++- drivers/scsi/aacraid/linit.c | 8 +++++--- drivers/scsi/advansys.c | 23 ++++++++++++----------- drivers/scsi/aic7xxx/aic79xx_osm.c | 4 ++-- drivers/scsi/aic7xxx/aic7xxx_osm.c | 4 ++-- drivers/scsi/arcmsr/arcmsr_hba.c | 8 +++++--- drivers/scsi/bfa/bfad_im.c | 6 +++--- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 5 +++-- drivers/scsi/csiostor/csio_scsi.c | 6 +++--- drivers/scsi/esp_scsi.c | 6 +++--- drivers/scsi/hpsa.c | 8 +++++--- drivers/scsi/ibmvscsi/ibmvfc.c | 8 +++++--- drivers/scsi/ibmvscsi/ibmvscsi.c | 8 +++++--- drivers/scsi/ips.c | 6 +++--- drivers/scsi/ips.h | 3 ++- drivers/scsi/lpfc/lpfc_scsi.c | 21 ++++++++++++++------- drivers/scsi/mvumi.c | 5 +++-- drivers/scsi/myrb.c | 5 +++-- drivers/scsi/myrs.c | 5 +++-- drivers/scsi/ncr53c8xx.c | 5 +++-- drivers/scsi/ps3rom.c | 5 +++-- drivers/scsi/qedf/qedf_main.c | 5 +++-- drivers/scsi/qla1280.c | 6 +++--- drivers/scsi/qla2xxx/qla_os.c | 4 ++-- drivers/scsi/qlogicpti.c | 5 +++-- drivers/scsi/scsi_debug.c | 9 +++++---- drivers/scsi/scsi_scan.c | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 5 +++-- drivers/scsi/snic/snic_main.c | 6 +++--- drivers/scsi/stex.c | 4 ++-- drivers/scsi/storvsc_drv.c | 5 +++-- drivers/scsi/sym53c8xx_2/sym_glue.c | 5 +++-- drivers/scsi/xen-scsifront.c | 7 ++++--- 45 files changed, 162 insertions(+), 121 deletions(-) commit 47c2e30afcec52968e50db01f92dda7d373042cb Author: Bart Van Assche <bvanassche@acm.org> Date: Tue Oct 22 11:07:54 2024 -0700 scsi: Rename .device_configure() into .sdev_configure() Improve naming consistency with the .sdev_prep() and .sdev_destroy() methods by renaming .device_configure() into .sdev_configure(). Cc: Christoph Hellwig <hch@lst.de> Acked-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20241022180839.2712439-3-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/ata/ahci.h | 2 +- drivers/ata/libata-sata.c | 8 ++++---- drivers/ata/libata-scsi.c | 7 +++---- drivers/ata/pata_macio.c | 8 ++++---- drivers/ata/sata_mv.c | 2 +- drivers/ata/sata_nv.c | 24 ++++++++++++------------ drivers/ata/sata_sil24.c | 2 +- drivers/firewire/sbp2.c | 6 +++--- drivers/scsi/hisi_sas/hisi_sas.h | 3 +-- drivers/scsi/hisi_sas/hisi_sas_main.c | 7 +++---- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 8 ++++---- drivers/scsi/hptiop.c | 6 +++--- drivers/scsi/ipr.c | 8 ++++---- drivers/scsi/iscsi_tcp.c | 6 +++--- drivers/scsi/libsas/sas_scsi_host.c | 7 +++---- drivers/scsi/megaraid/megaraid_sas_base.c | 6 +++--- drivers/scsi/mpi3mr/mpi3mr_os.c | 8 ++++---- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 8 ++++---- drivers/scsi/pmcraid.c | 8 ++++---- drivers/scsi/scsi_scan.c | 10 +++++----- drivers/ufs/core/ufshcd.c | 8 ++++---- drivers/usb/storage/scsiglue.c | 4 ++-- drivers/usb/storage/uas.c | 6 +++--- include/linux/libata.h | 11 +++++------ include/scsi/libsas.h | 5 ++--- include/scsi/scsi_host.h | 4 ++-- 28 files changed, 90 insertions(+), 96 deletions(-) commit ed638918f4df39daa458435f0825b487c1f192c8 Author: Bart Van Assche <bvanassche@acm.org> Date: Tue Oct 22 11:07:53 2024 -0700 scsi: Rename .slave_alloc() and .slave_destroy() Rename .slave_alloc() into .sdev_init() and .slave_destroy() into .sdev_destroy(). The new names make it clear that these are actions on SCSI devices. Make this change in the SCSI core, SCSI drivers and also in the ATA drivers. No functionality has been changed. This patch has been created as follows: * Change the text "slave_alloc" into "sdev_init" in all source files except those in drivers/net/ and Documentation/. * Change the text "slave_destroy" into "sdev_destroy" in all source files except those in drivers/net/ and Documentation/. * Rename lpfc_no_slave() into lpfc_no_sdev(). * Manually adjust whitespace where necessary to restore vertical alignment (dc395x driver and include/linux/libata.h). Acked-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20241022180839.2712439-2-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/ata/libata-scsi.c | 12 ++++++------ drivers/firewire/sbp2.c | 4 ++-- drivers/message/fusion/mptfc.c | 12 ++++++------ drivers/message/fusion/mptsas.c | 8 ++++---- drivers/message/fusion/mptscsih.c | 6 +++--- drivers/message/fusion/mptscsih.h | 2 +- drivers/message/fusion/mptspi.c | 12 ++++++------ drivers/s390/scsi/zfcp_scsi.c | 10 +++++----- drivers/s390/scsi/zfcp_sysfs.c | 2 +- drivers/s390/scsi/zfcp_unit.c | 2 +- drivers/scsi/53c700.c | 12 ++++++------ drivers/scsi/aic7xxx/aic79xx_osm.c | 4 ++-- drivers/scsi/aic7xxx/aic7xxx_osm.c | 4 ++-- drivers/scsi/bfa/bfad_im.c | 20 ++++++++++---------- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +- drivers/scsi/csiostor/csio_scsi.c | 12 ++++++------ drivers/scsi/dc395x.c | 12 ++++++------ drivers/scsi/esp_scsi.c | 8 ++++---- drivers/scsi/fcoe/fcoe.c | 2 +- drivers/scsi/fnic/fnic_main.c | 4 ++-- drivers/scsi/hisi_sas/hisi_sas.h | 2 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 6 +++--- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +- drivers/scsi/hpsa.c | 12 ++++++------ drivers/scsi/ibmvscsi/ibmvfc.c | 6 +++--- drivers/scsi/ipr.c | 12 ++++++------ drivers/scsi/libfc/fc_fcp.c | 6 +++--- drivers/scsi/libsas/sas_scsi_host.c | 4 ++-- drivers/scsi/lpfc/lpfc_scsi.c | 22 +++++++++++----------- drivers/scsi/megaraid/megaraid_sas_base.c | 8 ++++---- drivers/scsi/mpi3mr/mpi3mr_os.c | 12 ++++++------ drivers/scsi/mpt3sas/mpt3sas_scsih.c | 16 ++++++++-------- drivers/scsi/myrb.c | 16 ++++++++-------- drivers/scsi/myrs.c | 8 ++++---- drivers/scsi/ncr53c8xx.c | 4 ++-- drivers/scsi/pmcraid.c | 14 +++++++------- drivers/scsi/qla2xxx/qla_os.c | 8 ++++---- drivers/scsi/qla4xxx/ql4_os.c | 6 +++--- drivers/scsi/scsi_debug.c | 12 ++++++------ drivers/scsi/scsi_scan.c | 8 ++++---- drivers/scsi/scsi_sysfs.c | 4 ++-- drivers/scsi/smartpqi/smartpqi_init.c | 8 ++++---- drivers/scsi/snic/snic_main.c | 6 +++--- drivers/scsi/storvsc_drv.c | 2 +- drivers/scsi/sym53c8xx_2/sym_glue.c | 10 +++++----- drivers/scsi/virtio_scsi.c | 2 +- drivers/scsi/xen-scsifront.c | 4 ++-- drivers/ufs/core/ufshcd.c | 12 ++++++------ drivers/usb/image/microtek.c | 4 ++-- drivers/usb/storage/scsiglue.c | 6 +++--- drivers/usb/storage/uas.c | 4 ++-- include/linux/libata.h | 8 ++++---- include/scsi/libfc.h | 2 +- include/scsi/libsas.h | 4 ++-- include/scsi/scsi_device.h | 4 ++-- include/scsi/scsi_host.h | 16 ++++++++-------- 58 files changed, 217 insertions(+), 217 deletions(-) commit 9c76eaf784886603a010f0af7071c2b4d7f574c5 Author: Alice Ryhl <aliceryhl@google.com> Date: Fri Nov 1 09:56:20 2024 +0000 rust: replace lsm context+len with lsm_context This brings the Rust SecurityCtx abstraction [1] up to date with the new API where context+len is replaced with an lsm_context [2] struct. Link: https://lore.kernel.org/r/20240915-alice-file-v10-5-88484f7a3dcf@google.com [1] Link: https://lore.kernel.org/r/20241023212158.18718-3-casey@schaufler-ca.com [2] Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> Closes: https://lore.kernel.org/r/CA+G9fYv_Y2tzs+uYhMGtfUK9dSYV2mFr6WyKEzJazDsdk9o5zw@mail.gmail.com Signed-off-by: Alice Ryhl <aliceryhl@google.com> [PM: subj line tweak] Signed-off-by: Paul Moore <paul@paul-moore.com> rust/helpers/security.c | 8 ++++---- rust/kernel/security.rs | 38 +++++++++++++++++--------------------- 2 files changed, 21 insertions(+), 25 deletions(-) commit a4626e978677e3d3e816fdc217d8416c8b9462ae Author: Casey Schaufler <casey@schaufler-ca.com> Date: Wed Oct 23 14:21:58 2024 -0700 lsm: secctx provider check on release Verify that the LSM releasing the secctx is the LSM that allocated it. This was not necessary when only one LSM could create a secctx, but once there can be more than one it is. Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> [PM: subject tweak] Signed-off-by: Paul Moore <paul@paul-moore.com> security/apparmor/secid.c | 13 +++++-------- security/selinux/hooks.c | 13 +++++-------- 2 files changed, 10 insertions(+), 16 deletions(-) commit b530104f50e86db6f187d39fed5821b3cca755ee Author: Casey Schaufler <casey@schaufler-ca.com> Date: Wed Oct 23 14:21:57 2024 -0700 lsm: lsm_context in security_dentry_init_security Replace the (secctx,seclen) pointer pair with a single lsm_context pointer to allow return of the LSM identifier along with the context and context length. This allows security_release_secctx() to know how to release the context. Callers have been modified to use or save the returned data from the new structure. Cc: ceph-devel@vger.kernel.org Cc: linux-nfs@vger.kernel.org Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> [PM: subject tweak] Signed-off-by: Paul Moore <paul@paul-moore.com> fs/ceph/super.h | 3 +-- fs/ceph/xattr.c | 16 ++++++---------- fs/fuse/dir.c | 35 ++++++++++++++++++----------------- fs/nfs/nfs4proc.c | 20 ++++++++++++-------- include/linux/lsm_hook_defs.h | 2 +- include/linux/security.h | 26 +++----------------------- security/security.c | 9 ++++----- security/selinux/hooks.c | 8 ++++---- 8 files changed, 49 insertions(+), 70 deletions(-) commit 76ecf306ae5da84ef8f48c7a2608736e6866440c Author: Casey Schaufler <casey@schaufler-ca.com> Date: Wed Oct 23 14:21:56 2024 -0700 lsm: use lsm_context in security_inode_getsecctx Change the security_inode_getsecctx() interface to fill a lsm_context structure instead of data and length pointers. This provides the information about which LSM created the context so that security_release_secctx() can use the correct hook. Cc: linux-nfs@vger.kernel.org Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> [PM: subject tweak] Signed-off-by: Paul Moore <paul@paul-moore.com> fs/nfsd/nfs4xdr.c | 26 ++++++++++---------------- include/linux/lsm_hook_defs.h | 4 ++-- include/linux/security.h | 5 +++-- security/security.c | 12 ++++++------ security/selinux/hooks.c | 10 ++++++---- security/smack/smack_lsm.c | 7 ++++--- 6 files changed, 31 insertions(+), 33 deletions(-) commit 5efff64c6be9a236200e026ce8f401b2c62afe32 Author: Vishakha Channapattan <vishakhavc@google.com> Date: Tue Nov 26 22:55:46 2024 +0000 scsi: pm80xx: Improve debugging for aborted commands Improves the debugging capabilities of the driver by adding more context to debug messages: 1. Introduce a new function to show pending commands. 2. Include the tag number in NCQ EH path debug messages. 3. Add logging for ata_tag along with pm80xx tag to map I/Os aborted with ATA logs. Signed-off-by: Vishakha Channapattan <vishakhavc@google.com> Signed-off-by: Salomon Dushimirimana <salomondush@google.com> Link: https://lore.kernel.org/r/20241126225546.975441-1-salomondush@google.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/pm8001/pm8001_hwi.c | 5 ++-- drivers/scsi/pm8001/pm8001_sas.c | 57 ++++++++++++++++++++++++++++++++++++++++ drivers/scsi/pm8001/pm8001_sas.h | 2 ++ drivers/scsi/pm8001/pm80xx_hwi.c | 22 +++++++++++----- 4 files changed, 77 insertions(+), 9 deletions(-) commit 4572541892ea4e1dade2e9c1313d3f8069d37f0a Author: Andrea Righi <arighi@nvidia.com> Date: Wed Nov 20 15:29:03 2024 +0100 sched_ext: Use the NUMA scheduling domain for NUMA optimizations Rely on the NUMA scheduling domain topology, instead of accessing NUMA topology information directly. There is basically no functional change, but in this way we ensure consistent use of the same topology information determined by the scheduling subsystem. Fixes: f6ce6b949304 ("sched_ext: Do not enable LLC/NUMA optimizations when domains overlap") Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org> kernel/sched/ext.c | 114 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 86 insertions(+), 28 deletions(-) commit b64004dbcd239d5eeac0b41c167a306291510d55 Author: Igor Pylypiv <ipylypiv@google.com> Date: Tue Nov 26 22:49:23 2024 +0000 scsi: pm80xx: Increase reserved tags from 8 to 128 Increase the number of reserved tags to prevent command processing failures when the driver is under stress. 8 reserved tags are quickly getting all used up leading to errors when command completions are delayed. The driver needs ~512 ccbs/tags for maximum I/O utilization: 16 (max disks) * 32 (max SATA queue depth) = ~512 ccbs/tags. By reserving 128 tags the driver will still have plenty of tags/ccbs left: 1024 (max ccbs) - 128 (reserved slot) = 896 tags/ccbs left. Signed-off-by: Igor Pylypiv <ipylypiv@google.com> Signed-off-by: Salomon Dushimirimana <salomondush@google.com> Link: https://lore.kernel.org/r/20241126224923.973528-1-salomondush@google.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/pm8001/pm8001_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c567a9d0e009c998125d549dc53ab0d21724a55 Author: Jolly Shah <jollys@google.com> Date: Mon Nov 25 13:33:43 2024 -0800 scsi: pm80xx: Use dynamic tag numbers for PHY start and stop Other commands were not aware if tag 0x01 was in use or not which meant multiple commands could share the same tag number. Prevent tag 0x01 from being used by multiple commands at the same time. Signed-off-by: Jolly Shah <jollys@google.com> Signed-off-by: Terrence Adams <tadamsjr@google.com> Link: https://lore.kernel.org/r/20241125213343.3272478-1-tadamsjr@google.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/pm8001/pm80xx_hwi.c | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) commit 0f630c58e31afb3dc2373bc1126b555f4b480bb2 Author: Igor Pylypiv <ipylypiv@google.com> Date: Thu Nov 21 11:49:15 2024 -0800 scsi: pm80xx: Do not use libsas port ID libsas port IDs can differ from the controller's port IDs. Using libsas port ID to index pm8001_ha->port array is a bug. Remove sas_find_local_port_id(). We can use pm8001_ha->phy[phy_id].port to get the port ID. Signed-off-by: Igor Pylypiv <ipylypiv@google.com> Signed-off-by: Terrence Adams <tadamsjr@google.com> Link: https://lore.kernel.org/r/20241121194915.3039073-1-tadamsjr@google.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/pm8001/pm8001_sas.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit 2d470c778120d3cdb8d8ab250329ca85f49f12b1 Author: Casey Schaufler <casey@schaufler-ca.com> Date: Wed Oct 23 14:21:55 2024 -0700 lsm: replace context+len with lsm_context Replace the (secctx,seclen) pointer pair with a single lsm_context pointer to allow return of the LSM identifier along with the context and context length. This allows security_release_secctx() to know how to release the context. Callers have been modified to use or save the returned data from the new structure. security_secid_to_secctx() and security_lsmproc_to_secctx() will now return the length value on success instead of 0. Cc: netdev@vger.kernel.org Cc: audit@vger.kernel.org Cc: netfilter-devel@vger.kernel.org Cc: Todd Kjos <tkjos@google.com> Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> [PM: subject tweak, kdoc fix, signedness fix from Dan Carpenter] Signed-off-by: Paul Moore <paul@paul-moore.com> drivers/android/binder.c | 5 ++-- include/linux/lsm_hook_defs.h | 5 ++-- include/linux/security.h | 9 +++---- include/net/scm.h | 5 ++-- kernel/audit.c | 9 +++---- kernel/auditsc.c | 16 +++++------- net/ipv4/ip_sockglue.c | 4 +-- net/netfilter/nf_conntrack_netlink.c | 12 ++++----- net/netfilter/nf_conntrack_standalone.c | 4 +-- net/netfilter/nfnetlink_queue.c | 27 ++++++++------------ net/netlabel/netlabel_unlabeled.c | 14 ++++------ net/netlabel/netlabel_user.c | 3 +-- security/apparmor/include/secid.h | 5 ++-- security/apparmor/secid.c | 26 +++++++++---------- security/security.c | 34 +++++++++++-------------- security/selinux/hooks.c | 23 +++++++++++++---- security/smack/smack_lsm.c | 45 +++++++++++++++++++-------------- 17 files changed, 121 insertions(+), 125 deletions(-) commit 6a5abeea9c72e1d2c538622b4cf66c80cc816fd3 Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Date: Mon Dec 2 09:31:39 2024 +0200 x86/mtrr: Rename mtrr_overwrite_state() to guest_force_mtrr_state() Rename the helper to better reflect its function. Suggested-by: Dave Hansen <dave.hansen@intel.com> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Acked-by: Dave Hansen <dave.hansen@intel.com> Link: https://lore.kernel.org/all/20241202073139.448208-1-kirill.shutemov%40linux.intel.com arch/x86/hyperv/ivm.c | 2 +- arch/x86/include/asm/mtrr.h | 10 +++++----- arch/x86/kernel/cpu/mtrr/generic.c | 6 +++--- arch/x86/kernel/cpu/mtrr/mtrr.c | 2 +- arch/x86/kernel/kvm.c | 2 +- arch/x86/xen/enlighten_pv.c | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) commit 841df27d619ee1f5ca6473e15227b39d6136562d Author: Quinn Tran <qutran@marvell.com> Date: Fri Nov 15 18:33:09 2024 +0530 scsi: qla2xxx: Move FCE Trace buffer allocation to user control Currently FCE Tracing is enabled to log additional ELS events. Instead, user will enable or disable this feature through debugfs. Modify existing DFS knob to allow user to enable or disable this feature. echo [1 | 0] > /sys/kernel/debug/qla2xxx/qla2xxx_??/fce cat /sys/kernel/debug/qla2xxx/qla2xxx_??/fce Cc: stable@vger.kernel.org Fixes: df613b96077c ("[SCSI] qla2xxx: Add Fibre Channel Event (FCE) tracing support.") Signed-off-by: Quinn Tran <qutran@marvell.com> Signed-off-by: Nilesh Javali <njavali@marvell.com> Link: https://lore.kernel.org/r/20241115130313.46826-4-njavali@marvell.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/qla2xxx/qla_def.h | 2 + drivers/scsi/qla2xxx/qla_dfs.c | 124 +++++++++++++++++++++++++++++++++------- drivers/scsi/qla2xxx/qla_gbl.h | 3 + drivers/scsi/qla2xxx/qla_init.c | 28 ++++++--- 4 files changed, 126 insertions(+), 31 deletions(-) commit a9a099575d4f24323ae3351b21fe556d37d9e932 Author: Prateek Singh Rathore <prateek.singh.rathore@gmail.com> Date: Sat Nov 23 03:30:38 2024 -0800 scsi: csiostor: Fix typo doesnt->doesn't Signed-off-by: Prateek Singh Rathore <prateek.singh.rathore@gmail.com> Link: https://lore.kernel.org/r/20241123113038.11188-1-prateek.singh.rathore@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/csiostor/csio_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91e11129b9894ef709f3faf13a41ea60d46e7a44 Merge: cdb03e598750 be769e5cf53b Author: Martin K. Petersen <martin.petersen@oracle.com> Date: Wed Dec 4 13:13:00 2024 -0500 Merge patch series "Untie the host lock entanglement - part 2" Avri Altman <avri.altman@wdc.com> says: Here is the 2nd part in the sequel, watering down the scsi host lock usage in the ufs driver. This work is motivated by a comment made by Bart [1], of the abuse of the scsi host lock in the ufs driver. Its Precursor [2] removed the host lock around some of the host register accesses. This part replaces the scsi host lock by dedicated locks serializing access to the clock gating and clock scaling members. Changes compared to v4: - split patch 1 into 2 parts (Bart) - use scoped_guard() for the host_lock as well (Bart) - remove irrelevant comment and use lockdep_assert_held instead (Bart) - improve @lock documentation (Bart) Changes compared to v3: - Keep the host lock when checking ufshcd_state (Bean) Changes compared to v2: - Use clang-format to fix formating (Bart) - Use guard() in ufshcd_clkgate_enable_store (Bart) - Elaborate commit log (Bart) Changes compared to v1: - use the guard() & scoped_guard() macros (Bart) - re-order struct ufs_clk_scaling and struct ufs_clk_gating (Bart) [1] https://lore.kernel.org/linux-scsi/0b031b8f-c07c-42ef-af93-7336439d3c37@acm.org/ [2] https://lore.kernel.org/linux-scsi/20241024075033.562562-1-avri.altman@wdc.com/ Link: https://lore.kernel.org/r/20241124070808.194860-1-avri.altman@wdc.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> commit be769e5cf53b8a45eedcc7354bacf939ae16f72c Author: Avri Altman <avri.altman@wdc.com> Date: Sun Nov 24 09:08:08 2024 +0200 scsi: ufs: core: Introduce a new clock_scaling lock Introduce a new clock scaling lock to serialize access to some of the clock scaling members instead of the host_lock. here also, simplify the code with the guard() macro and co. Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Avri Altman <avri.altman@wdc.com> Link: https://lore.kernel.org/r/20241124070808.194860-5-avri.altman@wdc.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/ufs/core/ufshcd.c | 132 +++++++++++++++++++++------------------------- include/ufs/ufshcd.h | 16 +++--- 2 files changed, 71 insertions(+), 77 deletions(-) commit 209f4e43b8068c24cde227f464111030430153fa Author: Avri Altman <avri.altman@wdc.com> Date: Sun Nov 24 09:08:07 2024 +0200 scsi: ufs: core: Introduce a new clock_gating lock Introduce a new clock gating lock to serialize access to some of the clock gating members instead of the host_lock. While at it, simplify the code with the guard() macro and co for automatic cleanup of the new lock. There are some explicit spin_lock_irqsave()/spin_unlock_irqrestore() snaking instances I left behind because I couldn't make heads or tails of it. Additionally, move the trace_ufshcd_clk_gating() call from inside the region protected by the lock as it doesn't needs protection. Signed-off-by: Avri Altman <avri.altman@wdc.com> Link: https://lore.kernel.org/r/20241124070808.194860-4-avri.altman@wdc.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/ufs/core/ufshcd.c | 109 ++++++++++++++++++++++------------------------ include/ufs/ufshcd.h | 9 +++- 2 files changed, 59 insertions(+), 59 deletions(-) commit 7869c6521f5715688b3d1f1c897374a68544eef0 Author: Avri Altman <avri.altman@wdc.com> Date: Sun Nov 24 09:08:06 2024 +0200 scsi: ufs: core: Prepare to introduce a new clock_gating lock Remove hba->clk_gating.active_reqs check from ufshcd_is_ufs_dev_busy() function to separate clock gating logic from general device busy checks. Signed-off-by: Avri Altman <avri.altman@wdc.com> Link: https://lore.kernel.org/r/20241124070808.194860-3-avri.altman@wdc.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/ufs/core/ufshcd.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit e738ba458e7539be1757dcdf85835a5c7b11fad4 Author: Avri Altman <avri.altman@wdc.com> Date: Sun Nov 24 09:08:05 2024 +0200 scsi: ufs: core: Introduce ufshcd_has_pending_tasks() Prepare to remove hba->clk_gating.active_reqs check from ufshcd_is_ufs_dev_busy(). Signed-off-by: Avri Altman <avri.altman@wdc.com> Link: https://lore.kernel.org/r/20241124070808.194860-2-avri.altman@wdc.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/ufs/core/ufshcd.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit cdb03e598750e7ebc222571aa96653e9b5a59dbe Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Sun Nov 10 23:33:24 2024 +0100 scsi: bsg: Replace zero-length array with flexible array member Replace the deprecated zero-length array with a modern flexible array member in the struct iscsi_bsg_host_vendor_reply. Link: https://github.com/KSPP/linux/issues/78 Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://lore.kernel.org/r/20241110223323.42772-2-thorsten.blum@linux.dev Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> include/scsi/scsi_bsg_iscsi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f8822c4a4209b186ba655841993e5797c31e19e Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Thu Nov 7 11:42:59 2024 +0100 scsi: fnic: Use vcalloc() instead of vmalloc() and memset(0) Use vcalloc() instead of vmalloc() followed by memset(0) to simplify the functions fnic_trace_buf_init() and fnic_fc_trace_init(). Compile-tested only. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://lore.kernel.org/r/20241107104300.1252-1-thorsten.blum@linux.dev Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/fnic/fnic_trace.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit e2f0791124a1b6ca8d570110cbd487969d9d41ef Author: Marco Leogrande <leogrande@google.com> Date: Mon Dec 2 12:45:30 2024 -0800 tools/testing/selftests/bpf/test_tc_tunnel.sh: Fix wait for server bind Commit f803bcf9208a ("selftests/bpf: Prevent client connect before server bind in test_tc_tunnel.sh") added code that waits for the netcat server to start before the netcat client attempts to connect to it. However, not all calls to 'server_listen' were guarded. This patch adds the existing 'wait_for_port' guard after the remaining call to 'server_listen'. Fixes: f803bcf9208a ("selftests/bpf: Prevent client connect before server bind in test_tc_tunnel.sh") Signed-off-by: Marco Leogrande <leogrande@google.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://lore.kernel.org/r/20241202204530.1143448-1-leogrande@google.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/test_tc_tunnel.sh | 1 + 1 file changed, 1 insertion(+) commit 932fc2f19b740da117cfbabcbfe5985f16f79abb Merge: c721d8f8b196 4fec4c22f046 Author: Alexei Starovoitov <ast@kernel.org> Date: Wed Dec 4 08:38:30 2024 -0800 Merge branch 'irq-save-restore' Kumar Kartikeya Dwivedi says: ==================== IRQ save/restore This set introduces support for managing IRQ state from BPF programs. Two new kfuncs, bpf_local_irq_save, and bpf_local_irq_restore are introduced to enable this functionality. Intended use cases are writing IRQ safe data structures (e.g. memory allocator) in BPF programs natively, and use in new spin locking primitives intended to be introduced in the next few weeks. The set begins with some refactoring patches before the actual functionality is introduced. Patch 1 consolidates all resource related state in bpf_verifier_state, and moves it out from bpf_func_state. Patch 2 refactor acquire and release functions for reference state to make them reusable without duplication for other resource types. After this, patch 3 refactors stack slot liveness marking logic to be shared between dynptr, and iterators, in preparation for introducing same logic for irq flag object on stack. Finally, patch 4 and 7 introduce the new kfuncs and their selftests. For more details, please inspect the patch commit logs. Patch 5 makes the error message in case of resource leaks under BPF_EXIT a bit clearer. Patch 6 expands coverage of existing preempt-disable selftest to cover sleepable kfuncs. See individual patches for more details. Changelog: ---------- v5 -> v6 v5: https://lore.kernel.org/bpf/20241129001632.3828611-1-memxor@gmail.com * Add Eduard's Acked-by on patch 2 * Remove gen_id parameter to acquire_reference_state (Alexei) * Remove space before REF_TYPE_LOCK (Alexei) * Fix link to v4 in changelog v4 -> v5 v4: https://lore.kernel.org/bpf/20241127213535.3657472-1-memxor@gmail.com * Do regno - 1 when printing argument * Pass verifier state explicitly into print_{insn,verifier}_state (Eduard) * Pass frameno instead of bpf_func_state (Eduard) * Move bpf_reference_state *refs after parent to fill two holes in bpf_verifier_state (Eduard). The hunk fixing that bug is in the commit adding IRQ save/restore kfuncs, as it is only needed then. * Fix bug in release_reference_state breaking stack property (Eduard) * Add selftest for triggering and reproducing bug found by Eduard irq_ooo_refs_array in final patch * Print insn_idx and active_irq_id on error (Eduard) * Add more acks v3 -> v4 v3: https://lore.kernel.org/bpf/20241127165846.2001009-1-memxor@gmail.com * Add yet another missing kfunc declaration to silence s390 CI v2 -> v3 v2: https://lore.kernel.org/bpf/20241127153306.1484562-1-memxor@gmail.com * Drop REF_TYPE_LOCK_MASK * Add kfunc declarations to selftest to silence s390 CI errors v1 -> v2 v1: https://lore.kernel.org/bpf/20241121005329.408873-1-memxor@gmail.com * Drop reference -> resource renaming in the verifier (Eduard, Alexei) * Change verifier log for check_resource_leak for BPF_EXIT (Eduard) * Remove id parameter from acquire_resource_state, read s->id (Eduard) * Rename erase to release for reference state (Eduard) * Move resource state to bpf_verifier_state (Eduard, Alexei) * Drop unnecessary casting to/from u64 in helpers (Eduard) * Add test for arg != PTR_TO_STACK (Eduard) * Drop now redundant tests (Eduard) * Address some other misc nits * Add Reviewed-by and Acked-by from Eduard ==================== Link: https://patch.msgid.link/20241204030400.208005-1-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> commit 4fec4c22f046a64741a1ae417de718504fd2cda2 Author: Kumar Kartikeya Dwivedi <memxor@gmail.com> Date: Tue Dec 3 19:04:00 2024 -0800 selftests/bpf: Add IRQ save/restore tests Include tests that check for rejection in erroneous cases, like unbalanced IRQ-disabled counts, within and across subprogs, invalid IRQ flag state or input to kfuncs, behavior upon overwriting IRQ saved state on stack, interaction with sleepable kfuncs/helpers, global functions, and out of order restore. Include some success scenarios as well to demonstrate usage. #128/1 irq/irq_save_bad_arg:OK #128/2 irq/irq_restore_bad_arg:OK #128/3 irq/irq_restore_missing_2:OK #128/4 irq/irq_restore_missing_3:OK #128/5 irq/irq_restore_missing_3_minus_2:OK #128/6 irq/irq_restore_missing_1_subprog:OK #128/7 irq/irq_restore_missing_2_subprog:OK #128/8 irq/irq_restore_missing_3_subprog:OK #128/9 irq/irq_restore_missing_3_minus_2_subprog:OK #128/10 irq/irq_balance:OK #128/11 irq/irq_balance_n:OK #128/12 irq/irq_balance_subprog:OK #128/13 irq/irq_global_subprog:OK #128/14 irq/irq_restore_ooo:OK #128/15 irq/irq_restore_ooo_3:OK #128/16 irq/irq_restore_3_subprog:OK #128/17 irq/irq_restore_4_subprog:OK #128/18 irq/irq_restore_ooo_3_subprog:OK #128/19 irq/irq_restore_invalid:OK #128/20 irq/irq_save_invalid:OK #128/21 irq/irq_restore_iter:OK #128/22 irq/irq_save_iter:OK #128/23 irq/irq_flag_overwrite:OK #128/24 irq/irq_flag_overwrite_partial:OK #128/25 irq/irq_ooo_refs_array:OK #128/26 irq/irq_sleepable_helper:OK #128/27 irq/irq_sleepable_kfunc:OK #128 irq:OK Summary: 1/27 PASSED, 0 SKIPPED, 0 FAILED Acked-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20241204030400.208005-8-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/prog_tests/verifier.c | 2 + tools/testing/selftests/bpf/progs/irq.c | 444 ++++++++++++++++++++++ 2 files changed, 446 insertions(+) commit e8c6c80b76e53632992ec345a02c05942aa8f3f2 Author: Kumar Kartikeya Dwivedi <memxor@gmail.com> Date: Tue Dec 3 19:03:59 2024 -0800 selftests/bpf: Expand coverage of preempt tests to sleepable kfunc For preemption-related kfuncs, we don't test their interaction with sleepable kfuncs (we do test helpers) even though the verifier has code to protect against such a pattern. Expand coverage of the selftest to include this case. Acked-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20241204030400.208005-7-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/progs/preempt_lock.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit cbd8730aea8d79cda6b0f3c18b406dfdef0c1b80 Author: Kumar Kartikeya Dwivedi <memxor@gmail.com> Date: Tue Dec 3 19:03:58 2024 -0800 bpf: Improve verifier log for resource leak on exit The verifier log when leaking resources on BPF_EXIT may be a bit confusing, as it's a problem only when finally existing from the main prog, not from any of the subprogs. Hence, update the verifier error string and the corresponding selftests matching on it. Acked-by: Eduard Zingerman <eddyz87@gmail.com> Suggested-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20241204030400.208005-6-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/verifier.c | 2 +- tools/testing/selftests/bpf/progs/exceptions_fail.c | 4 ++-- tools/testing/selftests/bpf/progs/preempt_lock.c | 14 +++++++------- tools/testing/selftests/bpf/progs/verifier_spin_lock.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) commit c8e2ee1f3df05dc4caa746c062c6b5791c745c79 Author: Kumar Kartikeya Dwivedi <memxor@gmail.com> Date: Tue Dec 3 19:03:57 2024 -0800 bpf: Introduce support for bpf_local_irq_{save,restore} Teach the verifier about IRQ-disabled sections through the introduction of two new kfuncs, bpf_local_irq_save, to save IRQ state and disable them, and bpf_local_irq_restore, to restore IRQ state and enable them back again. For the purposes of tracking the saved IRQ state, the verifier is taught about a new special object on the stack of type STACK_IRQ_FLAG. This is a 8 byte value which saves the IRQ flags which are to be passed back to the IRQ restore kfunc. Renumber the enums for REF_TYPE_* to simplify the check in find_lock_state, filtering out non-lock types as they grow will become cumbersome and is unecessary. To track a dynamic number of IRQ-disabled regions and their associated saved states, a new resource type RES_TYPE_IRQ is introduced, which its state management functions: acquire_irq_state and release_irq_state, taking advantage of the refactoring and clean ups made in earlier commits. One notable requirement of the kernel's IRQ save and restore API is that they cannot happen out of order. For this purpose, when releasing reference we keep track of the prev_id we saw with REF_TYPE_IRQ. Since reference states are inserted in increasing order of the index, this is used to remember the ordering of acquisitions of IRQ saved states, so that we maintain a logical stack in acquisition order of resource identities, and can enforce LIFO ordering when restoring IRQ state. The top of the stack is maintained using bpf_verifier_state's active_irq_id. To maintain the stack property when releasing reference states, we need to modify release_reference_state to instead shift the remaining array left using memmove instead of swapping deleted element with last that might break the ordering. A selftest to test this subtle behavior is added in late patches. The logic to detect initialized and unitialized irq flag slots, marking and unmarking is similar to how it's done for iterators. No additional checks are needed in refsafe for REF_TYPE_IRQ, apart from the usual check_id satisfiability check on the ref[i].id. We have to perform the same check_ids check on state->active_irq_id as well. To ensure we don't get assigned REF_TYPE_PTR by default after acquire_reference_state, if someone forgets to assign the type, let's also renumber the enum ref_state_type. This way any unassigned types get caught by refsafe's default switch statement, don't assume REF_TYPE_PTR by default. The kfuncs themselves are plain wrappers over local_irq_save and local_irq_restore macros. Acked-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20241204030400.208005-5-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> include/linux/bpf_verifier.h | 7 +- kernel/bpf/helpers.c | 17 +++ kernel/bpf/log.c | 1 + kernel/bpf/verifier.c | 299 ++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 320 insertions(+), 4 deletions(-) commit b79f5f54e1dcc4880ae8947aeb8734d93ff7b9a3 Author: Kumar Kartikeya Dwivedi <memxor@gmail.com> Date: Tue Dec 3 19:03:56 2024 -0800 bpf: Refactor mark_{dynptr,iter}_read There is possibility of sharing code between mark_dynptr_read and mark_iter_read for updating liveness information of their stack slots. Consolidate common logic into mark_stack_slot_obj_read function in preparation for the next patch which needs the same logic for its own stack slots. Acked-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20241204030400.208005-4-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/verifier.c | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) commit 769b0f1c821455ab29baf42491e1ea1d726451fa Author: Kumar Kartikeya Dwivedi <memxor@gmail.com> Date: Tue Dec 3 19:03:55 2024 -0800 bpf: Refactor {acquire,release}_reference_state In preparation for introducing support for more reference types which have to add and remove reference state, refactor the acquire_reference_state and release_reference_state functions to share common logic. The acquire_reference_state function simply handles growing the acquired refs and returning the pointer to the new uninitialized element, which can be filled in by the caller. The release_reference_state function simply erases a reference state entry in the acquired_refs array and shrinks it. The callers are responsible for finding the suitable element by matching on various fields of the reference state and requesting deletion through this function. It is not supposed to be called directly. Existing callers of release_reference_state were using it to find and remove state for a given ref_obj_id without scrubbing the associated registers in the verifier state. Introduce release_reference_nomark to provide this functionality and convert callers. We now use this new release_reference_nomark function within release_reference as well. It needs to operate on a verifier state instead of taking verifier env as mark_ptr_or_null_regs requires operating on verifier state of the two branches of a NULL condition check, therefore env->cur_state cannot be used directly. Acked-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20241204030400.208005-3-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/bpf/verifier.c | 109 +++++++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 50 deletions(-) commit 1995edc5f9089ecb8b77a34f21e4abd8f887b856 Author: Kumar Kartikeya Dwivedi <memxor@gmail.com> Date: Tue Dec 3 19:03:54 2024 -0800 bpf: Consolidate locks and reference state in verifier state Currently, state for RCU read locks and preemption is in bpf_verifier_state, while locks and pointer reference state remains in bpf_func_state. There is no particular reason to keep the latter in bpf_func_state. Additionally, it is copied into a new frame's state and copied back to the caller frame's state everytime the verifier processes a pseudo call instruction. This is a bit wasteful, given this state is global for a given verification state / path. Move all resource and reference related state in bpf_verifier_state structure in this patch, in preparation for introducing new reference state types in the future. Since we switch print_verifier_state and friends to print using vstate, we now need to explicitly pass in the verifier state from the caller along with the bpf_func_state, so modify the prototype and callers to do so. To ensure func state matches the verifier state when we're printing data, take in frame number instead of bpf_func_state pointer instead and avoid inconsistencies induced by the caller. Acked-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20241204030400.208005-2-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> include/linux/bpf_verifier.h | 19 +++--- kernel/bpf/log.c | 20 ++++--- kernel/bpf/verifier.c | 140 ++++++++++++++++++++----------------------- 3 files changed, 88 insertions(+), 91 deletions(-) commit 9bc5e7dc694d3112bbf0fa4c46ef0fa0f114937a Author: Jiasheng Jiang <jiashengjiangcool@outlook.com> Date: Wed Nov 27 20:10:42 2024 +0000 drm/i915: Fix memory leak by correcting cache object name in error handler Replace "slab_priorities" with "slab_dependencies" in the error handler to avoid memory leak. Fixes: 32eb6bcfdda9 ("drm/i915: Make request allocation caches global") Cc: <stable@vger.kernel.org> # v5.2+ Signed-off-by: Jiasheng Jiang <jiashengjiangcool@outlook.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241127201042.29620-1-jiashengjiangcool@gmail.com drivers/gpu/drm/i915/i915_scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a90aae3b25b72e639da6062e0dc5efb9cff58f1 Author: Gerhard Engleder <eg@keba.com> Date: Mon Dec 2 20:40:03 2024 +0100 spi: spi-kspi2: Add KEBA SPI controller support The KEBA SPI controller is found in the system FPGA of KEBA PLC devices. It is used to connect the SPI flash chip of the FPGA and some SPI devices. It is a simple SPI controller with configurable speed. The hardware supports only single byte transfers. There are no FIFOs or interrupts. Signed-off-by: Gerhard Engleder <eg@keba.com> Link: https://patch.msgid.link/20241202194003.57679-1-gerhard@engleder-embedded.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/Kconfig | 12 ++ drivers/spi/Makefile | 1 + drivers/spi/spi-kspi2.c | 431 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 444 insertions(+) commit 0a4edbeef1e415f2eeaaae01b129f53f33c24d95 Author: Dave Penkler <dpenkler@gmail.com> Date: Wed Dec 4 15:57:11 2024 +0100 staging: gpib: Remove duplicate include linux/uaccess.h is included more than once. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202410110406.mQENnj09-lkp@intel.com/ Signed-off-by: Dave Penkler <dpenkler@gmail.com> Link: https://lore.kernel.org/r/20241204145713.11889-3-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 1 - 1 file changed, 1 deletion(-) commit 2ff5bc6f5b4bb531907a9a2f57aec764c57fd4cb Author: Dave Penkler <dpenkler@gmail.com> Date: Wed Dec 4 15:57:10 2024 +0100 staging: gpib: Remove useless include linux/version.h not needed. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202410102259.zcoS9Eiu-lkp@intel.com/ Signed-off-by: Dave Penkler <dpenkler@gmail.com> Link: https://lore.kernel.org/r/20241204145713.11889-2-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 1 - 1 file changed, 1 deletion(-) commit 724cc0cc17d9431f59b69f1e1d22c880c1e7ba60 Author: Prarit Bhargava <prarit@redhat.com> Date: Mon Dec 2 11:03:57 2024 -0500 staging: Fix tnt4882 license to be SPDX compliant "GPL-2" is not a valid SPDX license identifier[1]. Update to SPDX compliant string "GPL-2.0-only". [1] https://spdx.org/licenses Signed-off-by: Prarit Bhargava <prarit@redhat.com> Cc: Dave Penkler <dpenkler@gmail.com> Cc: Rohit Chavan <roheetchavan@gmail.com> Signed-off-by: Prarit Bhargava <prarit@redhat.com> Link: https://lore.kernel.org/r/20241202160404.262993-1-prarit@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/gpib/tnt4882/mite.c | 2 +- drivers/staging/gpib/tnt4882/mite.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit da6c337a8c075de5bf96139321fa4f67e004dd38 Author: Marcelo Moreira <marcelomoreira1905@gmail.com> Date: Sat Nov 23 18:03:06 2024 -0300 staging: rtl8723bs: change pointer initialization style Separated pdata and ptail initialization for clarity and to avoid potential issues. Signed-off-by: Marcelo Moreira <marcelomoreira1905@gmail.com> Link: https://lore.kernel.org/r/20241123210329.70906-1-marcelomoreira1905@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/rtl8723bs/core/rtw_xmit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 642aadf148573d0b6c43707593ff144e0aaea9a6 Author: Paolo Perego <pperego@suse.de> Date: Wed Nov 20 14:57:27 2024 +0100 staging:fbtft: Using str_true_false() helper instead of hardcoded strings Using str_true_false() helper instead of hardcoded strings. Signed-off-by: Paolo Perego <pperego@suse.de> Link: https://lore.kernel.org/r/20241120135727.376556-1-pperego@suse.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/staging/fbtft/fb_ssd1351.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6fba89813ccf333d2bc4d5caea04cd5f3c39eb50 Author: Casey Schaufler <casey@schaufler-ca.com> Date: Wed Oct 23 14:21:54 2024 -0700 lsm: ensure the correct LSM context releaser Add a new lsm_context data structure to hold all the information about a "security context", including the string, its size and which LSM allocated the string. The allocation information is necessary because LSMs have different policies regarding the lifecycle of these strings. SELinux allocates and destroys them on each use, whereas Smack provides a pointer to an entry in a list that never goes away. Update security_release_secctx() to use the lsm_context instead of a (char *, len) pair. Change its callers to do likewise. The LSMs supporting this hook have had comments added to remind the developer that there is more work to be done. The BPF security module provides all LSM hooks. While there has yet to be a known instance of a BPF configuration that uses security contexts, the possibility is real. In the existing implementation there is potential for multiple frees in that case. Cc: linux-integrity@vger.kernel.org Cc: netdev@vger.kernel.org Cc: audit@vger.kernel.org Cc: netfilter-devel@vger.kernel.org To: Pablo Neira Ayuso <pablo@netfilter.org> Cc: linux-nfs@vger.kernel.org Cc: Todd Kjos <tkjos@google.com> Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> [PM: subject tweak] Signed-off-by: Paul Moore <paul@paul-moore.com> drivers/android/binder.c | 24 ++++++++++---------- fs/ceph/xattr.c | 6 ++++- fs/nfs/nfs4proc.c | 8 +++++-- fs/nfsd/nfs4xdr.c | 8 +++++-- include/linux/lsm_hook_defs.h | 2 +- include/linux/security.h | 35 +++++++++++++++++++++++++++-- include/net/scm.h | 11 ++++----- kernel/audit.c | 30 ++++++++++++------------- kernel/auditsc.c | 23 ++++++++++--------- net/ipv4/ip_sockglue.c | 10 ++++----- net/netfilter/nf_conntrack_netlink.c | 10 ++++----- net/netfilter/nf_conntrack_standalone.c | 9 ++++---- net/netfilter/nfnetlink_queue.c | 13 +++++++---- net/netlabel/netlabel_unlabeled.c | 40 +++++++++++++++------------------ net/netlabel/netlabel_user.c | 11 +++++---- security/apparmor/include/secid.h | 2 +- security/apparmor/secid.c | 11 +++++++-- security/security.c | 8 +++---- security/selinux/hooks.c | 11 +++++++-- 19 files changed, 165 insertions(+), 107 deletions(-) commit 535a07698b8b3e6f305673102d297262cae2360a Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Wed Dec 4 05:09:22 2024 +0200 serial: 8250_pci: Share WCH IDs with parport_serial driver parport_serial driver uses subset of WCH IDs that are present in 8250_pci. Share them via pci_ids.h and switch parport_serial to use defined constants. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20241204031114.1029882-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/parport/parport_serial.c | 12 ++++++++---- drivers/tty/serial/8250/8250_pci.c | 10 ++-------- include/linux/pci_ids.h | 11 +++++++++++ 3 files changed, 21 insertions(+), 12 deletions(-) commit 16076ca3a1565491bcb28689e555d569a39391c7 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Wed Dec 4 05:09:21 2024 +0200 serial: 8250_pci: Resolve WCH vendor ID ambiguity There are two sites of the same brand: wch.cn and wch-ic.com. They are property of the same company, but it appears that they managed to get two different PCI vendor IDs. Rename them accordingly using standard pattern, i.e. PCI_VENDOR_ID_... While at it, move to PCI_VDEVICE() in the ID tables. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20241204031114.1029882-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/8250/8250_pci.c | 82 +++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 41 deletions(-) commit 5a6a3b0a526838d11afaa3f27501d7804faf3743 Author: Zhu Jun <zhujun2@cmss.chinamobile.com> Date: Tue Dec 3 01:54:28 2024 -0800 serial: mpc52xx: Fix typo in mpc52xx_uart.c The word 'accoding' is wrong, so fix it. Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241203095428.8559-1-zhujun2@cmss.chinamobile.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/mpc52xx_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b81e0211e9c70be9eb70924e4e29698bfbbbc03a Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Tue Nov 19 09:58:00 2024 +0530 wifi: mac80211_hwsim: add 6 GHz EHT Mesh capabilities To facilitate testing of mesh EHT 320 MHz, add support for advertising this capability. Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> Link: https://patch.msgid.link/20241119-mesh_320mhz_support-v1-2-f9463338d584@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> drivers/net/wireless/virtual/mac80211_hwsim.c | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit d828c6726fe5642d1c71e9edbc4799c959b471cf Author: Biju Das <biju.das.jz@bp.renesas.com> Date: Fri Nov 22 12:45:37 2024 +0000 dt-bindings: serial: renesas: Document RZ/G3E (r9a09g047) scif Document scif bindings for the Renesas RZ/G3E (a.k.a r9a09g047) SoC. SCIF interface in Renesas RZ/G3E is similar to the one available in RZ/V2H. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241122124558.149827-2-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/devicetree/bindings/serial/renesas,scif.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit b63a95d35f7ff59329257cfd31f990b3b295a242 Author: Sathishkumar Muruganandam <quic_murugana@quicinc.com> Date: Tue Nov 19 09:57:59 2024 +0530 wifi: mac80211: add EHT 320 MHz support for mesh Currently, ieee80211_ie_build_he_oper() lacks support for 320 MHz handling (already noted as a TODO). This is because 320 MHz is not included in IEEE 802.11-ax. However, IEEE 802.11-be introduces 320 MHz support and if the chandef indicates a 320 MHz bandwidth and is used directly as it is, it will result in an incorrect HE Operation Information Element. In order to support EHT 320 MHz, HE Operation Element should indicate bandwidth as 160 MHz only. In EHT Operation IE, the correct bandwidth will be present. Devices capable of EHT can parse EHT Information Element and connect in 320 MHz and other HE capable devices can parse HE and can connect in 160 MHz. Add support to downgrade the bandwidth in ieee80211_ie_build_he_oper() during 320 MHz operation and advertise it. Signed-off-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com> Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> Link: https://patch.msgid.link/20241119-mesh_320mhz_support-v1-1-f9463338d584@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> net/mac80211/util.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 4f85a3b370e6f1a353cfbbfb5c398590dfeca9d7 Author: Dylan Eskew <dylan.eskew@candelatech.com> Date: Wed Nov 13 06:46:08 2024 -0800 wifi: mac80211: ethtool: add monitor channel reporting When running ethtool on a monitor interface, the channel wasn't reporting properly. This adds logic to properly report the channel for monitor interfaces in ethtool. Signed-off-by: Dylan Eskew <dylan.eskew@candelatech.com> Link: https://patch.msgid.link/20241113144608.334060-1-dylan.eskew@candelatech.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> net/mac80211/ethtool.c | 4 ++++ 1 file changed, 4 insertions(+) commit be0cf843706058facc5dc4360f9619eef74accd9 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Mon Nov 25 12:33:05 2024 +0200 serial: 8250_port: Assign UPIO_UNKNOWN instead of its direct value serial8250_init_port() assings 0xFF for the unset or unknown port IO type, use predefined constant for that instead. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20241125103305.1614986-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/8250/8250_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1117a2fefbcce30cced3a180585e0adebc0fa89 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Tue Dec 3 17:30:29 2024 +0100 serial: sh-sci: Use plain struct copy in early_console_setup() Using memcpy() prevents the compiler from doing any checking on the types of the passed pointer parameters. Copy the structure using struct assignment instead, to increase type-safety. No change in generated code on all relevant architectures (arm/arm64/riscv/sh). Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://lore.kernel.org/r/e097e5c11afe5bd4c01135779c9a40e707ef6374.1733243287.git.geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/sh-sci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcf5402d7878f201f3104292623ce3ebe99e61cd Author: Tobias Klauser <tklauser@distanz.ch> Date: Tue Dec 3 14:17:27 2024 +0100 serial: altera_jtaguart: Use KBUILD_MODNAME There is no need to redefine the driver name. Use KBUILD_MODNAME and get rid of DRV_NAME altogether. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/linux-serial/2024120337-unending-renewed-8e7e@gregkh/ Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Link: https://lore.kernel.org/r/20241203131727.9078-1-tklauser@distanz.ch Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/altera_jtaguart.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit b8c8748b60ac15d0536c46c6b0d514483e46486c Author: Tobias Klauser <tklauser@distanz.ch> Date: Tue Dec 3 14:25:56 2024 +0100 serial: altera_jtaguart: Use device name when requesting IRQ The request_irq name parameter should be the device name, not the driver name. This leads to more informative information in /proc/interrupts. Before this patch: $ cat /proc/interrupts ... 40: 123 0 GIC-0 72 Level altera_jtaguart After this patch: $ cat /proc/interrupts ... 40: 6 0 GIC-0 72 Level ff200100.fpga-juart0 Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Link: https://lore.kernel.org/r/20241203132556.14182-1-tklauser@distanz.ch Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/tty/serial/altera_jtaguart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8d936c51388442f769a81e512b505dcf87c6a51 Author: Dingyan Li <18500469033@163.com> Date: Wed Oct 30 16:38:58 2024 +0800 usb: storage: add a macro for the upper limit of max LUN The meaning of this value is already used in several places, but with constant values and comments to explain it separately. It's better to have a central place to do this then use the macro in those places for better readability. Signed-off-by: Dingyan Li <18500469033@163.com> Reviewed-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20241030083858.46907-1-18500469033@163.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/gadget/function/f_tcm.c | 8 ++------ drivers/usb/gadget/function/storage_common.h | 2 +- drivers/usb/storage/transport.c | 8 ++------ include/linux/usb/storage.h | 8 ++++++++ 4 files changed, 13 insertions(+), 13 deletions(-) commit 3b56774fa25d46bd2ff3707546e30829f52dde9e Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Tue Nov 26 11:20:41 2024 +0200 dt-bindings: usb: renesas,usbhs: Document RZ/G3S SoC The USBHS IP block on RZ/G3S SoC is identitcal to the one found on the RZ/G2L device. Document the RZ/G3S USBHS IP block. Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://lore.kernel.org/r/20241126092050.1825607-7-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/devicetree/bindings/usb/renesas,usbhs.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 24dab555ad5951824e3fb6b665aaca84ac69dd12 Author: Rameshkumar Sundaram <quic_ramess@quicinc.com> Date: Mon Nov 25 14:02:17 2024 +0530 wifi: mac80211: get tx power per link ML interfaces can have multiple affiliated links to it and hence there is a need to report tx power of specified link rather deflink. Add changes to report tx power of requested link from mac80211, also pass link id as an argument in get_tx_power op so that supported drivers can use it to report link's tx power. Co-developed-by: Aaradhana Sahu <quic_aarasahu@quicinc.com> Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com> Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com> Link: https://patch.msgid.link/20241125083217.216095-3-quic_ramess@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> drivers/net/wireless/ath/ath11k/mac.c | 1 + drivers/net/wireless/ath/ath9k/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mac80211.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76.h | 2 +- include/net/mac80211.h | 2 +- net/mac80211/cfg.c | 15 +++++++++++---- net/mac80211/driver-ops.h | 7 ++++--- net/mac80211/trace.h | 10 ++++++---- 8 files changed, 26 insertions(+), 15 deletions(-) commit 7a53af85d3bbdbe06cd47b81a6d99a04dc0a3963 Author: Rameshkumar Sundaram <quic_ramess@quicinc.com> Date: Mon Nov 25 14:02:16 2024 +0530 wifi: cfg80211: send MLO links tx power info in GET_INTERFACE Currently, TX power is reported on interface/wdev level as part of NL80211_CMD_GET_INTERFACE. With MLO, Multiple links can be part of an interface/wdev and hence its necessary to report the TX power of each link. Add support to send tx power for all valid links of an MLD as part of NL80211_CMD_GET_INTERFACE request. As far as userspace is concerned, there is no behavioral change for Non-ML Interfaces. For ML interfaces, userspace should fetch TX power that is nested inside NL80211_ATTR_MLO_LINKS, similar to how channel info(NL80211_ATTR_WIPHY_FREQ) is fetched. Co-developed-by: Aaradhana Sahu <quic_aarasahu@quicinc.com> Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com> Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com> Link: https://patch.msgid.link/20241125083217.216095-2-quic_ramess@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> drivers/net/wireless/ath/ath6kl/cfg80211.c | 1 + .../broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +- drivers/net/wireless/microchip/wilc1000/cfg80211.c | 2 +- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 2 +- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 3 +- include/net/cfg80211.h | 2 +- net/mac80211/cfg.c | 1 + net/wireless/nl80211.c | 13 ++++++- net/wireless/rdev-ops.h | 7 ++-- net/wireless/trace.h | 44 +++++++++++----------- net/wireless/wext-compat.c | 2 +- 12 files changed, 47 insertions(+), 34 deletions(-) commit d9b4067aef50aa7a13d1a9fbb4e35bdea6804ff3 Author: Duan Chenghao <duanchenghao@kylinos.cn> Date: Thu Oct 24 10:40:38 2024 +0800 USB: Fix the issue of task recovery failure caused by USB status when S4 wakes up When a device is inserted into the USB port and an S4 wakeup is initiated, after the USB-hub initialization is completed, it will automatically enter suspend mode. Upon detecting a device on the USB port, it will proceed with resume and set the hcd to the HCD_FLAG_WAKEUP_PENDING state. During the S4 wakeup process, peripherals are put into suspend mode, followed by task recovery. However, upon detecting that the hcd is in the HCD_FLAG_WAKEUP_PENDING state, it will return an EBUSY status, causing the S4 suspend to fail and subsequent task recovery to not proceed. - [ 27.594598][ 1] PM: pci_pm_freeze(): hcd_pci_suspend+0x0/0x28 returns -16 [ 27.594601][ 1] PM: dpm_run_callback(): pci_pm_freeze+0x0/0x100 returns -16 [ 27.603420][ 1] ehci-pci 0000:00:04.1: pci_pm_freeze+0x0/0x100 returned 0 after 3 usecs [ 27.612233][ 1] ehci-pci 0000:00:05.1: pci_pm_freeze+0x0/0x100 returned -16 after 17223 usecs [ 27.810067][ 1] PM: Device 0000:00:05.1 failed to quiesce async: error -16 [ 27.816988][ 1] PM: quiesce of devices aborted after 1833.282 msecs [ 27.823302][ 1] PM: start quiesce of devices aborted after 1839.975 msecs ...... [ 31.303172][ 1] PM: recover of devices complete after 3473.039 msecs [ 31.309818][ 1] PM: Failed to load hibernation image, recovering. [ 31.348188][ 1] PM: Basic memory bitmaps freed [ 31.352686][ 1] OOM killer enabled. [ 31.356232][ 1] Restarting tasks ... done. [ 31.360609][ 1] PM: resume from hibernation failed (0) [ 31.365800][ 1] PM: Hibernation image not present or could not be loaded. The "do_wakeup" is determined based on whether the controller's power/wakeup attribute is set. The current issue necessitates considering the type of suspend that is occurring. If the suspend type is either PM_EVENT_FREEZE or PM_EVENT_QUIESCE, then "do_wakeup" should be set to false. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202410151722.rfjtknRz-lkp@intel.com/ Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Duan Chenghao <duanchenghao@kylinos.cn> Link: https://lore.kernel.org/r/20241024024038.26157-1-duanchenghao@kylinos.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/core/hcd-pci.c | 15 +++++++++++++-- include/linux/pm.h | 3 ++- 2 files changed, 15 insertions(+), 3 deletions(-) commit 89da9eba122d3da8d2994c30d6d5e490a745d0b2 Author: André Draszik <andre.draszik@linaro.org> Date: Tue Dec 3 12:17:35 2024 +0000 dt-bindings: usb: max33359: add max77759-tcpci flavor Maxim's MAX77759 is a companion PMIC for USB Type-C applications. It comprises the following in one package: * top (including GPIO) * charger * fuel gauge * TCPCi While in the same package, TCPCi and Fuel Gauge have separate I2C addresses, interrupt lines and interrupt status registers and can be treated independently. While the TCPCi part appears identical to max33359 on the surface, it should still have a dedicated compatible, though, as it is a different implementation. This will allow for handling differences in case they are discovered in the future. max77759 is used on Google Pixel 6 and Pixel 6 Pro. Add a dedicated compatible, maxim,max77759-tcpci, to allow for potential differences in the future. Signed-off-by: André Draszik <andre.draszik@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241203-dtbinding-max77759-v3-1-e1a1d86aca8e@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/devicetree/bindings/usb/maxim,max33359.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4e3a841c47bbf985782a9f761d57f2f999e1d31b Author: Juan José Arboleda <soyjuanarbol@gmail.com> Date: Mon Aug 19 16:45:20 2024 -0500 wifi: iwlwifi: mvm: Replace spaces for tabs in iwl_mvm_vendor_events_idx This patch replaces spaces with tabs in the affected source files to adhere to the Linux kernel coding style guidelines. This change is purely stylistic and do not affect the functionality of the code. Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com> Link: https://patch.msgid.link/715c74c74b336bed81e92e1336bd1a6ddb7b90ff.1724103043.git.soyjuanarbol@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 990c2a26f703f6558042d97e7abdeb3360bb6a63 Author: Xu Yang <xu.yang_2@nxp.com> Date: Mon Dec 2 16:34:53 2024 +0800 usb: chipidea: host: Improve port index sanitizing Coverity from Synopsys complains "Illegal address computation (OVERRUN)" on status_reg. After below code executed, port_index = wIndex & 0xff; port_index -= (port_index > 0); the static analysis tool see the value of port_index is now between 0 and 254 (inclusive). However, ehci_def.h define port_status as below: #define HCS_N_PORTS_MAX 15 u32 port_status[HCS_N_PORTS_MAX]; So the tool think illegal array pointer may be obtained. status_reg = &ehci->regs->port_status[port_index]; This will follow "846cbf98cbef USB: EHCI: Improve port index sanitizing" to improve port index sanitizing. Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Acked-by: Peter Chen <peter.chen@kernel.org> Link: https://lore.kernel.org/r/20241202083453.704533-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/chipidea/host.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit d1028b5748164e3ddd6d2bb0bbceee846ed2fc71 Author: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Date: Wed Nov 27 14:29:47 2024 +0200 dt-bindings: media: qcom,sm8250-camss: Fix interrupt types Qualcomm IP catalog says that all CAMSS interrupts are edge rising, fix it in the documented example from CAMSS device tree bindings for SM8250 SoC. Fixes: 46f8ac8497c5 ("media: dt-bindings: media: camss: Add qcom,sm8250-camss binding") Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../bindings/media/qcom,sm8250-camss.yaml | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 349396bb55c4dfaa3b8cb0415c782af555e21c8a Author: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Date: Wed Nov 27 14:29:46 2024 +0200 dt-bindings: media: qcom,sdm845-camss: Fix interrupt types Qualcomm IP catalog says that all CAMSS interrupts are edge rising, fix it in the documented example from CAMSS device tree bindings for sdm845 SoC. Fixes: d1d5ce260165 ("media: dt-bindings: media: camss: Add qcom,sdm845-camss binding") Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../devicetree/bindings/media/qcom,sdm845-camss.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit c04e4bae9097a1ac62c6e8b1e0c485274f56a720 Author: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Date: Wed Nov 27 14:29:45 2024 +0200 dt-bindings: media: qcom,sc8280xp-camss: Fix interrupt types Qualcomm IP catalog says that all CAMSS interrupts are edge rising, fix it in the documented example from CAMSS device tree bindings for sc8280xp SoC. Fixes: bc5191e5799e ("media: dt-bindings: media: camss: Add qcom,sc8280xp-camss binding") Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../bindings/media/qcom,sc8280xp-camss.yaml | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 13c4f7714c6a1ecf748a2f22099447c14fe6ed8c Author: Zichen Xie <zichenxie0106@gmail.com> Date: Fri Nov 15 00:38:36 2024 -0600 wifi: cfg80211: tests: Fix potential NULL dereference in test_cfg80211_parse_colocated_ap() kunit_kzalloc() may return NULL, dereferencing it without NULL check may lead to NULL dereference. Add a NULL check for ies. Fixes: 45d43937a44c ("wifi: cfg80211: add a kunit test for 6 GHz colocated AP parsing") Signed-off-by: Zichen Xie <zichenxie0106@gmail.com> Link: https://patch.msgid.link/20241115063835.5888-1-zichenxie0106@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> net/wireless/tests/scan.c | 2 ++ 1 file changed, 2 insertions(+) commit 8e66f6c6738e5b458345cd5f75ef6da035d95599 Author: Johannes Berg <johannes.berg@intel.com> Date: Fri Nov 22 09:42:26 2024 +0100 wifi: mac80211: use wiphy guard The wiphy guard simplifies some code here, so use it. Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20241122094225.cea65b2d2fd4.Icc168c4bbeddec98ea096aee9077211a7b88b69e@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> net/mac80211/debugfs.c | 4 ++-- net/mac80211/ethtool.c | 18 ++++++------------ net/mac80211/iface.c | 25 +++++++++---------------- 3 files changed, 17 insertions(+), 30 deletions(-) commit f42d22d3f79639c1b4e41daf28dad2505d6a5a8b Author: Johannes Berg <johannes.berg@intel.com> Date: Fri Nov 22 09:42:25 2024 +0100 wifi: cfg80211: define and use wiphy guard Define a guard for the wiphy mutex, and use it in most code in cfg80211, though not all due to some interaction with RTNL and/or indentation. Suggested-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20241122094225.88765cbaab65.I610c9b14f36902e75e1d13f0db29f8bef2298804@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> include/net/cfg80211.h | 4 + net/wireless/chan.c | 4 +- net/wireless/core.c | 42 +++--- net/wireless/mlme.c | 8 +- net/wireless/nl80211.c | 190 ++++++++++----------------- net/wireless/pmsr.c | 4 +- net/wireless/reg.c | 55 ++++---- net/wireless/scan.c | 40 +++--- net/wireless/sme.c | 12 +- net/wireless/util.c | 7 +- net/wireless/wext-compat.c | 317 ++++++++++++++++----------------------------- net/wireless/wext-sme.c | 43 +++--- 12 files changed, 278 insertions(+), 448 deletions(-) commit bee404e14477917c2e15f78b2ad1ea443939720c Author: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Date: Tue Dec 3 22:28:50 2024 +0200 wifi: mac80211: Accept authentication frames on P2P device This is needed for PASN based P2P pairing. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241203222744.6ee3ef9f1374.Ib3074ffbe7b296e0f162b2543e84346b190dfbeb@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> net/mac80211/main.c | 9 +++++++-- net/mac80211/rx.c | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) commit b3347d7d618dbe94c73b4091781cb99023f295b6 Author: Caleb Connolly <caleb.connolly@linaro.org> Date: Thu Nov 28 15:01:36 2024 -0500 media: qcom: camss: document csiphy_lanes_cfg structure Add documentation for struct csiphy_lanes_cfg. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Signed-off-by: David Heidelberg <david@ixit.cz> Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> [hverkuil: added missing commit description] drivers/media/platform/qcom/camss/camss-csiphy.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 04d5b4c23f3b7cbf44a71a338dae0c7aabd86c29 Author: Faisal Hassan <quic_faisalh@quicinc.com> Date: Fri Nov 29 23:04:22 2024 +0530 usb: dwc3: core: Disable USB2 retry for DWC_usb31 1.80a and prior STAR 9001346572 addresses a USB 2.0 endpoint blocking issue in host mode for controller versions DWC_usb31 1.70a and 1.80a. This issue affects devices on both high-speed and full-speed bus instances. When all endpoint caches are filled and a single active endpoint receives continuous NAK responses, data transfers to other endpoints may get blocked. To resolve this, for controller versions DWC_usb31 1.70a and 1.80a, the GUCTL3 bit[16] (USB2.0 Internal Retry Disable) is set to 1. This bit disables the USB2.0 internal retry feature and ensures proper eviction handling in the host controller endpoind cache. The GUCTL3[16] register function is available only from DWC_usb31 version 1.70a. Signed-off-by: Faisal Hassan <quic_faisalh@quicinc.com> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/20241129173422.20063-1-quic_faisalh@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/dwc3/core.c | 20 ++++++++++++++++++++ drivers/usb/dwc3/core.h | 1 + 2 files changed, 21 insertions(+) commit a787bffff5d14545c8e2d061b6f7839ede8ead19 Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Sat Nov 16 12:17:52 2024 +0100 dt-bindings: usb: qcom,dwc3: Make ss_phy_irq optional for X1E80100 X1 has multiple DWC3 hosts, including one that's USB2, which naturally means it doesn't have a SuperSpeed interrupt. Make it optional to fix warnings such as: usb@a2f8800: interrupt-names: ['pwr_event', 'dp_hs_phy_irq', 'dm_hs_phy_irq'] is too short Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241116-topic-x1e_usb2_bindings-v1-1-dde2d63f428f@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 8d67435734e244f57cb89400e868b17dd90904a2 Author: David Disseldorp <ddiss@suse.de> Date: Thu Nov 28 10:28:31 2024 +1100 usb: collapse USB_STORAGE Kconfig comment The two Kconfig "comment" calls render in /proc/config.gz as split sections: # # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may # # # also be needed; see USB_STORAGE Help for more info # "make menuconfig" renders the comments as: *** NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may *** *** also be needed; see USB_STORAGE Help for more info *** Kconfig doesn't support splitting a comment cleanly over two lines, so just collapse it into a single oversize comment. Signed-off-by: David Disseldorp <ddiss@suse.de> Acked-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20241127232830.26923-2-ddiss@suse.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/storage/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e500d497c16c29304907f5de8bc79a8d4904c3e9 Author: Randy Dunlap <rdunlap@infradead.org> Date: Wed Nov 27 19:37:56 2024 -0800 usb: gadget: functionfs: fix spellos Fix typos in documentation as reported by codespell. Fixes: f0175ab51993 ("usb: gadget: f_fs: OS descriptors support") Fixes: ddf8abd25994 ("USB: f_fs: the FunctionFS driver") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20241128033756.373517-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> include/uapi/linux/usb/functionfs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 686d4a2c26b49eaf6e817f16b7cb6c4b961aa7a7 Author: Luis Felipe Hernandez <luis.hernandez093@gmail.com> Date: Wed Nov 20 10:46:03 2024 -0500 usb: dwc3: remove unused sg struct member The sg (scatter-gather list pointer) member of the dwc3_request struct is no longer used and should be removed. This patch eliminates the unused member, cleaning up the struct. This change improves code clarity and avoids maintaining unnecessary members in the structure. Reviewed-by: Ricardo B. Marliere <rbm@suse.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Closes: https://lore.kernel.org/all/20241118194006.77c7b126@canb.auug.org.au/ Signed-off-by: Luis Felipe Hernandez <luis.hernandez093@gmail.com> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/20241120154604.51815-1-luis.hernandez093@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/dwc3/core.h | 1 - 1 file changed, 1 deletion(-) commit 1b5b7f3d29dc705bdeb3d2663df1b4617276491a Author: Aloka Dixit <quic_alokad@quicinc.com> Date: Wed Nov 27 10:02:55 2024 -0800 wifi: mac80211: fix variable used in for_each_sdata_link() Macro for_each_sdata_link() accepts input '_local' but uses 'local' in its processing. This currently works because all the functions calling this macro have declared 'local' as a variable themselves. But this results in compilation error when a new caller uses 'sdata->local' instead of declaring 'local' variable. Use '_local' instead of 'local' in for_each_sdata_link(). Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com> Link: https://patch.msgid.link/20241127180255.1460553-1-quic_alokad@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> net/mac80211/ieee80211_i.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9fbffc58ddfbd82f9442a9afb61a734036664784 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Mon Nov 18 08:29:13 2024 +0100 usb: typec: tcpci_mt6370: don't include 'pm_wakeup.h' directly The header clearly states that it does not want to be included directly, only via 'device.h'. 'platform_device.h' works equally well. Remove the direct inclusion. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20241118072917.3853-15-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/typec/tcpm/tcpci_mt6370.c | 1 - 1 file changed, 1 deletion(-) commit b8ef065c13872f5a4155e71c338597fde683cfd6 Author: Varadarajan Narayanan <quic_varada@quicinc.com> Date: Mon Nov 18 10:58:37 2024 +0530 phy: qcom: qmp: Enable IPQ5424 support Enable QMP USB3 phy support for IPQ5424 SoC. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Link: https://lore.kernel.org/r/20241118052839.382431-5-quic_varada@quicinc.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 3 +++ 1 file changed, 3 insertions(+) commit d70656aee767090f700edd0de535ff3ffb0b351f Author: Varadarajan Narayanan <quic_varada@quicinc.com> Date: Mon Nov 18 10:58:36 2024 +0530 dt-bindings: phy: qcom,qmp-usb: Add IPQ5424 USB3 PHY Add dt-bindings for USB3 PHY found on Qualcomm IPQ5424 Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Link: https://lore.kernel.org/r/20241118052839.382431-4-quic_varada@quicinc.com Signed-off-by: Vinod Koul <vkoul@kernel.org> .../devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 9c56a1de296e70d16f1daac203d420378743a363 Author: Varadarajan Narayanan <quic_varada@quicinc.com> Date: Mon Nov 18 10:58:35 2024 +0530 phy: qcom-qusb2: add QUSB2 support for IPQ5424 Add the phy init sequence for the Super Speed ports found on IPQ5424. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Link: https://lore.kernel.org/r/20241118052839.382431-3-quic_varada@quicinc.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/qualcomm/phy-qcom-qusb2.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit db4427afa66062b37269f3398fed790d138506c7 Author: Varadarajan Narayanan <quic_varada@quicinc.com> Date: Mon Nov 18 10:58:34 2024 +0530 dt-bindings: phy: qcom,qusb2: Document IPQ5424 compatible Document the compatible string used for the qusb2 phy in IPQ5424. Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Link: https://lore.kernel.org/r/20241118052839.382431-2-quic_varada@quicinc.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml | 1 + 1 file changed, 1 insertion(+) commit ea68f5c1b85462704b1939e547f9858cca5fcc0d Author: keith zhao <keith.zhao@starfivetech.com> Date: Wed Nov 20 16:56:09 2024 +0800 MAINTAINERS: Remove Shengyang as JH7110 DPHY maintainer Shengyang has stepped away from his duty, and this email is no longer valid, so removing the email from MAINTAINERS. Signed-off-by: keith zhao <keith.zhao@starfivetech.com> Link: https://lore.kernel.org/r/20241120085609.199586-1-keith.zhao@starfivetech.com Signed-off-by: Vinod Koul <vkoul@kernel.org> MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 49393b2da1cd5b0a6859693369b4fb27df59d3e2 Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Date: Wed Nov 20 13:41:43 2024 +0100 phy: mediatek: phy-mtk-hdmi: Register PHY provided regulator At least version 2 of the HDMI PHY, found in MediaTek MT8195 and MT8188 SoCs, does provide hardware support to switch on/off the HDMI 5V pins (which are also used for DDC), and this translates to this being a fixed regulator. Register this PHY-provided regulator so that it can be fed to the hdmi-connector driver to manage the HDMI +5V PWR rail. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20241120124143.132637-1-angelogioacchino.delregno@collabora.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c | 44 ++++++++++++++++++++++++++++++ drivers/phy/mediatek/phy-mtk-hdmi-mt8195.h | 3 ++ drivers/phy/mediatek/phy-mtk-hdmi.c | 28 +++++++++++++++++++ drivers/phy/mediatek/phy-mtk-hdmi.h | 4 +++ 4 files changed, 79 insertions(+) commit 2318ca5994599bb4d287e9e00ae87e0855cba712 Author: Xu Yang <xu.yang_2@nxp.com> Date: Tue Nov 19 18:50:17 2024 +0800 dt-bindings: phy: imx8mq-usb: correct reference to usb-switch.yaml The i.MX95 usb-phy can work with or without orientation-switch. With current setting, if usb-phy works without orientation-switch, the dt-schema check will show below error: phy@4c1f0040: 'oneOf' conditional failed, one must be fixed: 'port' is a required property 'ports' is a required property from schema $id: http://devicetree.org/schemas/phy/fsl,imx8mq-usb-phy.yaml# This will correct the behavior of referring to usb-switch.yaml. Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241119105017.917833-1-xu.yang_2@nxp.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 691cdb40d521809bec03788c29dcf8f7a4f9cf76 Author: Advait Dhamorikar <advaitdhamorikar@gmail.com> Date: Wed Nov 27 16:13:33 2024 +0530 phy: marvell: Fix spelling mistake "exlicitly" -> "explicitly" Fix spelling mistake in mvebu_comphy_ethernet_init_reset comments. Signed-off-by: Advait Dhamorikar <advaitdhamorikar@gmail.com> Link: https://lore.kernel.org/r/20241127104333.18944-1-advaitdhamorikar@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d811a4f38c773779748ed52f49cb7a609428b61 Author: Lars-Peter Clausen <lars@metafoo.de> Date: Sat Nov 30 16:25:19 2024 -0800 phy: tegra194: p2u: Allow to enable driver on Tegra234 Commit de6026682569 ("phy: tegra: Add PCIe PIPE2UPHY support for Tegra234") add support for Tegra234 to the tegra194-p2u PHY driver. But the driver is currently not selectable when Tegra234 SoC support is enabled. Update the Kconfig entry to allow the driver to be built when support the Tegra234 SoC is enabled. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20241201002519.3468-1-lars@metafoo.de Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/tegra/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 577f1cf76ceedb5fbdc9aca4f712b21864ac15ee Author: Jon Lin <jon.lin@rock-chips.com> Date: Tue Dec 3 09:35:13 2024 +0800 spi: rockchip-sfc: Optimize the judgment mechanism completed by the controller There is very little data left in fifo, and the controller will complete the transmission in a short period of time, so use readl_poll_timeout() for busy wait 10us to accelerate response. Signed-off-by: Jon Lin <jon.lin@rock-chips.com> Link: https://patch.msgid.link/20241203013513.2628810-1-jon.lin@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-rockchip-sfc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 21364b0fe378646fa301f29f714140a1f465561b Author: Krishna chaitanya chundru <quic_krichai@quicinc.com> Date: Fri Nov 22 10:33:10 2024 +0800 phy: qcom: qmp: Add phy register and clk setting for QCS615 PCIe Add support for GEN3 x1 PCIe PHY found on Qualcomm QCS615 platform. Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com> Signed-off-by: Ziyue Zhang <quic_ziyuzhan@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241122023314.1616353-3-quic_ziyuzhan@quicinc.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 105 +++++++++++++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-pcs-v2.h | 1 + 2 files changed, 106 insertions(+) commit 1e889f2bd8373229ce48be5860b8383e75393e13 Author: Krishna chaitanya chundru <quic_krichai@quicinc.com> Date: Fri Nov 22 10:33:09 2024 +0800 dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Document the QCS615 QMP PCIe PHY Gen3 x1 Document the QMP PCIe PHY on the QCS615 platform. Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com> Signed-off-by: Ziyue Zhang <quic_ziyuzhan@quicinc.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241122023314.1616353-2-quic_ziyuzhan@quicinc.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 2 ++ 1 file changed, 2 insertions(+) commit c90a7a685a5d90228cedf7a5068f50b3da23ddfc Author: Anand Moon <linux.amoon@gmail.com> Date: Sat Oct 12 12:49:08 2024 +0530 phy: rockchip-pcie: Use guard notation when acquiring mutex Using guard notation makes the code more compact and error handling more robust by ensuring that mutexes are released in all code paths when control leaves critical section. Signed-off-by: Anand Moon <linux.amoon@gmail.com> Link: https://lore.kernel.org/r/20241012071919.3726-7-linux.amoon@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/rockchip/phy-rockchip-pcie.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 96522eeb8735449957272e9c6f8ea3b72dcbdeb8 Author: Anand Moon <linux.amoon@gmail.com> Date: Sat Oct 12 12:49:07 2024 +0530 phy: rockchip-pcie: Refactor mutex handling in rockchip_pcie_phy_power_on() Refactor the mutex handling in the rockchip_pcie_phy_power_on() function to improve code readability and maintainability. The goto statement has been removed, and the mutex_unlock call is now directly within the conditional block. Return the result of reset_control_deassert() or regmap_read_poll_timeout() function, with 0 indicating success and an error code indicating failure. Signed-off-by: Anand Moon <linux.amoon@gmail.com> Link: https://lore.kernel.org/r/20241012071919.3726-6-linux.amoon@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/rockchip/phy-rockchip-pcie.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit bb70d1aae565fd52e6a50e643d1ad6e7d419c2a5 Author: Anand Moon <linux.amoon@gmail.com> Date: Sat Oct 12 12:49:06 2024 +0530 phy: rockchip-pcie: Refactor mutex handling in rockchip_pcie_phy_power_off() Refactor the mutex handling in the rockchip_pcie_phy_power_off() function to improve code readability and maintainability. The goto statement has been removed, and the mutex_unlock call is now directly within the conditional block. Return the result of reset_control_assert() function, with 0 indicating success and an error code indicating failure Signed-off-by: Anand Moon <linux.amoon@gmail.com> Link: https://lore.kernel.org/r/20241012071919.3726-5-linux.amoon@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/rockchip/phy-rockchip-pcie.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit cb0ba26ad09398d3d0d10f518af4ccae69c8b64e Author: Anand Moon <linux.amoon@gmail.com> Date: Sat Oct 12 12:49:05 2024 +0530 phy: rockchip-pcie: Use regmap_read_poll_timeout() for PCIe reference clk PLL status Replace open-coded phy PCIe reference clk PLL status polling with regmap_read_poll_timeout API. This change simplifies the code without altering functionality. Signed-off-by: Anand Moon <linux.amoon@gmail.com> Link: https://lore.kernel.org/r/20241012071919.3726-4-linux.amoon@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/rockchip/phy-rockchip-pcie.c | 56 +++++++++----------------------- 1 file changed, 15 insertions(+), 41 deletions(-) commit e96397db55e5fbe290ff1462ddf6c24ed94eb7df Author: Anand Moon <linux.amoon@gmail.com> Date: Sat Oct 12 12:49:04 2024 +0530 phy: rockchip-pcie: Use devm_clk_get_enabled() helper Use devm_clk_get_enabled() instead of devm_clk_get() to make the code cleaner and avoid calling clk_disable_unprepare(), as this is exactly what this function does. Use the dev_err_probe() helper to simplify error handling during probe. Refactor the mutex handling in the rockchip_pcie_phy_init() function to improve code readability and maintainability. The goto statement has been removed, and the mutex_unlock call is now directly within the conditional block. Return the result of reset_control_assert() function, with 0 indicating success and an error code indicating failure Signed-off-by: Anand Moon <linux.amoon@gmail.com> Link: https://lore.kernel.org/r/20241012071919.3726-3-linux.amoon@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/rockchip/phy-rockchip-pcie.c | 34 ++++++++++---------------------- 1 file changed, 10 insertions(+), 24 deletions(-) commit 84de918083d09500d93d991d8989addfaae1611e Author: Anand Moon <linux.amoon@gmail.com> Date: Sat Oct 12 12:49:03 2024 +0530 phy: rockchip-pcie: Simplify error handling with dev_err_probe() Use the dev_err_probe() helper to simplify error handling during probe. This also handle scenario, when -EDEFER is returned and useless error is printed. Signed-off-by: Anand Moon <linux.amoon@gmail.com> Link: https://lore.kernel.org/r/20241012071919.3726-2-linux.amoon@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/phy/rockchip/phy-rockchip-pcie.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit cc1ecabe67d92a2da0b0402f715598e8dbdc3b9e Author: Vikram Sharma <quic_vikramsa@quicinc.com> Date: Tue Nov 26 15:31:26 2024 +0530 media: qcom: camss: Restructure camss_link_entities Refactor the camss_link_entities function by breaking it down into three distinct functions. Each function will handle the linking of a specific entity separately. SC7280 and later targets mandates for 1:1 linking for csid -> vfe. i.e. csid0 can be mapped to vfe0 only. Signed-off-by: Suresh Vankadara <quic_svankada@quicinc.com> Signed-off-by: Trishansh Bhardwaj <quic_tbhardwa@quicinc.com> Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/qcom/camss/camss.c | 155 ++++++++++++++++++++---------- 1 file changed, 103 insertions(+), 52 deletions(-) commit 53b01a5fdb41762db79a3f3192b209f6ccff805b Author: Vikram Sharma <quic_vikramsa@quicinc.com> Date: Tue Nov 26 15:31:25 2024 +0530 media: qcom: camss: reducing the repitious error message string Introducing a new function camss_link_err to avoid repition of same error message, improving code maintainability. Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/qcom/camss/camss.c | 58 +++++++++++++++++++------------ 1 file changed, 35 insertions(+), 23 deletions(-) commit 23417899110410f2fc1bf7dd8df381312d60c933 Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Wed Nov 27 00:42:12 2024 +0000 dmaengine: sh: rcar-dmac: add comment for r8a779a0 compatible Add the reason why we need r8a779a0 compatible. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87a5dlwlr0.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/sh/rcar-dmac.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7cbd0f7cfa2685860f85f0d4fbf817d287b65bcf Author: Mika Kahola <mika.kahola@intel.com> Date: Wed Nov 27 09:32:00 2024 +0200 drm/i915/display: Use struct intel_display instead of struct drm_i915_private Let's start using struct intel_display instead of struct drm_i915_private when introducing new code. No functional changes. v2: Drop tc_to_intel_display() helper function (Jani) Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241127073200.124907-3-mika.kahola@intel.com drivers/gpu/drm/i915/display/intel_tc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 7124e136ba7c0613f62e74e065245c3970ed98b9 Author: Mika Kahola <mika.kahola@intel.com> Date: Wed Nov 27 09:31:59 2024 +0200 drm/i915/xe3lpd: Power request asserting/deasserting There is a HW issue that arises when there are race conditions between TCSS entering/exiting TC7 or TC10 states while the driver is asserting/deasserting TCSS power request. As a workaround, Display driver will implement a mailbox sequence to ensure that the TCSS is in TC0 when TCSS power request is asserted/deasserted. The sequence is the following 1. Read mailbox command status and wait until run/busy bit is clear 2. Write mailbox data value '1' for power request asserting and '0' for power request deasserting 3. Write mailbox command run/busy bit and command value with 0x1 4. Read mailbox command and wait until run/busy bit is clear before continuing power request. v2: Rename WA function (Gustavo) Limit WA only for PTL platform with a TODO note (Gustavo) Add TCSS_DISP_MAILBOX_IN_CMD_RUN_BUSY for clarity when writing register data (Gustavo) Move register defs from i915_reg.h to intel_cx0_phy_regs.h (Gustavo) v3: Use "struct intel_display" instead of "struct drm_i915_private" (Jani) Move defs above C10 definitions in the intel_cx0_phy_regs.h file (Gustavo) Move drm_WARN_ON() inside WA function (Gustavo) Rename workaround function as wa_14020908590() (Gustvo) Use boolean enable instead of if-else structure (Raag) v4: Drop drm_WARN_ON() (Raag) Fix function definition to fit into a single line (Raag) v5: Drop TCSS_DISP_MAILBOX_IN_CMD_RUN_BUSY from TCSS_DISP_MAILBOX_IN_CMD_DATA(val) macro (Jani) Rename WA function with some meaningful name and add comment on WA number (Jani) Use struct intel_display on WA calling function (Jani) Reviewed-by: Raag Jadav <raag.jadav@intel.com> (v4) Acked-by: Jani Nikula <jani.nikula@intel.com> (v5) Signed-off-by: Mika Kahola <mika.kahola@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241127073200.124907-2-mika.kahola@intel.com drivers/gpu/drm/i915/display/intel_cx0_phy_regs.h | 7 +++++ drivers/gpu/drm/i915/display/intel_tc.c | 32 +++++++++++++++++++++++ 2 files changed, 39 insertions(+) commit dd77ba8801a25a87a23802612a566137c81b5743 Merge: c712e8fd9bf4 ceb8bf2ceaa7 Author: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Date: Wed Dec 4 14:02:54 2024 +0200 Merge import NS conversion from 'https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git' into for-next commit 754302a5bc1bd8fd3b7d85c168b0a1af6d4bba4d Author: Eugene Kobyak <eugene.kobyak@intel.com> Date: Tue Dec 3 14:54:06 2024 +0000 drm/i915: Fix NULL pointer dereference in capture_engine When the intel_context structure contains NULL, it raises a NULL pointer dereference error in drm_info(). Fixes: e8a3319c31a1 ("drm/i915: Allow error capture without a request") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12309 Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Cc: <stable@vger.kernel.org> # v6.3+ Signed-off-by: Eugene Kobyak <eugene.kobyak@intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/xmsgfynkhycw3cf56akp4he2ffg44vuratocsysaowbsnhutzi@augnqbm777at drivers/gpu/drm/i915/i915_gpu_error.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit c6eabbab359c156669e10d5dec3e71e80ff09bd2 Author: Christian Gmeiner <cgmeiner@igalia.com> Date: Mon Dec 2 15:06:13 2024 +0100 drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL Add a new ioctl, DRM_IOCTL_V3D_PERFMON_SET_GLOBAL, to allow configuration of a global performance monitor (perfmon). Use the global perfmon for all jobs to ensure consistent performance tracking across submissions. This feature is needed to implement a Perfetto datasources in user-space. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Maíra Canal <mcanal@igalia.com> Signed-off-by: Maíra Canal <mcanal@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241202140615.74802-1-christian.gmeiner@gmail.com drivers/gpu/drm/v3d/v3d_drv.c | 1 + drivers/gpu/drm/v3d/v3d_drv.h | 8 ++++++++ drivers/gpu/drm/v3d/v3d_perfmon.c | 37 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/v3d/v3d_sched.c | 14 +++++++++++--- drivers/gpu/drm/v3d/v3d_submit.c | 10 ++++++++++ include/uapi/drm/v3d_drm.h | 18 ++++++++++++++++++ 6 files changed, 85 insertions(+), 3 deletions(-) commit 125a66a572bc46ef6cacf9f0ba90a5244b21fd16 Author: Matthew Auld <matthew.auld@intel.com> Date: Mon Dec 2 17:01:03 2024 +0000 drm/xe/display: fix ttm_bo_access() usage ttm_bo_access() returns the size on success, account for that otherwise the caller incorrectly thinks this is an error in intel_atomic_prepare_plane_clear_colors(). v2 (Thomas) - Make sure we check for the partial copy case. Also since this api is easy to get wrong, wrap the whole thing in a new helper to hide the details and then convert the existing users over. Fixes: b6308aaa24a7 ("drm/xe/display: Update intel_bo_read_from_page to use ttm_bo_access") Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3661 Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241202170102.88893-2-matthew.auld@intel.com drivers/gpu/drm/xe/display/intel_bo.c | 2 +- drivers/gpu/drm/xe/xe_bo.c | 24 ++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_bo.h | 1 + drivers/gpu/drm/xe/xe_vm.c | 8 ++------ 4 files changed, 28 insertions(+), 7 deletions(-) commit b27f45ea09b029edc68aef6bac9168139f636284 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Nov 29 13:41:58 2024 +0200 drm/i915/cx0: split out mtl_get_cx0_buf_trans() to c10 and c20 variants The PHY is either c10 or c20, there's no need to check at runtime and complicate the conditions in mtl_get_cx0_buf_trans(). While at it, replace the direct port clock check with intel_dp_is_uhbr(). Cc: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241129114158.486418-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c | 23 +++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit bb18265c3aba92b91a1355609769f3e967b65dee Author: Heiner Kallweit <hkallweit1@gmail.com> Date: Mon Dec 2 21:20:02 2024 +0100 r8169: remove support for chip version 11 This is a follow-up to 982300c115d2 ("r8169: remove detection of chip version 11 (early RTL8168b)"). Nobody complained yet, so remove support for this chip version. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/b689ab6d-20b5-4b64-bd7e-531a0a972ba3@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/realtek/r8169.h | 2 +- drivers/net/ethernet/realtek/r8169_main.c | 14 +------------- drivers/net/ethernet/realtek/r8169_phy_config.c | 10 ---------- 3 files changed, 2 insertions(+), 24 deletions(-) commit 2e20bf8cc05766dcd0357cdfcada49e1bc45512b Author: Heiner Kallweit <hkallweit1@gmail.com> Date: Mon Dec 2 21:14:35 2024 +0100 r8169: remove unused flag RTL_FLAG_TASK_RESET_NO_QUEUE_WAKE After 854d71c555dfc3 ("r8169: remove original workaround for RTL8125 broken rx issue") this flag isn't used any longer. So remove it. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Link: https://patch.msgid.link/d9dd214b-3027-4f60-b0e8-6f34a0c76582@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/net/ethernet/realtek/r8169_main.c | 3 --- 1 file changed, 3 deletions(-) commit ebf7f7d616818f2841c8aece14084e87d59bd8c7 Author: Jakub Kicinski <kuba@kernel.org> Date: Tue Dec 3 17:16:43 2024 -0800 Revert "ptp: Switch back to struct platform_driver::remove()" This reverts commit b32913a5609a36c230e9b091da26d38f8e80a056. Linus applied directly commit e70140ba0d2b ("Get rid of 'remove_new' relic from platform driver struct"), drop our local change to avoid conflicts. Link: https://lore.kernel.org/CAMuHMdV3J=o2x9G=1t_y97iv9eLsPfiej108vU6JHnn=AR-Nvw@mail.gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/ptp/ptp_clockmatrix.c | 2 +- drivers/ptp/ptp_dte.c | 4 ++-- drivers/ptp/ptp_fc3.c | 2 +- drivers/ptp/ptp_idt82p33.c | 2 +- drivers/ptp/ptp_ines.c | 4 ++-- drivers/ptp/ptp_qoriq.c | 2 +- drivers/ptp/ptp_vmclock.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) commit ce55101e6ba188296dbdb9506665d26f23110292 Author: Stephan Gerhold <stephan.gerhold@linaro.org> Date: Fri Nov 15 13:55:13 2024 +0100 drm/msm/dpu: fix x1e80100 intf_6 underrun/vsync interrupt The IRQ indexes for the intf_6 underrun/vsync interrupts are swapped. DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 16) is the actual underrun interrupt and DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 17) is the vsync interrupt. This causes timeout errors when using the DP2 controller, e.g. [dpu error]enc37 frame done timeout *ERROR* irq timeout id=37, intf_mode=INTF_MODE_VIDEO intf=6 wb=-1, pp=2, intr=0 *ERROR* wait disable failed: id:37 intf:6 ret:-110 Correct them to fix these errors and make DP2 work properly. Cc: stable@vger.kernel.org Fixes: e3b1f369db5a ("drm/msm/dpu: Add X1E80100 support") Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Tested-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/624681/ Link: https://lore.kernel.org/r/20241115-x1e80100-dp2-fix-v1-1-727b9fe6f390@linaro.org Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c41da3a620e611b16b62a5cf93168caf01252fc4 Merge: 31823f27f84b cdd30ebb1b9f Author: Mark Brown <broonie@kernel.org> Date: Tue Dec 3 22:00:37 2024 +0000 ASoC: Merge up origin to resolve interaction with manline symbol changes Commit cdd30ebb1b9f ("module: Convert symbol namespace to string literal") changes the arguments for various module symbol macros including some that we've aded new uses for. Merge the commit up to avoid problems in -next. Signed-off-by: Mark Brown <broonie@kernel.org> commit 20124c3e22db52c6507529dbf2315260a5769a75 Author: Jonathan Cavitt <jonathan.cavitt@intel.com> Date: Fri Nov 22 18:08:26 2024 +0000 drm/xe/xe_guc_ads: Add nonpriv registers to write list When performing a guc_mmio_regset_write, we add all the registers in the reg_sr list to the save/restore list, but do not do the same for the nonpriv registers. Add them in. v2: - Add all NONPRIV registers to avoid undefined behavior (Harrison) - s/whitelist/nonpriv v3: - Rebase Closes: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2249 Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com> CC: Lucas de Marchi <lucas.demarchi@intel.com> CC: Matt Roper <matthew.d.roper@intel.com> CC: John Harrison <john.c.harrison@intel.com> CC: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> CC: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241122180826.7075-1-jonathan.cavitt@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_guc_ads.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 35fdb302caab92f7ee998ff428b0f41c2c3a45f7 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:02:59 2024 +0100 PCI/P2PDMA: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-pci-v1-3-c32360f495a7@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Logan Gunthorpe <logang@deltatee.com> drivers/pci/p2pdma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3c39919a5f3d65abff031a7d9acd3b5f5672eec7 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:02:58 2024 +0100 PCI/VPD: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-pci-v1-2-c32360f495a7@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> drivers/pci/vpd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 0530ad489d1576ac2e9d65068500d11b653c8f8a Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Dec 2 20:02:57 2024 +0100 PCI/sysfs: Constify 'struct bin_attribute' The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-pci-v1-1-c32360f495a7@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> drivers/pci/pci-sysfs.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 3d94026af328d3d355d15c1d7fe73278f77c6a42 Author: Zhang Rui <rui.zhang@intel.com> Date: Tue Dec 3 15:51:19 2024 +0800 tools/power turbostat: Introduce --force parameter Turbostat currently exits under the following conditions: 1. When running on non-Intel/AMD/Hygon x86 vendors. 2. When running on Intel models that lack specific platform features. Introduce a new `--force` parameter that allows turbostat to run on these unsupported platforms with minimal default feature support. This provides users with the flexibility to gather basic information even on unsupported systems. [lenb: updated warning message text] Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> tools/power/x86/turbostat/turbostat.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit cc63f89ef9db70f74c563317d36028bb5e6196a1 Author: Zhang Rui <rui.zhang@intel.com> Date: Tue Dec 3 15:51:18 2024 +0800 tools/power turbostat: Improve --help output Improve the `--help` output of turbostat by standardizing the format and enhancing readability. The following changes are made to ensure consistency and clarity in the help message: 1. Use a consistent pattern for each parameter's help message: - Display the parameter and its input (if any) on the same line, separated by a space. - Provide the detailed description on a separate line. 2. Ensure that the first character of each description is in lower-case. These changes make the help output more uniform and easier to read, helping users quickly understand the available options and their usage. No functional change. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> tools/power/x86/turbostat/turbostat.c | 41 ++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 15 deletions(-) commit 48c62ba1b407140229e92f5cfae6ae113fc4af8e Author: Zhang Rui <rui.zhang@intel.com> Date: Tue Dec 3 15:51:17 2024 +0800 tools/power turbostat: Exit on unsupported Vendors Turbostat currently supports x86 processors from Intel, AMD, and Hygon. The behavior of turbostat on CPUs from other vendors has not been evaluated and may lead to incorrect or undefined behavior. Enhance turbostat to exit by default when running on an unsupported CPU vendor. This ensures that users are aware that their CPU is not currently supported by turbostat, guiding them to seek support for their specific hardware through future patches. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> tools/power/x86/turbostat/turbostat.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4133be39e216130a86382fb5cfbaf6851a6f7a45 Author: Zhang Rui <rui.zhang@intel.com> Date: Tue Dec 3 15:51:16 2024 +0800 tools/power turbostat: Exit on unsupported Intel models Turbostat requires per-platform enabling for Intel CPU models due to platform-specific features. When running on unsupported Intel CPU models, turbostat currently operates with limited default features, which can lead to users unknowingly using an outdated version of the tool. Enhance turbostat to exit by default when run on unsupported Intel CPU models, with a clear message to users, informing them that their CPU model is not supported and advising them to update to the latest version of turbostat for full functionality. [lenb: updated error message wording] Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> tools/power/x86/turbostat/turbostat.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9e47f8adb053b69e2e8310551e6fd5156704cef4 Author: Len Brown <len.brown@intel.com> Date: Tue Dec 3 12:23:22 2024 -0500 tools/power turbostat: update turbostat(8) Clarify how to get the latest version. Signed-off-by: Len Brown <len.brown@intel.com> tools/power/x86/turbostat/turbostat.8 | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 6b47ed23e2f1bc2c177da47437970e6208ac9ea0 Author: Zhang Rui <rui.zhang@intel.com> Date: Tue Dec 3 15:44:18 2024 +0800 tools/power turbostat: Add initial support for ClearwaterForest Add initial support for ClearwaterForest. It shares the same features with SierraForest. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> tools/power/x86/turbostat/turbostat.c | 1 + 1 file changed, 1 insertion(+) commit e8a99af68c068865dbac7f3330e97bf8e96edf33 Author: Zhang Rui <rui.zhang@intel.com> Date: Tue Dec 3 15:44:17 2024 +0800 tools/power turbostat: Add initial support for PantherLake Add initial support for PantherLake. It shares the same features with Lunarlake. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> tools/power/x86/turbostat/turbostat.c | 1 + 1 file changed, 1 insertion(+) commit 0c45e76fcc6243723f1f90848170d6bcb4a5bc6c Author: Michael J. Ruhl <michael.j.ruhl@intel.com> Date: Tue Dec 3 10:36:39 2024 -0500 drm/xe/vsec: Support BMG devices The Battlemage (BMG) discrete graphics card supports the Platform, Monitoring Technology (PMT) feature directly on the primary PCI device. Utilize the PMT callback API to add support for the BMG devices. Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241203153639.2982162-1-michael.j.ruhl@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/Makefile | 1 + drivers/gpu/drm/xe/regs/xe_pmt.h | 19 +++ drivers/gpu/drm/xe/xe_device.c | 7 ++ drivers/gpu/drm/xe/xe_device_types.h | 6 + drivers/gpu/drm/xe/xe_vsec.c | 233 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_vsec.h | 11 ++ 6 files changed, 277 insertions(+) commit e5ca5d7b4d7c29246d957dc45d63610584ae3a54 Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Wed Nov 20 20:18:38 2024 +0300 clk: mmp: pxa1908-apbc: Fix NULL vs IS_ERR() check The devm_kzalloc() function returns NULL on error, not error pointers. Fix the check. Fixes: 51ce55919273 ("clk: mmp: Add Marvell PXA1908 APBC driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/d7078eb7-a7d6-4753-b453-8fce15245c34@stanley.mountain Acked-by: Duje Mihanović <duje.mihanovic@skole.hr> Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/clk/mmp/clk-pxa1908-apbc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3acea81be689b77b3ceac6ff345ff0366734d967 Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Wed Nov 20 20:18:44 2024 +0300 clk: mmp: pxa1908-apbcp: Fix a NULL vs IS_ERR() check The devm_kzalloc() function doesn't return error pointers, it returns NULL on error. Update the check to match. Fixes: a89233dbd4df ("clk: mmp: Add Marvell PXA1908 APBCP driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/6155067d-aed5-4799-9e14-6dff7be1cb3a@stanley.mountain Acked-by: Duje Mihanović <duje.mihanovic@skole.hr> Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/clk/mmp/clk-pxa1908-apbcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7def56f841af22e07977e193eea002e085facbdb Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Wed Nov 20 20:18:50 2024 +0300 clk: mmp: pxa1908-mpmu: Fix a NULL vs IS_ERR() check The devm_kzalloc() function returns NULL on error, not error pointers. Update the check to match. Fixes: ebac87cdd230 ("clk: mmp: Add Marvell PXA1908 MPMU driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/5b3b963d-ecae-4819-be47-d82e8a58e64b@stanley.mountain Acked-by: Duje Mihanović <duje.mihanovic@skole.hr> Signed-off-by: Stephen Boyd <sboyd@kernel.org> drivers/clk/mmp/clk-pxa1908-mpmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f3c03be182efccce3f6c2d8ceb35ba43e77ac128 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Dec 3 17:17:10 2024 +0200 drm/dp: extract drm_dp_dpcd_clear_payload() SST with 128b/132b channel coding needs this too. Extract to a separate helper, independent of MST. Cc: Lyude Paul <lyude@redhat.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/904fa73ea9ea976185062eeb493a08ffc43ed27e.1733238941.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/display/drm_dp_helper.c | 14 ++++++++++++++ drivers/gpu/drm/display/drm_dp_mst_topology.c | 2 +- include/drm/display/drm_dp_helper.h | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) commit 3b00b53afe6047983b14de269cd0a93c612e646d Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Dec 3 17:17:09 2024 +0200 drm/dp: extract drm_dp_dpcd_write_payload() SST with 128b/132b channel coding needs this too. Extract to a separate helper, independent of MST. v2: Clean up kernel-doc a bit Cc: Lyude Paul <lyude@redhat.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/f626715ba4e348546770750aa3e10fac73a5cbd7.1733238941.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/display/drm_dp_helper.c | 57 +++++++++++++++++++++++++++ drivers/gpu/drm/display/drm_dp_mst_topology.c | 52 ++---------------------- include/drm/display/drm_dp_helper.h | 2 + 3 files changed, 62 insertions(+), 49 deletions(-) commit f2663f704d8428a7f1bacf084de460d006259f6e Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Dec 3 17:17:08 2024 +0200 drm/dp: extract drm_dp_dpcd_poll_act_handled() SST with 128b/132b channel coding needs this too. Extract to a separate helper, independent of MST. Pass timeout in as a parameter, anticipating that we can reduce the timeout for SST. v2: Clean up kernel-doc a bit Cc: Lyude Paul <lyude@redhat.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/459fd3e96a55a8ea8ada8d27d93eaa24c235f9c1.1733238941.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/display/drm_dp_helper.c | 54 ++++++++++++++++++++++++++- drivers/gpu/drm/display/drm_dp_mst_topology.c | 36 +----------------- include/drm/display/drm_dp_helper.h | 2 + 3 files changed, 57 insertions(+), 35 deletions(-) commit 45d55e2da9bd10d24c4730b452b11a76dc3960b8 Author: Jingyi Wang <quic_jingyw@quicinc.com> Date: Tue Dec 3 17:27:15 2024 +0800 arm64: dts: qcom: qcs8300: add base QCS8300 RIDE board Add initial support for Qualcomm QCS8300 RIDE board which enables DSPs, UFS and booting to shell with uart console. Written with help from Tingguo Cheng (added rpmhpd nodes) and Xin Liu (added ufs, adsp and gpdsp nodes). Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com> Link: https://lore.kernel.org/r/20241203-qcs8300_initial_dtsi-v4-4-d7c953484024@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/qcs8300-ride.dts | 235 ++++++++++++++++++++++++++++++ 2 files changed, 236 insertions(+) commit 7be190e4bdd2bd1aca84afef06bb755c06a85473 Author: Jingyi Wang <quic_jingyw@quicinc.com> Date: Tue Dec 3 17:27:14 2024 +0800 arm64: dts: qcom: add QCS8300 platform Add initial DTSI for QCS8300 SoC. Features added in this revision: - CPUs with PSCI idle states - Interrupt-controller with PDC wakeup support - Timers, TCSR Clock Controllers - Reserved Shared memory - GCC and RPMHCC - TLMM - Interconnect - QuP with uart - SMMU - QFPROM - Rpmhpd power controller - UFS - Inter-Processor Communication Controller - SRAM - Remoteprocs including ADSP,CDSP and GPDSP - BWMONs Written with help from Zhenhua Huang(added the smmu node), Xin Liu(added ufs, adsp and gpdsp nodes), Tingguo Cheng(added the rpmhpd node), Kyle Deng(added the aoss_qmp node), Raviteja Laggyshetty(added interconnect nodes) and Cong Zhang(added the INTID of EL2 non-secure physical timer). Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com> Link: https://lore.kernel.org/r/20241203-qcs8300_initial_dtsi-v4-3-d7c953484024@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 1405 +++++++++++++++++++++++++++++++++ 1 file changed, 1405 insertions(+) commit d511280ce9cc5920442e78a589946f63c247dd3b Author: Jingyi Wang <quic_jingyw@quicinc.com> Date: Tue Dec 3 17:27:12 2024 +0800 dt-bindings: arm: qcom: document QCS8300 SoC and reference board Document Qualcomm QCS8300 SoC and its reference board QCS8300 RIDE. Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com> Link: https://lore.kernel.org/r/20241203-qcs8300_initial_dtsi-v4-1-d7c953484024@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 6bef484c5e9a5d3937a4bdf56e0f08f25517f8a0 Author: Christian Gmeiner <cgmeiner@igalia.com> Date: Thu Nov 21 10:24:08 2024 +0100 drm/etnaviv: Add fdinfo support for memory stats Use the new helper to export stats about memory usage. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> drivers/gpu/drm/etnaviv/etnaviv_drv.c | 12 +++++++++++- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 12 ++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) commit a807cb22adc490ef33304e52c70ab65b3f19fe20 Author: Sui Jingfeng <sui.jingfeng@linux.dev> Date: Fri Nov 15 20:32:46 2024 +0800 drm/etnaviv: Improve VA, PA, SIZE alignment checking Alignment checking is only needed to be done in the upper caller function. If those address and sizes are able to pass the check, it will certainly pass the same test in the etnaviv_context_unmap() function. We don't need examine it more than once. Remove redundant alignment tests, move the those useless to upper caller function. Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 0078a6f4843647d4792433eb8f0f505cd4c2b18b Author: Sui Jingfeng <sui.jingfeng@linux.dev> Date: Fri Nov 15 20:32:45 2024 +0800 drm/etnaviv: Fix the debug log of the etnaviv_iommu_map() The value of the 'iova' variable is the start GPUVA that is going to be mapped, its value doesn't changed when the mapping is on going. Replace it with the 'da' variable, which is incremental and it reflects the actual address being mapped exactly. Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9aad03e7f5db7944d5ee96cd5c595c54be2236e6 Author: Sui Jingfeng <sui.jingfeng@linux.dev> Date: Fri Nov 15 20:32:44 2024 +0800 drm/etnaviv: Drop the offset in page manipulation The etnaviv driver, both kernel space and user space, assumes that GPU page size is 4KiB. Its IOMMU map/unmap 4KiB physical address range once a time. If 'sg->offset != 0' is true, then the current implementation will map the IOVA to a wrong area, which may lead to coherency problem. Picture 0 and 1 give the illustration, see below. PA start drifted | |<--- 'sg_dma_address(sg) - sg->offset' | .------ sg_dma_address(sg) | | .---- sg_dma_len(sg) |<-sg->offset->| | V |<-->| Another one cpu page +----+----+----+----+ +----+----+----+----+ |xxxx| |||||| ||||||||||||||||||||| +----+----+----+----+ +----+----+----+----+ ^ ^ ^ ^ |<--- da_len --->| | | | | | | | .--------------' | | | | .----------------' | | | | .----------------' | | | | | | +----+----+----+----+ | | ||||||||||||||||||||| | | +----+----+----+----+ | | | '--------------. da_len = sg_dma_len(sg) + sg->offset, using | | 'sg_dma_len(sg) + sg->offset' will lead to GPUVA +----+ ~~~~~~~~~~~~~+ collision, but min_t(unsigned int, da_len, va_len) |xxxx| | will clamp it to correct size. But the IOVA will +----+ ~~~~~~~~~~~~~+ be redirect to wrong area. ^ | Picture 0: Possibly wrong implementation. GPUVA (IOVA) -------------------------------------------------------------------------- .------- sg_dma_address(sg) | .---- sg_dma_len(sg) |<-sg->offset->| | | |<-->| another one cpu page +----+----+----+----+ +----+----+----+----+ | |||||| ||||||||||||||||||||| +----+----+----+----+ +----+----+----+----+ ^ ^ ^ ^ | | | | .--------------' | | | | | | | | .--------------' | | | | .----------------' | | | | .----------------' | | | | +----+ +----+----+----+----+ |||||| ||||||||||||||||||||| The first one is SZ_4K, the second is SZ_16K +----+ +----+----+----+----+ ^ | Picture 1: Perfectly correct implementation. GPUVA (IOVA) If sg->offset != 0 is true, IOVA will be mapped to wrong physical address. Either because there doesn't contain the data or there contains wrong data. Strictly speaking, the memory area that before sg_dma_address(sg) doesn't belong to us, and it's likely that the area is being used by other process. Because we don't want to introduce confusions about which part is visible to the GPU, we assumes that the size of GPUVA is always 4KiB aligned. This is very relaxed requirement, since we already made the decision that GPU page size is 4KiB (as a canonical decision). And softpin feature is landed, Mesa's util_vma_heap_alloc() will certainly report correct length of GPUVA to kernel with desired alignment ensured. With above statements agreed, drop the "offset in page" manipulation will return us a correct implementation at any case. Fixes: a8c21a5451d8 ("drm/etnaviv: add initial etnaviv DRM driver") Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 16ab70e8dabe4f26b2de1c13e1937e190b0d2d24 Author: Easwar Hariharan <eahariha@linux.microsoft.com> Date: Fri Nov 15 21:26:26 2024 +0000 drm/etnaviv: Convert timeouts to secs_to_jiffies() Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan <eahariha@linux.microsoft.com> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 834f304192834d6f0941954f3277ae0ba11a9a86 Author: Sui Jingfeng <sui.jingfeng@linux.dev> Date: Mon Nov 4 08:41:56 2024 +0800 drm/etnaviv: Fix page property being used for non writecombine buffers In the etnaviv_gem_vmap_impl() function, the driver vmap whatever buffers with write combine(WC) page property, this is incorrect. Cached buffers should be mapped with the cached page property and uncached buffers should be mapped with the uncached page property. Fixes: a0a5ab3e99b8 ("drm/etnaviv: call correct function when trying to vmap a DMABUF") Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> drivers/gpu/drm/etnaviv/etnaviv_gem.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 2db0005a68aaad4cd1b8598915f86836117a7a20 Author: Sui Jingfeng <sui.jingfeng@linux.dev> Date: Sat Nov 2 18:31:34 2024 +0800 drm/etnaviv: etnaviv_cmdbuf.c: Drop the unneeded 'etnaviv_perfmon.h' header The etnaviv_perfmon.h header is about performance monitor, it can hardly has something to do with command buffer suballocator. Drop it. Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 1 - 1 file changed, 1 deletion(-) commit c5d46bd97a99af26b92a74684d962ded16d933e5 Author: Sui Jingfeng <sui.jingfeng@linux.dev> Date: Sat Nov 2 12:26:52 2024 +0800 drm/etnaviv: Drop unused data member from the etnaviv_gem_object structure Referencing the 'struct etnaviv_gpu *' by every etnaviv GEM BO is weird. Drop it and drop yet another unused data field, namely 'access'. Memory footprint of etnaviv GEM BOs reduced. Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> drivers/gpu/drm/etnaviv/etnaviv_gem.h | 2 -- 1 file changed, 2 deletions(-) commit 39b1acfddfd567dfef5dcf4fdfa462f0a2b2c89c Author: Christian König <christian.koenig@amd.com> Date: Thu Jul 11 16:04:37 2024 +0200 drm/ttm: use GEM references for VM mappings Instead of a TTM reference grab a GEM reference whenever necessary for a VM mapping. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240723121750.2086-7-christian.koenig@amd.com drivers/gpu/drm/ttm/ttm_bo_vm.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 31823f27f84bfa06be20f98ec9be63a671307d63 Merge: 9d6aacda3ad5 484c997e03ce Author: Mark Brown <broonie@kernel.org> Date: Tue Dec 3 16:57:11 2024 +0000 ASoC: Splitting cs35l56 SoundWire DAI into separate Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: This series prepares for dissimilar aggregation of CS42L43 + CS35L56 speaker playback. The CS35L56 SoundWire DAI is split into separate DAIs for playback and capture so they can be routed and aggregated differently. The cs_amp driver is also updated to enable different TX (capture) slots on each CS35L56 on a bus, so that the captures can be aggregated. commit 9d6aacda3ad546048e02d83e5831e0b415382518 Merge: d59f0196e990 2198deb823a6 Author: Mark Brown <broonie@kernel.org> Date: Tue Dec 3 16:57:02 2024 +0000 Add support for codec of F1C100s Merge series from "Csókás, Bence" <csokas.bence@prolan.hu>: Support for Allwinner F1C100s/200s series audio was submitted in 2018 as an RFC series, but was not merged, despite having only minor errors. However, this is essential for having audio on these SoCs. This series was forward-ported/rebased to the best of my abilities, on top of Linus' tree as of now: commit 28eb75e178d3 ("Merge tag 'drm-next-2024-11-21' of https://gitlab.freedesktop.org/drm/kernel") Link: https://lore.kernel.org/all/cover.1543782328.git.mesihkilinc@gmail.com/ As requested by many, this series will now be split in 2, the DMA and the ALSA/ASoC codec driver. This is the codec part of the series. The first part (DMA) is at the link below. The first 3 patches of this series can be applied and built without the former series, but for working audio you need them both, plus the last 2 Device Tree patches in this series. Link: https://lore.kernel.org/linux-kernel/20241122161128.2619172-1-csokas.bence@prolan.hu/ commit d59f0196e990e5a1bb474eabf146f25cb8aea33d Merge: 297711ba0282 582057d2233a Author: Mark Brown <broonie@kernel.org> Date: Tue Dec 3 16:56:56 2024 +0000 ASoC: Correct *-objs usages Merge series from Takashi Iwai <tiwai@suse.de>: I stumbled upon the use of *-objs in Makefile in a few places in ASoC. Here are trivial patches to correct those. commit 297711ba0282abef38824b1e08c0ad6dcb6c4a53 Merge: 25cd677636d3 e6a9750a346b Author: Mark Brown <broonie@kernel.org> Date: Tue Dec 3 16:56:49 2024 +0000 ASoC: fsl_xcvr: Add suspend and resume support Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>: Define regmap for PHY and PLL registers, the PHY and PLL registers are accessed by AI interface in controller. Then driver can use regcache to recover registers after suspend and resume. commit 16ef9c9de0c48b836c5996c6e9792cb4f658c8f1 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Fri Nov 22 13:14:00 2024 +0100 of/fdt: Implement use BIN_ATTR_SIMPLE macro for fdt sysfs attribute The usage of the macro allows to remove the custom handler function, saving some memory. Additionally the code is easier to read. While at it also mark the attribute as __ro_after_init, as the only modification happens in the __init phase. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241122-sysfs-const-bin_attr-of-v1-1-7052f9dcd4be@weissschuh.net Signed-off-by: Rob Herring (Arm) <robh@kernel.org> drivers/of/fdt.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 5f69c091a6c0001ffade8bc00c1d33e1e224a2e7 Author: Kryštof Černý <cleverline1mc@gmail.com> Date: Fri Nov 29 14:25:56 2024 +0100 w1: ds2482: Fix datasheet URL Current link does redirect to wrong place. Signed-off-by: Kryštof Černý <cleverline1mc@gmail.com> Link: https://lore.kernel.org/r/20241129-ds2482-add-reg-v6-4-bd95ad171e19@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/masters/ds2482.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e0bb206c6af6c8775b447b2fae9209f02f13143 Author: Kryštof Černý <cleverline1mc@gmail.com> Date: Fri Nov 29 14:25:55 2024 +0100 w1: ds2482: Add regulator support Adds a support for attaching a supply regulator. Signed-off-by: Kryštof Černý <cleverline1mc@gmail.com> Link: https://lore.kernel.org/r/20241129-ds2482-add-reg-v6-3-bd95ad171e19@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/masters/ds2482.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 19c6d8bd88652936c43f5c53550d74563829a15e Author: Kryštof Černý <cleverline1mc@gmail.com> Date: Fri Nov 29 14:25:54 2024 +0100 w1: ds2482: switch to devm_kzalloc() from kzalloc() Refactored the driver to devm_kzalloc() from kzalloc(), so the future driver edits are easier and less error-prone. Signed-off-by: Kryštof Černý <cleverline1mc@gmail.com> Link: https://lore.kernel.org/r/20241129-ds2482-add-reg-v6-2-bd95ad171e19@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/w1/masters/ds2482.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit be197d90def4282af7d1f7f1210ee1f9342a67d1 Author: Kryštof Černý <cleverline1mc@gmail.com> Date: Fri Nov 29 14:25:53 2024 +0100 dt-bindings: w1: ds2482: Add vcc-supply property ds2482 has a VCC pin, accepting 2.9-5.5 V. Signed-off-by: Kryštof Černý <cleverline1mc@gmail.com> Reviewed-by: Stefan Wahren <wahrenst@gmx.net> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20241129-ds2482-add-reg-v6-1-bd95ad171e19@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Documentation/devicetree/bindings/w1/maxim,ds2482.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 582057d2233a5a38e1aec3f4a6d66b362b42076c Author: Takashi Iwai <tiwai@suse.de> Date: Tue Dec 3 15:18:20 2024 +0100 ASoC: wcd937x: Use *-y for Makefile We should use *-y instead of *-objs in Makefile for the module objects. *-objs is used rather for host programs. Fixes: 313e978df7fc ("ASoC: codecs: wcd937x: add audio routing and Kconfig") Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20241203141823.22393-6-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7916a8d8782d4e53fe0133c8dace20a925e0204e Author: Takashi Iwai <tiwai@suse.de> Date: Tue Dec 3 15:18:19 2024 +0100 ASoC: cs42l84: Use *-y for Makefile We should use *-y instead of *-objs in Makefile for the module objects. *-objs is used rather for host programs. Fixes: 250304a0fb34 ("ASoC: cs42l84: Add new codec driver") Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20241203141823.22393-5-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f60646d9c3bd5b390728ed1a1caa9ded53d47afc Author: Takashi Iwai <tiwai@suse.de> Date: Tue Dec 3 15:18:18 2024 +0100 ASoC: SDCA: Use *-y for Makefile We should use *-y instead of *-objs in Makefile for the module objects. *-objs is used rather for host programs. Fixes: 3a513da1ae33 ("ASoC: SDCA: add initial module") Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20241203141823.22393-4-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sdca/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9d2a2f49244d9737f0ec33f4b7f3580faecd805 Author: Takashi Iwai <tiwai@suse.de> Date: Tue Dec 3 15:18:17 2024 +0100 ASoC: mediatek: mt8365: Use *-y for Makefile We should use *-y instead of *-objs in Makefile for the module objects. *-objs is used rather for host programs. Fixes: 5bbfdad8cf8d ("ASoC: mediatek: Add MT8365 support") Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20241203141823.22393-3-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/mediatek/mt8365/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f0b8d367db5b0c0a0096b1c2ff02ec7c5c893b6 Author: Takashi Iwai <tiwai@suse.de> Date: Tue Dec 3 15:18:16 2024 +0100 ASoC: cs40l50: Use *-y for Makefile We should use *-y instead of *-objs in Makefile for the module objects. *-objs is used rather for host programs. Fixes: c486def5b3ba ("ASoC: cs40l50: Support I2S streaming to CS40L50") Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20241203141823.22393-2-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25cd677636d316669871947639430615ff564890 Author: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Date: Tue Dec 3 13:49:40 2024 +0530 ASoC: amd: ps: add ZSC control register programming sequence Add ZSC Control register programming sequence for ACP D0 and D3 state transitions for ACP6.3 platform. This will allow ACP to enter low power state when ACP enters D3 state. When ACP enters D0 State, ZSC control should be disabled. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20241203081940.3390281-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/amd/ps/pci-ps.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit bcbf421d2190bc4f7d3fd2cc61caf748779ee69e Author: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Date: Tue Dec 3 13:49:39 2024 +0530 ASoC: amd: ps: update mach params subsystem_rev variable Update mach_params subsystem_rev with acp_rev variable for ACP6.3 platform. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20241203081940.3390281-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/amd/ps/pci-ps.c | 1 + 1 file changed, 1 insertion(+) commit 569922b82ca660f8b24e705f6cf674e6b1f99cc7 Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Tue Dec 3 18:48:53 2024 +0800 ASoC: SOF: Intel: hda-dai: Ensure DAI widget is valid during params Each cpu DAI should associate with a widget. However, the topology might not create the right number of DAI widgets for aggregated amps. And it will cause NULL pointer deference. Check that the DAI widget associated with the CPU DAI is valid to prevent NULL pointer deference due to missing DAI widgets in topologies with aggregated amps. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Link: https://patch.msgid.link/20241203104853.56956-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sof/intel/hda-dai.c | 12 ++++++++++++ sound/soc/sof/intel/hda.c | 5 +++++ 2 files changed, 17 insertions(+) commit d7b6d5d949ca73d51123a9e95e141376e04609f0 Author: Takashi Iwai <tiwai@suse.de> Date: Tue Dec 3 14:52:47 2024 +0100 ALSA: hda: Always check capability at opening a hwdep We have a capability check at hda_hwdep_open(), but it's applied only conditionally and the check is skipped when CONFIG_SND_DEBUG_VERBOSE is set. This is rather inconsistent behavior, and we should apply the check always no matter which config is chosen. Link: https://patch.msgid.link/20241203135248.19840-1-tiwai@suse.de Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/hda/hda_hwdep.c | 2 -- 1 file changed, 2 deletions(-) commit 484c997e03cec04da6f69c2c17e854b22aa0f98f Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Tue Dec 3 18:45:34 2024 +0800 ASoC: sdw_utils: cs_amp: Assign non-overlapping TDM masks for each codec on a bus Use snd_soc_dai_set_tdm_slot() on capture DAIs to prevent multiple aggregated amps from trying to send data at the same time. When the capture DAIs of multiple amps on a bus are aggregated they will all be sharing the same bit slots for transmitted audio. This would lead to bus errors if all channels on all amps were enabled, because multiple amps would be trying to send data at the same time. To prevent this, the available channels are divided between the amps on a bus so that only one amp will be sending data for each channel position. A CS35L56 has 4 TX channels, which must be split between all the amps on a bus so that no two amps are using the same channel. This is done simply by dividing by the number of amps on the bus, so that 1 amp can use all 4 channels, 2 amps can use 2 channels each, and 3 or 4 amps can only use 1 channel each. The amps are usually aggregated across multiple SoundWire buses. In this case there will be multiple cpu DAIs in the dailink. The channel mapping is used to determine which amps are on each bus. The allocation of the 4 channels is done separately for each bus (only amps on the same bus can interfere with each other). Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20241203104534.56719-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> include/sound/soc_sdw_utils.h | 2 ++ sound/soc/sdw_utils/soc_sdw_cs_amp.c | 46 ++++++++++++++++++++++++++++++++++++ sound/soc/sdw_utils/soc_sdw_utils.c | 1 + 3 files changed, 49 insertions(+) commit 5547e7ca122081d0603d2d7e0fe81a7c551f1e11 Author: Richard Fitzgerald <rf@opensource.cirrus.com> Date: Tue Dec 3 18:45:33 2024 +0800 ASoC: cs35l56: Split SoundWire DAI into separate playback and capture This patch splits the SoundWire capture DP into a separate DAI so that it can be independently routed and/or aggregated. It also makes corresponding changes to the SOF SoundWire machine driver. The playback and capture over SoundWire are separate DPs so don't have to route to the same place. They could also be aggregated differently - for example the playback DP could be aggregated with a playback-only DAI on a codec. No production device currently uses the capture path and their topologies do not connect it. So there is no need to change the machine driver match table entries for these. They will simply drop the unused capture DAI. There is one hookup used for a non-production development board that was added by commit 05fe62842804 ("ASoC: Intel: soc-acpi-intel-mtl-match: add acpi match table for cdb35l56-eight-c") This is the only hookup using a topology that connects the SoundWire DP for capture, so this hookup has been changed to include an aggregated endpoint for the capture DAI. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20241203104534.56719-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/cs35l56.c | 8 ++- sound/soc/intel/common/soc-acpi-intel-mtl-match.c | 76 ++++++++++++++++++++--- sound/soc/sdw_utils/soc_sdw_utils.c | 12 +++- 3 files changed, 84 insertions(+), 12 deletions(-) commit 429f49ad361cd999ca221d8b562ae2552b7c3e2c Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Tue Nov 19 12:42:35 2024 +0200 genirq: Reuse irq_thread_fn() for forced thread case rq_forced_thread_fn() uses the same action callback as the non-forced variant but with different locking decorations. Reuse irq_thread_fn() here to make that clear. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20241119104339.2112455-3-andriy.shevchenko@linux.intel.com kernel/irq/manage.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 6f8b79683dfb37ee0661cf4c13a72f024c29f65c Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Tue Nov 19 12:42:34 2024 +0200 genirq: Move irq_thread_fn() further up in the code In a preparation to reuse irq_thread_fn() move it further up in the code. No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20241119104339.2112455-2-andriy.shevchenko@linux.intel.com kernel/irq/manage.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) commit e8e7be7d212dc2bc83b8151e51088666a6c42092 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Mon Dec 2 09:27:13 2024 +0100 mctp i2c: drop check because i2c_unregister_device() is NULL safe No need to check the argument of i2c_unregister_device() because the function itself does it. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://patch.msgid.link/20241202082713.9719-1-wsa+renesas@sang-engineering.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> drivers/net/mctp/mctp-i2c.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e13f7e9d0d499999298097ca8356343967b51d31 Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Tue Nov 5 14:20:10 2024 +0100 drm/vmwgfx: Remove initialization of connector status Remove the connector-status initialization from several of vmwgfx's functions. It is not required by the driver or DRM helpers. DRM initializes the connector to unknown status in __drm_connector_init() and reads the physical status when DRM clients or the user needs the information, or if it detects/polls a change to the status. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Zack Rusin <zack.rusin@broadcom.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241105132045.471856-1-tzimmermann@suse.de drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 1 - 3 files changed, 3 deletions(-) commit 24a53864da2623bd90ecd51abdfb60426dc89abe Author: Zhu Jun <zhujun2@cmss.chinamobile.com> Date: Tue Dec 3 01:42:50 2024 -0800 ALSA: hda: Fix typo in hda_sysfs.h The word 'accodingly' is wrong, so fix it. Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Link: https://patch.msgid.link/20241203094250.8312-1-zhujun2@cmss.chinamobile.com Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/hda/hda_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5217ae2b86f9b9ccdb4e37d3268a535b62a97599 Author: liujing <liujing@cmss.chinamobile.com> Date: Tue Dec 3 14:35:53 2024 +0800 ALSA: ac97: Modify the incorrect format specifier Replace %d with %u in snprintf() because it is "unsigned int". Signed-off-by: liujing <liujing@cmss.chinamobile.com> Link: https://patch.msgid.link/20241203063553.2825-1-liujing@cmss.chinamobile.com Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/ac97/ac97_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f7fb33b7ba1287c33e35b7778d5a371472e3503 Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Dec 2 14:54:37 2024 +0200 drm/i915/display: remove unused for_each_crtc() This is essentially a duplicate of drm_for_each_crtc() anyway. Remove. Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241202125437.1154945-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_display.h | 3 --- 1 file changed, 3 deletions(-) commit b73435047ef74c82d6e82c333810eba0038f9cf7 Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Fri Nov 15 15:43:54 2024 +0200 clk: renesas: r9a08g045: Add clock, reset and power domain for the remaining SCIFs The Renesas RZ/G3S SoC has 6 SCIF interfaces. SCIF0 is used as debug console and is already enabled. Add clock, reset and power domain support for the remaining ones. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241115134401.3893008-2-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/r9a08g045-cpg.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 97088b3a8e71ed87fbb25a34b222d869033d73df Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Date: Wed Nov 13 15:35:16 2024 +0200 clk: renesas: r9a08g045: Add clocks, resets and power domains support for SSI Add SSI clocks, resets and power domains support for the SSI blocks available on the Renesas RZ/G3S SoC. Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241113133540.2005850-2-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/r9a08g045-cpg.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit a6ca7e6240f0651412da6a17d0e7a8f66d3455a6 Author: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Thu Oct 31 13:43:16 2024 +0100 clk: renesas: cpg-mssr: Fix 'soc' node handling in cpg_mssr_reserved_init() A device_node reference obtained via of_find_node_by_path() requires explicit calls to of_node_put() after it is no longer required to avoid leaking the resource. Instead of adding the missing calls to of_node_put() in all execution paths, use the cleanup attribute for 'soc' by means of the __free() macro, which automatically calls of_node_put() when the variable goes out of scope. Fixes: 6aa175476490 ("clk: renesas: cpg-mssr: Ignore all clocks assigned to non-Linux system") Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20241031-clk-renesas-cpg-mssr-cleanup-v2-1-0010936d1154@gmail.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> drivers/clk/renesas/renesas-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 096a22ae0815e5252e098c6808db501a071803bd Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Thu Nov 14 01:12:05 2024 +0000 arm64: dts: renesas: ulcb: Add sample Audio Codec settings ulcb{-kf} needs amixer settings to use Audio. Add Sample settings for it, for not to forget. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/87wmh6pqje.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 18 +++++++++++++++++- arch/arm64/boot/dts/renesas/ulcb.dtsi | 5 +++++ 2 files changed, 22 insertions(+), 1 deletion(-) commit c10597366f60ff6bceba5386e9694634fb90c4ec Author: Paul Kocialkowski <paulk@sys-base.io> Date: Sat Nov 30 12:36:32 2024 +0100 MAINTAINERS: Update own email address from Bootlin to sys-base Update my email address as I am no longer working at Bootlin and have started my own consulting company: sys-base. Signed-off-by: Paul Kocialkowski <paulk@sys-base.io> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> MAINTAINERS | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9986ce65bebb9a07a080d1e6ce04926b4c49ff17 Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Fri Nov 15 22:08:55 2024 +0100 ata: Constify struct pci_device_id 'struct pci_device_id' is not modified in these drivers. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 4245 1454 4 5703 1647 drivers/ata/ata_generic.o After: ===== text data bss dec hex filename 4725 974 4 5703 1647 drivers/ata/ata_generic.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Niklas Cassel <cassel@kernel.org> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> Link: https://lore.kernel.org/r/8bddfee7f6f0f90eeb6da7156e30ab3bd553deb1.1731704917.git.christophe.jaillet@wanadoo.fr Signed-off-by: Niklas Cassel <cassel@kernel.org> drivers/ata/ata_generic.c | 2 +- drivers/ata/pata_atp867x.c | 2 +- drivers/ata/pata_piccolo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit c1beb6f75d5e60e4e57a837c665a52eb79eb19ba Author: Rex Nie <rex.nie@jaguarmicro.com> Date: Tue Nov 12 15:41:00 2024 +0800 drm/msm/hdmi: simplify code in pll_get_integloop_gain In pll_get_integloop_gain(), digclk_divsel=1 or 2, base=63 or 196ULL, so the base may be 63, 126, 196, 392. The condition base <= 2046 always true. Fixes: caedbf17c48d ("drm/msm: add msm8998 hdmi phy/pll support") Signed-off-by: Rex Nie <rex.nie@jaguarmicro.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/624153/ Link: https://lore.kernel.org/r/20241112074101.2206-1-rex.nie@jaguarmicro.com Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b08796f2a7ca0c27b16543603df85bb45a640ff Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Tue Nov 12 05:21:24 2024 +0200 dt-bindings: display/msm: qcom,sa8775p-mdss: fix the example Add p1 region to the list of DP registers in the SA8775p example. This fixes the following warning: Documentation/devicetree/bindings/display/msm/qcom,sa8775p-mdss.example.dtb: displayport-controller@af54000: reg: [[183844864, 260], [183845376, 192], [183848960, 1904], [183853056, 156]] is too short Fixes: 409685915f00 ("dt-bindings: display/msm: Document MDSS on SA8775P") Reported-by: Rob Herring <robh@kernel.org> Closes: https://lore.kernel.org/dri-devel/CAL_JsqJ0zoyaZAgZtyJ8xMsPY+YzrbF-YG1vPN6tFoFXQaW09w@mail.gmail.com/ Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Patchwork: https://patchwork.freedesktop.org/patch/624068/ Link: https://lore.kernel.org/r/20241112-fd-dp-fux-warning-v2-1-8cc4960094bd@linaro.org Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Documentation/devicetree/bindings/display/msm/qcom,sa8775p-mdss.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b047cbe5e54b632042941b90b808223e63742690 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Mon Dec 2 12:06:32 2024 +0200 drm/msm/dp: fix msm_dp_utils_pack_sdp_header interface The msm_dp_utils_pack_sdp_header() accepts an unlimited-size u32 pointer for the header output, while it expects a two-element array. It performs a sizeof check which is always true on 64-bit platforms (since sizeof(u32*) is 8) and is always false on 32-bit platforms. It returns an error code which nobody actually checks. Fix the function interface to accept u32[2] and return void, skipping all the checks. Fixes: 55fb8ffc1802 ("drm/msm/dp: add VSC SDP support for YUV420 over DP") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/626806/ Link: https://lore.kernel.org/r/20241202-fd-dp-audio-fixup-v2-2-d9187ea96dad@linaro.org [quic_abhinavk@quicinc.com: minor fix in the commit message] Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> drivers/gpu/drm/msm/dp/dp_utils.c | 10 +--------- drivers/gpu/drm/msm/dp/dp_utils.h | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) commit 7dee35d79bb046bfd425aa9e58a82414f67c1cec Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Mon Dec 2 12:06:31 2024 +0200 drm/msm/dp: set safe_to_exit_level before printing it Rather than printing random garbage from stack and pretending that it is the default safe_to_exit_level, set the variable beforehand. Fixes: d13e36d7d222 ("drm/msm/dp: add audio support for Display Port on MSM") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202411081748.0PPL9MIj-lkp@intel.com/ Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/626804/ Link: https://lore.kernel.org/r/20241202-fd-dp-audio-fixup-v2-1-d9187ea96dad@linaro.org Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> drivers/gpu/drm/msm/dp/dp_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 906c4b306e9340f6ffd6d44904ebc86e62e63627 Author: John Harrison <John.C.Harrison@Intel.com> Date: Thu Nov 28 13:08:24 2024 -0800 drm/xe: Add mutex locking to devcoredump There are now multiple places that can trigger a coredump. Some of which can happen in parallel. There is already a check against capturing multiple dumps sequentially, but without locking it doesn't guarantee to work against concurrent dumps. And if two dumps do happen in parallel, they can end up doing Bad Things such as one call stack freeing the data the other call stack is still processing. Which leads to a crashed kernel. Further, it is possible for the DRM timeout to expire and trigger a free of the capture while a user is still reading that capture out through sysfs. Again leading to dodgy pointer problems. So, add a mutext lock around the capture, read and free functions to prevent inteference. v2: Swap tiny scope spin_lock for larger scope mutex and fix kernel-doc comment (review feedback from Matthew Brost) v3: Move mutex locks to exclude worker thread and add reclaim annotation (review feedback from Matthew Brost) v4: Fix typo. Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241128210824.3302147-4-John.C.Harrison@Intel.com drivers/gpu/drm/xe/xe_devcoredump.c | 33 +++++++++++++++++++++++++++++-- drivers/gpu/drm/xe/xe_devcoredump_types.h | 4 +++- 2 files changed, 34 insertions(+), 3 deletions(-) commit 90f51a7f4ec1004fc4ddfbc6d1f1068d85ef4771 Author: John Harrison <John.C.Harrison@Intel.com> Date: Thu Nov 28 13:08:23 2024 -0800 drm/xe: Move the coredump registration to the worker thread Adding lockdep checking to the coredump code showed that there was an existing violation. The dev_coredumpm_timeout() call is used to register the dump with the base coredump subsystem. However, that makes multiple memory allocations, only some of which use the GFP_ flags passed in. So that also needs to be deferred to the worker function where it is safe to allocate with arbitrary flags. In order to not add protoypes for the callback functions, moving the _timeout call also means moving the worker thread function to later in the file. v2: Rebased after other changes to the worker function. Fixes: e799485044cb ("drm/xe: Introduce the dev_coredump infrastructure.") Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Francois Dugast <francois.dugast@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: "Christian König" <christian.koenig@amd.com> Cc: intel-xe@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Cc: <stable@vger.kernel.org> # v6.8+ Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241128210824.3302147-3-John.C.Harrison@Intel.com drivers/gpu/drm/xe/xe_devcoredump.c | 73 ++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 34 deletions(-) commit 429915acaea15e28dbedd31698283ef860d4f039 Author: John Harrison <John.C.Harrison@Intel.com> Date: Thu Nov 28 13:08:22 2024 -0800 drm/xe: Add a reason string to the devcoredump There are debug level prints giving more information about the cause of the hang immediately before core dumps are created. However, not everyone has debug level prints enabled or saves the dmesg log at all. So include that information in the dump file itself. Also, at least one of those prints included the pid as well as the process name. So include that in the capture too. v2: Fix kvfree vs kfree and missing kernel-doc (review feedback from Matthew Brost) v3: Use GFP_ATOMIC instead of GFP_KERNEL. Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241128210824.3302147-2-John.C.Harrison@Intel.com drivers/gpu/drm/xe/xe_devcoredump.c | 21 ++++++++++++++++++--- drivers/gpu/drm/xe/xe_devcoredump.h | 5 +++-- drivers/gpu/drm/xe/xe_devcoredump_types.h | 4 ++++ drivers/gpu/drm/xe/xe_guc_submit.c | 14 ++++++++++---- 4 files changed, 35 insertions(+), 9 deletions(-) commit b32913a5609a36c230e9b091da26d38f8e80a056 Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Sat Nov 30 15:53:49 2024 +0100 ptp: Switch back to struct platform_driver::remove() After commit 0edb555a65d1 ("platform: Make platform_driver::remove() return void") .remove() is (again) the right callback to implement for platform drivers. Convert all platform drivers below drivers/ptp to use .remove(), with the eventual goal to drop struct platform_driver::remove_new(). As .remove() and .remove_new() have the same prototypes, conversion is done by just changing the structure member name in the driver initializer. While touching these drivers, make the alignment of the touched initializers consistent. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> drivers/ptp/ptp_clockmatrix.c | 2 +- drivers/ptp/ptp_dte.c | 4 ++-- drivers/ptp/ptp_fc3.c | 2 +- drivers/ptp/ptp_idt82p33.c | 2 +- drivers/ptp/ptp_ines.c | 4 ++-- drivers/ptp/ptp_qoriq.c | 2 +- drivers/ptp/ptp_vmclock.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) commit da92d3dfc871e821a1bface3ba5afcf8cda19805 Author: Niklas Cassel <cassel@kernel.org> Date: Thu Nov 7 13:37:33 2024 +0100 arm64: dts: rockchip: enable the mmu600_pcie IOMMU on the rk3588 SoC Commit cd81d3a0695c ("arm64: dts: rockchip: add rk3588 pcie and php IOMMUs") added the rk3588 SoC's pcie IOMMU and php IOMMU as disabled. The mmu600_pcie is connected with the five PCIe controllers. See 8.2 Block Diagram, in rk3588 TRM (Technical Reference Manual). The five PCIe controllers are: pcie3x4, pcie3x2, pcie2x1l0, pcie2x1l1, pcie2x1l2. pcie3x4 can run in either Root Complex mode or Endpoint mode, the other four PCIe controllers can only run in Root Complex mode. To describe this we thus have six different device nodes in the device tree. A PCIe controller in Root Complex mode needs to specify an iommu-map, such that the device knows how to convert a Requester ID (PCI BDF) to an IOMMU master ID (stream ID). (A PCIe controller in Endpoint mode should use the iommus property, just like a regular device.) If you look at the device tree bindings for msi-map and iommu-map, you can see that the conversion from Requester ID to MSI-specifier data is the same as the conversion from Requester ID to IOMMU specifier data. Thus it is sensible to define the iommu-map property value similar to the msi-map, such that the conversion will be identical. Add the proper iommu device tree properties for these six device nodes connected to the mmu600_pcie, so that we can enable the mmu600_pcie IOMMU. (The mmu600_php IOMMU is not touched, so it is still disabled.) Signed-off-by: Niklas Cassel <cassel@kernel.org> Link: https://lore.kernel.org/r/20241107123732.1160063-2-cassel@kernel.org Signed-off-by: Heiko Stuebner <heiko@sntech.de> arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 3 ++- arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 0a7477507b11a73f75f4e6878e0c88a903e502bf Author: Randy Dunlap <rdunlap@infradead.org> Date: Wed Nov 27 19:58:59 2024 -0800 drm/xe/vm_doc: fix more doc typos Fix all typos in xe_vm_doc.h as reported by codespell. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: intel-xe@lists.freedesktop.org Cc: David Airlie <airlied@gmail.com> Cc: Simona Vetter <simona@ffwll.ch> Cc: dri-devel@lists.freedesktop.org Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241128035901.375399-1-rdunlap@infradead.org Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/xe_vm_doc.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 708d55db3edbe2ccf88d94b5f2e2b404bc0ba37c Author: E Shattow <e@freeshell.de> Date: Wed Nov 27 07:49:23 2024 -0800 riscv: dts: starfive: jh7110-milkv-mars: enable usb0 host function Milk-V Mars board routes one of four USB-A ports to USB0 on the SoC rather than to the VL805 USB 3.0 <-> PCIe chip. Set JH7110 on-chip USB host mode and vbus pin assignment accordingly. Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Signed-off-by: E Shattow <e@freeshell.de> Signed-off-by: Conor Dooley <conor.dooley@microchip.com> arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 03bd268ae048647520075edda5ede29be46c317d Author: E Shattow <e@freeshell.de> Date: Wed Nov 27 07:15:05 2024 -0800 riscv: dts: starfive: jh7110-pine64-star64: enable usb0 host function Pine64 Star64 board routes all four USB-A ports to USB0 on the SoC. Set JH7110 on-chip USB host mode and vbus pin assignment accordingly. Signed-off-by: E Shattow <e@freeshell.de> Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com> arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit c721d8f8b196285a59ed5c940e856bce9890523f Author: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Date: Thu Nov 28 15:38:43 2024 +0100 selftests/bpf: ensure proper root namespace cleanup when test fail serial_test_flow_dissector_namespace manipulates both the root net namespace and a dedicated non-root net namespace. If for some reason a program attach on root namespace succeeds while it was expected to fail, the unexpected program will remain attached to the root namespace, possibly affecting other runs or even other tests in the same run. Fix undesired test failure side effect by explicitly detaching programs on failing tests expecting attach to fail. As a side effect of this change, do not test errno value if the tested operation do not fail. Fixes: 284ed00a59dd ("selftests/bpf: migrate flow_dissector namespace exclusivity test") Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://lore.kernel.org/r/20241128-small_flow_test_fix-v1-1-c12d45c98c59@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/prog_tests/flow_dissector.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 8359ea9c119570fb5971379655661f77a3aafb1d Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Date: Mon Dec 2 12:36:41 2024 +0100 ASoC: Drop explicit initialization of struct i2c_device_id::driver_data to 0 These drivers don't use the driver_data member of struct i2c_device_id, so don't explicitly initialize this member. This prepares putting driver_data in an anonymous union which requires either no initialization or named designators. But it's also a nice cleanup on its own. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20241202113641.1003836-2-u.kleine-koenig@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/cs42l84.c | 2 +- sound/soc/codecs/es8323.c | 2 +- sound/soc/codecs/ntp8835.c | 2 +- sound/soc/codecs/ntp8918.c | 2 +- sound/soc/codecs/sma1307.c | 4 ++-- sound/soc/codecs/uda1342.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) commit c712e8fd9bf45facee3806feef139025c4997445 Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Date: Fri Nov 8 12:38:22 2024 +0530 MAINTAINERS: Change AMD PMC driver status to "Supported" The AMD PMC driver is actively being developed, so the MAINTAINERS record should reflect "Supported" instead of "Maintained." Update the MAINTAINERS database to reflect this change. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20241108070822.3912689-11-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 382fe403dc317f3e38ddf508402af72e501aebf2 Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Date: Fri Nov 8 12:38:21 2024 +0530 platform/x86/amd/pmc: Add STB support for AMD Desktop variants Previously, AMD's Ryzen Desktop SoCs did not include support for STB. However, to accommodate this recent change, PMFW has implemented a new message port pair mechanism for handling messages, arguments, and responses, specifically designed for distinguishing from Mobile SoCs. Therefore, it is necessary to update the driver to properly handle this incoming change. Add a new function amd_stb_update_args() to simply the arguments that needs to be passed between S2D supported Mobile SoCs vs Desktop SoCs. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20241108070822.3912689-10-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/amd/pmc/mp1_stb.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) commit 4aeca317803525f1303f6c478fc42e56bb038295 Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Date: Fri Nov 8 12:38:20 2024 +0530 platform/x86/amd/pmc: Update S2D message id for 1Ah Family 70h model AMD's 1Ah family 70h model uses a different S2D (Spill to DRAM) message ID. Update the driver with this information. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20241108070822.3912689-9-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/amd/pmc/mp1_stb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e22fbf27a6bac33316aa378548126d3d3b145f60 Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Date: Fri Nov 8 12:38:19 2024 +0530 platform/x86/amd/pmc: Update IP information structure for newer SoCs The latest AMD processors include additional IP blocks that must be turned off before transitioning to low power. PMFW provides an interface to retrieve debug information from each IP block, which is useful for diagnosing issues if the system fails to enter or exit low power states, or for profiling which IP block takes more time. Add support for using this information within the driver. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20241108070822.3912689-8-Shyam-sundar.S-k@amd.com [ij: grouped active_ips, ips_ptr, and num_ips next to each other.] Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/amd/pmc/pmc.c | 42 +++++++++++++++++++++++++++++++++++--- drivers/platform/x86/amd/pmc/pmc.h | 3 ++- 2 files changed, 41 insertions(+), 4 deletions(-) commit 0b4c20ff2bca843a51a75ac53832a9b2f0645bc5 Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Date: Fri Nov 8 12:38:18 2024 +0530 platform/x86/amd/pmc: Use ARRAY_SIZE() to fill num_ips information Instead of manually specifying num_ips, use ARRAY_SIZE() to set this value based on the actual number of elements in the array. Reviewed-by: Ilpo Jarvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20241108070822.3912689-7-Shyam-sundar.S-k@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/amd/pmc/pmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3279f7a6b7d42374897d3b818630602f0ff56521 Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Date: Fri Nov 8 12:38:17 2024 +0530 platform/x86/amd/pmc: Isolate STB code changes to a new file Since S2D (Spill to DRAM) uses different message port offsets compared to PMC message offsets for communication with PMFW, relocate the S2D macros from pmc.c to a new file, mp1_stb.c, for better code organization. Following this change, it is logical to introduce a new structure, "struct stb_arg," to pass the message, argument, and response offset details to PMFW via the amd_pmc_send_cmd() call. Additionally, move the s2d_msg_id member from amd_pmc_dev into the new structure. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20241108070822.3912689-6-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/amd/pmc/mp1_stb.c | 33 ++++++++++++++++++++++----------- drivers/platform/x86/amd/pmc/pmc.c | 17 ++++++----------- drivers/platform/x86/amd/pmc/pmc.h | 9 ++++++++- 3 files changed, 36 insertions(+), 23 deletions(-) commit 2851f4f8ed4e130d864c5478c6da933a4427ae52 Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Date: Fri Nov 8 12:38:16 2024 +0530 platform/x86/amd/pmc: Define enum for S2D/PMC msg_port and add helper function To distinguish between the PMC message port and the S2D (Spill to DRAM) message port, replace the use of 0 and 1 with an enum. To avoid printing the S2D or PMC port multiple times in debug print, add new routine to retrieve the message port information, which can be used to print the right msg_port getting used. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20241108070822.3912689-5-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/amd/pmc/mp1_stb.c | 8 ++++---- drivers/platform/x86/amd/pmc/pmc.c | 22 +++++++++++++++++----- drivers/platform/x86/amd/pmc/pmc.h | 7 ++++++- 3 files changed, 27 insertions(+), 10 deletions(-) commit 00a8d002432fbb955f48445857b2f5be6e93ccc3 Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Date: Fri Nov 8 12:38:15 2024 +0530 platform/x86/amd/pmc: Update function names to align with new STB file With STB now in a separate file, update the function names to match the correct naming schema by removing the _pmc_ prefix where needed. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20241108070822.3912689-4-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/amd/pmc/mp1_stb.c | 71 +++++++++++++++++----------------- drivers/platform/x86/amd/pmc/pmc.c | 8 ++-- drivers/platform/x86/amd/pmc/pmc.h | 6 +-- 3 files changed, 42 insertions(+), 43 deletions(-) commit 0e914063ddd135407c0550b77a6f5bf779bf8384 Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Date: Fri Nov 8 12:38:14 2024 +0530 platform/x86/amd/pmc: Move STB functionality to a new file for better code organization As the SoC evolves with each generation, the dynamics between the PMC and STB layers within the PMC driver are becoming increasingly complex, making it challenging to manage both in a single file and maintain code readability. Additionally, during silicon bringup, the PMC functionality is often enabled first, with STB functionality added later. This can lead to missed updates in the driver, potentially causing issues. To address these challenges, it's beneficial to move all STB-related changes to a separate file. This approach will better accommodate newer SoCs, provide improved flexibility for desktop variants, and facilitate the collection of additional debug information through STB mechanisms. Also the additional checks for entering s2d_init have been moved from the PMC probe to amd_pmc_s2d_init(). This adjustment makes more sense following the transfer of code to the separate mp1_stb.c file. Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20241108070822.3912689-3-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/amd/pmc/Makefile | 2 +- drivers/platform/x86/amd/pmc/mp1_stb.c | 296 +++++++++++++++++++++++++++++++++ drivers/platform/x86/amd/pmc/pmc.c | 283 +------------------------------ drivers/platform/x86/amd/pmc/pmc.h | 5 + 4 files changed, 303 insertions(+), 283 deletions(-) commit 83ad6974dd3bf34c080b3c08d36d02ebc3bd6da8 Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Date: Fri Nov 8 12:38:13 2024 +0530 platform/x86/amd/pmc: Move STB block into amd_pmc_s2d_init() Transfer the support for STB-related file operations to the amd_pmc_s2d_init() function, thereby consolidating the STB and S2D (Spill to DRAM) functionality in one location. Also, relocate the call to amd_pmc_s2d_init() to occur after the creation of the "amd_pmc" debugfs directory. This ensures that the driver's root debugfs directory is established beforehand. For older platforms that supported S2D, exit immediately after creating debugfs. These platforms may not support the PMFW messages available on newer platforms. This adjustment is necessary due to the relocation of debugfs creation into amd_pmc_s2d_init(). Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20241108070822.3912689-2-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/amd/pmc/pmc.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit a2d09455b27b64ff6afe409fc87f0418adf2d3fe Author: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Date: Fri Oct 25 15:29:31 2024 +0530 dmaengine: ae4dma: Register debugfs using ptdma_debugfs_setup Use the ptdma_debugfs_setup function to register debugfs for AE4DMA DMA engine. Reviewed-by: Raju Rangoju <Raju.Rangoju@amd.com> Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Link: https://lore.kernel.org/r/20241025095931.726018-7-Basavaraj.Natikar@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/amd/ae4dma/ae4dma-dev.c | 2 ++ drivers/dma/amd/ptdma/ptdma-debugfs.c | 1 + 2 files changed, 3 insertions(+) commit b10b278ea003f4ca0ac81950c109ba154b84745e Author: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Date: Fri Oct 25 15:29:30 2024 +0530 dmaengine: ptdma: Extend ptdma-debugfs to support multi-queue To support multi-channel functionality with AE4DMA engine, extend the ptdma-debugfs with reusable components. Reviewed-by: Raju Rangoju <Raju.Rangoju@amd.com> Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Link: https://lore.kernel.org/r/20241025095931.726018-6-Basavaraj.Natikar@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/amd/ptdma/ptdma-debugfs.c | 78 +++++++++++++++++++++++++---------- 1 file changed, 57 insertions(+), 21 deletions(-) commit 98f5a44326229d3fa33db0adb3d15bdbccb59bf5 Author: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Date: Fri Oct 25 15:29:29 2024 +0530 dmaengine: ae4dma: Register AE4DMA using pt_dmaengine_register Use the pt_dmaengine_register function to register a AE4DMA DMA engine. Reviewed-by: Raju Rangoju <Raju.Rangoju@amd.com> Reviewed-by: Philipp Stanner <pstanner@redhat.com> Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Link: https://lore.kernel.org/r/20241025095931.726018-5-Basavaraj.Natikar@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/amd/ae4dma/ae4dma-dev.c | 4 ++ drivers/dma/amd/ae4dma/ae4dma-pci.c | 1 + drivers/dma/amd/ae4dma/ae4dma.h | 2 + drivers/dma/amd/ptdma/ptdma-dmaengine.c | 69 ++++++++++++++++++++++++++++++++- 4 files changed, 74 insertions(+), 2 deletions(-) commit 69a47b16a51b3a52b808823f667248715ecef8c9 Author: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Date: Fri Oct 25 15:29:28 2024 +0530 dmaengine: ptdma: Extend ptdma to support multi-channel and version To support multi-channel functionality with AE4DMA engine, extend the PTDMA code with reusable components. Reviewed-by: Raju Rangoju <Raju.Rangoju@amd.com> Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Link: https://lore.kernel.org/r/20241025095931.726018-4-Basavaraj.Natikar@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/amd/ae4dma/ae4dma.h | 2 + drivers/dma/amd/ptdma/ptdma-dmaengine.c | 105 ++++++++++++++++++++++++++------ drivers/dma/amd/ptdma/ptdma.h | 2 + 3 files changed, 89 insertions(+), 20 deletions(-) commit 90a30e268d9bd29dac63fece0509f9f8d4835d57 Author: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Date: Fri Oct 25 15:29:27 2024 +0530 dmaengine: ae4dma: Add AMD ae4dma controller driver Add support for AMD AE4DMA controller. It performs high-bandwidth memory to memory and IO copy operation. Device commands are managed via a circular queue of 'descriptors', each of which specifies source and destination addresses for copying a single buffer of data. Reviewed-by: Raju Rangoju <Raju.Rangoju@amd.com> Reviewed-by: Philipp Stanner <pstanner@redhat.com> Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Link: https://lore.kernel.org/r/20241025095931.726018-3-Basavaraj.Natikar@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org> MAINTAINERS | 6 ++ drivers/dma/amd/Kconfig | 15 +++ drivers/dma/amd/Makefile | 1 + drivers/dma/amd/ae4dma/Makefile | 10 ++ drivers/dma/amd/ae4dma/ae4dma-dev.c | 151 ++++++++++++++++++++++++++++++ drivers/dma/amd/ae4dma/ae4dma-pci.c | 157 ++++++++++++++++++++++++++++++++ drivers/dma/amd/ae4dma/ae4dma.h | 96 +++++++++++++++++++ drivers/dma/amd/ptdma/ptdma-dmaengine.c | 49 ++++++++++ 8 files changed, 485 insertions(+) commit e01ee7c660752923b2d0881fb20045ce79677258 Author: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Date: Fri Oct 25 15:29:26 2024 +0530 dmaengine: Move AMD PTDMA driver to amd directory PTDMA driver is the AMD DMA driver, and newer AMD platforms support newer DMA engines. Hence, move the current drivers to the AMD directory. This would also mean that future driver submissions to the AMD DMA driver will also land in the AMD-specific directory. Reviewed-by: Raju Rangoju <Raju.Rangoju@amd.com> Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Link: https://lore.kernel.org/r/20241025095931.726018-2-Basavaraj.Natikar@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org> MAINTAINERS | 4 ++-- drivers/dma/Kconfig | 2 -- drivers/dma/Makefile | 1 - drivers/dma/amd/Kconfig | 13 +++++++++++++ drivers/dma/amd/Makefile | 1 + drivers/dma/{ => amd}/ptdma/Makefile | 0 drivers/dma/{ => amd}/ptdma/ptdma-debugfs.c | 0 drivers/dma/{ => amd}/ptdma/ptdma-dev.c | 0 drivers/dma/{ => amd}/ptdma/ptdma-dmaengine.c | 3 +-- drivers/dma/{ => amd}/ptdma/ptdma-pci.c | 0 drivers/dma/{ => amd}/ptdma/ptdma.h | 2 +- drivers/dma/ptdma/Kconfig | 13 ------------- 12 files changed, 18 insertions(+), 21 deletions(-) commit 836d0d7107e53e6479b60d32fb73bd5f7813e5d1 Author: Suma Hegde <suma.hegde@amd.com> Date: Mon Nov 18 10:27:52 2024 +0000 platform/x86/amd/hsmp: Add support for HSMP protocol version 7 messages Following new HSMP messages are available on family 0x1A, model 0x00-0x1F platforms with protocol version 7. Add support for them in the driver. - SetXgmiPstateRange(26h) - CpuRailIsoFreqPolicy(27h) - DfcEnable(28h) - GetRaplUnit(30h) - GetRaplCoreCounter(31h) - GetRaplPackageCounter(32h) Also update HSMP message PwrEfficiencyModeSelection-21h. This message is updated to include GET option in recent firmware. Signed-off-by: Suma Hegde <suma.hegde@amd.com> Reviewed-by: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com> Link: https://lore.kernel.org/r/20241118102752.11703-1-suma.hegde@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> arch/x86/include/uapi/asm/amd_hsmp.h | 64 ++++++++++++++++++++++++++++++++++-- drivers/platform/x86/amd/hsmp/hsmp.c | 47 ++++++++++++++++++++++---- 2 files changed, 103 insertions(+), 8 deletions(-) commit 6f59fbcfa041e7d69e5e5f39d4c8cffa06fdc50b Author: Zhanjun Dong <zhanjun.dong@intel.com> Date: Tue Nov 26 12:10:52 2024 -0800 drm/xe/guc: Fix missing init value and add register order check Fix missing initial value for last_value. For GuC capture register definition, it is required to define 64bit register in a pair of 2 consecutive 32bit register entries, low first, then hi. Add code to check this order. Changes from prior revs: v5:- Correct cross-line comment format v4:- Fix warn on condition and remove skipping v3:- Move break inside brace v2:- Correct the fix tag pointed commit Add examples in comments for warning Add 1 missing hi condition check Fixes: ecb633646391 ("drm/xe/guc: Plumb GuC-capture into dev coredump") Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126201052.1937079-1-zhanjun.dong@intel.com drivers/gpu/drm/xe/xe_guc_capture.c | 77 +++++++++++++++++++++++++++++-------- 1 file changed, 62 insertions(+), 15 deletions(-) commit 0ffafd4a3b39b341a4d7d73df34ab3b2c07a26c0 Author: Abdul Rahim <abdul.rahim@myyahoo.com> Date: Thu Nov 28 02:07:07 2024 +0530 fujitsu-laptop: replace strcpy -> strscpy strcpy() performs no bounds checking on the destination buffer. This could result in linear overflows beyond the end of the buffer, leading to all kinds of misbehaviors.[1] [1]: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy Signed-off-by: Abdul Rahim <abdul.rahim@myyahoo.com> Acked-by: Jonathan Woithe <jwoithe@just42.net> Link: https://lore.kernel.org/r/20241127203710.36425-1-abdul.rahim@myyahoo.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/fujitsu-laptop.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4a69c4fbb8d53e8ace3586f395b1dc98244e4a8c Author: Raag Jadav <raag.jadav@intel.com> Date: Fri Nov 29 13:13:00 2024 +0530 drm/xe/throttle: Log throttle reasons Log throttle register MMIO reads which will be useful for debugging. Signed-off-by: Raag Jadav <raag.jadav@intel.com> Reviewed-by: Riana Tauro <riana.tauro@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241129074300.1304068-1-raag.jadav@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/xe_gt_throttle.c | 2 ++ 1 file changed, 2 insertions(+) commit 8d0191a6020e325a1c9730539dd2f0c03d71d9b4 Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Sat Nov 2 12:46:04 2024 +0100 dmaengine: idxd: Remove a useless mutex ida_alloc()/ida_free() don't need any mutex, so remove this one. It was introduced by commit e6fd6d7e5f0f ("dmaengine: idxd: add a device to represent the file opened"). Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Fenghua Yu <fenghua.yu@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/e08df764e7046178ada4ec066852c0ce65410373.1730547933.git.christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/idxd/cdev.c | 5 ----- 1 file changed, 5 deletions(-) commit 8a20040f9de3a4ea90ab900cdd7745d57bc2da82 Author: Marek Vasut <marex@denx.de> Date: Thu Oct 31 18:11:04 2024 +0100 dmaengine: xilinx_dma: Configure parking registers only if parking enabled The VDMA can work in two modes, parking or circular. Do not program the parking mode registers in case circular mode is used, it is useless. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com> Link: https://lore.kernel.org/r/20241031171132.56861-1-marex@denx.de Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/xilinx/xilinx_dma.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 0f31c0912286f84b34b15e39b286db8f4765ced8 Author: Colin Ian King <colin.i.king@gmail.com> Date: Thu Nov 7 11:46:56 2024 +0000 dmaengine: xilinx: xdma: remove redundant check on ret The variable ret is being checked for an error and returning ret and the following statement returns ret too. The if check is redundant, and remove it. Just return the value returned from the call to regmap_write. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20241107114656.17611-1-colin.i.king@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> drivers/dma/xilinx/xdma.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit bf9b0834552e615b1dbd3015c2f0ed2a3bdf62a4 Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Fri Nov 8 22:41:17 2024 +0100 dt-bindings: dma: qcom,gpi: Add SA8775P compatible Add a compatible for the GPI DMA controller on SA8775P. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241108-topic-sa8775_dma2-v1-1-1d3b0d08d153@oss.qualcomm.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 + 1 file changed, 1 insertion(+) commit ba257e7006867ab1844a6449bdfa3b5aea94fe29 Merge: e39531352aed 707080d4fea8 Author: Mark Brown <broonie@kernel.org> Date: Mon Dec 2 16:51:15 2024 +0000 spi: cadence-quadspi: Add support for device reset Merge series from Srikanth Boyapally <srikanth.boyapally@amd.com>: Add support for device reset via OSPI on Versal Gen 2 platform. commit 794dae89874c6be76b46ae90e0c78c76a80175c3 Author: Viken Dadhaniya <quic_vdadhani@quicinc.com> Date: Tue Nov 12 09:42:51 2024 +0530 dt-bindings: dma: qcom,gpi: Add QCS8300 compatible Document compatible for GPI DMA controller on QCS8300 platform. Signed-off-by: Viken Dadhaniya <quic_vdadhani@quicinc.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241112041252.351266-1-quic_vdadhani@quicinc.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 + 1 file changed, 1 insertion(+) commit 7378aeb664e5ebc396950b36a1f2dedf5aabec20 Author: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Date: Fri Nov 22 18:51:27 2024 +0100 remoteproc: core: Fix ida_free call while not allocated In the rproc_alloc() function, on error, put_device(&rproc->dev) is called, leading to the call of the rproc_type_release() function. An error can occurs before ida_alloc is called. In such case in rproc_type_release(), the condition (rproc->index >= 0) is true as rproc->index has been initialized to 0. ida_free() is called reporting a warning: [ 4.181906] WARNING: CPU: 1 PID: 24 at lib/idr.c:525 ida_free+0x100/0x164 [ 4.186378] stm32-display-dsi 5a000000.dsi: Fixed dependency cycle(s) with /soc/dsi@5a000000/panel@0 [ 4.188854] ida_free called for id=0 which is not allocated. [ 4.198256] mipi-dsi 5a000000.dsi.0: Fixed dependency cycle(s) with /soc/dsi@5a000000 [ 4.203556] Modules linked in: panel_orisetech_otm8009a dw_mipi_dsi_stm(+) gpu_sched dw_mipi_dsi stm32_rproc stm32_crc32 stm32_ipcc(+) optee(+) [ 4.224307] CPU: 1 UID: 0 PID: 24 Comm: kworker/u10:0 Not tainted 6.12.0 #442 [ 4.231481] Hardware name: STM32 (Device Tree Support) [ 4.236627] Workqueue: events_unbound deferred_probe_work_func [ 4.242504] Call trace: [ 4.242522] unwind_backtrace from show_stack+0x10/0x14 [ 4.250218] show_stack from dump_stack_lvl+0x50/0x64 [ 4.255274] dump_stack_lvl from __warn+0x80/0x12c [ 4.260134] __warn from warn_slowpath_fmt+0x114/0x188 [ 4.265199] warn_slowpath_fmt from ida_free+0x100/0x164 [ 4.270565] ida_free from rproc_type_release+0x38/0x60 [ 4.275832] rproc_type_release from device_release+0x30/0xa0 [ 4.281601] device_release from kobject_put+0xc4/0x294 [ 4.286762] kobject_put from rproc_alloc.part.0+0x208/0x28c [ 4.292430] rproc_alloc.part.0 from devm_rproc_alloc+0x80/0xc4 [ 4.298393] devm_rproc_alloc from stm32_rproc_probe+0xd0/0x844 [stm32_rproc] [ 4.305575] stm32_rproc_probe [stm32_rproc] from platform_probe+0x5c/0xbc Calling ida_alloc earlier in rproc_alloc ensures that the rproc->index is properly set. Fixes: 08333b911f01 ("remoteproc: Directly use ida_alloc()/free()") Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20241122175127.2188037-1-arnaud.pouliquen@foss.st.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> drivers/remoteproc/remoteproc_core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit c841f9909b0d947ae7593040cc59646dc9f14455 Author: Viken Dadhaniya <quic_vdadhani@quicinc.com> Date: Fri Nov 15 14:58:54 2024 +0530 dt-bindings: dma: qcom,gpi: Add QCS615 compatible Document compatible for GPI DMA controller on QCS615 platform. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Viken Dadhaniya <quic_vdadhani@quicinc.com> Link: https://lore.kernel.org/r/20241115092854.1877369-1-quic_vdadhani@quicinc.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 + 1 file changed, 1 insertion(+) commit 3bfb49d73fc281f06c0d976db898debebc8223e3 Author: Marco Elver <elver@google.com> Date: Fri Nov 29 09:59:34 2024 +0100 bpf: Refactor bpf_tracing_func_proto() and remove bpf_get_probe_write_proto() With bpf_get_probe_write_proto() no longer printing a message, we can avoid it being a special case with its own permission check. Refactor bpf_tracing_func_proto() similar to bpf_base_func_proto() to have a section conditional on bpf_token_capable(CAP_SYS_ADMIN), where the proto for bpf_probe_write_user() is returned. Finally, remove the unnecessary bpf_get_probe_write_proto(). This simplifies the code, and adding additional CAP_SYS_ADMIN-only helpers in future avoids duplicating the same CAP_SYS_ADMIN check. Suggested-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Marco Elver <elver@google.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/r/20241129090040.2690691-2-elver@google.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/trace/bpf_trace.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit b28573ebfabeca24757e121566bd143a68097030 Author: Marco Elver <elver@google.com> Date: Fri Nov 29 09:59:33 2024 +0100 bpf: Remove bpf_probe_write_user() warning message The warning message for bpf_probe_write_user() was introduced in 96ae52279594 ("bpf: Add bpf_probe_write_user BPF helper to be called in tracers"), with the following in the commit message: Given this feature is meant for experiments, and it has a risk of crashing the system, and running programs, we print a warning on when a proglet that attempts to use this helper is installed, along with the pid and process name. After 8 years since 96ae52279594, bpf_probe_write_user() has found successful applications beyond experiments [1, 2], with no other good alternatives. Despite its intended purpose for "experiments", that doesn't stop Hyrum's law, and there are likely many more users depending on this helper: "[..] it does not matter what you promise [..] all observable behaviors of your system will be depended on by somebody." The ominous "helper that may corrupt user memory!" has offered no real benefit, and has been found to lead to confusion where the system administrator is loading programs with valid use cases. As such, remove the warning message. Link: https://lore.kernel.org/lkml/20240404190146.1898103-1-elver@google.com/ [1] Link: https://lore.kernel.org/r/lkml/CAAn3qOUMD81-vxLLfep0H6rRd74ho2VaekdL4HjKq+Y1t9KdXQ@mail.gmail.com/ [2] Link: https://lore.kernel.org/all/CAEf4Bzb4D_=zuJrg3PawMOW3KqF8JvJm9SwF81_XHR2+u5hkUg@mail.gmail.com/ Signed-off-by: Marco Elver <elver@google.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/r/20241129090040.2690691-1-elver@google.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> kernel/trace/bpf_trace.c | 3 --- 1 file changed, 3 deletions(-) commit 9a17db586d722c0875f7a0580c438dc80afee1e7 Author: Ben Olson <matthew.olson@intel.com> Date: Tue Nov 26 14:08:45 2024 -0600 libbpf: Improve debug message when the base BTF cannot be found When running `bpftool` on a kernel module installed in `/lib/modules...`, this error is encountered if the user does not specify `--base-btf` to point to a valid base BTF (e.g. usually in `/sys/kernel/btf/vmlinux`). However, looking at the debug output to determine the cause of the error simply says `Invalid BTF string section`, which does not point to the actual source of the error. This just improves that debug message to tell users what happened. Signed-off-by: Ben Olson <matthew.olson@intel.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/Z0YqzQ5lNz7obQG7@bolson-desk Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/lib/bpf/btf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adf120e1bedd9f27339cd773c6b474cc788f68f5 Author: Zhu Jun <zhujun2@cmss.chinamobile.com> Date: Tue Nov 19 19:22:41 2024 -0800 samples/bpf: Remove unused variable The variable is never referenced in the code, just remove it that this problem was discovered by reading code Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241120032241.5657-1-zhujun2@cmss.chinamobile.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> samples/bpf/xdp2skb_meta_kern.c | 1 - 1 file changed, 1 deletion(-) commit 9aef3aaa7059c4dd0cc875107e05bb3198a7fc33 Author: Mahe Tardy <mahe.tardy@gmail.com> Date: Mon Nov 25 15:26:03 2024 +0000 selftests/bpf: add cgroup skb direct packet access test This verifies that programs of BPF_PROG_TYPE_CGROUP_SKB can access skb->data_end with direct packet access when being run with BPF_PROG_TEST_RUN. Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com> Link: https://lore.kernel.org/r/20241125152603.375898-2-mahe.tardy@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> .../prog_tests/cgroup_skb_direct_packet_access.c | 28 ++++++++++++++++++++++ .../bpf/progs/cgroup_skb_direct_packet_access.c | 15 ++++++++++++ 2 files changed, 43 insertions(+) commit ed3e469d021cba343a3b32f0876f8f28b1d9bfdd Author: Mahe Tardy <mahe.tardy@gmail.com> Date: Mon Nov 25 15:26:02 2024 +0000 bpf: fix cgroup_skb prog test run direct packet access This is needed in the context of Tetragon to test cgroup_skb programs using BPF_PROG_TEST_RUN with direct packet access. Commit b39b5f411dcf ("bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB") added direct packet access for cgroup_skb programs and following commit 2cb494a36c98 ("bpf: add tests for direct packet access from CGROUP_SKB") added tests to the verifier to ensure that access to skb fields was possible and also fixed bpf_prog_test_run_skb. However, is_direct_pkt_access was never set to true for this program type, so data pointers were not computed when using prog_test_run, making data_end always equal to zero (data_meta is not accessible for cgroup_skb). Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com> Link: https://lore.kernel.org/r/20241125152603.375898-1-mahe.tardy@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> net/bpf/test_run.c | 1 + 1 file changed, 1 insertion(+) commit 98ebe5ef6f5c4517ba92fb3e56f95827ebea83fd Author: Andrii Nakryiko <andrii@kernel.org> Date: Thu Nov 21 14:45:58 2024 -0800 libbpf: don't adjust USDT semaphore address if .stapsdt.base addr is missing USDT ELF note optionally can record an offset of .stapsdt.base, which is used to make adjustments to USDT target attach address. Currently, libbpf will do this address adjustment unconditionally if it finds .stapsdt.base ELF section in target binary. But there is a corner case where .stapsdt.base ELF section is present, but specific USDT note doesn't reference it. In such case, libbpf will basically just add base address and end up with absolutely incorrect USDT target address. This adjustment has to be done only if both .stapsdt.sema section is present and USDT note is recording a reference to it. Fixes: 74cc6311cec9 ("libbpf: Add USDT notes parsing and resolution logic") Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20241121224558.796110-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/lib/bpf/usdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3eb87b81e64e875eb6f970a02621145e4a2ff501 Merge: e70140ba0d2b 63b37657c5fd Author: Alexei Starovoitov <ast@kernel.org> Date: Mon Nov 25 14:00:05 2024 -0800 Merge branch 'selftests-bpf-migrate-test_flow_dissector-sh-to-test_progs' Alexis Lothoré says: ==================== This is the revision 3 of test_flow_dissector_migration.sh into test_progs. This revision addresses comments from Stanislas, especially about proper reuse of pseudo-header checksuming in new network helpers. There are 2 "main" parts in test_flow_dissector.sh: - a set of tests checking flow_dissector programs attachment to either root namespace or non-root namespace - dissection test The first set is integrated in flow_dissector.c, which already contains some existing tests for flow_dissector programs. This series uses the opportunity to update a bit this file (use new assert, re-split tests, etc) The second part is migrated into a new file under test_progs, flow_dissector_classification.c. It uses the same eBPF programs as flow_dissector.c, but the difference is rather about how those program are executed: - flow_dissector.c manually runs programs with BPF_PROG_RUN - flow_dissector_classification.c sends real packets to be dissected, and so it also executes kernel code related to eBPF flow dissector (eg: __skb_flow_bpf_to_target) --- Changes in v3: - Keep new helpers name in sync with kernel ones - Document some existing network helpers - Properly reuse pseudo-header csum helper in transport layer csum helper - Drop duplicate assert - Use const for test structure in the migrated test - Simplify shutdown callchain for basic test - collect Acked-by - Link to v2: https://lore.kernel.org/r/20241114-flow_dissector-v2-0-ee4a3be3de65@bootlin.com Changes in v2: - allow tests to run in parallel - move some generic helpers to network_helpers.h - define proper function for ASSERT_MEMEQ - fetch acked-by tags - Link to v1: https://lore.kernel.org/r/20241113-flow_dissector-v1-0-27c4df0592dc@bootlin.com ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org> commit 63b37657c5fdd0625f5825d5f90e7bec1dfafb64 Author: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Date: Wed Nov 20 08:43:24 2024 +0100 selftests/bpf: remove test_flow_dissector.sh Now that test_flow_dissector.sh has been converted to test_progs, remove the legacy test. Acked-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-14-45b46494f937@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/.gitignore | 1 - tools/testing/selftests/bpf/Makefile | 2 - tools/testing/selftests/bpf/test_flow_dissector.c | 780 --------------------- tools/testing/selftests/bpf/test_flow_dissector.sh | 178 ----- 4 files changed, 961 deletions(-) commit 20203a51e3940abb1639d41bbcfe995f6463bbd0 Author: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Date: Wed Nov 20 08:43:23 2024 +0100 selftests/bpf: migrate bpf flow dissectors tests to test_progs test_flow_dissector.sh loads flow_dissector program and subprograms, creates and configured relevant tunnels and interfaces, and ensure that the bpf dissection is actually performed correctly. Similar tests exist in test_progs (thanks to flow_dissector.c) and run the same programs, but those are only executed with BPF_PROG_RUN: those tests are then missing some coverage (eg: coverage for flow keys manipulated when the configured flower uses a port range, which has a dedicated test in test_flow_dissector.sh) Convert test_flow_dissector.sh into test_progs so that the corresponding tests are also run in CI. Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-13-45b46494f937@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> .../bpf/prog_tests/flow_dissector_classification.c | 792 +++++++++++++++++++++ 1 file changed, 792 insertions(+) commit bcc00987bc56faa3d0e20762ececefc831506846 Author: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Date: Wed Nov 20 08:43:22 2024 +0100 selftests/bpf: add network helpers to generate udp checksums network_helpers.c provides some helpers to generate ip checksums or ip pseudo-header checksums, but not for upper layers (eg: udp checksums) Add helpers for udp checksum to allow manually building udp packets. Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-12-45b46494f937@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/network_helpers.h | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit a2f482c34a52176ae89d143979bbc9e7a72857c8 Author: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Date: Wed Nov 20 08:43:21 2024 +0100 selftests/bpf: use the same udp and tcp headers in tests under test_progs Trying to add udp-dedicated helpers in network_helpers involves including some udp header, which makes multiple test_progs tests build fail: In file included from ./progs/test_cls_redirect.h:13, from [...]/prog_tests/cls_redirect.c:15: [...]/usr/include/linux/udp.h:23:8: error: redefinition of ‘struct udphdr’ 23 | struct udphdr { | ^~~~~~ In file included from ./network_helpers.h:17, from [...]/prog_tests/cls_redirect.c:13: [...]/usr/include/netinet/udp.h:55:8: note: originally defined here 55 | struct udphdr | ^~~~~~ This error is due to struct udphdr being defined in both <linux/udp.h> and <netinet/udp.h>. Use only <netinet/udp.h> in every test. While at it, perform the same for tcp.h. For some tests, the change needs to be done in the eBPF program part as well, because of some headers sharing between both sides. Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-11-45b46494f937@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/network_helpers.c | 2 +- tools/testing/selftests/bpf/prog_tests/sockopt_sk.c | 2 +- tools/testing/selftests/bpf/prog_tests/xdp_bonding.c | 2 +- tools/testing/selftests/bpf/prog_tests/xdp_do_redirect.c | 2 +- tools/testing/selftests/bpf/prog_tests/xdp_flowtable.c | 2 +- tools/testing/selftests/bpf/prog_tests/xdp_metadata.c | 2 +- tools/testing/selftests/bpf/progs/test_cls_redirect.c | 2 +- tools/testing/selftests/bpf/progs/test_cls_redirect.h | 2 +- tools/testing/selftests/bpf/progs/test_cls_redirect_dynptr.c | 2 +- tools/testing/selftests/bpf/xdp_hw_metadata.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) commit 752fddc0501c540214875b26bde2538f0a831811 Author: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Date: Wed Nov 20 08:43:20 2024 +0100 selftests/bpf: document pseudo-header checksum helpers network_helpers.h provides helpers to compute checksum for pseudo headers but no helpers to compute the global checksums. Before adding those, clarify csum_tcpudp_magic and csum_ipv6_magic purpose by adding some documentation. Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-10-45b46494f937@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/network_helpers.h | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit f4504af68575c1675235bacd8d36157cfc27ae5e Author: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Date: Wed Nov 20 08:43:19 2024 +0100 selftests/bpf: move ip checksum helper to network helpers xdp_metadata test has a small helper computing ipv4 checksums to allow manually building packets. Move this helper to network_helpers to share it with other tests. Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-9-45b46494f937@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/network_helpers.h | 24 ++++++++++++++++++++++ .../selftests/bpf/prog_tests/xdp_metadata.c | 19 +---------------- 2 files changed, 25 insertions(+), 18 deletions(-) commit c24010821a89954a93b39354c42596d315518c9b Author: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Date: Wed Nov 20 08:43:18 2024 +0100 selftests/bpf: Enable generic tc actions in selftests config Enable CONFIG_NET_ACT_GACT to allow adding simple actions with tc filters. This is for example needed to migrate test_flow_dissector into the automated testing performed in CI. Acked-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-8-45b46494f937@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/config | 1 + 1 file changed, 1 insertion(+) commit 6fb5be12d1bb66e8dce6238e4387f0db99efee25 Author: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Date: Wed Nov 20 08:43:17 2024 +0100 selftests/bpf: migrate flow_dissector namespace exclusivity test Commit a11c397c43d5 ("bpf/flow_dissector: add mode to enforce global BPF flow dissector") is currently tested in test_flow_dissector.sh, which is not part of test_progs. Add the corresponding test to flow_dissector.c, which is part of test_progs. The new test reproduces the behavior implemented in its shell script counterpart: - attach a flow dissector program to the root net namespace, ensure that we can not attach another flow dissector in any non-root net namespace - attach a flow dissector program to a non-root net namespace, ensure that we can not attach another flow dissector in root namespace Since the new test is performing operations in the root net namespace, make sure to set it as a "serial" test to make sure not to conflict with any other test. Acked-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-7-45b46494f937@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> .../selftests/bpf/prog_tests/flow_dissector.c | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit b4940402675004a7e2a14c83824d5c15e3e80f9e Author: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Date: Wed Nov 20 08:43:16 2024 +0100 selftests/bpf: add gre packets testing to flow_dissector The bpf_flow program is able to handle GRE headers in IP packets. Add a few test data input simulating those GRE packets, with 2 different cases: - parse GRE and the encapsulated packet - parse GRE only Acked-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-6-45b46494f937@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> .../selftests/bpf/prog_tests/flow_dissector.c | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit a2cc66bb937a68d22b5acf7d08f7c8cb5fa859be Author: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Date: Wed Nov 20 08:43:15 2024 +0100 selftests/bpf: expose all subtests from flow_dissector The flow_dissector test integrated in test_progs actually runs a wide matrix of tests over different packets types and bpf programs modes, but exposes only 3 main tests, preventing tests users from running specific subtests with a specific input only. Expose all subtests executed by flow_dissector by using test__start_subtest(). Acked-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-5-45b46494f937@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> .../selftests/bpf/prog_tests/flow_dissector.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 2b044dd186f0f378894f1e590d62325cbbf9b085 Author: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Date: Wed Nov 20 08:43:14 2024 +0100 selftests/bpf: re-split main function into dedicated tests The flow_dissector runs plenty of tests over diffent kind of packets, grouped into three categories: skb mode, non-skb mode with direct attach, and non-skb with indirect attach. Re-split the main function into dedicated tests. Each test now must have its own setup/teardown, but for the advantage of being able to run them separately. While at it, make sure that tests attaching the bpf programs are run in a dedicated ns. Acked-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-4-45b46494f937@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> .../selftests/bpf/prog_tests/flow_dissector.c | 108 ++++++++++++++------- 1 file changed, 73 insertions(+), 35 deletions(-) commit 28494d6a277ebe5b9a5b1313b1f1ee396b890e35 Author: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Date: Wed Nov 20 08:43:13 2024 +0100 selftests/bpf: replace CHECK calls with ASSERT macros in flow_dissector test The flow dissector test currently relies on generic CHECK macros to perform tests. Update those to newer, more-specific ASSERT macros. This update allows to get rid of the global duration variable, which was needed by the CHECK macros Acked-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-3-45b46494f937@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> .../selftests/bpf/prog_tests/flow_dissector.c | 41 +++++++++++----------- 1 file changed, 21 insertions(+), 20 deletions(-) commit 3fed5d084fb36365ccf06b6fe20d19e0e672a47d Author: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Date: Wed Nov 20 08:43:12 2024 +0100 selftests/bpf: use ASSERT_MEMEQ to compare bpf flow keys The flow_dissector program currently compares flow keys returned by bpf program with the expected one thanks to a custom macro using memcmp. Use the new ASSERT_MEMEQ macro to perform this comparision. This update also allows to get rid of the unused bpf_test_run_opts variable in run_tests_skb_less (it was only used by the CHECK macro for its duration field) Acked-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-2-45b46494f937@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> .../selftests/bpf/prog_tests/flow_dissector.c | 36 ++++------------------ 1 file changed, 6 insertions(+), 30 deletions(-) commit 2fe34a116c707821c99bb352cb33be277c99d491 Author: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Date: Wed Nov 20 08:43:11 2024 +0100 selftests/bpf: add a macro to compare raw memory We sometimes need to compare whole structures in an assert. It is possible to use the existing macros on each field, but when the whole structure has to be checked, it is more convenient to simply compare the whole structure memory Add a dedicated assert macro, ASSERT_MEMEQ, to allow bare memory comparision The output generated by this new macro looks like the following: [...] run_tests_skb_less:FAIL:returned flow keys unexpected memory mismatch actual: 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 expected: 0E 00 3E 00 DD 86 01 01 00 06 86 DD 50 00 90 1F 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 01 00 00 00 00 00 00 00 [...] Acked-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-1-45b46494f937@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> tools/testing/selftests/bpf/test_progs.c | 15 +++++++++++++++ tools/testing/selftests/bpf/test_progs.h | 15 +++++++++++++++ 2 files changed, 30 insertions(+) commit 8f109f287fdc7b8fc7dcb6b2190c8b17dc22fcda Merge: 542547278374 40384c840ea1 Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Mon Dec 2 11:22:11 2024 -0500 Merge drm/drm-next into drm-xe-next A backmerge to get the PMT preparation work for merging the BMG PMT support. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> commit 5daececd4ff533ab316ab360aba0bda1bf01961d Author: Borislav Petkov (AMD) <bp@alien8.de> Date: Sat Nov 30 13:26:44 2024 +0100 x86/boot/compressed: Remove unused header includes from kaslr.c Nothing is using the linux/ namespace headers anymore. Remove them. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20241130122644.GAZ0sEhD3Bm_9ZAIuc@fat_crate.local arch/x86/boot/compressed/kaslr.c | 4 ---- 1 file changed, 4 deletions(-) commit 0124b9bebd64fbe718a661841b74616bdfb4e25d Author: Qingqing Zhou <quic_qqzhou@quicinc.com> Date: Tue Nov 5 08:51:05 2024 +0530 dt-bindings: firmware: qcom,scm: document QCS615 SCM Add the compatible for Qualcomm QCS615 SCM. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Qingqing Zhou <quic_qqzhou@quicinc.com> Link: https://lore.kernel.org/r/20241105032107.9552-2-quic_qqzhou@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/firmware/qcom,scm.yaml | 1 + 1 file changed, 1 insertion(+) commit b07d8b37de7fde5c5abd158a137ee7b90e86f4e8 Author: Kyle Deng <quic_chunkaid@quicinc.com> Date: Fri Oct 18 15:34:16 2024 +0800 dt-bindings: soc: qcom,aoss-qmp: Document the qcs615 Document the Always-On Subsystem Qualcomm Message Protocol(AOSS_QMP) on the Qualcomm qcs615 platform. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Kyle Deng <quic_chunkaid@quicinc.com> Link: https://lore.kernel.org/r/20241018073417.2338864-3-quic_chunkaid@quicinc.com [bjorn: Fixed subject prefix] Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml | 1 + 1 file changed, 1 insertion(+) commit 6710232f1dcc47c6c5e49bb6a487821202579469 Author: Jani Nikula <jani.nikula@intel.com> Date: Fri Nov 29 12:25:03 2024 +0200 drm/i915/display: replace dig_port->saved_port_bits with flags dig_port->saved_port_bits is used to permanently store two DDI_BUF_CTL bits, DDI_BUF_PORT_REVERSAL and DDI_A_4_LANES. Store them separately as bools to make their use more logical and less about storing state as register bits. Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241129102503.452272-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_cx0_phy.c | 2 +- drivers/gpu/drm/i915/display/intel_ddi.c | 44 ++++++++++++---------- drivers/gpu/drm/i915/display/intel_display_types.h | 4 +- drivers/gpu/drm/i915/display/intel_tc.c | 2 +- 4 files changed, 29 insertions(+), 23 deletions(-) commit 0ebb1e9e1b12ddcb86105a14b59ccbed76b6ce00 Author: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Wed Nov 6 23:04:40 2024 +0100 pinctrl: samsung: update child reference drop comment Commit 954445c72fc7 ("pinctrl: samsung: Drop redundant node parameter in samsung_banks_of_node_get()") modified the name of the function used to release child nodes from samsung_drop_banks_of_node() to samsung_banks_node_put(). Update the comment to use the current function name. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20241106-samsung-pinctrl-put-v1-2-de854e26dd03@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/pinctrl/samsung/pinctrl-samsung.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 459915f55509f4bfd6076daa1428e28490ddee3b Author: Javier Carrasco <javier.carrasco.cruz@gmail.com> Date: Wed Nov 6 23:04:39 2024 +0100 pinctrl: samsung: fix fwnode refcount cleanup if platform_get_irq_optional() fails Commit 50ebd19e3585 ("pinctrl: samsung: drop pin banks references on error paths") fixed the pin bank references on the error paths of the probe function, but there is still an error path where this is not done. If samsung_pinctrl_get_soc_data() does not fail, the child references will have acquired, and they will need to be released in the error path of platform_get_irq_optional(), as it is done in the following error paths within the probe function. Replace the direct return in the error path with a goto instruction to the cleanup function. Cc: stable@vger.kernel.org Fixes: a382d568f144 ("pinctrl: samsung: Use platform_get_irq_optional() to get the interrupt") Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20241106-samsung-pinctrl-put-v1-1-de854e26dd03@gmail.com [krzysztof: change Fixes SHA to point to commit introducing the return leading to OF node leak] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/pinctrl/samsung/pinctrl-samsung.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f686a2b52e9d78cf401f1b7f446bf0c3a81ebcc0 Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Sun Nov 17 13:03:32 2024 +0100 pinctrl: samsung: Fix irq handling if an error occurs in exynos_irq_demux_eint16_31() chained_irq_enter(() should be paired with a corresponding chained_irq_exit(). Here, if clk_enable() fails, a early return occurs and chained_irq_exit() is not called. Add a new label and a goto for fix it. Fixes: f9c744747973 ("pinctrl: samsung: support a bus clock") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: André Draszik <andre.draszik@linaro.org> Link: https://lore.kernel.org/r/f148d823acfb3326a115bd49a0eed60f2345f909.1731844995.git.christophe.jaillet@wanadoo.fr Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> drivers/pinctrl/samsung/pinctrl-exynos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a308f9e47fc2377863f0f561ceedd45ccc7c7f9c Merge: b95cacd8d708 9b3cd5c7099f Author: Mark Brown <broonie@kernel.org> Date: Mon Dec 2 13:42:01 2024 +0000 regmap: Cleanup and microoptimization Merge series from Andy Shevchenko <andriy.shevchenko@linux.intel.com>: Two patches move the code to use BITS_TO_BYTES(), while the last one otpimizes the code generation on x86 (32- and 64-bit on different compilers). commit 2198deb823a6ebe110b737614421a4687d3327f4 Author: Mesih Kilinc <mesihkilinc@gmail.com> Date: Sat Nov 23 13:39:02 2024 +0100 ASoC: sun4i-codec: Add support for Allwinner suniv F1C100s Allwinner suniv F1C100s has similar but primitive audio codec comparared to sun4i. Add support for it. Signed-off-by: Mesih Kilinc <mesihkilinc@gmail.com> [ csokas.bence: Remove `non_legacy_dai_naming`, add `reg_dac_fifoc` ] Signed-off-by: Csókás Bence <csokas.bence@prolan.hu> Link: https://github.com/mricon/b4/issues/50 Link: https://patch.msgid.link/20241123123900.2656837-4-csokas.bence@prolan.hu Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sunxi/sun4i-codec.c | 353 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 353 insertions(+) commit bb2cc3014d74dfdab0b358b4539a9d2747598663 Author: Csókás Bence <csokas.bence@prolan.hu> Date: Sat Nov 23 13:39:00 2024 +0100 ASoC: dt-bindings: Add Allwinner suniv F1C100s Audio Codec Add compatible string for Allwinner suniv F1C100s audio codec. [ csokas.bence: Reimplement Mesih Kilinc's binding in YAML ] Signed-off-by: Csókás Bence <csokas.bence@prolan.hu> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20241123123900.2656837-3-csokas.bence@prolan.hu Link: https://github.com/mricon/b4/issues/50 Signed-off-by: Mark Brown <broonie@kernel.org> .../bindings/sound/allwinner,sun4i-a10-codec.yaml | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit cabd4ac290a6ceb87c8dbfb5a3251750e24529e7 Author: Mesih Kilinc <mesihkilinc@gmail.com> Date: Sat Nov 23 13:38:58 2024 +0100 ASoC: sun4i-codec: Add DMA Max Burst field Allwinner suniv F1C100s has similar DMA engine to sun4i but it has smaller max burst size compared to sun4i. Add a quirk field to differantitate between them. Signed-off-by: Mesih Kilinc <mesihkilinc@gmail.com> [ csokas.bence: Rebased on current master ] Signed-off-by: Csókás Bence <csokas.bence@prolan.hu> Link: https://patch.msgid.link/20241123123900.2656837-2-csokas.bence@prolan.hu Link: https://github.com/mricon/b4/issues/50 Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sunxi/sun4i-codec.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 7801f16792001bd7684f7991121c74e088c30146 Author: Martin Tůma <martin.tuma@digiteqautomotive.com> Date: Wed Nov 20 15:48:46 2024 +0100 media: mgb4: Defines cleanup Do not define stuff used in a single source file in a global header. Do not mix defines with "bare" values in the initialization. Signed-off-by: Martin Tůma <martin.tuma@digiteqautomotive.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/pci/mgb4/mgb4_core.c | 4 +++- drivers/media/pci/mgb4/mgb4_core.h | 3 --- drivers/media/pci/mgb4/mgb4_vout.c | 9 ++------- 3 files changed, 5 insertions(+), 11 deletions(-) commit 771c4770723c1961d118740eb6991e64a43ddcf0 Author: Martin Tůma <martin.tuma@digiteqautomotive.com> Date: Wed Nov 20 15:48:45 2024 +0100 media: mgb4: Unify register names in inputs/outputs Unify the names of HW hsync/vsync registers between the inputs and outputs. Signed-off-by: Martin Tůma <martin.tuma@digiteqautomotive.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/pci/mgb4/mgb4_sysfs_in.c | 12 ++++++------ drivers/media/pci/mgb4/mgb4_vin.c | 20 ++++++++++---------- drivers/media/pci/mgb4/mgb4_vin.h | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) commit 8f242f84669b992004bd561aff566740e900cf38 Author: Martin Tůma <martin.tuma@digiteqautomotive.com> Date: Wed Nov 20 15:48:44 2024 +0100 media: mgb4: Unify the outputs padding logic with the inputs Write the padding to the HW registers at the same place as the input logic does. Signed-off-by: Martin Tůma <martin.tuma@digiteqautomotive.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/pci/mgb4/mgb4_vout.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fddffe84b1af672da933ab236f8e7f25c8619dd1 Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Tue Nov 19 21:42:28 2024 +0100 media: s5p-mfc: Fix an error handling path s5p_mfc_open() A mfc_debug_enter() is not balanced by a corresponding mfc_debug_leave(). Add the missing call. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 5c546082840f8f91631623706f39bf5daa77d16c Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Sat Nov 16 15:16:31 2024 +0000 media: tuners: fc0013 Remove unused functions fc0013_rc_cal_add() and fc0013_rc_cal_reset() were added in 2012's commit e889adc91187 ("[media] fc001x: tuner driver for FC0013") but haven't been used. Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/tuners/fc0013.c | 64 ------------------------------------------- drivers/media/tuners/fc0013.h | 11 -------- 2 files changed, 75 deletions(-) commit bf00d30ce512dcf14c9b435e263e0af52f632448 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Sat Nov 16 01:28:28 2024 +0000 media: platform: exynos4-is: Remove unused fimc_is_param_strerr fimc_is_param_strerr() was added in 2013 by commit 9a761e436843 ("[media] exynos4-is: Add Exynos4x12 FIMC-IS driver") but has never been called. Remove it. (The other possibility might be to add a call maybe in fimc-is-param ?) Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../platform/samsung/exynos4-is/fimc-is-errno.c | 131 --------------------- .../platform/samsung/exynos4-is/fimc-is-errno.h | 1 - 2 files changed, 132 deletions(-) commit 48079b617270b10a08b18620238c01a0bac8dace Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Nov 14 02:06:36 2024 +0000 media: b2c2: Remove unused functions flexcop_dma_control_size_irq() last use was removed in 2005 by commit 64221be7b900 ("[PATCH] dvb: flexcop: woraround irq stop problem") flexcop_dump_reg() last use was removed in 2009 by commit 382c5546d618 ("V4L/DVB (10694): [PATCH] software IRQ watchdog for Flexcop B2C2 DVB PCI cards") Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/common/b2c2/flexcop-common.h | 4 ---- drivers/media/common/b2c2/flexcop-misc.c | 13 ------------- drivers/media/pci/b2c2/flexcop-dma.c | 17 ----------------- 3 files changed, 34 deletions(-) commit 44cfae26a2681e52e24c8f6d7f7d4340e5e0848e Author: Colin Ian King <colin.i.king@gmail.com> Date: Wed Nov 13 14:42:55 2024 +0000 media: cx231xx: remove redundant assignment to variable value The variable value is being assigned a value that is never read afterwards, the following if statement re-assigns it with a new value in both paths of the if statement. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/usb/cx231xx/cx231xx-avcore.c | 1 - 1 file changed, 1 deletion(-) commit 8d46603eeeb4c6abff1d2e49f2a6ae289dac765e Author: Arnd Bergmann <arnd@arndb.de> Date: Mon Nov 11 11:41:42 2024 +0100 media: cxd2841er: fix 64-bit division on gcc-9 It appears that do_div() once more gets confused by a complex expression that ends up not quite being constant despite __builtin_constant_p() thinking it is: ERROR: modpost: "__aeabi_uldivmod" [drivers/media/dvb-frontends/cxd2841er.ko] undefined! Use div_u64() instead, forcing the expression to be evaluated first, and making it a bit more readable. Cc: Dan Carpenter <dan.carpenter@linaro.org> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> Closes: https://lore.kernel.org/linux-media/CA+G9fYvvNm-aYodLaAwwTjEGtX0YxR-1R14FOA5aHKt0sSVsYg@mail.gmail.com/ Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> Closes: https://lore.kernel.org/linux-media/CA+G9fYvvNm-aYodLaAwwTjEGtX0YxR-1R14FOA5aHKt0sSVsYg@mail.gmail.com/ Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> [hverkuil: added Closes tags] drivers/media/dvb-frontends/cxd2841er.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 945215ee45e6548d1a2f4ed03e9bbb8c58e4e03f Author: Lukas Bulwahn <lukas.bulwahn@redhat.com> Date: Mon Oct 28 09:30:30 2024 +0100 media: remove dead TI wl128x FM radio driver Commit 78fe66360ed6 ("misc: ti-st: st_kim: remove the driver") deletes the ti-st driver and its corresponding config option TI_ST. With that deletion, the Texas Instruments WL128x FM Radio driver is now dead as well. Delete this obsolete driver. Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/radio/Kconfig | 4 - drivers/media/radio/Makefile | 1 - drivers/media/radio/wl128x/Kconfig | 15 - drivers/media/radio/wl128x/Makefile | 7 - drivers/media/radio/wl128x/fmdrv.h | 229 ---- drivers/media/radio/wl128x/fmdrv_common.c | 1676 ----------------------------- drivers/media/radio/wl128x/fmdrv_common.h | 389 ------- drivers/media/radio/wl128x/fmdrv_rx.c | 820 -------------- drivers/media/radio/wl128x/fmdrv_rx.h | 45 - drivers/media/radio/wl128x/fmdrv_tx.c | 413 ------- drivers/media/radio/wl128x/fmdrv_tx.h | 24 - drivers/media/radio/wl128x/fmdrv_v4l2.c | 604 ----------- drivers/media/radio/wl128x/fmdrv_v4l2.h | 20 - 13 files changed, 4247 deletions(-) commit 1378ffec30367233152b7dbf4fa6a25ee98585d1 Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Thu Oct 17 23:34:16 2024 +0300 media: imx-jpeg: Fix potential error pointer dereference in detach_pm() The proble is on the first line: if (jpeg->pd_dev[i] && !pm_runtime_suspended(jpeg->pd_dev[i])) If jpeg->pd_dev[i] is an error pointer, then passing it to pm_runtime_suspended() will lead to an Oops. The other conditions check for both error pointers and NULL, but it would be more clear to use the IS_ERR_OR_NULL() check for that. Fixes: fd0af4cd35da ("media: imx-jpeg: Ensure power suppliers be suspended before detach them") Cc: <stable@vger.kernel.org> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Ming Qian <ming.qian@nxp.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 27dcdb63aac76a637a5a18a4065b442cc182d883 Author: Mohammed Anees <pvmohammedanees2003@gmail.com> Date: Fri Oct 18 01:46:12 2024 +0530 media: platform: mtk-mdp3: cmdq: Remove duplicated platforms checks The platform compatibility checks for MT8183 and MT8195 in mdp_cmdq_prepare() are redundant as they are done in __get_config_offset() itself. Furthermore there are two if-else branch in __get_config_offset() which have similar conditions and are redundant. To address this, remove the check in mdp_cmdq_prepare() and combine the two if-else branch into one in __get_config_offset(). Signed-off-by: Mohammed Anees <pvmohammedanees2003@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> .../media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit 226570680bbde0a698f2985db20d9faf4f23cc6e Author: Chris Brandt <chris.brandt@renesas.com> Date: Wed Nov 20 10:03:28 2024 -0500 drm: renesas: rz-du: Increase supported resolutions The supported resolutions were misrepresented in earlier versions of hardware manuals. Fixes: 768e9e61b3b9 ("drm: renesas: Add RZ/G2L DU Support") Cc: stable@vger.kernel.org Signed-off-by: Chris Brandt <chris.brandt@renesas.com> Tested-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241120150328.4131525-1-chris.brandt@renesas.com drivers/gpu/drm/renesas/rz-du/rzg2l_du_kms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3aba2eba84e0219fb66061359052be81bd883d53 Merge: 44cff6c5b0b1 40384c840ea1 Author: Maxime Ripard <mripard@kernel.org> Date: Mon Dec 2 12:44:18 2024 +0100 Merge drm/drm-next into drm-misc-next Kickstart 6.14 cycle. Signed-off-by: Maxime Ripard <mripard@kernel.org> commit c3cb6c158c64dc39838208d51dcd06d1990b371d Author: Ard Biesheuvel <ardb@kernel.org> Date: Fri Oct 11 19:08:50 2024 +0200 objtool: Allow arch code to discover jump table size In preparation for adding support for annotated jump tables, where ELF relocations and symbols are used to describe the locations of jump tables in the executable, refactor the jump table discovery logic so the table size can be returned from arch_find_switch_table(). Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20241011170847.334429-12-ardb+git@google.com tools/objtool/arch/loongarch/special.c | 3 ++- tools/objtool/arch/powerpc/special.c | 3 ++- tools/objtool/arch/x86/special.c | 4 +++- tools/objtool/check.c | 31 ++++++++++++++++++++----------- tools/objtool/include/objtool/check.h | 5 ++++- tools/objtool/include/objtool/special.h | 3 ++- 6 files changed, 33 insertions(+), 16 deletions(-) commit c907cd44a108eff7005a2b5689bb91f50637df8b Author: Waiman Long <longman@redhat.com> Date: Wed Oct 30 13:52:53 2024 -0400 sched: Unify HK_TYPE_{TIMER|TICK|MISC} to HK_TYPE_KERNEL_NOISE As all the non-domain and non-managed_irq housekeeping types have been unified to HK_TYPE_KERNEL_NOISE, replace all these references in the scheduler to use HK_TYPE_KERNEL_NOISE. Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/r/20241030175253.125248-5-longman@redhat.com kernel/sched/core.c | 12 ++++++------ kernel/sched/fair.c | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) commit 6010d245ddc9f463bbf0311ac49073a78f444755 Author: Waiman Long <longman@redhat.com> Date: Wed Oct 30 13:52:52 2024 -0400 sched/isolation: Consolidate housekeeping cpumasks that are always identical The housekeeping cpumasks are only set by two boot commandline parameters: "nohz_full" and "isolcpus". When there is more than one of "nohz_full" or "isolcpus", the extra ones must have the same CPU list or the setup will fail partially. The HK_TYPE_DOMAIN and HK_TYPE_MANAGED_IRQ types are settable by "isolcpus" only and their settings can be independent of the other types. The other housekeeping types are all set by "nohz_full" or "isolcpus=nohz" without a way to set them individually. So they all have identical cpumasks. There is actually no point in having different cpumasks for these "nohz_full" only housekeeping types. Consolidate these types to use the same cpumask by aliasing them to the same value. If there is a need to set any of them independently in the future, we can break them out to their own cpumasks again. With this change, the number of cpumasks in the housekeeping structure drops from 9 to 3. Other than that, there should be no other functional change. Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/r/20241030175253.125248-4-longman@redhat.com include/linux/sched/isolation.h | 20 +++++++++++++------- kernel/sched/isolation.c | 19 ++++++------------- 2 files changed, 19 insertions(+), 20 deletions(-) commit 1174b9344bc7e7989439cad207fcd94eaab028db Author: Waiman Long <longman@redhat.com> Date: Wed Oct 30 13:52:51 2024 -0400 sched/isolation: Make "isolcpus=nohz" equivalent to "nohz_full" The "isolcpus=nohz" boot parameter and flag were used to disable tick when running a single task. Nowsdays, this "nohz" flag is seldomly used as it is included as part of the "nohz_full" parameter. Extend this flag to cover other kernel noises disabled by the "nohz_full" parameter to make them equivalent. This also eliminates the need to use both the "isolcpus" and the "nohz_full" parameters to fully isolated a given set of CPUs. Suggested-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/r/20241030175253.125248-3-longman@redhat.com Documentation/admin-guide/kernel-parameters.txt | 4 +++- kernel/sched/isolation.c | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit ae5c677729e99b8cb3e6252aaa9b72a92985d203 Author: Waiman Long <longman@redhat.com> Date: Wed Oct 30 13:52:50 2024 -0400 sched/core: Remove HK_TYPE_SCHED The HK_TYPE_SCHED housekeeping type is defined but not set anywhere. So any code that try to use HK_TYPE_SCHED are essentially dead code. So remove HK_TYPE_SCHED and any code that use it. Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/r/20241030175253.125248-2-longman@redhat.com include/linux/sched/isolation.h | 1 - kernel/sched/fair.c | 14 -------------- kernel/sched/isolation.c | 1 - 3 files changed, 16 deletions(-) commit d387ceb17149fed4d85a1ec01b3d65ae0204060d Author: Waiman Long <longman@redhat.com> Date: Wed Nov 27 21:00:09 2024 -0500 locking/lockdep: Enforce PROVE_RAW_LOCK_NESTING only if ARCH_SUPPORTS_RT Relax the rule to set PROVE_RAW_LOCK_NESTING by default only for arches that supports PREEMPT_RT. For arches that do not support PREEMPT_RT, they will not be forced to address unimportant raw lock nesting issues when they want to enable PROVE_LOCKING. They do have the option to enable it to look for these raw locking nesting problems if they choose to. Suggested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20241128020009.83347-1-longman@redhat.com lib/Kconfig.debug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e7e0eb53c2f0f68fe2577472ce2802a4efd9d7ce Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:39:07 2024 +0100 objtool: Warn about unknown annotation types Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094312.611961175@infradead.org tools/objtool/check.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 87116ae6da034242baf06e799f9f0e2a8ee6a796 Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:39:06 2024 +0100 objtool: Fix ANNOTATE_REACHABLE to be a normal annotation Currently REACHABLE is weird for being on the instruction after the instruction it modifies. Since all REACHABLE annotations have an explicit instruction, flip them around. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094312.494176035@infradead.org arch/loongarch/include/asm/bug.h | 2 +- arch/x86/entry/entry_64.S | 5 ++--- arch/x86/include/asm/bug.h | 2 +- arch/x86/include/asm/irq_stack.h | 4 ++-- include/linux/objtool.h | 4 ++-- tools/objtool/check.c | 23 ----------------------- 6 files changed, 8 insertions(+), 32 deletions(-) commit e7a174fb43d24adca066e82d1cb9fdee092d48d1 Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:39:05 2024 +0100 objtool: Convert {.UN}REACHABLE to ANNOTATE Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094312.353431347@infradead.org arch/loongarch/include/asm/bug.h | 2 +- arch/x86/entry/entry_64.S | 4 +- arch/x86/include/asm/bug.h | 2 +- arch/x86/include/asm/irq_stack.h | 2 +- include/linux/objtool.h | 18 ++++---- include/linux/objtool_types.h | 1 + tools/include/linux/objtool_types.h | 1 + tools/objtool/check.c | 82 ++++++++++--------------------------- 8 files changed, 36 insertions(+), 76 deletions(-) commit 06e24745985c8dd0da18337503afcf2f2fdbdff1 Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:39:04 2024 +0100 objtool: Remove annotate_{,un}reachable() There are no users of annotate_reachable() left. And the annotate_unreachable() usage in unreachable() is plain wrong; it will hide dangerous fall-through code-gen. Remove both. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094312.235637588@infradead.org include/linux/compiler.h | 27 --------------------------- tools/objtool/check.c | 43 ++----------------------------------------- 2 files changed, 2 insertions(+), 68 deletions(-) commit 624bde3465f660e54a7cd4c1efc3e536349fead5 Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:39:03 2024 +0100 loongarch: Use ASM_REACHABLE annotate_reachable() is unreliable since the compiler is free to place random code inbetween two consecutive asm() statements. This removes the last and only annotate_reachable() user. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094312.133437051@infradead.org arch/loongarch/include/asm/bug.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 2190966fbc14ca2cd4ea76eefeb96a47d8e390df Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:39:02 2024 +0100 x86: Convert unreachable() to BUG() Avoid unreachable() as it can (and will in the absence of UBSAN) generate fallthrough code. Use BUG() so we get a UD2 trap (with unreachable annotation). Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094312.028316261@infradead.org arch/x86/kernel/process.c | 2 +- arch/x86/kernel/reboot.c | 2 +- arch/x86/kvm/svm/sev.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit c837de3810982cd41cd70e5170da1931439f025c Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:39:01 2024 +0100 unreachable: Unify Since barrier_before_unreachable() is empty for !GCC it is trivial to unify the two definitions. Less is more. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094311.924381359@infradead.org include/linux/compiler-gcc.h | 12 ------------ include/linux/compiler.h | 10 +++++++--- 2 files changed, 7 insertions(+), 15 deletions(-) commit bb8170067470cc7af28e4386e600b1e0a6a8956a Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:39:00 2024 +0100 objtool: Collect more annotations in objtool.h Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094311.786598147@infradead.org arch/x86/include/asm/alternative.h | 12 ------ arch/x86/include/asm/nospec-branch.h | 9 ---- include/linux/instrumentation.h | 4 +- include/linux/objtool.h | 80 ++++++++++++++++++++++++------------ 4 files changed, 55 insertions(+), 50 deletions(-) commit a8a330dd9900024dc18b048c4f0f3c6ad22ff4c1 Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:38:59 2024 +0100 objtool: Collapse annotate sequences Reduce read_annotate() runs by collapsing subsequent runs into a single call. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094311.688871544@infradead.org tools/objtool/check.c | 87 +++++++++++++++++++-------------------------------- 1 file changed, 32 insertions(+), 55 deletions(-) commit 112765ca1cb9353e71b4f5af4e6e6c4a69c28d99 Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:38:58 2024 +0100 objtool: Convert ANNOTATE_INTRA_FUNCTION_CALL to ANNOTATE Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094311.584892071@infradead.org include/linux/objtool.h | 16 +++---- include/linux/objtool_types.h | 1 + tools/include/linux/objtool_types.h | 1 + tools/objtool/check.c | 96 +++++++++++++++---------------------- 4 files changed, 47 insertions(+), 67 deletions(-) commit f0cd57c35a75f152d3b31b9be3f7f413b96a6d3f Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:38:57 2024 +0100 objtool: Convert ANNOTATE_IGNORE_ALTERNATIVE to ANNOTATE Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094311.465691316@infradead.org arch/x86/include/asm/alternative.h | 14 +++--------- include/linux/objtool_types.h | 1 + tools/include/linux/objtool_types.h | 1 + tools/objtool/check.c | 45 +++++++++---------------------------- 4 files changed, 15 insertions(+), 46 deletions(-) commit 18aa6118a1689b4d73c5ebbd917ae3f20c9c0db1 Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:38:56 2024 +0100 objtool: Convert VALIDATE_UNRET_BEGIN to ANNOTATE Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094311.358508242@infradead.org include/linux/objtool.h | 9 +++------ include/linux/objtool_types.h | 1 + tools/include/linux/objtool_types.h | 1 + tools/objtool/check.c | 28 +++++----------------------- 4 files changed, 10 insertions(+), 29 deletions(-) commit 317f2a64618c528539d17fe6957a64106087fbd2 Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:38:55 2024 +0100 objtool: Convert instrumentation_{begin,end}() to ANNOTATE Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094311.245980207@infradead.org include/linux/instrumentation.h | 11 ++++----- include/linux/objtool.h | 12 ++++++--- include/linux/objtool_types.h | 2 ++ tools/include/linux/objtool_types.h | 2 ++ tools/objtool/check.c | 49 ++++++++----------------------------- 5 files changed, 28 insertions(+), 48 deletions(-) commit bf5febebd99fddfc6226a94e937d38a8d470b24e Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:38:54 2024 +0100 objtool: Convert ANNOTATE_RETPOLINE_SAFE to ANNOTATE Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094311.145275669@infradead.org arch/x86/include/asm/nospec-branch.h | 13 ++------- include/linux/objtool_types.h | 1 + tools/include/linux/objtool_types.h | 1 + tools/objtool/check.c | 52 +++++++++++++----------------------- 4 files changed, 22 insertions(+), 45 deletions(-) commit 22c3d58079688b697f36d670616e463cbb14d058 Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:38:53 2024 +0100 objtool: Convert ANNOTATE_NOENDBR to ANNOTATE Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094311.042140333@infradead.org include/linux/objtool.h | 17 ++++------------- include/linux/objtool_types.h | 5 +++++ tools/include/linux/objtool_types.h | 5 +++++ tools/objtool/check.c | 32 +++++--------------------------- 4 files changed, 19 insertions(+), 40 deletions(-) commit 2116b349e29a2e9ba17ea2e45b31234e4b350793 Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 28 10:38:52 2024 +0100 objtool: Generic annotation infrastructure Avoid endless .discard.foo sections for each annotation, create a single .discard.annotate_insn section that takes an annotation type along with the instruction. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094310.932794537@infradead.org include/linux/objtool.h | 18 ++++++++++++++++++ tools/objtool/check.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) commit e0925f2dc4de2d8ba987392d3239e8edf88f8b96 Author: Andrii Nakryiko <andrii@kernel.org> Date: Thu Nov 21 19:59:22 2024 -0800 uprobes: add speculative lockless VMA-to-inode-to-uprobe resolution Given filp_cachep is marked SLAB_TYPESAFE_BY_RCU (and FMODE_BACKING files, a special case, now goes through RCU-delated freeing), we can safely access vma->vm_file->f_inode field locklessly under just rcu_read_lock() protection, which enables looking up uprobe from uprobes_tree completely locklessly and speculatively without the need to acquire mmap_lock for reads. In most cases, anyway, assuming that there are no parallel mm and/or VMA modifications. The underlying struct file's memory won't go away from under us (even if struct file can be reused in the meantime). We rely on newly added mmap_lock_speculate_{try_begin,retry}() helpers to validate that mm_struct stays intact for entire duration of this speculation. If not, we fall back to mmap_lock-protected lookup. The speculative logic is written in such a way that it will safely handle any garbage values that might be read from vma or file structs. Benchmarking results speak for themselves. BEFORE (latest tip/perf/core) ============================= uprobe-nop ( 1 cpus): 3.384 ± 0.004M/s ( 3.384M/s/cpu) uprobe-nop ( 2 cpus): 5.456 ± 0.005M/s ( 2.728M/s/cpu) uprobe-nop ( 3 cpus): 7.863 ± 0.015M/s ( 2.621M/s/cpu) uprobe-nop ( 4 cpus): 9.442 ± 0.008M/s ( 2.360M/s/cpu) uprobe-nop ( 5 cpus): 11.036 ± 0.013M/s ( 2.207M/s/cpu) uprobe-nop ( 6 cpus): 10.884 ± 0.019M/s ( 1.814M/s/cpu) uprobe-nop ( 7 cpus): 7.897 ± 0.145M/s ( 1.128M/s/cpu) uprobe-nop ( 8 cpus): 10.021 ± 0.128M/s ( 1.253M/s/cpu) uprobe-nop (10 cpus): 9.932 ± 0.170M/s ( 0.993M/s/cpu) uprobe-nop (12 cpus): 8.369 ± 0.056M/s ( 0.697M/s/cpu) uprobe-nop (14 cpus): 8.678 ± 0.017M/s ( 0.620M/s/cpu) uprobe-nop (16 cpus): 7.392 ± 0.003M/s ( 0.462M/s/cpu) uprobe-nop (24 cpus): 5.326 ± 0.178M/s ( 0.222M/s/cpu) uprobe-nop (32 cpus): 5.426 ± 0.059M/s ( 0.170M/s/cpu) uprobe-nop (40 cpus): 5.262 ± 0.070M/s ( 0.132M/s/cpu) uprobe-nop (48 cpus): 6.121 ± 0.010M/s ( 0.128M/s/cpu) uprobe-nop (56 cpus): 6.252 ± 0.035M/s ( 0.112M/s/cpu) uprobe-nop (64 cpus): 7.644 ± 0.023M/s ( 0.119M/s/cpu) uprobe-nop (72 cpus): 7.781 ± 0.001M/s ( 0.108M/s/cpu) uprobe-nop (80 cpus): 8.992 ± 0.048M/s ( 0.112M/s/cpu) AFTER ===== uprobe-nop ( 1 cpus): 3.534 ± 0.033M/s ( 3.534M/s/cpu) uprobe-nop ( 2 cpus): 6.701 ± 0.007M/s ( 3.351M/s/cpu) uprobe-nop ( 3 cpus): 10.031 ± 0.007M/s ( 3.344M/s/cpu) uprobe-nop ( 4 cpus): 13.003 ± 0.012M/s ( 3.251M/s/cpu) uprobe-nop ( 5 cpus): 16.274 ± 0.006M/s ( 3.255M/s/cpu) uprobe-nop ( 6 cpus): 19.563 ± 0.024M/s ( 3.261M/s/cpu) uprobe-nop ( 7 cpus): 22.696 ± 0.054M/s ( 3.242M/s/cpu) uprobe-nop ( 8 cpus): 24.534 ± 0.010M/s ( 3.067M/s/cpu) uprobe-nop (10 cpus): 30.475 ± 0.117M/s ( 3.047M/s/cpu) uprobe-nop (12 cpus): 33.371 ± 0.017M/s ( 2.781M/s/cpu) uprobe-nop (14 cpus): 38.864 ± 0.004M/s ( 2.776M/s/cpu) uprobe-nop (16 cpus): 41.476 ± 0.020M/s ( 2.592M/s/cpu) uprobe-nop (24 cpus): 64.696 ± 0.021M/s ( 2.696M/s/cpu) uprobe-nop (32 cpus): 85.054 ± 0.027M/s ( 2.658M/s/cpu) uprobe-nop (40 cpus): 101.979 ± 0.032M/s ( 2.549M/s/cpu) uprobe-nop (48 cpus): 110.518 ± 0.056M/s ( 2.302M/s/cpu) uprobe-nop (56 cpus): 117.737 ± 0.020M/s ( 2.102M/s/cpu) uprobe-nop (64 cpus): 124.613 ± 0.079M/s ( 1.947M/s/cpu) uprobe-nop (72 cpus): 133.239 ± 0.032M/s ( 1.851M/s/cpu) uprobe-nop (80 cpus): 142.037 ± 0.138M/s ( 1.775M/s/cpu) Previously total throughput was maxing out at 11mln/s, and gradually declining past 8 cores. With this change, it now keeps growing with each added CPU, reaching 142mln/s at 80 CPUs (this was measured on a 80-core Intel(R) Xeon(R) Gold 6138 CPU @ 2.00GHz). Suggested-by: Matthew Wilcox <willy@infradead.org> Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Link: https://lkml.kernel.org/r/20241122035922.3321100-3-andrii@kernel.org kernel/events/uprobes.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 83e3dc9a5d4d7402adb24090a77327245d593129 Author: Andrii Nakryiko <andrii@kernel.org> Date: Thu Nov 21 19:59:21 2024 -0800 uprobes: simplify find_active_uprobe_rcu() VMA checks At the point where find_active_uprobe_rcu() is used we know that VMA in question has triggered software breakpoint, so we don't need to validate vma->vm_flags. Keep only vma->vm_file NULL check. Suggested-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Acked-by: Oleg Nesterov <oleg@redhat.com> Link: https://lkml.kernel.org/r/20241122035922.3321100-2-andrii@kernel.org kernel/events/uprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03a001b156d2da186a5618de242750d06bf81e2d Author: Suren Baghdasaryan <surenb@google.com> Date: Fri Nov 22 09:44:16 2024 -0800 mm: introduce mmap_lock_speculate_{try_begin|retry} Add helper functions to speculatively perform operations without read-locking mmap_lock, expecting that mmap_lock will not be write-locked and mm is not modified from under us. Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com> Link: https://lkml.kernel.org/r/20241122174416.1367052-3-surenb@google.com include/linux/mmap_lock.h | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) commit eb449bd96954b1c1e491d19066cfd2a010f0aa47 Author: Suren Baghdasaryan <surenb@google.com> Date: Fri Nov 22 09:44:15 2024 -0800 mm: convert mm_lock_seq to a proper seqcount Convert mm_lock_seq to be seqcount_t and change all mmap_write_lock variants to increment it, in-line with the usual seqcount usage pattern. This lets us check whether the mmap_lock is write-locked by checking mm_lock_seq.sequence counter (odd=locked, even=unlocked). This will be used when implementing mmap_lock speculation functions. As a result vm_lock_seq is also change to be unsigned to match the type of mm_lock_seq.sequence. Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com> Link: https://lkml.kernel.org/r/20241122174416.1367052-2-surenb@google.com include/linux/mm.h | 12 ++++----- include/linux/mm_types.h | 7 +++-- include/linux/mmap_lock.h | 55 ++++++++++++++++++++++++++-------------- kernel/fork.c | 5 +--- mm/init-mm.c | 2 +- tools/testing/vma/vma.c | 4 +-- tools/testing/vma/vma_internal.h | 4 +-- 7 files changed, 53 insertions(+), 36 deletions(-) commit 7528585290a1a1d4e0fb4b72261eb2d8c85de2d7 Author: Peter Zijlstra <peterz@infradead.org> Date: Fri Nov 22 12:47:48 2024 +0100 mm/gup: Use raw_seqcount_try_begin() David pointed out that gup_fast() does exactly what the new raw_seqcount_try_begin() does -- use it. Suggested-by: David Hildenbrand <david@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: David Hildenbrand <david@redhat.com> mm/gup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 96450ead16527cbef559b5bd046182e731228f95 Author: Suren Baghdasaryan <surenb@google.com> Date: Fri Nov 22 09:44:14 2024 -0800 seqlock: add raw_seqcount_try_begin Add raw_seqcount_try_begin() to opens a read critical section of the given seqcount_t if the counter is even. This enables eliding the critical section entirely if the counter is odd, instead of doing the speculation knowing it will fail. Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com> Link: https://lkml.kernel.org/r/20241122174416.1367052-1-surenb@google.com include/linux/seqlock.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit b4943b8bfc41ddd3796f3b87e1efa71a0c689f22 Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Date: Fri Nov 15 06:08:06 2024 +0000 perf/x86/rapl: Add core energy counter support for AMD CPUs Add a new "power_core" PMU and "energy-core" event for monitoring energy consumption by each individual core. The existing energy-cores event aggregates the energy consumption of CPU cores at the package level. This new event aligns with the AMD's per-core energy counters. Tested the package level and core level PMU counters with workloads pinned to different CPUs. Results with workload pinned to CPU 4 in core 4 on an AMD Zen4 Genoa machine: $ sudo perf stat --per-core -e power_core/energy-core/ -- taskset -c 4 stress-ng --matrix 1 --timeout 5s stress-ng: info: [21250] setting to a 5 second run per stressor stress-ng: info: [21250] dispatching hogs: 1 matrix stress-ng: info: [21250] successful run completed in 5.00s Performance counter stats for 'system wide': S0-D0-C0 1 0.00 Joules power_core/energy-core/ S0-D0-C1 1 0.00 Joules power_core/energy-core/ S0-D0-C2 1 0.00 Joules power_core/energy-core/ S0-D0-C3 1 0.00 Joules power_core/energy-core/ S0-D0-C4 1 8.43 Joules power_core/energy-core/ S0-D0-C5 1 0.00 Joules power_core/energy-core/ S0-D0-C6 1 0.00 Joules power_core/energy-core/ S0-D0-C7 1 0.00 Joules power_core/energy-core/ S0-D1-C8 1 0.00 Joules power_core/energy-core/ S0-D1-C9 1 0.00 Joules power_core/energy-core/ S0-D1-C10 1 0.00 Joules power_core/energy-core/ Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: "Gautham R. Shenoy" <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241115060805.447565-11-Dhananjay.Ugwekar@amd.com arch/x86/events/rapl.c | 183 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 151 insertions(+), 32 deletions(-) commit 54d2759778c1ebd66ee42fac93acf0c2cbf4217c Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Date: Fri Nov 15 06:08:05 2024 +0000 perf/x86/rapl: Move the cntr_mask to rapl_pmus struct Prepare for the addition of RAPL core energy counter support. Move cntr_mask to rapl_pmus struct instead of adding a new global cntr_mask for the new RAPL power_core PMU. This will also ensure that the second "core_cntr_mask" is only created if needed (i.e. in case of AMD CPUs). Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: "Gautham R. Shenoy" <gautham.shenoy@amd.com> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Zhang Rui <rui.zhang@intel.com> Link: https://lore.kernel.org/r/20241115060805.447565-10-Dhananjay.Ugwekar@amd.com arch/x86/events/rapl.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit bdc57ec7054842e5cb3b0a2da87b0e73075a96e6 Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Date: Fri Nov 15 06:08:04 2024 +0000 perf/x86/rapl: Remove the global variable rapl_msrs Prepare for the addition of RAPL core energy counter support. After making the rapl_model struct global, the rapl_msrs global variable isn't needed, so remove it. Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: "Gautham R. Shenoy" <gautham.shenoy@amd.com> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Zhang Rui <rui.zhang@intel.com> Link: https://lore.kernel.org/r/20241115060805.447565-9-Dhananjay.Ugwekar@amd.com arch/x86/events/rapl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit abf03d9bd20cf55ebdc4c7f0955d21759aeb0523 Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Date: Fri Nov 15 06:08:03 2024 +0000 perf/x86/rapl: Modify the generic variable names to *_pkg* Prepare for the addition of RAPL core energy counter support. Replace the generic names with *_pkg*, to later on differentiate between the scopes of the two different PMUs and their variables. No functional change. Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: "Gautham R. Shenoy" <gautham.shenoy@amd.com> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Zhang Rui <rui.zhang@intel.com> Link: https://lore.kernel.org/r/20241115060805.447565-8-Dhananjay.Ugwekar@amd.com arch/x86/events/rapl.c | 120 ++++++++++++++++++++++++------------------------- 1 file changed, 60 insertions(+), 60 deletions(-) commit eeca4c6b2529ff41a10519952bf988c0f3605353 Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Date: Fri Nov 15 06:08:02 2024 +0000 perf/x86/rapl: Add arguments to the init and cleanup functions Prepare for the addition of RAPL core energy counter support. Add arguments to the init and cleanup functions, which will help in initialization and cleaning up of two separate PMUs. No functional change. Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: "Gautham R. Shenoy" <gautham.shenoy@amd.com> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Zhang Rui <rui.zhang@intel.com> Link: https://lore.kernel.org/r/20241115060805.447565-7-Dhananjay.Ugwekar@amd.com arch/x86/events/rapl.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit cd29d83a6d815bf8472c9aa3cdd1dcb89cc4c419 Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Date: Fri Nov 15 06:08:01 2024 +0000 perf/x86/rapl: Make rapl_model struct global Prepare for the addition of RAPL core energy counter support. As there will always be just one rapl_model variable on a system, make it global, to make it easier to access it from any function. No functional change. Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Reviewed-by: "Gautham R. Shenoy" <gautham.shenoy@amd.com> Tested-by: Zhang Rui <rui.zhang@intel.com> Link: https://lore.kernel.org/r/20241115060805.447565-6-Dhananjay.Ugwekar@amd.com arch/x86/events/rapl.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 8bf1c86e5ac828d7e8b44fe007bf3b14ac7f2b2d Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Date: Fri Nov 15 06:08:00 2024 +0000 perf/x86/rapl: Rename rapl_pmu variables Rename struct rapl_pmu variables from "pmu" to "rapl_pmu", to avoid any confusion between the variables of two different structs pmu and rapl_pmu. As rapl_pmu also contains a pointer to struct pmu, which leads to situations in code like pmu->pmu, which is needlessly confusing. Above scenario is replaced with much more readable rapl_pmu->pmu with this change. Also rename "pmus" member in rapl_pmus struct, for same reason. No functional change. Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: "Gautham R. Shenoy" <gautham.shenoy@amd.com> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Zhang Rui <rui.zhang@intel.com> Link: https://lore.kernel.org/r/20241115060805.447565-5-Dhananjay.Ugwekar@amd.com arch/x86/events/rapl.c | 91 +++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 45 deletions(-) commit 1d5e2f637a94a8ca8c8a1e292dd98ee80aa92815 Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Date: Fri Nov 15 06:07:59 2024 +0000 perf/x86/rapl: Remove the cpu_to_rapl_pmu() function Prepare for the addition of RAPL core energy counter support. Post which, one CPU might be mapped to more than one rapl_pmu (package/die one and a core one). So, remove the cpu_to_rapl_pmu() function. Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Zhang Rui <rui.zhang@intel.com> Link: https://lore.kernel.org/r/20241115060805.447565-4-Dhananjay.Ugwekar@amd.com arch/x86/events/rapl.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit e4b444347795a1ecc083895582bc2e7f288a22e4 Author: K Prateek Nayak <kprateek.nayak@amd.com> Date: Fri Nov 15 06:07:58 2024 +0000 x86/topology: Introduce topology_logical_core_id() On x86, topology_core_id() returns a unique core ID within the PKG domain. Looking at match_smt() suggests that a core ID just needs to be unique within a LLC domain. For use cases such as the core RAPL PMU, there exists a need for a unique core ID across the entire system with multiple PKG domains. Introduce topology_logical_core_id() to derive a unique core ID across the system. Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com> Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Reviewed-by: "Gautham R. Shenoy" <gautham.shenoy@amd.com> Tested-by: K Prateek Nayak <kprateek.nayak@amd.com> Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> Link: https://lore.kernel.org/r/20241115060805.447565-3-Dhananjay.Ugwekar@amd.com Documentation/arch/x86/topology.rst | 4 ++++ arch/x86/include/asm/processor.h | 1 + arch/x86/include/asm/topology.h | 1 + arch/x86/kernel/cpu/debugfs.c | 1 + arch/x86/kernel/cpu/topology_common.c | 1 + 5 files changed, 8 insertions(+) commit 2f2db347071a8736c2adcdbf2658ce532e0afc0a Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Date: Fri Nov 15 06:07:57 2024 +0000 perf/x86/rapl: Remove the unused get_rapl_pmu_cpumask() function commit 9e9af8bbb5f9 ("perf/x86/rapl: Clean up cpumask and hotplug") removes the cpumask handling from rapl. Post that, we no longer need the get_rapl_pmu_cpumask() function. So remove it. Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Zhang Rui <rui.zhang@intel.com> Link: https://lore.kernel.org/r/20241115060805.447565-2-Dhananjay.Ugwekar@amd.com arch/x86/events/rapl.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit ae55e308bde2267df79c4475daa85e174b7ab4c8 Author: Kan Liang <kan.liang@linux.intel.com> Date: Tue Nov 19 05:55:04 2024 -0800 perf/x86/intel/ds: Simplify the PEBS records processing for adaptive PEBS The current code may iterate all the PEBS records in the DS area several times. The first loop is to find all active events and calculate the available records for each event. Then iterate the whole buffer again and again to process available records until all active events are processed. The algorithm is inherited from the old generations. The old PEBS hardware does not deal well with the situation when events happen near each other. SW has to drop the error records. Multiple iterations are required. The hardware limit has been addressed on newer platforms with adaptive PEBS. A simple one-iteration algorithm is introduced. The samples are output by record order with the patch, rather than the event order. It doesn't impact the post-processing. The perf tool always sorts the records by time before presenting them to the end user. In an NMI, the last record has to be specially handled. Add a last[] variable to track the last unprocessed record of each event. Test: 11 PEBS events are used in the perf test. Only the basic information is collected. perf record -e instructions:up,...,instructions:up -c 2000003 benchmark The ftrace is used to record the duration of the intel_pmu_drain_pebs_icl(). The average duration reduced from 62.04us to 57.94us. A small improvement can be observed with the new algorithm. Also, the implementation becomes simpler and more straightforward. Suggested-by: Stephane Eranian <eranian@google.com> Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Link: https://lore.kernel.org/r/20241119135504.1463839-5-kan.liang@linux.intel.com arch/x86/events/intel/ds.c | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) commit 3c00ed344cef4dbb57d8769b961af414132a173a Author: Kan Liang <kan.liang@linux.intel.com> Date: Tue Nov 19 05:55:03 2024 -0800 perf/x86/intel/ds: Factor out functions for PEBS records processing Factor out functions to process normal and the last PEBS records, which can be shared with the later patch. Move the event updating related codes (intel_pmu_save_and_restart()) to the end, where all samples have been processed. For the current usage, it doesn't matter when perf updates event counts and reset the counter. Because all counters are stopped when the PEBS buffer is drained. Drop the return of the !intel_pmu_save_and_restart(event) check. Because it never happen. The intel_pmu_save_and_restart(event) only returns 0, when !hwc->event_base or the period_left > 0. - The !hwc->event_base is impossible for the PEBS event, since the PEBS event is only available on GP and fixed counters, which always have a valid hwc->event_base. - The check only happens for the case of non-AUTO_RELOAD and single PEBS, which implies that the event must be overflowed. The period_left must be always <= 0 for an overflowed event after the x86_pmu_update(). Co-developed-by: "Peter Zijlstra (Intel)" <peterz@infradead.org> Signed-off-by: "Peter Zijlstra (Intel)" <peterz@infradead.org> Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20241119135504.1463839-4-kan.liang@linux.intel.com arch/x86/events/intel/ds.c | 109 ++++++++++++++++++++++++++++----------------- 1 file changed, 67 insertions(+), 42 deletions(-) commit 7087bfb0adc9a12ec3b463b1d38072c5efce5d6c Author: Kan Liang <kan.liang@linux.intel.com> Date: Tue Nov 19 05:55:02 2024 -0800 perf/x86/intel/ds: Clarify adaptive PEBS processing Modify the pebs_basic and pebs_meminfo structs to make the bitfields more explicit to ease readability of the code. Co-developed-by: Stephane Eranian <eranian@google.com> Signed-off-by: Stephane Eranian <eranian@google.com> Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20241119135504.1463839-3-kan.liang@linux.intel.com arch/x86/events/intel/ds.c | 43 ++++++++++++++++++--------------------- arch/x86/include/asm/perf_event.h | 16 +++++++++++++-- 2 files changed, 34 insertions(+), 25 deletions(-) commit dce210a72e91b13e53405e12f4e3ba023e45a4c7 Merge: bcfd5f644c5b 9f3de72a0c37 Author: Peter Zijlstra <peterz@infradead.org> Date: Mon Dec 2 12:01:33 2024 +0100 Merge branch 'perf/urgent' Keep in sync with the urgent bits. Signed-off-by: Peter Zijlstra <peterz@infradead.org> commit a76328d44c7ab7d1001a97cb2e84506dde7822d4 Author: Valentin Schneider <vschneid@redhat.com> Date: Wed Nov 27 17:55:01 2024 +0100 sched/fair: Remove CONFIG_CFS_BANDWIDTH=n definition of cfs_bandwidth_used() Andy reported that clang gets upset with CONFIG_CFS_BANDWIDTH=n: kernel/sched/fair.c:6580:20: error: unused function 'cfs_bandwidth_used' [-Werror,-Wunused-function] 6580 | static inline bool cfs_bandwidth_used(void) | ^~~~~~~~~~~~~~~~~~ Indeed, cfs_bandwidth_used() is only used within functions defined under CONFIG_CFS_BANDWIDTH=y. Remove its CONFIG_CFS_BANDWIDTH=n declaration & definition. Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Valentin Schneider <vschneid@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20241127165501.160004-1-vschneid@redhat.com kernel/sched/fair.c | 7 ------- 1 file changed, 7 deletions(-) commit 3a181f20fb4e9ad3c93ea6c71520c23826042629 Author: Wander Lairson Costa <wander@redhat.com> Date: Wed Jul 24 11:22:48 2024 -0300 sched/deadline: Consolidate Timer Cancellation After commit b58652db66c9 ("sched/deadline: Fix task_struct reference leak"), I identified additional calls to hrtimer_try_to_cancel that might also require a dl_server check. It remains unclear whether this omission was intentional or accidental in those contexts. This patch consolidates the timer cancellation logic into dedicated functions, ensuring consistent behavior across all calls. Additionally, it reduces code duplication and improves overall code cleanliness. Note the use of the __always_inline keyword. In some instances, we have a task_struct pointer, dereference the dl member, and then use the container_of macro to retrieve the task_struct pointer again. By inlining the code, the compiler can potentially optimize out this redundant round trip. Signed-off-by: Wander Lairson Costa <wander@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Juri Lelli <juri.lelli@redhat.com> Link: https://lore.kernel.org/r/20240724142253.27145-3-wander@redhat.com kernel/sched/deadline.c | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) commit 53916d5fd3c0b658de3463439dd2b7ce765072cb Author: Juri Lelli <juri.lelli@redhat.com> Date: Fri Nov 15 11:48:29 2024 +0000 sched/deadline: Check bandwidth overflow earlier for hotplug Currently we check for bandwidth overflow potentially due to hotplug operations at the end of sched_cpu_deactivate(), after the cpu going offline has already been removed from scheduling, active_mask, etc. This can create issues for DEADLINE tasks, as there is a substantial race window between the start of sched_cpu_deactivate() and the moment we possibly decide to roll-back the operation if dl_bw_deactivate() returns failure in cpuset_cpu_inactive(). An example is a throttled task that sees its replenishment timer firing while the cpu it was previously running on is considered offline, but before dl_bw_deactivate() had a chance to say no and roll-back happened. Fix this by directly calling dl_bw_deactivate() first thing in sched_cpu_deactivate() and do the required calculation in the former function considering the cpu passed as an argument as offline already. By doing so we also simplify sched_cpu_deactivate(), as there is no need anymore for any kind of roll-back if we fail early. Signed-off-by: Juri Lelli <juri.lelli@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Phil Auld <pauld@redhat.com> Tested-by: Waiman Long <longman@redhat.com> Link: https://lore.kernel.org/r/Zzc1DfPhbvqDDIJR@jlelli-thinkpadt14gen4.remote.csb kernel/sched/core.c | 22 +++++++--------------- kernel/sched/deadline.c | 12 ++++++++++-- 2 files changed, 17 insertions(+), 17 deletions(-) commit d4742f6ed7ea6df56e381f82ba4532245fa1e561 Author: Juri Lelli <juri.lelli@redhat.com> Date: Thu Nov 14 14:28:10 2024 +0000 sched/deadline: Correctly account for allocated bandwidth during hotplug For hotplug operations, DEADLINE needs to check that there is still enough bandwidth left after removing the CPU that is going offline. We however fail to do so currently. Restore the correct behavior by restructuring dl_bw_manage() a bit, so that overflow conditions (not enough bandwidth left) are properly checked. Also account for dl_server bandwidth, i.e. discount such bandwidth in the calculation since NORMAL tasks will be anyway moved away from the CPU as a result of the hotplug operation. Signed-off-by: Juri Lelli <juri.lelli@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Phil Auld <pauld@redhat.com> Tested-by: Waiman Long <longman@redhat.com> Link: https://lore.kernel.org/r/20241114142810.794657-3-juri.lelli@redhat.com kernel/sched/core.c | 2 +- kernel/sched/deadline.c | 48 +++++++++++++++++++++++++++++++++++++++--------- kernel/sched/sched.h | 2 +- 3 files changed, 41 insertions(+), 11 deletions(-) commit 41d4200b7103152468552ee50998cda914102049 Author: Juri Lelli <juri.lelli@redhat.com> Date: Thu Nov 14 14:28:09 2024 +0000 sched/deadline: Restore dl_server bandwidth on non-destructive root domain changes When root domain non-destructive changes (e.g., only modifying one of the existing root domains while the rest is not touched) happen we still need to clear DEADLINE bandwidth accounting so that it's then properly restored, taking into account DEADLINE tasks associated to each cpuset (associated to each root domain). After the introduction of dl_servers, we fail to restore such servers contribution after non-destructive changes (as they are only considered on destructive changes when runqueues are attached to the new domains). Fix this by making sure we iterate over the dl_servers attached to domains that have not been destroyed and add their bandwidth contribution back correctly. Signed-off-by: Juri Lelli <juri.lelli@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Phil Auld <pauld@redhat.com> Tested-by: Waiman Long <longman@redhat.com> Link: https://lore.kernel.org/r/20241114142810.794657-2-juri.lelli@redhat.com kernel/sched/deadline.c | 17 ++++++++++++++--- kernel/sched/topology.c | 8 +++++--- 2 files changed, 19 insertions(+), 6 deletions(-) commit 59297e2093ceced86393a059a4bd36802311f7bb Author: Harshit Agarwal <harshit@nutanix.com> Date: Thu Nov 14 14:08:11 2024 -0700 sched: add READ_ONCE to task_on_rq_queued task_on_rq_queued read p->on_rq without READ_ONCE, though p->on_rq is set with WRITE_ONCE in {activate|deactivate}_task and smp_store_release in __block_task, and also read with READ_ONCE in task_on_rq_migrating. Make all of these accesses pair together by adding READ_ONCE in the task_on_rq_queued. Signed-off-by: Harshit Agarwal <harshit@nutanix.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Phil Auld <pauld@redhat.com> Link: https://lkml.kernel.org/r/20241114210812.1836587-1-jon@nutanix.com kernel/sched/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 108ad0999085df2366dd9ef437573955cb3f5586 Author: Suleiman Souhlal <suleiman@google.com> Date: Mon Nov 18 13:37:45 2024 +0900 sched: Don't try to catch up excess steal time. When steal time exceeds the measured delta when updating clock_task, we currently try to catch up the excess in future updates. However, this results in inaccurate run times for the future things using clock_task, in some situations, as they end up getting additional steal time that did not actually happen. This is because there is a window between reading the elapsed time in update_rq_clock() and sampling the steal time in update_rq_clock_task(). If the VCPU gets preempted between those two points, any additional steal time is accounted to the outgoing task even though the calculated delta did not actually contain any of that "stolen" time. When this race happens, we can end up with steal time that exceeds the calculated delta, and the previous code would try to catch up that excess steal time in future clock updates, which is given to the next, incoming task, even though it did not actually have any time stolen. This behavior is particularly bad when steal time can be very long, which we've seen when trying to extend steal time to contain the duration that the host was suspended [0]. When this happens, clock_task stays frozen, during which the running task stays running for the whole duration, since its run time doesn't increase. However the race can happen even under normal operation. Ideally we would read the elapsed cpu time and the steal time atomically, to prevent this race from happening in the first place, but doing so is non-trivial. Since the time between those two points isn't otherwise accounted anywhere, neither to the outgoing task nor the incoming task (because the "end of outgoing task" and "start of incoming task" timestamps are the same), I would argue that the right thing to do is to simply drop any excess steal time, in order to prevent these issues. [0] https://lore.kernel.org/kvm/20240820043543.837914-1-suleiman@google.com/ Signed-off-by: Suleiman Souhlal <suleiman@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20241118043745.1857272-1-suleiman@google.com kernel/sched/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e3ca05ce5014965377e28e02714020927093bf7f Author: Jani Nikula <jani.nikula@intel.com> Date: Thu Nov 28 17:38:24 2024 +0200 drm/i915/display: convert power map to struct intel_display Going forward, struct intel_display is the main device data structure for display. Convert the power map code to it. Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/9df6b67914cd5afe7107c8431e8c475794b62298.1732808222.git.jani.nikula@intel.com .../gpu/drm/i915/display/intel_display_power_map.c | 56 +++++++++++----------- 1 file changed, 28 insertions(+), 28 deletions(-) commit 3987e35d695b807c898c084308a04c5d0a7f1123 Author: Jani Nikula <jani.nikula@intel.com> Date: Thu Nov 28 17:38:23 2024 +0200 drm/i915/display: convert high level power interfaces to struct intel_display Going forward, struct intel_display is the main device data structure for display. Convert the high level interfaces (init, cleanup, suspend, resume, etc.) of intel_display_power.c over to it. The actual power get/put etc. are left for follow-up. Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/e1761b0fe5081bf6ca21cca3430befe254f61b32.1732808222.git.jani.nikula@intel.com .../gpu/drm/i915/display/intel_display_driver.c | 8 +-- drivers/gpu/drm/i915/display/intel_display_irq.c | 3 +- drivers/gpu/drm/i915/display/intel_display_power.c | 78 ++++++++++------------ drivers/gpu/drm/i915/display/intel_display_power.h | 31 ++++----- drivers/gpu/drm/i915/display/intel_modeset_setup.c | 2 +- drivers/gpu/drm/i915/display/intel_psr.c | 6 +- drivers/gpu/drm/i915/i915_driver.c | 32 +++++---- drivers/gpu/drm/xe/display/xe_display.c | 28 +++++--- 8 files changed, 98 insertions(+), 90 deletions(-) commit 31f58252b7cc442b3be0824396579d93fc0b5194 Author: Jani Nikula <jani.nikula@intel.com> Date: Thu Nov 28 17:38:22 2024 +0200 drm/i915/display: convert power domain code internally to struct intel_display Going forward, struct intel_display is the main device data structure for display. Convert intel_display_power.c internally first, leaving external interfaces for follow-up. v2: Rebase, checkpatch fixes Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/d3284b30b53dd2fec786775ccb8992939360d774.1732808222.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display_power.c | 806 +++++++++++---------- 1 file changed, 414 insertions(+), 392 deletions(-) commit 263e82729211cf5597a8b12a8fdd68a052fffa49 Author: Jani Nikula <jani.nikula@intel.com> Date: Thu Nov 28 17:38:21 2024 +0200 drm/i915/display: convert power wells to struct intel_display Going forward, struct intel_display is the main device data structure for display. Switch the power well code over to it. v2: Fix parenthesis alignment Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/b8c0ff5502a5df55ec7a160d90257c6f2befc0b6.1732808222.git.jani.nikula@intel.com .../gpu/drm/i915/display/intel_display_debugfs.c | 3 +- drivers/gpu/drm/i915/display/intel_display_power.c | 71 +-- .../drm/i915/display/intel_display_power_well.c | 547 ++++++++++----------- .../drm/i915/display/intel_display_power_well.h | 19 +- drivers/gpu/drm/i915/display/intel_dpio_phy.c | 7 +- drivers/gpu/drm/i915/display/intel_hdcp.c | 2 +- drivers/gpu/drm/i915/display/intel_pps.c | 4 +- 7 files changed, 321 insertions(+), 332 deletions(-) commit a92152f2c73ea1a7331478e97d4291cb0af9ab0f Author: Jani Nikula <jani.nikula@intel.com> Date: Thu Nov 28 17:38:20 2024 +0200 drm/i915/display: convert for_each_power_domain_well() to struct intel_display Start converting display power domain code to struct intel_display. Start off with for_each_power_domain_well() and the reverse variant. Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/d21752baef1cab52ac3bec4f4e1f09f9acd6c1bf.1732808222.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display_power.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit e1d3a136726edf77228b34009bf46bbc1607d643 Author: Jani Nikula <jani.nikula@intel.com> Date: Thu Nov 28 17:38:19 2024 +0200 drm/i915/display: convert for_each_power_well() to struct intel_display Start converting power well code to struct intel_display. Start off with for_each_power_well() and the reverse variant. Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/30c3e44cdb9557a195b2e086bf169da8d8497c6b.1732808222.git.jani.nikula@intel.com drivers/gpu/drm/i915/display/intel_display_power.c | 16 ++++++++++------ drivers/gpu/drm/i915/display/intel_display_power_well.c | 3 ++- drivers/gpu/drm/i915/display/intel_display_power_well.h | 16 ++++++++-------- 3 files changed, 20 insertions(+), 15 deletions(-) commit bcfd5f644c5b933cfb3c488220e40a03e011e8a4 Merge: faac6f105ef1 40384c840ea1 Author: Ingo Molnar <mingo@kernel.org> Date: Mon Dec 2 11:52:59 2024 +0100 Merge tag 'v6.13-rc1' into perf/core, to refresh the branch Signed-off-by: Ingo Molnar <mingo@kernel.org> commit c625aa276319f51e307ca10401baac4628bb25c2 Merge: 40384c840ea1 615ab43b838b Author: Christian Brauner <brauner@kernel.org> Date: Tue Nov 26 11:10:15 2024 +0100 Merge patch series "pid_namespace: namespacify sysctl kernel.pid_max" Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> says: The pid_max sysctl is a global value. For a long time the default value has been 65535 and during the pidfd dicussions Linus proposed to bump pid_max by default (cf. [1]). Based on this discussion systemd started bumping pid_max to 2^22. So all new systems now run with a very high pid_max limit with some distros having also backported that change. The decision to bump pid_max is obviously correct. It just doesn't make a lot of sense nowadays to enforce such a low pid number. There's sufficient tooling to make selecting specific processes without typing really large pid numbers available. In any case, there are workloads that have expections about how large pid numbers they accept. Either for historical reasons or architectural reasons. One concreate example is the 32-bit version of Android's bionic libc which requires pid numbers less than 65536. There are workloads where it is run in a 32-bit container on a 64-bit kernel. If the host has a pid_max value greater than 65535 the libc will abort thread creation because of size assumptions of pthread_mutex_t. That's a fairly specific use-case however, in general specific workloads that are moved into containers running on a host with a new kernel and a new systemd can run into issues with large pid_max values. Obviously making assumptions about the size of the allocated pid is suboptimal but we have userspace that does it. Of course, giving containers the ability to restrict the number of processes in their respective pid namespace indepent of the global limit through pid_max is something desirable in itself and comes in handy in general. Independent of motivating use-cases the existence of pid namespaces makes this also a good semantical extension and there have been prior proposals pushing in a similar direction. The trick here is to minimize the risk of regressions which I think is doable. The fact that pid namespaces are hierarchical will help us here. What we mostly care about is that when the host sets a low pid_max limit, say (crazy number) 100 that no descendant pid namespace can allocate a higher pid number in its namespace. Since pid allocation is hierarchial this can be ensured by checking each pid allocation against the pid namespace's pid_max limit. This means if the allocation in the descendant pid namespace succeeds, the ancestor pid namespace can reject it. If the ancestor pid namespace has a higher limit than the descendant pid namespace the descendant pid namespace will reject the pid allocation. The ancestor pid namespace will obviously not care about this. All in all this means pid_max continues to enforce a system wide limit on the number of processes but allows pid namespaces sufficient leeway in handling workloads with assumptions about pid values and allows containers to restrict the number of processes in a pid namespace through the pid_max interface. * patches from https://lore.kernel.org/r/20241122132459.135120-1-aleksandr.mikhalitsyn@canonical.com: tests/pid_namespace: add pid_max tests pid: allow pid_max to be set per pid namespace Link: https://lore.kernel.org/r/20241122132459.135120-1-aleksandr.mikhalitsyn@canonical.com Signed-off-by: Christian Brauner <brauner@kernel.org> commit 615ab43b838bb982dc234feff75ee9ad35447c5d Author: Christian Brauner <brauner@kernel.org> Date: Fri Nov 22 14:24:59 2024 +0100 tests/pid_namespace: add pid_max tests Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> Link: https://lore.kernel.org/r/20241122132459.135120-3-aleksandr.mikhalitsyn@canonical.com Signed-off-by: Christian Brauner <brauner@kernel.org> tools/testing/selftests/pid_namespace/.gitignore | 1 + tools/testing/selftests/pid_namespace/Makefile | 2 +- tools/testing/selftests/pid_namespace/pid_max.c | 358 +++++++++++++++++++++++ 3 files changed, 360 insertions(+), 1 deletion(-) commit 7863dcc72d0f4b13a641065670426435448b3d80 Author: Christian Brauner <brauner@kernel.org> Date: Fri Nov 22 14:24:58 2024 +0100 pid: allow pid_max to be set per pid namespace The pid_max sysctl is a global value. For a long time the default value has been 65535 and during the pidfd dicussions Linus proposed to bump pid_max by default (cf. [1]). Based on this discussion systemd started bumping pid_max to 2^22. So all new systems now run with a very high pid_max limit with some distros having also backported that change. The decision to bump pid_max is obviously correct. It just doesn't make a lot of sense nowadays to enforce such a low pid number. There's sufficient tooling to make selecting specific processes without typing really large pid numbers available. In any case, there are workloads that have expections about how large pid numbers they accept. Either for historical reasons or architectural reasons. One concreate example is the 32-bit version of Android's bionic libc which requires pid numbers less than 65536. There are workloads where it is run in a 32-bit container on a 64-bit kernel. If the host has a pid_max value greater than 65535 the libc will abort thread creation because of size assumptions of pthread_mutex_t. That's a fairly specific use-case however, in general specific workloads that are moved into containers running on a host with a new kernel and a new systemd can run into issues with large pid_max values. Obviously making assumptions about the size of the allocated pid is suboptimal but we have userspace that does it. Of course, giving containers the ability to restrict the number of processes in their respective pid namespace indepent of the global limit through pid_max is something desirable in itself and comes in handy in general. Independent of motivating use-cases the existence of pid namespaces makes this also a good semantical extension and there have been prior proposals pushing in a similar direction. The trick here is to minimize the risk of regressions which I think is doable. The fact that pid namespaces are hierarchical will help us here. What we mostly care about is that when the host sets a low pid_max limit, say (crazy number) 100 that no descendant pid namespace can allocate a higher pid number in its namespace. Since pid allocation is hierarchial this can be ensured by checking each pid allocation against the pid namespace's pid_max limit. This means if the allocation in the descendant pid namespace succeeds, the ancestor pid namespace can reject it. If the ancestor pid namespace has a higher limit than the descendant pid namespace the descendant pid namespace will reject the pid allocation. The ancestor pid namespace will obviously not care about this. All in all this means pid_max continues to enforce a system wide limit on the number of processes but allows pid namespaces sufficient leeway in handling workloads with assumptions about pid values and allows containers to restrict the number of processes in a pid namespace through the pid_max interface. [1]: https://lore.kernel.org/linux-api/CAHk-=wiZ40LVjnXSi9iHLE_-ZBsWFGCgdmNiYZUXn1-V5YBg2g@mail.gmail.com - rebased from 5.14-rc1 - a few fixes (missing ns_free_inum on error path, missing initialization, etc) - permission check changes in pid_table_root_permissions - unsigned int pid_max -> int pid_max (keep pid_max type as it was) - add READ_ONCE in alloc_pid() as suggested by Christian - rebased from 6.7 and take into account: * sysctl: treewide: drop unused argument ctl_table_root::set_ownership(table) * sysctl: treewide: constify ctl_table_header::ctl_table_arg * pidfd: add pidfs * tracing: Move saved_cmdline code into trace_sched_switch.c Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> Link: https://lore.kernel.org/r/20241122132459.135120-2-aleksandr.mikhalitsyn@canonical.com Signed-off-by: Christian Brauner <brauner@kernel.org> include/linux/pid.h | 3 - include/linux/pid_namespace.h | 10 ++- kernel/pid.c | 125 +++++++++++++++++++++++++++++++++++--- kernel/pid_namespace.c | 43 +++++++++---- kernel/sysctl.c | 9 --- kernel/trace/pid_list.c | 2 +- kernel/trace/trace.h | 2 - kernel/trace/trace_sched_switch.c | 2 +- 8 files changed, 161 insertions(+), 35 deletions(-) commit a6babf4cbeaaa1c97a205382cdc958571f668ea8 Author: Christian Brauner <brauner@kernel.org> Date: Tue Nov 26 14:22:16 2024 +0100 cred: fold get_new_cred_many() into get_cred_many() There's no need for this to be a separate helper. Link: https://lore.kernel.org/r/20241126-zaunpfahl-wovon-c3979b990a63@brauner Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> include/linux/cred.h | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 252120f79a3010256e543a5cafdb46738345536b Merge: 40384c840ea1 6efbb80490a5 Author: Christian Brauner <brauner@kernel.org> Date: Tue Nov 26 10:52:49 2024 +0100 Merge patch series "cred: rework {override,revert}_creds()" Christian Brauner <brauner@kernel.org> says: For the v6.13 cycle we switched overlayfs to a variant of override_creds() that doesn't take an extra reference. To this end I suggested introducing {override,revert}_creds_light() which overlayfs could use. This seems to work rather well. This series follow Linus advice and unifies the separate helpers and simply makes {override,revert}_creds() do what {override,revert}_creds_light() currently does. Caller's that really need the extra reference count can take it manually. * patches from https://lore.kernel.org/r/20241125-work-cred-v2-0-68b9d38bb5b2@kernel.org: (29 commits) cred: remove unused get_new_cred() nfsd: avoid pointless cred reference count bump cachefiles: avoid pointless cred reference count bump dns_resolver: avoid pointless cred reference count bump trace: avoid pointless cred reference count bump cgroup: avoid pointless cred reference count bump acct: avoid pointless reference count bump io_uring: avoid pointless cred reference count bump smb: avoid pointless cred reference count bump cifs: avoid pointless cred reference count bump cifs: avoid pointless cred reference count bump ovl: avoid pointless cred reference count bump open: avoid pointless cred reference count bump nfsfh: avoid pointless cred reference count bump nfs/nfs4recover: avoid pointless cred reference count bump nfs/nfs4idmap: avoid pointless reference count bump nfs/localio: avoid pointless cred reference count bumps coredump: avoid pointless cred reference count bump binfmt_misc: avoid pointless cred reference count bump aio: avoid pointless cred reference count bump ... Link: https://lore.kernel.org/r/20241125-work-cred-v2-0-68b9d38bb5b2@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> commit 6efbb80490a545cfd9f87ebd9225879d8cdbed93 Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:25 2024 +0100 cred: remove unused get_new_cred() This helper is not used anymore so remove it. Link: https://lore.kernel.org/r/20241125-work-cred-v2-29-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> Documentation/security/credentials.rst | 5 ----- include/linux/cred.h | 13 ------------- 2 files changed, 18 deletions(-) commit 4fa6af563d4dcef43ae34a9bce9d1a9440f20867 Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:24 2024 +0100 nfsd: avoid pointless cred reference count bump The code already got rid of the extra reference count from the old version of override_creds(). Link: https://lore.kernel.org/r/20241125-work-cred-v2-28-68b9d38bb5b2@kernel.org Acked-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/nfsd/auth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 76a40086683933431660b348dbfefa80b9eaaa03 Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:23 2024 +0100 cachefiles: avoid pointless cred reference count bump The cache holds a long-term reference to the credentials that's taken when the cache is created and put when the cache becomes unused. Link: https://lore.kernel.org/r/20241125-work-cred-v2-27-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/cachefiles/internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9e8534f5ae4f506b6fbda62add578d629c657816 Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:22 2024 +0100 dns_resolver: avoid pointless cred reference count bump The dns_resolver_cache creds hold a long-term reference that is stable during the operation. Link: https://lore.kernel.org/r/20241125-work-cred-v2-26-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> net/dns_resolver/dns_query.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aeca632b3160b654769d6224e264fff9f03f4a9b Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:21 2024 +0100 trace: avoid pointless cred reference count bump The creds are allocated via prepare_creds() which has already taken a reference. Link: https://lore.kernel.org/r/20241125-work-cred-v2-25-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> kernel/trace/trace_events_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 34ab26fb6b2a70ae6b22fc3880bc6d8b68579564 Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:20 2024 +0100 cgroup: avoid pointless cred reference count bump of->file->f_cred already holds a reference count that is stable during the operation. Link: https://lore.kernel.org/r/20241125-work-cred-v2-24-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> kernel/cgroup/cgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6256d2377ed8fef96087803051d8b9dba68d8904 Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:19 2024 +0100 acct: avoid pointless reference count bump file->f_cred already holds a reference count that is stable during the operation. Link: https://lore.kernel.org/r/20241125-work-cred-v2-23-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> kernel/acct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b690668b65e504d3e9344aa038bdaa7b2354304f Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:18 2024 +0100 io_uring: avoid pointless cred reference count bump req->creds and ctx->sq_creds already hold reference counts that are stable during the operations. Link: https://lore.kernel.org/r/20241125-work-cred-v2-22-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> io_uring/io_uring.c | 4 ++-- io_uring/sqpoll.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 62e5396c50ae3942ff94c0a8cec6f476c1c3da2f Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:17 2024 +0100 smb: avoid pointless cred reference count bump The creds are allocated via prepare_kernel_cred() which has already taken a reference. This also removes a pointless check that gives the impression that override_creds() can ever be called on a task with current->cred NULL. That's not possible afaict. Remove the check to not imply that there can be a dangling pointer in current->cred. Link: https://lore.kernel.org/r/20241125-work-cred-v2-21-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/smb/server/smb_common.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 2b315eda9e45f21b6c0da298016677b1090df67d Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:16 2024 +0100 cifs: avoid pointless cred reference count bump During module init root_cred will be allocated with its own reference which is only destroyed during module exit. Link: https://lore.kernel.org/r/20241125-work-cred-v2-20-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/smb/client/cifsacl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6077c4620daad2c9823c5ed55b4b4226a2883794 Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:15 2024 +0100 cifs: avoid pointless cred reference count bump During module init spnego_cred will be allocated with its own reference which is only destroyed during module exit. Link: https://lore.kernel.org/r/20241125-work-cred-v2-19-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/smb/client/cifs_spnego.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit facc239a8c4980e17c832a7d5ee3809a2e2a45bd Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:14 2024 +0100 ovl: avoid pointless cred reference count bump security_inode_copy_up() allocates a set of new credentials and has taken a reference count. Link: https://lore.kernel.org/r/20241125-work-cred-v2-18-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/overlayfs/copy_up.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7708f3a7d25f5f1e80a5ef6abc3abde00128f88c Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:13 2024 +0100 open: avoid pointless cred reference count bump The code already got rid of the extra reference count from the old version of override_creds(). Link: https://lore.kernel.org/r/20241125-work-cred-v2-17-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/open.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 81be9a8a1090cdddea69aa326cd41b658932e84e Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:12 2024 +0100 nfsfh: avoid pointless cred reference count bump The code already got rid of the extra reference count from the old version of override_creds(). Link: https://lore.kernel.org/r/20241125-work-cred-v2-16-68b9d38bb5b2@kernel.org Acked-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/nfsd/nfsfh.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dfce6a462a9490063852c5d91d0f41104c0aad6d Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:11 2024 +0100 nfs/nfs4recover: avoid pointless cred reference count bump The code already got rid of the extra reference count from the old version of override_creds(). Link: https://lore.kernel.org/r/20241125-work-cred-v2-15-68b9d38bb5b2@kernel.org Acked-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/nfsd/nfs4recover.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3e23a1cd849d96ff3615d731acdafa8332ca2206 Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:10 2024 +0100 nfs/nfs4idmap: avoid pointless reference count bump The override creds are allocated with a long-term refernce when the id_resolver is initialized via prepare_kernel_creds() that is put when the id_resolver is destroyed. Link: https://lore.kernel.org/r/20241125-work-cred-v2-14-68b9d38bb5b2@kernel.org Acked-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/nfs/nfs4idmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c7a0a6afd0e45ba4879d6fb2bafa9807cde6e2c Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:09 2024 +0100 nfs/localio: avoid pointless cred reference count bumps filp->f_cred already holds a reference count that is stable during the operation. Link: https://lore.kernel.org/r/20241125-work-cred-v2-13-68b9d38bb5b2@kernel.org Acked-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/nfs/localio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bd05aeb1eedc60dee05f82efe97339330239f37e Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:08 2024 +0100 coredump: avoid pointless cred reference count bump The creds are allocated via prepare_creds() which has already taken a reference. Link: https://lore.kernel.org/r/20241125-work-cred-v2-12-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/coredump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit caf6bf48f902e8e353f124325dd635d143331476 Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:07 2024 +0100 binfmt_misc: avoid pointless cred reference count bump file->f_cred already holds a reference count that is stable during the operation. Link: https://lore.kernel.org/r/20241125-work-cred-v2-11-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/binfmt_misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b37eab47cf5479f974c029e23d84f9049d4df009 Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:06 2024 +0100 aio: avoid pointless cred reference count bump iocb->fsync.creds already holds a reference count that is stable while the operation is performed. Link: https://lore.kernel.org/r/20241125-work-cred-v2-10-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> fs/aio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7c0c3b346adafb515a5ff085c68c92695c4fdb04 Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:05 2024 +0100 target_core_configfs: avoid pointless cred reference count bump The creds are allocated via prepare_kernel_cred() which has already taken a reference. Link: https://lore.kernel.org/r/20241125-work-cred-v2-9-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> drivers/target/target_core_configfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 25fe3d58e4ba20b1ec98d7ce9067ddd234e8e448 Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:04 2024 +0100 sev-dev: avoid pointless cred reference count bump and fix a memory leak while at it. The new creds are created via prepare_creds() and then reverted via put_cred(revert_creds()). The additional reference count bump from override_creds() wasn't even taken into account before. Link: https://lore.kernel.org/r/20241125-work-cred-v2-8-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> drivers/crypto/ccp/sev-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7915f42453602697b402d8cbbeb7689166fb569b Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:03 2024 +0100 firmware: avoid pointless reference count bump The creds are allocated via prepare_kernel_cred() which has already taken a reference. Link: https://lore.kernel.org/r/20241125-work-cred-v2-7-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> drivers/base/firmware_loader/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51c0bcf0973a3836adfc46f30f876f412478e376 Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:02 2024 +0100 tree-wide: s/revert_creds_light()/revert_creds()/g Rename all calls to revert_creds_light() back to revert_creds(). Link: https://lore.kernel.org/r/20241125-work-cred-v2-6-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> drivers/base/firmware_loader/main.c | 2 +- drivers/crypto/ccp/sev-dev.c | 2 +- drivers/target/target_core_configfs.c | 2 +- fs/aio.c | 2 +- fs/backing-file.c | 10 +++++----- fs/binfmt_misc.c | 2 +- fs/cachefiles/internal.h | 2 +- fs/coredump.c | 2 +- fs/nfs/localio.c | 4 ++-- fs/nfs/nfs4idmap.c | 2 +- fs/nfsd/auth.c | 2 +- fs/nfsd/filecache.c | 2 +- fs/nfsd/nfs4recover.c | 2 +- fs/open.c | 2 +- fs/overlayfs/copy_up.c | 2 +- fs/overlayfs/dir.c | 2 +- fs/overlayfs/util.c | 2 +- fs/smb/client/cifs_spnego.c | 2 +- fs/smb/client/cifsacl.c | 4 ++-- fs/smb/server/smb_common.c | 2 +- include/linux/cred.h | 2 +- io_uring/io_uring.c | 2 +- io_uring/sqpoll.c | 2 +- kernel/acct.c | 2 +- kernel/cgroup/cgroup.c | 2 +- kernel/trace/trace_events_user.c | 2 +- net/dns_resolver/dns_query.c | 2 +- 27 files changed, 33 insertions(+), 33 deletions(-) commit 6771e004b40962402d0e973fc7d2e0e61364fdfb Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:01 2024 +0100 tree-wide: s/override_creds_light()/override_creds()/g Rename all calls to override_creds_light() back to overrid_creds(). Link: https://lore.kernel.org/r/20241125-work-cred-v2-5-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> drivers/base/firmware_loader/main.c | 2 +- drivers/crypto/ccp/sev-dev.c | 2 +- drivers/target/target_core_configfs.c | 2 +- fs/aio.c | 2 +- fs/backing-file.c | 10 +++++----- fs/binfmt_misc.c | 2 +- fs/cachefiles/internal.h | 2 +- fs/coredump.c | 2 +- fs/nfs/localio.c | 4 ++-- fs/nfs/nfs4idmap.c | 2 +- fs/nfsd/auth.c | 2 +- fs/nfsd/nfs4recover.c | 2 +- fs/nfsd/nfsfh.c | 2 +- fs/open.c | 2 +- fs/overlayfs/copy_up.c | 2 +- fs/overlayfs/dir.c | 2 +- fs/overlayfs/util.c | 2 +- fs/smb/client/cifs_spnego.c | 2 +- fs/smb/client/cifsacl.c | 4 ++-- fs/smb/server/smb_common.c | 2 +- include/linux/cred.h | 2 +- io_uring/io_uring.c | 2 +- io_uring/sqpoll.c | 2 +- kernel/acct.c | 2 +- kernel/cgroup/cgroup.c | 2 +- kernel/trace/trace_events_user.c | 2 +- net/dns_resolver/dns_query.c | 2 +- 27 files changed, 33 insertions(+), 33 deletions(-) commit a51a1d6bcaa345cc88e738cad468083c4e13aa3b Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:10:00 2024 +0100 cred: remove old {override,revert}_creds() helpers They are now unused. Link: https://lore.kernel.org/r/20241125-work-cred-v2-4-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> include/linux/cred.h | 7 ------- kernel/cred.c | 50 -------------------------------------------------- 2 files changed, 57 deletions(-) commit f905e00904cc5899c89897b93bebfcf6656f608e Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:09:59 2024 +0100 tree-wide: s/revert_creds()/put_cred(revert_creds_light())/g Convert all calls to revert_creds() over to explicitly dropping reference counts in preparation for converting revert_creds() to revert_creds_light() semantics. Link: https://lore.kernel.org/r/20241125-work-cred-v2-3-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> drivers/base/firmware_loader/main.c | 2 +- drivers/crypto/ccp/sev-dev.c | 2 +- drivers/target/target_core_configfs.c | 2 +- fs/aio.c | 2 +- fs/binfmt_misc.c | 2 +- fs/cachefiles/internal.h | 2 +- fs/coredump.c | 2 +- fs/nfs/localio.c | 4 ++-- fs/nfs/nfs4idmap.c | 2 +- fs/nfsd/auth.c | 2 +- fs/nfsd/filecache.c | 2 +- fs/nfsd/nfs4recover.c | 2 +- fs/open.c | 2 +- fs/overlayfs/copy_up.c | 2 +- fs/smb/client/cifs_spnego.c | 2 +- fs/smb/client/cifsacl.c | 4 ++-- fs/smb/server/smb_common.c | 2 +- io_uring/io_uring.c | 2 +- io_uring/sqpoll.c | 2 +- kernel/acct.c | 2 +- kernel/cgroup/cgroup.c | 2 +- kernel/trace/trace_events_user.c | 2 +- net/dns_resolver/dns_query.c | 2 +- 23 files changed, 25 insertions(+), 25 deletions(-) commit 95c54bc81791c210b131f2b1013942487e74896f Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:09:58 2024 +0100 cred: return old creds from revert_creds_light() So we can easily convert revert_creds() callers over to drop the reference count explicitly. Link: https://lore.kernel.org/r/20241125-work-cred-v2-2-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> include/linux/cred.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0a670e151a71434765de69590944e18c08ee08cf Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 25 15:09:57 2024 +0100 tree-wide: s/override_creds()/override_creds_light(get_new_cred())/g Convert all callers from override_creds() to override_creds_light(get_new_cred()) in preparation of making override_creds() not take a separate reference at all. Link: https://lore.kernel.org/r/20241125-work-cred-v2-1-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org> drivers/base/firmware_loader/main.c | 2 +- drivers/crypto/ccp/sev-dev.c | 2 +- drivers/target/target_core_configfs.c | 2 +- fs/aio.c | 2 +- fs/binfmt_misc.c | 2 +- fs/cachefiles/internal.h | 2 +- fs/coredump.c | 2 +- fs/nfs/localio.c | 4 ++-- fs/nfs/nfs4idmap.c | 2 +- fs/nfsd/auth.c | 2 +- fs/nfsd/nfs4recover.c | 2 +- fs/nfsd/nfsfh.c | 2 +- fs/open.c | 2 +- fs/overlayfs/copy_up.c | 2 +- fs/smb/client/cifs_spnego.c | 2 +- fs/smb/client/cifsacl.c | 4 ++-- fs/smb/server/smb_common.c | 2 +- include/linux/cred.h | 5 +++-- io_uring/io_uring.c | 2 +- io_uring/sqpoll.c | 2 +- kernel/acct.c | 2 +- kernel/cgroup/cgroup.c | 2 +- kernel/trace/trace_events_user.c | 2 +- net/dns_resolver/dns_query.c | 2 +- 24 files changed, 28 insertions(+), 27 deletions(-) commit a48bdf80ce6938f8c1de6a56fed7c4f6f46904e9 Author: Mateusz Guzik <mjguzik@gmail.com> Date: Sat Nov 16 07:41:28 2024 +0100 fs: delay sysctl_nr_open check in expand_files() Suppose a thread sharing the table started a resize, while sysctl_nr_open got lowered to a value which prohibits it. This is still going to go through with and without the patch, which is fine. Further suppose another thread shows up to do a matching expansion while resize_in_progress == true. It is going to error out since it performs the sysctl_nr_open check *before* finding out if there is an expansion in progress. But the aformentioned thread is going to succeded, so the error is spurious (and it would not happen if the thread showed up a little bit later). Checking the sysctl *after* we know there are no pending updates sorts it out. While here annotate the thing as unlikely. Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://lore.kernel.org/r/20241116064128.280870-1-mjguzik@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org> fs/file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4972226d0dc48ddedf071355ca664fbf34b509c8 Merge: 40384c840ea1 4620cb828450 Author: Christian Brauner <brauner@kernel.org> Date: Mon Nov 11 10:00:29 2024 +0100 Merge patch series "proc/kcore: performance optimizations" Omar Sandoval <osandov@osandov.com> says: The performance of /proc/kcore reads has been showing up as a bottleneck for drgn. drgn scripts often spend ~25% of their time in the kernel reading from /proc/kcore. A lot of this overhead comes from silly inefficiencies. This patch series fixes the low-hanging fruit. The fixes are all fairly small and straightforward. The result is a 25% improvement in read latency in micro-benchmarks (from ~235 nanoseconds to ~175) and a 15% improvement in execution time for real-world drgn scripts. Since I have a stake in /proc/kcore and have modified it several times, the final patch volunteers me to maintain it. * patches from https://lore.kernel.org/r/cover.1731115587.git.osandov@fb.com: MAINTAINERS: add me as /proc/kcore maintainer proc/kcore: use percpu_rw_semaphore for kclist_lock proc/kcore: don't walk list on every read proc/kcore: mark proc entry as permanent Link: https://lore.kernel.org/r/cover.1731115587.git.osandov@fb.com Signed-off-by: Christian Brauner <brauner@kernel.org> commit 4620cb828450b5b92bccfb3321fc6915ed2a5f32 Author: Omar Sandoval <osandov@fb.com> Date: Fri Nov 8 17:28:42 2024 -0800 MAINTAINERS: add me as /proc/kcore maintainer Christian volunteered me for this a while back given that drgn is the main user of /proc/kcore and I've touched it several times over the years. Link: https://lore.kernel.org/all/20231125-kurhotel-zuwege-10cce62a50fd@brauner/ Signed-off-by: Omar Sandoval <osandov@fb.com> Link: https://lore.kernel.org/r/fb71665d1d10a8b3faf7930e4ad9d93143a61cef.1731115587.git.osandov@fb.com Signed-off-by: Christian Brauner <brauner@kernel.org> MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 605291e2210130957e8a17a466f3f21c4fe0adef Author: Omar Sandoval <osandov@fb.com> Date: Fri Nov 8 17:28:41 2024 -0800 proc/kcore: use percpu_rw_semaphore for kclist_lock The list of memory ranges for /proc/kcore is protected by a rw_semaphore. We lock it for reading on every read from /proc/kcore. This is very heavy, especially since it is rarely locked for writing. Since we want to strongly favor read lock performance, convert it to a percpu_rw_semaphore. I also experimented with percpu_ref and SRCU, but this change was the simplest and the fastest. In my benchmark, this reduces the time per read by yet another 20 nanoseconds on top of the previous two changes, from 195 nanoseconds per read to 175. Link: https://github.com/osandov/drgn/issues/106 Signed-off-by: Omar Sandoval <osandov@fb.com> Link: https://lore.kernel.org/r/83a3b235b4bcc3b8aef7c533e0657f4d7d5d35ae.1731115587.git.osandov@fb.com Signed-off-by: Christian Brauner <brauner@kernel.org> fs/proc/kcore.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 680e029fd62f7d9d8373788635f52c3de358d18d Author: Omar Sandoval <osandov@fb.com> Date: Fri Nov 8 17:28:40 2024 -0800 proc/kcore: don't walk list on every read We maintain a list of memory ranges for /proc/kcore, which usually has 10-20 entries. Currently, every single read from /proc/kcore walks the entire list in order to count the number of entries and compute some offsets. These values only change when the list of memory ranges changes, which is very rare (only when memory is hot(un)plugged). We can cache the values when the list is populated to avoid these redundant walks. In my benchmark, this reduces the time per read by another 20 nanoseconds on top of the previous change, from 215 nanoseconds per read to 195. Link: https://github.com/osandov/drgn/issues/106 Signed-off-by: Omar Sandoval <osandov@fb.com> Link: https://lore.kernel.org/r/8d945558b9c9efe74103a34b7780f1cd90d9ce7f.1731115587.git.osandov@fb.com Signed-off-by: Christian Brauner <brauner@kernel.org> fs/proc/kcore.c | 70 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit c9136fad4c08288be26aaff3e63d634545b32a85 Author: Omar Sandoval <osandov@fb.com> Date: Fri Nov 8 17:28:39 2024 -0800 proc/kcore: mark proc entry as permanent drgn reads from /proc/kcore to debug the running kernel. For many drgn scripts, /proc/kcore is actually a bottleneck. use_pde() and unuse_pde() in prog_reg_read() show up hot in profiles. Since the entry for /proc/kcore can never be removed, this is useless overhead that can be trivially avoided by marking the entry as permanent. In my benchmark, this reduces the time per read by about 20 nanoseconds, from 235 nanoseconds per read to 215. Link: https://github.com/osandov/drgn/issues/106 Signed-off-by: Omar Sandoval <osandov@fb.com> Link: https://lore.kernel.org/r/60873e6afcfda3f08d0456f19e4733612afcf134.1731115587.git.osandov@fb.com Signed-off-by: Christian Brauner <brauner@kernel.org> fs/proc/kcore.c | 1 + 1 file changed, 1 insertion(+) commit 7222ae1d3e4e79a3df37a0668f3718a7898b35df Author: Youssef Samir <quic_yabdulra@quicinc.com> Date: Thu Oct 24 23:47:15 2024 +0200 bus: mhi: host: Free mhi_buf vector inside mhi_alloc_bhie_table() mhi_alloc_bhie_table() starts by allocating a vector of struct mhi_buf then it allocates a DMA buffer for each element. If allocation fails, it will free the allocated DMA buffers, but it neglects freeing the mhi_buf vector. Avoid memory leaks by freeing the mhi_buf vector on error. Fixes: 3000f85b8f47 ("bus: mhi: core: Add support for basic PM operations") Signed-off-by: Youssef Samir <quic_yabdulra@quicinc.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20241024214715.1208940-1-quic_yabdulra@quicinc.com Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> drivers/bus/mhi/host/boot.c | 1 + 1 file changed, 1 insertion(+) commit ec42af4a1fe383af4a4fbbe2bc0e9cc1e8e65620 Author: Takashi Iwai <tiwai@suse.de> Date: Thu Nov 28 08:48:00 2024 +0100 ALSA: seq: Skip notifications unless subscribed to announce port The notification via system announce port isn't a lightweight task, hence it'd be better to skip if there is no subscription is done for the announce port. Implement a simple counter for checking that by hooking the subscribe and unsubscribe callbacks. Link: https://patch.msgid.link/20241128074801.32253-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/core/seq/seq_system.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit b8e49e24cdba27a0810a0988e810e2c68f2033cb Author: Takashi Iwai <tiwai@suse.de> Date: Thu Nov 28 08:47:33 2024 +0100 ALSA: seq: Notify client and port info changes It was supposed to be notified when a sequencer client info and a port info has changed (via SNDRV_SEQ_EVENT_CLIENT_CHANGE and SNDRV_SEQ_EVENT_PORT_CHANGE event, respectively), and there are already helper functions. But those aren't really sent from the driver so far, except for the recent support of UMP, simply due to the lack of implementations. This patch adds the missing notifications at updating the client and the port info. The formerly added notification for UMP is dropped because it's handled now in the port info side. Reported-by: Mark Lentczner <mark@glyphic.com> Link: https://lore.kernel.org/CAPnksqRok7xGa4bxq9WWimVV=28-7_j628OmrWLS=S0=hzaTHQ@mail.gmail.com Link: https://patch.msgid.link/20241128074734.32165-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/core/seq/seq_clientmgr.c | 7 +++++++ sound/core/seq/seq_ump_client.c | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) commit 6e0fb1bdb71cf8078c8532617e565e3db22c0d3c Author: Pei Xiao <xiaopei01@kylinos.cn> Date: Thu Nov 21 11:55:34 2024 +0800 platform/x86: x86-android-tablets: make platform data be static make lenovo_yoga_tab2_1380_bq24190_pdata and lenovo_yoga_tab2_1380_modules to be static Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202410160432.oJAPbrW9-lkp@intel.com/ Fixes: 3eee73ad42c3 ("platform/x86: x86-android-tablets: Add Lenovo Yoga Tablet 2 Pro 1380F/L data") Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/daafd1371e7e9946217712ce8720e29cd5c52f7a.1732161310.git.xiaopei01@kylinos.cn Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/x86-android-tablets/lenovo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b5dbb8e23cb334460acdb37910ce3784926e1cf1 Author: Pei Xiao <xiaopei01@kylinos.cn> Date: Wed Nov 20 15:51:39 2024 +0800 platform/mellanox: mlxbf-pmc: incorrect type in assignment Fix sparse warnings: expected 'void __iomem *addr', but got 'void *addr' Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202411121935.cgFcEMO4-lkp@intel.com/ Fixes: 423c3361855c ("platform/mellanox: mlxbf-pmc: Add support for BlueField-3") Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Reviewed-by: David Thompson <davthompson@nvidia.com> Link: https://lore.kernel.org/r/fece26ad40620b1e0beb733b9bba3de3ce325761.1732088929.git.xiaopei01@kylinos.cn Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/mellanox/mlxbf-pmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4f7fe90fe71934c8b79d80aa5942fae101f214c5 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Mon Nov 18 08:29:11 2024 +0100 platform/x86: quickstart: don't include 'pm_wakeup.h' directly The header clearly states that it does not want to be included directly, only via 'device.h'. 'platform_device.h' works equally well. Remove the direct inclusion. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20241118072917.3853-13-wsa+renesas@sang-engineering.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> drivers/platform/x86/quickstart.c | 1 - 1 file changed, 1 deletion(-) commit 706119fbbdff2f95a62d1665fb4234ebe4e9392c Author: Denzeel Oliva <wachiturroxd150@gmail.com> Date: Thu Nov 14 14:36:36 2024 +0000 arm64: dts: exynos: Add initial support for Samsung Galaxy S20 FE (r8s) Add initial support for the Samsung Galaxy S20 FE (r8s/SM-G780F) device. Its launch was in 2020 and also based on the Exynos 990 SoC. It is only configured with 6GB of RAM, although storage options may differ. This device tree adds support for the following: - SimpleFB - 6GB RAM - Buttons Signed-off-by: Denzeel Oliva <wachiturroxd150@gmail.com> Link: https://lore.kernel.org/r/20241114143636.374-3-wachiturroxd150@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/Makefile | 1 + arch/arm64/boot/dts/exynos/exynos990-r8s.dts | 115 +++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) commit 9163693d368f00c02fb8a07beabe2c2f18fe0a32 Author: Denzeel Oliva <wachiturroxd150@gmail.com> Date: Thu Nov 14 14:36:35 2024 +0000 dt-bindings: arm: samsung: Add compatible for Samsung Galaxy S20 FE (SM-G780F) Add binding for the Samsung Galaxy S20 FE (SM-G780F) board, which is based on the Samsung Exynos990 SoC. Signed-off-by: Denzeel Oliva <wachiturroxd150@gmail.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241114143636.374-2-wachiturroxd150@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml | 1 + 1 file changed, 1 insertion(+) commit aa33006c53c9c56ecbcbbb9b5415e27000eb86d4 Author: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Date: Wed Oct 23 12:17:33 2024 +0300 arm64: dts: exynos8895: Add serial_0/1 nodes Add nodes for serial_0 (UART_DBG) and serial_1 (UART_BT), which allows using them. Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Link: https://lore.kernel.org/r/20241023091734.538682-5-ivo.ivanov.ivanov1@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> arch/arm64/boot/dts/exynos/exynos8895.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 63809cdef744f9004720697fd99611b1684acb44 Author: Suraj Kandpal <suraj.kandpal@intel.com> Date: Mon Dec 2 11:34:10 2024 +0530 drm/i915/hdcp: Remove log for HDMI HDCP LIC check We don't need to shout out loud if there is a Link Integrity Failure. This does not mean HDCP has failed, it is expected and taken into account in the HDCP Spec. The real failure happens when we are not able to reauthenticate and get HDCP running again for which we already have the right logging. --v2 -Remove the log altogether [Ankit] --v3 -Remove useless display variable Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241202060410.1872121-1-suraj.kandpal@intel.com drivers/gpu/drm/i915/display/intel_hdmi.c | 2 -- 1 file changed, 2 deletions(-) commit 5c66811c9251303b2806caa04b278b4826e7a408 Author: Krishna Kurapati <quic_kriskura@quicinc.com> Date: Thu Nov 21 12:00:07 2024 +0530 arm64: dts: qcom: qcs615-ride: Enable primary USB interface Enable primary USB controller on QCS615 Ride platform. The primary USB controller is made "peripheral", as this is intended to be connected to a host for debugging use cases. For using the controller in host mode, changing the dr_mode and adding appropriate pinctrl nodes to provide vbus would be sufficient. Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241121063007.2737908-3-quic_kriskura@quicinc.com [bjorn: Fixed subject] Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615-ride.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 4b2769c7d7ce47a64f874eac92b324f3561339ab Author: Krishna Kurapati <quic_kriskura@quicinc.com> Date: Thu Nov 21 12:00:06 2024 +0530 arm64: dts: qcom: qcs615: Add primary USB interface Add support for primary USB controller and its PHYs on QCS615. Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241121063007.2737908-2-quic_kriskura@quicinc.com [bjorn: Fixed subject] Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615.dtsi | 110 +++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) commit f6746dc9e379eaaf832f326b233f94a95ae03027 Author: Viken Dadhaniya <quic_vdadhani@quicinc.com> Date: Fri Nov 15 15:45:01 2024 +0530 arm64: dts: qcom: qcs615: Add QUPv3 configuration Add DT support for QUPv3 Serial Engines. Co-developed-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com> Signed-off-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com> Signed-off-by: Viken Dadhaniya <quic_vdadhani@quicinc.com> Link: https://lore.kernel.org/r/20241115101501.1995843-1-quic_vdadhani@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615.dtsi | 627 ++++++++++++++++++++++++++++++++++- 1 file changed, 623 insertions(+), 4 deletions(-) commit bf469630552a3950d0370dd5fd1f9bf0145d09d5 Author: Jie Gan <quic_jiegan@quicinc.com> Date: Wed Nov 6 17:45:09 2024 +0800 arm64: dts: qcom: qcs615: Add coresight nodes Add following coresight components on QCS615, EUD, TMC/ETF, TPDM, dynamic Funnel, TPDA, Replicator and ETM. Signed-off-by: Jie Gan <quic_jiegan@quicinc.com> Link: https://lore.kernel.org/r/20241106094510.2654998-1-quic_jiegan@quicinc.com [bjorn: Fix patch subject] Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615.dtsi | 1633 ++++++++++++++++++++++++++++++++++ 1 file changed, 1633 insertions(+) commit 58241be90050e53b7148a43dafa94c999867cbb7 Author: Qingqing Zhou <quic_qqzhou@quicinc.com> Date: Tue Nov 5 08:51:07 2024 +0530 arm64: dts: qcom: qcs615: add the APPS SMMU node Add the APPS SMMU node for QCS615 platform. Add the dma-ranges to limit DMA address range to 36bit width to align with system architecture. Signed-off-by: Qingqing Zhou <quic_qqzhou@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241105032107.9552-4-quic_qqzhou@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615.dtsi | 75 ++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit 8c7f9d73de1bdb72d114aab053c8f7e3e9b32176 Author: Qingqing Zhou <quic_qqzhou@quicinc.com> Date: Tue Nov 5 08:51:06 2024 +0530 arm64: dts: qcom: qcs615: add the SCM node Add the SCM node for QCS615 platform. It is an interface to communicate to the secure firmware. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Qingqing Zhou <quic_qqzhou@quicinc.com> Link: https://lore.kernel.org/r/20241105032107.9552-3-quic_qqzhou@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 29af58ab4d17f5085a9f10b27edc7f1421894c5a Author: Song Xue <quic_songxue@quicinc.com> Date: Thu Oct 31 18:49:02 2024 +0800 arm64: dts: qcom: qcs615: Add LLCC support for QCS615 The QCS615 platform has LLCC(Last Level Cache Controller) as the system cache controller. It includes 1 LLCC instance and 1 LLCC broadcast interface. Add LLCC node support for the QCS615 platform. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Song Xue <quic_songxue@quicinc.com> Link: https://lore.kernel.org/r/20241031-add_llcc_dts_node_for_qcs615-v2-1-205766a607ca@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0775021783b5536e390d1602d054542a29875593 Author: Kyle Deng <quic_chunkaid@quicinc.com> Date: Fri Oct 18 15:34:17 2024 +0800 arm64: dts: qcom: qcs615: add AOSS_QMP node Add the Always-On Subsystem Qualcomm Message Protocol(AOSS_QMP) node for QCS615 SoC. The AOSS_QMP enables the system to send and receive messages on the SoC and uses the same hardware version as sdm845. Signed-off-by: Kyle Deng <quic_chunkaid@quicinc.com> Link: https://lore.kernel.org/r/20241018073417.2338864-4-quic_chunkaid@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit d1fdad9911e269998e63c60fdeb7ffb378785387 Author: Lijuan Gao <quic_lijuang@quicinc.com> Date: Mon Nov 4 17:10:11 2024 +0800 arm64: dts: qcom: qcs615: add base RIDE board Add initial support for Qualcomm QCS615 RIDE board and enable the QCS615 RIDE board to shell with uart console. Written with help from Tingguo Cheng (added regulator nodes). Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241104-add_initial_support_for_qcs615-v5-4-9dde8d7b80b0@quicinc.com [bjorn: Fix subject] Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/qcs615-ride.dts | 219 +++++++++++++++++++++++++++++++ 2 files changed, 220 insertions(+) commit 9eec6ce36b5dc981327e9f58025d012e524687b4 Author: Lijuan Gao <quic_lijuang@quicinc.com> Date: Mon Nov 4 17:10:12 2024 +0800 arm64: defconfig: enable clock controller, interconnect and pinctrl for QCS615 Enable clock controller, interconnect and pinctrl for Qualcomm QCS615 platform to boot to UART console. The serial engine depends on GCC, interconnect, and pinctrl. It is necessary to build them as built-in modules because the debug console must be registered before userspace is launched. The primary reason for this is that, for example, systemd opens /dev/console at launch (i.e., when the init process starts). Therefore, if we register the console after this, we will not receive console output from systemd. Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241104-add_initial_support_for_qcs615-v5-5-9dde8d7b80b0@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 8e266654a2fe8241b7ba05484ce7425efb4ee3ef Author: Lijuan Gao <quic_lijuang@quicinc.com> Date: Mon Nov 4 17:10:10 2024 +0800 arm64: dts: qcom: add QCS615 platform Add initial DTSI for QCS615 SoC. Features added in this revision: - CPUs with PSCI idle states - Interrupt-controller with PDC wakeup support - Timers, TCSR Clock Controllers - Reserved Shared memory - QFPROM - TLMM - Watchdog - RPMH controller - Sleep stats driver - Rpmhpd power controller - Interconnect - GCC and Rpmhcc - QUP with Uart serial support Written with help from Tingguo Cheng (added rpmhpd power controller nodes) Taniya Das (added clocks nodes), and Raviteja Laggyshetty (added interconnect nodes). Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com> Link: https://lore.kernel.org/r/20241104-add_initial_support_for_qcs615-v5-3-9dde8d7b80b0@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/qcs615.dtsi | 688 +++++++++++++++++++++++++++++++++++ 1 file changed, 688 insertions(+) commit 67b8e9473e0bd32097a48fe4ddc39f882fa67a8d Author: Lijuan Gao <quic_lijuang@quicinc.com> Date: Mon Nov 4 17:10:08 2024 +0800 dt-bindings: arm: qcom: document QCS615 and the reference board Document the QCS615 SoC and its reference board QCS615 RIDE. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com> Link: https://lore.kernel.org/r/20241104-add_initial_support_for_qcs615-v5-1-9dde8d7b80b0@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 3c9dd09147776a25e8e3284b094c1b39f6d43cbf Merge: b16ee3d0cda4 f4d3d7340e71 Author: Bjorn Andersson <andersson@kernel.org> Date: Sun Dec 1 22:05:50 2024 -0600 Merge branch '20241022-qcs615-clock-driver-v4-0-3d716ad0d987@quicinc.com' into HEAD Merge QCS615 global clock controller binding from clock topic branch to get access to clock constants. commit a751a65e8ca5011791df14106889a903ccae51f8 Merge: 40384c840ea1 f4d3d7340e71 Author: Bjorn Andersson <andersson@kernel.org> Date: Sun Dec 1 22:04:46 2024 -0600 Merge branch '20241022-qcs615-clock-driver-v4-0-3d716ad0d987@quicinc.com' into clk-for-6.14 Merge QCS615 global clock controller binding through topic branch to allow constant to be merged into DeviceTree branch as well. commit f4d3d7340e719dd3d2c23ce8d6c360e2f93ba7e4 Author: Taniya Das <quic_tdas@quicinc.com> Date: Tue Oct 22 17:22:52 2024 +0530 dt-bindings: clock: qcom: Add QCS615 GCC clocks Add device tree bindings for global clock controller on QCS615 SoCs. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Link: https://lore.kernel.org/r/20241022-qcs615-clock-driver-v4-3-3d716ad0d987@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../devicetree/bindings/clock/qcom,qcs615-gcc.yaml | 59 ++++++ include/dt-bindings/clock/qcom,qcs615-gcc.h | 211 +++++++++++++++++++++ 2 files changed, 270 insertions(+) commit b16ee3d0cda492ded61f7224334e33eed986bd33 Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Fri Nov 29 18:20:27 2024 +0100 arm64: dts: qcom: x1e80100-romulus: Set up PS8830s The Laptop 7 features two USB-C ports, each one sporting a PS8830 USB-C retimer/mux. Wire them up. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241129-topic-sl7_feat2-v2-3-fb6cf5660cfc@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 282 ++++++++++++++++++++- 1 file changed, 276 insertions(+), 6 deletions(-) commit 42034d232cac5402a28d04122a398c311ae532d6 Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Fri Nov 29 18:20:26 2024 +0100 arm64: dts: qcom: x1e80100-romulus: Set up PCIe3 / SDCard reader The Surface Laptops have a Realtek RTS5261 SD Card reader connected over a Gen1x1 link to the PCIe3 host. Set up the necessary bits to make it functional. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241129-topic-sl7_feat2-v2-2-fb6cf5660cfc@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit c1cd827bfbd766bf6ada5d0184486aaa6afd315c Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Date: Fri Nov 29 18:20:25 2024 +0100 arm64: dts: qcom: x1e80100-romulus: Configure audio The Laptop 7 features a single pair of speakers and an equal amount of digital mics. Add the required nodes to support audio playback and recording. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241129-topic-sl7_feat2-v2-1-fb6cf5660cfc@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 187 +++++++++++++++++++++ 1 file changed, 187 insertions(+) commit f265d7721c014fa453957988c1ac5955a9b94ce3 Merge: 40384c840ea1 64d2571a3751 Author: Bjorn Andersson <andersson@kernel.org> Date: Sun Dec 1 21:06:21 2024 -0600 Merge branch 'arm64-for-6.13' into arm64-for-6.14 Merge the arm64-for-6.13 branch into arm64-for-6.14, to carry forward the commits that were picked up late in the cycle but didn't make it into a pull request. commit c14e85360969d7b0aaeab3915314787f3466c326 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:20:53 2024 -0800 lib/crc16_kunit: delete obsolete crc16_kunit.c This new test showed up in v6.13-rc1. Delete it since it is being superseded by crc_kunit.c, which is more comprehensive (tests multiple CRC variants without duplicating code, includes a benchmark, etc.). Cc: Vinicius Peixoto <vpeixoto@lkcamp.dev> Link: https://lore.kernel.org/r/20241202012056.209768-10-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> lib/Kconfig.debug | 9 ---- lib/Makefile | 1 - lib/crc16_kunit.c | 155 ------------------------------------------------------ 3 files changed, 165 deletions(-) commit e47d9b1a76ed78d0d50491f6a7d8ef59e379f45c Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:20:52 2024 -0800 lib/crc_kunit.c: add KUnit test suite for CRC library functions Add a KUnit test suite for the crc16, crc_t10dif, crc32_le, crc32_be, crc32c, and crc64_be library functions. It avoids code duplication by sharing most logic among all CRC variants. The test suite includes: - Differential fuzz test of each CRC function against a simple bit-at-a-time reference implementation. - Test for CRC combination, when implemented by a CRC variant. - Optional benchmark of each CRC function with various data lengths. This is intended as a replacement for crc32test and crc16_kunit, as well as a new test for CRC variants which didn't previously have a test. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Cc: Vinicius Peixoto <vpeixoto@lkcamp.dev> Link: https://lore.kernel.org/r/20241202012056.209768-9-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> lib/Kconfig.debug | 20 +++ lib/Makefile | 1 + lib/crc_kunit.c | 435 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 456 insertions(+) commit 7439cfed1c41e5a1f3d095d3a4ffecdb13b279c4 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:20:51 2024 -0800 powerpc/crc-t10dif: expose CRC-T10DIF function through lib Move the powerpc CRC-T10DIF assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the arch-specific "shash" code becomes unnecessary and is removed. Note: to see the diff from arch/powerpc/crypto/crct10dif-vpmsum_glue.c to arch/powerpc/lib/crc-t10dif-glue.c, view this commit with 'git show -M10'. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20241202012056.209768-8-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/powerpc/Kconfig | 1 + arch/powerpc/configs/powernv_defconfig | 1 - arch/powerpc/configs/ppc64_defconfig | 1 - arch/powerpc/crypto/Kconfig | 15 +---- arch/powerpc/crypto/Makefile | 2 - arch/powerpc/lib/Makefile | 3 + .../crc-t10dif-glue.c} | 69 +++++----------------- .../powerpc/{crypto => lib}/crct10dif-vpmsum_asm.S | 2 +- 8 files changed, 23 insertions(+), 71 deletions(-) commit 2051da858534a73589cdb27af914fe1c03b9ee98 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:20:50 2024 -0800 arm64/crc-t10dif: expose CRC-T10DIF function through lib Move the arm64 CRC-T10DIF assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the arch-specific "shash" code becomes unnecessary and is removed. Note: to see the diff from arch/arm64/crypto/crct10dif-ce-glue.c to arch/arm64/lib/crc-t10dif-glue.c, view this commit with 'git show -M10'. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20241202012056.209768-7-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/arm64/Kconfig | 1 + arch/arm64/configs/defconfig | 1 - arch/arm64/crypto/Kconfig | 10 -- arch/arm64/crypto/Makefile | 3 - arch/arm64/crypto/crct10dif-ce-glue.c | 132 --------------------- arch/arm64/lib/Makefile | 3 + .../crct10dif-ce-core.S => lib/crc-t10dif-core.S} | 0 arch/arm64/lib/crc-t10dif-glue.c | 81 +++++++++++++ tools/testing/selftests/arm64/fp/kernel-test.c | 3 +- 9 files changed, 86 insertions(+), 148 deletions(-) commit 1684e8293605062dee45a5e4118fe8db6cd0d9d9 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:20:49 2024 -0800 arm/crc-t10dif: expose CRC-T10DIF function through lib Move the arm CRC-T10DIF assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the arch-specific "shash" code becomes unnecessary and is removed. Note: to see the diff from arch/arm/crypto/crct10dif-ce-glue.c to arch/arm/lib/crc-t10dif-glue.c, view this commit with 'git show -M10'. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20241202012056.209768-6-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/arm/Kconfig | 1 + arch/arm/crypto/Kconfig | 11 -- arch/arm/crypto/Makefile | 2 - arch/arm/crypto/crct10dif-ce-glue.c | 124 --------------------- arch/arm/lib/Makefile | 3 + .../crct10dif-ce-core.S => lib/crc-t10dif-core.S} | 0 arch/arm/lib/crc-t10dif-glue.c | 80 +++++++++++++ 7 files changed, 84 insertions(+), 137 deletions(-) commit ed4bc981d52b49c5d35bfc4cacdac98ff135add3 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:20:48 2024 -0800 x86/crc-t10dif: expose CRC-T10DIF function through lib Move the x86 CRC-T10DIF assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the arch-specific "shash" code becomes unnecessary and is removed. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20241202012056.209768-5-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/x86/Kconfig | 1 + arch/x86/crypto/Kconfig | 10 -- arch/x86/crypto/Makefile | 3 - arch/x86/crypto/crct10dif-pclmul_glue.c | 143 ------------------------ arch/x86/lib/Makefile | 3 + arch/x86/lib/crc-t10dif-glue.c | 51 +++++++++ arch/x86/{crypto => lib}/crct10dif-pcl-asm_64.S | 0 7 files changed, 55 insertions(+), 156 deletions(-) commit 21dda37f3f8b70dd3531bf388773f1b4c803a130 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:20:47 2024 -0800 crypto: crct10dif - expose arch-optimized lib function Now that crc_t10dif_update() may be directly optimized for each architecture, make the shash driver for crct10dif register a crct10dif-$arch algorithm that uses it, instead of only crct10dif-generic which uses crc_t10dif_generic(). The result is that architecture-optimized crct10dif will remain available through the shash API once the architectures implement crc_t10dif_arch() instead of the shash API. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20241202012056.209768-4-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> crypto/Makefile | 1 + crypto/crct10dif_generic.c | 82 ++++++++++++++++++++++++++++++++++++---------- 2 files changed, 65 insertions(+), 18 deletions(-) commit 0961c3bcefa64d5f0999e2b703391862c733bb52 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:20:46 2024 -0800 lib/crc-t10dif: add support for arch overrides Following what was done for CRC32, add support for architecture-specific override of the CRC-T10DIF library. This will allow the CRC-T10DIF library functions to access architecture-optimized code directly. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20241202012056.209768-3-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> include/linux/crc-t10dif.h | 12 ++++++++++++ lib/Kconfig | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) commit be3c45b070cba3be4dd248b38d4798e3e2859451 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:20:45 2024 -0800 lib/crc-t10dif: stop wrapping the crypto API In preparation for making the CRC-T10DIF library directly optimized for each architecture, like what has been done for CRC32, get rid of the weird layering where crc_t10dif_update() calls into the crypto API. Instead, move crc_t10dif_generic() into the crc-t10dif library module, and make crc_t10dif_update() just call crc_t10dif_generic(). Acceleration will be reintroduced via crc_t10dif_arch() in the following patches. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20241202012056.209768-2-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> crypto/Kconfig | 1 + crypto/Makefile | 2 +- crypto/crct10dif_common.c | 82 ------------------------ include/linux/crc-t10dif.h | 16 +++-- lib/Kconfig | 2 - lib/crc-t10dif.c | 156 +++++++++++++-------------------------------- 6 files changed, 58 insertions(+), 201 deletions(-) commit 31e4cdde4d8b4bc358f3e6b44647ead3cba13aba Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:44 2024 -0800 scsi: target: iscsi: 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. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20241202010844.144356-20-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> drivers/target/iscsi/Kconfig | 3 +- drivers/target/iscsi/iscsi_target.c | 153 +++++++++--------------------- drivers/target/iscsi/iscsi_target_login.c | 50 ---------- drivers/target/iscsi/iscsi_target_login.h | 1 - drivers/target/iscsi/iscsi_target_nego.c | 21 +--- include/target/iscsi/iscsi_target_core.h | 3 - 6 files changed, 49 insertions(+), 182 deletions(-) commit 3ca4bec40ee211cd5d907c8e98b66c92f6a1b1e1 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:43 2024 -0800 f2fs: switch to using the crc32 library Now that the crc32() library function takes advantage of architecture-specific optimizations, it is unnecessary to go through the crypto API. Just use crc32(). This is much simpler, and it improves performance due to eliminating the crypto API overhead. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Chao Yu <chao@kernel.org> Link: https://lore.kernel.org/r/20241202010844.144356-19-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> fs/f2fs/Kconfig | 3 +-- fs/f2fs/f2fs.h | 20 +------------------- fs/f2fs/super.c | 15 --------------- 3 files changed, 2 insertions(+), 36 deletions(-) commit dd348f054b24a3f57cbcdc2c8e7ebc22c62eb72f Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:42 2024 -0800 jbd2: 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. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Acked-by: Theodore Ts'o <tytso@mit.edu> Link: https://lore.kernel.org/r/20241202010844.144356-18-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> fs/jbd2/Kconfig | 2 -- fs/jbd2/journal.c | 30 +++--------------------------- include/linux/jbd2.h | 33 +++------------------------------ 3 files changed, 6 insertions(+), 59 deletions(-) commit f2b4fa19647e18a2e2aade7e3e4620567e7e594a Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:41 2024 -0800 ext4: 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. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Acked-by: Theodore Ts'o <tytso@mit.edu> Link: https://lore.kernel.org/r/20241202010844.144356-17-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> fs/ext4/Kconfig | 3 +-- fs/ext4/ext4.h | 25 +++---------------------- fs/ext4/super.c | 15 --------------- 3 files changed, 4 insertions(+), 39 deletions(-) commit 38a9a5121c3bcf2ed857430a92e493568b247c35 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:40 2024 -0800 lib/crc32: make crc32c() go directly to lib Now that the lower level __crc32c_le() library function is optimized for each architecture, make crc32c() just call that instead of taking an inefficient and error-prone detour through the shash API. Note: a future cleanup should make crc32c_le() be the actual library function instead of __crc32c_le(). That will require updating callers of __crc32c_le() to use crc32c_le() instead, and updating callers of crc32c_le() that expect a 'const void *' arg to expect 'const u8 *' instead. Similarly, a future cleanup should remove LIBCRC32C by making everyone who is selecting it just select CRC32 directly instead. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20241202010844.144356-16-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> include/linux/crc32c.h | 7 +++-- lib/Kconfig | 10 ++----- lib/Makefile | 1 - lib/libcrc32c.c | 74 -------------------------------------------------- 4 files changed, 8 insertions(+), 84 deletions(-) commit cc354fa7f0160a96896a3b8d7f298a036e3b8602 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:39 2024 -0800 bcachefs: Explicitly select CRYPTO from BCACHEFS_FS Explicitly select CRYPTO from BCACHEFS_FS, so that this dependency of CRYPTO_SHA256, CRYPTO_CHACHA20, and CRYPTO_POLY1305 (which are also selected) is satisfied. Currently this dependency is satisfied indirectly via LIBCRC32C, but this is fragile and is planned to change (https://lore.kernel.org/r/20241021002935.325878-13-ebiggers@kernel.org). Acked-by: Kent Overstreet <kent.overstreet@linux.dev> Link: https://lore.kernel.org/r/20241202010844.144356-15-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> fs/bcachefs/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 55d1ecceb8d6a5c9ceff7c6528075bd0ce4e8366 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:38 2024 -0800 x86/crc32: expose CRC32 functions through lib Move the x86 CRC32 assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the arch-specific "shash" code becomes unnecessary and is removed. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20241202010844.144356-14-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/x86/Kconfig | 1 + arch/x86/crypto/Kconfig | 22 -- arch/x86/crypto/Makefile | 7 - arch/x86/crypto/crc32-pclmul_glue.c | 202 ----------------- arch/x86/crypto/crc32c-intel_glue.c | 249 --------------------- arch/x86/lib/Makefile | 4 + arch/x86/lib/crc32-glue.c | 124 ++++++++++ .../crc32-pclmul_asm.S => lib/crc32-pclmul.S} | 0 .../crc32c-3way.S} | 0 drivers/target/iscsi/Kconfig | 1 - 10 files changed, 129 insertions(+), 481 deletions(-) commit 1e6b72e60a5a16ddda9c0669da7538f497838d0a Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:37 2024 -0800 x86/crc32: update prototype for crc32_pclmul_le_16() - Change the len parameter from unsigned int to size_t, so that the library function which takes a size_t can safely use this code. - Move the crc parameter to the front, as this is the usual convention. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20241202010844.144356-13-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/x86/crypto/crc32-pclmul_asm.S | 19 +++++++++---------- arch/x86/crypto/crc32-pclmul_glue.c | 4 ++-- 2 files changed, 11 insertions(+), 12 deletions(-) commit 64e3586c0b61ec4800e820ff04f4c3360edbccd6 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:36 2024 -0800 x86/crc32: update prototype for crc_pcl() - Change the len parameter from unsigned int to size_t, so that the library function which takes a size_t can safely use this code. - Rename to crc32c_x86_3way() which is much clearer. - Move the crc parameter to the front, as this is the usual convention. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20241202010844.144356-12-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/x86/crypto/crc32c-intel_glue.c | 7 ++-- arch/x86/crypto/crc32c-pcl-intel-asm_64.S | 63 ++++++++++++++++--------------- 2 files changed, 35 insertions(+), 35 deletions(-) commit 0f60a8ace577f7629244ecf7c95105d4b704a462 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:35 2024 -0800 sparc/crc32: expose CRC32 functions through lib Move the sparc CRC32C assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the arch-specific "shash" code becomes unnecessary and is removed. Note: to see the diff from arch/sparc/crypto/crc32c_glue.c to arch/sparc/lib/crc32_glue.c, view this commit with 'git show -M10'. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20241202010844.144356-11-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/sparc/Kconfig | 1 + arch/sparc/crypto/Kconfig | 10 -- arch/sparc/crypto/Makefile | 4 - arch/sparc/crypto/crc32c_glue.c | 184 -------------------------------- arch/sparc/lib/Makefile | 2 + arch/sparc/lib/crc32_glue.c | 93 ++++++++++++++++ arch/sparc/{crypto => lib}/crc32c_asm.S | 2 +- 7 files changed, 97 insertions(+), 199 deletions(-) commit 008071917dfccffe6637d264e255553af15c99f9 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:34 2024 -0800 s390/crc32: expose CRC32 functions through lib Move the s390 CRC32 assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the arch-specific "shash" code becomes unnecessary and is removed. Note: to see the diff from arch/s390/crypto/crc32-vx.c to arch/s390/lib/crc32-glue.c, view this commit with 'git show -M10'. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20241202010844.144356-10-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/s390/Kconfig | 1 + arch/s390/configs/debug_defconfig | 1 - arch/s390/configs/defconfig | 1 - arch/s390/crypto/Kconfig | 12 -- arch/s390/crypto/Makefile | 2 - arch/s390/crypto/crc32-vx.c | 306 --------------------------------- arch/s390/lib/Makefile | 3 + arch/s390/lib/crc32-glue.c | 92 ++++++++++ arch/s390/{crypto => lib}/crc32-vx.h | 0 arch/s390/{crypto => lib}/crc32be-vx.c | 0 arch/s390/{crypto => lib}/crc32le-vx.c | 0 11 files changed, 96 insertions(+), 322 deletions(-) commit 372ff60ac4dd72bbd0a0358d5e21f51e62dc5c6f Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:33 2024 -0800 powerpc/crc32: expose CRC32 functions through lib Move the powerpc CRC32C assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the arch-specific "shash" code becomes unnecessary and is removed. Note: to see the diff from arch/powerpc/crypto/crc32c-vpmsum_glue.c to arch/powerpc/lib/crc32-glue.c, view this commit with 'git show -M10'. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20241202010844.144356-9-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/powerpc/Kconfig | 1 + arch/powerpc/configs/powernv_defconfig | 1 - arch/powerpc/configs/ppc64_defconfig | 1 - arch/powerpc/crypto/Kconfig | 15 +- arch/powerpc/crypto/Makefile | 2 - arch/powerpc/crypto/crc32c-vpmsum_glue.c | 173 ----------------------- arch/powerpc/crypto/crct10dif-vpmsum_asm.S | 2 +- arch/powerpc/lib/Makefile | 3 + arch/powerpc/lib/crc32-glue.c | 92 ++++++++++++ arch/powerpc/{crypto => lib}/crc32-vpmsum_core.S | 0 arch/powerpc/{crypto => lib}/crc32c-vpmsum_asm.S | 0 11 files changed, 98 insertions(+), 192 deletions(-) commit 289c270eab5e620c8fe29f72887d4e0bfde1a581 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:32 2024 -0800 mips/crc32: expose CRC32 functions through lib Move the mips CRC32 assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the arch-specific "shash" code becomes unnecessary and is removed. Note: to see the diff from arch/mips/crypto/crc32-mips.c to arch/mips/lib/crc32-mips.c, view this commit with 'git show -M10'. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20241202010844.144356-8-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/mips/Kconfig | 5 +- arch/mips/configs/eyeq5_defconfig | 1 - arch/mips/configs/eyeq6_defconfig | 1 - arch/mips/configs/generic/32r6.config | 2 - arch/mips/configs/generic/64r6.config | 1 - arch/mips/crypto/Kconfig | 9 - arch/mips/crypto/Makefile | 2 - arch/mips/crypto/crc32-mips.c | 354 ---------------------------------- arch/mips/lib/Makefile | 2 + arch/mips/lib/crc32-mips.c | 192 ++++++++++++++++++ 10 files changed, 195 insertions(+), 374 deletions(-) commit 72f51a4f4b076d2ea2751432dee07600aea4c4c4 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:31 2024 -0800 loongarch/crc32: expose CRC32 functions through lib Move the loongarch CRC32 assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the arch-specific "shash" code becomes unnecessary and is removed. Note: to see the diff from arch/loongarch/crypto/crc32-loongarch.c to arch/loongarch/lib/crc32-loongarch.c, view this commit with 'git show -M10'. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: WangYuli <wangyuli@uniontech.com> Link: https://lore.kernel.org/r/20241202010844.144356-7-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/loongarch/Kconfig | 1 + arch/loongarch/configs/loongson3_defconfig | 1 - arch/loongarch/crypto/Kconfig | 9 - arch/loongarch/crypto/Makefile | 2 - arch/loongarch/crypto/crc32-loongarch.c | 300 ----------------------------- arch/loongarch/lib/Makefile | 2 + arch/loongarch/lib/crc32-loongarch.c | 135 +++++++++++++ 7 files changed, 138 insertions(+), 312 deletions(-) commit 1e1b6dbc3d9c152df818f3e560f96839a901ebce Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:30 2024 -0800 arm/crc32: expose CRC32 functions through lib Move the arm CRC32 assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the arch-specific "shash" code becomes unnecessary and is removed. Note: to see the diff from arch/arm/crypto/crc32-ce-glue.c to arch/arm/lib/crc32-glue.c, view this commit with 'git show -M10'. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20241202010844.144356-6-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/arm/Kconfig | 1 + arch/arm/configs/milbeaut_m10v_defconfig | 1 - arch/arm/configs/multi_v7_defconfig | 1 - arch/arm/crypto/Kconfig | 14 -- arch/arm/crypto/Makefile | 2 - arch/arm/crypto/crc32-ce-glue.c | 247 --------------------- arch/arm/lib/Makefile | 3 + .../{crypto/crc32-ce-core.S => lib/crc32-core.S} | 5 +- arch/arm/lib/crc32-glue.c | 123 ++++++++++ 9 files changed, 129 insertions(+), 268 deletions(-) commit 780acb2543eaf163169f8c6d6fe52e7f94a7b0d4 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:29 2024 -0800 crypto: crc32 - don't unnecessarily register arch algorithms Instead of registering the crc32-$arch and crc32c-$arch algorithms if the arch-specific code was built, only register them when that code was built *and* is not falling back to the base implementation at runtime. This avoids confusing users like btrfs which checks the shash driver name to determine whether it is crc32c-generic. (It would also make sense to change btrfs to test the crc32_optimization flags itself, so that it doesn't have to use the weird hack of parsing the driver name. This change still makes sense either way though.) Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20241202010844.144356-5-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> crypto/crc32_generic.c | 8 ++++++-- crypto/crc32c_generic.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) commit b5ae12e0ee099e4c458f7814f0317f4e2cbf105e Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:28 2024 -0800 lib/crc32: expose whether the lib is really optimized at runtime Make the CRC32 library export a function crc32_optimizations() which returns flags that indicate which CRC32 functions are actually executing optimized code at runtime. This will be used to determine whether the crc32[c]-$arch shash algorithms should be registered in the crypto API. btrfs could also start using these flags instead of the hack that it currently uses where it parses the crypto_shash_driver_name. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20241202010844.144356-4-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/arm64/lib/crc32-glue.c | 10 ++++++++++ arch/riscv/lib/crc32-riscv.c | 10 ++++++++++ include/linux/crc32.h | 15 +++++++++++++++ 3 files changed, 35 insertions(+) commit d36cebe03c3ae4ea1fde20cfc797fab8729c3ab5 Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:27 2024 -0800 lib/crc32: improve support for arch-specific overrides Currently the CRC32 library functions are defined as weak symbols, and the arm64 and riscv architectures override them. This method of arch-specific overrides has the limitation that it only works when both the base and arch code is built-in. Also, it makes the arch-specific code be silently not used if it is accidentally built with lib-y instead of obj-y; unfortunately the RISC-V code does this. This commit reorganizes the code to have explicit *_arch() functions that are called when they are enabled, similar to how some of the crypto library code works (e.g. chacha_crypt() calls chacha_crypt_arch()). Make the existing kconfig choice for the CRC32 implementation also control whether the arch-optimized implementation (if one is available) is enabled or not. Make it enabled by default if CRC32 is also enabled. The result is that arch-optimized CRC32 library functions will be included automatically when appropriate, but it is now possible to disable them. They can also now be built as a loadable module if the CRC32 library functions happen to be used only by loadable modules, in which case the arch and base CRC32 modules will be automatically loaded via direct symbol dependency when appropriate. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20241202010844.144356-3-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/arm64/Kconfig | 1 + arch/arm64/lib/Makefile | 3 +- arch/arm64/lib/crc32-glue.c | 13 ++++-- arch/riscv/Kconfig | 1 + arch/riscv/lib/Makefile | 3 +- arch/riscv/lib/{crc32.c => crc32-riscv.c} | 13 ++++-- crypto/crc32_generic.c | 4 +- crypto/crc32c_generic.c | 4 +- include/linux/crc32.h | 35 ++++++++++++---- lib/Kconfig | 70 ++++++++++++++++++++++++------- lib/crc32.c | 22 ++++------ 11 files changed, 118 insertions(+), 51 deletions(-) commit 0a499a7e9819e7a0980408f18df68160a0b55f2e Author: Eric Biggers <ebiggers@google.com> Date: Sun Dec 1 17:08:26 2024 -0800 lib/crc32: drop leading underscores from __crc32c_le_base Remove the leading underscores from __crc32c_le_base(). This is in preparation for adding crc32c_le_arch() and eventually renaming __crc32c_le() to crc32c_le(). Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20241202010844.144356-2-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> arch/arm64/lib/crc32-glue.c | 2 +- arch/riscv/lib/crc32.c | 2 +- crypto/crc32c_generic.c | 8 ++++---- include/linux/crc32.h | 2 +- lib/crc32.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) commit e39531352aed30156b270a61ba075e5b8d3b8498 Author: Jon Lin <jon.lin@rock-chips.com> Date: Wed Nov 20 09:22:08 2024 +0800 spi: rockchip-sfc: Support ACPI Compatible with ACPI. Signed-off-by: Jon Lin <jon.lin@rock-chips.com> Link: https://patch.msgid.link/20241120012208.1193034-1-jon.lin@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-rockchip-sfc.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 2c55f67c3a71cf57665294a02f258625c1da9385 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Thu Nov 14 22:50:51 2024 +0200 spi: sc18is602: Switch to generic firmware properties and drop of_match_ptr() This enables using the driver with other firmware types such as ACPI via PRP0001. Also part of a general attempt to move drivers over to generic properties to avoid opportunities for cut and paste. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241114205051.3747458-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-sc18is602.c | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) commit 096c34ddf5835f02f5260719cd8a16fcf5e5e56f Author: Fabio Estevam <festevam@denx.de> Date: Wed Oct 23 09:00:14 2024 -0300 spi: spidev: Add an entry for lwn,bk4-spi Currently, the compatible string used for Liebherr's BK4 external SPI controller device is "lwn,bk4", which is the same as the board compatible string documented at fsl.yaml. This causes several dt-schema warnings: make dtbs_check DT_SCHEMA_FILES=fsl.yaml ... ['lwn,bk4'] is too short 'lwn,bk4' is not one of ['tq,imx8dxp-tqma8xdp-mba8xx'] 'lwn,bk4' is not one of ['tq,imx8qxp-tqma8xqp-mba8xx'] 'lwn,bk4' is not one of ['armadeus,imx1-apf9328', 'fsl,imx1ads'] ... Add a more specific "lwn,bk4-spi" compatible string entry for this device to fix the problem. The original "lwn,bk4" is kept to keep compatibility with old DTBs. Signed-off-by: Fabio Estevam <festevam@denx.de> Link: https://patch.msgid.link/20241023120015.1049008-2-festevam@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spidev.c | 2 ++ 1 file changed, 2 insertions(+) commit 36e7886075262429158aec6f258e6a5a92f025b1 Author: Fabio Estevam <festevam@denx.de> Date: Wed Oct 23 09:00:13 2024 -0300 dt-bindings: misc: lwn,bk4-spi: Add binding Add a lwn,bk4-spi.yaml binding for Liebherr's BK4 external SPI controller. Currently, the compatible string used for this device is "lwn,bk4", which is the same as the board compatible string documented at fsl.yaml. This causes several dt-schema warnings: make dtbs_check DT_SCHEMA_FILES=fsl.yaml ... ['lwn,bk4'] is too short 'lwn,bk4' is not one of ['tq,imx8dxp-tqma8xdp-mba8xx'] 'lwn,bk4' is not one of ['tq,imx8qxp-tqma8xqp-mba8xx'] 'lwn,bk4' is not one of ['armadeus,imx1-apf9328', 'fsl,imx1ads'] ... Use a more specific "lwn,bk4-spi" compatible string for this device. Signed-off-by: Fabio Estevam <festevam@denx.de> Link: https://patch.msgid.link/20241023120015.1049008-1-festevam@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> .../devicetree/bindings/misc/lwn,bk4-spi.yaml | 54 ++++++++++++++++++++++ Documentation/devicetree/bindings/misc/lwn-bk4.txt | 26 ----------- 2 files changed, 54 insertions(+), 26 deletions(-) commit 707080d4fea8f6b8319ceead569f34c2be5bf1d5 Author: Srikanth Boyapally <srikanth.boyapally@amd.com> Date: Wed Nov 20 17:39:49 2024 +0530 spi: dt-bindings: cdns,qspi-nor: Add compatible string to support OSPI controller on Versal Gen2 platform Add compatible string to support OSPI controller device reset IP feature on Versal Gen2 platform. Signed-off-by: Srikanth Boyapally <srikanth.boyapally@amd.com> Link: https://patch.msgid.link/20241120120951.56327-2-srikanth.boyapally@amd.com Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org> Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml | 1 + 1 file changed, 1 insertion(+) commit 27cf57f65bea55d985f0ad0dc1737ce1d01f05dc Author: Srikanth Boyapally <srikanth.boyapally@amd.com> Date: Wed Nov 20 17:39:51 2024 +0530 spi: cadence-quadspi: Support for device reset via OSPI controller Add support for flash device reset via ospi controller, instead of using GPIO, as ospi IP has device reset feature on Versal Gen2 platform. Signed-off-by: Srikanth Boyapally <srikanth.boyapally@amd.com> Link: https://patch.msgid.link/20241120120951.56327-4-srikanth.boyapally@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-cadence-quadspi.c | 40 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) commit 2e4d9f5111a3b3c24550e34710efa690c03b3ea1 Author: Srikanth Boyapally <srikanth.boyapally@amd.com> Date: Wed Nov 20 17:39:50 2024 +0530 spi: cadence-quadspi: Use quirks to set dma_set_mask instead of compatible string for 64-bit DMA support Remove device compatible property check and instead use quirks to program DMA addressing. Signed-off-by: Srikanth Boyapally <srikanth.boyapally@amd.com> Link: https://patch.msgid.link/20241120120951.56327-3-srikanth.boyapally@amd.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-cadence-quadspi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a8d77166fcfe1cd4be70c21d65ff2b27b4f54a26 Author: Matti Vaittinen <mazziesaccount@gmail.com> Date: Thu Nov 14 09:19:59 2024 +0200 regulator: bd96801: Add ERRB IRQ The ROHM BD96801 "scalable PMIC" provides two physical IRQs. The ERRB handling can in many cases be omitted because it is used to inform fatal IRQs, which usually kill the power from the SOC. There may however be use-cases where the SOC has a 'back-up' emergency power source which allows some very short time of operation to try to gracefully shut down sensitive hardware. Furthermore, it is possible the processor controlling the PMIC is not powered by the PMIC. In such cases handling the ERRB IRQs may be beneficial. Add support for ERRB IRQs. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/ZzWkny4lKpY09SX5@mva-rohm Signed-off-by: Mark Brown <broonie@kernel.org> drivers/regulator/bd96801-regulator.c | 130 ++++++++++++++++++++++++++++++---- 1 file changed, 115 insertions(+), 15 deletions(-) commit b95cacd8d708bce5839db2767d425e20ae548fd8 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Thu Nov 21 14:34:39 2024 +0200 regmap: cache: rbtree: use krealloc_array() to replace krealloc() Use krealloc_array() to replace krealloc() with multiplication. krealloc_array() has multiply overflow check, which will be safer. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241121123439.4180167-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/base/regmap/regcache-rbtree.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 37c95f022a7a34823c123eeccdfe415b88562867 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Thu Nov 21 14:34:33 2024 +0200 regmap: cache: mapple: use kmalloc_array() to replace kmalloc() Use kmalloc_array() to replace kmalloc() with multiplication. kmalloc_array() has multiply overflow check, which will be safer. In once case change kcalloc() as we don't need to clear the memory since it's all being reinitialised just immediately after that. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241121123433.4180133-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/base/regmap/regcache-maple.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9b3cd5c7099fe7710356dd76ecf9910dc8c32548 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Thu Nov 21 12:57:23 2024 +0200 regmap: place foo / 8 and foo % 8 closer to each other On x86 the compiler (gcc (Debian 14.2.0-8) 14.2.0) may generate a better code if it sees division and modulo goes together. Function old new delta __regmap_init 3740 3732 -8 Total: Before=31159, After=31151, chg -0.03% clang (Debian clang version 18.1.8) on x86_64 still shows better code Function old new delta __regmap_init 3582 3579 -3 Total: Before=39854, After=39851, chg -0.01% Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241121105838.4073659-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/base/regmap/regmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a4a7d86bc1a59839ad0dffbefa473135b342dd0b Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Thu Nov 21 12:57:22 2024 +0200 regmap: Use BITS_TO_BYTES() BITS_TO_BYTES() is the existing macro which takes care about full bytes that may fully hold the given amount of bits. Use it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241121105838.4073659-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/base/regmap/regmap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4a3aafe01f6c628932a402c21e58101173c8dab3 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Thu Nov 21 12:57:21 2024 +0200 regmap: cache: Use BITS_TO_BYTES() BITS_TO_BYTES() is the existing macro which takes care about full bytes that may fully hold the given amount of bits. Use it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241121105838.4073659-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> drivers/base/regmap/regcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3787255c967ba64dc72adc3038f0cb81211bd297 Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Fri Nov 15 17:54:25 2024 +0100 ASoC: cs42l51: Constify struct i2c_device_id 'struct i2c_device_id' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. While at it, also add some space to be consistent with cs42l51_of_match a few lines below. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 1551 384 16 1951 79f sound/soc/codecs/cs42l51-i2c.o After: ===== text data bss dec hex filename 1631 304 16 1951 79f sound/soc/codecs/cs42l51-i2c.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://patch.msgid.link/d5e686f47eddb14245d0fde693ff77ae749f7a08.1731689646.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/cs42l51-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dc9f2312acaee205609ad3c8b5f064e39eab1d6b Author: Tang Bin <tangbin@cmss.chinamobile.com> Date: Fri Oct 25 16:20:42 2024 +0800 ASoC: tas2781: Fix redundant logical jump In these functions, some logical jump of "goto" and variable are redundant, thus remove them. Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Link: https://patch.msgid.link/20241025082042.2872-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/tas2781-i2c.c | 68 ++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 43 deletions(-) commit 42c7af046aaf35c42ef864cbd96df025c48ce50f Author: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com> Date: Mon Nov 18 10:26:05 2024 +0530 ASoC: rockchip: i2s-tdm: Fix a useless call issue This commit fixes a useless call issue detected by Coverity (CID 1507978). The call to rockchip_i2s_ch_to_io is unnecessary as its return value is never checked or used. As a result, the function definition and call is removed. Signed-off-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com> Link: https://patch.msgid.link/20241118045605.48440-1-dheeraj.linuxdev@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/rockchip/rockchip_i2s_tdm.c | 28 ---------------------------- 1 file changed, 28 deletions(-) commit 509544d1b6dbffe7bc1849593ff217f965ec0419 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Thu Oct 31 12:27:25 2024 +0200 ASoc: mediatek: mt8365: Don't use "proxy" headers Update header inclusions to follow IWYU (Include What You Use) principle. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241031102725.2447711-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/mediatek/mt8365/mt8365-mt6357.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 01981565c764c554cc96e2d30a71c42975171416 Author: Tang Bin <tangbin@cmss.chinamobile.com> Date: Fri Oct 25 16:00:26 2024 +0800 ASoC: mediatek: mt8192-afe-pcm: Simplify probe() with local dev variable Simplify the function mt8192_afe_pcm_dev_probe() by using local 'dev' instead of '&pdev->dev'. Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Link: https://patch.msgid.link/20241025080026.2393-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit e6a9750a346b103bd8ab2bf25be76a719d8061b2 Author: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Wed Nov 27 11:00:35 2024 +0800 ASoC: fsl_xcvr: Add suspend and resume support Use regcache_sync() to recover the registers of controller, PHY and PLL after suspend and resume. In order to recover the registers need to avoid use the *_SET, *_CLR and *_TOG registers. Recovery of the registers should be done before loading XCVR firmware otherwise some registers set by firmware are overwritten. Besides only in eARC mode is it necessary to load XCVR firmware. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20241127030035.649219-3-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_xcvr.c | 160 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 118 insertions(+), 42 deletions(-) commit 5a8b4785cddabfad348a96ca38eb0c3d735202df Author: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Wed Nov 27 11:00:34 2024 +0800 ASoC: fsl_xcvr: Use regmap for PHY and PLL registers Define regmap for PHY and PLL registers, the PHY and PLL registers are accessed by AI interface in controller. So that driver can use regcache to recover registers after suspend and resume. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20241127030035.649219-2-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_xcvr.c | 224 +++++++++++++++++++++++++++++++++++++---------- sound/soc/fsl/fsl_xcvr.h | 13 +++ 2 files changed, 191 insertions(+), 46 deletions(-) commit 731c74e988ff776f6caa4738747613839000cc4b Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 29 13:37:56 2024 -0300 drm/xe/display: Flush DMC wakelock release work on runtime suspend We currently are not calling display runtime suspend functions when D3cold is not allowed. Because of that, we end up not disabling dynamic DC states (and do not go to DC9). With dynamic DC states enabled, we will also have DMC wakelock enabled. Since we use a delayed work to release the DMC wakelock, the work might get executed a little too late (after the PCI device has been put to D3hot) and we get a timeout warning ("DMC wakelock release timed out") because the MMIO for releasing the wakelock will be invalid after that point. To fix that, make sure we flush the release work at the end of xe_display_pm_runtime_suspend_late(). We can do that unconditionally because, if there is no pending work, that turns into a no-op. Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241129164010.29887-4-gustavo.sousa@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/display/xe_display.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a72f1bbf0c3dc06206ae38c6faaf8be5ab6fe168 Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 29 13:37:55 2024 -0300 drm/xe/display: Extract xe_display_pm_runtime_suspend_late() The current behavior for the runtime suspend case is that xe_display_pm_suspend_late() is only called when D3cold is allowed. Let's incorporate that behavior into a function specific to runtime PM and call it xe_display_pm_runtime_suspend_late(). With that, we keep stuff a bit more self-contained and allow having a place for adding more "late display runtime suspend"-related logic that isn't dependent on the "D3cold allowed" state. v2: - Fix typo in that caused xe_display_pm_runtime_suspend_late() to call itself instead of xe_display_pm_suspend_late(). - Add the empty version of xe_display_pm_runtime_suspend_late() for the !CONFIG_DRM_XE_DISPLAY case. Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241129164010.29887-3-gustavo.sousa@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/display/xe_display.c | 9 +++++++++ drivers/gpu/drm/xe/display/xe_display.h | 2 ++ drivers/gpu/drm/xe/xe_pm.c | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) commit f71212f5cbd526942d64c32671b9560f9974d6eb Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 29 13:37:54 2024 -0300 drm/i915/dmc_wl: Extract intel_dmc_wl_flush_release_work() We will need to flush the release work from outside in an upcoming change. Let's put that into a public interface and call it intel_dmc_wl_flush_release_work(). Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241129164010.29887-2-gustavo.sousa@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/i915/display/intel_dmc_wl.c | 12 +++++++++++- drivers/gpu/drm/i915/display/intel_dmc_wl.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) commit 45e72c306c08d59d0dc42238a8571bbbf04823f5 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Fri Nov 29 13:20:33 2024 +0200 wifi: ath12k: introduce QMI firmware ready flag When hardware device group abstraction is introduced, the QMI firmware ready event of different devices in a group can be received simultaneously. To indicate the firmware ready event is completed for a particular device in a group set a flag (ATH12K_FLAG_QMI_FW_READY_COMPLETE). This helps the upcoming hardware recovery implementation for hardware device group abstraction. 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 <quic_periyasa@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241128165026.2618331-5-kvalo@kernel.org drivers/net/wireless/ath/ath12k/core.c | 2 +- drivers/net/wireless/ath/ath12k/core.h | 1 + drivers/net/wireless/ath/ath12k/qmi.c | 12 +++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) commit 17dd22aff52716eda49541bfec71a8f10bd7e514 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Fri Nov 29 13:20:33 2024 +0200 wifi: ath12k: add ath12k_get_num_hw() Currently, one or more struct ath12k_hw is part of device (struct ath12k_base) but in future, ath12k_hw would be part of device group (struct ath12k_hw_group). Hence, num_hw under device would be moved to device group. To facilitate above transition, add helper ath12k_get_num_hw() to get the number of radios per device. In future, this helper will return the number of radios in a device group. 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 <quic_periyasa@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241128165026.2618331-4-kvalo@kernel.org drivers/net/wireless/ath/ath12k/core.c | 8 ++++---- drivers/net/wireless/ath/ath12k/core.h | 5 +++++ drivers/net/wireless/ath/ath12k/mac.c | 8 ++++---- 3 files changed, 13 insertions(+), 8 deletions(-) commit 016abac20b832ce2e2b8afbe2c9ef8158ad1cfe8 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Fri Nov 29 13:20:33 2024 +0200 wifi: ath12k: add ath12k_ab_to_ah() and ath12k_ab_set_ah() Currently, one or more ath12k_hw is part of a device (struct ath12k_base) but in future, it would be part of device group abstraction (struct ath12k_hw_group), i.e., when multiple radios (ar) across different devices can be combined together in a device group (struct ath12k_hw_group). In order to facilitate the above transition, introduce helpers ath12k_ab_to_ah() and ath12k_ab_set_ah() to get and set values of ath12k_hw 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: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241128165026.2618331-3-kvalo@kernel.org drivers/net/wireless/ath/ath12k/core.c | 8 ++++---- drivers/net/wireless/ath/ath12k/core.h | 11 +++++++++++ drivers/net/wireless/ath/ath12k/mac.c | 23 +++++++++++++---------- 3 files changed, 28 insertions(+), 14 deletions(-) commit fc38e9339c47d704934bc74e55c331f0d2d88583 Author: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Date: Fri Nov 29 13:20:33 2024 +0200 wifi: ath12k: Refactor core startup In the upcoming hardware device group abstraction radios across different devices can be grouped together to support multi-link operation and register as a device group to mac80211. Currently, ath12k_mac_allocate() and ath12k_mac_register() are part of ath12k_core_start() and ath12k_core_pdev_create() respectively and are based on per device (struct ath12k_base). These APIs can be decoupled and moved out to ath12k_core_qmi_firmware_ready() itself. This refactor is helpful for device group abstraction when mac80211 allocate and register will be changed from per device (struct ath12k_base) to per device group (struct ath12k_hw_group). 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 <quic_periyasa@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241128165026.2618331-2-kvalo@kernel.org drivers/net/wireless/ath/ath12k/core.c | 63 ++++++++++++++++------------------ drivers/net/wireless/ath/ath12k/dp.c | 7 ++++ drivers/net/wireless/ath/ath12k/pci.c | 9 +++++ drivers/net/wireless/ath/ath12k/qmi.c | 4 +++ 4 files changed, 50 insertions(+), 33 deletions(-) commit fa1bdca98d74472dcdb79cb948b54f63b5886c04 Author: Nir Lichtman <nir@lichtman.org> Date: Sat Nov 16 23:13:23 2024 +0000 exec: remove legacy custom binfmt modules autoloading Problem: The search binary handler logic contains legacy code to handle automatically loading kernel modules of unsupported binary formats. This logic is a leftover from a.out-to-ELF transition. After removal of a.out support, this code has no use anymore. Solution: Clean up this code from the search binary handler, also remove the line initialising retval to -ENOENT and instead just return -ENOEXEC if the flow has reached the end of the func. Note: Anyone who might find future uses for this legacy code would be better off using binfmt_misc to trigger whatever module loading they might need - would be more flexible that way. Suggested-by: Alexander Viro <viro@zeniv.linux.org.uk> Signed-off-by: Nir Lichtman <nir@lichtman.org> Link: https://lore.kernel.org/r/20241116231323.GA225987@lichtman.org Signed-off-by: Kees Cook <kees@kernel.org> fs/exec.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 4188fc31a95e6c7a03c5859831d48ce646b26e46 Author: nir@lichtman.org <nir@lichtman.org> Date: Sat Nov 2 14:01:22 2024 +0200 exec: move warning of null argv to be next to the relevant code Problem: The warning is currently printed where it is detected that the arg count is zero but the action is only taken place later in the flow even though the warning is written as if the action is taken place in the time of print This could be problematic since there could be a failure between the print and the code that takes action which would deem this warning misleading Solution: Move the warning print after the action of adding an empty string as the first argument is successful Signed-off-by: Nir Lichtman <nir@lichtman.org> Link: https://lore.kernel.org/r/ZyYUgiPc8A8i_3FH@nirs-laptop. Signed-off-by: Kees Cook <kees@kernel.org> fs/exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b6709dcd87ac85d56e7cd574a7b21f3a8727d942 Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Sat Nov 2 10:25:04 2024 +0100 fs: binfmt: Fix a typo A 't' is missing in "binfm_misc". Add it. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Link: https://lore.kernel.org/r/34b8c52b67934b293a67558a9a486aea7ba08951.1730539498.git.christophe.jaillet@wanadoo.fr Signed-off-by: Kees Cook <kees@kernel.org> fs/binfmt_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 810f3bf22ca75b1b4b42743275f96ae781473765 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 27 15:18:38 2024 +0200 drm/i915/dp: use seq buf for printing rates Hand rolling the buffer overflow handling with snprintf() is a bit tedious. The seq_buf interface is made for this. Switch to it. Use struct intel_display while at it. Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241127131838.3268735-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp.c | 36 +++++++++++++-------------------- 1 file changed, 14 insertions(+), 22 deletions(-) commit 6495567981be6f91eccb48e058ca88dd7acad181 Author: Sean Nyekjaer <sean@geanix.com> Date: Thu Nov 14 10:14:49 2024 +0100 dt-bindings: can: tcan4x5x: Document the ti,nwkrq-voltage-vio option The nWKRQ pin supports an output voltage of either the internal reference voltage (3.6V) or the reference voltage of the digital interface 0-6V (VIO). Add the devicetree option ti,nwkrq-voltage-vio to set it to VIO. If this property is omitted the reset default, the internal reference voltage, is used. Signed-off-by: Sean Nyekjaer <sean@geanix.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://patch.msgid.link/20241114-tcan-wkrqv-v5-1-a2d50833ed71@geanix.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Documentation/devicetree/bindings/net/can/ti,tcan4x5x.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) commit 79195755cdebffb085bd2b6c0767272ef39f53bb Author: Sean Nyekjaer <sean@geanix.com> Date: Thu Nov 28 09:29:21 2024 +0100 dt-bindings: can: convert tcan4x5x.txt to DT schema Convert binding doc tcan4x5x.txt to yaml. Added during conversion, required clock-names cclk. Signed-off-by: Sean Nyekjaer <sean@geanix.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20241128-convert-tcan-v3-1-bf2d8005bab5@geanix.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> .../devicetree/bindings/net/can/tcan4x5x.txt | 48 ------ .../devicetree/bindings/net/can/ti,tcan4x5x.yaml | 191 +++++++++++++++++++++ 2 files changed, 191 insertions(+), 48 deletions(-) commit 130727c37b7e2495db10535f6ef00095783ad5a9 Author: Pierre-Henry Moussay <pierre-henry.moussay@microchip.com> Date: Mon Sep 30 10:54:30 2024 +0100 dt-bindings: can: mpfs: add PIC64GX CAN compatibility PIC64GX CAN is compatible with the MPFS CAN, only add a fallback Signed-off-by: Pierre-Henry Moussay <pierre-henry.moussay@microchip.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://patch.msgid.link/20240930095449.1813195-2-pierre-henry.moussay@microchip.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Documentation/devicetree/bindings/net/can/microchip,mpfs-can.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8c2143702d0719a0357600bca0236900781ffc78 Author: Kalle Valo <kvalo@kernel.org> Date: Tue Nov 26 19:11:39 2024 +0200 wifi: ath12k: ath12k_mac_op_sta_rc_update(): use mac80211 provided link id There's a todo comment to use mac80211 provided link id. As mac80211 now provides it use it in ath12k and remove the comment. 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: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241126171139.2350704-11-kvalo@kernel.org drivers/net/wireless/ath/ath12k/mac.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit ad969bc9ee73fa9eda6223be2a7c0c6caf937d71 Author: Kalle Valo <kvalo@kernel.org> Date: Tue Nov 26 19:11:38 2024 +0200 wifi: ath12k: ath12k_mac_op_set_key(): fix uninitialized symbol 'ret' Dan reported that in some cases the ret variable could be uninitialized. Fix that by removing the out label entirely and returning zero explicitly on succesful cases. Also remove the unnecessary else branches to follow more the style used in ath12k and now it's easier to see the error handling. No functional changes. 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: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/all/7e7afd00-ad84-4744-8d94-416bab7e7dd9@stanley.mountain/ Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241126171139.2350704-10-kvalo@kernel.org drivers/net/wireless/ath/ath12k/mac.c | 57 ++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 25 deletions(-) commit aa80f12f3bedc2d73e4cc43554aee44c277cc938 Author: Rameshkumar Sundaram <quic_ramess@quicinc.com> Date: Tue Nov 26 19:11:37 2024 +0200 wifi: ath12k: defer vdev creation for MLO Currently for single radio devices (ah->num_radio == 1) ath12k_mac_op_add_interface() creates vdev and later hw scan and assign_vif_chanctx uses the same. For MLO, vdev create request should carry ML address which will not be known during ath12k_mac_op_add_interface() as vif will be marked as ML only after links are added to it. If hw scan is requested, the vdev will be deleted post hw scan and subsequent assign_vif_chanctx call will create new vdev with ML address. But in certain cases assign_vif_chanctx could be called without any prior hw scan request and reusing the previously created vdev causes a non-ML vdev to be used for an ML vif and firmware operates the vdev in non-ML mode. Fix this by deferring vdev creation for interface until hw scan or assign_vif_chanctx request is received from mac80211. 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 <quic_ramess@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241126171139.2350704-9-kvalo@kernel.org drivers/net/wireless/ath/ath12k/mac.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 1833a2ce5d7df2b064e491d3e912da9fa0b85eb9 Author: Aditya Kumar Singh <quic_adisi@quicinc.com> Date: Tue Nov 26 19:11:36 2024 +0200 wifi: ath12k: ath12k_bss_assoc(): MLO support Currently, the ath12k_bss_assoc() function handles only deflink station connections. To support multi-link station connections, make the necessary changes to retrieve the required information from the link-level members. 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 <quic_adisi@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241126171139.2350704-8-kvalo@kernel.org drivers/net/wireless/ath/ath12k/mac.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 90570ba4610bdb1db39ef45f2b271a9f89680a9d Author: Sriram R <quic_srirrama@quicinc.com> Date: Tue Nov 26 19:11:35 2024 +0200 wifi: ath12k: do not return invalid link id for scan link When a scan request is received, driver selects a link id for which the arvif can be mapped. Same link is also used for getting the link conf address. Currently, we return 0 as link id for a non ML vif, which is correct since that is the default link id. Also when any of the link vif is active and the scan request is for a channel in the active link we return its link id. But, when we don't hit both of the above cases (i.e not a ML vif or no active link vif for the channel is present) we currently return 0 as the link id. Bu the problemis that this might not work out always, eg., when only one link (eg. linkid = 1) is added to vif, then we won't find any link conf for link id 0 in the vif resulting in scan failure. During AP bringup, such scan failure causes bringup issues. Hence avoid sending link id 0 as default. Rather use a default link for scan and default link address for the same. This scan vdev will either be deleted if another scan is requested on same vif or when AP is broughtup on same link or during interface cleanup. 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: Sriram R <quic_srirrama@quicinc.com> Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241126171139.2350704-7-kvalo@kernel.org drivers/net/wireless/ath/ath12k/core.h | 3 +- drivers/net/wireless/ath/ath12k/mac.c | 65 +++++++++++++++++++++++++--------- drivers/net/wireless/ath/ath12k/mac.h | 6 ++++ 3 files changed, 56 insertions(+), 18 deletions(-) commit 85edf16384d12db938a09458d89662cdff87068e Author: Rameshkumar Sundaram <quic_ramess@quicinc.com> Date: Tue Nov 26 19:11:34 2024 +0200 wifi: ath12k: ath12k_mac_station_add(): fix potential rx_stats leak If peer creation fails ar->rx_stats needs to be freed in error handling. 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 <quic_ramess@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241126171139.2350704-6-kvalo@kernel.org drivers/net/wireless/ath/ath12k/mac.c | 2 ++ 1 file changed, 2 insertions(+) commit 5419ef950da4a76c54c91129f16c292fc65da56b Author: Sriram R <quic_srirrama@quicinc.com> Date: Tue Nov 26 19:11:33 2024 +0200 wifi: ath12k: ath12k_mac_op_ampdu_action(): MLO support Apply tid queue setup based on all link stations on receiving ampdu action params for an ML Station. Modify ath12k_get_ar_by_vif() to fetch ar based on link arvif inside ahvif. 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: Sriram R <quic_srirrama@quicinc.com> Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241126171139.2350704-5-kvalo@kernel.org drivers/net/wireless/ath/ath12k/dp_rx.c | 36 ++++++++++++---- drivers/net/wireless/ath/ath12k/dp_rx.h | 6 ++- drivers/net/wireless/ath/ath12k/mac.c | 76 +++++++++++++++++++-------------- 3 files changed, 76 insertions(+), 42 deletions(-) commit 2197feb0249d308bbb0ba0443bd45511cdec190a Author: Sriram R <quic_srirrama@quicinc.com> Date: Tue Nov 26 19:11:32 2024 +0200 wifi: ath12k: ath12k_mac_op_flush(): MLO support Currently when tx flush is requested for an vif only packets corresponding to deflink are flushed, with MLO multiple link arvif could be affiliated to the ML vif and packets corresponding to all of them should be flushed. 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: Sriram R <quic_srirrama@quicinc.com> Co-developed-by: Maharaja Kennadyrajan <quic_mkenna@quicinc.com> Signed-off-by: Maharaja Kennadyrajan <quic_mkenna@quicinc.com> Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241126171139.2350704-4-kvalo@kernel.org drivers/net/wireless/ath/ath12k/mac.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 648a121bafa3f4487254ab8e9e298f12540f0603 Author: Sriram R <quic_srirrama@quicinc.com> Date: Tue Nov 26 19:11:31 2024 +0200 wifi: ath12k: ath12k_mac_op_tx(): MLO support For a frame transmission for an ML vif, mac80211 mentions transmit link id in the tx control info. Use it to convert the RA/TA to the corresponding link sta and link vif address before enqueueing the frame for transmission. For 802.3 data frames, always enqueue the frame on the primary (assoc) link id. Firmware does the link selection, builds 802.11 header and therefore the address translation too. Also ensure right link vif is used for WMI based management transmission and add comments to document when RCU read lock is held. 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: Sriram R <quic_srirrama@quicinc.com> Co-developed-by: Rameshkumar Sundaram <quic_ramess@quicinc.com> Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241126171139.2350704-3-kvalo@kernel.org drivers/net/wireless/ath/ath12k/core.h | 1 + drivers/net/wireless/ath/ath12k/mac.c | 139 ++++++++++++++++++++++++++++++++- 2 files changed, 137 insertions(+), 3 deletions(-) commit 56dcbf0b520796e26b2bbe5686bdd305ad924954 Author: Kalle Valo <kvalo@kernel.org> Date: Tue Nov 26 19:11:30 2024 +0200 wifi: ath12k: convert struct ath12k::wmi_mgmt_tx_work to struct wiphy_work To simplify locking for the next patches convert struct ath12k::wmi_mgmt_tx_work to use wiphy_work. After this ath12k_mgmt_over_wmi_tx_work() is called with wiphy_lock() taken. In ath12k_core_suspend() we need to take wiphy_lock() because ath12k_mac_wait_tx_complete() requires it. Also add lockdep_assert_wiphy() to document when wiphy_lock() is held. 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: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241126171139.2350704-2-kvalo@kernel.org drivers/net/wireless/ath/ath12k/core.c | 6 ++++++ drivers/net/wireless/ath/ath12k/core.h | 2 +- drivers/net/wireless/ath/ath12k/mac.c | 20 ++++++++++++++++---- 3 files changed, 23 insertions(+), 5 deletions(-) commit 44cff6c5b0b17a78bc0b30372bcd816cf6dd282a Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Wed Nov 27 14:37:15 2024 +0100 drm/hibmc: Drop dependency on ARM64 There exists x86-based hardware with HiSilicon BMC chipsets. This driver works well on these systems. Drop the dependency on ARM64. Tested on RH1288 V3. v2: - s/Aarch86/ARM64 (Sui) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sui Jingfeng <sui.jingfeng@linux.dev> Link: https://patchwork.freedesktop.org/patch/msgid/20241127133732.470414-1-tzimmermann@suse.de drivers/gpu/drm/hisilicon/hibmc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5807f4ee6d32a4cce9a4df36f0d455c64c861947 Author: Heiko Stuebner <heiko.stuebner@cherry.de> Date: Fri Nov 15 16:11:31 2024 +0100 drm/rockchip: vop2: fix rk3588 dp+dsi maxclk verification The clock is in Hz while the value checked against is in kHz, so actual frequencies will never be able to be below to max value. Fix this by specifying the max-value in Hz too. Fixes: 5a028e8f062f ("drm/rockchip: vop2: Add support for rk3588") Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Acked-by: Andy Yan <andyshrk@163.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241115151131.416830-1-heiko@sntech.de drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 329e9109b16b9f927ff8b39c8f24c2b78ccce693 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Nov 6 23:58:59 2024 +0200 drm/i915/pps: Eliminate pointless get_delay() macro Now that we have pps_units_to_msecs(), get_delay() looks rather pointless. Nuke it. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106215859.25446-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_pps.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit a463dba64fb2fd732f09163c47b50ae75e7764cf Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Nov 6 23:58:58 2024 +0200 drm/i915/pps: Extract pps_units_to_msecs() Add pps_units_to_msecs() as the counterpart to msecs_pps_units_to(). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106215859.25446-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_pps.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b6bf1601024274d86fb5be76ae497c36787942d5 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Nov 6 23:58:57 2024 +0200 drm/i915/pps: Extract msecs_to_pps_units() Replace all the hand rolled *10 stuff with something a bit more descriptive (msecs_to_pps_units()). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106215859.25446-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_pps.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 87545d7584e12651c6b54f50f3287104205f8dc6 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Nov 6 23:58:56 2024 +0200 drm/i915/pps: Spell out the eDP spec power sequencing delays a bit more clearly We determine the "spec" eDP power sequencing delays by referencing some max values from the eDP spec. Write out each number from the spec explicitly instead of precomputing the final number (that's the job of the computer). Makes it a bit easier to see what the supposed spec defined numbers actually are. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106215859.25446-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_pps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ccae47c64b88142a62f4ef753d7e9a72981ab3f2 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Nov 6 23:58:55 2024 +0200 drm/i915/lvds: Use struct intel_pps_delays for LVDS power sequencing Reuse struct intel_pps_delays for the LVDS power sequencing delays instead of hand rolling it all. Perhaps in the future we could reuse some of the same PPS code for both LVDS and eDP (assuming we can decouple the PPS code from intel_dp...). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106215859.25446-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_display_types.h | 10 ++--- drivers/gpu/drm/i915/display/intel_lvds.c | 49 +++++++++++----------- 2 files changed, 30 insertions(+), 29 deletions(-) commit c55bc703095ac5e22f30ae2699a846562fcda2d2 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Nov 6 23:58:54 2024 +0200 drm/i915/pps: Rename intel_pps_delay members Stop using the semi-random eDP spec T1,T3,... names for the power sequencing delays, and instead call them by their human readable names. Much easier to keep track what delay goes where when you don't have to constantly cross reference against the eDP spec. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106215859.25446-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_bios.c | 10 +-- drivers/gpu/drm/i915/display/intel_display_types.h | 10 +-- drivers/gpu/drm/i915/display/intel_pps.c | 92 +++++++++++----------- 3 files changed, 58 insertions(+), 54 deletions(-) commit dac2ec8d3ba26c1d5233ae28298bdf73f30e9117 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Nov 6 23:58:53 2024 +0200 drm/i915/pps: Decouple pps delays from VBT struct definition We currently lack a proper struct definition for the VBT power squencing delays, and instead we use the same struct definition (in intel_bios.h) for both the VBT layout and our driver side state. Decouple those two things by moving the current struct into intel_vbt_defs.h and adding a new one for the driver's use. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106215859.25446-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_bios.c | 15 ++++++++++++--- drivers/gpu/drm/i915/display/intel_bios.h | 8 -------- drivers/gpu/drm/i915/display/intel_display_types.h | 15 ++++++++++++--- drivers/gpu/drm/i915/display/intel_dp_aux.c | 1 - drivers/gpu/drm/i915/display/intel_pps.c | 20 ++++++++++---------- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 8 ++++++++ 6 files changed, 42 insertions(+), 25 deletions(-) commit 57ecdc5521831b179d34109a74f993371fb2730e Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Nov 6 23:58:52 2024 +0200 drm/i915/pps: Store the power cycle delay without the +1 The code initializing the power sequencing delays is a bit hard to follow. One confusing thing is that we keep doing the +/-1 adjustment for the hardware register value in several places. Simplify this a bit by doing the adjustment only when reading or writing the actual register. This also matches how the LVDS code does things. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106215859.25446-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_pps.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit da5bb8974c8a729aed4ce1c04fb582f13ddcb954 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Nov 20 18:41:22 2024 +0200 drm/i915/dsb: Nuke the MMIO->indexed register write logic We've determined that indexed DSB writes are only faster than MMIO writes when writing the same register ~5 or more times. That seems very unlikely to happen in any other case than when using indexed LUT registers. Simplify the code by removing the MMIO->indexed write conversion logic and just emit the instruction as an indexed write from the get go. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241120164123.12706-4-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar <uma.shankar@intel.com> drivers/gpu/drm/i915/display/intel_dsb.c | 58 ++++++++------------------------ 1 file changed, 14 insertions(+), 44 deletions(-) commit 2504a316b35d49522f39cf0dc01830d7c36a9be4 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Nov 20 18:41:21 2024 +0200 drm/i915/color: Stop using non-posted DSB writes for legacy LUT DSB LUT register writes vs. palette anti-collision logic appear to interact in interesting ways: - posted DSB writes simply vanish into thin air while anti-collision is active - non-posted DSB writes actually get blocked by the anti-collision logic, but unfortunately this ends up hogging the bus for long enough that unrelated parallel CPU MMIO accesses start to disappear instead Even though we are updating the LUT during vblank we aren't immune to the anti-collision logic because it kicks in briefly for pipe prefill (initiated at frame start). The safe time window for performing the LUT update is thus between the undelayed vblank and frame start. Turns out that with low enough CDCLK frequency (DSB execution speed depends on CDCLK) we can exceed that. As we are currently using non-posted writes for the legacy LUT updates, in which case we can hit the far more severe failure mode. The problem is exacerbated by the fact that non-posted writes are much slower than posted writes (~4x it seems). To mititage the problem let's switch to using posted DSB writes for legacy LUT updates (which will involve using the double write approach to avoid other problems with DSB vs. legacy LUT writes). Despite writing each register twice this will in fact make the legacy LUT update faster when compared to the non-posted write approach, making the problem less likely to appear. The failure mode is also less severe. This isn't the 100% solution we need though. That will involve estimating how long the LUT update will take, and pushing frame start and/or delayed vblank forward to guarantee that the update will have finished by the time the pipe prefill starts... Cc: stable@vger.kernel.org Fixes: 34d8311f4a1c ("drm/i915/dsb: Re-instate DSB for LUT updates") Fixes: 25ea3411bd23 ("drm/i915/dsb: Use non-posted register writes for legacy LUT") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12494 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241120164123.12706-3-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar <uma.shankar@intel.com> drivers/gpu/drm/i915/display/intel_color.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit ecba559a88ab8399a41893d7828caf4dccbeab6c Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Nov 20 18:41:20 2024 +0200 drm/i915/dsb: Don't use indexed register writes needlessly Turns out the DSB indexed register write command has rather significant initial overhead compared to the normal MMIO write command. Based on some quick experiments on TGL you have to write the register at least ~5 times for the indexed write command to come out ahead. If you write the register less times than that the MMIO write is faster. So it seems my automagic indexed write logic was a bit misguided. Go back to the original approach only use indexed writes for the cases we know will benefit from it (indexed LUT register updates). Currently we shouldn't have any cases where this truly matters (just some rare double writes to the precision LUT index registers), but we will need to switch the legacy LUT updates to write each LUT register twice (to avoid some palette anti-collision logic troubles). This would be close to the worst case for using indexed writes (two writes per register, and 256 separate registers). Using the MMIO write command should shave off around 30% of the execution time compared to using the indexed write command. Cc: stable@vger.kernel.org Fixes: 34d8311f4a1c ("drm/i915/dsb: Re-instate DSB for LUT updates") Fixes: 25ea3411bd23 ("drm/i915/dsb: Use non-posted register writes for legacy LUT") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241120164123.12706-2-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar <uma.shankar@intel.com> drivers/gpu/drm/i915/display/intel_color.c | 51 ++++++++++++++++++------------ drivers/gpu/drm/i915/display/intel_dsb.c | 19 +++++++++-- drivers/gpu/drm/i915/display/intel_dsb.h | 2 ++ 3 files changed, 49 insertions(+), 23 deletions(-) commit 24387a21dc8d3d7be9ce7a99dba4d4477456caab Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Nov 27 08:11:17 2024 +0200 Revert "drm/i915/dpt: Make DPT object unshrinkable" This reverts commit 51064d471c53dcc8eddd2333c3f1c1d9131ba36c. Now that we forcefully evict all DPT VMAs during suspend there should be no problem allowing the shrinker to eat the DPT objects. Cc: Brian Geffon <bgeffon@google.com> Cc: Vidya Srinivas <vidya.srinivas@intel.com> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12965 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241127061117.25622-5-ville.syrjala@linux.intel.com Acked-by: Brian Geffon <bgeffon@google.com> Reviewed-by: Vidya Srinivas <vidya.srinivas@intel.com> Tested-by: Vidya Srinivas <vidya.srinivas@intel.com> drivers/gpu/drm/i915/gem/i915_gem_object.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 106216c220a2c7f275110e72e97527961ee33704 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Nov 27 08:11:16 2024 +0200 drm/i915/dpt: Evict all DPT VMAs on suspend Currently intel_dpt_resume() tries to blindly rewrite all the PTEs for currently bound DPT VMAs. That is problematic because the CPU mapping for the DPT is only really guaranteed to exist while the DPT object has been pinned. In the past we worked around this issue by making DPT objects unshrinkable, but that is undesirable as it'll waste physical RAM. Let's instead forcefully evict all the DPT VMAs on suspend, thus guaranteeing that intel_dpt_resume() has nothing to do. To guarantee that all the DPT VMAs are evictable by intel_dpt_suspend() we need to flush the cleanup workqueue after the display output has been shut down. And for good measure throw in a few extra WARNs to catch any mistakes. Cc: Brian Geffon <bgeffon@google.com> Cc: Vidya Srinivas <vidya.srinivas@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241127061117.25622-4-ville.syrjala@linux.intel.com Reviewed-by: Vidya Srinivas <vidya.srinivas@intel.com> Tested-by: Vidya Srinivas <vidya.srinivas@intel.com> drivers/gpu/drm/i915/display/intel_display_driver.c | 3 +++ drivers/gpu/drm/i915/display/intel_dpt.c | 4 ++-- drivers/gpu/drm/i915/gt/intel_ggtt.c | 19 ++++++++++++++----- drivers/gpu/drm/i915/gt/intel_gtt.h | 4 ++-- 4 files changed, 21 insertions(+), 9 deletions(-) commit 37ab41e11f359fa66934f7e25bba2e4360f6ccec Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Nov 27 08:11:15 2024 +0200 drm/i915: Intruduce display.wq.cleanup Introduce a dedicated workqueue for the commit cleanup work. In the future we'll need this to guarantee all the cleanup works have finished at a specific point during suspend. Cc: Brian Geffon <bgeffon@google.com> Cc: Vidya Srinivas <vidya.srinivas@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241127061117.25622-3-ville.syrjala@linux.intel.com Reviewed-by: Vidya Srinivas <vidya.srinivas@intel.com> Tested-by: Vidya Srinivas <vidya.srinivas@intel.com> drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display/intel_display_core.h | 3 +++ drivers/gpu/drm/i915/display/intel_display_driver.c | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) commit 0768530b7c5bedd9b967c87e2f85ab982ae29b9b Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Nov 27 08:11:14 2024 +0200 drm/i915: Don't reuse commit_work for the cleanup Currently we reuse the commit_work for a later cleanup step. Let's not do that so that atomic ioctl handler won't accidentally wait for the cleanup work when it really wants to just wait on the commit_tail() part. We'll just add another work struct for the cleanup. Cc: Brian Geffon <bgeffon@google.com> Cc: Vidya Srinivas <vidya.srinivas@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241127061117.25622-2-ville.syrjala@linux.intel.com Reviewed-by: Vidya Srinivas <vidya.srinivas@intel.com> Tested-by: Vidya Srinivas <vidya.srinivas@intel.com> drivers/gpu/drm/i915/display/intel_display.c | 6 +++--- drivers/gpu/drm/i915/display/intel_display_types.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) commit 822ba16048a1d18c5e6db3d85d053ff31d403014 Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Date: Wed Nov 13 12:26:22 2024 +0100 drm/panfrost: Add GPU ID for MT8188 Mali-G57 MC3 The MediaTek MT8188 SoC has a Mali-G57 MC3 GPU and, similarly to MT8192, it has yet another special GPU ID. Add the GPU ID to the list and treat it as a standard Mali-G57. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Signed-off-by: Steven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241113112622.123044-1-angelogioacchino.delregno@collabora.com drivers/gpu/drm/panfrost/panfrost_gpu.c | 4 ++++ 1 file changed, 4 insertions(+) commit 34f4e94c839a5cfdbb5dd32b54760fdb8b25b5d7 Author: Boris Brezillon <boris.brezillon@collabora.com> Date: Wed Nov 13 17:02:57 2024 +0100 drm/panthor: Fix a typo in the FW iface flag definitions Drop the _RD_ in the flag names. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Acked-by: Liviu Dudau <liviu.dudau@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241113160257.2002333-1-boris.brezillon@collabora.com drivers/gpu/drm/panthor/panthor_fw.c | 64 ++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 32 deletions(-) commit 54254727837440966c3381ea688df002ff14f269 Author: Matthew Brost <matthew.brost@intel.com> Date: Tue Nov 26 09:46:15 2024 -0800 drm/xe: Only allow contiguous BOs to use xe_bo_vmap xe_bo_vmap only works on contiguous BOs, disallow xe_bo_vmap on BO unless we are certain the BO is contiguous. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126174615.2665852-9-matthew.brost@intel.com drivers/gpu/drm/xe/xe_bo.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit e03b0aa67ac0106d8961581a426649fabab50827 Author: Matthew Brost <matthew.brost@intel.com> Date: Tue Nov 26 09:46:14 2024 -0800 drm/xe: Set XE_BO_FLAG_PINNED in migrate selftest BOs We only allow continguous BOs to be vmapped, set XE_BO_FLAG_PINNED on BOs in migrate selftest as this forces continguous BOs and selftest uses vmaps. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126174615.2665852-8-matthew.brost@intel.com drivers/gpu/drm/xe/tests/xe_migrate.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 5f7bec831f1f17c354e4307a12cf79b018296975 Author: Matthew Brost <matthew.brost@intel.com> Date: Tue Nov 26 09:46:13 2024 -0800 drm/xe: Use ttm_bo_access in xe_vm_snapshot_capture_delayed Non-contiguous mapping of BO in VRAM doesn't work, use ttm_bo_access instead. v2: - Fix error handling Fixes: 0eb2a18a8fad ("drm/xe: Implement VM snapshot support for BO's and userptr") Suggested-by: Matthew Auld <matthew.auld@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126174615.2665852-7-matthew.brost@intel.com drivers/gpu/drm/xe/xe_vm.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit b6308aaa24a7ad3dfc6157b6afc550b9ab7e8945 Author: Matthew Brost <matthew.brost@intel.com> Date: Tue Nov 26 09:46:12 2024 -0800 drm/xe/display: Update intel_bo_read_from_page to use ttm_bo_access Don't open code vmap of a BO, use ttm_bo_access helper which is safe for non-contiguous BOs and non-visible BOs. Suggested-by: Matthew Auld <matthew.auld@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126174615.2665852-6-matthew.brost@intel.com drivers/gpu/drm/xe/display/intel_bo.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) commit 1c6878af115a4586a40d6c14d530fa9f93e0bd83 Author: Matthew Brost <matthew.brost@intel.com> Date: Tue Nov 26 09:46:11 2024 -0800 drm/xe: Take PM ref in delayed snapshot capture worker The delayed snapshot capture worker can access the GPU or VRAM both of which require a PM reference. Take a reference in this worker. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Fixes: 4f04d07c0a94 ("drm/xe: Faster devcoredump") Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126174615.2665852-5-matthew.brost@intel.com drivers/gpu/drm/xe/xe_devcoredump.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 97e8cecb6a0dde7ebb8e8e973146b5a131f52b9f Author: Matthew Brost <matthew.brost@intel.com> Date: Tue Nov 26 09:46:10 2024 -0800 drm/xe: Add xe_ttm_access_memory Non-contiguous VRAM cannot easily be mapped in TTM nor can non-visible VRAM easily be accessed. Add xe_ttm_access_memory which hooks into ttm_bo_access to access such memory. v4: - Assert memory access rather than taking RPM ref (Thomas / Auld) - Fix warning on xe_res_cursor.h for non-zero offset (Mika) Reported-by: Christoph Manszewski <christoph.manszewski@intel.com> Suggested-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126174615.2665852-4-matthew.brost@intel.com drivers/gpu/drm/xe/xe_bo.c | 59 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 3 deletions(-) commit 7d08df5d0bd3d12d14dcec773fcddbe3eed3a8e8 Author: Matthew Brost <matthew.brost@intel.com> Date: Tue Nov 26 09:46:09 2024 -0800 drm/ttm: Add ttm_bo_access Non-contiguous VRAM cannot easily be mapped in TTM nor can non-visible VRAM easily be accessed. Add ttm_bo_access, which is similar to ttm_bo_vm_access, to access such memory. v4: - Fix checkpatch warnings (CI) v5: - Fix checkpatch warnings (CI) v6: - Fix kernel doc (Auld) v7: - Move ttm_bo_access to ttm_bo_vm.c (Christian) Cc: Christian König <christian.koenig@amd.com> Reported-by: Christoph Manszewski <christoph.manszewski@intel.com> Suggested-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Tested-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126174615.2665852-3-matthew.brost@intel.com drivers/gpu/drm/ttm/ttm_bo_vm.c | 40 ++++++++++++++++++++++++++++++++-------- include/drm/ttm/ttm_bo.h | 2 ++ 2 files changed, 34 insertions(+), 8 deletions(-) commit f85dc3c5abddaa6ef3674755f28cf49774d27ea5 Author: Matthew Brost <matthew.brost@intel.com> Date: Tue Nov 26 09:46:08 2024 -0800 drm/xe: Add xe_bo_vm_access Add xe_bo_vm_access which is wrapper around ttm_bo_vm_access which takes rpm refs for device access. Suggested-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126174615.2665852-2-matthew.brost@intel.com drivers/gpu/drm/xe/xe_bo.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 1bba29603a2812e7b3dbb4ec1558ecb626ee933e Author: Nicolas Nobelis <nicolas@nobelis.eu> Date: Sat Nov 16 19:24:19 2024 +0100 Input: xpad - add support for Nacon Pro Compact Add Nacon Pro Compact to the list of supported devices. These are the ids of the "Colorlight" variant. The buttons, sticks and vibrations work. The decorative LEDs on the other hand do not (they stay turned off). Signed-off-by: Nicolas Nobelis <nicolas@nobelis.eu> Link: https://lore.kernel.org/r/20241116182419.33833-1-nicolas@nobelis.eu Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/joystick/xpad.c | 1 + 1 file changed, 1 insertion(+) commit e511f8fc3b2786999987901dad94c1548e091040 Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Fri Oct 25 18:15:59 2024 +0100 drm/vc4: Drop planes that are completely off-screen or 0 crtc size It is permitted for a plane to be configured such that none of it is on-screen via either negative dest rectangle X,Y offset, or an offset that is greater than the crtc dimensions. These planes were resized via drm_atomic_helper_check_plane_state such that the source rectangle had a zero width or height, but they still created a dlist entry even though they contributed no pixels. In the case of vc6_plane_mode_set, that it could result in negative values being written into registers, which caused incorrect behaviour. Drop planes that result in a source width or height of 0 pixels or an on-screen size of 0 pixels to avoid the incorrect rendering. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-28-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_plane.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 52b0a073167b3679f7dd754903d84dfdc8119211 Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Fri Oct 25 18:15:58 2024 +0100 drm/vc4: Enable bg_fill if there are no planes enabled The default was to have enable_bg_fill disabled and the first plane set it if it wasn't opaque and covering the whole screen. However that meant that if no planes were enabled, then the background fill wasn't enabled, and would give a striped output from the uninitialised output buffer. Initialise it to enabled to avoid this. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-27-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_hvs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e048861c5ec9b4f1a863af0d5cbfa36030c2b39 Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:57 2024 +0100 drm/vc4: Add additional warn_on for incorrect revisions Some code path in vc4 are conditional to a generation and cannot be executed on others. Let's put a WARN_ON if that ever happens. Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-26-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_hvs.c | 30 ++++++++++++++++++++++++++++-- drivers/gpu/drm/vc4/vc4_kms.c | 6 ++++++ drivers/gpu/drm/vc4/vc4_plane.c | 17 +++++++++++++++++ 3 files changed, 51 insertions(+), 2 deletions(-) commit 88c065c739db1370881c2fc613a88bc35f05a5ce Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Fri Oct 25 18:15:56 2024 +0100 drm/vc4: hdmi: Support 2712 D-step register map The D-step has increased FIFO sizes of the MAI_THR blocks, resulting in changes to the register masking. Add support for it. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-25-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_hdmi.c | 19 +++++++++++++++++-- drivers/gpu/drm/vc4/vc4_regs.h | 9 +++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) commit b7b14b31c8866c2693e676921a8e528ec2bca216 Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Fri Oct 25 18:15:55 2024 +0100 drm/vc4: plane: Add support for 2712 D-step. There are a few minor changes in the display list generation for the D-step of the chip, so add them. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-24-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_plane.c | 72 ++++++++++++++++++++++++++++++----------- drivers/gpu/drm/vc4/vc4_regs.h | 9 ++++-- 2 files changed, 60 insertions(+), 21 deletions(-) commit b460e0072cbc2c2567f2a488f7c16a50b9601d8d Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Fri Oct 25 18:15:54 2024 +0100 drm/vc4: hvs: Add in support for 2712 D-step. The registers have been moved around, and a couple of minor changes made, so adapt for this. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-23-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_drv.h | 6 ++ drivers/gpu/drm/vc4/vc4_hvs.c | 154 +++++++++++++++++++++++++++++++++-------- drivers/gpu/drm/vc4/vc4_kms.c | 3 +- drivers/gpu/drm/vc4/vc4_regs.h | 117 +++++++++++++++++++++++++++---- 4 files changed, 234 insertions(+), 46 deletions(-) commit 83c4f5947c032a94e044284117fe9f31c23f69ba Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Fri Oct 25 18:15:53 2024 +0100 drm/vc4: drv: Add support for 2712 D-step Add in the compatible string and VC4_GEN_ enum for the D-step Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-22-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_drv.c | 1 + drivers/gpu/drm/vc4/vc4_drv.h | 1 + drivers/gpu/drm/vc4/vc4_hvs.c | 4 ++++ drivers/gpu/drm/vc4/vc4_regs.h | 3 +++ 4 files changed, 9 insertions(+) commit fa9ccf01025b46fdc01b3d871155384c844118b5 Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:52 2024 +0100 drm/vc4: txp: Add BCM2712 MOPLET support The BCM2712 features a simpler TXP called MOPLET. Let's add support for it. Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-21-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_txp.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 5aab428cfe588a8ea952684c60530dfff71b2b42 Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:51 2024 +0100 drm/vc4: txp: Add support for BCM2712 MOP The BCM2712 has an evolution of what used to be called TXP in the earlier SoCs, but is now called MOP. There's a few differences still, so we can add a new compatible to deal with them easily. Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-20-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_txp.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 7dc41ea6c021ca5c393de9ad06227bcd3d077eec Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:50 2024 +0100 drm/vc4: txp: Add a new TXP encoder type Starting with BCM2712, we'll have a two TXP. Let's follow the HDMI example and add two encoder types for TXP: TXP0 and TXP1. Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-19-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/tests/vc4_mock.c | 4 +- drivers/gpu/drm/vc4/tests/vc4_test_pv_muxing.c | 106 ++++++++++++------------- drivers/gpu/drm/vc4/vc4_drv.h | 3 +- drivers/gpu/drm/vc4/vc4_kms.c | 2 +- drivers/gpu/drm/vc4/vc4_txp.c | 2 +- 5 files changed, 59 insertions(+), 58 deletions(-) commit 99f34ea8942efb902d9bd36c03c0e11fea0bb632 Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:49 2024 +0100 drm/vc4: txp: Move the encoder type in the variant structure We'll have multiple TXP instances in the BCM2712, so we can't use a single encoder type anymore. Let's tie the encoder type to the compatible. Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-18-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_drv.h | 1 + drivers/gpu/drm/vc4/vc4_txp.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit cf1c8f63f36e5eeabfb4bb5ebea2873f0fa96cd9 Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:48 2024 +0100 drm/vc4: txp: Handle 40-bits DMA Addresses The BCM2712 MOP and MOPLET can handle addresses larger than 32bits through an extra register. We can easily support it and make it conditional based on the compatible through a boolean in our variant structure. Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-17-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_drv.h | 2 ++ drivers/gpu/drm/vc4/vc4_txp.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit d60205bb6a9741c81413e7537919258def667d5d Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:47 2024 +0100 drm/vc4: txp: Add horizontal and vertical size offset toggle bit The new writeback controllers that can be found on the BCM2712 require to have their horizontal and vertical size reduced by one. Let's tie that behaviour to the compatible so we can support both the new and old controllers. Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-16-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_drv.h | 1 + drivers/gpu/drm/vc4/vc4_txp.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit fcd1465d222ca2af239437aab24ddd20add21362 Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:46 2024 +0100 drm/vc4: txp: Add byte enable toggle bit The MOPLET doesn't have the BYTE_ENABLE field to set, but the TXP and MOP do, so let's add a boolean to control whether or not we need to set it. Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-15-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_drv.h | 1 + drivers/gpu/drm/vc4/vc4_txp.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 4013716de7cc40e07580280886310572f491835a Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:45 2024 +0100 drm/vc4: txp: Rename TXP data structure The TXP data structure has a name too generic for the multiple variants we'll have to support. Let's rename it to mention the SoC it applies to. Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-14-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/tests/vc4_mock.c | 4 ++-- drivers/gpu/drm/vc4/vc4_drv.h | 2 +- drivers/gpu/drm/vc4/vc4_txp.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 66fbec83678178736686d856a97d24998b0a3285 Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:44 2024 +0100 drm/vc4: txp: Introduce structure to deal with revision differences The BCM2712 will have several TXP with small differences. Let's add a structure tied to the compatible to deal with those differences. Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-13-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/tests/vc4_mock.c | 4 ++-- drivers/gpu/drm/vc4/vc4_drv.h | 6 +++++- drivers/gpu/drm/vc4/vc4_txp.c | 23 ++++++++++++++++------- 3 files changed, 23 insertions(+), 10 deletions(-) commit 0b1dbe82e051a6c0e360429a45fb3d8f52d57f7c Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:43 2024 +0100 drm/vc4: hdmi: Add support for BCM2712 HDMI controllers The HDMI controllers found in the BCM2712 are largely the ones found in the BCM2711 with a different PHY. There's some difference with how timings are split between registers, and HDMI1 is now able to run at 4k/60Hz. Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-12-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_hdmi.c | 88 ++++- drivers/gpu/drm/vc4/vc4_hdmi.h | 4 + drivers/gpu/drm/vc4/vc4_hdmi_phy.c | 640 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/vc4/vc4_hdmi_regs.h | 217 ++++++++++++ 4 files changed, 943 insertions(+), 6 deletions(-) commit 9a9ef0da8659d3f96a057b135c007f1ef1482899 Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:42 2024 +0100 drm/vc4: crtc: Add support for BCM2712 PixelValves The PixelValves found on the BCM2712 are similar to the ones found in the previous generation. Compared to BCM2711: - the pixelvalves only drive one HDMI controller each - HDMI1 PixelValve has a FIFO long enough to support 4k at 60Hz - support has been added for odd horizontal timings whilst at 2pixels/clock Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-11-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_crtc.c | 49 ++++++++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/vc4/vc4_drv.h | 2 ++ drivers/gpu/drm/vc4/vc4_regs.h | 6 ++++++ 3 files changed, 55 insertions(+), 2 deletions(-) commit 7687a12153d344b5d97a19f1e156a02da8d0d756 Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:41 2024 +0100 drm/vc4: hvs: Add support for BCM2712 HVS The HVS found in the BCM2712, while having a similar role, is very different from the one found in the previous SoCs. Indeed, the register layout is fairly different, and the DLIST format is new as well. Let's introduce the needed functions to support the new HVS. This commit adds the C-step register layout. The D-step will be added later. Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-10-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_crtc.c | 47 ++- drivers/gpu/drm/vc4/vc4_drv.c | 6 + drivers/gpu/drm/vc4/vc4_drv.h | 30 ++ drivers/gpu/drm/vc4/vc4_hvs.c | 564 +++++++++++++++++++++++++++-- drivers/gpu/drm/vc4/vc4_kms.c | 98 ++++- drivers/gpu/drm/vc4/vc4_plane.c | 767 ++++++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/vc4/vc4_regs.h | 181 ++++++++++ 7 files changed, 1616 insertions(+), 77 deletions(-) commit 626ffc5f87c7f653fd9a5fda1f11f4071a9e9570 Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:40 2024 +0100 drm/vc4: drv: Support BCM2712 The BCM2712 has an improved display pipeline, most notably with a different HVS and only HDMI and writeback outputs. Let's introduce it as a new VideoCore generation and compatible. Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-9-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_drv.c | 1 + drivers/gpu/drm/vc4/vc4_drv.h | 1 + 2 files changed, 2 insertions(+) commit 9a30145ace6fa58ccea5b5ee4ce8bff7742186d2 Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:39 2024 +0100 dt-bindings: display: Add BCM2712 KMS driver bindings The BCM2712 SoC comes with a new variation of the videocore display pipeline. Let's create a new compatible for it. Signed-off-by: Maxime Ripard <mripard@kernel.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-8-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml | 1 + 1 file changed, 1 insertion(+) commit 0d13a5c2db0a9f31565149059ab82d53f78ae8c5 Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:38 2024 +0100 dt-bindings: display: Add BCM2712 MOPLET bindings The BCM2712 has a MOPLET controller which is basically a TXP without the transpose feature. Express that by adding a new compatible for it. Signed-off-by: Maxime Ripard <mripard@kernel.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-7-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Documentation/devicetree/bindings/display/brcm,bcm2835-txp.yaml | 1 + 1 file changed, 1 insertion(+) commit f826b20438f48ac39d8d49c7c33658901d5c4fd1 Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:37 2024 +0100 dt-bindings: display: Add BCM2712 MOP bindings The BCM2712 has a MOP controller which is basically a new revision of the TXP. Express that by adding a new compatible for it. Signed-off-by: Maxime Ripard <mripard@kernel.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-6-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Documentation/devicetree/bindings/display/brcm,bcm2835-txp.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 157f857bb634a5fe2317c59aa7f72624a41805ba Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:36 2024 +0100 dt-bindings: display: Add BCM2712 PixelValve bindings The BCM2712 has 3 different pixelvalves that are similar to the ones found in the previous generations but with slightly different capabilities. Express that using a new set of compatibles. Signed-off-by: Maxime Ripard <mripard@kernel.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-5-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> .../devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 6cfcbe548a3a5d28d3dcbefa9e19d6606db9bf16 Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:35 2024 +0100 dt-bindings: display: Add BCM2712 HVS bindings The BCM2712 has a completely different HVS than the previous generations, so let's add a new compatible for it. Signed-off-by: Maxime Ripard <mripard@kernel.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-4-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 62948c62abcaf697f98aad1e3291ba95b10c9c20 Author: Maxime Ripard <mripard@kernel.org> Date: Fri Oct 25 18:15:34 2024 +0100 dt-bindings: display: Add BCM2712 HDMI bindings The BCM2712 HDMI controller uses a slightly different HDMI controller than the BCM2711, and a completely different PHY. Let's introduce a new compatible for it. Signed-off-by: Maxime Ripard <mripard@kernel.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-3-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Documentation/devicetree/bindings/display/brcm,bcm2711-hdmi.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 8f2fc64773be829d763b3bb7161dd9913deae2a9 Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Fri Oct 25 18:15:33 2024 +0100 drm/vc4: Fix reading of frame count on GEN5 / Pi4 The frame count values moved within registers DISPSTAT1 and DISPSTAT2 with GEN5, so update the accessor function to accommodate that. Fixes: b51cd7ad143d ("drm/vc4: hvs: Fix frame count register readout") Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-2-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_hvs.c | 45 +++++++++++++++++++++++++++++++----------- drivers/gpu/drm/vc4/vc4_regs.h | 6 ++++++ 2 files changed, 40 insertions(+), 11 deletions(-) commit 56aa4c374dbf86d90b7c5aabdc8facbdd3321477 Author: Dave Stevenson <dave.stevenson@raspberrypi.com> Date: Fri Oct 25 18:15:32 2024 +0100 drm/vc4: Use of_device_get_match_data to set generation Use of_device_get_match_data to retrieve the generation value as set in the struct of_device_id, rather than manually comparing compatible strings. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-1-35efa83c8fc0@raspberrypi.com Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> drivers/gpu/drm/vc4/vc4_drv.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit febc689b27d28973cd02f667548a5dca383d859a Author: Matthew Auld <matthew.auld@intel.com> Date: Tue Nov 26 18:13:01 2024 +0000 drm/xe/migrate: use XE_BO_FLAG_PAGETABLE On some HW we want to avoid the host caching PTEs, since access from GPU side can be incoherent. However here the special migrate object is mapping PTEs which are written from the host and potentially cached. Use XE_BO_FLAG_PAGETABLE to ensure that non-cached mapping is used, on platforms where this matters. Fixes: 7a060d786cc1 ("drm/xe/mtl: Map PPGTT as CPU:WC") Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Nirmoy Das <nirmoy.das@intel.com> Cc: <stable@vger.kernel.org> # v6.8+ Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126181259.159713-4-matthew.auld@intel.com drivers/gpu/drm/xe/xe_migrate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f3dc9246f9c3cd5a7d8fd70cfd805bfc52214e2e Author: Matthew Auld <matthew.auld@intel.com> Date: Tue Nov 26 18:13:00 2024 +0000 drm/xe/migrate: fix pat index usage XE_CACHE_WB must be converted into the per-platform pat index for that particular caching mode, otherwise we are just encoding whatever happens to be the value of that enum. Fixes: e8babb280b5e ("drm/xe: Convert multiple bind ops into single job") Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Nirmoy Das <nirmoy.das@intel.com> Cc: <stable@vger.kernel.org> # v6.12+ Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126181259.159713-3-matthew.auld@intel.com drivers/gpu/drm/xe/xe_migrate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f8c91d966372d7796b9908d4dd933f6900f27b76 Author: Apoorva Singh <apoorva.singh@intel.com> Date: Thu Nov 7 13:51:58 2024 +0530 drm/xe/xe3lpg: Add Wa_16024792527 Force Sampler Tile64 Overfetch via MMIO Signed-off-by: Apoorva Singh <apoorva.singh@intel.com> Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107082158.1436637-1-apoorva.singh@intel.com Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/regs/xe_gt_regs.h | 2 ++ drivers/gpu/drm/xe/xe_wa.c | 6 ++++++ 2 files changed, 8 insertions(+) commit 36a585f6bb13ca03f8dc3f1a110da243f8b766b8 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Nov 26 12:12:22 2024 +0200 drm/i915/dislay: convert i9xx_display_sr.[ch] to struct intel_display Going forward, struct intel_display is the main device data structure for display. Switch to it. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126101222.2671224-2-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/i9xx_display_sr.c | 76 ++++++++++++-------------- drivers/gpu/drm/i915/display/i9xx_display_sr.h | 6 +- drivers/gpu/drm/i915/i915_driver.c | 4 +- 3 files changed, 41 insertions(+), 45 deletions(-) commit ce44eb0063ee17b46f71f2d44b0c2b29fde1c35d Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Nov 26 12:12:21 2024 +0200 drm/i915/display: prefer DISPLAY_VER over GRAPHICS_VER in display s/r Use display version checks for display scratch registers, not graphics version. And for the older platforms it's the same thing anyway. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126101222.2671224-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/i9xx_display_sr.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit f79257f5b97199a08d5c2c039bf4908323f9dd92 Author: Zong-Zhe Yang <kevin_yang@realtek.com> Date: Wed Nov 20 11:40:54 2024 +0800 wifi: rtw89: pass target link_id to ieee80211_nullfunc_get() When calling ieee80211_nullfunc_get(), pass the target link_id instead of always -1. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241120034054.13575-7-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 3 ++- drivers/net/wireless/realtek/rtw89/fw.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit 55709b195464e59bd5c51abf25fa243d7a8b7a3e Author: Zong-Zhe Yang <kevin_yang@realtek.com> Date: Wed Nov 20 11:40:53 2024 +0800 wifi: rtw89: pass target link_id to ieee80211_gtk_rekey_add() When calling ieee80211_gtk_rekey_add(), pass the target link_id instead of always -1. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241120034054.13575-6-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/wow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a6db83bef0f587494fcc9cc5a9ec6e66ea13236e Author: Zong-Zhe Yang <kevin_yang@realtek.com> Date: Wed Nov 20 11:40:52 2024 +0800 wifi: rtw89: apply MLD pairwise key to dynamically active links In MLD connection, a pairwise key should work on all active links. And, we take just one entry in security CAM for one pairwise key. (It means we will reuse one single entry for all links.) Originally, we already applied the security CAM entry of pairwise key to deflink's address CAM. However, links can be activated dynamically. So now for pairwise keys, each rtw89_sta records the IDs of the security CAM entries. Then, when driver is notified that some links are active via change_sta_links(), we apply target pairwise keys to them according to the record. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241120034054.13575-5-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/cam.c | 32 +++++++++++++++++++++++---- drivers/net/wireless/realtek/rtw89/cam.h | 5 +++++ drivers/net/wireless/realtek/rtw89/core.h | 4 ++++ drivers/net/wireless/realtek/rtw89/mac80211.c | 16 ++++++++++++++ 4 files changed, 53 insertions(+), 4 deletions(-) commit d2b387bdca4684052d58f81667fe6fd6c746faca Author: Zong-Zhe Yang <kevin_yang@realtek.com> Date: Wed Nov 20 11:40:51 2024 +0800 wifi: rtw89: implement ops of change vif/sta links To support MLO, implement change_vif_links() and change_sta_links() ops. Basically, we follow arguments to set/clear links. One special thing is that when vif is idle, i.e. no connection, link id 0 is set up by us for default uses. So, when bitmap of vif links change from 0x0 to non-zero, we clear the default one first. And when bitmap of vif links change from non-zero to 0x0, we set up a default one at the end. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241120034054.13575-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 17 ++ drivers/net/wireless/realtek/rtw89/mac80211.c | 226 +++++++++++++++++++++++++- 2 files changed, 238 insertions(+), 5 deletions(-) commit c821a8af435ca1b029ebdf0520cfb5c35b5e3d77 Author: Zong-Zhe Yang <kevin_yang@realtek.com> Date: Wed Nov 20 11:40:50 2024 +0800 wifi: rtw89: register ops of can_activate_links Register mac80211 ops of can_activate_links which is required when we are ready to enable multiple active links. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241120034054.13575-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 1 + drivers/net/wireless/realtek/rtw89/mac80211.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) commit 144c6cd24b3556e6e7a14271cee57a42ebf97450 Author: Zong-Zhe Yang <kevin_yang@realtek.com> Date: Wed Nov 20 11:40:49 2024 +0800 wifi: rtw89: 8922a: configure AP_LINK_PS if FW supports After FW v0.35.46.0, for AP mode, RTL8922A FW supports a new FW feature, called NOTIFY_AP_INFO, to notify driver information related to AP mode. And, one function of it is to monitor PS states of remote stations. Once one of them changes, FW will send a C2H event to tell driver. With this FW feature, we can declare AP_LINK_PS. For now, driver still needs to determine if a frame is ps-poll or U-APSD trigger. So, add the corresponding RX handling in driver, which activates only when at least one AP is running. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241120034054.13575-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 42 +++++++++++++++++ drivers/net/wireless/realtek/rtw89/core.h | 37 +++++++++++++++ drivers/net/wireless/realtek/rtw89/fw.c | 66 +++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/fw.h | 19 ++++++++ drivers/net/wireless/realtek/rtw89/mac.c | 50 ++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/mac.h | 7 +++ drivers/net/wireless/realtek/rtw89/mac80211.c | 13 +++++- drivers/net/wireless/realtek/rtw89/ser.c | 1 + 8 files changed, 234 insertions(+), 1 deletion(-) commit 5c3c99868aa2e0b68ac69f8050a6b9c994e73397 Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Tue Oct 29 15:34:24 2024 +0100 drm/cirrus: Rename to cirrus-qemu This driver is only for Qemu's emulated Cirrus hardware. Name it accordingly. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029143928.208349-3-tzimmermann@suse.de MAINTAINERS | 2 +- drivers/gpu/drm/tiny/Makefile | 2 +- drivers/gpu/drm/tiny/{cirrus.c => cirrus-qemu.c} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit be2c51c3e37d95e7c0e13636c07ea79ec42333cb Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Tue Oct 29 15:34:23 2024 +0100 drm/cirrus: Use virtual encoder and connector types The cirrus driver only works on emulated Cirrus hardware. Use the correct types for encoder and connector. As a side effect, the connector has no longer an EDID property. But neither cirrus emulation nor driver provide any EDID data, so it makes sense to not pretend that there could be one. v2: - mention removed EDID property in commit description (Dmitry) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029143928.208349-2-tzimmermann@suse.de drivers/gpu/drm/tiny/cirrus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4a696a2ee646ea6f24c28b3624175a7b35482c52 Author: Vivek Kasireddy <vivek.kasireddy@intel.com> Date: Mon Nov 25 19:13:46 2024 -0800 drm/virtio: Add prepare and cleanup routines for imported dmabuf obj When an imported dmabuf obj is used as part of an atomic commit, we need to pin it as part of prepare and unpin it during cleanup of the associated FB, to make sure that it does not move until the commit is completed (and also while it is being used on the Host). Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Gurchetan Singh <gurchetansingh@chromium.org> Cc: Chia-I Wu <olvaffe@gmail.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126031643.3490496-6-vivek.kasireddy@intel.com drivers/gpu/drm/virtio/virtgpu_plane.c | 65 +++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) commit ca77f27a26657098702a25371d8b90e6004e2773 Author: Vivek Kasireddy <vivek.kasireddy@intel.com> Date: Mon Nov 25 19:13:45 2024 -0800 drm/virtio: Import prime buffers from other devices as guest blobs By importing scanout buffers from other devices, we should be able to use the virtio-gpu driver in KMS only mode. Note that we attach dynamically and register a move_notify() callback so that we can let the VMM know of any location changes associated with the backing store of the imported object by sending detach_backing cmd. Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Gurchetan Singh <gurchetansingh@chromium.org> Cc: Chia-I Wu <olvaffe@gmail.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> [dmitry.osipenko@collabora.com: added kref check to move_notify] Link: https://patchwork.freedesktop.org/patch/msgid/20241126031643.3490496-5-vivek.kasireddy@intel.com drivers/gpu/drm/virtio/virtgpu_prime.c | 65 ++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 3 deletions(-) commit 2885e575abc7738af87ca89e36d5ee0a49586cfd Author: Vivek Kasireddy <vivek.kasireddy@intel.com> Date: Mon Nov 25 19:13:44 2024 -0800 drm/virtio: Add helpers to initialize and free the imported object The imported object can be considered a guest blob resource; therefore, we use create_blob cmd while creating it. These helpers are used in the next patch which does the actual import. Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Gurchetan Singh <gurchetansingh@chromium.org> Cc: Chia-I Wu <olvaffe@gmail.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126031643.3490496-4-vivek.kasireddy@intel.com drivers/gpu/drm/virtio/virtgpu_object.c | 3 ++ drivers/gpu/drm/virtio/virtgpu_prime.c | 75 +++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) commit 25c3fd1183c0631d67cd126b2ba3e48388e15204 Author: Vivek Kasireddy <vivek.kasireddy@intel.com> Date: Mon Nov 25 19:13:43 2024 -0800 drm/virtio: Add a helper to map and note the dma addrs and lengths This helper would be used when first initializing the object as part of import and also when updating the plane where we need to ensure that the imported object's backing is valid. Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Gurchetan Singh <gurchetansingh@chromium.org> Cc: Chia-I Wu <olvaffe@gmail.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126031643.3490496-3-vivek.kasireddy@intel.com drivers/gpu/drm/virtio/virtgpu_drv.h | 5 ++++ drivers/gpu/drm/virtio/virtgpu_prime.c | 42 ++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) commit 06a0f77195c6cb34c193b3eaeffc11060f043e7a Author: Vivek Kasireddy <vivek.kasireddy@intel.com> Date: Mon Nov 25 19:13:42 2024 -0800 drm/virtio: Implement VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING cmd This cmd is useful to let the VMM (i.e, Qemu) know that the backing store associated with a resource is no longer valid, so that the VMM can perform any cleanup or unmap operations. The fence related changes and virtio_gpu_object_detach()/ virtio_gpu_detach_object_fenced() routines are extracted from a patch by Dmitry Osipenko <dmitry.osipenko@collabora.com>. Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Gurchetan Singh <gurchetansingh@chromium.org> Cc: Chia-I Wu <olvaffe@gmail.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126031643.3490496-2-vivek.kasireddy@intel.com drivers/gpu/drm/virtio/virtgpu_drv.h | 5 +++++ drivers/gpu/drm/virtio/virtgpu_object.c | 21 ++++++++++++++++++++ drivers/gpu/drm/virtio/virtgpu_vq.c | 35 +++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) commit f161809b362f027b6d72bd998e47f8f0bad60a2e Author: Matthew Auld <matthew.auld@intel.com> Date: Fri Nov 22 16:19:17 2024 +0000 drm/xe/guc_submit: fix race around suspend_pending Currently in some testcases we can trigger: xe 0000:03:00.0: [drm] Assertion `exec_queue_destroyed(q)` failed! .... WARNING: CPU: 18 PID: 2640 at drivers/gpu/drm/xe/xe_guc_submit.c:1826 xe_guc_sched_done_handler+0xa54/0xef0 [xe] xe 0000:03:00.0: [drm] *ERROR* GT1: DEREGISTER_DONE: Unexpected engine state 0x00a1, guc_id=57 Looking at a snippet of corresponding ftrace for this GuC id we can see: 162.673311: xe_sched_msg_add: dev=0000:03:00.0, gt=1 guc_id=57, opcode=3 162.673317: xe_sched_msg_recv: dev=0000:03:00.0, gt=1 guc_id=57, opcode=3 162.673319: xe_exec_queue_scheduling_disable: dev=0000:03:00.0, 1:0x2, gt=1, width=1, guc_id=57, guc_state=0x29, flags=0x0 162.674089: xe_exec_queue_kill: dev=0000:03:00.0, 1:0x2, gt=1, width=1, guc_id=57, guc_state=0x29, flags=0x0 162.674108: xe_exec_queue_close: dev=0000:03:00.0, 1:0x2, gt=1, width=1, guc_id=57, guc_state=0xa9, flags=0x0 162.674488: xe_exec_queue_scheduling_done: dev=0000:03:00.0, 1:0x2, gt=1, width=1, guc_id=57, guc_state=0xa9, flags=0x0 162.678452: xe_exec_queue_deregister: dev=0000:03:00.0, 1:0x2, gt=1, width=1, guc_id=57, guc_state=0xa1, flags=0x0 It looks like we try to suspend the queue (opcode=3), setting suspend_pending and triggering a disable_scheduling. The user then closes the queue. However the close will also forcefully signal the suspend fence after killing the queue, later when the G2H response for disable_scheduling comes back we have now cleared suspend_pending when signalling the suspend fence, so the disable_scheduling now incorrectly tries to also deregister the queue. This leads to warnings since the queue has yet to even be marked for destruction. We also seem to trigger errors later with trying to double unregister the same queue. To fix this tweak the ordering when handling the response to ensure we don't race with a disable_scheduling that didn't actually intend to perform an unregister. The destruction path should now also correctly wait for any pending_disable before marking as destroyed. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3371 Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: <stable@vger.kernel.org> # v6.8+ Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241122161914.321263-6-matthew.auld@intel.com drivers/gpu/drm/xe/xe_guc_submit.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit ddb106d2120a0bf1c5ff87c71d059d193814da41 Author: Matthew Auld <matthew.auld@intel.com> Date: Fri Nov 22 16:19:16 2024 +0000 drm/xe/guc_submit: fix race around pending_disable Currently in some testcases we can trigger: [drm] *ERROR* GT0: SCHED_DONE: Unexpected engine state 0x02b1, guc_id=8, runnable_state=0 [drm] *ERROR* GT0: G2H action 0x1002 failed (-EPROTO) len 3 msg 02 10 00 90 08 00 00 00 00 00 00 00 Looking at a snippet of corresponding ftrace for this GuC id we can see: 498.852891: xe_sched_msg_add: dev=0000:03:00.0, gt=0 guc_id=8, opcode=3 498.854083: xe_sched_msg_recv: dev=0000:03:00.0, gt=0 guc_id=8, opcode=3 498.855389: xe_exec_queue_kill: dev=0000:03:00.0, 5:0x1, gt=0, width=1, guc_id=8, guc_state=0x3, flags=0x0 498.855436: xe_exec_queue_lr_cleanup: dev=0000:03:00.0, 5:0x1, gt=0, width=1, guc_id=8, guc_state=0x83, flags=0x0 498.856767: xe_exec_queue_close: dev=0000:03:00.0, 5:0x1, gt=0, width=1, guc_id=8, guc_state=0x83, flags=0x0 498.862889: xe_exec_queue_scheduling_disable: dev=0000:03:00.0, 5:0x1, gt=0, width=1, guc_id=8, guc_state=0xa9, flags=0x0 498.863032: xe_exec_queue_scheduling_disable: dev=0000:03:00.0, 5:0x1, gt=0, width=1, guc_id=8, guc_state=0x2b9, flags=0x0 498.875596: xe_exec_queue_scheduling_done: dev=0000:03:00.0, 5:0x1, gt=0, width=1, guc_id=8, guc_state=0x2b9, flags=0x0 498.875604: xe_exec_queue_deregister: dev=0000:03:00.0, 5:0x1, gt=0, width=1, guc_id=8, guc_state=0x2b1, flags=0x0 499.074483: xe_exec_queue_deregister_done: dev=0000:03:00.0, 5:0x1, gt=0, width=1, guc_id=8, guc_state=0x2b1, flags=0x0 This looks to be the two scheduling_disable racing with each other, one from the suspend (opcode=3) and then again during lr cleanup. While those two operations are serialized, the G2H portion is not, therefore when marking the queue as pending_disabled and then firing off the first request, we proceed do the same again, however the first disable response only fires after this which then clears the pending_disabled. At this point the second comes back and is processed, however the pending_disabled is no longer set, hence triggering the warning. To fix this wait for pending_disabled when doing the lr cleanup and calling disable_scheduling_deregister. Also do the same for all other disable_scheduling callers. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3515 Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: <stable@vger.kernel.org> # v6.8+ Reviewed-by: Matthew Brost <mattheq.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241122161914.321263-5-matthew.auld@intel.com drivers/gpu/drm/xe/xe_guc_submit.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 6364a06c5e943b6761d1ffe5c177cf9cc9be867b Author: Matthew Auld <matthew.auld@intel.com> Date: Fri Nov 22 16:19:15 2024 +0000 drm/xe/trace: improve xe_sched_msg trace Also include the gt_id, that way we can ignore duplicate guc_id across different GTs when applying some filtering. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241122161914.321263-4-matthew.auld@intel.com drivers/gpu/drm/xe/xe_trace.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f7e1fe4593511ff3abe70387235a57aff546adb4 Author: Matthew Auld <matthew.auld@intel.com> Date: Tue Nov 19 10:19:27 2024 +0000 drm/xe/vram: fix lpfn check Technically we should check the lfpn value and not the place->lpfn, for the case where the allocation itself could be as large as the entire region and not be range based, which might result in incorrectly doing a power-of-two roundup. The allocator itself will already ensure it's contiguous underneath for such an allocation. This shouldn't fix any current usecase, but never the less came up from some internal testing. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Piotr Piórkowski <piotr.piorkowski@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241119101926.190203-2-matthew.auld@intel.com drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad4adad7c69a071e7a35ad6ca2c5b24c4f0f0083 Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 25 14:09:59 2024 +0200 drm/i915/ddi: clarify intel_ddi_connector_get_hw_state() for DP MST encoder->get_hw_state() returns false for DP MST, and currently always interprets 128b/132b as MST. Therefore the DDI MST mode checks in intel_ddi_connector_get_hw_state() are redundant. Prepare for future, and handle 128b/132b SST and warn on 8b/10b MST. Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241125120959.2366419-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_ddi.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 4fe70f664a105391321c85b2af241001e8118d24 Author: Matt Roper <matthew.d.roper@intel.com> Date: Mon Nov 25 11:48:39 2024 -0800 drm/xe: Update xe2_graphics name string Since both Xe2 and Xe3 platforms currently use the same set of graphics IP feature flags, we associate the "graphics_xe2" structure with both IPs. Update the name string on that IP structure to clarify this and avoid confusion as Xe3 platforms start going into public CI. Fixes: 800d75bf20ae ("drm/xe/xe3: Define Xe3 feature flags") Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241125194838.1190599-2-matthew.d.roper@intel.com drivers/gpu/drm/xe/xe_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1bae6802ee9c8ad8e3c1df7ca3174d6b4b260e5 Author: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Date: Sun Nov 24 14:20:17 2024 +0100 drm/panel-edp: Add unknown BOE panel for HP Omnibook X14 Seems to be like NV140DRM-N61 but with touch. Haven't disassembled the lid to look. Due to lack of information, use the delay_200_500_e200 timings like many other BOE panels do for now. The raw EDID of the panel is: 00 ff ff ff ff ff ff 00 09 e5 93 0c 00 00 00 00 25 21 01 04 a5 1e 13 78 03 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 a4 57 c0 dc 80 78 78 50 30 20 f6 0c 2e bc 10 00 00 1a 6d 3a c0 dc 80 78 78 50 30 20 f6 0c 2e bc 10 00 00 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 0d 36 ff 0a 3c 96 0f 09 15 96 00 00 00 01 8b There are no timings in it, sadly. Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Reviewed-by: Douglas Anderson <dianders@chromium.org> [dianders: adjusted sort order] Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241124-hp-omnibook-x14-v1-3-e4262f0254fa@oldschoolsolutions.biz drivers/gpu/drm/panel/panel-edp.c | 1 + 1 file changed, 1 insertion(+) commit b1fe820d03e2e1b89315faf99f1065bdb4146a8f Author: Maud Spierings <maud_spierings@hotmail.com> Date: Sun Nov 24 11:00:57 2024 +0100 dt-bindings: display: panel: samsung,atna56ac03: Document ATNA56AC03 The Samsung ATNA56AC03 panel is an AMOLED eDP panel. It is similar to the ATNA33xc20 except it is larger and has a different resolution. Signed-off-by: Maud Spierings <maud_spierings@hotmail.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241124-asus_qcom_display-v3-1-002b723b1920@hotmail.com Documentation/devicetree/bindings/display/panel/samsung,atna33xc20.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 63fdb90642eec9439dd13c93c4b5c184b60a50cd Author: Sriram R <quic_srirrama@quicinc.com> Date: Thu Nov 21 17:58:06 2024 +0200 wifi: ath12k: Use mac80211 sta's link_sta instead of deflink Currently mac80211's struct ieee80211_sta deflink is used to fetch any sta related configurations in driver. With MLO multiple link sta's (struct ieee80211_link_sta) are affiliated to an ML sta and corresponding link configs are present in sta->link[]. Fetch link sta of corresponding link from ML sta and use the same for configurations. Add ath12k_mac_get_link_sta() helper to fetch ieee80211_link_sta from arsta. But as ath12k_mac_op_sta_rc_update() is called in atomic context the helper cannot be used and instead rcu_dereference() has to be called directly. 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: Sriram R <quic_srirrama@quicinc.com> Co-developed-by: Rameshkumar Sundaram <quic_ramess@quicinc.com> Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20241121155806.1862733-9-kvalo@kernel.org drivers/net/wireless/ath/ath12k/mac.c | 292 ++++++++++++++++++++++++---------- 1 file changed, 209 insertions(+), 83 deletions(-) commit 3952657848c035855007f7a430a753e123935b3a Author: Sriram R <quic_srirrama@quicinc.com> Date: Thu Nov 21 17:58:05 2024 +0200 wifi: ath12k: Use mac80211 vif's link_conf instead of bss_conf Currently mac80211 vif's bss_conf is used to fetch any vif related configurations in driver but with MLO multiple links are affiliated to a vif and corresponding link configs are present in vif->link_conf[]. Fetch link_conf for corresponding link from vif and use the same for configurations. Add ath12k_mac_get_link_bss_conf() helper to fetch link_conf from arvif. 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: Sriram R <quic_srirrama@quicinc.com> Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241121155806.1862733-8-kvalo@kernel.org drivers/net/wireless/ath/ath12k/mac.c | 149 ++++++++++++++++++++++++++++------ drivers/net/wireless/ath/ath12k/wmi.c | 16 +++- 2 files changed, 141 insertions(+), 24 deletions(-) commit aaac8850a07f9072ed62f54b0e5fcb14c8e0d044 Author: Rameshkumar Sundaram <quic_ramess@quicinc.com> Date: Thu Nov 21 17:58:04 2024 +0200 wifi: ath12k: modify chanctx iterators for MLO Currently ath12k's chanctx iterator functions use deflink of given ahvif and bss_conf of corresponding vif to make sure the iterator returns intended vif. An ML vif can have multiple affiliated links each having its own channel context, hence iterate through the links of the given ahvif and use the link objects (arvif and link_conf) to make sure the chan ctx iterator returns intended link of the given vif. 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 <quic_ramess@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241121155806.1862733-7-kvalo@kernel.org drivers/net/wireless/ath/ath12k/mac.c | 80 ++++++++++++++++++++++++----------- 1 file changed, 56 insertions(+), 24 deletions(-) commit a0300e6bcfd4bc3ea9865856a3abad5f9dd6fd89 Author: Rameshkumar Sundaram <quic_ramess@quicinc.com> Date: Thu Nov 21 17:58:03 2024 +0200 wifi: ath12k: add reo queue lookup table for ML peers Currently reoqueue tid setup uses lookup table (LUT) during peer association, but for ML peer there will be multiple link peers (belonging to different underlying firmware) affiliated to each other. Hence the reo queue should be setup only on one of the links which is the primary link. Add changes to create separate ML reo queue lookup table for ML peers and use the same while setting up rx tid for ML peer's primary link. For ML peers use ml_peer_id instead of peer_id to setup/lookup the reo queue entry in the LUT. 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 <quic_ramess@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241121155806.1862733-6-kvalo@kernel.org drivers/net/wireless/ath/ath12k/dp.c | 41 +++++++++++++++++++++------- drivers/net/wireless/ath/ath12k/dp.h | 1 + drivers/net/wireless/ath/ath12k/dp_rx.c | 48 ++++++++++++++++++++++++--------- drivers/net/wireless/ath/ath12k/peer.c | 2 ++ drivers/net/wireless/ath/ath12k/peer.h | 2 +- 5 files changed, 71 insertions(+), 23 deletions(-) commit 061097e5732dc478ef0e57995fae307e1b95ed62 Author: Sriram R <quic_srirrama@quicinc.com> Date: Thu Nov 21 17:58:02 2024 +0200 wifi: ath12k: use arsta instead of sta Currently, struct ieee80211_sta (sta) is used for many WMI and mac80211 ops but for multi link station, driver should use struct ath12k_link_sta (arsta) instead of sta. Add changes to use arsta object for WMI commands and other mac80211 ops. 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: Sriram R <quic_srirrama@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241121155806.1862733-5-kvalo@kernel.org drivers/net/wireless/ath/ath12k/mac.c | 144 ++++++++++++++++++---------------- 1 file changed, 77 insertions(+), 67 deletions(-) commit ea4192553850cc6b46d5676a9514f759ef3dee0d Author: Sriram R <quic_srirrama@quicinc.com> Date: Thu Nov 21 17:58:01 2024 +0200 wifi: ath12k: add primary link for data path operations In case of Multi-link operation, data path peer setup and tid setup should be done only for primary link of multi-link station. Add changes to introduce primary link is peer. Currently, association link will be considered as primary link. 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: Sriram R <quic_srirrama@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241121155806.1862733-4-kvalo@kernel.org drivers/net/wireless/ath/ath12k/dp.c | 5 +++++ drivers/net/wireless/ath/ath12k/dp_rx.c | 10 ++++++++++ drivers/net/wireless/ath/ath12k/peer.c | 23 +++++++++++++++++++++++ drivers/net/wireless/ath/ath12k/peer.h | 8 ++++++++ 4 files changed, 46 insertions(+) commit a27fa6148dacc79451e523c2694bc0a673b1be05 Author: Sriram R <quic_srirrama@quicinc.com> Date: Thu Nov 21 17:58:00 2024 +0200 wifi: ath12k: support change_sta_links() mac80211 op Add ath12k_mac_op_change_sta_links() for adding and removing link station. 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: Sriram R <quic_srirrama@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241121155806.1862733-3-kvalo@kernel.org drivers/net/wireless/ath/ath12k/mac.c | 97 ++++++++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) commit 8e6f8bc286031291dac9ff09977e60c9a069bf80 Author: Sriram R <quic_srirrama@quicinc.com> Date: Thu Nov 21 17:57:59 2024 +0200 wifi: ath12k: Add MLO station state change handling Add changes to handle multi-link station state change with proper link handling and add code changes for ML peer creation, peer deletion. In ath12k_mac_assign_link_sta() initialise all arsta fields first and only then call rcu_assign_pointer(). This is to make sure that readers don't have access to arsta which is still modified. 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: Sriram R <quic_srirrama@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://patch.msgid.link/20241121155806.1862733-2-kvalo@kernel.org drivers/net/wireless/ath/ath12k/core.h | 4 + drivers/net/wireless/ath/ath12k/mac.c | 225 +++++++++++++++++++++++++++------ drivers/net/wireless/ath/ath12k/mac.h | 1 + drivers/net/wireless/ath/ath12k/peer.c | 83 +++++++++++- drivers/net/wireless/ath/ath12k/peer.h | 1 + 5 files changed, 271 insertions(+), 43 deletions(-) commit 01ed662bdd6fce4f59c1804b334610d710d79fa0 Author: Zhi Wang <zhiw@nvidia.com> Date: Thu Oct 17 00:19:21 2024 -0700 nvkm: correctly calculate the available space of the GSP cmdq buffer r535_gsp_cmdq_push() waits for the available page in the GSP cmdq buffer when handling a large RPC request. When it sees at least one available page in the cmdq, it quits the waiting with the amount of free buffer pages in the queue. Unfortunately, it always takes the [write pointer, buf_size) as available buffer pages before rolling back and wrongly calculates the size of the data should be copied. Thus, it can overwrite the RPC request that GSP is currently reading, which causes GSP hang due to corrupted RPC request: [ 549.209389] ------------[ cut here ]------------ [ 549.214010] WARNING: CPU: 8 PID: 6314 at drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:116 r535_gsp_msgq_wait+0xd0/0x190 [nvkm] [ 549.225678] Modules linked in: nvkm(E+) gsp_log(E) snd_seq_dummy(E) snd_hrtimer(E) snd_seq(E) snd_timer(E) snd_seq_device(E) snd(E) soundcore(E) rfkill(E) qrtr(E) vfat(E) fat(E) ipmi_ssif(E) amd_atl(E) intel_rapl_msr(E) intel_rapl_common(E) mlx5_ib(E) amd64_edac(E) edac_mce_amd(E) kvm_amd(E) ib_uverbs(E) kvm(E) ib_core(E) acpi_ipmi(E) ipmi_si(E) mxm_wmi(E) ipmi_devintf(E) rapl(E) i2c_piix4(E) wmi_bmof(E) joydev(E) ptdma(E) acpi_cpufreq(E) k10temp(E) pcspkr(E) ipmi_msghandler(E) xfs(E) libcrc32c(E) ast(E) i2c_algo_bit(E) crct10dif_pclmul(E) drm_shmem_helper(E) nvme_tcp(E) crc32_pclmul(E) ahci(E) drm_kms_helper(E) libahci(E) nvme_fabrics(E) crc32c_intel(E) nvme(E) cdc_ether(E) mlx5_core(E) nvme_core(E) usbnet(E) drm(E) libata(E) ccp(E) ghash_clmulni_intel(E) mii(E) t10_pi(E) mlxfw(E) sp5100_tco(E) psample(E) pci_hyperv_intf(E) wmi(E) dm_multipath(E) sunrpc(E) dm_mirror(E) dm_region_hash(E) dm_log(E) dm_mod(E) be2iscsi(E) bnx2i(E) cnic(E) uio(E) cxgb4i(E) cxgb4(E) tls(E) libcxgbi(E) libcxgb(E) qla4xxx(E) [ 549.225752] iscsi_boot_sysfs(E) iscsi_tcp(E) libiscsi_tcp(E) libiscsi(E) scsi_transport_iscsi(E) fuse(E) [last unloaded: gsp_log(E)] [ 549.326293] CPU: 8 PID: 6314 Comm: insmod Tainted: G E 6.9.0-rc6+ #1 [ 549.334039] Hardware name: ASRockRack 1U1G-MILAN/N/ROMED8-NL, BIOS L3.12E 09/06/2022 [ 549.341781] RIP: 0010:r535_gsp_msgq_wait+0xd0/0x190 [nvkm] [ 549.347343] Code: 08 00 00 89 da c1 e2 0c 48 8d ac 11 00 10 00 00 48 8b 0c 24 48 85 c9 74 1f c1 e0 0c 4c 8d 6d 30 83 e8 30 89 01 e9 68 ff ff ff <0f> 0b 49 c7 c5 92 ff ff ff e9 5a ff ff ff ba ff ff ff ff be c0 0c [ 549.366090] RSP: 0018:ffffacbccaaeb7d0 EFLAGS: 00010246 [ 549.371315] RAX: 0000000000000000 RBX: 0000000000000012 RCX: 0000000000923e28 [ 549.378451] RDX: 0000000000000000 RSI: 0000000055555554 RDI: ffffacbccaaeb730 [ 549.385590] RBP: 0000000000000001 R08: ffff8bd14d235f70 R09: ffff8bd14d235f70 [ 549.392721] R10: 0000000000000002 R11: ffff8bd14d233864 R12: 0000000000000020 [ 549.399854] R13: ffffacbccaaeb818 R14: 0000000000000020 R15: ffff8bb298c67000 [ 549.406988] FS: 00007f5179244740(0000) GS:ffff8bd14d200000(0000) knlGS:0000000000000000 [ 549.415076] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 549.420829] CR2: 00007fa844000010 CR3: 00000001567dc005 CR4: 0000000000770ef0 [ 549.427963] PKRU: 55555554 [ 549.430672] Call Trace: [ 549.433126] <TASK> [ 549.435233] ? __warn+0x7f/0x130 [ 549.438473] ? r535_gsp_msgq_wait+0xd0/0x190 [nvkm] [ 549.443426] ? report_bug+0x18a/0x1a0 [ 549.447098] ? handle_bug+0x3c/0x70 [ 549.450589] ? exc_invalid_op+0x14/0x70 [ 549.454430] ? asm_exc_invalid_op+0x16/0x20 [ 549.458619] ? r535_gsp_msgq_wait+0xd0/0x190 [nvkm] [ 549.463565] r535_gsp_msg_recv+0x46/0x230 [nvkm] [ 549.468257] r535_gsp_rpc_push+0x106/0x160 [nvkm] [ 549.473033] r535_gsp_rpc_rm_ctrl_push+0x40/0x130 [nvkm] [ 549.478422] nvidia_grid_init_vgpu_types+0xbc/0xe0 [nvkm] [ 549.483899] nvidia_grid_init+0xb1/0xd0 [nvkm] [ 549.488420] ? srso_alias_return_thunk+0x5/0xfbef5 [ 549.493213] nvkm_device_pci_probe+0x305/0x420 [nvkm] [ 549.498338] local_pci_probe+0x46/0xa0 [ 549.502096] pci_call_probe+0x56/0x170 [ 549.505851] pci_device_probe+0x79/0xf0 [ 549.509690] ? driver_sysfs_add+0x59/0xc0 [ 549.513702] really_probe+0xd9/0x380 [ 549.517282] __driver_probe_device+0x78/0x150 [ 549.521640] driver_probe_device+0x1e/0x90 [ 549.525746] __driver_attach+0xd2/0x1c0 [ 549.529594] ? __pfx___driver_attach+0x10/0x10 [ 549.534045] bus_for_each_dev+0x78/0xd0 [ 549.537893] bus_add_driver+0x112/0x210 [ 549.541750] driver_register+0x5c/0x120 [ 549.545596] ? __pfx_nvkm_init+0x10/0x10 [nvkm] [ 549.550224] do_one_initcall+0x44/0x300 [ 549.554063] ? do_init_module+0x23/0x240 [ 549.557989] do_init_module+0x64/0x240 Calculate the available buffer page before rolling back based on the result from the waiting. Signed-off-by: Zhi Wang <zhiw@nvidia.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241017071922.2518724-3-zhiw@nvidia.com drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8d9beb4aebc02c4bd09e1d39c9c5f1c68c786dbc Author: Zhi Wang <zhiw@nvidia.com> Date: Thu Oct 17 00:19:20 2024 -0700 nvkm/gsp: correctly advance the read pointer of GSP message queue A GSP event message consists three parts: message header, RPC header, message body. GSP calculates the number of pages to write from the total size of a GSP message. This behavior can be observed from the movement of the write pointer. However, nvkm takes only the size of RPC header and message body as the message size when advancing the read pointer. When handling a two-page GSP message in the non rollback case, It wrongly takes the message body of the previous message as the message header of the next message. As the "message length" tends to be zero, in the calculation of size needs to be copied (0 - size of (message header)), the size needs to be copied will be "0xffffffxx". It also triggers a kernel panic due to a NULL pointer error. [ 547.614102] msg: 00000f90: ff ff ff ff ff ff ff ff 40 d7 18 fb 8b 00 00 00 ........@....... [ 547.622533] msg: 00000fa0: 00 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 ................ [ 547.630965] msg: 00000fb0: ff ff ff ff ff ff ff ff 00 00 00 00 ff ff ff ff ................ [ 547.639397] msg: 00000fc0: ff ff ff ff 00 00 00 00 ff ff ff ff ff ff ff ff ................ [ 547.647832] nvkm 0000:c1:00.0: gsp: peek msg rpc fn:0 len:0x0/0xffffffffffffffe0 [ 547.655225] nvkm 0000:c1:00.0: gsp: get msg rpc fn:0 len:0x0/0xffffffffffffffe0 [ 547.662532] BUG: kernel NULL pointer dereference, address: 0000000000000020 [ 547.669485] #PF: supervisor read access in kernel mode [ 547.674624] #PF: error_code(0x0000) - not-present page [ 547.679755] PGD 0 P4D 0 [ 547.682294] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 547.686643] CPU: 22 PID: 322 Comm: kworker/22:1 Tainted: G E 6.9.0-rc6+ #1 [ 547.694893] Hardware name: ASRockRack 1U1G-MILAN/N/ROMED8-NL, BIOS L3.12E 09/06/2022 [ 547.702626] Workqueue: events r535_gsp_msgq_work [nvkm] [ 547.707921] RIP: 0010:r535_gsp_msg_recv+0x87/0x230 [nvkm] [ 547.713375] Code: 00 8b 70 08 48 89 e1 31 d2 4c 89 f7 e8 12 f5 ff ff 48 89 c5 48 85 c0 0f 84 cf 00 00 00 48 81 fd 00 f0 ff ff 0f 87 c4 00 00 00 <8b> 55 10 41 8b 46 30 85 d2 0f 85 f6 00 00 00 83 f8 04 76 10 ba 05 [ 547.732119] RSP: 0018:ffffabe440f87e10 EFLAGS: 00010203 [ 547.737335] RAX: 0000000000000010 RBX: 0000000000000008 RCX: 000000000000003f [ 547.744461] RDX: 0000000000000000 RSI: ffffabe4480a8030 RDI: 0000000000000010 [ 547.751585] RBP: 0000000000000010 R08: 0000000000000000 R09: ffffabe440f87bb0 [ 547.758707] R10: ffffabe440f87dc8 R11: 0000000000000010 R12: 0000000000000000 [ 547.765834] R13: 0000000000000000 R14: ffff9351df1e5000 R15: 0000000000000000 [ 547.772958] FS: 0000000000000000(0000) GS:ffff93708eb00000(0000) knlGS:0000000000000000 [ 547.781035] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 547.786771] CR2: 0000000000000020 CR3: 00000003cc220002 CR4: 0000000000770ef0 [ 547.793896] PKRU: 55555554 [ 547.796600] Call Trace: [ 547.799046] <TASK> [ 547.801152] ? __die+0x20/0x70 [ 547.804211] ? page_fault_oops+0x75/0x170 [ 547.808221] ? print_hex_dump+0x100/0x160 [ 547.812226] ? exc_page_fault+0x64/0x150 [ 547.816152] ? asm_exc_page_fault+0x22/0x30 [ 547.820341] ? r535_gsp_msg_recv+0x87/0x230 [nvkm] [ 547.825184] r535_gsp_msgq_work+0x42/0x50 [nvkm] [ 547.829845] process_one_work+0x196/0x3d0 [ 547.833861] worker_thread+0x2fc/0x410 [ 547.837613] ? __pfx_worker_thread+0x10/0x10 [ 547.841885] kthread+0xdf/0x110 [ 547.845031] ? __pfx_kthread+0x10/0x10 [ 547.848775] ret_from_fork+0x30/0x50 [ 547.852354] ? __pfx_kthread+0x10/0x10 [ 547.856097] ret_from_fork_asm+0x1a/0x30 [ 547.860019] </TASK> [ 547.862208] Modules linked in: nvkm(E) gsp_log(E) snd_seq_dummy(E) snd_hrtimer(E) snd_seq(E) snd_timer(E) snd_seq_device(E) snd(E) soundcore(E) rfkill(E) qrtr(E) vfat(E) fat(E) ipmi_ssif(E) amd_atl(E) intel_rapl_msr(E) intel_rapl_common(E) amd64_edac(E) mlx5_ib(E) edac_mce_amd(E) kvm_amd(E) ib_uverbs(E) kvm(E) ib_core(E) acpi_ipmi(E) ipmi_si(E) ipmi_devintf(E) mxm_wmi(E) joydev(E) rapl(E) ptdma(E) i2c_piix4(E) acpi_cpufreq(E) wmi_bmof(E) pcspkr(E) k10temp(E) ipmi_msghandler(E) xfs(E) libcrc32c(E) ast(E) i2c_algo_bit(E) drm_shmem_helper(E) crct10dif_pclmul(E) drm_kms_helper(E) ahci(E) crc32_pclmul(E) nvme_tcp(E) libahci(E) nvme(E) crc32c_intel(E) nvme_fabrics(E) cdc_ether(E) nvme_core(E) usbnet(E) mlx5_core(E) ghash_clmulni_intel(E) drm(E) libata(E) ccp(E) mii(E) t10_pi(E) mlxfw(E) sp5100_tco(E) psample(E) pci_hyperv_intf(E) wmi(E) dm_multipath(E) sunrpc(E) dm_mirror(E) dm_region_hash(E) dm_log(E) dm_mod(E) be2iscsi(E) bnx2i(E) cnic(E) uio(E) cxgb4i(E) cxgb4(E) tls(E) libcxgbi(E) libcxgb(E) qla4xxx(E) [ 547.862283] iscsi_boot_sysfs(E) iscsi_tcp(E) libiscsi_tcp(E) libiscsi(E) scsi_transport_iscsi(E) fuse(E) [last unloaded: gsp_log(E)] [ 547.962691] CR2: 0000000000000020 [ 547.966003] ---[ end trace 0000000000000000 ]--- [ 549.012012] clocksource: Long readout interval, skipping watchdog check: cs_nsec: 1370499158 wd_nsec: 1370498904 [ 549.043676] pstore: backend (erst) writing error (-28) [ 549.050924] RIP: 0010:r535_gsp_msg_recv+0x87/0x230 [nvkm] [ 549.056389] Code: 00 8b 70 08 48 89 e1 31 d2 4c 89 f7 e8 12 f5 ff ff 48 89 c5 48 85 c0 0f 84 cf 00 00 00 48 81 fd 00 f0 ff ff 0f 87 c4 00 00 00 <8b> 55 10 41 8b 46 30 85 d2 0f 85 f6 00 00 00 83 f8 04 76 10 ba 05 [ 549.075138] RSP: 0018:ffffabe440f87e10 EFLAGS: 00010203 [ 549.080361] RAX: 0000000000000010 RBX: 0000000000000008 RCX: 000000000000003f [ 549.087484] RDX: 0000000000000000 RSI: ffffabe4480a8030 RDI: 0000000000000010 [ 549.094609] RBP: 0000000000000010 R08: 0000000000000000 R09: ffffabe440f87bb0 [ 549.101733] R10: ffffabe440f87dc8 R11: 0000000000000010 R12: 0000000000000000 [ 549.108857] R13: 0000000000000000 R14: ffff9351df1e5000 R15: 0000000000000000 [ 549.115982] FS: 0000000000000000(0000) GS:ffff93708eb00000(0000) knlGS:0000000000000000 [ 549.124061] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 549.129807] CR2: 0000000000000020 CR3: 00000003cc220002 CR4: 0000000000770ef0 [ 549.136940] PKRU: 55555554 [ 549.139653] Kernel panic - not syncing: Fatal exception [ 549.145054] Kernel Offset: 0x18c00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) [ 549.165074] ---[ end Kernel panic - not syncing: Fatal exception ]--- Also, nvkm wrongly advances the read pointer when handling a two-page GSP message in the rollback case. In the rollback case, the GSP message will be copied in two rounds. When handling a two-page GSP message, nvkm first copies amount of (GSP_PAGE_SIZE - header) data into the buffer, then advances the read pointer by the result of DIV_ROUND_UP(size, GSP_PAGE_SIZE). Thus, the read pointer is advanced by 1. Next, nvkm copies the amount of (total size - (GSP_PAGE_SIZE - header)) data into the buffer. The left amount of the data will be always larger than one page since the message header is not taken into account in the first copy. Thus, the read pointer is advanced by DIV_ROUND_UP( size(larger than one page), GSP_PAGE_SIZE) = 2. In the end, the read pointer is wrongly advanced by 3 when handling a two-page GSP message in the rollback case. Fix the problems by taking the total size of the message into account when advancing the read pointer and calculate the read pointer in the end of the all copies for the rollback case. BTW: the two-page GSP message can be observed in the msgq when vGPU is enabled. Signed-off-by: Zhi Wang <zhiw@nvidia.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241017071922.2518724-2-zhiw@nvidia.com drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit de5c149a9b8ace0cfd3fc6be30fe98a13fff10d3 Author: Zhang He <zhanghe9702@163.com> Date: Wed Nov 20 20:32:45 2024 +0800 drm/i915: Fixed an typo in i915_gem_gtt.c in function `i915_gem_gtt_reserve` @node comment, i915_vma has no `mode` member, `i915_vma.node` is the correct name Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Zhang He <zhanghe9702@163.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241120123245.71101-1-zhanghe9702@163.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78f5685f412d4f7d752da9733bed137854604cda Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Mon Oct 21 17:07:51 2024 +0300 drm/tidss: Rename 'wait_lock' to 'irq_lock' The 'wait_lock' name seems to be a copy-paste from omapdrm, and makes no sense here. Rename it to 'irq_lock'. Also clarify the related comment to make it clear what it protects, and drop any comments related to 'wait_list' which doesn't exist in tidss. Reviewed-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Aradhya Bhatia <aradhya.bhatia@linux.dev> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241021-tidss-irq-fix-v1-7-82ddaec94e4a@ideasonboard.com drivers/gpu/drm/tidss/tidss_dispc.c | 4 ++-- drivers/gpu/drm/tidss/tidss_drv.c | 2 +- drivers/gpu/drm/tidss/tidss_drv.h | 5 +++-- drivers/gpu/drm/tidss/tidss_irq.c | 19 +++++++++---------- 4 files changed, 15 insertions(+), 15 deletions(-) commit a9a73f2661e6f625d306c9b0ef082e4593f45a21 Author: Devarsh Thakkar <devarsht@ti.com> Date: Mon Oct 21 17:07:50 2024 +0300 drm/tidss: Fix race condition while handling interrupt registers The driver has a spinlock for protecting the irq_masks field and irq enable registers. However, the driver misses protecting the irq status registers which can lead to races. Take the spinlock when accessing irqstatus too. Fixes: 32a1795f57ee ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Cc: stable@vger.kernel.org Signed-off-by: Devarsh Thakkar <devarsht@ti.com> [Tomi: updated the desc] Reviewed-by: Jonathan Cormier <jcormier@criticallink.com> Tested-by: Jonathan Cormier <jcormier@criticallink.com> Reviewed-by: Aradhya Bhatia <aradhya.bhatia@linux.dev> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241021-tidss-irq-fix-v1-6-82ddaec94e4a@ideasonboard.com drivers/gpu/drm/tidss/tidss_dispc.c | 4 ++++ drivers/gpu/drm/tidss/tidss_irq.c | 2 ++ 2 files changed, 6 insertions(+) commit 361a2ebb5cad211732ec3c5d962de49b21895590 Author: Devarsh Thakkar <devarsht@ti.com> Date: Mon Oct 21 17:07:49 2024 +0300 drm/tidss: Clear the interrupt status for interrupts being disabled The driver does not touch the irqstatus register when it is disabling interrupts. This might cause an interrupt to trigger for an interrupt that was just disabled. To fix the issue, clear the irqstatus registers right after disabling the interrupts. Fixes: 32a1795f57ee ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Cc: stable@vger.kernel.org Reported-by: Jonathan Cormier <jcormier@criticallink.com> Closes: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1394222/am625-issue-about-tidss-rcu_preempt-self-detected-stall-on-cpu/5424479#5424479 Signed-off-by: Devarsh Thakkar <devarsht@ti.com> [Tomi: mostly rewrote the patch] Reviewed-by: Jonathan Cormier <jcormier@criticallink.com> Tested-by: Jonathan Cormier <jcormier@criticallink.com> Reviewed-by: Aradhya Bhatia <aradhya.bhatia@linux.dev> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241021-tidss-irq-fix-v1-5-82ddaec94e4a@ideasonboard.com drivers/gpu/drm/tidss/tidss_dispc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 76bae5b9e206d6649d1a944c0f7a6c147b8e5bf6 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Mon Oct 21 17:07:48 2024 +0300 drm/tidss: Add printing of underflows Add printing of underflows the same way as we handle sync losts. Reviewed-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Aradhya Bhatia <aradhya.bhatia@linux.dev> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241021-tidss-irq-fix-v1-4-82ddaec94e4a@ideasonboard.com drivers/gpu/drm/tidss/tidss_irq.c | 14 ++++++++++++++ drivers/gpu/drm/tidss/tidss_plane.c | 8 ++++++++ drivers/gpu/drm/tidss/tidss_plane.h | 2 ++ 3 files changed, 24 insertions(+) commit f8e59e62b7759b0e799922c184c3b0085d163a0c Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Mon Oct 21 17:07:47 2024 +0300 drm/tidss: Remove extra K2G check We check if the platform is K2G in dispc_k3_clear_irqstatus(), and return early if so. This cannot happen, as the _k3_ functions are never called on K2G in the first place. So remove the check. Reviewed-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Aradhya Bhatia <aradhya.bhatia@linux.dev> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241021-tidss-irq-fix-v1-3-82ddaec94e4a@ideasonboard.com drivers/gpu/drm/tidss/tidss_dispc.c | 2 -- 1 file changed, 2 deletions(-) commit 18f430acb41c957c87c41d240d277b135e47b367 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Mon Oct 21 17:07:46 2024 +0300 drm/tidss: Remove unused OCP error flag We never use the DSS_IRQ_DEVICE_OCP_ERR flag, and the HW doesn't even have such a bit... So remove it. Reviewed-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Aradhya Bhatia <aradhya.bhatia@linux.dev> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241021-tidss-irq-fix-v1-2-82ddaec94e4a@ideasonboard.com drivers/gpu/drm/tidss/tidss_irq.c | 5 +---- drivers/gpu/drm/tidss/tidss_irq.h | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) commit 44b6730ab53ef04944fbaf6da0e77397531517b7 Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Mon Oct 21 17:07:45 2024 +0300 drm/tidss: Fix issue in irq handling causing irq-flood issue It has been observed that sometimes DSS will trigger an interrupt and the top level interrupt (DISPC_IRQSTATUS) is not zero, but the VP and VID level interrupt-statuses are zero. As the top level irqstatus is supposed to tell whether we have VP/VID interrupts, the thinking of the driver authors was that this particular case could never happen. Thus the driver only clears the DISPC_IRQSTATUS bits which has corresponding interrupts in VP/VID status. So when this issue happens, the driver will not clear DISPC_IRQSTATUS, and we get an interrupt flood. It is unclear why the issue happens. It could be a race issue in the driver, but no such race has been found. It could also be an issue with the HW. However a similar case can be easily triggered by manually writing to DISPC_IRQSTATUS_RAW. This will forcibly set a bit in the DISPC_IRQSTATUS and trigger an interrupt, and as the driver never clears the bit, we get an interrupt flood. To fix the issue, always clear DISPC_IRQSTATUS. The concern with this solution is that if the top level irqstatus is the one that triggers the interrupt, always clearing DISPC_IRQSTATUS might leave some interrupts unhandled if VP/VID interrupt statuses have bits set. However, testing shows that if any of the irqstatuses is set (i.e. even if DISPC_IRQSTATUS == 0, but a VID irqstatus has a bit set), we will get an interrupt. Co-developed-by: Bin Liu <b-liu@ti.com> Signed-off-by: Bin Liu <b-liu@ti.com> Co-developed-by: Devarsh Thakkar <devarsht@ti.com> Signed-off-by: Devarsh Thakkar <devarsht@ti.com> Co-developed-by: Jonathan Cormier <jcormier@criticallink.com> Signed-off-by: Jonathan Cormier <jcormier@criticallink.com> Fixes: 32a1795f57ee ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Cc: stable@vger.kernel.org Tested-by: Jonathan Cormier <jcormier@criticallink.com> Reviewed-by: Aradhya Bhatia <aradhya.bhatia@linux.dev> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241021-tidss-irq-fix-v1-1-82ddaec94e4a@ideasonboard.com drivers/gpu/drm/tidss/tidss_dispc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit c05c5e5aa163f4682ca97a2f0536575fc7dbdecb Author: Jianbo Liu <jianbol@nvidia.com> Date: Tue Nov 12 14:10:31 2024 +0200 xfrm: replay: Fix the update of replay_esn->oseq_hi for GSO When skb needs GSO and wrap around happens, if xo->seq.low (seqno of the first skb segment) is before the last seq number but oseq (seqno of the last segment) is after it, xo->seq.low is still bigger than replay_esn->oseq while oseq is smaller than it, so the update of replay_esn->oseq_hi is missed for this case wrap around because of the change in the cited commit. For example, if sending a packet with gso_segs=3 while old replay_esn->oseq=0xfffffffe, we calculate: xo->seq.low = 0xfffffffe + 1 = 0x0xffffffff oseq = 0xfffffffe + 3 = 0x1 (oseq < replay_esn->oseq) is true, but (xo->seq.low < replay_esn->oseq) is false, so replay_esn->oseq_hi is not incremented. To fix this issue, change the outer checking back for the update of replay_esn->oseq_hi. And add new checking inside for the update of packet's oseq_hi. Fixes: 4b549ccce941 ("xfrm: replay: Fix ESN wrap around for GSO") Signed-off-by: Jianbo Liu <jianbol@nvidia.com> Reviewed-by: Patrisious Haddad <phaddad@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> net/xfrm/xfrm_replay.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit ca053ee3c6a7a877754e6f444ce5f520e3c0a856 Author: Philipp Stanner <pstanner@redhat.com> Date: Mon Oct 21 11:11:16 2024 +0200 drm/lsdc: Request PCI BAR lsdc currently just ioremaps its PCI BAR with pcim_iomap(). Performing a region regquest additionally can make the driver more robust. Replace pcim_iomap() with the managed function pcim_iomap_region() which performs the request and ioremaps the BAR. Signed-off-by: Philipp Stanner <pstanner@redhat.com> Reviewed-by: Sui Jingfeng <sui.jingfeng@linux.dev> Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev> Link: https://patchwork.freedesktop.org/patch/msgid/20241021091116.14368-1-pstanner@redhat.com drivers/gpu/drm/loongson/lsdc_drv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a9f7b97ddae36d664d627b152d5c5a07b32ba816 Author: John Harrison <John.C.Harrison@Intel.com> Date: Tue Nov 19 16:02:22 2024 -0800 drm/xe/guc: Add support for G2G communications Some features require inter-GuC communication channels on multi-tile devices. So allocate and enable such. v2: Correct use of xe_bo_get/put (review feedback from Matthew Brost) Add extra assert, re-order a calculation for better clarity and add comments to slot calculation (review feedback from Daniele). Also slightly re-work the slot calc to avoid code duplication. Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241120000222.204095-3-John.C.Harrison@Intel.com drivers/gpu/drm/xe/abi/guc_actions_abi.h | 20 ++ drivers/gpu/drm/xe/xe_guc.c | 308 ++++++++++++++++++++++++++++++- drivers/gpu/drm/xe/xe_guc_types.h | 10 + 3 files changed, 337 insertions(+), 1 deletion(-) commit 5a3b0df25d6a78098d548213384665eeead608c9 Author: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Date: Tue Nov 19 16:02:21 2024 -0800 drm/xe: Allow bo mapping on multiple ggtts Make bo->ggtt an array to support bo mapping on multiple ggtts. Add XE_BO_FLAG_GGTTx flags to map the bo on ggtt of tile 'x'. Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241120000222.204095-2-John.C.Harrison@Intel.com drivers/gpu/drm/xe/display/xe_fb_pin.c | 12 +++++---- drivers/gpu/drm/xe/xe_bo.c | 49 ++++++++++++++++++++++++---------- drivers/gpu/drm/xe/xe_bo.h | 32 ++++++++++++++++++---- drivers/gpu/drm/xe/xe_bo_evict.c | 14 +++++++--- drivers/gpu/drm/xe/xe_bo_types.h | 5 ++-- drivers/gpu/drm/xe/xe_ggtt.c | 35 +++++++++++++----------- 6 files changed, 101 insertions(+), 46 deletions(-) commit ae78ec0a52c448093fe19d5deb9972dc18f3d469 Author: Matt Atwood <matthew.s.atwood@intel.com> Date: Thu Nov 14 15:44:10 2024 -0800 drm/xe/ptl: Add another PTL PCI ID An additional pci id has been added to bspec. Bspec: 72574 Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114234410.145863-1-matthew.s.atwood@intel.com include/drm/intel/xe_pciids.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 850d71f6bf4c2010efae845f9ff841cce902f22c Author: Lizhi Hou <lizhi.hou@amd.com> Date: Mon Nov 18 09:29:42 2024 -0800 accel/amdxdna: Add query functions Add GET_INFO ioctl to retrieve hardware information, including AIE, clock, hardware context etc. Co-developed-by: Min Ma <min.ma@amd.com> Signed-off-by: Min Ma <min.ma@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118172942.2014541-11-lizhi.hou@amd.com drivers/accel/amdxdna/aie2_message.c | 65 ++++++++++ drivers/accel/amdxdna/aie2_pci.c | 222 ++++++++++++++++++++++++++++++++ drivers/accel/amdxdna/aie2_pci.h | 1 + drivers/accel/amdxdna/amdxdna_pci_drv.c | 19 +++ drivers/accel/amdxdna/amdxdna_pci_drv.h | 3 + include/uapi/drm/amdxdna_accel.h | 166 ++++++++++++++++++++++++ 6 files changed, 476 insertions(+) commit 4fd4ca984b833a41f36bf7b2eaa9025377e310d0 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Mon Nov 18 09:29:41 2024 -0800 accel/amdxdna: Add error handling When there is a hardware error, the NPU firmware notifies the host through a mailbox message. The message includes details of the error, such as the tile and column indexes where the error occurred. The driver starts a thread to handle the NPU error message. The thread stops the clients which are using the column where error occurred. Then the driver resets that column. Co-developed-by: Min Ma <min.ma@amd.com> Signed-off-by: Min Ma <min.ma@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118172942.2014541-10-lizhi.hou@amd.com drivers/accel/amdxdna/Makefile | 1 + drivers/accel/amdxdna/aie2_error.c | 360 +++++++++++++++++++++++++++++++++++ drivers/accel/amdxdna/aie2_message.c | 19 ++ drivers/accel/amdxdna/aie2_pci.c | 32 ++++ drivers/accel/amdxdna/aie2_pci.h | 9 + 5 files changed, 421 insertions(+) commit bed4c73e59e8e32a3dd68a5ea755601ab000bf7b Author: Lizhi Hou <lizhi.hou@amd.com> Date: Mon Nov 18 09:29:40 2024 -0800 accel/amdxdna: Add suspend and resume Implement PCI power management suspend and resume callbacks. Co-developed-by: Narendra Gutta <VenkataNarendraKumar.Gutta@amd.com> Signed-off-by: Narendra Gutta <VenkataNarendraKumar.Gutta@amd.com> Co-developed-by: Xiaoming Ren <xiaoming.ren@amd.com> Signed-off-by: Xiaoming Ren <xiaoming.ren@amd.com> Co-developed-by: Min Ma <min.ma@amd.com> Signed-off-by: Min Ma <min.ma@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118172942.2014541-9-lizhi.hou@amd.com drivers/accel/amdxdna/aie2_ctx.c | 30 ++++++++ drivers/accel/amdxdna/aie2_pci.c | 4 ++ drivers/accel/amdxdna/aie2_pci.h | 2 + drivers/accel/amdxdna/amdxdna_ctx.c | 26 +++++++ drivers/accel/amdxdna/amdxdna_ctx.h | 2 + drivers/accel/amdxdna/amdxdna_pci_drv.c | 120 +++++++++++++++++++++++++++++++- drivers/accel/amdxdna/amdxdna_pci_drv.h | 4 ++ 7 files changed, 185 insertions(+), 3 deletions(-) commit aac243092b707bb3018e951d470cc1a9bcbaba6c Author: Lizhi Hou <lizhi.hou@amd.com> Date: Mon Nov 18 09:29:39 2024 -0800 accel/amdxdna: Add command execution Add interfaces for user application to submit command and wait for its completion. Co-developed-by: Min Ma <min.ma@amd.com> Signed-off-by: Min Ma <min.ma@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118172942.2014541-8-lizhi.hou@amd.com drivers/accel/amdxdna/aie2_ctx.c | 607 ++++++++++++++++++++++++- drivers/accel/amdxdna/aie2_message.c | 343 ++++++++++++++ drivers/accel/amdxdna/aie2_pci.c | 5 + drivers/accel/amdxdna/aie2_pci.h | 39 ++ drivers/accel/amdxdna/aie2_psp.c | 2 + drivers/accel/amdxdna/aie2_smu.c | 2 + drivers/accel/amdxdna/amdxdna_ctx.c | 320 ++++++++++++- drivers/accel/amdxdna/amdxdna_ctx.h | 111 +++++ drivers/accel/amdxdna/amdxdna_gem.c | 1 + drivers/accel/amdxdna/amdxdna_mailbox_helper.c | 5 + drivers/accel/amdxdna/amdxdna_pci_drv.c | 12 + drivers/accel/amdxdna/amdxdna_pci_drv.h | 5 + drivers/accel/amdxdna/amdxdna_sysfs.c | 5 + drivers/accel/amdxdna/npu1_regs.c | 1 + drivers/accel/amdxdna/npu2_regs.c | 1 + drivers/accel/amdxdna/npu4_regs.c | 1 + drivers/accel/amdxdna/npu5_regs.c | 1 + include/trace/events/amdxdna.h | 41 ++ include/uapi/drm/amdxdna_accel.h | 38 ++ 19 files changed, 1531 insertions(+), 9 deletions(-) commit ac49797c1815d4f8f04b7053b2998c546283c89e Author: Lizhi Hou <lizhi.hou@amd.com> Date: Mon Nov 18 09:29:38 2024 -0800 accel/amdxdna: Add GEM buffer object management There different types of BOs are supported: - shmem A user application uses shmem BOs as input/output for its workload running on NPU. - device memory heap The fixed size buffer dedicated to the device. - device buffer The buffer object allocated from device memory heap. - command buffer The buffer object created for delivering commands. The command buffer object is small and pinned on creation. New IOCTLs are added: CREATE_BO, GET_BO_INFO, SYNC_BO. SYNC_BO is used to explicitly flush CPU cache for BO memory. Co-developed-by: Min Ma <min.ma@amd.com> Signed-off-by: Min Ma <min.ma@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118172942.2014541-7-lizhi.hou@amd.com drivers/accel/amdxdna/Makefile | 1 + drivers/accel/amdxdna/aie2_ctx.c | 85 ++++- drivers/accel/amdxdna/aie2_message.c | 80 ++++ drivers/accel/amdxdna/aie2_pci.h | 3 + drivers/accel/amdxdna/amdxdna_ctx.h | 10 + drivers/accel/amdxdna/amdxdna_gem.c | 621 ++++++++++++++++++++++++++++++++ drivers/accel/amdxdna/amdxdna_gem.h | 65 ++++ drivers/accel/amdxdna/amdxdna_pci_drv.c | 12 + drivers/accel/amdxdna/amdxdna_pci_drv.h | 6 + include/uapi/drm/amdxdna_accel.h | 77 ++++ 10 files changed, 959 insertions(+), 1 deletion(-) commit be462c97b7dfd24999babe39cce3de224ebe1f80 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Mon Nov 18 09:29:37 2024 -0800 accel/amdxdna: Add hardware context The hardware can be shared among multiple user applications. The hardware resources are allocated/freed based on the request from user application via driver IOCTLs. DRM_IOCTL_AMDXDNA_CREATE_HWCTX Allocate tile columns and create a hardware context structure to track the usage and status of the resources. A hardware context ID is returned for XDNA command execution. DRM_IOCTL_AMDXDNA_DESTROY_HWCTX Release hardware context based on its ID. The tile columns belong to this hardware context will be reclaimed. DRM_IOCTL_AMDXDNA_CONFIG_HWCTX Config hardware context. Bind the hardware context to the required resources. Co-developed-by: Min Ma <min.ma@amd.com> Signed-off-by: Min Ma <min.ma@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118172942.2014541-6-lizhi.hou@amd.com drivers/accel/amdxdna/Makefile | 2 + drivers/accel/amdxdna/aie2_ctx.c | 186 +++++++++++++++++++++++++++ drivers/accel/amdxdna/aie2_message.c | 90 +++++++++++++ drivers/accel/amdxdna/aie2_pci.c | 43 +++++++ drivers/accel/amdxdna/aie2_pci.h | 13 ++ drivers/accel/amdxdna/amdxdna_ctx.c | 219 ++++++++++++++++++++++++++++++++ drivers/accel/amdxdna/amdxdna_ctx.h | 39 ++++++ drivers/accel/amdxdna/amdxdna_pci_drv.c | 125 +++++++++++++++++- drivers/accel/amdxdna/amdxdna_pci_drv.h | 20 +++ include/uapi/drm/amdxdna_accel.h | 131 +++++++++++++++++++ 10 files changed, 867 insertions(+), 1 deletion(-) commit c88d3325ae69b30be7bb80080d211dbfced8003f Author: Lizhi Hou <lizhi.hou@amd.com> Date: Mon Nov 18 09:29:36 2024 -0800 accel/amdxdna: Add hardware resource solver The AI Engine consists of 2D array of tiles arranged as columns. Provides the basic column allocation and release functions for the tile columns. Co-developed-by: Min Ma <min.ma@amd.com> Signed-off-by: Min Ma <min.ma@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118172942.2014541-5-lizhi.hou@amd.com drivers/accel/amdxdna/Makefile | 1 + drivers/accel/amdxdna/aie2_pci.c | 23 ++- drivers/accel/amdxdna/aie2_solver.c | 330 ++++++++++++++++++++++++++++++++ drivers/accel/amdxdna/aie2_solver.h | 154 +++++++++++++++ drivers/accel/amdxdna/amdxdna_pci_drv.h | 1 + 5 files changed, 508 insertions(+), 1 deletion(-) commit b87f920b934426a24d54613f12ed67c03ae05024 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Mon Nov 18 09:29:35 2024 -0800 accel/amdxdna: Support hardware mailbox The hardware mailboxes are used by the driver to submit requests to firmware and receive the completion notices from hardware. Initially, a management mailbox channel is up and running. The driver may request firmware to create/destroy more channels dynamically through management channel. Add driver internal mailbox interfaces. - create/destroy a mailbox channel instance - send a message to the firmware through a specific channel - wait for a notification from the specific channel Co-developed-by: George Yang <George.Yang@amd.com> Signed-off-by: George Yang <George.Yang@amd.com> Co-developed-by: Min Ma <min.ma@amd.com> Signed-off-by: Min Ma <min.ma@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118172942.2014541-4-lizhi.hou@amd.com MAINTAINERS | 1 + drivers/accel/amdxdna/Makefile | 3 + drivers/accel/amdxdna/aie2_message.c | 194 +++++++++ drivers/accel/amdxdna/aie2_msg_priv.h | 370 ++++++++++++++++ drivers/accel/amdxdna/aie2_pci.c | 256 ++++++++++- drivers/accel/amdxdna/aie2_pci.h | 62 +++ drivers/accel/amdxdna/aie2_psp.c | 2 + drivers/accel/amdxdna/amdxdna_mailbox.c | 576 +++++++++++++++++++++++++ drivers/accel/amdxdna/amdxdna_mailbox.h | 124 ++++++ drivers/accel/amdxdna/amdxdna_mailbox_helper.c | 56 +++ drivers/accel/amdxdna/amdxdna_mailbox_helper.h | 42 ++ drivers/accel/amdxdna/amdxdna_pci_drv.h | 8 + drivers/accel/amdxdna/amdxdna_sysfs.c | 11 + drivers/accel/amdxdna/npu1_regs.c | 1 + drivers/accel/amdxdna/npu2_regs.c | 1 + drivers/accel/amdxdna/npu4_regs.c | 1 + drivers/accel/amdxdna/npu5_regs.c | 1 + include/trace/events/amdxdna.h | 60 +++ 18 files changed, 1768 insertions(+), 1 deletion(-) commit 8c9ff1b181ba3d31d6b4a48606248b52180a7046 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Mon Nov 18 09:29:34 2024 -0800 accel/amdxdna: Add a new driver for AMD AI Engine AMD AI Engine forms the core of AMD NPU and can be used for accelerating machine learning applications. Add the driver to support AI Engine integrated to AMD CPU. Only very basic functionalities are added. - module and PCI device initialization - firmware load - power up - low level hardware initialization Co-developed-by: Narendra Gutta <VenkataNarendraKumar.Gutta@amd.com> Signed-off-by: Narendra Gutta <VenkataNarendraKumar.Gutta@amd.com> Co-developed-by: George Yang <George.Yang@amd.com> Signed-off-by: George Yang <George.Yang@amd.com> Co-developed-by: Min Ma <min.ma@amd.com> Signed-off-by: Min Ma <min.ma@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118172942.2014541-3-lizhi.hou@amd.com MAINTAINERS | 10 ++ drivers/accel/Kconfig | 1 + drivers/accel/Makefile | 1 + drivers/accel/amdxdna/Kconfig | 18 ++++ drivers/accel/amdxdna/Makefile | 13 +++ drivers/accel/amdxdna/TODO | 5 + drivers/accel/amdxdna/aie2_pci.c | 181 ++++++++++++++++++++++++++++++++ drivers/accel/amdxdna/aie2_pci.h | 130 +++++++++++++++++++++++ drivers/accel/amdxdna/aie2_psp.c | 142 +++++++++++++++++++++++++ drivers/accel/amdxdna/aie2_smu.c | 117 +++++++++++++++++++++ drivers/accel/amdxdna/amdxdna_pci_drv.c | 129 +++++++++++++++++++++++ drivers/accel/amdxdna/amdxdna_pci_drv.h | 76 ++++++++++++++ drivers/accel/amdxdna/amdxdna_sysfs.c | 51 +++++++++ drivers/accel/amdxdna/npu1_regs.c | 99 +++++++++++++++++ drivers/accel/amdxdna/npu2_regs.c | 116 ++++++++++++++++++++ drivers/accel/amdxdna/npu4_regs.c | 116 ++++++++++++++++++++ drivers/accel/amdxdna/npu5_regs.c | 116 ++++++++++++++++++++ include/uapi/drm/amdxdna_accel.h | 24 +++++ 18 files changed, 1345 insertions(+) commit cafb2c9c27e3d0c63eae3be71b516e0d40ce2bb3 Author: Lizhi Hou <lizhi.hou@amd.com> Date: Mon Nov 18 09:29:33 2024 -0800 accel/amdxdna: Add documentation for AMD NPU accelerator driver AMD NPU (Neural Processing Unit) is a multi-user AI inference accelerator integrated into AMD client APU. NPU enables efficient execution of Machine Learning applications like CNN, LLM, etc. NPU is based on AMD XDNA Architecture. NPU is managed by amdxdna driver. Co-developed-by: Sonal Santan <sonal.santan@amd.com> Signed-off-by: Sonal Santan <sonal.santan@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118172942.2014541-2-lizhi.hou@amd.com Documentation/accel/amdxdna/amdnpu.rst | 281 +++++++++++++++++++++++++++++++++ Documentation/accel/amdxdna/index.rst | 11 ++ Documentation/accel/index.rst | 1 + 3 files changed, 293 insertions(+) commit 57250e0fa30194d4ac309ee87573bed71db68b46 Author: Jeffrey Hugo <quic_jhugo@quicinc.com> Date: Sun Nov 17 13:26:29 2024 -0700 accel/qaic: Drop redundant vfree() null check in sahara The documentation for vfree() says that passing in NULL is ok. Therefore we can drop the null check as redundant. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202410301732.abF5Md4e-lkp@intel.com/ Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Youssef Samir <quic_yabdulra@quicinc.com> Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241117202629.1681358-1-quic_jhugo@quicinc.com drivers/accel/qaic/sahara.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 465d9057e5bc414c9d0173209a76dfebf3adf35d Author: Michal Wajdeczko <michal.wajdeczko@intel.com> Date: Thu Nov 21 18:57:54 2024 +0100 drm/xe/pf: Drop 2GiB limit of fair LMEM allocation Since commit 678ccbf98796 ("drm/xe/vram: drop 2G block restriction") we are able to provision VFs with more than 2GiB. Drop our temporary limit of maximum fair LMEM size that was added just to avoid hitting -EINVAL from auto-provisioning. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com> Reviewed-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241121175754.302-1-michal.wajdeczko@intel.com drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 2 -- 1 file changed, 2 deletions(-) commit 98efdd02e220fea84c1491012d7292749a71faeb Author: Louis Chauvet <louis.chauvet@bootlin.com> Date: Mon Nov 18 19:28:24 2024 +0100 drm/vkms: Remove useless drm_rotation_simplify As all the rotation are now supported by VKMS, this simplification does not make sense anymore, so remove it. Acked-by: Maíra Canal <mairacanal@riseup.net> Reviewed-by: José Expósito <jose.exposito89@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-9-2dbc2f1e222c@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com> drivers/gpu/drm/vkms/vkms_plane.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 1626f53717cd5396ad3ce062b5d5867925e87e76 Author: Louis Chauvet <louis.chauvet@bootlin.com> Date: Mon Nov 18 19:28:23 2024 +0100 drm/vkms: Re-introduce line-per-line composition algorithm Re-introduce a line-by-line composition algorithm for each pixel format. This allows more performance by not requiring an indirection per pixel read. This patch is focused on readability of the code. Line-by-line composition was introduced by [1] but rewritten back to pixel-by-pixel algorithm in [2]. At this time, nobody noticed the impact on performance, and it was merged. This patch is almost a revert of [2], but in addition efforts have been made to increase readability and maintainability of the rotation handling. The blend function is now divided in two parts: - Transformation of coordinates from the output referential to the source referential - Line conversion and blending Most of the complexity of the rotation management is avoided by using drm_rect_* helpers. The remaining complexity is around the clipping, to avoid reading/writing outside source/destination buffers. The pixel conversion is now done line-by-line, so the read_pixel_t was replaced with read_pixel_line_t callback. This way the indirection is only required once per line and per plane, instead of once per pixel and per plane. The read_line_t callbacks are very similar for most pixel format, but it is required to avoid performance impact. Some helpers for color conversion were introduced to avoid code repetition: - *_to_argb_u16: perform colors conversion. They should be inlined by the compiler, and they are used to avoid repetition between multiple variants of the same format (argb/xrgb and maybe in the future for formats like bgr formats). This new algorithm was tested with: - kms_plane (for color conversions) - kms_rotation_crc (for rotations of planes) - kms_cursor_crc (for translations of planes) - kms_rotation (for all rotations and formats combinations) [3] The performance gain was mesured with kms_fb_stress [4] with some modification to fix the writeback format. The performance improvement is around 5 to 10%. [1]: commit 8ba1648567e2 ("drm: vkms: Refactor the plane composer to accept new formats") https://lore.kernel.org/all/20220905190811.25024-7-igormtorrente@gmail.com/ [2]: commit 322d716a3e8a ("drm/vkms: isolate pixel conversion functionality") https://lore.kernel.org/all/20230418130525.128733-2-mcanal@igalia.com/ [3]: https://lore.kernel.org/igt-dev/20240313-new_rotation-v2-0-6230fd5cae59@bootlin.com/ [4]: https://lore.kernel.org/all/20240422-kms_fb_stress-dev-v5-0-0c577163dc88@riseup.net/ Reviewed-by: José Expósito <jose.exposito89@gmail.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-8-2dbc2f1e222c@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com> drivers/gpu/drm/vkms/vkms_composer.c | 234 ++++++++++++++++++++++++++++------- drivers/gpu/drm/vkms/vkms_drv.h | 28 +++-- drivers/gpu/drm/vkms/vkms_formats.c | 224 ++++++++++++++++++++------------- drivers/gpu/drm/vkms/vkms_formats.h | 2 +- drivers/gpu/drm/vkms/vkms_plane.c | 5 +- 5 files changed, 344 insertions(+), 149 deletions(-) commit b52fd27356af947f80b0c0855691e42a4c02ee79 Author: Louis Chauvet <louis.chauvet@bootlin.com> Date: Mon Nov 18 19:28:22 2024 +0100 drm/vkms: Introduce pixel_read_direction enum The pixel_read_direction enum is useful to describe the reading direction in a plane. It avoids using the rotation property of DRM, which not practical to know the direction of reading. This patch also introduce two helpers, one to compute the pixel_read_direction from the DRM rotation property, and one to compute the step, in byte, between two successive pixel in a specific direction. Acked-by: Maíra Canal <mairacanal@riseup.net> Reviewed-by: José Expósito <jose.exposito89@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-7-2dbc2f1e222c@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com> drivers/gpu/drm/vkms/vkms_composer.c | 44 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/vkms/vkms_drv.h | 11 +++++++++ drivers/gpu/drm/vkms/vkms_formats.c | 32 ++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) commit cb6de83faa9049bf40e7dc6821d903016bec2337 Author: Louis Chauvet <louis.chauvet@bootlin.com> Date: Mon Nov 18 19:28:21 2024 +0100 drm/vkms: Avoid computing blending limits inside pre_mul_alpha_blend The pre_mul_alpha_blend is dedicated to blending, so to avoid mixing different concepts (coordinate calculation and color management), extract the x_limit and x_dst computation outside of this helper. It also increases the maintainability by grouping the computation related to coordinates in the same place: the loop in `blend`. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com> Reviewed-by: José Expósito <jose.exposito89@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-6-2dbc2f1e222c@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com> drivers/gpu/drm/vkms/vkms_composer.c | 40 +++++++++++++++++------------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit d6dc39e495678d54a8125e1ae08b3ca35c306426 Author: Louis Chauvet <louis.chauvet@bootlin.com> Date: Mon Nov 18 19:28:20 2024 +0100 drm/vkms: Update pixels accessor to support packed and multi-plane formats. Introduce the usage of block_h/block_w to compute the offset and the pointer of a pixel. The previous implementation was specialized for planes with block_h == block_w == 1. To avoid confusion and allow easier implementation of tiled formats. It also remove the usage of the deprecated format field `cpp`. Introduce the plane_index parameter to get an offset/pointer on a different plane. Acked-by: Maíra Canal <mairacanal@riseup.net> Reviewed-by: José Expósito <jose.exposito89@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-5-2dbc2f1e222c@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com> drivers/gpu/drm/vkms/vkms_formats.c | 114 ++++++++++++++++++++++++++++-------- 1 file changed, 91 insertions(+), 23 deletions(-) commit 51091b4ab257887d9ab79d93078b7989abeeda6f Author: Louis Chauvet <louis.chauvet@bootlin.com> Date: Mon Nov 18 19:28:19 2024 +0100 drm/vkms: Use const for input pointers in pixel_read an pixel_write functions As the pixel_read and pixel_write function should never modify the input buffer, mark those pointers const. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com> Reviewed-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: José Expósito <jose.exposito89@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-4-2dbc2f1e222c@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com> drivers/gpu/drm/vkms/vkms_drv.h | 4 ++-- drivers/gpu/drm/vkms/vkms_formats.c | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) commit b21b580e57924ce1e58cb15f96566f3a52af216d Author: Louis Chauvet <louis.chauvet@bootlin.com> Date: Mon Nov 18 19:28:18 2024 +0100 drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions Introduce two typedefs: pixel_read_t and pixel_write_t. It allows the compiler to check if the passed functions take the correct arguments. Such typedefs will help ensuring consistency across the code base in case of update of these prototypes. Rename input/output variable in a consistent way between read_line and write_line. A warn has been added in get_pixel_*_function to alert when an unsupported pixel format is requested. As those formats are checked before atomic_update callbacks, it should never happen. Document for those typedefs. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com> Reviewed-by: José Expósito <jose.exposito89@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-3-2dbc2f1e222c@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com> drivers/gpu/drm/vkms/vkms_drv.h | 23 ++++++- drivers/gpu/drm/vkms/vkms_formats.c | 124 ++++++++++++++++++++---------------- drivers/gpu/drm/vkms/vkms_formats.h | 4 +- drivers/gpu/drm/vkms/vkms_plane.c | 2 +- 4 files changed, 94 insertions(+), 59 deletions(-) commit 2f9741ac3b94c5f4418cd727d232ae0590b8ef1a Author: Arthur Grillo <arthurgrillo@riseup.net> Date: Mon Nov 18 19:28:17 2024 +0100 drm/vkms: Use drm_frame directly Remove intermidiary variables and access the variables directly from drm_frame. These changes should be noop. Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com> Reviewed-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: José Expósito <jose.exposito89@gmail.com> Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com> [Louis Chauvet: Applied review from Maíra] Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-2-2dbc2f1e222c@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com> drivers/gpu/drm/vkms/vkms_drv.h | 3 --- drivers/gpu/drm/vkms/vkms_formats.c | 11 ++++++----- drivers/gpu/drm/vkms/vkms_plane.c | 3 --- drivers/gpu/drm/vkms/vkms_writeback.c | 5 ----- 4 files changed, 6 insertions(+), 16 deletions(-) commit 22f16c50beb6b7c4e2744eb7ea998dae0d2cdbdc Author: Louis Chauvet <louis.chauvet@bootlin.com> Date: Mon Nov 18 19:28:16 2024 +0100 drm/vkms: Code formatting Few no-op changes to remove double spaces and fix wrong alignments. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com> Reviewed-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: José Expósito <jose.exposito89@gmail.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-1-2dbc2f1e222c@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com> drivers/gpu/drm/vkms/vkms_composer.c | 10 +++++----- drivers/gpu/drm/vkms/vkms_crtc.c | 6 ++---- drivers/gpu/drm/vkms/vkms_drv.c | 3 +-- drivers/gpu/drm/vkms/vkms_plane.c | 8 ++++---- 4 files changed, 12 insertions(+), 15 deletions(-) commit f0fa7624001c5abf755f2627a3d0719907c90d0b Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 13:30:33 2024 +0200 drm/i915/irq: emphasize display_irqs_enabled is only about VLV/CHV Use display_irqs_enabled only on VLV/CHV where it's relevant. Rename to vlv_display_irqs_enabled, to emphasize it's really only about VLV/CHV. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/f60104ea59687cb8c65b18b4f9ddd832a643407d.1732102179.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_display_core.h | 9 +++++++- drivers/gpu/drm/i915/display/intel_display_irq.c | 26 +++++++---------------- drivers/gpu/drm/i915/display/intel_hotplug_irq.c | 6 +++++- 3 files changed, 21 insertions(+), 20 deletions(-) commit 1fbad9acb10cbda4286f4a4776783221603c6e2a Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 13:30:32 2024 +0200 drm/i915/irq: hide display_irqs_enabled access Move the check for display_irqs_enabled within vlv_display_irq_reset() and vlv_display_irq_postinstall() to avoid looking at struct intel_display members within i915 core irq code. Within display irq code, vlv_display_irq_reset() may need to be called with !display_irqs_enabled, so add a small wrapper. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ef43e26ebab7f84768391f5053c0eba44b647c89.1732102179.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_display_irq.c | 15 ++++++++++++--- drivers/gpu/drm/i915/i915_irq.c | 12 ++++-------- 2 files changed, 16 insertions(+), 11 deletions(-) commit d9b31d6accc40b83457585c853c5b3029b33c324 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 13:30:31 2024 +0200 drm/i915/plane: convert initial plane setup to struct intel_display struct intel_display replaces struct drm_i915_private as the main display device pointer. Convert initial plane setup to it, as much as possible. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/9e370d8e90235165539f81ca2d00fdd2e883397f.1732102179.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> .../gpu/drm/i915/display/intel_display_driver.c | 2 +- drivers/gpu/drm/i915/display/intel_plane_initial.c | 56 ++++++++++++---------- drivers/gpu/drm/i915/display/intel_plane_initial.h | 4 +- drivers/gpu/drm/xe/display/xe_plane_initial.c | 8 ++-- 4 files changed, 37 insertions(+), 33 deletions(-) commit e3840e5871217a6995c55200090a25cae1edd7f2 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 13:30:30 2024 +0200 drm/i915/overlay: add intel_overlay_available() and use it Avoid accessing struct intel_display members directly from i915_getparam_ioctl(). Add intel_overlay_available() function to provide the information for I915_PARAM_HAS_OVERLAY. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/26041645168ce3e76cb8f73bcb4c747619117e06.1732102179.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_overlay.c | 5 +++++ drivers/gpu/drm/i915/display/intel_overlay.h | 5 +++++ drivers/gpu/drm/i915/i915_getparam.c | 5 +++-- 3 files changed, 13 insertions(+), 2 deletions(-) commit 40c9ad5f2da31d0fb4723fe90a07c9b94df4d886 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 13:30:29 2024 +0200 drm/i915/overlay: convert to struct intel_display struct intel_display replaces struct drm_i915_private as the main display device pointer. Convert overlay to it, as much as possible. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/3680586c05e82fd01d173cfb4f8df015d6db663c.1732102179.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> .../gpu/drm/i915/display/intel_display_driver.c | 4 +- drivers/gpu/drm/i915/display/intel_overlay.c | 179 +++++++++++---------- drivers/gpu/drm/i915/display/intel_overlay.h | 14 +- drivers/gpu/drm/i915/gt/intel_reset.c | 3 +- 4 files changed, 102 insertions(+), 98 deletions(-) commit e713b26e5edd2b2500a33e9176106849622afd7a Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:43:19 2024 +0200 drm/i915/ddi: simplify intel_ddi_get_encoder_pipes() slightly Use a temporary variable for DDI mode to simplify the conditions. This is in line with the other places that read DDI mode. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/84892d31807bd8118474dd873e73c4d459f61448.1732106557.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_ddi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 68148b8ee1f213204528a603729e648f4de3be8c Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:43:18 2024 +0200 drm/i915/ddi: refactor intel_ddi_connector_get_hw_state() Refactor the switch-case into an if-ladder similar to intel_ddi_read_func_ctl() for clarity. This highlights how TRANS_DDI_MODE_SELECT_FDI_OR_128B132B works on different platforms. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/191f0210d720f3113a092e1ef0c7996a7dee85a0.1732106557.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_ddi.c | 44 ++++++++++++-------------------- 1 file changed, 16 insertions(+), 28 deletions(-) commit 1013ed6a62d320bcc078ab36d400baf86e343a91 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:43:17 2024 +0200 drm/i915/ddi: split up intel_ddi_read_func_ctl() by output type The function has become quite long, and the switch-case statement quite complex with the fallthrougs. Simplify by splitting to individual functions and an if-ladder. This highlights how TRANS_DDI_MODE_SELECT_FDI_OR_128B132B works on different platforms. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/2621df6e6b0b7ac75159cfb112755c35b30ce906.1732106557.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_ddi.c | 210 ++++++++++++++++++------------- 1 file changed, 123 insertions(+), 87 deletions(-) commit f64a06540cfc80dcb8671bfa2d07d9e20270ccd6 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:43:16 2024 +0200 drm/i915/ddi: rename temp to ddi_func_ctl in intel_ddi_read_func_ctl() The temp name is a bit vague for something used so much in the function. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/29d21b8f829e8139cc8ad857a86d3fc967f2ac07.1732106557.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_ddi.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit c3a126818a3ec533cfc34556de9ceb75ded9cdf9 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:43:15 2024 +0200 drm/i915/dp: refactor clear/wait for act sent Move clear_act_sent() and wait_for_act_sent() to intel_ddi.[ch] and make independent of DP MST. They'll be needed for 128b/132b SST operation. Rename accordingly. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ef05f5bc222e8ba48d84f75a9ea5dd29667055d2.1732106557.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_ddi.c | 23 +++++++++++++++++++-- drivers/gpu/drm/i915/display/intel_ddi.h | 8 ++++++-- drivers/gpu/drm/i915/display/intel_dp_mst.c | 32 ++++++----------------------- 3 files changed, 33 insertions(+), 30 deletions(-) commit b9b82a47963b94c2178a8a851fb5b88f73c39238 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:43:14 2024 +0200 drm/i915/reg: convert DP_TP_CTL/DP_TP_STATUS to REG_BIT() and friends Use the modern style for defining register contents. Expand the status register contents a bit. TODO: There are more VC payload mapping fields, spanning more registers, and have more bits on more recent platforms. v2: - Fix DP_TP_STATUS_STREAMS_ENABLED_MASK mask (Imre) - Drop status VC3 payload mapping for now Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/1ef15e6bb58ca847f89c9b39cbc9771cb57db408.1732106557.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/i915_reg.h | 56 +++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 27 deletions(-) commit 1cfc6f811bf1b8fa10c08207aa9be141e8599c12 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:43:13 2024 +0200 drm/i915/ddi: use intel_ddi_* naming convention for encoder enable/disable All the other encoder hooks are named intel_ddi_*, follow suit with intel_ddi_enable() and intel_ddi_disable(), and the dp/hdmi variants. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/9533cf61773f2cab3a6a29acf9e6ecfc00b6e8fd.1732106557.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_ddi.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 5503f8112e52da6d964f0d9a70d810b0eb4d4ce8 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:43:12 2024 +0200 drm/i915/mst: unify MST topology callback naming to mst_topology_* Make it easier to keep track of what belongs where. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/e8efc8fddc3ca93e1256a1dad13bc4eca07c3382.1732106557.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp_mst.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 81c6d5d83bc794c10366cab3da0534622c137a84 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:43:11 2024 +0200 drm/i915/mst: simplify mst_connector_get_hw_state() Use a variable for the encoder to simplify. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/eb8595ae36c6330cce1615059bd2c89a7db79668.1732106557.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp_mst.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit fdb65ede8a45240552e867d5c17186d917d29147 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:43:10 2024 +0200 drm/i915/mst: unify MST connector function naming to mst_connector_* Similar to commit 5674e700d43e ("drm/i915/mst: change naming from fake encoders to MST stream encoders"), name all MST connector related functions to mst_connector_*. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/3d4814a94b97fcff88722e0effd2fb5893b256af.1732106557.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp_mst.c | 63 +++++++++++++++-------------- 1 file changed, 32 insertions(+), 31 deletions(-) commit 2b1245f3ec879a42394b6b3407da33a0aaaebc0c Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 20 14:43:09 2024 +0200 drm/i915/mst: pass intel_dp around in mst stream helpers All of the functions in question operate on the primary encoder, and more specifically the primary intel_dp, so pass it around instead of the encoder for less ambiguity. Suggested-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/165ee8b723c42bcdeb3adf6a1b34ea09371e5d64.1732106557.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp_mst.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 21f1435b1e6b012a07c42f36b206d2b66fc8f13b Author: Christian Gmeiner <cgmeiner@igalia.com> Date: Mon Nov 18 23:19:47 2024 +0100 drm/v3d: Stop active perfmon if it is being destroyed If the active performance monitor (`v3d->active_perfmon`) is being destroyed, stop it first. Currently, the active perfmon is not stopped during destruction, leaving the `v3d->active_perfmon` pointer stale. This can lead to undefined behavior and instability. This patch ensures that the active perfmon is stopped before being destroyed, aligning with the behavior introduced in commit 7d1fd3638ee3 ("drm/v3d: Stop the active perfmon before being destroyed"). Cc: stable@vger.kernel.org # v5.15+ Fixes: 26a4dc29b74a ("drm/v3d: Expose performance counters to userspace") Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Signed-off-by: Maíra Canal <mcanal@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118221948.1758130-1-christian.gmeiner@gmail.com drivers/gpu/drm/v3d/v3d_perfmon.c | 5 +++++ 1 file changed, 5 insertions(+) commit 12e755103f2404fa87bd1d7af93100ec45b43feb Author: Louis Chauvet <louis.chauvet@bootlin.com> Date: Tue Nov 19 14:34:04 2024 +0100 drm/vkms: Remove index parameter from init_vkms_output VKMS currently supports only one CRTC, so it make no sense to have this index configurable. To avoid issues, replace this hardcoded index by drm_crtc_mask when applicable. There is no need to manually set a crtc mask on primary and cursor plane as it is automatically set by drmm_crtc_alloc_with_planes. In addition, this will remove the use of an uninitialized structure in vkms_add_overlay_plane. This currently works by chance because two things: - vkms_plane_init always set a possible_crtcs value, so the problematic branch is never used; - drm_crtc_mask on an kzalloc'd drm_crtc returns BIT(0), and the VKMS CRTC always have this id. Reviewed-by: José Expósito <jose.exposito89@gmail.com> Reviewed-by: Maíra Canal <mcanal@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241119-vkms-remove-index-v3-1-976321a3f801@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com> drivers/gpu/drm/vkms/vkms_drv.c | 2 +- drivers/gpu/drm/vkms/vkms_drv.h | 8 ++----- drivers/gpu/drm/vkms/vkms_output.c | 49 +++++++++++++------------------------- drivers/gpu/drm/vkms/vkms_plane.c | 4 ++-- 4 files changed, 21 insertions(+), 42 deletions(-) commit 22c2052766738fdf20c9c380db575cc35f9251a8 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Wed Nov 20 11:57:10 2024 -0800 drm/xe: Sort again the info flags Those flags are supposed to be kept sorted alphabetically. Unfortunately it's a constant battle as new flags are added to the end or at random places. Sort it again. v2: Include the other non-has_* 1-bit flags in the sort v3: Add comment to keep flags sorted Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> # v1 Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241120195710.3447100-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_device_types.h | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 4ba72ff2919cad90e1963b708ce23b92120613ff Author: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Date: Tue Nov 19 07:47:40 2024 -0800 wifi: ath11k: mark ath11k_wow_convert_8023_to_80211() as noinline When compiling the ath11k driver using clang with KASAN enabled, the following warning is observed: drivers/net/wireless/ath/ath11k/wow.c:672:5: warning: stack frame size (1336) exceeds limit (1024) in 'ath11k_wow_op_suspend' [-Wframe-larger-than] This is similar to the issue found in ath12k/qmi.c that was discussed in [1] and fixed with [2]. The issue is that clang inlining can explode stack usage. ath11k_wow_op_suspend() itself is a pretty lightweight function, but it dispatches to several other functions which do the real work. One path in particular is: ath11k_wow_op_suspend() ath11k_wow_set_wakeups() ath11k_vif_wow_set_wakeups() ath11k_wow_convert_8023_to_80211() Of these, ath11k_wow_convert_8023_to_80211() has non-trivial stack usage, so mark it as 'noinline_for_stack' to prevent it from being inlined in ath11k_wow_op_suspend(), thereby eliminating the excessive stack usage. Compile tested only. Link: https://msgid.link/bc214795-1c51-4cb7-922f-67d6ef98bff2@quicinc.com # [1] Link: https://patch.msgid.link/20241028-ath12k_qmi_driver_event_work-v1-1-0d532eb593fa@quicinc.com # [2] Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241119-ath11k-noinline-v1-3-4ec0a8aa30b2@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath11k/wow.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 500d7ec88652ba7316e7fba334754e39e3177e4a Author: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Date: Tue Nov 19 07:47:39 2024 -0800 wifi: ath11k: mark ath11k_dp_rx_mon_mpdu_pop() as noinline When compiling the ath11k driver using clang with KASAN enabled, the following warning is observed: drivers/net/wireless/ath/ath11k/dp_rx.c:5244:5: warning: stack frame size (1304) exceeds limit (1024) in 'ath11k_dp_rx_process_mon_status' [-Wframe-larger-than] This is similar to the issue found in ath12k/qmi.c that was discussed in [1] and fixed with [2]. The issue is that clang inlining can explode stack usage. ath11k_dp_rx_process_mon_status() itself is a pretty lightweight function, but it dispatches to several other functions which do the real work: ath11k_dp_rx_process_mon_status() ath11k_dp_rx_reap_mon_status_ring() ath11k_dp_rx_mon_dest_process() ath11k_dp_rx_mon_mpdu_pop() * ath11k_dp_rx_mon_deliver() ath11k_dp_rx_mon_merg_msdus() ath11k_dp_rx_deliver_msdu() ath11k_dp_rx_update_peer_stats() Of these, only ath11k_dp_rx_mon_mpdu_pop() has non-trivial stack usage, so mark that function as 'noinline_for_stack' to prevent it from being inlined in ath11k_dp_rx_process_mon_status(), thereby eliminating the excessive stack usage. Compile tested only. Link: https://msgid.link/bc214795-1c51-4cb7-922f-67d6ef98bff2@quicinc.com # [1] Link: https://patch.msgid.link/20241028-ath12k_qmi_driver_event_work-v1-1-0d532eb593fa@quicinc.com # [2] Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241119-ath11k-noinline-v1-2-4ec0a8aa30b2@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath11k/dp_rx.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 8ea1d2072ad1a9c24b326b50ebdc2c810c4b2cce Author: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Date: Tue Nov 19 07:47:38 2024 -0800 wifi: ath11k: mark some QMI driver event helpers as noinline When compiling the ath11k driver using clang with KASAN enabled, the following warning is observed: drivers/net/wireless/ath/ath11k/qmi.c:3199:13: warning: stack frame size (1560) exceeds limit (1024) in 'ath11k_qmi_driver_event_work' [-Wframe-larger-than] This is similar to the issue found in ath12k/qmi.c that was discussed in [1] and fixed with [2]. The issue is that clang inlining can explode stack usage. Just as in ath12k, ath11k_qmi_driver_event_work() itself is a pretty lightweight function, but it dispatches to several other functions which do the real work: ath11k_qmi_driver_event_work() ath11k_qmi_event_server_arrive() ath11k_qmi_fw_ind_register_send() ath11k_qmi_host_cap_send() * ath11k_qmi_event_load_bdf() ath11k_qmi_event_mem_request() ath11k_qmi_respond_fw_mem_request() ath11k_qmi_event_load_bdf() ath11k_qmi_wlanfw_m3_info_send() * ath11k_qmi_m3_load() ath11k_qmi_process_coldboot_calibration() Of these, the two marked with * have non-trivial stack usage. Mark those functions as 'noinline_for_stack' to prevent them from being inlined in ath12k_qmi_driver_event_work(), thereby eliminating the excessive stack usage. Note that this approach is a bit more "surgical" than the ath12k approach as only the two functions with the largest stack usage are modified. Compile tested only. Link: https://msgid.link/bc214795-1c51-4cb7-922f-67d6ef98bff2@quicinc.com # [1] Link: https://patch.msgid.link/20241028-ath12k_qmi_driver_event_work-v1-1-0d532eb593fa@quicinc.com # [2] Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241119-ath11k-noinline-v1-1-4ec0a8aa30b2@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath11k/qmi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 47c7ebfba30f242a24a89317c74eada47adfaa95 Author: Roopni Devanathan <quic_rdevanat@quicinc.com> Date: Mon Nov 18 09:27:22 2024 +0530 wifi: ath12k: Fix inappropriate use of print_array_to_buf_index() Currently in ath12k_htt_print_tx_pdev_mumimo_grp_stats_tlv() the htt_stats_buf->ul_mumimo_grp_best_usrs array is printed using print_array_to_buf_index() with a stats_index of 1. This is meant to convey the semantic that first entry in ul_mumimo_grp_best_usrs is associated with user 1. However, unlike some of the other "usr" arrays which have that semantic, ul_mumimo_grp_best_usrs does not have that semantic. Instead the first entry corresponds to user 0. Fix the issue by calling the API - print_array_to_buf(), instead of print_array_to_buf_index(). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241118035722.1755373-1-quic_rdevanat@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e238638e6f24109c0c7639f4a2db023388bd1b76 Author: Miaoqing Pan <quic_miaoqing@quicinc.com> Date: Thu Oct 31 08:05:41 2024 +0800 wifi: ath11k: add support for QCA6698AQ QCA6698AQ IP core is the same as WCN6855 hw2.1, they share the same PCI device ID, the same major and minor version numbers, the same register address, and same HAL descriptors, etc. The most significant difference is that QCA6698AQ has different RF, IPA, thermal, etc. Follow the approach done in commit 5dc9d1a55e95 ("wifi: ath11k: add support for QCA2066"), enumerate the subversion number to identify the specific card. Tested-on: QCA6698AQ hw2.1 PCI WLAN.HSP.1.1-04479-QCAHSPSWPL_V1_V2_SILICONZ_IOE-1 Signed-off-by: Miaoqing Pan <quic_miaoqing@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20241031000541.3331606-1-quic_miaoqing@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath11k/core.c | 87 ++++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath11k/core.h | 1 + drivers/net/wireless/ath/ath11k/mhi.c | 1 + drivers/net/wireless/ath/ath11k/pci.c | 3 ++ drivers/net/wireless/ath/ath11k/pcic.c | 13 ++++- 5 files changed, 104 insertions(+), 1 deletion(-) commit 8f5e8e7efb135fc648abbb572bd86d0c96819eaf Author: Dmitry Antipov <dmantipov@yandex.ru> Date: Mon Nov 11 10:01:52 2024 +0300 wifi: ath11k: miscellaneous spelling fixes Correct spelling here and there as suggested by codespell. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241111070152.85140-4-dmantipov@yandex.ru Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath11k/hal.h | 6 +++--- drivers/net/wireless/ath/ath11k/mac.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 93962446ef907cb169b089d0ff3f356e7ce004ab Author: Dmitry Antipov <dmantipov@yandex.ru> Date: Mon Nov 11 10:01:51 2024 +0300 wifi: ath11k: cleanup struct ath11k_mon_data Remove initialized but otherwise unused 'rx_status_q' member of 'struct ath11k_mon_data' and adjust 'ath11k_dp_rx_pdev_mon_status_attach' accordingly. Compile tested only. Fixes: 67a9d399fcb0 ("ath11k: enable RX PPDU stats in monitor co-exist mode") Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241111070152.85140-3-dmantipov@yandex.ru Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath11k/dp.h | 1 - drivers/net/wireless/ath/ath11k/dp_rx.c | 2 -- 2 files changed, 3 deletions(-) commit 95e5de4aae8ca1af851fc922a854bbe822bf2dd4 Author: Dmitry Antipov <dmantipov@yandex.ru> Date: Mon Nov 11 10:01:50 2024 +0300 wifi: ath11k: cleanup struct ath11k_reg_tpc_power_info Remove unused 'ap_constraint_power' field of 'struct ath11k_reg_tpc_power_info' and adjust related comment. Compile tested only. Fixes: 6f4e235be655 ("wifi: ath11k: add parse of transmit power envelope element") Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241111070152.85140-2-dmantipov@yandex.ru Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath11k/core.h | 2 -- 1 file changed, 2 deletions(-) commit 733a8c69ded704616b864d30d2531d090ee7a57e Author: Dmitry Antipov <dmantipov@yandex.ru> Date: Mon Nov 11 10:01:49 2024 +0300 wifi: ath11k: cleanup struct ath11k_vif Remove set but otherwise unused 'tx_seq_no' member of 'struct ath11k_vif', adjust 'ath11k_control_beaconing()' accordingly. This field was actually unused since an initial commit of the driver. Compile tested only. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241111070152.85140-1-dmantipov@yandex.ru Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath11k/core.h | 1 - drivers/net/wireless/ath/ath11k/mac.c | 2 -- 2 files changed, 3 deletions(-) commit 6200d947f050efdba4090dfefd8a01981363d954 Author: Barnabás Czémán <barnabas.czeman@mainlining.org> Date: Mon Nov 4 21:00:35 2024 +0100 wifi: wcn36xx: fix channel survey memory allocation size KASAN reported a memory allocation issue in wcn->chan_survey due to incorrect size calculation. This commit uses kcalloc to allocate memory for wcn->chan_survey, ensuring proper initialization and preventing the use of uninitialized values when there are no frames on the channel. Fixes: 29696e0aa413 ("wcn36xx: Track SNR and RSSI for each RX frame") Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> Acked-by: Loic Poulain <loic.poulain@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Link: https://patch.msgid.link/20241104-wcn36xx-memory-allocation-v1-1-5ec901cf37b6@mainlining.org Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/wcn36xx/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1cfa6d4e5bd9bfb15d165d8d843163363929ba1b Author: P Praneesh <quic_ppranees@quicinc.com> Date: Tue Nov 19 22:15:16 2024 +0530 wifi: ath12k: Fix endianness issue in struct hal_tlv_64_hdr struct hal_tlv_64_hdr has a 64-bit member that should be in little-endian format, but the current definition uses host byte order. Fix this by changing the definition and updating the corresponding helper functions used for the byte order conversion. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: P Praneesh <quic_ppranees@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20241119164516.756478-1-quic_ppranees@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath12k/dp_rx.c | 2 +- drivers/net/wireless/ath/ath12k/hal_desc.h | 2 +- drivers/net/wireless/ath/ath12k/hal_rx.c | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) commit d80b5c5b9be6b2e1cdeaaeaa8259523b63cae292 Author: Dustin L. Howett <dustin@howett.net> Date: Mon Nov 11 19:09:38 2024 +0100 drm: panel-backlight-quirks: Add Framework 13 glossy and 2.8k panels I have tested these panels on the Framework Laptop 13 AMD with firmware revision 3.05 (latest at time of submission). Signed-off-by: Dustin L. Howett <dustin@howett.net> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241111-amdgpu-min-backlight-quirk-v7-4-f662851fda69@weissschuh.net drivers/gpu/drm/drm_panel_backlight_quirks.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 916ecc0db336768d80e14ef28a8c64a775274f95 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Nov 11 19:09:37 2024 +0100 drm: panel-backlight-quirks: Add Framework 13 matte panel The value of "min_input_signal" returned from ATIF on a Framework AMD 13 is "12". This leads to a fairly bright minimum display backlight. Add a quirk to override that the minimum backlight PWM to "0" which leads to a much lower minimum brightness, which is still visible. Tested on a Framework AMD 13 BIOS 3.05 with the matte panel. Link: https://community.frame.work/t/25711/9 Link: https://community.frame.work/t/47036 Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Tested-by: Dustin L. Howett <dustin@howett.net> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241111-amdgpu-min-backlight-quirk-v7-3-f662851fda69@weissschuh.net drivers/gpu/drm/drm_panel_backlight_quirks.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c2753b2471c65955de18cbc58530641447e5bfe9 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Nov 11 19:09:36 2024 +0100 drm/amd/display: Add support for minimum backlight quirk Not all platforms provide the full range of PWM backlight capabilities supported by the hardware through ATIF. Use the generic drm panel minimum backlight quirk infrastructure to override the capabilities where necessary. Testing the backlight quirk together with the "panel_power_savings" sysfs file has not shown any negative impact. One quirk seems to be that 0% at panel_power_savings=0 seems to be slightly darker than at panel_power_savings=4. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Tested-by: Dustin L. Howett <dustin@howett.net> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241111-amdgpu-min-backlight-quirk-v7-2-f662851fda69@weissschuh.net drivers/gpu/drm/amd/amdgpu/Kconfig | 1 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 22e5c7ae12145af13785e3ff138395d5b1a22116 Author: Thomas Weißschuh <linux@weissschuh.net> Date: Mon Nov 11 19:09:35 2024 +0100 drm: Add panel backlight quirks Panels using a PWM-controlled backlight source do not have a standard way to communicate their valid PWM ranges. On x86 the ranges are read from ACPI through driver-specific tables. The built-in ranges are not necessarily correct, or may grow stale if an older device can be retrofitted with newer panels. Add a quirk infrastructure with which the minimum valid backlight value can be maintained as part of the kernel. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Tested-by: Dustin L. Howett <dustin@howett.net> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241111-amdgpu-min-backlight-quirk-v7-1-f662851fda69@weissschuh.net Documentation/gpu/drm-kms-helpers.rst | 3 ++ drivers/gpu/drm/Kconfig | 4 ++ drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/drm_panel_backlight_quirks.c | 70 ++++++++++++++++++++++++++++ include/drm/drm_utils.h | 4 ++ 5 files changed, 82 insertions(+) commit ce5dea83ee8f945203144fb891fdcb978216e45a Author: Bitterblue Smith <rtl8821cerfe2@gmail.com> Date: Thu Nov 14 17:48:09 2024 +0200 wifi: rtw88: usb: Enable RX aggregation for 8821au/8812au USB RX aggregation improves the RX speed on certain ARM systems, like the NanoPi NEO Core2. With RTL8811AU, before: 30 Mbps, after: 224 Mbps. The out-of-tree driver uses aggregation size of 7 in USB 3 mode, but that doesn't work here. rtw88 advertises support for receiving AMSDU in AMPDU, so the AP sends larger frames, up to ~5100 bytes. With a size of 7 RTL8812AU frequently tries to aggregate more frames than will fit in 32768 bytes. Use a size of 6 instead. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/63012163-a425-4b15-b830-43f279c06b73@gmail.com drivers/net/wireless/realtek/rtw88/usb.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 82a35723a67c29f685d7b518962154a73b7163a2 Author: Bitterblue Smith <rtl8821cerfe2@gmail.com> Date: Thu Nov 14 17:46:08 2024 +0200 wifi: rtw88: usb: Support USB 3 with RTL8812AU Add the function to automatically switch the RTL8812AU into USB 3 mode. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/19cda72b-f1f1-4b69-8369-0e4376b646bf@gmail.com drivers/net/wireless/realtek/rtw88/usb.c | 44 ++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) commit dbf7986f8a56ce47465bb6e0f2b2d166b931d707 Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Date: Tue Nov 12 22:12:25 2024 +0100 drm/bridge: Constify struct i2c_device_id 'struct i2c_device_id' is not modified in these drivers. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 15566 987 32 16585 40c9 drivers/gpu/drm/bridge/chipone-icn6211.o After: ===== text data bss dec hex filename 15630 923 32 16585 40c9 drivers/gpu/drm/bridge/chipone-icn6211.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/bdba1f49b4b48e22628482b49ce81f8e1f0d97b1.1731445901.git.christophe.jaillet@wanadoo.fr drivers/gpu/drm/bridge/chipone-icn6211.c | 2 +- drivers/gpu/drm/bridge/lontium-lt9211.c | 2 +- drivers/gpu/drm/bridge/lontium-lt9611.c | 2 +- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +- drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit ea58aae8458480d6391c404e62f1a4b30462b9c3 Author: Sidhanta Sahu <quic_sidhanta@quicinc.com> Date: Tue Nov 5 10:58:54 2024 +0530 wifi: ath12k: Support MBSSID Control Frame Stats Add support to request MBSSID control frame stats from firmware through HTT stats type 54. These stats give information such as basic trigger, BSR trigger, multi-user RTS and uplink MUMIMO trigger within and across various BSS. Note: WCN7850 firmware version - WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 does not support HTT stats type 54. Sample output: ------------- echo 54 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats HTT_MBSSID_CTRL_FRAME_STATS_TLV: mac_id = 0 basic_trigger_across_bss = 0 basic_trigger_within_bss = 0 bsr_trigger_across_bss = 0 bsr_trigger_within_bss = 0 mu_rts_across_bss = 0 mu_rts_within_bss = 0 ul_mumimo_trigger_across_bss = 0 ul_mumimo_trigger_within_bss = 0 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00214-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sidhanta Sahu <quic_sidhanta@quicinc.com> Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241105052854.2118987-1-quic_rdevanat@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> .../net/wireless/ath/ath12k/debugfs_htt_stats.c | 43 ++++++++++++++++++++++ .../net/wireless/ath/ath12k/debugfs_htt_stats.h | 14 +++++++ 2 files changed, 57 insertions(+) commit c8f314703bcbade1bcef8dfee9ffc6a1d66b9d8f Author: Dinesh Karthikeyan <quic_dinek@quicinc.com> Date: Fri Nov 15 11:58:54 2024 +0530 wifi: ath12k: Support Transmit PER Rate Stats Add support to request per rate stats through HTT stats type 40. These stats give information about rates of PPDUs and MPDUs for single user and for OFDMA and MUMIMO technologies corresponding to multiple users. Sample output: ------------- echo 40 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats HTT_TX_PER_STATS: PER_STATS_SU: PER per BW: ppdus_tried_su = 0:0 1:0 2:0 3:0 4:0 ppdus_ack_failed_su = 0:0 1:0 2:0 3:0 4:0 mpdus_tried_su = 0:0 1:0 2:0 3:0 4:0 mpdus_failed_su = 0:0 1:0 2:0 3:0 4:0 PER per NSS: ppdus_tried_su = 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0 ppdus_ack_failed_su = 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0 mpdus_tried_su = 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0 mpdus_failed_su = 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0 PER per MCS: ppdus_tried_su = 0:0 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 ppdus_ack_failed_su = 0:0 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 mpdus_tried_su = 0:0 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 mpdus_failed_su = 0:0 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 ..... Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Dinesh Karthikeyan <quic_dinek@quicinc.com> Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241115062854.1919672-5-quic_rdevanat@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> .../net/wireless/ath/ath12k/debugfs_htt_stats.c | 267 ++++++++++++++++++++- .../net/wireless/ath/ath12k/debugfs_htt_stats.h | 68 +++++- 2 files changed, 332 insertions(+), 3 deletions(-) commit 3a660e7fa44d556f41cbef6d2430f7227ef3f3ef Author: Dinesh Karthikeyan <quic_dinek@quicinc.com> Date: Fri Nov 15 11:58:53 2024 +0530 wifi: ath12k: Support SoC Common Stats Add support to request SoC stat from firmware through HTT stat type 38. This stat gives drop count of SoC. Note: MCC firmware version - WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 does not support tag HTT_STATS_SOC_TXRX_STATS_COMMON_TAG(125). Sample output: ------------- echo 38 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats HTT_SOC_COMMON_STATS_TLV: soc_drop_count = 0x0000000000000000 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Dinesh Karthikeyan <quic_dinek@quicinc.com> Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241115062854.1919672-4-quic_rdevanat@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> .../net/wireless/ath/ath12k/debugfs_htt_stats.c | 26 ++++++++++++++++++++++ .../net/wireless/ath/ath12k/debugfs_htt_stats.h | 7 ++++++ 2 files changed, 33 insertions(+) commit c3527cdfcdf70dcd613c4582283e28e4f81df9ea Author: Dinesh Karthikeyan <quic_dinek@quicinc.com> Date: Fri Nov 15 11:58:52 2024 +0530 wifi: ath12k: Support phy counter and TPC stats Add support to request counters and Transmission Power Control (TPC) stats through HTT stats type 37. These stats give information about counters like received packet count, CRC pass count, error count, transmit abort count, etc., about counter reset like reset cause, channel frequency, number and mode, channel flags, etc., about TPC like transmit power scale, maximum transmit power, gain cap, EIRP, etc. Note: MCC firmware version - WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 does not support HTT stats type 37, i.e., the firmware does not respond to the command requesting stats. Sample output: ------------- echo 37 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats HTT_PHY_STATS_TLV: bdf_nf_chain[0] = -92 bdf_nf_chain[1] = -94 bdf_nf_chain[2] = -94 bdf_nf_chain[3] = -93 ..... HTT_PHY_COUNTERS_TLV: rx_ofdma_timing_err_cnt = 18068 rx_cck_fail_cnt = 0 mactx_abort_cnt = 2612 macrx_abort_cnt = 0 ..... HTT_PHY_RESET_STATS_TLV: pdev_id = 0 chan_mhz = 0 chan_band_center_freq1 = 0 chan_band_center_freq2 = 0 ..... HTT_PHY_RESET_COUNTERS_TLV: pdev_id = 0 cf_active_low_fail_cnt = 0 cf_active_low_pass_cnt = 0 phy_off_through_vreg_cnt = 0 ..... HTT_PHY_TPC_STATS_TLV: pdev_id = 0 tx_power_scale = 0 tx_power_scale_db = 0 min_negative_tx_power = 0 ..... Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Dinesh Karthikeyan <quic_dinek@quicinc.com> Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241115062854.1919672-3-quic_rdevanat@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> .../net/wireless/ath/ath12k/debugfs_htt_stats.c | 248 +++++++++++++++++++++ .../net/wireless/ath/ath12k/debugfs_htt_stats.h | 98 ++++++++ 2 files changed, 346 insertions(+) commit a93d125ebfdd530ea1980a45b7ad2e9471b82c87 Author: Dinesh Karthikeyan <quic_dinek@quicinc.com> Date: Fri Nov 15 11:58:51 2024 +0530 wifi: ath12k: Support Downlink Pager Stats Add support to request downlink pager stats from firmware through HTT stats type 36. These stats give paging information like number of pages, their timestamp, number of locked and free pages, synchronous and asynchronous locked pages. Note: MCC firmware version - WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 responds to the event requesting stats, but it does not give any data. Sample output: ------------- echo 36 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats HTT_DLPAGER_STATS_TLV: ASYNC locked pages = 2 SYNC locked pages = 0 Total locked pages = 2 Total free pages = 127 LOCKED PAGES HISTORY last_locked_page_idx = 0 Index - 0 ; Page Number - 8495 ; Num of pages - 1 ; Timestamp - 4031009360us Index - 1 ; Page Number - 7219 ; Num of pages - 2 ; Timestamp - 885379515us Index - 2 ; Page Number - 0 ; Num of pages - 0 ; Timestamp - 0us Index - 3 ; Page Number - 0 ; Num of pages - 0 ; Timestamp - 0us ..... UNLOCKED PAGES HISTORY last_unlocked_page_idx = 0 Index - 0 ; Page Number - 7144 ; Num of pages - 2 ; Timestamp - 4032070008us Index - 1 ; Page Number - 7214 ; Num of pages - 2 ; Timestamp - 885379512us Index - 2 ; Page Number - 0 ; Num of pages - 0 ; Timestamp - 0us Index - 3 ; Page Number - 0 ; Num of pages - 0 ; Timestamp - 0us ..... Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Dinesh Karthikeyan <quic_dinek@quicinc.com> Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20241115062854.1919672-2-quic_rdevanat@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> .../net/wireless/ath/ath12k/debugfs_htt_stats.c | 86 +++++++++++++++++++++- .../net/wireless/ath/ath12k/debugfs_htt_stats.h | 31 ++++++++ 2 files changed, 116 insertions(+), 1 deletion(-) commit ea8f9de8702e9b8fec76a1a74b0f1205565d918a Author: Christian König <christian.koenig@amd.com> Date: Wed May 4 08:59:03 2022 +0200 drm/qxl: switch to using drm_exec v2 Just a straightforward conversion without any optimization. Only compile tested for now. v2: rebase Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114153020.6209-3-christian.koenig@amd.com drivers/gpu/drm/qxl/Kconfig | 1 + drivers/gpu/drm/qxl/qxl_drv.h | 7 ++-- drivers/gpu/drm/qxl/qxl_release.c | 68 ++++++++++++++++++++------------------- 3 files changed, 40 insertions(+), 36 deletions(-) commit e2b3f7c88cc153a0edc155b976fd825440015632 Author: Christian König <christian.koenig@amd.com> Date: Wed May 4 08:31:08 2022 +0200 drm/radeon: switch over to drm_exec v2 Just a straightforward conversion without any optimization. Smoke tested on actual hardware. v2: rebase Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114153020.6209-2-christian.koenig@amd.com drivers/gpu/drm/radeon/Kconfig | 1 + drivers/gpu/drm/radeon/radeon.h | 7 +++--- drivers/gpu/drm/radeon/radeon_cs.c | 45 +++++++++++++++++----------------- drivers/gpu/drm/radeon/radeon_gem.c | 39 ++++++++++++++++------------- drivers/gpu/drm/radeon/radeon_object.c | 25 +++++++++---------- drivers/gpu/drm/radeon/radeon_object.h | 2 +- drivers/gpu/drm/radeon/radeon_vm.c | 10 +++----- 7 files changed, 66 insertions(+), 63 deletions(-) commit c2adb84d012ca4707ae508f763c998aeaf6245b6 Author: Liviu Dudau <liviu.dudau@arm.com> Date: Tue Nov 19 16:41:38 2024 +0000 drm/panthor: Fix compilation failure on panthor_fw.c Commit 498893bd596e ("drm/panthor: Simplify FW fast reset path") forgot to copy the definition of glb_iface when it move one line of code. Fixes: 498893bd596e ("drm/panthor: Simplify FW fast reset path") Link: https://lore.kernel.org/dri-devel/20241119164455.572771-1-liviu.dudau@arm.com/ Signed-off-by: Liviu Dudau <liviu.dudau@arm.com> Reviewed-by: Karunika Choo <karunika.choo@arm.com> Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Liviu Dudau <liviu.dudau@arm.com> drivers/gpu/drm/panthor/panthor_fw.c | 1 + 1 file changed, 1 insertion(+) commit 498893bd596e6aedd9796a10e2828311f8135a02 Author: Karunika Choo <karunika.choo@arm.com> Date: Tue Nov 19 13:50:29 2024 +0000 drm/panthor: Simplify FW fast reset path Stop checking the FW halt_status as MCU_STATUS should be sufficient. This should make the check for successful FW halt and subsequently setting fast_reset to true more robust. We should also clear GLB_REQ.GLB_HALT bit only on post-reset prior to starting the FW and only if we're doing a fast reset, because the slow reset will re-initialize all FW sections, including the global interface. Signed-off-by: Karunika Choo <karunika.choo@arm.com> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Link: https://lore.kernel.org/r/20241119135030.3352939-1-karunika.choo@arm.com Signed-off-by: Liviu Dudau <liviu.dudau@arm.com> drivers/gpu/drm/panthor/panthor_fw.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit dd7db8d911a103cb17927cfdba69c2bdfa6e8a71 Author: Akash Goel <akash.goel@arm.com> Date: Wed Oct 30 22:54:06 2024 +0000 drm/panthor: Explicitly set the coherency mode This commit fixes the potential misalignment between the value of device tree property "dma-coherent" and default value of COHERENCY_ENABLE register. Panthor driver didn't explicitly program the COHERENCY_ENABLE register with the desired coherency mode. The default value of COHERENCY_ENABLE register is implementation defined, so it may not be always aligned with the "dma-coherent" property value. The commit also checks the COHERENCY_FEATURES register to confirm that the coherency protocol is actually supported or not. v2: - Added R-b tags Signed-off-by: Akash Goel <akash.goel@arm.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Reviewed-by: Steven Price <steven.price@arm.com> Link: https://lore.kernel.org/r/20241030225407.4077513-3-akash.goel@arm.com Signed-off-by: Liviu Dudau <liviu.dudau@arm.com> drivers/gpu/drm/panthor/panthor_device.c | 22 +++++++++++++++++++++- drivers/gpu/drm/panthor/panthor_gpu.c | 9 +++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) commit 06e931e0fcb8f24e929efba973fd242d6d6cd1e0 Author: Akash Goel <akash.goel@arm.com> Date: Wed Oct 30 22:54:05 2024 +0000 drm/panthor: Update memattr programing to align with GPU spec Mali GPU Arch spec forbids the GPU PTEs to indicate Inner or Outer shareability when no_coherency protocol is selected. Doing so results in unexpected or undesired snooping of the CPU caches on some platforms, such as Juno FPGA, causing functional issues. For example the boot of MCU firmware fails as GPU ends up reading stale data for the FW memory pages from the CPU's cache. The FW memory pages are initialized with uncached mapping when the device is not reported to be dma-coherent. The shareability bits are set to inner-shareable when IOMMU_CACHE flag is passed to map_pages() callback and IOMMU_CACHE flag is passed by Panthor driver when memory needs to be mapped as cached on the GPU side. IOMMU_CACHE seems to imply cache coherent and is probably not fit for purpose for the memory that is mapped as cached on GPU side but doesn't need to remain coherent with the CPU. This commit updates the programming of MEMATTR register to use MIDGARD_INNER instead of CPU_INNER when coherency is disabled. That way the inner-shareability specified in the GPU PTEs would map to Mali's internal-shareable mode, which is always supported by the GPU regardless of the coherency protocal and is required by the Userspace driver to ensure coherency between the shader cores. v2: - Added R-b tags Signed-off-by: Akash Goel <akash.goel@arm.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Reviewed-by: Steven Price <steven.price@arm.com> Link: https://lore.kernel.org/r/20241030225407.4077513-2-akash.goel@arm.com Signed-off-by: Liviu Dudau <liviu.dudau@arm.com> drivers/gpu/drm/panthor/panthor_mmu.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit b5f871ab4913b2403a7cdcbcde16d39d0b071fb3 Author: Toke Høiland-Jørgensen <toke@toke.dk> Date: Wed Nov 6 13:41:44 2024 +0100 wifi: ath9k: Add RX inactivity detection and reset chip when it occurs Some ath9k chips can, seemingly at random, end up in a state which can be described as "deaf". No or nearly no interrupts are generated anymore for incoming packets. Existing links either break down after a while and new links will not be established. The circumstances leading to this "deafness" is still unclear, but some particular chips (especially 2-stream 11n SoCs, but also others) can go 'deaf' when running AP or mesh (or both) after some time. It's probably a hardware issue, and doing a channel scan to trigger a chip reset (which one normally can't do on an AP interface) recovers the hardware. The only way the driver can detect this state, is by detecting if there has been no RX activity for a while. In this case we can proactively reset the chip (which only takes a small number of milliseconds, so shouldn't interrupt things too much if it has been idle for several seconds), which functions as a workaround. OpenWrt, and various derivatives, have been carrying versions of this workaround for years, that were never upstreamed. One version[0], written by Felix Fietkau, used a simple counter and only reset if there was precisely zero RX activity for a long period of time. This had the problem that in some cases a small number of interrupts would appear even if the device was otherwise not responsive. For this reason, another version[1], written by Simon Wunderlich and Sven Eckelmann, used a time-based approach to calculate the average number of RX interrupts over a longer (four-second) interval, and reset the chip when seeing less than one interrupt per second over this period. However, that version relied on debugfs counters to keep track of the number of interrupts, which means it didn't work at all if debugfs was not enabled. This patch unifies the two versions: it uses the same approach as Felix' patch to count the number of RX handler invocations, but uses the same time-based windowing approach as Simon and Sven's patch to still handle the case where occasional interrupts appear but the device is otherwise deaf. Since this is based on ideas by all three people, but not actually directly derived from any of the patches, I'm including Suggested-by tags from Simon, Sven and Felix below, which should hopefully serve as proper credit. [0] https://patchwork.kernel.org/project/linux-wireless/patch/20170125163654.66431-3-nbd@nbd.name/ [1] https://patchwork.kernel.org/project/linux-wireless/patch/20161117083614.19188-2-sven.eckelmann@open-mesh.com/ Suggested-by: Simon Wunderlich <sw@simonwunderlich.de> Suggested-by: Sven Eckelmann <se@simonwunderlich.de> Suggested-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> Tested-by: Sven Eckelmann <se@simonwunderlich.de> Reviewed-by: Sven Eckelmann <se@simonwunderlich.de> Tested-by: Issam Hamdi <ih@simonwunderlich.de> Acked-by: Simon Wunderlich <sw@simonwunderlich.de> Link: https://patch.msgid.link/20241106-ath9k-deaf-detection-v1-1-736a150d2425@redhat.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath9k/ath9k.h | 2 ++ drivers/net/wireless/ath/ath9k/debug.c | 1 + drivers/net/wireless/ath/ath9k/debug.h | 1 + drivers/net/wireless/ath/ath9k/link.c | 33 +++++++++++++++++++++++++++++++-- drivers/net/wireless/ath/ath9k/main.c | 1 + 5 files changed, 36 insertions(+), 2 deletions(-) commit 4b64b4a81fcd51f570c046cf904aef19ec756d45 Author: Arnd Bergmann <arnd@arndb.de> Date: Fri Oct 18 15:10:10 2024 +0000 drm/rockchip: avoid 64-bit division Dividing a 64-bit integer prevents building this for 32-bit targets: ERROR: modpost: "__aeabi_uldivmod" [drivers/gpu/drm/rockchip/rockchipdrm.ko] undefined! As this function is not performance criticial, just Use the div_u64() helper. Fixes: 128a9bf8ace2 ("drm/rockchip: Add basic RK3588 HDMI output support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20241018151016.3496613-1-arnd@kernel.org Signed-off-by: Liviu Dudau <liviu.dudau@arm.com> drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0811cc0baf368a94dc1d2f5900dfb7765d6a7661 Author: Christian König <christian.koenig@amd.com> Date: Thu Nov 14 15:29:01 2024 +0100 drm/xe: drop unused component dependencies XE switched over to drm_exec quite some time ago. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114153020.6209-7-christian.koenig@amd.com drivers/gpu/drm/xe/xe_bo_types.h | 1 - drivers/gpu/drm/xe/xe_gt_pagefault.c | 1 - drivers/gpu/drm/xe/xe_vm.c | 1 - drivers/gpu/drm/xe/xe_vm.h | 1 - 4 files changed, 4 deletions(-) commit 2815a56e4b7252a836969f5674ee356ea1ce482c Author: Rik van Riel <riel@surriel.com> Date: Thu Nov 14 10:26:17 2024 -0500 x86/mm/tlb: Add tracepoint for TLB flush IPI to stale CPU Add a tracepoint when we send a TLB flush IPI to a CPU that used to be in the mm_cpumask, but isn't any more. Suggested-by: Dave Hansen <dave.hansen@intel.com> Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20241114152723.1294686-3-riel@surriel.com arch/x86/mm/tlb.c | 1 + include/linux/mm_types.h | 1 + 2 files changed, 2 insertions(+) commit 209954cbc7d0ce1a190fc725d20ce303d74d2680 Author: Rik van Riel <riel@surriel.com> Date: Thu Nov 14 10:26:16 2024 -0500 x86/mm/tlb: Update mm_cpumask lazily On busy multi-threaded workloads, there can be significant contention on the mm_cpumask at context switch time. Reduce that contention by updating mm_cpumask lazily, setting the CPU bit at context switch time (if not already set), and clearing the CPU bit at the first TLB flush sent to a CPU where the process isn't running. When a flurry of TLB flushes for a process happen, only the first one will be sent to CPUs where the process isn't running. The others will be sent to CPUs where the process is currently running. On an AMD Milan system with 36 cores, there is a noticeable difference: $ hackbench --groups 20 --loops 10000 Before: ~4.5s +/- 0.1s After: ~4.2s +/- 0.1s Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Mel Gorman <mgorman@suse.de> Link: https://lore.kernel.org/r/20241114152723.1294686-2-riel@surriel.com arch/x86/kernel/alternative.c | 10 +++++++--- arch/x86/mm/tlb.c | 19 +++++++++---------- 2 files changed, 16 insertions(+), 13 deletions(-) commit f635e7657e5bb80e1a7a9c3943a3daa71aefd88f Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Wed Nov 13 17:25:31 2024 +0530 drm/i915/display/xe3lpd: Avoid setting YUV420_MODE in PIPE_MISC For Xe3_LPD the PIPE_MISC YUV420 Enable (bit 27), already implies enabling full blend YUV420 mode and YUV420 Mode (bit 26) is removed. Therefore, avoid setting YUV420 Mode for Xe3_LPD+ while programming PIPE_MISC for YCbCr420 output format. Bspec: 69749 Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241113115531.3394962-1-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_display.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit faac6f105ef169e2e5678c14e1ffebf2a7d780b6 Author: Yabin Cui <yabinc@google.com> Date: Wed May 15 12:36:09 2024 -0700 perf/core: Check sample_type in perf_sample_save_brstack Check sample_type in perf_sample_save_brstack() to prevent saving branch stack data when it isn't required. Suggested-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Yabin Cui <yabinc@google.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Ian Rogers <irogers@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20240515193610.2350456-4-yabinc@google.com arch/x86/events/amd/core.c | 3 +-- arch/x86/events/core.c | 3 +-- arch/x86/events/intel/ds.c | 3 +-- include/linux/perf_event.h | 15 ++++++++++----- 4 files changed, 13 insertions(+), 11 deletions(-) commit f226805bc5f60adf03783d8e4cbfe303ccecd64e Author: Yabin Cui <yabinc@google.com> Date: Wed May 15 12:36:08 2024 -0700 perf/core: Check sample_type in perf_sample_save_callchain Check sample_type in perf_sample_save_callchain() to prevent saving callchain data when it isn't required. Suggested-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Yabin Cui <yabinc@google.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Ian Rogers <irogers@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20240515193610.2350456-3-yabinc@google.com arch/x86/events/amd/ibs.c | 3 +-- arch/x86/events/intel/ds.c | 6 ++---- include/linux/perf_event.h | 5 +++++ 3 files changed, 8 insertions(+), 6 deletions(-) commit b9c44b91476b67327a521568a854babecc4070ab Author: Yabin Cui <yabinc@google.com> Date: Wed May 15 12:36:07 2024 -0700 perf/core: Save raw sample data conditionally based on sample type Currently, space for raw sample data is always allocated within sample records for both BPF output and tracepoint events. This leads to unused space in sample records when raw sample data is not requested. This patch enforces checking sample type of an event in perf_sample_save_raw_data(). So raw sample data will only be saved if explicitly requested, reducing overhead when it is not needed. Fixes: 0a9081cf0a11 ("perf/core: Add perf_sample_save_raw_data() helper") Signed-off-by: Yabin Cui <yabinc@google.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Ian Rogers <irogers@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20240515193610.2350456-2-yabinc@google.com arch/s390/kernel/perf_cpum_cf.c | 2 +- arch/s390/kernel/perf_pai_crypto.c | 2 +- arch/s390/kernel/perf_pai_ext.c | 2 +- arch/x86/events/amd/ibs.c | 2 +- include/linux/perf_event.h | 6 ++++++ kernel/events/core.c | 35 ++++++++++++++++++----------------- kernel/trace/bpf_trace.c | 11 ++++++----- 7 files changed, 34 insertions(+), 26 deletions(-) commit ca596b781a8081a14077f1e902b4ce43c1fd8fb2 Author: Animesh Manna <animesh.manna@intel.com> Date: Tue Nov 5 16:09:16 2024 +0530 drm/i915/psr: Disable psr1 if setup_time > vblank Issue is seen when PSR enabled with setup frames and when try to disable PSR at SRDONACK State (0x1). PSR FSM is stuck at SRDONACK(0x1) for more than 5 seconds. Issue not seen with Setup frames disabled. Currently disable psr1 if setuptime > vblank to workaround the above issue. HSD: 16024594674 WA: 18037818876 v1: Initial version v2: Add debug log and some cosmetic changes. [Jouni, Jani, Nemesa] Signed-off-by: Animesh Manna <animesh.manna@intel.com> Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241105103916.1857731-1-animesh.manna@intel.com drivers/gpu/drm/i915/display/intel_psr.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 2d958cf291da185cd70370b1d86acfb1a9d35430 Author: Matthew Brost <matthew.brost@intel.com> Date: Fri Nov 15 11:21:55 2024 -0800 drm/xe: Drop useless d3cold allowed message This message just spams dmesg providing little benefit. Remove it. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241115192155.2050987-1-matthew.brost@intel.com drivers/gpu/drm/xe/xe_pm.c | 3 --- 1 file changed, 3 deletions(-) commit d3c55b8ab6fe5fa2e7ab02efd36d09c39ee5022f Author: Dongwon Kim <dongwon.kim@intel.com> Date: Mon Oct 21 02:08:03 2024 +0300 drm/virtio: New fence for every plane update Having a fence linked to a virtio_gpu_framebuffer in the plane update sequence would cause conflict when several planes referencing the same framebuffer (e.g. Xorg screen covering multi-displays configured for an extended mode) and those planes are updated concurrently. So it is needed to allocate a fence for every plane state instead of the framebuffer. Signed-off-by: Dongwon Kim <dongwon.kim@intel.com> [dmitry.osipenko@collabora.com: rebase, fix up, edit commit message] Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241020230803.247419-2-dmitry.osipenko@collabora.com drivers/gpu/drm/virtio/virtgpu_drv.h | 7 ++++ drivers/gpu/drm/virtio/virtgpu_plane.c | 58 +++++++++++++++++++++++----------- 2 files changed, 46 insertions(+), 19 deletions(-) commit 30f86b8f86ada845fbd0d853b3a3d238567ac2c2 Author: Dongwon Kim <dongwon.kim@intel.com> Date: Mon Oct 21 02:08:02 2024 +0300 drm/virtio: Use drm_gem_plane_helper_prepare_fb() Use drm_gem_plane_helper_prepare_fb() helper for explicit framebuffer synchronization. We need to wait for explicit fences in a case of Venus and native contexts when guest user space uses explicit fencing. Signed-off-by: Dongwon Kim <dongwon.kim@intel.com> [dmitry.osipenko@collabora.com: edit commit message] Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241020230803.247419-1-dmitry.osipenko@collabora.com drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++ 1 file changed, 4 insertions(+) commit 086b9f27f0ab38df05b2d839a69c8daead8019ae Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Date: Mon Oct 21 01:47:25 2024 +0300 drm/virtio: Don't create a context with default param if context_init is supported Xorg context creation fails for native contexts that use VIRTGPU_CONTEXT_INIT because context is already initialized implicitly when dumb buffer is created. Fix it by not creating default vrend context if context_init is supported. Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241020224725.179937-1-dmitry.osipenko@collabora.com drivers/gpu/drm/virtio/virtgpu_gem.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d58f65df2dcb59acd3965907507cfa608fe924b4 Author: Imre Deak <imre.deak@intel.com> Date: Mon Nov 18 15:10:44 2024 +0200 drm/i915/dp_mst: Fix connector initialization in intel_dp_add_mst_connector() The connector initialization in intel_dp_add_mst_connector() depends on the device pointer in connector to be valid, at least by connector debug printing. The device pointer is initialized by drm_connector_init(), however that function also exposes the connector to in-kernel users, which can't be done before the connector is fully initialized. For now make sure the device pointer is valid before it's used, until a follow-up change moving this to DRM core. This issue was revealed by the commit in the Fixes: line below, before which the above debug printing checked and handled a NULL device pointer gracefully in DRM core. Cc: Jani Nikula <jani.nikula@intel.com> Fixes: 529798bd786a ("drm/i915/mst: convert to struct intel_display") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12799 Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118131044.1278028-1-imre.deak@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp_mst.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 678ccbf987969a6020fe95ecb4a2f568e7466821 Author: Matthew Auld <matthew.auld@intel.com> Date: Wed Nov 13 17:23:47 2024 +0000 drm/xe/vram: drop 2G block restriction Currently we limit the max block size for all users to ensure each block can fit within a sg entry (uint). Drop this restriction and tweak the sg construction to instead handle this itself and break down blocks which are too big, if needed. Most users don't need an sg list in the first place. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Tested-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241113172346.256165-2-matthew.auld@intel.com drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | 51 +++++++++--------------------------- 1 file changed, 12 insertions(+), 39 deletions(-) commit c85021f35ace0081081b3fcbd0b411ad085dc091 Author: Peter Shkenev <mustela@erminea.space> Date: Thu Nov 7 17:10:05 2024 +0300 drm/virtio: Use generic dumb_map_offset implementation Currently, virtio uses its own dumb_map_offset implementation, virtio_gpu_mode_dumb_mmap. It works similarly to generic implementation, drm_gem_dumb_map_offset, and using the generic implementation is preferable (and making drivers to do so is a task stated on the DRM subsystem's TODO list). Thus, make driver use the generic implementation. This includes VIRTGPU_MAP ioctl so it cannot be used to circumvent rules imposed by drm_gem_dumb_map_offset (imported objects cannot be mapped). Signed-off-by: Peter Shkenev <mustela@erminea.space> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> [dmitry.osipenko@collabora.com: cosmetic code improvements] Link: https://patchwork.freedesktop.org/patch/msgid/20241107141133.13624-1-mustela@erminea.space drivers/gpu/drm/virtio/virtgpu_drv.c | 1 - drivers/gpu/drm/virtio/virtgpu_drv.h | 3 --- drivers/gpu/drm/virtio/virtgpu_gem.c | 15 --------------- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 6 +++--- 4 files changed, 3 insertions(+), 22 deletions(-) commit e725091865407fcd8d96ab9ad618c07fb6e3cc2b Author: Arun R Murthy <arun.r.murthy@intel.com> Date: Wed Sep 25 09:14:32 2024 +0530 drm/i915/dp: Include the time taken by AUX Tx for timeout As per DP spec the timeout for LANE_CHANNEL_EQ_DONE is 400ms. But this timeout value is exclusively for the Aux RD Interval and excludes the time consumed for the AUX Tx (i.e reading/writing FFE presets). Add another 50ms for these AUX Tx to the 400ms timeout. Ref: "Figure 3-52: 128b132b DP DPTC LANEx_CHANNEL_EQ_DONE Sequence" of DP2.1a spec. Co-developed-by: Srikanth V NagaVenkata <nagavenkata.srikanth.v@intel.com> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240925034432.1777029-4-arun.r.murthy@intel.com drivers/gpu/drm/i915/display/intel_dp_link_training.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb0c1757a36cabb730cde4e045eb52587602504d Author: Arun R Murthy <arun.r.murthy@intel.com> Date: Fri Oct 11 10:28:25 2024 +0530 drm/i915/dp: read Aux RD interval just before setting the FFE preset Figure 3-52: 128b132b DP DPTC LANEx_CHANNEL_EQ_DONE Sequence of DP2.1a spec. After reading LANEx_CHANNEL_EQ_DONE, read the FFE presets. AUX_RD_INTERVAL and then write the new FFE presets. v4: Read AUX_RD_INTERVAL before get/set TX FFE preset (Jani) Co-developed-by: Srikanth V NagaVenkata <nagavenkata.srikanth.v@intel.com> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241011045825.2629469-1-arun.r.murthy@intel.com drivers/gpu/drm/i915/display/intel_dp_link_training.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit af02ee4fb63342c873b747d724cd5ada13c2bde1 Author: Arun R Murthy <arun.r.murthy@intel.com> Date: Wed Sep 25 09:14:30 2024 +0530 drm/i915/dp: use fsleep instead of usleep_range for LT Sleeping for < 10us use udelay, for 10us to 20ms use usleep_range() and for > 10ms use msleep. flseep() will call the particular API based on the above condition. (Documentation/timers/timers-howto.rst) Aux RD Interval value depends on the value read from the dpcd register which is updated from the sink device, hence use flseep. Co-developed-by: Srikanth V NagaVenkata <nagavenkata.srikanth.v@intel.com> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240925034432.1777029-2-arun.r.murthy@intel.com drivers/gpu/drm/i915/display/intel_dp_link_training.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 31be3175bd7be89e39c82b3973c9d4ff55a17583 Author: Hans de Goede <hdegoede@redhat.com> Date: Thu Nov 7 15:08:33 2024 +0100 wifi: rtl8xxxu: add more missing rtl8192cu USB IDs The rtl8xxxu has all the rtl8192cu USB IDs from rtlwifi/rtl8192cu/sw.c except for the following 10, add these to the untested section so they can be used with the rtl8xxxu as the rtl8192cu are well supported. This fixes these wifi modules not working on distributions which have disabled CONFIG_RTL8192CU replacing it with CONFIG_RTL8XXXU_UNTESTED, like Fedora. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2321540 Cc: stable@vger.kernel.org Cc: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241107140833.274986-1-hdegoede@redhat.com drivers/net/wireless/realtek/rtl8xxxu/core.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 50191eace88c4163c8990984a8a156f09f226d39 Author: Kuan-Chung Chen <damon.chen@realtek.com> Date: Mon Nov 11 14:51:32 2024 +0800 wifi: rtw89: handle different TX power between RF path The dynamic antenna gain (DAG) may independently apply different TX powers for each RF path. This can be accomplished by using the larger TX power as the reference path and adjusting the TX power of the other path based on the difference. Currently only 8852BE/8852BTE/ 8852CE are supported. Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241111065132.19587-4-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.h | 1 + drivers/net/wireless/realtek/rtw89/phy.c | 31 +++++++------- drivers/net/wireless/realtek/rtw89/phy.h | 23 +++++++++++ drivers/net/wireless/realtek/rtw89/rtw8851b.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852a.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852b.c | 1 + .../net/wireless/realtek/rtw89/rtw8852b_common.c | 46 +++++++++++++-------- drivers/net/wireless/realtek/rtw89/rtw8852bt.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852c.c | 47 ++++++++++++++-------- drivers/net/wireless/realtek/rtw89/rtw8922a.c | 1 + 10 files changed, 107 insertions(+), 46 deletions(-) commit f0f08a4456b5040e45282a59d9c4ea9f39cd2ef5 Author: Kuan-Chung Chen <damon.chen@realtek.com> Date: Mon Nov 11 14:51:31 2024 +0800 wifi: rtw89: introduce dynamic antenna gain feature Dynamic Antenna Gain (DAG) adjusts the transmit power based on the platform's antenna gain. This allows for higher transmit power when the antenna gain is lower, while still complying with regulatory limits. The driver reads the Realtek Antenna Gain (RTAG) data from BIOS, and DAG is only enabled when the regulatory domain allows it. Currently, it only supports 8852BE/8852BTE/8852CE. Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241111065132.19587-3-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/acpi.c | 47 ++++++ drivers/net/wireless/realtek/rtw89/acpi.h | 9 ++ drivers/net/wireless/realtek/rtw89/core.c | 3 + drivers/net/wireless/realtek/rtw89/core.h | 33 ++++ drivers/net/wireless/realtek/rtw89/debug.c | 4 + drivers/net/wireless/realtek/rtw89/phy.c | 216 ++++++++++++++++++++++++- drivers/net/wireless/realtek/rtw89/phy.h | 3 + drivers/net/wireless/realtek/rtw89/rtw8851b.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852a.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852b.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852bt.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852c.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8922a.c | 1 + 13 files changed, 317 insertions(+), 4 deletions(-) commit abb541d1e52f1573f40bff2173fe6f8465b0f26c Author: Kuan-Chung Chen <damon.chen@realtek.com> Date: Mon Nov 11 14:51:30 2024 +0800 wifi: rtw89: sar: tweak 6GHz SAR subbands span Given that the 6GHz subband edges are not aligned, specific frequencies can span two adjacent subbands. We considered the need for this functionality outside of SAR and moved it to a common function. No logic change for existing chips. Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241111065132.19587-2-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/core.c | 47 +++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/core.h | 9 +++++ drivers/net/wireless/realtek/rtw89/sar.c | 57 ++++--------------------------- 3 files changed, 62 insertions(+), 51 deletions(-) commit 9c1df813e08832c3836c254bc8a2f83ff22dbc06 Author: Ping-Ke Shih <pkshih@realtek.com> Date: Mon Nov 11 14:38:35 2024 +0800 wifi: rtw89: pci: disable PCIE wake bit when PCIE deinit The PCIE wake bit is to control PCIE wake signal to host. When PCIE is going down, clear this bit to prevent waking up host unexpectedly. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241111063835.15454-1-pkshih@realtek.com drivers/net/wireless/realtek/rtw89/pci.c | 16 +++++++++++++--- drivers/net/wireless/realtek/rtw89/pci.h | 9 +++++++++ drivers/net/wireless/realtek/rtw89/pci_be.c | 1 + 3 files changed, 23 insertions(+), 3 deletions(-) commit f79bc5c67867c19ce2762e7934c20dbb835ed82c Author: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Date: Thu Nov 7 10:33:22 2024 -0300 wifi: rtlwifi: usb: fix workqueue leak when probe fails rtl_init_core creates a workqueue that is then assigned to rtl_wq. rtl_deinit_core does not destroy it. It is left to rtl_usb_deinit, which must be called in the probe error path. Fixes: 2ca20f79e0d8 ("rtlwifi: Add usb driver") Fixes: 851639fdaeac ("rtlwifi: Modify some USB de-initialize code.") Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241107133322.855112-6-cascardo@igalia.com drivers/net/wireless/realtek/rtlwifi/usb.c | 1 + 1 file changed, 1 insertion(+) commit 00260350aed80c002df270c805ca443ec9a719a6 Author: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Date: Thu Nov 7 10:33:21 2024 -0300 wifi: rtlwifi: fix init_sw_vars leak when probe fails If ieee80211_register_hw fails, the memory allocated for the firmware will not be released. Call deinit_sw_vars as the function that undoes the allocationes done by init_sw_vars. Fixes: cefe3dfdb9f5 ("rtl8192cu: Call ieee80211_register_hw from rtl_usb_probe") Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241107133322.855112-5-cascardo@igalia.com drivers/net/wireless/realtek/rtlwifi/usb.c | 1 + 1 file changed, 1 insertion(+) commit b4b26642b31ef282df6ff7ea8531985edfdef12a Author: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Date: Thu Nov 7 10:33:20 2024 -0300 wifi: rtlwifi: wait for firmware loading before releasing memory At probe error path, the firmware loading work may have already been queued. In such a case, it will try to access memory allocated by the probe function, which is about to be released. In such paths, wait for the firmware worker to finish before releasing memory. Fixes: a7f7c15e945a ("rtlwifi: rtl8192cu: Free ieee80211_hw if probing fails") Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241107133322.855112-4-cascardo@igalia.com drivers/net/wireless/realtek/rtlwifi/usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8559a9e0c457729fe3edb3176bbf7c7874f482b0 Author: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Date: Thu Nov 7 10:33:19 2024 -0300 wifi: rtlwifi: rtl8192se: rise completion of firmware loading as last step Just like in commit 4dfde294b979 ("rtlwifi: rise completion at the last step of firmware callback"), only signal completion once the function is finished. Otherwise, the module removal waiting for the completion could free the memory that the callback will still use before returning. Fixes: b0302aba812b ("rtlwifi: Convert to asynchronous firmware load") Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241107133322.855112-3-cascardo@igalia.com drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e73e11d303940119e41850a0452a0deda2cc4eb5 Author: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Date: Thu Nov 7 10:33:18 2024 -0300 wifi: rtlwifi: do not complete firmware loading needlessly The only code waiting for completion is driver removal, which will not be called when probe returns a failure. So this completion is unnecessary. Fixes: b0302aba812b ("rtlwifi: Convert to asynchronous firmware load") Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241107133322.855112-2-cascardo@igalia.com drivers/net/wireless/realtek/rtlwifi/pci.c | 1 - drivers/net/wireless/realtek/rtlwifi/usb.c | 1 - 2 files changed, 2 deletions(-) commit 5e5903a442bb889a62a0f5d89ac33e53ab08592c Author: Colin Ian King <colin.i.king@gmail.com> Date: Wed Nov 6 15:46:42 2024 +0000 wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop A previous clean-up fix removed the assignment of v2 inside a while loop that turned it into an infinite loop. Fix this by restoring the assignment of v2 from array[] so that v2 is updated inside the loop. Fixes: cda37445718d ("wifi: rtlwifi: rtl8821ae: phy: remove some useless code") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Tested-by: Ping-Ke Shih <pkshih@realtek.com> Reviewed-by: Su Hui <suhui@nfschina.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241106154642.1627886-1-colin.i.king@gmail.com drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d4c4903508f9e1b2bfec88f777718484e27343fb Author: Nick Morrow <usbwifi2024@gmail.com> Date: Thu Nov 7 08:28:46 2024 +0800 wifi: rtw88: Add additional USB IDs for RTL8812BU Add three additional USB IDs found in https://github.com/morrownr/88x2bu-20210702 to support more RTL8812BU devices. Signed-off-by: Nick Morrow <usbwifi2024@gmail.com> Signed-off-by: Zenm Chen <zenmchen@gmail.com> Reviewed-by: Mikhail Novosyolov <m.novosyolov@rosalinux.ru> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20241107002846.13748-1-zenmchen@gmail.com drivers/net/wireless/realtek/rtw88/rtw8822bu.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1ee6ff9ae3c1a9eda9081f9db04f85d3a7352d38 Author: Nick Morrow <usbwifi2024@gmail.com> Date: Wed Nov 6 15:57:10 2024 +0200 wifi: rtw88: 8812au: Add more device IDs From https://github.com/morrownr/8812au-20210820. Signed-off-by: Nick Morrow <usbwifi2024@gmail.com> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/31b7ee6b-f96d-43e0-a32f-a9eb1174a0c1@gmail.com drivers/net/wireless/realtek/rtw88/rtw8812au.c | 68 +++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) commit 7b5ce65d90187f0944e70dc5741aa0edfac926f4 Author: Larry Finger <Larry.Finger@lwfinger.net> Date: Wed Nov 6 15:55:31 2024 +0200 wifi: rtw88: 8821au: Add additional devices to the USB_DEVICE list These are the entries that Nick Morrow provided. From https://github.com/morrownr/8821au-20210708 Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/da05b866-a9ff-428c-a008-35e8cf200a98@gmail.com drivers/net/wireless/realtek/rtw88/rtw8821au.c | 52 +++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) commit 2d4993e163401c81e138c6e0e6223752c2e90402 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Thu Nov 14 07:21:48 2024 -0800 drm/xe: Split xe_gt_stat.h Follow what's done for the other headers, with the types split into a separate header that can be included by other *_types.h headers. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114152148.572447-5-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_gt_stats.h | 8 ++------ drivers/gpu/drm/xe/xe_gt_stats_types.h | 15 +++++++++++++++ drivers/gpu/drm/xe/xe_gt_types.h | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) commit caf4ee1a44511fea13038843312fe9d5a69d2209 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Thu Nov 14 07:21:47 2024 -0800 drm/xe: Drop HAS_HECI_* Just do the same as for other has_* flags, without a macro. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114152148.572447-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_device_types.h | 2 -- drivers/gpu/drm/xe/xe_heci_gsc.c | 8 ++++---- drivers/gpu/drm/xe/xe_irq.c | 8 ++++---- 3 files changed, 8 insertions(+), 10 deletions(-) commit 043254938d2bb8cade5878a2a6ebf9c7a20afcc9 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Thu Nov 14 07:21:46 2024 -0800 drm/xe: Include xe_oa_types.h xe_device_types.h and xe_gt_types.h only need to know about the xe_oa struct sizes. Include only the _types.h, like done for other components, and let the full header to be included by the compilation units. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114152148.572447-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_device.c | 1 + drivers/gpu/drm/xe/xe_device_types.h | 2 +- drivers/gpu/drm/xe/xe_gt_types.h | 2 +- drivers/gpu/drm/xe/xe_query.c | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) commit 15cf53ece41748a102f4b5ee26947c2ec059bf95 Author: Matthew Brost <matthew.brost@intel.com> Date: Wed Nov 13 09:17:51 2024 -0800 drm/xe: Mark preempt fence workqueue as reclaim Preempt fences are in the path of reclaim, and we signal these fences in the preempt workqueue. With that, we need to mark the preempt fence workqueue with reclaim so that this workqueue can make forward progress during reclaim. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241113171751.1677784-1-matthew.brost@intel.com drivers/gpu/drm/xe/xe_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 553a5d14fcd927194c409b10faced6a6dbc678d1 Author: Nirmoy Das <nirmoy.das@intel.com> Date: Thu Nov 14 16:05:37 2024 +0100 drm/xe/ufence: Wake up waiters after setting ufence->signalled If a previous ufence is not signalled, vm_bind will return -EBUSY. Delaying the modification of ufence->signalled can cause issues if the UMD reuses the same ufence so update ufence->signalled before waking up waiters. Cc: Matthew Brost <matthew.brost@intel.com> Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3233 Fixes: 977e5b82e090 ("drm/xe: Expose user fence from xe_sync_entry") Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114150537.4161573-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> drivers/gpu/drm/xe/xe_sync.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7d2faa8dbb7055a115fe0cd6068d7090094a573d Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Fri Nov 8 16:42:39 2024 +0100 drm/fbdev-client: Unexport drm_fbdev_client_setup() DRM drivers invoke drm_client_setup() to set up in-kernel clients. No driver should call drm_fbdev_client_setup() directly. Therefore, unexport the symbol and move the declaration to the internal header drm_client_internal.h. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108154600.126162-4-tzimmermann@suse.de .../gpu/drm/clients/drm_client_internal.h | 4 ++-- drivers/gpu/drm/clients/drm_client_setup.c | 3 ++- drivers/gpu/drm/clients/drm_fbdev_client.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) commit b86711c6d6e20eb945fe878de98ef7c9be2c2088 Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Fri Nov 8 16:42:38 2024 +0100 drm/client: Move public client header to clients/ subdirectory Move the public header file drm_client_setup.h to the clients/ subdirectory and update all drivers. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108154600.126162-3-tzimmermann@suse.de drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 2 +- drivers/gpu/drm/arm/hdlcd_drv.c | 2 +- drivers/gpu/drm/arm/malidp_drv.c | 2 +- drivers/gpu/drm/armada/armada_drv.c | 2 +- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 2 +- drivers/gpu/drm/ast/ast_drv.c | 2 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 2 +- drivers/gpu/drm/clients/drm_client_setup.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 +- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 2 +- drivers/gpu/drm/gma500/psb_drv.c | 2 +- drivers/gpu/drm/gud/gud_drv.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 2 +- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 2 +- drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 2 +- drivers/gpu/drm/imx/dcss/dcss-kms.c | 2 +- drivers/gpu/drm/imx/ipuv3/imx-drm-core.c | 2 +- drivers/gpu/drm/imx/lcdc/imx-lcdc.c | 2 +- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 2 +- drivers/gpu/drm/kmb/kmb_drv.c | 2 +- drivers/gpu/drm/logicvc/logicvc_drm.c | 2 +- drivers/gpu/drm/loongson/lsdc_drv.c | 2 +- drivers/gpu/drm/mcde/mcde_drv.c | 2 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 +- drivers/gpu/drm/meson/meson_drv.c | 2 +- drivers/gpu/drm/mgag200/mgag200_drv.c | 2 +- drivers/gpu/drm/msm/msm_drv.c | 2 +- drivers/gpu/drm/mxsfb/lcdif_drv.c | 2 +- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +- drivers/gpu/drm/pl111/pl111_drv.c | 2 +- drivers/gpu/drm/qxl/qxl_drv.c | 2 +- drivers/gpu/drm/radeon/radeon_drv.c | 2 +- drivers/gpu/drm/renesas/rcar-du/rcar_du_drv.c | 2 +- drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c | 2 +- drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 +- drivers/gpu/drm/solomon/ssd130x.c | 2 +- drivers/gpu/drm/sti/sti_drv.c | 2 +- drivers/gpu/drm/stm/drv.c | 2 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 2 +- drivers/gpu/drm/tegra/drm.c | 2 +- drivers/gpu/drm/tidss/tidss_drv.c | 2 +- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +- drivers/gpu/drm/tiny/arcpgu.c | 3 ++- drivers/gpu/drm/tiny/bochs.c | 2 +- drivers/gpu/drm/tiny/cirrus.c | 2 +- drivers/gpu/drm/tiny/gm12u320.c | 2 +- drivers/gpu/drm/tiny/hx8357d.c | 2 +- drivers/gpu/drm/tiny/ili9163.c | 2 +- drivers/gpu/drm/tiny/ili9225.c | 2 +- drivers/gpu/drm/tiny/ili9341.c | 2 +- drivers/gpu/drm/tiny/ili9486.c | 2 +- drivers/gpu/drm/tiny/mi0283qt.c | 2 +- drivers/gpu/drm/tiny/ofdrm.c | 2 +- drivers/gpu/drm/tiny/panel-mipi-dbi.c | 2 +- drivers/gpu/drm/tiny/repaper.c | 2 +- drivers/gpu/drm/tiny/sharp-memory.c | 2 +- drivers/gpu/drm/tiny/simpledrm.c | 2 +- drivers/gpu/drm/tiny/st7586.c | 2 +- drivers/gpu/drm/tiny/st7735r.c | 2 +- drivers/gpu/drm/tve200/tve200_drv.c | 2 +- drivers/gpu/drm/udl/udl_drv.c | 2 +- drivers/gpu/drm/vboxvideo/vbox_drv.c | 2 +- drivers/gpu/drm/vc4/vc4_drv.c | 2 +- drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +- drivers/gpu/drm/vkms/vkms_drv.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- drivers/gpu/drm/xlnx/zynqmp_kms.c | 2 +- include/drm/{ => clients}/drm_client_setup.h | 0 72 files changed, 72 insertions(+), 71 deletions(-) commit a49e7e8125a112d5dc63ff024191cd264c6260a8 Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Fri Nov 8 16:42:37 2024 +0100 drm: Move client code to clients/ subdirectory Just move some files around to keep source code well organized. Plus fix a type in the help text of CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108154600.126162-2-tzimmermann@suse.de drivers/gpu/drm/Kconfig | 72 +---------------------- drivers/gpu/drm/Makefile | 9 +-- drivers/gpu/drm/clients/Kconfig | 73 ++++++++++++++++++++++++ drivers/gpu/drm/clients/Makefile | 5 ++ drivers/gpu/drm/{ => clients}/drm_client_setup.c | 0 drivers/gpu/drm/{ => clients}/drm_fbdev_client.c | 0 6 files changed, 80 insertions(+), 79 deletions(-) commit 223217b800c2509c2f4c9c98e46c2090e44dd12b Author: Zhanjun Dong <zhanjun.dong@intel.com> Date: Thu Nov 7 13:38:41 2024 -0800 drm/xe/guc: Remove duplicate source field xe_hw_engine_snapshot.source save the information of where data copied from. Because the 'source' field is already populated inside 'matched_node' ptr hanging off xe_devcoredump_snapshot, which happenned either in guc_capture_extract_reglists or xe_engine_manual_capture, we can remove this redundant copy of 'source' from xe_hw_engine_snapshot. Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com> Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com> Changes from prior revs: v2:- Update commit message Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107213841.436384-1-zhanjun.dong@intel.com drivers/gpu/drm/xe/xe_guc_capture.c | 4 ++-- drivers/gpu/drm/xe/xe_hw_engine.c | 2 -- drivers/gpu/drm/xe/xe_hw_engine_types.h | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) commit ae4a812a64dad3fd4f7bbcd7af215cb68af8cf8c Author: Langyan Ye <yelangyan@huaqin.corp-partner.google.com> Date: Wed Nov 13 17:00:22 2024 +0800 drm/panel-edp: Add KDB KD116N2130B12 Add support for the KDB KD116N2130B12, pleace the EDID here for subsequent reference. 00 ff ff ff ff ff ff 00 2c 82 07 17 00 00 00 00 1c 21 01 04 95 1a 0e 78 0a 63 25 99 5b 5d 96 26 18 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 87 1b 56 88 50 00 0e 30 28 20 55 00 00 90 10 00 00 18 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 fe 00 4b 44 31 31 36 4e 32 31 33 30 42 31 32 00 17 Signed-off-by: Langyan Ye <yelangyan@huaqin.corp-partner.google.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241113090022.332586-1-yelangyan@huaqin.corp-partner.google.com drivers/gpu/drm/panel/panel-edp.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 86caee745e4506528801d9542db54e7b4c4d834b Author: Lucas Stach <l.stach@pengutronix.de> Date: Fri Jun 21 22:17:55 2024 +0200 drm/rockchip: analogix_dp: allow to work without panel When the DP output is routed to a external connector there is no need for a fixed panel, as the panel may be detected via EDID on the AUX channel. Allow to continue probing if no panel reference is present. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20240621201755.500271-1-l.stach@pengutronix.de drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec26ea94b990963229bffef88dea2831e884dc09 Author: Raphael Gallais-Pou <rgallaispou@gmail.com> Date: Tue Oct 29 19:30:41 2024 +0100 MAINTAINERS: add Raphael Gallais-Pou to DRM/STi maintainers Add myself as a maintainer for STi driver changes. Signed-off-by: Raphael Gallais-Pou <rgallaispou@gmail.com> Acked-by: Alain Volmat <alain.volmat@foss.st.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029183041.137414-1-rgallaispou@gmail.com Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit a594f284ddce5b152ffe4d938708ed714f796887 Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Wed Nov 13 17:50:16 2024 -0500 drm/{i915, xe}: Move power_domains suspend/resume to display_power Move intel_power_domains_{suspend,resume} to inside intel_display_power_{suspend_late, resume_early}. With this also change the VLV suspend failure to call the intel_display_power_resume_early. In the end, the only function executed there for VLV is the intel_power_domains_resume. Besides make the code more consistency give the call that was immediately before: intel_display_power_suspend_late. Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241113225016.208673-7-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/i915/display/intel_display_power.c | 6 +++++- drivers/gpu/drm/i915/display/intel_display_power.h | 2 +- drivers/gpu/drm/i915/i915_driver.c | 8 ++------ drivers/gpu/drm/xe/display/xe_display.c | 7 ++----- 4 files changed, 10 insertions(+), 13 deletions(-) commit 5772c4e999b70ce0ada481a6b36a62348d633296 Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Wed Nov 13 17:50:15 2024 -0500 drm/xe/display: Delay dsm handler registration Bring some consistency to register/unregister order at the same time it aligns with i915 sequence order. Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241113225016.208673-6-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/display/xe_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a86a9e8c6c9680f718fbed99879f9e78b16d21d Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Wed Nov 13 17:50:14 2024 -0500 drm/xe/display: Delay hpd_init resume Align with i915 and only initialize hotplugs after the display driver access has been resumed. Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241113225016.208673-5-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/xe/display/xe_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bd5dd9797d81e74af5011fc086c9b8e9968c339d Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Wed Nov 13 17:50:13 2024 -0500 drm/{i915, xe}/display: Move DP MST calls to display_driver Move dp_mst suspend/resume functions from the drivers towards intel_display_driver to continue with the unification. Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241113225016.208673-4-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/i915/display/intel_display_driver.c | 6 ++++++ drivers/gpu/drm/i915/i915_driver.c | 4 ---- drivers/gpu/drm/xe/display/xe_display.c | 7 ------- 3 files changed, 6 insertions(+), 11 deletions(-) commit ec803c9b00324fb884ea40ef1d17432dcb8e83b3 Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Wed Nov 13 17:50:12 2024 -0500 drm/i915/display: Move regfile registers intel_display.restore The intel_display struct already has a place for save/restore stuff. Move the i915's regfile there since they are only related to display. Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241113225016.208673-3-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/i915/display/i9xx_display_sr.c | 40 +++++++++++++---------- drivers/gpu/drm/i915/display/intel_display_core.h | 5 +++ drivers/gpu/drm/i915/i915_drv.h | 9 ----- 3 files changed, 27 insertions(+), 27 deletions(-) commit c3bda715438a5d30e67abf6830a2f01f36500f43 Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Wed Nov 13 17:50:11 2024 -0500 drm/i915/display: Convert i915_suspend into i9xx_display_sr These save & restore functions inside i915_suspend are old display functions to save and restore a bunch of display related registers. Move it under display and rename accordantly. Just don't move it entirely towards intel_display struct yet because it depends on drm_i915_private for the IS_MOBILE. While doing this conversion also update the MIT header using the new SPDX ones. v2: Fix Makefile and include (Jani) Removed vga and gmbus (Jani, Ville) Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241113225016.208673-2-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/i915/Makefile | 2 +- drivers/gpu/drm/i915/display/i9xx_display_sr.c | 95 +++++++++++++++++ drivers/gpu/drm/i915/display/i9xx_display_sr.h | 14 +++ drivers/gpu/drm/i915/i915_driver.c | 6 +- drivers/gpu/drm/i915/i915_suspend.c | 135 ------------------------- drivers/gpu/drm/i915/i915_suspend.h | 14 --- 6 files changed, 113 insertions(+), 153 deletions(-) commit 8985cb7a097f87e709d879504ac1700dd5fc5fd0 Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Wed Nov 13 17:50:10 2024 -0500 drm/i915: Remove vga and gmbus seq out of i915_restore_display Restrict this function to only save and restore registers functionality. Then, that can be moved out later to under display with a proper name. Cc: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241113225016.208673-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/i915/i915_driver.c | 6 ++++++ drivers/gpu/drm/i915/i915_suspend.c | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) commit dbf670f13949249f09b872ae59aab2feb259ca5f Author: Matthew Brost <matthew.brost@intel.com> Date: Wed Nov 13 18:25:22 2024 -0800 drm/xe: Wire devcoredump to LR TDR LR queues can hang, cause engine reset, or cause IOMMU CAT errors. Collect an error capture when this occurs. v2: - s/queue's/queues (Jonathan) v4: - Fix build (CI) Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114022522.1951351-8-matthew.brost@intel.com drivers/gpu/drm/xe/xe_guc_submit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a54b0de7ed72ca8e0012061c580b8447973eb82e Author: Matthew Brost <matthew.brost@intel.com> Date: Wed Nov 13 18:25:21 2024 -0800 drm/xe: Change xe_engine_snapshot_capture_for_job to be for queue During capture time, the target job may be unavailable (e.g., if it's in LR mode). However, the associated exec queue will be available regardless, change xe_engine_snapshot_capture_for_job to take a queue argument ann rename to xe_engine_snapshot_capture_for_queue. v2: - Reword commit message (Jonathan) - Remove redundant queueu check (Zhanjun) - Remove devcoredump job member (Zhanjun) Cc: Zhanjun Dong <zhanjun.dong@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114022522.1951351-7-matthew.brost@intel.com drivers/gpu/drm/xe/xe_devcoredump.c | 5 +---- drivers/gpu/drm/xe/xe_devcoredump_types.h | 2 -- drivers/gpu/drm/xe/xe_guc_capture.c | 29 ++++++++++++----------------- drivers/gpu/drm/xe/xe_guc_capture.h | 6 +++--- drivers/gpu/drm/xe/xe_guc_submit.c | 4 ++-- drivers/gpu/drm/xe/xe_hw_engine.c | 8 ++++---- drivers/gpu/drm/xe/xe_hw_engine.h | 4 ++-- 7 files changed, 24 insertions(+), 34 deletions(-) commit 990c29c2dd22e46395831bcff7b06a6ca9ee0573 Author: Matthew Brost <matthew.brost@intel.com> Date: Wed Nov 13 18:25:20 2024 -0800 drm/xe: Improve schedule disable response failure Print Guc ID and take devcoredump on schedule disable response failure. GuC ID is useful information and a schedule disable response failure is possible the LRC state is corrupted so a devcoredump is helpful to debug. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114022522.1951351-6-matthew.brost@intel.com drivers/gpu/drm/xe/xe_guc_submit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f62e6edfc11d30d07ce48d783da149dda4f7e78f Author: Matthew Brost <matthew.brost@intel.com> Date: Wed Nov 13 18:25:19 2024 -0800 drm/xe: Add exec queue param to devcoredump During capture time, the target job may be unavailable (e.g., if it's in LR mode). However, the associated exec queue will be available regardless, so add an exec queue param for such cases. v2: - Reword commit message (Jonathan) Cc: Zhanjun Dong <zhanjun.dong@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114022522.1951351-5-matthew.brost@intel.com drivers/gpu/drm/xe/xe_devcoredump.c | 15 +++++++++------ drivers/gpu/drm/xe/xe_devcoredump.h | 6 ++++-- drivers/gpu/drm/xe/xe_guc_submit.c | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) commit 9a1fce9df46d8b0789666522d78ffe1495add270 Author: Matthew Brost <matthew.brost@intel.com> Date: Wed Nov 13 18:25:18 2024 -0800 drm/xe: Add ring start to LRC snapshot Add LRC ring start register to LRC snapshot to verify no LRC register corruption upon hang. This could be possible if the indirect ring state was mapped to user space or via an internal KMD memory corruption. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114022522.1951351-4-matthew.brost@intel.com drivers/gpu/drm/xe/xe_lrc.c | 10 ++++++++++ drivers/gpu/drm/xe/xe_lrc.h | 1 + 2 files changed, 11 insertions(+) commit 37aa19fa724548d84285a5e358c5ec179b4a43cc Author: Matthew Brost <matthew.brost@intel.com> Date: Wed Nov 13 18:25:17 2024 -0800 drm/xe: Add ring address to LRC snapshot The ring is currently in LRC BO but this may change going forward. Include the ring address in the snapshot protecting again any future changes. v2: - s/ring_desc/ring_addr (Jonathan) Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114022522.1951351-3-matthew.brost@intel.com drivers/gpu/drm/xe/xe_lrc.c | 3 +++ drivers/gpu/drm/xe/xe_lrc.h | 1 + 2 files changed, 4 insertions(+) commit 10304796918a1d771f9bd187af6520eea0479bc1 Author: Matthew Brost <matthew.brost@intel.com> Date: Wed Nov 13 18:25:16 2024 -0800 drm/xe: Add xe_ring_lrc_is_idle() helper Add helper to compare ring head and tail to determine if LRC is idle. v2: - Fix kernel doc (CI, Zhanjun) Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114022522.1951351-2-matthew.brost@intel.com drivers/gpu/drm/xe/xe_guc_submit.c | 2 +- drivers/gpu/drm/xe/xe_lrc.c | 13 +++++++++++++ drivers/gpu/drm/xe/xe_lrc.h | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) commit 68634b12d769831dcf317f2736665fce6f895655 Author: Nirmoy Das <nirmoy.das@intel.com> Date: Tue Nov 12 18:01:23 2024 +0100 drm/xe: Ignore GGTT TLB inval errors during GT reset During GT reset, GGTT TLB invalidations may fail. This is acceptable as the reset will clear GGTT caches. Suppress only -ECANCELED other return codes are still unexpected error. v2: Add code comment(Matt). Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3389 Suggested-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241112170123.1236443-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 9d42476f71a9a000ea2d72aae5f4d43c5061fe10 Author: Francois Dugast <francois.dugast@intel.com> Date: Wed Nov 13 17:22:12 2024 +0100 drm/xe: Allow fault injection in vm create and vm bind IOCTLs Use fault injection infrastructure to allow specific functions to be configured over debugfs for failing during the execution of xe_vm_create_ioctl() and xe_vm_bind_ioctl(). This allows more thorough testing from user space by going through code paths for error handling and unwinding which cannot be reached by simply injecting errors in IOCTL arguments. This can help increase code robustness. v2: Add xe_pt_update_ops_{prepare,run} (Matthew Brost) Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241113162212.2154103-1-francois.dugast@intel.com Signed-off-by: Francois Dugast <francois.dugast@intel.com> drivers/gpu/drm/xe/xe_exec_queue.c | 1 + drivers/gpu/drm/xe/xe_pt.c | 3 +++ drivers/gpu/drm/xe/xe_vm.c | 4 ++++ 3 files changed, 8 insertions(+) commit b107c63d2953907908fd0cafb0e543b3c3167b75 Author: Ashutosh Dixit <ashutosh.dixit@intel.com> Date: Fri Nov 8 19:20:03 2024 -0800 drm/xe/oa: Fix "Missing outer runtime PM protection" warning Fix the following drm_WARN: [953.586396] xe 0000:00:02.0: [drm] Missing outer runtime PM protection ... <4> [953.587090] ? xe_pm_runtime_get_noresume+0x8d/0xa0 [xe] <4> [953.587208] guc_exec_queue_add_msg+0x28/0x130 [xe] <4> [953.587319] guc_exec_queue_fini+0x3a/0x40 [xe] <4> [953.587425] xe_exec_queue_destroy+0xb3/0xf0 [xe] <4> [953.587515] xe_oa_release+0x9c/0xc0 [xe] Suggested-by: John Harrison <john.c.harrison@intel.com> Suggested-by: Matthew Brost <matthew.brost@intel.com> Fixes: e936f885f1e9 ("drm/xe/oa/uapi: Expose OA stream fd") Cc: stable@vger.kernel.org Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241109032003.3093811-1-ashutosh.dixit@intel.com drivers/gpu/drm/xe/xe_oa.c | 2 ++ 1 file changed, 2 insertions(+) commit db696095b08fb7186fedb93ce216f67121ec9b44 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Thu Nov 7 21:33:17 2024 -0800 drm/xe: Sample gpu timestamp closer to exec queues Move the force_wake_get to the beginning of the function so the gpu timestamp can be closer to the sampled value for exec queues. This avoids additional delays waiting for force wake ack which can make the proportion between cycles/total_cycles fluctuate around the real value. For a gputop-like application getting 2 samples to calculate the utilization: sample 0: read_exec_queue_timestamp <<<< (A) read_gpu_timestamp sample 1: read_exec_queue_timestamp <<<<< (B) read_gpu_timestamp In the above case, utilization can be bigger or smaller than it should be, depending on if (A) or (B) receives additional delay, respectively. With this a LNL system that was failing on `xe_drm_fdinfo --r utilization-single-full-load` after ~60 iterations, get to run to 100 without a failure. This is still not perfect, and it's easy to introduce errors by just loading the CPU with `stress --cpu $(nproc)` - the same igt test in this case fails after 2 or 3 iterations. That will be dealt with in the test itself, using a longer sampling period. v2: Rename function and add another to get "any engine", preparing for caching the hwe in future (Umesh / Jonathan) Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108053318.3483678-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_drm_client.c | 73 +++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 24 deletions(-) commit 0fd4380c050d71334eb61067f3228a5d57172a45 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Thu Nov 7 21:33:16 2024 -0800 drm/xe: Wait on killed exec queues When an exec queue is killed it triggers an async process of asking the GuC to schedule the context out. The timestamp in the context image is only updated when this process completes. In case a userspace process kills an exec and tries to read the timestamp, it may not get an updated runtime. Add synchronization between the process reading the fdinfo and the exec queue being killed. After reading all the timestamps, wait on exec queues in the process of being killed. When that wait is over, xe_exec_queue_fini() was already called and updated the timestamps. v2: Do not update pending_removal before validating user args (Matthew Auld) v3: Move wait on pending to be done before getting any timestamp so it's more likely for the gpu and exec queue timestamps to be closer together Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2667 Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108053318.3483678-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_device_types.h | 5 +++++ drivers/gpu/drm/xe/xe_drm_client.c | 7 +++++++ drivers/gpu/drm/xe/xe_exec_queue.c | 6 ++++++ 3 files changed, 18 insertions(+) commit 901dd2617c9c3554b2449c8844b6338009112fcf Author: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> Date: Wed Nov 6 11:55:49 2024 +0100 accel/ivpu: Fix Qemu crash when running in passthrough Restore PCI state after putting the NPU in D0. Restoring state before powering up the device caused a Qemu crash if NPU was running in passthrough mode and recovery was performed. Fixes: 3534eacbf101 ("accel/ivpu: Fix PCI D0 state entry in resume") Cc: stable@vger.kernel.org # v6.8+ Reviewed-by: Karol Wachowski <karol.wachowski@linux.intel.com> Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106105549.2757115-1-jacek.lawrynowicz@linux.intel.com drivers/accel/ivpu/ivpu_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8b3c6db941299d7cc31bd9befed3518fdebaf68 Author: Matthew Auld <matthew.auld@intel.com> Date: Tue Nov 12 16:28:28 2024 +0000 drm/xe: handle flat ccs during hibernation on igpu Starting from LNL, CCS has moved over to flat CCS model where there is now dedicated memory reserved for storing compression state. On platforms like LNL this reserved memory lives inside graphics stolen memory, which is not treated like normal RAM and is therefore skipped by the core kernel when creating the hibernation image. Currently if something was compressed and we enter hibernation all the corresponding CCS state is lost on such HW, resulting in corrupted memory. To fix this evict user buffers from TT -> SYSTEM to ensure we take a snapshot of the raw CCS state when entering hibernation, where upon resuming we can restore the raw CCS state back when next validating the buffer. This has been confirmed to fix display corruption on LNL when coming back from hibernation. Fixes: cbdc52c11c9b ("drm/xe/xe2: Support flat ccs") Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3409 Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: <stable@vger.kernel.org> # v6.8+ Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241112162827.116523-2-matthew.auld@intel.com drivers/gpu/drm/xe/xe_bo_evict.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 90b63bd4a67d6f992f1be3447e87ce68274e6763 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Wed Oct 30 14:11:00 2024 +0530 drm/i915/dp: Limit max compressed bpp to 18 when forcing DSC While forcing DSC when it is not actually required, the max compressed bpp from the source gets picked for compression for some pipe bpps. Apparently, when DSC is not required, forcing DSC to the maximum compressed bpp seems to cause underruns. To avoid this, limit the max compressed bpp to 18 while forcing DSC. This value works across platforms with different pipe bpps and prevents underruns. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Naga Venkata Srikanth V <nagavenkata.srikanth.v@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241030084100.1361689-1-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 78e154d42f2c72905fe66a400847e1b2b101b7b2 Author: Balaji Pothunoori <quic_bpothuno@quicinc.com> Date: Wed Oct 30 17:16:25 2024 +0530 wifi: ath11k: Fix unexpected return buffer manager error for WCN6750/WCN6855 The following error messages were encountered while parsing fragmented RX packets for WCN6750/WCN6855: ath11k 17a10040.wifi: invalid return buffer manager 4 This issue arose due to a hardcoded check for HAL_RX_BUF_RBM_SW3_BM introduced in 'commit 71c748b5e01e ("ath11k: Fix unexpected return buffer manager error for QCA6390")' For WCN6750 and WCN6855, the return buffer manager ID should be HAL_RX_BUF_RBM_SW1_BM. The incorrect conditional check caused fragmented packets to be dropped, resulting in the above error log. Fix this by adding a check for HAL_RX_BUF_RBM_SW1_BM. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.2.0.c2-00258-QCAMSLSWPL-1 Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-04479-QCAHSPSWPL_V1_V2_SILICONZ_IOE-1 Fixes: 71c748b5e01e ("ath11k: Fix unexpected return buffer manager error for QCA6390") Signed-off-by: Balaji Pothunoori <quic_bpothuno@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241030114625.2416942-1-quic_bpothuno@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath11k/dp_rx.c | 1 + drivers/net/wireless/ath/ath11k/hal_rx.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit eb8c0534713865d190856f10bfc97cf0b88475b1 Author: Karol Przybylski <karprzy7@gmail.com> Date: Tue Nov 5 11:11:31 2024 +0100 wifi: ath12k: Fix for out-of bound access error Selfgen stats are placed in a buffer using print_array_to_buf_index() function. Array length parameter passed to the function is too big, resulting in possible out-of bound memory error. Decreasing buffer size by one fixes faulty upper bound of passed array. Discovered in coverity scan, CID 1600742 and CID 1600758 Signed-off-by: Karol Przybylski <karprzy7@gmail.com> Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241105101132.374372-1-karprzy7@gmail.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1053987a6bce68127504cda476ee56b97c9109d9 Author: Dmitry Antipov <dmantipov@yandex.ru> Date: Mon Nov 11 13:47:24 2024 +0300 wifi: ath9k: miscellaneous spelling fixes Correct spelling here and there as suggested by codespell. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk> Link: https://patch.msgid.link/20241111104724.484586-1-dmantipov@yandex.ru Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath9k/antenna.c | 2 +- drivers/net/wireless/ath/ath9k/ar9002_hw.c | 2 +- drivers/net/wireless/ath/ath9k/ar9003_hw.c | 2 +- drivers/net/wireless/ath/ath9k/ar9003_mci.c | 4 ++-- drivers/net/wireless/ath/ath9k/ar9003_phy.h | 2 +- drivers/net/wireless/ath/ath9k/channel.c | 2 +- drivers/net/wireless/ath/ath9k/common-spectral.c | 2 +- drivers/net/wireless/ath/ath9k/dfs.c | 2 +- drivers/net/wireless/ath/ath9k/hif_usb.c | 2 +- drivers/net/wireless/ath/ath9k/hw.c | 4 ++-- drivers/net/wireless/ath/ath9k/hw.h | 2 +- drivers/net/wireless/ath/ath9k/mac.h | 2 +- drivers/net/wireless/ath/ath9k/main.c | 2 +- drivers/net/wireless/ath/ath9k/wow.c | 6 +++--- drivers/net/wireless/ath/ath9k/xmit.c | 2 +- 15 files changed, 19 insertions(+), 19 deletions(-) commit 7d4d1c54c40ef8469ab46b9a6677f380f9b01e75 Author: John Harrison <John.C.Harrison@Intel.com> Date: Fri Nov 8 13:27:37 2024 -0800 drm/xe/guc: Support crash dump notification from GuC Add support for the two crash dump notifications from GuC. Either one means GuC is toast, so just capture state trigger a reset. Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108212737.2044007-3-John.C.Harrison@Intel.com drivers/gpu/drm/xe/xe_guc_ct.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 902de142150c84eaabcfee31f83c8693b40c13ca Author: John Harrison <John.C.Harrison@Intel.com> Date: Fri Nov 8 13:27:36 2024 -0800 drm/xe/guc: Reduce default GuC log verbosity Drop the default verbosity from 5 (max) to 3 as the extra verbosity generally doesn't provide anything vitally important but does cause rapid log overflow. Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108212737.2044007-2-John.C.Harrison@Intel.com drivers/gpu/drm/xe/xe_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90e315a58fd903e43457fa085b6644e45c047e31 Author: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Date: Tue Nov 5 16:24:01 2024 -0800 drm/xe/gsc: Improve SW proxy error checking and logging If an error occurs in the GSC<->CSME handshake, the GSC will send a PROXY_END msg to the driver with the status set to an error code. We currently don't check the status when receiving a PROXY_END message and instead check the proxy initialization status in the FWSTS reg; therefore, while still catching any initialization failures, we lose the actual returned error code. This can be easily improved by checking the status value and printing it to dmesg if it's an error. Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Alan Previn <alan.previn.teres.alexis@intel.com> Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106002402.486700-1-daniele.ceraolospurio@intel.com drivers/gpu/drm/xe/xe_gsc_proxy.c | 47 ++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 11 deletions(-) commit 91daf92d9da10c87cb3c4310ba60b8edfde29515 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Nov 12 13:10:44 2024 +0200 drm/i915/dp: add comments about hooks called from MST stream encoders It would be best to have self-explanatory code, but lacking that, add some comments about the way the DDI encoder hooks get called from DP MST stream encoders. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/5941b8ef48cac4d61de2e2806a80645de48e856c.1731409802.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_ddi.c | 51 ++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 13 deletions(-) commit 5674e700d43eb23ca30aa794262bef5a18dac708 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Nov 12 13:10:43 2024 +0200 drm/i915/mst: change naming from fake encoders to MST stream encoders The fake encoders pretty much match individual MST streams. The encoders remain as fake as ever, but change the naming to MST stream encoders. Rename all the encoder hooks and related functions called from them to mst_stream_* to clarify what type of encoders the hooks are called on. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/37d9572e884ca2fdd84ea6722b4b7cefde04eed9.1731409802.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp_mst.c | 204 ++++++++++++++-------------- 1 file changed, 100 insertions(+), 104 deletions(-) commit 529798bd786a83180eba8da87421ba64d8bb873a Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Nov 12 13:10:42 2024 +0200 drm/i915/mst: convert to struct intel_display struct intel_display will replace struct drm_i915_private as the main display device data structure. Convert the DP MST code to struct intel_display as much as possible. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/84c9923fccdd779f0ca713cab1d26a0c802b140c.1731409802.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp_mst.c | 170 ++++++++++++++-------------- 1 file changed, 85 insertions(+), 85 deletions(-) commit 8c6942748b35cd94a0cfa4e72f19169733cb0395 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Nov 12 13:10:41 2024 +0200 drm/i915/display: make CHICKEN_TRANS() display version aware Making register macros platform or display version aware is not exactly something I want to promote widely, but in this case it's the lesser of two evils. hsw_chicken_trans_reg() is not pretty, and it doesn't have a suitable home. v2: Rebase Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/712c17ee22537b0628aa32695743bc017b3fe332.1731409802.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_ddi.c | 21 ++++++--------------- drivers/gpu/drm/i915/display/intel_ddi.h | 2 -- drivers/gpu/drm/i915/display/intel_display.c | 15 ++++++++------- drivers/gpu/drm/i915/display/intel_dp_mst.c | 4 ++-- drivers/gpu/drm/i915/display/intel_hdcp.c | 2 +- drivers/gpu/drm/i915/display/intel_psr.c | 4 ++-- drivers/gpu/drm/i915/display/intel_vrr.c | 2 +- drivers/gpu/drm/i915/i915_reg.h | 5 +++-- 8 files changed, 23 insertions(+), 32 deletions(-) commit 3e5c6c719967adbf9f66cc3c1a961050629805f8 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Nov 12 13:10:40 2024 +0200 drm/i915/mst: use primary_encoder in fake mst encoder creation Use a primary_encoder local variable in intel_dp_create_fake_mst_encoder() for clarity. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/7c9ad1db97550b7eacb1f010521704f623b0c689.1731409802.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ca743f5faca00a00ba17b115db1f1cea5930f622 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Nov 12 13:10:39 2024 +0200 drm/i915/mst: introduce to_primary_encoder() and to_primary_dp() Add helpers to_primary_encoder() and to_primary_dp() to convert fake MST encoder pointers to primary encoder and DP pointers, respectively, and use them. The main point is to highlight the primary encoder and DP usage. Very few places actually need the struct intel_dp_mst_encoder pointer, or the primary struct intel_digital_port, so ditch them where possible for clarity. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ff8786c04bae053055783f720f89a4d9f9815c70.1731409802.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp_mst.c | 98 +++++++++++++++-------------- 1 file changed, 52 insertions(+), 46 deletions(-) commit 45f9b3e8cb43bdb9c0cf430199ed19ba2fc0252d Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Nov 12 13:10:38 2024 +0200 drm/i915/mst: rename intel_encoder to encoder Switch to the modern style in fake mst encoder creation. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/4d29387fba64b925c6ab4c108782a7b5ac22628a.1731409802.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp_mst.c | 46 ++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 612d02f9357669d9ba0a152e9782c15e6461d669 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Nov 12 13:10:37 2024 +0200 drm/i915/mst: pass primary encoder to primary encoder hooks Pass the primary encoder to the primary encoder hooks. This is pedantically correct, but intel_ddi_post_pll_disable() also works with the fake encoder by coincidence. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/a0151fddfdd5ec11a26345232cdd3ae59c8cf56a.1731409802.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17558f97fe62fbe14757880a0aa998bfd194ea95 Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Thu Oct 31 22:42:07 2024 +0000 gpu: drm: replace of_graph_get_next_endpoint() From DT point of view, in general, drivers should be asking for a specific port number because their function is fixed in the binding. of_graph_get_next_endpoint() doesn't match to this concept. Simply replace - of_graph_get_next_endpoint(xxx, NULL); + of_graph_get_endpoint_by_regs(xxx, 0, -1); Link: https://lore.kernel.org/r/20240202174941.GA310089-robh@kernel.org Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/87frob3neo.wl-kuninori.morimoto.gx@renesas.com drivers/gpu/drm/drm_of.c | 4 +++- drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 +- drivers/gpu/drm/tiny/arcpgu.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) commit cd8e9956552dd2155f6e5ae55eb9c268233c104a Author: Nirmoy Das <nirmoy.das@intel.com> Date: Tue Nov 5 17:03:27 2024 +0100 drm/xe: Take job list lock in xe_sched_first_pending_job Access to the pending_list should always happens under job_list_lock. Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241105160327.2970277-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> drivers/gpu/drm/xe/xe_gpu_scheduler.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit bdf5e3f117560a5ef1f8a6499baa5090cdc5ef9a Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 11 12:34:04 2024 +0200 drm/i915/display: add mobile platform group Identify mobile platforms separately in display, using the platform group mechanism. This enables dropping the dependency on i915_drv.h IS_MOBILE() from display code. v2: Make snb_display static (kernel test robot) Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/2389fd58446e83a79ec57bc0b037679662037b9e.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> .../gpu/drm/i915/display/intel_display_device.c | 104 ++++++++++++++------- .../gpu/drm/i915/display/intel_display_device.h | 1 + 2 files changed, 70 insertions(+), 35 deletions(-) commit b7f48bfda832c92d05ecc6f40149cd6b665d3cf2 Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 11 12:34:03 2024 +0200 drm/i915/display: pass struct pci_dev * to intel_display_device_probe() Convert intel_display_device_probe() to accept struct pci_dev * instead of struct drm_i915_private *. Return struct intel_display * in preparation of allocating the memory of it later. Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ab4e960e3fff46cbeba185882b1e554f0ccd5877.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_display_device.c | 10 ++++++---- drivers/gpu/drm/i915/display/intel_display_device.h | 4 ++-- drivers/gpu/drm/i915/i915_driver.c | 2 +- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +- drivers/gpu/drm/xe/display/xe_display.c | 5 +++-- 5 files changed, 13 insertions(+), 10 deletions(-) commit 1a6330df069f90b94625ec77cb290d51a99f2c7a Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 11 12:34:02 2024 +0200 drm/i915/display: convert display device identification to struct intel_display Convert intel_display_device.[ch] to struct intel_display, including callers, but excluding intel_display_device_probe() which will be handled in follow-up. v2: fix display->drm = display->drm goof-up Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/865b27b66f599e707081d46fca9f679e19a4e8aa.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_crt.c | 2 +- .../gpu/drm/i915/display/intel_display_device.c | 156 +++++++++++---------- .../gpu/drm/i915/display/intel_display_device.h | 7 +- drivers/gpu/drm/i915/display/intel_dp.c | 3 +- drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 +- drivers/gpu/drm/i915/display/intel_dvo.c | 3 +- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- drivers/gpu/drm/i915/display/intel_hotplug.c | 4 +- drivers/gpu/drm/i915/display/intel_panel.c | 3 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 3 +- drivers/gpu/drm/i915/display/intel_tv.c | 2 +- drivers/gpu/drm/i915/i915_driver.c | 6 +- drivers/gpu/drm/xe/display/xe_display.c | 9 +- 13 files changed, 108 insertions(+), 95 deletions(-) commit 151072cb3862ad5a44d3008a74f4b464b5f4c128 Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 11 12:34:01 2024 +0200 drm/i915/display: rename i915 parameter to __display in feature helpers All the feature check helpers now support (and some require) passing struct intel_display. Rename the parameter to __display to reflect the fact. v2: Rebase Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/4933ded2efa9f333c560b6e634f60d4808614030.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> .../gpu/drm/i915/display/intel_display_device.h | 116 ++++++++++----------- 1 file changed, 58 insertions(+), 58 deletions(-) commit 9adc92e4c9768ee2265a1e78d79a5c5ebc31486e Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 11 12:34:00 2024 +0200 drm/i915/display: convert HAS_ULTRAJOINER() to struct intel_display Convert HAS_ULTRAJOINER() to struct intel_display. Do minimal drive-by conversions to struct intel_display in the callers while at it. Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/f562d35c94cf7ef18d261a9867d959a58f165f1e.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_display.c | 10 ++++++---- drivers/gpu/drm/i915/display/intel_display_debugfs.c | 4 ++-- drivers/gpu/drm/i915/display/intel_display_device.h | 6 +++--- drivers/gpu/drm/i915/display/intel_dp.c | 5 ++--- 4 files changed, 13 insertions(+), 12 deletions(-) commit 8a8b9b16fed099038499b3a25f4de5ca6cb7a4b7 Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 11 12:33:59 2024 +0200 drm/i915/display: convert HAS_HW_SAGV_WM() to struct intel_display Convert HAS_HW_SAGV_WM() to struct intel_display. Do minimal drive-by conversions to struct intel_display in the callers while at it. v2: Rebase Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> # v1 Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> # v1 Link: https://patchwork.freedesktop.org/patch/msgid/8babfd6f09df054d33d604a02e213200a3783737.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_cursor.c | 5 ++-- .../gpu/drm/i915/display/intel_display_device.h | 2 +- drivers/gpu/drm/i915/display/skl_universal_plane.c | 7 ++--- drivers/gpu/drm/i915/display/skl_watermark.c | 33 +++++++++++++--------- 4 files changed, 25 insertions(+), 22 deletions(-) commit 9832faf866753b85ca436f158c9d8f05c7d3865c Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 11 12:33:58 2024 +0200 drm/i915/display: convert HAS_SAGV() to struct intel_display Convert HAS_SAGV() to struct intel_display. Do minimal drive-by conversions to struct intel_display in the callers while at it. Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/c0f65566d08c4ab5296740367979beb1670d1c06.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> .../gpu/drm/i915/display/intel_display_device.h | 3 +- drivers/gpu/drm/i915/display/skl_watermark.c | 50 ++++++++++++---------- 2 files changed, 30 insertions(+), 23 deletions(-) commit e4a7118eac82ff06a9f315abe3fcaaa4bb4d76ab Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 11 12:33:57 2024 +0200 drm/i915/display: convert HAS_MBUS_JOINING() to struct intel_display Convert HAS_MBUS_JOINING() to struct intel_display. Do minimal drive-by conversions to struct intel_display in the callers while at it. v2: Rebase Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> # v1 Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> # v1 Link: https://patchwork.freedesktop.org/patch/msgid/c198dd5a0ab0a5f37edce3d18ddb4991cf3d4792.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> .../gpu/drm/i915/display/intel_display_device.h | 2 +- drivers/gpu/drm/i915/display/skl_watermark.c | 25 ++++++++++++---------- 2 files changed, 15 insertions(+), 12 deletions(-) commit e77f8c2ba2852943e642c1eb1c71551643b83590 Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 11 12:33:56 2024 +0200 drm/i915/display: convert HAS_IPS() to struct intel_display Convert HAS_IPS() to struct intel_display. Do minimal drive-by conversions to struct intel_display in the callers while at it. Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/55fd6063b30ca227483a479cff0012e5a915196d.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/hsw_ips.c | 4 +++- drivers/gpu/drm/i915/display/intel_display.c | 3 ++- drivers/gpu/drm/i915/display/intel_display_device.h | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) commit 86787e55bcd3a7b27cd3bd05a0f43919541bb2f2 Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 11 12:33:55 2024 +0200 drm/i915/display: convert HAS_GMBUS_BURST_READ() to struct intel_display Convert HAS_GMBUS_BURST_READ() to struct intel_display. Do minimal drive-by conversions to struct intel_display in the callers while at it. Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/34dfafeccf6f8ddd5437c79e18978151bfd96c24.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_display_device.h | 2 +- drivers/gpu/drm/i915/display/intel_gmbus.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit bd3b470e040ec56202c424f0a37b4eda4c94d734 Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 11 12:33:54 2024 +0200 drm/i915/display: convert HAS_DP20() to struct intel_display Convert HAS_DP20() to struct intel_display. Do minimal drive-by conversions to struct intel_display in the callers while at it. v2: Rebase Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> # v1 Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> # v1 Link: https://patchwork.freedesktop.org/patch/msgid/757d91d2a57052b11cbd9f4f40d836d9245ca926.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_audio.c | 7 +++--- drivers/gpu/drm/i915/display/intel_ddi.c | 28 +++++++++++----------- .../gpu/drm/i915/display/intel_display_device.h | 2 +- drivers/gpu/drm/i915/display/intel_psr.c | 8 +++---- 4 files changed, 21 insertions(+), 24 deletions(-) commit b73b6c0117531e6f24c277992da213a90763d3a1 Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 11 12:33:53 2024 +0200 drm/i915/display: convert HAS_DOUBLE_BUFFERED_M_N() to struct intel_display Convert HAS_DOUBLE_BUFFERED_M_N() to struct intel_display. Do minimal drive-by conversions to struct intel_display in the callers while at it. v2: Rebase Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/d313d32ae411b86eedb86c4a4949dc84588362df.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_display.c | 3 ++- drivers/gpu/drm/i915/display/intel_display_device.h | 2 +- drivers/gpu/drm/i915/display/intel_dp.c | 4 ++-- drivers/gpu/drm/i915/display/intel_drrs.c | 4 +++- 4 files changed, 8 insertions(+), 5 deletions(-) commit a4a7188e2ac17e6eb9fccd017695a34a407b5d1f Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 11 12:33:52 2024 +0200 drm/i915/display: convert HAS_4TILE() to struct intel_display Convert HAS_4TILE() to struct intel_display. Do minimal drive-by conversions to struct intel_display in the callers while at it. Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/123799e7c96d03d8eea7d9bea3d450e82c88ae5d.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_display_device.h | 2 +- drivers/gpu/drm/i915/display/skl_universal_plane.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) commit 76b7c4f1a27df808e68cb6aa5946d3ba4ece1828 Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 11 12:33:51 2024 +0200 drm/i915/display: convert HAS_D12_PLANE_MINIMIZATION() to struct intel_display Convert HAS_D12_PLANE_MINIMIZATION() to struct intel_display. Do minimal drive-by conversions to struct intel_display in the callers while at it. Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ed9402eb83ab301f3c1d60884376d715b2190fd3.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_display_device.c | 2 +- drivers/gpu/drm/i915/display/intel_display_device.h | 2 +- drivers/gpu/drm/i915/display/intel_display_irq.c | 12 +++++++----- drivers/gpu/drm/i915/display/skl_universal_plane.c | 4 +++- 4 files changed, 12 insertions(+), 8 deletions(-) commit 7347d4e4d53ff4002fdc42e6eb2ace403eccf393 Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Nov 11 12:33:50 2024 +0200 drm/i915/display: identify discrete graphics Identify discrete graphics separately in display, using the platform group mechanism. This enables dropping the dependency on i915_drv.h IS_DGFX() from display code. Start grouping platform groups separately in INTEL_DISPLAY_PLATFORMS() in anticipation of more groups to come. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/c02230d26cc0d9dbd7ddcc064661b2ad03739b6a.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_display_device.c | 8 ++++++-- drivers/gpu/drm/i915/display/intel_display_device.h | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) commit 44499559496c1dac43583f4387d38de1b612a69b Author: Suraj Kandpal <suraj.kandpal@intel.com> Date: Mon Nov 4 09:29:51 2024 +0530 drm/i915/hdcp: Fix when the first read and write are retried Make sure that the first read/write in hdcp2_authentication_key_exchange are only retried when we have either DP/DPMST encoder connected, since we do this to give docks and dp encoders some extra time to get their HDCP DPCD registers ready only for DP/DPMST encoders as this issue is only observed here no need to burden other encoders with extra retries as this causes the HDMI connector to have some other timing issue and fails HDCP authentication. --v2 -Add intent of patch [Chaitanya] -Add reasoning for loop [Jani] -Make sure we forfiet the 50ms wait for non DP/DPMST encoders. --v3 -Remove the is_dp_encoder check [Jani/Chaitanya] -Make the commit message more clearer [Jani] Fixes: 9d5a05f86d2f ("drm/i915/hdcp: Retry first read and writes to downstream") Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104035951.517837-1-suraj.kandpal@intel.com drivers/gpu/drm/i915/display/intel_hdcp.c | 32 +++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit 64d2571a3751b83cde7f4843fb2a69b8c19e168b Author: Gabor Juhos <j4g8y7@gmail.com> Date: Tue Oct 29 18:35:25 2024 +0100 dt-bindings: arm: qcom: add missing elements to the SoC list There are multiple compatible strings defined in the json schema for SoCs which are not included in the SoC elements list. Extend the list with those items for completeness. Signed-off-by: Gabor Juhos <j4g8y7@gmail.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241029-qcom-missing-socs-v1-1-c5bf587b0afc@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/arm/qcom.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit bd2dbbb1f35af9d53b1eb5facc84c35443562930 Author: Aleksandrs Vinarskis <alex.vinarskis@gmail.com> Date: Wed Oct 30 19:19:36 2024 +0100 arm64: dts: qcom: x1e80100-dell-xps13-9345: Introduce retimer support Describe x2 Parade PS8830 retimers for left and right USB Type-C ports respectively. Adjust graphs between connectors and the PHYs accordingly, add the voltage regulators. Dell XPS 13" 9345's DSDT describes 3rd retimer, but its not actually present. Regulators are _assumed_ to be correct, since: * tlmm pins match DSDT definition. * tlmm and pmic gpios were tested and confirmed to be powering off/resetting respective retimers. * USB3.0 now works correctly in both orientation, pre and post suspend. Derived from: arm64: dts: qcom: x1e80100-t14s: Add external DP support Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241030182153.16256-2-alex.vinarskis@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> .../boot/dts/qcom/x1e80100-dell-xps13-9345.dts | 293 ++++++++++++++++++++- 1 file changed, 283 insertions(+), 10 deletions(-) commit f8af195beeb0096cdcd1610ac70b544fa1831f2e Author: Qiang Yu <quic_qianyu@quicinc.com> Date: Mon Nov 4 23:36:14 2024 -0800 arm64: dts: qcom: x1e80100: Add support for PCIe3 on x1e80100 Describe PCIe3 controller and PHY. Also add required system resources like regulators, clocks, interrupts and registers configuration for PCIe3. Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241105073615.3076979-1-quic_qianyu@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100.dtsi | 204 ++++++++++++++++++++++++++++++++- 1 file changed, 203 insertions(+), 1 deletion(-) commit ecf2afc59c1ea3cdd3777effa7a422f60b9039c8 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 14:26:58 2024 +0200 drm/i915/scaler: Extract intel_allocate_scaler() intel_atomic_setup_scaler() is a mess. Make it a bit less so by moving the scaler allocation loop into its own function. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-9-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/skl_scaler.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) commit 3de26c81e9ae4aa142c7ce65b570b2e24861f51f Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 14:26:57 2024 +0200 drm/i915/scaler: Make scaler in_use a bool Make scaler in_use a boolean since that's how it's used. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-8-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_display_types.h | 2 +- drivers/gpu/drm/i915/display/skl_scaler.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 02cd59fb4e978b6de7692f1487cd63334ddee9ec Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 14:26:56 2024 +0200 drm/i915/scaler: Carve up intel_atomic_setup_scalers() Declutter intel_atomic_setup_scalers() a bit by splitting the crtc scaling/pfit vs. plane scaling cases into their own functions. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-7-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/skl_scaler.c | 92 +++++++++++++++++++------------ 1 file changed, 56 insertions(+), 36 deletions(-) commit 3360d4d6d42ab3bf0eb38fc1ffde2078a2334d8e Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 14:26:55 2024 +0200 drm/i915/scaler: Convert the scaler code to intel_display struct intel_display will replace struct drm_i915_private as the main thing for display code. Convert the scaler code to use it (as much as possible at this stage). Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-6-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/skl_scaler.c | 105 +++++++++++++++--------------- 1 file changed, 53 insertions(+), 52 deletions(-) commit 5b68f2346dcf43f6b89456884c9bacc6590445d3 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 14:26:54 2024 +0200 drm/i915/scaler: Clean up intel_atomic_setup_scalers() a bit intel_atomic_setup_scalers() is currently messing around with the internals of the atomic states. Stop doing that and instead use the regular interfaces so that we don't need to know any ugly implementation details. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/skl_scaler.c | 60 +++++++++++-------------------- 1 file changed, 20 insertions(+), 40 deletions(-) commit b5b4b5388302a9310cb0e294bf52ff6ee3e85496 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 14:26:53 2024 +0200 drm/i915/scaler: Pass the whole atomic state into intel_atomic_setup_scalers() intel_atomic_setup_scalers() currently digs out the full atomic state from the crtc state. Flip that on its head so that we instead pass in the full atomic state and dig out the crtc state (and whatever else we need). This is generallte the better approach as it works in all phases of the atomic commit, whereas the other apporoach only really works during .atomic_check(). Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display/skl_scaler.c | 19 +++++++++---------- drivers/gpu/drm/i915/display/skl_scaler.h | 7 +++---- 3 files changed, 13 insertions(+), 15 deletions(-) commit e912069e61fa5b48f1986c3d689a08c2d45251c3 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 14:26:52 2024 +0200 drm/i915/scaler: Remove redudant junk from skl_scaler.h Nuke some redundant includes and forward declarations from skl_scaler.h. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-3-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/skl_scaler.h | 4 ---- 1 file changed, 4 deletions(-) commit 7488f64e89b02f5cb81d7d2ca22b0aa5538738ed Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 14:26:51 2024 +0200 drm/i915/scaler: s/intel_crtc/crtc/ etc. Rename some variables from the intel_foo to just foo, to match the more modern style used throughout the driver. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-2-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/display/skl_scaler.c | 33 +++++++++++++++---------------- drivers/gpu/drm/i915/display/skl_scaler.h | 2 +- 2 files changed, 17 insertions(+), 18 deletions(-) commit f2ca5484cb38cfbc2f154ac7b5b742f9a3379aea Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 18:11:23 2024 +0200 drm/i915/crt: Nuke unused crt->connector crt->connector is never used, nuke it. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107161123.16269-11-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_crt.c | 5 ----- 1 file changed, 5 deletions(-) commit f865dfc7791d75271fbbe265eb269d759a8125ff Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 18:11:22 2024 +0200 drm/i915/crt: Rename some variables Rename a bunch of local variables to the preferred encoder/connector from intel_encoder/intel_connector. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107161123.16269-10-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_crt.c | 44 +++++++++++++++----------------- 1 file changed, 20 insertions(+), 24 deletions(-) commit f34ad8565a099a1615956683b17f17d63cb8994c Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 18:11:21 2024 +0200 drm/i915/crt: Drop pointless drm_device variables Remove a bunch of pointless 'struct drm_device *dev' local variables. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107161123.16269-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_crt.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit a55360623fe97572ee784dc08fc10400c6f6e353 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 18:11:20 2024 +0200 drm/i915/crt: s/pipe_config/crtc_state/ Call the crtc state 'crtc_state' rather than 'pipe_config', as is the modern style. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107161123.16269-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_crt.c | 62 ++++++++++++++++---------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit c458e4db6a23a3a7fbfa8c8e5a4a66f79337e8ad Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 18:11:19 2024 +0200 drm/i915/crt: Extract intel_crt_regs.h Move the analog port register definitions into their own file. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107161123.16269-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_crt.c | 1 + drivers/gpu/drm/i915/display/intel_crt_regs.h | 48 ++++++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_pch_display.c | 1 + drivers/gpu/drm/i915/gvt/display.c | 1 + drivers/gpu/drm/i915/gvt/handlers.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 38 ------------------- drivers/gpu/drm/i915/intel_gvt_mmio_table.c | 1 + 7 files changed, 53 insertions(+), 38 deletions(-) commit f8d3e1aedb97ed1e5fa0235b1fed505c002ab872 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 18:11:18 2024 +0200 drm/i915/crt: Clean up ADPA_HOTPLUG_BITS definitions ADPA_HOTPLUG_BITS is defined in terms of the individual register bits and is defined in intel_crt.c, whereas the counterpart mask (ADPA_CRT_HOTPLUG_MASK) is just defined as a raw hex constant and lives in i915_reg.h. Just define both the same way (with unified name to boot) and move both to intel_crt.c since they are more an implementation detail rather than anything to do with the actual register definitions. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107161123.16269-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_crt.c | 16 ++++++++++++---- drivers/gpu/drm/i915/i915_reg.h | 1 - 2 files changed, 12 insertions(+), 5 deletions(-) commit 4711e5946dccc5ee69d9e9bcf4f89fbe95084424 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 18:11:17 2024 +0200 drm/i915/crt: Use REG_BIT() & co. Follow the modern style and use REG_BIT() & co. for the analog port register definitions. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107161123.16269-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_crt.c | 4 +- drivers/gpu/drm/i915/i915_reg.h | 69 +++++++++++++++----------------- 2 files changed, 35 insertions(+), 38 deletions(-) commit 0e94cd606f7400a26d5994de05ff967c76e3ac1d Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 18:11:16 2024 +0200 drm/i915/crt: Drop the unused ADPA_DPMS bit definitions The ADPA_DPMS bit definitions are just an alias for the sync disable bits, and unused one at that. Drop the pointless definitions. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107161123.16269-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/i915_reg.h | 5 ----- 1 file changed, 5 deletions(-) commit 585abd0002bc1f9b79e3fc030254402a16e8b922 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 18:11:15 2024 +0200 drm/i915/crt: Split long line Split an overly long line in the CRT code. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107161123.16269-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_crt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dc3806d9eb66d0105f8d55d462d4ef681d9eac59 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 18:11:14 2024 +0200 drm/i915: Grab intel_display from the encoder to avoid potential oopsies Grab the intel_display from 'encoder' rather than 'state' in the encoder hooks to avoid the massive footgun that is intel_sanitize_encoder(), which passes NULL as the 'state' argument to encoder .disable() and .post_disable(). TODO: figure out how to actually fix intel_sanitize_encoder()... Fixes: 40eb34c3f491 ("drm/i915/crt: convert to struct intel_display") Fixes: ab0b0eb5c85c ("drm/i915/tv: convert to struct intel_display") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107161123.16269-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_crt.c | 10 +++++----- drivers/gpu/drm/i915/display/intel_tv.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit d84927a4ad9244c974061b6299c5169399813ddb Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Sun Oct 6 00:20:17 2024 +0100 drm/bridge: cdns-mhdp8546: Remove unused functions cdns_mhdp_hdcp_set_lc() and cdns_mhdp_hdcp_set_public_key_param() were added by commit 6a3608eae6d3 ("drm: bridge: cdns-mhdp8546: Enable HDCP") but never used. Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Robert Foss <rfoss@kernel.org> Signed-off-by: Robert Foss <rfoss@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241005232017.305217-1-linux@treblig.org .../gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c | 28 ---------------------- .../gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.h | 3 --- 2 files changed, 31 deletions(-) commit e987e22e9229d70c2083a91cc61269b2c4924955 Author: Maíra Canal <mcanal@igalia.com> Date: Wed Nov 6 09:16:51 2024 -0300 drm/v3d: Fix performance counter source settings on V3D 7.x When the new register addresses were introduced for V3D 7.x, we added new masks for performance counter sources on V3D 7.x. Nevertheless, we never apply these new masks when setting the sources. Fix the performance counter source settings on V3D 7.x by introducing a new macro, `V3D_SET_FIELD_VER`, which allows fields setting to vary by version. Using this macro, we can provide different values for source mask based on the V3D version, ensuring that sources are correctly configure on V3D 7.x. Fixes: 0ad5bc1ce463 ("drm/v3d: fix up register addresses for V3D 7.x") Signed-off-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106121736.5707-1-mcanal@igalia.com drivers/gpu/drm/v3d/v3d_debugfs.c | 4 ++-- drivers/gpu/drm/v3d/v3d_perfmon.c | 15 ++++++++------- drivers/gpu/drm/v3d/v3d_regs.h | 29 +++++++++++++++++------------ 3 files changed, 27 insertions(+), 21 deletions(-) commit 87d052bfe6ebd7da995297170a23546624d06fa2 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Oct 29 13:32:49 2024 +0200 drm/i915/psr: stop using bitwise OR with booleans in wm_optimization_wa() Bitwise OR for booleans is a bit of an abuse. We can trivially drop the usage. Cc: Jouni Högander <jouni.hogander@intel.com> Cc: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/f7ea5854c9a306f56f4142f8d37d567ee2f768a7.1730201504.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_psr.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 16806984572a2f82a51e46a92ceeabefe6c06943 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Oct 29 13:32:48 2024 +0200 drm/i915/psr: add LATENCY_REPORTING_REMOVED() register bit helper Drop the wa_16013835468_bit_get() function in favour of the register macro. It doesn't have to be so complicated, and we don't have to use the workaround name in everything that's related to it. Cc: Jouni Högander <jouni.hogander@intel.com> Cc: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/22934fee1ea37c777c35e4b520d5f11b6cd953d0.1730201504.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_psr.c | 24 ++++-------------------- drivers/gpu/drm/i915/i915_reg.h | 13 +++++++++---- 2 files changed, 13 insertions(+), 24 deletions(-) commit b08d1274e3fe70eb3e9b13e8af835032bf792f7e Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 6 18:23:25 2024 +0200 drm/i915/dp: demote source OUI read/write failure logging to debug Commit 1f12d63a14d7 ("drm/i915/dp: Write the source OUI for non-eDP sinks as well") started writing source OUI for non-eDP sinks as well, increasing the possibilities of hitting read/write failures either due to the sink behaviour or hotplug or whatever. Even before that, commit 3fb0501f0c07 ("drm/i915/display/dp: Reduce log level for SOURCE OUI write failures") already reduced write failures to info level when source OUI was just for eDP. Further reduce the log level to just debug. Switch to struct intel_display while at it. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3372 Cc: Clint Taylor <clinton.a.taylor@intel.com> Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106162325.4065078-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 798515297c19d2b5b006049a3e75f57322ffe9d9 Author: Maud Spierings <maud_spierings@hotmail.com> Date: Sun Nov 10 18:25:57 2024 +0100 arm64: dts: qcom: x1e80100-vivobook-s15: Enable the gpu Enable the gpu on the snapdragon powered asus vivobook s15 Signed-off-by: Maud Spierings <maud_spierings@hotmail.com> Link: https://lore.kernel.org/r/20241110-qcom-asus-gpu-v2-1-5f774b17ced8@hotmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4f537776340dab2b680a4d8554567f6884240d0b Author: Piotr Zalewski <pZ010001011111@proton.me> Date: Fri Nov 1 19:01:17 2024 +0000 rockchip/drm: vop2: add support for gamma LUT Add support for gamma LUT in VOP2 driver. The implementation was inspired by one found in VOP1 driver. Blue and red channels in gamma LUT register write were swapped with respect to how gamma LUT values are written in VOP1. Gamma LUT port selection was added before the write of new gamma LUT table. If the current SoC is rk356x, check if no other CRTC has gamma LUT enabled in atomic_check (only one video port can use gamma LUT at a time) and disable gamma LUT before the LUT table write. If the current SoC isn't rk356x, "seamless" gamma lut update is performed similarly to how it was done in the case of RK3399 in VOP1[1]. In seamless update gamma LUT disable before the write isn't necessary, check if no other CRTC has gamma LUT enabled is also not necessary, different register is being used to select gamma LUT port[2] and after setting DSP_LUT_EN bit, GAMMA_UPDATE_EN bit is set[3]. Gamma size is set and drm color management is enabled for each video port's CRTC except ones which have no associated device. Patch was tested on RK3566 (Pinetab2). When using userspace tools which set eg. constant color temperature no issues were noticed. When using userspace tools which adjust eg. color temperature the slight screen flicker is visible probably because of gamma LUT disable needed in the case of RK356x before gamma LUT write. Compare behaviour of eg.: ``` gammastep -O 3000 ``` To eg.: ``` gammastep -l 53:23 -t 6000:3000 ``` In latter case color temperature is slowly adjusted at the beginning which causes screen to slighly flicker. Then it adjusts every few seconds which also causes slight screen flicker. [1] https://lists.infradead.org/pipermail/linux-rockchip/2021-October/028132.html [2] https://lore.kernel.org/linux-rockchip/48249708-8c05-40d2-a5d8-23de960c5a77@rock-chips.com/ [3] https://github.com/radxa/kernel/blob/linux-6.1-stan-rkr1/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c#L3437 Helped-by: Daniel Stone <daniel@fooishbar.org> Helped-by: Dragan Simic <dsimic@manjaro.org> Helped-by: Diederik de Haas <didi.debian@cknow.org> Helped-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Piotr Zalewski <pZ010001011111@proton.me> Reviewed-by: Andy Yan <andyshrk@163.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241101185545.559090-3-pZ010001011111@proton.me drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 186 +++++++++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop2.h | 5 + 2 files changed, 191 insertions(+) commit 712ec5de382d009396ced509e75b392d28871aa4 Author: Andy Yan <andy.yan@rock-chips.com> Date: Mon Oct 28 15:41:34 2024 +0800 drm/rockchip: vop2: Don't spam logs in atomic update Demote the error message to drm_dbg_kms to only print the message if the respective debug messages are enabled. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241028074140.382199-1-andyshrk@163.com drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 666e1960464140cc4bc9203c203097e70b54c95a Author: Thomas Zimmermann <tzimmermann@suse.de> Date: Tue Nov 5 14:38:16 2024 +0100 drm/rockchip: cdn-dp: Use drm_connector_helper_hpd_irq_event() The code for detecting and updating the connector status in cdn_dp_pd_event_work() has a number of problems. - It does not aquire the locks to call the detect helper and update the connector status. These are struct drm_mode_config.connection_mutex and struct drm_mode_config.mutex. - It does not use drm_helper_probe_detect(), which helps with the details of locking and detection. - It uses the connector's status field to determine a change to the connector status. The epoch_counter field is the correct one. The field signals a change even if the connector status' value did not change. Replace the code with a call to drm_connector_helper_hpd_irq_event(), which fixes all these problems. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Fixes: 81632df69772 ("drm/rockchip: cdn-dp: do not use drm_helper_hpd_irq_event") Cc: Chris Zhong <zyw@rock-chips.com> Cc: Guenter Roeck <groeck@chromium.org> Cc: Sandy Huang <hjc@rock-chips.com> Cc: "Heiko Stübner" <heiko@sntech.de> Cc: Andy Yan <andy.yan@rock-chips.com> Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: <stable@vger.kernel.org> # v4.11+ Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241105133848.480407-1-tzimmermann@suse.de drivers/gpu/drm/rockchip/cdn-dp-core.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit f7278da76da2589af13bc8a487d0e8f8abdecc99 Author: Tomasz Lis <tomasz.lis@intel.com> Date: Thu Nov 7 16:13:57 2024 +0100 drm/xe/guc: Do not assert CTB state while sending MMIO During VF post-migration recovery, MMIO communication channel to GuC is used, despite CTB channel being enabled. This behavior is rooted in the save-restore architecture specification. Therefore, a VF driver cannot assert that CTB is disabled while sending MMIO messages to GuC. Such assertion needs to be PF only, or be removed. This patch simply removes the assertion. Signed-off-by: Tomasz Lis <tomasz.lis@intel.com> Suggested-by: Michał Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107151357.1623733-2-tomasz.lis@intel.com drivers/gpu/drm/xe/xe_guc.c | 1 - 1 file changed, 1 deletion(-) commit fb3cb67e68767463bd5bf31324b553fb49d9b6e3 Author: Michal Wajdeczko <michal.wajdeczko@intel.com> Date: Thu Nov 7 20:47:41 2024 +0100 drm/xe/guc: Prefer GT oriented logs in submit code For better diagnostics, use xe_gt_err() instead of drm_err(). Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107194741.2167-3-michal.wajdeczko@intel.com drivers/gpu/drm/xe/xe_guc_submit.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 7abccdb4a4d774bf43f2c603cd9c1a27ea359c61 Author: Michal Wajdeczko <michal.wajdeczko@intel.com> Date: Thu Nov 7 20:47:40 2024 +0100 drm/xe/guc: Prefer GT oriented asserts in submit code For better diagnostics, use xe_gt_assert() instead of xe_assert(). Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107194741.2167-2-michal.wajdeczko@intel.com drivers/gpu/drm/xe/xe_guc_submit.c | 52 +++++++++++++++----------------------- 1 file changed, 21 insertions(+), 31 deletions(-) commit f2a6b8e396666d97ada8e8759dfb6a69d8df6380 Author: Matthew Auld <matthew.auld@intel.com> Date: Fri Nov 1 17:01:57 2024 +0000 drm/xe: improve hibernation on igpu The GGTT looks to be stored inside stolen memory on igpu which is not treated as normal RAM. The core kernel skips this memory range when creating the hibernation image, therefore when coming back from hibernation the GGTT programming is lost. This seems to cause issues with broken resume where GuC FW fails to load: [drm] *ERROR* GT0: load failed: status = 0x400000A0, time = 10ms, freq = 1250MHz (req 1300MHz), done = -1 [drm] *ERROR* GT0: load failed: status: Reset = 0, BootROM = 0x50, UKernel = 0x00, MIA = 0x00, Auth = 0x01 [drm] *ERROR* GT0: firmware signature verification failed [drm] *ERROR* CRITICAL: Xe has declared device 0000:00:02.0 as wedged. Current GGTT users are kernel internal and tracked as pinned, so it should be possible to hook into the existing save/restore logic that we use for dgpu, where the actual evict is skipped but on restore we importantly restore the GGTT programming. This has been confirmed to fix hibernation on at least ADL and MTL, though likely all igpu platforms are affected. This also means we have a hole in our testing, where the existing s4 tests only really test the driver hooks, and don't go as far as actually rebooting and restoring from the hibernation image and in turn powering down RAM (and therefore losing the contents of stolen). v2 (Brost) - Remove extra newline and drop unnecessary parentheses. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3275 Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: <stable@vger.kernel.org> # v6.8+ Reviewed-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241101170156.213490-2-matthew.auld@intel.com drivers/gpu/drm/xe/xe_bo.c | 37 ++++++++++++++++--------------------- drivers/gpu/drm/xe/xe_bo_evict.c | 6 ------ 2 files changed, 16 insertions(+), 27 deletions(-) commit faf3cc68b9e43789f2c5debf0117a7d01e4a02bb Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Wed Nov 6 22:06:06 2024 -0800 drm/xe: Add gt_id to xe_sched_job traces In order to uniquely identify the jobs, xe_sched_job tracepoints need to have the tuple (gt_id, guc_id). Find a "hole" where the next entry is unaligned and add one more field. Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107060606.3130885-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_trace.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 34796ce4b2a11f29aa764ad67fe0fc028c86756a Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 8 09:57:20 2024 -0300 drm/i915/xe3lpd: Use DMC wakelock by default Although Bspec doesn't explicitly mentions that, as of Xe3_LPD, using DMC wakelock is the officially recommended way of accessing registers that would be off during DC5/DC6 and the legacy method (where the DMC intercepts MMIO to wake up the hardware) is to be avoided. As such, update the driver to use the DMC wakelock by default starting with Xe3_LPD. Since the feature is somewhat new to the driver, also allow disabling it via a module parameter for debugging purposes. For that, make the existing parameter allow values -1 (per-chip default), 0 (disabled) and 1 (enabled), similarly to what is done for other parameters. v2: - Describe -1 in the same area where 0 and 1 are described. (Luca) Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-16-gustavo.sousa@intel.com drivers/gpu/drm/i915/display/intel_display_params.c | 6 +++--- drivers/gpu/drm/i915/display/intel_display_params.h | 2 +- drivers/gpu/drm/i915/display/intel_dmc_wl.c | 6 +++++- 3 files changed, 9 insertions(+), 5 deletions(-) commit c01e78a96e125b08bb8103d2737546dd4eb2ce00 Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 8 09:57:19 2024 -0300 drm/i915/dmc_wl: Sanitize enable_dmc_wl according to hardware support Instead of checking for HAS_DMC_WAKELOCK() multiple times, let's use it to sanitize the enable_dmc_wl parameter and use that variable when necessary. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-15-gustavo.sousa@intel.com drivers/gpu/drm/i915/display/intel_dmc_wl.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit c92ae71c1d06580395a230d78049ab59259e9ff1 Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 8 09:57:18 2024 -0300 drm/i915/dmc_wl: Add and use HAS_DMC_WAKELOCK() A HAS_DMC_WAKELOCK() macro gives more semantic than openly checking the display version. Define it and use it where appropriate. v2: - Make this patch contain only the non-functional refactor. Functional changes related to including HAS_DMC() in the macro are done in upcoming changes. (Jani) Cc: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-14-gustavo.sousa@intel.com drivers/gpu/drm/i915/display/intel_display_device.h | 1 + drivers/gpu/drm/i915/display/intel_dmc_wl.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 5a83381fc4715e885e4951e76b4c094bda47d16a Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 8 09:57:17 2024 -0300 drm/i915/dmc_wl: Couple enable/disable with dynamic DC states Enabling and disabling the DMC wakelock should be done as part of enabling and disabling of dynamic DC states, respectively. We should not enable or disable DMC wakelock independently of DC states, otherwise we would risk ending up with an inconsistent state where dynamic DC states are enabled and the DMC wakelock is disabled, going against current recommendations and making MMIO transactions potentially slower. In future display IPs that could have a worse outcome if DMC trap implementation is completely removed. So, let's make things safer by tying stuff together, removing the independent calls, and also put warnings in place to detect inconsistent calls. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-13-gustavo.sousa@intel.com drivers/gpu/drm/i915/display/intel_display_power_well.c | 5 ++++- drivers/gpu/drm/i915/display/intel_dmc.c | 4 ---- drivers/gpu/drm/i915/display/intel_dmc_wl.c | 6 ++++-- 3 files changed, 8 insertions(+), 7 deletions(-) commit 9fe9cd95feacce9ae1c30c88a5513f556623d24d Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 8 09:57:16 2024 -0300 drm/i915/dmc_wl: Deal with existing references when disabling It is possible that there are active wakelock references at the time we are disabling the DMC wakelock mechanism. We need to deal with that in two ways: (A) Implement the missing step from Bspec: The Bspec instructs us to clear any existing wakelock request bit after disabling the mechanism. That gives a clue that it is okay to disable while there are locks held and we do not need to wait for them. However, since the spec is not explicit about it, we need still to get confirmation with the hardware team. Let's thus implement the spec and add a TODO note. (B) Ensure a consistent driver state: The enable/disable logic would be problematic if the following sequence of events would happen: 1. Function A calls intel_dmc_wl_get(); 2. Some function calls intel_dmc_wl_disable(); 3. Some function calls intel_dmc_wl_enable(); 4. Function A is done and calls intel_dmc_wl_put(). At (2), the refcount becomes zero and then (4) causes an invalid decrement to the refcount. That would cause some issues: - At the time between (3) and (4), function A would think that the hardware lock is held but it could not be really held until intel_dmc_wl_get() is called by something else. - The call made to (4) could cause the refcount to become zero and consequently the hardware lock to be released while there could be innocent paths trusting they still have the lock. To fix that, we need to keep the refcount correctly in sync with intel_dmc_wl_{get,put}() calls and retake the hardware lock when enabling the DMC wakelock with a non-zero refcount. One missing piece left to be handled here is the following scenario: 1. Function A calls intel_dmc_wl_get(); 2. Some function calls intel_dmc_wl_disable(); 3. Some function calls intel_dmc_wl_enable(); 4. Concurrently with (3), function A performs the MMIO in between setting DMC_WAKELOCK_CFG_ENABLE and asserting the lock with __intel_dmc_wl_take(). I'm mostly sure this would cause issues future display IPs if DMC trap implementation was completely removed. We need to check with the hardware team whether it would be safe to assert the hardware lock before setting DMC_WAKELOCK_CFG_ENABLE to avoid this scenario. If not, then we would have to deal with that via software synchronization. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-12-gustavo.sousa@intel.com drivers/gpu/drm/i915/display/intel_dmc_wl.c | 97 ++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 30 deletions(-) commit 02e2224796a3b609d47bc3a1b78cc833289d7d1f Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 8 09:57:15 2024 -0300 drm/i915/dmc_wl: Allow simpler syntax for single reg in range tables Allow simpler syntax for defining entries for single registers in range tables. That makes them easier to type as well as to read, allowing one to quickly tell whether a range actually refers to a single register or a "true range". Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-11-gustavo.sousa@intel.com drivers/gpu/drm/i915/display/intel_dmc_wl.c | 118 ++++++++++++++-------------- 1 file changed, 60 insertions(+), 58 deletions(-) commit 0c48ff896a8a72e2182b48a051c1e5bde38e15e2 Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 8 09:57:14 2024 -0300 drm/i915/dmc_wl: Track registers touched by the DMC There are extra registers that require the DMC wakelock when specific dynamic DC states are in place. Those are registers that are touched by the DMC and require DC exit for proper access. Add the range tables for them and use the correct one depending on the enabled DC state. v2: - Do not look into power domains guts (i.e. display->power.domains.dc_state). (Jani) - Come up with better names for variables containing register ranges. (Luca) - Keep a copy of dc_state in struct intel_dmc_wl. - Update commit message for a clearer explanation for the need of these new tables. Bspec: 71583 Cc: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-10-gustavo.sousa@intel.com .../drm/i915/display/intel_display_power_well.c | 4 +- drivers/gpu/drm/i915/display/intel_dmc_wl.c | 126 +++++++++++++++++++-- drivers/gpu/drm/i915/display/intel_dmc_wl.h | 11 +- 3 files changed, 128 insertions(+), 13 deletions(-) commit 089156e33d747829f508b1fda64f292b19917e17 Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 8 09:57:13 2024 -0300 drm/i915/dmc_wl: Rename lnl_wl_range to powered_off_ranges In an upcoming change, we will add extra range tables for registers that are touched by the DMC during DC states. The range table that we are currently using is meant for registers that are powered off during DC states. As such, let's rename the table to powered_off_ranges and also add a comment regarding its purpose in the function that uses it. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-9-gustavo.sousa@intel.com drivers/gpu/drm/i915/display/intel_dmc_wl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 83329df1be0c883801251d9aeaca0df317e14a14 Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 8 09:57:12 2024 -0300 drm/i915/dmc_wl: Extract intel_dmc_wl_reg_in_range() We will be using more than one range table in intel_dmc_wl_check_range(). As such, move the logic to a new function and name it intel_dmc_wl_reg_in_range(). Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-8-gustavo.sousa@intel.com drivers/gpu/drm/i915/display/intel_dmc_wl.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 1e15bc5bd7665558f4296b4cc50a561460b9f236 Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 8 09:57:11 2024 -0300 drm/i915/dmc_wl: Use sentinel item for range tables We are currently using ARRAY_SIZE() to iterate address ranges in intel_dmc_wl_check_range(). In upcoming changes, we will be using more than a single table and will extract the range checking logic into a dedicated function that takes a range table as argument. As we will not able to use ARRAY_SIZE() then, let's make range tables contain a sentinel item at the end and use that instead of having to pass the size as parameter in this future function. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-7-gustavo.sousa@intel.com drivers/gpu/drm/i915/display/intel_dmc_wl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7a522aa6cfcba6d0e73d87ce607c7436ff7aacb0 Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 8 09:57:10 2024 -0300 drm/i915/dmc_wl: Get wakelock when disabling dynamic DC states Bspec says that disabling dynamic DC states require taking the DMC wakelock to cause an DC exit before writing to DC_STATE_EN. Implement that. In fact, testing on PTL revealed we end up failing to exit DC5/6 without this step. Bspec: 71583 Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-6-gustavo.sousa@intel.com drivers/gpu/drm/i915/display/intel_display_power_well.c | 10 +++++++--- drivers/gpu/drm/i915/display/intel_dmc_wl.c | 14 ++++++++++++-- drivers/gpu/drm/i915/display/intel_dmc_wl.h | 2 ++ 3 files changed, 21 insertions(+), 5 deletions(-) commit f7b12bf2968ca6a27d879e1781b28eb1036dc5e6 Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 8 09:57:09 2024 -0300 drm/i915/dmc_wl: Check for non-zero refcount in release work When the DMC wakelock refcount reaches zero, we know that there are no users and that we can do the actual release operation on the hardware, which is queued with a delayed work. The idea of the delayed work is to avoid performing the release if a new lock user appears (i.e. refcount gets incremented) in a very short period of time. Based on the above, the release work should bail out if refcount is non-zero (meaning new lock users appeared in the meantime), but our current code actually does the opposite: it bails when refcount is zero. That means that the wakelock is not released when it should be; and that, when the work is not canceled in time, it ends up being releasing when it should not. Fix that by inverting the condition. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-5-gustavo.sousa@intel.com drivers/gpu/drm/i915/display/intel_dmc_wl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b2ba4632b9433cff218109628c86b0d23ebdb5ca Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 8 09:57:08 2024 -0300 drm/i915/dmc_wl: Use non-sleeping variant of MMIO wait Some display MMIO transactions for offsets in the range that requires the DMC wakelock happen in atomic context (this has been confirmed during tests on PTL). That means that we need to use a non-sleeping variant of MMIO waiting function. Implement __intel_de_wait_for_register_atomic_nowl() and use it when waiting for acknowledgment of acquire/release. v2: - No __intel_de_wait_for_register_atomic_nowl() wrapper to convert i915 to display. (Jani) - Add a quick explanation why DMC_WAKELOCK_CTL_TIMEOUT_US is defined in microseconds. (Luca) Cc: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-4-gustavo.sousa@intel.com drivers/gpu/drm/i915/display/intel_de.h | 10 ++++++++++ drivers/gpu/drm/i915/display/intel_dmc_wl.c | 24 ++++++++++++++++-------- 2 files changed, 26 insertions(+), 8 deletions(-) commit 359d2cc1f394ed62ed01540a486e744d47674c39 Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 8 09:57:07 2024 -0300 drm/xe: Mimic i915 behavior for non-sleeping MMIO wait In upcoming display changes, we will modify the DMC wakelock MMIO waiting code to choose a non-sleeping variant implementation, because the wakelock is also taking in atomic context. While xe provides an explicit parameter (namely "atomic") to prevent xe_mmio_wait32() from sleeping, i915 does not and implements that behavior when slow_timeout_ms is zero. So, for now, let's mimic what i915 does to allow for display to use non-sleeping MMIO wait. In the future, we should come up with a better and explicit interface for this behavior in i915, at least while display code is not an independent entity with proper interfaces between xe and i915. v2: - Make the tone in comment the comment added in __intel_wait_for_register() more explanatory than a FIXME-like text. (Luca) Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-3-gustavo.sousa@intel.com drivers/gpu/drm/xe/compat-i915-headers/intel_uncore.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 75f5405e7f68a82531e106acbc4ae475eef3979a Author: Gustavo Sousa <gustavo.sousa@intel.com> Date: Fri Nov 8 09:57:06 2024 -0300 drm/i915/dmc_wl: Use i915_mmio_reg_offset() instead of reg.reg The macro i915_mmio_reg_offset() is the proper interface to get a register's offset. Use that instead of looking directly at reg.reg. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108130218.24125-2-gustavo.sousa@intel.com drivers/gpu/drm/i915/display/intel_dmc_wl.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit f9b982fbb47be2e6aa824032fe07f5e4dece0019 Author: Michal Wajdeczko <michal.wajdeczko@intel.com> Date: Wed Nov 6 16:13:01 2024 +0100 drm/xe/pf: Adjust scheduling priority based on policy change Local values of scheduling priorities need to be adjusted when changing the schedule_if_idle policy as those are related. Disabling schedule_if_idle policy forces the low priority, and enabling schedule_if_idle policy forces the normal priority. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106151301.2079-6-michal.wajdeczko@intel.com drivers/gpu/drm/xe/xe_gt_sriov_pf_policy.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 9d6aabe126b4a27e7b4e86ca1c1c568a7707fd2c Author: Michal Wajdeczko <michal.wajdeczko@intel.com> Date: Wed Nov 6 16:13:00 2024 +0100 drm/xe/pf: Allow to control scheduling priority using debugfs Add 'sched_priority' attribute that will represents the scheduling prority of the VF or PF. Values {0,1,2} correspond to priorities {LOW,NORMAL,HIGH} respectively. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106151301.2079-5-michal.wajdeczko@intel.com drivers/gpu/drm/xe/xe_gt_sriov_pf_debugfs.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7dbed0fdb18ca10de6ef2e80b68fa764b250a1c1 Author: Michal Wajdeczko <michal.wajdeczko@intel.com> Date: Wed Nov 6 16:12:59 2024 +0100 drm/xe/pf: Add functions to configure VF scheduling priority Add functions to configure PF or VF scheduling priority using the VF_CFG_SCHED_PRIORITY KLV. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106151301.2079-4-michal.wajdeczko@intel.com drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 76 ++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h | 3 + drivers/gpu/drm/xe/xe_gt_sriov_pf_config_types.h | 2 + 3 files changed, 81 insertions(+) commit 5a814e3ade40cf5c26dd496ea39c033929889604 Author: Michal Wajdeczko <michal.wajdeczko@intel.com> Date: Wed Nov 6 16:12:58 2024 +0100 drm/xe/guc: Add VF_CFG_SCHED_PRIORITY to KLV helper Recognize new VF_CFG_SCHED_PRIORITY key in to_string() helper. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106151301.2079-3-michal.wajdeczko@intel.com drivers/gpu/drm/xe/xe_guc_klv_helpers.c | 2 ++ 1 file changed, 2 insertions(+) commit 5bd3521d257073818cec6c41359b886e1ba648d2 Author: Michal Wajdeczko <michal.wajdeczko@intel.com> Date: Wed Nov 6 16:12:57 2024 +0100 drm/xe/guc: Add VF_CFG_SCHED_PRIORITY_KEY KLV definition This KLV allows to set the scheduling priority for each VF, also for the PF. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106151301.2079-2-michal.wajdeczko@intel.com drivers/gpu/drm/xe/abi/guc_klvs_abi.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit f2afd9035ebdaa54ec96db217c0aeca4e58aab9a Author: Jouni Högander <jouni.hogander@intel.com> Date: Thu Oct 31 10:10:25 2024 +0200 drm/i915/psr: Disable Panel Replay as well if VRR is enabled Having Panel Replay enabled together with VRR is causing following errors: xe 0000:00:02.0: [drm] *ERROR* Timed out waiting PSR idle state xe 0000:00:02.0: [drm] *ERROR* Fault errors on pipe A: 0x00000080 xe 0000:00:02.0: [drm] *ERROR* CPU pipe A FIFO underrun xe 0000:00:02.0: [drm] *ERROR* Fault errors on pipe A: 0x00040080 xe 0000:00:02.0: [drm] *ERROR* Fault errors on pipe A: 0x00040080 Let's disable Panel Replay as well if VRR is enabled. Signed-off-by: Jouni Högander <jouni.hogander@intel.com> Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241031081025.3215966-1-jouni.hogander@intel.com drivers/gpu/drm/i915/display/intel_psr.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 9e7aacd8402b88394e6a83cb242901fde77a1773 Author: Matthew Brost <matthew.brost@intel.com> Date: Wed Nov 6 14:49:44 2024 -0800 drm/xe: Ensure all locks released in exec IOCTL In couple of places the wrong error handling goto was used to release locks. Fix these to ensure all locks dropped on exec IOCTL errors. Cc: Francois Dugast <francois.dugast@intel.com> Fixes: d16ef1a18e39 ("drm/xe/exec: Switch hw engine group execution mode upon job submission") Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Francois Dugast <francois.dugast@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106224944.30130-1-matthew.brost@intel.com drivers/gpu/drm/xe/xe_exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5d0396114e7119a20034e252a58d30b0b41ab965 Author: Suraj Kandpal <suraj.kandpal@intel.com> Date: Thu Nov 7 07:58:08 2024 +0530 drm/i915/hdcp: Handle HDCP Line Rekeying for HDCP 1.4 TRANS_DDI_FUNC_CTL asks us to disable hdcp line rekeying when not in hdcp 2.2 and we are not using an hdmi transcoder and it need to be enabled when we are using an HDMI transcoder to enable HDCP 1.4. We use intel_de_rmw cycles to update TRANS_DDI_FUNC_CTL register so we cannot depend on the value being 0 by default everytime which calls for seprate handling of HDCP 1.4 case. --v2 -Use the exising function and modify it based on a bool rather than have a different function [Matt] --v3 -No need for kzalloc [Jani] --v4 -i915_reg_t should not be pointer [Jani] -use rekey_bit to ensure when writing to reg everything is initialized Bspec: 69964, 50493, 50054 Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241107022807.869744-1-suraj.kandpal@intel.com drivers/gpu/drm/i915/display/intel_hdcp.c | 37 ++++++++++++++++++------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit 44e21ea6dcd5bc9cf7a1c4e3281779987c070373 Author: Michal Wajdeczko <michal.wajdeczko@intel.com> Date: Tue Nov 5 21:45:57 2024 +0100 drm/xe/guc: Don't treat GuC generic CAT error as protocol error GuC uses GUC_ID_UNKNOWN if it can not map the CAT fault to any context. We shouldn't treat that as G2H protocol error that would justify a GT reset, as it may happen due to some VF activity. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241105204557.1991-1-michal.wajdeczko@intel.com drivers/gpu/drm/xe/xe_guc_fwif.h | 1 + drivers/gpu/drm/xe/xe_guc_submit.c | 9 +++++++++ 2 files changed, 10 insertions(+) commit 6b5f15445c8d07945e6f209b404fb89968374e88 Author: Michal Wajdeczko <michal.wajdeczko@intel.com> Date: Tue Nov 5 18:30:31 2024 +0100 drm/xe/guc: Don't read data from G2H prior to length check While highly unlikely, incoming G2H message might be too short so we shouldn't read any data from it prior to checking a length. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241105173032.1947-4-michal.wajdeczko@intel.com drivers/gpu/drm/xe/xe_guc_submit.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 94b585401b06e9b2d15ada54b64395c46d9f55c4 Author: Michal Wajdeczko <michal.wajdeczko@intel.com> Date: Tue Nov 5 18:30:30 2024 +0100 drm/xe/guc: Drop redundant logs about invalid G2H length We are now logging details of the failed G2H message (including its length) at the GuC CT component. Drop now redundant log from the GuC submit code. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241105173032.1947-3-michal.wajdeczko@intel.com drivers/gpu/drm/xe/xe_guc_submit.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) commit c4ed1bb128473cf250df89ad278b37922a810dd3 Author: Michal Wajdeczko <michal.wajdeczko@intel.com> Date: Tue Nov 5 18:30:29 2024 +0100 drm/xe/guc: Log content of the failed G2H message We are already logging an error once we failed to process a G2H message, but then it's quite hard to extract the content of the broken G2H message from the captured snapshot. Extend our error log with the raw hexdump of the G2H message. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241105173032.1947-2-michal.wajdeczko@intel.com drivers/gpu/drm/xe/xe_guc_ct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7c100577471366460ce18ccb658b05f7168df738 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Tue Oct 29 23:52:17 2024 +0200 drm/i915/cdclk: Unify cdclk max() parameter order In some places we do min_cdclk = max(min_cdclk, other_min_cdclk) and in other places we have the arguments swapped as min_cdclk = max(other_min_cdclk, min_cdclk) Unify everyone to use the first order of arguments, because it looks cleaner, especially within intel_crtc_compute_min_cdclk() which is doing a lot of these back-to-back. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029215217.3697-12-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_audio.c | 8 ++++---- drivers/gpu/drm/i915/display/intel_bw.c | 2 +- drivers/gpu/drm/i915/display/intel_cdclk.c | 18 +++++++++--------- 3 files changed, 14 insertions(+), 14 deletions(-) commit 4211c03d16689a5406119a1f6d0fa9e247612993 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Tue Oct 29 23:52:16 2024 +0200 drm/i915/cdclk: Relocate intel_vdsc_min_cdclk() Move intel_vdsc_min_cdclk() into intel_vdsc.c from intel_cdclk.c so that details about DSC are better contained. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029215217.3697-11-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_cdclk.c | 46 ------------------------------ drivers/gpu/drm/i915/display/intel_vdsc.c | 46 ++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_vdsc.h | 1 + 3 files changed, 47 insertions(+), 46 deletions(-) commit c948b5238f75ce0663b03ff7ce95228fee8488b6 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Tue Oct 29 23:52:15 2024 +0200 drm/i915/cdclk: Drop pointles max_t() usage in intel_vdsc_min_cdclk() min_cdclk==0 when intel_vdsc_min_cdclk() calls max_t() on it. Drop the redundant max_t(). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029215217.3697-10-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_cdclk.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c4ebfd8f30538784ba597791f59a3e18eaa00948 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Tue Oct 29 23:52:14 2024 +0200 drm/i915/cdclk: Suck the compression_enable check into intel_vdsc_min_cdclk() Declutter intel_crtc_compute_min_cdclk() by moving the crtc_state->dsc.compression_enable check into intel_vdsc_min_cdclk(). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029215217.3697-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_cdclk.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 252cea7f0fb41057c899bdfdd78f1b04a1ffe75d Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Tue Oct 29 23:52:13 2024 +0200 drm/i915/cdclk: Factor out INTEL_OUTPUT_DSI check in vlv_dsi_min_cdclk() All the if statements in vlv_dsi_min_cdclk() check for INTEL_OUTPUT_DSI. Make life simpler by checking that just once at the start. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029215217.3697-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/vlv_dsi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 95601c60b1bef0cae3567b6a8816aacdd72bc340 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Tue Oct 29 23:52:12 2024 +0200 drm/i915/cdclk: Extract vlv_dsi_min_cdclk() Pull the DSI min cdclk calculation into a helper and hide it inside vlv_dsi.c in order to keep most DSI related details in one place. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029215217.3697-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_cdclk.c | 23 ++--------------------- drivers/gpu/drm/i915/display/vlv_dsi.c | 25 +++++++++++++++++++++++++ drivers/gpu/drm/i915/display/vlv_dsi.h | 6 ++++++ 3 files changed, 33 insertions(+), 21 deletions(-) commit 64b19d63df21c9287fb888911de8c756160ab935 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Tue Oct 29 23:52:11 2024 +0200 drm/i915/cdclk: Factor out has_audio check in intel_audio_min_cdclk() All the if statements in intel_audio_min_cdclk() check for has_audio==true. Check that once ahead of time to make things a bit simpler. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029215217.3697-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_audio.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 47410efe265a95e347af02f0bac0fefb6adffed3 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Tue Oct 29 23:52:10 2024 +0200 drm/i915/cdclk: Extract intel_audio_min_cdclk() Pull the audio min cdclk calculation into a helper and hide it inside intel_audio.c in order to keep most audio related details in one place. The one audio related thing that remains in intel_cdclk.c is commit 451eaa1a614c ("drm/i915: Bump GLK CDCLK frequency when driving multiple pipes") but given that's implemented in terms of the cdclk_state I think it should stay put. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029215217.3697-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_audio.c | 45 ++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_audio.h | 1 + drivers/gpu/drm/i915/display/intel_cdclk.c | 37 +----------------------- 3 files changed, 47 insertions(+), 36 deletions(-) commit 06cb4527ef49d749cb8597017f40c74b34f7e8fd Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Tue Oct 29 23:52:09 2024 +0200 drm/i915/cdclk: Extract hsw_ips_min_cdclk() Pull the whole BDW IPS min CDCLK stuff into the IPS code so that all the details around IPS are contained in once place. Note that while - min_cdclk = DIV_ROUND_UP(min_cdclk * 100, 95); vs. + min_cdclk = max(DIV_ROUND_UP(crtc_state->pixel_rate * 100, 95), min_cdclk) may look different, they are in fact the same because min_cdclk==crtc_state->pixel_rate at this point in intel_crtc_compute_min_cdclk() on BDW. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029215217.3697-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/hsw_ips.c | 16 +++++++++++++++- drivers/gpu/drm/i915/display/hsw_ips.h | 6 +++--- drivers/gpu/drm/i915/display/intel_cdclk.c | 5 +---- 3 files changed, 19 insertions(+), 8 deletions(-) commit 6ad10f0bc6116761642027959fe82891d82b5bbb Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Tue Oct 29 23:52:08 2024 +0200 drm/i915/cdclk: Extract intel_cdclk_guardband() and intel_cdclk_ppc() We are duplicating the CDCLK guardband and "pixels per clock" figures in two places. Pull those out into small helpers that can be used by both places. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029215217.3697-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_cdclk.c | 50 ++++++++++++++++-------------- 1 file changed, 26 insertions(+), 24 deletions(-) commit bca31ef79be698f6280f883a5a3d32b09e4687af Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Tue Oct 29 23:52:07 2024 +0200 drm/i915: Introduce HAS_DOUBLE_WIDE() Make the code a bit more self documenting by adding HAS_DOUBLE_WIDE(). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029215217.3697-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_cdclk.c | 2 +- drivers/gpu/drm/i915/display/intel_display.c | 4 ++-- drivers/gpu/drm/i915/display/intel_display_device.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) commit ef0430f5d3ab5b9e9e31e7534e1ebbd01ea587dc Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 7 00:09:04 2024 +0200 drm/i915/dsi: Stop using pixel_format_from_register_bits() to parse VBT Introduce a proper VBT->enum mipi_dsi_pixel_format converter instead of abusing pixel_format_from_register_bits() (whose job is to parse the pixel format from some pre-ICL DSI hardware register). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241106220904.29523-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 20 ++++++++++++++++++-- drivers/gpu/drm/i915/display/vlv_dsi.c | 3 +-- drivers/gpu/drm/i915/display/vlv_dsi.h | 7 ------- 3 files changed, 19 insertions(+), 11 deletions(-) commit b939a08bc378a7c716ad7a9486b48794b95d22f5 Author: Zhanjun Dong <zhanjun.dong@intel.com> Date: Mon Nov 4 13:41:03 2024 -0800 drm/i915/guc: Flush ct receive tasklet during reset preparation GuC to host communication is interrupt driven, the handling has 3 parts: interrupt context, tasklet and request queue worker. During GuC reset prepare, interrupt is disabled before destroy contexts steps start. The IRQ and worker are flushed to finish any outstanding in-progress message handling. But, the tasklet flush is missing, it might causes 2 race conditions: 1. Tasklet runs after IRQ flushed, add request to queue after worker flush started, causes unexpected G2H message request processing, meanwhile, reset prepare code already get the context destroyed. This will causes error reported about bad context state. (https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11349 and https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12303) 2. Tasklet runs after intel_guc_submission_reset_prepare, ct_try_receive_message start to run, while intel_uc_reset_prepare already finished guc sanitize and set ct->enable to false. This will causes warning on incorrect ct->enable state. (https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12439) Add the missing tasklet flush to flush all 3 parts. Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com> Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com> Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104214103.214702-1-zhanjun.dong@intel.com drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 4 ++++ 1 file changed, 4 insertions(+) commit 507f8e730100822b75290bbf96135f0e789da9cc Author: Sriram R <quic_srirrama@quicinc.com> Date: Fri Nov 1 17:17:05 2024 +0200 wifi: ath12k: Add MLO peer assoc command support Add changes to send MLO peer assoc command with partner link details and primary umac details. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-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: Sriram R <quic_srirrama@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20241101151705.165987-9-kvalo@kernel.org Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath12k/core.h | 7 +++ drivers/net/wireless/ath/ath12k/mac.c | 62 ++++++++++++++++++++++++++ drivers/net/wireless/ath/ath12k/wmi.c | 79 +++++++++++++++++++++++++++++++--- drivers/net/wireless/ath/ath12k/wmi.h | 46 ++++++++++++++++++++ 4 files changed, 188 insertions(+), 6 deletions(-) commit c20dbc8c68b38fe702e9fbc4748aa117194f8963 Author: Sriram R <quic_srirrama@quicinc.com> Date: Fri Nov 1 17:17:04 2024 +0200 wifi: ath12k: add helper to find multi-link station Multi-link stations are identified in driver using the multi-link peer id and they have ATH12K_PEER_ML_ID_VALID bit set in the id. Add a helper to find multi-link station using the multi-link peer id. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-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: Sriram R <quic_srirrama@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20241101151705.165987-8-kvalo@kernel.org Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath12k/peer.c | 17 +++++++++++++++++ drivers/net/wireless/ath/ath12k/peer.h | 4 ++++ 2 files changed, 21 insertions(+) commit 0660e1e2ed5ff493f1e383a32d28db2b7d8490f7 Author: Sriram R <quic_srirrama@quicinc.com> Date: Fri Nov 1 17:17:03 2024 +0200 wifi: ath12k: add multi-link flag in peer create command Driver should indicate to firmware whether a peer is multi-link or not in peer create command using multi-link flag. Add changes to support WMI_TAG_MLO_PEER_CREATE_PARAMS in WMI_PEER_CREATE_CMDID. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-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: Sriram R <quic_srirrama@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20241101151705.165987-7-kvalo@kernel.org Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath12k/mac.c | 5 +++-- drivers/net/wireless/ath/ath12k/wmi.c | 27 +++++++++++++++++++++++---- drivers/net/wireless/ath/ath12k/wmi.h | 6 ++++++ 3 files changed, 32 insertions(+), 6 deletions(-) commit 7fd8b4cbde65bf65d32e1a6615ae8160cf305ef8 Author: Sriram R <quic_srirrama@quicinc.com> Date: Fri Nov 1 17:17:02 2024 +0200 wifi: ath12k: Add helpers for multi link peer creation and deletion Add helper functions for multi link peer addition and deletion. And add address validation to ensure we are not creating link peers (belonging to different clients) with same MLD address. To aid in this validation for faster lookup, add a new list of ML peers to struct ath12k_hw::ml_peers and use the same for parsing for the above address validation use cases. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-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: Sriram R <quic_srirrama@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20241101151705.165987-6-kvalo@kernel.org Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath12k/core.h | 13 +++++ drivers/net/wireless/ath/ath12k/mac.c | 2 + drivers/net/wireless/ath/ath12k/peer.c | 98 ++++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath12k/peer.h | 8 +++ 4 files changed, 121 insertions(+) commit a2189d2b8005cd9f3a440512af087eb9b62c103e Author: Kalle Valo <kvalo@kernel.org> Date: Fri Nov 1 17:17:01 2024 +0200 wifi: ath12k: introduce ath12k_hw_warn() In the following patch we need to use ath12k_warn() but don't easily have access to struct ath12k_base (ab) but do have access to struct ath12k_hw (ah). So add a new warning helper ath12_hw_warn() which takes the latter but the log output is still identical but uses the struct device pointer stored to struct ath12k_hw. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20241101151705.165987-5-kvalo@kernel.org Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath12k/core.h | 2 ++ drivers/net/wireless/ath/ath12k/debug.c | 6 +++--- drivers/net/wireless/ath/ath12k/debug.h | 5 ++++- drivers/net/wireless/ath/ath12k/mac.c | 2 ++ 4 files changed, 11 insertions(+), 4 deletions(-) commit c8a98ed160e54ae629364a1efd5379bed839d633 Author: Sriram R <quic_srirrama@quicinc.com> Date: Fri Nov 1 17:17:00 2024 +0200 wifi: ath12k: Refactor sta state machine Refactor ath12k_mac_op_sta_state(), with generic wrappers which can be used for both multi link stations and non-ML stations. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-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: Sriram R <quic_srirrama@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20241101151705.165987-4-kvalo@kernel.org Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath12k/core.h | 3 + drivers/net/wireless/ath/ath12k/mac.c | 343 +++++++++++++++++++++++---------- 2 files changed, 244 insertions(+), 102 deletions(-) commit 1ea0cdee6fb3a498e7413cb2a28a918464d33d48 Author: Sriram R <quic_srirrama@quicinc.com> Date: Fri Nov 1 17:16:59 2024 +0200 wifi: ath12k: MLO vdev bringup changes Add changes to add the link vdevs dynamically whenever a channel is assigned from mac80211 for a link vdev. During vdev create, update ML address of the vdev to firmware using the new WMI parameter (WMI_TAG_MLO_VDEV_CREATE_PARAMS). During vdev start, notify the firmware that this link vdev is newly added and also indicate all its known partners so that the firmware can take necessary actions to internally update the partners on the new link being added. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-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: Sriram R <quic_srirrama@quicinc.com> Co-developed-by: Rameshkumar Sundaram <quic_ramess@quicinc.com> Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20241101151705.165987-3-kvalo@kernel.org Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath12k/mac.c | 87 +++++++++++++++++++++++++++++++++-- drivers/net/wireless/ath/ath12k/wmi.c | 85 +++++++++++++++++++++++++++++++++- drivers/net/wireless/ath/ath12k/wmi.h | 63 +++++++++++++++++++++++++ 3 files changed, 230 insertions(+), 5 deletions(-) commit 757cc46520091ca103b9a948ddbdfa660a10879d Author: Kalle Valo <kvalo@kernel.org> Date: Fri Nov 1 17:16:58 2024 +0200 wifi: ath12k: ath12k_mac_vdev_create(): use goto for error handling In commit 477cabfdb776 ("wifi: ath12k: modify link arvif creation and removal for MLO") I had accidentally left one personal TODO comment about using goto instead of ret. Switch to use goto to be consistent with the error handling in the function. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20241101151705.165987-2-kvalo@kernel.org Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath12k/mac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 38db1ae301c37b3c9599f4f67cd495b6f3a9010e Author: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Date: Mon Oct 28 07:08:40 2024 -0700 wifi: ath12k: mark QMI driver event helpers as noinline As described in [1], compiling the ath12k driver using clang with KASAN enabled warns about some functions with excessive stack usage, with the worst case being: drivers/net/wireless/ath/ath12k/qmi.c:3546:13: warning: stack frame size (2456) exceeds limit (1024) in 'ath12k_qmi_driver_event_work' [-Wframe-larger-than] Nathan [2] highlighted work done by Arnd [3] to address similar issues in other portions of the kernel. ath12k_qmi_driver_event_work() itself is a pretty lightweight function, but it dispatches to several other functions which do the real work: ath12k_qmi_driver_event_work() ath12k_qmi_event_server_arrive() ath12k_qmi_host_cap_send() ath12k_qmi_event_mem_request() ath12k_qmi_respond_fw_mem_request() ath12k_qmi_event_load_bdf() ath12k_qmi_request_target_cap() ath12k_qmi_load_bdf_qmi() ath12k_qmi_wlanfw_m3_info_send() Mark all of those underlying functions as 'noinline_for_stack' to prevent them from being inlined in ath12k_qmi_driver_event_work(), thereby eliminating the excessive stack usage. Link: https://msgid.link/bc214795-1c51-4cb7-922f-67d6ef98bff2@quicinc.com # [1] Link: https://msgid.link/20241025223321.GA3647469@thelio-3990X # [2] Link: https://lore.kernel.org/all/?q=f:arnd@kernel.org+Wframe-larger-than # [3] Acked-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241028-ath12k_qmi_driver_event_work-v1-1-0d532eb593fa@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath12k/qmi.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) commit 34cd3bdffa111eb483c12c0a55d77ad0634bb5f3 Author: Balaji Pothunoori <quic_bpothuno@quicinc.com> Date: Tue Oct 29 14:03:40 2024 +0530 wifi: ath11k: Suspend hardware before firmware mode off for WCN6750 During rmmod, the ath11k host driver sends a QMI MODE OFF command to firmware. As part of this command, firmware initiates WLAN de-initialization and accesses certain UMAC registers during this process. Currently, on WCN6750 WLAN hardware, the system is in a sleep state when firmware receives the QMI MODE OFF command. This results in a firmware/hardware reset while accessing the UMAC hardware registers during sleep state. To avoid this, add logic to send WCN6750 hardware specific WMI_PDEV_SUSPEND_AND_DISABLE_INTR command to firmware prior to sending the QMI MODE OFF command. This will cause firmware to cease all activities and put the device in a powered-on state that prevents access to registers which have been powered off. Signed-off-by: Balaji Pothunoori <quic_bpothuno@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20241029083340.3010798-1-quic_bpothuno@quicinc.com Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> drivers/net/wireless/ath/ath11k/core.c | 45 ++++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath11k/hw.h | 1 + 2 files changed, 46 insertions(+) commit b63937da16d332fb805f9dcde8b57ea2a767f18e Author: Imre Deak <imre.deak@intel.com> Date: Wed Oct 30 21:23:13 2024 +0200 drm/i915/adlp+/dp_mst: Align master transcoder disabling with spec wrt. DP2 config On ADLP+ during modeset disabling, disable the DP2 configuration for MST master transcoders as required by the specification. Bspec: 55424, 54128, 65448, 68849 Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241030192313.4030617-6-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 2 ++ 1 file changed, 2 insertions(+) commit 90477f0dfd8881d2336ed3c7fd166bdc4c924e05 Author: Imre Deak <imre.deak@intel.com> Date: Wed Oct 30 21:23:12 2024 +0200 drm/i915/adlp+/dp_mst: Align slave transcoder sequences with spec wrt. DP2 config On ADLP+ during modeset enabling and disabling, enable and disable the DP2 configuration for MST slave transcoders as required by the specification. Update the documentation of intel_ddi_config_transcoder_func() / intel_ddi_disable_transcoder_func() based on the above. While at it also clarify the programming steps of these functions specific to transcoder types. v2: - Enable/disable the DP2 config from intel_ddi_config_transcoder_func()/intel_ddi_disable_transcoder_func(). (Jani) - Handle all ADLP+ platforms in one patch, instead of doing that separately wrt. PTL. Bspec: 55424, 54128, 65448, 68849 Cc: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241030192313.4030617-5-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 4dc776627602ae57de1dfac249fcfefb73983a80 Author: Imre Deak <imre.deak@intel.com> Date: Wed Oct 30 21:23:11 2024 +0200 drm/i915/dp_mst: Add a way to disable the DP2 config Add a way to disable the DP2 configuration, required by the next patch during transcoder disabling. While at it drop the redundant encoder parameter. v2: - Keep intel_ddi_config_transcoder_dp2() static. (Jani) - Remove the encoder parameter. Cc: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241030192313.4030617-4-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 734148a1d8d1ff00b1f31a44f20bf013f820e8e0 Author: Imre Deak <imre.deak@intel.com> Date: Wed Oct 30 21:23:10 2024 +0200 drm/i915/adlp+/dp_mst: Align slave transcoder enabling with spec wrt. DDI function On ADLP+ during modeset enabling configure the DDI function without enabling it for MST slave transcoders before programming the data and link M/N values. The DDI function gets enabled separately later in the transcoder enabling sequence. Align the code with the spec based on the above. v2: Move this patch earlier in the series, addressing the DP2 config fixes for all ADLP+ platforms later. Bspec: 55424, 54128, 65448, 68849 Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241030192313.4030617-3-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e203443c3a3fdfceeca161b78c93798bda83ebcc Author: Imre Deak <imre.deak@intel.com> Date: Wed Oct 30 21:23:09 2024 +0200 drm/i915/ptl/dp_mst: Fix slave transcoder enabling wrt. DDI function On PTL during modeset enabling configure the DDI function without enabling it for MST slave transcoders before programming the data and link M/N values. The DDI function gets enabled separately later in the transcoder enabling sequence. This fixes a slave transcoder getting stuck during enabling, leading to page flip timeout errors on the corresponding pipe. The spec requires the same programming step for ADLP+ platforms, that will be addressed separately (on those platforms the above transcoder getting stuck issue was not observed). Bspec: 68849 Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241030192313.4030617-2-imre.deak@intel.com drivers/gpu/drm/i915/display/intel_ddi.c | 2 +- drivers/gpu/drm/i915/display/intel_ddi.h | 2 ++ drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) commit 58193265d79604e4db5877c8940f17847793d333 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Oct 31 17:56:46 2024 +0200 drm/i915: Simplify xelpdp_is_only_pipe_per_dbuf_bank() Implement xelpdp_is_only_pipe_per_dbuf_bank() in a slightly more straightforward way. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241031155646.15165-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/skl_watermark.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 4985a9b7487a174bba313ce3af2f957f6092e63f Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Oct 31 17:56:45 2024 +0200 drm/i915: Sanitize MBUS joining If the system boots with MBUS joining enabled but we disable the relevant pipe during sanitation we later get into trouble as the rest of the code doesn't expect MBUS joining to be enabled unless the set of active pipes is in agreement. We could relax some of the MBUS joining related checks during normal atomic commits to let this slide, but that might also let some real bugs through. So let's sanitize the MBUS joining instead. And in order to keep things more or less in sync we'll do the related credit, cdclk/mdclk ratio, etc. updates as well. We'll stick to sturct drm_i915_private for now (instead of struct intel_display) since the rest of the skl wm code does the same, and we might need to bakport this. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241031155646.15165-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/skl_watermark.c | 29 ++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit 0656f1fbef5dc1bcb9f6a8c889cfa8329d6ac4f1 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Oct 31 17:56:44 2024 +0200 drm/i915: Extract mbus_ctl_join_update() We'll be wanting to reprogram the MBUS_CTL register during an upcoming MBUS sanitation stage. Extract the reprogramming into a helper that doesn't depend on the full atomic state so that it can be reused. We'll stick to sturct drm_i915_private for now (instead of struct intel_display) since the rest of the skl wm code does the same, and we might need to bakport this. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241031155646.15165-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/skl_watermark.c | 34 +++++++++++++++++----------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 7b3cb58fb2101ffe12fc6667b3cd97dbe61884b2 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Oct 31 17:56:43 2024 +0200 drm/i915: Extract pipe_mbus_dbox_ctl_update() We'll be wanting to reprogram the PIPE_MBUS_DBOX_CTL registers during an upcoming MBUS sanitation stage. Extract the reprogramming loop into a helper that doesn't depend on the full atomic state so that it can be reused. We'll stick to sturct drm_i915_private for now (instead of struct intel_display) since the rest of the skl wm code does the same, and we might need to bakport this. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241031155646.15165-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/skl_watermark.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 45bc523009f0c289b0f1354de007f3c61958e8c0 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Oct 31 17:56:42 2024 +0200 drm/i915: Extract pipe_mbus_dbox_ctl() We'll be wanting to reprogram the PIPE_MBUS_DBOX_CTL registers during an upcoming MBUS sanitation stage. To make that easier extract a helper that computes the full register value for us. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241031155646.15165-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/skl_watermark.c | 63 +++++++++++++++------------- 1 file changed, 34 insertions(+), 29 deletions(-) commit e31e8681d29c5c35aa070ca6323c6b95ecf0db99 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Oct 31 17:56:41 2024 +0200 drm/i915: Relocate the SKL wm sanitation code In order to add more MBUS sanitation into the code we'll want to reuse a bunch of the code that performs the MBUS/related hardware programming. Currently that code comes after the main skl_wm_get_hw_state_and_sanitize() entrypoint. In order to avoid annoying forward declarations relocate the skl_wm_get_hw_state_and_sanitize() and related stuff nearer to the end of the file. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241031155646.15165-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/skl_watermark.c | 420 +++++++++++++-------------- 1 file changed, 210 insertions(+), 210 deletions(-) commit abd2202047fc75d52dcd729d5a1534f019822e9c Author: Tomasz Lis <tomasz.lis@intel.com> Date: Mon Nov 4 22:34:49 2024 +0100 drm/xe/vf: Defer fixups if migrated twice fast If another VF migration happened during post-migration recovery, then the current worker should be finished to allow the next one start swiftly and cleanly. Check for defer in two places: before fixups, and before sending RESFIX_DONE. Signed-off-by: Tomasz Lis <tomasz.lis@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104213449.1455694-6-tomasz.lis@intel.com Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> drivers/gpu/drm/xe/xe_sriov_vf.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 4be3fca2ce6e207802a4ee36882ececde152221f Author: Tomasz Lis <tomasz.lis@intel.com> Date: Mon Nov 4 22:34:48 2024 +0100 drm/xe/vf: Start post-migration fixups with provisioning query During post-migration recovery, only MMIO communication to GuC is allowed. The VF KMD needs to use that channel to ask for the new provisioning, which includes a new GGTT range assigned to the VF. v2: query config only instead of handshake; no need to get pm ref as it's now kept through whole recovery (Michal) v3: switched names of 'err' and 'ret' (Michal) Signed-off-by: Tomasz Lis <tomasz.lis@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104213449.1455694-5-tomasz.lis@intel.com Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> drivers/gpu/drm/xe/xe_sriov_vf.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 1255954d9fdc5538be90034357525ef85bdbcf29 Author: Tomasz Lis <tomasz.lis@intel.com> Date: Mon Nov 4 22:34:47 2024 +0100 drm/xe/vf: Send RESFIX_DONE message at end of VF restore After restore, GuC will not answer to any messages from VF KMD until fixups are applied. When that is done, VF KMD sends RESFIX_DONE message to GuC, at which point GuC resumes normal operation. This patch implements sending the RESFIX_DONE message at end of post-migration recovery. v2: keep pm ref during whole recovery, style fixes (Michal) v3: assert removal to separate patch, debug message per GuC instead of one, comments changes (Michal) v4: improve one debug message (Michal) Signed-off-by: Tomasz Lis <tomasz.lis@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104213449.1455694-4-tomasz.lis@intel.com Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h | 38 ++++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 38 ++++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_gt_sriov_vf.h | 1 + drivers/gpu/drm/xe/xe_sriov_vf.c | 18 ++++++++++++ 4 files changed, 95 insertions(+) commit 360a1f3e96dc21794d688bb4f885542b2b14e619 Author: Tomasz Lis <tomasz.lis@intel.com> Date: Mon Nov 4 22:34:46 2024 +0100 drm/xe/vf: Document SRIOV VF restore flow This adds a documentation chapter, containing high level flow of VF restore procedure. v2: Better describe initial conditions, include GuC states on sequence diagram (Michal) v3: moved DOC to .c (Michal) Signed-off-by: Tomasz Lis <tomasz.lis@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104213449.1455694-3-tomasz.lis@intel.com Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> drivers/gpu/drm/xe/xe_sriov_vf.c | 107 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) commit 6e6d7b41f9870cd464bed7632228b5f977e2c0b1 Author: Tomasz Lis <tomasz.lis@intel.com> Date: Mon Nov 4 22:34:45 2024 +0100 drm/xe/vf: React to MIGRATED interrupt To properly support VF Save/Restore procedure, fixups need to be applied after PF driver finishes its part of VF Restore. The fixups are required to adjust the ongoing execution for a hardware switch that happened, because some GFX resources are not fully virtualized, and assigned to a VF as range from a global pool. The VF on which a VM is restored will often have different ranges provisioned than the VF on which save process happened. Those resource fixups are applied by the VF driver within a restored VM. A VF driver gets informed that it was migrated by receiving an interrupt from each GuC. The interrupt assigned for that purpose is "GUC SW interrupt 0". Seeing that fields set from within the irq handler should be the trigger for fixups. The VF can safely do post-migration fixups on resources associated to each GuC only after that GuC issued the MIGRATED interrupt. This change introduces a worker to be used for post-migration fixups, and a mechanism to schedule said worker when all GuCs sent the irq. v2: renamed and moved functions, updated logged messages, removed unused includes, used anon struct (Michal) v3: ordering, kerneldoc, asserts, debug messages, on_all_tiles -> on_all_gts (Michal) v4: fixed missing header include v5: Explained what fixups are, explained which IRQ is used, style fixes (Michal) Bspec: 50868 Signed-off-by: Tomasz Lis <tomasz.lis@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104213449.1455694-2-tomasz.lis@intel.com Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> drivers/gpu/drm/xe/Makefile | 3 +- drivers/gpu/drm/xe/xe_device_types.h | 2 + drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 25 ++++++++++++ drivers/gpu/drm/xe/xe_gt_sriov_vf.h | 1 + drivers/gpu/drm/xe/xe_guc.c | 11 ++++++ drivers/gpu/drm/xe/xe_memirq.c | 3 ++ drivers/gpu/drm/xe/xe_sriov.c | 4 ++ drivers/gpu/drm/xe/xe_sriov_types.h | 17 ++++++++ drivers/gpu/drm/xe/xe_sriov_vf.c | 77 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_sriov_vf.h | 14 +++++++ 10 files changed, 156 insertions(+), 1 deletion(-) commit 7868b3a94045a6c45b7dfb03945c195106bc77df Author: liujing <liujing@cmss.chinamobile.com> Date: Wed Nov 6 19:14:58 2024 +0800 char:ipmi: Fix the wrong format specifier Because the types of io.regsize and io.regspacing in the ipmipci_probe function are unsigned int, they should be output in the %u format. Signed-off-by: liujing <liujing@cmss.chinamobile.com> Message-ID: <20241106111458.2157-1-liujing@cmss.chinamobile.com> Signed-off-by: Corey Minyard <corey@minyard.net> drivers/char/ipmi/ipmi_si_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be7f5fcdf4a0b83a30cace5934d54c63f65e41df Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Wed Oct 30 09:40:36 2024 +0530 drm/i915/dp: Enable 3 DSC engines for 12 slices Certain resolutions require 12 DSC slices support along with ultrajoiner. For such cases, the third DSC Engine per Pipe is enabled. Each DSC Engine processes 1 Slice, resulting in a total of 12 VDSC slices (4 Pipes * 3 DSC Instances per Pipe). Add support for 12 DSC slices and 3 DSC engines for such modes. v2: Add missing check for 3 slices support only with 4 joined pipes. (Suraj) Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241030041036.1238006-8-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit d1f34623ad18524af3c54f92c3baaa4af1d7b3fd Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Wed Oct 30 09:40:35 2024 +0530 drm/i915/dp: Ensure hactive is divisible by slice count According to the DSC spec, the slice width should be chosen such that the picture width (hactive) is evenly divisible by the slice width. If not, extra pixels (padding) must be added to the last slice to ensure all slices have the same width. Currently, we do not support handling these extra pixels. Therefore, select a slice count that evenly divides the hactive (slice_width = hactive / slice_count). This check is already implemented for DSI, where the slice count is selected from the BIOS. For DP, currently with 1, 2, 4 slices per pipe it is unlikely to have slice count not being able to divide hactive, but with 3 DSC engines and 3 slices, we can have such cases. Adding this check prepares for future scenarios where such configurations might be used. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241030041036.1238006-7-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 3 +++ 1 file changed, 3 insertions(+) commit b3f5f0c8e9de3fed781bc62dab1ce88183272126 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Wed Oct 30 09:40:34 2024 +0530 drm/i915/vdsc: Add support for read/write PPS for 3rd DSC engine With BMG each pipe has 3 DSC engines, so add bits to read/write the PPS registers for the 3rd DSC engine Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241030041036.1238006-6-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_vdsc.c | 8 +++++--- drivers/gpu/drm/i915/display/intel_vdsc_regs.h | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-) commit 3013e2e409b75544351998a08c96899412d8f92d Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Wed Oct 30 09:40:33 2024 +0530 drm/i915/vdsc: Introduce 3rd VDSC engine VDSC2 Introduce the register bits to enable the 3rd DSC engine VDSC2. Add support to read/write these bits. v2: Only introduce bits that are used and update the subject and commit message. (Suraj) Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241030041036.1238006-5-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_vdsc.c | 10 +++++++++- drivers/gpu/drm/i915/display/intel_vdsc_regs.h | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) commit d457918cf78942bd9be999a53defc8d5ca42ce34 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Wed Oct 30 09:40:32 2024 +0530 drm/i915/vdsc: Use VDSC0/VDSC1 for LEFT/RIGHT VDSC engine Drop use of LEFT/RIGHT VDSC engine and use VDSC0/VDSC1 instead. While at it, use REG_BIT macro for the bits. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241030041036.1238006-4-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_vdsc.c | 8 ++++---- drivers/gpu/drm/i915/display/intel_vdsc_regs.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit a64d9afc55df30e3bcd6b3314eb1d2035c219538 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Wed Oct 30 09:40:31 2024 +0530 drm/i915/display: Prepare for dsc 3 stream splitter At the moment dsc_split represents whether the dsc splitter is used or not. With 3 DSC engines, the splitter can split into two streams or three streams. Instead of representing the splitter's state, it is more effective to represent the number of DSC streams per pipe. Replace the `dsc.dsc_split` member with `dsc.num_streams` to indicate the number of DSC streams used per pipe. This change will implicitly convey the splitter's operation mode. v2: Avoid new enum for dsc split. (Suraj) v3: -Replace dsc_split with num_stream. (Suraj) -Avoid extra parentheses. (Jani) v4: Set num_streams to 1, if VDSC_JOINER not set while readout. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241030041036.1238006-3-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/icl_dsi.c | 4 +++- drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display/intel_display_types.h | 2 +- drivers/gpu/drm/i915/display/intel_dp.c | 4 +++- drivers/gpu/drm/i915/display/intel_vdsc.c | 12 +++++++----- 5 files changed, 15 insertions(+), 9 deletions(-) commit e1faaca9d408d184d37204a9c94235d7030ccb15 Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Date: Wed Oct 30 09:40:30 2024 +0530 drm/i915/dp: Update Comment for Valid DSC Slices per Line For some platforms, the maximum slices per DSC engine is 4, while for others it is 2. Update the comment to reflect this and clarify that the 'valid_dsc_slicecount' list represents the valid number of slices per pipe. Currently, we are working with 1, and 2 slices per DSC engine, which works for all platforms. With this the number of slices per pipe can be 1,2 or 4 with different slice & DSC engine configuration. Add a #TODO for adding support for 4 slices per DSC engine where supported. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241030041036.1238006-2-ankit.k.nautiyal@intel.com drivers/gpu/drm/i915/display/intel_dp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 35e0a4f0a39651a6a6009f516847721cfdc633b7 Author: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Date: Wed Oct 16 20:45:28 2024 +0530 arm64: dts: qcom: ipq5424: Add smem and tcsr_mutex nodes The smem is necessary for the socinfo driver. Additionally smem requires the tcsr_mutex node. Therefore add both the nodes. Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com> Link: https://lore.kernel.org/r/20241016151528.2893599-4-quic_mmanikan@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/ipq5424.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 1a91d2a6021e29fce6bdf32960a89a936dad90da Author: Sricharan Ramabadhran <quic_srichara@quicinc.com> Date: Mon Oct 28 11:35:05 2024 +0530 arm64: dts: qcom: add IPQ5424 SoC and rdp466 board support Add initial device tree support for the Qualcomm IPQ5424 SoC and rdp466 board. Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com> Link: https://lore.kernel.org/r/20241028060506.246606-6-quic_srichara@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 59 ++++++ arch/arm64/boot/dts/qcom/ipq5424.dtsi | 291 ++++++++++++++++++++++++++++ 3 files changed, 351 insertions(+) commit 7aafdbd3f521ba5e8268fd9c405cdf18732a10f3 Author: Sricharan Ramabadhran <quic_srichara@quicinc.com> Date: Mon Oct 28 11:35:04 2024 +0530 dt-bindings: qcom: Add ipq5424 boards The IPQ5424 is Qualcomm's 802.11be SoC for Routers, Gateways and access Points. It has a quad core Cortex-a55 with a per core L1, Unified L2 caches and a common Unified L3 cache. Document the new ipq5424 SoC/board device tree bindings. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com> Link: https://lore.kernel.org/r/20241028060506.246606-5-quic_srichara@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 362dd128c49e655ff87eb64c2d200f5c9347c539 Merge: 6339e41fa39b 03e525c66de2 Author: Bjorn Andersson <andersson@kernel.org> Date: Tue Nov 5 16:35:21 2024 -0800 Merge branch '20241028060506.246606-3-quic_srichara@quicinc.com' into arm64-for-6.13 Merge IPQ5424 global clock controller binding through topic branch to make the constants available for both clock and DeviceTree branches. commit 6339e41fa39b498b0c9417925e33c80ad61b0e63 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Nov 2 05:03:14 2024 +0200 arm64: dts: qcom: sar2130p: add QAR2130P board file Add board DT file for the Qualcomm Snapdragon AR2 Gen1 Smart Viewer Development Kit. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20241102-sar2130p-dt-v4-3-60b7220fd0dd@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/Makefile | 2 + arch/arm64/boot/dts/qcom/sar2130p-qar2130p.dts | 558 +++++++++++++++++++++++++ 2 files changed, 560 insertions(+) commit be9115bfe5bf612455968724361a96b135d1f677 Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Nov 2 05:03:13 2024 +0200 arm64: dts: qcom: sar2130p: add support for SAR2130P Add DT file for the Qualcomm SAR2130P platform. Co-developed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241102-sar2130p-dt-v4-2-60b7220fd0dd@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/sar2130p.dtsi | 3123 ++++++++++++++++++++++++++++++++ 1 file changed, 3123 insertions(+) commit 23bb55173078ef454868aa814d4273f190afe7da Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Date: Sat Nov 2 05:03:12 2024 +0200 dt-bindings: arm: qcom: add QAR2130P board Add the Qualcomm QAR2130P development board using the Qualcomm AR2 Gen1 aka SAR2130P platform. The qcom-soc.yaml chunks use explicit 'sa|sar' instead of just 'sar?' to be more obvious for reviewers and to ease future extensions. Overuse of the regular expressions can easily end up with the hard-to-read and modify schema. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241102-sar2130p-dt-v4-1-60b7220fd0dd@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/arm/qcom-soc.yaml | 3 ++- Documentation/devicetree/bindings/arm/qcom.yaml | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit caf1d8900173ed7da95b7581b1097d4849d4141f Merge: 2aedc97d9a4d bc2bb732162f Author: Bjorn Andersson <andersson@kernel.org> Date: Tue Nov 5 16:28:09 2024 -0800 Merge branch 'icc-sar2130p' of https://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into HEAD Merge interconnect bindings for SAR2130P to make constants available in DeviceTree source branch. commit 2aedc97d9a4dd4d0e4314b44aec2c0fbc3c3d04a Merge: 019e1ee32fec 111481020aa5 Author: Bjorn Andersson <andersson@kernel.org> Date: Tue Nov 5 16:22:51 2024 -0800 Merge branch '20241027-sar2130p-clocks-v5-0-ecad2a1432ba@linaro.org' into arm64-for-6.13 Merge SAR2130P clock bindings through topic branch, to allow them being used in both clock and DeviceTree branches. commit 3c1d5ced18db8a67251c8436cf9bdc061f972bdb Author: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Date: Mon Oct 28 16:31:32 2024 -0700 drm/i915/gsc: ARL-H and ARL-U need a newer GSC FW. All MTL and ARL SKUs share the same GSC FW, but the newer platforms are only supported in newer blobs. In particular, ARL-S is supported starting from 102.0.10.1878 (which is already the minimum required version for ARL in the code), while ARL-H and ARL-U are supported from 102.1.15.1926. Therefore, the driver needs to check which specific ARL subplatform its running on when verifying that the GSC FW is new enough for it. Fixes: 2955ae8186c8 ("drm/i915: ARL requires a newer GSC firmware") Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241028233132.149745-1-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c | 50 ++++++++++++++++++++----------- drivers/gpu/drm/i915/i915_drv.h | 8 +++-- drivers/gpu/drm/i915/intel_device_info.c | 24 +++++++++++---- drivers/gpu/drm/i915/intel_device_info.h | 4 ++- include/drm/intel/pciids.h | 15 ++++++++-- 5 files changed, 72 insertions(+), 29 deletions(-) commit 20ade9c3f1958035306500e1ee0c7ee777ee8d42 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Mon Nov 4 06:38:13 2024 -0800 drm/xe: Reword exec_queue and vm lock doc Reword documentation to possibly what it meant to be. Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104143815.2112272-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_device_types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 83db047d9425d9a649f01573797558eff0f632e1 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Mon Nov 4 06:38:12 2024 -0800 drm/xe: Stop accumulating LRC timestamp on job_free The exec queue timestamp is only really useful when it's being queried through the fdinfo. There's no need to update it so often, on every job_free. Tracing a simple app like vkcube running shows an update rate of ~ 120Hz. In case of discrete, the BO is on vram, creating a lot of pcie transactions. The update on job_free() is used to cover a gap: if exec queue is created and destroyed rapidly, before a new query, the timestamp still needs to be accumulated and accounted for in the xef. Initial implementation in commit 6109f24f87d7 ("drm/xe: Add helper to accumulate exec queue runtime") couldn't do it on the exec_queue_fini since the xef could be gone at that point. However since commit ce8c161cbad4 ("drm/xe: Add ref counting for xe_file") the xef is refcounted and the exec queue always holds a reference, making this safe now. Improve the fix in commit 2149ded63079 ("drm/xe: Fix use after free when client stats are captured") by reducing the frequency in which the update is needed. Fixes: 2149ded63079 ("drm/xe: Fix use after free when client stats are captured") Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104143815.2112272-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_exec_queue.c | 6 ++++++ drivers/gpu/drm/xe/xe_guc_submit.c | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) commit a7238ee33c409e8edea365cc9e6539ed31a5c859 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Mon Nov 4 06:38:11 2024 -0800 drm/xe: Add trace to lrc timestamp update Help debugging when LRC timestamp is updated for a exec queue. Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104143815.2112272-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/Makefile | 1 + drivers/gpu/drm/xe/xe_lrc.c | 3 +++ drivers/gpu/drm/xe/xe_trace_lrc.c | 9 +++++++ drivers/gpu/drm/xe/xe_trace_lrc.h | 52 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+) commit 019e1ee32fec24a69e3491d27eb0f1bedce12525 Author: Sibi Sankar <quic_sibis@quicinc.com> Date: Fri Oct 25 18:05:51 2024 +0530 arm64: dts: qcom: x1e001de-devkit: Enable external DP support The Qualcomm Snapdragon X Elite Devkit for Windows has the same configuration as the CRD variant i.e. all 3 of the type C ports support external DP altmode. Add all the nodes needed to enable them. Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com> Link: https://lore.kernel.org/r/20241025123551.3528206-4-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e001de-devkit.dts | 444 ++++++++++++++++++++++++++- 1 file changed, 438 insertions(+), 6 deletions(-) commit 3844a8682e55813a6ad02d14f5862d7a73f9dc22 Author: Sibi Sankar <quic_sibis@quicinc.com> Date: Fri Oct 25 18:05:49 2024 +0530 arm64: dts: qcom: x1e001de-devkit: Add audio related nodes The x1e001de devkit devices are expected to ship without external speaker/mic connected, so just enable headphone jack on it. Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com> Link: https://lore.kernel.org/r/20241025123551.3528206-2-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/x1e001de-devkit.dts | 97 ++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit 7b8a31e82b87cc7784010ddc97601ccaf7a173ae Author: Sibi Sankar <quic_sibis@quicinc.com> Date: Fri Oct 25 18:02:27 2024 +0530 arm64: dts: qcom: Add X1E001DE Snapdragon Devkit for Windows Add initial support for x1e001de devkit platform. This includes: -DSPs -Ethernet (RTL8125BG) over the pcie 5 instance. -NVme -Wifi -USB-C ports Link: https://www.qualcomm.com/news/releases/2024/05/qualcomm-accelerates-development-for-copilot--pcs-with-snapdrago Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Tested-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Acked-by: Marc Zyngier <maz@kernel.org> Tested-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20241025123227.3527720-4-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/x1e001de-devkit.dts | 814 +++++++++++++++++++++++++++ 2 files changed, 815 insertions(+) commit ab14ec55a2b9da8846afe81ec7264b37a8e51f99 Author: Sibi Sankar <quic_sibis@quicinc.com> Date: Fri Oct 25 18:02:25 2024 +0530 dt-bindings: arm: qcom: Add Snapdragon Devkit for Windows X1E001DE is the speed binned variant of X1E80100 that supports turbo boost up to 4.3 GHz. Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Tested-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Acked-by: Marc Zyngier <maz@kernel.org> Tested-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20241025123227.3527720-2-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 79367b7a58c82d0b1c0a7b0ef748f7aafa91d048 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Mon Nov 4 13:35:12 2024 -0800 drm/i915/pmu: Remove pointless synchronize_rcu() call This is already done inside perf_pmu_unregister() - no need to do it before. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104213512.2314930-5-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/i915/i915_pmu.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 6ba29f1352482b815e2414b718bbd6de8d884d10 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Mon Nov 4 13:35:11 2024 -0800 drm/i915/pmu: Replace closed with registered Since i915 calls perf_pmu_register/perf_pmu_unregister, let's call the variable "registered" so we can flip the logic and rely on it being false by default. Looking at other drivers, it's also more common. Examples: arch/x86/events/intel/uncore.c and drivers/powercap/intel_rapl_common.c. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104213512.2314930-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/i915/i915_pmu.c | 25 +++++++++++++------------ drivers/gpu/drm/i915/i915_pmu.h | 4 ++-- 2 files changed, 15 insertions(+), 14 deletions(-) commit 9116b5760e615336b0c5060a85b25b2ec7d7c48b Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Mon Nov 4 13:35:10 2024 -0800 drm/i915/pmu: Stop setting event_init to NULL Setting event_init to NULL is mostly done to detect when the driver is partially working: i915 probed, but pmu is not registered. However, checking for event_init is odd as it was supposed to always be set and kernel/events/ would just crash if it found it set to NULL. Since there's already a "closed" boolean, use that instead and extend it's meaning to unregistered/unregistering. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104213512.2314930-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/i915/i915_pmu.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit c62018a002dd5da0262e005a89fe691ca8d57cf6 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Mon Nov 4 13:35:09 2024 -0800 drm/i915/pmu: Rename cpuhp_slot to cpuhp_state Both the documentation and most of other users call the return of cpuhp_setup_state_multi() as "state". Follow that. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104213512.2314930-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/i915/i915_pmu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 43b1dd2b550f0861ce80fbfffd5881b1b26272b1 Author: Michal Wajdeczko <michal.wajdeczko@intel.com> Date: Mon Nov 4 15:49:01 2024 +0100 drm/xe/pf: Fix potential GGTT allocation leak In unlikely event that we fail during sending the new VF GGTT configuration to the GuC, we will free only the GGTT node data struct but will miss to release the actual GGTT allocation. This will later lead to list corruption, GGTT space leak and finally risking crash when unloading the driver: [ ] ... [drm] GT0: PF: Failed to provision VF1 with 1073741824 (1.00 GiB) GGTT (-EIO) [ ] ... [drm] GT0: PF: VF1 provisioning remains at 0 (0 B) GGTT [ ] list_add corruption. next->prev should be prev (ffff88813cfcd628), but was 0000000000000000. (next=ffff88813cfe2028). [ ] RIP: 0010:__list_add_valid_or_report+0x6b/0xb0 [ ] Call Trace: [ ] drm_mm_insert_node_in_range+0x2c0/0x4e0 [ ] xe_ggtt_node_insert+0x46/0x70 [xe] [ ] pf_provision_vf_ggtt+0x7f5/0xa70 [xe] [ ] xe_gt_sriov_pf_config_set_ggtt+0x5e/0x770 [xe] [ ] ggtt_set+0x4b/0x70 [xe] [ ] simple_attr_write_xsigned.constprop.0.isra.0+0xb0/0x110 [ ] ... [drm] GT0: PF: Failed to provision VF1 with 1073741824 (1.00 GiB) GGTT (-ENOSPC) [ ] ... [drm] GT0: PF: VF1 provisioning remains at 0 (0 B) GGTT [ ] Oops: general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6b7b: 0000 [#1] PREEMPT SMP NOPTI [ ] RIP: 0010:drm_mm_remove_node+0x1b7/0x390 [ ] Call Trace: [ ] <TASK> [ ] ? die_addr+0x2e/0x80 [ ] ? exc_general_protection+0x1a1/0x3e0 [ ] ? asm_exc_general_protection+0x22/0x30 [ ] ? drm_mm_remove_node+0x1b7/0x390 [ ] ggtt_node_remove+0xa5/0xf0 [xe] [ ] xe_ggtt_node_remove+0x35/0x70 [xe] [ ] xe_ttm_bo_destroy+0x123/0x220 [xe] [ ] intel_user_framebuffer_destroy+0x44/0x70 [xe] [ ] intel_plane_destroy_state+0x3b/0xc0 [xe] [ ] drm_atomic_state_default_clear+0x1cd/0x2f0 [ ] intel_atomic_state_clear+0x9/0x20 [xe] [ ] __drm_atomic_state_free+0x1d/0xb0 Fix that by using pf_release_ggtt() on the error path, which now works regardless if the node has GGTT allocation or not. Fixes: 34e804220f69 ("drm/xe: Make xe_ggtt_node struct independent") Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104144901.1903-1-michal.wajdeczko@intel.com drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7d1a4258e602ffdce529f56686925034c1b3b095 Author: Matthew Brost <matthew.brost@intel.com> Date: Mon Nov 4 20:35:24 2024 -0800 drm/xe: Drop VM dma-resv lock on xe_sync_in_fence_get failure in exec IOCTL Upon failure all locks need to be dropped before returning to the user. Fixes: 58480c1c912f ("drm/xe: Skip VMAs pin when requesting signal to the last XE_EXEC") Cc: <stable@vger.kernel.org> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241105043524.4062774-3-matthew.brost@intel.com drivers/gpu/drm/xe/xe_exec.c | 1 + 1 file changed, 1 insertion(+) commit 07064a200b40ac2195cb6b7b779897d9377e5e6f Author: Matthew Brost <matthew.brost@intel.com> Date: Mon Nov 4 20:35:23 2024 -0800 drm/xe: Fix possible exec queue leak in exec IOCTL In a couple of places after an exec queue is looked up the exec IOCTL returns on input errors without dropping the exec queue ref. Fix this ensuring the exec queue ref is dropped on input error. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: <stable@vger.kernel.org> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241105043524.4062774-2-matthew.brost@intel.com drivers/gpu/drm/xe/xe_exec.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 71fb41bdd9bab7f541d81920367e2732ead7db8c Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Mon Nov 4 23:15:39 2024 -0800 drm/xe: Fix case for asserts in documentation The rendered html documentation for "Xe ASSERTs" doesn't look nice with the mixed caps and gives the impression it was a typo. Use Title Case Style. Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241105071539.2623727-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_assert.h | 8 ++++---- drivers/gpu/drm/xe/xe_gt_sriov_pf_helpers.h | 2 +- drivers/gpu/drm/xe/xe_sriov_pf_helpers.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit ec70912110f449c9f1b866f4f75e10c056423426 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Oct 29 11:25:26 2024 +0200 drm/i915: hide VLV PUNIT IOSF sideband qos handling better The sideband latency qos request is only used for VLV PUNIT access. Abstract it better, and also add the request for VLV only. Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/92632f64c1256bfafe7ebf49c1ad0618157d9484.1730193891.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/i915_driver.c | 2 -- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/vlv_sideband.c | 10 ++++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) commit a72e1c139194a58f4cdc26f3c8f4e88bb97d7edd Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Oct 29 11:25:25 2024 +0200 drm/i915: add a dedicated mutex for VLV/CHV IOSF sideband The VLV/CHV IOSF sideband is unrelated to pcode. It's just confusing to piggyback on the same mutex. Add a dedicated lock with init and cleanup functions. Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/31ccbf33c6b6114d0bcb40a2e174f19162d4e177.1730193891.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/i915_driver.c | 3 +++ drivers/gpu/drm/i915/i915_drv.h | 5 +++++ drivers/gpu/drm/i915/vlv_sideband.c | 18 +++++++++++++++--- drivers/gpu/drm/i915/vlv_sideband.h | 3 +++ 4 files changed, 26 insertions(+), 3 deletions(-) commit f270857385b2880ff291526e6d8f5c3fe0d011f5 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Oct 29 11:25:24 2024 +0200 drm/i915/sbi: add a dedicated mutex for LPT/WPT IOSF sideband The LPT/WPT IOSF sideband is unrelated to pcode or VLV/CHV IOSF sideband. It's just confusing to piggyback on the same mutex. Add a dedicated lock with init and cleanup functions. Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/139933094fe51fccdbe14d4e20df69782e801905.1730193891.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/i915_driver.c | 3 +++ drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/intel_sbi.c | 16 +++++++++++++--- drivers/gpu/drm/i915/intel_sbi.h | 2 ++ 4 files changed, 21 insertions(+), 3 deletions(-) commit d519f48b2ff11138c1e9116e5a12241e91a90070 Author: Jani Nikula <jani.nikula@intel.com> Date: Tue Oct 29 11:25:23 2024 +0200 drm/i915/sbi: add intel_sbi_{lock,unlock}() Abstract the LPT/WPT IOSF sideband locking by adding dedicated sbi lock/unlock functions. Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/61929c2fad4d4ff64e57ea2a28007f2efeb5113c.1730193891.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/display/intel_pch_refclk.c | 26 ++++++++++++------------- drivers/gpu/drm/i915/intel_sbi.c | 10 ++++++++++ drivers/gpu/drm/i915/intel_sbi.h | 2 ++ 3 files changed, 25 insertions(+), 13 deletions(-) commit a8f6035aebe768780abd730bd1ac61e460f43970 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Sat Nov 2 09:12:54 2024 -0700 drm/xe: Wire up devcoredump in documentation Add a documentation page to detail the device coredump as implemented by xe - it was documented in the source code, but not visible in the rendered (html) documentation. Reviewed-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Raag Jadav <raag.jadav@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241102161254.1818604-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Documentation/gpu/xe/index.rst | 1 + Documentation/gpu/xe/xe_devcoredump.rst | 14 ++++++++++++++ 2 files changed, 15 insertions(+) commit aa06cb835153d79aa7c18eb9ffc70866acddaaad Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Sat Nov 2 09:12:53 2024 -0700 drm/xe: Improve devcoredump documentation Let the introduction be useful for both userspace and kernel. Also improve the formatting to wire up later to the documentation build. Reviewed-by: Raag Jadav <raag.jadav@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241102161254.1818604-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_devcoredump.c | 51 ++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 21 deletions(-) commit db62482e3242751aeb05c5995175795cc08605e6 Author: Gyeyoung Baek <gye976@gmail.com> Date: Sat Nov 2 11:22:03 2024 +0900 drm/xe: Fix build error for XE_IOCTL_DBG macro If CONFIG_DRM_USE_DYNAMIC_DEBUG is set, 'drm_dbg' function is replaced with '__dynamic_func_call_cls', which is replaced with a do while statement. So in the previous code, there are the following build errors. include/linux/dynamic_debug.h:221:58: error: expected expression before ‘do’ 221 | #define __dynamic_func_call_cls(id, cls, fmt, func, ...) do { \ | ^~ include/linux/dynamic_debug.h:248:9: note: in expansion of macro ‘__dynamic_func_call_cls’ 248 | __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~~~~ include/drm/drm_print.h:425:9: note: in expansion of macro ‘_dynamic_func_call_cls’ 425 | _dynamic_func_call_cls(cat, fmt, __drm_dev_dbg, \ | ^~~~~~~~~~~~~~~~~~~~~~ include/drm/drm_print.h:504:9: note: in expansion of macro ‘drm_dev_dbg’ 504 | drm_dev_dbg((drm) ? (drm)->dev : NULL, DRM_UT_DRIVER, fmt, ##__VA_ARGS__) | ^~~~~~~~~~~ include/drm/drm_print.h:522:33: note: in expansion of macro ‘drm_dbg_driver’ 522 | #define drm_dbg(drm, fmt, ...) drm_dbg_driver(drm, fmt, ##__VA_ARGS__) | ^~~~~~~~~~~~~~ drivers/gpu/drm/xe/xe_macros.h:14:21: note: in expansion of macro ‘drm_dbg’ 14 | ((cond) && (drm_dbg(&(xe)->drm, \ | ^~~~~~~ drivers/gpu/drm/xe/xe_bo.c:2029:13: note: in expansion of macro ‘XE_IOCTL_DBG’ 2029 | if (XE_IOCTL_DBG(xe, !gem_obj)) The problem is that XE_IOCTL_DBG uses this function for conditional expr. Use a statement expression so it can also be used on conditional checks. v2: Modify to print when only cond is true. v3: Modify to evaluate cond only once. Signed-off-by: Gyeyoung Baek <gye976@gmail.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241102022204.155039-1-gye976@gmail.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_macros.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit be15f0bc4a95e681466b2cfa1ceb86a9e38c5be6 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Mon Nov 4 10:31:04 2024 -0800 drm/xe: Fix drm-next merge Fix merge in commit c787c2901e2c ("Merge drm/drm-next into drm-xe-next"). That workaround needs to be done only once. While at it, also remove undesired newline before checking for error. Fixes: c787c2901e2c ("Merge drm/drm-next into drm-xe-next") Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104183104.2265275-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_guc_ct.c | 19 ------------------- 1 file changed, 19 deletions(-) commit a18e301a9cb66254b5d88857b9e097af1421f4de Author: Suraj Kandpal <suraj.kandpal@intel.com> Date: Tue Nov 5 00:20:55 2024 +0530 drm/i915/xe3lpd: Update HDCP rekeying bit The TRANS_DDI_FUNC_CTL bit used to enable/disable HDCP rekeying has moved from bit 12 (Xe2) to bit 15 (Xe3); update the RMW toggle accordingly. Also drop the misleading workaround comment tag on this function since disabling of HDCP rekeying is something that happens on all platforms, not just those impacted by that workaround. While we're here, also re-order the if/else ladder to use standard "newest platform first" order. v2: add additional definition instead of function, commit message typo fix and update. v3: restore lost conditional from v2. v4: subject line and subject message updated, fix the if ladder order, fix the bit definition order. v5: Add the bspec link and remove the Wa comment tag v6: Rebase over new changes v7: Fix commit subject and message, reladder the if/else blocks Bspec: 69964 Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241104185055.739605-1-suraj.kandpal@intel.com drivers/gpu/drm/i915/display/intel_hdcp.c | 23 ++++++++++++----------- drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 13 insertions(+), 11 deletions(-) commit b7cfe79f06d673fccd388896ff67f305b8378716 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Sun Nov 3 14:49:36 2024 +0000 drm/i915/gt: Remove unused execlists_unwind_incomplete_requests execlists_unwind_incomplete_requests() is unused since 2021's commit eb5e7da736f3 ("drm/i915/guc: Reset implementation for new GuC interface") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241103144936.238116-1-linux@treblig.org Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> drivers/gpu/drm/i915/gt/intel_engine.h | 3 --- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 9 --------- 2 files changed, 12 deletions(-) commit c787c2901e2c03008e536b86cb0103ce6fd05e2d Merge: a19d1db9a3fa 30169bb64580 Author: Thomas Hellström <thomas.hellstrom@linux.intel.com> Date: Mon Nov 4 09:21:20 2024 +0100 Merge drm/drm-next into drm-xe-next Backmerging to get up-to-date and to bring in a fix that was merged through drm-misc-fixes. Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> commit a19d1db9a3fa89fabd7c83544b84f393ee9b851f Author: Matthew Brost <matthew.brost@intel.com> Date: Thu Oct 31 11:22:57 2024 -0700 drm/xe: Restore system memory GGTT mappings GGTT mappings reside on the device and this state is lost during suspend / d3cold thus this state must be restored resume regardless if the BO is in system memory or VRAM. v2: - Unnecessary parentheses around bo->placements[0] (Checkpatch) Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241031182257.2949579-1-matthew.brost@intel.com drivers/gpu/drm/xe/xe_bo.c | 14 +++++++++++--- drivers/gpu/drm/xe/xe_bo_evict.c | 1 - 2 files changed, 11 insertions(+), 4 deletions(-) commit 1a7b71805a3051ae04dde1307a6eecedaca857b8 Author: Thomas Hellström <thomas.hellstrom@linux.intel.com> Date: Thu Oct 31 16:37:32 2024 +0100 drm/xe: Don't unnecessarily invoke the OOM killer on multiple binds Multiple single-ioctl binds can be split up into multiple bind ioctls, reducing the memory required to hold the bind array. So rather than allowing the OOM killer to be invoked, return -ENOMEM or -ENOBUFS to user-space to take corrective action. v2: - Add __GFP_NOWARN to __GFP_RETRY_MAYFAIL allocations to avoid spamming the kernel log if a recoverable allocation fails. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2701 Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241031153732.164995-3-thomas.hellstrom@linux.intel.com drivers/gpu/drm/xe/xe_vm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 6bd49cc1a8924c3fe9554526f2d42d8d8851aea9 Author: Thomas Hellström <thomas.hellstrom@linux.intel.com> Date: Thu Oct 31 16:37:31 2024 +0100 drm/xe: Avoid the OOM killer on buffer object memory allocation Rather than invoking the OOM killer on buffer object memory allocations and validations, have the allocations fail and pass the error to user-space if applicable. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2701 Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241031153732.164995-2-thomas.hellstrom@linux.intel.com drivers/gpu/drm/xe/xe_bo.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit e1f6fa55664a0eeb0a641f497e1adfcf6672e995 Author: Nirmoy Das <nirmoy.das@intel.com> Date: Tue Oct 29 13:01:17 2024 +0100 drm/xe/guc/tlb: Flush g2h worker in case of tlb timeout Flush the g2h worker explicitly if TLB timeout happens which is observed on LNL and that points to the recent scheduling issue with E-cores on LNL. This is similar to the recent fix: commit e51527233804 ("drm/xe/guc/ct: Flush g2h worker in case of g2h response timeout") and should be removed once there is E core scheduling fix. v2: Add platform check(Himal) v3: Remove gfx platform check as the issue related to cpu platform(John) Use the common WA macro(John) and print when the flush resolves timeout(Matt B) v4: Remove the resolves log and do the flush before taking pending_lock(Matt A) Cc: Badal Nilawar <badal.nilawar@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Matthew Auld <matthew.auld@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: stable@vger.kernel.org # v6.11+ Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2687 Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029120117.449694-3-nirmoy.das@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 2 ++ 1 file changed, 2 insertions(+) commit 38c4c8722bd74452280951edc44c23de47612001 Author: Nirmoy Das <nirmoy.das@intel.com> Date: Tue Oct 29 13:01:16 2024 +0100 drm/xe/ufence: Flush xe ordered_wq in case of ufence timeout Flush xe ordered_wq in case of ufence timeout which is observed on LNL and that points to recent scheduling issue with E-cores. This is similar to the recent fix: commit e51527233804 ("drm/xe/guc/ct: Flush g2h worker in case of g2h response timeout") and should be removed once there is a E-core scheduling fix for LNL. v2: Add platform check(Himal) s/__flush_workqueue/flush_workqueue(Jani) v3: Remove gfx platform check as the issue related to cpu platform(John) v4: Use the Common macro(John) and print when the flush resolves timeout(Matt B) Cc: Badal Nilawar <badal.nilawar@intel.com> Cc: Matthew Auld <matthew.auld@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: stable@vger.kernel.org # v6.11+ Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2754 Suggested-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029120117.449694-2-nirmoy.das@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_wait_user_fence.c | 7 +++++++ 1 file changed, 7 insertions(+) commit cbe006a6492c01a0058912ae15d473f4c149896c Author: Nirmoy Das <nirmoy.das@intel.com> Date: Tue Oct 29 13:01:15 2024 +0100 drm/xe: Move LNL scheduling WA to xe_device.h Move LNL scheduling WA to xe_device.h so this can be used in other places without needing keep the same comment about removal of this WA in the future. The WA, which flushes work or workqueues, is now wrapped in macros and can be reused wherever needed. Cc: Badal Nilawar <badal.nilawar@intel.com> Cc: Matthew Auld <matthew.auld@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> cc: stable@vger.kernel.org # v6.11+ Suggested-by: John Harrison <John.C.Harrison@Intel.com> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029120117.449694-1-nirmoy.das@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_device.h | 14 ++++++++++++++ drivers/gpu/drm/xe/xe_guc_ct.c | 11 +---------- 2 files changed, 15 insertions(+), 10 deletions(-) commit 1c35f1ed1fe3c649f8c16214d0d3dd828b5265d9 Author: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com> Date: Tue Oct 8 13:06:28 2024 +0530 drm/xe: Use the filelist from drm for ccs_mode change Drop the exclusive client count tracking and use the filelist from the drm to track the active clients. This also ensures the clients created internally by the driver won't block changing the ccs mode. Fixes: ce8c161cbad4 ("drm/xe: Add ref counting for xe_file") Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241008073628.377433-3-balasubramani.vivekanandan@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_device.c | 10 ---------- drivers/gpu/drm/xe/xe_device_types.h | 9 --------- drivers/gpu/drm/xe/xe_gt_ccs_mode.c | 9 +++++---- 3 files changed, 5 insertions(+), 23 deletions(-) commit 23ea2c7572d4735ef66beb1e4feb8ae510b78247 Author: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com> Date: Tue Oct 8 13:06:27 2024 +0530 drm/xe: Set mask bits for CCS_MODE register CCS_MODE register requires setting mask bits from Xe2+ platforms. Set the mask bits unconditionally, as those bits are unused for older platforms. Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com> Cc: stable@vger.kernel.org # v6.11+ Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241008073628.377433-2-balasubramani.vivekanandan@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/regs/xe_gt_regs.h | 2 +- drivers/gpu/drm/xe/xe_gt_ccs_mode.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 8262db9eff5816e757cbe5655728922784d8a802 Author: Lucas De Marchi <lucas.demarchi@intel.com> Date: Tue Oct 29 12:32:58 2024 -0700 drm/xe: Move Wa 1607983814 to oob needs_wa_1607983814() predates wa_oob, so it was not being printed in /sys/kernel/debug/dri/0/*/workarounds. Port it to OOB rules. This makes the WA show up in debugfs. For TGL: OOB Workarounds 1607983814 22012773006 1409600907 Eventually the RTP infra may add support for writing registers in a loop, which would allow to keep track of the registers as well. But for now, just listing it as OOB workaround is already an improvement. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241029193258.749882-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> drivers/gpu/drm/xe/xe_guc_ads.c | 11 ++--------- drivers/gpu/drm/xe/xe_wa_oob.rules | 1 + 2 files changed, 3 insertions(+), 9 deletions(-) commit 136a78710f33e91e28ff4bd29e256ca27f87631f Author: Kees Cook <kees@kernel.org> Date: Thu Oct 31 15:08:55 2024 -0700 MAINTAINERS: exec: Mark Kees as maintainer It's more accurate to mark myself as a maintainer: I've been keeping the tree up to date in linux-next, etc. Link: https://lore.kernel.org/r/20241031220853.work.354-kees@kernel.org Reviewed-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Kees Cook <kees@kernel.org> MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6baab135eb00e85020abd0f13907a934b3df5c6b Author: Kees Cook <kees@kernel.org> Date: Thu Oct 31 15:08:35 2024 -0700 MAINTAINERS: exec: Add auxvec.h UAPI Changes to auxiliary vectors would be best reviewed by the exec/binfmt maintainers. Link: https://lore.kernel.org/r/20241031220833.work.539-kees@kernel.org Reviewed-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Kees Cook <kees@kernel.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 200f091c95bbc4b8660636bd345805c45d6eced7 Author: Kees Cook <kees@kernel.org> Date: Sat Sep 28 14:08:31 2024 -0700 coredump: Do not lock during 'comm' reporting The 'comm' member will always be NUL terminated, and this is not fast-path, so we can just perform a direct memcpy during a coredump instead of potentially deadlocking while holding the task struct lock. Reported-by: Vegard Nossum <vegard.nossum@oracle.com> Closes: https://lore.kernel.org/all/d122ece6-3606-49de-ae4d-8da88846bef2@oracle.com Fixes: c114e9948c2b ("coredump: Standartize and fix logging") Tested-by: Vegard Nossum <vegard.nossum@oracle.com> Link: https://lore.kernel.org/r/20240928210830.work.307-kees@kernel.org Signed-off-by: Kees Cook <kees@kernel.org> include/linux/coredump.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2aff81e039de5b0b7ef6bdcb2c320f121f69e2b4 Author: Everest K.C. <everestkc@everestkc.com.np> Date: Wed Oct 23 17:33:55 2024 -0600 drm/xe/guc: Fix dereference before NULL check The pointer list->list is dereferenced before the NULL check. Fix this by moving the NULL check outside the for loop, so that the check is performed before the dereferencing. The list->list pointer cannot be NULL so this has no effect on runtime. It's just a correctness issue. This issue was reported by Coverity Scan. https://scan7.scan.coverity.com/#/project-view/51525/11354?selectedIssue=1600335 Fixes: 0f1fdf559225 ("drm/xe/guc: Save manual engine capture into capture list") Signed-off-by: Everest K.C. <everestkc@everestkc.com.np> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241023233356.5479-1-everestkc@everestkc.com.np drivers/gpu/drm/xe/xe_guc_capture.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit aad4b41a34191b07ad0cb78b4009b46fd23382f7 Author: Leo Stone <leocstone@gmail.com> Date: Tue Oct 22 21:12:01 2024 -0700 Documentation: ieee802154: fix grammar Fix grammar where it improves readability. Signed-off-by: Leo Stone <leocstone@gmail.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com> Link: https://lore.kernel.org/20241023041203.35313-1-leocstone@gmail.com Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org> Documentation/networking/ieee802154.rst | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 3d1ea1c0aeaf7baaf0c0a3d073a49671dfd3771a Author: Kent Overstreet <kent.overstreet@linux.dev> Date: Fri Oct 11 16:21:14 2024 -0400 bcachefs: kill retry_estale() in bch2_ioctl_subvolume_create() this was likely originally cribbed, and has been dead code, and Al is working on removing it from the tree. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> fs/bcachefs/fs-ioctl.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 2378bd0b264ad3a1f76bd957caf33ee0c7945351 Author: Charles Han <hanchunchao@inspur.com> Date: Thu Sep 26 17:44:19 2024 +0800 ipmi: ipmb: Add check devm_kasprintf() returned value devm_kasprintf() can return a NULL pointer on failure but this returned value is not checked. Fixes: 51bd6f291583 ("Add support for IPMB driver") Signed-off-by: Charles Han <hanchunchao@inspur.com> Message-ID: <20240926094419.25900-1-hanchunchao@inspur.com> Signed-off-by: Corey Minyard <corey@minyard.net> drivers/char/ipmi/ipmb_dev_int.c | 3 +++ 1 file changed, 3 insertions(+)